summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenrik Edin <henrik.edin@mongodb.com>2018-12-13 11:44:21 -0500
committerHenrik Edin <henrik.edin@mongodb.com>2018-12-18 09:12:51 -0500
commitc28cb6852fca219d6f0262000c378e982b7ca9ff (patch)
treee06e74d1729e644db7c4dc2e5ecd529145b2f34c /src
parent05ebfef11161b96ba0e8374f34c359a403097f60 (diff)
downloadmongo-c28cb6852fca219d6f0262000c378e982b7ca9ff.tar.gz
SERVER-38458 Upgrade boost to version 1.69
Diffstat (limited to 'src')
-rw-r--r--src/third_party/SConscript2
-rw-r--r--src/third_party/boost-1.68.0/SConscript48
-rw-r--r--src/third_party/boost-1.68.0/boost/algorithm/apply_permutation.hpp125
-rw-r--r--src/third_party/boost-1.68.0/boost/align/aligned_allocator.hpp158
-rw-r--r--src/third_party/boost-1.68.0/boost/align/aligned_allocator_adaptor.hpp162
-rw-r--r--src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc.hpp52
-rw-r--r--src/third_party/boost-1.68.0/boost/any.hpp337
-rw-r--r--src/third_party/boost-1.68.0/boost/archive/basic_binary_iarchive.hpp204
-rw-r--r--src/third_party/boost-1.68.0/boost/archive/detail/iserializer.hpp632
-rw-r--r--src/third_party/boost-1.68.0/boost/archive/impl/archive_serializer_map.ipp75
-rw-r--r--src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_grammar.hpp173
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/buffer.hpp2164
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/connect.hpp1061
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/detail/config.hpp1435
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/detail/impl/socket_ops.ipp3573
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/detail/is_buffer_sequence.hpp241
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/detail/timer_queue.hpp360
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/detail/win_global.hpp75
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/impl/io_context.hpp347
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/impl/read_until.hpp1502
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/impl/use_future.hpp940
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/ip/bad_address_cast.hpp50
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver.hpp1020
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_results.hpp313
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/packaged_task.hpp128
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/read.hpp949
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/read_at.hpp673
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/read_until.hpp1826
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/ssl/context_base.hpp194
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/ssl/impl/context.ipp1161
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/ssl/stream.hpp763
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/thread_pool.hpp234
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/use_future.hpp161
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/version.hpp23
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/write.hpp929
-rw-r--r--src/third_party/boost-1.68.0/boost/asio/write_at.hpp679
-rw-r--r--src/third_party/boost-1.68.0/boost/assign/assignment_exception.hpp43
-rw-r--r--src/third_party/boost-1.68.0/boost/assign/list_of.hpp682
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/chrono.hpp242
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp356
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/thread_clock.hpp92
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/chrono.hpp121
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp354
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/thread_clock.hpp92
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/chrono.hpp150
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp281
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/thread_clock.hpp103
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/detail/system.hpp19
-rw-r--r--src/third_party/boost-1.68.0/boost/chrono/io/time_point_io.hpp1249
-rw-r--r--src/third_party/boost-1.68.0/boost/concept/assert.hpp45
-rw-r--r--src/third_party/boost-1.68.0/boost/concept/detail/general.hpp77
-rw-r--r--src/third_party/boost-1.68.0/boost/concept/detail/has_constraints.hpp50
-rw-r--r--src/third_party/boost-1.68.0/boost/concept/detail/msvc.hpp123
-rw-r--r--src/third_party/boost-1.68.0/boost/concept/usage.hpp36
-rw-r--r--src/third_party/boost-1.68.0/boost/concept_archetype.hpp670
-rw-r--r--src/third_party/boost-1.68.0/boost/concept_check.hpp1082
-rw-r--r--src/third_party/boost-1.68.0/boost/config/auto_link.hpp466
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/borland.hpp335
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/clang.hpp340
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/codegear.hpp239
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/comeau.hpp59
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/digitalmars.hpp140
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/gcc.hpp359
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/greenhills.hpp28
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/hp_acc.hpp147
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/intel.hpp564
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/kai.hpp33
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/metrowerks.hpp195
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/mpw.hpp137
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/vacpp.hpp183
-rw-r--r--src/third_party/boost-1.68.0/boost/config/compiler/visualc.hpp355
-rw-r--r--src/third_party/boost-1.68.0/boost/config/detail/select_compiler_config.hpp158
-rw-r--r--src/third_party/boost-1.68.0/boost/config/detail/suffix.hpp1036
-rw-r--r--src/third_party/boost-1.68.0/boost/config/stdlib/libcpp.hpp131
-rw-r--r--src/third_party/boost-1.68.0/boost/config/stdlib/libstdcpp3.hpp347
-rw-r--r--src/third_party/boost-1.68.0/boost/container/allocator.hpp368
-rw-r--r--src/third_party/boost-1.68.0/boost/container/allocator_traits.hpp477
-rw-r--r--src/third_party/boost-1.68.0/boost/container/deque.hpp2270
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/adaptive_node_pool_impl.hpp1259
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/advanced_insert_int.hpp495
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/allocator_version_traits.hpp162
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/compare_functors.hpp74
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/copy_move_algo.hpp1154
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/flat_tree.hpp1621
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/iterator.hpp70
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/mpl.hpp104
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/multiallocation_chain.hpp298
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/node_alloc_holder.hpp419
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/std_fwd.hpp56
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/thread_mutex.hpp179
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/tree.hpp1458
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/type_traits.hpp70
-rw-r--r--src/third_party/boost-1.68.0/boost/container/detail/workaround.hpp111
-rw-r--r--src/third_party/boost-1.68.0/boost/container/flat_map.hpp2890
-rw-r--r--src/third_party/boost-1.68.0/boost/container/flat_set.hpp1847
-rw-r--r--src/third_party/boost-1.68.0/boost/container/list.hpp1499
-rw-r--r--src/third_party/boost-1.68.0/boost/container/map.hpp2233
-rw-r--r--src/third_party/boost-1.68.0/boost/container/pmr/resource_adaptor.hpp193
-rw-r--r--src/third_party/boost-1.68.0/boost/container/set.hpp1622
-rw-r--r--src/third_party/boost-1.68.0/boost/container/slist.hpp1714
-rw-r--r--src/third_party/boost-1.68.0/boost/container/small_vector.hpp631
-rw-r--r--src/third_party/boost-1.68.0/boost/container/stable_vector.hpp2124
-rw-r--r--src/third_party/boost-1.68.0/boost/container/static_vector.hpp1242
-rw-r--r--src/third_party/boost-1.68.0/boost/container/string.hpp3459
-rw-r--r--src/third_party/boost-1.68.0/boost/container/vector.hpp3392
-rw-r--r--src/third_party/boost-1.68.0/boost/core/explicit_operator_bool.hpp154
-rw-r--r--src/third_party/boost-1.68.0/boost/core/lightweight_test.hpp465
-rw-r--r--src/third_party/boost-1.68.0/boost/core/lightweight_test_trait.hpp56
-rw-r--r--src/third_party/boost-1.68.0/boost/core/noncopyable.hpp48
-rw-r--r--src/third_party/boost-1.68.0/boost/core/ref.hpp301
-rw-r--r--src/third_party/boost-1.68.0/boost/core/swap.hpp60
-rw-r--r--src/third_party/boost-1.68.0/boost/core/typeinfo.hpp151
-rw-r--r--src/third_party/boost-1.68.0/boost/date_time/compiler_config.hpp169
-rw-r--r--src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_duration.hpp91
-rw-r--r--src/third_party/boost-1.68.0/boost/date_time/time_duration.hpp298
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/allocator_utilities.hpp192
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/compressed_pair.hpp443
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/dynamic_bitset.hpp241
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/indirect_traits.hpp204
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/interlocked.hpp201
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/is_incrementable.hpp125
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/lcast_precision.hpp185
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/reference_content.hpp120
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/utf8_codecvt_facet.hpp219
-rw-r--r--src/third_party/boost-1.68.0/boost/detail/utf8_codecvt_facet.ipp289
-rw-r--r--src/third_party/boost-1.68.0/boost/dynamic_bitset/dynamic_bitset.hpp1970
-rw-r--r--src/third_party/boost-1.68.0/boost/exception/exception.hpp521
-rw-r--r--src/third_party/boost-1.68.0/boost/filesystem/operations.hpp1357
-rw-r--r--src/third_party/boost-1.68.0/boost/function.hpp74
-rw-r--r--src/third_party/boost-1.68.0/boost/function/function_base.hpp886
-rw-r--r--src/third_party/boost-1.68.0/boost/function/function_template.hpp1191
-rw-r--r--src/third_party/boost-1.68.0/boost/fusion/adapted/struct/adapt_struct.hpp125
-rw-r--r--src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_base.hpp309
-rw-r--r--src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/value_at_impl.hpp62
-rw-r--r--src/third_party/boost-1.68.0/boost/fusion/container/vector/vector.hpp322
-rw-r--r--src/third_party/boost-1.68.0/boost/fusion/support/config.hpp119
-rw-r--r--src/third_party/boost-1.68.0/boost/fusion/support/is_view.hpp67
-rw-r--r--src/third_party/boost-1.68.0/boost/integer/common_factor_rt.hpp578
-rw-r--r--src/third_party/boost-1.68.0/boost/interprocess/detail/file_wrapper.hpp212
-rw-r--r--src/third_party/boost-1.68.0/boost/interprocess/detail/win32_api.hpp2468
-rw-r--r--src/third_party/boost-1.68.0/boost/interprocess/exceptions.hpp110
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/avltree_algorithms.hpp727
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/bstree_algorithms.hpp2097
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/circular_list_algorithms.hpp468
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/circular_slist_algorithms.hpp406
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/derivation_value_traits.hpp77
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/any_node_and_algorithms.hpp297
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/avltree_node.hpp193
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/common_slist_algorithms.hpp198
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/list_iterator.hpp134
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/list_node.hpp72
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/node_cloner_disposer.hpp105
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/rbtree_node.hpp205
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/simple_disposers.hpp50
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/slist_iterator.hpp125
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/slist_node.hpp64
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/tree_iterator.hpp172
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/tree_node.hpp80
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/detail/tree_value_compare.hpp167
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/hashtable.hpp3668
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/linear_slist_algorithms.hpp342
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/rbtree_algorithms.hpp622
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/sgtree_algorithms.hpp420
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/slist.hpp2254
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/splaytree_algorithms.hpp754
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/treap_algorithms.hpp699
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/unordered_set.hpp990
-rw-r--r--src/third_party/boost-1.68.0/boost/intrusive/unordered_set_hook.hpp459
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/chain.hpp594
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/direct_adapter.hpp281
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp62
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/buffer.hpp229
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/config/codecvt.hpp81
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/config/fpos.hpp43
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/config/wide_streams.hpp55
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/restrict_impl.hpp481
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp311
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp447
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp114
-rw-r--r--src/third_party/boost-1.68.0/boost/iostreams/filter/bzip2.hpp418
-rw-r--r--src/third_party/boost-1.68.0/boost/iterator/advance.hpp84
-rw-r--r--src/third_party/boost-1.68.0/boost/iterator/distance.hpp65
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast.hpp105
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/bad_lexical_cast.hpp101
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_lexical.hpp498
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_lexical_streams.hpp786
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_numeric.hpp172
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/detail/inf_nan.hpp197
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/detail/is_character.hpp58
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/detail/lcast_char_constants.hpp46
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp294
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/detail/widest_char.hpp40
-rw-r--r--src/third_party/boost-1.68.0/boost/lexical_cast/try_lexical_convert.hpp227
-rw-r--r--src/third_party/boost-1.68.0/boost/logic/tribool.hpp456
-rw-r--r--src/third_party/boost-1.68.0/boost/math/constants/calculate_constants.hpp968
-rw-r--r--src/third_party/boost-1.68.0/boost/math/constants/constants.hpp346
-rw-r--r--src/third_party/boost-1.68.0/boost/math/distributions/extreme_value.hpp300
-rw-r--r--src/third_party/boost-1.68.0/boost/math/special_functions/detail/fp_traits.hpp581
-rw-r--r--src/third_party/boost-1.68.0/boost/math/special_functions/erf.hpp1273
-rw-r--r--src/third_party/boost-1.68.0/boost/math/special_functions/math_fwd.hpp1651
-rw-r--r--src/third_party/boost-1.68.0/boost/math/special_functions/next.hpp858
-rw-r--r--src/third_party/boost-1.68.0/boost/math/special_functions/trunc.hpp111
-rw-r--r--src/third_party/boost-1.68.0/boost/math/tools/fraction.hpp260
-rw-r--r--src/third_party/boost-1.68.0/boost/math/tools/precision.hpp409
-rw-r--r--src/third_party/boost-1.68.0/boost/math/tools/roots.hpp563
-rw-r--r--src/third_party/boost-1.68.0/boost/math/tools/series.hpp158
-rw-r--r--src/third_party/boost-1.68.0/boost/math/tools/toms748_solve.hpp613
-rw-r--r--src/third_party/boost-1.68.0/boost/move/algo/move.hpp156
-rw-r--r--src/third_party/boost-1.68.0/boost/move/algorithm.hpp167
-rw-r--r--src/third_party/boost-1.68.0/boost/move/core.hpp490
-rw-r--r--src/third_party/boost-1.68.0/boost/move/detail/meta_utils.hpp585
-rw-r--r--src/third_party/boost-1.68.0/boost/move/detail/type_traits.hpp1086
-rw-r--r--src/third_party/boost-1.68.0/boost/mpl/assert.hpp450
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float.hpp2025
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/cpp_int.hpp1978
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/bitwise.hpp842
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/import_export.hpp251
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/multiply.hpp498
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/detail/bitscan.hpp265
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/detail/default_ops.hpp3743
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/constants.hpp314
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/pow.hpp904
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/detail/no_et_ops.hpp624
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/detail/number_base.hpp1636
-rw-r--r--src/third_party/boost-1.68.0/boost/multiprecision/number.hpp1987
-rw-r--r--src/third_party/boost-1.68.0/boost/optional/detail/old_optional_implementation.hpp1059
-rw-r--r--src/third_party/boost-1.68.0/boost/optional/detail/optional_trivially_copyable_base.hpp499
-rw-r--r--src/third_party/boost-1.68.0/boost/optional/optional.hpp1598
-rw-r--r--src/third_party/boost-1.68.0/boost/pending/integer_log2.hpp9
-rw-r--r--src/third_party/boost-1.68.0/boost/pending/lowest_bit.hpp39
-rw-r--r--src/third_party/boost-1.68.0/boost/predef/compiler/compaq.h66
-rw-r--r--src/third_party/boost-1.68.0/boost/predef/compiler/nvcc.h60
-rw-r--r--src/third_party/boost-1.68.0/boost/predef/detail/endian_compat.h26
-rw-r--r--src/third_party/boost-1.68.0/boost/predef/os/cygwin.h45
-rw-r--r--src/third_party/boost-1.68.0/boost/predef/version.h15
-rw-r--r--src/third_party/boost-1.68.0/boost/preprocessor/config/config.hpp106
-rw-r--r--src/third_party/boost-1.68.0/boost/preprocessor/stringize.hpp33
-rw-r--r--src/third_party/boost-1.68.0/boost/range/algorithm/random_shuffle.hpp141
-rw-r--r--src/third_party/boost-1.68.0/boost/range/begin.hpp135
-rw-r--r--src/third_party/boost-1.68.0/boost/range/distance.hpp35
-rw-r--r--src/third_party/boost-1.68.0/boost/range/end.hpp128
-rw-r--r--src/third_party/boost-1.68.0/boost/ratio/config.hpp92
-rw-r--r--src/third_party/boost-1.68.0/boost/rational.hpp999
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/config.hpp477
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/icu.hpp1040
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/basic_regex.hpp781
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/basic_regex_creator.hpp1573
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/basic_regex_parser.hpp3140
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/fileiter.hpp455
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/instances.hpp225
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/match_flags.hpp150
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/match_results.hpp707
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher.hpp621
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_common.hpp1016
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_non_recursive.hpp1944
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/regex_format.hpp1156
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/regex_iterator.hpp201
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/regex_raw_buffer.hpp210
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/regex_split.hpp172
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/regex_token_iterator.hpp333
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/regex_traits_defaults.hpp380
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/regex_workaround.hpp234
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/u32regex_iterator.hpp193
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/u32regex_token_iterator.hpp368
-rw-r--r--src/third_party/boost-1.68.0/boost/regex/v4/w32_regex_traits.hpp743
-rw-r--r--src/third_party/boost-1.68.0/boost/serialization/singleton.hpp173
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/allocate_local_shared_array.hpp228
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/allocate_shared_array.hpp703
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_gcc.hpp72
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/local_counted_base.hpp148
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp152
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp144
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp150
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp172
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp160
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp159
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp189
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp183
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp168
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp175
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp109
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp138
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp163
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp115
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp133
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp138
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp157
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp152
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp132
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_impl.hpp292
-rw-r--r--src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_interlocked.hpp168
-rw-r--r--src/third_party/boost-1.68.0/boost/spirit/home/classic/version.hpp30
-rw-r--r--src/third_party/boost-1.68.0/boost/system/config.hpp70
-rw-r--r--src/third_party/boost-1.68.0/boost/system/detail/error_code.ipp496
-rw-r--r--src/third_party/boost-1.68.0/boost/system/detail/local_free_on_destruction.hpp42
-rw-r--r--src/third_party/boost-1.68.0/boost/system/error_code.hpp944
-rw-r--r--src/third_party/boost-1.68.0/boost/system/system_error.hpp84
-rw-r--r--src/third_party/boost-1.68.0/boost/test/detail/enable_warnings.hpp36
-rw-r--r--src/third_party/boost-1.68.0/boost/test/detail/global_typedef.hpp111
-rw-r--r--src/third_party/boost-1.68.0/boost/test/detail/suppress_warnings.hpp38
-rw-r--r--src/third_party/boost-1.68.0/boost/test/detail/throw_exception.hpp71
-rw-r--r--src/third_party/boost-1.68.0/boost/test/execution_monitor.hpp583
-rw-r--r--src/third_party/boost-1.68.0/boost/test/framework.hpp303
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/compiler_log_formatter.ipp298
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/decorator.ipp210
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/execution_monitor.ipp1448
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/framework.ipp1723
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/progress_monitor.ipp185
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/results_collector.ipp295
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/test_framework_init_observer.ipp109
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/test_tree.ipp548
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/unit_test_log.ipp691
-rw-r--r--src/third_party/boost-1.68.0/boost/test/impl/unit_test_monitor.ipp75
-rw-r--r--src/third_party/boost-1.68.0/boost/test/minimal.hpp156
-rw-r--r--src/third_party/boost-1.68.0/boost/test/progress_monitor.hpp66
-rw-r--r--src/third_party/boost-1.68.0/boost/test/results_collector.hpp149
-rw-r--r--src/third_party/boost-1.68.0/boost/test/test_framework_init_observer.hpp63
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tools/assertion.hpp410
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tools/collection_comparison_op.hpp449
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tools/detail/print_helper.hpp246
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tools/floating_point_comparison.hpp315
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tools/fpc_op.hpp210
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tree/auto_registration.hpp54
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tree/decorator.hpp279
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tree/test_case_template.hpp191
-rw-r--r--src/third_party/boost-1.68.0/boost/test/tree/test_unit.hpp289
-rw-r--r--src/third_party/boost-1.68.0/boost/test/unit_test_log.hpp280
-rw-r--r--src/third_party/boost-1.68.0/boost/test/unit_test_monitor.hpp62
-rw-r--r--src/third_party/boost-1.68.0/boost/test/unit_test_suite.hpp403
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/is_forward_iterable.hpp267
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/runtime/argument_factory.hpp242
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/runtime/cla/argv_traverser.hpp105
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/runtime/cla/parser.hpp625
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/runtime/errors.hpp195
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/runtime/modifier.hpp106
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/runtime/parameter.hpp526
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/setcolor.hpp315
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/trivial_singleton.hpp79
-rw-r--r--src/third_party/boost-1.68.0/boost/test/utils/xml_printer.hpp143
-rw-r--r--src/third_party/boost-1.68.0/boost/throw_exception.hpp102
-rw-r--r--src/third_party/boost-1.68.0/boost/token_functions.hpp652
-rw-r--r--src/third_party/boost-1.68.0/boost/type_index/stl_type_index.hpp275
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits.hpp154
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/detail/config.hpp83
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/detail/has_postfix_operator.hpp195
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/detail/has_prefix_operator.hpp208
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/detail/is_likely_lambda.hpp94
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/has_dereference.hpp31
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/has_post_decrement.hpp44
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/has_post_increment.hpp44
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/has_pre_decrement.hpp44
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/has_pre_increment.hpp44
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/has_trivial_move_assign.hpp73
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/has_trivial_move_constructor.hpp78
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/is_copy_assignable.hpp141
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/is_copy_constructible.hpp187
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/is_function.hpp102
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/is_member_function_pointer.hpp120
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_move_assignable.hpp92
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_move_constructible.hpp97
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/is_rvalue_reference.hpp25
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/is_virtual_base_of.hpp146
-rw-r--r--src/third_party/boost-1.68.0/boost/type_traits/make_void.hpp52
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/encode_decode.hpp61
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/encode_decode_params.hpp34
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/int_encoding.hpp118
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/modifiers.hpp121
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/msvc/typeof_impl.hpp203
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/native.hpp60
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/pointers_data_members.hpp38
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/register_functions_iterate.hpp135
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/register_mem_functions.hpp32
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/template_encoding.hpp160
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/template_template_param.hpp149
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/type_encoding.hpp27
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/typeof_impl.hpp186
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/vector.hpp166
-rw-r--r--src/third_party/boost-1.68.0/boost/typeof/vector50.hpp171
-rw-r--r--src/third_party/boost-1.68.0/boost/utility/string_ref.hpp553
-rw-r--r--src/third_party/boost-1.68.0/boost/utility/string_view.hpp705
-rw-r--r--src/third_party/boost-1.68.0/boost/version.hpp32
-rw-r--r--src/third_party/boost-1.68.0/libs/container/src/dlmalloc_2_8_6.c6280
-rw-r--r--src/third_party/boost-1.68.0/libs/container/src/dlmalloc_ext_2_8_6.c1459
-rw-r--r--src/third_party/boost-1.68.0/libs/date_time/README.md39
-rw-r--r--src/third_party/boost-1.68.0/libs/filesystem/src/operations.cpp2399
-rw-r--r--src/third_party/boost-1.68.0/libs/filesystem/src/unique_path.cpp163
-rw-r--r--src/third_party/boost-1.68.0/libs/filesystem/src/windows_file_codecvt.cpp75
-rw-r--r--src/third_party/boost-1.68.0/libs/function/Jamfile11
-rw-r--r--src/third_party/boost-1.68.0/libs/function/README.md34
-rw-r--r--src/third_party/boost-1.68.0/libs/iostreams/src/bzip2.cpp168
-rw-r--r--src/third_party/boost-1.68.0/libs/iostreams/src/lzma.cpp147
-rw-r--r--src/third_party/boost-1.68.0/libs/iostreams/src/mapped_file.cpp496
-rw-r--r--src/third_party/boost-1.68.0/libs/iostreams/src/zlib.cpp187
-rw-r--r--src/third_party/boost-1.68.0/libs/regex/src/cregex.cpp660
-rw-r--r--src/third_party/boost-1.68.0/libs/regex/src/fileiter.cpp928
-rw-r--r--src/third_party/boost-1.68.0/libs/regex/src/icu.cpp511
-rw-r--r--src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info.cpp193
-rw-r--r--src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info_typeid.cpp163
-rw-r--r--src/third_party/boost-1.68.0/libs/serialization/src/void_cast.cpp379
-rw-r--r--src/third_party/boost-1.68.0/libs/system/src/error_code.cpp20
-rw-r--r--src/third_party/boost-1.68.0/libs/thread/src/future.cpp71
-rw-r--r--src/third_party/boost-1.68.0/libs/thread/src/pthread/thread.cpp796
-rw-r--r--src/third_party/boost-1.68.0/libs/thread/src/tss_null.cpp38
-rw-r--r--src/third_party/boost-1.68.0/libs/thread/src/win32/thread.cpp977
-rw-r--r--src/third_party/boost-1.68.0/libs/thread/src/win32/thread_primitives.cpp140
-rw-r--r--src/third_party/boost-1.68.0/libs/thread/src/win32/tss_dll.cpp85
-rw-r--r--src/third_party/boost-1.68.0/libs/thread/src/win32/tss_pe.cpp337
-rw-r--r--src/third_party/boost-1.69.0/SConscript53
-rw-r--r--src/third_party/boost-1.69.0/boost.css (renamed from src/third_party/boost-1.68.0/boost.css)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/algorithm.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/apply_permutation.hpp126
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/clamp.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/clamp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/all_of.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/all_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/any_of.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/any_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_if.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/copy_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_n.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/copy_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/find_if_not.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/find_if_not.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/iota.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/iota.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_partitioned.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_partitioned.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_permutation.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_permutation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_sorted.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_sorted.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/none_of.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/none_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/one_of.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/one_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/partition_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_point.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx11/partition_point.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx14/equal.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx14/equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx14/is_permutation.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx14/is_permutation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx14/mismatch.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx14/mismatch.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx17/exclusive_scan.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx17/exclusive_scan.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx17/for_each_n.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx17/for_each_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx17/inclusive_scan.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx17/inclusive_scan.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx17/reduce.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx17/reduce.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_reduce.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_reduce.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/find_backward.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/find_backward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/find_not.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/find_not.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/gather.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/gather.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/hex.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/hex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/is_palindrome.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/is_palindrome.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/is_partitioned_until.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/is_partitioned_until.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/minmax.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/minmax.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/minmax_element.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/minmax_element.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/searching/boyer_moore.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore_horspool.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/searching/boyer_moore_horspool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/searching/detail/bm_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/searching/detail/bm_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/searching/detail/debugging.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/searching/detail/debugging.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/searching/knuth_morris_pratt.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/searching/knuth_morris_pratt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/sort_subrange.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/sort_subrange.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/case_conv.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/case_conv.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/classification.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/classification.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/compare.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/compare.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/concept.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/concept.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/config.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/constants.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/constants.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/case_conv.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/case_conv.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/classification.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/classification.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_all.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format_all.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_store.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format_store.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/finder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder_regex.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/finder_regex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter_regex.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/formatter_regex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/predicate.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/predicate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/replace_storage.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/replace_storage.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/trim.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/trim.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/detail/util.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/detail/util.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/erase.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/erase.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/find.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/find.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/find_format.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/find_format.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/find_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/find_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/finder.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/finder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/iter_find.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/iter_find.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/join.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/join.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/predicate.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/predicate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/predicate_facade.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/predicate_facade.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/regex.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/regex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/regex_find_format.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/regex_find_format.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/replace.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/replace.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/sequence_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/sequence_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/split.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/split.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/std/list_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/std/list_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/std/rope_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/std/rope_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/std/slist_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/std/slist_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/std/string_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/std/string_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/std_containers_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/std_containers_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/trim.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/trim.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/trim_all.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/trim_all.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string/yes_no_type.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string/yes_no_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/algorithm/string_regex.hpp (renamed from src/third_party/boost-1.68.0/boost/algorithm/string_regex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align.hpp (renamed from src/third_party/boost-1.68.0/boost/align.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/align.hpp (renamed from src/third_party/boost-1.68.0/boost/align/align.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/align_down.hpp (renamed from src/third_party/boost-1.68.0/boost/align/align_down.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/align_up.hpp (renamed from src/third_party/boost-1.68.0/boost/align/align_up.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/aligned_alloc.hpp (renamed from src/third_party/boost-1.68.0/boost/align/aligned_alloc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/aligned_allocator.hpp155
-rw-r--r--src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor.hpp174
-rw-r--r--src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/align/aligned_allocator_adaptor_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/aligned_allocator_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/align/aligned_allocator_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/aligned_delete.hpp (renamed from src/third_party/boost-1.68.0/boost/align/aligned_delete.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/aligned_delete_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/align/aligned_delete_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/alignment_of.hpp (renamed from src/third_party/boost-1.68.0/boost/align/alignment_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/alignment_of_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/align/alignment_of_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/assume_aligned.hpp (renamed from src/third_party/boost-1.68.0/boost/align/assume_aligned.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/addressof.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/align.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/align.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/align_cxx11.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/align_cxx11.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/align_down.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/align_down.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/align_up.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/align_up.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc.hpp52
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_android.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_android.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_macos.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_macos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_msvc.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_msvc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_posix.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_posix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_sunos.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_sunos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/alignment_of.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/alignment_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/alignment_of_clang.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/alignment_of_clang.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/alignment_of_codegear.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/alignment_of_codegear.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/alignment_of_cxx11.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/alignment_of_cxx11.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/alignment_of_gcc.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/alignment_of_gcc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/alignment_of_msvc.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/alignment_of_msvc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/assume_aligned.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/assume_aligned.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_clang.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_clang.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_gcc.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_gcc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_intel.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_intel.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_msvc.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_msvc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/element_type.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/element_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/integral_constant.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/integral_constant.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/is_aligned.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/is_aligned.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/is_alignment.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/is_alignment.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/is_alignment_constant.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/is_alignment_constant.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/max_align.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/max_align.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/max_objects.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/max_objects.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/max_size.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/max_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/detail/min_size.hpp (renamed from src/third_party/boost-1.68.0/boost/align/detail/min_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/align/is_aligned.hpp (renamed from src/third_party/boost-1.68.0/boost/align/is_aligned.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/aligned_storage.hpp (renamed from src/third_party/boost-1.68.0/boost/aligned_storage.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/any.hpp337
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/archive_exception.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/archive_exception.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_archive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_archive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_binary_iarchive.hpp216
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_binary_iprimitive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_binary_iprimitive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_binary_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_binary_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_binary_oprimitive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_binary_oprimitive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_streambuf_locale_saver.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_streambuf_locale_saver.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_text_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_text_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_text_iprimitive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_text_iprimitive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_text_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_text_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_text_oprimitive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_text_oprimitive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_xml_archive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_xml_archive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_xml_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_xml_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/basic_xml_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/basic_xml_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/binary_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/binary_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/binary_iarchive_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/binary_iarchive_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/binary_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/binary_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/binary_oarchive_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/binary_oarchive_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/binary_wiarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/binary_wiarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/binary_woarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/binary_woarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/codecvt_null.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/codecvt_null.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/abi_prefix.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/abi_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/abi_suffix.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/abi_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/archive_serializer_map.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/archive_serializer_map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/auto_link_archive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/auto_link_archive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/auto_link_warchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/auto_link_warchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/basic_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/basic_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/basic_iserializer.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/basic_iserializer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/basic_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/basic_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/basic_oserializer.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/basic_oserializer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_iserializer.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/basic_pointer_iserializer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_oserializer.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/basic_pointer_oserializer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/basic_serializer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer_map.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/basic_serializer_map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/check.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/check.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/common_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/common_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/common_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/common_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/decl.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/decl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/helper_collection.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/helper_collection.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/interface_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/interface_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/interface_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/interface_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/iserializer.hpp630
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/oserializer.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/oserializer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_iarchive_route.hpp218
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_oarchive_route.hpp209
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/register_archive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/register_archive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/detail/utf8_codecvt_facet.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/detail/utf8_codecvt_facet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/dinkumware.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/dinkumware.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/archive_serializer_map.ipp75
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iarchive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_iarchive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iprimitive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_iprimitive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oarchive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_oarchive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oprimitive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_oprimitive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iarchive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_text_iarchive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iprimitive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_text_iprimitive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oarchive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_text_oarchive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oprimitive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_text_oprimitive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_grammar.hpp173
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_iarchive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_iarchive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_oarchive.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_oarchive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/text_iarchive_impl.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/text_iarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/text_oarchive_impl.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/text_oarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/text_wiarchive_impl.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/text_wiarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/text_woarchive_impl.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/text_woarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/xml_iarchive_impl.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/xml_iarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/xml_oarchive_impl.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/xml_oarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/xml_wiarchive_impl.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/xml_wiarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/impl/xml_woarchive_impl.ipp (renamed from src/third_party/boost-1.68.0/boost/archive/impl/xml_woarchive_impl.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/base64_from_binary.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/base64_from_binary.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/binary_from_base64.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/binary_from_base64.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/dataflow_exception.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/dataflow_exception.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/escape.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/escape.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/insert_linebreaks.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/insert_linebreaks.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/istream_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/istream_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/mb_from_wchar.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/mb_from_wchar.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/ostream_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/ostream_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/remove_whitespace.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/remove_whitespace.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/transform_width.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/transform_width.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/unescape.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/unescape.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/wchar_from_mb.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/wchar_from_mb.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/xml_escape.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/xml_escape.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/iterators/xml_unescape.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/iterators/xml_unescape.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_iarchive.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_oarchive.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/polymorphic_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/polymorphic_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_text_iarchive.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_text_oarchive.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_text_wiarchive.hpp59
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_text_woarchive.hpp50
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_iarchive.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_oarchive.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_wiarchive.hpp50
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_woarchive.hpp50
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/text_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/text_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/text_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/text_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/text_wiarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/text_wiarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/text_woarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/text_woarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/wcslen.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/wcslen.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/xml_archive_exception.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/xml_archive_exception.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/xml_iarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/xml_iarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/xml_oarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/xml_oarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/xml_wiarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/xml_wiarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/archive/xml_woarchive.hpp (renamed from src/third_party/boost-1.68.0/boost/archive/xml_woarchive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/array.hpp (renamed from src/third_party/boost-1.68.0/boost/array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio.hpp (renamed from src/third_party/boost-1.68.0/boost/asio.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/associated_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/associated_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/associated_executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/associated_executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/async_result.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/async_result.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_datagram_socket.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_datagram_socket.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_deadline_timer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_deadline_timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_io_object.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_io_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_raw_socket.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_raw_socket.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_seq_packet_socket.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_seq_packet_socket.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_serial_port.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_serial_port.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_signal_set.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_signal_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_socket.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_socket.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_socket_acceptor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_socket_acceptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_socket_iostream.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_socket_iostream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_socket_streambuf.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_socket_streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_stream_socket.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_stream_socket.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_streambuf.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_streambuf_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_streambuf_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/basic_waitable_timer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/basic_waitable_timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/bind_executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/bind_executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffer.hpp2173
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_read_stream.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/buffered_read_stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_read_stream_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/buffered_read_stream_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_stream.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/buffered_stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_stream_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/buffered_stream_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_write_stream.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/buffered_write_stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffered_write_stream_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/buffered_write_stream_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/buffers_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/buffers_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/completion_condition.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/completion_condition.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/connect.hpp1062
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/coroutine.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/coroutine.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/datagram_socket_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/datagram_socket_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/deadline_timer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/deadline_timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/deadline_timer_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/deadline_timer_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/defer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/defer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/array.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/array_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/array_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/assert.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/assert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/atomic_count.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/atomic_count.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/base_from_completion_cond.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/base_from_completion_cond.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/bind_handler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/bind_handler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/buffer_resize_guard.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/buffer_resize_guard.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/buffer_sequence_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/buffer_sequence_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/buffered_stream_storage.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/buffered_stream_storage.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/call_stack.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/call_stack.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/chrono.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/chrono_time_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/chrono_time_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/completion_handler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/completion_handler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/concurrency_hint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/concurrency_hint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_event.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/conditionally_enabled_event.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/conditionally_enabled_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/config.hpp1454
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/consuming_buffers.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/consuming_buffers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/cstddef.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/cstddef.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/cstdint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/cstdint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/date_time_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/date_time_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/deadline_timer_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/deadline_timer_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/dependent_type.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/dependent_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/descriptor_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/descriptor_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/descriptor_read_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/descriptor_read_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/descriptor_write_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/descriptor_write_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/dev_poll_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/dev_poll_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/epoll_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/epoll_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/event.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/event.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/eventfd_select_interrupter.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/eventfd_select_interrupter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/executor_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/executor_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/fd_set_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/fd_set_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/functional.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/functional.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/future.hpp33
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/gcc_arm_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/gcc_arm_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/gcc_hppa_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/gcc_hppa_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/gcc_sync_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/gcc_sync_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/gcc_x86_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/gcc_x86_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/global.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/global.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_alloc_helpers.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/handler_alloc_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_cont_helpers.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/handler_cont_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_invoke_helpers.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/handler_invoke_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_tracking.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/handler_tracking.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_type_requirements.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/handler_type_requirements.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/handler_work.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/handler_work.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/hash_map.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/hash_map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/descriptor_ops.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/descriptor_ops.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/dev_poll_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/dev_poll_reactor.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/epoll_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/epoll_reactor.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/handler_tracking.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/handler_tracking.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/kqueue_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/kqueue_reactor.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/null_event.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/null_event.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/pipe_select_interrupter.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/pipe_select_interrupter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_event.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_event.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_mutex.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_mutex.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_thread.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_thread.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_tss_ptr.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_tss_ptr.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_descriptor_service.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_descriptor_service.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_serial_port_service.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_serial_port_service.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_socket_service_base.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_socket_service_base.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/resolver_service_base.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/resolver_service_base.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/scheduler.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/scheduler.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/select_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/select_reactor.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/service_registry.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/service_registry.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/signal_set_service.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/signal_set_service.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/socket_ops.ipp3573
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/socket_select_interrupter.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/socket_select_interrupter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_executor_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_executor_service.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_service.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/throw_error.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/throw_error.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_ptime.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/timer_queue_ptime.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_set.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/timer_queue_set.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_event.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_event.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_handle_service.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_handle_service.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_io_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_io_context.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_mutex.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_mutex.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_object_handle_service.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_object_handle_service.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_static_mutex.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_static_mutex.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_thread.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_thread.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/win_tss_ptr.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/win_tss_ptr.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/impl/winsock_init.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/impl/winsock_init.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/io_control.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/io_control.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/is_buffer_sequence.hpp265
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/is_executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/is_executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/keyword_tss_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/keyword_tss_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/kqueue_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/kqueue_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/limits.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/limits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/local_free_on_block_exit.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/local_free_on_block_exit.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/macos_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/macos_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/memory.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/memory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/noncopyable.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/noncopyable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_event.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_event.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_global.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_global.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_signal_blocker.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_signal_blocker.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_socket_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_socket_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_static_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_static_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/null_tss_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/null_tss_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/object_pool.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/object_pool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/old_win_sdk_compat.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/old_win_sdk_compat.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/op_queue.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/op_queue.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/operation.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/operation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/pipe_select_interrupter.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/pipe_select_interrupter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/pop_options.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/pop_options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_event.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/posix_event.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_fd_set_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/posix_fd_set_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_global.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/posix_global.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/posix_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_signal_blocker.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/posix_signal_blocker.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_static_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/posix_static_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/posix_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/posix_tss_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/posix_tss_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/push_options.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/push_options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_descriptor_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_descriptor_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_null_buffers_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_null_buffers_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_serial_port_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_serial_port_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_accept_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_accept_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_connect_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_connect_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recv_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recv_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_send_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_send_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_sendto_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_sendto_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_service_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactive_wait_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactive_wait_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactor_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactor_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactor_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactor_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/reactor_op_queue.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/reactor_op_queue.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/recycling_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/recycling_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/regex_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/regex_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolve_endpoint_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/resolve_endpoint_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolve_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/resolve_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolve_query_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/resolve_query_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolver_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/resolver_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/resolver_service_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/resolver_service_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scheduler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/scheduler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scheduler_operation.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/scheduler_operation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scheduler_thread_info.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/scheduler_thread_info.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scoped_lock.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/scoped_lock.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/scoped_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/scoped_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/select_interrupter.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/select_interrupter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/select_reactor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/select_reactor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/service_registry.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/service_registry.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_blocker.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/signal_blocker.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_handler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/signal_handler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_init.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/signal_init.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/signal_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/signal_set_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/signal_set_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_holder.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/socket_holder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/socket_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_option.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/socket_option.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_select_interrupter.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/socket_select_interrupter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/socket_types.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/socket_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/solaris_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/solaris_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/static_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/static_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_event.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/std_event.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/std_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_global.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/std_global.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/std_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_static_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/std_static_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/std_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/std_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/strand_executor_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/strand_executor_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/strand_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/strand_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/string_view.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/string_view.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/thread.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/thread_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/thread_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/thread_group.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/thread_group.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/thread_info_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/thread_info_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/throw_error.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/throw_error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/throw_exception.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/throw_exception.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_queue.hpp362
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_ptime.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_ptime.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_set.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/timer_scheduler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/timer_scheduler_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/tss_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/tss_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/type_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/variadic_templates.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/variadic_templates.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/wait_handler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/wait_handler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/wait_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/wait_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_event.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_event.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_fd_set_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_fd_set_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_fenced_block.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_fenced_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_global.hpp76
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_read_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_read_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_write_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_write_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_io_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_io_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_null_buffers_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_null_buffers_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_operation.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_operation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_overlapped_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_serial_port_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_serial_port_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_accept_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_accept_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_connect_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_connect_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recv_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recv_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_send_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_send_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_service_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_thread_info.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_thread_info.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_wait_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_wait_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_object_handle_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_object_handle_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_static_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_static_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/win_tss_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/win_tss_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winapp_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winapp_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/wince_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/wince_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_manager.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_async_manager.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_async_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolve_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_resolve_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolver_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_resolver_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_connect_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_connect_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_recv_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_recv_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_send_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_send_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_ssocket_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_ssocket_service_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_timer_scheduler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_timer_scheduler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winrt_utils.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winrt_utils.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/winsock_init.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/winsock_init.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/work_dispatcher.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/work_dispatcher.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/detail/wrapped_handler.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/detail/wrapped_handler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/dispatch.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/dispatch.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/error.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/execution_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/execution_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/executor_work_guard.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/executor_work_guard.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/experimental.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/co_spawn.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/experimental/co_spawn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/detached.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/experimental/detached.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/impl/co_spawn.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/experimental/impl/co_spawn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/impl/detached.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/experimental/impl/detached.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/impl/redirect_error.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/experimental/impl/redirect_error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/experimental/redirect_error.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/experimental/redirect_error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/basic_endpoint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/generic/basic_endpoint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/datagram_protocol.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/generic/datagram_protocol.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/detail/endpoint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/generic/detail/endpoint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/detail/impl/endpoint.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/generic/detail/impl/endpoint.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/raw_protocol.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/generic/raw_protocol.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/seq_packet_protocol.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/generic/seq_packet_protocol.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/generic/stream_protocol.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/generic/stream_protocol.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/handler_alloc_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/handler_alloc_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/handler_continuation_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/handler_continuation_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/handler_invoke_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/handler_invoke_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/handler_type.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/handler_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/high_resolution_timer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/high_resolution_timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/buffered_read_stream.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/buffered_read_stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/buffered_write_stream.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/buffered_write_stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/connect.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/connect.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/defer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/defer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/dispatch.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/dispatch.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/error.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/error.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/execution_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/execution_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/execution_context.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/execution_context.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/executor.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/executor.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/handler_alloc_hook.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/handler_alloc_hook.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/io_context.hpp347
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/io_context.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/io_context.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/post.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/post.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/read.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/read.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/read_at.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/read_at.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/read_until.hpp1504
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/serial_port_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/serial_port_base.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/spawn.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/spawn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/src.cpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/src.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/src.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/src.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/system_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/system_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/system_context.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/system_context.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/system_executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/system_executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/thread_pool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/thread_pool.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/use_future.hpp939
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/write.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/write.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/impl/write_at.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/impl/write_at.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/io_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/io_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/io_context_strand.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/io_context_strand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/io_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/io_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/io_service_strand.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/io_service_strand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/address.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v4.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/address_v4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v4_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/address_v4_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v4_range.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/address_v4_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v6.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/address_v6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v6_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/address_v6_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/address_v6_range.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/address_v6_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/bad_address_cast.hpp55
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/basic_endpoint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/basic_endpoint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver.hpp1022
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_entry.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_entry.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_query.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_query.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_results.hpp313
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/detail/endpoint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/detail/endpoint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/detail/impl/endpoint.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/detail/impl/endpoint.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/detail/socket_option.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/detail/socket_option.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/host_name.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/host_name.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/icmp.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/icmp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/address.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/address.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v4.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v6.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/basic_endpoint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/basic_endpoint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/host_name.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/host_name.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v4.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v6.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/multicast.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/multicast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/network_v4.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/network_v4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/network_v6.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/network_v6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/resolver_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/resolver_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/resolver_query_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/resolver_query_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/resolver_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/resolver_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/tcp.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/tcp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/udp.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/udp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/unicast.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/unicast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ip/v6_only.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ip/v6_only.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/is_executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/is_executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/is_read_buffered.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/is_read_buffered.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/is_write_buffered.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/is_write_buffered.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/basic_endpoint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/local/basic_endpoint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/connect_pair.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/local/connect_pair.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/datagram_protocol.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/local/datagram_protocol.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/detail/endpoint.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/local/detail/endpoint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/detail/impl/endpoint.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/local/detail/impl/endpoint.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/local/stream_protocol.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/local/stream_protocol.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/packaged_task.hpp128
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/placeholders.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/basic_descriptor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/posix/basic_descriptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/basic_stream_descriptor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/posix/basic_stream_descriptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/descriptor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/posix/descriptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/descriptor_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/posix/descriptor_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/posix/stream_descriptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/posix/stream_descriptor_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/post.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/post.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/raw_socket_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/raw_socket_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/read.hpp949
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/read_at.hpp673
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/read_until.hpp1828
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/seq_packet_socket_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/seq_packet_socket_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/serial_port.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/serial_port.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/serial_port_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/serial_port_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/serial_port_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/serial_port_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/signal_set.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/signal_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/signal_set_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/signal_set_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/socket_acceptor_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/socket_acceptor_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/socket_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/socket_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/spawn.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/spawn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/context_base.hpp211
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/buffered_handshake_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/buffered_handshake_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/engine.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/engine.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/handshake_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/handshake_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/engine.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/impl/engine.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/openssl_init.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/impl/openssl_init.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/io.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_init.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/openssl_init.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_types.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/openssl_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/password_callback.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/password_callback.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/read_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/read_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/shutdown_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/shutdown_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/stream_core.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/stream_core.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/verify_callback.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/verify_callback.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/detail/write_op.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/detail/write_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/error.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/impl/context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.ipp1206
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/impl/error.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/impl/error.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/impl/rfc2818_verification.ipp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/impl/rfc2818_verification.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/impl/src.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/impl/src.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/rfc2818_verification.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/rfc2818_verification.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/stream.hpp764
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/stream_base.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/stream_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/verify_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/verify_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ssl/verify_mode.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ssl/verify_mode.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/steady_timer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/steady_timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/strand.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/strand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/stream_socket_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/stream_socket_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/streambuf.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/system_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/system_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/system_executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/system_executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/system_timer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/system_timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/thread_pool.hpp234
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/time_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/time_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/buffer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ts/buffer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ts/executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/internet.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ts/internet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/io_context.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ts/io_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/net.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ts/net.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/netfwd.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ts/netfwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/socket.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ts/socket.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/ts/timer.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/ts/timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/unyield.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/unyield.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/use_future.hpp162
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/uses_executor.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/uses_executor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/version.hpp23
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/wait_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/wait_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/waitable_timer_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/waitable_timer_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/basic_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/basic_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/basic_object_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/basic_object_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/basic_random_access_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/basic_random_access_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/basic_stream_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/basic_stream_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/object_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/object_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/object_handle_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/object_handle_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/overlapped_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/overlapped_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/overlapped_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/overlapped_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/random_access_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/random_access_handle_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/stream_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/stream_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/windows/stream_handle_service.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/windows/stream_handle_service.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/write.hpp930
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/write_at.hpp681
-rw-r--r--src/third_party/boost-1.69.0/boost/asio/yield.hpp (renamed from src/third_party/boost-1.68.0/boost/asio/yield.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/assert.hpp (renamed from src/third_party/boost-1.68.0/boost/assert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/assign/assignment_exception.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/assign/list_of.hpp847
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/atomic.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/atomic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/atomic_flag.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/atomic_flag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/capabilities.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/capabilities.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/addressof.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/atomic_flag.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/atomic_flag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/atomic_template.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/atomic_template.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/bitwise_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_fp_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/bitwise_fp_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_alpha.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_alpha.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_atomic.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_atomic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_ppc.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sparc.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_sparc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sync.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_sync.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_x86.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_linux_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_linux_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_msvc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_x86.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_msvc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/caps_windows.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/caps_windows.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/config.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_operations.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_emulated.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_ops_emulated.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_generic.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_ops_generic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_operations.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_emulated.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_emulated.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_x86.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_generic.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_generic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_msvc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_x86.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_msvc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/float_sizes.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/float_sizes.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/fp_operations.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/fp_operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_emulated.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/fp_ops_emulated.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_generic.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/fp_ops_generic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_x86.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/int_sizes.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/int_sizes.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/integral_extend.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/integral_extend.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/interlocked.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/interlocked.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/link.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/link.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/lockpool.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/lockpool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/operations.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/operations.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/operations_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/operations_lockfree.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/operations_lockfree.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_cas_based.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_cas_based.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_emulated.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_emulated.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_extending_cas_based.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_extending_cas_based.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_alpha.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_alpha.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm_common.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_arm_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_atomic.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_atomic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_ppc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc_common.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_ppc_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sparc.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_sparc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sync.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_sync.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_linux_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_linux_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_common.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_x86.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/ops_windows.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/ops_windows.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/pause.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/pause.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/platform.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/platform.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/storage_type.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/storage_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/string_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/string_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/conditional.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/conditional.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/integral_constant.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/integral_constant.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_floating_point.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_floating_point.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_function.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_function.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_iec559.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_iec559.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_integral.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_integral.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_signed.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_signed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_signed.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/make_signed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_unsigned.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/make_unsigned.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/atomic/fences.hpp (renamed from src/third_party/boost-1.68.0/boost/atomic/fences.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/apply.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/arg.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/bind_cc.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/bind_cc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/bind_mf2_cc.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/bind_mf2_cc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/bind_mf_cc.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/bind_mf_cc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/bind_template.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/bind_template.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/make_adaptable.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/make_adaptable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/mem_fn.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/mem_fn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/mem_fn_cc.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/mem_fn_cc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/mem_fn_template.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/mem_fn_template.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/mem_fn_vw.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/mem_fn_vw.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/placeholders.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/protect.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/protect.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/bind/storage.hpp (renamed from src/third_party/boost-1.68.0/boost/bind/storage.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/call_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/call_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/cerrno.hpp (renamed from src/third_party/boost-1.68.0/boost/cerrno.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/checked_delete.hpp (renamed from src/third_party/boost-1.68.0/boost/checked_delete.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/ceil.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/ceil.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/chrono.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/chrono_io.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/chrono_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/clock_string.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/clock_string.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/config.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/chrono.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/detail/inlined/chrono.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/chrono.hpp242
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp356
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/thread_clock.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/chrono.hpp121
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp354
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/thread_clock.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/thread_clock.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/detail/inlined/thread_clock.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/chrono.hpp150
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp281
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/thread_clock.hpp103
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/is_evenly_divisible_by.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/detail/is_evenly_divisible_by.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/scan_keyword.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/detail/scan_keyword.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/static_assert.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/detail/static_assert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/detail/system.hpp20
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/duration.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/duration.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/floor.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/floor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/include.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/include.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/duration_get.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/duration_get.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/duration_io.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/duration_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/duration_put.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/duration_put.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/duration_style.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/duration_style.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/duration_units.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/duration_units.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/ios_base_state.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/ios_base_state.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/time_point_get.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/time_point_get.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/time_point_io.hpp1249
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/time_point_put.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/time_point_put.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/time_point_units.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/time_point_units.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/timezone.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/timezone.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/utility/ios_base_state_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/utility/ios_base_state_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/utility/manip_base.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/utility/manip_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io/utility/to_string.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io/utility/to_string.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/io_v1/chrono_io.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/io_v1/chrono_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/process_cpu_clocks.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/process_cpu_clocks.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/round.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/round.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/system_clocks.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/system_clocks.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/thread_clock.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/thread_clock.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/chrono/time_point.hpp (renamed from src/third_party/boost-1.68.0/boost/chrono/time_point.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/compressed_pair.hpp (renamed from src/third_party/boost-1.68.0/boost/compressed_pair.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/assert.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/detail/backward_compatibility.hpp (renamed from src/third_party/boost-1.68.0/boost/concept/detail/backward_compatibility.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/detail/borland.hpp (renamed from src/third_party/boost-1.68.0/boost/concept/detail/borland.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/detail/concept_def.hpp (renamed from src/third_party/boost-1.68.0/boost/concept/detail/concept_def.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/detail/concept_undef.hpp (renamed from src/third_party/boost-1.68.0/boost/concept/detail/concept_undef.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/detail/general.hpp77
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/detail/has_constraints.hpp50
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/detail/msvc.hpp123
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/requires.hpp (renamed from src/third_party/boost-1.68.0/boost/concept/requires.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/concept/usage.hpp36
-rw-r--r--src/third_party/boost-1.69.0/boost/concept_archetype.hpp670
-rw-r--r--src/third_party/boost-1.69.0/boost/concept_check.hpp1082
-rw-r--r--src/third_party/boost-1.69.0/boost/config.hpp (renamed from src/third_party/boost-1.68.0/boost/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/abi/borland_prefix.hpp (renamed from src/third_party/boost-1.68.0/boost/config/abi/borland_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/abi/borland_suffix.hpp (renamed from src/third_party/boost-1.68.0/boost/config/abi/borland_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/abi/msvc_prefix.hpp (renamed from src/third_party/boost-1.68.0/boost/config/abi/msvc_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/abi/msvc_suffix.hpp (renamed from src/third_party/boost-1.68.0/boost/config/abi/msvc_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/abi_prefix.hpp (renamed from src/third_party/boost-1.68.0/boost/config/abi_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/abi_suffix.hpp (renamed from src/third_party/boost-1.68.0/boost/config/abi_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/auto_link.hpp474
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/borland.hpp335
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/clang.hpp340
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/codegear.hpp239
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/comeau.hpp59
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/common_edg.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/common_edg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/compaq_cxx.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/compaq_cxx.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/cray.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/cray.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/diab.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/diab.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/digitalmars.hpp140
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/gcc.hpp359
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/gcc_xml.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/gcc_xml.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/greenhills.hpp28
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/hp_acc.hpp147
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/intel.hpp569
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/kai.hpp33
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/metrowerks.hpp195
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/mpw.hpp137
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/nvcc.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/nvcc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/pathscale.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/pathscale.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/pgi.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/pgi.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/sgi_mipspro.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/sgi_mipspro.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/sunpro_cc.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/sunpro_cc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/vacpp.hpp183
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/visualc.hpp359
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/xlcpp.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/xlcpp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/compiler/xlcpp_zos.hpp (renamed from src/third_party/boost-1.68.0/boost/config/compiler/xlcpp_zos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/detail/posix_features.hpp (renamed from src/third_party/boost-1.68.0/boost/config/detail/posix_features.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/detail/select_compiler_config.hpp157
-rw-r--r--src/third_party/boost-1.69.0/boost/config/detail/select_platform_config.hpp (renamed from src/third_party/boost-1.68.0/boost/config/detail/select_platform_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/detail/select_stdlib_config.hpp (renamed from src/third_party/boost-1.68.0/boost/config/detail/select_stdlib_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/detail/suffix.hpp1049
-rw-r--r--src/third_party/boost-1.69.0/boost/config/header_deprecated.hpp (renamed from src/third_party/boost-1.68.0/boost/config/header_deprecated.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/helper_macros.hpp (renamed from src/third_party/boost-1.68.0/boost/config/helper_macros.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/no_tr1/cmath.hpp (renamed from src/third_party/boost-1.68.0/boost/config/no_tr1/cmath.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/no_tr1/complex.hpp (renamed from src/third_party/boost-1.68.0/boost/config/no_tr1/complex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/no_tr1/functional.hpp (renamed from src/third_party/boost-1.68.0/boost/config/no_tr1/functional.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/no_tr1/memory.hpp (renamed from src/third_party/boost-1.68.0/boost/config/no_tr1/memory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/no_tr1/utility.hpp (renamed from src/third_party/boost-1.68.0/boost/config/no_tr1/utility.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/aix.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/aix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/amigaos.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/amigaos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/beos.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/beos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/bsd.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/bsd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/cloudabi.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/cloudabi.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/cray.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/cray.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/cygwin.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/cygwin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/haiku.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/haiku.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/hpux.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/hpux.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/irix.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/irix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/linux.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/linux.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/macos.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/macos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/qnxnto.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/qnxnto.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/solaris.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/solaris.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/symbian.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/symbian.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/vms.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/vms.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/vxworks.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/vxworks.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/win32.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/win32.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/platform/zos.hpp (renamed from src/third_party/boost-1.68.0/boost/config/platform/zos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/pragma_message.hpp (renamed from src/third_party/boost-1.68.0/boost/config/pragma_message.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/requires_threads.hpp (renamed from src/third_party/boost-1.68.0/boost/config/requires_threads.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/dinkumware.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/dinkumware.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/libcomo.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/libcomo.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/libcpp.hpp143
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/libstdcpp3.hpp349
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/modena.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/modena.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/msl.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/msl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/roguewave.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/roguewave.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/sgi.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/sgi.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/stlport.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/stlport.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/vacpp.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/vacpp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/stdlib/xlcpp_zos.hpp (renamed from src/third_party/boost-1.68.0/boost/config/stdlib/xlcpp_zos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/user.hpp (renamed from src/third_party/boost-1.68.0/boost/config/user.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/warning_disable.hpp (renamed from src/third_party/boost-1.68.0/boost/config/warning_disable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/config/workaround.hpp (renamed from src/third_party/boost-1.68.0/boost/config/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/adaptive_pool.hpp (renamed from src/third_party/boost-1.68.0/boost/container/adaptive_pool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/allocator.hpp369
-rw-r--r--src/third_party/boost-1.69.0/boost/container/allocator_traits.hpp477
-rw-r--r--src/third_party/boost-1.69.0/boost/container/container_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/container/container_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/deque.hpp2270
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/adaptive_node_pool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool_impl.hpp1259
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/addressof.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/advanced_insert_int.hpp495
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/algorithm.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/alloc_helpers.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/alloc_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/alloc_lib.h (renamed from src/third_party/boost-1.68.0/boost/container/detail/alloc_lib.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/allocation_type.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/allocation_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/allocator_version_traits.hpp163
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/auto_link.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/auto_link.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/block_list.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/block_list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/block_slist.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/block_slist.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/compare_functors.hpp130
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/config_begin.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/config_begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/config_end.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/config_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/construct_in_place.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/construct_in_place.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/container_or_allocator_rebind.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/container_or_allocator_rebind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/container_rebind.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/container_rebind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/copy_move_algo.hpp1169
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/destroyers.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/destroyers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/dispatch_uses_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/dispatch_uses_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/dlmalloc.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/dlmalloc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/flat_tree.hpp1630
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/function_detector.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/function_detector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/is_container.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/is_container.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/is_contiguous_container.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/is_contiguous_container.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/is_sorted.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/is_sorted.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/iterator.hpp86
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/iterator_to_raw_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/iterator_to_raw_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/iterators.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/iterators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/math_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/math_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/min_max.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/min_max.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/minimal_char_traits_header.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/minimal_char_traits_header.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/mpl.hpp144
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/multiallocation_chain.hpp303
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/next_capacity.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/next_capacity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/node_alloc_holder.hpp471
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/node_pool.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/node_pool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/node_pool_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/node_pool_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/pair.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/pair.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/pair_key_mapped_of_value.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/pair_key_mapped_of_value.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/placement_new.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/placement_new.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/pool_common.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/pool_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/pool_common_alloc.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/pool_common_alloc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/pool_resource.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/pool_resource.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/singleton.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/singleton.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/std_fwd.hpp59
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/thread_mutex.hpp181
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/transform_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/transform_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/tree.hpp1496
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/type_traits.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/value_functors.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/value_functors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/value_init.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/value_init.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/variadic_templates_tools.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/variadic_templates_tools.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/version_type.hpp (renamed from src/third_party/boost-1.68.0/boost/container/detail/version_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/detail/workaround.hpp129
-rw-r--r--src/third_party/boost-1.69.0/boost/container/flat_map.hpp2976
-rw-r--r--src/third_party/boost-1.69.0/boost/container/flat_set.hpp1943
-rw-r--r--src/third_party/boost-1.69.0/boost/container/list.hpp1533
-rw-r--r--src/third_party/boost-1.69.0/boost/container/map.hpp2314
-rw-r--r--src/third_party/boost-1.69.0/boost/container/new_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/container/new_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/node_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/container/node_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/node_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/container/node_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/options.hpp (renamed from src/third_party/boost-1.68.0/boost/container/options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/deque.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/deque.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/flat_map.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/flat_map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/flat_set.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/flat_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/global_resource.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/global_resource.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/list.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/map.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/memory_resource.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/memory_resource.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/monotonic_buffer_resource.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/monotonic_buffer_resource.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/polymorphic_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/polymorphic_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/pool_options.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/pool_options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/resource_adaptor.hpp193
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/set.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/slist.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/slist.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/small_vector.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/small_vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/stable_vector.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/stable_vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/string.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/string.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/synchronized_pool_resource.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/synchronized_pool_resource.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/unsynchronized_pool_resource.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/unsynchronized_pool_resource.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/pmr/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/container/pmr/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/scoped_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/container/scoped_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/scoped_allocator_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/container/scoped_allocator_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/set.hpp1710
-rw-r--r--src/third_party/boost-1.69.0/boost/container/slist.hpp1750
-rw-r--r--src/third_party/boost-1.69.0/boost/container/small_vector.hpp668
-rw-r--r--src/third_party/boost-1.69.0/boost/container/stable_vector.hpp2181
-rw-r--r--src/third_party/boost-1.69.0/boost/container/static_vector.hpp1243
-rw-r--r--src/third_party/boost-1.69.0/boost/container/string.hpp3504
-rw-r--r--src/third_party/boost-1.69.0/boost/container/throw_exception.hpp (renamed from src/third_party/boost-1.68.0/boost/container/throw_exception.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/uses_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/container/uses_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/uses_allocator_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/container/uses_allocator_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container/vector.hpp3401
-rw-r--r--src/third_party/boost-1.69.0/boost/container_hash/detail/float_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/container_hash/detail/float_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container_hash/detail/hash_float.hpp (renamed from src/third_party/boost-1.68.0/boost/container_hash/detail/hash_float.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container_hash/detail/limits.hpp (renamed from src/third_party/boost-1.68.0/boost/container_hash/detail/limits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container_hash/extensions.hpp (renamed from src/third_party/boost-1.68.0/boost/container_hash/extensions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container_hash/hash.hpp (renamed from src/third_party/boost-1.68.0/boost/container_hash/hash.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/container_hash/hash_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/container_hash/hash_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/context/detail/config.hpp (renamed from src/third_party/boost-1.68.0/boost/context/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/context/detail/fcontext.hpp (renamed from src/third_party/boost-1.68.0/boost/context/detail/fcontext.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/addressof.hpp (renamed from src/third_party/boost-1.68.0/boost/core/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/checked_delete.hpp (renamed from src/third_party/boost-1.68.0/boost/core/checked_delete.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/demangle.hpp (renamed from src/third_party/boost-1.68.0/boost/core/demangle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/empty_value.hpp136
-rw-r--r--src/third_party/boost-1.69.0/boost/core/enable_if.hpp (renamed from src/third_party/boost-1.68.0/boost/core/enable_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/explicit_operator_bool.hpp163
-rw-r--r--src/third_party/boost-1.69.0/boost/core/ignore_unused.hpp (renamed from src/third_party/boost-1.68.0/boost/core/ignore_unused.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/is_same.hpp (renamed from src/third_party/boost-1.68.0/boost/core/is_same.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/lightweight_test.hpp436
-rw-r--r--src/third_party/boost-1.69.0/boost/core/lightweight_test_trait.hpp56
-rw-r--r--src/third_party/boost-1.69.0/boost/core/no_exceptions_support.hpp (renamed from src/third_party/boost-1.68.0/boost/core/no_exceptions_support.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/noncopyable.hpp63
-rw-r--r--src/third_party/boost-1.69.0/boost/core/pointer_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/core/pointer_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/ref.hpp302
-rw-r--r--src/third_party/boost-1.69.0/boost/core/scoped_enum.hpp (renamed from src/third_party/boost-1.68.0/boost/core/scoped_enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/core/swap.hpp67
-rw-r--r--src/third_party/boost-1.69.0/boost/core/typeinfo.hpp167
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/all.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/all.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/asymmetric_coroutine.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/asymmetric_coroutine.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/attributes.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/attributes.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/coroutine.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/coroutine.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/config.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/coroutine_context.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/coroutine_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/data.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/data.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/flags.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/flags.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/parameters.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/parameters.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/preallocated.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/preallocated.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_object.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_object.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_synthesized.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_synthesized.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/setup.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/setup.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_call.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_call.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_object.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_pull.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline_pull.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_push.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline_push.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/exceptions.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/exceptions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/flags.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/flags.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/posix/protected_stack_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/posix/protected_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/posix/segmented_stack_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/posix/segmented_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/protected_stack_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/protected_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/segmented_stack_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/segmented_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/stack_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/stack_context.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/stack_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/stack_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/stack_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/standard_stack_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/standard_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/symmetric_coroutine.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/symmetric_coroutine.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/coroutine/windows/protected_stack_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/coroutine/windows/protected_stack_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/cregex.hpp (renamed from src/third_party/boost-1.68.0/boost/cregex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/cstdint.hpp (renamed from src/third_party/boost-1.68.0/boost/cstdint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/cstdlib.hpp (renamed from src/third_party/boost-1.68.0/boost/cstdlib.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/current_function.hpp (renamed from src/third_party/boost-1.68.0/boost/current_function.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/adjust_functors.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/adjust_functors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/c_local_time_adjustor.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/c_local_time_adjustor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/c_time.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/c_time.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/compiler_config.hpp174
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/constrained_value.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/constrained_value.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_clock_device.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_clock_device.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_defs.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_defs.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_duration.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_duration.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_duration_types.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_duration_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_facet.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_facet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_format_simple.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_format_simple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_formatting.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_formatting.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_formatting_limited.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_formatting_limited.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_formatting_locales.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_formatting_locales.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_generator_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_generator_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_generator_parser.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_generator_parser.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_generators.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_generators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_names_put.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_names_put.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/date_parsing.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/date_parsing.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/dst_rules.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/dst_rules.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/dst_transition_generators.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/dst_transition_generators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/filetime_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/filetime_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/format_date_parser.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/format_date_parser.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/conversion.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/conversion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/formatters.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters_limited.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/formatters_limited.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_calendar.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_calendar.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_date.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_date.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_day.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day_of_year.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_day_of_year.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_duration.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration_types.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_duration_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_facet.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_facet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_month.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_month.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_serialize.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_serialize.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_weekday.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_weekday.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_year.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_year.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_ymd.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_ymd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_io.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_types.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian/parsers.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian/parsers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian_calendar.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.ipp (renamed from src/third_party/boost-1.68.0/boost/date_time/gregorian_calendar.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/int_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/int_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/iso_format.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/iso_format.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/conversion.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/conversion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/custom_time_zone.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/custom_time_zone.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/date_duration_operators.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/date_duration_operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/dst_transition_day_rules.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/dst_transition_day_rules.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/local_date_time.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/local_date_time.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/local_time.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/local_time.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_io.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/local_time_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_types.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/local_time_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/posix_time_zone.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/posix_time_zone.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time/tz_database.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time/tz_database.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_time_adjustor.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_time_adjustor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/local_timezone_defs.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/local_timezone_defs.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/locale_config.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/locale_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/microsec_time_clock.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/microsec_time_clock.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/parse_format_base.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/parse_format_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/period.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/period.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/period_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/period_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/period_parser.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/period_parser.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/conversion.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/conversion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/date_duration_operators.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/date_duration_operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_config.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_duration.hpp91
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_io.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_legacy_io.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_legacy_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_system.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_system.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_types.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/ptime.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/ptime.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/time_formatters.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters_limited.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/time_formatters_limited.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/time_parsers.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/time_parsers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/time_period.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/time_period.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/posix_time/time_serialize.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/posix_time/time_serialize.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/special_defs.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/special_defs.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/special_values_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/special_values_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/special_values_parser.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/special_values_parser.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/string_convert.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/string_convert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/string_parse_tree.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/string_parse_tree.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/strings_from_facet.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/strings_from_facet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_clock.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_clock.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_defs.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_defs.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_duration.hpp298
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_facet.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_facet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_formatting_streams.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_formatting_streams.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_parsing.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_parsing.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_resolution_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_resolution_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_system_counted.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_system_counted.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_system_split.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_system_split.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_zone_base.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_zone_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/time_zone_names.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/time_zone_names.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/tz_db_base.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/tz_db_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/wrapping_int.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/wrapping_int.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/date_time/year_month_day.hpp (renamed from src/third_party/boost-1.68.0/boost/date_time/year_month_day.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/allocator_utilities.hpp193
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/atomic_count.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/atomic_count.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/basic_pointerbuf.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/basic_pointerbuf.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/bitmask.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/bitmask.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/call_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/call_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/compressed_pair.hpp452
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/container_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/container_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/endian.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/endian.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/fenv.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/fenv.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/indirect_traits.hpp195
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/interlocked.hpp220
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/is_incrementable.hpp121
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/lcast_precision.hpp185
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/lightweight_main.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/lightweight_main.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/lightweight_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/lightweight_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/lightweight_test.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/lightweight_test.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/lightweight_test_report.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/lightweight_test_report.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/lightweight_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/lightweight_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/no_exceptions_support.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/no_exceptions_support.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/numeric_traits.hpp160
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/quick_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/quick_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/reference_content.hpp120
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/scoped_enum_emulation.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/scoped_enum_emulation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/select_type.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/select_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/sp_typeinfo.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/sp_typeinfo.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.hpp219
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.ipp292
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/winapi/detail/deprecated_namespace.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/winapi/detail/deprecated_namespace.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/winapi/get_current_process.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/winapi/get_current_process.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/winapi/get_current_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/winapi/get_current_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/winapi/get_last_error.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/winapi/get_last_error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/winapi/get_process_times.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/winapi/get_process_times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/winapi/get_thread_times.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/winapi/get_thread_times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/winapi/time.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/winapi/time.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/winapi/timers.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/winapi/timers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/detail/workaround.hpp (renamed from src/third_party/boost-1.68.0/boost/detail/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/dynamic_bitset.hpp (renamed from src/third_party/boost-1.68.0/boost/dynamic_bitset.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/dynamic_bitset/config.hpp (renamed from src/third_party/boost-1.68.0/boost/dynamic_bitset/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp293
-rw-r--r--src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/lowest_bit.hpp39
-rw-r--r--src/third_party/boost-1.69.0/boost/dynamic_bitset/dynamic_bitset.hpp2113
-rw-r--r--src/third_party/boost-1.69.0/boost/dynamic_bitset_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/dynamic_bitset_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/enable_shared_from_this.hpp (renamed from src/third_party/boost-1.68.0/boost/enable_shared_from_this.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/current_exception_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/current_exception_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/detail/clone_current_exception.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/detail/clone_current_exception.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/detail/error_info_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/detail/error_info_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/detail/exception_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/detail/exception_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/detail/is_output_streamable.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/detail/is_output_streamable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/detail/object_hex_dump.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/detail/object_hex_dump.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/detail/shared_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/detail/shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/detail/type_info.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/detail/type_info.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/diagnostic_information.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/diagnostic_information.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/exception.hpp525
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/get_error_info.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/get_error_info.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/info.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/info.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/to_string.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/to_string.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception/to_string_stub.hpp (renamed from src/third_party/boost-1.68.0/boost/exception/to_string_stub.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/exception_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/exception_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/config.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/convenience.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/convenience.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/detail/macro_value.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/detail/macro_value.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/detail/utf8_codecvt_facet.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/detail/utf8_codecvt_facet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/exception.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/exception.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/fstream.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/fstream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/operations.hpp1376
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/path.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/path.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/path_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/path_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp (renamed from src/third_party/boost-1.68.0/boost/filesystem/string_file.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/foreach.hpp (renamed from src/third_party/boost-1.68.0/boost/foreach.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/foreach_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/foreach_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format.hpp (renamed from src/third_party/boost-1.68.0/boost/format.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/alt_sstream.hpp (renamed from src/third_party/boost-1.68.0/boost/format/alt_sstream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/alt_sstream_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/format/alt_sstream_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/detail/compat_workarounds.hpp (renamed from src/third_party/boost-1.68.0/boost/format/detail/compat_workarounds.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/detail/config_macros.hpp (renamed from src/third_party/boost-1.68.0/boost/format/detail/config_macros.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/detail/msvc_disambiguater.hpp (renamed from src/third_party/boost-1.68.0/boost/format/detail/msvc_disambiguater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/detail/unset_macros.hpp (renamed from src/third_party/boost-1.68.0/boost/format/detail/unset_macros.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/detail/workarounds_gcc-2_95.hpp (renamed from src/third_party/boost-1.68.0/boost/format/detail/workarounds_gcc-2_95.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/detail/workarounds_stlport.hpp (renamed from src/third_party/boost-1.68.0/boost/format/detail/workarounds_stlport.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/exceptions.hpp (renamed from src/third_party/boost-1.68.0/boost/format/exceptions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/feed_args.hpp (renamed from src/third_party/boost-1.68.0/boost/format/feed_args.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/format_class.hpp (renamed from src/third_party/boost-1.68.0/boost/format/format_class.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/format_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/format/format_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/format_implementation.hpp (renamed from src/third_party/boost-1.68.0/boost/format/format_implementation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/free_funcs.hpp (renamed from src/third_party/boost-1.68.0/boost/format/free_funcs.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/group.hpp (renamed from src/third_party/boost-1.68.0/boost/format/group.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/internals.hpp (renamed from src/third_party/boost-1.68.0/boost/format/internals.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/internals_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/format/internals_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/format/parsing.hpp (renamed from src/third_party/boost-1.68.0/boost/format/parsing.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function.hpp74
-rw-r--r--src/third_party/boost-1.69.0/boost/function/detail/function_iterate.hpp (renamed from src/third_party/boost-1.68.0/boost/function/detail/function_iterate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/detail/gen_maybe_include.pl (renamed from src/third_party/boost-1.68.0/boost/function/detail/gen_maybe_include.pl)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/detail/maybe_include.hpp (renamed from src/third_party/boost-1.68.0/boost/function/detail/maybe_include.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/detail/prologue.hpp (renamed from src/third_party/boost-1.68.0/boost/function/detail/prologue.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function0.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function1.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function10.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function2.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function3.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function4.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function5.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function6.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function7.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function7.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function8.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function8.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function9.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function9.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function_base.hpp886
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function_template.hpp1185
-rw-r--r--src/third_party/boost-1.69.0/boost/function/function_typeof.hpp (renamed from src/third_party/boost-1.68.0/boost/function/function_typeof.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function/gen_function_N.pl (renamed from src/third_party/boost-1.68.0/boost/function/gen_function_N.pl)0
-rw-r--r--src/third_party/boost-1.69.0/boost/function_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/function_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/functional/hash.hpp (renamed from src/third_party/boost-1.68.0/boost/functional/hash.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/functional/hash/hash.hpp (renamed from src/third_party/boost-1.68.0/boost/functional/hash/hash.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/functional/hash_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/functional/hash_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/mpl_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/mpl_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/std_pair.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/std_pair.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/adapt_struct.hpp121
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base.hpp311
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/begin_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/deref_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/extension.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/extension.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/size_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_back.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/algorithm/transformation/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_front.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/algorithm/transformation/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/generation/ignore.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/generation/ignore.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/cons.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/cons.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/cons_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/cons_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/cons_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/cons_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/begin_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/limits.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/limits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/deref_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/empty_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/empty_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/equal_to_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/equal_to_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/next_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/reverse_cons.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/reverse_cons.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/list_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/list_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/list/nil.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/list/nil.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/advance_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/advance_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/begin_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/config.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/limits.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/limits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/deref_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/distance_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/distance_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/equal_to_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/equal_to_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/next_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/prior_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/prior_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_at_impl.hpp60
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/vector.hpp319
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/vector_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/container/vector/vector_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/include/std_pair.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/include/std_pair.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/include/tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/include/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/advance.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/advance.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/basic_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/basic_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/deref.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/deref.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/deref_data.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/deref_data.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_value_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/detail/adapt_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/detail/advance.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/detail/advance.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/detail/distance.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/detail/distance.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segment_sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segment_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_next_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/distance.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/distance.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/iterator_facade.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/iterator_facade.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/key_of.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/key_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/convert_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/mpl/convert_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/fusion_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/mpl/fusion_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/next.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/next.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/prior.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/prior.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/segmented_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/segmented_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/value_of.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/value_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/iterator/value_of_data.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/iterator/value_of_data.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/mpl/begin.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/mpl/begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/mpl/end.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/mpl/end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/enable_comparison.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/enable_comparison.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/not_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/at.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/at.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/begin.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/empty.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/end.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/segments.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/segments.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/size.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/value_at.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/value_at.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/io.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/in.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/in.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/manip.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/manip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/out.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/out.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/io/in.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/io/in.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/sequence/io/out.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/sequence/io/out.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/as_const.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/as_const.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/category_of.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/category_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/config.hpp130
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/access.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/access.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/and.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/as_fusion_element.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/as_fusion_element.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/enabler.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/enabler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/index_sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/index_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/is_mpl_sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/is_mpl_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/mpl_iterator_category.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/mpl_iterator_category.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/pp_round.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/pp_round.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/is_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/is_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/is_segmented.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/is_segmented.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/is_sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/is_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/is_view.hpp75
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/iterator_base.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/iterator_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/sequence_base.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/sequence_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/tag_of.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/tag_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/tag_of_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/tag_of_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/support/void.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/support/void.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/make_tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/make_tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_expand.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_expand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_tie.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_tie.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/make_tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/make_tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/tuple_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_tie.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/tuple/tuple_tie.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/size_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/iterator_range.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/begin_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/next_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/advance_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/advance_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/begin_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/begin_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/deref_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/deref_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/distance_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/distance_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/next_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/next_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/prior_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/prior_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/size_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/value_at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_of_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/value_of_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/single_view.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/fusion/view/single_view/single_view_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/generator_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/generator_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/get_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/get_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/indirect_reference.hpp (renamed from src/third_party/boost-1.68.0/boost/indirect_reference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer.hpp (renamed from src/third_party/boost-1.68.0/boost/integer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer/common_factor.hpp (renamed from src/third_party/boost-1.68.0/boost/integer/common_factor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer/common_factor_ct.hpp (renamed from src/third_party/boost-1.68.0/boost/integer/common_factor_ct.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer/common_factor_rt.hpp578
-rw-r--r--src/third_party/boost-1.69.0/boost/integer/integer_log2.hpp (renamed from src/third_party/boost-1.68.0/boost/integer/integer_log2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer/integer_mask.hpp (renamed from src/third_party/boost-1.68.0/boost/integer/integer_mask.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer/static_log2.hpp (renamed from src/third_party/boost-1.68.0/boost/integer/static_log2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer/static_min_max.hpp (renamed from src/third_party/boost-1.68.0/boost/integer/static_min_max.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/integer_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/integer_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/integer_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/allocators/allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/allocators/allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/allocators/detail/allocator_common.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/allocators/detail/allocator_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/containers/allocation_type.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/containers/allocation_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/containers/containers_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/containers/containers_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/containers/string.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/containers/string.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/containers/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/containers/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/containers/version_type.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/containers/version_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/creation_tags.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/creation_tags.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/atomic.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/atomic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/cast_tags.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/cast_tags.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/config_begin.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/config_begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/config_end.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/config_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_begin.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/config_external_begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_end.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/config_external_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/file_wrapper.hpp213
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/in_place_interface.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/in_place_interface.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/intermodule_singleton_common.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/intermodule_singleton_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/interprocess_tester.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/interprocess_tester.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/managed_memory_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/managed_memory_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/managed_open_or_create_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/managed_open_or_create_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/math_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/math_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/min_max.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/min_max.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/mpl.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/mpl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/named_proxy.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/named_proxy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/nothrow.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/nothrow.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/os_file_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/os_file_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/os_thread_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/os_thread_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/posix_time_types_wrk.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/posix_time_types_wrk.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/segment_manager_helper.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/segment_manager_helper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/shared_dir_helpers.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/shared_dir_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/simple_swap.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/simple_swap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/std_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/std_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/transform_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/transform_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/type_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/utilities.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/utilities.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/variadic_templates_tools.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/variadic_templates_tools.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/win32_api.hpp2474
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/windows_intermodule_singleton.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/windows_intermodule_singleton.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/detail/workaround.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/detail/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/errors.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/errors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/exceptions.hpp110
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/file_mapping.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/file_mapping.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/indexes/iset_index.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/indexes/iset_index.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/interprocess_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/interprocess_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/managed_mapped_file.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/managed_mapped_file.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/managed_shared_memory.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/managed_shared_memory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/mapped_region.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/mapped_region.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/offset_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/offset_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/permissions.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/permissions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/segment_manager.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/segment_manager.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/shared_memory_object.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/shared_memory_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/smart_ptr/deleter.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/smart_ptr/deleter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/streams/bufferstream.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/streams/bufferstream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/detail/common_algorithms.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/detail/common_algorithms.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/detail/locks.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/detail/locks.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/interprocess_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/lock_options.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/lock_options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/mutex_family.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/mutex_family.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/named_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/named_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/null_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/null_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/posix/mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/posix/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/posix/named_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_semaphore.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/posix/named_semaphore.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/posix/pthread_helpers.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/posix/pthread_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/posix/recursive_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/posix/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/scoped_lock.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/scoped_lock.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_creation_functor.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/shm/named_creation_functor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/shm/named_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/spin/mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/spin/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/spin/recursive_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/spin/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/spin/wait.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/spin/wait.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/windows/mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/windows/named_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_sync.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/windows/named_sync.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/recursive_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/windows/recursive_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/sync_utils.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/windows/sync_utils.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp (renamed from src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/any_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/any_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/avl_set.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/avl_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/avl_set_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/avl_set_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/avltree.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/avltree.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/avltree_algorithms.hpp727
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/bs_set.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/bs_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/bs_set_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/bs_set_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/bstree.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/bstree.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/bstree_algorithms.hpp2097
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/circular_list_algorithms.hpp468
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/circular_slist_algorithms.hpp406
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/derivation_value_traits.hpp77
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/algo_type.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/algo_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/algorithm.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/any_node_and_algorithms.hpp297
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/array_initializer.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/array_initializer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/assert.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/assert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/avltree_node.hpp193
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/bstree_algorithms_base.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/bstree_algorithms_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/common_slist_algorithms.hpp198
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/config_begin.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/config_begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/config_end.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/config_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/default_header_holder.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/default_header_holder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/ebo_functor_holder.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/ebo_functor_holder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/empty_node_checker.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/empty_node_checker.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/equal_to_value.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/equal_to_value.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/exception_disposer.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/exception_disposer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/function_detector.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/function_detector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/generic_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/generic_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/get_value_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/get_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/has_member_function_callable_with.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/has_member_function_callable_with.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/hashtable_node.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/hashtable_node.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/hook_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/hook_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/iiterator.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/iiterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/is_stateful_value_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/is_stateful_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/key_nodeptr_comp.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/key_nodeptr_comp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/list_iterator.hpp134
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/list_node.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/math.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/math.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_less_equal_header.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/minimal_less_equal_header.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_pair_header.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/minimal_pair_header.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/mpl.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/mpl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/node_cloner_disposer.hpp105
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/node_holder.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/node_holder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/node_to_value.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/node_to_value.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/parent_from_member.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/parent_from_member.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/rbtree_node.hpp205
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/reverse_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/simple_disposers.hpp50
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/size_holder.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/size_holder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/slist_iterator.hpp125
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/slist_node.hpp64
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/std_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/std_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/transform_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/transform_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/tree_iterator.hpp172
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/tree_node.hpp80
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/tree_value_compare.hpp186
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/uncast.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/uncast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/detail/workaround.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/detail/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/hashtable.hpp3668
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/intrusive_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/intrusive_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/linear_slist_algorithms.hpp342
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/link_mode.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/link_mode.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/list.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/list_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/list_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/member_value_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/member_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/options.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/pack_options.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/pack_options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/parent_from_member.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/parent_from_member.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/pointer_plus_bits.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/pointer_plus_bits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/pointer_rebind.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/pointer_rebind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/pointer_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/pointer_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/priority_compare.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/priority_compare.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/rbtree.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/rbtree.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/rbtree_algorithms.hpp622
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/set.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/set_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/set_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/sg_set.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/sg_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/sgtree.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/sgtree.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/sgtree_algorithms.hpp420
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/slist.hpp2254
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/slist_hook.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/slist_hook.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/splay_set.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/splay_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/splaytree.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/splaytree.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/splaytree_algorithms.hpp754
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/treap.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/treap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/treap_algorithms.hpp699
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/treap_set.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/treap_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/trivial_value_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive/trivial_value_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/unordered_set.hpp994
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive/unordered_set_hook.hpp459
-rw-r--r--src/third_party/boost-1.69.0/boost/intrusive_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/intrusive_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/io/detail/quoted_manip.hpp (renamed from src/third_party/boost-1.68.0/boost/io/detail/quoted_manip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/io/ios_state.hpp (renamed from src/third_party/boost-1.68.0/boost/io/ios_state.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/io_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/io_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/categories.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/categories.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/chain.hpp594
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/char_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/char_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/checked_operations.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/checked_operations.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/close.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/close.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/code_converter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/code_converter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/combine.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/combine.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/compose.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/compose.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/concepts.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/concepts.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/constants.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/constants.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/copy.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/absolute_path.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/absolute_path.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/access_control.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/access_control.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/concept_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/concept_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/device_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/device_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/direct_adapter.hpp282
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/filter_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/filter_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/mode_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/mode_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp62
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/range_adapter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/range_adapter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/add_facet.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/add_facet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/bool_trait_def.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/bool_trait_def.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/buffer.hpp229
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/call_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/call_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/char_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/char_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_helper.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/codecvt_helper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_holder.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/codecvt_holder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/auto_link.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/auto_link.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/bzip2.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/bzip2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/codecvt.hpp81
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/disable_warnings.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/disable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/dyn_link.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/dyn_link.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/enable_warnings.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/enable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/fpos.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/gcc.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/gcc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/limits.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/limits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/overload_resolution.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/overload_resolution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/rtl.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/rtl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/unreachable_return.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/unreachable_return.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/wide_streams.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/windows_posix.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/windows_posix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/config/zlib.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/config/zlib.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/counted_array.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/counted_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/current_directory.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/current_directory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/default_arg.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/default_arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/dispatch.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/dispatch.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/double_object.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/double_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/enable_if_stream.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/enable_if_stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/error.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/execute.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/execute.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/file_handle.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/file_handle.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/forward.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/fstream.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/fstream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/functional.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/functional.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/ios.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/ios.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/iostream.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/iostream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/is_dereferenceable.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/is_dereferenceable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/is_iterator_range.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/is_iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/newline.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/newline.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/optional.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/optional.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/param_type.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/param_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/path.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/path.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/push.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/push.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/push_params.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/push_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/resolve.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/resolve.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/restrict_impl.hpp483
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/select.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/select.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/select_by_size.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/select_by_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/chainbuf.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/chainbuf.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp311
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp447
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp114
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/system_failure.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/system_failure.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/template_params.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/template_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/translate_int_type.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/translate_int_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/detail/wrap_unwrap.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/detail/wrap_unwrap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/device/array.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/device/array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/device/back_inserter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/device/back_inserter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/device/file.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/device/file.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/device/file_descriptor.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/device/file_descriptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/device/mapped_file.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/device/mapped_file.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/device/null.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/device/null.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/aggregate.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/aggregate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/bzip2.hpp429
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/counter.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/counter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/grep.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/grep.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/gzip.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/gzip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/line.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/line.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/lzma.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/lzma.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/newline.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/newline.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/regex.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/regex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/stdio.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/stdio.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/symmetric.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/symmetric.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/test.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/test.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/zlib.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filter/zlib.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filter/zstd.hpp363
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filtering_stream.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filtering_stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/filtering_streambuf.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/filtering_streambuf.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/flush.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/flush.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/get.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/get.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/imbue.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/imbue.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/input_sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/input_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/invert.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/invert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/operations.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/operations.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/operations_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/operations_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/optimal_buffer_size.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/optimal_buffer_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/output_sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/output_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/pipeline.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/pipeline.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/positioning.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/positioning.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/put.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/put.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/putback.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/putback.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/read.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/read.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/restrict.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/restrict.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/seek.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/seek.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/skip.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/skip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/slice.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/slice.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/stream.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/stream_buffer.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/stream_buffer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/tee.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/tee.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/traits.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/traits_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/traits_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iostreams/write.hpp (renamed from src/third_party/boost-1.68.0/boost/iostreams/write.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/is_placeholder.hpp (renamed from src/third_party/boost-1.68.0/boost/is_placeholder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/advance.hpp84
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/counting_iterator.hpp220
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/detail/config_def.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/detail/config_def.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/detail/config_undef.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/detail/config_undef.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/detail/enable_if.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/detail/enable_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/detail/facade_iterator_category.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/detail/facade_iterator_category.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/distance.hpp65
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/filter_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/filter_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/indirect_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/indirect_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/interoperable.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/interoperable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/iterator_adaptor.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/iterator_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/iterator_categories.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/iterator_categories.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/iterator_concepts.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/iterator_concepts.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/iterator_facade.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/iterator_facade.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/iterator_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/iterator_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/minimum_category.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/minimum_category.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/reverse_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/iterator/transform_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/iterator/transform_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/core.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/core.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/actions.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/actions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/arity_code.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/arity_code.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/bind_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/bind_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/function_adaptors.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/function_adaptors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/is_instance_of.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/is_instance_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/lambda_config.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/lambda_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functor_base.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/lambda_functor_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functors.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/lambda_functors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/lambda_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/lambda_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/lambda_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/lambda_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/member_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/member_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/operator_actions.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/operator_actions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/operator_lambda_func_base.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/operator_lambda_func_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/operator_return_type_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/operator_return_type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/operators.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/ret.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/ret.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/return_type_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/return_type_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/detail/select_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/detail/select_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/if.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lambda/lambda.hpp (renamed from src/third_party/boost-1.68.0/boost/lambda/lambda.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast.hpp105
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/bad_lexical_cast.hpp101
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_lexical.hpp498
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_lexical_streams.hpp786
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_numeric.hpp172
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/detail/inf_nan.hpp197
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/detail/is_character.hpp59
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/detail/lcast_char_constants.hpp46
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp294
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/detail/widest_char.hpp43
-rw-r--r--src/third_party/boost-1.69.0/boost/lexical_cast/try_lexical_convert.hpp232
-rw-r--r--src/third_party/boost-1.69.0/boost/limits.hpp (renamed from src/third_party/boost-1.68.0/boost/limits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/logic/tribool.hpp469
-rw-r--r--src/third_party/boost-1.69.0/boost/logic/tribool_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/logic/tribool_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/make_shared.hpp (renamed from src/third_party/boost-1.68.0/boost/make_shared.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/constants/calculate_constants.hpp983
-rw-r--r--src/third_party/boost-1.69.0/boost/math/constants/constants.hpp348
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/beta.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/beta.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/binomial.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/binomial.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/cauchy.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/cauchy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/chi_squared.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/chi_squared.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/complement.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/complement.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/detail/common_error_handling.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/detail/common_error_handling.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/detail/derived_accessors.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/detail/derived_accessors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_mode.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/detail/generic_mode.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_quantile.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/detail/generic_quantile.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/detail/inv_discrete_quantile.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/detail/inv_discrete_quantile.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/exponential.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/exponential.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/extreme_value.hpp300
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/fisher_f.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/fisher_f.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/gamma.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/gamma.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/geometric.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/geometric.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/hyperexponential.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/hyperexponential.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/laplace.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/laplace.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/lognormal.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/lognormal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/negative_binomial.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/negative_binomial.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/non_central_chi_squared.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/non_central_chi_squared.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/normal.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/normal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/poisson.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/poisson.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/students_t.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/students_t.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/triangular.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/triangular.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/uniform.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/uniform.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/distributions/weibull.hpp (renamed from src/third_party/boost-1.68.0/boost/math/distributions/weibull.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/policies/error_handling.hpp (renamed from src/third_party/boost-1.68.0/boost/math/policies/error_handling.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/policies/policy.hpp (renamed from src/third_party/boost-1.68.0/boost/math/policies/policy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/acosh.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/acosh.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/asinh.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/asinh.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/atanh.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/atanh.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/bernoulli.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/bernoulli.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/bessel.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/bessel.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/beta.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/beta.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/binomial.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/binomial.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/cbrt.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/cbrt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/cos_pi.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/cos_pi.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bernoulli_details.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bernoulli_details.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i0.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_i0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i1.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_i1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_ik.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_ik.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j0.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_j0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j1.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_j1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jn.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_asym.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_asym.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_series.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_series.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_zero.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_zero.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k0.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_k0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k1.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_k1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_kn.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_kn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y0.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_y0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y1.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_y1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_yn.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_yn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/erf_inv.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/erf_inv.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/fp_traits.hpp581
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/gamma_inva.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/gamma_inva.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inverse.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/ibeta_inverse.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/iconv.hpp42
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_inverse.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/igamma_inverse.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_large.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/igamma_large.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/lanczos_sse2.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/lanczos_sse2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/lgamma_small.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/lgamma_small.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/round_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/round_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/t_distribution_inv.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/t_distribution_inv.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_factorial.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/detail/unchecked_factorial.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/erf.hpp1276
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/expm1.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/expm1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/factorials.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/factorials.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/fpclassify.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/fpclassify.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/gamma.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/gamma.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/hypot.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/hypot.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/lanczos.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/lanczos.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/log1p.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/log1p.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/math_fwd.hpp1678
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/next.hpp858
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/pow.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/pow.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/powm1.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/powm1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/round.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/round.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/sign.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/sign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/sin_pi.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/sin_pi.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/sinc.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/sinc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/sqrt1pm1.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/sqrt1pm1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/trunc.hpp111
-rw-r--r--src/third_party/boost-1.69.0/boost/math/special_functions/zeta.hpp (renamed from src/third_party/boost-1.68.0/boost/math/special_functions/zeta.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/atomic.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/atomic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/big_constant.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/big_constant.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/complex.hpp57
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/config.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/convert_from_string.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/convert_from_string.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_10.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_11.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_11.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_12.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_12.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_13.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_13.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_14.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_14.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_15.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_15.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_16.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_16.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_17.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_17.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_18.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_18.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_19.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_19.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_2.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_20.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_3.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_4.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_5.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_6.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_7.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_7.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_8.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_8.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_9.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_9.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_10.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_11.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_11.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_12.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_12.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_13.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_13.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_14.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_14.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_15.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_15.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_16.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_16.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_17.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_17.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_18.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_18.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_19.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_19.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_2.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_20.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_3.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_4.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_5.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_6.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_7.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_7.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_8.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_8.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_9.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_9.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_10.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_11.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_11.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_12.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_12.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_13.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_13.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_14.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_14.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_15.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_15.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_16.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_16.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_17.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_17.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_18.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_18.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_19.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_19.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_2.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_20.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_3.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_4.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_5.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_6.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_7.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_7.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_8.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_8.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_9.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_9.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_10.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_11.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_11.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_12.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_12.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_13.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_13.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_14.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_14.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_15.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_15.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_16.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_16.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_17.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_17.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_18.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_18.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_19.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_19.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_2.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_20.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_3.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_4.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_5.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_6.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_7.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_7.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_8.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_8.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_9.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_9.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_10.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_11.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_11.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_12.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_12.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_13.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_13.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_14.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_14.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_15.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_15.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_16.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_16.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_17.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_17.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_18.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_18.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_19.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_19.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_2.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_20.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_3.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_4.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_5.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_6.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_7.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_7.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_8.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_8.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_9.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_9.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_10.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_11.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_11.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_12.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_12.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_13.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_13.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_14.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_14.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_15.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_15.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_16.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_16.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_17.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_17.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_18.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_18.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_19.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_19.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_2.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_20.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_3.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_4.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_5.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_6.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_6.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_7.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_7.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_8.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_8.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_9.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_9.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/fraction.hpp287
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/minima.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/minima.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/precision.hpp409
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/promotion.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/promotion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/rational.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/rational.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/real_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/real_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/roots.hpp568
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/series.hpp158
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/toms748_solve.hpp621
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/math/tools/user.hpp (renamed from src/third_party/boost-1.68.0/boost/math/tools/user.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mem_fn.hpp (renamed from src/third_party/boost-1.68.0/boost/mem_fn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/memory_order.hpp (renamed from src/third_party/boost-1.68.0/boost/memory_order.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/adl_move_swap.hpp (renamed from src/third_party/boost-1.68.0/boost/move/adl_move_swap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/adaptive_merge.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/adaptive_merge.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/adaptive_sort.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/adaptive_sort.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/adaptive_sort_merge.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/adaptive_sort_merge.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/basic_op.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/basic_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/heap_sort.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/heap_sort.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/insertion_sort.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/insertion_sort.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/is_sorted.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/is_sorted.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/merge.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/merge.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/merge_sort.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/merge_sort.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/pdqsort.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/pdqsort.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/detail/set_difference.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/detail/set_difference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/move.hpp156
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/predicate.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/predicate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algo/unique.hpp (renamed from src/third_party/boost-1.68.0/boost/move/algo/unique.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/algorithm.hpp167
-rw-r--r--src/third_party/boost-1.69.0/boost/move/core.hpp494
-rw-r--r--src/third_party/boost-1.69.0/boost/move/default_delete.hpp (renamed from src/third_party/boost-1.68.0/boost/move/default_delete.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/config_begin.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/config_begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/config_end.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/config_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/destruct_n.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/destruct_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/fwd_macros.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/fwd_macros.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/iterator_to_raw_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/iterator_to_raw_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/iterator_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/iterator_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/meta_utils.hpp587
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/meta_utils_core.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/meta_utils_core.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/move_helpers.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/move_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/placement_new.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/placement_new.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/pointer_element.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/pointer_element.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/reverse_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/std_ns_begin.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/std_ns_begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/std_ns_end.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/std_ns_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/to_raw_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/to_raw_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/type_traits.hpp1086
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/unique_ptr_meta_utils.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/unique_ptr_meta_utils.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/detail/workaround.hpp (renamed from src/third_party/boost-1.68.0/boost/move/detail/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/move/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/make_unique.hpp (renamed from src/third_party/boost-1.68.0/boost/move/make_unique.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/move.hpp (renamed from src/third_party/boost-1.68.0/boost/move/move.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/traits.hpp (renamed from src/third_party/boost-1.68.0/boost/move/traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/unique_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/move/unique_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/utility.hpp (renamed from src/third_party/boost-1.68.0/boost/move/utility.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/move/utility_core.hpp (renamed from src/third_party/boost-1.68.0/boost/move/utility_core.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/O1_size.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/O1_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/O1_size_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/O1_size_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/advance.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/advance.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/advance_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/advance_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/always.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/always.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/and.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/apply.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/apply_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/apply_wrap.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/arg.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/arg_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/arg_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/assert.hpp459
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/at.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/at.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/at_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/at_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/O1_size_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/O1_size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/adl_barrier.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/adl_barrier.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/advance_backward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/advance_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/arg_typedef.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/arg_typedef.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/arithmetic_op.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/arithmetic_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/arity.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/arity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/arity_spec.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/arity_spec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/begin_end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/begin_end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/clear_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/clear_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/common_name_wknd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/common_name_wknd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/comparison_op.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/comparison_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/adl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/adl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/arrays.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/arrays.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/bcc.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/bcc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/compiler.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/compiler.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/ctps.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/ctps.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/dependent_nttp.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/dependent_nttp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/dtp.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/dtp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/eti.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/eti.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/forwarding.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/forwarding.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/gcc.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/gcc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/gpu.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/gpu.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_apply.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/has_apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_xxx.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/has_xxx.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/integral.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/integral.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/intel.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/intel.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/lambda.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/lambda.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/msvc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc_typename.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/msvc_typename.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/nttp.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/nttp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/operators.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/overload_resolution.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/overload_resolution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/pp_counter.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/pp_counter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/preprocessor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/preprocessor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/static_constant.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/static_constant.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/ttp.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/ttp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/typeof.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/typeof.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/use_preprocessed.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/use_preprocessed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/config/workaround.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/config/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/contains_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/contains_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/count_args.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/count_args.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/empty_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/empty_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/find_if_pred.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/find_if_pred.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl_body.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/fold_impl_body.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/front_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/front_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/full_lambda.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/has_apply.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/has_apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/has_begin.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/has_begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/has_key_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/has_key_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/has_rebind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/has_rebind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/has_size.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/has_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/has_tag.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/has_tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/has_type.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/has_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/include_preprocessed.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/include_preprocessed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/insert_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/insert_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/inserter_algorithm.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/inserter_algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/integral_wrapper.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/integral_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/is_msvc_eti_arg.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/is_msvc_eti_arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/iter_apply.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/iter_apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_arity_param.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_arity_param.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_spec.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_spec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_support.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_support.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/largest_int.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/largest_int.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/logical_op.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/logical_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_dtw.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_dtw.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_eti_base.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_eti_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_is_class.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_is_class.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_never_true.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_never_true.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_type.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/na.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/na.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/na_assert.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/na_assert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/na_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/na_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/na_spec.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/na_spec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/nested_type_wknd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/nested_type_wknd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/nttp_decl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/nttp_decl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_cast_utils.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/numeric_cast_utils.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_op.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/numeric_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/overload_names.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/overload_names.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/and.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/map.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/or.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/times.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/and.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/arg.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/deque.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/deque.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/divides.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/divides.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/map.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/minus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/minus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/or.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/plus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/plus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/quote.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/quote.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/times.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/add.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/add.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/default_params.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/default_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/enum.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/ext_params.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/ext_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/filter_params.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/filter_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/is_seq.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/is_seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/params.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/range.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/repeat.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/repeat.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/sub.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/sub.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/token_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/token_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/ptr_to_ref.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/ptr_to_ref.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/push_back_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/push_back_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/push_front_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/push_front_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl_body.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_fold_impl_body.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/sequence_wrapper.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/sequence_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/size_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/static_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/static_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/template_arity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/template_arity_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/traits_lambda_spec.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/traits_lambda_spec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/type_wrapper.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/type_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/unwrap.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/unwrap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/value_wknd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/value_wknd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/aux_/yes_no.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/aux_/yes_no.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/back_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/back_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/back_inserter.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/back_inserter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/base.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/begin.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/begin_end.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/begin_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/begin_end_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/begin_end_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/bind.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/bind.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/bind_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/bind_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/bool.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/bool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/bool_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/bool_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/clear.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/clear.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/clear_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/clear_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/comparison.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/comparison.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/contains.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/contains.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/contains_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/contains_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/deref.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/deref.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/distance.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/distance.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/distance_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/distance_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/divides.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/divides.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/empty.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/empty_base.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/empty_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/empty_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/empty_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/end.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/erase_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/erase_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/erase_key_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/erase_key_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/eval_if.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/eval_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/find.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/find.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/find_if.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/find_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/fold.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/fold.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/for_each.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/for_each.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/front.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/front_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/front_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/front_inserter.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/front_inserter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/greater.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/greater_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/has_key.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/has_key.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/has_key_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/has_key_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/has_xxx.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/has_xxx.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/identity.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/identity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/if.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/inherit.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/inherit.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/insert.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/insert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/insert_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/insert_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/insert_range_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/insert_range_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/inserter.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/inserter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/int.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/int.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/int_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/int_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/integral_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/integral_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/integral_c_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/integral_c_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/integral_c_tag.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/integral_c_tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/is_placeholder.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/is_placeholder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/is_sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/is_sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/iter_fold.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/iter_fold.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/iter_fold_if.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/iter_fold_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/iterator_category.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/iterator_category.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/iterator_range.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/iterator_tags.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/iterator_tags.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/key_type_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/key_type_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/lambda.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/lambda.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/lambda_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/lambda_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/less.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/limits/arity.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/limits/arity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/limits/list.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/limits/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/limits/unrolling.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/limits/unrolling.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/limits/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/limits/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/O1_size.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/O1_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/begin_end.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/begin_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/clear.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/clear.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/empty.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/front.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/include_preprocessed.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/include_preprocessed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/item.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/item.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/numbered.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/numbered_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/pop_front.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/pop_front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_back.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_front.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/size.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/aux_/tag.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/aux_/tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list0.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list0_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list0_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list10.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list10_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list10_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list20.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list20_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list20_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list30.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list30_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list30_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list40.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list40_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list40_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list50.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/list/list50_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/list/list50_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/logical.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/logical.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/long.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/long.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/long_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/long_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/max.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/max.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/min_max.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/min_max.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/minus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/minus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/multiplies.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/multiplies.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/negate.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/negate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/next.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/next.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/next_prior.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/next_prior.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/not.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/not.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/not_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/numeric_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/numeric_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/or.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/pair.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/pair.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/pair_view.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/pair_view.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/placeholders.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/placeholders.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/plus.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/plus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/pop_back_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/pop_back_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/pop_front_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/pop_front_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/print.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/print.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/prior.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/prior.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/protect.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/protect.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/push_back.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/push_back_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/push_back_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/push_front.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/push_front_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/push_front_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/quote.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/quote.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/remove_if.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/remove_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/reverse_fold.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/reverse_fold.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/reverse_iter_fold.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/reverse_iter_fold.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/same_as.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/same_as.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/sequence_tag.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/sequence_tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/sequence_tag_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/sequence_tag_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/at_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/at_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/begin_end_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/begin_end_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/clear_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/clear_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/empty_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/empty_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/erase_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_key_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/erase_key_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/has_key_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/has_key_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/insert_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_range_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/insert_range_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/item.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/item.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/key_type_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/key_type_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/set0.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/set0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/size_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/size_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/tag.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/aux_/value_type_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/aux_/value_type_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/set/set0.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/set/set0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/size.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/size_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/size_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/size_t.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/size_t.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/size_t_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/size_t_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/tag.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/times.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/transform.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/transform.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/value_type_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/value_type_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/O1_size.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/O1_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/at.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/at.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/back.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/back.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/begin_end.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/begin_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/clear.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/clear.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/empty.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/front.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/include_preprocessed.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/include_preprocessed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/item.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/item.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/numbered.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/numbered_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_back.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/pop_back.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_front.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/pop_front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_back.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_front.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/size.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/tag.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/aux_/vector0.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/aux_/vector0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector0.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector0.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector0_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector0_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector10.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector10.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector10_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector10_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector20.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector20.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector20_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector20_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector30.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector30.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector30_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector30_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector40.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector40.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector40_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector40_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector50.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector50.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/vector/vector50_c.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/vector/vector50_c.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/void.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/void.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/mpl/void_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/mpl/void_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/composite_key.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/composite_key.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/access_specifier.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/access_specifier.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/adl_swap.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/adl_swap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/archive_constructed.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/archive_constructed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/auto_space.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/auto_space.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/base_type.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/base_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/bidir_node_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/bidir_node_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/bucket_array.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/bucket_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/cons_stdtuple.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/cons_stdtuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/converter.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/converter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/copy_map.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/copy_map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/duplicates_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/duplicates_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/has_tag.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/has_tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_args.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_args.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_node.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_node.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/header_holder.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/header_holder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/index_base.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/index_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/index_loader.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/index_loader.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/index_matcher.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/index_matcher.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/index_node_base.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/index_node_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/index_saver.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/index_saver.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/invariant_assert.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/invariant_assert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/is_index_list.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/is_index_list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/is_transparent.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/is_transparent.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/iter_adaptor.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/iter_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/modify_key_adaptor.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/modify_key_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/no_duplicate_tags.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/no_duplicate_tags.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/node_type.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/node_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_args.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_args.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_impl_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_node.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_node.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/promotes_arg.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/promotes_arg.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/raw_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/raw_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_loader.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_loader.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_node.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_node.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ptr_array.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_ptr_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_node_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_node_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/rnk_index_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/rnk_index_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/safe_mode.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/safe_mode.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/scope_guard.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/scope_guard.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_node.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/seq_index_node.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/seq_index_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/serialization_version.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/serialization_version.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/uintptr_type.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/uintptr_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/unbounded.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/unbounded.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/value_compare.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/value_compare.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/detail/vartempl_support.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/detail/vartempl_support.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/global_fun.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/global_fun.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/hashed_index.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/hashed_index.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/hashed_index_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/hashed_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/identity.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/identity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/identity_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/identity_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/indexed_by.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/indexed_by.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/key.hpp147
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/key_extractors.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/key_extractors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/mem_fun.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/mem_fun.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/member.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/member.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/ordered_index.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/ordered_index.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/ordered_index_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/ordered_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/random_access_index.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/random_access_index.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/random_access_index_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/random_access_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/ranked_index.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/ranked_index.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/ranked_index_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/ranked_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/safe_mode_errors.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/safe_mode_errors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/sequenced_index.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/sequenced_index.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/sequenced_index_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/sequenced_index_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index/tag.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index/tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index_container.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index_container.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multi_index_container_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/multi_index_container_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float.hpp2026
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/io.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float/io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/transcendental.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float/transcendental.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int.hpp1986
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/add.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/add.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/bitwise.hpp842
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/checked.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/checked.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/comparison.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/comparison.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/cpp_int_config.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/cpp_int_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/divide.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/divide.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/import_export.hpp251
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/limits.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/limits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/literals.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/literals.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/misc.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/misc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/multiply.hpp498
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/serialize.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/serialize.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/value_pack.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/value_pack.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/debug_adaptor.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/debug_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/bitscan.hpp265
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/default_ops.hpp3823
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/et_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/detail/et_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/float_string_cvt.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/detail/float_string_cvt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/constants.hpp333
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/pow.hpp909
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/trig.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/trig.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/generic_interconvert.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/detail/generic_interconvert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/integer_ops.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/detail/integer_ops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/min_max.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/detail/min_max.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/no_et_ops.hpp660
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/number_base.hpp1637
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/number_compare.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/detail/number_compare.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/precision.hpp139
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/rebind.hpp24
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/detail/ublas_interop.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/detail/ublas_interop.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/integer.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/integer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/number.hpp2278
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/rational_adaptor.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/rational_adaptor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/traits/explicit_conversion.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/traits/explicit_conversion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/traits/extract_exponent_type.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/traits/extract_exponent_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/traits/is_backend.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/traits/is_backend.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/traits/is_byte_container.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/traits/is_byte_container.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/traits/is_restricted_conversion.hpp (renamed from src/third_party/boost-1.68.0/boost/multiprecision/traits/is_restricted_conversion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/multiprecision/traits/is_variable_precision.hpp24
-rw-r--r--src/third_party/boost-1.69.0/boost/next_prior.hpp (renamed from src/third_party/boost-1.68.0/boost/next_prior.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/non_type.hpp (renamed from src/third_party/boost-1.68.0/boost/non_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/noncopyable.hpp (renamed from src/third_party/boost-1.68.0/boost/noncopyable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/none.hpp (renamed from src/third_party/boost-1.68.0/boost/none.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/none_t.hpp (renamed from src/third_party/boost-1.68.0/boost/none_t.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/bounds.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/bounds.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/cast.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/conversion_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/conversion_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/converter.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/converter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/converter_policies.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/converter_policies.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/bounds.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/bounds.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/conversion_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/conversion_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/converter.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/converter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/int_float_mixture.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/int_float_mixture.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/is_subranged.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/is_subranged.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/meta.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/meta.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/old_numeric_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/old_numeric_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/sign_mixture.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/sign_mixture.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/int_float_mixture_enum.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/int_float_mixture_enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/numeric_cast_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/numeric_cast_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/sign_mixture_enum.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/sign_mixture_enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp (renamed from src/third_party/boost-1.68.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/operators.hpp (renamed from src/third_party/boost-1.68.0/boost/operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional.hpp (renamed from src/third_party/boost-1.68.0/boost/optional.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/bad_optional_access.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/bad_optional_access.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/experimental_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/detail/experimental_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/old_optional_implementation.hpp1058
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/optional_aligned_storage.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/detail/optional_aligned_storage.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/optional_config.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/detail/optional_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/optional_factory_support.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/detail/optional_factory_support.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/optional_reference_spec.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/detail/optional_reference_spec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/optional_relops.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/detail/optional_relops.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/optional_swap.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/detail/optional_swap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/detail/optional_trivially_copyable_base.hpp499
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/optional.hpp1600
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/optional_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/optional_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/optional/optional_io.hpp (renamed from src/third_party/boost-1.68.0/boost/optional/optional_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/pending/integer_log2.hpp9
-rw-r--r--src/third_party/boost-1.69.0/boost/pointee.hpp (renamed from src/third_party/boost-1.68.0/boost/pointee.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/pointer_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/pointer_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/pointer_to_other.hpp (renamed from src/third_party/boost-1.68.0/boost/pointer_to_other.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef.h (renamed from src/third_party/boost-1.68.0/boost/predef.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/alpha.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/alpha.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/arm.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/arm.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/blackfin.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/blackfin.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/convex.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/convex.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/ia64.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/ia64.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/m68k.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/m68k.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/mips.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/mips.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/parisc.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/parisc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/ppc.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/ppc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/ptx.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/ptx.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/pyramid.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/pyramid.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/rs6k.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/rs6k.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/sparc.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/sparc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/superh.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/superh.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/sys370.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/sys370.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/sys390.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/sys390.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/x86.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/x86.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/x86/32.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/x86/32.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/x86/64.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/x86/64.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/architecture/z.h (renamed from src/third_party/boost-1.68.0/boost/predef/architecture/z.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/borland.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/borland.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/clang.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/clang.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/comeau.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/comeau.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/compaq.h66
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/diab.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/diab.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/digitalmars.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/digitalmars.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/dignus.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/dignus.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/edg.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/edg.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/ekopath.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/ekopath.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/gcc.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/gcc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/gcc_xml.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/gcc_xml.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/greenhills.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/greenhills.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/hp_acc.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/hp_acc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/iar.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/iar.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/ibm.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/ibm.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/intel.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/intel.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/kai.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/kai.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/llvm.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/llvm.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/metaware.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/metaware.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/metrowerks.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/metrowerks.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/microtec.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/microtec.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/mpw.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/mpw.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/nvcc.h73
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/palm.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/palm.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/pgi.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/pgi.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/sgi_mipspro.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/sgi_mipspro.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/sunpro.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/sunpro.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/tendra.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/tendra.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/visualc.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/visualc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/compiler/watcom.h (renamed from src/third_party/boost-1.68.0/boost/predef/compiler/watcom.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/detail/_cassert.h (renamed from src/third_party/boost-1.68.0/boost/predef/detail/_cassert.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/detail/_exception.h (renamed from src/third_party/boost-1.68.0/boost/predef/detail/_exception.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/detail/comp_detected.h (renamed from src/third_party/boost-1.68.0/boost/predef/detail/comp_detected.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/detail/endian_compat.h28
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/detail/os_detected.h (renamed from src/third_party/boost-1.68.0/boost/predef/detail/os_detected.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/detail/platform_detected.h (renamed from src/third_party/boost-1.68.0/boost/predef/detail/platform_detected.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/detail/test.h (renamed from src/third_party/boost-1.68.0/boost/predef/detail/test.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd/arm.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm/versions.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd/arm/versions.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd/ppc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc/versions.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd/ppc/versions.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86/versions.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86/versions.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86_amd.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd/versions.h (renamed from src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86_amd/versions.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/language.h (renamed from src/third_party/boost-1.68.0/boost/predef/language.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/language/cuda.h (renamed from src/third_party/boost-1.68.0/boost/predef/language/cuda.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/language/objc.h (renamed from src/third_party/boost-1.68.0/boost/predef/language/objc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/language/stdc.h (renamed from src/third_party/boost-1.68.0/boost/predef/language/stdc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/language/stdcpp.h (renamed from src/third_party/boost-1.68.0/boost/predef/language/stdcpp.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library.h (renamed from src/third_party/boost-1.68.0/boost/predef/library.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/c.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/c.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/c/_prefix.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/c/_prefix.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/c/cloudabi.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/c/cloudabi.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/c/gnu.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/c/gnu.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/c/uc.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/c/uc.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/c/vms.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/c/vms.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/c/zos.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/c/zos.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/_prefix.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/_prefix.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/cxx.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/cxx.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/dinkumware.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/dinkumware.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/libcomo.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/libcomo.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/modena.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/modena.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/msl.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/msl.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/roguewave.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/roguewave.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/sgi.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/sgi.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/stdcpp3.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/stdcpp3.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/stlport.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/stlport.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/library/std/vacpp.h (renamed from src/third_party/boost-1.68.0/boost/predef/library/std/vacpp.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/make.h (renamed from src/third_party/boost-1.68.0/boost/predef/make.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os.h (renamed from src/third_party/boost-1.68.0/boost/predef/os.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/aix.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/aix.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/amigaos.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/amigaos.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/android.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/android.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/beos.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/beos.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/bsd.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/bsd.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/bsd/bsdi.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/bsd/bsdi.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/bsd/dragonfly.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/bsd/dragonfly.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/bsd/free.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/bsd/free.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/bsd/net.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/bsd/net.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/bsd/open.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/bsd/open.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/cygwin.h50
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/haiku.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/haiku.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/hpux.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/hpux.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/ios.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/ios.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/irix.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/irix.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/linux.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/linux.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/macos.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/macos.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/os400.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/os400.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/qnxnto.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/qnxnto.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/solaris.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/solaris.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/unix.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/unix.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/vms.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/vms.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/os/windows.h (renamed from src/third_party/boost-1.68.0/boost/predef/os/windows.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/other.h (renamed from src/third_party/boost-1.68.0/boost/predef/other.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/other/endian.h (renamed from src/third_party/boost-1.68.0/boost/predef/other/endian.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/cloudabi.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/cloudabi.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/ios.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/ios.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/mingw.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/mingw.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/mingw32.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/mingw32.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/mingw64.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/mingw64.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/windows_desktop.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/windows_desktop.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/windows_phone.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/windows_phone.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/windows_runtime.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/windows_runtime.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/windows_server.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/windows_server.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/windows_store.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/windows_store.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/windows_system.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/windows_system.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/platform/windows_uwp.h (renamed from src/third_party/boost-1.68.0/boost/predef/platform/windows_uwp.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/version.h15
-rw-r--r--src/third_party/boost-1.69.0/boost/predef/version_number.h (renamed from src/third_party/boost-1.68.0/boost/predef/version_number.h)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/add.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/add.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/dec.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/dec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/detail/div_base.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/detail/div_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/inc.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/inc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/mod.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/mod.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/sub.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/sub.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/array/data.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/array/data.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/array/elem.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/array/elem.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/array/size.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/array/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/cat.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/cat.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/comma_if.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/comma_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/comparison/equal.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/comparison/equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/comparison/greater.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/comparison/greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/comparison/less.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/comparison/less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/comparison/less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/comparison/less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/comparison/not_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/comparison/not_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/config/config.hpp115
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/deduce_d.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/deduce_d.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/detail/edg/while.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/detail/edg/while.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/detail/msvc/while.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/detail/msvc/while.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/detail/while.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/detail/while.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/expr_if.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/expr_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/expr_iif.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/expr_iif.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/if.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/iif.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/iif.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/control/while.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/control/while.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/debug/error.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/debug/error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/dec.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/dec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/detail/auto_rec.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/detail/auto_rec.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/detail/check.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/detail/check.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/detail/is_binary.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/detail/is_binary.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/detail/is_unary.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/detail/is_unary.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/detail/split.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/detail/split.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/empty.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/enum.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/enum_params.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/enum_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_a_default.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/enum_params_with_a_default.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_defaults.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/enum_params_with_defaults.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/enum_shifted_params.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/enum_shifted_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/expr_if.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/expr_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/detail/is_empty.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/detail/is_empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/empty.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/expand.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/expand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/identity.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/identity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/intercept.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/intercept.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_1.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty_variadic.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_empty_variadic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/facilities/overload.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/facilities/overload.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/identity.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/identity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/if.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/inc.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/inc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iterate.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iterate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/finish.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/finish.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward1.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward2.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward3.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward4.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward5.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/local.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/local.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/rlocal.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/rlocal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/self.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/self.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/start.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/start.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/iterate.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/iterate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/local.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/local.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/iteration/self.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/iteration/self.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/adt.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/adt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/at.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/at.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_left.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/detail/edg/fold_left.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_right.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/detail/edg/fold_right.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_left.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/detail/fold_left.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_right.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/detail/fold_right.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/fold_left.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/fold_left.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/fold_right.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/fold_right.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/for_each_i.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/for_each_i.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/rest_n.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/rest_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/list/reverse.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/list/reverse.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/logical/and.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/logical/and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/logical/bitand.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/logical/bitand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/logical/bitor.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/logical/bitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/logical/bool.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/logical/bool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/logical/compl.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/logical/compl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/logical/not.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/logical/not.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/logical/or.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/logical/or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/punctuation/comma.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma_if.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/punctuation/comma_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/punctuation/is_begin_parens.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/punctuation/is_begin_parens.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/punctuation/paren.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/punctuation/paren.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repeat.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repeat.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repeat_2nd.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repeat_2nd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repeat_from_to.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repeat_from_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/edg/for.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/edg/for.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/for.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/for.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/msvc/for.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/msvc/for.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_binary_params.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_binary_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_shifted.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted_params.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_shifted_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_trailing.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing_params.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_trailing_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/for.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/for.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/repeat.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat_from_to.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/repetition/repeat_from_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/cat.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/cat.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/binary_transform.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/binary_transform.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/is_empty.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/is_empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/split.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/split.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/to_list_msvc.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/to_list_msvc.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/elem.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/elem.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/enum.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/filter.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/filter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/first_n.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/first_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_left.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/fold_left.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_right.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/fold_right.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_i.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each_i.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_product.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each_product.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/insert.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/insert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_back.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/pop_back.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_front.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/pop_front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/push_back.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/push_back.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/push_front.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/push_front.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/remove.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/remove.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/replace.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/replace.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/rest_n.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/rest_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/reverse.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/reverse.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/seq.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/size.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/subseq.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/subseq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/to_array.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/to_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/to_list.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/to_list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/to_tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/to_tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/transform.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/transform.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/counter.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/counter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/def.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/def.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/shared.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/shared.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot1.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot1.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot2.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot3.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot3.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot4.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot4.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot5.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot5.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/slot/slot.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/slot/slot.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/stringize.hpp37
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/tuple/detail/is_single_return.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/tuple/detail/is_single_return.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/tuple/eat.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/tuple/eat.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/tuple/elem.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/tuple/elem.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/tuple/rem.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/tuple/rem.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/tuple/size.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/tuple/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_list.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/tuple/to_list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_seq.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/tuple/to_seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/variadic/detail/is_single_return.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/variadic/detail/is_single_return.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/variadic/elem.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/variadic/elem.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/variadic/size.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/variadic/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/preprocessor/variadic/to_seq.hpp (renamed from src/third_party/boost-1.68.0/boost/preprocessor/variadic/to_seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/cmdline.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/cmdline.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/config.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/detail/cmdline.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/detail/cmdline.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/detail/config_file.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/detail/config_file.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/detail/convert.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/detail/convert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/detail/parsers.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/detail/parsers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/detail/utf8_codecvt_facet.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/detail/utf8_codecvt_facet.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/detail/value_semantic.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/detail/value_semantic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/environment_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/environment_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/eof_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/eof_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/errors.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/errors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/option.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/option.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/options_description.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/options_description.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/parsers.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/parsers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/positional_options.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/positional_options.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/value_semantic.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/value_semantic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/variables_map.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/variables_map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/program_options/version.hpp (renamed from src/third_party/boost-1.68.0/boost/program_options/version.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/progress.hpp (renamed from src/third_party/boost-1.68.0/boost/progress.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random.hpp (renamed from src/third_party/boost-1.68.0/boost/random.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/additive_combine.hpp (renamed from src/third_party/boost-1.68.0/boost/random/additive_combine.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/bernoulli_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/bernoulli_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/beta_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/beta_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/binomial_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/binomial_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/cauchy_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/cauchy_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/chi_squared_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/chi_squared_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/auto_link.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/auto_link.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/config.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/const_mod.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/const_mod.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/disable_warnings.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/disable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/enable_warnings.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/enable_warnings.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/generator_bits.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/generator_bits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/generator_seed_seq.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/generator_seed_seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/gray_coded_qrng.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/gray_coded_qrng.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/int_float_pair.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/int_float_pair.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/integer_log2.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/integer_log2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/iterator_mixin.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/iterator_mixin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/large_arithmetic.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/large_arithmetic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/niederreiter_base2_table.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/niederreiter_base2_table.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/operators.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/polynomial.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/polynomial.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/ptr_helper.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/ptr_helper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/qrng_base.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/qrng_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/seed.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/seed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/seed_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/seed_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/signed_unsigned_tools.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/signed_unsigned_tools.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/sobol_table.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/sobol_table.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/uniform_int_float.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/uniform_int_float.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/detail/vector_io.hpp (renamed from src/third_party/boost-1.68.0/boost/random/detail/vector_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/discard_block.hpp (renamed from src/third_party/boost-1.68.0/boost/random/discard_block.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/discrete_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/discrete_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/exponential_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/exponential_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/extreme_value_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/extreme_value_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/faure.hpp (renamed from src/third_party/boost-1.68.0/boost/random/faure.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/fisher_f_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/fisher_f_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/gamma_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/gamma_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/generate_canonical.hpp (renamed from src/third_party/boost-1.68.0/boost/random/generate_canonical.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/geometric_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/geometric_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/hyperexponential_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/hyperexponential_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/independent_bits.hpp (renamed from src/third_party/boost-1.68.0/boost/random/independent_bits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/inversive_congruential.hpp (renamed from src/third_party/boost-1.68.0/boost/random/inversive_congruential.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/lagged_fibonacci.hpp (renamed from src/third_party/boost-1.68.0/boost/random/lagged_fibonacci.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/laplace_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/laplace_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/linear_congruential.hpp (renamed from src/third_party/boost-1.68.0/boost/random/linear_congruential.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/linear_feedback_shift.hpp (renamed from src/third_party/boost-1.68.0/boost/random/linear_feedback_shift.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/lognormal_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/lognormal_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/mersenne_twister.hpp (renamed from src/third_party/boost-1.68.0/boost/random/mersenne_twister.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/negative_binomial_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/negative_binomial_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/niederreiter_base2.hpp (renamed from src/third_party/boost-1.68.0/boost/random/niederreiter_base2.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/non_central_chi_squared_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/non_central_chi_squared_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/normal_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/normal_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/piecewise_constant_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/piecewise_constant_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/piecewise_linear_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/piecewise_linear_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/poisson_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/poisson_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/random_device.hpp (renamed from src/third_party/boost-1.68.0/boost/random/random_device.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/random_number_generator.hpp (renamed from src/third_party/boost-1.68.0/boost/random/random_number_generator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/ranlux.hpp (renamed from src/third_party/boost-1.68.0/boost/random/ranlux.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/seed_seq.hpp (renamed from src/third_party/boost-1.68.0/boost/random/seed_seq.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/shuffle_order.hpp (renamed from src/third_party/boost-1.68.0/boost/random/shuffle_order.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/shuffle_output.hpp (renamed from src/third_party/boost-1.68.0/boost/random/shuffle_output.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/sobol.hpp (renamed from src/third_party/boost-1.68.0/boost/random/sobol.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/student_t_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/student_t_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/subtract_with_carry.hpp (renamed from src/third_party/boost-1.68.0/boost/random/subtract_with_carry.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/taus88.hpp (renamed from src/third_party/boost-1.68.0/boost/random/taus88.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/traits.hpp (renamed from src/third_party/boost-1.68.0/boost/random/traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/triangle_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/triangle_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/uniform_01.hpp (renamed from src/third_party/boost-1.68.0/boost/random/uniform_01.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/uniform_int.hpp (renamed from src/third_party/boost-1.68.0/boost/random/uniform_int.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/uniform_int_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/uniform_int_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/uniform_on_sphere.hpp (renamed from src/third_party/boost-1.68.0/boost/random/uniform_on_sphere.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/uniform_real.hpp (renamed from src/third_party/boost-1.68.0/boost/random/uniform_real.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/uniform_real_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/uniform_real_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/uniform_smallint.hpp (renamed from src/third_party/boost-1.68.0/boost/random/uniform_smallint.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/variate_generator.hpp (renamed from src/third_party/boost-1.68.0/boost/random/variate_generator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/weibull_distribution.hpp (renamed from src/third_party/boost-1.68.0/boost/random/weibull_distribution.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/random/xor_combine.hpp (renamed from src/third_party/boost-1.68.0/boost/random/xor_combine.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range.hpp (renamed from src/third_party/boost-1.68.0/boost/range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/adjacent_filtered.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/adjacent_filtered.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/argument_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/argument_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/copied.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/copied.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/filtered.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/filtered.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/formatted.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/formatted.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/indexed.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/indexed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/indirected.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/indirected.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/map.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/replaced.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/replaced.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/replaced_if.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/replaced_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/reversed.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/reversed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/sliced.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/sliced.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/strided.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/strided.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/tokenized.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/tokenized.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/transformed.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/transformed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptor/uniqued.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptor/uniqued.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/adaptors.hpp (renamed from src/third_party/boost-1.68.0/boost/range/adaptors.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/adjacent_find.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/adjacent_find.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/binary_search.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/binary_search.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/copy.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/copy_backward.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/copy_backward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/count.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/count.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/count_if.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/count_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/equal.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/equal_range.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/equal_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/fill.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/fill.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/fill_n.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/fill_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/find.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/find.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/find_end.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/find_end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/find_first_of.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/find_first_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/find_if.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/find_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/for_each.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/for_each.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/generate.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/generate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/heap_algorithm.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/heap_algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/inplace_merge.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/inplace_merge.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/lexicographical_compare.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/lexicographical_compare.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/lower_bound.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/lower_bound.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/max_element.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/max_element.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/merge.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/merge.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/min_element.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/min_element.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/mismatch.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/mismatch.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/nth_element.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/nth_element.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/partial_sort.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/partial_sort_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/partition.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/partition.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/permutation.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/permutation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/random_shuffle.hpp141
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/remove.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/remove.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/remove_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy_if.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/remove_copy_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/remove_if.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/remove_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/replace.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/replace.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/replace_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy_if.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/replace_copy_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/replace_if.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/replace_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/reverse.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/reverse.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/reverse_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/reverse_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/rotate.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/rotate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/rotate_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/rotate_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/search.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/search.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/search_n.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/search_n.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/set_algorithm.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/set_algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/sort.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/sort.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/stable_partition.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/stable_partition.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/stable_sort.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/stable_sort.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/transform.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/transform.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/unique.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/unique.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/unique_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/unique_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/algorithm/upper_bound.hpp (renamed from src/third_party/boost-1.68.0/boost/range/algorithm/upper_bound.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/as_literal.hpp (renamed from src/third_party/boost-1.68.0/boost/range/as_literal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/begin.hpp143
-rw-r--r--src/third_party/boost-1.69.0/boost/range/category.hpp (renamed from src/third_party/boost-1.68.0/boost/range/category.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/concepts.hpp (renamed from src/third_party/boost-1.68.0/boost/range/concepts.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/config.hpp (renamed from src/third_party/boost-1.68.0/boost/range/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/const_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/range/const_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/const_reverse_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/range/const_reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/as_literal.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/as_literal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/begin.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/begin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/common.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/common.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/default_constructible_unary_fn.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/default_constructible_unary_fn.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/detail_str.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/detail_str.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/end.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/end.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/extract_optional_type.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/extract_optional_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/has_member_size.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/has_member_size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/implementation_help.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/implementation_help.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/misc_concept.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/misc_concept.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/msvc_has_iterator_workaround.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/msvc_has_iterator_workaround.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/range_return.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/range_return.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/remove_extent.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/remove_extent.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/safe_bool.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/safe_bool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/sfinae.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/sfinae.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/size_type.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/size_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/str_types.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/str_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/detail/value_type.hpp (renamed from src/third_party/boost-1.68.0/boost/range/detail/value_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/difference_type.hpp (renamed from src/third_party/boost-1.68.0/boost/range/difference_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/distance.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/range/empty.hpp (renamed from src/third_party/boost-1.68.0/boost/range/empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/end.hpp136
-rw-r--r--src/third_party/boost-1.69.0/boost/range/functions.hpp (renamed from src/third_party/boost-1.68.0/boost/range/functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/has_range_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/range/has_range_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/range/iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/iterator_range.hpp (renamed from src/third_party/boost-1.68.0/boost/range/iterator_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/iterator_range_core.hpp (renamed from src/third_party/boost-1.68.0/boost/range/iterator_range_core.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/iterator_range_io.hpp (renamed from src/third_party/boost-1.68.0/boost/range/iterator_range_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/metafunctions.hpp (renamed from src/third_party/boost-1.68.0/boost/range/metafunctions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/mutable_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/range/mutable_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/numeric.hpp (renamed from src/third_party/boost-1.68.0/boost/range/numeric.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/range/pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/range_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/range/range_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/rbegin.hpp (renamed from src/third_party/boost-1.68.0/boost/range/rbegin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/reference.hpp (renamed from src/third_party/boost-1.68.0/boost/range/reference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/rend.hpp (renamed from src/third_party/boost-1.68.0/boost/range/rend.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/result_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/range/result_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/reverse_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/range/reverse_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/reverse_result_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/range/reverse_result_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/size.hpp (renamed from src/third_party/boost-1.68.0/boost/range/size.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/size_type.hpp (renamed from src/third_party/boost-1.68.0/boost/range/size_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/sub_range.hpp (renamed from src/third_party/boost-1.68.0/boost/range/sub_range.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/traversal.hpp (renamed from src/third_party/boost-1.68.0/boost/range/traversal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/range/value_type.hpp (renamed from src/third_party/boost-1.68.0/boost/range/value_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/config.hpp96
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/detail/mpl/abs.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/detail/mpl/abs.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/detail/mpl/gcd.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/detail/mpl/gcd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/detail/mpl/lcm.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/detail/mpl/lcm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/detail/mpl/sign.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/detail/mpl/sign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/detail/overflow_helpers.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/detail/overflow_helpers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/detail/ratio_io.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/detail/ratio_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/mpl/rational_c_tag.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/mpl/rational_c_tag.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/ratio.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/ratio.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/ratio_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/ratio_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/ratio/ratio_io.hpp (renamed from src/third_party/boost-1.68.0/boost/ratio/ratio_io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/rational.hpp1020
-rw-r--r--src/third_party/boost-1.69.0/boost/ref.hpp (renamed from src/third_party/boost-1.68.0/boost/ref.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex.hpp (renamed from src/third_party/boost-1.68.0/boost/regex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/config.hpp487
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/config/borland.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/config/borland.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/config/cwchar.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/config/cwchar.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/icu.hpp1069
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/pattern_except.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/pattern_except.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/pending/object_cache.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/pending/object_cache.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/pending/static_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/pending/static_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/pending/unicode_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/pending/unicode_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/regex_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/user.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/user.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/basic_regex.hpp787
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_creator.hpp1575
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_parser.hpp3143
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/c_regex_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/c_regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/char_regex_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/char_regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/cpp_regex_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/cpp_regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/cregex.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/cregex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/error_type.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/error_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/fileiter.hpp452
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/instances.hpp236
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/iterator_category.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/iterator_category.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/iterator_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/iterator_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/match_flags.hpp149
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/match_results.hpp716
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/mem_block_cache.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/mem_block_cache.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher.hpp626
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_common.hpp1020
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_non_recursive.hpp1948
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_recursive.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_recursive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/primary_transform.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/primary_transform.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/protected_call.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/protected_call.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regbase.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regbase.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_format.hpp1151
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regex_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_grep.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regex_grep.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_iterator.hpp193
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_match.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regex_match.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_merge.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regex_merge.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_raw_buffer.hpp210
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_replace.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regex_replace.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_search.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regex_search.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_split.hpp174
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_token_iterator.hpp325
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/regex_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_traits_defaults.hpp381
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/regex_workaround.hpp237
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/states.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/states.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/sub_match.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/sub_match.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/syntax_type.hpp (renamed from src/third_party/boost-1.68.0/boost/regex/v4/syntax_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/u32regex_iterator.hpp185
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/u32regex_token_iterator.hpp360
-rw-r--r--src/third_party/boost-1.69.0/boost/regex/v4/w32_regex_traits.hpp745
-rw-r--r--src/third_party/boost-1.69.0/boost/regex_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/regex_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/scoped_array.hpp (renamed from src/third_party/boost-1.68.0/boost/scoped_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/scoped_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/scoped_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/access.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/access.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/array_optimization.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/array_optimization.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/array_wrapper.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/array_wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/assume_abstract.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/assume_abstract.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/base_object.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/base_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/collection_size_type.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/collection_size_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/collection_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/collection_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/collections_load_imp.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/collections_load_imp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/collections_save_imp.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/collections_save_imp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/config.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/detail/is_default_constructible.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/detail/is_default_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/detail/stack_constructor.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/detail/stack_constructor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/extended_type_info.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/extended_type_info.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/extended_type_info_no_rtti.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/extended_type_info_no_rtti.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/extended_type_info_typeid.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/extended_type_info_typeid.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/factory.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/factory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/force_include.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/force_include.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/is_bitwise_serializable.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/is_bitwise_serializable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/item_version_type.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/item_version_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/level.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/level.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/level_enum.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/level_enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/list.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/nvp.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/nvp.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/serialization.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/serialization.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/set.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/singleton.hpp218
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/smart_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/smart_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/split_free.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/split_free.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/split_member.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/split_member.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/state_saver.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/state_saver.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/static_warning.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/static_warning.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/string.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/string.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/strong_typedef.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/strong_typedef.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/throw_exception.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/throw_exception.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/tracking.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/tracking.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/tracking_enum.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/tracking_enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/traits.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/type_info_implementation.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/type_info_implementation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/vector.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/vector.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/version.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/version.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/void_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/void_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/void_cast_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/void_cast_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/serialization/wrapper.hpp (renamed from src/third_party/boost-1.68.0/boost/serialization/wrapper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/shared_array.hpp (renamed from src/third_party/boost-1.68.0/boost/shared_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/shared_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/allocate_local_shared_array.hpp228
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/allocate_shared_array.hpp648
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/atomic_shared_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/atomic_shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/bad_weak_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/bad_weak_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_nt.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_nt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_pt.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_pt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_solaris.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_solaris.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_spin.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_spin.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_sync.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_sync.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_win32.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_win32.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/lightweight_mutex.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/lightweight_mutex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/local_counted_base.hpp148
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/local_sp_deleter.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/local_sp_deleter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_nop.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_nop.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_pthreads.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_pthreads.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_win32_cs.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_win32_cs.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/operator_bool.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/operator_bool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/quick_allocator.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/quick_allocator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/shared_count.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/shared_count.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_convertible.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_convertible.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp153
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp145
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp151
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp173
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp161
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp160
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp190
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp184
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp169
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp176
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp110
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp139
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp164
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp116
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp134
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp139
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp158
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp153
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp133
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_impl.hpp292
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_forward.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_forward.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_has_sync.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_has_sync.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_interlocked.hpp173
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_noexcept.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_noexcept.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_nullptr_t.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_nullptr_t.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_nt.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_nt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pool.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_pool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pt.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_pt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_sync.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_sync.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_w32.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_w32.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/detail/yield_k.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/detail/yield_k.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_raw.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/enable_shared_from_raw.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_this.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/enable_shared_from_this.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/intrusive_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ref_counter.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/intrusive_ref_counter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/local_shared_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/local_shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_array.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_object.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_shared.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/make_shared.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_array.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/make_shared_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_object.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/make_shared_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/make_unique.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/make_unique.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/owner_less.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/owner_less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/scoped_array.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/scoped_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/scoped_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/scoped_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/shared_array.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/shared_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/shared_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/shared_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/smart_ptr/weak_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/smart_ptr/weak_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/assert.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/assert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/actions.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/actions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/alternative.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/alternative.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/composite.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/composite.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/difference.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/difference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/directives.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/directives.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/difference.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/difference.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/directives.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/directives.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/list.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/list.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/optional.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/optional.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/positive.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/positive.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/intersection.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/intersection.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/kleene_star.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/kleene_star.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/list.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/list.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/operators.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/optional.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/optional.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/positive.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/positive.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequence.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequence.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_and.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequential_and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_or.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequential_or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/config.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/match.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/parser.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/parser.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/match.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/match.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/nil.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/nil.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/rule.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/rule.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/parser.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/parser.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/numerics.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/primitives.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/primitives.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/safe_bool.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/safe_bool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/scanner.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/skipper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/debug.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/debug.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/debug_node.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/debug/debug_node.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/minimal.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/debug/minimal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/meta/as_parser.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/meta/as_parser.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/namespace.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/namespace.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/chset.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset_operators.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/chset_operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp (renamed from src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/home/classic/version.hpp30
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/include/classic_actions.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/include/classic_actions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/include/classic_chset.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/include/classic_chset.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/include/classic_numerics.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/include/classic_numerics.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/include/classic_operators.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/include/classic_operators.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/spirit/include/classic_rule.hpp (renamed from src/third_party/boost-1.68.0/boost/spirit/include/classic_rule.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/static_assert.hpp (renamed from src/third_party/boost-1.68.0/boost/static_assert.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/swap.hpp (renamed from src/third_party/boost-1.68.0/boost/swap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/system/api_config.hpp (renamed from src/third_party/boost-1.68.0/boost/system/api_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/system/config.hpp50
-rw-r--r--src/third_party/boost-1.69.0/boost/system/detail/config.hpp57
-rw-r--r--src/third_party/boost-1.69.0/boost/system/detail/generic_category.hpp101
-rw-r--r--src/third_party/boost-1.69.0/boost/system/detail/std_interoperability.hpp141
-rw-r--r--src/third_party/boost-1.69.0/boost/system/detail/system_category_posix.hpp132
-rw-r--r--src/third_party/boost-1.69.0/boost/system/detail/system_category_win32.hpp324
-rw-r--r--src/third_party/boost-1.69.0/boost/system/error_code.hpp956
-rw-r--r--src/third_party/boost-1.69.0/boost/system/system_error.hpp84
-rw-r--r--src/third_party/boost-1.69.0/boost/test/debug.hpp (renamed from src/third_party/boost-1.68.0/boost/test/debug.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/debug_config.hpp (renamed from src/third_party/boost-1.68.0/boost/test/debug_config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/config.hpp (renamed from src/third_party/boost-1.68.0/boost/test/detail/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/enable_warnings.hpp36
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/fwd_decl.hpp (renamed from src/third_party/boost-1.68.0/boost/test/detail/fwd_decl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/global_typedef.hpp145
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/log_level.hpp (renamed from src/third_party/boost-1.68.0/boost/test/detail/log_level.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/pp_variadic.hpp (renamed from src/third_party/boost-1.68.0/boost/test/detail/pp_variadic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/suppress_warnings.hpp40
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/throw_exception.hpp71
-rw-r--r--src/third_party/boost-1.69.0/boost/test/detail/workaround.hpp (renamed from src/third_party/boost-1.68.0/boost/test/detail/workaround.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/execution_monitor.hpp583
-rw-r--r--src/third_party/boost-1.69.0/boost/test/floating_point_comparison.hpp (renamed from src/third_party/boost-1.68.0/boost/test/floating_point_comparison.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/framework.hpp301
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/compiler_log_formatter.ipp293
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/cpp_main.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/cpp_main.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/debug.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/debug.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/decorator.ipp214
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/execution_monitor.ipp1450
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/framework.ipp1725
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/junit_log_formatter.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/junit_log_formatter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/plain_report_formatter.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/plain_report_formatter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/progress_monitor.ipp189
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/results_collector.ipp299
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/results_reporter.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/results_reporter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/test_framework_init_observer.ipp117
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/test_main.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/test_main.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/test_tools.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/test_tools.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/test_tree.ipp566
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/unit_test_log.ipp695
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/unit_test_main.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/unit_test_main.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/unit_test_monitor.ipp78
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/unit_test_parameters.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/unit_test_parameters.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/xml_log_formatter.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/xml_log_formatter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/impl/xml_report_formatter.ipp (renamed from src/third_party/boost-1.68.0/boost/test/impl/xml_report_formatter.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/included/prg_exec_monitor.hpp (renamed from src/third_party/boost-1.68.0/boost/test/included/prg_exec_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/included/test_exec_monitor.hpp (renamed from src/third_party/boost-1.68.0/boost/test/included/test_exec_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/included/unit_test.hpp (renamed from src/third_party/boost-1.68.0/boost/test/included/unit_test.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/output/compiler_log_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/test/output/compiler_log_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/output/junit_log_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/test/output/junit_log_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/output/plain_report_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/test/output/plain_report_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/output/xml_log_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/test/output/xml_log_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/output/xml_report_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/test/output/xml_report_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/prg_exec_monitor.hpp (renamed from src/third_party/boost-1.68.0/boost/test/prg_exec_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/progress_monitor.hpp65
-rw-r--r--src/third_party/boost-1.69.0/boost/test/results_collector.hpp148
-rw-r--r--src/third_party/boost-1.69.0/boost/test/results_reporter.hpp (renamed from src/third_party/boost-1.68.0/boost/test/results_reporter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/test_exec_monitor.hpp (renamed from src/third_party/boost-1.68.0/boost/test/test_exec_monitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/test_framework_init_observer.hpp61
-rw-r--r--src/third_party/boost-1.69.0/boost/test/test_tools.hpp (renamed from src/third_party/boost-1.68.0/boost/test/test_tools.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/assertion.hpp413
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/assertion_result.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/assertion_result.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/collection_comparison_op.hpp450
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/context.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/context.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/cstring_comparison_op.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/cstring_comparison_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/bitwise_manip.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/detail/bitwise_manip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/expression_holder.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/detail/expression_holder.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/detail/fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/indirections.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/detail/indirections.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/it_pair.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/detail/it_pair.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/lexicographic_manip.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/detail/lexicographic_manip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/per_element_manip.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/detail/per_element_manip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/print_helper.hpp248
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/detail/tolerance_manip.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/detail/tolerance_manip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/floating_point_comparison.hpp317
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/fpc_op.hpp214
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/fpc_tolerance.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/fpc_tolerance.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/interface.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/interface.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/old/impl.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/old/impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/old/interface.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/old/interface.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tools/output_test_stream.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tools/output_test_stream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/auto_registration.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/decorator.hpp280
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/fixture.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tree/fixture.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/global_fixture.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tree/global_fixture.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/observer.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tree/observer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/test_case_counter.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tree/test_case_counter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/test_case_template.hpp192
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/test_unit.hpp293
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/traverse.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tree/traverse.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/tree/visitor.hpp (renamed from src/third_party/boost-1.68.0/boost/test/tree/visitor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/unit_test.hpp (renamed from src/third_party/boost-1.68.0/boost/test/unit_test.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/unit_test_log.hpp280
-rw-r--r--src/third_party/boost-1.69.0/boost/test/unit_test_log_formatter.hpp (renamed from src/third_party/boost-1.68.0/boost/test/unit_test_log_formatter.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/unit_test_monitor.hpp61
-rw-r--r--src/third_party/boost-1.69.0/boost/test/unit_test_parameters.hpp (renamed from src/third_party/boost-1.68.0/boost/test/unit_test_parameters.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/unit_test_suite.hpp405
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/algorithm.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/algorithm.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/assign_op.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/assign_op.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/basic_cstring.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/compare.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/compare.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/io.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/io.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/class_properties.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/class_properties.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/custom_manip.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/custom_manip.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/foreach.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/foreach.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/is_cstring.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/is_cstring.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/is_forward_iterable.hpp267
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/iterator/input_iterator_facade.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/iterator/input_iterator_facade.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/iterator/token_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/iterator/token_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/lazy_ostream.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/lazy_ostream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/named_params.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/named_params.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/rtti.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/rtti.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/argument.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/runtime/argument.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/argument_factory.hpp243
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/argv_traverser.hpp106
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/parser.hpp625
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/env/fetch.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/runtime/env/fetch.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/errors.hpp195
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/finalize.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/runtime/finalize.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/runtime/fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/modifier.hpp107
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/runtime/parameter.hpp526
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/setcolor.hpp318
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/string_cast.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/string_cast.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/wrap_stringstream.hpp (renamed from src/third_party/boost-1.68.0/boost/test/utils/wrap_stringstream.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/test/utils/xml_printer.hpp145
-rw-r--r--src/third_party/boost-1.69.0/boost/thread.hpp (renamed from src/third_party/boost-1.68.0/boost/thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/barrier.hpp255
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/condition_variable.hpp21
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/functional.hpp49
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_arg.hpp41
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_traits.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/memory/config.hpp16
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/memory/pointer_traits.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/memory/scoped_allocator.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/memory/shared_ptr.hpp42
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/memory/unique_ptr.hpp28
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/tuple.hpp49
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/csbl/vector.hpp35
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/cv_status.hpp26
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/atomic_redef_macros.hpp19
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/atomic_undef_macros.hpp39
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/config.hpp531
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/delete.hpp58
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/invoke.hpp1604
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/invoker.hpp762
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/is_convertible.hpp49
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/lockable_wrapper.hpp45
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/make_tuple_indices.hpp224
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/memory.hpp48
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/move.hpp379
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/nullary_function.hpp239
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/platform.hpp75
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/platform_time.hpp478
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/thread.hpp848
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/thread_group.hpp155
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/thread_heap_alloc.hpp23
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/thread_interruption.hpp39
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/thread_safety.hpp160
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/tss_hooks.hpp65
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/variadic_footer.hpp10
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/detail/variadic_header.hpp19
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/exceptional_ptr.hpp44
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/exceptions.hpp225
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/executor.hpp15
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/executors/executor.hpp148
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/executors/executor_adaptor.hpp136
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/executors/generic_executor_ref.hpp213
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/executors/work.hpp30
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/future.hpp5897
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/futures/future_error.hpp98
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/futures/future_error_code.hpp61
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/futures/future_status.hpp30
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/futures/is_future_type.hpp21
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/futures/launch.hpp32
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/futures/wait_for_all.hpp74
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/futures/wait_for_any.hpp161
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/is_locked_by_this_thread.hpp39
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/lock_algorithms.hpp468
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/lock_guard.hpp88
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/lock_options.hpp31
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/lock_types.hpp1230
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/lockable_traits.hpp238
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/locks.hpp17
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/mutex.hpp53
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/once.hpp54
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable.hpp502
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable_fwd.hpp348
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/mutex.hpp346
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/once.hpp540
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/once_atomic.hpp313
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/pthread_helpers.hpp42
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp139
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/recursive_mutex.hpp436
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/shared_mutex.hpp642
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/thread_data.hpp405
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/pthread/thread_heap_alloc.hpp272
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/recursive_mutex.hpp64
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/shared_lock_guard.hpp53
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/shared_mutex.hpp57
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/thread.hpp16
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/thread_only.hpp29
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/thread_time.hpp55
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/tss.hpp113
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/v2/shared_mutex.hpp1052
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/basic_recursive_mutex.hpp176
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/basic_timed_mutex.hpp297
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/condition_variable.hpp725
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/interlocked_read.hpp214
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/mutex.hpp72
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/once.hpp1087
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/recursive_mutex.hpp70
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/shared_mutex.hpp849
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/thread_data.hpp299
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/thread_heap_alloc.hpp469
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/win32/thread_primitives.hpp426
-rw-r--r--src/third_party/boost-1.69.0/boost/thread/xtime.hpp93
-rw-r--r--src/third_party/boost-1.69.0/boost/throw_exception.hpp103
-rw-r--r--src/third_party/boost-1.69.0/boost/timer.hpp (renamed from src/third_party/boost-1.68.0/boost/timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/timer/config.hpp (renamed from src/third_party/boost-1.68.0/boost/timer/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/timer/timer.hpp (renamed from src/third_party/boost-1.68.0/boost/timer/timer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/token_functions.hpp653
-rw-r--r--src/third_party/boost-1.69.0/boost/token_iterator.hpp (renamed from src/third_party/boost-1.68.0/boost/token_iterator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/tokenizer.hpp (renamed from src/third_party/boost-1.68.0/boost/tokenizer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/tuple/detail/tuple_basic.hpp (renamed from src/third_party/boost-1.68.0/boost/tuple/detail/tuple_basic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/tuple/tuple.hpp (renamed from src/third_party/boost-1.68.0/boost/tuple/tuple.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/tuple/tuple_comparison.hpp (renamed from src/third_party/boost-1.68.0/boost/tuple/tuple_comparison.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type.hpp (renamed from src/third_party/boost-1.68.0/boost/type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index.hpp (renamed from src/third_party/boost-1.68.0/boost/type_index.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/ctti_type_index.hpp (renamed from src/third_party/boost-1.68.0/boost/type_index/ctti_type_index.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/detail/compile_time_type_info.hpp (renamed from src/third_party/boost-1.68.0/boost/type_index/detail/compile_time_type_info.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/detail/ctti_register_class.hpp (renamed from src/third_party/boost-1.68.0/boost/type_index/detail/ctti_register_class.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/detail/stl_register_class.hpp (renamed from src/third_party/boost-1.68.0/boost/type_index/detail/stl_register_class.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/stl_type_index.hpp278
-rw-r--r--src/third_party/boost-1.69.0/boost/type_index/type_index_facade.hpp (renamed from src/third_party/boost-1.68.0/boost/type_index/type_index_facade.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits.hpp155
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/add_const.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/add_const.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/add_cv.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/add_cv.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/add_lvalue_reference.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/add_lvalue_reference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/add_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/add_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/add_reference.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/add_reference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/add_rvalue_reference.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/add_rvalue_reference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/add_volatile.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/add_volatile.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/aligned_storage.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/aligned_storage.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/alignment_of.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/alignment_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/common_type.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/common_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/composite_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/composite_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/conditional.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/conditional.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/conversion_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/conversion_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/copy_cv.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/copy_cv.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/cv_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/cv_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/decay.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/decay.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/declval.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/declval.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/bool_trait_undef.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/bool_trait_undef.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/common_arithmetic_type.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/common_arithmetic_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/common_type_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/common_type_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/composite_member_pointer_type.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/composite_member_pointer_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/composite_pointer_type.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/composite_pointer_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/config.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/has_binary_operator.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/has_binary_operator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/has_postfix_operator.hpp250
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/has_prefix_operator.hpp280
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_03.hpp108
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_11.hpp501
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_msvc10_fix.hpp30
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_helper.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/is_function_ptr_helper.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_tester.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/is_function_ptr_tester.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_likely_lambda.hpp94
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp117
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp557
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp43
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/mp_defer.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/mp_defer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/detail/yes_no_type.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/detail/yes_no_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/enable_if.hpp37
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/extent.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/extent.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/floating_point_promotion.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/floating_point_promotion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/function_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/function_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_bit_and.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_bit_and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_bit_and_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_bit_and_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_bit_or.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_bit_or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_bit_or_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_bit_or_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_bit_xor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_bit_xor_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_complement.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_complement.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_dereference.hpp375
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_divides.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_divides.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_divides_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_divides_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_greater.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_greater.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_greater_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_greater_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_left_shift.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_left_shift.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_left_shift_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_left_shift_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_less.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_less.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_less_equal.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_less_equal.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_logical_and.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_logical_and.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_logical_not.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_logical_not.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_logical_or.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_logical_or.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_minus.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_minus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_minus_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_minus_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_modulus.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_modulus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_modulus_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_modulus_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_multiplies.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_multiplies.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_multiplies_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_multiplies_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_negate.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_negate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_new_operator.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_new_operator.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_not_equal_to.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_not_equal_to.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_constructor.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_constructor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_destructor.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_destructor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_plus.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_plus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_plus_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_plus_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_post_decrement.hpp65
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_post_increment.hpp65
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_pre_decrement.hpp65
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_pre_increment.hpp66
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_right_shift.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_right_shift.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_right_shift_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_right_shift_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_trivial_assign.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_trivial_assign.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_trivial_constructor.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_trivial_constructor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_trivial_copy.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_trivial_copy.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_trivial_destructor.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_trivial_destructor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_assign.hpp73
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_constructor.hpp79
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_unary_minus.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_unary_minus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_unary_plus.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_unary_plus.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/has_virtual_destructor.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/has_virtual_destructor.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/integral_constant.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/integral_constant.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/integral_promotion.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/integral_promotion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/intrinsics.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/intrinsics.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_abstract.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_abstract.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_arithmetic.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_arithmetic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_array.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_array.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_assignable.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_assignable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_base_and_derived.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_base_and_derived.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_base_of.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_base_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_class.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_class.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_complete.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_complete.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_complex.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_complex.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_compound.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_compound.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_const.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_const.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_constructible.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_convertible.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_convertible.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_copy_assignable.hpp140
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_copy_constructible.hpp185
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_default_constructible.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_default_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_destructible.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_destructible.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_empty.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_empty.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_enum.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_enum.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_final.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_final.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_float.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_float.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_floating_point.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_floating_point.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_function.hpp27
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_fundamental.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_fundamental.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_integral.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_integral.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_list_constructible.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_list_constructible.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_lvalue_reference.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_lvalue_reference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_member_function_pointer.hpp26
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_member_object_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_member_object_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_member_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_member_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_noncopyable.hpp39
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_assignable.hpp92
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_constructible.hpp97
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_swappable.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_swappable.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_object.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_object.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_pod.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_pod.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_polymorphic.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_polymorphic.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_reference.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_reference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_rvalue_reference.hpp29
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_same.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_same.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_scalar.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_scalar.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_signed.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_signed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_stateless.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_stateless.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_union.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_union.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_unsigned.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_unsigned.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_virtual_base_of.hpp146
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_void.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_void.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/is_volatile.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/is_volatile.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/make_signed.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/make_signed.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/make_unsigned.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/make_unsigned.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/make_void.hpp52
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/object_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/object_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/promote.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/promote.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/rank.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/rank.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_all_extents.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_all_extents.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_bounds.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_bounds.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_const.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_const.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_cv.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_cv.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_cv_ref.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_cv_ref.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_extent.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_extent.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_pointer.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_pointer.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_reference.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_reference.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/remove_volatile.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/remove_volatile.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/same_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/same_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/transform_traits.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/transform_traits.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/type_identity.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/type_identity.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/type_traits/type_with_alignment.hpp (renamed from src/third_party/boost-1.68.0/boost/type_traits/type_with_alignment.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/constant.hpp26
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/decltype.hpp (renamed from src/third_party/boost-1.68.0/boost/typeof/decltype.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/encode_decode.hpp58
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/encode_decode_params.hpp34
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/int_encoding.hpp117
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/integral_template_param.hpp (renamed from src/third_party/boost-1.68.0/boost/typeof/integral_template_param.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/message.hpp (renamed from src/third_party/boost-1.68.0/boost/typeof/message.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/modifiers.hpp121
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/msvc/typeof_impl.hpp203
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/native.hpp60
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/pointers_data_members.hpp38
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/register_functions.hpp (renamed from src/third_party/boost-1.68.0/boost/typeof/register_functions.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/register_functions_iterate.hpp135
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/register_fundamental.hpp (renamed from src/third_party/boost-1.68.0/boost/typeof/register_fundamental.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/register_mem_functions.hpp32
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/template_encoding.hpp160
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/template_template_param.hpp149
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/type_encoding.hpp27
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/type_template_param.hpp (renamed from src/third_party/boost-1.68.0/boost/typeof/type_template_param.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/typeof.hpp (renamed from src/third_party/boost-1.68.0/boost/typeof/typeof.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/typeof_impl.hpp186
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/unsupported.hpp (renamed from src/third_party/boost-1.68.0/boost/typeof/unsupported.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/vector.hpp166
-rw-r--r--src/third_party/boost-1.69.0/boost/typeof/vector50.hpp171
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered/detail/fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered/detail/fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered/detail/implementation.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered/detail/implementation.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered/detail/map.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered/detail/map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered/detail/set.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered/detail/set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered/unordered_map.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered/unordered_map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered/unordered_map_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered/unordered_map_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered/unordered_set.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered/unordered_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered/unordered_set_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered/unordered_set_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered_map.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered_map.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/unordered_set.hpp (renamed from src/third_party/boost-1.68.0/boost/unordered_set.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility.hpp (renamed from src/third_party/boost-1.68.0/boost/utility.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/addressof.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/addressof.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/base_from_member.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/base_from_member.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/binary.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/binary.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/compare_pointees.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/compare_pointees.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/declval.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/declval.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_prefix.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/detail/in_place_factory_prefix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_suffix.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/detail/in_place_factory_suffix.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/detail/minstd_rand.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/detail/minstd_rand.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/detail/result_of_iterate.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/detail/result_of_iterate.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/enable_if.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/enable_if.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/explicit_operator_bool.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/explicit_operator_bool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/identity_type.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/identity_type.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/in_place_factory.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/in_place_factory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/result_of.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/result_of.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/string_ref.hpp555
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/string_ref_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/string_ref_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/string_view.hpp710
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/string_view_fwd.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/string_view_fwd.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/swap.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/swap.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/typed_in_place_factory.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/typed_in_place_factory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/utility/value_init.hpp (renamed from src/third_party/boost-1.68.0/boost/utility/value_init.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/version.hpp32
-rw-r--r--src/third_party/boost-1.69.0/boost/visit_each.hpp (renamed from src/third_party/boost-1.68.0/boost/visit_each.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/weak_ptr.hpp (renamed from src/third_party/boost-1.68.0/boost/weak_ptr.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/access_rights.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/access_rights.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/basic_types.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/basic_types.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/character_code_conversion.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/character_code_conversion.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/config.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/config.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/dll.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/dll.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/error_codes.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/error_codes.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/error_handling.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/error_handling.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/event.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/event.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/get_current_process.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/get_current_process.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/get_current_process_id.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/get_current_process_id.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/get_current_thread.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/get_current_thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/get_current_thread_id.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/get_current_thread_id.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/get_last_error.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/get_last_error.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/get_process_times.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/get_process_times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/get_thread_times.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/get_thread_times.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/handles.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/handles.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/heap_memory.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/heap_memory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/local_memory.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/local_memory.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/semaphore.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/semaphore.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/system.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/system.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/thread.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/thread.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/thread_pool.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/thread_pool.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/time.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/time.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/timers.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/timers.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/boost/winapi/wait.hpp (renamed from src/third_party/boost-1.68.0/boost/winapi/wait.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/align/README.md (renamed from src/third_party/boost-1.68.0/libs/align/README.md)0
-rw-r--r--src/third_party/boost-1.69.0/libs/atomic/src/lockpool.cpp (renamed from src/third_party/boost-1.68.0/libs/atomic/src/lockpool.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/bind/README.md (renamed from src/third_party/boost-1.68.0/libs/bind/README.md)0
-rw-r--r--src/third_party/boost-1.69.0/libs/bind/bind_as_compose.cpp (renamed from src/third_party/boost-1.68.0/libs/bind/bind_as_compose.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/bind/bind_visitor.cpp (renamed from src/third_party/boost-1.68.0/libs/bind/bind_visitor.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/chrono/src/chrono.cpp (renamed from src/third_party/boost-1.68.0/libs/chrono/src/chrono.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/chrono/src/process_cpu_clocks.cpp (renamed from src/third_party/boost-1.68.0/libs/chrono/src/process_cpu_clocks.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/chrono/src/thread_clock.cpp (renamed from src/third_party/boost-1.68.0/libs/chrono/src/thread_clock.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/container/Jamfile (renamed from src/third_party/boost-1.68.0/libs/container/Jamfile)0
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/alloc_lib.c (renamed from src/third_party/boost-1.68.0/libs/container/src/alloc_lib.c)0
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/dlmalloc.cpp (renamed from src/third_party/boost-1.68.0/libs/container/src/dlmalloc.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/dlmalloc_2_8_6.c6280
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/dlmalloc_ext_2_8_6.c1484
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/global_resource.cpp (renamed from src/third_party/boost-1.68.0/libs/container/src/global_resource.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/monotonic_buffer_resource.cpp (renamed from src/third_party/boost-1.68.0/libs/container/src/monotonic_buffer_resource.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/pool_resource.cpp (renamed from src/third_party/boost-1.68.0/libs/container/src/pool_resource.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/synchronized_pool_resource.cpp (renamed from src/third_party/boost-1.68.0/libs/container/src/synchronized_pool_resource.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/container/src/unsynchronized_pool_resource.cpp (renamed from src/third_party/boost-1.68.0/libs/container/src/unsynchronized_pool_resource.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/coroutine/src/detail/coroutine_context.cpp (renamed from src/third_party/boost-1.68.0/libs/coroutine/src/detail/coroutine_context.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/coroutine/src/exceptions.cpp (renamed from src/third_party/boost-1.68.0/libs/coroutine/src/exceptions.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/coroutine/src/posix/stack_traits.cpp (renamed from src/third_party/boost-1.68.0/libs/coroutine/src/posix/stack_traits.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/coroutine/src/windows/stack_traits.cpp (renamed from src/third_party/boost-1.68.0/libs/coroutine/src/windows/stack_traits.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/Jamfile (renamed from src/third_party/boost-1.68.0/libs/date_time/Jamfile)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/LICENSE (renamed from src/third_party/boost-1.68.0/libs/date_time/LICENSE)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/README.md38
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/data/README.zone_spec_csv_file (renamed from src/third_party/boost-1.68.0/libs/date_time/data/README.zone_spec_csv_file)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/data/date_time_zonespec.csv (renamed from src/third_party/boost-1.68.0/libs/date_time/data/date_time_zonespec.csv)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/src/date_time.doc (renamed from src/third_party/boost-1.68.0/libs/date_time/src/date_time.doc)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/src/gregorian/date_generators.cpp (renamed from src/third_party/boost-1.68.0/libs/date_time/src/gregorian/date_generators.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_month.cpp (renamed from src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_month.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_names.hpp (renamed from src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_names.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_weekday.cpp (renamed from src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_weekday.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/src/gregorian/gregorian_types.cpp (renamed from src/third_party/boost-1.68.0/libs/date_time/src/gregorian/gregorian_types.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/date_time/src/posix_time/posix_time_types.cpp (renamed from src/third_party/boost-1.68.0/libs/date_time/src/posix_time/posix_time_types.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/exception/src/clone_current_exception_non_intrusive.cpp (renamed from src/third_party/boost-1.68.0/libs/exception/src/clone_current_exception_non_intrusive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/README.md26
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/codecvt_error_category.cpp (renamed from src/third_party/boost-1.68.0/libs/filesystem/src/codecvt_error_category.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/operations.cpp2409
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/path.cpp (renamed from src/third_party/boost-1.68.0/libs/filesystem/src/path.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/path_traits.cpp (renamed from src/third_party/boost-1.68.0/libs/filesystem/src/path_traits.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/portability.cpp (renamed from src/third_party/boost-1.68.0/libs/filesystem/src/portability.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/unique_path.cpp177
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/utf8_codecvt_facet.cpp (renamed from src/third_party/boost-1.68.0/libs/filesystem/src/utf8_codecvt_facet.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.cpp75
-rw-r--r--src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.hpp (renamed from src/third_party/boost-1.68.0/libs/filesystem/src/windows_file_codecvt.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/function/README.md18
-rw-r--r--src/third_party/boost-1.69.0/libs/integer/README.md30
-rw-r--r--src/third_party/boost-1.69.0/libs/intrusive/Jamfile (renamed from src/third_party/boost-1.68.0/libs/intrusive/Jamfile)0
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/Jamfile11
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/LICENSE (renamed from src/third_party/boost-1.68.0/libs/function/LICENSE)0
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/README.md39
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/src/bzip2.cpp171
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/src/file_descriptor.cpp (renamed from src/third_party/boost-1.68.0/libs/iostreams/src/file_descriptor.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/src/gzip.cpp (renamed from src/third_party/boost-1.68.0/libs/iostreams/src/gzip.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/src/lzma.cpp147
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/src/mapped_file.cpp499
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/src/zlib.cpp188
-rw-r--r--src/third_party/boost-1.69.0/libs/iostreams/src/zstd.cpp166
-rw-r--r--src/third_party/boost-1.69.0/libs/optional/README.md (renamed from src/third_party/boost-1.68.0/libs/optional/README.md)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/Jamfile (renamed from src/third_party/boost-1.68.0/libs/program_options/Jamfile)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/README.md (renamed from src/third_party/boost-1.68.0/libs/program_options/README.md)0
-rwxr-xr-xsrc/third_party/boost-1.69.0/libs/program_options/ci/build.sh (renamed from src/third_party/boost-1.68.0/libs/program_options/ci/build.sh)0
-rwxr-xr-xsrc/third_party/boost-1.69.0/libs/program_options/ci/codecov.sh (renamed from src/third_party/boost-1.68.0/libs/program_options/ci/codecov.sh)0
-rwxr-xr-xsrc/third_party/boost-1.69.0/libs/program_options/ci/coverity.sh (renamed from src/third_party/boost-1.68.0/libs/program_options/ci/coverity.sh)0
-rwxr-xr-xsrc/third_party/boost-1.69.0/libs/program_options/ci/cppcheck.sh (renamed from src/third_party/boost-1.68.0/libs/program_options/ci/cppcheck.sh)0
-rwxr-xr-xsrc/third_party/boost-1.69.0/libs/program_options/ci/mingw.bat (renamed from src/third_party/boost-1.68.0/libs/program_options/ci/mingw.bat)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/cmdline.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/cmdline.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/config_file.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/config_file.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/convert.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/convert.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/options_description.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/options_description.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/parsers.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/parsers.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/positional_options.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/positional_options.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/split.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/split.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/utf8_codecvt_facet.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/utf8_codecvt_facet.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/value_semantic.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/value_semantic.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/variables_map.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/variables_map.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/program_options/src/winmain.cpp (renamed from src/third_party/boost-1.68.0/libs/program_options/src/winmain.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/random/src/random_device.cpp (renamed from src/third_party/boost-1.68.0/libs/random/src/random_device.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/c_regex_traits.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/c_regex_traits.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/cpp_regex_traits.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/cpp_regex_traits.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/cregex.cpp660
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/fileiter.cpp928
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/icu.cpp511
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/instances.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/instances.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/internals.hpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/internals.hpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/posix_api.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/posix_api.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/regex.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/regex.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/regex_debug.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/regex_debug.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/regex_raw_buffer.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/regex_raw_buffer.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/regex_traits_defaults.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/regex_traits_defaults.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/static_mutex.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/static_mutex.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/usinstances.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/usinstances.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/w32_regex_traits.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/w32_regex_traits.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/wc_regex_traits.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/wc_regex_traits.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/wide_posix_api.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/wide_posix_api.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/regex/src/winstances.cpp (renamed from src/third_party/boost-1.68.0/libs/regex/src/winstances.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/archive_exception.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/archive_exception.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_archive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_archive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_iarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_iserializer.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_iserializer.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_oarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_oserializer.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_oserializer.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_iserializer.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_pointer_iserializer.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_oserializer.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_pointer_oserializer.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_serializer_map.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_serializer_map.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_text_iprimitive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_text_iprimitive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_text_oprimitive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_text_oprimitive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_text_wiprimitive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_text_wiprimitive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_text_woprimitive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_text_woprimitive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_archive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_xml_archive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_grammar.ipp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/basic_xml_grammar.ipp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/binary_iarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/binary_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/binary_oarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/binary_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/binary_wiarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/binary_wiarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/binary_woarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/binary_woarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/codecvt_null.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/codecvt_null.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info.cpp196
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_no_rtti.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info_no_rtti.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_typeid.cpp167
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_iarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_oarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_iarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/polymorphic_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_oarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/polymorphic_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_iarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_oarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_wiarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_woarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_iarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_oarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_woarchive.cpp30
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/stl_port.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/stl_port.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/text_iarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/text_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/text_oarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/text_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/text_wiarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/text_wiarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/text_woarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/text_woarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/utf8_codecvt_facet.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/utf8_codecvt_facet.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/void_cast.cpp382
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/xml_archive_exception.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/xml_archive_exception.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/xml_grammar.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/xml_grammar.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/xml_iarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/xml_iarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/xml_oarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/xml_oarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/xml_wgrammar.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/xml_wgrammar.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/xml_wiarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/xml_wiarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/serialization/src/xml_woarchive.cpp (renamed from src/third_party/boost-1.68.0/libs/serialization/src/xml_woarchive.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/smart_ptr/README.md (renamed from src/third_party/boost-1.68.0/libs/smart_ptr/README.md)0
-rw-r--r--src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_collector.cpp (renamed from src/third_party/boost-1.68.0/libs/smart_ptr/extras/src/sp_collector.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp (renamed from src/third_party/boost-1.68.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/system/src/error_code.cpp31
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/future.cpp64
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/pthread/once.cpp (renamed from src/third_party/boost-1.68.0/libs/thread/src/pthread/once.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/pthread/once_atomic.cpp (renamed from src/third_party/boost-1.68.0/libs/thread/src/pthread/once_atomic.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/pthread/thread.cpp796
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/tss_null.cpp38
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/win32/thread.cpp977
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/win32/thread_primitives.cpp156
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/win32/tss_dll.cpp85
-rw-r--r--src/third_party/boost-1.69.0/libs/thread/src/win32/tss_pe.cpp337
-rw-r--r--src/third_party/boost-1.69.0/libs/timer/src/auto_timers_construction.cpp (renamed from src/third_party/boost-1.68.0/libs/timer/src/auto_timers_construction.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/timer/src/cpu_timer.cpp (renamed from src/third_party/boost-1.68.0/libs/timer/src/cpu_timer.cpp)0
-rw-r--r--src/third_party/boost-1.69.0/libs/unordered/_clang-format (renamed from src/third_party/boost-1.68.0/libs/unordered/_clang-format)0
-rw-r--r--src/third_party/boost-1.69.0/libs/unordered/ci/download-boost-snapshot.py (renamed from src/third_party/boost-1.68.0/libs/unordered/ci/download-boost-snapshot.py)0
-rw-r--r--src/third_party/boost-1.69.0/libs/utility/README.md24
-rw-r--r--src/third_party/boost-1.69.0/libs/utility/sublibs (renamed from src/third_party/boost-1.68.0/libs/utility/sublibs)0
-rwxr-xr-xsrc/third_party/scripts/boost_get_sources.sh2
4813 files changed, 226453 insertions, 193226 deletions
diff --git a/src/third_party/SConscript b/src/third_party/SConscript
index 86a757bb8d7..852d93235f2 100644
--- a/src/third_party/SConscript
+++ b/src/third_party/SConscript
@@ -6,7 +6,7 @@ Import("env use_system_version_of_library usemozjs get_option")
Import("wiredtiger")
Import("mobile_se")
-boostSuffix = "-1.68.0"
+boostSuffix = "-1.69.0"
snappySuffix = '-1.1.3'
zlibSuffix = '-1.2.11'
zstdSuffix = '-1.3.7'
diff --git a/src/third_party/boost-1.68.0/SConscript b/src/third_party/boost-1.68.0/SConscript
deleted file mode 100644
index 5a4ec8f5519..00000000000
--- a/src/third_party/boost-1.68.0/SConscript
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- mode: python; -*-
-
-Import("env")
-
-env = env.Clone()
-
-env.Library('boost_system', ['libs/system/src/error_code.cpp'])
-
-env.Library('boost_filesystem', [
- 'libs/filesystem/src/codecvt_error_category.cpp',
- 'libs/filesystem/src/operations.cpp',
- 'libs/filesystem/src/path.cpp',
- 'libs/filesystem/src/path_traits.cpp',
- 'libs/filesystem/src/portability.cpp',
- 'libs/filesystem/src/unique_path.cpp',
- 'libs/filesystem/src/utf8_codecvt_facet.cpp',
- 'libs/filesystem/src/windows_file_codecvt.cpp',
- ],
- LIBDEPS=[
- 'boost_system',
- ])
-
-env.Library('boost_program_options', [
- 'libs/program_options/src/cmdline.cpp',
- 'libs/program_options/src/config_file.cpp',
- 'libs/program_options/src/convert.cpp',
- 'libs/program_options/src/options_description.cpp',
- 'libs/program_options/src/parsers.cpp',
- 'libs/program_options/src/positional_options.cpp',
- 'libs/program_options/src/split.cpp',
- 'libs/program_options/src/utf8_codecvt_facet.cpp',
- 'libs/program_options/src/value_semantic.cpp',
- 'libs/program_options/src/variables_map.cpp',
- 'libs/program_options/src/winmain.cpp',
- ],
- # Because `::environ` is resolved in `/usr/lib/crt1.o` on FreeBSD, this library needs to be
- # marked `incomplete` on FreeBSD.
- LIBDEPS_TAGS=[] if not env.TargetOSIs('freebsd') else [
- 'illegal_cyclic_or_unresolved_dependencies_whitelisted',
- ])
-
-env.Library('boost_iostreams', [
- 'libs/iostreams/src/file_descriptor.cpp',
- 'libs/iostreams/src/mapped_file.cpp',
- ],
- LIBDEPS=[
- 'boost_system',
- ])
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/apply_permutation.hpp b/src/third_party/boost-1.68.0/boost/algorithm/apply_permutation.hpp
deleted file mode 100644
index c844cfcfb3b..00000000000
--- a/src/third_party/boost-1.68.0/boost/algorithm/apply_permutation.hpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- Copyright (c) Alexander Zaitsev <zamazan4ik@gmail.com>, 2017
-
- Distributed under the Boost Software License, Version 1.0. (See
- accompanying file LICENSE_1_0.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-
- See http://www.boost.org/ for latest version.
-
-
- Based on https://blogs.msdn.microsoft.com/oldnewthing/20170104-00/?p=95115
-*/
-
-/// \file apply_permutation.hpp
-/// \brief Apply permutation to a sequence.
-/// \author Alexander Zaitsev
-
-#ifndef BOOST_ALGORITHM_APPLY_PERMUTATION_HPP
-#define BOOST_ALGORITHM_APPLY_PERMUTATION_HPP
-
-#include <algorithm>
-#include <type_traits>
-
-#include <boost/range/begin.hpp>
-#include <boost/range/end.hpp>
-
-namespace boost { namespace algorithm
-{
-
-/// \fn apply_permutation ( RandomAccessIterator1 item_begin, RandomAccessIterator1 item_end, RandomAccessIterator2 ind_begin )
-/// \brief Reorder item sequence with index sequence order
-///
-/// \param item_begin The start of the item sequence
-/// \param item_end One past the end of the item sequence
-/// \param ind_begin The start of the index sequence.
-///
-/// \note Item sequence size should be equal to index size. Otherwise behavior is undefined.
-/// Complexity: O(N).
-template<typename RandomAccessIterator1, typename RandomAccessIterator2>
-void
-apply_permutation(RandomAccessIterator1 item_begin, RandomAccessIterator1 item_end,
- RandomAccessIterator2 ind_begin, RandomAccessIterator2 ind_end)
-{
- using Diff = typename std::iterator_traits<RandomAccessIterator1>::difference_type;
- using std::swap;
- Diff size = std::distance(item_begin, item_end);
- for (Diff i = 0; i < size; i++)
- {
- auto current = i;
- while (i != ind_begin[current])
- {
- auto next = ind_begin[current];
- swap(item_begin[current], item_begin[next]);
- ind_begin[current] = current;
- current = next;
- }
- ind_begin[current] = current;
- }
-}
-
-/// \fn apply_reverse_permutation ( RandomAccessIterator1 item_begin, RandomAccessIterator1 item_end, RandomAccessIterator2 ind_begin )
-/// \brief Reorder item sequence with index sequence order
-///
-/// \param item_begin The start of the item sequence
-/// \param item_end One past the end of the item sequence
-/// \param ind_begin The start of the index sequence.
-///
-/// \note Item sequence size should be equal to index size. Otherwise behavior is undefined.
-/// Complexity: O(N).
-template<typename RandomAccessIterator1, typename RandomAccessIterator2>
-void
-apply_reverse_permutation(
- RandomAccessIterator1 item_begin,
- RandomAccessIterator1 item_end,
- RandomAccessIterator2 ind_begin,
- RandomAccessIterator2 ind_end)
-{
- using Diff = typename std::iterator_traits<RandomAccessIterator2>::difference_type;
- using std::swap;
- Diff length = std::distance(item_begin, item_end);
- for (Diff i = 0; i < length; i++)
- {
- while (i != ind_begin[i])
- {
- Diff next = ind_begin[i];
- swap(item_begin[i], item_begin[next]);
- swap(ind_begin[i], ind_begin[next]);
- }
- }
-}
-
-/// \fn apply_permutation ( Range1 item_range, Range2 ind_range )
-/// \brief Reorder item sequence with index sequence order
-///
-/// \param item_range The item sequence
-/// \param ind_range The index sequence
-///
-/// \note Item sequence size should be equal to index size. Otherwise behavior is undefined.
-/// Complexity: O(N).
-template<typename Range1, typename Range2>
-void
-apply_permutation(Range1& item_range, Range2& ind_range)
-{
- apply_permutation(boost::begin(item_range), boost::end(item_range),
- boost::begin(ind_range), boost::end(ind_range));
-}
-
-/// \fn apply_reverse_permutation ( Range1 item_range, Range2 ind_range )
-/// \brief Reorder item sequence with index sequence order
-///
-/// \param item_range The item sequence
-/// \param ind_range The index sequence
-///
-/// \note Item sequence size should be equal to index size. Otherwise behavior is undefined.
-/// Complexity: O(N).
-template<typename Range1, typename Range2>
-void
-apply_reverse_permutation(Range1& item_range, Range2& ind_range)
-{
- apply_reverse_permutation(boost::begin(item_range), boost::end(item_range),
- boost::begin(ind_range), boost::end(ind_range));
-}
-
-}}
-#endif //BOOST_ALGORITHM_APPLY_PERMUTATION_HPP
diff --git a/src/third_party/boost-1.68.0/boost/align/aligned_allocator.hpp b/src/third_party/boost-1.68.0/boost/align/aligned_allocator.hpp
deleted file mode 100644
index 6176bc27c0e..00000000000
--- a/src/third_party/boost-1.68.0/boost/align/aligned_allocator.hpp
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-Copyright 2014-2015 Glen Joseph Fernandes
-(glenjofe@gmail.com)
-
-Distributed under the Boost Software License, Version 1.0.
-(http://www.boost.org/LICENSE_1_0.txt)
-*/
-#ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP
-#define BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP
-
-#include <boost/align/detail/addressof.hpp>
-#include <boost/align/detail/is_alignment_constant.hpp>
-#include <boost/align/detail/max_objects.hpp>
-#include <boost/align/detail/max_size.hpp>
-#include <boost/align/aligned_alloc.hpp>
-#include <boost/align/aligned_allocator_forward.hpp>
-#include <boost/align/alignment_of.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/throw_exception.hpp>
-#include <new>
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-#include <utility>
-#endif
-
-namespace boost {
-namespace alignment {
-
-template<class T, std::size_t Alignment>
-class aligned_allocator {
- BOOST_STATIC_ASSERT(detail::is_alignment_constant<Alignment>::value);
-
-public:
- typedef T value_type;
- typedef T* pointer;
- typedef const T* const_pointer;
- typedef void* void_pointer;
- typedef const void* const_void_pointer;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
- typedef T& reference;
- typedef const T& const_reference;
-
-private:
- enum {
- min_align = detail::max_size<Alignment,
- alignment_of<value_type>::value>::value
- };
-
-public:
- template<class U>
- struct rebind {
- typedef aligned_allocator<U, Alignment> other;
- };
-
-#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
- aligned_allocator() = default;
-#else
- aligned_allocator() BOOST_NOEXCEPT { }
-#endif
-
- template<class U>
- aligned_allocator(const aligned_allocator<U, Alignment>&)
- BOOST_NOEXCEPT { }
-
- pointer address(reference value) const BOOST_NOEXCEPT {
- return detail::addressof(value);
- }
-
- const_pointer address(const_reference value) const BOOST_NOEXCEPT {
- return detail::addressof(value);
- }
-
- pointer allocate(size_type size, const_void_pointer = 0) {
- if (size == 0) {
- return 0;
- }
- void* p = aligned_alloc(min_align, sizeof(T) * size);
- if (!p) {
- boost::throw_exception(std::bad_alloc());
- }
- return static_cast<T*>(p);
- }
-
- void deallocate(pointer ptr, size_type) {
- boost::alignment::aligned_free(ptr);
- }
-
- BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT {
- return detail::max_objects<T>::value;
- }
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template<class U, class... Args>
- void construct(U* ptr, Args&&... args) {
- ::new((void*)ptr) U(std::forward<Args>(args)...);
- }
-#else
- template<class U, class V>
- void construct(U* ptr, V&& value) {
- ::new((void*)ptr) U(std::forward<V>(value));
- }
-#endif
-#else
- template<class U, class V>
- void construct(U* ptr, const V& value) {
- ::new((void*)ptr) U(value);
- }
-#endif
-
- template<class U>
- void construct(U* ptr) {
- ::new((void*)ptr) U();
- }
-
- template<class U>
- void destroy(U* ptr) {
- (void)ptr;
- ptr->~U();
- }
-};
-
-template<std::size_t Alignment>
-class aligned_allocator<void, Alignment> {
- BOOST_STATIC_ASSERT(detail::is_alignment_constant<Alignment>::value);
-
-public:
- typedef void value_type;
- typedef void* pointer;
- typedef const void* const_pointer;
-
- template<class U>
- struct rebind {
- typedef aligned_allocator<U, Alignment> other;
- };
-};
-
-template<class T, class U, std::size_t Alignment>
-inline bool
-operator==(const aligned_allocator<T, Alignment>&,
- const aligned_allocator<U, Alignment>&) BOOST_NOEXCEPT
-{
- return true;
-}
-
-template<class T, class U, std::size_t Alignment>
-inline bool
-operator!=(const aligned_allocator<T, Alignment>&,
- const aligned_allocator<U, Alignment>&) BOOST_NOEXCEPT
-{
- return false;
-}
-
-} /* alignment */
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/align/aligned_allocator_adaptor.hpp b/src/third_party/boost-1.68.0/boost/align/aligned_allocator_adaptor.hpp
deleted file mode 100644
index 86b2d934f6b..00000000000
--- a/src/third_party/boost-1.68.0/boost/align/aligned_allocator_adaptor.hpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
-Copyright 2014-2016 Glen Joseph Fernandes
-(glenjofe@gmail.com)
-
-Distributed under the Boost Software License, Version 1.0.
-(http://www.boost.org/LICENSE_1_0.txt)
-*/
-#ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP
-#define BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP
-
-#include <boost/align/detail/is_alignment_constant.hpp>
-#include <boost/align/detail/max_align.hpp>
-#include <boost/align/detail/max_size.hpp>
-#include <boost/align/align.hpp>
-#include <boost/align/aligned_allocator_adaptor_forward.hpp>
-#include <boost/align/alignment_of.hpp>
-#include <boost/core/pointer_traits.hpp>
-#include <boost/static_assert.hpp>
-#include <new>
-
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
-#include <memory>
-#endif
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-#include <utility>
-#endif
-
-namespace boost {
-namespace alignment {
-
-template<class Allocator, std::size_t Alignment>
-class aligned_allocator_adaptor
- : public Allocator {
- BOOST_STATIC_ASSERT(detail::is_alignment_constant<Alignment>::value);
-
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef std::allocator_traits<Allocator> traits;
- typedef typename traits::template rebind_alloc<char> char_alloc;
- typedef typename traits::template rebind_traits<char> char_traits;
- typedef typename char_traits::pointer char_ptr;
-#else
- typedef typename Allocator::template rebind<char>::other char_alloc;
- typedef typename char_alloc::pointer char_ptr;
-#endif
-
-public:
- typedef typename Allocator::value_type value_type;
- typedef value_type* pointer;
- typedef const value_type* const_pointer;
- typedef void* void_pointer;
- typedef const void* const_void_pointer;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
-private:
- enum {
- min_align = detail::max_size<Alignment,
- detail::max_align<value_type, char_ptr>::value>::value
- };
-
-public:
- template<class U>
- struct rebind {
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef aligned_allocator_adaptor<typename traits::template
- rebind_alloc<U>, Alignment> other;
-#else
- typedef aligned_allocator_adaptor<typename Allocator::template
- rebind<U>::other, Alignment> other;
-#endif
- };
-
-#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
- aligned_allocator_adaptor() = default;
-#else
- aligned_allocator_adaptor()
- : Allocator() { }
-#endif
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- template<class A>
- explicit aligned_allocator_adaptor(A&& alloc) BOOST_NOEXCEPT
- : Allocator(std::forward<A>(alloc)) { }
-#else
- template<class A>
- explicit aligned_allocator_adaptor(const A& alloc) BOOST_NOEXCEPT
- : Allocator(alloc) { }
-#endif
-
- template<class U>
- aligned_allocator_adaptor(const aligned_allocator_adaptor<U,
- Alignment>& other) BOOST_NOEXCEPT
- : Allocator(other.base()) { }
-
- Allocator& base() BOOST_NOEXCEPT {
- return static_cast<Allocator&>(*this);
- }
-
- const Allocator& base() const BOOST_NOEXCEPT {
- return static_cast<const Allocator&>(*this);
- }
-
- pointer allocate(size_type size) {
- std::size_t s = size * sizeof(value_type);
- std::size_t n = s + min_align - 1;
- char_alloc a(base());
- char_ptr p = a.allocate(sizeof p + n);
- void* r = boost::to_address(p) + sizeof p;
- (void)align(min_align, s, r, n);
- ::new(static_cast<void*>(static_cast<char_ptr*>(r) - 1)) char_ptr(p);
- return static_cast<pointer>(r);
- }
-
- pointer allocate(size_type size, const_void_pointer hint) {
- std::size_t s = size * sizeof(value_type);
- std::size_t n = s + min_align - 1;
- char_ptr h = char_ptr();
- if (hint) {
- h = *(static_cast<const char_ptr*>(hint) - 1);
- }
- char_alloc a(base());
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
- char_ptr p = char_traits::allocate(a, sizeof p + n, h);
-#else
- char_ptr p = a.allocate(sizeof p + n, h);
-#endif
- void* r = boost::to_address(p) + sizeof p;
- (void)align(min_align, s, r, n);
- ::new(static_cast<void*>(static_cast<char_ptr*>(r) - 1)) char_ptr(p);
- return static_cast<pointer>(r);
- }
-
- void deallocate(pointer ptr, size_type size) {
- char_ptr* p = reinterpret_cast<char_ptr*>(ptr) - 1;
- char_ptr r = *p;
- p->~char_ptr();
- char_alloc a(base());
- a.deallocate(r, sizeof r + size * sizeof(value_type) + min_align - 1);
- }
-};
-
-template<class A, class B, std::size_t Alignment>
-inline bool
-operator==(const aligned_allocator_adaptor<A, Alignment>& a,
- const aligned_allocator_adaptor<B, Alignment>& b) BOOST_NOEXCEPT
-{
- return a.base() == b.base();
-}
-
-template<class A, class B, std::size_t Alignment>
-inline bool
-operator!=(const aligned_allocator_adaptor<A, Alignment>& a,
- const aligned_allocator_adaptor<B, Alignment>& b) BOOST_NOEXCEPT
-{
- return !(a == b);
-}
-
-} /* alignment */
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc.hpp b/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc.hpp
deleted file mode 100644
index 69da19659a6..00000000000
--- a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Copyright 2014-2015 Glen Joseph Fernandes
-(glenjofe@gmail.com)
-
-Distributed under the Boost Software License, Version 1.0.
-(http://www.boost.org/LICENSE_1_0.txt)
-*/
-#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP
-#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP
-
-#include <boost/align/detail/is_alignment.hpp>
-#include <boost/align/align.hpp>
-#include <boost/align/alignment_of.hpp>
-#include <boost/assert.hpp>
-#include <cstdlib>
-
-namespace boost {
-namespace alignment {
-
-inline void*
-aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
-{
- BOOST_ASSERT(detail::is_alignment(alignment));
- enum {
- N = alignment_of<void*>::value
- };
- if (alignment < N) {
- alignment = N;
- }
- std::size_t n = size + alignment - N;
- void* p = std::malloc(sizeof(void*) + n);
- if (p) {
- void* r = static_cast<char*>(p) + sizeof(void*);
- (void)align(alignment, size, r, n);
- *(static_cast<void**>(r) - 1) = p;
- p = r;
- }
- return p;
-}
-
-inline void
-aligned_free(void* ptr) BOOST_NOEXCEPT
-{
- if (ptr) {
- std::free(*(static_cast<void**>(ptr) - 1));
- }
-}
-
-} /* alignment */
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/any.hpp b/src/third_party/boost-1.68.0/boost/any.hpp
deleted file mode 100644
index 9f6b3132744..00000000000
--- a/src/third_party/boost-1.68.0/boost/any.hpp
+++ /dev/null
@@ -1,337 +0,0 @@
-// See http://www.boost.org/libs/any for Documentation.
-
-#ifndef BOOST_ANY_INCLUDED
-#define BOOST_ANY_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-// what: variant type boost::any
-// who: contributed by Kevlin Henney,
-// with features contributed and bugs found by
-// Antony Polukhin, Ed Brey, Mark Rodgers,
-// Peter Dimov, and James Curran
-// when: July 2001, April 2013 - May 2013
-
-#include <algorithm>
-
-#include <boost/config.hpp>
-#include <boost/type_index.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/decay.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/core/addressof.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/mpl/if.hpp>
-
-namespace boost
-{
- class any
- {
- public: // structors
-
- any() BOOST_NOEXCEPT
- : content(0)
- {
- }
-
- template<typename ValueType>
- any(const ValueType & value)
- : content(new holder<
- BOOST_DEDUCED_TYPENAME remove_cv<BOOST_DEDUCED_TYPENAME decay<const ValueType>::type>::type
- >(value))
- {
- }
-
- any(const any & other)
- : content(other.content ? other.content->clone() : 0)
- {
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- // Move constructor
- any(any&& other) BOOST_NOEXCEPT
- : content(other.content)
- {
- other.content = 0;
- }
-
- // Perfect forwarding of ValueType
- template<typename ValueType>
- any(ValueType&& value
- , typename boost::disable_if<boost::is_same<any&, ValueType> >::type* = 0 // disable if value has type `any&`
- , typename boost::disable_if<boost::is_const<ValueType> >::type* = 0) // disable if value has type `const ValueType&&`
- : content(new holder< typename decay<ValueType>::type >(static_cast<ValueType&&>(value)))
- {
- }
-#endif
-
- ~any() BOOST_NOEXCEPT
- {
- delete content;
- }
-
- public: // modifiers
-
- any & swap(any & rhs) BOOST_NOEXCEPT
- {
- std::swap(content, rhs.content);
- return *this;
- }
-
-
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
- template<typename ValueType>
- any & operator=(const ValueType & rhs)
- {
- any(rhs).swap(*this);
- return *this;
- }
-
- any & operator=(any rhs)
- {
- any(rhs).swap(*this);
- return *this;
- }
-
-#else
- any & operator=(const any& rhs)
- {
- any(rhs).swap(*this);
- return *this;
- }
-
- // move assignement
- any & operator=(any&& rhs) BOOST_NOEXCEPT
- {
- rhs.swap(*this);
- any().swap(rhs);
- return *this;
- }
-
- // Perfect forwarding of ValueType
- template <class ValueType>
- any & operator=(ValueType&& rhs)
- {
- any(static_cast<ValueType&&>(rhs)).swap(*this);
- return *this;
- }
-#endif
-
- public: // queries
-
- bool empty() const BOOST_NOEXCEPT
- {
- return !content;
- }
-
- void clear() BOOST_NOEXCEPT
- {
- any().swap(*this);
- }
-
- const boost::typeindex::type_info& type() const BOOST_NOEXCEPT
- {
- return content ? content->type() : boost::typeindex::type_id<void>().type_info();
- }
-
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
- private: // types
-#else
- public: // types (public so any_cast can be non-friend)
-#endif
-
- class placeholder
- {
- public: // structors
-
- virtual ~placeholder()
- {
- }
-
- public: // queries
-
- virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT = 0;
-
- virtual placeholder * clone() const = 0;
-
- };
-
- template<typename ValueType>
- class holder : public placeholder
- {
- public: // structors
-
- holder(const ValueType & value)
- : held(value)
- {
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- holder(ValueType&& value)
- : held(static_cast< ValueType&& >(value))
- {
- }
-#endif
- public: // queries
-
- virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT
- {
- return boost::typeindex::type_id<ValueType>().type_info();
- }
-
- virtual placeholder * clone() const
- {
- return new holder(held);
- }
-
- public: // representation
-
- ValueType held;
-
- private: // intentionally left unimplemented
- holder & operator=(const holder &);
- };
-
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-
- private: // representation
-
- template<typename ValueType>
- friend ValueType * any_cast(any *) BOOST_NOEXCEPT;
-
- template<typename ValueType>
- friend ValueType * unsafe_any_cast(any *) BOOST_NOEXCEPT;
-
-#else
-
- public: // representation (public so any_cast can be non-friend)
-
-#endif
-
- placeholder * content;
-
- };
-
- inline void swap(any & lhs, any & rhs) BOOST_NOEXCEPT
- {
- lhs.swap(rhs);
- }
-
- class BOOST_SYMBOL_VISIBLE bad_any_cast :
-#ifndef BOOST_NO_RTTI
- public std::bad_cast
-#else
- public std::exception
-#endif
- {
- public:
- virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- return "boost::bad_any_cast: "
- "failed conversion using boost::any_cast";
- }
- };
-
- template<typename ValueType>
- ValueType * any_cast(any * operand) BOOST_NOEXCEPT
- {
- return operand && operand->type() == boost::typeindex::type_id<ValueType>()
- ? boost::addressof(
- static_cast<any::holder<BOOST_DEDUCED_TYPENAME remove_cv<ValueType>::type> *>(operand->content)->held
- )
- : 0;
- }
-
- template<typename ValueType>
- inline const ValueType * any_cast(const any * operand) BOOST_NOEXCEPT
- {
- return any_cast<ValueType>(const_cast<any *>(operand));
- }
-
- template<typename ValueType>
- ValueType any_cast(any & operand)
- {
- typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
-
-
- nonref * result = any_cast<nonref>(boost::addressof(operand));
- if(!result)
- boost::throw_exception(bad_any_cast());
-
- // Attempt to avoid construction of a temporary object in cases when
- // `ValueType` is not a reference. Example:
- // `static_cast<std::string>(*result);`
- // which is equal to `std::string(*result);`
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
- boost::is_reference<ValueType>,
- ValueType,
- BOOST_DEDUCED_TYPENAME boost::add_reference<ValueType>::type
- >::type ref_type;
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local!
-#endif
- return static_cast<ref_type>(*result);
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
- }
-
- template<typename ValueType>
- inline ValueType any_cast(const any & operand)
- {
- typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
- return any_cast<const nonref &>(const_cast<any &>(operand));
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- template<typename ValueType>
- inline ValueType any_cast(any&& operand)
- {
- BOOST_STATIC_ASSERT_MSG(
- boost::is_rvalue_reference<ValueType&&>::value /*true if ValueType is rvalue or just a value*/
- || boost::is_const< typename boost::remove_reference<ValueType>::type >::value,
- "boost::any_cast shall not be used for getting nonconst references to temporary objects"
- );
- return any_cast<ValueType>(operand);
- }
-#endif
-
-
- // Note: The "unsafe" versions of any_cast are not part of the
- // public interface and may be removed at any time. They are
- // required where we know what type is stored in the any and can't
- // use typeid() comparison, e.g., when our types may travel across
- // different shared libraries.
- template<typename ValueType>
- inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT
- {
- return boost::addressof(
- static_cast<any::holder<ValueType> *>(operand->content)->held
- );
- }
-
- template<typename ValueType>
- inline const ValueType * unsafe_any_cast(const any * operand) BOOST_NOEXCEPT
- {
- return unsafe_any_cast<ValueType>(const_cast<any *>(operand));
- }
-}
-
-// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_binary_iarchive.hpp b/src/third_party/boost-1.68.0/boost/archive/basic_binary_iarchive.hpp
deleted file mode 100644
index c0cc655c997..00000000000
--- a/src/third_party/boost-1.68.0/boost/archive/basic_binary_iarchive.hpp
+++ /dev/null
@@ -1,204 +0,0 @@
-#ifndef BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
-#define BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
-
-// MS compatible compilers support #pragma once
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// basic_binary_iarchive.hpp
-//
-// archives stored as native binary - this should be the fastest way
-// to archive the state of a group of obects. It makes no attempt to
-// convert to any canonical form.
-
-// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
-// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#include <boost/archive/basic_archive.hpp>
-#include <boost/archive/detail/common_iarchive.hpp>
-#include <boost/serialization/collection_size_type.hpp>
-#include <boost/serialization/string.hpp>
-#include <boost/serialization/item_version_type.hpp>
-#include <boost/integer_traits.hpp>
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
-
-namespace boost {
-namespace archive {
-
-namespace detail {
- template<class Archive> class interface_iarchive;
-} // namespace detail
-
-/////////////////////////////////////////////////////////////////////////
-// class basic_binary_iarchive - read serialized objects from a input binary stream
-template<class Archive>
-class BOOST_SYMBOL_VISIBLE basic_binary_iarchive :
- public detail::common_iarchive<Archive>
-{
-#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-public:
-#else
-protected:
- #if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
- // for some inexplicable reason insertion of "class" generates compile erro
- // on msvc 7.1
- friend detail::interface_iarchive<Archive>;
- #else
- friend class detail::interface_iarchive<Archive>;
- #endif
-#endif
- // intermediate level to support override of operators
- // fot templates in the absence of partial function
- // template ordering. If we get here pass to base class
- // note extra nonsense to sneak it pass the borland compiers
- typedef detail::common_iarchive<Archive> detail_common_iarchive;
- template<class T>
- void load_override(T & t){
- this->detail_common_iarchive::load_override(t);
- }
-
- // include these to trap a change in binary format which
- // isn't specifically handled
- // upto 32K classes
- BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t));
- BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t));
- // upto 2G objects
- BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t));
- BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t));
-
- // binary files don't include the optional information
- void load_override(class_id_optional_type & /* t */){}
-
- void load_override(tracking_type & t, int /*version*/){
- library_version_type lvt = this->get_library_version();
- if(boost::archive::library_version_type(6) < lvt){
- int_least8_t x=0;
- * this->This() >> x;
- t = boost::archive::tracking_type(x);
- }
- else{
- bool x=0;
- * this->This() >> x;
- t = boost::archive::tracking_type(x);
- }
- }
- void load_override(class_id_type & t){
- library_version_type lvt = this->get_library_version();
- if(boost::archive::library_version_type(7) < lvt){
- this->detail_common_iarchive::load_override(t);
- }
- else
- if(boost::archive::library_version_type(6) < lvt){
- int_least16_t x=0;
- * this->This() >> x;
- t = boost::archive::class_id_type(x);
- }
- else{
- int x=0;
- * this->This() >> x;
- t = boost::archive::class_id_type(x);
- }
- }
- void load_override(class_id_reference_type & t){
- load_override(static_cast<class_id_type &>(t));
- }
-
- void load_override(version_type & t){
- library_version_type lvt = this->get_library_version();
- if(boost::archive::library_version_type(7) < lvt){
- this->detail_common_iarchive::load_override(t);
- }
- else
- if(boost::archive::library_version_type(6) < lvt){
- uint_least8_t x=0;
- * this->This() >> x;
- t = boost::archive::version_type(x);
- }
- else
- if(boost::archive::library_version_type(5) < lvt){
- uint_least16_t x=0;
- * this->This() >> x;
- t = boost::archive::version_type(x);
- }
- else
- if(boost::archive::library_version_type(2) < lvt){
- // upto 255 versions
- unsigned char x=0;
- * this->This() >> x;
- t = version_type(x);
- }
- else{
- unsigned int x=0;
- * this->This() >> x;
- t = boost::archive::version_type(x);
- }
- }
-
- void load_override(boost::serialization::item_version_type & t){
- library_version_type lvt = this->get_library_version();
-// if(boost::archive::library_version_type(7) < lvt){
- if(boost::archive::library_version_type(6) < lvt){
- this->detail_common_iarchive::load_override(t);
- }
- else
- if(boost::archive::library_version_type(6) < lvt){
- uint_least16_t x=0;
- * this->This() >> x;
- t = boost::serialization::item_version_type(x);
- }
- else{
- unsigned int x=0;
- * this->This() >> x;
- t = boost::serialization::item_version_type(x);
- }
- }
-
- void load_override(serialization::collection_size_type & t){
- if(boost::archive::library_version_type(5) < this->get_library_version()){
- this->detail_common_iarchive::load_override(t);
- }
- else{
- unsigned int x=0;
- * this->This() >> x;
- t = serialization::collection_size_type(x);
- }
- }
-
- BOOST_ARCHIVE_OR_WARCHIVE_DECL void
- load_override(class_name_type & t);
- BOOST_ARCHIVE_OR_WARCHIVE_DECL void
- init();
-
- basic_binary_iarchive(unsigned int flags) :
- detail::common_iarchive<Archive>(flags)
- {}
-};
-
-} // namespace archive
-} // namespace boost
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
-
-#endif // BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/iserializer.hpp b/src/third_party/boost-1.68.0/boost/archive/detail/iserializer.hpp
deleted file mode 100644
index 6c2fd67ddd0..00000000000
--- a/src/third_party/boost-1.68.0/boost/archive/detail/iserializer.hpp
+++ /dev/null
@@ -1,632 +0,0 @@
-#ifndef BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP
-#define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP
-
-// MS compatible compilers support #pragma once
-#if defined(_MSC_VER)
-# pragma once
-#pragma inline_depth(511)
-#pragma inline_recursion(on)
-#endif
-
-#if defined(__MWERKS__)
-#pragma inline_depth(511)
-#endif
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// iserializer.hpp: interface for serialization system.
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#include <new> // for placement new
-#include <cstddef> // size_t, NULL
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{
- using ::size_t;
-} // namespace std
-#endif
-
-#include <boost/static_assert.hpp>
-
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/greater_equal.hpp>
-#include <boost/mpl/equal_to.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-
-#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
- #include <boost/serialization/extended_type_info_typeid.hpp>
-#endif
-#include <boost/serialization/throw_exception.hpp>
-#include <boost/serialization/smart_cast.hpp>
-#include <boost/serialization/static_warning.hpp>
-
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/type_traits/is_enum.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_extent.hpp>
-#include <boost/type_traits/is_polymorphic.hpp>
-
-#include <boost/serialization/assume_abstract.hpp>
-
-#if !defined(BOOST_MSVC) && \
- (BOOST_WORKAROUND(__IBMCPP__, < 1210) || \
- defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590))
- #define DONT_USE_HAS_NEW_OPERATOR 1
-#else
- #define DONT_USE_HAS_NEW_OPERATOR 0
-#endif
-
-#if ! DONT_USE_HAS_NEW_OPERATOR
-#include <boost/type_traits/has_new_operator.hpp>
-#endif
-
-#include <boost/serialization/serialization.hpp>
-#include <boost/serialization/version.hpp>
-#include <boost/serialization/level.hpp>
-#include <boost/serialization/tracking.hpp>
-#include <boost/serialization/type_info_implementation.hpp>
-#include <boost/serialization/nvp.hpp>
-#include <boost/serialization/void_cast.hpp>
-#include <boost/serialization/collection_size_type.hpp>
-#include <boost/serialization/singleton.hpp>
-#include <boost/serialization/wrapper.hpp>
-#include <boost/serialization/array_wrapper.hpp>
-
-// the following is need only for dynamic cast of polymorphic pointers
-#include <boost/archive/archive_exception.hpp>
-#include <boost/archive/detail/basic_iarchive.hpp>
-#include <boost/archive/detail/basic_iserializer.hpp>
-#include <boost/archive/detail/basic_pointer_iserializer.hpp>
-#include <boost/archive/detail/archive_serializer_map.hpp>
-#include <boost/archive/detail/check.hpp>
-
-#include <boost/core/addressof.hpp>
-
-namespace boost {
-
-namespace serialization {
- class extended_type_info;
-} // namespace serialization
-
-namespace archive {
-
-// an accessor to permit friend access to archives. Needed because
-// some compilers don't handle friend templates completely
-class load_access {
-public:
- template<class Archive, class T>
- static void load_primitive(Archive &ar, T &t){
- ar.load(t);
- }
-};
-
-namespace detail {
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-template<class Archive, class T>
-class iserializer : public basic_iserializer
-{
-private:
- virtual void destroy(/*const*/ void *address) const {
- boost::serialization::access::destroy(static_cast<T *>(address));
- }
-protected:
- // protected constructor since it's always created by singleton
- explicit iserializer() :
- basic_iserializer(
- boost::serialization::singleton<
- typename
- boost::serialization::type_info_implementation< T >::type
- >::get_const_instance()
- )
- {}
-public:
- virtual BOOST_DLLEXPORT void load_object_data(
- basic_iarchive & ar,
- void *x,
- const unsigned int file_version
- ) const BOOST_USED;
- virtual bool class_info() const {
- return boost::serialization::implementation_level< T >::value
- >= boost::serialization::object_class_info;
- }
- virtual bool tracking(const unsigned int /* flags */) const {
- return boost::serialization::tracking_level< T >::value
- == boost::serialization::track_always
- || ( boost::serialization::tracking_level< T >::value
- == boost::serialization::track_selectively
- && serialized_as_pointer());
- }
- virtual version_type version() const {
- return version_type(::boost::serialization::version< T >::value);
- }
- virtual bool is_polymorphic() const {
- return boost::is_polymorphic< T >::value;
- }
- virtual ~iserializer(){};
-};
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-template<class Archive, class T>
-BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
- basic_iarchive & ar,
- void *x,
- const unsigned int file_version
-) const {
- // note: we now comment this out. Before we permited archive
- // version # to be very large. Now we don't. To permit
- // readers of these old archives, we have to suppress this
- // code. Perhaps in the future we might re-enable it but
- // permit its suppression with a runtime switch.
- #if 0
- // trap case where the program cannot handle the current version
- if(file_version > static_cast<const unsigned int>(version()))
- boost::serialization::throw_exception(
- archive::archive_exception(
- boost::archive::archive_exception::unsupported_class_version,
- get_debug_info()
- )
- );
- #endif
- // make sure call is routed through the higest interface that might
- // be specialized by the user.
- boost::serialization::serialize_adl(
- boost::serialization::smart_cast_reference<Archive &>(ar),
- * static_cast<T *>(x),
- file_version
- );
-}
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-// the purpose of this code is to allocate memory for an object
-// without requiring the constructor to be called. Presumably
-// the allocated object will be subsequently initialized with
-// "placement new".
-// note: we have the boost type trait has_new_operator but we
-// have no corresponding has_delete_operator. So we presume
-// that the former being true would imply that the a delete
-// operator is also defined for the class T.
-
-template<class T>
-struct heap_allocation {
- // boost::has_new_operator< T > doesn't work on these compilers
- #if DONT_USE_HAS_NEW_OPERATOR
- // This doesn't handle operator new overload for class T
- static T * invoke_new(){
- return static_cast<T *>(operator new(sizeof(T)));
- }
- static void invoke_delete(T *t){
- (operator delete(t));
- }
- #else
- // note: we presume that a true value for has_new_operator
- // implies the existence of a class specific delete operator as well
- // as a class specific new operator.
- struct has_new_operator {
- static T * invoke_new() {
- return static_cast<T *>((T::operator new)(sizeof(T)));
- }
- static void invoke_delete(T * t) {
- // if compilation fails here, the likely cause that the class
- // T has a class specific new operator but no class specific
- // delete operator which matches the following signature.
- // note that this solution addresses the issue that two
- // possible signatures. But it doesn't address the possibility
- // that the class might have class specific new with NO
- // class specific delete at all. Patches (compatible with
- // C++03) welcome!
- (operator delete)(t);
- }
- };
- struct doesnt_have_new_operator {
- static T* invoke_new() {
- return static_cast<T *>(operator new(sizeof(T)));
- }
- static void invoke_delete(T * t) {
- // Note: I'm reliance upon automatic conversion from T * to void * here
- (operator delete)(t);
- }
- };
- static T * invoke_new() {
- typedef typename
- mpl::eval_if<
- boost::has_new_operator< T >,
- mpl::identity<has_new_operator >,
- mpl::identity<doesnt_have_new_operator >
- >::type typex;
- return typex::invoke_new();
- }
- static void invoke_delete(T *t) {
- typedef typename
- mpl::eval_if<
- boost::has_new_operator< T >,
- mpl::identity<has_new_operator >,
- mpl::identity<doesnt_have_new_operator >
- >::type typex;
- typex::invoke_delete(t);
- }
- #endif
- explicit heap_allocation(){
- m_p = invoke_new();
- }
- ~heap_allocation(){
- if (0 != m_p)
- invoke_delete(m_p);
- }
- T* get() const {
- return m_p;
- }
-
- T* release() {
- T* p = m_p;
- m_p = 0;
- return p;
- }
-private:
- T* m_p;
-};
-
-template<class Archive, class T>
-class pointer_iserializer :
- public basic_pointer_iserializer
-{
-private:
- virtual void * heap_allocation() const {
- detail::heap_allocation<T> h;
- T * t = h.get();
- h.release();
- return t;
- }
- virtual const basic_iserializer & get_basic_serializer() const {
- return boost::serialization::singleton<
- iserializer<Archive, T>
- >::get_const_instance();
- }
- BOOST_DLLEXPORT virtual void load_object_ptr(
- basic_iarchive & ar,
- void * x,
- const unsigned int file_version
- ) const BOOST_USED;
-protected:
- // this should alway be a singleton so make the constructor protected
- pointer_iserializer();
- ~pointer_iserializer();
-};
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-// note: BOOST_DLLEXPORT is so that code for polymorphic class
-// serialized only through base class won't get optimized out
-template<class Archive, class T>
-BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
- basic_iarchive & ar,
- void * t,
- const unsigned int file_version
-) const
-{
- Archive & ar_impl =
- boost::serialization::smart_cast_reference<Archive &>(ar);
-
- // note that the above will throw std::bad_alloc if the allocation
- // fails so we don't have to address this contingency here.
-
- // catch exception during load_construct_data so that we don't
- // automatically delete the t which is most likely not fully
- // constructed
- BOOST_TRY {
- // this addresses an obscure situation that occurs when
- // load_constructor de-serializes something through a pointer.
- ar.next_object_pointer(t);
- boost::serialization::load_construct_data_adl<Archive, T>(
- ar_impl,
- static_cast<T *>(t),
- file_version
- );
- }
- BOOST_CATCH(...){
- // if we get here the load_construct failed. The heap_allocation
- // will be automatically deleted so we don't have to do anything
- // special here.
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
-
- ar_impl >> boost::serialization::make_nvp(NULL, * static_cast<T *>(t));
-}
-
-template<class Archive, class T>
-pointer_iserializer<Archive, T>::pointer_iserializer() :
- basic_pointer_iserializer(
- boost::serialization::singleton<
- typename
- boost::serialization::type_info_implementation< T >::type
- >::get_const_instance()
- )
-{
- boost::serialization::singleton<
- iserializer<Archive, T>
- >::get_mutable_instance().set_bpis(this);
- archive_serializer_map<Archive>::insert(this);
-}
-
-template<class Archive, class T>
-pointer_iserializer<Archive, T>::~pointer_iserializer(){
- archive_serializer_map<Archive>::erase(this);
-}
-
-template<class Archive>
-struct load_non_pointer_type {
- // note this bounces the call right back to the archive
- // with no runtime overhead
- struct load_primitive {
- template<class T>
- static void invoke(Archive & ar, T & t){
- load_access::load_primitive(ar, t);
- }
- };
- // note this bounces the call right back to the archive
- // with no runtime overhead
- struct load_only {
- template<class T>
- static void invoke(Archive & ar, const T & t){
- // short cut to user's serializer
- // make sure call is routed through the higest interface that might
- // be specialized by the user.
- boost::serialization::serialize_adl(
- ar,
- const_cast<T &>(t),
- boost::serialization::version< T >::value
- );
- }
- };
-
- // note this save class information including version
- // and serialization level to the archive
- struct load_standard {
- template<class T>
- static void invoke(Archive &ar, const T & t){
- void * x = boost::addressof(const_cast<T &>(t));
- ar.load_object(
- x,
- boost::serialization::singleton<
- iserializer<Archive, T>
- >::get_const_instance()
- );
- }
- };
-
- struct load_conditional {
- template<class T>
- static void invoke(Archive &ar, T &t){
- //if(0 == (ar.get_flags() & no_tracking))
- load_standard::invoke(ar, t);
- //else
- // load_only::invoke(ar, t);
- }
- };
-
- template<class T>
- static void invoke(Archive & ar, T &t){
- typedef typename mpl::eval_if<
- // if its primitive
- mpl::equal_to<
- boost::serialization::implementation_level< T >,
- mpl::int_<boost::serialization::primitive_type>
- >,
- mpl::identity<load_primitive>,
- // else
- typename mpl::eval_if<
- // class info / version
- mpl::greater_equal<
- boost::serialization::implementation_level< T >,
- mpl::int_<boost::serialization::object_class_info>
- >,
- // do standard load
- mpl::identity<load_standard>,
- // else
- typename mpl::eval_if<
- // no tracking
- mpl::equal_to<
- boost::serialization::tracking_level< T >,
- mpl::int_<boost::serialization::track_never>
- >,
- // do a fast load
- mpl::identity<load_only>,
- // else
- // do a fast load only tracking is turned off
- mpl::identity<load_conditional>
- > > >::type typex;
- check_object_versioning< T >();
- check_object_level< T >();
- typex::invoke(ar, t);
- }
-};
-
-template<class Archive>
-struct load_pointer_type {
- struct abstract
- {
- template<class T>
- static const basic_pointer_iserializer * register_type(Archive & /* ar */){
- // it has? to be polymorphic
- BOOST_STATIC_ASSERT(boost::is_polymorphic< T >::value);
- return static_cast<basic_pointer_iserializer *>(NULL);
- }
- };
-
- struct non_abstract
- {
- template<class T>
- static const basic_pointer_iserializer * register_type(Archive & ar){
- return ar.register_type(static_cast<T *>(NULL));
- }
- };
-
- template<class T>
- static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){
- // there should never be any need to load an abstract polymorphic
- // class pointer. Inhibiting code generation for this
- // permits abstract base classes to be used - note: exception
- // virtual serialize functions used for plug-ins
- typedef typename
- mpl::eval_if<
- boost::serialization::is_abstract<const T>,
- boost::mpl::identity<abstract>,
- boost::mpl::identity<non_abstract>
- >::type typex;
- return typex::template register_type< T >(ar);
- }
-
- template<class T>
- static T * pointer_tweak(
- const boost::serialization::extended_type_info & eti,
- void const * const t,
- const T &
- ) {
- // tweak the pointer back to the base class
- void * upcast = const_cast<void *>(
- boost::serialization::void_upcast(
- eti,
- boost::serialization::singleton<
- typename
- boost::serialization::type_info_implementation< T >::type
- >::get_const_instance(),
- t
- )
- );
- if(NULL == upcast)
- boost::serialization::throw_exception(
- archive_exception(archive_exception::unregistered_class)
- );
- return static_cast<T *>(upcast);
- }
-
- template<class T>
- static void check_load(T * const /* t */){
- check_pointer_level< T >();
- check_pointer_tracking< T >();
- }
-
- static const basic_pointer_iserializer *
- find(const boost::serialization::extended_type_info & type){
- return static_cast<const basic_pointer_iserializer *>(
- archive_serializer_map<Archive>::find(type)
- );
- }
-
- template<class Tptr>
- static void invoke(Archive & ar, Tptr & t){
- check_load(t);
- const basic_pointer_iserializer * bpis_ptr = register_type(ar, t);
- const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer(
- // note major hack here !!!
- // I tried every way to convert Tptr &t (where Tptr might
- // include const) to void * &. This is the only way
- // I could make it work. RR
- (void * & )t,
- bpis_ptr,
- find
- );
- // if the pointer isn't that of the base class
- if(newbpis_ptr != bpis_ptr){
- t = pointer_tweak(newbpis_ptr->get_eti(), t, *t);
- }
- }
-};
-
-template<class Archive>
-struct load_enum_type {
- template<class T>
- static void invoke(Archive &ar, T &t){
- // convert integers to correct enum to load
- int i;
- ar >> boost::serialization::make_nvp(NULL, i);
- t = static_cast< T >(i);
- }
-};
-
-template<class Archive>
-struct load_array_type {
- template<class T>
- static void invoke(Archive &ar, T &t){
- typedef typename remove_extent< T >::type value_type;
-
- // convert integers to correct enum to load
- // determine number of elements in the array. Consider the
- // fact that some machines will align elements on boundries
- // other than characters.
- std::size_t current_count = sizeof(t) / (
- static_cast<char *>(static_cast<void *>(&t[1]))
- - static_cast<char *>(static_cast<void *>(&t[0]))
- );
- boost::serialization::collection_size_type count;
- ar >> BOOST_SERIALIZATION_NVP(count);
- if(static_cast<std::size_t>(count) > current_count)
- boost::serialization::throw_exception(
- archive::archive_exception(
- boost::archive::archive_exception::array_size_too_short
- )
- );
- // explict template arguments to pass intel C++ compiler
- ar >> serialization::make_array<
- value_type,
- boost::serialization::collection_size_type
- >(
- static_cast<value_type *>(&t[0]),
- count
- );
- }
-};
-
-} // detail
-
-template<class Archive, class T>
-inline void load(Archive & ar, T &t){
- // if this assertion trips. It means we're trying to load a
- // const object with a compiler that doesn't have correct
- // function template ordering. On other compilers, this is
- // handled below.
- detail::check_const_loading< T >();
- typedef
- typename mpl::eval_if<is_pointer< T >,
- mpl::identity<detail::load_pointer_type<Archive> >
- ,//else
- typename mpl::eval_if<is_array< T >,
- mpl::identity<detail::load_array_type<Archive> >
- ,//else
- typename mpl::eval_if<is_enum< T >,
- mpl::identity<detail::load_enum_type<Archive> >
- ,//else
- mpl::identity<detail::load_non_pointer_type<Archive> >
- >
- >
- >::type typex;
- typex::invoke(ar, t);
-}
-
-} // namespace archive
-} // namespace boost
-
-#endif // BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/archive_serializer_map.ipp b/src/third_party/boost-1.68.0/boost/archive/impl/archive_serializer_map.ipp
deleted file mode 100644
index 7f163ec4076..00000000000
--- a/src/third_party/boost-1.68.0/boost/archive/impl/archive_serializer_map.ipp
+++ /dev/null
@@ -1,75 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// archive_serializer_map.ipp:
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-//////////////////////////////////////////////////////////////////////
-// implementation of basic_text_iprimitive overrides for the combination
-// of template parameters used to implement a text_iprimitive
-
-#include <boost/config.hpp>
-#include <boost/archive/detail/archive_serializer_map.hpp>
-#include <boost/archive/detail/basic_serializer_map.hpp>
-#include <boost/serialization/singleton.hpp>
-
-namespace boost {
-namespace archive {
-namespace detail {
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-namespace extra_detail { // anon
- template<class Archive>
- class map : public basic_serializer_map
- {};
-}
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL bool
-archive_serializer_map<Archive>::insert(const basic_serializer * bs){
- return boost::serialization::singleton<
- extra_detail::map<Archive>
- >::get_mutable_instance().insert(bs);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL void
-archive_serializer_map<Archive>::erase(const basic_serializer * bs){
- BOOST_ASSERT(! boost::serialization::singleton<
- extra_detail::map<Archive>
- >::is_destroyed()
- );
- if(boost::serialization::singleton<
- extra_detail::map<Archive>
- >::is_destroyed())
- return;
- boost::serialization::singleton<
- extra_detail::map<Archive>
- >::get_mutable_instance().erase(bs);
-}
-
-template<class Archive>
-BOOST_ARCHIVE_OR_WARCHIVE_DECL const basic_serializer *
-archive_serializer_map<Archive>::find(
- const boost::serialization::extended_type_info & eti
-) {
- return boost::serialization::singleton<
- extra_detail::map<Archive>
- >::get_const_instance().find(eti);
-}
-
-} // namespace detail
-} // namespace archive
-} // namespace boost
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_grammar.hpp b/src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_grammar.hpp
deleted file mode 100644
index 6d4e4683f6a..00000000000
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_grammar.hpp
+++ /dev/null
@@ -1,173 +0,0 @@
-#ifndef BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
-#define BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
-
-// MS compatible compilers support #pragma once
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// basic_xml_grammar.hpp
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-// this module is derived from simplexml.cpp - an example shipped as part of
-// the spirit parser. This example contains the following notice:
-/*=============================================================================
- simplexml.cpp
-
- Spirit V1.3
- URL: http://spirit.sourceforge.net/
-
- Copyright (c) 2001, Daniel C. Nuffer
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the copyright holder be held liable for
- any damages arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute
- it freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must
- not claim that you wrote the original software. If you use this
- software in a product, an acknowledgment in the product documentation
- would be appreciated but is not required.
-
- 2. Altered source versions must be plainly marked as such, and must
- not be misrepresented as being the original software.
-
- 3. This notice may not be removed or altered from any source
- distribution.
-=============================================================================*/
-#include <string>
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#include <boost/spirit/include/classic_rule.hpp>
-#include <boost/spirit/include/classic_chset.hpp>
-
-#include <boost/archive/basic_archive.hpp>
-#include <boost/serialization/tracking.hpp>
-#include <boost/serialization/version.hpp>
-
-namespace boost {
-namespace archive {
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// XML grammar parsing
-
-template<class CharType>
-class basic_xml_grammar {
-public:
- // The following is not necessary according to DR45, but at least
- // one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise.
- struct return_values;
- friend struct return_values;
-
-private:
- typedef typename std::basic_istream<CharType> IStream;
- typedef typename std::basic_string<CharType> StringType;
- typedef typename boost::spirit::classic::chset<CharType> chset_t;
- typedef typename boost::spirit::classic::chlit<CharType> chlit_t;
- typedef typename boost::spirit::classic::scanner<
- typename std::basic_string<CharType>::iterator
- > scanner_t;
- typedef typename boost::spirit::classic::rule<scanner_t> rule_t;
- // Start grammar definition
- rule_t
- Reference,
- Eq,
- STag,
- ETag,
- LetterOrUnderscoreOrColon,
- AttValue,
- CharRef1,
- CharRef2,
- CharRef,
- AmpRef,
- LTRef,
- GTRef,
- AposRef,
- QuoteRef,
- CharData,
- CharDataChars,
- content,
- AmpName,
- LTName,
- GTName,
- ClassNameChar,
- ClassName,
- Name,
- XMLDecl,
- XMLDeclChars,
- DocTypeDecl,
- DocTypeDeclChars,
- ClassIDAttribute,
- ObjectIDAttribute,
- ClassNameAttribute,
- TrackingAttribute,
- VersionAttribute,
- UnusedAttribute,
- Attribute,
- SignatureAttribute,
- SerializationWrapper,
- NameHead,
- NameTail,
- AttributeList,
- S;
-
- // XML Character classes
- chset_t
- BaseChar,
- Ideographic,
- Char,
- Letter,
- Digit,
- CombiningChar,
- Extender,
- Sch,
- NameChar;
-
- void init_chset();
-
- bool my_parse(
- IStream & is,
- const rule_t &rule_,
- const CharType delimiter = L'>'
- ) const ;
-public:
- struct return_values {
- StringType object_name;
- StringType contents;
- //class_id_type class_id;
- int_least16_t class_id;
- //object_id_type object_id;
- uint_least32_t object_id;
- //version_type version;
- unsigned int version;
- tracking_type tracking_level;
- StringType class_name;
- return_values() :
- version(0),
- tracking_level(false)
- {}
- } rv;
- bool parse_start_tag(IStream & is) /*const*/;
- bool parse_end_tag(IStream & is) const;
- bool parse_string(IStream & is, StringType & s) /*const*/;
- void init(IStream & is);
- bool windup(IStream & is);
- basic_xml_grammar();
-};
-
-} // namespace archive
-} // namespace boost
-
-#endif // BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/buffer.hpp b/src/third_party/boost-1.68.0/boost/asio/buffer.hpp
deleted file mode 100644
index 8abe0be499f..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/buffer.hpp
+++ /dev/null
@@ -1,2164 +0,0 @@
-//
-// buffer.hpp
-// ~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_BUFFER_HPP
-#define BOOST_ASIO_BUFFER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <cstddef>
-#include <cstring>
-#include <limits>
-#include <stdexcept>
-#include <string>
-#include <vector>
-#include <boost/asio/detail/array_fwd.hpp>
-#include <boost/asio/detail/is_buffer_sequence.hpp>
-#include <boost/asio/detail/string_view.hpp>
-#include <boost/asio/detail/throw_exception.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1700)
-# if defined(_HAS_ITERATOR_DEBUGGING) && (_HAS_ITERATOR_DEBUGGING != 0)
-# if !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
-# define BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-# endif // !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
-# endif // defined(_HAS_ITERATOR_DEBUGGING)
-#endif // defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1700)
-
-#if defined(__GNUC__)
-# if defined(_GLIBCXX_DEBUG)
-# if !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
-# define BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-# endif // !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
-# endif // defined(_GLIBCXX_DEBUG)
-#endif // defined(__GNUC__)
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-# include <boost/asio/detail/functional.hpp>
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-
-#if defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
-# include <boost/detail/workaround.hpp>
-# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) \
- || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-# define BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND
-# endif // BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
- // || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
-#endif // defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
-
-#if defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-# include <boost/asio/detail/type_traits.hpp>
-#endif // defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-class mutable_buffer;
-class const_buffer;
-
-/// Holds a buffer that can be modified.
-/**
- * The mutable_buffer class provides a safe representation of a buffer that can
- * be modified. It does not own the underlying data, and so is cheap to copy or
- * assign.
- *
- * @par Accessing Buffer Contents
- *
- * The contents of a buffer may be accessed using the @c data() and @c size()
- * member functions:
- *
- * @code boost::asio::mutable_buffer b1 = ...;
- * std::size_t s1 = b1.size();
- * unsigned char* p1 = static_cast<unsigned char*>(b1.data());
- * @endcode
- *
- * The @c data() member function permits violations of type safety, so uses of
- * it in application code should be carefully considered.
- */
-class mutable_buffer
-{
-public:
- /// Construct an empty buffer.
- mutable_buffer() BOOST_ASIO_NOEXCEPT
- : data_(0),
- size_(0)
- {
- }
-
- /// Construct a buffer to represent a given memory range.
- mutable_buffer(void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
- : data_(data),
- size_(size)
- {
- }
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- mutable_buffer(void* data, std::size_t size,
- boost::asio::detail::function<void()> debug_check)
- : data_(data),
- size_(size),
- debug_check_(debug_check)
- {
- }
-
- const boost::asio::detail::function<void()>& get_debug_check() const
- {
- return debug_check_;
- }
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-
- /// Get a pointer to the beginning of the memory range.
- void* data() const BOOST_ASIO_NOEXCEPT
- {
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- if (size_ && debug_check_)
- debug_check_();
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- return data_;
- }
-
- /// Get the size of the memory range.
- std::size_t size() const BOOST_ASIO_NOEXCEPT
- {
- return size_;
- }
-
- /// Move the start of the buffer by the specified number of bytes.
- mutable_buffer& operator+=(std::size_t n) BOOST_ASIO_NOEXCEPT
- {
- std::size_t offset = n < size_ ? n : size_;
- data_ = static_cast<char*>(data_) + offset;
- size_ -= offset;
- return *this;
- }
-
-private:
- void* data_;
- std::size_t size_;
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- boost::asio::detail::function<void()> debug_check_;
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// (Deprecated: Use mutable_buffer.) Adapts a single modifiable buffer so that
-/// it meets the requirements of the MutableBufferSequence concept.
-class mutable_buffers_1
- : public mutable_buffer
-{
-public:
- /// The type for each element in the list of buffers.
- typedef mutable_buffer value_type;
-
- /// A random-access iterator type that may be used to read elements.
- typedef const mutable_buffer* const_iterator;
-
- /// Construct to represent a given memory range.
- mutable_buffers_1(void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
- : mutable_buffer(data, size)
- {
- }
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- mutable_buffers_1(void* data, std::size_t size,
- boost::asio::detail::function<void()> debug_check)
- : mutable_buffer(data, size, debug_check)
- {
- }
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-
- /// Construct to represent a single modifiable buffer.
- explicit mutable_buffers_1(const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
- : mutable_buffer(b)
- {
- }
-
- /// Get a random-access iterator to the first element.
- const_iterator begin() const BOOST_ASIO_NOEXCEPT
- {
- return this;
- }
-
- /// Get a random-access iterator for one past the last element.
- const_iterator end() const BOOST_ASIO_NOEXCEPT
- {
- return begin() + 1;
- }
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Holds a buffer that cannot be modified.
-/**
- * The const_buffer class provides a safe representation of a buffer that cannot
- * be modified. It does not own the underlying data, and so is cheap to copy or
- * assign.
- *
- * @par Accessing Buffer Contents
- *
- * The contents of a buffer may be accessed using the @c data() and @c size()
- * member functions:
- *
- * @code boost::asio::const_buffer b1 = ...;
- * std::size_t s1 = b1.size();
- * const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
- * @endcode
- *
- * The @c data() member function permits violations of type safety, so uses of
- * it in application code should be carefully considered.
- */
-class const_buffer
-{
-public:
- /// Construct an empty buffer.
- const_buffer() BOOST_ASIO_NOEXCEPT
- : data_(0),
- size_(0)
- {
- }
-
- /// Construct a buffer to represent a given memory range.
- const_buffer(const void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
- : data_(data),
- size_(size)
- {
- }
-
- /// Construct a non-modifiable buffer from a modifiable one.
- const_buffer(const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
- : data_(b.data()),
- size_(b.size())
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , debug_check_(b.get_debug_check())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- {
- }
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- const_buffer(const void* data, std::size_t size,
- boost::asio::detail::function<void()> debug_check)
- : data_(data),
- size_(size),
- debug_check_(debug_check)
- {
- }
-
- const boost::asio::detail::function<void()>& get_debug_check() const
- {
- return debug_check_;
- }
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-
- /// Get a pointer to the beginning of the memory range.
- const void* data() const BOOST_ASIO_NOEXCEPT
- {
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- if (size_ && debug_check_)
- debug_check_();
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- return data_;
- }
-
- /// Get the size of the memory range.
- std::size_t size() const BOOST_ASIO_NOEXCEPT
- {
- return size_;
- }
-
- /// Move the start of the buffer by the specified number of bytes.
- const_buffer& operator+=(std::size_t n) BOOST_ASIO_NOEXCEPT
- {
- std::size_t offset = n < size_ ? n : size_;
- data_ = static_cast<const char*>(data_) + offset;
- size_ -= offset;
- return *this;
- }
-
-private:
- const void* data_;
- std::size_t size_;
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- boost::asio::detail::function<void()> debug_check_;
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-};
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// (Deprecated: Use const_buffer.) Adapts a single non-modifiable buffer so
-/// that it meets the requirements of the ConstBufferSequence concept.
-class const_buffers_1
- : public const_buffer
-{
-public:
- /// The type for each element in the list of buffers.
- typedef const_buffer value_type;
-
- /// A random-access iterator type that may be used to read elements.
- typedef const const_buffer* const_iterator;
-
- /// Construct to represent a given memory range.
- const_buffers_1(const void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
- : const_buffer(data, size)
- {
- }
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- const_buffers_1(const void* data, std::size_t size,
- boost::asio::detail::function<void()> debug_check)
- : const_buffer(data, size, debug_check)
- {
- }
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-
- /// Construct to represent a single non-modifiable buffer.
- explicit const_buffers_1(const const_buffer& b) BOOST_ASIO_NOEXCEPT
- : const_buffer(b)
- {
- }
-
- /// Get a random-access iterator to the first element.
- const_iterator begin() const BOOST_ASIO_NOEXCEPT
- {
- return this;
- }
-
- /// Get a random-access iterator for one past the last element.
- const_iterator end() const BOOST_ASIO_NOEXCEPT
- {
- return begin() + 1;
- }
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Trait to determine whether a type satisfies the MutableBufferSequence
-/// requirements.
-template <typename T>
-struct is_mutable_buffer_sequence
-#if defined(GENERATING_DOCUMENTATION)
- : integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- : boost::asio::detail::is_buffer_sequence<T, mutable_buffer>
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-/// Trait to determine whether a type satisfies the ConstBufferSequence
-/// requirements.
-template <typename T>
-struct is_const_buffer_sequence
-#if defined(GENERATING_DOCUMENTATION)
- : integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- : boost::asio::detail::is_buffer_sequence<T, const_buffer>
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-/// Trait to determine whether a type satisfies the DynamicBuffer requirements.
-template <typename T>
-struct is_dynamic_buffer
-#if defined(GENERATING_DOCUMENTATION)
- : integral_constant<bool, automatically_determined>
-#else // defined(GENERATING_DOCUMENTATION)
- : boost::asio::detail::is_dynamic_buffer<T>
-#endif // defined(GENERATING_DOCUMENTATION)
-{
-};
-
-/// (Deprecated: Use the socket/descriptor wait() and async_wait() member
-/// functions.) An implementation of both the ConstBufferSequence and
-/// MutableBufferSequence concepts to represent a null buffer sequence.
-class null_buffers
-{
-public:
- /// The type for each element in the list of buffers.
- typedef mutable_buffer value_type;
-
- /// A random-access iterator type that may be used to read elements.
- typedef const mutable_buffer* const_iterator;
-
- /// Get a random-access iterator to the first element.
- const_iterator begin() const BOOST_ASIO_NOEXCEPT
- {
- return &buf_;
- }
-
- /// Get a random-access iterator for one past the last element.
- const_iterator end() const BOOST_ASIO_NOEXCEPT
- {
- return &buf_;
- }
-
-private:
- mutable_buffer buf_;
-};
-
-/** @defgroup buffer_sequence_begin boost::asio::buffer_sequence_begin
- *
- * @brief The boost::asio::buffer_sequence_begin function returns an iterator
- * pointing to the first element in a buffer sequence.
- */
-/*@{*/
-
-/// Get an iterator to the first element in a buffer sequence.
-inline const mutable_buffer* buffer_sequence_begin(const mutable_buffer& b)
-{
- return &b;
-}
-
-/// Get an iterator to the first element in a buffer sequence.
-inline const const_buffer* buffer_sequence_begin(const const_buffer& b)
-{
- return &b;
-}
-
-#if defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-/// Get an iterator to the first element in a buffer sequence.
-template <typename C>
-inline auto buffer_sequence_begin(C& c) -> decltype(c.begin())
-{
- return c.begin();
-}
-
-/// Get an iterator to the first element in a buffer sequence.
-template <typename C>
-inline auto buffer_sequence_begin(const C& c) -> decltype(c.begin())
-{
- return c.begin();
-}
-
-#else // defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-template <typename C>
-inline typename C::iterator buffer_sequence_begin(C& c)
-{
- return c.begin();
-}
-
-template <typename C>
-inline typename C::const_iterator buffer_sequence_begin(const C& c)
-{
- return c.begin();
-}
-
-#endif // defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-/*@}*/
-
-/** @defgroup buffer_sequence_end boost::asio::buffer_sequence_end
- *
- * @brief The boost::asio::buffer_sequence_end function returns an iterator
- * pointing to one past the end element in a buffer sequence.
- */
-/*@{*/
-
-/// Get an iterator to one past the end element in a buffer sequence.
-inline const mutable_buffer* buffer_sequence_end(const mutable_buffer& b)
-{
- return &b + 1;
-}
-
-/// Get an iterator to one past the end element in a buffer sequence.
-inline const const_buffer* buffer_sequence_end(const const_buffer& b)
-{
- return &b + 1;
-}
-
-#if defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-/// Get an iterator to one past the end element in a buffer sequence.
-template <typename C>
-inline auto buffer_sequence_end(C& c) -> decltype(c.end())
-{
- return c.end();
-}
-
-/// Get an iterator to one past the end element in a buffer sequence.
-template <typename C>
-inline auto buffer_sequence_end(const C& c) -> decltype(c.end())
-{
- return c.end();
-}
-
-#else // defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-template <typename C>
-inline typename C::iterator buffer_sequence_end(C& c)
-{
- return c.end();
-}
-
-template <typename C>
-inline typename C::const_iterator buffer_sequence_end(const C& c)
-{
- return c.end();
-}
-
-#endif // defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
-
-/*@}*/
-
-namespace detail {
-
-// Tag types used to select appropriately optimised overloads.
-struct one_buffer {};
-struct multiple_buffers {};
-
-// Helper trait to detect single buffers.
-template <typename BufferSequence>
-struct buffer_sequence_cardinality :
- conditional<
- is_same<BufferSequence, mutable_buffer>::value
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- || is_same<BufferSequence, mutable_buffers_1>::value
- || is_same<BufferSequence, const_buffers_1>::value
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
- || is_same<BufferSequence, const_buffer>::value,
- one_buffer, multiple_buffers>::type {};
-
-template <typename Iterator>
-inline std::size_t buffer_size(one_buffer,
- Iterator begin, Iterator) BOOST_ASIO_NOEXCEPT
-{
- return const_buffer(*begin).size();
-}
-
-template <typename Iterator>
-inline std::size_t buffer_size(multiple_buffers,
- Iterator begin, Iterator end) BOOST_ASIO_NOEXCEPT
-{
- std::size_t total_buffer_size = 0;
-
- Iterator iter = begin;
- for (; iter != end; ++iter)
- {
- const_buffer b(*iter);
- total_buffer_size += b.size();
- }
-
- return total_buffer_size;
-}
-
-} // namespace detail
-
-/// Get the total number of bytes in a buffer sequence.
-/**
- * The @c buffer_size function determines the total size of all buffers in the
- * buffer sequence, as if computed as follows:
- *
- * @code size_t total_size = 0;
- * auto i = boost::asio::buffer_sequence_begin(buffers);
- * auto end = boost::asio::buffer_sequence_end(buffers);
- * for (; i != end; ++i)
- * {
- * const_buffer b(*i);
- * total_size += b.size();
- * }
- * return total_size; @endcode
- *
- * The @c BufferSequence template parameter may meet either of the @c
- * ConstBufferSequence or @c MutableBufferSequence type requirements.
- */
-template <typename BufferSequence>
-inline std::size_t buffer_size(const BufferSequence& b) BOOST_ASIO_NOEXCEPT
-{
- return detail::buffer_size(
- detail::buffer_sequence_cardinality<BufferSequence>(),
- boost::asio::buffer_sequence_begin(b),
- boost::asio::buffer_sequence_end(b));
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/** @defgroup buffer_cast boost::asio::buffer_cast
- *
- * @brief (Deprecated: Use the @c data() member function.) The
- * boost::asio::buffer_cast function is used to obtain a pointer to the
- * underlying memory region associated with a buffer.
- *
- * @par Examples:
- *
- * To access the memory of a non-modifiable buffer, use:
- * @code boost::asio::const_buffer b1 = ...;
- * const unsigned char* p1 = boost::asio::buffer_cast<const unsigned char*>(b1);
- * @endcode
- *
- * To access the memory of a modifiable buffer, use:
- * @code boost::asio::mutable_buffer b2 = ...;
- * unsigned char* p2 = boost::asio::buffer_cast<unsigned char*>(b2);
- * @endcode
- *
- * The boost::asio::buffer_cast function permits violations of type safety, so
- * uses of it in application code should be carefully considered.
- */
-/*@{*/
-
-/// Cast a non-modifiable buffer to a specified pointer to POD type.
-template <typename PointerToPodType>
-inline PointerToPodType buffer_cast(const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
-{
- return static_cast<PointerToPodType>(b.data());
-}
-
-/// Cast a non-modifiable buffer to a specified pointer to POD type.
-template <typename PointerToPodType>
-inline PointerToPodType buffer_cast(const const_buffer& b) BOOST_ASIO_NOEXCEPT
-{
- return static_cast<PointerToPodType>(b.data());
-}
-
-/*@}*/
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Create a new modifiable buffer that is offset from the start of another.
-/**
- * @relates mutable_buffer
- */
-inline mutable_buffer operator+(const mutable_buffer& b,
- std::size_t n) BOOST_ASIO_NOEXCEPT
-{
- std::size_t offset = n < b.size() ? n : b.size();
- char* new_data = static_cast<char*>(b.data()) + offset;
- std::size_t new_size = b.size() - offset;
- return mutable_buffer(new_data, new_size
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , b.get_debug_check()
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new modifiable buffer that is offset from the start of another.
-/**
- * @relates mutable_buffer
- */
-inline mutable_buffer operator+(std::size_t n,
- const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
-{
- return b + n;
-}
-
-/// Create a new non-modifiable buffer that is offset from the start of another.
-/**
- * @relates const_buffer
- */
-inline const_buffer operator+(const const_buffer& b,
- std::size_t n) BOOST_ASIO_NOEXCEPT
-{
- std::size_t offset = n < b.size() ? n : b.size();
- const char* new_data = static_cast<const char*>(b.data()) + offset;
- std::size_t new_size = b.size() - offset;
- return const_buffer(new_data, new_size
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , b.get_debug_check()
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new non-modifiable buffer that is offset from the start of another.
-/**
- * @relates const_buffer
- */
-inline const_buffer operator+(std::size_t n,
- const const_buffer& b) BOOST_ASIO_NOEXCEPT
-{
- return b + n;
-}
-
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
-namespace detail {
-
-template <typename Iterator>
-class buffer_debug_check
-{
-public:
- buffer_debug_check(Iterator iter)
- : iter_(iter)
- {
- }
-
- ~buffer_debug_check()
- {
-#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC == 1400)
- // MSVC 8's string iterator checking may crash in a std::string::iterator
- // object's destructor when the iterator points to an already-destroyed
- // std::string object, unless the iterator is cleared first.
- iter_ = Iterator();
-#endif // defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC == 1400)
- }
-
- void operator()()
- {
- (void)*iter_;
- }
-
-private:
- Iterator iter_;
-};
-
-} // namespace detail
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
-
-/** @defgroup buffer boost::asio::buffer
- *
- * @brief The boost::asio::buffer function is used to create a buffer object to
- * represent raw memory, an array of POD elements, a vector of POD elements,
- * or a std::string.
- *
- * A buffer object represents a contiguous region of memory as a 2-tuple
- * consisting of a pointer and size in bytes. A tuple of the form <tt>{void*,
- * size_t}</tt> specifies a mutable (modifiable) region of memory. Similarly, a
- * tuple of the form <tt>{const void*, size_t}</tt> specifies a const
- * (non-modifiable) region of memory. These two forms correspond to the classes
- * mutable_buffer and const_buffer, respectively. To mirror C++'s conversion
- * rules, a mutable_buffer is implicitly convertible to a const_buffer, and the
- * opposite conversion is not permitted.
- *
- * The simplest use case involves reading or writing a single buffer of a
- * specified size:
- *
- * @code sock.send(boost::asio::buffer(data, size)); @endcode
- *
- * In the above example, the return value of boost::asio::buffer meets the
- * requirements of the ConstBufferSequence concept so that it may be directly
- * passed to the socket's write function. A buffer created for modifiable
- * memory also meets the requirements of the MutableBufferSequence concept.
- *
- * An individual buffer may be created from a builtin array, std::vector,
- * std::array or boost::array of POD elements. This helps prevent buffer
- * overruns by automatically determining the size of the buffer:
- *
- * @code char d1[128];
- * size_t bytes_transferred = sock.receive(boost::asio::buffer(d1));
- *
- * std::vector<char> d2(128);
- * bytes_transferred = sock.receive(boost::asio::buffer(d2));
- *
- * std::array<char, 128> d3;
- * bytes_transferred = sock.receive(boost::asio::buffer(d3));
- *
- * boost::array<char, 128> d4;
- * bytes_transferred = sock.receive(boost::asio::buffer(d4)); @endcode
- *
- * In all three cases above, the buffers created are exactly 128 bytes long.
- * Note that a vector is @e never automatically resized when creating or using
- * a buffer. The buffer size is determined using the vector's <tt>size()</tt>
- * member function, and not its capacity.
- *
- * @par Accessing Buffer Contents
- *
- * The contents of a buffer may be accessed using the @c data() and @c size()
- * member functions:
- *
- * @code boost::asio::mutable_buffer b1 = ...;
- * std::size_t s1 = b1.size();
- * unsigned char* p1 = static_cast<unsigned char*>(b1.data());
- *
- * boost::asio::const_buffer b2 = ...;
- * std::size_t s2 = b2.size();
- * const void* p2 = b2.data(); @endcode
- *
- * The @c data() member function permits violations of type safety, so
- * uses of it in application code should be carefully considered.
- *
- * For convenience, a @ref buffer_size function is provided that works with
- * both buffers and buffer sequences (that is, types meeting the
- * ConstBufferSequence or MutableBufferSequence type requirements). In this
- * case, the function returns the total size of all buffers in the sequence.
- *
- * @par Buffer Copying
- *
- * The @ref buffer_copy function may be used to copy raw bytes between
- * individual buffers and buffer sequences.
-*
- * In particular, when used with the @ref buffer_size function, the @ref
- * buffer_copy function can be used to linearise a sequence of buffers. For
- * example:
- *
- * @code vector<const_buffer> buffers = ...;
- *
- * vector<unsigned char> data(boost::asio::buffer_size(buffers));
- * boost::asio::buffer_copy(boost::asio::buffer(data), buffers); @endcode
- *
- * Note that @ref buffer_copy is implemented in terms of @c memcpy, and
- * consequently it cannot be used to copy between overlapping memory regions.
- *
- * @par Buffer Invalidation
- *
- * A buffer object does not have any ownership of the memory it refers to. It
- * is the responsibility of the application to ensure the memory region remains
- * valid until it is no longer required for an I/O operation. When the memory
- * is no longer available, the buffer is said to have been invalidated.
- *
- * For the boost::asio::buffer overloads that accept an argument of type
- * std::vector, the buffer objects returned are invalidated by any vector
- * operation that also invalidates all references, pointers and iterators
- * referring to the elements in the sequence (C++ Std, 23.2.4)
- *
- * For the boost::asio::buffer overloads that accept an argument of type
- * std::basic_string, the buffer objects returned are invalidated according to
- * the rules defined for invalidation of references, pointers and iterators
- * referring to elements of the sequence (C++ Std, 21.3).
- *
- * @par Buffer Arithmetic
- *
- * Buffer objects may be manipulated using simple arithmetic in a safe way
- * which helps prevent buffer overruns. Consider an array initialised as
- * follows:
- *
- * @code boost::array<char, 6> a = { 'a', 'b', 'c', 'd', 'e' }; @endcode
- *
- * A buffer object @c b1 created using:
- *
- * @code b1 = boost::asio::buffer(a); @endcode
- *
- * represents the entire array, <tt>{ 'a', 'b', 'c', 'd', 'e' }</tt>. An
- * optional second argument to the boost::asio::buffer function may be used to
- * limit the size, in bytes, of the buffer:
- *
- * @code b2 = boost::asio::buffer(a, 3); @endcode
- *
- * such that @c b2 represents the data <tt>{ 'a', 'b', 'c' }</tt>. Even if the
- * size argument exceeds the actual size of the array, the size of the buffer
- * object created will be limited to the array size.
- *
- * An offset may be applied to an existing buffer to create a new one:
- *
- * @code b3 = b1 + 2; @endcode
- *
- * where @c b3 will set to represent <tt>{ 'c', 'd', 'e' }</tt>. If the offset
- * exceeds the size of the existing buffer, the newly created buffer will be
- * empty.
- *
- * Both an offset and size may be specified to create a buffer that corresponds
- * to a specific range of bytes within an existing buffer:
- *
- * @code b4 = boost::asio::buffer(b1 + 1, 3); @endcode
- *
- * so that @c b4 will refer to the bytes <tt>{ 'b', 'c', 'd' }</tt>.
- *
- * @par Buffers and Scatter-Gather I/O
- *
- * To read or write using multiple buffers (i.e. scatter-gather I/O), multiple
- * buffer objects may be assigned into a container that supports the
- * MutableBufferSequence (for read) or ConstBufferSequence (for write) concepts:
- *
- * @code
- * char d1[128];
- * std::vector<char> d2(128);
- * boost::array<char, 128> d3;
- *
- * boost::array<mutable_buffer, 3> bufs1 = {
- * boost::asio::buffer(d1),
- * boost::asio::buffer(d2),
- * boost::asio::buffer(d3) };
- * bytes_transferred = sock.receive(bufs1);
- *
- * std::vector<const_buffer> bufs2;
- * bufs2.push_back(boost::asio::buffer(d1));
- * bufs2.push_back(boost::asio::buffer(d2));
- * bufs2.push_back(boost::asio::buffer(d3));
- * bytes_transferred = sock.send(bufs2); @endcode
- */
-/*@{*/
-
-#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-# define BOOST_ASIO_MUTABLE_BUFFER mutable_buffer
-# define BOOST_ASIO_CONST_BUFFER const_buffer
-#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-# define BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_1
-# define BOOST_ASIO_CONST_BUFFER const_buffers_1
-#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
-
-/// Create a new modifiable buffer from an existing buffer.
-/**
- * @returns <tt>mutable_buffer(b)</tt>.
- */
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(
- const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(b);
-}
-
-/// Create a new modifiable buffer from an existing buffer.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * b.data(),
- * min(b.size(), max_size_in_bytes)); @endcode
- */
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(const mutable_buffer& b,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(
- mutable_buffer(b.data(),
- b.size() < max_size_in_bytes
- ? b.size() : max_size_in_bytes
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , b.get_debug_check()
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- ));
-}
-
-/// Create a new non-modifiable buffer from an existing buffer.
-/**
- * @returns <tt>const_buffer(b)</tt>.
- */
-inline BOOST_ASIO_CONST_BUFFER buffer(
- const const_buffer& b) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(b);
-}
-
-/// Create a new non-modifiable buffer from an existing buffer.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * b.data(),
- * min(b.size(), max_size_in_bytes)); @endcode
- */
-inline BOOST_ASIO_CONST_BUFFER buffer(const const_buffer& b,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(b.data(),
- b.size() < max_size_in_bytes
- ? b.size() : max_size_in_bytes
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , b.get_debug_check()
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new modifiable buffer that represents the given memory range.
-/**
- * @returns <tt>mutable_buffer(data, size_in_bytes)</tt>.
- */
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(void* data,
- std::size_t size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data, size_in_bytes);
-}
-
-/// Create a new non-modifiable buffer that represents the given memory range.
-/**
- * @returns <tt>const_buffer(data, size_in_bytes)</tt>.
- */
-inline BOOST_ASIO_CONST_BUFFER buffer(const void* data,
- std::size_t size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data, size_in_bytes);
-}
-
-/// Create a new modifiable buffer that represents the given POD array.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * static_cast<void*>(data),
- * N * sizeof(PodType)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N]) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data, N * sizeof(PodType));
-}
-
-/// Create a new modifiable buffer that represents the given POD array.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * static_cast<void*>(data),
- * min(N * sizeof(PodType), max_size_in_bytes)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N],
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data,
- N * sizeof(PodType) < max_size_in_bytes
- ? N * sizeof(PodType) : max_size_in_bytes);
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * static_cast<const void*>(data),
- * N * sizeof(PodType)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- const PodType (&data)[N]) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data, N * sizeof(PodType));
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * static_cast<const void*>(data),
- * min(N * sizeof(PodType), max_size_in_bytes)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(const PodType (&data)[N],
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data,
- N * sizeof(PodType) < max_size_in_bytes
- ? N * sizeof(PodType) : max_size_in_bytes);
-}
-
-#if defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
-// Borland C++ and Sun Studio think the overloads:
-//
-// unspecified buffer(boost::array<PodType, N>& array ...);
-//
-// and
-//
-// unspecified buffer(boost::array<const PodType, N>& array ...);
-//
-// are ambiguous. This will be worked around by using a buffer_types traits
-// class that contains typedefs for the appropriate buffer and container
-// classes, based on whether PodType is const or non-const.
-
-namespace detail {
-
-template <bool IsConst>
-struct buffer_types_base;
-
-template <>
-struct buffer_types_base<false>
-{
- typedef mutable_buffer buffer_type;
- typedef BOOST_ASIO_MUTABLE_BUFFER container_type;
-};
-
-template <>
-struct buffer_types_base<true>
-{
- typedef const_buffer buffer_type;
- typedef BOOST_ASIO_CONST_BUFFER container_type;
-};
-
-template <typename PodType>
-struct buffer_types
- : public buffer_types_base<is_const<PodType>::value>
-{
-};
-
-} // namespace detail
-
-template <typename PodType, std::size_t N>
-inline typename detail::buffer_types<PodType>::container_type
-buffer(boost::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
-{
- typedef typename boost::asio::detail::buffer_types<PodType>::buffer_type
- buffer_type;
- typedef typename boost::asio::detail::buffer_types<PodType>::container_type
- container_type;
- return container_type(
- buffer_type(data.c_array(), data.size() * sizeof(PodType)));
-}
-
-template <typename PodType, std::size_t N>
-inline typename detail::buffer_types<PodType>::container_type
-buffer(boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- typedef typename boost::asio::detail::buffer_types<PodType>::buffer_type
- buffer_type;
- typedef typename boost::asio::detail::buffer_types<PodType>::container_type
- container_type;
- return container_type(
- buffer_type(data.c_array(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes));
-}
-
-#else // defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
-/// Create a new modifiable buffer that represents the given POD array.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * data.data(),
- * data.size() * sizeof(PodType)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(
- boost::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(
- data.c_array(), data.size() * sizeof(PodType));
-}
-
-/// Create a new modifiable buffer that represents the given POD array.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * data.data(),
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data.c_array(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * data.size() * sizeof(PodType)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- boost::array<const PodType, N>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(boost::array<const PodType, N>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
-}
-
-#endif // defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * data.size() * sizeof(PodType)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- const boost::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(const boost::array<PodType, N>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
-}
-
-#if defined(BOOST_ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
-
-/// Create a new modifiable buffer that represents the given POD array.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * data.data(),
- * data.size() * sizeof(PodType)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(
- std::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data.data(), data.size() * sizeof(PodType));
-}
-
-/// Create a new modifiable buffer that represents the given POD array.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * data.data(),
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(std::array<PodType, N>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data.data(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * data.size() * sizeof(PodType)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- std::array<const PodType, N>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(std::array<const PodType, N>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * data.size() * sizeof(PodType)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- const std::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
-}
-
-/// Create a new non-modifiable buffer that represents the given POD array.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
- */
-template <typename PodType, std::size_t N>
-inline BOOST_ASIO_CONST_BUFFER buffer(const std::array<PodType, N>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(),
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes);
-}
-
-#endif // defined(BOOST_ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
-
-/// Create a new modifiable buffer that represents the given POD vector.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * data.size() ? &data[0] : 0,
- * data.size() * sizeof(PodType)); @endcode
- *
- * @note The buffer is invalidated by any vector operation that would also
- * invalidate iterators.
- */
-template <typename PodType, typename Allocator>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(
- std::vector<PodType, Allocator>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(
- data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename std::vector<PodType, Allocator>::iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new modifiable buffer that represents the given POD vector.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * data.size() ? &data[0] : 0,
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
- *
- * @note The buffer is invalidated by any vector operation that would also
- * invalidate iterators.
- */
-template <typename PodType, typename Allocator>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(std::vector<PodType, Allocator>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename std::vector<PodType, Allocator>::iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new non-modifiable buffer that represents the given POD vector.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.size() ? &data[0] : 0,
- * data.size() * sizeof(PodType)); @endcode
- *
- * @note The buffer is invalidated by any vector operation that would also
- * invalidate iterators.
- */
-template <typename PodType, typename Allocator>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- const std::vector<PodType, Allocator>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(
- data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename std::vector<PodType, Allocator>::const_iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new non-modifiable buffer that represents the given POD vector.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.size() ? &data[0] : 0,
- * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
- *
- * @note The buffer is invalidated by any vector operation that would also
- * invalidate iterators.
- */
-template <typename PodType, typename Allocator>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- const std::vector<PodType, Allocator>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
- data.size() * sizeof(PodType) < max_size_in_bytes
- ? data.size() * sizeof(PodType) : max_size_in_bytes
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename std::vector<PodType, Allocator>::const_iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new modifiable buffer that represents the given string.
-/**
- * @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
- * data.size() * sizeof(Elem))</tt>.
- *
- * @note The buffer is invalidated by any non-const operation called on the
- * given string object.
- */
-template <typename Elem, typename Traits, typename Allocator>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(
- std::basic_string<Elem, Traits, Allocator>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
- data.size() * sizeof(Elem)
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename std::basic_string<Elem, Traits, Allocator>::iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new non-modifiable buffer that represents the given string.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * data.size() ? &data[0] : 0,
- * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
- *
- * @note The buffer is invalidated by any non-const operation called on the
- * given string object.
- */
-template <typename Elem, typename Traits, typename Allocator>
-inline BOOST_ASIO_MUTABLE_BUFFER buffer(
- std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
- data.size() * sizeof(Elem) < max_size_in_bytes
- ? data.size() * sizeof(Elem) : max_size_in_bytes
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename std::basic_string<Elem, Traits, Allocator>::iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new non-modifiable buffer that represents the given string.
-/**
- * @returns <tt>const_buffer(data.data(), data.size() * sizeof(Elem))</tt>.
- *
- * @note The buffer is invalidated by any non-const operation called on the
- * given string object.
- */
-template <typename Elem, typename Traits, typename Allocator>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- const std::basic_string<Elem, Traits, Allocator>& data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(Elem)
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename std::basic_string<Elem, Traits, Allocator>::const_iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new non-modifiable buffer that represents the given string.
-/**
- * @returns A const_buffer value equivalent to:
- * @code const_buffer(
- * data.data(),
- * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
- *
- * @note The buffer is invalidated by any non-const operation called on the
- * given string object.
- */
-template <typename Elem, typename Traits, typename Allocator>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- const std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.data(),
- data.size() * sizeof(Elem) < max_size_in_bytes
- ? data.size() * sizeof(Elem) : max_size_in_bytes
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename std::basic_string<Elem, Traits, Allocator>::const_iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Create a new modifiable buffer that represents the given string_view.
-/**
- * @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
- * data.size() * sizeof(Elem))</tt>.
- */
-template <typename Elem, typename Traits>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- basic_string_view<Elem, Traits> data) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
- data.size() * sizeof(Elem)
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename basic_string_view<Elem, Traits>::iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-/// Create a new non-modifiable buffer that represents the given string.
-/**
- * @returns A mutable_buffer value equivalent to:
- * @code mutable_buffer(
- * data.size() ? &data[0] : 0,
- * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
- */
-template <typename Elem, typename Traits>
-inline BOOST_ASIO_CONST_BUFFER buffer(
- basic_string_view<Elem, Traits> data,
- std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
-{
- return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
- data.size() * sizeof(Elem) < max_size_in_bytes
- ? data.size() * sizeof(Elem) : max_size_in_bytes
-#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
- , detail::buffer_debug_check<
- typename basic_string_view<Elem, Traits>::iterator
- >(data.begin())
-#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
- );
-}
-
-#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
- // || defined(GENERATING_DOCUMENTATION)
-
-/*@}*/
-
-/// Adapt a basic_string to the DynamicBuffer requirements.
-/**
- * Requires that <tt>sizeof(Elem) == 1</tt>.
- */
-template <typename Elem, typename Traits, typename Allocator>
-class dynamic_string_buffer
-{
-public:
- /// The type used to represent the input sequence as a list of buffers.
- typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
-
- /// The type used to represent the output sequence as a list of buffers.
- typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
-
- /// Construct a dynamic buffer from a string.
- /**
- * @param s The string to be used as backing storage for the dynamic buffer.
- * Any existing data in the string is treated as the dynamic buffer's input
- * sequence. The object stores a reference to the string and the user is
- * responsible for ensuring that the string object remains valid until the
- * dynamic_string_buffer object is destroyed.
- *
- * @param maximum_size Specifies a maximum size for the buffer, in bytes.
- */
- explicit dynamic_string_buffer(std::basic_string<Elem, Traits, Allocator>& s,
- std::size_t maximum_size =
- (std::numeric_limits<std::size_t>::max)()) BOOST_ASIO_NOEXCEPT
- : string_(s),
- size_(string_.size()),
- max_size_(maximum_size)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move construct a dynamic buffer.
- dynamic_string_buffer(dynamic_string_buffer&& other) BOOST_ASIO_NOEXCEPT
- : string_(other.string_),
- size_(other.size_),
- max_size_(other.max_size_)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Get the size of the input sequence.
- std::size_t size() const BOOST_ASIO_NOEXCEPT
- {
- return size_;
- }
-
- /// Get the maximum size of the dynamic buffer.
- /**
- * @returns The allowed maximum of the sum of the sizes of the input sequence
- * and output sequence.
- */
- std::size_t max_size() const BOOST_ASIO_NOEXCEPT
- {
- return max_size_;
- }
-
- /// Get the current capacity of the dynamic buffer.
- /**
- * @returns The current total capacity of the buffer, i.e. for both the input
- * sequence and output sequence.
- */
- std::size_t capacity() const BOOST_ASIO_NOEXCEPT
- {
- return string_.capacity();
- }
-
- /// Get a list of buffers that represents the input sequence.
- /**
- * @returns An object of type @c const_buffers_type that satisfies
- * ConstBufferSequence requirements, representing the basic_string memory in
- * input sequence.
- *
- * @note The returned object is invalidated by any @c dynamic_string_buffer
- * or @c basic_string member function that modifies the input sequence or
- * output sequence.
- */
- const_buffers_type data() const BOOST_ASIO_NOEXCEPT
- {
- return const_buffers_type(boost::asio::buffer(string_, size_));
- }
-
- /// Get a list of buffers that represents the output sequence, with the given
- /// size.
- /**
- * Ensures that the output sequence can accommodate @c n bytes, resizing the
- * basic_string object as necessary.
- *
- * @returns An object of type @c mutable_buffers_type that satisfies
- * MutableBufferSequence requirements, representing basic_string memory
- * at the start of the output sequence of size @c n.
- *
- * @throws std::length_error If <tt>size() + n > max_size()</tt>.
- *
- * @note The returned object is invalidated by any @c dynamic_string_buffer
- * or @c basic_string member function that modifies the input sequence or
- * output sequence.
- */
- mutable_buffers_type prepare(std::size_t n)
- {
- if (size () > max_size() || max_size() - size() < n)
- {
- std::length_error ex("dynamic_string_buffer too long");
- boost::asio::detail::throw_exception(ex);
- }
-
- string_.resize(size_ + n);
-
- return boost::asio::buffer(boost::asio::buffer(string_) + size_, n);
- }
-
- /// Move bytes from the output sequence to the input sequence.
- /**
- * @param n The number of bytes to append from the start of the output
- * sequence to the end of the input sequence. The remainder of the output
- * sequence is discarded.
- *
- * Requires a preceding call <tt>prepare(x)</tt> where <tt>x >= n</tt>, and
- * no intervening operations that modify the input or output sequence.
- *
- * @note If @c n is greater than the size of the output sequence, the entire
- * output sequence is moved to the input sequence and no error is issued.
- */
- void commit(std::size_t n)
- {
- size_ += (std::min)(n, string_.size() - size_);
- string_.resize(size_);
- }
-
- /// Remove characters from the input sequence.
- /**
- * Removes @c n characters from the beginning of the input sequence.
- *
- * @note If @c n is greater than the size of the input sequence, the entire
- * input sequence is consumed and no error is issued.
- */
- void consume(std::size_t n)
- {
- std::size_t consume_length = (std::min)(n, size_);
- string_.erase(0, consume_length);
- size_ -= consume_length;
- }
-
-private:
- std::basic_string<Elem, Traits, Allocator>& string_;
- std::size_t size_;
- const std::size_t max_size_;
-};
-
-/// Adapt a vector to the DynamicBuffer requirements.
-/**
- * Requires that <tt>sizeof(Elem) == 1</tt>.
- */
-template <typename Elem, typename Allocator>
-class dynamic_vector_buffer
-{
-public:
- /// The type used to represent the input sequence as a list of buffers.
- typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
-
- /// The type used to represent the output sequence as a list of buffers.
- typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
-
- /// Construct a dynamic buffer from a string.
- /**
- * @param v The vector to be used as backing storage for the dynamic buffer.
- * Any existing data in the vector is treated as the dynamic buffer's input
- * sequence. The object stores a reference to the vector and the user is
- * responsible for ensuring that the vector object remains valid until the
- * dynamic_vector_buffer object is destroyed.
- *
- * @param maximum_size Specifies a maximum size for the buffer, in bytes.
- */
- explicit dynamic_vector_buffer(std::vector<Elem, Allocator>& v,
- std::size_t maximum_size =
- (std::numeric_limits<std::size_t>::max)()) BOOST_ASIO_NOEXCEPT
- : vector_(v),
- size_(vector_.size()),
- max_size_(maximum_size)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move construct a dynamic buffer.
- dynamic_vector_buffer(dynamic_vector_buffer&& other) BOOST_ASIO_NOEXCEPT
- : vector_(other.vector_),
- size_(other.size_),
- max_size_(other.max_size_)
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Get the size of the input sequence.
- std::size_t size() const BOOST_ASIO_NOEXCEPT
- {
- return size_;
- }
-
- /// Get the maximum size of the dynamic buffer.
- /**
- * @returns The allowed maximum of the sum of the sizes of the input sequence
- * and output sequence.
- */
- std::size_t max_size() const BOOST_ASIO_NOEXCEPT
- {
- return max_size_;
- }
-
- /// Get the current capacity of the dynamic buffer.
- /**
- * @returns The current total capacity of the buffer, i.e. for both the input
- * sequence and output sequence.
- */
- std::size_t capacity() const BOOST_ASIO_NOEXCEPT
- {
- return vector_.capacity();
- }
-
- /// Get a list of buffers that represents the input sequence.
- /**
- * @returns An object of type @c const_buffers_type that satisfies
- * ConstBufferSequence requirements, representing the basic_string memory in
- * input sequence.
- *
- * @note The returned object is invalidated by any @c dynamic_vector_buffer
- * or @c basic_string member function that modifies the input sequence or
- * output sequence.
- */
- const_buffers_type data() const BOOST_ASIO_NOEXCEPT
- {
- return const_buffers_type(boost::asio::buffer(vector_, size_));
- }
-
- /// Get a list of buffers that represents the output sequence, with the given
- /// size.
- /**
- * Ensures that the output sequence can accommodate @c n bytes, resizing the
- * basic_string object as necessary.
- *
- * @returns An object of type @c mutable_buffers_type that satisfies
- * MutableBufferSequence requirements, representing basic_string memory
- * at the start of the output sequence of size @c n.
- *
- * @throws std::length_error If <tt>size() + n > max_size()</tt>.
- *
- * @note The returned object is invalidated by any @c dynamic_vector_buffer
- * or @c basic_string member function that modifies the input sequence or
- * output sequence.
- */
- mutable_buffers_type prepare(std::size_t n)
- {
- if (size () > max_size() || max_size() - size() < n)
- {
- std::length_error ex("dynamic_vector_buffer too long");
- boost::asio::detail::throw_exception(ex);
- }
-
- vector_.resize(size_ + n);
-
- return boost::asio::buffer(boost::asio::buffer(vector_) + size_, n);
- }
-
- /// Move bytes from the output sequence to the input sequence.
- /**
- * @param n The number of bytes to append from the start of the output
- * sequence to the end of the input sequence. The remainder of the output
- * sequence is discarded.
- *
- * Requires a preceding call <tt>prepare(x)</tt> where <tt>x >= n</tt>, and
- * no intervening operations that modify the input or output sequence.
- *
- * @note If @c n is greater than the size of the output sequence, the entire
- * output sequence is moved to the input sequence and no error is issued.
- */
- void commit(std::size_t n)
- {
- size_ += (std::min)(n, vector_.size() - size_);
- vector_.resize(size_);
- }
-
- /// Remove characters from the input sequence.
- /**
- * Removes @c n characters from the beginning of the input sequence.
- *
- * @note If @c n is greater than the size of the input sequence, the entire
- * input sequence is consumed and no error is issued.
- */
- void consume(std::size_t n)
- {
- std::size_t consume_length = (std::min)(n, size_);
- vector_.erase(vector_.begin(), vector_.begin() + consume_length);
- size_ -= consume_length;
- }
-
-private:
- std::vector<Elem, Allocator>& vector_;
- std::size_t size_;
- const std::size_t max_size_;
-};
-
-/** @defgroup dynamic_buffer boost::asio::dynamic_buffer
- *
- * @brief The boost::asio::dynamic_buffer function is used to create a
- * dynamically resized buffer from a @c std::basic_string or @c std::vector.
- */
-/*@{*/
-
-/// Create a new dynamic buffer that represents the given string.
-/**
- * @returns <tt>dynamic_string_buffer<Elem, Traits, Allocator>(data)</tt>.
- */
-template <typename Elem, typename Traits, typename Allocator>
-inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
- std::basic_string<Elem, Traits, Allocator>& data) BOOST_ASIO_NOEXCEPT
-{
- return dynamic_string_buffer<Elem, Traits, Allocator>(data);
-}
-
-/// Create a new dynamic buffer that represents the given string.
-/**
- * @returns <tt>dynamic_string_buffer<Elem, Traits, Allocator>(data,
- * max_size)</tt>.
- */
-template <typename Elem, typename Traits, typename Allocator>
-inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
- std::basic_string<Elem, Traits, Allocator>& data,
- std::size_t max_size) BOOST_ASIO_NOEXCEPT
-{
- return dynamic_string_buffer<Elem, Traits, Allocator>(data, max_size);
-}
-
-/// Create a new dynamic buffer that represents the given vector.
-/**
- * @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data)</tt>.
- */
-template <typename Elem, typename Allocator>
-inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
- std::vector<Elem, Allocator>& data) BOOST_ASIO_NOEXCEPT
-{
- return dynamic_vector_buffer<Elem, Allocator>(data);
-}
-
-/// Create a new dynamic buffer that represents the given vector.
-/**
- * @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data, max_size)</tt>.
- */
-template <typename Elem, typename Allocator>
-inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
- std::vector<Elem, Allocator>& data,
- std::size_t max_size) BOOST_ASIO_NOEXCEPT
-{
- return dynamic_vector_buffer<Elem, Allocator>(data, max_size);
-}
-
-/*@}*/
-
-/** @defgroup buffer_copy boost::asio::buffer_copy
- *
- * @brief The boost::asio::buffer_copy function is used to copy bytes from a
- * source buffer (or buffer sequence) to a target buffer (or buffer sequence).
- *
- * The @c buffer_copy function is available in two forms:
- *
- * @li A 2-argument form: @c buffer_copy(target, source)
- *
- * @li A 3-argument form: @c buffer_copy(target, source, max_bytes_to_copy)
- *
- * Both forms return the number of bytes actually copied. The number of bytes
- * copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c If specified, @c max_bytes_to_copy.
- *
- * This prevents buffer overflow, regardless of the buffer sizes used in the
- * copy operation.
- *
- * Note that @ref buffer_copy is implemented in terms of @c memcpy, and
- * consequently it cannot be used to copy between overlapping memory regions.
- */
-/*@{*/
-
-namespace detail {
-
-inline std::size_t buffer_copy_1(const mutable_buffer& target,
- const const_buffer& source)
-{
- using namespace std; // For memcpy.
- std::size_t target_size = target.size();
- std::size_t source_size = source.size();
- std::size_t n = target_size < source_size ? target_size : source_size;
- if (n > 0)
- memcpy(target.data(), source.data(), n);
- return n;
-}
-
-template <typename TargetIterator, typename SourceIterator>
-inline std::size_t buffer_copy(one_buffer, one_buffer,
- TargetIterator target_begin, TargetIterator,
- SourceIterator source_begin, SourceIterator) BOOST_ASIO_NOEXCEPT
-{
- return (buffer_copy_1)(*target_begin, *source_begin);
-}
-
-template <typename TargetIterator, typename SourceIterator>
-inline std::size_t buffer_copy(one_buffer, one_buffer,
- TargetIterator target_begin, TargetIterator,
- SourceIterator source_begin, SourceIterator,
- std::size_t max_bytes_to_copy) BOOST_ASIO_NOEXCEPT
-{
- return (buffer_copy_1)(*target_begin,
- boost::asio::buffer(*source_begin, max_bytes_to_copy));
-}
-
-template <typename TargetIterator, typename SourceIterator>
-std::size_t buffer_copy(one_buffer, multiple_buffers,
- TargetIterator target_begin, TargetIterator,
- SourceIterator source_begin, SourceIterator source_end,
- std::size_t max_bytes_to_copy
- = (std::numeric_limits<std::size_t>::max)()) BOOST_ASIO_NOEXCEPT
-{
- std::size_t total_bytes_copied = 0;
- SourceIterator source_iter = source_begin;
-
- for (mutable_buffer target_buffer(
- boost::asio::buffer(*target_begin, max_bytes_to_copy));
- target_buffer.size() && source_iter != source_end; ++source_iter)
- {
- const_buffer source_buffer(*source_iter);
- std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
- total_bytes_copied += bytes_copied;
- target_buffer += bytes_copied;
- }
-
- return total_bytes_copied;
-}
-
-template <typename TargetIterator, typename SourceIterator>
-std::size_t buffer_copy(multiple_buffers, one_buffer,
- TargetIterator target_begin, TargetIterator target_end,
- SourceIterator source_begin, SourceIterator,
- std::size_t max_bytes_to_copy
- = (std::numeric_limits<std::size_t>::max)()) BOOST_ASIO_NOEXCEPT
-{
- std::size_t total_bytes_copied = 0;
- TargetIterator target_iter = target_begin;
-
- for (const_buffer source_buffer(
- boost::asio::buffer(*source_begin, max_bytes_to_copy));
- source_buffer.size() && target_iter != target_end; ++target_iter)
- {
- mutable_buffer target_buffer(*target_iter);
- std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
- total_bytes_copied += bytes_copied;
- source_buffer += bytes_copied;
- }
-
- return total_bytes_copied;
-}
-
-template <typename TargetIterator, typename SourceIterator>
-std::size_t buffer_copy(multiple_buffers, multiple_buffers,
- TargetIterator target_begin, TargetIterator target_end,
- SourceIterator source_begin, SourceIterator source_end) BOOST_ASIO_NOEXCEPT
-{
- std::size_t total_bytes_copied = 0;
-
- TargetIterator target_iter = target_begin;
- std::size_t target_buffer_offset = 0;
-
- SourceIterator source_iter = source_begin;
- std::size_t source_buffer_offset = 0;
-
- while (target_iter != target_end && source_iter != source_end)
- {
- mutable_buffer target_buffer =
- mutable_buffer(*target_iter) + target_buffer_offset;
-
- const_buffer source_buffer =
- const_buffer(*source_iter) + source_buffer_offset;
-
- std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
- total_bytes_copied += bytes_copied;
-
- if (bytes_copied == target_buffer.size())
- {
- ++target_iter;
- target_buffer_offset = 0;
- }
- else
- target_buffer_offset += bytes_copied;
-
- if (bytes_copied == source_buffer.size())
- {
- ++source_iter;
- source_buffer_offset = 0;
- }
- else
- source_buffer_offset += bytes_copied;
- }
-
- return total_bytes_copied;
-}
-
-template <typename TargetIterator, typename SourceIterator>
-std::size_t buffer_copy(multiple_buffers, multiple_buffers,
- TargetIterator target_begin, TargetIterator target_end,
- SourceIterator source_begin, SourceIterator source_end,
- std::size_t max_bytes_to_copy) BOOST_ASIO_NOEXCEPT
-{
- std::size_t total_bytes_copied = 0;
-
- TargetIterator target_iter = target_begin;
- std::size_t target_buffer_offset = 0;
-
- SourceIterator source_iter = source_begin;
- std::size_t source_buffer_offset = 0;
-
- while (total_bytes_copied != max_bytes_to_copy
- && target_iter != target_end && source_iter != source_end)
- {
- mutable_buffer target_buffer =
- mutable_buffer(*target_iter) + target_buffer_offset;
-
- const_buffer source_buffer =
- const_buffer(*source_iter) + source_buffer_offset;
-
- std::size_t bytes_copied = (buffer_copy_1)(
- target_buffer, boost::asio::buffer(source_buffer,
- max_bytes_to_copy - total_bytes_copied));
- total_bytes_copied += bytes_copied;
-
- if (bytes_copied == target_buffer.size())
- {
- ++target_iter;
- target_buffer_offset = 0;
- }
- else
- target_buffer_offset += bytes_copied;
-
- if (bytes_copied == source_buffer.size())
- {
- ++source_iter;
- source_buffer_offset = 0;
- }
- else
- source_buffer_offset += bytes_copied;
- }
-
- return total_bytes_copied;
-}
-
-} // namespace detail
-
-/// Copies bytes from a source buffer sequence to a target buffer sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A non-modifiable buffer sequence representing the memory
- * regions from which the bytes will be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence, typename ConstBufferSequence>
-inline std::size_t buffer_copy(const MutableBufferSequence& target,
- const ConstBufferSequence& source) BOOST_ASIO_NOEXCEPT
-{
- return detail::buffer_copy(
- detail::buffer_sequence_cardinality<MutableBufferSequence>(),
- detail::buffer_sequence_cardinality<ConstBufferSequence>(),
- boost::asio::buffer_sequence_begin(target),
- boost::asio::buffer_sequence_end(target),
- boost::asio::buffer_sequence_begin(source),
- boost::asio::buffer_sequence_end(source));
-}
-
-/// Copies a limited number of bytes from a source buffer sequence to a target
-/// buffer sequence.
-/**
- * @param target A modifiable buffer sequence representing the memory regions to
- * which the bytes will be copied.
- *
- * @param source A non-modifiable buffer sequence representing the memory
- * regions from which the bytes will be copied.
- *
- * @param max_bytes_to_copy The maximum number of bytes to be copied.
- *
- * @returns The number of bytes copied.
- *
- * @note The number of bytes copied is the lesser of:
- *
- * @li @c buffer_size(target)
- *
- * @li @c buffer_size(source)
- *
- * @li @c max_bytes_to_copy
- *
- * This function is implemented in terms of @c memcpy, and consequently it
- * cannot be used to copy between overlapping memory regions.
- */
-template <typename MutableBufferSequence, typename ConstBufferSequence>
-inline std::size_t buffer_copy(const MutableBufferSequence& target,
- const ConstBufferSequence& source,
- std::size_t max_bytes_to_copy) BOOST_ASIO_NOEXCEPT
-{
- return detail::buffer_copy(
- detail::buffer_sequence_cardinality<MutableBufferSequence>(),
- detail::buffer_sequence_cardinality<ConstBufferSequence>(),
- boost::asio::buffer_sequence_begin(target),
- boost::asio::buffer_sequence_end(target),
- boost::asio::buffer_sequence_begin(source),
- boost::asio::buffer_sequence_end(source), max_bytes_to_copy);
-}
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_BUFFER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/connect.hpp b/src/third_party/boost-1.68.0/boost/asio/connect.hpp
deleted file mode 100644
index 5dd5268bc43..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/connect.hpp
+++ /dev/null
@@ -1,1061 +0,0 @@
-//
-// connect.hpp
-// ~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_CONNECT_HPP
-#define BOOST_ASIO_CONNECT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/basic_socket.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail
-{
- char (&has_iterator_helper(...))[2];
-
- template <typename T>
- char has_iterator_helper(T*, typename T::iterator* = 0);
-
- template <typename T>
- struct has_iterator_typedef
- {
- enum { value = (sizeof((has_iterator_helper)((T*)(0))) == 1) };
- };
-} // namespace detail
-
-/// Type trait used to determine whether a type is an endpoint sequence that can
-/// be used with with @c connect and @c async_connect.
-template <typename T>
-struct is_endpoint_sequence
-{
-#if defined(GENERATING_DOCUMENTATION)
- /// The value member is true if the type may be used as an endpoint sequence.
- static const bool value;
-#else
- enum
- {
- value = detail::has_iterator_typedef<T>::value
- };
-#endif
-};
-
-/**
- * @defgroup connect boost::asio::connect
- *
- * @brief Establishes a socket connection by trying each endpoint in a sequence.
- */
-/*@{*/
-
-/// Establishes a socket connection by trying each endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param endpoints A sequence of endpoints.
- *
- * @returns The successfully connected endpoint.
- *
- * @throws boost::system::system_error Thrown on failure. If the sequence is
- * empty, the associated @c error_code is boost::asio::error::not_found.
- * Otherwise, contains the error from the last connection attempt.
- *
- * @par Example
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
- * boost::asio::connect(s, r.resolve(q)); @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename EndpointSequence>
-typename Protocol::endpoint connect(
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- const EndpointSequence& endpoints,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
-
-/// Establishes a socket connection by trying each endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param endpoints A sequence of endpoints.
- *
- * @param ec Set to indicate what error occurred, if any. If the sequence is
- * empty, set to boost::asio::error::not_found. Otherwise, contains the error
- * from the last connection attempt.
- *
- * @returns On success, the successfully connected endpoint. Otherwise, a
- * default-constructed endpoint.
- *
- * @par Example
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
- * boost::system::error_code ec;
- * boost::asio::connect(s, r.resolve(q), ec);
- * if (ec)
- * {
- * // An error occurred.
- * } @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename EndpointSequence>
-typename Protocol::endpoint connect(
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- const EndpointSequence& endpoints, boost::system::error_code& ec,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-/// (Deprecated.) Establishes a socket connection by trying each endpoint in a
-/// sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @returns On success, an iterator denoting the successfully connected
- * endpoint. Otherwise, the end iterator.
- *
- * @throws boost::system::system_error Thrown on failure. If the sequence is
- * empty, the associated @c error_code is boost::asio::error::not_found.
- * Otherwise, contains the error from the last connection attempt.
- *
- * @note This overload assumes that a default constructed object of type @c
- * Iterator represents the end of the sequence. This is a valid assumption for
- * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s, Iterator begin,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
-
-/// (Deprecated.) Establishes a socket connection by trying each endpoint in a
-/// sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param ec Set to indicate what error occurred, if any. If the sequence is
- * empty, set to boost::asio::error::not_found. Otherwise, contains the error
- * from the last connection attempt.
- *
- * @returns On success, an iterator denoting the successfully connected
- * endpoint. Otherwise, the end iterator.
- *
- * @note This overload assumes that a default constructed object of type @c
- * Iterator represents the end of the sequence. This is a valid assumption for
- * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, boost::system::error_code& ec,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Establishes a socket connection by trying each endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param end An iterator pointing to the end of a sequence of endpoints.
- *
- * @returns An iterator denoting the successfully connected endpoint.
- *
- * @throws boost::system::system_error Thrown on failure. If the sequence is
- * empty, the associated @c error_code is boost::asio::error::not_found.
- * Otherwise, contains the error from the last connection attempt.
- *
- * @par Example
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::resolver::results_type e = r.resolve(q);
- * tcp::socket s(io_context);
- * boost::asio::connect(s, e.begin(), e.end()); @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end);
-
-/// Establishes a socket connection by trying each endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param end An iterator pointing to the end of a sequence of endpoints.
- *
- * @param ec Set to indicate what error occurred, if any. If the sequence is
- * empty, set to boost::asio::error::not_found. Otherwise, contains the error
- * from the last connection attempt.
- *
- * @returns On success, an iterator denoting the successfully connected
- * endpoint. Otherwise, the end iterator.
- *
- * @par Example
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::resolver::results_type e = r.resolve(q);
- * tcp::socket s(io_context);
- * boost::system::error_code ec;
- * boost::asio::connect(s, e.begin(), e.end(), ec);
- * if (ec)
- * {
- * // An error occurred.
- * } @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
-Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end, boost::system::error_code& ec);
-
-/// Establishes a socket connection by trying each endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param endpoints A sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @returns The successfully connected endpoint.
- *
- * @throws boost::system::system_error Thrown on failure. If the sequence is
- * empty, the associated @c error_code is boost::asio::error::not_found.
- * Otherwise, contains the error from the last connection attempt.
- *
- * @par Example
- * The following connect condition function object can be used to output
- * information about the individual connection attempts:
- * @code struct my_connect_condition
- * {
- * bool operator()(
- * const boost::system::error_code& ec,
- * const::tcp::endpoint& next)
- * {
- * if (ec) std::cout << "Error: " << ec.message() << std::endl;
- * std::cout << "Trying: " << next << std::endl;
- * return true;
- * }
- * }; @endcode
- * It would be used with the boost::asio::connect function as follows:
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
- * tcp::endpoint e = boost::asio::connect(s,
- * r.resolve(q), my_connect_condition());
- * std::cout << "Connected to: " << e << std::endl; @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- const EndpointSequence& endpoints, ConnectCondition connect_condition,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
-
-/// Establishes a socket connection by trying each endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param endpoints A sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @param ec Set to indicate what error occurred, if any. If the sequence is
- * empty, set to boost::asio::error::not_found. Otherwise, contains the error
- * from the last connection attempt.
- *
- * @returns On success, the successfully connected endpoint. Otherwise, a
- * default-constructed endpoint.
- *
- * @par Example
- * The following connect condition function object can be used to output
- * information about the individual connection attempts:
- * @code struct my_connect_condition
- * {
- * bool operator()(
- * const boost::system::error_code& ec,
- * const::tcp::endpoint& next)
- * {
- * if (ec) std::cout << "Error: " << ec.message() << std::endl;
- * std::cout << "Trying: " << next << std::endl;
- * return true;
- * }
- * }; @endcode
- * It would be used with the boost::asio::connect function as follows:
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
- * boost::system::error_code ec;
- * tcp::endpoint e = boost::asio::connect(s,
- * r.resolve(q), my_connect_condition(), ec);
- * if (ec)
- * {
- * // An error occurred.
- * }
- * else
- * {
- * std::cout << "Connected to: " << e << std::endl;
- * } @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename ConnectCondition>
-typename Protocol::endpoint connect(
- basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- const EndpointSequence& endpoints, ConnectCondition connect_condition,
- boost::system::error_code& ec,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-/// (Deprecated.) Establishes a socket connection by trying each endpoint in a
-/// sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @returns On success, an iterator denoting the successfully connected
- * endpoint. Otherwise, the end iterator.
- *
- * @throws boost::system::system_error Thrown on failure. If the sequence is
- * empty, the associated @c error_code is boost::asio::error::not_found.
- * Otherwise, contains the error from the last connection attempt.
- *
- * @note This overload assumes that a default constructed object of type @c
- * Iterator represents the end of the sequence. This is a valid assumption for
- * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, ConnectCondition connect_condition,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
-
-/// (Deprecated.) Establishes a socket connection by trying each endpoint in a
-/// sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @param ec Set to indicate what error occurred, if any. If the sequence is
- * empty, set to boost::asio::error::not_found. Otherwise, contains the error
- * from the last connection attempt.
- *
- * @returns On success, an iterator denoting the successfully connected
- * endpoint. Otherwise, the end iterator.
- *
- * @note This overload assumes that a default constructed object of type @c
- * Iterator represents the end of the sequence. This is a valid assumption for
- * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s, Iterator begin,
- ConnectCondition connect_condition, boost::system::error_code& ec,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Establishes a socket connection by trying each endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param end An iterator pointing to the end of a sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @returns An iterator denoting the successfully connected endpoint.
- *
- * @throws boost::system::system_error Thrown on failure. If the sequence is
- * empty, the associated @c error_code is boost::asio::error::not_found.
- * Otherwise, contains the error from the last connection attempt.
- *
- * @par Example
- * The following connect condition function object can be used to output
- * information about the individual connection attempts:
- * @code struct my_connect_condition
- * {
- * bool operator()(
- * const boost::system::error_code& ec,
- * const::tcp::endpoint& next)
- * {
- * if (ec) std::cout << "Error: " << ec.message() << std::endl;
- * std::cout << "Trying: " << next << std::endl;
- * return true;
- * }
- * }; @endcode
- * It would be used with the boost::asio::connect function as follows:
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::resolver::results_type e = r.resolve(q);
- * tcp::socket s(io_context);
- * tcp::resolver::results_type::iterator i = boost::asio::connect(
- * s, e.begin(), e.end(), my_connect_condition());
- * std::cout << "Connected to: " << i->endpoint() << std::endl; @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s, Iterator begin,
- Iterator end, ConnectCondition connect_condition);
-
-/// Establishes a socket connection by trying each endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c connect member
- * function, once for each endpoint in the sequence, until a connection is
- * successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param end An iterator pointing to the end of a sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @param ec Set to indicate what error occurred, if any. If the sequence is
- * empty, set to boost::asio::error::not_found. Otherwise, contains the error
- * from the last connection attempt.
- *
- * @returns On success, an iterator denoting the successfully connected
- * endpoint. Otherwise, the end iterator.
- *
- * @par Example
- * The following connect condition function object can be used to output
- * information about the individual connection attempts:
- * @code struct my_connect_condition
- * {
- * bool operator()(
- * const boost::system::error_code& ec,
- * const::tcp::endpoint& next)
- * {
- * if (ec) std::cout << "Error: " << ec.message() << std::endl;
- * std::cout << "Trying: " << next << std::endl;
- * return true;
- * }
- * }; @endcode
- * It would be used with the boost::asio::connect function as follows:
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::resolver::results_type e = r.resolve(q);
- * tcp::socket s(io_context);
- * boost::system::error_code ec;
- * tcp::resolver::results_type::iterator i = boost::asio::connect(
- * s, e.begin(), e.end(), my_connect_condition());
- * if (ec)
- * {
- * // An error occurred.
- * }
- * else
- * {
- * std::cout << "Connected to: " << i->endpoint() << std::endl;
- * } @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename ConnectCondition>
-Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end, ConnectCondition connect_condition,
- boost::system::error_code& ec);
-
-/*@}*/
-
-/**
- * @defgroup async_connect boost::asio::async_connect
- *
- * @brief Asynchronously establishes a socket connection by trying each
- * endpoint in a sequence.
- */
-/*@{*/
-
-/// Asynchronously establishes a socket connection by trying each endpoint in a
-/// sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c async_connect
- * member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param endpoints A sequence of endpoints.
- *
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * // Result of operation. if the sequence is empty, set to
- * // boost::asio::error::not_found. Otherwise, contains the
- * // error from the last connection attempt.
- * const boost::system::error_code& error,
- *
- * // On success, the successfully connected endpoint.
- * // Otherwise, a default-constructed endpoint.
- * const typename Protocol::endpoint& endpoint
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
- *
- * // ...
- *
- * r.async_resolve(q, resolve_handler);
- *
- * // ...
- *
- * void resolve_handler(
- * const boost::system::error_code& ec,
- * tcp::resolver::results_type results)
- * {
- * if (!ec)
- * {
- * boost::asio::async_connect(s, results, connect_handler);
- * }
- * }
- *
- * // ...
- *
- * void connect_handler(
- * const boost::system::error_code& ec,
- * const tcp::endpoint& endpoint)
- * {
- * // ...
- * } @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename EndpointSequence, typename RangeConnectHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
- void (boost::system::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- const EndpointSequence& endpoints,
- BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-/// (Deprecated.) Asynchronously establishes a socket connection by trying each
-/// endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c async_connect
- * member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * // Result of operation. if the sequence is empty, set to
- * // boost::asio::error::not_found. Otherwise, contains the
- * // error from the last connection attempt.
- * const boost::system::error_code& error,
- *
- * // On success, an iterator denoting the successfully
- * // connected endpoint. Otherwise, the end iterator.
- * Iterator iterator
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note This overload assumes that a default constructed object of type @c
- * Iterator represents the end of the sequence. This is a valid assumption for
- * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename IteratorConnectHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (boost::system::error_code, Iterator))
-async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Asynchronously establishes a socket connection by trying each endpoint in a
-/// sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c async_connect
- * member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param end An iterator pointing to the end of a sequence of endpoints.
- *
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * // Result of operation. if the sequence is empty, set to
- * // boost::asio::error::not_found. Otherwise, contains the
- * // error from the last connection attempt.
- * const boost::system::error_code& error,
- *
- * // On success, an iterator denoting the successfully
- * // connected endpoint. Otherwise, the end iterator.
- * Iterator iterator
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * @code std::vector<tcp::endpoint> endpoints = ...;
- * tcp::socket s(io_context);
- * boost::asio::async_connect(s,
- * endpoints.begin(), endpoints.end(),
- * connect_handler);
- *
- * // ...
- *
- * void connect_handler(
- * const boost::system::error_code& ec,
- * std::vector<tcp::endpoint>::iterator i)
- * {
- * // ...
- * } @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM,
- typename Iterator, typename IteratorConnectHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (boost::system::error_code, Iterator))
-async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end,
- BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler);
-
-/// Asynchronously establishes a socket connection by trying each endpoint in a
-/// sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c async_connect
- * member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param endpoints A sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * // Result of operation. if the sequence is empty, set to
- * // boost::asio::error::not_found. Otherwise, contains the
- * // error from the last connection attempt.
- * const boost::system::error_code& error,
- *
- * // On success, an iterator denoting the successfully
- * // connected endpoint. Otherwise, the end iterator.
- * Iterator iterator
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * The following connect condition function object can be used to output
- * information about the individual connection attempts:
- * @code struct my_connect_condition
- * {
- * bool operator()(
- * const boost::system::error_code& ec,
- * const::tcp::endpoint& next)
- * {
- * if (ec) std::cout << "Error: " << ec.message() << std::endl;
- * std::cout << "Trying: " << next << std::endl;
- * return true;
- * }
- * }; @endcode
- * It would be used with the boost::asio::connect function as follows:
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
- *
- * // ...
- *
- * r.async_resolve(q, resolve_handler);
- *
- * // ...
- *
- * void resolve_handler(
- * const boost::system::error_code& ec,
- * tcp::resolver::results_type results)
- * {
- * if (!ec)
- * {
- * boost::asio::async_connect(s, results,
- * my_connect_condition(),
- * connect_handler);
- * }
- * }
- *
- * // ...
- *
- * void connect_handler(
- * const boost::system::error_code& ec,
- * const tcp::endpoint& endpoint)
- * {
- * if (ec)
- * {
- * // An error occurred.
- * }
- * else
- * {
- * std::cout << "Connected to: " << endpoint << std::endl;
- * }
- * } @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename EndpointSequence,
- typename ConnectCondition, typename RangeConnectHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
- void (boost::system::error_code, typename Protocol::endpoint))
-async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- const EndpointSequence& endpoints, ConnectCondition connect_condition,
- BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler,
- typename enable_if<is_endpoint_sequence<
- EndpointSequence>::value>::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-/// (Deprecated.) Asynchronously establishes a socket connection by trying each
-/// endpoint in a sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c async_connect
- * member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * // Result of operation. if the sequence is empty, set to
- * // boost::asio::error::not_found. Otherwise, contains the
- * // error from the last connection attempt.
- * const boost::system::error_code& error,
- *
- * // On success, an iterator denoting the successfully
- * // connected endpoint. Otherwise, the end iterator.
- * Iterator iterator
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note This overload assumes that a default constructed object of type @c
- * Iterator represents the end of the sequence. This is a valid assumption for
- * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (boost::system::error_code, Iterator))
-async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s, Iterator begin,
- ConnectCondition connect_condition,
- BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler,
- typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-/// Asynchronously establishes a socket connection by trying each endpoint in a
-/// sequence.
-/**
- * This function attempts to connect a socket to one of a sequence of
- * endpoints. It does this by repeated calls to the socket's @c async_connect
- * member function, once for each endpoint in the sequence, until a connection
- * is successfully established.
- *
- * @param s The socket to be connected. If the socket is already open, it will
- * be closed.
- *
- * @param begin An iterator pointing to the start of a sequence of endpoints.
- *
- * @param end An iterator pointing to the end of a sequence of endpoints.
- *
- * @param connect_condition A function object that is called prior to each
- * connection attempt. The signature of the function object must be:
- * @code bool connect_condition(
- * const boost::system::error_code& ec,
- * const typename Protocol::endpoint& next); @endcode
- * The @c ec parameter contains the result from the most recent connect
- * operation. Before the first connection attempt, @c ec is always set to
- * indicate success. The @c next parameter is the next endpoint to be tried.
- * The function object should return true if the next endpoint should be tried,
- * and false if it should be skipped.
- *
- * @param handler The handler to be called when the connect operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * // Result of operation. if the sequence is empty, set to
- * // boost::asio::error::not_found. Otherwise, contains the
- * // error from the last connection attempt.
- * const boost::system::error_code& error,
- *
- * // On success, an iterator denoting the successfully
- * // connected endpoint. Otherwise, the end iterator.
- * Iterator iterator
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * The following connect condition function object can be used to output
- * information about the individual connection attempts:
- * @code struct my_connect_condition
- * {
- * bool operator()(
- * const boost::system::error_code& ec,
- * const::tcp::endpoint& next)
- * {
- * if (ec) std::cout << "Error: " << ec.message() << std::endl;
- * std::cout << "Trying: " << next << std::endl;
- * return true;
- * }
- * }; @endcode
- * It would be used with the boost::asio::connect function as follows:
- * @code tcp::resolver r(io_context);
- * tcp::resolver::query q("host", "service");
- * tcp::socket s(io_context);
- *
- * // ...
- *
- * r.async_resolve(q, resolve_handler);
- *
- * // ...
- *
- * void resolve_handler(
- * const boost::system::error_code& ec,
- * tcp::resolver::iterator i)
- * {
- * if (!ec)
- * {
- * tcp::resolver::iterator end;
- * boost::asio::async_connect(s, i, end,
- * my_connect_condition(),
- * connect_handler);
- * }
- * }
- *
- * // ...
- *
- * void connect_handler(
- * const boost::system::error_code& ec,
- * tcp::resolver::iterator i)
- * {
- * if (ec)
- * {
- * // An error occurred.
- * }
- * else
- * {
- * std::cout << "Connected to: " << i->endpoint() << std::endl;
- * }
- * } @endcode
- */
-template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
- typename ConnectCondition, typename IteratorConnectHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
- void (boost::system::error_code, Iterator))
-async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
- Iterator begin, Iterator end, ConnectCondition connect_condition,
- BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler);
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/connect.hpp>
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/config.hpp b/src/third_party/boost-1.68.0/boost/asio/detail/config.hpp
deleted file mode 100644
index 126be7e64fc..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/detail/config.hpp
+++ /dev/null
@@ -1,1435 +0,0 @@
-//
-// detail/config.hpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_CONFIG_HPP
-#define BOOST_ASIO_DETAIL_CONFIG_HPP
-
-#if defined(BOOST_ASIO_STANDALONE)
-# define BOOST_ASIO_DISABLE_BOOST_ARRAY 1
-# define BOOST_ASIO_DISABLE_BOOST_ASSERT 1
-# define BOOST_ASIO_DISABLE_BOOST_BIND 1
-# define BOOST_ASIO_DISABLE_BOOST_CHRONO 1
-# define BOOST_ASIO_DISABLE_BOOST_DATE_TIME 1
-# define BOOST_ASIO_DISABLE_BOOST_LIMITS 1
-# define BOOST_ASIO_DISABLE_BOOST_REGEX 1
-# define BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT 1
-# define BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION 1
-# define BOOST_ASIO_DISABLE_BOOST_WORKAROUND 1
-#else // defined(BOOST_ASIO_STANDALONE)
-# include <boost/config.hpp>
-# include <boost/version.hpp>
-# define BOOST_ASIO_HAS_BOOST_CONFIG 1
-#endif // defined(BOOST_ASIO_STANDALONE)
-
-// Default to a header-only implementation. The user must specifically request
-// separate compilation by defining either BOOST_ASIO_SEPARATE_COMPILATION or
-// BOOST_ASIO_DYN_LINK (as a DLL/shared library implies separate compilation).
-#if !defined(BOOST_ASIO_HEADER_ONLY)
-# if !defined(BOOST_ASIO_SEPARATE_COMPILATION)
-# if !defined(BOOST_ASIO_DYN_LINK)
-# define BOOST_ASIO_HEADER_ONLY 1
-# endif // !defined(BOOST_ASIO_DYN_LINK)
-# endif // !defined(BOOST_ASIO_SEPARATE_COMPILATION)
-#endif // !defined(BOOST_ASIO_HEADER_ONLY)
-
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# define BOOST_ASIO_DECL inline
-#else // defined(BOOST_ASIO_HEADER_ONLY)
-# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
-// We need to import/export our code only if the user has specifically asked
-// for it by defining BOOST_ASIO_DYN_LINK.
-# if defined(BOOST_ASIO_DYN_LINK)
-// Export if this is our own source, otherwise import.
-# if defined(BOOST_ASIO_SOURCE)
-# define BOOST_ASIO_DECL __declspec(dllexport)
-# else // defined(BOOST_ASIO_SOURCE)
-# define BOOST_ASIO_DECL __declspec(dllimport)
-# endif // defined(BOOST_ASIO_SOURCE)
-# endif // defined(BOOST_ASIO_DYN_LINK)
-# endif // defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-// If BOOST_ASIO_DECL isn't defined yet define it now.
-#if !defined(BOOST_ASIO_DECL)
-# define BOOST_ASIO_DECL
-#endif // !defined(BOOST_ASIO_DECL)
-
-// Microsoft Visual C++ detection.
-#if !defined(BOOST_ASIO_MSVC)
-# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
-# define BOOST_ASIO_MSVC BOOST_MSVC
-# elif defined(_MSC_VER) && (defined(__INTELLISENSE__) \
- || (!defined(__MWERKS__) && !defined(__EDG_VERSION__)))
-# define BOOST_ASIO_MSVC _MSC_VER
-# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
-#endif // !defined(BOOST_ASIO_MSVC)
-#if defined(BOOST_ASIO_MSVC)
-# include <ciso646> // Needed for _HAS_CXX17.
-#endif // defined(BOOST_ASIO_MSVC)
-
-// Clang / libc++ detection.
-#if defined(__clang__)
-# if (__cplusplus >= 201103)
-# if __has_include(<__config>)
-# include <__config>
-# if defined(_LIBCPP_VERSION)
-# define BOOST_ASIO_HAS_CLANG_LIBCXX 1
-# endif // defined(_LIBCPP_VERSION)
-# endif // __has_include(<__config>)
-# endif // (__cplusplus >= 201103)
-#endif // defined(__clang__)
-
-// Android platform detection.
-#if defined(__ANDROID__)
-# include <android/api-level.h>
-#endif // defined(__ANDROID__)
-
-// Support move construction and assignment on compilers known to allow it.
-#if !defined(BOOST_ASIO_HAS_MOVE)
-# if !defined(BOOST_ASIO_DISABLE_MOVE)
-# if defined(__clang__)
-# if __has_feature(__cxx_rvalue_references__)
-# define BOOST_ASIO_HAS_MOVE 1
-# endif // __has_feature(__cxx_rvalue_references__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_MOVE 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_MOVE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_MOVE)
-#endif // !defined(BOOST_ASIO_HAS_MOVE)
-
-// If BOOST_ASIO_MOVE_CAST isn't defined, and move support is available, define
-// BOOST_ASIO_MOVE_ARG and BOOST_ASIO_MOVE_CAST to take advantage of rvalue
-// references and perfect forwarding.
-#if defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST)
-# define BOOST_ASIO_MOVE_ARG(type) type&&
-# define BOOST_ASIO_MOVE_ARG2(type1, type2) type1, type2&&
-# define BOOST_ASIO_MOVE_CAST(type) static_cast<type&&>
-# define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<type1, type2&&>
-#endif // defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST)
-
-// If BOOST_ASIO_MOVE_CAST still isn't defined, default to a C++03-compatible
-// implementation. Note that older g++ and MSVC versions don't like it when you
-// pass a non-member function through a const reference, so for most compilers
-// we'll play it safe and stick with the old approach of passing the handler by
-// value.
-#if !defined(BOOST_ASIO_MOVE_CAST)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
-# define BOOST_ASIO_MOVE_ARG(type) const type&
-# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
-# define BOOST_ASIO_MOVE_ARG(type) type
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
-# elif defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1400)
-# define BOOST_ASIO_MOVE_ARG(type) const type&
-# else // (_MSC_VER >= 1400)
-# define BOOST_ASIO_MOVE_ARG(type) type
-# endif // (_MSC_VER >= 1400)
-# else
-# define BOOST_ASIO_MOVE_ARG(type) type
-# endif
-# define BOOST_ASIO_MOVE_CAST(type) static_cast<const type&>
-# define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<const type1, type2&>
-#endif // !defined(BOOST_ASIO_MOVE_CAST)
-
-// Support variadic templates on compilers known to allow it.
-#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-# if !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
-# if defined(__clang__)
-# if __has_feature(__cxx_variadic_templates__)
-# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
-# endif // __has_feature(__cxx_variadic_templates__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
-# endif // (_MSC_VER >= 1900)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
-#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-// Support deleted functions on compilers known to allow it.
-#if !defined(BOOST_ASIO_DELETED)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_DELETED = delete
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(__clang__)
-# if __has_feature(__cxx_deleted_functions__)
-# define BOOST_ASIO_DELETED = delete
-# endif // __has_feature(__cxx_deleted_functions__)
-# endif // defined(__clang__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define BOOST_ASIO_DELETED = delete
-# endif // (_MSC_VER >= 1900)
-# endif // defined(BOOST_ASIO_MSVC)
-# if !defined(BOOST_ASIO_DELETED)
-# define BOOST_ASIO_DELETED
-# endif // !defined(BOOST_ASIO_DELETED)
-#endif // !defined(BOOST_ASIO_DELETED)
-
-// Support constexpr on compilers known to allow it.
-#if !defined(BOOST_ASIO_HAS_CONSTEXPR)
-# if !defined(BOOST_ASIO_DISABLE_CONSTEXPR)
-# if defined(__clang__)
-# if __has_feature(__cxx_constexpr__)
-# define BOOST_ASIO_HAS_CONSTEXPR 1
-# endif // __has_feature(__cxx_constexr__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_CONSTEXPR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define BOOST_ASIO_HAS_CONSTEXPR 1
-# endif // (_MSC_VER >= 1900)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_CONSTEXPR)
-#endif // !defined(BOOST_ASIO_HAS_CONSTEXPR)
-#if !defined(BOOST_ASIO_CONSTEXPR)
-# if defined(BOOST_ASIO_HAS_CONSTEXPR)
-# define BOOST_ASIO_CONSTEXPR constexpr
-# else // defined(BOOST_ASIO_HAS_CONSTEXPR)
-# define BOOST_ASIO_CONSTEXPR
-# endif // defined(BOOST_ASIO_HAS_CONSTEXPR)
-#endif // !defined(BOOST_ASIO_CONSTEXPR)
-
-// Support noexcept on compilers known to allow it.
-#if !defined(BOOST_ASIO_NOEXCEPT)
-# if !defined(BOOST_ASIO_DISABLE_NOEXCEPT)
-# if (BOOST_VERSION >= 105300)
-# define BOOST_ASIO_NOEXCEPT BOOST_NOEXCEPT
-# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW
-# elif defined(__clang__)
-# if __has_feature(__cxx_noexcept__)
-# define BOOST_ASIO_NOEXCEPT noexcept(true)
-# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
-# endif // __has_feature(__cxx_noexcept__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_NOEXCEPT noexcept(true)
-# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# elif defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define BOOST_ASIO_NOEXCEPT noexcept(true)
-# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
-# endif // (_MSC_VER >= 1900)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_NOEXCEPT)
-# if !defined(BOOST_ASIO_NOEXCEPT)
-# define BOOST_ASIO_NOEXCEPT
-# endif // !defined(BOOST_ASIO_NOEXCEPT)
-# if !defined(BOOST_ASIO_NOEXCEPT_OR_NOTHROW)
-# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW throw()
-# endif // !defined(BOOST_ASIO_NOEXCEPT_OR_NOTHROW)
-#endif // !defined(BOOST_ASIO_NOEXCEPT)
-
-// Support automatic type deduction on compilers known to support it.
-#if !defined(BOOST_ASIO_HAS_DECLTYPE)
-# if !defined(BOOST_ASIO_DISABLE_DECLTYPE)
-# if defined(__clang__)
-# if __has_feature(__cxx_decltype__)
-# define BOOST_ASIO_HAS_DECLTYPE 1
-# endif // __has_feature(__cxx_decltype__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_DECLTYPE 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_DECLTYPE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_DECLTYPE)
-#endif // !defined(BOOST_ASIO_HAS_DECLTYPE)
-
-// Support alias templates on compilers known to allow it.
-#if !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
-# if !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES)
-# if defined(__clang__)
-# if __has_feature(__cxx_alias_templates__)
-# define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1
-# endif // __has_feature(__cxx_alias_templates__)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1
-# endif // (_MSC_VER >= 1900)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES)
-#endif // !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
-
-// Standard library support for system errors.
-# if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<system_error>)
-# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // __has_include(<system_error>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
-
-// Compliant C++11 compilers put noexcept specifiers on error_category members.
-#if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
-# if (BOOST_VERSION >= 105300)
-# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT
-# elif defined(__clang__)
-# if __has_feature(__cxx_noexcept__)
-# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // __has_feature(__cxx_noexcept__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# elif defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1900)
-# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
-# endif // (_MSC_VER >= 1900)
-# endif // defined(BOOST_ASIO_MSVC)
-# if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
-# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
-# endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
-#endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
-
-// Standard library support for arrays.
-#if !defined(BOOST_ASIO_HAS_STD_ARRAY)
-# if !defined(BOOST_ASIO_DISABLE_STD_ARRAY)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_ARRAY 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<array>)
-# define BOOST_ASIO_HAS_STD_ARRAY 1
-# endif // __has_include(<array>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_ARRAY 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define BOOST_ASIO_HAS_STD_ARRAY 1
-# endif // (_MSC_VER >= 1600)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_ARRAY)
-#endif // !defined(BOOST_ASIO_HAS_STD_ARRAY)
-
-// Standard library support for shared_ptr and weak_ptr.
-#if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
-# if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
-# elif (__cplusplus >= 201103)
-# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
-# endif // (_MSC_VER >= 1600)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR)
-#endif // !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
-
-// Standard library support for allocator_arg_t.
-#if !defined(BOOST_ASIO_HAS_STD_ALLOCATOR_ARG)
-# if !defined(BOOST_ASIO_DISABLE_STD_ALLOCATOR_ARG)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
-# elif (__cplusplus >= 201103)
-# define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1600)
-# define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
-# endif // (_MSC_VER >= 1600)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_ALLOCATOR_ARG)
-#endif // !defined(BOOST_ASIO_HAS_STD_ALLOCATOR_ARG)
-
-// Standard library support for atomic operations.
-#if !defined(BOOST_ASIO_HAS_STD_ATOMIC)
-# if !defined(BOOST_ASIO_DISABLE_STD_ATOMIC)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_ATOMIC 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<atomic>)
-# define BOOST_ASIO_HAS_STD_ATOMIC 1
-# endif // __has_include(<atomic>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_ATOMIC 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_ATOMIC 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_ATOMIC)
-#endif // !defined(BOOST_ASIO_HAS_STD_ATOMIC)
-
-// Standard library support for chrono. Some standard libraries (such as the
-// libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x
-// drafts, rather than the eventually standardised name of steady_clock.
-#if !defined(BOOST_ASIO_HAS_STD_CHRONO)
-# if !defined(BOOST_ASIO_DISABLE_STD_CHRONO)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_CHRONO 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<chrono>)
-# define BOOST_ASIO_HAS_STD_CHRONO 1
-# endif // __has_include(<chrono>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_CHRONO 1
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
-# define BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK 1
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_CHRONO 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_CHRONO)
-#endif // !defined(BOOST_ASIO_HAS_STD_CHRONO)
-
-// Boost support for chrono.
-#if !defined(BOOST_ASIO_HAS_BOOST_CHRONO)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO)
-# if (BOOST_VERSION >= 104700)
-# define BOOST_ASIO_HAS_BOOST_CHRONO 1
-# endif // (BOOST_VERSION >= 104700)
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_CHRONO)
-
-// Some form of chrono library is available.
-#if !defined(BOOST_ASIO_HAS_CHRONO)
-# if defined(BOOST_ASIO_HAS_STD_CHRONO) \
- || defined(BOOST_ASIO_HAS_BOOST_CHRONO)
-# define BOOST_ASIO_HAS_CHRONO 1
-# endif // defined(BOOST_ASIO_HAS_STD_CHRONO)
- // || defined(BOOST_ASIO_HAS_BOOST_CHRONO)
-#endif // !defined(BOOST_ASIO_HAS_CHRONO)
-
-// Boost support for the DateTime library.
-#if !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME)
-# define BOOST_ASIO_HAS_BOOST_DATE_TIME 1
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
-
-// Standard library support for addressof.
-#if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
-# if !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
-# elif (__cplusplus >= 201103)
-# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF)
-#endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
-
-// Standard library support for the function class.
-#if !defined(BOOST_ASIO_HAS_STD_FUNCTION)
-# if !defined(BOOST_ASIO_DISABLE_STD_FUNCTION)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_FUNCTION 1
-# elif (__cplusplus >= 201103)
-# define BOOST_ASIO_HAS_STD_FUNCTION 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_FUNCTION 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_FUNCTION 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_FUNCTION)
-#endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION)
-
-// Standard library support for type traits.
-#if !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
-# if !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<type_traits>)
-# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
-# endif // __has_include(<type_traits>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS)
-#endif // !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
-
-// Standard library support for the nullptr_t type.
-#if !defined(BOOST_ASIO_HAS_NULLPTR)
-# if !defined(BOOST_ASIO_DISABLE_NULLPTR)
-# if defined(__clang__)
-# if __has_feature(__cxx_nullptr__)
-# define BOOST_ASIO_HAS_NULLPTR 1
-# endif // __has_feature(__cxx_rvalue_references__)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_NULLPTR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_NULLPTR 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_NULLPTR)
-#endif // !defined(BOOST_ASIO_HAS_NULLPTR)
-
-// Standard library support for the C++11 allocator additions.
-#if !defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
-# if !defined(BOOST_ASIO_DISABLE_CXX11_ALLOCATORS)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
-# elif (__cplusplus >= 201103)
-# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
-# endif // (__cplusplus >= 201103)
-# elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1800)
-# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
-# endif // (_MSC_VER >= 1800)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_CXX11_ALLOCATORS)
-#endif // !defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
-
-// Standard library support for the cstdint header.
-#if !defined(BOOST_ASIO_HAS_CSTDINT)
-# if !defined(BOOST_ASIO_DISABLE_CSTDINT)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_CSTDINT 1
-# elif (__cplusplus >= 201103)
-# define BOOST_ASIO_HAS_CSTDINT 1
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_CSTDINT 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_CSTDINT 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_CSTDINT)
-#endif // !defined(BOOST_ASIO_HAS_CSTDINT)
-
-// Standard library support for the thread class.
-#if !defined(BOOST_ASIO_HAS_STD_THREAD)
-# if !defined(BOOST_ASIO_DISABLE_STD_THREAD)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_THREAD 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<thread>)
-# define BOOST_ASIO_HAS_STD_THREAD 1
-# endif // __has_include(<thread>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_THREAD 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_THREAD 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_THREAD)
-#endif // !defined(BOOST_ASIO_HAS_STD_THREAD)
-
-// Standard library support for the mutex and condition variable classes.
-#if !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-# if !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<mutex>)
-# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // __has_include(<mutex>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR)
-#endif // !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
-
-// Standard library support for the call_once function.
-#if !defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
-# if !defined(BOOST_ASIO_DISABLE_STD_CALL_ONCE)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_CALL_ONCE 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<mutex>)
-# define BOOST_ASIO_HAS_STD_CALL_ONCE 1
-# endif // __has_include(<mutex>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_CALL_ONCE 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_CALL_ONCE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_CALL_ONCE)
-#endif // !defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
-
-// Standard library support for futures.
-#if !defined(BOOST_ASIO_HAS_STD_FUTURE)
-# if !defined(BOOST_ASIO_DISABLE_STD_FUTURE)
-# if defined(__clang__)
-# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
-# define BOOST_ASIO_HAS_STD_FUTURE 1
-# elif (__cplusplus >= 201103)
-# if __has_include(<future>)
-# define BOOST_ASIO_HAS_STD_FUTURE 1
-# endif // __has_include(<mutex>)
-# endif // (__cplusplus >= 201103)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# if defined(_GLIBCXX_HAS_GTHREADS)
-# define BOOST_ASIO_HAS_STD_FUTURE 1
-# endif // defined(_GLIBCXX_HAS_GTHREADS)
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_FUTURE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_FUTURE)
-#endif // !defined(BOOST_ASIO_HAS_STD_FUTURE)
-
-// Standard library support for std::string_view.
-#if !defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
-# if !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW)
-# if defined(__clang__)
-# if (__cplusplus >= 201703)
-# if __has_include(<string_view>)
-# define BOOST_ASIO_HAS_STD_STRING_VIEW 1
-# endif // __has_include(<string_view>)
-# endif // (__cplusplus >= 201703)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if (__GNUC__ >= 7)
-# if (__cplusplus >= 201703)
-# define BOOST_ASIO_HAS_STD_STRING_VIEW 1
-# endif // (__cplusplus >= 201703)
-# endif // (__GNUC__ >= 7)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1910 && _HAS_CXX17)
-# define BOOST_ASIO_HAS_STD_STRING_VIEW
-# endif // (_MSC_VER >= 1910 && _HAS_CXX17)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW)
-#endif // !defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
-
-// Standard library support for std::experimental::string_view.
-#if !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-# if !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
-# if defined(__clang__)
-# if (__cplusplus >= 201402)
-# if __has_include(<experimental/string_view>)
-# define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
-# endif // __has_include(<experimental/string_view>)
-# endif // (__cplusplus >= 201402)
-# endif // defined(__clang__)
-# if defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
-# if (__cplusplus >= 201402)
-# define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
-# endif // (__cplusplus >= 201402)
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
-#endif // !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-
-// Standard library has a string_view that we can use.
-#if !defined(BOOST_ASIO_HAS_STRING_VIEW)
-# if !defined(BOOST_ASIO_DISABLE_STRING_VIEW)
-# if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
-# define BOOST_ASIO_HAS_STRING_VIEW 1
-# elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-# define BOOST_ASIO_HAS_STRING_VIEW 1
-# endif // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
-# endif // !defined(BOOST_ASIO_DISABLE_STRING_VIEW)
-#endif // !defined(BOOST_ASIO_HAS_STRING_VIEW)
-
-// Standard library support for iostream move construction and assignment.
-#if !defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE)
-# if !defined(BOOST_ASIO_DISABLE_STD_IOSTREAM_MOVE)
-# if defined(__GNUC__)
-# if (__GNUC__ > 4)
-# if defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_ASIO_HAS_STD_IOSTREAM_MOVE 1
-# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
-# endif // (__GNUC__ > 4)
-# endif // defined(__GNUC__)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_STD_IOSTREAM_MOVE 1
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_IOSTREAM_MOVE)
-#endif // !defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE)
-
-// Standard library has invoke_result (which supersedes result_of).
-#if !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
-# if !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_VER >= 1910 && _HAS_CXX17)
-# define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
-# endif // (_MSC_VER >= 1910 && _HAS_CXX17)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
-#endif // !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
-
-// Windows App target. Windows but with a limited API.
-#if !defined(BOOST_ASIO_WINDOWS_APP)
-# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
-# include <winapifamily.h>
-# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
- && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-# define BOOST_ASIO_WINDOWS_APP 1
-# endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
- // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-# endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
-#endif // !defined(BOOST_ASIO_WINDOWS_APP)
-
-// Legacy WinRT target. Windows App is preferred.
-#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# if !defined(BOOST_ASIO_WINDOWS_APP)
-# if defined(__cplusplus_winrt)
-# include <winapifamily.h>
-# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
- && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-# define BOOST_ASIO_WINDOWS_RUNTIME 1
-# endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
- // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
-# endif // defined(__cplusplus_winrt)
-# endif // !defined(BOOST_ASIO_WINDOWS_APP)
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-// Windows target. Excludes WinRT but includes Windows App targets.
-#if !defined(BOOST_ASIO_WINDOWS)
-# if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS)
-# define BOOST_ASIO_WINDOWS 1
-# elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
-# define BOOST_ASIO_WINDOWS 1
-# elif defined(BOOST_ASIO_WINDOWS_APP)
-# define BOOST_ASIO_WINDOWS 1
-# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS)
-# endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-#endif // !defined(BOOST_ASIO_WINDOWS)
-
-// Windows: target OS version.
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-# pragma message( \
- "Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:\n"\
- "- add -D_WIN32_WINNT=0x0501 to the compiler command line; or\n"\
- "- add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions.\n"\
- "Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).")
-# else // defined(_MSC_VER) || defined(__BORLANDC__)
-# warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately.
-# warning For example, add -D_WIN32_WINNT=0x0501 to the compiler command line.
-# warning Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).
-# endif // defined(_MSC_VER) || defined(__BORLANDC__)
-# define _WIN32_WINNT 0x0501
-# endif // !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
-# if defined(_MSC_VER)
-# if defined(_WIN32) && !defined(WIN32)
-# if !defined(_WINSOCK2API_)
-# define WIN32 // Needed for correct types in winsock2.h
-# else // !defined(_WINSOCK2API_)
-# error Please define the macro WIN32 in your compiler options
-# endif // !defined(_WINSOCK2API_)
-# endif // defined(_WIN32) && !defined(WIN32)
-# endif // defined(_MSC_VER)
-# if defined(__BORLANDC__)
-# if defined(__WIN32__) && !defined(WIN32)
-# if !defined(_WINSOCK2API_)
-# define WIN32 // Needed for correct types in winsock2.h
-# else // !defined(_WINSOCK2API_)
-# error Please define the macro WIN32 in your compiler options
-# endif // !defined(_WINSOCK2API_)
-# endif // defined(__WIN32__) && !defined(WIN32)
-# endif // defined(__BORLANDC__)
-# if defined(__CYGWIN__)
-# if !defined(__USE_W32_SOCKETS)
-# error You must add -D__USE_W32_SOCKETS to your compiler options.
-# endif // !defined(__USE_W32_SOCKETS)
-# endif // defined(__CYGWIN__)
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-// Windows: minimise header inclusion.
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
-# if !defined(WIN32_LEAN_AND_MEAN)
-# define WIN32_LEAN_AND_MEAN
-# endif // !defined(WIN32_LEAN_AND_MEAN)
-# endif // !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-// Windows: suppress definition of "min" and "max" macros.
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if !defined(BOOST_ASIO_NO_NOMINMAX)
-# if !defined(NOMINMAX)
-# define NOMINMAX 1
-# endif // !defined(NOMINMAX)
-# endif // !defined(BOOST_ASIO_NO_NOMINMAX)
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-// Windows: IO Completion Ports.
-#if !defined(BOOST_ASIO_HAS_IOCP)
-# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
-# if !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
-# if !defined(BOOST_ASIO_DISABLE_IOCP)
-# define BOOST_ASIO_HAS_IOCP 1
-# endif // !defined(BOOST_ASIO_DISABLE_IOCP)
-# endif // !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
-# endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
-# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-#endif // !defined(BOOST_ASIO_HAS_IOCP)
-
-// On POSIX (and POSIX-like) platforms we need to include unistd.h in order to
-// get access to the various platform feature macros, e.g. to be able to test
-// for threads support.
-#if !defined(BOOST_ASIO_HAS_UNISTD_H)
-# if !defined(BOOST_ASIO_HAS_BOOST_CONFIG)
-# if defined(unix) \
- || defined(__unix) \
- || defined(_XOPEN_SOURCE) \
- || defined(_POSIX_SOURCE) \
- || (defined(__MACH__) && defined(__APPLE__)) \
- || defined(__FreeBSD__) \
- || defined(__NetBSD__) \
- || defined(__OpenBSD__) \
- || defined(__linux__)
-# define BOOST_ASIO_HAS_UNISTD_H 1
-# endif
-# endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG)
-#endif // !defined(BOOST_ASIO_HAS_UNISTD_H)
-#if defined(BOOST_ASIO_HAS_UNISTD_H)
-# include <unistd.h>
-#endif // defined(BOOST_ASIO_HAS_UNISTD_H)
-
-// Linux: epoll, eventfd and timerfd.
-#if defined(__linux__)
-# include <linux/version.h>
-# if !defined(BOOST_ASIO_HAS_EPOLL)
-# if !defined(BOOST_ASIO_DISABLE_EPOLL)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45)
-# define BOOST_ASIO_HAS_EPOLL 1
-# endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45)
-# endif // !defined(BOOST_ASIO_DISABLE_EPOLL)
-# endif // !defined(BOOST_ASIO_HAS_EPOLL)
-# if !defined(BOOST_ASIO_HAS_EVENTFD)
-# if !defined(BOOST_ASIO_DISABLE_EVENTFD)
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
-# define BOOST_ASIO_HAS_EVENTFD 1
-# endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
-# endif // !defined(BOOST_ASIO_DISABLE_EVENTFD)
-# endif // !defined(BOOST_ASIO_HAS_EVENTFD)
-# if !defined(BOOST_ASIO_HAS_TIMERFD)
-# if defined(BOOST_ASIO_HAS_EPOLL)
-# if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
-# define BOOST_ASIO_HAS_TIMERFD 1
-# endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
-# endif // defined(BOOST_ASIO_HAS_EPOLL)
-# endif // !defined(BOOST_ASIO_HAS_TIMERFD)
-#endif // defined(__linux__)
-
-// Mac OS X, FreeBSD, NetBSD, OpenBSD: kqueue.
-#if (defined(__MACH__) && defined(__APPLE__)) \
- || defined(__FreeBSD__) \
- || defined(__NetBSD__) \
- || defined(__OpenBSD__)
-# if !defined(BOOST_ASIO_HAS_KQUEUE)
-# if !defined(BOOST_ASIO_DISABLE_KQUEUE)
-# define BOOST_ASIO_HAS_KQUEUE 1
-# endif // !defined(BOOST_ASIO_DISABLE_KQUEUE)
-# endif // !defined(BOOST_ASIO_HAS_KQUEUE)
-#endif // (defined(__MACH__) && defined(__APPLE__))
- // || defined(__FreeBSD__)
- // || defined(__NetBSD__)
- // || defined(__OpenBSD__)
-
-// Solaris: /dev/poll.
-#if defined(__sun)
-# if !defined(BOOST_ASIO_HAS_DEV_POLL)
-# if !defined(BOOST_ASIO_DISABLE_DEV_POLL)
-# define BOOST_ASIO_HAS_DEV_POLL 1
-# endif // !defined(BOOST_ASIO_DISABLE_DEV_POLL)
-# endif // !defined(BOOST_ASIO_HAS_DEV_POLL)
-#endif // defined(__sun)
-
-// Serial ports.
-#if !defined(BOOST_ASIO_HAS_SERIAL_PORT)
-# if defined(BOOST_ASIO_HAS_IOCP) \
- || !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-# if !defined(__SYMBIAN32__)
-# if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
-# define BOOST_ASIO_HAS_SERIAL_PORT 1
-# endif // !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
-# endif // !defined(__SYMBIAN32__)
-# endif // defined(BOOST_ASIO_HAS_IOCP)
- // || !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-#endif // !defined(BOOST_ASIO_HAS_SERIAL_PORT)
-
-// Windows: stream handles.
-#if !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
-# if !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE)
-# if defined(BOOST_ASIO_HAS_IOCP)
-# define BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE 1
-# endif // defined(BOOST_ASIO_HAS_IOCP)
-# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE)
-#endif // !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
-
-// Windows: random access handles.
-#if !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
-# if !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE)
-# if defined(BOOST_ASIO_HAS_IOCP)
-# define BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE 1
-# endif // defined(BOOST_ASIO_HAS_IOCP)
-# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE)
-#endif // !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
-
-// Windows: object handles.
-#if !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
-# if !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
-# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
-# define BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE 1
-# endif // !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
-# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
-#endif // !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
-
-// Windows: OVERLAPPED wrapper.
-#if !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
-# if !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR)
-# if defined(BOOST_ASIO_HAS_IOCP)
-# define BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR 1
-# endif // defined(BOOST_ASIO_HAS_IOCP)
-# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR)
-#endif // !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
-
-// POSIX: stream-oriented file descriptors.
-#if !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
-# if !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
-# if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-# define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR 1
-# endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-# endif // !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
-#endif // !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
-
-// UNIX domain sockets.
-#if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
-# if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
-# if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-# define BOOST_ASIO_HAS_LOCAL_SOCKETS 1
-# endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-# endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
-#endif // !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
-
-// Can use sigaction() instead of signal().
-#if !defined(BOOST_ASIO_HAS_SIGACTION)
-# if !defined(BOOST_ASIO_DISABLE_SIGACTION)
-# if !defined(BOOST_ASIO_WINDOWS) \
- && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
- && !defined(__CYGWIN__)
-# define BOOST_ASIO_HAS_SIGACTION 1
-# endif // !defined(BOOST_ASIO_WINDOWS)
- // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // && !defined(__CYGWIN__)
-# endif // !defined(BOOST_ASIO_DISABLE_SIGACTION)
-#endif // !defined(BOOST_ASIO_HAS_SIGACTION)
-
-// Can use signal().
-#if !defined(BOOST_ASIO_HAS_SIGNAL)
-# if !defined(BOOST_ASIO_DISABLE_SIGNAL)
-# if !defined(UNDER_CE)
-# define BOOST_ASIO_HAS_SIGNAL 1
-# endif // !defined(UNDER_CE)
-# endif // !defined(BOOST_ASIO_DISABLE_SIGNAL)
-#endif // !defined(BOOST_ASIO_HAS_SIGNAL)
-
-// Can use getaddrinfo() and getnameinfo().
-#if !defined(BOOST_ASIO_HAS_GETADDRINFO)
-# if !defined(BOOST_ASIO_DISABLE_GETADDRINFO)
-# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
-# define BOOST_ASIO_HAS_GETADDRINFO 1
-# elif defined(UNDER_CE)
-# define BOOST_ASIO_HAS_GETADDRINFO 1
-# endif // defined(UNDER_CE)
-# elif defined(__MACH__) && defined(__APPLE__)
-# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-# if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
-# define BOOST_ASIO_HAS_GETADDRINFO 1
-# endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
-# else // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-# define BOOST_ASIO_HAS_GETADDRINFO 1
-# endif // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
-# else // defined(__MACH__) && defined(__APPLE__)
-# define BOOST_ASIO_HAS_GETADDRINFO 1
-# endif // defined(__MACH__) && defined(__APPLE__)
-# endif // !defined(BOOST_ASIO_DISABLE_GETADDRINFO)
-#endif // !defined(BOOST_ASIO_HAS_GETADDRINFO)
-
-// Whether standard iostreams are disabled.
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_IOSTREAM)
-# define BOOST_ASIO_NO_IOSTREAM 1
-# endif // !defined(BOOST_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-
-// Whether exception handling is disabled.
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
-# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_ASIO_NO_EXCEPTIONS 1
-# endif // !defined(BOOST_NO_EXCEPTIONS)
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
-
-// Whether the typeid operator is supported.
-#if !defined(BOOST_ASIO_NO_TYPEID)
-# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_TYPEID)
-# define BOOST_ASIO_NO_TYPEID 1
-# endif // !defined(BOOST_NO_TYPEID)
-#endif // !defined(BOOST_ASIO_NO_TYPEID)
-
-// Threads.
-#if !defined(BOOST_ASIO_HAS_THREADS)
-# if !defined(BOOST_ASIO_DISABLE_THREADS)
-# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS)
-# define BOOST_ASIO_HAS_THREADS 1
-# elif defined(__GNUC__) && !defined(__MINGW32__) \
- && !defined(linux) && !defined(__linux) && !defined(__linux__)
-# define BOOST_ASIO_HAS_THREADS 1
-# elif defined(_MT) || defined(__MT__)
-# define BOOST_ASIO_HAS_THREADS 1
-# elif defined(_REENTRANT)
-# define BOOST_ASIO_HAS_THREADS 1
-# elif defined(__APPLE__)
-# define BOOST_ASIO_HAS_THREADS 1
-# elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
-# define BOOST_ASIO_HAS_THREADS 1
-# elif defined(_PTHREADS)
-# define BOOST_ASIO_HAS_THREADS 1
-# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS)
-# endif // !defined(BOOST_ASIO_DISABLE_THREADS)
-#endif // !defined(BOOST_ASIO_HAS_THREADS)
-
-// POSIX threads.
-#if !defined(BOOST_ASIO_HAS_PTHREADS)
-# if defined(BOOST_ASIO_HAS_THREADS)
-# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
-# define BOOST_ASIO_HAS_PTHREADS 1
-# elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
-# define BOOST_ASIO_HAS_PTHREADS 1
-# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
-# endif // defined(BOOST_ASIO_HAS_THREADS)
-#endif // !defined(BOOST_ASIO_HAS_PTHREADS)
-
-// Helper to prevent macro expansion.
-#define BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION
-
-// Helper to define in-class constants.
-#if !defined(BOOST_ASIO_STATIC_CONSTANT)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
-# define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
- BOOST_STATIC_CONSTANT(type, assignment)
-# else // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
-# define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
- static const type assignment
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
-#endif // !defined(BOOST_ASIO_STATIC_CONSTANT)
-
-// Boost array library.
-#if !defined(BOOST_ASIO_HAS_BOOST_ARRAY)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY)
-# define BOOST_ASIO_HAS_BOOST_ARRAY 1
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_ARRAY)
-
-// Boost assert macro.
-#if !defined(BOOST_ASIO_HAS_BOOST_ASSERT)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT)
-# define BOOST_ASIO_HAS_BOOST_ASSERT 1
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_ASSERT)
-
-// Boost limits header.
-#if !defined(BOOST_ASIO_HAS_BOOST_LIMITS)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS)
-# define BOOST_ASIO_HAS_BOOST_LIMITS 1
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_LIMITS)
-
-// Boost throw_exception function.
-#if !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION)
-# define BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION 1
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
-
-// Boost regex library.
-#if !defined(BOOST_ASIO_HAS_BOOST_REGEX)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_REGEX)
-# define BOOST_ASIO_HAS_BOOST_REGEX 1
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_REGEX)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-// Boost bind function.
-#if !defined(BOOST_ASIO_HAS_BOOST_BIND)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_BIND)
-# define BOOST_ASIO_HAS_BOOST_BIND 1
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_BIND)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_BIND)
-
-// Boost's BOOST_WORKAROUND macro.
-#if !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
-# if !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND)
-# define BOOST_ASIO_HAS_BOOST_WORKAROUND 1
-# endif // !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND)
-#endif // !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
-
-// Microsoft Visual C++'s secure C runtime library.
-#if !defined(BOOST_ASIO_HAS_SECURE_RTL)
-# if !defined(BOOST_ASIO_DISABLE_SECURE_RTL)
-# if defined(BOOST_ASIO_MSVC) \
- && (BOOST_ASIO_MSVC >= 1400) \
- && !defined(UNDER_CE)
-# define BOOST_ASIO_HAS_SECURE_RTL 1
-# endif // defined(BOOST_ASIO_MSVC)
- // && (BOOST_ASIO_MSVC >= 1400)
- // && !defined(UNDER_CE)
-# endif // !defined(BOOST_ASIO_DISABLE_SECURE_RTL)
-#endif // !defined(BOOST_ASIO_HAS_SECURE_RTL)
-
-// Handler hooking. Disabled for ancient Borland C++ and gcc compilers.
-#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
-# if !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS)
-# if defined(__GNUC__)
-# if (__GNUC__ >= 3)
-# define BOOST_ASIO_HAS_HANDLER_HOOKS 1
-# endif // (__GNUC__ >= 3)
-# elif !defined(__BORLANDC__)
-# define BOOST_ASIO_HAS_HANDLER_HOOKS 1
-# endif // !defined(__BORLANDC__)
-# endif // !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS)
-#endif // !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
-
-// Support for the __thread keyword extension.
-#if !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
-# if defined(__linux__)
-# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-# if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
-# if !defined(__INTEL_COMPILER) && !defined(__ICL) \
- && !(defined(__clang__) && defined(__ANDROID__))
-# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
-# define BOOST_ASIO_THREAD_KEYWORD __thread
-# elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100)
-# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
-# endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100)
- // && !(defined(__clang__) && defined(__ANDROID__))
-# endif // ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
-# endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-# endif // defined(__linux__)
-# if defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# if (_MSC_VER >= 1700)
-# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
-# define BOOST_ASIO_THREAD_KEYWORD __declspec(thread)
-# endif // (_MSC_VER >= 1700)
-# endif // defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME)
-#endif // !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
-#if !defined(BOOST_ASIO_THREAD_KEYWORD)
-# define BOOST_ASIO_THREAD_KEYWORD __thread
-#endif // !defined(BOOST_ASIO_THREAD_KEYWORD)
-
-// Support for POSIX ssize_t typedef.
-#if !defined(BOOST_ASIO_DISABLE_SSIZE_T)
-# if defined(__linux__) \
- || (defined(__MACH__) && defined(__APPLE__))
-# define BOOST_ASIO_HAS_SSIZE_T 1
-# endif // defined(__linux__)
- // || (defined(__MACH__) && defined(__APPLE__))
-#endif // !defined(BOOST_ASIO_DISABLE_SSIZE_T)
-
-// Helper macros to manage the transition away from the old services-based API.
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# define BOOST_ASIO_SVC_TPARAM , typename Service
-# define BOOST_ASIO_SVC_TPARAM_DEF1(d1) , typename Service d1
-# define BOOST_ASIO_SVC_TPARAM_DEF2(d1, d2) , typename Service d1, d2
-# define BOOST_ASIO_SVC_TARG , Service
-# define BOOST_ASIO_SVC_T Service
-# define BOOST_ASIO_SVC_TPARAM1 , typename Service1
-# define BOOST_ASIO_SVC_TPARAM1_DEF1(d1) , typename Service1 d1
-# define BOOST_ASIO_SVC_TPARAM1_DEF2(d1, d2) , typename Service1 d1, d2
-# define BOOST_ASIO_SVC_TARG1 , Service1
-# define BOOST_ASIO_SVC_T1 Service1
-# define BOOST_ASIO_SVC_ACCESS public
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# define BOOST_ASIO_SVC_TPARAM
-# define BOOST_ASIO_SVC_TPARAM_DEF1(d1)
-# define BOOST_ASIO_SVC_TPARAM_DEF2(d1, d2)
-# define BOOST_ASIO_SVC_TARG
-// BOOST_ASIO_SVC_T is defined at each point of use.
-# define BOOST_ASIO_SVC_TPARAM1
-# define BOOST_ASIO_SVC_TPARAM1_DEF1(d1)
-# define BOOST_ASIO_SVC_TPARAM1_DEF2(d1, d2)
-# define BOOST_ASIO_SVC_TARG1
-// BOOST_ASIO_SVC_T1 is defined at each point of use.
-# define BOOST_ASIO_SVC_ACCESS protected
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-// Helper macros to manage transition away from error_code return values.
-#if defined(BOOST_ASIO_NO_DEPRECATED)
-# define BOOST_ASIO_SYNC_OP_VOID void
-# define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return
-#else // defined(BOOST_ASIO_NO_DEPRECATED)
-# define BOOST_ASIO_SYNC_OP_VOID boost::system::error_code
-# define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return e
-#endif // defined(BOOST_ASIO_NO_DEPRECATED)
-
-// Newer gcc, clang need special treatment to suppress unused typedef warnings.
-#if defined(__clang__)
-# if defined(__apple_build_version__)
-# if (__clang_major__ >= 7)
-# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
-# endif // (__clang_major__ >= 7)
-# elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \
- || (__clang_major__ > 3)
-# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
-# endif // ((__clang_major__ == 3) && (__clang_minor__ >= 6))
- // || (__clang_major__ > 3)
-#elif defined(__GNUC__)
-# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
-# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
-#endif // defined(__GNUC__)
-#if !defined(BOOST_ASIO_UNUSED_TYPEDEF)
-# define BOOST_ASIO_UNUSED_TYPEDEF
-#endif // !defined(BOOST_ASIO_UNUSED_TYPEDEF)
-
-// Some versions of gcc generate spurious warnings about unused variables.
-#if defined(__GNUC__)
-# if (__GNUC__ >= 4)
-# define BOOST_ASIO_UNUSED_VARIABLE __attribute__((__unused__))
-# endif // (__GNUC__ >= 4)
-#endif // defined(__GNUC__)
-#if !defined(BOOST_ASIO_UNUSED_VARIABLE)
-# define BOOST_ASIO_UNUSED_VARIABLE
-#endif // !defined(BOOST_ASIO_UNUSED_VARIABLE)
-
-// Support co_await on compilers known to allow it.
-#if !defined(BOOST_ASIO_HAS_CO_AWAIT)
-# if !defined(BOOST_ASIO_DISABLE_CO_AWAIT)
-# if defined(BOOST_ASIO_MSVC)
-# if (_MSC_FULL_VER >= 190023506)
-# if defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
-# define BOOST_ASIO_HAS_CO_AWAIT 1
-# endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
-# endif // (_MSC_FULL_VER >= 190023506)
-# endif // defined(BOOST_ASIO_MSVC)
-# endif // !defined(BOOST_ASIO_DISABLE_CO_AWAIT)
-# if defined(__clang__)
-# if (__cpp_coroutines >= 201703)
-# if __has_include(<experimental/coroutine>)
-# define BOOST_ASIO_HAS_CO_AWAIT 1
-# endif // __has_include(<experimental/coroutine>)
-# endif // (__cpp_coroutines >= 201703)
-# endif // defined(__clang__)
-#endif // !defined(BOOST_ASIO_HAS_CO_AWAIT)
-
-#endif // BOOST_ASIO_DETAIL_CONFIG_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/socket_ops.ipp b/src/third_party/boost-1.68.0/boost/asio/detail/impl/socket_ops.ipp
deleted file mode 100644
index 3442ac3de1e..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/socket_ops.ipp
+++ /dev/null
@@ -1,3573 +0,0 @@
-//
-// detail/impl/socket_ops.ipp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_SOCKET_OPS_IPP
-#define BOOST_ASIO_DETAIL_SOCKET_OPS_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#include <cctype>
-#include <cstdio>
-#include <cstdlib>
-#include <cstring>
-#include <cerrno>
-#include <new>
-#include <boost/asio/detail/assert.hpp>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/error.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <codecvt>
-# include <locale>
-# include <string>
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) \
- || defined(__MACH__) && defined(__APPLE__)
-# if defined(BOOST_ASIO_HAS_PTHREADS)
-# include <pthread.h>
-# endif // defined(BOOST_ASIO_HAS_PTHREADS)
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- // || defined(__MACH__) && defined(__APPLE__)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-namespace socket_ops {
-
-#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-struct msghdr { int msg_namelen; };
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-#if defined(__hpux)
-// HP-UX doesn't declare these functions extern "C", so they are declared again
-// here to avoid linker errors about undefined symbols.
-extern "C" char* if_indextoname(unsigned int, char*);
-extern "C" unsigned int if_nametoindex(const char*);
-#endif // defined(__hpux)
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-inline void clear_last_error()
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- WSASetLastError(0);
-#else
- errno = 0;
-#endif
-}
-
-#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-template <typename ReturnType>
-inline ReturnType error_wrapper(ReturnType return_value,
- boost::system::error_code& ec)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ec = boost::system::error_code(WSAGetLastError(),
- boost::asio::error::get_system_category());
-#else
- ec = boost::system::error_code(errno,
- boost::asio::error::get_system_category());
-#endif
- return return_value;
-}
-
-template <typename SockLenType>
-inline socket_type call_accept(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
-{
- SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0;
- socket_type result = ::accept(s, addr, addrlen ? &tmp_addrlen : 0);
- if (addrlen)
- *addrlen = (std::size_t)tmp_addrlen;
- return result;
-}
-
-socket_type accept(socket_type s, socket_addr_type* addr,
- std::size_t* addrlen, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return invalid_socket;
- }
-
- clear_last_error();
-
- socket_type new_s = error_wrapper(call_accept(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (new_s == invalid_socket)
- return new_s;
-
-#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
- int optval = 1;
- int result = error_wrapper(::setsockopt(new_s,
- SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)), ec);
- if (result != 0)
- {
- ::close(new_s);
- return invalid_socket;
- }
-#endif
-
- ec = boost::system::error_code();
- return new_s;
-}
-
-socket_type sync_accept(socket_type s, state_type state,
- socket_addr_type* addr, std::size_t* addrlen, boost::system::error_code& ec)
-{
- // Accept a socket.
- for (;;)
- {
- // Try to complete the operation without blocking.
- socket_type new_socket = socket_ops::accept(s, addr, addrlen, ec);
-
- // Check if operation succeeded.
- if (new_socket != invalid_socket)
- return new_socket;
-
- // Operation failed.
- if (ec == boost::asio::error::would_block
- || ec == boost::asio::error::try_again)
- {
- if (state & user_set_non_blocking)
- return invalid_socket;
- // Fall through to retry operation.
- }
- else if (ec == boost::asio::error::connection_aborted)
- {
- if (state & enable_connection_aborted)
- return invalid_socket;
- // Fall through to retry operation.
- }
-#if defined(EPROTO)
- else if (ec.value() == EPROTO)
- {
- if (state & enable_connection_aborted)
- return invalid_socket;
- // Fall through to retry operation.
- }
-#endif // defined(EPROTO)
- else
- return invalid_socket;
-
- // Wait for socket to become ready.
- if (socket_ops::poll_read(s, 0, -1, ec) < 0)
- return invalid_socket;
- }
-}
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-void complete_iocp_accept(socket_type s,
- void* output_buffer, DWORD address_length,
- socket_addr_type* addr, std::size_t* addrlen,
- socket_type new_socket, boost::system::error_code& ec)
-{
- // Map non-portable errors to their portable counterparts.
- if (ec.value() == ERROR_NETNAME_DELETED)
- ec = boost::asio::error::connection_aborted;
-
- if (!ec)
- {
- // Get the address of the peer.
- if (addr && addrlen)
- {
- LPSOCKADDR local_addr = 0;
- int local_addr_length = 0;
- LPSOCKADDR remote_addr = 0;
- int remote_addr_length = 0;
- GetAcceptExSockaddrs(output_buffer, 0, address_length,
- address_length, &local_addr, &local_addr_length,
- &remote_addr, &remote_addr_length);
- if (static_cast<std::size_t>(remote_addr_length) > *addrlen)
- {
- ec = boost::asio::error::invalid_argument;
- }
- else
- {
- using namespace std; // For memcpy.
- memcpy(addr, remote_addr, remote_addr_length);
- *addrlen = static_cast<std::size_t>(remote_addr_length);
- }
- }
-
- // Need to set the SO_UPDATE_ACCEPT_CONTEXT option so that getsockname
- // and getpeername will work on the accepted socket.
- SOCKET update_ctx_param = s;
- socket_ops::state_type state = 0;
- socket_ops::setsockopt(new_socket, state,
- SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT,
- &update_ctx_param, sizeof(SOCKET), ec);
- }
-}
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-bool non_blocking_accept(socket_type s,
- state_type state, socket_addr_type* addr, std::size_t* addrlen,
- boost::system::error_code& ec, socket_type& new_socket)
-{
- for (;;)
- {
- // Accept the waiting connection.
- new_socket = socket_ops::accept(s, addr, addrlen, ec);
-
- // Check if operation succeeded.
- if (new_socket != invalid_socket)
- return true;
-
- // Retry operation if interrupted by signal.
- if (ec == boost::asio::error::interrupted)
- continue;
-
- // Operation failed.
- if (ec == boost::asio::error::would_block
- || ec == boost::asio::error::try_again)
- {
- // Fall through to retry operation.
- }
- else if (ec == boost::asio::error::connection_aborted)
- {
- if (state & enable_connection_aborted)
- return true;
- // Fall through to retry operation.
- }
-#if defined(EPROTO)
- else if (ec.value() == EPROTO)
- {
- if (state & enable_connection_aborted)
- return true;
- // Fall through to retry operation.
- }
-#endif // defined(EPROTO)
- else
- return true;
-
- return false;
- }
-}
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-template <typename SockLenType>
-inline int call_bind(SockLenType msghdr::*,
- socket_type s, const socket_addr_type* addr, std::size_t addrlen)
-{
- return ::bind(s, addr, (SockLenType)addrlen);
-}
-
-int bind(socket_type s, const socket_addr_type* addr,
- std::size_t addrlen, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
- clear_last_error();
- int result = error_wrapper(call_bind(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-}
-
-int close(socket_type s, state_type& state,
- bool destruction, boost::system::error_code& ec)
-{
- int result = 0;
- if (s != invalid_socket)
- {
- // We don't want the destructor to block, so set the socket to linger in
- // the background. If the user doesn't like this behaviour then they need
- // to explicitly close the socket.
- if (destruction && (state & user_set_linger))
- {
- ::linger opt;
- opt.l_onoff = 0;
- opt.l_linger = 0;
- boost::system::error_code ignored_ec;
- socket_ops::setsockopt(s, state, SOL_SOCKET,
- SO_LINGER, &opt, sizeof(opt), ignored_ec);
- }
-
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- result = error_wrapper(::closesocket(s), ec);
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- result = error_wrapper(::close(s), ec);
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
- if (result != 0
- && (ec == boost::asio::error::would_block
- || ec == boost::asio::error::try_again))
- {
- // According to UNIX Network Programming Vol. 1, it is possible for
- // close() to fail with EWOULDBLOCK under certain circumstances. What
- // isn't clear is the state of the descriptor after this error. The one
- // current OS where this behaviour is seen, Windows, says that the socket
- // remains open. Therefore we'll put the descriptor back into blocking
- // mode and have another attempt at closing it.
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ioctl_arg_type arg = 0;
- ::ioctlsocket(s, FIONBIO, &arg);
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(__SYMBIAN32__)
- int flags = ::fcntl(s, F_GETFL, 0);
- if (flags >= 0)
- ::fcntl(s, F_SETFL, flags & ~O_NONBLOCK);
-# else // defined(__SYMBIAN32__)
- ioctl_arg_type arg = 0;
- ::ioctl(s, FIONBIO, &arg);
-# endif // defined(__SYMBIAN32__)
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- state &= ~non_blocking;
-
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- result = error_wrapper(::closesocket(s), ec);
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- result = error_wrapper(::close(s), ec);
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- }
- }
-
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-}
-
-bool set_user_non_blocking(socket_type s,
- state_type& state, bool value, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return false;
- }
-
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctlsocket(s, FIONBIO, &arg), ec);
-#elif defined(__SYMBIAN32__)
- int result = error_wrapper(::fcntl(s, F_GETFL, 0), ec);
- if (result >= 0)
- {
- clear_last_error();
- int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = error_wrapper(::fcntl(s, F_SETFL, flag), ec);
- }
-#else
- ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctl(s, FIONBIO, &arg), ec);
-#endif
-
- if (result >= 0)
- {
- ec = boost::system::error_code();
- if (value)
- state |= user_set_non_blocking;
- else
- {
- // Clearing the user-set non-blocking mode always overrides any
- // internally-set non-blocking flag. Any subsequent asynchronous
- // operations will need to re-enable non-blocking I/O.
- state &= ~(user_set_non_blocking | internal_non_blocking);
- }
- return true;
- }
-
- return false;
-}
-
-bool set_internal_non_blocking(socket_type s,
- state_type& state, bool value, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return false;
- }
-
- if (!value && (state & user_set_non_blocking))
- {
- // It does not make sense to clear the internal non-blocking flag if the
- // user still wants non-blocking behaviour. Return an error and let the
- // caller figure out whether to update the user-set non-blocking flag.
- ec = boost::asio::error::invalid_argument;
- return false;
- }
-
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctlsocket(s, FIONBIO, &arg), ec);
-#elif defined(__SYMBIAN32__)
- int result = error_wrapper(::fcntl(s, F_GETFL, 0), ec);
- if (result >= 0)
- {
- clear_last_error();
- int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
- result = error_wrapper(::fcntl(s, F_SETFL, flag), ec);
- }
-#else
- ioctl_arg_type arg = (value ? 1 : 0);
- int result = error_wrapper(::ioctl(s, FIONBIO, &arg), ec);
-#endif
-
- if (result >= 0)
- {
- ec = boost::system::error_code();
- if (value)
- state |= internal_non_blocking;
- else
- state &= ~internal_non_blocking;
- return true;
- }
-
- return false;
-}
-
-int shutdown(socket_type s, int what, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
- clear_last_error();
- int result = error_wrapper(::shutdown(s, what), ec);
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-}
-
-template <typename SockLenType>
-inline int call_connect(SockLenType msghdr::*,
- socket_type s, const socket_addr_type* addr, std::size_t addrlen)
-{
- return ::connect(s, addr, (SockLenType)addrlen);
-}
-
-int connect(socket_type s, const socket_addr_type* addr,
- std::size_t addrlen, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
- clear_last_error();
- int result = error_wrapper(call_connect(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (result == 0)
- ec = boost::system::error_code();
-#if defined(__linux__)
- else if (ec == boost::asio::error::try_again)
- ec = boost::asio::error::no_buffer_space;
-#endif // defined(__linux__)
- return result;
-}
-
-void sync_connect(socket_type s, const socket_addr_type* addr,
- std::size_t addrlen, boost::system::error_code& ec)
-{
- // Perform the connect operation.
- socket_ops::connect(s, addr, addrlen, ec);
- if (ec != boost::asio::error::in_progress
- && ec != boost::asio::error::would_block)
- {
- // The connect operation finished immediately.
- return;
- }
-
- // Wait for socket to become ready.
- if (socket_ops::poll_connect(s, -1, ec) < 0)
- return;
-
- // Get the error code from the connect operation.
- int connect_error = 0;
- size_t connect_error_len = sizeof(connect_error);
- if (socket_ops::getsockopt(s, 0, SOL_SOCKET, SO_ERROR,
- &connect_error, &connect_error_len, ec) == socket_error_retval)
- return;
-
- // Return the result of the connect operation.
- ec = boost::system::error_code(connect_error,
- boost::asio::error::get_system_category());
-}
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-void complete_iocp_connect(socket_type s, boost::system::error_code& ec)
-{
- // Map non-portable errors to their portable counterparts.
- switch (ec.value())
- {
- case ERROR_CONNECTION_REFUSED:
- ec = boost::asio::error::connection_refused;
- break;
- case ERROR_NETWORK_UNREACHABLE:
- ec = boost::asio::error::network_unreachable;
- break;
- case ERROR_HOST_UNREACHABLE:
- ec = boost::asio::error::host_unreachable;
- break;
- case ERROR_SEM_TIMEOUT:
- ec = boost::asio::error::timed_out;
- break;
- default:
- break;
- }
-
- if (!ec)
- {
- // Need to set the SO_UPDATE_CONNECT_CONTEXT option so that getsockname
- // and getpeername will work on the connected socket.
- socket_ops::state_type state = 0;
- const int so_update_connect_context = 0x7010;
- socket_ops::setsockopt(s, state, SOL_SOCKET,
- so_update_connect_context, 0, 0, ec);
- }
-}
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-bool non_blocking_connect(socket_type s, boost::system::error_code& ec)
-{
- // Check if the connect operation has finished. This is required since we may
- // get spurious readiness notifications from the reactor.
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(__CYGWIN__) \
- || defined(__SYMBIAN32__)
- fd_set write_fds;
- FD_ZERO(&write_fds);
- FD_SET(s, &write_fds);
- fd_set except_fds;
- FD_ZERO(&except_fds);
- FD_SET(s, &except_fds);
- timeval zero_timeout;
- zero_timeout.tv_sec = 0;
- zero_timeout.tv_usec = 0;
- int ready = ::select(s + 1, 0, &write_fds, &except_fds, &zero_timeout);
-#else // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- pollfd fds;
- fds.fd = s;
- fds.events = POLLOUT;
- fds.revents = 0;
- int ready = ::poll(&fds, 1, 0);
-#endif // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- if (ready == 0)
- {
- // The asynchronous connect operation is still in progress.
- return false;
- }
-
- // Get the error code from the connect operation.
- int connect_error = 0;
- size_t connect_error_len = sizeof(connect_error);
- if (socket_ops::getsockopt(s, 0, SOL_SOCKET, SO_ERROR,
- &connect_error, &connect_error_len, ec) == 0)
- {
- if (connect_error)
- {
- ec = boost::system::error_code(connect_error,
- boost::asio::error::get_system_category());
- }
- else
- ec = boost::system::error_code();
- }
-
- return true;
-}
-
-int socketpair(int af, int type, int protocol,
- socket_type sv[2], boost::system::error_code& ec)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- (void)(af);
- (void)(type);
- (void)(protocol);
- (void)(sv);
- ec = boost::asio::error::operation_not_supported;
- return socket_error_retval;
-#else
- clear_last_error();
- int result = error_wrapper(::socketpair(af, type, protocol, sv), ec);
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-#endif
-}
-
-bool sockatmark(socket_type s, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return false;
- }
-
-#if defined(SIOCATMARK)
- ioctl_arg_type value = 0;
-# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctlsocket(s, SIOCATMARK, &value), ec);
-# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctl(s, SIOCATMARK, &value), ec);
-# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- if (result == 0)
- ec = boost::system::error_code();
-# if defined(ENOTTY)
- if (ec.value() == ENOTTY)
- ec = boost::asio::error::not_socket;
-# endif // defined(ENOTTY)
-#else // defined(SIOCATMARK)
- int value = error_wrapper(::sockatmark(s), ec);
- if (value != -1)
- ec = boost::system::error_code();
-#endif // defined(SIOCATMARK)
-
- return ec ? false : value != 0;
-}
-
-size_t available(socket_type s, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- ioctl_arg_type value = 0;
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctlsocket(s, FIONREAD, &value), ec);
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctl(s, FIONREAD, &value), ec);
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- if (result == 0)
- ec = boost::system::error_code();
-#if defined(ENOTTY)
- if (ec.value() == ENOTTY)
- ec = boost::asio::error::not_socket;
-#endif // defined(ENOTTY)
-
- return ec ? static_cast<size_t>(0) : static_cast<size_t>(value);
-}
-
-int listen(socket_type s, int backlog, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
- clear_last_error();
- int result = error_wrapper(::listen(s, backlog), ec);
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-}
-
-inline void init_buf_iov_base(void*& base, void* addr)
-{
- base = addr;
-}
-
-template <typename T>
-inline void init_buf_iov_base(T& base, void* addr)
-{
- base = static_cast<T>(addr);
-}
-
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-typedef WSABUF buf;
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-typedef iovec buf;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-void init_buf(buf& b, void* data, size_t size)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- b.buf = static_cast<char*>(data);
- b.len = static_cast<u_long>(size);
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- init_buf_iov_base(b.iov_base, data);
- b.iov_len = size;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-void init_buf(buf& b, const void* data, size_t size)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- b.buf = static_cast<char*>(const_cast<void*>(data));
- b.len = static_cast<u_long>(size);
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- init_buf_iov_base(b.iov_base, const_cast<void*>(data));
- b.iov_len = size;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-inline void init_msghdr_msg_name(void*& name, socket_addr_type* addr)
-{
- name = addr;
-}
-
-inline void init_msghdr_msg_name(void*& name, const socket_addr_type* addr)
-{
- name = const_cast<socket_addr_type*>(addr);
-}
-
-template <typename T>
-inline void init_msghdr_msg_name(T& name, socket_addr_type* addr)
-{
- name = reinterpret_cast<T>(addr);
-}
-
-template <typename T>
-inline void init_msghdr_msg_name(T& name, const socket_addr_type* addr)
-{
- name = reinterpret_cast<T>(const_cast<socket_addr_type*>(addr));
-}
-
-signed_size_type recv(socket_type s, buf* bufs, size_t count,
- int flags, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- // Receive some data.
- DWORD recv_buf_count = static_cast<DWORD>(count);
- DWORD bytes_transferred = 0;
- DWORD recv_flags = flags;
- int result = error_wrapper(::WSARecv(s, bufs,
- recv_buf_count, &bytes_transferred, &recv_flags, 0, 0), ec);
- if (ec.value() == ERROR_NETNAME_DELETED)
- ec = boost::asio::error::connection_reset;
- else if (ec.value() == ERROR_PORT_UNREACHABLE)
- ec = boost::asio::error::connection_refused;
- else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
- ec.assign(0, ec.category());
- if (result != 0)
- return socket_error_retval;
- ec = boost::system::error_code();
- return bytes_transferred;
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- msghdr msg = msghdr();
- msg.msg_iov = bufs;
- msg.msg_iovlen = static_cast<int>(count);
- signed_size_type result = error_wrapper(::recvmsg(s, &msg, flags), ec);
- if (result >= 0)
- ec = boost::system::error_code();
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-size_t sync_recv(socket_type s, state_type state, buf* bufs,
- size_t count, int flags, bool all_empty, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // A request to read 0 bytes on a stream is a no-op.
- if (all_empty && (state & stream_oriented))
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- // Read some data.
- for (;;)
- {
- // Try to complete the operation without blocking.
- signed_size_type bytes = socket_ops::recv(s, bufs, count, flags, ec);
-
- // Check if operation succeeded.
- if (bytes > 0)
- return bytes;
-
- // Check for EOF.
- if ((state & stream_oriented) && bytes == 0)
- {
- ec = boost::asio::error::eof;
- return 0;
- }
-
- // Operation failed.
- if ((state & user_set_non_blocking)
- || (ec != boost::asio::error::would_block
- && ec != boost::asio::error::try_again))
- return 0;
-
- // Wait for socket to become ready.
- if (socket_ops::poll_read(s, 0, -1, ec) < 0)
- return 0;
- }
-}
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-void complete_iocp_recv(state_type state,
- const weak_cancel_token_type& cancel_token, bool all_empty,
- boost::system::error_code& ec, size_t bytes_transferred)
-{
- // Map non-portable errors to their portable counterparts.
- if (ec.value() == ERROR_NETNAME_DELETED)
- {
- if (cancel_token.expired())
- ec = boost::asio::error::operation_aborted;
- else
- ec = boost::asio::error::connection_reset;
- }
- else if (ec.value() == ERROR_PORT_UNREACHABLE)
- {
- ec = boost::asio::error::connection_refused;
- }
- else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
- {
- ec.assign(0, ec.category());
- }
-
- // Check for connection closed.
- else if (!ec && bytes_transferred == 0
- && (state & stream_oriented) != 0
- && !all_empty)
- {
- ec = boost::asio::error::eof;
- }
-}
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-bool non_blocking_recv(socket_type s,
- buf* bufs, size_t count, int flags, bool is_stream,
- boost::system::error_code& ec, size_t& bytes_transferred)
-{
- for (;;)
- {
- // Read some data.
- signed_size_type bytes = socket_ops::recv(s, bufs, count, flags, ec);
-
- // Check for end of stream.
- if (is_stream && bytes == 0)
- {
- ec = boost::asio::error::eof;
- return true;
- }
-
- // Retry operation if interrupted by signal.
- if (ec == boost::asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == boost::asio::error::would_block
- || ec == boost::asio::error::try_again)
- return false;
-
- // Operation is complete.
- if (bytes >= 0)
- {
- ec = boost::system::error_code();
- bytes_transferred = bytes;
- }
- else
- bytes_transferred = 0;
-
- return true;
- }
-}
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-signed_size_type recvfrom(socket_type s, buf* bufs, size_t count,
- int flags, socket_addr_type* addr, std::size_t* addrlen,
- boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- // Receive some data.
- DWORD recv_buf_count = static_cast<DWORD>(count);
- DWORD bytes_transferred = 0;
- DWORD recv_flags = flags;
- int tmp_addrlen = (int)*addrlen;
- int result = error_wrapper(::WSARecvFrom(s, bufs, recv_buf_count,
- &bytes_transferred, &recv_flags, addr, &tmp_addrlen, 0, 0), ec);
- *addrlen = (std::size_t)tmp_addrlen;
- if (ec.value() == ERROR_NETNAME_DELETED)
- ec = boost::asio::error::connection_reset;
- else if (ec.value() == ERROR_PORT_UNREACHABLE)
- ec = boost::asio::error::connection_refused;
- else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
- ec.assign(0, ec.category());
- if (result != 0)
- return socket_error_retval;
- ec = boost::system::error_code();
- return bytes_transferred;
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- msghdr msg = msghdr();
- init_msghdr_msg_name(msg.msg_name, addr);
- msg.msg_namelen = static_cast<int>(*addrlen);
- msg.msg_iov = bufs;
- msg.msg_iovlen = static_cast<int>(count);
- signed_size_type result = error_wrapper(::recvmsg(s, &msg, flags), ec);
- *addrlen = msg.msg_namelen;
- if (result >= 0)
- ec = boost::system::error_code();
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-size_t sync_recvfrom(socket_type s, state_type state, buf* bufs,
- size_t count, int flags, socket_addr_type* addr,
- std::size_t* addrlen, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // Read some data.
- for (;;)
- {
- // Try to complete the operation without blocking.
- signed_size_type bytes = socket_ops::recvfrom(
- s, bufs, count, flags, addr, addrlen, ec);
-
- // Check if operation succeeded.
- if (bytes >= 0)
- return bytes;
-
- // Operation failed.
- if ((state & user_set_non_blocking)
- || (ec != boost::asio::error::would_block
- && ec != boost::asio::error::try_again))
- return 0;
-
- // Wait for socket to become ready.
- if (socket_ops::poll_read(s, 0, -1, ec) < 0)
- return 0;
- }
-}
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-void complete_iocp_recvfrom(
- const weak_cancel_token_type& cancel_token,
- boost::system::error_code& ec)
-{
- // Map non-portable errors to their portable counterparts.
- if (ec.value() == ERROR_NETNAME_DELETED)
- {
- if (cancel_token.expired())
- ec = boost::asio::error::operation_aborted;
- else
- ec = boost::asio::error::connection_reset;
- }
- else if (ec.value() == ERROR_PORT_UNREACHABLE)
- {
- ec = boost::asio::error::connection_refused;
- }
- else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
- {
- ec.assign(0, ec.category());
- }
-}
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-bool non_blocking_recvfrom(socket_type s,
- buf* bufs, size_t count, int flags,
- socket_addr_type* addr, std::size_t* addrlen,
- boost::system::error_code& ec, size_t& bytes_transferred)
-{
- for (;;)
- {
- // Read some data.
- signed_size_type bytes = socket_ops::recvfrom(
- s, bufs, count, flags, addr, addrlen, ec);
-
- // Retry operation if interrupted by signal.
- if (ec == boost::asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == boost::asio::error::would_block
- || ec == boost::asio::error::try_again)
- return false;
-
- // Operation is complete.
- if (bytes >= 0)
- {
- ec = boost::system::error_code();
- bytes_transferred = bytes;
- }
- else
- bytes_transferred = 0;
-
- return true;
- }
-}
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-signed_size_type recvmsg(socket_type s, buf* bufs, size_t count,
- int in_flags, int& out_flags, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- out_flags = 0;
- return socket_ops::recv(s, bufs, count, in_flags, ec);
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- msghdr msg = msghdr();
- msg.msg_iov = bufs;
- msg.msg_iovlen = static_cast<int>(count);
- signed_size_type result = error_wrapper(::recvmsg(s, &msg, in_flags), ec);
- if (result >= 0)
- {
- ec = boost::system::error_code();
- out_flags = msg.msg_flags;
- }
- else
- out_flags = 0;
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-size_t sync_recvmsg(socket_type s, state_type state,
- buf* bufs, size_t count, int in_flags, int& out_flags,
- boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // Read some data.
- for (;;)
- {
- // Try to complete the operation without blocking.
- signed_size_type bytes = socket_ops::recvmsg(
- s, bufs, count, in_flags, out_flags, ec);
-
- // Check if operation succeeded.
- if (bytes >= 0)
- return bytes;
-
- // Operation failed.
- if ((state & user_set_non_blocking)
- || (ec != boost::asio::error::would_block
- && ec != boost::asio::error::try_again))
- return 0;
-
- // Wait for socket to become ready.
- if (socket_ops::poll_read(s, 0, -1, ec) < 0)
- return 0;
- }
-}
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-void complete_iocp_recvmsg(
- const weak_cancel_token_type& cancel_token,
- boost::system::error_code& ec)
-{
- // Map non-portable errors to their portable counterparts.
- if (ec.value() == ERROR_NETNAME_DELETED)
- {
- if (cancel_token.expired())
- ec = boost::asio::error::operation_aborted;
- else
- ec = boost::asio::error::connection_reset;
- }
- else if (ec.value() == ERROR_PORT_UNREACHABLE)
- {
- ec = boost::asio::error::connection_refused;
- }
- else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
- {
- ec.assign(0, ec.category());
- }
-}
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-bool non_blocking_recvmsg(socket_type s,
- buf* bufs, size_t count, int in_flags, int& out_flags,
- boost::system::error_code& ec, size_t& bytes_transferred)
-{
- for (;;)
- {
- // Read some data.
- signed_size_type bytes = socket_ops::recvmsg(
- s, bufs, count, in_flags, out_flags, ec);
-
- // Retry operation if interrupted by signal.
- if (ec == boost::asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == boost::asio::error::would_block
- || ec == boost::asio::error::try_again)
- return false;
-
- // Operation is complete.
- if (bytes >= 0)
- {
- ec = boost::system::error_code();
- bytes_transferred = bytes;
- }
- else
- bytes_transferred = 0;
-
- return true;
- }
-}
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-signed_size_type send(socket_type s, const buf* bufs, size_t count,
- int flags, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- // Send the data.
- DWORD send_buf_count = static_cast<DWORD>(count);
- DWORD bytes_transferred = 0;
- DWORD send_flags = flags;
- int result = error_wrapper(::WSASend(s, const_cast<buf*>(bufs),
- send_buf_count, &bytes_transferred, send_flags, 0, 0), ec);
- if (ec.value() == ERROR_NETNAME_DELETED)
- ec = boost::asio::error::connection_reset;
- else if (ec.value() == ERROR_PORT_UNREACHABLE)
- ec = boost::asio::error::connection_refused;
- if (result != 0)
- return socket_error_retval;
- ec = boost::system::error_code();
- return bytes_transferred;
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- msghdr msg = msghdr();
- msg.msg_iov = const_cast<buf*>(bufs);
- msg.msg_iovlen = static_cast<int>(count);
-#if defined(__linux__)
- flags |= MSG_NOSIGNAL;
-#endif // defined(__linux__)
- signed_size_type result = error_wrapper(::sendmsg(s, &msg, flags), ec);
- if (result >= 0)
- ec = boost::system::error_code();
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-size_t sync_send(socket_type s, state_type state, const buf* bufs,
- size_t count, int flags, bool all_empty, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // A request to write 0 bytes to a stream is a no-op.
- if (all_empty && (state & stream_oriented))
- {
- ec = boost::system::error_code();
- return 0;
- }
-
- // Read some data.
- for (;;)
- {
- // Try to complete the operation without blocking.
- signed_size_type bytes = socket_ops::send(s, bufs, count, flags, ec);
-
- // Check if operation succeeded.
- if (bytes >= 0)
- return bytes;
-
- // Operation failed.
- if ((state & user_set_non_blocking)
- || (ec != boost::asio::error::would_block
- && ec != boost::asio::error::try_again))
- return 0;
-
- // Wait for socket to become ready.
- if (socket_ops::poll_write(s, 0, -1, ec) < 0)
- return 0;
- }
-}
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-
-void complete_iocp_send(
- const weak_cancel_token_type& cancel_token,
- boost::system::error_code& ec)
-{
- // Map non-portable errors to their portable counterparts.
- if (ec.value() == ERROR_NETNAME_DELETED)
- {
- if (cancel_token.expired())
- ec = boost::asio::error::operation_aborted;
- else
- ec = boost::asio::error::connection_reset;
- }
- else if (ec.value() == ERROR_PORT_UNREACHABLE)
- {
- ec = boost::asio::error::connection_refused;
- }
-}
-
-#else // defined(BOOST_ASIO_HAS_IOCP)
-
-bool non_blocking_send(socket_type s,
- const buf* bufs, size_t count, int flags,
- boost::system::error_code& ec, size_t& bytes_transferred)
-{
- for (;;)
- {
- // Write some data.
- signed_size_type bytes = socket_ops::send(s, bufs, count, flags, ec);
-
- // Retry operation if interrupted by signal.
- if (ec == boost::asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == boost::asio::error::would_block
- || ec == boost::asio::error::try_again)
- return false;
-
- // Operation is complete.
- if (bytes >= 0)
- {
- ec = boost::system::error_code();
- bytes_transferred = bytes;
- }
- else
- bytes_transferred = 0;
-
- return true;
- }
-}
-
-#endif // defined(BOOST_ASIO_HAS_IOCP)
-
-signed_size_type sendto(socket_type s, const buf* bufs, size_t count,
- int flags, const socket_addr_type* addr, std::size_t addrlen,
- boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- // Send the data.
- DWORD send_buf_count = static_cast<DWORD>(count);
- DWORD bytes_transferred = 0;
- int result = error_wrapper(::WSASendTo(s, const_cast<buf*>(bufs),
- send_buf_count, &bytes_transferred, flags, addr,
- static_cast<int>(addrlen), 0, 0), ec);
- if (ec.value() == ERROR_NETNAME_DELETED)
- ec = boost::asio::error::connection_reset;
- else if (ec.value() == ERROR_PORT_UNREACHABLE)
- ec = boost::asio::error::connection_refused;
- if (result != 0)
- return socket_error_retval;
- ec = boost::system::error_code();
- return bytes_transferred;
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- msghdr msg = msghdr();
- init_msghdr_msg_name(msg.msg_name, addr);
- msg.msg_namelen = static_cast<int>(addrlen);
- msg.msg_iov = const_cast<buf*>(bufs);
- msg.msg_iovlen = static_cast<int>(count);
-#if defined(__linux__)
- flags |= MSG_NOSIGNAL;
-#endif // defined(__linux__)
- signed_size_type result = error_wrapper(::sendmsg(s, &msg, flags), ec);
- if (result >= 0)
- ec = boost::system::error_code();
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-size_t sync_sendto(socket_type s, state_type state, const buf* bufs,
- size_t count, int flags, const socket_addr_type* addr,
- std::size_t addrlen, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return 0;
- }
-
- // Write some data.
- for (;;)
- {
- // Try to complete the operation without blocking.
- signed_size_type bytes = socket_ops::sendto(
- s, bufs, count, flags, addr, addrlen, ec);
-
- // Check if operation succeeded.
- if (bytes >= 0)
- return bytes;
-
- // Operation failed.
- if ((state & user_set_non_blocking)
- || (ec != boost::asio::error::would_block
- && ec != boost::asio::error::try_again))
- return 0;
-
- // Wait for socket to become ready.
- if (socket_ops::poll_write(s, 0, -1, ec) < 0)
- return 0;
- }
-}
-
-#if !defined(BOOST_ASIO_HAS_IOCP)
-
-bool non_blocking_sendto(socket_type s,
- const buf* bufs, size_t count, int flags,
- const socket_addr_type* addr, std::size_t addrlen,
- boost::system::error_code& ec, size_t& bytes_transferred)
-{
- for (;;)
- {
- // Write some data.
- signed_size_type bytes = socket_ops::sendto(
- s, bufs, count, flags, addr, addrlen, ec);
-
- // Retry operation if interrupted by signal.
- if (ec == boost::asio::error::interrupted)
- continue;
-
- // Check if we need to run the operation again.
- if (ec == boost::asio::error::would_block
- || ec == boost::asio::error::try_again)
- return false;
-
- // Operation is complete.
- if (bytes >= 0)
- {
- ec = boost::system::error_code();
- bytes_transferred = bytes;
- }
- else
- bytes_transferred = 0;
-
- return true;
- }
-}
-
-#endif // !defined(BOOST_ASIO_HAS_IOCP)
-
-socket_type socket(int af, int type, int protocol,
- boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- socket_type s = error_wrapper(::WSASocketW(af, type, protocol, 0, 0,
- WSA_FLAG_OVERLAPPED), ec);
- if (s == invalid_socket)
- return s;
-
- if (af == BOOST_ASIO_OS_DEF(AF_INET6))
- {
- // Try to enable the POSIX default behaviour of having IPV6_V6ONLY set to
- // false. This will only succeed on Windows Vista and later versions of
- // Windows, where a dual-stack IPv4/v6 implementation is available.
- DWORD optval = 0;
- ::setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
- reinterpret_cast<const char*>(&optval), sizeof(optval));
- }
-
- ec = boost::system::error_code();
-
- return s;
-#elif defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
- socket_type s = error_wrapper(::socket(af, type, protocol), ec);
- if (s == invalid_socket)
- return s;
-
- int optval = 1;
- int result = error_wrapper(::setsockopt(s,
- SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)), ec);
- if (result != 0)
- {
- ::close(s);
- return invalid_socket;
- }
-
- return s;
-#else
- int s = error_wrapper(::socket(af, type, protocol), ec);
- if (s >= 0)
- ec = boost::system::error_code();
- return s;
-#endif
-}
-
-template <typename SockLenType>
-inline int call_setsockopt(SockLenType msghdr::*,
- socket_type s, int level, int optname,
- const void* optval, std::size_t optlen)
-{
- return ::setsockopt(s, level, optname,
- (const char*)optval, (SockLenType)optlen);
-}
-
-int setsockopt(socket_type s, state_type& state, int level, int optname,
- const void* optval, std::size_t optlen, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
- if (level == custom_socket_option_level && optname == always_fail_option)
- {
- ec = boost::asio::error::invalid_argument;
- return socket_error_retval;
- }
-
- if (level == custom_socket_option_level
- && optname == enable_connection_aborted_option)
- {
- if (optlen != sizeof(int))
- {
- ec = boost::asio::error::invalid_argument;
- return socket_error_retval;
- }
-
- if (*static_cast<const int*>(optval))
- state |= enable_connection_aborted;
- else
- state &= ~enable_connection_aborted;
- ec = boost::system::error_code();
- return 0;
- }
-
- if (level == SOL_SOCKET && optname == SO_LINGER)
- state |= user_set_linger;
-
-#if defined(__BORLANDC__)
- // Mysteriously, using the getsockopt and setsockopt functions directly with
- // Borland C++ results in incorrect values being set and read. The bug can be
- // worked around by using function addresses resolved with GetProcAddress.
- if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
- {
- typedef int (WSAAPI *sso_t)(SOCKET, int, int, const char*, int);
- if (sso_t sso = (sso_t)::GetProcAddress(winsock_module, "setsockopt"))
- {
- clear_last_error();
- return error_wrapper(sso(s, level, optname,
- reinterpret_cast<const char*>(optval),
- static_cast<int>(optlen)), ec);
- }
- }
- ec = boost::asio::error::fault;
- return socket_error_retval;
-#else // defined(__BORLANDC__)
- clear_last_error();
- int result = error_wrapper(call_setsockopt(&msghdr::msg_namelen,
- s, level, optname, optval, optlen), ec);
- if (result == 0)
- {
- ec = boost::system::error_code();
-
-#if defined(__MACH__) && defined(__APPLE__) \
- || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
- // To implement portable behaviour for SO_REUSEADDR with UDP sockets we
- // need to also set SO_REUSEPORT on BSD-based platforms.
- if ((state & datagram_oriented)
- && level == SOL_SOCKET && optname == SO_REUSEADDR)
- {
- call_setsockopt(&msghdr::msg_namelen, s,
- SOL_SOCKET, SO_REUSEPORT, optval, optlen);
- }
-#endif
- }
-
- return result;
-#endif // defined(__BORLANDC__)
-}
-
-template <typename SockLenType>
-inline int call_getsockopt(SockLenType msghdr::*,
- socket_type s, int level, int optname,
- void* optval, std::size_t* optlen)
-{
- SockLenType tmp_optlen = (SockLenType)*optlen;
- int result = ::getsockopt(s, level, optname, (char*)optval, &tmp_optlen);
- *optlen = (std::size_t)tmp_optlen;
- return result;
-}
-
-int getsockopt(socket_type s, state_type state, int level, int optname,
- void* optval, size_t* optlen, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
- if (level == custom_socket_option_level && optname == always_fail_option)
- {
- ec = boost::asio::error::invalid_argument;
- return socket_error_retval;
- }
-
- if (level == custom_socket_option_level
- && optname == enable_connection_aborted_option)
- {
- if (*optlen != sizeof(int))
- {
- ec = boost::asio::error::invalid_argument;
- return socket_error_retval;
- }
-
- *static_cast<int*>(optval) = (state & enable_connection_aborted) ? 1 : 0;
- ec = boost::system::error_code();
- return 0;
- }
-
-#if defined(__BORLANDC__)
- // Mysteriously, using the getsockopt and setsockopt functions directly with
- // Borland C++ results in incorrect values being set and read. The bug can be
- // worked around by using function addresses resolved with GetProcAddress.
- if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
- {
- typedef int (WSAAPI *gso_t)(SOCKET, int, int, char*, int*);
- if (gso_t gso = (gso_t)::GetProcAddress(winsock_module, "getsockopt"))
- {
- clear_last_error();
- int tmp_optlen = static_cast<int>(*optlen);
- int result = error_wrapper(gso(s, level, optname,
- reinterpret_cast<char*>(optval), &tmp_optlen), ec);
- *optlen = static_cast<size_t>(tmp_optlen);
- if (result != 0 && level == IPPROTO_IPV6 && optname == IPV6_V6ONLY
- && ec.value() == WSAENOPROTOOPT && *optlen == sizeof(DWORD))
- {
- // Dual-stack IPv4/v6 sockets, and the IPV6_V6ONLY socket option, are
- // only supported on Windows Vista and later. To simplify program logic
- // we will fake success of getting this option and specify that the
- // value is non-zero (i.e. true). This corresponds to the behavior of
- // IPv6 sockets on Windows platforms pre-Vista.
- *static_cast<DWORD*>(optval) = 1;
- ec = boost::system::error_code();
- }
- return result;
- }
- }
- ec = boost::asio::error::fault;
- return socket_error_retval;
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- clear_last_error();
- int result = error_wrapper(call_getsockopt(&msghdr::msg_namelen,
- s, level, optname, optval, optlen), ec);
- if (result != 0 && level == IPPROTO_IPV6 && optname == IPV6_V6ONLY
- && ec.value() == WSAENOPROTOOPT && *optlen == sizeof(DWORD))
- {
- // Dual-stack IPv4/v6 sockets, and the IPV6_V6ONLY socket option, are only
- // supported on Windows Vista and later. To simplify program logic we will
- // fake success of getting this option and specify that the value is
- // non-zero (i.e. true). This corresponds to the behavior of IPv6 sockets
- // on Windows platforms pre-Vista.
- *static_cast<DWORD*>(optval) = 1;
- ec = boost::system::error_code();
- }
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- clear_last_error();
- int result = error_wrapper(call_getsockopt(&msghdr::msg_namelen,
- s, level, optname, optval, optlen), ec);
-#if defined(__linux__)
- if (result == 0 && level == SOL_SOCKET && *optlen == sizeof(int)
- && (optname == SO_SNDBUF || optname == SO_RCVBUF))
- {
- // On Linux, setting SO_SNDBUF or SO_RCVBUF to N actually causes the kernel
- // to set the buffer size to N*2. Linux puts additional stuff into the
- // buffers so that only about half is actually available to the application.
- // The retrieved value is divided by 2 here to make it appear as though the
- // correct value has been set.
- *static_cast<int*>(optval) /= 2;
- }
-#endif // defined(__linux__)
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-template <typename SockLenType>
-inline int call_getpeername(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
-{
- SockLenType tmp_addrlen = (SockLenType)*addrlen;
- int result = ::getpeername(s, addr, &tmp_addrlen);
- *addrlen = (std::size_t)tmp_addrlen;
- return result;
-}
-
-int getpeername(socket_type s, socket_addr_type* addr,
- std::size_t* addrlen, bool cached, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
-#if defined(BOOST_ASIO_WINDOWS) && !defined(BOOST_ASIO_WINDOWS_APP) \
- || defined(__CYGWIN__)
- if (cached)
- {
- // Check if socket is still connected.
- DWORD connect_time = 0;
- size_t connect_time_len = sizeof(connect_time);
- if (socket_ops::getsockopt(s, 0, SOL_SOCKET, SO_CONNECT_TIME,
- &connect_time, &connect_time_len, ec) == socket_error_retval)
- {
- return socket_error_retval;
- }
- if (connect_time == 0xFFFFFFFF)
- {
- ec = boost::asio::error::not_connected;
- return socket_error_retval;
- }
-
- // The cached value is still valid.
- ec = boost::system::error_code();
- return 0;
- }
-#else // defined(BOOST_ASIO_WINDOWS) && !defined(BOOST_ASIO_WINDOWS_APP)
- // || defined(__CYGWIN__)
- (void)cached;
-#endif // defined(BOOST_ASIO_WINDOWS) && !defined(BOOST_ASIO_WINDOWS_APP)
- // || defined(__CYGWIN__)
-
- clear_last_error();
- int result = error_wrapper(call_getpeername(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-}
-
-template <typename SockLenType>
-inline int call_getsockname(SockLenType msghdr::*,
- socket_type s, socket_addr_type* addr, std::size_t* addrlen)
-{
- SockLenType tmp_addrlen = (SockLenType)*addrlen;
- int result = ::getsockname(s, addr, &tmp_addrlen);
- *addrlen = (std::size_t)tmp_addrlen;
- return result;
-}
-
-int getsockname(socket_type s, socket_addr_type* addr,
- std::size_t* addrlen, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
- clear_last_error();
- int result = error_wrapper(call_getsockname(
- &msghdr::msg_namelen, s, addr, addrlen), ec);
- if (result == 0)
- ec = boost::system::error_code();
- return result;
-}
-
-int ioctl(socket_type s, state_type& state, int cmd,
- ioctl_arg_type* arg, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- int result = error_wrapper(::ioctlsocket(s, cmd, arg), ec);
-#elif defined(__MACH__) && defined(__APPLE__) \
- || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
- int result = error_wrapper(::ioctl(s,
- static_cast<unsigned int>(cmd), arg), ec);
-#else
- int result = error_wrapper(::ioctl(s, cmd, arg), ec);
-#endif
- if (result >= 0)
- {
- ec = boost::system::error_code();
-
- // When updating the non-blocking mode we always perform the ioctl syscall,
- // even if the flags would otherwise indicate that the socket is already in
- // the correct state. This ensures that the underlying socket is put into
- // the state that has been requested by the user. If the ioctl syscall was
- // successful then we need to update the flags to match.
- if (cmd == static_cast<int>(FIONBIO))
- {
- if (*arg)
- {
- state |= user_set_non_blocking;
- }
- else
- {
- // Clearing the non-blocking mode always overrides any internally-set
- // non-blocking flag. Any subsequent asynchronous operations will need
- // to re-enable non-blocking I/O.
- state &= ~(user_set_non_blocking | internal_non_blocking);
- }
- }
- }
-
- return result;
-}
-
-int select(int nfds, fd_set* readfds, fd_set* writefds,
- fd_set* exceptfds, timeval* timeout, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- if (!readfds && !writefds && !exceptfds && timeout)
- {
- DWORD milliseconds = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
- if (milliseconds == 0)
- milliseconds = 1; // Force context switch.
- ::Sleep(milliseconds);
- ec = boost::system::error_code();
- return 0;
- }
-
- // The select() call allows timeout values measured in microseconds, but the
- // system clock (as wrapped by boost::posix_time::microsec_clock) typically
- // has a resolution of 10 milliseconds. This can lead to a spinning select
- // reactor, meaning increased CPU usage, when waiting for the earliest
- // scheduled timeout if it's less than 10 milliseconds away. To avoid a tight
- // spin we'll use a minimum timeout of 1 millisecond.
- if (timeout && timeout->tv_sec == 0
- && timeout->tv_usec > 0 && timeout->tv_usec < 1000)
- timeout->tv_usec = 1000;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-
-#if defined(__hpux) && defined(__SELECT)
- timespec ts;
- ts.tv_sec = timeout ? timeout->tv_sec : 0;
- ts.tv_nsec = timeout ? timeout->tv_usec * 1000 : 0;
- return error_wrapper(::pselect(nfds, readfds,
- writefds, exceptfds, timeout ? &ts : 0, 0), ec);
-#else
- int result = error_wrapper(::select(nfds, readfds,
- writefds, exceptfds, timeout), ec);
- if (result >= 0)
- ec = boost::system::error_code();
- return result;
-#endif
-}
-
-int poll_read(socket_type s, state_type state,
- int msec, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(__CYGWIN__) \
- || defined(__SYMBIAN32__)
- fd_set fds;
- FD_ZERO(&fds);
- FD_SET(s, &fds);
- timeval timeout_obj;
- timeval* timeout;
- if (state & user_set_non_blocking)
- {
- timeout_obj.tv_sec = 0;
- timeout_obj.tv_usec = 0;
- timeout = &timeout_obj;
- }
- else if (msec >= 0)
- {
- timeout_obj.tv_sec = msec / 1000;
- timeout_obj.tv_usec = (msec % 1000) * 1000;
- timeout = &timeout_obj;
- }
- else
- timeout = 0;
- clear_last_error();
- int result = error_wrapper(::select(s + 1, &fds, 0, 0, timeout), ec);
-#else // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- pollfd fds;
- fds.fd = s;
- fds.events = POLLIN;
- fds.revents = 0;
- int timeout = (state & user_set_non_blocking) ? 0 : msec;
- clear_last_error();
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
-#endif // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- if (result == 0)
- ec = (state & user_set_non_blocking)
- ? boost::asio::error::would_block : boost::system::error_code();
- else if (result > 0)
- ec = boost::system::error_code();
- return result;
-}
-
-int poll_write(socket_type s, state_type state,
- int msec, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(__CYGWIN__) \
- || defined(__SYMBIAN32__)
- fd_set fds;
- FD_ZERO(&fds);
- FD_SET(s, &fds);
- timeval timeout_obj;
- timeval* timeout;
- if (state & user_set_non_blocking)
- {
- timeout_obj.tv_sec = 0;
- timeout_obj.tv_usec = 0;
- timeout = &timeout_obj;
- }
- else if (msec >= 0)
- {
- timeout_obj.tv_sec = msec / 1000;
- timeout_obj.tv_usec = (msec % 1000) * 1000;
- timeout = &timeout_obj;
- }
- else
- timeout = 0;
- clear_last_error();
- int result = error_wrapper(::select(s + 1, 0, &fds, 0, timeout), ec);
-#else // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- pollfd fds;
- fds.fd = s;
- fds.events = POLLOUT;
- fds.revents = 0;
- int timeout = (state & user_set_non_blocking) ? 0 : msec;
- clear_last_error();
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
-#endif // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- if (result == 0)
- ec = (state & user_set_non_blocking)
- ? boost::asio::error::would_block : boost::system::error_code();
- else if (result > 0)
- ec = boost::system::error_code();
- return result;
-}
-
-int poll_error(socket_type s, state_type state,
- int msec, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(__CYGWIN__) \
- || defined(__SYMBIAN32__)
- fd_set fds;
- FD_ZERO(&fds);
- FD_SET(s, &fds);
- timeval timeout_obj;
- timeval* timeout;
- if (state & user_set_non_blocking)
- {
- timeout_obj.tv_sec = 0;
- timeout_obj.tv_usec = 0;
- timeout = &timeout_obj;
- }
- else if (msec >= 0)
- {
- timeout_obj.tv_sec = msec / 1000;
- timeout_obj.tv_usec = (msec % 1000) * 1000;
- timeout = &timeout_obj;
- }
- else
- timeout = 0;
- clear_last_error();
- int result = error_wrapper(::select(s + 1, 0, 0, &fds, timeout), ec);
-#else // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- pollfd fds;
- fds.fd = s;
- fds.events = POLLPRI | POLLERR | POLLHUP;
- fds.revents = 0;
- int timeout = (state & user_set_non_blocking) ? 0 : msec;
- clear_last_error();
- int result = error_wrapper(::poll(&fds, 1, timeout), ec);
-#endif // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- if (result == 0)
- ec = (state & user_set_non_blocking)
- ? boost::asio::error::would_block : boost::system::error_code();
- else if (result > 0)
- ec = boost::system::error_code();
- return result;
-}
-
-int poll_connect(socket_type s, int msec, boost::system::error_code& ec)
-{
- if (s == invalid_socket)
- {
- ec = boost::asio::error::bad_descriptor;
- return socket_error_retval;
- }
-
-#if defined(BOOST_ASIO_WINDOWS) \
- || defined(__CYGWIN__) \
- || defined(__SYMBIAN32__)
- fd_set write_fds;
- FD_ZERO(&write_fds);
- FD_SET(s, &write_fds);
- fd_set except_fds;
- FD_ZERO(&except_fds);
- FD_SET(s, &except_fds);
- timeval timeout_obj;
- timeval* timeout;
- if (msec >= 0)
- {
- timeout_obj.tv_sec = msec / 1000;
- timeout_obj.tv_usec = (msec % 1000) * 1000;
- timeout = &timeout_obj;
- }
- else
- timeout = 0;
- clear_last_error();
- int result = error_wrapper(::select(
- s + 1, 0, &write_fds, &except_fds, timeout), ec);
- if (result >= 0)
- ec = boost::system::error_code();
- return result;
-#else // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
- pollfd fds;
- fds.fd = s;
- fds.events = POLLOUT;
- fds.revents = 0;
- clear_last_error();
- int result = error_wrapper(::poll(&fds, 1, msec), ec);
- if (result >= 0)
- ec = boost::system::error_code();
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS)
- // || defined(__CYGWIN__)
- // || defined(__SYMBIAN32__)
-}
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-const char* inet_ntop(int af, const void* src, char* dest, size_t length,
- unsigned long scope_id, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- using namespace std; // For sprintf.
- const unsigned char* bytes = static_cast<const unsigned char*>(src);
- if (af == BOOST_ASIO_OS_DEF(AF_INET))
- {
- sprintf_s(dest, length, "%u.%u.%u.%u",
- bytes[0], bytes[1], bytes[2], bytes[3]);
- return dest;
- }
- else if (af == BOOST_ASIO_OS_DEF(AF_INET6))
- {
- size_t n = 0, b = 0, z = 0;
- while (n < length && b < 16)
- {
- if (bytes[b] == 0 && bytes[b + 1] == 0 && z == 0)
- {
- do b += 2; while (b < 16 && bytes[b] == 0 && bytes[b + 1] == 0);
- n += sprintf_s(dest + n, length - n, ":%s", b < 16 ? "" : ":"), ++z;
- }
- else
- {
- n += sprintf_s(dest + n, length - n, "%s%x", b ? ":" : "",
- (static_cast<u_long_type>(bytes[b]) << 8) | bytes[b + 1]);
- b += 2;
- }
- }
- if (scope_id)
- n += sprintf_s(dest + n, length - n, "%%%lu", scope_id);
- return dest;
- }
- else
- {
- ec = boost::asio::error::address_family_not_supported;
- return 0;
- }
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- using namespace std; // For memcpy.
-
- if (af != BOOST_ASIO_OS_DEF(AF_INET) && af != BOOST_ASIO_OS_DEF(AF_INET6))
- {
- ec = boost::asio::error::address_family_not_supported;
- return 0;
- }
-
- union
- {
- socket_addr_type base;
- sockaddr_storage_type storage;
- sockaddr_in4_type v4;
- sockaddr_in6_type v6;
- } address;
- DWORD address_length;
- if (af == BOOST_ASIO_OS_DEF(AF_INET))
- {
- address_length = sizeof(sockaddr_in4_type);
- address.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
- address.v4.sin_port = 0;
- memcpy(&address.v4.sin_addr, src, sizeof(in4_addr_type));
- }
- else // AF_INET6
- {
- address_length = sizeof(sockaddr_in6_type);
- address.v6.sin6_family = BOOST_ASIO_OS_DEF(AF_INET6);
- address.v6.sin6_port = 0;
- address.v6.sin6_flowinfo = 0;
- address.v6.sin6_scope_id = scope_id;
- memcpy(&address.v6.sin6_addr, src, sizeof(in6_addr_type));
- }
-
- DWORD string_length = static_cast<DWORD>(length);
-#if defined(BOOST_NO_ANSI_APIS) || (defined(_MSC_VER) && (_MSC_VER >= 1800))
- LPWSTR string_buffer = (LPWSTR)_alloca(length * sizeof(WCHAR));
- int result = error_wrapper(::WSAAddressToStringW(&address.base,
- address_length, 0, string_buffer, &string_length), ec);
- ::WideCharToMultiByte(CP_ACP, 0, string_buffer, -1,
- dest, static_cast<int>(length), 0, 0);
-#else
- int result = error_wrapper(::WSAAddressToStringA(
- &address.base, address_length, 0, dest, &string_length), ec);
-#endif
-
- // Windows may set error code on success.
- if (result != socket_error_retval)
- ec = boost::system::error_code();
-
- // Windows may not set an error code on failure.
- else if (result == socket_error_retval && !ec)
- ec = boost::asio::error::invalid_argument;
-
- return result == socket_error_retval ? 0 : dest;
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- const char* result = error_wrapper(::inet_ntop(
- af, src, dest, static_cast<int>(length)), ec);
- if (result == 0 && !ec)
- ec = boost::asio::error::invalid_argument;
- if (result != 0 && af == BOOST_ASIO_OS_DEF(AF_INET6) && scope_id != 0)
- {
- using namespace std; // For strcat and sprintf.
- char if_name[IF_NAMESIZE + 1] = "%";
- const in6_addr_type* ipv6_address = static_cast<const in6_addr_type*>(src);
- bool is_link_local = ((ipv6_address->s6_addr[0] == 0xfe)
- && ((ipv6_address->s6_addr[1] & 0xc0) == 0x80));
- bool is_multicast_link_local = ((ipv6_address->s6_addr[0] == 0xff)
- && ((ipv6_address->s6_addr[1] & 0x0f) == 0x02));
- if ((!is_link_local && !is_multicast_link_local)
- || if_indextoname(static_cast<unsigned>(scope_id), if_name + 1) == 0)
- sprintf(if_name + 1, "%lu", scope_id);
- strcat(dest, if_name);
- }
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-int inet_pton(int af, const char* src, void* dest,
- unsigned long* scope_id, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- using namespace std; // For sscanf.
- unsigned char* bytes = static_cast<unsigned char*>(dest);
- if (af == BOOST_ASIO_OS_DEF(AF_INET))
- {
- unsigned int b0, b1, b2, b3;
- if (sscanf_s(src, "%u.%u.%u.%u", &b0, &b1, &b2, &b3) != 4)
- {
- ec = boost::asio::error::invalid_argument;
- return -1;
- }
- if (b0 > 255 || b1 > 255 || b2 > 255 || b3 > 255)
- {
- ec = boost::asio::error::invalid_argument;
- return -1;
- }
- bytes[0] = static_cast<unsigned char>(b0);
- bytes[1] = static_cast<unsigned char>(b1);
- bytes[2] = static_cast<unsigned char>(b2);
- bytes[3] = static_cast<unsigned char>(b3);
- ec = boost::system::error_code();
- return 1;
- }
- else if (af == BOOST_ASIO_OS_DEF(AF_INET6))
- {
- unsigned char* bytes = static_cast<unsigned char*>(dest);
- std::memset(bytes, 0, 16);
- unsigned char back_bytes[16] = { 0 };
- int num_front_bytes = 0, num_back_bytes = 0;
- const char* p = src;
-
- enum { fword, fcolon, bword, scope, done } state = fword;
- unsigned long current_word = 0;
- while (state != done)
- {
- if (current_word > 0xFFFF)
- {
- ec = boost::asio::error::invalid_argument;
- return -1;
- }
-
- switch (state)
- {
- case fword:
- if (*p >= '0' && *p <= '9')
- current_word = current_word * 16 + *p++ - '0';
- else if (*p >= 'a' && *p <= 'f')
- current_word = current_word * 16 + *p++ - 'a' + 10;
- else if (*p >= 'A' && *p <= 'F')
- current_word = current_word * 16 + *p++ - 'A' + 10;
- else
- {
- if (num_front_bytes == 16)
- {
- ec = boost::asio::error::invalid_argument;
- return -1;
- }
-
- bytes[num_front_bytes++] = (current_word >> 8) & 0xFF;
- bytes[num_front_bytes++] = current_word & 0xFF;
- current_word = 0;
-
- if (*p == ':')
- state = fcolon, ++p;
- else if (*p == '%')
- state = scope, ++p;
- else if (*p == 0)
- state = done;
- else
- {
- ec = boost::asio::error::invalid_argument;
- return -1;
- }
- }
- break;
-
- case fcolon:
- if (*p == ':')
- state = bword, ++p;
- else
- state = fword;
- break;
-
- case bword:
- if (*p >= '0' && *p <= '9')
- current_word = current_word * 16 + *p++ - '0';
- else if (*p >= 'a' && *p <= 'f')
- current_word = current_word * 16 + *p++ - 'a' + 10;
- else if (*p >= 'A' && *p <= 'F')
- current_word = current_word * 16 + *p++ - 'A' + 10;
- else
- {
- if (num_front_bytes + num_back_bytes == 16)
- {
- ec = boost::asio::error::invalid_argument;
- return -1;
- }
-
- back_bytes[num_back_bytes++] = (current_word >> 8) & 0xFF;
- back_bytes[num_back_bytes++] = current_word & 0xFF;
- current_word = 0;
-
- if (*p == ':')
- state = bword, ++p;
- else if (*p == '%')
- state = scope, ++p;
- else if (*p == 0)
- state = done;
- else
- {
- ec = boost::asio::error::invalid_argument;
- return -1;
- }
- }
- break;
-
- case scope:
- if (*p >= '0' && *p <= '9')
- current_word = current_word * 10 + *p++ - '0';
- else if (*p == 0)
- *scope_id = current_word, state = done;
- else
- {
- ec = boost::asio::error::invalid_argument;
- return -1;
- }
- break;
-
- default:
- break;
- }
- }
-
- for (int i = 0; i < num_back_bytes; ++i)
- bytes[16 - num_back_bytes + i] = back_bytes[i];
-
- ec = boost::system::error_code();
- return 1;
- }
- else
- {
- ec = boost::asio::error::address_family_not_supported;
- return -1;
- }
-#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- using namespace std; // For memcpy and strcmp.
-
- if (af != BOOST_ASIO_OS_DEF(AF_INET) && af != BOOST_ASIO_OS_DEF(AF_INET6))
- {
- ec = boost::asio::error::address_family_not_supported;
- return -1;
- }
-
- union
- {
- socket_addr_type base;
- sockaddr_storage_type storage;
- sockaddr_in4_type v4;
- sockaddr_in6_type v6;
- } address;
- int address_length = sizeof(sockaddr_storage_type);
-#if defined(BOOST_NO_ANSI_APIS) || (defined(_MSC_VER) && (_MSC_VER >= 1800))
- int num_wide_chars = static_cast<int>(strlen(src)) + 1;
- LPWSTR wide_buffer = (LPWSTR)_alloca(num_wide_chars * sizeof(WCHAR));
- ::MultiByteToWideChar(CP_ACP, 0, src, -1, wide_buffer, num_wide_chars);
- int result = error_wrapper(::WSAStringToAddressW(
- wide_buffer, af, 0, &address.base, &address_length), ec);
-#else
- int result = error_wrapper(::WSAStringToAddressA(
- const_cast<char*>(src), af, 0, &address.base, &address_length), ec);
-#endif
-
- if (af == BOOST_ASIO_OS_DEF(AF_INET))
- {
- if (result != socket_error_retval)
- {
- memcpy(dest, &address.v4.sin_addr, sizeof(in4_addr_type));
- ec = boost::system::error_code();
- }
- else if (strcmp(src, "255.255.255.255") == 0)
- {
- static_cast<in4_addr_type*>(dest)->s_addr = INADDR_NONE;
- ec = boost::system::error_code();
- }
- }
- else // AF_INET6
- {
- if (result != socket_error_retval)
- {
- memcpy(dest, &address.v6.sin6_addr, sizeof(in6_addr_type));
- if (scope_id)
- *scope_id = address.v6.sin6_scope_id;
- ec = boost::system::error_code();
- }
- }
-
- // Windows may not set an error code on failure.
- if (result == socket_error_retval && !ec)
- ec = boost::asio::error::invalid_argument;
-
- if (result != socket_error_retval)
- ec = boost::system::error_code();
-
- return result == socket_error_retval ? -1 : 1;
-#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- using namespace std; // For strchr, memcpy and atoi.
-
- // On some platforms, inet_pton fails if an address string contains a scope
- // id. Detect and remove the scope id before passing the string to inet_pton.
- const bool is_v6 = (af == BOOST_ASIO_OS_DEF(AF_INET6));
- const char* if_name = is_v6 ? strchr(src, '%') : 0;
- char src_buf[max_addr_v6_str_len + 1];
- const char* src_ptr = src;
- if (if_name != 0)
- {
- if (if_name - src > max_addr_v6_str_len)
- {
- ec = boost::asio::error::invalid_argument;
- return 0;
- }
- memcpy(src_buf, src, if_name - src);
- src_buf[if_name - src] = 0;
- src_ptr = src_buf;
- }
-
- int result = error_wrapper(::inet_pton(af, src_ptr, dest), ec);
- if (result <= 0 && !ec)
- ec = boost::asio::error::invalid_argument;
- if (result > 0 && is_v6 && scope_id)
- {
- using namespace std; // For strchr and atoi.
- *scope_id = 0;
- if (if_name != 0)
- {
- in6_addr_type* ipv6_address = static_cast<in6_addr_type*>(dest);
- bool is_link_local = ((ipv6_address->s6_addr[0] == 0xfe)
- && ((ipv6_address->s6_addr[1] & 0xc0) == 0x80));
- bool is_multicast_link_local = ((ipv6_address->s6_addr[0] == 0xff)
- && ((ipv6_address->s6_addr[1] & 0x0f) == 0x02));
- if (is_link_local || is_multicast_link_local)
- *scope_id = if_nametoindex(if_name + 1);
- if (*scope_id == 0)
- *scope_id = atoi(if_name + 1);
- }
- }
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-}
-
-int gethostname(char* name, int namelen, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- try
- {
- using namespace Windows::Foundation::Collections;
- using namespace Windows::Networking;
- using namespace Windows::Networking::Connectivity;
- IVectorView<HostName^>^ hostnames = NetworkInformation::GetHostNames();
- for (unsigned i = 0; i < hostnames->Size; ++i)
- {
- HostName^ hostname = hostnames->GetAt(i);
- if (hostname->Type == HostNameType::DomainName)
- {
- std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
- std::string raw_name = converter.to_bytes(hostname->RawName->Data());
- if (namelen > 0 && raw_name.size() < static_cast<std::size_t>(namelen))
- {
- strcpy_s(name, namelen, raw_name.c_str());
- return 0;
- }
- }
- }
- return -1;
- }
- catch (Platform::Exception^ e)
- {
- ec = boost::system::error_code(e->HResult,
- boost::system::system_category());
- return -1;
- }
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- int result = error_wrapper(::gethostname(name, namelen), ec);
-# if defined(BOOST_ASIO_WINDOWS)
- if (result == 0)
- ec = boost::system::error_code();
-# endif // defined(BOOST_ASIO_WINDOWS)
- return result;
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-}
-
-#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#if !defined(BOOST_ASIO_HAS_GETADDRINFO)
-
-// The following functions are only needed for emulation of getaddrinfo and
-// getnameinfo.
-
-inline boost::system::error_code translate_netdb_error(int error)
-{
- switch (error)
- {
- case 0:
- return boost::system::error_code();
- case HOST_NOT_FOUND:
- return boost::asio::error::host_not_found;
- case TRY_AGAIN:
- return boost::asio::error::host_not_found_try_again;
- case NO_RECOVERY:
- return boost::asio::error::no_recovery;
- case NO_DATA:
- return boost::asio::error::no_data;
- default:
- BOOST_ASIO_ASSERT(false);
- return boost::asio::error::invalid_argument;
- }
-}
-
-inline hostent* gethostbyaddr(const char* addr, int length, int af,
- hostent* result, char* buffer, int buflength, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- (void)(buffer);
- (void)(buflength);
- hostent* retval = error_wrapper(::gethostbyaddr(addr, length, af), ec);
- if (!retval)
- return 0;
- ec = boost::system::error_code();
- *result = *retval;
- return retval;
-#elif defined(__sun) || defined(__QNX__)
- int error = 0;
- hostent* retval = error_wrapper(::gethostbyaddr_r(addr, length, af, result,
- buffer, buflength, &error), ec);
- if (error)
- ec = translate_netdb_error(error);
- return retval;
-#elif defined(__MACH__) && defined(__APPLE__)
- (void)(buffer);
- (void)(buflength);
- int error = 0;
- hostent* retval = error_wrapper(::getipnodebyaddr(
- addr, length, af, &error), ec);
- if (error)
- ec = translate_netdb_error(error);
- if (!retval)
- return 0;
- *result = *retval;
- return retval;
-#else
- hostent* retval = 0;
- int error = 0;
- error_wrapper(::gethostbyaddr_r(addr, length, af, result, buffer,
- buflength, &retval, &error), ec);
- if (error)
- ec = translate_netdb_error(error);
- return retval;
-#endif
-}
-
-inline hostent* gethostbyname(const char* name, int af, struct hostent* result,
- char* buffer, int buflength, int ai_flags, boost::system::error_code& ec)
-{
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- (void)(buffer);
- (void)(buflength);
- (void)(ai_flags);
- if (af != BOOST_ASIO_OS_DEF(AF_INET))
- {
- ec = boost::asio::error::address_family_not_supported;
- return 0;
- }
- hostent* retval = error_wrapper(::gethostbyname(name), ec);
- if (!retval)
- return 0;
- ec = boost::system::error_code();
- *result = *retval;
- return result;
-#elif defined(__sun) || defined(__QNX__)
- (void)(ai_flags);
- if (af != BOOST_ASIO_OS_DEF(AF_INET))
- {
- ec = boost::asio::error::address_family_not_supported;
- return 0;
- }
- int error = 0;
- hostent* retval = error_wrapper(::gethostbyname_r(name, result, buffer,
- buflength, &error), ec);
- if (error)
- ec = translate_netdb_error(error);
- return retval;
-#elif defined(__MACH__) && defined(__APPLE__)
- (void)(buffer);
- (void)(buflength);
- int error = 0;
- hostent* retval = error_wrapper(::getipnodebyname(
- name, af, ai_flags, &error), ec);
- if (error)
- ec = translate_netdb_error(error);
- if (!retval)
- return 0;
- *result = *retval;
- return retval;
-#else
- (void)(ai_flags);
- if (af != BOOST_ASIO_OS_DEF(AF_INET))
- {
- ec = boost::asio::error::address_family_not_supported;
- return 0;
- }
- hostent* retval = 0;
- int error = 0;
- error_wrapper(::gethostbyname_r(name, result,
- buffer, buflength, &retval, &error), ec);
- if (error)
- ec = translate_netdb_error(error);
- return retval;
-#endif
-}
-
-inline void freehostent(hostent* h)
-{
-#if defined(__MACH__) && defined(__APPLE__)
- if (h)
- ::freehostent(h);
-#else
- (void)(h);
-#endif
-}
-
-// Emulation of getaddrinfo based on implementation in:
-// Stevens, W. R., UNIX Network Programming Vol. 1, 2nd Ed., Prentice-Hall 1998.
-
-struct gai_search
-{
- const char* host;
- int family;
-};
-
-inline int gai_nsearch(const char* host,
- const addrinfo_type* hints, gai_search (&search)[2])
-{
- int search_count = 0;
- if (host == 0 || host[0] == '\0')
- {
- if (hints->ai_flags & AI_PASSIVE)
- {
- // No host and AI_PASSIVE implies wildcard bind.
- switch (hints->ai_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- search[search_count].host = "0.0.0.0";
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
- ++search_count;
- break;
- case BOOST_ASIO_OS_DEF(AF_INET6):
- search[search_count].host = "0::0";
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
- ++search_count;
- break;
- case BOOST_ASIO_OS_DEF(AF_UNSPEC):
- search[search_count].host = "0::0";
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
- ++search_count;
- search[search_count].host = "0.0.0.0";
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
- ++search_count;
- break;
- default:
- break;
- }
- }
- else
- {
- // No host and not AI_PASSIVE means connect to local host.
- switch (hints->ai_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- search[search_count].host = "localhost";
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
- ++search_count;
- break;
- case BOOST_ASIO_OS_DEF(AF_INET6):
- search[search_count].host = "localhost";
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
- ++search_count;
- break;
- case BOOST_ASIO_OS_DEF(AF_UNSPEC):
- search[search_count].host = "localhost";
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
- ++search_count;
- search[search_count].host = "localhost";
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
- ++search_count;
- break;
- default:
- break;
- }
- }
- }
- else
- {
- // Host is specified.
- switch (hints->ai_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- search[search_count].host = host;
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
- ++search_count;
- break;
- case BOOST_ASIO_OS_DEF(AF_INET6):
- search[search_count].host = host;
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
- ++search_count;
- break;
- case BOOST_ASIO_OS_DEF(AF_UNSPEC):
- search[search_count].host = host;
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
- ++search_count;
- search[search_count].host = host;
- search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
- ++search_count;
- break;
- default:
- break;
- }
- }
- return search_count;
-}
-
-template <typename T>
-inline T* gai_alloc(std::size_t size = sizeof(T))
-{
- using namespace std;
- T* p = static_cast<T*>(::operator new(size, std::nothrow));
- if (p)
- memset(p, 0, size);
- return p;
-}
-
-inline void gai_free(void* p)
-{
- ::operator delete(p);
-}
-
-inline void gai_strcpy(char* target, const char* source, std::size_t max_size)
-{
- using namespace std;
-#if defined(BOOST_ASIO_HAS_SECURE_RTL)
- strcpy_s(target, max_size, source);
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
- *target = 0;
- if (max_size > 0)
- strncat(target, source, max_size - 1);
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
-}
-
-enum { gai_clone_flag = 1 << 30 };
-
-inline int gai_aistruct(addrinfo_type*** next, const addrinfo_type* hints,
- const void* addr, int family)
-{
- using namespace std;
-
- addrinfo_type* ai = gai_alloc<addrinfo_type>();
- if (ai == 0)
- return EAI_MEMORY;
-
- ai->ai_next = 0;
- **next = ai;
- *next = &ai->ai_next;
-
- ai->ai_canonname = 0;
- ai->ai_socktype = hints->ai_socktype;
- if (ai->ai_socktype == 0)
- ai->ai_flags |= gai_clone_flag;
- ai->ai_protocol = hints->ai_protocol;
- ai->ai_family = family;
-
- switch (ai->ai_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- {
- sockaddr_in4_type* sinptr = gai_alloc<sockaddr_in4_type>();
- if (sinptr == 0)
- return EAI_MEMORY;
- sinptr->sin_family = BOOST_ASIO_OS_DEF(AF_INET);
- memcpy(&sinptr->sin_addr, addr, sizeof(in4_addr_type));
- ai->ai_addr = reinterpret_cast<sockaddr*>(sinptr);
- ai->ai_addrlen = sizeof(sockaddr_in4_type);
- break;
- }
- case BOOST_ASIO_OS_DEF(AF_INET6):
- {
- sockaddr_in6_type* sin6ptr = gai_alloc<sockaddr_in6_type>();
- if (sin6ptr == 0)
- return EAI_MEMORY;
- sin6ptr->sin6_family = BOOST_ASIO_OS_DEF(AF_INET6);
- memcpy(&sin6ptr->sin6_addr, addr, sizeof(in6_addr_type));
- ai->ai_addr = reinterpret_cast<sockaddr*>(sin6ptr);
- ai->ai_addrlen = sizeof(sockaddr_in6_type);
- break;
- }
- default:
- break;
- }
-
- return 0;
-}
-
-inline addrinfo_type* gai_clone(addrinfo_type* ai)
-{
- using namespace std;
-
- addrinfo_type* new_ai = gai_alloc<addrinfo_type>();
- if (new_ai == 0)
- return new_ai;
-
- new_ai->ai_next = ai->ai_next;
- ai->ai_next = new_ai;
-
- new_ai->ai_flags = 0;
- new_ai->ai_family = ai->ai_family;
- new_ai->ai_socktype = ai->ai_socktype;
- new_ai->ai_protocol = ai->ai_protocol;
- new_ai->ai_canonname = 0;
- new_ai->ai_addrlen = ai->ai_addrlen;
- new_ai->ai_addr = gai_alloc<sockaddr>(ai->ai_addrlen);
- memcpy(new_ai->ai_addr, ai->ai_addr, ai->ai_addrlen);
-
- return new_ai;
-}
-
-inline int gai_port(addrinfo_type* aihead, int port, int socktype)
-{
- int num_found = 0;
-
- for (addrinfo_type* ai = aihead; ai; ai = ai->ai_next)
- {
- if (ai->ai_flags & gai_clone_flag)
- {
- if (ai->ai_socktype != 0)
- {
- ai = gai_clone(ai);
- if (ai == 0)
- return -1;
- // ai now points to newly cloned entry.
- }
- }
- else if (ai->ai_socktype != socktype)
- {
- // Ignore if mismatch on socket type.
- continue;
- }
-
- ai->ai_socktype = socktype;
-
- switch (ai->ai_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- {
- sockaddr_in4_type* sinptr =
- reinterpret_cast<sockaddr_in4_type*>(ai->ai_addr);
- sinptr->sin_port = port;
- ++num_found;
- break;
- }
- case BOOST_ASIO_OS_DEF(AF_INET6):
- {
- sockaddr_in6_type* sin6ptr =
- reinterpret_cast<sockaddr_in6_type*>(ai->ai_addr);
- sin6ptr->sin6_port = port;
- ++num_found;
- break;
- }
- default:
- break;
- }
- }
-
- return num_found;
-}
-
-inline int gai_serv(addrinfo_type* aihead,
- const addrinfo_type* hints, const char* serv)
-{
- using namespace std;
-
- int num_found = 0;
-
- if (
-#if defined(AI_NUMERICSERV)
- (hints->ai_flags & AI_NUMERICSERV) ||
-#endif
- isdigit(static_cast<unsigned char>(serv[0])))
- {
- int port = htons(atoi(serv));
- if (hints->ai_socktype)
- {
- // Caller specifies socket type.
- int rc = gai_port(aihead, port, hints->ai_socktype);
- if (rc < 0)
- return EAI_MEMORY;
- num_found += rc;
- }
- else
- {
- // Caller does not specify socket type.
- int rc = gai_port(aihead, port, SOCK_STREAM);
- if (rc < 0)
- return EAI_MEMORY;
- num_found += rc;
- rc = gai_port(aihead, port, SOCK_DGRAM);
- if (rc < 0)
- return EAI_MEMORY;
- num_found += rc;
- }
- }
- else
- {
- // Try service name with TCP first, then UDP.
- if (hints->ai_socktype == 0 || hints->ai_socktype == SOCK_STREAM)
- {
- servent* sptr = getservbyname(serv, "tcp");
- if (sptr != 0)
- {
- int rc = gai_port(aihead, sptr->s_port, SOCK_STREAM);
- if (rc < 0)
- return EAI_MEMORY;
- num_found += rc;
- }
- }
- if (hints->ai_socktype == 0 || hints->ai_socktype == SOCK_DGRAM)
- {
- servent* sptr = getservbyname(serv, "udp");
- if (sptr != 0)
- {
- int rc = gai_port(aihead, sptr->s_port, SOCK_DGRAM);
- if (rc < 0)
- return EAI_MEMORY;
- num_found += rc;
- }
- }
- }
-
- if (num_found == 0)
- {
- if (hints->ai_socktype == 0)
- {
- // All calls to getservbyname() failed.
- return EAI_NONAME;
- }
- else
- {
- // Service not supported for socket type.
- return EAI_SERVICE;
- }
- }
-
- return 0;
-}
-
-inline int gai_echeck(const char* host, const char* service,
- int flags, int family, int socktype, int protocol)
-{
- (void)(flags);
- (void)(protocol);
-
- // Host or service must be specified.
- if (host == 0 || host[0] == '\0')
- if (service == 0 || service[0] == '\0')
- return EAI_NONAME;
-
- // Check combination of family and socket type.
- switch (family)
- {
- case BOOST_ASIO_OS_DEF(AF_UNSPEC):
- break;
- case BOOST_ASIO_OS_DEF(AF_INET):
- case BOOST_ASIO_OS_DEF(AF_INET6):
- if (service != 0 && service[0] != '\0')
- if (socktype != 0 && socktype != SOCK_STREAM && socktype != SOCK_DGRAM)
- return EAI_SOCKTYPE;
- break;
- default:
- return EAI_FAMILY;
- }
-
- return 0;
-}
-
-inline void freeaddrinfo_emulation(addrinfo_type* aihead)
-{
- addrinfo_type* ai = aihead;
- while (ai)
- {
- gai_free(ai->ai_addr);
- gai_free(ai->ai_canonname);
- addrinfo_type* ainext = ai->ai_next;
- gai_free(ai);
- ai = ainext;
- }
-}
-
-inline int getaddrinfo_emulation(const char* host, const char* service,
- const addrinfo_type* hintsp, addrinfo_type** result)
-{
- // Set up linked list of addrinfo structures.
- addrinfo_type* aihead = 0;
- addrinfo_type** ainext = &aihead;
- char* canon = 0;
-
- // Supply default hints if not specified by caller.
- addrinfo_type hints = addrinfo_type();
- hints.ai_family = BOOST_ASIO_OS_DEF(AF_UNSPEC);
- if (hintsp)
- hints = *hintsp;
-
- // If the resolution is not specifically for AF_INET6, remove the AI_V4MAPPED
- // and AI_ALL flags.
-#if defined(AI_V4MAPPED)
- if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_INET6))
- hints.ai_flags &= ~AI_V4MAPPED;
-#endif
-#if defined(AI_ALL)
- if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_INET6))
- hints.ai_flags &= ~AI_ALL;
-#endif
-
- // Basic error checking.
- int rc = gai_echeck(host, service, hints.ai_flags, hints.ai_family,
- hints.ai_socktype, hints.ai_protocol);
- if (rc != 0)
- {
- freeaddrinfo_emulation(aihead);
- return rc;
- }
-
- gai_search search[2];
- int search_count = gai_nsearch(host, &hints, search);
- for (gai_search* sptr = search; sptr < search + search_count; ++sptr)
- {
- // Check for IPv4 dotted decimal string.
- in4_addr_type inaddr;
- boost::system::error_code ec;
- if (socket_ops::inet_pton(BOOST_ASIO_OS_DEF(AF_INET),
- sptr->host, &inaddr, 0, ec) == 1)
- {
- if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_UNSPEC)
- && hints.ai_family != BOOST_ASIO_OS_DEF(AF_INET))
- {
- freeaddrinfo_emulation(aihead);
- gai_free(canon);
- return EAI_FAMILY;
- }
- if (sptr->family == BOOST_ASIO_OS_DEF(AF_INET))
- {
- rc = gai_aistruct(&ainext, &hints, &inaddr, BOOST_ASIO_OS_DEF(AF_INET));
- if (rc != 0)
- {
- freeaddrinfo_emulation(aihead);
- gai_free(canon);
- return rc;
- }
- }
- continue;
- }
-
- // Check for IPv6 hex string.
- in6_addr_type in6addr;
- if (socket_ops::inet_pton(BOOST_ASIO_OS_DEF(AF_INET6),
- sptr->host, &in6addr, 0, ec) == 1)
- {
- if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_UNSPEC)
- && hints.ai_family != BOOST_ASIO_OS_DEF(AF_INET6))
- {
- freeaddrinfo_emulation(aihead);
- gai_free(canon);
- return EAI_FAMILY;
- }
- if (sptr->family == BOOST_ASIO_OS_DEF(AF_INET6))
- {
- rc = gai_aistruct(&ainext, &hints, &in6addr,
- BOOST_ASIO_OS_DEF(AF_INET6));
- if (rc != 0)
- {
- freeaddrinfo_emulation(aihead);
- gai_free(canon);
- return rc;
- }
- }
- continue;
- }
-
- // Look up hostname.
- hostent hent;
- char hbuf[8192] = "";
- hostent* hptr = socket_ops::gethostbyname(sptr->host,
- sptr->family, &hent, hbuf, sizeof(hbuf), hints.ai_flags, ec);
- if (hptr == 0)
- {
- if (search_count == 2)
- {
- // Failure is OK if there are multiple searches.
- continue;
- }
- freeaddrinfo_emulation(aihead);
- gai_free(canon);
- if (ec == boost::asio::error::host_not_found)
- return EAI_NONAME;
- if (ec == boost::asio::error::host_not_found_try_again)
- return EAI_AGAIN;
- if (ec == boost::asio::error::no_recovery)
- return EAI_FAIL;
- if (ec == boost::asio::error::no_data)
- return EAI_NONAME;
- return EAI_NONAME;
- }
-
- // Check for address family mismatch if one was specified.
- if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_UNSPEC)
- && hints.ai_family != hptr->h_addrtype)
- {
- freeaddrinfo_emulation(aihead);
- gai_free(canon);
- socket_ops::freehostent(hptr);
- return EAI_FAMILY;
- }
-
- // Save canonical name first time.
- if (host != 0 && host[0] != '\0' && hptr->h_name && hptr->h_name[0]
- && (hints.ai_flags & AI_CANONNAME) && canon == 0)
- {
- std::size_t canon_len = strlen(hptr->h_name) + 1;
- canon = gai_alloc<char>(canon_len);
- if (canon == 0)
- {
- freeaddrinfo_emulation(aihead);
- socket_ops::freehostent(hptr);
- return EAI_MEMORY;
- }
- gai_strcpy(canon, hptr->h_name, canon_len);
- }
-
- // Create an addrinfo structure for each returned address.
- for (char** ap = hptr->h_addr_list; *ap; ++ap)
- {
- rc = gai_aistruct(&ainext, &hints, *ap, hptr->h_addrtype);
- if (rc != 0)
- {
- freeaddrinfo_emulation(aihead);
- gai_free(canon);
- socket_ops::freehostent(hptr);
- return EAI_FAMILY;
- }
- }
-
- socket_ops::freehostent(hptr);
- }
-
- // Check if we found anything.
- if (aihead == 0)
- {
- gai_free(canon);
- return EAI_NONAME;
- }
-
- // Return canonical name in first entry.
- if (host != 0 && host[0] != '\0' && (hints.ai_flags & AI_CANONNAME))
- {
- if (canon)
- {
- aihead->ai_canonname = canon;
- canon = 0;
- }
- else
- {
- std::size_t canonname_len = strlen(search[0].host) + 1;
- aihead->ai_canonname = gai_alloc<char>(canonname_len);
- if (aihead->ai_canonname == 0)
- {
- freeaddrinfo_emulation(aihead);
- return EAI_MEMORY;
- }
- gai_strcpy(aihead->ai_canonname, search[0].host, canonname_len);
- }
- }
- gai_free(canon);
-
- // Process the service name.
- if (service != 0 && service[0] != '\0')
- {
- rc = gai_serv(aihead, &hints, service);
- if (rc != 0)
- {
- freeaddrinfo_emulation(aihead);
- return rc;
- }
- }
-
- // Return result to caller.
- *result = aihead;
- return 0;
-}
-
-inline boost::system::error_code getnameinfo_emulation(
- const socket_addr_type* sa, std::size_t salen, char* host,
- std::size_t hostlen, char* serv, std::size_t servlen, int flags,
- boost::system::error_code& ec)
-{
- using namespace std;
-
- const char* addr;
- size_t addr_len;
- unsigned short port;
- switch (sa->sa_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- if (salen != sizeof(sockaddr_in4_type))
- {
- return ec = boost::asio::error::invalid_argument;
- }
- addr = reinterpret_cast<const char*>(
- &reinterpret_cast<const sockaddr_in4_type*>(sa)->sin_addr);
- addr_len = sizeof(in4_addr_type);
- port = reinterpret_cast<const sockaddr_in4_type*>(sa)->sin_port;
- break;
- case BOOST_ASIO_OS_DEF(AF_INET6):
- if (salen != sizeof(sockaddr_in6_type))
- {
- return ec = boost::asio::error::invalid_argument;
- }
- addr = reinterpret_cast<const char*>(
- &reinterpret_cast<const sockaddr_in6_type*>(sa)->sin6_addr);
- addr_len = sizeof(in6_addr_type);
- port = reinterpret_cast<const sockaddr_in6_type*>(sa)->sin6_port;
- break;
- default:
- return ec = boost::asio::error::address_family_not_supported;
- }
-
- if (host && hostlen > 0)
- {
- if (flags & NI_NUMERICHOST)
- {
- if (socket_ops::inet_ntop(sa->sa_family, addr, host, hostlen, 0, ec) == 0)
- {
- return ec;
- }
- }
- else
- {
- hostent hent;
- char hbuf[8192] = "";
- hostent* hptr = socket_ops::gethostbyaddr(addr,
- static_cast<int>(addr_len), sa->sa_family,
- &hent, hbuf, sizeof(hbuf), ec);
- if (hptr && hptr->h_name && hptr->h_name[0] != '\0')
- {
- if (flags & NI_NOFQDN)
- {
- char* dot = strchr(hptr->h_name, '.');
- if (dot)
- {
- *dot = 0;
- }
- }
- gai_strcpy(host, hptr->h_name, hostlen);
- socket_ops::freehostent(hptr);
- }
- else
- {
- socket_ops::freehostent(hptr);
- if (flags & NI_NAMEREQD)
- {
- return ec = boost::asio::error::host_not_found;
- }
- if (socket_ops::inet_ntop(sa->sa_family,
- addr, host, hostlen, 0, ec) == 0)
- {
- return ec;
- }
- }
- }
- }
-
- if (serv && servlen > 0)
- {
- if (flags & NI_NUMERICSERV)
- {
- if (servlen < 6)
- {
- return ec = boost::asio::error::no_buffer_space;
- }
-#if defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf_s(serv, servlen, "%u", ntohs(port));
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf(serv, "%u", ntohs(port));
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
- }
- else
- {
-#if defined(BOOST_ASIO_HAS_PTHREADS)
- static ::pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- ::pthread_mutex_lock(&mutex);
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
- servent* sptr = ::getservbyport(port, (flags & NI_DGRAM) ? "udp" : 0);
- if (sptr && sptr->s_name && sptr->s_name[0] != '\0')
- {
- gai_strcpy(serv, sptr->s_name, servlen);
- }
- else
- {
- if (servlen < 6)
- {
- return ec = boost::asio::error::no_buffer_space;
- }
-#if defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf_s(serv, servlen, "%u", ntohs(port));
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
- sprintf(serv, "%u", ntohs(port));
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
- }
-#if defined(BOOST_ASIO_HAS_PTHREADS)
- ::pthread_mutex_unlock(&mutex);
-#endif // defined(BOOST_ASIO_HAS_PTHREADS)
- }
- }
-
- ec = boost::system::error_code();
- return ec;
-}
-
-#endif // !defined(BOOST_ASIO_HAS_GETADDRINFO)
-
-inline boost::system::error_code translate_addrinfo_error(int error)
-{
- switch (error)
- {
- case 0:
- return boost::system::error_code();
- case EAI_AGAIN:
- return boost::asio::error::host_not_found_try_again;
- case EAI_BADFLAGS:
- return boost::asio::error::invalid_argument;
- case EAI_FAIL:
- return boost::asio::error::no_recovery;
- case EAI_FAMILY:
- return boost::asio::error::address_family_not_supported;
- case EAI_MEMORY:
- return boost::asio::error::no_memory;
- case EAI_NONAME:
-#if defined(EAI_ADDRFAMILY)
- case EAI_ADDRFAMILY:
-#endif
-#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
- case EAI_NODATA:
-#endif
- return boost::asio::error::host_not_found;
- case EAI_SERVICE:
- return boost::asio::error::service_not_found;
- case EAI_SOCKTYPE:
- return boost::asio::error::socket_type_not_supported;
- default: // Possibly the non-portable EAI_SYSTEM.
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
- return boost::system::error_code(
- WSAGetLastError(), boost::asio::error::get_system_category());
-#else
- return boost::system::error_code(
- errno, boost::asio::error::get_system_category());
-#endif
- }
-}
-
-boost::system::error_code getaddrinfo(const char* host,
- const char* service, const addrinfo_type& hints,
- addrinfo_type** result, boost::system::error_code& ec)
-{
- host = (host && *host) ? host : 0;
- service = (service && *service) ? service : 0;
- clear_last_error();
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(BOOST_ASIO_HAS_GETADDRINFO)
- // Building for Windows XP, Windows Server 2003, or later.
- int error = ::getaddrinfo(host, service, &hints, result);
- return ec = translate_addrinfo_error(error);
-# else
- // Building for Windows 2000 or earlier.
- typedef int (WSAAPI *gai_t)(const char*,
- const char*, const addrinfo_type*, addrinfo_type**);
- if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
- {
- if (gai_t gai = (gai_t)::GetProcAddress(winsock_module, "getaddrinfo"))
- {
- int error = gai(host, service, &hints, result);
- return ec = translate_addrinfo_error(error);
- }
- }
- int error = getaddrinfo_emulation(host, service, &hints, result);
- return ec = translate_addrinfo_error(error);
-# endif
-#elif !defined(BOOST_ASIO_HAS_GETADDRINFO)
- int error = getaddrinfo_emulation(host, service, &hints, result);
- return ec = translate_addrinfo_error(error);
-#else
- int error = ::getaddrinfo(host, service, &hints, result);
-#if defined(__MACH__) && defined(__APPLE__)
- using namespace std; // For isdigit and atoi.
- if (error == 0 && service && isdigit(static_cast<unsigned char>(service[0])))
- {
- u_short_type port = host_to_network_short(atoi(service));
- for (addrinfo_type* ai = *result; ai; ai = ai->ai_next)
- {
- switch (ai->ai_family)
- {
- case BOOST_ASIO_OS_DEF(AF_INET):
- {
- sockaddr_in4_type* sinptr =
- reinterpret_cast<sockaddr_in4_type*>(ai->ai_addr);
- if (sinptr->sin_port == 0)
- sinptr->sin_port = port;
- break;
- }
- case BOOST_ASIO_OS_DEF(AF_INET6):
- {
- sockaddr_in6_type* sin6ptr =
- reinterpret_cast<sockaddr_in6_type*>(ai->ai_addr);
- if (sin6ptr->sin6_port == 0)
- sin6ptr->sin6_port = port;
- break;
- }
- default:
- break;
- }
- }
- }
-#endif
- return ec = translate_addrinfo_error(error);
-#endif
-}
-
-boost::system::error_code background_getaddrinfo(
- const weak_cancel_token_type& cancel_token, const char* host,
- const char* service, const addrinfo_type& hints,
- addrinfo_type** result, boost::system::error_code& ec)
-{
- if (cancel_token.expired())
- ec = boost::asio::error::operation_aborted;
- else
- socket_ops::getaddrinfo(host, service, hints, result, ec);
- return ec;
-}
-
-void freeaddrinfo(addrinfo_type* ai)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(BOOST_ASIO_HAS_GETADDRINFO)
- // Building for Windows XP, Windows Server 2003, or later.
- ::freeaddrinfo(ai);
-# else
- // Building for Windows 2000 or earlier.
- typedef int (WSAAPI *fai_t)(addrinfo_type*);
- if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
- {
- if (fai_t fai = (fai_t)::GetProcAddress(winsock_module, "freeaddrinfo"))
- {
- fai(ai);
- return;
- }
- }
- freeaddrinfo_emulation(ai);
-# endif
-#elif !defined(BOOST_ASIO_HAS_GETADDRINFO)
- freeaddrinfo_emulation(ai);
-#else
- ::freeaddrinfo(ai);
-#endif
-}
-
-boost::system::error_code getnameinfo(const socket_addr_type* addr,
- std::size_t addrlen, char* host, std::size_t hostlen,
- char* serv, std::size_t servlen, int flags, boost::system::error_code& ec)
-{
-#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
-# if defined(BOOST_ASIO_HAS_GETADDRINFO)
- // Building for Windows XP, Windows Server 2003, or later.
- clear_last_error();
- int error = ::getnameinfo(addr, static_cast<socklen_t>(addrlen),
- host, static_cast<DWORD>(hostlen),
- serv, static_cast<DWORD>(servlen), flags);
- return ec = translate_addrinfo_error(error);
-# else
- // Building for Windows 2000 or earlier.
- typedef int (WSAAPI *gni_t)(const socket_addr_type*,
- int, char*, DWORD, char*, DWORD, int);
- if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
- {
- if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo"))
- {
- clear_last_error();
- int error = gni(addr, static_cast<int>(addrlen),
- host, static_cast<DWORD>(hostlen),
- serv, static_cast<DWORD>(servlen), flags);
- return ec = translate_addrinfo_error(error);
- }
- }
- clear_last_error();
- return getnameinfo_emulation(addr, addrlen,
- host, hostlen, serv, servlen, flags, ec);
-# endif
-#elif !defined(BOOST_ASIO_HAS_GETADDRINFO)
- using namespace std; // For memcpy.
- sockaddr_storage_type tmp_addr;
- memcpy(&tmp_addr, addr, addrlen);
- addr = reinterpret_cast<socket_addr_type*>(&tmp_addr);
- clear_last_error();
- return getnameinfo_emulation(addr, addrlen,
- host, hostlen, serv, servlen, flags, ec);
-#else
- clear_last_error();
- int error = ::getnameinfo(addr, addrlen, host, hostlen, serv, servlen, flags);
- return ec = translate_addrinfo_error(error);
-#endif
-}
-
-boost::system::error_code sync_getnameinfo(
- const socket_addr_type* addr, std::size_t addrlen,
- char* host, std::size_t hostlen, char* serv,
- std::size_t servlen, int sock_type, boost::system::error_code& ec)
-{
- // First try resolving with the service name. If that fails try resolving
- // but allow the service to be returned as a number.
- int flags = (sock_type == SOCK_DGRAM) ? NI_DGRAM : 0;
- socket_ops::getnameinfo(addr, addrlen, host,
- hostlen, serv, servlen, flags, ec);
- if (ec)
- {
- socket_ops::getnameinfo(addr, addrlen, host, hostlen,
- serv, servlen, flags | NI_NUMERICSERV, ec);
- }
-
- return ec;
-}
-
-boost::system::error_code background_getnameinfo(
- const weak_cancel_token_type& cancel_token,
- const socket_addr_type* addr, std::size_t addrlen,
- char* host, std::size_t hostlen, char* serv,
- std::size_t servlen, int sock_type, boost::system::error_code& ec)
-{
- if (cancel_token.expired())
- {
- ec = boost::asio::error::operation_aborted;
- }
- else
- {
- // First try resolving with the service name. If that fails try resolving
- // but allow the service to be returned as a number.
- int flags = (sock_type == SOCK_DGRAM) ? NI_DGRAM : 0;
- socket_ops::getnameinfo(addr, addrlen, host,
- hostlen, serv, servlen, flags, ec);
- if (ec)
- {
- socket_ops::getnameinfo(addr, addrlen, host, hostlen,
- serv, servlen, flags | NI_NUMERICSERV, ec);
- }
- }
-
- return ec;
-}
-
-#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-u_long_type network_to_host_long(u_long_type value)
-{
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- unsigned char* value_p = reinterpret_cast<unsigned char*>(&value);
- u_long_type result = (static_cast<u_long_type>(value_p[0]) << 24)
- | (static_cast<u_long_type>(value_p[1]) << 16)
- | (static_cast<u_long_type>(value_p[2]) << 8)
- | static_cast<u_long_type>(value_p[3]);
- return result;
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- return ntohl(value);
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-}
-
-u_long_type host_to_network_long(u_long_type value)
-{
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- u_long_type result;
- unsigned char* result_p = reinterpret_cast<unsigned char*>(&result);
- result_p[0] = static_cast<unsigned char>((value >> 24) & 0xFF);
- result_p[1] = static_cast<unsigned char>((value >> 16) & 0xFF);
- result_p[2] = static_cast<unsigned char>((value >> 8) & 0xFF);
- result_p[3] = static_cast<unsigned char>(value & 0xFF);
- return result;
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- return htonl(value);
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-}
-
-u_short_type network_to_host_short(u_short_type value)
-{
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- unsigned char* value_p = reinterpret_cast<unsigned char*>(&value);
- u_short_type result = (static_cast<u_short_type>(value_p[0]) << 8)
- | static_cast<u_short_type>(value_p[1]);
- return result;
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- return ntohs(value);
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-}
-
-u_short_type host_to_network_short(u_short_type value)
-{
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- u_short_type result;
- unsigned char* result_p = reinterpret_cast<unsigned char*>(&result);
- result_p[0] = static_cast<unsigned char>((value >> 8) & 0xFF);
- result_p[1] = static_cast<unsigned char>(value & 0xFF);
- return result;
-#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
- return htons(value);
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-}
-
-} // namespace socket_ops
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_SOCKET_OPS_IPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/is_buffer_sequence.hpp b/src/third_party/boost-1.68.0/boost/asio/detail/is_buffer_sequence.hpp
deleted file mode 100644
index 370b2c81c0d..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/detail/is_buffer_sequence.hpp
+++ /dev/null
@@ -1,241 +0,0 @@
-//
-// detail/is_buffer_sequence.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_IS_BUFFER_SEQUENCE_HPP
-#define BOOST_ASIO_DETAIL_IS_BUFFER_SEQUENCE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-class mutable_buffer;
-class const_buffer;
-
-namespace detail {
-
-struct buffer_sequence_memfns_base
-{
- void begin();
- void end();
- void size();
- void max_size();
- void capacity();
- void data();
- void prepare();
- void commit();
- void consume();
-};
-
-template <typename T>
-struct buffer_sequence_memfns_derived
- : T, buffer_sequence_memfns_base
-{
-};
-
-template <typename T, T>
-struct buffer_sequence_memfns_check
-{
-};
-
-template <typename>
-char (&begin_memfn_helper(...))[2];
-
-template <typename T>
-char begin_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::begin>*);
-
-template <typename>
-char (&end_memfn_helper(...))[2];
-
-template <typename T>
-char end_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::end>*);
-
-template <typename>
-char (&size_memfn_helper(...))[2];
-
-template <typename T>
-char size_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::size>*);
-
-template <typename>
-char (&max_size_memfn_helper(...))[2];
-
-template <typename T>
-char max_size_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::max_size>*);
-
-template <typename>
-char (&capacity_memfn_helper(...))[2];
-
-template <typename T>
-char capacity_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::capacity>*);
-
-template <typename>
-char (&data_memfn_helper(...))[2];
-
-template <typename T>
-char data_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::data>*);
-
-template <typename>
-char (&prepare_memfn_helper(...))[2];
-
-template <typename T>
-char prepare_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::prepare>*);
-
-template <typename>
-char (&commit_memfn_helper(...))[2];
-
-template <typename T>
-char commit_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::commit>*);
-
-template <typename>
-char (&consume_memfn_helper(...))[2];
-
-template <typename T>
-char consume_memfn_helper(
- buffer_sequence_memfns_check<
- void (buffer_sequence_memfns_base::*)(),
- &buffer_sequence_memfns_derived<T>::consume>*);
-
-template <typename, typename>
-char (&buffer_element_type_helper(...))[2];
-
-#if defined(BOOST_ASIO_HAS_DECL_TYPE)
-
-template <typename T, typename Buffer>
-char buffer_element_type_helper(T* t,
- typename enable_if<is_convertible<
- decltype(*buffer_sequence_begin(*t)),
- Buffer>::value>::type*);
-
-#else // defined(BOOST_ASIO_HAS_DECL_TYPE)
-
-template <typename T, typename Buffer>
-char buffer_element_type_helper(
- typename T::const_iterator*,
- typename enable_if<is_convertible<
- typename T::value_type, Buffer>::value>::type*);
-
-#endif // defined(BOOST_ASIO_HAS_DECL_TYPE)
-
-template <typename>
-char (&const_buffers_type_typedef_helper(...))[2];
-
-template <typename T>
-char const_buffers_type_typedef_helper(
- typename T::const_buffers_type*);
-
-template <typename>
-char (&mutable_buffers_type_typedef_helper(...))[2];
-
-template <typename T>
-char mutable_buffers_type_typedef_helper(
- typename T::mutable_buffers_type*);
-
-template <typename T, typename Buffer>
-struct is_buffer_sequence_class
- : integral_constant<bool,
- sizeof(begin_memfn_helper<T>(0)) != 1 &&
- sizeof(end_memfn_helper<T>(0)) != 1 &&
- sizeof(buffer_element_type_helper<T, Buffer>(0, 0)) == 1>
-{
-};
-
-template <typename T, typename Buffer>
-struct is_buffer_sequence
- : conditional<is_class<T>::value,
- is_buffer_sequence_class<T, Buffer>,
- false_type>::type
-{
-};
-
-template <>
-struct is_buffer_sequence<mutable_buffer, mutable_buffer>
- : true_type
-{
-};
-
-template <>
-struct is_buffer_sequence<mutable_buffer, const_buffer>
- : true_type
-{
-};
-
-template <>
-struct is_buffer_sequence<const_buffer, const_buffer>
- : true_type
-{
-};
-
-template <>
-struct is_buffer_sequence<const_buffer, mutable_buffer>
- : false_type
-{
-};
-
-template <typename T>
-struct is_dynamic_buffer_class
- : integral_constant<bool,
- sizeof(size_memfn_helper<T>(0)) != 1 &&
- sizeof(max_size_memfn_helper<T>(0)) != 1 &&
- sizeof(capacity_memfn_helper<T>(0)) != 1 &&
- sizeof(data_memfn_helper<T>(0)) != 1 &&
- sizeof(consume_memfn_helper<T>(0)) != 1 &&
- sizeof(prepare_memfn_helper<T>(0)) != 1 &&
- sizeof(commit_memfn_helper<T>(0)) != 1 &&
- sizeof(const_buffers_type_typedef_helper<T>(0)) == 1 &&
- sizeof(mutable_buffers_type_typedef_helper<T>(0)) == 1>
-{
-};
-
-template <typename T>
-struct is_dynamic_buffer
- : conditional<is_class<T>::value,
- is_dynamic_buffer_class<T>,
- false_type>::type
-{
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_IS_BUFFER_SEQUENCE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue.hpp b/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue.hpp
deleted file mode 100644
index 99e12e09027..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue.hpp
+++ /dev/null
@@ -1,360 +0,0 @@
-//
-// detail/timer_queue.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_TIMER_QUEUE_HPP
-#define BOOST_ASIO_DETAIL_TIMER_QUEUE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <cstddef>
-#include <vector>
-#include <boost/asio/detail/cstdint.hpp>
-#include <boost/asio/detail/date_time_fwd.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/op_queue.hpp>
-#include <boost/asio/detail/timer_queue_base.hpp>
-#include <boost/asio/detail/wait_op.hpp>
-#include <boost/asio/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Time_Traits>
-class timer_queue
- : public timer_queue_base
-{
-public:
- // The time type.
- typedef typename Time_Traits::time_type time_type;
-
- // The duration type.
- typedef typename Time_Traits::duration_type duration_type;
-
- // Per-timer data.
- class per_timer_data
- {
- public:
- per_timer_data() :
- heap_index_((std::numeric_limits<std::size_t>::max)()),
- next_(0), prev_(0)
- {
- }
-
- private:
- friend class timer_queue;
-
- // The operations waiting on the timer.
- op_queue<wait_op> op_queue_;
-
- // The index of the timer in the heap.
- std::size_t heap_index_;
-
- // Pointers to adjacent timers in a linked list.
- per_timer_data* next_;
- per_timer_data* prev_;
- };
-
- // Constructor.
- timer_queue()
- : timers_(),
- heap_()
- {
- }
-
- // Add a new timer to the queue. Returns true if this is the timer that is
- // earliest in the queue, in which case the reactor's event demultiplexing
- // function call may need to be interrupted and restarted.
- bool enqueue_timer(const time_type& time, per_timer_data& timer, wait_op* op)
- {
- // Enqueue the timer object.
- if (timer.prev_ == 0 && &timer != timers_)
- {
- if (this->is_positive_infinity(time))
- {
- // No heap entry is required for timers that never expire.
- timer.heap_index_ = (std::numeric_limits<std::size_t>::max)();
- }
- else
- {
- // Put the new timer at the correct position in the heap. This is done
- // first since push_back() can throw due to allocation failure.
- timer.heap_index_ = heap_.size();
- heap_entry entry = { time, &timer };
- heap_.push_back(entry);
- up_heap(heap_.size() - 1);
- }
-
- // Insert the new timer into the linked list of active timers.
- timer.next_ = timers_;
- timer.prev_ = 0;
- if (timers_)
- timers_->prev_ = &timer;
- timers_ = &timer;
- }
-
- // Enqueue the individual timer operation.
- timer.op_queue_.push(op);
-
- // Interrupt reactor only if newly added timer is first to expire.
- return timer.heap_index_ == 0 && timer.op_queue_.front() == op;
- }
-
- // Whether there are no timers in the queue.
- virtual bool empty() const
- {
- return timers_ == 0;
- }
-
- // Get the time for the timer that is earliest in the queue.
- virtual long wait_duration_msec(long max_duration) const
- {
- if (heap_.empty())
- return max_duration;
-
- return this->to_msec(
- Time_Traits::to_posix_duration(
- Time_Traits::subtract(heap_[0].time_, Time_Traits::now())),
- max_duration);
- }
-
- // Get the time for the timer that is earliest in the queue.
- virtual long wait_duration_usec(long max_duration) const
- {
- if (heap_.empty())
- return max_duration;
-
- return this->to_usec(
- Time_Traits::to_posix_duration(
- Time_Traits::subtract(heap_[0].time_, Time_Traits::now())),
- max_duration);
- }
-
- // Dequeue all timers not later than the current time.
- virtual void get_ready_timers(op_queue<operation>& ops)
- {
- if (!heap_.empty())
- {
- const time_type now = Time_Traits::now();
- while (!heap_.empty() && !Time_Traits::less_than(now, heap_[0].time_))
- {
- per_timer_data* timer = heap_[0].timer_;
- ops.push(timer->op_queue_);
- remove_timer(*timer);
- }
- }
- }
-
- // Dequeue all timers.
- virtual void get_all_timers(op_queue<operation>& ops)
- {
- while (timers_)
- {
- per_timer_data* timer = timers_;
- timers_ = timers_->next_;
- ops.push(timer->op_queue_);
- timer->next_ = 0;
- timer->prev_ = 0;
- }
-
- heap_.clear();
- }
-
- // Cancel and dequeue operations for the given timer.
- std::size_t cancel_timer(per_timer_data& timer, op_queue<operation>& ops,
- std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)())
- {
- std::size_t num_cancelled = 0;
- if (timer.prev_ != 0 || &timer == timers_)
- {
- while (wait_op* op = (num_cancelled != max_cancelled)
- ? timer.op_queue_.front() : 0)
- {
- op->ec_ = boost::asio::error::operation_aborted;
- timer.op_queue_.pop();
- ops.push(op);
- ++num_cancelled;
- }
- if (timer.op_queue_.empty())
- remove_timer(timer);
- }
- return num_cancelled;
- }
-
- // Move operations from one timer to another, empty timer.
- void move_timer(per_timer_data& target, per_timer_data& source)
- {
- target.op_queue_.push(source.op_queue_);
-
- target.heap_index_ = source.heap_index_;
- source.heap_index_ = (std::numeric_limits<std::size_t>::max)();
-
- if (target.heap_index_ < heap_.size())
- heap_[target.heap_index_].timer_ = &target;
-
- if (timers_ == &source)
- timers_ = &target;
- if (source.prev_)
- source.prev_->next_ = &target;
- if (source.next_)
- source.next_->prev_= &target;
- target.next_ = source.next_;
- target.prev_ = source.prev_;
- source.next_ = 0;
- source.prev_ = 0;
- }
-
-private:
- // Move the item at the given index up the heap to its correct position.
- void up_heap(std::size_t index)
- {
- while (index > 0)
- {
- std::size_t parent = (index - 1) / 2;
- if (!Time_Traits::less_than(heap_[index].time_, heap_[parent].time_))
- break;
- swap_heap(index, parent);
- index = parent;
- }
- }
-
- // Move the item at the given index down the heap to its correct position.
- void down_heap(std::size_t index)
- {
- std::size_t child = index * 2 + 1;
- while (child < heap_.size())
- {
- std::size_t min_child = (child + 1 == heap_.size()
- || Time_Traits::less_than(
- heap_[child].time_, heap_[child + 1].time_))
- ? child : child + 1;
- if (Time_Traits::less_than(heap_[index].time_, heap_[min_child].time_))
- break;
- swap_heap(index, min_child);
- index = min_child;
- child = index * 2 + 1;
- }
- }
-
- // Swap two entries in the heap.
- void swap_heap(std::size_t index1, std::size_t index2)
- {
- heap_entry tmp = heap_[index1];
- heap_[index1] = heap_[index2];
- heap_[index2] = tmp;
- heap_[index1].timer_->heap_index_ = index1;
- heap_[index2].timer_->heap_index_ = index2;
- }
-
- // Remove a timer from the heap and list of timers.
- void remove_timer(per_timer_data& timer)
- {
- // Remove the timer from the heap.
- std::size_t index = timer.heap_index_;
- if (!heap_.empty() && index < heap_.size())
- {
- if (index == heap_.size() - 1)
- {
- heap_.pop_back();
- }
- else
- {
- swap_heap(index, heap_.size() - 1);
- heap_.pop_back();
- if (index > 0 && Time_Traits::less_than(
- heap_[index].time_, heap_[(index - 1) / 2].time_))
- up_heap(index);
- else
- down_heap(index);
- }
- }
-
- // Remove the timer from the linked list of active timers.
- if (timers_ == &timer)
- timers_ = timer.next_;
- if (timer.prev_)
- timer.prev_->next_ = timer.next_;
- if (timer.next_)
- timer.next_->prev_= timer.prev_;
- timer.next_ = 0;
- timer.prev_ = 0;
- }
-
- // Determine if the specified absolute time is positive infinity.
- template <typename Time_Type>
- static bool is_positive_infinity(const Time_Type&)
- {
- return false;
- }
-
- // Determine if the specified absolute time is positive infinity.
- template <typename T, typename TimeSystem>
- static bool is_positive_infinity(
- const boost::date_time::base_time<T, TimeSystem>& time)
- {
- return time.is_pos_infinity();
- }
-
- // Helper function to convert a duration into milliseconds.
- template <typename Duration>
- long to_msec(const Duration& d, long max_duration) const
- {
- if (d.ticks() <= 0)
- return 0;
- int64_t msec = d.total_milliseconds();
- if (msec == 0)
- return 1;
- if (msec > max_duration)
- return max_duration;
- return static_cast<long>(msec);
- }
-
- // Helper function to convert a duration into microseconds.
- template <typename Duration>
- long to_usec(const Duration& d, long max_duration) const
- {
- if (d.ticks() <= 0)
- return 0;
- int64_t usec = d.total_microseconds();
- if (usec == 0)
- return 1;
- if (usec > max_duration)
- return max_duration;
- return static_cast<long>(usec);
- }
-
- // The head of a linked list of all active timers.
- per_timer_data* timers_;
-
- struct heap_entry
- {
- // The time when the timer should fire.
- time_type time_;
-
- // The associated timer with enqueued operations.
- per_timer_data* timer_;
- };
-
- // The heap of timers, with the earliest timer at the front.
- std::vector<heap_entry> heap_;
-};
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_global.hpp b/src/third_party/boost-1.68.0/boost/asio/detail/win_global.hpp
deleted file mode 100644
index 4234a6d4e01..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_global.hpp
+++ /dev/null
@@ -1,75 +0,0 @@
-//
-// detail/win_global.hpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_DETAIL_WIN_GLOBAL_HPP
-#define BOOST_ASIO_DETAIL_WIN_GLOBAL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/detail/static_mutex.hpp>
-#include <boost/asio/detail/tss_ptr.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename T>
-struct win_global_impl
-{
- // Destructor automatically cleans up the global.
- ~win_global_impl()
- {
- delete ptr_;
- }
-
- static win_global_impl instance_;
- static static_mutex mutex_;
- static T* ptr_;
- static tss_ptr<T> tss_ptr_;
-};
-
-template <typename T>
-win_global_impl<T> win_global_impl<T>::instance_ = { 0 };
-
-template <typename T>
-static_mutex win_global_impl<T>::mutex_ = BOOST_ASIO_STATIC_MUTEX_INIT;
-
-template <typename T>
-T* win_global_impl<T>::ptr_ = 0;
-
-template <typename T>
-tss_ptr<T> win_global_impl<T>::tss_ptr_;
-
-template <typename T>
-T& win_global()
-{
- if (static_cast<T*>(win_global_impl<T>::tss_ptr_) == 0)
- {
- win_global_impl<T>::mutex_.init();
- static_mutex::scoped_lock lock(win_global_impl<T>::mutex_);
- win_global_impl<T>::ptr_ = new T;
- win_global_impl<T>::tss_ptr_ = win_global_impl<T>::ptr_;
- }
-
- return *win_global_impl<T>::tss_ptr_;
-}
-
-} // namespace detail
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_DETAIL_WIN_GLOBAL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/io_context.hpp b/src/third_party/boost-1.68.0/boost/asio/impl/io_context.hpp
deleted file mode 100644
index 21dd83688c1..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/impl/io_context.hpp
+++ /dev/null
@@ -1,347 +0,0 @@
-//
-// impl/io_context.hpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IMPL_IO_CONTEXT_HPP
-#define BOOST_ASIO_IMPL_IO_CONTEXT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/completion_handler.hpp>
-#include <boost/asio/detail/executor_op.hpp>
-#include <boost/asio/detail/fenced_block.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/recycling_allocator.hpp>
-#include <boost/asio/detail/service_registry.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-template <typename Service>
-inline Service& use_service(io_context& ioc)
-{
- // Check that Service meets the necessary type requirements.
- (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
- (void)static_cast<const execution_context::id*>(&Service::id);
-
- return ioc.service_registry_->template use_service<Service>(ioc);
-}
-
-template <>
-inline detail::io_context_impl& use_service<detail::io_context_impl>(
- io_context& ioc)
-{
- return ioc.impl_;
-}
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if defined(BOOST_ASIO_HAS_IOCP)
-# include <boost/asio/detail/win_iocp_io_context.hpp>
-#else
-# include <boost/asio/detail/scheduler.hpp>
-#endif
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-inline io_context::executor_type
-io_context::get_executor() BOOST_ASIO_NOEXCEPT
-{
- return executor_type(*this);
-}
-
-#if defined(BOOST_ASIO_HAS_CHRONO)
-
-template <typename Rep, typename Period>
-std::size_t io_context::run_for(
- const chrono::duration<Rep, Period>& rel_time)
-{
- return this->run_until(chrono::steady_clock::now() + rel_time);
-}
-
-template <typename Clock, typename Duration>
-std::size_t io_context::run_until(
- const chrono::time_point<Clock, Duration>& abs_time)
-{
- std::size_t n = 0;
- while (this->run_one_until(abs_time))
- if (n != (std::numeric_limits<std::size_t>::max)())
- ++n;
- return n;
-}
-
-template <typename Rep, typename Period>
-std::size_t io_context::run_one_for(
- const chrono::duration<Rep, Period>& rel_time)
-{
- return this->run_one_until(chrono::steady_clock::now() + rel_time);
-}
-
-template <typename Clock, typename Duration>
-std::size_t io_context::run_one_until(
- const chrono::time_point<Clock, Duration>& abs_time)
-{
- typename Clock::time_point now = Clock::now();
- while (now < abs_time)
- {
- typename Clock::duration rel_time = abs_time - now;
- if (rel_time > chrono::seconds(1))
- rel_time = chrono::seconds(1);
-
- boost::system::error_code ec;
- std::size_t s = impl_.wait_one(
- static_cast<long>(chrono::duration_cast<
- chrono::microseconds>(rel_time).count()), ec);
- boost::asio::detail::throw_error(ec);
-
- if (s || impl_.stopped())
- return s;
-
- now = Clock::now();
- }
-
- return 0;
-}
-
-#endif // defined(BOOST_ASIO_HAS_CHRONO)
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-inline void io_context::reset()
-{
- restart();
-}
-
-template <typename LegacyCompletionHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
-io_context::dispatch(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a LegacyCompletionHandler.
- BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
- LegacyCompletionHandler, handler) type_check;
-
- async_completion<LegacyCompletionHandler, void ()> init(handler);
-
- if (impl_.can_dispatch())
- {
- detail::fenced_block b(detail::fenced_block::full);
- boost_asio_handler_invoke_helpers::invoke(
- init.completion_handler, init.completion_handler);
- }
- else
- {
- // Allocate and construct an operation to wrap the handler.
- typedef detail::completion_handler<
- typename handler_type<LegacyCompletionHandler, void ()>::type> op;
- typename op::ptr p = { detail::addressof(init.completion_handler),
- op::ptr::allocate(init.completion_handler), 0 };
- p.p = new (p.v) op(init.completion_handler);
-
- BOOST_ASIO_HANDLER_CREATION((*this, *p.p,
- "io_context", this, 0, "dispatch"));
-
- impl_.do_dispatch(p.p);
- p.v = p.p = 0;
- }
-
- return init.result.get();
-}
-
-template <typename LegacyCompletionHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
-io_context::post(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a LegacyCompletionHandler.
- BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
- LegacyCompletionHandler, handler) type_check;
-
- async_completion<LegacyCompletionHandler, void ()> init(handler);
-
- bool is_continuation =
- boost_asio_handler_cont_helpers::is_continuation(init.completion_handler);
-
- // Allocate and construct an operation to wrap the handler.
- typedef detail::completion_handler<
- typename handler_type<LegacyCompletionHandler, void ()>::type> op;
- typename op::ptr p = { detail::addressof(init.completion_handler),
- op::ptr::allocate(init.completion_handler), 0 };
- p.p = new (p.v) op(init.completion_handler);
-
- BOOST_ASIO_HANDLER_CREATION((*this, *p.p,
- "io_context", this, 0, "post"));
-
- impl_.post_immediate_completion(p.p, is_continuation);
- p.v = p.p = 0;
-
- return init.result.get();
-}
-
-template <typename Handler>
-#if defined(GENERATING_DOCUMENTATION)
-unspecified
-#else
-inline detail::wrapped_handler<io_context&, Handler>
-#endif
-io_context::wrap(Handler handler)
-{
- return detail::wrapped_handler<io_context&, Handler>(*this, handler);
-}
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-inline io_context&
-io_context::executor_type::context() const BOOST_ASIO_NOEXCEPT
-{
- return io_context_;
-}
-
-inline void
-io_context::executor_type::on_work_started() const BOOST_ASIO_NOEXCEPT
-{
- io_context_.impl_.work_started();
-}
-
-inline void
-io_context::executor_type::on_work_finished() const BOOST_ASIO_NOEXCEPT
-{
- io_context_.impl_.work_finished();
-}
-
-template <typename Function, typename Allocator>
-void io_context::executor_type::dispatch(
- BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
-{
- typedef typename decay<Function>::type function_type;
-
- // Invoke immediately if we are already inside the thread pool.
- if (io_context_.impl_.can_dispatch())
- {
- // Make a local, non-const copy of the function.
- function_type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
-
- detail::fenced_block b(detail::fenced_block::full);
- boost_asio_handler_invoke_helpers::invoke(tmp, tmp);
- return;
- }
-
- // Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, Allocator, detail::operation> op;
- typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(f), a);
-
- BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p,
- "io_context", &this->context(), 0, "post"));
-
- io_context_.impl_.post_immediate_completion(p.p, false);
- p.v = p.p = 0;
-}
-
-template <typename Function, typename Allocator>
-void io_context::executor_type::post(
- BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
-{
- typedef typename decay<Function>::type function_type;
-
- // Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, Allocator, detail::operation> op;
- typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(f), a);
-
- BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p,
- "io_context", &this->context(), 0, "post"));
-
- io_context_.impl_.post_immediate_completion(p.p, false);
- p.v = p.p = 0;
-}
-
-template <typename Function, typename Allocator>
-void io_context::executor_type::defer(
- BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
-{
- typedef typename decay<Function>::type function_type;
-
- // Allocate and construct an operation to wrap the function.
- typedef detail::executor_op<function_type, Allocator, detail::operation> op;
- typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
- p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(f), a);
-
- BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p,
- "io_context", &this->context(), 0, "defer"));
-
- io_context_.impl_.post_immediate_completion(p.p, true);
- p.v = p.p = 0;
-}
-
-inline bool
-io_context::executor_type::running_in_this_thread() const BOOST_ASIO_NOEXCEPT
-{
- return io_context_.impl_.can_dispatch();
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-inline io_context::work::work(boost::asio::io_context& io_context)
- : io_context_impl_(io_context.impl_)
-{
- io_context_impl_.work_started();
-}
-
-inline io_context::work::work(const work& other)
- : io_context_impl_(other.io_context_impl_)
-{
- io_context_impl_.work_started();
-}
-
-inline io_context::work::~work()
-{
- io_context_impl_.work_finished();
-}
-
-inline boost::asio::io_context& io_context::work::get_io_context()
-{
- return static_cast<boost::asio::io_context&>(io_context_impl_.context());
-}
-
-inline boost::asio::io_context& io_context::work::get_io_service()
-{
- return static_cast<boost::asio::io_context&>(io_context_impl_.context());
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-inline boost::asio::io_context& io_context::service::get_io_context()
-{
- return static_cast<boost::asio::io_context&>(context());
-}
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-inline boost::asio::io_context& io_context::service::get_io_service()
-{
- return static_cast<boost::asio::io_context&>(context());
-}
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/read_until.hpp b/src/third_party/boost-1.68.0/boost/asio/impl/read_until.hpp
deleted file mode 100644
index 704a97946ba..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/impl/read_until.hpp
+++ /dev/null
@@ -1,1502 +0,0 @@
-//
-// impl/read_until.hpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IMPL_READ_UNTIL_HPP
-#define BOOST_ASIO_IMPL_READ_UNTIL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <algorithm>
-#include <string>
-#include <vector>
-#include <utility>
-#include <boost/asio/associated_allocator.hpp>
-#include <boost/asio/associated_executor.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/buffers_iterator.hpp>
-#include <boost/asio/detail/bind_handler.hpp>
-#include <boost/asio/detail/handler_alloc_helpers.hpp>
-#include <boost/asio/detail/handler_cont_helpers.hpp>
-#include <boost/asio/detail/handler_invoke_helpers.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/limits.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-template <typename SyncReadStream, typename DynamicBuffer>
-inline std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read_until(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
- boost::asio::detail::throw_error(ec, "read_until");
- return bytes_transferred;
-}
-
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- char delim, boost::system::error_code& ec)
-{
- typename decay<DynamicBuffer>::type b(
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
-
- std::size_t search_position = 0;
- for (;;)
- {
- // Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
- typedef buffers_iterator<buffers_type> iterator;
- buffers_type data_buffers = b.data();
- iterator begin = iterator::begin(data_buffers);
- iterator start_pos = begin + search_position;
- iterator end = iterator::end(data_buffers);
-
- // Look for a match.
- iterator iter = std::find(start_pos, end, delim);
- if (iter != end)
- {
- // Found a match. We're done.
- ec = boost::system::error_code();
- return iter - begin + 1;
- }
- else
- {
- // No match. Next search can start with the new data.
- search_position = end - begin;
- }
-
- // Check if buffer is full.
- if (b.size() == b.max_size())
- {
- ec = error::not_found;
- return 0;
- }
-
- // Need more data.
- std::size_t bytes_to_read = std::min<std::size_t>(
- std::max<std::size_t>(512, b.capacity() - b.size()),
- std::min<std::size_t>(65536, b.max_size() - b.size()));
- b.commit(s.read_some(b.prepare(bytes_to_read), ec));
- if (ec)
- return 0;
- }
-}
-
-template <typename SyncReadStream, typename DynamicBuffer>
-inline std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- BOOST_ASIO_STRING_VIEW_PARAM delim)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read_until(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
- boost::asio::detail::throw_error(ec, "read_until");
- return bytes_transferred;
-}
-
-namespace detail
-{
- // Algorithm that finds a subsequence of equal values in a sequence. Returns
- // (iterator,true) if a full match was found, in which case the iterator
- // points to the beginning of the match. Returns (iterator,false) if a
- // partial match was found at the end of the first sequence, in which case
- // the iterator points to the beginning of the partial match. Returns
- // (last1,false) if no full or partial match was found.
- template <typename Iterator1, typename Iterator2>
- std::pair<Iterator1, bool> partial_search(
- Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
- {
- for (Iterator1 iter1 = first1; iter1 != last1; ++iter1)
- {
- Iterator1 test_iter1 = iter1;
- Iterator2 test_iter2 = first2;
- for (;; ++test_iter1, ++test_iter2)
- {
- if (test_iter2 == last2)
- return std::make_pair(iter1, true);
- if (test_iter1 == last1)
- {
- if (test_iter2 != first2)
- return std::make_pair(iter1, false);
- else
- break;
- }
- if (*test_iter1 != *test_iter2)
- break;
- }
- }
- return std::make_pair(last1, false);
- }
-} // namespace detail
-
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec)
-{
- typename decay<DynamicBuffer>::type b(
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
-
- std::size_t search_position = 0;
- for (;;)
- {
- // Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
- typedef buffers_iterator<buffers_type> iterator;
- buffers_type data_buffers = b.data();
- iterator begin = iterator::begin(data_buffers);
- iterator start_pos = begin + search_position;
- iterator end = iterator::end(data_buffers);
-
- // Look for a match.
- std::pair<iterator, bool> result = detail::partial_search(
- start_pos, end, delim.begin(), delim.end());
- if (result.first != end)
- {
- if (result.second)
- {
- // Full match. We're done.
- ec = boost::system::error_code();
- return result.first - begin + delim.length();
- }
- else
- {
- // Partial match. Next search needs to start from beginning of match.
- search_position = result.first - begin;
- }
- }
- else
- {
- // No match. Next search can start with the new data.
- search_position = end - begin;
- }
-
- // Check if buffer is full.
- if (b.size() == b.max_size())
- {
- ec = error::not_found;
- return 0;
- }
-
- // Need more data.
- std::size_t bytes_to_read = std::min<std::size_t>(
- std::max<std::size_t>(512, b.capacity() - b.size()),
- std::min<std::size_t>(65536, b.max_size() - b.size()));
- b.commit(s.read_some(b.prepare(bytes_to_read), ec));
- if (ec)
- return 0;
- }
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-template <typename SyncReadStream, typename DynamicBuffer>
-inline std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read_until(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), expr, ec);
- boost::asio::detail::throw_error(ec, "read_until");
- return bytes_transferred;
-}
-
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr, boost::system::error_code& ec)
-{
- typename decay<DynamicBuffer>::type b(
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
-
- std::size_t search_position = 0;
- for (;;)
- {
- // Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
- typedef buffers_iterator<buffers_type> iterator;
- buffers_type data_buffers = b.data();
- iterator begin = iterator::begin(data_buffers);
- iterator start_pos = begin + search_position;
- iterator end = iterator::end(data_buffers);
-
- // Look for a match.
- boost::match_results<iterator,
- typename std::vector<boost::sub_match<iterator> >::allocator_type>
- match_results;
- if (regex_search(start_pos, end, match_results, expr,
- boost::match_default | boost::match_partial))
- {
- if (match_results[0].matched)
- {
- // Full match. We're done.
- ec = boost::system::error_code();
- return match_results[0].second - begin;
- }
- else
- {
- // Partial match. Next search needs to start from beginning of match.
- search_position = match_results[0].first - begin;
- }
- }
- else
- {
- // No match. Next search can start with the new data.
- search_position = end - begin;
- }
-
- // Check if buffer is full.
- if (b.size() == b.max_size())
- {
- ec = error::not_found;
- return 0;
- }
-
- // Need more data.
- std::size_t bytes_to_read = read_size_helper(b, 65536);
- b.commit(s.read_some(b.prepare(bytes_to_read), ec));
- if (ec)
- return 0;
- }
-}
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-template <typename SyncReadStream,
- typename DynamicBuffer, typename MatchCondition>
-inline std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- MatchCondition match_condition,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
-{
- boost::system::error_code ec;
- std::size_t bytes_transferred = read_until(s,
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- match_condition, ec);
- boost::asio::detail::throw_error(ec, "read_until");
- return bytes_transferred;
-}
-
-template <typename SyncReadStream,
- typename DynamicBuffer, typename MatchCondition>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- MatchCondition match_condition, boost::system::error_code& ec,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
-{
- typename decay<DynamicBuffer>::type b(
- BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
-
- std::size_t search_position = 0;
- for (;;)
- {
- // Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type buffers_type;
- typedef buffers_iterator<buffers_type> iterator;
- buffers_type data_buffers = b.data();
- iterator begin = iterator::begin(data_buffers);
- iterator start_pos = begin + search_position;
- iterator end = iterator::end(data_buffers);
-
- // Look for a match.
- std::pair<iterator, bool> result = match_condition(start_pos, end);
- if (result.second)
- {
- // Full match. We're done.
- ec = boost::system::error_code();
- return result.first - begin;
- }
- else if (result.first != end)
- {
- // Partial match. Next search needs to start from beginning of match.
- search_position = result.first - begin;
- }
- else
- {
- // No match. Next search can start with the new data.
- search_position = end - begin;
- }
-
- // Check if buffer is full.
- if (b.size() == b.max_size())
- {
- ec = error::not_found;
- return 0;
- }
-
- // Need more data.
- std::size_t bytes_to_read = std::min<std::size_t>(
- std::max<std::size_t>(512, b.capacity() - b.size()),
- std::min<std::size_t>(65536, b.max_size() - b.size()));
- b.commit(s.read_some(b.prepare(bytes_to_read), ec));
- if (ec)
- return 0;
- }
-}
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-template <typename SyncReadStream, typename Allocator>
-inline std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, char delim)
-{
- return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
-}
-
-template <typename SyncReadStream, typename Allocator>
-inline std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, char delim,
- boost::system::error_code& ec)
-{
- return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
-}
-
-template <typename SyncReadStream, typename Allocator>
-inline std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- BOOST_ASIO_STRING_VIEW_PARAM delim)
-{
- return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
-}
-
-template <typename SyncReadStream, typename Allocator>
-inline std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec)
-{
- return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
-}
-
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-template <typename SyncReadStream, typename Allocator>
-inline std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr)
-{
- return read_until(s, basic_streambuf_ref<Allocator>(b), expr);
-}
-
-template <typename SyncReadStream, typename Allocator>
-inline std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
- boost::system::error_code& ec)
-{
- return read_until(s, basic_streambuf_ref<Allocator>(b), expr, ec);
-}
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-template <typename SyncReadStream, typename Allocator, typename MatchCondition>
-inline std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
-{
- return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition);
-}
-
-template <typename SyncReadStream, typename Allocator, typename MatchCondition>
-inline std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- MatchCondition match_condition, boost::system::error_code& ec,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
-{
- return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition, ec);
-}
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-namespace detail
-{
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- class read_until_delim_op
- {
- public:
- template <typename BufferSequence>
- read_until_delim_op(AsyncReadStream& stream,
- BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
- char delim, ReadHandler& handler)
- : stream_(stream),
- buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
- delim_(delim),
- start_(0),
- search_position_(0),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- read_until_delim_op(const read_until_delim_op& other)
- : stream_(other.stream_),
- buffers_(other.buffers_),
- delim_(other.delim_),
- start_(other.start_),
- search_position_(other.search_position_),
- handler_(other.handler_)
- {
- }
-
- read_until_delim_op(read_until_delim_op&& other)
- : stream_(other.stream_),
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
- delim_(other.delim_),
- start_(other.start_),
- search_position_(other.search_position_),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- std::size_t bytes_transferred, int start = 0)
- {
- const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
- std::size_t bytes_to_read;
- switch (start_ = start)
- {
- case 1:
- for (;;)
- {
- {
- // Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type
- buffers_type;
- typedef buffers_iterator<buffers_type> iterator;
- buffers_type data_buffers = buffers_.data();
- iterator begin = iterator::begin(data_buffers);
- iterator start_pos = begin + search_position_;
- iterator end = iterator::end(data_buffers);
-
- // Look for a match.
- iterator iter = std::find(start_pos, end, delim_);
- if (iter != end)
- {
- // Found a match. We're done.
- search_position_ = iter - begin + 1;
- bytes_to_read = 0;
- }
-
- // No match yet. Check if buffer is full.
- else if (buffers_.size() == buffers_.max_size())
- {
- search_position_ = not_found;
- bytes_to_read = 0;
- }
-
- // Need to read some more data.
- else
- {
- // Next search can start with the new data.
- search_position_ = end - begin;
- bytes_to_read = std::min<std::size_t>(
- std::max<std::size_t>(512,
- buffers_.capacity() - buffers_.size()),
- std::min<std::size_t>(65536,
- buffers_.max_size() - buffers_.size()));
- }
- }
-
- // Check if we're done.
- if (!start && bytes_to_read == 0)
- break;
-
- // Start a new asynchronous read operation to obtain more data.
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
- BOOST_ASIO_MOVE_CAST(read_until_delim_op)(*this));
- return; default:
- buffers_.commit(bytes_transferred);
- if (ec || bytes_transferred == 0)
- break;
- }
-
- const boost::system::error_code result_ec =
- (search_position_ == not_found)
- ? error::not_found : ec;
-
- const std::size_t result_n =
- (ec || search_position_ == not_found)
- ? 0 : search_position_;
-
- handler_(result_ec, result_n);
- }
- }
-
- //private:
- AsyncReadStream& stream_;
- DynamicBuffer buffers_;
- char delim_;
- int start_;
- std::size_t search_position_;
- ReadHandler handler_;
- };
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline bool asio_handler_is_continuation(
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>,
- Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_until_delim_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::read_until_delim_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- BOOST_ASIO_HANDLER_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))>(
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- delim, init.completion_handler)(boost::system::error_code(), 0, 1);
-
- return init.result.get();
-}
-
-namespace detail
-{
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- class read_until_delim_string_op
- {
- public:
- template <typename BufferSequence>
- read_until_delim_string_op(AsyncReadStream& stream,
- BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
- const std::string& delim, ReadHandler& handler)
- : stream_(stream),
- buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
- delim_(delim),
- start_(0),
- search_position_(0),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- read_until_delim_string_op(const read_until_delim_string_op& other)
- : stream_(other.stream_),
- buffers_(other.buffers_),
- delim_(other.delim_),
- start_(other.start_),
- search_position_(other.search_position_),
- handler_(other.handler_)
- {
- }
-
- read_until_delim_string_op(read_until_delim_string_op&& other)
- : stream_(other.stream_),
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
- delim_(BOOST_ASIO_MOVE_CAST(std::string)(other.delim_)),
- start_(other.start_),
- search_position_(other.search_position_),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- std::size_t bytes_transferred, int start = 0)
- {
- const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
- std::size_t bytes_to_read;
- switch (start_ = start)
- {
- case 1:
- for (;;)
- {
- {
- // Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type
- buffers_type;
- typedef buffers_iterator<buffers_type> iterator;
- buffers_type data_buffers = buffers_.data();
- iterator begin = iterator::begin(data_buffers);
- iterator start_pos = begin + search_position_;
- iterator end = iterator::end(data_buffers);
-
- // Look for a match.
- std::pair<iterator, bool> result = detail::partial_search(
- start_pos, end, delim_.begin(), delim_.end());
- if (result.first != end && result.second)
- {
- // Full match. We're done.
- search_position_ = result.first - begin + delim_.length();
- bytes_to_read = 0;
- }
-
- // No match yet. Check if buffer is full.
- else if (buffers_.size() == buffers_.max_size())
- {
- search_position_ = not_found;
- bytes_to_read = 0;
- }
-
- // Need to read some more data.
- else
- {
- if (result.first != end)
- {
- // Partial match. Next search needs to start from beginning of
- // match.
- search_position_ = result.first - begin;
- }
- else
- {
- // Next search can start with the new data.
- search_position_ = end - begin;
- }
-
- bytes_to_read = std::min<std::size_t>(
- std::max<std::size_t>(512,
- buffers_.capacity() - buffers_.size()),
- std::min<std::size_t>(65536,
- buffers_.max_size() - buffers_.size()));
- }
- }
-
- // Check if we're done.
- if (!start && bytes_to_read == 0)
- break;
-
- // Start a new asynchronous read operation to obtain more data.
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
- BOOST_ASIO_MOVE_CAST(read_until_delim_string_op)(*this));
- return; default:
- buffers_.commit(bytes_transferred);
- if (ec || bytes_transferred == 0)
- break;
- }
-
- const boost::system::error_code result_ec =
- (search_position_ == not_found)
- ? error::not_found : ec;
-
- const std::size_t result_n =
- (ec || search_position_ == not_found)
- ? 0 : search_position_;
-
- handler_(result_ec, result_n);
- }
- }
-
- //private:
- AsyncReadStream& stream_;
- DynamicBuffer buffers_;
- std::string delim_;
- int start_;
- std::size_t search_position_;
- ReadHandler handler_;
- };
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline bool asio_handler_is_continuation(
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>,
- Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_until_delim_string_op<AsyncReadStream,
- DynamicBuffer, ReadHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- BOOST_ASIO_STRING_VIEW_PARAM delim,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::read_until_delim_string_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- BOOST_ASIO_HANDLER_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))>(
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- static_cast<std::string>(delim),
- init.completion_handler)(boost::system::error_code(), 0, 1);
-
- return init.result.get();
-}
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-namespace detail
-{
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler>
- class read_until_expr_op
- {
- public:
- template <typename BufferSequence>
- read_until_expr_op(AsyncReadStream& stream,
- BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
- const boost::regex& expr, ReadHandler& handler)
- : stream_(stream),
- buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
- expr_(expr),
- start_(0),
- search_position_(0),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- read_until_expr_op(const read_until_expr_op& other)
- : stream_(other.stream_),
- buffers_(other.buffers_),
- expr_(other.expr_),
- start_(other.start_),
- search_position_(other.search_position_),
- handler_(other.handler_)
- {
- }
-
- read_until_expr_op(read_until_expr_op&& other)
- : stream_(other.stream_),
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
- expr_(other.expr_),
- start_(other.start_),
- search_position_(other.search_position_),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- std::size_t bytes_transferred, int start = 0)
- {
- const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
- std::size_t bytes_to_read;
- switch (start_ = start)
- {
- case 1:
- for (;;)
- {
- {
- // Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type
- buffers_type;
- typedef buffers_iterator<buffers_type> iterator;
- buffers_type data_buffers = buffers_.data();
- iterator begin = iterator::begin(data_buffers);
- iterator start_pos = begin + search_position_;
- iterator end = iterator::end(data_buffers);
-
- // Look for a match.
- boost::match_results<iterator,
- typename std::vector<boost::sub_match<iterator> >::allocator_type>
- match_results;
- bool match = regex_search(start_pos, end, match_results, expr_,
- boost::match_default | boost::match_partial);
- if (match && match_results[0].matched)
- {
- // Full match. We're done.
- search_position_ = match_results[0].second - begin;
- bytes_to_read = 0;
- }
-
- // No match yet. Check if buffer is full.
- else if (buffers_.size() == buffers_.max_size())
- {
- search_position_ = not_found;
- bytes_to_read = 0;
- }
-
- // Need to read some more data.
- else
- {
- if (match)
- {
- // Partial match. Next search needs to start from beginning of
- // match.
- search_position_ = match_results[0].first - begin;
- }
- else
- {
- // Next search can start with the new data.
- search_position_ = end - begin;
- }
-
- bytes_to_read = std::min<std::size_t>(
- std::max<std::size_t>(512,
- buffers_.capacity() - buffers_.size()),
- std::min<std::size_t>(65536,
- buffers_.max_size() - buffers_.size()));
- }
- }
-
- // Check if we're done.
- if (!start && bytes_to_read == 0)
- break;
-
- // Start a new asynchronous read operation to obtain more data.
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
- BOOST_ASIO_MOVE_CAST(read_until_expr_op)(*this));
- return; default:
- buffers_.commit(bytes_transferred);
- if (ec || bytes_transferred == 0)
- break;
- }
-
- const boost::system::error_code result_ec =
- (search_position_ == not_found)
- ? error::not_found : ec;
-
- const std::size_t result_n =
- (ec || search_position_ == not_found)
- ? 0 : search_position_;
-
- handler_(result_ec, result_n);
- }
- }
-
- //private:
- AsyncReadStream& stream_;
- DynamicBuffer buffers_;
- RegEx expr_;
- int start_;
- std::size_t search_position_;
- ReadHandler handler_;
- };
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler>
- inline bool asio_handler_is_continuation(
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
- {
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename RegEx, typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename RegEx, typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>,
- Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename RegEx, typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_until_expr_op<AsyncReadStream,
- DynamicBuffer, RegEx, ReadHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::read_until_expr_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- boost::regex, BOOST_ASIO_HANDLER_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))>(
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- expr, init.completion_handler)(boost::system::error_code(), 0, 1);
-
- return init.result.get();
-}
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-namespace detail
-{
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
- class read_until_match_op
- {
- public:
- template <typename BufferSequence>
- read_until_match_op(AsyncReadStream& stream,
- BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
- MatchCondition match_condition, ReadHandler& handler)
- : stream_(stream),
- buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
- match_condition_(match_condition),
- start_(0),
- search_position_(0),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE)
- read_until_match_op(const read_until_match_op& other)
- : stream_(other.stream_),
- buffers_(other.buffers_),
- match_condition_(other.match_condition_),
- start_(other.start_),
- search_position_(other.search_position_),
- handler_(other.handler_)
- {
- }
-
- read_until_match_op(read_until_match_op&& other)
- : stream_(other.stream_),
- buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
- match_condition_(other.match_condition_),
- start_(other.start_),
- search_position_(other.search_position_),
- handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
- void operator()(const boost::system::error_code& ec,
- std::size_t bytes_transferred, int start = 0)
- {
- const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
- std::size_t bytes_to_read;
- switch (start_ = start)
- {
- case 1:
- for (;;)
- {
- {
- // Determine the range of the data to be searched.
- typedef typename DynamicBuffer::const_buffers_type
- buffers_type;
- typedef buffers_iterator<buffers_type> iterator;
- buffers_type data_buffers = buffers_.data();
- iterator begin = iterator::begin(data_buffers);
- iterator start_pos = begin + search_position_;
- iterator end = iterator::end(data_buffers);
-
- // Look for a match.
- std::pair<iterator, bool> result = match_condition_(start_pos, end);
- if (result.second)
- {
- // Full match. We're done.
- search_position_ = result.first - begin;
- bytes_to_read = 0;
- }
-
- // No match yet. Check if buffer is full.
- else if (buffers_.size() == buffers_.max_size())
- {
- search_position_ = not_found;
- bytes_to_read = 0;
- }
-
- // Need to read some more data.
- else
- {
- if (result.first != end)
- {
- // Partial match. Next search needs to start from beginning of
- // match.
- search_position_ = result.first - begin;
- }
- else
- {
- // Next search can start with the new data.
- search_position_ = end - begin;
- }
-
- bytes_to_read = std::min<std::size_t>(
- std::max<std::size_t>(512,
- buffers_.capacity() - buffers_.size()),
- std::min<std::size_t>(65536,
- buffers_.max_size() - buffers_.size()));
- }
- }
-
- // Check if we're done.
- if (!start && bytes_to_read == 0)
- break;
-
- // Start a new asynchronous read operation to obtain more data.
- stream_.async_read_some(buffers_.prepare(bytes_to_read),
- BOOST_ASIO_MOVE_CAST(read_until_match_op)(*this));
- return; default:
- buffers_.commit(bytes_transferred);
- if (ec || bytes_transferred == 0)
- break;
- }
-
- const boost::system::error_code result_ec =
- (search_position_ == not_found)
- ? error::not_found : ec;
-
- const std::size_t result_n =
- (ec || search_position_ == not_found)
- ? 0 : search_position_;
-
- handler_(result_ec, result_n);
- }
- }
-
- //private:
- AsyncReadStream& stream_;
- DynamicBuffer buffers_;
- MatchCondition match_condition_;
- int start_;
- std::size_t search_position_;
- ReadHandler handler_;
- };
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
- inline void* asio_handler_allocate(std::size_t size,
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
- {
- return boost_asio_handler_alloc_helpers::allocate(
- size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_alloc_helpers::deallocate(
- pointer, size, this_handler->handler_);
- }
-
- template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
- inline bool asio_handler_is_continuation(
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
- {
- return this_handler->start_ == 0 ? true
- : boost_asio_handler_cont_helpers::is_continuation(
- this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename MatchCondition,
- typename ReadHandler>
- inline void asio_handler_invoke(Function& function,
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-
- template <typename Function, typename AsyncReadStream,
- typename DynamicBuffer, typename MatchCondition,
- typename ReadHandler>
- inline void asio_handler_invoke(const Function& function,
- read_until_match_op<AsyncReadStream, DynamicBuffer,
- MatchCondition, ReadHandler>* this_handler)
- {
- boost_asio_handler_invoke_helpers::invoke(
- function, this_handler->handler_);
- }
-} // namespace detail
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler, typename Allocator>
-struct associated_allocator<
- detail::read_until_match_op<AsyncReadStream,
- DynamicBuffer, MatchCondition, ReadHandler>,
- Allocator>
-{
- typedef typename associated_allocator<ReadHandler, Allocator>::type type;
-
- static type get(
- const detail::read_until_match_op<AsyncReadStream,
- DynamicBuffer, MatchCondition, ReadHandler>& h,
- const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
- {
- return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
- }
-};
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler, typename Executor>
-struct associated_executor<
- detail::read_until_match_op<AsyncReadStream,
- DynamicBuffer, MatchCondition, ReadHandler>,
- Executor>
-{
- typedef typename associated_executor<ReadHandler, Executor>::type type;
-
- static type get(
- const detail::read_until_match_op<AsyncReadStream,
- DynamicBuffer, MatchCondition, ReadHandler>& h,
- const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
- {
- return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
- }
-};
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
-{
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::read_until_match_op<AsyncReadStream,
- typename decay<DynamicBuffer>::type,
- MatchCondition, BOOST_ASIO_HANDLER_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))>(
- s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
- match_condition, init.completion_handler)(
- boost::system::error_code(), 0, 1);
-
- return init.result.get();
-}
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
-{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- delim, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-}
-
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- BOOST_ASIO_STRING_VIEW_PARAM delim,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
-{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- delim, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-}
-
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
-{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- expr, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-}
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
-
-template <typename AsyncReadStream, typename Allocator,
- typename MatchCondition, typename ReadHandler>
-inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<is_match_condition<MatchCondition>::value>::type*)
-{
- return async_read_until(s, basic_streambuf_ref<Allocator>(b),
- match_condition, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
-}
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_READ_UNTIL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/use_future.hpp b/src/third_party/boost-1.68.0/boost/asio/impl/use_future.hpp
deleted file mode 100644
index a0e22acad39..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/impl/use_future.hpp
+++ /dev/null
@@ -1,940 +0,0 @@
-//
-// impl/use_future.hpp
-// ~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IMPL_USE_FUTURE_HPP
-#define BOOST_ASIO_IMPL_USE_FUTURE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <future>
-#include <tuple>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/memory.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/asio/packaged_task.hpp>
-#include <boost/system/system_error.hpp>
-#include <boost/asio/system_executor.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename F, typename... Args>
-inline void promise_invoke_and_set(std::promise<T>& p,
- F& f, BOOST_ASIO_MOVE_ARG(Args)... args)
-{
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
- {
- p.set_value(f(BOOST_ASIO_MOVE_CAST(Args)(args)...));
- }
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- catch (...)
- {
- p.set_exception(std::current_exception());
- }
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
-}
-
-template <typename F, typename... Args>
-inline void promise_invoke_and_set(std::promise<void>& p,
- F& f, BOOST_ASIO_MOVE_ARG(Args)... args)
-{
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
- {
- f(BOOST_ASIO_MOVE_CAST(Args)(args)...);
- p.set_value();
- }
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- catch (...)
- {
- p.set_exception(std::current_exception());
- }
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
-}
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename T, typename F>
-inline void promise_invoke_and_set(std::promise<T>& p, F& f)
-{
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
- {
- p.set_value(f());
- }
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- catch (...)
- {
- p.set_exception(std::current_exception());
- }
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
-}
-
-template <typename F, typename Args>
-inline void promise_invoke_and_set(std::promise<void>& p, F& f)
-{
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
- {
- f();
- p.set_value();
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- }
- catch (...)
- {
- p.set_exception(std::current_exception());
- }
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
-}
-
-#if defined(BOOST_ASIO_NO_EXCEPTIONS)
-
-#define BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
- template <typename T, typename F, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<T>& p, \
- F& f, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- p.set_value(f(BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- \
- template <typename F, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<void>& p, \
- F& f, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- f(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- p.set_value(); \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF)
-#undef BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF
-
-#else // defined(BOOST_ASIO_NO_EXCEPTIONS)
-
-#define BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
- template <typename T, typename F, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<T>& p, \
- F& f, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- try \
- { \
- p.set_value(f(BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- catch (...) \
- { \
- p.set_exception(std::current_exception()); \
- } \
- } \
- \
- template <typename F, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- inline void promise_invoke_and_set(std::promise<void>& p, \
- F& f, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- { \
- try \
- { \
- f(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- p.set_value(); \
- } \
- catch (...) \
- { \
- p.set_exception(std::current_exception()); \
- } \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF)
-#undef BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF
-
-#endif // defined(BOOST_ASIO_NO_EXCEPTIONS)
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-// A function object adapter to invoke a nullary function object and capture
-// any exception thrown into a promise.
-template <typename T, typename F>
-class promise_invoker
-{
-public:
- promise_invoker(const shared_ptr<std::promise<T> >& p,
- BOOST_ASIO_MOVE_ARG(F) f)
- : p_(p), f_(BOOST_ASIO_MOVE_CAST(F)(f))
- {
- }
-
- void operator()()
- {
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- try
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
- {
- f_();
- }
-#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
- catch (...)
- {
- p_->set_exception(std::current_exception());
- }
-#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
- }
-
-private:
- shared_ptr<std::promise<T> > p_;
- typename decay<F>::type f_;
-};
-
-// An executor that adapts the system_executor to capture any exeption thrown
-// by a submitted function object and save it into a promise.
-template <typename T>
-class promise_executor
-{
-public:
- explicit promise_executor(const shared_ptr<std::promise<T> >& p)
- : p_(p)
- {
- }
-
- execution_context& context() const BOOST_ASIO_NOEXCEPT
- {
- return system_executor().context();
- }
-
- void on_work_started() const BOOST_ASIO_NOEXCEPT {}
- void on_work_finished() const BOOST_ASIO_NOEXCEPT {}
-
- template <typename F, typename A>
- void dispatch(BOOST_ASIO_MOVE_ARG(F) f, const A&) const
- {
- promise_invoker<T, F>(p_, BOOST_ASIO_MOVE_CAST(F)(f))();
- }
-
- template <typename F, typename A>
- void post(BOOST_ASIO_MOVE_ARG(F) f, const A& a) const
- {
- system_executor().post(
- promise_invoker<T, F>(p_, BOOST_ASIO_MOVE_CAST(F)(f)), a);
- }
-
- template <typename F, typename A>
- void defer(BOOST_ASIO_MOVE_ARG(F) f, const A& a) const
- {
- system_executor().defer(
- promise_invoker<T, F>(p_, BOOST_ASIO_MOVE_CAST(F)(f)), a);
- }
-
- friend bool operator==(const promise_executor& a,
- const promise_executor& b) BOOST_ASIO_NOEXCEPT
- {
- return a.p_ == b.p_;
- }
-
- friend bool operator!=(const promise_executor& a,
- const promise_executor& b) BOOST_ASIO_NOEXCEPT
- {
- return a.p_ != b.p_;
- }
-
-private:
- shared_ptr<std::promise<T> > p_;
-};
-
-// The base class for all completion handlers that create promises.
-template <typename T>
-class promise_creator
-{
-public:
- typedef promise_executor<T> executor_type;
-
- executor_type get_executor() const BOOST_ASIO_NOEXCEPT
- {
- return executor_type(p_);
- }
-
- typedef std::future<T> future_type;
-
- future_type get_future()
- {
- return p_->get_future();
- }
-
-protected:
- template <typename Allocator>
- void create_promise(const Allocator& a)
- {
- BOOST_ASIO_REBIND_ALLOC(Allocator, char) b(a);
- p_ = std::allocate_shared<std::promise<T>>(b, std::allocator_arg, b);
- }
-
- shared_ptr<std::promise<T> > p_;
-};
-
-// For completion signature void().
-class promise_handler_0
- : public promise_creator<void>
-{
-public:
- void operator()()
- {
- this->p_->set_value();
- }
-};
-
-// For completion signature void(error_code).
-class promise_handler_ec_0
- : public promise_creator<void>
-{
-public:
- void operator()(const boost::system::error_code& ec)
- {
- if (ec)
- {
- this->p_->set_exception(
- std::make_exception_ptr(
- boost::system::system_error(ec)));
- }
- else
- {
- this->p_->set_value();
- }
- }
-};
-
-// For completion signature void(exception_ptr).
-class promise_handler_ex_0
- : public promise_creator<void>
-{
-public:
- void operator()(const std::exception_ptr& ex)
- {
- if (ex)
- {
- this->p_->set_exception(ex);
- }
- else
- {
- this->p_->set_value();
- }
- }
-};
-
-// For completion signature void(T).
-template <typename T>
-class promise_handler_1
- : public promise_creator<T>
-{
-public:
- template <typename Arg>
- void operator()(BOOST_ASIO_MOVE_ARG(Arg) arg)
- {
- this->p_->set_value(BOOST_ASIO_MOVE_CAST(Arg)(arg));
- }
-};
-
-// For completion signature void(error_code, T).
-template <typename T>
-class promise_handler_ec_1
- : public promise_creator<T>
-{
-public:
- template <typename Arg>
- void operator()(const boost::system::error_code& ec,
- BOOST_ASIO_MOVE_ARG(Arg) arg)
- {
- if (ec)
- {
- this->p_->set_exception(
- std::make_exception_ptr(
- boost::system::system_error(ec)));
- }
- else
- this->p_->set_value(BOOST_ASIO_MOVE_CAST(Arg)(arg));
- }
-};
-
-// For completion signature void(exception_ptr, T).
-template <typename T>
-class promise_handler_ex_1
- : public promise_creator<T>
-{
-public:
- template <typename Arg>
- void operator()(const std::exception_ptr& ex,
- BOOST_ASIO_MOVE_ARG(Arg) arg)
- {
- if (ex)
- this->p_->set_exception(ex);
- else
- this->p_->set_value(BOOST_ASIO_MOVE_CAST(Arg)(arg));
- }
-};
-
-// For completion signature void(T1, ..., Tn);
-template <typename T>
-class promise_handler_n
- : public promise_creator<T>
-{
-public:
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename... Args>
- void operator()(BOOST_ASIO_MOVE_ARG(Args)... args)
- {
- this->p_->set_value(
- std::forward_as_tuple(
- BOOST_ASIO_MOVE_CAST(Args)(args)...));
- }
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define BOOST_ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- this->p_->set_value( \
- std::forward_as_tuple( \
- BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CALL_OP_DEF)
-#undef BOOST_ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-};
-
-// For completion signature void(error_code, T1, ..., Tn);
-template <typename T>
-class promise_handler_ec_n
- : public promise_creator<T>
-{
-public:
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename... Args>
- void operator()(const boost::system::error_code& ec,
- BOOST_ASIO_MOVE_ARG(Args)... args)
- {
- if (ec)
- {
- this->p_->set_exception(
- std::make_exception_ptr(
- boost::system::system_error(ec)));
- }
- else
- {
- this->p_->set_value(
- std::forward_as_tuple(
- BOOST_ASIO_MOVE_CAST(Args)(args)...));
- }
- }
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define BOOST_ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(const boost::system::error_code& ec, \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- if (ec) \
- { \
- this->p_->set_exception( \
- std::make_exception_ptr( \
- boost::system::system_error(ec))); \
- } \
- else \
- { \
- this->p_->set_value( \
- std::forward_as_tuple( \
- BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CALL_OP_DEF)
-#undef BOOST_ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-};
-
-// For completion signature void(exception_ptr, T1, ..., Tn);
-template <typename T>
-class promise_handler_ex_n
- : public promise_creator<T>
-{
-public:
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename... Args>
- void operator()(const std::exception_ptr& ex,
- BOOST_ASIO_MOVE_ARG(Args)... args)
- {
- if (ex)
- this->p_->set_exception(ex);
- else
- {
- this->p_->set_value(
- std::forward_as_tuple(
- BOOST_ASIO_MOVE_CAST(Args)(args)...));
- }
- }
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define BOOST_ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(const std::exception_ptr& ex, \
- BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- if (ex) \
- this->p_->set_exception(ex); \
- else \
- { \
- this->p_->set_value( \
- std::forward_as_tuple( \
- BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
- } \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CALL_OP_DEF)
-#undef BOOST_ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-};
-
-// Helper template to choose the appropriate concrete promise handler
-// implementation based on the supplied completion signature.
-template <typename> class promise_handler_selector;
-
-template <>
-class promise_handler_selector<void()>
- : public promise_handler_0 {};
-
-template <>
-class promise_handler_selector<void(boost::system::error_code)>
- : public promise_handler_ec_0 {};
-
-template <>
-class promise_handler_selector<void(std::exception_ptr)>
- : public promise_handler_ex_0 {};
-
-template <typename Arg>
-class promise_handler_selector<void(Arg)>
- : public promise_handler_1<Arg> {};
-
-template <typename Arg>
-class promise_handler_selector<void(boost::system::error_code, Arg)>
- : public promise_handler_ec_1<Arg> {};
-
-template <typename Arg>
-class promise_handler_selector<void(std::exception_ptr, Arg)>
- : public promise_handler_ex_1<Arg> {};
-
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename... Arg>
-class promise_handler_selector<void(Arg...)>
- : public promise_handler_n<std::tuple<Arg...> > {};
-
-template <typename... Arg>
-class promise_handler_selector<void(boost::system::error_code, Arg...)>
- : public promise_handler_ec_n<std::tuple<Arg...> > {};
-
-template <typename... Arg>
-class promise_handler_selector<void(std::exception_ptr, Arg...)>
- : public promise_handler_ex_n<std::tuple<Arg...> > {};
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#define BOOST_ASIO_PRIVATE_PROMISE_SELECTOR_DEF(n) \
- template <typename Arg, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- class promise_handler_selector< \
- void(Arg, BOOST_ASIO_VARIADIC_TARGS(n))> \
- : public promise_handler_n< \
- std::tuple<Arg, BOOST_ASIO_VARIADIC_TARGS(n)> > {}; \
- \
- template <typename Arg, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- class promise_handler_selector< \
- void(boost::system::error_code, Arg, BOOST_ASIO_VARIADIC_TARGS(n))> \
- : public promise_handler_ec_n< \
- std::tuple<Arg, BOOST_ASIO_VARIADIC_TARGS(n)> > {}; \
- \
- template <typename Arg, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- class promise_handler_selector< \
- void(std::exception_ptr, Arg, BOOST_ASIO_VARIADIC_TARGS(n))> \
- : public promise_handler_ex_n< \
- std::tuple<Arg, BOOST_ASIO_VARIADIC_TARGS(n)> > {}; \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_PROMISE_SELECTOR_DEF)
-#undef BOOST_ASIO_PRIVATE_PROMISE_SELECTOR_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-// Completion handlers produced from the use_future completion token, when not
-// using use_future::operator().
-template <typename Signature, typename Allocator>
-class promise_handler
- : public promise_handler_selector<Signature>
-{
-public:
- typedef Allocator allocator_type;
- typedef void result_type;
-
- promise_handler(use_future_t<Allocator> u)
- : allocator_(u.get_allocator())
- {
- this->create_promise(allocator_);
- }
-
- allocator_type get_allocator() const BOOST_ASIO_NOEXCEPT
- {
- return allocator_;
- }
-
-private:
- Allocator allocator_;
-};
-
-template <typename Function, typename Signature, typename Allocator>
-inline void asio_handler_invoke(Function& f,
- promise_handler<Signature, Allocator>* h)
-{
- typename promise_handler<Signature, Allocator>::executor_type
- ex(h->get_executor());
- ex.dispatch(BOOST_ASIO_MOVE_CAST(Function)(f), std::allocator<void>());
-}
-
-template <typename Function, typename Signature, typename Allocator>
-inline void asio_handler_invoke(const Function& f,
- promise_handler<Signature, Allocator>* h)
-{
- typename promise_handler<Signature, Allocator>::executor_type
- ex(h->get_executor());
- ex.dispatch(f, std::allocator<void>());
-}
-
-// Helper base class for async_result specialisation.
-template <typename Signature, typename Allocator>
-class promise_async_result
-{
-public:
- typedef promise_handler<Signature, Allocator> completion_handler_type;
- typedef typename completion_handler_type::future_type return_type;
-
- explicit promise_async_result(completion_handler_type& h)
- : future_(h.get_future())
- {
- }
-
- return_type get()
- {
- return BOOST_ASIO_MOVE_CAST(return_type)(future_);
- }
-
-private:
- return_type future_;
-};
-
-// Return value from use_future::operator().
-template <typename Function, typename Allocator>
-class packaged_token
-{
-public:
- packaged_token(Function f, const Allocator& a)
- : function_(BOOST_ASIO_MOVE_CAST(Function)(f)),
- allocator_(a)
- {
- }
-
-//private:
- Function function_;
- Allocator allocator_;
-};
-
-// Completion handlers produced from the use_future completion token, when
-// using use_future::operator().
-template <typename Function, typename Allocator, typename Result>
-class packaged_handler
- : public promise_creator<Result>
-{
-public:
- typedef Allocator allocator_type;
- typedef void result_type;
-
- packaged_handler(packaged_token<Function, Allocator> t)
- : function_(BOOST_ASIO_MOVE_CAST(Function)(t.function_)),
- allocator_(t.allocator_)
- {
- this->create_promise(allocator_);
- }
-
- allocator_type get_allocator() const BOOST_ASIO_NOEXCEPT
- {
- return allocator_;
- }
-
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- template <typename... Args>
- void operator()(BOOST_ASIO_MOVE_ARG(Args)... args)
- {
- (promise_invoke_and_set)(*this->p_,
- function_, BOOST_ASIO_MOVE_CAST(Args)(args)...);
- }
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
- void operator()()
- {
- (promise_invoke_and_set)(*this->p_, function_);
- }
-
-#define BOOST_ASIO_PRIVATE_CALL_OP_DEF(n) \
- template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- void operator()(BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
- {\
- (promise_invoke_and_set)(*this->p_, \
- function_, BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
- } \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CALL_OP_DEF)
-#undef BOOST_ASIO_PRIVATE_CALL_OP_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-private:
- Function function_;
- Allocator allocator_;
-};
-
-template <typename Function,
- typename Function1, typename Allocator, typename Result>
-inline void asio_handler_invoke(Function& f,
- packaged_handler<Function1, Allocator, Result>* h)
-{
- typename packaged_handler<Function1, Allocator, Result>::executor_type
- ex(h->get_executor());
- ex.dispatch(BOOST_ASIO_MOVE_CAST(Function)(f), std::allocator<void>());
-}
-
-template <typename Function,
- typename Function1, typename Allocator, typename Result>
-inline void asio_handler_invoke(const Function& f,
- packaged_handler<Function1, Allocator, Result>* h)
-{
- typename packaged_handler<Function1, Allocator, Result>::executor_type
- ex(h->get_executor());
- ex.dispatch(f, std::allocator<void>());
-}
-
-// Helper base class for async_result specialisation.
-template <typename Function, typename Allocator, typename Result>
-class packaged_async_result
-{
-public:
- typedef packaged_handler<Function, Allocator, Result> completion_handler_type;
- typedef typename completion_handler_type::future_type return_type;
-
- explicit packaged_async_result(completion_handler_type& h)
- : future_(h.get_future())
- {
- }
-
- return_type get()
- {
- return BOOST_ASIO_MOVE_CAST(return_type)(future_);
- }
-
-private:
- return_type future_;
-};
-
-} // namespace detail
-
-template <typename Allocator> template <typename Function>
-inline detail::packaged_token<typename decay<Function>::type, Allocator>
-use_future_t<Allocator>::operator()(BOOST_ASIO_MOVE_ARG(Function) f) const
-{
- return detail::packaged_token<typename decay<Function>::type, Allocator>(
- BOOST_ASIO_MOVE_CAST(Function)(f), allocator_);
-}
-
-#if !defined(GENERATING_DOCUMENTATION)
-
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Allocator, typename Result, typename... Args>
-class async_result<use_future_t<Allocator>, Result(Args...)>
- : public detail::promise_async_result<
- void(typename decay<Args>::type...), Allocator>
-{
-public:
- explicit async_result(
- typename detail::promise_async_result<void(typename decay<Args>::type...),
- Allocator>::completion_handler_type& h)
- : detail::promise_async_result<
- void(typename decay<Args>::type...), Allocator>(h)
- {
- }
-};
-
-template <typename Function, typename Allocator,
- typename Result, typename... Args>
-class async_result<detail::packaged_token<Function, Allocator>, Result(Args...)>
- : public detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>
-{
-public:
- explicit async_result(
- typename detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>::completion_handler_type& h)
- : detail::packaged_async_result<Function, Allocator,
- typename result_of<Function(Args...)>::type>(h)
- {
- }
-};
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-template <typename Allocator, typename Result>
-class async_result<use_future_t<Allocator>, Result()>
- : public detail::promise_async_result<void(), Allocator>
-{
-public:
- explicit async_result(
- typename detail::promise_async_result<
- void(), Allocator>::completion_handler_type& h)
- : detail::promise_async_result<void(), Allocator>(h)
- {
- }
-};
-
-template <typename Function, typename Allocator, typename Result>
-class async_result<detail::packaged_token<Function, Allocator>, Result()>
- : public detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>
-{
-public:
- explicit async_result(
- typename detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>::completion_handler_type& h)
- : detail::packaged_async_result<Function, Allocator,
- typename result_of<Function()>::type>(h)
- {
- }
-};
-
-#define BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
- template <typename Allocator, \
- typename Result, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- class async_result<use_future_t<Allocator>, \
- Result(BOOST_ASIO_VARIADIC_TARGS(n))> \
- : public detail::promise_async_result< \
- void(BOOST_ASIO_VARIADIC_DECAY(n)), Allocator> \
- { \
- public: \
- explicit async_result( \
- typename detail::promise_async_result< \
- void(BOOST_ASIO_VARIADIC_DECAY(n)), \
- Allocator>::completion_handler_type& h) \
- : detail::promise_async_result< \
- void(BOOST_ASIO_VARIADIC_DECAY(n)), Allocator>(h) \
- { \
- } \
- }; \
- \
- template <typename Function, typename Allocator, \
- typename Result, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
- class async_result<detail::packaged_token<Function, Allocator>, \
- Result(BOOST_ASIO_VARIADIC_TARGS(n))> \
- : public detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(BOOST_ASIO_VARIADIC_TARGS(n))>::type> \
- { \
- public: \
- explicit async_result( \
- typename detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(BOOST_ASIO_VARIADIC_TARGS(n))>::type \
- >::completion_handler_type& h) \
- : detail::packaged_async_result<Function, Allocator, \
- typename result_of<Function(BOOST_ASIO_VARIADIC_TARGS(n))>::type>(h) \
- { \
- } \
- }; \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF)
-#undef BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
-
-template <typename Allocator, typename Signature>
-struct handler_type<use_future_t<Allocator>, Signature>
-{
- typedef typename async_result<use_future_t<Allocator>,
- Signature>::completion_handler_type type;
-};
-
-template <typename Signature, typename Allocator>
-class async_result<detail::promise_handler<Signature, Allocator> >
- : public detail::promise_async_result<Signature, Allocator>
-{
-public:
- typedef typename detail::promise_async_result<
- Signature, Allocator>::return_type type;
-
- explicit async_result(
- typename detail::promise_async_result<
- Signature, Allocator>::completion_handler_type& h)
- : detail::promise_async_result<Signature, Allocator>(h)
- {
- }
-};
-
-template <typename Function, typename Allocator, typename Signature>
-struct handler_type<detail::packaged_token<Function, Allocator>, Signature>
-{
- typedef typename async_result<detail::packaged_token<Function, Allocator>,
- Signature>::completion_handler_type type;
-};
-
-template <typename Function, typename Allocator, typename Result>
-class async_result<detail::packaged_handler<Function, Allocator, Result> >
- : public detail::packaged_async_result<Function, Allocator, Result>
-{
-public:
- typedef typename detail::packaged_async_result<
- Function, Allocator, Result>::return_type type;
-
- explicit async_result(
- typename detail::packaged_async_result<
- Function, Allocator, Result>::completion_handler_type& h)
- : detail::packaged_async_result<Function, Allocator, Result>(h)
- {
- }
-};
-
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
-#endif // !defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IMPL_USE_FUTURE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/bad_address_cast.hpp b/src/third_party/boost-1.68.0/boost/asio/ip/bad_address_cast.hpp
deleted file mode 100644
index 4e62bcd32b7..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/ip/bad_address_cast.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-//
-// ip/bad_address_cast.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IP_BAD_ADDRESS_CAST_HPP
-#define BOOST_ASIO_IP_BAD_ADDRESS_CAST_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <typeinfo>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Thrown to indicate a failed address conversion.
-class bad_address_cast : public std::bad_cast
-{
-public:
- /// Default constructor.
- bad_address_cast() {}
-
- /// Destructor.
- virtual ~bad_address_cast() BOOST_ASIO_NOEXCEPT_OR_NOTHROW {}
-
- /// Get the message associated with the exception.
- virtual const char* what() const BOOST_ASIO_NOEXCEPT_OR_NOTHROW
- {
- return "bad address cast";
- }
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_ADDRESS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver.hpp b/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver.hpp
deleted file mode 100644
index 969d9d8ac3b..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver.hpp
+++ /dev/null
@@ -1,1020 +0,0 @@
-//
-// ip/basic_resolver.hpp
-// ~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IP_BASIC_RESOLVER_HPP
-#define BOOST_ASIO_IP_BASIC_RESOLVER_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <string>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/basic_io_object.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/string_view.hpp>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/io_context.hpp>
-#include <boost/asio/ip/basic_resolver_iterator.hpp>
-#include <boost/asio/ip/basic_resolver_query.hpp>
-#include <boost/asio/ip/basic_resolver_results.hpp>
-#include <boost/asio/ip/resolver_base.hpp>
-
-#if defined(BOOST_ASIO_HAS_MOVE)
-# include <utility>
-#endif // defined(BOOST_ASIO_HAS_MOVE)
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# include <boost/asio/ip/resolver_service.hpp>
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/winrt_resolver_service.hpp>
-# define BOOST_ASIO_SVC_T \
- boost::asio::detail::winrt_resolver_service<InternetProtocol>
-# else
-# include <boost/asio/detail/resolver_service.hpp>
-# define BOOST_ASIO_SVC_T \
- boost::asio::detail::resolver_service<InternetProtocol>
-# endif
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// Provides endpoint resolution functionality.
-/**
- * The basic_resolver class template provides the ability to resolve a query
- * to a list of endpoints.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename InternetProtocol
- BOOST_ASIO_SVC_TPARAM_DEF1(= resolver_service<InternetProtocol>)>
-class basic_resolver
- : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>,
- public resolver_base
-{
-public:
- /// The type of the executor associated with the object.
- typedef io_context::executor_type executor_type;
-
- /// The protocol type.
- typedef InternetProtocol protocol_type;
-
- /// The endpoint type.
- typedef typename InternetProtocol::endpoint endpoint_type;
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated.) The query type.
- typedef basic_resolver_query<InternetProtocol> query;
-
- /// (Deprecated.) The iterator type.
- typedef basic_resolver_iterator<InternetProtocol> iterator;
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// The results type.
- typedef basic_resolver_results<InternetProtocol> results_type;
-
- /// Constructor.
- /**
- * This constructor creates a basic_resolver.
- *
- * @param io_context The io_context object that the resolver will use to
- * dispatch handlers for any asynchronous operations performed on the
- * resolver.
- */
- explicit basic_resolver(boost::asio::io_context& io_context)
- : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-construct a basic_resolver from another.
- /**
- * This constructor moves a resolver from one object to another.
- *
- * @param other The other basic_resolver object from which the move will
- * occur.
- *
- * @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_resolver(io_context&) constructor.
- */
- basic_resolver(basic_resolver&& other)
- : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
- {
- }
-
- /// Move-assign a basic_resolver from another.
- /**
- * This assignment operator moves a resolver from one object to another.
- * Cancels any outstanding asynchronous operations associated with the target
- * object.
- *
- * @param other The other basic_resolver object from which the move will
- * occur.
- *
- * @note Following the move, the moved-from object is in the same state as if
- * constructed using the @c basic_resolver(io_context&) constructor.
- */
- basic_resolver& operator=(basic_resolver&& other)
- {
- basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destroys the resolver.
- /**
- * This function destroys the resolver, cancelling any outstanding
- * asynchronous wait operations associated with the resolver as if by calling
- * @c cancel.
- */
- ~basic_resolver()
- {
- }
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- // These functions are provided by basic_io_object<>.
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- boost::asio::io_context& get_io_context()
- {
- return basic_io_object<BOOST_ASIO_SVC_T>::get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- /**
- * This function may be used to obtain the io_context object that the I/O
- * object uses to dispatch handlers for asynchronous operations.
- *
- * @return A reference to the io_context object that the I/O object will use
- * to dispatch handlers. Ownership is not transferred to the caller.
- */
- boost::asio::io_context& get_io_service()
- {
- return basic_io_object<BOOST_ASIO_SVC_T>::get_io_service();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Get the executor associated with the object.
- executor_type get_executor() BOOST_ASIO_NOEXCEPT
- {
- return basic_io_object<BOOST_ASIO_SVC_T>::get_executor();
- }
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
- /// Cancel any asynchronous operations that are waiting on the resolver.
- /**
- * This function forces the completion of any pending asynchronous
- * operations on the host resolver. The handler for each cancelled operation
- * will be invoked with the boost::asio::error::operation_aborted error code.
- */
- void cancel()
- {
- return this->get_service().cancel(this->get_implementation());
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated.) Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve a query into a list of endpoint entries.
- *
- * @param q A query object that determines what endpoints will be returned.
- *
- * @returns A range object representing the list of endpoint entries. A
- * successful call to this function is guaranteed to return a non-empty
- * range.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- results_type resolve(const query& q)
- {
- boost::system::error_code ec;
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
- boost::asio::detail::throw_error(ec, "resolve");
- return r;
- }
-
- /// (Deprecated.) Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve a query into a list of endpoint entries.
- *
- * @param q A query object that determines what endpoints will be returned.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns A range object representing the list of endpoint entries. An
- * empty range is returned if an error occurs. A successful call to this
- * function is guaranteed to return a non-empty range.
- */
- results_type resolve(const query& q, boost::system::error_code& ec)
- {
- return this->get_service().resolve(this->get_implementation(), q, ec);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @returns A range object representing the list of endpoint entries. A
- * successful call to this function is guaranteed to return a non-empty
- * range.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- results_type resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
- BOOST_ASIO_STRING_VIEW_PARAM service)
- {
- return resolve(host, service, resolver_base::flags());
- }
-
- /// Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns A range object representing the list of endpoint entries. An
- * empty range is returned if an error occurs. A successful call to this
- * function is guaranteed to return a non-empty range.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- results_type resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
- BOOST_ASIO_STRING_VIEW_PARAM service, boost::system::error_code& ec)
- {
- return resolve(host, service, resolver_base::flags(), ec);
- }
-
- /// Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param resolve_flags A set of flags that determine how name resolution
- * should be performed. The default flags are suitable for communication with
- * remote hosts.
- *
- * @returns A range object representing the list of endpoint entries. A
- * successful call to this function is guaranteed to return a non-empty
- * range.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- results_type resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
- BOOST_ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags)
- {
- boost::system::error_code ec;
- basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
- static_cast<std::string>(service), resolve_flags);
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
- boost::asio::detail::throw_error(ec, "resolve");
- return r;
- }
-
- /// Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param resolve_flags A set of flags that determine how name resolution
- * should be performed. The default flags are suitable for communication with
- * remote hosts.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns A range object representing the list of endpoint entries. An
- * empty range is returned if an error occurs. A successful call to this
- * function is guaranteed to return a non-empty range.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- results_type resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
- BOOST_ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags,
- boost::system::error_code& ec)
- {
- basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
- static_cast<std::string>(service), resolve_flags);
- return this->get_service().resolve(this->get_implementation(), q, ec);
- }
-
- /// Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param protocol A protocol object, normally representing either the IPv4 or
- * IPv6 version of an internet protocol.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @returns A range object representing the list of endpoint entries. A
- * successful call to this function is guaranteed to return a non-empty
- * range.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- results_type resolve(const protocol_type& protocol,
- BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service)
- {
- return resolve(protocol, host, service, resolver_base::flags());
- }
-
- /// Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param protocol A protocol object, normally representing either the IPv4 or
- * IPv6 version of an internet protocol.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns A range object representing the list of endpoint entries. An
- * empty range is returned if an error occurs. A successful call to this
- * function is guaranteed to return a non-empty range.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- results_type resolve(const protocol_type& protocol,
- BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
- boost::system::error_code& ec)
- {
- return resolve(protocol, host, service, resolver_base::flags(), ec);
- }
-
- /// Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param protocol A protocol object, normally representing either the IPv4 or
- * IPv6 version of an internet protocol.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param resolve_flags A set of flags that determine how name resolution
- * should be performed. The default flags are suitable for communication with
- * remote hosts.
- *
- * @returns A range object representing the list of endpoint entries. A
- * successful call to this function is guaranteed to return a non-empty
- * range.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- results_type resolve(const protocol_type& protocol,
- BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
- resolver_base::flags resolve_flags)
- {
- boost::system::error_code ec;
- basic_resolver_query<protocol_type> q(
- protocol, static_cast<std::string>(host),
- static_cast<std::string>(service), resolve_flags);
- results_type r = this->get_service().resolve(
- this->get_implementation(), q, ec);
- boost::asio::detail::throw_error(ec, "resolve");
- return r;
- }
-
- /// Perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param protocol A protocol object, normally representing either the IPv4 or
- * IPv6 version of an internet protocol.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param resolve_flags A set of flags that determine how name resolution
- * should be performed. The default flags are suitable for communication with
- * remote hosts.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns A range object representing the list of endpoint entries. An
- * empty range is returned if an error occurs. A successful call to this
- * function is guaranteed to return a non-empty range.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- results_type resolve(const protocol_type& protocol,
- BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
- resolver_base::flags resolve_flags, boost::system::error_code& ec)
- {
- basic_resolver_query<protocol_type> q(
- protocol, static_cast<std::string>(host),
- static_cast<std::string>(service), resolve_flags);
- return this->get_service().resolve(this->get_implementation(), q, ec);
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated.) Asynchronously perform forward resolution of a query to a
- /// list of entries.
- /**
- * This function is used to asynchronously resolve a query into a list of
- * endpoint entries.
- *
- * @param q A query object that determines what endpoints will be returned.
- *
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * resolver::results_type results // Resolved endpoints as a range.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * A successful resolve operation is guaranteed to pass a non-empty range to
- * the handler.
- */
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(const query& q,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- BOOST_ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Asynchronously perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * resolver::results_type results // Resolved endpoints as a range.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * A successful resolve operation is guaranteed to pass a non-empty range to
- * the handler.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
- BOOST_ASIO_STRING_VIEW_PARAM service,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- return async_resolve(host, service, resolver_base::flags(),
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
- }
-
- /// Asynchronously perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param resolve_flags A set of flags that determine how name resolution
- * should be performed. The default flags are suitable for communication with
- * remote hosts.
- *
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * resolver::results_type results // Resolved endpoints as a range.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * A successful resolve operation is guaranteed to pass a non-empty range to
- * the handler.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
- BOOST_ASIO_STRING_VIEW_PARAM service,
- resolver_base::flags resolve_flags,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- BOOST_ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
- basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
- static_cast<std::string>(service), resolve_flags);
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Asynchronously perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param protocol A protocol object, normally representing either the IPv4 or
- * IPv6 version of an internet protocol.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * resolver::results_type results // Resolved endpoints as a range.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * A successful resolve operation is guaranteed to pass a non-empty range to
- * the handler.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(const protocol_type& protocol,
- BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- return async_resolve(protocol, host, service, resolver_base::flags(),
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
- }
-
- /// Asynchronously perform forward resolution of a query to a list of entries.
- /**
- * This function is used to resolve host and service names into a list of
- * endpoint entries.
- *
- * @param protocol A protocol object, normally representing either the IPv4 or
- * IPv6 version of an internet protocol.
- *
- * @param host A string identifying a location. May be a descriptive name or
- * a numeric address string. If an empty string and the passive flag has been
- * specified, the resolved endpoints are suitable for local service binding.
- * If an empty string and passive is not specified, the resolved endpoints
- * will use the loopback address.
- *
- * @param service A string identifying the requested service. This may be a
- * descriptive name or a numeric string corresponding to a port number. May
- * be an empty string, in which case all resolved endpoints will have a port
- * number of 0.
- *
- * @param resolve_flags A set of flags that determine how name resolution
- * should be performed. The default flags are suitable for communication with
- * remote hosts.
- *
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * resolver::results_type results // Resolved endpoints as a range.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * A successful resolve operation is guaranteed to pass a non-empty range to
- * the handler.
- *
- * @note On POSIX systems, host names may be locally defined in the file
- * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
- * resolution is performed using DNS. Operating systems may use additional
- * locations when resolving host names (such as NETBIOS names on Windows).
- *
- * On POSIX systems, service names are typically defined in the file
- * <tt>/etc/services</tt>. On Windows, service names may be found in the file
- * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
- * may use additional locations when resolving service names.
- */
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(const protocol_type& protocol,
- BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
- resolver_base::flags resolve_flags,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- BOOST_ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
- basic_resolver_query<protocol_type> q(
- protocol, static_cast<std::string>(host),
- static_cast<std::string>(service), resolve_flags);
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), q,
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), q, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-
- /// Perform reverse resolution of an endpoint to a list of entries.
- /**
- * This function is used to resolve an endpoint into a list of endpoint
- * entries.
- *
- * @param e An endpoint object that determines what endpoints will be
- * returned.
- *
- * @returns A range object representing the list of endpoint entries. A
- * successful call to this function is guaranteed to return a non-empty
- * range.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- results_type resolve(const endpoint_type& e)
- {
- boost::system::error_code ec;
- results_type i = this->get_service().resolve(
- this->get_implementation(), e, ec);
- boost::asio::detail::throw_error(ec, "resolve");
- return i;
- }
-
- /// Perform reverse resolution of an endpoint to a list of entries.
- /**
- * This function is used to resolve an endpoint into a list of endpoint
- * entries.
- *
- * @param e An endpoint object that determines what endpoints will be
- * returned.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns A range object representing the list of endpoint entries. An
- * empty range is returned if an error occurs. A successful call to this
- * function is guaranteed to return a non-empty range.
- */
- results_type resolve(const endpoint_type& e, boost::system::error_code& ec)
- {
- return this->get_service().resolve(this->get_implementation(), e, ec);
- }
-
- /// Asynchronously perform reverse resolution of an endpoint to a list of
- /// entries.
- /**
- * This function is used to asynchronously resolve an endpoint into a list of
- * endpoint entries.
- *
- * @param e An endpoint object that determines what endpoints will be
- * returned.
- *
- * @param handler The handler to be called when the resolve operation
- * completes. Copies will be made of the handler as required. The function
- * signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * resolver::results_type results // Resolved endpoints as a range.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation
- * of the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * A successful resolve operation is guaranteed to pass a non-empty range to
- * the handler.
- */
- template <typename ResolveHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
- void (boost::system::error_code, results_type))
- async_resolve(const endpoint_type& e,
- BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ResolveHandler.
- BOOST_ASIO_RESOLVE_HANDLER_CHECK(
- ResolveHandler, handler, results_type) type_check;
-
-#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- return this->get_service().async_resolve(this->get_implementation(), e,
- BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
-#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- boost::asio::async_completion<ResolveHandler,
- void (boost::system::error_code, results_type)> init(handler);
-
- this->get_service().async_resolve(
- this->get_implementation(), e, init.completion_handler);
-
- return init.result.get();
-#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
- }
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#if !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-# undef BOOST_ASIO_SVC_T
-#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
-
-#endif // BOOST_ASIO_IP_BASIC_RESOLVER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_results.hpp b/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_results.hpp
deleted file mode 100644
index dc87dbffc88..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_results.hpp
+++ /dev/null
@@ -1,313 +0,0 @@
-//
-// ip/basic_resolver_results.hpp
-// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_IP_BASIC_RESOLVER_RESULTS_HPP
-#define BOOST_ASIO_IP_BASIC_RESOLVER_RESULTS_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <cstddef>
-#include <cstring>
-#include <boost/asio/detail/socket_ops.hpp>
-#include <boost/asio/detail/socket_types.hpp>
-#include <boost/asio/ip/basic_resolver_iterator.hpp>
-
-#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
-# include <boost/asio/detail/winrt_utils.hpp>
-#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ip {
-
-/// A range of entries produced by a resolver.
-/**
- * The boost::asio::ip::basic_resolver_results class template is used to define
- * a range over the results returned by a resolver.
- *
- * The iterator's value_type, obtained when a results iterator is dereferenced,
- * is: @code const basic_resolver_entry<InternetProtocol> @endcode
- *
- * @note For backward compatibility, basic_resolver_results is derived from
- * basic_resolver_iterator. This derivation is deprecated.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe.
- */
-template <typename InternetProtocol>
-class basic_resolver_results
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- : public basic_resolver_iterator<InternetProtocol>
-#else // !defined(BOOST_ASIO_NO_DEPRECATED)
- : private basic_resolver_iterator<InternetProtocol>
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-{
-public:
- /// The protocol type associated with the results.
- typedef InternetProtocol protocol_type;
-
- /// The endpoint type associated with the results.
- typedef typename protocol_type::endpoint endpoint_type;
-
- /// The type of a value in the results range.
- typedef basic_resolver_entry<protocol_type> value_type;
-
- /// The type of a const reference to a value in the range.
- typedef const value_type& const_reference;
-
- /// The type of a non-const reference to a value in the range.
- typedef value_type& reference;
-
- /// The type of an iterator into the range.
- typedef basic_resolver_iterator<protocol_type> const_iterator;
-
- /// The type of an iterator into the range.
- typedef const_iterator iterator;
-
- /// Type used to represent the distance between two iterators in the range.
- typedef std::ptrdiff_t difference_type;
-
- /// Type used to represent a count of the elements in the range.
- typedef std::size_t size_type;
-
- /// Default constructor creates an empty range.
- basic_resolver_results()
- {
- }
-
- /// Copy constructor.
- basic_resolver_results(const basic_resolver_results& other)
- : basic_resolver_iterator<InternetProtocol>(other)
- {
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move constructor.
- basic_resolver_results(basic_resolver_results&& other)
- : basic_resolver_iterator<InternetProtocol>(
- BOOST_ASIO_MOVE_CAST(basic_resolver_results)(other))
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Assignment operator.
- basic_resolver_results& operator=(const basic_resolver_results& other)
- {
- basic_resolver_iterator<InternetProtocol>::operator=(other);
- return *this;
- }
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Move-assignment operator.
- basic_resolver_results& operator=(basic_resolver_results&& other)
- {
- basic_resolver_iterator<InternetProtocol>::operator=(
- BOOST_ASIO_MOVE_CAST(basic_resolver_results)(other));
- return *this;
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-#if !defined(GENERATING_DOCUMENTATION)
- // Create results from an addrinfo list returned by getaddrinfo.
- static basic_resolver_results create(
- boost::asio::detail::addrinfo_type* address_info,
- const std::string& host_name, const std::string& service_name)
- {
- basic_resolver_results results;
- if (!address_info)
- return results;
-
- std::string actual_host_name = host_name;
- if (address_info->ai_canonname)
- actual_host_name = address_info->ai_canonname;
-
- results.values_.reset(new values_type);
-
- while (address_info)
- {
- if (address_info->ai_family == BOOST_ASIO_OS_DEF(AF_INET)
- || address_info->ai_family == BOOST_ASIO_OS_DEF(AF_INET6))
- {
- using namespace std; // For memcpy.
- typename InternetProtocol::endpoint endpoint;
- endpoint.resize(static_cast<std::size_t>(address_info->ai_addrlen));
- memcpy(endpoint.data(), address_info->ai_addr,
- address_info->ai_addrlen);
- results.values_->push_back(
- basic_resolver_entry<InternetProtocol>(endpoint,
- actual_host_name, service_name));
- }
- address_info = address_info->ai_next;
- }
-
- return results;
- }
-
- // Create results from an endpoint, host name and service name.
- static basic_resolver_results create(const endpoint_type& endpoint,
- const std::string& host_name, const std::string& service_name)
- {
- basic_resolver_results results;
- results.values_.reset(new values_type);
- results.values_->push_back(
- basic_resolver_entry<InternetProtocol>(
- endpoint, host_name, service_name));
- return results;
- }
-
- // Create results from a sequence of endpoints, host and service name.
- template <typename EndpointIterator>
- static basic_resolver_results create(
- EndpointIterator begin, EndpointIterator end,
- const std::string& host_name, const std::string& service_name)
- {
- basic_resolver_results results;
- if (begin != end)
- {
- results.values_.reset(new values_type);
- for (EndpointIterator ep_iter = begin; ep_iter != end; ++ep_iter)
- {
- results.values_->push_back(
- basic_resolver_entry<InternetProtocol>(
- *ep_iter, host_name, service_name));
- }
- }
- return results;
- }
-
-# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
- // Create results from a Windows Runtime list of EndpointPair objects.
- static basic_resolver_results create(
- Windows::Foundation::Collections::IVectorView<
- Windows::Networking::EndpointPair^>^ endpoints,
- const boost::asio::detail::addrinfo_type& hints,
- const std::string& host_name, const std::string& service_name)
- {
- basic_resolver_results results;
- if (endpoints->Size)
- {
- results.values_.reset(new values_type);
- for (unsigned int i = 0; i < endpoints->Size; ++i)
- {
- auto pair = endpoints->GetAt(i);
-
- if (hints.ai_family == BOOST_ASIO_OS_DEF(AF_INET)
- && pair->RemoteHostName->Type
- != Windows::Networking::HostNameType::Ipv4)
- continue;
-
- if (hints.ai_family == BOOST_ASIO_OS_DEF(AF_INET6)
- && pair->RemoteHostName->Type
- != Windows::Networking::HostNameType::Ipv6)
- continue;
-
- results.values_->push_back(
- basic_resolver_entry<InternetProtocol>(
- typename InternetProtocol::endpoint(
- ip::make_address(
- boost::asio::detail::winrt_utils::string(
- pair->RemoteHostName->CanonicalName)),
- boost::asio::detail::winrt_utils::integer(
- pair->RemoteServiceName)),
- host_name, service_name));
- }
- }
- return results;
- }
-# endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
-#endif // !defined(GENERATING_DOCUMENTATION)
-
- /// Get the number of entries in the results range.
- size_type size() const BOOST_ASIO_NOEXCEPT
- {
- return this->values_->size();
- }
-
- /// Get the maximum number of entries permitted in a results range.
- size_type max_size() const BOOST_ASIO_NOEXCEPT
- {
- return this->values_->max_size();
- }
-
- /// Determine whether the results range is empty.
- bool empty() const BOOST_ASIO_NOEXCEPT
- {
- return this->values_->empty();
- }
-
- /// Obtain a begin iterator for the results range.
- const_iterator begin() const
- {
- basic_resolver_results tmp(*this);
- tmp.index_ = 0;
- return tmp;
- }
-
- /// Obtain an end iterator for the results range.
- const_iterator end() const
- {
- return const_iterator();
- }
-
- /// Obtain a begin iterator for the results range.
- const_iterator cbegin() const
- {
- return begin();
- }
-
- /// Obtain an end iterator for the results range.
- const_iterator cend() const
- {
- return end();
- }
-
- /// Swap the results range with another.
- void swap(basic_resolver_results& that) BOOST_ASIO_NOEXCEPT
- {
- if (this != &that)
- {
- this->values_.swap(that.values_);
- std::size_t index = this->index_;
- this->index_ = that.index_;
- that.index_ = index;
- }
- }
-
- /// Test two iterators for equality.
- friend bool operator==(const basic_resolver_results& a,
- const basic_resolver_results& b)
- {
- return a.equal(b);
- }
-
- /// Test two iterators for inequality.
- friend bool operator!=(const basic_resolver_results& a,
- const basic_resolver_results& b)
- {
- return !a.equal(b);
- }
-
-private:
- typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
-};
-
-} // namespace ip
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_IP_BASIC_RESOLVER_RESULTS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/packaged_task.hpp b/src/third_party/boost-1.68.0/boost/asio/packaged_task.hpp
deleted file mode 100644
index da6c5aeaa82..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/packaged_task.hpp
+++ /dev/null
@@ -1,128 +0,0 @@
-//
-// packaged_task.hpp
-// ~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_PACKAGED_TASK_HPP
-#define BOOST_ASIO_PACKAGED_TASK_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#if defined(BOOST_ASIO_HAS_STD_FUTURE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <future>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/detail/variadic_templates.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Partial specialisation of @c async_result for @c std::packaged_task.
-template <typename Result, typename... Args, typename Signature>
-class async_result<std::packaged_task<Result(Args...)>, Signature>
-{
-public:
- /// The packaged task is the concrete completion handler type.
- typedef std::packaged_task<Result(Args...)> completion_handler_type;
-
- /// The return type of the initiating function is the future obtained from
- /// the packaged task.
- typedef std::future<Result> return_type;
-
- /// The constructor extracts the future from the packaged task.
- explicit async_result(completion_handler_type& h)
- : future_(h.get_future())
- {
- }
-
- /// Returns the packaged task's future.
- return_type get()
- {
- return std::move(future_);
- }
-
-private:
- return_type future_;
-};
-
-#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-template <typename Result, typename Signature>
-struct async_result<std::packaged_task<Result()>, Signature>
-{
- typedef std::packaged_task<Result()> completion_handler_type;
- typedef std::future<Result> return_type;
-
- explicit async_result(completion_handler_type& h)
- : future_(h.get_future())
- {
- }
-
- return_type get()
- {
- return std::move(future_);
- }
-
-private:
- return_type future_;
-};
-
-#define BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
- template <typename Result, \
- BOOST_ASIO_VARIADIC_TPARAMS(n), typename Signature> \
- class async_result< \
- std::packaged_task<Result(BOOST_ASIO_VARIADIC_TARGS(n))>, Signature> \
- { \
- public: \
- typedef std::packaged_task< \
- Result(BOOST_ASIO_VARIADIC_TARGS(n))> \
- completion_handler_type; \
- \
- typedef std::future<Result> return_type; \
- \
- explicit async_result(completion_handler_type& h) \
- : future_(h.get_future()) \
- { \
- } \
- \
- return_type get() \
- { \
- return std::move(future_); \
- } \
- \
- private: \
- return_type future_; \
- }; \
- /**/
- BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF)
-#undef BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF
-
-#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
- // || defined(GENERATING_DOCUMENTATION)
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_STD_FUTURE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_PACKAGED_TASK_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/read.hpp b/src/third_party/boost-1.68.0/boost/asio/read.hpp
deleted file mode 100644
index cffc8477698..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/read.hpp
+++ /dev/null
@@ -1,949 +0,0 @@
-//
-// read.hpp
-// ~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_READ_HPP
-#define BOOST_ASIO_READ_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/error.hpp>
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-# include <boost/asio/basic_streambuf_fwd.hpp>
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/**
- * @defgroup read boost::asio::read
- *
- * @brief Attempt to read a certain amount of data from a stream before
- * returning.
- */
-/*@{*/
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * stream.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::read(s, boost::asio::buffer(data, size)); @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read(
- * s, buffers,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncReadStream, typename MutableBufferSequence>
-std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * stream.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::read(s, boost::asio::buffer(data, size), ec); @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read(
- * s, buffers,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncReadStream, typename MutableBufferSequence>
-std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- boost::system::error_code& ec,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * stream.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's read_some function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::read(s, boost::asio::buffer(data, size),
- * boost::asio::transfer_at_least(32)); @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename SyncReadStream, typename MutableBufferSequence,
- typename CompletionCondition>
-std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * stream.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's read_some function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncReadStream, typename MutableBufferSequence,
- typename CompletionCondition>
-std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The specified dynamic buffer sequence is full (that is, it has reached
- * maximum size).
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read(
- * s, buffers,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffer is full (that is, it has reached maximum size).
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read(
- * s, buffers,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- boost::system::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The specified dynamic buffer sequence is full (that is, it has reached
- * maximum size).
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's read_some function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
-template <typename SyncReadStream, typename DynamicBuffer,
- typename CompletionCondition>
-std::size_t read(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The specified dynamic buffer sequence is full (that is, it has reached
- * maximum size).
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's read_some function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncReadStream, typename DynamicBuffer,
- typename CompletionCondition>
-std::size_t read(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffer is full (that is, it has reached maximum size).
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b The basic_streambuf object into which the data will be read.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read(
- * s, b,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncReadStream, typename Allocator>
-std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffer is full (that is, it has reached maximum size).
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b The basic_streambuf object into which the data will be read.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read(
- * s, b,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncReadStream, typename Allocator>
-std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
- boost::system::error_code& ec);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffer is full (that is, it has reached maximum size).
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b The basic_streambuf object into which the data will be read.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's read_some function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
-template <typename SyncReadStream, typename Allocator,
- typename CompletionCondition>
-std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition);
-
-/// Attempt to read a certain amount of data from a stream before returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * stream. The call will block until one of the following conditions is true:
- *
- * @li The supplied buffer is full (that is, it has reached maximum size).
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b The basic_streambuf object into which the data will be read.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's read_some function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncReadStream, typename Allocator,
- typename CompletionCondition>
-std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-/**
- * @defgroup async_read boost::asio::async_read
- *
- * @brief Start an asynchronous operation to read a certain amount of data from
- * a stream.
- */
-/*@{*/
-
-/// Start an asynchronous operation to read a certain amount of data from a
-/// stream.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other read operations (such
- * as async_read, the stream's async_read_some function, or any other composed
- * operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * stream. Although the buffers object may be copied as necessary, ownership of
- * the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * boost::asio::async_read(s, boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::async_read(
- * s, buffers,
- * boost::asio::transfer_all(),
- * handler); @endcode
- */
-template <typename AsyncReadStream, typename MutableBufferSequence,
- typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
-
-/// Start an asynchronous operation to read a certain amount of data from a
-/// stream.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * stream. Although the buffers object may be copied as necessary, ownership of
- * the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's async_read_some function.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::async_read(s,
- * boost::asio::buffer(data, size),
- * boost::asio::transfer_at_least(32),
- * handler); @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename AsyncReadStream, typename MutableBufferSequence,
- typename CompletionCondition, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
- is_mutable_buffer_sequence<MutableBufferSequence>::value
- >::type* = 0);
-
-/// Start an asynchronous operation to read a certain amount of data from a
-/// stream.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
- *
- * @li The specified dynamic buffer sequence is full (that is, it has reached
- * maximum size).
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other read operations (such
- * as async_read, the stream's async_read_some function, or any other composed
- * operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::async_read(
- * s, buffers,
- * boost::asio::transfer_all(),
- * handler); @endcode
- */
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-/// Start an asynchronous operation to read a certain amount of data from a
-/// stream.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
- *
- * @li The specified dynamic buffer sequence is full (that is, it has reached
- * maximum size).
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other read operations (such
- * as async_read, the stream's async_read_some function, or any other composed
- * operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's async_read_some function.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename CompletionCondition, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Start an asynchronous operation to read a certain amount of data from a
-/// stream.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
- *
- * @li The supplied buffer is full (that is, it has reached maximum size).
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other read operations (such
- * as async_read, the stream's async_read_some function, or any other composed
- * operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param b A basic_streambuf object into which the data will be read. Ownership
- * of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::async_read(
- * s, b,
- * boost::asio::transfer_all(),
- * handler); @endcode
- */
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-/// Start an asynchronous operation to read a certain amount of data from a
-/// stream.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions is
- * true:
- *
- * @li The supplied buffer is full (that is, it has reached maximum size).
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other read operations (such
- * as async_read, the stream's async_read_some function, or any other composed
- * operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param b A basic_streambuf object into which the data will be read. Ownership
- * of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_read_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the stream's async_read_some function.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes copied into the
- * // buffers. If an error occurred,
- * // this will be the number of
- * // bytes successfully transferred
- * // prior to the error.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncReadStream, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/read.hpp>
-
-#endif // BOOST_ASIO_READ_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/read_at.hpp b/src/third_party/boost-1.68.0/boost/asio/read_at.hpp
deleted file mode 100644
index 2927ddd1ffa..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/read_at.hpp
+++ /dev/null
@@ -1,673 +0,0 @@
-//
-// read_at.hpp
-// ~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_READ_AT_HPP
-#define BOOST_ASIO_READ_AT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/cstdint.hpp>
-#include <boost/asio/error.hpp>
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-# include <boost/asio/basic_streambuf_fwd.hpp>
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/**
- * @defgroup read_at boost::asio::read_at
- *
- * @brief Attempt to read a certain amount of data at the specified offset
- * before returning.
- */
-/*@{*/
-
-/// Attempt to read a certain amount of data at the specified offset before
-/// returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * random access device at the specified offset. The call will block until one
- * of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the SyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * device.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::read_at(d, 42, boost::asio::buffer(data, size)); @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read_at(
- * d, 42, buffers,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers);
-
-/// Attempt to read a certain amount of data at the specified offset before
-/// returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * random access device at the specified offset. The call will block until one
- * of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the SyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * device.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::read_at(d, 42,
- * boost::asio::buffer(data, size), ec); @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read_at(
- * d, 42, buffers,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- boost::system::error_code& ec);
-
-/// Attempt to read a certain amount of data at the specified offset before
-/// returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * random access device at the specified offset. The call will block until one
- * of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the SyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * device.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the device's read_some_at function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::read_at(d, 42, boost::asio::buffer(data, size),
- * boost::asio::transfer_at_least(32)); @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename CompletionCondition>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition);
-
-/// Attempt to read a certain amount of data at the specified offset before
-/// returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * random access device at the specified offset. The call will block until one
- * of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the SyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * device.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the device's read_some_at function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename CompletionCondition>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Attempt to read a certain amount of data at the specified offset before
-/// returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * random access device at the specified offset. The call will block until one
- * of the following conditions is true:
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the SyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param b The basic_streambuf object into which the data will be read.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read_at(
- * d, 42, b,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncRandomAccessReadDevice, typename Allocator>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b);
-
-/// Attempt to read a certain amount of data at the specified offset before
-/// returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * random access device at the specified offset. The call will block until one
- * of the following conditions is true:
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the SyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param b The basic_streambuf object into which the data will be read.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::read_at(
- * d, 42, b,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncRandomAccessReadDevice, typename Allocator>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b,
- boost::system::error_code& ec);
-
-/// Attempt to read a certain amount of data at the specified offset before
-/// returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * random access device at the specified offset. The call will block until one
- * of the following conditions is true:
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the SyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param b The basic_streambuf object into which the data will be read.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the device's read_some_at function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
-template <typename SyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition);
-
-/// Attempt to read a certain amount of data at the specified offset before
-/// returning.
-/**
- * This function is used to read a certain number of bytes of data from a
- * random access device at the specified offset. The call will block until one
- * of the following conditions is true:
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the SyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param b The basic_streambuf object into which the data will be read.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest read_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the device's read_some_at function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition>
-std::size_t read_at(SyncRandomAccessReadDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-/**
- * @defgroup async_read_at boost::asio::async_read_at
- *
- * @brief Start an asynchronous operation to read a certain amount of data at
- * the specified offset.
- */
-/*@{*/
-
-/// Start an asynchronous operation to read a certain amount of data at the
-/// specified offset.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * async_read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the AsyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * device. Although the buffers object may be copied as necessary, ownership of
- * the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes copied into the buffers. If an error
- * // occurred, this will be the number of bytes successfully
- * // transferred prior to the error.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code
- * boost::asio::async_read_at(d, 42, boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::async_read_at(
- * d, 42, buffers,
- * boost::asio::transfer_all(),
- * handler); @endcode
- */
-template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
- const MutableBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-/// Start an asynchronous operation to read a certain amount of data at the
-/// specified offset.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
- *
- * @li The supplied buffers are full. That is, the bytes transferred is equal to
- * the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * @param d The device from which the data is to be read. The type must support
- * the AsyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param buffers One or more buffers into which the data will be read. The sum
- * of the buffer sizes indicates the maximum number of bytes to read from the
- * device. Although the buffers object may be copied as necessary, ownership of
- * the underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_read_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the device's async_read_some_at function.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes copied into the buffers. If an error
- * // occurred, this will be the number of bytes successfully
- * // transferred prior to the error.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * To read into a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::async_read_at(d, 42,
- * boost::asio::buffer(data, size),
- * boost::asio::transfer_at_least(32),
- * handler); @endcode
- * See the @ref buffer documentation for information on reading into multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
- typename CompletionCondition, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, const MutableBufferSequence& buffers,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Start an asynchronous operation to read a certain amount of data at the
-/// specified offset.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * async_read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the AsyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param b A basic_streambuf object into which the data will be read. Ownership
- * of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes copied into the buffers. If an error
- * // occurred, this will be the number of bytes successfully
- * // transferred prior to the error.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::async_read_at(
- * d, 42, b,
- * boost::asio::transfer_all(),
- * handler); @endcode
- */
-template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
- basic_streambuf<Allocator>& b, BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-/// Start an asynchronous operation to read a certain amount of data at the
-/// specified offset.
-/**
- * This function is used to asynchronously read a certain number of bytes of
- * data from a random access device at the specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * async_read_some_at function.
- *
- * @param d The device from which the data is to be read. The type must support
- * the AsyncRandomAccessReadDevice concept.
- *
- * @param offset The offset at which the data will be read.
- *
- * @param b A basic_streambuf object into which the data will be read. Ownership
- * of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the read operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_read_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the read operation is complete. A non-zero
- * return value indicates the maximum number of bytes to be read on the next
- * call to the device's async_read_some_at function.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes copied into the buffers. If an error
- * // occurred, this will be the number of bytes successfully
- * // transferred prior to the error.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncRandomAccessReadDevice, typename Allocator,
- typename CompletionCondition, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_at(AsyncRandomAccessReadDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/read_at.hpp>
-
-#endif // BOOST_ASIO_READ_AT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/read_until.hpp b/src/third_party/boost-1.68.0/boost/asio/read_until.hpp
deleted file mode 100644
index 7b66b7fe438..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/read_until.hpp
+++ /dev/null
@@ -1,1826 +0,0 @@
-//
-// read_until.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_READ_UNTIL_HPP
-#define BOOST_ASIO_READ_UNTIL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <cstddef>
-#include <string>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/regex_fwd.hpp>
-#include <boost/asio/detail/string_view.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/error.hpp>
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-# include <boost/asio/basic_streambuf_fwd.hpp>
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-namespace detail
-{
- char (&has_result_type_helper(...))[2];
-
- template <typename T>
- char has_result_type_helper(T*, typename T::result_type* = 0);
-
- template <typename T>
- struct has_result_type
- {
- enum { value = (sizeof((has_result_type_helper)((T*)(0))) == 1) };
- };
-} // namespace detail
-
-/// Type trait used to determine whether a type can be used as a match condition
-/// function with read_until and async_read_until.
-template <typename T>
-struct is_match_condition
-{
-#if defined(GENERATING_DOCUMENTATION)
- /// The value member is true if the type may be used as a match condition.
- static const bool value;
-#else
- enum
- {
- value = boost::asio::is_function<
- typename boost::asio::remove_pointer<T>::type>::value
- || detail::has_result_type<T>::value
- };
-#endif
-};
-
-/**
- * @defgroup read_until boost::asio::read_until
- *
- * @brief Read data into a dynamic buffer sequence, or into a streambuf, until
- * it contains a delimiter, matches a regular expression, or a function object
- * indicates a match.
- */
-/*@{*/
-
-/// Read data into a dynamic buffer sequence until it contains a specified
-/// delimiter.
-/**
- * This function is used to read data into the specified dynamic buffer
- * sequence until the dynamic buffer sequence's get area contains the specified
- * delimiter. The call will block until one of the following conditions is
- * true:
- *
- * @li The get area of the dynamic buffer sequence contains the specified
- * delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the dynamic buffer sequence's get area already
- * contains the delimiter, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- *
- * @param delim The delimiter character.
- *
- * @returns The number of bytes in the dynamic buffer sequence's get area up to
- * and including the delimiter.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note After a successful read_until operation, the dynamic buffer sequence
- * may contain additional data beyond the delimiter. An application will
- * typically leave that data in the dynamic buffer sequence for a subsequent
- * read_until operation to examine.
- *
- * @par Example
- * To read data into a @c std::string until a newline is encountered:
- * @code std::string data;
- * std::string n = boost::asio::read_until(s,
- * boost::asio::dynamic_buffer(data), '\n');
- * std::string line = data.substr(0, n);
- * data.erase(0, n); @endcode
- * After the @c read_until operation completes successfully, the string @c data
- * contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
- * The call to @c substr then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\n' } @endcode
- * After the call to @c erase, the remaining data is left in the buffer @c b as
- * follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c read_until operation.
- */
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim);
-
-/// Read data into a dynamic buffer sequence until it contains a specified
-/// delimiter.
-/**
- * This function is used to read data into the specified dynamic buffer
- * sequence until the dynamic buffer sequence's get area contains the specified
- * delimiter. The call will block until one of the following conditions is
- * true:
- *
- * @li The get area of the dynamic buffer sequence contains the specified
- * delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the dynamic buffer sequence's get area already
- * contains the delimiter, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- *
- * @param delim The delimiter character.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes in the dynamic buffer sequence's get area up to
- * and including the delimiter. Returns 0 if an error occurred.
- *
- * @note After a successful read_until operation, the dynamic buffer sequence
- * may contain additional data beyond the delimiter. An application will
- * typically leave that data in the dynamic buffer sequence for a subsequent
- * read_until operation to examine.
- */
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- char delim, boost::system::error_code& ec);
-
-/// Read data into a dynamic buffer sequence until it contains a specified
-/// delimiter.
-/**
- * This function is used to read data into the specified dynamic buffer
- * sequence until the dynamic buffer sequence's get area contains the specified
- * delimiter. The call will block until one of the following conditions is
- * true:
- *
- * @li The get area of the dynamic buffer sequence contains the specified
- * delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the dynamic buffer sequence's get area already
- * contains the delimiter, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- *
- * @param delim The delimiter string.
- *
- * @returns The number of bytes in the dynamic buffer sequence's get area up to
- * and including the delimiter.
- *
- * @note After a successful read_until operation, the dynamic buffer sequence
- * may contain additional data beyond the delimiter. An application will
- * typically leave that data in the dynamic buffer sequence for a subsequent
- * read_until operation to examine.
- *
- * @par Example
- * To read data into a @c std::string until a CR-LF sequence is encountered:
- * @code std::string data;
- * std::string n = boost::asio::read_until(s,
- * boost::asio::dynamic_buffer(data), "\r\n");
- * std::string line = data.substr(0, n);
- * data.erase(0, n); @endcode
- * After the @c read_until operation completes successfully, the string @c data
- * contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
- * The call to @c substr then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
- * After the call to @c erase, the remaining data is left in the buffer @c b as
- * follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c read_until operation.
- */
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- BOOST_ASIO_STRING_VIEW_PARAM delim);
-
-/// Read data into a dynamic buffer sequence until it contains a specified
-/// delimiter.
-/**
- * This function is used to read data into the specified dynamic buffer
- * sequence until the dynamic buffer sequence's get area contains the specified
- * delimiter. The call will block until one of the following conditions is
- * true:
- *
- * @li The get area of the dynamic buffer sequence contains the specified
- * delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the dynamic buffer sequence's get area already
- * contains the delimiter, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- *
- * @param delim The delimiter string.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes in the dynamic buffer sequence's get area up to
- * and including the delimiter. Returns 0 if an error occurred.
- *
- * @note After a successful read_until operation, the dynamic buffer sequence
- * may contain additional data beyond the delimiter. An application will
- * typically leave that data in the dynamic buffer sequence for a subsequent
- * read_until operation to examine.
- */
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- BOOST_ASIO_STRING_VIEW_PARAM delim,
- boost::system::error_code& ec);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Read data into a dynamic buffer sequence until some part of the data it
-/// contains matches a regular expression.
-/**
- * This function is used to read data into the specified dynamic buffer
- * sequence until the dynamic buffer sequence's get area contains some data
- * that matches a regular expression. The call will block until one of the
- * following conditions is true:
- *
- * @li A substring of the dynamic buffer sequence's get area matches the
- * regular expression.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the dynamic buffer sequence's get area already
- * contains data that matches the regular expression, the function returns
- * immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers A dynamic buffer sequence into which the data will be read.
- *
- * @param expr The regular expression.
- *
- * @returns The number of bytes in the dynamic buffer sequence's get area up to
- * and including the substring that matches the regular expression.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note After a successful read_until operation, the dynamic buffer sequence
- * may contain additional data beyond that which matched the regular
- * expression. An application will typically leave that data in the dynamic
- * buffer sequence for a subsequent read_until operation to examine.
- *
- * @par Example
- * To read data into a @c std::string until a CR-LF sequence is encountered:
- * @code std::string data;
- * std::string n = boost::asio::read_until(s,
- * boost::asio::dynamic_buffer(data), boost::regex("\r\n"));
- * std::string line = data.substr(0, n);
- * data.erase(0, n); @endcode
- * After the @c read_until operation completes successfully, the string @c data
- * contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
- * The call to @c substr then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
- * After the call to @c erase, the remaining data is left in the buffer @c b as
- * follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c read_until operation.
- */
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr);
-
-/// Read data into a dynamic buffer sequence until some part of the data it
-/// contains matches a regular expression.
-/**
- * This function is used to read data into the specified dynamic buffer
- * sequence until the dynamic buffer sequence's get area contains some data
- * that matches a regular expression. The call will block until one of the
- * following conditions is true:
- *
- * @li A substring of the dynamic buffer sequence's get area matches the
- * regular expression.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the dynamic buffer sequence's get area already
- * contains data that matches the regular expression, the function returns
- * immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers A dynamic buffer sequence into which the data will be read.
- *
- * @param expr The regular expression.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes in the dynamic buffer sequence's get area up to
- * and including the substring that matches the regular expression. Returns 0
- * if an error occurred.
- *
- * @note After a successful read_until operation, the dynamic buffer sequence
- * may contain additional data beyond that which matched the regular
- * expression. An application will typically leave that data in the dynamic
- * buffer sequence for a subsequent read_until operation to examine.
- */
-template <typename SyncReadStream, typename DynamicBuffer>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr, boost::system::error_code& ec);
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
- // || defined(GENERATING_DOCUMENTATION)
-
-/// Read data into a dynamic buffer sequence until a function object indicates a
-/// match.
-
-/**
- * This function is used to read data into the specified dynamic buffer
- * sequence until a user-defined match condition function object, when applied
- * to the data contained in the dynamic buffer sequence, indicates a successful
- * match. The call will block until one of the following conditions is true:
- *
- * @li The match condition function object returns a std::pair where the second
- * element evaluates to true.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the match condition function object already indicates
- * a match, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers A dynamic buffer sequence into which the data will be read.
- *
- * @param match_condition The function object to be called to determine whether
- * a match exists. The signature of the function object must be:
- * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
- * @endcode
- * where @c iterator represents the type:
- * @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
- * @endcode
- * The iterator parameters @c begin and @c end define the range of bytes to be
- * scanned to determine whether there is a match. The @c first member of the
- * return value is an iterator marking one-past-the-end of the bytes that have
- * been consumed by the match function. This iterator is used to calculate the
- * @c begin parameter for any subsequent invocation of the match condition. The
- * @c second member of the return value is true if a match has been found, false
- * otherwise.
- *
- * @returns The number of bytes in the dynamic_buffer's get area that
- * have been fully consumed by the match function.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note After a successful read_until operation, the dynamic buffer sequence
- * may contain additional data beyond that which matched the function object.
- * An application will typically leave that data in the dynamic buffer sequence
- * for a subsequent read_until operation to examine.
-
- * @note The default implementation of the @c is_match_condition type trait
- * evaluates to true for function pointers and function objects with a
- * @c result_type typedef. It must be specialised for other user-defined
- * function objects.
- *
- * @par Examples
- * To read data into a dynamic buffer sequence until whitespace is encountered:
- * @code typedef boost::asio::buffers_iterator<
- * boost::asio::const_buffers_1> iterator;
- *
- * std::pair<iterator, bool>
- * match_whitespace(iterator begin, iterator end)
- * {
- * iterator i = begin;
- * while (i != end)
- * if (std::isspace(*i++))
- * return std::make_pair(i, true);
- * return std::make_pair(i, false);
- * }
- * ...
- * std::string data;
- * boost::asio::read_until(s, data, match_whitespace);
- * @endcode
- *
- * To read data into a @c std::string until a matching character is found:
- * @code class match_char
- * {
- * public:
- * explicit match_char(char c) : c_(c) {}
- *
- * template <typename Iterator>
- * std::pair<Iterator, bool> operator()(
- * Iterator begin, Iterator end) const
- * {
- * Iterator i = begin;
- * while (i != end)
- * if (c_ == *i++)
- * return std::make_pair(i, true);
- * return std::make_pair(i, false);
- * }
- *
- * private:
- * char c_;
- * };
- *
- * namespace asio {
- * template <> struct is_match_condition<match_char>
- * : public boost::true_type {};
- * } // namespace asio
- * ...
- * std::string data;
- * boost::asio::read_until(s, data, match_char('a'));
- * @endcode
- */
-template <typename SyncReadStream,
- typename DynamicBuffer, typename MatchCondition>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- MatchCondition match_condition,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
-
-/// Read data into a dynamic buffer sequence until a function object indicates a
-/// match.
-/**
- * This function is used to read data into the specified dynamic buffer
- * sequence until a user-defined match condition function object, when applied
- * to the data contained in the dynamic buffer sequence, indicates a successful
- * match. The call will block until one of the following conditions is true:
- *
- * @li The match condition function object returns a std::pair where the second
- * element evaluates to true.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the match condition function object already indicates
- * a match, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param buffers A dynamic buffer sequence into which the data will be read.
- *
- * @param match_condition The function object to be called to determine whether
- * a match exists. The signature of the function object must be:
- * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
- * @endcode
- * where @c iterator represents the type:
- * @code buffers_iterator<DynamicBuffer::const_buffers_type>
- * @endcode
- * The iterator parameters @c begin and @c end define the range of bytes to be
- * scanned to determine whether there is a match. The @c first member of the
- * return value is an iterator marking one-past-the-end of the bytes that have
- * been consumed by the match function. This iterator is used to calculate the
- * @c begin parameter for any subsequent invocation of the match condition. The
- * @c second member of the return value is true if a match has been found, false
- * otherwise.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes in the dynamic buffer sequence's get area that
- * have been fully consumed by the match function. Returns 0 if an error
- * occurred.
- *
- * @note After a successful read_until operation, the dynamic buffer sequence
- * may contain additional data beyond that which matched the function object.
- * An application will typically leave that data in the dynamic buffer sequence
- * for a subsequent read_until operation to examine.
- *
- * @note The default implementation of the @c is_match_condition type trait
- * evaluates to true for function pointers and function objects with a
- * @c result_type typedef. It must be specialised for other user-defined
- * function objects.
- */
-template <typename SyncReadStream,
- typename DynamicBuffer, typename MatchCondition>
-std::size_t read_until(SyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- MatchCondition match_condition, boost::system::error_code& ec,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Read data into a streambuf until it contains a specified delimiter.
-/**
- * This function is used to read data into the specified streambuf until the
- * streambuf's get area contains the specified delimiter. The call will block
- * until one of the following conditions is true:
- *
- * @li The get area of the streambuf contains the specified delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the streambuf's get area already contains the
- * delimiter, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param delim The delimiter character.
- *
- * @returns The number of bytes in the streambuf's get area up to and including
- * the delimiter.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note After a successful read_until operation, the streambuf may contain
- * additional data beyond the delimiter. An application will typically leave
- * that data in the streambuf for a subsequent read_until operation to examine.
- *
- * @par Example
- * To read data into a streambuf until a newline is encountered:
- * @code boost::asio::streambuf b;
- * boost::asio::read_until(s, b, '\n');
- * std::istream is(&b);
- * std::string line;
- * std::getline(is, line); @endcode
- * After the @c read_until operation completes successfully, the buffer @c b
- * contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
- * The call to @c std::getline then extracts the data up to and including the
- * newline (which is discarded), so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c' } @endcode
- * The remaining data is left in the buffer @c b as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c read_until operation.
- */
-template <typename SyncReadStream, typename Allocator>
-std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, char delim);
-
-/// Read data into a streambuf until it contains a specified delimiter.
-/**
- * This function is used to read data into the specified streambuf until the
- * streambuf's get area contains the specified delimiter. The call will block
- * until one of the following conditions is true:
- *
- * @li The get area of the streambuf contains the specified delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the streambuf's get area already contains the
- * delimiter, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param delim The delimiter character.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes in the streambuf's get area up to and including
- * the delimiter. Returns 0 if an error occurred.
- *
- * @note After a successful read_until operation, the streambuf may contain
- * additional data beyond the delimiter. An application will typically leave
- * that data in the streambuf for a subsequent read_until operation to examine.
- */
-template <typename SyncReadStream, typename Allocator>
-std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, char delim,
- boost::system::error_code& ec);
-
-/// Read data into a streambuf until it contains a specified delimiter.
-/**
- * This function is used to read data into the specified streambuf until the
- * streambuf's get area contains the specified delimiter. The call will block
- * until one of the following conditions is true:
- *
- * @li The get area of the streambuf contains the specified delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the streambuf's get area already contains the
- * delimiter, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param delim The delimiter string.
- *
- * @returns The number of bytes in the streambuf's get area up to and including
- * the delimiter.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note After a successful read_until operation, the streambuf may contain
- * additional data beyond the delimiter. An application will typically leave
- * that data in the streambuf for a subsequent read_until operation to examine.
- *
- * @par Example
- * To read data into a streambuf until a newline is encountered:
- * @code boost::asio::streambuf b;
- * boost::asio::read_until(s, b, "\r\n");
- * std::istream is(&b);
- * std::string line;
- * std::getline(is, line); @endcode
- * After the @c read_until operation completes successfully, the buffer @c b
- * contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
- * The call to @c std::getline then extracts the data up to and including the
- * newline (which is discarded), so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r' } @endcode
- * The remaining data is left in the buffer @c b as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c read_until operation.
- */
-template <typename SyncReadStream, typename Allocator>
-std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- BOOST_ASIO_STRING_VIEW_PARAM delim);
-
-/// Read data into a streambuf until it contains a specified delimiter.
-/**
- * This function is used to read data into the specified streambuf until the
- * streambuf's get area contains the specified delimiter. The call will block
- * until one of the following conditions is true:
- *
- * @li The get area of the streambuf contains the specified delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the streambuf's get area already contains the
- * delimiter, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param delim The delimiter string.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes in the streambuf's get area up to and including
- * the delimiter. Returns 0 if an error occurred.
- *
- * @note After a successful read_until operation, the streambuf may contain
- * additional data beyond the delimiter. An application will typically leave
- * that data in the streambuf for a subsequent read_until operation to examine.
- */
-template <typename SyncReadStream, typename Allocator>
-std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec);
-
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Read data into a streambuf until some part of the data it contains matches
-/// a regular expression.
-/**
- * This function is used to read data into the specified streambuf until the
- * streambuf's get area contains some data that matches a regular expression.
- * The call will block until one of the following conditions is true:
- *
- * @li A substring of the streambuf's get area matches the regular expression.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the streambuf's get area already contains data that
- * matches the regular expression, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param expr The regular expression.
- *
- * @returns The number of bytes in the streambuf's get area up to and including
- * the substring that matches the regular expression.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note After a successful read_until operation, the streambuf may contain
- * additional data beyond that which matched the regular expression. An
- * application will typically leave that data in the streambuf for a subsequent
- * read_until operation to examine.
- *
- * @par Example
- * To read data into a streambuf until a CR-LF sequence is encountered:
- * @code boost::asio::streambuf b;
- * boost::asio::read_until(s, b, boost::regex("\r\n"));
- * std::istream is(&b);
- * std::string line;
- * std::getline(is, line); @endcode
- * After the @c read_until operation completes successfully, the buffer @c b
- * contains the data which matched the regular expression:
- * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
- * The call to @c std::getline then extracts the data up to and including the
- * newline (which is discarded), so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r' } @endcode
- * The remaining data is left in the buffer @c b as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c read_until operation.
- */
-template <typename SyncReadStream, typename Allocator>
-std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr);
-
-/// Read data into a streambuf until some part of the data it contains matches
-/// a regular expression.
-/**
- * This function is used to read data into the specified streambuf until the
- * streambuf's get area contains some data that matches a regular expression.
- * The call will block until one of the following conditions is true:
- *
- * @li A substring of the streambuf's get area matches the regular expression.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the streambuf's get area already contains data that
- * matches the regular expression, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param expr The regular expression.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes in the streambuf's get area up to and including
- * the substring that matches the regular expression. Returns 0 if an error
- * occurred.
- *
- * @note After a successful read_until operation, the streambuf may contain
- * additional data beyond that which matched the regular expression. An
- * application will typically leave that data in the streambuf for a subsequent
- * read_until operation to examine.
- */
-template <typename SyncReadStream, typename Allocator>
-std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
- boost::system::error_code& ec);
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
- // || defined(GENERATING_DOCUMENTATION)
-
-/// Read data into a streambuf until a function object indicates a match.
-/**
- * This function is used to read data into the specified streambuf until a
- * user-defined match condition function object, when applied to the data
- * contained in the streambuf, indicates a successful match. The call will
- * block until one of the following conditions is true:
- *
- * @li The match condition function object returns a std::pair where the second
- * element evaluates to true.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the match condition function object already indicates
- * a match, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param match_condition The function object to be called to determine whether
- * a match exists. The signature of the function object must be:
- * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
- * @endcode
- * where @c iterator represents the type:
- * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
- * @endcode
- * The iterator parameters @c begin and @c end define the range of bytes to be
- * scanned to determine whether there is a match. The @c first member of the
- * return value is an iterator marking one-past-the-end of the bytes that have
- * been consumed by the match function. This iterator is used to calculate the
- * @c begin parameter for any subsequent invocation of the match condition. The
- * @c second member of the return value is true if a match has been found, false
- * otherwise.
- *
- * @returns The number of bytes in the streambuf's get area that have been fully
- * consumed by the match function.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note After a successful read_until operation, the streambuf may contain
- * additional data beyond that which matched the function object. An application
- * will typically leave that data in the streambuf for a subsequent read_until
- * operation to examine.
- *
- * @note The default implementation of the @c is_match_condition type trait
- * evaluates to true for function pointers and function objects with a
- * @c result_type typedef. It must be specialised for other user-defined
- * function objects.
- *
- * @par Examples
- * To read data into a streambuf until whitespace is encountered:
- * @code typedef boost::asio::buffers_iterator<
- * boost::asio::streambuf::const_buffers_type> iterator;
- *
- * std::pair<iterator, bool>
- * match_whitespace(iterator begin, iterator end)
- * {
- * iterator i = begin;
- * while (i != end)
- * if (std::isspace(*i++))
- * return std::make_pair(i, true);
- * return std::make_pair(i, false);
- * }
- * ...
- * boost::asio::streambuf b;
- * boost::asio::read_until(s, b, match_whitespace);
- * @endcode
- *
- * To read data into a streambuf until a matching character is found:
- * @code class match_char
- * {
- * public:
- * explicit match_char(char c) : c_(c) {}
- *
- * template <typename Iterator>
- * std::pair<Iterator, bool> operator()(
- * Iterator begin, Iterator end) const
- * {
- * Iterator i = begin;
- * while (i != end)
- * if (c_ == *i++)
- * return std::make_pair(i, true);
- * return std::make_pair(i, false);
- * }
- *
- * private:
- * char c_;
- * };
- *
- * namespace asio {
- * template <> struct is_match_condition<match_char>
- * : public boost::true_type {};
- * } // namespace asio
- * ...
- * boost::asio::streambuf b;
- * boost::asio::read_until(s, b, match_char('a'));
- * @endcode
- */
-template <typename SyncReadStream, typename Allocator, typename MatchCondition>
-std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
-
-/// Read data into a streambuf until a function object indicates a match.
-/**
- * This function is used to read data into the specified streambuf until a
- * user-defined match condition function object, when applied to the data
- * contained in the streambuf, indicates a successful match. The call will
- * block until one of the following conditions is true:
- *
- * @li The match condition function object returns a std::pair where the second
- * element evaluates to true.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * read_some function. If the match condition function object already indicates
- * a match, the function returns immediately.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the SyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param match_condition The function object to be called to determine whether
- * a match exists. The signature of the function object must be:
- * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
- * @endcode
- * where @c iterator represents the type:
- * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
- * @endcode
- * The iterator parameters @c begin and @c end define the range of bytes to be
- * scanned to determine whether there is a match. The @c first member of the
- * return value is an iterator marking one-past-the-end of the bytes that have
- * been consumed by the match function. This iterator is used to calculate the
- * @c begin parameter for any subsequent invocation of the match condition. The
- * @c second member of the return value is true if a match has been found, false
- * otherwise.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes in the streambuf's get area that have been fully
- * consumed by the match function. Returns 0 if an error occurred.
- *
- * @note After a successful read_until operation, the streambuf may contain
- * additional data beyond that which matched the function object. An application
- * will typically leave that data in the streambuf for a subsequent read_until
- * operation to examine.
- *
- * @note The default implementation of the @c is_match_condition type trait
- * evaluates to true for function pointers and function objects with a
- * @c result_type typedef. It must be specialised for other user-defined
- * function objects.
- */
-template <typename SyncReadStream, typename Allocator, typename MatchCondition>
-std::size_t read_until(SyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- MatchCondition match_condition, boost::system::error_code& ec,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-/**
- * @defgroup async_read_until boost::asio::async_read_until
- *
- * @brief Start an asynchronous operation to read data into a dynamic buffer
- * sequence, or into a streambuf, until it contains a delimiter, matches a
- * regular expression, or a function object indicates a match.
- */
-/*@{*/
-
-/// Start an asynchronous operation to read data into a dynamic buffer sequence
-/// until it contains a specified delimiter.
-/**
- * This function is used to asynchronously read data into the specified dynamic
- * buffer sequence until the dynamic buffer sequence's get area contains the
- * specified delimiter. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li The get area of the dynamic buffer sequence contains the specified
- * delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. If
- * the dynamic buffer sequence's get area already contains the delimiter, this
- * asynchronous operation completes immediately. The program must ensure that
- * the stream performs no other read operations (such as async_read,
- * async_read_until, the stream's async_read_some function, or any other
- * composed operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param delim The delimiter character.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // The number of bytes in the dynamic buffer sequence's
- * // get area up to and including the delimiter.
- * // 0 if an error occurred.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note After a successful async_read_until operation, the dynamic buffer
- * sequence may contain additional data beyond the delimiter. An application
- * will typically leave that data in the dynamic buffer sequence for a
- * subsequent async_read_until operation to examine.
- *
- * @par Example
- * To asynchronously read data into a @c std::string until a newline is
- * encountered:
- * @code std::string data;
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size)
- * {
- * if (!e)
- * {
- * std::string line = data.substr(0, n);
- * data.erase(0, n);
- * ...
- * }
- * }
- * ...
- * boost::asio::async_read_until(s, data, '\n', handler); @endcode
- * After the @c async_read_until operation completes successfully, the buffer
- * @c data contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
- * The call to @c substr then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\n' } @endcode
- * After the call to @c erase, the remaining data is left in the buffer @c data
- * as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c async_read_until operation.
- */
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-/// Start an asynchronous operation to read data into a dynamic buffer sequence
-/// until it contains a specified delimiter.
-/**
- * This function is used to asynchronously read data into the specified dynamic
- * buffer sequence until the dynamic buffer sequence's get area contains the
- * specified delimiter. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li The get area of the dynamic buffer sequence contains the specified
- * delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. If
- * the dynamic buffer sequence's get area already contains the delimiter, this
- * asynchronous operation completes immediately. The program must ensure that
- * the stream performs no other read operations (such as async_read,
- * async_read_until, the stream's async_read_some function, or any other
- * composed operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param delim The delimiter string.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // The number of bytes in the dynamic buffer sequence's
- * // get area up to and including the delimiter.
- * // 0 if an error occurred.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note After a successful async_read_until operation, the dynamic buffer
- * sequence may contain additional data beyond the delimiter. An application
- * will typically leave that data in the dynamic buffer sequence for a
- * subsequent async_read_until operation to examine.
- *
- * @par Example
- * To asynchronously read data into a @c std::string until a CR-LF sequence is
- * encountered:
- * @code std::string data;
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size)
- * {
- * if (!e)
- * {
- * std::string line = data.substr(0, n);
- * data.erase(0, n);
- * ...
- * }
- * }
- * ...
- * boost::asio::async_read_until(s, data, "\r\n", handler); @endcode
- * After the @c async_read_until operation completes successfully, the string
- * @c data contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
- * The call to @c substr then extracts the data up to and including the
- * delimiter, so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
- * After the call to @c erase, the remaining data is left in the string @c data
- * as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c async_read_until operation.
- */
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- BOOST_ASIO_STRING_VIEW_PARAM delim,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Start an asynchronous operation to read data into a dynamic buffer sequence
-/// until some part of its data matches a regular expression.
-/**
- * This function is used to asynchronously read data into the specified dynamic
- * buffer sequence until the dynamic buffer sequence's get area contains some
- * data that matches a regular expression. The function call always returns
- * immediately. The asynchronous operation will continue until one of the
- * following conditions is true:
- *
- * @li A substring of the dynamic buffer sequence's get area matches the regular
- * expression.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. If
- * the dynamic buffer sequence's get area already contains data that matches
- * the regular expression, this asynchronous operation completes immediately.
- * The program must ensure that the stream performs no other read operations
- * (such as async_read, async_read_until, the stream's async_read_some
- * function, or any other composed operations that perform reads) until this
- * operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param expr The regular expression.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // The number of bytes in the dynamic buffer
- * // sequence's get area up to and including the
- * // substring that matches the regular expression.
- * // 0 if an error occurred.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note After a successful async_read_until operation, the dynamic buffer
- * sequence may contain additional data beyond that which matched the regular
- * expression. An application will typically leave that data in the dynamic
- * buffer sequence for a subsequent async_read_until operation to examine.
- *
- * @par Example
- * To asynchronously read data into a @c std::string until a CR-LF sequence is
- * encountered:
- * @code std::string data;
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size)
- * {
- * if (!e)
- * {
- * std::string line = data.substr(0, n);
- * data.erase(0, n);
- * ...
- * }
- * }
- * ...
- * boost::asio::async_read_until(s, data,
- * boost::regex("\r\n"), handler); @endcode
- * After the @c async_read_until operation completes successfully, the string
- * @c data contains the data which matched the regular expression:
- * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
- * The call to @c substr then extracts the data up to and including the match,
- * so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
- * After the call to @c erase, the remaining data is left in the string @c data
- * as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c async_read_until operation.
- */
-template <typename AsyncReadStream,
- typename DynamicBuffer, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- const boost::regex& expr,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
- // || defined(GENERATING_DOCUMENTATION)
-
-/// Start an asynchronous operation to read data into a dynamic buffer sequence
-/// until a function object indicates a match.
-/**
- * This function is used to asynchronously read data into the specified dynamic
- * buffer sequence until a user-defined match condition function object, when
- * applied to the data contained in the dynamic buffer sequence, indicates a
- * successful match. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li The match condition function object returns a std::pair where the second
- * element evaluates to true.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. If
- * the match condition function object already indicates a match, this
- * asynchronous operation completes immediately. The program must ensure that
- * the stream performs no other read operations (such as async_read,
- * async_read_until, the stream's async_read_some function, or any other
- * composed operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param buffers The dynamic buffer sequence into which the data will be read.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param match_condition The function object to be called to determine whether
- * a match exists. The signature of the function object must be:
- * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
- * @endcode
- * where @c iterator represents the type:
- * @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
- * @endcode
- * The iterator parameters @c begin and @c end define the range of bytes to be
- * scanned to determine whether there is a match. The @c first member of the
- * return value is an iterator marking one-past-the-end of the bytes that have
- * been consumed by the match function. This iterator is used to calculate the
- * @c begin parameter for any subsequent invocation of the match condition. The
- * @c second member of the return value is true if a match has been found, false
- * otherwise.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // The number of bytes in the dynamic buffer sequence's
- * // get area that have been fully consumed by the match
- * // function. O if an error occurred.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note After a successful async_read_until operation, the dynamic buffer
- * sequence may contain additional data beyond that which matched the function
- * object. An application will typically leave that data in the dynamic buffer
- * sequence for a subsequent async_read_until operation to examine.
- *
- * @note The default implementation of the @c is_match_condition type trait
- * evaluates to true for function pointers and function objects with a
- * @c result_type typedef. It must be specialised for other user-defined
- * function objects.
- *
- * @par Examples
- * To asynchronously read data into a @c std::string until whitespace is
- * encountered:
- * @code typedef boost::asio::buffers_iterator<
- * boost::asio::const_buffers_1> iterator;
- *
- * std::pair<iterator, bool>
- * match_whitespace(iterator begin, iterator end)
- * {
- * iterator i = begin;
- * while (i != end)
- * if (std::isspace(*i++))
- * return std::make_pair(i, true);
- * return std::make_pair(i, false);
- * }
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size);
- * ...
- * std::string data;
- * boost::asio::async_read_until(s, data, match_whitespace, handler);
- * @endcode
- *
- * To asynchronously read data into a @c std::string until a matching character
- * is found:
- * @code class match_char
- * {
- * public:
- * explicit match_char(char c) : c_(c) {}
- *
- * template <typename Iterator>
- * std::pair<Iterator, bool> operator()(
- * Iterator begin, Iterator end) const
- * {
- * Iterator i = begin;
- * while (i != end)
- * if (c_ == *i++)
- * return std::make_pair(i, true);
- * return std::make_pair(i, false);
- * }
- *
- * private:
- * char c_;
- * };
- *
- * namespace asio {
- * template <> struct is_match_condition<match_char>
- * : public boost::true_type {};
- * } // namespace asio
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size);
- * ...
- * std::string data;
- * boost::asio::async_read_until(s, data, match_char('a'), handler);
- * @endcode
- */
-template <typename AsyncReadStream, typename DynamicBuffer,
- typename MatchCondition, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Start an asynchronous operation to read data into a streambuf until it
-/// contains a specified delimiter.
-/**
- * This function is used to asynchronously read data into the specified
- * streambuf until the streambuf's get area contains the specified delimiter.
- * The function call always returns immediately. The asynchronous operation
- * will continue until one of the following conditions is true:
- *
- * @li The get area of the streambuf contains the specified delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. If
- * the streambuf's get area already contains the delimiter, this asynchronous
- * operation completes immediately. The program must ensure that the stream
- * performs no other read operations (such as async_read, async_read_until, the
- * stream's async_read_some function, or any other composed operations that
- * perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read. Ownership of
- * the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
- *
- * @param delim The delimiter character.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // The number of bytes in the streambuf's get
- * // area up to and including the delimiter.
- * // 0 if an error occurred.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note After a successful async_read_until operation, the streambuf may
- * contain additional data beyond the delimiter. An application will typically
- * leave that data in the streambuf for a subsequent async_read_until operation
- * to examine.
- *
- * @par Example
- * To asynchronously read data into a streambuf until a newline is encountered:
- * @code boost::asio::streambuf b;
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size)
- * {
- * if (!e)
- * {
- * std::istream is(&b);
- * std::string line;
- * std::getline(is, line);
- * ...
- * }
- * }
- * ...
- * boost::asio::async_read_until(s, b, '\n', handler); @endcode
- * After the @c async_read_until operation completes successfully, the buffer
- * @c b contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
- * The call to @c std::getline then extracts the data up to and including the
- * newline (which is discarded), so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c' } @endcode
- * The remaining data is left in the buffer @c b as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c async_read_until operation.
- */
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-/// Start an asynchronous operation to read data into a streambuf until it
-/// contains a specified delimiter.
-/**
- * This function is used to asynchronously read data into the specified
- * streambuf until the streambuf's get area contains the specified delimiter.
- * The function call always returns immediately. The asynchronous operation
- * will continue until one of the following conditions is true:
- *
- * @li The get area of the streambuf contains the specified delimiter.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. If
- * the streambuf's get area already contains the delimiter, this asynchronous
- * operation completes immediately. The program must ensure that the stream
- * performs no other read operations (such as async_read, async_read_until, the
- * stream's async_read_some function, or any other composed operations that
- * perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read. Ownership of
- * the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
- *
- * @param delim The delimiter string.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // The number of bytes in the streambuf's get
- * // area up to and including the delimiter.
- * // 0 if an error occurred.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note After a successful async_read_until operation, the streambuf may
- * contain additional data beyond the delimiter. An application will typically
- * leave that data in the streambuf for a subsequent async_read_until operation
- * to examine.
- *
- * @par Example
- * To asynchronously read data into a streambuf until a newline is encountered:
- * @code boost::asio::streambuf b;
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size)
- * {
- * if (!e)
- * {
- * std::istream is(&b);
- * std::string line;
- * std::getline(is, line);
- * ...
- * }
- * }
- * ...
- * boost::asio::async_read_until(s, b, "\r\n", handler); @endcode
- * After the @c async_read_until operation completes successfully, the buffer
- * @c b contains the delimiter:
- * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
- * The call to @c std::getline then extracts the data up to and including the
- * newline (which is discarded), so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r' } @endcode
- * The remaining data is left in the buffer @c b as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c async_read_until operation.
- */
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- BOOST_ASIO_STRING_VIEW_PARAM delim,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
- || defined(GENERATING_DOCUMENTATION)
-
-/// Start an asynchronous operation to read data into a streambuf until some
-/// part of its data matches a regular expression.
-/**
- * This function is used to asynchronously read data into the specified
- * streambuf until the streambuf's get area contains some data that matches a
- * regular expression. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li A substring of the streambuf's get area matches the regular expression.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. If
- * the streambuf's get area already contains data that matches the regular
- * expression, this asynchronous operation completes immediately. The program
- * must ensure that the stream performs no other read operations (such as
- * async_read, async_read_until, the stream's async_read_some function, or any
- * other composed operations that perform reads) until this operation
- * completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read. Ownership of
- * the streambuf is retained by the caller, which must guarantee that it remains
- * valid until the handler is called.
- *
- * @param expr The regular expression.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // The number of bytes in the streambuf's get
- * // area up to and including the substring
- * // that matches the regular. expression.
- * // 0 if an error occurred.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note After a successful async_read_until operation, the streambuf may
- * contain additional data beyond that which matched the regular expression. An
- * application will typically leave that data in the streambuf for a subsequent
- * async_read_until operation to examine.
- *
- * @par Example
- * To asynchronously read data into a streambuf until a CR-LF sequence is
- * encountered:
- * @code boost::asio::streambuf b;
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size)
- * {
- * if (!e)
- * {
- * std::istream is(&b);
- * std::string line;
- * std::getline(is, line);
- * ...
- * }
- * }
- * ...
- * boost::asio::async_read_until(s, b, boost::regex("\r\n"), handler); @endcode
- * After the @c async_read_until operation completes successfully, the buffer
- * @c b contains the data which matched the regular expression:
- * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
- * The call to @c std::getline then extracts the data up to and including the
- * newline (which is discarded), so that the string @c line contains:
- * @code { 'a', 'b', ..., 'c', '\r' } @endcode
- * The remaining data is left in the buffer @c b as follows:
- * @code { 'd', 'e', ... } @endcode
- * This data may be the start of a new line, to be extracted by a subsequent
- * @c async_read_until operation.
- */
-template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
-
-#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
- // || defined(GENERATING_DOCUMENTATION)
-
-/// Start an asynchronous operation to read data into a streambuf until a
-/// function object indicates a match.
-/**
- * This function is used to asynchronously read data into the specified
- * streambuf until a user-defined match condition function object, when applied
- * to the data contained in the streambuf, indicates a successful match. The
- * function call always returns immediately. The asynchronous operation will
- * continue until one of the following conditions is true:
- *
- * @li The match condition function object returns a std::pair where the second
- * element evaluates to true.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_read_some function, and is known as a <em>composed operation</em>. If
- * the match condition function object already indicates a match, this
- * asynchronous operation completes immediately. The program must ensure that
- * the stream performs no other read operations (such as async_read,
- * async_read_until, the stream's async_read_some function, or any other
- * composed operations that perform reads) until this operation completes.
- *
- * @param s The stream from which the data is to be read. The type must support
- * the AsyncReadStream concept.
- *
- * @param b A streambuf object into which the data will be read.
- *
- * @param match_condition The function object to be called to determine whether
- * a match exists. The signature of the function object must be:
- * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
- * @endcode
- * where @c iterator represents the type:
- * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
- * @endcode
- * The iterator parameters @c begin and @c end define the range of bytes to be
- * scanned to determine whether there is a match. The @c first member of the
- * return value is an iterator marking one-past-the-end of the bytes that have
- * been consumed by the match function. This iterator is used to calculate the
- * @c begin parameter for any subsequent invocation of the match condition. The
- * @c second member of the return value is true if a match has been found, false
- * otherwise.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // The number of bytes in the streambuf's get
- * // area that have been fully consumed by the
- * // match function. O if an error occurred.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @note After a successful async_read_until operation, the streambuf may
- * contain additional data beyond that which matched the function object. An
- * application will typically leave that data in the streambuf for a subsequent
- * async_read_until operation to examine.
- *
- * @note The default implementation of the @c is_match_condition type trait
- * evaluates to true for function pointers and function objects with a
- * @c result_type typedef. It must be specialised for other user-defined
- * function objects.
- *
- * @par Examples
- * To asynchronously read data into a streambuf until whitespace is encountered:
- * @code typedef boost::asio::buffers_iterator<
- * boost::asio::streambuf::const_buffers_type> iterator;
- *
- * std::pair<iterator, bool>
- * match_whitespace(iterator begin, iterator end)
- * {
- * iterator i = begin;
- * while (i != end)
- * if (std::isspace(*i++))
- * return std::make_pair(i, true);
- * return std::make_pair(i, false);
- * }
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size);
- * ...
- * boost::asio::streambuf b;
- * boost::asio::async_read_until(s, b, match_whitespace, handler);
- * @endcode
- *
- * To asynchronously read data into a streambuf until a matching character is
- * found:
- * @code class match_char
- * {
- * public:
- * explicit match_char(char c) : c_(c) {}
- *
- * template <typename Iterator>
- * std::pair<Iterator, bool> operator()(
- * Iterator begin, Iterator end) const
- * {
- * Iterator i = begin;
- * while (i != end)
- * if (c_ == *i++)
- * return std::make_pair(i, true);
- * return std::make_pair(i, false);
- * }
- *
- * private:
- * char c_;
- * };
- *
- * namespace asio {
- * template <> struct is_match_condition<match_char>
- * : public boost::true_type {};
- * } // namespace asio
- * ...
- * void handler(const boost::system::error_code& e, std::size_t size);
- * ...
- * boost::asio::streambuf b;
- * boost::asio::async_read_until(s, b, match_char('a'), handler);
- * @endcode
- */
-template <typename AsyncReadStream, typename Allocator,
- typename MatchCondition, typename ReadHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
-async_read_until(AsyncReadStream& s,
- boost::asio::basic_streambuf<Allocator>& b,
- MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
- typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/read_until.hpp>
-
-#endif // BOOST_ASIO_READ_UNTIL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/context_base.hpp b/src/third_party/boost-1.68.0/boost/asio/ssl/context_base.hpp
deleted file mode 100644
index 8671ee676ab..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/context_base.hpp
+++ /dev/null
@@ -1,194 +0,0 @@
-//
-// ssl/context_base.hpp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_SSL_CONTEXT_BASE_HPP
-#define BOOST_ASIO_SSL_CONTEXT_BASE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/ssl/detail/openssl_types.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-/// The context_base class is used as a base for the basic_context class
-/// template so that we have a common place to define various enums.
-class context_base
-{
-public:
- /// Different methods supported by a context.
- enum method
- {
- /// Generic SSL version 2.
- sslv2,
-
- /// SSL version 2 client.
- sslv2_client,
-
- /// SSL version 2 server.
- sslv2_server,
-
- /// Generic SSL version 3.
- sslv3,
-
- /// SSL version 3 client.
- sslv3_client,
-
- /// SSL version 3 server.
- sslv3_server,
-
- /// Generic TLS version 1.
- tlsv1,
-
- /// TLS version 1 client.
- tlsv1_client,
-
- /// TLS version 1 server.
- tlsv1_server,
-
- /// Generic SSL/TLS.
- sslv23,
-
- /// SSL/TLS client.
- sslv23_client,
-
- /// SSL/TLS server.
- sslv23_server,
-
- /// Generic TLS version 1.1.
- tlsv11,
-
- /// TLS version 1.1 client.
- tlsv11_client,
-
- /// TLS version 1.1 server.
- tlsv11_server,
-
- /// Generic TLS version 1.2.
- tlsv12,
-
- /// TLS version 1.2 client.
- tlsv12_client,
-
- /// TLS version 1.2 server.
- tlsv12_server,
-
- /// Generic TLS.
- tls,
-
- /// TLS client.
- tls_client,
-
- /// TLS server.
- tls_server
- };
-
- /// Bitmask type for SSL options.
- typedef long options;
-
-#if defined(GENERATING_DOCUMENTATION)
- /// Implement various bug workarounds.
- static const long default_workarounds = implementation_defined;
-
- /// Always create a new key when using tmp_dh parameters.
- static const long single_dh_use = implementation_defined;
-
- /// Disable SSL v2.
- static const long no_sslv2 = implementation_defined;
-
- /// Disable SSL v3.
- static const long no_sslv3 = implementation_defined;
-
- /// Disable TLS v1.
- static const long no_tlsv1 = implementation_defined;
-
- /// Disable TLS v1.1.
- static const long no_tlsv1_1 = implementation_defined;
-
- /// Disable TLS v1.2.
- static const long no_tlsv1_2 = implementation_defined;
-
- /// Disable compression. Compression is disabled by default.
- static const long no_compression = implementation_defined;
-#else
- BOOST_ASIO_STATIC_CONSTANT(long, default_workarounds = SSL_OP_ALL);
- BOOST_ASIO_STATIC_CONSTANT(long, single_dh_use = SSL_OP_SINGLE_DH_USE);
- BOOST_ASIO_STATIC_CONSTANT(long, no_sslv2 = SSL_OP_NO_SSLv2);
- BOOST_ASIO_STATIC_CONSTANT(long, no_sslv3 = SSL_OP_NO_SSLv3);
- BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1 = SSL_OP_NO_TLSv1);
-# if defined(SSL_OP_NO_TLSv1_1)
- BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_1 = SSL_OP_NO_TLSv1_1);
-# else // defined(SSL_OP_NO_TLSv1_1)
- BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_1 = 0x10000000L);
-# endif // defined(SSL_OP_NO_TLSv1_1)
-# if defined(SSL_OP_NO_TLSv1_2)
- BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_2 = SSL_OP_NO_TLSv1_2);
-# else // defined(SSL_OP_NO_TLSv1_2)
- BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_2 = 0x08000000L);
-# endif // defined(SSL_OP_NO_TLSv1_2)
-# if defined(SSL_OP_NO_COMPRESSION)
- BOOST_ASIO_STATIC_CONSTANT(long, no_compression = SSL_OP_NO_COMPRESSION);
-# else // defined(SSL_OP_NO_COMPRESSION)
- BOOST_ASIO_STATIC_CONSTANT(long, no_compression = 0x20000L);
-# endif // defined(SSL_OP_NO_COMPRESSION)
-#endif
-
- /// File format types.
- enum file_format
- {
- /// ASN.1 file.
- asn1,
-
- /// PEM file.
- pem
- };
-
-#if !defined(GENERATING_DOCUMENTATION)
- // The following types and constants are preserved for backward compatibility.
- // New programs should use the equivalents of the same names that are defined
- // in the boost::asio::ssl namespace.
- typedef int verify_mode;
- BOOST_ASIO_STATIC_CONSTANT(int, verify_none = SSL_VERIFY_NONE);
- BOOST_ASIO_STATIC_CONSTANT(int, verify_peer = SSL_VERIFY_PEER);
- BOOST_ASIO_STATIC_CONSTANT(int,
- verify_fail_if_no_peer_cert = SSL_VERIFY_FAIL_IF_NO_PEER_CERT);
- BOOST_ASIO_STATIC_CONSTANT(int, verify_client_once = SSL_VERIFY_CLIENT_ONCE);
-#endif
-
- /// Purpose of PEM password.
- enum password_purpose
- {
- /// The password is needed for reading/decryption.
- for_reading,
-
- /// The password is needed for writing/encryption.
- for_writing
- };
-
-protected:
- /// Protected destructor to prevent deletion through this type.
- ~context_base()
- {
- }
-};
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_CONTEXT_BASE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/context.ipp b/src/third_party/boost-1.68.0/boost/asio/ssl/impl/context.ipp
deleted file mode 100644
index f35e43c2a64..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/context.ipp
+++ /dev/null
@@ -1,1161 +0,0 @@
-//
-// ssl/impl/context.ipp
-// ~~~~~~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
-// Copyright (c) 2005-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_SSL_IMPL_CONTEXT_IPP
-#define BOOST_ASIO_SSL_IMPL_CONTEXT_IPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#include <cstring>
-#include <boost/asio/detail/throw_error.hpp>
-#include <boost/asio/error.hpp>
-#include <boost/asio/ssl/context.hpp>
-#include <boost/asio/ssl/error.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-struct context::bio_cleanup
-{
- BIO* p;
- ~bio_cleanup() { if (p) ::BIO_free(p); }
-};
-
-struct context::x509_cleanup
-{
- X509* p;
- ~x509_cleanup() { if (p) ::X509_free(p); }
-};
-
-struct context::evp_pkey_cleanup
-{
- EVP_PKEY* p;
- ~evp_pkey_cleanup() { if (p) ::EVP_PKEY_free(p); }
-};
-
-struct context::rsa_cleanup
-{
- RSA* p;
- ~rsa_cleanup() { if (p) ::RSA_free(p); }
-};
-
-struct context::dh_cleanup
-{
- DH* p;
- ~dh_cleanup() { if (p) ::DH_free(p); }
-};
-
-context::context(context::method m)
- : handle_(0)
-{
- ::ERR_clear_error();
-
- switch (m)
- {
- // SSL v2.
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
- case context::sslv2:
- case context::sslv2_client:
- case context::sslv2_server:
- boost::asio::detail::throw_error(
- boost::asio::error::invalid_argument, "context");
- break;
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
- case context::sslv2:
- handle_ = ::SSL_CTX_new(::SSLv2_method());
- break;
- case context::sslv2_client:
- handle_ = ::SSL_CTX_new(::SSLv2_client_method());
- break;
- case context::sslv2_server:
- handle_ = ::SSL_CTX_new(::SSLv2_server_method());
- break;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
-
- // SSL v3.
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- case context::sslv3:
- handle_ = ::SSL_CTX_new(::TLS_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
- SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
- }
- break;
- case context::sslv3_client:
- handle_ = ::SSL_CTX_new(::TLS_client_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
- SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
- }
- break;
- case context::sslv3_server:
- handle_ = ::SSL_CTX_new(::TLS_server_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
- SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
- }
- break;
-#elif defined(OPENSSL_NO_SSL3)
- case context::sslv3:
- case context::sslv3_client:
- case context::sslv3_server:
- boost::asio::detail::throw_error(
- boost::asio::error::invalid_argument, "context");
- break;
-#else // defined(OPENSSL_NO_SSL3)
- case context::sslv3:
- handle_ = ::SSL_CTX_new(::SSLv3_method());
- break;
- case context::sslv3_client:
- handle_ = ::SSL_CTX_new(::SSLv3_client_method());
- break;
- case context::sslv3_server:
- handle_ = ::SSL_CTX_new(::SSLv3_server_method());
- break;
-#endif // defined(OPENSSL_NO_SSL3)
-
- // TLS v1.0.
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- case context::tlsv1:
- handle_ = ::SSL_CTX_new(::TLS_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
- }
- break;
- case context::tlsv1_client:
- handle_ = ::SSL_CTX_new(::TLS_client_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
- }
- break;
- case context::tlsv1_server:
- handle_ = ::SSL_CTX_new(::TLS_server_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
- }
- break;
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- case context::tlsv1:
- handle_ = ::SSL_CTX_new(::TLSv1_method());
- break;
- case context::tlsv1_client:
- handle_ = ::SSL_CTX_new(::TLSv1_client_method());
- break;
- case context::tlsv1_server:
- handle_ = ::SSL_CTX_new(::TLSv1_server_method());
- break;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
-
- // TLS v1.1.
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- case context::tlsv11:
- handle_ = ::SSL_CTX_new(::TLS_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
- }
- break;
- case context::tlsv11_client:
- handle_ = ::SSL_CTX_new(::TLS_client_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
- }
- break;
- case context::tlsv11_server:
- handle_ = ::SSL_CTX_new(::TLS_server_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
- }
- break;
-#elif defined(SSL_TXT_TLSV1_1)
- case context::tlsv11:
- handle_ = ::SSL_CTX_new(::TLSv1_1_method());
- break;
- case context::tlsv11_client:
- handle_ = ::SSL_CTX_new(::TLSv1_1_client_method());
- break;
- case context::tlsv11_server:
- handle_ = ::SSL_CTX_new(::TLSv1_1_server_method());
- break;
-#else // defined(SSL_TXT_TLSV1_1)
- case context::tlsv11:
- case context::tlsv11_client:
- case context::tlsv11_server:
- boost::asio::detail::throw_error(
- boost::asio::error::invalid_argument, "context");
- break;
-#endif // defined(SSL_TXT_TLSV1_1)
-
- // TLS v1.2.
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- case context::tlsv12:
- handle_ = ::SSL_CTX_new(::TLS_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
- }
- break;
- case context::tlsv12_client:
- handle_ = ::SSL_CTX_new(::TLS_client_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
- }
- break;
- case context::tlsv12_server:
- handle_ = ::SSL_CTX_new(::TLS_server_method());
- if (handle_)
- {
- SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
- SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
- }
- break;
-#elif defined(SSL_TXT_TLSV1_1)
- case context::tlsv12:
- handle_ = ::SSL_CTX_new(::TLSv1_2_method());
- break;
- case context::tlsv12_client:
- handle_ = ::SSL_CTX_new(::TLSv1_2_client_method());
- break;
- case context::tlsv12_server:
- handle_ = ::SSL_CTX_new(::TLSv1_2_server_method());
- break;
-#else // defined(SSL_TXT_TLSV1_1)
- case context::tlsv12:
- case context::tlsv12_client:
- case context::tlsv12_server:
- boost::asio::detail::throw_error(
- boost::asio::error::invalid_argument, "context");
- break;
-#endif // defined(SSL_TXT_TLSV1_1)
-
- // Any supported SSL/TLS version.
- case context::sslv23:
- handle_ = ::SSL_CTX_new(::SSLv23_method());
- break;
- case context::sslv23_client:
- handle_ = ::SSL_CTX_new(::SSLv23_client_method());
- break;
- case context::sslv23_server:
- handle_ = ::SSL_CTX_new(::SSLv23_server_method());
- break;
-
- // Any supported TLS version.
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- case context::tls:
- handle_ = ::SSL_CTX_new(::TLS_method());
- if (handle_)
- SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
- break;
- case context::tls_client:
- handle_ = ::SSL_CTX_new(::TLS_client_method());
- if (handle_)
- SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
- break;
- case context::tls_server:
- handle_ = ::SSL_CTX_new(::TLS_server_method());
- if (handle_)
- SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
- break;
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- case context::tls:
- handle_ = ::SSL_CTX_new(::SSLv23_method());
- if (handle_)
- SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
- break;
- case context::tls_client:
- handle_ = ::SSL_CTX_new(::SSLv23_client_method());
- if (handle_)
- SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
- break;
- case context::tls_server:
- handle_ = ::SSL_CTX_new(::SSLv23_server_method());
- if (handle_)
- SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
- break;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
-
- default:
- handle_ = ::SSL_CTX_new(0);
- break;
- }
-
- if (handle_ == 0)
- {
- boost::system::error_code ec(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- boost::asio::detail::throw_error(ec, "context");
- }
-
- set_options(no_compression);
-}
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-context::context(context&& other)
-{
- handle_ = other.handle_;
- other.handle_ = 0;
-}
-
-context& context::operator=(context&& other)
-{
- context tmp(BOOST_ASIO_MOVE_CAST(context)(*this));
- handle_ = other.handle_;
- other.handle_ = 0;
- return *this;
-}
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
-context::~context()
-{
- if (handle_)
- {
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- void* cb_userdata = handle_->default_passwd_callback_userdata;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- if (cb_userdata)
- {
- detail::password_callback_base* callback =
- static_cast<detail::password_callback_base*>(
- cb_userdata);
- delete callback;
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- ::SSL_CTX_set_default_passwd_cb_userdata(handle_, 0);
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- handle_->default_passwd_callback_userdata = 0;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- }
-
- if (SSL_CTX_get_app_data(handle_))
- {
- detail::verify_callback_base* callback =
- static_cast<detail::verify_callback_base*>(
- SSL_CTX_get_app_data(handle_));
- delete callback;
- SSL_CTX_set_app_data(handle_, 0);
- }
-
- ::SSL_CTX_free(handle_);
- }
-}
-
-context::native_handle_type context::native_handle()
-{
- return handle_;
-}
-
-void context::clear_options(context::options o)
-{
- boost::system::error_code ec;
- clear_options(o, ec);
- boost::asio::detail::throw_error(ec, "clear_options");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::clear_options(
- context::options o, boost::system::error_code& ec)
-{
-#if (OPENSSL_VERSION_NUMBER >= 0x009080DFL) \
- && (OPENSSL_VERSION_NUMBER != 0x00909000L)
-# if !defined(SSL_OP_NO_COMPRESSION)
- if ((o & context::no_compression) != 0)
- {
-# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- handle_->comp_methods = SSL_COMP_get_compression_methods();
-# endif // (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- o ^= context::no_compression;
- }
-# endif // !defined(SSL_OP_NO_COMPRESSION)
-
- ::SSL_CTX_clear_options(handle_, o);
-
- ec = boost::system::error_code();
-#else // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
- // && (OPENSSL_VERSION_NUMBER != 0x00909000L)
- (void)o;
- ec = boost::asio::error::operation_not_supported;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
- // && (OPENSSL_VERSION_NUMBER != 0x00909000L)
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::set_options(context::options o)
-{
- boost::system::error_code ec;
- set_options(o, ec);
- boost::asio::detail::throw_error(ec, "set_options");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::set_options(
- context::options o, boost::system::error_code& ec)
-{
-#if !defined(SSL_OP_NO_COMPRESSION)
- if ((o & context::no_compression) != 0)
- {
-#if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- handle_->comp_methods =
- boost::asio::ssl::detail::openssl_init<>::get_null_compression_methods();
-#endif // (OPENSSL_VERSION_NUMBER >= 0x00908000L)
- o ^= context::no_compression;
- }
-#endif // !defined(SSL_OP_NO_COMPRESSION)
-
- ::SSL_CTX_set_options(handle_, o);
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::set_verify_mode(verify_mode v)
-{
- boost::system::error_code ec;
- set_verify_mode(v, ec);
- boost::asio::detail::throw_error(ec, "set_verify_mode");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::set_verify_mode(
- verify_mode v, boost::system::error_code& ec)
-{
- ::SSL_CTX_set_verify(handle_, v, ::SSL_CTX_get_verify_callback(handle_));
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::set_verify_depth(int depth)
-{
- boost::system::error_code ec;
- set_verify_depth(depth, ec);
- boost::asio::detail::throw_error(ec, "set_verify_depth");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::set_verify_depth(
- int depth, boost::system::error_code& ec)
-{
- ::SSL_CTX_set_verify_depth(handle_, depth);
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::load_verify_file(const std::string& filename)
-{
- boost::system::error_code ec;
- load_verify_file(filename, ec);
- boost::asio::detail::throw_error(ec, "load_verify_file");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::load_verify_file(
- const std::string& filename, boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- if (::SSL_CTX_load_verify_locations(handle_, filename.c_str(), 0) != 1)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::add_certificate_authority(const const_buffer& ca)
-{
- boost::system::error_code ec;
- add_certificate_authority(ca, ec);
- boost::asio::detail::throw_error(ec, "add_certificate_authority");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::add_certificate_authority(
- const const_buffer& ca, boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- bio_cleanup bio = { make_buffer_bio(ca) };
- if (bio.p)
- {
- if (X509_STORE* store = ::SSL_CTX_get_cert_store(handle_))
- {
- for (;;)
- {
- x509_cleanup cert = { ::PEM_read_bio_X509(bio.p, 0, 0, 0) };
- if (!cert.p)
- break;
-
- if (::X509_STORE_add_cert(store, cert.p) != 1)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
- }
- }
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::set_default_verify_paths()
-{
- boost::system::error_code ec;
- set_default_verify_paths(ec);
- boost::asio::detail::throw_error(ec, "set_default_verify_paths");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::set_default_verify_paths(
- boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- if (::SSL_CTX_set_default_verify_paths(handle_) != 1)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::add_verify_path(const std::string& path)
-{
- boost::system::error_code ec;
- add_verify_path(path, ec);
- boost::asio::detail::throw_error(ec, "add_verify_path");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::add_verify_path(
- const std::string& path, boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- if (::SSL_CTX_load_verify_locations(handle_, 0, path.c_str()) != 1)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_certificate(
- const const_buffer& certificate, file_format format)
-{
- boost::system::error_code ec;
- use_certificate(certificate, format, ec);
- boost::asio::detail::throw_error(ec, "use_certificate");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_certificate(
- const const_buffer& certificate, file_format format,
- boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- if (format == context_base::asn1)
- {
- if (::SSL_CTX_use_certificate_ASN1(handle_,
- static_cast<int>(certificate.size()),
- static_cast<const unsigned char*>(certificate.data())) == 1)
- {
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
- else if (format == context_base::pem)
- {
- bio_cleanup bio = { make_buffer_bio(certificate) };
- if (bio.p)
- {
- x509_cleanup cert = { ::PEM_read_bio_X509(bio.p, 0, 0, 0) };
- if (cert.p)
- {
- if (::SSL_CTX_use_certificate(handle_, cert.p) == 1)
- {
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
- }
- }
- else
- {
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_certificate_file(
- const std::string& filename, file_format format)
-{
- boost::system::error_code ec;
- use_certificate_file(filename, format, ec);
- boost::asio::detail::throw_error(ec, "use_certificate_file");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_certificate_file(
- const std::string& filename, file_format format,
- boost::system::error_code& ec)
-{
- int file_type;
- switch (format)
- {
- case context_base::asn1:
- file_type = SSL_FILETYPE_ASN1;
- break;
- case context_base::pem:
- file_type = SSL_FILETYPE_PEM;
- break;
- default:
- {
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- ::ERR_clear_error();
-
- if (::SSL_CTX_use_certificate_file(handle_, filename.c_str(), file_type) != 1)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_certificate_chain(const const_buffer& chain)
-{
- boost::system::error_code ec;
- use_certificate_chain(chain, ec);
- boost::asio::detail::throw_error(ec, "use_certificate_chain");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain(
- const const_buffer& chain, boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- bio_cleanup bio = { make_buffer_bio(chain) };
- if (bio.p)
- {
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
- void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- pem_password_cb* callback = handle_->default_passwd_callback;
- void* cb_userdata = handle_->default_passwd_callback_userdata;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- x509_cleanup cert = {
- ::PEM_read_bio_X509_AUX(bio.p, 0,
- callback,
- cb_userdata) };
- if (!cert.p)
- {
- ec = boost::system::error_code(ERR_R_PEM_LIB,
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- int result = ::SSL_CTX_use_certificate(handle_, cert.p);
- if (result == 0 || ::ERR_peek_error() != 0)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
-#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
- ::SSL_CTX_clear_chain_certs(handle_);
-#else
- if (handle_->extra_certs)
- {
- ::sk_X509_pop_free(handle_->extra_certs, X509_free);
- handle_->extra_certs = 0;
- }
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
-
- while (X509* cacert = ::PEM_read_bio_X509(bio.p, 0,
- callback,
- cb_userdata))
- {
- if (!::SSL_CTX_add_extra_chain_cert(handle_, cacert))
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- result = ::ERR_peek_last_error();
- if ((ERR_GET_LIB(result) == ERR_LIB_PEM)
- && (ERR_GET_REASON(result) == PEM_R_NO_START_LINE))
- {
- ::ERR_clear_error();
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_certificate_chain_file(const std::string& filename)
-{
- boost::system::error_code ec;
- use_certificate_chain_file(filename, ec);
- boost::asio::detail::throw_error(ec, "use_certificate_chain_file");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain_file(
- const std::string& filename, boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- if (::SSL_CTX_use_certificate_chain_file(handle_, filename.c_str()) != 1)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_private_key(
- const const_buffer& private_key, context::file_format format)
-{
- boost::system::error_code ec;
- use_private_key(private_key, format, ec);
- boost::asio::detail::throw_error(ec, "use_private_key");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_private_key(
- const const_buffer& private_key, context::file_format format,
- boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
- void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- pem_password_cb* callback = handle_->default_passwd_callback;
- void* cb_userdata = handle_->default_passwd_callback_userdata;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
-
- bio_cleanup bio = { make_buffer_bio(private_key) };
- if (bio.p)
- {
- evp_pkey_cleanup evp_private_key = { 0 };
- switch (format)
- {
- case context_base::asn1:
- evp_private_key.p = ::d2i_PrivateKey_bio(bio.p, 0);
- break;
- case context_base::pem:
- evp_private_key.p = ::PEM_read_bio_PrivateKey(
- bio.p, 0, callback,
- cb_userdata);
- break;
- default:
- {
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- if (evp_private_key.p)
- {
- if (::SSL_CTX_use_PrivateKey(handle_, evp_private_key.p) == 1)
- {
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
- }
-
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_private_key_file(
- const std::string& filename, context::file_format format)
-{
- boost::system::error_code ec;
- use_private_key_file(filename, format, ec);
- boost::asio::detail::throw_error(ec, "use_private_key_file");
-}
-
-void context::use_rsa_private_key(
- const const_buffer& private_key, context::file_format format)
-{
- boost::system::error_code ec;
- use_rsa_private_key(private_key, format, ec);
- boost::asio::detail::throw_error(ec, "use_rsa_private_key");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_rsa_private_key(
- const const_buffer& private_key, context::file_format format,
- boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
- void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- pem_password_cb* callback = handle_->default_passwd_callback;
- void* cb_userdata = handle_->default_passwd_callback_userdata;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
-
- bio_cleanup bio = { make_buffer_bio(private_key) };
- if (bio.p)
- {
- rsa_cleanup rsa_private_key = { 0 };
- switch (format)
- {
- case context_base::asn1:
- rsa_private_key.p = ::d2i_RSAPrivateKey_bio(bio.p, 0);
- break;
- case context_base::pem:
- rsa_private_key.p = ::PEM_read_bio_RSAPrivateKey(
- bio.p, 0, callback,
- cb_userdata);
- break;
- default:
- {
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- if (rsa_private_key.p)
- {
- if (::SSL_CTX_use_RSAPrivateKey(handle_, rsa_private_key.p) == 1)
- {
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
- }
-
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_private_key_file(
- const std::string& filename, context::file_format format,
- boost::system::error_code& ec)
-{
- int file_type;
- switch (format)
- {
- case context_base::asn1:
- file_type = SSL_FILETYPE_ASN1;
- break;
- case context_base::pem:
- file_type = SSL_FILETYPE_PEM;
- break;
- default:
- {
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- ::ERR_clear_error();
-
- if (::SSL_CTX_use_PrivateKey_file(handle_, filename.c_str(), file_type) != 1)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_rsa_private_key_file(
- const std::string& filename, context::file_format format)
-{
- boost::system::error_code ec;
- use_rsa_private_key_file(filename, format, ec);
- boost::asio::detail::throw_error(ec, "use_rsa_private_key_file");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_rsa_private_key_file(
- const std::string& filename, context::file_format format,
- boost::system::error_code& ec)
-{
- int file_type;
- switch (format)
- {
- case context_base::asn1:
- file_type = SSL_FILETYPE_ASN1;
- break;
- case context_base::pem:
- file_type = SSL_FILETYPE_PEM;
- break;
- default:
- {
- ec = boost::asio::error::invalid_argument;
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- ::ERR_clear_error();
-
- if (::SSL_CTX_use_RSAPrivateKey_file(
- handle_, filename.c_str(), file_type) != 1)
- {
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_tmp_dh(const const_buffer& dh)
-{
- boost::system::error_code ec;
- use_tmp_dh(dh, ec);
- boost::asio::detail::throw_error(ec, "use_tmp_dh");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_tmp_dh(
- const const_buffer& dh, boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- bio_cleanup bio = { make_buffer_bio(dh) };
- if (bio.p)
- {
- return do_use_tmp_dh(bio.p, ec);
- }
-
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-void context::use_tmp_dh_file(const std::string& filename)
-{
- boost::system::error_code ec;
- use_tmp_dh_file(filename, ec);
- boost::asio::detail::throw_error(ec, "use_tmp_dh_file");
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::use_tmp_dh_file(
- const std::string& filename, boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- bio_cleanup bio = { ::BIO_new_file(filename.c_str(), "r") };
- if (bio.p)
- {
- return do_use_tmp_dh(bio.p, ec);
- }
-
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::do_use_tmp_dh(
- BIO* bio, boost::system::error_code& ec)
-{
- ::ERR_clear_error();
-
- dh_cleanup dh = { ::PEM_read_bio_DHparams(bio, 0, 0, 0) };
- if (dh.p)
- {
- if (::SSL_CTX_set_tmp_dh(handle_, dh.p) == 1)
- {
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
- }
-
- ec = boost::system::error_code(
- static_cast<int>(::ERR_get_error()),
- boost::asio::error::get_ssl_category());
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::do_set_verify_callback(
- detail::verify_callback_base* callback, boost::system::error_code& ec)
-{
- if (SSL_CTX_get_app_data(handle_))
- {
- delete static_cast<detail::verify_callback_base*>(
- SSL_CTX_get_app_data(handle_));
- }
-
- SSL_CTX_set_app_data(handle_, callback);
-
- ::SSL_CTX_set_verify(handle_,
- ::SSL_CTX_get_verify_mode(handle_),
- &context::verify_callback_function);
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-int context::verify_callback_function(int preverified, X509_STORE_CTX* ctx)
-{
- if (ctx)
- {
- if (SSL* ssl = static_cast<SSL*>(
- ::X509_STORE_CTX_get_ex_data(
- ctx, ::SSL_get_ex_data_X509_STORE_CTX_idx())))
- {
- if (SSL_CTX* handle = ::SSL_get_SSL_CTX(ssl))
- {
- if (SSL_CTX_get_app_data(handle))
- {
- detail::verify_callback_base* callback =
- static_cast<detail::verify_callback_base*>(
- SSL_CTX_get_app_data(handle));
-
- verify_context verify_ctx(ctx);
- return callback->call(preverified != 0, verify_ctx) ? 1 : 0;
- }
- }
- }
- }
-
- return 0;
-}
-
-BOOST_ASIO_SYNC_OP_VOID context::do_set_password_callback(
- detail::password_callback_base* callback, boost::system::error_code& ec)
-{
-#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
- void* old_callback = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
- ::SSL_CTX_set_default_passwd_cb_userdata(handle_, callback);
-#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
- void* old_callback = handle_->default_passwd_callback_userdata;
- handle_->default_passwd_callback_userdata = callback;
-#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
-
- if (old_callback)
- delete static_cast<detail::password_callback_base*>(
- old_callback);
-
- SSL_CTX_set_default_passwd_cb(handle_, &context::password_callback_function);
-
- ec = boost::system::error_code();
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
-}
-
-int context::password_callback_function(
- char* buf, int size, int purpose, void* data)
-{
- using namespace std; // For strncat and strlen.
-
- if (data)
- {
- detail::password_callback_base* callback =
- static_cast<detail::password_callback_base*>(data);
-
- std::string passwd = callback->call(static_cast<std::size_t>(size),
- purpose ? context_base::for_writing : context_base::for_reading);
-
-#if defined(BOOST_ASIO_HAS_SECURE_RTL)
- strcpy_s(buf, size, passwd.c_str());
-#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
- *buf = '\0';
- if (size > 0)
- strncat(buf, passwd.c_str(), size - 1);
-#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
-
- return static_cast<int>(strlen(buf));
- }
-
- return 0;
-}
-
-BIO* context::make_buffer_bio(const const_buffer& b)
-{
- return ::BIO_new_mem_buf(
- const_cast<void*>(b.data()),
- static_cast<int>(b.size()));
-}
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_IMPL_CONTEXT_IPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/stream.hpp b/src/third_party/boost-1.68.0/boost/asio/ssl/stream.hpp
deleted file mode 100644
index 005ff465f42..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/stream.hpp
+++ /dev/null
@@ -1,763 +0,0 @@
-//
-// ssl/stream.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_SSL_STREAM_HPP
-#define BOOST_ASIO_SSL_STREAM_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/buffer_sequence_adapter.hpp>
-#include <boost/asio/detail/handler_type_requirements.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/type_traits.hpp>
-#include <boost/asio/ssl/context.hpp>
-#include <boost/asio/ssl/detail/buffered_handshake_op.hpp>
-#include <boost/asio/ssl/detail/handshake_op.hpp>
-#include <boost/asio/ssl/detail/io.hpp>
-#include <boost/asio/ssl/detail/read_op.hpp>
-#include <boost/asio/ssl/detail/shutdown_op.hpp>
-#include <boost/asio/ssl/detail/stream_core.hpp>
-#include <boost/asio/ssl/detail/write_op.hpp>
-#include <boost/asio/ssl/stream_base.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace ssl {
-
-/// Provides stream-oriented functionality using SSL.
-/**
- * The stream class template provides asynchronous and blocking stream-oriented
- * functionality using SSL.
- *
- * @par Thread Safety
- * @e Distinct @e objects: Safe.@n
- * @e Shared @e objects: Unsafe. The application must also ensure that all
- * asynchronous operations are performed within the same implicit or explicit
- * strand.
- *
- * @par Example
- * To use the SSL stream template with an ip::tcp::socket, you would write:
- * @code
- * boost::asio::io_context io_context;
- * boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23);
- * boost::asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
- * @endcode
- *
- * @par Concepts:
- * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
- */
-template <typename Stream>
-class stream :
- public stream_base,
- private noncopyable
-{
-public:
- /// The native handle type of the SSL stream.
- typedef SSL* native_handle_type;
-
- /// Structure for use with deprecated impl_type.
- struct impl_struct
- {
- SSL* ssl;
- };
-
- /// The type of the next layer.
- typedef typename remove_reference<Stream>::type next_layer_type;
-
- /// The type of the lowest layer.
- typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
-
- /// The type of the executor associated with the object.
- typedef typename lowest_layer_type::executor_type executor_type;
-
-#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- /// Construct a stream.
- /**
- * This constructor creates a stream and initialises the underlying stream
- * object.
- *
- * @param arg The argument to be passed to initialise the underlying stream.
- *
- * @param ctx The SSL context to be used for the stream.
- */
- template <typename Arg>
- stream(Arg&& arg, context& ctx)
- : next_layer_(BOOST_ASIO_MOVE_CAST(Arg)(arg)),
- core_(ctx.native_handle(),
- next_layer_.lowest_layer().get_executor().context())
- {
- }
-#else // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
- template <typename Arg>
- stream(Arg& arg, context& ctx)
- : next_layer_(arg),
- core_(ctx.native_handle(),
- next_layer_.lowest_layer().get_executor().context())
- {
- }
-#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
-
- /// Destructor.
- /**
- * @note A @c stream object must not be destroyed while there are pending
- * asynchronous operations associated with it.
- */
- ~stream()
- {
- }
-
- /// Get the executor associated with the object.
- /**
- * This function may be used to obtain the executor object that the stream
- * uses to dispatch handlers for asynchronous operations.
- *
- * @return A copy of the executor that stream will use to dispatch handlers.
- */
- executor_type get_executor() BOOST_ASIO_NOEXCEPT
- {
- return next_layer_.lowest_layer().get_executor();
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- boost::asio::io_context& get_io_context()
- {
- return next_layer_.lowest_layer().get_io_context();
- }
-
- /// (Deprecated: Use get_executor().) Get the io_context associated with the
- /// object.
- boost::asio::io_context& get_io_service()
- {
- return next_layer_.lowest_layer().get_io_service();
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Get the underlying implementation in the native type.
- /**
- * This function may be used to obtain the underlying implementation of the
- * context. This is intended to allow access to context functionality that is
- * not otherwise provided.
- *
- * @par Example
- * The native_handle() function returns a pointer of type @c SSL* that is
- * suitable for passing to functions such as @c SSL_get_verify_result and
- * @c SSL_get_peer_certificate:
- * @code
- * boost::asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
- *
- * // ... establish connection and perform handshake ...
- *
- * if (X509* cert = SSL_get_peer_certificate(sock.native_handle()))
- * {
- * if (SSL_get_verify_result(sock.native_handle()) == X509_V_OK)
- * {
- * // ...
- * }
- * }
- * @endcode
- */
- native_handle_type native_handle()
- {
- return core_.engine_.native_handle();
- }
-
- /// Get a reference to the next layer.
- /**
- * This function returns a reference to the next layer in a stack of stream
- * layers.
- *
- * @return A reference to the next layer in the stack of stream layers.
- * Ownership is not transferred to the caller.
- */
- const next_layer_type& next_layer() const
- {
- return next_layer_;
- }
-
- /// Get a reference to the next layer.
- /**
- * This function returns a reference to the next layer in a stack of stream
- * layers.
- *
- * @return A reference to the next layer in the stack of stream layers.
- * Ownership is not transferred to the caller.
- */
- next_layer_type& next_layer()
- {
- return next_layer_;
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * stream layers.
- *
- * @return A reference to the lowest layer in the stack of stream layers.
- * Ownership is not transferred to the caller.
- */
- lowest_layer_type& lowest_layer()
- {
- return next_layer_.lowest_layer();
- }
-
- /// Get a reference to the lowest layer.
- /**
- * This function returns a reference to the lowest layer in a stack of
- * stream layers.
- *
- * @return A reference to the lowest layer in the stack of stream layers.
- * Ownership is not transferred to the caller.
- */
- const lowest_layer_type& lowest_layer() const
- {
- return next_layer_.lowest_layer();
- }
-
- /// Set the peer verification mode.
- /**
- * This function may be used to configure the peer verification mode used by
- * the stream. The new mode will override the mode inherited from the context.
- *
- * @param v A bitmask of peer verification modes. See @ref verify_mode for
- * available values.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_set_verify.
- */
- void set_verify_mode(verify_mode v)
- {
- boost::system::error_code ec;
- set_verify_mode(v, ec);
- boost::asio::detail::throw_error(ec, "set_verify_mode");
- }
-
- /// Set the peer verification mode.
- /**
- * This function may be used to configure the peer verification mode used by
- * the stream. The new mode will override the mode inherited from the context.
- *
- * @param v A bitmask of peer verification modes. See @ref verify_mode for
- * available values.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_set_verify.
- */
- BOOST_ASIO_SYNC_OP_VOID set_verify_mode(
- verify_mode v, boost::system::error_code& ec)
- {
- core_.engine_.set_verify_mode(v, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Set the peer verification depth.
- /**
- * This function may be used to configure the maximum verification depth
- * allowed by the stream.
- *
- * @param depth Maximum depth for the certificate chain verification that
- * shall be allowed.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_set_verify_depth.
- */
- void set_verify_depth(int depth)
- {
- boost::system::error_code ec;
- set_verify_depth(depth, ec);
- boost::asio::detail::throw_error(ec, "set_verify_depth");
- }
-
- /// Set the peer verification depth.
- /**
- * This function may be used to configure the maximum verification depth
- * allowed by the stream.
- *
- * @param depth Maximum depth for the certificate chain verification that
- * shall be allowed.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_set_verify_depth.
- */
- BOOST_ASIO_SYNC_OP_VOID set_verify_depth(
- int depth, boost::system::error_code& ec)
- {
- core_.engine_.set_verify_depth(depth, ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Set the callback used to verify peer certificates.
- /**
- * This function is used to specify a callback function that will be called
- * by the implementation when it needs to verify a peer certificate.
- *
- * @param callback The function object to be used for verifying a certificate.
- * The function signature of the handler must be:
- * @code bool verify_callback(
- * bool preverified, // True if the certificate passed pre-verification.
- * verify_context& ctx // The peer certificate and other context.
- * ); @endcode
- * The return value of the callback is true if the certificate has passed
- * verification, false otherwise.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note Calls @c SSL_set_verify.
- */
- template <typename VerifyCallback>
- void set_verify_callback(VerifyCallback callback)
- {
- boost::system::error_code ec;
- this->set_verify_callback(callback, ec);
- boost::asio::detail::throw_error(ec, "set_verify_callback");
- }
-
- /// Set the callback used to verify peer certificates.
- /**
- * This function is used to specify a callback function that will be called
- * by the implementation when it needs to verify a peer certificate.
- *
- * @param callback The function object to be used for verifying a certificate.
- * The function signature of the handler must be:
- * @code bool verify_callback(
- * bool preverified, // True if the certificate passed pre-verification.
- * verify_context& ctx // The peer certificate and other context.
- * ); @endcode
- * The return value of the callback is true if the certificate has passed
- * verification, false otherwise.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @note Calls @c SSL_set_verify.
- */
- template <typename VerifyCallback>
- BOOST_ASIO_SYNC_OP_VOID set_verify_callback(VerifyCallback callback,
- boost::system::error_code& ec)
- {
- core_.engine_.set_verify_callback(
- new detail::verify_callback<VerifyCallback>(callback), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform SSL handshaking.
- /**
- * This function is used to perform SSL handshaking on the stream. The
- * function call will block until handshaking is complete or an error occurs.
- *
- * @param type The type of handshaking to be performed, i.e. as a client or as
- * a server.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void handshake(handshake_type type)
- {
- boost::system::error_code ec;
- handshake(type, ec);
- boost::asio::detail::throw_error(ec, "handshake");
- }
-
- /// Perform SSL handshaking.
- /**
- * This function is used to perform SSL handshaking on the stream. The
- * function call will block until handshaking is complete or an error occurs.
- *
- * @param type The type of handshaking to be performed, i.e. as a client or as
- * a server.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID handshake(handshake_type type,
- boost::system::error_code& ec)
- {
- detail::io(next_layer_, core_, detail::handshake_op(type), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Perform SSL handshaking.
- /**
- * This function is used to perform SSL handshaking on the stream. The
- * function call will block until handshaking is complete or an error occurs.
- *
- * @param type The type of handshaking to be performed, i.e. as a client or as
- * a server.
- *
- * @param buffers The buffered data to be reused for the handshake.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- template <typename ConstBufferSequence>
- void handshake(handshake_type type, const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- handshake(type, buffers, ec);
- boost::asio::detail::throw_error(ec, "handshake");
- }
-
- /// Perform SSL handshaking.
- /**
- * This function is used to perform SSL handshaking on the stream. The
- * function call will block until handshaking is complete or an error occurs.
- *
- * @param type The type of handshaking to be performed, i.e. as a client or as
- * a server.
- *
- * @param buffers The buffered data to be reused for the handshake.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- template <typename ConstBufferSequence>
- BOOST_ASIO_SYNC_OP_VOID handshake(handshake_type type,
- const ConstBufferSequence& buffers, boost::system::error_code& ec)
- {
- detail::io(next_layer_, core_,
- detail::buffered_handshake_op<ConstBufferSequence>(type, buffers), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Start an asynchronous SSL handshake.
- /**
- * This function is used to asynchronously perform an SSL handshake on the
- * stream. This function call always returns immediately.
- *
- * @param type The type of handshaking to be performed, i.e. as a client or as
- * a server.
- *
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error // Result of operation.
- * ); @endcode
- */
- template <typename HandshakeHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(HandshakeHandler,
- void (boost::system::error_code))
- async_handshake(handshake_type type,
- BOOST_ASIO_MOVE_ARG(HandshakeHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a HandshakeHandler.
- BOOST_ASIO_HANDSHAKE_HANDLER_CHECK(HandshakeHandler, handler) type_check;
-
- boost::asio::async_completion<HandshakeHandler,
- void (boost::system::error_code)> init(handler);
-
- detail::async_io(next_layer_, core_,
- detail::handshake_op(type), init.completion_handler);
-
- return init.result.get();
- }
-
- /// Start an asynchronous SSL handshake.
- /**
- * This function is used to asynchronously perform an SSL handshake on the
- * stream. This function call always returns immediately.
- *
- * @param type The type of handshaking to be performed, i.e. as a client or as
- * a server.
- *
- * @param buffers The buffered data to be reused for the handshake. Although
- * the buffers object may be copied as necessary, ownership of the underlying
- * buffers is retained by the caller, which must guarantee that they remain
- * valid until the handler is called.
- *
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Amount of buffers used in handshake.
- * ); @endcode
- */
- template <typename ConstBufferSequence, typename BufferedHandshakeHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(BufferedHandshakeHandler,
- void (boost::system::error_code, std::size_t))
- async_handshake(handshake_type type, const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(BufferedHandshakeHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a BufferedHandshakeHandler.
- BOOST_ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK(
- BufferedHandshakeHandler, handler) type_check;
-
- boost::asio::async_completion<BufferedHandshakeHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::async_io(next_layer_, core_,
- detail::buffered_handshake_op<ConstBufferSequence>(type, buffers),
- init.completion_handler);
-
- return init.result.get();
- }
-
- /// Shut down SSL on the stream.
- /**
- * This function is used to shut down SSL on the stream. The function call
- * will block until SSL has been shut down or an error occurs.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
- void shutdown()
- {
- boost::system::error_code ec;
- shutdown(ec);
- boost::asio::detail::throw_error(ec, "shutdown");
- }
-
- /// Shut down SSL on the stream.
- /**
- * This function is used to shut down SSL on the stream. The function call
- * will block until SSL has been shut down or an error occurs.
- *
- * @param ec Set to indicate what error occurred, if any.
- */
- BOOST_ASIO_SYNC_OP_VOID shutdown(boost::system::error_code& ec)
- {
- detail::io(next_layer_, core_, detail::shutdown_op(), ec);
- BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
- }
-
- /// Asynchronously shut down SSL on the stream.
- /**
- * This function is used to asynchronously shut down SSL on the stream. This
- * function call always returns immediately.
- *
- * @param handler The handler to be called when the handshake operation
- * completes. Copies will be made of the handler as required. The equivalent
- * function signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error // Result of operation.
- * ); @endcode
- */
- template <typename ShutdownHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ShutdownHandler,
- void (boost::system::error_code))
- async_shutdown(BOOST_ASIO_MOVE_ARG(ShutdownHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ShutdownHandler.
- BOOST_ASIO_SHUTDOWN_HANDLER_CHECK(ShutdownHandler, handler) type_check;
-
- boost::asio::async_completion<ShutdownHandler,
- void (boost::system::error_code)> init(handler);
-
- detail::async_io(next_layer_, core_, detail::shutdown_op(),
- init.completion_handler);
-
- return init.result.get();
- }
-
- /// Write some data to the stream.
- /**
- * This function is used to write data on the stream. The function call will
- * block until one or more bytes of data has been written successfully, or
- * until an error occurs.
- *
- * @param buffers The data to be written.
- *
- * @returns The number of bytes written.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write function if you need to ensure that all
- * data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t n = write_some(buffers, ec);
- boost::asio::detail::throw_error(ec, "write_some");
- return n;
- }
-
- /// Write some data to the stream.
- /**
- * This function is used to write data on the stream. The function call will
- * block until one or more bytes of data has been written successfully, or
- * until an error occurs.
- *
- * @param buffers The data to be written to the stream.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. Returns 0 if an error occurred.
- *
- * @note The write_some operation may not transmit all of the data to the
- * peer. Consider using the @ref write function if you need to ensure that all
- * data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence>
- std::size_t write_some(const ConstBufferSequence& buffers,
- boost::system::error_code& ec)
- {
- return detail::io(next_layer_, core_,
- detail::write_op<ConstBufferSequence>(buffers), ec);
- }
-
- /// Start an asynchronous write.
- /**
- * This function is used to asynchronously write one or more bytes of data to
- * the stream. The function call always returns immediately.
- *
- * @param buffers The data to be written to the stream. Although the buffers
- * object may be copied as necessary, ownership of the underlying buffers is
- * retained by the caller, which must guarantee that they remain valid until
- * the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The equivalent function
- * signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes written.
- * ); @endcode
- *
- * @note The async_write_some operation may not transmit all of the data to
- * the peer. Consider using the @ref async_write function if you need to
- * ensure that all data is written before the blocking operation completes.
- */
- template <typename ConstBufferSequence, typename WriteHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
- async_write_some(const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a WriteHandler.
- BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
-
- boost::asio::async_completion<WriteHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::async_io(next_layer_, core_,
- detail::write_op<ConstBufferSequence>(buffers),
- init.completion_handler);
-
- return init.result.get();
- }
-
- /// Read some data from the stream.
- /**
- * This function is used to read data from the stream. The function call will
- * block until one or more bytes of data has been read successfully, or until
- * an error occurs.
- *
- * @param buffers The buffers into which the data will be read.
- *
- * @returns The number of bytes read.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read function if you need to ensure that the
- * requested amount of data is read before the blocking operation completes.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers)
- {
- boost::system::error_code ec;
- std::size_t n = read_some(buffers, ec);
- boost::asio::detail::throw_error(ec, "read_some");
- return n;
- }
-
- /// Read some data from the stream.
- /**
- * This function is used to read data from the stream. The function call will
- * block until one or more bytes of data has been read successfully, or until
- * an error occurs.
- *
- * @param buffers The buffers into which the data will be read.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes read. Returns 0 if an error occurred.
- *
- * @note The read_some operation may not read all of the requested number of
- * bytes. Consider using the @ref read function if you need to ensure that the
- * requested amount of data is read before the blocking operation completes.
- */
- template <typename MutableBufferSequence>
- std::size_t read_some(const MutableBufferSequence& buffers,
- boost::system::error_code& ec)
- {
- return detail::io(next_layer_, core_,
- detail::read_op<MutableBufferSequence>(buffers), ec);
- }
-
- /// Start an asynchronous read.
- /**
- * This function is used to asynchronously read one or more bytes of data from
- * the stream. The function call always returns immediately.
- *
- * @param buffers The buffers into which the data will be read. Although the
- * buffers object may be copied as necessary, ownership of the underlying
- * buffers is retained by the caller, which must guarantee that they remain
- * valid until the handler is called.
- *
- * @param handler The handler to be called when the read operation completes.
- * Copies will be made of the handler as required. The equivalent function
- * signature of the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- * std::size_t bytes_transferred // Number of bytes read.
- * ); @endcode
- *
- * @note The async_read_some operation may not read all of the requested
- * number of bytes. Consider using the @ref async_read function if you need to
- * ensure that the requested amount of data is read before the asynchronous
- * operation completes.
- */
- template <typename MutableBufferSequence, typename ReadHandler>
- BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
- void (boost::system::error_code, std::size_t))
- async_read_some(const MutableBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
- {
- // If you get an error on the following line it means that your handler does
- // not meet the documented type requirements for a ReadHandler.
- BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
-
- boost::asio::async_completion<ReadHandler,
- void (boost::system::error_code, std::size_t)> init(handler);
-
- detail::async_io(next_layer_, core_,
- detail::read_op<MutableBufferSequence>(buffers),
- init.completion_handler);
-
- return init.result.get();
- }
-
-private:
- Stream next_layer_;
- detail::stream_core core_;
-};
-
-} // namespace ssl
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#endif // BOOST_ASIO_SSL_STREAM_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/thread_pool.hpp b/src/third_party/boost-1.68.0/boost/asio/thread_pool.hpp
deleted file mode 100644
index e959a645c6e..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/thread_pool.hpp
+++ /dev/null
@@ -1,234 +0,0 @@
-//
-// thread_pool.hpp
-// ~~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_THREAD_POOL_HPP
-#define BOOST_ASIO_THREAD_POOL_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <boost/asio/detail/noncopyable.hpp>
-#include <boost/asio/detail/scheduler.hpp>
-#include <boost/asio/detail/thread_group.hpp>
-#include <boost/asio/execution_context.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/// A simple fixed-size thread pool.
-/**
- * The thread pool class is an execution context where functions are permitted
- * to run on one of a fixed number of threads.
- *
- * @par Submitting tasks to the pool
- *
- * To submit functions to the io_context, use the @ref boost::asio::dispatch,
- * @ref boost::asio::post or @ref boost::asio::defer free functions.
- *
- * For example:
- *
- * @code void my_task()
- * {
- * ...
- * }
- *
- * ...
- *
- * // Launch the pool with four threads.
- * boost::asio::thread_pool pool(4);
- *
- * // Submit a function to the pool.
- * boost::asio::post(pool, my_task);
- *
- * // Submit a lambda object to the pool.
- * boost::asio::post(pool,
- * []()
- * {
- * ...
- * });
- *
- * // Wait for all tasks in the pool to complete.
- * pool.join(); @endcode
- */
-class thread_pool
- : public execution_context
-{
-public:
- class executor_type;
-
- /// Constructs a pool with an automatically determined number of threads.
- BOOST_ASIO_DECL thread_pool();
-
- /// Constructs a pool with a specified number of threads.
- BOOST_ASIO_DECL thread_pool(std::size_t num_threads);
-
- /// Destructor.
- /**
- * Automatically stops and joins the pool, if not explicitly done beforehand.
- */
- BOOST_ASIO_DECL ~thread_pool();
-
- /// Obtains the executor associated with the pool.
- executor_type get_executor() BOOST_ASIO_NOEXCEPT;
-
- /// Stops the threads.
- /**
- * This function stops the threads as soon as possible. As a result of calling
- * @c stop(), pending function objects may be never be invoked.
- */
- BOOST_ASIO_DECL void stop();
-
- /// Joins the threads.
- /**
- * This function blocks until the threads in the pool have completed. If @c
- * stop() is not called prior to @c join(), the @c join() call will wait
- * until the pool has no more outstanding work.
- */
- BOOST_ASIO_DECL void join();
-
-private:
- friend class executor_type;
- struct thread_function;
-
- // The underlying scheduler.
- detail::scheduler& scheduler_;
-
- // The threads in the pool.
- detail::thread_group threads_;
-};
-
-/// Executor used to submit functions to a thread pool.
-class thread_pool::executor_type
-{
-public:
- /// Obtain the underlying execution context.
- thread_pool& context() const BOOST_ASIO_NOEXCEPT;
-
- /// Inform the thread pool that it has some outstanding work to do.
- /**
- * This function is used to inform the thread pool that some work has begun.
- * This ensures that the thread pool's join() function will not return while
- * the work is underway.
- */
- void on_work_started() const BOOST_ASIO_NOEXCEPT;
-
- /// Inform the thread pool that some work is no longer outstanding.
- /**
- * This function is used to inform the thread pool that some work has
- * finished. Once the count of unfinished work reaches zero, the thread
- * pool's join() function is permitted to exit.
- */
- void on_work_finished() const BOOST_ASIO_NOEXCEPT;
-
- /// Request the thread pool to invoke the given function object.
- /**
- * This function is used to ask the thread pool to execute the given function
- * object. If the current thread belongs to the pool, @c dispatch() executes
- * the function before returning. Otherwise, the function will be scheduled
- * to run on the thread pool.
- *
- * @param f The function object to be called. The executor will make
- * a copy of the handler object as required. The function signature of the
- * function object must be: @code void function(); @endcode
- *
- * @param a An allocator that may be used by the executor to allocate the
- * internal storage needed for function invocation.
- */
- template <typename Function, typename Allocator>
- void dispatch(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
-
- /// Request the thread pool to invoke the given function object.
- /**
- * This function is used to ask the thread pool to execute the given function
- * object. The function object will never be executed inside @c post().
- * Instead, it will be scheduled to run on the thread pool.
- *
- * @param f The function object to be called. The executor will make
- * a copy of the handler object as required. The function signature of the
- * function object must be: @code void function(); @endcode
- *
- * @param a An allocator that may be used by the executor to allocate the
- * internal storage needed for function invocation.
- */
- template <typename Function, typename Allocator>
- void post(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
-
- /// Request the thread pool to invoke the given function object.
- /**
- * This function is used to ask the thread pool to execute the given function
- * object. The function object will never be executed inside @c defer().
- * Instead, it will be scheduled to run on the thread pool.
- *
- * If the current thread belongs to the thread pool, @c defer() will delay
- * scheduling the function object until the current thread returns control to
- * the pool.
- *
- * @param f The function object to be called. The executor will make
- * a copy of the handler object as required. The function signature of the
- * function object must be: @code void function(); @endcode
- *
- * @param a An allocator that may be used by the executor to allocate the
- * internal storage needed for function invocation.
- */
- template <typename Function, typename Allocator>
- void defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
-
- /// Determine whether the thread pool is running in the current thread.
- /**
- * @return @c true if the current thread belongs to the pool. Otherwise
- * returns @c false.
- */
- bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT;
-
- /// Compare two executors for equality.
- /**
- * Two executors are equal if they refer to the same underlying thread pool.
- */
- friend bool operator==(const executor_type& a,
- const executor_type& b) BOOST_ASIO_NOEXCEPT
- {
- return &a.pool_ == &b.pool_;
- }
-
- /// Compare two executors for inequality.
- /**
- * Two executors are equal if they refer to the same underlying thread pool.
- */
- friend bool operator!=(const executor_type& a,
- const executor_type& b) BOOST_ASIO_NOEXCEPT
- {
- return &a.pool_ != &b.pool_;
- }
-
-private:
- friend class thread_pool;
-
- // Constructor.
- explicit executor_type(thread_pool& p) : pool_(p) {}
-
- // The underlying thread pool.
- thread_pool& pool_;
-};
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/thread_pool.hpp>
-#if defined(BOOST_ASIO_HEADER_ONLY)
-# include <boost/asio/impl/thread_pool.ipp>
-#endif // defined(BOOST_ASIO_HEADER_ONLY)
-
-#endif // BOOST_ASIO_THREAD_POOL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/use_future.hpp b/src/third_party/boost-1.68.0/boost/asio/use_future.hpp
deleted file mode 100644
index b2d65a6d0c5..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/use_future.hpp
+++ /dev/null
@@ -1,161 +0,0 @@
-//
-// use_future.hpp
-// ~~~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_USE_FUTURE_HPP
-#define BOOST_ASIO_USE_FUTURE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-
-#if defined(BOOST_ASIO_HAS_STD_FUTURE) \
- || defined(GENERATING_DOCUMENTATION)
-
-#include <memory>
-#include <boost/asio/detail/type_traits.hpp>
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-namespace detail {
-
-template <typename Function, typename Allocator>
-class packaged_token;
-
-template <typename Function, typename Allocator, typename Result>
-class packaged_handler;
-
-} // namespace detail
-
-/// Class used to specify that an asynchronous operation should return a future.
-/**
- * The use_future_t class is used to indicate that an asynchronous operation
- * should return a std::future object. A use_future_t object may be passed as a
- * handler to an asynchronous operation, typically using the special value @c
- * boost::asio::use_future. For example:
- *
- * @code std::future<std::size_t> my_future
- * = my_socket.async_read_some(my_buffer, boost::asio::use_future); @endcode
- *
- * The initiating function (async_read_some in the above example) returns a
- * future that will receive the result of the operation. If the operation
- * completes with an error_code indicating failure, it is converted into a
- * system_error and passed back to the caller via the future.
- */
-template <typename Allocator = std::allocator<void> >
-class use_future_t
-{
-public:
- /// The allocator type. The allocator is used when constructing the
- /// @c std::promise object for a given asynchronous operation.
- typedef Allocator allocator_type;
-
- /// Construct using default-constructed allocator.
- BOOST_ASIO_CONSTEXPR use_future_t()
- {
- }
-
- /// Construct using specified allocator.
- explicit use_future_t(const Allocator& allocator)
- : allocator_(allocator)
- {
- }
-
-#if !defined(BOOST_ASIO_NO_DEPRECATED)
- /// (Deprecated: Use rebind().) Specify an alternate allocator.
- template <typename OtherAllocator>
- use_future_t<OtherAllocator> operator[](const OtherAllocator& allocator) const
- {
- return use_future_t<OtherAllocator>(allocator);
- }
-#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
-
- /// Specify an alternate allocator.
- template <typename OtherAllocator>
- use_future_t<OtherAllocator> rebind(const OtherAllocator& allocator) const
- {
- return use_future_t<OtherAllocator>(allocator);
- }
-
- /// Obtain allocator.
- allocator_type get_allocator() const
- {
- return allocator_;
- }
-
- /// Wrap a function object in a packaged task.
- /**
- * The @c package function is used to adapt a function object as a packaged
- * task. When this adapter is passed as a completion token to an asynchronous
- * operation, the result of the function object is retuned via a std::future.
- *
- * @par Example
- *
- * @code std::future<std::size_t> fut =
- * my_socket.async_read_some(buffer,
- * use_future([](boost::system::error_code ec, std::size_t n)
- * {
- * return ec ? 0 : n;
- * }));
- * ...
- * std::size_t n = fut.get(); @endcode
- */
- template <typename Function>
-#if defined(GENERATING_DOCUMENTATION)
- unspecified
-#else // defined(GENERATING_DOCUMENTATION)
- detail::packaged_token<typename decay<Function>::type, Allocator>
-#endif // defined(GENERATING_DOCUMENTATION)
- operator()(BOOST_ASIO_MOVE_ARG(Function) f) const;
-
-private:
- // Helper type to ensure that use_future can be constexpr default-constructed
- // even when std::allocator<void> can't be.
- struct std_allocator_void
- {
- BOOST_ASIO_CONSTEXPR std_allocator_void()
- {
- }
-
- operator std::allocator<void>() const
- {
- return std::allocator<void>();
- }
- };
-
- typename conditional<
- is_same<std::allocator<void>, Allocator>::value,
- std_allocator_void, Allocator>::type allocator_;
-};
-
-/// A special value, similar to std::nothrow.
-/**
- * See the documentation for boost::asio::use_future_t for a usage example.
- */
-#if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
-constexpr use_future_t<> use_future;
-#elif defined(BOOST_ASIO_MSVC)
-__declspec(selectany) use_future_t<> use_future;
-#endif
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/use_future.hpp>
-
-#endif // defined(BOOST_ASIO_HAS_STD_FUTURE)
- // || defined(GENERATING_DOCUMENTATION)
-
-#endif // BOOST_ASIO_USE_FUTURE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/version.hpp b/src/third_party/boost-1.68.0/boost/asio/version.hpp
deleted file mode 100644
index f7a02913c31..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/version.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// version.hpp
-// ~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_VERSION_HPP
-#define BOOST_ASIO_VERSION_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-// BOOST_ASIO_VERSION % 100 is the sub-minor version
-// BOOST_ASIO_VERSION / 100 % 1000 is the minor version
-// BOOST_ASIO_VERSION / 100000 is the major version
-#define BOOST_ASIO_VERSION 101201 // 1.12.1
-
-#endif // BOOST_ASIO_VERSION_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/write.hpp b/src/third_party/boost-1.68.0/boost/asio/write.hpp
deleted file mode 100644
index 50095dbdf72..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/write.hpp
+++ /dev/null
@@ -1,929 +0,0 @@
-//
-// write.hpp
-// ~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_WRITE_HPP
-#define BOOST_ASIO_WRITE_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/buffer.hpp>
-#include <boost/asio/error.hpp>
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-# include <boost/asio/basic_streambuf_fwd.hpp>
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/**
- * @defgroup write boost::asio::write
- *
- * @brief Write a certain amount of data to a stream before returning.
- */
-/*@{*/
-
-/// Write all of the supplied data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param buffers One or more buffers containing the data to be written. The sum
- * of the buffer sizes indicates the maximum number of bytes to write to the
- * stream.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::write(s, boost::asio::buffer(data, size)); @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write(
- * s, buffers,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncWriteStream, typename ConstBufferSequence>
-std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
-
-/// Write all of the supplied data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param buffers One or more buffers containing the data to be written. The sum
- * of the buffer sizes indicates the maximum number of bytes to write to the
- * stream.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::write(s, boost::asio::buffer(data, size), ec); @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write(
- * s, buffers,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncWriteStream, typename ConstBufferSequence>
-std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- boost::system::error_code& ec,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
-
-/// Write a certain amount of data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param buffers One or more buffers containing the data to be written. The sum
- * of the buffer sizes indicates the maximum number of bytes to write to the
- * stream.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's write_some function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::write(s, boost::asio::buffer(data, size),
- * boost::asio::transfer_at_least(32)); @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename SyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition>
-std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
-
-/// Write a certain amount of data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param buffers One or more buffers containing the data to be written. The sum
- * of the buffer sizes indicates the maximum number of bytes to write to the
- * stream.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's write_some function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition>
-std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
-
-/// Write all of the supplied data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied dynamic buffer sequence has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param buffers The dynamic buffer sequence from which data will be written.
- * Successfully written data is automatically consumed from the buffers.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write(
- * s, buffers,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncWriteStream, typename DynamicBuffer>
-std::size_t write(SyncWriteStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-/// Write all of the supplied data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied dynamic buffer sequence has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param buffers The dynamic buffer sequence from which data will be written.
- * Successfully written data is automatically consumed from the buffers.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write(
- * s, buffers,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncWriteStream, typename DynamicBuffer>
-std::size_t write(SyncWriteStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- boost::system::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-/// Write a certain amount of data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied dynamic buffer sequence has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param buffers The dynamic buffer sequence from which data will be written.
- * Successfully written data is automatically consumed from the buffers.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's write_some function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
-template <typename SyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition>
-std::size_t write(SyncWriteStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-/// Write a certain amount of data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied dynamic buffer sequence has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param buffers The dynamic buffer sequence from which data will be written.
- * Successfully written data is automatically consumed from the buffers.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's write_some function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition>
-std::size_t write(SyncWriteStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Write all of the supplied data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param b The basic_streambuf object from which data will be written.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write(
- * s, b,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncWriteStream, typename Allocator>
-std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b);
-
-/// Write all of the supplied data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param b The basic_streambuf object from which data will be written.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write(
- * s, b,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncWriteStream, typename Allocator>
-std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
- boost::system::error_code& ec);
-
-/// Write a certain amount of data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param b The basic_streambuf object from which data will be written.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's write_some function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
-template <typename SyncWriteStream, typename Allocator,
- typename CompletionCondition>
-std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition);
-
-/// Write a certain amount of data to a stream before returning.
-/**
- * This function is used to write a certain number of bytes of data to a stream.
- * The call will block until one of the following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * write_some function.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the SyncWriteStream concept.
- *
- * @param b The basic_streambuf object from which data will be written.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's write_some function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncWriteStream, typename Allocator,
- typename CompletionCondition>
-std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition, boost::system::error_code& ec);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-/**
- * @defgroup async_write boost::asio::async_write
- *
- * @brief Start an asynchronous operation to write a certain amount of data to a
- * stream.
- */
-/*@{*/
-
-/// Start an asynchronous operation to write all of the supplied data to a
-/// stream.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_write_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other write operations (such
- * as async_write, the stream's async_write_some function, or any other composed
- * operations that perform writes) until this operation completes.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the AsyncWriteStream concept.
- *
- * @param buffers One or more buffers containing the data to be written.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * boost::asio::async_write(s, boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
-
-/// Start an asynchronous operation to write a certain amount of data to a
-/// stream.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_write_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other write operations (such
- * as async_write, the stream's async_write_some function, or any other composed
- * operations that perform writes) until this operation completes.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the AsyncWriteStream concept.
- *
- * @param buffers One or more buffers containing the data to be written.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's async_write_some function.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::async_write(s,
- * boost::asio::buffer(data, size),
- * boost::asio::transfer_at_least(32),
- * handler); @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
- is_const_buffer_sequence<ConstBufferSequence>::value
- >::type* = 0);
-
-/// Start an asynchronous operation to write all of the supplied data to a
-/// stream.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li All of the data in the supplied dynamic buffer sequence has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_write_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other write operations (such
- * as async_write, the stream's async_write_some function, or any other composed
- * operations that perform writes) until this operation completes.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the AsyncWriteStream concept.
- *
- * @param buffers The dynamic buffer sequence from which data will be written.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called. Successfully written
- * data is automatically consumed from the buffers.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncWriteStream,
- typename DynamicBuffer, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-/// Start an asynchronous operation to write a certain amount of data to a
-/// stream.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li All of the data in the supplied dynamic buffer sequence has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_write_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other write operations (such
- * as async_write, the stream's async_write_some function, or any other composed
- * operations that perform writes) until this operation completes.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the AsyncWriteStream concept.
- *
- * @param buffers The dynamic buffer sequence from which data will be written.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called. Successfully written
- * data is automatically consumed from the buffers.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's async_write_some function.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncWriteStream, typename DynamicBuffer,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write(AsyncWriteStream& s,
- BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
- typename enable_if<
- is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
- >::type* = 0);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Start an asynchronous operation to write all of the supplied data to a
-/// stream.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_write_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other write operations (such
- * as async_write, the stream's async_write_some function, or any other composed
- * operations that perform writes) until this operation completes.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the AsyncWriteStream concept.
- *
- * @param b A basic_streambuf object from which data will be written. Ownership
- * of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
-
-/// Start an asynchronous operation to write a certain amount of data to a
-/// stream.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a stream. The function call always returns immediately. The
- * asynchronous operation will continue until one of the following conditions
- * is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the stream's
- * async_write_some function, and is known as a <em>composed operation</em>. The
- * program must ensure that the stream performs no other write operations (such
- * as async_write, the stream's async_write_some function, or any other composed
- * operations that perform writes) until this operation completes.
- *
- * @param s The stream to which the data is to be written. The type must support
- * the AsyncWriteStream concept.
- *
- * @param b A basic_streambuf object from which data will be written. Ownership
- * of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_write_some operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the stream's async_write_some function.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * const boost::system::error_code& error, // Result of operation.
- *
- * std::size_t bytes_transferred // Number of bytes written from the
- * // buffers. If an error occurred,
- * // this will be less than the sum
- * // of the buffer sizes.
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncWriteStream, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/write.hpp>
-
-#endif // BOOST_ASIO_WRITE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/write_at.hpp b/src/third_party/boost-1.68.0/boost/asio/write_at.hpp
deleted file mode 100644
index 766a8e89c43..00000000000
--- a/src/third_party/boost-1.68.0/boost/asio/write_at.hpp
+++ /dev/null
@@ -1,679 +0,0 @@
-//
-// write_at.hpp
-// ~~~~~~~~~~~~
-//
-// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_ASIO_WRITE_AT_HPP
-#define BOOST_ASIO_WRITE_AT_HPP
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# pragma once
-#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
-
-#include <boost/asio/detail/config.hpp>
-#include <cstddef>
-#include <boost/asio/async_result.hpp>
-#include <boost/asio/detail/cstdint.hpp>
-#include <boost/asio/error.hpp>
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-# include <boost/asio/basic_streambuf_fwd.hpp>
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-#include <boost/asio/detail/push_options.hpp>
-
-namespace boost {
-namespace asio {
-
-/**
- * @defgroup write_at boost::asio::write_at
- *
- * @brief Write a certain amount of data at a specified offset before returning.
- */
-/*@{*/
-
-/// Write all of the supplied data at the specified offset before returning.
-/**
- * This function is used to write a certain number of bytes of data to a random
- * access device at a specified offset. The call will block until one of the
- * following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * write_some_at function.
- *
- * @param d The device to which the data is to be written. The type must support
- * the SyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more buffers containing the data to be written. The sum
- * of the buffer sizes indicates the maximum number of bytes to write to the
- * device.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::write_at(d, 42, boost::asio::buffer(data, size)); @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write_at(
- * d, offset, buffers,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
-std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers);
-
-/// Write all of the supplied data at the specified offset before returning.
-/**
- * This function is used to write a certain number of bytes of data to a random
- * access device at a specified offset. The call will block until one of the
- * following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * write_some_at function.
- *
- * @param d The device to which the data is to be written. The type must support
- * the SyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more buffers containing the data to be written. The sum
- * of the buffer sizes indicates the maximum number of bytes to write to the
- * device.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::write_at(d, 42,
- * boost::asio::buffer(data, size), ec); @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write_at(
- * d, offset, buffers,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
-std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- boost::system::error_code& ec);
-
-/// Write a certain amount of data at a specified offset before returning.
-/**
- * This function is used to write a certain number of bytes of data to a random
- * access device at a specified offset. The call will block until one of the
- * following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * write_some_at function.
- *
- * @param d The device to which the data is to be written. The type must support
- * the SyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more buffers containing the data to be written. The sum
- * of the buffer sizes indicates the maximum number of bytes to write to the
- * device.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the device's write_some_at function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::write_at(d, 42, boost::asio::buffer(data, size),
- * boost::asio::transfer_at_least(32)); @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename CompletionCondition>
-std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition);
-
-/// Write a certain amount of data at a specified offset before returning.
-/**
- * This function is used to write a certain number of bytes of data to a random
- * access device at a specified offset. The call will block until one of the
- * following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * write_some_at function.
- *
- * @param d The device to which the data is to be written. The type must support
- * the SyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more buffers containing the data to be written. The sum
- * of the buffer sizes indicates the maximum number of bytes to write to the
- * device.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the device's write_some_at function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename CompletionCondition>
-std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition, boost::system::error_code& ec);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Write all of the supplied data at the specified offset before returning.
-/**
- * This function is used to write a certain number of bytes of data to a random
- * access device at a specified offset. The call will block until one of the
- * following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * write_some_at function.
- *
- * @param d The device to which the data is to be written. The type must support
- * the SyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param b The basic_streambuf object from which data will be written.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write_at(
- * d, 42, b,
- * boost::asio::transfer_all()); @endcode
- */
-template <typename SyncRandomAccessWriteDevice, typename Allocator>
-std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b);
-
-/// Write all of the supplied data at the specified offset before returning.
-/**
- * This function is used to write a certain number of bytes of data to a random
- * access device at a specified offset. The call will block until one of the
- * following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * write_some_at function.
- *
- * @param d The device to which the data is to be written. The type must support
- * the SyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param b The basic_streambuf object from which data will be written.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes transferred.
- *
- * @note This overload is equivalent to calling:
- * @code boost::asio::write_at(
- * d, 42, b,
- * boost::asio::transfer_all(), ec); @endcode
- */
-template <typename SyncRandomAccessWriteDevice, typename Allocator>
-std::size_t write_at(SyncRandomAccessWriteDevice& d,
- uint64_t offset, basic_streambuf<Allocator>& b,
- boost::system::error_code& ec);
-
-/// Write a certain amount of data at a specified offset before returning.
-/**
- * This function is used to write a certain number of bytes of data to a random
- * access device at a specified offset. The call will block until one of the
- * following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * write_some_at function.
- *
- * @param d The device to which the data is to be written. The type must support
- * the SyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param b The basic_streambuf object from which data will be written.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the device's write_some_at function.
- *
- * @returns The number of bytes transferred.
- *
- * @throws boost::system::system_error Thrown on failure.
- */
-template <typename SyncRandomAccessWriteDevice, typename Allocator,
- typename CompletionCondition>
-std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
- basic_streambuf<Allocator>& b, CompletionCondition completion_condition);
-
-/// Write a certain amount of data at a specified offset before returning.
-/**
- * This function is used to write a certain number of bytes of data to a random
- * access device at a specified offset. The call will block until one of the
- * following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * write_some_at function.
- *
- * @param d The device to which the data is to be written. The type must support
- * the SyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param b The basic_streambuf object from which data will be written.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest write_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the device's write_some_at function.
- *
- * @param ec Set to indicate what error occurred, if any.
- *
- * @returns The number of bytes written. If an error occurs, returns the total
- * number of bytes successfully transferred prior to the error.
- */
-template <typename SyncRandomAccessWriteDevice, typename Allocator,
- typename CompletionCondition>
-std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
- basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
- boost::system::error_code& ec);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-/**
- * @defgroup async_write_at boost::asio::async_write_at
- *
- * @brief Start an asynchronous operation to write a certain amount of data at
- * the specified offset.
- */
-/*@{*/
-
-/// Start an asynchronous operation to write all of the supplied data at the
-/// specified offset.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * async_write_some_at function, and is known as a <em>composed operation</em>.
- * The program must ensure that the device performs no <em>overlapping</em>
- * write operations (such as async_write_at, the device's async_write_some_at
- * function, or any other composed operations that perform writes) until this
- * operation completes. Operations are overlapping if the regions defined by
- * their offsets, and the numbers of bytes to write, intersect.
- *
- * @param d The device to which the data is to be written. The type must support
- * the AsyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more buffers containing the data to be written.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of
- * the handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes written from the buffers. If an error
- * // occurred, this will be less than the sum of the buffer sizes.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code
- * boost::asio::async_write_at(d, 42, boost::asio::buffer(data, size), handler);
- * @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
- const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
-
-/// Start an asynchronous operation to write a certain amount of data at the
-/// specified offset.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
- *
- * @li All of the data in the supplied buffers has been written. That is, the
- * bytes transferred is equal to the sum of the buffer sizes.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * async_write_some_at function, and is known as a <em>composed operation</em>.
- * The program must ensure that the device performs no <em>overlapping</em>
- * write operations (such as async_write_at, the device's async_write_some_at
- * function, or any other composed operations that perform writes) until this
- * operation completes. Operations are overlapping if the regions defined by
- * their offsets, and the numbers of bytes to write, intersect.
- *
- * @param d The device to which the data is to be written. The type must support
- * the AsyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param buffers One or more buffers containing the data to be written.
- * Although the buffers object may be copied as necessary, ownership of the
- * underlying memory blocks is retained by the caller, which must guarantee
- * that they remain valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_write_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the device's async_write_some_at function.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes written from the buffers. If an error
- * // occurred, this will be less than the sum of the buffer sizes.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- *
- * @par Example
- * To write a single data buffer use the @ref buffer function as follows:
- * @code boost::asio::async_write_at(d, 42,
- * boost::asio::buffer(data, size),
- * boost::asio::transfer_at_least(32),
- * handler); @endcode
- * See the @ref buffer documentation for information on writing multiple
- * buffers in one go, and how to use it with arrays, boost::array or
- * std::vector.
- */
-template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d,
- uint64_t offset, const ConstBufferSequence& buffers,
- CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
-
-#if !defined(BOOST_ASIO_NO_EXTENSIONS)
-#if !defined(BOOST_ASIO_NO_IOSTREAM)
-
-/// Start an asynchronous operation to write all of the supplied data at the
-/// specified offset.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li An error occurred.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * async_write_some_at function, and is known as a <em>composed operation</em>.
- * The program must ensure that the device performs no <em>overlapping</em>
- * write operations (such as async_write_at, the device's async_write_some_at
- * function, or any other composed operations that perform writes) until this
- * operation completes. Operations are overlapping if the regions defined by
- * their offsets, and the numbers of bytes to write, intersect.
- *
- * @param d The device to which the data is to be written. The type must support
- * the AsyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param b A basic_streambuf object from which data will be written. Ownership
- * of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes written from the buffers. If an error
- * // occurred, this will be less than the sum of the buffer sizes.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncRandomAccessWriteDevice, typename Allocator,
- typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
- basic_streambuf<Allocator>& b, BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
-
-/// Start an asynchronous operation to write a certain amount of data at the
-/// specified offset.
-/**
- * This function is used to asynchronously write a certain number of bytes of
- * data to a random access device at a specified offset. The function call
- * always returns immediately. The asynchronous operation will continue until
- * one of the following conditions is true:
- *
- * @li All of the data in the supplied basic_streambuf has been written.
- *
- * @li The completion_condition function object returns 0.
- *
- * This operation is implemented in terms of zero or more calls to the device's
- * async_write_some_at function, and is known as a <em>composed operation</em>.
- * The program must ensure that the device performs no <em>overlapping</em>
- * write operations (such as async_write_at, the device's async_write_some_at
- * function, or any other composed operations that perform writes) until this
- * operation completes. Operations are overlapping if the regions defined by
- * their offsets, and the numbers of bytes to write, intersect.
- *
- * @param d The device to which the data is to be written. The type must support
- * the AsyncRandomAccessWriteDevice concept.
- *
- * @param offset The offset at which the data will be written.
- *
- * @param b A basic_streambuf object from which data will be written. Ownership
- * of the streambuf is retained by the caller, which must guarantee that it
- * remains valid until the handler is called.
- *
- * @param completion_condition The function object to be called to determine
- * whether the write operation is complete. The signature of the function object
- * must be:
- * @code std::size_t completion_condition(
- * // Result of latest async_write_some_at operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes transferred so far.
- * std::size_t bytes_transferred
- * ); @endcode
- * A return value of 0 indicates that the write operation is complete. A
- * non-zero return value indicates the maximum number of bytes to be written on
- * the next call to the device's async_write_some_at function.
- *
- * @param handler The handler to be called when the write operation completes.
- * Copies will be made of the handler as required. The function signature of the
- * handler must be:
- * @code void handler(
- * // Result of operation.
- * const boost::system::error_code& error,
- *
- * // Number of bytes written from the buffers. If an error
- * // occurred, this will be less than the sum of the buffer sizes.
- * std::size_t bytes_transferred
- * ); @endcode
- * Regardless of whether the asynchronous operation completes immediately or
- * not, the handler will not be invoked from within this function. Invocation of
- * the handler will be performed in a manner equivalent to using
- * boost::asio::io_context::post().
- */
-template <typename AsyncRandomAccessWriteDevice, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
- void (boost::system::error_code, std::size_t))
-async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
- basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
-
-#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
-#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
-
-/*@}*/
-
-} // namespace asio
-} // namespace boost
-
-#include <boost/asio/detail/pop_options.hpp>
-
-#include <boost/asio/impl/write_at.hpp>
-
-#endif // BOOST_ASIO_WRITE_AT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/assign/assignment_exception.hpp b/src/third_party/boost-1.68.0/boost/assign/assignment_exception.hpp
deleted file mode 100644
index 96ea41741c0..00000000000
--- a/src/third_party/boost-1.68.0/boost/assign/assignment_exception.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-// Boost.Assign library
-//
-// Copyright Thorsten Ottosen 2003-2004. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// For more information, see http://www.boost.org/libs/assign/
-//
-
-
-#ifndef BOOST_ASSIGN_ASSIGNMENT_EXCEPTION_HPP
-#define BOOST_ASSIGN_ASSIGNMENT_EXCEPTION_HPP
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <exception>
-
-namespace boost
-{
- namespace assign
- {
- class assignment_exception : public std::exception
- {
- public:
- assignment_exception( const char* _what )
- : what_( _what )
- { }
-
- virtual const char* what() const throw()
- {
- return what_;
- }
-
- private:
- const char* what_;
- };
- }
-}
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/assign/list_of.hpp b/src/third_party/boost-1.68.0/boost/assign/list_of.hpp
deleted file mode 100644
index cc043d375d5..00000000000
--- a/src/third_party/boost-1.68.0/boost/assign/list_of.hpp
+++ /dev/null
@@ -1,682 +0,0 @@
-// Boost.Assign library
-//
-// Copyright Thorsten Ottosen 2003-2004. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// For more information, see http://www.boost.org/libs/assign/
-//
-
-
-#ifndef BOOST_ASSIGN_LIST_OF_HPP
-#define BOOST_ASSIGN_LIST_OF_HPP
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/assign/assignment_exception.hpp>
-#include <boost/range/iterator_range.hpp>
-#include <boost/config.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/decay.hpp>
-#include <boost/type_traits/is_array.hpp>
-#include <boost/mpl/if.hpp>
-#include <deque>
-#include <cstddef>
-#include <utility>
-
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-// BCB requires full type definition for is_array<> to work correctly.
-#include <boost/array.hpp>
-#endif
-
-namespace boost
-{
-
-// this here is necessary to avoid compiler error in <boost/array.hpp>
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- template< class T, std::size_t sz >
- class array;
-#endif
-
-namespace assign_detail
-{
- /////////////////////////////////////////////////////////////////////////
- // Part 0: common conversion code
- /////////////////////////////////////////////////////////////////////////
-
- template< class T >
- struct assign_decay
- {
- //
- // Add constness to array parameters
- // to support string literals properly
- //
- typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
- ::boost::is_array<T>,
- ::boost::decay<const T>,
- ::boost::decay<T> >::type type;
- };
-
- template< class T, std::size_t sz >
- type_traits::yes_type assign_is_array( const array<T,sz>* );
- type_traits::no_type assign_is_array( ... );
- template< class T, class U >
- type_traits::yes_type assign_is_pair( const std::pair<T,U>* );
- type_traits::no_type assign_is_pair( ... );
-
-
-
- struct array_type_tag
- {
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- private:
- char dummy_; // BCB would by default use 8 bytes
- #endif
- };
- struct adapter_type_tag
- {
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- private:
- char dummy_; // BCB would by default use 8 bytes
- #endif
- };
- struct pair_type_tag
- {
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- private:
- char dummy_; // BCB would by default use 8 bytes
- #endif
- };
- struct default_type_tag
- {
- #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- private:
- char dummy_; // BCB would by default use 8 bytes
- #endif
- };
-
-
-
- template< class DerivedTAssign, class Iterator >
- class converter
- {
- public: // Range operations
- typedef Iterator iterator;
- typedef Iterator const_iterator;
-
- iterator begin() const
- {
- return static_cast<const DerivedTAssign*>(this)->begin();
- }
-
- iterator end() const
- {
- return static_cast<const DerivedTAssign*>(this)->end();
- }
-
- public:
-
- template< class Container >
- Container convert_to_container() const
- {
- static Container* c = 0;
- BOOST_STATIC_CONSTANT( bool, is_array_flag = sizeof( assign_detail::assign_is_array( c ) )
- == sizeof( type_traits::yes_type ) );
-
- typedef BOOST_DEDUCED_TYPENAME mpl::if_c< is_array_flag,
- array_type_tag,
- default_type_tag >::type tag_type;
-
- return convert<Container>( c, tag_type() );
- }
-
- private:
-
- template< class Container >
- Container convert( const Container*, default_type_tag ) const
- {
-
-#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
-// old Dinkumware doesn't support iterator type as template
- Container result;
- iterator it = begin(),
- e = end();
- while( it != e )
- {
- result.insert( result.end(), *it );
- ++it;
- }
- return result;
-#else
- return Container( begin(), end() );
-#endif
- }
-
- template< class Array >
- Array convert( const Array*, array_type_tag ) const
- {
- typedef BOOST_DEDUCED_TYPENAME Array::value_type value_type;
-
-#if BOOST_WORKAROUND(BOOST_INTEL, <= 910 ) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580 )
- BOOST_DEDUCED_TYPENAME remove_const<Array>::type ar;
-#else
- Array ar;
-#endif
- const std::size_t sz = ar.size();
- if( sz < static_cast<const DerivedTAssign*>(this)->size() )
- BOOST_THROW_EXCEPTION( assign::assignment_exception( "array initialized with too many elements" ) );
- std::size_t n = 0;
- iterator i = begin(),
- e = end();
- for( ; i != e; ++i, ++n )
- ar[n] = *i;
- for( ; n < sz; ++n )
- ar[n] = value_type();
- return ar;
- }
-
- template< class Adapter >
- Adapter convert_to_adapter( const Adapter* = 0 ) const
- {
- Adapter a;
- iterator i = begin(),
- e = end();
- for( ; i != e; ++i )
- a.push( *i );
- return a;
- }
-
- private:
- struct adapter_converter;
- friend struct adapter_converter;
-
- struct adapter_converter
- {
- const converter& gl;
- adapter_converter( const converter& this_ ) : gl( this_ )
- {}
-
- adapter_converter( const adapter_converter& r )
- : gl( r.gl )
- { }
-
- template< class Adapter >
- operator Adapter() const
- {
- return gl.convert_to_adapter<Adapter>();
- }
- };
-
- public:
- template< class Container >
- Container to_container( Container& c ) const
- {
- return convert( &c, default_type_tag() );
- }
-
- adapter_converter to_adapter() const
- {
- return adapter_converter( *this );
- }
-
- template< class Adapter >
- Adapter to_adapter( Adapter& a ) const
- {
- return this->convert_to_adapter( &a );
- }
-
- template< class Array >
- Array to_array( Array& a ) const
- {
- return convert( &a, array_type_tag() );
- }
- };
-
- template< class T, class I, class Range >
- inline bool operator==( const converter<T,I>& l, const Range& r )
- {
- return ::boost::iterator_range_detail::equal( l, r );
- }
-
- template< class T, class I, class Range >
- inline bool operator==( const Range& l, const converter<T,I>& r )
- {
- return r == l;
- }
-
- template< class T, class I, class Range >
- inline bool operator!=( const converter<T,I>& l, const Range& r )
- {
- return !( l == r );
- }
-
- template< class T, class I, class Range >
- inline bool operator!=( const Range& l, const converter<T,I>& r )
- {
- return !( l == r );
- }
-
- template< class T, class I, class Range >
- inline bool operator<( const converter<T,I>& l, const Range& r )
- {
- return ::boost::iterator_range_detail::less_than( l, r );
- }
-
- template< class T, class I, class Range >
- inline bool operator<( const Range& l, const converter<T,I>& r )
- {
- return ::boost::iterator_range_detail::less_than( l, r );
- }
-
- template< class T, class I, class Range >
- inline bool operator>( const converter<T,I>& l, const Range& r )
- {
- return r < l;
- }
-
- template< class T, class I, class Range >
- inline bool operator>( const Range& l, const converter<T,I>& r )
- {
- return r < l;
- }
-
- template< class T, class I, class Range >
- inline bool operator<=( const converter<T,I>& l, const Range& r )
- {
- return !( l > r );
- }
-
- template< class T, class I, class Range >
- inline bool operator<=( const Range& l, const converter<T,I>& r )
- {
- return !( l > r );
- }
-
- template< class T, class I, class Range >
- inline bool operator>=( const converter<T,I>& l, const Range& r )
- {
- return !( l < r );
- }
-
- template< class T, class I, class Range >
- inline bool operator>=( const Range& l, const converter<T,I>& r )
- {
- return !( l < r );
- }
-
- template< class T, class I, class Elem, class Traits >
- inline std::basic_ostream<Elem,Traits>&
- operator<<( std::basic_ostream<Elem, Traits>& Os,
- const converter<T,I>& r )
- {
- return Os << ::boost::make_iterator_range( r.begin(), r.end() );
- }
-
- /////////////////////////////////////////////////////////////////////////
- // Part 1: flexible, but inefficient interface
- /////////////////////////////////////////////////////////////////////////
-
- template< class T >
- class generic_list :
- public converter< generic_list< BOOST_DEDUCED_TYPENAME assign_decay<T>::type >,
- BOOST_DEDUCED_TYPENAME std::deque<BOOST_DEDUCED_TYPENAME
- assign_decay<T>::type>::iterator >
- {
- typedef BOOST_DEDUCED_TYPENAME assign_decay<T>::type Ty;
- typedef std::deque<Ty> impl_type;
- mutable impl_type values_;
-
- public:
- typedef BOOST_DEDUCED_TYPENAME impl_type::iterator iterator;
- typedef iterator const_iterator;
- typedef BOOST_DEDUCED_TYPENAME impl_type::value_type value_type;
- typedef BOOST_DEDUCED_TYPENAME impl_type::size_type size_type;
- typedef BOOST_DEDUCED_TYPENAME impl_type::difference_type difference_type;
-
- public:
- iterator begin() const { return values_.begin(); }
- iterator end() const { return values_.end(); }
- bool empty() const { return values_.empty(); }
- size_type size() const { return values_.size(); }
-
- private:
- void push_back( value_type r ) { values_.push_back( r ); }
-
- public:
- generic_list& operator,( const Ty& u )
- {
- this->push_back( u );
- return *this;
- }
-
- generic_list& operator()()
- {
- this->push_back( Ty() );
- return *this;
- }
-
- generic_list& operator()( const Ty& u )
- {
- this->push_back( u );
- return *this;
- }
-
-
-#ifndef BOOST_ASSIGN_MAX_PARAMS // use user's value
-#define BOOST_ASSIGN_MAX_PARAMS 5
-#endif
-#define BOOST_ASSIGN_MAX_PARAMETERS (BOOST_ASSIGN_MAX_PARAMS - 1)
-#define BOOST_ASSIGN_PARAMS1(n) BOOST_PP_ENUM_PARAMS(n, class U)
-#define BOOST_ASSIGN_PARAMS2(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, const& u)
-#define BOOST_ASSIGN_PARAMS3(n) BOOST_PP_ENUM_PARAMS(n, u)
-#define BOOST_ASSIGN_PARAMS4(n) BOOST_PP_ENUM_PARAMS(n, U)
-#define BOOST_ASSIGN_PARAMS2_NO_REF(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, u)
-
-#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
-#define BOOST_PP_LOCAL_MACRO(n) \
- template< class U, BOOST_ASSIGN_PARAMS1(n) > \
- generic_list& operator()(U const& u, BOOST_ASSIGN_PARAMS2(n) ) \
- { \
- this->push_back( Ty(u, BOOST_ASSIGN_PARAMS3(n))); \
- return *this; \
- } \
- /**/
-
-#include BOOST_PP_LOCAL_ITERATE()
-
-
- template< class U >
- generic_list& repeat( std::size_t sz, U u )
- {
- std::size_t i = 0;
- while( i++ != sz )
- this->push_back( u );
- return *this;
- }
-
- template< class Nullary_function >
- generic_list& repeat_fun( std::size_t sz, Nullary_function fun )
- {
- std::size_t i = 0;
- while( i++ != sz )
- this->push_back( fun() );
- return *this;
- }
-
- template< class SinglePassIterator >
- generic_list& range( SinglePassIterator first,
- SinglePassIterator last )
- {
- for( ; first != last; ++first )
- this->push_back( *first );
- return *this;
- }
-
- template< class SinglePassRange >
- generic_list& range( const SinglePassRange& r )
- {
- return range( boost::begin(r), boost::end(r) );
- }
-
- template< class Container >
- operator Container() const
- {
- return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
- }
- };
-
- /////////////////////////////////////////////////////////////////////////
- // Part 2: efficient, but inconvenient interface
- /////////////////////////////////////////////////////////////////////////
-
- template< class T >
- struct assign_reference
- {
- assign_reference()
- { /* intentionally empty */ }
-
- assign_reference( T& r ) : ref_(&r)
- { }
-
- void operator=( T& r )
- {
- ref_ = &r;
- }
-
- operator T&() const
- {
- return *ref_;
- }
-
- void swap( assign_reference& r )
- {
- std::swap( *ref_, *r.ref_ );
- }
-
- T& get_ref() const
- {
- return *ref_;
- }
-
- private:
- T* ref_;
-
- };
-
- template< class T >
- inline bool operator<( const assign_reference<T>& l,
- const assign_reference<T>& r )
- {
- return l.get_ref() < r.get_ref();
- }
-
- template< class T >
- inline bool operator>( const assign_reference<T>& l,
- const assign_reference<T>& r )
- {
- return l.get_ref() > r.get_ref();
- }
-
- template< class T >
- inline void swap( assign_reference<T>& l,
- assign_reference<T>& r )
- {
- l.swap( r );
- }
-
-
-
- template< class T, int N >
- struct static_generic_list :
- public converter< static_generic_list<T,N>, assign_reference<T>* >
- {
- private:
- typedef T internal_value_type;
-
- public:
- typedef assign_reference<internal_value_type> value_type;
- typedef value_type* iterator;
- typedef value_type* const_iterator;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
-
- static_generic_list( T& r ) :
- current_(1)
- {
- refs_[0] = r;
- }
-
- static_generic_list& operator()( T& r )
- {
- insert( r );
- return *this;
- }
-
- iterator begin() const
- {
- return &refs_[0];
- }
-
- iterator end() const
- {
- return &refs_[current_];
- }
-
- size_type size() const
- {
- return static_cast<size_type>( current_ );
- }
-
- bool empty() const
- {
- return false;
- }
-
- template< class ForwardIterator >
- static_generic_list& range( ForwardIterator first,
- ForwardIterator last )
- {
- for( ; first != last; ++first )
- this->insert( *first );
- return *this;
- }
-
- template< class ForwardRange >
- static_generic_list& range( ForwardRange& r )
- {
- return range( boost::begin(r), boost::end(r) );
- }
-
- template< class ForwardRange >
- static_generic_list& range( const ForwardRange& r )
- {
- return range( boost::begin(r), boost::end(r) );
- }
-
- template< class Container >
- operator Container() const
- {
- return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
- }
-
- private:
- void insert( T& r )
- {
- refs_[current_] = r;
- ++current_;
- }
-
- static_generic_list();
-
- mutable assign_reference<internal_value_type> refs_[N];
- int current_;
- };
-
-} // namespace 'assign_detail'
-
-namespace assign
-{
- template< class T >
- inline assign_detail::generic_list<T>
- list_of()
- {
- return assign_detail::generic_list<T>()( T() );
- }
-
- template< class T >
- inline assign_detail::generic_list<T>
- list_of( const T& t )
- {
- return assign_detail::generic_list<T>()( t );
- }
-
- template< int N, class T >
- inline assign_detail::static_generic_list< BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>
- ref_list_of( T& t )
- {
- return assign_detail::static_generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>( t );
- }
-
- template< int N, class T >
- inline assign_detail::static_generic_list<const BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>
- cref_list_of( const T& t )
- {
- return assign_detail::static_generic_list<const BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>( t );
- }
-
-#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
-#define BOOST_PP_LOCAL_MACRO(n) \
- template< class T, class U, BOOST_ASSIGN_PARAMS1(n) > \
- inline assign_detail::generic_list<T> \
- list_of(U const& u, BOOST_ASSIGN_PARAMS2(n) ) \
- { \
- return assign_detail::generic_list<T>()(u, BOOST_ASSIGN_PARAMS3(n)); \
- } \
- /**/
-
-#include BOOST_PP_LOCAL_ITERATE()
-
-#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
-#define BOOST_PP_LOCAL_MACRO(n) \
- template< class U, BOOST_ASSIGN_PARAMS1(n) > \
- inline assign_detail::generic_list< tuple<U, BOOST_ASSIGN_PARAMS4(n)> > \
- tuple_list_of(U u, BOOST_ASSIGN_PARAMS2_NO_REF(n) ) \
- { \
- return assign_detail::generic_list< tuple<U, BOOST_ASSIGN_PARAMS4(n)> >()( tuple<U,BOOST_ASSIGN_PARAMS4(n)>( u, BOOST_ASSIGN_PARAMS3(n) )); \
- } \
- /**/
-
-#include BOOST_PP_LOCAL_ITERATE()
-
-
- template< class Key, class T >
- inline assign_detail::generic_list< std::pair
- <
- BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<Key>::type,
- BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type
- > >
- map_list_of( const Key& k, const T& t )
- {
- typedef BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<Key>::type k_type;
- typedef BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type t_type;
- return assign_detail::generic_list< std::pair<k_type,t_type> >()( k, t );
- }
-
- template< class F, class S >
- inline assign_detail::generic_list< std::pair
- <
- BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<F>::type,
- BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<S>::type
- > >
- pair_list_of( const F& f, const S& s )
- {
- return map_list_of( f, s );
- }
-
-
-} // namespace 'assign'
-} // namespace 'boost'
-
-
-#undef BOOST_ASSIGN_PARAMS1
-#undef BOOST_ASSIGN_PARAMS2
-#undef BOOST_ASSIGN_PARAMS3
-#undef BOOST_ASSIGN_PARAMS4
-#undef BOOST_ASSIGN_PARAMS2_NO_REF
-#undef BOOST_ASSIGN_MAX_PARAMETERS
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/chrono.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/chrono.hpp
deleted file mode 100644
index 0bd3400a253..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/chrono.hpp
+++ /dev/null
@@ -1,242 +0,0 @@
-// mac/chrono.cpp --------------------------------------------------------------//
-
-// Copyright Beman Dawes 2008
-// Copyright 2009-2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-//----------------------------------------------------------------------------//
-// Mac //
-//----------------------------------------------------------------------------//
-
-#include <sys/time.h> //for gettimeofday and timeval
-#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
-#include <boost/assert.hpp>
-
-namespace boost
-{
-namespace chrono
-{
-
-// system_clock
-
-// gettimeofday is the most precise "system time" available on this platform.
-// It returns the number of microseconds since New Years 1970 in a struct called timeval
-// which has a field for seconds and a field for microseconds.
-// Fill in the timeval and then convert that to the time_point
-system_clock::time_point
-system_clock::now() BOOST_NOEXCEPT
-{
- timeval tv;
- gettimeofday(&tv, 0);
- return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-system_clock::time_point
-system_clock::now(system::error_code & ec)
-{
- timeval tv;
- gettimeofday(&tv, 0);
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
-}
-#endif
-// Take advantage of the fact that on this platform time_t is nothing but
-// an integral count of seconds since New Years 1970 (same epoch as timeval).
-// Just get the duration out of the time_point and truncate it to seconds.
-time_t
-system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT
-{
- return time_t(duration_cast<seconds>(t.time_since_epoch()).count());
-}
-
-// Just turn the time_t into a count of seconds and construct a time_point with it.
-system_clock::time_point
-system_clock::from_time_t(time_t t) BOOST_NOEXCEPT
-{
- return system_clock::time_point(seconds(t));
-}
-
-namespace chrono_detail
-{
-
-// steady_clock
-
-// Note, in this implementation steady_clock and high_resolution_clock
-// are the same clock. They are both based on mach_absolute_time().
-// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
-// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
-// are run time constants supplied by the OS. This clock has no relationship
-// to the Gregorian calendar. It's main use is as a high resolution timer.
-
-// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize
-// for that case as an optimization.
-BOOST_CHRONO_STATIC
-steady_clock::rep
-steady_simplified()
-{
- return mach_absolute_time();
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-BOOST_CHRONO_STATIC
-steady_clock::rep
-steady_simplified_ec(system::error_code & ec)
-{
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return mach_absolute_time();
-}
-#endif
-
-BOOST_CHRONO_STATIC
-double
-compute_steady_factor(kern_return_t& err)
-{
- mach_timebase_info_data_t MachInfo;
- err = mach_timebase_info(&MachInfo);
- if ( err != 0 ) {
- return 0;
- }
- return static_cast<double>(MachInfo.numer) / MachInfo.denom;
-}
-
-BOOST_CHRONO_STATIC
-steady_clock::rep
-steady_full()
-{
- kern_return_t err;
- const double factor = chrono_detail::compute_steady_factor(err);
- if (err != 0)
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-BOOST_CHRONO_STATIC
-steady_clock::rep
-steady_full_ec(system::error_code & ec)
-{
- kern_return_t err;
- const double factor = chrono_detail::compute_steady_factor(err);
- if (err != 0)
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- err,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::steady_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return steady_clock::rep();
- }
- }
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
-}
-#endif
-
-typedef steady_clock::rep (*FP)();
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-typedef steady_clock::rep (*FP_ec)(system::error_code &);
-#endif
-
-BOOST_CHRONO_STATIC
-FP
-init_steady_clock(kern_return_t & err)
-{
- mach_timebase_info_data_t MachInfo;
- err = mach_timebase_info(&MachInfo);
- if ( err != 0 )
- {
- return 0;
- }
-
- if (MachInfo.numer == MachInfo.denom)
- {
- return &chrono_detail::steady_simplified;
- }
- return &chrono_detail::steady_full;
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-BOOST_CHRONO_STATIC
-FP_ec
-init_steady_clock_ec(kern_return_t & err)
-{
- mach_timebase_info_data_t MachInfo;
- err = mach_timebase_info(&MachInfo);
- if ( err != 0 )
- {
- return 0;
- }
-
- if (MachInfo.numer == MachInfo.denom)
- {
- return &chrono_detail::steady_simplified_ec;
- }
- return &chrono_detail::steady_full_ec;
-}
-#endif
-}
-
-steady_clock::time_point
-steady_clock::now() BOOST_NOEXCEPT
-{
- kern_return_t err;
- chrono_detail::FP fp = chrono_detail::init_steady_clock(err);
- if ( err != 0 )
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- return time_point(duration(fp()));
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-steady_clock::time_point
-steady_clock::now(system::error_code & ec)
-{
- kern_return_t err;
- chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err);
- if ( err != 0 )
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- err,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::steady_clock" ));
- }
- else
- {
- ec.assign( err, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(duration(fp(ec)));
-}
-#endif
-} // namespace chrono
-} // namespace boost
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp
deleted file mode 100644
index 6e55b0f2ff0..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp
+++ /dev/null
@@ -1,356 +0,0 @@
-// boost process_cpu_clocks.cpp -----------------------------------------------------------//
-
-// Copyright Beman Dawes 1994, 2006, 2008
-// Copyright Vicente J. Botet Escriba 2009
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// See http://www.boost.org/libs/chrono for documentation.
-
-//--------------------------------------------------------------------------------------//
-
-#include <boost/chrono/config.hpp>
-#include <boost/chrono/process_cpu_clocks.hpp>
-#include <boost/assert.hpp>
-
-#include <sys/time.h> //for gettimeofday and timeval
-#include <sys/times.h> //for times
-# include <unistd.h>
-
-namespace boost
-{
- namespace chrono
- {
- namespace chrono_detail
- {
-
- inline long tick_factor() // multiplier to convert ticks
- // to nanoseconds; -1 if unknown
- {
- long factor = 0;
- if (!factor)
- {
- if ((factor = ::sysconf(_SC_CLK_TCK)) <= 0)
- factor = -1;
- else
- {
- BOOST_ASSERT(factor <= 1000000000l); // doesn't handle large ticks
- factor = 1000000000l / factor; // compute factor
- if (!factor)
- factor = -1;
- }
- }
- return factor;
- }
- }
-
-
- process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
- {
-#if 1
- tms tm;
- clock_t c = ::times(&tm);
- if (c == clock_t(-1)) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- return time_point(nanoseconds(c * factor));
- } else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- }
- return time_point();
-#else
- clock_t c = ::clock();
- if (c == clock_t(-1)) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- return time_point(nanoseconds(c * factor));
- } else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- }
- return time_point();
-#endif
- }
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- process_real_cpu_clock::time_point process_real_cpu_clock::now(system::error_code & ec)
- {
-
-#if 1
- tms tm;
- clock_t c = ::times(&tm);
- if (c == clock_t(-1)) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(nanoseconds(c * factor));
- } else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- }
- }
-#else
- clock_t c = ::clock();
- if (c == clock_t(-1)) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(nanoseconds(c * factor));
- } else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_real_cpu_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- }
- }
-#endif
-
- }
-#endif
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- process_user_cpu_clock::time_point process_user_cpu_clock::now(system::error_code & ec)
- {
- tms tm;
- clock_t c = ::times(&tm);
- if (c == clock_t(-1)) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_user_cpu_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime) * factor));
- } else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_user_cpu_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- }
- }
- }
-#endif
-
- process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
- {
- tms tm;
- clock_t c = ::times(&tm);
- if (c == clock_t(-1)) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime)
- * factor));
- } else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- }
- return time_point();
- }
- process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
- {
- tms tm;
- clock_t c = ::times(&tm);
- if (c == clock_t(-1)) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime)
- * factor));
- } else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- }
- return time_point();
- }
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- process_system_cpu_clock::time_point process_system_cpu_clock::now(system::error_code & ec)
- {
- tms tm;
- clock_t c = ::times(&tm);
- if (c == clock_t(-1)) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_system_cpu_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime) * factor));
- } else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_system_cpu_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- }
- }
- }
-#endif
-
- process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
- {
- tms tm;
- clock_t c = ::times(&tm);
- if (c == clock_t(-1)) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- time_point::rep
- r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime
- + tm.tms_cstime) * factor);
- return time_point(duration(r));
- } else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- }
- return time_point();
- }
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- process_cpu_clock::time_point process_cpu_clock::now(system::error_code & ec)
- {
-
- tms tm;
- clock_t c = ::times(&tm);
- if (c == clock_t(-1)) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- } else
- {
- long factor = chrono_detail::tick_factor();
- if (factor != -1)
- {
- time_point::rep
- r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime
- + tm.tms_cstime) * factor);
- return time_point(duration(r));
- } else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(system::system_error(errno, BOOST_CHRONO_SYSTEM_CATEGORY, "chrono::process_clock"));
- } else
- {
- ec.assign(errno, BOOST_CHRONO_SYSTEM_CATEGORY);
- return time_point();
- }
- }
- }
-
- }
-#endif
-
- }
-}
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/thread_clock.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/thread_clock.hpp
deleted file mode 100644
index 690458f41cf..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/mac/thread_clock.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// boost thread_clock.cpp -----------------------------------------------------------//
-
-// Copyright Beman Dawes 1994, 2006, 2008
-// Copyright Vicente J. Botet Escriba 2009-2011
-// Copyright Christopher Brown 2013
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// See http://www.boost.org/libs/chrono for documentation.
-
-//--------------------------------------------------------------------------------------//
-
-#include <boost/chrono/config.hpp>
-#include <boost/chrono/thread_clock.hpp>
-#include <cassert>
-#include <boost/assert.hpp>
-
-# include <pthread.h>
-# include <mach/thread_act.h>
-
-namespace boost { namespace chrono {
-
- thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT
- {
- // get the thread port (borrowing pthread's reference)
- mach_port_t port = pthread_mach_thread_np(pthread_self());
-
- // get the thread info
- thread_basic_info_data_t info;
- mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
- if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- return time_point();
- }
-
- // convert to nanoseconds
- duration user = duration(
- static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000
- + static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000);
-
- duration system = duration(
- static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
- + static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
-
- return time_point( user + system );
- }
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- thread_clock::time_point thread_clock::now( system::error_code & ec )
- {
- // get the thread port (borrowing pthread's reference)
- mach_port_t port = pthread_mach_thread_np(pthread_self());
-
- // get the thread info
- thread_basic_info_data_t info;
- mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
- if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- EINVAL,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::thread_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
-
- // convert to nanoseconds
- duration user = duration(
- static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000
- + static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000);
-
- duration system = duration(
- static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
- + static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
-
- return time_point( user + system );
- }
-#endif
-} }
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/chrono.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/chrono.hpp
deleted file mode 100644
index c4c8a6add75..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/chrono.hpp
+++ /dev/null
@@ -1,121 +0,0 @@
-// posix/chrono.cpp --------------------------------------------------------------//
-
-// Copyright Beman Dawes 2008
-// Copyright Vicente J. Botet Escriba 2009
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-//----------------------------------------------------------------------------//
-// POSIX //
-//----------------------------------------------------------------------------//
-
-#include <time.h> // for clock_gettime
-#include <boost/assert.hpp>
-
-namespace boost
-{
-namespace chrono
-{
-
- system_clock::time_point system_clock::now() BOOST_NOEXCEPT
- {
- timespec ts;
- if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
-
- return time_point(duration(
- static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
- }
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- system_clock::time_point system_clock::now(system::error_code & ec)
- {
- timespec ts;
- if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::system_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
-
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(duration(
- static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
- }
-#endif
-
- std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
- {
- return static_cast<std::time_t>( t.time_since_epoch().count() / 1000000000 );
- }
-
- system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
- {
- return time_point(duration(static_cast<system_clock::rep>(t) * 1000000000));
- }
-
-#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
-
- steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
- {
- timespec ts;
- if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
-
- return time_point(duration(
- static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
- }
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- steady_clock::time_point steady_clock::now(system::error_code & ec)
- {
- timespec ts;
- if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::steady_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
-
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(duration(
- static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
- }
-#endif
-#endif
-
-} // namespace chrono
-} // namespace boost
-
-
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp
deleted file mode 100644
index feecc86792d..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp
+++ /dev/null
@@ -1,354 +0,0 @@
-// boost process_cpu_clocks.cpp -----------------------------------------------------------//
-
-// Copyright Beman Dawes 1994, 2006, 2008
-// Copyright Vicente J. Botet Escriba 2009
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// See http://www.boost.org/libs/chrono for documentation.
-
-//--------------------------------------------------------------------------------------//
-
-#include <boost/chrono/config.hpp>
-#include <boost/chrono/process_cpu_clocks.hpp>
-#include <boost/assert.hpp>
-
-#include <sys/times.h>
-#include <unistd.h>
-#include <time.h> // for clock_gettime
-
-
-namespace boost { namespace chrono {
-namespace chrono_detail
-{
- inline nanoseconds::rep tick_factor() // multiplier to convert ticks
- // to nanoseconds; -1 if unknown
- {
- long factor = 0;
- if ( !factor )
- {
- if ( (factor = ::sysconf( _SC_CLK_TCK )) <= 0 )
- factor = -1;
- else
- {
- BOOST_ASSERT( factor <= 1000000000l ); // doesn't handle large ticks
- factor = 1000000000l / factor; // compute factor
- if ( !factor ) factor = -1;
- }
- }
- return factor;
- }
-}
-
-process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
-{
- tms tm;
- clock_t c = ::times( &tm );
- if ( c == clock_t(-1) ) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- else
- {
- if ( chrono_detail::tick_factor() != -1 )
- {
- return time_point(
- nanoseconds(c*chrono_detail::tick_factor()));
- }
- else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- }
- return time_point();
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-process_real_cpu_clock::time_point process_real_cpu_clock::now(
- system::error_code & ec)
-{
-
- tms tm;
- clock_t c = ::times( &tm );
- if ( c == clock_t(-1) ) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_real_cpu_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- else
- {
- if ( chrono_detail::tick_factor() != -1 )
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(
- nanoseconds(c*chrono_detail::tick_factor()));
- }
- else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_real_cpu_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- }
-}
-#endif
-
-process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
-{
- tms tm;
- clock_t c = ::times( &tm );
- if ( c == clock_t(-1) ) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- else
- {
- if ( chrono_detail::tick_factor() != -1 )
- {
- return time_point(
- nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor()));
- }
- else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- }
- return time_point();
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-process_user_cpu_clock::time_point process_user_cpu_clock::now(
- system::error_code & ec)
-{
- tms tm;
- clock_t c = ::times( &tm );
- if ( c == clock_t(-1) ) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_user_cpu_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- else
- {
- if ( chrono_detail::tick_factor() != -1 )
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(
- nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor()));
- }
- else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_user_cpu_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- }
-}
-#endif
-
-process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
-{
- tms tm;
- clock_t c = ::times( &tm );
- if ( c == clock_t(-1) ) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- return time_point();
- }
- else
- {
- if ( chrono_detail::tick_factor() != -1 )
- {
- return time_point(
- nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()));
- }
- else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- return time_point();
- }
- }
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-process_system_cpu_clock::time_point process_system_cpu_clock::now(
- system::error_code & ec)
-{
- tms tm;
- clock_t c = ::times( &tm );
- if ( c == clock_t(-1) ) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_system_cpu_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- else
- {
- if ( chrono_detail::tick_factor() != -1 )
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(
- nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()));
- }
- else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_system_cpu_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- }
-}
-#endif
-
-process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
-{
- tms tm;
- clock_t c = ::times( &tm );
- if ( c == clock_t(-1) ) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- else
- {
- nanoseconds::rep factor = chrono_detail::tick_factor();
- if ( factor != -1 )
- {
- time_point::rep r(
- c*factor,
- (tm.tms_utime + tm.tms_cutime)*factor,
- (tm.tms_stime + tm.tms_cstime)*factor);
- return time_point(duration(r));
- }
- else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- }
- return time_point();
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-process_cpu_clock::time_point process_cpu_clock::now(
- system::error_code & ec )
-{
- tms tm;
- clock_t c = ::times( &tm );
- if ( c == clock_t(-1) ) // error
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- else
- {
- if ( chrono_detail::tick_factor() != -1 )
- {
- time_point::rep r(
- c*chrono_detail::tick_factor(),
- (tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor(),
- (tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor());
- return time_point(duration(r));
- }
- else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- }
-
-}
-#endif
-
-} }
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/thread_clock.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/thread_clock.hpp
deleted file mode 100644
index a42b3c8a150..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/posix/thread_clock.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// boost thread_clock.cpp -----------------------------------------------------------//
-
-// Copyright Beman Dawes 1994, 2006, 2008
-// Copyright Vicente J. Botet Escriba 2009-2011
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// See http://www.boost.org/libs/chrono for documentation.
-
-//--------------------------------------------------------------------------------------//
-
-#include <boost/chrono/config.hpp>
-#include <boost/chrono/thread_clock.hpp>
-#include <cassert>
-#include <boost/assert.hpp>
-
-#if !defined(__VXWORKS__)
-# include <sys/times.h>
-#endif
-# include <pthread.h>
-# include <unistd.h>
-
-namespace boost { namespace chrono {
-
- thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT
- {
- struct timespec ts;
-#if defined CLOCK_THREAD_CPUTIME_ID
- // get the timespec associated to the thread clock
- if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) )
-#else
- // get the current thread
- pthread_t pth=pthread_self();
- // get the clock_id associated to the current thread
- clockid_t clock_id;
- pthread_getcpuclockid(pth, &clock_id);
- // get the timespec associated to the thread clock
- if ( ::clock_gettime( clock_id, &ts ) )
-#endif
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
-
- // transform to nanoseconds
- return time_point(duration(
- static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
-
- }
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- thread_clock::time_point thread_clock::now( system::error_code & ec )
- {
- struct timespec ts;
-#if defined CLOCK_THREAD_CPUTIME_ID
- // get the timespec associated to the thread clock
- if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) )
-#else
- // get the current thread
- pthread_t pth=pthread_self();
- // get the clock_id associated to the current thread
- clockid_t clock_id;
- pthread_getcpuclockid(pth, &clock_id);
- // get the timespec associated to the thread clock
- if ( ::clock_gettime( clock_id, &ts ) )
-#endif
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::thread_clock" ));
- }
- else
- {
- ec.assign( errno, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- // transform to nanoseconds
- return time_point(duration(
- static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
-
- }
-#endif
-} }
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/chrono.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/chrono.hpp
deleted file mode 100644
index e61f11e7cec..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/chrono.hpp
+++ /dev/null
@@ -1,150 +0,0 @@
-// win/chrono.cpp --------------------------------------------------------------//
-
-// Copyright Beman Dawes 2008
-// Copyright 2009-2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-//----------------------------------------------------------------------------//
-// Windows //
-//----------------------------------------------------------------------------//
-#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
-#define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
-
-#include <boost/detail/winapi/time.hpp>
-#include <boost/detail/winapi/timers.hpp>
-#include <boost/detail/winapi/get_last_error.hpp>
-#include <boost/assert.hpp>
-
-namespace boost
-{
-namespace chrono
-{
-namespace chrono_detail
-{
-
- BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT
- {
- boost::detail::winapi::LARGE_INTEGER_ freq;
- if ( !boost::detail::winapi::QueryPerformanceFrequency( &freq ) )
- return 0.0L;
- return double(1000000000.0L / freq.QuadPart);
- }
-
-}
-
- steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
- {
- double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
-
- boost::detail::winapi::LARGE_INTEGER_ pcount;
- if ( nanosecs_per_tic <= 0.0L )
- {
- BOOST_ASSERT(0 && "Boost::Chrono - get_nanosecs_per_tic Internal Error");
- return steady_clock::time_point();
- }
- unsigned times=0;
- while ( ! boost::detail::winapi::QueryPerformanceCounter( &pcount ) )
- {
- if ( ++times > 3 )
- {
- BOOST_ASSERT(0 && "Boost::Chrono - QueryPerformanceCounter Internal Error");
- return steady_clock::time_point();
- }
- }
-
- return steady_clock::time_point(steady_clock::duration(
- static_cast<steady_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
- }
-
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- steady_clock::time_point steady_clock::now( system::error_code & ec )
- {
- double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
-
- boost::detail::winapi::LARGE_INTEGER_ pcount;
- if ( (nanosecs_per_tic <= 0.0L)
- || (!boost::detail::winapi::QueryPerformanceCounter( &pcount )) )
- {
- boost::detail::winapi::DWORD_ cause =
- ((nanosecs_per_tic <= 0.0L)
- ? ERROR_NOT_SUPPORTED
- : boost::detail::winapi::GetLastError());
- if (BOOST_CHRONO_IS_THROWS(ec)) {
- boost::throw_exception(
- system::system_error(
- cause,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::steady_clock" ));
- }
- else
- {
- ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
- return steady_clock::time_point(duration(0));
- }
- }
-
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(duration(
- static_cast<steady_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
- }
-#endif
-
- BOOST_CHRONO_INLINE
- system_clock::time_point system_clock::now() BOOST_NOEXCEPT
- {
- boost::detail::winapi::FILETIME_ ft;
- boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
- return system_clock::time_point(
- system_clock::duration(
- ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
- - 116444736000000000LL
- //- (134775LL*864000000000LL)
- )
- );
- }
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
- BOOST_CHRONO_INLINE
- system_clock::time_point system_clock::now( system::error_code & ec )
- {
- boost::detail::winapi::FILETIME_ ft;
- boost::detail::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return system_clock::time_point(
- system_clock::duration(
- ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
- - 116444736000000000LL
- //- (134775LL*864000000000LL)
- ));
- }
-#endif
-
- BOOST_CHRONO_INLINE
- std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
- {
- __int64 temp = t.time_since_epoch().count();
- temp /= 10000000;
- return static_cast<std::time_t>( temp );
- }
-
- BOOST_CHRONO_INLINE
- system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
- {
- __int64 temp = t;
- temp *= 10000000;
- return time_point(duration(temp));
- }
-
-} // namespace chrono
-} // namespace boost
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
deleted file mode 100644
index 7169f8020a1..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
+++ /dev/null
@@ -1,281 +0,0 @@
-// boost process_timer.cpp -----------------------------------------------------------//
-
-// Copyright Beman Dawes 1994, 2006, 2008
-// Copyright 2009-2010 Vicente J. Botet Escriba
-// Copyright (c) Microsoft Corporation 2014
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// See http://www.boost.org/libs/chrono for documentation.
-
-//--------------------------------------------------------------------------------------//
-#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP
-#define BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP
-
-#include <boost/chrono/config.hpp>
-#include <boost/chrono/process_cpu_clocks.hpp>
-#include <cassert>
-#include <time.h>
-#include <boost/assert.hpp>
-
-#include <boost/detail/winapi/get_last_error.hpp>
-#include <boost/detail/winapi/get_current_process.hpp>
-#if BOOST_PLAT_WINDOWS_DESKTOP
-#include <boost/detail/winapi/get_process_times.hpp>
-#endif
-
-namespace boost
-{
-namespace chrono
-{
-
-process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
-{
- clock_t c = ::clock();
- if ( c == clock_t(-1) ) // error
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- }
- typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC> >::type R;
- return time_point(
- duration(static_cast<rep>(c)*R::num/R::den)
- );
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-process_real_cpu_clock::time_point process_real_cpu_clock::now(
- system::error_code & ec)
-{
- clock_t c = ::clock();
- if ( c == clock_t(-1) ) // error
- {
- boost::throw_exception(
- system::system_error(
- errno,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_real_cpu_clock" ));
- }
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC> >::type R;
- return time_point(
- duration(static_cast<rep>(c)*R::num/R::den)
- );
-}
-#endif
-
-#if BOOST_PLAT_WINDOWS_DESKTOP
-process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
-{
-
- // note that Windows uses 100 nanosecond ticks for FILETIME
- boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
-
- if ( boost::detail::winapi::GetProcessTimes(
- boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
- &system_time, &user_time ) )
- {
- return time_point(duration(
- ((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
- | user_time.dwLowDateTime) * 100
- ));
- }
- else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- return time_point();
- }
-
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-process_user_cpu_clock::time_point process_user_cpu_clock::now(
- system::error_code & ec)
-{
-
- // note that Windows uses 100 nanosecond ticks for FILETIME
- boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
-
- if ( boost::detail::winapi::GetProcessTimes(
- boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
- &system_time, &user_time ) )
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(duration(
- ((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
- | user_time.dwLowDateTime) * 100
- ));
- }
- else
- {
- boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- cause,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_user_cpu_clock" ));
- }
- else
- {
- ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
-
-}
-#endif
-
-process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
-{
-
- // note that Windows uses 100 nanosecond ticks for FILETIME
- boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
-
- if ( boost::detail::winapi::GetProcessTimes(
- boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
- &system_time, &user_time ) )
- {
- return time_point(duration(
- ((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
- | system_time.dwLowDateTime) * 100
- ));
- }
- else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- return time_point();
- }
-
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-process_system_cpu_clock::time_point process_system_cpu_clock::now(
- system::error_code & ec)
-{
-
- // note that Windows uses 100 nanosecond ticks for FILETIME
- boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
-
- if ( boost::detail::winapi::GetProcessTimes(
- boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
- &system_time, &user_time ) )
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(duration(
- ((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
- | system_time.dwLowDateTime) * 100
- ));
- }
- else
- {
- boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- cause,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_system_cpu_clock" ));
- }
- else
- {
- ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
-
-}
-#endif
-
-process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
-{
-
- // note that Windows uses 100 nanosecond ticks for FILETIME
- boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
-
- if ( boost::detail::winapi::GetProcessTimes(
- boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
- &system_time, &user_time ) )
- {
- time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count()
- ,
- ((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
- | user_time.dwLowDateTime
- ) * 100,
- ((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
- | system_time.dwLowDateTime
- ) * 100
- );
- return time_point(duration(r));
- }
- else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- return time_point();
- }
-
-}
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-process_cpu_clock::time_point process_cpu_clock::now(
- system::error_code & ec )
-{
-
- // note that Windows uses 100 nanosecond ticks for FILETIME
- boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
-
- if ( boost::detail::winapi::GetProcessTimes(
- boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
- &system_time, &user_time ) )
- {
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count()
- ,
- ((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
- | user_time.dwLowDateTime
- ) * 100,
- ((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
- | system_time.dwLowDateTime
- ) * 100
- );
- return time_point(duration(r));
- }
- else
- {
- boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- cause,
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::process_cpu_clock" ));
- }
- else
- {
- ec.assign( cause, BOOST_CHRONO_SYSTEM_CATEGORY );
- return time_point();
- }
- }
-
-}
-#endif
-#endif
-} // namespace chrono
-} // namespace boost
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/thread_clock.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/thread_clock.hpp
deleted file mode 100644
index 037ccbee3e9..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/win/thread_clock.hpp
+++ /dev/null
@@ -1,103 +0,0 @@
-// boost thread_clock.cpp -----------------------------------------------------------//
-
-// Copyright 2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// See http://www.boost.org/libs/chrono for documentation.
-
-//--------------------------------------------------------------------------------------//
-#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_THREAD_CLOCK_HPP
-#define BOOST_CHRONO_DETAIL_INLINED_WIN_THREAD_CLOCK_HPP
-
-#include <boost/chrono/config.hpp>
-#include <boost/chrono/thread_clock.hpp>
-#include <cassert>
-#include <boost/assert.hpp>
-
-#include <boost/detail/winapi/get_last_error.hpp>
-#include <boost/detail/winapi/get_current_thread.hpp>
-#include <boost/detail/winapi/get_thread_times.hpp>
-
-namespace boost
-{
-namespace chrono
-{
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-thread_clock::time_point thread_clock::now( system::error_code & ec )
-{
- // note that Windows uses 100 nanosecond ticks for FILETIME
- boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
-
- if ( boost::detail::winapi::GetThreadTimes(
- boost::detail::winapi::GetCurrentThread (), &creation, &exit,
- &system_time, &user_time ) )
- {
- duration user = duration(
- ((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
- | user_time.dwLowDateTime) * 100 );
-
- duration system = duration(
- ((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
- | system_time.dwLowDateTime) * 100 );
-
- if (!BOOST_CHRONO_IS_THROWS(ec))
- {
- ec.clear();
- }
- return time_point(system+user);
-
- }
- else
- {
- if (BOOST_CHRONO_IS_THROWS(ec))
- {
- boost::throw_exception(
- system::system_error(
- boost::detail::winapi::GetLastError(),
- BOOST_CHRONO_SYSTEM_CATEGORY,
- "chrono::thread_clock" ));
- }
- else
- {
- ec.assign( boost::detail::winapi::GetLastError(), BOOST_CHRONO_SYSTEM_CATEGORY );
- return thread_clock::time_point(duration(0));
- }
- }
-}
-#endif
-
-thread_clock::time_point thread_clock::now() BOOST_NOEXCEPT
-{
-
- // note that Windows uses 100 nanosecond ticks for FILETIME
- boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
-
- if ( boost::detail::winapi::GetThreadTimes(
- boost::detail::winapi::GetCurrentThread (), &creation, &exit,
- &system_time, &user_time ) )
- {
- duration user = duration(
- ((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
- | user_time.dwLowDateTime) * 100 );
-
- duration system = duration(
- ((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
- | system_time.dwLowDateTime) * 100 );
-
- return time_point(system+user);
- }
- else
- {
- BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
- return time_point();
- }
-
-}
-
-} // namespace chrono
-} // namespace boost
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/system.hpp b/src/third_party/boost-1.68.0/boost/chrono/detail/system.hpp
deleted file mode 100644
index ebe27abac8b..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/system.hpp
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright 2009-2010 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-#ifndef BOOST_CHRONO_DETAIL_SYSTEM_HPP
-#define BOOST_CHRONO_DETAIL_SYSTEM_HPP
-
-#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
-
-#include <boost/system/error_code.hpp>
-
-#define BOOST_CHRONO_SYSTEM_CATEGORY boost::system::system_category()
-
-#define BOOST_CHRONO_THROWS boost::throws()
-#define BOOST_CHRONO_IS_THROWS(EC) (&EC==&boost::throws())
-
-#endif
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/time_point_io.hpp b/src/third_party/boost-1.68.0/boost/chrono/io/time_point_io.hpp
deleted file mode 100644
index 3143efac69e..00000000000
--- a/src/third_party/boost-1.68.0/boost/chrono/io/time_point_io.hpp
+++ /dev/null
@@ -1,1249 +0,0 @@
-// (C) Copyright Howard Hinnant
-// (C) Copyright 2010-2011 Vicente J. Botet Escriba
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-
-//===-------------------------- locale ------------------------------------===//
-//
-// The LLVM Compiler Infrastructure
-//
-// This file is dual licensed under the MIT and the University of Illinois Open
-// Source Licenses. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-// This code was adapted by Vicente from Howard Hinnant's experimental work
-// on chrono i/o to Boost and some functions from libc++/locale to emulate the missing time_get::get()
-
-#ifndef BOOST_CHRONO_IO_TIME_POINT_IO_HPP
-#define BOOST_CHRONO_IO_TIME_POINT_IO_HPP
-
-#include <boost/chrono/io/time_point_put.hpp>
-#include <boost/chrono/io/time_point_get.hpp>
-#include <boost/chrono/io/duration_io.hpp>
-#include <boost/chrono/io/ios_base_state.hpp>
-#include <boost/chrono/io/utility/manip_base.hpp>
-#include <boost/chrono/time_point.hpp>
-#include <boost/chrono/clock_string.hpp>
-#include <boost/chrono/round.hpp>
-#include <boost/chrono/detail/scan_keyword.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-#include <cstring>
-#include <locale>
-#include <ctime>
-
-#if ( defined BOOST_WINDOWS && ! defined(__CYGWIN__) ) \
- || (defined(sun) || defined(__sun)) \
- || (defined __IBMCPP__) \
- || defined __ANDROID__ \
- || defined __QNXNTO__ \
- || (defined(_AIX) && defined __GNUC__)
-#define BOOST_CHRONO_INTERNAL_TIMEGM
-#endif
-
-#if (defined BOOST_WINDOWS && ! defined(__CYGWIN__)) \
- || ( (defined(sun) || defined(__sun)) && defined __GNUC__) \
- || (defined __IBMCPP__) \
- || defined __ANDROID__ \
- || (defined(_AIX) && defined __GNUC__)
-#define BOOST_CHRONO_INTERNAL_GMTIME
-#endif
-
-#define BOOST_CHRONO_USES_INTERNAL_TIME_GET
-
-namespace boost
-{
- namespace chrono
- {
- typedef double fractional_seconds;
- namespace detail
- {
-
-
- template <class CharT, class InputIterator = std::istreambuf_iterator<CharT> >
- struct time_get
- {
- std::time_get<CharT> const &that_;
- time_get(std::time_get<CharT> const& that) : that_(that) {}
-
- typedef std::time_get<CharT> facet;
- typedef typename facet::iter_type iter_type;
- typedef typename facet::char_type char_type;
- typedef std::basic_string<char_type> string_type;
-
- static int
- get_up_to_n_digits(
- InputIterator& b, InputIterator e,
- std::ios_base::iostate& err,
- const std::ctype<CharT>& ct,
- int n)
- {
- // Precondition: n >= 1
- if (b == e)
- {
- err |= std::ios_base::eofbit | std::ios_base::failbit;
- return 0;
- }
- // get first digit
- CharT c = *b;
- if (!ct.is(std::ctype_base::digit, c))
- {
- err |= std::ios_base::failbit;
- return 0;
- }
- int r = ct.narrow(c, 0) - '0';
- for (++b, --n; b != e && n > 0; ++b, --n)
- {
- // get next digit
- c = *b;
- if (!ct.is(std::ctype_base::digit, c))
- return r;
- r = r * 10 + ct.narrow(c, 0) - '0';
- }
- if (b == e)
- err |= std::ios_base::eofbit;
- return r;
- }
-
-
- void get_day(
- int& d,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 2);
- if (!(err & std::ios_base::failbit) && 1 <= t && t <= 31)
- d = t;
- else
- err |= std::ios_base::failbit;
- }
-
- void get_month(
- int& m,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 2);
- if (!(err & std::ios_base::failbit) && 1 <= t && t <= 12)
- m = --t;
- else
- err |= std::ios_base::failbit;
- }
-
-
- void get_year4(int& y,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 4);
- if (!(err & std::ios_base::failbit))
- y = t - 1900;
- }
-
- void
- get_hour(int& h,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 2);
- if (!(err & std::ios_base::failbit) && t <= 23)
- h = t;
- else
- err |= std::ios_base::failbit;
- }
-
- void
- get_minute(int& m,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 2);
- if (!(err & std::ios_base::failbit) && t <= 59)
- m = t;
- else
- err |= std::ios_base::failbit;
- }
-
- void get_second(int& s,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 2);
- if (!(err & std::ios_base::failbit) && t <= 60)
- s = t;
- else
- err |= std::ios_base::failbit;
- }
-
- void get_white_space(iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- for (; b != e && ct.is(std::ctype_base::space, *b); ++b)
- ;
- if (b == e)
- err |= std::ios_base::eofbit;
- }
-
- void get_12_hour(int& h,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 2);
- if (!(err & std::ios_base::failbit) && 1 <= t && t <= 12)
- h = t;
- else
- err |= std::ios_base::failbit;
- }
-
- void get_percent(iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- if (b == e)
- {
- err |= std::ios_base::eofbit | std::ios_base::failbit;
- return;
- }
- if (ct.narrow(*b, 0) != '%')
- err |= std::ios_base::failbit;
- else if(++b == e)
- err |= std::ios_base::eofbit;
- }
-
- void get_day_year_num(int& d,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 3);
- if (!(err & std::ios_base::failbit) && 1 <= t && t <= 366)
- d = --t;
- else
- err |= std::ios_base::failbit;
- }
-
- void
- get_weekday(int& w,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- int t = get_up_to_n_digits(b, e, err, ct, 1);
- if (!(err & std::ios_base::failbit) && t <= 6)
- w = t;
- else
- err |= std::ios_base::failbit;
- }
-#if 0
-
- void
- get_am_pm(int& h,
- iter_type& b, iter_type e,
- std::ios_base::iostate& err,
- const std::ctype<char_type>& ct) const
- {
- const string_type* ap = am_pm();
- if (ap[0].size() + ap[1].size() == 0)
- {
- err |= ios_base::failbit;
- return;
- }
- ptrdiff_t i = detail::scan_keyword(b, e, ap, ap+2, ct, err, false) - ap;
- if (i == 0 && h == 12)
- h = 0;
- else if (i == 1 && h < 12)
- h += 12;
- }
-
-#endif
-
- InputIterator get(
- iter_type b, iter_type e,
- std::ios_base& iob,
- std::ios_base::iostate& err,
- std::tm* tm,
- char fmt, char) const
- {
- err = std::ios_base::goodbit;
- const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(iob.getloc());
-
- switch (fmt)
- {
- case 'a':
- case 'A':
- {
- std::tm tm2;
- std::memset(&tm2, 0, sizeof(std::tm));
- that_.get_weekday(b, e, iob, err, &tm2);
- //tm->tm_wday = tm2.tm_wday;
- }
- break;
- case 'b':
- case 'B':
- case 'h':
- {
- std::tm tm2;
- std::memset(&tm2, 0, sizeof(std::tm));
- that_.get_monthname(b, e, iob, err, &tm2);
- //tm->tm_mon = tm2.tm_mon;
- }
- break;
-// case 'c':
-// {
-// const string_type& fm = c();
-// b = get(b, e, iob, err, tm, fm.data(), fm.data() + fm.size());
-// }
-// break;
- case 'd':
- case 'e':
- get_day(tm->tm_mday, b, e, err, ct);
- break;
- case 'D':
- {
- const char_type fm[] = {'%', 'm', '/', '%', 'd', '/', '%', 'y'};
- b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
- }
- break;
- case 'F':
- {
- const char_type fm[] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd'};
- b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
- }
- break;
- case 'H':
- get_hour(tm->tm_hour, b, e, err, ct);
- break;
- case 'I':
- get_12_hour(tm->tm_hour, b, e, err, ct);
- break;
- case 'j':
- get_day_year_num(tm->tm_yday, b, e, err, ct);
- break;
- case 'm':
- get_month(tm->tm_mon, b, e, err, ct);
- break;
- case 'M':
- get_minute(tm->tm_min, b, e, err, ct);
- break;
- case 'n':
- case 't':
- get_white_space(b, e, err, ct);
- break;
-// case 'p':
-// get_am_pm(tm->tm_hour, b, e, err, ct);
-// break;
- case 'r':
- {
- const char_type fm[] = {'%', 'I', ':', '%', 'M', ':', '%', 'S', ' ', '%', 'p'};
- b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
- }
- break;
- case 'R':
- {
- const char_type fm[] = {'%', 'H', ':', '%', 'M'};
- b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
- }
- break;
- case 'S':
- get_second(tm->tm_sec, b, e, err, ct);
- break;
- case 'T':
- {
- const char_type fm[] = {'%', 'H', ':', '%', 'M', ':', '%', 'S'};
- b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
- }
- break;
- case 'w':
- {
- get_weekday(tm->tm_wday, b, e, err, ct);
- }
- break;
- case 'x':
- return that_.get_date(b, e, iob, err, tm);
-// case 'X':
-// return that_.get_time(b, e, iob, err, tm);
-// {
-// const string_type& fm = X();
-// b = that_.get(b, e, iob, err, tm, fm.data(), fm.data() + fm.size());
-// }
-// break;
-// case 'y':
-// get_year(tm->tm_year, b, e, err, ct);
- break;
- case 'Y':
- get_year4(tm->tm_year, b, e, err, ct);
- break;
- case '%':
- get_percent(b, e, err, ct);
- break;
- default:
- err |= std::ios_base::failbit;
- }
- return b;
- }
-
-
- InputIterator get(
- iter_type b, iter_type e,
- std::ios_base& iob,
- std::ios_base::iostate& err, std::tm* tm,
- const char_type* fmtb, const char_type* fmte) const
- {
- const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(iob.getloc());
- err = std::ios_base::goodbit;
- while (fmtb != fmte && err == std::ios_base::goodbit)
- {
- if (b == e)
- {
- err = std::ios_base::failbit;
- break;
- }
- if (ct.narrow(*fmtb, 0) == '%')
- {
- if (++fmtb == fmte)
- {
- err = std::ios_base::failbit;
- break;
- }
- char cmd = ct.narrow(*fmtb, 0);
- char opt = '\0';
- if (cmd == 'E' || cmd == '0')
- {
- if (++fmtb == fmte)
- {
- err = std::ios_base::failbit;
- break;
- }
- opt = cmd;
- cmd = ct.narrow(*fmtb, 0);
- }
- b = get(b, e, iob, err, tm, cmd, opt);
- ++fmtb;
- }
- else if (ct.is(std::ctype_base::space, *fmtb))
- {
- for (++fmtb; fmtb != fmte && ct.is(std::ctype_base::space, *fmtb); ++fmtb)
- ;
- for ( ; b != e && ct.is(std::ctype_base::space, *b); ++b)
- ;
- }
- else if (ct.toupper(*b) == ct.toupper(*fmtb))
- {
- ++b;
- ++fmtb;
- }
- else
- err = std::ios_base::failbit;
- }
- if (b == e)
- err |= std::ios_base::eofbit;
- return b;
- }
-
- };
-
-
- template <class CharT>
- class time_manip: public manip<time_manip<CharT> >
- {
- std::basic_string<CharT> fmt_;
- timezone tz_;
- public:
-
- time_manip(timezone tz, std::basic_string<CharT> fmt)
- // todo move semantics
- :
- fmt_(fmt), tz_(tz)
- {
- }
-
- /**
- * Change the timezone and time format ios state;
- */
- void operator()(std::ios_base &ios) const
- {
- set_time_fmt<CharT> (ios, fmt_);
- set_timezone(ios, tz_);
- }
- };
-
- class time_man: public manip<time_man>
- {
- timezone tz_;
- public:
-
- time_man(timezone tz)
- // todo move semantics
- :
- tz_(tz)
- {
- }
-
- /**
- * Change the timezone and time format ios state;
- */
- void operator()(std::ios_base &ios) const
- {
- //set_time_fmt<typename out_stream::char_type>(ios, "");
- set_timezone(ios, tz_);
- }
- };
-
- }
-
- template <class CharT>
- inline detail::time_manip<CharT> time_fmt(timezone tz, const CharT* fmt)
- {
- return detail::time_manip<CharT>(tz, fmt);
- }
-
- template <class CharT>
- inline detail::time_manip<CharT> time_fmt(timezone tz, std::basic_string<CharT> fmt)
- {
- // todo move semantics
- return detail::time_manip<CharT>(tz, fmt);
- }
-
- inline detail::time_man time_fmt(timezone f)
- {
- return detail::time_man(f);
- }
-
- /**
- * time_fmt_io_saver i/o saver.
- *
- * See Boost.IO i/o state savers for a motivating compression.
- */
- template <typename CharT = char, typename Traits = std::char_traits<CharT> >
- struct time_fmt_io_saver
- {
-
- //! the type of the state to restore
- //typedef std::basic_ostream<CharT, Traits> state_type;
- typedef std::ios_base state_type;
-
- //! the type of aspect to save
- typedef std::basic_string<CharT, Traits> aspect_type;
-
- /**
- * Explicit construction from an i/o stream.
- *
- * Store a reference to the i/o stream and the value of the associated @c time format .
- */
- explicit time_fmt_io_saver(state_type &s) :
- s_save_(s), a_save_(get_time_fmt<CharT>(s_save_))
- {
- }
-
- /**
- * Construction from an i/o stream and a @c time format to restore.
- *
- * Stores a reference to the i/o stream and the value @c new_value to restore given as parameter.
- */
- time_fmt_io_saver(state_type &s, aspect_type new_value) :
- s_save_(s), a_save_(get_time_fmt<CharT>(s_save_))
- {
- set_time_fmt(s_save_, new_value);
- }
-
- /**
- * Destructor.
- *
- * Restores the i/o stream with the format to be restored.
- */
- ~time_fmt_io_saver()
- {
- this->restore();
- }
-
- /**
- * Restores the i/o stream with the time format to be restored.
- */
- void restore()
- {
- set_time_fmt(s_save_, a_save_);
- }
- private:
- state_type& s_save_;
- aspect_type a_save_;
- };
-
- /**
- * timezone_io_saver i/o saver.
- *
- * See Boost.IO i/o state savers for a motivating compression.
- */
- struct timezone_io_saver
- {
-
- //! the type of the state to restore
- typedef std::ios_base state_type;
- //! the type of aspect to save
- typedef timezone aspect_type;
-
- /**
- * Explicit construction from an i/o stream.
- *
- * Store a reference to the i/o stream and the value of the associated @c timezone.
- */
- explicit timezone_io_saver(state_type &s) :
- s_save_(s), a_save_(get_timezone(s_save_))
- {
- }
-
- /**
- * Construction from an i/o stream and a @c timezone to restore.
- *
- * Stores a reference to the i/o stream and the value @c new_value to restore given as parameter.
- */
- timezone_io_saver(state_type &s, aspect_type new_value) :
- s_save_(s), a_save_(get_timezone(s_save_))
- {
- set_timezone(s_save_, new_value);
- }
-
- /**
- * Destructor.
- *
- * Restores the i/o stream with the format to be restored.
- */
- ~timezone_io_saver()
- {
- this->restore();
- }
-
- /**
- * Restores the i/o stream with the timezone to be restored.
- */
- void restore()
- {
- set_timezone(s_save_, a_save_);
- }
- private:
- timezone_io_saver& operator=(timezone_io_saver const& rhs) ;
-
- state_type& s_save_;
- aspect_type a_save_;
- };
-
- /**
- *
- * @param os
- * @param tp
- * @Effects Behaves as a formatted output function. After constructing a @c sentry object, if the @ sentry
- * converts to true, calls to @c facet.put(os,os,os.fill(),tp) where @c facet is the @c time_point_put<CharT>
- * facet associated to @c os or a new created instance of the default @c time_point_put<CharT> facet.
- * @return @c os.
- */
- template <class CharT, class Traits, class Clock, class Duration>
- std::basic_ostream<CharT, Traits>&
- operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<Clock, Duration>& tp)
- {
-
- bool failed = false;
- BOOST_TRY
- {
- std::ios_base::iostate err = std::ios_base::goodbit;
- BOOST_TRY
- {
- typename std::basic_ostream<CharT, Traits>::sentry opfx(os);
- if (bool(opfx))
- {
- if (!std::has_facet<time_point_put<CharT> >(os.getloc()))
- {
- if (time_point_put<CharT> ().put(os, os, os.fill(), tp) .failed())
- {
- err = std::ios_base::badbit;
- }
- }
- else
- {
- if (std::use_facet<time_point_put<CharT> >(os.getloc()) .put(os, os, os.fill(), tp).failed())
- {
- err = std::ios_base::badbit;
- }
- }
- os.width(0);
- }
- }
- BOOST_CATCH (...)
- {
- bool flag = false;
- BOOST_TRY
- {
- os.setstate(std::ios_base::failbit);
- }
- BOOST_CATCH (std::ios_base::failure )
- {
- flag = true;
- }
- BOOST_CATCH_END
- if (flag) throw;
- }
- BOOST_CATCH_END
- if (err) os.setstate(err);
- return os;
- }
- BOOST_CATCH (...)
- {
- failed = true;
- }
- BOOST_CATCH_END
- if (failed) os.setstate(std::ios_base::failbit | std::ios_base::badbit);
- return os;
- }
-
- template <class CharT, class Traits, class Clock, class Duration>
- std::basic_istream<CharT, Traits>&
- operator>>(std::basic_istream<CharT, Traits>& is, time_point<Clock, Duration>& tp)
- {
- std::ios_base::iostate err = std::ios_base::goodbit;
-
- BOOST_TRY
- {
- typename std::basic_istream<CharT, Traits>::sentry ipfx(is);
- if (bool(ipfx))
- {
- if (!std::has_facet<time_point_get<CharT> >(is.getloc()))
- {
- time_point_get<CharT> ().get(is, std::istreambuf_iterator<CharT, Traits>(), is, err, tp);
- }
- else
- {
- std::use_facet<time_point_get<CharT> >(is.getloc()).get(is, std::istreambuf_iterator<CharT, Traits>(), is,
- err, tp);
- }
- }
- }
- BOOST_CATCH (...)
- {
- bool flag = false;
- BOOST_TRY
- {
- is.setstate(std::ios_base::failbit);
- }
- BOOST_CATCH (std::ios_base::failure )
- {
- flag = true;
- }
- BOOST_CATCH_END
- if (flag) throw;
- }
- BOOST_CATCH_END
- if (err) is.setstate(err);
- return is;
- }
-
-
- namespace detail
- {
-
-//#if defined BOOST_CHRONO_INTERNAL_TIMEGM
-
- inline int32_t is_leap(int32_t year)
- {
- if(year % 400 == 0)
- return 1;
- if(year % 100 == 0)
- return 0;
- if(year % 4 == 0)
- return 1;
- return 0;
- }
- inline int32_t days_from_0(int32_t year)
- {
- year--;
- return 365 * year + (year / 400) - (year/100) + (year / 4);
- }
- inline int32_t days_from_1970(int32_t year)
- {
- static const int days_from_0_to_1970 = days_from_0(1970);
- return days_from_0(year) - days_from_0_to_1970;
- }
- inline int32_t days_from_1jan(int32_t year,int32_t month,int32_t day)
- {
- static const int32_t days[2][12] =
- {
- { 0,31,59,90,120,151,181,212,243,273,304,334},
- { 0,31,60,91,121,152,182,213,244,274,305,335}
- };
-
- return days[is_leap(year)][month-1] + day - 1;
- }
-
- inline time_t internal_timegm(std::tm const *t)
- {
- int year = t->tm_year + 1900;
- int month = t->tm_mon;
- if(month > 11)
- {
- year += month/12;
- month %= 12;
- }
- else if(month < 0)
- {
- int years_diff = (-month + 11)/12;
- year -= years_diff;
- month+=12 * years_diff;
- }
- month++;
- int day = t->tm_mday;
- int day_of_year = days_from_1jan(year,month,day);
- int days_since_epoch = days_from_1970(year) + day_of_year ;
-
- time_t seconds_in_day = 3600 * 24;
- time_t result = seconds_in_day * days_since_epoch + 3600 * t->tm_hour + 60 * t->tm_min + t->tm_sec;
-
- return result;
- }
-//#endif
-
- /**
- * from_ymd could be made more efficient by using a table
- * day_count_table indexed by the y%400.
- * This table could contain the day_count
- * by*365 + by/4 - by/100 + by/400
- *
- * from_ymd = (by/400)*days_by_400_years+day_count_table[by%400] +
- * days_in_year_before[is_leap_table[by%400]][m-1] + d;
- */
- inline unsigned days_before_years(int32_t y)
- {
- return y * 365 + y / 4 - y / 100 + y / 400;
- }
-
- // Returns year/month/day triple in civil calendar
- // Preconditions: z is number of days since 1970-01-01 and is in the range:
- // [numeric_limits<Int>::min(), numeric_limits<Int>::max()-719468].
- template <class Int>
- //constexpr
- void
- inline civil_from_days(Int z, Int& y, unsigned& m, unsigned& d) BOOST_NOEXCEPT
- {
- BOOST_STATIC_ASSERT_MSG(std::numeric_limits<unsigned>::digits >= 18,
- "This algorithm has not been ported to a 16 bit unsigned integer");
- BOOST_STATIC_ASSERT_MSG(std::numeric_limits<Int>::digits >= 20,
- "This algorithm has not been ported to a 16 bit signed integer");
- z += 719468;
- const Int era = (z >= 0 ? z : z - 146096) / 146097;
- const unsigned doe = static_cast<unsigned>(z - era * 146097); // [0, 146096]
- const unsigned yoe = (doe - doe/1460 + doe/36524 - doe/146096) / 365; // [0, 399]
- y = static_cast<Int>(yoe) + era * 400;
- const unsigned doy = doe - (365*yoe + yoe/4 - yoe/100); // [0, 365]
- const unsigned mp = (5*doy + 2)/153; // [0, 11]
- d = doy - (153*mp+2)/5 + 1; // [1, 31]
- m = mp + (mp < 10 ? 3 : -9); // [1, 12]
- y += (m <= 2);
- --m;
- }
- inline std::tm * internal_gmtime(std::time_t const* t, std::tm *tm)
- {
- if (t==0) return 0;
- if (tm==0) return 0;
-
-#if 0
- static const unsigned char
- day_of_year_month[2][366] =
- {
- { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 },
-
- { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12
-
- } };
-
- static const int32_t days_in_year_before[2][13] =
- {
- { -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364 },
- { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }
- };
-#endif
-
- const time_t seconds_in_day = 3600 * 24;
- int32_t days_since_epoch = static_cast<int32_t>(*t / seconds_in_day);
- int32_t hms = static_cast<int32_t>(*t - seconds_in_day*days_since_epoch);
- if (hms < 0) {
- days_since_epoch-=1;
- hms = seconds_in_day+hms;
- }
-
-#if 0
- int32_t x = days_since_epoch;
- int32_t y = static_cast<int32_t> (static_cast<long long> (x + 2) * 400
- / 146097);
- const int32_t ym1 = y - 1;
- int32_t doy = x - days_before_years(y);
- const int32_t doy1 = x - days_before_years(ym1);
- const int32_t N = std::numeric_limits<int>::digits - 1;
- const int32_t mask1 = doy >> N; // arithmetic rshift - not portable - but nearly universal
- const int32_t mask0 = ~mask1;
- doy = (doy & mask0) | (doy1 & mask1);
- y = (y & mask0) | (ym1 & mask1);
- //y -= 32767 + 2;
- y += 70;
- tm->tm_year=y;
- const int32_t leap = is_leap(y);
- tm->tm_mon = day_of_year_month[leap][doy]-1;
- tm->tm_mday = doy - days_in_year_before[leap][tm->tm_mon] ;
-#else
- int32_t y;
- unsigned m, d;
- civil_from_days(days_since_epoch, y, m, d);
- tm->tm_year=y-1900; tm->tm_mon=m; tm->tm_mday=d;
-#endif
-
- tm->tm_hour = hms / 3600;
- const int ms = hms % 3600;
- tm->tm_min = ms / 60;
- tm->tm_sec = ms % 60;
-
- tm->tm_isdst = -1;
- (void)mktime(tm);
- return tm;
- }
-
- } // detail
-#ifndef BOOST_CHRONO_NO_UTC_TIMEPOINT
-
-#if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
-
- template <class CharT, class Traits, class Duration>
- std::basic_ostream<CharT, Traits>&
- operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<system_clock, Duration>& tp)
- {
- typename std::basic_ostream<CharT, Traits>::sentry ok(os);
- if (bool(ok))
- {
- bool failed = false;
- BOOST_TRY
- {
- const CharT* pb = 0; //nullptr;
- const CharT* pe = pb;
- std::basic_string<CharT> fmt = get_time_fmt<CharT> (os);
- pb = fmt.data();
- pe = pb + fmt.size();
-
- timezone tz = get_timezone(os);
- std::locale loc = os.getloc();
- time_t t = system_clock::to_time_t(time_point_cast<system_clock::duration>(tp));
- std::tm tm;
- std::memset(&tm, 0, sizeof(std::tm));
- if (tz == timezone::local)
- {
-#if defined BOOST_WINDOWS && ! defined(__CYGWIN__)
-#if BOOST_MSVC < 1400 // localtime_s doesn't exist in vc7.1
- std::tm *tmp = 0;
- if ((tmp=localtime(&t)) == 0)
- failed = true;
- else
- tm =*tmp;
-# else
- if (localtime_s(&tm, &t) != 0) failed = true;
-# endif
-#else
- if (localtime_r(&t, &tm) == 0) failed = true;
-#endif
- }
- else
- {
-#if defined BOOST_CHRONO_INTERNAL_GMTIME
- if (detail::internal_gmtime(&t, &tm) == 0) failed = true;
-
-#elif defined BOOST_WINDOWS && ! defined(__CYGWIN__)
- std::tm *tmp = 0;
- if((tmp = gmtime(&t)) == 0)
- failed = true;
- else
- tm = *tmp;
-#else
- if (gmtime_r(&t, &tm) == 0) failed = true;
- tm.tm_isdst = -1;
- (void)mktime(&tm);
-
-#endif
-
- }
- if (!failed)
- {
- const std::time_put<CharT>& tpf = std::use_facet<std::time_put<CharT> >(loc);
- if (pb == pe)
- {
- CharT pattern[] =
- { '%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', '%', 'H', ':', '%', 'M', ':' };
- pb = pattern;
- pe = pb + sizeof (pattern) / sizeof(CharT);
- failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
- if (!failed)
- {
- duration<fractional_seconds> d = tp - system_clock::from_time_t(t) + seconds(tm.tm_sec);
- if (d.count() < 10) os << CharT('0');
- //if (! os.good()) {
- // throw "exception";
- //}
- std::ios::fmtflags flgs = os.flags();
- os.setf(std::ios::fixed, std::ios::floatfield);
- //if (! os.good()) {
- //throw "exception";
- //}
- os.precision(9);
- os << d.count();
- //if (! os.good()) {
- //throw "exception";
- //}
- os.flags(flgs);
- if (tz == timezone::local)
- {
- CharT sub_pattern[] =
- { ' ', '%', 'z' };
- pb = sub_pattern;
- pe = pb + +sizeof (sub_pattern) / sizeof(CharT);
- failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
- }
- else
- {
- CharT sub_pattern[] =
- { ' ', '+', '0', '0', '0', '0', 0 };
- os << sub_pattern;
- }
- }
- }
- else
- {
- failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
- }
- }
- }
- BOOST_CATCH (...)
- {
- failed = true;
- }
- BOOST_CATCH_END
- if (failed)
- {
- os.setstate(std::ios_base::failbit | std::ios_base::badbit);
- }
- }
- return os;
- }
-#endif
-
- namespace detail
- {
-
- template <class CharT, class InputIterator>
- minutes extract_z(InputIterator& b, InputIterator e, std::ios_base::iostate& err, const std::ctype<CharT>& ct)
- {
- int min = 0;
- if (b != e)
- {
- char cn = ct.narrow(*b, 0);
- if (cn != '+' && cn != '-')
- {
- err |= std::ios_base::failbit;
- return minutes(0);
- }
- int sn = cn == '-' ? -1 : 1;
- int hr = 0;
- for (int i = 0; i < 2; ++i)
- {
- if (++b == e)
- {
- err |= std::ios_base::eofbit | std::ios_base::failbit;
- return minutes(0);
- }
- cn = ct.narrow(*b, 0);
- if (! ('0' <= cn && cn <= '9'))
- {
- err |= std::ios_base::failbit;
- return minutes(0);
- }
- hr = hr * 10 + cn - '0';
- }
- for (int i = 0; i < 2; ++i)
- {
- if (++b == e)
- {
- err |= std::ios_base::eofbit | std::ios_base::failbit;
- return minutes(0);
- }
- cn = ct.narrow(*b, 0);
- if (! ('0' <= cn && cn <= '9'))
- {
- err |= std::ios_base::failbit;
- return minutes(0);
- }
- min = min * 10 + cn - '0';
- }
- if (++b == e) {
- err |= std::ios_base::eofbit;
- }
- min += hr * 60;
- min *= sn;
- }
- else
- {
- err |= std::ios_base::eofbit | std::ios_base::failbit;
- }
- return minutes(min);
- }
-
- } // detail
-
-#if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
-
- template <class CharT, class Traits, class Duration>
- std::basic_istream<CharT, Traits>&
- operator>>(std::basic_istream<CharT, Traits>& is, time_point<system_clock, Duration>& tp)
- {
- typename std::basic_istream<CharT, Traits>::sentry ok(is);
- if (bool(ok))
- {
- std::ios_base::iostate err = std::ios_base::goodbit;
- BOOST_TRY
- {
- const CharT* pb = 0; //nullptr;
- const CharT* pe = pb;
- std::basic_string<CharT> fmt = get_time_fmt<CharT> (is);
- pb = fmt.data();
- pe = pb + fmt.size();
-
- timezone tz = get_timezone(is);
- std::locale loc = is.getloc();
- const std::time_get<CharT>& tg = std::use_facet<std::time_get<CharT> >(loc);
- const std::ctype<CharT>& ct = std::use_facet<std::ctype<CharT> >(loc);
- tm tm; // {0}
- std::memset(&tm, 0, sizeof(std::tm));
-
- typedef std::istreambuf_iterator<CharT, Traits> It;
- if (pb == pe)
- {
- CharT pattern[] =
- { '%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', '%', 'H', ':', '%', 'M', ':' };
- pb = pattern;
- pe = pb + sizeof (pattern) / sizeof(CharT);
-
-#if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
- const detail::time_get<CharT>& dtg(tg);
- dtg.get(is, 0, is, err, &tm, pb, pe);
-#else
- tg.get(is, 0, is, err, &tm, pb, pe);
-#endif
- if (err & std::ios_base::failbit) goto exit;
- fractional_seconds sec;
- CharT c = CharT();
- std::ios::fmtflags flgs = is.flags();
- is.setf(std::ios::fixed, std::ios::floatfield);
- is.precision(9);
- is >> sec;
- is.flags(flgs);
- if (is.fail())
- {
- err |= std::ios_base::failbit;
- goto exit;
- }
- It i(is);
- It eof;
- c = *i;
- if (++i == eof || c != ' ')
- {
- err |= std::ios_base::failbit;
- goto exit;
- }
- minutes min = detail::extract_z(i, eof, err, ct);
-
- if (err & std::ios_base::failbit) goto exit;
- time_t t;
-
-#if defined BOOST_CHRONO_INTERNAL_TIMEGM
- t = detail::internal_timegm(&tm);
-#else
- t = timegm(&tm);
-#endif
- tp = time_point_cast<Duration>(
- system_clock::from_time_t(t) - min + round<system_clock::duration> (duration<fractional_seconds> (sec))
- );
- }
- else
- {
- const CharT z[2] =
- { '%', 'z' };
- const CharT* fz = std::search(pb, pe, z, z + 2);
-#if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
- const detail::time_get<CharT>& dtg(tg);
- dtg.get(is, 0, is, err, &tm, pb, fz);
-#else
- tg.get(is, 0, is, err, &tm, pb, fz);
-#endif
- minutes minu(0);
- if (fz != pe)
- {
- if (err != std::ios_base::goodbit)
- {
- err |= std::ios_base::failbit;
- goto exit;
- }
- It i(is);
- It eof;
- minu = detail::extract_z(i, eof, err, ct);
- if (err & std::ios_base::failbit) goto exit;
- if (fz + 2 != pe)
- {
- if (err != std::ios_base::goodbit)
- {
- err |= std::ios_base::failbit;
- goto exit;
- }
-#if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
- const detail::time_get<CharT>& dtg(tg);
- dtg.get(is, 0, is, err, &tm, fz + 2, pe);
-#else
- tg.get(is, 0, is, err, &tm, fz + 2, pe);
-#endif
- if (err & std::ios_base::failbit) goto exit;
- }
- }
- tm.tm_isdst = -1;
- time_t t;
- if (tz == timezone::utc || fz != pe)
- {
-#if defined BOOST_CHRONO_INTERNAL_TIMEGM
- t = detail::internal_timegm(&tm);
-#else
- t = timegm(&tm);
-#endif
- }
- else
- {
- t = mktime(&tm);
- }
- tp = time_point_cast<Duration>(
- system_clock::from_time_t(t) - minu
- );
- }
- }
- BOOST_CATCH (...)
- {
- err |= std::ios_base::badbit | std::ios_base::failbit;
- }
- BOOST_CATCH_END
- exit: is.setstate(err);
- }
- return is;
- }
-
-#endif
-#endif //UTC
- } // chrono
-
-}
-
-#endif // header
diff --git a/src/third_party/boost-1.68.0/boost/concept/assert.hpp b/src/third_party/boost-1.68.0/boost/concept/assert.hpp
deleted file mode 100644
index cf981795229..00000000000
--- a/src/third_party/boost-1.68.0/boost/concept/assert.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright David Abrahams 2006. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP
-# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP
-
-# include <boost/config.hpp>
-# include <boost/detail/workaround.hpp>
-
-// The old protocol used a constraints() member function in concept
-// checking classes. If the compiler supports SFINAE, we can detect
-// that function and seamlessly support the old concept checking
-// classes. In this release, backward compatibility with the old
-// concept checking classes is enabled by default, where available.
-// The old protocol is deprecated, though, and backward compatibility
-// will no longer be the default in the next release.
-
-# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \
- && !defined(BOOST_NO_SFINAE) \
- \
- && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4))
-
-// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to
-// check for the presence of particularmember functions.
-
-# define BOOST_OLD_CONCEPT_SUPPORT
-
-# endif
-
-# ifdef BOOST_MSVC
-# include <boost/concept/detail/msvc.hpp>
-# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-# include <boost/concept/detail/borland.hpp>
-# else
-# include <boost/concept/detail/general.hpp>
-# endif
-
- // Usage, in class or function context:
- //
- // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept<F,bool,int>));
- //
-# define BOOST_CONCEPT_ASSERT(ModelInParens) \
- BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
-
-#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP
diff --git a/src/third_party/boost-1.68.0/boost/concept/detail/general.hpp b/src/third_party/boost-1.68.0/boost/concept/detail/general.hpp
deleted file mode 100644
index 525ea656c2d..00000000000
--- a/src/third_party/boost-1.68.0/boost/concept/detail/general.hpp
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright David Abrahams 2006. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
-# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
-
-# include <boost/config.hpp>
-# include <boost/preprocessor/cat.hpp>
-# include <boost/concept/detail/backward_compatibility.hpp>
-
-# ifdef BOOST_OLD_CONCEPT_SUPPORT
-# include <boost/concept/detail/has_constraints.hpp>
-# include <boost/mpl/if.hpp>
-# endif
-
-// This implementation works on Comeau and GCC, all the way back to
-// 2.95
-namespace boost { namespace concepts {
-
-template <class ModelFn>
-struct requirement_;
-
-namespace detail
-{
- template <void(*)()> struct instantiate {};
-}
-
-template <class Model>
-struct requirement
-{
- static void failed() { ((Model*)0)->~Model(); }
-};
-
-struct failed {};
-
-template <class Model>
-struct requirement<failed ************ Model::************>
-{
- static void failed() { ((Model*)0)->~Model(); }
-};
-
-# ifdef BOOST_OLD_CONCEPT_SUPPORT
-
-template <class Model>
-struct constraint
-{
- static void failed() { ((Model*)0)->constraints(); }
-};
-
-template <class Model>
-struct requirement_<void(*)(Model)>
- : mpl::if_<
- concepts::not_satisfied<Model>
- , constraint<Model>
- , requirement<failed ************ Model::************>
- >::type
-{};
-
-# else
-
-// For GCC-2.x, these can't have exactly the same name
-template <class Model>
-struct requirement_<void(*)(Model)>
- : requirement<failed ************ Model::************>
-{};
-
-# endif
-
-# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
- typedef ::boost::concepts::detail::instantiate< \
- &::boost::concepts::requirement_<ModelFnPtr>::failed> \
- BOOST_PP_CAT(boost_concept_check,__LINE__) \
- BOOST_ATTRIBUTE_UNUSED
-
-}}
-
-#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
diff --git a/src/third_party/boost-1.68.0/boost/concept/detail/has_constraints.hpp b/src/third_party/boost-1.68.0/boost/concept/detail/has_constraints.hpp
deleted file mode 100644
index a309db3d88a..00000000000
--- a/src/third_party/boost-1.68.0/boost/concept/detail/has_constraints.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright David Abrahams 2006. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
-# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
-
-# include <boost/mpl/bool.hpp>
-# include <boost/detail/workaround.hpp>
-# include <boost/concept/detail/backward_compatibility.hpp>
-
-namespace boost { namespace concepts {
-
-namespace detail
-{
-
-// Here we implement the metafunction that detects whether a
-// constraints metafunction exists
- typedef char yes;
- typedef char (&no)[2];
-
- template <class Model, void (Model::*)()>
- struct wrap_constraints {};
-
-#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__)
- // Work around the following bogus error in Sun Studio 11, by
- // turning off the has_constraints function entirely:
- // Error: complex expression not allowed in dependent template
- // argument expression
- inline no has_constraints_(...);
-#else
- template <class Model>
- inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
- inline no has_constraints_(...);
-#endif
-}
-
-// This would be called "detail::has_constraints," but it has a strong
-// tendency to show up in error messages.
-template <class Model>
-struct not_satisfied
-{
- BOOST_STATIC_CONSTANT(
- bool
- , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) );
- typedef mpl::bool_<value> type;
-};
-
-}} // namespace boost::concepts::detail
-
-#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
diff --git a/src/third_party/boost-1.68.0/boost/concept/detail/msvc.hpp b/src/third_party/boost-1.68.0/boost/concept/detail/msvc.hpp
deleted file mode 100644
index 078dd22330e..00000000000
--- a/src/third_party/boost-1.68.0/boost/concept/detail/msvc.hpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright David Abrahams 2006. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
-# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
-
-# include <boost/preprocessor/cat.hpp>
-# include <boost/concept/detail/backward_compatibility.hpp>
-# include <boost/config.hpp>
-
-# ifdef BOOST_OLD_CONCEPT_SUPPORT
-# include <boost/concept/detail/has_constraints.hpp>
-# include <boost/mpl/if.hpp>
-# endif
-
-# ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:4100)
-# endif
-
-namespace boost { namespace concepts {
-
-
-template <class Model>
-struct check
-{
- virtual void failed(Model* x)
- {
- x->~Model();
- }
-};
-
-# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
-struct failed {};
-template <class Model>
-struct check<failed ************ Model::************>
-{
- virtual void failed(Model* x)
- {
- x->~Model();
- }
-};
-# endif
-
-# ifdef BOOST_OLD_CONCEPT_SUPPORT
-
-namespace detail
-{
- // No need for a virtual function here, since evaluating
- // not_satisfied below will have already instantiated the
- // constraints() member.
- struct constraint {};
-}
-
-template <class Model>
-struct require
- : mpl::if_c<
- not_satisfied<Model>::value
- , detail::constraint
-# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
- , check<Model>
-# else
- , check<failed ************ Model::************>
-# endif
- >::type
-{};
-
-# else
-
-template <class Model>
-struct require
-# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
- : check<Model>
-# else
- : check<failed ************ Model::************>
-# endif
-{};
-
-# endif
-
-# if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
-
-//
-// The iterator library sees some really strange errors unless we
-// do things this way.
-//
-template <class Model>
-struct require<void(*)(Model)>
-{
- virtual void failed(Model*)
- {
- require<Model>();
- }
-};
-
-# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
-enum \
-{ \
- BOOST_PP_CAT(boost_concept_check,__LINE__) = \
- sizeof(::boost::concepts::require<ModelFnPtr>) \
-}
-
-# else // Not vc-7.1
-
-template <class Model>
-require<Model>
-require_(void(*)(Model));
-
-# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
-enum \
-{ \
- BOOST_PP_CAT(boost_concept_check,__LINE__) = \
- sizeof(::boost::concepts::require_((ModelFnPtr)0)) \
-}
-
-# endif
-}}
-
-# ifdef BOOST_MSVC
-# pragma warning(pop)
-# endif
-
-#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
diff --git a/src/third_party/boost-1.68.0/boost/concept/usage.hpp b/src/third_party/boost-1.68.0/boost/concept/usage.hpp
deleted file mode 100644
index e73370fb37e..00000000000
--- a/src/third_party/boost-1.68.0/boost/concept/usage.hpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright David Abrahams 2006. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP
-# define BOOST_CONCEPT_USAGE_DWA2006919_HPP
-
-# include <boost/concept/assert.hpp>
-# include <boost/detail/workaround.hpp>
-# include <boost/concept/detail/backward_compatibility.hpp>
-
-namespace boost { namespace concepts {
-
-template <class Model>
-struct usage_requirements
-{
- ~usage_requirements() { ((Model*)0)->~Model(); }
-};
-
-# if BOOST_WORKAROUND(__GNUC__, <= 3)
-
-# define BOOST_CONCEPT_USAGE(model) \
- model(); /* at least 2.96 and 3.4.3 both need this :( */ \
- BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
- ~model()
-
-# else
-
-# define BOOST_CONCEPT_USAGE(model) \
- BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
- ~model()
-
-# endif
-
-}} // namespace boost::concepts
-
-#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP
diff --git a/src/third_party/boost-1.68.0/boost/concept_archetype.hpp b/src/third_party/boost-1.68.0/boost/concept_archetype.hpp
deleted file mode 100644
index f2455fd8557..00000000000
--- a/src/third_party/boost-1.68.0/boost/concept_archetype.hpp
+++ /dev/null
@@ -1,670 +0,0 @@
-//
-// (C) Copyright Jeremy Siek 2000.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// Revision History:
-//
-// 17 July 2001: Added const to some member functions. (Jeremy Siek)
-// 05 May 2001: Removed static dummy_cons object. (Jeremy Siek)
-
-// See http://www.boost.org/libs/concept_check for documentation.
-
-#ifndef BOOST_CONCEPT_ARCHETYPES_HPP
-#define BOOST_CONCEPT_ARCHETYPES_HPP
-
-#include <boost/config.hpp>
-#include <boost/mpl/identity.hpp>
-#include <functional>
-#include <iterator> // iterator tags
-#include <cstddef> // std::ptrdiff_t
-
-namespace boost {
-
- //===========================================================================
- // Basic Archetype Classes
-
- namespace detail {
- class dummy_constructor { };
- }
-
- // A type that models no concept. The template parameter
- // is only there so that null_archetype types can be created
- // that have different type.
- template <class T = int>
- class null_archetype {
- private:
- null_archetype() { }
- null_archetype(const null_archetype&) { }
- null_archetype& operator=(const null_archetype&) { return *this; }
- public:
- null_archetype(detail::dummy_constructor) { }
-#ifndef __MWERKS__
- template <class TT>
- friend void dummy_friend(); // just to avoid warnings
-#endif
- };
-
- // This is a helper class that provides a way to get a reference to
- // an object. The get() function will never be called at run-time
- // (nothing in this file will) so this seemingly very bad function
- // is really quite innocent. The name of this class needs to be
- // changed.
- template <class T>
- class static_object
- {
- public:
- static T& get()
- {
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- return *reinterpret_cast<T*>(0);
-#else
- static char d[sizeof(T)];
- return *reinterpret_cast<T*>(d);
-#endif
- }
- };
-
- template <class Base = null_archetype<> >
- class default_constructible_archetype : public Base {
- public:
- default_constructible_archetype()
- : Base(static_object<detail::dummy_constructor>::get()) { }
- default_constructible_archetype(detail::dummy_constructor x) : Base(x) { }
- };
-
- template <class Base = null_archetype<> >
- class assignable_archetype : public Base {
- assignable_archetype() { }
- assignable_archetype(const assignable_archetype&) { }
- public:
- assignable_archetype& operator=(const assignable_archetype&) {
- return *this;
- }
- assignable_archetype(detail::dummy_constructor x) : Base(x) { }
- };
-
- template <class Base = null_archetype<> >
- class copy_constructible_archetype : public Base {
- public:
- copy_constructible_archetype()
- : Base(static_object<detail::dummy_constructor>::get()) { }
- copy_constructible_archetype(const copy_constructible_archetype&)
- : Base(static_object<detail::dummy_constructor>::get()) { }
- copy_constructible_archetype(detail::dummy_constructor x) : Base(x) { }
- };
-
- template <class Base = null_archetype<> >
- class sgi_assignable_archetype : public Base {
- public:
- sgi_assignable_archetype(const sgi_assignable_archetype&)
- : Base(static_object<detail::dummy_constructor>::get()) { }
- sgi_assignable_archetype& operator=(const sgi_assignable_archetype&) {
- return *this;
- }
- sgi_assignable_archetype(const detail::dummy_constructor& x) : Base(x) { }
- };
-
- struct default_archetype_base {
- default_archetype_base(detail::dummy_constructor) { }
- };
-
- // Careful, don't use same type for T and Base. That results in the
- // conversion operator being invalid. Since T is often
- // null_archetype, can't use null_archetype for Base.
- template <class T, class Base = default_archetype_base>
- class convertible_to_archetype : public Base {
- private:
- convertible_to_archetype() { }
- convertible_to_archetype(const convertible_to_archetype& ) { }
- convertible_to_archetype& operator=(const convertible_to_archetype&)
- { return *this; }
- public:
- convertible_to_archetype(detail::dummy_constructor x) : Base(x) { }
- operator const T&() const { return static_object<T>::get(); }
- };
-
- template <class T, class Base = default_archetype_base>
- class convertible_from_archetype : public Base {
- private:
- convertible_from_archetype() { }
- convertible_from_archetype(const convertible_from_archetype& ) { }
- convertible_from_archetype& operator=(const convertible_from_archetype&)
- { return *this; }
- public:
- convertible_from_archetype(detail::dummy_constructor x) : Base(x) { }
- convertible_from_archetype(const T&) { }
- convertible_from_archetype& operator=(const T&)
- { return *this; }
- };
-
- class boolean_archetype {
- public:
- boolean_archetype(const boolean_archetype&) { }
- operator bool() const { return true; }
- boolean_archetype(detail::dummy_constructor) { }
- private:
- boolean_archetype() { }
- boolean_archetype& operator=(const boolean_archetype&) { return *this; }
- };
-
- template <class Base = null_archetype<> >
- class equality_comparable_archetype : public Base {
- public:
- equality_comparable_archetype(detail::dummy_constructor x) : Base(x) { }
- };
- template <class Base>
- boolean_archetype
- operator==(const equality_comparable_archetype<Base>&,
- const equality_comparable_archetype<Base>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
- template <class Base>
- boolean_archetype
- operator!=(const equality_comparable_archetype<Base>&,
- const equality_comparable_archetype<Base>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
-
-
- template <class Base = null_archetype<> >
- class equality_comparable2_first_archetype : public Base {
- public:
- equality_comparable2_first_archetype(detail::dummy_constructor x)
- : Base(x) { }
- };
- template <class Base = null_archetype<> >
- class equality_comparable2_second_archetype : public Base {
- public:
- equality_comparable2_second_archetype(detail::dummy_constructor x)
- : Base(x) { }
- };
- template <class Base1, class Base2>
- boolean_archetype
- operator==(const equality_comparable2_first_archetype<Base1>&,
- const equality_comparable2_second_archetype<Base2>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
- template <class Base1, class Base2>
- boolean_archetype
- operator!=(const equality_comparable2_first_archetype<Base1>&,
- const equality_comparable2_second_archetype<Base2>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
-
-
- template <class Base = null_archetype<> >
- class less_than_comparable_archetype : public Base {
- public:
- less_than_comparable_archetype(detail::dummy_constructor x) : Base(x) { }
- };
- template <class Base>
- boolean_archetype
- operator<(const less_than_comparable_archetype<Base>&,
- const less_than_comparable_archetype<Base>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
-
-
-
- template <class Base = null_archetype<> >
- class comparable_archetype : public Base {
- public:
- comparable_archetype(detail::dummy_constructor x) : Base(x) { }
- };
- template <class Base>
- boolean_archetype
- operator<(const comparable_archetype<Base>&,
- const comparable_archetype<Base>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
- template <class Base>
- boolean_archetype
- operator<=(const comparable_archetype<Base>&,
- const comparable_archetype<Base>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
- template <class Base>
- boolean_archetype
- operator>(const comparable_archetype<Base>&,
- const comparable_archetype<Base>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
- template <class Base>
- boolean_archetype
- operator>=(const comparable_archetype<Base>&,
- const comparable_archetype<Base>&)
- {
- return boolean_archetype(static_object<detail::dummy_constructor>::get());
- }
-
-
- // The purpose of the optags is so that one can specify
- // exactly which types the operator< is defined between.
- // This is useful for allowing the operations:
- //
- // A a; B b;
- // a < b
- // b < a
- //
- // without also allowing the combinations:
- //
- // a < a
- // b < b
- //
- struct optag1 { };
- struct optag2 { };
- struct optag3 { };
-
-#define BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(OP, NAME) \
- template <class Base = null_archetype<>, class Tag = optag1 > \
- class NAME##_first_archetype : public Base { \
- public: \
- NAME##_first_archetype(detail::dummy_constructor x) : Base(x) { } \
- }; \
- \
- template <class Base = null_archetype<>, class Tag = optag1 > \
- class NAME##_second_archetype : public Base { \
- public: \
- NAME##_second_archetype(detail::dummy_constructor x) : Base(x) { } \
- }; \
- \
- template <class BaseFirst, class BaseSecond, class Tag> \
- boolean_archetype \
- operator OP (const NAME##_first_archetype<BaseFirst, Tag>&, \
- const NAME##_second_archetype<BaseSecond, Tag>&) \
- { \
- return boolean_archetype(static_object<detail::dummy_constructor>::get()); \
- }
-
- BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(==, equal_op)
- BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(!=, not_equal_op)
- BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(<, less_than_op)
- BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(<=, less_equal_op)
- BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(>, greater_than_op)
- BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(>=, greater_equal_op)
-
-#define BOOST_DEFINE_OPERATOR_ARCHETYPE(OP, NAME) \
- template <class Base = null_archetype<> > \
- class NAME##_archetype : public Base { \
- public: \
- NAME##_archetype(detail::dummy_constructor x) : Base(x) { } \
- NAME##_archetype(const NAME##_archetype&) \
- : Base(static_object<detail::dummy_constructor>::get()) { } \
- NAME##_archetype& operator=(const NAME##_archetype&) { return *this; } \
- }; \
- template <class Base> \
- NAME##_archetype<Base> \
- operator OP (const NAME##_archetype<Base>&,\
- const NAME##_archetype<Base>&) \
- { \
- return \
- NAME##_archetype<Base>(static_object<detail::dummy_constructor>::get()); \
- }
-
- BOOST_DEFINE_OPERATOR_ARCHETYPE(+, addable)
- BOOST_DEFINE_OPERATOR_ARCHETYPE(-, subtractable)
- BOOST_DEFINE_OPERATOR_ARCHETYPE(*, multipliable)
- BOOST_DEFINE_OPERATOR_ARCHETYPE(/, dividable)
- BOOST_DEFINE_OPERATOR_ARCHETYPE(%, modable)
-
- // As is, these are useless because of the return type.
- // Need to invent a better way...
-#define BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(OP, NAME) \
- template <class Return, class Base = null_archetype<> > \
- class NAME##_first_archetype : public Base { \
- public: \
- NAME##_first_archetype(detail::dummy_constructor x) : Base(x) { } \
- }; \
- \
- template <class Return, class Base = null_archetype<> > \
- class NAME##_second_archetype : public Base { \
- public: \
- NAME##_second_archetype(detail::dummy_constructor x) : Base(x) { } \
- }; \
- \
- template <class Return, class BaseFirst, class BaseSecond> \
- Return \
- operator OP (const NAME##_first_archetype<Return, BaseFirst>&, \
- const NAME##_second_archetype<Return, BaseSecond>&) \
- { \
- return Return(static_object<detail::dummy_constructor>::get()); \
- }
-
- BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(+, plus_op)
- BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(*, time_op)
- BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(/, divide_op)
- BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(-, subtract_op)
- BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(%, mod_op)
-
- //===========================================================================
- // Function Object Archetype Classes
-
- template <class Return>
- class generator_archetype {
- public:
- const Return& operator()() {
- return static_object<Return>::get();
- }
- };
-
- class void_generator_archetype {
- public:
- void operator()() { }
- };
-
- template <class Arg, class Return>
- class unary_function_archetype {
- private:
- unary_function_archetype() { }
- public:
- unary_function_archetype(detail::dummy_constructor) { }
- const Return& operator()(const Arg&) const {
- return static_object<Return>::get();
- }
- };
-
- template <class Arg1, class Arg2, class Return>
- class binary_function_archetype {
- private:
- binary_function_archetype() { }
- public:
- binary_function_archetype(detail::dummy_constructor) { }
- const Return& operator()(const Arg1&, const Arg2&) const {
- return static_object<Return>::get();
- }
- };
-
- template <class Arg>
- class unary_predicate_archetype {
- typedef boolean_archetype Return;
- unary_predicate_archetype() { }
- public:
- unary_predicate_archetype(detail::dummy_constructor) { }
- const Return& operator()(const Arg&) const {
- return static_object<Return>::get();
- }
- };
-
- template <class Arg1, class Arg2, class Base = null_archetype<> >
- class binary_predicate_archetype {
- typedef boolean_archetype Return;
- binary_predicate_archetype() { }
- public:
- binary_predicate_archetype(detail::dummy_constructor) { }
- const Return& operator()(const Arg1&, const Arg2&) const {
- return static_object<Return>::get();
- }
- };
-
- //===========================================================================
- // Iterator Archetype Classes
-
- template <class T, int I = 0>
- class input_iterator_archetype
- {
- private:
- typedef input_iterator_archetype self;
- public:
- typedef std::input_iterator_tag iterator_category;
- typedef T value_type;
- struct reference {
- operator const value_type&() const { return static_object<T>::get(); }
- };
- typedef const T* pointer;
- typedef std::ptrdiff_t difference_type;
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return reference(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- };
-
- template <class T>
- class input_iterator_archetype_no_proxy
- {
- private:
- typedef input_iterator_archetype_no_proxy self;
- public:
- typedef std::input_iterator_tag iterator_category;
- typedef T value_type;
- typedef const T& reference;
- typedef const T* pointer;
- typedef std::ptrdiff_t difference_type;
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return static_object<T>::get(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- };
-
- template <class T>
- struct output_proxy {
- output_proxy& operator=(const T&) { return *this; }
- };
-
- template <class T>
- class output_iterator_archetype
- {
- public:
- typedef output_iterator_archetype self;
- public:
- typedef std::output_iterator_tag iterator_category;
- typedef output_proxy<T> value_type;
- typedef output_proxy<T> reference;
- typedef void pointer;
- typedef void difference_type;
- output_iterator_archetype(detail::dummy_constructor) { }
- output_iterator_archetype(const self&) { }
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return output_proxy<T>(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- private:
- output_iterator_archetype() { }
- };
-
- template <class T>
- class input_output_iterator_archetype
- {
- private:
- typedef input_output_iterator_archetype self;
- struct in_out_tag : public std::input_iterator_tag, public std::output_iterator_tag { };
- public:
- typedef in_out_tag iterator_category;
- typedef T value_type;
- struct reference {
- reference& operator=(const T&) { return *this; }
- operator value_type() { return static_object<T>::get(); }
- };
- typedef const T* pointer;
- typedef std::ptrdiff_t difference_type;
- input_output_iterator_archetype() { }
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return reference(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- };
-
- template <class T>
- class forward_iterator_archetype
- {
- public:
- typedef forward_iterator_archetype self;
- public:
- typedef std::forward_iterator_tag iterator_category;
- typedef T value_type;
- typedef const T& reference;
- typedef T const* pointer;
- typedef std::ptrdiff_t difference_type;
- forward_iterator_archetype() { }
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return static_object<T>::get(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- };
-
- template <class T>
- class mutable_forward_iterator_archetype
- {
- public:
- typedef mutable_forward_iterator_archetype self;
- public:
- typedef std::forward_iterator_tag iterator_category;
- typedef T value_type;
- typedef T& reference;
- typedef T* pointer;
- typedef std::ptrdiff_t difference_type;
- mutable_forward_iterator_archetype() { }
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return static_object<T>::get(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- };
-
- template <class T>
- class bidirectional_iterator_archetype
- {
- public:
- typedef bidirectional_iterator_archetype self;
- public:
- typedef std::bidirectional_iterator_tag iterator_category;
- typedef T value_type;
- typedef const T& reference;
- typedef T* pointer;
- typedef std::ptrdiff_t difference_type;
- bidirectional_iterator_archetype() { }
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return static_object<T>::get(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- self& operator--() { return *this; }
- self operator--(int) { return *this; }
- };
-
- template <class T>
- class mutable_bidirectional_iterator_archetype
- {
- public:
- typedef mutable_bidirectional_iterator_archetype self;
- public:
- typedef std::bidirectional_iterator_tag iterator_category;
- typedef T value_type;
- typedef T& reference;
- typedef T* pointer;
- typedef std::ptrdiff_t difference_type;
- mutable_bidirectional_iterator_archetype() { }
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return static_object<T>::get(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- self& operator--() { return *this; }
- self operator--(int) { return *this; }
- };
-
- template <class T>
- class random_access_iterator_archetype
- {
- public:
- typedef random_access_iterator_archetype self;
- public:
- typedef std::random_access_iterator_tag iterator_category;
- typedef T value_type;
- typedef const T& reference;
- typedef T* pointer;
- typedef std::ptrdiff_t difference_type;
- random_access_iterator_archetype() { }
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return static_object<T>::get(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- self& operator--() { return *this; }
- self operator--(int) { return *this; }
- reference operator[](difference_type) const
- { return static_object<T>::get(); }
- self& operator+=(difference_type) { return *this; }
- self& operator-=(difference_type) { return *this; }
- difference_type operator-(const self&) const
- { return difference_type(); }
- self operator+(difference_type) const { return *this; }
- self operator-(difference_type) const { return *this; }
- bool operator<(const self&) const { return true; }
- bool operator<=(const self&) const { return true; }
- bool operator>(const self&) const { return true; }
- bool operator>=(const self&) const { return true; }
- };
- template <class T>
- random_access_iterator_archetype<T>
- operator+(typename random_access_iterator_archetype<T>::difference_type,
- const random_access_iterator_archetype<T>& x)
- { return x; }
-
-
- template <class T>
- class mutable_random_access_iterator_archetype
- {
- public:
- typedef mutable_random_access_iterator_archetype self;
- public:
- typedef std::random_access_iterator_tag iterator_category;
- typedef T value_type;
- typedef T& reference;
- typedef T* pointer;
- typedef std::ptrdiff_t difference_type;
- mutable_random_access_iterator_archetype() { }
- self& operator=(const self&) { return *this; }
- bool operator==(const self&) const { return true; }
- bool operator!=(const self&) const { return true; }
- reference operator*() const { return static_object<T>::get(); }
- self& operator++() { return *this; }
- self operator++(int) { return *this; }
- self& operator--() { return *this; }
- self operator--(int) { return *this; }
- reference operator[](difference_type) const
- { return static_object<T>::get(); }
- self& operator+=(difference_type) { return *this; }
- self& operator-=(difference_type) { return *this; }
- difference_type operator-(const self&) const
- { return difference_type(); }
- self operator+(difference_type) const { return *this; }
- self operator-(difference_type) const { return *this; }
- bool operator<(const self&) const { return true; }
- bool operator<=(const self&) const { return true; }
- bool operator>(const self&) const { return true; }
- bool operator>=(const self&) const { return true; }
- };
- template <class T>
- mutable_random_access_iterator_archetype<T>
- operator+
- (typename mutable_random_access_iterator_archetype<T>::difference_type,
- const mutable_random_access_iterator_archetype<T>& x)
- { return x; }
-
-} // namespace boost
-
-#endif // BOOST_CONCEPT_ARCHETYPES_H
diff --git a/src/third_party/boost-1.68.0/boost/concept_check.hpp b/src/third_party/boost-1.68.0/boost/concept_check.hpp
deleted file mode 100644
index 25f118b6438..00000000000
--- a/src/third_party/boost-1.68.0/boost/concept_check.hpp
+++ /dev/null
@@ -1,1082 +0,0 @@
-//
-// (C) Copyright Jeremy Siek 2000.
-// Copyright 2002 The Trustees of Indiana University.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// Revision History:
-// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek)
-// 02 April 2001: Removed limits header altogether. (Jeremy Siek)
-// 01 April 2001: Modified to use new <boost/limits.hpp> header. (JMaddock)
-//
-
-// See http://www.boost.org/libs/concept_check for documentation.
-
-#ifndef BOOST_CONCEPT_CHECKS_HPP
-# define BOOST_CONCEPT_CHECKS_HPP
-
-# include <boost/concept/assert.hpp>
-
-# include <iterator>
-# include <boost/type_traits/conversion_traits.hpp>
-# include <utility>
-# include <boost/type_traits/is_same.hpp>
-# include <boost/type_traits/is_void.hpp>
-# include <boost/mpl/assert.hpp>
-# include <boost/mpl/bool.hpp>
-# include <boost/detail/workaround.hpp>
-
-# include <boost/concept/usage.hpp>
-# include <boost/concept/detail/concept_def.hpp>
-
-#if (defined _MSC_VER)
-# pragma warning( push )
-# pragma warning( disable : 4510 ) // default constructor could not be generated
-# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required
-#endif
-
-namespace boost
-{
-
- //
- // Backward compatibility
- //
-
- template <class Model>
- inline void function_requires(Model* = 0)
- {
- BOOST_CONCEPT_ASSERT((Model));
- }
- template <class T> inline void ignore_unused_variable_warning(T const&) {}
-
-# define BOOST_CLASS_REQUIRE(type_var, ns, concept) \
- BOOST_CONCEPT_ASSERT((ns::concept<type_var>))
-
-# define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \
- BOOST_CONCEPT_ASSERT((ns::concept<type_var1,type_var2>))
-
-# define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \
- BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3>))
-
-# define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \
- BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3,tv4>))
-
-
- //
- // Begin concept definitions
- //
- BOOST_concept(Integer, (T))
- {
- BOOST_CONCEPT_USAGE(Integer)
- {
- x.error_type_must_be_an_integer_type();
- }
- private:
- T x;
- };
-
- template <> struct Integer<char> {};
- template <> struct Integer<signed char> {};
- template <> struct Integer<unsigned char> {};
- template <> struct Integer<short> {};
- template <> struct Integer<unsigned short> {};
- template <> struct Integer<int> {};
- template <> struct Integer<unsigned int> {};
- template <> struct Integer<long> {};
- template <> struct Integer<unsigned long> {};
-# if defined(BOOST_HAS_LONG_LONG)
- template <> struct Integer< ::boost::long_long_type> {};
- template <> struct Integer< ::boost::ulong_long_type> {};
-# elif defined(BOOST_HAS_MS_INT64)
- template <> struct Integer<__int64> {};
- template <> struct Integer<unsigned __int64> {};
-# endif
-
- BOOST_concept(SignedInteger,(T)) {
- BOOST_CONCEPT_USAGE(SignedInteger) {
- x.error_type_must_be_a_signed_integer_type();
- }
- private:
- T x;
- };
- template <> struct SignedInteger<signed char> { };
- template <> struct SignedInteger<short> {};
- template <> struct SignedInteger<int> {};
- template <> struct SignedInteger<long> {};
-# if defined(BOOST_HAS_LONG_LONG)
- template <> struct SignedInteger< ::boost::long_long_type> {};
-# elif defined(BOOST_HAS_MS_INT64)
- template <> struct SignedInteger<__int64> {};
-# endif
-
- BOOST_concept(UnsignedInteger,(T)) {
- BOOST_CONCEPT_USAGE(UnsignedInteger) {
- x.error_type_must_be_an_unsigned_integer_type();
- }
- private:
- T x;
- };
-
- template <> struct UnsignedInteger<unsigned char> {};
- template <> struct UnsignedInteger<unsigned short> {};
- template <> struct UnsignedInteger<unsigned int> {};
- template <> struct UnsignedInteger<unsigned long> {};
-# if defined(BOOST_HAS_LONG_LONG)
- template <> struct UnsignedInteger< ::boost::ulong_long_type> {};
-# elif defined(BOOST_HAS_MS_INT64)
- template <> struct UnsignedInteger<unsigned __int64> {};
-# endif
-
- //===========================================================================
- // Basic Concepts
-
- BOOST_concept(DefaultConstructible,(TT))
- {
- BOOST_CONCEPT_USAGE(DefaultConstructible) {
- TT a; // require default constructor
- ignore_unused_variable_warning(a);
- }
- };
-
- BOOST_concept(Assignable,(TT))
- {
- BOOST_CONCEPT_USAGE(Assignable) {
-#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
- a = b; // require assignment operator
-#endif
- const_constraints(b);
- }
- private:
- void const_constraints(const TT& x) {
-#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
- a = x; // const required for argument to assignment
-#else
- ignore_unused_variable_warning(x);
-#endif
- }
- private:
- TT a;
- TT b;
- };
-
-
- BOOST_concept(CopyConstructible,(TT))
- {
- BOOST_CONCEPT_USAGE(CopyConstructible) {
- TT a(b); // require copy constructor
- TT* ptr = &a; // require address of operator
- const_constraints(a);
- ignore_unused_variable_warning(ptr);
- }
- private:
- void const_constraints(const TT& a) {
- TT c(a); // require const copy constructor
- const TT* ptr = &a; // require const address of operator
- ignore_unused_variable_warning(c);
- ignore_unused_variable_warning(ptr);
- }
- TT b;
- };
-
- // The SGI STL version of Assignable requires copy constructor and operator=
- BOOST_concept(SGIAssignable,(TT))
- {
- BOOST_CONCEPT_USAGE(SGIAssignable) {
- TT c(a);
-#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
- a = b; // require assignment operator
-#endif
- const_constraints(b);
- ignore_unused_variable_warning(c);
- }
- private:
- void const_constraints(const TT& x) {
- TT c(x);
-#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
- a = x; // const required for argument to assignment
-#endif
- ignore_unused_variable_warning(c);
- }
- TT a;
- TT b;
- };
-
- BOOST_concept(Convertible,(X)(Y))
- {
- BOOST_CONCEPT_USAGE(Convertible) {
- Y y = x;
- ignore_unused_variable_warning(y);
- }
- private:
- X x;
- };
-
- // The C++ standard requirements for many concepts talk about return
- // types that must be "convertible to bool". The problem with this
- // requirement is that it leaves the door open for evil proxies that
- // define things like operator|| with strange return types. Two
- // possible solutions are:
- // 1) require the return type to be exactly bool
- // 2) stay with convertible to bool, and also
- // specify stuff about all the logical operators.
- // For now we just test for convertible to bool.
- template <class TT>
- void require_boolean_expr(const TT& t) {
- bool x = t;
- ignore_unused_variable_warning(x);
- }
-
- BOOST_concept(EqualityComparable,(TT))
- {
- BOOST_CONCEPT_USAGE(EqualityComparable) {
- require_boolean_expr(a == b);
- require_boolean_expr(a != b);
- }
- private:
- TT a, b;
- };
-
- BOOST_concept(LessThanComparable,(TT))
- {
- BOOST_CONCEPT_USAGE(LessThanComparable) {
- require_boolean_expr(a < b);
- }
- private:
- TT a, b;
- };
-
- // This is equivalent to SGI STL's LessThanComparable.
- BOOST_concept(Comparable,(TT))
- {
- BOOST_CONCEPT_USAGE(Comparable) {
- require_boolean_expr(a < b);
- require_boolean_expr(a > b);
- require_boolean_expr(a <= b);
- require_boolean_expr(a >= b);
- }
- private:
- TT a, b;
- };
-
-#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \
- BOOST_concept(NAME, (First)(Second)) \
- { \
- BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \
- private: \
- bool constraints_() { return a OP b; } \
- First a; \
- Second b; \
- }
-
-#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \
- BOOST_concept(NAME, (Ret)(First)(Second)) \
- { \
- BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \
- private: \
- Ret constraints_() { return a OP b; } \
- First a; \
- Second b; \
- }
-
- BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp);
- BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp);
- BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp);
- BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp);
- BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp);
- BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp);
-
- BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp);
- BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp);
- BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp);
- BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp);
- BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp);
-
- //===========================================================================
- // Function Object Concepts
-
- BOOST_concept(Generator,(Func)(Return))
- {
- BOOST_CONCEPT_USAGE(Generator) { test(is_void<Return>()); }
-
- private:
- void test(boost::mpl::false_)
- {
- // Do we really want a reference here?
- const Return& r = f();
- ignore_unused_variable_warning(r);
- }
-
- void test(boost::mpl::true_)
- {
- f();
- }
-
- Func f;
- };
-
- BOOST_concept(UnaryFunction,(Func)(Return)(Arg))
- {
- BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void<Return>()); }
-
- private:
- void test(boost::mpl::false_)
- {
- f(arg); // "priming the pump" this way keeps msvc6 happy (ICE)
- Return r = f(arg);
- ignore_unused_variable_warning(r);
- }
-
- void test(boost::mpl::true_)
- {
- f(arg);
- }
-
-#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
- && BOOST_WORKAROUND(__GNUC__, > 3)))
- // Declare a dummy construktor to make gcc happy.
- // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
- // (warning: non-static reference "const double& boost::UnaryFunction<YourClassHere>::arg"
- // in class without a constructor [-Wuninitialized])
- UnaryFunction();
-#endif
-
- Func f;
- Arg arg;
- };
-
- BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second))
- {
- BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void<Return>()); }
- private:
- void test(boost::mpl::false_)
- {
- f(first,second);
- Return r = f(first, second); // require operator()
- (void)r;
- }
-
- void test(boost::mpl::true_)
- {
- f(first,second);
- }
-
-#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
- && BOOST_WORKAROUND(__GNUC__, > 3)))
- // Declare a dummy constructor to make gcc happy.
- // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
- // (warning: non-static reference "const double& boost::BinaryFunction<YourClassHere>::arg"
- // in class without a constructor [-Wuninitialized])
- BinaryFunction();
-#endif
-
- Func f;
- First first;
- Second second;
- };
-
- BOOST_concept(UnaryPredicate,(Func)(Arg))
- {
- BOOST_CONCEPT_USAGE(UnaryPredicate) {
- require_boolean_expr(f(arg)); // require operator() returning bool
- }
- private:
-#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
- && BOOST_WORKAROUND(__GNUC__, > 3)))
- // Declare a dummy constructor to make gcc happy.
- // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
- // (warning: non-static reference "const double& boost::UnaryPredicate<YourClassHere>::arg"
- // in class without a constructor [-Wuninitialized])
- UnaryPredicate();
-#endif
-
- Func f;
- Arg arg;
- };
-
- BOOST_concept(BinaryPredicate,(Func)(First)(Second))
- {
- BOOST_CONCEPT_USAGE(BinaryPredicate) {
- require_boolean_expr(f(a, b)); // require operator() returning bool
- }
- private:
-#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
- && BOOST_WORKAROUND(__GNUC__, > 3)))
- // Declare a dummy constructor to make gcc happy.
- // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
- // (warning: non-static reference "const double& boost::BinaryPredicate<YourClassHere>::arg"
- // in class without a constructor [-Wuninitialized])
- BinaryPredicate();
-#endif
- Func f;
- First a;
- Second b;
- };
-
- // use this when functor is used inside a container class like std::set
- BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second))
- : BinaryPredicate<Func, First, Second>
- {
- BOOST_CONCEPT_USAGE(Const_BinaryPredicate) {
- const_constraints(f);
- }
- private:
- void const_constraints(const Func& fun) {
- // operator() must be a const member function
- require_boolean_expr(fun(a, b));
- }
-#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
- && BOOST_WORKAROUND(__GNUC__, > 3)))
- // Declare a dummy constructor to make gcc happy.
- // It seems the compiler can not generate a sensible constructor when this is instantiated with a refence type.
- // (warning: non-static reference "const double& boost::Const_BinaryPredicate<YourClassHere>::arg"
- // in class without a constructor [-Wuninitialized])
- Const_BinaryPredicate();
-#endif
-
- Func f;
- First a;
- Second b;
- };
-
- BOOST_concept(AdaptableGenerator,(Func)(Return))
- : Generator<Func, typename Func::result_type>
- {
- typedef typename Func::result_type result_type;
-
- BOOST_CONCEPT_USAGE(AdaptableGenerator)
- {
- BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
- }
- };
-
- BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg))
- : UnaryFunction<Func, typename Func::result_type, typename Func::argument_type>
- {
- typedef typename Func::argument_type argument_type;
- typedef typename Func::result_type result_type;
-
- ~AdaptableUnaryFunction()
- {
- BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
- BOOST_CONCEPT_ASSERT((Convertible<Arg, argument_type>));
- }
- };
-
- BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second))
- : BinaryFunction<
- Func
- , typename Func::result_type
- , typename Func::first_argument_type
- , typename Func::second_argument_type
- >
- {
- typedef typename Func::first_argument_type first_argument_type;
- typedef typename Func::second_argument_type second_argument_type;
- typedef typename Func::result_type result_type;
-
- ~AdaptableBinaryFunction()
- {
- BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
- BOOST_CONCEPT_ASSERT((Convertible<First, first_argument_type>));
- BOOST_CONCEPT_ASSERT((Convertible<Second, second_argument_type>));
- }
- };
-
- BOOST_concept(AdaptablePredicate,(Func)(Arg))
- : UnaryPredicate<Func, Arg>
- , AdaptableUnaryFunction<Func, bool, Arg>
- {
- };
-
- BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second))
- : BinaryPredicate<Func, First, Second>
- , AdaptableBinaryFunction<Func, bool, First, Second>
- {
- };
-
- //===========================================================================
- // Iterator Concepts
-
- BOOST_concept(InputIterator,(TT))
- : Assignable<TT>
- , EqualityComparable<TT>
- {
- typedef typename std::iterator_traits<TT>::value_type value_type;
- typedef typename std::iterator_traits<TT>::difference_type difference_type;
- typedef typename std::iterator_traits<TT>::reference reference;
- typedef typename std::iterator_traits<TT>::pointer pointer;
- typedef typename std::iterator_traits<TT>::iterator_category iterator_category;
-
- BOOST_CONCEPT_USAGE(InputIterator)
- {
- BOOST_CONCEPT_ASSERT((SignedInteger<difference_type>));
- BOOST_CONCEPT_ASSERT((Convertible<iterator_category, std::input_iterator_tag>));
-
- TT j(i);
- (void)*i; // require dereference operator
- ++j; // require preincrement operator
- i++; // require postincrement operator
- }
- private:
- TT i;
- };
-
- BOOST_concept(OutputIterator,(TT)(ValueT))
- : Assignable<TT>
- {
- BOOST_CONCEPT_USAGE(OutputIterator) {
-
- ++i; // require preincrement operator
- i++; // require postincrement operator
- *i++ = t; // require postincrement and assignment
- }
- private:
- TT i, j;
- ValueT t;
- };
-
- BOOST_concept(ForwardIterator,(TT))
- : InputIterator<TT>
- {
- BOOST_CONCEPT_USAGE(ForwardIterator)
- {
- BOOST_CONCEPT_ASSERT((Convertible<
- BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category
- , std::forward_iterator_tag
- >));
-
- typename InputIterator<TT>::reference r = *i;
- ignore_unused_variable_warning(r);
- }
-
- private:
- TT i;
- };
-
- BOOST_concept(Mutable_ForwardIterator,(TT))
- : ForwardIterator<TT>
- {
- BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) {
- *i++ = *j; // require postincrement and assignment
- }
- private:
- TT i, j;
- };
-
- BOOST_concept(BidirectionalIterator,(TT))
- : ForwardIterator<TT>
- {
- BOOST_CONCEPT_USAGE(BidirectionalIterator)
- {
- BOOST_CONCEPT_ASSERT((Convertible<
- BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category
- , std::bidirectional_iterator_tag
- >));
-
- --i; // require predecrement operator
- i--; // require postdecrement operator
- }
- private:
- TT i;
- };
-
- BOOST_concept(Mutable_BidirectionalIterator,(TT))
- : BidirectionalIterator<TT>
- , Mutable_ForwardIterator<TT>
- {
- BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator)
- {
- *i-- = *j; // require postdecrement and assignment
- }
- private:
- TT i, j;
- };
-
- BOOST_concept(RandomAccessIterator,(TT))
- : BidirectionalIterator<TT>
- , Comparable<TT>
- {
- BOOST_CONCEPT_USAGE(RandomAccessIterator)
- {
- BOOST_CONCEPT_ASSERT((Convertible<
- BOOST_DEDUCED_TYPENAME BidirectionalIterator<TT>::iterator_category
- , std::random_access_iterator_tag
- >));
-
- i += n; // require assignment addition operator
- i = i + n; i = n + i; // require addition with difference type
- i -= n; // require assignment subtraction operator
- i = i - n; // require subtraction with difference type
- n = i - j; // require difference operator
- (void)i[n]; // require element access operator
- }
-
- private:
- TT a, b;
- TT i, j;
- typename std::iterator_traits<TT>::difference_type n;
- };
-
- BOOST_concept(Mutable_RandomAccessIterator,(TT))
- : RandomAccessIterator<TT>
- , Mutable_BidirectionalIterator<TT>
- {
- BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator)
- {
- i[n] = *i; // require element access and assignment
- }
- private:
- TT i;
- typename std::iterator_traits<TT>::difference_type n;
- };
-
- //===========================================================================
- // Container s
-
- BOOST_concept(Container,(C))
- : Assignable<C>
- {
- typedef typename C::value_type value_type;
- typedef typename C::difference_type difference_type;
- typedef typename C::size_type size_type;
- typedef typename C::const_reference const_reference;
- typedef typename C::const_pointer const_pointer;
- typedef typename C::const_iterator const_iterator;
-
- BOOST_CONCEPT_USAGE(Container)
- {
- BOOST_CONCEPT_ASSERT((InputIterator<const_iterator>));
- const_constraints(c);
- }
-
- private:
- void const_constraints(const C& cc) {
- i = cc.begin();
- i = cc.end();
- n = cc.size();
- n = cc.max_size();
- b = cc.empty();
- }
- C c;
- bool b;
- const_iterator i;
- size_type n;
- };
-
- BOOST_concept(Mutable_Container,(C))
- : Container<C>
- {
- typedef typename C::reference reference;
- typedef typename C::iterator iterator;
- typedef typename C::pointer pointer;
-
- BOOST_CONCEPT_USAGE(Mutable_Container)
- {
- BOOST_CONCEPT_ASSERT((
- Assignable<typename Mutable_Container::value_type>));
-
- BOOST_CONCEPT_ASSERT((InputIterator<iterator>));
-
- i = c.begin();
- i = c.end();
- c.swap(c2);
- }
-
- private:
- iterator i;
- C c, c2;
- };
-
- BOOST_concept(ForwardContainer,(C))
- : Container<C>
- {
- BOOST_CONCEPT_USAGE(ForwardContainer)
- {
- BOOST_CONCEPT_ASSERT((
- ForwardIterator<
- typename ForwardContainer::const_iterator
- >));
- }
- };
-
- BOOST_concept(Mutable_ForwardContainer,(C))
- : ForwardContainer<C>
- , Mutable_Container<C>
- {
- BOOST_CONCEPT_USAGE(Mutable_ForwardContainer)
- {
- BOOST_CONCEPT_ASSERT((
- Mutable_ForwardIterator<
- typename Mutable_ForwardContainer::iterator
- >));
- }
- };
-
- BOOST_concept(ReversibleContainer,(C))
- : ForwardContainer<C>
- {
- typedef typename
- C::const_reverse_iterator
- const_reverse_iterator;
-
- BOOST_CONCEPT_USAGE(ReversibleContainer)
- {
- BOOST_CONCEPT_ASSERT((
- BidirectionalIterator<
- typename ReversibleContainer::const_iterator>));
-
- BOOST_CONCEPT_ASSERT((BidirectionalIterator<const_reverse_iterator>));
-
- const_constraints(c);
- }
- private:
- void const_constraints(const C& cc)
- {
- const_reverse_iterator i = cc.rbegin();
- i = cc.rend();
- }
- C c;
- };
-
- BOOST_concept(Mutable_ReversibleContainer,(C))
- : Mutable_ForwardContainer<C>
- , ReversibleContainer<C>
- {
- typedef typename C::reverse_iterator reverse_iterator;
-
- BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer)
- {
- typedef typename Mutable_ForwardContainer<C>::iterator iterator;
- BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<iterator>));
- BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<reverse_iterator>));
-
- reverse_iterator i = c.rbegin();
- i = c.rend();
- }
- private:
- C c;
- };
-
- BOOST_concept(RandomAccessContainer,(C))
- : ReversibleContainer<C>
- {
- typedef typename C::size_type size_type;
- typedef typename C::const_reference const_reference;
-
- BOOST_CONCEPT_USAGE(RandomAccessContainer)
- {
- BOOST_CONCEPT_ASSERT((
- RandomAccessIterator<
- typename RandomAccessContainer::const_iterator
- >));
-
- const_constraints(c);
- }
- private:
- void const_constraints(const C& cc)
- {
- const_reference r = cc[n];
- ignore_unused_variable_warning(r);
- }
-
- C c;
- size_type n;
- };
-
- BOOST_concept(Mutable_RandomAccessContainer,(C))
- : Mutable_ReversibleContainer<C>
- , RandomAccessContainer<C>
- {
- private:
- typedef Mutable_RandomAccessContainer self;
- public:
- BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer)
- {
- BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::iterator>));
- BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::reverse_iterator>));
-
- typename self::reference r = c[i];
- ignore_unused_variable_warning(r);
- }
-
- private:
- typename Mutable_ReversibleContainer<C>::size_type i;
- C c;
- };
-
- // A Sequence is inherently mutable
- BOOST_concept(Sequence,(S))
- : Mutable_ForwardContainer<S>
- // Matt Austern's book puts DefaultConstructible here, the C++
- // standard places it in Container --JGS
- // ... so why aren't we following the standard? --DWA
- , DefaultConstructible<S>
- {
- BOOST_CONCEPT_USAGE(Sequence)
- {
- S
- c(n, t),
- c2(first, last);
-
- c.insert(p, t);
- c.insert(p, n, t);
- c.insert(p, first, last);
-
- c.erase(p);
- c.erase(p, q);
-
- typename Sequence::reference r = c.front();
-
- ignore_unused_variable_warning(c);
- ignore_unused_variable_warning(c2);
- ignore_unused_variable_warning(r);
- const_constraints(c);
- }
- private:
- void const_constraints(const S& c) {
- typename Sequence::const_reference r = c.front();
- ignore_unused_variable_warning(r);
- }
-
- typename S::value_type t;
- typename S::size_type n;
- typename S::value_type* first, *last;
- typename S::iterator p, q;
- };
-
- BOOST_concept(FrontInsertionSequence,(S))
- : Sequence<S>
- {
- BOOST_CONCEPT_USAGE(FrontInsertionSequence)
- {
- c.push_front(t);
- c.pop_front();
- }
- private:
- S c;
- typename S::value_type t;
- };
-
- BOOST_concept(BackInsertionSequence,(S))
- : Sequence<S>
- {
- BOOST_CONCEPT_USAGE(BackInsertionSequence)
- {
- c.push_back(t);
- c.pop_back();
- typename BackInsertionSequence::reference r = c.back();
- ignore_unused_variable_warning(r);
- const_constraints(c);
- }
- private:
- void const_constraints(const S& cc) {
- typename BackInsertionSequence::const_reference
- r = cc.back();
- ignore_unused_variable_warning(r);
- }
- S c;
- typename S::value_type t;
- };
-
- BOOST_concept(AssociativeContainer,(C))
- : ForwardContainer<C>
- , DefaultConstructible<C>
- {
- typedef typename C::key_type key_type;
- typedef typename C::key_compare key_compare;
- typedef typename C::value_compare value_compare;
- typedef typename C::iterator iterator;
-
- BOOST_CONCEPT_USAGE(AssociativeContainer)
- {
- i = c.find(k);
- r = c.equal_range(k);
- c.erase(k);
- c.erase(i);
- c.erase(r.first, r.second);
- const_constraints(c);
- BOOST_CONCEPT_ASSERT((BinaryPredicate<key_compare,key_type,key_type>));
-
- typedef typename AssociativeContainer::value_type value_type_;
- BOOST_CONCEPT_ASSERT((BinaryPredicate<value_compare,value_type_,value_type_>));
- }
-
- // Redundant with the base concept, but it helps below.
- typedef typename C::const_iterator const_iterator;
- private:
- void const_constraints(const C& cc)
- {
- ci = cc.find(k);
- n = cc.count(k);
- cr = cc.equal_range(k);
- }
-
- C c;
- iterator i;
- std::pair<iterator,iterator> r;
- const_iterator ci;
- std::pair<const_iterator,const_iterator> cr;
- typename C::key_type k;
- typename C::size_type n;
- };
-
- BOOST_concept(UniqueAssociativeContainer,(C))
- : AssociativeContainer<C>
- {
- BOOST_CONCEPT_USAGE(UniqueAssociativeContainer)
- {
- C c(first, last);
-
- pos_flag = c.insert(t);
- c.insert(first, last);
-
- ignore_unused_variable_warning(c);
- }
- private:
- std::pair<typename C::iterator, bool> pos_flag;
- typename C::value_type t;
- typename C::value_type* first, *last;
- };
-
- BOOST_concept(MultipleAssociativeContainer,(C))
- : AssociativeContainer<C>
- {
- BOOST_CONCEPT_USAGE(MultipleAssociativeContainer)
- {
- C c(first, last);
-
- pos = c.insert(t);
- c.insert(first, last);
-
- ignore_unused_variable_warning(c);
- ignore_unused_variable_warning(pos);
- }
- private:
- typename C::iterator pos;
- typename C::value_type t;
- typename C::value_type* first, *last;
- };
-
- BOOST_concept(SimpleAssociativeContainer,(C))
- : AssociativeContainer<C>
- {
- BOOST_CONCEPT_USAGE(SimpleAssociativeContainer)
- {
- typedef typename C::key_type key_type;
- typedef typename C::value_type value_type;
- BOOST_MPL_ASSERT((boost::is_same<key_type,value_type>));
- }
- };
-
- BOOST_concept(PairAssociativeContainer,(C))
- : AssociativeContainer<C>
- {
- BOOST_CONCEPT_USAGE(PairAssociativeContainer)
- {
- typedef typename C::key_type key_type;
- typedef typename C::value_type value_type;
- typedef typename C::mapped_type mapped_type;
- typedef std::pair<const key_type, mapped_type> required_value_type;
- BOOST_MPL_ASSERT((boost::is_same<value_type,required_value_type>));
- }
- };
-
- BOOST_concept(SortedAssociativeContainer,(C))
- : AssociativeContainer<C>
- , ReversibleContainer<C>
- {
- BOOST_CONCEPT_USAGE(SortedAssociativeContainer)
- {
- C
- c(kc),
- c2(first, last),
- c3(first, last, kc);
-
- p = c.upper_bound(k);
- p = c.lower_bound(k);
- r = c.equal_range(k);
-
- c.insert(p, t);
-
- ignore_unused_variable_warning(c);
- ignore_unused_variable_warning(c2);
- ignore_unused_variable_warning(c3);
- const_constraints(c);
- }
-
- void const_constraints(const C& c)
- {
- kc = c.key_comp();
- vc = c.value_comp();
-
- cp = c.upper_bound(k);
- cp = c.lower_bound(k);
- cr = c.equal_range(k);
- }
-
- private:
- typename C::key_compare kc;
- typename C::value_compare vc;
- typename C::value_type t;
- typename C::key_type k;
- typedef typename C::iterator iterator;
- typedef typename C::const_iterator const_iterator;
-
- typedef SortedAssociativeContainer self;
- iterator p;
- const_iterator cp;
- std::pair<typename self::iterator,typename self::iterator> r;
- std::pair<typename self::const_iterator,typename self::const_iterator> cr;
- typename C::value_type* first, *last;
- };
-
- // HashedAssociativeContainer
-
- BOOST_concept(Collection,(C))
- {
- BOOST_CONCEPT_USAGE(Collection)
- {
- boost::function_requires<boost::InputIteratorConcept<iterator> >();
- boost::function_requires<boost::InputIteratorConcept<const_iterator> >();
- boost::function_requires<boost::CopyConstructibleConcept<value_type> >();
- const_constraints(c);
- i = c.begin();
- i = c.end();
- c.swap(c);
- }
-
- void const_constraints(const C& cc) {
- ci = cc.begin();
- ci = cc.end();
- n = cc.size();
- b = cc.empty();
- }
-
- private:
- typedef typename C::value_type value_type;
- typedef typename C::iterator iterator;
- typedef typename C::const_iterator const_iterator;
- typedef typename C::reference reference;
- typedef typename C::const_reference const_reference;
- // typedef typename C::pointer pointer;
- typedef typename C::difference_type difference_type;
- typedef typename C::size_type size_type;
-
- C c;
- bool b;
- iterator i;
- const_iterator ci;
- size_type n;
- };
-} // namespace boost
-
-#if (defined _MSC_VER)
-# pragma warning( pop )
-#endif
-
-# include <boost/concept/detail/concept_undef.hpp>
-
-#endif // BOOST_CONCEPT_CHECKS_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/config/auto_link.hpp b/src/third_party/boost-1.68.0/boost/config/auto_link.hpp
deleted file mode 100644
index 271f8379118..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/auto_link.hpp
+++ /dev/null
@@ -1,466 +0,0 @@
-// (C) Copyright John Maddock 2003.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE auto_link.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
- */
-
-/*************************************************************************
-
-USAGE:
-~~~~~~
-
-Before including this header you must define one or more of define the following macros:
-
-BOOST_LIB_NAME: Required: A string containing the basename of the library,
- for example boost_regex.
-BOOST_LIB_TOOLSET: Optional: the base name of the toolset.
-BOOST_DYN_LINK: Optional: when set link to dll rather than static library.
-BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name
- of the library selected (useful for debugging).
-BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
- rather than a mangled-name version.
-BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option.
- This is essentially the same as the default name-mangled version, but without
- the compiler name and version, or the Boost version. Just the build options.
-
-These macros will be undef'ed at the end of the header, further this header
-has no include guards - so be sure to include it only once from your library!
-
-Algorithm:
-~~~~~~~~~~
-
-Libraries for Borland and Microsoft compilers are automatically
-selected here, the name of the lib is selected according to the following
-formula:
-
-BOOST_LIB_PREFIX
- + BOOST_LIB_NAME
- + "_"
- + BOOST_LIB_TOOLSET
- + BOOST_LIB_THREAD_OPT
- + BOOST_LIB_RT_OPT
- + BOOST_LIB_ARCH_AND_MODEL_OPT
- "-"
- + BOOST_LIB_VERSION
-
-These are defined as:
-
-BOOST_LIB_PREFIX: "lib" for static libraries otherwise "".
-
-BOOST_LIB_NAME: The base name of the lib ( for example boost_regex).
-
-BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
-
-BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
-
-BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
- contains one or more of the following letters after
- a hyphen:
-
- s static runtime (dynamic if not present).
- g debug/diagnostic runtime (release if not present).
- y Python debug/diagnostic runtime (release if not present).
- d debug build (release if not present).
- p STLport build.
- n STLport build without its IOStreams.
-
-BOOST_LIB_ARCH_AND_MODEL_OPT: The architecture and address model
- (-x32 or -x64 for x86/32 and x86/64 respectively)
-
-BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
-
-
-***************************************************************************/
-
-#ifdef __cplusplus
-# ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-# endif
-#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
-//
-// C language compatability (no, honestly)
-//
-# define BOOST_MSVC _MSC_VER
-# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
-# define BOOST_DO_STRINGIZE(X) #X
-#endif
-//
-// Only include what follows for known and supported compilers:
-//
-#if defined(BOOST_MSVC) \
- || defined(__BORLANDC__) \
- || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
- || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
-
-#ifndef BOOST_VERSION_HPP
-# include <boost/version.hpp>
-#endif
-
-#ifndef BOOST_LIB_NAME
-# error "Macro BOOST_LIB_NAME not set (internal error)"
-#endif
-
-//
-// error check:
-//
-#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
-# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
-# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
-# error "Incompatible build options"
-#endif
-//
-// select toolset if not defined already:
-//
-#ifndef BOOST_LIB_TOOLSET
-# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200)
- // Note: no compilers before 1200 are supported
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
-
-# ifdef UNDER_CE
- // eVC4:
-# define BOOST_LIB_TOOLSET "evc4"
-# else
- // vc6:
-# define BOOST_LIB_TOOLSET "vc6"
-# endif
-
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310)
-
- // vc7:
-# define BOOST_LIB_TOOLSET "vc7"
-
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
-
- // vc71:
-# define BOOST_LIB_TOOLSET "vc71"
-
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500)
-
- // vc80:
-# define BOOST_LIB_TOOLSET "vc80"
-
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
-
- // vc90:
-# define BOOST_LIB_TOOLSET "vc90"
-
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700)
-
- // vc10:
-# define BOOST_LIB_TOOLSET "vc100"
-
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800)
-
- // vc11:
-# define BOOST_LIB_TOOLSET "vc110"
-
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900)
-
- // vc12:
-# define BOOST_LIB_TOOLSET "vc120"
-
-# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1910)
-
- // vc14:
-# define BOOST_LIB_TOOLSET "vc140"
-
-# elif defined(BOOST_MSVC)
-
- // vc14.1:
-# define BOOST_LIB_TOOLSET "vc141"
-
-# elif defined(__BORLANDC__)
-
- // CBuilder 6:
-# define BOOST_LIB_TOOLSET "bcb"
-
-# elif defined(__ICL)
-
- // Intel C++, no version number:
-# define BOOST_LIB_TOOLSET "iw"
-
-# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
-
- // Metrowerks CodeWarrior 8.x
-# define BOOST_LIB_TOOLSET "cw8"
-
-# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
-
- // Metrowerks CodeWarrior 9.x
-# define BOOST_LIB_TOOLSET "cw9"
-
-# endif
-#endif // BOOST_LIB_TOOLSET
-
-//
-// select thread opt:
-//
-#if defined(_MT) || defined(__MT__)
-# define BOOST_LIB_THREAD_OPT "-mt"
-#else
-# define BOOST_LIB_THREAD_OPT
-#endif
-
-#if defined(_MSC_VER) || defined(__MWERKS__)
-
-# ifdef _DLL
-
-# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
-
-# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-gydp"
-# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
-# define BOOST_LIB_RT_OPT "-gdp"
-# elif defined(_DEBUG)\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-gydp"
-# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
-# error "Build options aren't compatible with pre-built libraries"
-# elif defined(_DEBUG)
-# define BOOST_LIB_RT_OPT "-gdp"
-# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
-# error "Build options aren't compatible with pre-built libraries"
-# else
-# define BOOST_LIB_RT_OPT "-p"
-# endif
-
-# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-
-# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-gydpn"
-# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
-# define BOOST_LIB_RT_OPT "-gdpn"
-# elif defined(_DEBUG)\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-gydpn"
-# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
-# error "Build options aren't compatible with pre-built libraries"
-# elif defined(_DEBUG)
-# define BOOST_LIB_RT_OPT "-gdpn"
-# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
-# error "Build options aren't compatible with pre-built libraries"
-# else
-# define BOOST_LIB_RT_OPT "-pn"
-# endif
-
-# else
-
-# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-gyd"
-# elif defined(_DEBUG)
-# define BOOST_LIB_RT_OPT "-gd"
-# else
-# define BOOST_LIB_RT_OPT
-# endif
-
-# endif
-
-# else
-
-# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
-
-# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-sgydp"
-# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
-# define BOOST_LIB_RT_OPT "-sgdp"
-# elif defined(_DEBUG)\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-sgydp"
-# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
-# error "Build options aren't compatible with pre-built libraries"
-# elif defined(_DEBUG)
-# define BOOST_LIB_RT_OPT "-sgdp"
-# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
-# error "Build options aren't compatible with pre-built libraries"
-# else
-# define BOOST_LIB_RT_OPT "-sp"
-# endif
-
-# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
-
-# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-sgydpn"
-# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
-# define BOOST_LIB_RT_OPT "-sgdpn"
-# elif defined(_DEBUG)\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-sgydpn"
-# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
-# error "Build options aren't compatible with pre-built libraries"
-# elif defined(_DEBUG)
-# define BOOST_LIB_RT_OPT "-sgdpn"
-# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
-# error "Build options aren't compatible with pre-built libraries"
-# else
-# define BOOST_LIB_RT_OPT "-spn"
-# endif
-
-# else
-
-# if defined(_DEBUG)\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-sgyd"
-# elif defined(_DEBUG)
-# define BOOST_LIB_RT_OPT "-sgd"
-# else
-# define BOOST_LIB_RT_OPT "-s"
-# endif
-
-# endif
-
-# endif
-
-#elif defined(__BORLANDC__)
-
-//
-// figure out whether we want the debug builds or not:
-//
-#if __BORLANDC__ > 0x561
-#pragma defineonoption BOOST_BORLAND_DEBUG -v
-#endif
-//
-// sanity check:
-//
-#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
-#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form"
-#endif
-
-# ifdef _RTLDLL
-
-# if defined(BOOST_BORLAND_DEBUG)\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-yd"
-# elif defined(BOOST_BORLAND_DEBUG)
-# define BOOST_LIB_RT_OPT "-d"
-# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT -y
-# else
-# define BOOST_LIB_RT_OPT
-# endif
-
-# else
-
-# if defined(BOOST_BORLAND_DEBUG)\
- && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-syd"
-# elif defined(BOOST_BORLAND_DEBUG)
-# define BOOST_LIB_RT_OPT "-sd"
-# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
-# define BOOST_LIB_RT_OPT "-sy"
-# else
-# define BOOST_LIB_RT_OPT "-s"
-# endif
-
-# endif
-
-#endif
-
-//
-// BOOST_LIB_ARCH_AND_MODEL_OPT
-//
-
-#if defined( _M_IX86 )
-# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x32"
-#elif defined( _M_X64 )
-# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x64"
-#elif defined( _M_ARM )
-# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a32"
-#elif defined( _M_ARM64 )
-# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a64"
-#endif
-
-//
-// select linkage opt:
-//
-#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
-# define BOOST_LIB_PREFIX
-#elif defined(BOOST_DYN_LINK)
-# error "Mixing a dll boost library with a static runtime is a really bad idea..."
-#else
-# define BOOST_LIB_PREFIX "lib"
-#endif
-
-//
-// now include the lib:
-//
-#if defined(BOOST_LIB_NAME) \
- && defined(BOOST_LIB_PREFIX) \
- && defined(BOOST_LIB_TOOLSET) \
- && defined(BOOST_LIB_THREAD_OPT) \
- && defined(BOOST_LIB_RT_OPT) \
- && defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \
- && defined(BOOST_LIB_VERSION)
-
-#ifdef BOOST_AUTO_LINK_TAGGED
-# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
-# ifdef BOOST_LIB_DIAGNOSTIC
-# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
-# endif
-#elif defined(BOOST_AUTO_LINK_NOMANGLE)
-# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
-# ifdef BOOST_LIB_DIAGNOSTIC
-# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
-# endif
-#elif defined(BOOST_LIB_BUILDID)
-# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib")
-# ifdef BOOST_LIB_DIAGNOSTIC
-# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib")
-# endif
-#else
-# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib")
-# ifdef BOOST_LIB_DIAGNOSTIC
-# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib")
-# endif
-#endif
-
-#else
-# error "some required macros where not defined (internal logic error)."
-#endif
-
-
-#endif // _MSC_VER || __BORLANDC__
-
-//
-// finally undef any macros we may have set:
-//
-#ifdef BOOST_LIB_PREFIX
-# undef BOOST_LIB_PREFIX
-#endif
-#if defined(BOOST_LIB_NAME)
-# undef BOOST_LIB_NAME
-#endif
-// Don't undef this one: it can be set by the user and should be the
-// same for all libraries:
-//#if defined(BOOST_LIB_TOOLSET)
-//# undef BOOST_LIB_TOOLSET
-//#endif
-#if defined(BOOST_LIB_THREAD_OPT)
-# undef BOOST_LIB_THREAD_OPT
-#endif
-#if defined(BOOST_LIB_RT_OPT)
-# undef BOOST_LIB_RT_OPT
-#endif
-#if defined(BOOST_LIB_ARCH_AND_MODEL_OPT)
-# undef BOOST_LIB_ARCH_AND_MODEL_OPT
-#endif
-#if defined(BOOST_LIB_LINK_OPT)
-# undef BOOST_LIB_LINK_OPT
-#endif
-#if defined(BOOST_LIB_DEBUG_OPT)
-# undef BOOST_LIB_DEBUG_OPT
-#endif
-#if defined(BOOST_DYN_LINK)
-# undef BOOST_DYN_LINK
-#endif
-
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/borland.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/borland.hpp
deleted file mode 100644
index cb164f8f2ac..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/borland.hpp
+++ /dev/null
@@ -1,335 +0,0 @@
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright David Abrahams 2002 - 2003.
-// (C) Copyright Aleksey Gurtovoy 2002.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// Borland C++ compiler setup:
-
-//
-// versions check:
-// we don't support Borland prior to version 5.4:
-#if __BORLANDC__ < 0x540
-# error "Compiler not supported or configured - please reconfigure"
-#endif
-
-// last known compiler version:
-#if (__BORLANDC__ > 0x613)
-//# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-//# else
-//# pragma message( "Unknown compiler version - please run the configure tests and report the results")
-//# endif
-#elif (__BORLANDC__ == 0x600)
-# error "CBuilderX preview compiler is no longer supported"
-#endif
-
-//
-// Support macros to help with standard library detection
-#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)
-# define BOOST_BCB_WITH_ROGUE_WAVE
-#elif __BORLANDC__ < 0x570
-# define BOOST_BCB_WITH_STLPORT
-#else
-# define BOOST_BCB_WITH_DINKUMWARE
-#endif
-
-//
-// Version 5.0 and below:
-# if __BORLANDC__ <= 0x0550
-// Borland C++Builder 4 and 5:
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-# if __BORLANDC__ == 0x0550
-// Borland C++Builder 5, command-line compiler 5.5:
-# define BOOST_NO_OPERATORS_IN_NAMESPACE
-# endif
-// Variadic macros do not exist for C++ Builder versions 5 and below
-#define BOOST_NO_CXX11_VARIADIC_MACROS
-# endif
-
-// Version 5.51 and below:
-#if (__BORLANDC__ <= 0x551)
-# define BOOST_NO_CV_SPECIALIZATIONS
-# define BOOST_NO_CV_VOID_SPECIALIZATIONS
-# define BOOST_NO_DEDUCED_TYPENAME
-// workaround for missing WCHAR_MAX/WCHAR_MIN:
-#ifdef __cplusplus
-#include <climits>
-#include <cwchar>
-#else
-#include <limits.h>
-#include <wchar.h>
-#endif // __cplusplus
-#ifndef WCHAR_MAX
-# define WCHAR_MAX 0xffff
-#endif
-#ifndef WCHAR_MIN
-# define WCHAR_MIN 0
-#endif
-#endif
-
-// Borland C++ Builder 6 and below:
-#if (__BORLANDC__ <= 0x564)
-
-# if defined(NDEBUG) && defined(__cplusplus)
- // fix broken <cstring> so that Boost.test works:
-# include <cstring>
-# undef strcmp
-# endif
- // fix broken errno declaration:
-# include <errno.h>
-# ifndef errno
-# define errno errno
-# endif
-
-#endif
-
-//
-// new bug in 5.61:
-#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
- // this seems to be needed by the command line compiler, but not the IDE:
-# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
-#endif
-
-// Borland C++ Builder 2006 Update 2 and below:
-#if (__BORLANDC__ <= 0x582)
-# define BOOST_NO_SFINAE
-# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
-# define BOOST_NO_TEMPLATE_TEMPLATES
-
-# define BOOST_NO_PRIVATE_IN_AGGREGATE
-
-# ifdef _WIN32
-# define BOOST_NO_SWPRINTF
-# elif defined(linux) || defined(__linux__) || defined(__linux)
- // we should really be able to do without this
- // but the wcs* functions aren't imported into std::
-# define BOOST_NO_STDC_NAMESPACE
- // _CPPUNWIND doesn't get automatically set for some reason:
-# pragma defineonoption BOOST_CPPUNWIND -x
-# endif
-#endif
-
-#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info
- // we shouldn't really need this - but too many things choke
- // without it, this needs more investigation:
-# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-# define BOOST_NO_IS_ABSTRACT
-# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
-# define BOOST_NO_USING_TEMPLATE
-# define BOOST_SP_NO_SP_CONVERTIBLE
-
-// Temporary workaround
-#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
-#endif
-
-// Borland C++ Builder 2008 and below:
-# define BOOST_NO_INTEGRAL_INT64_T
-# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
-# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
-# define BOOST_NO_NESTED_FRIENDSHIP
-# define BOOST_NO_TYPENAME_WITH_CTOR
-#if (__BORLANDC__ < 0x600)
-# define BOOST_ILLEGAL_CV_REFERENCES
-#endif
-
-//
-// Positive Feature detection
-//
-// Borland C++ Builder 2008 and below:
-#if (__BORLANDC__ >= 0x599)
-# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
-#endif
-//
-// C++0x Macros:
-//
-#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)
-# define BOOST_NO_CXX11_CHAR16_T
-# define BOOST_NO_CXX11_CHAR32_T
-# define BOOST_NO_CXX11_DECLTYPE
-# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# define BOOST_NO_CXX11_EXTERN_TEMPLATE
-# define BOOST_NO_CXX11_RVALUE_REFERENCES
-# define BOOST_NO_CXX11_SCOPED_ENUMS
-# define BOOST_NO_CXX11_STATIC_ASSERT
-#else
-# define BOOST_HAS_ALIGNOF
-# define BOOST_HAS_CHAR16_T
-# define BOOST_HAS_CHAR32_T
-# define BOOST_HAS_DECLTYPE
-# define BOOST_HAS_EXPLICIT_CONVERSION_OPS
-# define BOOST_HAS_REF_QUALIFIER
-# define BOOST_HAS_RVALUE_REFS
-# define BOOST_HAS_STATIC_ASSERT
-#endif
-
-#define BOOST_NO_CXX11_AUTO_DECLARATIONS
-#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DECLTYPE_N3276
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DEFAULTED_MOVES
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#define BOOST_NO_CXX11_LAMBDAS
-#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_RVALUE_REFERENCES
-#define BOOST_NO_CXX11_SCOPED_ENUMS
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported
-#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#define BOOST_NO_CXX11_ALIGNAS
-#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#define BOOST_NO_CXX11_INLINE_NAMESPACES
-#define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_FINAL
-#define BOOST_NO_CXX11_THREAD_LOCAL
-
-// C++ 14:
-#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
-# define BOOST_NO_CXX14_BINARY_LITERALS
-#endif
-#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-#endif
-#if (__cplusplus < 201304) // There's no SD6 check for this....
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-#endif
-#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-#endif
-#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-#endif
-#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-#endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-// C++17
-#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-#endif
-#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
-# define BOOST_NO_CXX17_INLINE_VARIABLES
-#endif
-#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
-# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
-
-#if __BORLANDC__ >= 0x590
-# define BOOST_HAS_TR1_HASH
-
-# define BOOST_HAS_MACRO_USE_FACET
-#endif
-
-//
-// Post 0x561 we have long long and stdint.h:
-#if __BORLANDC__ >= 0x561
-# ifndef __NO_LONG_LONG
-# define BOOST_HAS_LONG_LONG
-# else
-# define BOOST_NO_LONG_LONG
-# endif
- // On non-Win32 platforms let the platform config figure this out:
-# ifdef _WIN32
-# define BOOST_HAS_STDINT_H
-# endif
-#endif
-
-// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is
-// defined, then we have 0x560 or greater with the Rogue Wave implementation
-// which presumably has the std::DBL_MAX bug.
-#if defined( BOOST_BCB_WITH_ROGUE_WAVE )
-// <climits> is partly broken, some macros define symbols that are really in
-// namespace std, so you end up having to use illegal constructs like
-// std::DBL_MAX, as a fix we'll just include float.h and have done with:
-#include <float.h>
-#endif
-//
-// __int64:
-//
-#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
-# define BOOST_HAS_MS_INT64
-#endif
-//
-// check for exception handling support:
-//
-#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-#endif
-//
-// all versions have a <dirent.h>:
-//
-#ifndef __STRICT_ANSI__
-# define BOOST_HAS_DIRENT_H
-#endif
-//
-// all versions support __declspec:
-//
-#if defined(__STRICT_ANSI__)
-// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
-# define BOOST_SYMBOL_EXPORT
-#endif
-//
-// ABI fixing headers:
-//
-#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet
-#ifndef BOOST_ABI_PREFIX
-# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
-#endif
-#ifndef BOOST_ABI_SUFFIX
-# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
-#endif
-#endif
-//
-// Disable Win32 support in ANSI mode:
-//
-#if __BORLANDC__ < 0x600
-# pragma defineonoption BOOST_DISABLE_WIN32 -A
-#elif defined(__STRICT_ANSI__)
-# define BOOST_DISABLE_WIN32
-#endif
-//
-// MSVC compatibility mode does some nasty things:
-// TODO: look up if this doesn't apply to the whole 12xx range
-//
-#if defined(_MSC_VER) && (_MSC_VER <= 1200)
-# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
-# define BOOST_NO_VOID_RETURNS
-#endif
-
-// Borland did not implement value-initialization completely, as I reported
-// in 2007, Borland Report 51854, "Value-initialization: POD struct should be
-// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854
-// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
-// (Niels Dekker, LKEB, April 2010)
-#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-
-#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/clang.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/clang.hpp
deleted file mode 100644
index 3d893c689ae..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/clang.hpp
+++ /dev/null
@@ -1,340 +0,0 @@
-// (C) Copyright Douglas Gregor 2010
-//
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// Clang compiler setup.
-
-#define BOOST_HAS_PRAGMA_ONCE
-
-// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used.
-#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4))
-# define BOOST_HAS_PRAGMA_DETECT_MISMATCH
-#endif
-
-// When compiling with clang before __has_extension was defined,
-// even if one writes 'defined(__has_extension) && __has_extension(xxx)',
-// clang reports a compiler error. So the only workaround found is:
-
-#ifndef __has_extension
-#define __has_extension __has_feature
-#endif
-
-#ifndef __has_attribute
-#define __has_attribute(x) 0
-#endif
-
-#ifndef __has_cpp_attribute
-#define __has_cpp_attribute(x) 0
-#endif
-
-#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-#endif
-
-#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI)
-# define BOOST_NO_RTTI
-#endif
-
-#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID)
-# define BOOST_NO_TYPEID
-#endif
-
-#if !__has_feature(cxx_thread_local)
-# define BOOST_NO_CXX11_THREAD_LOCAL
-#endif
-
-#ifdef __is_identifier
-#if !__is_identifier(__int64) && !defined(__GNUC__)
-# define BOOST_HAS_MS_INT64
-#endif
-#endif
-
-#if __has_include(<stdint.h>)
-# define BOOST_HAS_STDINT_H
-#endif
-
-
-#define BOOST_HAS_NRVO
-
-// Branch prediction hints
-#if !defined (__c2__) && defined(__has_builtin)
-#if __has_builtin(__builtin_expect)
-#define BOOST_LIKELY(x) __builtin_expect(x, 1)
-#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
-#endif
-#endif
-
-// Clang supports "long long" in all compilation modes.
-#define BOOST_HAS_LONG_LONG
-
-//
-// We disable this if the compiler is really nvcc with C++03 as it
-// doesn't actually support __int128 as of CUDA_VERSION=7500
-// even though it defines __SIZEOF_INT128__.
-// See https://svn.boost.org/trac/boost/ticket/10418
-// https://svn.boost.org/trac/boost/ticket/11852
-// Only re-enable this for nvcc if you're absolutely sure
-// of the circumstances under which it's supported.
-// Similarly __SIZEOF_INT128__ is defined when targetting msvc
-// compatibility even though the required support functions are absent.
-//
-#if defined(__CUDACC__)
-# if defined(BOOST_GCC_CXX11)
-# define BOOST_NVCC_CXX11
-# else
-# define BOOST_NVCC_CXX03
-# endif
-#endif
-
-#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER)
-# define BOOST_HAS_INT128
-#endif
-
-
-//
-// Dynamic shared object (DSO) and dynamic-link library (DLL) support
-//
-#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
-# define BOOST_HAS_DECLSPEC
-# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
-# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
-#else
-# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
-# define BOOST_SYMBOL_IMPORT
-#endif
-#define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
-
-//
-// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
-// between switch labels.
-//
-#if __cplusplus >= 201103L && defined(__has_warning)
-# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
-# define BOOST_FALLTHROUGH [[clang::fallthrough]]
-# endif
-#endif
-
-#if !__has_feature(cxx_auto_type)
-# define BOOST_NO_CXX11_AUTO_DECLARATIONS
-# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#endif
-
-//
-// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t
-//
-#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
-# define BOOST_NO_CXX11_CHAR16_T
-# define BOOST_NO_CXX11_CHAR32_T
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(__GNUC__)
-#define BOOST_HAS_EXPM1
-#define BOOST_HAS_LOG1P
-#endif
-
-#if !__has_feature(cxx_constexpr)
-# define BOOST_NO_CXX11_CONSTEXPR
-#endif
-
-#if !__has_feature(cxx_decltype)
-# define BOOST_NO_CXX11_DECLTYPE
-#endif
-
-#if !__has_feature(cxx_decltype_incomplete_return_types)
-# define BOOST_NO_CXX11_DECLTYPE_N3276
-#endif
-
-#if !__has_feature(cxx_defaulted_functions)
-# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#endif
-
-#if !__has_feature(cxx_deleted_functions)
-# define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#endif
-
-#if !__has_feature(cxx_explicit_conversions)
-# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#endif
-
-#if !__has_feature(cxx_default_function_template_args)
-# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#endif
-
-#if !__has_feature(cxx_generalized_initializers)
-# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#endif
-
-#if !__has_feature(cxx_lambdas)
-# define BOOST_NO_CXX11_LAMBDAS
-#endif
-
-#if !__has_feature(cxx_local_type_template_args)
-# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#endif
-
-#if !__has_feature(cxx_noexcept)
-# define BOOST_NO_CXX11_NOEXCEPT
-#endif
-
-#if !__has_feature(cxx_nullptr)
-# define BOOST_NO_CXX11_NULLPTR
-#endif
-
-#if !__has_feature(cxx_range_for)
-# define BOOST_NO_CXX11_RANGE_BASED_FOR
-#endif
-
-#if !__has_feature(cxx_raw_string_literals)
-# define BOOST_NO_CXX11_RAW_LITERALS
-#endif
-
-#if !__has_feature(cxx_reference_qualified_functions)
-# define BOOST_NO_CXX11_REF_QUALIFIERS
-#endif
-
-#if !__has_feature(cxx_generalized_initializers)
-# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#endif
-
-#if !__has_feature(cxx_rvalue_references)
-# define BOOST_NO_CXX11_RVALUE_REFERENCES
-#endif
-
-#if !__has_feature(cxx_strong_enums)
-# define BOOST_NO_CXX11_SCOPED_ENUMS
-#endif
-
-#if !__has_feature(cxx_static_assert)
-# define BOOST_NO_CXX11_STATIC_ASSERT
-#endif
-
-#if !__has_feature(cxx_alias_templates)
-# define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#endif
-
-#if !__has_feature(cxx_unicode_literals)
-# define BOOST_NO_CXX11_UNICODE_LITERALS
-#endif
-
-#if !__has_feature(cxx_variadic_templates)
-# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#endif
-
-#if !__has_feature(cxx_user_literals)
-# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#endif
-
-#if !__has_feature(cxx_alignas)
-# define BOOST_NO_CXX11_ALIGNAS
-#endif
-
-#if !__has_feature(cxx_trailing_return)
-# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#endif
-
-#if !__has_feature(cxx_inline_namespaces)
-# define BOOST_NO_CXX11_INLINE_NAMESPACES
-#endif
-
-#if !__has_feature(cxx_override_control)
-# define BOOST_NO_CXX11_FINAL
-#endif
-
-#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__))
-# define BOOST_NO_CXX14_BINARY_LITERALS
-#endif
-
-#if !__has_feature(__cxx_decltype_auto__)
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-#endif
-
-#if !__has_feature(__cxx_aggregate_nsdmi__)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-
-#if !__has_feature(__cxx_init_captures__)
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-#endif
-
-#if !__has_feature(__cxx_generic_lambdas__)
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-#endif
-
-// clang < 3.5 has a defect with dependent type, like following.
-//
-// template <class T>
-// constexpr typename enable_if<pred<T> >::type foo(T &)
-// { } // error: no return statement in constexpr function
-//
-// This issue also affects C++11 mode, but C++11 constexpr requires return stmt.
-// Therefore we don't care such case.
-//
-// Note that we can't check Clang version directly as the numbering system changes depending who's
-// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873)
-// so instead verify that we have a feature that was introduced at the same time as working C++14
-// constexpr (generic lambda's in this case):
-//
-#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-
-#if !__has_feature(__cxx_return_type_deduction__)
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-#endif
-
-#if !__has_feature(__cxx_variable_templates__)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-#endif
-
-#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
-
-// Clang 3.9+ in c++1z
-#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
-# define BOOST_NO_CXX17_INLINE_VARIABLES
-# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-
-#if __cplusplus < 201103L
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#endif
-
-#if __cplusplus < 201400
-// All versions with __cplusplus above this value seem to support this:
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-#endif
-//
-// __builtin_unreachable:
-#if defined(__has_builtin) && __has_builtin(__builtin_unreachable)
-#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
-#endif
-
-#if (__clang_major__ == 3) && (__clang_minor__ == 0)
-// Apparently a clang bug:
-# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
-#endif
-
-// Clang has supported the 'unused' attribute since the first release.
-#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
-
-// Type aliasing hint.
-#if __has_attribute(__may_alias__)
-# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
-#endif
-
-#ifndef BOOST_COMPILER
-# define BOOST_COMPILER "Clang version " __clang_version__
-#endif
-
-// Macro used to identify the Clang compiler.
-#define BOOST_CLANG 1
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/codegear.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/codegear.hpp
deleted file mode 100644
index c2cfe15c649..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/codegear.hpp
+++ /dev/null
@@ -1,239 +0,0 @@
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright David Abrahams 2002 - 2003.
-// (C) Copyright Aleksey Gurtovoy 2002.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// CodeGear C++ compiler setup:
-
-#if !defined( BOOST_WITH_CODEGEAR_WARNINGS )
-// these warnings occur frequently in optimized template code
-# pragma warn -8004 // var assigned value, but never used
-# pragma warn -8008 // condition always true/false
-# pragma warn -8066 // dead code can never execute
-# pragma warn -8104 // static members with ctors not threadsafe
-# pragma warn -8105 // reference member in class without ctors
-#endif
-//
-// versions check:
-// last known and checked version is 0x621
-#if (__CODEGEARC__ > 0x621)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# else
-# pragma message( "Unknown compiler version - please run the configure tests and report the results")
-# endif
-#endif
-
-// CodeGear C++ Builder 2009
-#if (__CODEGEARC__ <= 0x613)
-# define BOOST_NO_INTEGRAL_INT64_T
-# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
-# define BOOST_NO_PRIVATE_IN_AGGREGATE
-# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
- // we shouldn't really need this - but too many things choke
- // without it, this needs more investigation:
-# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-# define BOOST_SP_NO_SP_CONVERTIBLE
-#endif
-
-// CodeGear C++ Builder 2010
-#if (__CODEGEARC__ <= 0x621)
-# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
-# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
-# define BOOST_NO_USING_TEMPLATE
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-// Temporary hack, until specific MPL preprocessed headers are generated
-# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
-
-// CodeGear has not yet completely implemented value-initialization, for
-// example for array types, as I reported in 2010: Embarcadero Report 83751,
-// "Value-initialization: arrays should have each element value-initialized",
-// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751
-// Last checked version: Embarcadero C++ 6.21
-// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
-// (Niels Dekker, LKEB, April 2010)
-# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-
-# if defined(NDEBUG) && defined(__cplusplus)
- // fix broken <cstring> so that Boost.test works:
-# include <cstring>
-# undef strcmp
-# endif
- // fix broken errno declaration:
-# include <errno.h>
-# ifndef errno
-# define errno errno
-# endif
-
-#endif
-
-// Reportedly, #pragma once is supported since C++ Builder 2010
-#if (__CODEGEARC__ >= 0x620)
-# define BOOST_HAS_PRAGMA_ONCE
-#endif
-
-//
-// C++0x macros:
-//
-#if (__CODEGEARC__ <= 0x620)
-#define BOOST_NO_CXX11_STATIC_ASSERT
-#else
-#define BOOST_HAS_STATIC_ASSERT
-#endif
-#define BOOST_HAS_CHAR16_T
-#define BOOST_HAS_CHAR32_T
-#define BOOST_HAS_LONG_LONG
-// #define BOOST_HAS_ALIGNOF
-#define BOOST_HAS_DECLTYPE
-#define BOOST_HAS_EXPLICIT_CONVERSION_OPS
-// #define BOOST_HAS_RVALUE_REFS
-#define BOOST_HAS_SCOPED_ENUM
-// #define BOOST_HAS_STATIC_ASSERT
-#define BOOST_HAS_STD_TYPE_TRAITS
-
-#define BOOST_NO_CXX11_AUTO_DECLARATIONS
-#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_CXX11_LAMBDAS
-#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_RVALUE_REFERENCES
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#define BOOST_NO_CXX11_UNICODE_LITERALS
-#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#define BOOST_NO_CXX11_ALIGNAS
-#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#define BOOST_NO_CXX11_INLINE_NAMESPACES
-#define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_FINAL
-#define BOOST_NO_CXX11_THREAD_LOCAL
-
-// C++ 14:
-#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
-# define BOOST_NO_CXX14_BINARY_LITERALS
-#endif
-#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-#endif
-#if (__cplusplus < 201304) // There's no SD6 check for this....
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-#endif
-#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-#endif
-#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-#endif
-#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-#endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-// C++17
-#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-#endif
-
-#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
-# define BOOST_NO_CXX17_INLINE_VARIABLES
-#endif
-
-#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
-# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-
-#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
-
-//
-// TR1 macros:
-//
-#define BOOST_HAS_TR1_HASH
-#define BOOST_HAS_TR1_TYPE_TRAITS
-#define BOOST_HAS_TR1_UNORDERED_MAP
-#define BOOST_HAS_TR1_UNORDERED_SET
-
-#define BOOST_HAS_MACRO_USE_FACET
-
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-
-// On non-Win32 platforms let the platform config figure this out:
-#ifdef _WIN32
-# define BOOST_HAS_STDINT_H
-#endif
-
-//
-// __int64:
-//
-#if !defined(__STRICT_ANSI__)
-# define BOOST_HAS_MS_INT64
-#endif
-//
-// check for exception handling support:
-//
-#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-#endif
-//
-// all versions have a <dirent.h>:
-//
-#if !defined(__STRICT_ANSI__)
-# define BOOST_HAS_DIRENT_H
-#endif
-//
-// all versions support __declspec:
-//
-#if defined(__STRICT_ANSI__)
-// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
-# define BOOST_SYMBOL_EXPORT
-#endif
-//
-// ABI fixing headers:
-//
-#ifndef BOOST_ABI_PREFIX
-# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
-#endif
-#ifndef BOOST_ABI_SUFFIX
-# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
-#endif
-//
-// Disable Win32 support in ANSI mode:
-//
-# pragma defineonoption BOOST_DISABLE_WIN32 -A
-//
-// MSVC compatibility mode does some nasty things:
-// TODO: look up if this doesn't apply to the whole 12xx range
-//
-#if defined(_MSC_VER) && (_MSC_VER <= 1200)
-# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
-# define BOOST_NO_VOID_RETURNS
-#endif
-
-#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__)
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/comeau.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/comeau.hpp
deleted file mode 100644
index 09841604f90..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/comeau.hpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// (C) Copyright John Maddock 2001.
-// (C) Copyright Douglas Gregor 2001.
-// (C) Copyright Peter Dimov 2001.
-// (C) Copyright Aleksey Gurtovoy 2003.
-// (C) Copyright Beman Dawes 2003.
-// (C) Copyright Jens Maurer 2003.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// Comeau C++ compiler setup:
-
-#include <boost/config/compiler/common_edg.hpp>
-
-#if (__COMO_VERSION__ <= 4245)
-
-# if defined(_MSC_VER) && _MSC_VER <= 1300
-# if _MSC_VER > 100
- // only set this in non-strict mode:
-# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
-# endif
-# endif
-
-// Void returns don't work when emulating VC 6 (Peter Dimov)
-// TODO: look up if this doesn't apply to the whole 12xx range
-# if defined(_MSC_VER) && (_MSC_VER < 1300)
-# define BOOST_NO_VOID_RETURNS
-# endif
-
-#endif // version 4245
-
-//
-// enable __int64 support in VC emulation mode
-//
-# if defined(_MSC_VER) && (_MSC_VER >= 1200)
-# define BOOST_HAS_MS_INT64
-# endif
-
-#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__)
-
-//
-// versions check:
-// we don't know Comeau prior to version 4245:
-#if __COMO_VERSION__ < 4245
-# error "Compiler not configured - please reconfigure"
-#endif
-//
-// last known and checked version is 4245:
-#if (__COMO_VERSION__ > 4245)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/digitalmars.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/digitalmars.hpp
deleted file mode 100644
index 3e9a3ab0f53..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/digitalmars.hpp
+++ /dev/null
@@ -1,140 +0,0 @@
-// Copyright (C) Christof Meerwald 2003
-// Copyright (C) Dan Watkins 2003
-//
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// Digital Mars C++ compiler setup:
-#define BOOST_COMPILER __DMC_VERSION_STRING__
-
-#define BOOST_HAS_LONG_LONG
-#define BOOST_HAS_PRAGMA_ONCE
-
-#if !defined(BOOST_STRICT_CONFIG)
-#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-#define BOOST_NO_OPERATORS_IN_NAMESPACE
-#define BOOST_NO_UNREACHABLE_RETURN_DETECTION
-#define BOOST_NO_SFINAE
-#define BOOST_NO_USING_TEMPLATE
-#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
-#endif
-
-//
-// has macros:
-#define BOOST_HAS_DIRENT_H
-#define BOOST_HAS_STDINT_H
-#define BOOST_HAS_WINTHREADS
-
-#if (__DMC__ >= 0x847)
-#define BOOST_HAS_EXPM1
-#define BOOST_HAS_LOG1P
-#endif
-
-//
-// Is this really the best way to detect whether the std lib is in namespace std?
-//
-#ifdef __cplusplus
-#include <cstddef>
-#endif
-#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD)
-# define BOOST_NO_STDC_NAMESPACE
-#endif
-
-
-// check for exception handling support:
-#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-#endif
-
-//
-// C++0x features
-//
-#define BOOST_NO_CXX11_AUTO_DECLARATIONS
-#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CXX11_CHAR16_T
-#define BOOST_NO_CXX11_CHAR32_T
-#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DECLTYPE
-#define BOOST_NO_CXX11_DECLTYPE_N3276
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#define BOOST_NO_CXX11_LAMBDAS
-#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_RVALUE_REFERENCES
-#define BOOST_NO_CXX11_SCOPED_ENUMS
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#define BOOST_NO_CXX11_STATIC_ASSERT
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#define BOOST_NO_CXX11_UNICODE_LITERALS
-#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#define BOOST_NO_CXX11_ALIGNAS
-#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#define BOOST_NO_CXX11_INLINE_NAMESPACES
-#define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_FINAL
-#define BOOST_NO_CXX11_THREAD_LOCAL
-
-// C++ 14:
-#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
-# define BOOST_NO_CXX14_BINARY_LITERALS
-#endif
-#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-#endif
-#if (__cplusplus < 201304) // There's no SD6 check for this....
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-#endif
-#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-#endif
-#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-#endif
-#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-#endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-// C++17
-#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-#endif
-#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
-# define BOOST_NO_CXX17_INLINE_VARIABLES
-#endif
-#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
-# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
-
-#if (__DMC__ <= 0x840)
-#error "Compiler not supported or configured - please reconfigure"
-#endif
-//
-// last known and checked version is ...:
-#if (__DMC__ > 0x848)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/gcc.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/gcc.hpp
deleted file mode 100644
index 19ccc592fde..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/gcc.hpp
+++ /dev/null
@@ -1,359 +0,0 @@
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Darin Adler 2001 - 2002.
-// (C) Copyright Jens Maurer 2001 - 2002.
-// (C) Copyright Beman Dawes 2001 - 2003.
-// (C) Copyright Douglas Gregor 2002.
-// (C) Copyright David Abrahams 2002 - 2003.
-// (C) Copyright Synge Todo 2003.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// GNU C++ compiler setup.
-
-//
-// Define BOOST_GCC so we know this is "real" GCC and not some pretender:
-//
-#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
-#if !defined(__CUDACC__)
-#define BOOST_GCC BOOST_GCC_VERSION
-#endif
-
-#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
-# define BOOST_GCC_CXX11
-#endif
-
-#if __GNUC__ == 3
-# if defined (__PATHSCALE__)
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-# define BOOST_NO_IS_ABSTRACT
-# endif
-
-# if __GNUC_MINOR__ < 4
-# define BOOST_NO_IS_ABSTRACT
-# endif
-# define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#endif
-#if __GNUC__ < 4
-//
-// All problems to gcc-3.x and earlier here:
-//
-#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-# ifdef __OPEN64__
-# define BOOST_NO_IS_ABSTRACT
-# endif
-#endif
-
-// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links
-#if BOOST_GCC_VERSION >= 30400
-#define BOOST_HAS_PRAGMA_ONCE
-#endif
-
-#if BOOST_GCC_VERSION < 40400
-// Previous versions of GCC did not completely implement value-initialization:
-// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
-// members", reported by Jonathan Wakely in 2006,
-// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4)
-// GCC Bug 33916, "Default constructor fails to initialize array members",
-// reported by Michael Elizabeth Chastain in 2007,
-// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4)
-// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
-#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-#endif
-
-#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-#endif
-
-
-//
-// Threading support: Turn this on unconditionally here (except for
-// those platforms where we can know for sure). It will get turned off again
-// later if no threading API is detected.
-//
-#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
-# define BOOST_HAS_THREADS
-#endif
-
-//
-// gcc has "long long"
-// Except on Darwin with standard compliance enabled (-pedantic)
-// Apple gcc helpfully defines this macro we can query
-//
-#if !defined(__DARWIN_NO_LONG_LONG)
-# define BOOST_HAS_LONG_LONG
-#endif
-
-//
-// gcc implements the named return value optimization since version 3.1
-//
-#define BOOST_HAS_NRVO
-
-// Branch prediction hints
-#define BOOST_LIKELY(x) __builtin_expect(x, 1)
-#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
-
-//
-// Dynamic shared object (DSO) and dynamic-link library (DLL) support
-//
-#if __GNUC__ >= 4
-# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
- // All Win32 development environments, including 64-bit Windows and MinGW, define
- // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
- // so does not define _WIN32 or its variants, but still supports dllexport/dllimport.
-# define BOOST_HAS_DECLSPEC
-# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
-# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
-# else
-# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
-# define BOOST_SYMBOL_IMPORT
-# endif
-# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
-#else
-// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
-# define BOOST_SYMBOL_EXPORT
-#endif
-
-//
-// RTTI and typeinfo detection is possible post gcc-4.3:
-//
-#if BOOST_GCC_VERSION > 40300
-# ifndef __GXX_RTTI
-# ifndef BOOST_NO_TYPEID
-# define BOOST_NO_TYPEID
-# endif
-# ifndef BOOST_NO_RTTI
-# define BOOST_NO_RTTI
-# endif
-# endif
-#endif
-
-//
-// Recent GCC versions have __int128 when in 64-bit mode.
-//
-// We disable this if the compiler is really nvcc with C++03 as it
-// doesn't actually support __int128 as of CUDA_VERSION=7500
-// even though it defines __SIZEOF_INT128__.
-// See https://svn.boost.org/trac/boost/ticket/8048
-// https://svn.boost.org/trac/boost/ticket/11852
-// Only re-enable this for nvcc if you're absolutely sure
-// of the circumstances under which it's supported:
-//
-#if defined(__CUDACC__)
-# if defined(BOOST_GCC_CXX11)
-# define BOOST_NVCC_CXX11
-# else
-# define BOOST_NVCC_CXX03
-# endif
-#endif
-
-#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03)
-# define BOOST_HAS_INT128
-#endif
-//
-// Recent GCC versions have a __float128 native type, we need to
-// include a std lib header to detect this - not ideal, but we'll
-// be including <cstddef> later anyway when we select the std lib.
-//
-// Nevertheless, as of CUDA 7.5, using __float128 with the host
-// compiler in pre-C++11 mode is still not supported.
-// See https://svn.boost.org/trac/boost/ticket/11852
-//
-#ifdef __cplusplus
-#include <cstddef>
-#else
-#include <stddef.h>
-#endif
-#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(BOOST_NVCC_CXX03)
-# define BOOST_HAS_FLOAT128
-#endif
-
-// C++0x features in 4.3.n and later
-//
-#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11)
-// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
-// passed on the command line, which in turn defines
-// __GXX_EXPERIMENTAL_CXX0X__.
-# define BOOST_HAS_DECLTYPE
-# define BOOST_HAS_RVALUE_REFS
-# define BOOST_HAS_STATIC_ASSERT
-# define BOOST_HAS_VARIADIC_TMPL
-#else
-# define BOOST_NO_CXX11_DECLTYPE
-# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-# define BOOST_NO_CXX11_RVALUE_REFERENCES
-# define BOOST_NO_CXX11_STATIC_ASSERT
-#endif
-
-// C++0x features in 4.4.n and later
-//
-#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11)
-# define BOOST_NO_CXX11_AUTO_DECLARATIONS
-# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-# define BOOST_NO_CXX11_CHAR16_T
-# define BOOST_NO_CXX11_CHAR32_T
-# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-# define BOOST_NO_CXX11_DELETED_FUNCTIONS
-# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-# define BOOST_NO_CXX11_INLINE_NAMESPACES
-# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#endif
-
-#if BOOST_GCC_VERSION < 40500
-# define BOOST_NO_SFINAE_EXPR
-#endif
-
-// GCC 4.5 forbids declaration of defaulted functions in private or protected sections
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11)
-# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
-#endif
-
-// C++0x features in 4.5.0 and later
-//
-#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11)
-# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# define BOOST_NO_CXX11_LAMBDAS
-# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-# define BOOST_NO_CXX11_RAW_LITERALS
-# define BOOST_NO_CXX11_UNICODE_LITERALS
-#endif
-
-// C++0x features in 4.5.1 and later
-//
-#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11)
-// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1
-// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
-# define BOOST_NO_CXX11_SCOPED_ENUMS
-#endif
-
-// C++0x features in 4.6.n and later
-//
-#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11)
-#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DEFAULTED_MOVES
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#endif
-
-// C++0x features in 4.7.n and later
-//
-#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11)
-# define BOOST_NO_CXX11_FINAL
-# define BOOST_NO_CXX11_TEMPLATE_ALIASES
-# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
-#endif
-
-// C++0x features in 4.8.n and later
-//
-#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11)
-# define BOOST_NO_CXX11_ALIGNAS
-# define BOOST_NO_CXX11_THREAD_LOCAL
-# define BOOST_NO_CXX11_SFINAE_EXPR
-#endif
-
-// C++0x features in 4.8.1 and later
-//
-#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11)
-# define BOOST_NO_CXX11_DECLTYPE_N3276
-# define BOOST_NO_CXX11_REF_QUALIFIERS
-# define BOOST_NO_CXX14_BINARY_LITERALS
-#endif
-
-// C++14 features in 4.9.0 and later
-//
-#if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300)
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-# if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11))
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-# endif
-#endif
-
-
-// C++ 14:
-#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-#if (BOOST_GCC_VERSION < 50200) || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-// C++17
-#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-#endif
-#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
-# define BOOST_NO_CXX17_INLINE_VARIABLES
-#endif
-#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
-# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
-
-#if __GNUC__ >= 7
-# define BOOST_FALLTHROUGH __attribute__((fallthrough))
-#endif
-
-#ifdef __MINGW32__
-// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see
-// https://sourceforge.net/p/mingw-w64/bugs/527/
-// Not setting this causes program termination on thread exit.
-#define BOOST_NO_CXX11_THREAD_LOCAL
-#endif
-
-//
-// Unused attribute:
-#if __GNUC__ >= 4
-# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
-#endif
-
-// Type aliasing hint. Supported since gcc 3.3.
-#define BOOST_MAY_ALIAS __attribute__((__may_alias__))
-
-//
-// __builtin_unreachable:
-#if BOOST_GCC_VERSION >= 40800
-#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
-#endif
-
-#ifndef BOOST_COMPILER
-# define BOOST_COMPILER "GNU C++ version " __VERSION__
-#endif
-
-// ConceptGCC compiler:
-// http://www.generic-programming.org/software/ConceptGCC/
-#ifdef __GXX_CONCEPTS__
-# define BOOST_HAS_CONCEPTS
-# define BOOST_COMPILER "ConceptGCC version " __VERSION__
-#endif
-
-// versions check:
-// we don't know gcc prior to version 3.30:
-#if (BOOST_GCC_VERSION< 30300)
-# error "Compiler not configured - please reconfigure"
-#endif
-//
-// last known and checked version is 7.1:
-#if (BOOST_GCC_VERSION > 70100)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Boost.Config is older than your compiler - please check for an updated Boost release."
-# else
-// we don't emit warnings here anymore since there are no defect macros defined for
-// gcc post 3.4, so any failures are gcc regressions...
-//# warning "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/greenhills.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/greenhills.hpp
deleted file mode 100644
index a76a07cf4a6..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/greenhills.hpp
+++ /dev/null
@@ -1,28 +0,0 @@
-// (C) Copyright John Maddock 2001.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// Greenhills C++ compiler setup:
-
-#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs)
-
-#include <boost/config/compiler/common_edg.hpp>
-
-//
-// versions check:
-// we don't support Greenhills prior to version 0:
-#if __ghs < 0
-# error "Compiler not supported or configured - please reconfigure"
-#endif
-//
-// last known and checked version is 0:
-#if (__ghs > 0)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
-
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/hp_acc.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/hp_acc.hpp
deleted file mode 100644
index 9df18eaf672..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/hp_acc.hpp
+++ /dev/null
@@ -1,147 +0,0 @@
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Jens Maurer 2001 - 2003.
-// (C) Copyright Aleksey Gurtovoy 2002.
-// (C) Copyright David Abrahams 2002 - 2003.
-// (C) Copyright Toon Knapen 2003.
-// (C) Copyright Boris Gubenko 2006 - 2007.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// HP aCC C++ compiler setup:
-
-#if defined(__EDG__)
-#include <boost/config/compiler/common_edg.hpp>
-#endif
-
-#if (__HP_aCC <= 33100)
-# define BOOST_NO_INTEGRAL_INT64_T
-# define BOOST_NO_OPERATORS_IN_NAMESPACE
-# if !defined(_NAMESPACE_STD)
-# define BOOST_NO_STD_LOCALE
-# define BOOST_NO_STRINGSTREAM
-# endif
-#endif
-
-#if (__HP_aCC <= 33300)
-// member templates are sufficiently broken that we disable them for now
-# define BOOST_NO_MEMBER_TEMPLATES
-# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
-# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
-#endif
-
-#if (__HP_aCC <= 38000)
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#endif
-
-#if (__HP_aCC > 50000) && (__HP_aCC < 60000)
-# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
-# define BOOST_NO_TEMPLATE_TEMPLATES
-# define BOOST_NO_SWPRINTF
-# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
-# define BOOST_NO_IS_ABSTRACT
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-#endif
-
-// optional features rather than defects:
-#if (__HP_aCC >= 33900)
-# define BOOST_HAS_LONG_LONG
-# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
-#endif
-
-#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 )
-# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
-#endif
-
-// This macro should not be defined when compiling in strict ansi
-// mode, but, currently, we don't have the ability to determine
-// what standard mode we are compiling with. Some future version
-// of aCC6 compiler will provide predefined macros reflecting the
-// compilation options, including the standard mode.
-#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98))
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#endif
-
-#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC)
-
-//
-// versions check:
-// we don't support HP aCC prior to version 33000:
-#if __HP_aCC < 33000
-# error "Compiler not supported or configured - please reconfigure"
-#endif
-
-//
-// Extended checks for supporting aCC on PA-RISC
-#if __HP_aCC > 30000 && __HP_aCC < 50000
-# if __HP_aCC < 38000
- // versions prior to version A.03.80 not supported
-# error "Compiler version not supported - version A.03.80 or higher is required"
-# elif !defined(__hpxstd98)
- // must compile using the option +hpxstd98 with version A.03.80 and above
-# error "Compiler option '+hpxstd98' is required for proper support"
-# endif //PA-RISC
-#endif
-
-//
-// C++0x features
-//
-// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
-//
-#if !defined(__EDG__)
-
-#define BOOST_NO_CXX11_AUTO_DECLARATIONS
-#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CXX11_CHAR16_T
-#define BOOST_NO_CXX11_CHAR32_T
-#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DECLTYPE
-#define BOOST_NO_CXX11_DECLTYPE_N3276
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#define BOOST_NO_CXX11_LAMBDAS
-#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_RVALUE_REFERENCES
-#define BOOST_NO_CXX11_SCOPED_ENUMS
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#define BOOST_NO_CXX11_STATIC_ASSERT
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#define BOOST_NO_CXX11_UNICODE_LITERALS
-#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#define BOOST_NO_CXX11_ALIGNAS
-#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#define BOOST_NO_CXX11_INLINE_NAMESPACES
-#define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_THREAD_LOCAL
-
-/*
- See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and
- https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436
-*/
-
-#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE)
- #define BOOST_NO_CXX11_VARIADIC_MACROS
-#endif
-
-#endif
-
-//
-// last known and checked version for HP-UX/ia64 is 61300
-// last known and checked version for PA-RISC is 38000
-#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98)))
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/intel.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/intel.hpp
deleted file mode 100644
index 0eea05b9166..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/intel.hpp
+++ /dev/null
@@ -1,564 +0,0 @@
-// (C) Copyright John Maddock 2001-8.
-// (C) Copyright Peter Dimov 2001.
-// (C) Copyright Jens Maurer 2001.
-// (C) Copyright David Abrahams 2002 - 2003.
-// (C) Copyright Aleksey Gurtovoy 2002 - 2003.
-// (C) Copyright Guillaume Melquiond 2002 - 2003.
-// (C) Copyright Beman Dawes 2003.
-// (C) Copyright Martin Wille 2003.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// Intel compiler setup:
-
-#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__))
-
-#ifdef _MSC_VER
-
-#include <boost/config/compiler/visualc.hpp>
-
-#undef BOOST_MSVC
-#undef BOOST_MSVC_FULL_VER
-
-#if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900)
-//
-// These appear to be supported, even though VC++ may not support them:
-//
-#define BOOST_HAS_EXPM1
-#define BOOST_HAS_LOG1P
-#undef BOOST_NO_CXX14_BINARY_LITERALS
-// This one may be a little risky to enable??
-#undef BOOST_NO_SFINAE_EXPR
-
-#endif
-
-#if (__INTEL_COMPILER <= 1600) && !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-#else // defined(_MSC_VER)
-
-#include <boost/config/compiler/gcc.hpp>
-
-#undef BOOST_GCC_VERSION
-#undef BOOST_GCC_CXX11
-#undef BOOST_GCC
-
-// Broken in all versions up to 17 (newer versions not tested)
-#if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-
-#endif // defined(_MSC_VER)
-
-#undef BOOST_COMPILER
-
-#if defined(__INTEL_COMPILER)
-#if __INTEL_COMPILER == 9999
-# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1.
-#else
-# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
-#endif
-#elif defined(__ICL)
-# define BOOST_INTEL_CXX_VERSION __ICL
-#elif defined(__ICC)
-# define BOOST_INTEL_CXX_VERSION __ICC
-#elif defined(__ECC)
-# define BOOST_INTEL_CXX_VERSION __ECC
-#endif
-
-// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
-#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_INTEL_STDCXX0X
-#endif
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
-# define BOOST_INTEL_STDCXX0X
-#endif
-
-#ifdef __GNUC__
-# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
-#endif
-
-#if !defined(BOOST_COMPILER)
-# if defined(BOOST_INTEL_STDCXX0X)
-# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
-# else
-# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
-# endif
-#endif
-
-#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
-
-#if defined(_WIN32) || defined(_WIN64)
-# define BOOST_INTEL_WIN BOOST_INTEL
-#else
-# define BOOST_INTEL_LINUX BOOST_INTEL
-#endif
-
-#else // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__))
-
-#include <boost/config/compiler/common_edg.hpp>
-
-#if defined(__INTEL_COMPILER)
-#if __INTEL_COMPILER == 9999
-# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1.
-#else
-# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
-#endif
-#elif defined(__ICL)
-# define BOOST_INTEL_CXX_VERSION __ICL
-#elif defined(__ICC)
-# define BOOST_INTEL_CXX_VERSION __ICC
-#elif defined(__ECC)
-# define BOOST_INTEL_CXX_VERSION __ECC
-#endif
-
-// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
-#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
-# define BOOST_INTEL_STDCXX0X
-#endif
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
-# define BOOST_INTEL_STDCXX0X
-#endif
-
-#ifdef __GNUC__
-# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
-#endif
-
-#if !defined(BOOST_COMPILER)
-# if defined(BOOST_INTEL_STDCXX0X)
-# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
-# else
-# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
-# endif
-#endif
-
-#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
-
-#if defined(_WIN32) || defined(_WIN64)
-# define BOOST_INTEL_WIN BOOST_INTEL
-#else
-# define BOOST_INTEL_LINUX BOOST_INTEL
-#endif
-
-#if (BOOST_INTEL_CXX_VERSION <= 600)
-
-# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)
-
-// Boost libraries assume strong standard conformance unless otherwise
-// indicated by a config macro. As configured by Intel, the EDG front-end
-// requires certain compiler options be set to achieve that strong conformance.
-// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt)
-// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for
-// details as they apply to particular versions of the compiler. When the
-// compiler does not predefine a macro indicating if an option has been set,
-// this config file simply assumes the option has been set.
-// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if
-// the compiler option is not enabled.
-
-# define BOOST_NO_SWPRINTF
-# endif
-
-// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov)
-
-# if defined(_MSC_VER) && (_MSC_VER <= 1200)
-# define BOOST_NO_VOID_RETURNS
-# define BOOST_NO_INTEGRAL_INT64_T
-# endif
-
-#endif
-
-#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32)
-# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
-#endif
-
-// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864
-#if BOOST_INTEL_CXX_VERSION < 600
-# define BOOST_NO_INTRINSIC_WCHAR_T
-#else
-// We should test the macro _WCHAR_T_DEFINED to check if the compiler
-// supports wchar_t natively. *BUT* there is a problem here: the standard
-// headers define this macro if they typedef wchar_t. Anyway, we're lucky
-// because they define it without a value, while Intel C++ defines it
-// to 1. So we can check its value to see if the macro was defined natively
-// or not.
-// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T
-// is used instead.
-# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)
-# define BOOST_NO_INTRINSIC_WCHAR_T
-# endif
-#endif
-
-#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
-//
-// Figure out when Intel is emulating this gcc bug
-// (All Intel versions prior to 9.0.26, and versions
-// later than that if they are set up to emulate gcc 3.2
-// or earlier):
-//
-# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912)
-# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
-# endif
-#endif
-#if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200)
-// GCC or VC emulation:
-#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#endif
-//
-// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
-// set correctly, if we don't do this now, we will get errors later
-// in type_traits code among other things, getting this correct
-// for the Intel compiler is actually remarkably fragile and tricky:
-//
-#ifdef __cplusplus
-#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
-#include <cwchar>
-template< typename T > struct assert_no_intrinsic_wchar_t;
-template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
-// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
-// where it is defined above:
-typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
-#else
-template< typename T > struct assert_intrinsic_wchar_t;
-template<> struct assert_intrinsic_wchar_t<wchar_t> {};
-// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
-template<> struct assert_intrinsic_wchar_t<unsigned short> {};
-#endif
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000)
-# if _MSC_VER >= 1200
-# define BOOST_HAS_MS_INT64
-# endif
-# define BOOST_NO_SWPRINTF
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#elif defined(_WIN32)
-# define BOOST_DISABLE_WIN32
-#endif
-
-// I checked version 6.0 build 020312Z, it implements the NRVO.
-// Correct this as you find out which version of the compiler
-// implemented the NRVO first. (Daniel Frey)
-#if (BOOST_INTEL_CXX_VERSION >= 600)
-# define BOOST_HAS_NRVO
-#endif
-
-// Branch prediction hints
-// I'm not sure 8.0 was the first version to support these builtins,
-// update the condition if the version is not accurate. (Andrey Semashev)
-#if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800
-#define BOOST_LIKELY(x) __builtin_expect(x, 1)
-#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
-#endif
-
-// RTTI
-// __RTTI is the EDG macro
-// __INTEL_RTTI__ is the Intel macro
-// __GXX_RTTI is the g++ macro
-// _CPPRTTI is the MSVC++ macro
-#if !defined(__RTTI) && !defined(__INTEL_RTTI__) && !defined(__GXX_RTTI) && !defined(_CPPRTTI)
-
-#if !defined(BOOST_NO_RTTI)
-# define BOOST_NO_RTTI
-#endif
-
-// in MS mode, static typeid works even when RTTI is off
-#if !defined(_MSC_VER) && !defined(BOOST_NO_TYPEID)
-# define BOOST_NO_TYPEID
-#endif
-
-#endif
-
-//
-// versions check:
-// we don't support Intel prior to version 6.0:
-#if BOOST_INTEL_CXX_VERSION < 600
-# error "Compiler not supported or configured - please reconfigure"
-#endif
-
-// Intel on MacOS requires
-#if defined(__APPLE__) && defined(__INTEL_COMPILER)
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#endif
-
-// Intel on Altix Itanium
-#if defined(__itanium__) && defined(__INTEL_COMPILER)
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-#endif
-
-//
-// An attempt to value-initialize a pointer-to-member may trigger an
-// internal error on Intel <= 11.1 (last checked version), as was
-// reported by John Maddock, Intel support issue 589832, May 2010.
-// Moreover, according to test results from Huang-Vista-x86_32_intel,
-// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some
-// cases when it should be value-initialized.
-// (Niels Dekker, LKEB, May 2010)
-// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).
-#if defined(__INTEL_COMPILER)
-# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600))
-# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-# endif
-#endif
-
-//
-// Dynamic shared object (DSO) and dynamic-link library (DLL) support
-//
-#if defined(__GNUC__) && (__GNUC__ >= 4)
-# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
-# define BOOST_SYMBOL_IMPORT
-# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
-#endif
-
-// Type aliasing hint
-#if defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1300)
-# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
-#endif
-
-//
-// C++0x features
-// For each feature we need to check both the Intel compiler version,
-// and the version of MSVC or GCC that we are emulating.
-// See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
-// for a list of which features were implemented in which Intel releases.
-//
-#if defined(BOOST_INTEL_STDCXX0X)
-// BOOST_NO_CXX11_CONSTEXPR:
-#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && !defined(_MSC_VER)
-// Available in earlier Intel versions, but fail our tests:
-# undef BOOST_NO_CXX11_CONSTEXPR
-#endif
-// BOOST_NO_CXX11_NULLPTR:
-#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
-# undef BOOST_NO_CXX11_NULLPTR
-#endif
-// BOOST_NO_CXX11_TEMPLATE_ALIASES
-#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-# undef BOOST_NO_CXX11_TEMPLATE_ALIASES
-#endif
-
-// BOOST_NO_CXX11_DECLTYPE
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
-# undef BOOST_NO_CXX11_DECLTYPE
-#endif
-
-// BOOST_NO_CXX11_DECLTYPE_N3276
-#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-# undef BOOST_NO_CXX11_DECLTYPE_N3276
-#endif
-
-// BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#endif
-
-// BOOST_NO_CXX11_RVALUE_REFERENCES
-#if (BOOST_INTEL_CXX_VERSION >= 1300) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
-// This is available from earlier Intel versions, but breaks Filesystem and other libraries:
-# undef BOOST_NO_CXX11_RVALUE_REFERENCES
-#endif
-
-// BOOST_NO_CXX11_STATIC_ASSERT
-#if (BOOST_INTEL_CXX_VERSION >= 1110) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
-# undef BOOST_NO_CXX11_STATIC_ASSERT
-#endif
-
-// BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#endif
-
-// BOOST_NO_CXX11_VARIADIC_MACROS
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40200)) && (!defined(_MSC_VER) || (_MSC_VER >= 1400))
-# undef BOOST_NO_CXX11_VARIADIC_MACROS
-#endif
-
-// BOOST_NO_CXX11_AUTO_DECLARATIONS
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
-# undef BOOST_NO_CXX11_AUTO_DECLARATIONS
-#endif
-
-// BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
-# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#endif
-
-// BOOST_NO_CXX11_CHAR16_T
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
-# undef BOOST_NO_CXX11_CHAR16_T
-#endif
-
-// BOOST_NO_CXX11_CHAR32_T
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
-# undef BOOST_NO_CXX11_CHAR32_T
-#endif
-
-// BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#endif
-
-// BOOST_NO_CXX11_DELETED_FUNCTIONS
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-# undef BOOST_NO_CXX11_DELETED_FUNCTIONS
-#endif
-
-// BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
-# undef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#endif
-
-// BOOST_NO_CXX11_SCOPED_ENUMS
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40501)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
-// This is available but broken in earlier Intel releases.
-# undef BOOST_NO_CXX11_SCOPED_ENUMS
-#endif
-
-// BOOST_NO_SFINAE_EXPR
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
-# undef BOOST_NO_SFINAE_EXPR
-#endif
-
-// BOOST_NO_CXX11_SFINAE_EXPR
-#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && !defined(_MSC_VER)
-# undef BOOST_NO_CXX11_SFINAE_EXPR
-#endif
-
-// BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-// This is available in earlier Intel releases, but breaks Multiprecision:
-# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#endif
-
-// BOOST_NO_CXX11_LAMBDAS
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
-# undef BOOST_NO_CXX11_LAMBDAS
-#endif
-
-// BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500))
-# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#endif
-
-// BOOST_NO_CXX11_RANGE_BASED_FOR
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
-# undef BOOST_NO_CXX11_RANGE_BASED_FOR
-#endif
-
-// BOOST_NO_CXX11_RAW_LITERALS
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-# undef BOOST_NO_CXX11_RAW_LITERALS
-#endif
-
-// BOOST_NO_CXX11_UNICODE_LITERALS
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
-# undef BOOST_NO_CXX11_UNICODE_LITERALS
-#endif
-
-// BOOST_NO_CXX11_NOEXCEPT
-#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
-// Available in earlier Intel release, but generates errors when used with
-// conditional exception specifications, for example in multiprecision:
-# undef BOOST_NO_CXX11_NOEXCEPT
-#endif
-
-// BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
-# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#endif
-
-// BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730))
-# undef BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#endif
-
-// BOOST_NO_CXX11_ALIGNAS
-#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730))
-# undef BOOST_NO_CXX11_ALIGNAS
-#endif
-
-// BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
-# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#endif
-
-// BOOST_NO_CXX11_INLINE_NAMESPACES
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730))
-# undef BOOST_NO_CXX11_INLINE_NAMESPACES
-#endif
-
-// BOOST_NO_CXX11_REF_QUALIFIERS
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730))
-# undef BOOST_NO_CXX11_REF_QUALIFIERS
-#endif
-
-// BOOST_NO_CXX11_FINAL
-#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
-# undef BOOST_NO_CXX11_FINAL
-#endif
-
-#endif // defined(BOOST_INTEL_STDCXX0X)
-
-//
-// Broken in all versions up to 15:
-#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
-
-#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310)
-# define BOOST_NO_CXX11_HDR_FUTURE
-# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#endif
-
-#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400)
-// A regression in Intel's compiler means that <tuple> seems to be broken in this release as well as <future> :
-# define BOOST_NO_CXX11_HDR_FUTURE
-# define BOOST_NO_CXX11_HDR_TUPLE
-#endif
-
-#if (BOOST_INTEL_CXX_VERSION < 1200)
-//
-// fenv.h appears not to work with Intel prior to 12.0:
-//
-# define BOOST_NO_FENV_H
-#endif
-
-// Intel 13.10 fails to access defaulted functions of a base class declared in private or protected sections,
-// producing the following errors:
-// error #453: protected function "..." (declared at ...") is not accessible through a "..." pointer or object
-#if (BOOST_INTEL_CXX_VERSION <= 1310)
-# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
-#endif
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1600)
-# define BOOST_HAS_STDINT_H
-#endif
-
-#if defined(__CUDACC__)
-# if defined(BOOST_GCC_CXX11)
-# define BOOST_NVCC_CXX11
-# else
-# define BOOST_NVCC_CXX03
-# endif
-#endif
-
-#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(BOOST_NVCC_CXX03)
-# define BOOST_HAS_INT128
-#endif
-
-#endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__))
-//
-// last known and checked version:
-#if (BOOST_INTEL_CXX_VERSION > 1700)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Boost.Config is older than your compiler - please check for an updated Boost release."
-# elif defined(_MSC_VER)
-//
-// We don't emit this warning any more, since we have so few
-// defect macros set anyway (just the one).
-//
-//# pragma message("Unknown compiler version - please run the configure tests and report the results")
-# endif
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/kai.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/kai.hpp
deleted file mode 100644
index 960d501c860..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/kai.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// (C) Copyright John Maddock 2001.
-// (C) Copyright David Abrahams 2002.
-// (C) Copyright Aleksey Gurtovoy 2002.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// Kai C++ compiler setup:
-
-#include <boost/config/compiler/common_edg.hpp>
-
-# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)
- // at least on Sun, the contents of <cwchar> is not in namespace std
-# define BOOST_NO_STDC_NAMESPACE
-# endif
-
-// see also common_edg.hpp which needs a special check for __KCC
-# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-# endif
-
-//
-// last known and checked version is 4001:
-#if (__KCC_VERSION > 4001)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/metrowerks.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/metrowerks.hpp
deleted file mode 100644
index 4bfc01ece1b..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/metrowerks.hpp
+++ /dev/null
@@ -1,195 +0,0 @@
-// (C) Copyright John Maddock 2001.
-// (C) Copyright Darin Adler 2001.
-// (C) Copyright Peter Dimov 2001.
-// (C) Copyright David Abrahams 2001 - 2002.
-// (C) Copyright Beman Dawes 2001 - 2003.
-// (C) Copyright Stefan Slapeta 2004.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// Metrowerks C++ compiler setup:
-
-// locale support is disabled when linking with the dynamic runtime
-# ifdef _MSL_NO_LOCALE
-# define BOOST_NO_STD_LOCALE
-# endif
-
-# if __MWERKS__ <= 0x2301 // 5.3
-# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-# define BOOST_NO_POINTER_TO_MEMBER_CONST
-# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
-# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
-# endif
-
-# if __MWERKS__ <= 0x2401 // 6.2
-//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-# endif
-
-# if(__MWERKS__ <= 0x2407) // 7.x
-# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
-# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
-# endif
-
-# if(__MWERKS__ <= 0x3003) // 8.x
-# define BOOST_NO_SFINAE
-# endif
-
-// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last
-// tested version *only*:
-# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-# define BOOST_NO_IS_ABSTRACT
-# endif
-
-#if !__option(wchar_type)
-# define BOOST_NO_INTRINSIC_WCHAR_T
-#endif
-
-#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-#endif
-
-#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh)
-# if __MWERKS__ == 0x3000
-# define BOOST_COMPILER_VERSION 8.0
-# elif __MWERKS__ == 0x3001
-# define BOOST_COMPILER_VERSION 8.1
-# elif __MWERKS__ == 0x3002
-# define BOOST_COMPILER_VERSION 8.2
-# elif __MWERKS__ == 0x3003
-# define BOOST_COMPILER_VERSION 8.3
-# elif __MWERKS__ == 0x3200
-# define BOOST_COMPILER_VERSION 9.0
-# elif __MWERKS__ == 0x3201
-# define BOOST_COMPILER_VERSION 9.1
-# elif __MWERKS__ == 0x3202
-# define BOOST_COMPILER_VERSION 9.2
-# elif __MWERKS__ == 0x3204
-# define BOOST_COMPILER_VERSION 9.3
-# elif __MWERKS__ == 0x3205
-# define BOOST_COMPILER_VERSION 9.4
-# elif __MWERKS__ == 0x3206
-# define BOOST_COMPILER_VERSION 9.5
-# elif __MWERKS__ == 0x3207
-# define BOOST_COMPILER_VERSION 9.6
-# else
-# define BOOST_COMPILER_VERSION __MWERKS__
-# endif
-#else
-# define BOOST_COMPILER_VERSION __MWERKS__
-#endif
-
-//
-// C++0x features
-//
-// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
-//
-#if __MWERKS__ > 0x3206 && __option(rvalue_refs)
-# define BOOST_HAS_RVALUE_REFS
-#else
-# define BOOST_NO_CXX11_RVALUE_REFERENCES
-#endif
-#define BOOST_NO_CXX11_AUTO_DECLARATIONS
-#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CXX11_CHAR16_T
-#define BOOST_NO_CXX11_CHAR32_T
-#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DECLTYPE
-#define BOOST_NO_CXX11_DECLTYPE_N3276
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#define BOOST_NO_CXX11_LAMBDAS
-#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_SCOPED_ENUMS
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#define BOOST_NO_CXX11_STATIC_ASSERT
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#define BOOST_NO_CXX11_UNICODE_LITERALS
-#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#define BOOST_NO_CXX11_VARIADIC_MACROS
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#define BOOST_NO_CXX11_ALIGNAS
-#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#define BOOST_NO_CXX11_INLINE_NAMESPACES
-#define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_FINAL
-#define BOOST_NO_CXX11_THREAD_LOCAL
-
-// C++ 14:
-#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
-# define BOOST_NO_CXX14_BINARY_LITERALS
-#endif
-#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-#endif
-#if (__cplusplus < 201304) // There's no SD6 check for this....
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-#endif
-#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-#endif
-#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-#endif
-#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-#endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-// C++17
-#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-#endif
-#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
-# define BOOST_NO_CXX17_INLINE_VARIABLES
-#endif
-#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
-# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
-
-#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
-
-//
-// versions check:
-// we don't support Metrowerks prior to version 5.3:
-#if __MWERKS__ < 0x2301
-# error "Compiler not supported or configured - please reconfigure"
-#endif
-//
-// last known and checked version:
-#if (__MWERKS__ > 0x3205)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
-
-
-
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/mpw.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/mpw.hpp
deleted file mode 100644
index 2292ada0928..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/mpw.hpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// (C) Copyright John Maddock 2001 - 2002.
-// (C) Copyright Aleksey Gurtovoy 2002.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// MPW C++ compilers setup:
-
-# if defined(__SC__)
-# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)
-# elif defined(__MRC__)
-# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)
-# else
-# error "Using MPW compiler configuration by mistake. Please update."
-# endif
-
-//
-// MPW 8.90:
-//
-#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG)
-# define BOOST_NO_CV_SPECIALIZATIONS
-# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
-# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
-# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-# define BOOST_NO_INTRINSIC_WCHAR_T
-# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
-# define BOOST_NO_USING_TEMPLATE
-
-# define BOOST_NO_CWCHAR
-# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-
-# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */
-
-#endif
-
-//
-// C++0x features
-//
-// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
-//
-#define BOOST_NO_CXX11_AUTO_DECLARATIONS
-#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#define BOOST_NO_CXX11_CHAR16_T
-#define BOOST_NO_CXX11_CHAR32_T
-#define BOOST_NO_CXX11_CONSTEXPR
-#define BOOST_NO_CXX11_DECLTYPE
-#define BOOST_NO_CXX11_DECLTYPE_N3276
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#define BOOST_NO_CXX11_LAMBDAS
-#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_RVALUE_REFERENCES
-#define BOOST_NO_CXX11_SCOPED_ENUMS
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#define BOOST_NO_CXX11_STATIC_ASSERT
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#define BOOST_NO_CXX11_UNICODE_LITERALS
-#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#define BOOST_NO_CXX11_VARIADIC_MACROS
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#define BOOST_NO_CXX11_ALIGNAS
-#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#define BOOST_NO_CXX11_INLINE_NAMESPACES
-#define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_FINAL
-#define BOOST_NO_CXX11_THREAD_LOCAL
-
-// C++ 14:
-#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
-# define BOOST_NO_CXX14_BINARY_LITERALS
-#endif
-#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-#endif
-#if (__cplusplus < 201304) // There's no SD6 check for this....
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-#endif
-#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-#endif
-#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-#endif
-#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-#endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-// C++17
-#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-#endif
-#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
-# define BOOST_NO_CXX17_INLINE_VARIABLES
-#endif
-#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
-# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
-
-//
-// versions check:
-// we don't support MPW prior to version 8.9:
-#if MPW_CPLUS < 0x890
-# error "Compiler not supported or configured - please reconfigure"
-#endif
-//
-// last known and checked version is 0x890:
-#if (MPW_CPLUS > 0x890)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
-
-
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/vacpp.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/vacpp.hpp
deleted file mode 100644
index cabe844ffd4..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/vacpp.hpp
+++ /dev/null
@@ -1,183 +0,0 @@
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Toon Knapen 2001 - 2003.
-// (C) Copyright Lie-Quan Lee 2001.
-// (C) Copyright Markus Schoepflin 2002 - 2003.
-// (C) Copyright Beman Dawes 2002 - 2003.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// Visual Age (IBM) C++ compiler setup:
-
-#if __IBMCPP__ <= 501
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
-#endif
-
-#if (__IBMCPP__ <= 502)
-// Actually the compiler supports inclass member initialization but it
-// requires a definition for the class member and it doesn't recognize
-// it as an integral constant expression when used as a template argument.
-# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-# define BOOST_NO_INTEGRAL_INT64_T
-# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
-#endif
-
-#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG)
-# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
-#endif
-
-#if (__IBMCPP__ <= 1110)
-// XL C++ V11.1 and earlier versions may not always value-initialize
-// a temporary object T(), when T is a non-POD aggregate class type.
-// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it
-// high priority. -- Niels Dekker (LKEB), May 2010.
-# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-#endif
-
-//
-// On AIX thread support seems to be indicated by _THREAD_SAFE:
-//
-#ifdef _THREAD_SAFE
-# define BOOST_HAS_THREADS
-#endif
-
-#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__)
-
-//
-// versions check:
-// we don't support Visual age prior to version 5:
-#if __IBMCPP__ < 500
-#error "Compiler not supported or configured - please reconfigure"
-#endif
-//
-// last known and checked version is 1210:
-#if (__IBMCPP__ > 1210)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown compiler version - please run the configure tests and report the results"
-# endif
-#endif
-
-// Some versions of the compiler have issues with default arguments on partial specializations
-#if __IBMCPP__ <= 1010
-#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
-#endif
-
-// Type aliasing hint. Supported since XL C++ 13.1
-#if (__IBMCPP__ >= 1310)
-# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
-#endif
-
-//
-// C++0x features
-//
-// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
-//
-#if ! __IBMCPP_AUTO_TYPEDEDUCTION
-# define BOOST_NO_CXX11_AUTO_DECLARATIONS
-# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-#endif
-#if ! __IBMCPP_UTF_LITERAL__
-# define BOOST_NO_CXX11_CHAR16_T
-# define BOOST_NO_CXX11_CHAR32_T
-#endif
-#if ! __IBMCPP_CONSTEXPR
-# define BOOST_NO_CXX11_CONSTEXPR
-#endif
-#if ! __IBMCPP_DECLTYPE
-# define BOOST_NO_CXX11_DECLTYPE
-#else
-# define BOOST_HAS_DECLTYPE
-#endif
-#define BOOST_NO_CXX11_DECLTYPE_N3276
-#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-#define BOOST_NO_CXX11_DELETED_FUNCTIONS
-#if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS
-# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#endif
-#if ! __IBMCPP_EXTERN_TEMPLATE
-# define BOOST_NO_CXX11_EXTERN_TEMPLATE
-#endif
-#if ! __IBMCPP_VARIADIC_TEMPLATES
-// not enabled separately at this time
-# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#endif
-#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-#define BOOST_NO_CXX11_LAMBDAS
-#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#define BOOST_NO_CXX11_NOEXCEPT
-#define BOOST_NO_CXX11_NULLPTR
-#define BOOST_NO_CXX11_RANGE_BASED_FOR
-#define BOOST_NO_CXX11_RAW_LITERALS
-#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-#if ! __IBMCPP_RVALUE_REFERENCES
-# define BOOST_NO_CXX11_RVALUE_REFERENCES
-#endif
-#if ! __IBMCPP_SCOPED_ENUM
-# define BOOST_NO_CXX11_SCOPED_ENUMS
-#endif
-#define BOOST_NO_SFINAE_EXPR
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-#if ! __IBMCPP_STATIC_ASSERT
-# define BOOST_NO_CXX11_STATIC_ASSERT
-#endif
-#define BOOST_NO_CXX11_TEMPLATE_ALIASES
-#define BOOST_NO_CXX11_UNICODE_LITERALS
-#if ! __IBMCPP_VARIADIC_TEMPLATES
-# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-#endif
-#if ! __C99_MACRO_WITH_VA_ARGS
-# define BOOST_NO_CXX11_VARIADIC_MACROS
-#endif
-#define BOOST_NO_CXX11_ALIGNAS
-#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-#define BOOST_NO_CXX11_INLINE_NAMESPACES
-#define BOOST_NO_CXX11_REF_QUALIFIERS
-#define BOOST_NO_CXX11_FINAL
-#define BOOST_NO_CXX11_THREAD_LOCAL
-
-// C++ 14:
-#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
-# define BOOST_NO_CXX14_BINARY_LITERALS
-#endif
-#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
-# define BOOST_NO_CXX14_CONSTEXPR
-#endif
-#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-#endif
-#if (__cplusplus < 201304) // There's no SD6 check for this....
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-#endif
-#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-#endif
-#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-#endif
-#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-#endif
-#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-#endif
-
-// C++17
-#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-#endif
-#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
-# define BOOST_NO_CXX17_INLINE_VARIABLES
-#endif
-#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
-# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/visualc.hpp b/src/third_party/boost-1.68.0/boost/config/compiler/visualc.hpp
deleted file mode 100644
index ded7284a628..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/compiler/visualc.hpp
+++ /dev/null
@@ -1,355 +0,0 @@
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Darin Adler 2001 - 2002.
-// (C) Copyright Peter Dimov 2001.
-// (C) Copyright Aleksey Gurtovoy 2002.
-// (C) Copyright David Abrahams 2002 - 2003.
-// (C) Copyright Beman Dawes 2002 - 2003.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-//
-// Microsoft Visual C++ compiler setup:
-//
-// We need to be careful with the checks in this file, as contrary
-// to popular belief there are versions with _MSC_VER with the final
-// digit non-zero (mainly the MIPS cross compiler).
-//
-// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX.
-// No other comparisons (==, >, or <=) are safe.
-//
-
-#define BOOST_MSVC _MSC_VER
-
-//
-// Helper macro BOOST_MSVC_FULL_VER for use in Boost code:
-//
-#if _MSC_FULL_VER > 100000000
-# define BOOST_MSVC_FULL_VER _MSC_FULL_VER
-#else
-# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
-#endif
-
-// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
-#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
-
-#define BOOST_HAS_PRAGMA_ONCE
-
-//
-// versions check:
-// we don't support Visual C++ prior to version 7.1:
-#if _MSC_VER < 1310
-# error "Compiler not supported or configured - please reconfigure"
-#endif
-
-#if _MSC_FULL_VER < 180020827
-# define BOOST_NO_FENV_H
-#endif
-
-#if _MSC_VER < 1400
-// although a conforming signature for swprint exists in VC7.1
-// it appears not to actually work:
-# define BOOST_NO_SWPRINTF
-// Our extern template tests also fail for this compiler:
-# define BOOST_NO_CXX11_EXTERN_TEMPLATE
-// Variadic macros do not exist for VC7.1 and lower
-# define BOOST_NO_CXX11_VARIADIC_MACROS
-# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#endif
-
-#if _MSC_VER < 1500 // 140X == VC++ 8.0
-# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
-#endif
-
-#if _MSC_VER < 1600 // 150X == VC++ 9.0
- // A bug in VC9:
-# define BOOST_NO_ADL_BARRIER
-#endif
-
-
-#ifndef _NATIVE_WCHAR_T_DEFINED
-# define BOOST_NO_INTRINSIC_WCHAR_T
-#endif
-
-//
-// check for exception handling support:
-#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
-# define BOOST_NO_EXCEPTIONS
-#endif
-
-//
-// __int64 support:
-//
-#define BOOST_HAS_MS_INT64
-#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)
-# define BOOST_HAS_LONG_LONG
-#else
-# define BOOST_NO_LONG_LONG
-#endif
-#if (_MSC_VER >= 1400) && !defined(_DEBUG)
-# define BOOST_HAS_NRVO
-#endif
-#if _MSC_VER >= 1600 // 160X == VC++ 10.0
-# define BOOST_HAS_PRAGMA_DETECT_MISMATCH
-#endif
-//
-// disable Win32 API's if compiler extensions are
-// turned off:
-//
-#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
-# define BOOST_DISABLE_WIN32
-#endif
-#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)
-# define BOOST_NO_RTTI
-#endif
-
-//
-// TR1 features:
-//
-#if (_MSC_VER >= 1700) && defined(_HAS_CXX17) && (_HAS_CXX17 > 0)
-// # define BOOST_HAS_TR1_HASH // don't know if this is true yet.
-// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet.
-# define BOOST_HAS_TR1_UNORDERED_MAP
-# define BOOST_HAS_TR1_UNORDERED_SET
-#endif
-
-//
-// C++0x features
-//
-// See above for BOOST_NO_LONG_LONG
-
-// C++ features supported by VC++ 10 (aka 2010)
-//
-#if _MSC_VER < 1600
-# define BOOST_NO_CXX11_AUTO_DECLARATIONS
-# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
-# define BOOST_NO_CXX11_LAMBDAS
-# define BOOST_NO_CXX11_RVALUE_REFERENCES
-# define BOOST_NO_CXX11_STATIC_ASSERT
-# define BOOST_NO_CXX11_NULLPTR
-# define BOOST_NO_CXX11_DECLTYPE
-#endif // _MSC_VER < 1600
-
-#if _MSC_VER >= 1600
-# define BOOST_HAS_STDINT_H
-#endif
-
-// C++11 features supported by VC++ 11 (aka 2012)
-//
-#if _MSC_VER < 1700
-# define BOOST_NO_CXX11_FINAL
-# define BOOST_NO_CXX11_RANGE_BASED_FOR
-# define BOOST_NO_CXX11_SCOPED_ENUMS
-#endif // _MSC_VER < 1700
-
-// C++11 features supported by VC++ 12 (aka 2013).
-//
-#if _MSC_FULL_VER < 180020827
-# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
-# define BOOST_NO_CXX11_DELETED_FUNCTIONS
-# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
-# define BOOST_NO_CXX11_RAW_LITERALS
-# define BOOST_NO_CXX11_TEMPLATE_ALIASES
-# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
-# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
-# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-# define BOOST_NO_CXX11_DECLTYPE_N3276
-#endif
-
-#if _MSC_FULL_VER >= 180020827
-#define BOOST_HAS_EXPM1
-#define BOOST_HAS_LOG1P
-#endif
-
-// C++11 features supported by VC++ 14 (aka 2015)
-//
-#if (_MSC_FULL_VER < 190023026)
-# define BOOST_NO_CXX11_NOEXCEPT
-# define BOOST_NO_CXX11_DEFAULTED_MOVES
-# define BOOST_NO_CXX11_REF_QUALIFIERS
-# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
-# define BOOST_NO_CXX11_ALIGNAS
-# define BOOST_NO_CXX11_INLINE_NAMESPACES
-# define BOOST_NO_CXX11_CHAR16_T
-# define BOOST_NO_CXX11_CHAR32_T
-# define BOOST_NO_CXX11_UNICODE_LITERALS
-# define BOOST_NO_CXX14_DECLTYPE_AUTO
-# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
-# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
-# define BOOST_NO_CXX14_BINARY_LITERALS
-# define BOOST_NO_CXX14_GENERIC_LAMBDAS
-# define BOOST_NO_CXX14_DIGIT_SEPARATORS
-# define BOOST_NO_CXX11_THREAD_LOCAL
-#endif
-// C++11 features supported by VC++ 14 update 3 (aka 2015)
-//
-#if (_MSC_FULL_VER < 190024210)
-# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
-# define BOOST_NO_SFINAE_EXPR
-# define BOOST_NO_CXX11_CONSTEXPR
-#endif
-
-// C++14 features supported by VC++ 14.1 (Visual Studio 2017)
-//
-#if (_MSC_VER < 1910)
-# define BOOST_NO_CXX14_AGGREGATE_NSDMI
-#endif
-
-// C++17 features supported by VC++ 14.1 (Visual Studio 2017) Update 3
-//
-#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
-# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
-# define BOOST_NO_CXX17_IF_CONSTEXPR
-#endif
-
-// MSVC including version 14 has not yet completely
-// implemented value-initialization, as is reported:
-// "VC++ does not value-initialize members of derived classes without
-// user-declared constructor", reported in 2009 by Sylvester Hesp:
-// https://connect.microsoft.com/VisualStudio/feedback/details/484295
-// "Presence of copy constructor breaks member class initialization",
-// reported in 2009 by Alex Vakulenko:
-// https://connect.microsoft.com/VisualStudio/feedback/details/499606
-// "Value-initialization in new-expression", reported in 2005 by
-// Pavel Kuznetsov (MetaCommunications Engineering):
-// https://connect.microsoft.com/VisualStudio/feedback/details/100744
-// Reported again by John Maddock in 2015 for VC14:
-// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly
-// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
-// (Niels Dekker, LKEB, May 2010)
-// Still present in VC15.5, Dec 2017.
-#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
-//
-// C++ 11:
-//
-// This is supported with /permissive- for 15.5 onwards, unfortunately we appear to have no way to tell
-// if this is in effect or not, in any case nothing in Boost is currently using this, so we'll just go
-// on defining it for now:
-//
-# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
-
-#if (_MSC_VER < 1912) || (_MSVC_LANG < 201402)
-// Supported from msvc-15.5 onwards:
-#define BOOST_NO_CXX11_SFINAE_EXPR
-#endif
-// C++ 14:
-// Still gives internal compiler error for msvc-15.5:
-# define BOOST_NO_CXX14_CONSTEXPR
-// C++ 17:
-#if (_MSC_VER < 1912) || (_MSVC_LANG < 201703)
-#define BOOST_NO_CXX17_INLINE_VARIABLES
-#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
-#endif
-
-//
-// Things that don't work in clr mode:
-//
-#ifdef _M_CEE
-#ifndef BOOST_NO_CXX11_THREAD_LOCAL
-# define BOOST_NO_CXX11_THREAD_LOCAL
-#endif
-#ifndef BOOST_NO_SFINAE_EXPR
-# define BOOST_NO_SFINAE_EXPR
-#endif
-#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
-# define BOOST_NO_CXX11_REF_QUALIFIERS
-#endif
-#endif
-#ifdef _M_CEE_PURE
-#ifndef BOOST_NO_CXX11_CONSTEXPR
-# define BOOST_NO_CXX11_CONSTEXPR
-#endif
-#endif
-
-//
-// prefix and suffix headers:
-//
-#ifndef BOOST_ABI_PREFIX
-# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
-#endif
-#ifndef BOOST_ABI_SUFFIX
-# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
-#endif
-
-#ifndef BOOST_COMPILER
-// TODO:
-// these things are mostly bogus. 1200 means version 12.0 of the compiler. The
-// artificial versions assigned to them only refer to the versions of some IDE
-// these compilers have been shipped with, and even that is not all of it. Some
-// were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
-// IOW, you can't use these 'versions' in any sensible way. Sorry.
-# if defined(UNDER_CE)
-# if _MSC_VER < 1400
- // Note: I'm not aware of any CE compiler with version 13xx
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown EVC++ compiler version - please run the configure tests and report the results"
-# else
-# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
-# endif
-# elif _MSC_VER < 1500
-# define BOOST_COMPILER_VERSION evc8
-# elif _MSC_VER < 1600
-# define BOOST_COMPILER_VERSION evc9
-# elif _MSC_VER < 1700
-# define BOOST_COMPILER_VERSION evc10
-# elif _MSC_VER < 1800
-# define BOOST_COMPILER_VERSION evc11
-# elif _MSC_VER < 1900
-# define BOOST_COMPILER_VERSION evc12
-# elif _MSC_VER < 2000
-# define BOOST_COMPILER_VERSION evc14
-# else
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Unknown EVC++ compiler version - please run the configure tests and report the results"
-# else
-# pragma message("Unknown EVC++ compiler version - please run the configure tests and report the results")
-# endif
-# endif
-# else
-# if _MSC_VER < 1200
- // Note: Versions up to 7.0 aren't supported.
-# define BOOST_COMPILER_VERSION 5.0
-# elif _MSC_VER < 1300
-# define BOOST_COMPILER_VERSION 6.0
-# elif _MSC_VER < 1310
-# define BOOST_COMPILER_VERSION 7.0
-# elif _MSC_VER < 1400
-# define BOOST_COMPILER_VERSION 7.1
-# elif _MSC_VER < 1500
-# define BOOST_COMPILER_VERSION 8.0
-# elif _MSC_VER < 1600
-# define BOOST_COMPILER_VERSION 9.0
-# elif _MSC_VER < 1700
-# define BOOST_COMPILER_VERSION 10.0
-# elif _MSC_VER < 1800
-# define BOOST_COMPILER_VERSION 11.0
-# elif _MSC_VER < 1900
-# define BOOST_COMPILER_VERSION 12.0
-# elif _MSC_VER < 1910
-# define BOOST_COMPILER_VERSION 14.0
-# elif _MSC_VER < 1920
-# define BOOST_COMPILER_VERSION 14.1
-# else
-# define BOOST_COMPILER_VERSION _MSC_VER
-# endif
-# endif
-
-# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
-#endif
-
-#include <boost/config/pragma_message.hpp>
-
-//
-// last known and checked version is 19.12.25830.2 (VC++ 2017.3):
-#if (_MSC_VER > 1912)
-# if defined(BOOST_ASSERT_CONFIG)
-# error "Boost.Config is older than your current compiler version."
-# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
- //
- // Disabled as of March 2018 - the pace of VS releases is hard to keep up with
- // and in any case, we have relatively few defect macros defined now.
- // BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
-# endif
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/config/detail/select_compiler_config.hpp b/src/third_party/boost-1.68.0/boost/config/detail/select_compiler_config.hpp
deleted file mode 100644
index ced8443da9a..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/detail/select_compiler_config.hpp
+++ /dev/null
@@ -1,158 +0,0 @@
-// Boost compiler configuration selection header file
-
-// (C) Copyright John Maddock 2001 - 2003.
-// (C) Copyright Martin Wille 2003.
-// (C) Copyright Guillaume Melquiond 2003.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/ for most recent version.
-
-// locate which compiler we are using and define
-// BOOST_COMPILER_CONFIG as needed:
-
-#if defined __CUDACC__
-// NVIDIA CUDA C++ compiler for GPU
-# include "boost/config/compiler/nvcc.hpp"
-
-#endif
-
-#if defined(__GCCXML__)
-// GCC-XML emulates other compilers, it has to appear first here!
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
-
-#elif defined(_CRAYC)
-// EDG based Cray compiler:
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
-
-#elif defined __COMO__
-// Comeau C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
-
-#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
-// PathScale EKOPath compiler (has to come before clang and gcc)
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
-
-#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
-// Intel
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
-
-#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__)
-// when using clang and cuda at same time, you want to appear as gcc
-// Clang C++ emulates GCC, so it has to appear early.
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
-
-#elif defined __DMC__
-// Digital Mars C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
-
-#elif defined __DCC__
-// Wind River Diab C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/diab.hpp"
-
-#elif defined(__PGI)
-// Portland Group Inc.
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
-
-# elif defined(__GNUC__) && !defined(__ibmxl__)
-// GNU C++:
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
-
-#elif defined __KCC
-// Kai C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
-
-#elif defined __sgi
-// SGI MIPSpro C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
-
-#elif defined __DECCXX
-// Compaq Tru64 Unix cxx
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
-
-#elif defined __ghs
-// Greenhills C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
-
-#elif defined __CODEGEARC__
-// CodeGear - must be checked for before Borland
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
-
-#elif defined __BORLANDC__
-// Borland
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
-
-#elif defined __MWERKS__
-// Metrowerks CodeWarrior
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
-
-#elif defined __SUNPRO_CC
-// Sun Workshop Compiler C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
-
-#elif defined __HP_aCC
-// HP aCC
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
-
-#elif defined(__MRC__) || defined(__SC__)
-// MPW MrCpp or SCpp
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
-
-#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
-// IBM z/OS XL C/C++
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp_zos.hpp"
-
-#elif defined(__ibmxl__)
-// IBM XL C/C++ for Linux (Little Endian)
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp"
-
-#elif defined(__IBMCPP__)
-// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian)
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
-
-#elif defined _MSC_VER
-// Microsoft Visual C++
-//
-// Must remain the last #elif since some other vendors (Metrowerks, for
-// example) also #define _MSC_VER
-# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
-
-#elif defined (BOOST_ASSERT_CONFIG)
-// this must come last - generate an error if we don't
-// recognise the compiler:
-# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
-
-#endif
-
-#if 0
-//
-// This section allows dependency scanners to find all the headers we *might* include:
-//
-#include <boost/config/compiler/gcc_xml.hpp>
-#include <boost/config/compiler/cray.hpp>
-#include <boost/config/compiler/comeau.hpp>
-#include <boost/config/compiler/pathscale.hpp>
-#include <boost/config/compiler/intel.hpp>
-#include <boost/config/compiler/clang.hpp>
-#include <boost/config/compiler/digitalmars.hpp>
-#include <boost/config/compiler/gcc.hpp>
-#include <boost/config/compiler/kai.hpp>
-#include <boost/config/compiler/sgi_mipspro.hpp>
-#include <boost/config/compiler/compaq_cxx.hpp>
-#include <boost/config/compiler/greenhills.hpp>
-#include <boost/config/compiler/codegear.hpp>
-#include <boost/config/compiler/borland.hpp>
-#include <boost/config/compiler/metrowerks.hpp>
-#include <boost/config/compiler/sunpro_cc.hpp>
-#include <boost/config/compiler/hp_acc.hpp>
-#include <boost/config/compiler/mpw.hpp>
-#include <boost/config/compiler/xlcpp_zos.hpp>
-#include <boost/config/compiler/xlcpp.hpp>
-#include <boost/config/compiler/vacpp.hpp>
-#include <boost/config/compiler/pgi.hpp>
-#include <boost/config/compiler/visualc.hpp>
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/config/detail/suffix.hpp b/src/third_party/boost-1.68.0/boost/config/detail/suffix.hpp
deleted file mode 100644
index 22d31f68dbc..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/detail/suffix.hpp
+++ /dev/null
@@ -1,1036 +0,0 @@
-// Boost config.hpp configuration header file ------------------------------//
-// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file
-
-// Copyright (c) 2001-2003 John Maddock
-// Copyright (c) 2001 Darin Adler
-// Copyright (c) 2001 Peter Dimov
-// Copyright (c) 2002 Bill Kempf
-// Copyright (c) 2002 Jens Maurer
-// Copyright (c) 2002-2003 David Abrahams
-// Copyright (c) 2003 Gennaro Prota
-// Copyright (c) 2003 Eric Friedman
-// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/ for most recent version.
-
-// Boost config.hpp policy and rationale documentation has been moved to
-// http://www.boost.org/libs/config/
-//
-// This file is intended to be stable, and relatively unchanging.
-// It should contain boilerplate code only - no compiler specific
-// code unless it is unavoidable - no changes unless unavoidable.
-
-#ifndef BOOST_CONFIG_SUFFIX_HPP
-#define BOOST_CONFIG_SUFFIX_HPP
-
-#if defined(__GNUC__) && (__GNUC__ >= 4)
-//
-// Some GCC-4.x versions issue warnings even when __extension__ is used,
-// so use this as a workaround:
-//
-#pragma GCC system_header
-#endif
-
-//
-// ensure that visibility macros are always defined, thus symplifying use
-//
-#ifndef BOOST_SYMBOL_EXPORT
-# define BOOST_SYMBOL_EXPORT
-#endif
-#ifndef BOOST_SYMBOL_IMPORT
-# define BOOST_SYMBOL_IMPORT
-#endif
-#ifndef BOOST_SYMBOL_VISIBLE
-# define BOOST_SYMBOL_VISIBLE
-#endif
-
-//
-// look for long long by looking for the appropriate macros in <limits.h>.
-// Note that we use limits.h rather than climits for maximal portability,
-// remember that since these just declare a bunch of macros, there should be
-// no namespace issues from this.
-//
-#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \
- && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
-# include <limits.h>
-# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
-# define BOOST_HAS_LONG_LONG
-# else
-# define BOOST_NO_LONG_LONG
-# endif
-#endif
-
-// GCC 3.x will clean up all of those nasty macro definitions that
-// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
-// it under GCC 3.x.
-#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
-# undef BOOST_NO_CTYPE_FUNCTIONS
-#endif
-
-//
-// Assume any extensions are in namespace std:: unless stated otherwise:
-//
-# ifndef BOOST_STD_EXTENSION_NAMESPACE
-# define BOOST_STD_EXTENSION_NAMESPACE std
-# endif
-
-//
-// If cv-qualified specializations are not allowed, then neither are cv-void ones:
-//
-# if defined(BOOST_NO_CV_SPECIALIZATIONS) \
- && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
-# define BOOST_NO_CV_VOID_SPECIALIZATIONS
-# endif
-
-//
-// If there is no numeric_limits template, then it can't have any compile time
-// constants either!
-//
-# if defined(BOOST_NO_LIMITS) \
- && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
-# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
-# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
-# endif
-
-//
-// if there is no long long then there is no specialisation
-// for numeric_limits<long long> either:
-//
-#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
-# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
-#endif
-
-//
-// if there is no __int64 then there is no specialisation
-// for numeric_limits<__int64> either:
-//
-#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
-# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
-#endif
-
-//
-// if member templates are supported then so is the
-// VC6 subset of member templates:
-//
-# if !defined(BOOST_NO_MEMBER_TEMPLATES) \
- && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
-# define BOOST_MSVC6_MEMBER_TEMPLATES
-# endif
-
-//
-// Without partial specialization, can't test for partial specialisation bugs:
-//
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
-# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
-# endif
-
-//
-// Without partial specialization, we can't have array-type partial specialisations:
-//
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
-# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
-# endif
-
-//
-// Without partial specialization, std::iterator_traits can't work:
-//
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
-# define BOOST_NO_STD_ITERATOR_TRAITS
-# endif
-
-//
-// Without partial specialization, partial
-// specialization with default args won't work either:
-//
-# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
- && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
-# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
-# endif
-
-//
-// Without member template support, we can't have template constructors
-// in the standard library either:
-//
-# if defined(BOOST_NO_MEMBER_TEMPLATES) \
- && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
- && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
-# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
-# endif
-
-//
-// Without member template support, we can't have a conforming
-// std::allocator template either:
-//
-# if defined(BOOST_NO_MEMBER_TEMPLATES) \
- && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
- && !defined(BOOST_NO_STD_ALLOCATOR)
-# define BOOST_NO_STD_ALLOCATOR
-# endif
-
-//
-// without ADL support then using declarations will break ADL as well:
-//
-#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
-# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
-#endif
-
-//
-// Without typeid support we have no dynamic RTTI either:
-//
-#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
-# define BOOST_NO_RTTI
-#endif
-
-//
-// If we have a standard allocator, then we have a partial one as well:
-//
-#if !defined(BOOST_NO_STD_ALLOCATOR)
-# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
-#endif
-
-//
-// We can't have a working std::use_facet if there is no std::locale:
-//
-# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
-# define BOOST_NO_STD_USE_FACET
-# endif
-
-//
-// We can't have a std::messages facet if there is no std::locale:
-//
-# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
-# define BOOST_NO_STD_MESSAGES
-# endif
-
-//
-// We can't have a working std::wstreambuf if there is no std::locale:
-//
-# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
-# define BOOST_NO_STD_WSTREAMBUF
-# endif
-
-//
-// We can't have a <cwctype> if there is no <cwchar>:
-//
-# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
-# define BOOST_NO_CWCTYPE
-# endif
-
-//
-// We can't have a swprintf if there is no <cwchar>:
-//
-# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
-# define BOOST_NO_SWPRINTF
-# endif
-
-//
-// If Win32 support is turned off, then we must turn off
-// threading support also, unless there is some other
-// thread API enabled:
-//
-#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
- && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
-# define BOOST_DISABLE_THREADS
-#endif
-
-//
-// Turn on threading support if the compiler thinks that it's in
-// multithreaded mode. We put this here because there are only a
-// limited number of macros that identify this (if there's any missing
-// from here then add to the appropriate compiler section):
-//
-#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
- || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
- && !defined(BOOST_HAS_THREADS)
-# define BOOST_HAS_THREADS
-#endif
-
-//
-// Turn threading support off if BOOST_DISABLE_THREADS is defined:
-//
-#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
-# undef BOOST_HAS_THREADS
-#endif
-
-//
-// Turn threading support off if we don't recognise the threading API:
-//
-#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
- && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
- && !defined(BOOST_HAS_MPTASKS)
-# undef BOOST_HAS_THREADS
-#endif
-
-//
-// Turn threading detail macros off if we don't (want to) use threading
-//
-#ifndef BOOST_HAS_THREADS
-# undef BOOST_HAS_PTHREADS
-# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
-# undef BOOST_HAS_PTHREAD_YIELD
-# undef BOOST_HAS_PTHREAD_DELAY_NP
-# undef BOOST_HAS_WINTHREADS
-# undef BOOST_HAS_BETHREADS
-# undef BOOST_HAS_MPTASKS
-#endif
-
-//
-// If the compiler claims to be C99 conformant, then it had better
-// have a <stdint.h>:
-//
-# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
-# define BOOST_HAS_STDINT_H
-# ifndef BOOST_HAS_LOG1P
-# define BOOST_HAS_LOG1P
-# endif
-# ifndef BOOST_HAS_EXPM1
-# define BOOST_HAS_EXPM1
-# endif
-# endif
-
-//
-// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
-// Note that this is for backwards compatibility only.
-//
-# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
-# define BOOST_NO_SLIST
-# endif
-
-# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
-# define BOOST_NO_HASH
-# endif
-
-//
-// Set BOOST_SLIST_HEADER if not set already:
-//
-#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
-# define BOOST_SLIST_HEADER <slist>
-#endif
-
-//
-// Set BOOST_HASH_SET_HEADER if not set already:
-//
-#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
-# define BOOST_HASH_SET_HEADER <hash_set>
-#endif
-
-//
-// Set BOOST_HASH_MAP_HEADER if not set already:
-//
-#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
-# define BOOST_HASH_MAP_HEADER <hash_map>
-#endif
-
-// BOOST_HAS_ABI_HEADERS
-// This macro gets set if we have headers that fix the ABI,
-// and prevent ODR violations when linking to external libraries:
-#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
-# define BOOST_HAS_ABI_HEADERS
-#endif
-
-#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
-# undef BOOST_HAS_ABI_HEADERS
-#endif
-
-// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
-// Because std::size_t usage is so common, even in boost headers which do not
-// otherwise use the C library, the <cstddef> workaround is included here so
-// that ugly workaround code need not appear in many other boost headers.
-// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
-// must still be #included in the usual places so that <cstddef> inclusion
-// works as expected with standard conforming compilers. The resulting
-// double inclusion of <cstddef> is harmless.
-
-# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
-# include <cstddef>
- namespace std { using ::ptrdiff_t; using ::size_t; }
-# endif
-
-// Workaround for the unfortunate min/max macros defined by some platform headers
-
-#define BOOST_PREVENT_MACRO_SUBSTITUTION
-
-#ifndef BOOST_USING_STD_MIN
-# define BOOST_USING_STD_MIN() using std::min
-#endif
-
-#ifndef BOOST_USING_STD_MAX
-# define BOOST_USING_STD_MAX() using std::max
-#endif
-
-// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
-
-# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)
-
-namespace std {
- template <class _Tp>
- inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
- return __b < __a ? __b : __a;
- }
- template <class _Tp>
- inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
- return __a < __b ? __b : __a;
- }
-}
-
-# endif
-
-// BOOST_STATIC_CONSTANT workaround --------------------------------------- //
-// On compilers which don't allow in-class initialization of static integral
-// constant members, we must use enums as a workaround if we want the constants
-// to be available at compile-time. This macro gives us a convenient way to
-// declare such constants.
-
-# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
-# else
-# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
-# endif
-
-// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
-// When the standard library does not have a conforming std::use_facet there
-// are various workarounds available, but they differ from library to library.
-// The same problem occurs with has_facet.
-// These macros provide a consistent way to access a locale's facets.
-// Usage:
-// replace
-// std::use_facet<Type>(loc);
-// with
-// BOOST_USE_FACET(Type, loc);
-// Note do not add a std:: prefix to the front of BOOST_USE_FACET!
-// Use for BOOST_HAS_FACET is analogous.
-
-#if defined(BOOST_NO_STD_USE_FACET)
-# ifdef BOOST_HAS_TWO_ARG_USE_FACET
-# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
-# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
-# elif defined(BOOST_HAS_MACRO_USE_FACET)
-# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
-# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
-# elif defined(BOOST_HAS_STLP_USE_FACET)
-# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
-# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
-# endif
-#else
-# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
-# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
-#endif
-
-// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
-// Member templates are supported by some compilers even though they can't use
-// the A::template member<U> syntax, as a workaround replace:
-//
-// typedef typename A::template rebind<U> binder;
-//
-// with:
-//
-// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
-
-#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
-# define BOOST_NESTED_TEMPLATE template
-#else
-# define BOOST_NESTED_TEMPLATE
-#endif
-
-// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
-// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
-// is defined, in which case it evaluates to return x; Use when you have a return
-// statement that can never be reached.
-
-#ifndef BOOST_UNREACHABLE_RETURN
-# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
-# define BOOST_UNREACHABLE_RETURN(x) return x;
-# else
-# define BOOST_UNREACHABLE_RETURN(x)
-# endif
-#endif
-
-// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
-//
-// Some compilers don't support the use of `typename' for dependent
-// types in deduced contexts, e.g.
-//
-// template <class T> void f(T, typename T::type);
-// ^^^^^^^^
-// Replace these declarations with:
-//
-// template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
-
-#ifndef BOOST_NO_DEDUCED_TYPENAME
-# define BOOST_DEDUCED_TYPENAME typename
-#else
-# define BOOST_DEDUCED_TYPENAME
-#endif
-
-#ifndef BOOST_NO_TYPENAME_WITH_CTOR
-# define BOOST_CTOR_TYPENAME typename
-#else
-# define BOOST_CTOR_TYPENAME
-#endif
-
-// long long workaround ------------------------------------------//
-// On gcc (and maybe other compilers?) long long is alway supported
-// but it's use may generate either warnings (with -ansi), or errors
-// (with -pedantic -ansi) unless it's use is prefixed by __extension__
-//
-#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
-namespace boost{
-# ifdef __GNUC__
- __extension__ typedef long long long_long_type;
- __extension__ typedef unsigned long long ulong_long_type;
-# else
- typedef long long long_long_type;
- typedef unsigned long long ulong_long_type;
-# endif
-}
-#endif
-// same again for __int128:
-#if defined(BOOST_HAS_INT128) && defined(__cplusplus)
-namespace boost{
-# ifdef __GNUC__
- __extension__ typedef __int128 int128_type;
- __extension__ typedef unsigned __int128 uint128_type;
-# else
- typedef __int128 int128_type;
- typedef unsigned __int128 uint128_type;
-# endif
-}
-#endif
-// same again for __float128:
-#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus)
-namespace boost {
-# ifdef __GNUC__
- __extension__ typedef __float128 float128_type;
-# else
- typedef __float128 float128_type;
-# endif
-}
-#endif
-
-// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
-
-// These macros are obsolete. Port away and remove.
-
-# define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
-# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
-
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
-# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
-
-// When BOOST_NO_STD_TYPEINFO is defined, we can just import
-// the global definition into std namespace:
-#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
-#include <typeinfo>
-namespace std{ using ::type_info; }
-#endif
-
-// ---------------------------------------------------------------------------//
-
-// Helper macro BOOST_STRINGIZE:
-// Helper macro BOOST_JOIN:
-
-#include <boost/config/helper_macros.hpp>
-
-//
-// Set some default values for compiler/library/platform names.
-// These are for debugging config setup only:
-//
-# ifndef BOOST_COMPILER
-# define BOOST_COMPILER "Unknown ISO C++ Compiler"
-# endif
-# ifndef BOOST_STDLIB
-# define BOOST_STDLIB "Unknown ISO standard library"
-# endif
-# ifndef BOOST_PLATFORM
-# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
- || defined(_POSIX_SOURCE)
-# define BOOST_PLATFORM "Generic Unix"
-# else
-# define BOOST_PLATFORM "Unknown"
-# endif
-# endif
-
-//
-// Set some default values GPU support
-//
-# ifndef BOOST_GPU_ENABLED
-# define BOOST_GPU_ENABLED
-# endif
-
-// BOOST_RESTRICT ---------------------------------------------//
-// Macro to use in place of 'restrict' keyword variants
-#if !defined(BOOST_RESTRICT)
-# if defined(_MSC_VER)
-# define BOOST_RESTRICT __restrict
-# if !defined(BOOST_NO_RESTRICT_REFERENCES) && (_MSC_FULL_VER < 190023026)
-# define BOOST_NO_RESTRICT_REFERENCES
-# endif
-# elif defined(__GNUC__) && __GNUC__ > 3
- // Clang also defines __GNUC__ (as 4)
-# define BOOST_RESTRICT __restrict__
-# else
-# define BOOST_RESTRICT
-# if !defined(BOOST_NO_RESTRICT_REFERENCES)
-# define BOOST_NO_RESTRICT_REFERENCES
-# endif
-# endif
-#endif
-
-// BOOST_MAY_ALIAS -----------------------------------------------//
-// The macro expands to an attribute to mark a type that is allowed to alias other types.
-// The macro is defined in the compiler-specific headers.
-#if !defined(BOOST_MAY_ALIAS)
-# define BOOST_NO_MAY_ALIAS
-# define BOOST_MAY_ALIAS
-#endif
-
-// BOOST_FORCEINLINE ---------------------------------------------//
-// Macro to use in place of 'inline' to force a function to be inline
-#if !defined(BOOST_FORCEINLINE)
-# if defined(_MSC_VER)
-# define BOOST_FORCEINLINE __forceinline
-# elif defined(__GNUC__) && __GNUC__ > 3
- // Clang also defines __GNUC__ (as 4)
-# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__))
-# else
-# define BOOST_FORCEINLINE inline
-# endif
-#endif
-
-// BOOST_NOINLINE ---------------------------------------------//
-// Macro to use in place of 'inline' to prevent a function to be inlined
-#if !defined(BOOST_NOINLINE)
-# if defined(_MSC_VER)
-# define BOOST_NOINLINE __declspec(noinline)
-# elif defined(__GNUC__) && __GNUC__ > 3
- // Clang also defines __GNUC__ (as 4)
-# if defined(__CUDACC__)
- // nvcc doesn't always parse __noinline__,
- // see: https://svn.boost.org/trac/boost/ticket/9392
-# define BOOST_NOINLINE __attribute__ ((noinline))
-# else
-# define BOOST_NOINLINE __attribute__ ((__noinline__))
-# endif
-# else
-# define BOOST_NOINLINE
-# endif
-#endif
-
-// BOOST_NORETURN ---------------------------------------------//
-// Macro to use before a function declaration/definition to designate
-// the function as not returning normally (i.e. with a return statement
-// or by leaving the function scope, if the function return type is void).
-#if !defined(BOOST_NORETURN)
-# if defined(_MSC_VER)
-# define BOOST_NORETURN __declspec(noreturn)
-# elif defined(__GNUC__)
-# define BOOST_NORETURN __attribute__ ((__noreturn__))
-# elif defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130)
-# if __has_attribute(noreturn)
-# define BOOST_NORETURN [[noreturn]]
-# endif
-# elif defined(__has_cpp_attribute)
-# if __has_cpp_attribute(noreturn)
-# define BOOST_NORETURN [[noreturn]]
-# endif
-# endif
-#endif
-
-#if !defined(BOOST_NORETURN)
-# define BOOST_NO_NORETURN
-# define BOOST_NORETURN
-#endif
-
-// Branch prediction hints
-// These macros are intended to wrap conditional expressions that yield true or false
-//
-// if (BOOST_LIKELY(var == 10))
-// {
-// // the most probable code here
-// }
-//
-#if !defined(BOOST_LIKELY)
-# define BOOST_LIKELY(x) x
-#endif
-#if !defined(BOOST_UNLIKELY)
-# define BOOST_UNLIKELY(x) x
-#endif
-
-// Type and data alignment specification
-//
-#if !defined(BOOST_ALIGNMENT)
-# if !defined(BOOST_NO_CXX11_ALIGNAS)
-# define BOOST_ALIGNMENT(x) alignas(x)
-# elif defined(_MSC_VER)
-# define BOOST_ALIGNMENT(x) __declspec(align(x))
-# elif defined(__GNUC__)
-# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x)))
-# else
-# define BOOST_NO_ALIGNMENT
-# define BOOST_ALIGNMENT(x)
-# endif
-#endif
-
-// Lack of non-public defaulted functions is implied by the lack of any defaulted functions
-#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
-# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
-#endif
-
-// Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions
-#if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
-# define BOOST_NO_CXX11_DEFAULTED_MOVES
-#endif
-
-// Defaulted and deleted function declaration helpers
-// These macros are intended to be inside a class definition.
-// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its
-// body, which will be used if the compiler doesn't support defaulted functions.
-// BOOST_DELETED_FUNCTION only accepts the function declaration. It
-// will expand to a private function declaration, if the compiler doesn't support
-// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION
-// in the end of the class definition.
-//
-// class my_class
-// {
-// public:
-// // Default-constructible
-// BOOST_DEFAULTED_FUNCTION(my_class(), {})
-// // Copying prohibited
-// BOOST_DELETED_FUNCTION(my_class(my_class const&))
-// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&))
-// };
-//
-#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS))
-# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default;
-#else
-# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body
-#endif
-
-#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
-# define BOOST_DELETED_FUNCTION(fun) fun = delete;
-#else
-# define BOOST_DELETED_FUNCTION(fun) private: fun;
-#endif
-
-//
-// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
-//
-#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
-#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
-#endif
-
-// -------------------- Deprecated macros for 1.50 ---------------------------
-// These will go away in a future release
-
-// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
-// instead of BOOST_NO_STD_UNORDERED
-#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
-# ifndef BOOST_NO_CXX11_STD_UNORDERED
-# define BOOST_NO_CXX11_STD_UNORDERED
-# endif
-#endif
-
-// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
-#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
-# define BOOST_NO_INITIALIZER_LISTS
-#endif
-
-// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
-#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY)
-# define BOOST_NO_0X_HDR_ARRAY
-#endif
-// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
-#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
-# define BOOST_NO_0X_HDR_CHRONO
-#endif
-// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
-#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
-# define BOOST_NO_0X_HDR_CODECVT
-#endif
-// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
-# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
-#endif
-// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
-#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
-# define BOOST_NO_0X_HDR_FORWARD_LIST
-#endif
-// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
-#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
-# define BOOST_NO_0X_HDR_FUTURE
-#endif
-
-// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
-#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
-# define BOOST_NO_0X_HDR_INITIALIZER_LIST
-# endif
-# ifndef BOOST_NO_INITIALIZER_LISTS
-# define BOOST_NO_INITIALIZER_LISTS
-# endif
-#endif
-
-// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
-#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
-# define BOOST_NO_0X_HDR_MUTEX
-#endif
-// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
-#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
-# define BOOST_NO_0X_HDR_RANDOM
-#endif
-// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
-#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
-# define BOOST_NO_0X_HDR_RATIO
-#endif
-// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
-#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
-# define BOOST_NO_0X_HDR_REGEX
-#endif
-// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
-#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
-# define BOOST_NO_0X_HDR_SYSTEM_ERROR
-#endif
-// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
-#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
-# define BOOST_NO_0X_HDR_THREAD
-#endif
-// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
-#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
-# define BOOST_NO_0X_HDR_TUPLE
-#endif
-// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
-#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
-# define BOOST_NO_0X_HDR_TYPE_TRAITS
-#endif
-// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
-#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
-# define BOOST_NO_0X_HDR_TYPEINDEX
-#endif
-// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
-#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
-# define BOOST_NO_0X_HDR_UNORDERED_MAP
-#endif
-// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
-#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
-# define BOOST_NO_0X_HDR_UNORDERED_SET
-#endif
-
-// ------------------ End of deprecated macros for 1.50 ---------------------------
-
-// -------------------- Deprecated macros for 1.51 ---------------------------
-// These will go away in a future release
-
-// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS
-#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
-# define BOOST_NO_AUTO_DECLARATIONS
-#endif
-// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS
-#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
-# define BOOST_NO_AUTO_MULTIDECLARATIONS
-#endif
-// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T
-#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
-# define BOOST_NO_CHAR16_T
-#endif
-// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T
-#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
-# define BOOST_NO_CHAR32_T
-#endif
-// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES
-#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
-# define BOOST_NO_TEMPLATE_ALIASES
-#endif
-// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR
-#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
-# define BOOST_NO_CONSTEXPR
-#endif
-// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276
-#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
-# define BOOST_NO_DECLTYPE_N3276
-#endif
-// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE
-#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
-# define BOOST_NO_DECLTYPE
-#endif
-// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS
-#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
-# define BOOST_NO_DEFAULTED_FUNCTIONS
-#endif
-// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS
-#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
-# define BOOST_NO_DELETED_FUNCTIONS
-#endif
-// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
-# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
-#endif
-// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE
-#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
-# define BOOST_NO_EXTERN_TEMPLATE
-#endif
-// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
-# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
-#endif
-// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS
-#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
-# define BOOST_NO_LAMBDAS
-#endif
-// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
-# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
-#endif
-// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT
-#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
-# define BOOST_NO_NOEXCEPT
-#endif
-// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR
-#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
-# define BOOST_NO_NULLPTR
-#endif
-// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS
-#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
-# define BOOST_NO_RAW_LITERALS
-#endif
-// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
-# define BOOST_NO_RVALUE_REFERENCES
-#endif
-// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS
-#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
-# define BOOST_NO_SCOPED_ENUMS
-#endif
-// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT
-#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
-# define BOOST_NO_STATIC_ASSERT
-#endif
-// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED
-#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED)
-# define BOOST_NO_STD_UNORDERED
-#endif
-// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS
-#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
-# define BOOST_NO_UNICODE_LITERALS
-#endif
-// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
-#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
-# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
-#endif
-// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
-# define BOOST_NO_VARIADIC_TEMPLATES
-#endif
-// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS
-#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
-# define BOOST_NO_VARIADIC_MACROS
-#endif
-// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST
-#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
-# define BOOST_NO_NUMERIC_LIMITS_LOWEST
-#endif
-// ------------------ End of deprecated macros for 1.51 ---------------------------
-
-
-
-//
-// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
-// These aid the transition to C++11 while still supporting C++03 compilers
-//
-#ifdef BOOST_NO_CXX11_NOEXCEPT
-# define BOOST_NOEXCEPT
-# define BOOST_NOEXCEPT_OR_NOTHROW throw()
-# define BOOST_NOEXCEPT_IF(Predicate)
-# define BOOST_NOEXCEPT_EXPR(Expression) false
-#else
-# define BOOST_NOEXCEPT noexcept
-# define BOOST_NOEXCEPT_OR_NOTHROW noexcept
-# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
-# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
-#endif
-//
-// Helper macro BOOST_FALLTHROUGH
-// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended
-// fall-through between case labels in a switch statement. We use a definition
-// that requires a semicolon after it to avoid at least one type of misuse even
-// on unsupported compilers.
-//
-#ifndef BOOST_FALLTHROUGH
-# define BOOST_FALLTHROUGH ((void)0)
-#endif
-
-//
-// constexpr workarounds
-//
-#if defined(BOOST_NO_CXX11_CONSTEXPR)
-#define BOOST_CONSTEXPR
-#define BOOST_CONSTEXPR_OR_CONST const
-#else
-#define BOOST_CONSTEXPR constexpr
-#define BOOST_CONSTEXPR_OR_CONST constexpr
-#endif
-#if defined(BOOST_NO_CXX14_CONSTEXPR)
-#define BOOST_CXX14_CONSTEXPR
-#else
-#define BOOST_CXX14_CONSTEXPR constexpr
-#endif
-
-//
-// Unused variable/typedef workarounds:
-//
-#ifndef BOOST_ATTRIBUTE_UNUSED
-# define BOOST_ATTRIBUTE_UNUSED
-#endif
-
-#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
-
-//
-// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
-//
-#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
-# define BOOST_HAS_STATIC_ASSERT
-#endif
-
-//
-// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined
-//
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
-#define BOOST_HAS_RVALUE_REFS
-#endif
-
-//
-// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined
-//
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
-#define BOOST_HAS_VARIADIC_TMPL
-#endif
-//
-// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when
-// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set:
-//
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS)
-# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
-#endif
-
-//
-// Finish off with checks for macros that are depricated / no longer supported,
-// if any of these are set then it's very likely that much of Boost will no
-// longer work. So stop with a #error for now, but give the user a chance
-// to continue at their own risk if they really want to:
-//
-#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED)
-# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!"
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/libcpp.hpp b/src/third_party/boost-1.68.0/boost/config/stdlib/libcpp.hpp
deleted file mode 100644
index a051dbb7502..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/libcpp.hpp
+++ /dev/null
@@ -1,131 +0,0 @@
-// (C) Copyright Christopher Jefferson 2011.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// config for libc++
-// Might need more in here later.
-
-#if !defined(_LIBCPP_VERSION)
-# include <ciso646>
-# if !defined(_LIBCPP_VERSION)
-# error "This is not libc++!"
-# endif
-#endif
-
-#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION)
-
-#define BOOST_HAS_THREADS
-
-#ifdef _LIBCPP_HAS_NO_VARIADICS
-# define BOOST_NO_CXX11_HDR_TUPLE
-#endif
-
-// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11
-// allocator model. The C++11 allocator model requires a conforming
-// std::allocator_traits which is only possible with C++11 template
-// aliases since members rebind_alloc and rebind_traits require it.
-#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
-# define BOOST_NO_CXX11_ALLOCATOR
-# define BOOST_NO_CXX11_POINTER_TRAITS
-#endif
-
-#if __cplusplus < 201103
-//
-// These two appear to be somewhat useable in C++03 mode, there may be others...
-//
-//# define BOOST_NO_CXX11_HDR_ARRAY
-//# define BOOST_NO_CXX11_HDR_FORWARD_LIST
-
-# define BOOST_NO_CXX11_HDR_CODECVT
-# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
-# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-# define BOOST_NO_CXX11_HDR_MUTEX
-# define BOOST_NO_CXX11_HDR_RANDOM
-# define BOOST_NO_CXX11_HDR_RATIO
-# define BOOST_NO_CXX11_HDR_REGEX
-# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
-# define BOOST_NO_CXX11_HDR_THREAD
-# define BOOST_NO_CXX11_HDR_TUPLE
-# define BOOST_NO_CXX11_HDR_TYPEINDEX
-# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
-# define BOOST_NO_CXX11_HDR_UNORDERED_SET
-# define BOOST_NO_CXX11_NUMERIC_LIMITS
-# define BOOST_NO_CXX11_ALLOCATOR
-# define BOOST_NO_CXX11_POINTER_TRAITS
-# define BOOST_NO_CXX11_SMART_PTR
-# define BOOST_NO_CXX11_HDR_FUNCTIONAL
-# define BOOST_NO_CXX11_STD_ALIGN
-# define BOOST_NO_CXX11_ADDRESSOF
-# define BOOST_NO_CXX11_HDR_ATOMIC
-# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
-# define BOOST_NO_CXX11_HDR_CHRONO
-# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
-# define BOOST_NO_CXX11_HDR_FUTURE
-#elif _LIBCPP_VERSION < 3700
-//
-// These appear to be unusable/incomplete so far:
-//
-# define BOOST_NO_CXX11_HDR_ATOMIC
-# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
-# define BOOST_NO_CXX11_HDR_CHRONO
-# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
-# define BOOST_NO_CXX11_HDR_FUTURE
-#endif
-
-
-#if _LIBCPP_VERSION < 3700
-// libc++ uses a non-standard messages_base
-#define BOOST_NO_STD_MESSAGES
-#endif
-
-// C++14 features
-#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
-# define BOOST_NO_CXX14_STD_EXCHANGE
-#endif
-
-// C++17 features
-#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
-# define BOOST_NO_CXX17_STD_APPLY
-#endif
-#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
-# define BOOST_NO_AUTO_PTR
-#endif
-#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE)
-# define BOOST_NO_CXX98_RANDOM_SHUFFLE
-#endif
-#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
-# define BOOST_NO_CXX98_BINDERS
-#endif
-
-#define BOOST_NO_CXX17_ITERATOR_TRAITS
-#define BOOST_NO_CXX17_STD_INVOKE // Invoke support is incomplete (no invoke_result)
-
-#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
-// This is a bit of a sledgehammer, because really it's just libc++abi that has no
-// support for thread_local, leading to linker errors such as
-// "undefined reference to `__cxa_thread_atexit'". It is fixed in the
-// most recent releases of libc++abi though...
-# define BOOST_NO_CXX11_THREAD_LOCAL
-#endif
-
-#if defined(__linux__) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
-// After libc++-dev is installed on Trusty, clang++-libc++ almost works,
-// except uses of `thread_local` fail with undefined reference to
-// `__cxa_thread_atexit`.
-# define BOOST_NO_CXX11_THREAD_LOCAL
-#endif
-
-#if defined(__has_include)
-#if !__has_include(<shared_mutex>)
-# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#elif __cplusplus <= 201103
-# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#endif
-#elif __cplusplus < 201402
-# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#endif
-
-// --- end ---
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/libstdcpp3.hpp b/src/third_party/boost-1.68.0/boost/config/stdlib/libstdcpp3.hpp
deleted file mode 100644
index f6eab26c652..00000000000
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/libstdcpp3.hpp
+++ /dev/null
@@ -1,347 +0,0 @@
-// (C) Copyright John Maddock 2001.
-// (C) Copyright Jens Maurer 2001.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for most recent version.
-
-// config for libstdc++ v3
-// not much to go in here:
-
-#define BOOST_GNU_STDLIB 1
-
-#ifdef __GLIBCXX__
-#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
-#else
-#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
-#endif
-
-#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
-# define BOOST_NO_CWCHAR
-# define BOOST_NO_CWCTYPE
-# define BOOST_NO_STD_WSTRING
-# define BOOST_NO_STD_WSTREAMBUF
-#endif
-
-#if defined(__osf__) && !defined(_REENTRANT) \
- && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) )
-// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header
-// file is included, therefore for consistency we define it here as well.
-# define _REENTRANT
-#endif
-
-#ifdef __GLIBCXX__ // gcc 3.4 and greater:
-# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
- || defined(_GLIBCXX__PTHREADS) \
- || defined(_GLIBCXX_HAS_GTHREADS) \
- || defined(_WIN32) \
- || defined(_AIX) \
- || defined(__HAIKU__)
- //
- // If the std lib has thread support turned on, then turn it on in Boost
- // as well. We do this because some gcc-3.4 std lib headers define _REENTANT
- // while others do not...
- //
-# define BOOST_HAS_THREADS
-# else
-# define BOOST_DISABLE_THREADS
-# endif
-#elif defined(__GLIBCPP__) \
- && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \
- && !defined(_GLIBCPP__PTHREADS)
- // disable thread support if the std lib was built single threaded:
-# define BOOST_DISABLE_THREADS
-#endif
-
-#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
-// linux on arm apparently doesn't define _REENTRANT
-// so just turn on threading support whenever the std lib is thread safe:
-# define BOOST_HAS_THREADS
-#endif
-
-#if !defined(_GLIBCPP_USE_LONG_LONG) \
- && !defined(_GLIBCXX_USE_LONG_LONG)\
- && defined(BOOST_HAS_LONG_LONG)
-// May have been set by compiler/*.hpp, but "long long" without library
-// support is useless.
-# undef BOOST_HAS_LONG_LONG
-#endif
-
-// Apple doesn't seem to reliably defined a *unix* macro
-#if !defined(CYGWIN) && ( defined(__unix__) \
- || defined(__unix) \
- || defined(unix) \
- || defined(__APPLE__) \
- || defined(__APPLE) \
- || defined(APPLE))
-# include <unistd.h>
-#endif
-
-#ifndef __VXWORKS__ // VxWorks uses Dinkum, not GNU STL with GCC
-#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
-# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
-# define BOOST_HAS_SLIST
-# define BOOST_HAS_HASH
-# define BOOST_SLIST_HEADER <ext/slist>
-# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
-# define BOOST_HASH_SET_HEADER <ext/hash_set>
-# define BOOST_HASH_MAP_HEADER <ext/hash_map>
-# else
-# define BOOST_HASH_SET_HEADER <backward/hash_set>
-# define BOOST_HASH_MAP_HEADER <backward/hash_map>
-# endif
-#endif
-#endif
-
-//
-// Decide whether we have C++11 support turned on:
-//
-#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103)
-# define BOOST_LIBSTDCXX11
-#endif
-
-//
-// Decide which version of libstdc++ we have, normally
-// libstdc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly
-// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the libstdc++
-// developers. He also commented:
-//
-// "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in
-// GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305.
-// Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support
-// than any release in the 4.2 series."
-//
-// Another resource for understanding libstdc++ features is:
-// http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x
-//
-// However, using the GCC version number fails when the compiler is clang since this
-// only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473
-// for a long discussion on this issue. What we can do though is use clang's __has_include
-// to detect the presence of a C++11 header that was introduced with a specific GCC release.
-// We still have to be careful though as many such headers were buggy and/or incomplete when
-// first introduced, so we only check for headers that were fully featured from day 1, and then
-// use that to infer the underlying GCC version:
-//
-#ifdef __clang__
-
-#if __has_include(<experimental/memory_resource>)
-# define BOOST_LIBSTDCXX_VERSION 60100
-#elif __has_include(<experimental/any>)
-# define BOOST_LIBSTDCXX_VERSION 50100
-#elif __has_include(<shared_mutex>)
-# define BOOST_LIBSTDCXX_VERSION 40900
-#elif __has_include(<ext/cmath>)
-# define BOOST_LIBSTDCXX_VERSION 40800
-#elif __has_include(<scoped_allocator>)
-# define BOOST_LIBSTDCXX_VERSION 40700
-#elif __has_include(<typeindex>)
-# define BOOST_LIBSTDCXX_VERSION 40600
-#elif __has_include(<future>)
-# define BOOST_LIBSTDCXX_VERSION 40500
-#elif __has_include(<ratio>)
-# define BOOST_LIBSTDCXX_VERSION 40400
-#elif __has_include(<array>)
-# define BOOST_LIBSTDCXX_VERSION 40300
-#endif
-
-#if (BOOST_LIBSTDCXX_VERSION < 50100)
-// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it,
-// defining it here is a terrible cludge, but should get things working:
-extern "C" char *gets (char *__s);
-#endif
-//
-// clang is unable to parse some GCC headers, add those workarounds here:
-//
-#if BOOST_LIBSTDCXX_VERSION < 50000
-# define BOOST_NO_CXX11_HDR_REGEX
-#endif
-//
-// GCC 4.7.x has no __cxa_thread_atexit which
-// thread_local objects require for cleanup:
-//
-#if BOOST_LIBSTDCXX_VERSION < 40800
-# define BOOST_NO_CXX11_THREAD_LOCAL
-#endif
-//
-// Early clang versions can handle <chrono>, not exactly sure which versions
-// but certainly up to clang-3.8 and gcc-4.6:
-//
-#if (__clang_major__ < 5)
-# if BOOST_LIBSTDCXX_VERSION < 40800
-# define BOOST_NO_CXX11_HDR_FUTURE
-# define BOOST_NO_CXX11_HDR_MUTEX
-# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
-# define BOOST_NO_CXX11_HDR_CHRONO
-# endif
-#endif
-
-//
-// GCC 4.8 and 9 add working versions of <atomic> and <regex> respectively.
-// However, we have no test for these as the headers were present but broken
-// in early GCC versions.
-//
-#endif
-
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L)
-//
-// Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't
-// set __GNUC__
-//
-#if __SUNPRO_CC >= 0x5140
-#define BOOST_LIBSTDCXX_VERSION 50100
-#else
-#define BOOST_LIBSTDCXX_VERSION 40800
-#endif
-#endif
-
-#if !defined(BOOST_LIBSTDCXX_VERSION)
-# define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
-#endif
-
-// std::auto_ptr isn't provided with _GLIBCXX_DEPRECATED=0 (GCC 4.5 and earlier)
-// or _GLIBCXX_USE_DEPRECATED=0 (GCC 4.6 and later).
-#if defined(BOOST_LIBSTDCXX11)
-# if BOOST_LIBSTDCXX_VERSION < 40600
-# if !_GLIBCXX_DEPRECATED
-# define BOOST_NO_AUTO_PTR
-# endif
-# elif !_GLIBCXX_USE_DEPRECATED
-# define BOOST_NO_AUTO_PTR
-# endif
-#endif
-
-// C++0x headers in GCC 4.3.0 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11)
-# define BOOST_NO_CXX11_HDR_ARRAY
-# define BOOST_NO_CXX11_HDR_TUPLE
-# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
-# define BOOST_NO_CXX11_HDR_UNORDERED_SET
-# define BOOST_NO_CXX11_HDR_FUNCTIONAL
-#endif
-
-// C++0x headers in GCC 4.4.0 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11)
-# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
-# define BOOST_NO_CXX11_HDR_FORWARD_LIST
-# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
-# define BOOST_NO_CXX11_HDR_MUTEX
-# define BOOST_NO_CXX11_HDR_RATIO
-# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
-# define BOOST_NO_CXX11_SMART_PTR
-#else
-# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
-# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
-#endif
-
-// C++0x features in GCC 4.5.0 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11)
-# define BOOST_NO_CXX11_NUMERIC_LIMITS
-# define BOOST_NO_CXX11_HDR_FUTURE
-# define BOOST_NO_CXX11_HDR_RANDOM
-#endif
-
-// C++0x features in GCC 4.6.0 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11)
-# define BOOST_NO_CXX11_HDR_TYPEINDEX
-# define BOOST_NO_CXX11_ADDRESSOF
-# define BOOST_NO_CXX17_ITERATOR_TRAITS
-#endif
-
-// C++0x features in GCC 4.7.0 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11)
-// Note that although <chrono> existed prior to 4.7, "steady_clock" is spelled "monotonic_clock"
-// so 4.7.0 is the first truly conforming one.
-# define BOOST_NO_CXX11_HDR_CHRONO
-# define BOOST_NO_CXX11_ALLOCATOR
-# define BOOST_NO_CXX11_POINTER_TRAITS
-#endif
-// C++0x features in GCC 4.8.0 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11)
-// Note that although <atomic> existed prior to gcc 4.8 it was largely unimplemented for many types:
-# define BOOST_NO_CXX11_HDR_ATOMIC
-# define BOOST_NO_CXX11_HDR_THREAD
-#endif
-// C++0x features in GCC 4.9.0 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11)
-// Although <regex> is present and compilable against, the actual implementation is not functional
-// even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively.
-# define BOOST_NO_CXX11_HDR_REGEX
-#endif
-#if (BOOST_LIBSTDCXX_VERSION < 40900) || (__cplusplus <= 201103)
-# define BOOST_NO_CXX14_STD_EXCHANGE
-#endif
-
-#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7)))
-// As of clang-3.6, libstdc++ header <atomic> throws up errors with clang:
-# define BOOST_NO_CXX11_HDR_ATOMIC
-#endif
-//
-// C++0x features in GCC 5.1 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 50100) || !defined(BOOST_LIBSTDCXX11)
-# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
-# define BOOST_NO_CXX11_HDR_CODECVT
-# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
-# define BOOST_NO_CXX11_STD_ALIGN
-#endif
-
-//
-// C++17 features in GCC 7.1 and later
-//
-#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
-# define BOOST_NO_CXX17_STD_INVOKE
-# define BOOST_NO_CXX17_STD_APPLY
-#endif
-
-#if defined(__has_include)
-#if !__has_include(<shared_mutex>)
-# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#elif __cplusplus <= 201103
-# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#endif
-#elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11)
-# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-#endif
-
-//
-// Headers not present on Solaris with the Oracle compiler:
-#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)
-#define BOOST_NO_CXX11_HDR_FUTURE
-#define BOOST_NO_CXX11_HDR_FORWARD_LIST
-#define BOOST_NO_CXX11_HDR_ATOMIC
-// shared_ptr is present, but is not convertible to bool
-// which causes all kinds of problems especially in Boost.Thread
-// but probably elsewhere as well.
-#define BOOST_NO_CXX11_SMART_PTR
-#endif
-
-#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1))
- // Headers not always available:
-# ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
-# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
-# endif
-# ifndef BOOST_NO_CXX11_HDR_MUTEX
-# define BOOST_NO_CXX11_HDR_MUTEX
-# endif
-# ifndef BOOST_NO_CXX11_HDR_THREAD
-# define BOOST_NO_CXX11_HDR_THREAD
-# endif
-# ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX
-# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
-# endif
-#endif
-
-#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX)
-// Timed mutexes are not always available:
-# define BOOST_NO_CXX11_HDR_MUTEX
-#endif
-
-// --- end ---
diff --git a/src/third_party/boost-1.68.0/boost/container/allocator.hpp b/src/third_party/boost-1.68.0/boost/container/allocator.hpp
deleted file mode 100644
index c0deb0a108d..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/allocator.hpp
+++ /dev/null
@@ -1,368 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_ALLOCATOR_HPP
-#define BOOST_CONTAINER_ALLOCATOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/detail/version_type.hpp>
-#include <boost/container/throw_exception.hpp>
-#include <boost/container/detail/dlmalloc.hpp>
-#include <boost/container/detail/multiallocation_chain.hpp>
-#include <boost/static_assert.hpp>
-#include <cstddef>
-#include <cassert>
-
-//!\file
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-template<unsigned Version, unsigned int AllocationDisableMask>
-class allocator<void, Version, AllocationDisableMask>
-{
- typedef allocator<void, Version, AllocationDisableMask> self_t;
- public:
- typedef void value_type;
- typedef void * pointer;
- typedef const void* const_pointer;
- typedef int & reference;
- typedef const int & const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
- typedef boost::container::dtl::
- version_type<self_t, Version> version;
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef boost::container::dtl::
- basic_multiallocation_chain<void*> multiallocation_chain;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //!Obtains an allocator that allocates
- //!objects of type T2
- template<class T2>
- struct rebind
- {
- typedef allocator< T2
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- , Version, AllocationDisableMask
- #endif
- > other;
- };
-
- //!Default constructor
- //!Never throws
- allocator()
- {}
-
- //!Constructor from other allocator.
- //!Never throws
- allocator(const allocator &)
- {}
-
- //!Constructor from related allocator.
- //!Never throws
- template<class T2>
- allocator(const allocator<T2, Version, AllocationDisableMask> &)
- {}
-};
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! This class is an extended STL-compatible that offers advanced allocation mechanism
-//!(in-place expansion, shrinking, burst-allocation...)
-//!
-//! This allocator is a wrapper around a modified DLmalloc.
-//! If Version is 1, the allocator is a STL conforming allocator. If Version is 2,
-//! the allocator offers advanced expand in place and burst allocation capabilities.
-//!
-//! AllocationDisableMask works only if Version is 2 and it can be an inclusive OR
-//! of allocation types the user wants to disable.
-template< class T
- , unsigned Version BOOST_CONTAINER_DOCONLY(=2)
- , unsigned int AllocationDisableMask BOOST_CONTAINER_DOCONLY(=0)>
-class allocator
-{
- typedef unsigned int allocation_type;
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
-
- //Self type
- typedef allocator<T, Version, AllocationDisableMask> self_t;
-
- //Not assignable from related allocator
- template<class T2, unsigned int Version2, unsigned int AllocationDisableMask2>
- allocator& operator=(const allocator<T2, Version2, AllocationDisableMask2>&);
-
- static const unsigned int ForbiddenMask =
- BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BWD | BOOST_CONTAINER_EXPAND_FWD ;
-
- //The mask can't disable all the allocation types
- BOOST_STATIC_ASSERT(( (AllocationDisableMask & ForbiddenMask) != ForbiddenMask ));
-
- //The mask is only valid for version 2 allocators
- BOOST_STATIC_ASSERT(( Version != 1 || (AllocationDisableMask == 0) ));
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- typedef T value_type;
- typedef T * pointer;
- typedef const T * const_pointer;
- typedef T & reference;
- typedef const T & const_reference;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
-
- typedef boost::container::dtl::
- version_type<self_t, Version> version;
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef boost::container::dtl::
- basic_multiallocation_chain<void*> void_multiallocation_chain;
-
- typedef boost::container::dtl::
- transform_multiallocation_chain
- <void_multiallocation_chain, T> multiallocation_chain;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //!Obtains an allocator that allocates
- //!objects of type T2
- template<class T2>
- struct rebind
- {
- typedef allocator<T2, Version, AllocationDisableMask> other;
- };
-
- //!Default constructor
- //!Never throws
- allocator() BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
- //!Constructor from other allocator.
- //!Never throws
- allocator(const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
- //!Constructor from related allocator.
- //!Never throws
- template<class T2>
- allocator(const allocator<T2
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- , Version, AllocationDisableMask
- #endif
- > &) BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
- //!Allocates memory for an array of count elements.
- //!Throws std::bad_alloc if there is no enough memory
- //!If Version is 2, this allocated memory can only be deallocated
- //!with deallocate() or (for Version == 2) deallocate_many()
- pointer allocate(size_type count, const void * hint= 0)
- {
- (void)hint;
- if(count > this->max_size())
- boost::container::throw_bad_alloc();
- void *ret = dlmalloc_malloc(count*sizeof(T));
- if(!ret)
- boost::container::throw_bad_alloc();
- return static_cast<pointer>(ret);
- }
-
- //!Deallocates previously allocated memory.
- //!Never throws
- void deallocate(pointer ptr, size_type) BOOST_NOEXCEPT_OR_NOTHROW
- { dlmalloc_free(ptr); }
-
- //!Returns the maximum number of elements that could be allocated.
- //!Never throws
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return size_type(-1)/sizeof(T); }
-
- //!Swaps two allocators, does nothing
- //!because this allocator is stateless
- friend void swap(self_t &, self_t &) BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
- //!An allocator always compares to true, as memory allocated with one
- //!instance can be deallocated by another instance
- friend bool operator==(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
- { return true; }
-
- //!An allocator always compares to false, as memory allocated with one
- //!instance can be deallocated by another instance
- friend bool operator!=(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
- { return false; }
-
- //!An advanced function that offers in-place expansion shrink to fit and new allocation
- //!capabilities. Memory allocated with this function can only be deallocated with deallocate()
- //!or deallocate_many().
- //!This function is available only with Version == 2
- pointer allocation_command(allocation_type command,
- size_type limit_size,
- size_type &prefer_in_recvd_out_size,
- pointer &reuse)
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));
- const allocation_type mask(AllocationDisableMask);
- command &= ~mask;
- pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse);
- if(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION))
- boost::container::throw_bad_alloc();
- return ret;
- }
-
- //!Returns maximum the number of objects the previously allocated memory
- //!pointed by p can hold.
- //!Memory must not have been allocated with
- //!allocate_one or allocate_individual.
- //!This function is available only with Version == 2
- size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));
- return dlmalloc_size(p);
- }
-
- //!Allocates just one object. Memory allocated with this function
- //!must be deallocated only with deallocate_one().
- //!Throws bad_alloc if there is no enough memory
- //!This function is available only with Version == 2
- pointer allocate_one()
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));
- return this->allocate(1);
- }
-
- //!Allocates many elements of size == 1.
- //!Elements must be individually deallocated with deallocate_one()
- //!This function is available only with Version == 2
- void allocate_individual(std::size_t num_elements, multiallocation_chain &chain)
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));
- this->allocate_many(1, num_elements, chain);
- }
-
- //!Deallocates memory previously allocated with allocate_one().
- //!You should never use deallocate_one to deallocate memory allocated
- //!with other functions different from allocate_one() or allocate_individual.
- //Never throws
- void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));
- return this->deallocate(p, 1);
- }
-
- //!Deallocates memory allocated with allocate_one() or allocate_individual().
- //!This function is available only with Version == 2
- void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));
- return this->deallocate_many(chain);
- }
-
- //!Allocates many elements of size elem_size.
- //!Elements must be individually deallocated with deallocate()
- //!This function is available only with Version == 2
- void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain)
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));/*
- dlmalloc_memchain ch;
- BOOST_CONTAINER_MEMCHAIN_INIT(&ch);
- if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){
- boost::container::throw_bad_alloc();
- }
- chain.incorporate_after(chain.before_begin()
- ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch)
- ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
- ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );*/
- if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast<dlmalloc_memchain *>(&chain))){
- boost::container::throw_bad_alloc();
- }
- }
-
- //!Allocates n_elements elements, each one of size elem_sizes[i]
- //!Elements must be individually deallocated with deallocate()
- //!This function is available only with Version == 2
- void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain)
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));
- dlmalloc_memchain ch;
- BOOST_CONTAINER_MEMCHAIN_INIT(&ch);
- if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){
- boost::container::throw_bad_alloc();
- }
- chain.incorporate_after(chain.before_begin()
- ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch)
- ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
- ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );
- /*
- if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast<dlmalloc_memchain *>(&chain))){
- boost::container::throw_bad_alloc();
- }*/
- }
-
- //!Deallocates several elements allocated by
- //!allocate_many(), allocate(), or allocation_command().
- //!This function is available only with Version == 2
- void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_STATIC_ASSERT(( Version > 1 ));
- dlmalloc_memchain ch;
- void *beg(&*chain.begin()), *last(&*chain.last());
- size_t size(chain.size());
- BOOST_CONTAINER_MEMCHAIN_INIT_FROM(&ch, beg, last, size);
- dlmalloc_multidealloc(&ch);
- //dlmalloc_multidealloc(reinterpret_cast<dlmalloc_memchain *>(&chain));
- }
-
- private:
-
- pointer priv_allocation_command
- (allocation_type command, std::size_t limit_size
- ,size_type &prefer_in_recvd_out_size
- ,pointer &reuse_ptr)
- {
- std::size_t const preferred_size = prefer_in_recvd_out_size;
- dlmalloc_command_ret_t ret = {0 , 0};
- if((limit_size > this->max_size()) | (preferred_size > this->max_size())){
- return pointer();
- }
- std::size_t l_size = limit_size*sizeof(T);
- std::size_t p_size = preferred_size*sizeof(T);
- std::size_t r_size;
- {
- void* reuse_ptr_void = reuse_ptr;
- ret = dlmalloc_allocation_command(command, sizeof(T), l_size, p_size, &r_size, reuse_ptr_void);
- reuse_ptr = ret.second ? static_cast<T*>(reuse_ptr_void) : 0;
- }
- prefer_in_recvd_out_size = r_size/sizeof(T);
- return (pointer)ret.first;
- }
-};
-
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_ALLOCATOR_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/container/allocator_traits.hpp b/src/third_party/boost-1.68.0/boost/container/allocator_traits.hpp
deleted file mode 100644
index af32f182b66..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/allocator_traits.hpp
+++ /dev/null
@@ -1,477 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Pablo Halpern 2009. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
-#define BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/type_traits.hpp> //is_empty
-#include <boost/container/detail/placement_new.hpp>
-#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
-#include <boost/container/detail/std_fwd.hpp>
-#endif
-// intrusive
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-// move
-#include <boost/move/utility_core.hpp>
-// move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-// other boost
-#include <boost/static_assert.hpp>
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 2
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 2
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-template<class Allocator>
-class small_vector_allocator;
-
-namespace allocator_traits_detail {
-
-BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_max_size, max_size)
-BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_construction, select_on_container_copy_construction)
-
-} //namespace allocator_traits_detail {
-
-namespace dtl {
-
-//workaround needed for C++03 compilers with no construct()
-//supporting rvalue references
-template<class Allocator>
-struct is_std_allocator
-{ static const bool value = false; };
-
-template<class T>
-struct is_std_allocator< std::allocator<T> >
-{ static const bool value = true; };
-
-template<class T>
-struct is_std_allocator< small_vector_allocator< std::allocator<T> > >
-{ static const bool value = true; };
-
-template<class Allocator>
-struct is_not_std_allocator
-{ static const bool value = !is_std_allocator<Allocator>::value; };
-
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer)
-BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_pointer)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference)
-BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(void_pointer)
-BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_void_pointer)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_always_equal)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_partially_propagable)
-
-} //namespace dtl {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! The class template allocator_traits supplies a uniform interface to all allocator types.
-//! This class is a C++03-compatible implementation of std::allocator_traits
-template <typename Allocator>
-struct allocator_traits
-{
- //allocator_type
- typedef Allocator allocator_type;
- //value_type
- typedef typename allocator_type::value_type value_type;
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! Allocator::pointer if such a type exists; otherwise, value_type*
- //!
- typedef unspecified pointer;
- //! Allocator::const_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const
- //!
- typedef see_documentation const_pointer;
- //! Non-standard extension
- //! Allocator::reference if such a type exists; otherwise, value_type&
- typedef see_documentation reference;
- //! Non-standard extension
- //! Allocator::const_reference if such a type exists ; otherwise, const value_type&
- typedef see_documentation const_reference;
- //! Allocator::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>.
- //!
- typedef see_documentation void_pointer;
- //! Allocator::const_void_pointer if such a type exists ; otherwis e, pointer_traits<pointer>::rebind<const
- //!
- typedef see_documentation const_void_pointer;
- //! Allocator::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type.
- //!
- typedef see_documentation difference_type;
- //! Allocator::size_type if such a type exists ; otherwise, make_unsigned<difference_type>::type
- //!
- typedef see_documentation size_type;
- //! Allocator::propagate_on_container_copy_assignment if such a type exists, otherwise a type
- //! with an internal constant static boolean member <code>value</code> == false.
- typedef see_documentation propagate_on_container_copy_assignment;
- //! Allocator::propagate_on_container_move_assignment if such a type exists, otherwise a type
- //! with an internal constant static boolean member <code>value</code> == false.
- typedef see_documentation propagate_on_container_move_assignment;
- //! Allocator::propagate_on_container_swap if such a type exists, otherwise a type
- //! with an internal constant static boolean member <code>value</code> == false.
- typedef see_documentation propagate_on_container_swap;
- //! Allocator::is_always_equal if such a type exists, otherwise a type
- //! with an internal constant static boolean member <code>value</code> == is_empty<Allocator>::value
- typedef see_documentation is_always_equal;
- //! Allocator::is_partially_propagable if such a type exists, otherwise a type
- //! with an internal constant static boolean member <code>value</code> == false
- //! <b>Note</b>: Non-standard extension used to implement `small_vector_allocator`.
- typedef see_documentation is_partially_propagable;
- //! Defines an allocator: Allocator::rebind<T>::other if such a type exists; otherwise, Allocator<T, Args>
- //! if Allocator is a class template instantiation of the form Allocator<U, Args>, where Args is zero or
- //! more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed.
- //!
- //! In C++03 compilers <code>rebind_alloc</code> is a struct derived from an allocator
- //! deduced by previously detailed rules.
- template <class T> using rebind_alloc = see_documentation;
-
- //! In C++03 compilers <code>rebind_traits</code> is a struct derived from
- //! <code>allocator_traits<OtherAlloc></code>, where <code>OtherAlloc</code> is
- //! the allocator deduced by rules explained in <code>rebind_alloc</code>.
- template <class T> using rebind_traits = allocator_traits<rebind_alloc<T> >;
-
- //! Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers.
- //! <code>type</code> is an allocator related to Allocator deduced deduced by rules explained in <code>rebind_alloc</code>.
- template <class T>
- struct portable_rebind_alloc
- { typedef see_documentation type; };
- #else
- //pointer
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- pointer, value_type*)
- pointer;
- //const_pointer
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
- const_pointer, typename boost::intrusive::pointer_traits<pointer>::template
- rebind_pointer<const value_type>)
- const_pointer;
- //reference
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- reference, typename dtl::unvoid_ref<value_type>::type)
- reference;
- //const_reference
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- const_reference, typename dtl::unvoid_ref<const value_type>::type)
- const_reference;
- //void_pointer
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
- void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
- rebind_pointer<void>)
- void_pointer;
- //const_void_pointer
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
- const_void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
- rebind_pointer<const void>)
- const_void_pointer;
- //difference_type
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- difference_type, std::ptrdiff_t)
- difference_type;
- //size_type
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- size_type, std::size_t)
- size_type;
- //propagate_on_container_copy_assignment
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- propagate_on_container_copy_assignment, dtl::false_type)
- propagate_on_container_copy_assignment;
- //propagate_on_container_move_assignment
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- propagate_on_container_move_assignment, dtl::false_type)
- propagate_on_container_move_assignment;
- //propagate_on_container_swap
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- propagate_on_container_swap, dtl::false_type)
- propagate_on_container_swap;
- //is_always_equal
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- is_always_equal, dtl::is_empty<Allocator>)
- is_always_equal;
- //is_partially_propagable
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
- is_partially_propagable, dtl::false_type)
- is_partially_propagable;
-
- //rebind_alloc & rebind_traits
- #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
- //C++11
- template <typename T> using rebind_alloc = typename boost::intrusive::pointer_rebind<Allocator, T>::type;
- template <typename T> using rebind_traits = allocator_traits< rebind_alloc<T> >;
- #else // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
- //Some workaround for C++03 or C++11 compilers with no template aliases
- template <typename T>
- struct rebind_alloc : boost::intrusive::pointer_rebind<Allocator,T>::type
- {
- typedef typename boost::intrusive::pointer_rebind<Allocator,T>::type Base;
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template <typename... Args>
- rebind_alloc(BOOST_FWD_REF(Args)... args) : Base(boost::forward<Args>(args)...) {}
- #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- #define BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
- explicit rebind_alloc(BOOST_MOVE_UREF##N) : Base(BOOST_MOVE_FWD##N){}\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC)
- #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC
- #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- };
-
- template <typename T>
- struct rebind_traits
- : allocator_traits<typename boost::intrusive::pointer_rebind<Allocator, T>::type>
- {};
- #endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-
- //portable_rebind_alloc
- template <class T>
- struct portable_rebind_alloc
- { typedef typename boost::intrusive::pointer_rebind<Allocator, T>::type type; };
- #endif //BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //! <b>Returns</b>: <code>a.allocate(n)</code>
- //!
- BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n)
- { return a.allocate(n); }
-
- //! <b>Returns</b>: <code>a.deallocate(p, n)</code>
- //!
- //! <b>Throws</b>: Nothing
- BOOST_CONTAINER_FORCEINLINE static void deallocate(Allocator &a, pointer p, size_type n)
- { a.deallocate(p, n); }
-
- //! <b>Effects</b>: calls <code>a.allocate(n, p)</code> if that call is well-formed;
- //! otherwise, invokes <code>a.allocate(n)</code>
- BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p)
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_allocate
- <Allocator, const size_type, const const_void_pointer>::value;
- dtl::bool_<value> flag;
- return allocator_traits::priv_allocate(flag, a, n, p);
- }
-
- //! <b>Effects</b>: calls <code>a.destroy(p)</code> if that call is well-formed;
- //! otherwise, invokes <code>p->~T()</code>.
- template<class T>
- BOOST_CONTAINER_FORCEINLINE static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- typedef T* destroy_pointer;
- const bool value = boost::container::dtl::
- has_member_function_callable_with_destroy
- <Allocator, const destroy_pointer>::value;
- dtl::bool_<value> flag;
- allocator_traits::priv_destroy(flag, a, p);
- }
-
- //! <b>Returns</b>: <code>a.max_size()</code> if that expression is well-formed; otherwise,
- //! <code>numeric_limits<size_type>::max()</code>.
- BOOST_CONTAINER_FORCEINLINE static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
- {
- const bool value = allocator_traits_detail::has_max_size<Allocator, size_type (Allocator::*)() const>::value;
- dtl::bool_<value> flag;
- return allocator_traits::priv_max_size(flag, a);
- }
-
- //! <b>Returns</b>: <code>a.select_on_container_copy_construction()</code> if that expression is well-formed;
- //! otherwise, a.
- BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator,
- typename dtl::if_c
- < allocator_traits_detail::has_select_on_container_copy_construction<Allocator BOOST_MOVE_I Allocator (Allocator::*)() const>::value
- BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type)
- select_on_container_copy_construction(const Allocator &a)
- {
- const bool value = allocator_traits_detail::has_select_on_container_copy_construction
- <Allocator, Allocator (Allocator::*)() const>::value;
- dtl::bool_<value> flag;
- return allocator_traits::priv_select_on_container_copy_construction(flag, a);
- }
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: calls <code>a.construct(p, std::forward<Args>(args)...)</code> if that call is well-formed;
- //! otherwise, invokes <code>`placement new` (static_cast<void*>(p)) T(std::forward<Args>(args)...)</code>
- template <class T, class ...Args>
- BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args)
- {
- static const bool value = ::boost::move_detail::and_
- < dtl::is_not_std_allocator<Allocator>
- , boost::container::dtl::has_member_function_callable_with_construct
- < Allocator, T*, Args... >
- >::value;
- dtl::bool_<value> flag;
- allocator_traits::priv_construct(flag, a, p, ::boost::forward<Args>(args)...);
- }
- #endif
-
- //! <b>Returns</b>: <code>a.storage_is_unpropagable(p)</code> if is_partially_propagable::value is true; otherwise,
- //! <code>false</code>.
- BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- dtl::bool_<is_partially_propagable::value> flag;
- return allocator_traits::priv_storage_is_unpropagable(flag, a, p);
- }
-
- //! <b>Returns</b>: <code>true</code> if <code>is_always_equal::value == true</code>, otherwise,
- //! <code>a == b</code>.
- BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW
- {
- dtl::bool_<is_always_equal::value> flag;
- return allocator_traits::priv_equal(flag, a, b);
- }
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- private:
- BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::true_type, Allocator &a, size_type n, const_void_pointer p)
- { return a.allocate(n, p); }
-
- BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer)
- { return a.allocate(n); }
-
- template<class T>
- BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW
- { a.destroy(p); }
-
- template<class T>
- BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW
- { p->~T(); (void)p; }
-
- BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
- { return a.max_size(); }
-
- BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW
- { return size_type(-1)/sizeof(value_type); }
-
- BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(dtl::true_type, const Allocator &a)
- { return a.select_on_container_copy_construction(); }
-
- BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
- { return a; }
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- template<class T, class ...Args>
- BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
- { a.construct( p, ::boost::forward<Args>(args)...); }
-
- template<class T, class ...Args>
- BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args)
- { ::new((void*)p, boost_container_new_t()) T(::boost::forward<Args>(args)...); }
- #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- public:
-
- #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \
- template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
- BOOST_CONTAINER_FORCEINLINE static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- static const bool value = ::boost::move_detail::and_ \
- < dtl::is_not_std_allocator<Allocator> \
- , boost::container::dtl::has_member_function_callable_with_construct \
- < Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \
- >::value; \
- dtl::bool_<value> flag;\
- (priv_construct)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- }\
- //
- BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL)
- #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL
-
- private:
- /////////////////////////////////
- // priv_construct
- /////////////////////////////////
- #define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \
- template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
- BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { a.construct( p BOOST_MOVE_I##N BOOST_MOVE_FWD##N ); }\
- \
- template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
- BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\
- //
- BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL)
- #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL
-
- #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template<class T>
- BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&)
- { ::new((void*)p, boost_container_new_t()) T; }
-
- BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::true_type, const Allocator &a, pointer p)
- { return a.storage_is_unpropagable(p); }
-
- BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::false_type, const Allocator &, pointer)
- { return false; }
-
- BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::true_type, const Allocator &, const Allocator &)
- { return true; }
-
- BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::false_type, const Allocator &a, const Allocator &b)
- { return a == b; }
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-};
-
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP)
diff --git a/src/third_party/boost-1.68.0/boost/container/deque.hpp b/src/third_party/boost-1.68.0/boost/container/deque.hpp
deleted file mode 100644
index f04ba492adf..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/deque.hpp
+++ /dev/null
@@ -1,2270 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_DEQUE_HPP
-#define BOOST_CONTAINER_DEQUE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-// container
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-#include <boost/container/throw_exception.hpp>
-// container/detail
-#include <boost/container/detail/advanced_insert_int.hpp>
-#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
-#include <boost/container/detail/alloc_helpers.hpp>
-#include <boost/container/detail/copy_move_algo.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/move/detail/iterator_to_raw_pointer.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/container/detail/min_max.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/container/detail/type_traits.hpp>
-// move
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/iterator.hpp>
-#include <boost/move/traits.hpp>
-#include <boost/move/utility_core.hpp>
-// move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/detail/move_helpers.hpp>
-// other
-#include <boost/assert.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-// std
-#include <cstddef>
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class T, class Allocator>
-class deque;
-
-template <class T>
-struct deque_value_traits
-{
- typedef T value_type;
- static const bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
- static const bool trivial_dctr_after_move = ::boost::has_trivial_destructor_after_move<value_type>::value;
-};
-
-// Note: this function is simply a kludge to work around several compilers'
-// bugs in handling constant expressions.
-template<class T>
-struct deque_buf_size
-{
- static const std::size_t min_size = 512u;
- static const std::size_t sizeof_t = sizeof(T);
- static const std::size_t value = sizeof_t < min_size ? (min_size/sizeof_t) : std::size_t(1);
-};
-
-namespace dtl {
-
-// Class invariants:
-// For any nonsingular iterator i:
-// i.node is the address of an element in the map array. The
-// contents of i.node is a pointer to the beginning of a node.
-// i.first == //(i.node)
-// i.last == i.first + node_size
-// i.cur is a pointer in the range [i.first, i.last). NOTE:
-// the implication of this is that i.cur is always a dereferenceable
-// pointer, even if i is a past-the-end iterator.
-// Start and Finish are always nonsingular iterators. NOTE: this means
-// that an empty deque must have one node, and that a deque
-// with N elements, where N is the buffer size, must have two nodes.
-// For every node other than start.node and finish.node, every element
-// in the node is an initialized object. If start.node == finish.node,
-// then [start.cur, finish.cur) are initialized objects, and
-// the elements outside that range are uninitialized storage. Otherwise,
-// [start.cur, start.last) and [finish.first, finish.cur) are initialized
-// objects, and [start.first, start.cur) and [finish.cur, finish.last)
-// are uninitialized storage.
-// [map, map + map_size) is a valid, non-empty range.
-// [start.node, finish.node] is a valid range contained within
-// [map, map + map_size).
-// A pointer in the range [map, map + map_size) points to an allocated node
-// if and only if the pointer is in the range [start.node, finish.node].
-template<class Pointer, bool IsConst>
-class deque_iterator
-{
- public:
- typedef std::random_access_iterator_tag iterator_category;
- typedef typename boost::intrusive::pointer_traits<Pointer>::element_type value_type;
- typedef typename boost::intrusive::pointer_traits<Pointer>::difference_type difference_type;
- typedef typename if_c
- < IsConst
- , typename boost::intrusive::pointer_traits<Pointer>::template
- rebind_pointer<const value_type>::type
- , Pointer
- >::type pointer;
- typedef typename if_c
- < IsConst
- , const value_type&
- , value_type&
- >::type reference;
-
- static std::size_t s_buffer_size()
- { return deque_buf_size<value_type>::value; }
-
- typedef Pointer val_alloc_ptr;
- typedef typename boost::intrusive::pointer_traits<Pointer>::
- template rebind_pointer<Pointer>::type index_pointer;
-
- Pointer m_cur;
- Pointer m_first;
- Pointer m_last;
- index_pointer m_node;
-
- public:
-
- Pointer get_cur() const { return m_cur; }
- Pointer get_first() const { return m_first; }
- Pointer get_last() const { return m_last; }
- index_pointer get_node() const { return m_node; }
-
- deque_iterator(val_alloc_ptr x, index_pointer y) BOOST_NOEXCEPT_OR_NOTHROW
- : m_cur(x), m_first(*y), m_last(*y + s_buffer_size()), m_node(y)
- {}
-
- deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW
- : m_cur(), m_first(), m_last(), m_node() //Value initialization to achieve "null iterators" (N3644)
- {}
-
- deque_iterator(deque_iterator<Pointer, false> const& x) BOOST_NOEXCEPT_OR_NOTHROW
- : m_cur(x.get_cur()), m_first(x.get_first()), m_last(x.get_last()), m_node(x.get_node())
- {}
-
- deque_iterator(Pointer cur, Pointer first, Pointer last, index_pointer node) BOOST_NOEXCEPT_OR_NOTHROW
- : m_cur(cur), m_first(first), m_last(last), m_node(node)
- {}
-
- deque_iterator<Pointer, false> unconst() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- return deque_iterator<Pointer, false>(this->get_cur(), this->get_first(), this->get_last(), this->get_node());
- }
-
- reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
- { return *this->m_cur; }
-
- pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->m_cur; }
-
- difference_type operator-(const deque_iterator& x) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- if(!this->m_cur && !x.m_cur){
- return 0;
- }
- return difference_type(this->s_buffer_size()) * (this->m_node - x.m_node - 1) +
- (this->m_cur - this->m_first) + (x.m_last - x.m_cur);
- }
-
- deque_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
- {
- ++this->m_cur;
- if (this->m_cur == this->m_last) {
- this->priv_set_node(this->m_node + 1);
- this->m_cur = this->m_first;
- }
- return *this;
- }
-
- deque_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
- {
- deque_iterator tmp(*this);
- ++*this;
- return tmp;
- }
-
- deque_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
- {
- if (this->m_cur == this->m_first) {
- this->priv_set_node(this->m_node - 1);
- this->m_cur = this->m_last;
- }
- --this->m_cur;
- return *this;
- }
-
- deque_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
- {
- deque_iterator tmp(*this);
- --*this;
- return tmp;
- }
-
- deque_iterator& operator+=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- difference_type offset = n + (this->m_cur - this->m_first);
- if (offset >= 0 && offset < difference_type(this->s_buffer_size()))
- this->m_cur += n;
- else {
- difference_type node_offset =
- offset > 0 ? offset / difference_type(this->s_buffer_size())
- : -difference_type((-offset - 1) / this->s_buffer_size()) - 1;
- this->priv_set_node(this->m_node + node_offset);
- this->m_cur = this->m_first +
- (offset - node_offset * difference_type(this->s_buffer_size()));
- }
- return *this;
- }
-
- deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- { deque_iterator tmp(*this); return tmp += n; }
-
- deque_iterator& operator-=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW
- { return *this += -n; }
-
- deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- { deque_iterator tmp(*this); return tmp -= n; }
-
- reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- { return *(*this + n); }
-
- friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_cur == r.m_cur; }
-
- friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_cur != r.m_cur; }
-
- friend bool operator<(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return (l.m_node == r.m_node) ? (l.m_cur < r.m_cur) : (l.m_node < r.m_node); }
-
- friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return r < l; }
-
- friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return !(r < l); }
-
- friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return !(l < r); }
-
- void priv_set_node(index_pointer new_node) BOOST_NOEXCEPT_OR_NOTHROW
- {
- this->m_node = new_node;
- this->m_first = *new_node;
- this->m_last = this->m_first + this->s_buffer_size();
- }
-
- friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW
- { return x += n; }
-};
-
-} //namespace dtl {
-
-// Deque base class. It has two purposes. First, its constructor
-// and destructor allocate (but don't initialize) storage. This makes
-// exception safety easier.
-template <class Allocator>
-class deque_base
-{
- BOOST_COPYABLE_AND_MOVABLE(deque_base)
- public:
- typedef allocator_traits<Allocator> val_alloc_traits_type;
- typedef typename val_alloc_traits_type::value_type val_alloc_val;
- typedef typename val_alloc_traits_type::pointer val_alloc_ptr;
- typedef typename val_alloc_traits_type::const_pointer val_alloc_cptr;
- typedef typename val_alloc_traits_type::reference val_alloc_ref;
- typedef typename val_alloc_traits_type::const_reference val_alloc_cref;
- typedef typename val_alloc_traits_type::difference_type val_alloc_diff;
- typedef typename val_alloc_traits_type::size_type val_alloc_size;
- typedef typename val_alloc_traits_type::template
- portable_rebind_alloc<val_alloc_ptr>::type ptr_alloc_t;
- typedef allocator_traits<ptr_alloc_t> ptr_alloc_traits_type;
- typedef typename ptr_alloc_traits_type::value_type ptr_alloc_val;
- typedef typename ptr_alloc_traits_type::pointer ptr_alloc_ptr;
- typedef typename ptr_alloc_traits_type::const_pointer ptr_alloc_cptr;
- typedef typename ptr_alloc_traits_type::reference ptr_alloc_ref;
- typedef typename ptr_alloc_traits_type::const_reference ptr_alloc_cref;
- typedef Allocator allocator_type;
- typedef allocator_type stored_allocator_type;
- typedef val_alloc_size size_type;
-
- protected:
-
- typedef deque_value_traits<val_alloc_val> traits_t;
- typedef ptr_alloc_t map_allocator_type;
-
- static size_type s_buffer_size() BOOST_NOEXCEPT_OR_NOTHROW
- { return deque_buf_size<val_alloc_val>::value; }
-
- val_alloc_ptr priv_allocate_node()
- { return this->alloc().allocate(s_buffer_size()); }
-
- void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
- { this->alloc().deallocate(p, s_buffer_size()); }
-
- ptr_alloc_ptr priv_allocate_map(size_type n)
- { return this->ptr_alloc().allocate(n); }
-
- void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- { this->ptr_alloc().deallocate(p, n); }
-
- typedef dtl::deque_iterator<val_alloc_ptr, false> iterator;
- typedef dtl::deque_iterator<val_alloc_ptr, true > const_iterator;
-
- deque_base(size_type num_elements, const allocator_type& a)
- : members_(a)
- { this->priv_initialize_map(num_elements); }
-
- explicit deque_base(const allocator_type& a)
- : members_(a)
- {}
-
- deque_base()
- : members_()
- {}
-
- explicit deque_base(BOOST_RV_REF(deque_base) x)
- : members_( boost::move(x.ptr_alloc())
- , boost::move(x.alloc()) )
- {}
-
- ~deque_base()
- {
- if (this->members_.m_map) {
- this->priv_destroy_nodes(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1);
- this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size);
- }
- }
-
- private:
- deque_base(const deque_base&);
-
- protected:
-
- void swap_members(deque_base &x) BOOST_NOEXCEPT_OR_NOTHROW
- {
- ::boost::adl_move_swap(this->members_.m_start, x.members_.m_start);
- ::boost::adl_move_swap(this->members_.m_finish, x.members_.m_finish);
- ::boost::adl_move_swap(this->members_.m_map, x.members_.m_map);
- ::boost::adl_move_swap(this->members_.m_map_size, x.members_.m_map_size);
- }
-
- void priv_initialize_map(size_type num_elements)
- {
-// if(num_elements){
- size_type num_nodes = num_elements / s_buffer_size() + 1;
-
- this->members_.m_map_size = dtl::max_value((size_type) InitialMapSize, num_nodes + 2);
- this->members_.m_map = this->priv_allocate_map(this->members_.m_map_size);
-
- ptr_alloc_ptr nstart = this->members_.m_map + (this->members_.m_map_size - num_nodes) / 2;
- ptr_alloc_ptr nfinish = nstart + num_nodes;
-
- BOOST_TRY {
- this->priv_create_nodes(nstart, nfinish);
- }
- BOOST_CATCH(...){
- this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size);
- this->members_.m_map = 0;
- this->members_.m_map_size = 0;
- BOOST_RETHROW
- }
- BOOST_CATCH_END
-
- this->members_.m_start.priv_set_node(nstart);
- this->members_.m_finish.priv_set_node(nfinish - 1);
- this->members_.m_start.m_cur = this->members_.m_start.m_first;
- this->members_.m_finish.m_cur = this->members_.m_finish.m_first +
- num_elements % s_buffer_size();
-// }
- }
-
- void priv_create_nodes(ptr_alloc_ptr nstart, ptr_alloc_ptr nfinish)
- {
- ptr_alloc_ptr cur = nstart;
- BOOST_TRY {
- for (; cur < nfinish; ++cur)
- *cur = this->priv_allocate_node();
- }
- BOOST_CATCH(...){
- this->priv_destroy_nodes(nstart, cur);
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
-
- void priv_destroy_nodes(ptr_alloc_ptr nstart, ptr_alloc_ptr nfinish) BOOST_NOEXCEPT_OR_NOTHROW
- {
- for (ptr_alloc_ptr n = nstart; n < nfinish; ++n)
- this->priv_deallocate_node(*n);
- }
-
- void priv_clear_map() BOOST_NOEXCEPT_OR_NOTHROW
- {
- if (this->members_.m_map) {
- this->priv_destroy_nodes(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1);
- this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size);
- this->members_.m_map = 0;
- this->members_.m_map_size = 0;
- this->members_.m_start = iterator();
- this->members_.m_finish = this->members_.m_start;
- }
- }
-
- enum { InitialMapSize = 8 };
-
- protected:
- struct members_holder
- : public ptr_alloc_t
- , public allocator_type
- {
- members_holder()
- : map_allocator_type(), allocator_type()
- , m_map(0), m_map_size(0)
- , m_start(), m_finish(m_start)
- {}
-
- explicit members_holder(const allocator_type &a)
- : map_allocator_type(a), allocator_type(a)
- , m_map(0), m_map_size(0)
- , m_start(), m_finish(m_start)
- {}
-
- template<class ValAllocConvertible, class PtrAllocConvertible>
- members_holder(BOOST_FWD_REF(PtrAllocConvertible) pa, BOOST_FWD_REF(ValAllocConvertible) va)
- : map_allocator_type(boost::forward<PtrAllocConvertible>(pa))
- , allocator_type (boost::forward<ValAllocConvertible>(va))
- , m_map(0), m_map_size(0)
- , m_start(), m_finish(m_start)
- {}
-
- ptr_alloc_ptr m_map;
- val_alloc_size m_map_size;
- iterator m_start;
- iterator m_finish;
- } members_;
-
- ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW
- { return members_; }
-
- const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW
- { return members_; }
-
- allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW
- { return members_; }
-
- const allocator_type &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
- { return members_; }
-};
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-//! A double-ended queue is a sequence that supports random access to elements, constant time insertion
-//! and removal of elements at the end of the sequence, and linear time insertion and removal of elements in the middle.
-//!
-//! \tparam T The type of object that is stored in the deque
-//! \tparam Allocator The allocator used for all internal memory management
-template <class T, class Allocator = new_allocator<T> >
-#else
-template <class T, class Allocator>
-#endif
-class deque : protected deque_base<Allocator>
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- typedef deque_base<Allocator> Base;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
-
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
-
- typedef T value_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(typename Base::iterator) iterator;
- typedef BOOST_CONTAINER_IMPDEF(typename Base::const_iterator) const_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- private: // Internal typedefs
- BOOST_COPYABLE_AND_MOVABLE(deque)
- typedef typename Base::ptr_alloc_ptr index_pointer;
- static size_type s_buffer_size()
- { return Base::s_buffer_size(); }
- typedef allocator_traits<Allocator> allocator_traits_type;
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructors a deque.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- deque() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : Base()
- {}
-
- //! <b>Effects</b>: Constructs a deque taking the allocator as parameter.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- explicit deque(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
- : Base(a)
- {}
-
- //! <b>Effects</b>: Constructs a deque
- //! and inserts n value initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's value initialization throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit deque(size_type n)
- : Base(n, allocator_type())
- {
- dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
- proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
- //deque_base will deallocate in case of exception...
- }
-
- //! <b>Effects</b>: Constructs a deque
- //! and inserts n default initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default initialization or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- //!
- //! <b>Note</b>: Non-standard extension
- deque(size_type n, default_init_t)
- : Base(n, allocator_type())
- {
- dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
- proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
- //deque_base will deallocate in case of exception...
- }
-
- //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
- //! and inserts n value initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's value initialization throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit deque(size_type n, const allocator_type &a)
- : Base(n, a)
- {
- dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
- proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
- //deque_base will deallocate in case of exception...
- }
-
- //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
- //! and inserts n default initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default initialization or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- //!
- //! <b>Note</b>: Non-standard extension
- deque(size_type n, default_init_t, const allocator_type &a)
- : Base(n, a)
- {
- dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
- proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
- //deque_base will deallocate in case of exception...
- }
-
- //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- deque(size_type n, const value_type& value)
- : Base(n, allocator_type())
- { this->priv_fill_initialize(value); }
-
- //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- deque(size_type n, const value_type& value, const allocator_type& a)
- : Base(n, a)
- { this->priv_fill_initialize(value); }
-
- //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
- //! and inserts a copy of the range [first, last) in the deque.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced InIt throws.
- //!
- //! <b>Complexity</b>: Linear to the range [first, last).
- template <class InIt>
- deque(InIt first, InIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_convertible
- <InIt, size_type>::type * = 0
- #endif
- )
- : Base(allocator_type())
- {
- this->priv_range_initialize(first, last);
- }
-
- //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
- //! and inserts a copy of the range [first, last) in the deque.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced InIt throws.
- //!
- //! <b>Complexity</b>: Linear to the range [first, last).
- template <class InIt>
- deque(InIt first, InIt last, const allocator_type& a
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_convertible
- <InIt, size_type>::type * = 0
- #endif
- )
- : Base(a)
- {
- this->priv_range_initialize(first, last);
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
- //! and inserts a copy of the range [il.begin(), il.end()) in the deque.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
- deque(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
- : Base(a)
- {
- this->priv_range_initialize(il.begin(), il.end());
- }
-#endif
-
- //! <b>Effects</b>: Copy constructs a deque.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- deque(const deque& x)
- : Base(allocator_traits_type::select_on_container_copy_construction(x.alloc()))
- {
- if(x.size()){
- this->priv_initialize_map(x.size());
- boost::container::uninitialized_copy_alloc
- (this->alloc(), x.begin(), x.end(), this->members_.m_start);
- }
- }
-
- //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If allocator_type's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW
- : Base(BOOST_MOVE_BASE(Base, x))
- { this->swap_members(x); }
-
- //! <b>Effects</b>: Copy constructs a vector using the specified allocator.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocation
- //! throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- deque(const deque& x, const allocator_type &a)
- : Base(a)
- {
- if(x.size()){
- this->priv_initialize_map(x.size());
- boost::container::uninitialized_copy_alloc
- (this->alloc(), x.begin(), x.end(), this->members_.m_start);
- }
- }
-
- //! <b>Effects</b>: Move constructor using the specified allocator.
- //! Moves x's resources to *this if a == allocator_type().
- //! Otherwise copies values from x to *this.
- //!
- //! <b>Throws</b>: If allocation or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
- deque(BOOST_RV_REF(deque) x, const allocator_type &a)
- : Base(a)
- {
- if(x.alloc() == a){
- this->swap_members(x);
- }
- else{
- if(x.size()){
- this->priv_initialize_map(x.size());
- boost::container::uninitialized_copy_alloc
- ( this->alloc(), boost::make_move_iterator(x.begin())
- , boost::make_move_iterator(x.end()), this->members_.m_start);
- }
- }
- }
-
- //! <b>Effects</b>: Destroys the deque. All stored values are destroyed
- //! and used memory is deallocated.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements.
- ~deque() BOOST_NOEXCEPT_OR_NOTHROW
- {
- this->priv_destroy_range(this->members_.m_start, this->members_.m_finish);
- }
-
- //! <b>Effects</b>: Makes *this contain the same elements as x.
- //!
- //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
- //! of each of x's elements.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in x.
- deque& operator= (BOOST_COPY_ASSIGN_REF(deque) x)
- {
- if (&x != this){
- allocator_type &this_alloc = this->alloc();
- const allocator_type &x_alloc = x.alloc();
- dtl::bool_<allocator_traits_type::
- propagate_on_container_copy_assignment::value> flag;
- if(flag && this_alloc != x_alloc){
- this->clear();
- this->shrink_to_fit();
- }
- dtl::assign_alloc(this->alloc(), x.alloc(), flag);
- dtl::assign_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
- this->assign(x.cbegin(), x.cend());
- }
- return *this;
- }
-
- //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- deque& operator= (BOOST_RV_REF(deque) x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
- || allocator_traits_type::is_always_equal::value)
- {
- BOOST_ASSERT(this != &x);
- allocator_type &this_alloc = this->alloc();
- allocator_type &x_alloc = x.alloc();
- const bool propagate_alloc = allocator_traits_type::
- propagate_on_container_move_assignment::value;
- dtl::bool_<propagate_alloc> flag;
- const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
- //Resources can be transferred if both allocators are
- //going to be equal after this function (either propagated or already equal)
- if(propagate_alloc || allocators_equal){
- //Destroy objects but retain memory in case x reuses it in the future
- this->clear();
- //Move allocator if needed
- dtl::move_alloc(this_alloc, x_alloc, flag);
- dtl::move_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
- //Nothrow swap
- this->swap_members(x);
- }
- //Else do a one by one move
- else{
- this->assign( boost::make_move_iterator(x.begin())
- , boost::make_move_iterator(x.end()));
- }
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Makes *this contain the same elements as il.
- //!
- //! <b>Postcondition</b>: this->size() == il.size(). *this contains a copy
- //! of each of x's elements.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in il.
- deque& operator=(std::initializer_list<value_type> il)
- {
- this->assign(il.begin(), il.end());
- return *this;
- }
-#endif
-
- //! <b>Effects</b>: Assigns the n copies of val to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- void assign(size_type n, const T& val)
- {
- typedef constant_iterator<value_type, difference_type> c_it;
- this->assign(c_it(val, n), c_it());
- }
-
- //! <b>Effects</b>: Assigns the the range [first, last) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing InIt throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- template <class InIt>
- void assign(InIt first, InIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<InIt, size_type>
- , dtl::is_not_input_iterator<InIt>
- >::type * = 0
- #endif
- )
- {
- iterator cur = this->begin();
- for ( ; first != last && cur != end(); ++cur, ++first){
- *cur = *first;
- }
- if (first == last){
- this->erase(cur, this->cend());
- }
- else{
- this->insert(this->cend(), first, last);
- }
- }
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class FwdIt>
- void assign(FwdIt first, FwdIt last
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<FwdIt, size_type>
- , dtl::is_input_iterator<FwdIt>
- >::type * = 0
- )
- {
- const size_type len = boost::container::iterator_distance(first, last);
- if (len > size()) {
- FwdIt mid = first;
- boost::container::iterator_advance(mid, this->size());
- boost::container::copy(first, mid, begin());
- this->insert(this->cend(), mid, last);
- }
- else{
- this->erase(boost::container::copy(first, last, this->begin()), cend());
- }
- }
- #endif
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to il.size().
- void assign(std::initializer_list<value_type> il)
- { this->assign(il.begin(), il.end()); }
-#endif
-
- //! <b>Effects</b>: Returns a copy of the internal allocator.
- //!
- //! <b>Throws</b>: If allocator's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return Base::alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return Base::alloc(); }
-
- //////////////////////////////////////////////
- //
- // iterators
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- { return Base::alloc(); }
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->members_.m_start; }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->members_.m_start; }
-
- //! <b>Effects</b>: Returns an iterator to the end of the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->members_.m_finish; }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->members_.m_finish; }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(this->members_.m_finish); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->members_.m_finish); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(this->members_.m_start); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->members_.m_start); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->members_.m_start; }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->members_.m_finish; }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->members_.m_finish); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->members_.m_start); }
-
- //////////////////////////////////////////////
- //
- // capacity
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns true if the deque contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->members_.m_finish == this->members_.m_start; }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->members_.m_finish - this->members_.m_start; }
-
- //! <b>Effects</b>: Returns the largest possible size of the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return allocator_traits_type::max_size(this->alloc()); }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are value initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type new_size)
- {
- const size_type len = size();
- if (new_size < len)
- this->priv_erase_last_n(len - new_size);
- else{
- const size_type n = new_size - this->size();
- dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
- priv_insert_back_aux_impl(n, proxy);
- }
- }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are default initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- //!
- //! <b>Note</b>: Non-standard extension
- void resize(size_type new_size, default_init_t)
- {
- const size_type len = size();
- if (new_size < len)
- this->priv_erase_last_n(len - new_size);
- else{
- const size_type n = new_size - this->size();
- dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
- priv_insert_back_aux_impl(n, proxy);
- }
- }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are copy constructed from x.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type new_size, const value_type& x)
- {
- const size_type len = size();
- if (new_size < len)
- this->erase(this->members_.m_start + new_size, this->members_.m_finish);
- else
- this->insert(this->members_.m_finish, new_size - len, x);
- }
-
- //! <b>Effects</b>: Tries to deallocate the excess of memory created
- //! with previous allocations. The size of the deque is unchanged
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Constant.
- void shrink_to_fit()
- {
- //This deque implementation already
- //deallocates excess nodes when erasing
- //so there is nothing to do except for
- //empty deque
- if(this->empty()){
- this->priv_clear_map();
- }
- }
-
- //////////////////////////////////////////////
- //
- // element access
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the first
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference front() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *this->members_.m_start;
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the first element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *this->members_.m_start;
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the last
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *(end()-1);
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the last
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *(cend()-1);
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() > n);
- return this->members_.m_start[difference_type(n)];
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a const reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() > n);
- return this->members_.m_start[difference_type(n)];
- }
-
- //! <b>Requires</b>: size() >= n.
- //!
- //! <b>Effects</b>: Returns an iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() >= n);
- return iterator(this->begin()+n);
- }
-
- //! <b>Requires</b>: size() >= n.
- //!
- //! <b>Effects</b>: Returns a const_iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() >= n);
- return const_iterator(this->cbegin()+n);
- }
-
- //! <b>Requires</b>: begin() <= p <= end().
- //!
- //! <b>Effects</b>: Returns the index of the element pointed by p
- //! and size() if p == end().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- //Range checked priv_index_of
- return this->priv_index_of(p);
- }
-
- //! <b>Requires</b>: begin() <= p <= end().
- //!
- //! <b>Effects</b>: Returns the index of the element pointed by p
- //! and size() if p == end().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- //Range checked priv_index_of
- return this->priv_index_of(p);
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: std::range_error if n >= size()
- //!
- //! <b>Complexity</b>: Constant.
- reference at(size_type n)
- {
- this->priv_throw_if_out_of_range(n);
- return (*this)[n];
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a const reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: std::range_error if n >= size()
- //!
- //! <b>Complexity</b>: Constant.
- const_reference at(size_type n) const
- {
- this->priv_throw_if_out_of_range(n);
- return (*this)[n];
- }
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the beginning of the deque.
- //!
- //! <b>Returns</b>: A reference to the created object.
- //!
- //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time
- template <class... Args>
- reference emplace_front(BOOST_FWD_REF(Args)... args)
- {
- if(this->priv_push_front_simple_available()){
- reference r = *this->priv_push_front_simple_pos();
- allocator_traits_type::construct
- ( this->alloc()
- , this->priv_push_front_simple_pos()
- , boost::forward<Args>(args)...);
- this->priv_push_front_simple_commit();
- return r;
- }
- else{
- typedef dtl::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
- return *this->priv_insert_front_aux_impl(1, type(boost::forward<Args>(args)...));
- }
- }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the end of the deque.
- //!
- //! <b>Returns</b>: A reference to the created object.
- //!
- //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time
- template <class... Args>
- reference emplace_back(BOOST_FWD_REF(Args)... args)
- {
- if(this->priv_push_back_simple_available()){
- reference r = *this->priv_push_back_simple_pos();
- allocator_traits_type::construct
- ( this->alloc()
- , this->priv_push_back_simple_pos()
- , boost::forward<Args>(args)...);
- this->priv_push_back_simple_commit();
- return r;
- }
- else{
- typedef dtl::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
- return *this->priv_insert_back_aux_impl(1, type(boost::forward<Args>(args)...));
- }
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... before p
- //!
- //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
- //!
- //! <b>Complexity</b>: If p is end(), amortized constant time
- //! Linear time otherwise.
- template <class... Args>
- iterator emplace(const_iterator p, BOOST_FWD_REF(Args)... args)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- if(p == this->cbegin()){
- this->emplace_front(boost::forward<Args>(args)...);
- return this->begin();
- }
- else if(p == this->cend()){
- this->emplace_back(boost::forward<Args>(args)...);
- return (this->end()-1);
- }
- else{
- typedef dtl::insert_emplace_proxy<Allocator, iterator, Args...> type;
- return this->priv_insert_aux_impl(p, 1, type(boost::forward<Args>(args)...));
- }
- }
-
- #else //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_DEQUE_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
- reference emplace_front(BOOST_MOVE_UREF##N)\
- {\
- if(priv_push_front_simple_available()){\
- reference r = *this->priv_push_front_simple_pos();\
- allocator_traits_type::construct\
- ( this->alloc(), this->priv_push_front_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- priv_push_front_simple_commit();\
- return r;\
- }\
- else{\
- typedef dtl::insert_nonmovable_emplace_proxy##N\
- <Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
- return *priv_insert_front_aux_impl(1, type(BOOST_MOVE_FWD##N));\
- }\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
- reference emplace_back(BOOST_MOVE_UREF##N)\
- {\
- if(priv_push_back_simple_available()){\
- reference r = *this->priv_push_back_simple_pos();\
- allocator_traits_type::construct\
- ( this->alloc(), this->priv_push_back_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- priv_push_back_simple_commit();\
- return r;\
- }\
- else{\
- typedef dtl::insert_nonmovable_emplace_proxy##N\
- <Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
- return *priv_insert_back_aux_impl(1, type(BOOST_MOVE_FWD##N));\
- }\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
- iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- BOOST_ASSERT(this->priv_in_range_or_end(p));\
- if(p == this->cbegin()){\
- this->emplace_front(BOOST_MOVE_FWD##N);\
- return this->begin();\
- }\
- else if(p == cend()){\
- this->emplace_back(BOOST_MOVE_FWD##N);\
- return (--this->end());\
- }\
- else{\
- typedef dtl::insert_emplace_proxy_arg##N\
- <Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
- return this->priv_insert_aux_impl(p, 1, type(BOOST_MOVE_FWD##N));\
- }\
- }
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DEQUE_EMPLACE_CODE)
- #undef BOOST_CONTAINER_DEQUE_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x at the front of the deque.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_front(const T &x);
-
- //! <b>Effects</b>: Constructs a new element in the front of the deque
- //! and moves the resources of x to this new element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_front(T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x at the end of the deque.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_back(const T &x);
-
- //! <b>Effects</b>: Constructs a new element in the end of the deque
- //! and moves the resources of x to this new element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_back(T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of x before p.
- //!
- //! <b>Returns</b>: an iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
- //!
- //! <b>Complexity</b>: If p is end(), amortized constant time
- //! Linear time otherwise.
- iterator insert(const_iterator p, const T &x);
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a new element before p with x's resources.
- //!
- //! <b>Returns</b>: an iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: If p is end(), amortized constant time
- //! Linear time otherwise.
- iterator insert(const_iterator p, T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: pos must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert n copies of x before pos.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or pos if n is 0.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- iterator insert(const_iterator pos, size_type n, const value_type& x)
- {
- //Range check of p is done by insert()
- typedef constant_iterator<value_type, difference_type> c_it;
- return this->insert(pos, c_it(x, n), c_it());
- }
-
- //! <b>Requires</b>: pos must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or pos if first == last.
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced InIt throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to distance [first, last).
- template <class InIt>
- iterator insert(const_iterator pos, InIt first, InIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<InIt, size_type>
- , dtl::is_not_input_iterator<InIt>
- >::type * = 0
- #endif
- )
- {
- BOOST_ASSERT(this->priv_in_range_or_end(pos));
- size_type n = 0;
- iterator it(pos.unconst());
- for(;first != last; ++first, ++n){
- it = this->emplace(it, *first);
- ++it;
- }
- it -= n;
- return it;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Requires</b>: pos must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before pos.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or pos if il.begin() == il.end().
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced std::initializer_list throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to distance [il.begin(), il.end()).
- iterator insert(const_iterator pos, std::initializer_list<value_type> il)
- {
- //Range check os pos is done in insert()
- return insert(pos, il.begin(), il.end());
- }
-#endif
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class FwdIt>
- iterator insert(const_iterator p, FwdIt first, FwdIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<FwdIt, size_type>
- , dtl::is_input_iterator<FwdIt>
- >::type * = 0
- #endif
- )
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- dtl::insert_range_proxy<Allocator, FwdIt, iterator> proxy(first);
- return priv_insert_aux_impl(p, boost::container::iterator_distance(first, last), proxy);
- }
- #endif
-
- //! <b>Effects</b>: Removes the first element from the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- void pop_front() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- if (this->members_.m_start.m_cur != this->members_.m_start.m_last - 1) {
- allocator_traits_type::destroy
- ( this->alloc()
- , boost::movelib::to_raw_pointer(this->members_.m_start.m_cur)
- );
- ++this->members_.m_start.m_cur;
- }
- else
- this->priv_pop_front_aux();
- }
-
- //! <b>Effects</b>: Removes the last element from the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- if (this->members_.m_finish.m_cur != this->members_.m_finish.m_first) {
- --this->members_.m_finish.m_cur;
- allocator_traits_type::destroy
- ( this->alloc()
- , boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur)
- );
- }
- else
- this->priv_pop_back_aux();
- }
-
- //! <b>Effects</b>: Erases the element at p.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements between pos and the
- //! last element (if pos is near the end) or the first element
- //! if(pos is near the beginning).
- //! Constant if pos is the first or the last element.
- iterator erase(const_iterator pos) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->priv_in_range(pos));
- iterator next = pos.unconst();
- ++next;
- size_type index = pos - this->members_.m_start;
- if (index < (this->size()/2)) {
- boost::container::move_backward(this->begin(), pos.unconst(), next);
- pop_front();
- }
- else {
- boost::container::move(next, this->end(), pos.unconst());
- pop_back();
- }
- return this->members_.m_start + index;
- }
-
- //! <b>Effects</b>: Erases the elements pointed by [first, last).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the distance between first and
- //! last plus the elements between pos and the
- //! last element (if pos is near the end) or the first element
- //! if(pos is near the beginning).
- iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(first == last ||
- (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last)));
- if (first == this->members_.m_start && last == this->members_.m_finish) {
- this->clear();
- return this->members_.m_finish;
- }
- else {
- const size_type n = static_cast<size_type>(last - first);
- const size_type elems_before = static_cast<size_type>(first - this->members_.m_start);
- if (elems_before < (this->size() - n) - elems_before) {
- boost::container::move_backward(begin(), first.unconst(), last.unconst());
- iterator new_start = this->members_.m_start + n;
- this->priv_destroy_range(this->members_.m_start, new_start);
- this->priv_destroy_nodes(this->members_.m_start.m_node, new_start.m_node);
- this->members_.m_start = new_start;
- }
- else {
- boost::container::move(last.unconst(), end(), first.unconst());
- iterator new_finish = this->members_.m_finish - n;
- this->priv_destroy_range(new_finish, this->members_.m_finish);
- this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1);
- this->members_.m_finish = new_finish;
- }
- return this->members_.m_start + elems_before;
- }
- }
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- void swap(deque &x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
- || allocator_traits_type::is_always_equal::value)
- {
- this->swap_members(x);
- dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
- dtl::swap_alloc(this->alloc(), x.alloc(), flag);
- dtl::swap_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
- }
-
- //! <b>Effects</b>: Erases all the elements of the deque.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the deque.
- void clear() BOOST_NOEXCEPT_OR_NOTHROW
- {
- for (index_pointer node = this->members_.m_start.m_node + 1;
- node < this->members_.m_finish.m_node;
- ++node) {
- this->priv_destroy_range(*node, *node + this->s_buffer_size());
- this->priv_deallocate_node(*node);
- }
-
- if (this->members_.m_start.m_node != this->members_.m_finish.m_node) {
- this->priv_destroy_range(this->members_.m_start.m_cur, this->members_.m_start.m_last);
- this->priv_destroy_range(this->members_.m_finish.m_first, this->members_.m_finish.m_cur);
- this->priv_deallocate_node(this->members_.m_finish.m_first);
- }
- else
- this->priv_destroy_range(this->members_.m_start.m_cur, this->members_.m_finish.m_cur);
-
- this->members_.m_finish = this->members_.m_start;
- }
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const deque& x, const deque& y)
- { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const deque& x, const deque& y)
- { return !(x == y); }
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const deque& x, const deque& y)
- { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const deque& x, const deque& y)
- { return y < x; }
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const deque& x, const deque& y)
- { return !(y < x); }
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const deque& x, const deque& y)
- { return !(x < y); }
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(deque& x, deque& y)
- { x.swap(y); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
-
- size_type priv_index_of(const_iterator p) const
- {
- BOOST_ASSERT(this->cbegin() <= p);
- BOOST_ASSERT(p <= this->cend());
- return static_cast<size_type>(p - this->cbegin());
- }
-
- void priv_erase_last_n(size_type n)
- {
- if(n == this->size()) {
- this->clear();
- }
- else {
- iterator new_finish = this->members_.m_finish - n;
- this->priv_destroy_range(new_finish, this->members_.m_finish);
- this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1);
- this->members_.m_finish = new_finish;
- }
- }
-
- void priv_throw_if_out_of_range(size_type n) const
- {
- if (n >= this->size())
- throw_out_of_range("deque::at out of range");
- }
-
- bool priv_in_range(const_iterator pos) const
- {
- return (this->begin() <= pos) && (pos < this->end());
- }
-
- bool priv_in_range_or_end(const_iterator pos) const
- {
- return (this->begin() <= pos) && (pos <= this->end());
- }
-
- template <class U>
- iterator priv_insert(const_iterator p, BOOST_FWD_REF(U) x)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- if (p == cbegin()){
- this->push_front(::boost::forward<U>(x));
- return begin();
- }
- else if (p == cend()){
- this->push_back(::boost::forward<U>(x));
- return --end();
- }
- else {
- return priv_insert_aux_impl
- ( p, (size_type)1
- , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
- }
- }
-
- template <class U>
- void priv_push_front(BOOST_FWD_REF(U) x)
- {
- if(this->priv_push_front_simple_available()){
- allocator_traits_type::construct
- ( this->alloc(), this->priv_push_front_simple_pos(), ::boost::forward<U>(x));
- this->priv_push_front_simple_commit();
- }
- else{
- priv_insert_aux_impl
- ( this->cbegin(), (size_type)1
- , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
- }
- }
-
- template <class U>
- void priv_push_back(BOOST_FWD_REF(U) x)
- {
- if(this->priv_push_back_simple_available()){
- allocator_traits_type::construct
- ( this->alloc(), this->priv_push_back_simple_pos(), ::boost::forward<U>(x));
- this->priv_push_back_simple_commit();
- }
- else{
- priv_insert_aux_impl
- ( this->cend(), (size_type)1
- , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
- }
- }
-
- bool priv_push_back_simple_available() const
- {
- return this->members_.m_map &&
- (this->members_.m_finish.m_cur != (this->members_.m_finish.m_last - 1));
- }
-
- T *priv_push_back_simple_pos() const
- {
- return boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur);
- }
-
- void priv_push_back_simple_commit()
- {
- ++this->members_.m_finish.m_cur;
- }
-
- bool priv_push_front_simple_available() const
- {
- return this->members_.m_map &&
- (this->members_.m_start.m_cur != this->members_.m_start.m_first);
- }
-
- T *priv_push_front_simple_pos() const
- { return boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - 1; }
-
- void priv_push_front_simple_commit()
- { --this->members_.m_start.m_cur; }
-
- void priv_destroy_range(iterator p, iterator p2)
- {
- if(!Base::traits_t::trivial_dctr){
- for(;p != p2; ++p){
- allocator_traits_type::destroy(this->alloc(), boost::movelib::iterator_to_raw_pointer(p));
- }
- }
- }
-
- void priv_destroy_range(pointer p, pointer p2)
- {
- if(!Base::traits_t::trivial_dctr){
- for(;p != p2; ++p){
- allocator_traits_type::destroy(this->alloc(), boost::movelib::iterator_to_raw_pointer(p));
- }
- }
- }
-
- template<class InsertProxy>
- iterator priv_insert_aux_impl(const_iterator p, size_type n, InsertProxy proxy)
- {
- iterator pos(p.unconst());
- const size_type pos_n = p - this->cbegin();
- if(!this->members_.m_map){
- this->priv_initialize_map(0);
- pos = this->begin();
- }
-
- const size_type elemsbefore = static_cast<size_type>(pos - this->members_.m_start);
- const size_type length = this->size();
- if (elemsbefore < length / 2) {
- const iterator new_start = this->priv_reserve_elements_at_front(n);
- const iterator old_start = this->members_.m_start;
- if(!elemsbefore){
- proxy.uninitialized_copy_n_and_update(this->alloc(), new_start, n);
- this->members_.m_start = new_start;
- }
- else{
- pos = this->members_.m_start + elemsbefore;
- if (elemsbefore >= n) {
- const iterator start_n = this->members_.m_start + n;
- ::boost::container::uninitialized_move_alloc
- (this->alloc(), this->members_.m_start, start_n, new_start);
- this->members_.m_start = new_start;
- boost::container::move(start_n, pos, old_start);
- proxy.copy_n_and_update(this->alloc(), pos - n, n);
- }
- else {
- const size_type mid_count = n - elemsbefore;
- const iterator mid_start = old_start - mid_count;
- proxy.uninitialized_copy_n_and_update(this->alloc(), mid_start, mid_count);
- this->members_.m_start = mid_start;
- ::boost::container::uninitialized_move_alloc
- (this->alloc(), old_start, pos, new_start);
- this->members_.m_start = new_start;
- proxy.copy_n_and_update(this->alloc(), old_start, elemsbefore);
- }
- }
- }
- else {
- const iterator new_finish = this->priv_reserve_elements_at_back(n);
- const iterator old_finish = this->members_.m_finish;
- const size_type elemsafter = length - elemsbefore;
- if(!elemsafter){
- proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, n);
- this->members_.m_finish = new_finish;
- }
- else{
- pos = old_finish - elemsafter;
- if (elemsafter >= n) {
- iterator finish_n = old_finish - difference_type(n);
- ::boost::container::uninitialized_move_alloc
- (this->alloc(), finish_n, old_finish, old_finish);
- this->members_.m_finish = new_finish;
- boost::container::move_backward(pos, finish_n, old_finish);
- proxy.copy_n_and_update(this->alloc(), pos, n);
- }
- else {
- const size_type raw_gap = n - elemsafter;
- ::boost::container::uninitialized_move_alloc
- (this->alloc(), pos, old_finish, old_finish + raw_gap);
- BOOST_TRY{
- proxy.copy_n_and_update(this->alloc(), pos, elemsafter);
- proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, raw_gap);
- }
- BOOST_CATCH(...){
- this->priv_destroy_range(old_finish, old_finish + elemsafter);
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- this->members_.m_finish = new_finish;
- }
- }
- }
- return this->begin() + pos_n;
- }
-
- template <class InsertProxy>
- iterator priv_insert_back_aux_impl(size_type n, InsertProxy proxy)
- {
- if(!this->members_.m_map){
- this->priv_initialize_map(0);
- }
-
- iterator new_finish = this->priv_reserve_elements_at_back(n);
- iterator old_finish = this->members_.m_finish;
- proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, n);
- this->members_.m_finish = new_finish;
- return iterator(this->members_.m_finish - n);
- }
-
- template <class InsertProxy>
- iterator priv_insert_front_aux_impl(size_type n, InsertProxy proxy)
- {
- if(!this->members_.m_map){
- this->priv_initialize_map(0);
- }
-
- iterator new_start = this->priv_reserve_elements_at_front(n);
- proxy.uninitialized_copy_n_and_update(this->alloc(), new_start, n);
- this->members_.m_start = new_start;
- return new_start;
- }
-
- iterator priv_fill_insert(const_iterator pos, size_type n, const value_type& x)
- {
- typedef constant_iterator<value_type, difference_type> c_it;
- return this->insert(pos, c_it(x, n), c_it());
- }
-
- // Precondition: this->members_.m_start and this->members_.m_finish have already been initialized,
- // but none of the deque's elements have yet been constructed.
- void priv_fill_initialize(const value_type& value)
- {
- index_pointer cur = this->members_.m_start.m_node;
- BOOST_TRY {
- for ( ; cur < this->members_.m_finish.m_node; ++cur){
- boost::container::uninitialized_fill_alloc
- (this->alloc(), *cur, *cur + this->s_buffer_size(), value);
- }
- boost::container::uninitialized_fill_alloc
- (this->alloc(), this->members_.m_finish.m_first, this->members_.m_finish.m_cur, value);
- }
- BOOST_CATCH(...){
- this->priv_destroy_range(this->members_.m_start, iterator(*cur, cur));
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
-
- template <class InIt>
- void priv_range_initialize(InIt first, InIt last, typename iterator_enable_if_tag<InIt, std::input_iterator_tag>::type* =0)
- {
- this->priv_initialize_map(0);
- BOOST_TRY {
- for ( ; first != last; ++first)
- this->emplace_back(*first);
- }
- BOOST_CATCH(...){
- this->clear();
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
-
- template <class FwdIt>
- void priv_range_initialize(FwdIt first, FwdIt last, typename iterator_disable_if_tag<FwdIt, std::input_iterator_tag>::type* =0)
- {
- size_type n = 0;
- n = boost::container::iterator_distance(first, last);
- this->priv_initialize_map(n);
-
- index_pointer cur_node = this->members_.m_start.m_node;
- BOOST_TRY {
- for (; cur_node < this->members_.m_finish.m_node; ++cur_node) {
- FwdIt mid = first;
- boost::container::iterator_advance(mid, this->s_buffer_size());
- ::boost::container::uninitialized_copy_alloc(this->alloc(), first, mid, *cur_node);
- first = mid;
- }
- ::boost::container::uninitialized_copy_alloc(this->alloc(), first, last, this->members_.m_finish.m_first);
- }
- BOOST_CATCH(...){
- this->priv_destroy_range(this->members_.m_start, iterator(*cur_node, cur_node));
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
-
- // Called only if this->members_.m_finish.m_cur == this->members_.m_finish.m_first.
- void priv_pop_back_aux() BOOST_NOEXCEPT_OR_NOTHROW
- {
- this->priv_deallocate_node(this->members_.m_finish.m_first);
- this->members_.m_finish.priv_set_node(this->members_.m_finish.m_node - 1);
- this->members_.m_finish.m_cur = this->members_.m_finish.m_last - 1;
- allocator_traits_type::destroy
- ( this->alloc()
- , boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur)
- );
- }
-
- // Called only if this->members_.m_start.m_cur == this->members_.m_start.m_last - 1. Note that
- // if the deque has at least one element (a precondition for this member
- // function), and if this->members_.m_start.m_cur == this->members_.m_start.m_last, then the deque
- // must have at least two nodes.
- void priv_pop_front_aux() BOOST_NOEXCEPT_OR_NOTHROW
- {
- allocator_traits_type::destroy
- ( this->alloc()
- , boost::movelib::to_raw_pointer(this->members_.m_start.m_cur)
- );
- this->priv_deallocate_node(this->members_.m_start.m_first);
- this->members_.m_start.priv_set_node(this->members_.m_start.m_node + 1);
- this->members_.m_start.m_cur = this->members_.m_start.m_first;
- }
-
- iterator priv_reserve_elements_at_front(size_type n)
- {
- size_type vacancies = this->members_.m_start.m_cur - this->members_.m_start.m_first;
- if (n > vacancies){
- size_type new_elems = n-vacancies;
- size_type new_nodes = (new_elems + this->s_buffer_size() - 1) /
- this->s_buffer_size();
- size_type s = (size_type)(this->members_.m_start.m_node - this->members_.m_map);
- if (new_nodes > s){
- this->priv_reallocate_map(new_nodes, true);
- }
- size_type i = 1;
- BOOST_TRY {
- for (; i <= new_nodes; ++i)
- *(this->members_.m_start.m_node - i) = this->priv_allocate_node();
- }
- BOOST_CATCH(...) {
- for (size_type j = 1; j < i; ++j)
- this->priv_deallocate_node(*(this->members_.m_start.m_node - j));
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
- return this->members_.m_start - difference_type(n);
- }
-
- iterator priv_reserve_elements_at_back(size_type n)
- {
- size_type vacancies = (this->members_.m_finish.m_last - this->members_.m_finish.m_cur) - 1;
- if (n > vacancies){
- size_type new_elems = n - vacancies;
- size_type new_nodes = (new_elems + this->s_buffer_size() - 1)/s_buffer_size();
- size_type s = (size_type)(this->members_.m_map_size - (this->members_.m_finish.m_node - this->members_.m_map));
- if (new_nodes + 1 > s){
- this->priv_reallocate_map(new_nodes, false);
- }
- size_type i = 1;
- BOOST_TRY {
- for (; i <= new_nodes; ++i)
- *(this->members_.m_finish.m_node + i) = this->priv_allocate_node();
- }
- BOOST_CATCH(...) {
- for (size_type j = 1; j < i; ++j)
- this->priv_deallocate_node(*(this->members_.m_finish.m_node + j));
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
- return this->members_.m_finish + difference_type(n);
- }
-
- void priv_reallocate_map(size_type nodes_to_add, bool add_at_front)
- {
- size_type old_num_nodes = this->members_.m_finish.m_node - this->members_.m_start.m_node + 1;
- size_type new_num_nodes = old_num_nodes + nodes_to_add;
-
- index_pointer new_nstart;
- if (this->members_.m_map_size > 2 * new_num_nodes) {
- new_nstart = this->members_.m_map + (this->members_.m_map_size - new_num_nodes) / 2
- + (add_at_front ? nodes_to_add : 0);
- if (new_nstart < this->members_.m_start.m_node)
- boost::container::move(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart);
- else
- boost::container::move_backward
- (this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart + old_num_nodes);
- }
- else {
- size_type new_map_size =
- this->members_.m_map_size + dtl::max_value(this->members_.m_map_size, nodes_to_add) + 2;
-
- index_pointer new_map = this->priv_allocate_map(new_map_size);
- new_nstart = new_map + (new_map_size - new_num_nodes) / 2
- + (add_at_front ? nodes_to_add : 0);
- boost::container::move(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart);
- this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size);
-
- this->members_.m_map = new_map;
- this->members_.m_map_size = new_map_size;
- }
-
- this->members_.m_start.priv_set_node(new_nstart);
- this->members_.m_finish.priv_set_node(new_nstart + old_num_nodes - 1);
- }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-template <typename InputIterator>
-deque(InputIterator, InputIterator) -> deque<typename iterator_traits<InputIterator>::value_type>;
-template <typename InputIterator, typename Allocator>
-deque(InputIterator, InputIterator, Allocator const&) -> deque<typename iterator_traits<InputIterator>::value_type, Allocator>;
-#endif
-
-}}
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace boost {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class T, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::deque<T, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value;
-};
-
-}
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // #ifndef BOOST_CONTAINER_DEQUE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/adaptive_node_pool_impl.hpp b/src/third_party/boost-1.68.0/boost/container/detail/adaptive_node_pool_impl.hpp
deleted file mode 100644
index a92ba98b826..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/adaptive_node_pool_impl.hpp
+++ /dev/null
@@ -1,1259 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP
-#define BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/throw_exception.hpp>
-// container/detail
-#include <boost/container/detail/pool_common.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/move/detail/iterator_to_raw_pointer.hpp>
-#include <boost/container/detail/math_functions.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/container/detail/type_traits.hpp>
-// intrusive
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/set.hpp>
-#include <boost/intrusive/list.hpp>
-#include <boost/intrusive/slist.hpp>
-// other
-#include <boost/assert.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-#include <cstddef>
-
-namespace boost {
-namespace container {
-
-namespace adaptive_pool_flag {
-
-static const unsigned int none = 0u;
-static const unsigned int align_only = 1u << 0u;
-static const unsigned int size_ordered = 1u << 1u;
-static const unsigned int address_ordered = 1u << 2u;
-
-} //namespace adaptive_pool_flag{
-
-namespace dtl {
-
-template<class size_type>
-struct hdr_offset_holder_t
-{
- hdr_offset_holder_t(size_type offset = 0)
- : hdr_offset(offset)
- {}
- size_type hdr_offset;
-};
-
-template<class SizeType, unsigned int Flags>
-struct less_func;
-
-template<class SizeType>
-struct less_func<SizeType, adaptive_pool_flag::none>
-{
- static bool less(SizeType, SizeType, const void *, const void *)
- { return true; }
-};
-
-template<class SizeType>
-struct less_func<SizeType, adaptive_pool_flag::size_ordered>
-{
- static bool less(SizeType ls, SizeType rs, const void *, const void *)
- { return ls < rs; }
-};
-
-template<class SizeType>
-struct less_func<SizeType, adaptive_pool_flag::address_ordered>
-{
- static bool less(SizeType, SizeType, const void *la, const void *ra)
- { return la < ra; }
-};
-
-template<class SizeType>
-struct less_func<SizeType, adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered>
-{
- static bool less(SizeType ls, SizeType rs, const void *la, const void *ra)
- { return (ls < rs) || ((ls == rs) && (la < ra)); }
-};
-
-template<class VoidPointer, class SizeType, unsigned OrderFlags>
-struct block_container_traits
-{
- typedef typename bi::make_set_base_hook
- < bi::void_pointer<VoidPointer>
- , bi::optimize_size<true>
- , bi::link_mode<bi::normal_link> >::type hook_t;
-
- template<class T>
- struct container
- {
- typedef typename bi::make_multiset
- <T, bi::base_hook<hook_t>, bi::size_type<SizeType> >::type type;
- };
-
- template<class Container>
- static void reinsert_was_used(Container &container, typename Container::reference v, bool)
- {
- typedef typename Container::const_iterator const_block_iterator;
- typedef typename Container::iterator block_iterator;
- typedef typename Container::value_compare value_compare;
-
- const block_iterator this_block(Container::s_iterator_to(v));
- const const_block_iterator cendit(container.cend());
- block_iterator next_block(this_block);
-
- if(++next_block != cendit && value_compare()(*next_block, v)){
- const_block_iterator next2_block(next_block);
- //Test if v should be swapped with next (optimization)
- if(++next2_block == cendit || !value_compare()(*next2_block, v)){
- v.swap_nodes(*next_block);
- BOOST_ASSERT(++next_block == this_block);
- }
- else{
- container.erase(this_block);
- container.insert(v);
- }
- }
- }
-
- template<class Container>
- static void insert_was_empty(Container &container, typename Container::value_type &v, bool)
- {
- container.insert(v);
- }
-
- template<class Container>
- static void erase_first(Container &container)
- {
- container.erase(container.cbegin());
- }
-
- template<class Container>
- static void erase_last(Container &container)
- {
- container.erase(--container.cend());
- }
-};
-
-template<class VoidPointer, class SizeType>
-struct block_container_traits<VoidPointer, SizeType, 0u>
-{
- typedef typename bi::make_list_base_hook
- < bi::void_pointer<VoidPointer>
- , bi::link_mode<bi::normal_link> >::type hook_t;
-
- template<class T>
- struct container
- {
- typedef typename bi::make_list
- <T, bi::base_hook<hook_t>, bi::size_type<SizeType>, bi::constant_time_size<false> >::type type;
- };
-
- template<class Container>
- static void reinsert_was_used(Container &container, typename Container::value_type &v, bool is_full)
- {
- if(is_full){
- container.erase(Container::s_iterator_to(v));
- container.push_back(v);
- }
- }
-
- template<class Container>
- static void insert_was_empty(Container &container, typename Container::value_type &v, bool is_full)
- {
- if(is_full){
- container.push_back(v);
- }
- else{
- container.push_front(v);
- }
- }
-
- template<class Container>
- static void erase_first(Container &container)
- {
- container.pop_front();
- }
-
- template<class Container>
- static void erase_last(Container &container)
- {
- container.pop_back();
- }
-};
-
-/////////////////////////////
-//
-// adaptive_pool_types
-//
-/////////////////////////////
-template<class MultiallocationChain, class VoidPointer, class SizeType, unsigned int Flags>
-struct adaptive_pool_types
-{
- typedef VoidPointer void_pointer;
- static const unsigned ordered = (Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered));
- typedef block_container_traits<VoidPointer, SizeType, ordered> block_container_traits_t;
- typedef typename block_container_traits_t::hook_t hook_t;
- typedef hdr_offset_holder_t<SizeType> hdr_offset_holder;
- static const unsigned int order_flags = Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered);
- typedef MultiallocationChain free_nodes_t;
-
- struct block_info_t
- : public hdr_offset_holder,
- public hook_t
- {
- //An intrusive list of free node from this block
- free_nodes_t free_nodes;
- friend bool operator <(const block_info_t &l, const block_info_t &r)
- {
- return less_func<SizeType, order_flags>::
- less(l.free_nodes.size(), r.free_nodes.size(), &l , &r);
- }
-
- friend bool operator ==(const block_info_t &l, const block_info_t &r)
- { return &l == &r; }
- };
- typedef typename block_container_traits_t:: template container<block_info_t>::type block_container_t;
-};
-
-
-/////////////////////////////////////////////
-//
-// candidate_power_of_2_ct
-//
-/////////////////////////////////////////////
-template< std::size_t alignment
- , std::size_t real_node_size
- , std::size_t payload_per_allocation
- , std::size_t min_elements_per_block
- , std::size_t hdr_size
- , std::size_t hdr_offset_size
- , std::size_t overhead_percent>
-struct candidate_power_of_2_ct_helper
-{
- static const std::size_t hdr_subblock_elements_alone = (alignment - hdr_size - payload_per_allocation)/real_node_size;
- static const std::size_t hdr_subblock_elements_first = (alignment - hdr_size - payload_per_allocation)/real_node_size;
- static const std::size_t elements_per_b_subblock_mid = (alignment - hdr_offset_size)/real_node_size;
- static const std::size_t elements_per_b_subblock_end = (alignment - hdr_offset_size - payload_per_allocation)/real_node_size;
- static const std::size_t num_b_subblock =
- hdr_subblock_elements_alone >= min_elements_per_block
- ? 0
- : ( ((hdr_subblock_elements_first + elements_per_b_subblock_end) >= min_elements_per_block)
- ? 1
- : 2 + (min_elements_per_block - hdr_subblock_elements_first - elements_per_b_subblock_end - 1)/elements_per_b_subblock_mid
- )
- ;
-
- static const std::size_t num_b_subblock_mid = (num_b_subblock > 1) ? (num_b_subblock - 1) : 0;
-
- static const std::size_t total_nodes = (num_b_subblock == 0)
- ? hdr_subblock_elements_alone
- : ( (num_b_subblock == 1)
- ? (hdr_subblock_elements_first + elements_per_b_subblock_end)
- : (hdr_subblock_elements_first + num_b_subblock_mid*elements_per_b_subblock_mid + elements_per_b_subblock_end)
- )
- ;
- static const std::size_t total_data = total_nodes*real_node_size;
- static const std::size_t total_size = alignment*(num_b_subblock+1);
- static const bool overhead_satisfied = (total_size - total_data)*100/total_size < overhead_percent;
-};
-
-template< std::size_t initial_alignment
- , std::size_t real_node_size
- , std::size_t payload_per_allocation
- , std::size_t min_elements_per_block
- , std::size_t hdr_size
- , std::size_t hdr_offset_size
- , std::size_t overhead_percent
- , bool Loop = true>
-struct candidate_power_of_2_ct
-{
- typedef candidate_power_of_2_ct_helper
- < initial_alignment
- , real_node_size
- , payload_per_allocation
- , min_elements_per_block
- , hdr_size
- , hdr_offset_size
- , overhead_percent> helper_t;
-
- static const std::size_t candidate_power_of_2 = initial_alignment << std::size_t(!helper_t::overhead_satisfied);
-
- typedef typename candidate_power_of_2_ct
- < candidate_power_of_2
- , real_node_size
- , payload_per_allocation
- , min_elements_per_block
- , hdr_size
- , hdr_offset_size
- , overhead_percent
- , !helper_t::overhead_satisfied
- >::type type;
-
- static const std::size_t alignment = type::alignment;
- static const std::size_t num_subblocks = type::num_subblocks;
- static const std::size_t real_num_node = type::real_num_node;
-};
-
-template< std::size_t initial_alignment
- , std::size_t real_node_size
- , std::size_t payload_per_allocation
- , std::size_t min_elements_per_block
- , std::size_t hdr_size
- , std::size_t hdr_offset_size
- , std::size_t overhead_percent
- >
-struct candidate_power_of_2_ct
- < initial_alignment
- , real_node_size
- , payload_per_allocation
- , min_elements_per_block
- , hdr_size
- , hdr_offset_size
- , overhead_percent
- , false>
-{
- typedef candidate_power_of_2_ct
- < initial_alignment
- , real_node_size
- , payload_per_allocation
- , min_elements_per_block
- , hdr_size
- , hdr_offset_size
- , overhead_percent
- , false> type;
-
- typedef candidate_power_of_2_ct_helper
- < initial_alignment
- , real_node_size
- , payload_per_allocation
- , min_elements_per_block
- , hdr_size
- , hdr_offset_size
- , overhead_percent> helper_t;
-
- static const std::size_t alignment = initial_alignment;
- static const std::size_t num_subblocks = helper_t::num_b_subblock+1;
- static const std::size_t real_num_node = helper_t::total_nodes;
-};
-
-/////////////////////////////////////////////
-//
-// candidate_power_of_2_rt
-//
-/////////////////////////////////////////////
-void candidate_power_of_2_rt ( std::size_t initial_alignment
- , std::size_t real_node_size
- , std::size_t payload_per_allocation
- , std::size_t min_elements_per_block
- , std::size_t hdr_size
- , std::size_t hdr_offset_size
- , std::size_t overhead_percent
- , std::size_t &alignment
- , std::size_t &num_subblocks
- , std::size_t &real_num_node)
-{
- bool overhead_satisfied = false;
- std::size_t num_b_subblock = 0;
- std::size_t total_nodes = 0;
-
- while(!overhead_satisfied)
- {
- std::size_t hdr_subblock_elements_alone = (initial_alignment - hdr_size - payload_per_allocation)/real_node_size;
- std::size_t hdr_subblock_elements_first = (initial_alignment - hdr_size - payload_per_allocation)/real_node_size;
- std::size_t elements_per_b_subblock_mid = (initial_alignment - hdr_offset_size)/real_node_size;
- std::size_t elements_per_b_subblock_end = (initial_alignment - hdr_offset_size - payload_per_allocation)/real_node_size;
-
- num_b_subblock =
- hdr_subblock_elements_alone >= min_elements_per_block
- ? 0
- : ( ((hdr_subblock_elements_first + elements_per_b_subblock_end) >= min_elements_per_block)
- ? 1
- : 2 + (min_elements_per_block - hdr_subblock_elements_first - elements_per_b_subblock_end - 1)/elements_per_b_subblock_mid
- )
- ;
-
- std::size_t num_b_subblock_mid = (num_b_subblock > 1) ? (num_b_subblock - 1) : 0;
-
- total_nodes = (num_b_subblock == 0)
- ? hdr_subblock_elements_alone
- : ( (num_b_subblock == 1)
- ? (hdr_subblock_elements_first + elements_per_b_subblock_end)
- : (hdr_subblock_elements_first + num_b_subblock_mid*elements_per_b_subblock_mid + elements_per_b_subblock_end)
- )
- ;
- std::size_t total_data = total_nodes*real_node_size;
- std::size_t total_size = initial_alignment*(num_b_subblock+1);
- overhead_satisfied = (total_size - total_data)*100/total_size < overhead_percent;
- initial_alignment = initial_alignment << std::size_t(!overhead_satisfied);
- }
- alignment = initial_alignment;
- num_subblocks = num_b_subblock+1;
- real_num_node = total_nodes;
-}
-
-/////////////////////////////////////////////
-//
-// private_adaptive_node_pool_impl_common
-//
-/////////////////////////////////////////////
-template< class SegmentManagerBase, unsigned int Flags>
-class private_adaptive_node_pool_impl_common
-{
- public:
- //!Segment manager typedef
- typedef SegmentManagerBase segment_manager_base_type;
- typedef typename SegmentManagerBase::multiallocation_chain multiallocation_chain;
- typedef typename SegmentManagerBase::size_type size_type;
- //Flags
- //align_only
- static const bool AlignOnly = (Flags & adaptive_pool_flag::align_only) != 0;
- typedef bool_<AlignOnly> IsAlignOnly;
- typedef true_ AlignOnlyTrue;
- typedef false_ AlignOnlyFalse;
-
- typedef typename SegmentManagerBase::void_pointer void_pointer;
- static const typename SegmentManagerBase::
- size_type PayloadPerAllocation = SegmentManagerBase::PayloadPerAllocation;
-
- typedef typename boost::intrusive::pointer_traits
- <void_pointer>::template rebind_pointer<segment_manager_base_type>::type segment_mngr_base_ptr_t;
-
- protected:
- typedef adaptive_pool_types
- <multiallocation_chain, void_pointer, size_type, Flags> adaptive_pool_types_t;
- typedef typename adaptive_pool_types_t::free_nodes_t free_nodes_t;
- typedef typename adaptive_pool_types_t::block_info_t block_info_t;
- typedef typename adaptive_pool_types_t::block_container_t block_container_t;
- typedef typename adaptive_pool_types_t::block_container_traits_t block_container_traits_t;
- typedef typename block_container_t::iterator block_iterator;
- typedef typename block_container_t::const_iterator const_block_iterator;
- typedef typename adaptive_pool_types_t::hdr_offset_holder hdr_offset_holder;
- typedef private_adaptive_node_pool_impl_common this_type;
-
- static const size_type MaxAlign = alignment_of<void_pointer>::value;
- static const size_type HdrSize = ((sizeof(block_info_t)-1)/MaxAlign+1)*MaxAlign;
- static const size_type HdrOffsetSize = ((sizeof(hdr_offset_holder)-1)/MaxAlign+1)*MaxAlign;
-
- segment_mngr_base_ptr_t mp_segment_mngr_base; //Segment manager
- block_container_t m_block_container; //Intrusive block list
- size_type m_totally_free_blocks; //Free blocks
-
- class block_destroyer;
- friend class block_destroyer;
-
- class block_destroyer
- {
- public:
- block_destroyer(const this_type *impl, multiallocation_chain &chain, const size_type num_subblocks, const size_type real_block_alignment, const size_type real_num_node)
- : mp_impl(impl), m_chain(chain), m_num_subblocks(num_subblocks), m_real_block_alignment(real_block_alignment), m_real_num_node(real_num_node)
- {}
-
- void operator()(typename block_container_t::pointer to_deallocate)
- { return this->do_destroy(to_deallocate, IsAlignOnly()); }
-
- private:
- void do_destroy(typename block_container_t::pointer to_deallocate, AlignOnlyTrue)
- {
- BOOST_ASSERT(to_deallocate->free_nodes.size() == m_real_num_node);
- m_chain.push_back(to_deallocate);
- }
-
- void do_destroy(typename block_container_t::pointer to_deallocate, AlignOnlyFalse)
- {
- BOOST_ASSERT(to_deallocate->free_nodes.size() == m_real_num_node);
- BOOST_ASSERT(0 == to_deallocate->hdr_offset);
- hdr_offset_holder *hdr_off_holder =
- mp_impl->priv_first_subblock_from_block(boost::movelib::to_raw_pointer(to_deallocate), m_num_subblocks, m_real_block_alignment);
- m_chain.push_back(hdr_off_holder);
- }
-
- const this_type *mp_impl;
- multiallocation_chain &m_chain;
- const size_type m_num_subblocks;
- const size_type m_real_block_alignment;
- const size_type m_real_num_node;
- };
-
- //This macro will activate invariant checking. Slow, but helpful for debugging the code.
- //#define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
- void priv_invariants(const size_type real_num_node, const size_type num_subblocks, const size_type real_block_alignment) const
- {
- (void)real_num_node; (void)num_subblocks; (void)real_block_alignment;
- #ifdef BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
- //Check that the total totally free blocks are correct
- BOOST_ASSERT(m_block_container.size() >= m_totally_free_blocks);
-
- const const_block_iterator itend(m_block_container.cend());
- const const_block_iterator itbeg(m_block_container.cbegin());
-
- { //Try to do checks in a single iteration
- const_block_iterator it(itbeg);
- size_type total_free_nodes = 0;
- size_type total_free_blocks = 0u;
- for(; it != itend; ++it){
- if(it != itbeg){
- //Check order invariant
- const_block_iterator prev(it);
- --prev;
- BOOST_ASSERT(!(m_block_container.key_comp()(*it, *prev)));
- (void)prev; (void)it;
- }
-
- //free_nodes invariant
- const size_type free_nodes = it->free_nodes.size();
- BOOST_ASSERT(free_nodes <= real_num_node);
- BOOST_ASSERT(free_nodes != 0);
-
- //Acummulate total_free_nodes and total_free_blocks
- total_free_nodes += free_nodes;
- total_free_blocks += it->free_nodes.size() == real_num_node;
-
- if (!AlignOnly) {
- //Check that header offsets are correct
- hdr_offset_holder *hdr_off_holder = this->priv_first_subblock_from_block(const_cast<block_info_t *>(&*it), num_subblocks, real_block_alignment);
- for (size_type i = 0, max = num_subblocks; i < max; ++i) {
- const size_type offset = reinterpret_cast<char*>(const_cast<block_info_t *>(&*it)) - reinterpret_cast<char*>(hdr_off_holder);
- (void)offset;
- BOOST_ASSERT(hdr_off_holder->hdr_offset == offset);
- BOOST_ASSERT(0 == (reinterpret_cast<std::size_t>(hdr_off_holder) & (real_block_alignment - 1)));
- BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (real_block_alignment - 1)));
- hdr_off_holder = reinterpret_cast<hdr_offset_holder *>(reinterpret_cast<char*>(hdr_off_holder) + real_block_alignment);
- }
- }
- }
- BOOST_ASSERT(total_free_blocks == m_totally_free_blocks);
- BOOST_ASSERT(total_free_nodes >= m_totally_free_blocks*real_num_node);
- }
- #endif
- }
-
- void priv_deallocate_free_blocks( const size_type max_free_blocks, const size_type real_num_node
- , const size_type num_subblocks, const size_type real_block_alignment)
- { //Trampoline function to ease inlining
- if(m_totally_free_blocks > max_free_blocks){
- this->priv_deallocate_free_blocks_impl(max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
- }
- }
-
- hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block, const size_type num_subblocks, const size_type real_block_alignment) const
- { return this->priv_first_subblock_from_block(block, num_subblocks, real_block_alignment, IsAlignOnly()); }
-
- hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block, const size_type num_subblocks, const size_type real_block_alignment, AlignOnlyFalse) const
- {
- hdr_offset_holder *const hdr_off_holder = reinterpret_cast<hdr_offset_holder*>
- (reinterpret_cast<char*>(block) - (num_subblocks-1)*real_block_alignment);
- BOOST_ASSERT(hdr_off_holder->hdr_offset == size_type(reinterpret_cast<char*>(block) - reinterpret_cast<char*>(hdr_off_holder)));
- BOOST_ASSERT(0 == ((std::size_t)hdr_off_holder & (real_block_alignment - 1)));
- BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (real_block_alignment - 1)));
- return hdr_off_holder;
- }
-
- hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block, const size_type num_subblocks, const size_type real_block_alignment, AlignOnlyTrue) const
- {
- (void)num_subblocks; (void)real_block_alignment;
- return reinterpret_cast<hdr_offset_holder*>(block);
- }
-
- void priv_deallocate_free_blocks_impl( const size_type max_free_blocks, const size_type real_num_node
- , const size_type num_subblocks, const size_type real_block_alignment)
- {
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- //Now check if we've reached the free nodes limit
- //and check if we have free blocks. If so, deallocate as much
- //as we can to stay below the limit
- multiallocation_chain chain;
- {
- if(Flags & adaptive_pool_flag::size_ordered){
- const_block_iterator it = m_block_container.cend();
- --it;
- size_type totally_free_blocks = m_totally_free_blocks;
-
- for( ; totally_free_blocks > max_free_blocks; --totally_free_blocks){
- BOOST_ASSERT(it->free_nodes.size() == real_num_node);
- void *addr = priv_first_subblock_from_block(const_cast<block_info_t*>(&*it), num_subblocks, real_block_alignment);
- --it;
- block_container_traits_t::erase_last(m_block_container);
- chain.push_front(void_pointer(addr));
- }
- }
- else{
- const_block_iterator it = m_block_container.cend();
- size_type totally_free_blocks = m_totally_free_blocks;
-
- while(totally_free_blocks > max_free_blocks){
- --it;
- if(it->free_nodes.size() == real_num_node){
- void *addr = priv_first_subblock_from_block(const_cast<block_info_t*>(&*it), num_subblocks, real_block_alignment);
- it = m_block_container.erase(it);
- chain.push_front(void_pointer(addr));
- --totally_free_blocks;
- }
- }
- }
- BOOST_ASSERT((m_totally_free_blocks - max_free_blocks) == chain.size());
- m_totally_free_blocks = max_free_blocks;
- }
- this->mp_segment_mngr_base->deallocate_many(chain);
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- }
-
- void priv_fill_chain_remaining_to_block
- ( multiallocation_chain &chain, size_type target_elem_in_chain, block_info_t &c_info
- , char *mem_address, size_type max_node_in_mem
- , const size_type real_node_size)
- {
- BOOST_ASSERT(chain.size() <= target_elem_in_chain);
-
- //First add all possible nodes to the chain
- const size_type left = target_elem_in_chain - chain.size();
- const size_type add_to_chain = (max_node_in_mem < left) ? max_node_in_mem : left;
- char *free_mem_address = static_cast<char *>(boost::movelib::to_raw_pointer
- (chain.incorporate_after(chain.last(), void_pointer(mem_address), real_node_size, add_to_chain)));
- //Now store remaining nodes in the free list
- if(const size_type free = max_node_in_mem - add_to_chain){
- free_nodes_t & free_nodes = c_info.free_nodes;
- free_nodes.incorporate_after(free_nodes.last(), void_pointer(free_mem_address), real_node_size, free);
- }
- }
-
- //!Allocates a several blocks of nodes. Can throw
- void priv_append_from_new_blocks( size_type min_elements, multiallocation_chain &chain
- , const size_type max_free_blocks
- , const size_type real_block_alignment, const size_type real_node_size
- , const size_type real_num_node, const size_type num_subblocks
- , AlignOnlyTrue)
- {
- (void)num_subblocks;
- BOOST_ASSERT(m_block_container.empty());
- BOOST_ASSERT(min_elements > 0);
- const size_type n = (min_elements - 1)/real_num_node + 1;
- const size_type real_block_size = real_block_alignment - PayloadPerAllocation;
- const size_type target_elem_in_chain = chain.size() + min_elements;
- for(size_type i = 0; i != n; ++i){
- //We allocate a new NodeBlock and put it the last
- //element of the tree
- char *mem_address = static_cast<char*>
- (mp_segment_mngr_base->allocate_aligned(real_block_size, real_block_alignment));
- if(!mem_address){
- //In case of error, free memory deallocating all nodes (the new ones allocated
- //in this function plus previously stored nodes in chain).
- this->priv_deallocate_nodes(chain, max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
- throw_bad_alloc();
- }
- block_info_t &c_info = *new(mem_address)block_info_t();
- mem_address += HdrSize;
- this->priv_fill_chain_remaining_to_block(chain, target_elem_in_chain, c_info, mem_address, real_num_node, real_node_size);
- const size_type free_nodes = c_info.free_nodes.size();
- if(free_nodes){
- const bool is_full = free_nodes == real_num_node;
- BOOST_ASSERT(free_nodes < real_num_node);
- m_totally_free_blocks += static_cast<size_type>(is_full);
- block_container_traits_t::insert_was_empty(m_block_container, c_info, is_full);
- }
- }
- }
-
- void priv_append_from_new_blocks( size_type min_elements, multiallocation_chain &chain
- , const size_type max_free_blocks
- , const size_type real_block_alignment, const size_type real_node_size
- , const size_type real_num_node, const size_type num_subblocks
- , AlignOnlyFalse)
- {
- BOOST_ASSERT(m_block_container.empty());
- BOOST_ASSERT(min_elements > 0);
- const size_type n = (min_elements - 1)/real_num_node + 1;
- const size_type real_block_size = real_block_alignment*num_subblocks - PayloadPerAllocation;
- const size_type elements_per_subblock_mid = (real_block_alignment - HdrOffsetSize)/real_node_size;
- const size_type elements_per_subblock_end = (real_block_alignment - HdrOffsetSize - PayloadPerAllocation) / real_node_size;
- const size_type hdr_subblock_elements = (real_block_alignment - HdrSize - PayloadPerAllocation)/real_node_size;
- const size_type target_elem_in_chain = chain.size() + min_elements;
-
- for(size_type i = 0; i != n; ++i){
- //We allocate a new NodeBlock and put it the last
- //element of the tree
- char *mem_address = static_cast<char*>
- (mp_segment_mngr_base->allocate_aligned(real_block_size, real_block_alignment));
- if(!mem_address){
- //In case of error, free memory deallocating all nodes (the new ones allocated
- //in this function plus previously stored nodes in chain).
- this->priv_deallocate_nodes(chain, max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
- throw_bad_alloc();
- }
- //First initialize header information on the last subblock
- char *hdr_addr = mem_address + real_block_alignment*(num_subblocks-1);
- block_info_t &c_info = *new(hdr_addr)block_info_t();
- //Some structural checks
- BOOST_ASSERT(static_cast<void*>(&static_cast<hdr_offset_holder&>(c_info).hdr_offset) ==
- static_cast<void*>(&c_info)); (void)c_info;
- for( size_type subblock = 0, maxsubblock = num_subblocks - 1
- ; subblock < maxsubblock
- ; ++subblock, mem_address += real_block_alignment){
- //Initialize header offset mark
- new(mem_address) hdr_offset_holder(size_type(hdr_addr - mem_address));
- const size_type elements_per_subblock = (subblock != (maxsubblock - 1)) ? elements_per_subblock_mid : elements_per_subblock_end;
- this->priv_fill_chain_remaining_to_block
- (chain, target_elem_in_chain, c_info, mem_address + HdrOffsetSize, elements_per_subblock, real_node_size);
- }
- this->priv_fill_chain_remaining_to_block
- (chain, target_elem_in_chain, c_info, hdr_addr + HdrSize, hdr_subblock_elements, real_node_size);
- m_totally_free_blocks += static_cast<size_type>(c_info.free_nodes.size() == real_num_node);
- if (c_info.free_nodes.size())
- m_block_container.push_front(c_info);
- }
- }
-
- //!Allocates array of count elements. Can throw
- void *priv_allocate_node( const size_type max_free_blocks, const size_type real_block_alignment, const size_type real_node_size
- , const size_type real_num_node, const size_type num_subblocks)
- {
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- //If there are no free nodes we allocate a new block
- if(!m_block_container.empty()){
- //We take the first free node the multiset can't be empty
- free_nodes_t &free_nodes = m_block_container.begin()->free_nodes;
- BOOST_ASSERT(!free_nodes.empty());
- const size_type free_nodes_count = free_nodes.size();
- void *first_node = boost::movelib::to_raw_pointer(free_nodes.pop_front());
- if(free_nodes.empty()){
- block_container_traits_t::erase_first(m_block_container);
- }
- m_totally_free_blocks -= static_cast<size_type>(free_nodes_count == real_num_node);
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- return first_node;
- }
- else{
- multiallocation_chain chain;
- this->priv_append_from_new_blocks
- (1, chain, max_free_blocks, real_block_alignment, real_node_size, real_num_node, num_subblocks, IsAlignOnly());
- void *node = boost::movelib::to_raw_pointer(chain.pop_front());
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- return node;
- }
- }
-
- void priv_allocate_nodes( const size_type n, multiallocation_chain &chain
- , const size_type max_free_blocks, const size_type real_block_alignment, const size_type real_node_size
- , const size_type real_num_node, const size_type num_subblocks)
- {
- size_type i = 0;
- BOOST_TRY{
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- while(i != n){
- //If there are no free nodes we allocate all needed blocks
- if (m_block_container.empty()){
- this->priv_append_from_new_blocks
- (n - i, chain, max_free_blocks, real_block_alignment, real_node_size, real_num_node, num_subblocks, IsAlignOnly());
- BOOST_ASSERT(m_block_container.empty() || (++m_block_container.cbegin() == m_block_container.cend()));
- BOOST_ASSERT(chain.size() == n);
- break;
- }
- free_nodes_t &free_nodes = m_block_container.begin()->free_nodes;
- const size_type free_nodes_count_before = free_nodes.size();
- m_totally_free_blocks -= static_cast<size_type>(free_nodes_count_before == real_num_node);
- const size_type num_left = n-i;
- const size_type num_elems = (num_left < free_nodes_count_before) ? num_left : free_nodes_count_before;
- typedef typename free_nodes_t::iterator free_nodes_iterator;
-
- if(num_left < free_nodes_count_before){
- const free_nodes_iterator it_bbeg(free_nodes.before_begin());
- free_nodes_iterator it_bend(it_bbeg);
- for(size_type j = 0; j != num_elems; ++j){
- ++it_bend;
- }
- free_nodes_iterator it_end = it_bend; ++it_end;
- free_nodes_iterator it_beg = it_bbeg; ++it_beg;
- free_nodes.erase_after(it_bbeg, it_end, num_elems);
- chain.incorporate_after(chain.last(), &*it_beg, &*it_bend, num_elems);
- //chain.splice_after(chain.last(), free_nodes, it_bbeg, it_bend, num_elems);
- BOOST_ASSERT(!free_nodes.empty());
- }
- else{
- const free_nodes_iterator it_beg(free_nodes.begin()), it_bend(free_nodes.last());
- free_nodes.clear();
- chain.incorporate_after(chain.last(), &*it_beg, &*it_bend, num_elems);
- block_container_traits_t::erase_first(m_block_container);
- }
- i += num_elems;
- }
- }
- BOOST_CATCH(...){
- this->priv_deallocate_nodes(chain, max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- }
-
- //!Deallocates an array pointed by ptr. Never throws
- void priv_deallocate_node( void *pElem
- , const size_type max_free_blocks, const size_type real_num_node
- , const size_type num_subblocks, const size_type real_block_alignment)
- {
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- block_info_t &block_info = *this->priv_block_from_node(pElem, real_block_alignment);
- const size_type prev_free_nodes = block_info.free_nodes.size();
- BOOST_ASSERT(block_info.free_nodes.size() < real_num_node);
-
- //We put the node at the beginning of the free node list
- block_info.free_nodes.push_back(void_pointer(pElem));
-
- //The loop reinserts all blocks except the last one
- this->priv_reinsert_block(block_info, prev_free_nodes == 0, real_num_node);
- this->priv_deallocate_free_blocks(max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- }
-
- void priv_deallocate_nodes( multiallocation_chain &nodes
- , const size_type max_free_blocks, const size_type real_num_node
- , const size_type num_subblocks, const size_type real_block_alignment)
- {
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- //To take advantage of node locality, wait until two
- //nodes belong to different blocks. Only then reinsert
- //the block of the first node in the block tree.
- //Cache of the previous block
- block_info_t *prev_block_info = 0;
-
- //If block was empty before this call, it's not already
- //inserted in the block tree.
- bool prev_block_was_empty = false;
- typedef typename free_nodes_t::iterator free_nodes_iterator;
- {
- const free_nodes_iterator itbb(nodes.before_begin()), ite(nodes.end());
- free_nodes_iterator itf(nodes.begin()), itbf(itbb);
- size_type splice_node_count = size_type(-1);
- while(itf != ite){
- void *pElem = boost::movelib::to_raw_pointer(boost::movelib::iterator_to_raw_pointer(itf));
- block_info_t &block_info = *this->priv_block_from_node(pElem, real_block_alignment);
- BOOST_ASSERT(block_info.free_nodes.size() < real_num_node);
- ++splice_node_count;
-
- //If block change is detected calculate the cached block position in the tree
- if(&block_info != prev_block_info){
- if(prev_block_info){ //Make sure we skip the initial "dummy" cache
- free_nodes_iterator it(itbb); ++it;
- nodes.erase_after(itbb, itf, splice_node_count);
- prev_block_info->free_nodes.incorporate_after(prev_block_info->free_nodes.last(), &*it, &*itbf, splice_node_count);
- this->priv_reinsert_block(*prev_block_info, prev_block_was_empty, real_num_node);
- splice_node_count = 0;
- }
- //Update cache with new data
- prev_block_was_empty = block_info.free_nodes.empty();
- prev_block_info = &block_info;
- }
- itbf = itf;
- ++itf;
- }
- }
- if(prev_block_info){
- //The loop reinserts all blocks except the last one
- const free_nodes_iterator itfirst(nodes.begin()), itlast(nodes.last());
- const size_type splice_node_count = nodes.size();
- nodes.clear();
- prev_block_info->free_nodes.incorporate_after(prev_block_info->free_nodes.last(), &*itfirst, &*itlast, splice_node_count);
- this->priv_reinsert_block(*prev_block_info, prev_block_was_empty, real_num_node);
- this->priv_deallocate_free_blocks(max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
- }
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- }
-
- void priv_reinsert_block(block_info_t &prev_block_info, const bool prev_block_was_empty, const size_type real_num_node)
- {
- //Cache the free nodes from the block
- const size_type this_block_free_nodes = prev_block_info.free_nodes.size();
- const bool is_full = this_block_free_nodes == real_num_node;
-
- //Update free block count
- m_totally_free_blocks += static_cast<size_type>(is_full);
- if(prev_block_was_empty){
- block_container_traits_t::insert_was_empty(m_block_container, prev_block_info, is_full);
- }
- else{
- block_container_traits_t::reinsert_was_used(m_block_container, prev_block_info, is_full);
- }
- }
-
- block_info_t *priv_block_from_node(void *node, const size_type real_block_alignment, AlignOnlyFalse) const
- {
- hdr_offset_holder *hdr_off_holder =
- reinterpret_cast<hdr_offset_holder*>((std::size_t)node & size_type(~(real_block_alignment - 1)));
- BOOST_ASSERT(0 == ((std::size_t)hdr_off_holder & (real_block_alignment - 1)));
- BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (real_block_alignment - 1)));
- block_info_t *block = reinterpret_cast<block_info_t *>
- (reinterpret_cast<char*>(hdr_off_holder) + hdr_off_holder->hdr_offset);
- BOOST_ASSERT(block->hdr_offset == 0);
- return block;
- }
-
- block_info_t *priv_block_from_node(void *node, const size_type real_block_alignment, AlignOnlyTrue) const
- {
- return (block_info_t *)((std::size_t)node & std::size_t(~(real_block_alignment - 1)));
- }
-
- block_info_t *priv_block_from_node(void *node, const size_type real_block_alignment) const
- { return this->priv_block_from_node(node, real_block_alignment, IsAlignOnly()); }
-
- //!Deallocates all used memory. Never throws
- void priv_clear(const size_type num_subblocks, const size_type real_block_alignment, const size_type real_num_node)
- {
- #ifndef NDEBUG
- block_iterator it = m_block_container.begin();
- block_iterator itend = m_block_container.end();
- size_type n_free_nodes = 0;
- for(; it != itend; ++it){
- //Check for memory leak
- BOOST_ASSERT(it->free_nodes.size() == real_num_node);
- ++n_free_nodes;
- }
- BOOST_ASSERT(n_free_nodes == m_totally_free_blocks);
- #endif
- //Check for memory leaks
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- multiallocation_chain chain;
- m_block_container.clear_and_dispose(block_destroyer(this, chain, num_subblocks, real_block_alignment, real_num_node));
- this->mp_segment_mngr_base->deallocate_many(chain);
- m_totally_free_blocks = 0;
- this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
- }
-
- public:
- private_adaptive_node_pool_impl_common(segment_manager_base_type *segment_mngr_base)
- //General purpose allocator
- : mp_segment_mngr_base(segment_mngr_base)
- , m_block_container()
- , m_totally_free_blocks(0)
- {}
-
- size_type num_free_nodes()
- {
- typedef typename block_container_t::const_iterator citerator;
- size_type count = 0;
- citerator it (m_block_container.begin()), itend(m_block_container.end());
- for(; it != itend; ++it){
- count += it->free_nodes.size();
- }
- return count;
- }
-
- void swap(private_adaptive_node_pool_impl_common &other)
- {
- std::swap(mp_segment_mngr_base, other.mp_segment_mngr_base);
- std::swap(m_totally_free_blocks, other.m_totally_free_blocks);
- m_block_container.swap(other.m_block_container);
- }
-
- //!Returns the segment manager. Never throws
- segment_manager_base_type* get_segment_manager_base()const
- { return boost::movelib::to_raw_pointer(mp_segment_mngr_base); }
-};
-
-template< class SizeType
- , std::size_t HdrSize
- , std::size_t PayloadPerAllocation
- , std::size_t RealNodeSize
- , std::size_t NodesPerBlock
- , std::size_t HdrOffsetSize
- , std::size_t OverheadPercent
- , bool AlignOnly>
-struct calculate_alignment_ct
-{
- static const std::size_t alignment = upper_power_of_2_ct<SizeType, HdrSize + RealNodeSize*NodesPerBlock>::value;
- static const std::size_t num_subblocks = 0;
- static const std::size_t real_num_node = (alignment - PayloadPerAllocation - HdrSize)/RealNodeSize;
-};
-
-template< class SizeType
- , std::size_t HdrSize
- , std::size_t PayloadPerAllocation
- , std::size_t RealNodeSize
- , std::size_t NodesPerBlock
- , std::size_t HdrOffsetSize
- , std::size_t OverheadPercent>
-struct calculate_alignment_ct
- < SizeType
- , HdrSize
- , PayloadPerAllocation
- , RealNodeSize
- , NodesPerBlock
- , HdrOffsetSize
- , OverheadPercent
- , false>
-{
- typedef typename candidate_power_of_2_ct
- < upper_power_of_2_ct<SizeType, HdrSize + PayloadPerAllocation + RealNodeSize>::value
- , RealNodeSize
- , PayloadPerAllocation
- , NodesPerBlock
- , HdrSize
- , HdrOffsetSize
- , OverheadPercent
- >::type type;
-
- static const std::size_t alignment = type::alignment;
- static const std::size_t num_subblocks = type::num_subblocks;
- static const std::size_t real_num_node = type::real_num_node;
-};
-
-
-/////////////////////////////////////////////
-//
-// private_adaptive_node_pool_impl_ct
-//
-/////////////////////////////////////////////
-template< class SegmentManagerBase
- , std::size_t MaxFreeBlocks
- , std::size_t NodeSize
- , std::size_t NodesPerBlock
- , std::size_t OverheadPercent
- , unsigned int Flags>
-class private_adaptive_node_pool_impl_ct
- : public private_adaptive_node_pool_impl_common<SegmentManagerBase, Flags>
-{
- typedef private_adaptive_node_pool_impl_common<SegmentManagerBase, Flags> base_t;
-
- //Non-copyable
- private_adaptive_node_pool_impl_ct();
- private_adaptive_node_pool_impl_ct(const private_adaptive_node_pool_impl_ct &);
- private_adaptive_node_pool_impl_ct &operator=(const private_adaptive_node_pool_impl_ct &);
-
- public:
- typedef typename base_t::void_pointer void_pointer;
- typedef typename base_t::size_type size_type;
- typedef typename base_t::multiallocation_chain multiallocation_chain;
- typedef typename base_t::segment_manager_base_type segment_manager_base_type;
-
- static const typename base_t::size_type PayloadPerAllocation = base_t::PayloadPerAllocation;
-
- //align_only
- static const bool AlignOnly = base_t::AlignOnly;
-
- private:
- static const size_type MaxAlign = base_t::MaxAlign;
- static const size_type HdrSize = base_t::HdrSize;
- static const size_type HdrOffsetSize = base_t::HdrOffsetSize;
-
- static const size_type RealNodeSize = lcm_ct<NodeSize, alignment_of<void_pointer>::value>::value;
-
- typedef calculate_alignment_ct
- < size_type, HdrSize, PayloadPerAllocation
- , RealNodeSize, NodesPerBlock, HdrOffsetSize, OverheadPercent, AlignOnly> data_t;
-
- //Round the size to a power of two value.
- //This is the total memory size (including payload) that we want to
- //allocate from the general-purpose allocator
- static const size_type NumSubBlocks = data_t::num_subblocks;
- static const size_type RealNumNode = data_t::real_num_node;
- static const size_type RealBlockAlignment = data_t::alignment;
-
- public:
-
- //!Constructor from a segment manager. Never throws
- private_adaptive_node_pool_impl_ct(typename base_t::segment_manager_base_type *segment_mngr_base)
- //General purpose allocator
- : base_t(segment_mngr_base)
- {}
-
- //!Destructor. Deallocates all allocated blocks. Never throws
- ~private_adaptive_node_pool_impl_ct()
- { this->priv_clear(NumSubBlocks, data_t::alignment, RealNumNode); }
-
- size_type get_real_num_node() const
- { return RealNumNode; }
-
- //!Allocates array of count elements. Can throw
- void *allocate_node()
- {
- return this->priv_allocate_node
- (MaxFreeBlocks, data_t::alignment, RealNodeSize, RealNumNode, NumSubBlocks);
- }
-
- //!Allocates n nodes.
- //!Can throw
- void allocate_nodes(const size_type n, multiallocation_chain &chain)
- {
- this->priv_allocate_nodes
- (n, chain, MaxFreeBlocks, data_t::alignment, RealNodeSize, RealNumNode, NumSubBlocks);
- }
-
- //!Deallocates an array pointed by ptr. Never throws
- void deallocate_node(void *pElem)
- {
- this->priv_deallocate_node(pElem, MaxFreeBlocks, RealNumNode, NumSubBlocks, RealBlockAlignment);
- }
-
- //!Deallocates a linked list of nodes. Never throws
- void deallocate_nodes(multiallocation_chain &nodes)
- {
- this->priv_deallocate_nodes(nodes, MaxFreeBlocks, RealNumNode, NumSubBlocks, data_t::alignment);
- }
-
- void deallocate_free_blocks()
- { this->priv_deallocate_free_blocks(0, RealNumNode, NumSubBlocks, data_t::alignment); }
-
- //Deprecated, use deallocate_free_blocks
- void deallocate_free_chunks()
- { this->priv_deallocate_free_blocks(0, RealNumNode, NumSubBlocks, data_t::alignment); }
-};
-
-/////////////////////////////////////////////
-//
-// private_adaptive_node_pool_impl_rt
-//
-/////////////////////////////////////////////
-template<class SizeType>
-struct private_adaptive_node_pool_impl_rt_data
-{
- typedef SizeType size_type;
-
- private_adaptive_node_pool_impl_rt_data(size_type max_free_blocks, size_type real_node_size)
- : m_max_free_blocks(max_free_blocks), m_real_node_size(real_node_size)
- , m_real_block_alignment(), m_num_subblocks(), m_real_num_node()
- {}
-
- const size_type m_max_free_blocks;
- const size_type m_real_node_size;
- //Round the size to a power of two value.
- //This is the total memory size (including payload) that we want to
- //allocate from the general-purpose allocator
- size_type m_real_block_alignment;
- size_type m_num_subblocks;
- //This is the real number of nodes per block
- size_type m_real_num_node;
-};
-
-
-template<class SegmentManagerBase, unsigned int Flags>
-class private_adaptive_node_pool_impl_rt
- : private private_adaptive_node_pool_impl_rt_data<typename SegmentManagerBase::size_type>
- , public private_adaptive_node_pool_impl_common<SegmentManagerBase, Flags>
-{
- typedef private_adaptive_node_pool_impl_common<SegmentManagerBase, Flags> impl_t;
- typedef private_adaptive_node_pool_impl_rt_data<typename SegmentManagerBase::size_type> data_t;
-
- //Non-copyable
- private_adaptive_node_pool_impl_rt();
- private_adaptive_node_pool_impl_rt(const private_adaptive_node_pool_impl_rt &);
- private_adaptive_node_pool_impl_rt &operator=(const private_adaptive_node_pool_impl_rt &);
-
- protected:
-
- typedef typename impl_t::void_pointer void_pointer;
- typedef typename impl_t::size_type size_type;
- typedef typename impl_t::multiallocation_chain multiallocation_chain;
-
- static const typename impl_t::size_type PayloadPerAllocation = impl_t::PayloadPerAllocation;
-
- //Flags
- //align_only
- static const bool AlignOnly = impl_t::AlignOnly;
-
- static const size_type HdrSize = impl_t::HdrSize;
- static const size_type HdrOffsetSize = impl_t::HdrOffsetSize;
-
- public:
-
- //!Segment manager typedef
- typedef SegmentManagerBase segment_manager_base_type;
-
- //!Constructor from a segment manager. Never throws
- private_adaptive_node_pool_impl_rt
- ( segment_manager_base_type *segment_mngr_base
- , size_type node_size
- , size_type nodes_per_block
- , size_type max_free_blocks
- , unsigned char overhead_percent
- )
- : data_t(max_free_blocks, lcm(node_size, size_type(alignment_of<void_pointer>::value)))
- , impl_t(segment_mngr_base)
- {
- if(AlignOnly){
- this->m_real_block_alignment = upper_power_of_2(HdrSize + this->m_real_node_size*nodes_per_block);
- this->m_real_num_node = (this->m_real_block_alignment - PayloadPerAllocation - HdrSize)/this->m_real_node_size;
- }
- else{
- candidate_power_of_2_rt ( upper_power_of_2(HdrSize + PayloadPerAllocation + this->m_real_node_size)
- , this->m_real_node_size
- , PayloadPerAllocation
- , nodes_per_block
- , HdrSize
- , HdrOffsetSize
- , overhead_percent
- , this->m_real_block_alignment
- , this->m_num_subblocks
- , this->m_real_num_node);
- }
- }
-
- //!Destructor. Deallocates all allocated blocks. Never throws
- ~private_adaptive_node_pool_impl_rt()
- { this->priv_clear(this->m_num_subblocks, this->m_real_block_alignment, this->m_real_num_node); }
-
- size_type get_real_num_node() const
- { return this->m_real_num_node; }
-
- //!Allocates array of count elements. Can throw
- void *allocate_node()
- {
- return this->priv_allocate_node
- (this->m_max_free_blocks, this->m_real_block_alignment, this->m_real_node_size, this->m_real_num_node, this->m_num_subblocks);
- }
-
- //!Allocates n nodes.
- //!Can throw
- void allocate_nodes(const size_type n, multiallocation_chain &chain)
- {
-
- this->priv_allocate_nodes
- (n, chain, this->m_max_free_blocks, this->m_real_block_alignment, this->m_real_node_size, this->m_real_num_node, this->m_num_subblocks);
- }
-
- //!Deallocates an array pointed by ptr. Never throws
- void deallocate_node(void *pElem)
- {
- this->priv_deallocate_node(pElem, this->m_max_free_blocks, this->m_real_num_node, this->m_num_subblocks, this->m_real_block_alignment);
- }
-
- //!Deallocates a linked list of nodes. Never throws
- void deallocate_nodes(multiallocation_chain &nodes)
- {
- this->priv_deallocate_nodes(nodes, this->m_max_free_blocks, this->m_real_num_node, this->m_num_subblocks, this->m_real_block_alignment);
- }
-
- void deallocate_free_blocks()
- { this->priv_deallocate_free_blocks(0, this->m_real_num_node, this->m_num_subblocks, this->m_real_block_alignment); }
-
- //Deprecated, use deallocate_free_blocks
- void deallocate_free_chunks()
- { this->priv_deallocate_free_blocks(0, this->m_real_num_node, this->m_num_subblocks, this->m_real_block_alignment); }
-};
-
-} //namespace dtl {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/advanced_insert_int.hpp b/src/third_party/boost-1.68.0/boost/container/detail/advanced_insert_int.hpp
deleted file mode 100644
index fc8a33a239f..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/advanced_insert_int.hpp
+++ /dev/null
@@ -1,495 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2008-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP
-#define BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/allocator_traits.hpp>
-// container/detail
-#include <boost/container/detail/copy_move_algo.hpp>
-#include <boost/container/detail/destroyers.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/move/detail/iterator_to_raw_pointer.hpp>
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-// move
-#include <boost/move/utility_core.hpp>
-// other
-#include <boost/assert.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-
-namespace boost { namespace container { namespace dtl {
-
-template<class Allocator, class FwdIt, class Iterator>
-struct move_insert_range_proxy
-{
- typedef typename allocator_traits<Allocator>::size_type size_type;
- typedef typename allocator_traits<Allocator>::value_type value_type;
-
- explicit move_insert_range_proxy(FwdIt first)
- : first_(first)
- {}
-
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)
- {
- this->first_ = ::boost::container::uninitialized_move_alloc_n_source
- (a, this->first_, n, p);
- }
-
- void copy_n_and_update(Allocator &, Iterator p, size_type n)
- {
- this->first_ = ::boost::container::move_n_source(this->first_, n, p);
- }
-
- FwdIt first_;
-};
-
-
-template<class Allocator, class FwdIt, class Iterator>
-struct insert_range_proxy
-{
- typedef typename allocator_traits<Allocator>::size_type size_type;
- typedef typename allocator_traits<Allocator>::value_type value_type;
-
- explicit insert_range_proxy(FwdIt first)
- : first_(first)
- {}
-
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)
- {
- this->first_ = ::boost::container::uninitialized_copy_alloc_n_source(a, this->first_, n, p);
- }
-
- void copy_n_and_update(Allocator &, Iterator p, size_type n)
- {
- this->first_ = ::boost::container::copy_n_source(this->first_, n, p);
- }
-
- FwdIt first_;
-};
-
-
-template<class Allocator, class Iterator>
-struct insert_n_copies_proxy
-{
- typedef typename allocator_traits<Allocator>::size_type size_type;
- typedef typename allocator_traits<Allocator>::value_type value_type;
-
- explicit insert_n_copies_proxy(const value_type &v)
- : v_(v)
- {}
-
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
- { boost::container::uninitialized_fill_alloc_n(a, v_, n, p); }
-
- void copy_n_and_update(Allocator &, Iterator p, size_type n) const
- {
- for (; 0 < n; --n, ++p){
- *p = v_;
- }
- }
-
- const value_type &v_;
-};
-
-template<class Allocator, class Iterator>
-struct insert_value_initialized_n_proxy
-{
- typedef ::boost::container::allocator_traits<Allocator> alloc_traits;
- typedef typename allocator_traits<Allocator>::size_type size_type;
- typedef typename allocator_traits<Allocator>::value_type value_type;
-
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
- { boost::container::uninitialized_value_init_alloc_n(a, n, p); }
-
- void copy_n_and_update(Allocator &a, Iterator p, size_type n) const
- {
- for (; 0 < n; --n, ++p){
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type stor;
- value_type &v = *static_cast<value_type *>(static_cast<void *>(stor.data));
- alloc_traits::construct(a, &v);
- value_destructor<Allocator> on_exit(a, v); (void)on_exit;
- *p = ::boost::move(v);
- }
- }
-};
-
-template<class Allocator, class Iterator>
-struct insert_default_initialized_n_proxy
-{
- typedef ::boost::container::allocator_traits<Allocator> alloc_traits;
- typedef typename allocator_traits<Allocator>::size_type size_type;
- typedef typename allocator_traits<Allocator>::value_type value_type;
-
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
- { boost::container::uninitialized_default_init_alloc_n(a, n, p); }
-
- void copy_n_and_update(Allocator &a, Iterator p, size_type n) const
- {
- if(!is_pod<value_type>::value){
- for (; 0 < n; --n, ++p){
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type stor;
- value_type &v = *static_cast<value_type *>(static_cast<void *>(stor.data));
- alloc_traits::construct(a, &v, default_init);
- value_destructor<Allocator> on_exit(a, v); (void)on_exit;
- *p = ::boost::move(v);
- }
- }
- }
-};
-
-template<class Allocator, class Iterator>
-struct insert_copy_proxy
-{
- typedef boost::container::allocator_traits<Allocator> alloc_traits;
- typedef typename alloc_traits::size_type size_type;
- typedef typename alloc_traits::value_type value_type;
-
- explicit insert_copy_proxy(const value_type &v)
- : v_(v)
- {}
-
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
- {
- BOOST_ASSERT(n == 1); (void)n;
- alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), v_);
- }
-
- void copy_n_and_update(Allocator &, Iterator p, size_type n) const
- {
- BOOST_ASSERT(n == 1); (void)n;
- *p = v_;
- }
-
- const value_type &v_;
-};
-
-
-template<class Allocator, class Iterator>
-struct insert_move_proxy
-{
- typedef boost::container::allocator_traits<Allocator> alloc_traits;
- typedef typename alloc_traits::size_type size_type;
- typedef typename alloc_traits::value_type value_type;
-
- explicit insert_move_proxy(value_type &v)
- : v_(v)
- {}
-
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
- {
- BOOST_ASSERT(n == 1); (void)n;
- alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::move(v_) );
- }
-
- void copy_n_and_update(Allocator &, Iterator p, size_type n) const
- {
- BOOST_ASSERT(n == 1); (void)n;
- *p = ::boost::move(v_);
- }
-
- value_type &v_;
-};
-
-template<class It, class Allocator>
-insert_move_proxy<Allocator, It> get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits<It>::value_type) v)
-{
- return insert_move_proxy<Allocator, It>(v);
-}
-
-template<class It, class Allocator>
-insert_copy_proxy<Allocator, It> get_insert_value_proxy(const typename boost::container::iterator_traits<It>::value_type &v)
-{
- return insert_copy_proxy<Allocator, It>(v);
-}
-
-}}} //namespace boost { namespace container { namespace dtl {
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-#include <boost/container/detail/variadic_templates_tools.hpp>
-#include <boost/move/utility_core.hpp>
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-template<class Allocator, class Iterator, class ...Args>
-struct insert_nonmovable_emplace_proxy
-{
- typedef boost::container::allocator_traits<Allocator> alloc_traits;
- typedef typename alloc_traits::size_type size_type;
- typedef typename alloc_traits::value_type value_type;
-
- typedef typename build_number_seq<sizeof...(Args)>::type index_tuple_t;
-
- explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args)
- : args_(args...)
- {}
-
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)
- { this->priv_uninitialized_copy_some_and_update(a, index_tuple_t(), p, n); }
-
- private:
- template<std::size_t ...IdxPack>
- void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, size_type n)
- {
- BOOST_ASSERT(n == 1); (void)n;
- alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::forward<Args>(get<IdxPack>(this->args_))... );
- }
-
- protected:
- tuple<Args&...> args_;
-};
-
-template<class Allocator, class Iterator, class ...Args>
-struct insert_emplace_proxy
- : public insert_nonmovable_emplace_proxy<Allocator, Iterator, Args...>
-{
- typedef insert_nonmovable_emplace_proxy<Allocator, Iterator, Args...> base_t;
- typedef boost::container::allocator_traits<Allocator> alloc_traits;
- typedef typename base_t::value_type value_type;
- typedef typename base_t::size_type size_type;
- typedef typename base_t::index_tuple_t index_tuple_t;
-
- explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args)
- : base_t(::boost::forward<Args>(args)...)
- {}
-
- void copy_n_and_update(Allocator &a, Iterator p, size_type n)
- { this->priv_copy_some_and_update(a, index_tuple_t(), p, n); }
-
- private:
-
- template<std::size_t ...IdxPack>
- void priv_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, size_type n)
- {
- BOOST_ASSERT(n ==1); (void)n;
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
- value_type *vp = static_cast<value_type *>(static_cast<void *>(v.data));
- alloc_traits::construct(a, vp,
- ::boost::forward<Args>(get<IdxPack>(this->args_))...);
- BOOST_TRY{
- *p = ::boost::move(*vp);
- }
- BOOST_CATCH(...){
- alloc_traits::destroy(a, vp);
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- alloc_traits::destroy(a, vp);
- }
-};
-
-//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type>
- : public insert_move_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy(typename boost::container::allocator_traits<Allocator>::value_type &&v)
- : insert_move_proxy<Allocator, Iterator>(v)
- {}
-};
-
-//We use "add_const" here as adding "const" only confuses MSVC12(and maybe later) provoking
-//compiler error C2752 ("more than one partial specialization matches").
-//Any problem is solvable with an extra layer of indirection? ;-)
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy<Allocator, Iterator
- , typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
- >
- : public insert_copy_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
- : insert_copy_proxy<Allocator, Iterator>(v)
- {}
-};
-
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type &>
- : public insert_copy_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
- : insert_copy_proxy<Allocator, Iterator>(v)
- {}
-};
-
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy<Allocator, Iterator
- , typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
- >
- : public insert_copy_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
- : insert_copy_proxy<Allocator, Iterator>(v)
- {}
-};
-
-}}} //namespace boost { namespace container { namespace dtl {
-
-#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-#include <boost/container/detail/value_init.hpp>
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-#define BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE(N) \
-template< class Allocator, class Iterator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
-struct insert_nonmovable_emplace_proxy##N\
-{\
- typedef boost::container::allocator_traits<Allocator> alloc_traits;\
- typedef typename alloc_traits::size_type size_type;\
- typedef typename alloc_traits::value_type value_type;\
- \
- explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\
- BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N {}\
- \
- void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)\
- {\
- BOOST_ASSERT(n == 1); (void)n;\
- alloc_traits::construct(a, boost::movelib::iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
- }\
- \
- void copy_n_and_update(Allocator &, Iterator, size_type)\
- { BOOST_ASSERT(false); }\
- \
- protected:\
- BOOST_MOVE_MREF##N\
-};\
-\
-template< class Allocator, class Iterator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
-struct insert_emplace_proxy_arg##N\
- : insert_nonmovable_emplace_proxy##N< Allocator, Iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N >\
-{\
- typedef insert_nonmovable_emplace_proxy##N\
- < Allocator, Iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N > base_t;\
- typedef typename base_t::value_type value_type;\
- typedef typename base_t::size_type size_type;\
- typedef boost::container::allocator_traits<Allocator> alloc_traits;\
- \
- explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\
- : base_t(BOOST_MOVE_FWD##N){}\
- \
- void copy_n_and_update(Allocator &a, Iterator p, size_type n)\
- {\
- BOOST_ASSERT(n == 1); (void)n;\
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
- BOOST_ASSERT((((size_type)(&v)) % alignment_of<value_type>::value) == 0);\
- value_type *vp = static_cast<value_type *>(static_cast<void *>(v.data));\
- alloc_traits::construct(a, vp BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
- BOOST_TRY{\
- *p = ::boost::move(*vp);\
- }\
- BOOST_CATCH(...){\
- alloc_traits::destroy(a, vp);\
- BOOST_RETHROW\
- }\
- BOOST_CATCH_END\
- alloc_traits::destroy(a, vp);\
- }\
-};\
-//
-BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE)
-#undef BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-
-//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy_arg1<Allocator, Iterator, ::boost::rv<typename boost::container::allocator_traits<Allocator>::value_type> >
- : public insert_move_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &v)
- : insert_move_proxy<Allocator, Iterator>(v)
- {}
-};
-
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type>
- : public insert_copy_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
- : insert_copy_proxy<Allocator, Iterator>(v)
- {}
-};
-
-#else //e.g. MSVC10 & MSVC11
-
-//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type>
- : public insert_move_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &&v)
- : insert_move_proxy<Allocator, Iterator>(v)
- {}
-};
-
-//We use "add_const" here as adding "const" only confuses MSVC10&11 provoking
-//compiler error C2752 ("more than one partial specialization matches").
-//Any problem is solvable with an extra layer of indirection? ;-)
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy_arg1<Allocator, Iterator
- , typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
- >
- : public insert_copy_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
- : insert_copy_proxy<Allocator, Iterator>(v)
- {}
-};
-
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type &>
- : public insert_copy_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
- : insert_copy_proxy<Allocator, Iterator>(v)
- {}
-};
-
-template<class Allocator, class Iterator>
-struct insert_emplace_proxy_arg1<Allocator, Iterator
- , typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
- >
- : public insert_copy_proxy<Allocator, Iterator>
-{
- explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
- : insert_copy_proxy<Allocator, Iterator>(v)
- {}
-};
-
-#endif
-
-}}} //namespace boost { namespace container { namespace dtl {
-
-#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/allocator_version_traits.hpp b/src/third_party/boost-1.68.0/boost/container/detail/allocator_version_traits.hpp
deleted file mode 100644
index 18460bdf082..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/allocator_version_traits.hpp
+++ /dev/null
@@ -1,162 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2012-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP
-#define BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-#include <boost/container/allocator_traits.hpp> //allocator_traits
-#include <boost/container/throw_exception.hpp>
-#include <boost/container/detail/multiallocation_chain.hpp> //multiallocation_chain
-#include <boost/container/detail/version_type.hpp> //version_type
-#include <boost/container/detail/allocation_type.hpp> //allocation_type
-#include <boost/container/detail/mpl.hpp> //integral_constant
-#include <boost/intrusive/pointer_traits.hpp> //pointer_traits
-#include <boost/core/no_exceptions_support.hpp> //BOOST_TRY
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-template<class Allocator, unsigned Version = boost::container::dtl::version<Allocator>::value>
-struct allocator_version_traits
-{
- typedef ::boost::container::dtl::integral_constant
- <unsigned, Version> alloc_version;
-
- typedef typename Allocator::multiallocation_chain multiallocation_chain;
-
- typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
-
- //Node allocation interface
- static pointer allocate_one(Allocator &a)
- { return a.allocate_one(); }
-
- static void deallocate_one(Allocator &a, const pointer &p)
- { a.deallocate_one(p); }
-
- static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m)
- { return a.allocate_individual(n, m); }
-
- static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
- { a.deallocate_individual(holder); }
-
- static pointer allocation_command(Allocator &a, allocation_type command,
- size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
- { return a.allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); }
-};
-
-template<class Allocator>
-struct allocator_version_traits<Allocator, 1>
-{
- typedef ::boost::container::dtl::integral_constant
- <unsigned, 1> alloc_version;
-
- typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
-
- typedef typename boost::intrusive::pointer_traits<pointer>::
- template rebind_pointer<void>::type void_ptr;
- typedef dtl::basic_multiallocation_chain
- <void_ptr> multialloc_cached_counted;
- typedef boost::container::dtl::
- transform_multiallocation_chain
- < multialloc_cached_counted, value_type> multiallocation_chain;
-
- //Node allocation interface
- static pointer allocate_one(Allocator &a)
- { return a.allocate(1); }
-
- static void deallocate_one(Allocator &a, const pointer &p)
- { a.deallocate(p, 1); }
-
- static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
- {
- size_type n = holder.size();
- typename multiallocation_chain::iterator it = holder.begin();
- while(n--){
- pointer p = boost::intrusive::pointer_traits<pointer>::pointer_to(*it);
- ++it;
- a.deallocate(p, 1);
- }
- }
-
- struct allocate_individual_rollback
- {
- allocate_individual_rollback(Allocator &a, multiallocation_chain &chain)
- : mr_a(a), mp_chain(&chain)
- {}
-
- ~allocate_individual_rollback()
- {
- if(mp_chain)
- allocator_version_traits::deallocate_individual(mr_a, *mp_chain);
- }
-
- void release()
- {
- mp_chain = 0;
- }
-
- Allocator &mr_a;
- multiallocation_chain * mp_chain;
- };
-
- static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m)
- {
- allocate_individual_rollback rollback(a, m);
- while(n--){
- m.push_front(a.allocate(1));
- }
- rollback.release();
- }
-
- static pointer allocation_command(Allocator &a, allocation_type command,
- size_type, size_type &prefer_in_recvd_out_size, pointer &reuse)
- {
- pointer ret = pointer();
- if(BOOST_UNLIKELY(!(command & allocate_new) && !(command & nothrow_allocation))){
- throw_logic_error("version 1 allocator without allocate_new flag");
- }
- else{
- BOOST_TRY{
- ret = a.allocate(prefer_in_recvd_out_size);
- }
- BOOST_CATCH(...){
- if(!(command & nothrow_allocation)){
- BOOST_RETHROW
- }
- }
- BOOST_CATCH_END
- reuse = pointer();
- }
- return ret;
- }
-};
-
-} //namespace dtl {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // ! defined(BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP)
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/compare_functors.hpp b/src/third_party/boost-1.68.0/boost/container/detail/compare_functors.hpp
deleted file mode 100644
index 28f9093b9a4..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/compare_functors.hpp
+++ /dev/null
@@ -1,74 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP
-#define BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace container {
-
-template<class Allocator>
-class equal_to_value
-{
- typedef typename Allocator::value_type value_type;
- const value_type &t_;
-
- public:
- explicit equal_to_value(const value_type &t)
- : t_(t)
- {}
-
- bool operator()(const value_type &t)const
- { return t_ == t; }
-};
-
-template<class Node, class Pred>
-struct value_to_node_compare
- : Pred
-{
- typedef Pred predicate_type;
- typedef Node node_type;
-
- value_to_node_compare()
- : Pred()
- {}
-
- explicit value_to_node_compare(Pred pred)
- : Pred(pred)
- {}
-
- bool operator()(const Node &a, const Node &b) const
- { return static_cast<const Pred&>(*this)(a.get_data(), b.get_data()); }
-
- bool operator()(const Node &a) const
- { return static_cast<const Pred&>(*this)(a.get_data()); }
-
- bool operator()(const Node &a, const Node &b)
- { return static_cast<Pred&>(*this)(a.get_data(), b.get_data()); }
-
- bool operator()(const Node &a)
- { return static_cast<Pred&>(*this)(a.get_data()); }
-
- predicate_type & predicate() { return static_cast<predicate_type&>(*this); }
- const predicate_type & predicate() const { return static_cast<predicate_type&>(*this); }
-};
-
-} //namespace container {
-} //namespace boost {
-
-#endif //BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/copy_move_algo.hpp b/src/third_party/boost-1.68.0/boost/container/detail/copy_move_algo.hpp
deleted file mode 100644
index f03800a6e02..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/copy_move_algo.hpp
+++ /dev/null
@@ -1,1154 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
-#define BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-// container
-#include <boost/container/allocator_traits.hpp>
-// container/detail
-#include <boost/container/detail/iterator.hpp>
-#include <boost/move/detail/iterator_to_raw_pointer.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/construct_in_place.hpp>
-
-// move
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/iterator.hpp>
-#include <boost/move/utility_core.hpp>
-// other
-#include <boost/core/no_exceptions_support.hpp>
-// std
-#include <cstring> //for memmove/memcpy
-
-#if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wclass-memaccess"
-#endif
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-template<class I>
-struct are_elements_contiguous
-{
- static const bool value = false;
-};
-
-/////////////////////////
-// raw pointers
-/////////////////////////
-
-template<class T>
-struct are_elements_contiguous<T*>
-{
- static const bool value = true;
-};
-
-/////////////////////////
-// move iterators
-/////////////////////////
-
-template<class It>
-struct are_elements_contiguous< ::boost::move_iterator<It> >
- : are_elements_contiguous<It>
-{};
-
-} //namespace dtl {
-
-/////////////////////////
-// predeclarations
-/////////////////////////
-
-template <class Pointer, bool IsConst>
-class vec_iterator;
-
-} //namespace container {
-
-namespace interprocess {
-
-template <class PointedType, class DifferenceType, class OffsetType, std::size_t OffsetAlignment>
-class offset_ptr;
-
-} //namespace interprocess {
-
-namespace container {
-
-namespace dtl {
-
-/////////////////////////
-//vector_[const_]iterator
-/////////////////////////
-
-template <class Pointer, bool IsConst>
-struct are_elements_contiguous<boost::container::vec_iterator<Pointer, IsConst> >
-{
- static const bool value = true;
-};
-
-/////////////////////////
-// offset_ptr
-/////////////////////////
-
-template <class PointedType, class DifferenceType, class OffsetType, std::size_t OffsetAlignment>
-struct are_elements_contiguous< ::boost::interprocess::offset_ptr<PointedType, DifferenceType, OffsetType, OffsetAlignment> >
-{
- static const bool value = true;
-};
-
-template <typename I, typename O>
-struct are_contiguous_and_same
- : boost::move_detail::and_
- < are_elements_contiguous<I>
- , are_elements_contiguous<O>
- , is_same< typename remove_const< typename ::boost::container::iterator_traits<I>::value_type >::type
- , typename ::boost::container::iterator_traits<O>::value_type
- >
- >
-{};
-
-template <typename I, typename O>
-struct is_memtransfer_copy_assignable
- : boost::move_detail::and_
- < are_contiguous_and_same<I, O>
- , dtl::is_trivially_copy_assignable< typename ::boost::container::iterator_traits<I>::value_type >
- >
-{};
-
-template <typename I, typename O>
-struct is_memtransfer_copy_constructible
- : boost::move_detail::and_
- < are_contiguous_and_same<I, O>
- , dtl::is_trivially_copy_constructible< typename ::boost::container::iterator_traits<I>::value_type >
- >
-{};
-
-template <typename I, typename O, typename R>
-struct enable_if_memtransfer_copy_constructible
- : enable_if<dtl::is_memtransfer_copy_constructible<I, O>, R>
-{};
-
-template <typename I, typename O, typename R>
-struct disable_if_memtransfer_copy_constructible
- : disable_if<dtl::is_memtransfer_copy_constructible<I, O>, R>
-{};
-
-template <typename I, typename O, typename R>
-struct enable_if_memtransfer_copy_assignable
- : enable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
-{};
-
-template <typename I, typename O, typename R>
-struct disable_if_memtransfer_copy_assignable
- : disable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
-{};
-
-template
- <typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{
- typedef typename boost::container::iterator_traits<I>::value_type value_type;
- typename boost::container::iterator_traits<I>::difference_type n = boost::container::iterator_distance(f, l);
- if(n){
- std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
- boost::container::iterator_advance(r, n);
- }
- return r;
-}
-
-template
- <typename I, // I models InputIterator
- typename U, // U models unsigned integral constant
- typename F> // F models ForwardIterator
-F memmove_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{
- typedef typename boost::container::iterator_traits<I>::value_type value_type;
- if(n){
- std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
- boost::container::iterator_advance(r, n);
- }
- return r;
-}
-
-template
- <typename I, // I models InputIterator
- typename U, // U models unsigned integral constant
- typename F> // F models ForwardIterator
-I memmove_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{
- if(n){
- typedef typename boost::container::iterator_traits<I>::value_type value_type;
- std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
- boost::container::iterator_advance(f, n);
- }
- return f;
-}
-
-template
- <typename I, // I models InputIterator
- typename U, // U models unsigned integral constant
- typename F> // F models ForwardIterator
-I memmove_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
-{
- typedef typename boost::container::iterator_traits<I>::value_type value_type;
- if(n){
- std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
- boost::container::iterator_advance(f, n);
- boost::container::iterator_advance(r, n);
- }
- return f;
-}
-
-template <typename O>
-struct is_memzero_initializable
-{
- typedef typename ::boost::container::iterator_traits<O>::value_type value_type;
- static const bool value = are_elements_contiguous<O>::value &&
- ( dtl::is_integral<value_type>::value || dtl::is_enum<value_type>::value
- #if defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
- || dtl::is_pointer<value_type>::value
- #endif
- #if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO)
- || dtl::is_floating_point<value_type>::value
- #endif
- #if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO) && defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
- || dtl::is_pod<value_type>::value
- #endif
- );
-};
-
-template <typename O, typename R>
-struct enable_if_memzero_initializable
- : enable_if_c<dtl::is_memzero_initializable<O>::value, R>
-{};
-
-template <typename O, typename R>
-struct disable_if_memzero_initializable
- : enable_if_c<!dtl::is_memzero_initializable<O>::value, R>
-{};
-
-template <typename I, typename R>
-struct enable_if_trivially_destructible
- : enable_if_c < dtl::is_trivially_destructible
- <typename boost::container::iterator_traits<I>::value_type>::value
- , R>
-{};
-
-template <typename I, typename R>
-struct disable_if_trivially_destructible
- : enable_if_c <!dtl::is_trivially_destructible
- <typename boost::container::iterator_traits<I>::value_type>::value
- , R>
-{};
-
-} //namespace dtl {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_move_alloc
-//
-//////////////////////////////////////////////////////////////////////////////
-
-
-//! <b>Effects</b>:
-//! \code
-//! for (; f != l; ++r, ++f)
-//! allocator_traits::construct(a, &*r, boost::move(*f));
-//! \endcode
-//!
-//! <b>Returns</b>: r
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
- uninitialized_move_alloc(Allocator &a, I f, I l, F r)
-{
- F back = r;
- BOOST_TRY{
- while (f != l) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
- ++f; ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
- uninitialized_move_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove(f, l, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_move_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; n--; ++r, ++f)
-//! allocator_traits::construct(a, &*r, boost::move(*f));
-//! \endcode
-//!
-//! <b>Returns</b>: r
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
- uninitialized_move_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
-{
- F back = r;
- BOOST_TRY{
- while (n--) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
- ++f; ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
- uninitialized_move_alloc_n(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_move_alloc_n_source
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; n--; ++r, ++f)
-//! allocator_traits::construct(a, &*r, boost::move(*f));
-//! \endcode
-//!
-//! <b>Returns</b>: f (after incremented)
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
- uninitialized_move_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
-{
- F back = r;
- BOOST_TRY{
- while (n--) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
- ++f; ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return f;
-}
-
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, I>::type
- uninitialized_move_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n_source(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_copy_alloc
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; f != l; ++r, ++f)
-//! allocator_traits::construct(a, &*r, *f);
-//! \endcode
-//!
-//! <b>Returns</b>: r
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
- uninitialized_copy_alloc(Allocator &a, I f, I l, F r)
-{
- F back = r;
- BOOST_TRY{
- while (f != l) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f);
- ++f; ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
- uninitialized_copy_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove(f, l, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_copy_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; n--; ++r, ++f)
-//! allocator_traits::construct(a, &*r, *f);
-//! \endcode
-//!
-//! <b>Returns</b>: r
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
- uninitialized_copy_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
-{
- F back = r;
- BOOST_TRY{
- while (n--) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f);
- ++f; ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
- uninitialized_copy_alloc_n(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_copy_alloc_n_source
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; n--; ++r, ++f)
-//! allocator_traits::construct(a, &*r, *f);
-//! \endcode
-//!
-//! <b>Returns</b>: f (after incremented)
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
- uninitialized_copy_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
-{
- F back = r;
- BOOST_TRY{
- while (n--) {
- boost::container::construct_in_place(a, boost::movelib::iterator_to_raw_pointer(r), f);
- ++f; ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return f;
-}
-
-template
- <typename Allocator,
- typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, I>::type
- uninitialized_copy_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n_source(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_value_init_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; n--; ++r, ++f)
-//! allocator_traits::construct(a, &*r);
-//! \endcode
-//!
-//! <b>Returns</b>: r
-template
- <typename Allocator,
- typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memzero_initializable<F, F>::type
- uninitialized_value_init_alloc_n(Allocator &a, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
-{
- F back = r;
- BOOST_TRY{
- while (n--) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r));
- ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-template
- <typename Allocator,
- typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memzero_initializable<F, F>::type
- uninitialized_value_init_alloc_n(Allocator &, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
-{
- typedef typename boost::container::iterator_traits<F>::value_type value_type;
- std::memset((void*)boost::movelib::iterator_to_raw_pointer(r), 0, sizeof(value_type)*n);
- boost::container::iterator_advance(r, n);
- return r;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_default_init_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; n--; ++r, ++f)
-//! allocator_traits::construct(a, &*r);
-//! \endcode
-//!
-//! <b>Returns</b>: r
-template
- <typename Allocator,
- typename F> // F models ForwardIterator
-inline F uninitialized_default_init_alloc_n(Allocator &a, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
-{
- F back = r;
- BOOST_TRY{
- while (n--) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), default_init);
- ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_fill_alloc
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; f != l; ++r, ++f)
-//! allocator_traits::construct(a, &*r, *f);
-//! \endcode
-//!
-//! <b>Returns</b>: r
-template
- <typename Allocator,
- typename F, // F models ForwardIterator
- typename T>
-inline void uninitialized_fill_alloc(Allocator &a, F f, F l, const T &t)
-{
- F back = f;
- BOOST_TRY{
- while (f != l) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(f), t);
- ++f;
- }
- }
- BOOST_CATCH(...){
- for (; back != l; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_fill_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; n--; ++r, ++f)
-//! allocator_traits::construct(a, &*r, v);
-//! \endcode
-//!
-//! <b>Returns</b>: r
-template
- <typename Allocator,
- typename T,
- typename F> // F models ForwardIterator
-inline F uninitialized_fill_alloc_n(Allocator &a, const T &v, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
-{
- F back = r;
- BOOST_TRY{
- while (n--) {
- allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), v);
- ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// copy
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
- copy(I f, I l, F r)
-{
- while (f != l) {
- *r = *f;
- ++f; ++r;
- }
- return r;
-}
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
- copy(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove(f, l, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// copy_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I, // I models InputIterator
-typename U, // U models unsigned integral constant
-typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
- copy_n(I f, U n, F r)
-{
- while (n--) {
- *r = *f;
- ++f; ++r;
- }
- return r;
-}
-
-template
-<typename I, // I models InputIterator
-typename U, // U models unsigned integral constant
-typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
- copy_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// copy_n_source
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I, // I models InputIterator
-typename U, // U models unsigned integral constant
-typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
- copy_n_source(I f, U n, F r)
-{
- while (n--) {
- boost::container::assign_in_place(r, f);
- ++f; ++r;
- }
- return f;
-}
-
-template
-<typename I, // I models InputIterator
-typename U, // U models unsigned integral constant
-typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
- copy_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n_source(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// copy_n_source_dest
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I, // I models InputIterator
-typename U, // U models unsigned integral constant
-typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
- copy_n_source_dest(I f, U n, F &r)
-{
- while (n--) {
- *r = *f;
- ++f; ++r;
- }
- return f;
-}
-
-template
-<typename I, // I models InputIterator
-typename U, // U models unsigned integral constant
-typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
- copy_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n_source_dest(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// move
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
- move(I f, I l, F r)
-{
- while (f != l) {
- *r = ::boost::move(*f);
- ++f; ++r;
- }
- return r;
-}
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
- move(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove(f, l, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// move_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I, // I models InputIterator
-typename U, // U models unsigned integral constant
-typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
- move_n(I f, U n, F r)
-{
- while (n--) {
- *r = ::boost::move(*f);
- ++f; ++r;
- }
- return r;
-}
-
-template
-<typename I, // I models InputIterator
-typename U, // U models unsigned integral constant
-typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
- move_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n(f, n, r); }
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// move_backward
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I, // I models BidirectionalIterator
-typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
- move_backward(I f, I l, F r)
-{
- while (f != l) {
- --l; --r;
- *r = ::boost::move(*l);
- }
- return r;
-}
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
- move_backward(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{
- typedef typename boost::container::iterator_traits<I>::value_type value_type;
- const typename boost::container::iterator_traits<I>::difference_type n = boost::container::iterator_distance(f, l);
- r -= n;
- std::memmove((boost::movelib::iterator_to_raw_pointer)(r), (boost::movelib::iterator_to_raw_pointer)(f), sizeof(value_type)*n);
- return r;
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// move_n_source_dest
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I // I models InputIterator
-,typename U // U models unsigned integral constant
-,typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
- move_n_source_dest(I f, U n, F &r)
-{
- while (n--) {
- *r = ::boost::move(*f);
- ++f; ++r;
- }
- return f;
-}
-
-template
-<typename I // I models InputIterator
-,typename U // U models unsigned integral constant
-,typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
- move_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n_source_dest(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// move_n_source
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
-<typename I // I models InputIterator
-,typename U // U models unsigned integral constant
-,typename F> // F models ForwardIterator
-inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
- move_n_source(I f, U n, F r)
-{
- while (n--) {
- *r = ::boost::move(*f);
- ++f; ++r;
- }
- return f;
-}
-
-template
-<typename I // I models InputIterator
-,typename U // U models unsigned integral constant
-,typename F> // F models ForwardIterator
-inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
- move_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
-{ return dtl::memmove_n_source(f, n, r); }
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// destroy_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
- <typename Allocator
- ,typename I // I models InputIterator
- ,typename U> // U models unsigned integral constant
-inline typename dtl::disable_if_trivially_destructible<I, void>::type
- destroy_alloc_n(Allocator &a, I f, U n)
-{
- while(n){
- --n;
- allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(f));
- ++f;
- }
-}
-
-template
- <typename Allocator
- ,typename I // I models InputIterator
- ,typename U> // U models unsigned integral constant
-inline typename dtl::enable_if_trivially_destructible<I, void>::type
- destroy_alloc_n(Allocator &, I, U)
-{}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// deep_swap_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
- <std::size_t MaxTmpBytes
- ,typename Allocator
- ,typename F // F models ForwardIterator
- ,typename G // G models ForwardIterator
- >
-inline typename dtl::disable_if_memtransfer_copy_assignable<F, G, void>::type
- deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
- , G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
-{
- typename allocator_traits<Allocator>::size_type n = 0;
- for (; n != n_i ; ++short_range_f, ++large_range_f, ++n){
- boost::adl_move_swap(*short_range_f, *large_range_f);
- }
- boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw
- boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i);
-}
-
-static const std::size_t DeepSwapAllocNMaxStorage = std::size_t(1) << std::size_t(11); //2K bytes
-
-template
- <std::size_t MaxTmpBytes
- ,typename Allocator
- ,typename F // F models ForwardIterator
- ,typename G // G models ForwardIterator
- >
-inline typename dtl::enable_if_c
- < dtl::is_memtransfer_copy_assignable<F, G>::value && (MaxTmpBytes <= DeepSwapAllocNMaxStorage) && false
- , void>::type
- deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
- , G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
-{
- typedef typename allocator_traits<Allocator>::value_type value_type;
- typedef typename dtl::aligned_storage
- <MaxTmpBytes, dtl::alignment_of<value_type>::value>::type storage_type;
- storage_type storage;
-
- const std::size_t n_i_bytes = sizeof(value_type)*n_i;
- void *const large_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f));
- void *const short_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f));
- void *const stora_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(storage.data));
- std::memcpy(stora_ptr, large_ptr, n_i_bytes);
- std::memcpy(large_ptr, short_ptr, n_i_bytes);
- std::memcpy(short_ptr, stora_ptr, n_i_bytes);
- boost::container::iterator_advance(large_range_f, n_i);
- boost::container::iterator_advance(short_range_f, n_i);
- boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw
- boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i);
-}
-
-template
- <std::size_t MaxTmpBytes
- ,typename Allocator
- ,typename F // F models ForwardIterator
- ,typename G // G models ForwardIterator
- >
-inline typename dtl::enable_if_c
- < dtl::is_memtransfer_copy_assignable<F, G>::value && true//(MaxTmpBytes > DeepSwapAllocNMaxStorage)
- , void>::type
- deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
- , G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
-{
- typedef typename allocator_traits<Allocator>::value_type value_type;
- typedef typename dtl::aligned_storage
- <DeepSwapAllocNMaxStorage, dtl::alignment_of<value_type>::value>::type storage_type;
- storage_type storage;
- const std::size_t sizeof_storage = sizeof(storage);
-
- std::size_t n_i_bytes = sizeof(value_type)*n_i;
- char *large_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f)));
- char *short_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f)));
- char *stora_ptr = static_cast<char*>(static_cast<void*>(storage.data));
-
- std::size_t szt_times = n_i_bytes/sizeof_storage;
- const std::size_t szt_rem = n_i_bytes%sizeof_storage;
-
- //Loop unrolling using Duff's device, as it seems it helps on some architectures
- const std::size_t Unroll = 4;
- std::size_t n = (szt_times + (Unroll-1))/Unroll;
- const std::size_t branch_number = (!szt_times)*Unroll + (szt_times % Unroll);
- switch(branch_number){
- case 4:
- break;
- case 0: do{
- std::memcpy(stora_ptr, large_ptr, sizeof_storage);
- std::memcpy(large_ptr, short_ptr, sizeof_storage);
- std::memcpy(short_ptr, stora_ptr, sizeof_storage);
- large_ptr += sizeof_storage;
- short_ptr += sizeof_storage;
- BOOST_FALLTHROUGH;
- case 3:
- std::memcpy(stora_ptr, large_ptr, sizeof_storage);
- std::memcpy(large_ptr, short_ptr, sizeof_storage);
- std::memcpy(short_ptr, stora_ptr, sizeof_storage);
- large_ptr += sizeof_storage;
- short_ptr += sizeof_storage;
- BOOST_FALLTHROUGH;
- case 2:
- std::memcpy(stora_ptr, large_ptr, sizeof_storage);
- std::memcpy(large_ptr, short_ptr, sizeof_storage);
- std::memcpy(short_ptr, stora_ptr, sizeof_storage);
- large_ptr += sizeof_storage;
- short_ptr += sizeof_storage;
- BOOST_FALLTHROUGH;
- case 1:
- std::memcpy(stora_ptr, large_ptr, sizeof_storage);
- std::memcpy(large_ptr, short_ptr, sizeof_storage);
- std::memcpy(short_ptr, stora_ptr, sizeof_storage);
- large_ptr += sizeof_storage;
- short_ptr += sizeof_storage;
- } while(--n);
- }
- std::memcpy(stora_ptr, large_ptr, szt_rem);
- std::memcpy(large_ptr, short_ptr, szt_rem);
- std::memcpy(short_ptr, stora_ptr, szt_rem);
- boost::container::iterator_advance(large_range_f, n_i);
- boost::container::iterator_advance(short_range_f, n_i);
- boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw
- boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i);
-}
-
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// copy_assign_range_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
- <typename Allocator
- ,typename I // F models InputIterator
- ,typename O // G models OutputIterator
- >
-void copy_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_traits<Allocator>::size_type n_i
- , O out_start, typename allocator_traits<Allocator>::size_type n_o )
-{
- if (n_o < n_i){
- inp_start = boost::container::copy_n_source_dest(inp_start, n_o, out_start); // may throw
- boost::container::uninitialized_copy_alloc_n(a, inp_start, n_i - n_o, out_start);// may throw
- }
- else{
- out_start = boost::container::copy_n(inp_start, n_i, out_start); // may throw
- boost::container::destroy_alloc_n(a, out_start, n_o - n_i);
- }
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// move_assign_range_alloc_n
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template
- <typename Allocator
- ,typename I // F models InputIterator
- ,typename O // G models OutputIterator
- >
-void move_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_traits<Allocator>::size_type n_i
- , O out_start, typename allocator_traits<Allocator>::size_type n_o )
-{
- if (n_o < n_i){
- inp_start = boost::container::move_n_source_dest(inp_start, n_o, out_start); // may throw
- boost::container::uninitialized_move_alloc_n(a, inp_start, n_i - n_o, out_start); // may throw
- }
- else{
- out_start = boost::container::move_n(inp_start, n_i, out_start); // may throw
- boost::container::destroy_alloc_n(a, out_start, n_o - n_i);
- }
-}
-
-} //namespace container {
-} //namespace boost {
-
-#if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
-#pragma GCC diagnostic pop
-#endif
-
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/flat_tree.hpp b/src/third_party/boost-1.68.0/boost/container/detail/flat_tree.hpp
deleted file mode 100644
index e9cbe38894b..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/flat_tree.hpp
+++ /dev/null
@@ -1,1621 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_FLAT_TREE_HPP
-#define BOOST_CONTAINER_FLAT_TREE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-#include <boost/container/container_fwd.hpp>
-
-#include <boost/move/utility_core.hpp>
-
-#include <boost/container/detail/pair.hpp>
-#include <boost/container/vector.hpp>
-#include <boost/container/allocator_traits.hpp>
-
-#include <boost/container/detail/value_init.hpp>
-#include <boost/container/detail/destroyers.hpp>
-#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
-#include <boost/container/detail/iterator.hpp>
-#include <boost/container/detail/is_sorted.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/is_contiguous_container.hpp>
-#include <boost/container/detail/is_container.hpp>
-
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
-
-#include <boost/move/make_unique.hpp>
-#include <boost/move/iterator.hpp>
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/algo/adaptive_sort.hpp>
-#include <boost/move/algo/detail/pdqsort.hpp>
-
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//merge_unique
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME merge_unique
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 3
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 3
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-//merge_equal
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME merge
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 3
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 3
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-//index_of
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME index_of
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-//nth
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME nth
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-//reserve
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME reserve
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-//capacity
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME capacity
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0
-#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
-#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-///////////////////////////////////////
-//
-// Helper functions to merge elements
-//
-///////////////////////////////////////
-
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(stored_allocator_type)
-
-///////////////////////////////////////
-//
-// flat_tree_container_inplace_merge
-//
-///////////////////////////////////////
-template<class SequenceContainer, class Compare>
-void flat_tree_container_inplace_merge //is_contiguous_container == true
- (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp , dtl::true_)
-{
- typedef typename SequenceContainer::value_type value_type;
- value_type *const braw = boost::movelib::iterator_to_raw_pointer(dest.begin());
- value_type *const iraw = boost::movelib::iterator_to_raw_pointer(it);
- value_type *const eraw = boost::movelib::iterator_to_raw_pointer(dest.end());
- boost::movelib::adaptive_merge(braw, iraw, eraw, comp, eraw, dest.capacity()- dest.size());
-}
-
-template<class SequenceContainer, class Compare>
-void flat_tree_container_inplace_merge //is_contiguous_container == false
- (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp, dtl::false_)
-{
- boost::movelib::adaptive_merge(dest.begin(), it, dest.end(), comp);
-}
-
-///////////////////////////////////////
-//
-// flat_tree_container_inplace_sort_ending
-//
-///////////////////////////////////////
-template<class SequenceContainer, class Compare>
-void flat_tree_container_inplace_sort_ending //is_contiguous_container == true
- (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp, dtl::true_)
-{
- typedef typename SequenceContainer::value_type value_type;
- value_type *const iraw = boost::movelib::iterator_to_raw_pointer(it);
- value_type *const eraw = boost::movelib::iterator_to_raw_pointer(dest.end());
- boost::movelib::adaptive_sort(iraw, eraw, comp, eraw, dest.capacity()- dest.size());
-}
-
-template<class SequenceContainer, class Compare>
-void flat_tree_container_inplace_sort_ending //is_contiguous_container == false
- (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp , dtl::false_)
-{
- boost::movelib::adaptive_sort(it, dest.end(), comp);
-}
-
-///////////////////////////////////////
-//
-// flat_tree_merge
-//
-///////////////////////////////////////
-template<class SequenceContainer, class Iterator, class Compare>
-BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal
- (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::true_)
-{
- dest.merge(first, last, comp);
-}
-
-template<class SequenceContainer, class Iterator, class Compare>
-BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal //has_merge_unique == false
- (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::false_)
-{
- typedef typename SequenceContainer::iterator iterator;
- iterator const it = dest.insert( dest.end(), first, last );
- dtl::bool_<is_contiguous_container<SequenceContainer>::value> contiguous_tag;
- (flat_tree_container_inplace_merge)(dest, it, comp, contiguous_tag);
-}
-
-///////////////////////////////////////
-//
-// flat_tree_merge_unique
-//
-///////////////////////////////////////
-template<class SequenceContainer, class Iterator, class Compare>
-BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == true
- (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::true_)
-{
- dest.merge_unique(first, last, comp);
-}
-
-template<class SequenceContainer, class Iterator, class Compare>
-BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == false
- (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::false_)
-{
- typedef typename SequenceContainer::iterator iterator;
- typedef typename SequenceContainer::size_type size_type;
-
- size_type const old_sz = dest.size();
- iterator const first_new = dest.insert(dest.cend(), first, last );
- iterator e = boost::movelib::inplace_set_difference(first_new, dest.end(), dest.begin(), first_new, comp);
- dest.erase(e, dest.end());
- dtl::bool_<is_contiguous_container<SequenceContainer>::value> contiguous_tag;
- (flat_tree_container_inplace_merge)(dest, dest.begin()+old_sz, comp, contiguous_tag);
-}
-
-///////////////////////////////////////
-//
-// flat_tree_index_of
-//
-///////////////////////////////////////
-template<class SequenceContainer, class Iterator>
-BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
- flat_tree_index_of // has_index_of == true
- (SequenceContainer& cont, Iterator p, dtl::true_)
-{
- return cont.index_of(p);
-}
-
-template<class SequenceContainer, class Iterator>
-BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
- flat_tree_index_of // has_index_of == false
- (SequenceContainer& cont, Iterator p, dtl::false_)
-{
- typedef typename SequenceContainer::size_type size_type;
- return static_cast<size_type>(p - cont.begin());
-}
-
-///////////////////////////////////////
-//
-// flat_tree_nth
-//
-///////////////////////////////////////
-template<class Iterator, class SequenceContainer>
-BOOST_CONTAINER_FORCEINLINE Iterator
- flat_tree_nth // has_nth == true
- (SequenceContainer& cont, typename SequenceContainer::size_type n, dtl::true_)
-{
- return cont.nth(n);
-}
-
-template<class Iterator, class SequenceContainer>
-BOOST_CONTAINER_FORCEINLINE Iterator
- flat_tree_nth // has_nth == false
- (SequenceContainer& cont, typename SequenceContainer::size_type n, dtl::false_)
-{
- return cont.begin()+ n;
-}
-
-///////////////////////////////////////
-//
-// flat_tree_get_stored_allocator
-//
-///////////////////////////////////////
-template<class SequenceContainer>
-BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::stored_allocator_type &
- flat_tree_get_stored_allocator // has_get_stored_allocator == true
- (SequenceContainer& cont, dtl::true_)
-{
- return cont.get_stored_allocator();
-}
-
-template<class SequenceContainer>
-BOOST_CONTAINER_FORCEINLINE const typename SequenceContainer::stored_allocator_type &
- flat_tree_get_stored_allocator // has_get_stored_allocator == true
- (const SequenceContainer& cont, dtl::true_)
-{
- return cont.get_stored_allocator();
-}
-
-template<class SequenceContainer>
-BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::allocator_type
- flat_tree_get_stored_allocator // has_get_stored_allocator == false
- (SequenceContainer& cont, dtl::false_)
-{
- return cont.get_allocator();
-}
-
-///////////////////////////////////////
-//
-// flat_tree_adopt_sequence_equal
-//
-///////////////////////////////////////
-template<class SequenceContainer, class Compare>
-void flat_tree_sort_contiguous_to_adopt // is_contiguous_container == true
- (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp)
-{
- if(tseq.capacity() >= (seq.capacity() - seq.size())) {
- tseq.clear();
- boost::movelib::adaptive_sort
- (boost::movelib::iterator_to_raw_pointer(seq.begin())
- , boost::movelib::iterator_to_raw_pointer(seq.end())
- , comp
- , boost::movelib::iterator_to_raw_pointer(tseq.begin())
- , tseq.capacity());
- }
- else{
- boost::movelib::adaptive_sort
- (boost::movelib::iterator_to_raw_pointer(seq.begin())
- , boost::movelib::iterator_to_raw_pointer(seq.end())
- , comp
- , boost::movelib::iterator_to_raw_pointer(seq.end())
- , seq.capacity() - seq.size());
- }
-}
-
-template<class SequenceContainer, class Compare>
-void flat_tree_adopt_sequence_equal // is_contiguous_container == true
- (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::true_)
-{
- flat_tree_sort_contiguous_to_adopt(tseq, boost::move(seq), comp);
- tseq = boost::move(seq);
-}
-
-template<class SequenceContainer, class Compare>
-void flat_tree_adopt_sequence_equal // is_contiguous_container == false
- (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::false_)
-{
- boost::movelib::adaptive_sort(seq.begin(), seq.end(), comp);
- tseq = boost::move(seq);
-}
-
-///////////////////////////////////////
-//
-// flat_tree_adopt_sequence_unique
-//
-///////////////////////////////////////
-template<class SequenceContainer, class Compare>
-void flat_tree_adopt_sequence_unique// is_contiguous_container == true
- (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::true_)
-{
- boost::movelib::pdqsort
- ( boost::movelib::iterator_to_raw_pointer(seq.begin())
- , boost::movelib::iterator_to_raw_pointer(seq.end())
- , comp);
- seq.erase(boost::movelib::unique
- (seq.begin(), seq.end(), boost::movelib::negate<Compare>(comp)), seq.cend());
- tseq = boost::move(seq);
-}
-
-template<class SequenceContainer, class Compare>
-void flat_tree_adopt_sequence_unique// is_contiguous_container == false
- (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::false_)
-{
- boost::movelib::pdqsort(seq.begin(), seq.end(), comp);
- seq.erase(boost::movelib::unique
- (seq.begin(), seq.end(), boost::movelib::negate<Compare>(comp)), seq.cend());
- tseq = boost::move(seq);
-}
-
-///////////////////////////////////////
-//
-// flat_tree_reserve
-//
-///////////////////////////////////////
-template<class SequenceContainer>
-BOOST_CONTAINER_FORCEINLINE void // has_reserve == true
- flat_tree_reserve(SequenceContainer &tseq, typename SequenceContainer::size_type cap, dtl::true_)
-{
- tseq.reserve(cap);
-}
-
-template<class SequenceContainer>
-BOOST_CONTAINER_FORCEINLINE void // has_reserve == false
- flat_tree_reserve(SequenceContainer &, typename SequenceContainer::size_type, dtl::false_)
-{
-}
-
-///////////////////////////////////////
-//
-// flat_tree_capacity
-//
-///////////////////////////////////////
-template<class SequenceContainer> // has_capacity == true
-BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
- flat_tree_capacity(const SequenceContainer &tseq, dtl::true_)
-{
- return tseq.capacity();
-}
-
-template<class SequenceContainer> // has_capacity == false
-BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
- flat_tree_capacity(const SequenceContainer &tseq, dtl::false_)
-{
- return tseq.size();
-}
-
-///////////////////////////////////////
-//
-// flat_tree_value_compare
-//
-///////////////////////////////////////
-
-template<class Compare, class Value, class KeyOfValue>
-class flat_tree_value_compare
- : private Compare
-{
- typedef Value first_argument_type;
- typedef Value second_argument_type;
- typedef bool return_type;
- public:
- flat_tree_value_compare()
- : Compare()
- {}
-
- flat_tree_value_compare(const Compare &pred)
- : Compare(pred)
- {}
-
- bool operator()(const Value& lhs, const Value& rhs) const
- {
- KeyOfValue key_extract;
- return Compare::operator()(key_extract(lhs), key_extract(rhs));
- }
-
- const Compare &get_comp() const
- { return *this; }
-
- Compare &get_comp()
- { return *this; }
-};
-
-///////////////////////////////////////
-//
-// select_container_type
-//
-///////////////////////////////////////
-template < class Value, class AllocatorOrContainer
- , bool = boost::container::dtl::is_container<AllocatorOrContainer>::value >
-struct select_container_type
-{
- typedef AllocatorOrContainer type;
-};
-
-template <class Value, class AllocatorOrContainer>
-struct select_container_type<Value, AllocatorOrContainer, false>
-{
- typedef boost::container::vector<Value, AllocatorOrContainer> type;
-};
-
-
-///////////////////////////////////////
-//
-// flat_tree
-//
-///////////////////////////////////////
-template <class Value, class KeyOfValue,
- class Compare, class AllocatorOrContainer>
-class flat_tree
-{
- public:
- typedef typename select_container_type<Value, AllocatorOrContainer>::type container_type;
- typedef container_type sequence_type; //For backwards compatibility
-
- private:
- typedef typename container_type::allocator_type allocator_t;
- typedef allocator_traits<allocator_t> allocator_traits_type;
-
- public:
- typedef flat_tree_value_compare<Compare, Value, KeyOfValue> value_compare;
-
- private:
-
- struct Data
- //Inherit from value_compare to do EBO
- : public value_compare
- {
- BOOST_COPYABLE_AND_MOVABLE(Data)
-
- public:
- Data()
- : value_compare(), m_seq()
- {}
-
- explicit Data(const allocator_t &alloc)
- : value_compare(), m_seq(alloc)
- {}
-
- explicit Data(const Compare &comp)
- : value_compare(comp), m_seq()
- {}
-
- Data(const Compare &comp, const allocator_t &alloc)
- : value_compare(comp), m_seq(alloc)
- {}
-
- explicit Data(const Data &d)
- : value_compare(static_cast<const value_compare&>(d)), m_seq(d.m_seq)
- {}
-
- Data(BOOST_RV_REF(Data) d)
- : value_compare(boost::move(static_cast<value_compare&>(d))), m_seq(boost::move(d.m_seq))
- {}
-
- Data(const Data &d, const allocator_t &a)
- : value_compare(static_cast<const value_compare&>(d)), m_seq(d.m_seq, a)
- {}
-
- Data(BOOST_RV_REF(Data) d, const allocator_t &a)
- : value_compare(boost::move(static_cast<value_compare&>(d))), m_seq(boost::move(d.m_seq), a)
- {}
-
- Data& operator=(BOOST_COPY_ASSIGN_REF(Data) d)
- {
- this->value_compare::operator=(d);
- m_seq = d.m_seq;
- return *this;
- }
-
- Data& operator=(BOOST_RV_REF(Data) d)
- {
- this->value_compare::operator=(boost::move(static_cast<value_compare &>(d)));
- m_seq = boost::move(d.m_seq);
- return *this;
- }
-
- void swap(Data &d)
- {
- value_compare& mycomp = *this, & othercomp = d;
- boost::adl_move_swap(mycomp, othercomp);
- this->m_seq.swap(d.m_seq);
- }
-
- container_type m_seq;
- };
-
- Data m_data;
- BOOST_COPYABLE_AND_MOVABLE(flat_tree)
-
- public:
-
- typedef typename container_type::value_type value_type;
- typedef typename container_type::pointer pointer;
- typedef typename container_type::const_pointer const_pointer;
- typedef typename container_type::reference reference;
- typedef typename container_type::const_reference const_reference;
- typedef typename KeyOfValue::type key_type;
- typedef Compare key_compare;
- typedef typename container_type::allocator_type allocator_type;
- typedef typename container_type::size_type size_type;
- typedef typename container_type::difference_type difference_type;
- typedef typename container_type::iterator iterator;
- typedef typename container_type::const_iterator const_iterator;
- typedef typename container_type::reverse_iterator reverse_iterator;
- typedef typename container_type::const_reverse_iterator const_reverse_iterator;
-
- //!Standard extension
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
- (boost::container::dtl::, container_type
- ,stored_allocator_type, allocator_type) stored_allocator_type;
-
- static const bool has_stored_allocator_type =
- BOOST_INTRUSIVE_HAS_TYPE(boost::container::dtl::, container_type, stored_allocator_type);
-
- private:
- typedef allocator_traits<stored_allocator_type> stored_allocator_traits;
-
- public:
- typedef typename dtl::if_c
- <has_stored_allocator_type, const stored_allocator_type &, allocator_type>::type get_stored_allocator_const_return_t;
-
- typedef typename dtl::if_c
- <has_stored_allocator_type, stored_allocator_type &, allocator_type>::type get_stored_allocator_noconst_return_t;
-
- BOOST_CONTAINER_FORCEINLINE flat_tree()
- : m_data()
- { }
-
- BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const Compare& comp)
- : m_data(comp)
- { }
-
- BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const allocator_type& a)
- : m_data(a)
- { }
-
- BOOST_CONTAINER_FORCEINLINE flat_tree(const Compare& comp, const allocator_type& a)
- : m_data(comp, a)
- { }
-
- BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x)
- : m_data(x.m_data)
- { }
-
- BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : m_data(boost::move(x.m_data))
- { }
-
- BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x, const allocator_type &a)
- : m_data(x.m_data, a)
- { }
-
- BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a)
- : m_data(boost::move(x.m_data), a)
- { }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( ordered_range_t, InputIterator first, InputIterator last)
- : m_data()
- {
- this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
- BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : m_data(comp)
- {
- this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
- BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : m_data(comp, a)
- {
- this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
- BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last)
- : m_data()
- {
- this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
- BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : m_data(comp)
- {
- this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
- BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : m_data(comp, a)
- {
- this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
- BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( bool unique_insertion, InputIterator first, InputIterator last)
- : m_data()
- {
- this->priv_range_insertion_construct(unique_insertion, first, last);
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( bool unique_insertion, InputIterator first, InputIterator last
- , const Compare& comp)
- : m_data(comp)
- {
- this->priv_range_insertion_construct(unique_insertion, first, last);
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( bool unique_insertion, InputIterator first, InputIterator last
- , const allocator_type& a)
- : m_data(a)
- {
- this->priv_range_insertion_construct(unique_insertion, first, last);
- }
-
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_tree( bool unique_insertion, InputIterator first, InputIterator last
- , const Compare& comp, const allocator_type& a)
- : m_data(comp, a)
- {
- this->priv_range_insertion_construct(unique_insertion, first, last);
- }
-
- BOOST_CONTAINER_FORCEINLINE ~flat_tree()
- {}
-
- BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x)
- { m_data = x.m_data; return *this; }
-
- BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_RV_REF(flat_tree) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { m_data = boost::move(x.m_data); return *this; }
-
- BOOST_CONTAINER_FORCEINLINE const value_compare &priv_value_comp() const
- { return static_cast<const value_compare &>(this->m_data); }
-
- BOOST_CONTAINER_FORCEINLINE value_compare &priv_value_comp()
- { return static_cast<value_compare &>(this->m_data); }
-
- BOOST_CONTAINER_FORCEINLINE const key_compare &priv_key_comp() const
- { return this->priv_value_comp().get_comp(); }
-
- BOOST_CONTAINER_FORCEINLINE key_compare &priv_key_comp()
- { return this->priv_value_comp().get_comp(); }
-
- struct insert_commit_data
- {
- const_iterator position;
- };
-
- public:
- // accessors:
- BOOST_CONTAINER_FORCEINLINE Compare key_comp() const
- { return this->m_data.get_comp(); }
-
- BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
- { return this->m_data; }
-
- BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
- { return this->m_data.m_seq.get_allocator(); }
-
- BOOST_CONTAINER_FORCEINLINE get_stored_allocator_const_return_t get_stored_allocator() const
- {
- return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_<has_stored_allocator_type>());
- }
-
- BOOST_CONTAINER_FORCEINLINE get_stored_allocator_noconst_return_t get_stored_allocator()
- {
- return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_<has_stored_allocator_type>());
- }
-
- BOOST_CONTAINER_FORCEINLINE iterator begin()
- { return this->m_data.m_seq.begin(); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator begin() const
- { return this->cbegin(); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const
- { return this->m_data.m_seq.begin(); }
-
- BOOST_CONTAINER_FORCEINLINE iterator end()
- { return this->m_data.m_seq.end(); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator end() const
- { return this->cend(); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator cend() const
- { return this->m_data.m_seq.end(); }
-
- BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin()
- { return reverse_iterator(this->end()); }
-
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const
- { return this->crbegin(); }
-
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const
- { return const_reverse_iterator(this->cend()); }
-
- BOOST_CONTAINER_FORCEINLINE reverse_iterator rend()
- { return reverse_iterator(this->begin()); }
-
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const
- { return this->crend(); }
-
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const
- { return const_reverse_iterator(this->cbegin()); }
-
- BOOST_CONTAINER_FORCEINLINE bool empty() const
- { return this->m_data.m_seq.empty(); }
-
- BOOST_CONTAINER_FORCEINLINE size_type size() const
- { return this->m_data.m_seq.size(); }
-
- BOOST_CONTAINER_FORCEINLINE size_type max_size() const
- { return this->m_data.m_seq.max_size(); }
-
- BOOST_CONTAINER_FORCEINLINE void swap(flat_tree& other)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value )
- { this->m_data.swap(other.m_data); }
-
- public:
- // insert/erase
- std::pair<iterator,bool> insert_unique(const value_type& val)
- {
- std::pair<iterator,bool> ret;
- insert_commit_data data;
- ret.second = this->priv_insert_unique_prepare(KeyOfValue()(val), data);
- ret.first = ret.second ? this->priv_insert_commit(data, val)
- : this->begin() + (data.position - this->cbegin());
- //: iterator(vector_iterator_get_ptr(data.position));
- return ret;
- }
-
- std::pair<iterator,bool> insert_unique(BOOST_RV_REF(value_type) val)
- {
- std::pair<iterator,bool> ret;
- insert_commit_data data;
- ret.second = this->priv_insert_unique_prepare(KeyOfValue()(val), data);
- ret.first = ret.second ? this->priv_insert_commit(data, boost::move(val))
- : this->begin() + (data.position - this->cbegin());
- //: iterator(vector_iterator_get_ptr(data.position));
- return ret;
- }
-
- iterator insert_equal(const value_type& val)
- {
- iterator i = this->upper_bound(KeyOfValue()(val));
- i = this->m_data.m_seq.insert(i, val);
- return i;
- }
-
- iterator insert_equal(BOOST_RV_REF(value_type) mval)
- {
- iterator i = this->upper_bound(KeyOfValue()(mval));
- i = this->m_data.m_seq.insert(i, boost::move(mval));
- return i;
- }
-
- iterator insert_unique(const_iterator hint, const value_type& val)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(hint));
- insert_commit_data data;
- return this->priv_insert_unique_prepare(hint, KeyOfValue()(val), data)
- ? this->priv_insert_commit(data, val)
- : this->begin() + (data.position - this->cbegin());
- //: iterator(vector_iterator_get_ptr(data.position));
- }
-
- iterator insert_unique(const_iterator hint, BOOST_RV_REF(value_type) val)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(hint));
- insert_commit_data data;
- return this->priv_insert_unique_prepare(hint, KeyOfValue()(val), data)
- ? this->priv_insert_commit(data, boost::move(val))
- : this->begin() + (data.position - this->cbegin());
- //: iterator(vector_iterator_get_ptr(data.position));
- }
-
- iterator insert_equal(const_iterator hint, const value_type& val)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(hint));
- insert_commit_data data;
- this->priv_insert_equal_prepare(hint, val, data);
- return this->priv_insert_commit(data, val);
- }
-
- iterator insert_equal(const_iterator hint, BOOST_RV_REF(value_type) mval)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(hint));
- insert_commit_data data;
- this->priv_insert_equal_prepare(hint, mval, data);
- return this->priv_insert_commit(data, boost::move(mval));
- }
-
- template <class InIt>
- void insert_unique(InIt first, InIt last)
- {
- dtl::bool_<is_contiguous_container<container_type>::value> contiguous_tag;
- container_type &seq = this->m_data.m_seq;
- value_compare &val_cmp = this->priv_value_comp();
-
- //Step 1: put new elements in the back
- typename container_type::iterator const it = seq.insert(seq.cend(), first, last);
-
- //Step 2: sort them
- boost::movelib::pdqsort(it, seq.end(), val_cmp);
-
- //Step 3: only left unique values from the back not already present in the original range
- typename container_type::iterator const e = boost::movelib::inplace_set_unique_difference
- (it, seq.end(), seq.begin(), it, val_cmp);
- seq.erase(e, seq.cend());
-
- //Step 4: merge both ranges
- (flat_tree_container_inplace_merge)(seq, it, this->priv_value_comp(), contiguous_tag);
- }
-
- template <class InIt>
- void insert_equal(InIt first, InIt last)
- {
- dtl::bool_<is_contiguous_container<container_type>::value> contiguous_tag;
- container_type &seq = this->m_data.m_seq;
- typename container_type::iterator const it = seq.insert(seq.cend(), first, last);
- (flat_tree_container_inplace_sort_ending)(seq, it, this->priv_value_comp(), contiguous_tag);
- (flat_tree_container_inplace_merge) (seq, it, this->priv_value_comp(), contiguous_tag);
- }
-
- //Ordered
-
- template <class InIt>
- void insert_equal(ordered_range_t, InIt first, InIt last)
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_merge_unique<container_type, InIt, InIt, value_compare>::value;
- (flat_tree_merge_equal)(this->m_data.m_seq, first, last, this->priv_value_comp(), dtl::bool_<value>());
- }
-
- template <class InIt>
- void insert_unique(ordered_unique_range_t, InIt first, InIt last)
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_merge_unique<container_type, InIt, InIt, value_compare>::value;
- (flat_tree_merge_unique)(this->m_data.m_seq, first, last, this->priv_value_comp(), dtl::bool_<value>());
- }
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template <class... Args>
- std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
- {
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
- value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));
- get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
- value_destructor<stored_allocator_type, value_type> d(a, val);
- return this->insert_unique(::boost::move(val));
- }
-
- template <class... Args>
- iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args)
- {
- //hint checked in insert_unique
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
- value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));
- get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
- value_destructor<stored_allocator_type, value_type> d(a, val);
- return this->insert_unique(hint, ::boost::move(val));
- }
-
- template <class... Args>
- iterator emplace_equal(BOOST_FWD_REF(Args)... args)
- {
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
- value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));
- get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
- value_destructor<stored_allocator_type, value_type> d(a, val);
- return this->insert_equal(::boost::move(val));
- }
-
- template <class... Args>
- iterator emplace_hint_equal(const_iterator hint, BOOST_FWD_REF(Args)... args)
- {
- //hint checked in insert_equal
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
- value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));
- get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
- stored_allocator_traits::construct(a, &val, ::boost::forward<Args>(args)... );
- value_destructor<stored_allocator_type, value_type> d(a, val);
- return this->insert_equal(hint, ::boost::move(val));
- }
-
- template <class KeyType, class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace
- (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args)
- {
- std::pair<iterator,bool> ret;
- insert_commit_data data;
- const key_type & k = key;
- ret.second = hint == const_iterator()
- ? this->priv_insert_unique_prepare(k, data)
- : this->priv_insert_unique_prepare(hint, k, data);
-
- if(!ret.second){
- ret.first = this->nth(data.position - this->cbegin());
- }
- else{
- typedef typename emplace_functor_type<try_emplace_t, KeyType, Args...>::type func_t;
- typedef emplace_iterator<value_type, func_t, difference_type> it_t;
- func_t func(try_emplace_t(), ::boost::forward<KeyType>(key), ::boost::forward<Args>(args)...);
- ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t());
- }
- return ret;
- }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- std::pair<iterator, bool> emplace_unique(BOOST_MOVE_UREF##N)\
- {\
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
- value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));\
- get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
- stored_allocator_traits::construct(a, &val BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- value_destructor<stored_allocator_type, value_type> d(a, val);\
- return this->insert_unique(::boost::move(val));\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_hint_unique(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
- value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));\
- get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
- stored_allocator_traits::construct(a, &val BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- value_destructor<stored_allocator_type, value_type> d(a, val);\
- return this->insert_unique(hint, ::boost::move(val));\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_equal(BOOST_MOVE_UREF##N)\
- {\
- typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
- value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));\
- get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
- stored_allocator_traits::construct(a, &val BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- value_destructor<stored_allocator_type, value_type> d(a, val);\
- return this->insert_equal(::boost::move(val));\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_hint_equal(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- typename aligned_storage <sizeof(value_type), alignment_of<value_type>::value>::type v;\
- value_type &val = *static_cast<value_type *>(static_cast<void *>(v.data));\
- get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
- stored_allocator_traits::construct(a, &val BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- value_destructor<stored_allocator_type, value_type> d(a, val);\
- return this->insert_equal(hint, ::boost::move(val));\
- }\
- template <class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool>\
- try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- std::pair<iterator,bool> ret;\
- insert_commit_data data;\
- const key_type & k = key;\
- ret.second = hint == const_iterator()\
- ? this->priv_insert_unique_prepare(k, data)\
- : this->priv_insert_unique_prepare(hint, k, data);\
- \
- if(!ret.second){\
- ret.first = this->nth(data.position - this->cbegin());\
- }\
- else{\
- typedef typename emplace_functor_type<try_emplace_t, KeyType BOOST_MOVE_I##N BOOST_MOVE_TARG##N>::type func_t;\
- typedef emplace_iterator<value_type, func_t, difference_type> it_t;\
- func_t func(try_emplace_t(), ::boost::forward<KeyType>(key) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t());\
- }\
- return ret;\
- }\
- //
- BOOST_MOVE_ITERATE_0TO7(BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE)
- #undef BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template<class KeyType, class M>
- std::pair<iterator, bool> insert_or_assign(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(M) obj)
- {
- const key_type& k = key;
- std::pair<iterator,bool> ret;
- insert_commit_data data;
- ret.second = hint == const_iterator()
- ? this->priv_insert_unique_prepare(k, data)
- : this->priv_insert_unique_prepare(hint, k, data);
- if(!ret.second){
- ret.first = this->nth(data.position - this->cbegin());
- ret.first->second = boost::forward<M>(obj);
- }
- else{
- typedef typename emplace_functor_type<KeyType, M>::type func_t;
- typedef emplace_iterator<value_type, func_t, difference_type> it_t;
- func_t func(boost::forward<KeyType>(key), boost::forward<M>(obj));
- ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t());
- }
- return ret;
- }
-
- BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator position)
- { return this->m_data.m_seq.erase(position); }
-
- size_type erase(const key_type& k)
- {
- std::pair<iterator,iterator > itp = this->equal_range(k);
- size_type ret = static_cast<size_type>(itp.second-itp.first);
- if (ret){
- this->m_data.m_seq.erase(itp.first, itp.second);
- }
- return ret;
- }
-
- BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
- { return this->m_data.m_seq.erase(first, last); }
-
- BOOST_CONTAINER_FORCEINLINE void clear()
- { this->m_data.m_seq.clear(); }
-
- //! <b>Effects</b>: Tries to deallocate the excess of memory created
- // with previous allocations. The size of the vector is unchanged
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to size().
- BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
- { this->m_data.m_seq.shrink_to_fit(); }
-
- BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_nth<container_type, size_type>::value;
- return flat_tree_nth<iterator>(this->m_data.m_seq, n, dtl::bool_<value>());
- }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_nth<container_type, size_type>::value;
- return flat_tree_nth<const_iterator>(this->m_data.m_seq, n, dtl::bool_<value>());
- }
-
- BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_index_of<container_type, iterator>::value;
- return flat_tree_index_of(this->m_data.m_seq, p, dtl::bool_<value>());
- }
-
- BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_index_of<container_type, const_iterator>::value;
- return flat_tree_index_of(this->m_data.m_seq, p, dtl::bool_<value>());
- }
-
- // set operations:
- iterator find(const key_type& k)
- {
- iterator i = this->lower_bound(k);
- iterator end_it = this->end();
- if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){
- i = end_it;
- }
- return i;
- }
-
- const_iterator find(const key_type& k) const
- {
- const_iterator i = this->lower_bound(k);
-
- const_iterator end_it = this->cend();
- if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){
- i = end_it;
- }
- return i;
- }
-
- template<class K>
- typename dtl::enable_if_transparent<key_compare, K, iterator>::type
- find(const K& k)
- {
- iterator i = this->lower_bound(k);
- iterator end_it = this->end();
- if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){
- i = end_it;
- }
- return i;
- }
-
- template<class K>
- typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
- find(const K& k) const
- {
- const_iterator i = this->lower_bound(k);
-
- const_iterator end_it = this->cend();
- if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){
- i = end_it;
- }
- return i;
- }
-
- size_type count(const key_type& k) const
- {
- std::pair<const_iterator, const_iterator> p = this->equal_range(k);
- size_type n = p.second - p.first;
- return n;
- }
-
- template<class K>
- typename dtl::enable_if_transparent<key_compare, K, size_type>::type
- count(const K& k) const
- {
- std::pair<const_iterator, const_iterator> p = this->equal_range(k);
- size_type n = p.second - p.first;
- return n;
- }
-
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge_unique(flat_tree<Value, KeyOfValue, C2, AllocatorOrContainer>& source)
- {
- this->insert( boost::make_move_iterator(source.begin())
- , boost::make_move_iterator(source.end()));
- }
-
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge_equal(flat_tree<Value, KeyOfValue, C2, AllocatorOrContainer>& source)
- {
- this->insert( boost::make_move_iterator(source.begin())
- , boost::make_move_iterator(source.end()));
- }
-
- BOOST_CONTAINER_FORCEINLINE void merge_unique(flat_tree& source)
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_merge_unique<container_type, iterator, iterator, value_compare>::value;
- (flat_tree_merge_unique)
- ( this->m_data.m_seq
- , boost::make_move_iterator(source.m_data.m_seq.begin())
- , boost::make_move_iterator(source.m_data.m_seq.end())
- , this->priv_value_comp()
- , dtl::bool_<value>());
- }
-
- BOOST_CONTAINER_FORCEINLINE void merge_equal(flat_tree& source)
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_merge<container_type, iterator, iterator, value_compare>::value;
- (flat_tree_merge_equal)
- ( this->m_data.m_seq
- , boost::make_move_iterator(source.m_data.m_seq.begin())
- , boost::make_move_iterator(source.m_data.m_seq.end())
- , this->priv_value_comp()
- , dtl::bool_<value>());
- }
-
- BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
- { return this->priv_lower_bound(this->begin(), this->end(), k); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
- { return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
-
- template<class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, iterator>::type
- lower_bound(const K& k)
- { return this->priv_lower_bound(this->begin(), this->end(), k); }
-
- template<class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
- lower_bound(const K& k) const
- { return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
-
- BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
- { return this->priv_upper_bound(this->begin(), this->end(), k); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
- { return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
-
- template<class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K,iterator>::type
- upper_bound(const K& k)
- { return this->priv_upper_bound(this->begin(), this->end(), k); }
-
- template<class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K,const_iterator>::type
- upper_bound(const K& k) const
- { return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
-
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& k)
- { return this->priv_equal_range(this->begin(), this->end(), k); }
-
- BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
- { return this->priv_equal_range(this->cbegin(), this->cend(), k); }
-
- template<class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K,std::pair<iterator,iterator> >::type
- equal_range(const K& k)
- { return this->priv_equal_range(this->begin(), this->end(), k); }
-
- template<class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K,std::pair<const_iterator,const_iterator> >::type
- equal_range(const K& k) const
- { return this->priv_equal_range(this->cbegin(), this->cend(), k); }
-
-
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, iterator> lower_bound_range(const key_type& k)
- { return this->priv_lower_bound_range(this->begin(), this->end(), k); }
-
- BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
- { return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
-
- template<class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K,std::pair<iterator,iterator> >::type
- lower_bound_range(const K& k)
- { return this->priv_lower_bound_range(this->begin(), this->end(), k); }
-
- template<class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K,std::pair<const_iterator,const_iterator> >::type
- lower_bound_range(const K& k) const
- { return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
-
- BOOST_CONTAINER_FORCEINLINE size_type capacity() const
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_capacity<container_type>::value;
- return (flat_tree_capacity)(this->m_data.m_seq, dtl::bool_<value>());
- }
-
- BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt)
- {
- const bool value = boost::container::dtl::
- has_member_function_callable_with_reserve<container_type, size_type>::value;
- (flat_tree_reserve)(this->m_data.m_seq, cnt, dtl::bool_<value>());
- }
-
- BOOST_CONTAINER_FORCEINLINE container_type extract_sequence()
- {
- return boost::move(m_data.m_seq);
- }
-
- BOOST_CONTAINER_FORCEINLINE container_type &get_sequence_ref()
- {
- return m_data.m_seq;
- }
-
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence_equal(BOOST_RV_REF(container_type) seq)
- {
- (flat_tree_adopt_sequence_equal)( m_data.m_seq, boost::move(seq), this->priv_value_comp()
- , dtl::bool_<is_contiguous_container<container_type>::value>());
- }
-
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence_unique(BOOST_RV_REF(container_type) seq)
- {
- (flat_tree_adopt_sequence_unique)(m_data.m_seq, boost::move(seq), this->priv_value_comp()
- , dtl::bool_<is_contiguous_container<container_type>::value>());
- }
-
- void adopt_sequence_equal(ordered_range_t, BOOST_RV_REF(container_type) seq)
- {
- BOOST_ASSERT((is_sorted)(seq.cbegin(), seq.cend(), this->priv_value_comp()));
- m_data.m_seq = boost::move(seq);
- }
-
- void adopt_sequence_unique(ordered_unique_range_t, BOOST_RV_REF(container_type) seq)
- {
- BOOST_ASSERT((is_sorted_and_unique)(seq.cbegin(), seq.cend(), this->priv_value_comp()));
- m_data.m_seq = boost::move(seq);
- }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_tree& x, const flat_tree& y)
- {
- return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin());
- }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_tree& x, const flat_tree& y)
- {
- return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end());
- }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_tree& x, const flat_tree& y)
- { return !(x == y); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_tree& x, const flat_tree& y)
- { return y < x; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_tree& x, const flat_tree& y)
- { return !(y < x); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_tree& x, const flat_tree& y)
- { return !(x < y); }
-
- BOOST_CONTAINER_FORCEINLINE friend void swap(flat_tree& x, flat_tree& y)
- { x.swap(y); }
-
- private:
-
- template <class InputIterator>
- void priv_range_insertion_construct( bool unique_insertion, InputIterator first, InputIterator last)
- {
- //Use cend() as hint to achieve linear time for
- //ordered ranges as required by the standard
- //for the constructor
- //Call end() every iteration as reallocation might have invalidated iterators
- if(unique_insertion){
- this->insert_unique(first, last);
- }
- else{
- this->insert_equal (first, last);
- }
- }
-
- BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
- {
- return (this->begin() <= pos) && (pos <= this->end());
- }
-
- // insert/erase
- void priv_insert_equal_prepare
- (const_iterator pos, const value_type& val, insert_commit_data &data)
- {
- // N1780
- // To insert val at pos:
- // if pos == end || val <= *pos
- // if pos == begin || val >= *(pos-1)
- // insert val before pos
- // else
- // insert val before upper_bound(val)
- // else
- // insert val before lower_bound(val)
- const value_compare &val_cmp = this->m_data;
-
- if(pos == this->cend() || !val_cmp(*pos, val)){
- if (pos == this->cbegin() || !val_cmp(val, pos[-1])){
- data.position = pos;
- }
- else{
- data.position =
- this->priv_upper_bound(this->cbegin(), pos, KeyOfValue()(val));
- }
- }
- else{
- data.position =
- this->priv_lower_bound(pos, this->cend(), KeyOfValue()(val));
- }
- }
-
- bool priv_insert_unique_prepare
- (const_iterator b, const_iterator e, const key_type& k, insert_commit_data &commit_data)
- {
- const key_compare &key_cmp = this->priv_key_comp();
- commit_data.position = this->priv_lower_bound(b, e, k);
- return commit_data.position == e || key_cmp(k, KeyOfValue()(*commit_data.position));
- }
-
- BOOST_CONTAINER_FORCEINLINE bool priv_insert_unique_prepare
- (const key_type& k, insert_commit_data &commit_data)
- { return this->priv_insert_unique_prepare(this->cbegin(), this->cend(), k, commit_data); }
-
- bool priv_insert_unique_prepare
- (const_iterator pos, const key_type& k, insert_commit_data &commit_data)
- {
- //N1780. Props to Howard Hinnant!
- //To insert k at pos:
- //if pos == end || k <= *pos
- // if pos == begin || k >= *(pos-1)
- // insert k before pos
- // else
- // insert k before upper_bound(k)
- //else if pos+1 == end || k <= *(pos+1)
- // insert k after pos
- //else
- // insert k before lower_bound(k)
- const key_compare &key_cmp = this->priv_key_comp();
- const const_iterator cend_it = this->cend();
- if(pos == cend_it || key_cmp(k, KeyOfValue()(*pos))){ //Check if k should go before end
- const const_iterator cbeg = this->cbegin();
- commit_data.position = pos;
- if(pos == cbeg){ //If container is empty then insert it in the beginning
- return true;
- }
- const_iterator prev(pos);
- --prev;
- if(key_cmp(KeyOfValue()(*prev), k)){ //If previous element was less, then it should go between prev and pos
- return true;
- }
- else if(!key_cmp(k, KeyOfValue()(*prev))){ //If previous was equal then insertion should fail
- commit_data.position = prev;
- return false;
- }
- else{ //Previous was bigger so insertion hint was pointless, dispatch to hintless insertion
- //but reduce the search between beg and prev as prev is bigger than k
- return this->priv_insert_unique_prepare(cbeg, prev, k, commit_data);
- }
- }
- else{
- //The hint is before the insertion position, so insert it
- //in the remaining range [pos, end)
- return this->priv_insert_unique_prepare(pos, cend_it, k, commit_data);
- }
- }
-
- template<class Convertible>
- BOOST_CONTAINER_FORCEINLINE iterator priv_insert_commit
- (insert_commit_data &commit_data, BOOST_FWD_REF(Convertible) convertible)
- {
- return this->m_data.m_seq.insert
- ( commit_data.position
- , boost::forward<Convertible>(convertible));
- }
-
- template <class RanIt, class K>
- RanIt priv_lower_bound(RanIt first, const RanIt last,
- const K & key) const
- {
- const Compare &key_cmp = this->m_data.get_comp();
- KeyOfValue key_extract;
- size_type len = static_cast<size_type>(last - first);
- RanIt middle;
-
- while (len) {
- size_type step = len >> 1;
- middle = first;
- middle += step;
-
- if (key_cmp(key_extract(*middle), key)) {
- first = ++middle;
- len -= step + 1;
- }
- else{
- len = step;
- }
- }
- return first;
- }
-
- template <class RanIt, class K>
- RanIt priv_upper_bound
- (RanIt first, const RanIt last,const K & key) const
- {
- const Compare &key_cmp = this->m_data.get_comp();
- KeyOfValue key_extract;
- size_type len = static_cast<size_type>(last - first);
- RanIt middle;
-
- while (len) {
- size_type step = len >> 1;
- middle = first;
- middle += step;
-
- if (key_cmp(key, key_extract(*middle))) {
- len = step;
- }
- else{
- first = ++middle;
- len -= step + 1;
- }
- }
- return first;
- }
-
- template <class RanIt, class K>
- std::pair<RanIt, RanIt>
- priv_equal_range(RanIt first, RanIt last, const K& key) const
- {
- const Compare &key_cmp = this->m_data.get_comp();
- KeyOfValue key_extract;
- size_type len = static_cast<size_type>(last - first);
- RanIt middle;
-
- while (len) {
- size_type step = len >> 1;
- middle = first;
- middle += step;
-
- if (key_cmp(key_extract(*middle), key)){
- first = ++middle;
- len -= step + 1;
- }
- else if (key_cmp(key, key_extract(*middle))){
- len = step;
- }
- else {
- //Middle is equal to key
- last = first;
- last += len;
- RanIt const first_ret = this->priv_lower_bound(first, middle, key);
- return std::pair<RanIt, RanIt>
- ( first_ret, this->priv_upper_bound(++middle, last, key));
- }
- }
- return std::pair<RanIt, RanIt>(first, first);
- }
-
- template<class RanIt, class K>
- std::pair<RanIt, RanIt> priv_lower_bound_range(RanIt first, RanIt last, const K& k) const
- {
- const Compare &key_cmp = this->m_data.get_comp();
- KeyOfValue key_extract;
- RanIt lb(this->priv_lower_bound(first, last, k)), ub(lb);
- if(lb != last && static_cast<difference_type>(!key_cmp(k, key_extract(*lb)))){
- ++ub;
- }
- return std::pair<RanIt, RanIt>(lb, ub);
- }
-};
-
-} //namespace dtl {
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class T, class KeyOfValue,
-class Compare, class AllocatorOrContainer>
-struct has_trivial_destructor_after_move<boost::container::dtl::flat_tree<T, KeyOfValue, Compare, AllocatorOrContainer> >
-{
- typedef typename boost::container::dtl::select_container_type<T, AllocatorOrContainer>::type container_type;
- typedef typename container_type::allocator_type allocator_t;
- typedef typename ::boost::container::allocator_traits<allocator_t>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<allocator_t>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value;
-};
-
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_FLAT_TREE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/iterator.hpp b/src/third_party/boost-1.68.0/boost/container/detail/iterator.hpp
deleted file mode 100644
index 2ceaf26001e..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/iterator.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2014-2014.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_ITERATOR_HPP
-#define BOOST_CONTAINER_DETAIL_ITERATOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/iterator.hpp>
-#include <boost/move/utility_core.hpp>
-
-namespace boost {
-namespace container {
-
-using ::boost::intrusive::iterator_traits;
-using ::boost::intrusive::iterator_distance;
-using ::boost::intrusive::iterator_advance;
-using ::boost::intrusive::iterator;
-using ::boost::intrusive::iterator_enable_if_tag;
-using ::boost::intrusive::iterator_disable_if_tag;
-using ::boost::intrusive::iterator_arrow_result;
-
-template <class Container>
-class back_emplacer
-{
- private:
- Container& container;
-
- public:
- typedef std::output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-
- back_emplacer(Container& x)
- : container(x)
- {}
-
- template<class U>
- back_emplacer& operator=(BOOST_FWD_REF(U) value)
- {
- container.emplace_back(boost::forward<U>(value));
- return *this;
- }
- back_emplacer& operator*() { return *this; }
- back_emplacer& operator++() { return *this; }
- back_emplacer& operator++(int){ return *this; }
-};
-
-
-} //namespace container {
-} //namespace boost {
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATORS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/mpl.hpp b/src/third_party/boost-1.68.0/boost/container/detail/mpl.hpp
deleted file mode 100644
index 385f7dbaa68..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/mpl.hpp
+++ /dev/null
@@ -1,104 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
-#define BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-#include <boost/move/detail/type_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-
-#include <cstddef>
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-using boost::move_detail::integral_constant;
-using boost::move_detail::true_type;
-using boost::move_detail::false_type;
-using boost::move_detail::enable_if_c;
-using boost::move_detail::enable_if;
-using boost::move_detail::enable_if_convertible;
-using boost::move_detail::disable_if_c;
-using boost::move_detail::disable_if;
-using boost::move_detail::disable_if_convertible;
-using boost::move_detail::is_convertible;
-using boost::move_detail::if_c;
-using boost::move_detail::if_;
-using boost::move_detail::identity;
-using boost::move_detail::bool_;
-using boost::move_detail::true_;
-using boost::move_detail::false_;
-using boost::move_detail::yes_type;
-using boost::move_detail::no_type;
-using boost::move_detail::bool_;
-using boost::move_detail::true_;
-using boost::move_detail::false_;
-using boost::move_detail::unvoid_ref;
-using boost::move_detail::and_;
-using boost::move_detail::or_;
-using boost::move_detail::not_;
-using boost::move_detail::enable_if_and;
-using boost::move_detail::disable_if_and;
-using boost::move_detail::enable_if_or;
-using boost::move_detail::disable_if_or;
-
-template <class FirstType>
-struct select1st
-{
- typedef FirstType type;
-
- template<class T>
- const type& operator()(const T& x) const
- { return x.first; }
-
- template<class T>
- type& operator()(T& x)
- { return const_cast<type&>(x.first); }
-};
-
-template <class T, class=void>
-struct is_transparent
-{
- static const bool value = false;
-};
-
-template <class T>
-struct is_transparent<T, typename T::is_transparent>
-{
- static const bool value = true;
-};
-
-template <typename C, typename K, typename R>
-struct enable_if_transparent
- : boost::move_detail::enable_if_c<dtl::is_transparent<C>::value, R>
-{};
-
-
-} //namespace dtl {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/multiallocation_chain.hpp b/src/third_party/boost-1.68.0/boost/container/detail/multiallocation_chain.hpp
deleted file mode 100644
index c10f809bb48..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/multiallocation_chain.hpp
+++ /dev/null
@@ -1,298 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP
-#define BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-// container
-#include <boost/container/container_fwd.hpp>
-// container/detail
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/container/detail/transform_iterator.hpp>
-#include <boost/container/detail/type_traits.hpp>
-// intrusive
-#include <boost/intrusive/slist.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-// move
-#include <boost/move/utility_core.hpp>
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-template<class VoidPointer>
-class basic_multiallocation_chain
-{
- private:
- typedef bi::slist_base_hook<bi::void_pointer<VoidPointer>
- ,bi::link_mode<bi::normal_link>
- > node;
-
- typedef typename boost::intrusive::pointer_traits
- <VoidPointer>::template rebind_pointer<char>::type char_ptr;
- typedef typename boost::intrusive::
- pointer_traits<char_ptr>::difference_type difference_type;
-
- typedef bi::slist< node
- , bi::linear<true>
- , bi::cache_last<true>
- , bi::size_type<typename boost::container::dtl::make_unsigned<difference_type>::type>
- > slist_impl_t;
- slist_impl_t slist_impl_;
-
- typedef typename boost::intrusive::pointer_traits
- <VoidPointer>::template rebind_pointer<node>::type node_ptr;
- typedef typename boost::intrusive::
- pointer_traits<node_ptr> node_ptr_traits;
-
- static node & to_node(const VoidPointer &p)
- { return *static_cast<node*>(static_cast<void*>(boost::movelib::to_raw_pointer(p))); }
-
- static VoidPointer from_node(node &n)
- { return node_ptr_traits::pointer_to(n); }
-
- static node_ptr to_node_ptr(const VoidPointer &p)
- { return node_ptr_traits::static_cast_from(p); }
-
- BOOST_MOVABLE_BUT_NOT_COPYABLE(basic_multiallocation_chain)
-
- public:
-
- typedef VoidPointer void_pointer;
- typedef typename slist_impl_t::iterator iterator;
- typedef typename slist_impl_t::size_type size_type;
-
- basic_multiallocation_chain()
- : slist_impl_()
- {}
-
- basic_multiallocation_chain(const void_pointer &b, const void_pointer &before_e, size_type n)
- : slist_impl_(to_node_ptr(b), to_node_ptr(before_e), n)
- {}
-
- basic_multiallocation_chain(BOOST_RV_REF(basic_multiallocation_chain) other)
- : slist_impl_(::boost::move(other.slist_impl_))
- {}
-
- basic_multiallocation_chain& operator=(BOOST_RV_REF(basic_multiallocation_chain) other)
- {
- slist_impl_ = ::boost::move(other.slist_impl_);
- return *this;
- }
-
- bool empty() const
- { return slist_impl_.empty(); }
-
- size_type size() const
- { return slist_impl_.size(); }
-
- iterator before_begin()
- { return slist_impl_.before_begin(); }
-
- iterator begin()
- { return slist_impl_.begin(); }
-
- iterator end()
- { return slist_impl_.end(); }
-
- iterator last()
- { return slist_impl_.last(); }
-
- void clear()
- { slist_impl_.clear(); }
-
- iterator insert_after(iterator it, void_pointer m)
- { return slist_impl_.insert_after(it, to_node(m)); }
-
- void push_front(const void_pointer &m)
- { return slist_impl_.push_front(to_node(m)); }
-
- void push_back(const void_pointer &m)
- { return slist_impl_.push_back(to_node(m)); }
-
- void_pointer pop_front()
- {
- node & n = slist_impl_.front();
- void_pointer ret = from_node(n);
- slist_impl_.pop_front();
- return ret;
- }
-
- void splice_after(iterator after_this, basic_multiallocation_chain &x, iterator before_b, iterator before_e, size_type n)
- { slist_impl_.splice_after(after_this, x.slist_impl_, before_b, before_e, n); }
-
- void splice_after(iterator after_this, basic_multiallocation_chain &x)
- { slist_impl_.splice_after(after_this, x.slist_impl_); }
-
- void erase_after(iterator before_b, iterator e, size_type n)
- { slist_impl_.erase_after(before_b, e, n); }
-
- void_pointer incorporate_after(iterator after_this, const void_pointer &b, size_type unit_bytes, size_type num_units)
- {
- typedef typename boost::intrusive::pointer_traits<char_ptr> char_pointer_traits;
- char_ptr elem = char_pointer_traits::static_cast_from(b);
- if(num_units){
- char_ptr prev_elem = elem;
- elem += unit_bytes;
- for(size_type i = 0; i != num_units-1; ++i, elem += unit_bytes){
- ::new (boost::movelib::to_raw_pointer(prev_elem)) void_pointer(elem);
- prev_elem = elem;
- }
- slist_impl_.incorporate_after(after_this, to_node_ptr(b), to_node_ptr(prev_elem), num_units);
- }
- return elem;
- }
-
- void incorporate_after(iterator after_this, void_pointer b, void_pointer before_e, size_type n)
- { slist_impl_.incorporate_after(after_this, to_node_ptr(b), to_node_ptr(before_e), n); }
-
- void swap(basic_multiallocation_chain &x)
- { slist_impl_.swap(x.slist_impl_); }
-
- static iterator iterator_to(const void_pointer &p)
- { return slist_impl_t::s_iterator_to(to_node(p)); }
-
- std::pair<void_pointer, void_pointer> extract_data()
- {
- std::pair<void_pointer, void_pointer> ret
- (slist_impl_.begin().operator->()
- ,slist_impl_.last().operator->());
- slist_impl_.clear();
- return ret;
- }
-};
-
-template<class T>
-struct cast_functor
-{
- typedef typename dtl::add_reference<T>::type result_type;
- template<class U>
- result_type operator()(U &ptr) const
- { return *static_cast<T*>(static_cast<void*>(&ptr)); }
-};
-
-template<class MultiallocationChain, class T>
-class transform_multiallocation_chain
- : public MultiallocationChain
-{
- private:
- BOOST_MOVABLE_BUT_NOT_COPYABLE(transform_multiallocation_chain)
- //transform_multiallocation_chain(const transform_multiallocation_chain &);
- //transform_multiallocation_chain & operator=(const transform_multiallocation_chain &);
-
- typedef typename MultiallocationChain::void_pointer void_pointer;
- typedef typename boost::intrusive::pointer_traits
- <void_pointer> void_pointer_traits;
- typedef typename void_pointer_traits::template
- rebind_pointer<T>::type pointer;
- typedef typename boost::intrusive::pointer_traits
- <pointer> pointer_traits;
-
- static pointer cast(const void_pointer &p)
- { return pointer_traits::static_cast_from(p); }
-
- public:
- typedef transform_iterator
- < typename MultiallocationChain::iterator
- , dtl::cast_functor <T> > iterator;
- typedef typename MultiallocationChain::size_type size_type;
-
- transform_multiallocation_chain()
- : MultiallocationChain()
- {}
-
- transform_multiallocation_chain(BOOST_RV_REF(transform_multiallocation_chain) other)
- : MultiallocationChain(::boost::move(static_cast<MultiallocationChain&>(other)))
- {}
-
- transform_multiallocation_chain(BOOST_RV_REF(MultiallocationChain) other)
- : MultiallocationChain(::boost::move(static_cast<MultiallocationChain&>(other)))
- {}
-
- transform_multiallocation_chain& operator=(BOOST_RV_REF(transform_multiallocation_chain) other)
- {
- return static_cast<MultiallocationChain&>
- (this->MultiallocationChain::operator=(::boost::move(static_cast<MultiallocationChain&>(other))));
- }
-/*
- void push_front(const pointer &mem)
- { holder_.push_front(mem); }
-
- void push_back(const pointer &mem)
- { return holder_.push_back(mem); }
-
- void swap(transform_multiallocation_chain &other_chain)
- { holder_.swap(other_chain.holder_); }
-
- void splice_after(iterator after_this, transform_multiallocation_chain &x, iterator before_b, iterator before_e, size_type n)
- { holder_.splice_after(after_this.base(), x.holder_, before_b.base(), before_e.base(), n); }
-
- void incorporate_after(iterator after_this, pointer b, pointer before_e, size_type n)
- { holder_.incorporate_after(after_this.base(), b, before_e, n); }
-*/
- pointer pop_front()
- { return cast(this->MultiallocationChain::pop_front()); }
-/*
- bool empty() const
- { return holder_.empty(); }
-
- iterator before_begin()
- { return iterator(holder_.before_begin()); }
-*/
- iterator begin()
- { return iterator(this->MultiallocationChain::begin()); }
-/*
- iterator end()
- { return iterator(holder_.end()); }
-
- iterator last()
- { return iterator(holder_.last()); }
-
- size_type size() const
- { return holder_.size(); }
-
- void clear()
- { holder_.clear(); }
-*/
- iterator insert_after(iterator it, pointer m)
- { return iterator(this->MultiallocationChain::insert_after(it.base(), m)); }
-
- static iterator iterator_to(const pointer &p)
- { return iterator(MultiallocationChain::iterator_to(p)); }
-
- std::pair<pointer, pointer> extract_data()
- {
- std::pair<void_pointer, void_pointer> data(this->MultiallocationChain::extract_data());
- return std::pair<pointer, pointer>(cast(data.first), cast(data.second));
- }
-/*
- MultiallocationChain &extract_multiallocation_chain()
- { return holder_; }*/
-};
-
-}}}
-
-// namespace dtl {
-// namespace container {
-// namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/node_alloc_holder.hpp b/src/third_party/boost-1.68.0/boost/container/detail/node_alloc_holder.hpp
deleted file mode 100644
index ad7b713d6e2..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/node_alloc_holder.hpp
+++ /dev/null
@@ -1,419 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_
-#define BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/allocator_traits.hpp>
-// container/detail
-#include <boost/container/detail/addressof.hpp>
-#include <boost/container/detail/alloc_helpers.hpp>
-#include <boost/container/detail/allocator_version_traits.hpp>
-#include <boost/container/detail/construct_in_place.hpp>
-#include <boost/container/detail/destroyers.hpp>
-#include <boost/move/detail/iterator_to_raw_pointer.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/placement_new.hpp>
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/version_type.hpp>
-// intrusive
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/options.hpp>
-// move
-#include <boost/move/utility_core.hpp>
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-// other
-#include <boost/core/no_exceptions_support.hpp>
-
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(value_compare)
-BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(predicate_type)
-
-template<class Allocator, class ICont>
-struct node_alloc_holder
-{
- //If the intrusive container is an associative container, obtain the predicate, which will
- //be of type node_compare<>. If not an associative container value_compare will be a "nat" type.
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
- ( boost::container::dtl::
- , ICont, value_compare, dtl::nat) intrusive_value_compare;
- //In that case obtain the value predicate from the node predicate via predicate_type
- //if intrusive_value_compare is node_compare<>, nat otherwise
- typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
- ( boost::container::dtl::
- , intrusive_value_compare
- , predicate_type, dtl::nat) value_compare;
-
- typedef allocator_traits<Allocator> allocator_traits_type;
- typedef typename allocator_traits_type::value_type value_type;
- typedef ICont intrusive_container;
- typedef typename ICont::value_type Node;
- typedef typename allocator_traits_type::template
- portable_rebind_alloc<Node>::type NodeAlloc;
- typedef allocator_traits<NodeAlloc> node_allocator_traits_type;
- typedef dtl::allocator_version_traits<NodeAlloc> node_allocator_version_traits_type;
- typedef Allocator ValAlloc;
- typedef typename node_allocator_traits_type::pointer NodePtr;
- typedef dtl::scoped_deallocator<NodeAlloc> Deallocator;
- typedef typename node_allocator_traits_type::size_type size_type;
- typedef typename node_allocator_traits_type::difference_type difference_type;
- typedef dtl::integral_constant<unsigned,
- boost::container::dtl::
- version<NodeAlloc>::value> alloc_version;
- typedef typename ICont::iterator icont_iterator;
- typedef typename ICont::const_iterator icont_citerator;
- typedef allocator_destroyer<NodeAlloc> Destroyer;
- typedef allocator_traits<NodeAlloc> NodeAllocTraits;
- typedef allocator_version_traits<NodeAlloc> AllocVersionTraits;
-
- private:
- BOOST_COPYABLE_AND_MOVABLE(node_alloc_holder)
-
- public:
-
- //Constructors for sequence containers
- node_alloc_holder()
- : members_()
- {}
-
- explicit node_alloc_holder(const ValAlloc &a)
- : members_(a)
- {}
-
- //Constructors for associative containers
- node_alloc_holder(const value_compare &c, const ValAlloc &a)
- : members_(a, c)
- {}
-
- explicit node_alloc_holder(const node_alloc_holder &x)
- : members_(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()))
- {}
-
- node_alloc_holder(const node_alloc_holder &x, const value_compare &c)
- : members_(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()), c)
- {}
-
- explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x)
- : members_(boost::move(x.node_alloc()))
- { this->icont().swap(x.icont()); }
-
- explicit node_alloc_holder(const value_compare &c)
- : members_(c)
- {}
-
- //helpers for move assignments
- explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x, const value_compare &c)
- : members_(boost::move(x.node_alloc()), c)
- { this->icont().swap(x.icont()); }
-
- void copy_assign_alloc(const node_alloc_holder &x)
- {
- dtl::bool_<allocator_traits_type::propagate_on_container_copy_assignment::value> flag;
- dtl::assign_alloc( static_cast<NodeAlloc &>(this->members_)
- , static_cast<const NodeAlloc &>(x.members_), flag);
- }
-
- void move_assign_alloc( node_alloc_holder &x)
- {
- dtl::bool_<allocator_traits_type::propagate_on_container_move_assignment::value> flag;
- dtl::move_alloc( static_cast<NodeAlloc &>(this->members_)
- , static_cast<NodeAlloc &>(x.members_), flag);
- }
-
- ~node_alloc_holder()
- { this->clear(alloc_version()); }
-
- size_type max_size() const
- { return allocator_traits_type::max_size(this->node_alloc()); }
-
- NodePtr allocate_one()
- { return AllocVersionTraits::allocate_one(this->node_alloc()); }
-
- void deallocate_one(const NodePtr &p)
- { AllocVersionTraits::deallocate_one(this->node_alloc(), p); }
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template<class ...Args>
- NodePtr create_node(Args &&...args)
- {
- NodePtr p = this->allocate_one();
- Deallocator node_deallocator(p, this->node_alloc());
- allocator_traits<NodeAlloc>::construct
- ( this->node_alloc()
- , dtl::addressof(p->m_data), boost::forward<Args>(args)...);
- node_deallocator.release();
- //This does not throw
- typedef typename Node::hook_type hook_type;
- ::new(static_cast<hook_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;
- return (p);
- }
-
- #else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- NodePtr create_node(BOOST_MOVE_UREF##N)\
- {\
- NodePtr p = this->allocate_one();\
- Deallocator node_deallocator(p, this->node_alloc());\
- allocator_traits<NodeAlloc>::construct\
- ( this->node_alloc()\
- , dtl::addressof(p->m_data)\
- BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- node_deallocator.release();\
- typedef typename Node::hook_type hook_type;\
- ::new(static_cast<hook_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;\
- return (p);\
- }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL)
- #undef BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template<class It>
- NodePtr create_node_from_it(const It &it)
- {
- NodePtr p = this->allocate_one();
- Deallocator node_deallocator(p, this->node_alloc());
- ::boost::container::construct_in_place(this->node_alloc(), dtl::addressof(p->m_data), it);
- node_deallocator.release();
- //This does not throw
- typedef typename Node::hook_type hook_type;
- ::new(static_cast<hook_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;
- return (p);
- }
-
- template<class KeyConvertible>
- NodePtr create_node_from_key(BOOST_FWD_REF(KeyConvertible) key)
- {
- NodePtr p = this->allocate_one();
- NodeAlloc &na = this->node_alloc();
- Deallocator node_deallocator(p, this->node_alloc());
- node_allocator_traits_type::construct
- (na, dtl::addressof(p->m_data.first), boost::forward<KeyConvertible>(key));
- BOOST_TRY{
- node_allocator_traits_type::construct(na, dtl::addressof(p->m_data.second));
- }
- BOOST_CATCH(...){
- node_allocator_traits_type::destroy(na, dtl::addressof(p->m_data.first));
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- node_deallocator.release();
- //This does not throw
- typedef typename Node::hook_type hook_type;
- ::new(static_cast<hook_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) hook_type;
- return (p);
- }
-
- void destroy_node(const NodePtr &nodep)
- {
- allocator_traits<NodeAlloc>::destroy(this->node_alloc(), boost::movelib::to_raw_pointer(nodep));
- this->deallocate_one(nodep);
- }
-
- void swap(node_alloc_holder &x)
- {
- this->icont().swap(x.icont());
- dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
- dtl::swap_alloc(this->node_alloc(), x.node_alloc(), flag);
- }
-
- template<class FwdIterator, class Inserter>
- void allocate_many_and_construct
- (FwdIterator beg, difference_type n, Inserter inserter)
- {
- if(n){
- typedef typename node_allocator_version_traits_type::multiallocation_chain multiallocation_chain;
-
- //Try to allocate memory in a single block
- typedef typename multiallocation_chain::iterator multialloc_iterator;
- multiallocation_chain mem;
- NodeAlloc &nalloc = this->node_alloc();
- node_allocator_version_traits_type::allocate_individual(nalloc, n, mem);
- multialloc_iterator itbeg(mem.begin()), itlast(mem.last());
- mem.clear();
- Node *p = 0;
- BOOST_TRY{
- Deallocator node_deallocator(NodePtr(), nalloc);
- dtl::scoped_destructor<NodeAlloc> sdestructor(nalloc, 0);
- while(n--){
- p = boost::movelib::iterator_to_raw_pointer(itbeg);
- node_deallocator.set(p);
- ++itbeg;
- //This can throw
- boost::container::construct_in_place(nalloc, dtl::addressof(p->m_data), beg);
- sdestructor.set(p);
- ++beg;
- //This does not throw
- typedef typename Node::hook_type hook_type;
- ::new(static_cast<hook_type*>(p), boost_container_new_t()) hook_type;
- //This can throw in some containers (predicate might throw).
- //(sdestructor will destruct the node and node_deallocator will deallocate it in case of exception)
- inserter(*p);
- sdestructor.set(0);
- }
- sdestructor.release();
- node_deallocator.release();
- }
- BOOST_CATCH(...){
- mem.incorporate_after(mem.last(), &*itbeg, &*itlast, n);
- node_allocator_version_traits_type::deallocate_individual(this->node_alloc(), mem);
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
- }
-
- void clear(version_1)
- { this->icont().clear_and_dispose(Destroyer(this->node_alloc())); }
-
- void clear(version_2)
- {
- typename NodeAlloc::multiallocation_chain chain;
- allocator_destroyer_and_chain_builder<NodeAlloc> builder(this->node_alloc(), chain);
- this->icont().clear_and_dispose(builder);
- //BOOST_STATIC_ASSERT((::boost::has_move_emulation_enabled<typename NodeAlloc::multiallocation_chain>::value == true));
- if(!chain.empty())
- this->node_alloc().deallocate_individual(chain);
- }
-
- icont_iterator erase_range(const icont_iterator &first, const icont_iterator &last, version_1)
- { return this->icont().erase_and_dispose(first, last, Destroyer(this->node_alloc())); }
-
- icont_iterator erase_range(const icont_iterator &first, const icont_iterator &last, version_2)
- {
- typedef typename NodeAlloc::multiallocation_chain multiallocation_chain;
- NodeAlloc & nalloc = this->node_alloc();
- multiallocation_chain chain;
- allocator_destroyer_and_chain_builder<NodeAlloc> chain_builder(nalloc, chain);
- icont_iterator ret_it = this->icont().erase_and_dispose(first, last, chain_builder);
- nalloc.deallocate_individual(chain);
- return ret_it;
- }
-
- template<class Key, class Comparator>
- size_type erase_key(const Key& k, const Comparator &comp, version_1)
- { return this->icont().erase_and_dispose(k, comp, Destroyer(this->node_alloc())); }
-
- template<class Key, class Comparator>
- size_type erase_key(const Key& k, const Comparator &comp, version_2)
- {
- allocator_multialloc_chain_node_deallocator<NodeAlloc> chain_holder(this->node_alloc());
- return this->icont().erase_and_dispose(k, comp, chain_holder.get_chain_builder());
- }
-
- protected:
- struct cloner
- {
- explicit cloner(node_alloc_holder &holder)
- : m_holder(holder)
- {}
-
- NodePtr operator()(const Node &other) const
- { return m_holder.create_node(other.m_data); }
-
- node_alloc_holder &m_holder;
- };
-
- struct move_cloner
- {
- move_cloner(node_alloc_holder &holder)
- : m_holder(holder)
- {}
-
- NodePtr operator()(Node &other)
- { //Use m_data instead of get_data to allow moving const key in [multi]map
- return m_holder.create_node(::boost::move(other.m_data));
- }
-
- node_alloc_holder &m_holder;
- };
-
- struct members_holder
- : public NodeAlloc
- {
- private:
- members_holder(const members_holder&);
- members_holder & operator=(const members_holder&);
-
- public:
- members_holder()
- : NodeAlloc(), m_icont()
- {}
-
- template<class ConvertibleToAlloc>
- explicit members_holder(BOOST_FWD_REF(ConvertibleToAlloc) c2alloc)
- : NodeAlloc(boost::forward<ConvertibleToAlloc>(c2alloc))
- , m_icont()
- {}
-
- template<class ConvertibleToAlloc>
- members_holder(BOOST_FWD_REF(ConvertibleToAlloc) c2alloc, const value_compare &c)
- : NodeAlloc(boost::forward<ConvertibleToAlloc>(c2alloc))
- , m_icont(typename ICont::key_compare(c))
- {}
-
- explicit members_holder(const value_compare &c)
- : NodeAlloc()
- , m_icont(typename ICont::key_compare(c))
- {}
-
- //The intrusive container
- ICont m_icont;
- };
-
- ICont &non_const_icont() const
- { return const_cast<ICont&>(this->members_.m_icont); }
-
- NodeAlloc &node_alloc()
- { return static_cast<NodeAlloc &>(this->members_); }
-
- const NodeAlloc &node_alloc() const
- { return static_cast<const NodeAlloc &>(this->members_); }
-
- members_holder members_;
-
- public:
- ICont &icont()
- { return this->members_.m_icont; }
-
- const ICont &icont() const
- { return this->members_.m_icont; }
-};
-
-} //namespace dtl {
-} //namespace container {
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/std_fwd.hpp b/src/third_party/boost-1.68.0/boost/container/detail/std_fwd.hpp
deleted file mode 100644
index 09678123ff7..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/std_fwd.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
-#define BOOST_CONTAINER_DETAIL_STD_FWD_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-//////////////////////////////////////////////////////////////////////////////
-// Standard predeclarations
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/move/detail/std_ns_begin.hpp>
-BOOST_MOVE_STD_NS_BEG
-
-template<class T>
-class allocator;
-
-template<class T>
-struct less;
-
-template<class T1, class T2>
-struct pair;
-
-template<class T>
-struct char_traits;
-
-struct input_iterator_tag;
-struct forward_iterator_tag;
-struct bidirectional_iterator_tag;
-struct random_access_iterator_tag;
-
-template<class Container>
-class insert_iterator;
-
-struct allocator_arg_t;
-
-struct piecewise_construct_t;
-
-BOOST_MOVE_STD_NS_END
-#include <boost/move/detail/std_ns_end.hpp>
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/thread_mutex.hpp b/src/third_party/boost-1.68.0/boost/container/detail/thread_mutex.hpp
deleted file mode 100644
index 628f28bb021..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/thread_mutex.hpp
+++ /dev/null
@@ -1,179 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2018-2018. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
-//
-// This code is partially based on the lightweight mutex implemented
-// by Boost.SmartPtr:
-//
-// Copyright (c) 2002, 2003 Peter Dimov
-// Copyright (c) Microsoft Corporation 2014
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#ifndef BOOST_CONTAINER_DETAIL_THREAD_MUTEX_HPP
-#define BOOST_CONTAINER_DETAIL_THREAD_MUTEX_HPP
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-#if defined(BOOST_HAS_PTHREADS)
-
-#include <pthread.h>
-#include <boost/assert.hpp>
-
-namespace boost{
-namespace container {
-namespace dtl {
-
-class thread_mutex
-{
- public:
- thread_mutex()
- {
- BOOST_VERIFY(pthread_mutex_init(&m_mut, 0) == 0);
- }
-
- ~thread_mutex()
- {
- BOOST_VERIFY(pthread_mutex_destroy(&m_mut) == 0);
- }
-
- void lock()
- {
- BOOST_VERIFY(pthread_mutex_lock( &m_mut) == 0);
- }
-
- void unlock()
- {
- BOOST_VERIFY(pthread_mutex_unlock(&m_mut) == 0);
- }
-
- private:
- thread_mutex(thread_mutex const &);
- thread_mutex & operator=(thread_mutex const &);
-
- pthread_mutex_t m_mut;
-};
-
-} // namespace dtl {
-} // namespace container {
-} // namespace boost {
-
-#else //!BOOST_HAS_PTHREADS (Windows implementation)
-
-#ifdef BOOST_USE_WINDOWS_H
-
-#include <windows.h>
-
-namespace boost{
-namespace container {
-namespace dtl {
-
-typedef ::CRITICAL_SECTION win_critical_section;
-
-} // namespace dtl {
-} // namespace container {
-} // namespace boost {
-
-#else //! BOOST_USE_WINDOWS_H
-
-struct _RTL_CRITICAL_SECTION_DEBUG;
-struct _RTL_CRITICAL_SECTION;
-
-namespace boost{
-namespace container {
-namespace dtl {
-
-#ifdef BOOST_PLAT_WINDOWS_UWP
-extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSectionEx(::_RTL_CRITICAL_SECTION *, unsigned long, unsigned long);
-#else
-extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(::_RTL_CRITICAL_SECTION *);
-#endif
-extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRITICAL_SECTION *);
-extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *);
-extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *);
-
-struct win_critical_section
-{
- struct _RTL_CRITICAL_SECTION_DEBUG * DebugInfo;
- long LockCount;
- long RecursionCount;
- void * OwningThread;
- void * LockSemaphore;
- #if defined(_WIN64)
- unsigned __int64 SpinCount;
- #else
- unsigned long SpinCount;
- #endif
-};
-
-} // namespace dtl {
-} // namespace container {
-} // namespace boost {
-
-#endif //BOOST_USE_WINDOWS_H
-
-namespace boost{
-namespace container {
-namespace dtl {
-
-class thread_mutex
-{
- public:
- thread_mutex()
- {
- #ifdef BOOST_PLAT_WINDOWS_UWP
- InitializeCriticalSectionEx(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect), 4000, 0);
- #else
- InitializeCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect));
- #endif
- }
-
- void lock()
- {
- EnterCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect));
- }
-
- void unlock()
- {
- LeaveCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect));
- }
-
- ~thread_mutex()
- {
- DeleteCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect));
- }
-
- private:
- thread_mutex(thread_mutex const &);
- thread_mutex & operator=(thread_mutex const &);
-
- win_critical_section m_crit_sect;
-};
-
-} // namespace dtl {
-} // namespace container {
-} // namespace boost {
-
-#endif //BOOST_HAS_PTHREADS
-
-#endif // #ifndef BOOST_CONTAINER_DETAIL_THREAD_MUTEX_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/tree.hpp b/src/third_party/boost-1.68.0/boost/container/detail/tree.hpp
deleted file mode 100644
index c32e992c838..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/tree.hpp
+++ /dev/null
@@ -1,1458 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_TREE_HPP
-#define BOOST_CONTAINER_TREE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-// container
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/options.hpp>
-#include <boost/container/node_handle.hpp>
-
-// container/detail
-#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
-#include <boost/container/detail/compare_functors.hpp>
-#include <boost/container/detail/destroyers.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/container/detail/node_alloc_holder.hpp>
-#include <boost/container/detail/pair.hpp>
-#include <boost/container/detail/type_traits.hpp>
-// intrusive
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/rbtree.hpp>
-#include <boost/intrusive/avltree.hpp>
-#include <boost/intrusive/splaytree.hpp>
-#include <boost/intrusive/sgtree.hpp>
-// intrusive/detail
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
-#include <boost/intrusive/detail/tree_value_compare.hpp> //tree_value_compare
-// move
-#include <boost/move/utility_core.hpp>
-// move/detail
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/detail/move_helpers.hpp>
-// other
-#include <boost/core/no_exceptions_support.hpp>
-
-
-
-#include <boost/container/detail/std_fwd.hpp>
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-using boost::intrusive::tree_value_compare;
-
-template<class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
-struct intrusive_tree_hook;
-
-template<class VoidPointer, bool OptimizeSize>
-struct intrusive_tree_hook<VoidPointer, boost::container::red_black_tree, OptimizeSize>
-{
- typedef typename dtl::bi::make_set_base_hook
- < dtl::bi::void_pointer<VoidPointer>
- , dtl::bi::link_mode<dtl::bi::normal_link>
- , dtl::bi::optimize_size<OptimizeSize>
- >::type type;
-};
-
-template<class VoidPointer, bool OptimizeSize>
-struct intrusive_tree_hook<VoidPointer, boost::container::avl_tree, OptimizeSize>
-{
- typedef typename dtl::bi::make_avl_set_base_hook
- < dtl::bi::void_pointer<VoidPointer>
- , dtl::bi::link_mode<dtl::bi::normal_link>
- , dtl::bi::optimize_size<OptimizeSize>
- >::type type;
-};
-
-template<class VoidPointer, bool OptimizeSize>
-struct intrusive_tree_hook<VoidPointer, boost::container::scapegoat_tree, OptimizeSize>
-{
- typedef typename dtl::bi::make_bs_set_base_hook
- < dtl::bi::void_pointer<VoidPointer>
- , dtl::bi::link_mode<dtl::bi::normal_link>
- >::type type;
-};
-
-template<class VoidPointer, bool OptimizeSize>
-struct intrusive_tree_hook<VoidPointer, boost::container::splay_tree, OptimizeSize>
-{
- typedef typename dtl::bi::make_bs_set_base_hook
- < dtl::bi::void_pointer<VoidPointer>
- , dtl::bi::link_mode<dtl::bi::normal_link>
- >::type type;
-};
-
-//This trait is used to type-pun std::pair because in C++03
-//compilers std::pair is useless for C++11 features
-template<class T>
-struct tree_internal_data_type
-{
- typedef T type;
-};
-
-template<class T1, class T2>
-struct tree_internal_data_type< std::pair<T1, T2> >
-{
- typedef pair<typename boost::move_detail::remove_const<T1>::type, T2> type;
-};
-
-//The node to be store in the tree
-template <class T, class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
-struct tree_node
- : public intrusive_tree_hook<VoidPointer, tree_type_value, OptimizeSize>::type
-{
- private:
- //BOOST_COPYABLE_AND_MOVABLE(tree_node)
- tree_node();
-
- public:
- typedef typename intrusive_tree_hook
- <VoidPointer, tree_type_value, OptimizeSize>::type hook_type;
- typedef T value_type;
- typedef typename tree_internal_data_type<T>::type internal_type;
-
- typedef tree_node< T, VoidPointer
- , tree_type_value, OptimizeSize> node_t;
-
- BOOST_CONTAINER_FORCEINLINE T &get_data()
- {
- T* ptr = reinterpret_cast<T*>(&this->m_data);
- return *ptr;
- }
-
- BOOST_CONTAINER_FORCEINLINE const T &get_data() const
- {
- const T* ptr = reinterpret_cast<const T*>(&this->m_data);
- return *ptr;
- }
-
- internal_type m_data;
-
- template<class T1, class T2>
- BOOST_CONTAINER_FORCEINLINE void do_assign(const std::pair<const T1, T2> &p)
- {
- const_cast<T1&>(m_data.first) = p.first;
- m_data.second = p.second;
- }
-
- template<class T1, class T2>
- BOOST_CONTAINER_FORCEINLINE void do_assign(const pair<const T1, T2> &p)
- {
- const_cast<T1&>(m_data.first) = p.first;
- m_data.second = p.second;
- }
-
- template<class V>
- BOOST_CONTAINER_FORCEINLINE void do_assign(const V &v)
- { m_data = v; }
-
- template<class T1, class T2>
- BOOST_CONTAINER_FORCEINLINE void do_move_assign(std::pair<const T1, T2> &p)
- {
- const_cast<T1&>(m_data.first) = ::boost::move(p.first);
- m_data.second = ::boost::move(p.second);
- }
-
- template<class T1, class T2>
- BOOST_CONTAINER_FORCEINLINE void do_move_assign(pair<const T1, T2> &p)
- {
- const_cast<T1&>(m_data.first) = ::boost::move(p.first);
- m_data.second = ::boost::move(p.second);
- }
-
- template<class V>
- BOOST_CONTAINER_FORCEINLINE void do_move_assign(V &v)
- { m_data = ::boost::move(v); }
-};
-
-template <class T, class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
-struct iiterator_node_value_type< tree_node<T, VoidPointer, tree_type_value, OptimizeSize> > {
- typedef T type;
-};
-
-template<class Node, class Icont>
-class insert_equal_end_hint_functor
-{
- Icont &icont_;
-
- public:
- BOOST_CONTAINER_FORCEINLINE insert_equal_end_hint_functor(Icont &icont)
- : icont_(icont)
- {}
-
- BOOST_CONTAINER_FORCEINLINE void operator()(Node &n)
- { this->icont_.insert_equal(this->icont_.cend(), n); }
-};
-
-template<class Node, class Icont>
-class push_back_functor
-{
- Icont &icont_;
-
- public:
- BOOST_CONTAINER_FORCEINLINE push_back_functor(Icont &icont)
- : icont_(icont)
- {}
-
- BOOST_CONTAINER_FORCEINLINE void operator()(Node &n)
- { this->icont_.push_back(n); }
-};
-
-}//namespace dtl {
-
-namespace dtl {
-
-template< class NodeType, class NodeCompareType
- , class SizeType, class HookType
- , boost::container::tree_type_enum tree_type_value>
-struct intrusive_tree_dispatch;
-
-template<class NodeType, class NodeCompareType, class SizeType, class HookType>
-struct intrusive_tree_dispatch
- <NodeType, NodeCompareType, SizeType, HookType, boost::container::red_black_tree>
-{
- typedef typename dtl::bi::make_rbtree
- <NodeType
- ,dtl::bi::compare<NodeCompareType>
- ,dtl::bi::base_hook<HookType>
- ,dtl::bi::constant_time_size<true>
- ,dtl::bi::size_type<SizeType>
- >::type type;
-};
-
-template<class NodeType, class NodeCompareType, class SizeType, class HookType>
-struct intrusive_tree_dispatch
- <NodeType, NodeCompareType, SizeType, HookType, boost::container::avl_tree>
-{
- typedef typename dtl::bi::make_avltree
- <NodeType
- ,dtl::bi::compare<NodeCompareType>
- ,dtl::bi::base_hook<HookType>
- ,dtl::bi::constant_time_size<true>
- ,dtl::bi::size_type<SizeType>
- >::type type;
-};
-
-template<class NodeType, class NodeCompareType, class SizeType, class HookType>
-struct intrusive_tree_dispatch
- <NodeType, NodeCompareType, SizeType, HookType, boost::container::scapegoat_tree>
-{
- typedef typename dtl::bi::make_sgtree
- <NodeType
- ,dtl::bi::compare<NodeCompareType>
- ,dtl::bi::base_hook<HookType>
- ,dtl::bi::floating_point<true>
- ,dtl::bi::size_type<SizeType>
- >::type type;
-};
-
-template<class NodeType, class NodeCompareType, class SizeType, class HookType>
-struct intrusive_tree_dispatch
- <NodeType, NodeCompareType, SizeType, HookType, boost::container::splay_tree>
-{
- typedef typename dtl::bi::make_splaytree
- <NodeType
- ,dtl::bi::compare<NodeCompareType>
- ,dtl::bi::base_hook<HookType>
- ,dtl::bi::constant_time_size<true>
- ,dtl::bi::size_type<SizeType>
- >::type type;
-};
-
-template<class Allocator, class ValueCompare, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
-struct intrusive_tree_type
-{
- private:
- typedef typename boost::container::
- allocator_traits<Allocator>::value_type value_type;
- typedef typename boost::container::
- allocator_traits<Allocator>::void_pointer void_pointer;
- typedef typename boost::container::
- allocator_traits<Allocator>::size_type size_type;
- typedef typename dtl::tree_node
- < value_type, void_pointer
- , tree_type_value, OptimizeSize> node_t;
- typedef value_to_node_compare
- <node_t, ValueCompare> node_compare_type;
- //Deducing the hook type from node_t (e.g. node_t::hook_type) would
- //provoke an early instantiation of node_t that could ruin recursive
- //tree definitions, so retype the complete type to avoid any problem.
- typedef typename intrusive_tree_hook
- <void_pointer, tree_type_value
- , OptimizeSize>::type hook_type;
- public:
- typedef typename intrusive_tree_dispatch
- < node_t, node_compare_type
- , size_type, hook_type
- , tree_type_value>::type type;
-};
-
-//Trait to detect manually rebalanceable tree types
-template<boost::container::tree_type_enum tree_type_value>
-struct is_manually_balanceable
-{ static const bool value = true; };
-
-template<> struct is_manually_balanceable<red_black_tree>
-{ static const bool value = false; };
-
-template<> struct is_manually_balanceable<avl_tree>
-{ static const bool value = false; };
-
-//Proxy traits to implement different operations depending on the
-//is_manually_balanceable<>::value
-template< boost::container::tree_type_enum tree_type_value
- , bool IsManuallyRebalanceable = is_manually_balanceable<tree_type_value>::value>
-struct intrusive_tree_proxy
-{
- template<class Icont>
- BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &) {}
-};
-
-template<boost::container::tree_type_enum tree_type_value>
-struct intrusive_tree_proxy<tree_type_value, true>
-{
- template<class Icont>
- BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &c)
- { c.rebalance(); }
-};
-
-} //namespace dtl {
-
-namespace dtl {
-
-//This functor will be used with Intrusive clone functions to obtain
-//already allocated nodes from a intrusive container instead of
-//allocating new ones. When the intrusive container runs out of nodes
-//the node holder is used instead.
-template<class AllocHolder, bool DoMove>
-class RecyclingCloner
-{
- typedef typename AllocHolder::intrusive_container intrusive_container;
- typedef typename AllocHolder::Node node_t;
- typedef typename AllocHolder::NodePtr node_ptr_type;
-
- public:
- RecyclingCloner(AllocHolder &holder, intrusive_container &itree)
- : m_holder(holder), m_icont(itree)
- {}
-
- BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type &p, const node_t &other, bool_<true>)
- { p->do_move_assign(const_cast<node_t &>(other).m_data); }
-
- BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type &p, const node_t &other, bool_<false>)
- { p->do_assign(other.m_data); }
-
- node_ptr_type operator()(const node_t &other) const
- {
- if(node_ptr_type p = m_icont.unlink_leftmost_without_rebalance()){
- //First recycle a node (this can't throw)
- BOOST_TRY{
- //This can throw
- this->do_assign(p, other, bool_<DoMove>());
- return p;
- }
- BOOST_CATCH(...){
- //If there is an exception destroy the whole source
- m_holder.destroy_node(p);
- while((p = m_icont.unlink_leftmost_without_rebalance())){
- m_holder.destroy_node(p);
- }
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
- else{
- return m_holder.create_node(other.m_data);
- }
- }
-
- AllocHolder &m_holder;
- intrusive_container &m_icont;
-};
-
-
-template<class KeyCompare, class KeyOfValue>
-struct key_node_compare
- : public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
-{
- BOOST_CONTAINER_FORCEINLINE explicit key_node_compare(const KeyCompare &comp)
- : base_t(comp)
- {}
-
- typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
- typedef KeyCompare key_compare;
- typedef KeyOfValue key_of_value;
- typedef typename KeyOfValue::type key_type;
-
-
- template <class T, class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
- BOOST_CONTAINER_FORCEINLINE static const key_type &
- key_from(const tree_node<T, VoidPointer, tree_type_value, OptimizeSize> &n)
- {
- return key_of_value()(n.get_data());
- }
-
- template <class T>
- BOOST_CONTAINER_FORCEINLINE static const T &
- key_from(const T &t)
- {
- return t;
- }
-
- BOOST_CONTAINER_FORCEINLINE const key_compare &key_comp() const
- { return static_cast<const key_compare &>(*this); }
-
- BOOST_CONTAINER_FORCEINLINE key_compare &key_comp()
- { return static_cast<key_compare &>(*this); }
-
- BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
- { return this->key_comp()(key1, key2); }
-
- template<class U>
- BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
- { return this->key_comp()(key1, this->key_from(nonkey2)); }
-
- template<class U>
- BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
- { return this->key_comp()(this->key_from(nonkey1), key2); }
-
- template<class U, class V>
- BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
- { return this->key_comp()(this->key_from(nonkey1), this->key_from(nonkey2)); }
-};
-
-template<class Options>
-struct get_tree_opt
-{
- typedef Options type;
-};
-
-template<>
-struct get_tree_opt<void>
-{
- typedef tree_assoc_defaults type;
-};
-
-template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
-class tree
- : public dtl::node_alloc_holder
- < Allocator
- , typename dtl::intrusive_tree_type
- < Allocator, tree_value_compare
- <typename allocator_traits<Allocator>::pointer, Compare, KeyOfValue>
- , get_tree_opt<Options>::type::tree_type
- , get_tree_opt<Options>::type::optimize_size
- >::type
- >
-{
- typedef tree_value_compare
- < typename allocator_traits<Allocator>::pointer
- , Compare, KeyOfValue> ValComp;
- typedef typename get_tree_opt<Options>::type options_type;
- typedef typename dtl::intrusive_tree_type
- < Allocator, ValComp
- , options_type::tree_type
- , options_type::optimize_size
- >::type Icont;
- typedef dtl::node_alloc_holder
- <Allocator, Icont> AllocHolder;
- typedef typename AllocHolder::NodePtr NodePtr;
- typedef tree < T, KeyOfValue
- , Compare, Allocator, Options> ThisType;
- typedef typename AllocHolder::NodeAlloc NodeAlloc;
- typedef boost::container::
- allocator_traits<NodeAlloc> allocator_traits_type;
- typedef typename AllocHolder::ValAlloc ValAlloc;
- typedef typename AllocHolder::Node Node;
- typedef typename Icont::iterator iiterator;
- typedef typename Icont::const_iterator iconst_iterator;
- typedef dtl::allocator_destroyer<NodeAlloc> Destroyer;
- typedef typename AllocHolder::alloc_version alloc_version;
- typedef intrusive_tree_proxy<options_type::tree_type> intrusive_tree_proxy_t;
-
- BOOST_COPYABLE_AND_MOVABLE(tree)
-
- public:
-
- typedef typename KeyOfValue::type key_type;
- typedef T value_type;
- typedef Allocator allocator_type;
- typedef Compare key_compare;
- typedef ValComp value_compare;
- typedef typename boost::container::
- allocator_traits<Allocator>::pointer pointer;
- typedef typename boost::container::
- allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename boost::container::
- allocator_traits<Allocator>::reference reference;
- typedef typename boost::container::
- allocator_traits<Allocator>::const_reference const_reference;
- typedef typename boost::container::
- allocator_traits<Allocator>::size_type size_type;
- typedef typename boost::container::
- allocator_traits<Allocator>::difference_type difference_type;
- typedef dtl::iterator_from_iiterator
- <iiterator, false> iterator;
- typedef dtl::iterator_from_iiterator
- <iiterator, true > const_iterator;
- typedef boost::container::reverse_iterator
- <iterator> reverse_iterator;
- typedef boost::container::reverse_iterator
- <const_iterator> const_reverse_iterator;
- typedef node_handle
- < NodeAlloc, void> node_type;
- typedef insert_return_type_base
- <iterator, node_type> insert_return_type;
-
- typedef NodeAlloc stored_allocator_type;
-
- private:
-
- typedef key_node_compare<key_compare, KeyOfValue> KeyNodeCompare;
-
- public:
-
- BOOST_CONTAINER_FORCEINLINE tree()
- : AllocHolder()
- {}
-
- BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp)
- : AllocHolder(ValComp(comp))
- {}
-
- BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp, const allocator_type& a)
- : AllocHolder(ValComp(comp), a)
- {}
-
- BOOST_CONTAINER_FORCEINLINE explicit tree(const allocator_type& a)
- : AllocHolder(a)
- {}
-
- template <class InputIterator>
- tree(bool unique_insertion, InputIterator first, InputIterator last)
- : AllocHolder(value_compare(key_compare()))
- {
- this->tree_construct(unique_insertion, first, last);
- //AllocHolder clears in case of exception
- }
-
- template <class InputIterator>
- tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp)
- : AllocHolder(value_compare(comp))
- {
- this->tree_construct(unique_insertion, first, last);
- //AllocHolder clears in case of exception
- }
-
- template <class InputIterator>
- tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp, const allocator_type& a)
- : AllocHolder(value_compare(comp), a)
- {
- this->tree_construct(unique_insertion, first, last);
- //AllocHolder clears in case of exception
- }
-
- //construct with ordered range
- template <class InputIterator>
- tree( ordered_range_t, InputIterator first, InputIterator last)
- : AllocHolder(value_compare(key_compare()))
- {
- this->tree_construct(ordered_range_t(), first, last);
- }
-
- template <class InputIterator>
- tree( ordered_range_t, InputIterator first, InputIterator last, const key_compare& comp)
- : AllocHolder(value_compare(comp))
- {
- this->tree_construct(ordered_range_t(), first, last);
- }
-
- template <class InputIterator>
- tree( ordered_range_t, InputIterator first, InputIterator last
- , const key_compare& comp, const allocator_type& a)
- : AllocHolder(value_compare(comp), a)
- {
- this->tree_construct(ordered_range_t(), first, last);
- }
-
- private:
-
- template <class InputIterator>
- void tree_construct(bool unique_insertion, InputIterator first, InputIterator last)
- {
- //Use cend() as hint to achieve linear time for
- //ordered ranges as required by the standard
- //for the constructor
- if(unique_insertion){
- const const_iterator end_it(this->cend());
- for ( ; first != last; ++first){
- this->insert_unique_convertible(end_it, *first);
- }
- }
- else{
- this->tree_construct_non_unique(first, last);
- }
- }
-
- template <class InputIterator>
- void tree_construct_non_unique(InputIterator first, InputIterator last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::enable_if_or
- < void
- , dtl::is_same<alloc_version, version_1>
- , dtl::is_input_iterator<InputIterator>
- >::type * = 0
- #endif
- )
- {
- //Use cend() as hint to achieve linear time for
- //ordered ranges as required by the standard
- //for the constructor
- const const_iterator end_it(this->cend());
- for ( ; first != last; ++first){
- this->insert_equal_convertible(end_it, *first);
- }
- }
-
- template <class InputIterator>
- void tree_construct_non_unique(InputIterator first, InputIterator last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_or
- < void
- , dtl::is_same<alloc_version, version_1>
- , dtl::is_input_iterator<InputIterator>
- >::type * = 0
- #endif
- )
- {
- //Optimized allocation and construction
- this->allocate_many_and_construct
- ( first, boost::container::iterator_distance(first, last)
- , insert_equal_end_hint_functor<Node, Icont>(this->icont()));
- }
-
- template <class InputIterator>
- void tree_construct( ordered_range_t, InputIterator first, InputIterator last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_or
- < void
- , dtl::is_same<alloc_version, version_1>
- , dtl::is_input_iterator<InputIterator>
- >::type * = 0
- #endif
- )
- {
- //Optimized allocation and construction
- this->allocate_many_and_construct
- ( first, boost::container::iterator_distance(first, last)
- , dtl::push_back_functor<Node, Icont>(this->icont()));
- //AllocHolder clears in case of exception
- }
-
- template <class InputIterator>
- void tree_construct( ordered_range_t, InputIterator first, InputIterator last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::enable_if_or
- < void
- , dtl::is_same<alloc_version, version_1>
- , dtl::is_input_iterator<InputIterator>
- >::type * = 0
- #endif
- )
- {
- for ( ; first != last; ++first){
- this->push_back_impl(*first);
- }
- }
-
- public:
-
- BOOST_CONTAINER_FORCEINLINE tree(const tree& x)
- : AllocHolder(x, x.value_comp())
- {
- this->icont().clone_from
- (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc()));
- }
-
- BOOST_CONTAINER_FORCEINLINE tree(BOOST_RV_REF(tree) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x), x.value_comp())
- {}
-
- BOOST_CONTAINER_FORCEINLINE tree(const tree& x, const allocator_type &a)
- : AllocHolder(x.value_comp(), a)
- {
- this->icont().clone_from
- (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc()));
- //AllocHolder clears in case of exception
- }
-
- tree(BOOST_RV_REF(tree) x, const allocator_type &a)
- : AllocHolder(x.value_comp(), a)
- {
- if(this->node_alloc() == x.node_alloc()){
- this->icont().swap(x.icont());
- }
- else{
- this->icont().clone_from
- (boost::move(x.icont()), typename AllocHolder::move_cloner(*this), Destroyer(this->node_alloc()));
- }
- //AllocHolder clears in case of exception
- }
-
- BOOST_CONTAINER_FORCEINLINE ~tree()
- {} //AllocHolder clears the tree
-
- tree& operator=(BOOST_COPY_ASSIGN_REF(tree) x)
- {
- if (&x != this){
- NodeAlloc &this_alloc = this->get_stored_allocator();
- const NodeAlloc &x_alloc = x.get_stored_allocator();
- dtl::bool_<allocator_traits<NodeAlloc>::
- propagate_on_container_copy_assignment::value> flag;
- if(flag && this_alloc != x_alloc){
- this->clear();
- }
- this->AllocHolder::copy_assign_alloc(x);
- //Transfer all the nodes to a temporary tree
- //If anything goes wrong, all the nodes will be destroyed
- //automatically
- Icont other_tree(::boost::move(this->icont()));
-
- //Now recreate the source tree reusing nodes stored by other_tree
- this->icont().clone_from
- (x.icont()
- , RecyclingCloner<AllocHolder, false>(*this, other_tree)
- , Destroyer(this->node_alloc()));
-
- //If there are remaining nodes, destroy them
- NodePtr p;
- while((p = other_tree.unlink_leftmost_without_rebalance())){
- AllocHolder::destroy_node(p);
- }
- }
- return *this;
- }
-
- tree& operator=(BOOST_RV_REF(tree) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- {
- BOOST_ASSERT(this != &x);
- NodeAlloc &this_alloc = this->node_alloc();
- NodeAlloc &x_alloc = x.node_alloc();
- const bool propagate_alloc = allocator_traits<NodeAlloc>::
- propagate_on_container_move_assignment::value;
- const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
- //Resources can be transferred if both allocators are
- //going to be equal after this function (either propagated or already equal)
- if(propagate_alloc || allocators_equal){
- //Destroy
- this->clear();
- //Move allocator if needed
- this->AllocHolder::move_assign_alloc(x);
- //Obtain resources
- this->icont() = boost::move(x.icont());
- }
- //Else do a one by one move
- else{
- //Transfer all the nodes to a temporary tree
- //If anything goes wrong, all the nodes will be destroyed
- //automatically
- Icont other_tree(::boost::move(this->icont()));
-
- //Now recreate the source tree reusing nodes stored by other_tree
- this->icont().clone_from
- (::boost::move(x.icont())
- , RecyclingCloner<AllocHolder, true>(*this, other_tree)
- , Destroyer(this->node_alloc()));
-
- //If there are remaining nodes, destroy them
- NodePtr p;
- while((p = other_tree.unlink_leftmost_without_rebalance())){
- AllocHolder::destroy_node(p);
- }
- }
- return *this;
- }
-
- public:
- // accessors:
- BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
- { return this->icont().value_comp().predicate(); }
-
- BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
- { return this->icont().value_comp().predicate().key_comp(); }
-
- BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
- { return allocator_type(this->node_alloc()); }
-
- BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const
- { return this->node_alloc(); }
-
- BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator()
- { return this->node_alloc(); }
-
- BOOST_CONTAINER_FORCEINLINE iterator begin()
- { return iterator(this->icont().begin()); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator begin() const
- { return this->cbegin(); }
-
- BOOST_CONTAINER_FORCEINLINE iterator end()
- { return iterator(this->icont().end()); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator end() const
- { return this->cend(); }
-
- BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin()
- { return reverse_iterator(end()); }
-
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const
- { return this->crbegin(); }
-
- BOOST_CONTAINER_FORCEINLINE reverse_iterator rend()
- { return reverse_iterator(begin()); }
-
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const
- { return this->crend(); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const
- { return const_iterator(this->non_const_icont().begin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator cend() const
- { return const_iterator(this->non_const_icont().end()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const
- { return const_reverse_iterator(cend()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const
- { return const_reverse_iterator(cbegin()); }
-
- BOOST_CONTAINER_FORCEINLINE bool empty() const
- { return !this->size(); }
-
- BOOST_CONTAINER_FORCEINLINE size_type size() const
- { return this->icont().size(); }
-
- BOOST_CONTAINER_FORCEINLINE size_type max_size() const
- { return AllocHolder::max_size(); }
-
- BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value )
- { AllocHolder::swap(x); }
-
- public:
-
- typedef typename Icont::insert_commit_data insert_commit_data;
-
- // insert/erase
- std::pair<iterator,bool> insert_unique_check
- (const key_type& key, insert_commit_data &data)
- {
- std::pair<iiterator, bool> ret =
- this->icont().insert_unique_check(key, KeyNodeCompare(key_comp()), data);
- return std::pair<iterator, bool>(iterator(ret.first), ret.second);
- }
-
- std::pair<iterator,bool> insert_unique_check
- (const_iterator hint, const key_type& key, insert_commit_data &data)
- {
- BOOST_ASSERT((priv_is_linked)(hint));
- std::pair<iiterator, bool> ret =
- this->icont().insert_unique_check(hint.get(), key, KeyNodeCompare(key_comp()), data);
- return std::pair<iterator, bool>(iterator(ret.first), ret.second);
- }
-
- template<class MovableConvertible>
- iterator insert_unique_commit
- (BOOST_FWD_REF(MovableConvertible) v, insert_commit_data &data)
- {
- NodePtr tmp = AllocHolder::create_node(boost::forward<MovableConvertible>(v));
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iterator ret(this->icont().insert_unique_commit(*tmp, data));
- destroy_deallocator.release();
- return ret;
- }
-
- template<class MovableConvertible>
- std::pair<iterator,bool> insert_unique(BOOST_FWD_REF(MovableConvertible) v)
- {
- insert_commit_data data;
- std::pair<iterator,bool> ret =
- this->insert_unique_check(KeyOfValue()(v), data);
- if(ret.second){
- ret.first = this->insert_unique_commit(boost::forward<MovableConvertible>(v), data);
- }
- return ret;
- }
-
- private:
-
- template<class KeyConvertible, class M>
- iiterator priv_insert_or_assign_commit
- (BOOST_FWD_REF(KeyConvertible) key, BOOST_FWD_REF(M) obj, insert_commit_data &data)
- {
- NodePtr tmp = AllocHolder::create_node(boost::forward<KeyConvertible>(key), boost::forward<M>(obj));
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iiterator ret(this->icont().insert_unique_commit(*tmp, data));
- destroy_deallocator.release();
- return ret;
- }
-
- bool priv_is_linked(const_iterator const position) const
- {
- iiterator const cur(position.get());
- return cur == this->icont().end() ||
- cur == this->icont().root() ||
- iiterator(cur).go_parent().go_left() == cur ||
- iiterator(cur).go_parent().go_right() == cur;
- }
-
- template<class MovableConvertible>
- void push_back_impl(BOOST_FWD_REF(MovableConvertible) v)
- {
- NodePtr tmp(AllocHolder::create_node(boost::forward<MovableConvertible>(v)));
- //push_back has no-throw guarantee so avoid any deallocator/destroyer
- this->icont().push_back(*tmp);
- }
-
- std::pair<iterator, bool> emplace_unique_impl(NodePtr p)
- {
- value_type &v = p->get_data();
- insert_commit_data data;
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(p, this->node_alloc());
- std::pair<iterator,bool> ret =
- this->insert_unique_check(KeyOfValue()(v), data);
- if(!ret.second){
- return ret;
- }
- //No throw insertion part, release rollback
- destroy_deallocator.release();
- return std::pair<iterator,bool>
- ( iterator(this->icont().insert_unique_commit(*p, data))
- , true );
- }
-
- iterator emplace_unique_hint_impl(const_iterator hint, NodePtr p)
- {
- BOOST_ASSERT((priv_is_linked)(hint));
- value_type &v = p->get_data();
- insert_commit_data data;
- std::pair<iterator,bool> ret =
- this->insert_unique_check(hint, KeyOfValue()(v), data);
- if(!ret.second){
- Destroyer(this->node_alloc())(p);
- return ret.first;
- }
- return iterator(this->icont().insert_unique_commit(*p, data));
- }
-
- public:
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
- { return this->emplace_unique_impl(AllocHolder::create_node(boost::forward<Args>(args)...)); }
-
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args)
- { return this->emplace_unique_hint_impl(hint, AllocHolder::create_node(boost::forward<Args>(args)...)); }
-
- template <class... Args>
- iterator emplace_equal(BOOST_FWD_REF(Args)... args)
- {
- NodePtr tmp(AllocHolder::create_node(boost::forward<Args>(args)...));
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));
- destroy_deallocator.release();
- return ret;
- }
-
- template <class... Args>
- iterator emplace_hint_equal(const_iterator hint, BOOST_FWD_REF(Args)... args)
- {
- BOOST_ASSERT((priv_is_linked)(hint));
- NodePtr tmp(AllocHolder::create_node(boost::forward<Args>(args)...));
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iterator ret(this->icont().insert_equal(hint.get(), *tmp));
- destroy_deallocator.release();
- return ret;
- }
-
- template <class KeyType, class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace
- (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args)
- {
- insert_commit_data data;
- const key_type & k = key; //Support emulated rvalue references
- std::pair<iiterator, bool> ret =
- hint == const_iterator() ? this->icont().insert_unique_check( k, KeyNodeCompare(key_comp()), data)
- : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);
- if(ret.second){
- ret.first = this->icont().insert_unique_commit
- (*AllocHolder::create_node(try_emplace_t(), boost::forward<KeyType>(key), boost::forward<Args>(args)...), data);
- }
- return std::pair<iterator, bool>(iterator(ret.first), ret.second);
- }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_TREE_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- std::pair<iterator, bool> emplace_unique(BOOST_MOVE_UREF##N)\
- { return this->emplace_unique_impl(AllocHolder::create_node(BOOST_MOVE_FWD##N)); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_hint_unique(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->emplace_unique_hint_impl(hint, AllocHolder::create_node(BOOST_MOVE_FWD##N)); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_equal(BOOST_MOVE_UREF##N)\
- {\
- NodePtr tmp(AllocHolder::create_node(BOOST_MOVE_FWD##N));\
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());\
- iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));\
- destroy_deallocator.release();\
- return ret;\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_hint_equal(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- BOOST_ASSERT((priv_is_linked)(hint));\
- NodePtr tmp(AllocHolder::create_node(BOOST_MOVE_FWD##N));\
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());\
- iterator ret(this->icont().insert_equal(hint.get(), *tmp));\
- destroy_deallocator.release();\
- return ret;\
- }\
- \
- template <class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool>\
- try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- insert_commit_data data;\
- const key_type & k = key;\
- std::pair<iiterator, bool> ret =\
- hint == const_iterator() ? this->icont().insert_unique_check( k, KeyNodeCompare(key_comp()), data)\
- : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);\
- if(ret.second){\
- ret.first = this->icont().insert_unique_commit\
- (*AllocHolder::create_node(try_emplace_t(), boost::forward<KeyType>(key) BOOST_MOVE_I##N BOOST_MOVE_FWD##N), data);\
- }\
- return std::pair<iterator, bool>(iterator(ret.first), ret.second);\
- }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_TREE_EMPLACE_CODE)
- #undef BOOST_CONTAINER_TREE_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- template<class MovableConvertible>
- iterator insert_unique_convertible(const_iterator hint, BOOST_FWD_REF(MovableConvertible) v)
- {
- BOOST_ASSERT((priv_is_linked)(hint));
- insert_commit_data data;
- std::pair<iterator,bool> ret =
- this->insert_unique_check(hint, KeyOfValue()(v), data);
- if(!ret.second)
- return ret.first;
- return this->insert_unique_commit(boost::forward<MovableConvertible>(v), data);
- }
-
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_unique, value_type, iterator, this->insert_unique_convertible, const_iterator, const_iterator)
-
- template <class InputIterator>
- void insert_unique(InputIterator first, InputIterator last)
- {
- for( ; first != last; ++first)
- this->insert_unique(*first);
- }
-
- iterator insert_equal(const value_type& v)
- {
- NodePtr tmp(AllocHolder::create_node(v));
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));
- destroy_deallocator.release();
- return ret;
- }
-
- template<class MovableConvertible>
- iterator insert_equal(BOOST_FWD_REF(MovableConvertible) v)
- {
- NodePtr tmp(AllocHolder::create_node(boost::forward<MovableConvertible>(v)));
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));
- destroy_deallocator.release();
- return ret;
- }
-
- template<class MovableConvertible>
- iterator insert_equal_convertible(const_iterator hint, BOOST_FWD_REF(MovableConvertible) v)
- {
- BOOST_ASSERT((priv_is_linked)(hint));
- NodePtr tmp(AllocHolder::create_node(boost::forward<MovableConvertible>(v)));
- scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
- iterator ret(this->icont().insert_equal(hint.get(), *tmp));
- destroy_deallocator.release();
- return ret;
- }
-
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_equal, value_type, iterator, this->insert_equal_convertible, const_iterator, const_iterator)
-
- template <class InputIterator>
- void insert_equal(InputIterator first, InputIterator last)
- {
- for( ; first != last; ++first)
- this->insert_equal(*first);
- }
-
- template<class KeyType, class M>
- std::pair<iterator, bool> insert_or_assign(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(M) obj)
- {
- insert_commit_data data;
- const key_type & k = key; //Support emulated rvalue references
- std::pair<iiterator, bool> ret =
- hint == const_iterator() ? this->icont().insert_unique_check(k, KeyNodeCompare(key_comp()), data)
- : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);
- if(ret.second){
- ret.first = this->priv_insert_or_assign_commit(boost::forward<KeyType>(key), boost::forward<M>(obj), data);
- }
- else{
- ret.first->get_data().second = boost::forward<M>(obj);
- }
- return std::pair<iterator, bool>(iterator(ret.first), ret.second);
- }
-
- iterator erase(const_iterator position)
- {
- BOOST_ASSERT(position != this->cend() && (priv_is_linked)(position));
- return iterator(this->icont().erase_and_dispose(position.get(), Destroyer(this->node_alloc())));
- }
-
- BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& k)
- { return AllocHolder::erase_key(k, KeyNodeCompare(key_comp()), alloc_version()); }
-
- iterator erase(const_iterator first, const_iterator last)
- {
- BOOST_ASSERT(first == last || (first != this->cend() && (priv_is_linked)(first)));
- BOOST_ASSERT(first == last || (priv_is_linked)(last));
- return iterator(AllocHolder::erase_range(first.get(), last.get(), alloc_version()));
- }
-
- node_type extract(const key_type& k)
- {
- iterator const it = this->find(k);
- if(this->end() != it){
- return this->extract(it);
- }
- return node_type();
- }
-
- node_type extract(const_iterator position)
- {
- BOOST_ASSERT(position != this->cend() && (priv_is_linked)(position));
- iiterator const iit(position.get());
- this->icont().erase(iit);
- return node_type(iit.operator->(), this->node_alloc());
- }
-
- insert_return_type insert_unique_node(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- {
- return this->insert_unique_node(this->end(), boost::move(nh));
- }
-
- insert_return_type insert_unique_node(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- {
- insert_return_type irt; //inserted == false, node.empty()
- if(!nh.empty()){
- insert_commit_data data;
- std::pair<iterator,bool> ret =
- this->insert_unique_check(hint, KeyOfValue()(nh.value()), data);
- if(ret.second){
- irt.inserted = true;
- irt.position = iterator(this->icont().insert_unique_commit(*nh.get(), data));
- nh.release();
- }
- else{
- irt.position = ret.first;
- irt.node = boost::move(nh);
- }
- }
- else{
- irt.position = this->end();
- }
- return BOOST_MOVE_RET(insert_return_type, irt);
- }
-
- iterator insert_equal_node(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- {
- if(nh.empty()){
- return this->end();
- }
- else{
- NodePtr const p(nh.release());
- return iterator(this->icont().insert_equal(*p));
- }
- }
-
- iterator insert_equal_node(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- {
- if(nh.empty()){
- return this->end();
- }
- else{
- NodePtr const p(nh.release());
- return iterator(this->icont().insert_equal(hint.get(), *p));
- }
- }
-
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge_unique(tree<T, KeyOfValue, C2, Allocator, Options>& source)
- { return this->icont().merge_unique(source.icont()); }
-
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge_equal(tree<T, KeyOfValue, C2, Allocator, Options>& source)
- { return this->icont().merge_equal(source.icont()); }
- BOOST_CONTAINER_FORCEINLINE void clear()
- { AllocHolder::clear(alloc_version()); }
-
- // search operations. Const and non-const overloads even if no iterator is returned
- // so splay implementations can to their rebalancing when searching in non-const versions
- BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& k)
- { return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& k) const
- { return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, iterator>::type
- find(const K& k)
- { return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
- find(const K& k) const
- { return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
-
- BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& k) const
- { return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, size_type>::type
- count(const K& k) const
- { return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
-
- BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
- { return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
- { return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, iterator>::type
- lower_bound(const K& k)
- { return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
- lower_bound(const K& k) const
- { return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
-
- BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
- { return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
-
- BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
- { return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, iterator>::type
- upper_bound(const K& k)
- { return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
- upper_bound(const K& k) const
- { return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
-
- std::pair<iterator,iterator> equal_range(const key_type& k)
- {
- std::pair<iiterator, iiterator> ret =
- this->icont().equal_range(k, KeyNodeCompare(key_comp()));
- return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
- }
-
- std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
- {
- std::pair<iiterator, iiterator> ret =
- this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp()));
- return std::pair<const_iterator,const_iterator>
- (const_iterator(ret.first), const_iterator(ret.second));
- }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
- equal_range(const K& k)
- {
- std::pair<iiterator, iiterator> ret =
- this->icont().equal_range(k, KeyNodeCompare(key_comp()));
- return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
- }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
- equal_range(const K& k) const
- {
- std::pair<iiterator, iiterator> ret =
- this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp()));
- return std::pair<const_iterator,const_iterator>
- (const_iterator(ret.first), const_iterator(ret.second));
- }
-
- std::pair<iterator,iterator> lower_bound_range(const key_type& k)
- {
- std::pair<iiterator, iiterator> ret =
- this->icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
- return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
- }
-
- std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
- {
- std::pair<iiterator, iiterator> ret =
- this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
- return std::pair<const_iterator,const_iterator>
- (const_iterator(ret.first), const_iterator(ret.second));
- }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
- lower_bound_range(const K& k)
- {
- std::pair<iiterator, iiterator> ret =
- this->icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
- return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
- }
-
- template <class K>
- BOOST_CONTAINER_FORCEINLINE
- typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
- lower_bound_range(const K& k) const
- {
- std::pair<iiterator, iiterator> ret =
- this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
- return std::pair<const_iterator,const_iterator>
- (const_iterator(ret.first), const_iterator(ret.second));
- }
-
- BOOST_CONTAINER_FORCEINLINE void rebalance()
- { intrusive_tree_proxy_t::rebalance(this->icont()); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator==(const tree& x, const tree& y)
- { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator<(const tree& x, const tree& y)
- { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const tree& x, const tree& y)
- { return !(x == y); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator>(const tree& x, const tree& y)
- { return y < x; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const tree& x, const tree& y)
- { return !(y < x); }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const tree& x, const tree& y)
- { return !(x < y); }
-
- BOOST_CONTAINER_FORCEINLINE friend void swap(tree& x, tree& y)
- { x.swap(y); }
-};
-
-} //namespace dtl {
-} //namespace container {
-
-template <class T>
-struct has_trivial_destructor_after_move;
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
-struct has_trivial_destructor_after_move
- <
- ::boost::container::dtl::tree
- <T, KeyOfValue, Compare, Allocator, Options>
- >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-} //namespace boost {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_TREE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/type_traits.hpp b/src/third_party/boost-1.68.0/boost/container/detail/type_traits.hpp
deleted file mode 100644
index 686cc409b76..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/type_traits.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// (C) Copyright John Maddock 2000.
-// (C) Copyright Ion Gaztanaga 2005-2015.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-// The alignment and Type traits implementation comes from
-// John Maddock's TypeTraits library.
-//
-// Some other tricks come from Howard Hinnant's papers and StackOverflow replies
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
-#define BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/move/detail/type_traits.hpp>
-
-namespace boost {
-namespace container {
-namespace dtl {
-
-using ::boost::move_detail::enable_if;
-using ::boost::move_detail::enable_if_and;
-using ::boost::move_detail::is_same;
-using ::boost::move_detail::is_different;
-using ::boost::move_detail::is_pointer;
-using ::boost::move_detail::add_reference;
-using ::boost::move_detail::add_const;
-using ::boost::move_detail::add_const_reference;
-using ::boost::move_detail::remove_const;
-using ::boost::move_detail::remove_reference;
-using ::boost::move_detail::make_unsigned;
-using ::boost::move_detail::is_floating_point;
-using ::boost::move_detail::is_integral;
-using ::boost::move_detail::is_enum;
-using ::boost::move_detail::is_pod;
-using ::boost::move_detail::is_empty;
-using ::boost::move_detail::is_trivially_destructible;
-using ::boost::move_detail::is_trivially_default_constructible;
-using ::boost::move_detail::is_trivially_copy_constructible;
-using ::boost::move_detail::is_trivially_move_constructible;
-using ::boost::move_detail::is_trivially_copy_assignable;
-using ::boost::move_detail::is_trivially_move_assignable;
-using ::boost::move_detail::is_nothrow_default_constructible;
-using ::boost::move_detail::is_nothrow_copy_constructible;
-using ::boost::move_detail::is_nothrow_move_constructible;
-using ::boost::move_detail::is_nothrow_copy_assignable;
-using ::boost::move_detail::is_nothrow_move_assignable;
-using ::boost::move_detail::is_nothrow_swappable;
-using ::boost::move_detail::alignment_of;
-using ::boost::move_detail::aligned_storage;
-using ::boost::move_detail::nat;
-using ::boost::move_detail::max_align_t;
-
-} //namespace dtl {
-} //namespace container {
-} //namespace boost {
-
-#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/workaround.hpp b/src/third_party/boost-1.68.0/boost/container/detail/workaround.hpp
deleted file mode 100644
index 736326b779e..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/detail/workaround.hpp
+++ /dev/null
@@ -1,111 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
-#define BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)\
- && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL)
- #define BOOST_CONTAINER_PERFECT_FORWARDING
-#endif
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\
- && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700)
- #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST
-#endif
-
-#if defined(BOOST_GCC_VERSION)
-# if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11)
-# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
-# endif
-#elif defined(BOOST_MSVC)
-# if _MSC_FULL_VER < 180020827
-# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
-# endif
-#elif defined(BOOST_CLANG)
-# if !__has_feature(cxx_delegating_constructors)
-# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
-# endif
-#endif
-
-#if defined(BOOST_MSVC) && (_MSC_VER < 1400)
- #define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
-#endif
-
-#if !defined(BOOST_NO_CXX11_HDR_TUPLE) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1700 || BOOST_MSVC == 1600))
-#define BOOST_CONTAINER_PAIR_TEST_HAS_HEADER_TUPLE
-#endif
-
-//Macros for documentation purposes. For code, expands to the argument
-#define BOOST_CONTAINER_IMPDEF(TYPE) TYPE
-#define BOOST_CONTAINER_SEEDOC(TYPE) TYPE
-
-//Macros for memset optimization. In most platforms
-//memsetting pointers and floatings is safe and faster.
-//
-//If your platform does not offer these guarantees
-//define these to value zero.
-#ifndef BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_NOT_ZERO
-#define BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO 1
-#endif
-
-#ifndef BOOST_CONTAINER_MEMZEROED_POINTER_IS_NOT_NULL
-#define BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL
-#endif
-
-#define BOOST_CONTAINER_DOC1ST(TYPE1, TYPE2) TYPE2
-#define BOOST_CONTAINER_I ,
-#define BOOST_CONTAINER_DOCIGN(T) T
-#define BOOST_CONTAINER_DOCONLY(T)
-
-/*
- we need to import/export our code only if the user has specifically
- asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
- libraries to be dynamically linked, or BOOST_CONTAINER_DYN_LINK
- if they want just this one to be dynamically liked:
-*/
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTAINER_DYN_LINK)
-
- /* export if this is our own source, otherwise import: */
- #ifdef BOOST_CONTAINER_SOURCE
- # define BOOST_CONTAINER_DECL BOOST_SYMBOL_EXPORT
- #else
- # define BOOST_CONTAINER_DECL BOOST_SYMBOL_IMPORT
-
- #endif /* BOOST_CONTAINER_SOURCE */
-#else
- #define BOOST_CONTAINER_DECL
-#endif /* DYN_LINK */
-
-//#define BOOST_CONTAINER_DISABLE_FORCEINLINE
-
-#if defined(BOOST_CONTAINER_DISABLE_FORCEINLINE)
- #define BOOST_CONTAINER_FORCEINLINE inline
-#elif defined(BOOST_CONTAINER_FORCEINLINE_IS_BOOST_FORCELINE)
- #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE
-#elif defined(BOOST_MSVC) && defined(_DEBUG)
- //"__forceinline" and MSVC seems to have some bugs in debug mode
- #define BOOST_CONTAINER_FORCEINLINE inline
-#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
- //Older GCCs have problems with forceinline
- #define BOOST_CONTAINER_FORCEINLINE inline
-#else
- #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE
-#endif
-
-#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/flat_map.hpp b/src/third_party/boost-1.68.0/boost/container/flat_map.hpp
deleted file mode 100644
index 96799466289..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/flat_map.hpp
+++ /dev/null
@@ -1,2890 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_FLAT_MAP_HPP
-#define BOOST_CONTAINER_FLAT_MAP_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-// container
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-#include <boost/container/throw_exception.hpp>
-// container/detail
-#include <boost/container/detail/flat_tree.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/algorithm.hpp> //equal()
-#include <boost/container/detail/container_or_allocator_rebind.hpp>
-// move
-#include <boost/move/utility_core.hpp>
-#include <boost/move/traits.hpp>
-// move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/detail/move_helpers.hpp>
-// intrusive
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
-//others
-#include <boost/core/no_exceptions_support.hpp>
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-template <class Key, class T, class Compare, class AllocatorOrContainer>
-class flat_multimap;
-
-namespace dtl{
-
-template<class D, class S>
-BOOST_CONTAINER_FORCEINLINE static D &force(S &s)
-{ return *reinterpret_cast<D*>(&s); }
-
-template<class D, class S>
-BOOST_CONTAINER_FORCEINLINE static D force_copy(const S &s)
-{
- const D *const vp = reinterpret_cast<const D *>(&s);
- D ret_val(*vp);
- return ret_val;
-}
-
-} //namespace dtl{
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A flat_map is a kind of associative container that supports unique keys (contains at
-//! most one of each key value) and provides for fast retrieval of values of another
-//! type T based on the keys.
-//!
-//! A flat_map satisfies all of the requirements of a container, a reversible
-//! container and an associative container. A flat_map also provides
-//! most operations described for unique keys. For a
-//! flat_map<Key,T> the key_type is Key and the value_type is std::pair<Key,T>
-//! (unlike std::map<Key, T> which value_type is std::pair<<b>const</b> Key, T>).
-//!
-//! flat_map is similar to std::map but it's implemented by as an ordered sequence container.
-//! The underlying sequence container is by default <i>vector</i> but it can also work
-//! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
-//!
-//! Using vector-like sequence containers means that inserting a new element into a flat_map might invalidate
-//! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
-//! container that offers stable pointers and references). Similarly, erasing an element might invalidate
-//! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
-//!
-//! This container provides random-access iterators.
-//!
-//! \tparam Key is the key_type of the map
-//! \tparam Value is the <code>mapped_type</code>
-//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
-//! \tparam AllocatorOrContainer is either:
-//! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
-//! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
-//! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
-//! sequence container with random-access iterators..
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class Key, class T, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator< std::pair< Key, T> > >
-#else
-template <class Key, class T, class Compare, class AllocatorOrContainer>
-#endif
-class flat_map
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(flat_map)
- //This is the tree that we should store if pair was movable
- typedef dtl::flat_tree<
- std::pair<Key, T>,
- dtl::select1st<Key>,
- Compare,
- AllocatorOrContainer> tree_t;
-
- //This is the real tree stored here. It's based on a movable pair
- typedef dtl::flat_tree<
- dtl::pair<Key, T>,
- dtl::select1st<Key>,
- Compare,
- typename dtl::container_or_allocator_rebind<AllocatorOrContainer, dtl::pair<Key, T> >::type
- > impl_tree_t;
- impl_tree_t m_flat_tree; // flat tree representing flat_map
-
- typedef typename impl_tree_t::value_type impl_value_type;
- typedef typename impl_tree_t::const_iterator impl_const_iterator;
- typedef typename impl_tree_t::iterator impl_iterator;
- typedef typename impl_tree_t::allocator_type impl_allocator_type;
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- typedef std::initializer_list<impl_value_type> impl_initializer_list;
- #endif
-
- typedef dtl::flat_tree_value_compare
- < Compare
- , dtl::select1st<Key>
- , std::pair<Key, T> > value_compare_t;
- typedef typename tree_t::iterator iterator_t;
- typedef typename tree_t::const_iterator const_iterator_t;
- typedef typename tree_t::reverse_iterator reverse_iterator_t;
- typedef typename tree_t::const_reverse_iterator const_reverse_iterator_t;
-
- public:
- typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
- typedef typename impl_tree_t::sequence_type impl_sequence_type;
-
- BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree()
- { return m_flat_tree; }
-
- BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const
- { return m_flat_tree; }
-
- private:
- typedef typename tree_t::get_stored_allocator_const_return_t get_stored_allocator_const_return_t;
- typedef typename tree_t::get_stored_allocator_noconst_return_t get_stored_allocator_noconst_return_t;
- typedef typename impl_tree_t::get_stored_allocator_const_return_t impl_get_stored_allocator_const_return_t;
- typedef typename impl_tree_t::get_stored_allocator_noconst_return_t impl_get_stored_allocator_noconst_return_t;
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
-
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
- typedef Key key_type;
- typedef T mapped_type;
- typedef Compare key_compare;
- typedef std::pair<Key, T> value_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
- typedef typename sequence_type::allocator_type allocator_type;
- typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
- typedef typename sequence_type::pointer pointer;
- typedef typename sequence_type::const_pointer const_pointer;
- typedef typename sequence_type::reference reference;
- typedef typename sequence_type::const_reference const_reference;
- typedef typename sequence_type::size_type size_type;
- typedef typename sequence_type::difference_type difference_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
-
- typedef typename sequence_type::iterator iterator;
- typedef typename sequence_type::const_iterator const_iterator;
- typedef typename sequence_type::reverse_iterator reverse_iterator;
- typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
- typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
-
- //AllocatorOrContainer::value_type must be std::pair<Key, T>
- BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, typename allocator_type::value_type>::value));
-
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructs an empty flat_map.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE flat_map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
- dtl::is_nothrow_default_constructible<Compare>::value)
- : m_flat_tree()
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit flat_map(const allocator_type& a)
- : m_flat_tree(dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified
- //! comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit flat_map(const Compare& comp)
- : m_flat_tree(comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified
- //! comparison object and allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE flat_map(const Compare& comp, const allocator_type& a)
- : m_flat_tree(comp, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map and
- //! and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last)
- : m_flat_tree(true, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const allocator_type& a)
- : m_flat_tree(true, first, last, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp)
- : m_flat_tree(true, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : m_flat_tree(true, first, last, comp, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map
- //! and inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_map(ordered_unique_range_t, InputIterator first, InputIterator last)
- : m_flat_tree(ordered_range, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : m_flat_tree(ordered_range, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! allocator, and inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : m_flat_tree(ordered_range, first, last, comp, dtl::force<const impl_allocator_type>(a))
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs an empty flat_map and
- //! inserts elements from the range [il.begin() ,il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il)
- : m_flat_tree( true
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end())
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified
- //! allocator, and inserts elements from the range [il.begin() ,il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const allocator_type& a)
- : m_flat_tree( true
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end()
- , dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! inserts elements from the range [il.begin() ,il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const Compare& comp)
- : m_flat_tree(true
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end()
- , comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! allocator, and inserts elements from the range [il.begin() ,il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : m_flat_tree(true
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end()
- , comp
- , dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using and
- //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il)
- : m_flat_tree(ordered_unique_range
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end())
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
- : m_flat_tree(ordered_unique_range
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end()
- , comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : m_flat_tree( ordered_unique_range
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end()
- , comp
- , dtl::force<const impl_allocator_type>(a))
- {}
-#endif
-
- //! <b>Effects</b>: Copy constructs a flat_map.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x)
- : m_flat_tree(x.m_flat_tree)
- {}
-
- //! <b>Effects</b>: Move constructs a flat_map.
- //! Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Postcondition</b>: x is emptied.
- BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : m_flat_tree(boost::move(x.m_flat_tree))
- {}
-
- //! <b>Effects</b>: Copy constructs a flat_map using the specified allocator.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x, const allocator_type &a)
- : m_flat_tree(x.m_flat_tree, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Move constructs a flat_map using the specified allocator.
- //! Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant if x.get_allocator() == a, linear otherwise.
- BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x, const allocator_type &a)
- : m_flat_tree(boost::move(x.m_flat_tree), dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Makes *this a copy of x.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_COPY_ASSIGN_REF(flat_map) x)
- { m_flat_tree = x.m_flat_tree; return *this; }
-
- //! <b>Effects</b>: Move constructs a flat_map.
- //! Constructs *this using x's resources.
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_RV_REF(flat_map) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { m_flat_tree = boost::move(x.m_flat_tree); return *this; }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assign elements from il to *this
- flat_map& operator=(std::initializer_list<value_type> il)
- {
- this->clear();
- this->insert(il.begin(), il.end());
- return *this;
- }
-#endif
-
- //! <b>Effects</b>: Returns a copy of the allocator that
- //! was passed to the object's constructor.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE get_stored_allocator_noconst_return_t get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- {
- impl_get_stored_allocator_noconst_return_t r = m_flat_tree.get_stored_allocator();
- return dtl::force<stored_allocator_type>(r);
- }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE get_stored_allocator_const_return_t get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- impl_get_stored_allocator_const_return_t r = m_flat_tree.get_stored_allocator();
- return dtl::force<const stored_allocator_type>(r);
- }
-
- //////////////////////////////////////////////
- //
- // iterators
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<iterator>(m_flat_tree.begin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_iterator>(m_flat_tree.begin()); }
-
- //! <b>Effects</b>: Returns an iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<iterator>(m_flat_tree.end()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_iterator>(m_flat_tree.end()); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<reverse_iterator>(m_flat_tree.rend()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_iterator>(m_flat_tree.cbegin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_iterator>(m_flat_tree.cend()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
-
- //////////////////////////////////////////////
- //
- // capacity
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns true if the container contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.empty(); }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.size(); }
-
- //! <b>Effects</b>: Returns the largest possible size of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.max_size(); }
-
- //! <b>Effects</b>: Number of elements for which memory has been allocated.
- //! capacity() is always greater than or equal to size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.capacity(); }
-
- //! <b>Effects</b>: If n is less than or equal to capacity(), or the
- //! underlying container has no `reserve` member, this call has no
- //! effect. Otherwise, it is a request for allocation of additional memory.
- //! If the request is successful, then capacity() is greater than or equal to
- //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
- //!
- //! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
- //!
- //! <b>Note</b>: If capacity() is less than "cnt", iterators and references to
- //! to values might be invalidated.
- BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt)
- { m_flat_tree.reserve(cnt); }
-
- //! <b>Effects</b>: Tries to deallocate the excess of memory created
- // with previous allocations. The size of the vector is unchanged
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to size().
- BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
- { m_flat_tree.shrink_to_fit(); }
-
- //////////////////////////////////////////////
- //
- // element access
- //
- //////////////////////////////////////////////
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! Effects: If there is no key equivalent to x in the flat_map, inserts
- //! value_type(x, T()) into the flat_map.
- //!
- //! Returns: A reference to the mapped_type corresponding to x in *this.
- //!
- //! Complexity: Logarithmic.
- mapped_type &operator[](const key_type& k);
-
- //! Effects: If there is no key equivalent to x in the flat_map, inserts
- //! value_type(move(x), T()) into the flat_map (the key is move-constructed)
- //!
- //! Returns: A reference to the mapped_type corresponding to x in *this.
- //!
- //! Complexity: Logarithmic.
- mapped_type &operator[](key_type &&k) ;
- #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
- //in compilers like GCC 3.4, we can't catch temporaries
- BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
- BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript)
- #endif
-
- //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
- //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
- //! as if by insert, constructing it from value_type(k, forward<M>(obj)).
- //!
- //! No iterators or references are invalidated. If the insertion is successful, pointers and references
- //! to the element obtained while it is held in the node handle are invalidated, and pointers and
- //! references obtained to that element before it was extracted become valid.
- //!
- //! Returns: The bool component is true if the insertion took place and false if the assignment
- //! took place. The iterator component is pointing at the element that was inserted or updated.
- //!
- //! Complexity: Logarithmic in the size of the container.
- template <class M>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
- {
- return dtl::force_copy< std::pair<iterator, bool> >
- (this->m_flat_tree.insert_or_assign
- ( impl_const_iterator(), k, ::boost::forward<M>(obj))
- );
- }
-
- //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
- //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
- //! as if by insert, constructing it from value_type(k, move(obj)).
- //!
- //! No iterators or references are invalidated. If the insertion is successful, pointers and references
- //! to the element obtained while it is held in the node handle are invalidated, and pointers and
- //! references obtained to that element before it was extracted become valid.
- //!
- //! Returns: The bool component is true if the insertion took place and false if the assignment
- //! took place. The iterator component is pointing at the element that was inserted or updated.
- //!
- //! Complexity: Logarithmic in the size of the container.
- template <class M>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
- {
- return dtl::force_copy< std::pair<iterator, bool> >
- (this->m_flat_tree.insert_or_assign
- ( impl_const_iterator(), ::boost::move(k), ::boost::forward<M>(obj))
- );
- }
-
- //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
- //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
- //! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
- //! to the container as close as possible to the position just before hint.
- //!
- //! No iterators or references are invalidated. If the insertion is successful, pointers and references
- //! to the element obtained while it is held in the node handle are invalidated, and pointers and
- //! references obtained to that element before it was extracted become valid.
- //!
- //! Returns: The bool component is true if the insertion took place and false if the assignment
- //! took place. The iterator component is pointing at the element that was inserted or updated.
- //!
- //! Complexity: Logarithmic in the size of the container in general, but amortized constant if
- //! the new element is inserted just before hint.
- template <class M>
- BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
- {
- return dtl::force_copy< std::pair<iterator, bool> >
- (this->m_flat_tree.insert_or_assign
- ( dtl::force_copy<impl_const_iterator>(hint)
- , k, ::boost::forward<M>(obj))
- );
- }
-
- //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
- //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
- //! as if by insert, constructing it from value_type(k, move(obj)) and the new element
- //! to the container as close as possible to the position just before hint.
- //!
- //! No iterators or references are invalidated. If the insertion is successful, pointers and references
- //! to the element obtained while it is held in the node handle are invalidated, and pointers and
- //! references obtained to that element before it was extracted become valid.
- //!
- //! Returns: The bool component is true if the insertion took place and false if the assignment
- //! took place. The iterator component is pointing at the element that was inserted or updated.
- //!
- //! Complexity: Logarithmic in the size of the container in general, but amortized constant if
- //! the new element is inserted just before hint.
- template <class M>
- BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
- {
- return dtl::force_copy< std::pair<iterator, bool> >
- (this->m_flat_tree.insert_or_assign
- ( dtl::force_copy<impl_const_iterator>(hint)
- , ::boost::move(k), ::boost::forward<M>(obj))
- );
- }
-
- //! @copydoc ::boost::container::flat_set::nth(size_type)
- BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
-
- //! @copydoc ::boost::container::flat_set::nth(size_type) const
- BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
-
- //! @copydoc ::boost::container::flat_set::index_of(iterator)
- BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.index_of(dtl::force_copy<impl_iterator>(p)); }
-
- //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
- BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.index_of(dtl::force_copy<impl_const_iterator>(p)); }
-
- //! Returns: A reference to the element whose key is equivalent to x.
- //!
- //! Throws: An exception object of type out_of_range if no such element is present.
- //!
- //! Complexity: logarithmic.
- T& at(const key_type& k)
- {
- iterator i = this->find(k);
- if(i == this->end()){
- throw_out_of_range("flat_map::at key not found");
- }
- return i->second;
- }
-
- //! Returns: A reference to the element whose key is equivalent to x.
- //!
- //! Throws: An exception object of type out_of_range if no such element is present.
- //!
- //! Complexity: logarithmic.
- const T& at(const key_type& k) const
- {
- const_iterator i = this->find(k);
- if(i == this->end()){
- throw_out_of_range("flat_map::at key not found");
- }
- return i->second;
- }
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object x of type T constructed with
- //! std::forward<Args>(args)... if and only if there is no element in the container
- //! with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
- { return dtl::force_copy< std::pair<iterator, bool> >(m_flat_tree.emplace_unique(boost::forward<Args>(args)...)); }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the container if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
- {
- return dtl::force_copy<iterator>
- (m_flat_tree.emplace_hint_unique( dtl::force_copy<impl_const_iterator>(hint)
- , boost::forward<Args>(args)...));
- }
-
- //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
- //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
- //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
- //! forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
- //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args)
- {
- return dtl::force_copy< std::pair<iterator, bool> >(
- m_flat_tree.try_emplace(impl_const_iterator(), k, boost::forward<Args>(args)...));
- }
-
- //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
- //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
- //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
- //! forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args)
- {
- return dtl::force_copy<iterator>(m_flat_tree.try_emplace
- (dtl::force_copy<impl_const_iterator>(hint), k, boost::forward<Args>(args)...).first);
- }
-
- //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
- //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
- //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
- //! forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
- //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
- {
- return dtl::force_copy< std::pair<iterator, bool> >
- (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k), boost::forward<Args>(args)...));
- }
-
- //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
- //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
- //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
- //! forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
- {
- return dtl::force_copy<iterator>
- (m_flat_tree.try_emplace(dtl::force_copy
- <impl_const_iterator>(hint), boost::move(k), boost::forward<Args>(args)...).first);
- }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
- {\
- return dtl::force_copy< std::pair<iterator, bool> >\
- (m_flat_tree.emplace_unique(BOOST_MOVE_FWD##N));\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_unique\
- (dtl::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
- }\
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- return dtl::force_copy< std::pair<iterator, bool> >\
- (m_flat_tree.try_emplace(impl_const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return dtl::force_copy<iterator>(m_flat_tree.try_emplace\
- (dtl::force_copy<impl_const_iterator>(hint), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- return dtl::force_copy< std::pair<iterator, bool> >\
- (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return dtl::force_copy<iterator>(m_flat_tree.try_emplace\
- (dtl::force_copy<impl_const_iterator>(hint), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE)
- #undef BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- //! <b>Effects</b>: Inserts x if and only if there is no element in the container
- //! with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const value_type& x)
- { return dtl::force_copy<std::pair<iterator,bool> >(
- m_flat_tree.insert_unique(dtl::force<const impl_value_type>(x))); }
-
- //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
- //! only if there is no element in the container with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
- { return dtl::force_copy<std::pair<iterator,bool> >(
- m_flat_tree.insert_unique(boost::move(dtl::force<impl_value_type>(x)))); }
-
- //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
- //! only if there is no element in the container with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
- {
- return dtl::force_copy<std::pair<iterator,bool> >
- (m_flat_tree.insert_unique(boost::move(x)));
- }
-
- //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
- {
- return dtl::force_copy<iterator>(
- m_flat_tree.insert_unique( dtl::force_copy<impl_const_iterator>(p)
- , dtl::force<const impl_value_type>(x)));
- }
-
- //! <b>Effects</b>: Inserts an element move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
- {
- return dtl::force_copy<iterator>
- (m_flat_tree.insert_unique( dtl::force_copy<impl_const_iterator>(p)
- , boost::move(dtl::force<impl_value_type>(x))));
- }
-
- //! <b>Effects</b>: Inserts an element move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
- {
- return dtl::force_copy<iterator>(
- m_flat_tree.insert_unique(dtl::force_copy<impl_const_iterator>(p), boost::move(x)));
- }
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) if and only
- //! if there is no element with key equivalent to the key of that element.
- //!
- //! <b>Complexity</b>: N log(size()+N).
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
- { m_flat_tree.insert_unique(first, last); }
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) if and only
- //! if there is no element with key equivalent to the key of that element. This
- //! function is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
- { m_flat_tree.insert_unique(ordered_unique_range, first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
- //! if there is no element with key equivalent to the key of that element.
- //!
- //! <b>Complexity</b>: N log(N).
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
- {
- m_flat_tree.insert_unique( dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end());
- }
-
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
- //! if there is no element with key equivalent to the key of that element. This
- //! function is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
- {
- m_flat_tree.insert_unique(ordered_unique_range
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end());
- }
-#endif
-
- //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
- //!
- //! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
- //! the comparison object of *this. If there is an element in a with key equivalent to the
- //! key of an element from source, then that element is not extracted from source.
- //!
- //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
- //! to those same elements but as members of *this. Iterators referring to the transferred
- //! elements will continue to refer to their elements, but they now behave as iterators into *this,
- //! not into source.
- //!
- //! <b>Throws</b>: Nothing unless the comparison object throws.
- //!
- //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(flat_map<Key, T, C2, AllocatorOrContainer>& source)
- { m_flat_tree.merge_unique(source.tree()); }
-
- //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
- { return this->merge(static_cast<flat_map<Key, T, C2, AllocatorOrContainer>&>(source)); }
-
- //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, AllocatorOrContainer>& source)
- { m_flat_tree.merge_unique(source.tree()); }
-
- //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
- { return this->merge(static_cast<flat_multimap<Key, T, C2, AllocatorOrContainer>&>(source)); }
-
- //! <b>Effects</b>: Erases the element pointed to by p.
- //!
- //! <b>Returns</b>: Returns an iterator pointing to the element immediately
- //! following q prior to the element being erased. If no such element exists,
- //! returns end().
- //!
- //! <b>Complexity</b>: Linear to the elements with keys bigger than p
- //!
- //! <b>Note</b>: Invalidates elements with keys
- //! not less than the erased element.
- BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p)
- {
- return dtl::force_copy<iterator>
- (m_flat_tree.erase(dtl::force_copy<impl_const_iterator>(p)));
- }
-
- //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
- //!
- //! <b>Returns</b>: Returns the number of erased elements.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus erasure time
- //! linear to the elements with bigger keys.
- BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x)
- { return m_flat_tree.erase(x); }
-
- //! <b>Effects</b>: Erases all the elements in the range [first, last).
- //!
- //! <b>Returns</b>: Returns last.
- //!
- //! <b>Complexity</b>: size()*N where N is the distance from first to last.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus erasure time
- //! linear to the elements with bigger keys.
- BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
- {
- return dtl::force_copy<iterator>(
- m_flat_tree.erase( dtl::force_copy<impl_const_iterator>(first)
- , dtl::force_copy<impl_const_iterator>(last)));
- }
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE void swap(flat_map& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value )
- { m_flat_tree.swap(x.m_flat_tree); }
-
- //! <b>Effects</b>: erase(a.begin(),a.end()).
- //!
- //! <b>Postcondition</b>: size() == 0.
- //!
- //! <b>Complexity</b>: linear in size().
- BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
- { m_flat_tree.clear(); }
-
- //////////////////////////////////////////////
- //
- // observers
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns the comparison object out
- //! of which a was constructed.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
- { return dtl::force_copy<key_compare>(m_flat_tree.key_comp()); }
-
- //! <b>Effects</b>: Returns an object of value_compare constructed out
- //! of the comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
- { return value_compare(dtl::force_copy<key_compare>(m_flat_tree.key_comp())); }
-
- //////////////////////////////////////////////
- //
- // map operations
- //
- //////////////////////////////////////////////
-
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x)
- { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
-
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE iterator find(const K& x)
- { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE const_iterator find(const K& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
-
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
- { return static_cast<size_type>(m_flat_tree.find(x) != m_flat_tree.end()); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- template<class K>
- BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
- { return static_cast<size_type>(m_flat_tree.find(x) != m_flat_tree.end()); }
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x)
- { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const K& x)
- { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const K& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x)
- { return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const K& x)
- { return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const K& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
- { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.lower_bound_range(x)); }
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
- { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.lower_bound_range(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const K& x)
- { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.lower_bound_range(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const K& x) const
- { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.lower_bound_range(x)); }
-
- //! <b>Effects</b>: Extracts the internal sequence container.
- //!
- //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
- //!
- //! <b>Postcondition</b>: this->empty()
- //!
- //! <b>Throws</b>: If secuence_type's move constructor throws
- BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
- {
- return boost::move(dtl::force<sequence_type>(m_flat_tree.get_sequence_ref()));
- }
-
- //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
- //! one passed externally using the move assignment. Erases non-unique elements.
- //!
- //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
- //!
- //! <b>Throws</b>: If the comparison or the move constructor throws
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
- { this->m_flat_tree.adopt_sequence_unique(boost::move(dtl::force<impl_sequence_type>(seq))); }
-
- //! <b>Requires</b>: seq shall be ordered according to this->compare()
- //! and shall contain unique elements.
- //!
- //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
- //! one passed externally using the move assignment.
- //!
- //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
- //!
- //! <b>Throws</b>: If the move assignment throws
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq)
- { this->m_flat_tree.adopt_sequence_unique(ordered_unique_range_t(), boost::move(dtl::force<impl_sequence_type>(seq))); }
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_map& x, const flat_map& y)
- { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_map& x, const flat_map& y)
- { return !(x == y); }
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_map& x, const flat_map& y)
- { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_map& x, const flat_map& y)
- { return y < x; }
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_map& x, const flat_map& y)
- { return !(y < x); }
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_map& x, const flat_map& y)
- { return !(x < y); }
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE friend void swap(flat_map& x, flat_map& y)
- { x.swap(y); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- mapped_type &priv_subscript(const key_type& k)
- {
- iterator i = lower_bound(k);
- // i->first is greater than or equivalent to k.
- if (i == end() || key_comp()(k, (*i).first)){
- dtl::value_init<mapped_type> m;
- i = insert(i, impl_value_type(k, ::boost::move(m.m_t)));
- }
- return (*i).second;
- }
- mapped_type &priv_subscript(BOOST_RV_REF(key_type) mk)
- {
- key_type &k = mk;
- iterator i = lower_bound(k);
- // i->first is greater than or equivalent to k.
- if (i == end() || key_comp()(k, (*i).first)){
- dtl::value_init<mapped_type> m;
- i = insert(i, impl_value_type(boost::move(k), ::boost::move(m.m_t)));
- }
- return (*i).second;
- }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-flat_map(InputIterator, InputIterator) ->
- flat_map< typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type>;
-
-template <typename InputIterator, typename Allocator>
-flat_map(InputIterator, InputIterator, Allocator const&) ->
- flat_map< typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-flat_map(InputIterator, InputIterator, Compare const&) ->
- flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-flat_map(InputIterator, InputIterator, Compare const&, Allocator const&) ->
- flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare
- , Allocator>;
-
-template <typename InputIterator>
-flat_map(ordered_unique_range_t, InputIterator, InputIterator) ->
- flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type>;
-
-template <typename InputIterator, typename Allocator>
-flat_map(ordered_unique_range_t, InputIterator, InputIterator, Allocator const&) ->
- flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-flat_map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&) ->
- flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-flat_map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
- flat_map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare
- , Allocator>;
-
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class Key, class T, class Compare, class AllocatorOrContainer>
-struct has_trivial_destructor_after_move<boost::container::flat_map<Key, T, Compare, AllocatorOrContainer> >
-{
- typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A flat_multimap is a kind of associative container that supports equivalent keys
-//! (possibly containing multiple copies of the same key value) and provides for
-//! fast retrieval of values of another type T based on the keys.
-//!
-//! A flat_multimap satisfies all of the requirements of a container and of a reversible
-//! container and of an associative container. For a
-//! flat_multimap<Key,T> the key_type is Key and the value_type is std::pair<Key,T>
-//! (unlike std::multimap<Key, T> which value_type is std::pair<<b>const</b> Key, T>).
-//!
-//! flat_multimap is similar to std::multimap but it's implemented by as an ordered sequence container.
-//! The underlying sequence container is by default <i>vector</i> but it can also work
-//! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
-//!
-//! Using vector-like sequence containers means that inserting a new element into a flat_multimap might invalidate
-//! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
-//! container that offers stable pointers and references). Similarly, erasing an element might invalidate
-//! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
-//!
-//! This container provides random-access iterators.
-//!
-//! \tparam Key is the key_type of the map
-//! \tparam Value is the <code>mapped_type</code>
-//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
-//! \tparam AllocatorOrContainer is either:
-//! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
-//! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
-//! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
-//! sequence container with random-access iterators.
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class Key, class T, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator< std::pair< Key, T> > >
-#else
-template <class Key, class T, class Compare, class AllocatorOrContainer>
-#endif
-class flat_multimap
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(flat_multimap)
- typedef dtl::flat_tree<
- std::pair<Key, T>,
- dtl::select1st<Key>,
- Compare,
- AllocatorOrContainer> tree_t;
- //This is the real tree stored here. It's based on a movable pair
- typedef dtl::flat_tree<
- dtl::pair<Key, T>,
- dtl::select1st<Key>,
- Compare,
- typename dtl::container_or_allocator_rebind<AllocatorOrContainer, dtl::pair<Key, T> >::type
- > impl_tree_t;
- impl_tree_t m_flat_tree; // flat tree representing flat_map
-
- typedef typename impl_tree_t::value_type impl_value_type;
- typedef typename impl_tree_t::const_iterator impl_const_iterator;
- typedef typename impl_tree_t::iterator impl_iterator;
- typedef typename impl_tree_t::allocator_type impl_allocator_type;
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- typedef std::initializer_list<impl_value_type> impl_initializer_list;
- #endif
-
- typedef dtl::flat_tree_value_compare
- < Compare
- , dtl::select1st<Key>
- , std::pair<Key, T> > value_compare_t;
- typedef typename tree_t::iterator iterator_t;
- typedef typename tree_t::const_iterator const_iterator_t;
- typedef typename tree_t::reverse_iterator reverse_iterator_t;
- typedef typename tree_t::const_reverse_iterator const_reverse_iterator_t;
-
- public:
- typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
- typedef typename impl_tree_t::sequence_type impl_sequence_type;
-
- BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree()
- { return m_flat_tree; }
-
- BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const
- { return m_flat_tree; }
-
- private:
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
-
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
- typedef Key key_type;
- typedef T mapped_type;
- typedef Compare key_compare;
- typedef std::pair<Key, T> value_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
- typedef typename sequence_type::allocator_type allocator_type;
- typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
- typedef typename sequence_type::pointer pointer;
- typedef typename sequence_type::const_pointer const_pointer;
- typedef typename sequence_type::reference reference;
- typedef typename sequence_type::const_reference const_reference;
- typedef typename sequence_type::size_type size_type;
- typedef typename sequence_type::difference_type difference_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
-
- typedef typename sequence_type::iterator iterator;
- typedef typename sequence_type::const_iterator const_iterator;
- typedef typename sequence_type::reverse_iterator reverse_iterator;
- typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
- typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
-
- //AllocatorOrContainer::value_type must be std::pair<Key, T>
- BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, typename AllocatorOrContainer::value_type>::value));
-
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructs an empty flat_map.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE flat_multimap()
- BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
- dtl::is_nothrow_default_constructible<Compare>::value)
- : m_flat_tree()
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const allocator_type& a)
- : m_flat_tree(dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison
- //! object .
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const Compare& comp)
- : m_flat_tree(comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison
- //! object and allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(const Compare& comp, const allocator_type& a)
- : m_flat_tree(comp, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap
- //! and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(InputIterator first, InputIterator last)
- : m_flat_tree(false, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(InputIterator first, InputIterator last, const allocator_type& a)
- : m_flat_tree(false, first, last, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object
- //! and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(InputIterator first, InputIterator last, const Compare& comp)
- : m_flat_tree(false, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object
- //! and allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : m_flat_tree(false, first, last, comp, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap
- //! and inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(ordered_range_t, InputIterator first, InputIterator last)
- : m_flat_tree(ordered_range, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
- //! inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : m_flat_tree(ordered_range, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
- //! allocator, and inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : m_flat_tree(ordered_range, first, last, comp, a)
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs an empty flat_map and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(std::initializer_list<value_type> il)
- : m_flat_tree( false
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end())
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(std::initializer_list<value_type> il, const allocator_type& a)
- : m_flat_tree(false
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end()
- , dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(std::initializer_list<value_type> il, const Compare& comp)
- : m_flat_tree(false
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : m_flat_tree( false
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end()
- , comp, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap and
- //! inserts elements from the ordered range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(ordered_range_t, std::initializer_list<value_type> il)
- : m_flat_tree( ordered_range
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end())
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
- //! inserts elements from the ordered range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
- : m_flat_tree( ordered_range
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
- //! allocator, and inserts elements from the ordered range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : m_flat_tree( ordered_range
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end()
- , comp, dtl::force<const impl_allocator_type>(a))
- {}
-#endif
-
- //! <b>Effects</b>: Copy constructs a flat_multimap.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(const flat_multimap& x)
- : m_flat_tree(x.m_flat_tree)
- {}
-
- //! <b>Effects</b>: Move constructs a flat_multimap. Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Postcondition</b>: x is emptied.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(BOOST_RV_REF(flat_multimap) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : m_flat_tree(boost::move(x.m_flat_tree))
- {}
-
- //! <b>Effects</b>: Copy constructs a flat_multimap using the specified allocator.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(const flat_multimap& x, const allocator_type &a)
- : m_flat_tree(x.m_flat_tree, dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Move constructs a flat_multimap using the specified allocator.
- //! Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap(BOOST_RV_REF(flat_multimap) x, const allocator_type &a)
- : m_flat_tree(boost::move(x.m_flat_tree), dtl::force<const impl_allocator_type>(a))
- {}
-
- //! <b>Effects</b>: Makes *this a copy of x.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap& operator=(BOOST_COPY_ASSIGN_REF(flat_multimap) x)
- { m_flat_tree = x.m_flat_tree; return *this; }
-
- //! <b>Effects</b>: this->swap(x.get()).
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap& operator=(BOOST_RV_REF(flat_multimap) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { m_flat_tree = boost::move(x.m_flat_tree); return *this; }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assign content of il to *this
- //!
- //! <b>Complexity</b>: Linear in il.size().
- BOOST_CONTAINER_FORCEINLINE
- flat_multimap& operator=(std::initializer_list<value_type> il)
- {
- this->clear();
- this->insert(il.begin(), il.end());
- return *this;
- }
-#endif
-
- //! <b>Effects</b>: Returns a copy of the allocator that
- //! was passed to the object's constructor.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force<const stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
-
- //////////////////////////////////////////////
- //
- // iterators
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<iterator>(m_flat_tree.begin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_iterator>(m_flat_tree.begin()); }
-
- //! <b>Effects</b>: Returns an iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<iterator>(m_flat_tree.end()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_iterator>(m_flat_tree.end()); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<reverse_iterator>(m_flat_tree.rend()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_iterator>(m_flat_tree.cbegin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_iterator>(m_flat_tree.cend()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
-
- //////////////////////////////////////////////
- //
- // capacity
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns true if the container contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.empty(); }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.size(); }
-
- //! <b>Effects</b>: Returns the largest possible size of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.max_size(); }
-
- //! <b>Effects</b>: Number of elements for which memory has been allocated.
- //! capacity() is always greater than or equal to size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.capacity(); }
-
- //! <b>Effects</b>: If n is less than or equal to capacity(), or the
- //! underlying container has no `reserve` member, this call has no
- //! effect. Otherwise, it is a request for allocation of additional memory.
- //! If the request is successful, then capacity() is greater than or equal to
- //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
- //!
- //! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
- //!
- //! <b>Note</b>: If capacity() is less than "cnt", iterators and references to
- //! to values might be invalidated.
- BOOST_CONTAINER_FORCEINLINE
- void reserve(size_type cnt)
- { m_flat_tree.reserve(cnt); }
-
- //! <b>Effects</b>: Tries to deallocate the excess of memory created
- // with previous allocations. The size of the vector is unchanged
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to size().
- BOOST_CONTAINER_FORCEINLINE
- void shrink_to_fit()
- { m_flat_tree.shrink_to_fit(); }
-
- //! @copydoc ::boost::container::flat_set::nth(size_type)
- BOOST_CONTAINER_FORCEINLINE
- iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
-
- //! @copydoc ::boost::container::flat_set::nth(size_type) const
- BOOST_CONTAINER_FORCEINLINE
- const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
-
- //! @copydoc ::boost::container::flat_set::index_of(iterator)
- BOOST_CONTAINER_FORCEINLINE
- size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.index_of(dtl::force_copy<impl_iterator>(p)); }
-
- //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
- BOOST_CONTAINER_FORCEINLINE
- size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_flat_tree.index_of(dtl::force_copy<impl_const_iterator>(p)); }
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... and returns the iterator pointing to the
- //! newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE
- iterator emplace(BOOST_FWD_REF(Args)... args)
- { return dtl::force_copy<iterator>(m_flat_tree.emplace_equal(boost::forward<Args>(args)...)); }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant time if the value
- //! is to be inserted before p) plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE
- iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
- {
- return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_equal
- (dtl::force_copy<impl_const_iterator>(hint), boost::forward<Args>(args)...));
- }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
- { return dtl::force_copy<iterator>(m_flat_tree.emplace_equal(BOOST_MOVE_FWD##N)); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_equal\
- (dtl::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
- }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE)
- #undef BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- //! <b>Effects</b>: Inserts x and returns the iterator pointing to the
- //! newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x)
- {
- return dtl::force_copy<iterator>(
- m_flat_tree.insert_equal(dtl::force<const impl_value_type>(x)));
- }
-
- //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
- //! the iterator pointing to the newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(value_type) x)
- { return dtl::force_copy<iterator>(m_flat_tree.insert_equal(boost::move(x))); }
-
- //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
- //! the iterator pointing to the newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(impl_value_type) x)
- { return dtl::force_copy<iterator>(m_flat_tree.insert_equal(boost::move(x))); }
-
- //! <b>Effects</b>: Inserts a copy of x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant time if the value
- //! is to be inserted before p) plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
- {
- return dtl::force_copy<iterator>
- (m_flat_tree.insert_equal( dtl::force_copy<impl_const_iterator>(p)
- , dtl::force<const impl_value_type>(x)));
- }
-
- //! <b>Effects</b>: Inserts a value move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant time if the value
- //! is to be inserted before p) plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
- {
- return dtl::force_copy<iterator>
- (m_flat_tree.insert_equal(dtl::force_copy<impl_const_iterator>(p)
- , boost::move(x)));
- }
-
- //! <b>Effects</b>: Inserts a value move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant time if the value
- //! is to be inserted before p) plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(impl_value_type) x)
- {
- return dtl::force_copy<iterator>(
- m_flat_tree.insert_equal(dtl::force_copy<impl_const_iterator>(p), boost::move(x)));
- }
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) .
- //!
- //! <b>Complexity</b>: N log(N).
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
- { m_flat_tree.insert_equal(first, last); }
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) if and only
- //! if there is no element with key equivalent to the key of that element. This
- //! function is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last)
- { m_flat_tree.insert_equal(ordered_range, first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) .
- //!
- //! <b>Complexity</b>: N log(N).
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
- {
- m_flat_tree.insert_equal( dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end());
- }
-
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
- //! if there is no element with key equivalent to the key of that element. This
- //! function is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list<value_type> il)
- {
- m_flat_tree.insert_equal( ordered_range
- , dtl::force<impl_initializer_list>(il).begin()
- , dtl::force<impl_initializer_list>(il).end());
- }
-#endif
-
- //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
- //!
- //! <b>Effects</b>: Extracts each element in source and insert it into a using
- //! the comparison object of *this.
- //!
- //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
- //! to those same elements but as members of *this. Iterators referring to the transferred
- //! elements will continue to refer to their elements, but they now behave as iterators into *this,
- //! not into source.
- //!
- //! <b>Throws</b>: Nothing unless the comparison object throws.
- //!
- //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, AllocatorOrContainer>& source)
- { m_flat_tree.merge_equal(source.tree()); }
-
- //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
- { return this->merge(static_cast<flat_multimap<Key, T, C2, AllocatorOrContainer>&>(source)); }
-
- //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(flat_map<Key, T, C2, AllocatorOrContainer>& source)
- { m_flat_tree.merge_equal(source.tree()); }
-
- //! @copydoc ::boost::container::flat_multimap::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
- { return this->merge(static_cast<flat_map<Key, T, C2, AllocatorOrContainer>&>(source)); }
-
- //! <b>Effects</b>: Erases the element pointed to by p.
- //!
- //! <b>Returns</b>: Returns an iterator pointing to the element immediately
- //! following q prior to the element being erased. If no such element exists,
- //! returns end().
- //!
- //! <b>Complexity</b>: Linear to the elements with keys bigger than p
- //!
- //! <b>Note</b>: Invalidates elements with keys
- //! not less than the erased element.
- BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p)
- {
- return dtl::force_copy<iterator>(
- m_flat_tree.erase(dtl::force_copy<impl_const_iterator>(p)));
- }
-
- //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
- //!
- //! <b>Returns</b>: Returns the number of erased elements.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus erasure time
- //! linear to the elements with bigger keys.
- BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x)
- { return m_flat_tree.erase(x); }
-
- //! <b>Effects</b>: Erases all the elements in the range [first, last).
- //!
- //! <b>Returns</b>: Returns last.
- //!
- //! <b>Complexity</b>: size()*N where N is the distance from first to last.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus erasure time
- //! linear to the elements with bigger keys.
- BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
- {
- return dtl::force_copy<iterator>
- (m_flat_tree.erase( dtl::force_copy<impl_const_iterator>(first)
- , dtl::force_copy<impl_const_iterator>(last)));
- }
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE void swap(flat_multimap& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value )
- { m_flat_tree.swap(x.m_flat_tree); }
-
- //! <b>Effects</b>: erase(a.begin(),a.end()).
- //!
- //! <b>Postcondition</b>: size() == 0.
- //!
- //! <b>Complexity</b>: linear in size().
- BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
- { m_flat_tree.clear(); }
-
- //////////////////////////////////////////////
- //
- // observers
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns the comparison object out
- //! of which a was constructed.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
- { return dtl::force_copy<key_compare>(m_flat_tree.key_comp()); }
-
- //! <b>Effects</b>: Returns an object of value_compare constructed out
- //! of the comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
- { return value_compare(dtl::force_copy<key_compare>(m_flat_tree.key_comp())); }
-
- //////////////////////////////////////////////
- //
- // map operations
- //
- //////////////////////////////////////////////
-
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x)
- { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
-
- //! <b>Returns</b>: An const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE iterator find(const K& x)
- { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<class K>
- BOOST_CONTAINER_FORCEINLINE const_iterator find(const K& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
-
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
- { return m_flat_tree.count(x); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- template<class K>
- BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
- { return m_flat_tree.count(x); }
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x)
- { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<class K>
- BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const K& x)
- { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<class K>
- BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const K& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x)
- {return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key
- //! not less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<class K>
- BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const K& x)
- {return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key
- //! not less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<class K>
- BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const K& x) const
- { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
- { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
- { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<class K>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const K& x)
- { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<class K>
- BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const K& x) const
- { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
-
- //! <b>Effects</b>: Extracts the internal sequence container.
- //!
- //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
- //!
- //! <b>Postcondition</b>: this->empty()
- //!
- //! <b>Throws</b>: If secuence_type's move constructor throws
- BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
- {
- return boost::move(dtl::force<sequence_type>(m_flat_tree.get_sequence_ref()));
- }
-
- //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
- //! one passed externally using the move assignment.
- //!
- //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
- //!
- //! <b>Throws</b>: If the comparison or the move constructor throws
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
- { this->m_flat_tree.adopt_sequence_equal(boost::move(dtl::force<impl_sequence_type>(seq))); }
-
- //! <b>Requires</b>: seq shall be ordered according to this->compare().
- //!
- //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
- //! one passed externally using the move assignment.
- //!
- //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
- //!
- //! <b>Throws</b>: If the move assignment throws
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq)
- { this->m_flat_tree.adopt_sequence_equal(ordered_range_t(), boost::move(dtl::force<impl_sequence_type>(seq))); }
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_multimap& x, const flat_multimap& y)
- { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_multimap& x, const flat_multimap& y)
- { return !(x == y); }
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_multimap& x, const flat_multimap& y)
- { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_multimap& x, const flat_multimap& y)
- { return y < x; }
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_multimap& x, const flat_multimap& y)
- { return !(y < x); }
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_multimap& x, const flat_multimap& y)
- { return !(x < y); }
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE friend void swap(flat_multimap& x, flat_multimap& y)
- { x.swap(y); }
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-flat_multimap(InputIterator, InputIterator) ->
- flat_multimap<typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type>;
-
-template <typename InputIterator, typename Allocator>
-flat_multimap(InputIterator, InputIterator, Allocator const&) ->
- flat_multimap<typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-flat_multimap(InputIterator, InputIterator, Compare const&) ->
- flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-flat_multimap(InputIterator, InputIterator, Compare const&, Allocator const&) ->
- flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare
- , Allocator>;
-
-template <typename InputIterator>
-flat_multimap(ordered_range_t, InputIterator, InputIterator) ->
- flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type>;
-
-template <typename InputIterator, typename Allocator>
-flat_multimap(ordered_range_t, InputIterator, InputIterator, Allocator const&) ->
- flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-flat_multimap(ordered_range_t, InputIterator, InputIterator, Compare const&) ->
- flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-flat_multimap(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
- flat_multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare
- , Allocator>;
-
-#endif
-
-}}
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace boost {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class Key, class T, class Compare, class AllocatorOrContainer>
-struct has_trivial_destructor_after_move< boost::container::flat_multimap<Key, T, Compare, AllocatorOrContainer> >
-{
- typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-} //namespace boost {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_FLAT_MAP_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/flat_set.hpp b/src/third_party/boost-1.68.0/boost/container/flat_set.hpp
deleted file mode 100644
index cfea7c89e20..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/flat_set.hpp
+++ /dev/null
@@ -1,1847 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_FLAT_SET_HPP
-#define BOOST_CONTAINER_FLAT_SET_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-// container/detail
-#include <boost/container/detail/flat_tree.hpp>
-#include <boost/container/detail/mpl.hpp>
-// move
-#include <boost/move/traits.hpp>
-#include <boost/move/utility_core.hpp>
-// move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/detail/move_helpers.hpp>
-// intrusive/detail
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
-// std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-namespace boost {
-namespace container {
-
-#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-template <class Key, class Compare, class AllocatorOrContainer>
-class flat_multiset;
-#endif
-
-//! flat_set is a Sorted Associative Container that stores objects of type Key.
-//! It is also a Unique Associative Container, meaning that no two elements are the same.
-//!
-//! flat_set is similar to std::set but it's implemented by as an ordered sequence container.
-//! The underlying sequence container is by default <i>vector</i> but it can also work
-//! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
-//!
-//! Using vector-like sequence containers means that inserting a new element into a flat_set might invalidate
-//! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
-//! container that offers stable pointers and references). Similarly, erasing an element might invalidate
-//! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
-//!
-//! This container provides random-access iterators.
-//!
-//! \tparam Key is the type to be inserted in the set, which is also the key_type
-//! \tparam Compare is the comparison functor used to order keys
-//! \tparam AllocatorOrContainer is either:
-//! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
-//! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
-//! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
-//! sequence container with random-access iterators.
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class Key, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator<Key> >
-#else
-template <class Key, class Compare, class AllocatorOrContainer>
-#endif
-class flat_set
- ///@cond
- : public dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer>
- ///@endcond
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(flat_set)
- typedef dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer> tree_t;
-
- public:
- tree_t &tree()
- { return *this; }
-
- const tree_t &tree() const
- { return *this; }
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
- typedef Key key_type;
- typedef Compare key_compare;
- typedef Key value_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
- typedef typename sequence_type::allocator_type allocator_type;
- typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
- typedef typename sequence_type::pointer pointer;
- typedef typename sequence_type::const_pointer const_pointer;
- typedef typename sequence_type::reference reference;
- typedef typename sequence_type::const_reference const_reference;
- typedef typename sequence_type::size_type size_type;
- typedef typename sequence_type::difference_type difference_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
-
- typedef typename sequence_type::iterator iterator;
- typedef typename sequence_type::const_iterator const_iterator;
- typedef typename sequence_type::reverse_iterator reverse_iterator;
- typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
-
- public:
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructs an empty container.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- flat_set() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
- dtl::is_nothrow_default_constructible<Compare>::value)
- : tree_t()
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified
- //! comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- explicit flat_set(const Compare& comp)
- : tree_t(comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- explicit flat_set(const allocator_type& a)
- : tree_t(a)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified
- //! comparison object and allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- flat_set(const Compare& comp, const allocator_type& a)
- : tree_t(comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty container and
- //! inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! comp and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_set(InputIterator first, InputIterator last)
- : tree_t(true, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! comp and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_set(InputIterator first, InputIterator last, const allocator_type& a)
- : tree_t(true, first, last, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! comp and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_set(InputIterator first, InputIterator last, const Compare& comp)
- : tree_t(true, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! comp and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : tree_t(true, first, last, comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty container and
- //! inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_set(ordered_unique_range_t, InputIterator first, InputIterator last)
- : tree_t(ordered_unique_range, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : tree_t(ordered_unique_range, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! allocator, and inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE
- flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : tree_t(ordered_unique_range, first, last, comp, a)
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs an empty container and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! comp and otherwise N logN, where N is il.begin() - il.end().
- BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il)
- : tree_t(true, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! comp and otherwise N logN, where N is il.begin() - il.end().
- BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const allocator_type& a)
- : tree_t(true, il.begin(), il.end(), a)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! comp and otherwise N logN, where N is il.begin() - il.end().
- BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const Compare& comp)
- : tree_t(true, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! comp and otherwise N logN, where N is il.begin() - il.end().
- BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : tree_t(true, il.begin(), il.end(), comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il)
- : tree_t(ordered_unique_range, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
- : tree_t(ordered_unique_range, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : tree_t(ordered_unique_range, il.begin(), il.end(), comp, a)
- {}
-#endif
-
- //! <b>Effects</b>: Copy constructs the container.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x)
- : tree_t(static_cast<const tree_t&>(x))
- {}
-
- //! <b>Effects</b>: Move constructs thecontainer. Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Postcondition</b>: x is emptied.
- BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : tree_t(BOOST_MOVE_BASE(tree_t, x))
- {}
-
- //! <b>Effects</b>: Copy constructs a container using the specified allocator.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x, const allocator_type &a)
- : tree_t(static_cast<const tree_t&>(x), a)
- {}
-
- //! <b>Effects</b>: Move constructs a container using the specified allocator.
- //! Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise
- BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x, const allocator_type &a)
- : tree_t(BOOST_MOVE_BASE(tree_t, x), a)
- {}
-
- //! <b>Effects</b>: Makes *this a copy of x.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_COPY_ASSIGN_REF(flat_set) x)
- { return static_cast<flat_set&>(this->tree_t::operator=(static_cast<const tree_t&>(x))); }
-
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_RV_REF(flat_set) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { return static_cast<flat_set&>(this->tree_t::operator=(BOOST_MOVE_BASE(tree_t, x))); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Copy all elements from il to *this.
- //!
- //! <b>Complexity</b>: Linear in il.size().
- flat_set& operator=(std::initializer_list<value_type> il)
- {
- this->clear();
- this->insert(il.begin(), il.end());
- return *this;
- }
-#endif
-
- #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
- //! <b>Effects</b>: Returns a copy of the allocator that
- //! was passed to the object's constructor.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns an iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns true if the container contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns the number of the elements contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns the largest possible size of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Number of elements for which memory has been allocated.
- //! capacity() is always greater than or equal to size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: If n is less than or equal to capacity(), or the
- //! underlying container has no `reserve` member, this call has no
- //! effect. Otherwise, it is a request for allocation of additional memory.
- //! If the request is successful, then capacity() is greater than or equal to
- //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
- //!
- //! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
- //!
- //! <b>Note</b>: If capacity() is less than "cnt", iterators and references to
- //! to values might be invalidated.
- void reserve(size_type cnt);
-
- //! <b>Effects</b>: Tries to deallocate the excess of memory created
- // with previous allocations. The size of the vector is unchanged
- //!
- //! <b>Throws</b>: If memory allocation throws, or Key's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to size().
- void shrink_to_fit();
-
- #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object x of type Key constructed with
- //! std::forward<Args>(args)... if and only if there is no element in the container
- //! with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
- { return this->tree_t::emplace_unique(boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type Key constructed with
- //! std::forward<Args>(args)... in the container if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
- { return this->tree_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
- { return this->tree_t::emplace_unique(BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->tree_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE)
- #undef BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts x if and only if there is no element in the container
- //! with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- std::pair<iterator, bool> insert(const value_type &x);
-
- //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
- //! only if there is no element in the container with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- std::pair<iterator, bool> insert(value_type &&x);
- #else
- private:
- typedef std::pair<iterator, bool> insert_return_pair;
- public:
- BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, insert_return_pair, this->priv_insert)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- iterator insert(const_iterator p, const value_type &x);
-
- //! <b>Effects</b>: Inserts an element move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- iterator insert(const_iterator p, value_type &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) if and only
- //! if there is no element with key equivalent to the key of that element.
- //!
- //! <b>Complexity</b>: N log(N).
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
- { this->tree_t::insert_unique(first, last); }
-
- //! <b>Requires</b>: first, last are not iterators into *this and
- //! must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) .This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
- { this->tree_t::insert_unique(ordered_unique_range, first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
- //! if there is no element with key equivalent to the key of that element.
- //!
- //! <b>Complexity</b>: N log(N).
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
- { this->tree_t::insert_unique(il.begin(), il.end()); }
-
- //! <b>Requires</b>: Range [il.begin(), il.end()) must be ordered according to the predicate
- //! and must be unique values.
- //!
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) .This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
- { this->tree_t::insert_unique(ordered_unique_range, il.begin(), il.end()); }
-#endif
-
- //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, AllocatorOrContainer>& source)
- { this->tree_t::merge_unique(source.tree()); }
-
- //! @copydoc ::boost::container::flat_set::merge(flat_set<Key, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
- { return this->merge(static_cast<flat_set<Key, C2, AllocatorOrContainer>&>(source)); }
-
- //! @copydoc ::boost::container::flat_map::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, AllocatorOrContainer>& source)
- { this->tree_t::merge_unique(source.tree()); }
-
- //! @copydoc ::boost::container::flat_set::merge(flat_multiset<Key, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
- { return this->merge(static_cast<flat_multiset<Key, C2, AllocatorOrContainer>&>(source)); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Erases the element pointed to by p.
- //!
- //! <b>Returns</b>: Returns an iterator pointing to the element immediately
- //! following q prior to the element being erased. If no such element exists,
- //! returns end().
- //!
- //! <b>Complexity</b>: Linear to the elements with keys bigger than p
- //!
- //! <b>Note</b>: Invalidates elements with keys
- //! not less than the erased element.
- iterator erase(const_iterator p);
-
- //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
- //!
- //! <b>Returns</b>: Returns the number of erased elements.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus erasure time
- //! linear to the elements with bigger keys.
- size_type erase(const key_type& x);
-
- //! <b>Effects</b>: Erases all the elements in the range [first, last).
- //!
- //! <b>Returns</b>: Returns last.
- //!
- //! <b>Complexity</b>: size()*N where N is the distance from first to last.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus erasure time
- //! linear to the elements with bigger keys.
- iterator erase(const_iterator first, const_iterator last);
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- void swap(flat_set& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value );
-
- //! <b>Effects</b>: erase(a.begin(),a.end()).
- //!
- //! <b>Postcondition</b>: size() == 0.
- //!
- //! <b>Complexity</b>: linear in size().
- void clear() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns the comparison object out
- //! of which a was constructed.
- //!
- //! <b>Complexity</b>: Constant.
- key_compare key_comp() const;
-
- //! <b>Effects</b>: Returns an object of value_compare constructed out
- //! of the comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- value_compare value_comp() const;
-
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- iterator find(const key_type& x);
-
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- const_iterator find(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<typename K>
- iterator find(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<typename K>
- const_iterator find(const K& x) const;
-
- //! <b>Requires</b>: size() >= n.
- //!
- //! <b>Effects</b>: Returns an iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Requires</b>: size() >= n.
- //!
- //! <b>Effects</b>: Returns a const_iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Requires</b>: begin() <= p <= end().
- //!
- //! <b>Effects</b>: Returns the index of the element pointed by p
- //! and size() if p == end().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Requires</b>: begin() <= p <= end().
- //!
- //! <b>Effects</b>: Returns the index of the element pointed by p
- //! and size() if p == end().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW;
-
- #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
- { return static_cast<size_type>(this->tree_t::find(x) != this->tree_t::cend()); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- template<typename K>
- BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
- { return static_cast<size_type>(this->tree_t::find(x) != this->tree_t::cend()); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator lower_bound(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- const_iterator lower_bound(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- iterator lower_bound(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- const_iterator lower_bound(const K& x) const;
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator upper_bound(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- const_iterator upper_bound(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- iterator upper_bound(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- const_iterator upper_bound(const K& x) const;
-
- #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
- { return this->tree_t::lower_bound_range(x); }
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
- { return this->tree_t::lower_bound_range(x); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- std::pair<iterator,iterator> equal_range(const K& x)
- { return this->tree_t::lower_bound_range(x); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- std::pair<const_iterator,const_iterator> equal_range(const K& x) const
- { return this->tree_t::lower_bound_range(x); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const flat_set& x, const flat_set& y);
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const flat_set& x, const flat_set& y);
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const flat_set& x, const flat_set& y);
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const flat_set& x, const flat_set& y);
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const flat_set& x, const flat_set& y);
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const flat_set& x, const flat_set& y);
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(flat_set& x, flat_set& y);
-
- //! <b>Effects</b>: Extracts the internal sequence container.
- //!
- //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
- //!
- //! <b>Postcondition</b>: this->empty()
- //!
- //! <b>Throws</b>: If secuence_type's move constructor throws
- sequence_type extract_sequence();
-
- #endif //#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
- //! one passed externally using the move assignment. Erases non-unique elements.
- //!
- //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
- //!
- //! <b>Throws</b>: If the comparison or the move constructor throws
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
- { this->tree_t::adopt_sequence_unique(boost::move(seq)); }
-
- //! <b>Requires</b>: seq shall be ordered according to this->compare()
- //! and shall contain unique elements.
- //!
- //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
- //! one passed externally using the move assignment.
- //!
- //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
- //!
- //! <b>Throws</b>: If the move assignment throws
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq)
- { this->tree_t::adopt_sequence_unique(ordered_unique_range_t(), boost::move(seq)); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- template<class KeyType>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> priv_insert(BOOST_FWD_REF(KeyType) x)
- { return this->tree_t::insert_unique(::boost::forward<KeyType>(x)); }
-
- template<class KeyType>
- BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
- { return this->tree_t::insert_unique(p, ::boost::forward<KeyType>(x)); }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-flat_set(InputIterator, InputIterator) ->
- flat_set<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-flat_set(InputIterator, InputIterator, Allocator const&) ->
- flat_set<typename iterator_traits<InputIterator>::value_type, std::less<typename iterator_traits<InputIterator>::value_type>, Allocator>;
-
-template <typename InputIterator, typename Compare>
-flat_set(InputIterator, InputIterator, Compare const&) ->
- flat_set<typename iterator_traits<InputIterator>::value_type, Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-flat_set(InputIterator, InputIterator, Compare const&, Allocator const&) ->
- flat_set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
-
-template <typename InputIterator>
-flat_set(ordered_unique_range_t, InputIterator, InputIterator) ->
- flat_set<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-flat_set(ordered_unique_range_t, InputIterator, InputIterator, Allocator const&) ->
- flat_set<typename iterator_traits<InputIterator>::value_type, std::less<typename iterator_traits<InputIterator>::value_type>, Allocator>;
-
-template <typename InputIterator, typename Compare>
-flat_set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&) ->
- flat_set<typename iterator_traits<InputIterator>::value_type, Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-flat_set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
- flat_set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
-
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class Key, class Compare, class AllocatorOrContainer>
-struct has_trivial_destructor_after_move<boost::container::flat_set<Key, Compare, AllocatorOrContainer> >
-{
- typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! flat_multiset is a Sorted Associative Container that stores objects of type Key and
-//! can store multiple copies of the same key value.
-//!
-//! flat_multiset is similar to std::multiset but it's implemented by as an ordered sequence container.
-//! The underlying sequence container is by default <i>vector</i> but it can also work
-//! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
-//!
-//! Using vector-like sequence containers means that inserting a new element into a flat_multiset might invalidate
-//! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
-//! container that offers stable pointers and references). Similarly, erasing an element might invalidate
-//! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
-//!
-//! This container provides random-access iterators.
-//!
-//! \tparam Key is the type to be inserted in the multiset, which is also the key_type
-//! \tparam Compare is the comparison functor used to order keys
-//! \tparam AllocatorOrContainer is either:
-//! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
-//! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
-//! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
-//! sequence container with random-access iterators.
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class Key, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator<Key> >
-#else
-template <class Key, class Compare, class AllocatorOrContainer>
-#endif
-class flat_multiset
- ///@cond
- : public dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer>
- ///@endcond
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(flat_multiset)
- typedef dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer> tree_t;
-
- public:
- tree_t &tree()
- { return *this; }
-
- const tree_t &tree() const
- { return *this; }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
- typedef Key key_type;
- typedef Compare key_compare;
- typedef Key value_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
- typedef typename sequence_type::allocator_type allocator_type;
- typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
- typedef typename sequence_type::pointer pointer;
- typedef typename sequence_type::const_pointer const_pointer;
- typedef typename sequence_type::reference reference;
- typedef typename sequence_type::const_reference const_reference;
- typedef typename sequence_type::size_type size_type;
- typedef typename sequence_type::difference_type difference_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
-
- typedef typename sequence_type::iterator iterator;
- typedef typename sequence_type::const_iterator const_iterator;
- typedef typename sequence_type::reverse_iterator reverse_iterator;
- typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
-
- //! @copydoc ::boost::container::flat_set::flat_set()
- BOOST_CONTAINER_FORCEINLINE flat_multiset() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
- dtl::is_nothrow_default_constructible<Compare>::value)
- : tree_t()
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(const Compare&)
- BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const Compare& comp)
- : tree_t(comp)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const allocator_type& a)
- : tree_t(a)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(const Compare&, const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(const Compare& comp, const allocator_type& a)
- : tree_t(comp, a)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last)
- : tree_t(false, first, last)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const allocator_type&)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const allocator_type& a)
- : tree_t(false, first, last, a)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp)
- : tree_t(false, first, last, comp)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp, const allocator_type&)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : tree_t(false, first, last, comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multiset and
- //! inserts elements from the ordered range [first ,last ). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last)
- : tree_t(ordered_range, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multiset using the specified comparison object and
- //! inserts elements from the ordered range [first ,last ). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : tree_t(ordered_range, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty flat_multiset using the specified comparison object and
- //! allocator, and inserts elements from the ordered range [first, last ). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : tree_t(ordered_range, first, last, comp, a)
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il)
- : tree_t(false, il.begin(), il.end())
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const allocator_type& a)
- : tree_t(false, il.begin(), il.end(), a)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const Compare& comp)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const Compare& comp)
- : tree_t(false, il.begin(), il.end(), comp)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const Compare& comp, const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : tree_t(false, il.begin(), il.end(), comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty containerand
- //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il)
- : tree_t(ordered_range, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
- : tree_t(ordered_range, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
- //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : tree_t(ordered_range, il.begin(), il.end(), comp, a)
- {}
-#endif
-
- //! @copydoc ::boost::container::flat_set::flat_set(const flat_set &)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x)
- : tree_t(static_cast<const tree_t&>(x))
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(flat_set &&)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : tree_t(boost::move(static_cast<tree_t&>(x)))
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(const flat_set &, const allocator_type &)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x, const allocator_type &a)
- : tree_t(static_cast<const tree_t&>(x), a)
- {}
-
- //! @copydoc ::boost::container::flat_set::flat_set(flat_set &&, const allocator_type &)
- BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x, const allocator_type &a)
- : tree_t(BOOST_MOVE_BASE(tree_t, x), a)
- {}
-
- //! @copydoc ::boost::container::flat_set::operator=(const flat_set &)
- BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_COPY_ASSIGN_REF(flat_multiset) x)
- { return static_cast<flat_multiset&>(this->tree_t::operator=(static_cast<const tree_t&>(x))); }
-
- //! @copydoc ::boost::container::flat_set::operator=(flat_set &&)
- BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { return static_cast<flat_multiset&>(this->tree_t::operator=(BOOST_MOVE_BASE(tree_t, x))); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! @copydoc ::boost::container::flat_set::operator=(std::initializer_list<value_type>)
- flat_multiset& operator=(std::initializer_list<value_type> il)
- {
- this->clear();
- this->insert(il.begin(), il.end());
- return *this;
- }
-#endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::container::flat_set::get_allocator()
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::get_stored_allocator()
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::get_stored_allocator() const
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::begin()
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::begin() const
- const_iterator begin() const;
-
- //! @copydoc ::boost::container::flat_set::cbegin() const
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::end()
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::end() const
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::cend() const
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::rbegin()
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::rbegin() const
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::crbegin() const
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::rend()
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::rend() const
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::crend() const
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::empty() const
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::size() const
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::max_size() const
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::capacity() const
- size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::reserve(size_type)
- void reserve(size_type cnt);
-
- //! @copydoc ::boost::container::flat_set::shrink_to_fit()
- void shrink_to_fit();
-
- #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type Key constructed with
- //! std::forward<Args>(args)... and returns the iterator pointing to the
- //! newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
- { return this->tree_t::emplace_equal(boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type Key constructed with
- //! std::forward<Args>(args)... in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
- { return this->tree_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
- { return this->tree_t::emplace_equal(BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->tree_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE)
- #undef BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts x and returns the iterator pointing to the
- //! newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- iterator insert(const value_type &x);
-
- //! <b>Effects</b>: Inserts a new value_type move constructed from x
- //! and returns the iterator pointing to the newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic search time plus linear insertion
- //! to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- iterator insert(value_type &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, iterator, this->priv_insert)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- iterator insert(const_iterator p, const value_type &x);
-
- //! <b>Effects</b>: Inserts a new value move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
- //! right before p) plus insertion linear to the elements with bigger keys than x.
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- iterator insert(const_iterator p, value_type &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) .
- //!
- //! <b>Complexity</b>: N log(N).
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
- { this->tree_t::insert_equal(first, last); }
-
- //! <b>Requires</b>: first, last are not iterators into *this and
- //! must be ordered according to the predicate.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) .This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last)
- { this->tree_t::insert_equal(ordered_range, first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: N log(N).
- //!
- //! <b>Note</b>: If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
- { this->tree_t::insert_equal(il.begin(), il.end()); }
-
- //! <b>Requires</b>: Range [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
- BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list<value_type> il)
- { this->tree_t::insert_equal(ordered_range, il.begin(), il.end()); }
-#endif
-
- //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, AllocatorOrContainer>& source)
- { this->tree_t::merge_equal(source.tree()); }
-
- //! @copydoc ::boost::container::flat_multiset::merge(flat_multiset<Key, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
- { return this->merge(static_cast<flat_multiset<Key, C2, AllocatorOrContainer>&>(source)); }
-
- //! @copydoc ::boost::container::flat_multimap::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, AllocatorOrContainer>& source)
- { this->tree_t::merge_equal(source.tree()); }
-
- //! @copydoc ::boost::container::flat_multiset::merge(flat_set<Key, C2, AllocatorOrContainer>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
- { return this->merge(static_cast<flat_set<Key, C2, AllocatorOrContainer>&>(source)); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::container::flat_set::erase(const_iterator)
- iterator erase(const_iterator p);
-
- //! @copydoc ::boost::container::flat_set::erase(const key_type&)
- size_type erase(const key_type& x);
-
- //! @copydoc ::boost::container::flat_set::erase(const_iterator,const_iterator)
- iterator erase(const_iterator first, const_iterator last);
-
- //! @copydoc ::boost::container::flat_set::swap
- void swap(flat_multiset& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value );
-
- //! @copydoc ::boost::container::flat_set::clear
- void clear() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::key_comp
- key_compare key_comp() const;
-
- //! @copydoc ::boost::container::flat_set::value_comp
- value_compare value_comp() const;
-
- //! @copydoc ::boost::container::flat_set::find(const key_type& )
- iterator find(const key_type& x);
-
- //! @copydoc ::boost::container::flat_set::find(const key_type& ) const
- const_iterator find(const key_type& x) const;
-
- //! @copydoc ::boost::container::flat_set::nth(size_type)
- iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::nth(size_type) const
- const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::index_of(iterator)
- size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
- size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::flat_set::count(const key_type& ) const
- size_type count(const key_type& x) const;
-
- //! @copydoc ::boost::container::flat_set::lower_bound(const key_type& )
- iterator lower_bound(const key_type& x);
-
- //! @copydoc ::boost::container::flat_set::lower_bound(const key_type& ) const
- const_iterator lower_bound(const key_type& x) const;
-
- //! @copydoc ::boost::container::flat_set::upper_bound(const key_type& )
- iterator upper_bound(const key_type& x);
-
- //! @copydoc ::boost::container::flat_set::upper_bound(const key_type& ) const
- const_iterator upper_bound(const key_type& x) const;
-
- //! @copydoc ::boost::container::flat_set::equal_range(const key_type& ) const
- std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const;
-
- //! @copydoc ::boost::container::flat_set::equal_range(const key_type& )
- std::pair<iterator,iterator> equal_range(const key_type& x);
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const flat_multiset& x, const flat_multiset& y);
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const flat_multiset& x, const flat_multiset& y);
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const flat_multiset& x, const flat_multiset& y);
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const flat_multiset& x, const flat_multiset& y);
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const flat_multiset& x, const flat_multiset& y);
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const flat_multiset& x, const flat_multiset& y);
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(flat_multiset& x, flat_multiset& y);
-
- //! <b>Effects</b>: Extracts the internal sequence container.
- //!
- //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
- //!
- //! <b>Postcondition</b>: this->empty()
- //!
- //! <b>Throws</b>: If secuence_type's move constructor throws
- sequence_type extract_sequence();
-
- #endif //#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
- //! one passed externally using the move assignment.
- //!
- //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
- //!
- //! <b>Throws</b>: If the comparison or the move constructor throws
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
- { this->tree_t::adopt_sequence_equal(boost::move(seq)); }
-
- //! <b>Requires</b>: seq shall be ordered according to this->compare()
- //!
- //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
- //! one passed externally using the move assignment.
- //!
- //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
- //!
- //! <b>Throws</b>: If the move assignment throws
- BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq)
- { this->tree_t::adopt_sequence_equal(ordered_range_t(), boost::move(seq)); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- template <class KeyType>
- BOOST_CONTAINER_FORCEINLINE iterator priv_insert(BOOST_FWD_REF(KeyType) x)
- { return this->tree_t::insert_equal(::boost::forward<KeyType>(x)); }
-
- template <class KeyType>
- BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
- { return this->tree_t::insert_equal(p, ::boost::forward<KeyType>(x)); }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-flat_multiset(InputIterator, InputIterator) ->
- flat_multiset<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-flat_multiset(InputIterator, InputIterator, Allocator const&) ->
- flat_multiset< typename iterator_traits<InputIterator>::value_type
- , std::less<typename iterator_traits<InputIterator>::value_type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-flat_multiset(InputIterator, InputIterator, Compare const&) ->
- flat_multiset<typename iterator_traits<InputIterator>::value_type, Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-flat_multiset(InputIterator, InputIterator, Compare const&, Allocator const&) ->
- flat_multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
-
-template <typename InputIterator>
-flat_multiset(ordered_range_t, InputIterator, InputIterator) ->
- flat_multiset<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-flat_multiset(ordered_range_t, InputIterator, InputIterator, Allocator const&) ->
- flat_multiset< typename iterator_traits<InputIterator>::value_type
- , std::less<typename iterator_traits<InputIterator>::value_type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-flat_multiset(ordered_range_t, InputIterator, InputIterator, Compare const&) ->
- flat_multiset< typename iterator_traits<InputIterator>::value_type, Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-flat_multiset(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
- flat_multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
-
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class Key, class Compare, class AllocatorOrContainer>
-struct has_trivial_destructor_after_move<boost::container::flat_multiset<Key, Compare, AllocatorOrContainer> >
-{
- typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-}}
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_FLAT_SET_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/list.hpp b/src/third_party/boost-1.68.0/boost/container/list.hpp
deleted file mode 100644
index 68892bc2bb7..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/list.hpp
+++ /dev/null
@@ -1,1499 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_LIST_HPP
-#define BOOST_CONTAINER_LIST_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-#include <boost/container/throw_exception.hpp>
-// container/detail
-#include <boost/container/detail/algorithm.hpp>
-#include <boost/container/detail/compare_functors.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/node_alloc_holder.hpp>
-#include <boost/container/detail/version_type.hpp>
-#include <boost/container/detail/value_functors.hpp>
-// move
-#include <boost/move/utility_core.hpp>
-#include <boost/move/iterator.hpp>
-#include <boost/move/traits.hpp>
-// move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-# include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/detail/move_helpers.hpp>
-
-// intrusive
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/list.hpp>
-// other
-#include <boost/assert.hpp>
-// std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-namespace dtl {
-
-template<class VoidPointer>
-struct list_hook
-{
- typedef typename dtl::bi::make_list_base_hook
- <dtl::bi::void_pointer<VoidPointer>, dtl::bi::link_mode<dtl::bi::normal_link> >::type type;
-};
-
-template <class T, class VoidPointer>
-struct list_node
- : public list_hook<VoidPointer>::type
-{
- private:
- list_node();
-
- public:
- typedef T value_type;
- typedef typename list_hook<VoidPointer>::type hook_type;
-
- T m_data;
-
- T &get_data()
- { return this->m_data; }
-
- const T &get_data() const
- { return this->m_data; }
-};
-
-template <class T, class VoidPointer>
-struct iiterator_node_value_type< list_node<T,VoidPointer> > {
- typedef T type;
-};
-
-template<class Allocator>
-struct intrusive_list_type
-{
- typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef typename allocator_traits_type::value_type value_type;
- typedef typename boost::intrusive::pointer_traits
- <typename allocator_traits_type::pointer>::template
- rebind_pointer<void>::type
- void_pointer;
- typedef typename dtl::list_node
- <value_type, void_pointer> node_type;
- typedef typename dtl::bi::make_list
- < node_type
- , dtl::bi::base_hook<typename list_hook<void_pointer>::type>
- , dtl::bi::constant_time_size<true>
- , dtl::bi::size_type
- <typename allocator_traits_type::size_type>
- >::type container_type;
- typedef container_type type ;
-};
-
-} //namespace dtl {
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A list is a doubly linked list. That is, it is a Sequence that supports both
-//! forward and backward traversal, and (amortized) constant time insertion and
-//! removal of elements at the beginning or the end, or in the middle. Lists have
-//! the important property that insertion and splicing do not invalidate iterators
-//! to list elements, and that even removal invalidates only the iterators that point
-//! to the elements that are removed. The ordering of iterators may be changed
-//! (that is, list<T>::iterator might have a different predecessor or successor
-//! after a list operation than it did before), but the iterators themselves will
-//! not be invalidated or made to point to different elements unless that invalidation
-//! or mutation is explicit.
-//!
-//! \tparam T The type of object that is stored in the list
-//! \tparam Allocator The allocator used for all internal memory management
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class T, class Allocator = new_allocator<T> >
-#else
-template <class T, class Allocator>
-#endif
-class list
- : protected dtl::node_alloc_holder
- <Allocator, typename dtl::intrusive_list_type<Allocator>::type>
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef typename
- dtl::intrusive_list_type<Allocator>::type Icont;
- typedef dtl::node_alloc_holder<Allocator, Icont> AllocHolder;
- typedef typename AllocHolder::NodePtr NodePtr;
- typedef typename AllocHolder::NodeAlloc NodeAlloc;
- typedef typename AllocHolder::ValAlloc ValAlloc;
- typedef typename AllocHolder::Node Node;
- typedef dtl::allocator_destroyer<NodeAlloc> Destroyer;
- typedef typename AllocHolder::alloc_version alloc_version;
- typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef boost::container::equal_to_value<Allocator> equal_to_value_type;
-
- BOOST_COPYABLE_AND_MOVABLE(list)
-
- typedef dtl::iterator_from_iiterator<typename Icont::iterator, false> iterator_impl;
- typedef dtl::iterator_from_iiterator<typename Icont::iterator, true> const_iterator_impl;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
-
- typedef T value_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(NodeAlloc) stored_allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
- typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
-
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructs a list.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- list() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : AllocHolder()
- {}
-
- //! <b>Effects</b>: Constructs a list taking the allocator as parameter.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- explicit list(const allocator_type &a) BOOST_NOEXCEPT_OR_NOTHROW
- : AllocHolder(a)
- {}
-
- //! <b>Effects</b>: Constructs a list
- //! and inserts n value-initialized value_types.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit list(size_type n)
- : AllocHolder(Allocator())
- { this->resize(n); }
-
- //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- list(size_type n, const allocator_type &a)
- : AllocHolder(a)
- { this->resize(n); }
-
- //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- list(size_type n, const T& value, const Allocator& a = Allocator())
- : AllocHolder(a)
- { this->insert(this->cbegin(), n, value); }
-
- //! <b>Effects</b>: Copy constructs a list.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- list(const list& x)
- : AllocHolder(x)
- { this->insert(this->cbegin(), x.begin(), x.end()); }
-
- //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If allocator_type's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- list(BOOST_RV_REF(list) x) BOOST_NOEXCEPT_OR_NOTHROW
- : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x))
- {}
-
- //! <b>Effects</b>: Copy constructs a list using the specified allocator.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- list(const list& x, const allocator_type &a)
- : AllocHolder(a)
- { this->insert(this->cbegin(), x.begin(), x.end()); }
-
- //! <b>Effects</b>: Move constructor sing the specified allocator.
- //! Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If allocation or value_type's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
- list(BOOST_RV_REF(list) x, const allocator_type &a)
- : AllocHolder(a)
- {
- if(this->node_alloc() == x.node_alloc()){
- this->icont().swap(x.icont());
- }
- else{
- this->insert(this->cbegin(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end()));
- }
- }
-
- //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
- //! and inserts a copy of the range [first, last) in the list.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced InIt throws.
- //!
- //! <b>Complexity</b>: Linear to the range [first, last).
- template <class InpIt>
- list(InpIt first, InpIt last, const Allocator &a = Allocator())
- : AllocHolder(a)
- { this->insert(this->cbegin(), first, last); }
-
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
- //! and inserts a copy of the range [il.begin(), il.end()) in the list.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced
- //! std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
- list(std::initializer_list<value_type> il, const Allocator &a = Allocator())
- : AllocHolder(a)
- { this->insert(this->cbegin(), il.begin(), il.end()); }
-#endif
-
- //! <b>Effects</b>: Destroys the list. All stored values are destroyed
- //! and used memory is deallocated.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements.
- ~list() BOOST_NOEXCEPT_OR_NOTHROW
- {} //AllocHolder clears the list
-
- //! <b>Effects</b>: Makes *this contain the same elements as x.
- //!
- //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
- //! of each of x's elements.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in x.
- list& operator=(BOOST_COPY_ASSIGN_REF(list) x)
- {
- if (&x != this){
- NodeAlloc &this_alloc = this->node_alloc();
- const NodeAlloc &x_alloc = x.node_alloc();
- dtl::bool_<allocator_traits_type::
- propagate_on_container_copy_assignment::value> flag;
- if(flag && this_alloc != x_alloc){
- this->clear();
- }
- this->AllocHolder::copy_assign_alloc(x);
- this->assign(x.begin(), x.end());
- }
- return *this;
- }
-
- //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
- //!
- //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
- //! before the function.
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- list& operator=(BOOST_RV_REF(list) x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
- || allocator_traits_type::is_always_equal::value)
- {
- BOOST_ASSERT(this != &x);
- NodeAlloc &this_alloc = this->node_alloc();
- NodeAlloc &x_alloc = x.node_alloc();
- const bool propagate_alloc = allocator_traits_type::
- propagate_on_container_move_assignment::value;
- const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
- //Resources can be transferred if both allocators are
- //going to be equal after this function (either propagated or already equal)
- if(propagate_alloc || allocators_equal){
- //Destroy
- this->clear();
- //Move allocator if needed
- this->AllocHolder::move_assign_alloc(x);
- //Obtain resources
- this->icont() = boost::move(x.icont());
- }
- //Else do a one by one move
- else{
- this->assign( boost::make_move_iterator(x.begin())
- , boost::make_move_iterator(x.end()));
- }
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Makes *this contain the same elements as il.
- //!
- //! <b>Postcondition</b>: this->size() == il.size(). *this contains a copy
- //! of each of x's elements.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in x.
- list& operator=(std::initializer_list<value_type> il)
- {
- assign(il.begin(), il.end());
- return *this;
- }
-#endif
-
- //! <b>Effects</b>: Assigns the n copies of val to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- void assign(size_type n, const T& val)
- {
- typedef constant_iterator<value_type, difference_type> cvalue_iterator;
- return this->assign(cvalue_iterator(val, n), cvalue_iterator());
- }
-
- //! <b>Effects</b>: Assigns the range [first, last) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing InpIt throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- template <class InpIt>
- void assign(InpIt first, InpIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_convertible<InpIt, size_type>::type * = 0
- #endif
- )
- {
- iterator first1 = this->begin();
- const iterator last1 = this->end();
- for ( ; first1 != last1 && first != last; ++first1, ++first)
- *first1 = *first;
- if (first == last)
- this->erase(first1, last1);
- else{
- this->insert(last1, first, last);
- }
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assigns the range [il.begin(), il.end()) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- void assign(std::initializer_list<value_type> il)
- { assign(il.begin(), il.end()); }
-#endif
-
- //! <b>Effects</b>: Returns a copy of the internal allocator.
- //!
- //! <b>Throws</b>: If allocator's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return allocator_type(this->node_alloc()); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->node_alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->node_alloc(); }
-
- //////////////////////////////////////////////
- //
- // iterators
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->icont().begin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->cbegin(); }
-
- //! <b>Effects</b>: Returns an iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->icont().end()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->cend(); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(end()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->crbegin(); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(begin()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->crend(); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(this->non_const_icont().begin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(this->non_const_icont().end()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->cend()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->cbegin()); }
-
- //////////////////////////////////////////////
- //
- // capacity
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns true if the list contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
- { return !this->size(); }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->icont().size(); }
-
- //! <b>Effects</b>: Returns the largest possible size of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return AllocHolder::max_size(); }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are value initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type new_size)
- {
- if(!priv_try_shrink(new_size)){
- typedef value_init_construct_iterator<value_type, difference_type> value_init_iterator;
- this->insert(this->cend(), value_init_iterator(new_size - this->size()), value_init_iterator());
- }
- }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are copy constructed from x.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type new_size, const T& x)
- {
- if(!priv_try_shrink(new_size)){
- this->insert(this->cend(), new_size - this->size(), x);
- }
- }
-
- //////////////////////////////////////////////
- //
- // element access
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the first element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference front() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *this->begin();
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the first element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *this->begin();
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the first element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *(--this->end());
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the first element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *(--this->end());
- }
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the end of the list.
- //!
- //! <b>Returns</b>: A reference to the created object.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's in-place constructor throws.
- //!
- //! <b>Complexity</b>: Constant
- template <class... Args>
- reference emplace_back(BOOST_FWD_REF(Args)... args)
- { return *this->emplace(this->cend(), boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the beginning of the list.
- //!
- //! <b>Returns</b>: A reference to the created object.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's in-place constructor throws.
- //!
- //! <b>Complexity</b>: Constant
- template <class... Args>
- reference emplace_front(BOOST_FWD_REF(Args)... args)
- { return *this->emplace(this->cbegin(), boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... before p.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's in-place constructor throws.
- //!
- //! <b>Complexity</b>: Constant
- template <class... Args>
- iterator emplace(const_iterator position, BOOST_FWD_REF(Args)... args)
- {
- BOOST_ASSERT((priv_is_linked)(position));
- NodePtr pnode(AllocHolder::create_node(boost::forward<Args>(args)...));
- return iterator(this->icont().insert(position.get(), *pnode));
- }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_LIST_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- reference emplace_back(BOOST_MOVE_UREF##N)\
- { return *this->emplace(this->cend() BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- reference emplace_front(BOOST_MOVE_UREF##N)\
- { return *this->emplace(this->cbegin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace(const_iterator position BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- BOOST_ASSERT(position == this->cend() || (--(++position) == position) );\
- NodePtr pnode (AllocHolder::create_node(BOOST_MOVE_FWD##N));\
- return iterator(this->icont().insert(position.get(), *pnode));\
- }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_LIST_EMPLACE_CODE)
- #undef BOOST_CONTAINER_LIST_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x at the beginning of the list.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_front(const T &x);
-
- //! <b>Effects</b>: Constructs a new element in the beginning of the list
- //! and moves the resources of x to this new element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_front(T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x at the end of the list.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_back(const T &x);
-
- //! <b>Effects</b>: Constructs a new element in the end of the list
- //! and moves the resources of x to this new element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_back(T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of x before p.
- //!
- //! <b>Returns</b>: an iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- iterator insert(const_iterator p, const T &x);
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a new element before p with x's resources.
- //!
- //! <b>Returns</b>: an iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- iterator insert(const_iterator p, T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts n copies of x before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- iterator insert(const_iterator position, size_type n, const T& x)
- {
- //range check is done by insert
- typedef constant_iterator<value_type, difference_type> cvalue_iterator;
- return this->insert(position, cvalue_iterator(x, n), cvalue_iterator());
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [first, last) range before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced InpIt throws.
- //!
- //! <b>Complexity</b>: Linear to distance [first, last).
- template <class InpIt>
- iterator insert(const_iterator p, InpIt first, InpIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::enable_if_c
- < !dtl::is_convertible<InpIt, size_type>::value
- && (dtl::is_input_iterator<InpIt>::value
- || dtl::is_same<alloc_version, version_1>::value
- )
- >::type * = 0
- #endif
- )
- {
- BOOST_ASSERT((priv_is_linked)(p));
- const typename Icont::iterator ipos(p.get());
- iterator ret_it(ipos);
- if(first != last){
- ret_it = iterator(this->icont().insert(ipos, *this->create_node_from_it(first)));
- ++first;
- }
- for (; first != last; ++first){
- this->icont().insert(ipos, *this->create_node_from_it(first));
- }
- return ret_it;
- }
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class FwdIt>
- iterator insert(const_iterator position, FwdIt first, FwdIt last
- , typename dtl::enable_if_c
- < !dtl::is_convertible<FwdIt, size_type>::value
- && !(dtl::is_input_iterator<FwdIt>::value
- || dtl::is_same<alloc_version, version_1>::value
- )
- >::type * = 0
- )
- {
- BOOST_ASSERT((priv_is_linked)(position));
- //Optimized allocation and construction
- insertion_functor func(this->icont(), position.get());
- iterator before_p(position.get());
- --before_p;
- this->allocate_many_and_construct(first, boost::container::iterator_distance(first, last), func);
- return ++before_p;
- }
- #endif
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if if.begin() == il.end().
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to distance [il.begin(), il.end()).
- iterator insert(const_iterator p, std::initializer_list<value_type> il)
- {
- //position range check is done by insert()
- return insert(p, il.begin(), il.end());
- }
-#endif
-
- //! <b>Effects</b>: Removes the first element from the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void pop_front() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- this->erase(this->cbegin());
- }
-
- //! <b>Effects</b>: Removes the last element from the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- const_iterator tmp = this->cend();
- this->erase(--tmp);
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Erases the element at p.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(p != this->cend() && (priv_is_linked)(p));
- return iterator(this->icont().erase_and_dispose(p.get(), Destroyer(this->node_alloc())));
- }
-
- //! <b>Requires</b>: first and last must be valid iterator to elements in *this.
- //!
- //! <b>Effects</b>: Erases the elements pointed by [first, last).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the distance between first and last.
- iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(first == last || (first != this->cend() && (priv_is_linked)(first)));
- BOOST_ASSERT(first == last || (priv_is_linked)(last));
- return iterator(AllocHolder::erase_range(first.get(), last.get(), alloc_version()));
- }
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- void swap(list& x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
- || allocator_traits_type::is_always_equal::value)
- {
- BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value ||
- allocator_traits_type::is_always_equal::value ||
- this->get_stored_allocator() == x.get_stored_allocator());
- AllocHolder::swap(x);
- }
-
- //! <b>Effects</b>: Erases all the elements of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the list.
- void clear() BOOST_NOEXCEPT_OR_NOTHROW
- { AllocHolder::clear(alloc_version()); }
-
- //////////////////////////////////////////////
- //
- // slist operations
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: p must point to an element contained
- //! by the list. x != *this. this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
- //! the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
- //! this list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, list& x) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT((priv_is_linked)(p));
- BOOST_ASSERT(this != &x);
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().splice(p.get(), x.icont());
- }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by the list. x != *this. this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
- //! the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
- //! this list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, BOOST_RV_REF(list) x) BOOST_NOEXCEPT_OR_NOTHROW
- {
- //Checks done in splice
- this->splice(p, static_cast<list&>(x));
- }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. i must point to an element contained in list x.
- //! this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //! If p == i or p == ++i, this function is a null operation.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, list &x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT((priv_is_linked)(p));
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().splice(p.get(), x.icont(), i.get());
- }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. i must point to an element contained in list x.
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //! If p == i or p == ++i, this function is a null operation.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this != &x);
- //Additional checks done in splice()
- this->splice(p, static_cast<list&>(x), i);
- }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. first and last must point to elements contained in list x.
- //! this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear to the number of elements transferred.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, list &x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT((priv_is_linked)(p));
- BOOST_ASSERT(first == last || (first != x.cend() && x.priv_is_linked(first)));
- BOOST_ASSERT(first == last || x.priv_is_linked(last));
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().splice(p.get(), x.icont(), first.get(), last.get());
- }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. first and last must point to elements contained in list x.
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear to the number of elements transferred.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this != &x);
- //Additional checks done in splice()
- this->splice(p, static_cast<list&>(x), first, last);
- }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. first and last must point to elements contained in list x.
- //! n == distance(first, last). this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- //!
- //! <b>Note</b>: Non-standard extension
- void splice(const_iterator p, list &x, const_iterator first, const_iterator last, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().splice(p.get(), x.icont(), first.get(), last.get(), n);
- }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. first and last must point to elements contained in list x.
- //! n == distance(first, last). this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- //!
- //! <b>Note</b>: Non-standard extension
- void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator first, const_iterator last, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice(p, static_cast<list&>(x), first, last, n); }
-
- //! <b>Effects</b>: Removes all the elements that compare equal to value.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- void remove(const T& value)
- { this->remove_if(equal_to_value_type(value)); }
-
- //! <b>Effects</b>: Removes all the elements for which a specified
- //! predicate is satisfied.
- //!
- //! <b>Throws</b>: If pred throws.
- //!
- //! <b>Complexity</b>: Linear time. It performs exactly size() calls to the predicate.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template <class Pred>
- void remove_if(Pred pred)
- {
- typedef value_to_node_compare<Node, Pred> value_to_node_compare_type;
- this->icont().remove_and_dispose_if(value_to_node_compare_type(pred), Destroyer(this->node_alloc()));
- }
-
- //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
- //! elements that are equal from the list.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Complexity</b>: Linear time (size()-1 comparisons equality comparisons).
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- void unique()
- { this->unique(value_equal_t()); }
-
- //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
- //! elements that satisfy some binary predicate from the list.
- //!
- //! <b>Throws</b>: If pred throws.
- //!
- //! <b>Complexity</b>: Linear time (size()-1 comparisons calls to pred()).
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template <class BinaryPredicate>
- void unique(BinaryPredicate binary_pred)
- {
- typedef value_to_node_compare<Node, BinaryPredicate> value_to_node_compare_type;
- this->icont().unique_and_dispose(value_to_node_compare_type(binary_pred), Destroyer(this->node_alloc()));
- }
-
- //! <b>Requires</b>: The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this according to std::less<value_type>. The merge is stable;
- //! that is, if an element from *this is equivalent to one from x, then the element
- //! from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- void merge(list &x)
- { this->merge(x, value_less_t()); }
-
- //! <b>Requires</b>: The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this according to std::less<value_type>. The merge is stable;
- //! that is, if an element from *this is equivalent to one from x, then the element
- //! from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- void merge(BOOST_RV_REF(list) x)
- { this->merge(static_cast<list&>(x)); }
-
- //! <b>Requires</b>: p must be a comparison function that induces a strict weak
- //! ordering and both *this and x must be sorted according to that ordering
- //! The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this. The merge is stable; that is, if an element from *this is
- //! equivalent to one from x, then the element from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If comp throws.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- //!
- //! <b>Note</b>: Iterators and references to *this are not invalidated.
- template <class StrictWeakOrdering>
- void merge(list &x, const StrictWeakOrdering &comp)
- {
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- typedef value_to_node_compare<Node, StrictWeakOrdering> value_to_node_compare_type;
- this->icont().merge(x.icont(), value_to_node_compare_type(comp));
- }
-
- //! <b>Requires</b>: p must be a comparison function that induces a strict weak
- //! ordering and both *this and x must be sorted according to that ordering
- //! The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this. The merge is stable; that is, if an element from *this is
- //! equivalent to one from x, then the element from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If comp throws.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- //!
- //! <b>Note</b>: Iterators and references to *this are not invalidated.
- template <class StrictWeakOrdering>
- void merge(BOOST_RV_REF(list) x, StrictWeakOrdering comp)
- { this->merge(static_cast<list&>(x), comp); }
-
- //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
- //! The sort is stable, that is, the relative order of equivalent elements is preserved.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Notes</b>: Iterators and references are not invalidated.
- //!
- //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
- //! is the list's size.
- void sort()
- { this->sort(value_less_t()); }
-
- //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
- //! The sort is stable, that is, the relative order of equivalent elements is preserved.
- //!
- //! <b>Throws</b>: If comp throws.
- //!
- //! <b>Notes</b>: Iterators and references are not invalidated.
- //!
- //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
- //! is the list's size.
- template <class StrictWeakOrdering>
- void sort(StrictWeakOrdering comp)
- {
- // nothing if the list has length 0 or 1.
- if (this->size() < 2)
- return;
- typedef value_to_node_compare<Node, StrictWeakOrdering> value_to_node_compare_type;
- this->icont().sort(value_to_node_compare_type(comp));
- }
-
- //! <b>Effects</b>: Reverses the order of elements in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: This function is linear time.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated
- void reverse() BOOST_NOEXCEPT_OR_NOTHROW
- { this->icont().reverse(); }
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const list& x, const list& y)
- { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const list& x, const list& y)
- { return !(x == y); }
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const list& x, const list& y)
- { return boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const list& x, const list& y)
- { return y < x; }
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const list& x, const list& y)
- { return !(y < x); }
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const list& x, const list& y)
- { return !(x < y); }
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(list& x, list& y)
- { x.swap(y); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
-
- static bool priv_is_linked(const_iterator const position)
- {
- const_iterator cur(position);
- //This list is circular including end nodes
- return (--(++cur)) == position && (++(--cur)) == position;
- }
-
- bool priv_try_shrink(size_type new_size)
- {
- const size_type len = this->size();
- if(len > new_size){
- const const_iterator iend = this->cend();
- size_type to_erase = len - new_size;
- const_iterator ifirst;
- if(to_erase < len/2u){
- ifirst = iend;
- while(to_erase--){
- --ifirst;
- }
- }
- else{
- ifirst = this->cbegin();
- size_type to_skip = len - to_erase;
- while(to_skip--){
- ++ifirst;
- }
- }
- this->erase(ifirst, iend);
- return true;
- }
- else{
- return false;
- }
- }
-
- iterator priv_insert(const_iterator p, const T &x)
- {
- BOOST_ASSERT((priv_is_linked)(p));
- NodePtr tmp = AllocHolder::create_node(x);
- return iterator(this->icont().insert(p.get(), *tmp));
- }
-
- iterator priv_insert(const_iterator p, BOOST_RV_REF(T) x)
- {
- BOOST_ASSERT((priv_is_linked)(p));
- NodePtr tmp = AllocHolder::create_node(boost::move(x));
- return iterator(this->icont().insert(p.get(), *tmp));
- }
-
- void priv_push_back (const T &x)
- { this->insert(this->cend(), x); }
-
- void priv_push_back (BOOST_RV_REF(T) x)
- { this->insert(this->cend(), boost::move(x)); }
-
- void priv_push_front (const T &x)
- { this->insert(this->cbegin(), x); }
-
- void priv_push_front (BOOST_RV_REF(T) x)
- { this->insert(this->cbegin(), boost::move(x)); }
-
- class insertion_functor;
- friend class insertion_functor;
-
- class insertion_functor
- {
- Icont &icont_;
- typedef typename Icont::const_iterator iconst_iterator;
- const iconst_iterator pos_;
-
- public:
- insertion_functor(Icont &icont, typename Icont::const_iterator pos)
- : icont_(icont), pos_(pos)
- {}
-
- void operator()(Node &n)
- {
- this->icont_.insert(pos_, n);
- }
- };
-
- typedef value_less<value_type> value_less_t;
- typedef value_equal<value_type> value_equal_t;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-};
-
-#if __cplusplus >= 201703L
-template <typename InputIterator>
-list(InputIterator, InputIterator) ->
- list<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-list(InputIterator, InputIterator, Allocator const&) ->
- list<typename iterator_traits<InputIterator>::value_type, Allocator>;
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class T, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::list<T, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-}}
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_LIST_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/map.hpp b/src/third_party/boost-1.68.0/boost/container/map.hpp
deleted file mode 100644
index a88b6a5558e..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/map.hpp
+++ /dev/null
@@ -1,2233 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_CONTAINER_MAP_HPP
-#define BOOST_CONTAINER_MAP_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-#include <boost/container/throw_exception.hpp>
-// container/detail
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/tree.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/value_init.hpp>
-#include <boost/container/detail/pair.hpp>
-#include <boost/container/detail/pair_key_mapped_of_value.hpp>
-
-// move
-#include <boost/move/traits.hpp>
-#include <boost/move/utility_core.hpp>
-// move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/detail/move_helpers.hpp>
-// intrusive/detail
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
-// other
-#include <boost/static_assert.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-// std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-namespace boost {
-namespace container {
-
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A map is a kind of associative container that supports unique keys (contains at
-//! most one of each key value) and provides for fast retrieval of values of another
-//! type T based on the keys. The map class supports bidirectional iterators.
-//!
-//! A map satisfies all of the requirements of a container and of a reversible
-//! container and of an associative container. The <code>value_type</code> stored
-//! by this container is the value_type is std::pair<const Key, T>.
-//!
-//! \tparam Key is the key_type of the map
-//! \tparam T is the <code>mapped_type</code>
-//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
-//! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
-//! (e.g. <i>allocator< std::pair<const Key, T> > </i>).
-//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
-template < class Key, class T, class Compare = std::less<Key>
- , class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults >
-#else
-template <class Key, class T, class Compare, class Allocator, class Options>
-#endif
-class map
- ///@cond
- : public dtl::tree
- < std::pair<const Key, T>
- , dtl::select1st<Key>
- , Compare, Allocator, Options>
- ///@endcond
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(map)
-
- typedef dtl::select1st<Key> select_1st_t;
- typedef std::pair<const Key, T> value_type_impl;
- typedef dtl::tree
- <value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
- typedef dtl::pair <Key, T> movable_value_type_impl;
- typedef typename base_t::value_compare value_compare_impl;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
-
- typedef Key key_type;
- typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef T mapped_type;
- typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
- typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare;
- typedef Compare key_compare;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
- typedef std::pair<key_type, mapped_type> nonconst_value_type;
- typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
- typedef BOOST_CONTAINER_IMPDEF(node_handle<
- typename base_t::stored_allocator_type
- BOOST_MOVE_I pair_key_mapped_of_value
- <key_type BOOST_MOVE_I mapped_type> >) node_type;
- typedef BOOST_CONTAINER_IMPDEF
- (insert_return_type_base<iterator BOOST_MOVE_I node_type>) insert_return_type;
-
- //allocator_type::value_type type must be std::pair<CONST Key, T>
- BOOST_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
-
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructs an empty map.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE
- map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
- dtl::is_nothrow_default_constructible<Compare>::value)
- : base_t()
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object
- //! and allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE map(const Compare& comp, const allocator_type& a)
- : base_t(comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit map(const Compare& comp)
- : base_t(comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit map(const allocator_type& a)
- : base_t(a)
- {}
-
- //! <b>Effects</b>: Constructs an empty map and
- //! inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last)
- : base_t(true, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const allocator_type& a)
- : base_t(true, first, last, Compare(), a)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
- //! inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp)
- : base_t(true, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : base_t(true, first, last, comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty map and
- //! inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last)
- : base_t(ordered_range, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
- //! inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : base_t(ordered_range, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
- //! allocator, and inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last
- , const Compare& comp, const allocator_type& a)
- : base_t(ordered_range, first, last, comp, a)
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs an empty map and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted according
- //! to the predicate and otherwise N logN, where N is il.first() - il.end().
- BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il)
- : base_t(true, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is il.first() - il.end().
- BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const Compare& comp)
- : base_t(true, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is il.first() - il.end().
- BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const allocator_type& a)
- : base_t(true, il.begin(), il.end(), Compare(), a)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is il.first() - il.end().
- BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : base_t(true, il.begin(), il.end(), comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty map and inserts elements from the ordered unique range [il.begin(), il.end()).
- //! This function is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list<value_type> il)
- : base_t(ordered_range, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object,
- //! and inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
- : base_t(ordered_range, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
- //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, std::initializer_list<value_type> il
- , const Compare& comp, const allocator_type& a)
- : base_t(ordered_range, il.begin(), il.end(), comp, a)
- {}
-
-#endif
-
- //! <b>Effects</b>: Copy constructs a map.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE map(const map& x)
- : base_t(static_cast<const base_t&>(x))
- {}
-
- //! <b>Effects</b>: Move constructs a map. Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Postcondition</b>: x is emptied.
- BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : base_t(BOOST_MOVE_BASE(base_t, x))
- {}
-
- //! <b>Effects</b>: Copy constructs a map using the specified allocator.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE map(const map& x, const allocator_type &a)
- : base_t(static_cast<const base_t&>(x), a)
- {}
-
- //! <b>Effects</b>: Move constructs a map using the specified allocator.
- //! Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant if x == x.get_allocator(), linear otherwise.
- //!
- //! <b>Postcondition</b>: x is emptied.
- BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x, const allocator_type &a)
- : base_t(BOOST_MOVE_BASE(base_t, x), a)
- {}
-
- //! <b>Effects</b>: Makes *this a copy of x.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_COPY_ASSIGN_REF(map) x)
- { return static_cast<map&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
-
- //! <b>Effects</b>: this->swap(x.get()).
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_RV_REF(map) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { return static_cast<map&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assign content of il to *this.
- //!
- BOOST_CONTAINER_FORCEINLINE map& operator=(std::initializer_list<value_type> il)
- {
- this->clear();
- insert(il.begin(), il.end());
- return *this;
- }
-#endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Returns a copy of the allocator that
- //! was passed to the object's constructor.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const;
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns an iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns true if the container contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns the number of the elements contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns the largest possible size of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: If there is no key equivalent to x in the map, inserts
- //! value_type(x, T()) into the map.
- //!
- //! <b>Returns</b>: A reference to the mapped_type corresponding to x in *this.
- //!
- //! <b>Complexity</b>: Logarithmic.
- mapped_type& operator[](const key_type &k);
-
- //! <b>Effects</b>: If there is no key equivalent to x in the map, inserts
- //! value_type(boost::move(x), T()) into the map (the key is move-constructed)
- //!
- //! <b>Returns</b>: A reference to the mapped_type corresponding to x in *this.
- //!
- //! <b>Complexity</b>: Logarithmic.
- mapped_type& operator[](key_type &&k);
- #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
- //in compilers like GCC 3.4, we can't catch temporaries
- BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
- BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript)
- #endif
-
- //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
- //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
- //! as if by insert, constructing it from value_type(k, forward<M>(obj)).
- //!
- //! No iterators or references are invalidated. If the insertion is successful, pointers and references
- //! to the element obtained while it is held in the node handle are invalidated, and pointers and
- //! references obtained to that element before it was extracted become valid.
- //!
- //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
- //! took place. The iterator component is pointing at the element that was inserted or updated.
- //!
- //! <b>Complexity</b>: Logarithmic in the size of the container.
- template <class M>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
- { return this->base_t::insert_or_assign(const_iterator(), k, ::boost::forward<M>(obj)); }
-
- //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
- //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
- //! as if by insert, constructing it from value_type(k, move(obj)).
- //!
- //! No iterators or references are invalidated. If the insertion is successful, pointers and references
- //! to the element obtained while it is held in the node handle are invalidated, and pointers and
- //! references obtained to that element before it was extracted become valid.
- //!
- //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
- //! took place. The iterator component is pointing at the element that was inserted or updated.
- //!
- //! <b>Complexity</b>: Logarithmic in the size of the container.
- template <class M>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
- { return this->base_t::insert_or_assign(const_iterator(), ::boost::move(k), ::boost::forward<M>(obj)); }
-
- //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
- //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
- //! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
- //! to the container as close as possible to the position just before hint.
- //!
- //! No iterators or references are invalidated. If the insertion is successful, pointers and references
- //! to the element obtained while it is held in the node handle are invalidated, and pointers and
- //! references obtained to that element before it was extracted become valid.
- //!
- //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
- //! took place. The iterator component is pointing at the element that was inserted or updated.
- //!
- //! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
- //! the new element is inserted just before hint.
- template <class M>
- BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
- { return this->base_t::insert_or_assign(hint, k, ::boost::forward<M>(obj)); }
-
- //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
- //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
- //! as if by insert, constructing it from value_type(k, move(obj)) and the new element
- //! to the container as close as possible to the position just before hint.
- //!
- //! No iterators or references are invalidated. If the insertion is successful, pointers and references
- //! to the element obtained while it is held in the node handle are invalidated, and pointers and
- //! references obtained to that element before it was extracted become valid.
- //!
- //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
- //! took place. The iterator component is pointing at the element that was inserted or updated.
- //!
- //! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
- //! the new element is inserted just before hint.
- template <class M>
- BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
- { return this->base_t::insert_or_assign(hint, ::boost::move(k), ::boost::forward<M>(obj)); }
-
- //! <b>Returns</b>: A reference to the element whose key is equivalent to x.
- //! Throws: An exception object of type out_of_range if no such element is present.
- //! <b>Complexity</b>: logarithmic.
- T& at(const key_type& k)
- {
- iterator i = this->find(k);
- if(i == this->end()){
- throw_out_of_range("map::at key not found");
- }
- return i->second;
- }
-
- //! <b>Returns</b>: A reference to the element whose key is equivalent to x.
- //! Throws: An exception object of type out_of_range if no such element is present.
- //! <b>Complexity</b>: logarithmic.
- const T& at(const key_type& k) const
- {
- const_iterator i = this->find(k);
- if(i == this->end()){
- throw_out_of_range("map::at key not found");
- }
- return i->second;
- }
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Inserts x if and only if there is no element in the container
- //! with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const value_type& x)
- { return this->base_t::insert_unique(x); }
-
- //! <b>Effects</b>: Inserts a new value_type created from the pair if and only if
- //! there is no element in the container with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const nonconst_value_type& x)
- { return this->try_emplace(x.first, x.second); }
-
- //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
- //! only if there is no element in the container with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
- { return this->try_emplace(boost::move(x.first), boost::move(x.second)); }
-
- //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
- //! only if there is no element in the container with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
- { return this->try_emplace(boost::move(x.first), boost::move(x.second)); }
-
- //! <b>Effects</b>: Move constructs a new value from x if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
- { return this->base_t::insert_unique(boost::move(x)); }
-
- //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
- { return this->base_t::insert_unique(p, x); }
-
- //! <b>Effects</b>: Move constructs a new value from x if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
- { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
-
- //! <b>Effects</b>: Move constructs a new value from x if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
- { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
-
- //! <b>Effects</b>: Inserts a copy of x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- iterator insert(const_iterator p, const nonconst_value_type& x)
- { return this->try_emplace(p, x.first, x.second); }
-
- //! <b>Effects</b>: Inserts an element move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
- { return this->base_t::insert_unique(p, boost::move(x)); }
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) if and only
- //! if there is no element with key equivalent to the key of that element.
- //!
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
- { this->base_t::insert_unique(first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
- //! if there is no element with key equivalent to the key of that element.
- //!
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
- BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
- { this->base_t::insert_unique(il.begin(), il.end()); }
-#endif
-
- //! <b>Requires</b>: nh is empty or this->get_allocator() == nh.get_allocator().
- //!
- //! <b>Effects</b>: If nh is empty, has no effect. Otherwise, inserts the element owned
- //! by nh if and only if there is no element in the container with a key equivalent to nh.key().
- //!
- //! <b>Returns</b>: If nh is empty, insert_return_type.inserted is false, insert_return_type.position
- //! is end(), and insert_return_type.node is empty. Otherwise if the insertion took place,
- //! insert_return_type.inserted is true, insert_return_type.position points to the inserted element,
- //! and insert_return_type.node is empty; if the insertion failed, insert_return_type.inserted is
- //! false, insert_return_type.node has the previous value of nh, and insert_return_type.position
- //! points to an element with a key equivalent to nh.key().
- //!
- //! <b>Complexity</b>: Logarithmic
- insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- {
- typename base_t::node_type n(boost::move(nh));
- typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(boost::move(n)));
- return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node));
- }
-
- //! <b>Effects</b>: Same as `insert(node_type && nh)` but the element is inserted as close as possible
- //! to the position just prior to "hint".
- //!
- //! <b>Complexity</b>: logarithmic in general, but amortized constant if the element is inserted
- //! right before "hint".
- insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- {
- typename base_t::node_type n(boost::move(nh));
- typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(hint, boost::move(n)));
- return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node));
- }
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object x of type T constructed with
- //! std::forward<Args>(args)... in the container if and only if there is
- //! no element in the container with an equivalent key.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
- { return this->base_t::emplace_unique(boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the container if and only if there is
- //! no element in the container with an equivalent key.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
- { return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
-
- //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
- //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
- //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
- //! forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
- //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args)
- { return this->base_t::try_emplace(const_iterator(), k, boost::forward<Args>(args)...); }
-
- //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
- //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
- //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
- //! forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args)
- { return this->base_t::try_emplace(hint, k, boost::forward<Args>(args)...).first; }
-
- //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
- //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
- //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
- //! forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
- //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
- { return this->base_t::try_emplace(const_iterator(), boost::move(k), boost::forward<Args>(args)...); }
-
- //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
- //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
- //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
- //! forward_as_tuple(forward<Args>(args)...).
- //!
- //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
- { return this->base_t::try_emplace(hint, boost::move(k), boost::forward<Args>(args)...).first; }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_MAP_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
- { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->base_t::try_emplace(const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->base_t::try_emplace(hint, k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->base_t::try_emplace(const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->base_t::try_emplace(hint, boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MAP_EMPLACE_CODE)
- #undef BOOST_CONTAINER_MAP_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Erases the element pointed to by p.
- //!
- //! <b>Returns</b>: Returns an iterator pointing to the element immediately
- //! following q prior to the element being erased. If no such element exists,
- //! returns end().
- //!
- //! <b>Complexity</b>: Amortized constant time
- iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
- //!
- //! <b>Returns</b>: Returns the number of erased elements.
- //!
- //! <b>Complexity</b>: log(size()) + count(k)
- size_type erase(const key_type& x) BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Erases all the elements in the range [first, last).
- //!
- //! <b>Returns</b>: Returns last.
- //!
- //! <b>Complexity</b>: log(size())+N where N is the distance from first to last.
- iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW;
-
- #endif
-
- //! <b>Effects</b>: Removes the first element in the container with key equivalent to k.
- //!
- //! <b>Returns</b>: A node_type owning the element if found, otherwise an empty node_type.
- //!
- //! <b>Complexity</b>: log(a.size()).
- node_type extract(const key_type& k)
- {
- typename base_t::node_type base_nh(this->base_t::extract(k));
- node_type nh(boost::move(base_nh));
- return BOOST_MOVE_RET(node_type, nh);
- }
-
- //! <b>Effects</b>: Removes the element pointed to by "position".
- //!
- //! <b>Returns</b>: A node_type owning the element, otherwise an empty node_type.
- //!
- //! <b>Complexity</b>: Amortized constant.
- node_type extract(const_iterator position)
- {
- typename base_t::node_type base_nh(this->base_t::extract(position));
- node_type nh(boost::move(base_nh));
- return BOOST_MOVE_RET(node_type, nh);
- }
-
- //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
- //!
- //! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
- //! the comparison object of *this. If there is an element in a with key equivalent to the
- //! key of an element from source, then that element is not extracted from source.
- //!
- //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
- //! to those same elements but as members of *this. Iterators referring to the transferred
- //! elements will continue to refer to their elements, but they now behave as iterators into *this,
- //! not into source.
- //!
- //! <b>Throws</b>: Nothing unless the comparison object throws.
- //!
- //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
- {
- typedef dtl::tree
- <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
- this->merge_unique(static_cast<base2_t&>(source));
- }
-
- //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
- { return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
-
- //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
- {
- typedef dtl::tree
- <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
- this->base_t::merge_unique(static_cast<base2_t&>(source));
- }
-
- //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
- { return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- void swap(map& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value )
-
- //! <b>Effects</b>: erase(a.begin(),a.end()).
- //!
- //! <b>Postcondition</b>: size() == 0.
- //!
- //! <b>Complexity</b>: linear in size().
- void clear() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! <b>Effects</b>: Returns the comparison object out
- //! of which a was constructed.
- //!
- //! <b>Complexity</b>: Constant.
- key_compare key_comp() const;
-
- //! <b>Effects</b>: Returns an object of value_compare constructed out
- //! of the comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- value_compare value_comp() const;
-
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- iterator find(const key_type& x);
-
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- const_iterator find(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<typename K>
- iterator find(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<typename K>
- const_iterator find(const K& x) const;
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
- { return static_cast<size_type>(this->find(x) != this->cend()); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- template<typename K>
- BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
- { return static_cast<size_type>(this->find(x) != this->cend()); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator lower_bound(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- const_iterator lower_bound(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- iterator lower_bound(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- const_iterator lower_bound(const K& x) const;
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator upper_bound(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- const_iterator upper_bound(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- iterator upper_bound(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- const_iterator upper_bound(const K& x) const;
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- std::pair<iterator,iterator> equal_range(const key_type& x);
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- std::pair<iterator,iterator> equal_range(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- std::pair<const_iterator,const_iterator> equal_range(const K& x) const;
-
- //! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
- //!
- //! <b>Complexity</b>: Linear
- void rebalance();
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const map& x, const map& y);
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const map& x, const map& y);
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const map& x, const map& y);
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const map& x, const map& y);
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const map& x, const map& y);
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const map& x, const map& y);
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(map& x, map& y);
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- template<class KeyConvertible>
- BOOST_CONTAINER_FORCEINLINE mapped_type& priv_subscript(BOOST_FWD_REF(KeyConvertible) k)
- {
- return this->try_emplace(boost::forward<KeyConvertible>(k)).first->second;
- }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-map(InputIterator, InputIterator) ->
- map< typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type>;
-
-template <typename InputIterator, typename Allocator>
-map(InputIterator, InputIterator, Allocator const&) ->
- map< typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-map(InputIterator, InputIterator, Compare const&) ->
- map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-map(InputIterator, InputIterator, Compare const&, Allocator const&) ->
- map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare
- , Allocator>;
-
-template <typename InputIterator>
-map(ordered_unique_range_t, InputIterator, InputIterator) ->
- map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type>;
-
-template <typename InputIterator, typename Allocator>
-map(ordered_unique_range_t, InputIterator, InputIterator, Allocator const&) ->
- map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&) ->
- map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
- map< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare
- , Allocator>;
-
-#endif
-
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class Key, class T, class Compare, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::map<Key, T, Compare, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A multimap is a kind of associative container that supports equivalent keys
-//! (possibly containing multiple copies of the same key value) and provides for
-//! fast retrieval of values of another type T based on the keys. The multimap class
-//! supports bidirectional iterators.
-//!
-//! A multimap satisfies all of the requirements of a container and of a reversible
-//! container and of an associative container. The <code>value_type</code> stored
-//! by this container is the value_type is std::pair<const Key, T>.
-//!
-//! \tparam Key is the key_type of the map
-//! \tparam Value is the <code>mapped_type</code>
-//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
-//! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
-//! (e.g. <i>allocator< std::pair<const Key, T> > </i>).
-//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
-template < class Key, class T, class Compare = std::less<Key>
- , class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults>
-#else
-template <class Key, class T, class Compare, class Allocator, class Options>
-#endif
-class multimap
- ///@cond
- : public dtl::tree
- < std::pair<const Key, T>
- , dtl::select1st<Key>
- , Compare, Allocator, Options>
- ///@endcond
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(multimap)
-
- typedef dtl::select1st<Key> select_1st_t;
- typedef std::pair<const Key, T> value_type_impl;
- typedef dtl::tree
- <value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
- typedef dtl::pair <Key, T> movable_value_type_impl;
- typedef typename base_t::value_compare value_compare_impl;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
-
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
-
- typedef Key key_type;
- typedef T mapped_type;
- typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
- typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare;
- typedef Compare key_compare;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
- typedef std::pair<key_type, mapped_type> nonconst_value_type;
- typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
- typedef BOOST_CONTAINER_IMPDEF(node_handle<
- typename base_t::stored_allocator_type
- BOOST_MOVE_I pair_key_mapped_of_value
- <key_type BOOST_MOVE_I mapped_type> >) node_type;
-
- //allocator_type::value_type type must be std::pair<CONST Key, T>
- BOOST_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
-
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructs an empty multimap.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE multimap()
- BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
- dtl::is_nothrow_default_constructible<Compare>::value)
- : base_t()
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified allocator
- //! object and allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit multimap(const allocator_type& a)
- : base_t(a)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified comparison.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit multimap(const Compare& comp)
- : base_t(comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified comparison and allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE multimap(const Compare& comp, const allocator_type& a)
- : base_t(comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap and
- //! inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last)
- : base_t(false, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const allocator_type& a)
- : base_t(false, first, last, Compare(), a)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
- //! inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const Compare& comp)
- : base_t(false, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object
- //! and allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last,
- const Compare& comp, const allocator_type& a)
- : base_t(false, first, last, comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap and
- //! inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last)
- : base_t(ordered_range, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
- //! inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : base_t(ordered_range, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
- //! allocator, and inserts elements from the ordered range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp,
- const allocator_type& a)
- : base_t(ordered_range, first, last, comp, a)
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs an empty multimap and
- //! and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is il.first() - il.end().
- BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il)
- : base_t(false, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is il.first() - il.end().
- BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const allocator_type& a)
- : base_t(false, il.begin(), il.end(), Compare(), a)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is il.first() - il.end().
- BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const Compare& comp)
- : base_t(false, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is il.first() - il.end().
- BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : base_t(false, il.begin(), il.end(), comp, a)
- {}
-
-
- //! <b>Effects</b>: Constructs an empty map and
- //! inserts elements from the ordered range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il)
- : base_t(ordered_range, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
- //! inserts elements from the ordered range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
- : base_t(ordered_range, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty map and
- //! inserts elements from the ordered range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : base_t(ordered_range, il.begin(), il.end(), comp, a)
- {}
-
-#endif
-
- //! <b>Effects</b>: Copy constructs a multimap.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x)
- : base_t(static_cast<const base_t&>(x))
- {}
-
- //! <b>Effects</b>: Move constructs a multimap. Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Postcondition</b>: x is emptied.
- BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : base_t(BOOST_MOVE_BASE(base_t, x))
- {}
-
- //! <b>Effects</b>: Copy constructs a multimap.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x, const allocator_type &a)
- : base_t(static_cast<const base_t&>(x), a)
- {}
-
- //! <b>Effects</b>: Move constructs a multimap using the specified allocator.
- //! Constructs *this using x's resources.
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
- //!
- //! <b>Postcondition</b>: x is emptied.
- BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x, const allocator_type &a)
- : base_t(BOOST_MOVE_BASE(base_t, x), a)
- {}
-
- //! <b>Effects</b>: Makes *this a copy of x.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x)
- { return static_cast<multimap&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
-
- //! <b>Effects</b>: this->swap(x.get()).
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_RV_REF(multimap) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { return static_cast<multimap&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assign content of il to *this.
- //!
- BOOST_CONTAINER_FORCEINLINE multimap& operator=(std::initializer_list<value_type> il)
- {
- this->clear();
- insert(il.begin(), il.end());
- return *this;
- }
-#endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::container::set::get_allocator()
- allocator_type get_allocator() const;
-
- //! @copydoc ::boost::container::set::get_stored_allocator()
- stored_allocator_type &get_stored_allocator();
-
- //! @copydoc ::boost::container::set::get_stored_allocator() const
- const stored_allocator_type &get_stored_allocator() const;
-
- //! @copydoc ::boost::container::set::begin()
- iterator begin();
-
- //! @copydoc ::boost::container::set::begin() const
- const_iterator begin() const;
-
- //! @copydoc ::boost::container::set::cbegin() const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::container::set::end()
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::end() const
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::cend() const
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::rbegin()
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::rbegin() const
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::crbegin() const
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::rend()
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::rend() const
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::crend() const
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::empty() const
- bool empty() const;
-
- //! @copydoc ::boost::container::set::size() const
- size_type size() const;
-
- //! @copydoc ::boost::container::set::max_size() const
- size_type max_size() const;
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
- { return this->base_t::emplace_equal(boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
- { return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
- { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE)
- #undef BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- //! <b>Effects</b>: Inserts x and returns the iterator pointing to the
- //! newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x)
- { return this->base_t::insert_equal(x); }
-
- //! <b>Effects</b>: Inserts a new value constructed from x and returns
- //! the iterator pointing to the newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const nonconst_value_type& x)
- { return this->base_t::emplace_equal(x); }
-
- //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
- //! the iterator pointing to the newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic.
- BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(nonconst_value_type) x)
- { return this->base_t::emplace_equal(boost::move(x)); }
-
- //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
- //! the iterator pointing to the newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic.
- iterator insert(BOOST_RV_REF(movable_value_type) x)
- { return this->base_t::emplace_equal(boost::move(x)); }
-
- //! <b>Effects</b>: Inserts a copy of x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
- { return this->base_t::insert_equal(p, x); }
-
- //! <b>Effects</b>: Inserts a new value constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const nonconst_value_type& x)
- { return this->base_t::emplace_hint_equal(p, x); }
-
- //! <b>Effects</b>: Inserts a new value move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
- { return this->base_t::emplace_hint_equal(p, boost::move(x)); }
-
- //! <b>Effects</b>: Inserts a new value move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
- { return this->base_t::emplace_hint_equal(p, boost::move(x)); }
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) .
- //!
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
- { this->base_t::insert_equal(first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end().
- //!
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
- BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
- { this->base_t::insert_equal(il.begin(), il.end()); }
-#endif
-
- //! <b>Requires</b>: nh is empty or this->get_allocator() == nh.get_allocator().
- //!
- //! <b>Effects/Returns</b>: If nh is empty, has no effect and returns end(). Otherwise, inserts
- //! the element owned by nh and returns an iterator pointing to the newly inserted element.
- //! If a range containing elements with keys equivalent to nh.key() exists,
- //! the element is inserted at the end of that range. nh is always emptied.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- {
- typename base_t::node_type n(boost::move(nh));
- return this->base_t::insert_equal_node(boost::move(n));
- }
-
- //! <b>Effects</b>: Same as `insert(node_type && nh)` but the element is inserted as close as possible
- //! to the position just prior to "hint".
- //!
- //! <b>Complexity</b>: logarithmic in general, but amortized constant if the element is inserted
- //! right before "hint".
- iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- {
- typename base_t::node_type n(boost::move(nh));
- return this->base_t::insert_equal_node(hint, boost::move(n));
- }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::container::set::erase(const_iterator)
- iterator erase(const_iterator p);
-
- //! @copydoc ::boost::container::set::erase(const key_type&)
- size_type erase(const key_type& x);
-
- //! @copydoc ::boost::container::set::erase(const_iterator,const_iterator)
- iterator erase(const_iterator first, const_iterator last);
- #endif
-
- //! @copydoc ::boost::container::map::extract(const key_type&)
- node_type extract(const key_type& k)
- {
- typename base_t::node_type base_nh(this->base_t::extract(k));
- return node_type(boost::move(base_nh));
- }
-
- //! @copydoc ::boost::container::map::extract(const_iterator)
- node_type extract(const_iterator position)
- {
- typename base_t::node_type base_nh(this->base_t::extract(position));
- return node_type (boost::move(base_nh));
- }
-
- //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
- //!
- //! <b>Effects</b>: Extracts each element in source and insert it into a using
- //! the comparison object of *this.
- //!
- //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
- //! to those same elements but as members of *this. Iterators referring to the transferred
- //! elements will continue to refer to their elements, but they now behave as iterators into *this,
- //! not into source.
- //!
- //! <b>Throws</b>: Nothing unless the comparison object throws.
- //!
- //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
- {
- typedef dtl::tree
- <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
- this->base_t::merge_equal(static_cast<base2_t&>(source));
- }
-
- //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
- { return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
-
- //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
- {
- typedef dtl::tree
- <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
- this->base_t::merge_equal(static_cast<base2_t&>(source));
- }
-
- //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
- { return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! @copydoc ::boost::container::set::swap
- void swap(multiset& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value );
-
- //! @copydoc ::boost::container::set::clear
- void clear() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::key_comp
- key_compare key_comp() const;
-
- //! @copydoc ::boost::container::set::value_comp
- value_compare value_comp() const;
-
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- iterator find(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- const_iterator find(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<typename K>
- iterator find(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<typename K>
- const_iterator find(const K& x) const;
-
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- size_type count(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- template<typename K>
- size_type count(const K& x) const;
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator lower_bound(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- const_iterator lower_bound(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- iterator lower_bound(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- const_iterator lower_bound(const K& x) const;
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator upper_bound(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- const_iterator upper_bound(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- iterator upper_bound(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- const_iterator upper_bound(const K& x) const;
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- std::pair<iterator,iterator> equal_range(const key_type& x);
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- std::pair<iterator,iterator> equal_range(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- std::pair<const_iterator,const_iterator> equal_range(const K& x) const;
-
- //! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
- //!
- //! <b>Complexity</b>: Linear
- void rebalance();
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const multimap& x, const multimap& y);
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const multimap& x, const multimap& y);
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const multimap& x, const multimap& y);
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const multimap& x, const multimap& y);
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const multimap& x, const multimap& y);
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const multimap& x, const multimap& y);
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(multimap& x, multimap& y);
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-multimap(InputIterator, InputIterator) ->
- multimap<typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type>;
-
-template <typename InputIterator, typename Allocator>
-multimap(InputIterator, InputIterator, Allocator const&) ->
- multimap<typename dtl::remove_const< typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-multimap(InputIterator, InputIterator, Compare const&) ->
- multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-multimap(InputIterator, InputIterator, Compare const&, Allocator const&) ->
- multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare
- , Allocator>;
-
-template <typename InputIterator>
-multimap(ordered_range_t, InputIterator, InputIterator) ->
- multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type>;
-
-template <typename InputIterator, typename Allocator>
-multimap(ordered_range_t, InputIterator, InputIterator, Allocator const&) ->
- multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , std::less<typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-multimap(ordered_range_t, InputIterator, InputIterator, Compare const&) ->
- multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-multimap(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
- multimap< typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type
- , typename iterator_traits<InputIterator>::value_type::second_type
- , Compare
- , Allocator>;
-
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class Key, class T, class Compare, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::multimap<Key, T, Compare, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-}}
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_MAP_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/resource_adaptor.hpp b/src/third_party/boost-1.68.0/boost/container/pmr/resource_adaptor.hpp
deleted file mode 100644
index f5ce5c8a18d..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/pmr/resource_adaptor.hpp
+++ /dev/null
@@ -1,193 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_PMR_RESOURCE_ADAPTOR_HPP
-#define BOOST_CONTAINER_PMR_RESOURCE_ADAPTOR_HPP
-
-#if defined (_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp>
-#include <boost/container/pmr/memory_resource.hpp>
-#include <boost/container/allocator_traits.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/move/utility_core.hpp>
-
-namespace boost {
-namespace container {
-namespace pmr {
-
-//! An instance of resource_adaptor<Allocator> is an adaptor that wraps a memory_resource interface
-//! around Allocator. In order that resource_adaptor<X<T>> and resource_adaptor<X<U>> are the same
-//! type for any allocator template X and types T and U, resource_adaptor<Allocator> is rendered as
-//! an alias to this class template such that Allocator is rebound to a char value type in every
-//! specialization of the class template. The requirements on this class template are defined below.
-//! In addition to the Allocator requirements, the parameter to resource_adaptor shall meet
-//! the following additional requirements:
-//!
-//! - `typename allocator_traits<Allocator>:: pointer` shall be identical to
-//! `typename allocator_traits<Allocator>:: value_type*`.
-//!
-//! - `typename allocator_traits<Allocator>:: const_pointer` shall be identical to
-//! `typename allocator_traits<Allocator>:: value_type const*`.
-//!
-//! - `typename allocator_traits<Allocator>:: void_pointer` shall be identical to `void*`.
-//!
-//! - `typename allocator_traits<Allocator>:: const_void_pointer` shall be identical to `void const*`.
-template <class Allocator>
-class resource_adaptor_imp
- : public memory_resource
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- , private ::boost::intrusive::detail::ebo_functor_holder<Allocator>
- #endif
-{
- #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
- Allocator m_alloc;
- #else
- BOOST_COPYABLE_AND_MOVABLE(resource_adaptor_imp)
- typedef ::boost::intrusive::detail::ebo_functor_holder<Allocator> ebo_alloc_t;
- void static_assert_if_not_char_allocator() const
- {
- //This class can only be used with allocators type char
- BOOST_STATIC_ASSERT((dtl::is_same<typename Allocator::value_type, char>::value));
- }
- #endif
-
- public:
- typedef Allocator allocator_type;
-
- //! <b>Effects</b>: Default constructs
- //! m_alloc.
- resource_adaptor_imp()
- { this->static_assert_if_not_char_allocator(); }
-
- //! <b>Effects</b>: Copy constructs
- //! m_alloc.
- resource_adaptor_imp(const resource_adaptor_imp &other)
- : ebo_alloc_t(other.ebo_alloc_t::get())
- {}
-
- //! <b>Effects</b>: Move constructs
- //! m_alloc.
- resource_adaptor_imp(BOOST_RV_REF(resource_adaptor_imp) other)
- : ebo_alloc_t(::boost::move(other.get()))
- {}
-
- //! <b>Effects</b>: Initializes m_alloc with
- //! a2.
- explicit resource_adaptor_imp(const Allocator& a2)
- : ebo_alloc_t(a2)
- { this->static_assert_if_not_char_allocator(); }
-
- //! <b>Effects</b>: Initializes m_alloc with
- //! a2.
- explicit resource_adaptor_imp(BOOST_RV_REF(Allocator) a2)
- : ebo_alloc_t(::boost::move(a2))
- { this->static_assert_if_not_char_allocator(); }
-
- //! <b>Effects</b>: Copy assigns
- //! m_alloc.
- resource_adaptor_imp& operator=(BOOST_COPY_ASSIGN_REF(resource_adaptor_imp) other)
- { this->ebo_alloc_t::get() = other.ebo_alloc_t::get(); return *this; }
-
- //! <b>Effects</b>: Move assigns
- //! m_alloc.
- resource_adaptor_imp& operator=(BOOST_RV_REF(resource_adaptor_imp) other)
- { this->ebo_alloc_t::get() = ::boost::move(other.ebo_alloc_t::get()); return *this; }
-
- //! <b>Effects</b>: Returns m_alloc.
- allocator_type &get_allocator()
- { return this->ebo_alloc_t::get(); }
-
- //! <b>Effects</b>: Returns m_alloc.
- const allocator_type &get_allocator() const
- { return this->ebo_alloc_t::get(); }
-
- protected:
- //! <b>Returns</b>: Allocated memory obtained by calling m_alloc.allocate. The size and alignment
- //! of the allocated memory shall meet the requirements for a class derived from memory_resource.
- virtual void* do_allocate(size_t bytes, size_t alignment)
- { (void)alignment; return this->ebo_alloc_t::get().allocate(bytes); }
-
- //! <b>Requires</b>: p was previously allocated using A.allocate, where A == m_alloc, and not
- //! subsequently deallocated.
- //!
- //! <b>Effects</b>: Returns memory to the allocator using m_alloc.deallocate().
- virtual void do_deallocate(void* p, size_t bytes, size_t alignment)
- { (void)alignment; this->ebo_alloc_t::get().deallocate((char*)p, bytes); }
-
- //! Let p be dynamic_cast<const resource_adaptor_imp*>(&other).
- //!
- //! <b>Returns</b>: false if p is null, otherwise the value of m_alloc == p->m_alloc.
- virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT
- {
- const resource_adaptor_imp* p = dynamic_cast<const resource_adaptor_imp*>(&other);
- return p && p->ebo_alloc_t::get() == this->ebo_alloc_t::get();
- }
-};
-
-#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
-//! `resource_adaptor<Allocator>` is rendered as an alias to resource_adaptor_imp class template
-//! such that Allocator is rebound to a char value type.
-template <class Allocator>
-using resource_adaptor = resource_adaptor_imp
- <typename allocator_traits<Allocator>::template rebind_alloc<char> >;
-
-#else
-
-template <class Allocator>
-class resource_adaptor
- : public resource_adaptor_imp
- <typename allocator_traits<Allocator>::template portable_rebind_alloc<char>::type>
-{
- typedef resource_adaptor_imp
- <typename allocator_traits<Allocator>::template portable_rebind_alloc<char>::type> base_t;
-
- BOOST_COPYABLE_AND_MOVABLE(resource_adaptor)
-
- public:
- resource_adaptor()
- : base_t()
- {}
-
- resource_adaptor(const resource_adaptor &other)
- : base_t(other)
- {}
-
- resource_adaptor(BOOST_RV_REF(resource_adaptor) other)
- : base_t(BOOST_MOVE_BASE(base_t, other))
- {}
-
- explicit resource_adaptor(const Allocator& a2)
- : base_t(a2)
- {}
-
- explicit resource_adaptor(BOOST_RV_REF(Allocator) a2)
- : base_t(BOOST_MOVE_BASE(base_t, a2))
- {}
-
- resource_adaptor& operator=(BOOST_COPY_ASSIGN_REF(resource_adaptor) other)
- { return static_cast<resource_adaptor&>(this->base_t::operator=(other)); }
-
- resource_adaptor& operator=(BOOST_RV_REF(resource_adaptor) other)
- { return static_cast<resource_adaptor&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, other))); }
-
- //get_allocator and protected functions are properly inherited
-};
-
-#endif
-
-} //namespace pmr {
-} //namespace container {
-} //namespace boost {
-
-#endif //BOOST_CONTAINER_PMR_RESOURCE_ADAPTOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/set.hpp b/src/third_party/boost-1.68.0/boost/container/set.hpp
deleted file mode 100644
index e30089884e6..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/set.hpp
+++ /dev/null
@@ -1,1622 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_SET_HPP
-#define BOOST_CONTAINER_SET_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-// container
-#include <boost/container/container_fwd.hpp>
-// container/detail
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/tree.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-// intrusive/detail
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
-// move
-#include <boost/move/traits.hpp>
-#include <boost/move/utility_core.hpp>
-// move/detail
-#include <boost/move/detail/move_helpers.hpp>
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-// std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-namespace boost {
-namespace container {
-
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A set is a kind of associative container that supports unique keys (contains at
-//! most one of each key value) and provides for fast retrieval of the keys themselves.
-//! Class set supports bidirectional iterators.
-//!
-//! A set satisfies all of the requirements of a container and of a reversible container
-//! , and of an associative container. A set also provides most operations described in
-//! for unique keys.
-//!
-//! \tparam Key is the type to be inserted in the set, which is also the key_type
-//! \tparam Compare is the comparison functor used to order keys
-//! \tparam Allocator is the allocator to be used to allocate memory for this container
-//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
-template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class Options = void>
-#else
-template <class Key, class Compare, class Allocator, class Options>
-#endif
-class set
- ///@cond
- : public dtl::tree
- < Key, dtl::identity<Key>, Compare, Allocator, Options>
- ///@endcond
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(set)
- typedef dtl::tree
- < Key, dtl::identity<Key>, Compare, Allocator, Options> base_t;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
- typedef Key key_type;
- typedef Key value_type;
- typedef Compare key_compare;
- typedef Compare value_compare;
- typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::node_type) node_type;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::insert_return_type) insert_return_type;
-
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructs an empty set.
- //!
- //! <b>Complexity</b>: Constant.
-
- BOOST_CONTAINER_FORCEINLINE set()
- BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
- dtl::is_nothrow_default_constructible<Compare>::value)
- : base_t()
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified allocator object.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit set(const allocator_type& a)
- : base_t(a)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE explicit set(const Compare& comp)
- : base_t(comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object
- //! and allocator.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE set(const Compare& comp, const allocator_type& a)
- : base_t(comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using and
- //! inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last)
- : base_t(true, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const allocator_type& a)
- : base_t(true, first, last, key_compare(), a)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
- //! inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp)
- : base_t(true, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
- //! allocator, and inserts elements from the range [first ,last ).
- //!
- //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
- //! the predicate and otherwise N logN, where N is last - first.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : base_t(true, first, last, comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty set and
- //! inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last)
- : base_t(ordered_range, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
- //! inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp )
- : base_t(ordered_range, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
- //! allocator, and inserts elements from the ordered unique range [first ,last). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last
- , const Compare& comp, const allocator_type& a)
- : base_t(ordered_range, first, last, comp, a)
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs an empty set and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is il.begin() - il.end().
- BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il)
- : base_t(true, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is il.begin() - il.end().
- BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const allocator_type& a)
- : base_t(true, il.begin(), il.end(), Compare(), a)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
- //! inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is il.begin() - il.end().
- BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const Compare& comp )
- : base_t(true, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
- //! allocator, and inserts elements from the range [il.begin(), il.end()).
- //!
- //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
- //! the predicate and otherwise N logN, where N is il.begin() - il.end().
- BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : base_t(true, il.begin(), il.end(), comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty set and
- //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il)
- : base_t(ordered_range, il.begin(), il.end())
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
- //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
- : base_t(ordered_range, il.begin(), il.end(), comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
- //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
- //! unique values.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : base_t(ordered_range, il.begin(), il.end(), comp, a)
- {}
-#endif
-
- //! <b>Effects</b>: Copy constructs a set.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE set(const set& x)
- : base_t(static_cast<const base_t&>(x))
- {}
-
- //! <b>Effects</b>: Move constructs a set. Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Postcondition</b>: x is emptied.
- BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : base_t(BOOST_MOVE_BASE(base_t, x))
- {}
-
- //! <b>Effects</b>: Copy constructs a set using the specified allocator.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE set(const set& x, const allocator_type &a)
- : base_t(static_cast<const base_t&>(x), a)
- {}
-
- //! <b>Effects</b>: Move constructs a set using the specified allocator.
- //! Constructs *this using x's resources.
- //!
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
- BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x, const allocator_type &a)
- : base_t(BOOST_MOVE_BASE(base_t, x), a)
- {}
-
- //! <b>Effects</b>: Makes *this a copy of x.
- //!
- //! <b>Complexity</b>: Linear in x.size().
- BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_COPY_ASSIGN_REF(set) x)
- { return static_cast<set&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
-
- //! <b>Effects</b>: this->swap(x.get()).
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_RV_REF(set) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { return static_cast<set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Copy all elements from il to *this.
- //!
- //! <b>Complexity</b>: Linear in il.size().
- set& operator=(std::initializer_list<value_type> il)
- {
- this->clear();
- insert(il.begin(), il.end());
- return *this;
- }
-#endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Returns a copy of the allocator that
- //! was passed to the object's constructor.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const;
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- stored_allocator_type &get_stored_allocator();
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- const stored_allocator_type &get_stored_allocator() const;
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant
- iterator begin();
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const;
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const;
-
- //! <b>Effects</b>: Returns an iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end();
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const;
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const;
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rbegin();
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rbegin() const;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crbegin() const;
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rend();
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rend() const;
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crend() const;
-
- //! <b>Effects</b>: Returns true if the container contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- bool empty() const;
-
- //! <b>Effects</b>: Returns the number of the elements contained in the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type size() const;
-
- //! <b>Effects</b>: Returns the largest possible size of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type max_size() const;
- #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object x of type Key constructed with
- //! std::forward<Args>(args)... if and only if there is
- //! no element in the container with equivalent value.
- //! and returns the iterator pointing to the
- //! newly inserted element.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! Key's in-place constructor throws.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
- { return this->base_t::emplace_unique(boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type Key constructed with
- //! std::forward<Args>(args)... if and only if there is
- //! no element in the container with equivalent value.
- //! p is a hint pointing to where the insert
- //! should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
- { return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_SET_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
- { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SET_EMPLACE_CODE)
- #undef BOOST_CONTAINER_SET_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts x if and only if there is no element in the container
- //! with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- std::pair<iterator, bool> insert(const value_type &x);
-
- //! <b>Effects</b>: Move constructs a new value from x if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //!
- //! <b>Returns</b>: The bool component of the returned pair is true if and only
- //! if the insertion takes place, and the iterator component of the pair
- //! points to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- std::pair<iterator, bool> insert(value_type &&x);
- #else
- private:
- typedef std::pair<iterator, bool> insert_return_pair;
- public:
- BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, insert_return_pair, this->priv_insert)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
- //! no element in the container with key equivalent to the key of x.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- iterator insert(const_iterator p, const value_type &x);
-
- //! <b>Effects</b>: Inserts an element move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic.
- iterator insert(const_iterator p, value_type &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) if and only
- //! if there is no element with key equivalent to the key of that element.
- //!
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
- { this->base_t::insert_unique(first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: inserts each element from the range [il.begin(),il.end()) if and only
- //! if there is no element with key equivalent to the key of that element.
- //!
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
- BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
- { this->base_t::insert_unique(il.begin(), il.end()); }
-#endif
-
- //! @copydoc ::boost::container::map::insert(node_type&&)
- BOOST_CONTAINER_FORCEINLINE insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- { return this->base_t::insert_unique_node(boost::move(nh)); }
-
- //! @copydoc ::boost::container::map::insert(const_iterator, node_type&&)
- BOOST_CONTAINER_FORCEINLINE insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- { return this->base_t::insert_unique_node(hint, boost::move(nh)); }
-
- //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(set<Key, C2, Allocator, Options>& source)
- {
- typedef dtl::tree
- <Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
- this->base_t::merge_unique(static_cast<base2_t&>(source));
- }
-
- //! @copydoc ::boost::container::set::merge(set<Key, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
- { return this->merge(static_cast<set<Key, C2, Allocator, Options>&>(source)); }
-
- //! @copydoc ::boost::container::map::merge(multimap<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(multiset<Key, C2, Allocator, Options>& source)
- {
- typedef dtl::tree
- <Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
- this->base_t::merge_unique(static_cast<base2_t&>(source));
- }
-
- //! @copydoc ::boost::container::set::merge(multiset<Key, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
- { return this->merge(static_cast<multiset<Key, C2, Allocator, Options>&>(source)); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Erases the element pointed to by p.
- //!
- //! <b>Returns</b>: Returns an iterator pointing to the element immediately
- //! following q prior to the element being erased. If no such element exists,
- //! returns end().
- //!
- //! <b>Complexity</b>: Amortized constant time
- iterator erase(const_iterator p);
-
- //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
- //!
- //! <b>Returns</b>: Returns the number of erased elements.
- //!
- //! <b>Complexity</b>: log(size()) + count(k)
- size_type erase(const key_type& x);
-
- //! <b>Effects</b>: Erases all the elements in the range [first, last).
- //!
- //! <b>Returns</b>: Returns last.
- //!
- //! <b>Complexity</b>: log(size())+N where N is the distance from first to last.
- iterator erase(const_iterator first, const_iterator last);
-
- //! @copydoc ::boost::container::map::extract(const_iterator)
- node_type extract(const_iterator p);
-
- //! @copydoc ::boost::container::map::extract(const key_type&)
- node_type extract(const key_type& x);
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- void swap(set& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value );
-
- //! <b>Effects</b>: erase(a.begin(),a.end()).
- //!
- //! <b>Postcondition</b>: size() == 0.
- //!
- //! <b>Complexity</b>: linear in size().
- void clear();
-
- //! <b>Effects</b>: Returns the comparison object out
- //! of which a was constructed.
- //!
- //! <b>Complexity</b>: Constant.
- key_compare key_comp() const;
-
- //! <b>Effects</b>: Returns an object of value_compare constructed out
- //! of the comparison object.
- //!
- //! <b>Complexity</b>: Constant.
- value_compare value_comp() const;
-
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- iterator find(const key_type& x);
-
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- const_iterator find(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<typename K>
- iterator find(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const_iterator pointing to an element with the key
- //! equivalent to x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template<typename K>
- const_iterator find(const K& x) const;
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
- { return static_cast<size_type>(this->base_t::find(x) != this->base_t::cend()); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- template<typename K>
- BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
- { return static_cast<size_type>(this->find(x) != this->cend()); }
-
- //! <b>Returns</b>: The number of elements with key equivalent to x.
- //!
- //! <b>Complexity</b>: log(size())+count(k)
- BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x)
- { return static_cast<size_type>(this->base_t::find(x) != this->base_t::end()); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator lower_bound(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- const_iterator lower_bound(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- iterator lower_bound(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than k, or a.end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- const_iterator lower_bound(const K& x) const;
-
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- iterator upper_bound(const key_type& x);
-
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- const_iterator upper_bound(const key_type& x) const;
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: An iterator pointing to the first element with key not less
- //! than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- iterator upper_bound(const K& x);
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Returns</b>: A const iterator pointing to the first element with key not
- //! less than x, or end() if such an element is not found.
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- const_iterator upper_bound(const K& x) const;
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
- { return this->base_t::lower_bound_range(x); }
-
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
- { return this->base_t::lower_bound_range(x); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- std::pair<iterator,iterator> equal_range(const K& x)
- { return this->base_t::lower_bound_range(x); }
-
- //! <b>Requires</b>: This overload is available only if
- //! key_compare::is_transparent exists.
- //!
- //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
- //!
- //! <b>Complexity</b>: Logarithmic
- template<typename K>
- std::pair<const_iterator,const_iterator> equal_range(const K& x) const
- { return this->base_t::lower_bound_range(x); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
- //!
- //! <b>Complexity</b>: Linear
- void rebalance();
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const set& x, const set& y);
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const set& x, const set& y);
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const set& x, const set& y);
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const set& x, const set& y);
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const set& x, const set& y);
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const set& x, const set& y);
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(set& x, set& y);
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- template <class KeyType>
- BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> priv_insert(BOOST_FWD_REF(KeyType) x)
- { return this->base_t::insert_unique(::boost::forward<KeyType>(x)); }
-
- template <class KeyType>
- BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
- { return this->base_t::insert_unique(p, ::boost::forward<KeyType>(x)); }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-set(InputIterator, InputIterator) ->
- set<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-set(InputIterator, InputIterator, Allocator const&) ->
- set<typename iterator_traits<InputIterator>::value_type, std::less<typename iterator_traits<InputIterator>::value_type>, Allocator>;
-
-template <typename InputIterator, typename Compare>
-set(InputIterator, InputIterator, Compare const&) ->
- set<typename iterator_traits<InputIterator>::value_type, Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-set(InputIterator, InputIterator, Compare const&, Allocator const&) ->
- set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
-
-template <typename InputIterator>
-set(ordered_unique_range_t, InputIterator, InputIterator) ->
- set<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-set(ordered_unique_range_t, InputIterator, InputIterator, Allocator const&) ->
- set<typename iterator_traits<InputIterator>::value_type, std::less<typename iterator_traits<InputIterator>::value_type>, Allocator>;
-
-template <typename InputIterator, typename Compare>
-set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&) ->
- set<typename iterator_traits<InputIterator>::value_type, Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
- set<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
-
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class Key, class Compare, class Options, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::set<Key, Compare, Allocator, Options> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A multiset is a kind of associative container that supports equivalent keys
-//! (possibly contains multiple copies of the same key value) and provides for
-//! fast retrieval of the keys themselves. Class multiset supports bidirectional iterators.
-//!
-//! A multiset satisfies all of the requirements of a container and of a reversible
-//! container, and of an associative container). multiset also provides most operations
-//! described for duplicate keys.
-//!
-//! \tparam Key is the type to be inserted in the set, which is also the key_type
-//! \tparam Compare is the comparison functor used to order keys
-//! \tparam Allocator is the allocator to be used to allocate memory for this container
-//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
-template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class Options = tree_assoc_defaults >
-#else
-template <class Key, class Compare, class Allocator, class Options>
-#endif
-class multiset
- /// @cond
- : public dtl::tree
- <Key,dtl::identity<Key>, Compare, Allocator, Options>
- /// @endcond
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(multiset)
- typedef dtl::tree
- <Key,dtl::identity<Key>, Compare, Allocator, Options> base_t;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
-
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
- typedef Key key_type;
- typedef Key value_type;
- typedef Compare key_compare;
- typedef Compare value_compare;
- typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
- typedef typename BOOST_CONTAINER_IMPDEF(base_t::node_type) node_type;
-
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! @copydoc ::boost::container::set::set()
- BOOST_CONTAINER_FORCEINLINE multiset()
- BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
- dtl::is_nothrow_default_constructible<Compare>::value)
- : base_t()
- {}
-
- //! @copydoc ::boost::container::set::set(const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE explicit multiset(const allocator_type& a)
- : base_t(a)
- {}
-
- //! @copydoc ::boost::container::set::set(const Compare&)
- BOOST_CONTAINER_FORCEINLINE explicit multiset(const Compare& comp)
- : base_t(comp)
- {}
-
- //! @copydoc ::boost::container::set::set(const Compare&, const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE multiset(const Compare& comp, const allocator_type& a)
- : base_t(comp, a)
- {}
-
- //! @copydoc ::boost::container::set::set(InputIterator, InputIterator)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last)
- : base_t(false, first, last)
- {}
-
- //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const allocator_type&)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const allocator_type& a)
- : base_t(false, first, last, key_compare(), a)
- {}
-
- //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp)
- : base_t(false, first, last, comp)
- {}
-
- //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&, const allocator_type&)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : base_t(false, first, last, comp, a)
- {}
-
- //! <b>Effects</b>: Constructs an empty multiset and
- //! and inserts elements from the ordered range [first ,last ). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last )
- : base_t(ordered_range, first, last)
- {}
-
- //! <b>Effects</b>: Constructs an empty multiset using the specified comparison object and
- //! inserts elements from the ordered range [first ,last ). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
- : base_t(ordered_range, first, last, comp)
- {}
-
- //! <b>Effects</b>: Constructs an empty multiset using the specified comparison object and
- //! allocator, and inserts elements from the ordered range [first ,last ). This function
- //! is more efficient than the normal range creation for ordered ranges.
- //!
- //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
- //!
- //! <b>Complexity</b>: Linear in N.
- //!
- //! <b>Note</b>: Non-standard extension.
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
- : base_t(ordered_range, first, last, comp, a)
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>)
- BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il)
- : base_t(false, il.begin(), il.end())
- {}
-
- //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const allocator_type& a)
- : base_t(false, il.begin(), il.end(), Compare(), a)
- {}
-
- //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const Compare&)
- BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const Compare& comp)
- : base_t(false, il.begin(), il.end(), comp)
- {}
-
- //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const Compare&, const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : base_t(false, il.begin(), il.end(), comp, a)
- {}
-
- //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>)
- BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il)
- : base_t(ordered_range, il.begin(), il.end())
- {}
-
- //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare&)
- BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
- : base_t(ordered_range, il.begin(), il.end(), comp)
- {}
-
- //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare&, const allocator_type&)
- BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
- : base_t(ordered_range, il.begin(), il.end(), comp, a)
- {}
-#endif
-
- //! @copydoc ::boost::container::set::set(const set &)
- BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x)
- : base_t(static_cast<const base_t&>(x))
- {}
-
- //! @copydoc ::boost::container::set::set(set &&)
- BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
- : base_t(BOOST_MOVE_BASE(base_t, x))
- {}
-
- //! @copydoc ::boost::container::set::set(const set &, const allocator_type &)
- BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x, const allocator_type &a)
- : base_t(static_cast<const base_t&>(x), a)
- {}
-
- //! @copydoc ::boost::container::set::set(set &&, const allocator_type &)
- BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x, const allocator_type &a)
- : base_t(BOOST_MOVE_BASE(base_t, x), a)
- {}
-
- //! @copydoc ::boost::container::set::operator=(const set &)
- BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_COPY_ASSIGN_REF(multiset) x)
- { return static_cast<multiset&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
-
- //! @copydoc ::boost::container::set::operator=(set &&)
- BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_RV_REF(multiset) x)
- BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
- allocator_traits_type::is_always_equal::value) &&
- boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
- { return static_cast<multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! @copydoc ::boost::container::set::operator=(std::initializer_list<value_type>)
- multiset& operator=(std::initializer_list<value_type> il)
- {
- this->clear();
- insert(il.begin(), il.end());
- return *this;
- }
-#endif
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::container::set::get_allocator()
- allocator_type get_allocator() const;
-
- //! @copydoc ::boost::container::set::get_stored_allocator()
- stored_allocator_type &get_stored_allocator();
-
- //! @copydoc ::boost::container::set::get_stored_allocator() const
- const stored_allocator_type &get_stored_allocator() const;
-
- //! @copydoc ::boost::container::set::begin()
- iterator begin();
-
- //! @copydoc ::boost::container::set::begin() const
- const_iterator begin() const;
-
- //! @copydoc ::boost::container::set::cbegin() const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::container::set::end()
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::end() const
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::cend() const
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::rbegin()
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::rbegin() const
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::crbegin() const
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::rend()
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::rend() const
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::crend() const
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::empty() const
- bool empty() const;
-
- //! @copydoc ::boost::container::set::size() const
- size_type size() const;
-
- //! @copydoc ::boost::container::set::max_size() const
- size_type max_size() const;
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type Key constructed with
- //! std::forward<Args>(args)... and returns the iterator pointing to the
- //! newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
- { return this->base_t::emplace_equal(boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type Key constructed with
- //! std::forward<Args>(args)...
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- template <class... Args>
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
- { return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_MULTISET_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
- { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTISET_EMPLACE_CODE)
- #undef BOOST_CONTAINER_MULTISET_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts x and returns the iterator pointing to the
- //! newly inserted element.
- //!
- //! <b>Complexity</b>: Logarithmic.
- iterator insert(const value_type &x);
-
- //! <b>Effects</b>: Inserts a copy of x in the container.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- iterator insert(value_type &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, iterator, this->priv_insert)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- iterator insert(const_iterator p, const value_type &x);
-
- //! <b>Effects</b>: Inserts a value move constructed from x in the container.
- //! p is a hint pointing to where the insert should start to search.
- //!
- //! <b>Returns</b>: An iterator pointing to the element with key equivalent
- //! to the key of x.
- //!
- //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
- //! is inserted right before p.
- iterator insert(const_iterator p, value_type &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: first, last are not iterators into *this.
- //!
- //! <b>Effects</b>: inserts each element from the range [first,last) .
- //!
- //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
- template <class InputIterator>
- BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
- { this->base_t::insert_equal(first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! @copydoc ::boost::container::set::insert(std::initializer_list<value_type>)
- BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
- { this->base_t::insert_equal(il.begin(), il.end()); }
-#endif
-
- //! @copydoc ::boost::container::multimap::insert(node_type&&)
- BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- { return this->base_t::insert_equal_node(boost::move(nh)); }
-
- //! @copydoc ::boost::container::multimap::insert(const_iterator, node_type&&)
- BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
- { return this->base_t::insert_equal_node(hint, boost::move(nh)); }
-
- //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(multiset<Key, C2, Allocator, Options>& source)
- {
- typedef dtl::tree
- <Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
- this->base_t::merge_equal(static_cast<base2_t&>(source));
- }
-
- //! @copydoc ::boost::container::multiset::merge(multiset<Key, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
- { return this->merge(static_cast<multiset<Key, C2, Allocator, Options>&>(source)); }
-
- //! @copydoc ::boost::container::multimap::merge(map<Key, T, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(set<Key, C2, Allocator, Options>& source)
- {
- typedef dtl::tree
- <Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
- this->base_t::merge_equal(static_cast<base2_t&>(source));
- }
-
- //! @copydoc ::boost::container::multiset::merge(set<Key, C2, Allocator, Options>&)
- template<class C2>
- BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
- { return this->merge(static_cast<set<Key, C2, Allocator, Options>&>(source)); }
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! @copydoc ::boost::container::set::erase(const_iterator)
- iterator erase(const_iterator p);
-
- //! @copydoc ::boost::container::set::erase(const key_type&)
- size_type erase(const key_type& x);
-
- //! @copydoc ::boost::container::set::erase(const_iterator,const_iterator)
- iterator erase(const_iterator first, const_iterator last);
-
- //! @copydoc ::boost::container::multimap::extract(const_iterator)
- node_type extract(const_iterator p);
-
- //! @copydoc ::boost::container::multimap::extract(const key_type&)
- node_type extract(const key_type& x);
-
- //! @copydoc ::boost::container::set::swap
- void swap(multiset& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
- && boost::container::dtl::is_nothrow_swappable<Compare>::value );
-
- //! @copydoc ::boost::container::set::clear
- void clear() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @copydoc ::boost::container::set::key_comp
- key_compare key_comp() const;
-
- //! @copydoc ::boost::container::set::value_comp
- value_compare value_comp() const;
-
- //! @copydoc ::boost::container::set::find(const key_type& )
- iterator find(const key_type& x);
-
- //! @copydoc ::boost::container::set::find(const key_type& ) const
- const_iterator find(const key_type& x) const;
-
- //! @copydoc ::boost::container::set::find(const K& )
- template<typename K>
- iterator find(const K& x);
-
- //! @copydoc ::boost::container::set::find(const K& )
- template<typename K>
- const_iterator find(const K& x) const;
-
- //! @copydoc ::boost::container::set::count(const key_type& ) const
- size_type count(const key_type& x) const;
-
- //! @copydoc ::boost::container::set::count(const K& ) const
- template<typename K>
- size_type count(const K& x) const;
-
- //! @copydoc ::boost::container::set::lower_bound(const key_type& )
- iterator lower_bound(const key_type& x);
-
- //! @copydoc ::boost::container::set::lower_bound(const key_type& ) const
- const_iterator lower_bound(const key_type& x) const;
-
- //! @copydoc ::boost::container::set::lower_bound(const K& )
- template<typename K>
- iterator lower_bound(const K& x);
-
- //! @copydoc ::boost::container::set::lower_bound(const K& ) const
- template<typename K>
- const_iterator lower_bound(const K& x) const;
-
- //! @copydoc ::boost::container::set::upper_bound(const key_type& )
- iterator upper_bound(const key_type& x);
-
- //! @copydoc ::boost::container::set::upper_bound(const key_type& ) const
- const_iterator upper_bound(const key_type& x) const;
-
- //! @copydoc ::boost::container::set::upper_bound(const K& )
- template<typename K>
- iterator upper_bound(const K& x);
-
- //! @copydoc ::boost::container::set::upper_bound(const K& ) const
- template<typename K>
- const_iterator upper_bound(const K& x) const;
-
- //! @copydoc ::boost::container::set::equal_range(const key_type& ) const
- std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const;
-
- //! @copydoc ::boost::container::set::equal_range(const key_type& )
- std::pair<iterator,iterator> equal_range(const key_type& x);
-
- //! @copydoc ::boost::container::set::equal_range(const K& ) const
- template<typename K>
- std::pair<const_iterator, const_iterator> equal_range(const K& x) const;
-
- //! @copydoc ::boost::container::set::equal_range(const K& )
- template<typename K>
- std::pair<iterator,iterator> equal_range(const K& x);
-
- //! @copydoc ::boost::container::set::rebalance()
- void rebalance();
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const multiset& x, const multiset& y);
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const multiset& x, const multiset& y);
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const multiset& x, const multiset& y);
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const multiset& x, const multiset& y);
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const multiset& x, const multiset& y);
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const multiset& x, const multiset& y);
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(multiset& x, multiset& y);
-
- #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- template <class KeyType>
- BOOST_CONTAINER_FORCEINLINE iterator priv_insert(BOOST_FWD_REF(KeyType) x)
- { return this->base_t::insert_equal(::boost::forward<KeyType>(x)); }
-
- template <class KeyType>
- BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
- { return this->base_t::insert_equal(p, ::boost::forward<KeyType>(x)); }
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-multiset(InputIterator, InputIterator) ->
- multiset<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-multiset(InputIterator, InputIterator, Allocator const&) ->
- multiset< typename iterator_traits<InputIterator>::value_type
- , std::less<typename iterator_traits<InputIterator>::value_type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-multiset(InputIterator, InputIterator, Compare const&) ->
- multiset<typename iterator_traits<InputIterator>::value_type, Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-multiset(InputIterator, InputIterator, Compare const&, Allocator const&) ->
- multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
-
-template <typename InputIterator>
-multiset(ordered_range_t, InputIterator, InputIterator) ->
- multiset<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-multiset(ordered_range_t, InputIterator, InputIterator, Allocator const&) ->
- multiset< typename iterator_traits<InputIterator>::value_type
- , std::less<typename iterator_traits<InputIterator>::value_type>
- , Allocator>;
-
-template <typename InputIterator, typename Compare>
-multiset(ordered_range_t, InputIterator, InputIterator, Compare const&) ->
- multiset< typename iterator_traits<InputIterator>::value_type, Compare>;
-
-template <typename InputIterator, typename Compare, typename Allocator>
-multiset(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
- multiset<typename iterator_traits<InputIterator>::value_type, Compare, Allocator>;
-
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class Key, class Compare, class Allocator, class Options>
-struct has_trivial_destructor_after_move<boost::container::multiset<Key, Compare, Allocator, Options> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value &&
- ::boost::has_trivial_destructor_after_move<Compare>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-}}
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_SET_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/slist.hpp b/src/third_party/boost-1.68.0/boost/container/slist.hpp
deleted file mode 100644
index 2769070f773..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/slist.hpp
+++ /dev/null
@@ -1,1714 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2004-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_SLIST_HPP
-#define BOOST_CONTAINER_SLIST_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-#include <boost/container/throw_exception.hpp>
-// container/detail
-#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
-#include <boost/container/detail/compare_functors.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/node_alloc_holder.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/value_functors.hpp>
-// intrusive
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/slist.hpp>
-// move
-#include <boost/move/iterator.hpp>
-#include <boost/move/traits.hpp>
-#include <boost/move/utility_core.hpp>
-// move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/detail/move_helpers.hpp>
-// other
-#include <boost/core/no_exceptions_support.hpp>
-// std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-template <class T, class Allocator>
-class slist;
-
-namespace dtl {
-
-template<class VoidPointer>
-struct slist_hook
-{
- typedef typename dtl::bi::make_slist_base_hook
- <dtl::bi::void_pointer<VoidPointer>, dtl::bi::link_mode<dtl::bi::normal_link> >::type type;
-};
-
-template <class T, class VoidPointer>
-struct slist_node
- : public slist_hook<VoidPointer>::type
-{
- private:
- slist_node();
-
- public:
- typedef T value_type;
- typedef typename slist_hook<VoidPointer>::type hook_type;
-
- T m_data;
-
- T &get_data()
- { return this->m_data; }
-
- const T &get_data() const
- { return this->m_data; }
-};
-
-template <class T, class VoidPointer>
-struct iiterator_node_value_type< slist_node<T,VoidPointer> > {
- typedef T type;
-};
-
-template<class Allocator>
-struct intrusive_slist_type
-{
- typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef typename allocator_traits_type::value_type value_type;
- typedef typename boost::intrusive::pointer_traits
- <typename allocator_traits_type::pointer>::template
- rebind_pointer<void>::type
- void_pointer;
- typedef typename dtl::slist_node
- <value_type, void_pointer> node_type;
-
- typedef typename dtl::bi::make_slist
- <node_type
- ,dtl::bi::base_hook<typename slist_hook<void_pointer>::type>
- ,dtl::bi::constant_time_size<true>
- , dtl::bi::size_type
- <typename allocator_traits_type::size_type>
- >::type container_type;
- typedef container_type type ;
-};
-
-} //namespace dtl {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! An slist is a singly linked list: a list where each element is linked to the next
-//! element, but not to the previous element. That is, it is a Sequence that
-//! supports forward but not backward traversal, and (amortized) constant time
-//! insertion and removal of elements. Slists, like lists, have the important
-//! property that insertion and splicing do not invalidate iterators to list elements,
-//! and that even removal invalidates only the iterators that point to the elements
-//! that are removed. The ordering of iterators may be changed (that is,
-//! slist<T>::iterator might have a different predecessor or successor after a list
-//! operation than it did before), but the iterators themselves will not be invalidated
-//! or made to point to different elements unless that invalidation or mutation is explicit.
-//!
-//! The main difference between slist and list is that list's iterators are bidirectional
-//! iterators, while slist's iterators are forward iterators. This means that slist is
-//! less versatile than list; frequently, however, bidirectional iterators are
-//! unnecessary. You should usually use slist unless you actually need the extra
-//! functionality of list, because singly linked lists are smaller and faster than double
-//! linked lists.
-//!
-//! Important performance note: like every other Sequence, slist defines the member
-//! functions insert and erase. Using these member functions carelessly, however, can
-//! result in disastrously slow programs. The problem is that insert's first argument is
-//! an iterator p, and that it inserts the new element(s) before p. This means that
-//! insert must find the iterator just before p; this is a constant-time operation
-//! for list, since list has bidirectional iterators, but for slist it must find that
-//! iterator by traversing the list from the beginning up to p. In other words:
-//! insert and erase are slow operations anywhere but near the beginning of the slist.
-//!
-//! Slist provides the member functions insert_after and erase_after, which are constant
-//! time operations: you should always use insert_after and erase_after whenever
-//! possible. If you find that insert_after and erase_after aren't adequate for your
-//! needs, and that you often need to use insert and erase in the middle of the list,
-//! then you should probably use list instead of slist.
-//!
-//! \tparam T The type of object that is stored in the list
-//! \tparam Allocator The allocator used for all internal memory management
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class T, class Allocator = new_allocator<T> >
-#else
-template <class T, class Allocator>
-#endif
-class slist
- : protected dtl::node_alloc_holder
- <Allocator, typename dtl::intrusive_slist_type<Allocator>::type>
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef typename
- dtl::intrusive_slist_type<Allocator>::type Icont;
- typedef dtl::node_alloc_holder<Allocator, Icont> AllocHolder;
- typedef typename AllocHolder::NodePtr NodePtr;
- typedef typename AllocHolder::NodeAlloc NodeAlloc;
- typedef typename AllocHolder::ValAlloc ValAlloc;
- typedef typename AllocHolder::Node Node;
- typedef dtl::allocator_destroyer<NodeAlloc> Destroyer;
- typedef typename AllocHolder::alloc_version alloc_version;
- typedef boost::container::
- allocator_traits<Allocator> allocator_traits_type;
- typedef boost::container::equal_to_value<Allocator> equal_to_value_type;
-
- BOOST_COPYABLE_AND_MOVABLE(slist)
- typedef dtl::iterator_from_iiterator<typename Icont::iterator, false> iterator_impl;
- typedef dtl::iterator_from_iiterator<typename Icont::iterator, true > const_iterator_impl;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
-
- typedef T value_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(NodeAlloc) stored_allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
- typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
-
- public:
-
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Constructs a list taking the allocator as parameter.
- //!
- //! <b>Throws</b>: If allocator_type's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- slist() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : AllocHolder()
- {}
-
- //! <b>Effects</b>: Constructs a list taking the allocator as parameter.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- explicit slist(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
- : AllocHolder(a)
- {}
-
- //! <b>Effects</b>: Constructs a list
- //! and inserts n value-initialized value_types.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit slist(size_type n)
- : AllocHolder(allocator_type())
- { this->resize(n); }
-
- //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- slist(size_type n, const allocator_type &a)
- : AllocHolder(a)
- { this->resize(n); }
-
- //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit slist(size_type n, const value_type& x, const allocator_type& a = allocator_type())
- : AllocHolder(a)
- { this->insert_after(this->cbefore_begin(), n, x); }
-
- //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
- //! and inserts a copy of the range [first, last) in the list.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced InIt throws.
- //!
- //! <b>Complexity</b>: Linear to the range [first, last).
- template <class InpIt>
- slist(InpIt first, InpIt last, const allocator_type& a = allocator_type())
- : AllocHolder(a)
- { this->insert_after(this->cbefore_begin(), first, last); }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
- //! and inserts a copy of the range [il.begin(), il.end()) in the list.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
- slist(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
- : AllocHolder(a)
- { this->insert_after(this->cbefore_begin(), il.begin(), il.end()); }
-#endif
-
- //! <b>Effects</b>: Copy constructs a list.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- slist(const slist& x)
- : AllocHolder(x)
- { this->insert_after(this->cbefore_begin(), x.begin(), x.end()); }
-
- //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If allocator_type's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- slist(BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW
- : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x))
- {}
-
- //! <b>Effects</b>: Copy constructs a list using the specified allocator.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- slist(const slist& x, const allocator_type &a)
- : AllocHolder(a)
- { this->insert_after(this->cbefore_begin(), x.begin(), x.end()); }
-
- //! <b>Effects</b>: Move constructor using the specified allocator.
- //! Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If allocation or value_type's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
- slist(BOOST_RV_REF(slist) x, const allocator_type &a)
- : AllocHolder(a)
- {
- if(this->node_alloc() == x.node_alloc()){
- this->icont().swap(x.icont());
- }
- else{
- this->insert_after(this->cbefore_begin(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end()));
- }
- }
-
- //! <b>Effects</b>: Destroys the list. All stored values are destroyed
- //! and used memory is deallocated.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements.
- ~slist() BOOST_NOEXCEPT_OR_NOTHROW
- {} //AllocHolder clears the slist
-
- //! <b>Effects</b>: Makes *this contain the same elements as x.
- //!
- //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
- //! of each of x's elements.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in x.
- slist& operator= (BOOST_COPY_ASSIGN_REF(slist) x)
- {
- if (&x != this){
- NodeAlloc &this_alloc = this->node_alloc();
- const NodeAlloc &x_alloc = x.node_alloc();
- dtl::bool_<allocator_traits_type::
- propagate_on_container_copy_assignment::value> flag;
- if(flag && this_alloc != x_alloc){
- this->clear();
- }
- this->AllocHolder::copy_assign_alloc(x);
- this->assign(x.begin(), x.end());
- }
- return *this;
- }
-
- //! <b>Effects</b>: Makes *this contain the same elements as x.
- //!
- //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
- //! of each of x's elements.
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- slist& operator=(BOOST_RV_REF(slist) x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
- || allocator_traits_type::is_always_equal::value)
- {
- BOOST_ASSERT(this != &x);
- NodeAlloc &this_alloc = this->node_alloc();
- NodeAlloc &x_alloc = x.node_alloc();
- const bool propagate_alloc = allocator_traits_type::
- propagate_on_container_move_assignment::value;
- const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
- //Resources can be transferred if both allocators are
- //going to be equal after this function (either propagated or already equal)
- if(propagate_alloc || allocators_equal){
- //Destroy
- this->clear();
- //Move allocator if needed
- this->AllocHolder::move_assign_alloc(x);
- //Obtain resources
- this->icont() = boost::move(x.icont());
- }
- //Else do a one by one move
- else{
- this->assign( boost::make_move_iterator(x.begin())
- , boost::make_move_iterator(x.end()));
- }
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Makes *this contain the same elements as in il.
- //!
- //! <b>Postcondition</b>: this->size() == il.size(). *this contains a copy
- //! of each of il's elements.
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- slist& operator=(std::initializer_list<value_type> il)
- {
- assign(il.begin(), il.end());
- return *this;
- }
-#endif
-
- //! <b>Effects</b>: Assigns the n copies of val to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- void assign(size_type n, const T& val)
- {
- typedef constant_iterator<value_type, difference_type> cvalue_iterator;
- return this->assign(cvalue_iterator(val, n), cvalue_iterator());
- }
-
- //! <b>Effects</b>: Assigns the range [first, last) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing InpIt throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- template <class InpIt>
- void assign(InpIt first, InpIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_convertible<InpIt, size_type>::type * = 0
- #endif
- )
- {
- iterator end_n(this->end());
- iterator prev(this->before_begin());
- iterator node(this->begin());
- while (node != end_n && first != last){
- *node = *first;
- prev = node;
- ++node;
- ++first;
- }
- if (first != last)
- this->insert_after(prev, first, last);
- else
- this->erase_after(prev, end_n);
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assigns the range [il.begin(), il.end()) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to range [il.begin(), il.end()).
-
- void assign(std::initializer_list<value_type> il)
- {
- assign(il.begin(), il.end());
- }
-#endif
- //! <b>Effects</b>: Returns a copy of the internal allocator.
- //!
- //! <b>Throws</b>: If allocator's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return allocator_type(this->node_alloc()); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->node_alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->node_alloc(); }
-
- //////////////////////////////////////////////
- //
- // iterators
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns a non-dereferenceable iterator that,
- //! when incremented, yields begin(). This iterator may be used
- //! as the argument to insert_after, erase_after, etc.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator before_begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(end()); }
-
- //! <b>Effects</b>: Returns a non-dereferenceable const_iterator
- //! that, when incremented, yields begin(). This iterator may be used
- //! as the argument to insert_after, erase_after, etc.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator before_begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->cbefore_begin(); }
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->icont().begin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->cbegin(); }
-
- //! <b>Effects</b>: Returns an iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->icont().end()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->cend(); }
-
- //! <b>Effects</b>: Returns a non-dereferenceable const_iterator
- //! that, when incremented, yields begin(). This iterator may be used
- //! as the argument to insert_after, erase_after, etc.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbefore_begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(end()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(this->non_const_icont().begin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(this->non_const_icont().end()); }
-
- //! <b>Returns</b>: The iterator to the element before i in the sequence.
- //! Returns the end-iterator, if either i is the begin-iterator or the
- //! sequence is empty.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements before i.
- //!
- //! <b>Note</b>: Non-standard extension.
- iterator previous(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->icont().previous(p.get())); }
-
- //! <b>Returns</b>: The const_iterator to the element before i in the sequence.
- //! Returns the end-const_iterator, if either i is the begin-const_iterator or
- //! the sequence is empty.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements before i.
- //!
- //! <b>Note</b>: Non-standard extension.
- const_iterator previous(const_iterator p)
- { return const_iterator(this->icont().previous(p.get())); }
-
- //////////////////////////////////////////////
- //
- // capacity
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns true if the list contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- bool empty() const
- { return !this->size(); }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type size() const
- { return this->icont().size(); }
-
- //! <b>Effects</b>: Returns the largest possible size of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type max_size() const
- { return AllocHolder::max_size(); }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are value initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type new_size)
- {
- const_iterator last_pos;
- if(!priv_try_shrink(new_size, last_pos)){
- typedef value_init_construct_iterator<value_type, difference_type> value_init_iterator;
- this->insert_after(last_pos, value_init_iterator(new_size - this->size()), value_init_iterator());
- }
- }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are copy constructed from x.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type new_size, const T& x)
- {
- const_iterator last_pos;
- if(!priv_try_shrink(new_size, last_pos)){
- this->insert_after(last_pos, new_size, x);
- }
- }
-
- //////////////////////////////////////////////
- //
- // element access
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the first element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference front()
- {
- BOOST_ASSERT(!this->empty());
- return *this->begin();
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the first element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference front() const
- {
- BOOST_ASSERT(!this->empty());
- return *this->begin();
- }
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the front of the list
- //!
- //! <b>Returns</b>: A reference to the created object.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- template <class... Args>
- reference emplace_front(BOOST_FWD_REF(Args)... args)
- { return *this->emplace_after(this->cbefore_begin(), boost::forward<Args>(args)...); }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... after prev
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's in-place constructor throws.
- //!
- //! <b>Complexity</b>: Constant
- template <class... Args>
- iterator emplace_after(const_iterator prev, BOOST_FWD_REF(Args)... args)
- {
- NodePtr pnode(AllocHolder::create_node(boost::forward<Args>(args)...));
- return iterator(this->icont().insert_after(prev.get(), *pnode));
- }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_SLIST_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- reference emplace_front(BOOST_MOVE_UREF##N)\
- { return *this->emplace_after(this->cbefore_begin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace_after(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- NodePtr pnode (AllocHolder::create_node(BOOST_MOVE_FWD##N));\
- return iterator(this->icont().insert_after(p.get(), *pnode));\
- }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SLIST_EMPLACE_CODE)
- #undef BOOST_CONTAINER_SLIST_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x at the beginning of the list.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_front(const T &x);
-
- //! <b>Effects</b>: Constructs a new element in the beginning of the list
- //! and moves the resources of x to this new element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_front(T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front)
- #endif
-
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts a copy of the value after prev_p.
- //!
- //! <b>Returns</b>: An iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references of
- //! previous values.
- iterator insert_after(const_iterator prev_p, const T &x);
-
- //! <b>Requires</b>: prev_p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts a move constructed copy object from the value after the
- //! element pointed by prev_p.
- //!
- //! <b>Returns</b>: An iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references of
- //! previous values.
- iterator insert_after(const_iterator prev_p, T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_after, T, iterator, priv_insert_after, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: prev_p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts n copies of x after prev_p.
- //!
- //! <b>Returns</b>: an iterator to the last inserted element or prev_p if n is 0.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //!
- //! <b>Complexity</b>: Linear to n.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references of
- //! previous values.
- iterator insert_after(const_iterator prev_p, size_type n, const value_type& x)
- {
- typedef constant_iterator<value_type, difference_type> cvalue_iterator;
- return this->insert_after(prev_p, cvalue_iterator(x, n), cvalue_iterator());
- }
-
- //! <b>Requires</b>: prev_p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts the range pointed by [first, last) after prev_p.
- //!
- //! <b>Returns</b>: an iterator to the last inserted element or prev_p if first == last.
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced InpIt throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements inserted.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references of
- //! previous values.
- template <class InpIt>
- iterator insert_after(const_iterator prev_p, InpIt first, InpIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::enable_if_c
- < !dtl::is_convertible<InpIt, size_type>::value
- && (dtl::is_input_iterator<InpIt>::value
- || dtl::is_same<alloc_version, version_1>::value
- )
- >::type * = 0
- #endif
- )
- {
- iterator ret_it(prev_p.get());
- for (; first != last; ++first){
- ret_it = iterator(this->icont().insert_after(ret_it.get(), *this->create_node_from_it(first)));
- }
- return ret_it;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Requires</b>: prev_p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts the range pointed by [il.begin(), il.end()) after prev_p.
- //!
- //! <b>Returns</b>: an iterator to the last inserted element or prev_p if il.begin() == il.end().
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements inserted.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references of
- //! previous values.
- iterator insert_after(const_iterator prev_p, std::initializer_list<value_type> il)
- {
- return insert_after(prev_p, il.begin(), il.end());
- }
-#endif
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class FwdIt>
- iterator insert_after(const_iterator prev, FwdIt first, FwdIt last
- , typename dtl::enable_if_c
- < !dtl::is_convertible<FwdIt, size_type>::value
- && !(dtl::is_input_iterator<FwdIt>::value
- || dtl::is_same<alloc_version, version_1>::value
- )
- >::type * = 0
- )
- {
- //Optimized allocation and construction
- insertion_functor func(this->icont(), prev.get());
- this->allocate_many_and_construct(first, boost::container::iterator_distance(first, last), func);
- return iterator(func.inserted_first());
- }
- #endif
-
- //! <b>Effects</b>: Removes the first element from the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void pop_front()
- {
- BOOST_ASSERT(!this->empty());
- this->icont().pop_front_and_dispose(Destroyer(this->node_alloc()));
- }
-
- //! <b>Effects</b>: Erases the element after the element pointed by prev_p
- //! of the list.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Does not invalidate iterators or references to non erased elements.
- iterator erase_after(const_iterator prev_p)
- {
- return iterator(this->icont().erase_after_and_dispose(prev_p.get(), Destroyer(this->node_alloc())));
- }
-
- //! <b>Effects</b>: Erases the range (before_first, last) from
- //! the list.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of erased elements.
- //!
- //! <b>Note</b>: Does not invalidate iterators or references to non erased elements.
- iterator erase_after(const_iterator before_first, const_iterator last)
- {
- return iterator(this->icont().erase_after_and_dispose(before_first.get(), last.get(), Destroyer(this->node_alloc())));
- }
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements on *this and x.
- void swap(slist& x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value
- || allocator_traits_type::is_always_equal::value)
- {
- BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value ||
- allocator_traits_type::is_always_equal::value ||
- this->get_stored_allocator() == x.get_stored_allocator());
- AllocHolder::swap(x);
- }
-
- //! <b>Effects</b>: Erases all the elements of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the list.
- void clear()
- { this->icont().clear_and_dispose(Destroyer(this->node_alloc())); }
-
- //////////////////////////////////////////////
- //
- // slist operations
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: p must point to an element contained
- //! by the list. x != *this
- //!
- //! <b>Effects</b>: Transfers all the elements of list x to this list, after the
- //! the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: std::runtime_error if this' allocator and x's allocator
- //! are not equal.
- //!
- //! <b>Complexity</b>: Linear to the elements in x.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
- //! this list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_p, slist& x) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this != &x);
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().splice_after(prev_p.get(), x.icont());
- }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by the list. x != *this
- //!
- //! <b>Effects</b>: Transfers all the elements of list x to this list, after the
- //! the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: std::runtime_error if this' allocator and x's allocator
- //! are not equal.
- //!
- //! <b>Complexity</b>: Linear to the elements in x.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
- //! this list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice_after(prev_p, static_cast<slist&>(x)); }
-
- //! <b>Requires</b>: prev_p must be a valid iterator of this.
- //! i must point to an element contained in list x.
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! after the element pointed by prev_p.
- //! If prev_p == prev or prev_p == ++prev, this function is a null operation.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_p, slist& x, const_iterator prev) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().splice_after(prev_p.get(), x.icont(), prev.get());
- }
-
- //! <b>Requires</b>: prev_p must be a valid iterator of this.
- //! i must point to an element contained in list x.
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! after the element pointed by prev_p.
- //! If prev_p == prev or prev_p == ++prev, this function is a null operation.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x, const_iterator prev) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice_after(prev_p, static_cast<slist&>(x), prev); }
-
- //! <b>Requires</b>: prev_p must be a valid iterator of this.
- //! before_first and before_last must be valid iterators of x.
- //! prev_p must not be contained in [before_first, before_last) range.
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
- //! from list x to this list, after the element pointed by prev_p.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear to the number of transferred elements.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_p, slist& x,
- const_iterator before_first, const_iterator before_last) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().splice_after
- (prev_p.get(), x.icont(), before_first.get(), before_last.get());
- }
-
- //! <b>Requires</b>: prev_p must be a valid iterator of this.
- //! before_first and before_last must be valid iterators of x.
- //! prev_p must not be contained in [before_first, before_last) range.
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
- //! from list x to this list, after the element pointed by prev_p.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear to the number of transferred elements.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x,
- const_iterator before_first, const_iterator before_last) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice_after(prev_p, static_cast<slist&>(x), before_first, before_last); }
-
- //! <b>Requires</b>: prev_p must be a valid iterator of this.
- //! before_first and before_last must be valid iterators of x.
- //! prev_p must not be contained in [before_first, before_last) range.
- //! n == distance(before_first, before_last).
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
- //! from list x to this list, after the element pointed by prev_p.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_p, slist& x,
- const_iterator before_first, const_iterator before_last,
- size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().splice_after
- (prev_p.get(), x.icont(), before_first.get(), before_last.get(), n);
- }
-
- //! <b>Requires</b>: prev_p must be a valid iterator of this.
- //! before_first and before_last must be valid iterators of x.
- //! prev_p must not be contained in [before_first, before_last) range.
- //! n == distance(before_first, before_last).
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
- //! from list x to this list, after the element pointed by prev_p.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x,
- const_iterator before_first, const_iterator before_last,
- size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice_after(prev_p, static_cast<slist&>(x), before_first, before_last, n); }
-
- //! <b>Effects</b>: Removes all the elements that compare equal to value.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- void remove(const T& value)
- { this->remove_if(equal_to_value_type(value)); }
-
- //! <b>Effects</b>: Removes all the elements for which a specified
- //! predicate is satisfied.
- //!
- //! <b>Throws</b>: If pred throws.
- //!
- //! <b>Complexity</b>: Linear time. It performs exactly size() calls to the predicate.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template <class Pred>
- void remove_if(Pred pred)
- {
- typedef value_to_node_compare<Node, Pred> value_to_node_compare_type;
- this->icont().remove_and_dispose_if(value_to_node_compare_type(pred), Destroyer(this->node_alloc()));
- }
-
- //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
- //! elements that are equal from the list.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Complexity</b>: Linear time (size()-1 comparisons equality comparisons).
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- void unique()
- { this->unique(value_equal_t()); }
-
- //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
- //! elements that satisfy some binary predicate from the list.
- //!
- //! <b>Throws</b>: If pred throws.
- //!
- //! <b>Complexity</b>: Linear time (size()-1 comparisons calls to pred()).
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template <class Pred>
- void unique(Pred pred)
- {
- typedef value_to_node_compare<Node, Pred> value_to_node_compare_type;
- this->icont().unique_and_dispose(value_to_node_compare_type(pred), Destroyer(this->node_alloc()));
- }
-
- //! <b>Requires</b>: The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this according to std::less<value_type>. The merge is stable;
- //! that is, if an element from *this is equivalent to one from x, then the element
- //! from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- void merge(slist & x)
- { this->merge(x, value_less_t()); }
-
- //! <b>Requires</b>: The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this according to std::less<value_type>. The merge is stable;
- //! that is, if an element from *this is equivalent to one from x, then the element
- //! from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- void merge(BOOST_RV_REF(slist) x)
- { this->merge(static_cast<slist&>(x)); }
-
- //! <b>Requires</b>: p must be a comparison function that induces a strict weak
- //! ordering and both *this and x must be sorted according to that ordering
- //! The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this. The merge is stable; that is, if an element from *this is
- //! equivalent to one from x, then the element from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If comp throws.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- //!
- //! <b>Note</b>: Iterators and references to *this are not invalidated.
- template <class StrictWeakOrdering>
- void merge(slist& x, StrictWeakOrdering comp)
- {
- typedef value_to_node_compare<Node, StrictWeakOrdering> value_to_node_compare_type;
- BOOST_ASSERT(this->node_alloc() == x.node_alloc());
- this->icont().merge(x.icont(), value_to_node_compare_type(comp));
- }
-
- //! <b>Requires</b>: p must be a comparison function that induces a strict weak
- //! ordering and both *this and x must be sorted according to that ordering
- //! The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this. The merge is stable; that is, if an element from *this is
- //! equivalent to one from x, then the element from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If comp throws.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- //!
- //! <b>Note</b>: Iterators and references to *this are not invalidated.
- template <class StrictWeakOrdering>
- void merge(BOOST_RV_REF(slist) x, StrictWeakOrdering comp)
- { this->merge(static_cast<slist&>(x), comp); }
-
- //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
- //! The sort is stable, that is, the relative order of equivalent elements is preserved.
- //!
- //! <b>Throws</b>: If comparison throws.
- //!
- //! <b>Notes</b>: Iterators and references are not invalidated.
- //!
- //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
- //! is the list's size.
- void sort()
- { this->sort(value_less_t()); }
-
- //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
- //! The sort is stable, that is, the relative order of equivalent elements is preserved.
- //!
- //! <b>Throws</b>: If comp throws.
- //!
- //! <b>Notes</b>: Iterators and references are not invalidated.
- //!
- //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
- //! is the list's size.
- template <class StrictWeakOrdering>
- void sort(StrictWeakOrdering comp)
- {
- typedef value_to_node_compare<Node, StrictWeakOrdering> value_to_node_compare_type;
- // nothing if the slist has length 0 or 1.
- if (this->size() < 2)
- return;
- this->icont().sort(value_to_node_compare_type(comp));
- }
-
- //! <b>Effects</b>: Reverses the order of elements in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: This function is linear time.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated
- void reverse() BOOST_NOEXCEPT_OR_NOTHROW
- { this->icont().reverse(); }
-
- //////////////////////////////////////////////
- //
- // list compatibility interface
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... before p
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's in-place constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the elements before p
- template <class... Args>
- iterator emplace(const_iterator p, BOOST_FWD_REF(Args)... args)
- { return this->emplace_after(this->previous(p), boost::forward<Args>(args)...); }
-
- #else
-
- #define BOOST_CONTAINER_SLIST_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- return this->emplace_after(this->previous(p) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SLIST_EMPLACE_CODE)
- #undef BOOST_CONTAINER_SLIST_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of x before p.
- //!
- //! <b>Returns</b>: an iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the elements before p.
- iterator insert(const_iterator p, const T &x);
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a new element before p with x's resources.
- //!
- //! <b>Returns</b>: an iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Linear to the elements before p.
- iterator insert(const_iterator prev_p, T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts n copies of x before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if n == 0.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n plus linear to the elements before p.
- iterator insert(const_iterator p, size_type n, const value_type& x)
- {
- const_iterator prev(this->previous(p));
- this->insert_after(prev, n, x);
- return ++iterator(prev.get());
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [first, last) range before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced InpIt throws.
- //!
- //! <b>Complexity</b>: Linear to distance [first, last) plus
- //! linear to the elements before p.
- template <class InIter>
- iterator insert(const_iterator p, InIter first, InIter last)
- {
- const_iterator prev(this->previous(p));
- this->insert_after(prev, first, last);
- return ++iterator(prev.get());
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if il.begin() == il.end().
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced std::initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()) plus
- //! linear to the elements before p.
- iterator insert(const_iterator p, std::initializer_list<value_type> il)
- {
- return insert(p, il.begin(), il.end());
- }
-#endif
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Erases the element at p.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements before p.
- iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->erase_after(previous(p))); }
-
- //! <b>Requires</b>: first and last must be valid iterator to elements in *this.
- //!
- //! <b>Effects</b>: Erases the elements pointed by [first, last).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the distance between first and last plus
- //! linear to the elements before first.
- iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->erase_after(previous(first), last)); }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by the list. x != *this. this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
- //! the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear in distance(begin(), p), and linear in x.size().
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
- //! this list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, slist& x) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice_after(this->previous(p), x); }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by the list. x != *this. this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
- //! the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear in distance(begin(), p), and linear in x.size().
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
- //! this list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice(p, static_cast<slist&>(x)); }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. i must point to an element contained in list x.
- //! this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //! If p == i or p == ++i, this function is a null operation.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear in distance(begin(), p), and in distance(x.begin(), i).
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, slist& x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice_after(this->previous(p), x, x.previous(i)); }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. i must point to an element contained in list x.
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //! If p == i or p == ++i, this function is a null operation.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear in distance(begin(), p), and in distance(x.begin(), i).
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, BOOST_RV_REF(slist) x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice(p, static_cast<slist&>(x), i); }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. first and last must point to elements contained in list x.
- //!
- //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //! this' allocator and x's allocator shall compare equal.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear in distance(begin(), p), in distance(x.begin(), first),
- //! and in distance(first, last).
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, slist& x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice_after(this->previous(p), x, x.previous(first), x.previous(last)); }
-
- //! <b>Requires</b>: p must point to an element contained
- //! by this list. first and last must point to elements contained in list x.
- //! this' allocator and x's allocator shall compare equal
- //!
- //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
- //! before the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear in distance(begin(), p), in distance(x.begin(), first),
- //! and in distance(first, last).
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator p, BOOST_RV_REF(slist) x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- { this->splice(p, static_cast<slist&>(x), first, last); }
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const slist& x, const slist& y)
- { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const slist& x, const slist& y)
- { return !(x == y); }
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const slist& x, const slist& y)
- { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const slist& x, const slist& y)
- { return y < x; }
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const slist& x, const slist& y)
- { return !(y < x); }
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const slist& x, const slist& y)
- { return !(x < y); }
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(slist& x, slist& y)
- { x.swap(y); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
-
- void priv_push_front (const T &x)
- { this->insert_after(this->cbefore_begin(), x); }
-
- void priv_push_front (BOOST_RV_REF(T) x)
- { this->insert_after(this->cbefore_begin(), ::boost::move(x)); }
-
- bool priv_try_shrink(size_type new_size, const_iterator &last_pos)
- {
- typename Icont::iterator end_n(this->icont().end()), cur(this->icont().before_begin()), cur_next;
- while (++(cur_next = cur) != end_n && new_size > 0){
- --new_size;
- cur = cur_next;
- }
- last_pos = const_iterator(cur);
- if (cur_next != end_n){
- this->erase_after(last_pos, const_iterator(end_n));
- return true;
- }
- else{
- return false;
- }
- }
-
- template<class U>
- iterator priv_insert(const_iterator p, BOOST_FWD_REF(U) x)
- { return this->insert_after(previous(p), ::boost::forward<U>(x)); }
-
- template<class U>
- iterator priv_insert_after(const_iterator prev_p, BOOST_FWD_REF(U) x)
- { return iterator(this->icont().insert_after(prev_p.get(), *this->create_node(::boost::forward<U>(x)))); }
-
- class insertion_functor;
- friend class insertion_functor;
-
- class insertion_functor
- {
- Icont &icont_;
- typedef typename Icont::iterator iiterator;
- typedef typename Icont::const_iterator iconst_iterator;
- const iconst_iterator prev_;
- iiterator ret_;
-
- public:
- insertion_functor(Icont &icont, typename Icont::const_iterator prev)
- : icont_(icont), prev_(prev), ret_(prev.unconst())
- {}
-
- void operator()(Node &n)
- {
- ret_ = this->icont_.insert_after(prev_, n);
- }
-
- iiterator inserted_first() const
- { return ret_; }
- };
-
- //Functors for member algorithm defaults
- typedef value_less<value_type> value_less_t;
- typedef value_equal<value_type> value_equal_t;
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InpIt>
-slist(InpIt, InpIt) ->
- slist<typename iterator_traits<InpIt>::value_type>;
-
-template <typename InpIt, typename Allocator>
-slist(InpIt, InpIt, Allocator const&) ->
- slist<typename iterator_traits<InpIt>::value_type, Allocator>;
-
-#endif
-
-}}
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace boost {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class T, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::slist<T, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value;
-};
-
-namespace container {
-
-}} //namespace boost{ namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-// Specialization of insert_iterator so that insertions will be constant
-// time rather than linear time.
-
-#include <boost/move/detail/std_ns_begin.hpp>
-BOOST_CONTAINER_DOC1ST(namespace std {, BOOST_MOVE_STD_NS_BEG)
-
-//! A specialization of insert_iterator
-//! that works with slist
-template <class T, class Allocator>
-class insert_iterator<boost::container::slist<T, Allocator> >
-{
- private:
- typedef boost::container::slist<T, Allocator> Container;
- Container* container;
- typename Container::iterator iter;
-
- public:
- typedef Container container_type;
- typedef output_iterator_tag iterator_category;
- typedef void value_type;
- typedef void difference_type;
- typedef void pointer;
- typedef void reference;
-
- insert_iterator(Container& x,
- typename Container::iterator i,
- bool is_previous = false)
- : container(&x), iter(is_previous ? i : x.previous(i)){ }
-
- insert_iterator<Container>&
- operator=(const typename Container::value_type& value)
- {
- iter = container->insert_after(iter, value);
- return *this;
- }
- insert_iterator<Container>& operator*(){ return *this; }
- insert_iterator<Container>& operator++(){ return *this; }
- insert_iterator<Container>& operator++(int){ return *this; }
-};
-
-BOOST_CONTAINER_DOC1ST( }, BOOST_MOVE_STD_NS_END)
-#include <boost/move/detail/std_ns_end.hpp>
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_SLIST_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/small_vector.hpp b/src/third_party/boost-1.68.0/boost/container/small_vector.hpp
deleted file mode 100644
index 70704d6b63f..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/small_vector.hpp
+++ /dev/null
@@ -1,631 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_CONTAINER_SMALL_VECTOR_HPP
-#define BOOST_CONTAINER_CONTAINER_SMALL_VECTOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/vector.hpp>
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-// container/detail
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/version_type.hpp>
-
-//move
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/iterator.hpp>
-
-//move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-
-//std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list> //for std::initializer_list
-#endif
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-template <class T, class Allocator = new_allocator<T> >
-class small_vector_base;
-
-#endif
-
-//! A non-standard allocator used to implement `small_vector`.
-//! Users should never use it directly. It is described here
-//! for documentation purposes.
-//!
-//! This allocator inherits from a standard-conforming allocator
-//! and forwards member functions to the standard allocator except
-//! when internal storage is being used as memory source.
-//!
-//! This allocator is a "partially_propagable" allocator and
-//! defines `is_partially_propagable` as true_type.
-//!
-//! A partially propagable allocator means that not all storage
-//! allocatod by an instance of `small_vector_allocator` can be
-//! deallocated by another instance of this type, even if both
-//! instances compare equal or an instance is propagated to another
-//! one using the copy/move constructor or assignment. The storage that
-//! can never be propagated is identified by `storage_is_unpropagable(p)`.
-//!
-//! `boost::container::vector` supports partially propagable allocators
-//! fallbacking to deep copy/swap/move operations when internal storage
-//! is being used to store vector elements.
-//!
-//! `small_vector_allocator` assumes that will be instantiated as
-//! `boost::container::vector< T, small_vector_allocator<Allocator> >`
-//! and internal storage can be obtained downcasting that vector
-//! to `small_vector_base<T>`.
-template<class Allocator>
-class small_vector_allocator
- : public Allocator
-{
- typedef unsigned int allocation_type;
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
-
- BOOST_COPYABLE_AND_MOVABLE(small_vector_allocator)
-
- BOOST_CONTAINER_FORCEINLINE const Allocator &as_base() const
- { return static_cast<const Allocator&>(*this); }
-
- BOOST_CONTAINER_FORCEINLINE Allocator &as_base()
- { return static_cast<Allocator&>(*this); }
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef allocator_traits<Allocator> allocator_traits_type;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- typedef typename allocator_traits<Allocator>::value_type value_type;
- typedef typename allocator_traits<Allocator>::pointer pointer;
- typedef typename allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename allocator_traits<Allocator>::reference reference;
- typedef typename allocator_traits<Allocator>::const_reference const_reference;
- typedef typename allocator_traits<Allocator>::size_type size_type;
- typedef typename allocator_traits<Allocator>::difference_type difference_type;
- typedef typename allocator_traits<Allocator>::void_pointer void_pointer;
- typedef typename allocator_traits<Allocator>::const_void_pointer const_void_pointer;
-
- typedef typename allocator_traits<Allocator>::propagate_on_container_copy_assignment propagate_on_container_copy_assignment;
- typedef typename allocator_traits<Allocator>::propagate_on_container_move_assignment propagate_on_container_move_assignment;
- typedef typename allocator_traits<Allocator>::propagate_on_container_swap propagate_on_container_swap;
- //! An integral constant with member `value == false`
- typedef BOOST_CONTAINER_IMPDEF(dtl::bool_<false>) is_always_equal;
- //! An integral constant with member `value == true`
- typedef BOOST_CONTAINER_IMPDEF(dtl::bool_<true>) is_partially_propagable;
-
- BOOST_CONTAINER_DOCIGN(typedef dtl::version_type<small_vector_allocator BOOST_CONTAINER_I 1> version;)
-
- //!Obtains an small_vector_allocator that allocates
- //!objects of type T2
- template<class T2>
- struct rebind
- {
- typedef typename allocator_traits<Allocator>::template rebind_alloc<T2>::type other;
- };
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //!Constructor from arbitrary arguments
- template<class ...Args>
- BOOST_CONTAINER_FORCEINLINE explicit small_vector_allocator(BOOST_FWD_REF(Args) ...args)
- : Allocator(::boost::forward<Args>(args)...)
- {}
- #else
- #define BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE explicit small_vector_allocator(BOOST_MOVE_UREF##N)\
- : Allocator(BOOST_MOVE_FWD##N)\
- {}\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE)
- #undef BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE
- #endif
-
- //!Constructor from other small_vector_allocator.
- //!Never throws
- BOOST_CONTAINER_FORCEINLINE small_vector_allocator
- (const small_vector_allocator &other) BOOST_NOEXCEPT_OR_NOTHROW
- : Allocator(other.as_base())
- {}
-
- //!Move constructor from small_vector_allocator.
- //!Never throws
- BOOST_CONTAINER_FORCEINLINE small_vector_allocator
- (BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW
- : Allocator(::boost::move(other.as_base()))
- {}
-
- //!Constructor from related small_vector_allocator.
- //!Never throws
- template<class OtherAllocator>
- BOOST_CONTAINER_FORCEINLINE small_vector_allocator
- (const small_vector_allocator<OtherAllocator> &other) BOOST_NOEXCEPT_OR_NOTHROW
- : Allocator(other.as_base())
- {}
-
- //!Move constructor from related small_vector_allocator.
- //!Never throws
- template<class OtherAllocator>
- BOOST_CONTAINER_FORCEINLINE small_vector_allocator
- (BOOST_RV_REF(small_vector_allocator<OtherAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
- : Allocator(::boost::move(other.as_base()))
- {}
-
- //!Assignment from other small_vector_allocator.
- //!Never throws
- BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
- operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW
- { return static_cast<small_vector_allocator&>(this->Allocator::operator=(other.as_base())); }
-
- //!Move constructor from other small_vector_allocator.
- //!Never throws
- BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
- operator=(BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW
- { return static_cast<small_vector_allocator&>(this->Allocator::operator=(::boost::move(other.as_base()))); }
-
- //!Assignment from related small_vector_allocator.
- //!Never throws
- template<class OtherAllocator>
- BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
- operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator<OtherAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
- { return static_cast<small_vector_allocator&>(this->Allocator::operator=(other.as_base())); }
-
- //!Move assignment from related small_vector_allocator.
- //!Never throws
- template<class OtherAllocator>
- BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
- operator=(BOOST_RV_REF(small_vector_allocator<OtherAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
- { return static_cast<small_vector_allocator&>(this->Allocator::operator=(::boost::move(other.as_base()))); }
-
- //!Allocates storage from the standard-conforming allocator
- BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type count, const_void_pointer hint = const_void_pointer())
- { return allocator_traits_type::allocate(this->as_base(), count, hint); }
-
- //!Deallocates previously allocated memory.
- //!Never throws
- void deallocate(pointer ptr, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- if(!this->is_internal_storage(ptr))
- allocator_traits_type::deallocate(this->as_base(), ptr, n);
- }
-
- //!Returns the maximum number of elements that could be allocated.
- //!Never throws
- BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return allocator_traits_type::max_size(this->as_base()); }
-
- small_vector_allocator select_on_container_copy_construction() const
- { return small_vector_allocator(allocator_traits_type::select_on_container_copy_construction(this->as_base())); }
-
- bool storage_is_unpropagable(pointer p) const
- { return this->is_internal_storage(p) || allocator_traits_type::storage_is_unpropagable(this->as_base(), p); }
-
- //!Swaps two allocators, does nothing
- //!because this small_vector_allocator is stateless
- BOOST_CONTAINER_FORCEINLINE friend void swap(small_vector_allocator &l, small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW
- { boost::adl_move_swap(l.as_base(), r.as_base()); }
-
- //!An small_vector_allocator always compares to true, as memory allocated with one
- //!instance can be deallocated by another instance (except for unpropagable storage)
- BOOST_CONTAINER_FORCEINLINE friend bool operator==(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW
- { return allocator_traits_type::equal(l.as_base(), r.as_base()); }
-
- //!An small_vector_allocator always compares to false, as memory allocated with one
- //!instance can be deallocated by another instance
- BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW
- { return !(l == r); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- /*
- //!An advanced function that offers in-place expansion shrink to fit and new allocation
- //!capabilities. Memory allocated with this function can only be deallocated with deallocate()
- //!or deallocate_many().
- //!This function is available only with Version == 2
- pointer allocation_command(allocation_type command,
- size_type limit_size,
- size_type &prefer_in_recvd_out_size,
- pointer &reuse)
- { return allocator_traits_type::allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); }
-
- //!Returns maximum the number of objects the previously allocated memory
- //!pointed by p can hold.
- //!Memory must not have been allocated with
- //!allocate_one or allocate_individual.
- //!This function is available only with Version == 2
- size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
- { return allocator_traits_type::size(p); }
- */
- private:
- /*
- //!Allocates just one object. Memory allocated with this function
- //!must be deallocated only with deallocate_one().
- //!Throws bad_alloc if there is no enough memory
- //!This function is available only with Version == 2
- using Allocator::allocate_one;
- using Allocator::allocate_individual;
- using Allocator::deallocate_one;
- using Allocator::deallocate_individual;
- using Allocator::allocate_many;
- using Allocator::deallocate_many;*/
-
- BOOST_CONTAINER_FORCEINLINE bool is_internal_storage(pointer p) const
- { return this->internal_storage() == p; }
-
- pointer internal_storage() const
- {
- typedef typename Allocator::value_type value_type;
- typedef typename allocator_traits_type::size_type size_type;
- typedef vector_alloc_holder< small_vector_allocator<Allocator>, size_type > vector_alloc_holder_t;
- typedef vector<value_type, small_vector_allocator<Allocator> > vector_base;
- typedef small_vector_base<value_type, Allocator> derived_type;
- //
- const vector_alloc_holder_t &v_holder = static_cast<const vector_alloc_holder_t &>(*this);
- const vector_base &v_base = reinterpret_cast<const vector_base &>(v_holder);
- const derived_type &d_base = static_cast<const derived_type &>(v_base);
- return d_base.internal_storage();
- }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-//! This class consists of common code from all small_vector<T, N> types that don't depend on the
-//! "N" template parameter. This class is non-copyable and non-destructible, so this class typically
-//! used as reference argument to functions that read or write small vectors. Since `small_vector<T, N>`
-//! derives from `small_vector_base<T>`, the conversion to `small_vector_base` is implicit
-//! <pre>
-//!
-//! //Clients can pass any small_vector<Foo, N>.
-//! void read_any_small_vector_of_foo(const small_vector_base<Foo> &in_parameter);
-//!
-//! void modify_any_small_vector_of_foo(small_vector_base<Foo> &in_out_parameter);
-//!
-//! void some_function()
-//! {
-//!
-//! small_vector<Foo, 8> myvector;
-//!
-//! read_any_small_vector_of_foo(myvector); // Reads myvector
-//!
-//! modify_any_small_vector_of_foo(myvector); // Modifies myvector
-//!
-//! }
-//! </pre>
-//!
-//! All `boost::container:vector` member functions are inherited. See `vector` documentation for details.
-//!
-template <class T, class SecondaryAllocator>
-class small_vector_base
- : public vector<T, small_vector_allocator<SecondaryAllocator> >
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- public:
- //Make it public as it will be inherited by small_vector and container
- //must have this public member
- typedef typename allocator_traits<SecondaryAllocator>::pointer pointer;
-
- private:
- BOOST_COPYABLE_AND_MOVABLE(small_vector_base)
-
- friend class small_vector_allocator<SecondaryAllocator>;
-
- pointer internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- return boost::intrusive::pointer_traits<pointer>::pointer_to
- (*const_cast<T*>(static_cast<const T*>(static_cast<const void*>(m_storage_start.data))));
- }
-
- typedef vector<T, small_vector_allocator<SecondaryAllocator> > base_type;
- base_type &as_base() { return static_cast<base_type&>(*this); }
- const base_type &as_base() const { return static_cast<const base_type&>(*this); }
-
- public:
- typedef typename dtl::aligned_storage
- <sizeof(T), dtl::alignment_of<T>::value>::type storage_type;
- typedef small_vector_allocator<SecondaryAllocator> allocator_type;
-
- protected:
-
- BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t initial_capacity)
- : base_type(initial_capacity_t(), this->internal_storage(), initial_capacity)
- {}
-
- template<class AllocFwd>
- BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t capacity, BOOST_FWD_REF(AllocFwd) a)
- : base_type(initial_capacity_t(), this->internal_storage(), capacity, ::boost::forward<AllocFwd>(a))
- {}
-
- //~small_vector_base(){}
-
- private:
- //The only member
- storage_type m_storage_start;
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- BOOST_CONTAINER_FORCEINLINE small_vector_base& operator=(BOOST_COPY_ASSIGN_REF(small_vector_base) other)
- { return static_cast<small_vector_base&>(this->base_type::operator=(static_cast<base_type const&>(other))); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector_base& operator=(BOOST_RV_REF(small_vector_base) other)
- { return static_cast<small_vector_base&>(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); }
-
- BOOST_CONTAINER_FORCEINLINE void swap(small_vector_base &other)
- { return this->base_type::swap(other); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- protected:
- void move_construct_impl(base_type &x, const allocator_type &a)
- {
- if(base_type::is_propagable_from(x.get_stored_allocator(), x.data(), a, true)){
- this->steal_resources(x);
- }
- else{
- this->assign( boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.begin()))
- , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.end ()))
- );
- }
- }
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-/////////////////////////////////////////////////////
-//
-// small_vector_storage_calculator
-//
-/////////////////////////////////////////////////////
-template<std::size_t Needed, std::size_t Hdr, std::size_t SSize, bool NeedsZero = (0u == Needed || Needed <= Hdr)>
-struct small_vector_storage_calculator_helper
-{
- static const std::size_t value = (Needed - Hdr - 1u)/SSize + 1u;
-};
-
-template<std::size_t Needed, std::size_t Hdr, std::size_t SSize>
-struct small_vector_storage_calculator_helper<Needed, Hdr, SSize, true>
-{
- static const std::size_t value = 0u;
-};
-
-template<class Storage, class Allocator, class T, std::size_t N>
-struct small_vector_storage_calculator
-{
- typedef small_vector_base<T, Allocator> svh_type;
- typedef vector<T, small_vector_allocator<Allocator> > svhb_type;
- static const std::size_t s_align = dtl::alignment_of<Storage>::value;
- static const std::size_t s_size = sizeof(Storage);
- static const std::size_t svh_sizeof = sizeof(svh_type);
- static const std::size_t svhb_sizeof = sizeof(svhb_type);
- static const std::size_t s_start = ((svhb_sizeof-1)/s_align+1)*s_align;
- static const std::size_t header_bytes = svh_sizeof-s_start;
- static const std::size_t needed_bytes = sizeof(T)*N;
- static const std::size_t needed_extra_storages =
- small_vector_storage_calculator_helper<needed_bytes, header_bytes, s_size>::value;
-};
-
-/////////////////////////////////////////////////////
-//
-// small_vector_storage_definer
-//
-/////////////////////////////////////////////////////
-template<class Storage, std::size_t N>
-struct small_vector_storage
-{
- Storage m_rest_of_storage[N];
-};
-
-template<class Storage>
-struct small_vector_storage<Storage, 0>
-{};
-
-template<class Allocator, std::size_t N>
-struct small_vector_storage_definer
-{
- typedef typename Allocator::value_type value_type;
- typedef typename small_vector_base<value_type, Allocator>::storage_type storage_type;
- static const std::size_t needed_extra_storages =
- small_vector_storage_calculator<storage_type, Allocator, value_type, N>::needed_extra_storages;
- typedef small_vector_storage<storage_type, needed_extra_storages> type;
-};
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! small_vector is a vector-like container optimized for the case when it contains few elements.
-//! It contains some preallocated elements in-place, which can avoid the use of dynamic storage allocation
-//! when the actual number of elements is below that preallocated threshold.
-//!
-//! `small_vector<T, N, Allocator>` is convertible to `small_vector_base<T, Allocator>` that is independent
-//! from the preallocated element capacity, so client code does not need to be templated on that N argument.
-//!
-//! All `boost::container::vector` member functions are inherited. See `vector` documentation for details.
-//!
-//! \tparam T The type of object that is stored in the small_vector
-//! \tparam N The number of preallocated elements stored inside small_vector. It shall be less than Allocator::max_size();
-//! \tparam Allocator The allocator used for memory management when the number of elements exceeds N.
-template <class T, std::size_t N, class Allocator BOOST_CONTAINER_DOCONLY(= new_allocator<T>) >
-class small_vector : public small_vector_base<T, Allocator>
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- , private small_vector_storage_definer<Allocator, N>::type
- #endif
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef small_vector_base<T, Allocator> base_type;
- typedef typename small_vector_storage_definer<Allocator, N>::type remaining_storage_holder;
-
- BOOST_COPYABLE_AND_MOVABLE(small_vector)
-
- typedef allocator_traits<typename base_type::allocator_type> allocator_traits_type;
-
- public:
- typedef small_vector_storage_calculator< typename small_vector_base<T, Allocator>
- ::storage_type, Allocator, T, N> storage_test;
-
- static const std::size_t needed_extra_storages = storage_test::needed_extra_storages;
- static const std::size_t needed_bytes = storage_test::needed_bytes;
- static const std::size_t header_bytes = storage_test::header_bytes;
- static const std::size_t s_start = storage_test::s_start;
-
- typedef typename base_type::allocator_type allocator_type;
- typedef typename base_type::size_type size_type;
- typedef typename base_type::value_type value_type;
-
- BOOST_CONTAINER_FORCEINLINE static std::size_t internal_capacity()
- { return (sizeof(small_vector) - storage_test::s_start)/sizeof(T); }
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //! @brief The capacity/max size of the container
- static const size_type static_capacity = N;
-
- public:
- BOOST_CONTAINER_FORCEINLINE small_vector()
- BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : base_type(initial_capacity_t(), internal_capacity())
- {}
-
- BOOST_CONTAINER_FORCEINLINE explicit small_vector(const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- {}
-
- BOOST_CONTAINER_FORCEINLINE explicit small_vector(size_type n)
- : base_type(initial_capacity_t(), internal_capacity())
- { this->resize(n); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->resize(n); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t)
- : base_type(initial_capacity_t(), internal_capacity())
- { this->resize(n, default_init_t()); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t, const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->resize(n, default_init_t()); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v)
- : base_type(initial_capacity_t(), internal_capacity())
- { this->resize(n, v); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v, const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->resize(n, v); }
-
- template <class InIt>
- BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last
- BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
- < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
- BOOST_MOVE_I dtl::nat >::type * = 0)
- )
- : base_type(initial_capacity_t(), internal_capacity())
- { this->assign(first, last); }
-
- template <class InIt>
- BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last, const allocator_type& a
- BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
- < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
- BOOST_MOVE_I dtl::nat >::type * = 0)
- )
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->assign(first, last); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(const small_vector &other)
- : base_type( initial_capacity_t(), internal_capacity()
- , allocator_traits_type::select_on_container_copy_construction(other.get_stored_allocator()))
- { this->assign(other.cbegin(), other.cend()); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(const small_vector &other, const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->assign(other.cbegin(), other.cend()); }
-
- BOOST_CONTAINER_FORCEINLINE explicit small_vector(const base_type &other)
- : base_type( initial_capacity_t(), internal_capacity()
- , allocator_traits_type::select_on_container_copy_construction(other.get_stored_allocator()))
- { this->assign(other.cbegin(), other.cend()); }
-
- BOOST_CONTAINER_FORCEINLINE explicit small_vector(BOOST_RV_REF(base_type) other)
- : base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
- { this->move_construct_impl(other, other.get_stored_allocator()); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other)
- : base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
- { this->move_construct_impl(other, other.get_stored_allocator()); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other, const allocator_type &a)
- : base_type(initial_capacity_t(), internal_capacity(), a)
- { this->move_construct_impl(other, a); }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- BOOST_CONTAINER_FORCEINLINE small_vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
- : base_type(initial_capacity_t(), internal_capacity(), a)
- {
- this->assign(il.begin(), il.end());
- }
- #endif
-
- BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_COPY_ASSIGN_REF(small_vector) other)
- { return static_cast<small_vector&>(this->base_type::operator=(static_cast<base_type const&>(other))); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(small_vector) other)
- { return static_cast<small_vector&>(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector& operator=(const base_type &other)
- { return static_cast<small_vector&>(this->base_type::operator=(other)); }
-
- BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(base_type) other)
- { return static_cast<small_vector&>(this->base_type::operator=(boost::move(other))); }
-
- BOOST_CONTAINER_FORCEINLINE void swap(small_vector &other)
- { return this->base_type::swap(other); }
-};
-
-}}
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-/*
-namespace boost {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class T, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value;
-};
-
-}
-*/
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // #ifndef BOOST_CONTAINER_CONTAINER_SMALL_VECTOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/stable_vector.hpp b/src/third_party/boost-1.68.0/boost/container/stable_vector.hpp
deleted file mode 100644
index 41f45df8790..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/stable_vector.hpp
+++ /dev/null
@@ -1,2124 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2008-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-// Stable vector.
-//
-// Copyright 2008 Joaquin M Lopez Munoz.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_STABLE_VECTOR_HPP
-#define BOOST_CONTAINER_STABLE_VECTOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-#include <boost/container/throw_exception.hpp>
-// container/detail
-#include <boost/container/detail/addressof.hpp>
-#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
-#include <boost/container/detail/alloc_helpers.hpp>
-#include <boost/container/detail/allocator_version_traits.hpp>
-#include <boost/container/detail/construct_in_place.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/container/detail/placement_new.hpp>
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/container/detail/type_traits.hpp>
-// intrusive
-#include <boost/intrusive/pointer_traits.hpp>
-// intrusive/detail
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
-// move
-#include <boost/move/utility_core.hpp>
-#include <boost/move/iterator.hpp>
-#include <boost/move/adl_move_swap.hpp>
-// move/detail
-#include <boost/move/detail/move_helpers.hpp>
-// other
-#include <boost/assert.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-// std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- #include <boost/container/vector.hpp>
- //#define STABLE_VECTOR_ENABLE_INVARIANT_CHECKING
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace stable_vector_detail{
-
-template <class C>
-class clear_on_destroy
-{
- public:
- clear_on_destroy(C &c)
- : c_(c), do_clear_(true)
- {}
-
- void release()
- { do_clear_ = false; }
-
- ~clear_on_destroy()
- {
- if(do_clear_){
- c_.clear();
- c_.priv_clear_pool();
- }
- }
-
- private:
- clear_on_destroy(const clear_on_destroy &);
- clear_on_destroy &operator=(const clear_on_destroy &);
- C &c_;
- bool do_clear_;
-};
-
-template<typename Pointer>
-struct node;
-
-template<class VoidPtr>
-struct node_base
-{
- private:
- typedef typename boost::intrusive::
- pointer_traits<VoidPtr> void_ptr_traits;
- typedef typename void_ptr_traits::
- template rebind_pointer
- <node_base>::type node_base_ptr;
- typedef typename void_ptr_traits::
- template rebind_pointer
- <node_base_ptr>::type node_base_ptr_ptr;
-
- public:
- node_base(const node_base_ptr_ptr &n)
- : up(n)
- {}
-
- node_base()
- : up()
- {}
-
- node_base_ptr_ptr up;
-};
-
-template<typename Pointer>
-struct node
- : public node_base
- <typename ::boost::intrusive::pointer_traits<Pointer>::template
- rebind_pointer<void>::type
- >
-{
- private:
- node();
-
- public:
- typename ::boost::intrusive::pointer_traits<Pointer>::element_type value;
-};
-
-template<class VoidPtr, class VoidAllocator>
-struct index_traits
-{
- typedef boost::intrusive::
- pointer_traits
- <VoidPtr> void_ptr_traits;
- typedef stable_vector_detail::
- node_base<VoidPtr> node_base_type;
- typedef typename void_ptr_traits::template
- rebind_pointer<node_base_type>::type node_base_ptr;
- typedef typename void_ptr_traits::template
- rebind_pointer<node_base_ptr>::type node_base_ptr_ptr;
- typedef boost::intrusive::
- pointer_traits<node_base_ptr> node_base_ptr_traits;
- typedef boost::intrusive::
- pointer_traits<node_base_ptr_ptr> node_base_ptr_ptr_traits;
- typedef typename allocator_traits<VoidAllocator>::
- template portable_rebind_alloc
- <node_base_ptr>::type node_base_ptr_allocator;
- typedef ::boost::container::vector
- <node_base_ptr, node_base_ptr_allocator> index_type;
- typedef typename index_type::iterator index_iterator;
- typedef typename index_type::const_iterator const_index_iterator;
- typedef typename index_type::size_type size_type;
-
- static const size_type ExtraPointers = 3;
- //Stable vector stores metadata at the end of the index (node_base_ptr vector) with additional 3 pointers:
- // back() is this->index.back() - ExtraPointers;
- // end node index is *(this->index.end() - 3)
- // Node cache first is *(this->index.end() - 2);
- // Node cache last is this->index.back();
-
- static node_base_ptr_ptr ptr_to_node_base_ptr(node_base_ptr &n)
- { return node_base_ptr_ptr_traits::pointer_to(n); }
-
- static void fix_up_pointers(index_iterator first, index_iterator last)
- {
- while(first != last){
- typedef typename index_type::reference node_base_ptr_ref;
- node_base_ptr_ref nbp = *first;
- nbp->up = index_traits::ptr_to_node_base_ptr(nbp);
- ++first;
- }
- }
-
- static index_iterator get_fix_up_end(index_type &index)
- { return index.end() - (ExtraPointers - 1); }
-
- static void fix_up_pointers_from(index_type & index, index_iterator first)
- { index_traits::fix_up_pointers(first, index_traits::get_fix_up_end(index)); }
-
- static void readjust_end_node(index_type &index, node_base_type &end_node)
- {
- if(!index.empty()){
- index_iterator end_node_it(index_traits::get_fix_up_end(index));
- node_base_ptr &end_node_idx_ref = *(--end_node_it);
- end_node_idx_ref = node_base_ptr_traits::pointer_to(end_node);
- end_node.up = node_base_ptr_ptr_traits::pointer_to(end_node_idx_ref);
- }
- else{
- end_node.up = node_base_ptr_ptr();
- }
- }
-
- static void initialize_end_node(index_type &index, node_base_type &end_node, const size_type index_capacity_if_empty)
- {
- if(index.empty()){
- index.reserve(index_capacity_if_empty + ExtraPointers);
- index.resize(ExtraPointers);
- node_base_ptr &end_node_ref = *index.data();
- end_node_ref = node_base_ptr_traits::pointer_to(end_node);
- end_node.up = index_traits::ptr_to_node_base_ptr(end_node_ref);
- }
- }
-
- #ifdef STABLE_VECTOR_ENABLE_INVARIANT_CHECKING
- static bool invariants(index_type &index)
- {
- for( index_iterator it = index.begin()
- , it_end = index_traits::get_fix_up_end(index)
- ; it != it_end
- ; ++it){
- if((*it)->up != index_traits::ptr_to_node_base_ptr(*it)){
- return false;
- }
- }
- return true;
- }
- #endif //STABLE_VECTOR_ENABLE_INVARIANT_CHECKING
-};
-
-} //namespace stable_vector_detail
-
-template<typename Pointer, bool IsConst>
-class stable_vector_iterator
-{
- typedef boost::intrusive::pointer_traits<Pointer> non_const_ptr_traits;
- public:
- typedef std::random_access_iterator_tag iterator_category;
- typedef typename non_const_ptr_traits::element_type value_type;
- typedef typename non_const_ptr_traits::difference_type difference_type;
- typedef typename ::boost::container::dtl::if_c
- < IsConst
- , typename non_const_ptr_traits::template
- rebind_pointer<const value_type>::type
- , Pointer
- >::type pointer;
- typedef boost::intrusive::pointer_traits<pointer> ptr_traits;
- typedef typename ptr_traits::reference reference;
-
- private:
- typedef typename non_const_ptr_traits::template
- rebind_pointer<void>::type void_ptr;
- typedef stable_vector_detail::node<Pointer> node_type;
- typedef stable_vector_detail::node_base<void_ptr> node_base_type;
- typedef typename non_const_ptr_traits::template
- rebind_pointer<node_type>::type node_ptr;
- typedef boost::intrusive::
- pointer_traits<node_ptr> node_ptr_traits;
- typedef typename non_const_ptr_traits::template
- rebind_pointer<node_base_type>::type node_base_ptr;
- typedef typename non_const_ptr_traits::template
- rebind_pointer<node_base_ptr>::type node_base_ptr_ptr;
-
- node_base_ptr m_pn;
-
- public:
-
- explicit stable_vector_iterator(node_base_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
- : m_pn(p)
- {}
-
- stable_vector_iterator() BOOST_NOEXCEPT_OR_NOTHROW
- : m_pn() //Value initialization to achieve "null iterators" (N3644)
- {}
-
- stable_vector_iterator(stable_vector_iterator<Pointer, false> const& other) BOOST_NOEXCEPT_OR_NOTHROW
- : m_pn(other.node_pointer())
- {}
-
- node_ptr node_pointer() const BOOST_NOEXCEPT_OR_NOTHROW
- { return node_ptr_traits::static_cast_from(m_pn); }
-
- public:
- //Pointer like operators
- reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
- { return node_pointer()->value; }
-
- pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
- { return ptr_traits::pointer_to(this->operator*()); }
-
- //Increment / Decrement
- stable_vector_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
- {
- node_base_ptr_ptr p(this->m_pn->up);
- this->m_pn = *(++p);
- return *this;
- }
-
- stable_vector_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
- { stable_vector_iterator tmp(*this); ++*this; return stable_vector_iterator(tmp); }
-
- stable_vector_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
- {
- node_base_ptr_ptr p(this->m_pn->up);
- this->m_pn = *(--p);
- return *this;
- }
-
- stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
- { stable_vector_iterator tmp(*this); --*this; return stable_vector_iterator(tmp); }
-
- reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
- { return node_ptr_traits::static_cast_from(this->m_pn->up[off])->value; }
-
- stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
- {
- if(off) this->m_pn = this->m_pn->up[off];
- return *this;
- }
-
- friend stable_vector_iterator operator+(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
- {
- stable_vector_iterator tmp(left);
- tmp += off;
- return tmp;
- }
-
- friend stable_vector_iterator operator+(difference_type off, const stable_vector_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
- {
- stable_vector_iterator tmp(right);
- tmp += off;
- return tmp;
- }
-
- stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
- { *this += -off; return *this; }
-
- friend stable_vector_iterator operator-(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
- {
- stable_vector_iterator tmp(left);
- tmp -= off;
- return tmp;
- }
-
- friend difference_type operator-(const stable_vector_iterator &left, const stable_vector_iterator &right) BOOST_NOEXCEPT_OR_NOTHROW
- { return left.m_pn->up - right.m_pn->up; }
-
- //Comparison operators
- friend bool operator== (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_pn == r.m_pn; }
-
- friend bool operator!= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_pn != r.m_pn; }
-
- friend bool operator< (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_pn->up < r.m_pn->up; }
-
- friend bool operator<= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_pn->up <= r.m_pn->up; }
-
- friend bool operator> (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_pn->up > r.m_pn->up; }
-
- friend bool operator>= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_pn->up >= r.m_pn->up; }
-};
-
- #if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING)
-
- #define STABLE_VECTOR_CHECK_INVARIANT \
- invariant_checker BOOST_JOIN(check_invariant_,__LINE__)(*this); \
- BOOST_JOIN(check_invariant_,__LINE__).touch();
-
- #else //STABLE_VECTOR_ENABLE_INVARIANT_CHECKING
-
- #define STABLE_VECTOR_CHECK_INVARIANT
-
- #endif //#if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING)
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! Originally developed by Joaquin M. Lopez Munoz, stable_vector is a std::vector
-//! drop-in replacement implemented as a node container, offering iterator and reference
-//! stability.
-//!
-//! Here are the details taken from the author's blog
-//! (<a href="http://bannalia.blogspot.com/2008/09/introducing-stablevector.html" >
-//! Introducing stable_vector</a>):
-//!
-//! We present stable_vector, a fully STL-compliant stable container that provides
-//! most of the features of std::vector except element contiguity.
-//!
-//! General properties: stable_vector satisfies all the requirements of a container,
-//! a reversible container and a sequence and provides all the optional operations
-//! present in std::vector. Like std::vector, iterators are random access.
-//! stable_vector does not provide element contiguity; in exchange for this absence,
-//! the container is stable, i.e. references and iterators to an element of a stable_vector
-//! remain valid as long as the element is not erased, and an iterator that has been
-//! assigned the return value of end() always remain valid until the destruction of
-//! the associated stable_vector.
-//!
-//! Operation complexity: The big-O complexities of stable_vector operations match
-//! exactly those of std::vector. In general, insertion/deletion is constant time at
-//! the end of the sequence and linear elsewhere. Unlike std::vector, stable_vector
-//! does not internally perform any value_type destruction, copy or assignment
-//! operations other than those exactly corresponding to the insertion of new
-//! elements or deletion of stored elements, which can sometimes compensate in terms
-//! of performance for the extra burden of doing more pointer manipulation and an
-//! additional allocation per element.
-//!
-//! Exception safety: As stable_vector does not internally copy elements around, some
-//! operations provide stronger exception safety guarantees than in std::vector.
-//!
-//! \tparam T The type of object that is stored in the stable_vector
-//! \tparam Allocator The allocator used for all internal memory management
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class T, class Allocator = new_allocator<T> >
-#else
-template <class T, class Allocator>
-#endif
-class stable_vector
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef allocator_traits<Allocator> allocator_traits_type;
- typedef boost::intrusive::
- pointer_traits
- <typename allocator_traits_type::pointer> ptr_traits;
- typedef typename ptr_traits::
- template rebind_pointer<void>::type void_ptr;
- typedef typename allocator_traits_type::
- template portable_rebind_alloc
- <void>::type void_allocator_type;
- typedef stable_vector_detail::index_traits
- <void_ptr, void_allocator_type> index_traits_type;
- typedef typename index_traits_type::node_base_type node_base_type;
- typedef typename index_traits_type::node_base_ptr node_base_ptr;
- typedef typename index_traits_type::
- node_base_ptr_ptr node_base_ptr_ptr;
- typedef typename index_traits_type::
- node_base_ptr_traits node_base_ptr_traits;
- typedef typename index_traits_type::
- node_base_ptr_ptr_traits node_base_ptr_ptr_traits;
- typedef typename index_traits_type::index_type index_type;
- typedef typename index_traits_type::index_iterator index_iterator;
- typedef typename index_traits_type::
- const_index_iterator const_index_iterator;
- typedef stable_vector_detail::node
- <typename ptr_traits::pointer> node_type;
- typedef typename ptr_traits::template
- rebind_pointer<node_type>::type node_ptr;
- typedef boost::intrusive::
- pointer_traits<node_ptr> node_ptr_traits;
- typedef typename ptr_traits::template
- rebind_pointer<const node_type>::type const_node_ptr;
- typedef boost::intrusive::
- pointer_traits<const_node_ptr> const_node_ptr_traits;
- typedef typename node_ptr_traits::reference node_reference;
- typedef typename const_node_ptr_traits::reference const_node_reference;
-
- typedef ::boost::container::dtl::integral_constant
- <unsigned, boost::container::dtl::
- version<Allocator>::value> alloc_version;
- typedef typename allocator_traits_type::
- template portable_rebind_alloc
- <node_type>::type node_allocator_type;
-
- typedef ::boost::container::dtl::
- allocator_version_traits<node_allocator_type> allocator_version_traits_t;
- typedef typename allocator_version_traits_t::multiallocation_chain multiallocation_chain;
-
- node_ptr allocate_one()
- { return allocator_version_traits_t::allocate_one(this->priv_node_alloc()); }
-
- void deallocate_one(const node_ptr &p)
- { allocator_version_traits_t::deallocate_one(this->priv_node_alloc(), p); }
-
- void allocate_individual(typename allocator_traits_type::size_type n, multiallocation_chain &m)
- { allocator_version_traits_t::allocate_individual(this->priv_node_alloc(), n, m); }
-
- void deallocate_individual(multiallocation_chain &holder)
- { allocator_version_traits_t::deallocate_individual(this->priv_node_alloc(), holder); }
-
- friend class stable_vector_detail::clear_on_destroy<stable_vector>;
- typedef stable_vector_iterator
- < typename allocator_traits<Allocator>::pointer
- , false> iterator_impl;
- typedef stable_vector_iterator
- < typename allocator_traits<Allocator>::pointer
- , true> const_iterator_impl;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- public:
-
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
- typedef T value_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef node_allocator_type stored_allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
- typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(stable_vector)
- static const size_type ExtraPointers = index_traits_type::ExtraPointers;
-
- class insert_rollback;
- friend class insert_rollback;
-
- class push_back_rollback;
- friend class push_back_rollback;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Default constructs a stable_vector.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- stable_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : internal_data(), index()
- {
- STABLE_VECTOR_CHECK_INVARIANT;
- }
-
- //! <b>Effects</b>: Constructs a stable_vector taking the allocator as parameter.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- explicit stable_vector(const allocator_type& al) BOOST_NOEXCEPT_OR_NOTHROW
- : internal_data(al), index(al)
- {
- STABLE_VECTOR_CHECK_INVARIANT;
- }
-
- //! <b>Effects</b>: Constructs a stable_vector
- //! and inserts n value initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit stable_vector(size_type n)
- : internal_data(), index()
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->resize(n);
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-
- //! <b>Effects</b>: Constructs a stable_vector
- //! and inserts n default initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- //!
- //! <b>Note</b>: Non-standard extension
- stable_vector(size_type n, default_init_t)
- : internal_data(), index()
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->resize(n, default_init);
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-
- //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
- //! and inserts n value initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit stable_vector(size_type n, const allocator_type &a)
- : internal_data(), index(a)
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->resize(n);
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-
- //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
- //! and inserts n default initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- //!
- //! <b>Note</b>: Non-standard extension
- stable_vector(size_type n, default_init_t, const allocator_type &a)
- : internal_data(), index(a)
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->resize(n, default_init);
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-
- //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's default or copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- stable_vector(size_type n, const T& t, const allocator_type& al = allocator_type())
- : internal_data(al), index(al)
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->insert(this->cend(), n, t);
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-
- //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
- //! and inserts a copy of the range [first, last) in the stable_vector.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced InIt throws.
- //!
- //! <b>Complexity</b>: Linear to the range [first, last).
- template <class InputIterator>
- stable_vector(InputIterator first,InputIterator last, const allocator_type& al = allocator_type())
- : internal_data(al), index(al)
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->insert(this->cend(), first, last);
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-
- //! <b>Effects</b>: Copy constructs a stable_vector.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- stable_vector(const stable_vector& x)
- : internal_data(allocator_traits<node_allocator_type>::
- select_on_container_copy_construction(x.priv_node_alloc()))
- , index(allocator_traits<allocator_type>::
- select_on_container_copy_construction(x.index.get_stored_allocator()))
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->insert(this->cend(), x.begin(), x.end());
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
- //! and inserts a copy of the range [il.begin(), il.last()) in the stable_vector
- //!
- //! <b>Throws</b>: If allocator_type's default constructor
- //! throws or T's constructor taking a dereferenced initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
- stable_vector(std::initializer_list<value_type> il, const allocator_type& l = allocator_type())
- : internal_data(l), index(l)
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- insert(cend(), il.begin(), il.end());
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-#endif
-
- //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If allocator_type's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- stable_vector(BOOST_RV_REF(stable_vector) x) BOOST_NOEXCEPT_OR_NOTHROW
- : internal_data(boost::move(x.priv_node_alloc())), index(boost::move(x.index))
- {
- this->priv_swap_members(x);
- }
-
- //! <b>Effects</b>: Copy constructs a stable_vector using the specified allocator.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- stable_vector(const stable_vector& x, const allocator_type &a)
- : internal_data(a), index(a)
- {
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->insert(this->cend(), x.begin(), x.end());
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
-
- //! <b>Effects</b>: Move constructor using the specified allocator.
- //! Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If allocator_type's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise
- stable_vector(BOOST_RV_REF(stable_vector) x, const allocator_type &a)
- : internal_data(a), index(a)
- {
- if(this->priv_node_alloc() == x.priv_node_alloc()){
- this->index.swap(x.index);
- this->priv_swap_members(x);
- }
- else{
- stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
- this->insert(this->cend(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end()));
- STABLE_VECTOR_CHECK_INVARIANT;
- cod.release();
- }
- }
-
- //! <b>Effects</b>: Destroys the stable_vector. All stored values are destroyed
- //! and used memory is deallocated.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements.
- ~stable_vector()
- {
- this->clear();
- this->priv_clear_pool();
- }
-
- //! <b>Effects</b>: Makes *this contain the same elements as x.
- //!
- //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
- //! of each of x's elements.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in x.
- stable_vector& operator=(BOOST_COPY_ASSIGN_REF(stable_vector) x)
- {
- STABLE_VECTOR_CHECK_INVARIANT;
- if (&x != this){
- node_allocator_type &this_alloc = this->priv_node_alloc();
- const node_allocator_type &x_alloc = x.priv_node_alloc();
- dtl::bool_<allocator_traits_type::
- propagate_on_container_copy_assignment::value> flag;
- if(flag && this_alloc != x_alloc){
- this->clear();
- this->shrink_to_fit();
- }
- dtl::assign_alloc(this->priv_node_alloc(), x.priv_node_alloc(), flag);
- dtl::assign_alloc(this->index.get_stored_allocator(), x.index.get_stored_allocator(), flag);
- this->assign(x.begin(), x.end());
- }
- return *this;
- }
-
- //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
- //!
- //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
- //! before the function.
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or T's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- stable_vector& operator=(BOOST_RV_REF(stable_vector) x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
- || allocator_traits_type::is_always_equal::value)
- {
- //for move constructor, no aliasing (&x != this) is assummed.
- BOOST_ASSERT(this != &x);
- node_allocator_type &this_alloc = this->priv_node_alloc();
- node_allocator_type &x_alloc = x.priv_node_alloc();
- const bool propagate_alloc = allocator_traits_type::
- propagate_on_container_move_assignment::value;
- dtl::bool_<propagate_alloc> flag;
- const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
- //Resources can be transferred if both allocators are
- //going to be equal after this function (either propagated or already equal)
- if(propagate_alloc || allocators_equal){
- STABLE_VECTOR_CHECK_INVARIANT
- //Destroy objects but retain memory in case x reuses it in the future
- this->clear();
- //Move allocator if needed
- dtl::move_alloc(this_alloc, x_alloc, flag);
- //Take resources
- this->index.swap(x.index);
- this->priv_swap_members(x);
- }
- //Else do a one by one move
- else{
- this->assign( boost::make_move_iterator(x.begin())
- , boost::make_move_iterator(x.end()));
- }
- return *this;
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Make *this container contains elements from il.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
- stable_vector& operator=(std::initializer_list<value_type> il)
- {
- STABLE_VECTOR_CHECK_INVARIANT;
- assign(il.begin(), il.end());
- return *this;
- }
-#endif
-
- //! <b>Effects</b>: Assigns the n copies of val to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- void assign(size_type n, const T& t)
- {
- typedef constant_iterator<value_type, difference_type> cvalue_iterator;
- this->assign(cvalue_iterator(t, n), cvalue_iterator());
- }
-
- //! <b>Effects</b>: Assigns the the range [first, last) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing InpIt throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- template<typename InputIterator>
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- typename dtl::disable_if_convertible<InputIterator, size_type>::type
- #else
- void
- #endif
- assign(InputIterator first,InputIterator last)
- {
- STABLE_VECTOR_CHECK_INVARIANT;
- iterator first1 = this->begin();
- iterator last1 = this->end();
- for ( ; first1 != last1 && first != last; ++first1, ++first)
- *first1 = *first;
- if (first == last){
- this->erase(first1, last1);
- }
- else{
- this->insert(last1, first, last);
- }
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing initializer_list iterator throws.
- //!
- void assign(std::initializer_list<value_type> il)
- {
- STABLE_VECTOR_CHECK_INVARIANT;
- assign(il.begin(), il.end());
- }
-#endif
-
- //! <b>Effects</b>: Returns a copy of the internal allocator.
- //!
- //! <b>Throws</b>: If allocator's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const
- { return this->priv_node_alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_node_alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_node_alloc(); }
-
- //////////////////////////////////////////////
- //
- // iterators
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return (this->index.empty()) ? this->end(): iterator(node_ptr_traits::static_cast_from(this->index.front())); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return (this->index.empty()) ? this->cend() : const_iterator(node_ptr_traits::static_cast_from(this->index.front())) ; }
-
- //! <b>Effects</b>: Returns an iterator to the end of the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->priv_get_end_node()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(this->priv_get_end_node()); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(this->end()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->end()); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(this->begin()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->begin()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->begin(); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->end(); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->rbegin(); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crend()const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->rend(); }
-
- //////////////////////////////////////////////
- //
- // capacity
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns true if the stable_vector contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->index.size() <= ExtraPointers; }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- const size_type index_size = this->index.size();
- return (index_size - ExtraPointers) & (size_type(0u) -size_type(index_size != 0));
- }
-
- //! <b>Effects</b>: Returns the largest possible size of the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->index.max_size() - ExtraPointers; }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are value initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's value initialization throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type n)
- {
- typedef value_init_construct_iterator<value_type, difference_type> value_init_iterator;
- STABLE_VECTOR_CHECK_INVARIANT;
- if(n > this->size())
- this->insert(this->cend(), value_init_iterator(n - this->size()), value_init_iterator());
- else if(n < this->size())
- this->erase(this->cbegin() + n, this->cend());
- }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are default initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's default initialization throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- //!
- //! <b>Note</b>: Non-standard extension
- void resize(size_type n, default_init_t)
- {
- typedef default_init_construct_iterator<value_type, difference_type> default_init_iterator;
- STABLE_VECTOR_CHECK_INVARIANT;
- if(n > this->size())
- this->insert(this->cend(), default_init_iterator(n - this->size()), default_init_iterator());
- else if(n < this->size())
- this->erase(this->cbegin() + n, this->cend());
- }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are copy constructed from x.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type n, const T& t)
- {
- STABLE_VECTOR_CHECK_INVARIANT;
- if(n > this->size())
- this->insert(this->cend(), n - this->size(), t);
- else if(n < this->size())
- this->erase(this->cbegin() + n, this->cend());
- }
-
- //! <b>Effects</b>: Number of elements for which memory has been allocated.
- //! capacity() is always greater than or equal to size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- const size_type index_size = this->index.size();
- BOOST_ASSERT(!index_size || index_size >= ExtraPointers);
- const size_type node_extra_capacity = this->internal_data.pool_size;
- //Pool count must be less than index capacity, as index is a vector
- BOOST_ASSERT(node_extra_capacity <= (this->index.capacity()- index_size));
- const size_type index_offset =
- (node_extra_capacity - ExtraPointers) & (size_type(0u) - size_type(index_size != 0));
- return index_size + index_offset;
- }
-
- //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
- //! effect. Otherwise, it is a request for allocation of additional memory.
- //! If the request is successful, then capacity() is greater than or equal to
- //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
- //!
- //! <b>Throws</b>: If memory allocation allocation throws.
- void reserve(size_type n)
- {
- STABLE_VECTOR_CHECK_INVARIANT;
- if(n > this->max_size()){
- throw_length_error("stable_vector::reserve max_size() exceeded");
- }
-
- size_type sz = this->size();
- size_type old_capacity = this->capacity();
- if(n > old_capacity){
- index_traits_type::initialize_end_node(this->index, this->internal_data.end_node, n);
- const void * old_ptr = &index[0];
- this->index.reserve(n + ExtraPointers);
- bool realloced = &index[0] != old_ptr;
- //Fix the pointers for the newly allocated buffer
- if(realloced){
- index_traits_type::fix_up_pointers_from(this->index, this->index.begin());
- }
- //Now fill pool if data is not enough
- if((n - sz) > this->internal_data.pool_size){
- this->priv_increase_pool((n - sz) - this->internal_data.pool_size);
- }
- }
- }
-
- //! <b>Effects</b>: Tries to deallocate the excess of memory created
- //! with previous allocations. The size of the stable_vector is unchanged
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Linear to size().
- void shrink_to_fit()
- {
- if(this->capacity()){
- //First empty allocated node pool
- this->priv_clear_pool();
- //If empty completely destroy the index, let's recover default-constructed state
- if(this->empty()){
- this->index.clear();
- this->index.shrink_to_fit();
- this->internal_data.end_node.up = node_base_ptr_ptr();
- }
- //Otherwise, try to shrink-to-fit the index and readjust pointers if necessary
- else{
- const void* old_ptr = &index[0];
- this->index.shrink_to_fit();
- bool realloced = &index[0] != old_ptr;
- //Fix the pointers for the newly allocated buffer
- if(realloced){
- index_traits_type::fix_up_pointers_from(this->index, this->index.begin());
- }
- }
- }
- }
-
- //////////////////////////////////////////////
- //
- // element access
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the first
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference front() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return static_cast<node_reference>(*this->index.front()).value;
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the first
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return static_cast<const_node_reference>(*this->index.front()).value;
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the last
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return static_cast<node_reference>(*this->index[this->size()-1u]).value;
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the last
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return static_cast<const_node_reference>(*this->index[this->size()-1u]).value;
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() > n);
- return static_cast<node_reference>(*this->index[n]).value;
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a const reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() > n);
- return static_cast<const_node_reference>(*this->index[n]).value;
- }
-
- //! <b>Requires</b>: size() >= n.
- //!
- //! <b>Effects</b>: Returns an iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() >= n);
- return (this->index.empty()) ? this->end() : iterator(node_ptr_traits::static_cast_from(this->index[n]));
- }
-
- //! <b>Requires</b>: size() >= n.
- //!
- //! <b>Effects</b>: Returns a const_iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() >= n);
- return (this->index.empty()) ? this->cend() : iterator(node_ptr_traits::static_cast_from(this->index[n]));
- }
-
- //! <b>Requires</b>: begin() <= p <= end().
- //!
- //! <b>Effects</b>: Returns the index of the element pointed by p
- //! and size() if p == end().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_index_of(p.node_pointer()); }
-
- //! <b>Requires</b>: begin() <= p <= end().
- //!
- //! <b>Effects</b>: Returns the index of the element pointed by p
- //! and size() if p == end().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_index_of(p.node_pointer()); }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: std::range_error if n >= size()
- //!
- //! <b>Complexity</b>: Constant.
- reference at(size_type n)
- {
- if(n >= this->size()){
- throw_out_of_range("vector::at invalid subscript");
- }
- return operator[](n);
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a const reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: std::range_error if n >= size()
- //!
- //! <b>Complexity</b>: Constant.
- const_reference at(size_type n)const
- {
- if(n >= this->size()){
- throw_out_of_range("vector::at invalid subscript");
- }
- return operator[](n);
- }
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the end of the stable_vector.
- //!
- //! <b>Returns</b>: A reference to the created object.
- //!
- //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- template<class ...Args>
- reference emplace_back(Args &&...args)
- {
- typedef emplace_functor<Args...> EmplaceFunctor;
- typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;
- EmplaceFunctor &&ef = EmplaceFunctor(boost::forward<Args>(args)...);
- return *this->insert(this->cend(), EmplaceIterator(ef), EmplaceIterator());
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... before p
- //!
- //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
- //!
- //! <b>Complexity</b>: If p is end(), amortized constant time
- //! Linear time otherwise.
- template<class ...Args>
- iterator emplace(const_iterator p, Args && ...args)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- size_type pos_n = p - cbegin();
- typedef emplace_functor<Args...> EmplaceFunctor;
- typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;
- EmplaceFunctor &&ef = EmplaceFunctor(boost::forward<Args>(args)...);
- this->insert(p, EmplaceIterator(ef), EmplaceIterator());
- return iterator(this->begin() + pos_n);
- }
-
- #else
-
- #define BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- reference emplace_back(BOOST_MOVE_UREF##N)\
- {\
- typedef emplace_functor##N\
- BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N EmplaceFunctor;\
- typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;\
- EmplaceFunctor ef BOOST_MOVE_LP##N BOOST_MOVE_FWD##N BOOST_MOVE_RP##N;\
- return *this->insert(this->cend() , EmplaceIterator(ef), EmplaceIterator());\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- BOOST_ASSERT(this->priv_in_range_or_end(p));\
- typedef emplace_functor##N\
- BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N EmplaceFunctor;\
- typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;\
- EmplaceFunctor ef BOOST_MOVE_LP##N BOOST_MOVE_FWD##N BOOST_MOVE_RP##N;\
- const size_type pos_n = p - this->cbegin();\
- this->insert(p, EmplaceIterator(ef), EmplaceIterator());\
- return this->begin() += pos_n;\
- }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE)
- #undef BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE
-
- #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x at the end of the stable_vector.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_back(const T &x);
-
- //! <b>Effects</b>: Constructs a new element in the end of the stable_vector
- //! and moves the resources of x to this new element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_back(T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of x before p.
- //!
- //! <b>Returns</b>: An iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
- //!
- //! <b>Complexity</b>: If p is end(), amortized constant time
- //! Linear time otherwise.
- iterator insert(const_iterator p, const T &x);
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a new element before p with x's resources.
- //!
- //! <b>Returns</b>: an iterator to the inserted element.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: If p is end(), amortized constant time
- //! Linear time otherwise.
- iterator insert(const_iterator p, T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert n copies of x before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- iterator insert(const_iterator p, size_type n, const T& t)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- STABLE_VECTOR_CHECK_INVARIANT;
- typedef constant_iterator<value_type, difference_type> cvalue_iterator;
- return this->insert(p, cvalue_iterator(t, n), cvalue_iterator());
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
- //!
- //! <b>Complexity</b>: Linear to distance [il.begin(), il.end()).
- iterator insert(const_iterator p, std::initializer_list<value_type> il)
- {
- //Position checks done by insert()
- STABLE_VECTOR_CHECK_INVARIANT;
- return insert(p, il.begin(), il.end());
- }
-#endif
-
- //! <b>Requires</b>: pos must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [first, last) range before p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced InpIt throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to distance [first, last).
- template <class InputIterator>
- iterator insert(const_iterator p, InputIterator first, InputIterator last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //Put this as argument instead of the return type as old GCC's like 3.4
- //detect this and the next disable_if_or as overloads
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<InputIterator, size_type>
- , dtl::is_not_input_iterator<InputIterator>
- >::type* = 0
- #endif
- )
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- STABLE_VECTOR_CHECK_INVARIANT;
- const size_type pos_n = p - this->cbegin();
- for(; first != last; ++first){
- this->emplace(p, *first);
- }
- return this->begin() + pos_n;
- }
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class FwdIt>
- typename dtl::disable_if_or
- < iterator
- , dtl::is_convertible<FwdIt, size_type>
- , dtl::is_input_iterator<FwdIt>
- >::type
- insert(const_iterator p, FwdIt first, FwdIt last)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- const size_type num_new = static_cast<size_type>(boost::container::iterator_distance(first, last));
- const size_type idx = static_cast<size_type>(p - this->cbegin());
- if(num_new){
- //Fills the node pool and inserts num_new null pointers in idx.
- //If a new buffer was needed fixes up pointers up to idx so
- //past-new nodes are not aligned until the end of this function
- //or in a rollback in case of exception
- index_iterator it_past_newly_constructed(this->priv_insert_forward_non_templated(idx, num_new));
- const index_iterator it_past_new(it_past_newly_constructed + num_new);
- {
- //Prepare rollback
- insert_rollback rollback(*this, it_past_newly_constructed, it_past_new);
- while(first != last){
- const node_ptr n = this->priv_get_from_pool();
- BOOST_ASSERT(!!n);
- //Put it in the index so rollback can return it in pool if construct_in_place throws
- *it_past_newly_constructed = n;
- //Constructs and fixes up pointers This can throw
- this->priv_build_node_from_it(n, it_past_newly_constructed, first);
- ++first;
- ++it_past_newly_constructed;
- }
- //rollback.~insert_rollback() called in case of exception
- }
- //Fix up pointers for past-new nodes (new nodes were fixed during construction) and
- //nodes before insertion p in priv_insert_forward_non_templated(...)
- index_traits_type::fix_up_pointers_from(this->index, it_past_newly_constructed);
- }
- return this->begin() + idx;
- }
- #endif
-
- //! <b>Effects</b>: Removes the last element from the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- this->erase(--this->cend());
- }
-
- //! <b>Effects</b>: Erases the element at p.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements between p and the
- //! last element. Constant if p is the last element.
- iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->priv_in_range(p));
- STABLE_VECTOR_CHECK_INVARIANT;
- const size_type d = p - this->cbegin();
- index_iterator it = this->index.begin() + d;
- this->priv_delete_node(p.node_pointer());
- it = this->index.erase(it);
- index_traits_type::fix_up_pointers_from(this->index, it);
- return iterator(node_ptr_traits::static_cast_from(*it));
- }
-
- //! <b>Effects</b>: Erases the elements pointed by [first, last).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the distance between first and last
- //! plus linear to the elements between p and the last element.
- iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(first == last ||
- (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last)));
- STABLE_VECTOR_CHECK_INVARIANT;
- const const_iterator cbeg(this->cbegin());
- const size_type d1 = static_cast<size_type>(first - cbeg),
- d2 = static_cast<size_type>(last - cbeg);
- size_type d_dif = d2 - d1;
- if(d_dif){
- multiallocation_chain holder;
- const index_iterator it1(this->index.begin() + d1);
- const index_iterator it2(it1 + d_dif);
- index_iterator it(it1);
- while(d_dif--){
- node_base_ptr &nb = *it;
- ++it;
- node_type &n = *node_ptr_traits::static_cast_from(nb);
- this->priv_destroy_node(n);
- holder.push_back(node_ptr_traits::pointer_to(n));
- }
- this->priv_put_in_pool(holder);
- const index_iterator e = this->index.erase(it1, it2);
- index_traits_type::fix_up_pointers_from(this->index, e);
- }
- return iterator(last.node_pointer());
- }
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- void swap(stable_vector & x)
- BOOST_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value
- || allocator_traits_type::is_always_equal::value)
- {
- BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value ||
- allocator_traits_type::is_always_equal::value ||
- this->get_stored_allocator() == x.get_stored_allocator());
- STABLE_VECTOR_CHECK_INVARIANT;
- dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
- dtl::swap_alloc(this->priv_node_alloc(), x.priv_node_alloc(), flag);
- //vector's allocator is swapped here
- this->index.swap(x.index);
- this->priv_swap_members(x);
- }
-
- //! <b>Effects</b>: Erases all the elements of the stable_vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the stable_vector.
- void clear() BOOST_NOEXCEPT_OR_NOTHROW
- { this->erase(this->cbegin(),this->cend()); }
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator==(const stable_vector& x, const stable_vector& y)
- { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator!=(const stable_vector& x, const stable_vector& y)
- { return !(x == y); }
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const stable_vector& x, const stable_vector& y)
- { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>(const stable_vector& x, const stable_vector& y)
- { return y < x; }
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<=(const stable_vector& x, const stable_vector& y)
- { return !(y < x); }
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator>=(const stable_vector& x, const stable_vector& y)
- { return !(x < y); }
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- friend void swap(stable_vector& x, stable_vector& y)
- { x.swap(y); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
-
- bool priv_in_range(const_iterator pos) const
- {
- return (this->begin() <= pos) && (pos < this->end());
- }
-
- bool priv_in_range_or_end(const_iterator pos) const
- {
- return (this->begin() <= pos) && (pos <= this->end());
- }
-
- size_type priv_index_of(node_ptr p) const
- {
- //Check range
- BOOST_ASSERT(this->index.empty() || (this->index.data() <= p->up));
- BOOST_ASSERT(this->index.empty() || p->up <= (this->index.data() + this->index.size()));
- return this->index.empty() ? 0 : p->up - this->index.data();
- }
-
- class insert_rollback
- {
- public:
-
- insert_rollback(stable_vector &sv, index_iterator &it_past_constructed, const index_iterator &it_past_new)
- : m_sv(sv), m_it_past_constructed(it_past_constructed), m_it_past_new(it_past_new)
- {}
-
- ~insert_rollback()
- {
- if(m_it_past_constructed != m_it_past_new){
- m_sv.priv_put_in_pool(node_ptr_traits::static_cast_from(*m_it_past_constructed));
- index_iterator e = m_sv.index.erase(m_it_past_constructed, m_it_past_new);
- index_traits_type::fix_up_pointers_from(m_sv.index, e);
- }
- }
-
- private:
- stable_vector &m_sv;
- index_iterator &m_it_past_constructed;
- const index_iterator &m_it_past_new;
- };
-
- class push_back_rollback
- {
- public:
- push_back_rollback(stable_vector &sv, const node_ptr &p)
- : m_sv(sv), m_p(p)
- {}
-
- ~push_back_rollback()
- {
- if(m_p){
- m_sv.priv_put_in_pool(m_p);
- }
- }
-
- void release()
- { m_p = node_ptr(); }
-
- private:
- stable_vector &m_sv;
- node_ptr m_p;
- };
-
- index_iterator priv_insert_forward_non_templated(size_type idx, size_type num_new)
- {
- index_traits_type::initialize_end_node(this->index, this->internal_data.end_node, num_new);
-
- //Now try to fill the pool with new data
- if(this->internal_data.pool_size < num_new){
- this->priv_increase_pool(num_new - this->internal_data.pool_size);
- }
-
- //Now try to make room in the vector
- const node_base_ptr_ptr old_buffer = this->index.data();
- this->index.insert(this->index.begin() + idx, num_new, node_ptr());
- bool new_buffer = this->index.data() != old_buffer;
-
- //Fix the pointers for the newly allocated buffer
- const index_iterator index_beg = this->index.begin();
- if(new_buffer){
- index_traits_type::fix_up_pointers(index_beg, index_beg + idx);
- }
- return index_beg + idx;
- }
-
- bool priv_capacity_bigger_than_size() const
- {
- return this->index.capacity() > this->index.size() &&
- this->internal_data.pool_size > 0;
- }
-
- template <class U>
- void priv_push_back(BOOST_MOVE_CATCH_FWD(U) x)
- {
- if(BOOST_LIKELY(this->priv_capacity_bigger_than_size())){
- //Enough memory in the pool and in the index
- const node_ptr p = this->priv_get_from_pool();
- BOOST_ASSERT(!!p);
- {
- push_back_rollback rollback(*this, p);
- //This might throw
- this->priv_build_node_from_convertible(p, ::boost::forward<U>(x));
- rollback.release();
- }
- //This can't throw as there is room for a new elements in the index
- index_iterator new_index = this->index.insert(this->index.end() - ExtraPointers, p);
- index_traits_type::fix_up_pointers_from(this->index, new_index);
- }
- else{
- this->insert(this->cend(), ::boost::forward<U>(x));
- }
- }
-
- iterator priv_insert(const_iterator p, const value_type &t)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- typedef constant_iterator<value_type, difference_type> cvalue_iterator;
- return this->insert(p, cvalue_iterator(t, 1), cvalue_iterator());
- }
-
- iterator priv_insert(const_iterator p, BOOST_RV_REF(T) x)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- typedef repeat_iterator<T, difference_type> repeat_it;
- typedef boost::move_iterator<repeat_it> repeat_move_it;
- //Just call more general insert(p, size, value) and return iterator
- return this->insert(p, repeat_move_it(repeat_it(x, 1)), repeat_move_it(repeat_it()));
- }
-
- void priv_clear_pool()
- {
- if(!this->index.empty() && this->index.back()){
- node_base_ptr &pool_first_ref = *(this->index.end() - 2);
- node_base_ptr &pool_last_ref = this->index.back();
-
- multiallocation_chain holder;
- holder.incorporate_after( holder.before_begin()
- , node_ptr_traits::static_cast_from(pool_first_ref)
- , node_ptr_traits::static_cast_from(pool_last_ref)
- , internal_data.pool_size);
- this->deallocate_individual(holder);
- pool_first_ref = pool_last_ref = 0;
- this->internal_data.pool_size = 0;
- }
- }
-
- void priv_increase_pool(size_type n)
- {
- node_base_ptr &pool_first_ref = *(this->index.end() - 2);
- node_base_ptr &pool_last_ref = this->index.back();
- multiallocation_chain holder;
- holder.incorporate_after( holder.before_begin()
- , node_ptr_traits::static_cast_from(pool_first_ref)
- , node_ptr_traits::static_cast_from(pool_last_ref)
- , internal_data.pool_size);
- multiallocation_chain m;
- this->allocate_individual(n, m);
- holder.splice_after(holder.before_begin(), m, m.before_begin(), m.last(), n);
- this->internal_data.pool_size += n;
- std::pair<node_ptr, node_ptr> data(holder.extract_data());
- pool_first_ref = data.first;
- pool_last_ref = data.second;
- }
-
- void priv_put_in_pool(const node_ptr &p)
- {
- node_base_ptr &pool_first_ref = *(this->index.end()-2);
- node_base_ptr &pool_last_ref = this->index.back();
- multiallocation_chain holder;
- holder.incorporate_after( holder.before_begin()
- , node_ptr_traits::static_cast_from(pool_first_ref)
- , node_ptr_traits::static_cast_from(pool_last_ref)
- , internal_data.pool_size);
- holder.push_front(p);
- ++this->internal_data.pool_size;
- std::pair<node_ptr, node_ptr> ret(holder.extract_data());
- pool_first_ref = ret.first;
- pool_last_ref = ret.second;
- }
-
- void priv_put_in_pool(multiallocation_chain &ch)
- {
- node_base_ptr &pool_first_ref = *(this->index.end()-(ExtraPointers-1));
- node_base_ptr &pool_last_ref = this->index.back();
- ch.incorporate_after( ch.before_begin()
- , node_ptr_traits::static_cast_from(pool_first_ref)
- , node_ptr_traits::static_cast_from(pool_last_ref)
- , internal_data.pool_size);
- this->internal_data.pool_size = ch.size();
- const std::pair<node_ptr, node_ptr> ret(ch.extract_data());
- pool_first_ref = ret.first;
- pool_last_ref = ret.second;
- }
-
- node_ptr priv_get_from_pool()
- {
- //Precondition: index is not empty
- BOOST_ASSERT(!this->index.empty());
- node_base_ptr &pool_first_ref = *(this->index.end() - (ExtraPointers-1));
- node_base_ptr &pool_last_ref = this->index.back();
- multiallocation_chain holder;
- holder.incorporate_after( holder.before_begin()
- , node_ptr_traits::static_cast_from(pool_first_ref)
- , node_ptr_traits::static_cast_from(pool_last_ref)
- , internal_data.pool_size);
- node_ptr ret = holder.pop_front();
- --this->internal_data.pool_size;
- if(!internal_data.pool_size){
- pool_first_ref = pool_last_ref = node_ptr();
- }
- else{
- const std::pair<node_ptr, node_ptr> data(holder.extract_data());
- pool_first_ref = data.first;
- pool_last_ref = data.second;
- }
- return ret;
- }
-
- node_base_ptr priv_get_end_node() const
- { return node_base_ptr_traits::pointer_to(const_cast<node_base_type&>(this->internal_data.end_node)); }
-
- void priv_destroy_node(const node_type &n)
- {
- allocator_traits<node_allocator_type>::
- destroy(this->priv_node_alloc(), dtl::addressof(n.value));
- static_cast<const node_base_type*>(&n)->~node_base_type();
- }
-
- void priv_delete_node(const node_ptr &n)
- {
- this->priv_destroy_node(*n);
- this->priv_put_in_pool(n);
- }
-
- template<class Iterator>
- void priv_build_node_from_it(const node_ptr &p, const index_iterator &up_index, const Iterator &it)
- {
- //This can throw
- boost::container::construct_in_place
- ( this->priv_node_alloc()
- , dtl::addressof(p->value)
- , it);
- //This does not throw
- ::new(static_cast<node_base_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t())
- node_base_type(index_traits_type::ptr_to_node_base_ptr(*up_index));
- }
-
- template<class ValueConvertible>
- void priv_build_node_from_convertible(const node_ptr &p, BOOST_FWD_REF(ValueConvertible) value_convertible)
- {
- //This can throw
- boost::container::allocator_traits<node_allocator_type>::construct
- ( this->priv_node_alloc()
- , dtl::addressof(p->value)
- , ::boost::forward<ValueConvertible>(value_convertible));
- //This does not throw
- ::new(static_cast<node_base_type*>(boost::movelib::to_raw_pointer(p)), boost_container_new_t()) node_base_type;
- }
-
- void priv_swap_members(stable_vector &x)
- {
- boost::adl_move_swap(this->internal_data.pool_size, x.internal_data.pool_size);
- index_traits_type::readjust_end_node(this->index, this->internal_data.end_node);
- index_traits_type::readjust_end_node(x.index, x.internal_data.end_node);
- }
-
- #if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING)
- bool priv_invariant()const
- {
- index_type & index_ref = const_cast<index_type&>(this->index);
-
- const size_type index_size = this->index.size();
- if(!index_size)
- return !this->capacity() && !this->size();
-
- if(index_size < ExtraPointers)
- return false;
-
- const size_type bucket_extra_capacity = this->index.capacity()- index_size;
- const size_type node_extra_capacity = this->internal_data.pool_size;
- if(bucket_extra_capacity < node_extra_capacity){
- return false;
- }
-
- if(this->priv_get_end_node() != *(index.end() - ExtraPointers)){
- return false;
- }
-
- if(!index_traits_type::invariants(index_ref)){
- return false;
- }
-
- size_type n = this->capacity() - this->size();
- node_base_ptr &pool_first_ref = *(index_ref.end() - (ExtraPointers-1));
- node_base_ptr &pool_last_ref = index_ref.back();
- multiallocation_chain holder;
- holder.incorporate_after( holder.before_begin()
- , node_ptr_traits::static_cast_from(pool_first_ref)
- , node_ptr_traits::static_cast_from(pool_last_ref)
- , internal_data.pool_size);
- typename multiallocation_chain::iterator beg(holder.begin()), end(holder.end());
- size_type num_pool = 0;
- while(beg != end){
- ++num_pool;
- ++beg;
- }
- return n >= num_pool && num_pool == internal_data.pool_size;
- }
-
- class invariant_checker
- {
- invariant_checker(const invariant_checker &);
- invariant_checker & operator=(const invariant_checker &);
- const stable_vector* p;
-
- public:
- invariant_checker(const stable_vector& v):p(&v){}
- ~invariant_checker(){BOOST_ASSERT(p->priv_invariant());}
- void touch(){}
- };
- #endif
-
- class ebo_holder
- : public node_allocator_type
- {
- private:
- BOOST_MOVABLE_BUT_NOT_COPYABLE(ebo_holder)
-
- public:
- template<class AllocatorRLValue>
- explicit ebo_holder(BOOST_FWD_REF(AllocatorRLValue) a)
- : node_allocator_type(boost::forward<AllocatorRLValue>(a))
- , pool_size(0)
- , end_node()
- {}
-
- ebo_holder()
- : node_allocator_type()
- , pool_size(0)
- , end_node()
- {}
-
- size_type pool_size;
- node_base_type end_node;
- } internal_data;
-
- node_allocator_type &priv_node_alloc() { return internal_data; }
- const node_allocator_type &priv_node_alloc() const { return internal_data; }
-
- index_type index;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-stable_vector(InputIterator, InputIterator) ->
- stable_vector<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-stable_vector(InputIterator, InputIterator, Allocator const&) ->
- stable_vector<typename iterator_traits<InputIterator>::value_type, Allocator>;
-
-#endif
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#undef STABLE_VECTOR_CHECK_INVARIANT
-
-} //namespace container {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class T, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::stable_vector<T, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value;
-};
-
-namespace container {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-}} //namespace boost{ namespace container {
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif //BOOST_CONTAINER_STABLE_VECTOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/static_vector.hpp b/src/third_party/boost-1.68.0/boost/container/static_vector.hpp
deleted file mode 100644
index b40d5c37f6e..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/static_vector.hpp
+++ /dev/null
@@ -1,1242 +0,0 @@
-// Boost.Container static_vector
-//
-// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.
-// Copyright (c) 2011-2013 Andrew Hundt.
-// Copyright (c) 2013-2014 Ion Gaztanaga
-//
-// Use, modification and distribution is subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_CONTAINER_STATIC_VECTOR_HPP
-#define BOOST_CONTAINER_STATIC_VECTOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/vector.hpp>
-
-#include <cstddef>
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list>
-#endif
-
-namespace boost { namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace dtl {
-
-template<class T, std::size_t N>
-class static_storage_allocator
-{
- public:
- typedef T value_type;
-
- BOOST_CONTAINER_FORCEINLINE static_storage_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
- BOOST_CONTAINER_FORCEINLINE static_storage_allocator(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
- BOOST_CONTAINER_FORCEINLINE static_storage_allocator & operator=(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
- { return *this; }
-
- BOOST_CONTAINER_FORCEINLINE T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_cast<T*>(static_cast<const T*>(static_cast<const void*>(storage.data))); }
-
- BOOST_CONTAINER_FORCEINLINE T* internal_storage() BOOST_NOEXCEPT_OR_NOTHROW
- { return static_cast<T*>(static_cast<void*>(storage.data)); }
-
- static const std::size_t internal_capacity = N;
-
- std::size_t max_size() const
- { return N; }
-
- typedef boost::container::dtl::version_type<static_storage_allocator, 0> version;
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator==(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
- { return false; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
- { return true; }
-
- private:
- typename aligned_storage<sizeof(T)*N, alignment_of<T>::value>::type storage;
-};
-
-} //namespace dtl {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//!
-//!@brief A variable-size array container with fixed capacity.
-//!
-//!static_vector is a sequence container like boost::container::vector with contiguous storage that can
-//!change in size, along with the static allocation, low overhead, and fixed capacity of boost::array.
-//!
-//!A static_vector is a sequence that supports random access to elements, constant time insertion and
-//!removal of elements at the end, and linear time insertion and removal of elements at the beginning or
-//!in the middle. The number of elements in a static_vector may vary dynamically up to a fixed capacity
-//!because elements are stored within the object itself similarly to an array. However, objects are
-//!initialized as they are inserted into static_vector unlike C arrays or std::array which must construct
-//!all elements on instantiation. The behavior of static_vector enables the use of statically allocated
-//!elements in cases with complex object lifetime requirements that would otherwise not be trivially
-//!possible.
-//!
-//!@par Error Handling
-//! Insertion beyond the capacity result in throwing std::bad_alloc() if exceptions are enabled or
-//! calling throw_bad_alloc() if not enabled.
-//!
-//! std::out_of_range is thrown if out of bound access is performed in <code>at()</code> if exceptions are
-//! enabled, throw_out_of_range() if not enabled.
-//!
-//!@tparam Value The type of element that will be stored.
-//!@tparam Capacity The maximum number of elements static_vector can store, fixed at compile time.
-template <typename Value, std::size_t Capacity>
-class static_vector
- : public vector<Value, dtl::static_storage_allocator<Value, Capacity> >
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- typedef vector<Value, dtl::static_storage_allocator<Value, Capacity> > base_t;
-
- BOOST_COPYABLE_AND_MOVABLE(static_vector)
-
- template<class U, std::size_t OtherCapacity>
- friend class static_vector;
-
- public:
- typedef dtl::static_storage_allocator<Value, Capacity> allocator_type;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-public:
- //! @brief The type of elements stored in the container.
- typedef typename base_t::value_type value_type;
- //! @brief The unsigned integral type used by the container.
- typedef typename base_t::size_type size_type;
- //! @brief The pointers difference type.
- typedef typename base_t::difference_type difference_type;
- //! @brief The pointer type.
- typedef typename base_t::pointer pointer;
- //! @brief The const pointer type.
- typedef typename base_t::const_pointer const_pointer;
- //! @brief The value reference type.
- typedef typename base_t::reference reference;
- //! @brief The value const reference type.
- typedef typename base_t::const_reference const_reference;
- //! @brief The iterator type.
- typedef typename base_t::iterator iterator;
- //! @brief The const iterator type.
- typedef typename base_t::const_iterator const_iterator;
- //! @brief The reverse iterator type.
- typedef typename base_t::reverse_iterator reverse_iterator;
- //! @brief The const reverse iterator.
- typedef typename base_t::const_reverse_iterator const_reverse_iterator;
-
- //! @brief The capacity/max size of the container
- static const size_type static_capacity = Capacity;
-
- //! @brief Constructs an empty static_vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- BOOST_CONTAINER_FORCEINLINE static_vector() BOOST_NOEXCEPT_OR_NOTHROW
- : base_t()
- {}
-
- //! @pre <tt>count <= capacity()</tt>
- //!
- //! @brief Constructs a static_vector containing count value initialized values.
- //!
- //! @param count The number of values which will be contained in the container.
- //!
- //! @par Throws
- //! If Value's value initialization throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- BOOST_CONTAINER_FORCEINLINE explicit static_vector(size_type count)
- : base_t(count)
- {}
-
- //! @pre <tt>count <= capacity()</tt>
- //!
- //! @brief Constructs a static_vector containing count default initialized values.
- //!
- //! @param count The number of values which will be contained in the container.
- //!
- //! @par Throws
- //! If Value's default initialization throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- //!
- //! @par Note
- //! Non-standard extension
- BOOST_CONTAINER_FORCEINLINE static_vector(size_type count, default_init_t)
- : base_t(count, default_init_t())
- {}
-
- //! @pre <tt>count <= capacity()</tt>
- //!
- //! @brief Constructs a static_vector containing count copies of value.
- //!
- //! @param count The number of copies of a values that will be contained in the container.
- //! @param value The value which will be used to copy construct values.
- //!
- //! @par Throws
- //! If Value's copy constructor throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- BOOST_CONTAINER_FORCEINLINE static_vector(size_type count, value_type const& value)
- : base_t(count, value)
- {}
-
- //! @pre
- //! @li <tt>distance(first, last) <= capacity()</tt>
- //! @li Iterator must meet the \c ForwardTraversalIterator concept.
- //!
- //! @brief Constructs a static_vector containing copy of a range <tt>[first, last)</tt>.
- //!
- //! @param first The iterator to the first element in range.
- //! @param last The iterator to the one after the last element in range.
- //!
- //! @par Throws
- //! If Value's constructor taking a dereferenced Iterator throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- template <typename Iterator>
- BOOST_CONTAINER_FORCEINLINE static_vector(Iterator first, Iterator last)
- : base_t(first, last)
- {}
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! @pre
- //! @li <tt>distance(il.begin(), il.end()) <= capacity()</tt>
- //!
- //! @brief Constructs a static_vector containing copy of a range <tt>[il.begin(), il.end())</tt>.
- //!
- //! @param il std::initializer_list with values to initialize vector.
- //!
- //! @par Throws
- //! If Value's constructor taking a dereferenced std::initializer_list throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- BOOST_CONTAINER_FORCEINLINE static_vector(std::initializer_list<value_type> il)
- : base_t(il)
- {}
-#endif
-
- //! @brief Constructs a copy of other static_vector.
- //!
- //! @param other The static_vector which content will be copied to this one.
- //!
- //! @par Throws
- //! If Value's copy constructor throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other)
- : base_t(other)
- {}
-
- BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other, const allocator_type &)
- : base_t(other)
- {}
-
- BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other, const allocator_type &)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<value_type>::value)
- : base_t(BOOST_MOVE_BASE(base_t, other))
- {}
-
- BOOST_CONTAINER_FORCEINLINE explicit static_vector(const allocator_type &)
- : base_t()
- {}
-
- //! @pre <tt>other.size() <= capacity()</tt>.
- //!
- //! @brief Constructs a copy of other static_vector.
- //!
- //! @param other The static_vector which content will be copied to this one.
- //!
- //! @par Throws
- //! If Value's copy constructor throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- template <std::size_t C>
- BOOST_CONTAINER_FORCEINLINE static_vector(static_vector<value_type, C> const& other)
- : base_t(other)
- {}
-
- //! @brief Move constructor. Moves Values stored in the other static_vector to this one.
- //!
- //! @param other The static_vector which content will be moved to this one.
- //!
- //! @par Throws
- //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor throws.
- //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other)
- BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<value_type>::value)
- : base_t(BOOST_MOVE_BASE(base_t, other))
- {}
-
- //! @pre <tt>other.size() <= capacity()</tt>
- //!
- //! @brief Move constructor. Moves Values stored in the other static_vector to this one.
- //!
- //! @param other The static_vector which content will be moved to this one.
- //!
- //! @par Throws
- //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor throws.
- //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- template <std::size_t C>
- BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF_BEG static_vector<value_type, C> BOOST_RV_REF_END other)
- : base_t(BOOST_MOVE_BASE(typename static_vector<value_type BOOST_MOVE_I C>::base_t, other))
- {}
-
- //! @brief Copy assigns Values stored in the other static_vector to this one.
- //!
- //! @param other The static_vector which content will be copied to this one.
- //!
- //! @par Throws
- //! If Value's copy constructor or copy assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_COPY_ASSIGN_REF(static_vector) other)
- {
- return static_cast<static_vector&>(base_t::operator=(static_cast<base_t const&>(other)));
- }
-
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! @brief Copy assigns Values stored in std::initializer_list to *this.
- //!
- //! @param il The std::initializer_list which content will be copied to this one.
- //!
- //! @par Throws
- //! If Value's copy constructor or copy assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- BOOST_CONTAINER_FORCEINLINE static_vector & operator=(std::initializer_list<value_type> il)
- { return static_cast<static_vector&>(base_t::operator=(il)); }
-#endif
-
- //! @pre <tt>other.size() <= capacity()</tt>
- //!
- //! @brief Copy assigns Values stored in the other static_vector to this one.
- //!
- //! @param other The static_vector which content will be copied to this one.
- //!
- //! @par Throws
- //! If Value's copy constructor or copy assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- template <std::size_t C>
- BOOST_CONTAINER_FORCEINLINE static_vector & operator=(static_vector<value_type, C> const& other)
- {
- return static_cast<static_vector&>(base_t::operator=
- (static_cast<typename static_vector<value_type, C>::base_t const&>(other)));
- }
-
- //! @brief Move assignment. Moves Values stored in the other static_vector to this one.
- //!
- //! @param other The static_vector which content will be moved to this one.
- //!
- //! @par Throws
- //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws.
- //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF(static_vector) other)
- {
- return static_cast<static_vector&>(base_t::operator=(BOOST_MOVE_BASE(base_t, other)));
- }
-
- //! @pre <tt>other.size() <= capacity()</tt>
- //!
- //! @brief Move assignment. Moves Values stored in the other static_vector to this one.
- //!
- //! @param other The static_vector which content will be moved to this one.
- //!
- //! @par Throws
- //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws.
- //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- template <std::size_t C>
- BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF_BEG static_vector<value_type, C> BOOST_RV_REF_END other)
- {
- return static_cast<static_vector&>(base_t::operator=
- (BOOST_MOVE_BASE(typename static_vector<value_type BOOST_MOVE_I C>::base_t, other)));
- }
-
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //! @brief Destructor. Destroys Values stored in this container.
- //!
- //! @par Throws
- //! Nothing
- //!
- //! @par Complexity
- //! Linear O(N).
- ~static_vector();
-
- //! @brief Swaps contents of the other static_vector and this one.
- //!
- //! @param other The static_vector which content will be swapped with this one's content.
- //!
- //! @par Throws
- //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws,
- //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws,
- //!
- //! @par Complexity
- //! Linear O(N).
- void swap(static_vector & other);
-
- //! @pre <tt>other.size() <= capacity() && size() <= other.capacity()</tt>
- //!
- //! @brief Swaps contents of the other static_vector and this one.
- //!
- //! @param other The static_vector which content will be swapped with this one's content.
- //!
- //! @par Throws
- //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws,
- //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws,
- //!
- //! @par Complexity
- //! Linear O(N).
- template <std::size_t C>
- void swap(static_vector<value_type, C> & other);
-
- //! @pre <tt>count <= capacity()</tt>
- //!
- //! @brief Inserts or erases elements at the end such that
- //! the size becomes count. New elements are value initialized.
- //!
- //! @param count The number of elements which will be stored in the container.
- //!
- //! @par Throws
- //! If Value's value initialization throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- void resize(size_type count);
-
- //! @pre <tt>count <= capacity()</tt>
- //!
- //! @brief Inserts or erases elements at the end such that
- //! the size becomes count. New elements are default initialized.
- //!
- //! @param count The number of elements which will be stored in the container.
- //!
- //! @par Throws
- //! If Value's default initialization throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- //!
- //! @par Note
- //! Non-standard extension
- void resize(size_type count, default_init_t);
-
- //! @pre <tt>count <= capacity()</tt>
- //!
- //! @brief Inserts or erases elements at the end such that
- //! the size becomes count. New elements are copy constructed from value.
- //!
- //! @param count The number of elements which will be stored in the container.
- //! @param value The value used to copy construct the new element.
- //!
- //! @par Throws
- //! If Value's copy constructor throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- void resize(size_type count, value_type const& value);
-
- //! @pre <tt>count <= capacity()</tt>
- //!
- //! @brief This call has no effect because the Capacity of this container is constant.
- //!
- //! @param count The number of elements which the container should be able to contain.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Linear O(N).
- void reserve(size_type count) BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @pre <tt>size() < capacity()</tt>
- //!
- //! @brief Adds a copy of value at the end.
- //!
- //! @param value The value used to copy construct the new element.
- //!
- //! @par Throws
- //! If Value's copy constructor throws.
- //!
- //! @par Complexity
- //! Constant O(1).
- void push_back(value_type const& value);
-
- //! @pre <tt>size() < capacity()</tt>
- //!
- //! @brief Moves value to the end.
- //!
- //! @param value The value to move construct the new element.
- //!
- //! @par Throws
- //! If Value's move constructor throws.
- //!
- //! @par Complexity
- //! Constant O(1).
- void push_back(BOOST_RV_REF(value_type) value);
-
- //! @pre <tt>!empty()</tt>
- //!
- //! @brief Destroys last value and decreases the size.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- void pop_back();
-
- //! @pre
- //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
- //! @li <tt>size() < capacity()</tt>
- //!
- //! @brief Inserts a copy of element at p.
- //!
- //! @param p The position at which the new value will be inserted.
- //! @param value The value used to copy construct the new element.
- //!
- //! @par Throws
- //! @li If Value's copy constructor or copy assignment throws
- //! @li If Value's move constructor or move assignment throws.
- //!
- //! @par Complexity
- //! Constant or linear.
- iterator insert(const_iterator p, value_type const& value);
-
- //! @pre
- //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
- //! @li <tt>size() < capacity()</tt>
- //!
- //! @brief Inserts a move-constructed element at p.
- //!
- //! @param p The position at which the new value will be inserted.
- //! @param value The value used to move construct the new element.
- //!
- //! @par Throws
- //! If Value's move constructor or move assignment throws.
- //!
- //! @par Complexity
- //! Constant or linear.
- iterator insert(const_iterator p, BOOST_RV_REF(value_type) value);
-
- //! @pre
- //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
- //! @li <tt>size() + count <= capacity()</tt>
- //!
- //! @brief Inserts a count copies of value at p.
- //!
- //! @param p The position at which new elements will be inserted.
- //! @param count The number of new elements which will be inserted.
- //! @param value The value used to copy construct new elements.
- //!
- //! @par Throws
- //! @li If Value's copy constructor or copy assignment throws.
- //! @li If Value's move constructor or move assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- iterator insert(const_iterator p, size_type count, value_type const& value);
-
- //! @pre
- //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
- //! @li <tt>distance(first, last) <= capacity()</tt>
- //! @li \c Iterator must meet the \c ForwardTraversalIterator concept.
- //!
- //! @brief Inserts a copy of a range <tt>[first, last)</tt> at p.
- //!
- //! @param p The position at which new elements will be inserted.
- //! @param first The iterator to the first element of a range used to construct new elements.
- //! @param last The iterator to the one after the last element of a range used to construct new elements.
- //!
- //! @par Throws
- //! @li If Value's constructor and assignment taking a dereferenced \c Iterator.
- //! @li If Value's move constructor or move assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- template <typename Iterator>
- iterator insert(const_iterator p, Iterator first, Iterator last);
-
- //! @pre
- //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
- //! @li <tt>distance(il.begin(), il.end()) <= capacity()</tt>
- //!
- //! @brief Inserts a copy of a range <tt>[il.begin(), il.end())</tt> at p.
- //!
- //! @param p The position at which new elements will be inserted.
- //! @param il The std::initializer_list which contains elements that will be inserted.
- //!
- //! @par Throws
- //! @li If Value's constructor and assignment taking a dereferenced std::initializer_list iterator.
- //!
- //! @par Complexity
- //! Linear O(N).
- iterator insert(const_iterator p, std::initializer_list<value_type> il);
-
- //! @pre \c p must be a valid iterator of \c *this in range <tt>[begin(), end())</tt>
- //!
- //! @brief Erases Value from p.
- //!
- //! @param p The position of the element which will be erased from the container.
- //!
- //! @par Throws
- //! If Value's move assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- iterator erase(const_iterator p);
-
- //! @pre
- //! @li \c first and \c last must define a valid range
- //! @li iterators must be in range <tt>[begin(), end()]</tt>
- //!
- //! @brief Erases Values from a range <tt>[first, last)</tt>.
- //!
- //! @param first The position of the first element of a range which will be erased from the container.
- //! @param last The position of the one after the last element of a range which will be erased from the container.
- //!
- //! @par Throws
- //! If Value's move assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- iterator erase(const_iterator first, const_iterator last);
-
- //! @pre <tt>distance(first, last) <= capacity()</tt>
- //!
- //! @brief Assigns a range <tt>[first, last)</tt> of Values to this container.
- //!
- //! @param first The iterator to the first element of a range used to construct new content of this container.
- //! @param last The iterator to the one after the last element of a range used to construct new content of this container.
- //!
- //! @par Throws
- //! If Value's copy constructor or copy assignment throws,
- //!
- //! @par Complexity
- //! Linear O(N).
- template <typename Iterator>
- void assign(Iterator first, Iterator last);
-
- //! @pre <tt>distance(il.begin(), il.end()) <= capacity()</tt>
- //!
- //! @brief Assigns a range <tt>[il.begin(), il.end())</tt> of Values to this container.
- //!
- //! @param il std::initializer_list with values used to construct new content of this container.
- //!
- //! @par Throws
- //! If Value's copy constructor or copy assignment throws,
- //!
- //! @par Complexity
- //! Linear O(N).
- void assign(std::initializer_list<value_type> il);
-
- //! @pre <tt>count <= capacity()</tt>
- //!
- //! @brief Assigns a count copies of value to this container.
- //!
- //! @param count The new number of elements which will be container in the container.
- //! @param value The value which will be used to copy construct the new content.
- //!
- //! @par Throws
- //! If Value's copy constructor or copy assignment throws.
- //!
- //! @par Complexity
- //! Linear O(N).
- void assign(size_type count, value_type const& value);
-
- //! @pre <tt>size() < capacity()</tt>
- //!
- //! @brief Inserts a Value constructed with
- //! \c std::forward<Args>(args)... in the end of the container.
- //!
- //! @return A reference to the created object.
- //!
- //! @param args The arguments of the constructor of the new element which will be created at the end of the container.
- //!
- //! @par Throws
- //! If in-place constructor throws or Value's move constructor throws.
- //!
- //! @par Complexity
- //! Constant O(1).
- template<class ...Args>
- reference emplace_back(Args &&...args);
-
- //! @pre
- //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>
- //! @li <tt>size() < capacity()</tt>
- //!
- //! @brief Inserts a Value constructed with
- //! \c std::forward<Args>(args)... before p
- //!
- //! @param p The position at which new elements will be inserted.
- //! @param args The arguments of the constructor of the new element.
- //!
- //! @par Throws
- //! If in-place constructor throws or if Value's move constructor or move assignment throws.
- //!
- //! @par Complexity
- //! Constant or linear.
- template<class ...Args>
- iterator emplace(const_iterator p, Args &&...args);
-
- //! @brief Removes all elements from the container.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- void clear() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @pre <tt>i < size()</tt>
- //!
- //! @brief Returns reference to the i-th element.
- //!
- //! @param i The element's index.
- //!
- //! @return reference to the i-th element
- //! from the beginning of the container.
- //!
- //! @par Throws
- //! \c std::out_of_range exception by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- reference at(size_type i);
-
- //! @pre <tt>i < size()</tt>
- //!
- //! @brief Returns const reference to the i-th element.
- //!
- //! @param i The element's index.
- //!
- //! @return const reference to the i-th element
- //! from the beginning of the container.
- //!
- //! @par Throws
- //! \c std::out_of_range exception by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_reference at(size_type i) const;
-
- //! @pre <tt>i < size()</tt>
- //!
- //! @brief Returns reference to the i-th element.
- //!
- //! @param i The element's index.
- //!
- //! @return reference to the i-th element
- //! from the beginning of the container.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- reference operator[](size_type i);
-
- //! @pre <tt>i < size()</tt>
- //!
- //! @brief Returns const reference to the i-th element.
- //!
- //! @param i The element's index.
- //!
- //! @return const reference to the i-th element
- //! from the beginning of the container.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_reference operator[](size_type i) const;
-
- //! @pre <tt>i =< size()</tt>
- //!
- //! @brief Returns a iterator to the i-th element.
- //!
- //! @param i The element's index.
- //!
- //! @return a iterator to the i-th element.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- iterator nth(size_type i);
-
- //! @pre <tt>i =< size()</tt>
- //!
- //! @brief Returns a const_iterator to the i-th element.
- //!
- //! @param i The element's index.
- //!
- //! @return a const_iterator to the i-th element.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_iterator nth(size_type i) const;
-
- //! @pre <tt>begin() <= p <= end()</tt>
- //!
- //! @brief Returns the index of the element pointed by p.
- //!
- //! @param p An iterator to the element.
- //!
- //! @return The index of the element pointed by p.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- size_type index_of(iterator p);
-
- //! @pre <tt>begin() <= p <= end()</tt>
- //!
- //! @brief Returns the index of the element pointed by p.
- //!
- //! @param p A const_iterator to the element.
- //!
- //! @return a const_iterator to the i-th element.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- size_type index_of(const_iterator p) const;
-
- //! @pre \c !empty()
- //!
- //! @brief Returns reference to the first element.
- //!
- //! @return reference to the first element
- //! from the beginning of the container.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- reference front();
-
- //! @pre \c !empty()
- //!
- //! @brief Returns const reference to the first element.
- //!
- //! @return const reference to the first element
- //! from the beginning of the container.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_reference front() const;
-
- //! @pre \c !empty()
- //!
- //! @brief Returns reference to the last element.
- //!
- //! @return reference to the last element
- //! from the beginning of the container.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- reference back();
-
- //! @pre \c !empty()
- //!
- //! @brief Returns const reference to the first element.
- //!
- //! @return const reference to the last element
- //! from the beginning of the container.
- //!
- //! @par Throws
- //! Nothing by default.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_reference back() const;
-
- //! @brief Pointer such that <tt>[data(), data() + size())</tt> is a valid range.
- //! For a non-empty vector <tt>data() == &front()</tt>.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- Value * data() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Const pointer such that <tt>[data(), data() + size())</tt> is a valid range.
- //! For a non-empty vector <tt>data() == &front()</tt>.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const Value * data() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns iterator to the first element.
- //!
- //! @return iterator to the first element contained in the vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns const iterator to the first element.
- //!
- //! @return const_iterator to the first element contained in the vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns const iterator to the first element.
- //!
- //! @return const_iterator to the first element contained in the vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns iterator to the one after the last element.
- //!
- //! @return iterator pointing to the one after the last element contained in the vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns const iterator to the one after the last element.
- //!
- //! @return const_iterator pointing to the one after the last element contained in the vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns const iterator to the one after the last element.
- //!
- //! @return const_iterator pointing to the one after the last element contained in the vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns reverse iterator to the first element of the reversed container.
- //!
- //! @return reverse_iterator pointing to the beginning
- //! of the reversed static_vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns const reverse iterator to the first element of the reversed container.
- //!
- //! @return const_reverse_iterator pointing to the beginning
- //! of the reversed static_vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns const reverse iterator to the first element of the reversed container.
- //!
- //! @return const_reverse_iterator pointing to the beginning
- //! of the reversed static_vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns reverse iterator to the one after the last element of the reversed container.
- //!
- //! @return reverse_iterator pointing to the one after the last element
- //! of the reversed static_vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns const reverse iterator to the one after the last element of the reversed container.
- //!
- //! @return const_reverse_iterator pointing to the one after the last element
- //! of the reversed static_vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns const reverse iterator to the one after the last element of the reversed container.
- //!
- //! @return const_reverse_iterator pointing to the one after the last element
- //! of the reversed static_vector.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns container's capacity.
- //!
- //! @return container's capacity.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- static size_type capacity() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns container's capacity.
- //!
- //! @return container's capacity.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- static size_type max_size() BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Returns the number of stored elements.
- //!
- //! @return Number of elements contained in the container.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- //! @brief Queries if the container contains elements.
- //!
- //! @return true if the number of elements contained in the
- //! container is equal to 0.
- //!
- //! @par Throws
- //! Nothing.
- //!
- //! @par Complexity
- //! Constant O(1).
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW;
-#else
-
- BOOST_CONTAINER_FORCEINLINE friend void swap(static_vector &x, static_vector &y)
- {
- x.swap(y);
- }
-
-#endif // BOOST_CONTAINER_DOXYGEN_INVOKED
-
-};
-
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! @brief Checks if contents of two static_vectors are equal.
-//!
-//! @ingroup static_vector_non_member
-//!
-//! @param x The first static_vector.
-//! @param y The second static_vector.
-//!
-//! @return \c true if containers have the same size and elements in both containers are equal.
-//!
-//! @par Complexity
-//! Linear O(N).
-template<typename V, std::size_t C1, std::size_t C2>
-bool operator== (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
-
-//! @brief Checks if contents of two static_vectors are not equal.
-//!
-//! @ingroup static_vector_non_member
-//!
-//! @param x The first static_vector.
-//! @param y The second static_vector.
-//!
-//! @return \c true if containers have different size or elements in both containers are not equal.
-//!
-//! @par Complexity
-//! Linear O(N).
-template<typename V, std::size_t C1, std::size_t C2>
-bool operator!= (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
-
-//! @brief Lexicographically compares static_vectors.
-//!
-//! @ingroup static_vector_non_member
-//!
-//! @param x The first static_vector.
-//! @param y The second static_vector.
-//!
-//! @return \c true if x compares lexicographically less than y.
-//!
-//! @par Complexity
-//! Linear O(N).
-template<typename V, std::size_t C1, std::size_t C2>
-bool operator< (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
-
-//! @brief Lexicographically compares static_vectors.
-//!
-//! @ingroup static_vector_non_member
-//!
-//! @param x The first static_vector.
-//! @param y The second static_vector.
-//!
-//! @return \c true if y compares lexicographically less than x.
-//!
-//! @par Complexity
-//! Linear O(N).
-template<typename V, std::size_t C1, std::size_t C2>
-bool operator> (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
-
-//! @brief Lexicographically compares static_vectors.
-//!
-//! @ingroup static_vector_non_member
-//!
-//! @param x The first static_vector.
-//! @param y The second static_vector.
-//!
-//! @return \c true if y don't compare lexicographically less than x.
-//!
-//! @par Complexity
-//! Linear O(N).
-template<typename V, std::size_t C1, std::size_t C2>
-bool operator<= (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
-
-//! @brief Lexicographically compares static_vectors.
-//!
-//! @ingroup static_vector_non_member
-//!
-//! @param x The first static_vector.
-//! @param y The second static_vector.
-//!
-//! @return \c true if x don't compare lexicographically less than y.
-//!
-//! @par Complexity
-//! Linear O(N).
-template<typename V, std::size_t C1, std::size_t C2>
-bool operator>= (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
-
-//! @brief Swaps contents of two static_vectors.
-//!
-//! This function calls static_vector::swap().
-//!
-//! @ingroup static_vector_non_member
-//!
-//! @param x The first static_vector.
-//! @param y The second static_vector.
-//!
-//! @par Complexity
-//! Linear O(N).
-template<typename V, std::size_t C1, std::size_t C2>
-inline void swap(static_vector<V, C1> & x, static_vector<V, C2> & y);
-
-#else
-
-template<typename V, std::size_t C1, std::size_t C2>
-inline void swap(static_vector<V, C1> & x, static_vector<V, C2> & y
- , typename dtl::enable_if_c< C1 != C2>::type * = 0)
-{
- x.swap(y);
-}
-
-#endif // BOOST_CONTAINER_DOXYGEN_INVOKED
-
-}} // namespace boost::container
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_STATIC_VECTOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/string.hpp b/src/third_party/boost-1.68.0/boost/container/string.hpp
deleted file mode 100644
index 6c0cc96870e..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/string.hpp
+++ /dev/null
@@ -1,3459 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_STRING_HPP
-#define BOOST_CONTAINER_STRING_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-#include <boost/container/container_fwd.hpp>
-// container
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-#include <boost/container/throw_exception.hpp>
-// container/detail
-#include <boost/container/detail/alloc_helpers.hpp>
-#include <boost/container/detail/allocator_version_traits.hpp>
-#include <boost/container/detail/allocation_type.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/container/detail/min_max.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/next_capacity.hpp>
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/container/detail/version_type.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/minimal_char_traits_header.hpp>
-#include <boost/container/detail/algorithm.hpp>
-
-#include <boost/intrusive/pointer_traits.hpp>
-
-#include <boost/move/utility_core.hpp>
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/traits.hpp>
-
-#include <boost/static_assert.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-#include <boost/functional/hash.hpp>
-
-#include <algorithm>
-#include <iosfwd>
-#include <istream>
-#include <ostream>
-#include <ios>
-#include <locale>
-#include <cstddef>
-#include <climits>
-
-//std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list> //for std::initializer_list
-#endif
-
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-namespace dtl {
-// ------------------------------------------------------------
-// Class basic_string_base.
-
-// basic_string_base is a helper class that makes it it easier to write
-// an exception-safe version of basic_string. The constructor allocates,
-// but does not initialize, a block of memory. The destructor
-// deallocates, but does not destroy elements within, a block of
-// memory. The destructor assumes that the memory either is the internal buffer,
-// or else points to a block of memory that was allocated using string_base's
-// allocator and whose size is this->m_storage.
-template <class Allocator>
-class basic_string_base
-{
- basic_string_base & operator=(const basic_string_base &);
- basic_string_base(const basic_string_base &);
-
- typedef allocator_traits<Allocator> allocator_traits_type;
- public:
- typedef Allocator allocator_type;
- typedef allocator_type stored_allocator_type;
- typedef typename allocator_traits_type::pointer pointer;
- typedef typename allocator_traits_type::value_type value_type;
- typedef typename allocator_traits_type::size_type size_type;
- typedef ::boost::intrusive::pointer_traits<pointer> pointer_traits;
-
- basic_string_base()
- : members_()
- { init(); }
-
- explicit basic_string_base(const allocator_type& a)
- : members_(a)
- { init(); }
-
- explicit basic_string_base(BOOST_RV_REF(allocator_type) a)
- : members_(boost::move(a))
- { this->init(); }
-
- basic_string_base(const allocator_type& a, size_type n)
- : members_(a)
- {
- this->init();
- this->allocate_initial_block(n);
- }
-
- explicit basic_string_base(size_type n)
- : members_()
- {
- this->init();
- this->allocate_initial_block(n);
- }
-
- ~basic_string_base()
- {
- if(!this->is_short()){
- this->deallocate(this->priv_long_addr(), this->priv_long_storage());
- }
- }
-
- private:
-
- //This is the structure controlling a long string
- struct long_t
- {
- size_type is_short : 1;
- size_type length : (sizeof(size_type)*CHAR_BIT - 1);
- size_type storage;
- pointer start;
-
- long_t()
- {}
-
- long_t(const long_t &other)
- {
- this->is_short = false;
- length = other.length;
- storage = other.storage;
- start = other.start;
- }
-
- long_t &operator= (const long_t &other)
- {
- length = other.length;
- storage = other.storage;
- start = other.start;
- return *this;
- }
- };
-
- //This type is the first part of the structure controlling a short string
- //The "data" member stores
- struct short_header
- {
- unsigned char is_short : 1;
- unsigned char length : (CHAR_BIT - 1);
- };
-
- //This type has the same alignment and size as long_t but it's POD
- //so, unlike long_t, it can be placed in a union
-
- typedef typename dtl::aligned_storage
- <sizeof(long_t), dtl::alignment_of<long_t>::value>::type long_raw_t;
-
- protected:
- static const size_type MinInternalBufferChars = 8;
- static const size_type AlignmentOfValueType =
- alignment_of<value_type>::value;
- static const size_type ShortDataOffset = ((sizeof(short_header)-1)/AlignmentOfValueType+1)*AlignmentOfValueType;
- static const size_type ZeroCostInternalBufferChars =
- (sizeof(long_t) - ShortDataOffset)/sizeof(value_type);
- static const size_type UnalignedFinalInternalBufferChars =
- (ZeroCostInternalBufferChars > MinInternalBufferChars) ?
- ZeroCostInternalBufferChars : MinInternalBufferChars;
-
- struct short_t
- {
- short_header h;
- value_type data[UnalignedFinalInternalBufferChars];
- };
-
- union repr_t
- {
- long_raw_t r;
- short_t s;
-
- const short_t &short_repr() const
- { return s; }
-
- const long_t &long_repr() const
- { return *static_cast<const long_t*>(static_cast<const void*>(r.data)); }
-
- short_t &short_repr()
- { return s; }
-
- long_t &long_repr()
- { return *static_cast<long_t*>(static_cast<void*>(&r)); }
- };
-
- struct members_holder
- : public Allocator
- {
- members_holder()
- : Allocator()
- {}
-
- template<class AllocatorConvertible>
- explicit members_holder(BOOST_FWD_REF(AllocatorConvertible) a)
- : Allocator(boost::forward<AllocatorConvertible>(a))
- {}
-
- repr_t m_repr;
- } members_;
-
- const Allocator &alloc() const
- { return members_; }
-
- Allocator &alloc()
- { return members_; }
-
- static const size_type InternalBufferChars = (sizeof(repr_t) - ShortDataOffset)/sizeof(value_type);
-
- private:
-
- static const size_type MinAllocation = InternalBufferChars*2;
-
- protected:
- bool is_short() const
- {
- //Access and copy (to avoid UB) the first byte of the union to know if the
- //active representation is short or long
- short_header hdr;
- BOOST_STATIC_ASSERT((sizeof(short_header) == 1));
- *(unsigned char*)&hdr = *(unsigned char*)&this->members_.m_repr;
- return hdr.is_short != 0;
- }
-
- void is_short(bool yes)
- {
- const bool was_short = this->is_short();
- if(yes && !was_short){
- allocator_traits_type::destroy
- ( this->alloc()
- , static_cast<long_t*>(static_cast<void*>(&this->members_.m_repr.r))
- );
- this->members_.m_repr.s.h.is_short = true;
- }
- else if(!yes && was_short){
- allocator_traits_type::construct
- ( this->alloc()
- , static_cast<long_t*>(static_cast<void*>(&this->members_.m_repr.r))
- );
- this->members_.m_repr.s.h.is_short = false;
- }
- }
-
- private:
- void init()
- {
- this->members_.m_repr.s.h.is_short = 1;
- this->members_.m_repr.s.h.length = 0;
- }
-
- protected:
-
- typedef dtl::integral_constant<unsigned,
- boost::container::dtl::version<Allocator>::value> alloc_version;
-
- pointer allocation_command(allocation_type command,
- size_type limit_size,
- size_type &prefer_in_recvd_out_size,
- pointer &reuse)
- {
- if(this->is_short() && (command & (expand_fwd | expand_bwd)) ){
- reuse = 0;
- command &= ~(expand_fwd | expand_bwd);
- }
- return dtl::allocator_version_traits<Allocator>::allocation_command
- (this->alloc(), command, limit_size, prefer_in_recvd_out_size, reuse);
- }
-
- size_type next_capacity(size_type additional_objects) const
- {
- return growth_factor_100()
- ( this->priv_storage(), additional_objects, allocator_traits_type::max_size(this->alloc()));
- }
-
- void deallocate(pointer p, size_type n)
- {
- if (p && (n > InternalBufferChars))
- this->alloc().deallocate(p, n);
- }
-
- void construct(pointer p, const value_type &value = value_type())
- {
- allocator_traits_type::construct
- ( this->alloc()
- , boost::movelib::to_raw_pointer(p)
- , value
- );
- }
-
- void destroy(pointer p, size_type n)
- {
- value_type *raw_p = boost::movelib::to_raw_pointer(p);
- for(; n--; ++raw_p){
- allocator_traits_type::destroy( this->alloc(), raw_p);
- }
- }
-
- void destroy(pointer p)
- {
- allocator_traits_type::destroy
- ( this->alloc()
- , boost::movelib::to_raw_pointer(p)
- );
- }
-
- void allocate_initial_block(size_type n)
- {
- if (n <= this->max_size()) {
- if(n > InternalBufferChars){
- size_type new_cap = this->next_capacity(n);
- pointer reuse = 0;
- pointer p = this->allocation_command(allocate_new, n, new_cap, reuse);
- this->is_short(false);
- this->priv_long_addr(p);
- this->priv_long_size(0);
- this->priv_storage(new_cap);
- }
- }
- else{
- throw_length_error("basic_string::allocate_initial_block max_size() exceeded");
- }
- }
-
- void deallocate_block()
- { this->deallocate(this->priv_addr(), this->priv_storage()); }
-
- size_type max_size() const
- { return allocator_traits_type::max_size(this->alloc()) - 1; }
-
- protected:
- size_type priv_capacity() const
- { return this->priv_storage() - 1; }
-
- pointer priv_short_addr() const
- { return pointer_traits::pointer_to(const_cast<value_type&>(this->members_.m_repr.short_repr().data[0])); }
-
- pointer priv_long_addr() const
- { return this->members_.m_repr.long_repr().start; }
-
- pointer priv_addr() const
- {
- return this->is_short()
- ? priv_short_addr()
- : priv_long_addr()
- ;
- }
-
- pointer priv_end_addr() const
- {
- return this->is_short()
- ? this->priv_short_addr() + this->priv_short_size()
- : this->priv_long_addr() + this->priv_long_size()
- ;
- }
-
- void priv_long_addr(pointer addr)
- { this->members_.m_repr.long_repr().start = addr; }
-
- size_type priv_storage() const
- { return this->is_short() ? priv_short_storage() : priv_long_storage(); }
-
- size_type priv_short_storage() const
- { return InternalBufferChars; }
-
- size_type priv_long_storage() const
- { return this->members_.m_repr.long_repr().storage; }
-
- void priv_storage(size_type storage)
- {
- if(!this->is_short())
- this->priv_long_storage(storage);
- }
-
- void priv_long_storage(size_type storage)
- {
- this->members_.m_repr.long_repr().storage = storage;
- }
-
- size_type priv_size() const
- { return this->is_short() ? this->priv_short_size() : this->priv_long_size(); }
-
- size_type priv_short_size() const
- { return this->members_.m_repr.short_repr().h.length; }
-
- size_type priv_long_size() const
- { return this->members_.m_repr.long_repr().length; }
-
- void priv_size(size_type sz)
- {
- if(this->is_short())
- this->priv_short_size(sz);
- else
- this->priv_long_size(sz);
- }
-
- void priv_short_size(size_type sz)
- {
- this->members_.m_repr.s.h.length = (unsigned char)sz;
- }
-
- void priv_long_size(size_type sz)
- {
- this->members_.m_repr.long_repr().length = sz;
- }
-
- void swap_data(basic_string_base& other)
- {
- if(this->is_short()){
- if(other.is_short()){
- repr_t tmp(this->members_.m_repr);
- this->members_.m_repr = other.members_.m_repr;
- other.members_.m_repr = tmp;
- }
- else{
- short_t short_backup(this->members_.m_repr.short_repr());
- this->members_.m_repr.short_repr().~short_t();
- ::new(&this->members_.m_repr.long_repr()) long_t(other.members_.m_repr.long_repr());
- other.members_.m_repr.long_repr().~long_t();
- ::new(&other.members_.m_repr.short_repr()) short_t(short_backup);
- }
- }
- else{
- if(other.is_short()){
- short_t short_backup(other.members_.m_repr.short_repr());
- other.members_.m_repr.short_repr().~short_t();
- ::new(&other.members_.m_repr.long_repr()) long_t(this->members_.m_repr.long_repr());
- this->members_.m_repr.long_repr().~long_t();
- ::new(&this->members_.m_repr.short_repr()) short_t(short_backup);
- }
- else{
- boost::adl_move_swap(this->members_.m_repr.long_repr(), other.members_.m_repr.long_repr());
- }
- }
- }
-};
-
-} //namespace dtl {
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! The basic_string class represents a Sequence of characters. It contains all the
-//! usual operations of a Sequence, and, additionally, it contains standard string
-//! operations such as search and concatenation.
-//!
-//! The basic_string class is parameterized by character type, and by that type's
-//! Character Traits.
-//!
-//! This class has performance characteristics very much like vector<>, meaning,
-//! for example, that it does not perform reference-count or copy-on-write, and that
-//! concatenation of two strings is an O(N) operation.
-//!
-//! Some of basic_string's member functions use an unusual method of specifying positions
-//! and ranges. In addition to the conventional method using iterators, many of
-//! basic_string's member functions use a single value pos of type size_type to represent a
-//! position (in which case the position is begin() + pos, and many of basic_string's
-//! member functions use two values, pos and n, to represent a range. In that case pos is
-//! the beginning of the range and n is its size. That is, the range is
-//! [begin() + pos, begin() + pos + n).
-//!
-//! Note that the C++ standard does not specify the complexity of basic_string operations.
-//! In this implementation, basic_string has performance characteristics very similar to
-//! those of vector: access to a single character is O(1), while copy and concatenation
-//! are O(N).
-//!
-//! In this implementation, begin(),
-//! end(), rbegin(), rend(), operator[], c_str(), and data() do not invalidate iterators.
-//! In this implementation, iterators are only invalidated by member functions that
-//! explicitly change the string's contents.
-//!
-//! \tparam CharT The type of character it contains.
-//! \tparam Traits The Character Traits type, which encapsulates basic character operations
-//! \tparam Allocator The allocator, used for internal memory management.
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-template <class CharT, class Traits = std::char_traits<CharT>, class Allocator = new_allocator<CharT> >
-#else
-template <class CharT, class Traits, class Allocator>
-#endif
-class basic_string
- : private dtl::basic_string_base<Allocator>
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- typedef allocator_traits<Allocator> allocator_traits_type;
- BOOST_COPYABLE_AND_MOVABLE(basic_string)
- typedef dtl::basic_string_base<Allocator> base_t;
- static const typename base_t::size_type InternalBufferChars = base_t::InternalBufferChars;
-
- protected:
- // Allocator helper class to use a char_traits as a function object.
-
- template <class Tr>
- struct Eq_traits
- {
- //Compatibility with std::binary_function
- typedef typename Tr::char_type first_argument_type;
- typedef typename Tr::char_type second_argument_type;
- typedef bool result_type;
-
- bool operator()(const first_argument_type& x, const second_argument_type& y) const
- { return Tr::eq(x, y); }
- };
-
- template <class Tr>
- struct Not_within_traits
- {
- typedef typename Tr::char_type argument_type;
- typedef bool result_type;
-
- typedef const typename Tr::char_type* Pointer;
- const Pointer m_first;
- const Pointer m_last;
-
- Not_within_traits(Pointer f, Pointer l)
- : m_first(f), m_last(l) {}
-
- bool operator()(const typename Tr::char_type& x) const
- {
- return boost::container::find_if(m_first, m_last,
- boost::container::bind1st(Eq_traits<Tr>(), x)) == m_last;
- }
- };
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
- typedef Traits traits_type;
- typedef CharT value_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(pointer) iterator;
- typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
- static const size_type npos = size_type(-1);
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- typedef constant_iterator<CharT, difference_type> cvalue_iterator;
- typedef typename base_t::alloc_version alloc_version;
- typedef ::boost::intrusive::pointer_traits<pointer> pointer_traits;
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public: // Constructor, destructor, assignment.
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- struct reserve_t {};
-
- basic_string(reserve_t, size_type n,
- const allocator_type& a = allocator_type())
- //Select allocator as in copy constructor as reserve_t-based constructors
- //are two step copies optimized for capacity
- : base_t( allocator_traits_type::select_on_container_copy_construction(a)
- , n + 1)
- { this->priv_terminate_string(); }
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Default constructs a basic_string.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor throws.
- basic_string() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : base_t()
- { this->priv_terminate_string(); }
-
-
- //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter.
- //!
- //! <b>Throws</b>: Nothing
- explicit basic_string(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
- : base_t(a)
- { this->priv_terminate_string(); }
-
- //! <b>Effects</b>: Copy constructs a basic_string.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocator_type's default constructor or allocation throws.
- basic_string(const basic_string& s)
- : base_t(allocator_traits_type::select_on_container_copy_construction(s.alloc()))
- {
- this->priv_terminate_string();
- this->assign(s.begin(), s.end());
- }
-
- //! <b>Effects</b>: Same as basic_string(sv.data(), sv.size(), a).
- //!
- //! <b>Throws</b>: If allocator_type's default constructor or allocation throws.
- template<template <class, class> class BasicStringView>
- explicit basic_string(BasicStringView<CharT, Traits> sv, const Allocator& a = Allocator())
- : base_t(allocator_traits_type::select_on_container_copy_construction(a))
- {
- this->priv_terminate_string();
- this->assign(sv);
- }
-
- //! <b>Effects</b>: Move constructor. Moves s's resources to *this.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- basic_string(BOOST_RV_REF(basic_string) s) BOOST_NOEXCEPT_OR_NOTHROW
- : base_t(boost::move(s.alloc()))
- {
- if(s.alloc() == this->alloc()){
- this->swap_data(s);
- }
- else{
- this->assign(s.begin(), s.end());
- }
- }
-
- //! <b>Effects</b>: Copy constructs a basic_string using the specified allocator.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocation throws.
- basic_string(const basic_string& s, const allocator_type &a)
- : base_t(a)
- {
- this->priv_terminate_string();
- this->assign(s.begin(), s.end());
- }
-
- //! <b>Effects</b>: Move constructor using the specified allocator.
- //! Moves s's resources to *this.
- //!
- //! <b>Throws</b>: If allocation throws.
- //!
- //! <b>Complexity</b>: Constant if a == s.get_allocator(), linear otherwise.
- basic_string(BOOST_RV_REF(basic_string) s, const allocator_type &a)
- : base_t(a)
- {
- this->priv_terminate_string();
- if(a == this->alloc()){
- this->swap_data(s);
- }
- else{
- this->assign(s.begin(), s.end());
- }
- }
-
- //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
- //! and is initialized by a specific number of characters of the s string.
- basic_string(const basic_string& s, size_type pos, size_type n = npos)
- : base_t()
- {
- this->priv_terminate_string();
- if (pos > s.size())
- throw_out_of_range("basic_string::basic_string out of range position");
- else
- this->assign
- (s.begin() + pos, s.begin() + pos + dtl::min_value(n, s.size() - pos));
- }
-
- //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
- //! and is initialized by a specific number of characters of the s string.
- basic_string(const basic_string& s, size_type pos, size_type n, const allocator_type& a)
- : base_t(a)
- {
- this->priv_terminate_string();
- if (pos > s.size())
- throw_out_of_range("basic_string::basic_string out of range position");
- else
- this->assign
- (s.begin() + pos, s.begin() + pos + dtl::min_value(n, s.size() - pos));
- }
-
- //! <b>Effects</b>: Constructs a basic_string taking a default-constructed allocator,
- //! and is initialized by a specific number of characters of the s c-string.
- basic_string(const CharT* s, size_type n)
- : base_t()
- {
- this->priv_terminate_string();
- this->assign(s, s + n);
- }
-
- //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
- //! and is initialized by a specific number of characters of the s c-string.
- basic_string(const CharT* s, size_type n, const allocator_type& a)
- : base_t(a)
- {
- this->priv_terminate_string();
- this->assign(s, s + n);
- }
-
- //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
- //! and is initialized by the null-terminated s c-string.
- basic_string(const CharT* s)
- : base_t()
- {
- this->priv_terminate_string();
- this->assign(s, s + Traits::length(s));
- }
-
- //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
- //! and is initialized by the null-terminated s c-string.
- basic_string(const CharT* s, const allocator_type& a)
- : base_t(a)
- {
- this->priv_terminate_string();
- this->assign(s, s + Traits::length(s));
- }
-
-
- //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
- //! and is initialized by n copies of c.
- basic_string(size_type n, CharT c)
- : base_t()
- {
- this->priv_terminate_string();
- this->assign(n, c);
- }
-
- //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
- //! and is initialized by n copies of c.
- basic_string(size_type n, CharT c, const allocator_type& a)
- : base_t(a)
- {
- this->priv_terminate_string();
- this->assign(n, c);
- }
-
- //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
- //! and is initialized by n default-initialized characters.
- basic_string(size_type n, default_init_t)
- : base_t(n + 1)
- {
- this->priv_size(n);
- this->priv_terminate_string();
- }
-
- //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
- //! and is initialized by n default-initialized characters.
- basic_string(size_type n, default_init_t, const allocator_type& a)
- : base_t(a, n + 1)
- {
- this->priv_size(n);
- this->priv_terminate_string();
- }
-
- //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
- //! and a range of iterators.
- template <class InputIterator>
- basic_string(InputIterator f, InputIterator l)
- : base_t()
- {
- this->priv_terminate_string();
- this->assign(f, l);
- }
-
- //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
- //! and a range of iterators.
- template <class InputIterator>
- basic_string(InputIterator f, InputIterator l, const allocator_type& a)
- : base_t(a)
- {
- this->priv_terminate_string();
- this->assign(f, l);
- }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Same as basic_string(il.begin(), il.end(), a).
- //!
- basic_string(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
- : base_t(a)
- {
- this->priv_terminate_string();
- this->assign(il.begin(), il.end());
- }
- #endif
-
- //! <b>Effects</b>: Destroys the basic_string. All used memory is deallocated.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- ~basic_string() BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
- //! <b>Effects</b>: Copy constructs a string.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- basic_string& operator=(BOOST_COPY_ASSIGN_REF(basic_string) x)
- {
- if (&x != this){
- allocator_type &this_alloc = this->alloc();
- const allocator_type &x_alloc = x.alloc();
- dtl::bool_<allocator_traits_type::
- propagate_on_container_copy_assignment::value> flag;
- if(flag && this_alloc != x_alloc){
- if(!this->is_short()){
- this->deallocate_block();
- this->is_short(true);
- Traits::assign(*this->priv_addr(), CharT(0));
- this->priv_short_size(0);
- }
- }
- dtl::assign_alloc(this->alloc(), x.alloc(), flag);
- this->assign(x.begin(), x.end());
- }
- return *this;
- }
-
- //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and allocation throws
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- basic_string& operator=(BOOST_RV_REF(basic_string) x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
- || allocator_traits_type::is_always_equal::value)
- {
- //for move constructor, no aliasing (&x != this) is assummed.
- BOOST_ASSERT(this != &x);
- allocator_type &this_alloc = this->alloc();
- allocator_type &x_alloc = x.alloc();
- const bool propagate_alloc = allocator_traits_type::
- propagate_on_container_move_assignment::value;
- dtl::bool_<propagate_alloc> flag;
- const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
- //Resources can be transferred if both allocators are
- //going to be equal after this function (either propagated or already equal)
- if(propagate_alloc || allocators_equal){
- //Destroy objects but retain memory in case x reuses it in the future
- this->clear();
- //Move allocator if needed
- dtl::move_alloc(this_alloc, x_alloc, flag);
- //Nothrow swap
- this->swap_data(x);
- }
- //Else do a one by one move
- else{
- this->assign( x.begin(), x.end());
- }
- return *this;
- }
-
- //! <b>Effects</b>: Assignment from a null-terminated c-string.
- //!
- basic_string& operator=(const CharT* s)
- { return this->assign(s, s + Traits::length(s)); }
-
- //! <b>Effects</b>: Returns *this = basic_string(1, c).
- //!
- basic_string& operator=(CharT c)
- { return this->assign(static_cast<size_type>(1), c); }
-
- //! <b>Effects</b>: Equivalent to return assign(sv).
- //!
- template<template <class, class> class BasicStringView>
- basic_string& operator=(BasicStringView<CharT, Traits> sv)
- { return this->assign(sv.data(), sv.size()); }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Returns *this = basic_string(il);
- //!
- basic_string& operator=(std::initializer_list<CharT> il)
- {
- return this->assign(il.begin(), il.end());
- }
- #endif
-
- //! <b>Effects</b>: Returns a copy of the internal allocator.
- //!
- //! <b>Throws</b>: If allocator's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->alloc(); }
-
- //////////////////////////////////////////////
- //
- // iterators
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_addr(); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_addr(); }
-
- //! <b>Effects</b>: Returns an iterator to the end of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_end_addr(); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_end_addr(); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(this->priv_end_addr()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->crbegin(); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(this->priv_addr()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->crend(); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_addr(); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_end_addr(); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->priv_end_addr()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->priv_addr()); }
-
- //////////////////////////////////////////////
- //
- // capacity
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns true if the vector contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
- { return !this->priv_size(); }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_size(); }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type length() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->size(); }
-
- //! <b>Effects</b>: Returns the largest possible size of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return base_t::max_size(); }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are copy constructed from x.
- //!
- //! <b>Throws</b>: If memory allocation throws
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type n, CharT c)
- {
- if (n <= this->size())
- this->erase(this->begin() + n, this->end());
- else
- this->append(n - this->size(), c);
- }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are value initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type n)
- { resize(n, CharT()); }
-
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are uninitialized.
- //!
- //! <b>Throws</b>: If memory allocation throws
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- //!
- //! <b>Note</b>: Non-standard extension
- void resize(size_type n, default_init_t)
- {
- if (n <= this->size())
- this->erase(this->begin() + n, this->end());
- else{
- this->priv_reserve(n, false);
- this->priv_size(n);
- this->priv_terminate_string();
- }
- }
-
- //! <b>Effects</b>: Number of elements for which memory has been allocated.
- //! capacity() is always greater than or equal to size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_capacity(); }
-
- //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
- //! effect. Otherwise, it is a request for allocation of additional memory.
- //! If the request is successful, then capacity() is greater than or equal to
- //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
- //!
- //! <b>Throws</b>: If memory allocation allocation throws
- void reserve(size_type res_arg)
- { this->priv_reserve(res_arg); }
-
- //! <b>Effects</b>: Tries to deallocate the excess of memory created
- //! with previous allocations. The size of the string is unchanged
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Linear to size().
- void shrink_to_fit()
- {
- //Check if shrinking is possible
- if(this->priv_storage() > InternalBufferChars){
- //Check if we should pass from dynamically allocated buffer
- //to the internal storage
- if(this->priv_size() < InternalBufferChars){
- //Dynamically allocated buffer attributes
- pointer long_addr = this->priv_long_addr();
- size_type long_storage = this->priv_long_storage();
- size_type long_size = this->priv_long_size();
- //Shrink from allocated buffer to the internal one, including trailing null
- Traits::copy( boost::movelib::to_raw_pointer(this->priv_short_addr())
- , boost::movelib::to_raw_pointer(long_addr)
- , long_size+1);
- this->is_short(true);
- this->alloc().deallocate(long_addr, long_storage);
- }
- else{
- //Shrinking in dynamic buffer
- this->priv_shrink_to_fit_dynamic_buffer(alloc_version());
- }
- }
- }
-
- //////////////////////////////////////////////
- //
- // element access
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the first
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference front() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *this->priv_addr();
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the first
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *this->priv_addr();
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the last
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *(this->priv_addr() + (this->size() - 1u) );
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the last
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *(this->priv_addr() + (this->size() - 1u) );
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() > n);
- return *(this->priv_addr() + n);
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a const reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->size() > n);
- return *(this->priv_addr() + n);
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: std::range_error if n >= size()
- //!
- //! <b>Complexity</b>: Constant.
- reference at(size_type n)
- {
- if (n >= this->size())
- throw_out_of_range("basic_string::at invalid subscript");
- return *(this->priv_addr() + n);
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a const reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: std::range_error if n >= size()
- //!
- //! <b>Complexity</b>: Constant.
- const_reference at(size_type n) const {
- if (n >= this->size())
- throw_out_of_range("basic_string::at invalid subscript");
- return *(this->priv_addr() + n);
- }
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Calls append(str.data, str.size()).
- //!
- //! <b>Returns</b>: *this
- basic_string& operator+=(const basic_string& s)
- { return this->append(s); }
-
- //! <b>Effects</b>: Same as `return append(sv)`.
- //!
- template<template<class, class> class BasicStringView>
- basic_string& operator+=(BasicStringView<CharT, Traits> sv)
- {
- return this->append(sv);
- }
-
- //! <b>Effects</b>: Calls append(s).
- //!
- //! <b>Returns</b>: *this
- basic_string& operator+=(const CharT* s)
- { return this->append(s); }
-
- //! <b>Effects</b>: Calls append(1, c).
- //!
- //! <b>Returns</b>: *this
- basic_string& operator+=(CharT c)
- { this->push_back(c); return *this; }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Returns append(il)
- //!
- basic_string& operator+=(std::initializer_list<CharT> il)
- {
- return this->append(il);
- }
- #endif
-
- //! <b>Effects</b>: Calls append(str.data(), str.size()).
- //!
- //! <b>Returns</b>: *this
- basic_string& append(const basic_string& s)
- { return this->append(s.begin(), s.end()); }
-
- //! <b>Effects</b>: Same as return append(sv.data(), sv.size()).
- //!
- template<template<class, class> class BasicStringView>
- basic_string& append(BasicStringView<CharT, Traits> sv)
- { return this->append(sv.data(), sv.size()); }
-
- //! <b>Requires</b>: pos <= str.size()
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to append
- //! as the smaller of n and str.size() - pos and calls append(str.data() + pos, rlen).
- //!
- //! <b>Throws</b>: If memory allocation throws and out_of_range if pos > str.size()
- //!
- //! <b>Returns</b>: *this
- basic_string& append(const basic_string& s, size_type pos, size_type n = npos)
- {
- if (pos > s.size())
- throw_out_of_range("basic_string::append out of range position");
- return this->append(s.begin() + pos,
- s.begin() + pos + dtl::min_value(n, s.size() - pos));
- }
-
- //! <b>Requires</b>: s points to an array of at least n elements of CharT.
- //!
- //! <b>Effects</b>: The function replaces the string controlled by *this with
- //! a string of length size() + n whose irst size() elements are a copy of the
- //! original string controlled by *this and whose remaining
- //! elements are a copy of the initial n elements of s.
- //!
- //! <b>Throws</b>: If memory allocation throws length_error if size() + n > max_size().
- //!
- //! <b>Returns</b>: *this
- basic_string& append(const CharT* s, size_type n)
- { return this->append(s, s + n); }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Effects</b>: Calls append(s, traits::length(s)).
- //!
- //! <b>Returns</b>: *this
- basic_string& append(const CharT* s)
- { return this->append(s, s + Traits::length(s)); }
-
- //! <b>Effects</b>: Equivalent to append(basic_string(n, c)).
- //!
- //! <b>Returns</b>: *this
- basic_string& append(size_type n, CharT c)
- { return this->append(cvalue_iterator(c, n), cvalue_iterator()); }
-
- //! <b>Requires</b>: [first,last) is a valid range.
- //!
- //! <b>Effects</b>: Equivalent to append(basic_string(first, last)).
- //!
- //! <b>Returns</b>: *this
- template <class InputIter>
- basic_string& append(InputIter first, InputIter last)
- { this->insert(this->end(), first, last); return *this; }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Returns append(il.begin(), il.size()).
- //!
- basic_string& append(std::initializer_list<CharT> il)
- {
- return this->append(il.begin(), il.size());
- }
- #endif
-
- //! <b>Effects</b>: Equivalent to append(static_cast<size_type>(1), c).
- //!
- void push_back(CharT c)
- {
- const size_type old_size = this->priv_size();
- if (old_size < this->capacity()){
- const pointer addr = this->priv_addr();
- this->priv_construct_null(addr + old_size + 1);
- Traits::assign(addr[old_size], c);
- this->priv_size(old_size+1);
- }
- else{
- //No enough memory, insert a new object at the end
- this->append(size_type(1), c);
- }
- }
-
- //! <b>Effects</b>: Equivalent to assign(str, 0, npos).
- //!
- //! <b>Returns</b>: *this
- basic_string& assign(const basic_string& s)
- { return this->operator=(s); }
-
- //! <b>Effects</b>: Equivalent to return assign(sv.data(), sv.size()).
- //!
- //! <b>Returns</b>: *this
- template<template <class, class> class BasicStringView>
- basic_string& assign(BasicStringView<CharT, Traits> sv)
- { return this->operator=(sv); }
-
- //! <b>Effects</b>: The function replaces the string controlled by *this
- //! with a string of length str.size() whose elements are a copy of the string
- //! controlled by str. Leaves str in a valid but unspecified state.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: *this
- basic_string& assign(BOOST_RV_REF(basic_string) ms) BOOST_NOEXCEPT_OR_NOTHROW
- { return this->swap_data(ms), *this; }
-
- //! <b>Requires</b>: pos <= str.size()
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to assign as
- //! the smaller of n and str.size() - pos and calls assign(str.data() + pos rlen).
- //!
- //! <b>Throws</b>: If memory allocation throws or out_of_range if pos > str.size().
- //!
- //! <b>Returns</b>: *this
- basic_string& assign(const basic_string& s, size_type pos, size_type n)
- {
- if (pos > s.size())
- throw_out_of_range("basic_string::assign out of range position");
- return this->assign(s.begin() + pos,
- s.begin() + pos + dtl::min_value(n, s.size() - pos));
- }
-
- //! <b>Requires</b>: s points to an array of at least n elements of CharT.
- //!
- //! <b>Effects</b>: Replaces the string controlled by *this with a string of
- //! length n whose elements are a copy of those pointed to by s.
- //!
- //! <b>Throws</b>: If memory allocation throws or length_error if n > max_size().
- //!
- //! <b>Returns</b>: *this
- basic_string& assign(const CharT* s, size_type n)
- { return this->assign(s, s + n); }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Effects</b>: Calls assign(s, traits::length(s)).
- //!
- //! <b>Returns</b>: *this
- basic_string& assign(const CharT* s)
- { return this->assign(s, s + Traits::length(s)); }
-
- //! <b>Effects</b>: Equivalent to assign(basic_string(n, c)).
- //!
- //! <b>Returns</b>: *this
- basic_string& assign(size_type n, CharT c)
- { return this->assign(cvalue_iterator(c, n), cvalue_iterator()); }
-
- //! <b>Effects</b>: Equivalent to assign(basic_string(first, last)).
- //!
- //! <b>Returns</b>: *this
- basic_string& assign(const CharT* first, const CharT* last)
- {
- size_type n = static_cast<size_type>(last - first);
- this->reserve(n);
- CharT* ptr = boost::movelib::to_raw_pointer(this->priv_addr());
- Traits::copy(ptr, first, n);
- this->priv_construct_null(ptr + n);
- this->priv_size(n);
- return *this;
- }
-
- //! <b>Effects</b>: Equivalent to assign(basic_string(first, last)).
- //!
- //! <b>Returns</b>: *this
- template <class InputIter>
- basic_string& assign(InputIter first, InputIter last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_convertible<InputIter, size_type>::type * = 0
- #endif
- )
- {
- size_type cur = 0;
- const pointer addr = this->priv_addr();
- CharT *ptr = boost::movelib::to_raw_pointer(addr);
- const size_type old_size = this->priv_size();
- while (first != last && cur != old_size) {
- Traits::assign(*ptr, *first);
- ++first;
- ++cur;
- ++ptr;
- }
- if (first == last)
- this->erase(addr + cur, addr + old_size);
- else
- this->append(first, last);
- return *this;
- }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Returns assign(il.begin(), il.size()).
- //!
- basic_string& assign(std::initializer_list<CharT> il)
- {
- return this->assign(il.begin(), il.size());
- }
- #endif
-
- //! <b>Requires</b>: pos <= size().
- //!
- //! <b>Effects</b>: Calls insert(pos, str.data(), str.size()).
- //!
- //! <b>Throws</b>: If memory allocation throws or out_of_range if pos > size().
- //!
- //! <b>Returns</b>: *this
- basic_string& insert(size_type pos, const basic_string& s)
- {
- const size_type sz = this->size();
- if (pos > sz)
- throw_out_of_range("basic_string::insert out of range position");
- if (sz > this->max_size() - s.size())
- throw_length_error("basic_string::insert max_size() exceeded");
- this->insert(this->priv_addr() + pos, s.begin(), s.end());
- return *this;
- }
-
- //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size()
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to insert as
- //! the smaller of n and str.size() - pos2 and calls insert(pos1, str.data() + pos2, rlen).
- //!
- //! <b>Throws</b>: If memory allocation throws or out_of_range if pos1 > size() or pos2 > str.size().
- //!
- //! <b>Returns</b>: *this
- basic_string& insert(size_type pos1, const basic_string& s, size_type pos2, size_type n = npos)
- {
- const size_type sz = this->size();
- const size_type str_size = s.size();
- if (pos1 > sz || pos2 > str_size)
- throw_out_of_range("basic_string::insert out of range position");
- size_type len = dtl::min_value(n, str_size - pos2);
- if (sz > this->max_size() - len)
- throw_length_error("basic_string::insert max_size() exceeded");
- const CharT *beg_ptr = boost::movelib::to_raw_pointer(s.begin()) + pos2;
- const CharT *end_ptr = beg_ptr + len;
- this->insert(this->priv_addr() + pos1, beg_ptr, end_ptr);
- return *this;
- }
-
- //! <b>Requires</b>: s points to an array of at least n elements of CharT and pos <= size().
- //!
- //! <b>Effects</b>: Replaces the string controlled by *this with a string of length size() + n
- //! whose first pos elements are a copy of the initial elements of the original string
- //! controlled by *this and whose next n elements are a copy of the elements in s and whose
- //! remaining elements are a copy of the remaining elements of the original string controlled by *this.
- //!
- //! <b>Throws</b>: If memory allocation throws, out_of_range if pos > size() or
- //! length_error if size() + n > max_size().
- //!
- //! <b>Returns</b>: *this
- basic_string& insert(size_type pos, const CharT* s, size_type n)
- {
- if (pos > this->size())
- throw_out_of_range("basic_string::insert out of range position");
- if (this->size() > this->max_size() - n)
- throw_length_error("basic_string::insert max_size() exceeded");
- this->insert(this->priv_addr() + pos, s, s + n);
- return *this;
- }
-
- //! <b>Requires</b>: pos <= size() and s points to an array of at least traits::length(s) + 1 elements of CharT
- //!
- //! <b>Effects</b>: Calls insert(pos, s, traits::length(s)).
- //!
- //! <b>Throws</b>: If memory allocation throws, out_of_range if pos > size()
- //! length_error if size() > max_size() - Traits::length(s)
- //!
- //! <b>Returns</b>: *this
- basic_string& insert(size_type pos, const CharT* s)
- {
- if (pos > this->size())
- throw_out_of_range("basic_string::insert out of range position");
- size_type len = Traits::length(s);
- if (this->size() > this->max_size() - len)
- throw_length_error("basic_string::insert max_size() exceeded");
- this->insert(this->priv_addr() + pos, s, s + len);
- return *this;
- }
-
- //! <b>Effects</b>: Equivalent to insert(pos, basic_string(n, c)).
- //!
- //! <b>Throws</b>: If memory allocation throws, out_of_range if pos > size()
- //! length_error if size() > max_size() - n
- //!
- //! <b>Returns</b>: *this
- basic_string& insert(size_type pos, size_type n, CharT c)
- {
- if (pos > this->size())
- throw_out_of_range("basic_string::insert out of range position");
- if (this->size() > this->max_size() - n)
- throw_length_error("basic_string::insert max_size() exceeded");
- this->insert(const_iterator(this->priv_addr() + pos), n, c);
- return *this;
- }
-
- //! <b>Effects</b>: Same as `return insert(pos, sv.data(), sv.size())`.
- //!
- template<template<class, class> class BasicStringView>
- basic_string& insert(size_type pos, BasicStringView<CharT, Traits> sv)
- { return this->insert(pos, sv.data(), sv.size()); }
-
- //! <b>Requires</b>: p is a valid iterator on *this.
- //!
- //! <b>Effects</b>: inserts a copy of c before the character referred to by p.
- //!
- //! <b>Returns</b>: An iterator which refers to the copy of the inserted character.
- iterator insert(const_iterator p, CharT c)
- {
- size_type new_offset = p - this->priv_addr();
- this->insert(p, cvalue_iterator(c, 1), cvalue_iterator());
- return this->priv_addr() + new_offset;
- }
-
- //! <b>Requires</b>: p is a valid iterator on *this.
- //!
- //! <b>Effects</b>: Inserts n copies of c before the character referred to by p.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
- iterator insert(const_iterator p, size_type n, CharT c)
- { return this->insert(p, cvalue_iterator(c, n), cvalue_iterator()); }
-
- //! <b>Requires</b>: p is a valid iterator on *this. [first,last) is a valid range.
- //!
- //! <b>Effects</b>: Equivalent to insert(p - begin(), basic_string(first, last)).
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
- template <class InputIter>
- iterator insert(const_iterator p, InputIter first, InputIter last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<InputIter, size_type>
- , dtl::is_not_input_iterator<InputIter>
- >::type * = 0
- #endif
- )
- {
- const size_type n_pos = p - this->cbegin();
- for ( ; first != last; ++first, ++p) {
- p = this->insert(p, *first);
- }
- return this->begin() + n_pos;
- }
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class ForwardIter>
- iterator insert(const_iterator p, ForwardIter first, ForwardIter last
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<ForwardIter, size_type>
- , dtl::is_input_iterator<ForwardIter>
- >::type * = 0
- )
- {
- const size_type n_pos = p - this->cbegin();
- if (first != last) {
- const size_type n = boost::container::iterator_distance(first, last);
- const size_type old_size = this->priv_size();
- const size_type remaining = this->capacity() - old_size;
- const pointer old_start = this->priv_addr();
- bool enough_capacity = false;
- size_type new_cap = 0;
-
- //Check if we have enough capacity
- pointer hint = pointer();
- pointer allocation_ret = pointer();
- if (remaining >= n){
- enough_capacity = true;
- }
- else {
- //Otherwise expand current buffer or allocate new storage
- new_cap = this->next_capacity(n);
- hint = old_start;
- allocation_ret = this->allocation_command
- (allocate_new | expand_fwd | expand_bwd, old_size + n + 1, new_cap, hint);
-
- //Check forward expansion
- if(old_start == allocation_ret){
- enough_capacity = true;
- this->priv_storage(new_cap);
- }
- }
-
- //Reuse same buffer
- if(enough_capacity){
- const size_type elems_after = old_size - (p - old_start);
- const size_type old_length = old_size;
- if (elems_after >= n) {
- const pointer pointer_past_last = old_start + old_size + 1;
- priv_uninitialized_copy(old_start + (old_size - n + 1),
- pointer_past_last, pointer_past_last);
-
- this->priv_size(old_size+n);
- Traits::move(const_cast<CharT*>(boost::movelib::to_raw_pointer(p + n)),
- boost::movelib::to_raw_pointer(p),
- (elems_after - n) + 1);
- this->priv_copy(first, last, const_cast<CharT*>(boost::movelib::to_raw_pointer(p)));
- }
- else {
- ForwardIter mid = first;
- boost::container::iterator_advance(mid, elems_after + 1);
-
- priv_uninitialized_copy(mid, last, old_start + old_size + 1);
- const size_type newer_size = old_size + (n - elems_after);
- this->priv_size(newer_size);
- priv_uninitialized_copy
- (p, const_iterator(old_start + old_length + 1),
- old_start + newer_size);
- this->priv_size(newer_size + elems_after);
- this->priv_copy(first, mid, const_cast<CharT*>(boost::movelib::to_raw_pointer(p)));
- }
- }
- else{
- pointer new_start = allocation_ret;
- if(!hint){
- //Copy data to new buffer
- size_type new_length = 0;
- //This can't throw, since characters are POD
- new_length += priv_uninitialized_copy
- (const_iterator(old_start), p, new_start);
- new_length += priv_uninitialized_copy
- (first, last, new_start + new_length);
- new_length += priv_uninitialized_copy
- (p, const_iterator(old_start + old_size),
- new_start + new_length);
- this->priv_construct_null(new_start + new_length);
-
- this->deallocate_block();
- this->is_short(false);
- this->priv_long_addr(new_start);
- this->priv_long_size(new_length);
- this->priv_long_storage(new_cap);
- }
- else{
- //value_type is POD, so backwards expansion is much easier
- //than with vector<T>
- value_type * const oldbuf = boost::movelib::to_raw_pointer(old_start);
- value_type * const newbuf = boost::movelib::to_raw_pointer(new_start);
- const value_type *const pos = boost::movelib::to_raw_pointer(p);
- const size_type before = pos - oldbuf;
-
- //First move old data
- Traits::move(newbuf, oldbuf, before);
- Traits::move(newbuf + before + n, pos, old_size - before);
- //Now initialize the new data
- priv_uninitialized_copy(first, last, new_start + before);
- this->priv_construct_null(new_start + (old_size + n));
- this->is_short(false);
- this->priv_long_addr(new_start);
- this->priv_long_size(old_size + n);
- this->priv_long_storage(new_cap);
- }
- }
- }
- return this->begin() + n_pos;
- }
- #endif
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: As if by insert(p, il.begin(), il.end()).
- //!
- //! <b>Returns</b>: An iterator which refers to the copy of the first inserted
- //! character, or p if i1 is empty.
- iterator insert(const_iterator p, std::initializer_list<CharT> il)
- {
- return this->insert(p, il.begin(), il.end());
- }
- #endif
-
- //! <b>Effects</b>: Removes the last element from the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- iterator p = this->end();
- this->erase(--p);
- }
-
- //! <b>Requires</b>: pos <= size()
- //!
- //! <b>Effects</b>: Determines the effective length xlen of the string to be removed as the smaller of n and size() - pos.
- //! The function then replaces the string controlled by *this with a string of length size() - xlen
- //! whose first pos elements are a copy of the initial elements of the original string controlled by *this,
- //! and whose remaining elements are a copy of the elements of the original string controlled by *this
- //! beginning at position pos + xlen.
- //!
- //! <b>Throws</b>: out_of_range if pos > size().
- //!
- //! <b>Returns</b>: *this
- basic_string& erase(size_type pos = 0, size_type n = npos)
- {
- if (pos > this->size())
- throw_out_of_range("basic_string::erase out of range position");
- const pointer addr = this->priv_addr();
- erase(addr + pos, addr + pos + dtl::min_value(n, this->size() - pos));
- return *this;
- }
-
- //! <b>Effects</b>: Removes the character referred to by p.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: An iterator which points to the element immediately following p prior to the element being
- //! erased. If no such element exists, end() is returned.
- iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- // The move includes the terminating null.
- CharT * const ptr = const_cast<CharT*>(boost::movelib::to_raw_pointer(p));
- const size_type old_size = this->priv_size();
- Traits::move(ptr,
- boost::movelib::to_raw_pointer(p + 1),
- old_size - (p - this->priv_addr()));
- this->priv_size(old_size-1);
- return iterator(ptr);
- }
-
- //! <b>Requires</b>: first and last are valid iterators on *this, defining a range [first,last).
- //!
- //! <b>Effects</b>: Removes the characters in the range [first,last).
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: An iterator which points to the element pointed to by last prior to
- //! the other elements being erased. If no such element exists, end() is returned.
- iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
- {
- CharT * f = const_cast<CharT*>(boost::movelib::to_raw_pointer(first));
- if (first != last) { // The move includes the terminating null.
- const size_type num_erased = last - first;
- const size_type old_size = this->priv_size();
- Traits::move(f,
- boost::movelib::to_raw_pointer(last),
- (old_size + 1)-(last - this->priv_addr()));
- const size_type new_length = old_size - num_erased;
- this->priv_size(new_length);
- }
- return iterator(f);
- }
-
- //! <b>Effects</b>: Erases all the elements of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the vector.
- void clear() BOOST_NOEXCEPT_OR_NOTHROW
- {
- if (!this->empty()) {
- Traits::assign(*this->priv_addr(), CharT(0));
- this->priv_size(0);
- }
- }
-
- //! <b>Requires</b>: pos1 <= size().
- //!
- //! <b>Effects</b>: Calls replace(pos1, n1, str.data(), str.size()).
- //!
- //! <b>Throws</b>: if memory allocation throws or out_of_range if pos1 > size().
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(size_type pos1, size_type n1, const basic_string& str)
- {
- if (pos1 > this->size())
- throw_out_of_range("basic_string::replace out of range position");
- const size_type len = dtl::min_value(n1, this->size() - pos1);
- if (this->size() - len >= this->max_size() - str.size())
- throw_length_error("basic_string::replace max_size() exceeded");
- const pointer addr = this->priv_addr();
- return this->replace( const_iterator(addr + pos1)
- , const_iterator(addr + pos1 + len)
- , str.begin(), str.end());
- }
-
- //! <b>Effects</b>: Calls `return replace(pos1, n1, sv.data(), sv.size());`.
- //!
- template<template<class, class> class BasicStringView>
- basic_string& replace(size_type pos1, size_type n1, BasicStringView<CharT, Traits> sv)
- {
- return this->replace(pos1, n1, sv.data(), sv.size());
- }
-
- //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size().
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to be
- //! inserted as the smaller of n2 and str.size() - pos2 and calls
- //! replace(pos1, n1, str.data() + pos2, rlen).
- //!
- //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or pos2 > str.size().
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(size_type pos1, size_type n1,
- const basic_string& str, size_type pos2, size_type n2 = npos)
- {
- if (pos2 > str.size())
- throw_out_of_range("basic_string::replace out of range position");
- return this->replace(pos1, n1, str.data()+pos2, dtl::min_value(n2, str.size() - pos2));
- }
-
- //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > sv.size().
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to be inserted as the
- //! smaller of n2 and sv.size() - pos2 and calls `replace(pos1, n1, sv.data() + pos2, rlen)`.
- //!
- //! <b>Returns</b>: *this.
- template<template<class, class> class BasicStringView>
- basic_string& replace(size_type pos1, size_type n1, BasicStringView<CharT, Traits> sv,
- size_type pos2, size_type n2 = npos)
- {
- if (pos2 > sv.size())
- throw_out_of_range("basic_string::replace out of range position");
- return this->replace(pos1, n1, sv.data()+pos2, dtl::min_value(n2, sv.size() - pos2));
- }
-
- //! <b>Requires</b>: pos1 <= size() and s points to an array of at least n2 elements of CharT.
- //!
- //! <b>Effects</b>: Determines the effective length xlen of the string to be removed as the
- //! smaller of n1 and size() - pos1. If size() - xlen >= max_size() - n2 throws length_error.
- //! Otherwise, the function replaces the string controlled by *this with a string of
- //! length size() - xlen + n2 whose first pos1 elements are a copy of the initial elements
- //! of the original string controlled by *this, whose next n2 elements are a copy of the
- //! initial n2 elements of s, and whose remaining elements are a copy of the elements of
- //! the original string controlled by *this beginning at position pos + xlen.
- //!
- //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or length_error
- //! if the length of the resulting string would exceed max_size()
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(size_type pos1, size_type n1, const CharT* s, size_type n2)
- {
- if (pos1 > this->size())
- throw_out_of_range("basic_string::replace out of range position");
- const size_type len = dtl::min_value(n1, this->size() - pos1);
- const size_type max_size = this->max_size();
- if (n2 > max_size || (this->size() - len) >= (max_size - n2))
- throw_length_error("basic_string::replace max_size() exceeded");
- const pointer addr = this->priv_addr() + pos1;
- return this->replace(addr, addr + len, s, s + n2);
- }
-
- //! <b>Requires</b>: pos1 <= size() and s points to an array of at least n2 elements of CharT.
- //!
- //! <b>Effects</b>: Determines the effective length xlen of the string to be removed as the smaller
- //! of n1 and size() - pos1. If size() - xlen >= max_size() - n2 throws length_error. Otherwise,
- //! the function replaces the string controlled by *this with a string of length size() - xlen + n2
- //! whose first pos1 elements are a copy of the initial elements of the original string controlled
- //! by *this, whose next n2 elements are a copy of the initial n2 elements of s, and whose
- //! remaining elements are a copy of the elements of the original string controlled by *this
- //! beginning at position pos + xlen.
- //!
- //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or length_error
- //! if the length of the resulting string would exceed max_size()
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(size_type pos, size_type n1, const CharT* s)
- {
- return this->replace(pos, n1, s, Traits::length(s));
- }
-
- //! <b>Requires</b>: pos1 <= size().
- //!
- //! <b>Effects</b>: Equivalent to replace(pos1, n1, basic_string(n2, c)).
- //!
- //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or length_error
- //! if the length of the resulting string would exceed max_size()
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(size_type pos1, size_type n1, size_type n2, CharT c)
- {
- if (pos1 > this->size())
- throw_out_of_range("basic_string::replace out of range position");
- const size_type len = dtl::min_value(n1, this->size() - pos1);
- if (n2 > this->max_size() || this->size() - len >= this->max_size() - n2)
- throw_length_error("basic_string::replace max_size() exceeded");
- const pointer addr = this->priv_addr();
- return this->replace(addr + pos1, addr + pos1 + len, n2, c);
- }
-
- //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges.
- //!
- //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, str).
- //!
- //! <b>Throws</b>: if memory allocation throws
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str)
- { return this->replace(i1, i2, str.data(), str.data()+str.size()); }
-
- //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges and
- //! s points to an array of at least n elements
- //!
- //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, s, n).
- //!
- //! <b>Throws</b>: if memory allocation throws
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s, size_type n)
- { return this->replace(i1, i2, s, s + n); }
-
- //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges and s points to an
- //! array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, s, traits::length(s)).
- //!
- //! <b>Throws</b>: if memory allocation throws
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s)
- { return this->replace(i1, i2, s, s + Traits::length(s)); }
-
- //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges.
- //!
- //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, basic_string(n, c)).
- //!
- //! <b>Throws</b>: if memory allocation throws
- //!
- //! <b>Returns</b>: *this
- basic_string& replace(const_iterator i1, const_iterator i2, size_type n, CharT c)
- {
- const size_type len = static_cast<size_type>(i2 - i1);
- if (len >= n) {
- Traits::assign(const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)), n, c);
- erase(i1 + n, i2);
- }
- else {
- Traits::assign(const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)), len, c);
- insert(i2, n - len, c);
- }
- return *this;
- }
-
- //! <b>Requires</b>: [begin(),i1), [i1,i2) and [j1,j2) are valid ranges.
- //!
- //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, basic_string(j1, j2)).
- //!
- //! <b>Throws</b>: if memory allocation throws
- //!
- //! <b>Returns</b>: *this
- template <class InputIter>
- basic_string& replace(const_iterator i1, const_iterator i2, InputIter j1, InputIter j2
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<InputIter, size_type>
- , dtl::is_input_iterator<InputIter>
- >::type * = 0
- #endif
- )
- {
- for ( ; i1 != i2 && j1 != j2; ++i1, ++j1){
- Traits::assign(*const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)), *j1);
- }
-
- if (j1 == j2)
- this->erase(i1, i2);
- else
- this->insert(i2, j1, j2);
- return *this;
- }
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class ForwardIter>
- basic_string& replace(const_iterator i1, const_iterator i2, ForwardIter j1, ForwardIter j2
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<ForwardIter, size_type>
- , dtl::is_not_input_iterator<ForwardIter>
- >::type * = 0
- )
- {
- difference_type n = boost::container::iterator_distance(j1, j2);
- const difference_type len = i2 - i1;
- if (len >= n) {
- this->priv_copy(j1, j2, const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)));
- this->erase(i1 + n, i2);
- }
- else {
- ForwardIter m = j1;
- boost::container::iterator_advance(m, len);
- this->priv_copy(j1, m, const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)));
- this->insert(i2, m, j2);
- }
- return *this;
- }
- #endif
-
- //! <b>Requires</b>: [begin(), i1) and [i1, i2) are valid ranges.
- //!
- //! <b>Effects</b>: Calls `replace(i1 - begin(), i2 - i1, sv).`.
- //!
- //! <b>Returns</b>: *this.
- template<template <class, class> class BasicStringView>
- basic_string& replace(const_iterator i1, const_iterator i2, BasicStringView<CharT, Traits> sv)
- {
- return this->replace( static_cast<size_type>(i1 - this->cbegin())
- , static_cast<size_type>(i2 - i1), sv);
- }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Requires</b>: [begin(), i1) and [i1, i2) are valid ranges.
- //!
- //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, il.begin(), il.size()).
- //!
- //! <b>Returns</b>: *this.
- basic_string& replace(const_iterator i1, const_iterator i2, std::initializer_list<CharT> il)
- {
- return this->replace( static_cast<size_type>(i1 - this->cbegin())
- , static_cast<size_type>(i2 - i1)
- , il.begin(), il.size());
- }
- #endif
-
- //! <b>Requires</b>: pos <= size()
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to copy as the
- //! smaller of n and size() - pos. s shall designate an array of at least rlen elements.
- //! The function then replaces the string designated by s with a string of length rlen
- //! whose elements are a copy of the string controlled by *this beginning at position pos.
- //! The function does not append a null object to the string designated by s.
- //!
- //! <b>Throws</b>: if memory allocation throws, out_of_range if pos > size().
- //!
- //! <b>Returns</b>: rlen
- size_type copy(CharT* s, size_type n, size_type pos = 0) const
- {
- if (pos > this->size())
- throw_out_of_range("basic_string::copy out of range position");
- const size_type len = dtl::min_value(n, this->size() - pos);
- Traits::copy(s, boost::movelib::to_raw_pointer(this->priv_addr() + pos), len);
- return len;
- }
-
- //! <b>Effects</b>: *this contains the same sequence of characters that was in s,
- //! s contains the same sequence of characters that was in *this.
- //!
- //! <b>Throws</b>: Nothing
- void swap(basic_string& x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
- || allocator_traits_type::is_always_equal::value)
- {
- this->base_t::swap_data(x);
- dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
- dtl::swap_alloc(this->alloc(), x.alloc(), flag);
- }
-
- //////////////////////////////////////////////
- //
- // data access
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: The program shall not alter any of the values stored in the character array.
- //!
- //! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
- //!
- //! <b>Complexity</b>: constant time.
- const CharT* c_str() const BOOST_NOEXCEPT_OR_NOTHROW
- { return boost::movelib::to_raw_pointer(this->priv_addr()); }
-
- //! <b>Requires</b>: The program shall not alter any of the values stored in the character array.
- //!
- //! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
- //!
- //! <b>Complexity</b>: constant time.
- const CharT* data() const BOOST_NOEXCEPT_OR_NOTHROW
- { return boost::movelib::to_raw_pointer(this->priv_addr()); }
-
- //! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
- //!
- //! <b>Complexity</b>: constant time.
- CharT* data() BOOST_NOEXCEPT_OR_NOTHROW
- { return boost::movelib::to_raw_pointer(this->priv_addr()); }
-
- #ifndef BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
- //! <b>Returns</b>: a string_view to the characters in the string.
- //!
- //! <b>Complexity</b>: constant time.
- template<template <class, class> class BasicStringView>
- operator BasicStringView<CharT, Traits>() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->to_view< BasicStringView<CharT, Traits> >(); }
- #endif
-
- //! <b>Returns</b>: a string_view to the characters in the string.
- //!
- //! <b>Complexity</b>: constant time.
- //!
- //! <b>Note</b>: This function is available to write portable code for compilers
- //! that don't support templated conversion operators.
- template<class BasicStringView>
- BasicStringView to_view() const BOOST_NOEXCEPT_OR_NOTHROW
- { return BasicStringView(this->data(), this->size()); }
-
- //////////////////////////////////////////////
- //
- // string operations
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both
- //! of the following conditions hold:
- //! 1) pos <= xpos and xpos + str.size() <= size();
- //! 2) traits::eq(at(xpos+I), str.at(I)) for all elements I of the string controlled by str.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- size_type find(const basic_string& s, size_type pos = 0) const
- { return find(s.c_str(), pos, s.size()); }
-
- //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both
- //! of the following conditions hold:
- //! 1) pos <= xpos and xpos + sv.size() <= size();
- //! 2) traits::eq(at(xpos+I), sv.at(I)) for all elements I of the string controlled by sv.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- template<template <class, class> class BasicStringView>
- size_type find(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
- { return find(sv.data(), pos, sv.size()); }
-
- //! <b>Requires</b>: s points to an array of at least n elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find(basic_string<CharT,traits,Allocator>(s,n),pos).
- size_type find(const CharT* s, size_type pos, size_type n) const
- {
- if (pos + n > this->size())
- return npos;
- else {
- const pointer addr = this->priv_addr();
- pointer finish = addr + this->priv_size();
- const const_iterator result =
- boost::container::search(boost::movelib::to_raw_pointer(addr + pos),
- boost::movelib::to_raw_pointer(finish),
- s, s + n, Eq_traits<Traits>());
- return result != finish ? result - begin() : npos;
- }
- }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find(basic_string(s), pos).
- size_type find(const CharT* s, size_type pos = 0) const
- { return this->find(s, pos, Traits::length(s)); }
-
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find(basic_string<CharT,traits,Allocator>(1,c), pos).
- size_type find(CharT c, size_type pos = 0) const
- {
- const size_type sz = this->size();
- if (pos >= sz)
- return npos;
- else {
- const pointer addr = this->priv_addr();
- pointer finish = addr + sz;
- const const_iterator result =
- boost::container::find_if(addr + pos, finish,
- boost::container::bind2nd(Eq_traits<Traits>(), c));
- return result != finish ? result - begin() : npos;
- }
- }
-
- //! <b>Effects</b>: Determines the highest position xpos, if possible, such
- //! that both of the following conditions obtain:
- //! a) xpos <= pos and xpos + str.size() <= size();
- //! b) traits::eq(at(xpos+I), str.at(I)) for all elements I of the string controlled by str.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- size_type rfind(const basic_string& str, size_type pos = npos) const
- { return rfind(str.c_str(), pos, str.size()); }
-
- //! <b>Effects</b>: Determines the highest position xpos, if possible, such
- //! that both of the following conditions obtain:
- //! a) xpos <= pos and xpos + sv.size() <= size();
- //! b) traits::eq(at(xpos+I), sv.at(I)) for all elements I of the string controlled by sv.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- template<template <class, class> class BasicStringView>
- size_type rfind(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
- { return rfind(sv.data(), pos, sv.size()); }
-
- //! <b>Requires</b>: s points to an array of at least n elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: rfind(basic_string(s, n), pos).
- size_type rfind(const CharT* s, size_type pos, size_type n) const
- {
- const size_type len = this->size();
-
- if (n > len)
- return npos;
- else if (n == 0)
- return dtl::min_value(len, pos);
- else {
- const const_iterator last = begin() + dtl::min_value(len - n, pos) + n;
- const const_iterator result = find_end(begin(), last,
- s, s + n,
- Eq_traits<Traits>());
- return result != last ? result - begin() : npos;
- }
- }
-
- //! <b>Requires</b>: pos <= size() and s points to an array of at least
- //! traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: rfind(basic_string(s), pos).
- size_type rfind(const CharT* s, size_type pos = npos) const
- { return rfind(s, pos, Traits::length(s)); }
-
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: rfind(basic_string<CharT,traits,Allocator>(1,c),pos).
- size_type rfind(CharT c, size_type pos = npos) const
- {
- const size_type len = this->size();
-
- if (len < 1)
- return npos;
- else {
- const const_iterator last = begin() + dtl::min_value(len - 1, pos) + 1;
- const_reverse_iterator rresult =
- boost::container::find_if(const_reverse_iterator(last), rend(),
- boost::container::bind2nd(Eq_traits<Traits>(), c));
- return rresult != rend() ? (rresult.base() - 1) - begin() : npos;
- }
- }
-
- //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both of the
- //! following conditions obtain: a) pos <= xpos and xpos < size();
- //! b) traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- size_type find_first_of(const basic_string& str, size_type pos = 0) const
- { return this->find_first_of(str.c_str(), pos, str.size()); }
-
- //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both of the
- //! following conditions obtain: a) pos <= xpos and xpos < size();
- //! b) traits::eq(at(xpos), sv.at(I)) for some element I of the string controlled by sv.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- template<template <class, class> class BasicStringView>
- size_type find_first_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
- { return this->find_first_of(sv.data(), pos, sv.size()); }
-
- //! <b>Requires</b>: s points to an array of at least n elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_first_of(basic_string(s, n), pos).
- size_type find_first_of(const CharT* s, size_type pos, size_type n) const
- {
- const size_type sz = this->size();
- if (pos >= sz)
- return npos;
- else {
- const pointer addr = this->priv_addr();
- pointer finish = addr + sz;
- const_iterator result = boost::container::find_first_of
- (addr + pos, finish, s, s + n, Eq_traits<Traits>());
- return result != finish ? result - this->begin() : npos;
- }
- }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_first_of(basic_string(s), pos).
- size_type find_first_of(const CharT* s, size_type pos = 0) const
- { return this->find_first_of(s, pos, Traits::length(s)); }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_first_of(basic_string<CharT,traits,Allocator>(1,c), pos).
- size_type find_first_of(CharT c, size_type pos = 0) const
- { return this->find(c, pos); }
-
- //! <b>Effects</b>: Determines the highest position xpos, if possible, such that both of
- //! the following conditions obtain: a) xpos <= pos and xpos < size(); b)
- //! traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- size_type find_last_of(const basic_string& str, size_type pos = npos) const
- { return this->find_last_of(str.c_str(), pos, str.size()); }
-
- //! <b>Effects</b>: Determines the highest position xpos, if possible, such that both of
- //! the following conditions obtain: a) xpos <= pos and xpos < size(); b)
- //! traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- template<template <class, class> class BasicStringView>
- size_type find_last_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
- { return this->find_last_of(sv.data(), pos, sv.size()); }
-
- //! <b>Requires</b>: s points to an array of at least n elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_last_of(basic_string(s, n), pos).
- size_type find_last_of(const CharT* s, size_type pos, size_type n) const
- {
- const size_type len = this->size();
-
- if (len < 1)
- return npos;
- else {
- const pointer addr = this->priv_addr();
- const const_iterator last = addr + dtl::min_value(len - 1, pos) + 1;
- const const_reverse_iterator rresult =
- boost::container::find_first_of(const_reverse_iterator(last), rend(),
- s, s + n, Eq_traits<Traits>());
- return rresult != rend() ? (rresult.base() - 1) - addr : npos;
- }
- }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_last_of(basic_string<CharT,traits,Allocator>(1,c),pos).
- size_type find_last_of(const CharT* s, size_type pos = npos) const
- { return find_last_of(s, pos, Traits::length(s)); }
-
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_last_of(basic_string(s), pos).
- size_type find_last_of(CharT c, size_type pos = npos) const
- { return rfind(c, pos); }
-
- //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that
- //! both of the following conditions obtain:
- //! a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), str.at(I)) for no
- //! element I of the string controlled by str.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- size_type find_first_not_of(const basic_string& str, size_type pos = 0) const
- { return find_first_not_of(str.c_str(), pos, str.size()); }
-
- //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that
- //! both of the following conditions obtain:
- //! a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), sv.at(I)) for no
- //! element I of the string controlled by sv.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- template<template <class, class> class BasicStringView>
- size_type find_first_not_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
- { return find_first_not_of(sv.data(), pos, sv.size()); }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_first_not_of(basic_string(s, n), pos).
- size_type find_first_not_of(const CharT* s, size_type pos, size_type n) const
- {
- if (pos > this->size())
- return npos;
- else {
- const pointer addr = this->priv_addr();
- const pointer finish = addr + this->priv_size();
- const const_iterator result = boost::container::find_if
- (addr + pos, finish, Not_within_traits<Traits>(s, s + n));
- return result != finish ? result - addr : npos;
- }
- }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_first_not_of(basic_string(s), pos).
- size_type find_first_not_of(const CharT* s, size_type pos = 0) const
- { return find_first_not_of(s, pos, Traits::length(s)); }
-
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_first_not_of(basic_string(1, c), pos).
- size_type find_first_not_of(CharT c, size_type pos = 0) const
- {
- if (pos > this->size())
- return npos;
- else {
- const pointer addr = this->priv_addr();
- const pointer finish = addr + this->priv_size();
- const const_iterator result
- = boost::container::find_if(addr + pos, finish,
- boost::container::not1(boost::container::bind2nd(Eq_traits<Traits>(), c)));
- return result != finish ? result - begin() : npos;
- }
- }
-
- //! <b>Effects</b>: Determines the highest position xpos, if possible, such that
- //! both of the following conditions obtain: a) xpos <= pos and xpos < size();
- //! b) traits::eq(at(xpos), str.at(I)) for no element I of the string controlled by str.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- size_type find_last_not_of(const basic_string& str, size_type pos = npos) const
- { return find_last_not_of(str.c_str(), pos, str.size()); }
-
- //! <b>Effects</b>: Determines the highest position xpos, if possible, such that
- //! both of the following conditions obtain: a) xpos <= pos and xpos < size();
- //! b) traits::eq(at(xpos), sv.at(I)) for no element I of the string controlled by sv.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
- template<template <class, class> class BasicStringView>
- size_type find_last_not_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
- { return find_last_not_of(sv.data(), pos, sv.size()); }
-
- //! <b>Requires</b>: s points to an array of at least n elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_last_not_of(basic_string(s, n), pos).
- size_type find_last_not_of(const CharT* s, size_type pos, size_type n) const
- {
- const size_type len = this->size();
-
- if (len < 1)
- return npos;
- else {
- const const_iterator last = begin() + dtl::min_value(len - 1, pos) + 1;
- const const_reverse_iterator rresult =
- boost::container::find_if(const_reverse_iterator(last), rend(),
- Not_within_traits<Traits>(s, s + n));
- return rresult != rend() ? (rresult.base() - 1) - begin() : npos;
- }
- }
-
- //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_last_not_of(basic_string(s), pos).
- size_type find_last_not_of(const CharT* s, size_type pos = npos) const
- { return find_last_not_of(s, pos, Traits::length(s)); }
-
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: find_last_not_of(basic_string(1, c), pos).
- size_type find_last_not_of(CharT c, size_type pos = npos) const
- {
- const size_type len = this->size();
-
- if (len < 1)
- return npos;
- else {
- const const_iterator last = begin() + dtl::min_value(len - 1, pos) + 1;
- const const_reverse_iterator rresult =
- boost::container::find_if(const_reverse_iterator(last), rend(),
- boost::container::not1(boost::container::bind2nd(Eq_traits<Traits>(), c)));
- return rresult != rend() ? (rresult.base() - 1) - begin() : npos;
- }
- }
-
- //! <b>Requires</b>: Requires: pos <= size()
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
- //! the smaller of n and size() - pos.
- //!
- //! <b>Throws</b>: If memory allocation throws or out_of_range if pos > size().
- //!
- //! <b>Returns</b>: basic_string<CharT,traits,Allocator>(data()+pos,rlen).
- basic_string substr(size_type pos = 0, size_type n = npos) const
- {
- if (pos > this->size())
- throw_out_of_range("basic_string::substr out of range position");
- const pointer addr = this->priv_addr();
- return basic_string(addr + pos,
- addr + pos + dtl::min_value(n, size() - pos), this->alloc());
- }
-
- //! <b>Effects</b>: Determines the effective length rlen of the string to compare as
- //! the smaller of size() and str.size(). The function then compares the two strings by
- //! calling traits::compare(data(), str.data(), rlen).
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: The nonzero result if the result of the comparison is nonzero.
- //! Otherwise, returns a value < 0 if size() < str.size(), a 0 value if size() == str.size(),
- //! and value > 0 if size() > str.size()
- int compare(const basic_string& str) const
- {
- const pointer addr = this->priv_addr();
- const pointer str_addr = str.priv_addr();
- return s_compare(addr, addr + this->priv_size(), str_addr, str_addr + str.priv_size());
- }
-
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: compare(basic_string(sv)).
- template<template <class, class> class BasicStringView>
- int compare(BasicStringView<CharT,Traits> sv) const
- {
- const pointer addr = this->priv_addr();
- return s_compare(addr, addr + this->priv_size(), sv.data(), sv.data() + sv.size());
- }
-
- //! <b>Requires</b>: pos1 <= size()
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to compare as
- //! the smaller of (this->size() - pos1), n1 and str.size(). The function then compares the two strings by
- //! calling traits::compare(data()+pos1, str.data(), rlen).
- //!
- //! <b>Throws</b>: out_of_range if pos1 > size()
- //!
- //! <b>Returns</b>:basic_string(*this,pos1,n1).compare(str).
- int compare(size_type pos1, size_type n1, const basic_string& str) const
- {
- if (pos1 > this->size())
- throw_out_of_range("basic_string::compare out of range position");
- const pointer addr = this->priv_addr();
- const pointer str_addr = str.priv_addr();
- return s_compare(addr + pos1,
- addr + pos1 + dtl::min_value(n1, this->size() - pos1),
- str_addr, str_addr + str.priv_size());
- }
-
- //! <b>Requires</b>: pos1 <= size()
- //!
- //! <b>Throws</b>: out_of_range if pos1 > size()
- //!
- //! <b>Returns</b>:basic_string(*this,pos1,n1).compare(sv).
- template<template <class, class> class BasicStringView>
- int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv) const
- {
- if (pos1 > this->size())
- throw_out_of_range("basic_string::compare out of range position");
- const pointer addr = this->priv_addr() + pos1;
- const CharT* str_addr = sv.data();
- return s_compare(addr, addr + dtl::min_value(n1, this->size() - pos1),
- str_addr, str_addr + sv.size());
- }
-
- //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size()
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
- //! the smaller of
- //!
- //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > str.size()
- //!
- //! <b>Returns</b>: basic_string(*this, pos1, n1).compare(basic_string(str, pos2, n2)).
- int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos) const
- {
- if (pos1 > this->size() || pos2 > str.size())
- throw_out_of_range("basic_string::compare out of range position");
- const pointer addr = this->priv_addr() + pos1;
- const pointer str_addr = str.priv_addr() + pos2;
- return s_compare(addr, addr + dtl::min_value(n1, this->size() - pos1),
- str_addr, str_addr + dtl::min_value(n2, str.size() - pos2));
- }
-
- //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size()
- //!
- //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
- //! the smaller of
- //!
- //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > sv.size()
- //!
- //! <b>Returns</b>: basic_string(*this, pos1, n1).compare(BasicStringView<CharT, Traits>(sv, pos2, n2)).
- template<template <class, class> class BasicStringView>
- int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv, size_type pos2, size_type n2) const
- {
- if (pos1 > this->size() || pos2 > sv.size())
- throw_out_of_range("basic_string::compare out of range position");
- const pointer addr = this->priv_addr() + pos1;
- const CharT * str_addr = sv.data() + pos2;
- return s_compare(addr, addr + dtl::min_value(n1, this->size() - pos1),
- str_addr, str_addr + dtl::min_value(n2, sv.size() - pos2));
- }
-
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Returns</b>: compare(basic_string(s)).
- int compare(const CharT* s) const
- {
- const pointer addr = this->priv_addr();
- return s_compare(addr, addr + this->priv_size(), s, s + Traits::length(s));
- }
-
- //! <b>Requires</b>: pos1 > size() and s points to an array of at least n2 elements of CharT.
- //!
- //! <b>Throws</b>: out_of_range if pos1 > size()
- //!
- //! <b>Returns</b>: basic_string(*this, pos, n1).compare(basic_string(s, n2)).
- int compare(size_type pos1, size_type n1, const CharT* s, size_type n2) const
- {
- if (pos1 > this->size())
- throw_out_of_range("basic_string::compare out of range position");
- const pointer addr = this->priv_addr();
- return s_compare( addr + pos1,
- addr + pos1 + dtl::min_value(n1, this->size() - pos1),
- s, s + n2);
- }
-
- //! <b>Requires</b>: pos1 > size() and s points to an array of at least traits::length(s) + 1 elements of CharT.
- //!
- //! <b>Throws</b>: out_of_range if pos1 > size()
- //!
- //! <b>Returns</b>: basic_string(*this, pos, n1).compare(basic_string(s, n2)).
- int compare(size_type pos1, size_type n1, const CharT* s) const
- { return this->compare(pos1, n1, s, Traits::length(s)); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- void priv_reserve(size_type res_arg, const bool null_terminate = true)
- {
- if (res_arg > this->max_size()){
- throw_length_error("basic_string::reserve max_size() exceeded");
- }
-
- if (this->capacity() < res_arg){
- size_type n = dtl::max_value(res_arg, this->size()) + 1;
- size_type new_cap = this->next_capacity(n);
- pointer reuse = 0;
- pointer new_start = this->allocation_command(allocate_new, n, new_cap, reuse);
- size_type new_length = 0;
-
- const pointer addr = this->priv_addr();
- new_length += priv_uninitialized_copy
- (addr, addr + this->priv_size(), new_start);
- if(null_terminate){
- this->priv_construct_null(new_start + new_length);
- }
- this->deallocate_block();
- this->is_short(false);
- this->priv_long_addr(new_start);
- this->priv_long_size(new_length);
- this->priv_storage(new_cap);
- }
- }
-
- template<class It1, class It2>
- static int s_compare(It1 f1, It1 l1, It2 f2, It2 l2)
- {
- const difference_type n1 = l1 - f1;
- const difference_type n2 = l2 - f2;
- const int cmp = Traits::compare(boost::movelib::to_raw_pointer(f1),
- boost::movelib::to_raw_pointer(f2),
- dtl::min_value(n1, n2));
- return cmp != 0 ? cmp : (n1 < n2 ? -1 : (n1 > n2 ? 1 : 0));
- }
-
- template<class AllocVersion>
- void priv_shrink_to_fit_dynamic_buffer
- ( AllocVersion
- , typename dtl::enable_if<dtl::is_same<AllocVersion, version_1> >::type* = 0)
- {
- //Allocate a new buffer.
- size_type real_cap = 0;
- const pointer long_addr = this->priv_long_addr();
- const size_type long_size = this->priv_long_size();
- const size_type long_storage = this->priv_long_storage();
- //We can make this nothrow as chars are always NoThrowCopyables
- BOOST_TRY{
- pointer reuse = 0;
- real_cap = long_size+1;
- const pointer ret = this->allocation_command(allocate_new, long_size+1, real_cap, reuse);
- //Copy and update
- Traits::copy( boost::movelib::to_raw_pointer(ret)
- , boost::movelib::to_raw_pointer(this->priv_long_addr())
- , long_size+1);
- this->priv_long_addr(ret);
- this->priv_storage(real_cap);
- //And release old buffer
- this->alloc().deallocate(long_addr, long_storage);
- }
- BOOST_CATCH(...){
- return;
- }
- BOOST_CATCH_END
- }
-
- template<class AllocVersion>
- void priv_shrink_to_fit_dynamic_buffer
- ( AllocVersion
- , typename dtl::enable_if<dtl::is_same<AllocVersion, version_2> >::type* = 0)
- {
- size_type received_size = this->priv_long_size()+1;
- pointer hint = this->priv_long_addr();
- if(this->alloc().allocation_command
- ( shrink_in_place | nothrow_allocation, this->priv_long_storage(), received_size, hint)){
- this->priv_storage(received_size);
- }
- }
-
- void priv_construct_null(pointer p)
- { this->construct(p, CharT(0)); }
-
- // Helper functions used by constructors. It is a severe error for
- // any of them to be called anywhere except from within constructors.
- void priv_terminate_string()
- { this->priv_construct_null(this->priv_end_addr()); }
-
- template<class FwdIt, class Count> inline
- void priv_uninitialized_fill_n(FwdIt first, Count count, const CharT val)
- {
- //Save initial position
- FwdIt init = first;
-
- BOOST_TRY{
- //Construct objects
- for (; count--; ++first){
- this->construct(first, val);
- }
- }
- BOOST_CATCH(...){
- //Call destructors
- for (; init != first; ++init){
- this->destroy(init);
- }
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
-
- template<class InpIt, class FwdIt> inline
- size_type priv_uninitialized_copy(InpIt first, InpIt last, FwdIt dest)
- {
- //Save initial destination position
- FwdIt dest_init = dest;
- size_type constructed = 0;
-
- BOOST_TRY{
- //Try to build objects
- for (; first != last; ++dest, ++first, ++constructed){
- this->construct(dest, *first);
- }
- }
- BOOST_CATCH(...){
- //Call destructors
- for (; constructed--; ++dest_init){
- this->destroy(dest_init);
- }
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- return (constructed);
- }
-
- template <class InputIterator, class OutIterator>
- void priv_copy(InputIterator first, InputIterator last, OutIterator result)
- {
- for ( ; first != last; ++first, ++result)
- Traits::assign(*result, *first);
- }
-
- void priv_copy(const CharT* first, const CharT* last, CharT* result)
- { Traits::copy(result, first, last - first); }
-
- template <class Integer>
- basic_string& priv_replace_dispatch(const_iterator first, const_iterator last,
- Integer n, Integer x,
- dtl::true_)
- { return this->replace(first, last, (size_type) n, (CharT) x); }
-
- template <class InputIter>
- basic_string& priv_replace_dispatch(const_iterator first, const_iterator last,
- InputIter f, InputIter l,
- dtl::false_)
- {
- typedef typename boost::container::iterator_traits<InputIter>::iterator_category Category;
- return this->priv_replace(first, last, f, l, Category());
- }
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-basic_string(InputIterator, InputIterator) ->
- basic_string<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-basic_string(InputIterator, InputIterator, Allocator const&) ->
- basic_string<typename iterator_traits<InputIterator>::value_type, Allocator>;
-
-#endif
-
-#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//!Typedef for a basic_string of
-//!narrow characters
-typedef basic_string
- <char
- ,std::char_traits<char>
- ,new_allocator<char> >
-string;
-
-//!Typedef for a basic_string of
-//!narrow characters
-typedef basic_string
- <wchar_t
- ,std::char_traits<wchar_t>
- ,new_allocator<wchar_t> >
-wstring;
-
-#else
-
-template <class CharT, class Traits, class Allocator>
-const typename basic_string<CharT,Traits,Allocator>::size_type
- basic_string<CharT,Traits,Allocator>::npos;
-
-template<class S>
-struct is_string
-{
- static const bool value = false;
-};
-
-template<class C, class T, class A>
-struct is_string< basic_string<C, T, A> >
-{
- static const bool value = true;
-};
-
-#endif
-
-// ------------------------------------------------------------
-// Non-member functions.
-
-// Operator+
-
-template <class CharT, class Traits, class Allocator> inline
- basic_string<CharT,Traits,Allocator>
- operator+(const basic_string<CharT,Traits,Allocator>& x
- ,const basic_string<CharT,Traits,Allocator>& y)
-{
- typedef basic_string<CharT,Traits,Allocator> str_t;
- typedef typename str_t::reserve_t reserve_t;
- reserve_t reserve;
- str_t result(reserve, x.size() + y.size(), x.get_stored_allocator());
- result.append(x);
- result.append(y);
- return result;
-}
-
-template <class CharT, class Traits, class Allocator> inline
- basic_string<CharT, Traits, Allocator> operator+
- ( BOOST_RV_REF_BEG basic_string<CharT, Traits, Allocator> BOOST_RV_REF_END x
- , BOOST_RV_REF_BEG basic_string<CharT, Traits, Allocator> BOOST_RV_REF_END y)
-{
- x += y;
- return boost::move(x);
-}
-
-template <class CharT, class Traits, class Allocator> inline
- basic_string<CharT, Traits, Allocator> operator+
- ( BOOST_RV_REF_BEG basic_string<CharT, Traits, Allocator> BOOST_RV_REF_END x
- , const basic_string<CharT,Traits,Allocator>& y)
-{
- x += y;
- return boost::move(x);
-}
-
-template <class CharT, class Traits, class Allocator> inline
- basic_string<CharT, Traits, Allocator> operator+
- (const basic_string<CharT,Traits,Allocator>& x
- ,BOOST_RV_REF_BEG basic_string<CharT, Traits, Allocator> BOOST_RV_REF_END y)
-{
- y.insert(y.begin(), x.begin(), x.end());
- return boost::move(y);
-}
-
-template <class CharT, class Traits, class Allocator> inline
- basic_string<CharT, Traits, Allocator> operator+
- (const CharT* s, basic_string<CharT, Traits, Allocator> y)
-{
- y.insert(y.begin(), s, s + Traits::length(s));
- return y;
-}
-
-template <class CharT, class Traits, class Allocator> inline
- basic_string<CharT,Traits,Allocator> operator+
- (basic_string<CharT,Traits,Allocator> x, const CharT* s)
-{
- x += s;
- return x;
-}
-
-template <class CharT, class Traits, class Allocator> inline
- basic_string<CharT,Traits,Allocator> operator+
- (CharT c, basic_string<CharT,Traits,Allocator> y)
-{
- y.insert(y.begin(), c);
- return y;
-}
-
-template <class CharT, class Traits, class Allocator> inline
- basic_string<CharT,Traits,Allocator> operator+
- (basic_string<CharT,Traits,Allocator> x, const CharT c)
-{
- x += c;
- return x;
-}
-
-// Operator== and operator!=
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator==(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
-{
- return x.size() == y.size() &&
- Traits::compare(x.data(), y.data(), x.size()) == 0;
-}
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator==(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
-{
- typename basic_string<CharT,Traits,Allocator>::size_type n = Traits::length(s);
- return n == y.size() && Traits::compare(s, y.data(), n) == 0;
-}
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator==(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
-{
- typename basic_string<CharT,Traits,Allocator>::size_type n = Traits::length(s);
- return x.size() == n && Traits::compare(x.data(), s, n) == 0;
-}
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
- operator==( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
-{
- return x.size() == y.size() &&
- Traits::compare(x.data(), y.data(), x.size()) == 0;
-}
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
- operator==( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
-{
- return x.size() == y.size() &&
- Traits::compare(x.data(), y.data(), x.size()) == 0;
-}
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator!=(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
- { return !(x == y); }
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator!=(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
- { return !(s == y); }
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator!=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
- { return !(x == s); }
-
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator!=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
- { return !(x == y); }
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator!=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
- { return !(x == y); }
-
-// Operator< (and also >, <=, and >=).
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator<(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
-{
- return x.compare(y) < 0;
-}
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator<(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
-{
- return y.compare(s) > 0;
-}
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator<(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
-{
- return x.compare(s) < 0;
-}
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator<( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
- { return y.compare(x) > 0; }
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator<( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
- { return x.compare(y) < 0; }
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator>(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y) {
- return y < x;
-}
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator>(const CharT* s, const basic_string<CharT,Traits,Allocator>& y) {
- return y < s;
-}
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator>(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
-{
- return s < x;
-}
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator>( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
- { return y < x; }
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator>( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
- { return y < x; }
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator<=(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
-{
- return !(y < x);
-}
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator<=(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
- { return !(y < s); }
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator<=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
- { return !(s < x); }
-
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator<=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
- { return !(y < x); }
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator<=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
- { return !(y < x); }
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator>=(const basic_string<CharT,Traits,Allocator>& x,
- const basic_string<CharT,Traits,Allocator>& y)
- { return !(x < y); }
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator>=(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
- { return !(s < y); }
-
-template <class CharT, class Traits, class Allocator>
-inline bool
-operator>=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
- { return !(x < s); }
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator>=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
- { return !(x < y); }
-
-template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
-inline
- BOOST_CONTAINER_DOC1ST( bool,
- typename dtl::disable_if
- <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
-operator>=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
- { return !(x < y); }
-
-// Swap.
-template <class CharT, class Traits, class Allocator>
-inline void swap(basic_string<CharT,Traits,Allocator>& x, basic_string<CharT,Traits,Allocator>& y)
-{ x.swap(y); }
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-// I/O.
-namespace dtl {
-
-template <class CharT, class Traits>
-inline bool
-string_fill(std::basic_ostream<CharT, Traits>& os,
- std::basic_streambuf<CharT, Traits>* buf,
- std::size_t n)
-{
- CharT f = os.fill();
- std::size_t i;
- bool ok = true;
-
- for (i = 0; i < n; i++)
- ok = ok && !Traits::eq_int_type(buf->sputc(f), Traits::eof());
- return ok;
-}
-
-} //namespace dtl {
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-template <class CharT, class Traits, class Allocator>
-std::basic_ostream<CharT, Traits>&
-operator<<(std::basic_ostream<CharT, Traits>& os, const basic_string<CharT,Traits,Allocator>& s)
-{
- typename std::basic_ostream<CharT, Traits>::sentry sentry(os);
- bool ok = false;
-
- if (sentry) {
- ok = true;
- typename basic_string<CharT,Traits,Allocator>::size_type n = s.size();
- typename basic_string<CharT,Traits,Allocator>::size_type pad_len = 0;
- const bool left = (os.flags() & std::ios::left) != 0;
- const std::size_t w = os.width(0);
- std::basic_streambuf<CharT, Traits>* buf = os.rdbuf();
-
- if (w != 0 && n < w)
- pad_len = w - n;
-
- if (!left)
- ok = dtl::string_fill(os, buf, pad_len);
-
- ok = ok &&
- buf->sputn(s.data(), std::streamsize(n)) == std::streamsize(n);
-
- if (left)
- ok = ok && dtl::string_fill(os, buf, pad_len);
- }
-
- if (!ok)
- os.setstate(std::ios_base::failbit);
-
- return os;
-}
-
-
-template <class CharT, class Traits, class Allocator>
-std::basic_istream<CharT, Traits>&
-operator>>(std::basic_istream<CharT, Traits>& is, basic_string<CharT,Traits,Allocator>& s)
-{
- typename std::basic_istream<CharT, Traits>::sentry sentry(is);
-
- if (sentry) {
- std::basic_streambuf<CharT, Traits>* buf = is.rdbuf();
- const std::ctype<CharT>& ctype = std::use_facet<std::ctype<CharT> >(is.getloc());
-
- s.clear();
- std::size_t n = is.width(0);
- if (n == 0)
- n = static_cast<std::size_t>(-1);
- else
- s.reserve(n);
-
- while (n-- > 0) {
- typename Traits::int_type c1 = buf->sbumpc();
-
- if (Traits::eq_int_type(c1, Traits::eof())) {
- is.setstate(std::ios_base::eofbit);
- break;
- }
- else {
- CharT c = Traits::to_char_type(c1);
-
- if (ctype.is(std::ctype<CharT>::space, c)) {
- if (Traits::eq_int_type(buf->sputbackc(c), Traits::eof()))
- is.setstate(std::ios_base::failbit);
- break;
- }
- else
- s.push_back(c);
- }
- }
-
- // If we have read no characters, then set failbit.
- if (s.size() == 0)
- is.setstate(std::ios_base::failbit);
- }
- else
- is.setstate(std::ios_base::failbit);
-
- return is;
-}
-
-template <class CharT, class Traits, class Allocator>
-std::basic_istream<CharT, Traits>&
-getline(std::istream& is, basic_string<CharT,Traits,Allocator>& s,CharT delim)
-{
- typename basic_string<CharT,Traits,Allocator>::size_type nread = 0;
- typename std::basic_istream<CharT, Traits>::sentry sentry(is, true);
- if (sentry) {
- std::basic_streambuf<CharT, Traits>* buf = is.rdbuf();
- s.clear();
-
- while (nread < s.max_size()) {
- int c1 = buf->sbumpc();
- if (Traits::eq_int_type(c1, Traits::eof())) {
- is.setstate(std::ios_base::eofbit);
- break;
- }
- else {
- ++nread;
- CharT c = Traits::to_char_type(c1);
- if (!Traits::eq(c, delim))
- s.push_back(c);
- else
- break; // Character is extracted but not appended.
- }
- }
- }
- if (nread == 0 || nread >= s.max_size())
- is.setstate(std::ios_base::failbit);
-
- return is;
-}
-
-template <class CharT, class Traits, class Allocator>
-inline std::basic_istream<CharT, Traits>&
-getline(std::basic_istream<CharT, Traits>& is, basic_string<CharT,Traits,Allocator>& s)
-{
- return getline(is, s, '\n');
-}
-
-template <class Ch, class Allocator>
-inline std::size_t hash_value(basic_string<Ch, std::char_traits<Ch>, Allocator> const& v)
-{
- return hash_range(v.begin(), v.end());
-}
-
-}}
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace boost {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class C, class T, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::basic_string<C, T, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value;
-};
-
-}
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // BOOST_CONTAINER_STRING_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/vector.hpp b/src/third_party/boost-1.68.0/boost/container/vector.hpp
deleted file mode 100644
index c3baebc333f..00000000000
--- a/src/third_party/boost-1.68.0/boost/container/vector.hpp
+++ /dev/null
@@ -1,3392 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_CONTAINER_CONTAINER_VECTOR_HPP
-#define BOOST_CONTAINER_CONTAINER_VECTOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/container/detail/config_begin.hpp>
-#include <boost/container/detail/workaround.hpp>
-
-// container
-#include <boost/container/container_fwd.hpp>
-#include <boost/container/allocator_traits.hpp>
-#include <boost/container/new_allocator.hpp> //new_allocator
-#include <boost/container/throw_exception.hpp>
-#include <boost/container/options.hpp>
-// container detail
-#include <boost/container/detail/advanced_insert_int.hpp>
-#include <boost/container/detail/algorithm.hpp> //equal()
-#include <boost/container/detail/alloc_helpers.hpp>
-#include <boost/container/detail/allocation_type.hpp>
-#include <boost/container/detail/copy_move_algo.hpp>
-#include <boost/container/detail/destroyers.hpp>
-#include <boost/container/detail/iterator.hpp>
-#include <boost/container/detail/iterators.hpp>
-#include <boost/move/detail/iterator_to_raw_pointer.hpp>
-#include <boost/container/detail/mpl.hpp>
-#include <boost/container/detail/next_capacity.hpp>
-#include <boost/container/detail/value_functors.hpp>
-#include <boost/move/detail/to_raw_pointer.hpp>
-#include <boost/container/detail/type_traits.hpp>
-#include <boost/container/detail/version_type.hpp>
-// intrusive
-#include <boost/intrusive/pointer_traits.hpp>
-// move
-#include <boost/move/adl_move_swap.hpp>
-#include <boost/move/iterator.hpp>
-#include <boost/move/traits.hpp>
-#include <boost/move/utility_core.hpp>
-// move/detail
-#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-#include <boost/move/detail/fwd_macros.hpp>
-#endif
-#include <boost/move/detail/move_helpers.hpp>
-// move/algo
-#include <boost/move/algo/adaptive_merge.hpp>
-#include <boost/move/algo/unique.hpp>
-#include <boost/move/algo/predicate.hpp>
-#include <boost/move/algo/detail/set_difference.hpp>
-// other
-#include <boost/core/no_exceptions_support.hpp>
-#include <boost/assert.hpp>
-#include <boost/cstdint.hpp>
-
-//std
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
-#include <initializer_list> //for std::initializer_list
-#endif
-
-namespace boost {
-namespace container {
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-
-template <class Pointer, bool IsConst>
-class vec_iterator
-{
- public:
- typedef std::random_access_iterator_tag iterator_category;
- typedef typename boost::intrusive::pointer_traits<Pointer>::element_type value_type;
- typedef typename boost::intrusive::pointer_traits<Pointer>::difference_type difference_type;
- typedef typename dtl::if_c
- < IsConst
- , typename boost::intrusive::pointer_traits<Pointer>::template
- rebind_pointer<const value_type>::type
- , Pointer
- >::type pointer;
- typedef typename boost::intrusive::pointer_traits<pointer> ptr_traits;
- typedef typename ptr_traits::reference reference;
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- Pointer m_ptr;
-
- public:
- BOOST_CONTAINER_FORCEINLINE const Pointer &get_ptr() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE Pointer &get_ptr() BOOST_NOEXCEPT_OR_NOTHROW
- { return m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE explicit vec_iterator(Pointer ptr) BOOST_NOEXCEPT_OR_NOTHROW
- : m_ptr(ptr)
- {}
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
-
- //Constructors
- BOOST_CONTAINER_FORCEINLINE vec_iterator() BOOST_NOEXCEPT_OR_NOTHROW
- : m_ptr() //Value initialization to achieve "null iterators" (N3644)
- {}
-
- BOOST_CONTAINER_FORCEINLINE vec_iterator(vec_iterator<Pointer, false> const& other) BOOST_NOEXCEPT_OR_NOTHROW
- : m_ptr(other.get_ptr())
- {}
-
- //Pointer like operators
- BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!m_ptr); return *m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!m_ptr); return m_ptr[off]; }
-
- //Increment / Decrement
- BOOST_CONTAINER_FORCEINLINE vec_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!m_ptr); ++m_ptr; return *this; }
-
- BOOST_CONTAINER_FORCEINLINE vec_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!m_ptr); return vec_iterator(m_ptr++); }
-
- BOOST_CONTAINER_FORCEINLINE vec_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!m_ptr); --m_ptr; return *this; }
-
- BOOST_CONTAINER_FORCEINLINE vec_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!m_ptr); return vec_iterator(m_ptr--); }
-
- //Arithmetic
- BOOST_CONTAINER_FORCEINLINE vec_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!m_ptr); m_ptr += off; return *this; }
-
- BOOST_CONTAINER_FORCEINLINE vec_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!m_ptr); m_ptr -= off; return *this; }
-
- BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator+(const vec_iterator &x, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!x.m_ptr); return vec_iterator(x.m_ptr+off); }
-
- BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator+(difference_type off, vec_iterator right) BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!right.m_ptr); right.m_ptr += off; return right; }
-
- BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator-(vec_iterator left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT(!!left.m_ptr); left.m_ptr -= off; return left; }
-
- BOOST_CONTAINER_FORCEINLINE friend difference_type operator-(const vec_iterator &left, const vec_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
- { return left.m_ptr - right.m_ptr; }
-
- //Comparison operators
- BOOST_CONTAINER_FORCEINLINE friend bool operator== (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_ptr == r.m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_ptr != r.m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator< (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_ptr < r.m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_ptr <= r.m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator> (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_ptr > r.m_ptr; }
-
- BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
- { return l.m_ptr >= r.m_ptr; }
-};
-
-template<class BiDirPosConstIt, class BiDirValueIt>
-struct vector_insert_ordered_cursor
-{
- typedef typename iterator_traits<BiDirPosConstIt>::value_type size_type;
- typedef typename iterator_traits<BiDirValueIt>::reference reference;
-
- BOOST_CONTAINER_FORCEINLINE vector_insert_ordered_cursor(BiDirPosConstIt posit, BiDirValueIt valueit)
- : last_position_it(posit), last_value_it(valueit)
- {}
-
- void operator --()
- {
- --last_value_it;
- --last_position_it;
- while(this->get_pos() == size_type(-1)){
- --last_value_it;
- --last_position_it;
- }
- }
-
- BOOST_CONTAINER_FORCEINLINE size_type get_pos() const
- { return *last_position_it; }
-
- BOOST_CONTAINER_FORCEINLINE reference get_val()
- { return *last_value_it; }
-
- BiDirPosConstIt last_position_it;
- BiDirValueIt last_value_it;
-};
-
-struct initial_capacity_t{};
-
-template<class Pointer, bool IsConst>
-BOOST_CONTAINER_FORCEINLINE const Pointer &vector_iterator_get_ptr(const vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
-{ return it.get_ptr(); }
-
-template<class Pointer, bool IsConst>
-BOOST_CONTAINER_FORCEINLINE Pointer &get_ptr(vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
-{ return it.get_ptr(); }
-
-struct vector_uninitialized_size_t {};
-static const vector_uninitialized_size_t vector_uninitialized_size = vector_uninitialized_size_t();
-
-template <class T>
-struct vector_value_traits_base
-{
- static const bool trivial_dctr = dtl::is_trivially_destructible<T>::value;
- static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<T>::value;
- static const bool trivial_copy = dtl::is_trivially_copy_constructible<T>::value;
- static const bool nothrow_copy = dtl::is_nothrow_copy_constructible<T>::value || trivial_copy;
- static const bool trivial_assign = dtl::is_trivially_copy_assignable<T>::value;
- static const bool nothrow_assign = dtl::is_nothrow_copy_assignable<T>::value || trivial_assign;
-};
-
-
-template <class Allocator>
-struct vector_value_traits
- : public vector_value_traits_base<typename Allocator::value_type>
-{
- typedef vector_value_traits_base<typename Allocator::value_type> base_t;
- //This is the anti-exception array destructor
- //to deallocate values already constructed
- typedef typename dtl::if_c
- <base_t::trivial_dctr
- ,dtl::null_scoped_destructor_n<Allocator>
- ,dtl::scoped_destructor_n<Allocator>
- >::type ArrayDestructor;
- //This is the anti-exception array deallocator
- typedef dtl::scoped_array_deallocator<Allocator> ArrayDeallocator;
-};
-
-//!This struct deallocates and allocated memory
-template < class Allocator
- , class StoredSizeType
- , class AllocatorVersion = typename dtl::version<Allocator>::type
- >
-struct vector_alloc_holder
- : public Allocator
-{
- private:
- BOOST_MOVABLE_BUT_NOT_COPYABLE(vector_alloc_holder)
-
- public:
- typedef Allocator allocator_type;
- typedef StoredSizeType stored_size_type;
- typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef typename allocator_traits_type::pointer pointer;
- typedef typename allocator_traits_type::size_type size_type;
- typedef typename allocator_traits_type::value_type value_type;
-
- static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
- {
- (void)propagate_allocator; (void)p; (void)to_alloc; (void)from_alloc;
- const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
- !allocator_traits_type::storage_is_unpropagable(from_alloc, p);
- return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(from_alloc, to_alloc));
- }
-
- static bool are_swap_propagable(const allocator_type &l_a, pointer l_p, const allocator_type &r_a, pointer r_p, bool const propagate_allocator)
- {
- (void)propagate_allocator; (void)l_p; (void)r_p; (void)l_a; (void)r_a;
- const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
- !(allocator_traits_type::storage_is_unpropagable(l_a, l_p) || allocator_traits_type::storage_is_unpropagable(r_a, r_p));
- return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(l_a, r_a));
- }
-
- //Constructor, does not throw
- vector_alloc_holder()
- BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : Allocator(), m_start(), m_size(), m_capacity()
- {}
-
- //Constructor, does not throw
- template<class AllocConvertible>
- explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
- : Allocator(boost::forward<AllocConvertible>(a)), m_start(), m_size(), m_capacity()
- {}
-
- //Constructor, does not throw
- template<class AllocConvertible>
- vector_alloc_holder(vector_uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
- : Allocator(boost::forward<AllocConvertible>(a))
- , m_start()
- //Size is initialized here so vector should only call uninitialized_xxx after this
- , m_size(static_cast<stored_size_type>(initial_size))
- , m_capacity()
- {
- if(initial_size){
- pointer reuse = pointer();
- size_type final_cap = initial_size;
- m_start = this->allocation_command(allocate_new, initial_size, final_cap, reuse);
- m_capacity = static_cast<stored_size_type>(final_cap);
- }
- }
-
- //Constructor, does not throw
- vector_alloc_holder(vector_uninitialized_size_t, size_type initial_size)
- : Allocator()
- , m_start()
- //Size is initialized here so vector should only call uninitialized_xxx after this
- , m_size(static_cast<stored_size_type>(initial_size))
- , m_capacity()
- {
- if(initial_size){
- pointer reuse = pointer();
- size_type final_cap = initial_size;
- m_start = this->allocation_command(allocate_new, initial_size, final_cap, reuse);
- m_capacity = static_cast<stored_size_type>(final_cap);
- }
- }
-
- vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder) BOOST_NOEXCEPT_OR_NOTHROW
- : Allocator(BOOST_MOVE_BASE(Allocator, holder))
- , m_start(holder.m_start)
- , m_size(holder.m_size)
- , m_capacity(holder.m_capacity)
- {
- holder.m_start = pointer();
- holder.m_size = holder.m_capacity = 0;
- }
-
- vector_alloc_holder(initial_capacity_t, pointer p, size_type capacity, BOOST_RV_REF(vector_alloc_holder) holder)
- : Allocator(BOOST_MOVE_BASE(Allocator, holder))
- , m_start(p)
- , m_size(holder.m_size)
- , m_capacity(static_cast<stored_size_type>(capacity))
- {
- allocator_type &this_alloc = this->alloc();
- allocator_type &x_alloc = holder.alloc();
- if(this->is_propagable_from(x_alloc, holder.start(), this_alloc, true)){
- if(this->m_capacity){
- this->deallocate(this->m_start, this->m_capacity);
- }
- m_start = holder.m_start;
- m_capacity = holder.m_capacity;
- holder.m_start = pointer();
- holder.m_capacity = holder.m_size = 0;
- }
- else if(this->m_capacity < holder.m_size){
- size_type const n = holder.m_size;
- pointer reuse = pointer();
- size_type final_cap = n;
- m_start = this->allocation_command(allocate_new, n, final_cap, reuse);
- m_capacity = static_cast<stored_size_type>(final_cap);
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += n != 0;
- #endif
- }
- }
-
- vector_alloc_holder(initial_capacity_t, pointer p, size_type n)
- BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : Allocator()
- , m_start(p)
- , m_size()
- //n is guaranteed to fit into stored_size_type
- , m_capacity(static_cast<stored_size_type>(n))
- {}
-
- template<class AllocFwd>
- vector_alloc_holder(initial_capacity_t, pointer p, size_type n, BOOST_FWD_REF(AllocFwd) a)
- : Allocator(::boost::forward<AllocFwd>(a))
- , m_start(p)
- , m_size()
- , m_capacity(n)
- {}
-
- BOOST_CONTAINER_FORCEINLINE ~vector_alloc_holder() BOOST_NOEXCEPT_OR_NOTHROW
- {
- if(this->m_capacity){
- this->deallocate(this->m_start, this->m_capacity);
- }
- }
-
- BOOST_CONTAINER_FORCEINLINE pointer allocation_command(boost::container::allocation_type command,
- size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
- {
- typedef typename dtl::version<Allocator>::type alloc_version;
- return this->priv_allocation_command(alloc_version(), command, limit_size, prefer_in_recvd_out_size, reuse);
- }
-
- BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n)
- {
- const size_type max_alloc = allocator_traits_type::max_size(this->alloc());
- const size_type max = max_alloc <= stored_size_type(-1) ? max_alloc : stored_size_type(-1);
- if ( max < n )
- boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
-
- return allocator_traits_type::allocate(this->alloc(), n);
- }
-
- BOOST_CONTAINER_FORCEINLINE void deallocate(const pointer &p, size_type n)
- {
- allocator_traits_type::deallocate(this->alloc(), p, n);
- }
-
- bool try_expand_fwd(size_type at_least)
- {
- //There is not enough memory, try to expand the old one
- const size_type new_cap = this->capacity() + at_least;
- size_type real_cap = new_cap;
- pointer reuse = this->start();
- bool const success = !!this->allocation_command(expand_fwd, new_cap, real_cap, reuse);
- //Check for forward expansion
- if(success){
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_expand_fwd;
- #endif
- this->capacity(real_cap);
- }
- return success;
- }
-
- template<class GrowthFactorType>
- size_type next_capacity(size_type additional_objects) const
- {
- BOOST_ASSERT(additional_objects > size_type(this->m_capacity - this->m_size));
- size_type max = allocator_traits_type::max_size(this->alloc());
- (clamp_by_stored_size_type)(max, stored_size_type());
- const size_type remaining_cap = max - size_type(this->m_capacity);
- const size_type min_additional_cap = additional_objects - size_type(this->m_capacity - this->m_size);
-
- if ( remaining_cap < min_additional_cap )
- boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
-
- return GrowthFactorType()( size_type(this->m_capacity), min_additional_cap, max);
- }
-
- pointer m_start;
- stored_size_type m_size;
- stored_size_type m_capacity;
-
- void swap_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
- {
- boost::adl_move_swap(this->m_start, x.m_start);
- boost::adl_move_swap(this->m_size, x.m_size);
- boost::adl_move_swap(this->m_capacity, x.m_capacity);
- }
-
- void steal_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
- {
- this->m_start = x.m_start;
- this->m_size = x.m_size;
- this->m_capacity = x.m_capacity;
- x.m_start = pointer();
- x.m_size = x.m_capacity = 0;
- }
-
- BOOST_CONTAINER_FORCEINLINE Allocator &alloc() BOOST_NOEXCEPT_OR_NOTHROW
- { return *this; }
-
- BOOST_CONTAINER_FORCEINLINE const Allocator &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
- { return *this; }
-
- BOOST_CONTAINER_FORCEINLINE const pointer &start() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_start; }
- BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
- { return m_capacity; }
- BOOST_CONTAINER_FORCEINLINE void start(const pointer &p) BOOST_NOEXCEPT_OR_NOTHROW
- { m_start = p; }
- BOOST_CONTAINER_FORCEINLINE void capacity(const size_type &c) BOOST_NOEXCEPT_OR_NOTHROW
- { BOOST_ASSERT( c <= stored_size_type(-1)); m_capacity = c; }
-
- private:
- void priv_first_allocation(size_type cap)
- {
- if(cap){
- pointer reuse = pointer();
- m_start = this->allocation_command(allocate_new, cap, cap, reuse);
- m_capacity = cap;
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_alloc;
- #endif
- }
- }
-
- BOOST_CONTAINER_FORCEINLINE static void clamp_by_stored_size_type(size_type &, size_type)
- {}
-
- template<class SomeStoredSizeType>
- BOOST_CONTAINER_FORCEINLINE static void clamp_by_stored_size_type(size_type &s, SomeStoredSizeType)
- {
- if (s >= SomeStoredSizeType(-1) )
- s = SomeStoredSizeType(-1);
- }
-
- BOOST_CONTAINER_FORCEINLINE pointer priv_allocation_command(version_1, boost::container::allocation_type command,
- size_type limit_size,
- size_type &prefer_in_recvd_out_size,
- pointer &reuse)
- {
- (void)command;
- BOOST_ASSERT( (command & allocate_new));
- BOOST_ASSERT(!(command & nothrow_allocation));
- //First detect overflow on smaller stored_size_types
- if (limit_size > stored_size_type(-1)){
- boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
- }
- (clamp_by_stored_size_type)(prefer_in_recvd_out_size, stored_size_type());
- pointer const p = this->allocate(prefer_in_recvd_out_size);
- reuse = pointer();
- return p;
- }
-
- pointer priv_allocation_command(version_2, boost::container::allocation_type command,
- size_type limit_size,
- size_type &prefer_in_recvd_out_size,
- pointer &reuse)
- {
- //First detect overflow on smaller stored_size_types
- if (limit_size > stored_size_type(-1)){
- boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
- }
- (clamp_by_stored_size_type)(prefer_in_recvd_out_size, stored_size_type());
- //Allocate memory
- pointer p = this->alloc().allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse);
- //If after allocation prefer_in_recvd_out_size is not representable by stored_size_type, truncate it.
- (clamp_by_stored_size_type)(prefer_in_recvd_out_size, stored_size_type());
- return p;
- }
-};
-
-//!This struct deallocates and allocated memory
-template <class Allocator, class StoredSizeType>
-struct vector_alloc_holder<Allocator, StoredSizeType, version_0>
- : public Allocator
-{
- private:
- BOOST_MOVABLE_BUT_NOT_COPYABLE(vector_alloc_holder)
-
- public:
- typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
- typedef typename allocator_traits_type::pointer pointer;
- typedef typename allocator_traits_type::size_type size_type;
- typedef typename allocator_traits_type::value_type value_type;
- typedef StoredSizeType stored_size_type;
-
- template <class OtherAllocator, class OtherStoredSizeType, class OtherAllocatorVersion>
- friend struct vector_alloc_holder;
-
- //Constructor, does not throw
- vector_alloc_holder()
- BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : Allocator(), m_size()
- {}
-
- //Constructor, does not throw
- template<class AllocConvertible>
- explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
- : Allocator(boost::forward<AllocConvertible>(a)), m_size()
- {}
-
- //Constructor, does not throw
- template<class AllocConvertible>
- vector_alloc_holder(vector_uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
- : Allocator(boost::forward<AllocConvertible>(a))
- , m_size(initial_size) //Size is initialized here...
- {
- //... and capacity here, so vector, must call uninitialized_xxx in the derived constructor
- this->priv_first_allocation(initial_size);
- }
-
- //Constructor, does not throw
- vector_alloc_holder(vector_uninitialized_size_t, size_type initial_size)
- : Allocator()
- , m_size(initial_size) //Size is initialized here...
- {
- //... and capacity here, so vector, must call uninitialized_xxx in the derived constructor
- this->priv_first_allocation(initial_size);
- }
-
- vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder)
- : Allocator(BOOST_MOVE_BASE(Allocator, holder))
- , m_size(holder.m_size) //Size is initialized here so vector should only call uninitialized_xxx after this
- {
- ::boost::container::uninitialized_move_alloc_n
- (this->alloc(), boost::movelib::to_raw_pointer(holder.start()), m_size, boost::movelib::to_raw_pointer(this->start()));
- }
-
- template<class OtherAllocator, class OtherStoredSizeType, class OtherAllocatorVersion>
- vector_alloc_holder(BOOST_RV_REF_BEG vector_alloc_holder<OtherAllocator, OtherStoredSizeType, OtherAllocatorVersion> BOOST_RV_REF_END holder)
- : Allocator()
- , m_size(holder.m_size) //Initialize it to m_size as first_allocation can only succeed or abort
- {
- //Different allocator type so we must check we have enough storage
- const size_type n = holder.m_size;
- this->priv_first_allocation(n);
- ::boost::container::uninitialized_move_alloc_n
- (this->alloc(), boost::movelib::to_raw_pointer(holder.start()), n, boost::movelib::to_raw_pointer(this->start()));
- }
-
- BOOST_CONTAINER_FORCEINLINE void priv_first_allocation(size_type cap)
- {
- if(cap > Allocator::internal_capacity){
- throw_bad_alloc();
- }
- }
-
- BOOST_CONTAINER_FORCEINLINE void deep_swap(vector_alloc_holder &x)
- {
- this->priv_deep_swap(x);
- }
-
- template<class OtherAllocator, class OtherStoredSizeType, class OtherAllocatorVersion>
- void deep_swap(vector_alloc_holder<OtherAllocator, OtherStoredSizeType, OtherAllocatorVersion> &x)
- {
- if(this->m_size > OtherAllocator::internal_capacity || x.m_size > Allocator::internal_capacity){
- throw_bad_alloc();
- }
- this->priv_deep_swap(x);
- }
-
- BOOST_CONTAINER_FORCEINLINE void swap_resources(vector_alloc_holder &) BOOST_NOEXCEPT_OR_NOTHROW
- { //Containers with version 0 allocators can't be moved without moving elements one by one
- throw_bad_alloc();
- }
-
-
- BOOST_CONTAINER_FORCEINLINE void steal_resources(vector_alloc_holder &)
- { //Containers with version 0 allocators can't be moved without moving elements one by one
- throw_bad_alloc();
- }
-
- BOOST_CONTAINER_FORCEINLINE Allocator &alloc() BOOST_NOEXCEPT_OR_NOTHROW
- { return *this; }
-
- BOOST_CONTAINER_FORCEINLINE const Allocator &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
- { return *this; }
-
- BOOST_CONTAINER_FORCEINLINE bool try_expand_fwd(size_type at_least)
- { return !at_least; }
-
- BOOST_CONTAINER_FORCEINLINE pointer start() const BOOST_NOEXCEPT_OR_NOTHROW { return Allocator::internal_storage(); }
- BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return Allocator::internal_capacity; }
- stored_size_type m_size;
-
- private:
-
- template<class OtherAllocator, class OtherStoredSizeType, class OtherAllocatorVersion>
- void priv_deep_swap(vector_alloc_holder<OtherAllocator, OtherStoredSizeType, OtherAllocatorVersion> &x)
- {
- const size_type MaxTmpStorage = sizeof(value_type)*Allocator::internal_capacity;
- value_type *const first_this = boost::movelib::to_raw_pointer(this->start());
- value_type *const first_x = boost::movelib::to_raw_pointer(x.start());
-
- if(this->m_size < x.m_size){
- boost::container::deep_swap_alloc_n<MaxTmpStorage>(this->alloc(), first_this, this->m_size, first_x, x.m_size);
- }
- else{
- boost::container::deep_swap_alloc_n<MaxTmpStorage>(this->alloc(), first_x, x.m_size, first_this, this->m_size);
- }
- boost::adl_move_swap(this->m_size, x.m_size);
- }
-};
-
-struct growth_factor_60;
-
-template<class T, class Default>
-struct default_if_void
-{
- typedef T type;
-};
-
-template<class Default>
-struct default_if_void<void, Default>
-{
- typedef Default type;
-};
-
-template<class Options, class AllocatorSizeType>
-struct get_vector_opt
-{
- typedef vector_opt< typename default_if_void<typename Options::growth_factor_type, growth_factor_60>::type
- , typename default_if_void<typename Options::stored_size_type, AllocatorSizeType>::type
- > type;
-};
-
-template<class AllocatorSizeType>
-struct get_vector_opt<void, AllocatorSizeType>
-{
- typedef vector_opt<growth_factor_60, AllocatorSizeType> type;
-};
-
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-//! A vector is a sequence that supports random access to elements, constant
-//! time insertion and removal of elements at the end, and linear time insertion
-//! and removal of elements at the beginning or in the middle. The number of
-//! elements in a vector may vary dynamically; memory management is automatic.
-//!
-//! \tparam T The type of object that is stored in the vector
-//! \tparam Allocator The allocator used for all internal memory management
-//! \tparam Options A type produced from \c boost::container::vector_options.
-template <class T, class Allocator BOOST_CONTAINER_DOCONLY(= new_allocator<T>), class Options BOOST_CONTAINER_DOCONLY(= void) >
-class vector
-{
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- typedef typename boost::container::allocator_traits<Allocator>::size_type alloc_size_type;
- typedef typename get_vector_opt<Options, alloc_size_type>::type options_type;
- typedef typename options_type::growth_factor_type growth_factor_type;
- typedef typename options_type::stored_size_type stored_size_type;
- typedef value_less<T> value_less_t;
-
- //If provided the stored_size option must specify a type that is equal or a type that is smaller.
- BOOST_STATIC_ASSERT( (sizeof(stored_size_type) < sizeof(alloc_size_type) ||
- dtl::is_same<stored_size_type, alloc_size_type>::value) );
-
- typedef typename dtl::version<Allocator>::type alloc_version;
- typedef boost::container::vector_alloc_holder<Allocator, stored_size_type> alloc_holder_t;
- alloc_holder_t m_holder;
- typedef allocator_traits<Allocator> allocator_traits_type;
- template <class U, class UAllocator, class UOptions>
- friend class vector;
-
- typedef typename allocator_traits_type::pointer pointer_impl;
- typedef vec_iterator<pointer_impl, false> iterator_impl;
- typedef vec_iterator<pointer_impl, true > const_iterator_impl;
-
- protected:
- static bool is_propagable_from(const Allocator &from_alloc, pointer_impl p, const Allocator &to_alloc, bool const propagate_allocator)
- { return alloc_holder_t::is_propagable_from(from_alloc, p, to_alloc, propagate_allocator); }
-
- static bool are_swap_propagable( const Allocator &l_a, pointer_impl l_p
- , const Allocator &r_a, pointer_impl r_p, bool const propagate_allocator)
- { return alloc_holder_t::are_swap_propagable(l_a, l_p, r_a, r_p, propagate_allocator); }
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- public:
- //////////////////////////////////////////////
- //
- // types
- //
- //////////////////////////////////////////////
-
- typedef T value_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
- typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
- typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
- typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
- typedef Allocator allocator_type;
- typedef Allocator stored_allocator_type;
- typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
- typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
- typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- private:
- BOOST_COPYABLE_AND_MOVABLE(vector)
- typedef vector_value_traits<Allocator> value_traits;
- typedef constant_iterator<T, difference_type> cvalue_iterator;
-
- protected:
-
- BOOST_CONTAINER_FORCEINLINE void steal_resources(vector &x)
- { return this->m_holder.steal_resources(x.m_holder); }
-
- template<class AllocFwd>
- BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type capacity, BOOST_FWD_REF(AllocFwd) a)
- : m_holder(initial_capacity_t(), initial_memory, capacity, ::boost::forward<AllocFwd>(a))
- {}
-
- BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type capacity)
- : m_holder(initial_capacity_t(), initial_memory, capacity)
- {}
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- public:
- //////////////////////////////////////////////
- //
- // construct/copy/destroy
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Constructs a vector taking the allocator as parameter.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
- : m_holder()
- {}
-
- //! <b>Effects</b>: Constructs a vector taking the allocator as parameter.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- explicit vector(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
- : m_holder(a)
- {}
-
- //! <b>Effects</b>: Constructs a vector and inserts n value initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's allocation
- //! throws or T's value initialization throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit vector(size_type n)
- : m_holder(vector_uninitialized_size, n)
- {
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += n != 0;
- #endif
- boost::container::uninitialized_value_init_alloc_n
- (this->m_holder.alloc(), n, this->priv_raw_begin());
- }
-
- //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
- //! and inserts n value initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's allocation
- //! throws or T's value initialization throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- explicit vector(size_type n, const allocator_type &a)
- : m_holder(vector_uninitialized_size, a, n)
- {
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += n != 0;
- #endif
- boost::container::uninitialized_value_init_alloc_n
- (this->m_holder.alloc(), n, this->priv_raw_begin());
- }
-
- //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
- //! and inserts n default initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's allocation
- //! throws or T's default initialization throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- //!
- //! <b>Note</b>: Non-standard extension
- vector(size_type n, default_init_t)
- : m_holder(vector_uninitialized_size, n)
- {
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += n != 0;
- #endif
- boost::container::uninitialized_default_init_alloc_n
- (this->m_holder.alloc(), n, this->priv_raw_begin());
- }
-
- //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
- //! and inserts n default initialized values.
- //!
- //! <b>Throws</b>: If allocator_type's allocation
- //! throws or T's default initialization throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- //!
- //! <b>Note</b>: Non-standard extension
- vector(size_type n, default_init_t, const allocator_type &a)
- : m_holder(vector_uninitialized_size, a, n)
- {
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += n != 0;
- #endif
- boost::container::uninitialized_default_init_alloc_n
- (this->m_holder.alloc(), n, this->priv_raw_begin());
- }
-
- //! <b>Effects</b>: Constructs a vector
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocator_type's allocation
- //! throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- vector(size_type n, const T& value)
- : m_holder(vector_uninitialized_size, n)
- {
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += n != 0;
- #endif
- boost::container::uninitialized_fill_alloc_n
- (this->m_holder.alloc(), value, n, this->priv_raw_begin());
- }
-
- //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
- //! and inserts n copies of value.
- //!
- //! <b>Throws</b>: If allocation
- //! throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- vector(size_type n, const T& value, const allocator_type& a)
- : m_holder(vector_uninitialized_size, a, n)
- {
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += n != 0;
- #endif
- boost::container::uninitialized_fill_alloc_n
- (this->m_holder.alloc(), value, n, this->priv_raw_begin());
- }
-
- //! <b>Effects</b>: Constructs a vector
- //! and inserts a copy of the range [first, last) in the vector.
- //!
- //! <b>Throws</b>: If allocator_type's allocation
- //! throws or T's constructor taking a dereferenced InIt throws.
- //!
- //! <b>Complexity</b>: Linear to the range [first, last).
-// template <class InIt>
-// vector(InIt first, InIt last
-// BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
-// < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
-// BOOST_MOVE_I dtl::nat >::type * = 0)
-// ) -> vector<typename iterator_traits<InIt>::value_type, new_allocator<typename iterator_traits<InIt>::value_type>>;
- template <class InIt>
- vector(InIt first, InIt last
- BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
- < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
- BOOST_MOVE_I dtl::nat >::type * = 0)
- )
- : m_holder()
- { this->assign(first, last); }
-
- //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
- //! and inserts a copy of the range [first, last) in the vector.
- //!
- //! <b>Throws</b>: If allocator_type's allocation
- //! throws or T's constructor taking a dereferenced InIt throws.
- //!
- //! <b>Complexity</b>: Linear to the range [first, last).
-// template <class InIt>
-// vector(InIt first, InIt last, const allocator_type& a
-// BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
-// < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
-// BOOST_MOVE_I dtl::nat >::type * = 0)
-// ) -> vector<typename iterator_traits<InIt>::value_type, new_allocator<typename iterator_traits<InIt>::value_type>>;
- template <class InIt>
- vector(InIt first, InIt last, const allocator_type& a
- BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
- < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
- BOOST_MOVE_I dtl::nat >::type * = 0)
- )
- : m_holder(a)
- { this->assign(first, last); }
-
- //! <b>Effects</b>: Copy constructs a vector.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocator_type's allocation
- //! throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- vector(const vector &x)
- : m_holder( vector_uninitialized_size
- , allocator_traits_type::select_on_container_copy_construction(x.m_holder.alloc())
- , x.size())
- {
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += x.size() != 0;
- #endif
- ::boost::container::uninitialized_copy_alloc_n
- ( this->m_holder.alloc(), x.priv_raw_begin()
- , x.size(), this->priv_raw_begin());
- }
-
- //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- vector(BOOST_RV_REF(vector) x) BOOST_NOEXCEPT_OR_NOTHROW
- : m_holder(boost::move(x.m_holder))
- { BOOST_STATIC_ASSERT((!allocator_traits_type::is_partially_propagable::value)); }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
- //! and inserts a copy of the range [il.begin(), il.last()) in the vector
- //!
- //! <b>Throws</b>: If T's constructor taking a dereferenced initializer_list iterator throws.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
- vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
- : m_holder(a)
- {
- this->assign(il.begin(), il.end());
- }
- #endif
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
- //!
- //! <b>Throws</b>: If T's move constructor or allocation throws
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: Non-standard extension to support static_vector
- template<class OtherAllocator>
- vector(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
- , typename dtl::enable_if_c
- < dtl::is_version<OtherAllocator, 0>::value>::type * = 0
- )
- : m_holder(boost::move(x.m_holder))
- {}
-
- #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Copy constructs a vector using the specified allocator.
- //!
- //! <b>Postcondition</b>: x == *this.
- //!
- //! <b>Throws</b>: If allocation
- //! throws or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the elements x contains.
- vector(const vector &x, const allocator_type &a)
- : m_holder(vector_uninitialized_size, a, x.size())
- {
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += x.size() != 0;
- #endif
- ::boost::container::uninitialized_copy_alloc_n_source
- ( this->m_holder.alloc(), x.priv_raw_begin()
- , x.size(), this->priv_raw_begin());
- }
-
- //! <b>Effects</b>: Move constructor using the specified allocator.
- //! Moves x's resources to *this if a == allocator_type().
- //! Otherwise copies values from x to *this.
- //!
- //! <b>Throws</b>: If allocation or T's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
- vector(BOOST_RV_REF(vector) x, const allocator_type &a)
- : m_holder( vector_uninitialized_size, a
- , is_propagable_from(x.get_stored_allocator(), x.m_holder.start(), a, true) ? 0 : x.size()
- )
- {
- if(is_propagable_from(x.get_stored_allocator(), x.m_holder.start(), a, true)){
- this->m_holder.steal_resources(x.m_holder);
- }
- else{
- const size_type n = x.size();
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- this->num_alloc += n != 0;
- #endif
- ::boost::container::uninitialized_move_alloc_n_source
- ( this->m_holder.alloc(), x.priv_raw_begin()
- , n, this->priv_raw_begin());
- }
- }
-
- //! <b>Effects</b>: Destroys the vector. All stored values are destroyed
- //! and used memory is deallocated.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements.
- ~vector() BOOST_NOEXCEPT_OR_NOTHROW
- {
- boost::container::destroy_alloc_n
- (this->get_stored_allocator(), this->priv_raw_begin(), this->m_holder.m_size);
- //vector_alloc_holder deallocates the data
- }
-
- //! <b>Effects</b>: Makes *this contain the same elements as x.
- //!
- //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
- //! of each of x's elements.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment throws.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in x.
- BOOST_CONTAINER_FORCEINLINE vector& operator=(BOOST_COPY_ASSIGN_REF(vector) x)
- {
- if (&x != this){
- this->priv_copy_assign(x);
- }
- return *this;
- }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Make *this container contains elements from il.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
- BOOST_CONTAINER_FORCEINLINE vector& operator=(std::initializer_list<value_type> il)
- {
- this->assign(il.begin(), il.end());
- return *this;
- }
- #endif
-
- //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
- //!
- //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
- //! before the function.
- //!
- //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
- //! is false and (allocation throws or value_type's move constructor throws)
- //!
- //! <b>Complexity</b>: Constant if allocator_traits_type::
- //! propagate_on_container_move_assignment is true or
- //! this->get>allocator() == x.get_allocator(). Linear otherwise.
- BOOST_CONTAINER_FORCEINLINE vector& operator=(BOOST_RV_REF(vector) x)
- BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
- || allocator_traits_type::is_always_equal::value)
- {
- BOOST_ASSERT(&x != this);
- this->priv_move_assign(boost::move(x));
- return *this;
- }
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
- //!
- //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
- //! before the function.
- //!
- //! <b>Throws</b>: If move constructor/assignment of T throws or allocation throws
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: Non-standard extension to support static_vector
- template<class OtherAllocator>
- BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
- < vector&
- , dtl::is_version<OtherAllocator, 0>
- , dtl::is_different<OtherAllocator, allocator_type>
- >::type
- operator=(BOOST_RV_REF_BEG vector<value_type, OtherAllocator> BOOST_RV_REF_END x)
- {
- this->priv_move_assign(boost::move(x));
- return *this;
- }
-
- //! <b>Effects</b>: Copy assignment. All x's values are copied to *this.
- //!
- //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
- //! before the function.
- //!
- //! <b>Throws</b>: If move constructor/assignment of T throws or allocation throws
- //!
- //! <b>Complexity</b>: Linear.
- //!
- //! <b>Note</b>: Non-standard extension to support static_vector
- template<class OtherAllocator>
- BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
- < vector&
- , dtl::is_version<OtherAllocator, 0>
- , dtl::is_different<OtherAllocator, allocator_type>
- >::type
- operator=(const vector<value_type, OtherAllocator> &x)
- {
- this->priv_copy_assign(x);
- return *this;
- }
-
- #endif
-
- //! <b>Effects</b>: Assigns the the range [first, last) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment or
- //! T's constructor/assignment from dereferencing InpIt throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- template <class InIt>
- void assign(InIt first, InIt last
- //Input iterators or version 0 allocator
- BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_or
- < void
- BOOST_MOVE_I dtl::is_convertible<InIt BOOST_MOVE_I size_type>
- BOOST_MOVE_I dtl::and_
- < dtl::is_different<alloc_version BOOST_MOVE_I version_0>
- BOOST_MOVE_I dtl::is_not_input_iterator<InIt>
- >
- >::type * = 0)
- )
- {
- //Overwrite all elements we can from [first, last)
- iterator cur = this->begin();
- const iterator end_it = this->end();
- for ( ; first != last && cur != end_it; ++cur, ++first){
- *cur = *first;
- }
-
- if (first == last){
- //There are no more elements in the sequence, erase remaining
- T* const end_pos = this->priv_raw_end();
- const size_type n = static_cast<size_type>(end_pos - boost::movelib::iterator_to_raw_pointer(cur));
- this->priv_destroy_last_n(n);
- }
- else{
- //There are more elements in the range, insert the remaining ones
- this->insert(this->cend(), first, last);
- }
- }
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's constructor from dereferencing iniializer_list iterator throws.
- //!
- BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list<T> il)
- {
- this->assign(il.begin(), il.end());
- }
- #endif
-
- //! <b>Effects</b>: Assigns the the range [first, last) to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment or
- //! T's constructor/assignment from dereferencing InpIt throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- template <class FwdIt>
- void assign(FwdIt first, FwdIt last
- //Forward iterators and version > 0 allocator
- BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_or
- < void
- BOOST_MOVE_I dtl::is_same<alloc_version BOOST_MOVE_I version_0>
- BOOST_MOVE_I dtl::is_convertible<FwdIt BOOST_MOVE_I size_type>
- BOOST_MOVE_I dtl::is_input_iterator<FwdIt>
- >::type * = 0)
- )
- {
- //For Fwd iterators the standard only requires EmplaceConstructible and assignable from *first
- //so we can't do any backwards allocation
- const size_type input_sz = static_cast<size_type>(boost::container::iterator_distance(first, last));
- const size_type old_capacity = this->capacity();
- if(input_sz > old_capacity){ //If input range is too big, we need to reallocate
- size_type real_cap = 0;
- pointer reuse(this->m_holder.start());
- pointer const ret(this->m_holder.allocation_command(allocate_new|expand_fwd, input_sz, real_cap = input_sz, reuse));
- if(!reuse){ //New allocation, just emplace new values
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_alloc;
- #endif
- pointer const old_p = this->m_holder.start();
- if(old_p){
- this->priv_destroy_all();
- this->m_holder.deallocate(old_p, old_capacity);
- }
- this->m_holder.start(ret);
- this->m_holder.capacity(real_cap);
- this->m_holder.m_size = 0;
- this->priv_uninitialized_construct_at_end(first, last);
- return;
- }
- else{
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_expand_fwd;
- #endif
- this->m_holder.capacity(real_cap);
- //Forward expansion, use assignment + back deletion/construction that comes later
- }
- }
-
- boost::container::copy_assign_range_alloc_n(this->m_holder.alloc(), first, input_sz, this->priv_raw_begin(), this->size());
- this->m_holder.m_size = input_sz;
- }
-
- //! <b>Effects</b>: Assigns the n copies of val to *this.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy/move constructor/assignment throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const value_type& val)
- { this->assign(cvalue_iterator(val, n), cvalue_iterator()); }
-
- //! <b>Effects</b>: Returns a copy of the internal allocator.
- //!
- //! <b>Throws</b>: If allocator's copy constructor throws.
- //!
- //! <b>Complexity</b>: Constant.
- allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->m_holder.alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->m_holder.alloc(); }
-
- //! <b>Effects</b>: Returns a reference to the internal allocator.
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension.
- BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->m_holder.alloc(); }
-
- //////////////////////////////////////////////
- //
- // iterators
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->m_holder.start()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(this->m_holder.start()); }
-
- //! <b>Effects</b>: Returns an iterator to the end of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
- { return iterator(this->m_holder.start() + this->m_holder.m_size); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->cend(); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(this->end()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->crbegin(); }
-
- //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
- { return reverse_iterator(this->begin()); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->crend(); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(this->m_holder.start()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_iterator(this->m_holder.start() + this->m_holder.m_size); }
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->end());}
-
- //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
- //! of the reversed vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
- { return const_reverse_iterator(this->begin()); }
-
- //////////////////////////////////////////////
- //
- // capacity
- //
- //////////////////////////////////////////////
-
- //! <b>Effects</b>: Returns true if the vector contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
- { return !this->m_holder.m_size; }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->m_holder.m_size; }
-
- //! <b>Effects</b>: Returns the largest possible size of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
- { return allocator_traits_type::max_size(this->m_holder.alloc()); }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are value initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy/move or value initialization throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type new_size)
- { this->priv_resize(new_size, value_init); }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are default initialized.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy/move or default initialization throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- //!
- //! <b>Note</b>: Non-standard extension
- void resize(size_type new_size, default_init_t)
- { this->priv_resize(new_size, default_init); }
-
- //! <b>Effects</b>: Inserts or erases elements at the end such that
- //! the size becomes n. New elements are copy constructed from x.
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy/move constructor throws.
- //!
- //! <b>Complexity</b>: Linear to the difference between size() and new_size.
- void resize(size_type new_size, const T& x)
- { this->priv_resize(new_size, x); }
-
- //! <b>Effects</b>: Number of elements for which memory has been allocated.
- //! capacity() is always greater than or equal to size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->m_holder.capacity(); }
-
- //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
- //! effect. Otherwise, it is a request for allocation of additional memory.
- //! If the request is successful, then capacity() is greater than or equal to
- //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
- //!
- //! <b>Throws</b>: If memory allocation allocation throws or T's copy/move constructor throws.
- BOOST_CONTAINER_FORCEINLINE void reserve(size_type new_cap)
- {
- if (this->capacity() < new_cap){
- this->priv_reserve_no_capacity(new_cap, alloc_version());
- }
- }
-
- //! <b>Effects</b>: Tries to deallocate the excess of memory created
- //! with previous allocations. The size of the vector is unchanged
- //!
- //! <b>Throws</b>: If memory allocation throws, or T's copy/move constructor throws.
- //!
- //! <b>Complexity</b>: Linear to size().
- BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
- { this->priv_shrink_to_fit(alloc_version()); }
-
- //////////////////////////////////////////////
- //
- // element access
- //
- //////////////////////////////////////////////
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the first
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference front() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *this->m_holder.start();
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the first
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return *this->m_holder.start();
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a reference to the last
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return this->m_holder.start()[this->m_holder.m_size - 1];
- }
-
- //! <b>Requires</b>: !empty()
- //!
- //! <b>Effects</b>: Returns a const reference to the last
- //! element of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- return this->m_holder.start()[this->m_holder.m_size - 1];
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->m_holder.m_size > n);
- return this->m_holder.start()[n];
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a const reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->m_holder.m_size > n);
- return this->m_holder.start()[n];
- }
-
- //! <b>Requires</b>: size() >= n.
- //!
- //! <b>Effects</b>: Returns an iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->m_holder.m_size >= n);
- return iterator(this->m_holder.start()+n);
- }
-
- //! <b>Requires</b>: size() >= n.
- //!
- //! <b>Effects</b>: Returns a const_iterator to the nth element
- //! from the beginning of the container. Returns end()
- //! if n == size().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(this->m_holder.m_size >= n);
- return const_iterator(this->m_holder.start()+n);
- }
-
- //! <b>Requires</b>: begin() <= p <= end().
- //!
- //! <b>Effects</b>: Returns the index of the element pointed by p
- //! and size() if p == end().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
- {
- //Range check assert done in priv_index_of
- return this->priv_index_of(vector_iterator_get_ptr(p));
- }
-
- //! <b>Requires</b>: begin() <= p <= end().
- //!
- //! <b>Effects</b>: Returns the index of the element pointed by p
- //! and size() if p == end().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Non-standard extension
- size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
- {
- //Range check assert done in priv_index_of
- return this->priv_index_of(vector_iterator_get_ptr(p));
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: std::range_error if n >= size()
- //!
- //! <b>Complexity</b>: Constant.
- reference at(size_type n)
- {
- this->priv_throw_if_out_of_range(n);
- return this->m_holder.start()[n];
- }
-
- //! <b>Requires</b>: size() > n.
- //!
- //! <b>Effects</b>: Returns a const reference to the nth element
- //! from the beginning of the container.
- //!
- //! <b>Throws</b>: std::range_error if n >= size()
- //!
- //! <b>Complexity</b>: Constant.
- const_reference at(size_type n) const
- {
- this->priv_throw_if_out_of_range(n);
- return this->m_holder.start()[n];
- }
-
- //////////////////////////////////////////////
- //
- // data access
- //
- //////////////////////////////////////////////
-
- //! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
- //! For a non-empty vector, data() == &front().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- T* data() BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_raw_begin(); }
-
- //! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
- //! For a non-empty vector, data() == &front().
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const T * data() const BOOST_NOEXCEPT_OR_NOTHROW
- { return this->priv_raw_begin(); }
-
- //////////////////////////////////////////////
- //
- // modifiers
- //
- //////////////////////////////////////////////
-
- #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the end of the vector.
- //!
- //! <b>Returns</b>: A reference to the created object.
- //!
- //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
- //! T's copy/move constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- template<class ...Args>
- BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_FWD_REF(Args)...args)
- {
- if (BOOST_LIKELY(this->room_enough())){
- //There is more memory, just construct a new object at the end
- T* const p = this->priv_raw_end();
- allocator_traits_type::construct(this->m_holder.alloc(), p, ::boost::forward<Args>(args)...);
- ++this->m_holder.m_size;
- return *p;
- }
- else{
- typedef dtl::insert_emplace_proxy<Allocator, T*, Args...> type;
- return *this->priv_forward_range_insert_no_capacity
- (this->back_ptr(), 1, type(::boost::forward<Args>(args)...), alloc_version());
- }
- }
-
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... in the end of the vector.
- //!
- //! <b>Throws</b>: If the in-place constructor throws.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Note</b>: Non-standard extension.
- template<class ...Args>
- BOOST_CONTAINER_FORCEINLINE bool stable_emplace_back(BOOST_FWD_REF(Args)...args)
- {
- const bool is_room_enough = this->room_enough() || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(1u));
- if (BOOST_LIKELY(is_room_enough)){
- //There is more memory, just construct a new object at the end
- allocator_traits_type::construct(this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<Args>(args)...);
- ++this->m_holder.m_size;
- }
- return is_room_enough;
- }
-
- //! <b>Requires</b>: position must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Inserts an object of type T constructed with
- //! std::forward<Args>(args)... before position
- //!
- //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
- //! T's copy/move constructor/assignment throws.
- //!
- //! <b>Complexity</b>: If position is end(), amortized constant time
- //! Linear time otherwise.
- template<class ...Args>
- iterator emplace(const_iterator position, BOOST_FWD_REF(Args) ...args)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(position));
- //Just call more general insert(pos, size, value) and return iterator
- typedef dtl::insert_emplace_proxy<Allocator, T*, Args...> type;
- return this->priv_forward_range_insert( vector_iterator_get_ptr(position), 1
- , type(::boost::forward<Args>(args)...));
- }
-
- #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-
- #define BOOST_CONTAINER_VECTOR_EMPLACE_CODE(N) \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_MOVE_UREF##N)\
- {\
- if (BOOST_LIKELY(this->room_enough())){\
- T* const p = this->priv_raw_end();\
- allocator_traits_type::construct (this->m_holder.alloc()\
- , this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- ++this->m_holder.m_size;\
- return *p;\
- }\
- else{\
- typedef dtl::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
- return *this->priv_forward_range_insert_no_capacity\
- ( this->back_ptr(), 1, type(BOOST_MOVE_FWD##N), alloc_version());\
- }\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- BOOST_CONTAINER_FORCEINLINE bool stable_emplace_back(BOOST_MOVE_UREF##N)\
- {\
- const bool is_room_enough = this->room_enough() || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(1u));\
- if (BOOST_LIKELY(is_room_enough)){\
- allocator_traits_type::construct (this->m_holder.alloc()\
- , this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
- ++this->m_holder.m_size;\
- }\
- return is_room_enough;\
- }\
- \
- BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
- iterator emplace(const_iterator pos BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
- {\
- BOOST_ASSERT(this->priv_in_range_or_end(pos));\
- typedef dtl::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
- return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), 1, type(BOOST_MOVE_FWD##N));\
- }\
- //
- BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_VECTOR_EMPLACE_CODE)
- #undef BOOST_CONTAINER_VECTOR_EMPLACE_CODE
-
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Inserts a copy of x at the end of the vector.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy/move constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_back(const T &x);
-
- //! <b>Effects</b>: Constructs a new element in the end of the vector
- //! and moves the resources of x to this new element.
- //!
- //! <b>Throws</b>: If memory allocation throws or
- //! T's copy/move constructor throws.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- void push_back(T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
- #endif
-
- #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- //! <b>Requires</b>: position must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of x before position.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment throws.
- //!
- //! <b>Complexity</b>: If position is end(), amortized constant time
- //! Linear time otherwise.
- iterator insert(const_iterator position, const T &x);
-
- //! <b>Requires</b>: position must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a new element before position with x's resources.
- //!
- //! <b>Throws</b>: If memory allocation throws.
- //!
- //! <b>Complexity</b>: If position is end(), amortized constant time
- //! Linear time otherwise.
- iterator insert(const_iterator position, T &&x);
- #else
- BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
- #endif
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert n copies of x before pos.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
- //!
- //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor throws.
- //!
- //! <b>Complexity</b>: Linear to n.
- iterator insert(const_iterator p, size_type n, const T& x)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- dtl::insert_n_copies_proxy<Allocator, T*> proxy(x);
- return this->priv_forward_range_insert(vector_iterator_get_ptr(p), n, proxy);
- }
-
- //! <b>Requires</b>: p must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or pos if first == last.
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced InpIt throws or T's copy/move constructor/assignment throws.
- //!
- //! <b>Complexity</b>: Linear to boost::container::iterator_distance [first, last).
- template <class InIt>
- iterator insert(const_iterator pos, InIt first, InIt last
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<InIt, size_type>
- , dtl::is_not_input_iterator<InIt>
- >::type * = 0
- #endif
- )
- {
- BOOST_ASSERT(this->priv_in_range_or_end(pos));
- const size_type n_pos = pos - this->cbegin();
- iterator it(vector_iterator_get_ptr(pos));
- for(;first != last; ++first){
- it = this->emplace(it, *first);
- ++it;
- }
- return iterator(this->m_holder.start() + n_pos);
- }
-
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class FwdIt>
- iterator insert(const_iterator pos, FwdIt first, FwdIt last
- , typename dtl::disable_if_or
- < void
- , dtl::is_convertible<FwdIt, size_type>
- , dtl::is_input_iterator<FwdIt>
- >::type * = 0
- )
- {
- BOOST_ASSERT(this->priv_in_range_or_end(pos));
- dtl::insert_range_proxy<Allocator, FwdIt, T*> proxy(first);
- return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), boost::container::iterator_distance(first, last), proxy);
- }
- #endif
-
- //! <b>Requires</b>: p must be a valid iterator of *this. num, must
- //! be equal to boost::container::iterator_distance(first, last)
- //!
- //! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or pos if first == last.
- //!
- //! <b>Throws</b>: If memory allocation throws, T's constructor from a
- //! dereferenced InpIt throws or T's copy/move constructor/assignment throws.
- //!
- //! <b>Complexity</b>: Linear to boost::container::iterator_distance [first, last).
- //!
- //! <b>Note</b>: This function avoids a linear operation to calculate boost::container::iterator_distance[first, last)
- //! for forward and bidirectional iterators, and a one by one insertion for input iterators. This is a
- //! a non-standard extension.
- #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
- template <class InIt>
- iterator insert(const_iterator pos, size_type num, InIt first, InIt last)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(pos));
- BOOST_ASSERT(dtl::is_input_iterator<InIt>::value ||
- num == static_cast<size_type>(boost::container::iterator_distance(first, last)));
- (void)last;
- dtl::insert_range_proxy<Allocator, InIt, T*> proxy(first);
- return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), num, proxy);
- }
- #endif
-
- #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
- //! <b>Requires</b>: position must be a valid iterator of *this.
- //!
- //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before position.
- //!
- //! <b>Returns</b>: an iterator to the first inserted element or position if first == last.
- //!
- //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
- iterator insert(const_iterator position, std::initializer_list<value_type> il)
- {
- //Assertion done in insert()
- return this->insert(position, il.begin(), il.end());
- }
- #endif
-
- //! <b>Effects</b>: Removes the last element from the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(!this->empty());
- //Destroy last element
- this->priv_destroy_last();
- }
-
- //! <b>Effects</b>: Erases the element at position pos.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements between pos and the
- //! last element. Constant if pos is the last element.
- iterator erase(const_iterator position)
- {
- BOOST_ASSERT(this->priv_in_range(position));
- const pointer p = vector_iterator_get_ptr(position);
- T *const pos_ptr = boost::movelib::to_raw_pointer(p);
- T *const beg_ptr = this->priv_raw_begin();
- T *const new_end_ptr = ::boost::container::move(pos_ptr + 1, beg_ptr + this->m_holder.m_size, pos_ptr);
- //Move elements forward and destroy last
- this->priv_destroy_last(pos_ptr != new_end_ptr);
- return iterator(p);
- }
-
- //! <b>Effects</b>: Erases the elements pointed by [first, last).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the distance between first and last
- //! plus linear to the elements between pos and the last element.
- iterator erase(const_iterator first, const_iterator last)
- {
- BOOST_ASSERT(first == last ||
- (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last)));
- if (first != last){
- T* const old_end_ptr = this->priv_raw_end();
- T* const first_ptr = boost::movelib::to_raw_pointer(vector_iterator_get_ptr(first));
- T* const last_ptr = boost::movelib::to_raw_pointer(vector_iterator_get_ptr(last));
- T* const ptr = boost::movelib::to_raw_pointer(boost::container::move(last_ptr, old_end_ptr, first_ptr));
- this->priv_destroy_last_n(old_end_ptr - ptr);
- }
- return iterator(vector_iterator_get_ptr(first));
- }
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE void swap(vector& x)
- BOOST_NOEXCEPT_IF( ((allocator_traits_type::propagate_on_container_swap::value
- || allocator_traits_type::is_always_equal::value) &&
- !dtl::is_version<Allocator, 0>::value))
- {
- this->priv_swap(x, dtl::bool_<dtl::is_version<Allocator, 0>::value>());
- }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Swaps the contents of *this and x.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear
- //!
- //! <b>Note</b>: Non-standard extension to support static_vector
- template<class OtherAllocator>
- BOOST_CONTAINER_FORCEINLINE void swap(vector<T, OtherAllocator> & x
- , typename dtl::enable_if_and
- < void
- , dtl::is_version<OtherAllocator, 0>
- , dtl::is_different<OtherAllocator, allocator_type>
- >::type * = 0
- )
- { this->m_holder.deep_swap(x.m_holder); }
-
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
- //! <b>Effects</b>: Erases all the elements of the vector.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
- { this->priv_destroy_all(); }
-
- //! <b>Effects</b>: Returns true if x and y are equal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator==(const vector& x, const vector& y)
- { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
-
- //! <b>Effects</b>: Returns true if x and y are unequal
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const vector& x, const vector& y)
- { return !(x == y); }
-
- //! <b>Effects</b>: Returns true if x is less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- friend bool operator<(const vector& x, const vector& y)
- {
- const_iterator first1(x.cbegin()), first2(y.cbegin());
- const const_iterator last1(x.cend()), last2(y.cend());
- for ( ; (first1 != last1) && (first2 != last2); ++first1, ++first2 ) {
- if (*first1 < *first2) return true;
- if (*first2 < *first1) return false;
- }
- return (first1 == last1) && (first2 != last2);
- }
-
- //! <b>Effects</b>: Returns true if x is greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator>(const vector& x, const vector& y)
- { return y < x; }
-
- //! <b>Effects</b>: Returns true if x is equal or less than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const vector& x, const vector& y)
- { return !(y < x); }
-
- //! <b>Effects</b>: Returns true if x is equal or greater than y
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the container.
- BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const vector& x, const vector& y)
- { return !(x < y); }
-
- //! <b>Effects</b>: x.swap(y)
- //!
- //! <b>Complexity</b>: Constant.
- BOOST_CONTAINER_FORCEINLINE friend void swap(vector& x, vector& y)
- { x.swap(y); }
-
- #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
- //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
- //! effect. Otherwise, it is a request for allocation of additional memory
- //! (memory expansion) that will not invalidate iterators.
- //! If the request is successful, then capacity() is greater than or equal to
- //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
- //!
- //! <b>Throws</b>: If memory allocation allocation throws or T's copy/move constructor throws.
- //!
- //! <b>Note</b>: Non-standard extension.
- bool stable_reserve(size_type new_cap)
- {
- const size_type cp = this->capacity();
- return cp >= new_cap || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(new_cap - cp));
- }
-
- //Absolutely experimental. This function might change, disappear or simply crash!
- template<class BiDirPosConstIt, class BiDirValueIt>
- BOOST_CONTAINER_FORCEINLINE void insert_ordered_at(const size_type element_count, BiDirPosConstIt last_position_it, BiDirValueIt last_value_it)
- {
- typedef vector_insert_ordered_cursor<BiDirPosConstIt, BiDirValueIt> inserter_t;
- return this->priv_insert_ordered_at(element_count, inserter_t(last_position_it, last_value_it));
- }
-
- template<class InputIt>
- BOOST_CONTAINER_FORCEINLINE void merge(InputIt first, InputIt last)
- { this->merge(first, last, value_less_t()); }
-
- template<class InputIt, class Compare>
- BOOST_CONTAINER_FORCEINLINE void merge(InputIt first, InputIt last, Compare comp)
- {
- size_type const s = this->size();
- size_type const c = this->capacity();
- size_type n = 0;
- size_type const free_cap = c - s;
- //If not input iterator and new elements don't fit in the remaining capacity, merge in new buffer
- if(!dtl::is_input_iterator<InputIt>::value &&
- free_cap < (n = static_cast<size_type>(boost::container::iterator_distance(first, last)))){
- this->priv_merge_in_new_buffer(first, n, comp, alloc_version());
- }
- else{
- iterator pos(this->insert(this->cend(), first, last));
- T *const raw_beg = this->priv_raw_begin();
- T *const raw_end = this->priv_raw_end();
- T *const raw_pos = raw_beg + s;
- boost::movelib::adaptive_merge(raw_beg, raw_pos, raw_end, comp, raw_end, free_cap - n);
- }
- }
-
- template<class InputIt>
- BOOST_CONTAINER_FORCEINLINE void merge_unique(InputIt first, InputIt last)
- { this->merge_unique(first, last, value_less_t()); }
-
- template<class InputIt, class Compare>
- BOOST_CONTAINER_FORCEINLINE void merge_unique(InputIt first, InputIt last, Compare comp)
- {
- size_type const old_size = this->size();
- this->priv_set_difference_back(first, last, comp);
- T *const raw_beg = this->priv_raw_begin();
- T *const raw_end = this->priv_raw_end();
- T *raw_pos = raw_beg + old_size;
- boost::movelib::adaptive_merge(raw_beg, raw_pos, raw_end, comp, raw_end, this->capacity() - this->size());
- }
-
- private:
- template<class PositionValue>
- void priv_insert_ordered_at(const size_type element_count, PositionValue position_value)
- {
- const size_type old_size_pos = this->size();
- this->reserve(old_size_pos + element_count);
- T* const begin_ptr = this->priv_raw_begin();
- size_type insertions_left = element_count;
- size_type prev_pos = old_size_pos;
- size_type old_hole_size = element_count;
-
- //Exception rollback. If any copy throws before the hole is filled, values
- //already inserted/copied at the end of the buffer will be destroyed.
- typename value_traits::ArrayDestructor past_hole_values_destroyer
- (begin_ptr + old_size_pos + element_count, this->m_holder.alloc(), size_type(0u));
- //Loop for each insertion backwards, first moving the elements after the insertion point,
- //then inserting the element.
- while(insertions_left){
- --position_value;
- size_type const pos = position_value.get_pos();
- BOOST_ASSERT(pos != size_type(-1) && pos <= old_size_pos && pos <= prev_pos);
- //If needed shift the range after the insertion point and the previous insertion point.
- //Function will take care if the shift crosses the size() boundary, using copy/move
- //or uninitialized copy/move if necessary.
- size_type new_hole_size = (pos != prev_pos)
- ? priv_insert_ordered_at_shift_range(pos, prev_pos, this->size(), insertions_left)
- : old_hole_size
- ;
- if(new_hole_size){
- //The hole was reduced by priv_insert_ordered_at_shift_range so expand exception rollback range backwards
- past_hole_values_destroyer.increment_size_backwards(prev_pos - pos);
- //Insert the new value in the hole
- allocator_traits_type::construct(this->m_holder.alloc(), begin_ptr + pos + insertions_left - 1, position_value.get_val());
- if(--new_hole_size){
- //The hole was reduced by the new insertion by one
- past_hole_values_destroyer.increment_size_backwards(size_type(1u));
- }
- else{
- //Hole was just filled, disable exception rollback and change vector size
- past_hole_values_destroyer.release();
- this->m_holder.m_size += element_count;
- }
- }
- else{
- if(old_hole_size){
- //Hole was just filled by priv_insert_ordered_at_shift_range, disable exception rollback and change vector size
- past_hole_values_destroyer.release();
- this->m_holder.m_size += element_count;
- }
- //Insert the new value in the already constructed range
- begin_ptr[pos + insertions_left - 1] = position_value.get_val();
- }
- --insertions_left;
- old_hole_size = new_hole_size;
- prev_pos = pos;
- }
- }
-
- template<class InputIt, class Compare>
- void priv_set_difference_back(InputIt first1, InputIt last1, Compare comp)
- {
- T * old_first2 = this->priv_raw_begin();
- T * first2 = old_first2;
- T * last2 = this->priv_raw_end();
-
- while (first1 != last1) {
- if (first2 == last2){
- this->insert(this->cend(), first1, last1);
- return;
- }
-
- if (comp(*first1, *first2)) {
- this->emplace_back(*first1);
- T * const raw_begin = this->priv_raw_begin();
- if(old_first2 != raw_begin)
- {
- //Reallocation happened, update range
- first2 = raw_begin + (first2 - old_first2);
- last2 = raw_begin + (last2 - old_first2);
- old_first2 = raw_begin;
- }
- ++first1;
- }
- else {
- if (!comp(*first2, *first1)) {
- ++first1;
- }
- ++first2;
- }
- }
- }
-
- template<class FwdIt, class Compare>
- BOOST_CONTAINER_FORCEINLINE void priv_merge_in_new_buffer(FwdIt, size_type, Compare, version_0)
- {
- throw_bad_alloc();
- }
-
- template<class FwdIt, class Compare, class Version>
- void priv_merge_in_new_buffer(FwdIt first, size_type n, Compare comp, Version)
- {
- size_type const new_size = this->size() + n;
- size_type new_cap = new_size;
- pointer p = pointer();
- pointer const new_storage = this->m_holder.allocation_command(allocate_new, new_size, new_cap, p);
-
- BOOST_ASSERT((new_cap >= this->size() ) && (new_cap - this->size()) >= n);
- allocator_type &a = this->m_holder.alloc();
- typename value_traits::ArrayDeallocator new_buffer_deallocator(new_storage, a, new_cap);
- typename value_traits::ArrayDestructor new_values_destroyer(new_storage, a, 0u);
- T* pbeg = this->priv_raw_begin();
- size_type const old_size = this->size();
- T* const pend = pbeg + old_size;
- T* d_first = boost::movelib::to_raw_pointer(new_storage);
- size_type added = n;
- //Merge in new buffer loop
- while(1){
- if(!n) {
- ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), pbeg, pend, d_first);
- break;
- }
- else if(pbeg == pend) {
- ::boost::container::uninitialized_move_alloc_n(this->m_holder.alloc(), first, n, d_first);
- break;
- }
- //maintain stability moving external values only if they are strictly less
- else if(comp(*first, *pbeg)) {
- allocator_traits_type::construct( this->m_holder.alloc(), d_first, *first );
- new_values_destroyer.increment_size(1u);
- ++first;
- --n;
- ++d_first;
- }
- else{
- allocator_traits_type::construct( this->m_holder.alloc(), d_first, boost::move(*pbeg) );
- new_values_destroyer.increment_size(1u);
- ++pbeg;
- ++d_first;
- }
- }
-
- //Nothrow operations
- pointer const old_p = this->m_holder.start();
- size_type const old_cap = this->m_holder.capacity();
- boost::container::destroy_alloc_n(a, boost::movelib::to_raw_pointer(old_p), old_size);
- this->m_holder.deallocate(old_p, old_cap);
- this->m_holder.m_size = old_size + added;
- this->m_holder.start(new_storage);
- this->m_holder.capacity(new_cap);
- new_buffer_deallocator.release();
- new_values_destroyer.release();
- }
-
- BOOST_CONTAINER_FORCEINLINE bool room_enough() const
- { return this->m_holder.m_size < this->m_holder.capacity(); }
-
- BOOST_CONTAINER_FORCEINLINE pointer back_ptr() const
- { return this->m_holder.start() + this->m_holder.m_size; }
-
- size_type priv_index_of(pointer p) const
- {
- BOOST_ASSERT(this->m_holder.start() <= p);
- BOOST_ASSERT(p <= (this->m_holder.start()+this->size()));
- return static_cast<size_type>(p - this->m_holder.start());
- }
-
- template<class OtherAllocator>
- void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
- , typename dtl::enable_if_c
- < dtl::is_version<OtherAllocator, 0>::value >::type * = 0)
- {
- if(!dtl::is_same<OtherAllocator, allocator_type>::value &&
- this->capacity() < x.size()){
- throw_bad_alloc();
- }
- T* const this_start = this->priv_raw_begin();
- T* const other_start = x.priv_raw_begin();
- const size_type this_sz = m_holder.m_size;
- const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
- boost::container::move_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
- this->m_holder.m_size = other_sz;
- }
-
- template<class OtherAllocator>
- void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
- , typename dtl::disable_if_or
- < void
- , dtl::is_version<OtherAllocator, 0>
- , dtl::is_different<OtherAllocator, allocator_type>
- >::type * = 0)
- {
- //for move assignment, no aliasing (&x != this) is assummed.
- BOOST_ASSERT(this != &x);
- allocator_type &this_alloc = this->m_holder.alloc();
- allocator_type &x_alloc = x.m_holder.alloc();
- const bool propagate_alloc = allocator_traits_type::propagate_on_container_move_assignment::value;
-
- const bool is_propagable_from_x = is_propagable_from(x_alloc, x.m_holder.start(), this_alloc, propagate_alloc);
- const bool is_propagable_from_t = is_propagable_from(this_alloc, m_holder.start(), x_alloc, propagate_alloc);
- const bool are_both_propagable = is_propagable_from_x && is_propagable_from_t;
-
- //Resources can be transferred if both allocators are
- //going to be equal after this function (either propagated or already equal)
- if(are_both_propagable){
- //Destroy objects but retain memory in case x reuses it in the future
- this->clear();
- this->m_holder.swap_resources(x.m_holder);
- }
- else if(is_propagable_from_x){
- this->clear();
- this->m_holder.deallocate(this->m_holder.m_start, this->m_holder.m_capacity);
- this->m_holder.steal_resources(x.m_holder);
- }
- //Else do a one by one move
- else{
- this->assign( boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.begin()))
- , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.end() ))
- );
- }
- //Move allocator if needed
- dtl::move_alloc(this_alloc, x_alloc, dtl::bool_<propagate_alloc>());
- }
-
- template<class OtherAllocator>
- void priv_copy_assign(const vector<T, OtherAllocator> &x
- , typename dtl::enable_if_c
- < dtl::is_version<OtherAllocator, 0>::value >::type * = 0)
- {
- if(!dtl::is_same<OtherAllocator, allocator_type>::value &&
- this->capacity() < x.size()){
- throw_bad_alloc();
- }
- T* const this_start = this->priv_raw_begin();
- T* const other_start = x.priv_raw_begin();
- const size_type this_sz = m_holder.m_size;
- const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
- boost::container::copy_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
- this->m_holder.m_size = other_sz;
- }
-
- template<class OtherAllocator>
- typename dtl::disable_if_or
- < void
- , dtl::is_version<OtherAllocator, 0>
- , dtl::is_different<OtherAllocator, allocator_type>
- >::type
- priv_copy_assign(const vector<T, OtherAllocator> &x)
- {
- allocator_type &this_alloc = this->m_holder.alloc();
- const allocator_type &x_alloc = x.m_holder.alloc();
- dtl::bool_<allocator_traits_type::
- propagate_on_container_copy_assignment::value> flag;
- if(flag && this_alloc != x_alloc){
- this->clear();
- this->shrink_to_fit();
- }
- dtl::assign_alloc(this_alloc, x_alloc, flag);
- this->assign( x.priv_raw_begin(), x.priv_raw_end() );
- }
-
- template<class Vector> //Template it to avoid it in explicit instantiations
- void priv_swap(Vector &x, dtl::true_type) //version_0
- { this->m_holder.deep_swap(x.m_holder); }
-
- template<class Vector> //Template it to avoid it in explicit instantiations
- void priv_swap(Vector &x, dtl::false_type) //version_N
- {
- const bool propagate_alloc = allocator_traits_type::propagate_on_container_swap::value;
- if(are_swap_propagable( this->get_stored_allocator(), this->m_holder.start()
- , x.get_stored_allocator(), x.m_holder.start(), propagate_alloc)){
- //Just swap internals
- this->m_holder.swap_resources(x.m_holder);
- }
- else{
- //Else swap element by element...
- bool const t_smaller = this->size() < x.size();
- vector &sml = t_smaller ? *this : x;
- vector &big = t_smaller ? x : *this;
-
- size_type const common_elements = sml.size();
- for(size_type i = 0; i != common_elements; ++i){
- boost::adl_move_swap(sml[i], big[i]);
- }
- //... and move-insert the remaining range
- sml.insert( sml.cend()
- , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(big.nth(common_elements)))
- , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(big.end()))
- );
- //Destroy remaining elements
- big.erase(big.nth(common_elements), big.cend());
- }
- //And now swap the allocator
- dtl::swap_alloc(this->m_holder.alloc(), x.m_holder.alloc(), dtl::bool_<propagate_alloc>());
- }
-
- void priv_reserve_no_capacity(size_type, version_0)
- { throw_bad_alloc(); }
-
- dtl::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*> priv_dummy_empty_proxy()
- {
- return dtl::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*>
- (::boost::make_move_iterator((T *)0));
- }
-
- void priv_reserve_no_capacity(size_type new_cap, version_1)
- {
- //There is not enough memory, allocate a new buffer
- //Pass the hint so that allocators can take advantage of this.
- pointer const p = this->m_holder.allocate(new_cap);
- //We will reuse insert code, so create a dummy input iterator
- this->priv_forward_range_insert_new_allocation
- ( boost::movelib::to_raw_pointer(p), new_cap, this->priv_raw_end(), 0, this->priv_dummy_empty_proxy());
- }
-
- void priv_reserve_no_capacity(size_type new_cap, version_2)
- {
- //There is not enough memory, allocate a new
- //buffer or expand the old one.
- bool same_buffer_start;
- size_type real_cap = 0;
- pointer reuse(this->m_holder.start());
- pointer const ret(this->m_holder.allocation_command(allocate_new | expand_fwd | expand_bwd, new_cap, real_cap = new_cap, reuse));
-
- //Check for forward expansion
- same_buffer_start = reuse && this->m_holder.start() == ret;
- if(same_buffer_start){
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_expand_fwd;
- #endif
- this->m_holder.capacity(real_cap);
- }
- else{ //If there is no forward expansion, move objects, we will reuse insertion code
- T * const new_mem = boost::movelib::to_raw_pointer(ret);
- T * const ins_pos = this->priv_raw_end();
- if(reuse){ //Backwards (and possibly forward) expansion
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_expand_bwd;
- #endif
- this->priv_forward_range_insert_expand_backwards
- ( new_mem , real_cap, ins_pos, 0, this->priv_dummy_empty_proxy());
- }
- else{ //New buffer
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_alloc;
- #endif
- this->priv_forward_range_insert_new_allocation
- ( new_mem, real_cap, ins_pos, 0, this->priv_dummy_empty_proxy());
- }
- }
- }
-
- void priv_destroy_last(const bool moved = false) BOOST_NOEXCEPT_OR_NOTHROW
- {
- (void)moved;
- const bool skip_destructor = value_traits::trivial_dctr || (value_traits::trivial_dctr_after_move && moved);
- if(!skip_destructor){
- value_type* const p = this->priv_raw_end() - 1;
- allocator_traits_type::destroy(this->get_stored_allocator(), p);
- }
- --this->m_holder.m_size;
- }
-
- void priv_destroy_last_n(const size_type n) BOOST_NOEXCEPT_OR_NOTHROW
- {
- BOOST_ASSERT(n <= this->m_holder.m_size);
- if(!value_traits::trivial_dctr){
- T* const destroy_pos = this->priv_raw_begin() + (this->m_holder.m_size-n);
- boost::container::destroy_alloc_n(this->get_stored_allocator(), destroy_pos, n);
- }
- this->m_holder.m_size -= n;
- }
-
- template<class InpIt>
- void priv_uninitialized_construct_at_end(InpIt first, InpIt last)
- {
- T* const old_end_pos = this->priv_raw_end();
- T* const new_end_pos = boost::container::uninitialized_copy_alloc(this->m_holder.alloc(), first, last, old_end_pos);
- this->m_holder.m_size += new_end_pos - old_end_pos;
- }
-
- void priv_destroy_all() BOOST_NOEXCEPT_OR_NOTHROW
- {
- boost::container::destroy_alloc_n
- (this->get_stored_allocator(), this->priv_raw_begin(), this->m_holder.m_size);
- this->m_holder.m_size = 0;
- }
-
- template<class U>
- iterator priv_insert(const const_iterator &p, BOOST_FWD_REF(U) x)
- {
- BOOST_ASSERT(this->priv_in_range_or_end(p));
- return this->priv_forward_range_insert
- ( vector_iterator_get_ptr(p), 1, dtl::get_insert_value_proxy<T*, Allocator>(::boost::forward<U>(x)));
- }
-
- dtl::insert_copy_proxy<Allocator, T*> priv_single_insert_proxy(const T &x)
- { return dtl::insert_copy_proxy<Allocator, T*> (x); }
-
- dtl::insert_move_proxy<Allocator, T*> priv_single_insert_proxy(BOOST_RV_REF(T) x)
- { return dtl::insert_move_proxy<Allocator, T*> (x); }
-
- template <class U>
- void priv_push_back(BOOST_FWD_REF(U) u)
- {
- if (BOOST_LIKELY(this->room_enough())){
- //There is more memory, just construct a new object at the end
- allocator_traits_type::construct
- ( this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<U>(u) );
- ++this->m_holder.m_size;
- }
- else{
- this->priv_forward_range_insert_no_capacity
- ( this->back_ptr(), 1
- , this->priv_single_insert_proxy(::boost::forward<U>(u)), alloc_version());
- }
- }
-
- BOOST_CONTAINER_FORCEINLINE dtl::insert_n_copies_proxy<Allocator, T*> priv_resize_proxy(const T &x)
- { return dtl::insert_n_copies_proxy<Allocator, T*>(x); }
-
- BOOST_CONTAINER_FORCEINLINE dtl::insert_default_initialized_n_proxy<Allocator, T*> priv_resize_proxy(default_init_t)
- { return dtl::insert_default_initialized_n_proxy<Allocator, T*>(); }
-
- BOOST_CONTAINER_FORCEINLINE dtl::insert_value_initialized_n_proxy<Allocator, T*> priv_resize_proxy(value_init_t)
- { return dtl::insert_value_initialized_n_proxy<Allocator, T*>(); }
-
- template <class U>
- void priv_resize(size_type new_size, const U& u)
- {
- const size_type sz = this->size();
- if (new_size < sz){
- //Destroy last elements
- this->priv_destroy_last_n(sz - new_size);
- }
- else{
- const size_type n = new_size - this->size();
- this->priv_forward_range_insert_at_end(n, this->priv_resize_proxy(u), alloc_version());
- }
- }
-
- BOOST_CONTAINER_FORCEINLINE void priv_shrink_to_fit(version_0) BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
- void priv_shrink_to_fit(version_1)
- {
- const size_type cp = this->m_holder.capacity();
- if(cp){
- const size_type sz = this->size();
- if(!sz){
- this->m_holder.deallocate(this->m_holder.m_start, cp);
- this->m_holder.m_start = pointer();
- this->m_holder.m_capacity = 0;
- }
- else if(sz < cp){
- //Allocate a new buffer.
- //Pass the hint so that allocators can take advantage of this.
- pointer const p = this->m_holder.allocate(sz);
-
- //We will reuse insert code, so create a dummy input iterator
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_alloc;
- #endif
- this->priv_forward_range_insert_new_allocation
- ( boost::movelib::to_raw_pointer(p), sz
- , this->priv_raw_begin(), 0, this->priv_dummy_empty_proxy());
- }
- }
- }
-
- void priv_shrink_to_fit(version_2) BOOST_NOEXCEPT_OR_NOTHROW
- {
- const size_type cp = this->m_holder.capacity();
- if(cp){
- const size_type sz = this->size();
- if(!sz){
- this->m_holder.deallocate(this->m_holder.m_start, cp);
- this->m_holder.m_start = pointer();
- this->m_holder.m_capacity = 0;
- }
- else{
- size_type received_size = sz;
- pointer reuse(this->m_holder.start());
- if(this->m_holder.allocation_command
- (shrink_in_place | nothrow_allocation, cp, received_size, reuse)){
- this->m_holder.capacity(received_size);
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_shrink;
- #endif
- }
- }
- }
- }
-
- template <class InsertionProxy>
- iterator priv_forward_range_insert_no_capacity
- (const pointer &pos, const size_type, const InsertionProxy , version_0)
- {
- throw_bad_alloc();
- return iterator(pos);
- }
-
- template <class InsertionProxy>
- iterator priv_forward_range_insert_no_capacity
- (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_1)
- {
- //Check if we have enough memory or try to expand current memory
- const size_type n_pos = pos - this->m_holder.start();
- T *const raw_pos = boost::movelib::to_raw_pointer(pos);
-
- const size_type new_cap = this->m_holder.template next_capacity<growth_factor_type>(n);
- //Pass the hint so that allocators can take advantage of this.
- T * const new_buf = boost::movelib::to_raw_pointer(this->m_holder.allocate(new_cap));
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_alloc;
- #endif
- this->priv_forward_range_insert_new_allocation
- ( new_buf, new_cap, raw_pos, n, insert_range_proxy);
- return iterator(this->m_holder.start() + n_pos);
- }
-
- template <class InsertionProxy>
- iterator priv_forward_range_insert_no_capacity
- (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_2)
- {
- //Check if we have enough memory or try to expand current memory
- T *const raw_pos = boost::movelib::to_raw_pointer(pos);
- const size_type n_pos = raw_pos - this->priv_raw_begin();
-
- //There is not enough memory, allocate a new
- //buffer or expand the old one.
- size_type real_cap = this->m_holder.template next_capacity<growth_factor_type>(n);
- pointer reuse(this->m_holder.start());
- pointer const ret (this->m_holder.allocation_command
- (allocate_new | expand_fwd | expand_bwd, this->m_holder.m_size + n, real_cap, reuse));
-
- //Buffer reallocated
- if(reuse){
- //Forward expansion, delay insertion
- if(this->m_holder.start() == ret){
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_expand_fwd;
- #endif
- this->m_holder.capacity(real_cap);
- //Expand forward
- this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
- }
- //Backwards (and possibly forward) expansion
- else{
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_expand_bwd;
- #endif
- this->priv_forward_range_insert_expand_backwards
- (boost::movelib::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
- }
- }
- //New buffer
- else{
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- ++this->num_alloc;
- #endif
- this->priv_forward_range_insert_new_allocation
- ( boost::movelib::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
- }
-
- return iterator(this->m_holder.start() + n_pos);
- }
-
- template <class InsertionProxy>
- iterator priv_forward_range_insert
- (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy)
- {
- BOOST_ASSERT(this->m_holder.capacity() >= this->m_holder.m_size);
- //Check if we have enough memory or try to expand current memory
- const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
-
- bool same_buffer_start = n <= remaining;
- if (!same_buffer_start){
- return priv_forward_range_insert_no_capacity(pos, n, insert_range_proxy, alloc_version());
- }
- else{
- //Expand forward
- T *const raw_pos = boost::movelib::to_raw_pointer(pos);
- const size_type n_pos = raw_pos - this->priv_raw_begin();
- this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
- return iterator(this->m_holder.start() + n_pos);
- }
- }
-
- template <class InsertionProxy>
- iterator priv_forward_range_insert_at_end
- (const size_type n, const InsertionProxy insert_range_proxy, version_0)
- {
- //Check if we have enough memory or try to expand current memory
- const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
-
- if (n > remaining){
- //This will trigger an error
- throw_bad_alloc();
- }
- this->priv_forward_range_insert_at_end_expand_forward(n, insert_range_proxy);
- return this->end();
- }
-
- template <class InsertionProxy, class AllocVersion>
- BOOST_CONTAINER_FORCEINLINE iterator priv_forward_range_insert_at_end
- (const size_type n, const InsertionProxy insert_range_proxy, AllocVersion)
- {
- return this->priv_forward_range_insert(this->back_ptr(), n, insert_range_proxy);
- }
-
- //Takes the range pointed by [first_pos, last_pos) and shifts it to the right
- //by 'shift_count'. 'limit_pos' marks the end of constructed elements.
- //
- //Precondition: first_pos <= last_pos <= limit_pos
- //
- //The shift operation might cross limit_pos so elements to moved beyond limit_pos
- //are uninitialized_moved with an allocator. Other elements are moved.
- //
- //The shift operation might left uninitialized elements after limit_pos
- //and the number of uninitialized elements is returned by the function.
- //
- //Old situation:
- // first_pos last_pos old_limit
- // | | |
- // ____________V_______V__________________V_____________
- //| prefix | range | suffix |raw_mem ~
- //|____________|_______|__________________|_____________~
- //
- //New situation in Case A (hole_size == 0):
- // range is moved through move assignments
- //
- // first_pos last_pos limit_pos
- // | | |
- // ____________V_______V__________________V_____________
- //| prefix' | | | range |suffix'|raw_mem ~
- //|________________+______|___^___|_______|_____________~
- // | |
- // |_>_>_>_>_>^
- //
- //
- //New situation in Case B (hole_size >= 0):
- // range is moved through uninitialized moves
- //
- // first_pos last_pos limit_pos
- // | | |
- // ____________V_______V__________________V________________
- //| prefix' | | | [hole] | range |
- //|_______________________________________|________|___^___|
- // | |
- // |_>_>_>_>_>_>_>_>_>_>_>_>_>_>_>_>_>_^
- //
- //New situation in Case C (hole_size == 0):
- // range is moved through move assignments and uninitialized moves
- //
- // first_pos last_pos limit_pos
- // | | |
- // ____________V_______V__________________V___
- //| prefix' | | | range |
- //|___________________________________|___^___|
- // | |
- // |_>_>_>_>_>_>_>_>_>_>_>^
- size_type priv_insert_ordered_at_shift_range
- (size_type first_pos, size_type last_pos, size_type limit_pos, size_type shift_count)
- {
- BOOST_ASSERT(first_pos <= last_pos);
- BOOST_ASSERT(last_pos <= limit_pos);
- //
- T* const begin_ptr = this->priv_raw_begin();
- T* const first_ptr = begin_ptr + first_pos;
- T* const last_ptr = begin_ptr + last_pos;
-
- size_type hole_size = 0;
- //Case A:
- if((last_pos + shift_count) <= limit_pos){
- //All move assigned
- boost::container::move_backward(first_ptr, last_ptr, last_ptr + shift_count);
- }
- //Case B:
- else if((first_pos + shift_count) >= limit_pos){
- //All uninitialized_moved
- ::boost::container::uninitialized_move_alloc
- (this->m_holder.alloc(), first_ptr, last_ptr, first_ptr + shift_count);
- hole_size = first_pos + shift_count - limit_pos;
- }
- //Case C:
- else{
- //Some uninitialized_moved
- T* const limit_ptr = begin_ptr + limit_pos;
- T* const boundary_ptr = limit_ptr - shift_count;
- ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), boundary_ptr, last_ptr, limit_ptr);
- //The rest is move assigned
- boost::container::move_backward(first_ptr, boundary_ptr, limit_ptr);
- }
- return hole_size;
- }
-
- private:
- BOOST_CONTAINER_FORCEINLINE T *priv_raw_begin() const
- { return boost::movelib::to_raw_pointer(m_holder.start()); }
-
- BOOST_CONTAINER_FORCEINLINE T* priv_raw_end() const
- { return this->priv_raw_begin() + this->m_holder.m_size; }
-
- template <class InsertionProxy>
- void priv_forward_range_insert_at_end_expand_forward(const size_type n, InsertionProxy insert_range_proxy)
- {
- T* const old_finish = this->priv_raw_end();
- insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
- this->m_holder.m_size += n;
- }
-
- template <class InsertionProxy>
- void priv_forward_range_insert_expand_forward(T* const pos, const size_type n, InsertionProxy insert_range_proxy)
- {
- //n can't be 0, because there is nothing to do in that case
- if(BOOST_UNLIKELY(!n)) return;
- //There is enough memory
- T* const old_finish = this->priv_raw_end();
- const size_type elems_after = old_finish - pos;
-
- if (!elems_after){
- insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
- this->m_holder.m_size += n;
- }
- else if (elems_after >= n){
- //New elements can be just copied.
- //Move to uninitialized memory last objects
- ::boost::container::uninitialized_move_alloc
- (this->m_holder.alloc(), old_finish - n, old_finish, old_finish);
- this->m_holder.m_size += n;
- //Copy previous to last objects to the initialized end
- boost::container::move_backward(pos, old_finish - n, old_finish);
- //Insert new objects in the pos
- insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, n);
- }
- else {
- //The new elements don't fit in the [pos, end()) range.
-
- //Copy old [pos, end()) elements to the uninitialized memory (a gap is created)
- ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), pos, old_finish, pos + n);
- BOOST_TRY{
- //Copy first new elements in pos (gap is still there)
- insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, elems_after);
- //Copy to the beginning of the unallocated zone the last new elements (the gap is closed).
- insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n - elems_after);
- this->m_holder.m_size += n;
- }
- BOOST_CATCH(...){
- boost::container::destroy_alloc_n(this->get_stored_allocator(), pos + n, elems_after);
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
- }
-
- template <class InsertionProxy>
- void priv_forward_range_insert_new_allocation
- (T* const new_start, size_type new_cap, T* const pos, const size_type n, InsertionProxy insert_range_proxy)
- {
- //n can be zero, if we want to reallocate!
- T *new_finish = new_start;
- T *old_finish;
- //Anti-exception rollbacks
- typename value_traits::ArrayDeallocator new_buffer_deallocator(new_start, this->m_holder.alloc(), new_cap);
- typename value_traits::ArrayDestructor new_values_destroyer(new_start, this->m_holder.alloc(), 0u);
-
- //Initialize with [begin(), pos) old buffer
- //the start of the new buffer
- T * const old_buffer = this->priv_raw_begin();
- if(old_buffer){
- new_finish = ::boost::container::uninitialized_move_alloc
- (this->m_holder.alloc(), this->priv_raw_begin(), pos, old_finish = new_finish);
- new_values_destroyer.increment_size(new_finish - old_finish);
- }
- //Initialize new objects, starting from previous point
- old_finish = new_finish;
- insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
- new_finish += n;
- new_values_destroyer.increment_size(new_finish - old_finish);
- //Initialize from the rest of the old buffer,
- //starting from previous point
- if(old_buffer){
- new_finish = ::boost::container::uninitialized_move_alloc
- (this->m_holder.alloc(), pos, old_buffer + this->m_holder.m_size, new_finish);
- //Destroy and deallocate old elements
- //If there is allocated memory, destroy and deallocate
- if(!value_traits::trivial_dctr_after_move)
- boost::container::destroy_alloc_n(this->get_stored_allocator(), old_buffer, this->m_holder.m_size);
- this->m_holder.deallocate(this->m_holder.start(), this->m_holder.capacity());
- }
- this->m_holder.start(new_start);
- this->m_holder.m_size = size_type(new_finish - new_start);
- this->m_holder.capacity(new_cap);
- //All construction successful, disable rollbacks
- new_values_destroyer.release();
- new_buffer_deallocator.release();
- }
-
- template <class InsertionProxy>
- void priv_forward_range_insert_expand_backwards
- (T* const new_start, const size_type new_capacity,
- T* const pos, const size_type n, InsertionProxy insert_range_proxy)
- {
- //n can be zero to just expand capacity
- //Backup old data
- T* const old_start = this->priv_raw_begin();
- const size_type old_size = this->m_holder.m_size;
- T* const old_finish = old_start + old_size;
-
- //We can have 8 possibilities:
- const size_type elemsbefore = static_cast<size_type>(pos - old_start);
- const size_type s_before = static_cast<size_type>(old_start - new_start);
- const size_type before_plus_new = elemsbefore + n;
-
- //Update the vector buffer information to a safe state
- this->m_holder.start(new_start);
- this->m_holder.capacity(new_capacity);
- this->m_holder.m_size = 0;
-
- //If anything goes wrong, this object will destroy
- //all the old objects to fulfill previous vector state
- typename value_traits::ArrayDestructor old_values_destroyer(old_start, this->m_holder.alloc(), old_size);
- //Check if s_before is big enough to hold the beginning of old data + new data
- if(s_before >= before_plus_new){
- //Copy first old values before pos, after that the new objects
- T *const new_elem_pos =
- ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), old_start, pos, new_start);
- this->m_holder.m_size = elemsbefore;
- insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), new_elem_pos, n);
- this->m_holder.m_size = before_plus_new;
- const size_type new_size = old_size + n;
- //Check if s_before is so big that even copying the old data + new data
- //there is a gap between the new data and the old data
- if(s_before >= new_size){
- //Old situation:
- // _________________________________________________________
- //| raw_mem | old_begin | old_end |
- //| __________________________________|___________|_________|
- //
- //New situation:
- // _________________________________________________________
- //| old_begin | new | old_end | raw_mem |
- //|___________|__________|_________|________________________|
- //
- //Now initialize the rest of memory with the last old values
- if(before_plus_new != new_size){ //Special case to avoid operations in back insertion
- ::boost::container::uninitialized_move_alloc
- (this->m_holder.alloc(), pos, old_finish, new_start + before_plus_new);
- //All new elements correctly constructed, avoid new element destruction
- this->m_holder.m_size = new_size;
- }
- //Old values destroyed automatically with "old_values_destroyer"
- //when "old_values_destroyer" goes out of scope unless the have trivial
- //destructor after move.
- if(value_traits::trivial_dctr_after_move)
- old_values_destroyer.release();
- }
- //s_before is so big that divides old_end
- else{
- //Old situation:
- // __________________________________________________
- //| raw_mem | old_begin | old_end |
- //| ___________________________|___________|_________|
- //
- //New situation:
- // __________________________________________________
- //| old_begin | new | old_end | raw_mem |
- //|___________|__________|_________|_________________|
- //
- //Now initialize the rest of memory with the last old values
- //All new elements correctly constructed, avoid new element destruction
- const size_type raw_gap = s_before - before_plus_new;
- if(!value_traits::trivial_dctr){
- //Now initialize the rest of s_before memory with the
- //first of elements after new values
- ::boost::container::uninitialized_move_alloc_n
- (this->m_holder.alloc(), pos, raw_gap, new_start + before_plus_new);
- //Now we have a contiguous buffer so program trailing element destruction
- //and update size to the final size.
- old_values_destroyer.shrink_forward(new_size-s_before);
- this->m_holder.m_size = new_size;
- //Now move remaining last objects in the old buffer begin
- T * const remaining_pos = pos + raw_gap;
- if(remaining_pos != old_start){ //Make sure data has to be moved
- ::boost::container::move(remaining_pos, old_finish, old_start);
- }
- //Once moved, avoid calling the destructors if trivial after move
- if(value_traits::trivial_dctr_after_move){
- old_values_destroyer.release();
- }
- }
- else{ //If trivial destructor, we can uninitialized copy + copy in a single uninitialized copy
- ::boost::container::uninitialized_move_alloc_n
- (this->m_holder.alloc(), pos, static_cast<size_type>(old_finish - pos), new_start + before_plus_new);
- this->m_holder.m_size = new_size;
- old_values_destroyer.release();
- }
- }
- }
- else{
- //Check if we have to do the insertion in two phases
- //since maybe s_before is not big enough and
- //the buffer was expanded both sides
- //
- //Old situation:
- // _________________________________________________
- //| raw_mem | old_begin + old_end | raw_mem |
- //|_________|_____________________|_________________|
- //
- //New situation with do_after:
- // _________________________________________________
- //| old_begin + new + old_end | raw_mem |
- //|___________________________________|_____________|
- //
- //New without do_after:
- // _________________________________________________
- //| old_begin + new + old_end | raw_mem |
- //|____________________________|____________________|
- //
- const bool do_after = n > s_before;
-
- //Now we can have two situations: the raw_mem of the
- //beginning divides the old_begin, or the new elements:
- if (s_before <= elemsbefore) {
- //The raw memory divides the old_begin group:
- //
- //If we need two phase construction (do_after)
- //new group is divided in new = new_beg + new_end groups
- //In this phase only new_beg will be inserted
- //
- //Old situation:
- // _________________________________________________
- //| raw_mem | old_begin | old_end | raw_mem |
- //|_________|___________|_________|_________________|
- //
- //New situation with do_after(1):
- //This is not definitive situation, the second phase
- //will include
- // _________________________________________________
- //| old_begin | new_beg | old_end | raw_mem |
- //|___________|_________|_________|_________________|
- //
- //New situation without do_after:
- // _________________________________________________
- //| old_begin | new | old_end | raw_mem |
- //|___________|_____|_________|_____________________|
- //
- //Copy the first part of old_begin to raw_mem
- ::boost::container::uninitialized_move_alloc_n
- (this->m_holder.alloc(), old_start, s_before, new_start);
- //The buffer is all constructed until old_end,
- //so program trailing destruction and assign final size
- //if !do_after, s_before+n otherwise.
- size_type new_1st_range;
- if(do_after){
- new_1st_range = s_before;
- //release destroyer and update size
- old_values_destroyer.release();
- }
- else{
- new_1st_range = n;
- if(value_traits::trivial_dctr_after_move)
- old_values_destroyer.release();
- else{
- old_values_destroyer.shrink_forward(old_size - (s_before - n));
- }
- }
- this->m_holder.m_size = old_size + new_1st_range;
- //Now copy the second part of old_begin overwriting itself
- T *const next = ::boost::container::move(old_start + s_before, pos, old_start);
- //Now copy the new_beg elements
- insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), next, new_1st_range);
-
- //If there is no after work and the last old part needs to be moved to front, do it
- if(!do_after && (n != s_before)){
- //Now displace old_end elements
- ::boost::container::move(pos, old_finish, next + new_1st_range);
- }
- }
- else {
- //If we have to expand both sides,
- //we will play if the first new values so
- //calculate the upper bound of new values
-
- //The raw memory divides the new elements
- //
- //If we need two phase construction (do_after)
- //new group is divided in new = new_beg + new_end groups
- //In this phase only new_beg will be inserted
- //
- //Old situation:
- // _______________________________________________________
- //| raw_mem | old_begin | old_end | raw_mem |
- //|_______________|___________|_________|_________________|
- //
- //New situation with do_after():
- // ____________________________________________________
- //| old_begin | new_beg | old_end | raw_mem |
- //|___________|_______________|_________|______________|
- //
- //New situation without do_after:
- // ______________________________________________________
- //| old_begin | new | old_end | raw_mem |
- //|___________|_____|_________|__________________________|
- //
- //First copy whole old_begin and part of new to raw_mem
- T * const new_pos = ::boost::container::uninitialized_move_alloc
- (this->m_holder.alloc(), old_start, pos, new_start);
- this->m_holder.m_size = elemsbefore;
- const size_type mid_n = s_before - elemsbefore;
- insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), new_pos, mid_n);
- //The buffer is all constructed until old_end,
- //release destroyer
- this->m_holder.m_size = old_size + s_before;
- old_values_destroyer.release();
-
- if(do_after){
- //Copy new_beg part
- insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), old_start, elemsbefore);
- }
- else{
- //Copy all new elements
- const size_type rest_new = n - mid_n;
- insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), old_start, rest_new);
- T* const move_start = old_start + rest_new;
- //Displace old_end, but make sure data has to be moved
- T* const move_end = move_start != pos ? ::boost::container::move(pos, old_finish, move_start)
- : old_finish;
- //Destroy remaining moved elements from old_end except if they
- //have trivial destructor after being moved
- size_type n_destroy = s_before - n;
- if(!value_traits::trivial_dctr_after_move)
- boost::container::destroy_alloc_n(this->get_stored_allocator(), move_end, n_destroy);
- this->m_holder.m_size -= n_destroy;
- }
- }
-
- //This is only executed if two phase construction is needed
- if(do_after){
- //The raw memory divides the new elements
- //
- //Old situation:
- // ______________________________________________________
- //| raw_mem | old_begin | old_end | raw_mem |
- //|______________|___________|____________|______________|
- //
- //New situation with do_after(1):
- // _______________________________________________________
- //| old_begin + new_beg | new_end |old_end | raw_mem |
- //|__________________________|_________|________|_________|
- //
- //New situation with do_after(2):
- // ______________________________________________________
- //| old_begin + new | old_end |raw |
- //|_______________________________________|_________|____|
- //
- const size_type n_after = n - s_before;
- const size_type elemsafter = old_size - elemsbefore;
-
- //We can have two situations:
- if (elemsafter >= n_after){
- //The raw_mem from end will divide displaced old_end
- //
- //Old situation:
- // ______________________________________________________
- //| raw_mem | old_begin | old_end | raw_mem |
- //|______________|___________|____________|______________|
- //
- //New situation with do_after(1):
- // _______________________________________________________
- //| old_begin + new_beg | new_end |old_end | raw_mem |
- //|__________________________|_________|________|_________|
- //
- //First copy the part of old_end raw_mem
- T* finish_n = old_finish - n_after;
- ::boost::container::uninitialized_move_alloc
- (this->m_holder.alloc(), finish_n, old_finish, old_finish);
- this->m_holder.m_size += n_after;
- //Displace the rest of old_end to the new position
- boost::container::move_backward(pos, finish_n, old_finish);
- //Now overwrite with new_end
- //The new_end part is [first + (n - n_after), last)
- insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, n_after);
- }
- else {
- //The raw_mem from end will divide new_end part
- //
- //Old situation:
- // _____________________________________________________________
- //| raw_mem | old_begin | old_end | raw_mem |
- //|______________|___________|____________|_____________________|
- //
- //New situation with do_after(2):
- // _____________________________________________________________
- //| old_begin + new_beg | new_end |old_end | raw_mem |
- //|__________________________|_______________|________|_________|
- //
-
- const size_type mid_last_dist = n_after - elemsafter;
- //First initialize data in raw memory
-
- //Copy to the old_end part to the uninitialized zone leaving a gap.
- ::boost::container::uninitialized_move_alloc
- (this->m_holder.alloc(), pos, old_finish, old_finish + mid_last_dist);
-
- typename value_traits::ArrayDestructor old_end_destroyer
- (old_finish + mid_last_dist, this->m_holder.alloc(), old_finish - pos);
-
- //Copy the first part to the already constructed old_end zone
- insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, elemsafter);
- //Copy the rest to the uninitialized zone filling the gap
- insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, mid_last_dist);
- this->m_holder.m_size += n_after;
- old_end_destroyer.release();
- }
- }
- }
- }
-
- void priv_throw_if_out_of_range(size_type n) const
- {
- //If n is out of range, throw an out_of_range exception
- if (n >= this->size()){
- throw_out_of_range("vector::at out of range");
- }
- }
-
- BOOST_CONTAINER_FORCEINLINE bool priv_in_range(const_iterator pos) const
- {
- return (this->begin() <= pos) && (pos < this->end());
- }
-
- BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
- {
- return (this->begin() <= pos) && (pos <= this->end());
- }
-
- #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
- public:
- unsigned int num_expand_fwd;
- unsigned int num_expand_bwd;
- unsigned int num_shrink;
- unsigned int num_alloc;
- void reset_alloc_stats()
- { num_expand_fwd = num_expand_bwd = num_alloc = 0, num_shrink = 0; }
- #endif
- #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-};
-
-#if __cplusplus >= 201703L
-
-template <typename InputIterator>
-vector(InputIterator, InputIterator) ->
- vector<typename iterator_traits<InputIterator>::value_type>;
-
-template <typename InputIterator, typename Allocator>
-vector(InputIterator, InputIterator, Allocator const&) ->
- vector<typename iterator_traits<InputIterator>::value_type, Allocator>;
-
-#endif
-
-
-}} //namespace boost::container
-
-#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-namespace boost {
-
-//!has_trivial_destructor_after_move<> == true_type
-//!specialization for optimizations
-template <class T, class Allocator>
-struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator> >
-{
- typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
- static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
- ::boost::has_trivial_destructor_after_move<pointer>::value;
-};
-
-}
-
-#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
-
-#include <boost/container/detail/config_end.hpp>
-
-#endif // #ifndef BOOST_CONTAINER_CONTAINER_VECTOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/explicit_operator_bool.hpp b/src/third_party/boost-1.68.0/boost/core/explicit_operator_bool.hpp
deleted file mode 100644
index a8936e2cd67..00000000000
--- a/src/third_party/boost-1.68.0/boost/core/explicit_operator_bool.hpp
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright Andrey Semashev 2007 - 2013.
- * Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- */
-
-/*!
- * \file explicit_operator_bool.hpp
- * \author Andrey Semashev
- * \date 08.03.2009
- *
- * This header defines a compatibility macro that implements an unspecified
- * \c bool operator idiom, which is superseded with explicit conversion operators in
- * C++11.
- */
-
-#ifndef BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
-#define BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
-
-#include <boost/config.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
-
-/*!
- * \brief The macro defines an explicit operator of conversion to \c bool
- *
- * The macro should be used inside the definition of a class that has to
- * support the conversion. The class should also implement <tt>operator!</tt>,
- * in terms of which the conversion operator will be implemented.
- */
-#define BOOST_EXPLICIT_OPERATOR_BOOL()\
- BOOST_FORCEINLINE explicit operator bool () const\
- {\
- return !this->operator! ();\
- }
-
-/*!
- * \brief The macro defines a noexcept explicit operator of conversion to \c bool
- *
- * The macro should be used inside the definition of a class that has to
- * support the conversion. The class should also implement <tt>operator!</tt>,
- * in terms of which the conversion operator will be implemented.
- */
-#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
- BOOST_FORCEINLINE explicit operator bool () const BOOST_NOEXCEPT\
- {\
- return !this->operator! ();\
- }
-
-/*!
- * \brief The macro defines a constexpr explicit operator of conversion to \c bool
- *
- * The macro should be used inside the definition of a class that has to
- * support the conversion. The class should also implement <tt>operator!</tt>,
- * in terms of which the conversion operator will be implemented.
- */
-#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
- BOOST_FORCEINLINE BOOST_CONSTEXPR explicit operator bool () const BOOST_NOEXCEPT\
- {\
- return !this->operator! ();\
- }
-
-#else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
-
-#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
-// Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
-#define BOOST_NO_UNSPECIFIED_BOOL
-#endif // (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
-
-#if !defined(BOOST_NO_UNSPECIFIED_BOOL)
-
-namespace boost {
-
-namespace detail {
-
-#if !defined(_MSC_VER) && !defined(__IBMCPP__)
-
- struct unspecified_bool
- {
- // NOTE TO THE USER: If you see this in error messages then you tried
- // to apply an unsupported operator on the object that supports
- // explicit conversion to bool.
- struct OPERATORS_NOT_ALLOWED;
- static void true_value(OPERATORS_NOT_ALLOWED*) {}
- };
- typedef void (*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*);
-
-#else
-
- // MSVC and VACPP are too eager to convert pointer to function to void* even though they shouldn't
- struct unspecified_bool
- {
- // NOTE TO THE USER: If you see this in error messages then you tried
- // to apply an unsupported operator on the object that supports
- // explicit conversion to bool.
- struct OPERATORS_NOT_ALLOWED;
- void true_value(OPERATORS_NOT_ALLOWED*) {}
- };
- typedef void (unspecified_bool::*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*);
-
-#endif
-
-} // namespace detail
-
-} // namespace boost
-
-#define BOOST_EXPLICIT_OPERATOR_BOOL()\
- BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const\
- {\
- return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
- }
-
-#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
- BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
- {\
- return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
- }
-
-#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
- BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
- {\
- return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
- }
-
-#else // !defined(BOOST_NO_UNSPECIFIED_BOOL)
-
-#define BOOST_EXPLICIT_OPERATOR_BOOL()\
- BOOST_FORCEINLINE operator bool () const\
- {\
- return !this->operator! ();\
- }
-
-#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
- BOOST_FORCEINLINE operator bool () const BOOST_NOEXCEPT\
- {\
- return !this->operator! ();\
- }
-
-#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
- BOOST_FORCEINLINE BOOST_CONSTEXPR operator bool () const BOOST_NOEXCEPT\
- {\
- return !this->operator! ();\
- }
-
-#endif // !defined(BOOST_NO_UNSPECIFIED_BOOL)
-
-#endif // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
-
-#endif // BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/lightweight_test.hpp b/src/third_party/boost-1.68.0/boost/core/lightweight_test.hpp
deleted file mode 100644
index 73557be21fb..00000000000
--- a/src/third_party/boost-1.68.0/boost/core/lightweight_test.hpp
+++ /dev/null
@@ -1,465 +0,0 @@
-#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP
-#define BOOST_CORE_LIGHTWEIGHT_TEST_HPP
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-//
-// boost/core/lightweight_test.hpp - lightweight test library
-//
-// Copyright (c) 2002, 2009, 2014 Peter Dimov
-// Copyright (2) Beman Dawes 2010, 2011
-// Copyright (3) Ion Gaztanaga 2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-//
-
-#include <boost/core/no_exceptions_support.hpp>
-#include <boost/assert.hpp>
-#include <boost/current_function.hpp>
-#include <iostream>
-#include <iterator>
-#include <cstring>
-#include <cstddef>
-
-// IDE's like Visual Studio perform better if output goes to std::cout or
-// some other stream, so allow user to configure output stream:
-#ifndef BOOST_LIGHTWEIGHT_TEST_OSTREAM
-# define BOOST_LIGHTWEIGHT_TEST_OSTREAM std::cerr
-#endif
-
-namespace boost
-{
-
-namespace detail
-{
-
-struct report_errors_reminder
-{
- bool called_report_errors_function;
-
- report_errors_reminder() : called_report_errors_function(false) {}
-
- ~report_errors_reminder()
- {
- BOOST_ASSERT(called_report_errors_function); // verify report_errors() was called
- }
-};
-
-inline report_errors_reminder& report_errors_remind()
-{
- static report_errors_reminder r;
- return r;
-}
-
-inline int & test_errors()
-{
- static int x = 0;
- report_errors_remind();
- return x;
-}
-
-inline void test_failed_impl(char const * expr, char const * file, int line, char const * function)
-{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr << "' failed in function '"
- << function << "'" << std::endl;
- ++test_errors();
-}
-
-inline void error_impl(char const * msg, char const * file, int line, char const * function)
-{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): " << msg << " in function '"
- << function << "'" << std::endl;
- ++test_errors();
-}
-
-inline void throw_failed_impl(char const * excep, char const * file, int line, char const * function)
-{
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): Exception '" << excep << "' not thrown in function '"
- << function << "'" << std::endl;
- ++test_errors();
-}
-
-// In the comparisons below, it is possible that T and U are signed and unsigned integer types, which generates warnings in some compilers.
-// A cleaner fix would require common_type trait or some meta-programming, which would introduce a dependency on Boost.TypeTraits. To avoid
-// the dependency we just disable the warnings.
-#if defined(_MSC_VER)
-# pragma warning(push)
-# pragma warning(disable: 4389)
-#elif defined(__clang__) && defined(__has_warning)
-# if __has_warning("-Wsign-compare")
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wsign-compare"
-# endif
-#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wsign-compare"
-#endif
-
-// specialize test output for char pointers to avoid printing as cstring
-template <class T> inline const T& test_output_impl(const T& v) { return v; }
-inline const void* test_output_impl(const char* v) { return v; }
-inline const void* test_output_impl(const unsigned char* v) { return v; }
-inline const void* test_output_impl(const signed char* v) { return v; }
-inline const void* test_output_impl(char* v) { return v; }
-inline const void* test_output_impl(unsigned char* v) { return v; }
-inline const void* test_output_impl(signed char* v) { return v; }
-template<class T> inline const void* test_output_impl(T volatile* v) { return const_cast<T*>(v); }
-
-#if !defined( BOOST_NO_CXX11_NULLPTR )
-inline const void* test_output_impl(std::nullptr_t) { return nullptr; }
-#endif
-
-template<class T, class U> inline void test_eq_impl( char const * expr1, char const * expr2,
- char const * file, int line, char const * function, T const & t, U const & u )
-{
- if( t == u )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr1 << " == " << expr2
- << "' failed in function '" << function << "': "
- << "'" << test_output_impl(t) << "' != '" << test_output_impl(u) << "'" << std::endl;
- ++test_errors();
- }
-}
-
-template<class T, class U> inline void test_ne_impl( char const * expr1, char const * expr2,
- char const * file, int line, char const * function, T const & t, U const & u )
-{
- if( t != u )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr1 << " != " << expr2
- << "' failed in function '" << function << "': "
- << "'" << test_output_impl(t) << "' == '" << test_output_impl(u) << "'" << std::endl;
- ++test_errors();
- }
-}
-
-template<class T, class U> inline void test_lt_impl( char const * expr1, char const * expr2,
- char const * file, int line, char const * function, T const & t, U const & u )
-{
- if( t < u )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr1 << " < " << expr2
- << "' failed in function '" << function << "': "
- << "'" << test_output_impl(t) << "' >= '" << test_output_impl(u) << "'" << std::endl;
- ++test_errors();
- }
-}
-
-template<class T, class U> inline void test_le_impl( char const * expr1, char const * expr2,
- char const * file, int line, char const * function, T const & t, U const & u )
-{
- if( t <= u )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr1 << " <= " << expr2
- << "' failed in function '" << function << "': "
- << "'" << test_output_impl(t) << "' > '" << test_output_impl(u) << "'" << std::endl;
- ++test_errors();
- }
-}
-
-template<class T, class U> inline void test_gt_impl( char const * expr1, char const * expr2,
- char const * file, int line, char const * function, T const & t, U const & u )
-{
- if( t > u )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr1 << " > " << expr2
- << "' failed in function '" << function << "': "
- << "'" << test_output_impl(t) << "' <= '" << test_output_impl(u) << "'" << std::endl;
- ++test_errors();
- }
-}
-
-template<class T, class U> inline void test_ge_impl( char const * expr1, char const * expr2,
- char const * file, int line, char const * function, T const & t, U const & u )
-{
- if( t >= u )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr1 << " >= " << expr2
- << "' failed in function '" << function << "': "
- << "'" << test_output_impl(t) << "' < '" << test_output_impl(u) << "'" << std::endl;
- ++test_errors();
- }
-}
-
-inline void test_cstr_eq_impl( char const * expr1, char const * expr2,
- char const * file, int line, char const * function, char const * const t, char const * const u )
-{
- if( std::strcmp(t, u) == 0 )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr1 << " == " << expr2
- << "' failed in function '" << function << "': "
- << "'" << t << "' != '" << u << "'" << std::endl;
- ++test_errors();
- }
-}
-
-inline void test_cstr_ne_impl( char const * expr1, char const * expr2,
- char const * file, int line, char const * function, char const * const t, char const * const u )
-{
- if( std::strcmp(t, u) != 0 )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): test '" << expr1 << " == " << expr2
- << "' failed in function '" << function << "': "
- << "'" << t << "' == '" << u << "'" << std::endl;
- ++test_errors();
- }
-}
-
-template<class FormattedOutputFunction, class InputIterator1, class InputIterator2>
-void test_all_eq_impl(FormattedOutputFunction& output,
- char const * file, int line, char const * function,
- InputIterator1 first_begin, InputIterator1 first_end,
- InputIterator2 second_begin, InputIterator2 second_end)
-{
- InputIterator1 first_it = first_begin;
- InputIterator2 second_it = second_begin;
- typename std::iterator_traits<InputIterator1>::difference_type first_index = 0;
- typename std::iterator_traits<InputIterator2>::difference_type second_index = 0;
- std::size_t error_count = 0;
- const std::size_t max_count = 8;
- do
- {
- while ((first_it != first_end) && (second_it != second_end) && (*first_it == *second_it))
- {
- ++first_it;
- ++second_it;
- ++first_index;
- ++second_index;
- }
- if ((first_it == first_end) || (second_it == second_end))
- {
- break; // do-while
- }
- if (error_count == 0)
- {
- output << file << "(" << line << "): Container contents differ in function '" << function << "':";
- }
- else if (error_count >= max_count)
- {
- output << " ...";
- break;
- }
- output << " [" << first_index << "] '" << test_output_impl(*first_it) << "' != '" << test_output_impl(*second_it) << "'";
- ++first_it;
- ++second_it;
- ++first_index;
- ++second_index;
- ++error_count;
- } while (first_it != first_end);
-
- first_index += std::distance(first_it, first_end);
- second_index += std::distance(second_it, second_end);
- if (first_index != second_index)
- {
- if (error_count == 0)
- {
- output << file << "(" << line << "): Container sizes differ in function '" << function << "': size(" << first_index << ") != size(" << second_index << ")";
- }
- else
- {
- output << " [*] size(" << first_index << ") != size(" << second_index << ")";
- }
- ++error_count;
- }
-
- if (error_count == 0)
- {
- boost::detail::report_errors_remind();
- }
- else
- {
- output << std::endl;
- ++boost::detail::test_errors();
- }
-}
-
-template<class FormattedOutputFunction, class InputIterator1, class InputIterator2, typename BinaryPredicate>
-void test_all_with_impl(FormattedOutputFunction& output,
- char const * file, int line, char const * function,
- InputIterator1 first_begin, InputIterator1 first_end,
- InputIterator2 second_begin, InputIterator2 second_end,
- BinaryPredicate predicate)
-{
- InputIterator1 first_it = first_begin;
- InputIterator2 second_it = second_begin;
- typename std::iterator_traits<InputIterator1>::difference_type first_index = 0;
- typename std::iterator_traits<InputIterator2>::difference_type second_index = 0;
- std::size_t error_count = 0;
- const std::size_t max_count = 8;
- do
- {
- while ((first_it != first_end) && (second_it != second_end) && predicate(*first_it, *second_it))
- {
- ++first_it;
- ++second_it;
- ++first_index;
- ++second_index;
- }
- if ((first_it == first_end) || (second_it == second_end))
- {
- break; // do-while
- }
- if (error_count == 0)
- {
- output << file << "(" << line << "): Container contents differ in function '" << function << "':";
- }
- else if (error_count >= max_count)
- {
- output << " ...";
- break;
- }
- output << " [" << first_index << "]";
- ++first_it;
- ++second_it;
- ++first_index;
- ++second_index;
- ++error_count;
- } while (first_it != first_end);
-
- first_index += std::distance(first_it, first_end);
- second_index += std::distance(second_it, second_end);
- if (first_index != second_index)
- {
- if (error_count == 0)
- {
- output << file << "(" << line << "): Container sizes differ in function '" << function << "': size(" << first_index << ") != size(" << second_index << ")";
- }
- else
- {
- output << " [*] size(" << first_index << ") != size(" << second_index << ")";
- }
- ++error_count;
- }
-
- if (error_count == 0)
- {
- report_errors_remind();
- }
- else
- {
- output << std::endl;
- ++test_errors();
- }
-}
-
-#if defined(_MSC_VER)
-# pragma warning(pop)
-#elif defined(__clang__) && defined(__has_warning)
-# if __has_warning("-Wsign-compare")
-# pragma clang diagnostic pop
-# endif
-#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
-# pragma GCC diagnostic pop
-#endif
-
-} // namespace detail
-
-inline int report_errors()
-{
- boost::detail::report_errors_remind().called_report_errors_function = true;
-
- int errors = boost::detail::test_errors();
-
- if( errors == 0 )
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << "No errors detected." << std::endl;
- return 0;
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << errors << " error" << (errors == 1? "": "s") << " detected." << std::endl;
- return 1;
- }
-}
-
-} // namespace boost
-
-#define BOOST_TEST(expr) ((expr)? (void)0: ::boost::detail::test_failed_impl(#expr, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION))
-#define BOOST_TEST_NOT(expr) BOOST_TEST(!(expr))
-
-#define BOOST_ERROR(msg) ( ::boost::detail::error_impl(msg, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
-
-#define BOOST_TEST_EQ(expr1,expr2) ( ::boost::detail::test_eq_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-#define BOOST_TEST_NE(expr1,expr2) ( ::boost::detail::test_ne_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-
-#define BOOST_TEST_LT(expr1,expr2) ( ::boost::detail::test_lt_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-#define BOOST_TEST_LE(expr1,expr2) ( ::boost::detail::test_le_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-#define BOOST_TEST_GT(expr1,expr2) ( ::boost::detail::test_gt_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-#define BOOST_TEST_GE(expr1,expr2) ( ::boost::detail::test_ge_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-
-#define BOOST_TEST_CSTR_EQ(expr1,expr2) ( ::boost::detail::test_cstr_eq_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-#define BOOST_TEST_CSTR_NE(expr1,expr2) ( ::boost::detail::test_cstr_ne_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
-
-#define BOOST_TEST_ALL_EQ(begin1, end1, begin2, end2) ( ::boost::detail::test_all_eq_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2) )
-#define BOOST_TEST_ALL_WITH(begin1, end1, begin2, end2, predicate) ( ::boost::detail::test_all_with_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2, predicate) )
-
-#ifndef BOOST_NO_EXCEPTIONS
- #define BOOST_TEST_THROWS( EXPR, EXCEP ) \
- try { \
- EXPR; \
- ::boost::detail::throw_failed_impl \
- (#EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
- } \
- catch(EXCEP const&) { \
- } \
- catch(...) { \
- ::boost::detail::throw_failed_impl \
- (#EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
- } \
- //
-#else
- #define BOOST_TEST_THROWS( EXPR, EXCEP )
-#endif
-
-#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/lightweight_test_trait.hpp b/src/third_party/boost-1.68.0/boost/core/lightweight_test_trait.hpp
deleted file mode 100644
index 0e2aab4435d..00000000000
--- a/src/third_party/boost-1.68.0/boost/core/lightweight_test_trait.hpp
+++ /dev/null
@@ -1,56 +0,0 @@
-#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
-#define BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-// boost/core/lightweight_test_trait.hpp
-//
-// BOOST_TEST_TRAIT_TRUE, BOOST_TEST_TRAIT_FALSE
-//
-// Copyright 2014 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-
-#include <boost/core/lightweight_test.hpp>
-#include <boost/core/typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-template< class T > inline void test_trait_impl( char const * trait, void (*)( T ),
- bool expected, char const * file, int line, char const * function )
-{
- if( T::value == expected )
- {
- report_errors_remind();
- }
- else
- {
- BOOST_LIGHTWEIGHT_TEST_OSTREAM
- << file << "(" << line << "): predicate '" << trait << "' ["
- << boost::core::demangled_name( BOOST_CORE_TYPEID(T) ) << "]"
- << " test failed in function '" << function
- << "' (should have been " << ( expected? "true": "false" ) << ")"
- << std::endl;
-
- ++test_errors();
- }
-}
-
-} // namespace detail
-
-} // namespace boost
-
-#define BOOST_TEST_TRAIT_TRUE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, true, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
-#define BOOST_TEST_TRAIT_FALSE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, false, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
-
-#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/noncopyable.hpp b/src/third_party/boost-1.68.0/boost/core/noncopyable.hpp
deleted file mode 100644
index 6ae8c244dd4..00000000000
--- a/src/third_party/boost-1.68.0/boost/core/noncopyable.hpp
+++ /dev/null
@@ -1,48 +0,0 @@
-// Boost noncopyable.hpp header file --------------------------------------//
-
-// (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/utility for documentation.
-
-#ifndef BOOST_CORE_NONCOPYABLE_HPP
-#define BOOST_CORE_NONCOPYABLE_HPP
-
-#include <boost/config.hpp>
-
-namespace boost {
-
-// Private copy constructor and copy assignment ensure classes derived from
-// class noncopyable cannot be copied.
-
-// Contributed by Dave Abrahams
-
-namespace noncopyable_ // protection from unintended ADL
-{
- class noncopyable
- {
- protected:
-#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
- BOOST_CONSTEXPR noncopyable() = default;
- ~noncopyable() = default;
-#else
- noncopyable() {}
- ~noncopyable() {}
-#endif
-#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
- noncopyable( const noncopyable& ) = delete;
- noncopyable& operator=( const noncopyable& ) = delete;
-#else
- private: // emphasize the following members are private
- noncopyable( const noncopyable& );
- noncopyable& operator=( const noncopyable& );
-#endif
- };
-}
-
-typedef noncopyable_::noncopyable noncopyable;
-
-} // namespace boost
-
-#endif // BOOST_CORE_NONCOPYABLE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/ref.hpp b/src/third_party/boost-1.68.0/boost/core/ref.hpp
deleted file mode 100644
index 7d768ffc758..00000000000
--- a/src/third_party/boost-1.68.0/boost/core/ref.hpp
+++ /dev/null
@@ -1,301 +0,0 @@
-#ifndef BOOST_CORE_REF_HPP
-#define BOOST_CORE_REF_HPP
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-#include <boost/config.hpp>
-#include <boost/config/workaround.hpp>
-#include <boost/core/addressof.hpp>
-
-//
-// ref.hpp - ref/cref, useful helper functions
-//
-// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
-// Copyright (C) 2001, 2002 Peter Dimov
-// Copyright (C) 2002 David Abrahams
-//
-// Copyright (C) 2014 Glen Joseph Fernandes
-// glenfe at live dot com
-// Copyright (C) 2014 Agustin Berge
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/core/doc/html/core/ref.html for documentation.
-//
-
-/**
- @file
-*/
-
-/**
- Boost namespace.
-*/
-namespace boost
-{
-
-#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
-
- struct ref_workaround_tag {};
-
-#endif
-
-// reference_wrapper
-
-/**
- @brief Contains a reference to an object of type `T`.
-
- `reference_wrapper` is primarily used to "feed" references to
- function templates (algorithms) that take their parameter by
- value. It provides an implicit conversion to `T&`, which
- usually allows the function templates to work on references
- unmodified.
-*/
-template<class T> class reference_wrapper
-{
-public:
- /**
- Type `T`.
- */
- typedef T type;
-
- /**
- Constructs a `reference_wrapper` object that stores a
- reference to `t`.
-
- @remark Does not throw.
- */
- BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {}
-
-#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
-
- BOOST_FORCEINLINE explicit reference_wrapper( T & t, ref_workaround_tag ): t_( boost::addressof( t ) ) {}
-
-#endif
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- /**
- @remark Construction from a temporary object is disabled.
- */
- BOOST_DELETED_FUNCTION(reference_wrapper(T&& t))
-public:
-#endif
-
- /**
- @return The stored reference.
- @remark Does not throw.
- */
- BOOST_FORCEINLINE operator T& () const { return *t_; }
-
- /**
- @return The stored reference.
- @remark Does not throw.
- */
- BOOST_FORCEINLINE T& get() const { return *t_; }
-
- /**
- @return A pointer to the object referenced by the stored
- reference.
- @remark Does not throw.
- */
- BOOST_FORCEINLINE T* get_pointer() const { return t_; }
-
-private:
-
- T* t_;
-};
-
-// ref
-
-/**
- @cond
-*/
-#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) )
-# define BOOST_REF_CONST
-#else
-# define BOOST_REF_CONST const
-#endif
-/**
- @endcond
-*/
-
-/**
- @return `reference_wrapper<T>(t)`
- @remark Does not throw.
-*/
-template<class T> BOOST_FORCEINLINE reference_wrapper<T> BOOST_REF_CONST ref( T & t )
-{
-#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
-
- return reference_wrapper<T>( t, ref_workaround_tag() );
-
-#else
-
- return reference_wrapper<T>( t );
-
-#endif
-}
-
-// cref
-
-/**
- @return `reference_wrapper<T const>(t)`
- @remark Does not throw.
-*/
-template<class T> BOOST_FORCEINLINE reference_wrapper<T const> BOOST_REF_CONST cref( T const & t )
-{
- return reference_wrapper<T const>(t);
-}
-
-#undef BOOST_REF_CONST
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-
-/**
- @cond
-*/
-#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
-# define BOOST_REF_DELETE
-#else
-# define BOOST_REF_DELETE = delete
-#endif
-/**
- @endcond
-*/
-
-/**
- @remark Construction from a temporary object is disabled.
-*/
-template<class T> void ref(T const&&) BOOST_REF_DELETE;
-
-/**
- @remark Construction from a temporary object is disabled.
-*/
-template<class T> void cref(T const&&) BOOST_REF_DELETE;
-
-#undef BOOST_REF_DELETE
-
-#endif
-
-// is_reference_wrapper
-
-/**
- @brief Determine if a type `T` is an instantiation of
- `reference_wrapper`.
-
- The value static constant will be true if the type `T` is a
- specialization of `reference_wrapper`.
-*/
-template<typename T> struct is_reference_wrapper
-{
- BOOST_STATIC_CONSTANT( bool, value = false );
-};
-
-/**
- @cond
-*/
-template<typename T> struct is_reference_wrapper< reference_wrapper<T> >
-{
- BOOST_STATIC_CONSTANT( bool, value = true );
-};
-
-#if !defined(BOOST_NO_CV_SPECIALIZATIONS)
-
-template<typename T> struct is_reference_wrapper< reference_wrapper<T> const >
-{
- BOOST_STATIC_CONSTANT( bool, value = true );
-};
-
-template<typename T> struct is_reference_wrapper< reference_wrapper<T> volatile >
-{
- BOOST_STATIC_CONSTANT( bool, value = true );
-};
-
-template<typename T> struct is_reference_wrapper< reference_wrapper<T> const volatile >
-{
- BOOST_STATIC_CONSTANT( bool, value = true );
-};
-
-#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS)
-
-/**
- @endcond
-*/
-
-
-// unwrap_reference
-
-/**
- @brief Find the type in a `reference_wrapper`.
-
- The `typedef` type is `T::type` if `T` is a
- `reference_wrapper`, `T` otherwise.
-*/
-template<typename T> struct unwrap_reference
-{
- typedef T type;
-};
-
-/**
- @cond
-*/
-template<typename T> struct unwrap_reference< reference_wrapper<T> >
-{
- typedef T type;
-};
-
-#if !defined(BOOST_NO_CV_SPECIALIZATIONS)
-
-template<typename T> struct unwrap_reference< reference_wrapper<T> const >
-{
- typedef T type;
-};
-
-template<typename T> struct unwrap_reference< reference_wrapper<T> volatile >
-{
- typedef T type;
-};
-
-template<typename T> struct unwrap_reference< reference_wrapper<T> const volatile >
-{
- typedef T type;
-};
-
-#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS)
-
-/**
- @endcond
-*/
-
-// unwrap_ref
-
-/**
- @return `unwrap_reference<T>::type&(t)`
- @remark Does not throw.
-*/
-template<class T> BOOST_FORCEINLINE typename unwrap_reference<T>::type& unwrap_ref( T & t )
-{
- return t;
-}
-
-// get_pointer
-
-/**
- @cond
-*/
-template<class T> BOOST_FORCEINLINE T* get_pointer( reference_wrapper<T> const & r )
-{
- return r.get_pointer();
-}
-/**
- @endcond
-*/
-
-} // namespace boost
-
-#endif // #ifndef BOOST_CORE_REF_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/swap.hpp b/src/third_party/boost-1.68.0/boost/core/swap.hpp
deleted file mode 100644
index baa1be970df..00000000000
--- a/src/third_party/boost-1.68.0/boost/core/swap.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// For more information, see http://www.boost.org
-
-
-#ifndef BOOST_CORE_SWAP_HPP
-#define BOOST_CORE_SWAP_HPP
-
-// Note: the implementation of this utility contains various workarounds:
-// - swap_impl is put outside the boost namespace, to avoid infinite
-// recursion (causing stack overflow) when swapping objects of a primitive
-// type.
-// - swap_impl has a using-directive, rather than a using-declaration,
-// because some compilers (including MSVC 7.1, Borland 5.9.3, and
-// Intel 8.1) don't do argument-dependent lookup when it has a
-// using-declaration instead.
-// - boost::swap has two template arguments, instead of one, to
-// avoid ambiguity when swapping objects of a Boost type that does
-// not have its own boost::swap overload.
-
-#include <utility> //for std::swap (C++11)
-#include <algorithm> //for std::swap (C++98)
-#include <cstddef> //for std::size_t
-#include <boost/config.hpp>
-
-namespace boost_swap_impl
-{
- template<class T>
- BOOST_GPU_ENABLED
- void swap_impl(T& left, T& right)
- {
- using namespace std;//use std::swap if argument dependent lookup fails
- swap(left,right);
- }
-
- template<class T, std::size_t N>
- BOOST_GPU_ENABLED
- void swap_impl(T (& left)[N], T (& right)[N])
- {
- for (std::size_t i = 0; i < N; ++i)
- {
- ::boost_swap_impl::swap_impl(left[i], right[i]);
- }
- }
-}
-
-namespace boost
-{
- template<class T1, class T2>
- BOOST_GPU_ENABLED
- void swap(T1& left, T2& right)
- {
- ::boost_swap_impl::swap_impl(left, right);
- }
-}
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/core/typeinfo.hpp b/src/third_party/boost-1.68.0/boost/core/typeinfo.hpp
deleted file mode 100644
index e67b4a3198b..00000000000
--- a/src/third_party/boost-1.68.0/boost/core/typeinfo.hpp
+++ /dev/null
@@ -1,151 +0,0 @@
-#ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED
-#define BOOST_CORE_TYPEINFO_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// core::typeinfo, BOOST_CORE_TYPEID
-//
-// Copyright 2007, 2014 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/config.hpp>
-
-#if defined( BOOST_NO_TYPEID )
-
-#include <boost/current_function.hpp>
-#include <functional>
-
-namespace boost
-{
-
-namespace core
-{
-
-class typeinfo
-{
-private:
-
- typeinfo( typeinfo const& );
- typeinfo& operator=( typeinfo const& );
-
- char const * name_;
-
-public:
-
- explicit typeinfo( char const * name ): name_( name )
- {
- }
-
- bool operator==( typeinfo const& rhs ) const
- {
- return this == &rhs;
- }
-
- bool operator!=( typeinfo const& rhs ) const
- {
- return this != &rhs;
- }
-
- bool before( typeinfo const& rhs ) const
- {
- return std::less< typeinfo const* >()( this, &rhs );
- }
-
- char const* name() const
- {
- return name_;
- }
-};
-
-inline char const * demangled_name( core::typeinfo const & ti )
-{
- return ti.name();
-}
-
-} // namespace core
-
-namespace detail
-{
-
-template<class T> struct core_typeid_
-{
- static boost::core::typeinfo ti_;
-
- static char const * name()
- {
- return BOOST_CURRENT_FUNCTION;
- }
-};
-
-#if defined(__SUNPRO_CC)
-// see #4199, the Sun Studio compiler gets confused about static initialization
-// constructor arguments. But an assignment works just fine.
-template<class T> boost::core::typeinfo core_typeid_< T >::ti_ = core_typeid_< T >::name();
-#else
-template<class T> boost::core::typeinfo core_typeid_< T >::ti_(core_typeid_< T >::name());
-#endif
-
-template<class T> struct core_typeid_< T & >: core_typeid_< T >
-{
-};
-
-template<class T> struct core_typeid_< T const >: core_typeid_< T >
-{
-};
-
-template<class T> struct core_typeid_< T volatile >: core_typeid_< T >
-{
-};
-
-template<class T> struct core_typeid_< T const volatile >: core_typeid_< T >
-{
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#define BOOST_CORE_TYPEID(T) (boost::detail::core_typeid_<T>::ti_)
-
-#else
-
-#include <boost/core/demangle.hpp>
-#include <typeinfo>
-
-namespace boost
-{
-
-namespace core
-{
-
-#if defined( BOOST_NO_STD_TYPEINFO )
-
-typedef ::type_info typeinfo;
-
-#else
-
-typedef std::type_info typeinfo;
-
-#endif
-
-inline std::string demangled_name( core::typeinfo const & ti )
-{
- return core::demangle( ti.name() );
-}
-
-} // namespace core
-
-} // namespace boost
-
-#define BOOST_CORE_TYPEID(T) typeid(T)
-
-#endif
-
-#endif // #ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/date_time/compiler_config.hpp b/src/third_party/boost-1.68.0/boost/date_time/compiler_config.hpp
deleted file mode 100644
index e37d0614a45..00000000000
--- a/src/third_party/boost-1.68.0/boost/date_time/compiler_config.hpp
+++ /dev/null
@@ -1,169 +0,0 @@
-#ifndef DATE_TIME_COMPILER_CONFIG_HPP___
-#define DATE_TIME_COMPILER_CONFIG_HPP___
-
-/* Copyright (c) 2002-2004 CrystalClear Software, Inc.
- * Subject to the Boost Software License, Version 1.0. (See accompanying
- * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland, Bart Garst
- * $Date$
- */
-
-#include <cstdlib>
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-// With boost release 1.33, date_time will be using a different,
-// more flexible, IO system. This new system is not compatible with
-// old compilers. The original date_time IO system remains for those
-// compilers. They must define this macro to use the legacy IO.
-// (defined(__BORLANDC__) && (__BORLANDC__ <= 0x0581) ) ) &&
- #if( BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) \
- || BOOST_WORKAROUND( __GNUC__, < 3) \
- || (BOOST_WORKAROUND( _MSC_VER, <= 1300) ) \
- ) \
- && !defined(USE_DATE_TIME_PRE_1_33_FACET_IO)
-# define USE_DATE_TIME_PRE_1_33_FACET_IO
-#endif
-
-
-// This file performs some local compiler configurations
-
-#include <boost/date_time/locale_config.hpp> //set up locale configurations
-
-//Set up a configuration parameter for platforms that have
-//GetTimeOfDay
-#if defined(BOOST_HAS_GETTIMEOFDAY) || defined(BOOST_HAS_FTIME)
-#define BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK
-#endif
-
-// To Force no default constructors for date & ptime, un-comment following
-//#define DATE_TIME_NO_DEFAULT_CONSTRUCTOR
-
-// Include extensions to date_duration - comment out to remove this feature
-#define BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
-// these extensions are known to cause problems with gcc295
-#if defined(__GNUC__) && (__GNUC__ < 3)
-#undef BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
-#endif
-
-#if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) )
-#define BOOST_DATE_TIME_NO_MEMBER_INIT
-#endif
-
-// include these types before we try to re-define them
-#include <boost/cstdint.hpp>
-
-//Define INT64_C for compilers that don't have it
-#if (!defined(INT64_C))
-#define INT64_C(value) int64_t(value)
-#endif
-
-
-/* Workaround for Borland iterator error. Error was "Cannot convert 'istream *' to 'wistream *' in function istream_iterator<>::istream_iterator() */
-#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_RW_LIB)
-#define BOOST_DATE_TIME_NO_WISTREAM_ITERATOR
-#endif
-
-
-// Borland v5.64 does not have the following in std namespace; v5.5.1 does
-#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_STLPORT)
-#include <locale>
-namespace std {
- using stlport::tolower;
- using stlport::ctype;
- using stlport::use_facet;
-}
-#endif
-
-// workaround for errors associated with output for date classes
-// modifications and input streaming for time classes.
-// Compilers affected are:
-// gcc295, msvc (neither with STLPort), any borland
-//
-#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \
- (defined(_MSC_VER) && (_MSC_VER < 1300)) ) && \
- !defined(_STLP_OWN_IOSTREAMS) ) || \
- BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) )
-#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
-#endif
-
-// The macro marks up places where compiler complains for missing return statement or
-// uninitialized variables after calling to boost::throw_exception.
-// BOOST_UNREACHABLE_RETURN doesn't work since even compilers that support
-// unreachable statements detection emit such warnings.
-#if defined(_MSC_VER)
-// Use special MSVC extension to markup unreachable code
-# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) __assume(false)
-#elif !defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION)
-// Call to a non-returning function should suppress the warning
-# if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std {
- using ::abort;
-}
-# endif // defined(BOOST_NO_STDC_NAMESPACE)
-# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) std::abort()
-#else
-// For other poor compilers the specified expression is compiled. Usually, this would be a return statement.
-# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) x
-#endif
-
-/* The following handles the definition of the necessary macros
- * for dll building on Win32 platforms.
- *
- * For code that will be placed in the date_time .dll,
- * it must be properly prefixed with BOOST_DATE_TIME_DECL.
- * The corresponding .cpp file must have BOOST_DATE_TIME_SOURCE
- * defined before including its header. For examples see:
- * greg_month.hpp & greg_month.cpp
- *
- */
-
-// we need to import/export our code only if the user has specifically
-// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
-// libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK
-// if they want just this one to be dynamically liked:
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
- // export if this is our own source, otherwise import:
-# ifdef BOOST_DATE_TIME_SOURCE
-# define BOOST_DATE_TIME_DECL BOOST_SYMBOL_EXPORT
-# else
-# define BOOST_DATE_TIME_DECL BOOST_SYMBOL_IMPORT
-# endif // BOOST_DATE_TIME_SOURCE
-#endif // DYN_LINK
-//
-// if BOOST_WHATEVER_DECL isn't defined yet define it now:
-#ifndef BOOST_DATE_TIME_DECL
-# define BOOST_DATE_TIME_DECL
-#endif
-
-//
-// Automatically link to the correct build variant where possible.
-//
-#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_DATE_TIME_NO_LIB) && !defined(BOOST_DATE_TIME_SOURCE)
-//
-// Set the name of our library, this will get undef'ed by auto_link.hpp
-// once it's done with it:
-//
-#define BOOST_LIB_NAME boost_date_time
-//
-// If we're importing code from a dll, then tell auto_link.hpp about it:
-//
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
-# define BOOST_DYN_LINK
-#endif
-//
-// And include the header that does the work:
-//
-#include <boost/config/auto_link.hpp>
-#endif // auto-linking disabled
-
-#if defined(BOOST_HAS_THREADS)
-# if defined(_MSC_VER) || defined(__MWERKS__) || defined(__MINGW32__) || defined(__BORLANDC__)
- //no reentrant posix functions (eg: localtime_r)
-# elif (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT)))
-# define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS
-# endif
-#endif
-
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_duration.hpp b/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_duration.hpp
deleted file mode 100644
index c7ec57e8aaa..00000000000
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_duration.hpp
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef POSIX_TIME_DURATION_HPP___
-#define POSIX_TIME_DURATION_HPP___
-
-/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the
- * Boost Software License, Version 1.0. (See accompanying
- * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland
- * $Date$
- */
-
-#include <boost/core/enable_if.hpp>
-#include <boost/date_time/compiler_config.hpp>
-#include <boost/date_time/posix_time/posix_time_config.hpp>
-#include <boost/numeric/conversion/cast.hpp>
-#include <boost/type_traits/is_integral.hpp>
-
-namespace boost {
-namespace posix_time {
-
- //! Allows expression of durations as an hour count
- //! The argument must be an integral type
- /*! \ingroup time_basics
- */
- class BOOST_SYMBOL_VISIBLE hours : public time_duration
- {
- public:
- template <typename T>
- explicit hours(T const& h,
- typename boost::enable_if<boost::is_integral<T>, void>::type* = 0) :
- time_duration(numeric_cast<hour_type>(h), 0, 0)
- {}
- };
-
- //! Allows expression of durations as a minute count
- //! The argument must be an integral type
- /*! \ingroup time_basics
- */
- class BOOST_SYMBOL_VISIBLE minutes : public time_duration
- {
- public:
- template <typename T>
- explicit minutes(T const& m,
- typename boost::enable_if<boost::is_integral<T>, void>::type* = 0) :
- time_duration(0, numeric_cast<min_type>(m),0)
- {}
- };
-
- //! Allows expression of durations as a seconds count
- //! The argument must be an integral type
- /*! \ingroup time_basics
- */
- class BOOST_SYMBOL_VISIBLE seconds : public time_duration
- {
- public:
- template <typename T>
- explicit seconds(T const& s,
- typename boost::enable_if<boost::is_integral<T>, void>::type* = 0) :
- time_duration(0,0, numeric_cast<sec_type>(s))
- {}
- };
-
-
- //! Allows expression of durations as milli seconds
- /*! \ingroup time_basics
- */
- typedef date_time::subsecond_duration<time_duration,1000> millisec;
- typedef date_time::subsecond_duration<time_duration,1000> milliseconds;
-
- //! Allows expression of durations as micro seconds
- /*! \ingroup time_basics
- */
- typedef date_time::subsecond_duration<time_duration,1000000> microsec;
- typedef date_time::subsecond_duration<time_duration,1000000> microseconds;
-
- //This is probably not needed anymore...
-#if defined(BOOST_DATE_TIME_HAS_NANOSECONDS)
-
- //! Allows expression of durations as nano seconds
- /*! \ingroup time_basics
- */
- typedef date_time::subsecond_duration<time_duration,1000000000> nanosec;
- typedef date_time::subsecond_duration<time_duration,1000000000> nanoseconds;
-
-#endif
-
-} }//namespace posix_time
-
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_duration.hpp b/src/third_party/boost-1.68.0/boost/date_time/time_duration.hpp
deleted file mode 100644
index 67930cf8d36..00000000000
--- a/src/third_party/boost-1.68.0/boost/date_time/time_duration.hpp
+++ /dev/null
@@ -1,298 +0,0 @@
-#ifndef DATE_TIME_TIME_DURATION_HPP___
-#define DATE_TIME_TIME_DURATION_HPP___
-
-/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
- * Use, modification and distribution is subject to the
- * Boost Software License, Version 1.0. (See accompanying
- * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
- * Author: Jeff Garland, Bart Garst
- * $Date$
- */
-
-#include <boost/core/enable_if.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/date_time/compiler_config.hpp>
-#include <boost/date_time/special_defs.hpp>
-#include <boost/date_time/time_defs.hpp>
-#include <boost/operators.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_integral.hpp>
-
-namespace boost {
-namespace date_time {
-
-
- //! Represents some amount of elapsed time measure to a given resolution
- /*! This class represents a standard set of capabilities for all
- counted time durations. Time duration implementations should derive
- from this class passing their type as the first template parameter.
- This design allows the subclass duration types to provide custom
- construction policies or other custom features not provided here.
-
- @param T The subclass type
- @param rep_type The time resolution traits for this duration type.
- */
- template<class T, typename rep_type>
- class BOOST_SYMBOL_VISIBLE time_duration : private
- boost::less_than_comparable<T
- , boost::equality_comparable<T
- > >
- /* dividable, addable, and subtractable operator templates
- * won't work with this class (MSVC++ 6.0). return type
- * from '+=' is different than expected return type
- * from '+'. multipliable probably wont work
- * either (haven't tried) */
- {
- public:
- // A tag for type categorization. Can be used to detect Boost.DateTime duration types in generic code.
- typedef void _is_boost_date_time_duration;
- typedef T duration_type; //the subclass
- typedef rep_type traits_type;
- typedef typename rep_type::day_type day_type;
- typedef typename rep_type::hour_type hour_type;
- typedef typename rep_type::min_type min_type;
- typedef typename rep_type::sec_type sec_type;
- typedef typename rep_type::fractional_seconds_type fractional_seconds_type;
- typedef typename rep_type::tick_type tick_type;
- typedef typename rep_type::impl_type impl_type;
-
- time_duration() : ticks_(0) {}
- time_duration(hour_type hours_in,
- min_type minutes_in,
- sec_type seconds_in=0,
- fractional_seconds_type frac_sec_in = 0) :
- ticks_(rep_type::to_tick_count(hours_in,minutes_in,seconds_in,frac_sec_in))
- {}
- // copy constructor required for dividable<>
- //! Construct from another time_duration (Copy constructor)
- time_duration(const time_duration<T, rep_type>& other)
- : ticks_(other.ticks_)
- {}
- //! Construct from special_values
- time_duration(special_values sv) : ticks_(impl_type::from_special(sv))
- {}
- //! Returns smallest representable duration
- static duration_type unit()
- {
- return duration_type(0,0,0,1);
- }
- //! Return the number of ticks in a second
- static tick_type ticks_per_second()
- {
- return rep_type::res_adjust();
- }
- //! Provide the resolution of this duration type
- static time_resolutions resolution()
- {
- return rep_type::resolution();
- }
- //! Returns number of hours in the duration
- hour_type hours() const
- {
- return static_cast<hour_type>(ticks() / (3600*ticks_per_second()));
- }
- //! Returns normalized number of minutes
- min_type minutes() const
- {
- return static_cast<min_type>((ticks() / (60*ticks_per_second())) % 60);
- }
- //! Returns normalized number of seconds (0..60)
- sec_type seconds() const
- {
- return static_cast<sec_type>((ticks()/ticks_per_second()) % 60);
- }
- //! Returns total number of seconds truncating any fractional seconds
- sec_type total_seconds() const
- {
- return static_cast<sec_type>(ticks() / ticks_per_second());
- }
- //! Returns total number of milliseconds truncating any fractional seconds
- tick_type total_milliseconds() const
- {
- if (ticks_per_second() < 1000) {
- return ticks() * (static_cast<tick_type>(1000) / ticks_per_second());
- }
- return ticks() / (ticks_per_second() / static_cast<tick_type>(1000)) ;
- }
- //! Returns total number of nanoseconds truncating any sub millisecond values
- tick_type total_nanoseconds() const
- {
- if (ticks_per_second() < 1000000000) {
- return ticks() * (static_cast<tick_type>(1000000000) / ticks_per_second());
- }
- return ticks() / (ticks_per_second() / static_cast<tick_type>(1000000000)) ;
- }
- //! Returns total number of microseconds truncating any sub microsecond values
- tick_type total_microseconds() const
- {
- if (ticks_per_second() < 1000000) {
- return ticks() * (static_cast<tick_type>(1000000) / ticks_per_second());
- }
- return ticks() / (ticks_per_second() / static_cast<tick_type>(1000000)) ;
- }
- //! Returns count of fractional seconds at given resolution
- fractional_seconds_type fractional_seconds() const
- {
- return (ticks() % ticks_per_second());
- }
- //! Returns number of possible digits in fractional seconds
- static unsigned short num_fractional_digits()
- {
- return rep_type::num_fractional_digits();
- }
- duration_type invert_sign() const
- {
- return duration_type(ticks_ * (-1));
- }
- bool is_negative() const
- {
- return ticks_ < 0;
- }
- bool operator<(const time_duration& rhs) const
- {
- return ticks_ < rhs.ticks_;
- }
- bool operator==(const time_duration& rhs) const
- {
- return ticks_ == rhs.ticks_;
- }
- //! unary- Allows for time_duration td = -td1
- duration_type operator-()const
- {
- return duration_type(ticks_ * (-1));
- }
- duration_type operator-(const duration_type& d) const
- {
- return duration_type(ticks_ - d.ticks_);
- }
- duration_type operator+(const duration_type& d) const
- {
- return duration_type(ticks_ + d.ticks_);
- }
- duration_type operator/(int divisor) const
- {
- return duration_type(ticks_ / divisor);
- }
- duration_type operator-=(const duration_type& d)
- {
- ticks_ = ticks_ - d.ticks_;
- return duration_type(ticks_);
- }
- duration_type operator+=(const duration_type& d)
- {
- ticks_ = ticks_ + d.ticks_;
- return duration_type(ticks_);
- }
- //! Division operations on a duration with an integer.
- duration_type operator/=(int divisor)
- {
- ticks_ = ticks_ / divisor;
- return duration_type(ticks_);
- }
- //! Multiplication operations an a duration with an integer
- duration_type operator*(int rhs) const
- {
- return duration_type(ticks_ * rhs);
- }
- duration_type operator*=(int divisor)
- {
- ticks_ = ticks_ * divisor;
- return duration_type(ticks_);
- }
- tick_type ticks() const
- {
- return traits_type::as_number(ticks_);
- }
-
- //! Is ticks_ a special value?
- bool is_special()const
- {
- if(traits_type::is_adapted())
- {
- return ticks_.is_special();
- }
- else{
- return false;
- }
- }
- //! Is duration pos-infinity
- bool is_pos_infinity()const
- {
- if(traits_type::is_adapted())
- {
- return ticks_.is_pos_infinity();
- }
- else{
- return false;
- }
- }
- //! Is duration neg-infinity
- bool is_neg_infinity()const
- {
- if(traits_type::is_adapted())
- {
- return ticks_.is_neg_infinity();
- }
- else{
- return false;
- }
- }
- //! Is duration not-a-date-time
- bool is_not_a_date_time()const
- {
- if(traits_type::is_adapted())
- {
- return ticks_.is_nan();
- }
- else{
- return false;
- }
- }
-
- //! Used for special_values output
- impl_type get_rep()const
- {
- return ticks_;
- }
-
- protected:
- explicit time_duration(impl_type in) : ticks_(in) {}
- impl_type ticks_;
- };
-
-
-
- //! Template for instantiating derived adjusting durations
- /* These templates are designed to work with multiples of
- * 10 for frac_of_second and resolution adjustment
- */
- template<class base_duration, boost::int64_t frac_of_second>
- class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
- {
- public:
- typedef typename base_duration::impl_type impl_type;
- typedef typename base_duration::traits_type traits_type;
-
- private:
- // To avoid integer overflow we precompute the duration resolution conversion coefficient (ticket #3471)
- BOOST_STATIC_ASSERT_MSG((traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second % frac_of_second : frac_of_second % traits_type::ticks_per_second) == 0,\
- "The base duration resolution must be a multiple of the subsecond duration resolution");
- BOOST_STATIC_CONSTANT(boost::int64_t, adjustment_ratio = (traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second / frac_of_second : frac_of_second / traits_type::ticks_per_second));
-
- public:
- // The argument (ss) must be an integral type
- template <typename T>
- explicit subsecond_duration(T const& ss,
- typename boost::enable_if<boost::is_integral<T>, void>::type* = 0) :
- base_duration(impl_type(traits_type::ticks_per_second >= frac_of_second ? ss * adjustment_ratio : ss / adjustment_ratio))
- {
- }
- };
-
-} } //namespace date_time
-
-
-
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/detail/allocator_utilities.hpp b/src/third_party/boost-1.68.0/boost/detail/allocator_utilities.hpp
deleted file mode 100644
index 11eecbe1b52..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/allocator_utilities.hpp
+++ /dev/null
@@ -1,192 +0,0 @@
-/* Copyright 2003-2013 Joaquin M Lopez Munoz.
- * Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- *
- * See Boost website at http://www.boost.org/
- */
-
-#ifndef BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP
-#define BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP
-
-#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
-#include <boost/detail/workaround.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <cstddef>
-#include <memory>
-#include <new>
-
-namespace boost{
-
-namespace detail{
-
-/* Allocator adaption layer. Some stdlibs provide allocators without rebind
- * and template ctors. These facilities are simulated with the external
- * template class rebind_to and the aid of partial_std_allocator_wrapper.
- */
-
-namespace allocator{
-
-/* partial_std_allocator_wrapper inherits the functionality of a std
- * allocator while providing a templatized ctor and other bits missing
- * in some stdlib implementation or another.
- */
-
-template<typename Type>
-class partial_std_allocator_wrapper:public std::allocator<Type>
-{
-public:
- /* Oddly enough, STLport does not define std::allocator<void>::value_type
- * when configured to work without partial template specialization.
- * No harm in supplying the definition here unconditionally.
- */
-
- typedef Type value_type;
-
- partial_std_allocator_wrapper(){};
-
- template<typename Other>
- partial_std_allocator_wrapper(const partial_std_allocator_wrapper<Other>&){}
-
- partial_std_allocator_wrapper(const std::allocator<Type>& x):
- std::allocator<Type>(x)
- {
- };
-
-#if defined(BOOST_DINKUMWARE_STDLIB)
- /* Dinkumware guys didn't provide a means to call allocate() without
- * supplying a hint, in disagreement with the standard.
- */
-
- Type* allocate(std::size_t n,const void* hint=0)
- {
- std::allocator<Type>& a=*this;
- return a.allocate(n,hint);
- }
-#endif
-
-};
-
-/* Detects whether a given allocator belongs to a defective stdlib not
- * having the required member templates.
- * Note that it does not suffice to check the Boost.Config stdlib
- * macros, as the user might have passed a custom, compliant allocator.
- * The checks also considers partial_std_allocator_wrapper to be
- * a standard defective allocator.
- */
-
-#if defined(BOOST_NO_STD_ALLOCATOR)&&\
- (defined(BOOST_HAS_PARTIAL_STD_ALLOCATOR)||defined(BOOST_DINKUMWARE_STDLIB))
-
-template<typename Allocator>
-struct is_partial_std_allocator
-{
- BOOST_STATIC_CONSTANT(bool,
- value=
- (is_same<
- std::allocator<BOOST_DEDUCED_TYPENAME Allocator::value_type>,
- Allocator
- >::value)||
- (is_same<
- partial_std_allocator_wrapper<
- BOOST_DEDUCED_TYPENAME Allocator::value_type>,
- Allocator
- >::value));
-};
-
-#else
-
-template<typename Allocator>
-struct is_partial_std_allocator
-{
- BOOST_STATIC_CONSTANT(bool,value=false);
-};
-
-#endif
-
-/* rebind operations for defective std allocators */
-
-template<typename Allocator,typename Type>
-struct partial_std_allocator_rebind_to
-{
- typedef partial_std_allocator_wrapper<Type> type;
-};
-
-/* rebind operation in all other cases */
-
-template<typename Allocator>
-struct rebinder
-{
- template<typename Type>
- struct result
- {
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename Allocator::BOOST_NESTED_TEMPLATE
- rebind<Type>::other other;
-#else
- typedef typename std::allocator_traits<Allocator>::BOOST_NESTED_TEMPLATE
- rebind_alloc<Type> other;
-#endif
- };
-};
-
-template<typename Allocator,typename Type>
-struct compliant_allocator_rebind_to
-{
- typedef typename rebinder<Allocator>::
- BOOST_NESTED_TEMPLATE result<Type>::other type;
-};
-
-/* rebind front-end */
-
-template<typename Allocator,typename Type>
-struct rebind_to:
- mpl::eval_if_c<
- is_partial_std_allocator<Allocator>::value,
- partial_std_allocator_rebind_to<Allocator,Type>,
- compliant_allocator_rebind_to<Allocator,Type>
- >
-{
-};
-
-/* allocator-independent versions of construct and destroy */
-
-template<typename Type>
-void construct(void* p,const Type& t)
-{
- new (p) Type(t);
-}
-
-#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
-/* MSVC++ issues spurious warnings about unreferencend formal parameters
- * in destroy<Type> when Type is a class with trivial dtor.
- */
-
-#pragma warning(push)
-#pragma warning(disable:4100)
-#endif
-
-template<typename Type>
-void destroy(const Type* p)
-{
-
-#if BOOST_WORKAROUND(__SUNPRO_CC,BOOST_TESTED_AT(0x590))
- const_cast<Type*>(p)->~Type();
-#else
- p->~Type();
-#endif
-
-}
-
-#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
-#pragma warning(pop)
-#endif
-
-} /* namespace boost::detail::allocator */
-
-} /* namespace boost::detail */
-
-} /* namespace boost */
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/detail/compressed_pair.hpp b/src/third_party/boost-1.68.0/boost/detail/compressed_pair.hpp
deleted file mode 100644
index 5dc21e23e6a..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/compressed_pair.hpp
+++ /dev/null
@@ -1,443 +0,0 @@
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/utility for most recent version including documentation.
-
-// compressed_pair: pair that "compresses" empty members
-// (see libs/utility/doc/html/compressed_pair.html)
-//
-// JM changes 25 Jan 2004:
-// For the case where T1 == T2 and both are empty, then first() and second()
-// should return different objects.
-// JM changes 25 Jan 2000:
-// Removed default arguments from compressed_pair_switch to get
-// C++ Builder 4 to accept them
-// rewriten swap to get gcc and C++ builder to compile.
-// added partial specialisations for case T1 == T2 to avoid duplicate constructor defs.
-
-#ifndef BOOST_DETAIL_COMPRESSED_PAIR_HPP
-#define BOOST_DETAIL_COMPRESSED_PAIR_HPP
-
-#include <algorithm>
-
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/is_empty.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/call_traits.hpp>
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:4512)
-#endif
-namespace boost
-{
-
-template <class T1, class T2>
-class compressed_pair;
-
-
-// compressed_pair
-
-namespace details
-{
- // JM altered 26 Jan 2000:
- template <class T1, class T2, bool IsSame, bool FirstEmpty, bool SecondEmpty>
- struct compressed_pair_switch;
-
- template <class T1, class T2>
- struct compressed_pair_switch<T1, T2, false, false, false>
- {static const int value = 0;};
-
- template <class T1, class T2>
- struct compressed_pair_switch<T1, T2, false, true, true>
- {static const int value = 3;};
-
- template <class T1, class T2>
- struct compressed_pair_switch<T1, T2, false, true, false>
- {static const int value = 1;};
-
- template <class T1, class T2>
- struct compressed_pair_switch<T1, T2, false, false, true>
- {static const int value = 2;};
-
- template <class T1, class T2>
- struct compressed_pair_switch<T1, T2, true, true, true>
- {static const int value = 4;};
-
- template <class T1, class T2>
- struct compressed_pair_switch<T1, T2, true, false, false>
- {static const int value = 5;};
-
- template <class T1, class T2, int Version> class compressed_pair_imp;
-
-#ifdef __GNUC__
- // workaround for GCC (JM):
- using std::swap;
-#endif
- //
- // can't call unqualified swap from within classname::swap
- // as Koenig lookup rules will find only the classname::swap
- // member function not the global declaration, so use cp_swap
- // as a forwarding function (JM):
- template <typename T>
- inline void cp_swap(T& t1, T& t2)
- {
-#ifndef __GNUC__
- using std::swap;
-#endif
- swap(t1, t2);
- }
-
- // 0 derive from neither
-
- template <class T1, class T2>
- class compressed_pair_imp<T1, T2, 0>
- {
- public:
- typedef T1 first_type;
- typedef T2 second_type;
- typedef typename call_traits<first_type>::param_type first_param_type;
- typedef typename call_traits<second_type>::param_type second_param_type;
- typedef typename call_traits<first_type>::reference first_reference;
- typedef typename call_traits<second_type>::reference second_reference;
- typedef typename call_traits<first_type>::const_reference first_const_reference;
- typedef typename call_traits<second_type>::const_reference second_const_reference;
-
- compressed_pair_imp() {}
-
- compressed_pair_imp(first_param_type x, second_param_type y)
- : first_(x), second_(y) {}
-
- compressed_pair_imp(first_param_type x)
- : first_(x) {}
-
- compressed_pair_imp(second_param_type y)
- : second_(y) {}
-
- first_reference first() {return first_;}
- first_const_reference first() const {return first_;}
-
- second_reference second() {return second_;}
- second_const_reference second() const {return second_;}
-
- void swap(::boost::compressed_pair<T1, T2>& y)
- {
- cp_swap(first_, y.first());
- cp_swap(second_, y.second());
- }
- private:
- first_type first_;
- second_type second_;
- };
-
- // 1 derive from T1
-
- template <class T1, class T2>
- class compressed_pair_imp<T1, T2, 1>
- : protected ::boost::remove_cv<T1>::type
- {
- public:
- typedef T1 first_type;
- typedef T2 second_type;
- typedef typename call_traits<first_type>::param_type first_param_type;
- typedef typename call_traits<second_type>::param_type second_param_type;
- typedef typename call_traits<first_type>::reference first_reference;
- typedef typename call_traits<second_type>::reference second_reference;
- typedef typename call_traits<first_type>::const_reference first_const_reference;
- typedef typename call_traits<second_type>::const_reference second_const_reference;
-
- compressed_pair_imp() {}
-
- compressed_pair_imp(first_param_type x, second_param_type y)
- : first_type(x), second_(y) {}
-
- compressed_pair_imp(first_param_type x)
- : first_type(x) {}
-
- compressed_pair_imp(second_param_type y)
- : second_(y) {}
-
- first_reference first() {return *this;}
- first_const_reference first() const {return *this;}
-
- second_reference second() {return second_;}
- second_const_reference second() const {return second_;}
-
- void swap(::boost::compressed_pair<T1,T2>& y)
- {
- // no need to swap empty base class:
- cp_swap(second_, y.second());
- }
- private:
- second_type second_;
- };
-
- // 2 derive from T2
-
- template <class T1, class T2>
- class compressed_pair_imp<T1, T2, 2>
- : protected ::boost::remove_cv<T2>::type
- {
- public:
- typedef T1 first_type;
- typedef T2 second_type;
- typedef typename call_traits<first_type>::param_type first_param_type;
- typedef typename call_traits<second_type>::param_type second_param_type;
- typedef typename call_traits<first_type>::reference first_reference;
- typedef typename call_traits<second_type>::reference second_reference;
- typedef typename call_traits<first_type>::const_reference first_const_reference;
- typedef typename call_traits<second_type>::const_reference second_const_reference;
-
- compressed_pair_imp() {}
-
- compressed_pair_imp(first_param_type x, second_param_type y)
- : second_type(y), first_(x) {}
-
- compressed_pair_imp(first_param_type x)
- : first_(x) {}
-
- compressed_pair_imp(second_param_type y)
- : second_type(y) {}
-
- first_reference first() {return first_;}
- first_const_reference first() const {return first_;}
-
- second_reference second() {return *this;}
- second_const_reference second() const {return *this;}
-
- void swap(::boost::compressed_pair<T1,T2>& y)
- {
- // no need to swap empty base class:
- cp_swap(first_, y.first());
- }
-
- private:
- first_type first_;
- };
-
- // 3 derive from T1 and T2
-
- template <class T1, class T2>
- class compressed_pair_imp<T1, T2, 3>
- : protected ::boost::remove_cv<T1>::type,
- protected ::boost::remove_cv<T2>::type
- {
- public:
- typedef T1 first_type;
- typedef T2 second_type;
- typedef typename call_traits<first_type>::param_type first_param_type;
- typedef typename call_traits<second_type>::param_type second_param_type;
- typedef typename call_traits<first_type>::reference first_reference;
- typedef typename call_traits<second_type>::reference second_reference;
- typedef typename call_traits<first_type>::const_reference first_const_reference;
- typedef typename call_traits<second_type>::const_reference second_const_reference;
-
- compressed_pair_imp() {}
-
- compressed_pair_imp(first_param_type x, second_param_type y)
- : first_type(x), second_type(y) {}
-
- compressed_pair_imp(first_param_type x)
- : first_type(x) {}
-
- compressed_pair_imp(second_param_type y)
- : second_type(y) {}
-
- first_reference first() {return *this;}
- first_const_reference first() const {return *this;}
-
- second_reference second() {return *this;}
- second_const_reference second() const {return *this;}
- //
- // no need to swap empty bases:
- void swap(::boost::compressed_pair<T1,T2>&) {}
- };
-
- // JM
- // 4 T1 == T2, T1 and T2 both empty
- // Originally this did not store an instance of T2 at all
- // but that led to problems beause it meant &x.first() == &x.second()
- // which is not true for any other kind of pair, so now we store an instance
- // of T2 just in case the user is relying on first() and second() returning
- // different objects (albeit both empty).
- template <class T1, class T2>
- class compressed_pair_imp<T1, T2, 4>
- : protected ::boost::remove_cv<T1>::type
- {
- public:
- typedef T1 first_type;
- typedef T2 second_type;
- typedef typename call_traits<first_type>::param_type first_param_type;
- typedef typename call_traits<second_type>::param_type second_param_type;
- typedef typename call_traits<first_type>::reference first_reference;
- typedef typename call_traits<second_type>::reference second_reference;
- typedef typename call_traits<first_type>::const_reference first_const_reference;
- typedef typename call_traits<second_type>::const_reference second_const_reference;
-
- compressed_pair_imp() {}
-
- compressed_pair_imp(first_param_type x, second_param_type y)
- : first_type(x), m_second(y) {}
-
- compressed_pair_imp(first_param_type x)
- : first_type(x), m_second(x) {}
-
- first_reference first() {return *this;}
- first_const_reference first() const {return *this;}
-
- second_reference second() {return m_second;}
- second_const_reference second() const {return m_second;}
-
- void swap(::boost::compressed_pair<T1,T2>&) {}
- private:
- T2 m_second;
- };
-
- // 5 T1 == T2 and are not empty: //JM
-
- template <class T1, class T2>
- class compressed_pair_imp<T1, T2, 5>
- {
- public:
- typedef T1 first_type;
- typedef T2 second_type;
- typedef typename call_traits<first_type>::param_type first_param_type;
- typedef typename call_traits<second_type>::param_type second_param_type;
- typedef typename call_traits<first_type>::reference first_reference;
- typedef typename call_traits<second_type>::reference second_reference;
- typedef typename call_traits<first_type>::const_reference first_const_reference;
- typedef typename call_traits<second_type>::const_reference second_const_reference;
-
- compressed_pair_imp() {}
-
- compressed_pair_imp(first_param_type x, second_param_type y)
- : first_(x), second_(y) {}
-
- compressed_pair_imp(first_param_type x)
- : first_(x), second_(x) {}
-
- first_reference first() {return first_;}
- first_const_reference first() const {return first_;}
-
- second_reference second() {return second_;}
- second_const_reference second() const {return second_;}
-
- void swap(::boost::compressed_pair<T1, T2>& y)
- {
- cp_swap(first_, y.first());
- cp_swap(second_, y.second());
- }
- private:
- first_type first_;
- second_type second_;
- };
-
-} // details
-
-template <class T1, class T2>
-class compressed_pair
- : private ::boost::details::compressed_pair_imp<T1, T2,
- ::boost::details::compressed_pair_switch<
- T1,
- T2,
- ::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
- ::boost::is_empty<T1>::value,
- ::boost::is_empty<T2>::value>::value>
-{
-private:
- typedef details::compressed_pair_imp<T1, T2,
- ::boost::details::compressed_pair_switch<
- T1,
- T2,
- ::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
- ::boost::is_empty<T1>::value,
- ::boost::is_empty<T2>::value>::value> base;
-public:
- typedef T1 first_type;
- typedef T2 second_type;
- typedef typename call_traits<first_type>::param_type first_param_type;
- typedef typename call_traits<second_type>::param_type second_param_type;
- typedef typename call_traits<first_type>::reference first_reference;
- typedef typename call_traits<second_type>::reference second_reference;
- typedef typename call_traits<first_type>::const_reference first_const_reference;
- typedef typename call_traits<second_type>::const_reference second_const_reference;
-
- compressed_pair() : base() {}
- compressed_pair(first_param_type x, second_param_type y) : base(x, y) {}
- explicit compressed_pair(first_param_type x) : base(x) {}
- explicit compressed_pair(second_param_type y) : base(y) {}
-
- first_reference first() {return base::first();}
- first_const_reference first() const {return base::first();}
-
- second_reference second() {return base::second();}
- second_const_reference second() const {return base::second();}
-
- void swap(compressed_pair& y) { base::swap(y); }
-};
-
-// JM
-// Partial specialisation for case where T1 == T2:
-//
-template <class T>
-class compressed_pair<T, T>
- : private details::compressed_pair_imp<T, T,
- ::boost::details::compressed_pair_switch<
- T,
- T,
- ::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
- ::boost::is_empty<T>::value,
- ::boost::is_empty<T>::value>::value>
-{
-private:
- typedef details::compressed_pair_imp<T, T,
- ::boost::details::compressed_pair_switch<
- T,
- T,
- ::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
- ::boost::is_empty<T>::value,
- ::boost::is_empty<T>::value>::value> base;
-public:
- typedef T first_type;
- typedef T second_type;
- typedef typename call_traits<first_type>::param_type first_param_type;
- typedef typename call_traits<second_type>::param_type second_param_type;
- typedef typename call_traits<first_type>::reference first_reference;
- typedef typename call_traits<second_type>::reference second_reference;
- typedef typename call_traits<first_type>::const_reference first_const_reference;
- typedef typename call_traits<second_type>::const_reference second_const_reference;
-
- compressed_pair() : base() {}
- compressed_pair(first_param_type x, second_param_type y) : base(x, y) {}
-#if !(defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
- explicit
-#endif
- compressed_pair(first_param_type x) : base(x) {}
-
- first_reference first() {return base::first();}
- first_const_reference first() const {return base::first();}
-
- second_reference second() {return base::second();}
- second_const_reference second() const {return base::second();}
-
- void swap(::boost::compressed_pair<T,T>& y) { base::swap(y); }
-};
-
-template <class T1, class T2>
-inline
-void
-swap(compressed_pair<T1, T2>& x, compressed_pair<T1, T2>& y)
-{
- x.swap(y);
-}
-
-} // boost
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#endif // BOOST_DETAIL_COMPRESSED_PAIR_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/detail/dynamic_bitset.hpp b/src/third_party/boost-1.68.0/boost/detail/dynamic_bitset.hpp
deleted file mode 100644
index e0f675d5ec8..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/dynamic_bitset.hpp
+++ /dev/null
@@ -1,241 +0,0 @@
-// -----------------------------------------------------------
-//
-// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
-// Copyright (c) 2003-2006, 2008 Gennaro Prota
-//
-// Copyright (c) 2014 Glen Joseph Fernandes
-// glenfe at live dot com
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// -----------------------------------------------------------
-
-#ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP
-#define BOOST_DETAIL_DYNAMIC_BITSET_HPP
-
-#include <memory>
-#include <cstddef>
-#include "boost/config.hpp"
-#include "boost/detail/workaround.hpp"
-
-
-namespace boost {
-
- namespace detail {
- namespace dynamic_bitset_impl {
-
- // Gives (read-)access to the object representation
- // of an object of type T (3.9p4). CANNOT be used
- // on a base sub-object
- //
- template <typename T>
- inline const unsigned char * object_representation (T* p)
- {
- return static_cast<const unsigned char *>(static_cast<const void *>(p));
- }
-
- template<typename T, int amount, int width /* = default */>
- struct shifter
- {
- static void left_shift(T & v) {
- amount >= width ? (v = 0)
- : (v >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(amount));
- }
- };
-
- // ------- count function implementation --------------
-
- typedef unsigned char byte_type;
-
- // These two entities
- //
- // enum mode { access_by_bytes, access_by_blocks };
- // template <mode> struct mode_to_type {};
- //
- // were removed, since the regression logs (as of 24 Aug 2008)
- // showed that several compilers had troubles with recognizing
- //
- // const mode m = access_by_bytes
- //
- // as a constant expression
- //
- // * So, we'll use bool, instead of enum *.
- //
- template <bool value>
- struct value_to_type
- {
- value_to_type() {}
- };
- const bool access_by_bytes = true;
- const bool access_by_blocks = false;
-
-
- // the table: wrapped in a class template, so
- // that it is only instantiated if/when needed
- //
- template <bool dummy_name = true>
- struct count_table { static const byte_type table[]; };
-
- template <>
- struct count_table<false> { /* no table */ };
-
-
- const unsigned int table_width = 8;
- template <bool b>
- const byte_type count_table<b>::table[] =
- {
- // Automatically generated by GPTableGen.exe v.1.0
- //
- 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
- 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
- };
-
-
- // overload for access by bytes
- //
-
- template <typename Iterator>
- inline std::size_t do_count(Iterator first, std::size_t length,
- int /*dummy param*/,
- value_to_type<access_by_bytes>* )
- {
- std::size_t num = 0;
- if (length)
- {
- const byte_type * p = object_representation(&*first);
- length *= sizeof(*first);
-
- do {
- num += count_table<>::table[*p];
- ++p;
- --length;
-
- } while (length);
- }
-
- return num;
- }
-
-
- // overload for access by blocks
- //
- template <typename Iterator, typename ValueType>
- inline std::size_t do_count(Iterator first, std::size_t length, ValueType,
- value_to_type<access_by_blocks>*)
- {
- std::size_t num = 0;
- while (length){
-
- ValueType value = *first;
- while (value) {
- num += count_table<>::table[value & ((1u<<table_width) - 1)];
- value >>= table_width;
- }
-
- ++first;
- --length;
- }
-
- return num;
- }
-
- // -------------------------------------------------------
-
-
- // Some library implementations simply return a dummy
- // value such as
- //
- // size_type(-1) / sizeof(T)
- //
- // from vector<>::max_size. This tries to get more
- // meaningful info.
- //
- template <typename T>
- inline typename T::size_type vector_max_size_workaround(const T & v)
- BOOST_NOEXCEPT
- {
- typedef typename T::allocator_type allocator_type;
-
- const allocator_type& alloc = v.get_allocator();
-
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef std::allocator_traits<allocator_type> allocator_traits;
-
- const typename allocator_traits::size_type alloc_max =
- allocator_traits::max_size(alloc);
-#else
- const typename allocator_type::size_type alloc_max = alloc.max_size();
-#endif
-
- const typename T::size_type container_max = v.max_size();
-
- return alloc_max < container_max ? alloc_max : container_max;
- }
-
- // for static_asserts
- template <typename T>
- struct allowed_block_type {
- enum { value = T(-1) > 0 }; // ensure T has no sign
- };
-
- template <>
- struct allowed_block_type<bool> {
- enum { value = false };
- };
-
-
- template <typename T>
- struct is_numeric {
- enum { value = false };
- };
-
-# define BOOST_dynamic_bitset_is_numeric(x) \
- template<> \
- struct is_numeric< x > { \
- enum { value = true }; \
- } /**/
-
- BOOST_dynamic_bitset_is_numeric(bool);
- BOOST_dynamic_bitset_is_numeric(char);
-
-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
- BOOST_dynamic_bitset_is_numeric(wchar_t);
-#endif
-
- BOOST_dynamic_bitset_is_numeric(signed char);
- BOOST_dynamic_bitset_is_numeric(short int);
- BOOST_dynamic_bitset_is_numeric(int);
- BOOST_dynamic_bitset_is_numeric(long int);
-
- BOOST_dynamic_bitset_is_numeric(unsigned char);
- BOOST_dynamic_bitset_is_numeric(unsigned short);
- BOOST_dynamic_bitset_is_numeric(unsigned int);
- BOOST_dynamic_bitset_is_numeric(unsigned long);
-
-#if defined(BOOST_HAS_LONG_LONG)
- BOOST_dynamic_bitset_is_numeric(::boost::long_long_type);
- BOOST_dynamic_bitset_is_numeric(::boost::ulong_long_type);
-#endif
-
- // intentionally omitted
- //BOOST_dynamic_bitset_is_numeric(float);
- //BOOST_dynamic_bitset_is_numeric(double);
- //BOOST_dynamic_bitset_is_numeric(long double);
-
-#undef BOOST_dynamic_bitset_is_numeric
-
- } // dynamic_bitset_impl
- } // namespace detail
-
-} // namespace boost
-
-#endif // include guard
-
diff --git a/src/third_party/boost-1.68.0/boost/detail/indirect_traits.hpp b/src/third_party/boost-1.68.0/boost/detail/indirect_traits.hpp
deleted file mode 100644
index 6294e40f6a9..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/indirect_traits.hpp
+++ /dev/null
@@ -1,204 +0,0 @@
-// Copyright David Abrahams 2002.
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-#ifndef INDIRECT_TRAITS_DWA2002131_HPP
-# define INDIRECT_TRAITS_DWA2002131_HPP
-# include <boost/type_traits/is_function.hpp>
-# include <boost/type_traits/is_reference.hpp>
-# include <boost/type_traits/is_pointer.hpp>
-# include <boost/type_traits/is_class.hpp>
-# include <boost/type_traits/is_const.hpp>
-# include <boost/type_traits/is_volatile.hpp>
-# include <boost/type_traits/is_member_function_pointer.hpp>
-# include <boost/type_traits/is_member_pointer.hpp>
-# include <boost/type_traits/remove_cv.hpp>
-# include <boost/type_traits/remove_reference.hpp>
-# include <boost/type_traits/remove_pointer.hpp>
-
-# include <boost/detail/workaround.hpp>
-
-# include <boost/mpl/eval_if.hpp>
-# include <boost/mpl/if.hpp>
-# include <boost/mpl/bool.hpp>
-# include <boost/mpl/and.hpp>
-# include <boost/mpl/not.hpp>
-# include <boost/mpl/aux_/lambda_support.hpp>
-
-
-namespace boost { namespace detail {
-
-namespace indirect_traits {
-
-template <class T>
-struct is_reference_to_const : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_const<T const&> : mpl::true_
-{
-};
-
-# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
-template<class T>
-struct is_reference_to_const<T const volatile&> : mpl::true_
-{
-};
-# endif
-
-template <class T>
-struct is_reference_to_function : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_function<T&> : is_function<T>
-{
-};
-
-template <class T>
-struct is_pointer_to_function : mpl::false_
-{
-};
-
-// There's no such thing as a pointer-to-cv-function, so we don't need
-// specializations for those
-template <class T>
-struct is_pointer_to_function<T*> : is_function<T>
-{
-};
-
-template <class T>
-struct is_reference_to_member_function_pointer_impl : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_member_function_pointer_impl<T&>
- : is_member_function_pointer<typename remove_cv<T>::type>
-{
-};
-
-
-template <class T>
-struct is_reference_to_member_function_pointer
- : is_reference_to_member_function_pointer_impl<T>
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_member_function_pointer,(T))
-};
-
-template <class T>
-struct is_reference_to_function_pointer_aux
- : mpl::and_<
- is_reference<T>
- , is_pointer_to_function<
- typename remove_cv<
- typename remove_reference<T>::type
- >::type
- >
- >
-{
- // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those
-};
-
-template <class T>
-struct is_reference_to_function_pointer
- : mpl::if_<
- is_reference_to_function<T>
- , mpl::false_
- , is_reference_to_function_pointer_aux<T>
- >::type
-{
-};
-
-template <class T>
-struct is_reference_to_non_const
- : mpl::and_<
- is_reference<T>
- , mpl::not_<
- is_reference_to_const<T>
- >
- >
-{
-};
-
-template <class T>
-struct is_reference_to_volatile : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_volatile<T volatile&> : mpl::true_
-{
-};
-
-# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
-template <class T>
-struct is_reference_to_volatile<T const volatile&> : mpl::true_
-{
-};
-# endif
-
-
-template <class T>
-struct is_reference_to_pointer : mpl::false_
-{
-};
-
-template <class T>
-struct is_reference_to_pointer<T*&> : mpl::true_
-{
-};
-
-template <class T>
-struct is_reference_to_pointer<T* const&> : mpl::true_
-{
-};
-
-template <class T>
-struct is_reference_to_pointer<T* volatile&> : mpl::true_
-{
-};
-
-template <class T>
-struct is_reference_to_pointer<T* const volatile&> : mpl::true_
-{
-};
-
-template <class T>
-struct is_reference_to_class
- : mpl::and_<
- is_reference<T>
- , is_class<
- typename remove_cv<
- typename remove_reference<T>::type
- >::type
- >
- >
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T))
-};
-
-template <class T>
-struct is_pointer_to_class
- : mpl::and_<
- is_pointer<T>
- , is_class<
- typename remove_cv<
- typename remove_pointer<T>::type
- >::type
- >
- >
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T))
-};
-
-
-}
-
-using namespace indirect_traits;
-
-}} // namespace boost::python::detail
-
-#endif // INDIRECT_TRAITS_DWA2002131_HPP
diff --git a/src/third_party/boost-1.68.0/boost/detail/interlocked.hpp b/src/third_party/boost-1.68.0/boost/detail/interlocked.hpp
deleted file mode 100644
index e20e3e46719..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/interlocked.hpp
+++ /dev/null
@@ -1,201 +0,0 @@
-#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
-#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
-
-//
-// boost/detail/interlocked.hpp
-//
-// Copyright 2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#include <boost/config.hpp>
-
-// MS compatible compilers support #pragma once
-#ifdef BOOST_HAS_PRAGMA_ONCE
-#pragma once
-#endif
-
-#if defined( BOOST_USE_WINDOWS_H )
-
-# include <windows.h>
-
-# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer
-
-#elif defined( BOOST_USE_INTRIN_H )
-
-#include <intrin.h>
-
-# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
-
-# if defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64)
-
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
-
-# else
-
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
- ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
- ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
-
-# endif
-
-#elif defined(_WIN32_WCE)
-
-// under Windows CE we still have old-style Interlocked* functions
-
-extern "C" long __cdecl InterlockedIncrement( long volatile* );
-extern "C" long __cdecl InterlockedDecrement( long volatile* );
-extern "C" long __cdecl InterlockedCompareExchange( long volatile*, long, long );
-extern "C" long __cdecl InterlockedExchange( long volatile*, long );
-extern "C" long __cdecl InterlockedExchangeAdd( long volatile*, long );
-
-# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
-
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
- ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare)))
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
- ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange)))
-
-#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
-
-#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1400
-
-#include <intrin.h>
-
-#else
-
-# if defined( __CLRCALL_PURE_OR_CDECL )
-# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __CLRCALL_PURE_OR_CDECL
-# else
-# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __cdecl
-# endif
-
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
-extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
-
-# undef BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL
-
-# if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310
-# pragma intrinsic( _InterlockedIncrement )
-# pragma intrinsic( _InterlockedDecrement )
-# pragma intrinsic( _InterlockedCompareExchange )
-# pragma intrinsic( _InterlockedExchange )
-# pragma intrinsic( _InterlockedExchangeAdd )
-# endif
-
-#endif
-
-# if defined(_M_IA64) || defined(_M_AMD64)
-
-extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
-extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* );
-
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
-
-# else
-
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
- ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
- ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
-
-# endif
-
-# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
-
-// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
-#elif defined(__MINGW64_VERSION_MAJOR)
-
-// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
-#include <intrin.h>
-
-# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
-# if defined(__x86_64__) || defined(__x86_64)
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
-# else
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
- ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
- ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
-# endif
-
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
-
-#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)
-
-namespace boost
-{
-
-namespace detail
-{
-
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * );
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * );
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long );
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long );
-extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long );
-
-# if defined(_M_IA64) || defined(_M_AMD64)
-extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
-extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
-# endif
-
-} // namespace detail
-
-} // namespace boost
-
-# define BOOST_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement
-# define BOOST_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange
-# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
-# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
-
-# if defined(_M_IA64) || defined(_M_AMD64)
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::InterlockedExchangePointer
-# else
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
- ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
- ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
-# endif
-
-#else
-
-# error "Interlocked intrinsics not available"
-
-#endif
-
-#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/detail/is_incrementable.hpp b/src/third_party/boost-1.68.0/boost/detail/is_incrementable.hpp
deleted file mode 100644
index 5ebf4b7acab..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/is_incrementable.hpp
+++ /dev/null
@@ -1,125 +0,0 @@
-// Copyright David Abrahams 2004. Use, modification and distribution is
-// subject to the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-#ifndef IS_INCREMENTABLE_DWA200415_HPP
-# define IS_INCREMENTABLE_DWA200415_HPP
-
-# include <boost/type_traits/integral_constant.hpp>
-# include <boost/type_traits/remove_cv.hpp>
-# include <boost/mpl/aux_/lambda_support.hpp>
-# include <boost/mpl/bool.hpp>
-# include <boost/detail/workaround.hpp>
-
-namespace boost { namespace detail {
-
-// is_incrementable<T> metafunction
-//
-// Requires: Given x of type T&, if the expression ++x is well-formed
-// it must have complete type; otherwise, it must neither be ambiguous
-// nor violate access.
-
-// This namespace ensures that ADL doesn't mess things up.
-namespace is_incrementable_
-{
- // a type returned from operator++ when no increment is found in the
- // type's own namespace
- struct tag {};
-
- // any soaks up implicit conversions and makes the following
- // operator++ less-preferred than any other such operator that
- // might be found via ADL.
- struct any { template <class T> any(T const&); };
-
- // This is a last-resort operator++ for when none other is found
-# if BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2
-
-}
-
-namespace is_incrementable_2
-{
- is_incrementable_::tag operator++(is_incrementable_::any const&);
- is_incrementable_::tag operator++(is_incrementable_::any const&,int);
-}
-using namespace is_incrementable_2;
-
-namespace is_incrementable_
-{
-
-# else
-
- tag operator++(any const&);
- tag operator++(any const&,int);
-
-# endif
-
-# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
-# define BOOST_comma(a,b) (a)
-# else
- // In case an operator++ is found that returns void, we'll use ++x,0
- tag operator,(tag,int);
-# define BOOST_comma(a,b) (a,b)
-# endif
-
-# if defined(BOOST_MSVC)
-# pragma warning(push)
-# pragma warning(disable:4913) // Warning about operator,
-# endif
-
- // two check overloads help us identify which operator++ was picked
- char (& check_(tag) )[2];
-
- template <class T>
- char check_(T const&);
-
-
- template <class T>
- struct impl
- {
- static typename boost::remove_cv<T>::type& x;
-
- BOOST_STATIC_CONSTANT(
- bool
- , value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1
- );
- };
-
- template <class T>
- struct postfix_impl
- {
- static typename boost::remove_cv<T>::type& x;
-
- BOOST_STATIC_CONSTANT(
- bool
- , value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1
- );
- };
-
-# if defined(BOOST_MSVC)
-# pragma warning(pop)
-# endif
-
-}
-
-# undef BOOST_comma
-
-template<typename T>
-struct is_incrementable :
- public boost::integral_constant<bool, boost::detail::is_incrementable_::impl<T>::value>
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_incrementable,(T))
-};
-
-template<typename T>
-struct is_postfix_incrementable :
- public boost::integral_constant<bool, boost::detail::is_incrementable_::postfix_impl<T>::value>
-{
- BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_postfix_incrementable,(T))
-};
-
-} // namespace detail
-
-} // namespace boost
-
-# include <boost/type_traits/detail/bool_trait_undef.hpp>
-
-#endif // IS_INCREMENTABLE_DWA200415_HPP
diff --git a/src/third_party/boost-1.68.0/boost/detail/lcast_precision.hpp b/src/third_party/boost-1.68.0/boost/detail/lcast_precision.hpp
deleted file mode 100644
index 2be88fd87fc..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/lcast_precision.hpp
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright Alexander Nasonov & Paul A. Bristow 2006.
-
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt
-// or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
-#define BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
-
-#include <climits>
-#include <ios>
-#include <limits>
-
-#include <boost/config.hpp>
-#include <boost/integer_traits.hpp>
-
-#ifndef BOOST_NO_IS_ABSTRACT
-// Fix for SF:1358600 - lexical_cast & pure virtual functions & VC 8 STL
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_abstract.hpp>
-#endif
-
-#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || \
- (defined(BOOST_MSVC) && (BOOST_MSVC<1310))
-
-#define BOOST_LCAST_NO_COMPILE_TIME_PRECISION
-#endif
-
-#ifdef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
-#include <boost/assert.hpp>
-#else
-#include <boost/static_assert.hpp>
-#endif
-
-namespace boost { namespace detail {
-
-class lcast_abstract_stub {};
-
-#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
-// Calculate an argument to pass to std::ios_base::precision from
-// lexical_cast. See alternative implementation for broken standard
-// libraries in lcast_get_precision below. Keep them in sync, please.
-template<class T>
-struct lcast_precision
-{
-#ifdef BOOST_NO_IS_ABSTRACT
- typedef std::numeric_limits<T> limits; // No fix for SF:1358600.
-#else
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
- boost::is_abstract<T>
- , std::numeric_limits<lcast_abstract_stub>
- , std::numeric_limits<T>
- >::type limits;
-#endif
-
- BOOST_STATIC_CONSTANT(bool, use_default_precision =
- !limits::is_specialized || limits::is_exact
- );
-
- BOOST_STATIC_CONSTANT(bool, is_specialized_bin =
- !use_default_precision &&
- limits::radix == 2 && limits::digits > 0
- );
-
- BOOST_STATIC_CONSTANT(bool, is_specialized_dec =
- !use_default_precision &&
- limits::radix == 10 && limits::digits10 > 0
- );
-
- BOOST_STATIC_CONSTANT(std::streamsize, streamsize_max =
- boost::integer_traits<std::streamsize>::const_max
- );
-
- BOOST_STATIC_CONSTANT(unsigned int, precision_dec = limits::digits10 + 1U);
-
- BOOST_STATIC_ASSERT(!is_specialized_dec ||
- precision_dec <= streamsize_max + 0UL
- );
-
- BOOST_STATIC_CONSTANT(unsigned long, precision_bin =
- 2UL + limits::digits * 30103UL / 100000UL
- );
-
- BOOST_STATIC_ASSERT(!is_specialized_bin ||
- (limits::digits + 0UL < ULONG_MAX / 30103UL &&
- precision_bin > limits::digits10 + 0UL &&
- precision_bin <= streamsize_max + 0UL)
- );
-
- BOOST_STATIC_CONSTANT(std::streamsize, value =
- is_specialized_bin ? precision_bin
- : is_specialized_dec ? precision_dec : 6
- );
-};
-#endif
-
-template<class T>
-inline std::streamsize lcast_get_precision(T* = 0)
-{
-#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
- return lcast_precision<T>::value;
-#else // Follow lcast_precision algorithm at run-time:
-
-#ifdef BOOST_NO_IS_ABSTRACT
- typedef std::numeric_limits<T> limits; // No fix for SF:1358600.
-#else
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_<
- boost::is_abstract<T>
- , std::numeric_limits<lcast_abstract_stub>
- , std::numeric_limits<T>
- >::type limits;
-#endif
-
- bool const use_default_precision =
- !limits::is_specialized || limits::is_exact;
-
- if(!use_default_precision)
- { // Includes all built-in floating-point types, float, double ...
- // and UDT types for which digits (significand bits) is defined (not zero)
-
- bool const is_specialized_bin =
- limits::radix == 2 && limits::digits > 0;
- bool const is_specialized_dec =
- limits::radix == 10 && limits::digits10 > 0;
- std::streamsize const streamsize_max =
- (boost::integer_traits<std::streamsize>::max)();
- (void)streamsize_max;
-
- if(is_specialized_bin)
- { // Floating-point types with
- // limits::digits defined by the specialization.
-
- unsigned long const digits = limits::digits;
- unsigned long const precision = 2UL + digits * 30103UL / 100000UL;
- // unsigned long is selected because it is at least 32-bits
- // and thus ULONG_MAX / 30103UL is big enough for all types.
- BOOST_ASSERT(
- digits < ULONG_MAX / 30103UL &&
- precision > limits::digits10 + 0UL &&
- precision <= streamsize_max + 0UL
- );
- return precision;
- }
- else if(is_specialized_dec)
- { // Decimal Floating-point type, most likely a User Defined Type
- // rather than a real floating-point hardware type.
- unsigned int const precision = limits::digits10 + 1U;
- BOOST_ASSERT(precision <= streamsize_max + 0UL);
- return precision;
- }
- }
-
- // Integral type (for which precision has no effect)
- // or type T for which limits is NOT specialized,
- // so assume stream precision remains the default 6 decimal digits.
- // Warning: if your User-defined Floating-point type T is NOT specialized,
- // then you may lose accuracy by only using 6 decimal digits.
- // To avoid this, you need to specialize T with either
- // radix == 2 and digits == the number of significand bits,
- // OR
- // radix = 10 and digits10 == the number of decimal digits.
-
- return 6;
-#endif
-}
-
-template<class T>
-inline void lcast_set_precision(std::ios_base& stream, T*)
-{
- stream.precision(lcast_get_precision<T>());
-}
-
-template<class Source, class Target>
-inline void lcast_set_precision(std::ios_base& stream, Source*, Target*)
-{
- std::streamsize const s = lcast_get_precision(static_cast<Source*>(0));
- std::streamsize const t = lcast_get_precision(static_cast<Target*>(0));
- stream.precision(s > t ? s : t);
-}
-
-}}
-
-#endif // BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
-
diff --git a/src/third_party/boost-1.68.0/boost/detail/reference_content.hpp b/src/third_party/boost-1.68.0/boost/detail/reference_content.hpp
deleted file mode 100644
index 36b80d244ec..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/reference_content.hpp
+++ /dev/null
@@ -1,120 +0,0 @@
-//-----------------------------------------------------------------------------
-// boost detail/reference_content.hpp header file
-// See http://www.boost.org for updates, documentation, and revision history.
-//-----------------------------------------------------------------------------
-//
-// Copyright (c) 2003
-// Eric Friedman
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_DETAIL_REFERENCE_CONTENT_HPP
-#define BOOST_DETAIL_REFERENCE_CONTENT_HPP
-
-#include "boost/config.hpp"
-
-# include "boost/mpl/bool.hpp"
-# include "boost/type_traits/has_nothrow_copy.hpp"
-
-#include "boost/mpl/void.hpp"
-
-namespace boost {
-
-namespace detail {
-
-///////////////////////////////////////////////////////////////////////////////
-// (detail) class template reference_content
-//
-// Non-Assignable wrapper for references.
-//
-template <typename RefT>
-class reference_content
-{
-private: // representation
-
- RefT content_;
-
-public: // structors
-
- ~reference_content()
- {
- }
-
- reference_content(RefT r)
- : content_( r )
- {
- }
-
- reference_content(const reference_content& operand)
- : content_( operand.content_ )
- {
- }
-
-private: // non-Assignable
-
- reference_content& operator=(const reference_content&);
-
-public: // queries
-
- RefT get() const
- {
- return content_;
- }
-
-};
-
-///////////////////////////////////////////////////////////////////////////////
-// (detail) metafunction make_reference_content
-//
-// Wraps with reference_content if specified type is reference.
-//
-
-template <typename T = mpl::void_> struct make_reference_content;
-
-
-template <typename T>
-struct make_reference_content
-{
- typedef T type;
-};
-
-template <typename T>
-struct make_reference_content< T& >
-{
- typedef reference_content<T&> type;
-};
-
-
-template <>
-struct make_reference_content< mpl::void_ >
-{
- template <typename T>
- struct apply
- : make_reference_content<T>
- {
- };
-
- typedef mpl::void_ type;
-};
-
-} // namespace detail
-
-///////////////////////////////////////////////////////////////////////////////
-// reference_content<T&> type traits specializations
-//
-
-
-template <typename T>
-struct has_nothrow_copy<
- ::boost::detail::reference_content< T& >
- >
- : mpl::true_
-{
-};
-
-
-} // namespace boost
-
-#endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/detail/utf8_codecvt_facet.hpp b/src/third_party/boost-1.68.0/boost/detail/utf8_codecvt_facet.hpp
deleted file mode 100644
index 12ae19ba93a..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/utf8_codecvt_facet.hpp
+++ /dev/null
@@ -1,219 +0,0 @@
-// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
-// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
-// Distributed under the Boost Software License, Version 1.0. (See accompany-
-// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_UTF8_CODECVT_FACET_HPP
-#define BOOST_UTF8_CODECVT_FACET_HPP
-
-// MS compatible compilers support #pragma once
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// utf8_codecvt_facet.hpp
-
-// This header defines class utf8_codecvt_facet, derived from
-// std::codecvt<wchar_t, char>, which can be used to convert utf8 data in
-// files into wchar_t strings in the application.
-//
-// The header is NOT STANDALONE, and is not to be included by the USER.
-// There are at least two libraries which want to use this functionality, and
-// we want to avoid code duplication. It would be possible to create utf8
-// library, but:
-// - this requires review process first
-// - in the case, when linking the a library which uses utf8
-// (say 'program_options'), user should also link to the utf8 library.
-// This seems inconvenient, and asking a user to link to an unrevieved
-// library is strange.
-// Until the above points are fixed, a library which wants to use utf8 must:
-// - include this header in one of it's headers or sources
-// - include the corresponding boost/detail/utf8_codecvt_facet.ipp file in one
-// of its sources
-// - before including either file, the library must define
-// - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used
-// - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace
-// declaration.
-// - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable'
-// symbols.
-//
-// For example, program_options library might contain:
-// #define BOOST_UTF8_BEGIN_NAMESPACE <backslash character>
-// namespace boost { namespace program_options {
-// #define BOOST_UTF8_END_NAMESPACE }}
-// #define BOOST_UTF8_DECL BOOST_PROGRAM_OPTIONS_DECL
-// #include <boost/detail/utf8_codecvt_facet.ipp>
-//
-// Essentially, each library will have its own copy of utf8 code, in
-// different namespaces.
-
-// Note:(Robert Ramey). I have made the following alterations in the original
-// code.
-// a) Rendered utf8_codecvt<wchar_t, char> with using templates
-// b) Move longer functions outside class definition to prevent inlining
-// and make code smaller
-// c) added on a derived class to permit translation to/from current
-// locale to utf8
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-// archives stored as text - note these ar templated on the basic
-// stream templates to accommodate wide (and other?) kind of characters
-//
-// note the fact that on libraries without wide characters, ostream is
-// is not a specialization of basic_ostream which in fact is not defined
-// in such cases. So we can't use basic_ostream<OStream::char_type> but rather
-// use two template parameters
-//
-// utf8_codecvt_facet
-// This is an implementation of a std::codecvt facet for translating
-// from UTF-8 externally to UCS-4. Note that this is not tied to
-// any specific types in order to allow customization on platforms
-// where wchar_t is not big enough.
-//
-// NOTES: The current implementation jumps through some unpleasant hoops in
-// order to deal with signed character types. As a std::codecvt_base::result,
-// it is necessary for the ExternType to be convertible to unsigned char.
-// I chose not to tie the extern_type explicitly to char. But if any combination
-// of types other than <wchar_t,char_t> is used, then std::codecvt must be
-// specialized on those types for this to work.
-
-#include <locale>
-#include <cwchar> // for mbstate_t
-#include <cstddef> // for std::size_t
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std {
- using ::mbstate_t;
- using ::size_t;
-}
-#endif
-
-// maximum lenght of a multibyte string
-#define MB_LENGTH_MAX 8
-
-BOOST_UTF8_BEGIN_NAMESPACE
-
-//----------------------------------------------------------------------------//
-// //
-// utf8_codecvt_facet //
-// //
-// See utf8_codecvt_facet.ipp for the implementation. //
-//----------------------------------------------------------------------------//
-
-#ifndef BOOST_UTF8_DECL
-#define BOOST_UTF8_DECL
-#endif
-
-struct BOOST_UTF8_DECL utf8_codecvt_facet :
- public std::codecvt<wchar_t, char, std::mbstate_t>
-{
-public:
- explicit utf8_codecvt_facet(std::size_t no_locale_manage=0);
- virtual ~utf8_codecvt_facet(){}
-protected:
- virtual std::codecvt_base::result do_in(
- std::mbstate_t& state,
- const char * from,
- const char * from_end,
- const char * & from_next,
- wchar_t * to,
- wchar_t * to_end,
- wchar_t*& to_next
- ) const;
-
- virtual std::codecvt_base::result do_out(
- std::mbstate_t & state,
- const wchar_t * from,
- const wchar_t * from_end,
- const wchar_t* & from_next,
- char * to,
- char * to_end,
- char * & to_next
- ) const;
-
- bool invalid_continuing_octet(unsigned char octet_1) const {
- return (octet_1 < 0x80|| 0xbf< octet_1);
- }
-
- bool invalid_leading_octet(unsigned char octet_1) const {
- return (0x7f < octet_1 && octet_1 < 0xc0) ||
- (octet_1 > 0xfd);
- }
-
- // continuing octets = octets except for the leading octet
- static unsigned int get_cont_octet_count(unsigned char lead_octet) {
- return get_octet_count(lead_octet) - 1;
- }
-
- static unsigned int get_octet_count(unsigned char lead_octet);
-
- // How many "continuing octets" will be needed for this word
- // == total octets - 1.
- int get_cont_octet_out_count(wchar_t word) const ;
-
- virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW {
- return false;
- }
-
- // UTF-8 isn't really stateful since we rewind on partial conversions
- virtual std::codecvt_base::result do_unshift(
- std::mbstate_t&,
- char * from,
- char * /*to*/,
- char * & next
- ) const {
- next = from;
- return ok;
- }
-
- virtual int do_encoding() const BOOST_NOEXCEPT_OR_NOTHROW {
- const int variable_byte_external_encoding=0;
- return variable_byte_external_encoding;
- }
-
- // How many char objects can I process to get <= max_limit
- // wchar_t objects?
- virtual int do_length(
- std::mbstate_t &,
- const char * from,
- const char * from_end,
- std::size_t max_limit
- ) const
-#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
- throw()
-#endif
- ;
-
- // Nonstandard override
- virtual int do_length(
- const std::mbstate_t & s,
- const char * from,
- const char * from_end,
- std::size_t max_limit
- ) const
-#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
- throw()
-#endif
- {
- return do_length(
- const_cast<std::mbstate_t &>(s),
- from,
- from_end,
- max_limit
- );
- }
-
- // Largest possible value do_length(state,from,from_end,1) could return.
- virtual int do_max_length() const BOOST_NOEXCEPT_OR_NOTHROW {
- return 6; // largest UTF-8 encoding of a UCS-4 character
- }
-};
-
-BOOST_UTF8_END_NAMESPACE
-
-#endif // BOOST_UTF8_CODECVT_FACET_HPP
diff --git a/src/third_party/boost-1.68.0/boost/detail/utf8_codecvt_facet.ipp b/src/third_party/boost-1.68.0/boost/detail/utf8_codecvt_facet.ipp
deleted file mode 100644
index d60f9063417..00000000000
--- a/src/third_party/boost-1.68.0/boost/detail/utf8_codecvt_facet.ipp
+++ /dev/null
@@ -1,289 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// utf8_codecvt_facet.ipp
-
-// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
-// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// Please see the comments in <boost/detail/utf8_codecvt_facet.hpp> to
-// learn how this file should be used.
-
-#include <boost/detail/utf8_codecvt_facet.hpp>
-
-#include <cstdlib> // for multi-byte converson routines
-#include <cassert>
-
-#include <boost/limits.hpp>
-#include <boost/config.hpp>
-
-// If we don't have wstring, then Unicode support
-// is not available anyway, so we don't need to even
-// compiler this file. This also fixes the problem
-// with mingw, which can compile this file, but will
-// generate link error when building DLL.
-#ifndef BOOST_NO_STD_WSTRING
-
-BOOST_UTF8_BEGIN_NAMESPACE
-
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// implementation for wchar_t
-
-utf8_codecvt_facet::utf8_codecvt_facet(
- std::size_t no_locale_manage
-) :
- std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
-{}
-
-// Translate incoming UTF-8 into UCS-4
-std::codecvt_base::result utf8_codecvt_facet::do_in(
- std::mbstate_t& /*state*/,
- const char * from,
- const char * from_end,
- const char * & from_next,
- wchar_t * to,
- wchar_t * to_end,
- wchar_t * & to_next
-) const {
- // Basic algorithm: The first octet determines how many
- // octets total make up the UCS-4 character. The remaining
- // "continuing octets" all begin with "10". To convert, subtract
- // the amount that specifies the number of octets from the first
- // octet. Subtract 0x80 (1000 0000) from each continuing octet,
- // then mash the whole lot together. Note that each continuing
- // octet only uses 6 bits as unique values, so only shift by
- // multiples of 6 to combine.
- while (from != from_end && to != to_end) {
-
- // Error checking on the first octet
- if (invalid_leading_octet(*from)){
- from_next = from;
- to_next = to;
- return std::codecvt_base::error;
- }
-
- // The first octet is adjusted by a value dependent upon
- // the number of "continuing octets" encoding the character
- const int cont_octet_count = get_cont_octet_count(*from);
- const wchar_t octet1_modifier_table[] = {
- 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc
- };
-
- // The unsigned char conversion is necessary in case char is
- // signed (I learned this the hard way)
- wchar_t ucs_result =
- (unsigned char)(*from++) - octet1_modifier_table[cont_octet_count];
-
- // Invariants :
- // 1) At the start of the loop, 'i' continuing characters have been
- // processed
- // 2) *from points to the next continuing character to be processed.
- int i = 0;
- while(i != cont_octet_count && from != from_end) {
-
- // Error checking on continuing characters
- if (invalid_continuing_octet(*from)) {
- from_next = from;
- to_next = to;
- return std::codecvt_base::error;
- }
-
- ucs_result *= (1 << 6);
-
- // each continuing character has an extra (10xxxxxx)b attached to
- // it that must be removed.
- ucs_result += (unsigned char)(*from++) - 0x80;
- ++i;
- }
-
- // If the buffer ends with an incomplete unicode character...
- if (from == from_end && i != cont_octet_count) {
- // rewind "from" to before the current character translation
- from_next = from - (i+1);
- to_next = to;
- return std::codecvt_base::partial;
- }
- *to++ = ucs_result;
- }
- from_next = from;
- to_next = to;
-
- // Were we done converting or did we run out of destination space?
- if(from == from_end) return std::codecvt_base::ok;
- else return std::codecvt_base::partial;
-}
-
-std::codecvt_base::result utf8_codecvt_facet::do_out(
- std::mbstate_t& /*state*/,
- const wchar_t * from,
- const wchar_t * from_end,
- const wchar_t * & from_next,
- char * to,
- char * to_end,
- char * & to_next
-) const
-{
- // RG - consider merging this table with the other one
- const wchar_t octet1_modifier_table[] = {
- 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc
- };
-
- wchar_t max_wchar = (std::numeric_limits<wchar_t>::max)();
- while (from != from_end && to != to_end) {
-
- // Check for invalid UCS-4 character
- if (*from > max_wchar) {
- from_next = from;
- to_next = to;
- return std::codecvt_base::error;
- }
-
- int cont_octet_count = get_cont_octet_out_count(*from);
-
- // RG - comment this formula better
- int shift_exponent = (cont_octet_count) * 6;
-
- // Process the first character
- *to++ = static_cast<char>(octet1_modifier_table[cont_octet_count] +
- (unsigned char)(*from / (1 << shift_exponent)));
-
- // Process the continuation characters
- // Invariants: At the start of the loop:
- // 1) 'i' continuing octets have been generated
- // 2) '*to' points to the next location to place an octet
- // 3) shift_exponent is 6 more than needed for the next octet
- int i = 0;
- while (i != cont_octet_count && to != to_end) {
- shift_exponent -= 6;
- *to++ = static_cast<char>(0x80 + ((*from / (1 << shift_exponent)) % (1 << 6)));
- ++i;
- }
- // If we filled up the out buffer before encoding the character
- if(to == to_end && i != cont_octet_count) {
- from_next = from;
- to_next = to - (i+1);
- return std::codecvt_base::partial;
- }
- ++from;
- }
- from_next = from;
- to_next = to;
- // Were we done or did we run out of destination space
- if(from == from_end) return std::codecvt_base::ok;
- else return std::codecvt_base::partial;
-}
-
-// How many char objects can I process to get <= max_limit
-// wchar_t objects?
-int utf8_codecvt_facet::do_length(
- std::mbstate_t &,
- const char * from,
- const char * from_end,
- std::size_t max_limit
-) const
-#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
- throw()
-#endif
-{
- // RG - this code is confusing! I need a better way to express it.
- // and test cases.
-
- // Invariants:
- // 1) last_octet_count has the size of the last measured character
- // 2) char_count holds the number of characters shown to fit
- // within the bounds so far (no greater than max_limit)
- // 3) from_next points to the octet 'last_octet_count' before the
- // last measured character.
- int last_octet_count=0;
- std::size_t char_count = 0;
- const char* from_next = from;
- // Use "<" because the buffer may represent incomplete characters
- while (from_next+last_octet_count <= from_end && char_count <= max_limit) {
- from_next += last_octet_count;
- last_octet_count = (get_octet_count(*from_next));
- ++char_count;
- }
- return static_cast<int>(from_next-from);
-}
-
-unsigned int utf8_codecvt_facet::get_octet_count(
- unsigned char lead_octet
-){
- // if the 0-bit (MSB) is 0, then 1 character
- if (lead_octet <= 0x7f) return 1;
-
- // Otherwise the count number of consecutive 1 bits starting at MSB
-// assert(0xc0 <= lead_octet && lead_octet <= 0xfd);
-
- if (0xc0 <= lead_octet && lead_octet <= 0xdf) return 2;
- else if (0xe0 <= lead_octet && lead_octet <= 0xef) return 3;
- else if (0xf0 <= lead_octet && lead_octet <= 0xf7) return 4;
- else if (0xf8 <= lead_octet && lead_octet <= 0xfb) return 5;
- else return 6;
-}
-
-namespace detail {
-
-template<std::size_t s>
-int get_cont_octet_out_count_impl(wchar_t word){
- if (word < 0x80) {
- return 0;
- }
- if (word < 0x800) {
- return 1;
- }
- return 2;
-}
-
-template<>
-int get_cont_octet_out_count_impl<4>(wchar_t word){
- if (word < 0x80) {
- return 0;
- }
- if (word < 0x800) {
- return 1;
- }
-
- // Note that the following code will generate warnings on some platforms
- // where wchar_t is defined as UCS2. The warnings are superfluous as the
- // specialization is never instantitiated with such compilers, but this
- // can cause problems if warnings are being treated as errors, so we guard
- // against that. Including <boost/detail/utf8_codecvt_facet.hpp> as we do
- // should be enough to get WCHAR_MAX defined.
-#if !defined(WCHAR_MAX)
-# error WCHAR_MAX not defined!
-#endif
- // cope with VC++ 7.1 or earlier having invalid WCHAR_MAX
-#if defined(_MSC_VER) && _MSC_VER <= 1310 // 7.1 or earlier
- return 2;
-#elif WCHAR_MAX > 0x10000
-
- if (word < 0x10000) {
- return 2;
- }
- if (word < 0x200000) {
- return 3;
- }
- if (word < 0x4000000) {
- return 4;
- }
- return 5;
-
-#else
- return 2;
-#endif
-}
-
-} // namespace detail
-
-// How many "continuing octets" will be needed for this word
-// == total octets - 1.
-int utf8_codecvt_facet::get_cont_octet_out_count(
- wchar_t word
-) const {
- return detail::get_cont_octet_out_count_impl<sizeof(wchar_t)>(word);
-}
-BOOST_UTF8_END_NAMESPACE
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/dynamic_bitset/dynamic_bitset.hpp b/src/third_party/boost-1.68.0/boost/dynamic_bitset/dynamic_bitset.hpp
deleted file mode 100644
index 83fcb61a1ee..00000000000
--- a/src/third_party/boost-1.68.0/boost/dynamic_bitset/dynamic_bitset.hpp
+++ /dev/null
@@ -1,1970 +0,0 @@
-// -----------------------------------------------------------
-//
-// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
-// Copyright (c) 2003-2006, 2008 Gennaro Prota
-// Copyright (c) 2014 Ahmed Charles
-//
-// Copyright (c) 2014 Glen Joseph Fernandes
-// glenfe at live dot com
-// Copyright (c) 2014 Riccardo Marcangelo
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// -----------------------------------------------------------
-
-#ifndef BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP
-#define BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP
-
-#include <assert.h>
-#include <string>
-#include <stdexcept>
-#include <algorithm>
-#include <vector>
-#include <climits> // for CHAR_BIT
-
-#include "boost/dynamic_bitset/config.hpp"
-
-#ifndef BOOST_NO_STD_LOCALE
-# include <locale>
-#endif
-
-#if defined(BOOST_OLD_IOSTREAMS)
-# include <iostream.h>
-# include <ctype.h> // for isspace
-#else
-# include <istream>
-# include <ostream>
-#endif
-
-#include "boost/dynamic_bitset_fwd.hpp"
-#include "boost/detail/dynamic_bitset.hpp"
-#include "boost/detail/iterator.hpp" // used to implement append(Iter, Iter)
-#include "boost/move/move.hpp"
-#include "boost/limits.hpp"
-#include "boost/pending/lowest_bit.hpp"
-#include "boost/static_assert.hpp"
-#include "boost/utility/addressof.hpp"
-#include "boost/detail/no_exceptions_support.hpp"
-#include "boost/throw_exception.hpp"
-
-
-namespace boost {
-
-template <typename Block, typename Allocator>
-class dynamic_bitset
-{
- // Portability note: member function templates are defined inside
- // this class definition to avoid problems with VC++. Similarly,
- // with the member functions of nested classes.
- //
- // [October 2008: the note above is mostly historical; new versions
- // of VC++ are likely able to digest a more drinking form of the
- // code; but changing it now is probably not worth the risks...]
-
- BOOST_STATIC_ASSERT((bool)detail::dynamic_bitset_impl::allowed_block_type<Block>::value);
- typedef std::vector<Block, Allocator> buffer_type;
-
-public:
- typedef Block block_type;
- typedef Allocator allocator_type;
- typedef std::size_t size_type;
- typedef typename buffer_type::size_type block_width_type;
-
- BOOST_STATIC_CONSTANT(block_width_type, bits_per_block = (std::numeric_limits<Block>::digits));
- BOOST_STATIC_CONSTANT(size_type, npos = static_cast<size_type>(-1));
-
-
-public:
-
- // A proxy class to simulate lvalues of bit type.
- //
- class reference
- {
- friend class dynamic_bitset<Block, Allocator>;
-
-
- // the one and only non-copy ctor
- reference(block_type & b, block_width_type pos)
- :m_block(b),
- m_mask( (assert(pos < bits_per_block),
- block_type(1) << pos )
- )
- { }
-
- void operator&(); // left undefined
-
- public:
-
- // copy constructor: compiler generated
-
- operator bool() const { return (m_block & m_mask) != 0; }
- bool operator~() const { return (m_block & m_mask) == 0; }
-
- reference& flip() { do_flip(); return *this; }
-
- reference& operator=(bool x) { do_assign(x); return *this; } // for b[i] = x
- reference& operator=(const reference& rhs) { do_assign(rhs); return *this; } // for b[i] = b[j]
-
- reference& operator|=(bool x) { if (x) do_set(); return *this; }
- reference& operator&=(bool x) { if (!x) do_reset(); return *this; }
- reference& operator^=(bool x) { if (x) do_flip(); return *this; }
- reference& operator-=(bool x) { if (x) do_reset(); return *this; }
-
- private:
- block_type & m_block;
- const block_type m_mask;
-
- void do_set() { m_block |= m_mask; }
- void do_reset() { m_block &= ~m_mask; }
- void do_flip() { m_block ^= m_mask; }
- void do_assign(bool x) { x? do_set() : do_reset(); }
- };
-
- typedef bool const_reference;
-
- // constructors, etc.
- explicit
- dynamic_bitset(const Allocator& alloc = Allocator());
-
- explicit
- dynamic_bitset(size_type num_bits, unsigned long value = 0,
- const Allocator& alloc = Allocator());
-
-
- // WARNING: you should avoid using this constructor.
- //
- // A conversion from string is, in most cases, formatting,
- // and should be performed by using operator>>.
- //
- // NOTE:
- // Leave the parentheses around std::basic_string<CharT, Traits, Alloc>::npos.
- // g++ 3.2 requires them and probably the standard will - see core issue 325
- // NOTE 2:
- // split into two constructors because of bugs in MSVC 6.0sp5 with STLport
-
- template <typename CharT, typename Traits, typename Alloc>
- dynamic_bitset(const std::basic_string<CharT, Traits, Alloc>& s,
- typename std::basic_string<CharT, Traits, Alloc>::size_type pos,
- typename std::basic_string<CharT, Traits, Alloc>::size_type n,
- size_type num_bits = npos,
- const Allocator& alloc = Allocator())
-
- :m_bits(alloc),
- m_num_bits(0)
- {
- init_from_string(s, pos, n, num_bits);
- }
-
- template <typename CharT, typename Traits, typename Alloc>
- explicit
- dynamic_bitset(const std::basic_string<CharT, Traits, Alloc>& s,
- typename std::basic_string<CharT, Traits, Alloc>::size_type pos = 0)
-
- :m_bits(Allocator()),
- m_num_bits(0)
- {
- init_from_string(s, pos, (std::basic_string<CharT, Traits, Alloc>::npos),
- npos);
- }
-
- // The first bit in *first is the least significant bit, and the
- // last bit in the block just before *last is the most significant bit.
- template <typename BlockInputIterator>
- dynamic_bitset(BlockInputIterator first, BlockInputIterator last,
- const Allocator& alloc = Allocator())
-
- :m_bits(alloc),
- m_num_bits(0)
- {
- using boost::detail::dynamic_bitset_impl::value_to_type;
- using boost::detail::dynamic_bitset_impl::is_numeric;
-
- const value_to_type<
- is_numeric<BlockInputIterator>::value> selector;
-
- dispatch_init(first, last, selector);
- }
-
- template <typename T>
- void dispatch_init(T num_bits, unsigned long value,
- detail::dynamic_bitset_impl::value_to_type<true>)
- {
- init_from_unsigned_long(static_cast<size_type>(num_bits), value);
- }
-
- template <typename T>
- void dispatch_init(T first, T last,
- detail::dynamic_bitset_impl::value_to_type<false>)
- {
- init_from_block_range(first, last);
- }
-
- template <typename BlockIter>
- void init_from_block_range(BlockIter first, BlockIter last)
- {
- assert(m_bits.size() == 0);
- m_bits.insert(m_bits.end(), first, last);
- m_num_bits = m_bits.size() * bits_per_block;
- }
-
- // copy constructor
- dynamic_bitset(const dynamic_bitset& b);
-
- ~dynamic_bitset();
-
- void swap(dynamic_bitset& b);
- dynamic_bitset& operator=(const dynamic_bitset& b);
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- dynamic_bitset(dynamic_bitset&& src);
- dynamic_bitset& operator=(dynamic_bitset&& src);
-#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
-
- allocator_type get_allocator() const;
-
- // size changing operations
- void resize(size_type num_bits, bool value = false);
- void clear();
- void push_back(bool bit);
- void pop_back();
- void append(Block block);
-
- template <typename BlockInputIterator>
- void m_append(BlockInputIterator first, BlockInputIterator last, std::input_iterator_tag)
- {
- std::vector<Block, Allocator> v(first, last);
- m_append(v.begin(), v.end(), std::random_access_iterator_tag());
- }
- template <typename BlockInputIterator>
- void m_append(BlockInputIterator first, BlockInputIterator last, std::forward_iterator_tag)
- {
- assert(first != last);
- block_width_type r = count_extra_bits();
- std::size_t d = boost::detail::distance(first, last);
- m_bits.reserve(num_blocks() + d);
- if (r == 0) {
- for( ; first != last; ++first)
- m_bits.push_back(*first); // could use vector<>::insert()
- }
- else {
- m_highest_block() |= (*first << r);
- do {
- Block b = *first >> (bits_per_block - r);
- ++first;
- m_bits.push_back(b | (first==last? 0 : *first << r));
- } while (first != last);
- }
- m_num_bits += bits_per_block * d;
- }
- template <typename BlockInputIterator>
- void append(BlockInputIterator first, BlockInputIterator last) // strong guarantee
- {
- if (first != last) {
- typename detail::iterator_traits<BlockInputIterator>::iterator_category cat;
- m_append(first, last, cat);
- }
- }
-
-
- // bitset operations
- dynamic_bitset& operator&=(const dynamic_bitset& b);
- dynamic_bitset& operator|=(const dynamic_bitset& b);
- dynamic_bitset& operator^=(const dynamic_bitset& b);
- dynamic_bitset& operator-=(const dynamic_bitset& b);
- dynamic_bitset& operator<<=(size_type n);
- dynamic_bitset& operator>>=(size_type n);
- dynamic_bitset operator<<(size_type n) const;
- dynamic_bitset operator>>(size_type n) const;
-
- // basic bit operations
- dynamic_bitset& set(size_type n, bool val = true);
- dynamic_bitset& set();
- dynamic_bitset& reset(size_type n);
- dynamic_bitset& reset();
- dynamic_bitset& flip(size_type n);
- dynamic_bitset& flip();
- bool test(size_type n) const;
- bool test_set(size_type n, bool val = true);
- bool all() const;
- bool any() const;
- bool none() const;
- dynamic_bitset operator~() const;
- size_type count() const BOOST_NOEXCEPT;
-
- // subscript
- reference operator[](size_type pos) {
- return reference(m_bits[block_index(pos)], bit_index(pos));
- }
- bool operator[](size_type pos) const { return test(pos); }
-
- unsigned long to_ulong() const;
-
- size_type size() const BOOST_NOEXCEPT;
- size_type num_blocks() const BOOST_NOEXCEPT;
- size_type max_size() const BOOST_NOEXCEPT;
- bool empty() const BOOST_NOEXCEPT;
- size_type capacity() const BOOST_NOEXCEPT;
- void reserve(size_type num_bits);
- void shrink_to_fit();
-
- bool is_subset_of(const dynamic_bitset& a) const;
- bool is_proper_subset_of(const dynamic_bitset& a) const;
- bool intersects(const dynamic_bitset & a) const;
-
- // lookup
- size_type find_first() const;
- size_type find_next(size_type pos) const;
-
-
-#if !defined BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS
- // lexicographical comparison
- template <typename B, typename A>
- friend bool operator==(const dynamic_bitset<B, A>& a,
- const dynamic_bitset<B, A>& b);
-
- template <typename B, typename A>
- friend bool operator<(const dynamic_bitset<B, A>& a,
- const dynamic_bitset<B, A>& b);
-
- template <typename B, typename A>
- friend bool oplessthan(const dynamic_bitset<B, A>& a,
- const dynamic_bitset<B, A>& b);
-
-
- template <typename B, typename A, typename BlockOutputIterator>
- friend void to_block_range(const dynamic_bitset<B, A>& b,
- BlockOutputIterator result);
-
- template <typename BlockIterator, typename B, typename A>
- friend void from_block_range(BlockIterator first, BlockIterator last,
- dynamic_bitset<B, A>& result);
-
-
- template <typename CharT, typename Traits, typename B, typename A>
- friend std::basic_istream<CharT, Traits>& operator>>(std::basic_istream<CharT, Traits>& is,
- dynamic_bitset<B, A>& b);
-
- template <typename B, typename A, typename stringT>
- friend void to_string_helper(const dynamic_bitset<B, A> & b, stringT & s, bool dump_all);
-
-
-#endif
-
-public:
- // forward declaration for optional zero-copy serialization support
- class serialize_impl;
- friend class serialize_impl;
-
-private:
- BOOST_STATIC_CONSTANT(block_width_type, ulong_width = std::numeric_limits<unsigned long>::digits);
-
- void m_zero_unused_bits();
- bool m_check_invariants() const;
-
- size_type m_do_find_from(size_type first_block) const;
-
- block_width_type count_extra_bits() const BOOST_NOEXCEPT { return bit_index(size()); }
- static size_type block_index(size_type pos) BOOST_NOEXCEPT { return pos / bits_per_block; }
- static block_width_type bit_index(size_type pos) BOOST_NOEXCEPT { return static_cast<block_width_type>(pos % bits_per_block); }
- static Block bit_mask(size_type pos) BOOST_NOEXCEPT { return Block(1) << bit_index(pos); }
-
- template <typename CharT, typename Traits, typename Alloc>
- void init_from_string(const std::basic_string<CharT, Traits, Alloc>& s,
- typename std::basic_string<CharT, Traits, Alloc>::size_type pos,
- typename std::basic_string<CharT, Traits, Alloc>::size_type n,
- size_type num_bits)
- {
- assert(pos <= s.size());
-
- typedef typename std::basic_string<CharT, Traits, Alloc> StrT;
- typedef typename StrT::traits_type Tr;
-
- const typename StrT::size_type rlen = (std::min)(n, s.size() - pos);
- const size_type sz = ( num_bits != npos? num_bits : rlen);
- m_bits.resize(calc_num_blocks(sz));
- m_num_bits = sz;
-
-
- BOOST_DYNAMIC_BITSET_CTYPE_FACET(CharT, fac, std::locale());
- const CharT one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
-
- const size_type m = num_bits < rlen ? num_bits : rlen;
- typename StrT::size_type i = 0;
- for( ; i < m; ++i) {
-
- const CharT c = s[(pos + m - 1) - i];
-
- assert( Tr::eq(c, one)
- || Tr::eq(c, BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0')) );
-
- if (Tr::eq(c, one))
- set(i);
-
- }
-
- }
-
- void init_from_unsigned_long(size_type num_bits,
- unsigned long value/*,
- const Allocator& alloc*/)
- {
-
- assert(m_bits.size() == 0);
-
- m_bits.resize(calc_num_blocks(num_bits));
- m_num_bits = num_bits;
-
- typedef unsigned long num_type;
- typedef boost::detail::dynamic_bitset_impl
- ::shifter<num_type, bits_per_block, ulong_width> shifter;
-
- //if (num_bits == 0)
- // return;
-
- // zero out all bits at pos >= num_bits, if any;
- // note that: num_bits == 0 implies value == 0
- if (num_bits < static_cast<size_type>(ulong_width)) {
- const num_type mask = (num_type(1) << num_bits) - 1;
- value &= mask;
- }
-
- typename buffer_type::iterator it = m_bits.begin();
- for( ; value; shifter::left_shift(value), ++it) {
- *it = static_cast<block_type>(value);
- }
-
- }
-
-
-
-BOOST_DYNAMIC_BITSET_PRIVATE:
-
- bool m_unchecked_test(size_type pos) const;
- static size_type calc_num_blocks(size_type num_bits);
-
- Block& m_highest_block();
- const Block& m_highest_block() const;
-
- buffer_type m_bits;
- size_type m_num_bits;
-
-
- class bit_appender;
- friend class bit_appender;
- class bit_appender {
- // helper for stream >>
- // Supplies to the lack of an efficient append at the less
- // significant end: bits are actually appended "at left" but
- // rearranged in the destructor. From the perspective of
- // client code everything works *as if* dynamic_bitset<> had
- // an append_at_right() function (eventually throwing the same
- // exceptions as push_back) except that the function is in fact
- // called bit_appender::do_append().
- //
- dynamic_bitset & bs;
- size_type n;
- Block mask;
- Block * current;
-
- // not implemented
- bit_appender(const bit_appender &);
- bit_appender & operator=(const bit_appender &);
-
- public:
- bit_appender(dynamic_bitset & r) : bs(r), n(0), mask(0), current(0) {}
- ~bit_appender() {
- // reverse the order of blocks, shift
- // if needed, and then resize
- //
- std::reverse(bs.m_bits.begin(), bs.m_bits.end());
- const block_width_type offs = bit_index(n);
- if (offs)
- bs >>= (bits_per_block - offs);
- bs.resize(n); // doesn't enlarge, so can't throw
- assert(bs.m_check_invariants());
- }
- inline void do_append(bool value) {
-
- if (mask == 0) {
- bs.append(Block(0));
- current = &bs.m_highest_block();
- mask = Block(1) << (bits_per_block - 1);
- }
-
- if(value)
- *current |= mask;
-
- mask /= 2;
- ++n;
- }
- size_type get_count() const { return n; }
- };
-
-};
-
-#if !defined BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-
-template <typename Block, typename Allocator>
-const typename dynamic_bitset<Block, Allocator>::block_width_type
-dynamic_bitset<Block, Allocator>::bits_per_block;
-
-template <typename Block, typename Allocator>
-const typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::npos;
-
-template <typename Block, typename Allocator>
-const typename dynamic_bitset<Block, Allocator>::block_width_type
-dynamic_bitset<Block, Allocator>::ulong_width;
-
-#endif
-
-// Global Functions:
-
-// comparison
-template <typename Block, typename Allocator>
-bool operator!=(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b);
-
-template <typename Block, typename Allocator>
-bool operator<=(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b);
-
-template <typename Block, typename Allocator>
-bool operator>(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b);
-
-template <typename Block, typename Allocator>
-bool operator>=(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b);
-
-// stream operators
-#ifdef BOOST_OLD_IOSTREAMS
-template <typename Block, typename Allocator>
-std::ostream& operator<<(std::ostream& os,
- const dynamic_bitset<Block, Allocator>& b);
-
-template <typename Block, typename Allocator>
-std::istream& operator>>(std::istream& is, dynamic_bitset<Block,Allocator>& b);
-#else
-template <typename CharT, typename Traits, typename Block, typename Allocator>
-std::basic_ostream<CharT, Traits>&
-operator<<(std::basic_ostream<CharT, Traits>& os,
- const dynamic_bitset<Block, Allocator>& b);
-
-template <typename CharT, typename Traits, typename Block, typename Allocator>
-std::basic_istream<CharT, Traits>&
-operator>>(std::basic_istream<CharT, Traits>& is,
- dynamic_bitset<Block, Allocator>& b);
-#endif
-
-// bitset operations
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-operator&(const dynamic_bitset<Block, Allocator>& b1,
- const dynamic_bitset<Block, Allocator>& b2);
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-operator|(const dynamic_bitset<Block, Allocator>& b1,
- const dynamic_bitset<Block, Allocator>& b2);
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-operator^(const dynamic_bitset<Block, Allocator>& b1,
- const dynamic_bitset<Block, Allocator>& b2);
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-operator-(const dynamic_bitset<Block, Allocator>& b1,
- const dynamic_bitset<Block, Allocator>& b2);
-
-// namespace scope swap
-template<typename Block, typename Allocator>
-void swap(dynamic_bitset<Block, Allocator>& b1,
- dynamic_bitset<Block, Allocator>& b2);
-
-
-template <typename Block, typename Allocator, typename stringT>
-void
-to_string(const dynamic_bitset<Block, Allocator>& b, stringT & s);
-
-template <typename Block, typename Allocator, typename BlockOutputIterator>
-void
-to_block_range(const dynamic_bitset<Block, Allocator>& b,
- BlockOutputIterator result);
-
-
-template <typename BlockIterator, typename B, typename A>
-inline void
-from_block_range(BlockIterator first, BlockIterator last,
- dynamic_bitset<B, A>& result)
-{
- // PRE: distance(first, last) <= numblocks()
- std::copy (first, last, result.m_bits.begin());
-}
-
-//=============================================================================
-// dynamic_bitset implementation
-
-
-//-----------------------------------------------------------------------------
-// constructors, etc.
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>::dynamic_bitset(const Allocator& alloc)
- : m_bits(alloc), m_num_bits(0)
-{
-
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>::
-dynamic_bitset(size_type num_bits, unsigned long value, const Allocator& alloc)
- : m_bits(alloc),
- m_num_bits(0)
-{
- init_from_unsigned_long(num_bits, value);
-}
-
-// copy constructor
-template <typename Block, typename Allocator>
-inline dynamic_bitset<Block, Allocator>::
-dynamic_bitset(const dynamic_bitset& b)
- : m_bits(b.m_bits), m_num_bits(b.m_num_bits)
-{
-
-}
-
-template <typename Block, typename Allocator>
-inline dynamic_bitset<Block, Allocator>::
-~dynamic_bitset()
-{
- assert(m_check_invariants());
-}
-
-template <typename Block, typename Allocator>
-inline void dynamic_bitset<Block, Allocator>::
-swap(dynamic_bitset<Block, Allocator>& b) // no throw
-{
- std::swap(m_bits, b.m_bits);
- std::swap(m_num_bits, b.m_num_bits);
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>& dynamic_bitset<Block, Allocator>::
-operator=(const dynamic_bitset<Block, Allocator>& b)
-{
- m_bits = b.m_bits;
- m_num_bits = b.m_num_bits;
- return *this;
-}
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template <typename Block, typename Allocator>
-inline dynamic_bitset<Block, Allocator>::
-dynamic_bitset(dynamic_bitset<Block, Allocator>&& b)
- : m_bits(boost::move(b.m_bits)), m_num_bits(boost::move(b.m_num_bits))
-{
- // Required so that assert(m_check_invariants()); works.
- assert((b.m_bits = buffer_type()).empty());
- b.m_num_bits = 0;
-}
-
-template <typename Block, typename Allocator>
-inline dynamic_bitset<Block, Allocator>& dynamic_bitset<Block, Allocator>::
-operator=(dynamic_bitset<Block, Allocator>&& b)
-{
- if (boost::addressof(b) == this) { return *this; }
-
- m_bits = boost::move(b.m_bits);
- m_num_bits = boost::move(b.m_num_bits);
- // Required so that assert(m_check_invariants()); works.
- assert((b.m_bits = buffer_type()).empty());
- b.m_num_bits = 0;
- return *this;
-}
-
-#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template <typename Block, typename Allocator>
-inline typename dynamic_bitset<Block, Allocator>::allocator_type
-dynamic_bitset<Block, Allocator>::get_allocator() const
-{
- return m_bits.get_allocator();
-}
-
-//-----------------------------------------------------------------------------
-// size changing operations
-
-template <typename Block, typename Allocator>
-void dynamic_bitset<Block, Allocator>::
-resize(size_type num_bits, bool value) // strong guarantee
-{
-
- const size_type old_num_blocks = num_blocks();
- const size_type required_blocks = calc_num_blocks(num_bits);
-
- const block_type v = value? ~Block(0) : Block(0);
-
- if (required_blocks != old_num_blocks) {
- m_bits.resize(required_blocks, v); // s.g. (copy)
- }
-
-
- // At this point:
- //
- // - if the buffer was shrunk, we have nothing more to do,
- // except a call to m_zero_unused_bits()
- //
- // - if it was enlarged, all the (used) bits in the new blocks have
- // the correct value, but we have not yet touched those bits, if
- // any, that were 'unused bits' before enlarging: if value == true,
- // they must be set.
-
- if (value && (num_bits > m_num_bits)) {
-
- const block_width_type extra_bits = count_extra_bits();
- if (extra_bits) {
- assert(old_num_blocks >= 1 && old_num_blocks <= m_bits.size());
-
- // Set them.
- m_bits[old_num_blocks - 1] |= (v << extra_bits);
- }
-
- }
-
- m_num_bits = num_bits;
- m_zero_unused_bits();
-
-}
-
-template <typename Block, typename Allocator>
-void dynamic_bitset<Block, Allocator>::
-clear() // no throw
-{
- m_bits.clear();
- m_num_bits = 0;
-}
-
-
-template <typename Block, typename Allocator>
-void dynamic_bitset<Block, Allocator>::
-push_back(bool bit)
-{
- const size_type sz = size();
- resize(sz + 1);
- set(sz, bit);
-}
-
-template <typename Block, typename Allocator>
-void dynamic_bitset<Block, Allocator>::
-pop_back()
-{
- const size_type old_num_blocks = num_blocks();
- const size_type required_blocks = calc_num_blocks(m_num_bits - 1);
-
- if (required_blocks != old_num_blocks) {
- m_bits.pop_back();
- }
-
- --m_num_bits;
- m_zero_unused_bits();
-}
-
-
-template <typename Block, typename Allocator>
-void dynamic_bitset<Block, Allocator>::
-append(Block value) // strong guarantee
-{
- const block_width_type r = count_extra_bits();
-
- if (r == 0) {
- // the buffer is empty, or all blocks are filled
- m_bits.push_back(value);
- }
- else {
- m_bits.push_back(value >> (bits_per_block - r));
- m_bits[m_bits.size() - 2] |= (value << r); // m_bits.size() >= 2
- }
-
- m_num_bits += bits_per_block;
- assert(m_check_invariants());
-
-}
-
-
-//-----------------------------------------------------------------------------
-// bitset operations
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::operator&=(const dynamic_bitset& rhs)
-{
- assert(size() == rhs.size());
- for (size_type i = 0; i < num_blocks(); ++i)
- m_bits[i] &= rhs.m_bits[i];
- return *this;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::operator|=(const dynamic_bitset& rhs)
-{
- assert(size() == rhs.size());
- for (size_type i = 0; i < num_blocks(); ++i)
- m_bits[i] |= rhs.m_bits[i];
- //m_zero_unused_bits();
- return *this;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::operator^=(const dynamic_bitset& rhs)
-{
- assert(size() == rhs.size());
- for (size_type i = 0; i < this->num_blocks(); ++i)
- m_bits[i] ^= rhs.m_bits[i];
- //m_zero_unused_bits();
- return *this;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::operator-=(const dynamic_bitset& rhs)
-{
- assert(size() == rhs.size());
- for (size_type i = 0; i < num_blocks(); ++i)
- m_bits[i] &= ~rhs.m_bits[i];
- //m_zero_unused_bits();
- return *this;
-}
-
-//
-// NOTE:
-// Note that the 'if (r != 0)' is crucial to avoid undefined
-// behavior when the left hand operand of >> isn't promoted to a
-// wider type (because rs would be too large).
-//
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::operator<<=(size_type n)
-{
- if (n >= m_num_bits)
- return reset();
- //else
- if (n > 0) {
-
- size_type const last = num_blocks() - 1; // num_blocks() is >= 1
- size_type const div = n / bits_per_block; // div is <= last
- block_width_type const r = bit_index(n);
- block_type * const b = &m_bits[0];
-
- if (r != 0) {
-
- block_width_type const rs = bits_per_block - r;
-
- for (size_type i = last-div; i>0; --i) {
- b[i+div] = (b[i] << r) | (b[i-1] >> rs);
- }
- b[div] = b[0] << r;
-
- }
- else {
- for (size_type i = last-div; i>0; --i) {
- b[i+div] = b[i];
- }
- b[div] = b[0];
- }
-
- // zero out div blocks at the less significant end
- std::fill_n(m_bits.begin(), div, static_cast<block_type>(0));
-
- // zero out any 1 bit that flowed into the unused part
- m_zero_unused_bits(); // thanks to Lester Gong
-
- }
-
- return *this;
-
-
-}
-
-
-//
-// NOTE:
-// see the comments to operator <<=
-//
-template <typename B, typename A>
-dynamic_bitset<B, A> & dynamic_bitset<B, A>::operator>>=(size_type n) {
- if (n >= m_num_bits) {
- return reset();
- }
- //else
- if (n>0) {
-
- size_type const last = num_blocks() - 1; // num_blocks() is >= 1
- size_type const div = n / bits_per_block; // div is <= last
- block_width_type const r = bit_index(n);
- block_type * const b = &m_bits[0];
-
-
- if (r != 0) {
-
- block_width_type const ls = bits_per_block - r;
-
- for (size_type i = div; i < last; ++i) {
- b[i-div] = (b[i] >> r) | (b[i+1] << ls);
- }
- // r bits go to zero
- b[last-div] = b[last] >> r;
- }
-
- else {
- for (size_type i = div; i <= last; ++i) {
- b[i-div] = b[i];
- }
- // note the '<=': the last iteration 'absorbs'
- // b[last-div] = b[last] >> 0;
- }
-
-
-
- // div blocks are zero filled at the most significant end
- std::fill_n(m_bits.begin() + (num_blocks()-div), div, static_cast<block_type>(0));
- }
-
- return *this;
-}
-
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-dynamic_bitset<Block, Allocator>::operator<<(size_type n) const
-{
- dynamic_bitset r(*this);
- return r <<= n;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-dynamic_bitset<Block, Allocator>::operator>>(size_type n) const
-{
- dynamic_bitset r(*this);
- return r >>= n;
-}
-
-
-//-----------------------------------------------------------------------------
-// basic bit operations
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::set(size_type pos, bool val)
-{
- assert(pos < m_num_bits);
-
- if (val)
- m_bits[block_index(pos)] |= bit_mask(pos);
- else
- reset(pos);
-
- return *this;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::set()
-{
- std::fill(m_bits.begin(), m_bits.end(), static_cast<Block>(~0));
- m_zero_unused_bits();
- return *this;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::reset(size_type pos)
-{
- assert(pos < m_num_bits);
-#if defined __MWERKS__ && BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x
- // CodeWarrior 8 generates incorrect code when the &=~ is compiled,
- // use the |^ variation instead.. <grafik>
- m_bits[block_index(pos)] |= bit_mask(pos);
- m_bits[block_index(pos)] ^= bit_mask(pos);
-#else
- m_bits[block_index(pos)] &= ~bit_mask(pos);
-#endif
- return *this;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::reset()
-{
- std::fill(m_bits.begin(), m_bits.end(), Block(0));
- return *this;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::flip(size_type pos)
-{
- assert(pos < m_num_bits);
- m_bits[block_index(pos)] ^= bit_mask(pos);
- return *this;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>&
-dynamic_bitset<Block, Allocator>::flip()
-{
- for (size_type i = 0; i < num_blocks(); ++i)
- m_bits[i] = ~m_bits[i];
- m_zero_unused_bits();
- return *this;
-}
-
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::m_unchecked_test(size_type pos) const
-{
- return (m_bits[block_index(pos)] & bit_mask(pos)) != 0;
-}
-
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::test(size_type pos) const
-{
- assert(pos < m_num_bits);
- return m_unchecked_test(pos);
-}
-
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::test_set(size_type pos, bool val)
-{
- bool const b = test(pos);
- if (b != val) {
- set(pos, val);
- }
- return b;
-}
-
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::all() const
-{
- if (empty()) {
- return true;
- }
-
- const block_width_type extra_bits = count_extra_bits();
- block_type const all_ones = static_cast<Block>(~0);
-
- if (extra_bits == 0) {
- for (size_type i = 0, e = num_blocks(); i < e; ++i) {
- if (m_bits[i] != all_ones) {
- return false;
- }
- }
- } else {
- for (size_type i = 0, e = num_blocks() - 1; i < e; ++i) {
- if (m_bits[i] != all_ones) {
- return false;
- }
- }
- const block_type mask = (block_type(1) << extra_bits) - 1;
- if (m_highest_block() != mask) {
- return false;
- }
- }
- return true;
-}
-
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::any() const
-{
- for (size_type i = 0; i < num_blocks(); ++i)
- if (m_bits[i])
- return true;
- return false;
-}
-
-template <typename Block, typename Allocator>
-inline bool dynamic_bitset<Block, Allocator>::none() const
-{
- return !any();
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-dynamic_bitset<Block, Allocator>::operator~() const
-{
- dynamic_bitset b(*this);
- b.flip();
- return b;
-}
-
-template <typename Block, typename Allocator>
-typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::count() const BOOST_NOEXCEPT
-{
- using detail::dynamic_bitset_impl::table_width;
- using detail::dynamic_bitset_impl::access_by_bytes;
- using detail::dynamic_bitset_impl::access_by_blocks;
- using detail::dynamic_bitset_impl::value_to_type;
-
-#if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 3)
- // NOTE: Explicit qualification of "bits_per_block"
- // breaks compilation on gcc 4.3.3
- enum { no_padding = bits_per_block == CHAR_BIT * sizeof(Block) };
-#else
- // NOTE: Explicitly qualifying "bits_per_block" to workaround
- // regressions of gcc 3.4.x
- enum { no_padding =
- dynamic_bitset<Block, Allocator>::bits_per_block
- == CHAR_BIT * sizeof(Block) };
-#endif
-
- enum { enough_table_width = table_width >= CHAR_BIT };
-
- enum { mode = (no_padding && enough_table_width)
- ? access_by_bytes
- : access_by_blocks };
-
- return do_count(m_bits.begin(), num_blocks(), Block(0),
- static_cast<value_to_type<(bool)mode> *>(0));
-}
-
-
-//-----------------------------------------------------------------------------
-// conversions
-
-
-template <typename B, typename A, typename stringT>
-void to_string_helper(const dynamic_bitset<B, A> & b, stringT & s,
- bool dump_all)
-{
- typedef typename stringT::traits_type Tr;
- typedef typename stringT::value_type Ch;
-
- BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, std::locale());
- const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
- const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
-
- // Note that this function may access (when
- // dump_all == true) bits beyond position size() - 1
-
- typedef typename dynamic_bitset<B, A>::size_type size_type;
-
- const size_type len = dump_all?
- dynamic_bitset<B, A>::bits_per_block * b.num_blocks():
- b.size();
- s.assign (len, zero);
-
- for (size_type i = 0; i < len; ++i) {
- if (b.m_unchecked_test(i))
- Tr::assign(s[len - 1 - i], one);
-
- }
-
-}
-
-
-// A comment similar to the one about the constructor from
-// basic_string can be done here. Thanks to James Kanze for
-// making me (Gennaro) realize this important separation of
-// concerns issue, as well as many things about i18n.
-//
-template <typename Block, typename Allocator, typename stringT>
-inline void
-to_string(const dynamic_bitset<Block, Allocator>& b, stringT& s)
-{
- to_string_helper(b, s, false);
-}
-
-
-// Differently from to_string this function dumps out
-// every bit of the internal representation (may be
-// useful for debugging purposes)
-//
-template <typename B, typename A, typename stringT>
-inline void
-dump_to_string(const dynamic_bitset<B, A>& b, stringT& s)
-{
- to_string_helper(b, s, true /* =dump_all*/);
-}
-
-template <typename Block, typename Allocator, typename BlockOutputIterator>
-inline void
-to_block_range(const dynamic_bitset<Block, Allocator>& b,
- BlockOutputIterator result)
-{
- // note how this copies *all* bits, including the
- // unused ones in the last block (which are zero)
- std::copy(b.m_bits.begin(), b.m_bits.end(), result);
-}
-
-template <typename Block, typename Allocator>
-unsigned long dynamic_bitset<Block, Allocator>::
-to_ulong() const
-{
-
- if (m_num_bits == 0)
- return 0; // convention
-
- // Check for overflows. This may be a performance burden on very
- // large bitsets but is required by the specification, sorry
- if (find_next(ulong_width - 1) != npos)
- BOOST_THROW_EXCEPTION(std::overflow_error("boost::dynamic_bitset::to_ulong overflow"));
-
-
- // Ok, from now on we can be sure there's no "on" bit
- // beyond the "allowed" positions
- typedef unsigned long result_type;
-
- const size_type maximum_size =
- (std::min)(m_num_bits, static_cast<size_type>(ulong_width));
-
- const size_type last_block = block_index( maximum_size - 1 );
-
- assert((last_block * bits_per_block) < static_cast<size_type>(ulong_width));
-
- result_type result = 0;
- for (size_type i = 0; i <= last_block; ++i) {
- const size_type offset = i * bits_per_block;
- result |= (static_cast<result_type>(m_bits[i]) << offset);
- }
-
- return result;
-}
-
-template <typename Block, typename Allocator>
-inline typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::size() const BOOST_NOEXCEPT
-{
- return m_num_bits;
-}
-
-template <typename Block, typename Allocator>
-inline typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::num_blocks() const BOOST_NOEXCEPT
-{
- return m_bits.size();
-}
-
-template <typename Block, typename Allocator>
-inline typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::max_size() const BOOST_NOEXCEPT
-{
- // Semantics of vector<>::max_size() aren't very clear
- // (see lib issue 197) and many library implementations
- // simply return dummy values, _unrelated_ to the underlying
- // allocator.
- //
- // Given these problems, I was tempted to not provide this
- // function at all but the user could need it if he provides
- // his own allocator.
- //
-
- const size_type m = detail::dynamic_bitset_impl::
- vector_max_size_workaround(m_bits);
-
- return m <= (size_type(-1)/bits_per_block) ?
- m * bits_per_block :
- size_type(-1);
-}
-
-template <typename Block, typename Allocator>
-inline bool dynamic_bitset<Block, Allocator>::empty() const BOOST_NOEXCEPT
-{
- return size() == 0;
-}
-
-template <typename Block, typename Allocator>
-inline typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::capacity() const BOOST_NOEXCEPT
-{
- return m_bits.capacity() * bits_per_block;
-}
-
-template <typename Block, typename Allocator>
-inline void dynamic_bitset<Block, Allocator>::reserve(size_type num_bits)
-{
- m_bits.reserve(calc_num_blocks(num_bits));
-}
-
-template <typename Block, typename Allocator>
-void dynamic_bitset<Block, Allocator>::shrink_to_fit()
-{
- if (m_bits.size() < m_bits.capacity()) {
- buffer_type(m_bits).swap(m_bits);
- }
-}
-
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::
-is_subset_of(const dynamic_bitset<Block, Allocator>& a) const
-{
- assert(size() == a.size());
- for (size_type i = 0; i < num_blocks(); ++i)
- if (m_bits[i] & ~a.m_bits[i])
- return false;
- return true;
-}
-
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::
-is_proper_subset_of(const dynamic_bitset<Block, Allocator>& a) const
-{
- assert(size() == a.size());
- assert(num_blocks() == a.num_blocks());
-
- bool proper = false;
- for (size_type i = 0; i < num_blocks(); ++i) {
- const Block & bt = m_bits[i];
- const Block & ba = a.m_bits[i];
-
- if (bt & ~ba)
- return false; // not a subset at all
- if (ba & ~bt)
- proper = true;
- }
- return proper;
-}
-
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::intersects(const dynamic_bitset & b) const
-{
- size_type common_blocks = num_blocks() < b.num_blocks()
- ? num_blocks() : b.num_blocks();
-
- for(size_type i = 0; i < common_blocks; ++i) {
- if(m_bits[i] & b.m_bits[i])
- return true;
- }
- return false;
-}
-
-// --------------------------------
-// lookup
-
-
-// look for the first bit "on", starting
-// from the block with index first_block
-//
-template <typename Block, typename Allocator>
-typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::m_do_find_from(size_type first_block) const
-{
- size_type i = first_block;
-
- // skip null blocks
- while (i < num_blocks() && m_bits[i] == 0)
- ++i;
-
- if (i >= num_blocks())
- return npos; // not found
-
- return i * bits_per_block + static_cast<size_type>(boost::lowest_bit(m_bits[i]));
-
-}
-
-
-template <typename Block, typename Allocator>
-typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::find_first() const
-{
- return m_do_find_from(0);
-}
-
-
-template <typename Block, typename Allocator>
-typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::find_next(size_type pos) const
-{
-
- const size_type sz = size();
- if (pos >= (sz-1) || sz == 0)
- return npos;
-
- ++pos;
-
- const size_type blk = block_index(pos);
- const block_width_type ind = bit_index(pos);
-
- // shift bits upto one immediately after current
- const Block fore = m_bits[blk] >> ind;
-
- return fore?
- pos + static_cast<size_type>(lowest_bit(fore))
- :
- m_do_find_from(blk + 1);
-
-}
-
-
-
-//-----------------------------------------------------------------------------
-// comparison
-
-template <typename Block, typename Allocator>
-bool operator==(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b)
-{
- return (a.m_num_bits == b.m_num_bits)
- && (a.m_bits == b.m_bits);
-}
-
-template <typename Block, typename Allocator>
-inline bool operator!=(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b)
-{
- return !(a == b);
-}
-
-template <typename Block, typename Allocator>
-bool operator<(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b)
-{
-// assert(a.size() == b.size());
-
- typedef BOOST_DEDUCED_TYPENAME dynamic_bitset<Block, Allocator>::size_type size_type;
-
- size_type asize(a.size());
- size_type bsize(b.size());
-
- if (!bsize)
- {
- return false;
- }
- else if (!asize)
- {
- return true;
- }
- else if (asize == bsize)
- {
- for (size_type ii = a.num_blocks(); ii > 0; --ii)
- {
- size_type i = ii-1;
- if (a.m_bits[i] < b.m_bits[i])
- return true;
- else if (a.m_bits[i] > b.m_bits[i])
- return false;
- }
- return false;
- }
- else
- {
-
- size_type leqsize(std::min BOOST_PREVENT_MACRO_SUBSTITUTION(asize,bsize));
-
- for (size_type ii = 0; ii < leqsize; ++ii,--asize,--bsize)
- {
- size_type i = asize-1;
- size_type j = bsize-1;
- if (a[i] < b[j])
- return true;
- else if (a[i] > b[j])
- return false;
- }
- return (a.size() < b.size());
- }
-}
-
-template <typename Block, typename Allocator>
-bool oplessthan(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b)
-{
-// assert(a.size() == b.size());
-
- typedef BOOST_DEDUCED_TYPENAME dynamic_bitset<Block, Allocator>::size_type size_type;
-
- size_type asize(a.num_blocks());
- size_type bsize(b.num_blocks());
- assert(asize == 3);
- assert(bsize == 4);
-
- if (!bsize)
- {
- return false;
- }
- else if (!asize)
- {
- return true;
- }
- else
- {
-
- size_type leqsize(std::min BOOST_PREVENT_MACRO_SUBSTITUTION(asize,bsize));
- assert(leqsize == 3);
-
- //if (a.size() == 0)
- // return false;
-
- // Since we are storing the most significant bit
- // at pos == size() - 1, we need to do the comparisons in reverse.
- //
- for (size_type ii = 0; ii < leqsize; ++ii,--asize,--bsize)
- {
- size_type i = asize-1;
- size_type j = bsize-1;
- if (a.m_bits[i] < b.m_bits[j])
- return true;
- else if (a.m_bits[i] > b.m_bits[j])
- return false;
- }
- return (a.num_blocks() < b.num_blocks());
- }
-}
-
-template <typename Block, typename Allocator>
-inline bool operator<=(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b)
-{
- return !(a > b);
-}
-
-template <typename Block, typename Allocator>
-inline bool operator>(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b)
-{
- return b < a;
-}
-
-template <typename Block, typename Allocator>
-inline bool operator>=(const dynamic_bitset<Block, Allocator>& a,
- const dynamic_bitset<Block, Allocator>& b)
-{
- return !(a < b);
-}
-
-//-----------------------------------------------------------------------------
-// stream operations
-
-#ifdef BOOST_OLD_IOSTREAMS
-template < typename Block, typename Alloc>
-std::ostream&
-operator<<(std::ostream& os, const dynamic_bitset<Block, Alloc>& b)
-{
- // NOTE: since this is aimed at "classic" iostreams, exception
- // masks on the stream are not supported. The library that
- // ships with gcc 2.95 has an exceptions() member function but
- // nothing is actually implemented; not even the class ios::failure.
-
- using namespace std;
-
- const ios::iostate ok = ios::goodbit;
- ios::iostate err = ok;
-
- if (os.opfx()) {
-
- //try
- typedef typename dynamic_bitset<Block, Alloc>::size_type bitsetsize_type;
-
- const bitsetsize_type sz = b.size();
- std::streambuf * buf = os.rdbuf();
- size_t npad = os.width() <= 0 // careful: os.width() is signed (and can be < 0)
- || (bitsetsize_type) os.width() <= sz? 0 : os.width() - sz;
-
- const char fill_char = os.fill();
- const ios::fmtflags adjustfield = os.flags() & ios::adjustfield;
-
- // if needed fill at left; pad is decresed along the way
- if (adjustfield != ios::left) {
- for (; 0 < npad; --npad)
- if (fill_char != buf->sputc(fill_char)) {
- err |= ios::failbit;
- break;
- }
- }
-
- if (err == ok) {
- // output the bitset
- for (bitsetsize_type i = b.size(); 0 < i; --i) {
- const char dig = b.test(i-1)? '1' : '0';
- if (EOF == buf->sputc(dig)) {
- err |= ios::failbit;
- break;
- }
- }
- }
-
- if (err == ok) {
- // if needed fill at right
- for (; 0 < npad; --npad) {
- if (fill_char != buf->sputc(fill_char)) {
- err |= ios::failbit;
- break;
- }
- }
- }
-
- os.osfx();
- os.width(0);
-
- } // if opfx
-
- if(err != ok)
- os.setstate(err); // assume this does NOT throw
- return os;
-
-}
-#else
-
-template <typename Ch, typename Tr, typename Block, typename Alloc>
-std::basic_ostream<Ch, Tr>&
-operator<<(std::basic_ostream<Ch, Tr>& os,
- const dynamic_bitset<Block, Alloc>& b)
-{
-
- using namespace std;
-
- const ios_base::iostate ok = ios_base::goodbit;
- ios_base::iostate err = ok;
-
- typename basic_ostream<Ch, Tr>::sentry cerberos(os);
- if (cerberos) {
-
- BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, os.getloc());
- const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
- const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
-
- BOOST_TRY {
-
- typedef typename dynamic_bitset<Block, Alloc>::size_type bitset_size_type;
- typedef basic_streambuf<Ch, Tr> buffer_type;
-
- buffer_type * buf = os.rdbuf();
- // careful: os.width() is signed (and can be < 0)
- const bitset_size_type width = (os.width() <= 0) ? 0 : static_cast<bitset_size_type>(os.width());
- streamsize npad = (width <= b.size()) ? 0 : width - b.size();
-
- const Ch fill_char = os.fill();
- const ios_base::fmtflags adjustfield = os.flags() & ios_base::adjustfield;
-
- // if needed fill at left; pad is decreased along the way
- if (adjustfield != ios_base::left) {
- for (; 0 < npad; --npad)
- if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) {
- err |= ios_base::failbit;
- break;
- }
- }
-
- if (err == ok) {
- // output the bitset
- for (bitset_size_type i = b.size(); 0 < i; --i) {
- typename buffer_type::int_type
- ret = buf->sputc(b.test(i-1)? one : zero);
- if (Tr::eq_int_type(Tr::eof(), ret)) {
- err |= ios_base::failbit;
- break;
- }
- }
- }
-
- if (err == ok) {
- // if needed fill at right
- for (; 0 < npad; --npad) {
- if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) {
- err |= ios_base::failbit;
- break;
- }
- }
- }
-
-
- os.width(0);
-
- } BOOST_CATCH (...) { // see std 27.6.1.1/4
- bool rethrow = false;
- BOOST_TRY { os.setstate(ios_base::failbit); } BOOST_CATCH (...) { rethrow = true; } BOOST_CATCH_END
-
- if (rethrow)
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- if(err != ok)
- os.setstate(err); // may throw exception
- return os;
-
-}
-#endif
-
-
-#ifdef BOOST_OLD_IOSTREAMS
-
- // A sentry-like class that calls isfx in its destructor.
- // "Necessary" because bit_appender::do_append may throw.
- class pseudo_sentry {
- std::istream & m_r;
- const bool m_ok;
- public:
- explicit pseudo_sentry(std::istream & r) : m_r(r), m_ok(r.ipfx(0)) { }
- ~pseudo_sentry() { m_r.isfx(); }
- operator bool() const { return m_ok; }
- };
-
-template <typename Block, typename Alloc>
-std::istream&
-operator>>(std::istream& is, dynamic_bitset<Block, Alloc>& b)
-{
-
-// Extractor for classic IO streams (libstdc++ < 3.0)
-// ----------------------------------------------------//
-// It's assumed that the stream buffer functions, and
-// the stream's setstate() _cannot_ throw.
-
-
- typedef dynamic_bitset<Block, Alloc> bitset_type;
- typedef typename bitset_type::size_type size_type;
-
- std::ios::iostate err = std::ios::goodbit;
- pseudo_sentry cerberos(is); // skips whitespaces
- if(cerberos) {
-
- b.clear();
-
- const std::streamsize w = is.width();
- const size_type limit = w > 0 && static_cast<size_type>(w) < b.max_size()
- ? static_cast<size_type>(w) : b.max_size();
- typename bitset_type::bit_appender appender(b);
- std::streambuf * buf = is.rdbuf();
- for(int c = buf->sgetc(); appender.get_count() < limit; c = buf->snextc() ) {
-
- if (c == EOF) {
- err |= std::ios::eofbit;
- break;
- }
- else if (char(c) != '0' && char(c) != '1')
- break; // non digit character
-
- else {
- BOOST_TRY {
- appender.do_append(char(c) == '1');
- }
- BOOST_CATCH(...) {
- is.setstate(std::ios::failbit); // assume this can't throw
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
- } // for
- }
-
- is.width(0);
- if (b.size() == 0)
- err |= std::ios::failbit;
- if (err != std::ios::goodbit)
- is.setstate (err); // may throw
-
- return is;
-}
-
-#else // BOOST_OLD_IOSTREAMS
-
-template <typename Ch, typename Tr, typename Block, typename Alloc>
-std::basic_istream<Ch, Tr>&
-operator>>(std::basic_istream<Ch, Tr>& is, dynamic_bitset<Block, Alloc>& b)
-{
-
- using namespace std;
-
- typedef dynamic_bitset<Block, Alloc> bitset_type;
- typedef typename bitset_type::size_type size_type;
-
- const streamsize w = is.width();
- const size_type limit = 0 < w && static_cast<size_type>(w) < b.max_size()?
- static_cast<size_type>(w) : b.max_size();
-
- ios_base::iostate err = ios_base::goodbit;
- typename basic_istream<Ch, Tr>::sentry cerberos(is); // skips whitespaces
- if(cerberos) {
-
- // in accordance with prop. resol. of lib DR 303 [last checked 4 Feb 2004]
- BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, is.getloc());
- const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
- const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
-
- b.clear();
- BOOST_TRY {
- typename bitset_type::bit_appender appender(b);
- basic_streambuf <Ch, Tr> * buf = is.rdbuf();
- typename Tr::int_type c = buf->sgetc();
- for( ; appender.get_count() < limit; c = buf->snextc() ) {
-
- if (Tr::eq_int_type(Tr::eof(), c)) {
- err |= ios_base::eofbit;
- break;
- }
- else {
- const Ch to_c = Tr::to_char_type(c);
- const bool is_one = Tr::eq(to_c, one);
-
- if (!is_one && !Tr::eq(to_c, zero))
- break; // non digit character
-
- appender.do_append(is_one);
-
- }
-
- } // for
- }
- BOOST_CATCH (...) {
- // catches from stream buf, or from vector:
- //
- // bits_stored bits have been extracted and stored, and
- // either no further character is extractable or we can't
- // append to the underlying vector (out of memory)
-
- bool rethrow = false; // see std 27.6.1.1/4
- BOOST_TRY { is.setstate(ios_base::badbit); }
- BOOST_CATCH(...) { rethrow = true; }
- BOOST_CATCH_END
-
- if (rethrow)
- BOOST_RETHROW;
-
- }
- BOOST_CATCH_END
- }
-
- is.width(0);
- if (b.size() == 0 /*|| !cerberos*/)
- err |= ios_base::failbit;
- if (err != ios_base::goodbit)
- is.setstate (err); // may throw
-
- return is;
-
-}
-
-
-#endif
-
-
-//-----------------------------------------------------------------------------
-// bitset operations
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-operator&(const dynamic_bitset<Block, Allocator>& x,
- const dynamic_bitset<Block, Allocator>& y)
-{
- dynamic_bitset<Block, Allocator> b(x);
- return b &= y;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-operator|(const dynamic_bitset<Block, Allocator>& x,
- const dynamic_bitset<Block, Allocator>& y)
-{
- dynamic_bitset<Block, Allocator> b(x);
- return b |= y;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-operator^(const dynamic_bitset<Block, Allocator>& x,
- const dynamic_bitset<Block, Allocator>& y)
-{
- dynamic_bitset<Block, Allocator> b(x);
- return b ^= y;
-}
-
-template <typename Block, typename Allocator>
-dynamic_bitset<Block, Allocator>
-operator-(const dynamic_bitset<Block, Allocator>& x,
- const dynamic_bitset<Block, Allocator>& y)
-{
- dynamic_bitset<Block, Allocator> b(x);
- return b -= y;
-}
-
-//-----------------------------------------------------------------------------
-// namespace scope swap
-
-template<typename Block, typename Allocator>
-inline void
-swap(dynamic_bitset<Block, Allocator>& left,
- dynamic_bitset<Block, Allocator>& right) // no throw
-{
- left.swap(right);
-}
-
-
-//-----------------------------------------------------------------------------
-// private (on conforming compilers) member functions
-
-
-template <typename Block, typename Allocator>
-inline typename dynamic_bitset<Block, Allocator>::size_type
-dynamic_bitset<Block, Allocator>::calc_num_blocks(size_type num_bits)
-{
- return num_bits / bits_per_block
- + static_cast<size_type>( num_bits % bits_per_block != 0 );
-}
-
-// gives a reference to the highest block
-//
-template <typename Block, typename Allocator>
-inline Block& dynamic_bitset<Block, Allocator>::m_highest_block()
-{
- return const_cast<Block &>
- (static_cast<const dynamic_bitset *>(this)->m_highest_block());
-}
-
-// gives a const-reference to the highest block
-//
-template <typename Block, typename Allocator>
-inline const Block& dynamic_bitset<Block, Allocator>::m_highest_block() const
-{
- assert(size() > 0 && num_blocks() > 0);
- return m_bits.back();
-}
-
-
-// If size() is not a multiple of bits_per_block
-// then not all the bits in the last block are used.
-// This function resets the unused bits (convenient
-// for the implementation of many member functions)
-//
-template <typename Block, typename Allocator>
-inline void dynamic_bitset<Block, Allocator>::m_zero_unused_bits()
-{
- assert (num_blocks() == calc_num_blocks(m_num_bits));
-
- // if != 0 this is the number of bits used in the last block
- const block_width_type extra_bits = count_extra_bits();
-
- if (extra_bits != 0)
- m_highest_block() &= (Block(1) << extra_bits) - 1;
-}
-
-// check class invariants
-template <typename Block, typename Allocator>
-bool dynamic_bitset<Block, Allocator>::m_check_invariants() const
-{
- const block_width_type extra_bits = count_extra_bits();
- if (extra_bits > 0) {
- const block_type mask = block_type(~0) << extra_bits;
- if ((m_highest_block() & mask) != 0)
- return false;
- }
- if (m_bits.size() > m_bits.capacity() || num_blocks() != calc_num_blocks(size()))
- return false;
-
- return true;
-
-}
-
-
-} // namespace boost
-
-
-#undef BOOST_BITSET_CHAR
-
-#endif // include guard
-
diff --git a/src/third_party/boost-1.68.0/boost/exception/exception.hpp b/src/third_party/boost-1.68.0/boost/exception/exception.hpp
deleted file mode 100644
index c0fdaf9e552..00000000000
--- a/src/third_party/boost-1.68.0/boost/exception/exception.hpp
+++ /dev/null
@@ -1,521 +0,0 @@
-//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
-
-//Distributed under the Boost Software License, Version 1.0. (See accompanying
-//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593
-#define UUID_274DA366004E11DCB1DDFE2E56D89593
-#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
-#pragma GCC system_header
-#endif
-#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
-#pragma warning(push,1)
-#endif
-
-#ifdef BOOST_EXCEPTION_MINI_BOOST
-#include <memory>
-namespace boost { namespace exception_detail { using std::shared_ptr; } }
-#else
-namespace boost { template <class T> class shared_ptr; };
-namespace boost { namespace exception_detail { using boost::shared_ptr; } }
-#endif
-
-namespace
-boost
- {
- namespace
- exception_detail
- {
- template <class T>
- class
- refcount_ptr
- {
- public:
-
- refcount_ptr():
- px_(0)
- {
- }
-
- ~refcount_ptr()
- {
- release();
- }
-
- refcount_ptr( refcount_ptr const & x ):
- px_(x.px_)
- {
- add_ref();
- }
-
- refcount_ptr &
- operator=( refcount_ptr const & x )
- {
- adopt(x.px_);
- return *this;
- }
-
- void
- adopt( T * px )
- {
- release();
- px_=px;
- add_ref();
- }
-
- T *
- get() const
- {
- return px_;
- }
-
- private:
-
- T * px_;
-
- void
- add_ref()
- {
- if( px_ )
- px_->add_ref();
- }
-
- void
- release()
- {
- if( px_ && px_->release() )
- px_=0;
- }
- };
- }
-
- ////////////////////////////////////////////////////////////////////////
-
- template <class Tag,class T>
- class error_info;
-
- typedef error_info<struct throw_function_,char const *> throw_function;
- typedef error_info<struct throw_file_,char const *> throw_file;
- typedef error_info<struct throw_line_,int> throw_line;
-
- template <>
- class
- error_info<throw_function_,char const *>
- {
- public:
- typedef char const * value_type;
- value_type v_;
- explicit
- error_info( value_type v ):
- v_(v)
- {
- }
- };
-
- template <>
- class
- error_info<throw_file_,char const *>
- {
- public:
- typedef char const * value_type;
- value_type v_;
- explicit
- error_info( value_type v ):
- v_(v)
- {
- }
- };
-
- template <>
- class
- error_info<throw_line_,int>
- {
- public:
- typedef int value_type;
- value_type v_;
- explicit
- error_info( value_type v ):
- v_(v)
- {
- }
- };
-
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
-# endif
-#endif
- class exception;
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
-# endif
-#endif
-
- namespace
- exception_detail
- {
- class error_info_base;
- struct type_info_;
-
- struct
- error_info_container
- {
- virtual char const * diagnostic_information( char const * ) const = 0;
- virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0;
- virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0;
- virtual void add_ref() const = 0;
- virtual bool release() const = 0;
- virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0;
-
- protected:
-
- ~error_info_container() throw()
- {
- }
- };
-
- template <class>
- struct get_info;
-
- template <>
- struct get_info<throw_function>;
-
- template <>
- struct get_info<throw_file>;
-
- template <>
- struct get_info<throw_line>;
-
- template <class>
- struct set_info_rv;
-
- template <>
- struct set_info_rv<throw_function>;
-
- template <>
- struct set_info_rv<throw_file>;
-
- template <>
- struct set_info_rv<throw_line>;
-
- char const * get_diagnostic_information( exception const &, char const * );
-
- void copy_boost_exception( exception *, exception const * );
-
- template <class E,class Tag,class T>
- E const & set_info( E const &, error_info<Tag,T> const & );
-
- template <class E>
- E const & set_info( E const &, throw_function const & );
-
- template <class E>
- E const & set_info( E const &, throw_file const & );
-
- template <class E>
- E const & set_info( E const &, throw_line const & );
- }
-
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
-# endif
-#endif
- class
- exception
- {
- //<N3757>
- public:
- template <class Tag> void set( typename Tag::type const & );
- template <class Tag> typename Tag::type const * get() const;
- //</N3757>
-
- protected:
-
- exception():
- throw_function_(0),
- throw_file_(0),
- throw_line_(-1)
- {
- }
-
-#ifdef __HP_aCC
- //On HP aCC, this protected copy constructor prevents throwing boost::exception.
- //On all other platforms, the same effect is achieved by the pure virtual destructor.
- exception( exception const & x ) throw():
- data_(x.data_),
- throw_function_(x.throw_function_),
- throw_file_(x.throw_file_),
- throw_line_(x.throw_line_)
- {
- }
-#endif
-
- virtual ~exception() throw()
-#ifndef __HP_aCC
- = 0 //Workaround for HP aCC, =0 incorrectly leads to link errors.
-#endif
- ;
-
-#if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310)
- public:
-#else
- private:
-
- template <class E>
- friend E const & exception_detail::set_info( E const &, throw_function const & );
-
- template <class E>
- friend E const & exception_detail::set_info( E const &, throw_file const & );
-
- template <class E>
- friend E const & exception_detail::set_info( E const &, throw_line const & );
-
- template <class E,class Tag,class T>
- friend E const & exception_detail::set_info( E const &, error_info<Tag,T> const & );
-
- friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );
-
- template <class>
- friend struct exception_detail::get_info;
- friend struct exception_detail::get_info<throw_function>;
- friend struct exception_detail::get_info<throw_file>;
- friend struct exception_detail::get_info<throw_line>;
- template <class>
- friend struct exception_detail::set_info_rv;
- friend struct exception_detail::set_info_rv<throw_function>;
- friend struct exception_detail::set_info_rv<throw_file>;
- friend struct exception_detail::set_info_rv<throw_line>;
- friend void exception_detail::copy_boost_exception( exception *, exception const * );
-#endif
- mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
- mutable char const * throw_function_;
- mutable char const * throw_file_;
- mutable int throw_line_;
- };
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
-# endif
-#endif
-
- inline
- exception::
- ~exception() throw()
- {
- }
-
- namespace
- exception_detail
- {
- template <class E>
- E const &
- set_info( E const & x, throw_function const & y )
- {
- x.throw_function_=y.v_;
- return x;
- }
-
- template <class E>
- E const &
- set_info( E const & x, throw_file const & y )
- {
- x.throw_file_=y.v_;
- return x;
- }
-
- template <class E>
- E const &
- set_info( E const & x, throw_line const & y )
- {
- x.throw_line_=y.v_;
- return x;
- }
- }
-
- ////////////////////////////////////////////////////////////////////////
-
- namespace
- exception_detail
- {
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
-# endif
-#endif
- template <class T>
- struct
- error_info_injector:
- public T,
- public exception
- {
- explicit
- error_info_injector( T const & x ):
- T(x)
- {
- }
-
- ~error_info_injector() throw()
- {
- }
- };
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
-# endif
-#endif
-
- struct large_size { char c[256]; };
- large_size dispatch_boost_exception( exception const * );
-
- struct small_size { };
- small_size dispatch_boost_exception( void const * );
-
- template <class,int>
- struct enable_error_info_helper;
-
- template <class T>
- struct
- enable_error_info_helper<T,sizeof(large_size)>
- {
- typedef T type;
- };
-
- template <class T>
- struct
- enable_error_info_helper<T,sizeof(small_size)>
- {
- typedef error_info_injector<T> type;
- };
-
- template <class T>
- struct
- enable_error_info_return_type
- {
- typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception(static_cast<T *>(0)))>::type type;
- };
- }
-
- template <class T>
- inline
- typename
- exception_detail::enable_error_info_return_type<T>::type
- enable_error_info( T const & x )
- {
- typedef typename exception_detail::enable_error_info_return_type<T>::type rt;
- return rt(x);
- }
-
- ////////////////////////////////////////////////////////////////////////
-
- namespace
- exception_detail
- {
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
-# endif
-#endif
- class
- clone_base
- {
- public:
-
- virtual clone_base const * clone() const = 0;
- virtual void rethrow() const = 0;
-
- virtual
- ~clone_base() throw()
- {
- }
- };
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
-# endif
-#endif
-
- inline
- void
- copy_boost_exception( exception * a, exception const * b )
- {
- refcount_ptr<error_info_container> data;
- if( error_info_container * d=b->data_.get() )
- data = d->clone();
- a->throw_file_ = b->throw_file_;
- a->throw_line_ = b->throw_line_;
- a->throw_function_ = b->throw_function_;
- a->data_ = data;
- }
-
- inline
- void
- copy_boost_exception( void *, void const * )
- {
- }
-
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility push (default)
-# endif
-#endif
- template <class T>
- class
- clone_impl:
- public T,
- public virtual clone_base
- {
- struct clone_tag { };
- clone_impl( clone_impl const & x, clone_tag ):
- T(x)
- {
- copy_boost_exception(this,&x);
- }
-
- public:
-
- explicit
- clone_impl( T const & x ):
- T(x)
- {
- copy_boost_exception(this,&x);
- }
-
- ~clone_impl() throw()
- {
- }
-
- private:
-
- clone_base const *
- clone() const
- {
- return new clone_impl(*this,clone_tag());
- }
-
- void
- rethrow() const
- {
- throw*this;
- }
- };
- }
-#if defined(__GNUC__)
-# if (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
-# pragma GCC visibility pop
-# endif
-#endif
-
- template <class T>
- inline
- exception_detail::clone_impl<T>
- enable_current_exception( T const & x )
- {
- return exception_detail::clone_impl<T>(x);
- }
- }
-
-#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
-#pragma warning(pop)
-#endif
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/operations.hpp b/src/third_party/boost-1.68.0/boost/filesystem/operations.hpp
deleted file mode 100644
index b0ea42a308a..00000000000
--- a/src/third_party/boost-1.68.0/boost/filesystem/operations.hpp
+++ /dev/null
@@ -1,1357 +0,0 @@
-// boost/filesystem/operations.hpp ---------------------------------------------------//
-
-// Copyright Beman Dawes 2002-2009
-// Copyright Jan Langer 2002
-// Copyright Dietmar Kuehl 2001
-// Copyright Vladimir Prus 2002
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Library home page: http://www.boost.org/libs/filesystem
-
-//--------------------------------------------------------------------------------------//
-
-#ifndef BOOST_FILESYSTEM3_OPERATIONS_HPP
-#define BOOST_FILESYSTEM3_OPERATIONS_HPP
-
-#include <boost/config.hpp>
-
-# if defined( BOOST_NO_STD_WSTRING )
-# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
-# endif
-
-#include <boost/filesystem/config.hpp>
-#include <boost/filesystem/path.hpp>
-
-#include <boost/detail/scoped_enum_emulation.hpp>
-#include <boost/detail/bitmask.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/system/system_error.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/range/mutable_iterator.hpp>
-#include <boost/range/const_iterator.hpp>
-#include <boost/assert.hpp>
-#include <string>
-#include <utility> // for pair
-#include <ctime>
-#include <vector>
-#include <stack>
-
-#ifdef BOOST_WINDOWS_API
-# include <fstream>
-#endif
-
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
-//--------------------------------------------------------------------------------------//
-
-namespace boost
-{
- namespace filesystem
- {
-
- //--------------------------------------------------------------------------------------//
- // //
- // class filesystem_error //
- // //
- //--------------------------------------------------------------------------------------//
-
- class BOOST_SYMBOL_VISIBLE filesystem_error : public system::system_error
- {
- // see http://www.boost.org/more/error_handling.html for design rationale
-
- // all functions are inline to avoid issues with crossing dll boundaries
-
- // functions previously throw() are now BOOST_NOEXCEPT_OR_NOTHROW
- // functions previously without throw() are now BOOST_NOEXCEPT
-
- public:
- // compiler generates copy constructor and copy assignment
-
- filesystem_error(
- const std::string & what_arg, system::error_code ec) BOOST_NOEXCEPT
- : system::system_error(ec, what_arg)
- {
- try
- {
- m_imp_ptr.reset(new m_imp);
- }
- catch (...) { m_imp_ptr.reset(); }
- }
-
- filesystem_error(
- const std::string & what_arg, const path& path1_arg,
- system::error_code ec) BOOST_NOEXCEPT
- : system::system_error(ec, what_arg)
- {
- try
- {
- m_imp_ptr.reset(new m_imp);
- m_imp_ptr->m_path1 = path1_arg;
- }
- catch (...) { m_imp_ptr.reset(); }
- }
-
- filesystem_error(
- const std::string & what_arg, const path& path1_arg,
- const path& path2_arg, system::error_code ec) BOOST_NOEXCEPT
- : system::system_error(ec, what_arg)
- {
- try
- {
- m_imp_ptr.reset(new m_imp);
- m_imp_ptr->m_path1 = path1_arg;
- m_imp_ptr->m_path2 = path2_arg;
- }
- catch (...) { m_imp_ptr.reset(); }
- }
-
- ~filesystem_error() BOOST_NOEXCEPT_OR_NOTHROW{}
-
- const path& path1() const BOOST_NOEXCEPT
- {
- static const path empty_path;
- return m_imp_ptr.get() ? m_imp_ptr->m_path1 : empty_path;
- }
- const path& path2() const BOOST_NOEXCEPT
- {
- static const path empty_path;
- return m_imp_ptr.get() ? m_imp_ptr->m_path2 : empty_path;
- }
-
- const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- if (!m_imp_ptr.get())
- return system::system_error::what();
-
- try
- {
- if (m_imp_ptr->m_what.empty())
- {
- m_imp_ptr->m_what = system::system_error::what();
- if (!m_imp_ptr->m_path1.empty())
- {
- m_imp_ptr->m_what += ": \"";
- m_imp_ptr->m_what += m_imp_ptr->m_path1.string();
- m_imp_ptr->m_what += "\"";
- }
- if (!m_imp_ptr->m_path2.empty())
- {
- m_imp_ptr->m_what += ", \"";
- m_imp_ptr->m_what += m_imp_ptr->m_path2.string();
- m_imp_ptr->m_what += "\"";
- }
- }
- return m_imp_ptr->m_what.c_str();
- }
- catch (...)
- {
- return system::system_error::what();
- }
- }
-
- private:
- struct m_imp
- {
- path m_path1; // may be empty()
- path m_path2; // may be empty()
- std::string m_what; // not built until needed
- };
- boost::shared_ptr<m_imp> m_imp_ptr;
- };
-
-//--------------------------------------------------------------------------------------//
-// file_type //
-//--------------------------------------------------------------------------------------//
-
- enum file_type
- {
- status_error,
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- status_unknown = status_error,
-# endif
- file_not_found,
- regular_file,
- directory_file,
- // the following may not apply to some operating systems or file systems
- symlink_file,
- block_file,
- character_file,
- fifo_file,
- socket_file,
- reparse_file, // Windows: FILE_ATTRIBUTE_REPARSE_POINT that is not a symlink
- type_unknown, // file does exist, but isn't one of the above types or
- // we don't have strong enough permission to find its type
-
- _detail_directory_symlink // internal use only; never exposed to users
- };
-
-//--------------------------------------------------------------------------------------//
-// perms //
-//--------------------------------------------------------------------------------------//
-
- enum perms
- {
- no_perms = 0, // file_not_found is no_perms rather than perms_not_known
-
- // POSIX equivalent macros given in comments.
- // Values are from POSIX and are given in octal per the POSIX standard.
-
- // permission bits
-
- owner_read = 0400, // S_IRUSR, Read permission, owner
- owner_write = 0200, // S_IWUSR, Write permission, owner
- owner_exe = 0100, // S_IXUSR, Execute/search permission, owner
- owner_all = 0700, // S_IRWXU, Read, write, execute/search by owner
-
- group_read = 040, // S_IRGRP, Read permission, group
- group_write = 020, // S_IWGRP, Write permission, group
- group_exe = 010, // S_IXGRP, Execute/search permission, group
- group_all = 070, // S_IRWXG, Read, write, execute/search by group
-
- others_read = 04, // S_IROTH, Read permission, others
- others_write = 02, // S_IWOTH, Write permission, others
- others_exe = 01, // S_IXOTH, Execute/search permission, others
- others_all = 07, // S_IRWXO, Read, write, execute/search by others
-
- all_all = 0777, // owner_all|group_all|others_all
-
- // other POSIX bits
-
- set_uid_on_exe = 04000, // S_ISUID, Set-user-ID on execution
- set_gid_on_exe = 02000, // S_ISGID, Set-group-ID on execution
- sticky_bit = 01000, // S_ISVTX,
- // (POSIX XSI) On directories, restricted deletion flag
- // (V7) 'sticky bit': save swapped text even after use
- // (SunOS) On non-directories: don't cache this file
- // (SVID-v4.2) On directories: restricted deletion flag
- // Also see http://en.wikipedia.org/wiki/Sticky_bit
-
- perms_mask = 07777, // all_all|set_uid_on_exe|set_gid_on_exe|sticky_bit
-
- perms_not_known = 0xFFFF, // present when directory_entry cache not loaded
-
- // options for permissions() function
-
- add_perms = 0x1000, // adds the given permission bits to the current bits
- remove_perms = 0x2000, // removes the given permission bits from the current bits;
- // choose add_perms or remove_perms, not both; if neither add_perms
- // nor remove_perms is given, replace the current bits with
- // the given bits.
-
- symlink_perms = 0x4000 // on POSIX, don't resolve symlinks; implied on Windows
- };
-
- BOOST_BITMASK(perms)
-
-//--------------------------------------------------------------------------------------//
-// file_status //
-//--------------------------------------------------------------------------------------//
-
- class BOOST_FILESYSTEM_DECL file_status
- {
- public:
- file_status() BOOST_NOEXCEPT
- : m_value(status_error), m_perms(perms_not_known) {}
- explicit file_status(file_type v) BOOST_NOEXCEPT
- : m_value(v), m_perms(perms_not_known) {}
- file_status(file_type v, perms prms) BOOST_NOEXCEPT
- : m_value(v), m_perms(prms) {}
-
- // As of October 2015 the interaction between noexcept and =default is so troublesome
- // for VC++, GCC, and probably other compilers, that =default is not used with noexcept
- // functions. GCC is not even consistent for the same release on different platforms.
-
- file_status(const file_status& rhs) BOOST_NOEXCEPT
- : m_value(rhs.m_value), m_perms(rhs.m_perms) {}
- file_status& operator=(const file_status& rhs) BOOST_NOEXCEPT
- {
- m_value = rhs.m_value;
- m_perms = rhs.m_perms;
- return *this;
- }
-
-# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- file_status(file_status&& rhs) BOOST_NOEXCEPT
- {
- m_value = std::move(rhs.m_value);
- m_perms = std::move(rhs.m_perms);
- }
- file_status& operator=(file_status&& rhs) BOOST_NOEXCEPT
- {
- m_value = std::move(rhs.m_value);
- m_perms = std::move(rhs.m_perms);
- return *this;
- }
-# endif
-
-
- // observers
- file_type type() const BOOST_NOEXCEPT { return m_value; }
- perms permissions() const BOOST_NOEXCEPT { return m_perms; }
-
- // modifiers
- void type(file_type v) BOOST_NOEXCEPT { m_value = v; }
- void permissions(perms prms) BOOST_NOEXCEPT { m_perms = prms; }
-
- bool operator==(const file_status& rhs) const BOOST_NOEXCEPT
- { return type() == rhs.type() &&
- permissions() == rhs.permissions(); }
- bool operator!=(const file_status& rhs) const BOOST_NOEXCEPT
- { return !(*this == rhs); }
-
- private:
- file_type m_value;
- enum perms m_perms;
- };
-
- inline bool type_present(file_status f) BOOST_NOEXCEPT
- { return f.type() != status_error; }
- inline bool permissions_present(file_status f) BOOST_NOEXCEPT
- {return f.permissions() != perms_not_known;}
- inline bool status_known(file_status f) BOOST_NOEXCEPT
- { return type_present(f) && permissions_present(f); }
- inline bool exists(file_status f) BOOST_NOEXCEPT
- { return f.type() != status_error
- && f.type() != file_not_found; }
- inline bool is_regular_file(file_status f) BOOST_NOEXCEPT
- { return f.type() == regular_file; }
- inline bool is_directory(file_status f) BOOST_NOEXCEPT
- { return f.type() == directory_file; }
- inline bool is_symlink(file_status f) BOOST_NOEXCEPT
- { return f.type() == symlink_file; }
- inline bool is_other(file_status f) BOOST_NOEXCEPT
- { return exists(f) && !is_regular_file(f)
- && !is_directory(f) && !is_symlink(f); }
-
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- inline bool is_regular(file_status f) BOOST_NOEXCEPT { return f.type() == regular_file; }
-# endif
-
- struct space_info
- {
- // all values are byte counts
- boost::uintmax_t capacity;
- boost::uintmax_t free; // <= capacity
- boost::uintmax_t available; // <= free
- };
-
- BOOST_SCOPED_ENUM_START(copy_option)
- {none=0, fail_if_exists = none, overwrite_if_exists};
- BOOST_SCOPED_ENUM_END
-
-//--------------------------------------------------------------------------------------//
-// implementation details //
-//--------------------------------------------------------------------------------------//
-
- namespace detail
- {
- // We cannot pass a BOOST_SCOPED_ENUM to a compled function because it will result
- // in an undefined reference if the library is compled with -std=c++0x but the use
- // is compiled in C++03 mode, or visa versa. See tickets 6124, 6779, 10038.
- enum copy_option {none=0, fail_if_exists = none, overwrite_if_exists};
-
- BOOST_FILESYSTEM_DECL
- file_status status(const path&p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- file_status symlink_status(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- bool is_empty(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path initial_path(system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path canonical(const path& p, const path& base, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void copy(const path& from, const path& to, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void copy_directory(const path& from, const path& to, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void copy_file(const path& from, const path& to, // See ticket #2925
- detail::copy_option option, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void copy_symlink(const path& existing_symlink, const path& new_symlink, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- bool create_directories(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- bool create_directory(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void create_directory_symlink(const path& to, const path& from,
- system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void create_hard_link(const path& to, const path& from, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void create_symlink(const path& to, const path& from, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path current_path(system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void current_path(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- bool equivalent(const path& p1, const path& p2, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- boost::uintmax_t file_size(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- boost::uintmax_t hard_link_count(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- std::time_t last_write_time(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void last_write_time(const path& p, const std::time_t new_time,
- system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void permissions(const path& p, perms prms, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path read_symlink(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path relative(const path& p, const path& base, system::error_code* ec = 0);
- BOOST_FILESYSTEM_DECL
- bool remove(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- boost::uintmax_t remove_all(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void rename(const path& old_p, const path& new_p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- void resize_file(const path& p, uintmax_t size, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- space_info space(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path system_complete(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path temp_directory_path(system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path unique_path(const path& p, system::error_code* ec=0);
- BOOST_FILESYSTEM_DECL
- path weakly_canonical(const path& p, system::error_code* ec = 0);
- } // namespace detail
-
-//--------------------------------------------------------------------------------------//
-// //
-// status query functions //
-// //
-//--------------------------------------------------------------------------------------//
-
- inline
- file_status status(const path& p) {return detail::status(p);}
- inline
- file_status status(const path& p, system::error_code& ec)
- {return detail::status(p, &ec);}
- inline
- file_status symlink_status(const path& p) {return detail::symlink_status(p);}
- inline
- file_status symlink_status(const path& p, system::error_code& ec)
- {return detail::symlink_status(p, &ec);}
- inline
- bool exists(const path& p) {return exists(detail::status(p));}
- inline
- bool exists(const path& p, system::error_code& ec)
- {return exists(detail::status(p, &ec));}
- inline
- bool is_directory(const path& p) {return is_directory(detail::status(p));}
- inline
- bool is_directory(const path& p, system::error_code& ec)
- {return is_directory(detail::status(p, &ec));}
- inline
- bool is_regular_file(const path& p) {return is_regular_file(detail::status(p));}
- inline
- bool is_regular_file(const path& p, system::error_code& ec)
- {return is_regular_file(detail::status(p, &ec));}
- inline
- bool is_other(const path& p) {return is_other(detail::status(p));}
- inline
- bool is_other(const path& p, system::error_code& ec)
- {return is_other(detail::status(p, &ec));}
- inline
- bool is_symlink(const path& p) {return is_symlink(detail::symlink_status(p));}
- inline
- bool is_symlink(const path& p, system::error_code& ec)
- {return is_symlink(detail::symlink_status(p, &ec));}
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- inline
- bool is_regular(const path& p) {return is_regular(detail::status(p));}
- inline
- bool is_regular(const path& p, system::error_code& ec)
- {return is_regular(detail::status(p, &ec));}
-# endif
-
- inline
- bool is_empty(const path& p) {return detail::is_empty(p);}
- inline
- bool is_empty(const path& p, system::error_code& ec)
- {return detail::is_empty(p, &ec);}
-
-//--------------------------------------------------------------------------------------//
-// //
-// operational functions //
-// in alphabetical order, unless otherwise noted //
-// //
-//--------------------------------------------------------------------------------------//
-
- // forward declarations
- path current_path(); // fwd declaration
- path initial_path();
-
- BOOST_FILESYSTEM_DECL
- path absolute(const path& p, const path& base=current_path());
- // If base.is_absolute(), throws nothing. Thus no need for ec argument
-
- inline
- path canonical(const path& p, const path& base=current_path())
- {return detail::canonical(p, base);}
- inline
- path canonical(const path& p, system::error_code& ec)
- {return detail::canonical(p, current_path(), &ec);}
- inline
- path canonical(const path& p, const path& base, system::error_code& ec)
- {return detail::canonical(p, base, &ec);}
-
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- inline
- path complete(const path& p)
- {
- return absolute(p, initial_path());
- }
-
- inline
- path complete(const path& p, const path& base)
- {
- return absolute(p, base);
- }
-# endif
-
- inline
- void copy(const path& from, const path& to) {detail::copy(from, to);}
-
- inline
- void copy(const path& from, const path& to, system::error_code& ec) BOOST_NOEXCEPT
- {detail::copy(from, to, &ec);}
- inline
- void copy_directory(const path& from, const path& to)
- {detail::copy_directory(from, to);}
- inline
- void copy_directory(const path& from, const path& to, system::error_code& ec) BOOST_NOEXCEPT
- {detail::copy_directory(from, to, &ec);}
- inline
- void copy_file(const path& from, const path& to, // See ticket #2925
- BOOST_SCOPED_ENUM(copy_option) option)
- {
- detail::copy_file(from, to, static_cast<detail::copy_option>(option));
- }
- inline
- void copy_file(const path& from, const path& to)
- {
- detail::copy_file(from, to, detail::fail_if_exists);
- }
- inline
- void copy_file(const path& from, const path& to, // See ticket #2925
- BOOST_SCOPED_ENUM(copy_option) option, system::error_code& ec) BOOST_NOEXCEPT
- {
- detail::copy_file(from, to, static_cast<detail::copy_option>(option), &ec);
- }
- inline
- void copy_file(const path& from, const path& to, system::error_code& ec) BOOST_NOEXCEPT
- {
- detail::copy_file(from, to, detail::fail_if_exists, &ec);
- }
- inline
- void copy_symlink(const path& existing_symlink,
- const path& new_symlink) {detail::copy_symlink(existing_symlink, new_symlink);}
-
- inline
- void copy_symlink(const path& existing_symlink, const path& new_symlink,
- system::error_code& ec) BOOST_NOEXCEPT
- {detail::copy_symlink(existing_symlink, new_symlink, &ec);}
- inline
- bool create_directories(const path& p) {return detail::create_directories(p);}
-
- inline
- bool create_directories(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::create_directories(p, &ec);}
- inline
- bool create_directory(const path& p) {return detail::create_directory(p);}
-
- inline
- bool create_directory(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::create_directory(p, &ec);}
- inline
- void create_directory_symlink(const path& to, const path& from)
- {detail::create_directory_symlink(to, from);}
- inline
- void create_directory_symlink(const path& to, const path& from, system::error_code& ec) BOOST_NOEXCEPT
- {detail::create_directory_symlink(to, from, &ec);}
- inline
- void create_hard_link(const path& to, const path& new_hard_link) {detail::create_hard_link(to, new_hard_link);}
-
- inline
- void create_hard_link(const path& to, const path& new_hard_link, system::error_code& ec) BOOST_NOEXCEPT
- {detail::create_hard_link(to, new_hard_link, &ec);}
- inline
- void create_symlink(const path& to, const path& new_symlink) {detail::create_symlink(to, new_symlink);}
-
- inline
- void create_symlink(const path& to, const path& new_symlink, system::error_code& ec) BOOST_NOEXCEPT
- {detail::create_symlink(to, new_symlink, &ec);}
- inline
- path current_path() {return detail::current_path();}
-
- inline
- path current_path(system::error_code& ec) BOOST_NOEXCEPT {return detail::current_path(&ec);}
-
- inline
- void current_path(const path& p) {detail::current_path(p);}
-
- inline
- void current_path(const path& p, system::error_code& ec) BOOST_NOEXCEPT {detail::current_path(p, &ec);}
-
- inline
- bool equivalent(const path& p1, const path& p2) {return detail::equivalent(p1, p2);}
-
- inline
- bool equivalent(const path& p1, const path& p2, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::equivalent(p1, p2, &ec);}
- inline
- boost::uintmax_t file_size(const path& p) {return detail::file_size(p);}
-
- inline
- boost::uintmax_t file_size(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::file_size(p, &ec);}
- inline
- boost::uintmax_t hard_link_count(const path& p) {return detail::hard_link_count(p);}
-
- inline
- boost::uintmax_t hard_link_count(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::hard_link_count(p, &ec);}
- inline
- path initial_path() {return detail::initial_path();}
-
- inline
- path initial_path(system::error_code& ec) {return detail::initial_path(&ec);}
-
- template <class Path>
- path initial_path() {return initial_path();}
- template <class Path>
- path initial_path(system::error_code& ec) {return detail::initial_path(&ec);}
-
- inline
- std::time_t last_write_time(const path& p) {return detail::last_write_time(p);}
-
- inline
- std::time_t last_write_time(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::last_write_time(p, &ec);}
- inline
- void last_write_time(const path& p, const std::time_t new_time)
- {detail::last_write_time(p, new_time);}
- inline
- void last_write_time(const path& p, const std::time_t new_time,
- system::error_code& ec) BOOST_NOEXCEPT
- {detail::last_write_time(p, new_time, &ec);}
- inline
- void permissions(const path& p, perms prms)
- {detail::permissions(p, prms);}
- inline
- void permissions(const path& p, perms prms, system::error_code& ec) BOOST_NOEXCEPT
- {detail::permissions(p, prms, &ec);}
-
- inline
- path read_symlink(const path& p) {return detail::read_symlink(p);}
-
- inline
- path read_symlink(const path& p, system::error_code& ec)
- {return detail::read_symlink(p, &ec);}
- inline
- // For standardization, if the committee doesn't like "remove", consider "eliminate"
- bool remove(const path& p) {return detail::remove(p);}
-
- inline
- bool remove(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::remove(p, &ec);}
-
- inline
- boost::uintmax_t remove_all(const path& p) {return detail::remove_all(p);}
-
- inline
- boost::uintmax_t remove_all(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::remove_all(p, &ec);}
- inline
- void rename(const path& old_p, const path& new_p) {detail::rename(old_p, new_p);}
-
- inline
- void rename(const path& old_p, const path& new_p, system::error_code& ec) BOOST_NOEXCEPT
- {detail::rename(old_p, new_p, &ec);}
- inline // name suggested by Scott McMurray
- void resize_file(const path& p, uintmax_t size) {detail::resize_file(p, size);}
-
- inline
- void resize_file(const path& p, uintmax_t size, system::error_code& ec) BOOST_NOEXCEPT
- {detail::resize_file(p, size, &ec);}
- inline
- path relative(const path& p, const path& base=current_path())
- {return detail::relative(p, base);}
- inline
- path relative(const path& p, system::error_code& ec)
- {return detail::relative(p, current_path(), &ec);}
- inline
- path relative(const path& p, const path& base, system::error_code& ec)
- {return detail::relative(p, base, &ec);}
- inline
- space_info space(const path& p) {return detail::space(p);}
-
- inline
- space_info space(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- {return detail::space(p, &ec);}
-
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- inline bool symbolic_link_exists(const path& p)
- { return is_symlink(symlink_status(p)); }
-# endif
-
- inline
- path system_complete(const path& p) {return detail::system_complete(p);}
-
- inline
- path system_complete(const path& p, system::error_code& ec)
- {return detail::system_complete(p, &ec);}
- inline
- path temp_directory_path() {return detail::temp_directory_path();}
-
- inline
- path temp_directory_path(system::error_code& ec)
- {return detail::temp_directory_path(&ec);}
- inline
- path unique_path(const path& p="%%%%-%%%%-%%%%-%%%%")
- {return detail::unique_path(p);}
- inline
- path unique_path(const path& p, system::error_code& ec)
- {return detail::unique_path(p, &ec);}
- inline
- path weakly_canonical(const path& p) {return detail::weakly_canonical(p);}
-
- inline
- path weakly_canonical(const path& p, system::error_code& ec)
- {return detail::weakly_canonical(p, &ec);}
-
-//--------------------------------------------------------------------------------------//
-// //
-// directory_entry //
-// //
-//--------------------------------------------------------------------------------------//
-
-// GCC has a problem with a member function named path within a namespace or
-// sub-namespace that also has a class named path. The workaround is to always
-// fully qualify the name path when it refers to the class name.
-
-class BOOST_FILESYSTEM_DECL directory_entry
-{
-public:
- typedef boost::filesystem::path::value_type value_type; // enables class path ctor taking directory_entry
-
- directory_entry() BOOST_NOEXCEPT {}
- explicit directory_entry(const boost::filesystem::path& p)
- : m_path(p), m_status(file_status()), m_symlink_status(file_status())
- {}
- directory_entry(const boost::filesystem::path& p,
- file_status st, file_status symlink_st = file_status())
- : m_path(p), m_status(st), m_symlink_status(symlink_st) {}
-
- directory_entry(const directory_entry& rhs)
- : m_path(rhs.m_path), m_status(rhs.m_status), m_symlink_status(rhs.m_symlink_status){}
-
- directory_entry& operator=(const directory_entry& rhs)
- {
- m_path = rhs.m_path;
- m_status = rhs.m_status;
- m_symlink_status = rhs.m_symlink_status;
- return *this;
- }
-
- // As of October 2015 the interaction between noexcept and =default is so troublesome
- // for VC++, GCC, and probably other compilers, that =default is not used with noexcept
- // functions. GCC is not even consistent for the same release on different platforms.
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- directory_entry(directory_entry&& rhs) BOOST_NOEXCEPT
- {
- m_path = std::move(rhs.m_path);
- m_status = std::move(rhs.m_status);
- m_symlink_status = std::move(rhs.m_symlink_status);
- }
- directory_entry& operator=(directory_entry&& rhs) BOOST_NOEXCEPT
- {
- m_path = std::move(rhs.m_path);
- m_status = std::move(rhs.m_status);
- m_symlink_status = std::move(rhs.m_symlink_status);
- return *this;
- }
-#endif
-
- void assign(const boost::filesystem::path& p,
- file_status st = file_status(), file_status symlink_st = file_status())
- { m_path = p; m_status = st; m_symlink_status = symlink_st; }
-
- void replace_filename(const boost::filesystem::path& p,
- file_status st = file_status(), file_status symlink_st = file_status())
- {
- m_path.remove_filename();
- m_path /= p;
- m_status = st;
- m_symlink_status = symlink_st;
- }
-
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- void replace_leaf(const boost::filesystem::path& p,
- file_status st, file_status symlink_st)
- { replace_filename(p, st, symlink_st); }
-# endif
-
- const boost::filesystem::path& path() const BOOST_NOEXCEPT {return m_path;}
- operator const boost::filesystem::path&() const BOOST_NOEXCEPT
- {return m_path;}
- file_status status() const {return m_get_status();}
- file_status status(system::error_code& ec) const BOOST_NOEXCEPT
- {return m_get_status(&ec); }
- file_status symlink_status() const {return m_get_symlink_status();}
- file_status symlink_status(system::error_code& ec) const BOOST_NOEXCEPT
- {return m_get_symlink_status(&ec); }
-
- bool operator==(const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path == rhs.m_path; }
- bool operator!=(const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path != rhs.m_path;}
- bool operator< (const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path < rhs.m_path;}
- bool operator<=(const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path <= rhs.m_path;}
- bool operator> (const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path > rhs.m_path;}
- bool operator>=(const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path >= rhs.m_path;}
-
-private:
- boost::filesystem::path m_path;
- mutable file_status m_status; // stat()-like
- mutable file_status m_symlink_status; // lstat()-like
-
- file_status m_get_status(system::error_code* ec=0) const;
- file_status m_get_symlink_status(system::error_code* ec=0) const;
-}; // directory_entry
-
-//--------------------------------------------------------------------------------------//
-// //
-// directory_iterator helpers //
-// //
-//--------------------------------------------------------------------------------------//
-
-class directory_iterator;
-
-namespace detail
-{
- BOOST_FILESYSTEM_DECL
- system::error_code dir_itr_close(// never throws()
- void *& handle
-# if defined(BOOST_POSIX_API)
- , void *& buffer
-# endif
- );
-
- struct dir_itr_imp
- {
- directory_entry dir_entry;
- void* handle;
-
-# ifdef BOOST_POSIX_API
- void* buffer; // see dir_itr_increment implementation
-# endif
-
- dir_itr_imp() : handle(0)
-# ifdef BOOST_POSIX_API
- , buffer(0)
-# endif
- {}
-
- ~dir_itr_imp() // never throws
- {
- dir_itr_close(handle
-# if defined(BOOST_POSIX_API)
- , buffer
-# endif
- );
- }
- };
-
- // see path::iterator: comment below
- BOOST_FILESYSTEM_DECL void directory_iterator_construct(directory_iterator& it,
- const path& p, system::error_code* ec);
- BOOST_FILESYSTEM_DECL void directory_iterator_increment(directory_iterator& it,
- system::error_code* ec);
-
-} // namespace detail
-
-//--------------------------------------------------------------------------------------//
-// //
-// directory_iterator //
-// //
-//--------------------------------------------------------------------------------------//
-
- class directory_iterator
- : public boost::iterator_facade< directory_iterator,
- directory_entry,
- boost::single_pass_traversal_tag >
- {
- public:
-
- directory_iterator() BOOST_NOEXCEPT {} // creates the "end" iterator
-
- // iterator_facade derived classes don't seem to like implementations in
- // separate translation unit dll's, so forward to detail functions
- explicit directory_iterator(const path& p)
- : m_imp(new detail::dir_itr_imp)
- { detail::directory_iterator_construct(*this, p, 0); }
-
- directory_iterator(const path& p, system::error_code& ec) BOOST_NOEXCEPT
- : m_imp(new detail::dir_itr_imp)
- { detail::directory_iterator_construct(*this, p, &ec); }
-
- ~directory_iterator() {}
-
- directory_iterator& increment(system::error_code& ec) BOOST_NOEXCEPT
- {
- detail::directory_iterator_increment(*this, &ec);
- return *this;
- }
-
- private:
- friend struct detail::dir_itr_imp;
- friend BOOST_FILESYSTEM_DECL void detail::directory_iterator_construct(directory_iterator& it,
- const path& p, system::error_code* ec);
- friend BOOST_FILESYSTEM_DECL void detail::directory_iterator_increment(directory_iterator& it,
- system::error_code* ec);
-
- // shared_ptr provides the shallow-copy semantics required for single pass iterators
- // (i.e. InputIterators). The end iterator is indicated by !m_imp || !m_imp->handle
- boost::shared_ptr< detail::dir_itr_imp > m_imp;
-
- friend class boost::iterator_core_access;
-
- boost::iterator_facade<
- directory_iterator,
- directory_entry,
- boost::single_pass_traversal_tag >::reference dereference() const
- {
- BOOST_ASSERT_MSG(m_imp.get(), "attempt to dereference end iterator");
- return m_imp->dir_entry;
- }
-
- void increment() { detail::directory_iterator_increment(*this, 0); }
-
- bool equal(const directory_iterator& rhs) const
- {
- return m_imp == rhs.m_imp
- || (!m_imp && rhs.m_imp && !rhs.m_imp->handle)
- || (!rhs.m_imp && m_imp && !m_imp->handle);
- }
-
- }; // directory_iterator
-
- // enable directory_iterator C++11 range-base for statement use --------------------//
-
- // begin() and end() are only used by a range-based for statement in the context of
- // auto - thus the top-level const is stripped - so returning const is harmless and
- // emphasizes begin() is just a pass through.
- inline
- const directory_iterator& begin(const directory_iterator& iter) BOOST_NOEXCEPT
- {return iter;}
- inline
- directory_iterator end(const directory_iterator&) BOOST_NOEXCEPT
- {return directory_iterator();}
-
- // enable directory_iterator BOOST_FOREACH -----------------------------------------//
-
- inline
- directory_iterator& range_begin(directory_iterator& iter) BOOST_NOEXCEPT
- {return iter;}
- inline
- directory_iterator range_begin(const directory_iterator& iter) BOOST_NOEXCEPT
- {return iter;}
- inline
- directory_iterator range_end(const directory_iterator&) BOOST_NOEXCEPT
- {return directory_iterator();}
- } // namespace filesystem
-
- // namespace boost template specializations
- template<>
- struct range_mutable_iterator<boost::filesystem::directory_iterator>
- { typedef boost::filesystem::directory_iterator type; };
- template<>
- struct range_const_iterator <boost::filesystem::directory_iterator>
- { typedef boost::filesystem::directory_iterator type; };
-
-namespace filesystem
-{
-
-//--------------------------------------------------------------------------------------//
-// //
-// recursive_directory_iterator helpers //
-// //
-//--------------------------------------------------------------------------------------//
-
- BOOST_SCOPED_ENUM_START(symlink_option)
- {
- none,
- no_recurse = none, // don't follow directory symlinks (default behavior)
- recurse, // follow directory symlinks
- _detail_no_push = recurse << 1 // internal use only
- };
- BOOST_SCOPED_ENUM_END
-
- BOOST_BITMASK(BOOST_SCOPED_ENUM(symlink_option))
-
- namespace detail
- {
- struct recur_dir_itr_imp
- {
- typedef directory_iterator element_type;
- std::stack< element_type, std::vector< element_type > > m_stack;
- int m_level;
- BOOST_SCOPED_ENUM(symlink_option) m_options;
-
- recur_dir_itr_imp() : m_level(0), m_options(symlink_option::none) {}
-
- void increment(system::error_code* ec); // ec == 0 means throw on error
-
- bool push_directory(system::error_code& ec) BOOST_NOEXCEPT;
-
- void pop();
-
- };
-
- // Implementation is inline to avoid dynamic linking difficulties with m_stack:
- // Microsoft warning C4251, m_stack needs to have dll-interface to be used by
- // clients of struct 'boost::filesystem::detail::recur_dir_itr_imp'
-
- inline
- bool recur_dir_itr_imp::push_directory(system::error_code& ec) BOOST_NOEXCEPT
- // Returns: true if push occurs, otherwise false. Always returns false on error.
- {
- ec.clear();
-
- // Discover if the iterator is for a directory that needs to be recursed into,
- // taking symlinks and options into account.
-
- if ((m_options & symlink_option::_detail_no_push) == symlink_option::_detail_no_push)
- {
- m_options &= ~symlink_option::_detail_no_push;
- return false;
- }
-
- file_status symlink_stat;
-
- // if we are not recursing into symlinks, we are going to have to know if the
- // stack top is a symlink, so get symlink_status and verify no error occurred
- if ((m_options & symlink_option::recurse) != symlink_option::recurse)
- {
- symlink_stat = m_stack.top()->symlink_status(ec);
- if (ec)
- return false;
- }
-
- // Logic for following predicate was contributed by Daniel Aarno to handle cyclic
- // symlinks correctly and efficiently, fixing ticket #5652.
- // if (((m_options & symlink_option::recurse) == symlink_option::recurse
- // || !is_symlink(m_stack.top()->symlink_status()))
- // && is_directory(m_stack.top()->status())) ...
- // The predicate code has since been rewritten to pass error_code arguments,
- // per ticket #5653.
-
- if ((m_options & symlink_option::recurse) == symlink_option::recurse
- || !is_symlink(symlink_stat))
- {
- file_status stat = m_stack.top()->status(ec);
- if (ec || !is_directory(stat))
- return false;
-
- directory_iterator next(m_stack.top()->path(), ec);
- if (!ec && next != directory_iterator())
- {
- m_stack.push(next);
- ++m_level;
- return true;
- }
- }
- return false;
- }
-
- inline
- void recur_dir_itr_imp::increment(system::error_code* ec)
- // ec == 0 means throw on error
- //
- // Invariant: On return, the top of the iterator stack is the next valid (possibly
- // end) iterator, regardless of whether or not an error is reported, and regardless of
- // whether any error is reported by exception or error code. In other words, progress
- // is always made so a loop on the iterator will always eventually terminate
- // regardless of errors.
- {
- system::error_code ec_push_directory;
-
- // if various conditions are met, push a directory_iterator into the iterator stack
- if (push_directory(ec_push_directory))
- {
- if (ec)
- ec->clear();
- return;
- }
-
- // Do the actual increment operation on the top iterator in the iterator
- // stack, popping the stack if necessary, until either the stack is empty or a
- // non-end iterator is reached.
- while (!m_stack.empty() && ++m_stack.top() == directory_iterator())
- {
- m_stack.pop();
- --m_level;
- }
-
- // report errors if any
- if (ec_push_directory)
- {
- if (ec)
- *ec = ec_push_directory;
- else
- {
- BOOST_FILESYSTEM_THROW(filesystem_error(
- "filesystem::recursive_directory_iterator directory error",
- ec_push_directory));
- }
- }
- else if (ec)
- ec->clear();
- }
-
- inline
- void recur_dir_itr_imp::pop()
- {
- BOOST_ASSERT_MSG(m_level > 0,
- "pop() on recursive_directory_iterator with level < 1");
-
- do
- {
- m_stack.pop();
- --m_level;
- }
- while (!m_stack.empty() && ++m_stack.top() == directory_iterator());
- }
- } // namespace detail
-
-//--------------------------------------------------------------------------------------//
-// //
-// recursive_directory_iterator //
-// //
-//--------------------------------------------------------------------------------------//
-
- class recursive_directory_iterator
- : public boost::iterator_facade<
- recursive_directory_iterator,
- directory_entry,
- boost::single_pass_traversal_tag >
- {
- public:
-
- recursive_directory_iterator() BOOST_NOEXCEPT {} // creates the "end" iterator
-
- explicit recursive_directory_iterator(const path& dir_path) // throws if !exists()
- : m_imp(new detail::recur_dir_itr_imp)
- {
- m_imp->m_options = symlink_option::none;
- m_imp->m_stack.push(directory_iterator(dir_path));
- if (m_imp->m_stack.top() == directory_iterator())
- { m_imp.reset(); }
- }
-
- recursive_directory_iterator(const path& dir_path,
- BOOST_SCOPED_ENUM(symlink_option) opt) // throws if !exists()
- : m_imp(new detail::recur_dir_itr_imp)
- {
- m_imp->m_options = opt;
- m_imp->m_stack.push(directory_iterator(dir_path));
- if (m_imp->m_stack.top() == directory_iterator())
- { m_imp.reset (); }
- }
-
- recursive_directory_iterator(const path& dir_path,
- BOOST_SCOPED_ENUM(symlink_option) opt,
- system::error_code & ec) BOOST_NOEXCEPT
- : m_imp(new detail::recur_dir_itr_imp)
- {
- m_imp->m_options = opt;
- m_imp->m_stack.push(directory_iterator(dir_path, ec));
- if (m_imp->m_stack.top() == directory_iterator())
- { m_imp.reset (); }
- }
-
- recursive_directory_iterator(const path& dir_path,
- system::error_code & ec) BOOST_NOEXCEPT
- : m_imp(new detail::recur_dir_itr_imp)
- {
- m_imp->m_options = symlink_option::none;
- m_imp->m_stack.push(directory_iterator(dir_path, ec));
- if (m_imp->m_stack.top() == directory_iterator())
- { m_imp.reset (); }
- }
-
- recursive_directory_iterator& increment(system::error_code& ec) BOOST_NOEXCEPT
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "increment() on end recursive_directory_iterator");
- m_imp->increment(&ec);
- if (m_imp->m_stack.empty())
- m_imp.reset(); // done, so make end iterator
- return *this;
- }
-
- int depth() const BOOST_NOEXCEPT
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "depth() on end recursive_directory_iterator");
- return m_imp->m_level;
- }
-
- int level() const BOOST_NOEXCEPT { return depth(); }
-
- bool recursion_pending() const BOOST_NOEXCEPT
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "is_no_push_requested() on end recursive_directory_iterator");
- return (m_imp->m_options & symlink_option::_detail_no_push)
- == symlink_option::_detail_no_push;
- }
-
- bool no_push_pending() const BOOST_NOEXCEPT { return recursion_pending(); }
-
-# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
- bool no_push_request() const BOOST_NOEXCEPT { return no_push_pending(); }
-# endif
-
- void pop()
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "pop() on end recursive_directory_iterator");
- m_imp->pop();
- if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator
- }
-
- void disable_recursion_pending(bool value=true) BOOST_NOEXCEPT
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "no_push() on end recursive_directory_iterator");
- if (value)
- m_imp->m_options |= symlink_option::_detail_no_push;
- else
- m_imp->m_options &= ~symlink_option::_detail_no_push;
- }
-
- void no_push(bool value=true) BOOST_NOEXCEPT { disable_recursion_pending(value); }
-
- file_status status() const
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "status() on end recursive_directory_iterator");
- return m_imp->m_stack.top()->status();
- }
-
- file_status symlink_status() const
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "symlink_status() on end recursive_directory_iterator");
- return m_imp->m_stack.top()->symlink_status();
- }
-
- private:
-
- // shared_ptr provides the shallow-copy semantics required for single pass iterators
- // (i.e. InputIterators).
- // The end iterator is indicated by !m_imp || m_imp->m_stack.empty()
- boost::shared_ptr< detail::recur_dir_itr_imp > m_imp;
-
- friend class boost::iterator_core_access;
-
- boost::iterator_facade<
- recursive_directory_iterator,
- directory_entry,
- boost::single_pass_traversal_tag >::reference
- dereference() const
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "dereference of end recursive_directory_iterator");
- return *m_imp->m_stack.top();
- }
-
- void increment()
- {
- BOOST_ASSERT_MSG(m_imp.get(),
- "increment of end recursive_directory_iterator");
- m_imp->increment(0);
- if (m_imp->m_stack.empty())
- m_imp.reset(); // done, so make end iterator
- }
-
- bool equal(const recursive_directory_iterator& rhs) const
- {
- return m_imp == rhs.m_imp
- || (!m_imp && rhs.m_imp && rhs.m_imp->m_stack.empty())
- || (!rhs.m_imp && m_imp && m_imp->m_stack.empty()) ;
- }
-
- }; // recursive directory iterator
-
- // enable recursive directory iterator C++11 range-base for statement use ----------//
-
- // begin() and end() are only used by a range-based for statement in the context of
- // auto - thus the top-level const is stripped - so returning const is harmless and
- // emphasizes begin() is just a pass through.
- inline
- const recursive_directory_iterator&
- begin(const recursive_directory_iterator& iter) BOOST_NOEXCEPT
- {return iter;}
- inline
- recursive_directory_iterator end(const recursive_directory_iterator&) BOOST_NOEXCEPT
- {return recursive_directory_iterator();}
-
- // enable recursive directory iterator BOOST_FOREACH -------------------------------//
-
- inline
- recursive_directory_iterator&
- range_begin(recursive_directory_iterator& iter) BOOST_NOEXCEPT
- {return iter;}
- inline
- recursive_directory_iterator
- range_begin(const recursive_directory_iterator& iter) BOOST_NOEXCEPT
- {return iter;}
- inline
- recursive_directory_iterator range_end(const recursive_directory_iterator&) BOOST_NOEXCEPT
- {return recursive_directory_iterator();}
- } // namespace filesystem
-
- // namespace boost template specializations
- template<>
- struct range_mutable_iterator<boost::filesystem::recursive_directory_iterator>
- { typedef boost::filesystem::recursive_directory_iterator type; };
- template<>
- struct range_const_iterator <boost::filesystem::recursive_directory_iterator>
- { typedef boost::filesystem::recursive_directory_iterator type; };
-
-namespace filesystem
-{
-
-# if !defined(BOOST_FILESYSTEM_NO_DEPRECATED)
- typedef recursive_directory_iterator wrecursive_directory_iterator;
-# endif
-
-// test helper -----------------------------------------------------------------------//
-
-// Not part of the documented interface since false positives are possible;
-// there is no law that says that an OS that has large stat.st_size
-// actually supports large file sizes.
-
- namespace detail
- {
- BOOST_FILESYSTEM_DECL bool possible_large_file_size_support();
- }
-
- } // namespace filesystem
-} // namespace boost
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-#endif // BOOST_FILESYSTEM3_OPERATIONS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/function.hpp b/src/third_party/boost-1.68.0/boost/function.hpp
deleted file mode 100644
index 68a25ab0696..00000000000
--- a/src/third_party/boost-1.68.0/boost/function.hpp
+++ /dev/null
@@ -1,74 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2001-2003. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org/libs/function
-
-// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the
-// design of this library.
-
-#ifndef BOOST_FUNCTION_MAX_ARGS
-# define BOOST_FUNCTION_MAX_ARGS 10
-#endif // BOOST_FUNCTION_MAX_ARGS
-
-#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
-
-#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED)
-#define BOOST_FUNCTION_MAX_ARGS_DEFINED 0
-#endif
-
-#include <functional> // unary_function, binary_function
-
-#include <boost/preprocessor/iterate.hpp>
-#include <boost/detail/workaround.hpp>
-
-// Include the prologue here so that the use of file-level iteration
-// in anything that may be included by function_template.hpp doesn't break
-#include <boost/function/detail/prologue.hpp>
-
-// Older Visual Age C++ version do not handle the file iteration well
-#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800)
-# if BOOST_FUNCTION_MAX_ARGS >= 0
-# include <boost/function/function0.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 1
-# include <boost/function/function1.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 2
-# include <boost/function/function2.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 3
-# include <boost/function/function3.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 4
-# include <boost/function/function4.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 5
-# include <boost/function/function5.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 6
-# include <boost/function/function6.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 7
-# include <boost/function/function7.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 8
-# include <boost/function/function8.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 9
-# include <boost/function/function9.hpp>
-# endif
-# if BOOST_FUNCTION_MAX_ARGS >= 10
-# include <boost/function/function10.hpp>
-# endif
-#else
-// What is the '3' for?
-# define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,<boost/function/detail/function_iterate.hpp>))
-# include BOOST_PP_ITERATE()
-# undef BOOST_PP_ITERATION_PARAMS_1
-#endif
-
-#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
diff --git a/src/third_party/boost-1.68.0/boost/function/function_base.hpp b/src/third_party/boost-1.68.0/boost/function/function_base.hpp
deleted file mode 100644
index 841affb49a5..00000000000
--- a/src/third_party/boost-1.68.0/boost/function/function_base.hpp
+++ /dev/null
@@ -1,886 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2001-2006
-// Copyright Emil Dotchevski 2007
-// Use, modification and distribution is subject to the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-#ifndef BOOST_FUNCTION_BASE_HEADER
-#define BOOST_FUNCTION_BASE_HEADER
-
-#include <stdexcept>
-#include <string>
-#include <memory>
-#include <new>
-#include <boost/config.hpp>
-#include <boost/assert.hpp>
-#include <boost/integer.hpp>
-#include <boost/type_index.hpp>
-#include <boost/type_traits/has_trivial_copy.hpp>
-#include <boost/type_traits/has_trivial_destructor.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#include <boost/type_traits/composite_traits.hpp>
-#include <boost/ref.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#ifndef BOOST_NO_SFINAE
-# include "boost/utility/enable_if.hpp"
-#else
-# include "boost/mpl/bool.hpp"
-#endif
-#include <boost/function_equal.hpp>
-#include <boost/function/function_fwd.hpp>
-
-#if defined(BOOST_MSVC)
-# pragma warning( push )
-# pragma warning( disable : 4793 ) // complaint about native code generation
-# pragma warning( disable : 4127 ) // "conditional expression is constant"
-#endif
-
-#if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG)
-# define BOOST_FUNCTION_TARGET_FIX(x) x
-#else
-# define BOOST_FUNCTION_TARGET_FIX(x)
-#endif // __ICL etc
-
-# define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \
- typename ::boost::enable_if_c< \
- !(::boost::is_integral<Functor>::value), \
- Type>::type
-
-namespace boost {
- namespace detail {
- namespace function {
- class X;
-
- /**
- * A buffer used to store small function objects in
- * boost::function. It is a union containing function pointers,
- * object pointers, and a structure that resembles a bound
- * member function pointer.
- */
- union function_buffer_members
- {
- // For pointers to function objects
- typedef void* obj_ptr_t;
- mutable obj_ptr_t obj_ptr;
-
- // For pointers to std::type_info objects
- struct type_t {
- // (get_functor_type_tag, check_functor_type_tag).
- const boost::typeindex::type_info* type;
-
- // Whether the type is const-qualified.
- bool const_qualified;
- // Whether the type is volatile-qualified.
- bool volatile_qualified;
- } type;
-
- // For function pointers of all kinds
- typedef void (*func_ptr_t)();
- mutable func_ptr_t func_ptr;
-
- // For bound member pointers
- struct bound_memfunc_ptr_t {
- void (X::*memfunc_ptr)(int);
- void* obj_ptr;
- } bound_memfunc_ptr;
-
- // For references to function objects. We explicitly keep
- // track of the cv-qualifiers on the object referenced.
- struct obj_ref_t {
- mutable void* obj_ptr;
- bool is_const_qualified;
- bool is_volatile_qualified;
- } obj_ref;
- };
-
- union function_buffer
- {
- // Type-specific union members
- mutable function_buffer_members members;
-
- // To relax aliasing constraints
- mutable char data[sizeof(function_buffer_members)];
- };
-
- /**
- * The unusable class is a placeholder for unused function arguments
- * It is also completely unusable except that it constructable from
- * anything. This helps compilers without partial specialization to
- * handle Boost.Function objects returning void.
- */
- struct unusable
- {
- unusable() {}
- template<typename T> unusable(const T&) {}
- };
-
- /* Determine the return type. This supports compilers that do not support
- * void returns or partial specialization by silently changing the return
- * type to "unusable".
- */
- template<typename T> struct function_return_type { typedef T type; };
-
- template<>
- struct function_return_type<void>
- {
- typedef unusable type;
- };
-
- // The operation type to perform on the given functor/function pointer
- enum functor_manager_operation_type {
- clone_functor_tag,
- move_functor_tag,
- destroy_functor_tag,
- check_functor_type_tag,
- get_functor_type_tag
- };
-
- // Tags used to decide between different types of functions
- struct function_ptr_tag {};
- struct function_obj_tag {};
- struct member_ptr_tag {};
- struct function_obj_ref_tag {};
-
- template<typename F>
- class get_function_tag
- {
- typedef typename mpl::if_c<(is_pointer<F>::value),
- function_ptr_tag,
- function_obj_tag>::type ptr_or_obj_tag;
-
- typedef typename mpl::if_c<(is_member_pointer<F>::value),
- member_ptr_tag,
- ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag;
-
- typedef typename mpl::if_c<(is_reference_wrapper<F>::value),
- function_obj_ref_tag,
- ptr_or_obj_or_mem_tag>::type or_ref_tag;
-
- public:
- typedef or_ref_tag type;
- };
-
- // The trivial manager does nothing but return the same pointer (if we
- // are cloning) or return the null pointer (if we are deleting).
- template<typename F>
- struct reference_manager
- {
- static inline void
- manage(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op)
- {
- switch (op) {
- case clone_functor_tag:
- out_buffer.members.obj_ref = in_buffer.members.obj_ref;
- return;
-
- case move_functor_tag:
- out_buffer.members.obj_ref = in_buffer.members.obj_ref;
- in_buffer.members.obj_ref.obj_ptr = 0;
- return;
-
- case destroy_functor_tag:
- out_buffer.members.obj_ref.obj_ptr = 0;
- return;
-
- case check_functor_type_tag:
- {
- // Check whether we have the same type. We can add
- // cv-qualifiers, but we can't take them away.
- if (*out_buffer.members.type.type == boost::typeindex::type_id<F>()
- && (!in_buffer.members.obj_ref.is_const_qualified
- || out_buffer.members.type.const_qualified)
- && (!in_buffer.members.obj_ref.is_volatile_qualified
- || out_buffer.members.type.volatile_qualified))
- out_buffer.members.obj_ptr = in_buffer.members.obj_ref.obj_ptr;
- else
- out_buffer.members.obj_ptr = 0;
- }
- return;
-
- case get_functor_type_tag:
- out_buffer.members.type.type = &boost::typeindex::type_id<F>().type_info();
- out_buffer.members.type.const_qualified = in_buffer.members.obj_ref.is_const_qualified;
- out_buffer.members.type.volatile_qualified = in_buffer.members.obj_ref.is_volatile_qualified;
- return;
- }
- }
- };
-
- /**
- * Determine if boost::function can use the small-object
- * optimization with the function object type F.
- */
- template<typename F>
- struct function_allows_small_object_optimization
- {
- BOOST_STATIC_CONSTANT
- (bool,
- value = ((sizeof(F) <= sizeof(function_buffer) &&
- (alignment_of<function_buffer>::value
- % alignment_of<F>::value == 0))));
- };
-
- template <typename F,typename A>
- struct functor_wrapper: public F, public A
- {
- functor_wrapper( F f, A a ):
- F(f),
- A(a)
- {
- }
-
- functor_wrapper(const functor_wrapper& f) :
- F(static_cast<const F&>(f)),
- A(static_cast<const A&>(f))
- {
- }
- };
-
- /**
- * The functor_manager class contains a static function "manage" which
- * can clone or destroy the given function/function object pointer.
- */
- template<typename Functor>
- struct functor_manager_common
- {
- typedef Functor functor_type;
-
- // Function pointers
- static inline void
- manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op)
- {
- if (op == clone_functor_tag)
- out_buffer.members.func_ptr = in_buffer.members.func_ptr;
- else if (op == move_functor_tag) {
- out_buffer.members.func_ptr = in_buffer.members.func_ptr;
- in_buffer.members.func_ptr = 0;
- } else if (op == destroy_functor_tag)
- out_buffer.members.func_ptr = 0;
- else if (op == check_functor_type_tag) {
- if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
- out_buffer.members.obj_ptr = &in_buffer.members.func_ptr;
- else
- out_buffer.members.obj_ptr = 0;
- } else /* op == get_functor_type_tag */ {
- out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
- out_buffer.members.type.const_qualified = false;
- out_buffer.members.type.volatile_qualified = false;
- }
- }
-
- // Function objects that fit in the small-object buffer.
- static inline void
- manage_small(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op)
- {
- if (op == clone_functor_tag || op == move_functor_tag) {
- const functor_type* in_functor =
- reinterpret_cast<const functor_type*>(in_buffer.data);
- new (reinterpret_cast<void*>(out_buffer.data)) functor_type(*in_functor);
-
- if (op == move_functor_tag) {
- functor_type* f = reinterpret_cast<functor_type*>(in_buffer.data);
- (void)f; // suppress warning about the value of f not being used (MSVC)
- f->~Functor();
- }
- } else if (op == destroy_functor_tag) {
- // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
- functor_type* f = reinterpret_cast<functor_type*>(out_buffer.data);
- (void)f; // suppress warning about the value of f not being used (MSVC)
- f->~Functor();
- } else if (op == check_functor_type_tag) {
- if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
- out_buffer.members.obj_ptr = in_buffer.data;
- else
- out_buffer.members.obj_ptr = 0;
- } else /* op == get_functor_type_tag */ {
- out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
- out_buffer.members.type.const_qualified = false;
- out_buffer.members.type.volatile_qualified = false;
- }
- }
- };
-
- template<typename Functor>
- struct functor_manager
- {
- private:
- typedef Functor functor_type;
-
- // Function pointers
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, function_ptr_tag)
- {
- functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
- }
-
- // Function objects that fit in the small-object buffer.
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, mpl::true_)
- {
- functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
- }
-
- // Function objects that require heap allocation
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, mpl::false_)
- {
- if (op == clone_functor_tag) {
- // Clone the functor
- // GCC 2.95.3 gets the CV qualifiers wrong here, so we
- // can't do the static_cast that we should do.
- // jewillco: Changing this to static_cast because GCC 2.95.3 is
- // obsolete.
- const functor_type* f =
- static_cast<const functor_type*>(in_buffer.members.obj_ptr);
- functor_type* new_f = new functor_type(*f);
- out_buffer.members.obj_ptr = new_f;
- } else if (op == move_functor_tag) {
- out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
- in_buffer.members.obj_ptr = 0;
- } else if (op == destroy_functor_tag) {
- /* Cast from the void pointer to the functor pointer type */
- functor_type* f =
- static_cast<functor_type*>(out_buffer.members.obj_ptr);
- delete f;
- out_buffer.members.obj_ptr = 0;
- } else if (op == check_functor_type_tag) {
- if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
- out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
- else
- out_buffer.members.obj_ptr = 0;
- } else /* op == get_functor_type_tag */ {
- out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
- out_buffer.members.type.const_qualified = false;
- out_buffer.members.type.volatile_qualified = false;
- }
- }
-
- // For function objects, we determine whether the function
- // object can use the small-object optimization buffer or
- // whether we need to allocate it on the heap.
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, function_obj_tag)
- {
- manager(in_buffer, out_buffer, op,
- mpl::bool_<(function_allows_small_object_optimization<functor_type>::value)>());
- }
-
- // For member pointers, we use the small-object optimization buffer.
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, member_ptr_tag)
- {
- manager(in_buffer, out_buffer, op, mpl::true_());
- }
-
- public:
- /* Dispatch to an appropriate manager based on whether we have a
- function pointer or a function object pointer. */
- static inline void
- manage(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op)
- {
- typedef typename get_function_tag<functor_type>::type tag_type;
- switch (op) {
- case get_functor_type_tag:
- out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
- out_buffer.members.type.const_qualified = false;
- out_buffer.members.type.volatile_qualified = false;
- return;
-
- default:
- manager(in_buffer, out_buffer, op, tag_type());
- return;
- }
- }
- };
-
- template<typename Functor, typename Allocator>
- struct functor_manager_a
- {
- private:
- typedef Functor functor_type;
-
- // Function pointers
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, function_ptr_tag)
- {
- functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
- }
-
- // Function objects that fit in the small-object buffer.
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, mpl::true_)
- {
- functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
- }
-
- // Function objects that require heap allocation
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, mpl::false_)
- {
- typedef functor_wrapper<Functor,Allocator> functor_wrapper_type;
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef typename Allocator::template rebind<functor_wrapper_type>::other
- wrapper_allocator_type;
- typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
-#else
- using wrapper_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<functor_wrapper_type>;
- using wrapper_allocator_pointer_type = typename std::allocator_traits<wrapper_allocator_type>::pointer;
-#endif
-
- if (op == clone_functor_tag) {
- // Clone the functor
- // GCC 2.95.3 gets the CV qualifiers wrong here, so we
- // can't do the static_cast that we should do.
- const functor_wrapper_type* f =
- static_cast<const functor_wrapper_type*>(in_buffer.members.obj_ptr);
- wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*f));
- wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- wrapper_allocator.construct(copy, *f);
-#else
- std::allocator_traits<wrapper_allocator_type>::construct(wrapper_allocator, copy, *f);
-#endif
-
- // Get back to the original pointer type
- functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
- out_buffer.members.obj_ptr = new_f;
- } else if (op == move_functor_tag) {
- out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
- in_buffer.members.obj_ptr = 0;
- } else if (op == destroy_functor_tag) {
- /* Cast from the void pointer to the functor_wrapper_type */
- functor_wrapper_type* victim =
- static_cast<functor_wrapper_type*>(in_buffer.members.obj_ptr);
- wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*victim));
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- wrapper_allocator.destroy(victim);
-#else
- std::allocator_traits<wrapper_allocator_type>::destroy(wrapper_allocator, victim);
-#endif
- wrapper_allocator.deallocate(victim,1);
- out_buffer.members.obj_ptr = 0;
- } else if (op == check_functor_type_tag) {
- if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
- out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
- else
- out_buffer.members.obj_ptr = 0;
- } else /* op == get_functor_type_tag */ {
- out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
- out_buffer.members.type.const_qualified = false;
- out_buffer.members.type.volatile_qualified = false;
- }
- }
-
- // For function objects, we determine whether the function
- // object can use the small-object optimization buffer or
- // whether we need to allocate it on the heap.
- static inline void
- manager(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op, function_obj_tag)
- {
- manager(in_buffer, out_buffer, op,
- mpl::bool_<(function_allows_small_object_optimization<functor_type>::value)>());
- }
-
- public:
- /* Dispatch to an appropriate manager based on whether we have a
- function pointer or a function object pointer. */
- static inline void
- manage(const function_buffer& in_buffer, function_buffer& out_buffer,
- functor_manager_operation_type op)
- {
- typedef typename get_function_tag<functor_type>::type tag_type;
- switch (op) {
- case get_functor_type_tag:
- out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
- out_buffer.members.type.const_qualified = false;
- out_buffer.members.type.volatile_qualified = false;
- return;
-
- default:
- manager(in_buffer, out_buffer, op, tag_type());
- return;
- }
- }
- };
-
- // A type that is only used for comparisons against zero
- struct useless_clear_type {};
-
-#ifdef BOOST_NO_SFINAE
- // These routines perform comparisons between a Boost.Function
- // object and an arbitrary function object (when the last
- // parameter is mpl::bool_<false>) or against zero (when the
- // last parameter is mpl::bool_<true>). They are only necessary
- // for compilers that don't support SFINAE.
- template<typename Function, typename Functor>
- bool
- compare_equal(const Function& f, const Functor&, int, mpl::bool_<true>)
- { return f.empty(); }
-
- template<typename Function, typename Functor>
- bool
- compare_not_equal(const Function& f, const Functor&, int,
- mpl::bool_<true>)
- { return !f.empty(); }
-
- template<typename Function, typename Functor>
- bool
- compare_equal(const Function& f, const Functor& g, long,
- mpl::bool_<false>)
- {
- if (const Functor* fp = f.template target<Functor>())
- return function_equal(*fp, g);
- else return false;
- }
-
- template<typename Function, typename Functor>
- bool
- compare_equal(const Function& f, const reference_wrapper<Functor>& g,
- int, mpl::bool_<false>)
- {
- if (const Functor* fp = f.template target<Functor>())
- return fp == g.get_pointer();
- else return false;
- }
-
- template<typename Function, typename Functor>
- bool
- compare_not_equal(const Function& f, const Functor& g, long,
- mpl::bool_<false>)
- {
- if (const Functor* fp = f.template target<Functor>())
- return !function_equal(*fp, g);
- else return true;
- }
-
- template<typename Function, typename Functor>
- bool
- compare_not_equal(const Function& f,
- const reference_wrapper<Functor>& g, int,
- mpl::bool_<false>)
- {
- if (const Functor* fp = f.template target<Functor>())
- return fp != g.get_pointer();
- else return true;
- }
-#endif // BOOST_NO_SFINAE
-
- /**
- * Stores the "manager" portion of the vtable for a
- * boost::function object.
- */
- struct vtable_base
- {
- void (*manager)(const function_buffer& in_buffer,
- function_buffer& out_buffer,
- functor_manager_operation_type op);
- };
- } // end namespace function
- } // end namespace detail
-
-/**
- * The function_base class contains the basic elements needed for the
- * function1, function2, function3, etc. classes. It is common to all
- * functions (and as such can be used to tell if we have one of the
- * functionN objects).
- */
-class function_base
-{
-public:
- function_base() : vtable(0) { }
-
- /** Determine if the function is empty (i.e., has no target). */
- bool empty() const { return !vtable; }
-
- /** Retrieve the type of the stored function object, or type_id<void>()
- if this is empty. */
- const boost::typeindex::type_info& target_type() const
- {
- if (!vtable) return boost::typeindex::type_id<void>().type_info();
-
- detail::function::function_buffer type;
- get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
- return *type.members.type.type;
- }
-
- template<typename Functor>
- Functor* target()
- {
- if (!vtable) return 0;
-
- detail::function::function_buffer type_result;
- type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
- type_result.members.type.const_qualified = is_const<Functor>::value;
- type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
- get_vtable()->manager(functor, type_result,
- detail::function::check_functor_type_tag);
- return static_cast<Functor*>(type_result.members.obj_ptr);
- }
-
- template<typename Functor>
- const Functor* target() const
- {
- if (!vtable) return 0;
-
- detail::function::function_buffer type_result;
- type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
- type_result.members.type.const_qualified = true;
- type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
- get_vtable()->manager(functor, type_result,
- detail::function::check_functor_type_tag);
- // GCC 2.95.3 gets the CV qualifiers wrong here, so we
- // can't do the static_cast that we should do.
- return static_cast<const Functor*>(type_result.members.obj_ptr);
- }
-
- template<typename F>
- bool contains(const F& f) const
- {
- if (const F* fp = this->template target<F>())
- {
- return function_equal(*fp, f);
- } else {
- return false;
- }
- }
-
-#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3
- // GCC 3.3 and newer cannot copy with the global operator==, due to
- // problems with instantiation of function return types before it
- // has been verified that the argument types match up.
- template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator==(Functor g) const
- {
- if (const Functor* fp = target<Functor>())
- return function_equal(*fp, g);
- else return false;
- }
-
- template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator!=(Functor g) const
- {
- if (const Functor* fp = target<Functor>())
- return !function_equal(*fp, g);
- else return true;
- }
-#endif
-
-public: // should be protected, but GCC 2.95.3 will fail to allow access
- detail::function::vtable_base* get_vtable() const {
- return reinterpret_cast<detail::function::vtable_base*>(
- reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01));
- }
-
- bool has_trivial_copy_and_destroy() const {
- return reinterpret_cast<std::size_t>(vtable) & 0x01;
- }
-
- detail::function::vtable_base* vtable;
- mutable detail::function::function_buffer functor;
-};
-
-#if defined(BOOST_CLANG)
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wweak-vtables"
-#endif
-/**
- * The bad_function_call exception class is thrown when a boost::function
- * object is invoked
- */
-class bad_function_call : public std::runtime_error
-{
-public:
- bad_function_call() : std::runtime_error("call to empty boost::function") {}
-};
-#if defined(BOOST_CLANG)
-# pragma clang diagnostic pop
-#endif
-
-#ifndef BOOST_NO_SFINAE
-inline bool operator==(const function_base& f,
- detail::function::useless_clear_type*)
-{
- return f.empty();
-}
-
-inline bool operator!=(const function_base& f,
- detail::function::useless_clear_type*)
-{
- return !f.empty();
-}
-
-inline bool operator==(detail::function::useless_clear_type*,
- const function_base& f)
-{
- return f.empty();
-}
-
-inline bool operator!=(detail::function::useless_clear_type*,
- const function_base& f)
-{
- return !f.empty();
-}
-#endif
-
-#ifdef BOOST_NO_SFINAE
-// Comparisons between boost::function objects and arbitrary function objects
-template<typename Functor>
- inline bool operator==(const function_base& f, Functor g)
- {
- typedef mpl::bool_<(is_integral<Functor>::value)> integral;
- return detail::function::compare_equal(f, g, 0, integral());
- }
-
-template<typename Functor>
- inline bool operator==(Functor g, const function_base& f)
- {
- typedef mpl::bool_<(is_integral<Functor>::value)> integral;
- return detail::function::compare_equal(f, g, 0, integral());
- }
-
-template<typename Functor>
- inline bool operator!=(const function_base& f, Functor g)
- {
- typedef mpl::bool_<(is_integral<Functor>::value)> integral;
- return detail::function::compare_not_equal(f, g, 0, integral());
- }
-
-template<typename Functor>
- inline bool operator!=(Functor g, const function_base& f)
- {
- typedef mpl::bool_<(is_integral<Functor>::value)> integral;
- return detail::function::compare_not_equal(f, g, 0, integral());
- }
-#else
-
-# if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
-// Comparisons between boost::function objects and arbitrary function
-// objects. GCC 3.3 and before has an obnoxious bug that prevents this
-// from working.
-template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator==(const function_base& f, Functor g)
- {
- if (const Functor* fp = f.template target<Functor>())
- return function_equal(*fp, g);
- else return false;
- }
-
-template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator==(Functor g, const function_base& f)
- {
- if (const Functor* fp = f.template target<Functor>())
- return function_equal(g, *fp);
- else return false;
- }
-
-template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator!=(const function_base& f, Functor g)
- {
- if (const Functor* fp = f.template target<Functor>())
- return !function_equal(*fp, g);
- else return true;
- }
-
-template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator!=(Functor g, const function_base& f)
- {
- if (const Functor* fp = f.template target<Functor>())
- return !function_equal(g, *fp);
- else return true;
- }
-# endif
-
-template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator==(const function_base& f, reference_wrapper<Functor> g)
- {
- if (const Functor* fp = f.template target<Functor>())
- return fp == g.get_pointer();
- else return false;
- }
-
-template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator==(reference_wrapper<Functor> g, const function_base& f)
- {
- if (const Functor* fp = f.template target<Functor>())
- return g.get_pointer() == fp;
- else return false;
- }
-
-template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator!=(const function_base& f, reference_wrapper<Functor> g)
- {
- if (const Functor* fp = f.template target<Functor>())
- return fp != g.get_pointer();
- else return true;
- }
-
-template<typename Functor>
- BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
- operator!=(reference_wrapper<Functor> g, const function_base& f)
- {
- if (const Functor* fp = f.template target<Functor>())
- return g.get_pointer() != fp;
- else return true;
- }
-
-#endif // Compiler supporting SFINAE
-
-namespace detail {
- namespace function {
- inline bool has_empty_target(const function_base* f)
- {
- return f->empty();
- }
-
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
- inline bool has_empty_target(const void*)
- {
- return false;
- }
-#else
- inline bool has_empty_target(...)
- {
- return false;
- }
-#endif
- } // end namespace function
-} // end namespace detail
-} // end namespace boost
-
-#undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL
-
-#if defined(BOOST_MSVC)
-# pragma warning( pop )
-#endif
-
-#endif // BOOST_FUNCTION_BASE_HEADER
diff --git a/src/third_party/boost-1.68.0/boost/function/function_template.hpp b/src/third_party/boost-1.68.0/boost/function/function_template.hpp
deleted file mode 100644
index 177b60a7b40..00000000000
--- a/src/third_party/boost-1.68.0/boost/function/function_template.hpp
+++ /dev/null
@@ -1,1191 +0,0 @@
-// Boost.Function library
-
-// Copyright Douglas Gregor 2001-2006
-// Copyright Emil Dotchevski 2007
-// Use, modification and distribution is subject to the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// For more information, see http://www.boost.org
-
-// Note: this header is a header template and must NOT have multiple-inclusion
-// protection.
-#include <boost/function/detail/prologue.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-
-#if defined(BOOST_MSVC)
-# pragma warning( push )
-# pragma warning( disable : 4127 ) // "conditional expression is constant"
-#endif
-
-#define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T)
-
-#define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T)
-
-#define BOOST_FUNCTION_PARM(J,I,D) BOOST_PP_CAT(T,I) BOOST_PP_CAT(a,I)
-
-#define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY)
-
-#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
-# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a)
-#else
-# include <boost/move/utility_core.hpp>
-# define BOOST_FUNCTION_ARG(J,I,D) ::boost::forward< BOOST_PP_CAT(T,I) >(BOOST_PP_CAT(a,I))
-# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG,BOOST_PP_EMPTY)
-#endif
-
-#define BOOST_FUNCTION_ARG_TYPE(J,I,D) \
- typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(I)),_type);
-
-#define BOOST_FUNCTION_ARG_TYPES BOOST_PP_REPEAT(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG_TYPE,BOOST_PP_EMPTY)
-
-// Comma if nonzero number of arguments
-#if BOOST_FUNCTION_NUM_ARGS == 0
-# define BOOST_FUNCTION_COMMA
-#else
-# define BOOST_FUNCTION_COMMA ,
-#endif // BOOST_FUNCTION_NUM_ARGS > 0
-
-// Class names used in this version of the code
-#define BOOST_FUNCTION_FUNCTION BOOST_JOIN(function,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_FUNCTION_INVOKER \
- BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \
- BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \
- BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \
- BOOST_JOIN(void_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_FUNCTION_REF_INVOKER \
- BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \
- BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_MEMBER_INVOKER \
- BOOST_JOIN(function_mem_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \
- BOOST_JOIN(function_void_mem_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_FUNCTION_INVOKER \
- BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \
- BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \
- BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_MEMBER_INVOKER \
- BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_GET_INVOKER \
- BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS)
-#define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS)
-
-#ifndef BOOST_NO_VOID_RETURNS
-# define BOOST_FUNCTION_VOID_RETURN_TYPE void
-# define BOOST_FUNCTION_RETURN(X) X
-#else
-# define BOOST_FUNCTION_VOID_RETURN_TYPE boost::detail::function::unusable
-# define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE ()
-#endif
-
-namespace boost {
- namespace detail {
- namespace function {
- template<
- typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_FUNCTION_INVOKER
- {
- static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
- {
- FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
- return f(BOOST_FUNCTION_ARGS);
- }
- };
-
- template<
- typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_VOID_FUNCTION_INVOKER
- {
- static BOOST_FUNCTION_VOID_RETURN_TYPE
- invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
-
- {
- FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
- BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS));
- }
- };
-
- template<
- typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
- {
- static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
-
- {
- FunctionObj* f;
- if (function_allows_small_object_optimization<FunctionObj>::value)
- f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
- else
- f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
- return (*f)(BOOST_FUNCTION_ARGS);
- }
- };
-
- template<
- typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
- {
- static BOOST_FUNCTION_VOID_RETURN_TYPE
- invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
-
- {
- FunctionObj* f;
- if (function_allows_small_object_optimization<FunctionObj>::value)
- f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
- else
- f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
- BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
- }
- };
-
- template<
- typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_FUNCTION_REF_INVOKER
- {
- static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
-
- {
- FunctionObj* f =
- reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
- return (*f)(BOOST_FUNCTION_ARGS);
- }
- };
-
- template<
- typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER
- {
- static BOOST_FUNCTION_VOID_RETURN_TYPE
- invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
-
- {
- FunctionObj* f =
- reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
- BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
- }
- };
-
-#if BOOST_FUNCTION_NUM_ARGS > 0
- /* Handle invocation of member pointers. */
- template<
- typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_MEMBER_INVOKER
- {
- static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
-
- {
- MemberPtr* f =
- reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
- return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS);
- }
- };
-
- template<
- typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_VOID_MEMBER_INVOKER
- {
- static BOOST_FUNCTION_VOID_RETURN_TYPE
- invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_PARMS)
-
- {
- MemberPtr* f =
- reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
- BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS));
- }
- };
-#endif
-
- template<
- typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_GET_FUNCTION_INVOKER
- {
- typedef typename mpl::if_c<(is_void<R>::value),
- BOOST_FUNCTION_VOID_FUNCTION_INVOKER<
- FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >,
- BOOST_FUNCTION_FUNCTION_INVOKER<
- FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >
- >::type type;
- };
-
- template<
- typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
- {
- typedef typename mpl::if_c<(is_void<R>::value),
- BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER<
- FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >,
- BOOST_FUNCTION_FUNCTION_OBJ_INVOKER<
- FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >
- >::type type;
- };
-
- template<
- typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER
- {
- typedef typename mpl::if_c<(is_void<R>::value),
- BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER<
- FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >,
- BOOST_FUNCTION_FUNCTION_REF_INVOKER<
- FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >
- >::type type;
- };
-
-#if BOOST_FUNCTION_NUM_ARGS > 0
- /* Retrieve the appropriate invoker for a member pointer. */
- template<
- typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- struct BOOST_FUNCTION_GET_MEMBER_INVOKER
- {
- typedef typename mpl::if_c<(is_void<R>::value),
- BOOST_FUNCTION_VOID_MEMBER_INVOKER<
- MemberPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >,
- BOOST_FUNCTION_MEMBER_INVOKER<
- MemberPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >
- >::type type;
- };
-#endif
-
- /* Given the tag returned by get_function_tag, retrieve the
- actual invoker that will be used for the given function
- object.
-
- Each specialization contains an "apply" nested class template
- that accepts the function object, return type, function
- argument types, and allocator. The resulting "apply" class
- contains two typedefs, "invoker_type" and "manager_type",
- which correspond to the invoker and manager types. */
- template<typename Tag>
- struct BOOST_FUNCTION_GET_INVOKER { };
-
- /* Retrieve the invoker for a function pointer. */
- template<>
- struct BOOST_FUNCTION_GET_INVOKER<function_ptr_tag>
- {
- template<typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- struct apply
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
- FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- invoker_type;
-
- typedef functor_manager<FunctionPtr> manager_type;
- };
-
- template<typename FunctionPtr,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
- typename Allocator>
- struct apply_a
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
- FunctionPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- invoker_type;
-
- typedef functor_manager<FunctionPtr> manager_type;
- };
- };
-
-#if BOOST_FUNCTION_NUM_ARGS > 0
- /* Retrieve the invoker for a member pointer. */
- template<>
- struct BOOST_FUNCTION_GET_INVOKER<member_ptr_tag>
- {
- template<typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- struct apply
- {
- typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
- MemberPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- invoker_type;
-
- typedef functor_manager<MemberPtr> manager_type;
- };
-
- template<typename MemberPtr,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
- typename Allocator>
- struct apply_a
- {
- typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
- MemberPtr,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- invoker_type;
-
- typedef functor_manager<MemberPtr> manager_type;
- };
- };
-#endif
-
- /* Retrieve the invoker for a function object. */
- template<>
- struct BOOST_FUNCTION_GET_INVOKER<function_obj_tag>
- {
- template<typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- struct apply
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
- FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- invoker_type;
-
- typedef functor_manager<FunctionObj> manager_type;
- };
-
- template<typename FunctionObj,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
- typename Allocator>
- struct apply_a
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
- FunctionObj,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- invoker_type;
-
- typedef functor_manager_a<FunctionObj, Allocator> manager_type;
- };
- };
-
- /* Retrieve the invoker for a reference to a function object. */
- template<>
- struct BOOST_FUNCTION_GET_INVOKER<function_obj_ref_tag>
- {
- template<typename RefWrapper,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- struct apply
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
- typename RefWrapper::type,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- invoker_type;
-
- typedef reference_manager<typename RefWrapper::type> manager_type;
- };
-
- template<typename RefWrapper,
- typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS,
- typename Allocator>
- struct apply_a
- {
- typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
- typename RefWrapper::type,
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >::type
- invoker_type;
-
- typedef reference_manager<typename RefWrapper::type> manager_type;
- };
- };
-
-
- /**
- * vtable for a specific boost::function instance. This
- * structure must be an aggregate so that we can use static
- * initialization in boost::function's assign_to and assign_to_a
- * members. It therefore cannot have any constructors,
- * destructors, base classes, etc.
- */
- template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- struct BOOST_FUNCTION_VTABLE
- {
-#ifndef BOOST_NO_VOID_RETURNS
- typedef R result_type;
-#else
- typedef typename function_return_type<R>::type result_type;
-#endif // BOOST_NO_VOID_RETURNS
-
- typedef result_type (*invoker_type)(function_buffer&
- BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS);
-
- template<typename F>
- bool assign_to(F f, function_buffer& functor) const
- {
- typedef typename get_function_tag<F>::type tag;
- return assign_to(f, functor, tag());
- }
- template<typename F,typename Allocator>
- bool assign_to_a(F f, function_buffer& functor, Allocator a) const
- {
- typedef typename get_function_tag<F>::type tag;
- return assign_to_a(f, functor, a, tag());
- }
-
- void clear(function_buffer& functor) const
- {
- if (base.manager)
- base.manager(functor, functor, destroy_functor_tag);
- }
-
- private:
- // Function pointers
- template<typename FunctionPtr>
- bool
- assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
- {
- this->clear(functor);
- if (f) {
- // should be a reinterpret cast, but some compilers insist
- // on giving cv-qualifiers to free functions
- functor.members.func_ptr = reinterpret_cast<void (*)()>(f);
- return true;
- } else {
- return false;
- }
- }
- template<typename FunctionPtr,typename Allocator>
- bool
- assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
- {
- return assign_to(f,functor,function_ptr_tag());
- }
-
- // Member pointers
-#if BOOST_FUNCTION_NUM_ARGS > 0
- template<typename MemberPtr>
- bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
- {
- // DPG TBD: Add explicit support for member function
- // objects, so we invoke through mem_fn() but we retain the
- // right target_type() values.
- if (f) {
- this->assign_to(boost::mem_fn(f), functor);
- return true;
- } else {
- return false;
- }
- }
- template<typename MemberPtr,typename Allocator>
- bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
- {
- // DPG TBD: Add explicit support for member function
- // objects, so we invoke through mem_fn() but we retain the
- // right target_type() values.
- if (f) {
- this->assign_to_a(boost::mem_fn(f), functor, a);
- return true;
- } else {
- return false;
- }
- }
-#endif // BOOST_FUNCTION_NUM_ARGS > 0
-
- // Function objects
- // Assign to a function object using the small object optimization
- template<typename FunctionObj>
- void
- assign_functor(FunctionObj f, function_buffer& functor, mpl::true_) const
- {
- new (reinterpret_cast<void*>(functor.data)) FunctionObj(f);
- }
- template<typename FunctionObj,typename Allocator>
- void
- assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, mpl::true_) const
- {
- assign_functor(f,functor,mpl::true_());
- }
-
- // Assign to a function object allocated on the heap.
- template<typename FunctionObj>
- void
- assign_functor(FunctionObj f, function_buffer& functor, mpl::false_) const
- {
- functor.members.obj_ptr = new FunctionObj(f);
- }
- template<typename FunctionObj,typename Allocator>
- void
- assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, mpl::false_) const
- {
- typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef typename Allocator::template rebind<functor_wrapper_type>::other
- wrapper_allocator_type;
- typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
-#else
- using wrapper_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<functor_wrapper_type>;
- using wrapper_allocator_pointer_type = typename std::allocator_traits<wrapper_allocator_type>::pointer;
-#endif
- wrapper_allocator_type wrapper_allocator(a);
- wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
-#else
- std::allocator_traits<wrapper_allocator_type>::construct(wrapper_allocator, copy, functor_wrapper_type(f,a));
-#endif
- functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
- functor.members.obj_ptr = new_f;
- }
-
- template<typename FunctionObj>
- bool
- assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
- {
- if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
- assign_functor(f, functor,
- mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
- return true;
- } else {
- return false;
- }
- }
- template<typename FunctionObj,typename Allocator>
- bool
- assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
- {
- if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
- assign_functor_a(f, functor, a,
- mpl::bool_<(function_allows_small_object_optimization<FunctionObj>::value)>());
- return true;
- } else {
- return false;
- }
- }
-
- // Reference to a function object
- template<typename FunctionObj>
- bool
- assign_to(const reference_wrapper<FunctionObj>& f,
- function_buffer& functor, function_obj_ref_tag) const
- {
- functor.members.obj_ref.obj_ptr = (void *)(f.get_pointer());
- functor.members.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
- functor.members.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
- return true;
- }
- template<typename FunctionObj,typename Allocator>
- bool
- assign_to_a(const reference_wrapper<FunctionObj>& f,
- function_buffer& functor, Allocator, function_obj_ref_tag) const
- {
- return assign_to(f,functor,function_obj_ref_tag());
- }
-
- public:
- vtable_base base;
- invoker_type invoker;
- };
- } // end namespace function
- } // end namespace detail
-
- template<
- typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS
- >
- class BOOST_FUNCTION_FUNCTION : public function_base
- {
- public:
-#ifndef BOOST_NO_VOID_RETURNS
- typedef R result_type;
-#else
- typedef typename boost::detail::function::function_return_type<R>::type
- result_type;
-#endif // BOOST_NO_VOID_RETURNS
-
- private:
- typedef boost::detail::function::BOOST_FUNCTION_VTABLE<
- R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>
- vtable_type;
-
- vtable_type* get_vtable() const {
- return reinterpret_cast<vtable_type*>(
- reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01));
- }
-
- struct clear_type {};
-
- public:
- BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS);
-
- // add signature for boost::lambda
- template<typename Args>
- struct sig
- {
- typedef result_type type;
- };
-
-#if BOOST_FUNCTION_NUM_ARGS == 1
- typedef T0 argument_type;
-#elif BOOST_FUNCTION_NUM_ARGS == 2
- typedef T0 first_argument_type;
- typedef T1 second_argument_type;
-#endif
-
- BOOST_STATIC_CONSTANT(int, arity = BOOST_FUNCTION_NUM_ARGS);
- BOOST_FUNCTION_ARG_TYPES
-
- typedef BOOST_FUNCTION_FUNCTION self_type;
-
- BOOST_FUNCTION_FUNCTION() : function_base() { }
-
- // MSVC chokes if the following two constructors are collapsed into
- // one with a default parameter.
- template<typename Functor>
- BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f
-#ifndef BOOST_NO_SFINAE
- ,typename boost::enable_if_c<
- !(is_integral<Functor>::value),
- int>::type = 0
-#endif // BOOST_NO_SFINAE
- ) :
- function_base()
- {
- this->assign_to(f);
- }
- template<typename Functor,typename Allocator>
- BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a
-#ifndef BOOST_NO_SFINAE
- ,typename boost::enable_if_c<
- !(is_integral<Functor>::value),
- int>::type = 0
-#endif // BOOST_NO_SFINAE
- ) :
- function_base()
- {
- this->assign_to_a(f,a);
- }
-
-#ifndef BOOST_NO_SFINAE
- BOOST_FUNCTION_FUNCTION(clear_type*) : function_base() { }
-#else
- BOOST_FUNCTION_FUNCTION(int zero) : function_base()
- {
- BOOST_ASSERT(zero == 0);
- }
-#endif
-
- BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : function_base()
- {
- this->assign_to_own(f);
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base()
- {
- this->move_assign(f);
- }
-#endif
-
- ~BOOST_FUNCTION_FUNCTION() { clear(); }
-
- result_type operator()(BOOST_FUNCTION_PARMS) const
- {
- if (this->empty())
- boost::throw_exception(bad_function_call());
-
- return get_vtable()->invoker
- (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
- }
-
- // The distinction between when to use BOOST_FUNCTION_FUNCTION and
- // when to use self_type is obnoxious. MSVC cannot handle self_type as
- // the return type of these assignment operators, but Borland C++ cannot
- // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to
- // construct.
- template<typename Functor>
-#ifndef BOOST_NO_SFINAE
- typename boost::enable_if_c<
- !(is_integral<Functor>::value),
- BOOST_FUNCTION_FUNCTION&>::type
-#else
- BOOST_FUNCTION_FUNCTION&
-#endif
- operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
- {
- this->clear();
- BOOST_TRY {
- this->assign_to(f);
- } BOOST_CATCH (...) {
- vtable = 0;
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return *this;
- }
- template<typename Functor,typename Allocator>
- void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a)
- {
- this->clear();
- BOOST_TRY{
- this->assign_to_a(f,a);
- } BOOST_CATCH (...) {
- vtable = 0;
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
-
-#ifndef BOOST_NO_SFINAE
- BOOST_FUNCTION_FUNCTION& operator=(clear_type*)
- {
- this->clear();
- return *this;
- }
-#else
- BOOST_FUNCTION_FUNCTION& operator=(int zero)
- {
- BOOST_ASSERT(zero == 0);
- this->clear();
- return *this;
- }
-#endif
-
- // Assignment from another BOOST_FUNCTION_FUNCTION
- BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f)
- {
- if (&f == this)
- return *this;
-
- this->clear();
- BOOST_TRY {
- this->assign_to_own(f);
- } BOOST_CATCH (...) {
- vtable = 0;
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return *this;
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- // Move assignment from another BOOST_FUNCTION_FUNCTION
- BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f)
- {
- if (&f == this)
- return *this;
-
- this->clear();
- BOOST_TRY {
- this->move_assign(f);
- } BOOST_CATCH (...) {
- vtable = 0;
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return *this;
- }
-#endif
-
- void swap(BOOST_FUNCTION_FUNCTION& other)
- {
- if (&other == this)
- return;
-
- BOOST_FUNCTION_FUNCTION tmp;
- tmp.move_assign(*this);
- this->move_assign(other);
- other.move_assign(tmp);
- }
-
- // Clear out a target, if there is one
- void clear()
- {
- if (vtable) {
- if (!this->has_trivial_copy_and_destroy())
- get_vtable()->clear(this->functor);
- vtable = 0;
- }
- }
-
-#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG)
- // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
- operator bool () const { return !this->empty(); }
-#else
- private:
- struct dummy {
- void nonnull() {}
- };
-
- typedef void (dummy::*safe_bool)();
-
- public:
- operator safe_bool () const
- { return (this->empty())? 0 : &dummy::nonnull; }
-
- bool operator!() const
- { return this->empty(); }
-#endif
-
- private:
- void assign_to_own(const BOOST_FUNCTION_FUNCTION& f)
- {
- if (!f.empty()) {
- this->vtable = f.vtable;
- if (this->has_trivial_copy_and_destroy())
- // Don't operate on storage directly since union type doesn't relax
- // strict aliasing rules, despite of having member char type.
- std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
- else
- get_vtable()->base.manager(f.functor, this->functor,
- boost::detail::function::clone_functor_tag);
- }
- }
-
- template<typename Functor>
- void assign_to(Functor f)
- {
- using boost::detail::function::vtable_base;
-
- typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
- typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
- typedef typename get_invoker::
- template apply<Functor, R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>
- handler_type;
-
- typedef typename handler_type::invoker_type invoker_type;
- typedef typename handler_type::manager_type manager_type;
-
- // Note: it is extremely important that this initialization use
- // static initialization. Otherwise, we will have a race
- // condition here in multi-threaded code. See
- // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/.
- static const vtable_type stored_vtable =
- { { &manager_type::manage }, &invoker_type::invoke };
-
- if (stored_vtable.assign_to(f, functor)) {
- std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
- // coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
- if (boost::has_trivial_copy_constructor<Functor>::value &&
- boost::has_trivial_destructor<Functor>::value &&
- boost::detail::function::function_allows_small_object_optimization<Functor>::value)
- value |= static_cast<std::size_t>(0x01);
- vtable = reinterpret_cast<boost::detail::function::vtable_base *>(value);
- } else
- vtable = 0;
- }
-
- template<typename Functor,typename Allocator>
- void assign_to_a(Functor f,Allocator a)
- {
- using boost::detail::function::vtable_base;
-
- typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
- typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
- typedef typename get_invoker::
- template apply_a<Functor, R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS,
- Allocator>
- handler_type;
-
- typedef typename handler_type::invoker_type invoker_type;
- typedef typename handler_type::manager_type manager_type;
-
- // Note: it is extremely important that this initialization use
- // static initialization. Otherwise, we will have a race
- // condition here in multi-threaded code. See
- // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/.
- static const vtable_type stored_vtable =
- { { &manager_type::manage }, &invoker_type::invoke };
-
- if (stored_vtable.assign_to_a(f, functor, a)) {
- std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
- // coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
- if (boost::has_trivial_copy_constructor<Functor>::value &&
- boost::has_trivial_destructor<Functor>::value &&
- boost::detail::function::function_allows_small_object_optimization<Functor>::value)
- value |= static_cast<std::size_t>(0x01);
- vtable = reinterpret_cast<boost::detail::function::vtable_base *>(value);
- } else
- vtable = 0;
- }
-
- // Moves the value from the specified argument to *this. If the argument
- // has its function object allocated on the heap, move_assign will pass
- // its buffer to *this, and set the argument's buffer pointer to NULL.
- void move_assign(BOOST_FUNCTION_FUNCTION& f)
- {
- if (&f == this)
- return;
-
- BOOST_TRY {
- if (!f.empty()) {
- this->vtable = f.vtable;
- if (this->has_trivial_copy_and_destroy())
- // Don't operate on storage directly since union type doesn't relax
- // strict aliasing rules, despite of having member char type.
- std::memcpy(this->functor.data, f.functor.data, sizeof(this->functor.data));
- else
- get_vtable()->base.manager(f.functor, this->functor,
- boost::detail::function::move_functor_tag);
- f.vtable = 0;
- } else {
- clear();
- }
- } BOOST_CATCH (...) {
- vtable = 0;
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- }
- };
-
- template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- inline void swap(BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >& f1,
- BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS
- >& f2)
- {
- f1.swap(f2);
- }
-
-// Poison comparisons between boost::function objects of the same type.
-template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- void operator==(const BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>&,
- const BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>&);
-template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
- void operator!=(const BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>&,
- const BOOST_FUNCTION_FUNCTION<
- R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_ARGS>& );
-
-#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
-
-#if BOOST_FUNCTION_NUM_ARGS == 0
-#define BOOST_FUNCTION_PARTIAL_SPEC R (void)
-#else
-#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS,T))
-#endif
-
-template<typename R BOOST_FUNCTION_COMMA
- BOOST_FUNCTION_TEMPLATE_PARMS>
-class function<BOOST_FUNCTION_PARTIAL_SPEC>
- : public BOOST_FUNCTION_FUNCTION<R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>
-{
- typedef BOOST_FUNCTION_FUNCTION<R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> base_type;
- typedef function self_type;
-
- struct clear_type {};
-
-public:
-
- function() : base_type() {}
-
- template<typename Functor>
- function(Functor f
-#ifndef BOOST_NO_SFINAE
- ,typename boost::enable_if_c<
- !(is_integral<Functor>::value),
- int>::type = 0
-#endif
- ) :
- base_type(f)
- {
- }
- template<typename Functor,typename Allocator>
- function(Functor f, Allocator a
-#ifndef BOOST_NO_SFINAE
- ,typename boost::enable_if_c<
- !(is_integral<Functor>::value),
- int>::type = 0
-#endif
- ) :
- base_type(f,a)
- {
- }
-
-#ifndef BOOST_NO_SFINAE
- function(clear_type*) : base_type() {}
-#endif
-
- function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
-
- function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- // Move constructors
- function(self_type&& f): base_type(static_cast<base_type&&>(f)){}
- function(base_type&& f): base_type(static_cast<base_type&&>(f)){}
-#endif
-
- self_type& operator=(const self_type& f)
- {
- self_type(f).swap(*this);
- return *this;
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- self_type& operator=(self_type&& f)
- {
- self_type(static_cast<self_type&&>(f)).swap(*this);
- return *this;
- }
-#endif
-
- template<typename Functor>
-#ifndef BOOST_NO_SFINAE
- typename boost::enable_if_c<
- !(is_integral<Functor>::value),
- self_type&>::type
-#else
- self_type&
-#endif
- operator=(Functor f)
- {
- self_type(f).swap(*this);
- return *this;
- }
-
-#ifndef BOOST_NO_SFINAE
- self_type& operator=(clear_type*)
- {
- this->clear();
- return *this;
- }
-#endif
-
- self_type& operator=(const base_type& f)
- {
- self_type(f).swap(*this);
- return *this;
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- self_type& operator=(base_type&& f)
- {
- self_type(static_cast<base_type&&>(f)).swap(*this);
- return *this;
- }
-#endif
-};
-
-#undef BOOST_FUNCTION_PARTIAL_SPEC
-#endif // have partial specialization
-
-} // end namespace boost
-
-// Cleanup after ourselves...
-#undef BOOST_FUNCTION_VTABLE
-#undef BOOST_FUNCTION_COMMA
-#undef BOOST_FUNCTION_FUNCTION
-#undef BOOST_FUNCTION_FUNCTION_INVOKER
-#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
-#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
-#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
-#undef BOOST_FUNCTION_FUNCTION_REF_INVOKER
-#undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER
-#undef BOOST_FUNCTION_MEMBER_INVOKER
-#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER
-#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
-#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
-#undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER
-#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER
-#undef BOOST_FUNCTION_GET_INVOKER
-#undef BOOST_FUNCTION_TEMPLATE_PARMS
-#undef BOOST_FUNCTION_TEMPLATE_ARGS
-#undef BOOST_FUNCTION_PARMS
-#undef BOOST_FUNCTION_PARM
-#ifdef BOOST_FUNCTION_ARG
-# undef BOOST_FUNCTION_ARG
-#endif
-#undef BOOST_FUNCTION_ARGS
-#undef BOOST_FUNCTION_ARG_TYPE
-#undef BOOST_FUNCTION_ARG_TYPES
-#undef BOOST_FUNCTION_VOID_RETURN_TYPE
-#undef BOOST_FUNCTION_RETURN
-
-#if defined(BOOST_MSVC)
-# pragma warning( pop )
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/adapt_struct.hpp b/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/adapt_struct.hpp
deleted file mode 100644
index 66710b47ffa..00000000000
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/adapt_struct.hpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2007 Joel de Guzman
- Copyright (c) 2009-2011 Christopher Schmidt
- Copyright (c) 2013-2014 Damien Buhl
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
-#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
-
-#include <boost/fusion/support/config.hpp>
-#include <boost/preprocessor/config/config.hpp>
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/empty.hpp>
-#include <boost/preprocessor/control/iif.hpp>
-#include <boost/preprocessor/comparison/less.hpp>
-#include <boost/preprocessor/seq/seq.hpp>
-#include <boost/preprocessor/variadic/to_seq.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/add_const.hpp>
-#include <boost/type_traits/remove_const.hpp>
-
-#include <boost/fusion/adapted/struct/detail/extension.hpp>
-#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
-#include <boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp>
-#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
-#include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
-
-#define BOOST_FUSION_ADAPT_STRUCT_C( \
- TEMPLATE_PARAMS_SEQ, NAME_SEQ, IS_VIEW, I, ATTRIBUTE) \
- BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
- TEMPLATE_PARAMS_SEQ, \
- NAME_SEQ, \
- IS_VIEW, \
- I, \
- BOOST_PP_IIF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \
- BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR(ATTRIBUTE), \
- BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), \
- BOOST_PP_LESS( \
- BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), 2))
-
-
-
-#if BOOST_PP_VARIADICS
-
-# define BOOST_FUSION_ADAPT_TPL_STRUCT(TEMPLATE_PARAMS_SEQ,NAME_SEQ, ...) \
- BOOST_FUSION_ADAPT_STRUCT_BASE( \
- (1)TEMPLATE_PARAMS_SEQ, \
- (1)NAME_SEQ, \
- struct_tag, \
- 0, \
- BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
- BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)), \
- BOOST_FUSION_ADAPT_STRUCT_C)
-
-# define BOOST_FUSION_ADAPT_STRUCT(...) \
- BOOST_FUSION_ADAPT_STRUCT_BASE( \
- (0), \
- (0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
- struct_tag, \
- 0, \
- BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
- BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
- BOOST_FUSION_ADAPT_STRUCT_C)
-
-# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(...) \
- BOOST_FUSION_ADAPT_STRUCT_BASE( \
- (0), \
- (0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
- struct_tag, \
- 1, \
- BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
- BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
- BOOST_FUSION_ADAPT_STRUCT_C)
-
-#else // BOOST_PP_VARIADICS
-
-# define BOOST_FUSION_ADAPT_TPL_STRUCT( \
- TEMPLATE_PARAMS_SEQ,NAME_SEQ, ATTRIBUTES) \
- BOOST_FUSION_ADAPT_STRUCT_BASE( \
- (1)TEMPLATE_PARAMS_SEQ, \
- (1)NAME_SEQ, \
- struct_tag, \
- 0, \
- BOOST_PP_CAT( \
- BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
- BOOST_FUSION_ADAPT_STRUCT_C)
-
-# define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES) \
- BOOST_FUSION_ADAPT_STRUCT_BASE( \
- (0), \
- (0)(NAME), \
- struct_tag, \
- 0, \
- BOOST_PP_CAT( \
- BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES, \
- _END), \
- BOOST_FUSION_ADAPT_STRUCT_C)
-
-# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \
- BOOST_FUSION_ADAPT_STRUCT_BASE( \
- (0), \
- (0)(NAME), \
- struct_tag, \
- 1, \
- BOOST_PP_CAT( \
- BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES, \
- _END), \
- BOOST_FUSION_ADAPT_STRUCT_C)
-
-
-#endif // BOOST_PP_VARIADICS
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_base.hpp b/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_base.hpp
deleted file mode 100644
index 84b9302c449..00000000000
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_base.hpp
+++ /dev/null
@@ -1,309 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2009 Joel de Guzman
- Copyright (c) 2005-2006 Dan Marsden
- Copyright (c) 2009-2011 Christopher Schmidt
- Copyright (c) 2013-2014 Damien Buhl
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-
-#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP
-#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP
-
-#include <boost/fusion/support/config.hpp>
-#include <boost/config.hpp>
-#include <boost/fusion/support/tag_of_fwd.hpp>
-#include <boost/fusion/adapted/struct/detail/adapt_auto.hpp>
-#include <boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp>
-
-#include <boost/preprocessor/empty.hpp>
-#include <boost/preprocessor/stringize.hpp>
-#include <boost/preprocessor/control/if.hpp>
-#include <boost/preprocessor/seq/size.hpp>
-#include <boost/preprocessor/seq/for_each.hpp>
-#include <boost/preprocessor/seq/for_each_i.hpp>
-#include <boost/preprocessor/seq/enum.hpp>
-#include <boost/preprocessor/seq/seq.hpp>
-#include <boost/preprocessor/tuple/eat.hpp>
-#include <boost/preprocessor/tuple/elem.hpp>
-#include <boost/preprocessor/arithmetic/dec.hpp>
-#include <boost/preprocessor/comparison/less.hpp>
-#include <boost/preprocessor/logical/not.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/tag.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/type_traits/add_const.hpp>
-
-#include <boost/typeof/typeof.hpp>
-
-
-#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS(SEQ) \
- BOOST_PP_SEQ_HEAD(SEQ)<BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TAIL(SEQ))> \
- BOOST_PP_EMPTY()
-
-#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(SEQ) \
- BOOST_PP_IF( \
- BOOST_PP_SEQ_HEAD(SEQ), \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS, \
- BOOST_PP_SEQ_HEAD)(BOOST_PP_SEQ_TAIL(SEQ))
-
-#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL_C(R, _, ELEM) \
- (typename ELEM)
-#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL(SEQ) \
- BOOST_PP_SEQ_ENUM( \
- BOOST_PP_SEQ_FOR_EACH( \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL_C, \
- _, \
- BOOST_PP_SEQ_TAIL(SEQ)))
-#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(SEQ) \
- BOOST_PP_IF( \
- BOOST_PP_SEQ_HEAD(SEQ), \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL, \
- BOOST_PP_TUPLE_EAT(1))(SEQ)
-
-#ifdef BOOST_MSVC
-# define BOOST_FUSION_ATTRIBUTE_TYPEOF( \
- NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
- \
- BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
- TEMPLATE_PARAMS_SEQ) \
- \
- struct deduced_attr_type { \
- static const BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \
- typedef \
- BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \
- BOOST_TYPEOF( PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \
- 0, ATTRIBUTE)) \
- type; \
- }; \
- \
- typedef \
- BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \
- deduced_attr_type::type attribute_type;
-
-#else
-# define BOOST_FUSION_ATTRIBUTE_TYPEOF( \
- NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
- \
- struct deduced_attr_type { \
- static const BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \
- typedef BOOST_TYPEOF( \
- PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, 0, ATTRIBUTE)) \
- type; \
- }; \
- \
- typedef \
- BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \
- deduced_attr_type::type attribute_type;
-
-#endif
-
-#define BOOST_FUSION_ATTRIBUTE_GIVENTYPE( \
- NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
- typedef \
- BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, 0, ATTRIBUTE) attribute_type;
-
-
-#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
-# define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
- MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
- \
- template< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
- > \
- struct tag_of< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) MODIFIER \
- , void \
- > \
- { \
- typedef TAG type; \
- };
-#else
-# define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
- MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
- \
- template< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
- > \
- struct tag_of<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) MODIFIER> \
- { \
- typedef TAG type; \
- };
-#endif
-
-#define BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL(R,DATA,I,ATTRIBUTE) \
- BOOST_PP_TUPLE_ELEM(4,0,DATA)( \
- BOOST_PP_TUPLE_ELEM(4,1,DATA), \
- BOOST_PP_TUPLE_ELEM(4,2,DATA), \
- BOOST_PP_TUPLE_ELEM(4,3,DATA), \
- I, \
- ATTRIBUTE)
-
-#ifdef BOOST_MSVC
-# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM(R,_,ELEM) \
- typedef ELEM ELEM;
-# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL(SEQ) \
- BOOST_PP_SEQ_FOR_EACH( \
- BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM, \
- _, \
- BOOST_PP_SEQ_TAIL(SEQ))
-# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ) \
- BOOST_PP_IF( \
- BOOST_PP_SEQ_HEAD(SEQ), \
- BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL, \
- BOOST_PP_TUPLE_EAT(1))(SEQ)
-#else
-# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ)
-#endif
-
-#define BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
- TEMPLATE_PARAMS_SEQ,NAME_SEQ,IS_VIEW, \
- I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPLE_SIZE, \
- DEDUCE_TYPE) \
- \
- template< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
- > \
- struct access::struct_member< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
- , I \
- > \
- { \
- BOOST_PP_IF(DEDUCE_TYPE, \
- BOOST_FUSION_ATTRIBUTE_TYPEOF, BOOST_FUSION_ATTRIBUTE_GIVENTYPE)( \
- NAME_SEQ, \
- ATTRIBUTE, \
- ATTRIBUTE_TUPLE_SIZE, \
- PREFIX, \
- TEMPLATE_PARAMS_SEQ) \
- \
- BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
- TEMPLATE_PARAMS_SEQ) \
- \
- typedef attribute_type type; \
- \
- template<typename Seq> \
- struct apply \
- { \
- typedef typename \
- add_reference< \
- typename mpl::eval_if< \
- is_const<Seq> \
- , add_const<attribute_type> \
- , mpl::identity<attribute_type> \
- >::type \
- >::type \
- type; \
- \
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
- static type \
- call(Seq& seq) \
- { \
- return seq.PREFIX() \
- BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \
- BOOST_PP_NOT(DEDUCE_TYPE), ATTRIBUTE); \
- } \
- }; \
- }; \
- \
- template< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
- > \
- struct struct_member_name< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
- , I \
- > \
- { \
- typedef char const* type; \
- \
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
- static type \
- call() \
- { \
- return BOOST_PP_STRINGIZE( \
- BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \
- BOOST_PP_NOT(DEDUCE_TYPE), ATTRIBUTE)); \
- } \
- };
-
-#define BOOST_FUSION_ADAPT_STRUCT_BASE( \
- TEMPLATE_PARAMS_SEQ, \
- NAME_SEQ, \
- TAG, \
- IS_VIEW, \
- ATTRIBUTES_SEQ, \
- ATTRIBUTES_CALLBACK) \
- \
-namespace boost \
-{ \
- namespace fusion \
- { \
- namespace traits \
- { \
- BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
- BOOST_PP_EMPTY(), TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
- BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
- const, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
- } \
- \
- namespace extension \
- { \
- BOOST_PP_IF( \
- BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
- BOOST_PP_SEQ_FOR_EACH_I_R, \
- BOOST_PP_TUPLE_EAT(4))( \
- 1, \
- BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL, \
- (ATTRIBUTES_CALLBACK,TEMPLATE_PARAMS_SEQ,NAME_SEQ, IS_VIEW),\
- BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ)) \
- \
- template< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
- TEMPLATE_PARAMS_SEQ) \
- > \
- struct struct_size<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)> \
- : mpl::int_<BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ))> \
- {}; \
- \
- template< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
- TEMPLATE_PARAMS_SEQ) \
- > \
- struct struct_is_view< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
- > \
- : mpl::BOOST_PP_IIF(IS_VIEW,true_,false_) \
- {}; \
- } \
- } \
- \
- namespace mpl \
- { \
- template<typename> \
- struct sequence_tag; \
- \
- template< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
- TEMPLATE_PARAMS_SEQ) \
- > \
- struct sequence_tag<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)> \
- { \
- typedef fusion::fusion_sequence_tag type; \
- }; \
- \
- template< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
- TEMPLATE_PARAMS_SEQ) \
- > \
- struct sequence_tag< \
- BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const \
- > \
- { \
- typedef fusion::fusion_sequence_tag type; \
- }; \
- } \
-}
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/value_at_impl.hpp b/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/value_at_impl.hpp
deleted file mode 100644
index a2dd5fcdca3..00000000000
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/value_at_impl.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*=============================================================================
- Copyright (c) 2014,2018 Kohei Takahashi
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-#ifndef FUSION_VALUE_AT_IMPL_16122014_1641
-#define FUSION_VALUE_AT_IMPL_16122014_1641
-
-#include <boost/fusion/support/config.hpp>
-#include <boost/fusion/container/vector/detail/config.hpp>
-
-///////////////////////////////////////////////////////////////////////////////
-// Without variadics, we will use the PP version
-///////////////////////////////////////////////////////////////////////////////
-#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
-# include <boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp>
-#else
-
-///////////////////////////////////////////////////////////////////////////////
-// C++11 interface
-///////////////////////////////////////////////////////////////////////////////
-#include <boost/fusion/container/vector/vector_fwd.hpp>
-#include <boost/type_traits/declval.hpp>
-#include <boost/mpl/identity.hpp>
-
-namespace boost { namespace fusion
-{
- struct vector_tag;
-
- namespace vector_detail
- {
- template <std::size_t I, typename T>
- struct store;
-
- template <std::size_t N, typename U>
- static inline BOOST_FUSION_GPU_ENABLED
- mpl::identity<U> value_at_impl(store<N, U> const volatile*);
- }
-
- namespace extension
- {
- template <typename Tag>
- struct value_at_impl;
-
- template <>
- struct value_at_impl<vector_tag>
- {
- template <typename Sequence, typename N>
- struct apply
- {
- typedef typename BOOST_FUSION_IDENTIFIED_TYPE((
- vector_detail::value_at_impl<N::value>(boost::declval<Sequence*>())
- )) type;
- };
- };
- }
-}}
-
-#endif
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/vector.hpp b/src/third_party/boost-1.68.0/boost/fusion/container/vector/vector.hpp
deleted file mode 100644
index 4993e2eb7c8..00000000000
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/vector.hpp
+++ /dev/null
@@ -1,322 +0,0 @@
-/*=============================================================================
- Copyright (c) 2014-2015 Kohei Takahashi
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-#ifndef FUSION_VECTOR_11052014_1625
-#define FUSION_VECTOR_11052014_1625
-
-#include <boost/config.hpp>
-#include <boost/fusion/support/config.hpp>
-#include <boost/fusion/container/vector/detail/config.hpp>
-#include <boost/fusion/container/vector/vector_fwd.hpp>
-
-///////////////////////////////////////////////////////////////////////////////
-// Without variadics, we will use the PP version
-///////////////////////////////////////////////////////////////////////////////
-#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
-# include <boost/fusion/container/vector/detail/cpp03/vector.hpp>
-#else
-
-///////////////////////////////////////////////////////////////////////////////
-// C++11 interface
-///////////////////////////////////////////////////////////////////////////////
-#include <boost/fusion/support/sequence_base.hpp>
-#include <boost/fusion/support/is_sequence.hpp>
-#include <boost/fusion/support/detail/and.hpp>
-#include <boost/fusion/support/detail/index_sequence.hpp>
-#include <boost/fusion/container/vector/detail/at_impl.hpp>
-#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
-#include <boost/fusion/container/vector/detail/begin_impl.hpp>
-#include <boost/fusion/container/vector/detail/end_impl.hpp>
-#include <boost/fusion/sequence/intrinsic/begin.hpp>
-#include <boost/fusion/sequence/intrinsic/size.hpp>
-#include <boost/fusion/iterator/advance.hpp>
-#include <boost/fusion/iterator/deref.hpp>
-#include <boost/core/enable_if.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <cstddef>
-#include <utility>
-
-namespace boost { namespace fusion
-{
- struct vector_tag;
- struct random_access_traversal_tag;
-
- namespace vector_detail
- {
- struct each_elem {};
-
- template <
- typename This, typename T, typename T_, std::size_t Size, bool IsSeq
- >
- struct can_convert_impl : false_type {};
-
- template <typename This, typename T, typename Sequence, std::size_t Size>
- struct can_convert_impl<This, T, Sequence, Size, true> : true_type {};
-
- template <typename This, typename Sequence, typename T>
- struct can_convert_impl<This, Sequence, T, 1, true>
- : integral_constant<
- bool
- , !is_convertible<
- Sequence
- , typename fusion::extension::value_at_impl<vector_tag>::
- template apply< This, mpl::int_<0> >::type
- >::value
- >
- {};
-
- template <typename This, typename T, typename T_, std::size_t Size>
- struct can_convert
- : can_convert_impl<
- This, T, T_, Size, traits::is_sequence<T_>::value
- >
- {};
-
- template <typename T, bool IsSeq, std::size_t Size>
- struct is_longer_sequence_impl : false_type {};
-
- template <typename Sequence, std::size_t Size>
- struct is_longer_sequence_impl<Sequence, true, Size>
- : integral_constant<
- bool, (fusion::result_of::size<Sequence>::value >= Size)
- >
- {};
-
- template<typename T, std::size_t Size>
- struct is_longer_sequence
- : is_longer_sequence_impl<T, traits::is_sequence<T>::value, Size>
- {};
-
- // forward_at_c allows to access Nth element even if ForwardSequence
- // since fusion::at_c requires RandomAccessSequence.
- namespace result_of
- {
- template <typename Sequence, int N>
- struct forward_at_c
- : fusion::result_of::deref<
- typename fusion::result_of::advance_c<
- typename fusion::result_of::begin<
- typename remove_reference<Sequence>::type
- >::type
- , N
- >::type
- >
- {};
- }
-
- template <int N, typename Sequence>
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- inline typename result_of::forward_at_c<Sequence, N>::type
- forward_at_c(Sequence&& seq)
- {
- typedef typename
- result_of::forward_at_c<Sequence, N>::type
- result;
- return std::forward<result>(*advance_c<N>(begin(seq)));
- }
-
- // Object proxy since preserve object order
- template <std::size_t, typename T>
- struct store
- {
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- store()
- : elem() // value-initialized explicitly
- {}
-
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- store(store const& rhs)
- : elem(rhs.elem)
- {}
-
- BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- store&
- operator=(store const& rhs)
- {
- elem = rhs.elem;
- return *this;
- }
-
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- store(store&& rhs)
- : elem(static_cast<T&&>(rhs.elem))
- {}
-
- BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- store&
- operator=(store&& rhs)
- {
- elem = static_cast<T&&>(rhs.elem);
- return *this;
- }
-
- template <
- typename U
- , typename = typename boost::disable_if<
- is_base_of<store, typename remove_reference<U>::type>
- >::type
- >
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- store(U&& rhs)
- : elem(std::forward<U>(rhs))
- {}
-
- T elem;
- };
-
- template <typename I, typename ...T>
- struct vector_data;
-
- template <std::size_t ...I, typename ...T>
- struct vector_data<detail::index_sequence<I...>, T...>
- : store<I, T>...
- , sequence_base<vector_data<detail::index_sequence<I...>, T...> >
- {
- typedef vector_tag fusion_tag;
- typedef fusion_sequence_tag tag; // this gets picked up by MPL
- typedef mpl::false_ is_view;
- typedef random_access_traversal_tag category;
- typedef mpl::int_<sizeof...(T)> size;
- typedef vector<T...> type_sequence;
-
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- BOOST_DEFAULTED_FUNCTION(vector_data(), {})
-
- template <
- typename Sequence
- , typename Sequence_ = typename remove_reference<Sequence>::type
- , typename = typename boost::enable_if<
- can_convert<vector_data, Sequence, Sequence_, sizeof...(I)>
- >::type
- >
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- explicit
- vector_data(each_elem, Sequence&& rhs)
- : store<I, T>(forward_at_c<I>(std::forward<Sequence>(rhs)))...
- {}
-
- template <typename ...U>
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- explicit
- vector_data(each_elem, U&&... var)
- : store<I, T>(std::forward<U>(var))...
- {}
-
- template <typename Sequence>
- BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- void
- assign_sequence(Sequence&& seq)
- {
- assign(std::forward<Sequence>(seq), detail::index_sequence<I...>());
- }
-
- template <typename Sequence>
- BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- void
- assign(Sequence&&, detail::index_sequence<>) {}
-
- template <typename Sequence, std::size_t N, std::size_t ...M>
- BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- void
- assign(Sequence&& seq, detail::index_sequence<N, M...>)
- {
- at_impl(mpl::int_<N>()) = vector_detail::forward_at_c<N>(seq);
- assign(std::forward<Sequence>(seq), detail::index_sequence<M...>());
- }
-
- template <std::size_t N, typename U>
- static BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- U& at_detail(store<N, U>* this_)
- {
- return this_->elem;
- }
-
- template <std::size_t N, typename U>
- static BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- U const& at_detail(store<N, U> const* this_)
- {
- return this_->elem;
- }
-
- template <typename J>
- BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- auto at_impl(J) -> decltype(at_detail<J::value>(&std::declval<vector_data&>()))
- {
- return at_detail<J::value>(this);
- }
-
- template <typename J>
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- auto at_impl(J) const -> decltype(at_detail<J::value>(&std::declval<vector_data const&>()))
- {
- return at_detail<J::value>(this);
- }
- };
- } // namespace boost::fusion::vector_detail
-
- template <typename... T>
- struct vector
- : vector_detail::vector_data<
- typename detail::make_index_sequence<sizeof...(T)>::type
- , T...
- >
- {
- typedef vector_detail::vector_data<
- typename detail::make_index_sequence<sizeof...(T)>::type
- , T...
- > base;
-
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- BOOST_DEFAULTED_FUNCTION(vector(), {})
-
- template <
- typename... U
- , typename = typename boost::enable_if_c<(
- sizeof...(U) >= 1 &&
- fusion::detail::and_<is_convertible<U, T>...>::value &&
- !fusion::detail::and_<
- is_base_of<vector, typename remove_reference<U>::type>...
- >::value
- )>::type
- >
- // XXX: constexpr become error due to pull-request #79, booooo!!
- // In the (near) future release, should be fixed.
- /* BOOST_CONSTEXPR */ BOOST_FUSION_GPU_ENABLED
- explicit vector(U&&... u)
- : base(vector_detail::each_elem(), std::forward<U>(u)...)
- {}
-
- template <
- typename Sequence
- , typename = typename boost::enable_if_c<
- vector_detail::is_longer_sequence<
- typename remove_reference<Sequence>::type, sizeof...(T)
- >::value
- >::type
- >
- BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- vector(Sequence&& seq)
- : base(vector_detail::each_elem(), std::forward<Sequence>(seq))
- {}
-
- template <typename Sequence>
- BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
- vector&
- operator=(Sequence&& rhs)
- {
- base::assign_sequence(std::forward<Sequence>(rhs));
- return *this;
- }
- };
-}}
-
-#endif
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/config.hpp b/src/third_party/boost-1.68.0/boost/fusion/support/config.hpp
deleted file mode 100644
index d27266ed09e..00000000000
--- a/src/third_party/boost-1.68.0/boost/fusion/support/config.hpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/*=============================================================================
- Copyright (c) 2014 Eric Niebler
- Copyright (c) 2014,2015,2018 Kohei Takahashi
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-#if !defined(FUSION_SUPPORT_CONFIG_01092014_1718)
-#define FUSION_SUPPORT_CONFIG_01092014_1718
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <utility>
-
-#ifndef BOOST_FUSION_GPU_ENABLED
-#define BOOST_FUSION_GPU_ENABLED BOOST_GPU_ENABLED
-#endif
-
-// Enclose with inline namespace because unqualified lookup of GCC < 4.5 is broken.
-//
-// namespace detail {
-// struct foo;
-// struct X { };
-// }
-//
-// template <typename T> void foo(T) { }
-//
-// int main()
-// {
-// foo(detail::X());
-// // prog.cc: In function 'int main()':
-// // prog.cc:2: error: 'struct detail::foo' is not a function,
-// // prog.cc:6: error: conflict with 'template<class T> void foo(T)'
-// // prog.cc:10: error: in call to 'foo'
-// }
-namespace boost { namespace fusion { namespace detail
-{
- namespace barrier { }
- using namespace barrier;
-}}}
-#define BOOST_FUSION_BARRIER_BEGIN namespace barrier {
-#define BOOST_FUSION_BARRIER_END }
-
-
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1900))
-// All of rvalue-reference ready MSVC don't perform implicit conversion from
-// fundamental type to rvalue-reference of another fundamental type [1].
-//
-// Following example doesn't compile
-//
-// int i;
-// long &&l = i; // sigh..., std::forward<long&&>(i) also fail.
-//
-// however, following one will work.
-//
-// int i;
-// long &&l = static_cast<long &&>(i);
-//
-// OK, now can we replace all usage of std::forward to static_cast? -- I say NO!
-// All of rvalue-reference ready Clang doesn't compile above static_cast usage [2], sigh...
-//
-// References:
-// 1. https://connect.microsoft.com/VisualStudio/feedback/details/1037806/implicit-conversion-doesnt-perform-for-fund
-// 2. http://llvm.org/bugs/show_bug.cgi?id=19917
-//
-// Tentatively, we use static_cast to forward if run under MSVC.
-# define BOOST_FUSION_FWD_ELEM(type, value) static_cast<type&&>(value)
-#else
-# define BOOST_FUSION_FWD_ELEM(type, value) std::forward<type>(value)
-#endif
-
-
-// Workaround for LWG 2408: C++17 SFINAE-friendly std::iterator_traits.
-// http://cplusplus.github.io/LWG/lwg-defects.html#2408
-//
-// - GCC 4.5 enables the feature under C++11.
-// https://gcc.gnu.org/ml/gcc-patches/2014-11/msg01105.html
-//
-// - MSVC 10.0 implements iterator intrinsics; MSVC 13.0 implements LWG2408.
-#if (defined(BOOST_LIBSTDCXX_VERSION) && (BOOST_LIBSTDCXX_VERSION < 40500) && \
- defined(BOOST_LIBSTDCXX11)) || \
- (defined(BOOST_MSVC) && (1600 <= BOOST_MSVC && BOOST_MSVC < 1900))
-# define BOOST_FUSION_WORKAROUND_FOR_LWG_2408
-namespace std
-{
- template <typename>
- struct iterator_traits;
-}
-#endif
-
-
-// Workaround for older GCC that doesn't accept `this` in constexpr.
-#if BOOST_WORKAROUND(BOOST_GCC, < 40700)
-#define BOOST_FUSION_CONSTEXPR_THIS
-#else
-#define BOOST_FUSION_CONSTEXPR_THIS BOOST_CONSTEXPR
-#endif
-
-
-// Workaround for compiler which doesn't compile decltype(expr)::type.
-// It expects decltype(expr) deduced as mpl::identity<T>.
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1913)) || BOOST_WORKAROUND(BOOST_GCC, < 40700)
-# include <boost/mpl/identity.hpp>
-# define BOOST_FUSION_IDENTIFIED_TYPE(parenthesized_expr) \
- boost::mpl::identity<decltype parenthesized_expr>::type::type
-#else
-# define BOOST_FUSION_IDENTIFIED_TYPE(parenthesized_expr) \
- decltype parenthesized_expr ::type
-#endif
-
-
-// Workaround for GCC 4.6 that rejects defaulted function with noexcept.
-#if BOOST_WORKAROUND(BOOST_GCC, / 100 == 406)
-# define BOOST_FUSION_NOEXCEPT_ON_DEFAULTED
-#else
-# define BOOST_FUSION_NOEXCEPT_ON_DEFAULTED BOOST_NOEXCEPT
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/is_view.hpp b/src/third_party/boost-1.68.0/boost/fusion/support/is_view.hpp
deleted file mode 100644
index a6ca7259465..00000000000
--- a/src/third_party/boost-1.68.0/boost/fusion/support/is_view.hpp
+++ /dev/null
@@ -1,67 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2011 Joel de Guzman
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-==============================================================================*/
-#if !defined(FUSION_IS_VIEW_03202006_0015)
-#define FUSION_IS_VIEW_03202006_0015
-
-#include <boost/fusion/support/config.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/fusion/support/tag_of.hpp>
-
-namespace boost { namespace fusion
-{
- // Special tags:
- struct sequence_facade_tag;
- struct boost_tuple_tag; // boost::tuples::tuple tag
- struct boost_array_tag; // boost::array tag
- struct mpl_sequence_tag; // mpl sequence tag
- struct std_pair_tag; // std::pair tag
-
- namespace extension
- {
- template<typename Tag>
- struct is_view_impl
- {
- template <typename T>
- struct apply
- {
- typedef typename T::is_view type;
- };
- };
-
- template <>
- struct is_view_impl<sequence_facade_tag>
- {
- template <typename Sequence>
- struct apply : Sequence::is_view {};
- };
-
- template <>
- struct is_view_impl<boost_tuple_tag>;
-
- template <>
- struct is_view_impl<boost_array_tag>;
-
- template <>
- struct is_view_impl<mpl_sequence_tag>;
-
- template <>
- struct is_view_impl<std_pair_tag>;
- }
-
- namespace traits
- {
- template <typename T>
- struct is_view :
- mpl::bool_<
- (bool)extension::is_view_impl<typename fusion::detail::tag_of<T>::type>::
- template apply<T>::type::value
- >
- {};
- }
-}}
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/integer/common_factor_rt.hpp b/src/third_party/boost-1.68.0/boost/integer/common_factor_rt.hpp
deleted file mode 100644
index 341b316501c..00000000000
--- a/src/third_party/boost-1.68.0/boost/integer/common_factor_rt.hpp
+++ /dev/null
@@ -1,578 +0,0 @@
-// (C) Copyright Jeremy William Murphy 2016.
-
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_INTEGER_COMMON_FACTOR_RT_HPP
-#define BOOST_INTEGER_COMMON_FACTOR_RT_HPP
-
-#include <boost/assert.hpp>
-#include <boost/core/enable_if.hpp>
-
-#include <boost/config.hpp> // for BOOST_NESTED_TEMPLATE, etc.
-#include <boost/limits.hpp> // for std::numeric_limits
-#include <climits> // for CHAR_MIN
-#include <boost/detail/workaround.hpp>
-#include <iterator>
-#include <algorithm>
-#include <limits>
-#ifndef BOOST_NO_CXX11_HDR_TYPE_TRAITS
-#include <type_traits>
-#endif
-#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
-#include <functional>
-#endif
-
-#if ((defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
-#include <intrin.h>
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127 4244) // Conditional expression is constant
-#endif
-
-#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_CXX11_NOEXCEPT)
-#define BOOST_GCD_NOEXCEPT(T) noexcept(std::is_arithmetic<T>::value)
-#else
-#define BOOST_GCD_NOEXCEPT(T)
-#endif
-
-namespace boost {
-
- template <class I>
- class rational;
-
- namespace integer {
-
- namespace gcd_detail{
-
- //
- // some helper functions which really should be constexpr already, but sadly aren't:
- //
-#ifndef BOOST_NO_CXX14_CONSTEXPR
- template <class T>
- inline constexpr T constexpr_min(T const& a, T const& b) BOOST_GCD_NOEXCEPT(T)
- {
- return a < b ? a : b;
- }
- template <class T>
- inline constexpr auto constexpr_swap(T&a, T& b) BOOST_GCD_NOEXCEPT(T) -> decltype(a.swap(b))
- {
- return a.swap(b);
- }
- template <class T, class U>
- inline constexpr void constexpr_swap(T&a, U& b...) BOOST_GCD_NOEXCEPT(T)
- {
- T t(static_cast<T&&>(a));
- a = static_cast<T&&>(b);
- b = static_cast<T&&>(t);
- }
-#else
- template <class T>
- inline T constexpr_min(T const& a, T const& b) BOOST_GCD_NOEXCEPT(T)
- {
- return a < b ? a : b;
- }
- template <class T>
- inline void constexpr_swap(T&a, T& b) BOOST_GCD_NOEXCEPT(T)
- {
- using std::swap;
- swap(a, b);
- }
-#endif
-
- template <class T, bool a =
-#ifndef BOOST_NO_CXX11_HDR_TYPE_TRAITS
- std::is_unsigned<T>::value ||
-#endif
- (std::numeric_limits<T>::is_specialized && !std::numeric_limits<T>::is_signed)>
- struct gcd_traits_abs_defaults
- {
- inline static BOOST_CXX14_CONSTEXPR const T& abs(const T& val) BOOST_GCD_NOEXCEPT(T) { return val; }
- };
- template <class T>
- struct gcd_traits_abs_defaults<T, false>
- {
- inline static T BOOST_CXX14_CONSTEXPR abs(const T& val) BOOST_GCD_NOEXCEPT(T)
- {
- // This sucks, but std::abs is not constexpr :(
- return val < T(0) ? -val : val;
- }
- };
-
- enum method_type
- {
- method_euclid = 0,
- method_binary = 1,
- method_mixed = 2
- };
-
- struct any_convert
- {
- template <class T>
- any_convert(const T&);
- };
-
- struct unlikely_size
- {
- char buf[9973];
- };
-
- unlikely_size operator <<= (any_convert, any_convert);
- unlikely_size operator >>= (any_convert, any_convert);
-
- template <class T>
- struct gcd_traits_defaults : public gcd_traits_abs_defaults<T>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(T& val) BOOST_GCD_NOEXCEPT(T)
- {
- unsigned r = 0;
- while(0 == (val & 1u))
- {
-#ifdef _MSC_VER // VC++ can't handle operator >>= in constexpr code for some reason
- val = val >> 1;
-#else
- val >>= 1;
-#endif
- ++r;
- }
- return r;
- }
- inline static BOOST_CXX14_CONSTEXPR bool less(const T& a, const T& b) BOOST_GCD_NOEXCEPT(T)
- {
- return a < b;
- }
-
- static T& get_value();
-
-#ifndef BOOST_NO_SFINAE
- static const bool has_operator_left_shift_equal = sizeof(get_value() <<= 2) != sizeof(unlikely_size);
- static const bool has_operator_right_shift_equal = sizeof(get_value() >>= 2) != sizeof(unlikely_size);
-#else
- static const bool has_operator_left_shift_equal = true;
- static const bool has_operator_right_shift_equal = true;
-#endif
- static const method_type method = std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer && has_operator_left_shift_equal && has_operator_right_shift_equal ? method_mixed : method_euclid;
- };
- //
- // Default gcd_traits just inherits from defaults:
- //
- template <class T>
- struct gcd_traits : public gcd_traits_defaults<T> {};
-
- //
- // Some platforms have fast bitscan operations, that allow us to implement
- // make_odd much more efficiently, unfortunately we can't use these if we want
- // the functions to be constexpr as the compiler intrinsics aren't constexpr.
- //
-#if defined(BOOST_NO_CXX14_CONSTEXPR) && ((defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
-#pragma intrinsic(_BitScanForward,)
- template <>
- struct gcd_traits<unsigned long> : public gcd_traits_defaults<unsigned long>
- {
- BOOST_FORCEINLINE static unsigned find_lsb(unsigned long val) BOOST_NOEXCEPT
- {
- unsigned long result;
- _BitScanForward(&result, val);
- return result;
- }
- BOOST_FORCEINLINE static unsigned make_odd(unsigned long& val) BOOST_NOEXCEPT
- {
- unsigned result = find_lsb(val);
- val >>= result;
- return result;
- }
- };
-
-#ifdef _M_X64
-#pragma intrinsic(_BitScanForward64)
- template <>
- struct gcd_traits<unsigned __int64> : public gcd_traits_defaults<unsigned __int64>
- {
- BOOST_FORCEINLINE static unsigned find_lsb(unsigned __int64 mask) BOOST_NOEXCEPT
- {
- unsigned long result;
- _BitScanForward64(&result, mask);
- return result;
- }
- BOOST_FORCEINLINE static unsigned make_odd(unsigned __int64& val) BOOST_NOEXCEPT
- {
- unsigned result = find_lsb(val);
- val >>= result;
- return result;
- }
- };
-#endif
- //
- // Other integer type are trivial adaptations of the above,
- // this works for signed types too, as by the time these functions
- // are called, all values are > 0.
- //
- template <> struct gcd_traits<long> : public gcd_traits_defaults<long>
- { BOOST_FORCEINLINE static unsigned make_odd(long& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
- template <> struct gcd_traits<unsigned int> : public gcd_traits_defaults<unsigned int>
- { BOOST_FORCEINLINE static unsigned make_odd(unsigned int& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
- template <> struct gcd_traits<int> : public gcd_traits_defaults<int>
- { BOOST_FORCEINLINE static unsigned make_odd(int& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
- template <> struct gcd_traits<unsigned short> : public gcd_traits_defaults<unsigned short>
- { BOOST_FORCEINLINE static unsigned make_odd(unsigned short& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
- template <> struct gcd_traits<short> : public gcd_traits_defaults<short>
- { BOOST_FORCEINLINE static unsigned make_odd(short& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
- template <> struct gcd_traits<unsigned char> : public gcd_traits_defaults<unsigned char>
- { BOOST_FORCEINLINE static unsigned make_odd(unsigned char& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
- template <> struct gcd_traits<signed char> : public gcd_traits_defaults<signed char>
- { BOOST_FORCEINLINE static signed make_odd(signed char& val)BOOST_NOEXCEPT{ signed result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
- template <> struct gcd_traits<char> : public gcd_traits_defaults<char>
- { BOOST_FORCEINLINE static unsigned make_odd(char& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
- template <> struct gcd_traits<wchar_t> : public gcd_traits_defaults<wchar_t>
- { BOOST_FORCEINLINE static unsigned make_odd(wchar_t& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
-#endif
-#ifdef _M_X64
- template <> struct gcd_traits<__int64> : public gcd_traits_defaults<__int64>
- { BOOST_FORCEINLINE static unsigned make_odd(__int64& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned __int64>::find_lsb(val); val >>= result; return result; } };
-#endif
-
-#elif defined(BOOST_GCC) || defined(__clang__) || (defined(BOOST_INTEL) && defined(__GNUC__))
-
- template <>
- struct gcd_traits<unsigned> : public gcd_traits_defaults<unsigned>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned find_lsb(unsigned mask)BOOST_NOEXCEPT
- {
- return __builtin_ctz(mask);
- }
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(unsigned& val)BOOST_NOEXCEPT
- {
- unsigned result = find_lsb(val);
- val >>= result;
- return result;
- }
- };
- template <>
- struct gcd_traits<unsigned long> : public gcd_traits_defaults<unsigned long>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned find_lsb(unsigned long mask)BOOST_NOEXCEPT
- {
- return __builtin_ctzl(mask);
- }
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(unsigned long& val)BOOST_NOEXCEPT
- {
- unsigned result = find_lsb(val);
- val >>= result;
- return result;
- }
- };
- template <>
- struct gcd_traits<boost::ulong_long_type> : public gcd_traits_defaults<boost::ulong_long_type>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned find_lsb(boost::ulong_long_type mask)BOOST_NOEXCEPT
- {
- return __builtin_ctzll(mask);
- }
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(boost::ulong_long_type& val)BOOST_NOEXCEPT
- {
- unsigned result = find_lsb(val);
- val >>= result;
- return result;
- }
- };
- //
- // Other integer type are trivial adaptations of the above,
- // this works for signed types too, as by the time these functions
- // are called, all values are > 0.
- //
- template <> struct gcd_traits<boost::long_long_type> : public gcd_traits_defaults<boost::long_long_type>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(boost::long_long_type& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<boost::ulong_long_type>::find_lsb(val); val >>= result; return result; }
- };
- template <> struct gcd_traits<long> : public gcd_traits_defaults<long>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(long& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; }
- };
- template <> struct gcd_traits<int> : public gcd_traits_defaults<int>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(int& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; }
- };
- template <> struct gcd_traits<unsigned short> : public gcd_traits_defaults<unsigned short>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(unsigned short& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
- };
- template <> struct gcd_traits<short> : public gcd_traits_defaults<short>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(short& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
- };
- template <> struct gcd_traits<unsigned char> : public gcd_traits_defaults<unsigned char>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(unsigned char& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
- };
- template <> struct gcd_traits<signed char> : public gcd_traits_defaults<signed char>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR signed make_odd(signed char& val)BOOST_NOEXCEPT { signed result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
- };
- template <> struct gcd_traits<char> : public gcd_traits_defaults<char>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(char& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
- };
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
- template <> struct gcd_traits<wchar_t> : public gcd_traits_defaults<wchar_t>
- {
- BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(wchar_t& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
- };
-#endif
-#endif
- //
- // The Mixed Binary Euclid Algorithm
- // Sidi Mohamed Sedjelmaci
- // Electronic Notes in Discrete Mathematics 35 (2009) 169-176
- //
- template <class T>
- BOOST_CXX14_CONSTEXPR T mixed_binary_gcd(T u, T v) BOOST_GCD_NOEXCEPT(T)
- {
- if(gcd_traits<T>::less(u, v))
- constexpr_swap(u, v);
-
- unsigned shifts = 0;
-
- if(u == T(0))
- return v;
- if(v == T(0))
- return u;
-
- shifts = constexpr_min(gcd_traits<T>::make_odd(u), gcd_traits<T>::make_odd(v));
-
- while(gcd_traits<T>::less(1, v))
- {
- u %= v;
- v -= u;
- if(u == T(0))
- return v << shifts;
- if(v == T(0))
- return u << shifts;
- gcd_traits<T>::make_odd(u);
- gcd_traits<T>::make_odd(v);
- if(gcd_traits<T>::less(u, v))
- constexpr_swap(u, v);
- }
- return (v == 1 ? v : u) << shifts;
- }
-
- /** Stein gcd (aka 'binary gcd')
- *
- * From Mathematics to Generic Programming, Alexander Stepanov, Daniel Rose
- */
- template <typename SteinDomain>
- BOOST_CXX14_CONSTEXPR SteinDomain Stein_gcd(SteinDomain m, SteinDomain n) BOOST_GCD_NOEXCEPT(SteinDomain)
- {
- BOOST_ASSERT(m >= 0);
- BOOST_ASSERT(n >= 0);
- if (m == SteinDomain(0))
- return n;
- if (n == SteinDomain(0))
- return m;
- // m > 0 && n > 0
- int d_m = gcd_traits<SteinDomain>::make_odd(m);
- int d_n = gcd_traits<SteinDomain>::make_odd(n);
- // odd(m) && odd(n)
- while (m != n)
- {
- if (n > m)
- constexpr_swap(n, m);
- m -= n;
- gcd_traits<SteinDomain>::make_odd(m);
- }
- // m == n
- m <<= constexpr_min(d_m, d_n);
- return m;
- }
-
-
- /** Euclidean algorithm
- *
- * From Mathematics to Generic Programming, Alexander Stepanov, Daniel Rose
- *
- */
- template <typename EuclideanDomain>
- inline BOOST_CXX14_CONSTEXPR EuclideanDomain Euclid_gcd(EuclideanDomain a, EuclideanDomain b) BOOST_GCD_NOEXCEPT(EuclideanDomain)
- {
- while (b != EuclideanDomain(0))
- {
- a %= b;
- constexpr_swap(a, b);
- }
- return a;
- }
-
-
- template <typename T>
- inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == method_mixed, T>::type
- optimal_gcd_select(T const &a, T const &b) BOOST_GCD_NOEXCEPT(T)
- {
- return gcd_detail::mixed_binary_gcd(a, b);
- }
-
- template <typename T>
- inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == method_binary, T>::type
- optimal_gcd_select(T const &a, T const &b) BOOST_GCD_NOEXCEPT(T)
- {
- return gcd_detail::Stein_gcd(a, b);
- }
-
- template <typename T>
- inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == method_euclid, T>::type
- optimal_gcd_select(T const &a, T const &b) BOOST_GCD_NOEXCEPT(T)
- {
- return gcd_detail::Euclid_gcd(a, b);
- }
-
- template <class T>
- inline BOOST_CXX14_CONSTEXPR T lcm_imp(const T& a, const T& b) BOOST_GCD_NOEXCEPT(T)
- {
- T temp = boost::integer::gcd_detail::optimal_gcd_select(a, b);
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
- return (temp != T(0)) ? T(a / temp * b) : T(0);
-#else
- return temp != T(0) ? T(a / temp * b) : T(0);
-#endif
- }
-
-} // namespace detail
-
-
-template <typename Integer>
-inline BOOST_CXX14_CONSTEXPR Integer gcd(Integer const &a, Integer const &b) BOOST_GCD_NOEXCEPT(Integer)
-{
- if(a == (std::numeric_limits<Integer>::min)())
- return a == static_cast<Integer>(0) ? gcd_detail::gcd_traits<Integer>::abs(b) : boost::integer::gcd(static_cast<Integer>(a % b), b);
- else if (b == (std::numeric_limits<Integer>::min)())
- return b == static_cast<Integer>(0) ? gcd_detail::gcd_traits<Integer>::abs(a) : boost::integer::gcd(a, static_cast<Integer>(b % a));
- return gcd_detail::optimal_gcd_select(static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(a)), static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(b)));
-}
-
-template <typename Integer>
-inline BOOST_CXX14_CONSTEXPR Integer lcm(Integer const &a, Integer const &b) BOOST_GCD_NOEXCEPT(Integer)
-{
- return gcd_detail::lcm_imp(static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(a)), static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(b)));
-}
-#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
-//
-// This looks slightly odd, but the variadic forms must have 3 or more arguments, and the variadic argument pack may be empty.
-// This matters not at all for most compilers, but Oracle C++ selects the wrong overload in the 2-arg case unless we do this.
-//
-template <typename Integer, typename... Args>
-inline BOOST_CXX14_CONSTEXPR Integer gcd(Integer const &a, Integer const &b, const Integer& c, Args const&... args) BOOST_GCD_NOEXCEPT(Integer)
-{
- Integer t = gcd(b, c, args...);
- return t == 1 ? 1 : gcd(a, t);
-}
-
-template <typename Integer, typename... Args>
-inline BOOST_CXX14_CONSTEXPR Integer lcm(Integer const &a, Integer const &b, Integer const& c, Args const&... args) BOOST_GCD_NOEXCEPT(Integer)
-{
- return lcm(a, lcm(b, c, args...));
-}
-#endif
-//
-// Special handling for rationals:
-//
-template <typename Integer>
-inline typename boost::enable_if_c<std::numeric_limits<Integer>::is_specialized, boost::rational<Integer> >::type gcd(boost::rational<Integer> const &a, boost::rational<Integer> const &b)
-{
- return boost::rational<Integer>(static_cast<Integer>(gcd(a.numerator(), b.numerator())), static_cast<Integer>(lcm(a.denominator(), b.denominator())));
-}
-
-template <typename Integer>
-inline typename boost::enable_if_c<std::numeric_limits<Integer>::is_specialized, boost::rational<Integer> >::type lcm(boost::rational<Integer> const &a, boost::rational<Integer> const &b)
-{
- return boost::rational<Integer>(static_cast<Integer>(lcm(a.numerator(), b.numerator())), static_cast<Integer>(gcd(a.denominator(), b.denominator())));
-}
-/**
- * Knuth, The Art of Computer Programming: Volume 2, Third edition, 1998
- * Chapter 4.5.2, Algorithm C: Greatest common divisor of n integers.
- *
- * Knuth counts down from n to zero but we naturally go from first to last.
- * We also return the termination position because it might be useful to know.
- *
- * Partly by quirk, partly by design, this algorithm is defined for n = 1,
- * because the gcd of {x} is x. It is not defined for n = 0.
- *
- * @tparam I Input iterator.
- * @return The gcd of the range and the iterator position at termination.
- */
-template <typename I>
-std::pair<typename std::iterator_traits<I>::value_type, I>
-gcd_range(I first, I last) BOOST_GCD_NOEXCEPT(I)
-{
- BOOST_ASSERT(first != last);
- typedef typename std::iterator_traits<I>::value_type T;
-
- T d = *first++;
- while (d != T(1) && first != last)
- {
- d = gcd(d, *first);
- first++;
- }
- return std::make_pair(d, first);
-}
-template <typename I>
-std::pair<typename std::iterator_traits<I>::value_type, I>
-lcm_range(I first, I last) BOOST_GCD_NOEXCEPT(I)
-{
- BOOST_ASSERT(first != last);
- typedef typename std::iterator_traits<I>::value_type T;
-
- T d = *first++;
- while (d != T(1) && first != last)
- {
- d = lcm(d, *first);
- first++;
- }
- return std::make_pair(d, first);
-}
-
-template < typename IntegerType >
-class gcd_evaluator
-#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
- : public std::binary_function<IntegerType, IntegerType, IntegerType>
-#endif
-{
-public:
-#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
- typedef IntegerType first_argument_type;
- typedef IntegerType second_argument_type;
- typedef IntegerType result_type;
-#endif
- IntegerType operator()(IntegerType const &a, IntegerType const &b)const
- {
- return boost::integer::gcd(a, b);
- }
-};
-
-template < typename IntegerType >
-class lcm_evaluator
-#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
- : public std::binary_function<IntegerType, IntegerType, IntegerType>
-#endif
-{
-public:
-#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
- typedef IntegerType first_argument_type;
- typedef IntegerType second_argument_type;
- typedef IntegerType result_type;
-#endif
- IntegerType operator()(IntegerType const &a, IntegerType const &b)const
- {
- return boost::integer::lcm(a, b);
- }
-};
-
-} // namespace integer
-} // namespace boost
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_INTEGER_COMMON_FACTOR_RT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/file_wrapper.hpp b/src/third_party/boost-1.68.0/boost/interprocess/detail/file_wrapper.hpp
deleted file mode 100644
index 58f28e97f81..00000000000
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/file_wrapper.hpp
+++ /dev/null
@@ -1,212 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2012. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTERPROCESS_DETAIL_FILE_WRAPPER_HPP
-#define BOOST_INTERPROCESS_DETAIL_FILE_WRAPPER_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/interprocess/detail/config_begin.hpp>
-#include <boost/interprocess/detail/workaround.hpp>
-#include <boost/interprocess/detail/os_file_functions.hpp>
-#include <boost/interprocess/creation_tags.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/interprocess/creation_tags.hpp>
-#include <boost/interprocess/detail/simple_swap.hpp>
-
-namespace boost {
-namespace interprocess {
-namespace ipcdetail{
-
-class file_wrapper
-{
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- BOOST_MOVABLE_BUT_NOT_COPYABLE(file_wrapper)
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
- public:
-
- //!Default constructor.
- //!Represents an empty file_wrapper.
- file_wrapper();
-
- //!Creates a file object with name "name" and mode "mode", with the access mode "mode"
- //!If the file previously exists, throws an error.
- file_wrapper(create_only_t, const char *name, mode_t mode, const permissions &perm = permissions())
- { this->priv_open_or_create(ipcdetail::DoCreate, name, mode, perm); }
-
- //!Tries to create a file with name "name" and mode "mode", with the
- //!access mode "mode". If the file previously exists, it tries to open it with mode "mode".
- //!Otherwise throws an error.
- file_wrapper(open_or_create_t, const char *name, mode_t mode, const permissions &perm = permissions())
- { this->priv_open_or_create(ipcdetail::DoOpenOrCreate, name, mode, perm); }
-
- //!Tries to open a file with name "name", with the access mode "mode".
- //!If the file does not previously exist, it throws an error.
- file_wrapper(open_only_t, const char *name, mode_t mode)
- { this->priv_open_or_create(ipcdetail::DoOpen, name, mode, permissions()); }
-
- //!Moves the ownership of "moved"'s file to *this.
- //!After the call, "moved" does not represent any file.
- //!Does not throw
- file_wrapper(BOOST_RV_REF(file_wrapper) moved)
- : m_handle(file_handle_t(ipcdetail::invalid_file()))
- { this->swap(moved); }
-
- //!Moves the ownership of "moved"'s file to *this.
- //!After the call, "moved" does not represent any file.
- //!Does not throw
- file_wrapper &operator=(BOOST_RV_REF(file_wrapper) moved)
- {
- file_wrapper tmp(boost::move(moved));
- this->swap(tmp);
- return *this;
- }
-
- //!Swaps to file_wrappers.
- //!Does not throw
- void swap(file_wrapper &other);
-
- //!Erases a file from the system.
- //!Returns false on error. Never throws
- static bool remove(const char *name);
-
- //!Sets the size of the file
- void truncate(offset_t length);
-
- //!Closes the
- //!file
- ~file_wrapper();
-
- //!Returns the name of the file
- //!used in the constructor
- const char *get_name() const;
-
- //!Returns the name of the file
- //!used in the constructor
- bool get_size(offset_t &size) const;
-
- //!Returns access mode
- //!used in the constructor
- mode_t get_mode() const;
-
- //!Get mapping handle
- //!to use with mapped_region
- mapping_handle_t get_mapping_handle() const;
-
- private:
- //!Closes a previously opened file mapping. Never throws.
- void priv_close();
- //!Closes a previously opened file mapping. Never throws.
- bool priv_open_or_create(ipcdetail::create_enum_t type, const char *filename, mode_t mode, const permissions &perm);
-
- file_handle_t m_handle;
- mode_t m_mode;
- std::string m_filename;
-};
-
-inline file_wrapper::file_wrapper()
- : m_handle(file_handle_t(ipcdetail::invalid_file()))
-{}
-
-inline file_wrapper::~file_wrapper()
-{ this->priv_close(); }
-
-inline const char *file_wrapper::get_name() const
-{ return m_filename.c_str(); }
-
-inline bool file_wrapper::get_size(offset_t &size) const
-{ return get_file_size((file_handle_t)m_handle, size); }
-
-inline void file_wrapper::swap(file_wrapper &other)
-{
- (simple_swap)(m_handle, other.m_handle);
- (simple_swap)(m_mode, other.m_mode);
- m_filename.swap(other.m_filename);
-}
-
-inline mapping_handle_t file_wrapper::get_mapping_handle() const
-{ return mapping_handle_from_file_handle(m_handle); }
-
-inline mode_t file_wrapper::get_mode() const
-{ return m_mode; }
-
-inline bool file_wrapper::priv_open_or_create
- (ipcdetail::create_enum_t type,
- const char *filename,
- mode_t mode,
- const permissions &perm = permissions())
-{
- m_filename = filename;
-
- if(mode != read_only && mode != read_write){
- error_info err(mode_error);
- throw interprocess_exception(err);
- }
-
- //Open file existing native API to obtain the handle
- switch(type){
- case ipcdetail::DoOpen:
- m_handle = open_existing_file(filename, mode);
- break;
- case ipcdetail::DoCreate:
- m_handle = create_new_file(filename, mode, perm);
- break;
- case ipcdetail::DoOpenOrCreate:
- m_handle = create_or_open_file(filename, mode, perm);
- break;
- default:
- {
- error_info err = other_error;
- throw interprocess_exception(err);
- }
- }
-
- //Check for error
- if(m_handle == invalid_file()){
- error_info err = system_error_code();
- throw interprocess_exception(err);
- }
-
- m_mode = mode;
- return true;
-}
-
-inline bool file_wrapper::remove(const char *filename)
-{ return delete_file(filename); }
-
-inline void file_wrapper::truncate(offset_t length)
-{
- if(!truncate_file(m_handle, length)){
- error_info err(system_error_code());
- throw interprocess_exception(err);
- }
-}
-
-inline void file_wrapper::priv_close()
-{
- if(m_handle != invalid_file()){
- close_file(m_handle);
- m_handle = invalid_file();
- }
-}
-
-} //namespace ipcdetail{
-} //namespace interprocess {
-} //namespace boost {
-
-#include <boost/interprocess/detail/config_end.hpp>
-
-#endif //BOOST_INTERPROCESS_DETAIL_FILE_WRAPPER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/win32_api.hpp b/src/third_party/boost-1.68.0/boost/interprocess/detail/win32_api.hpp
deleted file mode 100644
index c948a556bb9..00000000000
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/win32_api.hpp
+++ /dev/null
@@ -1,2468 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTERPROCESS_WIN32_API_HPP
-#define BOOST_INTERPROCESS_WIN32_API_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/interprocess/detail/config_begin.hpp>
-#include <boost/interprocess/detail/workaround.hpp>
-#include <boost/date_time/filetime_functions.hpp>
-#include <cstddef>
-#include <cstring>
-#include <cstdlib>
-#include <cstdio>
-
-#include <boost/assert.hpp>
-#include <string>
-#include <vector>
-
-//#define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
-//#define BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED
-//#define BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
-
-#ifdef BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
-# define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME_VALUE 1
-#else
-# define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME_VALUE 0
-#endif
-
-#ifdef BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED
-# define BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED_VALUE 1
-#else
-# define BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED_VALUE 0
-#endif
-
-#ifdef BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
-# define BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED_VALUE 1
-#else
-# define BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED_VALUE 0
-#endif
-
-#define BOOST_INTERPROCESS_BOOTSTAMP_VALUE_SUM \
- (BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED_VALUE + \
- BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED_VALUE + \
- BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME_VALUE)
-
-#if 1 < BOOST_INTERPROCESS_BOOTSTAMP_VALUE_SUM
-# error "Only one of BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME, \
- BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED and \
- BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED can be defined"
-#endif
-
-#if 0 == BOOST_INTERPROCESS_BOOTSTAMP_VALUE_SUM
-# define BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED
-#endif
-
-#ifdef BOOST_USE_WINDOWS_H
-#include <windows.h>
-# if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME)
-# include <wbemidl.h>
-# include <objbase.h>
-# endif
-
-#include <shlobj.h>
-#endif
-
-#if defined(_MSC_VER)
-# pragma once
-# pragma comment( lib, "Advapi32.lib" )
-# pragma comment( lib, "oleaut32.lib" )
-# pragma comment( lib, "Ole32.lib" )
-# pragma comment( lib, "Shell32.lib" ) //SHGetFolderPath
-#endif
-
-#if defined (BOOST_INTERPROCESS_WINDOWS)
-# include <cstdarg>
-# include <boost/detail/interlocked.hpp>
-#else
-# error "This file can only be included in Windows OS"
-#endif
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Declaration of Windows structures or typedefs if BOOST_USE_WINDOWS_H is used
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//Ignore -pedantic errors here (anonymous structs, etc.)
-#if defined(BOOST_GCC)
-# if (BOOST_GCC >= 40600)
-# pragma GCC diagnostic push
-# if (BOOST_GCC >= 60000)
-# pragma GCC diagnostic ignored "-Wpedantic"
-# else
-# pragma GCC diagnostic ignored "-pedantic"
-# endif
-# else
-# pragma GCC system_header
-# endif
-#endif
-
-namespace boost {
-namespace interprocess {
-namespace winapi {
-
-//Own defines
-static const unsigned long MaxPath = 260;
-
-#ifndef BOOST_USE_WINDOWS_H
-
-struct GUID_BIPC
-{
- unsigned long Data1;
- unsigned short Data2;
- unsigned short Data3;
- unsigned char Data4[8];
-};
-
-#if defined(_MSC_VER)
-#pragma warning (push)
-#pragma warning (disable : 4201) // nonstandard extension used
-#endif
-
-struct decimal
-{
- unsigned short wReserved;
- union {
- struct {
- unsigned char scale;
- unsigned char sign;
- };
- unsigned short signscale;
- };
- unsigned long Hi32;
- union {
- struct {
- unsigned long Lo32;
- unsigned long Mid32;
- };
- ::boost::ulong_long_type Lo64;
- };
-};
-
-typedef unsigned short *bstr;
-
-
-struct wchar_variant
-{
- union
- {
- struct
- {
- unsigned short vt;
- unsigned short wReserved1;
- unsigned short wReserved2;
- unsigned short wReserved3;
- union
- {
- bstr bstrVal;
- struct
- {
- void* pvRecord;
- void* pRecInfo;
- };
- };
- };
- decimal decVal;
- };
-};
-
-#if defined(_MSC_VER)
-#pragma warning (pop)
-#endif
-
-struct IUnknown_BIPC
-{
- public:
- virtual long __stdcall QueryInterface(
- const GUID_BIPC &riid, // [in]
- void **ppvObject) = 0; // [iid_is][out]
-
- virtual unsigned long __stdcall AddRef (void) = 0;
- virtual unsigned long __stdcall Release(void) = 0;
-};
-
-struct IWbemClassObject_BIPC : public IUnknown_BIPC
-{
- public:
- virtual long __stdcall GetQualifierSet(
- /* [out] */ void **ppQualSet) = 0;
-
- virtual long __stdcall Get(
- /* [string][in] */ const bstr wszName,
- /* [in] */ long lFlags,
- /* [unique][in][out] */ wchar_variant *pVal,
- /* [unique][in][out] */ long *pType,
- /* [unique][in][out] */ long *plFlavor) = 0;
-
- virtual long __stdcall Put(
- /* [string][in] */ const bstr wszName,
- /* [in] */ long lFlags,
- /* [in] */ wchar_variant *pVal,
- /* [in] */ long Type) = 0;
-
- virtual long __stdcall Delete(
- /* [string][in] */ const bstr wszName) = 0;
-
- virtual long __stdcall GetNames(
- /* [string][in] */ const bstr wszQualifierName,
- /* [in] */ long lFlags,
- /* [in] */ wchar_variant *pQualifierVal,
- /* [out] */ void * *pNames) = 0;
-
- virtual long __stdcall BeginEnumeration(
- /* [in] */ long lEnumFlags) = 0;
-
- virtual long __stdcall Next(
- /* [in] */ long lFlags,
- /* [unique][in][out] */ bstr *strName,
- /* [unique][in][out] */ wchar_variant *pVal,
- /* [unique][in][out] */ long *pType,
- /* [unique][in][out] */ long *plFlavor) = 0;
-
- virtual long __stdcall EndEnumeration( void) = 0;
-
- virtual long __stdcall GetPropertyQualifierSet(
- /* [string][in] */ const bstr wszProperty,
- /* [out] */ void **ppQualSet) = 0;
-
- virtual long __stdcall Clone(
- /* [out] */ IWbemClassObject_BIPC **ppCopy) = 0;
-
- virtual long __stdcall GetObjectText(
- /* [in] */ long lFlags,
- /* [out] */ bstr *pstrObjectText) = 0;
-
- virtual long __stdcall SpawnDerivedClass(
- /* [in] */ long lFlags,
- /* [out] */ IWbemClassObject_BIPC **ppNewClass) = 0;
-
- virtual long __stdcall SpawnInstance(
- /* [in] */ long lFlags,
- /* [out] */ IWbemClassObject_BIPC **ppNewInstance) = 0;
-
- virtual long __stdcall CompareTo(
- /* [in] */ long lFlags,
- /* [in] */ IWbemClassObject_BIPC *pCompareTo) = 0;
-
- virtual long __stdcall GetPropertyOrigin(
- /* [string][in] */ const bstr wszName,
- /* [out] */ bstr *pstrClassName) = 0;
-
- virtual long __stdcall InheritsFrom(
- /* [in] */ const bstr strAncestor) = 0;
-
- virtual long __stdcall GetMethod(
- /* [string][in] */ const bstr wszName,
- /* [in] */ long lFlags,
- /* [out] */ IWbemClassObject_BIPC **ppInSignature,
- /* [out] */ IWbemClassObject_BIPC **ppOutSignature) = 0;
-
- virtual long __stdcall PutMethod(
- /* [string][in] */ const bstr wszName,
- /* [in] */ long lFlags,
- /* [in] */ IWbemClassObject_BIPC *pInSignature,
- /* [in] */ IWbemClassObject_BIPC *pOutSignature) = 0;
-
- virtual long __stdcall DeleteMethod(
- /* [string][in] */ const bstr wszName) = 0;
-
- virtual long __stdcall BeginMethodEnumeration(
- /* [in] */ long lEnumFlags) = 0;
-
- virtual long __stdcall NextMethod(
- /* [in] */ long lFlags,
- /* [unique][in][out] */ bstr *pstrName,
- /* [unique][in][out] */ IWbemClassObject_BIPC **ppInSignature,
- /* [unique][in][out] */ IWbemClassObject_BIPC **ppOutSignature) = 0;
-
- virtual long __stdcall EndMethodEnumeration( void) = 0;
-
- virtual long __stdcall GetMethodQualifierSet(
- /* [string][in] */ const bstr wszMethod,
- /* [out] */ void **ppQualSet) = 0;
-
- virtual long __stdcall GetMethodOrigin(
- /* [string][in] */ const bstr wszMethodName,
- /* [out] */ bstr *pstrClassName) = 0;
-
-};
-
-struct IWbemContext_BIPC : public IUnknown_BIPC
-{
-public:
- virtual long __stdcall Clone(
- /* [out] */ IWbemContext_BIPC **ppNewCopy) = 0;
-
- virtual long __stdcall GetNames(
- /* [in] */ long lFlags,
- /* [out] */ void * *pNames) = 0;
-
- virtual long __stdcall BeginEnumeration(
- /* [in] */ long lFlags) = 0;
-
- virtual long __stdcall Next(
- /* [in] */ long lFlags,
- /* [out] */ bstr *pstrName,
- /* [out] */ wchar_variant *pValue) = 0;
-
- virtual long __stdcall EndEnumeration( void) = 0;
-
- virtual long __stdcall SetValue(
- /* [string][in] */ const bstr wszName,
- /* [in] */ long lFlags,
- /* [in] */ wchar_variant *pValue) = 0;
-
- virtual long __stdcall GetValue(
- /* [string][in] */ const bstr wszName,
- /* [in] */ long lFlags,
- /* [out] */ wchar_variant *pValue) = 0;
-
- virtual long __stdcall DeleteValue(
- /* [string][in] */ const bstr wszName,
- /* [in] */ long lFlags) = 0;
-
- virtual long __stdcall DeleteAll( void) = 0;
-
-};
-
-
-struct IEnumWbemClassObject_BIPC : public IUnknown_BIPC
-{
-public:
- virtual long __stdcall Reset( void) = 0;
-
- virtual long __stdcall Next(
- /* [in] */ long lTimeout,
- /* [in] */ unsigned long uCount,
- /* [length_is][size_is][out] */ IWbemClassObject_BIPC **apObjects,
- /* [out] */ unsigned long *puReturned) = 0;
-
- virtual long __stdcall NextAsync(
- /* [in] */ unsigned long uCount,
- /* [in] */ void *pSink) = 0;
-
- virtual long __stdcall Clone(
- /* [out] */ void **ppEnum) = 0;
-
- virtual long __stdcall Skip(
- /* [in] */ long lTimeout,
- /* [in] */ unsigned long nCount) = 0;
-
-};
-
-struct IWbemServices_BIPC : public IUnknown_BIPC
-{
-public:
- virtual long __stdcall OpenNamespace(
- /* [in] */ const bstr strNamespace,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [unique][in][out] */ void **ppWorkingNamespace,
- /* [unique][in][out] */ void **ppResult) = 0;
-
- virtual long __stdcall CancelAsyncCall(
- /* [in] */ void *pSink) = 0;
-
- virtual long __stdcall QueryObjectSink(
- /* [in] */ long lFlags,
- /* [out] */ void **ppResponseHandler) = 0;
-
- virtual long __stdcall GetObject(
- /* [in] */ const bstr strObjectPath,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [unique][in][out] */ void **ppObject,
- /* [unique][in][out] */ void **ppCallResult) = 0;
-
- virtual long __stdcall GetObjectAsync(
- /* [in] */ const bstr strObjectPath,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall PutClass(
- /* [in] */ IWbemClassObject_BIPC *pObject,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [unique][in][out] */ void **ppCallResult) = 0;
-
- virtual long __stdcall PutClassAsync(
- /* [in] */ IWbemClassObject_BIPC *pObject,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall DeleteClass(
- /* [in] */ const bstr strClass,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [unique][in][out] */ void **ppCallResult) = 0;
-
- virtual long __stdcall DeleteClassAsync(
- /* [in] */ const bstr strClass,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall CreateClassEnum(
- /* [in] */ const bstr strSuperclass,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [out] */ void **ppEnum) = 0;
-
- virtual long __stdcall CreateClassEnumAsync(
- /* [in] */ const bstr strSuperclass,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall PutInstance(
- /* [in] */ void *pInst,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [unique][in][out] */ void **ppCallResult) = 0;
-
- virtual long __stdcall PutInstanceAsync(
- /* [in] */ void *pInst,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall DeleteInstance(
- /* [in] */ const bstr strObjectPath,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [unique][in][out] */ void **ppCallResult) = 0;
-
- virtual long __stdcall DeleteInstanceAsync(
- /* [in] */ const bstr strObjectPath,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall CreateInstanceEnum(
- /* [in] */ const bstr strFilter,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [out] */ void **ppEnum) = 0;
-
- virtual long __stdcall CreateInstanceEnumAsync(
- /* [in] */ const bstr strFilter,
- /* [in] */ long lFlags,
- /* [in] */ void *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall ExecQuery(
- /* [in] */ const bstr strQueryLanguage,
- /* [in] */ const bstr strQuery,
- /* [in] */ long lFlags,
- /* [in] */ IWbemContext_BIPC *pCtx,
- /* [out] */ IEnumWbemClassObject_BIPC **ppEnum) = 0;
-
- virtual long __stdcall ExecQueryAsync(
- /* [in] */ const bstr strQueryLanguage,
- /* [in] */ const bstr strQuery,
- /* [in] */ long lFlags,
- /* [in] */ IWbemContext_BIPC *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall ExecNotificationQuery(
- /* [in] */ const bstr strQueryLanguage,
- /* [in] */ const bstr strQuery,
- /* [in] */ long lFlags,
- /* [in] */ IWbemContext_BIPC *pCtx,
- /* [out] */ void **ppEnum) = 0;
-
- virtual long __stdcall ExecNotificationQueryAsync(
- /* [in] */ const bstr strQueryLanguage,
- /* [in] */ const bstr strQuery,
- /* [in] */ long lFlags,
- /* [in] */ IWbemContext_BIPC *pCtx,
- /* [in] */ void *pResponseHandler) = 0;
-
- virtual long __stdcall ExecMethod(
- /* [in] */ const bstr strObjectPath,
- /* [in] */ const bstr strMethodName,
- /* [in] */ long lFlags,
- /* [in] */ IWbemContext_BIPC *pCtx,
- /* [in] */ IWbemClassObject_BIPC *pInParams,
- /* [unique][in][out] */ IWbemClassObject_BIPC **ppOutParams,
- /* [unique][in][out] */ void **ppCallResult) = 0;
-
- virtual long __stdcall ExecMethodAsync(
- /* [in] */ const bstr strObjectPath,
- /* [in] */ const bstr strMethodName,
- /* [in] */ long lFlags,
- /* [in] */ IWbemContext_BIPC *pCtx,
- /* [in] */ IWbemClassObject_BIPC *pInParams,
- /* [in] */ void *pResponseHandler) = 0;
-
-};
-
-struct IWbemLocator_BIPC : public IUnknown_BIPC
-{
-public:
- virtual long __stdcall ConnectServer(
- /* [in] */ const bstr strNetworkResource,
- /* [in] */ const bstr strUser,
- /* [in] */ const bstr strPassword,
- /* [in] */ const bstr strLocale,
- /* [in] */ long lSecurityFlags,
- /* [in] */ const bstr strAuthority,
- /* [in] */ void *pCtx,
- /* [out] */ IWbemServices_BIPC **ppNamespace) = 0;
-
-};
-
-struct interprocess_overlapped
-{
- unsigned long *internal;
- unsigned long *internal_high;
- union {
- struct {
- unsigned long offset;
- unsigned long offset_high;
- }dummy;
- void *pointer;
- };
-
- void *h_event;
-};
-
-
-struct interprocess_filetime
-{
- unsigned long dwLowDateTime;
- unsigned long dwHighDateTime;
-};
-
-struct win32_find_data
-{
- unsigned long dwFileAttributes;
- interprocess_filetime ftCreationTime;
- interprocess_filetime ftLastAccessTime;
- interprocess_filetime ftLastWriteTime;
- unsigned long nFileSizeHigh;
- unsigned long nFileSizeLow;
- unsigned long dwReserved0;
- unsigned long dwReserved1;
- char cFileName[MaxPath];
- char cAlternateFileName[14];
-};
-
-struct interprocess_security_attributes
-{
- unsigned long nLength;
- void *lpSecurityDescriptor;
- int bInheritHandle;
-};
-
-struct system_info {
- union {
- unsigned long dwOemId; // Obsolete field...do not use
- struct {
- unsigned short wProcessorArchitecture;
- unsigned short wReserved;
- } dummy;
- };
- unsigned long dwPageSize;
- void * lpMinimumApplicationAddress;
- void * lpMaximumApplicationAddress;
- unsigned long * dwActiveProcessorMask;
- unsigned long dwNumberOfProcessors;
- unsigned long dwProcessorType;
- unsigned long dwAllocationGranularity;
- unsigned short wProcessorLevel;
- unsigned short wProcessorRevision;
-};
-
-struct interprocess_acl
-{
- unsigned char AclRevision;
- unsigned char Sbz1;
- unsigned short AclSize;
- unsigned short AceCount;
- unsigned short Sbz2;
-};
-
-struct interprocess_security_descriptor
-{
- unsigned char Revision;
- unsigned char Sbz1;
- unsigned short Control;
- void *Owner;
- void *Group;
- interprocess_acl *Sacl;
- interprocess_acl *Dacl;
-};
-
-struct interprocess_by_handle_file_information
-{
- unsigned long dwFileAttributes;
- interprocess_filetime ftCreationTime;
- interprocess_filetime ftLastAccessTime;
- interprocess_filetime ftLastWriteTime;
- unsigned long dwVolumeSerialNumber;
- unsigned long nFileSizeHigh;
- unsigned long nFileSizeLow;
- unsigned long nNumberOfLinks;
- unsigned long nFileIndexHigh;
- unsigned long nFileIndexLow;
-};
-
-struct interprocess_eventlogrecord
-{
- unsigned long Length; // Length of full record
- unsigned long Reserved; // Used by the service
- unsigned long RecordNumber; // Absolute record number
- unsigned long TimeGenerated; // Seconds since 1-1-1970
- unsigned long TimeWritten; // Seconds since 1-1-1970
- unsigned long EventID;
- unsigned short EventType;
- unsigned short NumStrings;
- unsigned short EventCategory;
- unsigned short ReservedFlags; // For use with paired events (auditing)
- unsigned long ClosingRecordNumber; // For use with paired events (auditing)
- unsigned long StringOffset; // Offset from beginning of record
- unsigned long UserSidLength;
- unsigned long UserSidOffset;
- unsigned long DataLength;
- unsigned long DataOffset; // Offset from beginning of record
- //
- // Then follow:
- //
- // wchar_t SourceName[]
- // wchar_t Computername[]
- // SID UserSid
- // wchar_t Strings[]
- // BYTE Data[]
- // CHAR Pad[]
- // unsigned long Length;
- //
-};
-
-union large_integer
-{
- __int64 QuadPart;
-};
-
-struct hinstance_struct { int unused; };
-typedef hinstance_struct *hmodule;
-
-struct hkey_struct;
-typedef hkey_struct *hkey;
-
-#ifdef _WIN64
-typedef __int64 (__stdcall *farproc_t)();
-#else
-typedef int (__stdcall *farproc_t)();
-#endif // _WIN64
-
-#else //#ifndef BOOST_USE_WINDOWS_H
-
-typedef GUID GUID_BIPC;
-typedef VARIANT wchar_variant;
-
-#if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME)
-
-typedef IUnknown IUnknown_BIPC;
-
-typedef IWbemClassObject IWbemClassObject_BIPC;
-
-typedef IWbemContext IWbemContext_BIPC;
-
-typedef IEnumWbemClassObject IEnumWbemClassObject_BIPC;
-
-typedef IWbemServices IWbemServices_BIPC;
-
-typedef IWbemLocator IWbemLocator_BIPC;
-
-#endif
-
-typedef OVERLAPPED interprocess_overlapped;
-
-typedef FILETIME interprocess_filetime;
-
-typedef WIN32_FIND_DATAA win32_find_data;
-
-typedef SECURITY_ATTRIBUTES interprocess_security_attributes;
-
-typedef SYSTEM_INFO system_info;
-
-typedef ACL interprocess_acl;
-
-typedef SECURITY_DESCRIPTOR interprocess_security_descriptor;
-
-typedef BY_HANDLE_FILE_INFORMATION interprocess_by_handle_file_information;
-
-typedef EVENTLOGRECORD interprocess_eventlogrecord;
-
-typedef LARGE_INTEGER large_integer;
-
-typedef HMODULE hmodule;
-
-typedef HKEY hkey;
-
-typedef BSTR bstr;
-
-typedef FARPROC farproc_t;
-
-#endif //#ifndef BOOST_USE_WINDOWS_H
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Nt native structures
-//
-//////////////////////////////////////////////////////////////////////////////
-
-struct interprocess_semaphore_basic_information
-{
- unsigned int count; // current semaphore count
- unsigned int limit; // max semaphore count
-};
-
-struct interprocess_section_basic_information
-{
- void * base_address;
- unsigned long section_attributes;
- __int64 section_size;
-};
-
-struct file_rename_information_t {
- int Replace;
- void *RootDir;
- unsigned long FileNameLength;
- wchar_t FileName[1];
-};
-
-struct unicode_string_t {
- unsigned short Length;
- unsigned short MaximumLength;
- wchar_t *Buffer;
-};
-
-struct object_attributes_t {
- unsigned long Length;
- void * RootDirectory;
- unicode_string_t *ObjectName;
- unsigned long Attributes;
- void *SecurityDescriptor;
- void *SecurityQualityOfService;
-};
-
-struct io_status_block_t {
- union {
- long Status;
- void *Pointer;
- };
-
- unsigned long *Information;
-};
-
-union system_timeofday_information
-{
- struct data_t
- {
- __int64 liKeBootTime;
- __int64 liKeSystemTime;
- __int64 liExpTimeZoneBias;
- unsigned long uCurrentTimeZoneId;
- unsigned long dwReserved;
- ::boost::ulong_long_type ullBootTimeBias;
- ::boost::ulong_long_type ullSleepTimeBias;
- } data;
- unsigned char Reserved1[sizeof(data_t)];
-};
-
-static const long BootstampLength = sizeof(__int64);
-static const long BootAndSystemstampLength = sizeof(__int64)*2;
-static const long SystemTimeOfDayInfoLength = sizeof(system_timeofday_information::data_t);
-
-struct object_name_information_t
-{
- unicode_string_t Name;
- wchar_t NameBuffer[1];
-};
-
-enum file_information_class_t {
- file_directory_information = 1,
- file_full_directory_information,
- file_both_directory_information,
- file_basic_information,
- file_standard_information,
- file_internal_information,
- file_ea_information,
- file_access_information,
- file_name_information,
- file_rename_information,
- file_link_information,
- file_names_information,
- file_disposition_information,
- file_position_information,
- file_full_ea_information,
- file_mode_information,
- file_alignment_information,
- file_all_information,
- file_allocation_information,
- file_end_of_file_information,
- file_alternate_name_information,
- file_stream_information,
- file_pipe_information,
- file_pipe_local_information,
- file_pipe_remote_information,
- file_mailslot_query_information,
- file_mailslot_set_information,
- file_compression_information,
- file_copy_on_write_information,
- file_completion_information,
- file_move_cluster_information,
- file_quota_information,
- file_reparse_point_information,
- file_network_open_information,
- file_object_id_information,
- file_tracking_information,
- file_ole_directory_information,
- file_content_index_information,
- file_inherit_content_index_information,
- file_ole_information,
- file_maximum_information
-};
-
-enum semaphore_information_class {
- semaphore_basic_information = 0
-};
-
-
-enum system_information_class {
- system_basic_information = 0,
- system_performance_information = 2,
- system_time_of_day_information = 3,
- system_process_information = 5,
- system_processor_performance_information = 8,
- system_interrupt_information = 23,
- system_exception_information = 33,
- system_registry_quota_information = 37,
- system_lookaside_information = 45
-};
-
-enum object_information_class
-{
- object_basic_information,
- object_name_information,
- object_type_information,
- object_all_information,
- object_data_information
-};
-
-enum section_information_class
-{
- section_basic_information,
- section_image_information
-};
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Forward declaration of winapi
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_USE_WINDOWS_H
-
-//Kernel32.dll
-
-//Some windows API declarations
-extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentProcessId();
-extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId();
-extern "C" __declspec(dllimport) int __stdcall GetProcessTimes
- ( void *hProcess, interprocess_filetime* lpCreationTime
- , interprocess_filetime *lpExitTime,interprocess_filetime *lpKernelTime
- , interprocess_filetime *lpUserTime );
-extern "C" __declspec(dllimport) void __stdcall Sleep(unsigned long);
-extern "C" __declspec(dllimport) unsigned long __stdcall GetTickCount(void);
-extern "C" __declspec(dllimport) int __stdcall SwitchToThread();
-extern "C" __declspec(dllimport) unsigned long __stdcall GetLastError();
-extern "C" __declspec(dllimport) void __stdcall SetLastError(unsigned long);
-extern "C" __declspec(dllimport) void * __stdcall GetCurrentProcess();
-extern "C" __declspec(dllimport) int __stdcall CloseHandle(void*);
-extern "C" __declspec(dllimport) int __stdcall DuplicateHandle
- ( void *hSourceProcessHandle, void *hSourceHandle
- , void *hTargetProcessHandle, void **lpTargetHandle
- , unsigned long dwDesiredAccess, int bInheritHandle
- , unsigned long dwOptions);
-extern "C" __declspec(dllimport) long __stdcall GetFileType(void *hFile);
-extern "C" __declspec(dllimport) void *__stdcall FindFirstFileA(const char *lpFileName, win32_find_data *lpFindFileData);
-extern "C" __declspec(dllimport) int __stdcall FindNextFileA(void *hFindFile, win32_find_data *lpFindFileData);
-extern "C" __declspec(dllimport) int __stdcall FindClose(void *hFindFile);
-//extern "C" __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(interprocess_filetime*);
-//extern "C" __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const interprocess_filetime *in, const interprocess_filetime *out);
-extern "C" __declspec(dllimport) void * __stdcall CreateMutexA(interprocess_security_attributes*, int, const char *);
-extern "C" __declspec(dllimport) void * __stdcall OpenMutexA(unsigned long, int, const char *);
-extern "C" __declspec(dllimport) unsigned long __stdcall WaitForSingleObject(void *, unsigned long);
-extern "C" __declspec(dllimport) int __stdcall ReleaseMutex(void *);
-extern "C" __declspec(dllimport) int __stdcall UnmapViewOfFile(void *);
-extern "C" __declspec(dllimport) void * __stdcall CreateSemaphoreA(interprocess_security_attributes*, long, long, const char *);
-extern "C" __declspec(dllimport) int __stdcall ReleaseSemaphore(void *, long, long *);
-extern "C" __declspec(dllimport) void * __stdcall OpenSemaphoreA(unsigned long, int, const char *);
-extern "C" __declspec(dllimport) void * __stdcall CreateFileMappingA (void *, interprocess_security_attributes*, unsigned long, unsigned long, unsigned long, const char *);
-extern "C" __declspec(dllimport) void * __stdcall MapViewOfFileEx (void *, unsigned long, unsigned long, unsigned long, std::size_t, void*);
-extern "C" __declspec(dllimport) void * __stdcall OpenFileMappingA (unsigned long, int, const char *);
-extern "C" __declspec(dllimport) void * __stdcall CreateFileA (const char *, unsigned long, unsigned long, struct interprocess_security_attributes*, unsigned long, unsigned long, void *);
-extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *);
-extern "C" __declspec(dllimport) int __stdcall FlushViewOfFile (void *, std::size_t);
-extern "C" __declspec(dllimport) int __stdcall VirtualUnlock (void *, std::size_t);
-extern "C" __declspec(dllimport) int __stdcall VirtualProtect (void *, std::size_t, unsigned long, unsigned long *);
-extern "C" __declspec(dllimport) int __stdcall FlushFileBuffers (void *);
-extern "C" __declspec(dllimport) int __stdcall GetFileSizeEx (void *, large_integer *size);
-extern "C" __declspec(dllimport) unsigned long __stdcall FormatMessageA
- (unsigned long dwFlags, const void *lpSource, unsigned long dwMessageId,
- unsigned long dwLanguageId, char *lpBuffer, unsigned long nSize,
- std::va_list *Arguments);
-extern "C" __declspec(dllimport) void *__stdcall LocalFree (void *);
-extern "C" __declspec(dllimport) unsigned long __stdcall GetFileAttributesA(const char *);
-extern "C" __declspec(dllimport) int __stdcall CreateDirectoryA(const char *, interprocess_security_attributes*);
-extern "C" __declspec(dllimport) int __stdcall RemoveDirectoryA(const char *lpPathName);
-extern "C" __declspec(dllimport) int __stdcall GetTempPathA(unsigned long length, char *buffer);
-extern "C" __declspec(dllimport) int __stdcall CreateDirectory(const char *, interprocess_security_attributes*);
-extern "C" __declspec(dllimport) int __stdcall SetFileValidData(void *, __int64 size);
-extern "C" __declspec(dllimport) int __stdcall SetEndOfFile(void *);
-extern "C" __declspec(dllimport) int __stdcall SetFilePointerEx(void *, large_integer distance, large_integer *new_file_pointer, unsigned long move_method);
-extern "C" __declspec(dllimport) int __stdcall LockFile (void *hnd, unsigned long offset_low, unsigned long offset_high, unsigned long size_low, unsigned long size_high);
-extern "C" __declspec(dllimport) int __stdcall UnlockFile(void *hnd, unsigned long offset_low, unsigned long offset_high, unsigned long size_low, unsigned long size_high);
-extern "C" __declspec(dllimport) int __stdcall LockFileEx(void *hnd, unsigned long flags, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped* overlapped);
-extern "C" __declspec(dllimport) int __stdcall UnlockFileEx(void *hnd, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped* overlapped);
-extern "C" __declspec(dllimport) int __stdcall WriteFile(void *hnd, const void *buffer, unsigned long bytes_to_write, unsigned long *bytes_written, interprocess_overlapped* overlapped);
-extern "C" __declspec(dllimport) int __stdcall ReadFile(void *hnd, void *buffer, unsigned long bytes_to_read, unsigned long *bytes_read, interprocess_overlapped* overlapped);
-extern "C" __declspec(dllimport) int __stdcall InitializeSecurityDescriptor(interprocess_security_descriptor *pSecurityDescriptor, unsigned long dwRevision);
-extern "C" __declspec(dllimport) int __stdcall SetSecurityDescriptorDacl(interprocess_security_descriptor *pSecurityDescriptor, int bDaclPresent, interprocess_acl *pDacl, int bDaclDefaulted);
-extern "C" __declspec(dllimport) hmodule __stdcall LoadLibraryA(const char *);
-extern "C" __declspec(dllimport) int __stdcall FreeLibrary(hmodule);
-extern "C" __declspec(dllimport) farproc_t __stdcall GetProcAddress(void *, const char*);
-extern "C" __declspec(dllimport) hmodule __stdcall GetModuleHandleA(const char*);
-extern "C" __declspec(dllimport) void *__stdcall GetFileInformationByHandle(void *, interprocess_by_handle_file_information*);
-
-//Advapi32.dll
-extern "C" __declspec(dllimport) long __stdcall RegOpenKeyExA(hkey, const char *, unsigned long, unsigned long, hkey*);
-extern "C" __declspec(dllimport) long __stdcall RegQueryValueExA(hkey, const char *, unsigned long*, unsigned long*, unsigned char *, unsigned long*);
-extern "C" __declspec(dllimport) long __stdcall RegCloseKey(hkey);
-
-//Ole32.dll
-extern "C" __declspec(dllimport) long __stdcall CoInitializeEx(void *pvReserved, unsigned long dwCoInit);
-extern "C" __declspec(dllimport) long __stdcall CoInitializeSecurity(
- void* pSecDesc,
- long cAuthSvc,
- void * asAuthSvc,
- void *pReserved1,
- unsigned long dwAuthnLevel,
- unsigned long dwImpLevel,
- void *pAuthList,
- unsigned long dwCapabilities,
- void *pReserved3 );
-
- extern "C" __declspec(dllimport) long __stdcall CoSetProxyBlanket(
- IUnknown_BIPC *pProxy,
- unsigned long dwAuthnSvc,
- unsigned long dwAuthzSvc,
- wchar_t *pServerPrincName,
- unsigned long dwAuthnLevel,
- unsigned long dwImpLevel,
- void *pAuthInfo,
- unsigned long dwCapabilities);
-extern "C" __declspec(dllimport) long __stdcall CoCreateInstance(const GUID_BIPC & rclsid, IUnknown_BIPC *pUnkOuter,
- unsigned long dwClsContext, const GUID_BIPC & riid, void** ppv);
-extern "C" __declspec(dllimport) void __stdcall CoUninitialize(void);
-
-//OleAut32.dll
-extern "C" __declspec(dllimport) long __stdcall VariantClear(wchar_variant * pvarg);
-
-//Shell32.dll
-extern "C" __declspec(dllimport) int __stdcall SHGetSpecialFolderPathA
- (void* hwnd, const char *pszPath, int csidl, int fCreate);
-
-extern "C" __declspec(dllimport) int __stdcall SHGetFolderPathA(void *hwnd, int csidl, void *hToken, unsigned long dwFlags, const char *pszPath);
-
-//EventLog access functions
-
-extern "C" __declspec(dllimport) void* __stdcall OpenEventLogA
- (const char* lpUNCServerName, const char* lpSourceName);
-
-extern "C" __declspec(dllimport) int __stdcall CloseEventLog(void *hEventLog);
-
-extern "C" __declspec(dllimport) int __stdcall ReadEventLogA
- (void *hEventLog,
- unsigned long dwReadFlags,
- unsigned long dwRecordOffset,
- void *lpBuffer,
- unsigned long nNumberOfBytesToRead,
- unsigned long *pnBytesRead,
- unsigned long *pnMinNumberOfBytesNeeded
- );
-
-#endif //#ifndef BOOST_USE_WINDOWS_H
-
-//kernel32.dll
-typedef int (__stdcall *QueryPerformanceCounter_t) (__int64 *lpPerformanceCount);
-typedef int (__stdcall *QueryPerformanceFrequency_t)(__int64 *lpFrequency);
-
-//ntdll.dll
-typedef long (__stdcall *NtDeleteFile_t)(object_attributes_t *ObjectAttributes);
-typedef long (__stdcall *NtSetInformationFile_t)(void *FileHandle, io_status_block_t *IoStatusBlock, void *FileInformation, unsigned long Length, int FileInformationClass );
-typedef long (__stdcall *NtOpenFile)(void **FileHandle, unsigned long DesiredAccess, object_attributes_t *ObjectAttributes
- , io_status_block_t *IoStatusBlock, unsigned long ShareAccess, unsigned long Length, unsigned long OpenOptions);
-typedef long (__stdcall *NtQuerySystemInformation_t)(int, void*, unsigned long, unsigned long *);
-typedef long (__stdcall *NtQueryObject_t)(void*, object_information_class, void *, unsigned long, unsigned long *);
-typedef long (__stdcall *NtQuerySemaphore_t)(void*, unsigned int info_class, interprocess_semaphore_basic_information *pinfo, unsigned int info_size, unsigned int *ret_len);
-typedef long (__stdcall *NtQuerySection_t)(void*, section_information_class, interprocess_section_basic_information *pinfo, unsigned long info_size, unsigned long *ret_len);
-typedef long (__stdcall *NtQueryInformationFile_t)(void *,io_status_block_t *,void *, long, int);
-typedef long (__stdcall *NtOpenFile_t)(void*,unsigned long ,object_attributes_t*,io_status_block_t*,unsigned long,unsigned long);
-typedef long (__stdcall *NtClose_t) (void*);
-typedef long (__stdcall *NtQueryTimerResolution_t) (unsigned long* LowestResolution, unsigned long* HighestResolution, unsigned long* CurrentResolution);
-typedef long (__stdcall *NtSetTimerResolution_t) (unsigned long RequestedResolution, int Set, unsigned long* ActualResolution);
-
-} //namespace winapi {
-} //namespace interprocess {
-} //namespace boost {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// Forward declaration of constants
-//
-//////////////////////////////////////////////////////////////////////////////
-
-namespace boost {
-namespace interprocess {
-namespace winapi {
-
-//Some used constants
-static const unsigned long infinite_time = 0xFFFFFFFF;
-static const unsigned long error_already_exists = 183L;
-static const unsigned long error_invalid_handle = 6L;
-static const unsigned long error_sharing_violation = 32L;
-static const unsigned long error_file_not_found = 2u;
-static const unsigned long error_no_more_files = 18u;
-static const unsigned long error_not_locked = 158L;
-//Retries in CreateFile, see http://support.microsoft.com/kb/316609
-static const unsigned long error_sharing_violation_tries = 3L;
-static const unsigned long error_sharing_violation_sleep_ms = 250L;
-static const unsigned long error_file_too_large = 223L;
-static const unsigned long error_insufficient_buffer = 122L;
-static const unsigned long error_handle_eof = 38L;
-static const unsigned long semaphore_all_access = (0x000F0000L)|(0x00100000L)|0x3;
-static const unsigned long mutex_all_access = (0x000F0000L)|(0x00100000L)|0x0001;
-
-static const unsigned long page_readonly = 0x02;
-static const unsigned long page_readwrite = 0x04;
-static const unsigned long page_writecopy = 0x08;
-static const unsigned long page_noaccess = 0x01;
-
-static const unsigned long standard_rights_required = 0x000F0000L;
-static const unsigned long section_query = 0x0001;
-static const unsigned long section_map_write = 0x0002;
-static const unsigned long section_map_read = 0x0004;
-static const unsigned long section_map_execute = 0x0008;
-static const unsigned long section_extend_size = 0x0010;
-static const unsigned long section_all_access = standard_rights_required |
- section_query |
- section_map_write |
- section_map_read |
- section_map_execute |
- section_extend_size;
-
-static const unsigned long file_map_copy = section_query;
-static const unsigned long file_map_write = section_map_write;
-static const unsigned long file_map_read = section_map_read;
-static const unsigned long file_map_all_access = section_all_access;
-static const unsigned long delete_access = 0x00010000L;
-static const unsigned long file_flag_backup_semantics = 0x02000000;
-static const long file_flag_delete_on_close = 0x04000000;
-
-//Native API constants
-static const unsigned long file_open_for_backup_intent = 0x00004000;
-static const int file_share_valid_flags = 0x00000007;
-static const long file_delete_on_close = 0x00001000L;
-static const long obj_case_insensitive = 0x00000040L;
-static const long delete_flag = 0x00010000L;
-
-static const unsigned long movefile_copy_allowed = 0x02;
-static const unsigned long movefile_delay_until_reboot = 0x04;
-static const unsigned long movefile_replace_existing = 0x01;
-static const unsigned long movefile_write_through = 0x08;
-static const unsigned long movefile_create_hardlink = 0x10;
-static const unsigned long movefile_fail_if_not_trackable = 0x20;
-
-static const unsigned long file_share_read = 0x00000001;
-static const unsigned long file_share_write = 0x00000002;
-static const unsigned long file_share_delete = 0x00000004;
-
-static const unsigned long file_attribute_readonly = 0x00000001;
-static const unsigned long file_attribute_hidden = 0x00000002;
-static const unsigned long file_attribute_system = 0x00000004;
-static const unsigned long file_attribute_directory = 0x00000010;
-static const unsigned long file_attribute_archive = 0x00000020;
-static const unsigned long file_attribute_device = 0x00000040;
-static const unsigned long file_attribute_normal = 0x00000080;
-static const unsigned long file_attribute_temporary = 0x00000100;
-
-static const unsigned long generic_read = 0x80000000L;
-static const unsigned long generic_write = 0x40000000L;
-
-static const unsigned long wait_object_0 = 0;
-static const unsigned long wait_abandoned = 0x00000080L;
-static const unsigned long wait_timeout = 258L;
-static const unsigned long wait_failed = (unsigned long)0xFFFFFFFF;
-
-static const unsigned long duplicate_close_source = (unsigned long)0x00000001;
-static const unsigned long duplicate_same_access = (unsigned long)0x00000002;
-
-static const unsigned long format_message_allocate_buffer
- = (unsigned long)0x00000100;
-static const unsigned long format_message_ignore_inserts
- = (unsigned long)0x00000200;
-static const unsigned long format_message_from_string
- = (unsigned long)0x00000400;
-static const unsigned long format_message_from_hmodule
- = (unsigned long)0x00000800;
-static const unsigned long format_message_from_system
- = (unsigned long)0x00001000;
-static const unsigned long format_message_argument_array
- = (unsigned long)0x00002000;
-static const unsigned long format_message_max_width_mask
- = (unsigned long)0x000000FF;
-static const unsigned long lang_neutral = (unsigned long)0x00;
-static const unsigned long sublang_default = (unsigned long)0x01;
-static const unsigned long invalid_file_size = (unsigned long)0xFFFFFFFF;
-static const unsigned long invalid_file_attributes = ((unsigned long)-1);
-static void * const invalid_handle_value = ((void*)(long)(-1));
-
-static const unsigned long file_type_char = 0x0002L;
-static const unsigned long file_type_disk = 0x0001L;
-static const unsigned long file_type_pipe = 0x0003L;
-static const unsigned long file_type_remote = 0x8000L;
-static const unsigned long file_type_unknown = 0x0000L;
-
-static const unsigned long create_new = 1;
-static const unsigned long create_always = 2;
-static const unsigned long open_existing = 3;
-static const unsigned long open_always = 4;
-static const unsigned long truncate_existing = 5;
-
-static const unsigned long file_begin = 0;
-static const unsigned long file_current = 1;
-static const unsigned long file_end = 2;
-
-static const unsigned long lockfile_fail_immediately = 1;
-static const unsigned long lockfile_exclusive_lock = 2;
-static const unsigned long error_lock_violation = 33;
-static const unsigned long security_descriptor_revision = 1;
-
-const unsigned long max_record_buffer_size = 0x10000L; // 64K
-const unsigned long max_path = 260;
-
-//Keys
-static const hkey hkey_local_machine = (hkey)(unsigned long*)(long)(0x80000002);
-static unsigned long key_query_value = 0x0001;
-
-//COM API
-const unsigned long RPC_C_AUTHN_LEVEL_PKT_BIPC = 4;
-const unsigned long RPC_C_AUTHN_DEFAULT_BIPC = 0xffffffffL;
-const unsigned long RPC_C_AUTHZ_DEFAULT_BIPC = 0xffffffffL;
-const unsigned long RPC_C_IMP_LEVEL_IMPERSONATE_BIPC = 3;
-const signed long EOAC_NONE_BIPC = 0;
-const signed long CLSCTX_INPROC_SERVER_BIPC = 0x1;
-const signed long CLSCTX_LOCAL_SERVER_BIPC = 0x4;
-const signed long WBEM_FLAG_RETURN_IMMEDIATELY_BIPC = 0x10;
-const signed long WBEM_FLAG_RETURN_WHEN_COMPLETE_BIPC = 0x0;
-const signed long WBEM_FLAG_FORWARD_ONLY_BIPC = 0x20;
-const signed long WBEM_INFINITE_BIPC = 0xffffffffL;
-const signed long RPC_E_TOO_LATE_BIPC = 0x80010119L;
-const signed long S_OK_BIPC = 0L;
-const signed long S_FALSE_BIPC = 1;
-const signed long RPC_E_CHANGED_MODE_BIPC = 0x80010106L;
-const unsigned long COINIT_APARTMENTTHREADED_BIPC = 0x2;
-const unsigned long COINIT_MULTITHREADED_BIPC = 0x0;
-const unsigned long COINIT_DISABLE_OLE1DDE_BIPC = 0x4;
-const unsigned long COINIT_SPEED_OVER_MEMORY_BIPC = 0x4;
-
-// Registry types
-#define reg_none ( 0 ) // No value type
-#define reg_sz ( 1 ) // Unicode nul terminated string
-#define reg_expand_sz ( 2 ) // Unicode nul terminated string
- // (with environment variable references)
-#define reg_binary ( 3 ) // Free form binary
-#define reg_dword ( 4 ) // 32-bit number
-#define reg_dword_little_endian ( 4 ) // 32-bit number (same as REG_DWORD)
-#define reg_dword_big_endian ( 5 ) // 32-bit number
-#define reg_link ( 6 ) // Symbolic Link (unicode)
-#define reg_multi_sz ( 7 ) // Multiple Unicode strings
-#define reg_resource_list ( 8 ) // Resource list in the resource map
-#define reg_full_resource_descriptor ( 9 ) // Resource list in the hardware description
-#define reg_resource_requirements_list ( 10 )
-#define reg_qword ( 11 ) // 64-bit number
-#define reg_qword_little_endian ( 11 ) // 64-bit number (same as reg_qword)
-
-
-//If the user needs to change default COM initialization model,
-//it can define BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL to one of these:
-//
-// COINIT_APARTMENTTHREADED_BIPC
-// COINIT_MULTITHREADED_BIPC
-// COINIT_DISABLE_OLE1DDE_BIPC
-// COINIT_SPEED_OVER_MEMORY_BIPC
-#if !defined(BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL)
- #define BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL COINIT_APARTMENTTHREADED_BIPC
-#elif (BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL != COINIT_APARTMENTTHREADED_BIPC) &&\
- (BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL != COINIT_MULTITHREADED_BIPC) &&\
- (BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL != COINIT_DISABLE_OLE1DDE_BIPC) &&\
- (BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL != COINIT_SPEED_OVER_MEMORY_BIPC)
- #error "Wrong value for BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL macro"
-#endif
-
-const GUID_BIPC CLSID_WbemAdministrativeLocator =
- { 0xcb8555cc, 0x9128, 0x11d1, {0xad, 0x9b, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}};
-
-const GUID_BIPC IID_IUnknown = { 0x00000000, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
-
-static const unsigned long eventlog_sequential_read = 0x0001;
-static const unsigned long eventlog_backwards_read = 0x0008;
-
-} //namespace winapi {
-} //namespace interprocess {
-} //namespace boost {
-
-
-namespace boost {
-namespace interprocess {
-namespace winapi {
-
-inline unsigned long get_last_error()
-{ return GetLastError(); }
-
-inline void set_last_error(unsigned long err)
-{ return SetLastError(err); }
-
-inline unsigned long format_message
- (unsigned long dwFlags, const void *lpSource,
- unsigned long dwMessageId, unsigned long dwLanguageId,
- char *lpBuffer, unsigned long nSize, std::va_list *Arguments)
-{
- return FormatMessageA
- (dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, Arguments);
-}
-
-//And now, wrapper functions
-inline void * local_free(void *hmem)
-{ return LocalFree(hmem); }
-
-inline unsigned long make_lang_id(unsigned long p, unsigned long s)
-{ return ((((unsigned short)(s)) << 10) | (unsigned short)(p)); }
-
-inline void sched_yield()
-{
- if(!SwitchToThread()){
- Sleep(0);
- }
-}
-
-inline void sleep_tick()
-{ Sleep(1); }
-
-inline void sleep(unsigned long ms)
-{ Sleep(ms); }
-
-inline unsigned long get_current_thread_id()
-{ return GetCurrentThreadId(); }
-
-inline bool get_process_times
- ( void *hProcess, interprocess_filetime* lpCreationTime
- , interprocess_filetime *lpExitTime, interprocess_filetime *lpKernelTime
- , interprocess_filetime *lpUserTime )
-{ return 0 != GetProcessTimes(hProcess, lpCreationTime, lpExitTime, lpKernelTime, lpUserTime); }
-
-inline unsigned long get_current_process_id()
-{ return GetCurrentProcessId(); }
-
-inline unsigned int close_handle(void* handle)
-{ return CloseHandle(handle); }
-
-inline void * find_first_file(const char *lpFileName, win32_find_data *lpFindFileData)
-{ return FindFirstFileA(lpFileName, lpFindFileData); }
-
-inline bool find_next_file(void *hFindFile, win32_find_data *lpFindFileData)
-{ return FindNextFileA(hFindFile, lpFindFileData) != 0; }
-
-inline bool find_close(void *handle)
-{ return FindClose(handle) != 0; }
-
-inline bool duplicate_current_process_handle
- (void *hSourceHandle, void **lpTargetHandle)
-{
- return 0 != DuplicateHandle
- ( GetCurrentProcess(), hSourceHandle, GetCurrentProcess()
- , lpTargetHandle, 0, 0
- , duplicate_same_access);
-}
-
-inline unsigned long get_file_type(void *hFile)
-{
- return GetFileType(hFile);
-}
-
-/*
-inline void get_system_time_as_file_time(interprocess_filetime *filetime)
-{ GetSystemTimeAsFileTime(filetime); }
-
-inline bool file_time_to_local_file_time
- (const interprocess_filetime *in, const interprocess_filetime *out)
-{ return 0 != FileTimeToLocalFileTime(in, out); }
-*/
-inline void *open_or_create_mutex(const char *name, bool initial_owner, interprocess_security_attributes *attr)
-{ return CreateMutexA(attr, (int)initial_owner, name); }
-
-inline unsigned long wait_for_single_object(void *handle, unsigned long time)
-{ return WaitForSingleObject(handle, time); }
-
-inline int release_mutex(void *handle)
-{ return ReleaseMutex(handle); }
-
-inline int unmap_view_of_file(void *address)
-{ return UnmapViewOfFile(address); }
-
-inline void *open_or_create_semaphore(const char *name, long initial_count, long maximum_count, interprocess_security_attributes *attr)
-{ return CreateSemaphoreA(attr, initial_count, maximum_count, name); }
-
-inline void *open_semaphore(const char *name)
-{ return OpenSemaphoreA(semaphore_all_access, 0, name); }
-
-inline int release_semaphore(void *handle, long release_count, long *prev_count)
-{ return ReleaseSemaphore(handle, release_count, prev_count); }
-
-class interprocess_all_access_security
-{
- interprocess_security_attributes sa;
- interprocess_security_descriptor sd;
- bool initialized;
-
- public:
- interprocess_all_access_security()
- : initialized(false)
- {
- if(!InitializeSecurityDescriptor(&sd, security_descriptor_revision))
- return;
- if(!SetSecurityDescriptorDacl(&sd, true, 0, false))
- return;
- sa.lpSecurityDescriptor = &sd;
- sa.nLength = sizeof(interprocess_security_attributes);
- sa.bInheritHandle = false;
- initialized = false;
- }
-
- interprocess_security_attributes *get_attributes()
- { return &sa; }
-};
-
-inline void * create_file_mapping (void * handle, unsigned long access, ::boost::ulong_long_type file_offset, const char * name, interprocess_security_attributes *psec)
-{
- const unsigned long high_size(file_offset >> 32), low_size((boost::uint32_t)file_offset);
- return CreateFileMappingA (handle, psec, access, high_size, low_size, name);
-}
-
-inline void * open_file_mapping (unsigned long access, const char *name)
-{ return OpenFileMappingA (access, 0, name); }
-
-inline void *map_view_of_file_ex(void *handle, unsigned long file_access, ::boost::ulong_long_type offset, std::size_t numbytes, void *base_addr)
-{
- const unsigned long offset_low = (unsigned long)(offset & ((::boost::ulong_long_type)0xFFFFFFFF));
- const unsigned long offset_high = offset >> 32;
- return MapViewOfFileEx(handle, file_access, offset_high, offset_low, numbytes, base_addr);
-}
-
-inline void *create_file(const char *name, unsigned long access, unsigned long creation_flags, unsigned long attributes, interprocess_security_attributes *psec)
-{
- for (unsigned int attempt(0); attempt < error_sharing_violation_tries; ++attempt){
- void * const handle = CreateFileA(name, access,
- file_share_read | file_share_write | file_share_delete,
- psec, creation_flags, attributes, 0);
- bool const invalid(invalid_handle_value == handle);
- if (!invalid){
- return handle;
- }
- if (error_sharing_violation != get_last_error()){
- return handle;
- }
- sleep(error_sharing_violation_sleep_ms);
- }
- return invalid_handle_value;
-}
-
-inline void get_system_info(system_info *info)
-{ GetSystemInfo(info); }
-
-inline bool flush_view_of_file(void *base_addr, std::size_t numbytes)
-{ return 0 != FlushViewOfFile(base_addr, numbytes); }
-
-inline bool virtual_unlock(void *base_addr, std::size_t numbytes)
-{ return 0 != VirtualUnlock(base_addr, numbytes); }
-
-inline bool virtual_protect(void *base_addr, std::size_t numbytes, unsigned long flNewProtect, unsigned long &lpflOldProtect)
-{ return 0 != VirtualProtect(base_addr, numbytes, flNewProtect, &lpflOldProtect); }
-
-inline bool flush_file_buffers(void *handle)
-{ return 0 != FlushFileBuffers(handle); }
-
-inline bool get_file_size(void *handle, __int64 &size)
-{ return 0 != GetFileSizeEx(handle, (large_integer*)&size); }
-
-inline bool create_directory(const char *name)
-{
- interprocess_all_access_security sec;
- return 0 != CreateDirectoryA(name, sec.get_attributes());
-}
-
-inline bool remove_directory(const char *lpPathName)
-{ return 0 != RemoveDirectoryA(lpPathName); }
-
-inline unsigned long get_temp_path(unsigned long length, char *buffer)
-{ return GetTempPathA(length, buffer); }
-
-inline int set_end_of_file(void *handle)
-{ return 0 != SetEndOfFile(handle); }
-
-inline bool set_file_pointer_ex(void *handle, __int64 distance, __int64 *new_file_pointer, unsigned long move_method)
-{
- large_integer d; d.QuadPart = distance;
- return 0 != SetFilePointerEx(handle, d, (large_integer*)new_file_pointer, move_method);
-}
-
-inline bool lock_file_ex(void *hnd, unsigned long flags, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped *overlapped)
-{ return 0 != LockFileEx(hnd, flags, reserved, size_low, size_high, overlapped); }
-
-inline bool unlock_file_ex(void *hnd, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped *overlapped)
-{ return 0 != UnlockFileEx(hnd, reserved, size_low, size_high, overlapped); }
-
-inline bool write_file(void *hnd, const void *buffer, unsigned long bytes_to_write, unsigned long *bytes_written, interprocess_overlapped* overlapped)
-{ return 0 != WriteFile(hnd, buffer, bytes_to_write, bytes_written, overlapped); }
-
-inline bool read_file(void *hnd, void *buffer, unsigned long bytes_to_read, unsigned long *bytes_read, interprocess_overlapped* overlapped)
-{ return 0 != ReadFile(hnd, buffer, bytes_to_read, bytes_read, overlapped); }
-
-inline bool get_file_information_by_handle(void *hnd, interprocess_by_handle_file_information *info)
-{ return 0 != GetFileInformationByHandle(hnd, info); }
-
-inline long interlocked_increment(long volatile *addr)
-{ return BOOST_INTERLOCKED_INCREMENT(const_cast<long*>(addr)); }
-
-inline long interlocked_decrement(long volatile *addr)
-{ return BOOST_INTERLOCKED_DECREMENT(const_cast<long*>(addr)); }
-
-inline long interlocked_compare_exchange(long volatile *addr, long val1, long val2)
-{ return BOOST_INTERLOCKED_COMPARE_EXCHANGE(const_cast<long*>(addr), val1, val2); }
-
-inline long interlocked_exchange_add(long volatile* addend, long value)
-{ return BOOST_INTERLOCKED_EXCHANGE_ADD(const_cast<long*>(addend), value); }
-
-inline long interlocked_exchange(long volatile* addend, long value)
-{ return BOOST_INTERLOCKED_EXCHANGE(const_cast<long*>(addend), value); }
-
-//Forward functions
-inline hmodule load_library(const char *name)
-{ return LoadLibraryA(name); }
-
-inline bool free_library(hmodule module)
-{ return 0 != FreeLibrary(module); }
-
-inline farproc_t get_proc_address(hmodule module, const char *name)
-{ return GetProcAddress(module, name); }
-
-inline void *get_current_process()
-{ return GetCurrentProcess(); }
-
-inline hmodule get_module_handle(const char *name)
-{ return GetModuleHandleA(name); }
-
-inline long reg_open_key_ex(hkey hKey, const char *lpSubKey, unsigned long ulOptions, unsigned long samDesired, hkey *phkResult)
-{ return RegOpenKeyExA(hKey, lpSubKey, ulOptions, samDesired, phkResult); }
-
-inline long reg_query_value_ex(hkey hKey, const char *lpValueName, unsigned long*lpReserved, unsigned long*lpType, unsigned char *lpData, unsigned long*lpcbData)
-{ return RegQueryValueExA(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData); }
-
-inline long reg_close_key(hkey hKey)
-{ return RegCloseKey(hKey); }
-
-inline void initialize_object_attributes
-( object_attributes_t *pobject_attr, unicode_string_t *name
- , unsigned long attr, void *rootdir, void *security_descr)
-
-{
- pobject_attr->Length = sizeof(object_attributes_t);
- pobject_attr->RootDirectory = rootdir;
- pobject_attr->Attributes = attr;
- pobject_attr->ObjectName = name;
- pobject_attr->SecurityDescriptor = security_descr;
- pobject_attr->SecurityQualityOfService = 0;
-}
-
-inline void rtl_init_empty_unicode_string(unicode_string_t *ucStr, wchar_t *buf, unsigned short bufSize)
-{
- ucStr->Buffer = buf;
- ucStr->Length = 0;
- ucStr->MaximumLength = bufSize;
-}
-
-//A class that locates and caches loaded DLL function addresses.
-template<int Dummy>
-struct function_address_holder
-{
- enum { NtSetInformationFile
- , NtQuerySystemInformation
- , NtQueryObject
- , NtQuerySemaphore
- , NtQuerySection
- , NtOpenFile
- , NtClose
- , NtQueryTimerResolution
- , QueryPerformanceCounter
- , QueryPerformanceFrequency
- , NumFunction
- };
- enum { NtDll_dll, Kernel32_dll, NumModule };
-
- private:
- static const char *FunctionNames[NumFunction];
- static const char *ModuleNames[NumModule];
- static farproc_t FunctionAddresses[NumFunction];
- static unsigned int FunctionModules[NumFunction];
- static volatile long FunctionStates[NumFunction];
- static hmodule ModuleAddresses[NumModule];
- static volatile long ModuleStates[NumModule];
-
- static hmodule get_module_from_id(unsigned int id)
- {
- BOOST_ASSERT(id < (unsigned int)NumModule);
- hmodule addr = get_module_handle(ModuleNames[id]);
- BOOST_ASSERT(addr);
- return addr;
- }
-
- static hmodule get_module(const unsigned int id)
- {
- BOOST_ASSERT(id < (unsigned int)NumModule);
- for(unsigned i = 0; ModuleStates[id] < 2; ++i){
- if(interlocked_compare_exchange(&ModuleStates[id], 1, 0) == 0){
- ModuleAddresses[id] = get_module_from_id(id);
- interlocked_increment(&ModuleStates[id]);
- break;
- }
- else if(i & 1){
- sched_yield();
- }
- else{
- sleep_tick();
- }
- }
- return ModuleAddresses[id];
- }
-
- static farproc_t get_address_from_dll(const unsigned int id)
- {
- BOOST_ASSERT(id < (unsigned int)NumFunction);
- farproc_t addr = get_proc_address(get_module(FunctionModules[id]), FunctionNames[id]);
- BOOST_ASSERT(addr);
- return addr;
- }
-
- public:
- static farproc_t get(const unsigned int id)
- {
- BOOST_ASSERT(id < (unsigned int)NumFunction);
- for(unsigned i = 0; FunctionStates[id] < 2; ++i){
- if(interlocked_compare_exchange(&FunctionStates[id], 1, 0) == 0){
- FunctionAddresses[id] = get_address_from_dll(id);
- interlocked_increment(&FunctionStates[id]);
- break;
- }
- else if(i & 1){
- sched_yield();
- }
- else{
- sleep_tick();
- }
- }
- return FunctionAddresses[id];
- }
-};
-
-template<int Dummy>
-const char *function_address_holder<Dummy>::FunctionNames[function_address_holder<Dummy>::NumFunction] =
-{
- "NtSetInformationFile",
- "NtQuerySystemInformation",
- "NtQueryObject",
- "NtQuerySemaphore",
- "NtQuerySection",
- "NtOpenFile",
- "NtClose",
- "NtQueryTimerResolution",
- "QueryPerformanceCounter",
- "QueryPerformanceFrequency"
-};
-
-template<int Dummy>
-unsigned int function_address_holder<Dummy>::FunctionModules[function_address_holder<Dummy>::NumFunction] =
-{
- NtDll_dll,
- NtDll_dll,
- NtDll_dll,
- NtDll_dll,
- NtDll_dll,
- NtDll_dll,
- NtDll_dll,
- NtDll_dll,
- Kernel32_dll,
- Kernel32_dll
-};
-
-template<int Dummy>
-const char *function_address_holder<Dummy>::ModuleNames[function_address_holder<Dummy>::NumModule] =
-{
- "ntdll.dll",
- "kernel32.dll"
-};
-
-
-template<int Dummy>
-farproc_t function_address_holder<Dummy>::FunctionAddresses[function_address_holder<Dummy>::NumFunction];
-
-template<int Dummy>
-volatile long function_address_holder<Dummy>::FunctionStates[function_address_holder<Dummy>::NumFunction];
-
-template<int Dummy>
-hmodule function_address_holder<Dummy>::ModuleAddresses[function_address_holder<Dummy>::NumModule];
-
-template<int Dummy>
-volatile long function_address_holder<Dummy>::ModuleStates[function_address_holder<Dummy>::NumModule];
-
-
-struct dll_func
- : public function_address_holder<0>
-{};
-
-//Complex winapi based functions...
-struct library_unloader
-{
- hmodule lib_;
- library_unloader(hmodule module) : lib_(module){}
- ~library_unloader(){ free_library(lib_); }
-};
-
-
-inline bool get_system_time_of_day_information(system_timeofday_information &info)
-{
- NtQuerySystemInformation_t pNtQuerySystemInformation = (NtQuerySystemInformation_t)
- dll_func::get(dll_func::NtQuerySystemInformation);
- unsigned long res;
- long status = pNtQuerySystemInformation(system_time_of_day_information, &info, sizeof(info), &res);
- if(status){
- return false;
- }
- return true;
-}
-
-inline bool get_boot_time(unsigned char (&bootstamp) [BootstampLength])
-{
- system_timeofday_information info;
- bool ret = get_system_time_of_day_information(info);
- if(!ret){
- return false;
- }
- std::memcpy(&bootstamp[0], &info.Reserved1, sizeof(bootstamp));
- return true;
-}
-
-inline bool get_boot_and_system_time(unsigned char (&bootsystemstamp) [BootAndSystemstampLength])
-{
- system_timeofday_information info;
- bool ret = get_system_time_of_day_information(info);
- if(!ret){
- return false;
- }
- std::memcpy(&bootsystemstamp[0], &info.Reserved1, sizeof(bootsystemstamp));
- return true;
-}
-
-//Writes the hexadecimal value of the buffer, in the wide character string.
-//str must be twice length
-inline void buffer_to_wide_str(const void *buf, std::size_t length, wchar_t *str)
-{
- const wchar_t Characters [] =
- { L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7'
- , L'8', L'9', L'A', L'B', L'C', L'D', L'E', L'F' };
- std::size_t char_counter = 0;
- const char *chbuf = static_cast<const char *>(buf);
- for(std::size_t i = 0; i != length; ++i){
- str[char_counter++] = Characters[(chbuf[i]&0xF0)>>4];
- str[char_counter++] = Characters[(chbuf[i]&0x0F)];
- }
-}
-
-//Writes the hexadecimal value of the buffer, in the narrow character string.
-//str must be twice length
-inline void buffer_to_narrow_str(const void *buf, std::size_t length, char *str)
-{
- const char Characters [] =
- { '0', '1', '2', '3', '4', '5', '6', '7'
- , '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
- std::size_t char_counter = 0;
- const char *chbuf = static_cast<const char *>(buf);
- for(std::size_t i = 0; i != length; ++i){
- str[char_counter++] = Characters[(chbuf[i]&0xF0)>>4];
- str[char_counter++] = Characters[(chbuf[i]&0x0F)];
- }
-}
-
-inline bool get_boot_time_str(char *bootstamp_str, std::size_t &s)
- //will write BootstampLength chars
-{
- if(s < (BootstampLength*2))
- return false;
- system_timeofday_information info;
- bool ret = get_system_time_of_day_information(info);
- if(!ret){
- return false;
- }
-
- buffer_to_narrow_str(info.Reserved1, BootstampLength, bootstamp_str);
- s = BootstampLength*2;
- return true;
-}
-
-inline bool get_boot_and_system_time_wstr(wchar_t *bootsystemstamp, std::size_t &s)
- //will write BootAndSystemstampLength chars
-{
- if(s < (BootAndSystemstampLength*2))
- return false;
- system_timeofday_information info;
- bool ret = get_system_time_of_day_information(info);
- if(!ret){
- return false;
- }
-
- buffer_to_wide_str(&info.Reserved1[0], BootAndSystemstampLength, bootsystemstamp);
- s = BootAndSystemstampLength*2;
- return true;
-}
-
-class handle_closer
-{
- void *handle_;
- handle_closer(const handle_closer &);
- handle_closer& operator=(const handle_closer &);
- public:
- explicit handle_closer(void *handle) : handle_(handle){}
- ~handle_closer()
- { close_handle(handle_); }
-};
-
-class eventlog_handle_closer
-{
- void *handle_;
- eventlog_handle_closer(const handle_closer &);
- eventlog_handle_closer& operator=(const eventlog_handle_closer &);
- public:
- explicit eventlog_handle_closer(void *handle) : handle_(handle){}
- ~eventlog_handle_closer()
- { CloseEventLog(handle_); }
-};
-
-union ntquery_mem_t
-{
- object_name_information_t name;
- struct ren_t
- {
- file_rename_information_t info;
- wchar_t buf[1];
- } ren;
-};
-
-class nt_query_mem_deleter
-{
- static const std::size_t rename_offset = offsetof(ntquery_mem_t, ren.info.FileName) -
- offsetof(ntquery_mem_t, name.Name.Buffer);
- // Timestamp process id atomic count
- static const std::size_t rename_suffix =
- (SystemTimeOfDayInfoLength + sizeof(unsigned long) + sizeof(boost::uint32_t))*2;
-
- public:
- explicit nt_query_mem_deleter(std::size_t object_name_information_size)
- : m_size(object_name_information_size + rename_offset + rename_suffix)
- , m_buf(new char [m_size])
- {}
-
- ~nt_query_mem_deleter()
- {
- delete[]m_buf;
- }
-
- void realloc_mem(std::size_t num_bytes)
- {
- num_bytes += rename_suffix + rename_offset;
- char *buf = m_buf;
- m_buf = new char[num_bytes];
- delete[]buf;
- m_size = num_bytes;
- }
-
- ntquery_mem_t *query_mem() const
- { return static_cast<ntquery_mem_t *>(static_cast<void*>(m_buf)); }
-
- unsigned long object_name_information_size() const
- {
- return static_cast<unsigned long>(m_size - rename_offset - SystemTimeOfDayInfoLength*2);
- }
-
- std::size_t file_rename_information_size() const
- { return static_cast<unsigned long>(m_size); }
-
- private:
- std::size_t m_size;
- char *m_buf;
-};
-
-class c_heap_deleter
-{
- public:
- explicit c_heap_deleter(std::size_t size)
- : m_buf(::malloc(size))
- {}
-
- ~c_heap_deleter()
- {
- if(m_buf) ::free(m_buf);
- }
-
- void realloc_mem(std::size_t num_bytes)
- {
- void *buf = ::realloc(m_buf, num_bytes);
- if(!buf){
- free(m_buf);
- m_buf = 0;
- }
- }
-
- void *get() const
- { return m_buf; }
-
- private:
- void *m_buf;
-};
-
-inline bool unlink_file(const char *filename)
-{
- //Don't try to optimize doing a DeleteFile first
- //as there are interactions with permissions and
- //in-use files.
- //
- //if(!delete_file(filename)){
- // (...)
- //
-
- //This functions tries to emulate UNIX unlink semantics in windows.
- //
- //- Open the file and mark the handle as delete-on-close
- //- Rename the file to an arbitrary name based on a random number
- //- Close the handle. If there are no file users, it will be deleted.
- // Otherwise it will be used by already connected handles but the
- // file name can't be used to open this file again
- try{
- NtSetInformationFile_t pNtSetInformationFile =
- (NtSetInformationFile_t)dll_func::get(dll_func::NtSetInformationFile);
-
- NtQueryObject_t pNtQueryObject = (NtQueryObject_t)dll_func::get(dll_func::NtQueryObject);
-
- //First step: Obtain a handle to the file using Win32 rules. This resolves relative paths
- void *fh = create_file(filename, generic_read | delete_access, open_existing, 0, 0);
- if(fh == invalid_handle_value){
- return false;
- }
-
- handle_closer h_closer(fh);
- {
- //Obtain name length
- unsigned long size;
- const std::size_t initial_string_mem = 512u;
-
- nt_query_mem_deleter nt_query_mem(sizeof(ntquery_mem_t)+initial_string_mem);
- //Obtain file name with guessed length
- if(pNtQueryObject(fh, object_name_information, nt_query_mem.query_mem(), nt_query_mem.object_name_information_size(), &size)){
- //Obtain file name with exact length buffer
- nt_query_mem.realloc_mem(size);
- if(pNtQueryObject(fh, object_name_information, nt_query_mem.query_mem(), nt_query_mem.object_name_information_size(), &size)){
- return false;
- }
- }
- ntquery_mem_t *pmem = nt_query_mem.query_mem();
- file_rename_information_t *pfri = &pmem->ren.info;
- const std::size_t RenMaxNumChars =
- (((char*)(pmem) + nt_query_mem.file_rename_information_size()) - (char*)&pmem->ren.info.FileName[0])/sizeof(wchar_t);
-
- //Copy filename to the rename member
- std::memmove(pmem->ren.info.FileName, pmem->name.Name.Buffer, pmem->name.Name.Length);
- std::size_t filename_string_length = pmem->name.Name.Length/sizeof(wchar_t);
-
- //Search '\\' character to replace from it
- for(std::size_t i = filename_string_length; i != 0; --filename_string_length){
- if(pmem->ren.info.FileName[--i] == L'\\')
- break;
- }
-
- //Add random number
- std::size_t s = RenMaxNumChars - filename_string_length;
- if(!get_boot_and_system_time_wstr(&pfri->FileName[filename_string_length], s)){
- return false;
- }
- filename_string_length += s;
-
- //Sometimes the precission of the timestamp is not enough and we need to add another random number.
- //The process id (to exclude concurrent processes) and an atomic count (to exclude concurrent threads).
- //should be enough
- const unsigned long pid = get_current_process_id();
- buffer_to_wide_str(&pid, sizeof(pid), &pfri->FileName[filename_string_length]);
- filename_string_length += sizeof(pid)*2;
-
- static volatile boost::uint32_t u32_count = 0;
- interlocked_decrement(reinterpret_cast<volatile long*>(&u32_count));
- buffer_to_wide_str(const_cast<const boost::uint32_t *>(&u32_count), sizeof(boost::uint32_t), &pfri->FileName[filename_string_length]);
- filename_string_length += sizeof(boost::uint32_t)*2;
-
- //Fill rename information (FileNameLength is in bytes)
- pfri->FileNameLength = static_cast<unsigned long>(sizeof(wchar_t)*(filename_string_length));
- pfri->Replace = 1;
- pfri->RootDir = 0;
-
- //Cange the name of the in-use file...
- io_status_block_t io;
- if(0 != pNtSetInformationFile(fh, &io, pfri, nt_query_mem.file_rename_information_size(), file_rename_information)){
- return false;
- }
- }
- //...and mark it as delete-on-close
- {
- //Don't use pNtSetInformationFile with file_disposition_information as it can return STATUS_CANNOT_DELETE
- //if the file is still mapped. Reopen it with NtOpenFile and file_delete_on_close
- NtOpenFile_t pNtOpenFile = (NtOpenFile_t)dll_func::get(dll_func::NtOpenFile);
- NtClose_t pNtClose = (NtClose_t)dll_func::get(dll_func::NtClose);
- const wchar_t empty_str [] = L"";
- unicode_string_t ustring = { sizeof(empty_str) - sizeof (wchar_t) //length in bytes without null
- , sizeof(empty_str) //total size in bytes of memory allocated for Buffer.
- , const_cast<wchar_t*>(empty_str)
- };
- object_attributes_t object_attr;
- initialize_object_attributes(&object_attr, &ustring, 0, fh, 0);
- void* fh2 = 0;
- io_status_block_t io;
- pNtOpenFile( &fh2, delete_flag, &object_attr, &io
- , file_share_read | file_share_write | file_share_delete, file_delete_on_close);
- pNtClose(fh2);
- //Even if NtOpenFile fails, the file was renamed and the original no longer exists, so return a success status
- return true;
- }
- }
- catch(...){
- return false;
- }
- return true;
-}
-
-struct reg_closer
-{
- hkey key_;
- reg_closer(hkey key) : key_(key){}
- ~reg_closer(){ reg_close_key(key_); }
-};
-
-inline bool get_registry_value_buffer(hkey key_type, const char *subkey_name, const char *value_name, void *buf, std::size_t &buflen)
-{
- bool bret = false;
- hkey key;
- if (reg_open_key_ex( key_type
- , subkey_name
- , 0
- , key_query_value
- , &key) == 0){
- reg_closer key_closer(key);
-
- //Obtain the value
- unsigned long size = buflen;
- unsigned long type;
- buflen = 0;
- bret = 0 == reg_query_value_ex( key, value_name, 0, &type, (unsigned char*)buf, &size);
- if(bret)
- buflen = (std::size_t)size;
- }
- return bret;
-}
-
-inline bool get_registry_value_string(hkey key_type, const char *subkey_name, const char *value_name, std::string &s)
-{
- bool bret = false;
- s.clear();
- hkey key;
- if (reg_open_key_ex( key_type
- , subkey_name
- , 0
- , key_query_value
- , &key) == 0){
- reg_closer key_closer(key);
-
- //Obtain the value
- unsigned long size;
- unsigned long type;
- long err = reg_query_value_ex( key, value_name, 0, &type, 0, &size);
- if((reg_sz == type || reg_expand_sz == type) && !err){
- //Size includes terminating NULL
- s.resize(size);
- err = reg_query_value_ex( key, value_name, 0, &type, (unsigned char*)(&s[0]), &size);
- if(!err){
- s.erase(s.end()-1);
- bret = true;
- }
- (void)err;
- }
- }
- return bret;
-}
-
-inline void get_shared_documents_folder(std::string &s)
-{
- #if 1 //Original registry search code
- get_registry_value_string( hkey_local_machine
- , "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
- , "Common AppData"
- , s);
- #else //registry alternative: SHGetFolderPath
- const int BIPC_CSIDL_COMMON_APPDATA = 0x0023; // All Users\Application Data
- const int BIPC_CSIDL_FLAG_CREATE = 0x8000; // new for Win2K, or this in to force creation of folder
- const int BIPC_SHGFP_TYPE_CURRENT = 0; // current value for user, verify it exists
-
- s.clear();
- char szPath[max_path];
- if(0 == SHGetFolderPathA(0, BIPC_CSIDL_COMMON_APPDATA | BIPC_CSIDL_FLAG_CREATE, 0, BIPC_SHGFP_TYPE_CURRENT, szPath)){
- s = szPath;
- }
-
- #endif
-}
-
-inline void get_registry_value(const char *folder, const char *value_key, std::vector<unsigned char> &s)
-{
- s.clear();
- hkey key;
- if (reg_open_key_ex( hkey_local_machine
- , folder
- , 0
- , key_query_value
- , &key) == 0){
- reg_closer key_closer(key);
-
- //Obtain the value
- unsigned long size;
- unsigned long type;
- const char *const reg_value = value_key;
- //long err = (*pRegQueryValue)( key, reg_value, 0, &type, 0, &size);
- long err = reg_query_value_ex( key, reg_value, 0, &type, 0, &size);
- if(!err){
- //Size includes terminating NULL
- s.resize(size);
- //err = (*pRegQueryValue)( key, reg_value, 0, &type, (unsigned char*)(&s[0]), &size);
- err = reg_query_value_ex( key, reg_value, 0, &type, (unsigned char*)(&s[0]), &size);
- if(!err)
- s.erase(s.end()-1);
- (void)err;
- }
- }
-}
-
-#if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME)
-
-struct co_uninitializer
-{
- co_uninitializer(bool b_uninitialize)
- : m_b_uninitialize(b_uninitialize)
- {}
-
- ~co_uninitializer()
- {
- if(m_b_uninitialize){
- CoUninitialize();
- }
- }
-
- private:
- const bool m_b_uninitialize;
-};
-
-template<class Object>
-struct com_releaser
-{
- Object *&object_;
- com_releaser(Object *&object) : object_(object) {}
- ~com_releaser() { object_->Release(); object_ = 0; }
-};
-
-inline bool get_wmi_class_attribute( std::wstring& strValue, const wchar_t *wmi_class, const wchar_t *wmi_class_var)
-{
- //See example http://msdn.microsoft.com/en-us/library/aa390423%28v=VS.85%29.aspx
- //
- //See BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL definition if you need to change the
- //default value of this macro in your application
- long co_init_ret = CoInitializeEx(0, BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL);
- if(co_init_ret != S_OK_BIPC && co_init_ret != S_FALSE_BIPC && co_init_ret != RPC_E_CHANGED_MODE_BIPC)
- return false;
- co_uninitializer co_initialize_end(co_init_ret != RPC_E_CHANGED_MODE_BIPC);
- (void)co_initialize_end;
-
- bool bRet = false;
- long sec_init_ret = CoInitializeSecurity
- ( 0 //pVoid
- ,-1 //cAuthSvc
- , 0 //asAuthSvc
- , 0 //pReserved1
- , RPC_C_AUTHN_LEVEL_PKT_BIPC //dwAuthnLevel
- , RPC_C_IMP_LEVEL_IMPERSONATE_BIPC //dwImpLevel
- , 0 //pAuthList
- , EOAC_NONE_BIPC //dwCapabilities
- , 0 //pReserved3
- );
- if( 0 == sec_init_ret || RPC_E_TOO_LATE_BIPC == sec_init_ret)
- {
- IWbemLocator_BIPC * pIWbemLocator = 0;
- const wchar_t * bstrNamespace = L"root\\cimv2";
-
- if( 0 != CoCreateInstance(
- CLSID_WbemAdministrativeLocator,
- 0,
- CLSCTX_INPROC_SERVER_BIPC | CLSCTX_LOCAL_SERVER_BIPC,
- IID_IUnknown, (void **)&pIWbemLocator)){
- return false;
- }
-
- com_releaser<IWbemLocator_BIPC> IWbemLocator_releaser(pIWbemLocator);
-
- IWbemServices_BIPC *pWbemServices = 0;
-
- if( 0 != pIWbemLocator->ConnectServer(
- (bstr)bstrNamespace, // Namespace
- 0, // Userid
- 0, // PW
- 0, // Locale
- 0, // flags
- 0, // Authority
- 0, // Context
- &pWbemServices
- )
- ){
- return false;
- }
-
- if( S_OK_BIPC != CoSetProxyBlanket(
- pWbemServices,
- RPC_C_AUTHN_DEFAULT_BIPC,
- RPC_C_AUTHZ_DEFAULT_BIPC,
- 0,
- RPC_C_AUTHN_LEVEL_PKT_BIPC,
- RPC_C_IMP_LEVEL_IMPERSONATE_BIPC,
- 0,
- EOAC_NONE_BIPC
- )
- ){
- return false;
- }
-
- com_releaser<IWbemServices_BIPC> IWbemServices_releaser(pWbemServices);
-
- strValue.clear();
- strValue += L"Select ";
- strValue += wmi_class_var;
- strValue += L" from ";
- strValue += wmi_class;
-
- IEnumWbemClassObject_BIPC * pEnumObject = 0;
-
- if ( 0 != pWbemServices->ExecQuery(
- (bstr)L"WQL",
- (bstr)strValue.c_str(),
- //WBEM_FLAG_RETURN_IMMEDIATELY_BIPC,
- WBEM_FLAG_RETURN_WHEN_COMPLETE_BIPC | WBEM_FLAG_FORWARD_ONLY_BIPC,
- 0,
- &pEnumObject
- )
- ){
- return false;
- }
-
- com_releaser<IEnumWbemClassObject_BIPC> IEnumWbemClassObject_releaser(pEnumObject);
-
- //WBEM_FLAG_FORWARD_ONLY_BIPC incompatible with Reset
- //if ( 0 != pEnumObject->Reset() ){
- //return false;
- //}
-
- wchar_variant vwchar;
- unsigned long uCount = 1, uReturned;
- IWbemClassObject_BIPC * pClassObject = 0;
- while( 0 == pEnumObject->Next( WBEM_INFINITE_BIPC, uCount, &pClassObject, &uReturned ) )
- {
- com_releaser<IWbemClassObject_BIPC> IWbemClassObject_releaser(pClassObject);
- if ( 0 == pClassObject->Get( (bstr)L"LastBootUpTime", 0, &vwchar, 0, 0 ) ){
- bRet = true;
- strValue = (wchar_t*)vwchar.bstrVal;
- VariantClear(&vwchar );
- break;
- }
- }
- }
- return bRet;
-}
-
-//Obtains the bootup time from WMI LastBootUpTime.
-//This time seems to change with hibernation and clock synchronization so avoid it.
-inline bool get_last_bootup_time( std::wstring& strValue )
-{
- bool ret = get_wmi_class_attribute(strValue, L"Win32_OperatingSystem", L"LastBootUpTime");
- std::size_t timezone = strValue.find(L'+');
- if(timezone != std::wstring::npos){
- strValue.erase(timezone);
- }
- timezone = strValue.find(L'-');
- if(timezone != std::wstring::npos){
- strValue.erase(timezone);
- }
- return ret;
-}
-
-inline bool get_last_bootup_time( std::string& str )
-{
- std::wstring wstr;
- bool ret = get_last_bootup_time(wstr);
- str.resize(wstr.size());
- for(std::size_t i = 0, max = str.size(); i != max; ++i){
- str[i] = '0' + (wstr[i]-L'0');
- }
- return ret;
-}
-
-#endif //BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
-
-#if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED)
-
-// Loop through the buffer and obtain the contents of the
-// requested record in the buffer.
-inline bool find_record_in_buffer( const void* pBuffer, unsigned long dwBytesRead, const char *provider_name
- , unsigned int id_to_find, interprocess_eventlogrecord *&pevent_log_record)
-{
- const unsigned char * pRecord = static_cast<const unsigned char*>(pBuffer);
- const unsigned char * pEndOfRecords = pRecord + dwBytesRead;
-
- while (pRecord < pEndOfRecords){
- interprocess_eventlogrecord *pTypedRecord = (interprocess_eventlogrecord*)pRecord;
- // Check provider, written at the end of the fixed-part of the record
- if (0 == std::strcmp(provider_name, (char*)(pRecord + sizeof(interprocess_eventlogrecord))))
- {
- // Check event id
- if(id_to_find == (pTypedRecord->EventID & 0xFFFF)){
- pevent_log_record = pTypedRecord;
- return true;
- }
- }
-
- pRecord += pTypedRecord->Length;
- }
- pevent_log_record = 0;
- return false;
-}
-
-//Obtains the bootup time from the System Event Log,
-//event ID == 6005 (event log started).
-//Adapted from http://msdn.microsoft.com/en-us/library/windows/desktop/bb427356.aspx
-inline bool get_last_bootup_time(std::string &stamp)
-{
- const char *source_name = "System";
- const char *provider_name = "EventLog";
- const unsigned short event_id = 6005u;
-
- unsigned long status = 0;
- unsigned long dwBytesToRead = 0;
- unsigned long dwBytesRead = 0;
- unsigned long dwMinimumBytesToRead = 0;
-
- // The source name (provider) must exist as a subkey of Application.
- void *hEventLog = OpenEventLogA(0, source_name);
- if (hEventLog){
- eventlog_handle_closer hnd_closer(hEventLog); (void)hnd_closer;
- // Allocate an initial block of memory used to read event records. The number
- // of records read into the buffer will vary depending on the size of each event.
- // The size of each event will vary based on the size of the user-defined
- // data included with each event, the number and length of insertion
- // strings, and other data appended to the end of the event record.
- dwBytesToRead = max_record_buffer_size;
- c_heap_deleter heap_deleter(dwBytesToRead);
-
- // Read blocks of records until you reach the end of the log or an
- // error occurs. The records are read from newest to oldest. If the buffer
- // is not big enough to hold a complete event record, reallocate the buffer.
- if (heap_deleter.get() != 0){
- while (0 == status){
- if (!ReadEventLogA(hEventLog,
- eventlog_sequential_read | eventlog_backwards_read,
- 0,
- heap_deleter.get(),
- dwBytesToRead,
- &dwBytesRead,
- &dwMinimumBytesToRead)) {
- status = get_last_error();
- if (error_insufficient_buffer == status) {
- status = 0;
- dwBytesToRead = dwMinimumBytesToRead;
- heap_deleter.realloc_mem(dwMinimumBytesToRead);
- if (!heap_deleter.get()){
- return false;
- }
- }
- else{ //Not found or EOF
- return false;
- }
- }
- else
- {
- interprocess_eventlogrecord *pTypedRecord;
- // Print the contents of each record in the buffer.
- if(find_record_in_buffer(heap_deleter.get(), dwBytesRead, provider_name, event_id, pTypedRecord)){
- char stamp_str[sizeof(unsigned long)*3+1];
- std::sprintf(&stamp_str[0], "%u", ((unsigned int)pTypedRecord->TimeGenerated));
- stamp = stamp_str;
- break;
- }
- }
- }
- }
- }
- return true;
-}
-
-#endif //BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED
-
-#if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED)
-
-inline bool get_last_bootup_time(std::string &stamp)
-{
- unsigned dword_val = 0;
- std::size_t dword_size = sizeof(dword_val);
- bool b_ret = get_registry_value_buffer( hkey_local_machine
- , "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\PrefetchParameters"
- , "BootId", &dword_val, dword_size);
- if (b_ret)
- {
- char dword_str[sizeof(dword_val)*2u+1];
- buffer_to_narrow_str(&dword_val, dword_size, dword_str);
- dword_str[sizeof(dword_val)*2] = '\0';
- stamp = dword_str;
-
- b_ret = get_registry_value_buffer( hkey_local_machine
- , "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power"
- , "HybridBootAnimationTime", &dword_val, dword_size);
- //Old Windows versions have no HybridBootAnimationTime
- if(b_ret)
- {
- buffer_to_narrow_str(&dword_val, dword_size, dword_str);
- dword_str[sizeof(dword_val)*2] = '\0';
- stamp += "_";
- stamp += dword_str;
- }
- b_ret = true;
- }
- return b_ret;
-}
-
-#endif //BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
-
-inline bool is_directory(const char *path)
-{
- unsigned long attrib = GetFileAttributesA(path);
-
- return (attrib != invalid_file_attributes &&
- (attrib & file_attribute_directory));
-}
-
-inline bool get_file_mapping_size(void *file_mapping_hnd, __int64 &size)
-{
- NtQuerySection_t pNtQuerySection =
- (NtQuerySection_t)dll_func::get(dll_func::NtQuerySection);
- //Obtain file name
- interprocess_section_basic_information info;
- unsigned long ntstatus =
- pNtQuerySection(file_mapping_hnd, section_basic_information, &info, sizeof(info), 0);
- size = info.section_size;
- return !ntstatus;
-}
-
-inline bool get_semaphore_info(void *handle, long &count, long &limit)
-{
- winapi::interprocess_semaphore_basic_information info;
- winapi::NtQuerySemaphore_t pNtQuerySemaphore =
- (winapi::NtQuerySemaphore_t)dll_func::get(winapi::dll_func::NtQuerySemaphore);
- unsigned int ret_len;
- long status = pNtQuerySemaphore(handle, winapi::semaphore_basic_information, &info, sizeof(info), &ret_len);
- count = info.count;
- limit = info.limit;
- return !status;
-}
-
-inline bool query_timer_resolution(unsigned long *lowres, unsigned long *highres, unsigned long *curres)
-{
- winapi::NtQueryTimerResolution_t pNtQueryTimerResolution =
- (winapi::NtQueryTimerResolution_t)dll_func::get(winapi::dll_func::NtQueryTimerResolution);
- return !pNtQueryTimerResolution(lowres, highres, curres);
-}
-
-inline bool query_performance_counter(__int64 *lpPerformanceCount)
-{
- QueryPerformanceCounter_t pQueryPerformanceCounter = (QueryPerformanceCounter_t)
- dll_func::get(dll_func::QueryPerformanceCounter);
- return 0 != pQueryPerformanceCounter(lpPerformanceCount);
-}
-
-inline bool query_performance_frequency(__int64 *lpFrequency)
-{
- QueryPerformanceCounter_t pQueryPerformanceFrequency = (QueryPerformanceFrequency_t)
- dll_func::get(dll_func::QueryPerformanceFrequency);
- return 0 != pQueryPerformanceFrequency(lpFrequency);
-}
-
-inline unsigned long get_tick_count()
-{ return GetTickCount(); }
-
-} //namespace winapi
-} //namespace interprocess
-} //namespace boost
-
-#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
-# pragma GCC diagnostic pop
-#endif
-
-#include <boost/interprocess/detail/config_end.hpp>
-
-#endif //#ifdef BOOST_INTERPROCESS_WIN32_API_HPP
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/exceptions.hpp b/src/third_party/boost-1.68.0/boost/interprocess/exceptions.hpp
deleted file mode 100644
index 700c4c50340..00000000000
--- a/src/third_party/boost-1.68.0/boost/interprocess/exceptions.hpp
+++ /dev/null
@@ -1,110 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/interprocess for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTERPROCESS_EXCEPTIONS_HPP
-#define BOOST_INTERPROCESS_EXCEPTIONS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/interprocess/detail/config_begin.hpp>
-#include <boost/interprocess/detail/workaround.hpp>
-#include <boost/interprocess/errors.hpp>
-#include <stdexcept>
-
-//!\file
-//!Describes exceptions thrown by interprocess classes
-
-namespace boost {
-
-namespace interprocess {
-
-//!This class is the base class of all exceptions
-//!thrown by boost::interprocess
-class BOOST_SYMBOL_VISIBLE interprocess_exception : public std::exception
-{
- public:
- interprocess_exception(const char *err)
- : m_err(other_error)
- {
- try { m_str = err; }
- catch (...) {}
- }
-
- interprocess_exception(const error_info &err_info, const char *str = 0)
- : m_err(err_info)
- {
- try{
- if(m_err.get_native_error() != 0){
- fill_system_message(m_err.get_native_error(), m_str);
- }
- else if(str){
- m_str = str;
- }
- else{
- m_str = "boost::interprocess_exception::library_error";
- }
- }
- catch(...){}
- }
-
- virtual ~interprocess_exception() throw(){}
-
- virtual const char * what() const throw()
- { return m_str.c_str(); }
-
- native_error_t get_native_error()const { return m_err.get_native_error(); }
-
- // Note: a value of other_error implies a library (rather than system) error
- error_code_t get_error_code() const { return m_err.get_error_code(); }
-
- #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
- private:
- error_info m_err;
- std::string m_str;
- #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
-};
-
-//!This is the exception thrown by shared interprocess_mutex family when a deadlock situation
-//!is detected or when using a interprocess_condition the interprocess_mutex is not locked
-class BOOST_SYMBOL_VISIBLE lock_exception : public interprocess_exception
-{
- public:
- lock_exception()
- : interprocess_exception(lock_error)
- {}
-
- virtual const char* what() const throw()
- { return "boost::interprocess::lock_exception"; }
-};
-
-
-//!This exception is thrown when a memory request can't be
-//!fulfilled.
-class BOOST_SYMBOL_VISIBLE bad_alloc : public interprocess_exception
-{
- public:
- bad_alloc() : interprocess_exception("::boost::interprocess::bad_alloc"){}
- virtual const char* what() const throw()
- { return "boost::interprocess::bad_alloc"; }
-};
-
-} // namespace interprocess {
-
-} // namespace boost
-
-#include <boost/interprocess/detail/config_end.hpp>
-
-#endif // BOOST_INTERPROCESS_EXCEPTIONS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/avltree_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/avltree_algorithms.hpp
deleted file mode 100644
index 1459851fb4f..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/avltree_algorithms.hpp
+++ /dev/null
@@ -1,727 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Daniel K. O. 2005.
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <cstddef>
-
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/bstree_algorithms.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-template<class NodeTraits, class F>
-struct avltree_node_cloner
- //Use public inheritance to avoid MSVC bugs with closures
- : public detail::ebo_functor_holder<F>
-{
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef detail::ebo_functor_holder<F> base_t;
-
- avltree_node_cloner(F f)
- : base_t(f)
- {}
-
- node_ptr operator()(const node_ptr & p)
- {
- node_ptr n = base_t::get()(p);
- NodeTraits::set_balance(n, NodeTraits::get_balance(p));
- return n;
- }
-
- node_ptr operator()(const node_ptr & p) const
- {
- node_ptr n = base_t::get()(p);
- NodeTraits::set_balance(n, NodeTraits::get_balance(p));
- return n;
- }
-};
-
-namespace detail {
-
-template<class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct avltree_node_checker
- : public bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> base_checker_t;
- typedef ValueTraits value_traits;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::const_node_ptr const_node_ptr;
-
- struct return_type
- : public base_checker_t::return_type
- {
- return_type() : height(0) {}
- int height;
- };
-
- avltree_node_checker(const NodePtrCompare& comp, ExtraChecker extra_checker)
- : base_checker_t(comp, extra_checker)
- {}
-
- void operator () (const const_node_ptr& p,
- const return_type& check_return_left, const return_type& check_return_right,
- return_type& check_return)
- {
- const int height_diff = check_return_right.height - check_return_left.height; (void)height_diff;
- BOOST_INTRUSIVE_INVARIANT_ASSERT(
- (height_diff == -1 && node_traits::get_balance(p) == node_traits::negative()) ||
- (height_diff == 0 && node_traits::get_balance(p) == node_traits::zero()) ||
- (height_diff == 1 && node_traits::get_balance(p) == node_traits::positive())
- );
- check_return.height = 1 +
- (check_return_left.height > check_return_right.height ? check_return_left.height : check_return_right.height);
- base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
- }
-};
-
-} // namespace detail
-
-/// @endcond
-
-//! avltree_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the binary search tree
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <tt>balance</tt>: The type of the balance factor
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
-//!
-//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
-//!
-//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
-//!
-//! <tt>static balance get_balance(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_balance(node_ptr n, balance b);</tt>
-//!
-//! <tt>static balance negative();</tt>
-//!
-//! <tt>static balance zero();</tt>
-//!
-//! <tt>static balance positive();</tt>
-template<class NodeTraits>
-class avltree_algorithms
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_algorithms<NodeTraits>
- #endif
-{
- public:
- typedef typename NodeTraits::node node;
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
- typedef typename NodeTraits::balance balance;
-
- /// @cond
- private:
- typedef bstree_algorithms<NodeTraits> bstree_algo;
-
- /// @endcond
-
- public:
- //! This type is the information that will be
- //! filled by insert_unique_check
- typedef typename bstree_algo::insert_commit_data insert_commit_data;
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
- static node_ptr get_header(const const_node_ptr & n);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
- static node_ptr begin_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
- static node_ptr end_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
- static void swap_tree(const node_ptr & header1, const node_ptr & header2);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & node2)
- {
- if(node1 == node2)
- return;
-
- node_ptr header1(bstree_algo::get_header(node1)), header2(bstree_algo::get_header(node2));
- swap_nodes(node1, header1, node2, header2);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&,const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & header1, const node_ptr & node2, const node_ptr & header2)
- {
- if(node1 == node2) return;
-
- bstree_algo::swap_nodes(node1, header1, node2, header2);
- //Swap balance
- balance c = NodeTraits::get_balance(node1);
- NodeTraits::set_balance(node1, NodeTraits::get_balance(node2));
- NodeTraits::set_balance(node2, c);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node)
- {
- if(node_to_be_replaced == new_node)
- return;
- replace_node(node_to_be_replaced, bstree_algo::get_header(node_to_be_replaced), new_node);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & header, const node_ptr & new_node)
- {
- bstree_algo::replace_node(node_to_be_replaced, header, new_node);
- NodeTraits::set_balance(new_node, NodeTraits::get_balance(node_to_be_replaced));
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(const node_ptr&)
- static void unlink(const node_ptr & node)
- {
- node_ptr x = NodeTraits::get_parent(node);
- if(x){
- while(!is_header(x))
- x = NodeTraits::get_parent(x);
- erase(x, node);
- }
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
- static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
- static bool unique(const const_node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
- static std::size_t size(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
- static node_ptr next_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
- static node_ptr prev_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init(const node_ptr&)
- static void init(const node_ptr & node);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Requires</b>: node must not be part of any tree.
- //!
- //! <b>Effects</b>: Initializes the header to represent an empty tree.
- //! unique(header) == true.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
- static void init_header(const node_ptr & header)
- {
- bstree_algo::init_header(header);
- NodeTraits::set_balance(header, NodeTraits::zero());
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::erase(const node_ptr&,const node_ptr&)
- static node_ptr erase(const node_ptr & header, const node_ptr & z)
- {
- typename bstree_algo::data_for_rebalance info;
- bstree_algo::erase(header, z, info);
- rebalance_after_erasure(header, z, info);
- return z;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
- template<class NodePtrCompare>
- static bool transfer_unique
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
- {
- typename bstree_algo::data_for_rebalance info;
- bool const transferred = bstree_algo::transfer_unique(header1, comp, header2, z, info);
- if(transferred){
- rebalance_after_erasure(header2, z, info);
- rebalance_after_insertion(header1, z);
- }
- return transferred;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
- template<class NodePtrCompare>
- static void transfer_equal
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
- {
- typename bstree_algo::data_for_rebalance info;
- bstree_algo::transfer_equal(header1, comp, header2, z, info);
- rebalance_after_erasure(header2, z, info);
- rebalance_after_insertion(header1, z);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- static void clone
- (const const_node_ptr & source_header, const node_ptr & target_header, Cloner cloner, Disposer disposer)
- {
- avltree_node_cloner<NodeTraits, Cloner> new_cloner(cloner);
- bstree_algo::clone(source_header, target_header, new_cloner, disposer);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
- template<class Disposer>
- static void clear_and_dispose(const node_ptr & header, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr find
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> equal_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> bounded_range
- (const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
- , bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare>
- static node_ptr insert_equal_upper_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp)
- {
- bstree_algo::insert_equal_upper_bound(h, new_node, comp);
- rebalance_after_insertion(h, new_node);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_lower_bound(const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare>
- static node_ptr insert_equal_lower_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp)
- {
- bstree_algo::insert_equal_lower_bound(h, new_node, comp);
- rebalance_after_insertion(h, new_node);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal(const node_ptr&,const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare>
- static node_ptr insert_equal
- (const node_ptr & header, const node_ptr & hint, const node_ptr & new_node, NodePtrCompare comp)
- {
- bstree_algo::insert_equal(header, hint, new_node, comp);
- rebalance_after_insertion(header, new_node);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(const node_ptr&,const node_ptr&,const node_ptr&)
- static node_ptr insert_before
- (const node_ptr & header, const node_ptr & pos, const node_ptr & new_node)
- {
- bstree_algo::insert_before(header, pos, new_node);
- rebalance_after_insertion(header, new_node);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::push_back(const node_ptr&,const node_ptr&)
- static void push_back(const node_ptr & header, const node_ptr & new_node)
- {
- bstree_algo::push_back(header, new_node);
- rebalance_after_insertion(header, new_node);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::push_front(const node_ptr&,const node_ptr&)
- static void push_front(const node_ptr & header, const node_ptr & new_node)
- {
- bstree_algo::push_front(header, new_node);
- rebalance_after_insertion(header, new_node);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const node_ptr &hint, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(const node_ptr&,const node_ptr&,const insert_commit_data &)
- static void insert_unique_commit
- (const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data)
- {
- bstree_algo::insert_unique_commit(header, new_value, commit_data);
- rebalance_after_insertion(header, new_value);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
- static bool is_header(const const_node_ptr & p)
- { return NodeTraits::get_balance(p) == NodeTraits::zero() && bstree_algo::is_header(p); }
-
-
- /// @cond
- static bool verify(const node_ptr &header)
- {
- std::size_t height;
- std::size_t count;
- return verify_recursion(NodeTraits::get_parent(header), count, height);
- }
-
- private:
-
- static bool verify_recursion(node_ptr n, std::size_t &count, std::size_t &height)
- {
- if (!n){
- count = 0;
- height = 0;
- return true;
- }
- std::size_t leftcount, rightcount;
- std::size_t leftheight, rightheight;
- if(!verify_recursion(NodeTraits::get_left (n), leftcount, leftheight) ||
- !verify_recursion(NodeTraits::get_right(n), rightcount, rightheight) ){
- return false;
- }
- count = 1u + leftcount + rightcount;
- height = 1u + (leftheight > rightheight ? leftheight : rightheight);
-
- //If equal height, balance must be zero
- if(rightheight == leftheight){
- if(NodeTraits::get_balance(n) != NodeTraits::zero()){
- BOOST_ASSERT(0);
- return false;
- }
- }
- //If right is taller than left, then the difference must be at least 1 and the balance positive
- else if(rightheight > leftheight){
- if(rightheight - leftheight > 1 ){
- BOOST_ASSERT(0);
- return false;
- }
- else if(NodeTraits::get_balance(n) != NodeTraits::positive()){
- BOOST_ASSERT(0);
- return false;
- }
- }
- //If left is taller than right, then the difference must be at least 1 and the balance negative
- else{
- if(leftheight - rightheight > 1 ){
- BOOST_ASSERT(0);
- return false;
- }
- else if(NodeTraits::get_balance(n) != NodeTraits::negative()){
- BOOST_ASSERT(0);
- return false;
- }
- }
- return true;
- }
-
- static void rebalance_after_erasure
- ( const node_ptr & header, const node_ptr &z, const typename bstree_algo::data_for_rebalance &info)
- {
- if(info.y != z){
- NodeTraits::set_balance(info.y, NodeTraits::get_balance(z));
- }
- //Rebalance avltree
- rebalance_after_erasure_restore_invariants(header, info.x, info.x_parent);
- }
-
- static void rebalance_after_erasure_restore_invariants(const node_ptr & header, node_ptr x, node_ptr x_parent)
- {
- for ( node_ptr root = NodeTraits::get_parent(header)
- ; x != root
- ; root = NodeTraits::get_parent(header), x_parent = NodeTraits::get_parent(x)) {
- const balance x_parent_balance = NodeTraits::get_balance(x_parent);
- //Don't cache x_is_leftchild or similar because x can be null and
- //equal to both x_parent_left and x_parent_right
- const node_ptr x_parent_left (NodeTraits::get_left(x_parent));
- const node_ptr x_parent_right(NodeTraits::get_right(x_parent));
-
- if(x_parent_balance == NodeTraits::zero()){
- NodeTraits::set_balance( x_parent, x == x_parent_right ? NodeTraits::negative() : NodeTraits::positive() );
- break; // the height didn't change, let's stop here
- }
- else if(x_parent_balance == NodeTraits::negative()){
- if (x == x_parent_left) { ////x is left child or x and sibling are null
- NodeTraits::set_balance(x_parent, NodeTraits::zero()); // balanced
- x = x_parent;
- }
- else {
- // x is right child (x_parent_left is the left child)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(x_parent_left);
- if (NodeTraits::get_balance(x_parent_left) == NodeTraits::positive()) {
- // x_parent_left MUST have a right child
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_right(x_parent_left));
- x = avl_rotate_left_right(x_parent, x_parent_left, header);
- }
- else {
- avl_rotate_right(x_parent, x_parent_left, header);
- x = x_parent_left;
- }
-
- // if changed from negative to NodeTraits::positive(), no need to check above
- if (NodeTraits::get_balance(x) == NodeTraits::positive()){
- break;
- }
- }
- }
- else if(x_parent_balance == NodeTraits::positive()){
- if (x == x_parent_right) { //x is right child or x and sibling are null
- NodeTraits::set_balance(x_parent, NodeTraits::zero()); // balanced
- x = x_parent;
- }
- else {
- // x is left child (x_parent_right is the right child)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(x_parent_right);
- if (NodeTraits::get_balance(x_parent_right) == NodeTraits::negative()) {
- // x_parent_right MUST have then a left child
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_left(x_parent_right));
- x = avl_rotate_right_left(x_parent, x_parent_right, header);
- }
- else {
- avl_rotate_left(x_parent, x_parent_right, header);
- x = x_parent_right;
- }
- // if changed from NodeTraits::positive() to negative, no need to check above
- if (NodeTraits::get_balance(x) == NodeTraits::negative()){
- break;
- }
- }
- }
- else{
- BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached
- }
- }
- }
-
- static void rebalance_after_insertion(const node_ptr & header, node_ptr x)
- {
- NodeTraits::set_balance(x, NodeTraits::zero());
- // Rebalance.
- for(node_ptr root = NodeTraits::get_parent(header); x != root; root = NodeTraits::get_parent(header)){
- node_ptr const x_parent(NodeTraits::get_parent(x));
- node_ptr const x_parent_left(NodeTraits::get_left(x_parent));
- const balance x_parent_balance = NodeTraits::get_balance(x_parent);
- const bool x_is_leftchild(x == x_parent_left);
- if(x_parent_balance == NodeTraits::zero()){
- // if x is left, parent will have parent->bal_factor = negative
- // else, parent->bal_factor = NodeTraits::positive()
- NodeTraits::set_balance( x_parent, x_is_leftchild ? NodeTraits::negative() : NodeTraits::positive() );
- x = x_parent;
- }
- else if(x_parent_balance == NodeTraits::positive()){
- // if x is a left child, parent->bal_factor = zero
- if (x_is_leftchild)
- NodeTraits::set_balance(x_parent, NodeTraits::zero());
- else{ // x is a right child, needs rebalancing
- if (NodeTraits::get_balance(x) == NodeTraits::negative())
- avl_rotate_right_left(x_parent, x, header);
- else
- avl_rotate_left(x_parent, x, header);
- }
- break;
- }
- else if(x_parent_balance == NodeTraits::negative()){
- // if x is a left child, needs rebalancing
- if (x_is_leftchild) {
- if (NodeTraits::get_balance(x) == NodeTraits::positive())
- avl_rotate_left_right(x_parent, x, header);
- else
- avl_rotate_right(x_parent, x, header);
- }
- else
- NodeTraits::set_balance(x_parent, NodeTraits::zero());
- break;
- }
- else{
- BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached
- }
- }
- }
-
- static void left_right_balancing(const node_ptr & a, const node_ptr & b, const node_ptr & c)
- {
- // balancing...
- const balance c_balance = NodeTraits::get_balance(c);
- const balance zero_balance = NodeTraits::zero();
- const balance posi_balance = NodeTraits::positive();
- const balance nega_balance = NodeTraits::negative();
- NodeTraits::set_balance(c, zero_balance);
- if(c_balance == nega_balance){
- NodeTraits::set_balance(a, posi_balance);
- NodeTraits::set_balance(b, zero_balance);
- }
- else if(c_balance == zero_balance){
- NodeTraits::set_balance(a, zero_balance);
- NodeTraits::set_balance(b, zero_balance);
- }
- else if(c_balance == posi_balance){
- NodeTraits::set_balance(a, zero_balance);
- NodeTraits::set_balance(b, nega_balance);
- }
- else{
- BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached
- }
- }
-
- static node_ptr avl_rotate_left_right(const node_ptr a, const node_ptr a_oldleft, const node_ptr & hdr)
- { // [note: 'a_oldleft' is 'b']
- // | | //
- // a(-2) c //
- // / \ / \ //
- // / \ ==> / \ //
- // (pos)b [g] b a //
- // / \ / \ / \ //
- // [d] c [d] e f [g] //
- // / \ //
- // e f //
- const node_ptr c = NodeTraits::get_right(a_oldleft);
- bstree_algo::rotate_left_no_parent_fix(a_oldleft, c);
- //No need to link c with a [NodeTraits::set_parent(c, a) + NodeTraits::set_left(a, c)]
- //as c is not root and another rotation is coming
- bstree_algo::rotate_right(a, c, NodeTraits::get_parent(a), hdr);
- left_right_balancing(a, a_oldleft, c);
- return c;
- }
-
- static node_ptr avl_rotate_right_left(const node_ptr a, const node_ptr a_oldright, const node_ptr & hdr)
- { // [note: 'a_oldright' is 'b']
- // | | //
- // a(pos) c //
- // / \ / \ //
- // / \ / \ //
- // [d] b(neg) ==> a b //
- // / \ / \ / \ //
- // c [g] [d] e f [g] //
- // / \ //
- // e f //
- const node_ptr c (NodeTraits::get_left(a_oldright));
- bstree_algo::rotate_right_no_parent_fix(a_oldright, c);
- //No need to link c with a [NodeTraits::set_parent(c, a) + NodeTraits::set_right(a, c)]
- //as c is not root and another rotation is coming.
- bstree_algo::rotate_left(a, c, NodeTraits::get_parent(a), hdr);
- left_right_balancing(a_oldright, a, c);
- return c;
- }
-
- static void avl_rotate_left(const node_ptr &x, const node_ptr &x_oldright, const node_ptr & hdr)
- {
- bstree_algo::rotate_left(x, x_oldright, NodeTraits::get_parent(x), hdr);
-
- // reset the balancing factor
- if (NodeTraits::get_balance(x_oldright) == NodeTraits::positive()) {
- NodeTraits::set_balance(x, NodeTraits::zero());
- NodeTraits::set_balance(x_oldright, NodeTraits::zero());
- }
- else { // this doesn't happen during insertions
- NodeTraits::set_balance(x, NodeTraits::positive());
- NodeTraits::set_balance(x_oldright, NodeTraits::negative());
- }
- }
-
- static void avl_rotate_right(const node_ptr &x, const node_ptr &x_oldleft, const node_ptr & hdr)
- {
- bstree_algo::rotate_right(x, x_oldleft, NodeTraits::get_parent(x), hdr);
-
- // reset the balancing factor
- if (NodeTraits::get_balance(x_oldleft) == NodeTraits::negative()) {
- NodeTraits::set_balance(x, NodeTraits::zero());
- NodeTraits::set_balance(x_oldleft, NodeTraits::zero());
- }
- else { // this doesn't happen during insertions
- NodeTraits::set_balance(x, NodeTraits::negative());
- NodeTraits::set_balance(x_oldleft, NodeTraits::positive());
- }
- }
-
- /// @endcond
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<AvlTreeAlgorithms, NodeTraits>
-{
- typedef avltree_algorithms<NodeTraits> type;
-};
-
-template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct get_node_checker<AvlTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef detail::avltree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/bstree_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/bstree_algorithms.hpp
deleted file mode 100644
index e449ebac081..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/bstree_algorithms.hpp
+++ /dev/null
@@ -1,2097 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_BSTREE_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_BSTREE_ALGORITHMS_HPP
-
-#include <cstddef>
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/bstree_algorithms_base.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/uncast.hpp>
-#include <boost/intrusive/detail/math.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-
-#include <boost/intrusive/detail/minimal_pair_header.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-//! This type is the information that will be filled by insert_unique_check
-template <class NodePtr>
-struct insert_commit_data_t
-{
- BOOST_INTRUSIVE_FORCEINLINE insert_commit_data_t()
- : link_left(false), node()
- {}
- bool link_left;
- NodePtr node;
-};
-
-template <class NodePtr>
-struct data_for_rebalance_t
-{
- NodePtr x;
- NodePtr x_parent;
- NodePtr y;
-};
-
-namespace detail {
-
-template<class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct bstree_node_checker
- : public ExtraChecker
-{
- typedef ExtraChecker base_checker_t;
- typedef ValueTraits value_traits;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::const_node_ptr const_node_ptr;
-
- struct return_type
- : public base_checker_t::return_type
- {
- BOOST_INTRUSIVE_FORCEINLINE return_type()
- : min_key_node_ptr(const_node_ptr()), max_key_node_ptr(const_node_ptr()), node_count(0)
- {}
-
- const_node_ptr min_key_node_ptr;
- const_node_ptr max_key_node_ptr;
- size_t node_count;
- };
-
- BOOST_INTRUSIVE_FORCEINLINE bstree_node_checker(const NodePtrCompare& comp, ExtraChecker extra_checker)
- : base_checker_t(extra_checker), comp_(comp)
- {}
-
- void operator () (const const_node_ptr& p,
- const return_type& check_return_left, const return_type& check_return_right,
- return_type& check_return)
- {
- if (check_return_left.max_key_node_ptr)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!comp_(p, check_return_left.max_key_node_ptr));
- if (check_return_right.min_key_node_ptr)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!comp_(check_return_right.min_key_node_ptr, p));
- check_return.min_key_node_ptr = node_traits::get_left(p)? check_return_left.min_key_node_ptr : p;
- check_return.max_key_node_ptr = node_traits::get_right(p)? check_return_right.max_key_node_ptr : p;
- check_return.node_count = check_return_left.node_count + check_return_right.node_count + 1;
- base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
- }
-
- const NodePtrCompare comp_;
-};
-
-} // namespace detail
-
-/// @endcond
-
-
-
-//! This is an implementation of a binary search tree.
-//! A node in the search tree has references to its children and its parent. This
-//! is to allow traversal of the whole tree from a given node making the
-//! implementation of iterator a pointer to a node.
-//! At the top of the tree a node is used specially. This node's parent pointer
-//! is pointing to the root of the tree. Its left pointer points to the
-//! leftmost node in the tree and the right pointer to the rightmost one.
-//! This node is used to represent the end-iterator.
-//!
-//! +---------+
-//! header------------------------------>| |
-//! | |
-//! +----------(left)--------| |--------(right)---------+
-//! | +---------+ |
-//! | | |
-//! | | (parent) |
-//! | | |
-//! | | |
-//! | +---------+ |
-//! root of tree ..|......................> | | |
-//! | | D | |
-//! | | | |
-//! | +-------+---------+-------+ |
-//! | | | |
-//! | | | |
-//! | | | |
-//! | | | |
-//! | | | |
-//! | +---------+ +---------+ |
-//! | | | | | |
-//! | | B | | F | |
-//! | | | | | |
-//! | +--+---------+--+ +--+---------+--+ |
-//! | | | | | |
-//! | | | | | |
-//! | | | | | |
-//! | +---+-----+ +-----+---+ +---+-----+ +-----+---+ |
-//! +-->| | | | | | | |<--+
-//! | A | | C | | E | | G |
-//! | | | | | | | |
-//! +---------+ +---------+ +---------+ +---------+
-//!
-//! bstree_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the binary search tree
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
-//!
-//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
-//!
-//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
-template<class NodeTraits>
-class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
-{
- public:
- typedef typename NodeTraits::node node;
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
- typedef insert_commit_data_t<node_ptr> insert_commit_data;
- typedef data_for_rebalance_t<node_ptr> data_for_rebalance;
-
- /// @cond
- typedef bstree_algorithms<NodeTraits> this_type;
- typedef bstree_algorithms_base<NodeTraits> base_type;
- private:
- template<class Disposer>
- struct dispose_subtree_disposer
- {
- BOOST_INTRUSIVE_FORCEINLINE dispose_subtree_disposer(Disposer &disp, const node_ptr & subtree)
- : disposer_(&disp), subtree_(subtree)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void release()
- { disposer_ = 0; }
-
- BOOST_INTRUSIVE_FORCEINLINE ~dispose_subtree_disposer()
- {
- if(disposer_){
- dispose_subtree(subtree_, *disposer_);
- }
- }
- Disposer *disposer_;
- const node_ptr subtree_;
- };
-
- /// @endcond
-
- public:
- //! <b>Requires</b>: 'header' is the header node of a tree.
- //!
- //! <b>Effects</b>: Returns the first node of the tree, the header if the tree is empty.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr begin_node(const const_node_ptr & header)
- { return node_traits::get_left(header); }
-
- //! <b>Requires</b>: 'header' is the header node of a tree.
- //!
- //! <b>Effects</b>: Returns the header of the tree.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr end_node(const const_node_ptr & header)
- { return detail::uncast(header); }
-
- //! <b>Requires</b>: 'header' is the header node of a tree.
- //!
- //! <b>Effects</b>: Returns the root of the tree if any, header otherwise
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr root_node(const const_node_ptr & header)
- {
- node_ptr p = node_traits::get_parent(header);
- return p ? p : detail::uncast(header);
- }
-
- //! <b>Requires</b>: 'node' is a node of the tree or a node initialized
- //! by init(...) or init_node.
- //!
- //! <b>Effects</b>: Returns true if the node is initialized by init() or init_node().
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node)
- { return !NodeTraits::get_parent(node); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! <b>Requires</b>: 'node' is a node of the tree or a header node.
- //!
- //! <b>Effects</b>: Returns the header of the tree.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: Nothing.
- static node_ptr get_header(const const_node_ptr & node);
- #endif
-
- //! <b>Requires</b>: node1 and node2 can't be header nodes
- //! of two trees.
- //!
- //! <b>Effects</b>: Swaps two nodes. After the function node1 will be inserted
- //! in the position node2 before the function. node2 will be inserted in the
- //! position node1 had before the function.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This function will break container ordering invariants if
- //! node1 and node2 are not equivalent according to the ordering rules.
- //!
- //!Experimental function
- static void swap_nodes(const node_ptr & node1, const node_ptr & node2)
- {
- if(node1 == node2)
- return;
-
- node_ptr header1(base_type::get_header(node1)), header2(base_type::get_header(node2));
- swap_nodes(node1, header1, node2, header2);
- }
-
- //! <b>Requires</b>: node1 and node2 can't be header nodes
- //! of two trees with header header1 and header2.
- //!
- //! <b>Effects</b>: Swaps two nodes. After the function node1 will be inserted
- //! in the position node2 before the function. node2 will be inserted in the
- //! position node1 had before the function.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This function will break container ordering invariants if
- //! node1 and node2 are not equivalent according to the ordering rules.
- //!
- //!Experimental function
- static void swap_nodes(const node_ptr & node1, const node_ptr & header1, const node_ptr & node2, const node_ptr & header2)
- {
- if(node1 == node2)
- return;
-
- //node1 and node2 must not be header nodes
- //BOOST_INTRUSIVE_INVARIANT_ASSERT((header1 != node1 && header2 != node2));
- if(header1 != header2){
- //Update header1 if necessary
- if(node1 == NodeTraits::get_left(header1)){
- NodeTraits::set_left(header1, node2);
- }
-
- if(node1 == NodeTraits::get_right(header1)){
- NodeTraits::set_right(header1, node2);
- }
-
- if(node1 == NodeTraits::get_parent(header1)){
- NodeTraits::set_parent(header1, node2);
- }
-
- //Update header2 if necessary
- if(node2 == NodeTraits::get_left(header2)){
- NodeTraits::set_left(header2, node1);
- }
-
- if(node2 == NodeTraits::get_right(header2)){
- NodeTraits::set_right(header2, node1);
- }
-
- if(node2 == NodeTraits::get_parent(header2)){
- NodeTraits::set_parent(header2, node1);
- }
- }
- else{
- //If both nodes are from the same tree
- //Update header if necessary
- if(node1 == NodeTraits::get_left(header1)){
- NodeTraits::set_left(header1, node2);
- }
- else if(node2 == NodeTraits::get_left(header2)){
- NodeTraits::set_left(header2, node1);
- }
-
- if(node1 == NodeTraits::get_right(header1)){
- NodeTraits::set_right(header1, node2);
- }
- else if(node2 == NodeTraits::get_right(header2)){
- NodeTraits::set_right(header2, node1);
- }
-
- if(node1 == NodeTraits::get_parent(header1)){
- NodeTraits::set_parent(header1, node2);
- }
- else if(node2 == NodeTraits::get_parent(header2)){
- NodeTraits::set_parent(header2, node1);
- }
-
- //Adjust data in nodes to be swapped
- //so that final link swap works as expected
- if(node1 == NodeTraits::get_parent(node2)){
- NodeTraits::set_parent(node2, node2);
-
- if(node2 == NodeTraits::get_right(node1)){
- NodeTraits::set_right(node1, node1);
- }
- else{
- NodeTraits::set_left(node1, node1);
- }
- }
- else if(node2 == NodeTraits::get_parent(node1)){
- NodeTraits::set_parent(node1, node1);
-
- if(node1 == NodeTraits::get_right(node2)){
- NodeTraits::set_right(node2, node2);
- }
- else{
- NodeTraits::set_left(node2, node2);
- }
- }
- }
-
- //Now swap all the links
- node_ptr temp;
- //swap left link
- temp = NodeTraits::get_left(node1);
- NodeTraits::set_left(node1, NodeTraits::get_left(node2));
- NodeTraits::set_left(node2, temp);
- //swap right link
- temp = NodeTraits::get_right(node1);
- NodeTraits::set_right(node1, NodeTraits::get_right(node2));
- NodeTraits::set_right(node2, temp);
- //swap parent link
- temp = NodeTraits::get_parent(node1);
- NodeTraits::set_parent(node1, NodeTraits::get_parent(node2));
- NodeTraits::set_parent(node2, temp);
-
- //Now adjust adjacent nodes for newly inserted node 1
- if((temp = NodeTraits::get_left(node1))){
- NodeTraits::set_parent(temp, node1);
- }
- if((temp = NodeTraits::get_right(node1))){
- NodeTraits::set_parent(temp, node1);
- }
- if((temp = NodeTraits::get_parent(node1)) &&
- //The header has been already updated so avoid it
- temp != header2){
- if(NodeTraits::get_left(temp) == node2){
- NodeTraits::set_left(temp, node1);
- }
- if(NodeTraits::get_right(temp) == node2){
- NodeTraits::set_right(temp, node1);
- }
- }
- //Now adjust adjacent nodes for newly inserted node 2
- if((temp = NodeTraits::get_left(node2))){
- NodeTraits::set_parent(temp, node2);
- }
- if((temp = NodeTraits::get_right(node2))){
- NodeTraits::set_parent(temp, node2);
- }
- if((temp = NodeTraits::get_parent(node2)) &&
- //The header has been already updated so avoid it
- temp != header1){
- if(NodeTraits::get_left(temp) == node1){
- NodeTraits::set_left(temp, node2);
- }
- if(NodeTraits::get_right(temp) == node1){
- NodeTraits::set_right(temp, node2);
- }
- }
- }
-
- //! <b>Requires</b>: node_to_be_replaced must be inserted in a tree
- //! and new_node must not be inserted in a tree.
- //!
- //! <b>Effects</b>: Replaces node_to_be_replaced in its position in the
- //! tree with new_node. The tree does not need to be rebalanced
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This function will break container ordering invariants if
- //! new_node is not equivalent to node_to_be_replaced according to the
- //! ordering rules. This function is faster than erasing and inserting
- //! the node, since no rebalancing and comparison is needed. Experimental function
- BOOST_INTRUSIVE_FORCEINLINE static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node)
- {
- if(node_to_be_replaced == new_node)
- return;
- replace_node(node_to_be_replaced, base_type::get_header(node_to_be_replaced), new_node);
- }
-
- //! <b>Requires</b>: node_to_be_replaced must be inserted in a tree
- //! with header "header" and new_node must not be inserted in a tree.
- //!
- //! <b>Effects</b>: Replaces node_to_be_replaced in its position in the
- //! tree with new_node. The tree does not need to be rebalanced
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This function will break container ordering invariants if
- //! new_node is not equivalent to node_to_be_replaced according to the
- //! ordering rules. This function is faster than erasing and inserting
- //! the node, since no rebalancing or comparison is needed. Experimental function
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & header, const node_ptr & new_node)
- {
- if(node_to_be_replaced == new_node)
- return;
-
- //Update header if necessary
- if(node_to_be_replaced == NodeTraits::get_left(header)){
- NodeTraits::set_left(header, new_node);
- }
-
- if(node_to_be_replaced == NodeTraits::get_right(header)){
- NodeTraits::set_right(header, new_node);
- }
-
- if(node_to_be_replaced == NodeTraits::get_parent(header)){
- NodeTraits::set_parent(header, new_node);
- }
-
- //Now set data from the original node
- node_ptr temp;
- NodeTraits::set_left(new_node, NodeTraits::get_left(node_to_be_replaced));
- NodeTraits::set_right(new_node, NodeTraits::get_right(node_to_be_replaced));
- NodeTraits::set_parent(new_node, NodeTraits::get_parent(node_to_be_replaced));
-
- //Now adjust adjacent nodes for newly inserted node
- if((temp = NodeTraits::get_left(new_node))){
- NodeTraits::set_parent(temp, new_node);
- }
- if((temp = NodeTraits::get_right(new_node))){
- NodeTraits::set_parent(temp, new_node);
- }
- if((temp = NodeTraits::get_parent(new_node)) &&
- //The header has been already updated so avoid it
- temp != header){
- if(NodeTraits::get_left(temp) == node_to_be_replaced){
- NodeTraits::set_left(temp, new_node);
- }
- if(NodeTraits::get_right(temp) == node_to_be_replaced){
- NodeTraits::set_right(temp, new_node);
- }
- }
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! <b>Requires</b>: 'node' is a node from the tree except the header.
- //!
- //! <b>Effects</b>: Returns the next node of the tree.
- //!
- //! <b>Complexity</b>: Average constant time.
- //!
- //! <b>Throws</b>: Nothing.
- static node_ptr next_node(const node_ptr & node);
-
- //! <b>Requires</b>: 'node' is a node from the tree except the leftmost node.
- //!
- //! <b>Effects</b>: Returns the previous node of the tree.
- //!
- //! <b>Complexity</b>: Average constant time.
- //!
- //! <b>Throws</b>: Nothing.
- static node_ptr prev_node(const node_ptr & node);
-
- //! <b>Requires</b>: 'node' is a node of a tree but not the header.
- //!
- //! <b>Effects</b>: Returns the minimum node of the subtree starting at p.
- //!
- //! <b>Complexity</b>: Logarithmic to the size of the subtree.
- //!
- //! <b>Throws</b>: Nothing.
- static node_ptr minimum(node_ptr node);
-
- //! <b>Requires</b>: 'node' is a node of a tree but not the header.
- //!
- //! <b>Effects</b>: Returns the maximum node of the subtree starting at p.
- //!
- //! <b>Complexity</b>: Logarithmic to the size of the subtree.
- //!
- //! <b>Throws</b>: Nothing.
- static node_ptr maximum(node_ptr node);
- #endif
-
- //! <b>Requires</b>: 'node' must not be part of any tree.
- //!
- //! <b>Effects</b>: After the function unique(node) == true.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
- BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & node)
- {
- NodeTraits::set_parent(node, node_ptr());
- NodeTraits::set_left(node, node_ptr());
- NodeTraits::set_right(node, node_ptr());
- };
-
- //! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
- {
- return !NodeTraits::get_parent(node) &&
- !NodeTraits::get_left(node) &&
- !NodeTraits::get_right(node) ;
- };
-
- //! <b>Requires</b>: node must not be part of any tree.
- //!
- //! <b>Effects</b>: Initializes the header to represent an empty tree.
- //! unique(header) == true.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
- BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr & header)
- {
- NodeTraits::set_parent(header, node_ptr());
- NodeTraits::set_left(header, header);
- NodeTraits::set_right(header, header);
- }
-
- //! <b>Requires</b>: "disposer" must be an object function
- //! taking a node_ptr parameter and shouldn't throw.
- //!
- //! <b>Effects</b>: Empties the target tree calling
- //! <tt>void disposer::operator()(const node_ptr &)</tt> for every node of the tree
- //! except the header.
- //!
- //! <b>Complexity</b>: Linear to the number of element of the source tree plus the.
- //! number of elements of tree target tree when calling this function.
- //!
- //! <b>Throws</b>: If cloner functor throws. If this happens target nodes are disposed.
- template<class Disposer>
- static void clear_and_dispose(const node_ptr & header, Disposer disposer)
- {
- node_ptr source_root = NodeTraits::get_parent(header);
- if(!source_root)
- return;
- dispose_subtree(source_root, disposer);
- init_header(header);
- }
-
- //! <b>Requires</b>: header is the header of a tree.
- //!
- //! <b>Effects</b>: Unlinks the leftmost node from the tree, and
- //! updates the header link to the new leftmost node.
- //!
- //! <b>Complexity</b>: Average complexity is constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Notes</b>: This function breaks the tree and the tree can
- //! only be used for more unlink_leftmost_without_rebalance calls.
- //! This function is normally used to achieve a step by step
- //! controlled destruction of the tree.
- static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header)
- {
- node_ptr leftmost = NodeTraits::get_left(header);
- if (leftmost == header)
- return node_ptr();
- node_ptr leftmost_parent(NodeTraits::get_parent(leftmost));
- node_ptr leftmost_right (NodeTraits::get_right(leftmost));
- bool is_root = leftmost_parent == header;
-
- if (leftmost_right){
- NodeTraits::set_parent(leftmost_right, leftmost_parent);
- NodeTraits::set_left(header, base_type::minimum(leftmost_right));
-
- if (is_root)
- NodeTraits::set_parent(header, leftmost_right);
- else
- NodeTraits::set_left(NodeTraits::get_parent(header), leftmost_right);
- }
- else if (is_root){
- NodeTraits::set_parent(header, node_ptr());
- NodeTraits::set_left(header, header);
- NodeTraits::set_right(header, header);
- }
- else{
- NodeTraits::set_left(leftmost_parent, node_ptr());
- NodeTraits::set_left(header, leftmost_parent);
- }
- return leftmost;
- }
-
- //! <b>Requires</b>: node is a node of the tree but it's not the header.
- //!
- //! <b>Effects</b>: Returns the number of nodes of the subtree.
- //!
- //! <b>Complexity</b>: Linear time.
- //!
- //! <b>Throws</b>: Nothing.
- static std::size_t size(const const_node_ptr & header)
- {
- node_ptr beg(begin_node(header));
- node_ptr end(end_node(header));
- std::size_t i = 0;
- for(;beg != end; beg = base_type::next_node(beg)) ++i;
- return i;
- }
-
- //! <b>Requires</b>: header1 and header2 must be the header nodes
- //! of two trees.
- //!
- //! <b>Effects</b>: Swaps two trees. After the function header1 will contain
- //! links to the second tree and header2 will have links to the first tree.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- static void swap_tree(const node_ptr & header1, const node_ptr & header2)
- {
- if(header1 == header2)
- return;
-
- node_ptr tmp;
-
- //Parent swap
- tmp = NodeTraits::get_parent(header1);
- NodeTraits::set_parent(header1, NodeTraits::get_parent(header2));
- NodeTraits::set_parent(header2, tmp);
- //Left swap
- tmp = NodeTraits::get_left(header1);
- NodeTraits::set_left(header1, NodeTraits::get_left(header2));
- NodeTraits::set_left(header2, tmp);
- //Right swap
- tmp = NodeTraits::get_right(header1);
- NodeTraits::set_right(header1, NodeTraits::get_right(header2));
- NodeTraits::set_right(header2, tmp);
-
- //Now test parent
- node_ptr h1_parent(NodeTraits::get_parent(header1));
- if(h1_parent){
- NodeTraits::set_parent(h1_parent, header1);
- }
- else{
- NodeTraits::set_left(header1, header1);
- NodeTraits::set_right(header1, header1);
- }
-
- node_ptr h2_parent(NodeTraits::get_parent(header2));
- if(h2_parent){
- NodeTraits::set_parent(h2_parent, header2);
- }
- else{
- NodeTraits::set_left(header2, header2);
- NodeTraits::set_right(header2, header2);
- }
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! <b>Requires</b>: p is a node of a tree.
- //!
- //! <b>Effects</b>: Returns true if p is the header of the tree.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- static bool is_header(const const_node_ptr & p);
- #endif
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
- //!
- //! <b>Effects</b>: Returns a node_ptr to the first element that is equivalent to
- //! "key" according to "comp" or "header" if that element does not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr find
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- node_ptr end = detail::uncast(header);
- node_ptr y = lower_bound(header, key, comp);
- return (y == end || comp(key, y)) ? end : y;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
- //! 'lower_key' must not be greater than 'upper_key' according to 'comp'. If
- //! 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.
- //!
- //! <b>Effects</b>: Returns an a pair with the following criteria:
- //!
- //! first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise
- //!
- //! second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- //!
- //! <b>Note</b>: This function can be more efficient than calling upper_bound
- //! and lower_bound for lower_key and upper_key.
- //!
- //! <b>Note</b>: Experimental function, the interface might change.
- template< class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> bounded_range
- ( const const_node_ptr & header
- , const KeyType &lower_key
- , const KeyType &upper_key
- , KeyNodePtrCompare comp
- , bool left_closed
- , bool right_closed)
- {
- node_ptr y = detail::uncast(header);
- node_ptr x = NodeTraits::get_parent(header);
-
- while(x){
- //If x is less than lower_key the target
- //range is on the right part
- if(comp(x, lower_key)){
- //Check for invalid input range
- BOOST_INTRUSIVE_INVARIANT_ASSERT(comp(x, upper_key));
- x = NodeTraits::get_right(x);
- }
- //If the upper_key is less than x, the target
- //range is on the left part
- else if(comp(upper_key, x)){
- y = x;
- x = NodeTraits::get_left(x);
- }
- else{
- //x is inside the bounded range(lower_key <= x <= upper_key),
- //so we must split lower and upper searches
- //
- //Sanity check: if lower_key and upper_key are equal, then both left_closed and right_closed can't be false
- BOOST_INTRUSIVE_INVARIANT_ASSERT(left_closed || right_closed || comp(lower_key, x) || comp(x, upper_key));
- return std::pair<node_ptr,node_ptr>(
- left_closed
- //If left_closed, then comp(x, lower_key) is already the lower_bound
- //condition so we save one comparison and go to the next level
- //following traditional lower_bound algo
- ? lower_bound_loop(NodeTraits::get_left(x), x, lower_key, comp)
- //If left-open, comp(x, lower_key) is not the upper_bound algo
- //condition so we must recheck current 'x' node with upper_bound algo
- : upper_bound_loop(x, y, lower_key, comp)
- ,
- right_closed
- //If right_closed, then comp(upper_key, x) is already the upper_bound
- //condition so we can save one comparison and go to the next level
- //following lower_bound algo
- ? upper_bound_loop(NodeTraits::get_right(x), y, upper_key, comp)
- //If right-open, comp(upper_key, x) is not the lower_bound algo
- //condition so we must recheck current 'x' node with lower_bound algo
- : lower_bound_loop(x, y, upper_key, comp)
- );
- }
- }
- return std::pair<node_ptr,node_ptr> (y, y);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
- //!
- //! <b>Effects</b>: Returns the number of elements with a key equivalent to "key"
- //! according to "comp".
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class KeyType, class KeyNodePtrCompare>
- static std::size_t count
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- std::pair<node_ptr, node_ptr> ret = equal_range(header, key, comp);
- std::size_t n = 0;
- while(ret.first != ret.second){
- ++n;
- ret.first = base_type::next_node(ret.first);
- }
- return n;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
- //!
- //! <b>Effects</b>: Returns an a pair of node_ptr delimiting a range containing
- //! all elements that are equivalent to "key" according to "comp" or an
- //! empty range that indicates the position where those elements would be
- //! if there are no equivalent elements.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class KeyType, class KeyNodePtrCompare>
- BOOST_INTRUSIVE_FORCEINLINE static std::pair<node_ptr, node_ptr> equal_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- return bounded_range(header, key, key, comp, true, true);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
- //!
- //! <b>Effects</b>: Returns an a pair of node_ptr delimiting a range containing
- //! the first element that is equivalent to "key" according to "comp" or an
- //! empty range that indicates the position where that element would be
- //! if there are no equivalent elements.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> lower_bound_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- node_ptr const lb(lower_bound(header, key, comp));
- std::pair<node_ptr, node_ptr> ret_ii(lb, lb);
- if(lb != header && !comp(key, lb)){
- ret_ii.second = base_type::next_node(ret_ii.second);
- }
- return ret_ii;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
- //!
- //! <b>Effects</b>: Returns a node_ptr to the first element that is
- //! not less than "key" according to "comp" or "header" if that element does
- //! not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class KeyType, class KeyNodePtrCompare>
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr lower_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- return lower_bound_loop(NodeTraits::get_parent(header), detail::uncast(header), key, comp);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
- //!
- //! <b>Effects</b>: Returns a node_ptr to the first element that is greater
- //! than "key" according to "comp" or "header" if that element does not exist.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class KeyType, class KeyNodePtrCompare>
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr upper_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- return upper_bound_loop(NodeTraits::get_parent(header), detail::uncast(header), key, comp);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "commit_data" must have been obtained from a previous call to
- //! "insert_unique_check". No objects should have been inserted or erased
- //! from the set between the "insert_unique_check" that filled "commit_data"
- //! and the call to "insert_commit".
- //!
- //!
- //! <b>Effects</b>: Inserts new_node in the set using the information obtained
- //! from the "commit_data" that a previous "insert_check" filled.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Notes</b>: This function has only sense if a "insert_unique_check" has been
- //! previously executed to fill "commit_data". No value should be inserted or
- //! erased between the "insert_check" and "insert_commit" calls.
- BOOST_INTRUSIVE_FORCEINLINE static void insert_unique_commit
- (const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data)
- { return insert_commit(header, new_value, commit_data); }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares KeyType with a node_ptr.
- //!
- //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
- //! tree according to "comp" and obtains the needed information to realize
- //! a constant-time node insertion if there is no equivalent node.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing a node_ptr to the already present node
- //! and false. If there is not equivalent key can be inserted returns true
- //! in the returned pair's boolean and fills "commit_data" that is meant to
- //! be used with the "insert_commit" function to achieve a constant-time
- //! insertion function.
- //!
- //! <b>Complexity</b>: Average complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a node is expensive and the user does not want to have two equivalent nodes
- //! in the tree: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the order is much cheaper to construct
- //! than the node and this function offers the possibility to use that part
- //! to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the node and use
- //! "insert_commit" to insert the node in constant-time. This gives a total
- //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
- //! if no more objects are inserted or erased from the set.
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- std::size_t depth = 0;
- node_ptr h(detail::uncast(header));
- node_ptr y(h);
- node_ptr x(NodeTraits::get_parent(y));
- node_ptr prev = node_ptr();
-
- //Find the upper bound, cache the previous value and if we should
- //store it in the left or right node
- bool left_child = true;
- while(x){
- ++depth;
- y = x;
- x = (left_child = comp(key, x)) ?
- NodeTraits::get_left(x) : (prev = y, NodeTraits::get_right(x));
- }
-
- if(pdepth) *pdepth = depth;
-
- //Since we've found the upper bound there is no other value with the same key if:
- // - There is no previous node
- // - The previous node is less than the key
- const bool not_present = !prev || comp(prev, key);
- if(not_present){
- commit_data.link_left = left_child;
- commit_data.node = y;
- }
- return std::pair<node_ptr, bool>(prev, not_present);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares KeyType with a node_ptr.
- //! "hint" is node from the "header"'s tree.
- //!
- //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
- //! tree according to "comp" using "hint" as a hint to where it should be
- //! inserted and obtains the needed information to realize
- //! a constant-time node insertion if there is no equivalent node.
- //! If "hint" is the upper_bound the function has constant time
- //! complexity (two comparisons in the worst case).
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing a node_ptr to the already present node
- //! and false. If there is not equivalent key can be inserted returns true
- //! in the returned pair's boolean and fills "commit_data" that is meant to
- //! be used with the "insert_commit" function to achieve a constant-time
- //! insertion function.
- //!
- //! <b>Complexity</b>: Average complexity is at most logarithmic, but it is
- //! amortized constant time if new_node should be inserted immediately before "hint".
- //!
- //! <b>Throws</b>: If "comp" throws.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a node is expensive and the user does not want to have two equivalent nodes
- //! in the tree: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the order is much cheaper to construct
- //! than the node and this function offers the possibility to use that part
- //! to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the node and use
- //! "insert_commit" to insert the node in constant-time. This gives a total
- //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
- //! if no more objects are inserted or erased from the set.
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const node_ptr &hint, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- //hint must be bigger than the key
- if(hint == header || comp(key, hint)){
- node_ptr prev(hint);
- //Previous value should be less than the key
- if(hint == begin_node(header) || comp((prev = base_type::prev_node(hint)), key)){
- commit_data.link_left = unique(header) || !NodeTraits::get_left(hint);
- commit_data.node = commit_data.link_left ? hint : prev;
- if(pdepth){
- *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1;
- }
- return std::pair<node_ptr, bool>(node_ptr(), true);
- }
- }
- //Hint was wrong, use hintless insertion
- return insert_unique_check(header, key, comp, commit_data, pdepth);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
- //! the "header"'s tree.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
- //! where it will be inserted. If "hint" is the upper_bound
- //! the insertion takes constant time (two comparisons in the worst case).
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it is amortized
- //! constant time if new_node is inserted immediately before "hint".
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class NodePtrCompare>
- static node_ptr insert_equal
- (const node_ptr & h, const node_ptr & hint, const node_ptr & new_node, NodePtrCompare comp
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- insert_commit_data commit_data;
- insert_equal_check(h, hint, new_node, comp, commit_data, pdepth);
- insert_commit(h, new_node, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "h" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before the upper bound
- //! according to "comp".
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class NodePtrCompare>
- static node_ptr insert_equal_upper_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- insert_commit_data commit_data;
- insert_equal_upper_bound_check(h, new_node, comp, commit_data, pdepth);
- insert_commit(h, new_node, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "h" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before the lower bound
- //! according to "comp".
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class NodePtrCompare>
- static node_ptr insert_equal_lower_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- insert_commit_data commit_data;
- insert_equal_lower_bound_check(h, new_node, comp, commit_data, pdepth);
- insert_commit(h, new_node, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "pos" must be a valid iterator or header (end) node.
- //! "pos" must be an iterator pointing to the successor to "new_node"
- //! once inserted according to the order of already inserted nodes. This function does not
- //! check "pos" and this precondition must be guaranteed by the caller.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before "pos".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: If "pos" is not the successor of the newly inserted "new_node"
- //! tree invariants might be broken.
- static node_ptr insert_before
- (const node_ptr & header, const node_ptr & pos, const node_ptr & new_node
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- insert_commit_data commit_data;
- insert_before_check(header, pos, commit_data, pdepth);
- insert_commit(header, new_node, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "new_node" must be, according to the used ordering no less than the
- //! greatest inserted key.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before "pos".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: If "new_node" is less than the greatest inserted key
- //! tree invariants are broken. This function is slightly faster than
- //! using "insert_before".
- static void push_back
- (const node_ptr & header, const node_ptr & new_node
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- insert_commit_data commit_data;
- push_back_check(header, commit_data, pdepth);
- insert_commit(header, new_node, commit_data);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "new_node" must be, according to the used ordering, no greater than the
- //! lowest inserted key.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before "pos".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: If "new_node" is greater than the lowest inserted key
- //! tree invariants are broken. This function is slightly faster than
- //! using "insert_before".
- static void push_front
- (const node_ptr & header, const node_ptr & new_node
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- insert_commit_data commit_data;
- push_front_check(header, commit_data, pdepth);
- insert_commit(header, new_node, commit_data);
- }
-
- //! <b>Requires</b>: 'node' can't be a header node.
- //!
- //! <b>Effects</b>: Calculates the depth of a node: the depth of a
- //! node is the length (number of edges) of the path from the root
- //! to that node. (The root node is at depth 0.)
- //!
- //! <b>Complexity</b>: Logarithmic to the number of nodes in the tree.
- //!
- //! <b>Throws</b>: Nothing.
- static std::size_t depth(const_node_ptr node)
- {
- std::size_t depth = 0;
- node_ptr p_parent;
- while(node != NodeTraits::get_parent(p_parent = NodeTraits::get_parent(node))){
- ++depth;
- node = p_parent;
- }
- return depth;
- }
-
- //! <b>Requires</b>: "cloner" must be a function
- //! object taking a node_ptr and returning a new cloned node of it. "disposer" must
- //! take a node_ptr and shouldn't throw.
- //!
- //! <b>Effects</b>: First empties target tree calling
- //! <tt>void disposer::operator()(const node_ptr &)</tt> for every node of the tree
- //! except the header.
- //!
- //! Then, duplicates the entire tree pointed by "source_header" cloning each
- //! source node with <tt>node_ptr Cloner::operator()(const node_ptr &)</tt> to obtain
- //! the nodes of the target tree. If "cloner" throws, the cloned target nodes
- //! are disposed using <tt>void disposer(const node_ptr &)</tt>.
- //!
- //! <b>Complexity</b>: Linear to the number of element of the source tree plus the
- //! number of elements of tree target tree when calling this function.
- //!
- //! <b>Throws</b>: If cloner functor throws. If this happens target nodes are disposed.
- template <class Cloner, class Disposer>
- static void clone
- (const const_node_ptr & source_header, const node_ptr & target_header, Cloner cloner, Disposer disposer)
- {
- if(!unique(target_header)){
- clear_and_dispose(target_header, disposer);
- }
-
- node_ptr leftmost, rightmost;
- node_ptr new_root = clone_subtree
- (source_header, target_header, cloner, disposer, leftmost, rightmost);
-
- //Now update header node
- NodeTraits::set_parent(target_header, new_root);
- NodeTraits::set_left (target_header, leftmost);
- NodeTraits::set_right (target_header, rightmost);
- }
-
- //! <b>Requires</b>: header must be the header of a tree, z a node
- //! of that tree and z != header.
- //!
- //! <b>Effects</b>: Erases node "z" from the tree with header "header".
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void erase(const node_ptr & header, const node_ptr & z)
- {
- data_for_rebalance ignored;
- erase(header, z, ignored);
- }
-
- //! <b>Requires</b>: header1 and header2 must be the headers of trees tree1 and tree2
- //! respectively, z a non-header node of tree1. NodePtrCompare is the comparison
- //! function of tree1..
- //!
- //! <b>Effects</b>: Transfers node "z" from tree1 to tree2 if tree1 does not contain
- //! a node that is equivalent to z.
- //!
- //! <b>Returns</b>: True if the node was trasferred, false otherwise.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If the comparison throws.
- template<class NodePtrCompare>
- BOOST_INTRUSIVE_FORCEINLINE static bool transfer_unique
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
- {
- data_for_rebalance ignored;
- return transfer_unique(header1, comp, header2, z, ignored);
- }
-
- //! <b>Requires</b>: header1 and header2 must be the headers of trees tree1 and tree2
- //! respectively, z a non-header node of tree1. NodePtrCompare is the comparison
- //! function of tree1..
- //!
- //! <b>Effects</b>: Transfers node "z" from tree1 to tree2.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: If the comparison throws.
- template<class NodePtrCompare>
- BOOST_INTRUSIVE_FORCEINLINE static void transfer_equal
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
- {
- data_for_rebalance ignored;
- transfer_equal(header1, comp, header2, z, ignored);
- }
-
- //! <b>Requires</b>: node is a tree node but not the header.
- //!
- //! <b>Effects</b>: Unlinks the node and rebalances the tree.
- //!
- //! <b>Complexity</b>: Average complexity is constant time.
- //!
- //! <b>Throws</b>: Nothing.
- static void unlink(const node_ptr & node)
- {
- node_ptr x = NodeTraits::get_parent(node);
- if(x){
- while(!base_type::is_header(x))
- x = NodeTraits::get_parent(x);
- erase(x, node);
- }
- }
-
- //! <b>Requires</b>: header must be the header of a tree.
- //!
- //! <b>Effects</b>: Rebalances the tree.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear.
- static void rebalance(const node_ptr & header)
- {
- node_ptr root = NodeTraits::get_parent(header);
- if(root){
- rebalance_subtree(root);
- }
- }
-
- //! <b>Requires</b>: old_root is a node of a tree. It shall not be null.
- //!
- //! <b>Effects</b>: Rebalances the subtree rooted at old_root.
- //!
- //! <b>Returns</b>: The new root of the subtree.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear.
- static node_ptr rebalance_subtree(const node_ptr & old_root)
- {
- //Taken from:
- //"Tree rebalancing in optimal time and space"
- //Quentin F. Stout and Bette L. Warren
-
- //To avoid irregularities in the algorithm (old_root can be a
- //left or right child or even the root of the tree) just put the
- //root as the right child of its parent. Before doing this backup
- //information to restore the original relationship after
- //the algorithm is applied.
- node_ptr super_root = NodeTraits::get_parent(old_root);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(super_root);
-
- //Get root info
- node_ptr super_root_right_backup = NodeTraits::get_right(super_root);
- bool super_root_is_header = NodeTraits::get_parent(super_root) == old_root;
- bool old_root_is_right = is_right_child(old_root);
- NodeTraits::set_right(super_root, old_root);
-
- std::size_t size;
- subtree_to_vine(super_root, size);
- vine_to_subtree(super_root, size);
- node_ptr new_root = NodeTraits::get_right(super_root);
-
- //Recover root
- if(super_root_is_header){
- NodeTraits::set_right(super_root, super_root_right_backup);
- NodeTraits::set_parent(super_root, new_root);
- }
- else if(old_root_is_right){
- NodeTraits::set_right(super_root, new_root);
- }
- else{
- NodeTraits::set_right(super_root, super_root_right_backup);
- NodeTraits::set_left(super_root, new_root);
- }
- return new_root;
- }
-
- //! <b>Effects</b>: Asserts the integrity of the container with additional checks provided by the user.
- //!
- //! <b>Requires</b>: header must be the header of a tree.
- //!
- //! <b>Complexity</b>: Linear time.
- //!
- //! <b>Note</b>: The method might not have effect when asserts are turned off (e.g., with NDEBUG).
- //! Experimental function, interface might change in future versions.
- template<class Checker>
- static void check(const const_node_ptr& header, Checker checker, typename Checker::return_type& checker_return)
- {
- const_node_ptr root_node_ptr = NodeTraits::get_parent(header);
- if (!root_node_ptr){
- // check left&right header pointers
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_left(header) == header);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_right(header) == header);
- }
- else{
- // check parent pointer of root node
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(root_node_ptr) == header);
- // check subtree from root
- check_subtree(root_node_ptr, checker, checker_return);
- // check left&right header pointers
- const_node_ptr p = root_node_ptr;
- while (NodeTraits::get_left(p)) { p = NodeTraits::get_left(p); }
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_left(header) == p);
- p = root_node_ptr;
- while (NodeTraits::get_right(p)) { p = NodeTraits::get_right(p); }
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_right(header) == p);
- }
- }
-
- protected:
-
- template<class NodePtrCompare>
- static bool transfer_unique
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z, data_for_rebalance &info)
- {
- insert_commit_data commit_data;
- bool const transferable = insert_unique_check(header1, z, comp, commit_data).second;
- if(transferable){
- erase(header2, z, info);
- insert_commit(header1, z, commit_data);
- }
- return transferable;
- }
-
- template<class NodePtrCompare>
- static void transfer_equal
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z, data_for_rebalance &info)
- {
- insert_commit_data commit_data;
- insert_equal_upper_bound_check(header1, z, comp, commit_data);
- erase(header2, z, info);
- insert_commit(header1, z, commit_data);
- }
-
- static void erase(const node_ptr & header, const node_ptr & z, data_for_rebalance &info)
- {
- node_ptr y(z);
- node_ptr x;
- const node_ptr z_left(NodeTraits::get_left(z));
- const node_ptr z_right(NodeTraits::get_right(z));
-
- if(!z_left){
- x = z_right; // x might be null.
- }
- else if(!z_right){ // z has exactly one non-null child. y == z.
- x = z_left; // x is not null.
- BOOST_ASSERT(x);
- }
- else{ //make y != z
- // y = find z's successor
- y = base_type::minimum(z_right);
- x = NodeTraits::get_right(y); // x might be null.
- }
-
- node_ptr x_parent;
- const node_ptr z_parent(NodeTraits::get_parent(z));
- const bool z_is_leftchild(NodeTraits::get_left(z_parent) == z);
-
- if(y != z){ //has two children and y is the minimum of z
- //y is z's successor and it has a null left child.
- //x is the right child of y (it can be null)
- //Relink y in place of z and link x with y's old parent
- NodeTraits::set_parent(z_left, y);
- NodeTraits::set_left(y, z_left);
- if(y != z_right){
- //Link y with the right tree of z
- NodeTraits::set_right(y, z_right);
- NodeTraits::set_parent(z_right, y);
- //Link x with y's old parent (y must be a left child)
- x_parent = NodeTraits::get_parent(y);
- BOOST_ASSERT(NodeTraits::get_left(x_parent) == y);
- if(x)
- NodeTraits::set_parent(x, x_parent);
- //Since y was the successor and not the right child of z, it must be a left child
- NodeTraits::set_left(x_parent, x);
- }
- else{ //y was the right child of y so no need to fix x's position
- x_parent = y;
- }
- NodeTraits::set_parent(y, z_parent);
- this_type::set_child(header, y, z_parent, z_is_leftchild);
- }
- else { // z has zero or one child, x is one child (it can be null)
- //Just link x to z's parent
- x_parent = z_parent;
- if(x)
- NodeTraits::set_parent(x, z_parent);
- this_type::set_child(header, x, z_parent, z_is_leftchild);
-
- //Now update leftmost/rightmost in case z was one of them
- if(NodeTraits::get_left(header) == z){
- //z_left must be null because z is the leftmost
- BOOST_ASSERT(!z_left);
- NodeTraits::set_left(header, !z_right ?
- z_parent : // makes leftmost == header if z == root
- base_type::minimum(z_right));
- }
- if(NodeTraits::get_right(header) == z){
- //z_right must be null because z is the rightmost
- BOOST_ASSERT(!z_right);
- NodeTraits::set_right(header, !z_left ?
- z_parent : // makes rightmost == header if z == root
- base_type::maximum(z_left));
- }
- }
-
- //If z had 0/1 child, y == z and one of its children (and maybe null)
- //If z had 2 children, y is the successor of z and x is the right child of y
- info.x = x;
- info.y = y;
- //If z had 0/1 child, x_parent is the new parent of the old right child of y (z's successor)
- //If z had 2 children, x_parent is the new parent of y (z_parent)
- BOOST_ASSERT(!x || NodeTraits::get_parent(x) == x_parent);
- info.x_parent = x_parent;
- }
-
- //! <b>Requires</b>: node is a node of the tree but it's not the header.
- //!
- //! <b>Effects</b>: Returns the number of nodes of the subtree.
- //!
- //! <b>Complexity</b>: Linear time.
- //!
- //! <b>Throws</b>: Nothing.
- static std::size_t subtree_size(const const_node_ptr & subtree)
- {
- std::size_t count = 0;
- if (subtree){
- node_ptr n = detail::uncast(subtree);
- node_ptr m = NodeTraits::get_left(n);
- while(m){
- n = m;
- m = NodeTraits::get_left(n);
- }
-
- while(1){
- ++count;
- node_ptr n_right(NodeTraits::get_right(n));
- if(n_right){
- n = n_right;
- m = NodeTraits::get_left(n);
- while(m){
- n = m;
- m = NodeTraits::get_left(n);
- }
- }
- else {
- do{
- if (n == subtree){
- return count;
- }
- m = n;
- n = NodeTraits::get_parent(n);
- }while(NodeTraits::get_left(n) != m);
- }
- }
- }
- return count;
- }
-
- //! <b>Requires</b>: p is a node of a tree.
- //!
- //! <b>Effects</b>: Returns true if p is a left child.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static bool is_left_child(const node_ptr & p)
- { return NodeTraits::get_left(NodeTraits::get_parent(p)) == p; }
-
- //! <b>Requires</b>: p is a node of a tree.
- //!
- //! <b>Effects</b>: Returns true if p is a right child.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static bool is_right_child(const node_ptr & p)
- { return NodeTraits::get_right(NodeTraits::get_parent(p)) == p; }
-
- static void insert_before_check
- (const node_ptr &header, const node_ptr & pos
- , insert_commit_data &commit_data
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- node_ptr prev(pos);
- if(pos != NodeTraits::get_left(header))
- prev = base_type::prev_node(pos);
- bool link_left = unique(header) || !NodeTraits::get_left(pos);
- commit_data.link_left = link_left;
- commit_data.node = link_left ? pos : prev;
- if(pdepth){
- *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1;
- }
- }
-
- static void push_back_check
- (const node_ptr & header, insert_commit_data &commit_data
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- node_ptr prev(NodeTraits::get_right(header));
- if(pdepth){
- *pdepth = prev == header ? 0 : depth(prev) + 1;
- }
- commit_data.link_left = false;
- commit_data.node = prev;
- }
-
- static void push_front_check
- (const node_ptr & header, insert_commit_data &commit_data
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- , std::size_t *pdepth = 0
- #endif
- )
- {
- node_ptr pos(NodeTraits::get_left(header));
- if(pdepth){
- *pdepth = pos == header ? 0 : depth(pos) + 1;
- }
- commit_data.link_left = true;
- commit_data.node = pos;
- }
-
- template<class NodePtrCompare>
- static void insert_equal_check
- (const node_ptr &header, const node_ptr & hint, const node_ptr & new_node, NodePtrCompare comp
- , insert_commit_data &commit_data
- /// @cond
- , std::size_t *pdepth = 0
- /// @endcond
- )
- {
- if(hint == header || !comp(hint, new_node)){
- node_ptr prev(hint);
- if(hint == NodeTraits::get_left(header) ||
- !comp(new_node, (prev = base_type::prev_node(hint)))){
- bool link_left = unique(header) || !NodeTraits::get_left(hint);
- commit_data.link_left = link_left;
- commit_data.node = link_left ? hint : prev;
- if(pdepth){
- *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1;
- }
- }
- else{
- insert_equal_upper_bound_check(header, new_node, comp, commit_data, pdepth);
- }
- }
- else{
- insert_equal_lower_bound_check(header, new_node, comp, commit_data, pdepth);
- }
- }
-
- template<class NodePtrCompare>
- static void insert_equal_upper_bound_check
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp, insert_commit_data & commit_data, std::size_t *pdepth = 0)
- {
- std::size_t depth = 0;
- node_ptr y(h);
- node_ptr x(NodeTraits::get_parent(y));
-
- while(x){
- ++depth;
- y = x;
- x = comp(new_node, x) ?
- NodeTraits::get_left(x) : NodeTraits::get_right(x);
- }
- if(pdepth) *pdepth = depth;
- commit_data.link_left = (y == h) || comp(new_node, y);
- commit_data.node = y;
- }
-
- template<class NodePtrCompare>
- static void insert_equal_lower_bound_check
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp, insert_commit_data & commit_data, std::size_t *pdepth = 0)
- {
- std::size_t depth = 0;
- node_ptr y(h);
- node_ptr x(NodeTraits::get_parent(y));
-
- while(x){
- ++depth;
- y = x;
- x = !comp(x, new_node) ?
- NodeTraits::get_left(x) : NodeTraits::get_right(x);
- }
- if(pdepth) *pdepth = depth;
- commit_data.link_left = (y == h) || !comp(y, new_node);
- commit_data.node = y;
- }
-
- static void insert_commit
- (const node_ptr & header, const node_ptr & new_node, const insert_commit_data &commit_data)
- {
- //Check if commit_data has not been initialized by a insert_unique_check call.
- BOOST_INTRUSIVE_INVARIANT_ASSERT(commit_data.node != node_ptr());
- node_ptr parent_node(commit_data.node);
- if(parent_node == header){
- NodeTraits::set_parent(header, new_node);
- NodeTraits::set_right(header, new_node);
- NodeTraits::set_left(header, new_node);
- }
- else if(commit_data.link_left){
- NodeTraits::set_left(parent_node, new_node);
- if(parent_node == NodeTraits::get_left(header))
- NodeTraits::set_left(header, new_node);
- }
- else{
- NodeTraits::set_right(parent_node, new_node);
- if(parent_node == NodeTraits::get_right(header))
- NodeTraits::set_right(header, new_node);
- }
- NodeTraits::set_parent(new_node, parent_node);
- NodeTraits::set_right(new_node, node_ptr());
- NodeTraits::set_left(new_node, node_ptr());
- }
-
- //Fix header and own's parent data when replacing x with own, providing own's old data with parent
- static void set_child(const node_ptr & header, const node_ptr & new_child, const node_ptr & new_parent, const bool link_left)
- {
- if(new_parent == header)
- NodeTraits::set_parent(header, new_child);
- else if(link_left)
- NodeTraits::set_left(new_parent, new_child);
- else
- NodeTraits::set_right(new_parent, new_child);
- }
-
- // rotate p to left (no header and p's parent fixup)
- static void rotate_left_no_parent_fix(const node_ptr & p, const node_ptr &p_right)
- {
- node_ptr p_right_left(NodeTraits::get_left(p_right));
- NodeTraits::set_right(p, p_right_left);
- if(p_right_left){
- NodeTraits::set_parent(p_right_left, p);
- }
- NodeTraits::set_left(p_right, p);
- NodeTraits::set_parent(p, p_right);
- }
-
- // rotate p to left (with header and p's parent fixup)
- static void rotate_left(const node_ptr & p, const node_ptr & p_right, const node_ptr & p_parent, const node_ptr & header)
- {
- const bool p_was_left(NodeTraits::get_left(p_parent) == p);
- rotate_left_no_parent_fix(p, p_right);
- NodeTraits::set_parent(p_right, p_parent);
- set_child(header, p_right, p_parent, p_was_left);
- }
-
- // rotate p to right (no header and p's parent fixup)
- static void rotate_right_no_parent_fix(const node_ptr & p, const node_ptr &p_left)
- {
- node_ptr p_left_right(NodeTraits::get_right(p_left));
- NodeTraits::set_left(p, p_left_right);
- if(p_left_right){
- NodeTraits::set_parent(p_left_right, p);
- }
- NodeTraits::set_right(p_left, p);
- NodeTraits::set_parent(p, p_left);
- }
-
- // rotate p to right (with header and p's parent fixup)
- static void rotate_right(const node_ptr & p, const node_ptr & p_left, const node_ptr & p_parent, const node_ptr & header)
- {
- const bool p_was_left(NodeTraits::get_left(p_parent) == p);
- rotate_right_no_parent_fix(p, p_left);
- NodeTraits::set_parent(p_left, p_parent);
- set_child(header, p_left, p_parent, p_was_left);
- }
-
- private:
-
- static void subtree_to_vine(node_ptr vine_tail, std::size_t &size)
- {
- //Inspired by LibAVL:
- //It uses a clever optimization for trees with parent pointers.
- //No parent pointer is updated when transforming a tree to a vine as
- //most of them will be overriten during compression rotations.
- //A final pass must be made after the rebalancing to updated those
- //pointers not updated by tree_to_vine + compression calls
- std::size_t len = 0;
- node_ptr remainder = NodeTraits::get_right(vine_tail);
- while(remainder){
- node_ptr tempptr = NodeTraits::get_left(remainder);
- if(!tempptr){ //move vine-tail down one
- vine_tail = remainder;
- remainder = NodeTraits::get_right(remainder);
- ++len;
- }
- else{ //rotate
- NodeTraits::set_left(remainder, NodeTraits::get_right(tempptr));
- NodeTraits::set_right(tempptr, remainder);
- remainder = tempptr;
- NodeTraits::set_right(vine_tail, tempptr);
- }
- }
- size = len;
- }
-
- static void compress_subtree(node_ptr scanner, std::size_t count)
- {
- while(count--){ //compress "count" spine nodes in the tree with pseudo-root scanner
- node_ptr child = NodeTraits::get_right(scanner);
- node_ptr child_right = NodeTraits::get_right(child);
- NodeTraits::set_right(scanner, child_right);
- //Avoid setting the parent of child_right
- scanner = child_right;
- node_ptr scanner_left = NodeTraits::get_left(scanner);
- NodeTraits::set_right(child, scanner_left);
- if(scanner_left)
- NodeTraits::set_parent(scanner_left, child);
- NodeTraits::set_left(scanner, child);
- NodeTraits::set_parent(child, scanner);
- }
- }
-
- static void vine_to_subtree(const node_ptr & super_root, std::size_t count)
- {
- const std::size_t one_szt = 1u;
- std::size_t leaf_nodes = count + one_szt - std::size_t(one_szt << detail::floor_log2(count + one_szt));
- compress_subtree(super_root, leaf_nodes); //create deepest leaves
- std::size_t vine_nodes = count - leaf_nodes;
- while(vine_nodes > 1){
- vine_nodes /= 2;
- compress_subtree(super_root, vine_nodes);
- }
-
- //Update parents of nodes still in the in the original vine line
- //as those have not been updated by subtree_to_vine or compress_subtree
- for ( node_ptr q = super_root, p = NodeTraits::get_right(super_root)
- ; p
- ; q = p, p = NodeTraits::get_right(p)){
- NodeTraits::set_parent(p, q);
- }
- }
-
- //! <b>Requires</b>: "n" must be a node inserted in a tree.
- //!
- //! <b>Effects</b>: Returns a pointer to the header node of the tree.
- //!
- //! <b>Complexity</b>: Logarithmic.
- //!
- //! <b>Throws</b>: Nothing.
- static node_ptr get_root(const node_ptr & node)
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT((!inited(node)));
- node_ptr x = NodeTraits::get_parent(node);
- if(x){
- while(!base_type::is_header(x)){
- x = NodeTraits::get_parent(x);
- }
- return x;
- }
- else{
- return node;
- }
- }
-
- template <class Cloner, class Disposer>
- static node_ptr clone_subtree
- (const const_node_ptr &source_parent, const node_ptr &target_parent
- , Cloner cloner, Disposer disposer
- , node_ptr &leftmost_out, node_ptr &rightmost_out
- )
- {
- node_ptr target_sub_root = target_parent;
- node_ptr source_root = NodeTraits::get_parent(source_parent);
- if(!source_root){
- leftmost_out = rightmost_out = source_root;
- }
- else{
- //We'll calculate leftmost and rightmost nodes while iterating
- node_ptr current = source_root;
- node_ptr insertion_point = target_sub_root = cloner(current);
-
- //We'll calculate leftmost and rightmost nodes while iterating
- node_ptr leftmost = target_sub_root;
- node_ptr rightmost = target_sub_root;
-
- //First set the subroot
- NodeTraits::set_left(target_sub_root, node_ptr());
- NodeTraits::set_right(target_sub_root, node_ptr());
- NodeTraits::set_parent(target_sub_root, target_parent);
-
- dispose_subtree_disposer<Disposer> rollback(disposer, target_sub_root);
- while(true) {
- //First clone left nodes
- if( NodeTraits::get_left(current) &&
- !NodeTraits::get_left(insertion_point)) {
- current = NodeTraits::get_left(current);
- node_ptr temp = insertion_point;
- //Clone and mark as leaf
- insertion_point = cloner(current);
- NodeTraits::set_left (insertion_point, node_ptr());
- NodeTraits::set_right (insertion_point, node_ptr());
- //Insert left
- NodeTraits::set_parent(insertion_point, temp);
- NodeTraits::set_left (temp, insertion_point);
- //Update leftmost
- if(rightmost == target_sub_root)
- leftmost = insertion_point;
- }
- //Then clone right nodes
- else if( NodeTraits::get_right(current) &&
- !NodeTraits::get_right(insertion_point)){
- current = NodeTraits::get_right(current);
- node_ptr temp = insertion_point;
- //Clone and mark as leaf
- insertion_point = cloner(current);
- NodeTraits::set_left (insertion_point, node_ptr());
- NodeTraits::set_right (insertion_point, node_ptr());
- //Insert right
- NodeTraits::set_parent(insertion_point, temp);
- NodeTraits::set_right (temp, insertion_point);
- //Update rightmost
- rightmost = insertion_point;
- }
- //If not, go up
- else if(current == source_root){
- break;
- }
- else{
- //Branch completed, go up searching more nodes to clone
- current = NodeTraits::get_parent(current);
- insertion_point = NodeTraits::get_parent(insertion_point);
- }
- }
- rollback.release();
- leftmost_out = leftmost;
- rightmost_out = rightmost;
- }
- return target_sub_root;
- }
-
- template<class Disposer>
- static void dispose_subtree(node_ptr x, Disposer disposer)
- {
- while (x){
- node_ptr save(NodeTraits::get_left(x));
- if (save) {
- // Right rotation
- NodeTraits::set_left(x, NodeTraits::get_right(save));
- NodeTraits::set_right(save, x);
- }
- else {
- save = NodeTraits::get_right(x);
- init(x);
- disposer(x);
- }
- x = save;
- }
- }
-
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound_loop
- (node_ptr x, node_ptr y, const KeyType &key, KeyNodePtrCompare comp)
- {
- while(x){
- if(comp(x, key)){
- x = NodeTraits::get_right(x);
- }
- else{
- y = x;
- x = NodeTraits::get_left(x);
- }
- }
- return y;
- }
-
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound_loop
- (node_ptr x, node_ptr y, const KeyType &key, KeyNodePtrCompare comp)
- {
- while(x){
- if(comp(key, x)){
- y = x;
- x = NodeTraits::get_left(x);
- }
- else{
- x = NodeTraits::get_right(x);
- }
- }
- return y;
- }
-
- template<class Checker>
- static void check_subtree(const const_node_ptr& node, Checker checker, typename Checker::return_type& check_return)
- {
- const_node_ptr left = NodeTraits::get_left(node);
- const_node_ptr right = NodeTraits::get_right(node);
- typename Checker::return_type check_return_left;
- typename Checker::return_type check_return_right;
- if (left)
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(left) == node);
- check_subtree(left, checker, check_return_left);
- }
- if (right)
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(right) == node);
- check_subtree(right, checker, check_return_right);
- }
- checker(node, check_return_left, check_return_right, check_return);
- }
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<BsTreeAlgorithms, NodeTraits>
-{
- typedef bstree_algorithms<NodeTraits> type;
-};
-
-template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct get_node_checker<BsTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_BSTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/circular_list_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/circular_list_algorithms.hpp
deleted file mode 100644
index 0bc4d9de90d..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/circular_list_algorithms.hpp
+++ /dev/null
@@ -1,468 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-#include <cstddef>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! circular_list_algorithms provides basic algorithms to manipulate nodes
-//! forming a circular doubly linked list. An empty circular list is formed by a node
-//! whose pointers point to itself.
-//!
-//! circular_list_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the circular list
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_previous(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_previous(node_ptr n, node_ptr prev);</tt>
-//!
-//! <tt>static node_ptr get_next(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
-template<class NodeTraits>
-class circular_list_algorithms
-{
- public:
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
- typedef NodeTraits node_traits;
-
- //! <b>Effects</b>: Constructs an non-used list element, so that
- //! inited(this_node) == true
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr &this_node)
- {
- const node_ptr null_node = node_ptr();
- NodeTraits::set_next(this_node, null_node);
- NodeTraits::set_previous(this_node, null_node);
- }
-
- //! <b>Effects</b>: Returns true is "this_node" is in a non-used state
- //! as if it was initialized by the "init" function.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr &this_node)
- { return !NodeTraits::get_next(this_node); }
-
- //! <b>Effects</b>: Constructs an empty list, making this_node the only
- //! node of the circular list:
- //! <tt>NodeTraits::get_next(this_node) == NodeTraits::get_previous(this_node)
- //! == this_node</tt>.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr &this_node)
- {
- NodeTraits::set_next(this_node, this_node);
- NodeTraits::set_previous(this_node, this_node);
- }
-
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
- //! <tt>return NodeTraits::get_next(this_node) == this_node</tt>
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr &this_node)
- {
- node_ptr next = NodeTraits::get_next(this_node);
- return !next || next == this_node;
- }
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Returns the number of nodes in a circular list. If the circular list
- //! is empty, returns 1.
- //!
- //! <b>Complexity</b>: Linear
- //!
- //! <b>Throws</b>: Nothing.
- static std::size_t count(const const_node_ptr &this_node)
- {
- std::size_t result = 0;
- const_node_ptr p = this_node;
- do{
- p = NodeTraits::get_next(p);
- ++result;
- }while (p != this_node);
- return result;
- }
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Unlinks the node from the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr unlink(const node_ptr &this_node)
- {
- node_ptr next(NodeTraits::get_next(this_node));
- node_ptr prev(NodeTraits::get_previous(this_node));
- NodeTraits::set_next(prev, next);
- NodeTraits::set_previous(next, prev);
- return next;
- }
-
- //! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
- //!
- //! <b>Effects</b>: Unlinks the node [b, e) from the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void unlink(const node_ptr &b, const node_ptr &e)
- {
- if (b != e) {
- node_ptr prevb(NodeTraits::get_previous(b));
- NodeTraits::set_previous(e, prevb);
- NodeTraits::set_next(prevb, e);
- }
- }
-
- //! <b>Requires</b>: nxt_node must be a node of a circular list.
- //!
- //! <b>Effects</b>: Links this_node before nxt_node in the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void link_before(const node_ptr &nxt_node, const node_ptr &this_node)
- {
- node_ptr prev(NodeTraits::get_previous(nxt_node));
- NodeTraits::set_previous(this_node, prev);
- NodeTraits::set_next(this_node, nxt_node);
- //nxt_node might be an alias for prev->next_
- //so use it before NodeTraits::set_next(prev, ...)
- //is called and the reference changes its value
- NodeTraits::set_previous(nxt_node, this_node);
- NodeTraits::set_next(prev, this_node);
- }
-
- //! <b>Requires</b>: prev_node must be a node of a circular list.
- //!
- //! <b>Effects</b>: Links this_node after prev_node in the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void link_after(const node_ptr &prev_node, const node_ptr &this_node)
- {
- node_ptr next(NodeTraits::get_next(prev_node));
- NodeTraits::set_previous(this_node, prev_node);
- NodeTraits::set_next(this_node, next);
- //prev_node might be an alias for next->next_
- //so use it before update it before NodeTraits::set_previous(next, ...)
- //is called and the reference changes it's value
- NodeTraits::set_next(prev_node, this_node);
- NodeTraits::set_previous(next, this_node);
- }
-
- //! <b>Requires</b>: this_node and other_node must be nodes inserted
- //! in circular lists or be empty circular lists.
- //!
- //! <b>Effects</b>: Swaps the position of the nodes: this_node is inserted in
- //! other_nodes position in the second circular list and the other_node is inserted
- //! in this_node's position in the first circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void swap_nodes(const node_ptr &this_node, const node_ptr &other_node)
- {
- if (other_node == this_node)
- return;
- bool this_inited = inited(this_node);
- bool other_inited = inited(other_node);
- if(this_inited){
- init_header(this_node);
- }
- if(other_inited){
- init_header(other_node);
- }
-
- node_ptr next_this(NodeTraits::get_next(this_node));
- node_ptr prev_this(NodeTraits::get_previous(this_node));
- node_ptr next_other(NodeTraits::get_next(other_node));
- node_ptr prev_other(NodeTraits::get_previous(other_node));
- //these first two swaps must happen before the other two
- swap_prev(next_this, next_other);
- swap_next(prev_this, prev_other);
- swap_next(this_node, other_node);
- swap_prev(this_node, other_node);
-
- if(this_inited){
- init(other_node);
- }
- if(other_inited){
- init(this_node);
- }
- }
-
- //! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
- //! and p must be a node of a different circular list or may not be an iterator in
- // [b, e).
- //!
- //! <b>Effects</b>: Removes the nodes from [b, e) range from their circular list and inserts
- //! them before p in p's circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void transfer(const node_ptr &p, const node_ptr &b, const node_ptr &e)
- {
- if (b != e) {
- node_ptr prev_p(NodeTraits::get_previous(p));
- node_ptr prev_b(NodeTraits::get_previous(b));
- node_ptr prev_e(NodeTraits::get_previous(e));
- NodeTraits::set_next(prev_e, p);
- NodeTraits::set_previous(p, prev_e);
- NodeTraits::set_next(prev_b, e);
- NodeTraits::set_previous(e, prev_b);
- NodeTraits::set_next(prev_p, b);
- NodeTraits::set_previous(b, prev_p);
- }
- }
-
- //! <b>Requires</b>: i must a node of a circular list
- //! and p must be a node of a different circular list.
- //!
- //! <b>Effects</b>: Removes the node i from its circular list and inserts
- //! it before p in p's circular list.
- //! If p == i or p == NodeTraits::get_next(i), this function is a null operation.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void transfer(const node_ptr &p, const node_ptr &i)
- {
- node_ptr n(NodeTraits::get_next(i));
- if(n != p && i != p){
- node_ptr prev_p(NodeTraits::get_previous(p));
- node_ptr prev_i(NodeTraits::get_previous(i));
- NodeTraits::set_next(prev_p, i);
- NodeTraits::set_previous(i, prev_p);
- NodeTraits::set_next(i, p);
- NodeTraits::set_previous(p, i);
- NodeTraits::set_previous(n, prev_i);
- NodeTraits::set_next(prev_i, n);
-
- }
- }
-
- //! <b>Effects</b>: Reverses the order of elements in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: This function is linear time.
- static void reverse(const node_ptr &p)
- {
- node_ptr f(NodeTraits::get_next(p));
- node_ptr i(NodeTraits::get_next(f)), e(p);
-
- while(i != e) {
- node_ptr n = i;
- i = NodeTraits::get_next(i);
- transfer(f, n, i);
- f = n;
- }
- }
-
- //! <b>Effects</b>: Moves the node p n positions towards the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of moved positions.
- static void move_backwards(const node_ptr &p, std::size_t n)
- {
- //Null shift, nothing to do
- if(!n) return;
- node_ptr first = NodeTraits::get_next(p);
- //size() == 0 or 1, nothing to do
- if(first == NodeTraits::get_previous(p)) return;
- unlink(p);
- //Now get the new first node
- while(n--){
- first = NodeTraits::get_next(first);
- }
- link_before(first, p);
- }
-
- //! <b>Effects</b>: Moves the node p n positions towards the beginning of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of moved positions.
- static void move_forward(const node_ptr &p, std::size_t n)
- {
- //Null shift, nothing to do
- if(!n) return;
- node_ptr last = NodeTraits::get_previous(p);
- //size() == 0 or 1, nothing to do
- if(last == NodeTraits::get_next(p)) return;
-
- unlink(p);
- //Now get the new last node
- while(n--){
- last = NodeTraits::get_previous(last);
- }
- link_after(last, p);
- }
-
- //! <b>Requires</b>: f and l must be in a circular list.
- //!
- //! <b>Effects</b>: Returns the number of nodes in the range [f, l).
- //!
- //! <b>Complexity</b>: Linear
- //!
- //! <b>Throws</b>: Nothing.
- static std::size_t distance(const const_node_ptr &f, const const_node_ptr &l)
- {
- const_node_ptr i(f);
- std::size_t result = 0;
- while(i != l){
- i = NodeTraits::get_next(i);
- ++result;
- }
- return result;
- }
-
- struct stable_partition_info
- {
- std::size_t num_1st_partition;
- std::size_t num_2nd_partition;
- node_ptr beg_2st_partition;
- };
-
- template<class Pred>
- static void stable_partition(node_ptr beg, const node_ptr &end, Pred pred, stable_partition_info &info)
- {
- node_ptr bcur = node_traits::get_previous(beg);
- node_ptr cur = beg;
- node_ptr new_f = end;
-
- std::size_t num1 = 0, num2 = 0;
- while(cur != end){
- if(pred(cur)){
- ++num1;
- bcur = cur;
- cur = node_traits::get_next(cur);
- }
- else{
- ++num2;
- node_ptr last_to_remove = bcur;
- new_f = cur;
- bcur = cur;
- cur = node_traits::get_next(cur);
- BOOST_TRY{
- //Main loop
- while(cur != end){
- if(pred(cur)){ //Might throw
- ++num1;
- //Process current node
- node_traits::set_next (last_to_remove, cur);
- node_traits::set_previous(cur, last_to_remove);
- last_to_remove = cur;
- node_ptr nxt = node_traits::get_next(cur);
- node_traits::set_next (bcur, nxt);
- node_traits::set_previous(nxt, bcur);
- cur = nxt;
- }
- else{
- ++num2;
- bcur = cur;
- cur = node_traits::get_next(cur);
- }
- }
- }
- BOOST_CATCH(...){
- node_traits::set_next (last_to_remove, new_f);
- node_traits::set_previous(new_f, last_to_remove);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- node_traits::set_next(last_to_remove, new_f);
- node_traits::set_previous(new_f, last_to_remove);
- break;
- }
- }
- info.num_1st_partition = num1;
- info.num_2nd_partition = num2;
- info.beg_2st_partition = new_f;
- }
-
- private:
- BOOST_INTRUSIVE_FORCEINLINE static void swap_prev(const node_ptr &this_node, const node_ptr &other_node)
- {
- node_ptr temp(NodeTraits::get_previous(this_node));
- NodeTraits::set_previous(this_node, NodeTraits::get_previous(other_node));
- NodeTraits::set_previous(other_node, temp);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static void swap_next(const node_ptr &this_node, const node_ptr &other_node)
- {
- node_ptr temp(NodeTraits::get_next(this_node));
- NodeTraits::set_next(this_node, NodeTraits::get_next(other_node));
- NodeTraits::set_next(other_node, temp);
- }
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<CircularListAlgorithms, NodeTraits>
-{
- typedef circular_list_algorithms<NodeTraits> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/circular_slist_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/circular_slist_algorithms.hpp
deleted file mode 100644
index da840ef0c1d..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/circular_slist_algorithms.hpp
+++ /dev/null
@@ -1,406 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP
-
-#include <cstddef>
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/common_slist_algorithms.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! circular_slist_algorithms provides basic algorithms to manipulate nodes
-//! forming a circular singly linked list. An empty circular list is formed by a node
-//! whose pointer to the next node points to itself.
-//!
-//! circular_slist_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the circular list
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_next(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
-template<class NodeTraits>
-class circular_slist_algorithms
- /// @cond
- : public detail::common_slist_algorithms<NodeTraits>
- /// @endcond
-{
- /// @cond
- typedef detail::common_slist_algorithms<NodeTraits> base_t;
- /// @endcond
- public:
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
- typedef NodeTraits node_traits;
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Constructs an non-used list element, putting the next
- //! pointer to null:
- //! <tt>NodeTraits::get_next(this_node) == node_ptr()</tt>
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void init(node_ptr this_node);
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
- //! or it's a not inserted node:
- //! <tt>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static bool unique(const_node_ptr this_node);
-
- //! <b>Effects</b>: Returns true is "this_node" has the same state as
- //! if it was inited using "init(node_ptr)"
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static bool inited(const_node_ptr this_node);
-
- //! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Unlinks the next node of prev_node from the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void unlink_after(node_ptr prev_node);
-
- //! <b>Requires</b>: prev_node and last_node must be in a circular list
- //! or be an empty circular list.
- //!
- //! <b>Effects</b>: Unlinks the range (prev_node, last_node) from the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void unlink_after(node_ptr prev_node, node_ptr last_node);
-
- //! <b>Requires</b>: prev_node must be a node of a circular list.
- //!
- //! <b>Effects</b>: Links this_node after prev_node in the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void link_after(node_ptr prev_node, node_ptr this_node);
-
- //! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
- //! and p must be a node of a different circular list.
- //!
- //! <b>Effects</b>: Removes the nodes from (b, e] range from their circular list and inserts
- //! them after p in p's circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void transfer_after(node_ptr p, node_ptr b, node_ptr e);
-
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Constructs an empty list, making this_node the only
- //! node of the circular list:
- //! <tt>NodeTraits::get_next(this_node) == this_node</tt>.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr &this_node)
- { NodeTraits::set_next(this_node, this_node); }
-
- //! <b>Requires</b>: this_node and prev_init_node must be in the same circular list.
- //!
- //! <b>Effects</b>: Returns the previous node of this_node in the circular list starting.
- //! the search from prev_init_node. The first node checked for equality
- //! is NodeTraits::get_next(prev_init_node).
- //!
- //! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr &prev_init_node, const node_ptr &this_node)
- { return base_t::get_previous_node(prev_init_node, this_node); }
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Returns the previous node of this_node in the circular list.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the circular list.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & this_node)
- { return base_t::get_previous_node(this_node, this_node); }
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Returns the previous node of the previous node of this_node in the circular list.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the circular list.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_previous_node(const node_ptr & this_node)
- { return get_previous_previous_node(this_node, this_node); }
-
- //! <b>Requires</b>: this_node and p must be in the same circular list.
- //!
- //! <b>Effects</b>: Returns the previous node of the previous node of this_node in the
- //! circular list starting. the search from p. The first node checked
- //! for equality is NodeTraits::get_next((NodeTraits::get_next(p)).
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the circular list.
- //!
- //! <b>Throws</b>: Nothing.
- static node_ptr get_previous_previous_node(node_ptr p, const node_ptr & this_node)
- {
- node_ptr p_next = NodeTraits::get_next(p);
- node_ptr p_next_next = NodeTraits::get_next(p_next);
- while (this_node != p_next_next){
- p = p_next;
- p_next = p_next_next;
- p_next_next = NodeTraits::get_next(p_next);
- }
- return p;
- }
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Returns the number of nodes in a circular list. If the circular list
- //! is empty, returns 1.
- //!
- //! <b>Complexity</b>: Linear
- //!
- //! <b>Throws</b>: Nothing.
- static std::size_t count(const const_node_ptr & this_node)
- {
- std::size_t result = 0;
- const_node_ptr p = this_node;
- do{
- p = NodeTraits::get_next(p);
- ++result;
- } while (p != this_node);
- return result;
- }
-
- //! <b>Requires</b>: this_node must be in a circular list, be an empty circular list or be inited.
- //!
- //! <b>Effects</b>: Unlinks the node from the circular list.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the circular list
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void unlink(const node_ptr & this_node)
- {
- if(NodeTraits::get_next(this_node))
- base_t::unlink_after(get_previous_node(this_node));
- }
-
- //! <b>Requires</b>: nxt_node must be a node of a circular list.
- //!
- //! <b>Effects</b>: Links this_node before nxt_node in the circular list.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the circular list.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void link_before (const node_ptr & nxt_node, const node_ptr & this_node)
- { base_t::link_after(get_previous_node(nxt_node), this_node); }
-
- //! <b>Requires</b>: this_node and other_node must be nodes inserted
- //! in circular lists or be empty circular lists.
- //!
- //! <b>Effects</b>: Swaps the position of the nodes: this_node is inserted in
- //! other_nodes position in the second circular list and the other_node is inserted
- //! in this_node's position in the first circular list.
- //!
- //! <b>Complexity</b>: Linear to number of elements of both lists
- //!
- //! <b>Throws</b>: Nothing.
- static void swap_nodes(const node_ptr & this_node, const node_ptr & other_node)
- {
- if (other_node == this_node)
- return;
- const node_ptr this_next = NodeTraits::get_next(this_node);
- const node_ptr other_next = NodeTraits::get_next(other_node);
- const bool this_null = !this_next;
- const bool other_null = !other_next;
- const bool this_empty = this_next == this_node;
- const bool other_empty = other_next == other_node;
-
- if(!(other_null || other_empty)){
- NodeTraits::set_next(this_next == other_node ? other_node : get_previous_node(other_node), this_node );
- }
- if(!(this_null | this_empty)){
- NodeTraits::set_next(other_next == this_node ? this_node : get_previous_node(this_node), other_node );
- }
- NodeTraits::set_next(this_node, other_empty ? this_node : (other_next == this_node ? other_node : other_next) );
- NodeTraits::set_next(other_node, this_empty ? other_node : (this_next == other_node ? this_node : this_next ) );
- }
-
- //! <b>Effects</b>: Reverses the order of elements in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: This function is linear to the contained elements.
- static void reverse(const node_ptr & p)
- {
- node_ptr i = NodeTraits::get_next(p), e(p);
- for (;;) {
- node_ptr nxt(NodeTraits::get_next(i));
- if (nxt == e)
- break;
- base_t::transfer_after(e, i, nxt);
- }
- }
-
- //! <b>Effects</b>: Moves the node p n positions towards the end of the list.
- //!
- //! <b>Returns</b>: The previous node of p after the function if there has been any movement,
- //! Null if n leads to no movement.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
- static node_ptr move_backwards(const node_ptr & p, std::size_t n)
- {
- //Null shift, nothing to do
- if(!n) return node_ptr();
- node_ptr first = NodeTraits::get_next(p);
-
- //count() == 1 or 2, nothing to do
- if(NodeTraits::get_next(first) == p)
- return node_ptr();
-
- bool end_found = false;
- node_ptr new_last = node_ptr();
-
- //Now find the new last node according to the shift count.
- //If we find p before finding the new last node
- //unlink p, shortcut the search now that we know the size of the list
- //and continue.
- for(std::size_t i = 1; i <= n; ++i){
- new_last = first;
- first = NodeTraits::get_next(first);
- if(first == p){
- //Shortcut the shift with the modulo of the size of the list
- n %= i;
- if(!n)
- return node_ptr();
- i = 0;
- //Unlink p and continue the new first node search
- first = NodeTraits::get_next(p);
- base_t::unlink_after(new_last);
- end_found = true;
- }
- }
-
- //If the p has not been found in the previous loop, find it
- //starting in the new first node and unlink it
- if(!end_found){
- base_t::unlink_after(base_t::get_previous_node(first, p));
- }
-
- //Now link p after the new last node
- base_t::link_after(new_last, p);
- return new_last;
- }
-
- //! <b>Effects</b>: Moves the node p n positions towards the beginning of the list.
- //!
- //! <b>Returns</b>: The previous node of p after the function if there has been any movement,
- //! Null if n leads equals to no movement.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
- static node_ptr move_forward(const node_ptr & p, std::size_t n)
- {
- //Null shift, nothing to do
- if(!n) return node_ptr();
- node_ptr first = node_traits::get_next(p);
-
- //count() == 1 or 2, nothing to do
- if(node_traits::get_next(first) == p) return node_ptr();
-
- //Iterate until p is found to know where the current last node is.
- //If the shift count is less than the size of the list, we can also obtain
- //the position of the new last node after the shift.
- node_ptr old_last(first), next_to_it, new_last(p);
- std::size_t distance = 1;
- while(p != (next_to_it = node_traits::get_next(old_last))){
- if(++distance > n)
- new_last = node_traits::get_next(new_last);
- old_last = next_to_it;
- }
- //If the shift was bigger or equal than the size, obtain the equivalent
- //forward shifts and find the new last node.
- if(distance <= n){
- //Now find the equivalent forward shifts.
- //Shortcut the shift with the modulo of the size of the list
- std::size_t new_before_last_pos = (distance - (n % distance))% distance;
- //If the shift is a multiple of the size there is nothing to do
- if(!new_before_last_pos) return node_ptr();
-
- for( new_last = p
- ; new_before_last_pos--
- ; new_last = node_traits::get_next(new_last)){
- //empty
- }
- }
-
- //Now unlink p and link it after the new last node
- base_t::unlink_after(old_last);
- base_t::link_after(new_last, p);
- return new_last;
- }
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<CircularSListAlgorithms, NodeTraits>
-{
- typedef circular_slist_algorithms<NodeTraits> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/derivation_value_traits.hpp b/src/third_party/boost-1.68.0/boost/intrusive/derivation_value_traits.hpp
deleted file mode 100644
index 06991983f3d..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/derivation_value_traits.hpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
-#define BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//!This value traits template is used to create value traits
-//!from user defined node traits where value_traits::value_type will
-//!derive from node_traits::node
-
-template<class T, class NodeTraits, link_mode_type LinkMode
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- = safe_link
- #endif
->
-struct derivation_value_traits
-{
- public:
- typedef NodeTraits node_traits;
- typedef T value_type;
- typedef typename node_traits::node node;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::const_node_ptr const_node_ptr;
- typedef typename pointer_traits<node_ptr>::
- template rebind_pointer<value_type>::type pointer;
- typedef typename pointer_traits<node_ptr>::
- template rebind_pointer<const value_type>::type const_pointer;
- typedef typename boost::intrusive::
- pointer_traits<pointer>::reference reference;
- typedef typename boost::intrusive::
- pointer_traits<const_pointer>::reference const_reference;
- static const link_mode_type link_mode = LinkMode;
-
- static node_ptr to_node_ptr(reference value)
- { return node_ptr(&value); }
-
- static const_node_ptr to_node_ptr(const_reference value)
- { return node_ptr(&value); }
-
- static pointer to_value_ptr(const node_ptr &n)
- {
- return pointer_traits<pointer>::pointer_to(static_cast<reference>(*n));
- }
-
- static const_pointer to_value_ptr(const const_node_ptr &n)
- {
- return pointer_traits<pointer>::pointer_to(static_cast<const_reference>(*n));
- }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/any_node_and_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/any_node_and_algorithms.hpp
deleted file mode 100644
index 26a1edcd3ea..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/any_node_and_algorithms.hpp
+++ /dev/null
@@ -1,297 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_ANY_NODE_HPP
-#define BOOST_INTRUSIVE_ANY_NODE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <cstddef>
-
-namespace boost {
-namespace intrusive {
-
-template<class VoidPointer>
-struct any_node
-{
- typedef any_node node;
- typedef typename pointer_rebind<VoidPointer, node>::type node_ptr;
- typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
- node_ptr node_ptr_1;
- node_ptr node_ptr_2;
- node_ptr node_ptr_3;
- std::size_t size_t_1;
-};
-
-template<class VoidPointer>
-struct any_list_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
- { n->node_ptr_1 = next; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_previous(const node_ptr & n, const node_ptr & prev)
- { n->node_ptr_2 = prev; }
-};
-
-
-template<class VoidPointer>
-struct any_slist_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
- { n->node_ptr_1 = next; }
-};
-
-
-template<class VoidPointer>
-struct any_unordered_node_traits
- : public any_slist_node_traits<VoidPointer>
-{
- typedef any_slist_node_traits<VoidPointer> reduced_slist_node_traits;
- typedef typename reduced_slist_node_traits::node node;
- typedef typename reduced_slist_node_traits::node_ptr node_ptr;
- typedef typename reduced_slist_node_traits::const_node_ptr const_node_ptr;
-
- static const bool store_hash = true;
- static const bool optimize_multikey = true;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
- { n->node_ptr_1 = next; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(const node_ptr & n, const node_ptr & prev)
- { n->node_ptr_2 = prev; }
-
- BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const const_node_ptr & n)
- { return n->size_t_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_hash(const node_ptr & n, std::size_t h)
- { n->size_t_1 = h; }
-};
-
-
-template<class VoidPointer>
-struct any_rbtree_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- typedef std::size_t color;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->node_ptr_1 = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->node_ptr_2 = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->node_ptr_3; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->node_ptr_3 = r; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
- { return n->size_t_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
- { n->size_t_1 = c; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color black()
- { return 0u; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color red()
- { return 1u; }
-};
-
-
-template<class VoidPointer>
-struct any_avltree_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- typedef std::size_t balance;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->node_ptr_1 = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->node_ptr_2 = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->node_ptr_3; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->node_ptr_3 = r; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
- { return n->size_t_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
- { n->size_t_1 = b; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance negative()
- { return 0u; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance zero()
- { return 1u; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance positive()
- { return 2u; }
-};
-
-
-template<class VoidPointer>
-struct any_tree_node_traits
-{
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->node_ptr_1; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->node_ptr_1 = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->node_ptr_2; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->node_ptr_2 = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->node_ptr_3; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->node_ptr_3 = r; }
-};
-
-template<class VoidPointer>
-class any_node_traits
-{
- public:
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-};
-
-template<class VoidPointer>
-class any_algorithms
-{
- template <class T>
- static void function_not_available_for_any_hooks(typename detail::enable_if<detail::is_same<T, bool> >::type)
- {}
-
- public:
- typedef any_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
- typedef any_node_traits<VoidPointer> node_traits;
-
- //! <b>Requires</b>: node must not be part of any tree.
- //!
- //! <b>Effects</b>: After the function unique(node) == true.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
- BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & node)
- { node->node_ptr_1 = node_ptr(); };
-
- //! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
- { return !node->node_ptr_1; };
-
- BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node)
- { return !node->node_ptr_1; }
-
- static void unlink(const node_ptr &)
- {
- //Auto-unlink hooks and unlink() are not available for any hooks
- any_algorithms<VoidPointer>::template function_not_available_for_any_hooks<node_ptr>();
- }
-
- static void swap_nodes(const node_ptr &, const node_ptr &)
- {
- //Any nodes have no swap_nodes capability because they don't know
- //what algorithm they must use to unlink the node from the container
- any_algorithms<VoidPointer>::template function_not_available_for_any_hooks<node_ptr>();
- }
-};
-
-///@cond
-
-template<class NodeTraits>
-struct get_algo<AnyAlgorithm, NodeTraits>
-{
- typedef typename pointer_rebind<typename NodeTraits::node_ptr, void>::type void_pointer;
- typedef any_algorithms<void_pointer> type;
-};
-
-///@endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_ANY_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/avltree_node.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/avltree_node.hpp
deleted file mode 100644
index 16d1c1d291c..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/avltree_node.hpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_AVLTREE_NODE_HPP
-#define BOOST_INTRUSIVE_AVLTREE_NODE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-#include <boost/intrusive/avltree_algorithms.hpp>
-#include <boost/intrusive/pointer_plus_bits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-
-namespace boost {
-namespace intrusive {
-
-/////////////////////////////////////////////////////////////////////////////
-// //
-// Generic node_traits for any pointer type //
-// //
-/////////////////////////////////////////////////////////////////////////////
-
-//This is the compact representation: 3 pointers
-template<class VoidPointer>
-struct compact_avltree_node
-{
- typedef typename pointer_rebind<VoidPointer, compact_avltree_node<VoidPointer> >::type node_ptr;
- typedef typename pointer_rebind<VoidPointer, const compact_avltree_node<VoidPointer> >::type const_node_ptr;
- enum balance { negative_t, zero_t, positive_t };
- node_ptr parent_, left_, right_;
-};
-
-//This is the normal representation: 3 pointers + enum
-template<class VoidPointer>
-struct avltree_node
-{
- typedef typename pointer_rebind<VoidPointer, avltree_node<VoidPointer> >::type node_ptr;
- typedef typename pointer_rebind<VoidPointer, const avltree_node<VoidPointer> >::type const_node_ptr;
- enum balance { negative_t, zero_t, positive_t };
- node_ptr parent_, left_, right_;
- balance balance_;
-};
-
-//This is the default node traits implementation
-//using a node with 3 generic pointers plus an enum
-template<class VoidPointer>
-struct default_avltree_node_traits_impl
-{
- typedef avltree_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- typedef typename node::balance balance;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->parent_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
- { return n->parent_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->parent_ = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->left_ = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->right_ = r; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
- { return n->balance_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const node_ptr & n)
- { return n->balance_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
- { n->balance_ = b; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance negative()
- { return node::negative_t; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance zero()
- { return node::zero_t; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance positive()
- { return node::positive_t; }
-};
-
-//This is the compact node traits implementation
-//using a node with 3 generic pointers
-template<class VoidPointer>
-struct compact_avltree_node_traits_impl
-{
- typedef compact_avltree_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
- typedef typename node::balance balance;
-
- typedef pointer_plus_bits<node_ptr, 2> ptr_bit;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return ptr_bit::get_pointer(n->parent_); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { ptr_bit::set_pointer(n->parent_, p); }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->left_ = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->right_ = r; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
- { return (balance)ptr_bit::get_bits(n->parent_); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
- { ptr_bit::set_bits(n->parent_, (std::size_t)b); }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance negative()
- { return node::negative_t; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance zero()
- { return node::zero_t; }
-
- BOOST_INTRUSIVE_FORCEINLINE static balance positive()
- { return node::positive_t; }
-};
-
-//Dispatches the implementation based on the boolean
-template<class VoidPointer, bool Compact>
-struct avltree_node_traits_dispatch
- : public default_avltree_node_traits_impl<VoidPointer>
-{};
-
-template<class VoidPointer>
-struct avltree_node_traits_dispatch<VoidPointer, true>
- : public compact_avltree_node_traits_impl<VoidPointer>
-{};
-
-//Inherit from rbtree_node_traits_dispatch depending on the embedding capabilities
-template<class VoidPointer, bool OptimizeSize = false>
-struct avltree_node_traits
- : public avltree_node_traits_dispatch
- < VoidPointer
- , OptimizeSize &&
- max_pointer_plus_bits
- < VoidPointer
- , detail::alignment_of<compact_avltree_node<VoidPointer> >::value
- >::value >= 2u
- >
-{};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_AVLTREE_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/common_slist_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/common_slist_algorithms.hpp
deleted file mode 100644
index 5e6ff4d1aa3..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/common_slist_algorithms.hpp
+++ /dev/null
@@ -1,198 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/core/no_exceptions_support.hpp>
-#include <cstddef>
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-template<class NodeTraits>
-class common_slist_algorithms
-{
- public:
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
- typedef NodeTraits node_traits;
-
- static node_ptr get_previous_node(node_ptr p, const node_ptr & this_node)
- {
- for( node_ptr p_next
- ; this_node != (p_next = NodeTraits::get_next(p))
- ; p = p_next){
- //Logic error: possible use of linear lists with
- //operations only permitted with circular lists
- BOOST_INTRUSIVE_INVARIANT_ASSERT(p);
- }
- return p;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & this_node)
- { NodeTraits::set_next(this_node, node_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & this_node)
- {
- node_ptr next = NodeTraits::get_next(this_node);
- return !next || next == this_node;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & this_node)
- { return !NodeTraits::get_next(this_node); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(const node_ptr & prev_node)
- {
- const_node_ptr this_node(NodeTraits::get_next(prev_node));
- NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node)
- { NodeTraits::set_next(prev_node, last_node); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void link_after(const node_ptr & prev_node, const node_ptr & this_node)
- {
- NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
- NodeTraits::set_next(prev_node, this_node);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static void incorporate_after(const node_ptr & bp, const node_ptr & b, const node_ptr & be)
- {
- node_ptr p(NodeTraits::get_next(bp));
- NodeTraits::set_next(bp, b);
- NodeTraits::set_next(be, p);
- }
-
- static void transfer_after(const node_ptr & bp, const node_ptr & bb, const node_ptr & be)
- {
- if (bp != bb && bp != be && bb != be) {
- node_ptr next_b = NodeTraits::get_next(bb);
- node_ptr next_e = NodeTraits::get_next(be);
- node_ptr next_p = NodeTraits::get_next(bp);
- NodeTraits::set_next(bb, next_e);
- NodeTraits::set_next(be, next_p);
- NodeTraits::set_next(bp, next_b);
- }
- }
-
- struct stable_partition_info
- {
- std::size_t num_1st_partition;
- std::size_t num_2nd_partition;
- node_ptr beg_2st_partition;
- node_ptr new_last_node;
- };
-
- template<class Pred>
- static void stable_partition(node_ptr before_beg, const node_ptr &end, Pred pred, stable_partition_info &info)
- {
- node_ptr bcur = before_beg;
- node_ptr cur = node_traits::get_next(bcur);
- node_ptr new_f = end;
-
- std::size_t num1 = 0, num2 = 0;
- while(cur != end){
- if(pred(cur)){
- ++num1;
- bcur = cur;
- cur = node_traits::get_next(cur);
- }
- else{
- ++num2;
- node_ptr last_to_remove = bcur;
- new_f = cur;
- bcur = cur;
- cur = node_traits::get_next(cur);
- BOOST_TRY{
- //Main loop
- while(cur != end){
- if(pred(cur)){ //Might throw
- ++num1;
- //Process current node
- node_traits::set_next(last_to_remove, cur);
- last_to_remove = cur;
- node_ptr nxt = node_traits::get_next(cur);
- node_traits::set_next(bcur, nxt);
- cur = nxt;
- }
- else{
- ++num2;
- bcur = cur;
- cur = node_traits::get_next(cur);
- }
- }
- }
- BOOST_CATCH(...){
- node_traits::set_next(last_to_remove, new_f);
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- node_traits::set_next(last_to_remove, new_f);
- break;
- }
- }
- info.num_1st_partition = num1;
- info.num_2nd_partition = num2;
- info.beg_2st_partition = new_f;
- info.new_last_node = bcur;
- }
-
- //! <b>Requires</b>: f and l must be in a circular list.
- //!
- //! <b>Effects</b>: Returns the number of nodes in the range [f, l).
- //!
- //! <b>Complexity</b>: Linear
- //!
- //! <b>Throws</b>: Nothing.
- static std::size_t distance(const const_node_ptr &f, const const_node_ptr &l)
- {
- const_node_ptr i(f);
- std::size_t result = 0;
- while(i != l){
- i = NodeTraits::get_next(i);
- ++result;
- }
- return result;
- }
-};
-
-/// @endcond
-
-} //namespace detail
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<CommonSListAlgorithms, NodeTraits>
-{
- typedef detail::common_slist_algorithms<NodeTraits> type;
-};
-
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/list_iterator.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/list_iterator.hpp
deleted file mode 100644
index 6c5f1616758..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/list_iterator.hpp
+++ /dev/null
@@ -1,134 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_LIST_ITERATOR_HPP
-#define BOOST_INTRUSIVE_LIST_ITERATOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/detail/std_fwd.hpp>
-#include <boost/intrusive/detail/iiterator.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-
-namespace boost {
-namespace intrusive {
-
-// list_iterator provides some basic functions for a
-// node oriented bidirectional iterator:
-template<class ValueTraits, bool IsConst>
-class list_iterator
-{
- private:
- typedef iiterator
- <ValueTraits, IsConst, std::bidirectional_iterator_tag> types_t;
-
- static const bool stateful_value_traits = types_t::stateful_value_traits;
-
- typedef ValueTraits value_traits;
- typedef typename types_t::node_traits node_traits;
-
- typedef typename types_t::node node;
- typedef typename types_t::node_ptr node_ptr;
- typedef typename types_t::const_value_traits_ptr const_value_traits_ptr;
-
- public:
- typedef typename types_t::iterator_type::difference_type difference_type;
- typedef typename types_t::iterator_type::value_type value_type;
- typedef typename types_t::iterator_type::pointer pointer;
- typedef typename types_t::iterator_type::reference reference;
- typedef typename types_t::iterator_type::iterator_category iterator_category;
-
- BOOST_INTRUSIVE_FORCEINLINE list_iterator()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit list_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
- : members_(nodeptr, traits_ptr)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE list_iterator(list_iterator<ValueTraits, false> const& other)
- : members_(other.pointed_node(), other.get_value_traits())
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE const node_ptr &pointed_node() const
- { return members_.nodeptr_; }
-
- BOOST_INTRUSIVE_FORCEINLINE list_iterator &operator=(const node_ptr &node)
- { members_.nodeptr_ = node; return static_cast<list_iterator&>(*this); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
- { return members_.get_ptr(); }
-
- public:
- BOOST_INTRUSIVE_FORCEINLINE list_iterator& operator++()
- {
- node_ptr p = node_traits::get_next(members_.nodeptr_);
- members_.nodeptr_ = p;
- return static_cast<list_iterator&> (*this);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE list_iterator operator++(int)
- {
- list_iterator result (*this);
- members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
- return result;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE list_iterator& operator--()
- {
- members_.nodeptr_ = node_traits::get_previous(members_.nodeptr_);
- return static_cast<list_iterator&> (*this);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE list_iterator operator--(int)
- {
- list_iterator result (*this);
- members_.nodeptr_ = node_traits::get_previous(members_.nodeptr_);
- return result;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const list_iterator& l, const list_iterator& r)
- { return l.pointed_node() == r.pointed_node(); }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const list_iterator& l, const list_iterator& r)
- { return !(l == r); }
-
- BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
- { return *operator->(); }
-
- BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
- { return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
-
- list_iterator<ValueTraits, false> unconst() const
- { return list_iterator<ValueTraits, false>(this->pointed_node(), this->get_value_traits()); }
-
- private:
- BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
- { return ValueTraits::to_value_ptr(members_.nodeptr_); }
-
- BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
- { return this->get_value_traits()->to_value_ptr(members_.nodeptr_); }
-
- iiterator_members<node_ptr, const_value_traits_ptr, stateful_value_traits> members_;
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_LIST_ITERATOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/list_node.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/list_node.hpp
deleted file mode 100644
index c3b48470116..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/list_node.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_LIST_NODE_HPP
-#define BOOST_INTRUSIVE_LIST_NODE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-
-namespace boost {
-namespace intrusive {
-
-// list_node_traits can be used with circular_list_algorithms and supplies
-// a list_node holding the pointers needed for a double-linked list
-// it is used by list_derived_node and list_member_node
-
-template<class VoidPointer>
-struct list_node
-{
- typedef typename pointer_rebind<VoidPointer, list_node>::type node_ptr;
- node_ptr next_;
- node_ptr prev_;
-};
-
-template<class VoidPointer>
-struct list_node_traits
-{
- typedef list_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const const_node_ptr & n)
- { return n->prev_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const node_ptr & n)
- { return n->prev_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_previous(const node_ptr & n, const node_ptr & prev)
- { n->prev_ = prev; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
- { return n->next_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
- { return n->next_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
- { n->next_ = next; }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#endif //BOOST_INTRUSIVE_LIST_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/node_cloner_disposer.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/node_cloner_disposer.hpp
deleted file mode 100644
index 3fe29543474..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/node_cloner_disposer.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2014-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_DETAIL_NODE_CLONER_DISPOSER_HPP
-#define BOOST_INTRUSIVE_DETAIL_NODE_CLONER_DISPOSER_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-template<class F, class ValueTraits, algo_types AlgoType, bool IsConst = true>
-struct node_cloner
- //Use public inheritance to avoid MSVC bugs with closures
- : public ebo_functor_holder<F>
-{
- typedef ValueTraits value_traits;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node_ptr node_ptr;
- typedef ebo_functor_holder<F> base_t;
- typedef typename get_algo< AlgoType
- , node_traits>::type node_algorithms;
- static const bool safemode_or_autounlink =
- is_safe_autounlink<value_traits::link_mode>::value;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::pointer pointer;
- typedef typename value_traits::const_pointer const_pointer;
- typedef typename node_traits::node node;
- typedef typename value_traits::const_node_ptr const_node_ptr;
- typedef typename pointer_traits<pointer>::reference reference;
- typedef typename pointer_traits
- <const_pointer>::reference const_reference;
- typedef typename if_c<IsConst, const_reference, reference>::type reference_type;
-
- node_cloner(F f, const ValueTraits *traits)
- : base_t(f), traits_(traits)
- {}
-
- // tree-based containers use this method, which is proxy-reference friendly
- node_ptr operator()(const node_ptr & p)
- {
- reference_type v = *traits_->to_value_ptr(p);
- node_ptr n = traits_->to_node_ptr(*base_t::get()(v));
- //Cloned node must be in default mode if the linking mode requires it
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(n));
- return n;
- }
-
- const ValueTraits * const traits_;
-};
-
-template<class F, class ValueTraits, algo_types AlgoType>
-struct node_disposer
- //Use public inheritance to avoid MSVC bugs with closures
- : public ebo_functor_holder<F>
-{
- typedef ValueTraits value_traits;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node_ptr node_ptr;
- typedef ebo_functor_holder<F> base_t;
- typedef typename get_algo< AlgoType
- , node_traits>::type node_algorithms;
- static const bool safemode_or_autounlink =
- is_safe_autounlink<value_traits::link_mode>::value;
-
- node_disposer(F f, const ValueTraits *cont)
- : base_t(f), traits_(cont)
- {}
-
- void operator()(const node_ptr & p)
- {
- if(safemode_or_autounlink)
- node_algorithms::init(p);
- base_t::get()(traits_->to_value_ptr(p));
- }
- const ValueTraits * const traits_;
-};
-
-} //namespace detail{
-} //namespace intrusive{
-} //namespace boost{
-
-#endif //BOOST_INTRUSIVE_DETAIL_NODE_CLONER_DISPOSER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/rbtree_node.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/rbtree_node.hpp
deleted file mode 100644
index 68f4bdf8e28..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/rbtree_node.hpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2013.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_RBTREE_NODE_HPP
-#define BOOST_INTRUSIVE_RBTREE_NODE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-#include <boost/intrusive/rbtree_algorithms.hpp>
-#include <boost/intrusive/pointer_plus_bits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/tree_node.hpp>
-
-namespace boost {
-namespace intrusive {
-
-/////////////////////////////////////////////////////////////////////////////
-// //
-// Generic node_traits for any pointer type //
-// //
-/////////////////////////////////////////////////////////////////////////////
-
-//This is the compact representation: 3 pointers
-template<class VoidPointer>
-struct compact_rbtree_node
-{
- typedef compact_rbtree_node<VoidPointer> node;
- typedef typename pointer_rebind<VoidPointer, node >::type node_ptr;
- typedef typename pointer_rebind<VoidPointer, const node >::type const_node_ptr;
- enum color { red_t, black_t };
- node_ptr parent_, left_, right_;
-};
-
-//This is the normal representation: 3 pointers + enum
-template<class VoidPointer>
-struct rbtree_node
-{
- typedef rbtree_node<VoidPointer> node;
- typedef typename pointer_rebind<VoidPointer, node >::type node_ptr;
- typedef typename pointer_rebind<VoidPointer, const node >::type const_node_ptr;
-
- enum color { red_t, black_t };
- node_ptr parent_, left_, right_;
- color color_;
-};
-
-//This is the default node traits implementation
-//using a node with 3 generic pointers plus an enum
-template<class VoidPointer>
-struct default_rbtree_node_traits_impl
-{
- typedef rbtree_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- typedef typename node::color color;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->parent_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
- { return n->parent_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->parent_ = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->left_ = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->right_ = r; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
- { return n->color_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color get_color(const node_ptr & n)
- { return n->color_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
- { n->color_ = c; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color black()
- { return node::black_t; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color red()
- { return node::red_t; }
-};
-
-//This is the compact node traits implementation
-//using a node with 3 generic pointers
-template<class VoidPointer>
-struct compact_rbtree_node_traits_impl
-{
- typedef compact_rbtree_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename node::const_node_ptr const_node_ptr;
-
- typedef pointer_plus_bits<node_ptr, 1> ptr_bit;
-
- typedef typename node::color color;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return ptr_bit::get_pointer(n->parent_); }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
- { return ptr_bit::get_pointer(n->parent_); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { ptr_bit::set_pointer(n->parent_, p); }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->left_ = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->right_ = r; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
- { return (color)ptr_bit::get_bits(n->parent_); }
-
- BOOST_INTRUSIVE_FORCEINLINE static color get_color(const node_ptr & n)
- { return (color)ptr_bit::get_bits(n->parent_); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
- { ptr_bit::set_bits(n->parent_, c != 0); }
-
- BOOST_INTRUSIVE_FORCEINLINE static color black()
- { return node::black_t; }
-
- BOOST_INTRUSIVE_FORCEINLINE static color red()
- { return node::red_t; }
-};
-
-//Dispatches the implementation based on the boolean
-template<class VoidPointer, bool Compact>
-struct rbtree_node_traits_dispatch
- : public default_rbtree_node_traits_impl<VoidPointer>
-{};
-
-template<class VoidPointer>
-struct rbtree_node_traits_dispatch<VoidPointer, true>
- : public compact_rbtree_node_traits_impl<VoidPointer>
-{};
-
-//Inherit from rbtree_node_traits_dispatch depending on the embedding capabilities
-template<class VoidPointer, bool OptimizeSize = false>
-struct rbtree_node_traits
- : public rbtree_node_traits_dispatch
- < VoidPointer
- , OptimizeSize &&
- (max_pointer_plus_bits
- < VoidPointer
- , detail::alignment_of<compact_rbtree_node<VoidPointer> >::value
- >::value >= 1)
- >
-{};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_RBTREE_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/simple_disposers.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/simple_disposers.hpp
deleted file mode 100644
index 1420b281b04..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/simple_disposers.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2014-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP
-#define BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-namespace detail {
-
-class null_disposer
-{
- public:
- template <class Pointer>
- void operator()(Pointer)
- {}
-};
-
-template<class NodeAlgorithms>
-class init_disposer
-{
- typedef typename NodeAlgorithms::node_ptr node_ptr;
-
- public:
- void operator()(const node_ptr & p)
- { NodeAlgorithms::init(p); }
-};
-
-} //namespace detail{
-} //namespace intrusive{
-} //namespace boost{
-
-#endif //BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/slist_iterator.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/slist_iterator.hpp
deleted file mode 100644
index 63ce5c3fefb..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/slist_iterator.hpp
+++ /dev/null
@@ -1,125 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_SLIST_ITERATOR_HPP
-#define BOOST_INTRUSIVE_SLIST_ITERATOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/detail/std_fwd.hpp>
-#include <boost/intrusive/detail/iiterator.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-
-namespace boost {
-namespace intrusive {
-
-
-// slist_iterator provides some basic functions for a
-// node oriented bidirectional iterator:
-template<class ValueTraits, bool IsConst>
-class slist_iterator
-{
- private:
- typedef iiterator
- <ValueTraits, IsConst, std::forward_iterator_tag> types_t;
-
- static const bool stateful_value_traits = types_t::stateful_value_traits;
-
- typedef ValueTraits value_traits;
- typedef typename types_t::node_traits node_traits;
-
- typedef typename types_t::node node;
- typedef typename types_t::node_ptr node_ptr;
- typedef typename types_t::const_value_traits_ptr const_value_traits_ptr;
-
- public:
- typedef typename types_t::iterator_type::difference_type difference_type;
- typedef typename types_t::iterator_type::value_type value_type;
- typedef typename types_t::iterator_type::pointer pointer;
- typedef typename types_t::iterator_type::reference reference;
- typedef typename types_t::iterator_type::iterator_category iterator_category;
-
- BOOST_INTRUSIVE_FORCEINLINE slist_iterator()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit slist_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
- : members_(nodeptr, traits_ptr)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE slist_iterator(slist_iterator<ValueTraits, false> const& other)
- : members_(other.pointed_node(), other.get_value_traits())
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE const node_ptr &pointed_node() const
- { return members_.nodeptr_; }
-
- BOOST_INTRUSIVE_FORCEINLINE slist_iterator &operator=(const node_ptr &node)
- { members_.nodeptr_ = node; return static_cast<slist_iterator&>(*this); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
- { return members_.get_ptr(); }
-
- public:
- BOOST_INTRUSIVE_FORCEINLINE slist_iterator& operator++()
- {
- members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
- return static_cast<slist_iterator&> (*this);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE slist_iterator operator++(int)
- {
- slist_iterator result (*this);
- members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
- return result;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const slist_iterator& l, const slist_iterator& r)
- { return l.pointed_node() == r.pointed_node(); }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const slist_iterator& l, const slist_iterator& r)
- { return !(l == r); }
-
- BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
- { return *operator->(); }
-
- BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
- { return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
-
- BOOST_INTRUSIVE_FORCEINLINE slist_iterator<ValueTraits, false> unconst() const
- { return slist_iterator<ValueTraits, false>(this->pointed_node(), this->get_value_traits()); }
-
- private:
-
- BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
- { return ValueTraits::to_value_ptr(members_.nodeptr_); }
-
- BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
- { return this->get_value_traits()->to_value_ptr(members_.nodeptr_); }
-
- iiterator_members<node_ptr, const_value_traits_ptr, stateful_value_traits> members_;
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SLIST_ITERATOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/slist_node.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/slist_node.hpp
deleted file mode 100644
index 848764e571d..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/slist_node.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_SLIST_NODE_HPP
-#define BOOST_INTRUSIVE_SLIST_NODE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-
-namespace boost {
-namespace intrusive {
-
-template<class VoidPointer>
-struct slist_node
-{
- typedef typename pointer_rebind<VoidPointer, slist_node>::type node_ptr;
- node_ptr next_;
-};
-
-// slist_node_traits can be used with circular_slist_algorithms and supplies
-// a slist_node holding the pointers needed for a singly-linked list
-// it is used by slist_base_hook and slist_member_hook
-template<class VoidPointer>
-struct slist_node_traits
-{
- typedef slist_node<VoidPointer> node;
- typedef typename node::node_ptr node_ptr;
- typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
- { return n->next_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
- { return n->next_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_next(const node_ptr & n, const node_ptr & next)
- { n->next_ = next; }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SLIST_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_iterator.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_iterator.hpp
deleted file mode 100644
index f36a1f244b9..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_iterator.hpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_TREE_ITERATOR_HPP
-#define BOOST_INTRUSIVE_TREE_ITERATOR_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/detail/std_fwd.hpp>
-#include <boost/intrusive/detail/iiterator.hpp>
-#include <boost/intrusive/detail/bstree_algorithms_base.hpp>
-
-namespace boost {
-namespace intrusive {
-
-/////////////////////////////////////////////////////////////////////////////
-// //
-// Implementation of the tree iterator //
-// //
-/////////////////////////////////////////////////////////////////////////////
-
-// tree_iterator provides some basic functions for a
-// node oriented bidirectional iterator:
-template<class ValueTraits, bool IsConst>
-class tree_iterator
-{
- private:
- typedef iiterator< ValueTraits, IsConst
- , std::bidirectional_iterator_tag> types_t;
- typedef typename types_t::value_traits value_traits;
- typedef typename types_t::node_traits node_traits;
- typedef typename types_t::node node;
- typedef typename types_t::node_ptr node_ptr;
- typedef typename types_t::const_value_traits_ptr const_value_traits_ptr;
- typedef bstree_algorithms_base<node_traits> node_algorithms;
-
- static const bool stateful_value_traits = types_t::stateful_value_traits;
-
- void unspecified_bool_type_func() const {}
- typedef void (tree_iterator::*unspecified_bool_type)() const;
-
- public:
- typedef typename types_t::iterator_type::difference_type difference_type;
- typedef typename types_t::iterator_type::value_type value_type;
- typedef typename types_t::iterator_type::pointer pointer;
- typedef typename types_t::iterator_type::reference reference;
- typedef typename types_t::iterator_type::iterator_category iterator_category;
-
- BOOST_INTRUSIVE_FORCEINLINE tree_iterator()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit tree_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
- : members_(nodeptr, traits_ptr)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE tree_iterator(tree_iterator<value_traits, false> const& other)
- : members_(other.pointed_node(), other.get_value_traits())
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE const node_ptr &pointed_node() const
- { return members_.nodeptr_; }
-
- BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const node_ptr &nodeptr)
- { members_.nodeptr_ = nodeptr; return static_cast<tree_iterator&>(*this); }
-
- public:
- tree_iterator& operator++()
- {
- members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_);
- return static_cast<tree_iterator&> (*this);
- }
-
- tree_iterator operator++(int)
- {
- tree_iterator result (*this);
- members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_);
- return result;
- }
-
- tree_iterator& operator--()
- {
- members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_);
- return static_cast<tree_iterator&> (*this);
- }
-
- tree_iterator operator--(int)
- {
- tree_iterator result (*this);
- members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_);
- return result;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_left()
- {
- members_.nodeptr_ = node_traits::get_left(members_.nodeptr_);
- return static_cast<tree_iterator&> (*this);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_right()
- {
- members_.nodeptr_ = node_traits::get_right(members_.nodeptr_);
- return static_cast<tree_iterator&> (*this);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_parent()
- {
- members_.nodeptr_ = node_traits::get_parent(members_.nodeptr_);
- return static_cast<tree_iterator&> (*this);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE operator unspecified_bool_type() const
- { return members_.nodeptr_ ? &tree_iterator::unspecified_bool_type_func : 0; }
-
- BOOST_INTRUSIVE_FORCEINLINE bool operator! () const
- { return !members_.nodeptr_; }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const tree_iterator& l, const tree_iterator& r)
- { return l.pointed_node() == r.pointed_node(); }
-
- BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const tree_iterator& l, const tree_iterator& r)
- { return !(l == r); }
-
- BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
- { return *operator->(); }
-
- BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
- { return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
- { return members_.get_ptr(); }
-
- tree_iterator end_iterator_from_it() const
- {
- return tree_iterator(node_algorithms::get_header(this->pointed_node()), this->get_value_traits());
- }
-
- tree_iterator<value_traits, false> unconst() const
- { return tree_iterator<value_traits, false>(this->pointed_node(), this->get_value_traits()); }
-
- private:
- BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
- { return ValueTraits::to_value_ptr(members_.nodeptr_); }
-
- BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
- { return this->get_value_traits()->to_value_ptr(members_.nodeptr_); }
-
- iiterator_members<node_ptr, const_value_traits_ptr, stateful_value_traits> members_;
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_TREE_ITERATOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_node.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_node.hpp
deleted file mode 100644
index 606fbc865e5..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_node.hpp
+++ /dev/null
@@ -1,80 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_TREE_NODE_HPP
-#define BOOST_INTRUSIVE_TREE_NODE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/pointer_rebind.hpp>
-
-namespace boost {
-namespace intrusive {
-
-template<class VoidPointer>
-struct tree_node
-{
- typedef typename pointer_rebind<VoidPointer, tree_node>::type node_ptr;
-
- node_ptr parent_, left_, right_;
-};
-
-template<class VoidPointer>
-struct tree_node_traits
-{
- typedef tree_node<VoidPointer> node;
-
- typedef typename node::node_ptr node_ptr;
- typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
- { return n->parent_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
- { return n->parent_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_parent(const node_ptr & n, const node_ptr & p)
- { n->parent_ = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
- { return n->left_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_left(const node_ptr & n, const node_ptr & l)
- { n->left_ = l; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
- { return n->right_; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void set_right(const node_ptr & n, const node_ptr & r)
- { n->right_ = r; }
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_TREE_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_value_compare.hpp b/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_value_compare.hpp
deleted file mode 100644
index f6dd01dc256..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/tree_value_compare.hpp
+++ /dev/null
@@ -1,167 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_INTRUSIVE_DETAIL_TREE_VALUE_COMPARE_HPP
-#define BOOST_INTRUSIVE_DETAIL_TREE_VALUE_COMPARE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/intrusive/detail/workaround.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-
-namespace boost{
-namespace intrusive{
-
-//Needed to support smart references to value types
-template <class From, class ValuePtr>
-struct disable_if_smartref_to
- : detail::disable_if_c
- < detail::is_same
- <From, typename pointer_traits
- <ValuePtr>
- ::reference>::value
- || detail::is_same
- <From, typename pointer_traits
- < typename pointer_rebind
- < ValuePtr
- , const typename boost::movelib::pointer_element<ValuePtr>::type>::type>
- ::reference>::value
- >
-{};
-
-//This function object takes a KeyCompare function object
-//and compares values that contains keys using KeyOfValue
-template< class ValuePtr, class KeyCompare, class KeyOfValue
- , bool = boost::intrusive::detail::is_same
- <typename boost::movelib::pointer_element<ValuePtr>::type, typename KeyOfValue::type>::value >
-struct tree_value_compare
- : public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
-{
- typedef typename
- boost::movelib::pointer_element<ValuePtr>::type value_type;
- typedef KeyCompare key_compare;
- typedef KeyOfValue key_of_value;
- typedef typename KeyOfValue::type key_type;
-
- typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
-
- BOOST_INTRUSIVE_FORCEINLINE tree_value_compare()
- : base_t()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit tree_value_compare(const key_compare &kcomp)
- : base_t(kcomp)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE tree_value_compare (const tree_value_compare &x)
- : base_t(x.base_t::get())
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const tree_value_compare &x)
- { this->base_t::get() = x.base_t::get(); return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const key_compare &x)
- { this->base_t::get() = x; return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE const key_compare &key_comp() const
- { return static_cast<const key_compare &>(*this); }
-
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
- { return this->key_comp()(key1, key2); }
-
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const value_type &value1, const value_type &value2) const
- { return this->key_comp()(KeyOfValue()(value1), KeyOfValue()(value2)); }
-
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const value_type &value2) const
- { return this->key_comp()(key1, KeyOfValue()(value2)); }
-
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const value_type &value1, const key_type &key2) const
- { return this->key_comp()(KeyOfValue()(value1), key2); }
-
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()( const key_type &key1, const U &nonkey2
- , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
- { return this->key_comp()(key1, nonkey2); }
-
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()( const U &nonkey1, const key_type &key2
- , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
- { return this->key_comp()(nonkey1, key2); }
-
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()( const value_type &value1, const U &nonvalue2
- , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
- { return this->key_comp()(KeyOfValue()(value1), nonvalue2); }
-
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()( const U &nonvalue1, const value_type &value2
- , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
- { return this->key_comp()(nonvalue1, KeyOfValue()(value2)); }
-};
-
-template<class ValuePtr, class KeyCompare, class KeyOfValue>
-struct tree_value_compare<ValuePtr, KeyCompare, KeyOfValue, true>
- : public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
-{
- typedef typename
- boost::movelib::pointer_element<ValuePtr>::type value_type;
- typedef KeyCompare key_compare;
- typedef KeyOfValue key_of_value;
- typedef typename KeyOfValue::type key_type;
-
- typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
-
-
- BOOST_INTRUSIVE_FORCEINLINE tree_value_compare()
- : base_t()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE explicit tree_value_compare(const key_compare &kcomp)
- : base_t(kcomp)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE tree_value_compare (const tree_value_compare &x)
- : base_t(x.base_t::get())
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const tree_value_compare &x)
- { this->base_t::get() = x.base_t::get(); return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const key_compare &x)
- { this->base_t::get() = x; return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE const key_compare &key_comp() const
- { return static_cast<const key_compare &>(*this); }
-
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
- { return this->key_comp()(key1, key2); }
-
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()( const key_type &key1, const U &nonkey2
- , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
- { return this->key_comp()(key1, nonkey2); }
-
- template<class U>
- BOOST_INTRUSIVE_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2
- , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
- { return this->key_comp()(nonkey1, key2); }
-};
-
-} //namespace intrusive{
-} //namespace boost{
-
-#endif //#ifdef BOOST_INTRUSIVE_DETAIL_TREE_VALUE_COMPARE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/hashtable.hpp b/src/third_party/boost-1.68.0/boost/intrusive/hashtable.hpp
deleted file mode 100644
index 258e6012561..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/hashtable.hpp
+++ /dev/null
@@ -1,3668 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2015
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_INTRUSIVE_HASHTABLE_HPP
-#define BOOST_INTRUSIVE_HASHTABLE_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-//General intrusive utilities
-#include <boost/intrusive/detail/hashtable_node.hpp>
-#include <boost/intrusive/detail/transform_iterator.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
-#include <boost/intrusive/detail/node_to_value.hpp>
-#include <boost/intrusive/detail/exception_disposer.hpp>
-#include <boost/intrusive/detail/node_cloner_disposer.hpp>
-#include <boost/intrusive/detail/simple_disposers.hpp>
-#include <boost/intrusive/detail/size_holder.hpp>
-#include <boost/intrusive/detail/iterator.hpp>
-
-//Implementation utilities
-#include <boost/intrusive/unordered_set_hook.hpp>
-#include <boost/intrusive/slist.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-
-//boost
-#include <boost/functional/hash.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/move/adl_move_swap.hpp>
-
-//std C++
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp> //std::equal_to
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-#include <algorithm> //std::lower_bound, std::upper_bound
-#include <cstddef> //std::size_t
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-template<class InputIt, class T>
-InputIt priv_algo_find(InputIt first, InputIt last, const T& value)
-{
- for (; first != last; ++first) {
- if (*first == value) {
- return first;
- }
- }
- return last;
-}
-
-template<class InputIt, class T>
-typename boost::intrusive::iterator_traits<InputIt>::difference_type
- priv_algo_count(InputIt first, InputIt last, const T& value)
-{
- typename boost::intrusive::iterator_traits<InputIt>::difference_type ret = 0;
- for (; first != last; ++first) {
- if (*first == value) {
- ret++;
- }
- }
- return ret;
-}
-
-template <class ForwardIterator1, class ForwardIterator2>
-bool priv_algo_is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2)
-{
- typedef typename
- boost::intrusive::iterator_traits<ForwardIterator2>::difference_type
- distance_type;
- //Efficiently compare identical prefixes: O(N) if sequences
- //have the same elements in the same order.
- for ( ; first1 != last1; ++first1, ++first2){
- if (! (*first1 == *first2))
- break;
- }
- if (first1 == last1){
- return true;
- }
-
- //Establish last2 assuming equal ranges by iterating over the
- //rest of the list.
- ForwardIterator2 last2 = first2;
- boost::intrusive::iterator_advance(last2, boost::intrusive::iterator_distance(first1, last1));
- for(ForwardIterator1 scan = first1; scan != last1; ++scan){
- if (scan != (priv_algo_find)(first1, scan, *scan)){
- continue; //We've seen this one before.
- }
- distance_type matches = (priv_algo_count)(first2, last2, *scan);
- if (0 == matches || (priv_algo_count)(scan, last1, *scan != matches)){
- return false;
- }
- }
- return true;
-}
-
-template<int Dummy = 0>
-struct prime_list_holder
-{
- private:
-
- template <class SizeType> // sizeof(SizeType) < sizeof(std::size_t)
- static BOOST_INTRUSIVE_FORCEINLINE SizeType truncate_size_type(std::size_t n, detail::true_)
- {
- return n < std::size_t(SizeType(-1)) ? static_cast<SizeType>(n) : SizeType(-1);
- }
-
- template <class SizeType> // sizeof(SizeType) == sizeof(std::size_t)
- static BOOST_INTRUSIVE_FORCEINLINE SizeType truncate_size_type(std::size_t n, detail::false_)
- {
- return static_cast<SizeType>(n);
- }
-
- template <class SizeType> //sizeof(SizeType) > sizeof(std::size_t)
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count_dispatch(SizeType n, detail::true_)
- {
- std::size_t const c = n > std::size_t(-1)
- ? std::size_t(-1)
- : suggested_upper_bucket_count_impl(static_cast<std::size_t>(n));
- return static_cast<SizeType>(c);
- }
-
- template <class SizeType> //sizeof(SizeType) > sizeof(std::size_t)
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count_dispatch(SizeType n, detail::true_)
- {
- std::size_t const c = n > std::size_t(-1)
- ? std::size_t(-1)
- : suggested_lower_bucket_count_impl(static_cast<std::size_t>(n));
- return static_cast<SizeType>(c);
- }
-
- template <class SizeType>
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count_dispatch(SizeType n, detail::false_)
- {
- std::size_t const c = suggested_upper_bucket_count_impl(static_cast<std::size_t>(n));
- return truncate_size_type<SizeType>(c, detail::bool_<(sizeof(SizeType) < sizeof(std::size_t))>());
-
- }
-
- template <class SizeType>
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count_dispatch(SizeType n, detail::false_)
- {
- std::size_t const c = suggested_lower_bucket_count_impl(static_cast<std::size_t>(n));
- return truncate_size_type<SizeType>(c, detail::bool_<(sizeof(SizeType) < sizeof(std::size_t))>());
- }
-
- static const std::size_t prime_list[];
- static const std::size_t prime_list_size;
-
- static std::size_t suggested_lower_bucket_count_impl(std::size_t n)
- {
- const std::size_t *primes = &prime_list_holder<0>::prime_list[0];
- const std::size_t *primes_end = primes + prime_list_holder<0>::prime_list_size;
- std::size_t const* bound = std::lower_bound(primes, primes_end, n);
- //Tables have upper SIZE_MAX, so we must always found an entry
- BOOST_INTRUSIVE_INVARIANT_ASSERT(bound != primes_end);
- bound -= std::size_t(bound != primes);
- return *bound;
- }
-
- static std::size_t suggested_upper_bucket_count_impl(std::size_t n)
- {
- const std::size_t *primes = &prime_list_holder<0>::prime_list[0];
- const std::size_t *primes_end = primes + prime_list_holder<0>::prime_list_size;
- std::size_t const* bound = std::upper_bound(primes, primes_end, n);
- bound -= std::size_t(bound == primes_end);
- return *bound;
- }
-
- public:
-
- template <class SizeType>
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count(SizeType n)
- {
- return (suggested_upper_bucket_count_dispatch)(n, detail::bool_<(sizeof(SizeType) > sizeof(std::size_t))>());
- }
-
- template <class SizeType>
- static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count(SizeType n)
- {
- return (suggested_lower_bucket_count_dispatch)(n, detail::bool_<(sizeof(SizeType) > sizeof(std::size_t))>());
- }
-};
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-//We only support LLP64(Win64) or LP64(most Unix) data models
-#ifdef _WIN64 //In 64 bit windows sizeof(size_t) == sizeof(unsigned long long)
- #define BOOST_INTRUSIVE_PRIME_C(NUMBER) NUMBER##ULL
- #define BOOST_INTRUSIVE_64_BIT_SIZE_T 1
-#else //In 32 bit windows and 32/64 bit unixes sizeof(size_t) == sizeof(unsigned long)
- #define BOOST_INTRUSIVE_PRIME_C(NUMBER) NUMBER##UL
- #define BOOST_INTRUSIVE_64_BIT_SIZE_T (((((ULONG_MAX>>16)>>16)>>16)>>15) != 0)
-#endif
-
-template<int Dummy>
-const std::size_t prime_list_holder<Dummy>::prime_list[] = {
- BOOST_INTRUSIVE_PRIME_C(3), BOOST_INTRUSIVE_PRIME_C(7),
- BOOST_INTRUSIVE_PRIME_C(11), BOOST_INTRUSIVE_PRIME_C(17),
- BOOST_INTRUSIVE_PRIME_C(29), BOOST_INTRUSIVE_PRIME_C(53),
- BOOST_INTRUSIVE_PRIME_C(97), BOOST_INTRUSIVE_PRIME_C(193),
- BOOST_INTRUSIVE_PRIME_C(389), BOOST_INTRUSIVE_PRIME_C(769),
- BOOST_INTRUSIVE_PRIME_C(1543), BOOST_INTRUSIVE_PRIME_C(3079),
- BOOST_INTRUSIVE_PRIME_C(6151), BOOST_INTRUSIVE_PRIME_C(12289),
- BOOST_INTRUSIVE_PRIME_C(24593), BOOST_INTRUSIVE_PRIME_C(49157),
- BOOST_INTRUSIVE_PRIME_C(98317), BOOST_INTRUSIVE_PRIME_C(196613),
- BOOST_INTRUSIVE_PRIME_C(393241), BOOST_INTRUSIVE_PRIME_C(786433),
- BOOST_INTRUSIVE_PRIME_C(1572869), BOOST_INTRUSIVE_PRIME_C(3145739),
- BOOST_INTRUSIVE_PRIME_C(6291469), BOOST_INTRUSIVE_PRIME_C(12582917),
- BOOST_INTRUSIVE_PRIME_C(25165843), BOOST_INTRUSIVE_PRIME_C(50331653),
- BOOST_INTRUSIVE_PRIME_C(100663319), BOOST_INTRUSIVE_PRIME_C(201326611),
- BOOST_INTRUSIVE_PRIME_C(402653189), BOOST_INTRUSIVE_PRIME_C(805306457),
- BOOST_INTRUSIVE_PRIME_C(1610612741), BOOST_INTRUSIVE_PRIME_C(3221225473),
-#if BOOST_INTRUSIVE_64_BIT_SIZE_T
- //Taken from Boost.MultiIndex code, thanks to Joaquin M Lopez Munoz.
- BOOST_INTRUSIVE_PRIME_C(6442450939), BOOST_INTRUSIVE_PRIME_C(12884901893),
- BOOST_INTRUSIVE_PRIME_C(25769803751), BOOST_INTRUSIVE_PRIME_C(51539607551),
- BOOST_INTRUSIVE_PRIME_C(103079215111), BOOST_INTRUSIVE_PRIME_C(206158430209),
- BOOST_INTRUSIVE_PRIME_C(412316860441), BOOST_INTRUSIVE_PRIME_C(824633720831),
- BOOST_INTRUSIVE_PRIME_C(1649267441651), BOOST_INTRUSIVE_PRIME_C(3298534883309),
- BOOST_INTRUSIVE_PRIME_C(6597069766657), BOOST_INTRUSIVE_PRIME_C(13194139533299),
- BOOST_INTRUSIVE_PRIME_C(26388279066623), BOOST_INTRUSIVE_PRIME_C(52776558133303),
- BOOST_INTRUSIVE_PRIME_C(105553116266489), BOOST_INTRUSIVE_PRIME_C(211106232532969),
- BOOST_INTRUSIVE_PRIME_C(422212465066001), BOOST_INTRUSIVE_PRIME_C(844424930131963),
- BOOST_INTRUSIVE_PRIME_C(1688849860263953), BOOST_INTRUSIVE_PRIME_C(3377699720527861),
- BOOST_INTRUSIVE_PRIME_C(6755399441055731), BOOST_INTRUSIVE_PRIME_C(13510798882111483),
- BOOST_INTRUSIVE_PRIME_C(27021597764222939), BOOST_INTRUSIVE_PRIME_C(54043195528445957),
- BOOST_INTRUSIVE_PRIME_C(108086391056891903), BOOST_INTRUSIVE_PRIME_C(216172782113783843),
- BOOST_INTRUSIVE_PRIME_C(432345564227567621), BOOST_INTRUSIVE_PRIME_C(864691128455135207),
- BOOST_INTRUSIVE_PRIME_C(1729382256910270481), BOOST_INTRUSIVE_PRIME_C(3458764513820540933),
- BOOST_INTRUSIVE_PRIME_C(6917529027641081903), BOOST_INTRUSIVE_PRIME_C(13835058055282163729),
- BOOST_INTRUSIVE_PRIME_C(18446744073709551557), BOOST_INTRUSIVE_PRIME_C(18446744073709551615) //Upper limit, just in case
-#else
- BOOST_INTRUSIVE_PRIME_C(4294967291), BOOST_INTRUSIVE_PRIME_C(4294967295) //Upper limit, just in case
-#endif
- };
-
-#undef BOOST_INTRUSIVE_PRIME_C
-#undef BOOST_INTRUSIVE_64_BIT_SIZE_T
-
-#endif //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-template<int Dummy>
-const std::size_t prime_list_holder<Dummy>::prime_list_size
- = sizeof(prime_list)/sizeof(std::size_t);
-
-struct hash_bool_flags
-{
- static const std::size_t unique_keys_pos = 1u;
- static const std::size_t constant_time_size_pos = 2u;
- static const std::size_t power_2_buckets_pos = 4u;
- static const std::size_t cache_begin_pos = 8u;
- static const std::size_t compare_hash_pos = 16u;
- static const std::size_t incremental_pos = 32u;
-};
-
-namespace detail {
-
-template<class SupposedValueTraits>
-struct get_slist_impl_from_supposed_value_traits
-{
- typedef SupposedValueTraits value_traits;
- typedef typename detail::get_node_traits
- <value_traits>::type node_traits;
- typedef typename get_slist_impl
- <typename reduced_slist_node_traits
- <node_traits>::type
- >::type type;
-};
-
-template<class SupposedValueTraits>
-struct unordered_bucket_impl
-{
- typedef typename
- get_slist_impl_from_supposed_value_traits
- <SupposedValueTraits>::type slist_impl;
- typedef detail::bucket_impl<slist_impl> implementation_defined;
- typedef implementation_defined type;
-};
-
-template<class SupposedValueTraits>
-struct unordered_bucket_ptr_impl
-{
- typedef typename detail::get_node_traits
- <SupposedValueTraits>::type::node_ptr node_ptr;
- typedef typename unordered_bucket_impl
- <SupposedValueTraits>::type bucket_type;
-
- typedef typename pointer_traits
- <node_ptr>::template rebind_pointer
- < bucket_type >::type implementation_defined;
- typedef implementation_defined type;
-};
-
-template <class T>
-struct store_hash_is_true
-{
- template<bool Add>
- struct two_or_three {yes_type _[2 + Add];};
- template <class U> static yes_type test(...);
- template <class U> static two_or_three<U::store_hash> test (int);
- static const bool value = sizeof(test<T>(0)) > sizeof(yes_type)*2;
-};
-
-template <class T>
-struct optimize_multikey_is_true
-{
- template<bool Add>
- struct two_or_three {yes_type _[2 + Add];};
- template <class U> static yes_type test(...);
- template <class U> static two_or_three<U::optimize_multikey> test (int);
- static const bool value = sizeof(test<T>(0)) > sizeof(yes_type)*2;
-};
-
-struct insert_commit_data_impl
-{
- std::size_t hash;
-};
-
-template<class Node, class SlistNodePtr>
-BOOST_INTRUSIVE_FORCEINLINE typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type
- dcast_bucket_ptr(const SlistNodePtr &p)
-{
- typedef typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type node_ptr;
- return pointer_traits<node_ptr>::pointer_to(static_cast<Node&>(*p));
-}
-
-template<class NodeTraits>
-struct group_functions
-{
- // A group is reverse-linked
- //
- // A is "first in group"
- // C is "last in group"
- // __________________
- // | _____ _____ |
- // | | | | | | <- Group links
- // ^ V ^ V ^ V
- // _ _ _ _
- // A|_| B|_| C|_| D|_|
- //
- // ^ | ^ | ^ | ^ V <- Bucket links
- // _ _____| |_____| |______| |____| |
- // |B| |
- // ^________________________________|
- //
-
- typedef NodeTraits node_traits;
- typedef unordered_group_adapter<node_traits> group_traits;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::node node;
- typedef typename reduced_slist_node_traits
- <node_traits>::type reduced_node_traits;
- typedef typename reduced_node_traits::node_ptr slist_node_ptr;
- typedef typename reduced_node_traits::node slist_node;
- typedef circular_slist_algorithms<group_traits> group_algorithms;
- typedef circular_slist_algorithms<node_traits> node_algorithms;
-
- static slist_node_ptr get_bucket_before_begin
- (const slist_node_ptr &bucket_beg, const slist_node_ptr &bucket_end, const node_ptr &p)
- {
- //First find the last node of p's group.
- //This requires checking the first node of the next group or
- //the bucket node.
- node_ptr prev_node = p;
- node_ptr nxt(node_traits::get_next(p));
- while(!(bucket_beg <= nxt && nxt <= bucket_end) &&
- (group_traits::get_next(nxt) == prev_node)){
- prev_node = nxt;
- nxt = node_traits::get_next(nxt);
- }
-
- //If we've reached the bucket node just return it.
- if(bucket_beg <= nxt && nxt <= bucket_end){
- return nxt;
- }
-
- //Otherwise, iterate using group links until the bucket node
- node_ptr first_node_of_group = nxt;
- node_ptr last_node_group = group_traits::get_next(first_node_of_group);
- slist_node_ptr possible_end = node_traits::get_next(last_node_group);
-
- while(!(bucket_beg <= possible_end && possible_end <= bucket_end)){
- first_node_of_group = detail::dcast_bucket_ptr<node>(possible_end);
- last_node_group = group_traits::get_next(first_node_of_group);
- possible_end = node_traits::get_next(last_node_group);
- }
- return possible_end;
- }
-
- static node_ptr get_prev_to_first_in_group(const slist_node_ptr &bucket_node, const node_ptr &first_in_group)
- {
- node_ptr nb = detail::dcast_bucket_ptr<node>(bucket_node);
- node_ptr n;
- while((n = node_traits::get_next(nb)) != first_in_group){
- nb = group_traits::get_next(n); //go to last in group
- }
- return nb;
- }
-
- static void erase_from_group(const slist_node_ptr &end_ptr, const node_ptr &to_erase_ptr, detail::true_)
- {
- node_ptr const nxt_ptr(node_traits::get_next(to_erase_ptr));
- //Check if the next node is in the group (not end node) and reverse linked to
- //'to_erase_ptr'. Erase if that's the case.
- if(nxt_ptr != end_ptr && to_erase_ptr == group_traits::get_next(nxt_ptr)){
- group_algorithms::unlink_after(nxt_ptr);
- }
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static void erase_from_group(const slist_node_ptr&, const node_ptr&, detail::false_)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(const node_ptr &first_in_group, detail::true_)
- { return group_traits::get_next(first_in_group); }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(node_ptr n, detail::false_)
- { return n; }
-
- static node_ptr get_first_in_group(node_ptr n, detail::true_)
- {
- node_ptr ng;
- while(n == node_traits::get_next((ng = group_traits::get_next(n)))){
- n = ng;
- }
- return n;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr next_group_if_first_in_group(node_ptr ptr)
- {
- return node_traits::get_next(group_traits::get_next(ptr));
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_first_in_group(const node_ptr &n, detail::false_)
- { return n; }
-
- BOOST_INTRUSIVE_FORCEINLINE static void insert_in_group(const node_ptr &first_in_group, const node_ptr &n, true_)
- { group_algorithms::link_after(first_in_group, n); }
-
- static void insert_in_group(const node_ptr&, const node_ptr&, false_)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr split_group(node_ptr const new_first_in_group)
- {
- node_ptr const first((get_first_in_group)(new_first_in_group, detail::true_()));
- if(first != new_first_in_group){
- node_ptr const last = group_traits::get_next(first);
- group_traits::set_next(first, group_traits::get_next(new_first_in_group));
- group_traits::set_next(new_first_in_group, last);
- }
- return first;
- }
-};
-
-template<class BucketType, class SplitTraits>
-class incremental_rehash_rollback
-{
- private:
- typedef BucketType bucket_type;
- typedef SplitTraits split_traits;
-
- incremental_rehash_rollback();
- incremental_rehash_rollback & operator=(const incremental_rehash_rollback &);
- incremental_rehash_rollback (const incremental_rehash_rollback &);
-
- public:
- incremental_rehash_rollback
- (bucket_type &source_bucket, bucket_type &destiny_bucket, split_traits &split_traits)
- : source_bucket_(source_bucket), destiny_bucket_(destiny_bucket)
- , split_traits_(split_traits), released_(false)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void release()
- { released_ = true; }
-
- ~incremental_rehash_rollback()
- {
- if(!released_){
- //If an exception is thrown, just put all moved nodes back in the old bucket
- //and move back the split mark.
- destiny_bucket_.splice_after(destiny_bucket_.before_begin(), source_bucket_);
- split_traits_.decrement();
- }
- }
-
- private:
- bucket_type &source_bucket_;
- bucket_type &destiny_bucket_;
- split_traits &split_traits_;
- bool released_;
-};
-
-template<class NodeTraits>
-struct node_functions
-{
- BOOST_INTRUSIVE_FORCEINLINE static void store_hash(typename NodeTraits::node_ptr p, std::size_t h, true_)
- { return NodeTraits::set_hash(p, h); }
-
- BOOST_INTRUSIVE_FORCEINLINE static void store_hash(typename NodeTraits::node_ptr, std::size_t, false_)
- {}
-};
-
-BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::false_)
-{ return hash_value % bucket_cnt; }
-
-BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::true_)
-{ return hash_value & (bucket_cnt - 1); }
-
-template<bool Power2Buckets, bool Incremental>
-BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket_split(std::size_t hash_value, std::size_t bucket_cnt, std::size_t split)
-{
- std::size_t bucket_number = detail::hash_to_bucket(hash_value, bucket_cnt, detail::bool_<Power2Buckets>());
- if(Incremental)
- bucket_number -= static_cast<std::size_t>(bucket_number >= split)*(bucket_cnt/2);
- return bucket_number;
-}
-
-} //namespace detail {
-
-//!This metafunction will obtain the type of a bucket
-//!from the value_traits or hook option to be used with
-//!a hash container.
-template<class ValueTraitsOrHookOption>
-struct unordered_bucket
- : public detail::unordered_bucket_impl
- <typename ValueTraitsOrHookOption::
- template pack<empty>::proto_value_traits
- >
-{};
-
-//!This metafunction will obtain the type of a bucket pointer
-//!from the value_traits or hook option to be used with
-//!a hash container.
-template<class ValueTraitsOrHookOption>
-struct unordered_bucket_ptr
- : public detail::unordered_bucket_ptr_impl
- <typename ValueTraitsOrHookOption::
- template pack<empty>::proto_value_traits
- >
-{};
-
-//!This metafunction will obtain the type of the default bucket traits
-//!(when the user does not specify the bucket_traits<> option) from the
-//!value_traits or hook option to be used with
-//!a hash container.
-template<class ValueTraitsOrHookOption>
-struct unordered_default_bucket_traits
-{
- typedef typename ValueTraitsOrHookOption::
- template pack<empty>::proto_value_traits supposed_value_traits;
- typedef typename detail::
- get_slist_impl_from_supposed_value_traits
- <supposed_value_traits>::type slist_impl;
- typedef detail::bucket_traits_impl
- <slist_impl> implementation_defined;
- typedef implementation_defined type;
-};
-
-struct default_bucket_traits;
-
-//hashtable default hook traits
-struct default_hashtable_hook_applier
-{ template <class T> struct apply{ typedef typename T::default_hashtable_hook type; }; };
-
-template<>
-struct is_default_hook_tag<default_hashtable_hook_applier>
-{ static const bool value = true; };
-
-struct hashtable_defaults
-{
- typedef default_hashtable_hook_applier proto_value_traits;
- typedef std::size_t size_type;
- typedef void key_of_value;
- typedef void equal;
- typedef void hash;
- typedef default_bucket_traits bucket_traits;
- static const bool constant_time_size = true;
- static const bool power_2_buckets = false;
- static const bool cache_begin = false;
- static const bool compare_hash = false;
- static const bool incremental = false;
-};
-
-template<class ValueTraits, bool IsConst>
-struct downcast_node_to_value_t
- : public detail::node_to_value<ValueTraits, IsConst>
-{
- typedef detail::node_to_value<ValueTraits, IsConst> base_t;
- typedef typename base_t::result_type result_type;
- typedef ValueTraits value_traits;
- typedef typename detail::get_slist_impl
- <typename detail::reduced_slist_node_traits
- <typename value_traits::node_traits>::type
- >::type slist_impl;
- typedef typename detail::add_const_if_c
- <typename slist_impl::node, IsConst>::type & first_argument_type;
- typedef typename detail::add_const_if_c
- < typename ValueTraits::node_traits::node
- , IsConst>::type & intermediate_argument_type;
- typedef typename pointer_traits
- <typename ValueTraits::pointer>::
- template rebind_pointer
- <const ValueTraits>::type const_value_traits_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE downcast_node_to_value_t(const const_value_traits_ptr &ptr)
- : base_t(ptr)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE result_type operator()(first_argument_type arg) const
- { return this->base_t::operator()(static_cast<intermediate_argument_type>(arg)); }
-};
-
-template<class F, class SlistNodePtr, class NodePtr>
-struct node_cast_adaptor
- //Use public inheritance to avoid MSVC bugs with closures
- : public detail::ebo_functor_holder<F>
-{
- typedef detail::ebo_functor_holder<F> base_t;
-
- typedef typename pointer_traits<SlistNodePtr>::element_type slist_node;
- typedef typename pointer_traits<NodePtr>::element_type node;
-
- template<class ConvertibleToF, class RealValuTraits>
- BOOST_INTRUSIVE_FORCEINLINE node_cast_adaptor(const ConvertibleToF &c2f, const RealValuTraits *traits)
- : base_t(base_t(c2f, traits))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE typename base_t::node_ptr operator()(const slist_node &to_clone)
- { return base_t::operator()(static_cast<const node &>(to_clone)); }
-
- BOOST_INTRUSIVE_FORCEINLINE void operator()(SlistNodePtr to_clone)
- {
- base_t::operator()(pointer_traits<NodePtr>::pointer_to(static_cast<node &>(*to_clone)));
- }
-};
-
-//bucket_plus_vtraits stores ValueTraits + BucketTraits
-//this data is needed by iterators to obtain the
-//value from the iterator and detect the bucket
-template<class ValueTraits, class BucketTraits>
-struct bucket_plus_vtraits
-{
- typedef BucketTraits bucket_traits;
- typedef ValueTraits value_traits;
-
- static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
-
- typedef typename
- detail::get_slist_impl_from_supposed_value_traits
- <value_traits>::type slist_impl;
- typedef typename value_traits::node_traits node_traits;
- typedef unordered_group_adapter<node_traits> group_traits;
- typedef typename slist_impl::iterator siterator;
- typedef detail::bucket_impl<slist_impl> bucket_type;
- typedef detail::group_functions<node_traits> group_functions_t;
- typedef typename slist_impl::node_algorithms node_algorithms;
- typedef typename slist_impl::node_ptr slist_node_ptr;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::node node;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::pointer pointer;
- typedef typename value_traits::const_pointer const_pointer;
- typedef typename pointer_traits<pointer>::reference reference;
- typedef typename pointer_traits
- <const_pointer>::reference const_reference;
- typedef circular_slist_algorithms<group_traits> group_algorithms;
- typedef typename pointer_traits
- <typename value_traits::pointer>::
- template rebind_pointer
- <const value_traits>::type const_value_traits_ptr;
- typedef typename pointer_traits
- <typename value_traits::pointer>::
- template rebind_pointer
- <const bucket_plus_vtraits>::type const_bucket_value_traits_ptr;
- typedef typename detail::unordered_bucket_ptr_impl
- <value_traits>::type bucket_ptr;
-
- template<class BucketTraitsType>
- BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
- : data(val_traits, ::boost::forward<BucketTraitsType>(b_traits))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits & operator =(const bucket_plus_vtraits &x)
- { data.bucket_traits_ = x.data.bucket_traits_; return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const
- { return pointer_traits<const_value_traits_ptr>::pointer_to(this->priv_value_traits()); }
-
- //bucket_value_traits
- //
- BOOST_INTRUSIVE_FORCEINLINE const bucket_plus_vtraits &get_bucket_value_traits() const
- { return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits &get_bucket_value_traits()
- { return *this; }
-
- BOOST_INTRUSIVE_FORCEINLINE const_bucket_value_traits_ptr bucket_value_traits_ptr() const
- { return pointer_traits<const_bucket_value_traits_ptr>::pointer_to(this->get_bucket_value_traits()); }
-
- //value traits
- //
- BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const
- { return this->data; }
-
- BOOST_INTRUSIVE_FORCEINLINE value_traits &priv_value_traits()
- { return this->data; }
-
- //bucket_traits
- //
- BOOST_INTRUSIVE_FORCEINLINE const bucket_traits &priv_bucket_traits() const
- { return this->data.bucket_traits_; }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_traits &priv_bucket_traits()
- { return this->data.bucket_traits_; }
-
- //bucket operations
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_bucket_pointer() const
- { return this->priv_bucket_traits().bucket_begin(); }
-
- std::size_t priv_bucket_count() const
- { return this->priv_bucket_traits().bucket_count(); }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_invalid_bucket() const
- {
- const bucket_traits &rbt = this->priv_bucket_traits();
- return rbt.bucket_begin() + rbt.bucket_count();
- }
-
- BOOST_INTRUSIVE_FORCEINLINE siterator priv_invalid_local_it() const
- { return this->priv_bucket_traits().bucket_begin()->before_begin(); }
-
- template<class NodeDisposer>
- static std::size_t priv_erase_from_single_bucket(bucket_type &b, siterator sbefore_first, siterator slast, NodeDisposer node_disposer, detail::true_) //optimize multikey
- {
- std::size_t n = 0;
- siterator const sfirst(++siterator(sbefore_first));
- if(sfirst != slast){
- node_ptr const nf = detail::dcast_bucket_ptr<node>(sfirst.pointed_node());
- node_ptr const nl = detail::dcast_bucket_ptr<node>(slast.pointed_node());
- node_ptr const ne = detail::dcast_bucket_ptr<node>(b.end().pointed_node());
-
- if(group_functions_t::next_group_if_first_in_group(nf) != nf) {
- // The node is at the beginning of a group.
- if(nl != ne){
- group_functions_t::split_group(nl);
- }
- }
- else {
- node_ptr const group1 = group_functions_t::split_group(nf);
- if(nl != ne) {
- node_ptr const group2 = group_functions_t::split_group(ne);
- if(nf == group2) { //Both first and last in the same group
- //so join group1 and group2
- node_ptr const end1 = group_traits::get_next(group1);
- node_ptr const end2 = group_traits::get_next(group2);
- group_traits::set_next(group1, end2);
- group_traits::set_next(group2, end1);
- }
- }
- }
-
- siterator it(++siterator(sbefore_first));
- while(it != slast){
- node_disposer((it++).pointed_node());
- ++n;
- }
- b.erase_after(sbefore_first, slast);
- }
- return n;
- }
-
- template<class NodeDisposer>
- static std::size_t priv_erase_from_single_bucket(bucket_type &b, siterator sbefore_first, siterator slast, NodeDisposer node_disposer, detail::false_) //optimize multikey
- {
- std::size_t n = 0;
- siterator it(++siterator(sbefore_first));
- while(it != slast){
- node_disposer((it++).pointed_node());
- ++n;
- }
- b.erase_after(sbefore_first, slast);
- return n;
- }
-
- template<class NodeDisposer>
- static void priv_erase_node(bucket_type &b, siterator i, NodeDisposer node_disposer, detail::true_) //optimize multikey
- {
- node_ptr const ne(detail::dcast_bucket_ptr<node>(b.end().pointed_node()));
- node_ptr n(detail::dcast_bucket_ptr<node>(i.pointed_node()));
- node_ptr pos = node_traits::get_next(group_traits::get_next(n));
- node_ptr bn;
- node_ptr nn(node_traits::get_next(n));
-
- if(pos != n) {
- //Node is the first of the group
- bn = group_functions_t::get_prev_to_first_in_group(ne, n);
-
- //Unlink the rest of the group if it's not the last node of its group
- if(nn != ne && group_traits::get_next(nn) == n){
- group_algorithms::unlink_after(nn);
- }
- }
- else if(nn != ne && group_traits::get_next(nn) == n){
- //Node is not the end of the group
- bn = group_traits::get_next(n);
- group_algorithms::unlink_after(nn);
- }
- else{
- //Node is the end of the group
- bn = group_traits::get_next(n);
- node_ptr const x(group_algorithms::get_previous_node(n));
- group_algorithms::unlink_after(x);
- }
- b.erase_after_and_dispose(bucket_type::s_iterator_to(*bn), node_disposer);
- }
-
- template<class NodeDisposer>
- BOOST_INTRUSIVE_FORCEINLINE static void priv_erase_node(bucket_type &b, siterator i, NodeDisposer node_disposer, detail::false_) //optimize multikey
- { b.erase_after_and_dispose(b.previous(i), node_disposer); }
-
- template<class NodeDisposer, bool OptimizeMultikey>
- std::size_t priv_erase_node_range( siterator const &before_first_it, std::size_t const first_bucket
- , siterator const &last_it, std::size_t const last_bucket
- , NodeDisposer node_disposer, detail::bool_<OptimizeMultikey> optimize_multikey_tag)
- {
- std::size_t num_erased(0);
- siterator last_step_before_it;
- if(first_bucket != last_bucket){
- bucket_type *b = (&this->priv_bucket_pointer()[0]);
- num_erased += this->priv_erase_from_single_bucket
- (b[first_bucket], before_first_it, b[first_bucket].end(), node_disposer, optimize_multikey_tag);
- for(std::size_t i = 0, n = (last_bucket - first_bucket - 1); i != n; ++i){
- num_erased += this->priv_erase_whole_bucket(b[first_bucket+i+1], node_disposer);
- }
- last_step_before_it = b[last_bucket].before_begin();
- }
- else{
- last_step_before_it = before_first_it;
- }
- num_erased += this->priv_erase_from_single_bucket
- (this->priv_bucket_pointer()[last_bucket], last_step_before_it, last_it, node_disposer, optimize_multikey_tag);
- return num_erased;
- }
-
- static siterator priv_get_last(bucket_type &b, detail::true_) //optimize multikey
- {
- //First find the last node of p's group.
- //This requires checking the first node of the next group or
- //the bucket node.
- slist_node_ptr end_ptr(b.end().pointed_node());
- node_ptr possible_end(node_traits::get_next( detail::dcast_bucket_ptr<node>(end_ptr)));
- node_ptr last_node_group(possible_end);
-
- while(end_ptr != possible_end){
- last_node_group = group_traits::get_next(detail::dcast_bucket_ptr<node>(possible_end));
- possible_end = node_traits::get_next(last_node_group);
- }
- return bucket_type::s_iterator_to(*last_node_group);
- }
-
- template<class NodeDisposer>
- std::size_t priv_erase_whole_bucket(bucket_type &b, NodeDisposer node_disposer)
- {
- std::size_t num_erased = 0;
- siterator b_begin(b.before_begin());
- siterator nxt(b_begin);
- ++nxt;
- siterator const end_sit(b.end());
- while(nxt != end_sit){
- //No need to init group links as we'll delete all bucket nodes
- nxt = bucket_type::s_erase_after_and_dispose(b_begin, node_disposer);
- ++num_erased;
- }
- return num_erased;
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static siterator priv_get_last(bucket_type &b, detail::false_) //NOT optimize multikey
- { return b.previous(b.end()); }
-
- static siterator priv_get_previous(bucket_type &b, siterator i, detail::true_) //optimize multikey
- {
- node_ptr const elem(detail::dcast_bucket_ptr<node>(i.pointed_node()));
- node_ptr const prev_in_group(group_traits::get_next(elem));
- bool const first_in_group = node_traits::get_next(prev_in_group) != elem;
- typename bucket_type::node &n = first_in_group
- ? *group_functions_t::get_prev_to_first_in_group(b.end().pointed_node(), elem)
- : *group_traits::get_next(elem)
- ;
- return bucket_type::s_iterator_to(n);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static siterator priv_get_previous(bucket_type &b, siterator i, detail::false_) //NOT optimize multikey
- { return b.previous(i); }
-
- std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::true_) //optimize multikey
- {
- const bucket_ptr f(this->priv_bucket_pointer()), l(f + this->priv_bucket_count() - 1);
- slist_node_ptr bb = group_functions_t::get_bucket_before_begin
- ( f->end().pointed_node()
- , l->end().pointed_node()
- , detail::dcast_bucket_ptr<node>(it.pointed_node()));
- //Now get the bucket_impl from the iterator
- const bucket_type &b = static_cast<const bucket_type&>
- (bucket_type::slist_type::container_from_end_iterator(bucket_type::s_iterator_to(*bb)));
- //Now just calculate the index b has in the bucket array
- return static_cast<std::size_t>(&b - &*f);
- }
-
- std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::false_) //NO optimize multikey
- {
- bucket_ptr f(this->priv_bucket_pointer()), l(f + this->priv_bucket_count() - 1);
- slist_node_ptr first_ptr(f->cend().pointed_node())
- , last_ptr(l->cend().pointed_node());
-
- //The end node is embedded in the singly linked list:
- //iterate until we reach it.
- while(!(first_ptr <= it.pointed_node() && it.pointed_node() <= last_ptr)){
- ++it;
- }
- //Now get the bucket_impl from the iterator
- const bucket_type &b = static_cast<const bucket_type&>
- (bucket_type::container_from_end_iterator(it));
-
- //Now just calculate the index b has in the bucket array
- return static_cast<std::size_t>(&b - &*f);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE static std::size_t priv_stored_hash(slist_node_ptr n, detail::true_) //store_hash
- { return node_traits::get_hash(detail::dcast_bucket_ptr<node>(n)); }
-
- BOOST_INTRUSIVE_FORCEINLINE static std::size_t priv_stored_hash(slist_node_ptr, detail::false_) //NO store_hash
- { return std::size_t(-1); }
-
- BOOST_INTRUSIVE_FORCEINLINE node &priv_value_to_node(reference v)
- { return *this->priv_value_traits().to_node_ptr(v); }
-
- BOOST_INTRUSIVE_FORCEINLINE const node &priv_value_to_node(const_reference v) const
- { return *this->priv_value_traits().to_node_ptr(v); }
-
- BOOST_INTRUSIVE_FORCEINLINE reference priv_value_from_slist_node(slist_node_ptr n)
- { return *this->priv_value_traits().to_value_ptr(detail::dcast_bucket_ptr<node>(n)); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_reference priv_value_from_slist_node(slist_node_ptr n) const
- { return *this->priv_value_traits().to_value_ptr(detail::dcast_bucket_ptr<node>(n)); }
-
- void priv_clear_buckets(const bucket_ptr buckets_ptr, const std::size_t bucket_cnt)
- {
- bucket_ptr buckets_it = buckets_ptr;
- for(std::size_t bucket_i = 0; bucket_i != bucket_cnt; ++buckets_it, ++bucket_i){
- if(safemode_or_autounlink){
- buckets_it->clear_and_dispose(detail::init_disposer<node_algorithms>());
- }
- else{
- buckets_it->clear();
- }
- }
- }
-
- BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_stored_or_compute_hash(const value_type &v, detail::true_) const //For store_hash == true
- { return node_traits::get_hash(this->priv_value_traits().to_node_ptr(v)); }
-
- typedef hashtable_iterator<bucket_plus_vtraits, false> iterator;
- typedef hashtable_iterator<bucket_plus_vtraits, true> const_iterator;
-
- BOOST_INTRUSIVE_FORCEINLINE iterator end()
- { return iterator(this->priv_invalid_local_it(), 0); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const
- { return this->cend(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const
- { return const_iterator(this->priv_invalid_local_it(), 0); }
-
- //Public functions:
- struct data_type : public ValueTraits
- {
- template<class BucketTraitsType>
- BOOST_INTRUSIVE_FORCEINLINE data_type(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
- : ValueTraits(val_traits), bucket_traits_(::boost::forward<BucketTraitsType>(b_traits))
- {}
-
- bucket_traits bucket_traits_;
- } data;
-};
-
-template<class Hash, class>
-struct get_hash
-{
- typedef Hash type;
-};
-
-template<class T>
-struct get_hash<void, T>
-{
- typedef ::boost::hash<T> type;
-};
-
-template<class EqualTo, class>
-struct get_equal_to
-{
- typedef EqualTo type;
-};
-
-template<class T>
-struct get_equal_to<void, T>
-{
- typedef std::equal_to<T> type;
-};
-
-template<class KeyOfValue, class T>
-struct get_hash_key_of_value
-{
- typedef KeyOfValue type;
-};
-
-template<class T>
-struct get_hash_key_of_value<void, T>
-{
- typedef ::boost::intrusive::detail::identity<T> type;
-};
-
-template<class T, class VoidOrKeyOfValue>
-struct hash_key_types_base
-{
- typedef typename get_hash_key_of_value
- < VoidOrKeyOfValue, T>::type key_of_value;
- typedef typename key_of_value::type key_type;
-};
-
-template<class T, class VoidOrKeyOfValue, class VoidOrKeyHash>
-struct hash_key_hash
- : get_hash
- < VoidOrKeyHash
- , typename hash_key_types_base<T, VoidOrKeyOfValue>::key_type
- >
-{};
-
-template<class T, class VoidOrKeyOfValue, class VoidOrKeyEqual>
-struct hash_key_equal
- : get_equal_to
- < VoidOrKeyEqual
- , typename hash_key_types_base<T, VoidOrKeyOfValue>::key_type
- >
-
-{};
-
-//bucket_hash_t
-//Stores bucket_plus_vtraits plust the hash function
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class BucketTraits>
-struct bucket_hash_t
- //Use public inheritance to avoid MSVC bugs with closures
- : public detail::ebo_functor_holder
- <typename hash_key_hash < typename bucket_plus_vtraits<ValueTraits,BucketTraits>::value_traits::value_type
- , VoidOrKeyOfValue
- , VoidOrKeyHash
- >::type
- >
- , bucket_plus_vtraits<ValueTraits, BucketTraits> //4
-{
- typedef typename bucket_plus_vtraits<ValueTraits,BucketTraits>::value_traits value_traits;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::node_traits node_traits;
- typedef hash_key_hash
- < value_type, VoidOrKeyOfValue, VoidOrKeyHash> hash_key_hash_t;
- typedef typename hash_key_hash_t::type hasher;
- typedef typename hash_key_types_base<value_type, VoidOrKeyOfValue>::key_of_value key_of_value;
-
- typedef BucketTraits bucket_traits;
- typedef bucket_plus_vtraits<ValueTraits, BucketTraits> bucket_plus_vtraits_t;
- typedef detail::ebo_functor_holder<hasher> base_t;
-
- template<class BucketTraitsType>
- BOOST_INTRUSIVE_FORCEINLINE bucket_hash_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h)
- : detail::ebo_functor_holder<hasher>(h), bucket_plus_vtraits_t(val_traits, ::boost::forward<BucketTraitsType>(b_traits))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE const hasher &priv_hasher() const
- { return this->base_t::get(); }
-
- hasher &priv_hasher()
- { return this->base_t::get(); }
-
- using bucket_plus_vtraits_t::priv_stored_or_compute_hash; //For store_hash == true
-
- BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_stored_or_compute_hash(const value_type &v, detail::false_) const //For store_hash == false
- { return this->priv_hasher()(key_of_value()(v)); }
-};
-
-template<class ValueTraits, class BucketTraits, class VoidOrKeyOfValue, class VoidOrKeyEqual>
-struct hashtable_equal_holder
-{
- typedef detail::ebo_functor_holder
- < typename hash_key_equal < typename bucket_plus_vtraits<ValueTraits, BucketTraits>::value_traits::value_type
- , VoidOrKeyOfValue
- , VoidOrKeyEqual
- >::type
- > type;
-};
-
-
-//bucket_hash_equal_t
-//Stores bucket_hash_t and the equality function when the first
-//non-empty bucket shall not be cached.
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, bool>
-struct bucket_hash_equal_t
- //Use public inheritance to avoid MSVC bugs with closures
- : public bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> //3
- , public hashtable_equal_holder<ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type //equal
-{
- typedef typename hashtable_equal_holder
- <ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type equal_holder_t;
- typedef bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> bucket_hash_type;
- typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
- typedef ValueTraits value_traits;
- typedef typename equal_holder_t::functor_type key_equal;
- typedef typename bucket_hash_type::hasher hasher;
- typedef BucketTraits bucket_traits;
- typedef typename bucket_plus_vtraits_t::slist_impl slist_impl;
- typedef typename slist_impl::iterator siterator;
- typedef detail::bucket_impl<slist_impl> bucket_type;
- typedef typename detail::unordered_bucket_ptr_impl<value_traits>::type bucket_ptr;
-
- template<class BucketTraitsType>
- bucket_hash_equal_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h, const key_equal &e)
- : bucket_hash_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h)
- , equal_holder_t(e)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_get_cache()
- { return this->bucket_hash_type::priv_bucket_pointer(); }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
- { return 0u; }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_initialize_cache()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_swap_cache(bucket_hash_equal_t &)
- {}
-
- siterator priv_begin() const
- {
- std::size_t n = 0;
- std::size_t bucket_cnt = this->bucket_hash_type::priv_bucket_count();
- for (n = 0; n < bucket_cnt; ++n){
- bucket_type &b = this->bucket_hash_type::priv_bucket_pointer()[n];
- if(!b.empty()){
- return b.begin();
- }
- }
- return this->bucket_hash_type::priv_invalid_local_it();
- }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_insertion_update_cache(std::size_t)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_erasure_update_cache_range(std::size_t, std::size_t)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_erasure_update_cache()
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE const key_equal &priv_equal() const
- { return this->equal_holder_t::get(); }
-
- BOOST_INTRUSIVE_FORCEINLINE key_equal &priv_equal()
- { return this->equal_holder_t::get(); }
-};
-
-//bucket_hash_equal_t
-//Stores bucket_hash_t and the equality function when the first
-//non-empty bucket shall be cached.
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits> //cache_begin == true version
-struct bucket_hash_equal_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, true>
- //Use public inheritance to avoid MSVC bugs with closures
- : bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> //2
- , hashtable_equal_holder<ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type
-{
- typedef typename hashtable_equal_holder
- <ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type equal_holder_t;
-
- typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
- typedef ValueTraits value_traits;
- typedef typename equal_holder_t::functor_type key_equal;
- typedef bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> bucket_hash_type;
- typedef typename bucket_hash_type::hasher hasher;
- typedef BucketTraits bucket_traits;
- typedef typename bucket_plus_vtraits_t::slist_impl::iterator siterator;
-
- template<class BucketTraitsType>
- bucket_hash_equal_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h, const key_equal &e)
- : bucket_hash_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h)
- , equal_holder_t(e)
- {}
-
- typedef typename detail::unordered_bucket_ptr_impl
- <typename bucket_hash_type::value_traits>::type bucket_ptr;
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr &priv_get_cache()
- { return cached_begin_; }
-
- BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &priv_get_cache() const
- { return cached_begin_; }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &p)
- { cached_begin_ = p; }
-
- BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
- { return this->cached_begin_ - this->bucket_hash_type::priv_bucket_pointer(); }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_initialize_cache()
- { this->cached_begin_ = this->bucket_hash_type::priv_invalid_bucket(); }
-
- BOOST_INTRUSIVE_FORCEINLINE void priv_swap_cache(bucket_hash_equal_t &other)
- {
- ::boost::adl_move_swap(this->cached_begin_, other.cached_begin_);
- }
-
- siterator priv_begin() const
- {
- if(this->cached_begin_ == this->bucket_hash_type::priv_invalid_bucket()){
- return this->bucket_hash_type::priv_invalid_local_it();
- }
- else{
- return this->cached_begin_->begin();
- }
- }
-
- void priv_insertion_update_cache(std::size_t insertion_bucket)
- {
- bucket_ptr p = this->bucket_hash_type::priv_bucket_pointer() + insertion_bucket;
- if(p < this->cached_begin_){
- this->cached_begin_ = p;
- }
- }
-
- BOOST_INTRUSIVE_FORCEINLINE const key_equal &priv_equal() const
- { return this->equal_holder_t::get(); }
-
- BOOST_INTRUSIVE_FORCEINLINE key_equal &priv_equal()
- { return this->equal_holder_t::get(); }
-
- void priv_erasure_update_cache_range(std::size_t first_bucket_num, std::size_t last_bucket_num)
- {
- //If the last bucket is the end, the cache must be updated
- //to the last position if all
- if(this->priv_get_cache_bucket_num() == first_bucket_num &&
- this->bucket_hash_type::priv_bucket_pointer()[first_bucket_num].empty() ){
- this->priv_set_cache(this->bucket_hash_type::priv_bucket_pointer() + last_bucket_num);
- this->priv_erasure_update_cache();
- }
- }
-
- void priv_erasure_update_cache()
- {
- if(this->cached_begin_ != this->bucket_hash_type::priv_invalid_bucket()){
- std::size_t current_n = this->priv_get_cache() - this->bucket_hash_type::priv_bucket_pointer();
- for( const std::size_t num_buckets = this->bucket_hash_type::priv_bucket_count()
- ; current_n < num_buckets
- ; ++current_n, ++this->priv_get_cache()){
- if(!this->priv_get_cache()->empty()){
- return;
- }
- }
- this->priv_initialize_cache();
- }
- }
-
- bucket_ptr cached_begin_;
-};
-
-//This wrapper around size_traits is used
-//to maintain minimal container size with compilers like MSVC
-//that have problems with EBO and multiple empty base classes
-template<class DeriveFrom, class SizeType, bool>
-struct hashtable_size_traits_wrapper
- : public DeriveFrom
-{
- template<class Base, class Arg0, class Arg1, class Arg2>
- hashtable_size_traits_wrapper( BOOST_FWD_REF(Base) base, BOOST_FWD_REF(Arg0) arg0
- , BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
- : DeriveFrom(::boost::forward<Base>(base)
- , ::boost::forward<Arg0>(arg0)
- , ::boost::forward<Arg1>(arg1)
- , ::boost::forward<Arg2>(arg2))
- {}
- typedef detail::size_holder < true, SizeType> size_traits;//size_traits
-
- size_traits size_traits_;
-
- typedef const size_traits & size_traits_const_t;
- typedef size_traits & size_traits_t;
-
- BOOST_INTRUSIVE_FORCEINLINE size_traits_const_t priv_size_traits() const
- { return size_traits_; }
-
- BOOST_INTRUSIVE_FORCEINLINE size_traits_t priv_size_traits()
- { return size_traits_; }
-};
-
-template<class DeriveFrom, class SizeType>
-struct hashtable_size_traits_wrapper<DeriveFrom, SizeType, false>
- : public DeriveFrom
-{
- template<class Base, class Arg0, class Arg1, class Arg2>
- hashtable_size_traits_wrapper( BOOST_FWD_REF(Base) base, BOOST_FWD_REF(Arg0) arg0
- , BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
- : DeriveFrom(::boost::forward<Base>(base)
- , ::boost::forward<Arg0>(arg0)
- , ::boost::forward<Arg1>(arg1)
- , ::boost::forward<Arg2>(arg2))
- {}
-
- typedef detail::size_holder< false, SizeType> size_traits;
-
- typedef size_traits size_traits_const_t;
- typedef size_traits size_traits_t;
-
- BOOST_INTRUSIVE_FORCEINLINE size_traits priv_size_traits() const
- { return size_traits(); }
-};
-
-//hashdata_internal
-//Stores bucket_hash_equal_t and split_traits
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, class SizeType, std::size_t BoolFlags>
-struct hashdata_internal
- : public hashtable_size_traits_wrapper
- < bucket_hash_equal_t
- < ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
- , BucketTraits
- , 0 != (BoolFlags & hash_bool_flags::cache_begin_pos)
- > //2
- , SizeType
- , (BoolFlags & hash_bool_flags::incremental_pos) != 0
- >
-{
- typedef hashtable_size_traits_wrapper
- < bucket_hash_equal_t
- < ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
- , BucketTraits
- , 0 != (BoolFlags & hash_bool_flags::cache_begin_pos)
- > //2
- , SizeType
- , (BoolFlags & hash_bool_flags::incremental_pos) != 0
- > internal_type;
- typedef typename internal_type::key_equal key_equal;
- typedef typename internal_type::hasher hasher;
- typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
- typedef SizeType size_type;
- typedef typename internal_type::size_traits split_traits;
- typedef typename bucket_plus_vtraits_t::bucket_ptr bucket_ptr;
- typedef typename bucket_plus_vtraits_t::const_value_traits_ptr const_value_traits_ptr;
- typedef typename bucket_plus_vtraits_t::siterator siterator;
- typedef typename bucket_plus_vtraits_t::bucket_traits bucket_traits;
- typedef typename bucket_plus_vtraits_t::value_traits value_traits;
- typedef typename bucket_plus_vtraits_t::bucket_type bucket_type;
- typedef typename value_traits::value_type value_type;
- typedef typename value_traits::pointer pointer;
- typedef typename value_traits::const_pointer const_pointer;
- typedef typename pointer_traits<pointer>::reference reference;
- typedef typename pointer_traits
- <const_pointer>::reference const_reference;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node node;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::const_node_ptr const_node_ptr;
- typedef detail::node_functions<node_traits> node_functions_t;
- typedef typename detail::get_slist_impl
- <typename detail::reduced_slist_node_traits
- <typename value_traits::node_traits>::type
- >::type slist_impl;
- typedef typename slist_impl::node_algorithms node_algorithms;
- typedef typename slist_impl::node_ptr slist_node_ptr;
-
- typedef hash_key_types_base
- < typename ValueTraits::value_type
- , VoidOrKeyOfValue
- > hash_types_base;
- typedef typename hash_types_base::key_of_value key_of_value;
-
- static const bool store_hash = detail::store_hash_is_true<node_traits>::value;
- static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
- static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
-
- typedef detail::bool_<store_hash> store_hash_t;
-
- typedef detail::transform_iterator
- < typename slist_impl::iterator
- , downcast_node_to_value_t
- < value_traits
- , false> > local_iterator;
-
- typedef detail::transform_iterator
- < typename slist_impl::iterator
- , downcast_node_to_value_t
- < value_traits
- , true> > const_local_iterator;
- //
-
- template<class BucketTraitsType>
- hashdata_internal( const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits
- , const hasher & h, const key_equal &e)
- : internal_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h, e)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE typename internal_type::size_traits_t priv_split_traits()
- { return this->priv_size_traits(); }
-
- BOOST_INTRUSIVE_FORCEINLINE typename internal_type::size_traits_const_t priv_split_traits() const
- { return this->priv_size_traits(); }
-
- ~hashdata_internal()
- { this->priv_clear_buckets(); }
-
- void priv_clear_buckets()
- {
- this->internal_type::priv_clear_buckets
- ( this->priv_get_cache()
- , this->internal_type::priv_bucket_count()
- - (this->priv_get_cache()
- - this->internal_type::priv_bucket_pointer()));
- }
-
- void priv_clear_buckets_and_cache()
- {
- this->priv_clear_buckets();
- this->priv_initialize_cache();
- }
-
- void priv_initialize_buckets_and_cache()
- {
- this->internal_type::priv_clear_buckets
- ( this->internal_type::priv_bucket_pointer()
- , this->internal_type::priv_bucket_count());
- this->priv_initialize_cache();
- }
-
- typedef hashtable_iterator<bucket_plus_vtraits_t, false> iterator;
- typedef hashtable_iterator<bucket_plus_vtraits_t, true> const_iterator;
-
- static std::size_t priv_stored_hash(slist_node_ptr n, detail::true_ true_value)
- { return bucket_plus_vtraits<ValueTraits, BucketTraits>::priv_stored_hash(n, true_value); }
-
- static std::size_t priv_stored_hash(slist_node_ptr n, detail::false_ false_value)
- { return bucket_plus_vtraits<ValueTraits, BucketTraits>::priv_stored_hash(n, false_value); }
-
- //public functions
- BOOST_INTRUSIVE_FORCEINLINE SizeType split_count() const
- {
- return this->priv_split_traits().get_size();
- }
-
- BOOST_INTRUSIVE_FORCEINLINE iterator iterator_to(reference value)
- {
- return iterator(bucket_type::s_iterator_to
- (this->priv_value_to_node(value)), &this->get_bucket_value_traits());
- }
-
- const_iterator iterator_to(const_reference value) const
- {
- siterator const sit = bucket_type::s_iterator_to
- ( *pointer_traits<node_ptr>::const_cast_from
- (pointer_traits<const_node_ptr>::pointer_to(this->priv_value_to_node(value)))
- );
- return const_iterator(sit, &this->get_bucket_value_traits());
- }
-
- static local_iterator s_local_iterator_to(reference value)
- {
- BOOST_STATIC_ASSERT((!stateful_value_traits));
- siterator sit = bucket_type::s_iterator_to(*value_traits::to_node_ptr(value));
- return local_iterator(sit, const_value_traits_ptr());
- }
-
- static const_local_iterator s_local_iterator_to(const_reference value)
- {
- BOOST_STATIC_ASSERT((!stateful_value_traits));
- siterator const sit = bucket_type::s_iterator_to
- ( *pointer_traits<node_ptr>::const_cast_from
- (value_traits::to_node_ptr(value))
- );
- return const_local_iterator(sit, const_value_traits_ptr());
- }
-
- local_iterator local_iterator_to(reference value)
- {
- siterator sit = bucket_type::s_iterator_to(this->priv_value_to_node(value));
- return local_iterator(sit, this->priv_value_traits_ptr());
- }
-
- const_local_iterator local_iterator_to(const_reference value) const
- {
- siterator sit = bucket_type::s_iterator_to
- ( *pointer_traits<node_ptr>::const_cast_from
- (pointer_traits<const_node_ptr>::pointer_to(this->priv_value_to_node(value)))
- );
- return const_local_iterator(sit, this->priv_value_traits_ptr());
- }
-
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const
- {
- const std::size_t bc = this->priv_bucket_count();
- BOOST_INTRUSIVE_INVARIANT_ASSERT(sizeof(size_type) >= sizeof(std::size_t) || bc <= size_type(-1));
- return static_cast<size_type>(bc);
- }
-
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket_size(size_type n) const
- { return this->priv_bucket_pointer()[n].size(); }
-
- BOOST_INTRUSIVE_FORCEINLINE bucket_ptr bucket_pointer() const
- { return this->priv_bucket_pointer(); }
-
- BOOST_INTRUSIVE_FORCEINLINE local_iterator begin(size_type n)
- { return local_iterator(this->priv_bucket_pointer()[n].begin(), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_local_iterator begin(size_type n) const
- { return this->cbegin(n); }
-
- static BOOST_INTRUSIVE_FORCEINLINE size_type suggested_upper_bucket_count(size_type n)
- {
- return prime_list_holder<0>::suggested_upper_bucket_count(n);
- }
-
- static BOOST_INTRUSIVE_FORCEINLINE size_type suggested_lower_bucket_count(size_type n)
- {
- return prime_list_holder<0>::suggested_lower_bucket_count(n);
- }
-
- const_local_iterator cbegin(size_type n) const
- {
- return const_local_iterator
- ( pointer_traits<bucket_ptr>::const_cast_from(this->priv_bucket_pointer())[n].begin()
- , this->priv_value_traits_ptr());
- }
-
- using internal_type::end;
- using internal_type::cend;
-
- local_iterator end(size_type n)
- { return local_iterator(this->priv_bucket_pointer()[n].end(), this->priv_value_traits_ptr()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_local_iterator end(size_type n) const
- { return this->cend(n); }
-
- const_local_iterator cend(size_type n) const
- {
- return const_local_iterator
- ( pointer_traits<bucket_ptr>::const_cast_from(this->priv_bucket_pointer())[n].end()
- , this->priv_value_traits_ptr());
- }
-
- //Public functions for hashtable_impl
-
- BOOST_INTRUSIVE_FORCEINLINE iterator begin()
- { return iterator(this->priv_begin(), &this->get_bucket_value_traits()); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const
- { return this->cbegin(); }
-
- BOOST_INTRUSIVE_FORCEINLINE const_iterator cbegin() const
- { return const_iterator(this->priv_begin(), &this->get_bucket_value_traits()); }
-
- BOOST_INTRUSIVE_FORCEINLINE hasher hash_function() const
- { return this->priv_hasher(); }
-
- BOOST_INTRUSIVE_FORCEINLINE key_equal key_eq() const
- { return this->priv_equal(); }
-};
-
-/// @endcond
-
-//! The class template hashtable is an intrusive hash table container, that
-//! is used to construct intrusive unordered_set and unordered_multiset containers. The
-//! no-throw guarantee holds only, if the VoidOrKeyEqual object and Hasher don't throw.
-//!
-//! hashtable is a semi-intrusive container: each object to be stored in the
-//! container must contain a proper hook, but the container also needs
-//! additional auxiliary memory to work: hashtable needs a pointer to an array
-//! of type `bucket_type` to be passed in the constructor. This bucket array must
-//! have at least the same lifetime as the container. This makes the use of
-//! hashtable more complicated than purely intrusive containers.
-//! `bucket_type` is default-constructible, copyable and assignable
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
-//! \c bucket_traits<>, power_2_buckets<>, cache_begin<> and incremental<>.
-//!
-//! hashtable only provides forward iterators but it provides 4 iterator types:
-//! iterator and const_iterator to navigate through the whole container and
-//! local_iterator and const_local_iterator to navigate through the values
-//! stored in a single bucket. Local iterators are faster and smaller.
-//!
-//! It's not recommended to use non constant-time size hashtables because several
-//! key functions, like "empty()", become non-constant time functions. Non
-//! constant_time size hashtables are mainly provided to support auto-unlink hooks.
-//!
-//! hashtables, does not make automatic rehashings nor
-//! offers functions related to a load factor. Rehashing can be explicitly requested
-//! and the user must provide a new bucket array that will be used from that moment.
-//!
-//! Since no automatic rehashing is done, iterators are never invalidated when
-//! inserting or erasing elements. Iterators are only invalidated when rehashing.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, class SizeType, std::size_t BoolFlags>
-#endif
-class hashtable_impl
- : private hashtable_size_traits_wrapper
- < hashdata_internal
- < ValueTraits
- , VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
- , BucketTraits, SizeType
- , BoolFlags & (hash_bool_flags::incremental_pos | hash_bool_flags::cache_begin_pos) //1
- >
- , SizeType
- , (BoolFlags & hash_bool_flags::constant_time_size_pos) != 0
- >
-{
- typedef hashtable_size_traits_wrapper
- < hashdata_internal
- < ValueTraits
- , VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
- , BucketTraits, SizeType
- , BoolFlags & (hash_bool_flags::incremental_pos | hash_bool_flags::cache_begin_pos) //1
- >
- , SizeType
- , (BoolFlags & hash_bool_flags::constant_time_size_pos) != 0
- > internal_type;
- typedef typename internal_type::size_traits size_traits;
- typedef hash_key_types_base
- < typename ValueTraits::value_type
- , VoidOrKeyOfValue
- > hash_types_base;
- public:
- typedef ValueTraits value_traits;
-
- /// @cond
- typedef BucketTraits bucket_traits;
-
- typedef typename internal_type::slist_impl slist_impl;
- typedef bucket_plus_vtraits<ValueTraits, BucketTraits> bucket_plus_vtraits_t;
- typedef typename bucket_plus_vtraits_t::const_value_traits_ptr const_value_traits_ptr;
-
- using internal_type::begin;
- using internal_type::cbegin;
- using internal_type::end;
- using internal_type::cend;
- using internal_type::hash_function;
- using internal_type::key_eq;
- using internal_type::bucket_size;
- using internal_type::bucket_count;
- using internal_type::local_iterator_to;
- using internal_type::s_local_iterator_to;
- using internal_type::iterator_to;
- using internal_type::bucket_pointer;
- using internal_type::suggested_upper_bucket_count;
- using internal_type::suggested_lower_bucket_count;
- using internal_type::split_count;
-
- /// @endcond
-
- typedef typename value_traits::pointer pointer;
- typedef typename value_traits::const_pointer const_pointer;
- typedef typename value_traits::value_type value_type;
- typedef typename hash_types_base::key_type key_type;
- typedef typename hash_types_base::key_of_value key_of_value;
- typedef typename pointer_traits<pointer>::reference reference;
- typedef typename pointer_traits<const_pointer>::reference const_reference;
- typedef typename pointer_traits<pointer>::difference_type difference_type;
- typedef SizeType size_type;
- typedef typename internal_type::key_equal key_equal;
- typedef typename internal_type::hasher hasher;
- typedef detail::bucket_impl<slist_impl> bucket_type;
- typedef typename internal_type::bucket_ptr bucket_ptr;
- typedef typename slist_impl::iterator siterator;
- typedef typename slist_impl::const_iterator const_siterator;
- typedef typename internal_type::iterator iterator;
- typedef typename internal_type::const_iterator const_iterator;
- typedef typename internal_type::local_iterator local_iterator;
- typedef typename internal_type::const_local_iterator const_local_iterator;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node node;
- typedef typename pointer_traits
- <pointer>::template rebind_pointer
- < node >::type node_ptr;
- typedef typename pointer_traits
- <pointer>::template rebind_pointer
- < const node >::type const_node_ptr;
- typedef typename pointer_traits
- <node_ptr>::reference node_reference;
- typedef typename pointer_traits
- <const_node_ptr>::reference const_node_reference;
- typedef typename slist_impl::node_algorithms node_algorithms;
-
- static const bool stateful_value_traits = internal_type::stateful_value_traits;
- static const bool store_hash = internal_type::store_hash;
-
- static const bool unique_keys = 0 != (BoolFlags & hash_bool_flags::unique_keys_pos);
- static const bool constant_time_size = 0 != (BoolFlags & hash_bool_flags::constant_time_size_pos);
- static const bool cache_begin = 0 != (BoolFlags & hash_bool_flags::cache_begin_pos);
- static const bool compare_hash = 0 != (BoolFlags & hash_bool_flags::compare_hash_pos);
- static const bool incremental = 0 != (BoolFlags & hash_bool_flags::incremental_pos);
- static const bool power_2_buckets = incremental || (0 != (BoolFlags & hash_bool_flags::power_2_buckets_pos));
-
- static const bool optimize_multikey
- = detail::optimize_multikey_is_true<node_traits>::value && !unique_keys;
-
- /// @cond
- static const bool is_multikey = !unique_keys;
- private:
-
- //Configuration error: compare_hash<> can't be specified without store_hash<>
- //See documentation for more explanations
- BOOST_STATIC_ASSERT((!compare_hash || store_hash));
-
- typedef typename slist_impl::node_ptr slist_node_ptr;
- typedef typename pointer_traits
- <slist_node_ptr>::template rebind_pointer
- < void >::type void_pointer;
- //We'll define group traits, but these won't be instantiated if
- //optimize_multikey is not true
- typedef unordered_group_adapter<node_traits> group_traits;
- typedef circular_slist_algorithms<group_traits> group_algorithms;
- typedef typename internal_type::store_hash_t store_hash_t;
- typedef detail::bool_<optimize_multikey> optimize_multikey_t;
- typedef detail::bool_<cache_begin> cache_begin_t;
- typedef detail::bool_<power_2_buckets> power_2_buckets_t;
- typedef typename internal_type::split_traits split_traits;
- typedef detail::group_functions<node_traits> group_functions_t;
- typedef detail::node_functions<node_traits> node_functions_t;
-
- private:
- //noncopyable, movable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(hashtable_impl)
-
- static const bool safemode_or_autounlink = internal_type::safemode_or_autounlink;
-
- //Constant-time size is incompatible with auto-unlink hooks!
- BOOST_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
- //Cache begin is incompatible with auto-unlink hooks!
- BOOST_STATIC_ASSERT(!(cache_begin && ((int)value_traits::link_mode == (int)auto_unlink)));
-
- template<class Disposer>
- struct typeof_node_disposer
- {
- typedef node_cast_adaptor
- < detail::node_disposer< Disposer, value_traits, CircularSListAlgorithms>
- , slist_node_ptr, node_ptr > type;
- };
-
- template<class Disposer>
- typename typeof_node_disposer<Disposer>::type
- make_node_disposer(const Disposer &disposer) const
- {
- typedef typename typeof_node_disposer<Disposer>::type return_t;
- return return_t(disposer, &this->priv_value_traits());
- }
-
- /// @endcond
-
- public:
- typedef detail::insert_commit_data_impl insert_commit_data;
-
-
- public:
-
- //! <b>Requires</b>: buckets must not be being used by any other resource.
- //!
- //! <b>Effects</b>: Constructs an empty unordered_set, storing a reference
- //! to the bucket array and copies of the key_hasher and equal_func functors.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor or invocation of hash_func or equal_func throws.
- //!
- //! <b>Notes</b>: buckets array must be disposed only after
- //! *this is disposed.
- explicit hashtable_impl ( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : internal_type(v_traits, b_traits, hash_func, equal_func)
- {
- this->priv_initialize_buckets_and_cache();
- this->priv_size_traits().set_size(size_type(0));
- size_type bucket_sz = this->bucket_count();
- BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_sz != 0);
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (bucket_sz & (bucket_sz-1))));
- this->priv_split_traits().set_size(bucket_sz>>1);
- }
-
- //! <b>Requires</b>: buckets must not be being used by any other resource
- //! and dereferencing iterator must yield an lvalue of type value_type.
- //!
- //! <b>Effects</b>: Constructs an empty container and inserts elements from
- //! [b, e).
- //!
- //! <b>Complexity</b>: If N is distance(b, e): Average case is O(N)
- //! (with a good hash function and with buckets_len >= N),worst case O(N^2).
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the copy constructor or invocation of hasher or key_equal throws.
- //!
- //! <b>Notes</b>: buckets array must be disposed only after
- //! *this is disposed.
- template<class Iterator>
- hashtable_impl ( bool unique, Iterator b, Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : internal_type(v_traits, b_traits, hash_func, equal_func)
- {
- this->priv_initialize_buckets_and_cache();
- this->priv_size_traits().set_size(size_type(0));
- size_type bucket_sz = this->bucket_count();
- BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_sz != 0);
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (bucket_sz & (bucket_sz-1))));
- this->priv_split_traits().set_size(bucket_sz>>1);
- //Now insert
- if(unique)
- this->insert_unique(b, e);
- else
- this->insert_equal(b, e);
- }
-
- //! <b>Effects</b>: Constructs a container moving resources from another container.
- //! Internal value traits, bucket traits, hasher and comparison are move constructed and
- //! nodes belonging to x are linked to *this.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node's
- //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the move constructor of value traits, bucket traits, hasher or comparison throws.
- hashtable_impl(BOOST_RV_REF(hashtable_impl) x)
- : internal_type( ::boost::move(x.priv_value_traits())
- , ::boost::move(x.priv_bucket_traits())
- , ::boost::move(x.priv_hasher())
- , ::boost::move(x.priv_equal())
- )
- {
- this->priv_swap_cache(x);
- x.priv_initialize_cache();
- this->priv_size_traits().set_size(x.priv_size_traits().get_size());
- x.priv_size_traits().set_size(size_type(0));
- this->priv_split_traits().set_size(x.priv_split_traits().get_size());
- x.priv_split_traits().set_size(size_type(0));
- }
-
- //! <b>Effects</b>: Equivalent to swap.
- //!
- hashtable_impl& operator=(BOOST_RV_REF(hashtable_impl) x)
- { this->swap(x); return *this; }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_set
- //! are not deleted (i.e. no destructors are called).
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the unordered_set, if
- //! it's a safe-mode or auto-unlink value. Otherwise constant.
- //!
- //! <b>Throws</b>: Nothing.
- ~hashtable_impl();
-
- //! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_set.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
- //!
- //! <b>Throws</b>: Nothing.
- iterator begin();
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
- //! of the unordered_set.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator begin() const;
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
- //! of the unordered_set.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //! Worst case (empty unordered_set): O(this->bucket_count())
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator cbegin() const;
-
- //! <b>Effects</b>: Returns an iterator pointing to the end of the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- iterator end();
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the end of the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator end() const;
-
- //! <b>Effects</b>: Returns a const_iterator pointing to the end of the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_iterator cend() const;
-
- //! <b>Effects</b>: Returns the hasher object used by the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If hasher copy-constructor throws.
- hasher hash_function() const;
-
- //! <b>Effects</b>: Returns the key_equal object used by the unordered_set.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If key_equal copy-constructor throws.
- key_equal key_eq() const;
-
- #endif
-
- //! <b>Effects</b>: Returns true if the container is empty.
- //!
- //! <b>Complexity</b>: if constant-time size and cache_begin options are disabled,
- //! average constant time (worst case, with empty() == true: O(this->bucket_count()).
- //! Otherwise constant.
- //!
- //! <b>Throws</b>: Nothing.
- bool empty() const
- {
- if(constant_time_size){
- return !this->size();
- }
- else if(cache_begin){
- return this->begin() == this->end();
- }
- else{
- size_type bucket_cnt = this->bucket_count();
- const bucket_type *b = boost::movelib::to_raw_pointer(this->priv_bucket_pointer());
- for (size_type n = 0; n < bucket_cnt; ++n, ++b){
- if(!b->empty()){
- return false;
- }
- }
- return true;
- }
- }
-
- //! <b>Effects</b>: Returns the number of elements stored in the unordered_set.
- //!
- //! <b>Complexity</b>: Linear to elements contained in *this if
- //! constant_time_size is false. Constant-time otherwise.
- //!
- //! <b>Throws</b>: Nothing.
- size_type size() const
- {
- if(constant_time_size)
- return this->priv_size_traits().get_size();
- else{
- size_type len = 0;
- size_type bucket_cnt = this->bucket_count();
- const bucket_type *b = boost::movelib::to_raw_pointer(this->priv_bucket_pointer());
- for (size_type n = 0; n < bucket_cnt; ++n, ++b){
- len += b->size();
- }
- return len;
- }
- }
-
- //! <b>Requires</b>: the hasher and the equality function unqualified swap
- //! call should not throw.
- //!
- //! <b>Effects</b>: Swaps the contents of two unordered_sets.
- //! Swaps also the contained bucket array and equality and hasher functors.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the swap() call for the comparison or hash functors
- //! found using ADL throw. Basic guarantee.
- void swap(hashtable_impl& other)
- {
- //These can throw
- ::boost::adl_move_swap(this->priv_equal(), other.priv_equal());
- ::boost::adl_move_swap(this->priv_hasher(), other.priv_hasher());
- //These can't throw
- ::boost::adl_move_swap(this->priv_bucket_traits(), other.priv_bucket_traits());
- ::boost::adl_move_swap(this->priv_value_traits(), other.priv_value_traits());
- this->priv_swap_cache(other);
- this->priv_size_traits().swap(other.priv_size_traits());
- this->priv_split_traits().swap(other.priv_split_traits());
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw
- //! Cloner should yield to nodes that compare equal and produce the same
- //! hash than the original node.
- //!
- //! <b>Effects</b>: Erases all the elements from *this
- //! calling Disposer::operator()(pointer), clones all the
- //! elements from src calling Cloner::operator()(const_reference )
- //! and inserts them on *this. The hash function and the equality
- //! predicate are copied from the source.
- //!
- //! If store_hash option is true, this method does not use the hash function.
- //!
- //! If any operation throws, all cloned elements are unlinked and disposed
- //! calling Disposer::operator()(pointer).
- //!
- //! <b>Complexity</b>: Linear to erased plus inserted elements.
- //!
- //! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
- //! throws. Basic guarantee.
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(const hashtable_impl &src, Cloner cloner, Disposer disposer)
- { this->priv_clone_from(src, cloner, disposer); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw
- //! Cloner should yield to nodes that compare equal and produce the same
- //! hash than the original node.
- //!
- //! <b>Effects</b>: Erases all the elements from *this
- //! calling Disposer::operator()(pointer), clones all the
- //! elements from src calling Cloner::operator()(reference)
- //! and inserts them on *this. The hash function and the equality
- //! predicate are copied from the source.
- //!
- //! If store_hash option is true, this method does not use the hash function.
- //!
- //! If any operation throws, all cloned elements are unlinked and disposed
- //! calling Disposer::operator()(pointer).
- //!
- //! <b>Complexity</b>: Linear to erased plus inserted elements.
- //!
- //! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
- //! throws. Basic guarantee.
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(hashtable_impl) src, Cloner cloner, Disposer disposer)
- { this->priv_clone_from(static_cast<hashtable_impl&>(src), cloner, disposer); }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Inserts the value into the unordered_set.
- //!
- //! <b>Returns</b>: An iterator to the inserted value.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- iterator insert_equal(reference value)
- {
- size_type bucket_num;
- std::size_t hash_value;
- siterator prev;
- siterator const it = this->priv_find
- (key_of_value()(value), this->priv_hasher(), this->priv_equal(), bucket_num, hash_value, prev);
- bool const next_is_in_group = optimize_multikey && it != this->priv_invalid_local_it();
- return this->priv_insert_equal_after_find(value, bucket_num, hash_value, prev, next_is_in_group);
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Equivalent to this->insert_equal(t) for each element in [b, e).
- //!
- //! <b>Complexity</b>: Average case O(N), where N is distance(b, e).
- //! Worst case O(N*this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws. Basic guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- template<class Iterator>
- void insert_equal(Iterator b, Iterator e)
- {
- for (; b != e; ++b)
- this->insert_equal(*b);
- }
-
- //! <b>Requires</b>: value must be an lvalue
- //!
- //! <b>Effects</b>: Tries to inserts value into the unordered_set.
- //!
- //! <b>Returns</b>: If the value
- //! is not already present inserts it and returns a pair containing the
- //! iterator to the new value and true. If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws. Strong guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- std::pair<iterator, bool> insert_unique(reference value)
- {
- insert_commit_data commit_data;
- std::pair<iterator, bool> ret = this->insert_unique_check(key_of_value()(value), commit_data);
- if(ret.second){
- ret.first = this->insert_unique_commit(value, commit_data);
- }
- return ret;
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
- //! of type value_type.
- //!
- //! <b>Effects</b>: Equivalent to this->insert_unique(t) for each element in [b, e).
- //!
- //! <b>Complexity</b>: Average case O(N), where N is distance(b, e).
- //! Worst case O(N*this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws. Basic guarantee.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! No copy-constructors are called.
- template<class Iterator>
- void insert_unique(Iterator b, Iterator e)
- {
- for (; b != e; ++b)
- this->insert_unique(*b);
- }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Checks if a value can be inserted in the unordered_set, using
- //! a user provided key instead of the value itself.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false. If the value can be inserted returns true in the returned
- //! pair boolean and fills "commit_data" that is meant to be used with
- //! the "insert_commit" function.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw. Strong guarantee.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a value_type is expensive: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the hash or the equality is much cheaper to
- //! construct than the value_type and this function offers the possibility to
- //! use that the part to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the value_type and use
- //! "insert_commit" to insert the object in constant-time.
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the unordered_set.
- //!
- //! After a successful rehashing insert_commit_data remains valid.
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<iterator, bool> insert_unique_check
- ( const KeyType &key
- , KeyHasher hash_func
- , KeyEqual equal_func
- , insert_commit_data &commit_data)
- {
- size_type bucket_num;
- siterator prev;
- siterator const pos = this->priv_find(key, hash_func, equal_func, bucket_num, commit_data.hash, prev);
- return std::pair<iterator, bool>
- ( iterator(pos, &this->get_bucket_value_traits())
- , pos == this->priv_invalid_local_it());
- }
-
- //! <b>Effects</b>: Checks if a value can be inserted in the unordered_set, using
- //! a user provided key instead of the value itself.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing an iterator to the already present value
- //! and false. If the value can be inserted returns true in the returned
- //! pair boolean and fills "commit_data" that is meant to be used with
- //! the "insert_commit" function.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hasher or key_compare throw. Strong guarantee.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a value_type is expensive: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the hash or the equality is much cheaper to
- //! construct than the value_type and this function offers the possibility to
- //! use that the part to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the value_type and use
- //! "insert_commit" to insert the object in constant-time.
- //!
- //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
- //! objects are inserted or erased from the unordered_set.
- //!
- //! After a successful rehashing insert_commit_data remains valid.
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_unique_check
- ( const key_type &key, insert_commit_data &commit_data)
- { return this->insert_unique_check(key, this->priv_hasher(), this->priv_equal(), commit_data); }
-
- //! <b>Requires</b>: value must be an lvalue of type value_type. commit_data
- //! must have been obtained from a previous call to "insert_check".
- //! No objects should have been inserted or erased from the unordered_set between
- //! the "insert_check" that filled "commit_data" and the call to "insert_commit".
- //!
- //! <b>Effects</b>: Inserts the value in the unordered_set using the information obtained
- //! from the "commit_data" that a previous "insert_check" filled.
- //!
- //! <b>Returns</b>: An iterator to the newly inserted object.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Notes</b>: This function has only sense if a "insert_check" has been
- //! previously executed to fill "commit_data". No value should be inserted or
- //! erased between the "insert_check" and "insert_commit" calls.
- //!
- //! After a successful rehashing insert_commit_data remains valid.
- iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
- {
- size_type bucket_num = this->priv_hash_to_bucket(commit_data.hash);
- bucket_type &b = this->priv_bucket_pointer()[bucket_num];
- this->priv_size_traits().increment();
- node_ptr const n = pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(value));
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(n));
- node_functions_t::store_hash(n, commit_data.hash, store_hash_t());
- this->priv_insertion_update_cache(bucket_num);
- group_functions_t::insert_in_group(n, n, optimize_multikey_t());
- return iterator(b.insert_after(b.before_begin(), *n), &this->get_bucket_value_traits());
- }
-
- //! <b>Effects</b>: Erases the element pointed to by i.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased element. No destructors are called.
- BOOST_INTRUSIVE_FORCEINLINE void erase(const_iterator i)
- { this->erase_and_dispose(i, detail::null_disposer()); }
-
- //! <b>Effects</b>: Erases the range pointed to by b end e.
- //!
- //! <b>Complexity</b>: Average case O(distance(b, e)),
- //! worst case O(this->size()).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- BOOST_INTRUSIVE_FORCEINLINE void erase(const_iterator b, const_iterator e)
- { this->erase_and_dispose(b, e, detail::null_disposer()); }
-
- //! <b>Effects</b>: Erases all the elements with the given value.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- //! Basic guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- BOOST_INTRUSIVE_FORCEINLINE size_type erase(const key_type &key)
- { return this->erase(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Erases all the elements that have the same hash and
- //! compare equal with the given key.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw. Basic guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class KeyType, class KeyHasher, class KeyEqual>
- BOOST_INTRUSIVE_FORCEINLINE size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
- { return this->erase_and_dispose(key, hash_func, equal_func, detail::null_disposer()); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the element pointed to by i.
- //! Disposer::operator()(pointer) is called for the removed element.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- BOOST_INTRUSIVE_DOC1ST(void
- , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
- erase_and_dispose(const_iterator i, Disposer disposer)
- {
- //Get the bucket number and local iterator for both iterators
- siterator const first_local_it(i.slist_it());
- size_type const first_bucket_num = this->priv_get_bucket_num(first_local_it);
- this->priv_erase_node(this->priv_bucket_pointer()[first_bucket_num], first_local_it, make_node_disposer(disposer), optimize_multikey_t());
- this->priv_size_traits().decrement();
- this->priv_erasure_update_cache_range(first_bucket_num, first_bucket_num);
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the range pointed to by b end e.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Complexity</b>: Average case O(distance(b, e)),
- //! worst case O(this->size()).
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class Disposer>
- void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
- {
- if(b != e){
- //Get the bucket number and local iterator for both iterators
- siterator first_local_it(b.slist_it());
- size_type first_bucket_num = this->priv_get_bucket_num(first_local_it);
-
- const bucket_ptr buck_ptr = this->priv_bucket_pointer();
- siterator before_first_local_it
- = this->priv_get_previous(buck_ptr[first_bucket_num], first_local_it);
- size_type last_bucket_num;
- siterator last_local_it;
-
- //For the end iterator, we will assign the end iterator
- //of the last bucket
- if(e == this->end()){
- last_bucket_num = this->bucket_count() - 1;
- last_local_it = buck_ptr[last_bucket_num].end();
- }
- else{
- last_local_it = e.slist_it();
- last_bucket_num = this->priv_get_bucket_num(last_local_it);
- }
- size_type const num_erased = this->priv_erase_node_range
- ( before_first_local_it, first_bucket_num, last_local_it, last_bucket_num
- , make_node_disposer(disposer), optimize_multikey_t());
- this->priv_size_traits().set_size(this->priv_size_traits().get_size()-num_erased);
- this->priv_erasure_update_cache_range(first_bucket_num, last_bucket_num);
- }
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all the elements with the given value.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- //! Basic guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE size_type erase_and_dispose(const key_type &key, Disposer disposer)
- { return this->erase_and_dispose(key, this->priv_hasher(), this->priv_equal(), disposer); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all the elements with the given key.
- //! according to the comparison functor "equal_func".
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: The number of erased elements.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw. Basic guarantee.
- //!
- //! <b>Note</b>: Invalidates the iterators
- //! to the erased elements.
- template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func
- ,KeyEqual equal_func, Disposer disposer)
- {
- size_type bucket_num;
- std::size_t h;
- siterator prev;
- siterator it = this->priv_find(key, hash_func, equal_func, bucket_num, h, prev);
- bool const success = it != this->priv_invalid_local_it();
-
- size_type cnt(0);
- if(success){
- if(optimize_multikey){
- cnt = this->priv_erase_from_single_bucket
- (this->priv_bucket_pointer()[bucket_num], prev, ++(priv_last_in_group)(it), make_node_disposer(disposer), optimize_multikey_t());
- }
- else{
- bucket_type &b = this->priv_bucket_pointer()[bucket_num];
- siterator const end_sit = b.end();
- do{
- ++cnt;
- ++it;
- }while(it != end_sit &&
- this->priv_is_value_equal_to_key
- (this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func));
- bucket_type::s_erase_after_and_dispose(prev, it, make_node_disposer(disposer));
- }
- this->priv_size_traits().set_size(this->priv_size_traits().get_size()-cnt);
- this->priv_erasure_update_cache();
- }
-
- return cnt;
- }
-
- //! <b>Effects</b>: Erases all of the elements.
- //!
- //! <b>Complexity</b>: Linear to the number of elements on the container.
- //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- void clear()
- {
- this->priv_clear_buckets_and_cache();
- this->priv_size_traits().set_size(size_type(0));
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all of the elements.
- //!
- //! <b>Complexity</b>: Linear to the number of elements on the container.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements. No destructors are called.
- template<class Disposer>
- void clear_and_dispose(Disposer disposer)
- {
- if(!constant_time_size || !this->empty()){
- size_type num_buckets = this->bucket_count();
- bucket_ptr b = this->priv_bucket_pointer();
- typename typeof_node_disposer<Disposer>::type d(disposer, &this->priv_value_traits());
- for(; num_buckets--; ++b){
- b->clear_and_dispose(d);
- }
- this->priv_size_traits().set_size(size_type(0));
- }
- this->priv_initialize_cache();
- }
-
- //! <b>Effects</b>: Returns the number of contained elements with the given value
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE size_type count(const key_type &key) const
- { return this->count(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Returns the number of contained elements with the given key
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal throw.
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type count(const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
- {
- size_type cnt;
- size_type n_bucket;
- this->priv_local_equal_range(key, hash_func, equal_func, n_bucket, cnt);
- return cnt;
- }
-
- //! <b>Effects</b>: Finds an iterator to the first element is equal to
- //! "value" or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE iterator find(const key_type &key)
- { return this->find(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Finds an iterator to the first element whose key is
- //! "key" according to the given hash and equality functor or end() if
- //! that element does not exist.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw.
- //!
- //! <b>Note</b>: This function is used when constructing a value_type
- //! is expensive and the value_type can be compared with a cheaper
- //! key type. Usually this key is part of the value_type.
- template<class KeyType, class KeyHasher, class KeyEqual>
- iterator find(const KeyType &key, KeyHasher hash_func, KeyEqual equal_func)
- {
- size_type bucket_n;
- std::size_t hash;
- siterator prev;
- return iterator( this->priv_find(key, hash_func, equal_func, bucket_n, hash, prev)
- , &this->get_bucket_value_traits());
- }
-
- //! <b>Effects</b>: Finds a const_iterator to the first element whose key is
- //! "key" or end() if that element does not exist.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE const_iterator find(const key_type &key) const
- { return this->find(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Finds an iterator to the first element whose key is
- //! "key" according to the given hasher and equality functor or end() if
- //! that element does not exist.
- //!
- //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or equal_func throw.
- //!
- //! <b>Note</b>: This function is used when constructing a value_type
- //! is expensive and the value_type can be compared with a cheaper
- //! key type. Usually this key is part of the value_type.
- template<class KeyType, class KeyHasher, class KeyEqual>
- const_iterator find
- (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
- {
- size_type bucket_n;
- std::size_t hash_value;
- siterator prev;
- return const_iterator( this->priv_find(key, hash_func, equal_func, bucket_n, hash_value, prev)
- , &this->get_bucket_value_traits());
- }
-
- //! <b>Effects</b>: Returns a range containing all elements with values equivalent
- //! to value. Returns std::make_pair(this->end(), this->end()) if no such
- //! elements exist.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)). Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->equal_range(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Returns a range containing all elements with equivalent
- //! keys. Returns std::make_pair(this->end(), this->end()) if no such
- //! elements exist.
- //!
- //! <b>Complexity</b>: Average case O(this->count(key, hash_func, equal_func)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If hash_func or the equal_func throw.
- //!
- //! <b>Note</b>: This function is used when constructing a value_type
- //! is expensive and the value_type can be compared with a cheaper
- //! key type. Usually this key is part of the value_type.
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<iterator,iterator> equal_range
- (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func)
- {
- std::pair<siterator, siterator> ret =
- this->priv_equal_range(key, hash_func, equal_func);
- return std::pair<iterator, iterator>
- ( iterator(ret.first, &this->get_bucket_value_traits())
- , iterator(ret.second, &this->get_bucket_value_traits()));
- }
-
- //! <b>Effects</b>: Returns a range containing all elements with values equivalent
- //! to value. Returns std::make_pair(this->end(), this->end()) if no such
- //! elements exist.
- //!
- //! <b>Complexity</b>: Average case O(this->count(value)). Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the internal hasher or the equality functor throws.
- BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->equal_range(key, this->priv_hasher(), this->priv_equal()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! "equal_func" must be a equality function that induces
- //! the same equality as key_equal. The difference is that
- //! "equal_func" compares an arbitrary key with the contained values.
- //!
- //! <b>Effects</b>: Returns a range containing all elements with equivalent
- //! keys. Returns std::make_pair(this->end(), this->end()) if no such
- //! elements exist.
- //!
- //! <b>Complexity</b>: Average case O(this->count(key, hash_func, equal_func)).
- //! Worst case O(this->size()).
- //!
- //! <b>Throws</b>: If the hasher or equal_func throw.
- //!
- //! <b>Note</b>: This function is used when constructing a value_type
- //! is expensive and the value_type can be compared with a cheaper
- //! key type. Usually this key is part of the value_type.
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<const_iterator,const_iterator> equal_range
- (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
- {
- std::pair<siterator, siterator> ret =
- this->priv_equal_range(key, hash_func, equal_func);
- return std::pair<const_iterator, const_iterator>
- ( const_iterator(ret.first, &this->get_bucket_value_traits())
- , const_iterator(ret.second, &this->get_bucket_value_traits()));
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid iterator belonging to the unordered_set
- //! that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the internal hash function throws.
- iterator iterator_to(reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid const_iterator belonging to the
- //! unordered_set that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the internal hash function throws.
- const_iterator iterator_to(const_reference value) const;
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid local_iterator belonging to the unordered_set
- //! that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This static function is available only if the <i>value traits</i>
- //! is stateless.
- static local_iterator s_local_iterator_to(reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid const_local_iterator belonging to
- //! the unordered_set that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: This static function is available only if the <i>value traits</i>
- //! is stateless.
- static const_local_iterator s_local_iterator_to(const_reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid local_iterator belonging to the unordered_set
- //! that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- local_iterator local_iterator_to(reference value);
-
- //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
- //! appropriate type. Otherwise the behavior is undefined.
- //!
- //! <b>Effects</b>: Returns: a valid const_local_iterator belonging to
- //! the unordered_set that points to the value
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- const_local_iterator local_iterator_to(const_reference value) const;
-
- //! <b>Effects</b>: Returns the number of buckets passed in the constructor
- //! or the last rehash function.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- size_type bucket_count() const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns the number of elements in the nth bucket.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- size_type bucket_size(size_type n) const;
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Returns the index of the bucket in which elements
- //! with keys equivalent to k would be found, if any such element existed.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If the hash functor throws.
- //!
- //! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket(const key_type& k) const
- { return this->bucket(k, this->priv_hasher()); }
-
- //! <b>Requires</b>: "hash_func" must be a hash function that induces
- //! the same hash values as the stored hasher. The difference is that
- //! "hash_func" hashes the given key instead of the value_type.
- //!
- //! <b>Effects</b>: Returns the index of the bucket in which elements
- //! with keys equivalent to k would be found, if any such element existed.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If hash_func throws.
- //!
- //! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
- template<class KeyType, class KeyHasher>
- BOOST_INTRUSIVE_FORCEINLINE size_type bucket(const KeyType& k, KeyHasher hash_func) const
- { return this->priv_hash_to_bucket(hash_func(k)); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! <b>Effects</b>: Returns the bucket array pointer passed in the constructor
- //! or the last rehash function.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- bucket_ptr bucket_pointer() const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a local_iterator pointing to the beginning
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- local_iterator begin(size_type n);
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a const_local_iterator pointing to the beginning
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- const_local_iterator begin(size_type n) const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a const_local_iterator pointing to the beginning
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- const_local_iterator cbegin(size_type n) const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a local_iterator pointing to the end
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- local_iterator end(size_type n);
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a const_local_iterator pointing to the end
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- const_local_iterator end(size_type n) const;
-
- //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
- //!
- //! <b>Effects</b>: Returns a const_local_iterator pointing to the end
- //! of the sequence stored in the bucket n.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
- //! containing all of the elements in the nth bucket.
- const_local_iterator cend(size_type n) const;
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Requires</b>: new_bucket_traits can hold a pointer to a new bucket array
- //! or the same as the old bucket array with a different length. new_size is the length of the
- //! the array pointed by new_buckets. If new_bucket_traits.bucket_begin() == this->bucket_pointer()
- //! new_bucket_traits.bucket_count() can be bigger or smaller than this->bucket_count().
- //! 'new_bucket_traits' copy constructor should not throw.
- //!
- //! <b>Effects</b>:
- //! If `new_bucket_traits.bucket_begin() == this->bucket_pointer()` is false,
- //! unlinks values from the old bucket and inserts then in the new one according
- //! to the hash value of values.
- //!
- //! If `new_bucket_traits.bucket_begin() == this->bucket_pointer()` is true,
- //! the implementations avoids moving values as much as possible.
- //!
- //! Bucket traits hold by *this is assigned from new_bucket_traits.
- //! If the container is configured as incremental<>, the split bucket is set
- //! to the new bucket_count().
- //!
- //! If store_hash option is true, this method does not use the hash function.
- //! If false, the implementation tries to minimize calls to the hash function
- //! (e.g. once for equivalent values if optimize_multikey<true> is true).
- //!
- //! If rehash is successful updates the internal bucket_traits with new_bucket_traits.
- //!
- //! <b>Complexity</b>: Average case linear in this->size(), worst case quadratic.
- //!
- //! <b>Throws</b>: If the hasher functor throws. Basic guarantee.
- BOOST_INTRUSIVE_FORCEINLINE void rehash(const bucket_traits &new_bucket_traits)
- { this->rehash_impl(new_bucket_traits, false); }
-
- //! <b>Note</b>: This function is used when keys from inserted elements are changed
- //! (e.g. a language change when key is a string) but uniqueness and hash properties are
- //! preserved so a fast full rehash recovers invariants for *this without extracting and
- //! reinserting all elements again.
- //!
- //! <b>Requires</b>: Calls produced to the hash function should not alter the value uniqueness
- //! properties of already inserted elements. If hasher(key1) == hasher(key2) was true when
- //! elements were inserted, it shall be true during calls produced in the execution of this function.
- //!
- //! key_equal is not called inside this function so it is assumed that key_equal(value1, value2)
- //! should produce the same results as before for inserted elements.
- //!
- //! <b>Effects</b>: Reprocesses all values hold by *this, recalculating their hash values
- //! and redistributing them though the buckets.
- //!
- //! If store_hash option is true, this method uses the hash function and updates the stored hash value.
- //!
- //! <b>Complexity</b>: Average case linear in this->size(), worst case quadratic.
- //!
- //! <b>Throws</b>: If the hasher functor throws. Basic guarantee.
- BOOST_INTRUSIVE_FORCEINLINE void full_rehash()
- { this->rehash_impl(this->priv_bucket_traits(), true); }
-
- //! <b>Requires</b>:
- //!
- //! <b>Effects</b>:
- //!
- //! <b>Complexity</b>:
- //!
- //! <b>Throws</b>:
- //!
- //! <b>Note</b>: this method is only available if incremental<true> option is activated.
- bool incremental_rehash(bool grow = true)
- {
- //This function is only available for containers with incremental hashing
- BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
- const size_type split_idx = this->priv_split_traits().get_size();
- const size_type bucket_cnt = this->bucket_count();
- const bucket_ptr buck_ptr = this->priv_bucket_pointer();
- bool ret = false;
-
- if(grow){
- //Test if the split variable can be changed
- if((ret = split_idx < bucket_cnt)){
- const size_type bucket_to_rehash = split_idx - bucket_cnt/2;
- bucket_type &old_bucket = buck_ptr[bucket_to_rehash];
- this->priv_split_traits().increment();
-
- //Anti-exception stuff: if an exception is thrown while
- //moving elements from old_bucket to the target bucket, all moved
- //elements are moved back to the original one.
- detail::incremental_rehash_rollback<bucket_type, split_traits> rollback
- ( buck_ptr[split_idx], old_bucket, this->priv_split_traits());
- for( siterator before_i(old_bucket.before_begin()), i(old_bucket.begin()), end_sit(old_bucket.end())
- ; i != end_sit; i = before_i, ++i){
- const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
- const std::size_t hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
- const size_type new_n = this->priv_hash_to_bucket(hash_value);
- siterator const last = (priv_last_in_group)(i);
- if(new_n == bucket_to_rehash){
- before_i = last;
- }
- else{
- bucket_type &new_b = buck_ptr[new_n];
- new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
- }
- }
- rollback.release();
- this->priv_erasure_update_cache();
- }
- }
- else if((ret = split_idx > bucket_cnt/2)){ //!grow
- const size_type target_bucket_num = split_idx - 1 - bucket_cnt/2;
- bucket_type &target_bucket = buck_ptr[target_bucket_num];
- bucket_type &source_bucket = buck_ptr[split_idx-1];
- target_bucket.splice_after(target_bucket.cbefore_begin(), source_bucket);
- this->priv_split_traits().decrement();
- this->priv_insertion_update_cache(target_bucket_num);
- }
- return ret;
- }
-
- //! <b>Effects</b>: If new_bucket_traits.bucket_count() is not
- //! this->bucket_count()/2 or this->bucket_count()*2, or
- //! this->split_bucket() != new_bucket_traits.bucket_count() returns false
- //! and does nothing.
- //!
- //! Otherwise, copy assigns new_bucket_traits to the internal bucket_traits
- //! and transfers all the objects from old buckets to the new ones.
- //!
- //! <b>Complexity</b>: Linear to size().
- //!
- //! <b>Throws</b>: Nothing
- //!
- //! <b>Note</b>: this method is only available if incremental<true> option is activated.
- bool incremental_rehash(const bucket_traits &new_bucket_traits)
- {
- //This function is only available for containers with incremental hashing
- BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
- size_type const new_bucket_traits_size = new_bucket_traits.bucket_count();
- size_type const cur_bucket_traits = this->bucket_count();
- const size_type split_idx = this->split_count();
-
- //Test new bucket size is consistent with internal bucket size and split count
- if(new_bucket_traits_size/2 == cur_bucket_traits){
- if(!(split_idx >= cur_bucket_traits))
- return false;
- }
- else if(new_bucket_traits_size == cur_bucket_traits/2){
- if(!(split_idx <= new_bucket_traits_size))
- return false;
- }
- else{
- return false;
- }
-
- const size_type ini_n = this->priv_get_cache_bucket_num();
- const bucket_ptr old_buckets = this->priv_bucket_pointer();
- this->priv_bucket_traits() = new_bucket_traits;
- if(new_bucket_traits.bucket_begin() != old_buckets){
- for(size_type n = ini_n; n < split_idx; ++n){
- bucket_type &new_bucket = new_bucket_traits.bucket_begin()[n];
- bucket_type &old_bucket = old_buckets[n];
- new_bucket.splice_after(new_bucket.cbefore_begin(), old_bucket);
- }
- //Put cache to safe position
- this->priv_initialize_cache();
- this->priv_insertion_update_cache(ini_n);
- }
- return true;
- }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Requires</b>: incremental<> option must be set
- //!
- //! <b>Effects</b>: returns the current split count
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing
- size_type split_count() const;
-
- //! <b>Effects</b>: Returns the nearest new bucket count optimized for
- //! the container that is bigger or equal than n. This suggestion can be
- //! used to create bucket arrays with a size that will usually improve
- //! container's performance. If such value does not exist, the
- //! higher possible value is returned.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //!
- //! <b>Throws</b>: Nothing.
- static size_type suggested_upper_bucket_count(size_type n);
-
- //! <b>Effects</b>: Returns the nearest new bucket count optimized for
- //! the container that is smaller or equal than n. This suggestion can be
- //! used to create bucket arrays with a size that will usually improve
- //! container's performance. If such value does not exist, the
- //! lowest possible value is returned.
- //!
- //! <b>Complexity</b>: Amortized constant time.
- //!
- //! <b>Throws</b>: Nothing.
- static size_type suggested_lower_bucket_count(size_type n);
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-
- friend bool operator==(const hashtable_impl &x, const hashtable_impl &y)
- {
- //Taken from N3068
- if(constant_time_size && x.size() != y.size()){
- return false;
- }
- for (const_iterator ix = x.cbegin(), ex = x.cend(); ix != ex; ++ix){
- std::pair<const_iterator, const_iterator> eqx(x.equal_range(key_of_value()(*ix))),
- eqy(y.equal_range(key_of_value()(*ix)));
- if (boost::intrusive::iterator_distance(eqx.first, eqx.second) !=
- boost::intrusive::iterator_distance(eqy.first, eqy.second) ||
- !(priv_algo_is_permutation)(eqx.first, eqx.second, eqy.first) ){
- return false;
- }
- ix = eqx.second;
- }
- return true;
- }
-
- friend bool operator!=(const hashtable_impl &x, const hashtable_impl &y)
- { return !(x == y); }
-
- friend bool operator<(const hashtable_impl &x, const hashtable_impl &y)
- { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- friend bool operator>(const hashtable_impl &x, const hashtable_impl &y)
- { return y < x; }
-
- friend bool operator<=(const hashtable_impl &x, const hashtable_impl &y)
- { return !(y < x); }
-
- friend bool operator>=(const hashtable_impl &x, const hashtable_impl &y)
- { return !(x < y); }
-
- /// @cond
- BOOST_INTRUSIVE_FORCEINLINE void check() const {}
- private:
-
- void rehash_impl(const bucket_traits &new_bucket_traits, bool do_full_rehash)
- {
- const bucket_ptr new_buckets = new_bucket_traits.bucket_begin();
- size_type new_bucket_count = new_bucket_traits.bucket_count();
- const bucket_ptr old_buckets = this->priv_bucket_pointer();
- size_type old_bucket_count = this->bucket_count();
-
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (new_bucket_count & (new_bucket_count-1u))));
-
- size_type n = this->priv_get_cache_bucket_num();
- const bool same_buffer = old_buckets == new_buckets;
- //If the new bucket length is a common factor
- //of the old one we can avoid hash calculations.
- const bool fast_shrink = (!do_full_rehash) && (!incremental) && (old_bucket_count >= new_bucket_count) &&
- (power_2_buckets || (old_bucket_count % new_bucket_count) == 0);
- //If we are shrinking the same bucket array and it's
- //is a fast shrink, just rehash the last nodes
- size_type new_first_bucket_num = new_bucket_count;
- if(same_buffer && fast_shrink && (n < new_bucket_count)){
- new_first_bucket_num = n;
- n = new_bucket_count;
- }
-
- //Anti-exception stuff: they destroy the elements if something goes wrong.
- //If the source and destination buckets are the same, the second rollback function
- //is harmless, because all elements have been already unlinked and destroyed
- typedef detail::init_disposer<node_algorithms> NodeDisposer;
- typedef detail::exception_array_disposer<bucket_type, NodeDisposer, size_type> ArrayDisposer;
- NodeDisposer node_disp;
- ArrayDisposer rollback1(new_buckets[0], node_disp, new_bucket_count);
- ArrayDisposer rollback2(old_buckets[0], node_disp, old_bucket_count);
-
- //Put size in a safe value for rollback exception
- size_type const size_backup = this->priv_size_traits().get_size();
- this->priv_size_traits().set_size(0);
- //Put cache to safe position
- this->priv_initialize_cache();
- this->priv_insertion_update_cache(size_type(0u));
-
- //Iterate through nodes
- for(; n < old_bucket_count; ++n){
- bucket_type &old_bucket = old_buckets[n];
- if(!fast_shrink){
- for( siterator before_i(old_bucket.before_begin()), i(old_bucket.begin()), end_sit(old_bucket.end())
- ; i != end_sit
- ; i = before_i, ++i){
-
- //First obtain hash value (and store it if do_full_rehash)
- std::size_t hash_value;
- if(do_full_rehash){
- value_type &v = this->priv_value_from_slist_node(i.pointed_node());
- hash_value = this->priv_hasher()(key_of_value()(v));
- node_functions_t::store_hash(pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(v)), hash_value, store_hash_t());
- }
- else{
- const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
- hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
- }
-
- //Now calculate the new bucket position
- const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>
- (hash_value, new_bucket_count, new_bucket_count);
-
- //Update first used bucket cache
- if(cache_begin && new_n < new_first_bucket_num)
- new_first_bucket_num = new_n;
-
- //If the target bucket is new, transfer the whole group
- siterator const last = (priv_last_in_group)(i);
-
- if(same_buffer && new_n == n){
- before_i = last;
- }
- else{
- bucket_type &new_b = new_buckets[new_n];
- new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
- }
- }
- }
- else{
- const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>(n, new_bucket_count, new_bucket_count);
- if(cache_begin && new_n < new_first_bucket_num)
- new_first_bucket_num = new_n;
- bucket_type &new_b = new_buckets[new_n];
- new_b.splice_after( new_b.before_begin()
- , old_bucket
- , old_bucket.before_begin()
- , bucket_plus_vtraits_t::priv_get_last(old_bucket, optimize_multikey_t()));
- }
- }
-
- this->priv_size_traits().set_size(size_backup);
- this->priv_split_traits().set_size(new_bucket_count);
- if(&new_bucket_traits != &this->priv_bucket_traits()){
- this->priv_bucket_traits() = new_bucket_traits;
- }
- this->priv_initialize_cache();
- this->priv_insertion_update_cache(new_first_bucket_num);
- rollback1.release();
- rollback2.release();
- }
-
- template <class MaybeConstHashtableImpl, class Cloner, class Disposer>
- void priv_clone_from(MaybeConstHashtableImpl &src, Cloner cloner, Disposer disposer)
- {
- this->clear_and_dispose(disposer);
- if(!constant_time_size || !src.empty()){
- const size_type src_bucket_count = src.bucket_count();
- const size_type dst_bucket_count = this->bucket_count();
- //Check power of two bucket array if the option is activated
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (src_bucket_count & (src_bucket_count-1))));
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (!power_2_buckets || (0 == (dst_bucket_count & (dst_bucket_count-1))));
- //If src bucket count is bigger or equal, structural copy is possible
- const bool structural_copy = (!incremental) && (src_bucket_count >= dst_bucket_count) &&
- (power_2_buckets || (src_bucket_count % dst_bucket_count) == 0);
- if(structural_copy){
- this->priv_structural_clone_from(src, cloner, disposer);
- }
- else{
- //Unlike previous cloning algorithm, this can throw
- //if cloner, hasher or comparison functor throw
- typedef typename detail::if_c< detail::is_const<MaybeConstHashtableImpl>::value
- , typename MaybeConstHashtableImpl::const_iterator
- , typename MaybeConstHashtableImpl::iterator
- >::type clone_iterator;
- clone_iterator b(src.begin()), e(src.end());
- detail::exception_disposer<hashtable_impl, Disposer> rollback(*this, disposer);
- for(; b != e; ++b){
- //No need to check for duplicates and insert it in the first position
- //as this is an unordered container. So use minimal insertion code
- std::size_t const hash_to_store = this->priv_stored_or_compute_hash(*b, store_hash_t());;
- size_type const bucket_number = this->priv_hash_to_bucket(hash_to_store);
- typedef typename detail::if_c
- <detail::is_const<MaybeConstHashtableImpl>::value, const_reference, reference>::type reference_type;
- reference_type r = *b;
- this->priv_clone_front_in_bucket<reference_type>(bucket_number, r, hash_to_store, cloner);
- }
- rollback.release();
- }
- }
- }
-
- template<class ValueReference, class Cloner>
- void priv_clone_front_in_bucket( size_type const bucket_number
- , typename detail::identity<ValueReference>::type src_ref
- , std::size_t const hash_to_store, Cloner cloner)
- {
- //No need to check for duplicates and insert it in the first position
- //as this is an unordered container. So use minimal insertion code
- //std::size_t const hash_value = this->priv_stored_or_compute_hash(src_ref, store_hash_t());;
- //size_type const bucket_number = this->priv_hash_to_bucket(hash_value);
- bucket_type &cur_bucket = this->priv_bucket_pointer()[bucket_number];
- siterator const prev(cur_bucket.before_begin());
- //Just check if the cloned node is equal to the first inserted value in the new bucket
- //as equal src values were contiguous and they should be already inserted in the
- //destination bucket.
- bool const next_is_in_group = optimize_multikey && !cur_bucket.empty() &&
- this->priv_equal()( key_of_value()(src_ref)
- , key_of_value()(this->priv_value_from_slist_node((++siterator(prev)).pointed_node())));
- this->priv_insert_equal_after_find(*cloner(src_ref), bucket_number, hash_to_store, prev, next_is_in_group);
- }
-
- template <class MaybeConstHashtableImpl, class Cloner, class Disposer>
- void priv_structural_clone_from(MaybeConstHashtableImpl &src, Cloner cloner, Disposer disposer)
- {
- //First clone the first ones
- const size_type src_bucket_count = src.bucket_count();
- const size_type dst_bucket_count = this->bucket_count();
- const bucket_ptr src_buckets = src.priv_bucket_pointer();
- const bucket_ptr dst_buckets = this->priv_bucket_pointer();
- size_type constructed = 0;
- typedef node_cast_adaptor< detail::node_disposer<Disposer, value_traits, CircularSListAlgorithms>
- , slist_node_ptr, node_ptr > NodeDisposer;
- NodeDisposer node_disp(disposer, &this->priv_value_traits());
-
- detail::exception_array_disposer<bucket_type, NodeDisposer, size_type>
- rollback(dst_buckets[0], node_disp, constructed);
- //Now insert the remaining ones using the modulo trick
- for( //"constructed" already initialized
- ; constructed < src_bucket_count
- ; ++constructed){
- //Since incremental hashing can't be structurally copied, avoid hash_to_bucket_split
- const std::size_t new_n = detail::hash_to_bucket(constructed, dst_bucket_count, detail::bool_<power_2_buckets>());
- bucket_type &src_b = src_buckets[constructed];
- for( siterator b(src_b.begin()), e(src_b.end()); b != e; ++b){
- slist_node_ptr const n(b.pointed_node());
- typedef typename detail::if_c
- <detail::is_const<MaybeConstHashtableImpl>::value, const_reference, reference>::type reference_type;
- reference_type r = this->priv_value_from_slist_node(n);
- this->priv_clone_front_in_bucket<reference_type>
- (new_n, r, this->priv_stored_hash(n, store_hash_t()), cloner);
- }
- }
- this->priv_hasher() = src.priv_hasher();
- this->priv_equal() = src.priv_equal();
- rollback.release();
- this->priv_size_traits().set_size(src.priv_size_traits().get_size());
- this->priv_split_traits().set_size(dst_bucket_count);
- this->priv_insertion_update_cache(0u);
- this->priv_erasure_update_cache();
- }
-
- std::size_t priv_hash_to_bucket(std::size_t hash_value) const
- {
- return detail::hash_to_bucket_split<power_2_buckets, incremental>
- (hash_value, this->priv_bucket_traits().bucket_count(), this->priv_split_traits().get_size());
- }
-
- iterator priv_insert_equal_after_find(reference value, size_type bucket_num, std::size_t hash_value, siterator prev, bool const next_is_in_group)
- {
- //Now store hash if needed
- node_ptr n = pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(value));
- node_functions_t::store_hash(n, hash_value, store_hash_t());
- //Checks for some modes
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(n));
- //Shortcut to optimize_multikey cases
- group_functions_t::insert_in_group
- ( next_is_in_group ? detail::dcast_bucket_ptr<node>((++siterator(prev)).pointed_node()) : n
- , n, optimize_multikey_t());
- //Update cache and increment size if needed
- this->priv_insertion_update_cache(bucket_num);
- this->priv_size_traits().increment();
- //Insert the element in the bucket after it
- return iterator(bucket_type::s_insert_after(prev, *n), &this->get_bucket_value_traits());
- }
-
- template<class KeyType, class KeyHasher, class KeyEqual>
- siterator priv_find //In case it is not found previt is bucket.before_begin()
- ( const KeyType &key, KeyHasher hash_func
- , KeyEqual equal_func, size_type &bucket_number, std::size_t &h, siterator &previt) const
- {
- h = hash_func(key);
- return this->priv_find_with_hash(key, equal_func, bucket_number, h, previt);
- }
-
- template<class KeyType, class KeyEqual>
- bool priv_is_value_equal_to_key(const value_type &v, const std::size_t h, const KeyType &key, KeyEqual equal_func) const
- {
- (void)h;
- return (!compare_hash || this->priv_stored_or_compute_hash(v, store_hash_t()) == h) && equal_func(key, key_of_value()(v));
- }
-
- //return previous iterator to the next equal range group in case
- static siterator priv_last_in_group(const siterator &it_first_in_group)
- {
- return bucket_type::s_iterator_to
- (*group_functions_t::get_last_in_group
- (detail::dcast_bucket_ptr<node>(it_first_in_group.pointed_node()), optimize_multikey_t()));
- }
-
- template<class KeyType, class KeyEqual>
- siterator priv_find_with_hash //In case it is not found previt is bucket.before_begin()
- ( const KeyType &key, KeyEqual equal_func, size_type &bucket_number, const std::size_t h, siterator &previt) const
- {
- bucket_number = this->priv_hash_to_bucket(h);
- bucket_type &b = this->priv_bucket_pointer()[bucket_number];
- previt = b.before_begin();
- siterator it = previt;
- siterator const endit = b.end();
-
- while(++it != endit){
- if(this->priv_is_value_equal_to_key(this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func)){
- return it;
- }
- previt = it = (priv_last_in_group)(it);
- }
- previt = b.before_begin();
- return this->priv_invalid_local_it();
- }
-
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<siterator, siterator> priv_local_equal_range
- ( const KeyType &key
- , KeyHasher hash_func
- , KeyEqual equal_func
- , size_type &found_bucket
- , size_type &cnt) const
- {
- size_type internal_cnt = 0;
- //Let's see if the element is present
-
- siterator prev;
- size_type n_bucket;
- std::size_t h;
- std::pair<siterator, siterator> to_return
- ( this->priv_find(key, hash_func, equal_func, n_bucket, h, prev)
- , this->priv_invalid_local_it());
-
- if(to_return.first != to_return.second){
- found_bucket = n_bucket;
- //If it's present, find the first that it's not equal in
- //the same bucket
- bucket_type &b = this->priv_bucket_pointer()[n_bucket];
- siterator it = to_return.first;
- ++internal_cnt; //At least one is found
- if(optimize_multikey){
- to_return.second = ++(priv_last_in_group)(it);
- internal_cnt += boost::intrusive::iterator_distance(++it, to_return.second);
- }
- else{
- siterator const bend = b.end();
- while(++it != bend &&
- this->priv_is_value_equal_to_key(this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func)){
- ++internal_cnt;
- }
- to_return.second = it;
- }
- }
- cnt = internal_cnt;
- return to_return;
- }
-
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<siterator, siterator> priv_equal_range
- ( const KeyType &key
- , KeyHasher hash_func
- , KeyEqual equal_func) const
- {
- size_type n_bucket;
- size_type cnt;
-
- //Let's see if the element is present
- std::pair<siterator, siterator> to_return
- (this->priv_local_equal_range(key, hash_func, equal_func, n_bucket, cnt));
- //If not, find the next element as ".second" if ".second" local iterator
- //is not pointing to an element.
- bucket_ptr const bp = this->priv_bucket_pointer();
- if(to_return.first != to_return.second &&
- to_return.second == bp[n_bucket].end()){
- to_return.second = this->priv_invalid_local_it();
- ++n_bucket;
- for( const size_type max_bucket = this->bucket_count()
- ; n_bucket != max_bucket
- ; ++n_bucket){
- bucket_type &b = bp[n_bucket];
- if(!b.empty()){
- to_return.second = b.begin();
- break;
- }
- }
- }
- return to_return;
- }
-
- std::size_t priv_get_bucket_num(siterator it)
- { return this->priv_get_bucket_num_hash_dispatch(it, store_hash_t()); }
-
- std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::true_) //store_hash
- {
- return this->priv_hash_to_bucket
- (this->priv_stored_hash(it.pointed_node(), store_hash_t()));
- }
-
- std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::false_) //NO store_hash
- { return this->priv_get_bucket_num_no_hash_store(it, optimize_multikey_t()); }
-
- static siterator priv_get_previous(bucket_type &b, siterator i)
- { return bucket_plus_vtraits_t::priv_get_previous(b, i, optimize_multikey_t()); }
-
- /// @endcond
-};
-
-/// @cond
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template < class T
- , bool UniqueKeys
- , class PackedOptions
- >
-#else
-template <class T, bool UniqueKeys, class ...Options>
-#endif
-struct make_bucket_traits
-{
- //Real value traits must be calculated from options
- typedef typename detail::get_value_traits
- <T, typename PackedOptions::proto_value_traits>::type value_traits;
-
- typedef typename PackedOptions::bucket_traits specified_bucket_traits;
-
- //Real bucket traits must be calculated from options and calculated value_traits
- typedef typename detail::get_slist_impl
- <typename detail::reduced_slist_node_traits
- <typename value_traits::node_traits>::type
- >::type slist_impl;
-
- typedef typename
- detail::if_c< detail::is_same
- < specified_bucket_traits
- , default_bucket_traits
- >::value
- , detail::bucket_traits_impl<slist_impl>
- , specified_bucket_traits
- >::type type;
-};
-/// @endcond
-
-//! Helper metafunction to define a \c hashtable that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void
- , class O7 = void, class O8 = void
- , class O9 = void, class O10= void
- >
-#endif
-struct make_hashtable
-{
- /// @cond
- typedef typename pack_options
- < hashtable_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef typename make_bucket_traits
- <T, false, packed_options>::type bucket_traits;
-
- typedef hashtable_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::hash
- , typename packed_options::equal
- , bucket_traits
- , typename packed_options::size_type
- , (std::size_t(false)*hash_bool_flags::unique_keys_pos)
- |(std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
- |(std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
- |(std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
- |(std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
- |(std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
- > implementation_defined;
-
- /// @endcond
- typedef implementation_defined type;
-};
-
-#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
-#if defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
-#endif
-class hashtable
- : public make_hashtable<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_hashtable<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type Base;
- BOOST_MOVABLE_BUT_NOT_COPYABLE(hashtable)
-
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::bucket_ptr bucket_ptr;
- typedef typename Base::size_type size_type;
- typedef typename Base::hasher hasher;
- typedef typename Base::bucket_traits bucket_traits;
- typedef typename Base::key_equal key_equal;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
-
- BOOST_INTRUSIVE_FORCEINLINE explicit hashtable ( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b_traits, hash_func, equal_func, v_traits)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable(BOOST_RV_REF(hashtable) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE hashtable& operator=(BOOST_RV_REF(hashtable) x)
- { return static_cast<hashtable&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(const hashtable &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(hashtable) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_HASHTABLE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/linear_slist_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/linear_slist_algorithms.hpp
deleted file mode 100644
index 6c8e9b797c0..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/linear_slist_algorithms.hpp
+++ /dev/null
@@ -1,342 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/common_slist_algorithms.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <cstddef>
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! linear_slist_algorithms provides basic algorithms to manipulate nodes
-//! forming a linear singly linked list.
-//!
-//! linear_slist_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the linear list
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_next(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
-template<class NodeTraits>
-class linear_slist_algorithms
- /// @cond
- : public detail::common_slist_algorithms<NodeTraits>
- /// @endcond
-{
- /// @cond
- typedef detail::common_slist_algorithms<NodeTraits> base_t;
- /// @endcond
- public:
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
- typedef NodeTraits node_traits;
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Constructs an non-used list element, putting the next
- //! pointer to null:
- //! <tt>NodeTraits::get_next(this_node) == node_ptr()</tt>
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void init(const node_ptr & this_node);
-
- //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
- //! or it's a not inserted node:
- //! <tt>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static bool unique(const_node_ptr this_node);
-
- //! <b>Effects</b>: Returns true is "this_node" has the same state as if
- //! it was inited using "init(node_ptr)"
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static bool inited(const_node_ptr this_node);
-
- //! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
- //!
- //! <b>Effects</b>: Unlinks the next node of prev_node from the circular list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void unlink_after(const node_ptr & prev_node);
-
- //! <b>Requires</b>: prev_node and last_node must be in a circular list
- //! or be an empty circular list.
- //!
- //! <b>Effects</b>: Unlinks the range (prev_node, last_node) from the linear list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node);
-
- //! <b>Requires</b>: prev_node must be a node of a linear list.
- //!
- //! <b>Effects</b>: Links this_node after prev_node in the linear list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void link_after(const node_ptr & prev_node, const node_ptr & this_node);
-
- //! <b>Requires</b>: b and e must be nodes of the same linear list or an empty range.
- //! and p must be a node of a different linear list.
- //!
- //! <b>Effects</b>: Removes the nodes from (b, e] range from their linear list and inserts
- //! them after p in p's linear list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void transfer_after(const node_ptr & p, const node_ptr & b, const node_ptr & e);
-
- #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-
- //! <b>Effects</b>: Constructs an empty list, making this_node the only
- //! node of the circular list:
- //! <tt>NodeTraits::get_next(this_node) == this_node</tt>.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr & this_node)
- { NodeTraits::set_next(this_node, node_ptr ()); }
-
- //! <b>Requires</b>: this_node and prev_init_node must be in the same linear list.
- //!
- //! <b>Effects</b>: Returns the previous node of this_node in the linear list starting.
- //! the search from prev_init_node. The first node checked for equality
- //! is NodeTraits::get_next(prev_init_node).
- //!
- //! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
- //!
- //! <b>Throws</b>: Nothing.
- BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & prev_init_node, const node_ptr & this_node)
- { return base_t::get_previous_node(prev_init_node, this_node); }
-
- //! <b>Requires</b>: this_node must be in a linear list or be an empty linear list.
- //!
- //! <b>Effects</b>: Returns the number of nodes in a linear list. If the linear list
- //! is empty, returns 1.
- //!
- //! <b>Complexity</b>: Linear
- //!
- //! <b>Throws</b>: Nothing.
- static std::size_t count(const const_node_ptr & this_node)
- {
- std::size_t result = 0;
- const_node_ptr p = this_node;
- do{
- p = NodeTraits::get_next(p);
- ++result;
- } while (p);
- return result;
- }
-
- //! <b>Requires</b>: this_node and other_node must be nodes inserted
- //! in linear lists or be empty linear lists.
- //!
- //! <b>Effects</b>: Moves all the nodes previously chained after this_node after other_node
- //! and vice-versa.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- static void swap_trailing_nodes(const node_ptr & this_node, const node_ptr & other_node)
- {
- node_ptr this_nxt = NodeTraits::get_next(this_node);
- node_ptr other_nxt = NodeTraits::get_next(other_node);
- NodeTraits::set_next(this_node, other_nxt);
- NodeTraits::set_next(other_node, this_nxt);
- }
-
- //! <b>Effects</b>: Reverses the order of elements in the list.
- //!
- //! <b>Returns</b>: The new first node of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: This function is linear to the contained elements.
- static node_ptr reverse(const node_ptr & p)
- {
- if(!p) return node_ptr();
- node_ptr i = NodeTraits::get_next(p);
- node_ptr first(p);
- while(i){
- node_ptr nxti(NodeTraits::get_next(i));
- base_t::unlink_after(p);
- NodeTraits::set_next(i, first);
- first = i;
- i = nxti;
- }
- return first;
- }
-
- //! <b>Effects</b>: Moves the first n nodes starting at p to the end of the list.
- //!
- //! <b>Returns</b>: A pair containing the new first and last node of the list or
- //! if there has been any movement, a null pair if n leads to no movement.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
- static std::pair<node_ptr, node_ptr> move_first_n_backwards(const node_ptr & p, std::size_t n)
- {
- std::pair<node_ptr, node_ptr> ret;
- //Null shift, or count() == 0 or 1, nothing to do
- if(!n || !p || !NodeTraits::get_next(p)){
- return ret;
- }
-
- node_ptr first = p;
- bool end_found = false;
- node_ptr new_last = node_ptr();
- node_ptr old_last = node_ptr();
-
- //Now find the new last node according to the shift count.
- //If we find 0 before finding the new last node
- //unlink p, shortcut the search now that we know the size of the list
- //and continue.
- for(std::size_t i = 1; i <= n; ++i){
- new_last = first;
- first = NodeTraits::get_next(first);
- if(first == node_ptr()){
- //Shortcut the shift with the modulo of the size of the list
- n %= i;
- if(!n) return ret;
- old_last = new_last;
- i = 0;
- //Unlink p and continue the new first node search
- first = p;
- //unlink_after(new_last);
- end_found = true;
- }
- }
-
- //If the p has not been found in the previous loop, find it
- //starting in the new first node and unlink it
- if(!end_found){
- old_last = base_t::get_previous_node(first, node_ptr());
- }
-
- //Now link p after the new last node
- NodeTraits::set_next(old_last, p);
- NodeTraits::set_next(new_last, node_ptr());
- ret.first = first;
- ret.second = new_last;
- return ret;
- }
-
- //! <b>Effects</b>: Moves the first n nodes starting at p to the beginning of the list.
- //!
- //! <b>Returns</b>: A pair containing the new first and last node of the list or
- //! if there has been any movement, a null pair if n leads to no movement.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
- static std::pair<node_ptr, node_ptr> move_first_n_forward(const node_ptr & p, std::size_t n)
- {
- std::pair<node_ptr, node_ptr> ret;
- //Null shift, or count() == 0 or 1, nothing to do
- if(!n || !p || !NodeTraits::get_next(p))
- return ret;
-
- node_ptr first = p;
-
- //Iterate until p is found to know where the current last node is.
- //If the shift count is less than the size of the list, we can also obtain
- //the position of the new last node after the shift.
- node_ptr old_last(first), next_to_it, new_last(p);
- std::size_t distance = 1;
- while(!!(next_to_it = node_traits::get_next(old_last))){
- if(distance++ > n)
- new_last = node_traits::get_next(new_last);
- old_last = next_to_it;
- }
- //If the shift was bigger or equal than the size, obtain the equivalent
- //forward shifts and find the new last node.
- if(distance <= n){
- //Now find the equivalent forward shifts.
- //Shortcut the shift with the modulo of the size of the list
- std::size_t new_before_last_pos = (distance - (n % distance))% distance;
- //If the shift is a multiple of the size there is nothing to do
- if(!new_before_last_pos)
- return ret;
-
- for( new_last = p
- ; --new_before_last_pos
- ; new_last = node_traits::get_next(new_last)){
- //empty
- }
- }
-
- //Get the first new node
- node_ptr new_first(node_traits::get_next(new_last));
- //Now put the old beginning after the old end
- NodeTraits::set_next(old_last, p);
- NodeTraits::set_next(new_last, node_ptr());
- ret.first = new_first;
- ret.second = new_last;
- return ret;
- }
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<LinearSListAlgorithms, NodeTraits>
-{
- typedef linear_slist_algorithms<NodeTraits> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/rbtree_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/rbtree_algorithms.hpp
deleted file mode 100644
index 6a7c563cf08..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/rbtree_algorithms.hpp
+++ /dev/null
@@ -1,622 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2014.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-//
-// The tree destruction algorithm is based on Julienne Walker and The EC Team code:
-//
-// This code is in the public domain. Anyone may use it or change it in any way that
-// they see fit. The author assumes no responsibility for damages incurred through
-// use of the original code or any variations thereof.
-//
-// It is requested, but not required, that due credit is given to the original author
-// and anyone who has modified the code through a header comment, such as this one.
-
-#ifndef BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <cstddef>
-
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/intrusive/bstree_algorithms.hpp>
-#include <boost/intrusive/detail/ebo_functor_holder.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-template<class NodeTraits, class F>
-struct rbtree_node_cloner
- //Use public inheritance to avoid MSVC bugs with closures
- : public detail::ebo_functor_holder<F>
-{
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef detail::ebo_functor_holder<F> base_t;
-
- explicit rbtree_node_cloner(F f)
- : base_t(f)
- {}
-
- node_ptr operator()(const node_ptr & p)
- {
- node_ptr n = base_t::get()(p);
- NodeTraits::set_color(n, NodeTraits::get_color(p));
- return n;
- }
-};
-
-namespace detail {
-
-template<class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct rbtree_node_checker
- : public bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> base_checker_t;
- typedef ValueTraits value_traits;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::const_node_ptr const_node_ptr;
- typedef typename node_traits::node_ptr node_ptr;
-
- struct return_type
- : public base_checker_t::return_type
- {
- return_type() : black_count_(0) {}
- std::size_t black_count_;
- };
-
- rbtree_node_checker(const NodePtrCompare& comp, ExtraChecker extra_checker)
- : base_checker_t(comp, extra_checker)
- {}
-
- void operator () (const const_node_ptr& p,
- const return_type& check_return_left, const return_type& check_return_right,
- return_type& check_return)
- {
-
- if (node_traits::get_color(p) == node_traits::red()){
- //Red nodes have black children
- const node_ptr p_left(node_traits::get_left(p)); (void)p_left;
- const node_ptr p_right(node_traits::get_right(p)); (void)p_right;
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!p_left || node_traits::get_color(p_left) == node_traits::black());
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!p_right || node_traits::get_color(p_right) == node_traits::black());
- //Red node can't be root
- BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_parent(node_traits::get_parent(p)) != p);
- }
- //Every path to p contains the same number of black nodes
- const std::size_t l_black_count = check_return_left.black_count_;
- BOOST_INTRUSIVE_INVARIANT_ASSERT(l_black_count == check_return_right.black_count_);
- check_return.black_count_ = l_black_count +
- static_cast<std::size_t>(node_traits::get_color(p) == node_traits::black());
- base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
- }
-};
-
-} // namespace detail
-
-#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-//! rbtree_algorithms provides basic algorithms to manipulate
-//! nodes forming a red-black tree. The insertion and deletion algorithms are
-//! based on those in Cormen, Leiserson, and Rivest, Introduction to Algorithms
-//! (MIT Press, 1990), except that
-//!
-//! (1) the header node is maintained with links not only to the root
-//! but also to the leftmost node of the tree, to enable constant time
-//! begin(), and to the rightmost node of the tree, to enable linear time
-//! performance when used with the generic set algorithms (set_union,
-//! etc.);
-//!
-//! (2) when a node being deleted has two children its successor node is
-//! relinked into its place, rather than copied, so that the only
-//! pointers invalidated are those referring to the deleted node.
-//!
-//! rbtree_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the binary search tree
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <tt>color</tt>: The type that can store the color of a node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
-//!
-//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
-//!
-//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
-//!
-//! <tt>static color get_color(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_color(node_ptr n, color c);</tt>
-//!
-//! <tt>static color black();</tt>
-//!
-//! <tt>static color red();</tt>
-template<class NodeTraits>
-class rbtree_algorithms
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_algorithms<NodeTraits>
- #endif
-{
- public:
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
- typedef typename NodeTraits::color color;
-
- /// @cond
- private:
-
- typedef bstree_algorithms<NodeTraits> bstree_algo;
-
- /// @endcond
-
- public:
-
- //! This type is the information that will be
- //! filled by insert_unique_check
- typedef typename bstree_algo::insert_commit_data insert_commit_data;
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
- static node_ptr get_header(const const_node_ptr & n);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
- static node_ptr begin_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
- static node_ptr end_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
- static void swap_tree(const node_ptr & header1, const node_ptr & header2);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & node2)
- {
- if(node1 == node2)
- return;
-
- node_ptr header1(bstree_algo::get_header(node1)), header2(bstree_algo::get_header(node2));
- swap_nodes(node1, header1, node2, header2);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&,const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & header1, const node_ptr & node2, const node_ptr & header2)
- {
- if(node1 == node2) return;
-
- bstree_algo::swap_nodes(node1, header1, node2, header2);
- //Swap color
- color c = NodeTraits::get_color(node1);
- NodeTraits::set_color(node1, NodeTraits::get_color(node2));
- NodeTraits::set_color(node2, c);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node)
- {
- if(node_to_be_replaced == new_node)
- return;
- replace_node(node_to_be_replaced, bstree_algo::get_header(node_to_be_replaced), new_node);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & header, const node_ptr & new_node)
- {
- bstree_algo::replace_node(node_to_be_replaced, header, new_node);
- NodeTraits::set_color(new_node, NodeTraits::get_color(node_to_be_replaced));
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(const node_ptr&)
- static void unlink(const node_ptr& node)
- {
- node_ptr x = NodeTraits::get_parent(node);
- if(x){
- while(!is_header(x))
- x = NodeTraits::get_parent(x);
- erase(x, node);
- }
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
- static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
- static bool unique(const const_node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
- static std::size_t size(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
- static node_ptr next_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
- static node_ptr prev_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init(const node_ptr&)
- static void init(const node_ptr & node);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(const node_ptr&)
- static void init_header(const node_ptr & header)
- {
- bstree_algo::init_header(header);
- NodeTraits::set_color(header, NodeTraits::red());
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::erase(const node_ptr&,const node_ptr&)
- static node_ptr erase(const node_ptr & header, const node_ptr & z)
- {
- typename bstree_algo::data_for_rebalance info;
- bstree_algo::erase(header, z, info);
- rebalance_after_erasure(header, z, info);
- return z;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
- template<class NodePtrCompare>
- static bool transfer_unique
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
- {
- typename bstree_algo::data_for_rebalance info;
- bool const transferred = bstree_algo::transfer_unique(header1, comp, header2, z, info);
- if(transferred){
- rebalance_after_erasure(header2, z, info);
- rebalance_after_insertion(header1, z);
- }
- return transferred;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
- template<class NodePtrCompare>
- static void transfer_equal
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
- {
- typename bstree_algo::data_for_rebalance info;
- bstree_algo::transfer_equal(header1, comp, header2, z, info);
- rebalance_after_erasure(header2, z, info);
- rebalance_after_insertion(header1, z);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- static void clone
- (const const_node_ptr & source_header, const node_ptr & target_header, Cloner cloner, Disposer disposer)
- {
- rbtree_node_cloner<NodeTraits, Cloner> new_cloner(cloner);
- bstree_algo::clone(source_header, target_header, new_cloner, disposer);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
- template<class Disposer>
- static void clear_and_dispose(const node_ptr & header, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr find
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> equal_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> bounded_range
- (const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
- , bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare>
- static node_ptr insert_equal_upper_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp)
- {
- bstree_algo::insert_equal_upper_bound(h, new_node, comp);
- rebalance_after_insertion(h, new_node);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_lower_bound(const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare>
- static node_ptr insert_equal_lower_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp)
- {
- bstree_algo::insert_equal_lower_bound(h, new_node, comp);
- rebalance_after_insertion(h, new_node);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal(const node_ptr&,const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare>
- static node_ptr insert_equal
- (const node_ptr & header, const node_ptr & hint, const node_ptr & new_node, NodePtrCompare comp)
- {
- bstree_algo::insert_equal(header, hint, new_node, comp);
- rebalance_after_insertion(header, new_node);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(const node_ptr&,const node_ptr&,const node_ptr&)
- static node_ptr insert_before
- (const node_ptr & header, const node_ptr & pos, const node_ptr & new_node)
- {
- bstree_algo::insert_before(header, pos, new_node);
- rebalance_after_insertion(header, new_node);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::push_back(const node_ptr&,const node_ptr&)
- static void push_back(const node_ptr & header, const node_ptr & new_node)
- {
- bstree_algo::push_back(header, new_node);
- rebalance_after_insertion(header, new_node);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::push_front(const node_ptr&,const node_ptr&)
- static void push_front(const node_ptr & header, const node_ptr & new_node)
- {
- bstree_algo::push_front(header, new_node);
- rebalance_after_insertion(header, new_node);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const node_ptr &hint, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(const node_ptr&,const node_ptr&,const insert_commit_data&)
- static void insert_unique_commit
- (const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data)
- {
- bstree_algo::insert_unique_commit(header, new_value, commit_data);
- rebalance_after_insertion(header, new_value);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
- static bool is_header(const const_node_ptr & p)
- {
- return NodeTraits::get_color(p) == NodeTraits::red() &&
- bstree_algo::is_header(p);
- }
-
- /// @cond
- private:
-
- static void rebalance_after_erasure
- ( const node_ptr & header, const node_ptr &z, const typename bstree_algo::data_for_rebalance &info)
- {
- color new_z_color;
- if(info.y != z){
- new_z_color = NodeTraits::get_color(info.y);
- NodeTraits::set_color(info.y, NodeTraits::get_color(z));
- }
- else{
- new_z_color = NodeTraits::get_color(z);
- }
- //Rebalance rbtree if needed
- if(new_z_color != NodeTraits::red()){
- rebalance_after_erasure_restore_invariants(header, info.x, info.x_parent);
- }
- }
-
- static void rebalance_after_erasure_restore_invariants(const node_ptr & header, node_ptr x, node_ptr x_parent)
- {
- while(1){
- if(x_parent == header || (x && NodeTraits::get_color(x) != NodeTraits::black())){
- break;
- }
- //Don't cache x_is_leftchild or similar because x can be null and
- //equal to both x_parent_left and x_parent_right
- const node_ptr x_parent_left(NodeTraits::get_left(x_parent));
- if(x == x_parent_left){ //x is left child
- node_ptr w = NodeTraits::get_right(x_parent);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
- if(NodeTraits::get_color(w) == NodeTraits::red()){
- NodeTraits::set_color(w, NodeTraits::black());
- NodeTraits::set_color(x_parent, NodeTraits::red());
- bstree_algo::rotate_left(x_parent, w, NodeTraits::get_parent(x_parent), header);
- w = NodeTraits::get_right(x_parent);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
- }
- node_ptr const w_left (NodeTraits::get_left(w));
- node_ptr const w_right(NodeTraits::get_right(w));
- if((!w_left || NodeTraits::get_color(w_left) == NodeTraits::black()) &&
- (!w_right || NodeTraits::get_color(w_right) == NodeTraits::black())){
- NodeTraits::set_color(w, NodeTraits::red());
- x = x_parent;
- x_parent = NodeTraits::get_parent(x_parent);
- }
- else {
- if(!w_right || NodeTraits::get_color(w_right) == NodeTraits::black()){
- NodeTraits::set_color(w_left, NodeTraits::black());
- NodeTraits::set_color(w, NodeTraits::red());
- bstree_algo::rotate_right(w, w_left, NodeTraits::get_parent(w), header);
- w = NodeTraits::get_right(x_parent);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
- }
- NodeTraits::set_color(w, NodeTraits::get_color(x_parent));
- NodeTraits::set_color(x_parent, NodeTraits::black());
- const node_ptr new_wright(NodeTraits::get_right(w));
- if(new_wright)
- NodeTraits::set_color(new_wright, NodeTraits::black());
- bstree_algo::rotate_left(x_parent, NodeTraits::get_right(x_parent), NodeTraits::get_parent(x_parent), header);
- break;
- }
- }
- else {
- // same as above, with right_ <-> left_.
- node_ptr w = x_parent_left;
- if(NodeTraits::get_color(w) == NodeTraits::red()){
- NodeTraits::set_color(w, NodeTraits::black());
- NodeTraits::set_color(x_parent, NodeTraits::red());
- bstree_algo::rotate_right(x_parent, w, NodeTraits::get_parent(x_parent), header);
- w = NodeTraits::get_left(x_parent);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
- }
- node_ptr const w_left (NodeTraits::get_left(w));
- node_ptr const w_right(NodeTraits::get_right(w));
- if((!w_right || NodeTraits::get_color(w_right) == NodeTraits::black()) &&
- (!w_left || NodeTraits::get_color(w_left) == NodeTraits::black())){
- NodeTraits::set_color(w, NodeTraits::red());
- x = x_parent;
- x_parent = NodeTraits::get_parent(x_parent);
- }
- else {
- if(!w_left || NodeTraits::get_color(w_left) == NodeTraits::black()){
- NodeTraits::set_color(w_right, NodeTraits::black());
- NodeTraits::set_color(w, NodeTraits::red());
- bstree_algo::rotate_left(w, w_right, NodeTraits::get_parent(w), header);
- w = NodeTraits::get_left(x_parent);
- BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
- }
- NodeTraits::set_color(w, NodeTraits::get_color(x_parent));
- NodeTraits::set_color(x_parent, NodeTraits::black());
- const node_ptr new_wleft(NodeTraits::get_left(w));
- if(new_wleft)
- NodeTraits::set_color(new_wleft, NodeTraits::black());
- bstree_algo::rotate_right(x_parent, NodeTraits::get_left(x_parent), NodeTraits::get_parent(x_parent), header);
- break;
- }
- }
- }
- if(x)
- NodeTraits::set_color(x, NodeTraits::black());
- }
-
- static void rebalance_after_insertion(const node_ptr & header, node_ptr p)
- {
- NodeTraits::set_color(p, NodeTraits::red());
- while(1){
- node_ptr p_parent(NodeTraits::get_parent(p));
- const node_ptr p_grandparent(NodeTraits::get_parent(p_parent));
- if(p_parent == header || NodeTraits::get_color(p_parent) == NodeTraits::black() || p_grandparent == header){
- break;
- }
-
- NodeTraits::set_color(p_grandparent, NodeTraits::red());
- node_ptr const p_grandparent_left (NodeTraits::get_left (p_grandparent));
- bool const p_parent_is_left_child = p_parent == p_grandparent_left;
- node_ptr const x(p_parent_is_left_child ? NodeTraits::get_right(p_grandparent) : p_grandparent_left);
-
- if(x && NodeTraits::get_color(x) == NodeTraits::red()){
- NodeTraits::set_color(x, NodeTraits::black());
- NodeTraits::set_color(p_parent, NodeTraits::black());
- p = p_grandparent;
- }
- else{ //Final step
- const bool p_is_left_child(NodeTraits::get_left(p_parent) == p);
- if(p_parent_is_left_child){ //p_parent is left child
- if(!p_is_left_child){ //p is right child
- bstree_algo::rotate_left_no_parent_fix(p_parent, p);
- //No need to link p and p_grandparent:
- // [NodeTraits::set_parent(p, p_grandparent) + NodeTraits::set_left(p_grandparent, p)]
- //as p_grandparent is not the header, another rotation is coming and p_parent
- //will be the left child of p_grandparent
- p_parent = p;
- }
- bstree_algo::rotate_right(p_grandparent, p_parent, NodeTraits::get_parent(p_grandparent), header);
- }
- else{ //p_parent is right child
- if(p_is_left_child){ //p is left child
- bstree_algo::rotate_right_no_parent_fix(p_parent, p);
- //No need to link p and p_grandparent:
- // [NodeTraits::set_parent(p, p_grandparent) + NodeTraits::set_right(p_grandparent, p)]
- //as p_grandparent is not the header, another rotation is coming and p_parent
- //will be the right child of p_grandparent
- p_parent = p;
- }
- bstree_algo::rotate_left(p_grandparent, p_parent, NodeTraits::get_parent(p_grandparent), header);
- }
- NodeTraits::set_color(p_parent, NodeTraits::black());
- break;
- }
- }
- NodeTraits::set_color(NodeTraits::get_parent(header), NodeTraits::black());
- }
- /// @endcond
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<RbTreeAlgorithms, NodeTraits>
-{
- typedef rbtree_algorithms<NodeTraits> type;
-};
-
-template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct get_node_checker<RbTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef detail::rbtree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/sgtree_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/sgtree_algorithms.hpp
deleted file mode 100644
index e6002a73b03..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/sgtree_algorithms.hpp
+++ /dev/null
@@ -1,420 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-//
-// Scapegoat tree algorithms are taken from the paper titled:
-// "Scapegoat Trees" by Igal Galperin Ronald L. Rivest.
-//
-/////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <cstddef>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/intrusive/bstree_algorithms.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! sgtree_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the binary search tree
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
-//!
-//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
-//!
-//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
-template<class NodeTraits>
-class sgtree_algorithms
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_algorithms<NodeTraits>
- #endif
-{
- public:
- typedef typename NodeTraits::node node;
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
-
- /// @cond
- private:
-
- typedef bstree_algorithms<NodeTraits> bstree_algo;
-
- /// @endcond
-
- public:
- //! This type is the information that will be
- //! filled by insert_unique_check
- struct insert_commit_data
- : bstree_algo::insert_commit_data
- {
- std::size_t depth;
- };
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
- static node_ptr get_header(const const_node_ptr & n);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
- static node_ptr begin_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
- static node_ptr end_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
- static void swap_tree(const node_ptr & header1, const node_ptr & header2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & node2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&,const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & header1, const node_ptr & node2, const node_ptr & header2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & header, const node_ptr & new_node);
-
- //Unlink is not possible since tree metadata is needed to update the tree
- //!static void unlink(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
- static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
- static bool unique(const const_node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
- static std::size_t size(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
- static node_ptr next_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
- static node_ptr prev_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init(const node_ptr&)
- static void init(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(const node_ptr&)
- static void init_header(const node_ptr & header);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::erase(const node_ptr&,const node_ptr&)
- template<class AlphaByMaxSize>
- static node_ptr erase(const node_ptr & header, const node_ptr & z, std::size_t tree_size, std::size_t &max_tree_size, AlphaByMaxSize alpha_by_maxsize)
- {
- bstree_algo::erase(header, z);
- --tree_size;
- if (tree_size > 0 &&
- tree_size < alpha_by_maxsize(max_tree_size)){
- bstree_algo::rebalance(header);
- max_tree_size = tree_size;
- }
- return z;
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- static void clone
- (const const_node_ptr & source_header, const node_ptr & target_header, Cloner cloner, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
- template<class Disposer>
- static void clear_and_dispose(const node_ptr & header, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr find
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> equal_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> bounded_range
- (const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
- , bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare, class H_Alpha>
- static node_ptr insert_equal_upper_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp
- ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- {
- std::size_t depth;
- bstree_algo::insert_equal_upper_bound(h, new_node, comp, &depth);
- rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_lower_bound(const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare, class H_Alpha>
- static node_ptr insert_equal_lower_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp
- ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- {
- std::size_t depth;
- bstree_algo::insert_equal_lower_bound(h, new_node, comp, &depth);
- rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal(const node_ptr&,const node_ptr&,const node_ptr&,NodePtrCompare)
- template<class NodePtrCompare, class H_Alpha>
- static node_ptr insert_equal
- (const node_ptr & header, const node_ptr & hint, const node_ptr & new_node, NodePtrCompare comp
- ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- {
- std::size_t depth;
- bstree_algo::insert_equal(header, hint, new_node, comp, &depth);
- rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(const node_ptr&,const node_ptr&,const node_ptr&)
- template<class H_Alpha>
- static node_ptr insert_before
- (const node_ptr & header, const node_ptr & pos, const node_ptr & new_node
- ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- {
- std::size_t depth;
- bstree_algo::insert_before(header, pos, new_node, &depth);
- rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::push_back(const node_ptr&,const node_ptr&)
- template<class H_Alpha>
- static void push_back(const node_ptr & header, const node_ptr & new_node
- ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- {
- std::size_t depth;
- bstree_algo::push_back(header, new_node, &depth);
- rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::push_front(const node_ptr&,const node_ptr&)
- template<class H_Alpha>
- static void push_front(const node_ptr & header, const node_ptr & new_node
- ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- {
- std::size_t depth;
- bstree_algo::push_front(header, new_node, &depth);
- rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
- {
- std::size_t depth;
- std::pair<node_ptr, bool> ret =
- bstree_algo::insert_unique_check(header, key, comp, commit_data, &depth);
- commit_data.depth = depth;
- return ret;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const node_ptr &hint, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
- {
- std::size_t depth;
- std::pair<node_ptr, bool> ret =
- bstree_algo::insert_unique_check
- (header, hint, key, comp, commit_data, &depth);
- commit_data.depth = depth;
- return ret;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(const node_ptr&,const node_ptr&,const insert_commit_data&)
- template<class H_Alpha>
- BOOST_INTRUSIVE_FORCEINLINE static void insert_unique_commit
- (const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data
- ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- { return insert_commit(header, new_value, commit_data, tree_size, h_alpha, max_tree_size); }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
- template<class NodePtrCompare, class H_Alpha, class AlphaByMaxSize>
- static bool transfer_unique
- ( const node_ptr & header1, NodePtrCompare comp, std::size_t tree1_size, std::size_t &max_tree1_size
- , const node_ptr &header2, const node_ptr & z, std::size_t tree2_size, std::size_t &max_tree2_size
- ,H_Alpha h_alpha, AlphaByMaxSize alpha_by_maxsize)
- {
- insert_commit_data commit_data;
- bool const transferable = insert_unique_check(header1, z, comp, commit_data).second;
- if(transferable){
- erase(header2, z, tree2_size, max_tree2_size, alpha_by_maxsize);
- insert_commit(header1, z, commit_data, tree1_size, h_alpha, max_tree1_size);
- }
- return transferable;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
- template<class NodePtrCompare, class H_Alpha, class AlphaByMaxSize>
- static void transfer_equal
- ( const node_ptr & header1, NodePtrCompare comp, std::size_t tree1_size, std::size_t &max_tree1_size
- , const node_ptr &header2, const node_ptr & z, std::size_t tree2_size, std::size_t &max_tree2_size
- ,H_Alpha h_alpha, AlphaByMaxSize alpha_by_maxsize)
- {
- insert_commit_data commit_data;
- insert_equal_upper_bound_check(header1, z, comp, commit_data);
- erase(header2, z, tree2_size, max_tree2_size, alpha_by_maxsize);
- insert_commit(header1, z, commit_data, tree1_size, h_alpha, max_tree1_size);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
- static bool is_header(const const_node_ptr & p);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
- static void rebalance(const node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::rebalance_subtree
- static node_ptr rebalance_subtree(const node_ptr & old_root)
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- /// @cond
- private:
-
- template<class KeyType, class KeyNodePtrCompare>
- static void insert_equal_upper_bound_check
- (const node_ptr & header, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
- {
- std::size_t depth;
- bstree_algo::insert_equal_upper_bound_check(header, key, comp, commit_data, &depth);
- commit_data.depth = depth;
- }
-
- template<class H_Alpha>
- static void insert_commit
- (const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data
- ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- {
- bstree_algo::insert_unique_commit(header, new_value, commit_data);
- rebalance_after_insertion(new_value, commit_data.depth, tree_size+1, h_alpha, max_tree_size);
- }
-
- template<class H_Alpha>
- static void rebalance_after_insertion
- (const node_ptr &x, std::size_t depth
- , std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
- {
- if(tree_size > max_tree_size)
- max_tree_size = tree_size;
-
- if(tree_size > 2 && //Nothing to do with only the root
- //Check if the root node is unbalanced
- //Scapegoat paper depth counts root depth as zero and "depth" counts root as 1,
- //but since "depth" is the depth of the ancestor of x, i == depth
- depth > h_alpha(tree_size)){
-
- //Find the first non height-balanced node
- //as described in the section 4.2 of the paper.
- //This method is the alternative method described
- //in the paper. Authors claim that this method
- //may tend to yield more balanced trees on the average
- //than the weight balanced method.
- node_ptr s = x;
- std::size_t size = 1;
- for(std::size_t ancestor = 1; ancestor != depth; ++ancestor){
- const node_ptr s_parent = NodeTraits::get_parent(s);
- const node_ptr s_parent_left = NodeTraits::get_left(s_parent);
- //Obtain parent's size (previous size + parent + sibling tree)
- const node_ptr s_sibling = s_parent_left == s ? NodeTraits::get_right(s_parent) : s_parent_left;
- size += 1 + bstree_algo::subtree_size(s_sibling);
- s = s_parent;
- if(ancestor > h_alpha(size)){ //is 's' scapegoat?
- bstree_algo::rebalance_subtree(s);
- return;
- }
- }
- //The whole tree must be rebuilt
- max_tree_size = tree_size;
- bstree_algo::rebalance_subtree(NodeTraits::get_parent(s));
- }
- }
- /// @endcond
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<SgTreeAlgorithms, NodeTraits>
-{
- typedef sgtree_algorithms<NodeTraits> type;
-};
-
-template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct get_node_checker<SgTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/slist.hpp b/src/third_party/boost-1.68.0/boost/intrusive/slist.hpp
deleted file mode 100644
index 1f7ace18422..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/slist.hpp
+++ /dev/null
@@ -1,2254 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_SLIST_HPP
-#define BOOST_INTRUSIVE_SLIST_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/slist_hook.hpp>
-#include <boost/intrusive/circular_slist_algorithms.hpp>
-#include <boost/intrusive/linear_slist_algorithms.hpp>
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/link_mode.hpp>
-#include <boost/intrusive/detail/get_value_traits.hpp>
-#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
-#include <boost/intrusive/detail/default_header_holder.hpp>
-#include <boost/intrusive/detail/uncast.hpp>
-#include <boost/intrusive/detail/mpl.hpp>
-#include <boost/intrusive/detail/iterator.hpp>
-#include <boost/intrusive/detail/slist_iterator.hpp>
-#include <boost/intrusive/detail/array_initializer.hpp>
-#include <boost/intrusive/detail/exception_disposer.hpp>
-#include <boost/intrusive/detail/equal_to_value.hpp>
-#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
-#include <boost/intrusive/detail/simple_disposers.hpp>
-#include <boost/intrusive/detail/size_holder.hpp>
-#include <boost/intrusive/detail/algorithm.hpp>
-
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//std::less
-#include <cstddef> //std::size_t
-#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-template<class HeaderHolder, class NodePtr, bool>
-struct header_holder_plus_last
-{
- HeaderHolder header_holder_;
- NodePtr last_;
-};
-
-template<class HeaderHolder, class NodePtr>
-struct header_holder_plus_last<HeaderHolder, NodePtr, false>
-{
- HeaderHolder header_holder_;
-};
-
-struct default_slist_hook_applier
-{ template <class T> struct apply{ typedef typename T::default_slist_hook type; }; };
-
-template<>
-struct is_default_hook_tag<default_slist_hook_applier>
-{ static const bool value = true; };
-
-struct slist_defaults
-{
- typedef default_slist_hook_applier proto_value_traits;
- static const bool constant_time_size = true;
- static const bool linear = false;
- typedef std::size_t size_type;
- static const bool cache_last = false;
- typedef void header_holder_type;
-};
-
-struct slist_bool_flags
-{
- static const std::size_t linear_pos = 1u;
- static const std::size_t constant_time_size_pos = 2u;
- static const std::size_t cache_last_pos = 4u;
-};
-
-
-/// @endcond
-
-//! The class template slist is an intrusive container, that encapsulates
-//! a singly-linked list. You can use such a list to squeeze the last bit
-//! of performance from your application. Unfortunately, the little gains
-//! come with some huge drawbacks. A lot of member functions can't be
-//! implemented as efficiently as for standard containers. To overcome
-//! this limitation some other member functions with rather unusual semantics
-//! have to be introduced.
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>,
-//! \c linear<> and \c cache_last<>.
-//!
-//! The iterators of slist are forward iterators. slist provides a static
-//! function called "previous" to compute the previous iterator of a given iterator.
-//! This function has linear complexity. To improve the usability esp. with
-//! the '*_after' functions, ++end() == begin() and previous(begin()) == end()
-//! are defined. An new special function "before_begin()" is defined, which returns
-//! an iterator that points one less the beginning of the list: ++before_begin() == begin()
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class SizeType, std::size_t BoolFlags, typename HeaderHolder>
-#endif
-class slist_impl
-{
- //Public typedefs
- public:
- typedef ValueTraits value_traits;
- typedef typename value_traits::pointer pointer;
- typedef typename value_traits::const_pointer const_pointer;
- typedef typename pointer_traits<pointer>::element_type value_type;
- typedef typename pointer_traits<pointer>::reference reference;
- typedef typename pointer_traits<const_pointer>::reference const_reference;
- typedef typename pointer_traits<pointer>::difference_type difference_type;
- typedef SizeType size_type;
- typedef slist_iterator<value_traits, false> iterator;
- typedef slist_iterator<value_traits, true> const_iterator;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::node node;
- typedef typename node_traits::node_ptr node_ptr;
- typedef typename node_traits::const_node_ptr const_node_ptr;
- typedef typename detail::get_header_holder_type
- < value_traits, HeaderHolder >::type header_holder_type;
-
- static const bool constant_time_size = 0 != (BoolFlags & slist_bool_flags::constant_time_size_pos);
- static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
- static const bool linear = 0 != (BoolFlags & slist_bool_flags::linear_pos);
- static const bool cache_last = 0 != (BoolFlags & slist_bool_flags::cache_last_pos);
- static const bool has_container_from_iterator =
- detail::is_same< header_holder_type, detail::default_header_holder< node_traits > >::value;
-
- typedef typename detail::if_c
- < linear
- , linear_slist_algorithms<node_traits>
- , circular_slist_algorithms<node_traits>
- >::type node_algorithms;
-
- /// @cond
- private:
- typedef detail::size_holder<constant_time_size, size_type> size_traits;
-
- //noncopyable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(slist_impl)
-
- static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
-
- //Constant-time size is incompatible with auto-unlink hooks!
- BOOST_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
- //Linear singly linked lists are incompatible with auto-unlink hooks!
- BOOST_STATIC_ASSERT(!(linear && ((int)value_traits::link_mode == (int)auto_unlink)));
- //A list with cached last node is incompatible with auto-unlink hooks!
- BOOST_STATIC_ASSERT(!(cache_last && ((int)value_traits::link_mode == (int)auto_unlink)));
-
- node_ptr get_end_node()
- { return node_ptr(linear ? node_ptr() : this->get_root_node()); }
-
- const_node_ptr get_end_node() const
- {
- return const_node_ptr
- (linear ? const_node_ptr() : this->get_root_node()); }
-
- node_ptr get_root_node()
- { return data_.root_plus_size_.header_holder_.get_node(); }
-
- const_node_ptr get_root_node() const
- { return data_.root_plus_size_.header_holder_.get_node(); }
-
- node_ptr get_last_node()
- { return this->get_last_node(detail::bool_<cache_last>()); }
-
- const_node_ptr get_last_node() const
- { return this->get_last_node(detail::bool_<cache_last>()); }
-
- void set_last_node(const node_ptr &n)
- { return this->set_last_node(n, detail::bool_<cache_last>()); }
-
- static node_ptr get_last_node(detail::bool_<false>)
- {
- //This function shall not be used if cache_last is not true
- BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
- return node_ptr();
- }
-
- static void set_last_node(const node_ptr &, detail::bool_<false>)
- {
- //This function shall not be used if cache_last is not true
- BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
- }
-
- node_ptr get_last_node(detail::bool_<true>)
- { return node_ptr(data_.root_plus_size_.last_); }
-
- const_node_ptr get_last_node(detail::bool_<true>) const
- { return const_node_ptr(data_.root_plus_size_.last_); }
-
- void set_last_node(const node_ptr & n, detail::bool_<true>)
- { data_.root_plus_size_.last_ = n; }
-
- void set_default_constructed_state()
- {
- node_algorithms::init_header(this->get_root_node());
- this->priv_size_traits().set_size(size_type(0));
- if(cache_last){
- this->set_last_node(this->get_root_node());
- }
- }
-
- typedef header_holder_plus_last<header_holder_type, node_ptr, cache_last> header_holder_plus_last_t;
- struct root_plus_size
- : public size_traits
- , public header_holder_plus_last_t
- {};
-
- struct data_t
- : public slist_impl::value_traits
- {
- typedef typename slist_impl::value_traits value_traits;
- explicit data_t(const value_traits &val_traits)
- : value_traits(val_traits)
- {}
-
- root_plus_size root_plus_size_;
- } data_;
-
- size_traits &priv_size_traits()
- { return data_.root_plus_size_; }
-
- const size_traits &priv_size_traits() const
- { return data_.root_plus_size_; }
-
- const value_traits &priv_value_traits() const
- { return data_; }
-
- value_traits &priv_value_traits()
- { return data_; }
-
- typedef typename boost::intrusive::value_traits_pointers
- <ValueTraits>::const_value_traits_ptr const_value_traits_ptr;
-
- const_value_traits_ptr priv_value_traits_ptr() const
- { return pointer_traits<const_value_traits_ptr>::pointer_to(this->priv_value_traits()); }
-
- /// @endcond
-
- public:
-
- ///@cond
-
- //! <b>Requires</b>: f and before_l belong to another slist.
- //!
- //! <b>Effects</b>: Transfers the range [f, before_l] to this
- //! list, after the element pointed by prev_pos.
- //! No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements transferred
- //! if constant_time_size is true. Constant-time otherwise.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- //!
- //! <b>Warning</b>: Experimental function, don't use it!
- slist_impl( const node_ptr & f, const node_ptr & before_l
- , size_type n, const value_traits &v_traits = value_traits())
- : data_(v_traits)
- {
- if(n){
- this->priv_size_traits().set_size(n);
- if(cache_last){
- this->set_last_node(before_l);
- }
- node_traits::set_next(this->get_root_node(), f);
- node_traits::set_next(before_l, this->get_end_node());
- }
- else{
- this->set_default_constructed_state();
- }
- }
-
- ///@endcond
-
- //! <b>Effects</b>: constructs an empty list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
- slist_impl()
- : data_(value_traits())
- { this->set_default_constructed_state(); }
-
- //! <b>Effects</b>: constructs an empty list.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
- explicit slist_impl(const value_traits &v_traits)
- : data_(v_traits)
- { this->set_default_constructed_state(); }
-
- //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
- //!
- //! <b>Effects</b>: Constructs a list equal to [b ,e).
- //!
- //! <b>Complexity</b>: Linear in distance(b, e). No copy constructors are called.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
- template<class Iterator>
- slist_impl(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
- : data_(v_traits)
- {
- this->set_default_constructed_state();
- //nothrow, no need to rollback to release elements on exception
- this->insert_after(this->cbefore_begin(), b, e);
- }
-
- //! <b>Effects</b>: Constructs a container moving resources from another container.
- //! Internal value traits are move constructed and
- //! nodes belonging to x (except the node representing the "end") are linked to *this.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node's
- //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the move constructor of value traits throws.
- slist_impl(BOOST_RV_REF(slist_impl) x)
- : data_(::boost::move(x.priv_value_traits()))
- {
- this->set_default_constructed_state();
- //nothrow, no need to rollback to release elements on exception
- this->swap(x);
- }
-
- //! <b>Effects</b>: Equivalent to swap
- //!
- slist_impl& operator=(BOOST_RV_REF(slist_impl) x)
- { this->swap(x); return *this; }
-
- //! <b>Effects</b>: If it's a safe-mode
- //! or auto-unlink value, the destructor does nothing
- //! (ie. no code is generated). Otherwise it detaches all elements from this.
- //! In this case the objects in the list are not deleted (i.e. no destructors
- //! are called), but the hooks according to the value_traits template parameter
- //! are set to their default value.
- //!
- //! <b>Complexity</b>: Linear to the number of elements in the list, if
- //! it's a safe-mode or auto-unlink value. Otherwise constant.
- ~slist_impl()
- {
- if(is_safe_autounlink<ValueTraits::link_mode>::value){
- this->clear();
- node_algorithms::init(this->get_root_node());
- }
- }
-
- //! <b>Effects</b>: Erases all the elements of the container.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements of the list.
- //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the erased elements.
- void clear()
- {
- if(safemode_or_autounlink){
- this->clear_and_dispose(detail::null_disposer());
- }
- else{
- this->set_default_constructed_state();
- }
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases all the elements of the container
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements of the list.
- //!
- //! <b>Note</b>: Invalidates the iterators to the erased elements.
- template <class Disposer>
- void clear_and_dispose(Disposer disposer)
- {
- const_iterator it(this->begin()), itend(this->end());
- while(it != itend){
- node_ptr to_erase(it.pointed_node());
- ++it;
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(priv_value_traits().to_value_ptr(to_erase));
- }
- this->set_default_constructed_state();
- }
-
- //! <b>Requires</b>: value must be an lvalue.
- //!
- //! <b>Effects</b>: Inserts the value in the front of the list.
- //! No copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- void push_front(reference value)
- {
- node_ptr to_insert = priv_value_traits().to_node_ptr(value);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(to_insert));
- if(cache_last){
- if(this->empty()){
- this->set_last_node(to_insert);
- }
- }
- node_algorithms::link_after(this->get_root_node(), to_insert);
- this->priv_size_traits().increment();
- }
-
- //! <b>Requires</b>: value must be an lvalue.
- //!
- //! <b>Effects</b>: Inserts the value in the back of the list.
- //! No copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! This function is only available is cache_last<> is true.
- void push_back(reference value)
- {
- BOOST_STATIC_ASSERT((cache_last));
- node_ptr n = priv_value_traits().to_node_ptr(value);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
- node_algorithms::link_after(this->get_last_node(), n);
- if(cache_last){
- this->set_last_node(n);
- }
- this->priv_size_traits().increment();
- }
-
- //! <b>Effects</b>: Erases the first element of the list.
- //! No destructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the erased element.
- void pop_front()
- { return this->pop_front_and_dispose(detail::null_disposer()); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the first element of the list.
- //! Disposer::operator()(pointer) is called for the removed element.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Invalidates the iterators to the erased element.
- template<class Disposer>
- void pop_front_and_dispose(Disposer disposer)
- {
- node_ptr to_erase = node_traits::get_next(this->get_root_node());
- node_algorithms::unlink_after(this->get_root_node());
- this->priv_size_traits().decrement();
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(priv_value_traits().to_value_ptr(to_erase));
- if(cache_last){
- if(this->empty()){
- this->set_last_node(this->get_root_node());
- }
- }
- }
-
- //! <b>Effects</b>: Returns a reference to the first element of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- reference front()
- { return *this->priv_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); }
-
- //! <b>Effects</b>: Returns a const_reference to the first element of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_reference front() const
- { return *this->priv_value_traits().to_value_ptr(detail::uncast(node_traits::get_next(this->get_root_node()))); }
-
- //! <b>Effects</b>: Returns a reference to the last element of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! This function is only available is cache_last<> is true.
- reference back()
- {
- BOOST_STATIC_ASSERT((cache_last));
- return *this->priv_value_traits().to_value_ptr(this->get_last_node());
- }
-
- //! <b>Effects</b>: Returns a const_reference to the last element of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- //! This function is only available is cache_last<> is true.
- const_reference back() const
- {
- BOOST_STATIC_ASSERT((cache_last));
- return *this->priv_value_traits().to_value_ptr(this->get_last_node());
- }
-
- //! <b>Effects</b>: Returns an iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator begin()
- { return iterator (node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator begin() const
- { return const_iterator (node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbegin() const
- { return const_iterator(node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
-
- //! <b>Effects</b>: Returns an iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator end()
- { return iterator(this->get_end_node(), this->priv_value_traits_ptr()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator end() const
- { return const_iterator(detail::uncast(this->get_end_node()), this->priv_value_traits_ptr()); }
-
- //! <b>Effects</b>: Returns a const_iterator to the end of the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cend() const
- { return this->end(); }
-
- //! <b>Effects</b>: Returns an iterator that points to a position
- //! before the first element. Equivalent to "end()"
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- iterator before_begin()
- { return iterator(this->get_root_node(), this->priv_value_traits_ptr()); }
-
- //! <b>Effects</b>: Returns an iterator that points to a position
- //! before the first element. Equivalent to "end()"
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator before_begin() const
- { return const_iterator(detail::uncast(this->get_root_node()), this->priv_value_traits_ptr()); }
-
- //! <b>Effects</b>: Returns an iterator that points to a position
- //! before the first element. Equivalent to "end()"
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- const_iterator cbefore_begin() const
- { return this->before_begin(); }
-
- //! <b>Effects</b>: Returns an iterator to the last element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: This function is present only if cached_last<> option is true.
- iterator last()
- {
- //This function shall not be used if cache_last is not true
- BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
- return iterator (this->get_last_node(), this->priv_value_traits_ptr());
- }
-
- //! <b>Effects</b>: Returns a const_iterator to the last element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: This function is present only if cached_last<> option is true.
- const_iterator last() const
- {
- //This function shall not be used if cache_last is not true
- BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
- return const_iterator (this->get_last_node(), this->priv_value_traits_ptr());
- }
-
- //! <b>Effects</b>: Returns a const_iterator to the last element contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: This function is present only if cached_last<> option is true.
- const_iterator clast() const
- { return const_iterator(this->get_last_node(), this->priv_value_traits_ptr()); }
-
- //! <b>Precondition</b>: end_iterator must be a valid end iterator
- //! of slist.
- //!
- //! <b>Effects</b>: Returns a const reference to the slist associated to the end iterator
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- static slist_impl &container_from_end_iterator(iterator end_iterator)
- { return slist_impl::priv_container_from_end_iterator(end_iterator); }
-
- //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
- //! of slist.
- //!
- //! <b>Effects</b>: Returns a const reference to the slist associated to the end iterator
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- static const slist_impl &container_from_end_iterator(const_iterator end_iterator)
- { return slist_impl::priv_container_from_end_iterator(end_iterator); }
-
- //! <b>Effects</b>: Returns the number of the elements contained in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements contained in the list.
- //! if constant_time_size is false. Constant time otherwise.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- size_type size() const
- {
- if(constant_time_size)
- return this->priv_size_traits().get_size();
- else
- return node_algorithms::count(this->get_root_node()) - 1;
- }
-
- //! <b>Effects</b>: Returns true if the list contains no elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- bool empty() const
- { return node_algorithms::unique(this->get_root_node()); }
-
- //! <b>Effects</b>: Swaps the elements of x and *this.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements of both lists.
- //! Constant-time if linear<> and/or cache_last<> options are used.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- void swap(slist_impl& other)
- {
- if(cache_last){
- priv_swap_cache_last(this, &other);
- }
- else{
- this->priv_swap_lists(this->get_root_node(), other.get_root_node(), detail::bool_<linear>());
- }
- this->priv_size_traits().swap(other.priv_size_traits());
- }
-
- //! <b>Effects</b>: Moves backwards all the elements, so that the first
- //! element becomes the second, the second becomes the third...
- //! the last element becomes the first one.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements plus the number shifts.
- //!
- //! <b>Note</b>: Iterators Does not affect the validity of iterators and references.
- void shift_backwards(size_type n = 1)
- { this->priv_shift_backwards(n, detail::bool_<linear>()); }
-
- //! <b>Effects</b>: Moves forward all the elements, so that the second
- //! element becomes the first, the third becomes the second...
- //! the first element becomes the last one.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements plus the number shifts.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- void shift_forward(size_type n = 1)
- { this->priv_shift_forward(n, detail::bool_<linear>()); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //! Cloner should yield to nodes equivalent to the original nodes.
- //!
- //! <b>Effects</b>: Erases all the elements from *this
- //! calling Disposer::operator()(pointer), clones all the
- //! elements from src calling Cloner::operator()(const_reference )
- //! and inserts them on *this.
- //!
- //! If cloner throws, all cloned elements are unlinked and disposed
- //! calling Disposer::operator()(pointer).
- //!
- //! <b>Complexity</b>: Linear to erased plus inserted elements.
- //!
- //! <b>Throws</b>: If cloner throws.
- template <class Cloner, class Disposer>
- void clone_from(const slist_impl &src, Cloner cloner, Disposer disposer)
- {
- this->clear_and_dispose(disposer);
- detail::exception_disposer<slist_impl, Disposer>
- rollback(*this, disposer);
- const_iterator prev(this->cbefore_begin());
- const_iterator b(src.begin()), e(src.end());
- for(; b != e; ++b){
- prev = this->insert_after(prev, *cloner(*b));
- }
- rollback.release();
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //! Cloner should yield to nodes equivalent to the original nodes.
- //!
- //! <b>Effects</b>: Erases all the elements from *this
- //! calling Disposer::operator()(pointer), clones all the
- //! elements from src calling Cloner::operator()(reference)
- //! and inserts them on *this.
- //!
- //! If cloner throws, all cloned elements are unlinked and disposed
- //! calling Disposer::operator()(pointer).
- //!
- //! <b>Complexity</b>: Linear to erased plus inserted elements.
- //!
- //! <b>Throws</b>: If cloner throws.
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(slist_impl) src, Cloner cloner, Disposer disposer)
- {
- this->clear_and_dispose(disposer);
- detail::exception_disposer<slist_impl, Disposer>
- rollback(*this, disposer);
- iterator prev(this->cbefore_begin());
- iterator b(src.begin()), e(src.end());
- for(; b != e; ++b){
- prev = this->insert_after(prev, *cloner(*b));
- }
- rollback.release();
- }
-
- //! <b>Requires</b>: value must be an lvalue and prev_p must point to an element
- //! contained by the list or to end().
- //!
- //! <b>Effects</b>: Inserts the value after the position pointed by prev_p.
- //! No copy constructor is called.
- //!
- //! <b>Returns</b>: An iterator to the inserted element.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- iterator insert_after(const_iterator prev_p, reference value)
- {
- node_ptr n = priv_value_traits().to_node_ptr(value);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
- node_ptr prev_n(prev_p.pointed_node());
- node_algorithms::link_after(prev_n, n);
- if(cache_last && (this->get_last_node() == prev_n)){
- this->set_last_node(n);
- }
- this->priv_size_traits().increment();
- return iterator (n, this->priv_value_traits_ptr());
- }
-
- //! <b>Requires</b>: Dereferencing iterator must yield
- //! an lvalue of type value_type and prev_p must point to an element
- //! contained by the list or to the end node.
- //!
- //! <b>Effects</b>: Inserts the [f, l)
- //! after the position prev_p.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements inserted.
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- template<class Iterator>
- void insert_after(const_iterator prev_p, Iterator f, Iterator l)
- {
- //Insert first nodes avoiding cache and size checks
- size_type count = 0;
- node_ptr prev_n(prev_p.pointed_node());
- for (; f != l; ++f, ++count){
- const node_ptr n = priv_value_traits().to_node_ptr(*f);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
- node_algorithms::link_after(prev_n, n);
- prev_n = n;
- }
- //Now fix special cases if needed
- if(cache_last && (this->get_last_node() == prev_p.pointed_node())){
- this->set_last_node(prev_n);
- }
- if(constant_time_size){
- this->priv_size_traits().increase(count);
- }
- }
-
- //! <b>Requires</b>: value must be an lvalue and p must point to an element
- //! contained by the list or to end().
- //!
- //! <b>Effects</b>: Inserts the value before the position pointed by p.
- //! No copy constructor is called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements before p.
- //! Constant-time if cache_last<> is true and p == end().
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- iterator insert(const_iterator p, reference value)
- { return this->insert_after(this->previous(p), value); }
-
- //! <b>Requires</b>: Dereferencing iterator must yield
- //! an lvalue of type value_type and p must point to an element
- //! contained by the list or to the end node.
- //!
- //! <b>Effects</b>: Inserts the pointed by b and e
- //! before the position p. No copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements inserted plus linear
- //! to the elements before b.
- //! Linear to the number of elements to insert if cache_last<> option is true and p == end().
- //!
- //! <b>Note</b>: Does not affect the validity of iterators and references.
- template<class Iterator>
- void insert(const_iterator p, Iterator b, Iterator e)
- { return this->insert_after(this->previous(p), b, e); }
-
- //! <b>Effects</b>: Erases the element after the element pointed by prev of
- //! the list. No destructors are called.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased element.
- iterator erase_after(const_iterator prev)
- { return this->erase_after_and_dispose(prev, detail::null_disposer()); }
-
- //! <b>Effects</b>: Erases the range (before_f, l) from
- //! the list. No destructors are called.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of erased elements if it's a safe-mode
- //! , auto-unlink value or constant-time size is activated. Constant time otherwise.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased element.
- iterator erase_after(const_iterator before_f, const_iterator l)
- {
- if(safemode_or_autounlink || constant_time_size){
- return this->erase_after_and_dispose(before_f, l, detail::null_disposer());
- }
- else{
- const node_ptr bfp = before_f.pointed_node();
- const node_ptr lp = l.pointed_node();
- if(cache_last){
- if(lp == this->get_end_node()){
- this->set_last_node(bfp);
- }
- }
- node_algorithms::unlink_after(bfp, lp);
- return l.unconst();
- }
- }
-
- //! <b>Effects</b>: Erases the range (before_f, l) from
- //! the list. n must be distance(before_f, l) - 1.
- //! No destructors are called.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: constant-time if link_mode is normal_link.
- //! Linear to the elements (l - before_f) otherwise.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased element.
- iterator erase_after(const_iterator before_f, const_iterator l, size_type n)
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance((++const_iterator(before_f)).pointed_node(), l.pointed_node()) == n);
- if(safemode_or_autounlink){
- return this->erase_after(before_f, l);
- }
- else{
- const node_ptr bfp = before_f.pointed_node();
- const node_ptr lp = l.pointed_node();
- if(cache_last){
- if((lp == this->get_end_node())){
- this->set_last_node(bfp);
- }
- }
- node_algorithms::unlink_after(bfp, lp);
- if(constant_time_size){
- this->priv_size_traits().decrease(n);
- }
- return l.unconst();
- }
- }
-
- //! <b>Effects</b>: Erases the element pointed by i of the list.
- //! No destructors are called.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed element,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements before i.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased element.
- iterator erase(const_iterator i)
- { return this->erase_after(this->previous(i)); }
-
- //! <b>Requires</b>: f and l must be valid iterator to elements in *this.
- //!
- //! <b>Effects</b>: Erases the range pointed by b and e.
- //! No destructors are called.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements before l.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased elements.
- iterator erase(const_iterator f, const_iterator l)
- { return this->erase_after(this->previous(f), l); }
-
- //! <b>Effects</b>: Erases the range [f, l) from
- //! the list. n must be distance(f, l).
- //! No destructors are called.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: linear to the elements before f if link_mode is normal_link
- //! and constant_time_size is activated. Linear to the elements before l otherwise.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased element.
- iterator erase(const_iterator f, const_iterator l, size_type n)
- { return this->erase_after(this->previous(f), l, n); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the element after the element pointed by prev of
- //! the list.
- //! Disposer::operator()(pointer) is called for the removed element.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Invalidates the iterators to the erased element.
- template<class Disposer>
- iterator erase_after_and_dispose(const_iterator prev, Disposer disposer)
- {
- const_iterator it(prev);
- ++it;
- node_ptr to_erase(it.pointed_node());
- ++it;
- node_ptr prev_n(prev.pointed_node());
- node_algorithms::unlink_after(prev_n);
- if(cache_last && (to_erase == this->get_last_node())){
- this->set_last_node(prev_n);
- }
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(priv_value_traits().to_value_ptr(to_erase));
- this->priv_size_traits().decrement();
- return it.unconst();
- }
-
- /// @cond
-
- static iterator s_insert_after(const_iterator const prev_p, reference value)
- {
- BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
- node_ptr const n = value_traits::to_node_ptr(value);
- BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
- node_algorithms::link_after(prev_p.pointed_node(), n);
- return iterator (n, const_value_traits_ptr());
- }
-
- template<class Disposer>
- static iterator s_erase_after_and_dispose(const_iterator prev, Disposer disposer)
- {
- BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
- const_iterator it(prev);
- ++it;
- node_ptr to_erase(it.pointed_node());
- ++it;
- node_ptr prev_n(prev.pointed_node());
- node_algorithms::unlink_after(prev_n);
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(value_traits::to_value_ptr(to_erase));
- return it.unconst();
- }
-
- template<class Disposer>
- static iterator s_erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer)
- {
- BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
- node_ptr bfp(before_f.pointed_node()), lp(l.pointed_node());
- node_ptr fp(node_traits::get_next(bfp));
- node_algorithms::unlink_after(bfp, lp);
- while(fp != lp){
- node_ptr to_erase(fp);
- fp = node_traits::get_next(fp);
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(value_traits::to_value_ptr(to_erase));
- }
- return l.unconst();
- }
-
- static iterator s_erase_after(const_iterator prev)
- { return s_erase_after_and_dispose(prev, detail::null_disposer()); }
-
- /// @endcond
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the range (before_f, l) from
- //! the list.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements (l - before_f + 1).
- //!
- //! <b>Note</b>: Invalidates the iterators to the erased element.
- template<class Disposer>
- iterator erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer)
- {
- node_ptr bfp(before_f.pointed_node()), lp(l.pointed_node());
- node_ptr fp(node_traits::get_next(bfp));
- node_algorithms::unlink_after(bfp, lp);
- while(fp != lp){
- node_ptr to_erase(fp);
- fp = node_traits::get_next(fp);
- if(safemode_or_autounlink)
- node_algorithms::init(to_erase);
- disposer(priv_value_traits().to_value_ptr(to_erase));
- this->priv_size_traits().decrement();
- }
- if(cache_last && (node_traits::get_next(bfp) == this->get_end_node())){
- this->set_last_node(bfp);
- }
- return l.unconst();
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the element pointed by i of the list.
- //! No destructors are called.
- //! Disposer::operator()(pointer) is called for the removed element.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed element,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements before i.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased element.
- template<class Disposer>
- iterator erase_and_dispose(const_iterator i, Disposer disposer)
- { return this->erase_after_and_dispose(this->previous(i), disposer); }
-
- #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- template<class Disposer>
- iterator erase_and_dispose(iterator i, Disposer disposer)
- { return this->erase_and_dispose(const_iterator(i), disposer); }
- #endif
-
- //! <b>Requires</b>: f and l must be valid iterator to elements in *this.
- //! Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Erases the range pointed by b and e.
- //! No destructors are called.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Returns</b>: the first element remaining beyond the removed elements,
- //! or end() if no such element exists.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of erased elements plus linear
- //! to the elements before f.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references) to the
- //! erased elements.
- template<class Disposer>
- iterator erase_and_dispose(const_iterator f, const_iterator l, Disposer disposer)
- { return this->erase_after_and_dispose(this->previous(f), l, disposer); }
-
- //! <b>Requires</b>: Dereferencing iterator must yield
- //! an lvalue of type value_type.
- //!
- //! <b>Effects</b>: Clears the list and inserts the range pointed by b and e.
- //! No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements inserted plus
- //! linear to the elements contained in the list if it's a safe-mode
- //! or auto-unlink value.
- //! Linear to the number of elements inserted in the list otherwise.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements.
- template<class Iterator>
- void assign(Iterator b, Iterator e)
- {
- this->clear();
- this->insert_after(this->cbefore_begin(), b, e);
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Requires</b>: Dereferencing iterator must yield
- //! an lvalue of type value_type.
- //!
- //! <b>Effects</b>: Clears the list and inserts the range pointed by b and e.
- //! No destructors or copy constructors are called.
- //! Disposer::operator()(pointer) is called for the removed elements.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements inserted plus
- //! linear to the elements contained in the list.
- //!
- //! <b>Note</b>: Invalidates the iterators (but not the references)
- //! to the erased elements.
- template<class Iterator, class Disposer>
- void dispose_and_assign(Disposer disposer, Iterator b, Iterator e)
- {
- this->clear_and_dispose(disposer);
- this->insert_after(this->cbefore_begin(), b, e, disposer);
- }
-
- //! <b>Requires</b>: prev must point to an element contained by this list or
- //! to the before_begin() element
- //!
- //! <b>Effects</b>: Transfers all the elements of list x to this list, after the
- //! the element pointed by prev. No destructors or copy constructors are called.
- //!
- //! <b>Returns</b>: Nothing.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: In general, linear to the elements contained in x.
- //! Constant-time if cache_last<> option is true and also constant-time if
- //! linear<> option is true "this" is empty and "l" is not used.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- //!
- //! <b>Additional note</b>: If the optional parameter "l" is provided, it will be
- //! assigned to the last spliced element or prev if x is empty.
- //! This iterator can be used as new "prev" iterator for a new splice_after call.
- //! that will splice new values after the previously spliced values.
- void splice_after(const_iterator prev, slist_impl &x, const_iterator *l = 0)
- {
- if(x.empty()){
- if(l) *l = prev;
- }
- else if(linear && this->empty()){
- this->swap(x);
- if(l) *l = this->previous(this->cend());
- }
- else{
- const_iterator last_x(x.previous(x.end())); //constant time if cache_last is active
- node_ptr prev_n(prev.pointed_node());
- node_ptr last_x_n(last_x.pointed_node());
- if(cache_last){
- x.set_last_node(x.get_root_node());
- if(node_traits::get_next(prev_n) == this->get_end_node()){
- this->set_last_node(last_x_n);
- }
- }
- node_algorithms::transfer_after( prev_n, x.before_begin().pointed_node(), last_x_n);
- this->priv_size_traits().increase(x.priv_size_traits().get_size());
- x.priv_size_traits().set_size(size_type(0));
- if(l) *l = last_x;
- }
- }
-
- //! <b>Requires</b>: prev must point to an element contained by this list or
- //! to the before_begin() element. prev_ele must point to an element contained in list
- //! x or must be x.before_begin().
- //!
- //! <b>Effects</b>: Transfers the element after prev_ele, from list x to this list,
- //! after the element pointed by prev. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator prev_ele)
- {
- const_iterator elem = prev_ele;
- this->splice_after(prev_pos, x, prev_ele, ++elem, 1);
- }
-
- //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
- //! before_begin(), and before_f and before_l belong to x and
- //! ++before_f != x.end() && before_l != x.end().
- //!
- //! <b>Effects</b>: Transfers the range (before_f, before_l] from list x to this
- //! list, after the element pointed by prev_pos.
- //! No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements transferred
- //! if constant_time_size is true. Constant-time otherwise.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l)
- {
- if(constant_time_size)
- this->splice_after(prev_pos, x, before_f, before_l, node_algorithms::distance(before_f.pointed_node(), before_l.pointed_node()));
- else
- this->priv_splice_after
- (prev_pos.pointed_node(), x, before_f.pointed_node(), before_l.pointed_node());
- }
-
- //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
- //! before_begin(), and before_f and before_l belong to x and
- //! ++before_f != x.end() && before_l != x.end() and
- //! n == distance(before_f, before_l).
- //!
- //! <b>Effects</b>: Transfers the range (before_f, before_l] from list x to this
- //! list, after the element pointed by p. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l, size_type n)
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance(before_f.pointed_node(), before_l.pointed_node()) == n);
- this->priv_splice_after
- (prev_pos.pointed_node(), x, before_f.pointed_node(), before_l.pointed_node());
- if(constant_time_size){
- this->priv_size_traits().increase(n);
- x.priv_size_traits().decrease(n);
- }
- }
-
- //! <b>Requires</b>: it is an iterator to an element in *this.
- //!
- //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
- //! the element pointed by it. No destructors or copy constructors are called.
- //!
- //! <b>Returns</b>: Nothing.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements contained in x plus linear to
- //! the elements before it.
- //! Linear to the elements before it if cache_last<> option is true.
- //! Constant-time if cache_last<> option is true and it == end().
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- //!
- //! <b>Additional note</b>: If the optional parameter "l" is provided, it will be
- //! assigned to the last spliced element or prev if x is empty.
- //! This iterator can be used as new "prev" iterator for a new splice_after call.
- //! that will splice new values after the previously spliced values.
- void splice(const_iterator it, slist_impl &x, const_iterator *l = 0)
- { this->splice_after(this->previous(it), x, l); }
-
- //! <b>Requires</b>: it p must be a valid iterator of *this.
- //! elem must point to an element contained in list
- //! x.
- //!
- //! <b>Effects</b>: Transfers the element elem, from list x to this list,
- //! before the element pointed by pos. No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the elements before pos and before elem.
- //! Linear to the elements before elem if cache_last<> option is true and pos == end().
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator pos, slist_impl &x, const_iterator elem)
- { return this->splice_after(this->previous(pos), x, x.previous(elem)); }
-
- //! <b>Requires</b>: pos must be a dereferenceable iterator in *this
- //! and f and f belong to x and f and f a valid range on x.
- //!
- //! <b>Effects</b>: Transfers the range [f, l) from list x to this
- //! list, before the element pointed by pos.
- //! No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the sum of elements before pos, f, and l
- //! plus linear to the number of elements transferred if constant_time_size is true.
- //! Linear to the sum of elements before f, and l
- //! plus linear to the number of elements transferred if constant_time_size is true
- //! if cache_last<> is true and pos == end()
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator pos, slist_impl &x, const_iterator f, const_iterator l)
- { return this->splice_after(this->previous(pos), x, x.previous(f), x.previous(l)); }
-
- //! <b>Requires</b>: pos must be a dereferenceable iterator in *this
- //! and f and l belong to x and f and l a valid range on x.
- //! n == distance(f, l).
- //!
- //! <b>Effects</b>: Transfers the range [f, l) from list x to this
- //! list, before the element pointed by pos.
- //! No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the sum of elements before pos, f, and l.
- //! Linear to the sum of elements before f and l
- //! if cache_last<> is true and pos == end().
- //!
- //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
- //! list. Iterators of this list and all the references are not invalidated.
- void splice(const_iterator pos, slist_impl &x, const_iterator f, const_iterator l, size_type n)
- { return this->splice_after(this->previous(pos), x, x.previous(f), x.previous(l), n); }
-
- //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
- //! The sort is stable, that is, the relative order of equivalent elements is preserved.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or the predicate throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
- //! is the list's size.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated
- template<class Predicate>
- void sort(Predicate p)
- {
- if (node_traits::get_next(node_traits::get_next(this->get_root_node()))
- != this->get_root_node()) {
-
- slist_impl carry(this->priv_value_traits());
- detail::array_initializer<slist_impl, 64> counter(this->priv_value_traits());
- int fill = 0;
- const_iterator last_inserted;
- while(!this->empty()){
- last_inserted = this->cbegin();
- carry.splice_after(carry.cbefore_begin(), *this, this->cbefore_begin());
- int i = 0;
- while(i < fill && !counter[i].empty()) {
- carry.swap(counter[i]);
- carry.merge(counter[i++], p, &last_inserted);
- }
- BOOST_INTRUSIVE_INVARIANT_ASSERT(counter[i].empty());
- const_iterator last_element(carry.previous(last_inserted, carry.end()));
-
- if(constant_time_size){
- counter[i].splice_after( counter[i].cbefore_begin(), carry
- , carry.cbefore_begin(), last_element
- , carry.size());
- }
- else{
- counter[i].splice_after( counter[i].cbefore_begin(), carry
- , carry.cbefore_begin(), last_element);
- }
- if(i == fill)
- ++fill;
- }
-
- for (int i = 1; i < fill; ++i)
- counter[i].merge(counter[i-1], p, &last_inserted);
- --fill;
- const_iterator last_element(counter[fill].previous(last_inserted, counter[fill].end()));
- if(constant_time_size){
- this->splice_after( cbefore_begin(), counter[fill], counter[fill].cbefore_begin()
- , last_element, counter[fill].size());
- }
- else{
- this->splice_after( cbefore_begin(), counter[fill], counter[fill].cbefore_begin()
- , last_element);
- }
- }
- }
-
- //! <b>Requires</b>: p must be a comparison function that induces a strict weak
- //! ordering and both *this and x must be sorted according to that ordering
- //! The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this. The merge is stable; that is, if an element from *this is
- //! equivalent to one from x, then the element from *this will precede the one from x.
- //!
- //! <b>Throws</b>: If value_traits::node_traits::node
- //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
- //! or std::less<value_type> throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated.
- void sort()
- { this->sort(std::less<value_type>()); }
-
- //! <b>Requires</b>: p must be a comparison function that induces a strict weak
- //! ordering and both *this and x must be sorted according to that ordering
- //! The lists x and *this must be distinct.
- //!
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this. The merge is stable; that is, if an element from *this is
- //! equivalent to one from x, then the element from *this will precede the one from x.
- //!
- //! <b>Returns</b>: Nothing.
- //!
- //! <b>Throws</b>: If the predicate throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated.
- //!
- //! <b>Additional note</b>: If optional "l" argument is passed, it is assigned
- //! to an iterator to the last transferred value or end() is x is empty.
- template<class Predicate>
- void merge(slist_impl& x, Predicate p, const_iterator *l = 0)
- {
- const_iterator e(this->cend()), ex(x.cend()), bb(this->cbefore_begin()),
- bb_next;
- if(l) *l = e.unconst();
- while(!x.empty()){
- const_iterator ibx_next(x.cbefore_begin()), ibx(ibx_next++);
- while (++(bb_next = bb) != e && !p(*ibx_next, *bb_next)){
- bb = bb_next;
- }
- if(bb_next == e){
- //Now transfer the rest to the end of the container
- this->splice_after(bb, x, l);
- break;
- }
- else{
- size_type n(0);
- do{
- ibx = ibx_next; ++n;
- } while(++(ibx_next = ibx) != ex && p(*ibx_next, *bb_next));
- this->splice_after(bb, x, x.before_begin(), ibx, n);
- if(l) *l = ibx;
- }
- }
- }
-
- //! <b>Effects</b>: This function removes all of x's elements and inserts them
- //! in order into *this according to std::less<value_type>. The merge is stable;
- //! that is, if an element from *this is equivalent to one from x, then the element
- //! from *this will precede the one from x.
- //!
- //! <b>Throws</b>: if std::less<value_type> throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: This function is linear time: it performs at most
- //! size() + x.size() - 1 comparisons.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated
- void merge(slist_impl& x)
- { this->merge(x, std::less<value_type>()); }
-
- //! <b>Effects</b>: Reverses the order of elements in the list.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: This function is linear to the contained elements.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated
- void reverse()
- {
- if(cache_last && !this->empty()){
- this->set_last_node(node_traits::get_next(this->get_root_node()));
- }
- this->priv_reverse(detail::bool_<linear>());
- }
-
- //! <b>Effects</b>: Removes all the elements that compare equal to value.
- //! No destructors are called.
- //!
- //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid. This function is
- //! linear time: it performs exactly size() comparisons for equality.
- void remove(const_reference value)
- { this->remove_if(detail::equal_to_value<const_reference>(value)); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Removes all the elements that compare equal to value.
- //! Disposer::operator()(pointer) is called for every removed element.
- //!
- //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template<class Disposer>
- void remove_and_dispose(const_reference value, Disposer disposer)
- { this->remove_and_dispose_if(detail::equal_to_value<const_reference>(value), disposer); }
-
- //! <b>Effects</b>: Removes all the elements for which a specified
- //! predicate is satisfied. No destructors are called.
- //!
- //! <b>Throws</b>: If pred throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: Linear time. It performs exactly size() calls to the predicate.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template<class Pred>
- void remove_if(Pred pred)
- {
- const node_ptr bbeg = this->get_root_node();
- typename node_algorithms::stable_partition_info info;
- node_algorithms::stable_partition
- (bbeg, this->get_end_node(), detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
- //After cache last is set, slist invariants are preserved...
- if(cache_last){
- this->set_last_node(info.new_last_node);
- }
- //...so erase can be safely called
- this->erase_after( const_iterator(bbeg, this->priv_value_traits_ptr())
- , const_iterator(info.beg_2st_partition, this->priv_value_traits_ptr())
- , info.num_1st_partition);
- }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Removes all the elements for which a specified
- //! predicate is satisfied.
- //! Disposer::operator()(pointer) is called for every removed element.
- //!
- //! <b>Throws</b>: If pred throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template<class Pred, class Disposer>
- void remove_and_dispose_if(Pred pred, Disposer disposer)
- {
- const node_ptr bbeg = this->get_root_node();
- typename node_algorithms::stable_partition_info info;
- node_algorithms::stable_partition
- (bbeg, this->get_end_node(), detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
- //After cache last is set, slist invariants are preserved...
- if(cache_last){
- this->set_last_node(info.new_last_node);
- }
- //...so erase can be safely called
- this->erase_after_and_dispose( const_iterator(bbeg, this->priv_value_traits_ptr())
- , const_iterator(info.beg_2st_partition, this->priv_value_traits_ptr())
- , disposer);
- }
-
- //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
- //! elements that are equal from the list. No destructors are called.
- //!
- //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: Linear time (size()-1) comparisons calls to pred()).
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- void unique()
- { this->unique_and_dispose(std::equal_to<value_type>(), detail::null_disposer()); }
-
- //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
- //! elements that satisfy some binary predicate from the list.
- //! No destructors are called.
- //!
- //! <b>Throws</b>: If the predicate throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: Linear time (size()-1) comparisons equality comparisons.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template<class BinaryPredicate>
- void unique(BinaryPredicate pred)
- { this->unique_and_dispose(pred, detail::null_disposer()); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
- //! elements that satisfy some binary predicate from the list.
- //! Disposer::operator()(pointer) is called for every removed element.
- //!
- //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: Linear time (size()-1) comparisons equality comparisons.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template<class Disposer>
- void unique_and_dispose(Disposer disposer)
- { this->unique(std::equal_to<value_type>(), disposer); }
-
- //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
- //!
- //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
- //! elements that satisfy some binary predicate from the list.
- //! Disposer::operator()(pointer) is called for every removed element.
- //!
- //! <b>Throws</b>: If the predicate throws. Basic guarantee.
- //!
- //! <b>Complexity</b>: Linear time (size()-1) comparisons equality comparisons.
- //!
- //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
- //! and iterators to elements that are not removed remain valid.
- template<class BinaryPredicate, class Disposer>
- void unique_and_dispose(BinaryPredicate pred, Disposer disposer)
- {
- const_iterator end_n(this->cend());
- const_iterator bcur(this->cbegin());
- if(bcur != end_n){
- const_iterator cur(bcur);
- ++cur;
- while(cur != end_n) {
- if (pred(*bcur, *cur)){
- cur = this->erase_after_and_dispose(bcur, disposer);
- }
- else{
- bcur = cur;
- ++cur;
- }
- }
- if(cache_last){
- this->set_last_node(bcur.pointed_node());
- }
- }
- }
-
- //! <b>Requires</b>: value must be a reference to a value inserted in a list.
- //!
- //! <b>Effects</b>: This function returns a const_iterator pointing to the element
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated.
- //! This static function is available only if the <i>value traits</i>
- //! is stateless.
- static iterator s_iterator_to(reference value)
- {
- BOOST_STATIC_ASSERT((!stateful_value_traits));
- return iterator (value_traits::to_node_ptr(value), const_value_traits_ptr());
- }
-
- //! <b>Requires</b>: value must be a const reference to a value inserted in a list.
- //!
- //! <b>Effects</b>: This function returns an iterator pointing to the element.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated.
- //! This static function is available only if the <i>value traits</i>
- //! is stateless.
- static const_iterator s_iterator_to(const_reference value)
- {
- BOOST_STATIC_ASSERT((!stateful_value_traits));
- reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
- return const_iterator(value_traits::to_node_ptr(r), const_value_traits_ptr());
- }
-
- //! <b>Requires</b>: value must be a reference to a value inserted in a list.
- //!
- //! <b>Effects</b>: This function returns a const_iterator pointing to the element
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated.
- iterator iterator_to(reference value)
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT(linear || !node_algorithms::inited(this->priv_value_traits().to_node_ptr(value)));
- return iterator (this->priv_value_traits().to_node_ptr(value), this->priv_value_traits_ptr());
- }
-
- //! <b>Requires</b>: value must be a const reference to a value inserted in a list.
- //!
- //! <b>Effects</b>: This function returns an iterator pointing to the element.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Note</b>: Iterators and references are not invalidated.
- const_iterator iterator_to(const_reference value) const
- {
- reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
- BOOST_INTRUSIVE_INVARIANT_ASSERT (linear || !node_algorithms::inited(this->priv_value_traits().to_node_ptr(r)));
- return const_iterator(this->priv_value_traits().to_node_ptr(r), this->priv_value_traits_ptr());
- }
-
- //! <b>Returns</b>: The iterator to the element before i in the list.
- //! Returns the end-iterator, if either i is the begin-iterator or the
- //! list is empty.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements before i.
- //! Constant if cache_last<> is true and i == end().
- iterator previous(iterator i)
- { return this->previous(this->cbefore_begin(), i); }
-
- //! <b>Returns</b>: The const_iterator to the element before i in the list.
- //! Returns the end-const_iterator, if either i is the begin-const_iterator or
- //! the list is empty.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements before i.
- //! Constant if cache_last<> is true and i == end().
- const_iterator previous(const_iterator i) const
- { return this->previous(this->cbefore_begin(), i); }
-
- //! <b>Returns</b>: The iterator to the element before i in the list,
- //! starting the search on element after prev_from.
- //! Returns the end-iterator, if either i is the begin-iterator or the
- //! list is empty.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements before i.
- //! Constant if cache_last<> is true and i == end().
- iterator previous(const_iterator prev_from, iterator i)
- { return this->previous(prev_from, const_iterator(i)).unconst(); }
-
- //! <b>Returns</b>: The const_iterator to the element before i in the list,
- //! starting the search on element after prev_from.
- //! Returns the end-const_iterator, if either i is the begin-const_iterator or
- //! the list is empty.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements before i.
- //! Constant if cache_last<> is true and i == end().
- const_iterator previous(const_iterator prev_from, const_iterator i) const
- {
- if(cache_last && (i.pointed_node() == this->get_end_node())){
- return const_iterator(detail::uncast(this->get_last_node()), this->priv_value_traits_ptr());
- }
- return const_iterator
- (node_algorithms::get_previous_node
- (prev_from.pointed_node(), i.pointed_node()), this->priv_value_traits_ptr());
- }
-
- ///@cond
-
- //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
- //! before_begin(), and f and before_l belong to another slist.
- //!
- //! <b>Effects</b>: Transfers the range [f, before_l] to this
- //! list, after the element pointed by prev_pos.
- //! No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Linear to the number of elements transferred
- //! if constant_time_size is true. Constant-time otherwise.
- //!
- //! <b>Note</b>: Iterators of values obtained from the list that owned f and before_l now
- //! point to elements of this list. Iterators of this list and all the references are not invalidated.
- //!
- //! <b>Warning</b>: Experimental function, don't use it!
- void incorporate_after(const_iterator prev_pos, const node_ptr & f, const node_ptr & before_l)
- {
- if(constant_time_size)
- this->incorporate_after(prev_pos, f, before_l, node_algorithms::distance(f.pointed_node(), before_l.pointed_node())+1);
- else
- this->priv_incorporate_after(prev_pos.pointed_node(), f, before_l);
- }
-
- //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
- //! before_begin(), and f and before_l belong to another slist.
- //! n == distance(f, before_l) + 1.
- //!
- //! <b>Effects</b>: Transfers the range [f, before_l] to this
- //! list, after the element pointed by prev_pos.
- //! No destructors or copy constructors are called.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Note</b>: Iterators of values obtained from the list that owned f and before_l now
- //! point to elements of this list. Iterators of this list and all the references are not invalidated.
- //!
- //! <b>Warning</b>: Experimental function, don't use it!
- void incorporate_after(const_iterator prev_pos, const node_ptr & f, const node_ptr & before_l, size_type n)
- {
- if(n){
- BOOST_INTRUSIVE_INVARIANT_ASSERT(n > 0);
- BOOST_INTRUSIVE_INVARIANT_ASSERT
- (size_type(boost::intrusive::iterator_distance
- ( iterator(f, this->priv_value_traits_ptr())
- , iterator(before_l, this->priv_value_traits_ptr())))
- +1 == n);
- this->priv_incorporate_after(prev_pos.pointed_node(), f, before_l);
- if(constant_time_size){
- this->priv_size_traits().increase(n);
- }
- }
- }
-
- ///@endcond
-
- //! <b>Effects</b>: Asserts the integrity of the container.
- //!
- //! <b>Complexity</b>: Linear time.
- //!
- //! <b>Note</b>: The method has no effect when asserts are turned off (e.g., with NDEBUG).
- //! Experimental function, interface might change in future versions.
- void check() const
- {
- const_node_ptr header_ptr = get_root_node();
- // header's next is never null
- BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_next(header_ptr));
- if (node_traits::get_next(header_ptr) == header_ptr)
- {
- if (constant_time_size)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_size_traits().get_size() == 0);
- return;
- }
- size_t node_count = 0;
- const_node_ptr p = header_ptr;
- while (true)
- {
- const_node_ptr next_p = node_traits::get_next(p);
- if (!linear)
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT(next_p);
- }
- else
- {
- BOOST_INTRUSIVE_INVARIANT_ASSERT(next_p != header_ptr);
- }
- if ((!linear && next_p == header_ptr) || (linear && !next_p))
- {
- if (cache_last)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(get_last_node() == p);
- break;
- }
- p = next_p;
- ++node_count;
- }
- if (constant_time_size)
- BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_size_traits().get_size() == node_count);
- }
-
-
- friend bool operator==(const slist_impl &x, const slist_impl &y)
- {
- if(constant_time_size && x.size() != y.size()){
- return false;
- }
- return ::boost::intrusive::algo_equal(x.cbegin(), x.cend(), y.cbegin(), y.cend());
- }
-
- friend bool operator!=(const slist_impl &x, const slist_impl &y)
- { return !(x == y); }
-
- friend bool operator<(const slist_impl &x, const slist_impl &y)
- { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- friend bool operator>(const slist_impl &x, const slist_impl &y)
- { return y < x; }
-
- friend bool operator<=(const slist_impl &x, const slist_impl &y)
- { return !(y < x); }
-
- friend bool operator>=(const slist_impl &x, const slist_impl &y)
- { return !(x < y); }
-
- friend void swap(slist_impl &x, slist_impl &y)
- { x.swap(y); }
-
- private:
- void priv_splice_after(const node_ptr & prev_pos_n, slist_impl &x, const node_ptr & before_f_n, const node_ptr & before_l_n)
- {
- if (cache_last && (before_f_n != before_l_n)){
- if(prev_pos_n == this->get_last_node()){
- this->set_last_node(before_l_n);
- }
- if(&x != this && node_traits::get_next(before_l_n) == x.get_end_node()){
- x.set_last_node(before_f_n);
- }
- }
- node_algorithms::transfer_after(prev_pos_n, before_f_n, before_l_n);
- }
-
- void priv_incorporate_after(const node_ptr & prev_pos_n, const node_ptr & first_n, const node_ptr & before_l_n)
- {
- if(cache_last){
- if(prev_pos_n == this->get_last_node()){
- this->set_last_node(before_l_n);
- }
- }
- node_algorithms::incorporate_after(prev_pos_n, first_n, before_l_n);
- }
-
- void priv_reverse(detail::bool_<false>)
- { node_algorithms::reverse(this->get_root_node()); }
-
- void priv_reverse(detail::bool_<true>)
- {
- node_ptr new_first = node_algorithms::reverse
- (node_traits::get_next(this->get_root_node()));
- node_traits::set_next(this->get_root_node(), new_first);
- }
-
- void priv_shift_backwards(size_type n, detail::bool_<false>)
- {
- node_ptr l = node_algorithms::move_forward(this->get_root_node(), (std::size_t)n);
- if(cache_last && l){
- this->set_last_node(l);
- }
- }
-
- void priv_shift_backwards(size_type n, detail::bool_<true>)
- {
- std::pair<node_ptr, node_ptr> ret(
- node_algorithms::move_first_n_forward
- (node_traits::get_next(this->get_root_node()), (std::size_t)n));
- if(ret.first){
- node_traits::set_next(this->get_root_node(), ret.first);
- if(cache_last){
- this->set_last_node(ret.second);
- }
- }
- }
-
- void priv_shift_forward(size_type n, detail::bool_<false>)
- {
- node_ptr l = node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n);
- if(cache_last && l){
- this->set_last_node(l);
- }
- }
-
- void priv_shift_forward(size_type n, detail::bool_<true>)
- {
- std::pair<node_ptr, node_ptr> ret(
- node_algorithms::move_first_n_backwards
- (node_traits::get_next(this->get_root_node()), (std::size_t)n));
- if(ret.first){
- node_traits::set_next(this->get_root_node(), ret.first);
- if(cache_last){
- this->set_last_node(ret.second);
- }
- }
- }
-
- static void priv_swap_cache_last(slist_impl *this_impl, slist_impl *other_impl)
- {
- bool other_was_empty = false;
- if(this_impl->empty()){
- //Check if both are empty or
- if(other_impl->empty())
- return;
- //If this is empty swap pointers
- slist_impl *tmp = this_impl;
- this_impl = other_impl;
- other_impl = tmp;
- other_was_empty = true;
- }
- else{
- other_was_empty = other_impl->empty();
- }
-
- //Precondition: this is not empty
- node_ptr other_old_last(other_impl->get_last_node());
- node_ptr other_bfirst(other_impl->get_root_node());
- node_ptr this_bfirst(this_impl->get_root_node());
- node_ptr this_old_last(this_impl->get_last_node());
-
- //Move all nodes from this to other's beginning
- node_algorithms::transfer_after(other_bfirst, this_bfirst, this_old_last);
- other_impl->set_last_node(this_old_last);
-
- if(other_was_empty){
- this_impl->set_last_node(this_bfirst);
- }
- else{
- //Move trailing nodes from other to this
- node_algorithms::transfer_after(this_bfirst, this_old_last, other_old_last);
- this_impl->set_last_node(other_old_last);
- }
- }
-
- //circular version
- static void priv_swap_lists(const node_ptr & this_node, const node_ptr & other_node, detail::bool_<false>)
- { node_algorithms::swap_nodes(this_node, other_node); }
-
- //linear version
- static void priv_swap_lists(const node_ptr & this_node, const node_ptr & other_node, detail::bool_<true>)
- { node_algorithms::swap_trailing_nodes(this_node, other_node); }
-
- static slist_impl &priv_container_from_end_iterator(const const_iterator &end_iterator)
- {
- //Obtaining the container from the end iterator is not possible with linear
- //singly linked lists (because "end" is represented by the null pointer)
- BOOST_STATIC_ASSERT(!linear);
- BOOST_STATIC_ASSERT((has_container_from_iterator));
- node_ptr p = end_iterator.pointed_node();
- header_holder_type* h = header_holder_type::get_holder(p);
- header_holder_plus_last_t* hpl = detail::parent_from_member< header_holder_plus_last_t, header_holder_type>
- (h, &header_holder_plus_last_t::header_holder_);
- root_plus_size* r = static_cast< root_plus_size* >(hpl);
- data_t *d = detail::parent_from_member<data_t, root_plus_size>
- ( r, &data_t::root_plus_size_);
- slist_impl *s = detail::parent_from_member<slist_impl, data_t>(d, &slist_impl::data_);
- return *s;
- }
-};
-
-//! Helper metafunction to define a \c slist that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void, class O3 = void, class O4 = void, class O5 = void, class O6 = void>
-#endif
-struct make_slist
-{
- /// @cond
- typedef typename pack_options
- < slist_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
- typedef slist_impl
- < value_traits
- , typename packed_options::size_type
- , (std::size_t(packed_options::linear)*slist_bool_flags::linear_pos)
- |(std::size_t(packed_options::constant_time_size)*slist_bool_flags::constant_time_size_pos)
- |(std::size_t(packed_options::cache_last)*slist_bool_flags::cache_last_pos)
- , typename packed_options::header_holder_type
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class O1, class O2, class O3, class O4, class O5, class O6>
-#else
-template<class T, class ...Options>
-#endif
-class slist
- : public make_slist<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_slist
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6
- #else
- Options...
- #endif
- >::type Base;
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
- BOOST_MOVABLE_BUT_NOT_COPYABLE(slist)
-
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::size_type size_type;
- typedef typename Base::node_ptr node_ptr;
-
- slist()
- : Base()
- {}
-
- explicit slist(const value_traits &v_traits)
- : Base(v_traits)
- {}
-
- struct incorporate_t{};
-
- slist( const node_ptr & f, const node_ptr & before_l
- , size_type n, const value_traits &v_traits = value_traits())
- : Base(f, before_l, n, v_traits)
- {}
-
- template<class Iterator>
- slist(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
- : Base(b, e, v_traits)
- {}
-
- slist(BOOST_RV_REF(slist) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- slist& operator=(BOOST_RV_REF(slist) x)
- { return static_cast<slist &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- void clone_from(const slist &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- void clone_from(BOOST_RV_REF(slist) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-
- static slist &container_from_end_iterator(iterator end_iterator)
- { return static_cast<slist &>(Base::container_from_end_iterator(end_iterator)); }
-
- static const slist &container_from_end_iterator(const_iterator end_iterator)
- { return static_cast<const slist &>(Base::container_from_end_iterator(end_iterator)); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SLIST_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/splaytree_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/splaytree_algorithms.hpp
deleted file mode 100644
index be2e18227ed..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/splaytree_algorithms.hpp
+++ /dev/null
@@ -1,754 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-// The implementation of splay trees is based on the article and code published
-// in C++ Users Journal "Implementing Splay Trees in C++" (September 1, 2005).
-//
-// The splay code has been modified and (supposedly) improved by Ion Gaztanaga.
-//
-// Here is the copyright notice of the original file containing the splay code:
-//
-// splay_tree.h -- implementation of a STL compatible splay tree.
-//
-// Copyright (c) 2004 Ralf Mattethat
-//
-// Permission to copy, use, modify, sell and distribute this software
-// is granted provided this copyright notice appears in all copies.
-// This software is provided "as is" without express or implied
-// warranty, and with no claim as to its suitability for any purpose.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/intrusive/detail/uncast.hpp>
-#include <boost/intrusive/bstree_algorithms.hpp>
-
-#include <cstddef>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-namespace detail {
-
-template<class NodeTraits>
-struct splaydown_assemble_and_fix_header
-{
- typedef typename NodeTraits::node_ptr node_ptr;
-
- splaydown_assemble_and_fix_header(const node_ptr & t, const node_ptr & header, const node_ptr &leftmost, const node_ptr &rightmost)
- : t_(t)
- , null_node_(header)
- , l_(null_node_)
- , r_(null_node_)
- , leftmost_(leftmost)
- , rightmost_(rightmost)
- {}
-
- ~splaydown_assemble_and_fix_header()
- {
- this->assemble();
-
- //Now recover the original header except for the
- //splayed root node.
- //"t_" is the current root and "null_node_" is the header node
- NodeTraits::set_parent(null_node_, t_);
- NodeTraits::set_parent(t_, null_node_);
- //Recover leftmost/rightmost pointers
- NodeTraits::set_left (null_node_, leftmost_);
- NodeTraits::set_right(null_node_, rightmost_);
- }
-
- private:
-
- void assemble()
- {
- //procedure assemble;
- // left(r), right(l) := right(t), left(t);
- // left(t), right(t) := right(null), left(null);
- //end assemble;
- { // left(r), right(l) := right(t), left(t);
-
- node_ptr const old_t_left = NodeTraits::get_left(t_);
- node_ptr const old_t_right = NodeTraits::get_right(t_);
- NodeTraits::set_right(l_, old_t_left);
- NodeTraits::set_left (r_, old_t_right);
- if(old_t_left){
- NodeTraits::set_parent(old_t_left, l_);
- }
- if(old_t_right){
- NodeTraits::set_parent(old_t_right, r_);
- }
- }
- { // left(t), right(t) := right(null), left(null);
- node_ptr const null_right = NodeTraits::get_right(null_node_);
- node_ptr const null_left = NodeTraits::get_left(null_node_);
- NodeTraits::set_left (t_, null_right);
- NodeTraits::set_right(t_, null_left);
- if(null_right){
- NodeTraits::set_parent(null_right, t_);
- }
- if(null_left){
- NodeTraits::set_parent(null_left, t_);
- }
- }
- }
-
- public:
- node_ptr t_, null_node_, l_, r_, leftmost_, rightmost_;
-};
-
-} //namespace detail {
-/// @endcond
-
-//! A splay tree is an implementation of a binary search tree. The tree is
-//! self balancing using the splay algorithm as described in
-//!
-//! "Self-Adjusting Binary Search Trees
-//! by Daniel Dominic Sleator and Robert Endre Tarjan
-//! AT&T Bell Laboratories, Murray Hill, NJ
-//! Journal of the ACM, Vol 32, no 3, July 1985, pp 652-686
-//!
-//! splaytree_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the binary search tree
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
-//!
-//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
-//!
-//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
-template<class NodeTraits>
-class splaytree_algorithms
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_algorithms<NodeTraits>
- #endif
-{
- /// @cond
- private:
- typedef bstree_algorithms<NodeTraits> bstree_algo;
- /// @endcond
-
- public:
- typedef typename NodeTraits::node node;
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
-
- //! This type is the information that will be
- //! filled by insert_unique_check
- typedef typename bstree_algo::insert_commit_data insert_commit_data;
-
- public:
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
- static node_ptr get_header(const const_node_ptr & n);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
- static node_ptr begin_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
- static node_ptr end_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
- static void swap_tree(const node_ptr & header1, const node_ptr & header2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & node2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&,const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & header1, const node_ptr & node2, const node_ptr & header2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & header, const node_ptr & new_node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(const node_ptr&)
- static void unlink(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
- static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
- static bool unique(const const_node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
- static std::size_t size(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
- static node_ptr next_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
- static node_ptr prev_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init(const node_ptr&)
- static void init(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(const node_ptr&)
- static void init_header(const node_ptr & header);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::erase(const node_ptr&,const node_ptr&)
- //! Additional notes: the previous node of z is splayed to speed up range deletions.
- static void erase(const node_ptr & header, const node_ptr & z)
- {
- //posibility 1
- if(NodeTraits::get_left(z)){
- splay_up(bstree_algo::prev_node(z), header);
- }
-
- //possibility 2
- //if(NodeTraits::get_left(z)){
- // node_ptr l = NodeTraits::get_left(z);
- // splay_up(l, header);
- //}
-
- //if(NodeTraits::get_left(z)){
- // node_ptr l = bstree_algo::prev_node(z);
- // splay_up_impl(l, z);
- //}
-
- //possibility 4
- //splay_up(z, header);
-
- bstree_algo::erase(header, z);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
- template<class NodePtrCompare>
- static bool transfer_unique
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
- {
- typename bstree_algo::insert_commit_data commit_data;
- bool const transferable = bstree_algo::insert_unique_check(header1, z, comp, commit_data).second;
- if(transferable){
- erase(header2, z);
- bstree_algo::insert_commit(header1, z, commit_data);
- splay_up(z, header1);
- }
- return transferable;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
- template<class NodePtrCompare>
- static void transfer_equal
- (const node_ptr & header1, NodePtrCompare comp, const node_ptr &header2, const node_ptr & z)
- {
- insert_commit_data commit_data;
- splay_down(header1, z, comp);
- bstree_algo::insert_equal_upper_bound_check(header1, z, comp, commit_data);
- erase(header2, z);
- bstree_algo::insert_commit(header1, z, commit_data);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- static void clone
- (const const_node_ptr & source_header, const node_ptr & target_header, Cloner cloner, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
- template<class Disposer>
- static void clear_and_dispose(const node_ptr & header, Disposer disposer);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional notes: an element with key `key` is splayed.
- template<class KeyType, class KeyNodePtrCompare>
- static std::size_t count
- (const node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- std::pair<node_ptr, node_ptr> ret = equal_range(header, key, comp);
- std::size_t n = 0;
- while(ret.first != ret.second){
- ++n;
- ret.first = next_node(ret.first);
- }
- return n;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional note: no splaying is performed
- template<class KeyType, class KeyNodePtrCompare>
- static std::size_t count
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- { return bstree_algo::count(header, key, comp); }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional notes: the first node of the range is splayed.
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound
- (const node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- splay_down(detail::uncast(header), key, comp);
- node_ptr y = bstree_algo::lower_bound(header, key, comp);
- //splay_up(y, detail::uncast(header));
- return y;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional note: no splaying is performed
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- { return bstree_algo::lower_bound(header, key, comp); }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional notes: the first node of the range is splayed.
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound
- (const node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- splay_down(detail::uncast(header), key, comp);
- node_ptr y = bstree_algo::upper_bound(header, key, comp);
- //splay_up(y, detail::uncast(header));
- return y;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional note: no splaying is performed
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- { return bstree_algo::upper_bound(header, key, comp); }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
- //! Additional notes: the found node of the lower bound is splayed.
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr find
- (const node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- splay_down(detail::uncast(header), key, comp);
- return bstree_algo::find(header, key, comp);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
- //! Additional note: no splaying is performed
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr find
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- { return bstree_algo::find(header, key, comp); }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional notes: the first node of the range is splayed.
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> equal_range
- (const node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- splay_down(detail::uncast(header), key, comp);
- std::pair<node_ptr, node_ptr> ret = bstree_algo::equal_range(header, key, comp);
- //splay_up(ret.first, detail::uncast(header));
- return ret;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional note: no splaying is performed
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> equal_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- { return bstree_algo::equal_range(header, key, comp); }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional notes: the first node of the range is splayed.
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> lower_bound_range
- (const node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- {
- splay_down(detail::uncast(header), key, comp);
- std::pair<node_ptr, node_ptr> ret = bstree_algo::lower_bound_range(header, key, comp);
- //splay_up(ret.first, detail::uncast(header));
- return ret;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- //! Additional note: no splaying is performed
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> lower_bound_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
- { return bstree_algo::lower_bound_range(header, key, comp); }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
- //! Additional notes: the first node of the range is splayed.
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> bounded_range
- (const node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
- , bool left_closed, bool right_closed)
- {
- splay_down(detail::uncast(header), lower_key, comp);
- std::pair<node_ptr, node_ptr> ret =
- bstree_algo::bounded_range(header, lower_key, upper_key, comp, left_closed, right_closed);
- //splay_up(ret.first, detail::uncast(header));
- return ret;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
- //! Additional note: no splaying is performed
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> bounded_range
- (const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
- , bool left_closed, bool right_closed)
- { return bstree_algo::bounded_range(header, lower_key, upper_key, comp, left_closed, right_closed); }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(const node_ptr&,const node_ptr&,NodePtrCompare)
- //! Additional note: the inserted node is splayed
- template<class NodePtrCompare>
- static node_ptr insert_equal_upper_bound
- (const node_ptr & header, const node_ptr & new_node, NodePtrCompare comp)
- {
- splay_down(header, new_node, comp);
- return bstree_algo::insert_equal_upper_bound(header, new_node, comp);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_lower_bound(const node_ptr&,const node_ptr&,NodePtrCompare)
- //! Additional note: the inserted node is splayed
- template<class NodePtrCompare>
- static node_ptr insert_equal_lower_bound
- (const node_ptr & header, const node_ptr & new_node, NodePtrCompare comp)
- {
- splay_down(header, new_node, comp);
- return bstree_algo::insert_equal_lower_bound(header, new_node, comp);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal(const node_ptr&,const node_ptr&,const node_ptr&,NodePtrCompare)
- //! Additional note: the inserted node is splayed
- template<class NodePtrCompare>
- static node_ptr insert_equal
- (const node_ptr & header, const node_ptr & hint, const node_ptr & new_node, NodePtrCompare comp)
- {
- splay_down(header, new_node, comp);
- return bstree_algo::insert_equal(header, hint, new_node, comp);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(const node_ptr&,const node_ptr&,const node_ptr&)
- //! Additional note: the inserted node is splayed
- static node_ptr insert_before
- (const node_ptr & header, const node_ptr & pos, const node_ptr & new_node)
- {
- bstree_algo::insert_before(header, pos, new_node);
- splay_up(new_node, header);
- return new_node;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::push_back(const node_ptr&,const node_ptr&)
- //! Additional note: the inserted node is splayed
- static void push_back(const node_ptr & header, const node_ptr & new_node)
- {
- bstree_algo::push_back(header, new_node);
- splay_up(new_node, header);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::push_front(const node_ptr&,const node_ptr&)
- //! Additional note: the inserted node is splayed
- static void push_front(const node_ptr & header, const node_ptr & new_node)
- {
- bstree_algo::push_front(header, new_node);
- splay_up(new_node, header);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
- //! Additional note: nodes with the given key are splayed
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const node_ptr & header, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
- {
- splay_down(header, key, comp);
- return bstree_algo::insert_unique_check(header, key, comp, commit_data);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
- //! Additional note: nodes with the given key are splayed
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const node_ptr & header, const node_ptr &hint, const KeyType &key
- ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
- {
- splay_down(header, key, comp);
- return bstree_algo::insert_unique_check(header, hint, key, comp, commit_data);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(const node_ptr&,const node_ptr&,const insert_commit_data&)
- static void insert_unique_commit
- (const node_ptr & header, const node_ptr & new_value, const insert_commit_data &commit_data);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
- static bool is_header(const const_node_ptr & p);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::rebalance
- static void rebalance(const node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::rebalance_subtree
- static node_ptr rebalance_subtree(const node_ptr & old_root);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- // bottom-up splay, use data_ as parent for n | complexity : logarithmic | exception : nothrow
- static void splay_up(const node_ptr & node, const node_ptr & header)
- { priv_splay_up<true>(node, header); }
-
- // top-down splay | complexity : logarithmic | exception : strong, note A
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr splay_down(const node_ptr & header, const KeyType &key, KeyNodePtrCompare comp, bool *pfound = 0)
- { return priv_splay_down<true>(header, key, comp, pfound); }
-
- private:
-
- /// @cond
-
- // bottom-up splay, use data_ as parent for n | complexity : logarithmic | exception : nothrow
- template<bool SimpleSplay>
- static void priv_splay_up(const node_ptr & node, const node_ptr & header)
- {
- // If (node == header) do a splay for the right most node instead
- // this is to boost performance of equal_range/count on equivalent containers in the case
- // where there are many equal elements at the end
- node_ptr n((node == header) ? NodeTraits::get_right(header) : node);
- node_ptr t(header);
-
- if( n == t ) return;
-
- for( ;; ){
- node_ptr p(NodeTraits::get_parent(n));
- node_ptr g(NodeTraits::get_parent(p));
-
- if( p == t ) break;
-
- if( g == t ){
- // zig
- rotate(n);
- }
- else if ((NodeTraits::get_left(p) == n && NodeTraits::get_left(g) == p) ||
- (NodeTraits::get_right(p) == n && NodeTraits::get_right(g) == p) ){
- // zig-zig
- rotate(p);
- rotate(n);
- }
- else {
- // zig-zag
- rotate(n);
- if(!SimpleSplay){
- rotate(n);
- }
- }
- }
- }
-
- template<bool SimpleSplay, class KeyType, class KeyNodePtrCompare>
- static node_ptr priv_splay_down(const node_ptr & header, const KeyType &key, KeyNodePtrCompare comp, bool *pfound = 0)
- {
- //Most splay tree implementations use a dummy/null node to implement.
- //this function. This has some problems for a generic library like Intrusive:
- //
- // * The node might not have a default constructor.
- // * The default constructor could throw.
- //
- //We already have a header node. Leftmost and rightmost nodes of the tree
- //are not changed when splaying (because the invariants of the tree don't
- //change) We can back up them, use the header as the null node and
- //reassign old values after the function has been completed.
- node_ptr const old_root = NodeTraits::get_parent(header);
- node_ptr const leftmost = NodeTraits::get_left(header);
- node_ptr const rightmost = NodeTraits::get_right(header);
- if(leftmost == rightmost){ //Empty or unique node
- if(pfound){
- *pfound = old_root && !comp(key, old_root) && !comp(old_root, key);
- }
- return old_root ? old_root : header;
- }
- else{
- //Initialize "null node" (the header in our case)
- NodeTraits::set_left (header, node_ptr());
- NodeTraits::set_right(header, node_ptr());
- //Class that will backup leftmost/rightmost from header, commit the assemble(),
- //and will restore leftmost/rightmost to header even if "comp" throws
- detail::splaydown_assemble_and_fix_header<NodeTraits> commit(old_root, header, leftmost, rightmost);
- bool found = false;
-
- for( ;; ){
- if(comp(key, commit.t_)){
- node_ptr const t_left = NodeTraits::get_left(commit.t_);
- if(!t_left)
- break;
- if(comp(key, t_left)){
- bstree_algo::rotate_right_no_parent_fix(commit.t_, t_left);
- commit.t_ = t_left;
- if( !NodeTraits::get_left(commit.t_) )
- break;
- link_right(commit.t_, commit.r_);
- }
- else{
- link_right(commit.t_, commit.r_);
- if(!SimpleSplay && comp(t_left, key)){
- if( !NodeTraits::get_right(commit.t_) )
- break;
- link_left(commit.t_, commit.l_);
- }
- }
- }
- else if(comp(commit.t_, key)){
- node_ptr const t_right = NodeTraits::get_right(commit.t_);
- if(!t_right)
- break;
-
- if(comp(t_right, key)){
- bstree_algo::rotate_left_no_parent_fix(commit.t_, t_right);
- commit.t_ = t_right;
- if( !NodeTraits::get_right(commit.t_) )
- break;
- link_left(commit.t_, commit.l_);
- }
- else{
- link_left(commit.t_, commit.l_);
- if(!SimpleSplay && comp(key, t_right)){
- if( !NodeTraits::get_left(commit.t_) )
- break;
- link_right(commit.t_, commit.r_);
- }
- }
- }
- else{
- found = true;
- break;
- }
- }
-
- //commit.~splaydown_assemble_and_fix_header<NodeTraits>() will first
- //"assemble()" + link the new root & recover header's leftmost & rightmost
- if(pfound){
- *pfound = found;
- }
- return commit.t_;
- }
- }
-
- // break link to left child node and attach it to left tree pointed to by l | complexity : constant | exception : nothrow
- static void link_left(node_ptr & t, node_ptr & l)
- {
- //procedure link_left;
- // t, l, right(l) := right(t), t, t
- //end link_left
- NodeTraits::set_right(l, t);
- NodeTraits::set_parent(t, l);
- l = t;
- t = NodeTraits::get_right(t);
- }
-
- // break link to right child node and attach it to right tree pointed to by r | complexity : constant | exception : nothrow
- static void link_right(node_ptr & t, node_ptr & r)
- {
- //procedure link_right;
- // t, r, left(r) := left(t), t, t
- //end link_right;
- NodeTraits::set_left(r, t);
- NodeTraits::set_parent(t, r);
- r = t;
- t = NodeTraits::get_left(t);
- }
-
- // rotate n with its parent | complexity : constant | exception : nothrow
- static void rotate(const node_ptr & n)
- {
- //procedure rotate_left;
- // t, right(t), left(right(t)) := right(t), left(right(t)), t
- //end rotate_left;
- node_ptr p = NodeTraits::get_parent(n);
- node_ptr g = NodeTraits::get_parent(p);
- //Test if g is header before breaking tree
- //invariants that would make is_header invalid
- bool g_is_header = bstree_algo::is_header(g);
-
- if(NodeTraits::get_left(p) == n){
- NodeTraits::set_left(p, NodeTraits::get_right(n));
- if(NodeTraits::get_left(p))
- NodeTraits::set_parent(NodeTraits::get_left(p), p);
- NodeTraits::set_right(n, p);
- }
- else{ // must be ( p->right == n )
- NodeTraits::set_right(p, NodeTraits::get_left(n));
- if(NodeTraits::get_right(p))
- NodeTraits::set_parent(NodeTraits::get_right(p), p);
- NodeTraits::set_left(n, p);
- }
-
- NodeTraits::set_parent(p, n);
- NodeTraits::set_parent(n, g);
-
- if(g_is_header){
- if(NodeTraits::get_parent(g) == p)
- NodeTraits::set_parent(g, n);
- else{//must be ( g->right == p )
- BOOST_INTRUSIVE_INVARIANT_ASSERT(false);
- NodeTraits::set_right(g, n);
- }
- }
- else{
- if(NodeTraits::get_left(g) == p)
- NodeTraits::set_left(g, n);
- else //must be ( g->right == p )
- NodeTraits::set_right(g, n);
- }
- }
-
- /// @endcond
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<SplayTreeAlgorithms, NodeTraits>
-{
- typedef splaytree_algorithms<NodeTraits> type;
-};
-
-template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct get_node_checker<SplayTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/treap_algorithms.hpp b/src/third_party/boost-1.68.0/boost/intrusive/treap_algorithms.hpp
deleted file mode 100644
index b1a82b3d0f6..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/treap_algorithms.hpp
+++ /dev/null
@@ -1,699 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2006-2014.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
-#define BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <cstddef>
-
-#include <boost/intrusive/detail/assert.hpp>
-#include <boost/intrusive/detail/algo_type.hpp>
-#include <boost/intrusive/bstree_algorithms.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-namespace detail
-{
-
-template<class ValueTraits, class NodePtrPrioCompare, class ExtraChecker>
-struct treap_node_extra_checker
- : public ExtraChecker
-{
- typedef ExtraChecker base_checker_t;
- typedef ValueTraits value_traits;
- typedef typename value_traits::node_traits node_traits;
- typedef typename node_traits::const_node_ptr const_node_ptr;
-
- typedef typename base_checker_t::return_type return_type;
-
- treap_node_extra_checker(const NodePtrPrioCompare& prio_comp, ExtraChecker extra_checker)
- : base_checker_t(extra_checker), prio_comp_(prio_comp)
- {}
-
- void operator () (const const_node_ptr& p,
- const return_type& check_return_left, const return_type& check_return_right,
- return_type& check_return)
- {
- if (node_traits::get_left(p))
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!prio_comp_(node_traits::get_left(p), p));
- if (node_traits::get_right(p))
- BOOST_INTRUSIVE_INVARIANT_ASSERT(!prio_comp_(node_traits::get_right(p), p));
- base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
- }
-
- const NodePtrPrioCompare prio_comp_;
-};
-
-} // namespace detail
-
-#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-//! treap_algorithms provides basic algorithms to manipulate
-//! nodes forming a treap.
-//!
-//! (1) the header node is maintained with links not only to the root
-//! but also to the leftmost node of the tree, to enable constant time
-//! begin(), and to the rightmost node of the tree, to enable linear time
-//! performance when used with the generic set algorithms (set_union,
-//! etc.);
-//!
-//! (2) when a node being deleted has two children its successor node is
-//! relinked into its place, rather than copied, so that the only
-//! pointers invalidated are those referring to the deleted node.
-//!
-//! treap_algorithms is configured with a NodeTraits class, which encapsulates the
-//! information about the node to be manipulated. NodeTraits must support the
-//! following interface:
-//!
-//! <b>Typedefs</b>:
-//!
-//! <tt>node</tt>: The type of the node that forms the treap
-//!
-//! <tt>node_ptr</tt>: A pointer to a node
-//!
-//! <tt>const_node_ptr</tt>: A pointer to a const node
-//!
-//! <b>Static functions</b>:
-//!
-//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
-//!
-//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
-//!
-//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
-//!
-//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
-template<class NodeTraits>
-class treap_algorithms
- #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- : public bstree_algorithms<NodeTraits>
- #endif
-{
- public:
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
-
- /// @cond
- private:
-
- typedef bstree_algorithms<NodeTraits> bstree_algo;
-
- class rerotate_on_destroy
- {
- rerotate_on_destroy& operator=(const rerotate_on_destroy&);
-
- public:
- rerotate_on_destroy(const node_ptr & header, const node_ptr & p, std::size_t &n)
- : header_(header), p_(p), n_(n), remove_it_(true)
- {}
-
- ~rerotate_on_destroy()
- {
- if(remove_it_){
- rotate_up_n(header_, p_, n_);
- }
- }
-
- void release()
- { remove_it_ = false; }
-
- const node_ptr header_;
- const node_ptr p_;
- std::size_t &n_;
- bool remove_it_;
- };
-
- static void rotate_up_n(const node_ptr header, const node_ptr p, std::size_t n)
- {
- node_ptr p_parent(NodeTraits::get_parent(p));
- node_ptr p_grandparent(NodeTraits::get_parent(p_parent));
- while(n--){
- if(p == NodeTraits::get_left(p_parent)){ //p is left child
- bstree_algo::rotate_right(p_parent, p, p_grandparent, header);
- }
- else{ //p is right child
- bstree_algo::rotate_left(p_parent, p, p_grandparent, header);
- }
- p_parent = p_grandparent;
- p_grandparent = NodeTraits::get_parent(p_parent);
- }
- }
-
- /// @endcond
-
- public:
- //! This type is the information that will be
- //! filled by insert_unique_check
- struct insert_commit_data
- /// @cond
- : public bstree_algo::insert_commit_data
- /// @endcond
- {
- /// @cond
- std::size_t rotations;
- /// @endcond
- };
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
- static node_ptr get_header(const const_node_ptr & n);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
- static node_ptr begin_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
- static node_ptr end_node(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
- static void swap_tree(const node_ptr & header1, const node_ptr & header2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & node2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(const node_ptr&,const node_ptr&,const node_ptr&,const node_ptr&)
- static void swap_nodes(const node_ptr & node1, const node_ptr & header1, const node_ptr & node2, const node_ptr & header2);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & new_node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(const node_ptr&,const node_ptr&,const node_ptr&)
- static void replace_node(const node_ptr & node_to_be_replaced, const node_ptr & header, const node_ptr & new_node);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(const node_ptr&)
- template<class NodePtrPriorityCompare>
- static void unlink(const node_ptr & node, NodePtrPriorityCompare pcomp)
- {
- node_ptr x = NodeTraits::get_parent(node);
- if(x){
- while(!bstree_algo::is_header(x))
- x = NodeTraits::get_parent(x);
- erase(x, node, pcomp);
- }
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
- static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
- static bool unique(const const_node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
- static std::size_t size(const const_node_ptr & header);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
- static node_ptr next_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
- static node_ptr prev_node(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init(const node_ptr&)
- static void init(const node_ptr & node);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(const node_ptr&)
- static void init_header(const node_ptr & header);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::erase(const node_ptr&,const node_ptr&)
- template<class NodePtrPriorityCompare>
- static node_ptr erase(const node_ptr & header, const node_ptr & z, NodePtrPriorityCompare pcomp)
- {
- rebalance_for_erasure(header, z, pcomp);
- bstree_algo::erase(header, z);
- return z;
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,const node_ptr&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- static void clone
- (const const_node_ptr & source_header, const node_ptr & target_header, Cloner cloner, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
- template<class Disposer>
- static void clear_and_dispose(const node_ptr & header, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr lower_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr upper_bound
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static node_ptr find
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> equal_range
- (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
- template<class KeyType, class KeyNodePtrCompare>
- static std::pair<node_ptr, node_ptr> bounded_range
- (const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
- , bool left_closed, bool right_closed);
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
- template<class KeyType, class KeyNodePtrCompare>
- static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! <b>Requires</b>: "h" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before the upper bound
- //! according to "comp" and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throw or "pcomp" throw.
- template<class NodePtrCompare, class NodePtrPriorityCompare>
- static node_ptr insert_equal_upper_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_equal_upper_bound_check(h, new_node, comp, commit_data);
- rebalance_check_and_commit(h, new_node, pcomp, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "h" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before the upper bound
- //! according to "comp" and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Average complexity for insert element is at
- //! most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- template<class NodePtrCompare, class NodePtrPriorityCompare>
- static node_ptr insert_equal_lower_bound
- (const node_ptr & h, const node_ptr & new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_equal_lower_bound_check(h, new_node, comp, commit_data);
- rebalance_check_and_commit(h, new_node, pcomp, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! NodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
- //! the "header"'s tree.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
- //! where it will be inserted. If "hint" is the upper_bound
- //! the insertion takes constant time (two comparisons in the worst case).
- //! Rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Logarithmic in general, but it is amortized
- //! constant time if new_node is inserted immediately before "hint".
- //!
- //! <b>Throws</b>: If "comp" throw or "pcomp" throw.
- template<class NodePtrCompare, class NodePtrPriorityCompare>
- static node_ptr insert_equal
- (const node_ptr & h, const node_ptr & hint, const node_ptr & new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_equal_check(h, hint, new_node, comp, commit_data);
- rebalance_check_and_commit(h, new_node, pcomp, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "pos" must be a valid node of the tree (including header end) node.
- //! "pos" must be a node pointing to the successor to "new_node"
- //! once inserted according to the order of already inserted nodes. This function does not
- //! check "pos" and this precondition must be guaranteed by the caller.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts new_node into the tree before "pos"
- //! and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
- //!
- //! <b>Note</b>: If "pos" is not the successor of the newly inserted "new_node"
- //! tree invariants might be broken.
- template<class NodePtrPriorityCompare>
- static node_ptr insert_before
- (const node_ptr & header, const node_ptr & pos, const node_ptr & new_node, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_before_check(header, pos, commit_data);
- rebalance_check_and_commit(header, new_node, pcomp, commit_data);
- return new_node;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "new_node" must be, according to the used ordering no less than the
- //! greatest inserted key.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts x into the tree in the last position
- //! and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
- //!
- //! <b>Note</b>: If "new_node" is less than the greatest inserted key
- //! tree invariants are broken. This function is slightly faster than
- //! using "insert_before".
- template<class NodePtrPriorityCompare>
- static void push_back(const node_ptr & header, const node_ptr & new_node, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::push_back_check(header, commit_data);
- rebalance_check_and_commit(header, new_node, pcomp, commit_data);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "new_node" must be, according to the used ordering, no greater than the
- //! lowest inserted key.
- //! NodePtrPriorityCompare is a priority function object that induces a strict weak
- //! ordering compatible with the one used to create the
- //! the tree. NodePtrPriorityCompare compares two node_ptrs.
- //!
- //! <b>Effects</b>: Inserts x into the tree in the first position
- //! and rotates the tree according to "pcomp".
- //!
- //! <b>Complexity</b>: Constant-time.
- //!
- //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
- //!
- //! <b>Note</b>: If "new_node" is greater than the lowest inserted key
- //! tree invariants are broken. This function is slightly faster than
- //! using "insert_before".
- template<class NodePtrPriorityCompare>
- static void push_front(const node_ptr & header, const node_ptr & new_node, NodePtrPriorityCompare pcomp)
- {
- insert_commit_data commit_data;
- bstree_algo::push_front_check(header, commit_data);
- rebalance_check_and_commit(header, new_node, pcomp, commit_data);
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares KeyType with a node_ptr.
- //!
- //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
- //! tree according to "comp" and obtains the needed information to realize
- //! a constant-time node insertion if there is no equivalent node.
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing a node_ptr to the already present node
- //! and false. If there is not equivalent key can be inserted returns true
- //! in the returned pair's boolean and fills "commit_data" that is meant to
- //! be used with the "insert_commit" function to achieve a constant-time
- //! insertion function.
- //!
- //! <b>Complexity</b>: Average complexity is at most logarithmic.
- //!
- //! <b>Throws</b>: If "comp" throws.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a node is expensive and the user does not want to have two equivalent nodes
- //! in the tree: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the order is much cheaper to construct
- //! than the node and this function offers the possibility to use that part
- //! to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the node and use
- //! "insert_commit" to insert the node in constant-time. This gives a total
- //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
- //! if no more objects are inserted or erased from the set.
- template<class KeyType, class KeyNodePtrCompare, class KeyNodePtrPrioCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const KeyType &key
- ,KeyNodePtrCompare comp, KeyNodePtrPrioCompare pcomp
- ,insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> ret =
- bstree_algo::insert_unique_check(header, key, comp, commit_data);
- if(ret.second)
- rebalance_after_insertion_check(header, commit_data.node, key, pcomp, commit_data.rotations);
- return ret;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! KeyNodePtrCompare is a function object that induces a strict weak
- //! ordering compatible with the strict weak ordering used to create the
- //! the tree. NodePtrCompare compares KeyType with a node_ptr.
- //! "hint" is node from the "header"'s tree.
- //!
- //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
- //! tree according to "comp" using "hint" as a hint to where it should be
- //! inserted and obtains the needed information to realize
- //! a constant-time node insertion if there is no equivalent node.
- //! If "hint" is the upper_bound the function has constant time
- //! complexity (two comparisons in the worst case).
- //!
- //! <b>Returns</b>: If there is an equivalent value
- //! returns a pair containing a node_ptr to the already present node
- //! and false. If there is not equivalent key can be inserted returns true
- //! in the returned pair's boolean and fills "commit_data" that is meant to
- //! be used with the "insert_commit" function to achieve a constant-time
- //! insertion function.
- //!
- //! <b>Complexity</b>: Average complexity is at most logarithmic, but it is
- //! amortized constant time if new_node should be inserted immediately before "hint".
- //!
- //! <b>Throws</b>: If "comp" throws.
- //!
- //! <b>Notes</b>: This function is used to improve performance when constructing
- //! a node is expensive and the user does not want to have two equivalent nodes
- //! in the tree: if there is an equivalent value
- //! the constructed object must be discarded. Many times, the part of the
- //! node that is used to impose the order is much cheaper to construct
- //! than the node and this function offers the possibility to use that part
- //! to check if the insertion will be successful.
- //!
- //! If the check is successful, the user can construct the node and use
- //! "insert_commit" to insert the node in constant-time. This gives a total
- //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
- //!
- //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
- //! if no more objects are inserted or erased from the set.
- template<class KeyType, class KeyNodePtrCompare, class KeyNodePtrPrioCompare>
- static std::pair<node_ptr, bool> insert_unique_check
- (const const_node_ptr & header, const node_ptr & hint, const KeyType &key
- ,KeyNodePtrCompare comp, KeyNodePtrPrioCompare pcomp, insert_commit_data &commit_data)
- {
- std::pair<node_ptr, bool> ret =
- bstree_algo::insert_unique_check(header, hint, key, comp, commit_data);
- if(ret.second)
- rebalance_after_insertion_check(header, commit_data.node, key, pcomp, commit_data.rotations);
- return ret;
- }
-
- //! <b>Requires</b>: "header" must be the header node of a tree.
- //! "commit_data" must have been obtained from a previous call to
- //! "insert_unique_check". No objects should have been inserted or erased
- //! from the set between the "insert_unique_check" that filled "commit_data"
- //! and the call to "insert_commit".
- //!
- //!
- //! <b>Effects</b>: Inserts new_node in the set using the information obtained
- //! from the "commit_data" that a previous "insert_check" filled.
- //!
- //! <b>Complexity</b>: Constant time.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Notes</b>: This function has only sense if a "insert_unique_check" has been
- //! previously executed to fill "commit_data". No value should be inserted or
- //! erased between the "insert_check" and "insert_commit" calls.
- static void insert_unique_commit
- (const node_ptr & header, const node_ptr & new_node, const insert_commit_data &commit_data)
- {
- bstree_algo::insert_unique_commit(header, new_node, commit_data);
- rotate_up_n(header, new_node, commit_data.rotations);
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
- template<class NodePtrCompare, class KeyNodePtrPrioCompare>
- static bool transfer_unique
- (const node_ptr & header1, NodePtrCompare comp, KeyNodePtrPrioCompare pcomp, const node_ptr &header2, const node_ptr & z)
- {
- insert_commit_data commit_data;
- bool const transferable = insert_unique_check(header1, z, comp, pcomp, commit_data).second;
- if(transferable){
- erase(header2, z, pcomp);
- insert_unique_commit(header1, z, commit_data);
- }
- return transferable;
- }
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
- template<class NodePtrCompare, class KeyNodePtrPrioCompare>
- static void transfer_equal
- (const node_ptr & header1, NodePtrCompare comp, KeyNodePtrPrioCompare pcomp, const node_ptr &header2, const node_ptr & z)
- {
- insert_commit_data commit_data;
- bstree_algo::insert_equal_upper_bound_check(header1, z, comp, commit_data);
- rebalance_after_insertion_check(header1, commit_data.node, z, pcomp, commit_data.rotations);
- rebalance_for_erasure(header2, z, pcomp);
- bstree_algo::erase(header2, z);
- bstree_algo::insert_unique_commit(header1, z, commit_data);
- rotate_up_n(header1, z, commit_data.rotations);
- }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
- static bool is_header(const const_node_ptr & p);
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- /// @cond
- private:
-
- template<class NodePtrPriorityCompare>
- static void rebalance_for_erasure(const node_ptr & header, const node_ptr & z, NodePtrPriorityCompare pcomp)
- {
- std::size_t n = 0;
- rerotate_on_destroy rb(header, z, n);
-
- node_ptr z_left = NodeTraits::get_left(z);
- node_ptr z_right = NodeTraits::get_right(z);
- while(z_left || z_right){
- const node_ptr z_parent(NodeTraits::get_parent(z));
- if(!z_right || (z_left && pcomp(z_left, z_right))){
- bstree_algo::rotate_right(z, z_left, z_parent, header);
- }
- else{
- bstree_algo::rotate_left(z, z_right, z_parent, header);
- }
- ++n;
- z_left = NodeTraits::get_left(z);
- z_right = NodeTraits::get_right(z);
- }
- rb.release();
- }
-
- template<class NodePtrPriorityCompare>
- static void rebalance_check_and_commit
- (const node_ptr & h, const node_ptr & new_node, NodePtrPriorityCompare pcomp, insert_commit_data &commit_data)
- {
- rebalance_after_insertion_check(h, commit_data.node, new_node, pcomp, commit_data.rotations);
- //No-throw
- bstree_algo::insert_unique_commit(h, new_node, commit_data);
- rotate_up_n(h, new_node, commit_data.rotations);
- }
-
- template<class Key, class KeyNodePriorityCompare>
- static void rebalance_after_insertion_check
- (const const_node_ptr &header, const const_node_ptr & up, const Key &k
- , KeyNodePriorityCompare pcomp, std::size_t &num_rotations)
- {
- const_node_ptr upnode(up);
- //First check rotations since pcomp can throw
- num_rotations = 0;
- std::size_t n = 0;
- while(upnode != header && pcomp(k, upnode)){
- ++n;
- upnode = NodeTraits::get_parent(upnode);
- }
- num_rotations = n;
- }
-
- template<class NodePtrPriorityCompare>
- static bool check_invariant(const const_node_ptr & header, NodePtrPriorityCompare pcomp)
- {
- node_ptr beg = begin_node(header);
- node_ptr end = end_node(header);
-
- while(beg != end){
- node_ptr p = NodeTraits::get_parent(beg);
- if(p != header){
- if(pcomp(beg, p))
- return false;
- }
- beg = next_node(beg);
- }
- return true;
- }
-
- /// @endcond
-};
-
-/// @cond
-
-template<class NodeTraits>
-struct get_algo<TreapAlgorithms, NodeTraits>
-{
- typedef treap_algorithms<NodeTraits> type;
-};
-
-template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
-struct get_node_checker<TreapAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
-{
- typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
-};
-
-/// @endcond
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/unordered_set.hpp b/src/third_party/boost-1.68.0/boost/intrusive/unordered_set.hpp
deleted file mode 100644
index cf60dc4f7a5..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/unordered_set.hpp
+++ /dev/null
@@ -1,990 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2014
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_INTRUSIVE_UNORDERED_SET_HPP
-#define BOOST_INTRUSIVE_UNORDERED_SET_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-#include <boost/intrusive/hashtable.hpp>
-#include <boost/move/utility_core.hpp>
-#include <boost/static_assert.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-//! The class template unordered_set is an intrusive container, that mimics most of
-//! the interface of std::tr1::unordered_set as described in the C++ TR1.
-//!
-//! unordered_set is a semi-intrusive container: each object to be stored in the
-//! container must contain a proper hook, but the container also needs
-//! additional auxiliary memory to work: unordered_set needs a pointer to an array
-//! of type `bucket_type` to be passed in the constructor. This bucket array must
-//! have at least the same lifetime as the container. This makes the use of
-//! unordered_set more complicated than purely intrusive containers.
-//! `bucket_type` is default-constructible, copyable and assignable
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
-//! \c bucket_traits<>, \c power_2_buckets<> and \c cache_begin<>.
-//!
-//! unordered_set only provides forward iterators but it provides 4 iterator types:
-//! iterator and const_iterator to navigate through the whole container and
-//! local_iterator and const_local_iterator to navigate through the values
-//! stored in a single bucket. Local iterators are faster and smaller.
-//!
-//! It's not recommended to use non constant-time size unordered_sets because several
-//! key functions, like "empty()", become non-constant time functions. Non
-//! constant-time size unordered_sets are mainly provided to support auto-unlink hooks.
-//!
-//! unordered_set, unlike std::unordered_set, does not make automatic rehashings nor
-//! offers functions related to a load factor. Rehashing can be explicitly requested
-//! and the user must provide a new bucket array that will be used from that moment.
-//!
-//! Since no automatic rehashing is done, iterators are never invalidated when
-//! inserting or erasing elements. Iterators are only invalidated when rehasing.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
-#endif
-class unordered_set_impl
- : public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos>
-{
- /// @cond
- private:
- typedef hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos> table_type;
-
- template<class Iterator, class MaybeConstThis, class KeyType, class KeyHasher, class KeyEqual>
- static std::pair<Iterator,Iterator> priv_equal_range(MaybeConstThis &c, const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
- {
- Iterator const it = c.find(key, hash_func, equal_func);
- std::pair<Iterator,Iterator> ret(it, it);
- if(it != c.end())
- ++ret.second;
- return ret;
- }
-
- //! This class is
- //! movable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_set_impl)
-
- typedef table_type implementation_defined;
- /// @endcond
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::key_of_value key_of_value;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::bucket_traits bucket_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::key_equal key_equal;
- typedef typename implementation_defined::hasher hasher;
- typedef typename implementation_defined::bucket_type bucket_type;
- typedef typename implementation_defined::bucket_ptr bucket_ptr;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::local_iterator local_iterator;
- typedef typename implementation_defined::const_local_iterator const_local_iterator;
- typedef typename implementation_defined::node_traits node_traits;
- typedef typename implementation_defined::node node;
- typedef typename implementation_defined::node_ptr node_ptr;
- typedef typename implementation_defined::const_node_ptr const_node_ptr;
- typedef typename implementation_defined::node_algorithms node_algorithms;
-
- public:
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
- BOOST_INTRUSIVE_FORCEINLINE explicit unordered_set_impl( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : table_type(b_traits, hash_func, equal_func, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(bool,Iterator,Iterator,const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl( Iterator b
- , Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : table_type(true, b, e, b_traits, hash_func, equal_func, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(hashtable&&)
- BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl(BOOST_RV_REF(unordered_set_impl) x)
- : table_type(BOOST_MOVE_BASE(table_type, x))
- {}
-
- //! @copydoc ::boost::intrusive::hashtable::operator=(hashtable&&)
- BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl& operator=(BOOST_RV_REF(unordered_set_impl) x)
- { return static_cast<unordered_set_impl&>(table_type::operator=(BOOST_MOVE_BASE(table_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
- //! @copydoc ::boost::intrusive::hashtable::~hashtable()
- ~unordered_set_impl();
-
- //! @copydoc ::boost::intrusive::hashtable::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::hashtable::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::hashtable::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::hashtable::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::hashtable::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::hashtable::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::hashtable::hash_function()const
- hasher hash_function() const;
-
- //! @copydoc ::boost::intrusive::hashtable::key_eq()const
- key_equal key_eq() const;
-
- //! @copydoc ::boost::intrusive::hashtable::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::hashtable::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable
- void swap(unordered_set_impl& other);
-
- //! @copydoc ::boost::intrusive::hashtable::clone_from(const hashtable&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const unordered_set_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using table_type::clone_from;
-
- #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::clone_from(hashtable&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_set_impl) src, Cloner cloner, Disposer disposer)
- { table_type::clone_from(BOOST_MOVE_BASE(table_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique(reference)
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert(reference value)
- { return table_type::insert_unique(value); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique(Iterator,Iterator)
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE void insert(Iterator b, Iterator e)
- { table_type::insert_unique(b, e); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique_check(const key_type&,insert_commit_data&)
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_check(const key_type &key, insert_commit_data &commit_data)
- { return table_type::insert_unique_check(key, commit_data); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique_check(const KeyType&,KeyHasher,KeyEqual,insert_commit_data&)
- template<class KeyType, class KeyHasher, class KeyEqual>
- BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_check
- (const KeyType &key, KeyHasher hasher, KeyEqual key_value_equal, insert_commit_data &commit_data)
- { return table_type::insert_unique_check(key, hasher, key_value_equal, commit_data); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_unique_commit
- BOOST_INTRUSIVE_FORCEINLINE iterator insert_commit(reference value, const insert_commit_data &commit_data)
- { return table_type::insert_unique_commit(value, commit_data); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator)
- void erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator,const_iterator)
- void erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const KeyType&,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- BOOST_INTRUSIVE_DOC1ST(void
- , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
- erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const key_type &,Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const KeyType&,KeyHasher,KeyEqual,Disposer)
- template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::hashtable::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::count(const KeyType&,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type count(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- const_iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
- #endif
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)
- std::pair<iterator,iterator> equal_range(const key_type &key)
- { return this->equal_range(key, this->hash_function(), this->key_eq()); }
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
- { return this->priv_equal_range<iterator>(*this, key, hash_func, equal_func); }
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const
- { return this->equal_range(key, this->hash_function(), this->key_eq()); }
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const
- { return this->priv_equal_range<const_iterator>(*this, key, hash_func, equal_func); }
-
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- //! @copydoc ::boost::intrusive::hashtable::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(reference)
- static local_iterator s_local_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(const_reference)
- static const_local_iterator s_local_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(reference)
- local_iterator local_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(const_reference)
- const_local_iterator local_iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_count
- size_type bucket_count() const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_size
- size_type bucket_size(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket(const key_type&)const
- size_type bucket(const key_type& k) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket(const KeyType&,KeyHasher)const
- template<class KeyType, class KeyHasher>
- size_type bucket(const KeyType& k, KeyHasher hash_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_pointer
- bucket_ptr bucket_pointer() const;
-
- //! @copydoc ::boost::intrusive::hashtable::begin(size_type)
- local_iterator begin(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::begin(size_type)const
- const_local_iterator begin(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::cbegin(size_type)const
- const_local_iterator cbegin(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::end(size_type)
- local_iterator end(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::end(size_type)const
- const_local_iterator end(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::cend(size_type)const
- const_local_iterator cend(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
- void rehash(const bucket_traits &new_bucket_traits);
-
- //! @copydoc ::boost::intrusive::hashtable::full_rehash
- void full_rehash();
-
- //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(bool)
- bool incremental_rehash(bool grow = true);
-
- //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(const bucket_traits &)
- bool incremental_rehash(const bucket_traits &new_bucket_traits);
-
- //! @copydoc ::boost::intrusive::hashtable::split_count
- size_type split_count() const;
-
- //! @copydoc ::boost::intrusive::hashtable::suggested_upper_bucket_count
- static size_type suggested_upper_bucket_count(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::suggested_lower_bucket_count
- static size_type suggested_lower_bucket_count(size_type n);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- friend bool operator==(const unordered_set_impl &x, const unordered_set_impl &y)
- {
- if(table_type::constant_time_size && x.size() != y.size()){
- return false;
- }
- //Find each element of x in y
- for (const_iterator ix = x.cbegin(), ex = x.cend(), ey = y.cend(); ix != ex; ++ix){
- const_iterator iy = y.find(key_of_value()(*ix));
- if (iy == ey || !(*ix == *iy))
- return false;
- }
- return true;
- }
-
- friend bool operator!=(const unordered_set_impl &x, const unordered_set_impl &y)
- { return !(x == y); }
-
- friend bool operator<(const unordered_set_impl &x, const unordered_set_impl &y)
- { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
-
- friend bool operator>(const unordered_set_impl &x, const unordered_set_impl &y)
- { return y < x; }
-
- friend bool operator<=(const unordered_set_impl &x, const unordered_set_impl &y)
- { return !(y < x); }
-
- friend bool operator>=(const unordered_set_impl &x, const unordered_set_impl &y)
- { return !(x < y); }
-};
-
-//! Helper metafunction to define an \c unordered_set that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void
- , class O7 = void, class O8 = void
- , class O9 = void, class O10= void
- >
-#endif
-struct make_unordered_set
-{
- /// @cond
- typedef typename pack_options
- < hashtable_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef typename make_bucket_traits
- <T, true, packed_options>::type bucket_traits;
-
- typedef unordered_set_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::hash
- , typename packed_options::equal
- , typename packed_options::size_type
- , bucket_traits
- , (std::size_t(true)*hash_bool_flags::unique_keys_pos)
- | (std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
- | (std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
- | (std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
- | (std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
- | (std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
- > implementation_defined;
-
- /// @endcond
- typedef implementation_defined type;
-};
-
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
-#else
-template<class T, class ...Options>
-#endif
-class unordered_set
- : public make_unordered_set<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_unordered_set
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type Base;
-
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
- BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_set)
-
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::bucket_traits bucket_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::bucket_ptr bucket_ptr;
- typedef typename Base::size_type size_type;
- typedef typename Base::hasher hasher;
- typedef typename Base::key_equal key_equal;
-
- explicit unordered_set ( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b_traits, hash_func, equal_func, v_traits)
- {}
-
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE unordered_set
- ( Iterator b, Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, b_traits, hash_func, equal_func, v_traits)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE unordered_set(BOOST_RV_REF(unordered_set) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE unordered_set& operator=(BOOST_RV_REF(unordered_set) x)
- { return static_cast<unordered_set&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(const unordered_set &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_set) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-};
-
-#endif
-
-
-//! The class template unordered_multiset is an intrusive container, that mimics most of
-//! the interface of std::tr1::unordered_multiset as described in the C++ TR1.
-//!
-//! unordered_multiset is a semi-intrusive container: each object to be stored in the
-//! container must contain a proper hook, but the container also needs
-//! additional auxiliary memory to work: unordered_multiset needs a pointer to an array
-//! of type `bucket_type` to be passed in the constructor. This bucket array must
-//! have at least the same lifetime as the container. This makes the use of
-//! unordered_multiset more complicated than purely intrusive containers.
-//! `bucket_type` is default-constructible, copyable and assignable
-//!
-//! The template parameter \c T is the type to be managed by the container.
-//! The user can specify additional options and if no options are provided
-//! default options are used.
-//!
-//! The container supports the following options:
-//! \c base_hook<>/member_hook<>/value_traits<>,
-//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
-//! \c bucket_traits<>, \c power_2_buckets<> and \c cache_begin<>.
-//!
-//! unordered_multiset only provides forward iterators but it provides 4 iterator types:
-//! iterator and const_iterator to navigate through the whole container and
-//! local_iterator and const_local_iterator to navigate through the values
-//! stored in a single bucket. Local iterators are faster and smaller.
-//!
-//! It's not recommended to use non constant-time size unordered_multisets because several
-//! key functions, like "empty()", become non-constant time functions. Non
-//! constant-time size unordered_multisets are mainly provided to support auto-unlink hooks.
-//!
-//! unordered_multiset, unlike std::unordered_set, does not make automatic rehashings nor
-//! offers functions related to a load factor. Rehashing can be explicitly requested
-//! and the user must provide a new bucket array that will be used from that moment.
-//!
-//! Since no automatic rehashing is done, iterators are never invalidated when
-//! inserting or erasing elements. Iterators are only invalidated when rehasing.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
-template<class T, class ...Options>
-#else
-template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
-#endif
-class unordered_multiset_impl
- : public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags>
-{
- /// @cond
- private:
- typedef hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags> table_type;
- /// @endcond
-
- //Movable
- BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_multiset_impl)
-
- typedef table_type implementation_defined;
-
- public:
- typedef typename implementation_defined::value_type value_type;
- typedef typename implementation_defined::key_type key_type;
- typedef typename implementation_defined::value_traits value_traits;
- typedef typename implementation_defined::bucket_traits bucket_traits;
- typedef typename implementation_defined::pointer pointer;
- typedef typename implementation_defined::const_pointer const_pointer;
- typedef typename implementation_defined::reference reference;
- typedef typename implementation_defined::const_reference const_reference;
- typedef typename implementation_defined::difference_type difference_type;
- typedef typename implementation_defined::size_type size_type;
- typedef typename implementation_defined::key_equal key_equal;
- typedef typename implementation_defined::hasher hasher;
- typedef typename implementation_defined::bucket_type bucket_type;
- typedef typename implementation_defined::bucket_ptr bucket_ptr;
- typedef typename implementation_defined::iterator iterator;
- typedef typename implementation_defined::const_iterator const_iterator;
- typedef typename implementation_defined::insert_commit_data insert_commit_data;
- typedef typename implementation_defined::local_iterator local_iterator;
- typedef typename implementation_defined::const_local_iterator const_local_iterator;
- typedef typename implementation_defined::node_traits node_traits;
- typedef typename implementation_defined::node node;
- typedef typename implementation_defined::node_ptr node_ptr;
- typedef typename implementation_defined::const_node_ptr const_node_ptr;
- typedef typename implementation_defined::node_algorithms node_algorithms;
-
- public:
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
- BOOST_INTRUSIVE_FORCEINLINE explicit unordered_multiset_impl ( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : table_type(b_traits, hash_func, equal_func, v_traits)
- {}
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable(bool,Iterator,Iterator,const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl ( Iterator b
- , Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : table_type(false, b, e, b_traits, hash_func, equal_func, v_traits)
- {}
-
- //! <b>Effects</b>: to-do
- //!
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl(BOOST_RV_REF(unordered_multiset_impl) x)
- : table_type(BOOST_MOVE_BASE(table_type, x))
- {}
-
- //! <b>Effects</b>: to-do
- //!
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl& operator=(BOOST_RV_REF(unordered_multiset_impl) x)
- { return static_cast<unordered_multiset_impl&>(table_type::operator=(BOOST_MOVE_BASE(table_type, x))); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::~hashtable()
- ~unordered_multiset_impl();
-
- //! @copydoc ::boost::intrusive::hashtable::begin()
- iterator begin();
-
- //! @copydoc ::boost::intrusive::hashtable::begin()const
- const_iterator begin() const;
-
- //! @copydoc ::boost::intrusive::hashtable::cbegin()const
- const_iterator cbegin() const;
-
- //! @copydoc ::boost::intrusive::hashtable::end()
- iterator end();
-
- //! @copydoc ::boost::intrusive::hashtable::end()const
- const_iterator end() const;
-
- //! @copydoc ::boost::intrusive::hashtable::cend()const
- const_iterator cend() const;
-
- //! @copydoc ::boost::intrusive::hashtable::hash_function()const
- hasher hash_function() const;
-
- //! @copydoc ::boost::intrusive::hashtable::key_eq()const
- key_equal key_eq() const;
-
- //! @copydoc ::boost::intrusive::hashtable::empty()const
- bool empty() const;
-
- //! @copydoc ::boost::intrusive::hashtable::size()const
- size_type size() const;
-
- //! @copydoc ::boost::intrusive::hashtable::hashtable
- void swap(unordered_multiset_impl& other);
-
- //! @copydoc ::boost::intrusive::hashtable::clone_from(const hashtable&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- void clone_from(const unordered_multiset_impl &src, Cloner cloner, Disposer disposer);
-
- #else
-
- using table_type::clone_from;
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::clone_from(hashtable&&,Cloner,Disposer)
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_multiset_impl) src, Cloner cloner, Disposer disposer)
- { table_type::clone_from(BOOST_MOVE_BASE(table_type, src), cloner, disposer); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_equal(reference)
- BOOST_INTRUSIVE_FORCEINLINE iterator insert(reference value)
- { return table_type::insert_equal(value); }
-
- //! @copydoc ::boost::intrusive::hashtable::insert_equal(Iterator,Iterator)
- template<class Iterator>
- BOOST_INTRUSIVE_FORCEINLINE void insert(Iterator b, Iterator e)
- { table_type::insert_equal(b, e); }
-
- #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator)
- void erase(const_iterator i);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator,const_iterator)
- void erase(const_iterator b, const_iterator e);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const key_type &)
- size_type erase(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::erase(const KeyType&,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,Disposer)
- template<class Disposer>
- BOOST_INTRUSIVE_DOC1ST(void
- , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
- erase_and_dispose(const_iterator i, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,const_iterator,Disposer)
- template<class Disposer>
- void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const key_type &,Disposer)
- template<class Disposer>
- size_type erase_and_dispose(const key_type &key, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const KeyType&,KeyHasher,KeyEqual,Disposer)
- template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
- size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func, Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::clear
- void clear();
-
- //! @copydoc ::boost::intrusive::hashtable::clear_and_dispose
- template<class Disposer>
- void clear_and_dispose(Disposer disposer);
-
- //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
- size_type count(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::count(const KeyType&,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- size_type count(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::find(const key_type &)
- iterator find(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
- const_iterator find(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- const_iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)
- std::pair<iterator,iterator> equal_range(const key_type &key);
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<iterator,iterator> equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)const
- std::pair<const_iterator, const_iterator>
- equal_range(const key_type &key) const;
-
- //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)const
- template<class KeyType, class KeyHasher, class KeyEqual>
- std::pair<const_iterator, const_iterator>
- equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::iterator_to(reference)
- iterator iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::iterator_to(const_reference)const
- const_iterator iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(reference)
- static local_iterator s_local_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(const_reference)
- static const_local_iterator s_local_iterator_to(const_reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(reference)
- local_iterator local_iterator_to(reference value);
-
- //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(const_reference)
- const_local_iterator local_iterator_to(const_reference value) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_count
- size_type bucket_count() const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_size
- size_type bucket_size(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket(const key_type&)const
- size_type bucket(const key_type& k) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket(const KeyType&,KeyHasher)const
- template<class KeyType, class KeyHasher>
- size_type bucket(const KeyType& k, KeyHasher hash_func) const;
-
- //! @copydoc ::boost::intrusive::hashtable::bucket_pointer
- bucket_ptr bucket_pointer() const;
-
- //! @copydoc ::boost::intrusive::hashtable::begin(size_type)
- local_iterator begin(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::begin(size_type)const
- const_local_iterator begin(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::cbegin(size_type)const
- const_local_iterator cbegin(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::end(size_type)
- local_iterator end(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::end(size_type)const
- const_local_iterator end(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::cend(size_type)const
- const_local_iterator cend(size_type n) const;
-
- //! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
- void rehash(const bucket_traits &new_bucket_traits);
-
- //! @copydoc ::boost::intrusive::hashtable::full_rehash
- void full_rehash();
-
- //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(bool)
- bool incremental_rehash(bool grow = true);
-
- //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(const bucket_traits &)
- bool incremental_rehash(const bucket_traits &new_bucket_traits);
-
- //! @copydoc ::boost::intrusive::hashtable::split_count
- size_type split_count() const;
-
- //! @copydoc ::boost::intrusive::hashtable::suggested_upper_bucket_count
- static size_type suggested_upper_bucket_count(size_type n);
-
- //! @copydoc ::boost::intrusive::hashtable::suggested_lower_bucket_count
- static size_type suggested_lower_bucket_count(size_type n);
-
- #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-};
-
-//! Helper metafunction to define an \c unordered_multiset that yields to the same type when the
-//! same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class ...Options>
-#else
-template<class T, class O1 = void, class O2 = void
- , class O3 = void, class O4 = void
- , class O5 = void, class O6 = void
- , class O7 = void, class O8 = void
- , class O9 = void, class O10= void
- >
-#endif
-struct make_unordered_multiset
-{
- /// @cond
- typedef typename pack_options
- < hashtable_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef typename detail::get_value_traits
- <T, typename packed_options::proto_value_traits>::type value_traits;
-
- typedef typename make_bucket_traits
- <T, true, packed_options>::type bucket_traits;
-
- typedef unordered_multiset_impl
- < value_traits
- , typename packed_options::key_of_value
- , typename packed_options::hash
- , typename packed_options::equal
- , typename packed_options::size_type
- , bucket_traits
- , (std::size_t(false)*hash_bool_flags::unique_keys_pos)
- | (std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
- | (std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
- | (std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
- | (std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
- | (std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
- > implementation_defined;
-
- /// @endcond
- typedef implementation_defined type;
-};
-
-#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
-
-#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
-#else
-template<class T, class ...Options>
-#endif
-class unordered_multiset
- : public make_unordered_multiset<T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type
-{
- typedef typename make_unordered_multiset
- <T,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
- #else
- Options...
- #endif
- >::type Base;
- //Assert if passed value traits are compatible with the type
- BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
- BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_multiset)
-
- public:
- typedef typename Base::value_traits value_traits;
- typedef typename Base::bucket_traits bucket_traits;
- typedef typename Base::iterator iterator;
- typedef typename Base::const_iterator const_iterator;
- typedef typename Base::bucket_ptr bucket_ptr;
- typedef typename Base::size_type size_type;
- typedef typename Base::hasher hasher;
- typedef typename Base::key_equal key_equal;
-
- explicit unordered_multiset( const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b_traits, hash_func, equal_func, v_traits)
- {}
-
- template<class Iterator> BOOST_INTRUSIVE_FORCEINLINE
- unordered_multiset( Iterator b
- , Iterator e
- , const bucket_traits &b_traits
- , const hasher & hash_func = hasher()
- , const key_equal &equal_func = key_equal()
- , const value_traits &v_traits = value_traits())
- : Base(b, e, b_traits, hash_func, equal_func, v_traits)
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset(BOOST_RV_REF(unordered_multiset) x)
- : Base(BOOST_MOVE_BASE(Base, x))
- {}
-
- BOOST_INTRUSIVE_FORCEINLINE unordered_multiset& operator=(BOOST_RV_REF(unordered_multiset) x)
- { return static_cast<unordered_multiset&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
-
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(const unordered_multiset &src, Cloner cloner, Disposer disposer)
- { Base::clone_from(src, cloner, disposer); }
-
- template <class Cloner, class Disposer>
- BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_multiset) src, Cloner cloner, Disposer disposer)
- { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
-};
-
-#endif
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_UNORDERED_SET_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/unordered_set_hook.hpp b/src/third_party/boost-1.68.0/boost/intrusive/unordered_set_hook.hpp
deleted file mode 100644
index a18d2354c4d..00000000000
--- a/src/third_party/boost-1.68.0/boost/intrusive/unordered_set_hook.hpp
+++ /dev/null
@@ -1,459 +0,0 @@
-/////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Olaf Krzikalla 2004-2006.
-// (C) Copyright Ion Gaztanaga 2006-2013
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/intrusive for documentation.
-//
-/////////////////////////////////////////////////////////////////////////////
-
-#ifndef BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP
-#define BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP
-
-#include <boost/intrusive/detail/config_begin.hpp>
-#include <boost/intrusive/intrusive_fwd.hpp>
-
-#include <boost/intrusive/pointer_traits.hpp>
-#include <boost/intrusive/slist_hook.hpp>
-#include <boost/intrusive/options.hpp>
-#include <boost/intrusive/detail/generic_hook.hpp>
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-namespace boost {
-namespace intrusive {
-
-/// @cond
-
-template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
-struct unordered_node
- : public slist_node<VoidPointer>
-{
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < unordered_node<VoidPointer, StoreHash, OptimizeMultiKey> >::type
- node_ptr;
- node_ptr prev_in_group_;
- std::size_t hash_;
-};
-
-template<class VoidPointer>
-struct unordered_node<VoidPointer, false, true>
- : public slist_node<VoidPointer>
-{
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < unordered_node<VoidPointer, false, true> >::type
- node_ptr;
- node_ptr prev_in_group_;
-};
-
-template<class VoidPointer>
-struct unordered_node<VoidPointer, true, false>
- : public slist_node<VoidPointer>
-{
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < unordered_node<VoidPointer, true, false> >::type
- node_ptr;
- std::size_t hash_;
-};
-
-template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
-struct unordered_node_traits
- : public slist_node_traits<VoidPointer>
-{
- typedef slist_node_traits<VoidPointer> reduced_slist_node_traits;
- typedef unordered_node<VoidPointer, StoreHash, OptimizeMultiKey> node;
-
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < node >::type node_ptr;
- typedef typename pointer_traits
- <VoidPointer>::template rebind_pointer
- < const node >::type const_node_ptr;
-
- static const bool store_hash = StoreHash;
- static const bool optimize_multikey = OptimizeMultiKey;
-
- static node_ptr get_next(const const_node_ptr & n)
- { return pointer_traits<node_ptr>::static_cast_from(n->next_); }
-
- static void set_next(const node_ptr & n, const node_ptr & next)
- { n->next_ = next; }
-
- static node_ptr get_prev_in_group(const const_node_ptr & n)
- { return n->prev_in_group_; }
-
- static void set_prev_in_group(const node_ptr & n, const node_ptr & prev)
- { n->prev_in_group_ = prev; }
-
- static std::size_t get_hash(const const_node_ptr & n)
- { return n->hash_; }
-
- static void set_hash(const node_ptr & n, std::size_t h)
- { n->hash_ = h; }
-};
-
-template<class NodeTraits>
-struct unordered_group_adapter
-{
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
-
- static node_ptr get_next(const const_node_ptr & n)
- { return NodeTraits::get_prev_in_group(n); }
-
- static void set_next(const node_ptr & n, const node_ptr & next)
- { NodeTraits::set_prev_in_group(n, next); }
-};
-
-template<class NodeTraits>
-struct unordered_algorithms
- : public circular_slist_algorithms<NodeTraits>
-{
- typedef circular_slist_algorithms<NodeTraits> base_type;
- typedef unordered_group_adapter<NodeTraits> group_traits;
- typedef circular_slist_algorithms<group_traits> group_algorithms;
- typedef NodeTraits node_traits;
- typedef typename NodeTraits::node node;
- typedef typename NodeTraits::node_ptr node_ptr;
- typedef typename NodeTraits::const_node_ptr const_node_ptr;
-
- static void init(typename base_type::node_ptr n)
- {
- base_type::init(n);
- group_algorithms::init(n);
- }
-
- static void init_header(typename base_type::node_ptr n)
- {
- base_type::init_header(n);
- group_algorithms::init_header(n);
- }
-
- static void unlink(typename base_type::node_ptr n)
- {
- base_type::unlink(n);
- group_algorithms::unlink(n);
- }
-};
-
-//Class to avoid defining the same algo as a circular list, as hooks would be ambiguous between them
-template<class Algo>
-struct uset_algo_wrapper : public Algo
-{};
-
-template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
-struct get_uset_node_traits
-{
- typedef typename detail::if_c
- < (StoreHash || OptimizeMultiKey)
- , unordered_node_traits<VoidPointer, StoreHash, OptimizeMultiKey>
- , slist_node_traits<VoidPointer>
- >::type type;
-};
-
-template<bool OptimizeMultiKey>
-struct get_uset_algo_type
-{
- static const algo_types value = OptimizeMultiKey ? UnorderedAlgorithms : UnorderedCircularSlistAlgorithms;
-};
-
-template<class NodeTraits>
-struct get_algo<UnorderedAlgorithms, NodeTraits>
-{
- typedef unordered_algorithms<NodeTraits> type;
-};
-
-template<class NodeTraits>
-struct get_algo<UnorderedCircularSlistAlgorithms, NodeTraits>
-{
- typedef uset_algo_wrapper< circular_slist_algorithms<NodeTraits> > type;
-};
-
-/// @endcond
-
-//! Helper metafunction to define a \c unordered_set_base_hook that yields to the same
-//! type when the same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class ...Options>
-#else
-template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
-#endif
-struct make_unordered_set_base_hook
-{
- /// @cond
- typedef typename pack_options
- < hook_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef generic_hook
- < get_uset_algo_type <packed_options::optimize_multikey>::value
- , typename get_uset_node_traits < typename packed_options::void_pointer
- , packed_options::store_hash
- , packed_options::optimize_multikey
- >::type
- , typename packed_options::tag
- , packed_options::link_mode
- , HashBaseHookId
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-//! Derive a class from unordered_set_base_hook in order to store objects in
-//! in an unordered_set/unordered_multi_set. unordered_set_base_hook holds the data necessary to maintain
-//! the unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set.
-//!
-//! The hook admits the following options: \c tag<>, \c void_pointer<>,
-//! \c link_mode<>, \c store_hash<> and \c optimize_multikey<>.
-//!
-//! \c tag<> defines a tag to identify the node.
-//! The same tag value can be used in different classes, but if a class is
-//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its
-//! unique tag.
-//!
-//! \c void_pointer<> is the pointer type that will be used internally in the hook
-//! and the container configured to use this hook.
-//!
-//! \c link_mode<> will specify the linking mode of the hook (\c normal_link,
-//! \c auto_unlink or \c safe_link).
-//!
-//! \c store_hash<> will tell the hook to store the hash of the value
-//! to speed up rehashings.
-//!
-//! \c optimize_multikey<> will tell the hook to store a link to form a group
-//! with other value with the same value to speed up searches and insertions
-//! in unordered_multisets with a great number of with equivalent keys.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class ...Options>
-#else
-template<class O1, class O2, class O3, class O4>
-#endif
-class unordered_set_base_hook
- : public make_unordered_set_base_hook<
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #else
- Options...
- #endif
- >::type
-{
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- public:
- //! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
- //! initializes the node to an unlinked state.
- //!
- //! <b>Throws</b>: Nothing.
- unordered_set_base_hook();
-
- //! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
- //! initializes the node to an unlinked state. The argument is ignored.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Rationale</b>: Providing a copy-constructor
- //! makes classes using the hook STL-compliant without forcing the
- //! user to do some additional work. \c swap can be used to emulate
- //! move-semantics.
- unordered_set_base_hook(const unordered_set_base_hook& );
-
- //! <b>Effects</b>: Empty function. The argument is ignored.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Rationale</b>: Providing an assignment operator
- //! makes classes using the hook STL-compliant without forcing the
- //! user to do some additional work. \c swap can be used to emulate
- //! move-semantics.
- unordered_set_base_hook& operator=(const unordered_set_base_hook& );
-
- //! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
- //! nothing (ie. no code is generated). If link_mode is \c safe_link and the
- //! object is stored in an unordered_set an assertion is raised. If link_mode is
- //! \c auto_unlink and \c is_linked() is true, the node is unlinked.
- //!
- //! <b>Throws</b>: Nothing.
- ~unordered_set_base_hook();
-
- //! <b>Effects</b>: Swapping two nodes swaps the position of the elements
- //! related to those nodes in one or two containers. That is, if the node
- //! this is part of the element e1, the node x is part of the element e2
- //! and both elements are included in the containers s1 and s2, then after
- //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1
- //! at the position of e1. If one element is not in a container, then
- //! after the swap-operation the other element is not in a container.
- //! Iterators to e1 and e2 related to those nodes are invalidated.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- void swap_nodes(unordered_set_base_hook &other);
-
- //! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
- //!
- //! <b>Returns</b>: true, if the node belongs to a container, false
- //! otherwise. This function can be used to test whether \c unordered_set::iterator_to
- //! will return a valid iterator.
- //!
- //! <b>Complexity</b>: Constant
- bool is_linked() const;
-
- //! <b>Effects</b>: Removes the node if it's inserted in a container.
- //! This function is only allowed if link_mode is \c auto_unlink.
- //!
- //! <b>Throws</b>: Nothing.
- void unlink();
- #endif
-};
-
-
-//! Helper metafunction to define a \c unordered_set_member_hook that yields to the same
-//! type when the same options (either explicitly or implicitly) are used.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class ...Options>
-#else
-template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
-#endif
-struct make_unordered_set_member_hook
-{
- /// @cond
- typedef typename pack_options
- < hook_defaults,
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #else
- Options...
- #endif
- >::type packed_options;
-
- typedef generic_hook
- < get_uset_algo_type <packed_options::optimize_multikey>::value
- , typename get_uset_node_traits < typename packed_options::void_pointer
- , packed_options::store_hash
- , packed_options::optimize_multikey
- >::type
- , member_tag
- , packed_options::link_mode
- , NoBaseHookId
- > implementation_defined;
- /// @endcond
- typedef implementation_defined type;
-};
-
-//! Put a public data member unordered_set_member_hook in order to store objects of this class in
-//! an unordered_set/unordered_multi_set. unordered_set_member_hook holds the data necessary for maintaining the
-//! unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set.
-//!
-//! The hook admits the following options: \c void_pointer<>,
-//! \c link_mode<> and \c store_hash<>.
-//!
-//! \c void_pointer<> is the pointer type that will be used internally in the hook
-//! and the container configured to use this hook.
-//!
-//! \c link_mode<> will specify the linking mode of the hook (\c normal_link,
-//! \c auto_unlink or \c safe_link).
-//!
-//! \c store_hash<> will tell the hook to store the hash of the value
-//! to speed up rehashings.
-#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
-template<class ...Options>
-#else
-template<class O1, class O2, class O3, class O4>
-#endif
-class unordered_set_member_hook
- : public make_unordered_set_member_hook<
- #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
- O1, O2, O3, O4
- #else
- Options...
- #endif
- >::type
-{
- #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
- public:
- //! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
- //! initializes the node to an unlinked state.
- //!
- //! <b>Throws</b>: Nothing.
- unordered_set_member_hook();
-
- //! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
- //! initializes the node to an unlinked state. The argument is ignored.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Rationale</b>: Providing a copy-constructor
- //! makes classes using the hook STL-compliant without forcing the
- //! user to do some additional work. \c swap can be used to emulate
- //! move-semantics.
- unordered_set_member_hook(const unordered_set_member_hook& );
-
- //! <b>Effects</b>: Empty function. The argument is ignored.
- //!
- //! <b>Throws</b>: Nothing.
- //!
- //! <b>Rationale</b>: Providing an assignment operator
- //! makes classes using the hook STL-compliant without forcing the
- //! user to do some additional work. \c swap can be used to emulate
- //! move-semantics.
- unordered_set_member_hook& operator=(const unordered_set_member_hook& );
-
- //! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
- //! nothing (ie. no code is generated). If link_mode is \c safe_link and the
- //! object is stored in an unordered_set an assertion is raised. If link_mode is
- //! \c auto_unlink and \c is_linked() is true, the node is unlinked.
- //!
- //! <b>Throws</b>: Nothing.
- ~unordered_set_member_hook();
-
- //! <b>Effects</b>: Swapping two nodes swaps the position of the elements
- //! related to those nodes in one or two containers. That is, if the node
- //! this is part of the element e1, the node x is part of the element e2
- //! and both elements are included in the containers s1 and s2, then after
- //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1
- //! at the position of e1. If one element is not in a container, then
- //! after the swap-operation the other element is not in a container.
- //! Iterators to e1 and e2 related to those nodes are invalidated.
- //!
- //! <b>Complexity</b>: Constant
- //!
- //! <b>Throws</b>: Nothing.
- void swap_nodes(unordered_set_member_hook &other);
-
- //! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
- //!
- //! <b>Returns</b>: true, if the node belongs to a container, false
- //! otherwise. This function can be used to test whether \c unordered_set::iterator_to
- //! will return a valid iterator.
- //!
- //! <b>Complexity</b>: Constant
- bool is_linked() const;
-
- //! <b>Effects</b>: Removes the node if it's inserted in a container.
- //! This function is only allowed if link_mode is \c auto_unlink.
- //!
- //! <b>Throws</b>: Nothing.
- void unlink();
- #endif
-};
-
-} //namespace intrusive
-} //namespace boost
-
-#include <boost/intrusive/detail/config_end.hpp>
-
-#endif //BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/chain.hpp b/src/third_party/boost-1.68.0/boost/iostreams/chain.hpp
deleted file mode 100644
index 4e108c8b093..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/chain.hpp
+++ /dev/null
@@ -1,594 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/assert.hpp>
-#include <exception>
-#include <iterator> // advance.
-#include <list>
-#include <memory> // allocator, auto_ptr or unique_ptr.
-#include <typeinfo>
-#include <stdexcept> // logic_error, out_of_range.
-#include <boost/checked_delete.hpp>
-#include <boost/config.hpp> // BOOST_MSVC, template friends,
-#include <boost/detail/workaround.hpp> // BOOST_NESTED_TEMPLATE
-#include <boost/iostreams/constants.hpp>
-#include <boost/iostreams/detail/access_control.hpp>
-#include <boost/iostreams/detail/char_traits.hpp>
-#include <boost/iostreams/detail/push.hpp>
-#include <boost/iostreams/detail/streambuf.hpp> // pubsync.
-#include <boost/iostreams/detail/wrap_unwrap.hpp>
-#include <boost/iostreams/device/null.hpp>
-#include <boost/iostreams/positioning.hpp>
-#include <boost/iostreams/traits.hpp> // is_filter.
-#include <boost/iostreams/stream_buffer.hpp>
-#include <boost/next_prior.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type.hpp>
-#include <boost/iostreams/detail/execute.hpp>
-
-// Sometimes type_info objects must be compared by name. Borrowed from
-// Boost.Python and Boost.Function.
-#if defined(__GNUC__) || \
- defined(_AIX) || \
- (defined(__sgi) && defined(__host_mips)) || \
- (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) \
- /**/
-# include <cstring>
-# define BOOST_IOSTREAMS_COMPARE_TYPE_ID(X,Y) \
- (std::strcmp((X).name(),(Y).name()) == 0)
-#else
-# define BOOST_IOSTREAMS_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
-#endif
-
-// Deprecated. Unused.
-#define BOOST_IOSTREAMS_COMPONENT_TYPE(chain, index) \
- chain.component_type( index ) \
- /**/
-
-// Deprecated. Unused.
-#define BOOST_IOSTREAMS_COMPONENT(chain, index, target) \
- chain.component< target >( index ) \
- /**/
-
-namespace boost { namespace iostreams {
-
-//--------------Definition of chain and wchain--------------------------------//
-
-namespace detail {
-
-template<typename Chain> class chain_client;
-
-//
-// Concept name: Chain.
-// Description: Represents a chain of stream buffers which provides access
-// to the first buffer in the chain and sends notifications when the
-// streambufs are added to or removed from chain.
-// Refines: Closable device with mode equal to typename Chain::mode.
-// Models: chain, converting_chain.
-// Example:
-//
-// class chain {
-// public:
-// typedef xxx chain_type;
-// typedef xxx client_type;
-// typedef xxx mode;
-// bool is_complete() const; // Ready for i/o.
-// template<typename T>
-// void push( const T& t, // Adds a stream buffer to
-// streamsize, // chain, based on t, with
-// streamsize ); // given buffer and putback
-// // buffer sizes. Pass -1 to
-// // request default size.
-// protected:
-// void register_client(client_type* client); // Associate client.
-// void notify(); // Notify client.
-// };
-//
-
-//
-// Description: Represents a chain of filters with an optional device at the
-// end.
-// Template parameters:
-// Self - A class deriving from the current instantiation of this template.
-// This is an example of the Curiously Recurring Template Pattern.
-// Ch - The character type.
-// Tr - The character traits type.
-// Alloc - The allocator type.
-// Mode - A mode tag.
-//
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-class chain_base {
-public:
- typedef Ch char_type;
- BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr)
- typedef Alloc allocator_type;
- typedef Mode mode;
- struct category
- : Mode,
- device_tag
- { };
- typedef chain_client<Self> client_type;
- friend class chain_client<Self>;
-private:
- typedef linked_streambuf<Ch> streambuf_type;
- typedef std::list<streambuf_type*> list_type;
- typedef chain_base<Self, Ch, Tr, Alloc, Mode> my_type;
-protected:
- chain_base() : pimpl_(new chain_impl) { }
- chain_base(const chain_base& rhs): pimpl_(rhs.pimpl_) { }
-public:
-
- // dual_use is a pseudo-mode to facilitate filter writing,
- // not a genuine mode.
- BOOST_STATIC_ASSERT((!is_convertible<mode, dual_use>::value));
-
- //----------Buffer sizing-------------------------------------------------//
-
- // Sets the size of the buffer created for the devices to be added to this
- // chain. Does not affect the size of the buffer for devices already
- // added.
- void set_device_buffer_size(std::streamsize n)
- { pimpl_->device_buffer_size_ = n; }
-
- // Sets the size of the buffer created for the filters to be added
- // to this chain. Does not affect the size of the buffer for filters already
- // added.
- void set_filter_buffer_size(std::streamsize n)
- { pimpl_->filter_buffer_size_ = n; }
-
- // Sets the size of the putback buffer for filters and devices to be added
- // to this chain. Does not affect the size of the buffer for filters or
- // devices already added.
- void set_pback_size(std::streamsize n)
- { pimpl_->pback_size_ = n; }
-
- //----------Device interface----------------------------------------------//
-
- std::streamsize read(char_type* s, std::streamsize n);
- std::streamsize write(const char_type* s, std::streamsize n);
- std::streampos seek(stream_offset off, BOOST_IOS::seekdir way);
-
- //----------Direct component access---------------------------------------//
-
- const std::type_info& component_type(int n) const
- {
- if (static_cast<size_type>(n) >= size())
- boost::throw_exception(std::out_of_range("bad chain offset"));
- return (*boost::next(list().begin(), n))->component_type();
- }
-
- // Deprecated.
- template<int N>
- const std::type_info& component_type() const { return component_type(N); }
-
- template<typename T>
- T* component(int n) const { return component(n, boost::type<T>()); }
-
- // Deprecated.
- template<int N, typename T>
- T* component() const { return component<T>(N); }
-
-#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310)
- private:
-#endif
- template<typename T>
- T* component(int n, boost::type<T>) const
- {
- if (static_cast<size_type>(n) >= size())
- boost::throw_exception(std::out_of_range("bad chain offset"));
- streambuf_type* link = *boost::next(list().begin(), n);
- if (BOOST_IOSTREAMS_COMPARE_TYPE_ID(link->component_type(), typeid(T)))
- return static_cast<T*>(link->component_impl());
- else
- return 0;
- }
-public:
-
- //----------Container-like interface--------------------------------------//
-
- typedef typename list_type::size_type size_type;
- streambuf_type& front() { return *list().front(); }
- BOOST_IOSTREAMS_DEFINE_PUSH(push, mode, char_type, push_impl)
- void pop();
- bool empty() const { return list().empty(); }
- size_type size() const { return list().size(); }
- void reset();
-
- //----------Additional i/o functions--------------------------------------//
-
- // Returns true if this chain is non-empty and its final link
- // is a source or sink, i.e., if it is ready to perform i/o.
- bool is_complete() const;
- bool auto_close() const;
- void set_auto_close(bool close);
- bool sync() { return front().BOOST_IOSTREAMS_PUBSYNC() != -1; }
- bool strict_sync();
-private:
- template<typename T>
- void push_impl(const T& t, std::streamsize buffer_size = -1,
- std::streamsize pback_size = -1)
- {
- typedef typename iostreams::category_of<T>::type category;
- typedef typename unwrap_ios<T>::type component_type;
- typedef stream_buffer<
- component_type,
- BOOST_IOSTREAMS_CHAR_TRAITS(char_type),
- Alloc, Mode
- > streambuf_t;
- typedef typename list_type::iterator iterator;
- BOOST_STATIC_ASSERT((is_convertible<category, Mode>::value));
- if (is_complete())
- boost::throw_exception(std::logic_error("chain complete"));
- streambuf_type* prev = !empty() ? list().back() : 0;
- buffer_size =
- buffer_size != -1 ?
- buffer_size :
- iostreams::optimal_buffer_size(t);
- pback_size =
- pback_size != -1 ?
- pback_size :
- pimpl_->pback_size_;
-
-#if defined(BOOST_NO_CXX11_SMART_PTR)
-
- std::auto_ptr<streambuf_t>
- buf(new streambuf_t(t, buffer_size, pback_size));
-
-#else
-
- std::unique_ptr<streambuf_t>
- buf(new streambuf_t(t, buffer_size, pback_size));
-
-#endif
-
- list().push_back(buf.get());
- buf.release();
- if (is_device<component_type>::value) {
- pimpl_->flags_ |= f_complete | f_open;
- for ( iterator first = list().begin(),
- last = list().end();
- first != last;
- ++first )
- {
- (*first)->set_needs_close();
- }
- }
- if (prev) prev->set_next(list().back());
- notify();
- }
-
- list_type& list() { return pimpl_->links_; }
- const list_type& list() const { return pimpl_->links_; }
- void register_client(client_type* client) { pimpl_->client_ = client; }
- void notify() { if (pimpl_->client_) pimpl_->client_->notify(); }
-
- //----------Nested classes------------------------------------------------//
-
- static void close(streambuf_type* b, BOOST_IOS::openmode m)
- {
- if (m == BOOST_IOS::out && is_convertible<Mode, output>::value)
- b->BOOST_IOSTREAMS_PUBSYNC();
- b->close(m);
- }
-
- static void set_next(streambuf_type* b, streambuf_type* next)
- { b->set_next(next); }
-
- static void set_auto_close(streambuf_type* b, bool close)
- { b->set_auto_close(close); }
-
- struct closer {
- typedef streambuf_type* argument_type;
- typedef void result_type;
- closer(BOOST_IOS::openmode m) : mode_(m) { }
- void operator() (streambuf_type* b)
- {
- close(b, mode_);
- }
- BOOST_IOS::openmode mode_;
- };
- friend struct closer;
-
- enum flags {
- f_complete = 1,
- f_open = 2,
- f_auto_close = 4
- };
-
- struct chain_impl {
- chain_impl()
- : client_(0), device_buffer_size_(default_device_buffer_size),
- filter_buffer_size_(default_filter_buffer_size),
- pback_size_(default_pback_buffer_size),
- flags_(f_auto_close)
- { }
- ~chain_impl()
- {
- try { close(); } catch (...) { }
- try { reset(); } catch (...) { }
- }
- void close()
- {
- if ((flags_ & f_open) != 0) {
- flags_ &= ~f_open;
- stream_buffer< basic_null_device<Ch, Mode> > null;
- if ((flags_ & f_complete) == 0) {
- null.open(basic_null_device<Ch, Mode>());
- set_next(links_.back(), &null);
- }
- links_.front()->BOOST_IOSTREAMS_PUBSYNC();
- try {
- boost::iostreams::detail::execute_foreach(
- links_.rbegin(), links_.rend(),
- closer(BOOST_IOS::in)
- );
- } catch (...) {
- try {
- boost::iostreams::detail::execute_foreach(
- links_.begin(), links_.end(),
- closer(BOOST_IOS::out)
- );
- } catch (...) { }
- throw;
- }
- boost::iostreams::detail::execute_foreach(
- links_.begin(), links_.end(),
- closer(BOOST_IOS::out)
- );
- }
- }
- void reset()
- {
- typedef typename list_type::iterator iterator;
- for ( iterator first = links_.begin(),
- last = links_.end();
- first != last;
- ++first )
- {
- if ( (flags_ & f_complete) == 0 ||
- (flags_ & f_auto_close) == 0 )
- {
- set_auto_close(*first, false);
- }
- streambuf_type* buf = 0;
- std::swap(buf, *first);
- delete buf;
- }
- links_.clear();
- flags_ &= ~f_complete;
- flags_ &= ~f_open;
- }
- list_type links_;
- client_type* client_;
- std::streamsize device_buffer_size_,
- filter_buffer_size_,
- pback_size_;
- int flags_;
- };
- friend struct chain_impl;
-
- //----------Member data---------------------------------------------------//
-
-private:
- shared_ptr<chain_impl> pimpl_;
-};
-
-} // End namespace detail.
-
-//
-// Macro: BOOST_IOSTREAMS_DECL_CHAIN(name, category)
-// Description: Defines a template derived from chain_base appropriate for a
-// particular i/o category. The template has the following parameters:
-// Ch - The character type.
-// Tr - The character traits type.
-// Alloc - The allocator type.
-// Macro parameters:
-// name_ - The name of the template to be defined.
-// category_ - The i/o category of the template to be defined.
-//
-#define BOOST_IOSTREAMS_DECL_CHAIN(name_, default_char_) \
- template< typename Mode, typename Ch = default_char_, \
- typename Tr = BOOST_IOSTREAMS_CHAR_TRAITS(Ch), \
- typename Alloc = std::allocator<Ch> > \
- class name_ : public boost::iostreams::detail::chain_base< \
- name_<Mode, Ch, Tr, Alloc>, \
- Ch, Tr, Alloc, Mode \
- > \
- { \
- public: \
- struct category : device_tag, Mode { }; \
- typedef Mode mode; \
- private: \
- typedef boost::iostreams::detail::chain_base< \
- name_<Mode, Ch, Tr, Alloc>, \
- Ch, Tr, Alloc, Mode \
- > base_type; \
- public: \
- typedef Ch char_type; \
- typedef Tr traits_type; \
- typedef typename traits_type::int_type int_type; \
- typedef typename traits_type::off_type off_type; \
- name_() { } \
- name_(const name_& rhs) : base_type(rhs) { } \
- name_& operator=(const name_& rhs) \
- { base_type::operator=(rhs); return *this; } \
- }; \
- /**/
-BOOST_IOSTREAMS_DECL_CHAIN(chain, char)
-BOOST_IOSTREAMS_DECL_CHAIN(wchain, wchar_t)
-#undef BOOST_IOSTREAMS_DECL_CHAIN
-
-//--------------Definition of chain_client------------------------------------//
-
-namespace detail {
-
-//
-// Template name: chain_client
-// Description: Class whose instances provide access to an underlying chain
-// using an interface similar to the chains.
-// Subclasses: the various stream and stream buffer templates.
-//
-template<typename Chain>
-class chain_client {
-public:
- typedef Chain chain_type;
- typedef typename chain_type::char_type char_type;
- typedef typename chain_type::traits_type traits_type;
- typedef typename chain_type::size_type size_type;
- typedef typename chain_type::mode mode;
-
- chain_client(chain_type* chn = 0) : chain_(chn ) { }
- chain_client(chain_client* client) : chain_(client->chain_) { }
- virtual ~chain_client() { }
-
- const std::type_info& component_type(int n) const
- { return chain_->component_type(n); }
-
- // Deprecated.
- template<int N>
- const std::type_info& component_type() const
- { return chain_->BOOST_NESTED_TEMPLATE component_type<N>(); }
-
- template<typename T>
- T* component(int n) const
- { return chain_->BOOST_NESTED_TEMPLATE component<T>(n); }
-
- // Deprecated.
- template<int N, typename T>
- T* component() const
- { return chain_->BOOST_NESTED_TEMPLATE component<N, T>(); }
-
- bool is_complete() const { return chain_->is_complete(); }
- bool auto_close() const { return chain_->auto_close(); }
- void set_auto_close(bool close) { chain_->set_auto_close(close); }
- bool strict_sync() { return chain_->strict_sync(); }
- void set_device_buffer_size(std::streamsize n)
- { chain_->set_device_buffer_size(n); }
- void set_filter_buffer_size(std::streamsize n)
- { chain_->set_filter_buffer_size(n); }
- void set_pback_size(std::streamsize n) { chain_->set_pback_size(n); }
- BOOST_IOSTREAMS_DEFINE_PUSH(push, mode, char_type, push_impl)
- void pop() { chain_->pop(); }
- bool empty() const { return chain_->empty(); }
- size_type size() const { return chain_->size(); }
- void reset() { chain_->reset(); }
-
- // Returns a copy of the underlying chain.
- chain_type filters() { return *chain_; }
- chain_type filters() const { return *chain_; }
-protected:
- template<typename T>
- void push_impl(const T& t BOOST_IOSTREAMS_PUSH_PARAMS())
- { chain_->push(t BOOST_IOSTREAMS_PUSH_ARGS()); }
- chain_type& ref() { return *chain_; }
- void set_chain(chain_type* c)
- { chain_ = c; chain_->register_client(this); }
-#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && \
- (!BOOST_WORKAROUND(__BORLANDC__, < 0x600))
- template<typename S, typename C, typename T, typename A, typename M>
- friend class chain_base;
-#else
- public:
-#endif
- virtual void notify() { }
-private:
- chain_type* chain_;
-};
-
-//--------------Implementation of chain_base----------------------------------//
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-inline std::streamsize chain_base<Self, Ch, Tr, Alloc, Mode>::read
- (char_type* s, std::streamsize n)
-{ return iostreams::read(*list().front(), s, n); }
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-inline std::streamsize chain_base<Self, Ch, Tr, Alloc, Mode>::write
- (const char_type* s, std::streamsize n)
-{ return iostreams::write(*list().front(), s, n); }
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-inline std::streampos chain_base<Self, Ch, Tr, Alloc, Mode>::seek
- (stream_offset off, BOOST_IOS::seekdir way)
-{ return iostreams::seek(*list().front(), off, way); }
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-void chain_base<Self, Ch, Tr, Alloc, Mode>::reset()
-{
- using namespace std;
- pimpl_->close();
- pimpl_->reset();
-}
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-bool chain_base<Self, Ch, Tr, Alloc, Mode>::is_complete() const
-{
- return (pimpl_->flags_ & f_complete) != 0;
-}
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-bool chain_base<Self, Ch, Tr, Alloc, Mode>::auto_close() const
-{
- return (pimpl_->flags_ & f_auto_close) != 0;
-}
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-void chain_base<Self, Ch, Tr, Alloc, Mode>::set_auto_close(bool close)
-{
- pimpl_->flags_ =
- (pimpl_->flags_ & ~f_auto_close) |
- (close ? f_auto_close : 0);
-}
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-bool chain_base<Self, Ch, Tr, Alloc, Mode>::strict_sync()
-{
- typedef typename list_type::iterator iterator;
- bool result = true;
- for ( iterator first = list().begin(),
- last = list().end();
- first != last;
- ++first )
- {
- bool s = (*first)->strict_sync();
- result = result && s;
- }
- return result;
-}
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-void chain_base<Self, Ch, Tr, Alloc, Mode>::pop()
-{
- BOOST_ASSERT(!empty());
- if (auto_close())
- pimpl_->close();
- streambuf_type* buf = 0;
- std::swap(buf, list().back());
- buf->set_auto_close(false);
- buf->set_next(0);
- delete buf;
- list().pop_back();
- pimpl_->flags_ &= ~f_complete;
- if (auto_close() || list().empty())
- pimpl_->flags_ &= ~f_open;
-}
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/direct_adapter.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/direct_adapter.hpp
deleted file mode 100644
index 243b4b0abfb..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/direct_adapter.hpp
+++ /dev/null
@@ -1,281 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp> // SFINAE, MSVC, put ptrdiff_t in std.
-#include <algorithm> // copy, min.
-#include <cstddef> // ptrdiff_t.
-#include <boost/detail/workaround.hpp>
-#include <boost/iostreams/categories.hpp>
-#include <boost/iostreams/detail/config/limits.hpp> // forwarding.
-#include <boost/iostreams/detail/config/wide_streams.hpp> // locale.
-#include <boost/iostreams/detail/double_object.hpp>
-#include <boost/iostreams/detail/error.hpp>
-#include <boost/iostreams/detail/ios.hpp> // openmode, seekdir, int types.
-#include <boost/iostreams/traits.hpp> // mode_of, is_direct.
-#include <boost/iostreams/operations.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/preprocessor/iteration/local.hpp>
-#include <boost/preprocessor/repetition/enum_binary_params.hpp>
-#include <boost/preprocessor/repetition/enum_params.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // VC7.1
-
-namespace boost { namespace iostreams { namespace detail {
-
-//------------------Definition of direct_adapter_base-------------------------//
-
-// Put all initialization in base class to faciliate forwarding.
-template<typename Direct>
-class direct_adapter_base {
-public:
- typedef typename char_type_of<Direct>::type char_type;
- typedef typename mode_of<Direct>::type mode_type;
- struct category
- : mode_type,
- device_tag,
- closable_tag
- #ifndef BOOST_IOSTREAMS_NO_LOCALE
- , localizable_tag
- #endif
- { };
-protected:
- explicit direct_adapter_base(const Direct& d);
- typedef is_convertible<category, two_sequence> is_double;
- struct pointers {
- char_type *beg, *ptr, *end;
- };
- void init_input(mpl::true_);
- void init_input(mpl::false_) { }
- void init_output(mpl::true_);
- void init_output(mpl::false_) { }
- double_object<pointers, is_double> ptrs_;
- Direct d_;
-};
-
-template<typename Direct>
-class direct_adapter : private direct_adapter_base<Direct> {
-private:
- typedef direct_adapter_base<Direct> base_type;
- typedef typename base_type::pointers pointers;
- typedef typename base_type::is_double is_double;
- using base_type::ptrs_;
- using base_type::d_;
-public:
- typedef typename base_type::char_type char_type;
- typedef typename base_type::category category;
-
- // Constructors
-
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
- direct_adapter(const Direct& d) : base_type(d) { }
- direct_adapter(const direct_adapter& d) : base_type(d) { }
-# define BOOST_PP_LOCAL_LIMITS (1, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY)
-#else
- template<typename U>
- struct is_direct
- : mpl::or_<
- is_same<U, direct_adapter<Direct> >,
- is_same<U, Direct>
- >
- { };
- template<typename U>
- direct_adapter(const U& u)
- : base_type(forward(u, is_direct<U>()))
- { }
-# define BOOST_PP_LOCAL_LIMITS (2, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY)
-#endif
-
-#define BOOST_PP_LOCAL_MACRO(n) \
- template<BOOST_PP_ENUM_PARAMS(n, typename P)> \
- direct_adapter(BOOST_PP_ENUM_BINARY_PARAMS(n, const P, &p)) \
- : base_type(Direct(BOOST_PP_ENUM_PARAMS(n, p))) \
- { } \
- /**/
-#include BOOST_PP_LOCAL_ITERATE()
-#undef BOOST_PP_LOCAL_MACRO
-
- // Device interface.
-
- std::streamsize read(char_type* s, std::streamsize n);
- std::streamsize write(const char_type* s, std::streamsize n);
- std::streampos seek( stream_offset, BOOST_IOS::seekdir,
- BOOST_IOS::openmode = BOOST_IOS::in | BOOST_IOS::out );
- void close();
- void close(BOOST_IOS::openmode which);
-#ifndef BOOST_IOSTREAMS_NO_LOCALE
- void imbue(const std::locale&);
-#endif
-
- // Direct device access.
-
- Direct& operator*() { return d_; }
- Direct* operator->() { return &d_; }
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
-private:
- template<typename U>
- static Direct forward(const U& u, mpl::true_) { return u; }
- template<typename U>
- static Direct forward(const U& u, mpl::false_) { return Direct(u); }
-#endif
-};
-
-//--------------Definition of wrap_direct and unwrap_direct-------------------//
-
-template<typename Device>
-struct wrap_direct_traits
- : mpl::if_<
- is_direct<Device>,
- direct_adapter<Device>,
- Device
- >
- { };
-
-template<typename Device>
-typename wrap_direct_traits<Device>::type
-inline wrap_direct(Device dev)
-{
- typedef typename wrap_direct_traits<Device>::type type;
- return type(dev);
-}
-
-template<typename Device>
-inline Device& unwrap_direct(Device& d) { return d; }
-
-template<typename Device>
-inline Device& unwrap_direct(direct_adapter<Device>& d) { return *d; }
-
-//--------------Implementation of direct_adapter_base-------------------------//
-
-template<typename Direct>
-direct_adapter_base<Direct>::direct_adapter_base(const Direct& d) : d_(d)
-{
- init_input(is_convertible<category, input>());
- init_output(is_convertible<category, output>());
-}
-
-template<typename Direct>
-void direct_adapter_base<Direct>::init_input(mpl::true_)
-{
- std::pair<char_type*, char_type*> seq = iostreams::input_sequence(d_);
- ptrs_.first().beg = seq.first;
- ptrs_.first().ptr = seq.first;
- ptrs_.first().end = seq.second;
-}
-
-template<typename Direct>
-void direct_adapter_base<Direct>::init_output(mpl::true_)
-{
- std::pair<char_type*, char_type*> seq = iostreams::output_sequence(d_);
- ptrs_.second().beg = seq.first;
- ptrs_.second().ptr = seq.first;
- ptrs_.second().end = seq.second;
-}
-
-//--------------Implementation of direct_adapter------------------------------//
-
-template<typename Direct>
-inline std::streamsize direct_adapter<Direct>::read
- (char_type* s, std::streamsize n)
-{
- using namespace std;
- pointers& get = ptrs_.first();
- std::streamsize avail =
- static_cast<std::streamsize>(get.end - get.ptr);
- std::streamsize result = (std::min)(n, avail);
- std::copy(get.ptr, get.ptr + result, s);
- get.ptr += result;
- return result != 0 ? result : -1;
-}
-
-template<typename Direct>
-inline std::streamsize direct_adapter<Direct>::write
- (const char_type* s, std::streamsize n)
-{
- using namespace std;
- pointers& put = ptrs_.second();
- if (n > static_cast<std::streamsize>(put.end - put.ptr))
- boost::throw_exception(write_area_exhausted());
- std::copy(s, s + n, put.ptr);
- put.ptr += n;
- return n;
-}
-
-template<typename Direct>
-inline std::streampos direct_adapter<Direct>::seek
- ( stream_offset off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which )
-{
- using namespace std;
- pointers& get = ptrs_.first();
- pointers& put = ptrs_.second();
- if (way == BOOST_IOS::cur && get.ptr != put.ptr)
- boost::throw_exception(bad_seek());
- ptrdiff_t next = 0;
- if ((which & BOOST_IOS::in) || !is_double::value) {
- if (way == BOOST_IOS::beg)
- next = off;
- else if (way == BOOST_IOS::cur)
- next = get.ptr - get.beg + off;
- else
- next = get.end - get.beg + off;
- if (next >= 0 && next <= get.end - get.beg)
- get.ptr = get.beg + next;
- else
- boost::throw_exception(bad_seek());
- }
- if ((which & BOOST_IOS::out) && is_double::value) {
- if (way == BOOST_IOS::beg)
- next = off;
- else if (way == BOOST_IOS::cur)
- next = put.ptr - put.beg + off;
- else
- next = put.end - put.beg + off;
- if (next >= 0 && next <= put.end - put.beg)
- put.ptr = put.beg + next;
- else
- boost::throw_exception(bad_seek());
- }
- return offset_to_position(next);
-}
-
-template<typename Direct>
-void direct_adapter<Direct>::close()
-{
- BOOST_STATIC_ASSERT((!is_convertible<category, two_sequence>::value));
- detail::close_all(d_);
-}
-
-template<typename Direct>
-void direct_adapter<Direct>::close(BOOST_IOS::openmode which)
-{
- BOOST_STATIC_ASSERT((is_convertible<category, two_sequence>::value));
- boost::iostreams::close(d_, which);
-}
-
-#ifndef BOOST_IOSTREAMS_NO_LOCALE
- template<typename Direct>
- void direct_adapter<Direct>::imbue(const std::locale& loc)
- { boost::iostreams::imbue(d_, loc); }
-#endif
-
-} } } // End namespaces detail, iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp>
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
deleted file mode 100644
index 623cf769d23..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2005-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED
-
-#include <boost/iostreams/detail/ios.hpp> // streamsize, seekdir, openmode.
-#include <boost/iostreams/read.hpp>
-#include <boost/iostreams/seek.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/iostreams/write.hpp>
-
-namespace boost { namespace iostreams {
-
-template<typename Device>
-class non_blocking_adapter {
-public:
- typedef typename char_type_of<Device>::type char_type;
- struct category
- : mode_of<Device>::type, device_tag
- { };
- explicit non_blocking_adapter(Device& dev) : device_(dev) { }
- std::streamsize read(char_type* s, std::streamsize n)
- {
- std::streamsize result = 0;
- while (result < n) {
- std::streamsize amt = iostreams::read(device_, s, n);
- if (amt == -1)
- break;
- result += amt;
- }
- return result != 0 ? result : -1;
- }
- std::streamsize write(const char_type* s, std::streamsize n)
- {
- std::streamsize result = 0;
- while (result < n) {
- std::streamsize amt =
- iostreams::write(device_, s + result, n - result);
- // write errors, like EOF on read, need to be handled.
- if (amt == -1)
- break;
- result += amt;
- }
- return result;
- }
- std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which =
- BOOST_IOS::in | BOOST_IOS::out )
- { return iostreams::seek(device_, off, way, which); }
-public:
- non_blocking_adapter& operator=(const non_blocking_adapter&);
- Device& device_;
-};
-
-} } // End namespace iostreams.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/buffer.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/buffer.hpp
deleted file mode 100644
index 35cb33c7008..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/buffer.hpp
+++ /dev/null
@@ -1,229 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <algorithm> // swap.
-#include <memory> // allocator.
-#include <boost/config.hpp> // member templates.
-#include <boost/iostreams/char_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp> // streamsize.
-#include <boost/iostreams/read.hpp>
-#include <boost/iostreams/traits.hpp> // int_type_of.
-#include <boost/iostreams/checked_operations.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-//----------------Buffers-----------------------------------------------------//
-
-//
-// Template name: buffer
-// Description: Character buffer.
-// Template parameters:
-// Ch - The character type.
-// Alloc - The Allocator type.
-//
-template< typename Ch,
- typename Alloc = std::allocator<Ch> >
-class basic_buffer {
-private:
-#ifndef BOOST_NO_STD_ALLOCATOR
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef typename Alloc::template rebind<Ch>::other allocator_type;
-#else
- typedef typename std::allocator_traits<Alloc>::template rebind_alloc<Ch> allocator_type;
- typedef std::allocator_traits<allocator_type> allocator_traits;
-#endif
-#else
- typedef std::allocator<Ch> allocator_type;
-#endif
- static Ch* allocate(std::streamsize buffer_size);
-public:
- basic_buffer();
- basic_buffer(std::streamsize buffer_size);
- ~basic_buffer();
- void resize(std::streamsize buffer_size);
- Ch* begin() const { return buf_; }
- Ch* end() const { return buf_ + size_; }
- Ch* data() const { return buf_; }
- std::streamsize size() const { return size_; }
- void swap(basic_buffer& rhs);
-private:
- // Disallow copying and assignment.
- basic_buffer(const basic_buffer&);
- basic_buffer& operator=(const basic_buffer&);
- Ch* buf_;
- std::streamsize size_;
-};
-
-template<typename Ch, typename Alloc>
-void swap(basic_buffer<Ch, Alloc>& lhs, basic_buffer<Ch, Alloc>& rhs)
-{ lhs.swap(rhs); }
-
-//
-// Template name: buffer
-// Description: Character buffer with two pointers accessible via ptr() and
-// eptr().
-// Template parameters:
-// Ch - A character type.
-//
-template< typename Ch,
- typename Alloc = std::allocator<Ch> >
-class buffer : public basic_buffer<Ch, Alloc> {
-private:
- typedef basic_buffer<Ch, Alloc> base;
-public:
- typedef iostreams::char_traits<Ch> traits_type;
- using base::resize;
- using base::data;
- using base::size;
- typedef Ch* const const_pointer;
- buffer(std::streamsize buffer_size);
- Ch* & ptr() { return ptr_; }
- const_pointer& ptr() const { return ptr_; }
- Ch* & eptr() { return eptr_; }
- const_pointer& eptr() const { return eptr_; }
- void set(std::streamsize ptr, std::streamsize end);
- void swap(buffer& rhs);
-
- // Returns an int_type as a status code.
- template<typename Source>
- typename int_type_of<Source>::type fill(Source& src)
- {
- using namespace std;
- std::streamsize keep;
- if ((keep = static_cast<std::streamsize>(eptr_ - ptr_)) > 0)
- traits_type::move(
- this->data(),
- ptr_,
- static_cast<size_t>(keep)
- );
- set(0, keep);
- std::streamsize result =
- iostreams::read(src, this->data() + keep, this->size() - keep);
- if (result != -1)
- this->set(0, keep + result);
- return result == -1 ?
- traits_type::eof() :
- result == 0 ?
- traits_type::would_block() :
- traits_type::good();
-
- }
-
- // Returns true if one or more characters were written.
- template<typename Sink>
- bool flush(Sink& dest)
- {
- using namespace std;
- std::streamsize amt = static_cast<std::streamsize>(eptr_ - ptr_);
- std::streamsize result = iostreams::write_if(dest, ptr_, amt);
- if (result < amt) {
- traits_type::move( this->data(),
- ptr_ + static_cast<size_t>(result),
- static_cast<size_t>(amt - result) );
- }
- this->set(0, amt - result);
- return result != 0;
- }
-private:
- Ch *ptr_, *eptr_;
-};
-
-template<typename Ch, typename Alloc>
-void swap(buffer<Ch, Alloc>& lhs, buffer<Ch, Alloc>& rhs)
-{ lhs.swap(rhs); }
-
-//--------------Implementation of basic_buffer--------------------------------//
-
-template<typename Ch, typename Alloc>
-basic_buffer<Ch, Alloc>::basic_buffer() : buf_(0), size_(0) { }
-
-template<typename Ch, typename Alloc>
-inline Ch* basic_buffer<Ch, Alloc>::allocate(std::streamsize buffer_size)
-{
-#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
- return static_cast<Ch*>(allocator_type().allocate(
- static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(buffer_size), 0));
-#else
- allocator_type alloc;
- return static_cast<Ch*>(allocator_traits::allocate(alloc,
- static_cast<BOOST_DEDUCED_TYPENAME allocator_traits::size_type>(buffer_size)));
-#endif
-}
-
-template<typename Ch, typename Alloc>
-basic_buffer<Ch, Alloc>::basic_buffer(std::streamsize buffer_size)
- : buf_(allocate(buffer_size)),
- size_(buffer_size) // Cast for SunPro 5.3.
- { }
-
-template<typename Ch, typename Alloc>
-inline basic_buffer<Ch, Alloc>::~basic_buffer()
-{
- if (buf_) {
-#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
- allocator_type().deallocate(buf_,
- static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(size_));
-#else
- allocator_type alloc;
- allocator_traits::deallocate(alloc, buf_,
- static_cast<BOOST_DEDUCED_TYPENAME allocator_traits::size_type>(size_));
-#endif
- }
-}
-
-template<typename Ch, typename Alloc>
-inline void basic_buffer<Ch, Alloc>::resize(std::streamsize buffer_size)
-{
- if (size_ != buffer_size) {
- basic_buffer<Ch, Alloc> temp(buffer_size);
- std::swap(size_, temp.size_);
- std::swap(buf_, temp.buf_);
- }
-}
-
-template<typename Ch, typename Alloc>
-void basic_buffer<Ch, Alloc>::swap(basic_buffer& rhs)
-{
- std::swap(buf_, rhs.buf_);
- std::swap(size_, rhs.size_);
-}
-
-//--------------Implementation of buffer--------------------------------------//
-
-template<typename Ch, typename Alloc>
-buffer<Ch, Alloc>::buffer(std::streamsize buffer_size)
- : basic_buffer<Ch, Alloc>(buffer_size) { }
-
-template<typename Ch, typename Alloc>
-inline void buffer<Ch, Alloc>::set(std::streamsize ptr, std::streamsize end)
-{
- ptr_ = data() + ptr;
- eptr_ = data() + end;
-}
-
-template<typename Ch, typename Alloc>
-inline void buffer<Ch, Alloc>::swap(buffer& rhs)
-{
- base::swap(rhs);
- std::swap(ptr_, rhs.ptr_);
- std::swap(eptr_, rhs.eptr_);
-}
-
-//----------------------------------------------------------------------------//
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/codecvt.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/config/codecvt.hpp
deleted file mode 100644
index 6519ddcd447..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/codecvt.hpp
+++ /dev/null
@@ -1,81 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/iostreams/detail/config/wide_streams.hpp>
-#include <cstddef>
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-//------------------Support for codecvt with user-defined state types---------//
-
-#if defined(__MSL_CPP__) || defined(__LIBCOMO__) || \
- BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) || \
- defined(_LIBCPP_VERSION) \
- /**/
-# define BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION
-#endif
-
-#if defined(__GLIBCPP__) || defined(__GLIBCXX__) || \
- BOOST_WORKAROUND(_STLPORT_VERSION, > 0x450) \
- /**/
-# define BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION
-#endif
-
-//------------------Check for codecvt ctor taking a reference count-----------//
-
-#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) || \
- BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461) \
- /**/
-# define BOOST_IOSTREAMS_NO_CODECVT_CTOR_FROM_SIZE_T
-#endif
-
-//------------------Normalize codecvt::length---------------------------------//
-
-#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) && \
- (!defined(BOOST_RWSTD_VER) || BOOST_RWSTD_VER < 0x04010300) && \
- (!defined(__MACH__) || !defined(__INTEL_COMPILER))
- /**/
-# define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER const
-#else
-# define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER
-#endif
-
-//------------------Check for codecvt::max_length-----------------------------//
-
-#if BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461)
-# define BOOST_IOSTREAMS_NO_CODECVT_MAX_LENGTH
-#endif
-
-//------------------Put mbstate_t and codecvt in std--------------------------//
-
-#ifndef BOOST_IOSTREAMS_NO_LOCALE
-# include <locale>
-#endif
-
-// From Robert Ramey's version of utf8_codecvt_facet.
-namespace std {
-
-#if defined(__LIBCOMO__)
- using ::mbstate_t;
-#elif defined(BOOST_DINKUMWARE_STDLIB) && !defined(__BORLANDC__)
- using ::mbstate_t;
-#elif defined(__SGI_STL_PORT)
-#elif defined(BOOST_NO_STDC_NAMESPACE)
- using ::codecvt;
- using ::mbstate_t;
-#endif
-
-} // End namespace std.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/fpos.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/config/fpos.hpp
deleted file mode 100644
index 12c13a0f1e2..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/fpos.hpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Distributed under the Boost Software License, Version 1.0.(See accompanying
- * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
-
- * File: boost/iostreams/detail/execute.hpp
- * Date: Thu Dec 06 13:21:54 MST 2007
- * Copyright: 2007-2008 CodeRage, LLC
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * Defines the preprocessor symbol BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS for
- * platforms that use the implementation of std::fpos from the Dinkumware
- * Standard Library.
- */
-
-#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/config.hpp>
-
-# if (defined(_YVALS) || defined(_CPPLIB_VER)) && !defined(__SGI_STL_PORT) && \
- !defined(_STLPORT_VERSION) && !defined(__QNX__) && !defined(_VX_CPU) && !defined(__VXWORKS__)
- /**/
-
-#include <boost/iostreams/detail/ios.hpp>
-
-# define BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS
-
-#if !defined(_FPOSOFF)
-#define BOOST_IOSTREAMS_FPOSOFF(fp) ((long long)(fp))
-#else
-#define BOOST_IOSTREAMS_FPOSOFF(fp) _FPOSOFF(fp)
-#endif
-
-# endif
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/wide_streams.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/config/wide_streams.hpp
deleted file mode 100644
index af3d716d494..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/wide_streams.hpp
+++ /dev/null
@@ -1,55 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Adapted from http://www.boost.org/more/separate_compilation.html, by
-// John Maddock.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <cstddef>
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-//------------------Templated stream support----------------------------------//
-
-// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for cray patch.
-#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
-# if defined(__STL_CONFIG_H) && \
- !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
- /**/
-# define BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
-# endif
-#endif // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
-
-//------------------Wide stream support---------------------------------------//
-
-#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS
-# if defined(BOOST_IOSTREAMS_NO_STREAM_TEMPLATES) || \
- defined (BOOST_NO_STD_WSTREAMBUF) && \
- ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
- /**/
-# define BOOST_IOSTREAMS_NO_WIDE_STREAMS
-# endif
-#endif // #ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS
-
-//------------------Locale support--------------------------------------------//
-
-#ifndef BOOST_IOSTREAMS_NO_LOCALE
-# if defined(BOOST_NO_STD_LOCALE) || \
- defined(__CYGWIN__) && \
- ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
- /**/
-# define BOOST_IOSTREAMS_NO_LOCALE
-# endif
-#endif // #ifndef BOOST_IOSTREAMS_NO_LOCALE
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/restrict_impl.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/restrict_impl.hpp
deleted file mode 100644
index 8278db5a6ab..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/restrict_impl.hpp
+++ /dev/null
@@ -1,481 +0,0 @@
-/*
- * Distributed under the Boost Software License, Version 1.0.(See accompanying
- * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
- *
- * See http://www.boost.org/libs/iostreams for documentation.
-
- * File: boost/iostreams/detail/restrict_impl.hpp
- * Date: Sun Jan 06 12:57:30 MST 2008
- * Copyright: 2007-2008 CodeRage, LLC
- * Author: Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * If included with the macro BOOST_IOSTREAMS_RESTRICT undefined, defines the
- * class template boost::iostreams::restriction. If included with the macro
- * BOOST_IOSTREAMS_RESTRICT defined as an identifier, defines the overloaded
- * function template boost::iostreams::BOOST_IOSTREAMS_RESTRICT, and object
- * generator for boost::iostreams::restriction.
- *
- * This design allows <boost/iostreams/restrict.hpp> and
- * <boost/iostreams/slice.hpp> to share an implementation.
- */
-
-#if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) && \
- !defined(BOOST_IOSTREAMS_RESTRICT)
-# define BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED
-
-//------------------Implementation of restriction-----------------------------//
-
-# include <algorithm> // min.
-# include <utility> // pair.
-# include <boost/cstdint.hpp> // intmax_t.
-# include <boost/config.hpp> // DEDUCED_TYPENAME.
-# include <boost/iostreams/categories.hpp>
-# include <boost/iostreams/char_traits.hpp>
-# include <boost/iostreams/detail/adapter/device_adapter.hpp>
-# include <boost/iostreams/detail/adapter/filter_adapter.hpp>
-# include <boost/iostreams/detail/call_traits.hpp>
-# include <boost/iostreams/detail/enable_if_stream.hpp>
-# include <boost/iostreams/detail/error.hpp>
-# include <boost/iostreams/detail/ios.hpp> // failure.
-# include <boost/iostreams/detail/select.hpp>
-# include <boost/iostreams/operations.hpp>
-# include <boost/iostreams/skip.hpp>
-# include <boost/iostreams/traits.hpp> // mode_of, is_direct.
-# include <boost/mpl/bool.hpp>
-# include <boost/static_assert.hpp>
-# include <boost/throw_exception.hpp>
-# include <boost/type_traits/is_convertible.hpp>
-
-# include <boost/iostreams/detail/config/disable_warnings.hpp>
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-//
-// Template name: restricted_indirect_device.
-// Description: Provides an restricted view of an indirect Device.
-// Template parameters:
-// Device - An indirect model of Device that models either Source or
-// SeekableDevice.
-//
-template<typename Device>
-class restricted_indirect_device : public device_adapter<Device> {
-private:
- typedef typename detail::param_type<Device>::type param_type;
-public:
- typedef typename char_type_of<Device>::type char_type;
- typedef typename mode_of<Device>::type mode;
- BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
- struct category
- : mode,
- device_tag,
- closable_tag,
- flushable_tag,
- localizable_tag,
- optimally_buffered_tag
- { };
- restricted_indirect_device( param_type dev, stream_offset off,
- stream_offset len = -1 );
- std::streamsize read(char_type* s, std::streamsize n);
- std::streamsize write(const char_type* s, std::streamsize n);
- std::streampos seek(stream_offset off, BOOST_IOS::seekdir way);
-private:
- stream_offset beg_, pos_, end_;
-};
-
-//
-// Template name: restricted_direct_device.
-// Description: Provides an restricted view of a Direct Device.
-// Template parameters:
-// Device - A model of Direct and Device.
-//
-template<typename Device>
-class restricted_direct_device : public device_adapter<Device> {
-public:
- typedef typename char_type_of<Device>::type char_type;
- typedef std::pair<char_type*, char_type*> pair_type;
- typedef typename mode_of<Device>::type mode;
- BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
- struct category
- : mode_of<Device>::type,
- device_tag,
- direct_tag,
- closable_tag,
- localizable_tag
- { };
- restricted_direct_device( const Device& dev, stream_offset off,
- stream_offset len = -1 );
- pair_type input_sequence();
- pair_type output_sequence();
-private:
- pair_type sequence(mpl::true_);
- pair_type sequence(mpl::false_);
- char_type *beg_, *end_;
-};
-
-//
-// Template name: restricted_filter.
-// Description: Provides an restricted view of a Filter.
-// Template parameters:
-// Filter - An indirect model of Filter.
-//
-template<typename Filter>
-class restricted_filter : public filter_adapter<Filter> {
-public:
- typedef typename char_type_of<Filter>::type char_type;
- typedef typename mode_of<Filter>::type mode;
- BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
- struct category
- : mode,
- filter_tag,
- multichar_tag,
- closable_tag,
- localizable_tag,
- optimally_buffered_tag
- { };
- restricted_filter( const Filter& flt, stream_offset off,
- stream_offset len = -1 );
-
- template<typename Source>
- std::streamsize read(Source& src, char_type* s, std::streamsize n)
- {
- using namespace std;
- if (!open_)
- open(src, BOOST_IOS::in);
- std::streamsize amt =
- end_ != -1 ?
- (std::min) (n, static_cast<std::streamsize>(end_ - pos_)) :
- n;
- std::streamsize result =
- iostreams::read(this->component(), src, s, amt);
- if (result != -1)
- pos_ += result;
- return result;
- }
-
- template<typename Sink>
- std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
- {
- if (!open_)
- open(snk, BOOST_IOS::out);
- if (end_ != -1 && pos_ + n >= end_) {
- if(pos_ < end_)
- pos_ += iostreams::write(this->component(),
- snk, s, end_ - pos_);
- boost::throw_exception(bad_write());
- }
- std::streamsize result =
- iostreams::write(this->component(), snk, s, n);
- pos_ += result;
- return result;
- }
-
- template<typename Device>
- std::streampos seek(Device& dev, stream_offset off, BOOST_IOS::seekdir way)
- {
- stream_offset next;
- if (way == BOOST_IOS::beg) {
- next = beg_ + off;
- } else if (way == BOOST_IOS::cur) {
- next = pos_ + off;
- } else if (end_ != -1) {
- next = end_ + off;
- } else {
- // Restriction is half-open; seek relative to the actual end.
- pos_ = this->component().seek(dev, off, BOOST_IOS::end);
- if (pos_ < beg_)
- boost::throw_exception(bad_seek());
- return offset_to_position(pos_ - beg_);
- }
- if (next < beg_ || (end_ != -1 && next >= end_))
- boost::throw_exception(bad_seek());
- pos_ = this->component().seek(dev, next, BOOST_IOS::cur);
- return offset_to_position(pos_ - beg_);
- }
-
- template<typename Device>
- void close(Device& dev)
- {
- open_ = false;
- detail::close_all(this->component(), dev);
- }
-
- template<typename Device>
- void close(Device& dev, BOOST_IOS::openmode which)
- {
- open_ = false;
- iostreams::close(this->component(), dev, which);
- }
-private:
- template<typename Device>
- void open(Device& dev, BOOST_IOS::openmode which)
- {
- typedef typename is_convertible<mode, dual_use>::type is_dual_use;
- open_ = true;
- which = is_dual_use() ? which : (BOOST_IOS::in | BOOST_IOS::out);
- iostreams::skip(this->component(), dev, beg_, which);
- }
-
- stream_offset beg_, pos_, end_;
- bool open_;
-};
-
-template<typename T>
-struct restriction_traits
- : iostreams::select< // Disambiguation for Tru64.
- is_filter<T>, restricted_filter<T>,
- is_direct<T>, restricted_direct_device<T>,
- else_, restricted_indirect_device<T>
- >
- { };
-
-} // End namespace detail.
-
-template<typename T>
-struct restriction : public detail::restriction_traits<T>::type {
- typedef typename detail::param_type<T>::type param_type;
- typedef typename detail::restriction_traits<T>::type base_type;
- restriction(param_type t, stream_offset off, stream_offset len = -1)
- : base_type(t, off, len)
- { }
-};
-
-namespace detail {
-
-//--------------Implementation of restricted_indirect_device------------------//
-
-template<typename Device>
-restricted_indirect_device<Device>::restricted_indirect_device
- (param_type dev, stream_offset off, stream_offset len)
- : device_adapter<Device>(dev), beg_(off), pos_(off),
- end_(len != -1 ? off + len : -1)
-{
- if (len < -1 || off < 0)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
- iostreams::skip(this->component(), off);
-}
-
-template<typename Device>
-inline std::streamsize restricted_indirect_device<Device>::read
- (char_type* s, std::streamsize n)
-{
- using namespace std;
- std::streamsize amt =
- end_ != -1 ?
- (std::min) (n, static_cast<std::streamsize>(end_ - pos_)) :
- n;
- std::streamsize result = iostreams::read(this->component(), s, amt);
- if (result != -1)
- pos_ += result;
- return result;
-}
-
-template<typename Device>
-inline std::streamsize restricted_indirect_device<Device>::write
- (const char_type* s, std::streamsize n)
-{
- if (end_ != -1 && pos_ + n >= end_) {
- if(pos_ < end_)
- pos_ += iostreams::write(this->component(), s, end_ - pos_);
- boost::throw_exception(bad_write());
- }
- std::streamsize result = iostreams::write(this->component(), s, n);
- pos_ += result;
- return result;
-}
-
-template<typename Device>
-std::streampos restricted_indirect_device<Device>::seek
- (stream_offset off, BOOST_IOS::seekdir way)
-{
- stream_offset next;
- if (way == BOOST_IOS::beg) {
- next = beg_ + off;
- } else if (way == BOOST_IOS::cur) {
- next = pos_ + off;
- } else if (end_ != -1) {
- next = end_ + off;
- } else {
- // Restriction is half-open; seek relative to the actual end.
- pos_ = iostreams::seek(this->component(), off, BOOST_IOS::end);
- if (pos_ < beg_)
- boost::throw_exception(bad_seek());
- return offset_to_position(pos_ - beg_);
- }
- if (next < beg_ || (end_ != -1 && next > end_))
- boost::throw_exception(bad_seek());
- pos_ = iostreams::seek(this->component(), next - pos_, BOOST_IOS::cur);
- return offset_to_position(pos_ - beg_);
-}
-
-//--------------Implementation of restricted_direct_device--------------------//
-
-template<typename Device>
-restricted_direct_device<Device>::restricted_direct_device
- (const Device& dev, stream_offset off, stream_offset len)
- : device_adapter<Device>(dev), beg_(0), end_(0)
-{
- std::pair<char_type*, char_type*> seq =
- sequence(is_convertible<category, input>());
- if ( off < 0 || len < -1 ||
- (len != -1 && off + len > seq.second - seq.first) )
- {
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
- }
- beg_ = seq.first + off;
- end_ = len != -1 ?
- seq.first + off + len :
- seq.second;
-}
-
-template<typename Device>
-typename restricted_direct_device<Device>::pair_type
-restricted_direct_device<Device>::input_sequence()
-{
- BOOST_STATIC_ASSERT((is_convertible<category, input>::value));
- return std::make_pair(beg_, end_);
-}
-
-template<typename Device>
-typename restricted_direct_device<Device>::pair_type
-restricted_direct_device<Device>::output_sequence()
-{
- BOOST_STATIC_ASSERT((is_convertible<category, output>::value));
- return std::make_pair(beg_, end_);
-}
-
-template<typename Device>
-typename restricted_direct_device<Device>::pair_type
-restricted_direct_device<Device>::sequence(mpl::true_)
-{ return iostreams::input_sequence(this->component()); }
-
-template<typename Device>
-typename restricted_direct_device<Device>::pair_type
-restricted_direct_device<Device>::sequence(mpl::false_)
-{ return iostreams::output_sequence(this->component()); }
-
-//--------------Implementation of restricted_filter---------------------------//
-
-template<typename Filter>
-restricted_filter<Filter>::restricted_filter
- (const Filter& flt, stream_offset off, stream_offset len)
- : filter_adapter<Filter>(flt), beg_(off),
- pos_(off), end_(len != -1 ? off + len : -1), open_(false)
-{
- if (len < -1 || off < 0)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
-}
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
-
-#elif defined(BOOST_IOSTREAMS_RESTRICT)
-
-namespace boost { namespace iostreams {
-
-//--------------Implementation of restrict/slice------------------------------//
-
-// Note: The following workarounds are patterned after resolve.hpp. It has not
-// yet been confirmed that they are necessary.
-
-# ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //------------------------//
-# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //------------------------------//
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
-{ return restriction<T>(t, off, len); }
-
-template<typename Ch, typename Tr>
-restriction< std::basic_streambuf<Ch, Tr> >
-BOOST_IOSTREAMS_RESTRICT( std::basic_streambuf<Ch, Tr>& sb, stream_offset off,
- stream_offset len = -1 )
-{ return restriction< std::basic_streambuf<Ch, Tr> >(sb, off, len); }
-
-template<typename Ch, typename Tr>
-restriction< std::basic_istream<Ch, Tr> >
-BOOST_IOSTREAMS_RESTRICT
- (std::basic_istream<Ch, Tr>& is, stream_offset off, stream_offset len = -1)
-{ return restriction< std::basic_istream<Ch, Tr> >(is, off, len); }
-
-template<typename Ch, typename Tr>
-restriction< std::basic_ostream<Ch, Tr> >
-BOOST_IOSTREAMS_RESTRICT
- (std::basic_ostream<Ch, Tr>& os, stream_offset off, stream_offset len = -1)
-{ return restriction< std::basic_ostream<Ch, Tr> >(os, off, len); }
-
-template<typename Ch, typename Tr>
-restriction< std::basic_iostream<Ch, Tr> >
-BOOST_IOSTREAMS_RESTRICT
- (std::basic_iostream<Ch, Tr>& io, stream_offset off, stream_offset len = -1)
-{ return restriction< std::basic_iostream<Ch, Tr> >(io, off, len); }
-
-# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------//
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
-{ return restriction<T>(t, off, len); }
-
-restriction<std::streambuf>
-BOOST_IOSTREAMS_RESTRICT
- (std::streambuf& sb, stream_offset off, stream_offset len = -1)
-{ return restriction<std::streambuf>(sb, off, len); }
-
-restriction<std::istream>
-BOOST_IOSTREAMS_RESTRICT
- (std::istream<Ch, Tr>& is, stream_offset off, stream_offset len = -1)
-{ return restriction<std::istream>(is, off, len); }
-
-restriction<std::ostream>
-BOOST_IOSTREAMS_RESTRICT
- (std::ostream<Ch, Tr>& os, stream_offset off, stream_offset len = -1)
-{ return restriction<std::ostream>(os, off, len); }
-
-restriction<std::iostream>
-BOOST_IOSTREAMS_RESTRICT
- (std::iostream<Ch, Tr>& io, stream_offset off, stream_offset len = -1)
-{ return restriction<std::iostream>(io, off, len); }
-
-# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------//
-# else // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------//
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT
- (const T& t, stream_offset off, stream_offset len, mpl::true_)
-{ // Bad overload resolution.
- return restriction<T>(const_cast<T&>(t, off, len));
-}
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT
- (const T& t, stream_offset off, stream_offset len, mpl::false_)
-{ return restriction<T>(t, off, len); }
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
- BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
-{ return BOOST_IOSTREAMS_RESTRICT(t, off, len, is_std_io<T>()); }
-
-# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
- !defined(__GNUC__) // ---------------------------------------------------//
-
-template<typename T>
-restriction<T>
-BOOST_IOSTREAMS_RESTRICT(T& t, stream_offset off, stream_offset len = -1)
-{ return restriction<T>(t, off, len); }
-
-# endif // Borland 5.x or GCC //-------------------------------//
-# endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //--------------//
-
-} } // End namespaces iostreams, boost.
-
-#endif // #if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) ...
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp
deleted file mode 100644
index 69efe2b128d..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp
+++ /dev/null
@@ -1,311 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/assert.hpp>
-#include <cstddef>
-#include <typeinfo>
-#include <utility> // pair.
-#include <boost/config.hpp> // BOOST_DEDUCED_TYPENAME,
-#include <boost/iostreams/detail/char_traits.hpp> // member template friends.
-#include <boost/iostreams/detail/config/wide_streams.hpp>
-#include <boost/iostreams/detail/error.hpp>
-#include <boost/iostreams/detail/execute.hpp>
-#include <boost/iostreams/detail/functional.hpp>
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/detail/optional.hpp>
-#include <boost/iostreams/detail/streambuf.hpp>
-#include <boost/iostreams/detail/streambuf/linked_streambuf.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/iostreams/positioning.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/throw_exception.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-template< typename T,
- typename Tr =
- BOOST_IOSTREAMS_CHAR_TRAITS(
- BOOST_DEDUCED_TYPENAME char_type_of<T>::type
- ) >
-class direct_streambuf
- : public linked_streambuf<BOOST_DEDUCED_TYPENAME char_type_of<T>::type, Tr>
-{
-public:
- typedef typename char_type_of<T>::type char_type;
- BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr)
-private:
- typedef linked_streambuf<char_type, traits_type> base_type;
- typedef typename category_of<T>::type category;
- typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(
- char_type, traits_type
- ) streambuf_type;
-public: // stream needs access.
- void open(const T& t, std::streamsize buffer_size,
- std::streamsize pback_size);
- bool is_open() const;
- void close();
- bool auto_close() const { return auto_close_; }
- void set_auto_close(bool close) { auto_close_ = close; }
- bool strict_sync() { return true; }
-
- // Declared in linked_streambuf.
- T* component() { return storage_.get(); }
-protected:
- BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
- direct_streambuf();
-
- //--------------Virtual functions-----------------------------------------//
-
- // Declared in linked_streambuf.
- void close_impl(BOOST_IOS::openmode m);
- const std::type_info& component_type() const { return typeid(T); }
- void* component_impl() { return component(); }
-#ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
- public:
-#endif
-
- // Declared in basic_streambuf.
- int_type underflow();
- int_type pbackfail(int_type c);
- int_type overflow(int_type c);
- pos_type seekoff( off_type off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which );
- pos_type seekpos(pos_type sp, BOOST_IOS::openmode which);
-private:
- pos_type seek_impl( stream_offset off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which );
- void init_input(any_tag) { }
- void init_input(input);
- void init_output(any_tag) { }
- void init_output(output);
- void init_get_area();
- void init_put_area();
- bool one_head() const;
- bool two_head() const;
- optional<T> storage_;
- char_type *ibeg_, *iend_, *obeg_, *oend_;
- bool auto_close_;
-};
-
-//------------------Implementation of direct_streambuf------------------------//
-
-template<typename T, typename Tr>
-direct_streambuf<T, Tr>::direct_streambuf()
- : ibeg_(0), iend_(0), obeg_(0), oend_(0), auto_close_(true)
-{ this->set_true_eof(true); }
-
-template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::open
- (const T& t, std::streamsize, std::streamsize)
-{
- storage_.reset(t);
- init_input(category());
- init_output(category());
- setg(0, 0, 0);
- setp(0, 0);
- this->set_needs_close();
-}
-
-template<typename T, typename Tr>
-bool direct_streambuf<T, Tr>::is_open() const
-{ return ibeg_ != 0 || obeg_ != 0; }
-
-template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::close()
-{
- base_type* self = this;
- detail::execute_all( detail::call_member_close(*self, BOOST_IOS::in),
- detail::call_member_close(*self, BOOST_IOS::out),
- detail::call_reset(storage_) );
-}
-
-template<typename T, typename Tr>
-typename direct_streambuf<T, Tr>::int_type
-direct_streambuf<T, Tr>::underflow()
-{
- if (!ibeg_)
- boost::throw_exception(cant_read());
- if (!gptr())
- init_get_area();
- return gptr() != iend_ ?
- traits_type::to_int_type(*gptr()) :
- traits_type::eof();
-}
-
-template<typename T, typename Tr>
-typename direct_streambuf<T, Tr>::int_type
-direct_streambuf<T, Tr>::pbackfail(int_type c)
-{
- using namespace std;
- if (!ibeg_)
- boost::throw_exception(cant_read());
- if (gptr() != 0 && gptr() != ibeg_) {
- gbump(-1);
- if (!traits_type::eq_int_type(c, traits_type::eof()))
- *gptr() = traits_type::to_char_type(c);
- return traits_type::not_eof(c);
- }
- boost::throw_exception(bad_putback());
-}
-
-template<typename T, typename Tr>
-typename direct_streambuf<T, Tr>::int_type
-direct_streambuf<T, Tr>::overflow(int_type c)
-{
- using namespace std;
- if (!obeg_)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("no write access"));
- if (!pptr()) init_put_area();
- if (!traits_type::eq_int_type(c, traits_type::eof())) {
- if (pptr() == oend_)
- boost::throw_exception(
- BOOST_IOSTREAMS_FAILURE("write area exhausted")
- );
- *pptr() = traits_type::to_char_type(c);
- pbump(1);
- return c;
- }
- return traits_type::not_eof(c);
-}
-
-template<typename T, typename Tr>
-inline typename direct_streambuf<T, Tr>::pos_type
-direct_streambuf<T, Tr>::seekoff
- (off_type off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
-{ return seek_impl(off, way, which); }
-
-template<typename T, typename Tr>
-inline typename direct_streambuf<T, Tr>::pos_type
-direct_streambuf<T, Tr>::seekpos
- (pos_type sp, BOOST_IOS::openmode which)
-{
- return seek_impl(position_to_offset(sp), BOOST_IOS::beg, which);
-}
-
-template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::close_impl(BOOST_IOS::openmode which)
-{
- if (which == BOOST_IOS::in && ibeg_ != 0) {
- setg(0, 0, 0);
- ibeg_ = iend_ = 0;
- }
- if (which == BOOST_IOS::out && obeg_ != 0) {
- sync();
- setp(0, 0);
- obeg_ = oend_ = 0;
- }
- boost::iostreams::close(*storage_, which);
-}
-
-template<typename T, typename Tr>
-typename direct_streambuf<T, Tr>::pos_type direct_streambuf<T, Tr>::seek_impl
- (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
-{
- using namespace std;
- BOOST_IOS::openmode both = BOOST_IOS::in | BOOST_IOS::out;
- if (two_head() && (which & both) == both)
- boost::throw_exception(bad_seek());
- stream_offset result = -1;
- bool one = one_head();
- if (one && (pptr() != 0 || gptr()== 0))
- init_get_area(); // Switch to input mode, for code reuse.
- if (one || ((which & BOOST_IOS::in) != 0 && ibeg_ != 0)) {
- if (!gptr()) setg(ibeg_, ibeg_, iend_);
- ptrdiff_t next = 0;
- switch (way) {
- case BOOST_IOS::beg: next = off; break;
- case BOOST_IOS::cur: next = (gptr() - ibeg_) + off; break;
- case BOOST_IOS::end: next = (iend_ - ibeg_) + off; break;
- default: BOOST_ASSERT(0);
- }
- if (next < 0 || next > (iend_ - ibeg_))
- boost::throw_exception(bad_seek());
- setg(ibeg_, ibeg_ + next, iend_);
- result = next;
- }
- if (!one && (which & BOOST_IOS::out) != 0 && obeg_ != 0) {
- if (!pptr()) setp(obeg_, oend_);
- ptrdiff_t next = 0;
- switch (way) {
- case BOOST_IOS::beg: next = off; break;
- case BOOST_IOS::cur: next = (pptr() - obeg_) + off; break;
- case BOOST_IOS::end: next = (oend_ - obeg_) + off; break;
- default: BOOST_ASSERT(0);
- }
- if (next < 0 || next > (oend_ - obeg_))
- boost::throw_exception(bad_seek());
- pbump(static_cast<int>(next - (pptr() - obeg_)));
- result = next;
- }
- return offset_to_position(result);
-}
-
-template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::init_input(input)
-{
- std::pair<char_type*, char_type*> p = input_sequence(*storage_);
- ibeg_ = p.first;
- iend_ = p.second;
-}
-
-template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::init_output(output)
-{
- std::pair<char_type*, char_type*> p = output_sequence(*storage_);
- obeg_ = p.first;
- oend_ = p.second;
-}
-
-template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::init_get_area()
-{
- setg(ibeg_, ibeg_, iend_);
- if (one_head() && pptr()) {
- gbump(static_cast<int>(pptr() - obeg_));
- setp(0, 0);
- }
-}
-
-template<typename T, typename Tr>
-void direct_streambuf<T, Tr>::init_put_area()
-{
- setp(obeg_, oend_);
- if (one_head() && gptr()) {
- pbump(static_cast<int>(gptr() - ibeg_));
- setg(0, 0, 0);
- }
-}
-
-template<typename T, typename Tr>
-inline bool direct_streambuf<T, Tr>::one_head() const
-{ return ibeg_ && obeg_ && ibeg_ == obeg_; }
-
-template<typename T, typename Tr>
-inline bool direct_streambuf<T, Tr>::two_head() const
-{ return ibeg_ && obeg_ && ibeg_ != obeg_; }
-
-//----------------------------------------------------------------------------//
-
-} // End namespace detail.
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
deleted file mode 100644
index 90e1e115316..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
+++ /dev/null
@@ -1,447 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// This material is heavily indebted to the discussion and code samples in
-// A. Langer and K. Kreft, "Standard C++ IOStreams and Locales",
-// Addison-Wesley, 2000, pp. 228-43.
-
-// User "GMSB" provided an optimization for small seeks.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED
-
-#include <algorithm> // min, max.
-#include <cassert>
-#include <exception>
-#include <typeinfo>
-#include <boost/config.hpp> // Member template friends.
-#include <boost/detail/workaround.hpp>
-#include <boost/iostreams/constants.hpp>
-#include <boost/iostreams/detail/adapter/concept_adapter.hpp>
-#include <boost/iostreams/detail/buffer.hpp>
-#include <boost/iostreams/detail/config/wide_streams.hpp>
-#include <boost/iostreams/detail/double_object.hpp>
-#include <boost/iostreams/detail/execute.hpp>
-#include <boost/iostreams/detail/functional.hpp>
-#include <boost/iostreams/detail/ios.hpp>
-#include <boost/iostreams/detail/optional.hpp>
-#include <boost/iostreams/detail/push.hpp>
-#include <boost/iostreams/detail/streambuf/linked_streambuf.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/iostreams/positioning.hpp>
-#include <boost/iostreams/traits.hpp>
-#include <boost/iostreams/operations.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC, BCC 5.x
-
-namespace boost { namespace iostreams { namespace detail {
-
-//
-// Description: The implementation of basic_streambuf used by chains.
-//
-template<typename T, typename Tr, typename Alloc, typename Mode>
-class indirect_streambuf
- : public linked_streambuf<BOOST_DEDUCED_TYPENAME char_type_of<T>::type, Tr>
-{
-public:
- typedef typename char_type_of<T>::type char_type;
- BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr)
-private:
- typedef typename category_of<T>::type category;
- typedef concept_adapter<T> wrapper;
- typedef detail::basic_buffer<char_type, Alloc> buffer_type;
- typedef indirect_streambuf<T, Tr, Alloc, Mode> my_type;
- typedef detail::linked_streambuf<char_type, traits_type> base_type;
- typedef linked_streambuf<char_type, Tr> streambuf_type;
-public:
- indirect_streambuf();
-
- void open(const T& t BOOST_IOSTREAMS_PUSH_PARAMS());
- bool is_open() const;
- void close();
- bool auto_close() const;
- void set_auto_close(bool close);
- bool strict_sync();
-
- // Declared in linked_streambuf.
- T* component() { return &*obj(); }
-protected:
- BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
-
- //----------virtual functions---------------------------------------------//
-
-#ifndef BOOST_IOSTREAMS_NO_LOCALE
- void imbue(const std::locale& loc);
-#endif
-#ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
- public:
-#endif
- int_type underflow();
- int_type pbackfail(int_type c);
- int_type overflow(int_type c);
- int sync();
- pos_type seekoff( off_type off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which );
- pos_type seekpos(pos_type sp, BOOST_IOS::openmode which);
-
- // Declared in linked_streambuf.
- void set_next(streambuf_type* next);
- void close_impl(BOOST_IOS::openmode m);
- const std::type_info& component_type() const { return typeid(T); }
- void* component_impl() { return component(); }
-private:
-
- //----------Accessor functions--------------------------------------------//
-
- wrapper& obj() { return *storage_; }
- streambuf_type* next() const { return next_; }
- buffer_type& in() { return buffer_.first(); }
- buffer_type& out() { return buffer_.second(); }
- bool can_read() const { return is_convertible<Mode, input>::value; }
- bool can_write() const { return is_convertible<Mode, output>::value; }
- bool output_buffered() const { return (flags_ & f_output_buffered) != 0; }
- bool shared_buffer() const { return is_convertible<Mode, seekable>::value || is_convertible<Mode, dual_seekable>::value; }
- void set_flags(int f) { flags_ = f; }
-
- //----------State changing functions--------------------------------------//
-
- virtual void init_get_area();
- virtual void init_put_area();
-
- //----------Utility function----------------------------------------------//
-
- pos_type seek_impl( stream_offset off, BOOST_IOS::seekdir way,
- BOOST_IOS::openmode which );
- void sync_impl();
-
- enum flag_type {
- f_open = 1,
- f_output_buffered = f_open << 1,
- f_auto_close = f_output_buffered << 1
- };
-
- optional<wrapper> storage_;
- streambuf_type* next_;
- double_object<
- buffer_type,
- is_convertible<
- Mode,
- two_sequence
- >
- > buffer_;
- std::streamsize pback_size_;
- int flags_;
-};
-
-//--------------Implementation of indirect_streambuf--------------------------//
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-indirect_streambuf<T, Tr, Alloc, Mode>::indirect_streambuf()
- : next_(0), pback_size_(0), flags_(f_auto_close) { }
-
-//--------------Implementation of open, is_open and close---------------------//
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-void indirect_streambuf<T, Tr, Alloc, Mode>::open
- (const T& t, std::streamsize buffer_size, std::streamsize pback_size)
-{
- using namespace std;
-
- // Normalize buffer sizes.
- buffer_size =
- (buffer_size != -1) ?
- buffer_size :
- iostreams::optimal_buffer_size(t);
- pback_size =
- (pback_size != -1) ?
- pback_size :
- default_pback_buffer_size;
-
- // Construct input buffer.
- if (can_read()) {
- pback_size_ = (std::max)(std::streamsize(2), pback_size); // STLPort needs 2.
- std::streamsize size =
- pback_size_ +
- ( buffer_size ? buffer_size: std::streamsize(1) );
- in().resize(static_cast<int>(size));
- if (!shared_buffer())
- init_get_area();
- }
-
- // Construct output buffer.
- if (can_write() && !shared_buffer()) {
- if (buffer_size != std::streamsize(0))
- out().resize(static_cast<int>(buffer_size));
- init_put_area();
- }
-
- storage_.reset(wrapper(t));
- flags_ |= f_open;
- if (can_write() && buffer_size > 1)
- flags_ |= f_output_buffered;
- this->set_true_eof(false);
- this->set_needs_close();
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-inline bool indirect_streambuf<T, Tr, Alloc, Mode>::is_open() const
-{ return (flags_ & f_open) != 0; }
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-void indirect_streambuf<T, Tr, Alloc, Mode>::close()
-{
- using namespace std;
- base_type* self = this;
- detail::execute_all(
- detail::call_member_close(*self, BOOST_IOS::in),
- detail::call_member_close(*self, BOOST_IOS::out),
- detail::call_reset(storage_),
- detail::clear_flags(flags_)
- );
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-bool indirect_streambuf<T, Tr, Alloc, Mode>::auto_close() const
-{ return (flags_ & f_auto_close) != 0; }
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-void indirect_streambuf<T, Tr, Alloc, Mode>::set_auto_close(bool close)
-{ flags_ = (flags_ & ~f_auto_close) | (close ? f_auto_close : 0); }
-
-//--------------Implementation virtual functions------------------------------//
-
-#ifndef BOOST_IOSTREAMS_NO_LOCALE
-template<typename T, typename Tr, typename Alloc, typename Mode>
-void indirect_streambuf<T, Tr, Alloc, Mode>::imbue(const std::locale& loc)
-{
- if (is_open()) {
- obj().imbue(loc);
- if (next_)
- next_->pubimbue(loc);
- }
-}
-#endif
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
-indirect_streambuf<T, Tr, Alloc, Mode>::underflow()
-{
- using namespace std;
- if (!gptr()) init_get_area();
- buffer_type& buf = in();
- if (gptr() < egptr()) return traits_type::to_int_type(*gptr());
-
- // Fill putback buffer.
- std::streamsize keep =
- (std::min)( static_cast<std::streamsize>(gptr() - eback()),
- pback_size_ );
- if (keep)
- traits_type::move( buf.data() + (pback_size_ - keep),
- gptr() - keep, keep );
-
- // Set pointers to reasonable values in case read throws.
- setg( buf.data() + pback_size_ - keep,
- buf.data() + pback_size_,
- buf.data() + pback_size_ );
-
- // Read from source.
- std::streamsize chars =
- obj().read(buf.data() + pback_size_, buf.size() - pback_size_, next_);
- if (chars == -1) {
- this->set_true_eof(true);
- chars = 0;
- }
- setg(eback(), gptr(), buf.data() + pback_size_ + chars);
- return chars != 0 ?
- traits_type::to_int_type(*gptr()) :
- traits_type::eof();
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
-indirect_streambuf<T, Tr, Alloc, Mode>::pbackfail(int_type c)
-{
- if (gptr() != eback()) {
- gbump(-1);
- if (!traits_type::eq_int_type(c, traits_type::eof()))
- *gptr() = traits_type::to_char_type(c);
- return traits_type::not_eof(c);
- } else {
- boost::throw_exception(bad_putback());
- }
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
-indirect_streambuf<T, Tr, Alloc, Mode>::overflow(int_type c)
-{
- if ( (output_buffered() && pptr() == 0) ||
- (shared_buffer() && gptr() != 0) )
- {
- init_put_area();
- }
- if (!traits_type::eq_int_type(c, traits_type::eof())) {
- if (output_buffered()) {
- if (pptr() == epptr()) {
- sync_impl();
- if (pptr() == epptr())
- return traits_type::eof();
- }
- *pptr() = traits_type::to_char_type(c);
- pbump(1);
- } else {
- char_type d = traits_type::to_char_type(c);
- if (obj().write(&d, 1, next_) != 1)
- return traits_type::eof();
- }
- }
- return traits_type::not_eof(c);
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-int indirect_streambuf<T, Tr, Alloc, Mode>::sync()
-{
- try { // sync() is no-throw.
- sync_impl();
- obj().flush(next_);
- return 0;
- } catch (...) { return -1; }
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-bool indirect_streambuf<T, Tr, Alloc, Mode>::strict_sync()
-{
- try { // sync() is no-throw.
- sync_impl();
- return obj().flush(next_);
- } catch (...) { return false; }
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-inline typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
-indirect_streambuf<T, Tr, Alloc, Mode>::seekoff
- (off_type off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
-{ return seek_impl(off, way, which); }
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-inline typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
-indirect_streambuf<T, Tr, Alloc, Mode>::seekpos
- (pos_type sp, BOOST_IOS::openmode which)
-{
- return seek_impl(position_to_offset(sp), BOOST_IOS::beg, which);
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
-indirect_streambuf<T, Tr, Alloc, Mode>::seek_impl
- (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
-{
- if ( gptr() != 0 && way == BOOST_IOS::cur && which == BOOST_IOS::in &&
- eback() - gptr() <= off && off <= egptr() - gptr() )
- { // Small seek optimization
- gbump(static_cast<int>(off));
- return obj().seek(stream_offset(0), BOOST_IOS::cur, BOOST_IOS::in, next_) -
- static_cast<off_type>(egptr() - gptr());
- }
- if (pptr() != 0)
- this->BOOST_IOSTREAMS_PUBSYNC(); // sync() confuses VisualAge 6.
- if (way == BOOST_IOS::cur && gptr())
- off -= static_cast<off_type>(egptr() - gptr());
- bool two_head = is_convertible<category, dual_seekable>::value ||
- is_convertible<category, bidirectional_seekable>::value;
- if (two_head) {
- BOOST_IOS::openmode both = BOOST_IOS::in | BOOST_IOS::out;
- if ((which & both) == both)
- boost::throw_exception(bad_seek());
- if (which & BOOST_IOS::in) {
- setg(0, 0, 0);
- }
- if (which & BOOST_IOS::out) {
- setp(0, 0);
- }
- }
- else {
- setg(0, 0, 0);
- setp(0, 0);
- }
- return obj().seek(off, way, which, next_);
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-inline void indirect_streambuf<T, Tr, Alloc, Mode>::set_next
- (streambuf_type* next)
-{ next_ = next; }
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-inline void indirect_streambuf<T, Tr, Alloc, Mode>::close_impl
- (BOOST_IOS::openmode which)
-{
- if (which == BOOST_IOS::in && is_convertible<Mode, input>::value) {
- setg(0, 0, 0);
- }
- if (which == BOOST_IOS::out && is_convertible<Mode, output>::value) {
- sync();
- setp(0, 0);
- }
- if ( !is_convertible<category, dual_use>::value ||
- is_convertible<Mode, input>::value == (which == BOOST_IOS::in) )
- {
- obj().close(which, next_);
- }
-}
-
-//----------State changing functions------------------------------------------//
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-void indirect_streambuf<T, Tr, Alloc, Mode>::sync_impl()
-{
- std::streamsize avail, amt;
- if ((avail = static_cast<std::streamsize>(pptr() - pbase())) > 0) {
- if ((amt = obj().write(pbase(), avail, next())) == avail)
- setp(out().begin(), out().end());
- else {
- const char_type* ptr = pptr();
- setp(out().begin() + amt, out().end());
- pbump(static_cast<int>(ptr - pptr()));
- }
- }
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-void indirect_streambuf<T, Tr, Alloc, Mode>::init_get_area()
-{
- if (shared_buffer() && pptr() != 0) {
- sync_impl();
- setp(0, 0);
- }
- setg(in().begin(), in().begin(), in().begin());
-}
-
-template<typename T, typename Tr, typename Alloc, typename Mode>
-void indirect_streambuf<T, Tr, Alloc, Mode>::init_put_area()
-{
- using namespace std;
- if (shared_buffer() && gptr() != 0) {
- obj().seek(static_cast<off_type>(gptr() - egptr()), BOOST_IOS::cur, BOOST_IOS::in, next_);
- setg(0, 0, 0);
- }
- if (output_buffered())
- setp(out().begin(), out().end());
- else
- setp(0, 0);
-}
-
-//----------------------------------------------------------------------------//
-
-} } } // End namespaces detail, iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC, BCC 5.x
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp b/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp
deleted file mode 100644
index 9999ded62f4..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp
+++ /dev/null
@@ -1,114 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-#ifndef BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <typeinfo>
-#include <boost/config.hpp> // member template friends.
-#include <boost/iostreams/detail/char_traits.hpp>
-#include <boost/iostreams/detail/ios.hpp> // openmode.
-#include <boost/iostreams/detail/streambuf.hpp>
-
-// Must come last.
-#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
-
-namespace boost { namespace iostreams { namespace detail {
-
-template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
-class chain_base;
-
-template<typename Chain, typename Access, typename Mode> class chainbuf;
-
-#define BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base) \
- using base::eback; using base::gptr; using base::egptr; \
- using base::setg; using base::gbump; using base::pbase; \
- using base::pptr; using base::epptr; using base::setp; \
- using base::pbump; using base::underflow; using base::pbackfail; \
- using base::xsgetn; using base::overflow; using base::xsputn; \
- using base::sync; using base::seekoff; using base::seekpos; \
- /**/
-
-template<typename Ch, typename Tr = BOOST_IOSTREAMS_CHAR_TRAITS(Ch) >
-class linked_streambuf : public BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, Tr) {
-protected:
- linked_streambuf() : flags_(0) { }
- void set_true_eof(bool eof)
- {
- flags_ = (flags_ & ~f_true_eof) | (eof ? f_true_eof : 0);
- }
-public:
-
- // Should be called only after receiving an ordinary EOF indication,
- // to confirm that it represents EOF rather than WOULD_BLOCK.
- bool true_eof() const { return (flags_ & f_true_eof) != 0; }
-protected:
-
- //----------grant friendship to chain_base and chainbuf-------------------//
-
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
- template< typename Self, typename ChT, typename TrT,
- typename Alloc, typename Mode >
- friend class chain_base;
- template<typename Chain, typename Mode, typename Access>
- friend class chainbuf;
- template<typename U>
- friend class member_close_operation;
-#else
- public:
- typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, Tr) base;
- BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base)
-#endif
- void close(BOOST_IOS::openmode which)
- {
- if ( which == BOOST_IOS::in &&
- (flags_ & f_input_closed) == 0 )
- {
- flags_ |= f_input_closed;
- close_impl(which);
- }
- if ( which == BOOST_IOS::out &&
- (flags_ & f_output_closed) == 0 )
- {
- flags_ |= f_output_closed;
- close_impl(which);
- }
- }
- void set_needs_close()
- {
- flags_ &= ~(f_input_closed | f_output_closed);
- }
- virtual void set_next(linked_streambuf<Ch, Tr>* /* next */) { }
- virtual void close_impl(BOOST_IOS::openmode) = 0;
- virtual bool auto_close() const = 0;
- virtual void set_auto_close(bool) = 0;
- virtual bool strict_sync() = 0;
- virtual const std::type_info& component_type() const = 0;
- virtual void* component_impl() = 0;
-#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
- private:
-#else
- public:
-#endif
-private:
- enum flag_type {
- f_true_eof = 1,
- f_input_closed = f_true_eof << 1,
- f_output_closed = f_input_closed << 1
- };
- int flags_;
-};
-
-} } } // End namespaces detail, iostreams, boost.
-
-#include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/bzip2.hpp b/src/third_party/boost-1.68.0/boost/iostreams/filter/bzip2.hpp
deleted file mode 100644
index b9c04a7ce12..00000000000
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/bzip2.hpp
+++ /dev/null
@@ -1,418 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Note: custom allocators are not supported on VC6, since that compiler
-// had trouble finding the function zlib_base::do_init.
-
-#ifndef BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED
-#define BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <cassert>
-#include <memory> // allocator.
-#include <new> // bad_alloc.
-#include <boost/config.hpp> // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM.
-#include <boost/detail/workaround.hpp>
-#include <boost/iostreams/constants.hpp> // buffer size.
-#include <boost/iostreams/detail/config/auto_link.hpp>
-#include <boost/iostreams/detail/config/bzip2.hpp>
-#include <boost/iostreams/detail/config/dyn_link.hpp>
-#include <boost/iostreams/detail/config/wide_streams.hpp>
-#include <boost/iostreams/detail/ios.hpp> // failure, streamsize.
-#include <boost/iostreams/filter/symmetric.hpp>
-#include <boost/iostreams/pipeline.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-// Must come last.
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:4251 4231 4660)
-#endif
-#include <boost/config/abi_prefix.hpp>
-
-// Temporary fix.
-#undef small
-
-namespace boost { namespace iostreams {
-
-namespace bzip2 {
-
- // Typedefs.
-
-typedef void* (*alloc_func)(void*, int, int);
-typedef void (*free_func)(void*, void*);
-
- // Status codes
-
-BOOST_IOSTREAMS_DECL extern const int ok;
-BOOST_IOSTREAMS_DECL extern const int run_ok;
-BOOST_IOSTREAMS_DECL extern const int flush_ok;
-BOOST_IOSTREAMS_DECL extern const int finish_ok;
-BOOST_IOSTREAMS_DECL extern const int stream_end;
-BOOST_IOSTREAMS_DECL extern const int sequence_error;
-BOOST_IOSTREAMS_DECL extern const int param_error;
-BOOST_IOSTREAMS_DECL extern const int mem_error;
-BOOST_IOSTREAMS_DECL extern const int data_error;
-BOOST_IOSTREAMS_DECL extern const int data_error_magic;
-BOOST_IOSTREAMS_DECL extern const int io_error;
-BOOST_IOSTREAMS_DECL extern const int unexpected_eof;
-BOOST_IOSTREAMS_DECL extern const int outbuff_full;
-BOOST_IOSTREAMS_DECL extern const int config_error;
-
- // Action codes
-
-BOOST_IOSTREAMS_DECL extern const int finish;
-BOOST_IOSTREAMS_DECL extern const int run;
-
- // Default values
-
-const int default_block_size = 9;
-const int default_work_factor = 30;
-const bool default_small = false;
-
-} // End namespace bzip2.
-
-//
-// Class name: bzip2_params.
-// Description: Encapsulates the parameters passed to deflateInit2
-// to customize compression.
-//
-struct bzip2_params {
-
- // Non-explicit constructor for compression.
- bzip2_params( int block_size_ = bzip2::default_block_size,
- int work_factor_ = bzip2::default_work_factor )
- : block_size(block_size_), work_factor(work_factor_)
- { }
-
- // Constructor for decompression.
- bzip2_params(bool small)
- : small(small), work_factor(0)
- { }
-
- union {
- int block_size; // For compression.
- bool small; // For decompression.
- };
- int work_factor;
-};
-
-//
-// Class name: bzip2_error.
-// Description: Subclass of std::ios_base::failure thrown to indicate
-// bzip2 errors other than out-of-memory conditions.
-//
-class BOOST_IOSTREAMS_DECL bzip2_error : public BOOST_IOSTREAMS_FAILURE {
-public:
- explicit bzip2_error(int error);
- int error() const { return error_; }
- static void check BOOST_PREVENT_MACRO_SUBSTITUTION(int error);
-private:
- int error_;
-};
-
-namespace detail {
-
-template<typename Alloc>
-struct bzip2_allocator_traits {
-#ifndef BOOST_NO_STD_ALLOCATOR
-#if defined(BOOST_NO_CXX11_ALLOCATOR)
- typedef typename Alloc::template rebind<char>::other type;
-#else
- typedef typename std::allocator_traits<Alloc>::template rebind_alloc<char> type;
-#endif
-#else
- typedef std::allocator<char> type;
-#endif
-};
-
-template< typename Alloc,
- typename Base = // VC6 workaround (C2516)
- BOOST_DEDUCED_TYPENAME bzip2_allocator_traits<Alloc>::type >
-struct bzip2_allocator : private Base {
-private:
-#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
- typedef typename Base::size_type size_type;
-#else
- typedef typename std::allocator_traits<Base>::size_type size_type;
-#endif
-public:
- BOOST_STATIC_CONSTANT(bool, custom =
- (!is_same<std::allocator<char>, Base>::value));
- typedef typename bzip2_allocator_traits<Alloc>::type allocator_type;
- static void* allocate(void* self, int items, int size);
- static void deallocate(void* self, void* address);
-};
-
-class BOOST_IOSTREAMS_DECL bzip2_base {
-public:
- typedef char char_type;
-protected:
- bzip2_base(const bzip2_params& params);
- ~bzip2_base();
- bzip2_params& params() { return params_; }
- bool& ready() { return ready_; }
- template<typename Alloc>
- void init( bool compress,
- bzip2_allocator<Alloc>& alloc )
- {
- bool custom = bzip2_allocator<Alloc>::custom;
- do_init( compress,
- custom ? bzip2_allocator<Alloc>::allocate : 0,
- custom ? bzip2_allocator<Alloc>::deallocate : 0,
- custom ? &alloc : 0 );
- }
- void before( const char*& src_begin, const char* src_end,
- char*& dest_begin, char* dest_end );
- void after(const char*& src_begin, char*& dest_begin);
- int check_end(const char* src_begin, const char* dest_begin);
- int compress(int action);
- int decompress();
- void end(bool compress);
-private:
- void do_init( bool compress,
- bzip2::alloc_func,
- bzip2::free_func,
- void* derived );
- bzip2_params params_;
- void* stream_; // Actual type: bz_stream*.
- bool ready_;
-};
-
-//
-// Template name: bzip2_compressor_impl
-// Description: Model of SymmetricFilter implementing compression by
-// delegating to the libbzip2 function BZ_bzCompress.
-//
-template<typename Alloc = std::allocator<char> >
-class bzip2_compressor_impl
- : public bzip2_base,
- #if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
- public
- #endif
- bzip2_allocator<Alloc>
-{
-public:
- bzip2_compressor_impl(const bzip2_params&);
- bool filter( const char*& src_begin, const char* src_end,
- char*& dest_begin, char* dest_end, bool flush );
- void close();
-private:
- void init();
- bool eof_; // Guard to make sure filter() isn't called after it returns false.
-};
-
-//
-// Template name: bzip2_compressor
-// Description: Model of SymmetricFilter implementing decompression by
-// delegating to the libbzip2 function BZ_bzDecompress.
-//
-template<typename Alloc = std::allocator<char> >
-class bzip2_decompressor_impl
- : public bzip2_base,
- #if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
- public
- #endif
- bzip2_allocator<Alloc>
-{
-public:
- bzip2_decompressor_impl(bool small = bzip2::default_small);
- bool filter( const char*& begin_in, const char* end_in,
- char*& begin_out, char* end_out, bool flush );
- void close();
-private:
- void init();
- bool eof_; // Guard to make sure filter() isn't called after it returns false.
-};
-
-} // End namespace detail.
-
-//
-// Template name: bzip2_compressor
-// Description: Model of InputFilter and OutputFilter implementing
-// compression using libbzip2.
-//
-template<typename Alloc = std::allocator<char> >
-struct basic_bzip2_compressor
- : symmetric_filter<detail::bzip2_compressor_impl<Alloc>, Alloc>
-{
-private:
- typedef detail::bzip2_compressor_impl<Alloc> impl_type;
- typedef symmetric_filter<impl_type, Alloc> base_type;
-public:
- typedef typename base_type::char_type char_type;
- typedef typename base_type::category category;
- basic_bzip2_compressor( const bzip2_params& = bzip2::default_block_size,
- std::streamsize buffer_size = default_device_buffer_size );
-};
-BOOST_IOSTREAMS_PIPABLE(basic_bzip2_compressor, 1)
-
-typedef basic_bzip2_compressor<> bzip2_compressor;
-
-//
-// Template name: bzip2_decompressor
-// Description: Model of InputFilter and OutputFilter implementing
-// decompression using libbzip2.
-//
-template<typename Alloc = std::allocator<char> >
-struct basic_bzip2_decompressor
- : symmetric_filter<detail::bzip2_decompressor_impl<Alloc>, Alloc>
-{
-private:
- typedef detail::bzip2_decompressor_impl<Alloc> impl_type;
- typedef symmetric_filter<impl_type, Alloc> base_type;
-public:
- typedef typename base_type::char_type char_type;
- typedef typename base_type::category category;
- basic_bzip2_decompressor( bool small = bzip2::default_small,
- std::streamsize buffer_size = default_device_buffer_size );
-};
-BOOST_IOSTREAMS_PIPABLE(basic_bzip2_decompressor, 1)
-
-typedef basic_bzip2_decompressor<> bzip2_decompressor;
-
-//----------------------------------------------------------------------------//
-
-//------------------Implementation of bzip2_allocator-------------------------//
-
-namespace detail {
-
-template<typename Alloc, typename Base>
-void* bzip2_allocator<Alloc, Base>::allocate(void* self, int items, int size)
-{
- size_type len = items * size;
- char* ptr =
- static_cast<allocator_type*>(self)->allocate
- (len + sizeof(size_type)
- #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
- , (char*)0
- #endif
- );
- *reinterpret_cast<size_type*>(ptr) = len;
- return ptr + sizeof(size_type);
-}
-
-template<typename Alloc, typename Base>
-void bzip2_allocator<Alloc, Base>::deallocate(void* self, void* address)
-{
- char* ptr = reinterpret_cast<char*>(address) - sizeof(size_type);
- size_type len = *reinterpret_cast<size_type*>(ptr) + sizeof(size_type);
- static_cast<allocator_type*>(self)->deallocate(ptr, len);
-}
-
-//------------------Implementation of bzip2_compressor_impl-------------------//
-
-template<typename Alloc>
-bzip2_compressor_impl<Alloc>::bzip2_compressor_impl(const bzip2_params& p)
- : bzip2_base(p), eof_(false) { }
-
-template<typename Alloc>
-bool bzip2_compressor_impl<Alloc>::filter
- ( const char*& src_begin, const char* src_end,
- char*& dest_begin, char* dest_end, bool flush )
-{
- if (!ready()) init();
- if (eof_) return false;
- before(src_begin, src_end, dest_begin, dest_end);
- int result = compress(flush ? bzip2::finish : bzip2::run);
- after(src_begin, dest_begin);
- bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
- return !(eof_ = result == bzip2::stream_end);
-}
-
-template<typename Alloc>
-void bzip2_compressor_impl<Alloc>::close()
-{
- try {
- end(true);
- } catch (...) {
- eof_ = false;
- throw;
- }
- eof_ = false;
-}
-
-template<typename Alloc>
-inline void bzip2_compressor_impl<Alloc>::init()
-{ bzip2_base::init(true, static_cast<bzip2_allocator<Alloc>&>(*this)); }
-
-//------------------Implementation of bzip2_decompressor_impl-----------------//
-
-template<typename Alloc>
-bzip2_decompressor_impl<Alloc>::bzip2_decompressor_impl(bool small)
- : bzip2_base(bzip2_params(small)), eof_(false) { }
-
-template<typename Alloc>
-bool bzip2_decompressor_impl<Alloc>::filter
- ( const char*& src_begin, const char* src_end,
- char*& dest_begin, char* dest_end, bool flush )
-{
- if (eof_) {
- // reset the stream if there are more characters
- if(src_begin == src_end)
- return false;
- else
- close();
- }
- if (!ready())
- init();
- before(src_begin, src_end, dest_begin, dest_end);
- int result = decompress();
- if(result == bzip2::ok && flush)
- result = check_end(src_begin, dest_begin);
- after(src_begin, dest_begin);
- bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
- eof_ = result == bzip2::stream_end;
- return true;
-}
-
-template<typename Alloc>
-void bzip2_decompressor_impl<Alloc>::close()
-{
- try {
- end(false);
- } catch (...) {
- eof_ = false;
- throw;
- }
- eof_ = false;
-}
-
-template<typename Alloc>
-inline void bzip2_decompressor_impl<Alloc>::init()
-{ bzip2_base::init(false, static_cast<bzip2_allocator<Alloc>&>(*this)); }
-} // End namespace detail.
-
-//------------------Implementation of bzip2_decompressor----------------------//
-
-template<typename Alloc>
-basic_bzip2_compressor<Alloc>::basic_bzip2_compressor
- (const bzip2_params& p, std::streamsize buffer_size)
- : base_type(buffer_size, p)
- { }
-
-//------------------Implementation of bzip2_decompressor----------------------//
-
-template<typename Alloc>
-basic_bzip2_decompressor<Alloc>::basic_bzip2_decompressor
- (bool small, std::streamsize buffer_size)
- : base_type(buffer_size, small)
- { }
-
-//----------------------------------------------------------------------------//
-
-} } // End namespaces iostreams, boost.
-
-#include <boost/config/abi_suffix.hpp> // Pops abi_suffix.hpp pragmas.
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#endif // #ifndef BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iterator/advance.hpp b/src/third_party/boost-1.68.0/boost/iterator/advance.hpp
deleted file mode 100644
index 6f81cdb6b19..00000000000
--- a/src/third_party/boost-1.68.0/boost/iterator/advance.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (C) 2017 Michel Morin.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_ITERATOR_ADVANCE_HPP
-#define BOOST_ITERATOR_ADVANCE_HPP
-
-#include <boost/config.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-
-namespace boost {
-namespace iterators {
-
- namespace detail {
- template <typename InputIterator, typename Distance>
- inline BOOST_CXX14_CONSTEXPR void
- advance_impl(
- InputIterator& it
- , Distance n
- , incrementable_traversal_tag
- )
- {
- while (n > 0) {
- ++it;
- --n;
- }
- }
-
- template <typename BidirectionalIterator, typename Distance>
- inline BOOST_CXX14_CONSTEXPR void
- advance_impl(
- BidirectionalIterator& it
- , Distance n
- , bidirectional_traversal_tag
- )
- {
- if (n >= 0) {
- while (n > 0) {
- ++it;
- --n;
- }
- }
- else {
- while (n < 0) {
- --it;
- ++n;
- }
- }
- }
-
- template <typename RandomAccessIterator, typename Distance>
- inline BOOST_CXX14_CONSTEXPR void
- advance_impl(
- RandomAccessIterator& it
- , Distance n
- , random_access_traversal_tag
- )
- {
- it += n;
- }
- }
-
- namespace advance_adl_barrier {
- template <typename InputIterator, typename Distance>
- inline BOOST_CXX14_CONSTEXPR void
- advance(InputIterator& it, Distance n)
- {
- detail::advance_impl(
- it, n, typename iterator_traversal<InputIterator>::type()
- );
- }
- }
-
- using namespace advance_adl_barrier;
-
-} // namespace iterators
-
-using iterators::advance;
-
-} // namespace boost
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/iterator/distance.hpp b/src/third_party/boost-1.68.0/boost/iterator/distance.hpp
deleted file mode 100644
index 8cf3f15c446..00000000000
--- a/src/third_party/boost-1.68.0/boost/iterator/distance.hpp
+++ /dev/null
@@ -1,65 +0,0 @@
-// Copyright (C) 2017 Michel Morin.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_ITERATOR_DISTANCE_HPP
-#define BOOST_ITERATOR_DISTANCE_HPP
-
-#include <boost/config.hpp>
-#include <boost/iterator/iterator_categories.hpp>
-#include <boost/iterator/iterator_traits.hpp>
-
-namespace boost {
-namespace iterators {
-
- namespace detail {
- template <typename SinglePassIterator>
- inline BOOST_CXX14_CONSTEXPR typename iterator_difference<SinglePassIterator>::type
- distance_impl(
- SinglePassIterator first
- , SinglePassIterator last
- , single_pass_traversal_tag
- )
- {
- typename iterator_difference<SinglePassIterator>::type n = 0;
- while (first != last) {
- ++first;
- ++n;
- }
- return n;
- }
-
- template <typename RandomAccessIterator>
- inline BOOST_CXX14_CONSTEXPR typename iterator_difference<RandomAccessIterator>::type
- distance_impl(
- RandomAccessIterator first
- , RandomAccessIterator last
- , random_access_traversal_tag
- )
- {
- return last - first;
- }
- }
-
- namespace distance_adl_barrier {
- template <typename SinglePassIterator>
- inline BOOST_CXX14_CONSTEXPR typename iterator_difference<SinglePassIterator>::type
- distance(SinglePassIterator first, SinglePassIterator last)
- {
- return detail::distance_impl(
- first, last, typename iterator_traversal<SinglePassIterator>::type()
- );
- }
- }
-
- using namespace distance_adl_barrier;
-
-} // namespace iterators
-
-using iterators::distance;
-
-} // namespace boost
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast.hpp
deleted file mode 100644
index 3dc21f88a43..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_INCLUDED
-#define BOOST_LEXICAL_CAST_INCLUDED
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
-#define BOOST_LCAST_NO_WCHAR_T
-#endif
-
-#include <boost/range/iterator_range_core.hpp>
-#include <boost/lexical_cast/bad_lexical_cast.hpp>
-#include <boost/lexical_cast/try_lexical_convert.hpp>
-
-namespace boost
-{
- template <typename Target, typename Source>
- inline Target lexical_cast(const Source &arg)
- {
- Target result = Target();
-
- if (!boost::conversion::detail::try_lexical_convert(arg, result)) {
- boost::conversion::detail::throw_bad_cast<Source, Target>();
- }
-
- return result;
- }
-
- template <typename Target>
- inline Target lexical_cast(const char* chars, std::size_t count)
- {
- return ::boost::lexical_cast<Target>(
- ::boost::iterator_range<const char*>(chars, chars + count)
- );
- }
-
- template <typename Target>
- inline Target lexical_cast(const unsigned char* chars, std::size_t count)
- {
- return ::boost::lexical_cast<Target>(
- ::boost::iterator_range<const unsigned char*>(chars, chars + count)
- );
- }
-
- template <typename Target>
- inline Target lexical_cast(const signed char* chars, std::size_t count)
- {
- return ::boost::lexical_cast<Target>(
- ::boost::iterator_range<const signed char*>(chars, chars + count)
- );
- }
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
- template <typename Target>
- inline Target lexical_cast(const wchar_t* chars, std::size_t count)
- {
- return ::boost::lexical_cast<Target>(
- ::boost::iterator_range<const wchar_t*>(chars, chars + count)
- );
- }
-#endif
-#ifndef BOOST_NO_CXX11_CHAR16_T
- template <typename Target>
- inline Target lexical_cast(const char16_t* chars, std::size_t count)
- {
- return ::boost::lexical_cast<Target>(
- ::boost::iterator_range<const char16_t*>(chars, chars + count)
- );
- }
-#endif
-#ifndef BOOST_NO_CXX11_CHAR32_T
- template <typename Target>
- inline Target lexical_cast(const char32_t* chars, std::size_t count)
- {
- return ::boost::lexical_cast<Target>(
- ::boost::iterator_range<const char32_t*>(chars, chars + count)
- );
- }
-#endif
-
-} // namespace boost
-
-#undef BOOST_LCAST_NO_WCHAR_T
-
-#endif // BOOST_LEXICAL_CAST_INCLUDED
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/bad_lexical_cast.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/bad_lexical_cast.hpp
deleted file mode 100644
index 093121565e1..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/bad_lexical_cast.hpp
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP
-#define BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#include <typeinfo>
-#include <exception>
-#include <boost/throw_exception.hpp>
-
-namespace boost
-{
- // exception used to indicate runtime lexical_cast failure
- class BOOST_SYMBOL_VISIBLE bad_lexical_cast :
- // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0
-#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
- public std::exception
-#else
- public std::bad_cast
-#endif
-
-#if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 )
- // under bcc32 5.5.1 bad_cast doesn't derive from exception
- , public std::exception
-#endif
-
- {
- public:
- bad_lexical_cast() BOOST_NOEXCEPT
-#ifndef BOOST_NO_TYPEID
- : source(&typeid(void)), target(&typeid(void))
-#endif
- {}
-
- virtual const char *what() const BOOST_NOEXCEPT_OR_NOTHROW {
- return "bad lexical cast: "
- "source type value could not be interpreted as target";
- }
-
- virtual ~bad_lexical_cast() BOOST_NOEXCEPT_OR_NOTHROW
- {}
-
-#ifndef BOOST_NO_TYPEID
- bad_lexical_cast(
- const std::type_info &source_type_arg,
- const std::type_info &target_type_arg) BOOST_NOEXCEPT
- : source(&source_type_arg), target(&target_type_arg)
- {}
-
- const std::type_info &source_type() const BOOST_NOEXCEPT {
- return *source;
- }
-
- const std::type_info &target_type() const BOOST_NOEXCEPT {
- return *target;
- }
-
- private:
- const std::type_info *source;
- const std::type_info *target;
-#endif
- };
-
- namespace conversion { namespace detail {
-#ifdef BOOST_NO_TYPEID
- template <class S, class T>
- inline void throw_bad_cast() {
- boost::throw_exception(bad_lexical_cast());
- }
-#else
- template <class S, class T>
- inline void throw_bad_cast() {
- boost::throw_exception(bad_lexical_cast(typeid(S), typeid(T)));
- }
-#endif
- }} // namespace conversion::detail
-
-
-} // namespace boost
-
-#endif // BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_lexical.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_lexical.hpp
deleted file mode 100644
index fd866d84e51..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_lexical.hpp
+++ /dev/null
@@ -1,498 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP
-#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
-#define BOOST_LCAST_NO_WCHAR_T
-#endif
-
-#include <cstddef>
-#include <string>
-#include <boost/limits.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_float.hpp>
-#include <boost/type_traits/has_left_shift.hpp>
-#include <boost/type_traits/has_right_shift.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/detail/lcast_precision.hpp>
-
-#include <boost/lexical_cast/detail/widest_char.hpp>
-#include <boost/lexical_cast/detail/is_character.hpp>
-
-#ifndef BOOST_NO_CXX11_HDR_ARRAY
-#include <array>
-#endif
-
-#include <boost/array.hpp>
-#include <boost/range/iterator_range_core.hpp>
-#include <boost/container/container_fwd.hpp>
-
-#include <boost/lexical_cast/detail/converter_lexical_streams.hpp>
-
-namespace boost {
-
- namespace detail // normalize_single_byte_char<Char>
- {
- // Converts signed/unsigned char to char
- template < class Char >
- struct normalize_single_byte_char
- {
- typedef Char type;
- };
-
- template <>
- struct normalize_single_byte_char< signed char >
- {
- typedef char type;
- };
-
- template <>
- struct normalize_single_byte_char< unsigned char >
- {
- typedef char type;
- };
- }
-
- namespace detail // deduce_character_type_later<T>
- {
- // Helper type, meaning that stram character for T must be deduced
- // at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
- template < class T > struct deduce_character_type_later {};
- }
-
- namespace detail // stream_char_common<T>
- {
- // Selectors to choose stream character type (common for Source and Target)
- // Returns one of char, wchar_t, char16_t, char32_t or deduce_character_type_later<T> types
- // Executed on Stage 1 (See deduce_source_char<T> and deduce_target_char<T>)
- template < typename Type >
- struct stream_char_common: public boost::mpl::if_c<
- boost::detail::is_character< Type >::value,
- Type,
- boost::detail::deduce_character_type_later< Type >
- > {};
-
- template < typename Char >
- struct stream_char_common< Char* >: public boost::mpl::if_c<
- boost::detail::is_character< Char >::value,
- Char,
- boost::detail::deduce_character_type_later< Char* >
- > {};
-
- template < typename Char >
- struct stream_char_common< const Char* >: public boost::mpl::if_c<
- boost::detail::is_character< Char >::value,
- Char,
- boost::detail::deduce_character_type_later< const Char* >
- > {};
-
- template < typename Char >
- struct stream_char_common< boost::iterator_range< Char* > >: public boost::mpl::if_c<
- boost::detail::is_character< Char >::value,
- Char,
- boost::detail::deduce_character_type_later< boost::iterator_range< Char* > >
- > {};
-
- template < typename Char >
- struct stream_char_common< boost::iterator_range< const Char* > >: public boost::mpl::if_c<
- boost::detail::is_character< Char >::value,
- Char,
- boost::detail::deduce_character_type_later< boost::iterator_range< const Char* > >
- > {};
-
- template < class Char, class Traits, class Alloc >
- struct stream_char_common< std::basic_string< Char, Traits, Alloc > >
- {
- typedef Char type;
- };
-
- template < class Char, class Traits, class Alloc >
- struct stream_char_common< boost::container::basic_string< Char, Traits, Alloc > >
- {
- typedef Char type;
- };
-
- template < typename Char, std::size_t N >
- struct stream_char_common< boost::array< Char, N > >: public boost::mpl::if_c<
- boost::detail::is_character< Char >::value,
- Char,
- boost::detail::deduce_character_type_later< boost::array< Char, N > >
- > {};
-
- template < typename Char, std::size_t N >
- struct stream_char_common< boost::array< const Char, N > >: public boost::mpl::if_c<
- boost::detail::is_character< Char >::value,
- Char,
- boost::detail::deduce_character_type_later< boost::array< const Char, N > >
- > {};
-
-#ifndef BOOST_NO_CXX11_HDR_ARRAY
- template < typename Char, std::size_t N >
- struct stream_char_common< std::array<Char, N > >: public boost::mpl::if_c<
- boost::detail::is_character< Char >::value,
- Char,
- boost::detail::deduce_character_type_later< std::array< Char, N > >
- > {};
-
- template < typename Char, std::size_t N >
- struct stream_char_common< std::array< const Char, N > >: public boost::mpl::if_c<
- boost::detail::is_character< Char >::value,
- Char,
- boost::detail::deduce_character_type_later< std::array< const Char, N > >
- > {};
-#endif
-
-#ifdef BOOST_HAS_INT128
- template <> struct stream_char_common< boost::int128_type >: public boost::mpl::identity< char > {};
- template <> struct stream_char_common< boost::uint128_type >: public boost::mpl::identity< char > {};
-#endif
-
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T)
- template <>
- struct stream_char_common< wchar_t >
- {
- typedef char type;
- };
-#endif
- }
-
- namespace detail // deduce_source_char_impl<T>
- {
- // If type T is `deduce_character_type_later` type, then tries to deduce
- // character type using boost::has_left_shift<T> metafunction.
- // Otherwise supplied type T is a character type, that must be normalized
- // using normalize_single_byte_char<Char>.
- // Executed at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
- template < class Char >
- struct deduce_source_char_impl
- {
- typedef BOOST_DEDUCED_TYPENAME boost::detail::normalize_single_byte_char< Char >::type type;
- };
-
- template < class T >
- struct deduce_source_char_impl< deduce_character_type_later< T > >
- {
- typedef boost::has_left_shift< std::basic_ostream< char >, T > result_t;
-
-#if defined(BOOST_LCAST_NO_WCHAR_T)
- BOOST_STATIC_ASSERT_MSG((result_t::value),
- "Source type is not std::ostream`able and std::wostream`s are not supported by your STL implementation");
- typedef char type;
-#else
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- result_t::value, char, wchar_t
- >::type type;
-
- BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value),
- "Source type is neither std::ostream`able nor std::wostream`able");
-#endif
- };
- }
-
- namespace detail // deduce_target_char_impl<T>
- {
- // If type T is `deduce_character_type_later` type, then tries to deduce
- // character type using boost::has_right_shift<T> metafunction.
- // Otherwise supplied type T is a character type, that must be normalized
- // using normalize_single_byte_char<Char>.
- // Executed at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
- template < class Char >
- struct deduce_target_char_impl
- {
- typedef BOOST_DEDUCED_TYPENAME normalize_single_byte_char< Char >::type type;
- };
-
- template < class T >
- struct deduce_target_char_impl< deduce_character_type_later<T> >
- {
- typedef boost::has_right_shift<std::basic_istream<char>, T > result_t;
-
-#if defined(BOOST_LCAST_NO_WCHAR_T)
- BOOST_STATIC_ASSERT_MSG((result_t::value),
- "Target type is not std::istream`able and std::wistream`s are not supported by your STL implementation");
- typedef char type;
-#else
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- result_t::value, char, wchar_t
- >::type type;
-
- BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_right_shift<std::basic_istream<wchar_t>, T >::value),
- "Target type is neither std::istream`able nor std::wistream`able");
-#endif
- };
- }
-
- namespace detail // deduce_target_char<T> and deduce_source_char<T>
- {
- // We deduce stream character types in two stages.
- //
- // Stage 1 is common for Target and Source. At Stage 1 we get
- // non normalized character type (may contain unsigned/signed char)
- // or deduce_character_type_later<T> where T is the original type.
- // Stage 1 is executed by stream_char_common<T>
- //
- // At Stage 2 we normalize character types or try to deduce character
- // type using metafunctions.
- // Stage 2 is executed by deduce_target_char_impl<T> and
- // deduce_source_char_impl<T>
- //
- // deduce_target_char<T> and deduce_source_char<T> functions combine
- // both stages
-
- template < class T >
- struct deduce_target_char
- {
- typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type;
- typedef BOOST_DEDUCED_TYPENAME deduce_target_char_impl< stage1_type >::type stage2_type;
-
- typedef stage2_type type;
- };
-
- template < class T >
- struct deduce_source_char
- {
- typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type;
- typedef BOOST_DEDUCED_TYPENAME deduce_source_char_impl< stage1_type >::type stage2_type;
-
- typedef stage2_type type;
- };
- }
-
- namespace detail // extract_char_traits template
- {
- // We are attempting to get char_traits<> from T
- // template parameter. Otherwise we'll be using std::char_traits<Char>
- template < class Char, class T >
- struct extract_char_traits
- : boost::false_type
- {
- typedef std::char_traits< Char > trait_t;
- };
-
- template < class Char, class Traits, class Alloc >
- struct extract_char_traits< Char, std::basic_string< Char, Traits, Alloc > >
- : boost::true_type
- {
- typedef Traits trait_t;
- };
-
- template < class Char, class Traits, class Alloc>
- struct extract_char_traits< Char, boost::container::basic_string< Char, Traits, Alloc > >
- : boost::true_type
- {
- typedef Traits trait_t;
- };
- }
-
- namespace detail // array_to_pointer_decay<T>
- {
- template<class T>
- struct array_to_pointer_decay
- {
- typedef T type;
- };
-
- template<class T, std::size_t N>
- struct array_to_pointer_decay<T[N]>
- {
- typedef const T * type;
- };
- }
-
- namespace detail // lcast_src_length
- {
- // Return max. length of string representation of Source;
- template< class Source, // Source type of lexical_cast.
- class Enable = void // helper type
- >
- struct lcast_src_length
- {
- BOOST_STATIC_CONSTANT(std::size_t, value = 1);
- };
-
- // Helper for integral types.
- // Notes on length calculation:
- // Max length for 32bit int with grouping "\1" and thousands_sep ',':
- // "-2,1,4,7,4,8,3,6,4,7"
- // ^ - is_signed
- // ^ - 1 digit not counted by digits10
- // ^^^^^^^^^^^^^^^^^^ - digits10 * 2
- //
- // Constant is_specialized is used instead of constant 1
- // to prevent buffer overflow in a rare case when
- // <boost/limits.hpp> doesn't add missing specialization for
- // numeric_limits<T> for some integral type T.
- // When is_specialized is false, the whole expression is 0.
- template <class Source>
- struct lcast_src_length<
- Source, BOOST_DEDUCED_TYPENAME boost::enable_if<boost::is_integral<Source> >::type
- >
- {
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- BOOST_STATIC_CONSTANT(std::size_t, value =
- std::numeric_limits<Source>::is_signed +
- std::numeric_limits<Source>::is_specialized + /* == 1 */
- std::numeric_limits<Source>::digits10 * 2
- );
-#else
- BOOST_STATIC_CONSTANT(std::size_t, value = 156);
- BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256);
-#endif
- };
-
- // Helper for floating point types.
- // -1.23456789e-123456
- // ^ sign
- // ^ leading digit
- // ^ decimal point
- // ^^^^^^^^ lcast_precision<Source>::value
- // ^ "e"
- // ^ exponent sign
- // ^^^^^^ exponent (assumed 6 or less digits)
- // sign + leading digit + decimal point + "e" + exponent sign == 5
- template<class Source>
- struct lcast_src_length<
- Source, BOOST_DEDUCED_TYPENAME boost::enable_if<boost::is_float<Source> >::type
- >
- {
-
-#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
- BOOST_STATIC_ASSERT(
- std::numeric_limits<Source>::max_exponent10 <= 999999L &&
- std::numeric_limits<Source>::min_exponent10 >= -999999L
- );
-
- BOOST_STATIC_CONSTANT(std::size_t, value =
- 5 + lcast_precision<Source>::value + 6
- );
-#else // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
- BOOST_STATIC_CONSTANT(std::size_t, value = 156);
-#endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
- };
- }
-
- namespace detail // lexical_cast_stream_traits<Source, Target>
- {
- template <class Source, class Target>
- struct lexical_cast_stream_traits {
- typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay<Source>::type src;
- typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<src>::type no_cv_src;
-
- typedef boost::detail::deduce_source_char<no_cv_src> deduce_src_char_metafunc;
- typedef BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::type src_char_t;
- typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_target_char<Target>::type target_char_t;
-
- typedef BOOST_DEDUCED_TYPENAME boost::detail::widest_char<
- target_char_t, src_char_t
- >::type char_type;
-
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS)
- BOOST_STATIC_ASSERT_MSG(( !boost::is_same<char16_t, src_char_t>::value
- && !boost::is_same<char16_t, target_char_t>::value),
- "Your compiler does not have full support for char16_t" );
-#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS)
- BOOST_STATIC_ASSERT_MSG(( !boost::is_same<char32_t, src_char_t>::value
- && !boost::is_same<char32_t, target_char_t>::value),
- "Your compiler does not have full support for char32_t" );
-#endif
-
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- boost::detail::extract_char_traits<char_type, Target>::value,
- BOOST_DEDUCED_TYPENAME boost::detail::extract_char_traits<char_type, Target>,
- BOOST_DEDUCED_TYPENAME boost::detail::extract_char_traits<char_type, no_cv_src>
- >::type::trait_t traits;
-
- typedef boost::mpl::bool_
- <
- boost::is_same<char, src_char_t>::value && // source is not a wide character based type
- (sizeof(char) != sizeof(target_char_t)) && // target type is based on wide character
- (!(boost::detail::is_character<no_cv_src>::value))
- > is_string_widening_required_t;
-
- typedef boost::mpl::bool_
- <
- !(boost::is_integral<no_cv_src>::value ||
- boost::detail::is_character<
- BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::stage1_type // if we did not get character type at stage1
- >::value // then we have no optimization for that type
- )
- > is_source_input_not_optimized_t;
-
- // If we have an optimized conversion for
- // Source, we do not need to construct stringbuf.
- BOOST_STATIC_CONSTANT(bool, requires_stringbuf =
- (is_string_widening_required_t::value || is_source_input_not_optimized_t::value)
- );
-
- typedef boost::detail::lcast_src_length<no_cv_src> len_t;
- };
- }
-
- namespace detail
- {
- template<typename Target, typename Source>
- struct lexical_converter_impl
- {
- typedef lexical_cast_stream_traits<Source, Target> stream_trait;
-
- typedef detail::lexical_istream_limited_src<
- BOOST_DEDUCED_TYPENAME stream_trait::char_type,
- BOOST_DEDUCED_TYPENAME stream_trait::traits,
- stream_trait::requires_stringbuf,
- stream_trait::len_t::value + 1
- > i_interpreter_type;
-
- typedef detail::lexical_ostream_limited_src<
- BOOST_DEDUCED_TYPENAME stream_trait::char_type,
- BOOST_DEDUCED_TYPENAME stream_trait::traits
- > o_interpreter_type;
-
- static inline bool try_convert(const Source& arg, Target& result) {
- i_interpreter_type i_interpreter;
-
- // Disabling ADL, by directly specifying operators.
- if (!(i_interpreter.operator <<(arg)))
- return false;
-
- o_interpreter_type out(i_interpreter.cbegin(), i_interpreter.cend());
-
- // Disabling ADL, by directly specifying operators.
- if(!(out.operator >>(result)))
- return false;
-
- return true;
- }
- };
- }
-
-} // namespace boost
-
-#undef BOOST_LCAST_NO_WCHAR_T
-
-#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_lexical_streams.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_lexical_streams.hpp
deleted file mode 100644
index 3758a9cc219..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_lexical_streams.hpp
+++ /dev/null
@@ -1,786 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2016.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014, Nowember 2016
-
-#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP
-#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-
-#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
-#define BOOST_LCAST_NO_WCHAR_T
-#endif
-
-#include <cstddef>
-#include <string>
-#include <cstring>
-#include <cstdio>
-#include <boost/limits.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/detail/workaround.hpp>
-
-
-#ifndef BOOST_NO_STD_LOCALE
-# include <locale>
-#else
-# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
- // Getting error at this point means, that your STL library is old/lame/misconfigured.
- // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE,
- // but beware: lexical_cast will understand only 'C' locale delimeters and thousands
- // separators.
-# error "Unable to use <locale> header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force "
-# error "boost::lexical_cast to use only 'C' locale during conversions."
-# endif
-#endif
-
-#ifdef BOOST_NO_STRINGSTREAM
-#include <strstream>
-#else
-#include <sstream>
-#endif
-
-#include <boost/lexical_cast/detail/lcast_char_constants.hpp>
-#include <boost/lexical_cast/detail/lcast_unsigned_converters.hpp>
-#include <boost/lexical_cast/detail/inf_nan.hpp>
-
-#include <istream>
-
-#ifndef BOOST_NO_CXX11_HDR_ARRAY
-#include <array>
-#endif
-
-#include <boost/array.hpp>
-#include <boost/type_traits/make_unsigned.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_float.hpp>
-#include <boost/range/iterator_range_core.hpp>
-#include <boost/container/container_fwd.hpp>
-#include <boost/integer.hpp>
-#include <boost/detail/basic_pointerbuf.hpp>
-#include <boost/noncopyable.hpp>
-#ifndef BOOST_NO_CWCHAR
-# include <cwchar>
-#endif
-
-namespace boost {
-
- namespace detail // basic_unlockedbuf
- {
- // acts as a stream buffer which wraps around a pair of pointers
- // and gives acces to internals
- template <class BufferType, class CharT>
- class basic_unlockedbuf : public basic_pointerbuf<CharT, BufferType> {
- public:
- typedef basic_pointerbuf<CharT, BufferType> base_type;
- typedef BOOST_DEDUCED_TYPENAME base_type::streamsize streamsize;
-
-#ifndef BOOST_NO_USING_TEMPLATE
- using base_type::pptr;
- using base_type::pbase;
- using base_type::setbuf;
-#else
- charT* pptr() const { return base_type::pptr(); }
- charT* pbase() const { return base_type::pbase(); }
- BufferType* setbuf(char_type* s, streamsize n) { return base_type::setbuf(s, n); }
-#endif
- };
- }
-
- namespace detail
- {
- struct do_not_construct_out_buffer_t{};
- struct do_not_construct_out_stream_t{
- do_not_construct_out_stream_t(do_not_construct_out_buffer_t*){}
- };
-
- template <class CharT, class Traits>
- struct out_stream_helper_trait {
-#if defined(BOOST_NO_STRINGSTREAM)
- typedef std::ostream out_stream_t;
- typedef basic_unlockedbuf<std::strstreambuf, char> stringbuffer_t;
-#elif defined(BOOST_NO_STD_LOCALE)
- typedef std::ostream out_stream_t;
- typedef basic_unlockedbuf<std::stringbuf, char> stringbuffer_t;
- typedef basic_unlockedbuf<std::streambuf, char> buffer_t;
-#else
- typedef std::basic_ostream<CharT, Traits> out_stream_t;
- typedef basic_unlockedbuf<std::basic_stringbuf<CharT, Traits>, CharT> stringbuffer_t;
- typedef basic_unlockedbuf<std::basic_streambuf<CharT, Traits>, CharT> buffer_t;
-#endif
- };
- }
-
- namespace detail // optimized stream wrappers
- {
- template< class CharT // a result of widest_char transformation
- , class Traits
- , bool RequiresStringbuffer
- , std::size_t CharacterBufferSize
- >
- class lexical_istream_limited_src: boost::noncopyable {
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- RequiresStringbuffer,
- BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::out_stream_t,
- do_not_construct_out_stream_t
- >::type deduced_out_stream_t;
-
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- RequiresStringbuffer,
- BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::stringbuffer_t,
- do_not_construct_out_buffer_t
- >::type deduced_out_buffer_t;
-
- deduced_out_buffer_t out_buffer;
- deduced_out_stream_t out_stream;
- CharT buffer[CharacterBufferSize];
-
- // After the `operator <<` finishes, `[start, finish)` is
- // the range to output by `operator >>`
- const CharT* start;
- const CharT* finish;
-
- public:
- lexical_istream_limited_src() BOOST_NOEXCEPT
- : out_buffer()
- , out_stream(&out_buffer)
- , start(buffer)
- , finish(buffer + CharacterBufferSize)
- {}
-
- const CharT* cbegin() const BOOST_NOEXCEPT {
- return start;
- }
-
- const CharT* cend() const BOOST_NOEXCEPT {
- return finish;
- }
-
- private:
-/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/
- bool shl_char(CharT ch) BOOST_NOEXCEPT {
- Traits::assign(buffer[0], ch);
- finish = start + 1;
- return true;
- }
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
- template <class T>
- bool shl_char(T ch) {
- BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) ,
- "boost::lexical_cast does not support narrowing of char types."
- "Use boost::locale instead" );
-#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
- std::locale loc;
- CharT const w = BOOST_USE_FACET(std::ctype<CharT>, loc).widen(ch);
-#else
- CharT const w = static_cast<CharT>(ch);
-#endif
- Traits::assign(buffer[0], w);
- finish = start + 1;
- return true;
- }
-#endif
-
- bool shl_char_array(CharT const* str_value) BOOST_NOEXCEPT {
- start = str_value;
- finish = start + Traits::length(str_value);
- return true;
- }
-
- template <class T>
- bool shl_char_array(T const* str_value) {
- BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)),
- "boost::lexical_cast does not support narrowing of char types."
- "Use boost::locale instead" );
- return shl_input_streamable(str_value);
- }
-
- bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT {
- start = str;
- finish = std::find(start, start + max_size, Traits::to_char_type(0));
- return true;
- }
-
- template<typename InputStreamable>
- bool shl_input_streamable(InputStreamable& input) {
-#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
- // If you have compilation error at this point, than your STL library
- // does not support such conversions. Try updating it.
- BOOST_STATIC_ASSERT((boost::is_same<char, CharT>::value));
-#endif
-
-#ifndef BOOST_NO_EXCEPTIONS
- out_stream.exceptions(std::ios::badbit);
- try {
-#endif
- bool const result = !(out_stream << input).fail();
- const deduced_out_buffer_t* const p = static_cast<deduced_out_buffer_t*>(
- out_stream.rdbuf()
- );
- start = p->pbase();
- finish = p->pptr();
- return result;
-#ifndef BOOST_NO_EXCEPTIONS
- } catch (const ::std::ios_base::failure& /*f*/) {
- return false;
- }
-#endif
- }
-
- template <class T>
- inline bool shl_unsigned(const T n) {
- CharT* tmp_finish = buffer + CharacterBufferSize;
- start = lcast_put_unsigned<Traits, T, CharT>(n, tmp_finish).convert();
- finish = tmp_finish;
- return true;
- }
-
- template <class T>
- inline bool shl_signed(const T n) {
- CharT* tmp_finish = buffer + CharacterBufferSize;
- typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned<T>::type utype;
- CharT* tmp_start = lcast_put_unsigned<Traits, utype, CharT>(lcast_to_unsigned(n), tmp_finish).convert();
- if (n < 0) {
- --tmp_start;
- CharT const minus = lcast_char_constants<CharT>::minus;
- Traits::assign(*tmp_start, minus);
- }
- start = tmp_start;
- finish = tmp_finish;
- return true;
- }
-
- template <class T, class SomeCharT>
- bool shl_real_type(const T& val, SomeCharT* /*begin*/) {
- lcast_set_precision(out_stream, &val);
- return shl_input_streamable(val);
- }
-
- bool shl_real_type(float val, char* begin) {
- using namespace std;
- const double val_as_double = val;
- finish = start +
-#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
- sprintf_s(begin, CharacterBufferSize,
-#else
- sprintf(begin,
-#endif
- "%.*g", static_cast<int>(boost::detail::lcast_get_precision<float>()), val_as_double);
- return finish > start;
- }
-
- bool shl_real_type(double val, char* begin) {
- using namespace std;
- finish = start +
-#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
- sprintf_s(begin, CharacterBufferSize,
-#else
- sprintf(begin,
-#endif
- "%.*g", static_cast<int>(boost::detail::lcast_get_precision<double>()), val);
- return finish > start;
- }
-
-#ifndef __MINGW32__
- bool shl_real_type(long double val, char* begin) {
- using namespace std;
- finish = start +
-#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
- sprintf_s(begin, CharacterBufferSize,
-#else
- sprintf(begin,
-#endif
- "%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double>()), val );
- return finish > start;
- }
-#endif
-
-
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
- bool shl_real_type(float val, wchar_t* begin) {
- using namespace std;
- const double val_as_double = val;
- finish = start + swprintf(begin, CharacterBufferSize,
- L"%.*g",
- static_cast<int>(boost::detail::lcast_get_precision<float >()),
- val_as_double );
- return finish > start;
- }
-
- bool shl_real_type(double val, wchar_t* begin) {
- using namespace std;
- finish = start + swprintf(begin, CharacterBufferSize,
- L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
- return finish > start;
- }
-
- bool shl_real_type(long double val, wchar_t* begin) {
- using namespace std;
- finish = start + swprintf(begin, CharacterBufferSize,
- L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
- return finish > start;
- }
-#endif
- template <class T>
- bool shl_real(T val) {
- CharT* tmp_finish = buffer + CharacterBufferSize;
- if (put_inf_nan(buffer, tmp_finish, val)) {
- finish = tmp_finish;
- return true;
- }
-
- return shl_real_type(val, static_cast<CharT*>(buffer));
- }
-
-/************************************ OPERATORS << ( ... ) ********************************/
- public:
- template<class Alloc>
- bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT {
- start = str.data();
- finish = start + str.length();
- return true;
- }
-
- template<class Alloc>
- bool operator<<(boost::container::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT {
- start = str.data();
- finish = start + str.length();
- return true;
- }
-
- bool operator<<(bool value) BOOST_NOEXCEPT {
- CharT const czero = lcast_char_constants<CharT>::zero;
- Traits::assign(buffer[0], Traits::to_char_type(czero + value));
- finish = start + 1;
- return true;
- }
-
- template <class C>
- BOOST_DEDUCED_TYPENAME boost::disable_if<boost::is_const<C>, bool>::type
- operator<<(const iterator_range<C*>& rng) BOOST_NOEXCEPT {
- return (*this) << iterator_range<const C*>(rng.begin(), rng.end());
- }
-
- bool operator<<(const iterator_range<const CharT*>& rng) BOOST_NOEXCEPT {
- start = rng.begin();
- finish = rng.end();
- return true;
- }
-
- bool operator<<(const iterator_range<const signed char*>& rng) BOOST_NOEXCEPT {
- return (*this) << iterator_range<const char*>(
- reinterpret_cast<const char*>(rng.begin()),
- reinterpret_cast<const char*>(rng.end())
- );
- }
-
- bool operator<<(const iterator_range<const unsigned char*>& rng) BOOST_NOEXCEPT {
- return (*this) << iterator_range<const char*>(
- reinterpret_cast<const char*>(rng.begin()),
- reinterpret_cast<const char*>(rng.end())
- );
- }
-
- bool operator<<(char ch) { return shl_char(ch); }
- bool operator<<(unsigned char ch) { return ((*this) << static_cast<char>(ch)); }
- bool operator<<(signed char ch) { return ((*this) << static_cast<char>(ch)); }
-#if !defined(BOOST_LCAST_NO_WCHAR_T)
- bool operator<<(wchar_t const* str) { return shl_char_array(str); }
- bool operator<<(wchar_t * str) { return shl_char_array(str); }
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
- bool operator<<(wchar_t ch) { return shl_char(ch); }
-#endif
-#endif
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
- bool operator<<(char16_t ch) { return shl_char(ch); }
- bool operator<<(char16_t * str) { return shl_char_array(str); }
- bool operator<<(char16_t const * str) { return shl_char_array(str); }
-#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
- bool operator<<(char32_t ch) { return shl_char(ch); }
- bool operator<<(char32_t * str) { return shl_char_array(str); }
- bool operator<<(char32_t const * str) { return shl_char_array(str); }
-#endif
- bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast<char const*>(ch)); }
- bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); }
- bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast<char const*>(ch)); }
- bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); }
- bool operator<<(char const* str_value) { return shl_char_array(str_value); }
- bool operator<<(char* str_value) { return shl_char_array(str_value); }
- bool operator<<(short n) { return shl_signed(n); }
- bool operator<<(int n) { return shl_signed(n); }
- bool operator<<(long n) { return shl_signed(n); }
- bool operator<<(unsigned short n) { return shl_unsigned(n); }
- bool operator<<(unsigned int n) { return shl_unsigned(n); }
- bool operator<<(unsigned long n) { return shl_unsigned(n); }
-
-#if defined(BOOST_HAS_LONG_LONG)
- bool operator<<(boost::ulong_long_type n) { return shl_unsigned(n); }
- bool operator<<(boost::long_long_type n) { return shl_signed(n); }
-#elif defined(BOOST_HAS_MS_INT64)
- bool operator<<(unsigned __int64 n) { return shl_unsigned(n); }
- bool operator<<( __int64 n) { return shl_signed(n); }
-#endif
-
-#ifdef BOOST_HAS_INT128
- bool operator<<(const boost::uint128_type& n) { return shl_unsigned(n); }
- bool operator<<(const boost::int128_type& n) { return shl_signed(n); }
-#endif
- bool operator<<(float val) { return shl_real(val); }
- bool operator<<(double val) { return shl_real(val); }
- bool operator<<(long double val) {
-#ifndef __MINGW32__
- return shl_real(val);
-#else
- return shl_real(static_cast<double>(val));
-#endif
- }
-
- // Adding constness to characters. Constness does not change layout
- template <class C, std::size_t N>
- BOOST_DEDUCED_TYPENAME boost::disable_if<boost::is_const<C>, bool>::type
- operator<<(boost::array<C, N> const& input) BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG(
- (sizeof(boost::array<const C, N>) == sizeof(boost::array<C, N>)),
- "boost::array<C, N> and boost::array<const C, N> must have exactly the same layout."
- );
- return ((*this) << reinterpret_cast<boost::array<const C, N> const& >(input));
- }
-
- template <std::size_t N>
- bool operator<<(boost::array<const CharT, N> const& input) BOOST_NOEXCEPT {
- return shl_char_array_limited(input.data(), N);
- }
-
- template <std::size_t N>
- bool operator<<(boost::array<const unsigned char, N> const& input) BOOST_NOEXCEPT {
- return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input));
- }
-
- template <std::size_t N>
- bool operator<<(boost::array<const signed char, N> const& input) BOOST_NOEXCEPT {
- return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input));
- }
-
-#ifndef BOOST_NO_CXX11_HDR_ARRAY
- // Making a Boost.Array from std::array
- template <class C, std::size_t N>
- bool operator<<(std::array<C, N> const& input) BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG(
- (sizeof(std::array<C, N>) == sizeof(boost::array<C, N>)),
- "std::array and boost::array must have exactly the same layout. "
- "Bug in implementation of std::array or boost::array."
- );
- return ((*this) << reinterpret_cast<boost::array<C, N> const& >(input));
- }
-#endif
- template <class InStreamable>
- bool operator<<(const InStreamable& input) { return shl_input_streamable(input); }
- };
-
-
- template <class CharT, class Traits>
- class lexical_ostream_limited_src: boost::noncopyable {
- //`[start, finish)` is the range to output by `operator >>`
- const CharT* start;
- const CharT* const finish;
-
- public:
- lexical_ostream_limited_src(const CharT* begin, const CharT* end) BOOST_NOEXCEPT
- : start(begin)
- , finish(end)
- {}
-
-/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/
- private:
- template <typename Type>
- bool shr_unsigned(Type& output) {
- if (start == finish) return false;
- CharT const minus = lcast_char_constants<CharT>::minus;
- CharT const plus = lcast_char_constants<CharT>::plus;
- bool const has_minus = Traits::eq(minus, *start);
-
- /* We won`t use `start' any more, so no need in decrementing it after */
- if (has_minus || Traits::eq(plus, *start)) {
- ++start;
- }
-
- bool const succeed = lcast_ret_unsigned<Traits, Type, CharT>(output, start, finish).convert();
-
- if (has_minus) {
- output = static_cast<Type>(0u - output);
- }
-
- return succeed;
- }
-
- template <typename Type>
- bool shr_signed(Type& output) {
- if (start == finish) return false;
- CharT const minus = lcast_char_constants<CharT>::minus;
- CharT const plus = lcast_char_constants<CharT>::plus;
- typedef BOOST_DEDUCED_TYPENAME make_unsigned<Type>::type utype;
- utype out_tmp = 0;
- bool const has_minus = Traits::eq(minus, *start);
-
- /* We won`t use `start' any more, so no need in decrementing it after */
- if (has_minus || Traits::eq(plus, *start)) {
- ++start;
- }
-
- bool succeed = lcast_ret_unsigned<Traits, utype, CharT>(out_tmp, start, finish).convert();
- if (has_minus) {
- utype const comp_val = (static_cast<utype>(1) << std::numeric_limits<Type>::digits);
- succeed = succeed && out_tmp<=comp_val;
- output = static_cast<Type>(0u - out_tmp);
- } else {
- utype const comp_val = static_cast<utype>((std::numeric_limits<Type>::max)());
- succeed = succeed && out_tmp<=comp_val;
- output = static_cast<Type>(out_tmp);
- }
- return succeed;
- }
-
- template<typename InputStreamable>
- bool shr_using_base_class(InputStreamable& output)
- {
- BOOST_STATIC_ASSERT_MSG(
- (!boost::is_pointer<InputStreamable>::value),
- "boost::lexical_cast can not convert to pointers"
- );
-
-#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
- BOOST_STATIC_ASSERT_MSG((boost::is_same<char, CharT>::value),
- "boost::lexical_cast can not convert, because your STL library does not "
- "support such conversions. Try updating it."
- );
-#endif
-
-#if defined(BOOST_NO_STRINGSTREAM)
- std::istrstream stream(start, static_cast<std::istrstream::streamsize>(finish - start));
-#else
- typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::buffer_t buffer_t;
- buffer_t buf;
- // Usually `istream` and `basic_istream` do not modify
- // content of buffer; `buffer_t` assures that this is true
- buf.setbuf(const_cast<CharT*>(start), static_cast<typename buffer_t::streamsize>(finish - start));
-#if defined(BOOST_NO_STD_LOCALE)
- std::istream stream(&buf);
-#else
- std::basic_istream<CharT, Traits> stream(&buf);
-#endif // BOOST_NO_STD_LOCALE
-#endif // BOOST_NO_STRINGSTREAM
-
-#ifndef BOOST_NO_EXCEPTIONS
- stream.exceptions(std::ios::badbit);
- try {
-#endif
- stream.unsetf(std::ios::skipws);
- lcast_set_precision(stream, static_cast<InputStreamable*>(0));
-
- return (stream >> output)
- && (stream.get() == Traits::eof());
-
-#ifndef BOOST_NO_EXCEPTIONS
- } catch (const ::std::ios_base::failure& /*f*/) {
- return false;
- }
-#endif
- }
-
- template<class T>
- inline bool shr_xchar(T& output) BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ),
- "boost::lexical_cast does not support narrowing of character types."
- "Use boost::locale instead" );
- bool const ok = (finish - start == 1);
- if (ok) {
- CharT out;
- Traits::assign(out, *start);
- output = static_cast<T>(out);
- }
- return ok;
- }
-
- template <std::size_t N, class ArrayT>
- bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT {
- using namespace std;
- const std::size_t size = static_cast<std::size_t>(finish - start);
- if (size > N - 1) { // `-1` because we need to store \0 at the end
- return false;
- }
-
- memcpy(&output[0], start, size * sizeof(CharT));
- output[size] = Traits::to_char_type(0);
- return true;
- }
-
-/************************************ OPERATORS >> ( ... ) ********************************/
- public:
- bool operator>>(unsigned short& output) { return shr_unsigned(output); }
- bool operator>>(unsigned int& output) { return shr_unsigned(output); }
- bool operator>>(unsigned long int& output) { return shr_unsigned(output); }
- bool operator>>(short& output) { return shr_signed(output); }
- bool operator>>(int& output) { return shr_signed(output); }
- bool operator>>(long int& output) { return shr_signed(output); }
-#if defined(BOOST_HAS_LONG_LONG)
- bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); }
- bool operator>>(boost::long_long_type& output) { return shr_signed(output); }
-#elif defined(BOOST_HAS_MS_INT64)
- bool operator>>(unsigned __int64& output) { return shr_unsigned(output); }
- bool operator>>(__int64& output) { return shr_signed(output); }
-#endif
-
-#ifdef BOOST_HAS_INT128
- bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); }
- bool operator>>(boost::int128_type& output) { return shr_signed(output); }
-#endif
-
- bool operator>>(char& output) { return shr_xchar(output); }
- bool operator>>(unsigned char& output) { return shr_xchar(output); }
- bool operator>>(signed char& output) { return shr_xchar(output); }
-#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
- bool operator>>(wchar_t& output) { return shr_xchar(output); }
-#endif
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
- bool operator>>(char16_t& output) { return shr_xchar(output); }
-#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
- bool operator>>(char32_t& output) { return shr_xchar(output); }
-#endif
- template<class Alloc>
- bool operator>>(std::basic_string<CharT,Traits,Alloc>& str) {
- str.assign(start, finish); return true;
- }
-
- template<class Alloc>
- bool operator>>(boost::container::basic_string<CharT,Traits,Alloc>& str) {
- str.assign(start, finish); return true;
- }
-
- template <std::size_t N>
- bool operator>>(boost::array<CharT, N>& output) BOOST_NOEXCEPT {
- return shr_std_array<N>(output);
- }
-
- template <std::size_t N>
- bool operator>>(boost::array<unsigned char, N>& output) BOOST_NOEXCEPT {
- return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output));
- }
-
- template <std::size_t N>
- bool operator>>(boost::array<signed char, N>& output) BOOST_NOEXCEPT {
- return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output));
- }
-
-#ifndef BOOST_NO_CXX11_HDR_ARRAY
- template <class C, std::size_t N>
- bool operator>>(std::array<C, N>& output) BOOST_NOEXCEPT {
- BOOST_STATIC_ASSERT_MSG(
- (sizeof(std::array<C, N>) == sizeof(boost::array<C, N>)),
- "std::array<C, N> and boost::array<C, N> must have exactly the same layout."
- );
- return ((*this) >> reinterpret_cast<boost::array<C, N>& >(output));
- }
-#endif
-
- bool operator>>(bool& output) BOOST_NOEXCEPT {
- output = false; // Suppress warning about uninitalized variable
-
- if (start == finish) return false;
- CharT const zero = lcast_char_constants<CharT>::zero;
- CharT const plus = lcast_char_constants<CharT>::plus;
- CharT const minus = lcast_char_constants<CharT>::minus;
-
- const CharT* const dec_finish = finish - 1;
- output = Traits::eq(*dec_finish, zero + 1);
- if (!output && !Traits::eq(*dec_finish, zero)) {
- return false; // Does not ends on '0' or '1'
- }
-
- if (start == dec_finish) return true;
-
- // We may have sign at the beginning
- if (Traits::eq(plus, *start) || (Traits::eq(minus, *start) && !output)) {
- ++ start;
- }
-
- // Skipping zeros
- while (start != dec_finish) {
- if (!Traits::eq(zero, *start)) {
- return false; // Not a zero => error
- }
-
- ++ start;
- }
-
- return true;
- }
-
- private:
- // Not optimised converter
- template <class T>
- bool float_types_converter_internal(T& output) {
- if (parse_inf_nan(start, finish, output)) return true;
- bool const return_value = shr_using_base_class(output);
-
- /* Some compilers and libraries successfully
- * parse 'inf', 'INFINITY', '1.0E', '1.0E-'...
- * We are trying to provide a unified behaviour,
- * so we just forbid such conversions (as some
- * of the most popular compilers/libraries do)
- * */
- CharT const minus = lcast_char_constants<CharT>::minus;
- CharT const plus = lcast_char_constants<CharT>::plus;
- CharT const capital_e = lcast_char_constants<CharT>::capital_e;
- CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
- if ( return_value &&
- (
- Traits::eq(*(finish-1), lowercase_e) // 1.0e
- || Traits::eq(*(finish-1), capital_e) // 1.0E
- || Traits::eq(*(finish-1), minus) // 1.0e- or 1.0E-
- || Traits::eq(*(finish-1), plus) // 1.0e+ or 1.0E+
- )
- ) return false;
-
- return return_value;
- }
-
- public:
- bool operator>>(float& output) { return float_types_converter_internal(output); }
- bool operator>>(double& output) { return float_types_converter_internal(output); }
- bool operator>>(long double& output) { return float_types_converter_internal(output); }
-
- // Generic istream-based algorithm.
- // lcast_streambuf_for_target<InputStreamable>::value is true.
- template <typename InputStreamable>
- bool operator>>(InputStreamable& output) {
- return shr_using_base_class(output);
- }
- };
- }
-} // namespace boost
-
-#undef BOOST_LCAST_NO_WCHAR_T
-
-#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_numeric.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_numeric.hpp
deleted file mode 100644
index f50e2ca0fb3..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/converter_numeric.hpp
+++ /dev/null
@@ -1,172 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2016.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2016
-
-#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP
-#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#include <boost/limits.hpp>
-#include <boost/mpl/eval_if.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/make_unsigned.hpp>
-#include <boost/type_traits/is_signed.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/type_traits/is_float.hpp>
-
-#include <boost/numeric/conversion/cast.hpp>
-
-namespace boost { namespace detail {
-
-template <class Source >
-struct detect_precision_loss
-{
- typedef Source source_type;
- typedef boost::numeric::Trunc<Source> Rounder;
- typedef BOOST_DEDUCED_TYPENAME mpl::if_<
- boost::is_arithmetic<Source>, Source, Source const&
- >::type argument_type ;
-
- static inline source_type nearbyint(argument_type s, bool& is_ok) BOOST_NOEXCEPT {
- const source_type near_int = Rounder::nearbyint(s);
- if (near_int && is_ok) {
- const source_type orig_div_round = s / near_int;
- const source_type eps = std::numeric_limits<source_type>::epsilon();
-
- is_ok = !((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps);
- }
-
- return s;
- }
-
- typedef typename Rounder::round_style round_style;
-};
-
-template <typename Base, class Source>
-struct fake_precision_loss: public Base
-{
- typedef Source source_type ;
- typedef BOOST_DEDUCED_TYPENAME mpl::if_<
- boost::is_arithmetic<Source>, Source, Source const&
- >::type argument_type ;
-
- static inline source_type nearbyint(argument_type s, bool& /*is_ok*/) BOOST_NOEXCEPT {
- return s;
- }
-};
-
-struct nothrow_overflow_handler
-{
- inline bool operator() ( boost::numeric::range_check_result r ) const BOOST_NOEXCEPT {
- return (r == boost::numeric::cInRange);
- }
-};
-
-template <typename Target, typename Source>
-inline bool noexcept_numeric_convert(const Source& arg, Target& result) BOOST_NOEXCEPT {
- typedef boost::numeric::converter<
- Target,
- Source,
- boost::numeric::conversion_traits<Target, Source >,
- nothrow_overflow_handler,
- detect_precision_loss<Source >
- > converter_orig_t;
-
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- boost::is_base_of< detect_precision_loss<Source >, converter_orig_t >::value,
- converter_orig_t,
- fake_precision_loss<converter_orig_t, Source>
- >::type converter_t;
-
- bool res = nothrow_overflow_handler()(converter_t::out_of_range(arg));
- result = converter_t::low_level_convert(converter_t::nearbyint(arg, res));
- return res;
-}
-
-template <typename Target, typename Source>
-struct lexical_cast_dynamic_num_not_ignoring_minus
-{
- static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT {
- return noexcept_numeric_convert<Target, Source >(arg, result);
- }
-};
-
-template <typename Target, typename Source>
-struct lexical_cast_dynamic_num_ignoring_minus
-{
- static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT {
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::eval_if_c<
- boost::is_float<Source>::value,
- boost::mpl::identity<Source>,
- boost::make_unsigned<Source>
- >::type usource_t;
-
- if (arg < 0) {
- const bool res = noexcept_numeric_convert<Target, usource_t>(0u - arg, result);
- result = static_cast<Target>(0u - result);
- return res;
- } else {
- return noexcept_numeric_convert<Target, usource_t>(arg, result);
- }
- }
-};
-
-/*
- * lexical_cast_dynamic_num follows the rules:
- * 1) If Source can be converted to Target without precision loss and
- * without overflows, then assign Source to Target and return
- *
- * 2) If Source is less than 0 and Target is an unsigned integer,
- * then negate Source, check the requirements of rule 1) and if
- * successful, assign static_casted Source to Target and return
- *
- * 3) Otherwise throw a bad_lexical_cast exception
- *
- *
- * Rule 2) required because boost::lexical_cast has the behavior of
- * stringstream, which uses the rules of scanf for conversions. And
- * in the C99 standard for unsigned input value minus sign is
- * optional, so if a negative number is read, no errors will arise
- * and the result will be the two's complement.
- */
-template <typename Target, typename Source>
-struct dynamic_num_converter_impl
-{
- static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT {
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- boost::is_unsigned<Target>::value &&
- (boost::is_signed<Source>::value || boost::is_float<Source>::value) &&
- !(boost::is_same<Source, bool>::value) &&
- !(boost::is_same<Target, bool>::value),
- lexical_cast_dynamic_num_ignoring_minus<Target, Source>,
- lexical_cast_dynamic_num_not_ignoring_minus<Target, Source>
- >::type caster_type;
-
- return caster_type::try_convert(arg, result);
- }
-};
-
-}} // namespace boost::detail
-
-#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/inf_nan.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/detail/inf_nan.hpp
deleted file mode 100644
index c10457ecd2a..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/inf_nan.hpp
+++ /dev/null
@@ -1,197 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP
-#define BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
-#define BOOST_LCAST_NO_WCHAR_T
-#endif
-
-#include <cstddef>
-#include <cstring>
-#include <boost/limits.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/math/special_functions/sign.hpp>
-#include <boost/math/special_functions/fpclassify.hpp>
-
-#include <boost/lexical_cast/detail/lcast_char_constants.hpp>
-
-namespace boost {
- namespace detail
- {
- template <class CharT>
- bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT {
- for( unsigned int i=0; i < len; ++i ) {
- if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false;
- }
-
- return true;
- }
-
- /* Returns true and sets the correct value if found NaN or Inf. */
- template <class CharT, class T>
- inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value
- , const CharT* lc_NAN, const CharT* lc_nan
- , const CharT* lc_INFINITY, const CharT* lc_infinity
- , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT
- {
- using namespace std;
- if (begin == end) return false;
- const CharT minus = lcast_char_constants<CharT>::minus;
- const CharT plus = lcast_char_constants<CharT>::plus;
- const int inifinity_size = 8; // == sizeof("infinity") - 1
-
- /* Parsing +/- */
- bool const has_minus = (*begin == minus);
- if (has_minus || *begin == plus) {
- ++ begin;
- }
-
- if (end - begin < 3) return false;
- if (lc_iequal(begin, lc_nan, lc_NAN, 3)) {
- begin += 3;
- if (end != begin) {
- /* It is 'nan(...)' or some bad input*/
-
- if (end - begin < 2) return false; // bad input
- -- end;
- if (*begin != opening_brace || *end != closing_brace) return false; // bad input
- }
-
- if( !has_minus ) value = std::numeric_limits<T>::quiet_NaN();
- else value = (boost::math::changesign) (std::numeric_limits<T>::quiet_NaN());
- return true;
- } else if (
- ( /* 'INF' or 'inf' */
- end - begin == 3 // 3 == sizeof('inf') - 1
- && lc_iequal(begin, lc_infinity, lc_INFINITY, 3)
- )
- ||
- ( /* 'INFINITY' or 'infinity' */
- end - begin == inifinity_size
- && lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size)
- )
- )
- {
- if( !has_minus ) value = std::numeric_limits<T>::infinity();
- else value = (boost::math::changesign) (std::numeric_limits<T>::infinity());
- return true;
- }
-
- return false;
- }
-
- template <class CharT, class T>
- bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value
- , const CharT* lc_nan
- , const CharT* lc_infinity) BOOST_NOEXCEPT
- {
- using namespace std;
- const CharT minus = lcast_char_constants<CharT>::minus;
- if ((boost::math::isnan)(value)) {
- if ((boost::math::signbit)(value)) {
- *begin = minus;
- ++ begin;
- }
-
- memcpy(begin, lc_nan, 3 * sizeof(CharT));
- end = begin + 3;
- return true;
- } else if ((boost::math::isinf)(value)) {
- if ((boost::math::signbit)(value)) {
- *begin = minus;
- ++ begin;
- }
-
- memcpy(begin, lc_infinity, 3 * sizeof(CharT));
- end = begin + 3;
- return true;
- }
-
- return false;
- }
-
-
-#ifndef BOOST_LCAST_NO_WCHAR_T
- template <class T>
- bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT {
- return parse_inf_nan_impl(begin, end, value
- , L"NAN", L"nan"
- , L"INFINITY", L"infinity"
- , L'(', L')');
- }
-
- template <class T>
- bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT {
- return put_inf_nan_impl(begin, end, value, L"nan", L"infinity");
- }
-
-#endif
-#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
- template <class T>
- bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT {
- return parse_inf_nan_impl(begin, end, value
- , u"NAN", u"nan"
- , u"INFINITY", u"infinity"
- , u'(', u')');
- }
-
- template <class T>
- bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT {
- return put_inf_nan_impl(begin, end, value, u"nan", u"infinity");
- }
-#endif
-#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
- template <class T>
- bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT {
- return parse_inf_nan_impl(begin, end, value
- , U"NAN", U"nan"
- , U"INFINITY", U"infinity"
- , U'(', U')');
- }
-
- template <class T>
- bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT {
- return put_inf_nan_impl(begin, end, value, U"nan", U"infinity");
- }
-#endif
-
- template <class CharT, class T>
- bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT {
- return parse_inf_nan_impl(begin, end, value
- , "NAN", "nan"
- , "INFINITY", "infinity"
- , '(', ')');
- }
-
- template <class CharT, class T>
- bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT {
- return put_inf_nan_impl(begin, end, value, "nan", "infinity");
- }
- }
-} // namespace boost
-
-#undef BOOST_LCAST_NO_WCHAR_T
-
-#endif // BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/is_character.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/detail/is_character.hpp
deleted file mode 100644
index 732c39f8e80..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/is_character.hpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
-#define BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#include <boost/mpl/bool.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-namespace boost {
-
- namespace detail // is_character<...>
- {
- // returns true, if T is one of the character types
- template < typename T >
- struct is_character
- {
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::bool_<
- boost::is_same< T, char >::value ||
- #if !defined(BOOST_NO_STRINGSTREAM) && !defined(BOOST_NO_STD_WSTRING)
- boost::is_same< T, wchar_t >::value ||
- #endif
- #ifndef BOOST_NO_CXX11_CHAR16_T
- boost::is_same< T, char16_t >::value ||
- #endif
- #ifndef BOOST_NO_CXX11_CHAR32_T
- boost::is_same< T, char32_t >::value ||
- #endif
- boost::is_same< T, unsigned char >::value ||
- boost::is_same< T, signed char >::value
- > type;
-
- BOOST_STATIC_CONSTANT(bool, value = (type::value) );
- };
- }
-}
-
-#endif // BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/lcast_char_constants.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/detail/lcast_char_constants.hpp
deleted file mode 100644
index fd651ee3e99..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/lcast_char_constants.hpp
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP
-#define BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-namespace boost
-{
- namespace detail // '0', '-', '+', 'e', 'E' and '.' constants
- {
- template < typename Char >
- struct lcast_char_constants {
- // We check in tests assumption that static casted character is
- // equal to correctly written C++ literal: U'0' == static_cast<char32_t>('0')
- BOOST_STATIC_CONSTANT(Char, zero = static_cast<Char>('0'));
- BOOST_STATIC_CONSTANT(Char, minus = static_cast<Char>('-'));
- BOOST_STATIC_CONSTANT(Char, plus = static_cast<Char>('+'));
- BOOST_STATIC_CONSTANT(Char, lowercase_e = static_cast<Char>('e'));
- BOOST_STATIC_CONSTANT(Char, capital_e = static_cast<Char>('E'));
- BOOST_STATIC_CONSTANT(Char, c_decimal_separator = static_cast<Char>('.'));
- };
- }
-} // namespace boost
-
-
-#endif // BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp
deleted file mode 100644
index 268961ee72f..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp
+++ /dev/null
@@ -1,294 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP
-#define BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#include <climits>
-#include <cstddef>
-#include <string>
-#include <cstring>
-#include <cstdio>
-#include <boost/limits.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/detail/workaround.hpp>
-
-
-#ifndef BOOST_NO_STD_LOCALE
-# include <locale>
-#else
-# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
- // Getting error at this point means, that your STL library is old/lame/misconfigured.
- // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE,
- // but beware: lexical_cast will understand only 'C' locale delimeters and thousands
- // separators.
-# error "Unable to use <locale> header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force "
-# error "boost::lexical_cast to use only 'C' locale during conversions."
-# endif
-#endif
-
-#include <boost/lexical_cast/detail/lcast_char_constants.hpp>
-#include <boost/type_traits/make_unsigned.hpp>
-#include <boost/type_traits/is_signed.hpp>
-#include <boost/noncopyable.hpp>
-
-namespace boost
-{
- namespace detail // lcast_to_unsigned
- {
- template<class T>
- inline
- BOOST_DEDUCED_TYPENAME boost::make_unsigned<T>::type lcast_to_unsigned(const T value) BOOST_NOEXCEPT {
- typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned<T>::type result_type;
- return value < 0
- ? static_cast<result_type>(0u - static_cast<result_type>(value))
- : static_cast<result_type>(value);
- }
- }
-
- namespace detail // lcast_put_unsigned
- {
- template <class Traits, class T, class CharT>
- class lcast_put_unsigned: boost::noncopyable {
- typedef BOOST_DEDUCED_TYPENAME Traits::int_type int_type;
- BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- (sizeof(int_type) > sizeof(T))
- , int_type
- , T
- >::type m_value;
- CharT* m_finish;
- CharT const m_czero;
- int_type const m_zero;
-
- public:
- lcast_put_unsigned(const T n_param, CharT* finish) BOOST_NOEXCEPT
- : m_value(n_param), m_finish(finish)
- , m_czero(lcast_char_constants<CharT>::zero), m_zero(Traits::to_int_type(m_czero))
- {
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
-#endif
- }
-
- CharT* convert() {
-#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
- std::locale loc;
- if (loc == std::locale::classic()) {
- return main_convert_loop();
- }
-
- typedef std::numpunct<CharT> numpunct;
- numpunct const& np = BOOST_USE_FACET(numpunct, loc);
- std::string const grouping = np.grouping();
- std::string::size_type const grouping_size = grouping.size();
-
- if (!grouping_size || grouping[0] <= 0) {
- return main_convert_loop();
- }
-
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- // Check that ulimited group is unreachable:
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);
-#endif
- CharT const thousands_sep = np.thousands_sep();
- std::string::size_type group = 0; // current group number
- char last_grp_size = grouping[0];
- char left = last_grp_size;
-
- do {
- if (left == 0) {
- ++group;
- if (group < grouping_size) {
- char const grp_size = grouping[group];
- last_grp_size = (grp_size <= 0 ? static_cast<char>(CHAR_MAX) : grp_size);
- }
-
- left = last_grp_size;
- --m_finish;
- Traits::assign(*m_finish, thousands_sep);
- }
-
- --left;
- } while (main_convert_iteration());
-
- return m_finish;
-#else
- return main_convert_loop();
-#endif
- }
-
- private:
- inline bool main_convert_iteration() BOOST_NOEXCEPT {
- --m_finish;
- int_type const digit = static_cast<int_type>(m_value % 10U);
- Traits::assign(*m_finish, Traits::to_char_type(m_zero + digit));
- m_value /= 10;
- return !!m_value; // suppressing warnings
- }
-
- inline CharT* main_convert_loop() BOOST_NOEXCEPT {
- while (main_convert_iteration());
- return m_finish;
- }
- };
- }
-
- namespace detail // lcast_ret_unsigned
- {
- template <class Traits, class T, class CharT>
- class lcast_ret_unsigned: boost::noncopyable {
- bool m_multiplier_overflowed;
- T m_multiplier;
- T& m_value;
- const CharT* const m_begin;
- const CharT* m_end;
-
- public:
- lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) BOOST_NOEXCEPT
- : m_multiplier_overflowed(false), m_multiplier(1), m_value(value), m_begin(begin), m_end(end)
- {
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
-
- // GCC when used with flag -std=c++0x may not have std::numeric_limits
- // specializations for __int128 and unsigned __int128 types.
- // Try compilation with -std=gnu++0x or -std=gnu++11.
- //
- // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856
- BOOST_STATIC_ASSERT_MSG(std::numeric_limits<T>::is_specialized,
- "std::numeric_limits are not specialized for integral type passed to boost::lexical_cast"
- );
-#endif
- }
-
- inline bool convert() {
- CharT const czero = lcast_char_constants<CharT>::zero;
- --m_end;
- m_value = static_cast<T>(0);
-
- if (m_begin > m_end || *m_end < czero || *m_end >= czero + 10)
- return false;
- m_value = static_cast<T>(*m_end - czero);
- --m_end;
-
-#ifdef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
- return main_convert_loop();
-#else
- std::locale loc;
- if (loc == std::locale::classic()) {
- return main_convert_loop();
- }
-
- typedef std::numpunct<CharT> numpunct;
- numpunct const& np = BOOST_USE_FACET(numpunct, loc);
- std::string const& grouping = np.grouping();
- std::string::size_type const grouping_size = grouping.size();
-
- /* According to Programming languages - C++
- * we MUST check for correct grouping
- */
- if (!grouping_size || grouping[0] <= 0) {
- return main_convert_loop();
- }
-
- unsigned char current_grouping = 0;
- CharT const thousands_sep = np.thousands_sep();
- char remained = static_cast<char>(grouping[current_grouping] - 1);
-
- for (;m_end >= m_begin; --m_end)
- {
- if (remained) {
- if (!main_convert_iteration()) {
- return false;
- }
- --remained;
- } else {
- if ( !Traits::eq(*m_end, thousands_sep) ) //|| begin == end ) return false;
- {
- /*
- * According to Programming languages - C++
- * Digit grouping is checked. That is, the positions of discarded
- * separators is examined for consistency with
- * use_facet<numpunct<charT> >(loc ).grouping()
- *
- * BUT what if there is no separators at all and grouping()
- * is not empty? Well, we have no extraced separators, so we
- * won`t check them for consistency. This will allow us to
- * work with "C" locale from other locales
- */
- return main_convert_loop();
- } else {
- if (m_begin == m_end) return false;
- if (current_grouping < grouping_size - 1) ++current_grouping;
- remained = grouping[current_grouping];
- }
- }
- } /*for*/
-
- return true;
-#endif
- }
-
- private:
- // Iteration that does not care about grouping/separators and assumes that all
- // input characters are digits
- inline bool main_convert_iteration() BOOST_NOEXCEPT {
- CharT const czero = lcast_char_constants<CharT>::zero;
- T const maxv = (std::numeric_limits<T>::max)();
-
- m_multiplier_overflowed = m_multiplier_overflowed || (maxv/10 < m_multiplier);
- m_multiplier = static_cast<T>(m_multiplier * 10);
-
- T const dig_value = static_cast<T>(*m_end - czero);
- T const new_sub_value = static_cast<T>(m_multiplier * dig_value);
-
- // We must correctly handle situations like `000000000000000000000000000001`.
- // So we take care of overflow only if `dig_value` is not '0'.
- if (*m_end < czero || *m_end >= czero + 10 // checking for correct digit
- || (dig_value && ( // checking for overflow of ...
- m_multiplier_overflowed // ... multiplier
- || static_cast<T>(maxv / dig_value) < m_multiplier // ... subvalue
- || static_cast<T>(maxv - new_sub_value) < m_value // ... whole expression
- ))
- ) return false;
-
- m_value = static_cast<T>(m_value + new_sub_value);
-
- return true;
- }
-
- bool main_convert_loop() BOOST_NOEXCEPT {
- for ( ; m_end >= m_begin; --m_end) {
- if (!main_convert_iteration()) {
- return false;
- }
- }
-
- return true;
- }
- };
- }
-} // namespace boost
-
-#endif // BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/widest_char.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/detail/widest_char.hpp
deleted file mode 100644
index 013aaf119de..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/detail/widest_char.hpp
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2014.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP
-#define BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-namespace boost { namespace detail {
-
- template <typename TargetChar, typename SourceChar>
- struct widest_char {
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- (sizeof(TargetChar) > sizeof(SourceChar))
- , TargetChar
- , SourceChar
- >::type type;
- };
-
-}} // namespace boost::detail
-
-#endif // BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/lexical_cast/try_lexical_convert.hpp b/src/third_party/boost-1.68.0/boost/lexical_cast/try_lexical_convert.hpp
deleted file mode 100644
index b079fd42aec..00000000000
--- a/src/third_party/boost-1.68.0/boost/lexical_cast/try_lexical_convert.hpp
+++ /dev/null
@@ -1,227 +0,0 @@
-// Copyright Kevlin Henney, 2000-2005.
-// Copyright Alexander Nasonov, 2006-2010.
-// Copyright Antony Polukhin, 2011-2016.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// what: lexical_cast custom keyword cast
-// who: contributed by Kevlin Henney,
-// enhanced with contributions from Terje Slettebo,
-// with additional fixes and suggestions from Gennaro Prota,
-// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
-// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
-// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
-// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
-
-#ifndef BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP
-#define BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP
-
-#include <boost/config.hpp>
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-#if defined(__clang__) || (defined(__GNUC__) && \
- !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && \
- (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wuninitialized"
-#endif
-
-#include <string>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_arithmetic.hpp>
-
-#include <boost/lexical_cast/detail/is_character.hpp>
-#include <boost/lexical_cast/detail/converter_numeric.hpp>
-#include <boost/lexical_cast/detail/converter_lexical.hpp>
-
-#include <boost/range/iterator_range_core.hpp>
-#include <boost/container/container_fwd.hpp>
-
-namespace boost {
- namespace detail
- {
- template<typename T>
- struct is_stdstring
- : boost::false_type
- {};
-
- template<typename CharT, typename Traits, typename Alloc>
- struct is_stdstring< std::basic_string<CharT, Traits, Alloc> >
- : boost::true_type
- {};
-
- // Sun Studio has problem with partial specialization of templates differing only in namespace.
- // We workaround that by making `is_booststring` trait, instead of specializing `is_stdstring` for `boost::container::basic_string`.
- template<typename T>
- struct is_booststring
- : boost::false_type
- {};
-
- template<typename CharT, typename Traits, typename Alloc>
- struct is_booststring< boost::container::basic_string<CharT, Traits, Alloc> >
- : boost::true_type
- {};
-
- template<typename Target, typename Source>
- struct is_arithmetic_and_not_xchars
- {
- typedef boost::mpl::bool_<
- !(boost::detail::is_character<Target>::value) &&
- !(boost::detail::is_character<Source>::value) &&
- boost::is_arithmetic<Source>::value &&
- boost::is_arithmetic<Target>::value
- > type;
-
- BOOST_STATIC_CONSTANT(bool, value = (
- type::value
- ));
- };
-
- /*
- * is_xchar_to_xchar<Target, Source>::value is true,
- * Target and Souce are char types of the same size 1 (char, signed char, unsigned char).
- */
- template<typename Target, typename Source>
- struct is_xchar_to_xchar
- {
- typedef boost::mpl::bool_<
- sizeof(Source) == sizeof(Target) &&
- sizeof(Source) == sizeof(char) &&
- boost::detail::is_character<Target>::value &&
- boost::detail::is_character<Source>::value
- > type;
-
- BOOST_STATIC_CONSTANT(bool, value = (
- type::value
- ));
- };
-
- template<typename Target, typename Source>
- struct is_char_array_to_stdstring
- : boost::false_type
- {};
-
- template<typename CharT, typename Traits, typename Alloc>
- struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, CharT* >
- : boost::true_type
- {};
-
- template<typename CharT, typename Traits, typename Alloc>
- struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, const CharT* >
- : boost::true_type
- {};
-
- // Sun Studio has problem with partial specialization of templates differing only in namespace.
- // We workaround that by making `is_char_array_to_booststring` trait, instead of specializing `is_char_array_to_stdstring` for `boost::container::basic_string`.
- template<typename Target, typename Source>
- struct is_char_array_to_booststring
- : boost::false_type
- {};
-
- template<typename CharT, typename Traits, typename Alloc>
- struct is_char_array_to_booststring< boost::container::basic_string<CharT, Traits, Alloc>, CharT* >
- : boost::true_type
- {};
-
- template<typename CharT, typename Traits, typename Alloc>
- struct is_char_array_to_booststring< boost::container::basic_string<CharT, Traits, Alloc>, const CharT* >
- : boost::true_type
- {};
-
- template <typename Target, typename Source>
- struct copy_converter_impl
- {
-// MSVC fail to forward an array (DevDiv#555157 "SILENT BAD CODEGEN triggered by perfect forwarding",
-// fixed in 2013 RTM).
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined(BOOST_MSVC) || BOOST_MSVC >= 1800)
- template <class T>
- static inline bool try_convert(T&& arg, Target& result) {
- result = static_cast<T&&>(arg); // eqaul to `result = std::forward<T>(arg);`
- return true;
- }
-#else
- static inline bool try_convert(const Source& arg, Target& result) {
- result = arg;
- return true;
- }
-#endif
- };
- }
-
- namespace conversion { namespace detail {
-
- template <typename Target, typename Source>
- inline bool try_lexical_convert(const Source& arg, Target& result)
- {
- typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay<Source>::type src;
-
- typedef boost::mpl::bool_<
- boost::detail::is_xchar_to_xchar<Target, src >::value ||
- boost::detail::is_char_array_to_stdstring<Target, src >::value ||
- boost::detail::is_char_array_to_booststring<Target, src >::value ||
- (
- boost::is_same<Target, src >::value &&
- (boost::detail::is_stdstring<Target >::value || boost::detail::is_booststring<Target >::value)
- ) ||
- (
- boost::is_same<Target, src >::value &&
- boost::detail::is_character<Target >::value
- )
- > shall_we_copy_t;
-
- typedef boost::detail::is_arithmetic_and_not_xchars<Target, src >
- shall_we_copy_with_dynamic_check_t;
-
- // We do evaluate second `if_` lazily to avoid unnecessary instantiations
- // of `shall_we_copy_with_dynamic_check_t` and improve compilation times.
- typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
- shall_we_copy_t::value,
- boost::mpl::identity<boost::detail::copy_converter_impl<Target, src > >,
- boost::mpl::if_<
- shall_we_copy_with_dynamic_check_t,
- boost::detail::dynamic_num_converter_impl<Target, src >,
- boost::detail::lexical_converter_impl<Target, src >
- >
- >::type caster_type_lazy;
-
- typedef BOOST_DEDUCED_TYPENAME caster_type_lazy::type caster_type;
-
- return caster_type::try_convert(arg, result);
- }
-
- template <typename Target, typename CharacterT>
- inline bool try_lexical_convert(const CharacterT* chars, std::size_t count, Target& result)
- {
- BOOST_STATIC_ASSERT_MSG(
- boost::detail::is_character<CharacterT>::value,
- "This overload of try_lexical_convert is meant to be used only with arrays of characters."
- );
- return ::boost::conversion::detail::try_lexical_convert(
- ::boost::iterator_range<const CharacterT*>(chars, chars + count), result
- );
- }
-
- }} // namespace conversion::detail
-
- namespace conversion {
- // ADL barrier
- using ::boost::conversion::detail::try_lexical_convert;
- }
-
-} // namespace boost
-
-#if defined(__clang__) || (defined(__GNUC__) && \
- !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && \
- (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
-#pragma GCC diagnostic pop
-#endif
-
-#endif // BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/logic/tribool.hpp b/src/third_party/boost-1.68.0/boost/logic/tribool.hpp
deleted file mode 100644
index c4788c1cbf9..00000000000
--- a/src/third_party/boost-1.68.0/boost/logic/tribool.hpp
+++ /dev/null
@@ -1,456 +0,0 @@
-// Three-state boolean logic library
-
-// Copyright Douglas Gregor 2002-2004. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-
-// For more information, see http://www.boost.org
-#ifndef BOOST_LOGIC_TRIBOOL_HPP
-#define BOOST_LOGIC_TRIBOOL_HPP
-
-#include <boost/logic/tribool_fwd.hpp>
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-namespace boost { namespace logic {
-
-/// INTERNAL ONLY
-namespace detail {
-/**
- * INTERNAL ONLY
- *
- * \brief A type used only to uniquely identify the 'indeterminate'
- * function/keyword.
- */
-struct indeterminate_t
-{
-#if BOOST_WORKAROUND(__BORLANDC__, < 0x0600)
- char dummy_; // BCB would use 8 bytes by default
-#endif
-};
-
-} // end namespace detail
-
-/**
- * INTERNAL ONLY
- * The type of the 'indeterminate' keyword. This has the same type as the
- * function 'indeterminate' so that we can recognize when the keyword is
- * used.
- */
-typedef bool (*indeterminate_keyword_t)(tribool, detail::indeterminate_t);
-
-/**
- * \brief Keyword and test function for the indeterminate tribool value
- *
- * The \c indeterminate function has a dual role. It's first role is
- * as a unary function that tells whether the tribool value is in the
- * "indeterminate" state. It's second role is as a keyword
- * representing the indeterminate (just like "true" and "false"
- * represent the true and false states). If you do not like the name
- * "indeterminate", and would prefer to use a different name, see the
- * macro \c BOOST_TRIBOOL_THIRD_STATE.
- *
- * \returns <tt>x.value == tribool::indeterminate_value</tt>
- * \throws nothrow
- */
-BOOST_CONSTEXPR inline bool
-indeterminate(tribool x,
- detail::indeterminate_t dummy = detail::indeterminate_t()) BOOST_NOEXCEPT;
-
-/**
- * \brief A 3-state boolean type.
- *
- * 3-state boolean values are either true, false, or
- * indeterminate.
- */
-class tribool
-{
-private:
- /// INTERNAL ONLY
- struct dummy {
- void nonnull() {};
- };
-
- typedef void (dummy::*safe_bool)();
-
-public:
- /**
- * Construct a new 3-state boolean value with the value 'false'.
- *
- * \throws nothrow
- */
- BOOST_CONSTEXPR tribool() BOOST_NOEXCEPT : value(false_value) {}
-
- /**
- * Construct a new 3-state boolean value with the given boolean
- * value, which may be \c true or \c false.
- *
- * \throws nothrow
- */
- BOOST_CONSTEXPR tribool(bool initial_value) BOOST_NOEXCEPT : value(initial_value? true_value : false_value) {}
-
- /**
- * Construct a new 3-state boolean value with an indeterminate value.
- *
- * \throws nothrow
- */
- BOOST_CONSTEXPR tribool(indeterminate_keyword_t) BOOST_NOEXCEPT : value(indeterminate_value) {}
-
- /**
- * Use a 3-state boolean in a boolean context. Will evaluate true in a
- * boolean context only when the 3-state boolean is definitely true.
- *
- * \returns true if the 3-state boolean is true, false otherwise
- * \throws nothrow
- */
- BOOST_CONSTEXPR operator safe_bool() const BOOST_NOEXCEPT
- {
- return value == true_value? &dummy::nonnull : 0;
- }
-
- /**
- * The actual stored value in this 3-state boolean, which may be false, true,
- * or indeterminate.
- */
- enum value_t { false_value, true_value, indeterminate_value } value;
-};
-
-// Check if the given tribool has an indeterminate value. Also doubles as a
-// keyword for the 'indeterminate' value
-BOOST_CONSTEXPR inline bool indeterminate(tribool x, detail::indeterminate_t) BOOST_NOEXCEPT
-{
- return x.value == tribool::indeterminate_value;
-}
-
-/** @defgroup logical Logical operations
- */
-//@{
-/**
- * \brief Computes the logical negation of a tribool
- *
- * \returns the logical negation of the tribool, according to the
- * table:
- * <table border=1>
- * <tr>
- * <th><center><code>!</code></center></th>
- * <th/>
- * </tr>
- * <tr>
- * <th><center>false</center></th>
- * <td><center>true</center></td>
- * </tr>
- * <tr>
- * <th><center>true</center></th>
- * <td><center>false</center></td>
- * </tr>
- * <tr>
- * <th><center>indeterminate</center></th>
- * <td><center>indeterminate</center></td>
- * </tr>
- * </table>
- * \throws nothrow
- */
-BOOST_CONSTEXPR inline tribool operator!(tribool x) BOOST_NOEXCEPT
-{
- return x.value == tribool::false_value? tribool(true)
- :x.value == tribool::true_value? tribool(false)
- :tribool(indeterminate);
-}
-
-/**
- * \brief Computes the logical conjuction of two tribools
- *
- * \returns the result of logically ANDing the two tribool values,
- * according to the following table:
- * <table border=1>
- * <tr>
- * <th><center><code>&amp;&amp;</code></center></th>
- * <th><center>false</center></th>
- * <th><center>true</center></th>
- * <th><center>indeterminate</center></th>
- * </tr>
- * <tr>
- * <th><center>false</center></th>
- * <td><center>false</center></td>
- * <td><center>false</center></td>
- * <td><center>false</center></td>
- * </tr>
- * <tr>
- * <th><center>true</center></th>
- * <td><center>false</center></td>
- * <td><center>true</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * <tr>
- * <th><center>indeterminate</center></th>
- * <td><center>false</center></td>
- * <td><center>indeterminate</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * </table>
- * \throws nothrow
- */
-BOOST_CONSTEXPR inline tribool operator&&(tribool x, tribool y) BOOST_NOEXCEPT
-{
- return (static_cast<bool>(!x) || static_cast<bool>(!y))
- ? tribool(false)
- : ((static_cast<bool>(x) && static_cast<bool>(y)) ? tribool(true) : indeterminate)
- ;
-}
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator&&(tribool x, bool y) BOOST_NOEXCEPT
-{ return y? x : tribool(false); }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator&&(bool x, tribool y) BOOST_NOEXCEPT
-{ return x? y : tribool(false); }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator&&(indeterminate_keyword_t, tribool x) BOOST_NOEXCEPT
-{ return !x? tribool(false) : tribool(indeterminate); }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator&&(tribool x, indeterminate_keyword_t) BOOST_NOEXCEPT
-{ return !x? tribool(false) : tribool(indeterminate); }
-
-/**
- * \brief Computes the logical disjunction of two tribools
- *
- * \returns the result of logically ORing the two tribool values,
- * according to the following table:
- * <table border=1>
- * <tr>
- * <th><center><code>||</code></center></th>
- * <th><center>false</center></th>
- * <th><center>true</center></th>
- * <th><center>indeterminate</center></th>
- * </tr>
- * <tr>
- * <th><center>false</center></th>
- * <td><center>false</center></td>
- * <td><center>true</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * <tr>
- * <th><center>true</center></th>
- * <td><center>true</center></td>
- * <td><center>true</center></td>
- * <td><center>true</center></td>
- * </tr>
- * <tr>
- * <th><center>indeterminate</center></th>
- * <td><center>indeterminate</center></td>
- * <td><center>true</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * </table>
- * \throws nothrow
- */
-BOOST_CONSTEXPR inline tribool operator||(tribool x, tribool y) BOOST_NOEXCEPT
-{
- return (static_cast<bool>(!x) && static_cast<bool>(!y))
- ? tribool(false)
- : ((static_cast<bool>(x) || static_cast<bool>(y)) ? tribool(true) : tribool(indeterminate))
- ;
-}
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator||(tribool x, bool y) BOOST_NOEXCEPT
-{ return y? tribool(true) : x; }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator||(bool x, tribool y) BOOST_NOEXCEPT
-{ return x? tribool(true) : y; }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator||(indeterminate_keyword_t, tribool x) BOOST_NOEXCEPT
-{ return x? tribool(true) : tribool(indeterminate); }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator||(tribool x, indeterminate_keyword_t) BOOST_NOEXCEPT
-{ return x? tribool(true) : tribool(indeterminate); }
-//@}
-
-/**
- * \brief Compare tribools for equality
- *
- * \returns the result of comparing two tribool values, according to
- * the following table:
- * <table border=1>
- * <tr>
- * <th><center><code>==</code></center></th>
- * <th><center>false</center></th>
- * <th><center>true</center></th>
- * <th><center>indeterminate</center></th>
- * </tr>
- * <tr>
- * <th><center>false</center></th>
- * <td><center>true</center></td>
- * <td><center>false</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * <tr>
- * <th><center>true</center></th>
- * <td><center>false</center></td>
- * <td><center>true</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * <tr>
- * <th><center>indeterminate</center></th>
- * <td><center>indeterminate</center></td>
- * <td><center>indeterminate</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * </table>
- * \throws nothrow
- */
-BOOST_CONSTEXPR inline tribool operator==(tribool x, tribool y) BOOST_NOEXCEPT
-{
- return (indeterminate(x) || indeterminate(y))
- ? indeterminate
- : ((x && y) || (!x && !y))
- ;
-}
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator==(tribool x, bool y) BOOST_NOEXCEPT { return x == tribool(y); }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator==(bool x, tribool y) BOOST_NOEXCEPT { return tribool(x) == y; }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator==(indeterminate_keyword_t, tribool x) BOOST_NOEXCEPT
-{ return tribool(indeterminate) == x; }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator==(tribool x, indeterminate_keyword_t) BOOST_NOEXCEPT
-{ return tribool(indeterminate) == x; }
-
-/**
- * \brief Compare tribools for inequality
- *
- * \returns the result of comparing two tribool values for inequality,
- * according to the following table:
- * <table border=1>
- * <tr>
- * <th><center><code>!=</code></center></th>
- * <th><center>false</center></th>
- * <th><center>true</center></th>
- * <th><center>indeterminate</center></th>
- * </tr>
- * <tr>
- * <th><center>false</center></th>
- * <td><center>false</center></td>
- * <td><center>true</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * <tr>
- * <th><center>true</center></th>
- * <td><center>true</center></td>
- * <td><center>false</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * <tr>
- * <th><center>indeterminate</center></th>
- * <td><center>indeterminate</center></td>
- * <td><center>indeterminate</center></td>
- * <td><center>indeterminate</center></td>
- * </tr>
- * </table>
- * \throws nothrow
- */
-BOOST_CONSTEXPR inline tribool operator!=(tribool x, tribool y) BOOST_NOEXCEPT
-{
- return (indeterminate(x) || indeterminate(y))
- ? indeterminate
- : !((x && y) || (!x && !y))
- ;
-}
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator!=(tribool x, bool y) BOOST_NOEXCEPT { return x != tribool(y); }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator!=(bool x, tribool y) BOOST_NOEXCEPT { return tribool(x) != y; }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator!=(indeterminate_keyword_t, tribool x) BOOST_NOEXCEPT
-{ return tribool(indeterminate) != x; }
-
-/**
- * \overload
- */
-BOOST_CONSTEXPR inline tribool operator!=(tribool x, indeterminate_keyword_t) BOOST_NOEXCEPT
-{ return x != tribool(indeterminate); }
-
-} } // end namespace boost::logic
-
-// Pull tribool and indeterminate into namespace "boost"
-namespace boost {
- using logic::tribool;
- using logic::indeterminate;
-}
-
-/**
- * \brief Declare a new name for the third state of a tribool
- *
- * Use this macro to declare a new name for the third state of a
- * tribool. This state can have any number of new names (in addition
- * to \c indeterminate), all of which will be equivalent. The new name will be
- * placed in the namespace in which the macro is expanded.
- *
- * Example:
- * BOOST_TRIBOOL_THIRD_STATE(true_or_false)
- *
- * tribool x(true_or_false);
- * // potentially set x
- * if (true_or_false(x)) {
- * // don't know what x is
- * }
- */
-#define BOOST_TRIBOOL_THIRD_STATE(Name) \
-inline bool \
-Name(boost::logic::tribool x, \
- boost::logic::detail::indeterminate_t = \
- boost::logic::detail::indeterminate_t()) \
-{ return x.value == boost::logic::tribool::indeterminate_value; }
-
-#endif // BOOST_LOGIC_TRIBOOL_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/math/constants/calculate_constants.hpp b/src/third_party/boost-1.68.0/boost/math/constants/calculate_constants.hpp
deleted file mode 100644
index 2dcdb9a02be..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/constants/calculate_constants.hpp
+++ /dev/null
@@ -1,968 +0,0 @@
-// Copyright John Maddock 2010, 2012.
-// Copyright Paul A. Bristow 2011, 2012.
-
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
-#define BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
-
-#include <boost/math/special_functions/trunc.hpp>
-
-namespace boost{ namespace math{ namespace constants{ namespace detail{
-
-template <class T>
-template<int N>
-inline T constant_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
-
- return ldexp(acos(T(0)), 1);
-
- /*
- // Although this code works well, it's usually more accurate to just call acos
- // and access the number types own representation of PI which is usually calculated
- // at slightly higher precision...
-
- T result;
- T a = 1;
- T b;
- T A(a);
- T B = 0.5f;
- T D = 0.25f;
-
- T lim;
- lim = boost::math::tools::epsilon<T>();
-
- unsigned k = 1;
-
- do
- {
- result = A + B;
- result = ldexp(result, -2);
- b = sqrt(B);
- a += b;
- a = ldexp(a, -1);
- A = a * a;
- B = A - result;
- B = ldexp(B, 1);
- result = A - B;
- bool neg = boost::math::sign(result) < 0;
- if(neg)
- result = -result;
- if(result <= lim)
- break;
- if(neg)
- result = -result;
- result = ldexp(result, k - 1);
- D -= result;
- ++k;
- lim = ldexp(lim, 1);
- }
- while(true);
-
- result = B / D;
- return result;
- */
-}
-
-template <class T>
-template<int N>
-inline T constant_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return 2 * pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T> // 2 / pi
-template<int N>
-inline T constant_two_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return 2 / pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T> // sqrt(2/pi)
-template <int N>
-inline T constant_root_two_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt((2 / pi<T, policies::policy<policies::digits2<N> > >()));
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return 1 / two_pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_root_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(pi<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_root_half_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(pi<T, policies::policy<policies::digits2<N> > >() / 2);
-}
-
-template <class T>
-template<int N>
-inline T constant_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(two_pi<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_log_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return log(root_two_pi<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_root_ln_four<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(log(static_cast<T>(4)));
-}
-
-template <class T>
-template<int N>
-inline T constant_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- //
- // Although we can clearly calculate this from first principles, this hooks into
- // T's own notion of e, which hopefully will more accurate than one calculated to
- // a few epsilon:
- //
- BOOST_MATH_STD_USING
- return exp(static_cast<T>(1));
-}
-
-template <class T>
-template<int N>
-inline T constant_half<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return static_cast<T>(1) / static_cast<T>(2);
-}
-
-template <class T>
-template<int M>
-inline T constant_euler<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<M>))
-{
- BOOST_MATH_STD_USING
- //
- // This is the method described in:
- // "Some New Algorithms for High-Precision Computation of Euler's Constant"
- // Richard P Brent and Edwin M McMillan.
- // Mathematics of Computation, Volume 34, Number 149, Jan 1980, pages 305-312.
- // See equation 17 with p = 2.
- //
- T n = 3 + (M ? (std::min)(M, tools::digits<T>()) : tools::digits<T>()) / 4;
- T lim = M ? ldexp(T(1), 1 - (std::min)(M, tools::digits<T>())) : tools::epsilon<T>();
- T lnn = log(n);
- T term = 1;
- T N = -lnn;
- T D = 1;
- T Hk = 0;
- T one = 1;
-
- for(unsigned k = 1;; ++k)
- {
- term *= n * n;
- term /= k * k;
- Hk += one / k;
- N += term * (Hk - lnn);
- D += term;
-
- if(term < D * lim)
- break;
- }
- return N / D;
-}
-
-template <class T>
-template<int N>
-inline T constant_euler_sqr<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return euler<T, policies::policy<policies::digits2<N> > >()
- * euler<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_euler<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(1)
- / euler<T, policies::policy<policies::digits2<N> > >();
-}
-
-
-template <class T>
-template<int N>
-inline T constant_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(static_cast<T>(2));
-}
-
-
-template <class T>
-template<int N>
-inline T constant_root_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(static_cast<T>(3));
-}
-
-template <class T>
-template<int N>
-inline T constant_half_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(static_cast<T>(2)) / 2;
-}
-
-template <class T>
-template<int N>
-inline T constant_ln_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- //
- // Although there are good ways to calculate this from scratch, this hooks into
- // T's own notion of log(2) which will hopefully be accurate to the full precision
- // of T:
- //
- BOOST_MATH_STD_USING
- return log(static_cast<T>(2));
-}
-
-template <class T>
-template<int N>
-inline T constant_ln_ten<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return log(static_cast<T>(10));
-}
-
-template <class T>
-template<int N>
-inline T constant_ln_ln_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return log(log(static_cast<T>(2)));
-}
-
-template <class T>
-template<int N>
-inline T constant_third<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(1) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_twothirds<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(2) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_two_thirds<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(2) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_three_quarters<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(3) / static_cast<T>(4);
-}
-
-template <class T>
-template<int N>
-inline T constant_pi_minus_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_four_minus_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return static_cast<T>(4) - pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-//template <class T>
-//template<int N>
-//inline T constant_pow23_four_minus_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-//{
-// BOOST_MATH_STD_USING
-// return pow(four_minus_pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1.5));
-//}
-
-template <class T>
-template<int N>
-inline T constant_exp_minus_half<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return exp(static_cast<T>(-0.5));
-}
-
-// Pi
-template <class T>
-template<int N>
-inline T constant_one_div_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return static_cast<T>(1) / root_two<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_root_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return static_cast<T>(1) / root_pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- return static_cast<T>(1) / root_two_pi<T, policies::policy<policies::digits2<N> > >();
-}
-
-template <class T>
-template<int N>
-inline T constant_root_one_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(static_cast<T>(1) / pi<T, policies::policy<policies::digits2<N> > >());
-}
-
-
-template <class T>
-template<int N>
-inline T constant_four_thirds_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(4) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_half_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >() / static_cast<T>(2);
-}
-
-
-template <class T>
-template<int N>
-inline T constant_third_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >() / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_sixth_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >() / static_cast<T>(6);
-}
-
-template <class T>
-template<int N>
-inline T constant_two_thirds_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(2) / static_cast<T>(3);
-}
-
-template <class T>
-template<int N>
-inline T constant_three_quarters_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(3) / static_cast<T>(4);
-}
-
-template <class T>
-template<int N>
-inline T constant_pi_pow_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pow(pi<T, policies::policy<policies::digits2<N> > >(), e<T, policies::policy<policies::digits2<N> > >()); //
-}
-
-template <class T>
-template<int N>
-inline T constant_pi_sqr<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >()
- * pi<T, policies::policy<policies::digits2<N> > >() ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_pi_sqr_div_six<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >()
- * pi<T, policies::policy<policies::digits2<N> > >()
- / static_cast<T>(6); //
-}
-
-
-template <class T>
-template<int N>
-inline T constant_pi_cubed<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >()
- * pi<T, policies::policy<policies::digits2<N> > >()
- * pi<T, policies::policy<policies::digits2<N> > >()
- ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_cbrt_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1)/ static_cast<T>(3));
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_cbrt_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(1)
- / pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1)/ static_cast<T>(3));
-}
-
-// Euler's e
-
-template <class T>
-template<int N>
-inline T constant_e_pow_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pow(e<T, policies::policy<policies::digits2<N> > >(), pi<T, policies::policy<policies::digits2<N> > >()); //
-}
-
-template <class T>
-template<int N>
-inline T constant_root_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sqrt(e<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_log10_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return log10(e<T, policies::policy<policies::digits2<N> > >());
-}
-
-template <class T>
-template<int N>
-inline T constant_one_div_log10_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(1) /
- log10(e<T, policies::policy<policies::digits2<N> > >());
-}
-
-// Trigonometric
-
-template <class T>
-template<int N>
-inline T constant_degree<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return pi<T, policies::policy<policies::digits2<N> > >()
- / static_cast<T>(180)
- ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_radian<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(180)
- / pi<T, policies::policy<policies::digits2<N> > >()
- ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_sin_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sin(static_cast<T>(1)) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_cos_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return cos(static_cast<T>(1)) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_sinh_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return sinh(static_cast<T>(1)) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_cosh_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return cosh(static_cast<T>(1)) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return (static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) ; //
-}
-
-template <class T>
-template<int N>
-inline T constant_ln_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- //return log(phi<T, policies::policy<policies::digits2<N> > >()); // ???
- return log((static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) );
-}
-template <class T>
-template<int N>
-inline T constant_one_div_ln_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
- return static_cast<T>(1) /
- log((static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) );
-}
-
-// Zeta
-
-template <class T>
-template<int N>
-inline T constant_zeta_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- BOOST_MATH_STD_USING
-
- return pi<T, policies::policy<policies::digits2<N> > >()
- * pi<T, policies::policy<policies::digits2<N> > >()
- /static_cast<T>(6);
-}
-
-template <class T>
-template<int N>
-inline T constant_zeta_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- // http://mathworld.wolfram.com/AperysConstant.html
- // http://en.wikipedia.org/wiki/Mathematical_constant
-
- // http://oeis.org/A002117/constant
- //T zeta3("1.20205690315959428539973816151144999076"
- // "4986292340498881792271555341838205786313"
- // "09018645587360933525814619915");
-
- //"1.202056903159594285399738161511449990, 76498629234049888179227155534183820578631309018645587360933525814619915" A002117
- // 1.202056903159594285399738161511449990, 76498629234049888179227155534183820578631309018645587360933525814619915780, +00);
- //"1.2020569031595942 double
- // http://www.spaennare.se/SSPROG/ssnum.pdf // section 11, Algorithm for Apery's constant zeta(3).
- // Programs to Calculate some Mathematical Constants to Large Precision, Document Version 1.50
-
- // by Stefan Spannare September 19, 2007
- // zeta(3) = 1/64 * sum
- BOOST_MATH_STD_USING
- T n_fact=static_cast<T>(1); // build n! for n = 0.
- T sum = static_cast<double>(77); // Start with n = 0 case.
- // for n = 0, (77/1) /64 = 1.203125
- //double lim = std::numeric_limits<double>::epsilon();
- T lim = N ? ldexp(T(1), 1 - (std::min)(N, tools::digits<T>())) : tools::epsilon<T>();
- for(unsigned int n = 1; n < 40; ++n)
- { // three to five decimal digits per term, so 40 should be plenty for 100 decimal digits.
- //cout << "n = " << n << endl;
- n_fact *= n; // n!
- T n_fact_p10 = n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact; // (n!)^10
- T num = ((205 * n * n) + (250 * n) + 77) * n_fact_p10; // 205n^2 + 250n + 77
- // int nn = (2 * n + 1);
- // T d = factorial(nn); // inline factorial.
- T d = 1;
- for(unsigned int i = 1; i <= (n+n + 1); ++i) // (2n + 1)
- {
- d *= i;
- }
- T den = d * d * d * d * d; // [(2n+1)!]^5
- //cout << "den = " << den << endl;
- T term = num/den;
- if (n % 2 != 0)
- { //term *= -1;
- sum -= term;
- }
- else
- {
- sum += term;
- }
- //cout << "term = " << term << endl;
- //cout << "sum/64 = " << sum/64 << endl;
- if(abs(term) < lim)
- {
- break;
- }
- }
- return sum / 64;
-}
-
-template <class T>
-template<int N>
-inline T constant_catalan<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{ // http://oeis.org/A006752/constant
- //T c("0.915965594177219015054603514932384110774"
- //"149374281672134266498119621763019776254769479356512926115106248574");
-
- // 9.159655941772190150546035149323841107, 74149374281672134266498119621763019776254769479356512926115106248574422619, -01);
-
- // This is equation (entry) 31 from
- // http://www-2.cs.cmu.edu/~adamchik/articles/catalan/catalan.htm
- // See also http://www.mpfr.org/algorithms.pdf
- BOOST_MATH_STD_USING
- T k_fact = 1;
- T tk_fact = 1;
- T sum = 1;
- T term;
- T lim = N ? ldexp(T(1), 1 - (std::min)(N, tools::digits<T>())) : tools::epsilon<T>();
-
- for(unsigned k = 1;; ++k)
- {
- k_fact *= k;
- tk_fact *= (2 * k) * (2 * k - 1);
- term = k_fact * k_fact / (tk_fact * (2 * k + 1) * (2 * k + 1));
- sum += term;
- if(term < lim)
- {
- break;
- }
- }
- return boost::math::constants::pi<T, boost::math::policies::policy<> >()
- * log(2 + boost::math::constants::root_three<T, boost::math::policies::policy<> >())
- / 8
- + 3 * sum / 8;
-}
-
-namespace khinchin_detail{
-
-template <class T>
-T zeta_polynomial_series(T s, T sc, int digits)
-{
- BOOST_MATH_STD_USING
- //
- // This is algorithm 3 from:
- //
- // "An Efficient Algorithm for the Riemann Zeta Function", P. Borwein,
- // Canadian Mathematical Society, Conference Proceedings, 2000.
- // See: http://www.cecm.sfu.ca/personal/pborwein/PAPERS/P155.pdf
- //
- BOOST_MATH_STD_USING
- int n = (digits * 19) / 53;
- T sum = 0;
- T two_n = ldexp(T(1), n);
- int ej_sign = 1;
- for(int j = 0; j < n; ++j)
- {
- sum += ej_sign * -two_n / pow(T(j + 1), s);
- ej_sign = -ej_sign;
- }
- T ej_sum = 1;
- T ej_term = 1;
- for(int j = n; j <= 2 * n - 1; ++j)
- {
- sum += ej_sign * (ej_sum - two_n) / pow(T(j + 1), s);
- ej_sign = -ej_sign;
- ej_term *= 2 * n - j;
- ej_term /= j - n + 1;
- ej_sum += ej_term;
- }
- return -sum / (two_n * (1 - pow(T(2), sc)));
-}
-
-template <class T>
-T khinchin(int digits)
-{
- BOOST_MATH_STD_USING
- T sum = 0;
- T term;
- T lim = ldexp(T(1), 1-digits);
- T factor = 0;
- unsigned last_k = 1;
- T num = 1;
- for(unsigned n = 1;; ++n)
- {
- for(unsigned k = last_k; k <= 2 * n - 1; ++k)
- {
- factor += num / k;
- num = -num;
- }
- last_k = 2 * n;
- term = (zeta_polynomial_series(T(2 * n), T(1 - T(2 * n)), digits) - 1) * factor / n;
- sum += term;
- if(term < lim)
- break;
- }
- return exp(sum / boost::math::constants::ln_two<T, boost::math::policies::policy<> >());
-}
-
-}
-
-template <class T>
-template<int N>
-inline T constant_khinchin<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
- int n = N ? (std::min)(N, tools::digits<T>()) : tools::digits<T>();
- return khinchin_detail::khinchin<T>(n);
-}
-
-template <class T>
-template<int N>
-inline T constant_extreme_value_skewness<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{ // from e_float constants.cpp
- // Mathematica: N[12 Sqrt[6] Zeta[3]/Pi^3, 1101]
- BOOST_MATH_STD_USING
- T ev(12 * sqrt(static_cast<T>(6)) * zeta_three<T, policies::policy<policies::digits2<N> > >()
- / pi_cubed<T, policies::policy<policies::digits2<N> > >() );
-
-//T ev(
-//"1.1395470994046486574927930193898461120875997958365518247216557100852480077060706857071875468869385150"
-//"1894272048688553376986765366075828644841024041679714157616857834895702411080704529137366329462558680"
-//"2015498788776135705587959418756809080074611906006528647805347822929577145038743873949415294942796280"
-//"0895597703063466053535550338267721294164578901640163603544404938283861127819804918174973533694090594"
-//"3094963822672055237678432023017824416203652657301470473548274848068762500300316769691474974950757965"
-//"8640779777748741897542093874605477776538884083378029488863880220988107155275203245233994097178778984"
-//"3488995668362387892097897322246698071290011857605809901090220903955815127463328974447572119951192970"
-//"3684453635456559086126406960279692862247058250100678008419431185138019869693206366891639436908462809"
-//"9756051372711251054914491837034685476095423926553367264355374652153595857163724698198860485357368964"
-//"3807049634423621246870868566707915720704996296083373077647528285782964567312903914752617978405994377"
-//"9064157147206717895272199736902453130842229559980076472936976287378945035706933650987259357729800315");
-
- return ev;
-}
-
-namespace detail{
-//
-// Calculation of the Glaisher constant depends upon calculating the
-// derivative of the zeta function at 2, we can then use the relation:
-// zeta'(2) = 1/6 pi^2 [euler + ln(2pi)-12ln(A)]
-// To get the constant A.
-// See equation 45 at http://mathworld.wolfram.com/RiemannZetaFunction.html.
-//
-// The derivative of the zeta function is computed by direct differentiation
-// of the relation:
-// (1-2^(1-s))zeta(s) = SUM(n=0, INF){ (-n)^n / (n+1)^s }
-// Which gives us 2 slowly converging but alternating sums to compute,
-// for this we use Algorithm 1 from "Convergent Acceleration of Alternating Series",
-// Henri Cohen, Fernando Rodriguez Villegas and Don Zagier, Experimental Mathematics 9:1 (1999).
-// See http://www.math.utexas.edu/users/villegas/publications/conv-accel.pdf
-//
-template <class T>
-T zeta_series_derivative_2(unsigned digits)
-{
- // Derivative of the series part, evaluated at 2:
- BOOST_MATH_STD_USING
- int n = digits * 301 * 13 / 10000;
- boost::math::itrunc((std::numeric_limits<T>::digits10 + 1) * 1.3);
- T d = pow(3 + sqrt(T(8)), n);
- d = (d + 1 / d) / 2;
- T b = -1;
- T c = -d;
- T s = 0;
- for(int k = 0; k < n; ++k)
- {
- T a = -log(T(k+1)) / ((k+1) * (k+1));
- c = b - c;
- s = s + c * a;
- b = (k + n) * (k - n) * b / ((k + T(0.5f)) * (k + 1));
- }
- return s / d;
-}
-
-template <class T>
-T zeta_series_2(unsigned digits)
-{
- // Series part of zeta at 2:
- BOOST_MATH_STD_USING
- int n = digits * 301 * 13 / 10000;
- T d = pow(3 + sqrt(T(8)), n);
- d = (d + 1 / d) / 2;
- T b = -1;
- T c = -d;
- T s = 0;
- for(int k = 0; k < n; ++k)
- {
- T a = T(1) / ((k + 1) * (k + 1));
- c = b - c;
- s = s + c * a;
- b = (k + n) * (k - n) * b / ((k + T(0.5f)) * (k + 1));
- }
- return s / d;
-}
-
-template <class T>
-inline T zeta_series_lead_2()
-{
- // lead part at 2:
- return 2;
-}
-
-template <class T>
-inline T zeta_series_derivative_lead_2()
-{
- // derivative of lead part at 2:
- return -2 * boost::math::constants::ln_two<T>();
-}
-
-template <class T>
-inline T zeta_derivative_2(unsigned n)
-{
- // zeta derivative at 2:
- return zeta_series_derivative_2<T>(n) * zeta_series_lead_2<T>()
- + zeta_series_derivative_lead_2<T>() * zeta_series_2<T>(n);
-}
-
-} // namespace detail
-
-template <class T>
-template<int N>
-inline T constant_glaisher<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{
-
- BOOST_MATH_STD_USING
- typedef policies::policy<policies::digits2<N> > forwarding_policy;
- int n = N ? (std::min)(N, tools::digits<T>()) : tools::digits<T>();
- T v = detail::zeta_derivative_2<T>(n);
- v *= 6;
- v /= boost::math::constants::pi<T, forwarding_policy>() * boost::math::constants::pi<T, forwarding_policy>();
- v -= boost::math::constants::euler<T, forwarding_policy>();
- v -= log(2 * boost::math::constants::pi<T, forwarding_policy>());
- v /= -12;
- return exp(v);
-
- /*
- // from http://mpmath.googlecode.com/svn/data/glaisher.txt
- // 20,000 digits of the Glaisher-Kinkelin constant A = exp(1/2 - zeta'(-1))
- // Computed using A = exp((6 (-zeta'(2))/pi^2 + log 2 pi + gamma)/12)
- // with Euler-Maclaurin summation for zeta'(2).
- T g(
- "1.282427129100622636875342568869791727767688927325001192063740021740406308858826"
- "46112973649195820237439420646120399000748933157791362775280404159072573861727522"
- "14334327143439787335067915257366856907876561146686449997784962754518174312394652"
- "76128213808180219264516851546143919901083573730703504903888123418813674978133050"
- "93770833682222494115874837348064399978830070125567001286994157705432053927585405"
- "81731588155481762970384743250467775147374600031616023046613296342991558095879293"
- "36343887288701988953460725233184702489001091776941712153569193674967261270398013"
- "52652668868978218897401729375840750167472114895288815996668743164513890306962645"
- "59870469543740253099606800842447417554061490189444139386196089129682173528798629"
- "88434220366989900606980888785849587494085307347117090132667567503310523405221054"
- "14176776156308191919997185237047761312315374135304725819814797451761027540834943"
- "14384965234139453373065832325673954957601692256427736926358821692159870775858274"
- "69575162841550648585890834128227556209547002918593263079373376942077522290940187");
-
- return g;
- */
-}
-
-template <class T>
-template<int N>
-inline T constant_rayleigh_skewness<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{ // From e_float
- // 1100 digits of the Rayleigh distribution skewness
- // Mathematica: N[2 Sqrt[Pi] (Pi - 3)/((4 - Pi)^(3/2)), 1100]
-
- BOOST_MATH_STD_USING
- T rs(2 * root_pi<T, policies::policy<policies::digits2<N> > >()
- * pi_minus_three<T, policies::policy<policies::digits2<N> > >()
- / pow(four_minus_pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(3./2))
- );
- // 6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264,
-
- //"0.6311106578189371381918993515442277798440422031347194976580945856929268196174737254599050270325373067"
- //"9440004726436754739597525250317640394102954301685809920213808351450851396781817932734836994829371322"
- //"5797376021347531983451654130317032832308462278373358624120822253764532674177325950686466133508511968"
- //"2389168716630349407238090652663422922072397393006683401992961569208109477307776249225072042971818671"
- //"4058887072693437217879039875871765635655476241624825389439481561152126886932506682176611183750503553"
- //"1218982627032068396407180216351425758181396562859085306247387212297187006230007438534686340210168288"
- //"8956816965453815849613622117088096547521391672977226658826566757207615552041767516828171274858145957"
- //"6137539156656005855905288420585194082284972984285863898582313048515484073396332610565441264220790791"
- //"0194897267890422924599776483890102027823328602965235306539844007677157873140562950510028206251529523"
- //"7428049693650605954398446899724157486062545281504433364675815915402937209673727753199567661561209251"
- //"4695589950526053470201635372590001578503476490223746511106018091907936826431407434894024396366284848"); ;
- return rs;
-}
-
-template <class T>
-template<int N>
-inline T constant_rayleigh_kurtosis_excess<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{ // - (6 Pi^2 - 24 Pi + 16)/((Pi - 4)^2)
- // Might provide and calculate this using pi_minus_four.
- BOOST_MATH_STD_USING
- return - (((static_cast<T>(6) * pi<T, policies::policy<policies::digits2<N> > >()
- * pi<T, policies::policy<policies::digits2<N> > >())
- - (static_cast<T>(24) * pi<T, policies::policy<policies::digits2<N> > >()) + static_cast<T>(16) )
- /
- ((pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4))
- * (pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4)))
- );
-}
-
-template <class T>
-template<int N>
-inline T constant_rayleigh_kurtosis<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
-{ // 3 - (6 Pi^2 - 24 Pi + 16)/((Pi - 4)^2)
- // Might provide and calculate this using pi_minus_four.
- BOOST_MATH_STD_USING
- return static_cast<T>(3) - (((static_cast<T>(6) * pi<T, policies::policy<policies::digits2<N> > >()
- * pi<T, policies::policy<policies::digits2<N> > >())
- - (static_cast<T>(24) * pi<T, policies::policy<policies::digits2<N> > >()) + static_cast<T>(16) )
- /
- ((pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4))
- * (pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4)))
- );
-}
-
-}}}} // namespaces
-
-#endif // BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/math/constants/constants.hpp b/src/third_party/boost-1.68.0/boost/math/constants/constants.hpp
deleted file mode 100644
index 8c5c4105d4f..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/constants/constants.hpp
+++ /dev/null
@@ -1,346 +0,0 @@
-// Copyright John Maddock 2005-2006, 2011.
-// Copyright Paul A. Bristow 2006-2011.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
-#define BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
-
-#include <boost/math/tools/config.hpp>
-#include <boost/math/policies/policy.hpp>
-#include <boost/math/tools/precision.hpp>
-#include <boost/math/tools/convert_from_string.hpp>
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4127 4701)
-#endif
-#ifndef BOOST_MATH_NO_LEXICAL_CAST
-#include <boost/lexical_cast.hpp>
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/utility/declval.hpp>
-
-
-namespace boost{ namespace math
-{
- namespace constants
- {
- // To permit other calculations at about 100 decimal digits with some UDT,
- // it is obviously necessary to define constants to this accuracy.
-
- // However, some compilers do not accept decimal digits strings as long as this.
- // So the constant is split into two parts, with the 1st containing at least
- // long double precision, and the 2nd zero if not needed or known.
- // The 3rd part permits an exponent to be provided if necessary (use zero if none) -
- // the other two parameters may only contain decimal digits (and sign and decimal point),
- // and may NOT include an exponent like 1.234E99.
- // The second digit string is only used if T is a User-Defined Type,
- // when the constant is converted to a long string literal and lexical_casted to type T.
- // (This is necessary because you can't use a numeric constant
- // since even a long double might not have enough digits).
-
- enum construction_method
- {
- construct_from_float = 1,
- construct_from_double = 2,
- construct_from_long_double = 3,
- construct_from_string = 4,
- construct_from_float128 = 5,
- // Must be the largest value above:
- construct_max = construct_from_float128
- };
-
- //
- // Traits class determines how to convert from string based on whether T has a constructor
- // from const char* or not:
- //
- template <int N>
- struct dummy_size{};
-
- //
- // Max number of binary digits in the string representations
- // of our constants:
- //
- BOOST_STATIC_CONSTANT(int, max_string_digits = (101 * 1000L) / 301L);
-
- template <class Real, class Policy>
- struct construction_traits
- {
- private:
- typedef typename policies::precision<Real, Policy>::type t1;
- typedef typename policies::precision<float, Policy>::type t2;
- typedef typename policies::precision<double, Policy>::type t3;
- typedef typename policies::precision<long double, Policy>::type t4;
-#ifdef BOOST_MATH_USE_FLOAT128
- typedef mpl::int_<113> t5;
-#endif
- public:
- typedef typename mpl::if_<
- mpl::and_<boost::is_convertible<float, Real>, mpl::bool_< t1::value <= t2::value>, mpl::bool_<0 != t1::value> >,
- mpl::int_<construct_from_float>,
- typename mpl::if_<
- mpl::and_<boost::is_convertible<double, Real>, mpl::bool_< t1::value <= t3::value>, mpl::bool_<0 != t1::value> >,
- mpl::int_<construct_from_double>,
- typename mpl::if_<
- mpl::and_<boost::is_convertible<long double, Real>, mpl::bool_< t1::value <= t4::value>, mpl::bool_<0 != t1::value> >,
- mpl::int_<construct_from_long_double>,
-#ifdef BOOST_MATH_USE_FLOAT128
- typename mpl::if_<
- mpl::and_<boost::is_convertible<BOOST_MATH_FLOAT128_TYPE, Real>, mpl::bool_< t1::value <= t5::value>, mpl::bool_<0 != t1::value> >,
- mpl::int_<construct_from_float128>,
- typename mpl::if_<
- mpl::and_<mpl::bool_< t1::value <= max_string_digits>, mpl::bool_<0 != t1::value> >,
- mpl::int_<construct_from_string>,
- mpl::int_<t1::value>
- >::type
- >::type
-#else
- typename mpl::if_<
- mpl::and_<mpl::bool_< t1::value <= max_string_digits>, mpl::bool_<0 != t1::value> >,
- mpl::int_<construct_from_string>,
- mpl::int_<t1::value>
- >::type
-#endif
- >::type
- >::type
- >::type type;
- };
-
-#ifdef BOOST_HAS_THREADS
-#define BOOST_MATH_CONSTANT_THREAD_HELPER(name, prefix) \
- boost::once_flag f = BOOST_ONCE_INIT;\
- boost::call_once(f, &BOOST_JOIN(BOOST_JOIN(string_, get_), name)<T>);
-#else
-#define BOOST_MATH_CONSTANT_THREAD_HELPER(name, prefix)
-#endif
-
- namespace detail{
-
- template <class Real, class Policy = boost::math::policies::policy<> >
- struct constant_return
- {
- typedef typename construction_traits<Real, Policy>::type construct_type;
- typedef typename mpl::if_c<
- (construct_type::value == construct_from_string) || (construct_type::value > construct_max),
- const Real&, Real>::type type;
- };
-
- template <class T, const T& (*F)()>
- struct constant_initializer
- {
- static void force_instantiate()
- {
- init.force_instantiate();
- }
- private:
- struct initializer
- {
- initializer()
- {
- F();
- }
- void force_instantiate()const{}
- };
- static const initializer init;
- };
-
- template <class T, const T& (*F)()>
- typename constant_initializer<T, F>::initializer const constant_initializer<T, F>::init;
-
- template <class T, int N, const T& (*F)(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))>
- struct constant_initializer2
- {
- static void force_instantiate()
- {
- init.force_instantiate();
- }
- private:
- struct initializer
- {
- initializer()
- {
- F();
- }
- void force_instantiate()const{}
- };
- static const initializer init;
- };
-
- template <class T, int N, const T& (*F)(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))>
- typename constant_initializer2<T, N, F>::initializer const constant_initializer2<T, N, F>::init;
-
- }
-
-#ifdef BOOST_MATH_USE_FLOAT128
-# define BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x) \
- static inline BOOST_CONSTEXPR T get(const mpl::int_<construct_from_float128>&) BOOST_NOEXCEPT\
- { return BOOST_JOIN(x, Q); }
-#else
-# define BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x)
-#endif
-
-#ifdef BOOST_NO_CXX11_THREAD_LOCAL
-# define BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name) constant_initializer<T, & BOOST_JOIN(constant_, name)<T>::get_from_variable_precision>::force_instantiate();
-#else
-# define BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)
-#endif
-
-#define BOOST_DEFINE_MATH_CONSTANT(name, x, y)\
- namespace detail{\
- template <class T> struct BOOST_JOIN(constant_, name){\
- private:\
- /* The default implementations come next: */ \
- static inline const T& get_from_string()\
- {\
- static const T result(boost::math::tools::convert_from_string<T>(y));\
- return result;\
- }\
- /* This one is for very high precision that is none the less known at compile time: */ \
- template <int N> static T compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>));\
- template <int N> static inline const T& get_from_compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))\
- {\
- static const T result = compute<N>();\
- return result;\
- }\
- static inline const T& get_from_variable_precision()\
- {\
- static BOOST_MATH_THREAD_LOCAL int digits = 0;\
- static BOOST_MATH_THREAD_LOCAL T value;\
- int current_digits = boost::math::tools::digits<T>();\
- if(digits != current_digits)\
- {\
- value = current_digits > max_string_digits ? compute<0>() : T(boost::math::tools::convert_from_string<T>(y));\
- digits = current_digits; \
- }\
- return value;\
- }\
- /* public getters come next */\
- public:\
- static inline const T& get(const mpl::int_<construct_from_string>&)\
- {\
- constant_initializer<T, & BOOST_JOIN(constant_, name)<T>::get_from_string >::force_instantiate();\
- return get_from_string();\
- }\
- static inline BOOST_CONSTEXPR T get(const mpl::int_<construct_from_float>) BOOST_NOEXCEPT\
- { return BOOST_JOIN(x, F); }\
- static inline BOOST_CONSTEXPR T get(const mpl::int_<construct_from_double>&) BOOST_NOEXCEPT\
- { return x; }\
- static inline BOOST_CONSTEXPR T get(const mpl::int_<construct_from_long_double>&) BOOST_NOEXCEPT\
- { return BOOST_JOIN(x, L); }\
- BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x) \
- template <int N> static inline const T& get(const mpl::int_<N>&)\
- {\
- constant_initializer2<T, N, & BOOST_JOIN(constant_, name)<T>::template get_from_compute<N> >::force_instantiate();\
- return get_from_compute<N>(); \
- }\
- /* This one is for true arbitary precision, which may well vary at runtime: */ \
- static inline T get(const mpl::int_<0>&)\
- {\
- BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)\
- return get_from_variable_precision(); }\
- }; /* end of struct */\
- } /* namespace detail */ \
- \
- \
- /* The actual forwarding function: */ \
- template <class T, class Policy> inline BOOST_CONSTEXPR typename detail::constant_return<T, Policy>::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(Policy)) BOOST_MATH_NOEXCEPT(T)\
- { return detail:: BOOST_JOIN(constant_, name)<T>::get(typename construction_traits<T, Policy>::type()); }\
- template <class T> inline BOOST_CONSTEXPR typename detail::constant_return<T>::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_MATH_NOEXCEPT(T)\
- { return name<T, boost::math::policies::policy<> >(); }\
- \
- \
- /* Now the namespace specific versions: */ \
- } namespace float_constants{ BOOST_STATIC_CONSTEXPR float name = BOOST_JOIN(x, F); }\
- namespace double_constants{ BOOST_STATIC_CONSTEXPR double name = x; } \
- namespace long_double_constants{ BOOST_STATIC_CONSTEXPR long double name = BOOST_JOIN(x, L); }\
- namespace constants{
-
- BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
- BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333e-01, "3.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-01")
- BOOST_DEFINE_MATH_CONSTANT(twothirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
- BOOST_DEFINE_MATH_CONSTANT(two_thirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
- BOOST_DEFINE_MATH_CONSTANT(sixth, 1.66666666666666666666666666666666666666666e-01, "1.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
- BOOST_DEFINE_MATH_CONSTANT(three_quarters, 7.500000000000000000000000000000000000e-01, "7.50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
- BOOST_DEFINE_MATH_CONSTANT(root_two, 1.414213562373095048801688724209698078e+00, "1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623e+00")
- BOOST_DEFINE_MATH_CONSTANT(root_three, 1.732050807568877293527446341505872366e+00, "1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142e+00")
- BOOST_DEFINE_MATH_CONSTANT(half_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01")
- BOOST_DEFINE_MATH_CONSTANT(ln_two, 6.931471805599453094172321214581765680e-01, "6.93147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021e-01")
- BOOST_DEFINE_MATH_CONSTANT(ln_ln_two, -3.665129205816643270124391582326694694e-01, "-3.66512920581664327012439158232669469454263447837105263053677713670561615319352738549455822856698908358302523045e-01")
- BOOST_DEFINE_MATH_CONSTANT(root_ln_four, 1.177410022515474691011569326459699637e+00, "1.17741002251547469101156932645969963774738568938582053852252575650002658854698492680841813836877081106747157858e+00")
- BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01")
- BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884e+00, "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+00")
- BOOST_DEFINE_MATH_CONSTANT(half_pi, 1.570796326794896619231321691639751442e+00, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00")
- BOOST_DEFINE_MATH_CONSTANT(third_pi, 1.047197551196597746154214461093167628e+00, "1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550e+00")
- BOOST_DEFINE_MATH_CONSTANT(sixth_pi, 5.235987755982988730771072305465838140e-01, "5.23598775598298873077107230546583814032861566562517636829157432051302734381034833104672470890352844663691347752e-01")
- BOOST_DEFINE_MATH_CONSTANT(two_pi, 6.283185307179586476925286766559005768e+00, "6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617303e+00")
- BOOST_DEFINE_MATH_CONSTANT(two_thirds_pi, 2.094395102393195492308428922186335256e+00, "2.09439510239319549230842892218633525613144626625007054731662972820521093752413933241868988356141137865476539101e+00")
- BOOST_DEFINE_MATH_CONSTANT(three_quarters_pi, 2.356194490192344928846982537459627163e+00, "2.35619449019234492884698253745962716314787704953132936573120844423086230471465674897102611900658780098661106488e+00")
- BOOST_DEFINE_MATH_CONSTANT(four_thirds_pi, 4.188790204786390984616857844372670512e+00, "4.18879020478639098461685784437267051226289253250014109463325945641042187504827866483737976712282275730953078202e+00")
- BOOST_DEFINE_MATH_CONSTANT(one_div_two_pi, 1.591549430918953357688837633725143620e-01, "1.59154943091895335768883763372514362034459645740456448747667344058896797634226535090113802766253085956072842727e-01")
- BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 3.989422804014326779399460599343818684e-01, "3.98942280401432677939946059934381868475858631164934657665925829670657925899301838501252333907306936430302558863e-01")
- BOOST_DEFINE_MATH_CONSTANT(root_pi, 1.772453850905516027298167483341145182e+00, "1.77245385090551602729816748334114518279754945612238712821380778985291128459103218137495065673854466541622682362e+00")
- BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626e+00, "1.25331413731550025120788264240552262650349337030496915831496178817114682730392098747329791918902863305800498633e+00")
- BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253e+00, "2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659583837805726611600997267e+00")
- BOOST_DEFINE_MATH_CONSTANT(log_root_two_pi, 9.189385332046727417803297364056176398e-01, "9.18938533204672741780329736405617639861397473637783412817151540482765695927260397694743298635954197622005646625e-01")
- BOOST_DEFINE_MATH_CONSTANT(one_div_root_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01")
- BOOST_DEFINE_MATH_CONSTANT(root_one_div_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01")
- BOOST_DEFINE_MATH_CONSTANT(pi_minus_three, 1.415926535897932384626433832795028841e-01, "1.41592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513e-01")
- BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 8.584073464102067615373566167204971158e-01, "8.58407346410206761537356616720497115802830600624894179025055407692183593713791001371965174657882932017851913487e-01")
- //BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 7.953167673715975443483953350568065807e-01, "7.95316767371597544348395335056806580727639173327713205445302234388856268267518187590758006888600828436839800178e-01")
- BOOST_DEFINE_MATH_CONSTANT(pi_pow_e, 2.245915771836104547342715220454373502e+01, "2.24591577183610454734271522045437350275893151339966922492030025540669260403991179123185197527271430315314500731e+01")
- BOOST_DEFINE_MATH_CONSTANT(pi_sqr, 9.869604401089358618834490999876151135e+00, "9.86960440108935861883449099987615113531369940724079062641334937622004482241920524300177340371855223182402591377e+00")
- BOOST_DEFINE_MATH_CONSTANT(pi_sqr_div_six, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00")
- BOOST_DEFINE_MATH_CONSTANT(pi_cubed, 3.100627668029982017547631506710139520e+01, "3.10062766802998201754763150671013952022252885658851076941445381038063949174657060375667010326028861930301219616e+01")
- BOOST_DEFINE_MATH_CONSTANT(cbrt_pi, 1.464591887561523263020142527263790391e+00, "1.46459188756152326302014252726379039173859685562793717435725593713839364979828626614568206782035382089750397002e+00")
- BOOST_DEFINE_MATH_CONSTANT(one_div_cbrt_pi, 6.827840632552956814670208331581645981e-01, "6.82784063255295681467020833158164598108367515632448804042681583118899226433403918237673501922595519865685577274e-01")
- BOOST_DEFINE_MATH_CONSTANT(e, 2.718281828459045235360287471352662497e+00, "2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193e+00")
- BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 6.065306597126334236037995349911804534e-01, "6.06530659712633423603799534991180453441918135487186955682892158735056519413748423998647611507989456026423789794e-01")
- BOOST_DEFINE_MATH_CONSTANT(e_pow_pi, 2.314069263277926900572908636794854738e+01, "2.31406926327792690057290863679485473802661062426002119934450464095243423506904527835169719970675492196759527048e+01")
- BOOST_DEFINE_MATH_CONSTANT(root_e, 1.648721270700128146848650787814163571e+00, "1.64872127070012814684865078781416357165377610071014801157507931164066102119421560863277652005636664300286663776e+00")
- BOOST_DEFINE_MATH_CONSTANT(log10_e, 4.342944819032518276511289189166050822e-01, "4.34294481903251827651128918916605082294397005803666566114453783165864649208870774729224949338431748318706106745e-01")
- BOOST_DEFINE_MATH_CONSTANT(one_div_log10_e, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00")
- BOOST_DEFINE_MATH_CONSTANT(ln_ten, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00")
- BOOST_DEFINE_MATH_CONSTANT(degree, 1.745329251994329576923690768488612713e-02, "1.74532925199432957692369076848861271344287188854172545609719144017100911460344944368224156963450948221230449251e-02")
- BOOST_DEFINE_MATH_CONSTANT(radian, 5.729577951308232087679815481410517033e+01, "5.72957795130823208767981548141051703324054724665643215491602438612028471483215526324409689958511109441862233816e+01")
- BOOST_DEFINE_MATH_CONSTANT(sin_one, 8.414709848078965066525023216302989996e-01, "8.41470984807896506652502321630298999622563060798371065672751709991910404391239668948639743543052695854349037908e-01")
- BOOST_DEFINE_MATH_CONSTANT(cos_one, 5.403023058681397174009366074429766037e-01, "5.40302305868139717400936607442976603732310420617922227670097255381100394774471764517951856087183089343571731160e-01")
- BOOST_DEFINE_MATH_CONSTANT(sinh_one, 1.175201193643801456882381850595600815e+00, "1.17520119364380145688238185059560081515571798133409587022956541301330756730432389560711745208962339184041953333e+00")
- BOOST_DEFINE_MATH_CONSTANT(cosh_one, 1.543080634815243778477905620757061682e+00, "1.54308063481524377847790562075706168260152911236586370473740221471076906304922369896426472643554303558704685860e+00")
- BOOST_DEFINE_MATH_CONSTANT(phi, 1.618033988749894848204586834365638117e+00, "1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408808e+00")
- BOOST_DEFINE_MATH_CONSTANT(ln_phi, 4.812118250596034474977589134243684231e-01, "4.81211825059603447497758913424368423135184334385660519661018168840163867608221774412009429122723474997231839958e-01")
- BOOST_DEFINE_MATH_CONSTANT(one_div_ln_phi, 2.078086921235027537601322606117795767e+00, "2.07808692123502753760132260611779576774219226778328348027813992191974386928553540901445615414453604821933918634e+00")
- BOOST_DEFINE_MATH_CONSTANT(euler, 5.772156649015328606065120900824024310e-01, "5.77215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447250e-01")
- BOOST_DEFINE_MATH_CONSTANT(one_div_euler, 1.732454714600633473583025315860829681e+00, "1.73245471460063347358302531586082968115577655226680502204843613287065531408655243008832840219409928068072365714e+00")
- BOOST_DEFINE_MATH_CONSTANT(euler_sqr, 3.331779238077186743183761363552442266e-01, "3.33177923807718674318376136355244226659417140249629743150833338002265793695756669661263268631715977303039565603e-01")
- BOOST_DEFINE_MATH_CONSTANT(zeta_two, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00")
- BOOST_DEFINE_MATH_CONSTANT(zeta_three, 1.202056903159594285399738161511449990e+00, "1.20205690315959428539973816151144999076498629234049888179227155534183820578631309018645587360933525814619915780e+00")
- BOOST_DEFINE_MATH_CONSTANT(catalan, 9.159655941772190150546035149323841107e-01, "9.15965594177219015054603514932384110774149374281672134266498119621763019776254769479356512926115106248574422619e-01")
- BOOST_DEFINE_MATH_CONSTANT(glaisher, 1.282427129100622636875342568869791727e+00, "1.28242712910062263687534256886979172776768892732500119206374002174040630885882646112973649195820237439420646120e+00")
- BOOST_DEFINE_MATH_CONSTANT(khinchin, 2.685452001065306445309714835481795693e+00, "2.68545200106530644530971483548179569382038229399446295305115234555721885953715200280114117493184769799515346591e+00")
- BOOST_DEFINE_MATH_CONSTANT(extreme_value_skewness, 1.139547099404648657492793019389846112e+00, "1.13954709940464865749279301938984611208759979583655182472165571008524800770607068570718754688693851501894272049e+00")
- BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01")
- BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis, 3.245089300687638062848660410619754415e+00, "3.24508930068763806284866041061975441541706673178920936177133764493367904540874159051490619368679348977426462633e+00")
- BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis_excess, 2.450893006876380628486604106197544154e-01, "2.45089300687638062848660410619754415417066731789209361771337644933679045408741590514906193686793489774264626328e-01")
-
- BOOST_DEFINE_MATH_CONSTANT(two_div_pi, 6.366197723675813430755350534900574481e-01, "6.36619772367581343075535053490057448137838582961825794990669376235587190536906140360455211065012343824291370907e-01")
- BOOST_DEFINE_MATH_CONSTANT(root_two_div_pi, 7.978845608028653558798921198687637369e-01, "7.97884560802865355879892119868763736951717262329869315331851659341315851798603677002504667814613872860605117725e-01")
-
-
-} // namespace constants
-} // namespace math
-} // namespace boost
-
-//
-// We deliberately include this *after* all the declarations above,
-// that way the calculation routines can call on other constants above:
-//
-#include <boost/math/constants/calculate_constants.hpp>
-
-#endif // BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/extreme_value.hpp b/src/third_party/boost-1.68.0/boost/math/distributions/extreme_value.hpp
deleted file mode 100644
index cb86de66122..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/distributions/extreme_value.hpp
+++ /dev/null
@@ -1,300 +0,0 @@
-// Copyright John Maddock 2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_STATS_EXTREME_VALUE_HPP
-#define BOOST_STATS_EXTREME_VALUE_HPP
-
-#include <boost/math/distributions/fwd.hpp>
-#include <boost/math/constants/constants.hpp>
-#include <boost/math/special_functions/log1p.hpp>
-#include <boost/math/special_functions/expm1.hpp>
-#include <boost/math/distributions/complement.hpp>
-#include <boost/math/distributions/detail/common_error_handling.hpp>
-#include <boost/config/no_tr1/cmath.hpp>
-
-//
-// This is the maximum extreme value distribution, see
-// http://www.itl.nist.gov/div898/handbook/eda/section3/eda366g.htm
-// and http://mathworld.wolfram.com/ExtremeValueDistribution.html
-// Also known as a Fisher-Tippett distribution, a log-Weibull
-// distribution or a Gumbel distribution.
-
-#include <utility>
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
-#endif
-
-namespace boost{ namespace math{
-
-namespace detail{
-//
-// Error check:
-//
-template <class RealType, class Policy>
-inline bool verify_scale_b(const char* function, RealType b, RealType* presult, const Policy& pol)
-{
- if((b <= 0) || !(boost::math::isfinite)(b))
- {
- *presult = policies::raise_domain_error<RealType>(
- function,
- "The scale parameter \"b\" must be finite and > 0, but was: %1%.", b, pol);
- return false;
- }
- return true;
-}
-
-} // namespace detail
-
-template <class RealType = double, class Policy = policies::policy<> >
-class extreme_value_distribution
-{
-public:
- typedef RealType value_type;
- typedef Policy policy_type;
-
- extreme_value_distribution(RealType a = 0, RealType b = 1)
- : m_a(a), m_b(b)
- {
- RealType err;
- detail::verify_scale_b("boost::math::extreme_value_distribution<%1%>::extreme_value_distribution", b, &err, Policy());
- detail::check_finite("boost::math::extreme_value_distribution<%1%>::extreme_value_distribution", a, &err, Policy());
- } // extreme_value_distribution
-
- RealType location()const { return m_a; }
- RealType scale()const { return m_b; }
-
-private:
- RealType m_a, m_b;
-};
-
-typedef extreme_value_distribution<double> extreme_value;
-
-template <class RealType, class Policy>
-inline const std::pair<RealType, RealType> range(const extreme_value_distribution<RealType, Policy>& /*dist*/)
-{ // Range of permissible values for random variable x.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(
- std::numeric_limits<RealType>::has_infinity ? -std::numeric_limits<RealType>::infinity() : -max_value<RealType>(),
- std::numeric_limits<RealType>::has_infinity ? std::numeric_limits<RealType>::infinity() : max_value<RealType>());
-}
-
-template <class RealType, class Policy>
-inline const std::pair<RealType, RealType> support(const extreme_value_distribution<RealType, Policy>& /*dist*/)
-{ // Range of supported values for random variable x.
- // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
- using boost::math::tools::max_value;
- return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
-}
-
-template <class RealType, class Policy>
-inline RealType pdf(const extreme_value_distribution<RealType, Policy>& dist, const RealType& x)
-{
- BOOST_MATH_STD_USING // for ADL of std functions
-
- static const char* function = "boost::math::pdf(const extreme_value_distribution<%1%>&, %1%)";
-
- RealType a = dist.location();
- RealType b = dist.scale();
- RealType result = 0;
- if(0 == detail::verify_scale_b(function, b, &result, Policy()))
- return result;
- if(0 == detail::check_finite(function, a, &result, Policy()))
- return result;
- if((boost::math::isinf)(x))
- return 0.0f;
- if(0 == detail::check_x(function, x, &result, Policy()))
- return result;
- RealType e = (a - x) / b;
- if(e < tools::log_max_value<RealType>())
- result = exp(e) * exp(-exp(e)) / b;
- // else.... result *must* be zero since exp(e) is infinite...
- return result;
-} // pdf
-
-template <class RealType, class Policy>
-inline RealType cdf(const extreme_value_distribution<RealType, Policy>& dist, const RealType& x)
-{
- BOOST_MATH_STD_USING // for ADL of std functions
-
- static const char* function = "boost::math::cdf(const extreme_value_distribution<%1%>&, %1%)";
-
- if((boost::math::isinf)(x))
- return x < 0 ? 0.0f : 1.0f;
- RealType a = dist.location();
- RealType b = dist.scale();
- RealType result = 0;
- if(0 == detail::verify_scale_b(function, b, &result, Policy()))
- return result;
- if(0 == detail::check_finite(function, a, &result, Policy()))
- return result;
- if(0 == detail::check_finite(function, a, &result, Policy()))
- return result;
- if(0 == detail::check_x("boost::math::cdf(const extreme_value_distribution<%1%>&, %1%)", x, &result, Policy()))
- return result;
-
- result = exp(-exp((a-x)/b));
-
- return result;
-} // cdf
-
-template <class RealType, class Policy>
-RealType quantile(const extreme_value_distribution<RealType, Policy>& dist, const RealType& p)
-{
- BOOST_MATH_STD_USING // for ADL of std functions
-
- static const char* function = "boost::math::quantile(const extreme_value_distribution<%1%>&, %1%)";
-
- RealType a = dist.location();
- RealType b = dist.scale();
- RealType result = 0;
- if(0 == detail::verify_scale_b(function, b, &result, Policy()))
- return result;
- if(0 == detail::check_finite(function, a, &result, Policy()))
- return result;
- if(0 == detail::check_probability(function, p, &result, Policy()))
- return result;
-
- if(p == 0)
- return -policies::raise_overflow_error<RealType>(function, 0, Policy());
- if(p == 1)
- return policies::raise_overflow_error<RealType>(function, 0, Policy());
-
- result = a - log(-log(p)) * b;
-
- return result;
-} // quantile
-
-template <class RealType, class Policy>
-inline RealType cdf(const complemented2_type<extreme_value_distribution<RealType, Policy>, RealType>& c)
-{
- BOOST_MATH_STD_USING // for ADL of std functions
-
- static const char* function = "boost::math::cdf(const extreme_value_distribution<%1%>&, %1%)";
-
- if((boost::math::isinf)(c.param))
- return c.param < 0 ? 1.0f : 0.0f;
- RealType a = c.dist.location();
- RealType b = c.dist.scale();
- RealType result = 0;
- if(0 == detail::verify_scale_b(function, b, &result, Policy()))
- return result;
- if(0 == detail::check_finite(function, a, &result, Policy()))
- return result;
- if(0 == detail::check_x(function, c.param, &result, Policy()))
- return result;
-
- result = -boost::math::expm1(-exp((a-c.param)/b), Policy());
-
- return result;
-}
-
-template <class RealType, class Policy>
-RealType quantile(const complemented2_type<extreme_value_distribution<RealType, Policy>, RealType>& c)
-{
- BOOST_MATH_STD_USING // for ADL of std functions
-
- static const char* function = "boost::math::quantile(const extreme_value_distribution<%1%>&, %1%)";
-
- RealType a = c.dist.location();
- RealType b = c.dist.scale();
- RealType q = c.param;
- RealType result = 0;
- if(0 == detail::verify_scale_b(function, b, &result, Policy()))
- return result;
- if(0 == detail::check_finite(function, a, &result, Policy()))
- return result;
- if(0 == detail::check_probability(function, q, &result, Policy()))
- return result;
-
- if(q == 0)
- return policies::raise_overflow_error<RealType>(function, 0, Policy());
- if(q == 1)
- return -policies::raise_overflow_error<RealType>(function, 0, Policy());
-
- result = a - log(-boost::math::log1p(-q, Policy())) * b;
-
- return result;
-}
-
-template <class RealType, class Policy>
-inline RealType mean(const extreme_value_distribution<RealType, Policy>& dist)
-{
- RealType a = dist.location();
- RealType b = dist.scale();
- RealType result = 0;
- if(0 == detail::verify_scale_b("boost::math::mean(const extreme_value_distribution<%1%>&)", b, &result, Policy()))
- return result;
- if(0 == detail::check_scale("boost::math::mean(const extreme_value_distribution<%1%>&)", a, &result, Policy()))
- return result;
- return a + constants::euler<RealType>() * b;
-}
-
-template <class RealType, class Policy>
-inline RealType standard_deviation(const extreme_value_distribution<RealType, Policy>& dist)
-{
- BOOST_MATH_STD_USING // for ADL of std functions.
-
- RealType b = dist.scale();
- RealType result = 0;
- if(0 == detail::verify_scale_b("boost::math::standard_deviation(const extreme_value_distribution<%1%>&)", b, &result, Policy()))
- return result;
- if(0 == detail::check_scale("boost::math::standard_deviation(const extreme_value_distribution<%1%>&)", dist.location(), &result, Policy()))
- return result;
- return constants::pi<RealType>() * b / sqrt(static_cast<RealType>(6));
-}
-
-template <class RealType, class Policy>
-inline RealType mode(const extreme_value_distribution<RealType, Policy>& dist)
-{
- return dist.location();
-}
-
-template <class RealType, class Policy>
-inline RealType median(const extreme_value_distribution<RealType, Policy>& dist)
-{
- using constants::ln_ln_two;
- return dist.location() - dist.scale() * ln_ln_two<RealType>();
-}
-
-template <class RealType, class Policy>
-inline RealType skewness(const extreme_value_distribution<RealType, Policy>& /*dist*/)
-{
- //
- // This is 12 * sqrt(6) * zeta(3) / pi^3:
- // See http://mathworld.wolfram.com/ExtremeValueDistribution.html
- //
- return static_cast<RealType>(1.1395470994046486574927930193898461120875997958366L);
-}
-
-template <class RealType, class Policy>
-inline RealType kurtosis(const extreme_value_distribution<RealType, Policy>& /*dist*/)
-{
- // See http://mathworld.wolfram.com/ExtremeValueDistribution.html
- return RealType(27) / 5;
-}
-
-template <class RealType, class Policy>
-inline RealType kurtosis_excess(const extreme_value_distribution<RealType, Policy>& /*dist*/)
-{
- // See http://mathworld.wolfram.com/ExtremeValueDistribution.html
- return RealType(12) / 5;
-}
-
-
-} // namespace math
-} // namespace boost
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-// This include must be at the end, *after* the accessors
-// for this distribution have been defined, in order to
-// keep compilers that support two-phase lookup happy.
-#include <boost/math/distributions/detail/derived_accessors.hpp>
-
-#endif // BOOST_STATS_EXTREME_VALUE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/fp_traits.hpp b/src/third_party/boost-1.68.0/boost/math/special_functions/detail/fp_traits.hpp
deleted file mode 100644
index c957022223e..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/fp_traits.hpp
+++ /dev/null
@@ -1,581 +0,0 @@
-// fp_traits.hpp
-
-#ifndef BOOST_MATH_FP_TRAITS_HPP
-#define BOOST_MATH_FP_TRAITS_HPP
-
-// Copyright (c) 2006 Johan Rade
-
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt
-// or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-/*
-To support old compilers, care has been taken to avoid partial template
-specialization and meta function forwarding.
-With these techniques, the code could be simplified.
-*/
-
-#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT
-// The VAX floating point formats are used (for float and double)
-# define BOOST_FPCLASSIFY_VAX_FORMAT
-#endif
-
-#include <cstring>
-
-#include <boost/assert.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/detail/endian.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-
-#ifdef BOOST_NO_STDC_NAMESPACE
- namespace std{ using ::memcpy; }
-#endif
-
-#ifndef FP_NORMAL
-
-#define FP_ZERO 0
-#define FP_NORMAL 1
-#define FP_INFINITE 2
-#define FP_NAN 3
-#define FP_SUBNORMAL 4
-
-#else
-
-#define BOOST_HAS_FPCLASSIFY
-
-#ifndef fpclassify
-# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
- && defined(_GLIBCXX_USE_C99_MATH) \
- && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \
- && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
-# ifdef _STLP_VENDOR_CSTD
-# if _STLPORT_VERSION >= 0x520
-# define BOOST_FPCLASSIFY_PREFIX ::__std_alias::
-# else
-# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD::
-# endif
-# else
-# define BOOST_FPCLASSIFY_PREFIX ::std::
-# endif
-# else
-# undef BOOST_HAS_FPCLASSIFY
-# define BOOST_FPCLASSIFY_PREFIX
-# endif
-#elif (defined(__HP_aCC) && !defined(__hppa))
-// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit!
-# define BOOST_FPCLASSIFY_PREFIX ::
-#else
-# define BOOST_FPCLASSIFY_PREFIX
-#endif
-
-#ifdef __MINGW32__
-# undef BOOST_HAS_FPCLASSIFY
-#endif
-
-#endif
-
-
-//------------------------------------------------------------------------------
-
-namespace boost {
-namespace math {
-namespace detail {
-
-//------------------------------------------------------------------------------
-
-/*
-The following classes are used to tag the different methods that are used
-for floating point classification
-*/
-
-struct native_tag {};
-template <bool has_limits>
-struct generic_tag {};
-struct ieee_tag {};
-struct ieee_copy_all_bits_tag : public ieee_tag {};
-struct ieee_copy_leading_bits_tag : public ieee_tag {};
-
-#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
-//
-// These helper functions are used only when numeric_limits<>
-// members are not compile time constants:
-//
-inline bool is_generic_tag_false(const generic_tag<false>*)
-{
- return true;
-}
-inline bool is_generic_tag_false(const void*)
-{
- return false;
-}
-#endif
-
-//------------------------------------------------------------------------------
-
-/*
-Most processors support three different floating point precisions:
-single precision (32 bits), double precision (64 bits)
-and extended double precision (80 - 128 bits, depending on the processor)
-
-Note that the C++ type long double can be implemented
-both as double precision and extended double precision.
-*/
-
-struct unknown_precision{};
-struct single_precision {};
-struct double_precision {};
-struct extended_double_precision {};
-
-// native_tag version --------------------------------------------------------------
-
-template<class T> struct fp_traits_native
-{
- typedef native_tag method;
-};
-
-// generic_tag version -------------------------------------------------------------
-
-template<class T, class U> struct fp_traits_non_native
-{
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- typedef generic_tag<std::numeric_limits<T>::is_specialized> method;
-#else
- typedef generic_tag<false> method;
-#endif
-};
-
-// ieee_tag versions ---------------------------------------------------------------
-
-/*
-These specializations of fp_traits_non_native contain information needed
-to "parse" the binary representation of a floating point number.
-
-Typedef members:
-
- bits -- the target type when copying the leading bytes of a floating
- point number. It is a typedef for uint32_t or uint64_t.
-
- method -- tells us whether all bytes are copied or not.
- It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag.
-
-Static data members:
-
- sign, exponent, flag, significand -- bit masks that give the meaning of the
- bits in the leading bytes.
-
-Static function members:
-
- get_bits(), set_bits() -- provide access to the leading bytes.
-
-*/
-
-// ieee_tag version, float (32 bits) -----------------------------------------------
-
-#ifndef BOOST_FPCLASSIFY_VAX_FORMAT
-
-template<> struct fp_traits_non_native<float, single_precision>
-{
- typedef ieee_copy_all_bits_tag method;
-
- BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
- BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7f800000);
- BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);
- BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff);
-
- typedef uint32_t bits;
- static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); }
- static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); }
-};
-
-// ieee_tag version, double (64 bits) ----------------------------------------------
-
-#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \
- || defined(__BORLANDC__) || defined(__CODEGEAR__)
-
-template<> struct fp_traits_non_native<double, double_precision>
-{
- typedef ieee_copy_leading_bits_tag method;
-
- BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
- BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);
- BOOST_STATIC_CONSTANT(uint32_t, flag = 0);
- BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
-
- typedef uint32_t bits;
-
- static void get_bits(double x, uint32_t& a)
- {
- std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
- }
-
- static void set_bits(double& x, uint32_t a)
- {
- std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
- }
-
-private:
-
-#if defined(BOOST_BIG_ENDIAN)
- BOOST_STATIC_CONSTANT(int, offset_ = 0);
-#elif defined(BOOST_LITTLE_ENDIAN)
- BOOST_STATIC_CONSTANT(int, offset_ = 4);
-#else
- BOOST_STATIC_ASSERT(false);
-#endif
-};
-
-//..............................................................................
-
-#else
-
-template<> struct fp_traits_non_native<double, double_precision>
-{
- typedef ieee_copy_all_bits_tag method;
-
- static const uint64_t sign = ((uint64_t)0x80000000u) << 32;
- static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32;
- static const uint64_t flag = 0;
- static const uint64_t significand
- = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu);
-
- typedef uint64_t bits;
- static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
- static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
-};
-
-#endif
-
-#endif // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT
-
-// long double (64 bits) -------------------------------------------------------
-
-#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\
- || defined(__BORLANDC__) || defined(__CODEGEAR__)
-
-template<> struct fp_traits_non_native<long double, double_precision>
-{
- typedef ieee_copy_leading_bits_tag method;
-
- BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
- BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);
- BOOST_STATIC_CONSTANT(uint32_t, flag = 0);
- BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
-
- typedef uint32_t bits;
-
- static void get_bits(long double x, uint32_t& a)
- {
- std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
- }
-
- static void set_bits(long double& x, uint32_t a)
- {
- std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
- }
-
-private:
-
-#if defined(BOOST_BIG_ENDIAN)
- BOOST_STATIC_CONSTANT(int, offset_ = 0);
-#elif defined(BOOST_LITTLE_ENDIAN)
- BOOST_STATIC_CONSTANT(int, offset_ = 4);
-#else
- BOOST_STATIC_ASSERT(false);
-#endif
-};
-
-//..............................................................................
-
-#else
-
-template<> struct fp_traits_non_native<long double, double_precision>
-{
- typedef ieee_copy_all_bits_tag method;
-
- static const uint64_t sign = (uint64_t)0x80000000u << 32;
- static const uint64_t exponent = (uint64_t)0x7ff00000 << 32;
- static const uint64_t flag = 0;
- static const uint64_t significand
- = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu;
-
- typedef uint64_t bits;
- static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
- static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
-};
-
-#endif
-
-
-// long double (>64 bits), x86 and x64 -----------------------------------------
-
-#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \
- || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) \
- || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)
-
-// Intel extended double precision format (80 bits)
-
-template<>
-struct fp_traits_non_native<long double, extended_double_precision>
-{
- typedef ieee_copy_leading_bits_tag method;
-
- BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
- BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);
- BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000);
- BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
-
- typedef uint32_t bits;
-
- static void get_bits(long double x, uint32_t& a)
- {
- std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + 6, 4);
- }
-
- static void set_bits(long double& x, uint32_t a)
- {
- std::memcpy(reinterpret_cast<unsigned char*>(&x) + 6, &a, 4);
- }
-};
-
-
-// long double (>64 bits), Itanium ---------------------------------------------
-
-#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
-
-// The floating point format is unknown at compile time
-// No template specialization is provided.
-// The generic_tag definition is used.
-
-// The Itanium supports both
-// the Intel extended double precision format (80 bits) and
-// the IEEE extended double precision format with 15 exponent bits (128 bits).
-
-#elif defined(__GNUC__) && (LDBL_MANT_DIG == 106)
-
-//
-// Define nothing here and fall though to generic_tag:
-// We have GCC's "double double" in effect, and any attempt
-// to handle it via bit-fiddling is pretty much doomed to fail...
-//
-
-// long double (>64 bits), PowerPC ---------------------------------------------
-
-#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \
- || defined(__ppc) || defined(__ppc__) || defined(__PPC__)
-
-// PowerPC extended double precision format (128 bits)
-
-template<>
-struct fp_traits_non_native<long double, extended_double_precision>
-{
- typedef ieee_copy_leading_bits_tag method;
-
- BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
- BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);
- BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);
- BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
-
- typedef uint32_t bits;
-
- static void get_bits(long double x, uint32_t& a)
- {
- std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
- }
-
- static void set_bits(long double& x, uint32_t a)
- {
- std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
- }
-
-private:
-
-#if defined(BOOST_BIG_ENDIAN)
- BOOST_STATIC_CONSTANT(int, offset_ = 0);
-#elif defined(BOOST_LITTLE_ENDIAN)
- BOOST_STATIC_CONSTANT(int, offset_ = 12);
-#else
- BOOST_STATIC_ASSERT(false);
-#endif
-};
-
-
-// long double (>64 bits), Motorola 68K ----------------------------------------
-
-#elif defined(__m68k) || defined(__m68k__) \
- || defined(__mc68000) || defined(__mc68000__) \
-
-// Motorola extended double precision format (96 bits)
-
-// It is the same format as the Intel extended double precision format,
-// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and
-// 3) the flag bit is not set for infinity
-
-template<>
-struct fp_traits_non_native<long double, extended_double_precision>
-{
- typedef ieee_copy_leading_bits_tag method;
-
- BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
- BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);
- BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000);
- BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
-
- // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding.
-
- typedef uint32_t bits;
-
- static void get_bits(long double x, uint32_t& a)
- {
- std::memcpy(&a, &x, 2);
- std::memcpy(reinterpret_cast<unsigned char*>(&a) + 2,
- reinterpret_cast<const unsigned char*>(&x) + 4, 2);
- }
-
- static void set_bits(long double& x, uint32_t a)
- {
- std::memcpy(&x, &a, 2);
- std::memcpy(reinterpret_cast<unsigned char*>(&x) + 4,
- reinterpret_cast<const unsigned char*>(&a) + 2, 2);
- }
-};
-
-
-// long double (>64 bits), All other processors --------------------------------
-
-#else
-
-// IEEE extended double precision format with 15 exponent bits (128 bits)
-
-template<>
-struct fp_traits_non_native<long double, extended_double_precision>
-{
- typedef ieee_copy_leading_bits_tag method;
-
- BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
- BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);
- BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);
- BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff);
-
- typedef uint32_t bits;
-
- static void get_bits(long double x, uint32_t& a)
- {
- std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
- }
-
- static void set_bits(long double& x, uint32_t a)
- {
- std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
- }
-
-private:
-
-#if defined(BOOST_BIG_ENDIAN)
- BOOST_STATIC_CONSTANT(int, offset_ = 0);
-#elif defined(BOOST_LITTLE_ENDIAN)
- BOOST_STATIC_CONSTANT(int, offset_ = 12);
-#else
- BOOST_STATIC_ASSERT(false);
-#endif
-};
-
-#endif
-
-//------------------------------------------------------------------------------
-
-// size_to_precision is a type switch for converting a C++ floating point type
-// to the corresponding precision type.
-
-template<int n, bool fp> struct size_to_precision
-{
- typedef unknown_precision type;
-};
-
-template<> struct size_to_precision<4, true>
-{
- typedef single_precision type;
-};
-
-template<> struct size_to_precision<8, true>
-{
- typedef double_precision type;
-};
-
-template<> struct size_to_precision<10, true>
-{
- typedef extended_double_precision type;
-};
-
-template<> struct size_to_precision<12, true>
-{
- typedef extended_double_precision type;
-};
-
-template<> struct size_to_precision<16, true>
-{
- typedef extended_double_precision type;
-};
-
-//------------------------------------------------------------------------------
-//
-// Figure out whether to use native classification functions based on
-// whether T is a built in floating point type or not:
-//
-template <class T>
-struct select_native
-{
- typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
- typedef fp_traits_non_native<T, precision> type;
-};
-template<>
-struct select_native<float>
-{
- typedef fp_traits_native<float> type;
-};
-template<>
-struct select_native<double>
-{
- typedef fp_traits_native<double> type;
-};
-template<>
-struct select_native<long double>
-{
- typedef fp_traits_native<long double> type;
-};
-
-//------------------------------------------------------------------------------
-
-// fp_traits is a type switch that selects the right fp_traits_non_native
-
-#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \
- && !defined(__hpux) \
- && !defined(__DECCXX)\
- && !defined(__osf__) \
- && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\
- && !defined(__FAST_MATH__)\
- && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)\
- && !defined(BOOST_INTEL)\
- && !defined(sun)\
- && !defined(__VXWORKS__)
-# define BOOST_MATH_USE_STD_FPCLASSIFY
-#endif
-
-template<class T> struct fp_traits
-{
- typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
-#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
- typedef typename select_native<T>::type type;
-#else
- typedef fp_traits_non_native<T, precision> type;
-#endif
- typedef fp_traits_non_native<T, precision> sign_change_type;
-};
-
-//------------------------------------------------------------------------------
-
-} // namespace detail
-} // namespace math
-} // namespace boost
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/erf.hpp b/src/third_party/boost-1.68.0/boost/math/special_functions/erf.hpp
deleted file mode 100644
index eda223b5d21..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/erf.hpp
+++ /dev/null
@@ -1,1273 +0,0 @@
-// (C) Copyright John Maddock 2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_SPECIAL_ERF_HPP
-#define BOOST_MATH_SPECIAL_ERF_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/special_functions/math_fwd.hpp>
-#include <boost/math/tools/config.hpp>
-#include <boost/math/special_functions/gamma.hpp>
-#include <boost/math/tools/roots.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/tools/big_constant.hpp>
-
-namespace boost{ namespace math{
-
-namespace detail
-{
-
-//
-// Asymptotic series for large z:
-//
-template <class T>
-struct erf_asympt_series_t
-{
- erf_asympt_series_t(T z) : xx(2 * -z * z), tk(1)
- {
- BOOST_MATH_STD_USING
- result = -exp(-z * z) / sqrt(boost::math::constants::pi<T>());
- result /= z;
- }
-
- typedef T result_type;
-
- T operator()()
- {
- BOOST_MATH_STD_USING
- T r = result;
- result *= tk / xx;
- tk += 2;
- if( fabs(r) < fabs(result))
- result = 0;
- return r;
- }
-private:
- T result;
- T xx;
- int tk;
-};
-//
-// How large z has to be in order to ensure that the series converges:
-//
-template <class T>
-inline float erf_asymptotic_limit_N(const T&)
-{
- return (std::numeric_limits<float>::max)();
-}
-inline float erf_asymptotic_limit_N(const mpl::int_<24>&)
-{
- return 2.8F;
-}
-inline float erf_asymptotic_limit_N(const mpl::int_<53>&)
-{
- return 4.3F;
-}
-inline float erf_asymptotic_limit_N(const mpl::int_<64>&)
-{
- return 4.8F;
-}
-inline float erf_asymptotic_limit_N(const mpl::int_<106>&)
-{
- return 6.5F;
-}
-inline float erf_asymptotic_limit_N(const mpl::int_<113>&)
-{
- return 6.8F;
-}
-
-template <class T, class Policy>
-inline T erf_asymptotic_limit()
-{
- typedef typename policies::precision<T, Policy>::type precision_type;
- typedef typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<24> >,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<0> >,
- mpl::int_<0>,
- mpl::int_<24>
- >::type,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<53> >,
- mpl::int_<53>,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<64> >,
- mpl::int_<64>,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<106> >,
- mpl::int_<106>,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<113> >,
- mpl::int_<113>,
- mpl::int_<0>
- >::type
- >::type
- >::type
- >::type
- >::type tag_type;
- return erf_asymptotic_limit_N(tag_type());
-}
-
-template <class T, class Policy, class Tag>
-T erf_imp(T z, bool invert, const Policy& pol, const Tag& t)
-{
- BOOST_MATH_STD_USING
-
- BOOST_MATH_INSTRUMENT_CODE("Generic erf_imp called");
-
- if(z < 0)
- {
- if(!invert)
- return -erf_imp(T(-z), invert, pol, t);
- else
- return 1 + erf_imp(T(-z), false, pol, t);
- }
-
- T result;
-
- if(!invert && (z > detail::erf_asymptotic_limit<T, Policy>()))
- {
- detail::erf_asympt_series_t<T> s(z);
- boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
- result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, 1);
- policies::check_series_iterations<T>("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol);
- }
- else
- {
- T x = z * z;
- if(x < 0.6)
- {
- // Compute P:
- result = z * exp(-x);
- result /= sqrt(boost::math::constants::pi<T>());
- if(result != 0)
- result *= 2 * detail::lower_gamma_series(T(0.5f), x, pol);
- }
- else if(x < 1.1f)
- {
- // Compute Q:
- invert = !invert;
- result = tgamma_small_upper_part(T(0.5f), x, pol);
- result /= sqrt(boost::math::constants::pi<T>());
- }
- else if(x > 1 / tools::epsilon<T>())
- {
- // http://functions.wolfram.com/06.27.06.0006.02
- invert = !invert;
- result = exp(-x) / (constants::root_pi<T>() * z);
- }
- else
- {
- // Compute Q:
- invert = !invert;
- result = z * exp(-x);
- result /= boost::math::constants::root_pi<T>();
- result *= upper_gamma_fraction(T(0.5f), x, policies::get_epsilon<T, Policy>());
- }
- }
- if(invert)
- result = 1 - result;
- return result;
-}
-
-template <class T, class Policy>
-T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<53>& t)
-{
- BOOST_MATH_STD_USING
-
- BOOST_MATH_INSTRUMENT_CODE("53-bit precision erf_imp called");
-
- if(z < 0)
- {
- if(!invert)
- return -erf_imp(T(-z), invert, pol, t);
- else if(z < -0.5)
- return 2 - erf_imp(T(-z), invert, pol, t);
- else
- return 1 + erf_imp(T(-z), false, pol, t);
- }
-
- T result;
-
- //
- // Big bunch of selection statements now to pick
- // which implementation to use,
- // try to put most likely options first:
- //
- if(z < 0.5)
- {
- //
- // We're going to calculate erf:
- //
- if(z < 1e-10)
- {
- if(z == 0)
- {
- result = T(0);
- }
- else
- {
- static const T c = BOOST_MATH_BIG_CONSTANT(T, 53, 0.003379167095512573896158903121545171688);
- result = static_cast<T>(z * 1.125f + z * c);
- }
- }
- else
- {
- // Maximum Deviation Found: 1.561e-17
- // Expected Error Term: 1.561e-17
- // Maximum Relative Change in Control Points: 1.155e-04
- // Max Error found at double precision = 2.961182e-17
-
- static const T Y = 1.044948577880859375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0834305892146531832907),
- BOOST_MATH_BIG_CONSTANT(T, 53, -0.338165134459360935041),
- BOOST_MATH_BIG_CONSTANT(T, 53, -0.0509990735146777432841),
- BOOST_MATH_BIG_CONSTANT(T, 53, -0.00772758345802133288487),
- BOOST_MATH_BIG_CONSTANT(T, 53, -0.000322780120964605683831),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.455004033050794024546),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0875222600142252549554),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.00858571925074406212772),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.000370900071787748000569),
- };
- T zz = z * z;
- result = z * (Y + tools::evaluate_polynomial(P, zz) / tools::evaluate_polynomial(Q, zz));
- }
- }
- else if(invert ? (z < 28) : (z < 5.8f))
- {
- //
- // We'll be calculating erfc:
- //
- invert = !invert;
- if(z < 1.5f)
- {
- // Maximum Deviation Found: 3.702e-17
- // Expected Error Term: 3.702e-17
- // Maximum Relative Change in Control Points: 2.845e-04
- // Max Error found at double precision = 4.841816e-17
- static const T Y = 0.405935764312744140625f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, -0.098090592216281240205),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.178114665841120341155),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.191003695796775433986),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0888900368967884466578),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0195049001251218801359),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.00180424538297014223957),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.84759070983002217845),
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.42628004845511324508),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.578052804889902404909),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.12385097467900864233),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0113385233577001411017),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.337511472483094676155e-5),
- };
- BOOST_MATH_INSTRUMENT_VARIABLE(Y);
- BOOST_MATH_INSTRUMENT_VARIABLE(P[0]);
- BOOST_MATH_INSTRUMENT_VARIABLE(Q[0]);
- BOOST_MATH_INSTRUMENT_VARIABLE(z);
- result = Y + tools::evaluate_polynomial(P, T(z - 0.5)) / tools::evaluate_polynomial(Q, T(z - 0.5));
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- result *= exp(-z * z) / z;
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
- }
- else if(z < 2.5f)
- {
- // Max Error found at double precision = 6.599585e-18
- // Maximum Deviation Found: 3.909e-18
- // Expected Error Term: 3.909e-18
- // Maximum Relative Change in Control Points: 9.886e-05
- static const T Y = 0.50672817230224609375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, -0.0243500476207698441272),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0386540375035707201728),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.04394818964209516296),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0175679436311802092299),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.00323962406290842133584),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.000235839115596880717416),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.53991494948552447182),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.982403709157920235114),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.325732924782444448493),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0563921837420478160373),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.00410369723978904575884),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 1.5)) / tools::evaluate_polynomial(Q, T(z - 1.5));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 26));
- hi = ldexp(hi, expon - 26);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 4.5f)
- {
- // Maximum Deviation Found: 1.512e-17
- // Expected Error Term: 1.512e-17
- // Maximum Relative Change in Control Points: 2.222e-04
- // Max Error found at double precision = 2.062515e-17
- static const T Y = 0.5405750274658203125f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.00295276716530971662634),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0137384425896355332126),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.00840807615555585383007),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.00212825620914618649141),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.000250269961544794627958),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.113212406648847561139e-4),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.04217814166938418171),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.442597659481563127003),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0958492726301061423444),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0105982906484876531489),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.000479411269521714493907),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 3.5)) / tools::evaluate_polynomial(Q, T(z - 3.5));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 26));
- hi = ldexp(hi, expon - 26);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else
- {
- // Max Error found at double precision = 2.997958e-17
- // Maximum Deviation Found: 2.860e-17
- // Expected Error Term: 2.859e-17
- // Maximum Relative Change in Control Points: 1.357e-05
- static const T Y = 0.5579090118408203125f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.00628057170626964891937),
- BOOST_MATH_BIG_CONSTANT(T, 53, 0.0175389834052493308818),
- BOOST_MATH_BIG_CONSTANT(T, 53, -0.212652252872804219852),
- BOOST_MATH_BIG_CONSTANT(T, 53, -0.687717681153649930619),
- BOOST_MATH_BIG_CONSTANT(T, 53, -2.5518551727311523996),
- BOOST_MATH_BIG_CONSTANT(T, 53, -3.22729451764143718517),
- BOOST_MATH_BIG_CONSTANT(T, 53, -2.8175401114513378771),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 53, 2.79257750980575282228),
- BOOST_MATH_BIG_CONSTANT(T, 53, 11.0567237927800161565),
- BOOST_MATH_BIG_CONSTANT(T, 53, 15.930646027911794143),
- BOOST_MATH_BIG_CONSTANT(T, 53, 22.9367376522880577224),
- BOOST_MATH_BIG_CONSTANT(T, 53, 13.5064170191802889145),
- BOOST_MATH_BIG_CONSTANT(T, 53, 5.48409182238641741584),
- };
- result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 26));
- hi = ldexp(hi, expon - 26);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- }
- else
- {
- //
- // Any value of z larger than 28 will underflow to zero:
- //
- result = 0;
- invert = !invert;
- }
-
- if(invert)
- {
- result = 1 - result;
- }
-
- return result;
-} // template <class T, class Lanczos>T erf_imp(T z, bool invert, const Lanczos& l, const mpl::int_<53>& t)
-
-
-template <class T, class Policy>
-T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<64>& t)
-{
- BOOST_MATH_STD_USING
-
- BOOST_MATH_INSTRUMENT_CODE("64-bit precision erf_imp called");
-
- if(z < 0)
- {
- if(!invert)
- return -erf_imp(T(-z), invert, pol, t);
- else if(z < -0.5)
- return 2 - erf_imp(T(-z), invert, pol, t);
- else
- return 1 + erf_imp(T(-z), false, pol, t);
- }
-
- T result;
-
- //
- // Big bunch of selection statements now to pick which
- // implementation to use, try to put most likely options
- // first:
- //
- if(z < 0.5)
- {
- //
- // We're going to calculate erf:
- //
- if(z == 0)
- {
- result = 0;
- }
- else if(z < 1e-10)
- {
- static const T c = BOOST_MATH_BIG_CONSTANT(T, 64, 0.003379167095512573896158903121545171688);
- result = z * 1.125 + z * c;
- }
- else
- {
- // Max Error found at long double precision = 1.623299e-20
- // Maximum Deviation Found: 4.326e-22
- // Expected Error Term: -4.326e-22
- // Maximum Relative Change in Control Points: 1.474e-04
- static const T Y = 1.044948577880859375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0834305892146531988966),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.338097283075565413695),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0509602734406067204596),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.00904906346158537794396),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.000489468651464798669181),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.200305626366151877759e-4),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.455817300515875172439),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0916537354356241792007),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0102722652675910031202),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000650511752687851548735),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.189532519105655496778e-4),
- };
- result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z)));
- }
- }
- else if(invert ? (z < 110) : (z < 6.4f))
- {
- //
- // We'll be calculating erfc:
- //
- invert = !invert;
- if(z < 1.5)
- {
- // Max Error found at long double precision = 3.239590e-20
- // Maximum Deviation Found: 2.241e-20
- // Expected Error Term: -2.241e-20
- // Maximum Relative Change in Control Points: 5.110e-03
- static const T Y = 0.405935764312744140625f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.0980905922162812031672),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.159989089922969141329),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.222359821619935712378),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.127303921703577362312),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0384057530342762400273),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00628431160851156719325),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000441266654514391746428),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.266689068336295642561e-7),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 2.03237474985469469291),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.78355454954969405222),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.867940326293760578231),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.248025606990021698392),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0396649631833002269861),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00279220237309449026796),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 32));
- hi = ldexp(hi, expon - 32);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 2.5)
- {
- // Max Error found at long double precision = 3.686211e-21
- // Maximum Deviation Found: 1.495e-21
- // Expected Error Term: -1.494e-21
- // Maximum Relative Change in Control Points: 1.793e-04
- static const T Y = 0.50672817230224609375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.024350047620769840217),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0343522687935671451309),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0505420824305544949541),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0257479325917757388209),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00669349844190354356118),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00090807914416099524444),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.515917266698050027934e-4),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.71657861671930336344),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.26409634824280366218),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.512371437838969015941),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.120902623051120950935),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0158027197831887485261),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.000897871370778031611439),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 32));
- hi = ldexp(hi, expon - 32);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 4.5)
- {
- // Maximum Deviation Found: 1.107e-20
- // Expected Error Term: -1.106e-20
- // Maximum Relative Change in Control Points: 1.709e-04
- // Max Error found at long double precision = 1.446908e-20
- static const T Y = 0.5405750274658203125f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0029527671653097284033),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0141853245895495604051),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0104959584626432293901),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00343963795976100077626),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00059065441194877637899),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.523435380636174008685e-4),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.189896043050331257262e-5),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.19352160185285642574),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.603256964363454392857),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.165411142458540585835),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0259729870946203166468),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00221657568292893699158),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.804149464190309799804e-4),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 3.5f)) / tools::evaluate_polynomial(Q, T(z - 3.5f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 32));
- hi = ldexp(hi, expon - 32);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else
- {
- // Max Error found at long double precision = 7.961166e-21
- // Maximum Deviation Found: 6.677e-21
- // Expected Error Term: 6.676e-21
- // Maximum Relative Change in Control Points: 2.319e-05
- static const T Y = 0.55825519561767578125f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.00593438793008050214106),
- BOOST_MATH_BIG_CONSTANT(T, 64, 0.0280666231009089713937),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.141597835204583050043),
- BOOST_MATH_BIG_CONSTANT(T, 64, -0.978088201154300548842),
- BOOST_MATH_BIG_CONSTANT(T, 64, -5.47351527796012049443),
- BOOST_MATH_BIG_CONSTANT(T, 64, -13.8677304660245326627),
- BOOST_MATH_BIG_CONSTANT(T, 64, -27.1274948720539821722),
- BOOST_MATH_BIG_CONSTANT(T, 64, -29.2545152747009461519),
- BOOST_MATH_BIG_CONSTANT(T, 64, -16.8865774499799676937),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 64, 4.72948911186645394541),
- BOOST_MATH_BIG_CONSTANT(T, 64, 23.6750543147695749212),
- BOOST_MATH_BIG_CONSTANT(T, 64, 60.0021517335693186785),
- BOOST_MATH_BIG_CONSTANT(T, 64, 131.766251645149522868),
- BOOST_MATH_BIG_CONSTANT(T, 64, 178.167924971283482513),
- BOOST_MATH_BIG_CONSTANT(T, 64, 182.499390505915222699),
- BOOST_MATH_BIG_CONSTANT(T, 64, 104.365251479578577989),
- BOOST_MATH_BIG_CONSTANT(T, 64, 30.8365511891224291717),
- };
- result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 32));
- hi = ldexp(hi, expon - 32);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- }
- else
- {
- //
- // Any value of z larger than 110 will underflow to zero:
- //
- result = 0;
- invert = !invert;
- }
-
- if(invert)
- {
- result = 1 - result;
- }
-
- return result;
-} // template <class T, class Lanczos>T erf_imp(T z, bool invert, const Lanczos& l, const mpl::int_<64>& t)
-
-
-template <class T, class Policy>
-T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<113>& t)
-{
- BOOST_MATH_STD_USING
-
- BOOST_MATH_INSTRUMENT_CODE("113-bit precision erf_imp called");
-
- if(z < 0)
- {
- if(!invert)
- return -erf_imp(T(-z), invert, pol, t);
- else if(z < -0.5)
- return 2 - erf_imp(T(-z), invert, pol, t);
- else
- return 1 + erf_imp(T(-z), false, pol, t);
- }
-
- T result;
-
- //
- // Big bunch of selection statements now to pick which
- // implementation to use, try to put most likely options
- // first:
- //
- if(z < 0.5)
- {
- //
- // We're going to calculate erf:
- //
- if(z == 0)
- {
- result = 0;
- }
- else if(z < 1e-20)
- {
- static const T c = BOOST_MATH_BIG_CONSTANT(T, 113, 0.003379167095512573896158903121545171688);
- result = z * 1.125 + z * c;
- }
- else
- {
- // Max Error found at long double precision = 2.342380e-35
- // Maximum Deviation Found: 6.124e-36
- // Expected Error Term: -6.124e-36
- // Maximum Relative Change in Control Points: 3.492e-10
- static const T Y = 1.0841522216796875f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0442269454158250738961589031215451778),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.35549265736002144875335323556961233),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0582179564566667896225454670863270393),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0112694696904802304229950538453123925),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.000805730648981801146251825329609079099),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.566304966591936566229702842075966273e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.169655010425186987820201021510002265e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.344448249920445916714548295433198544e-7),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.466542092785657604666906909196052522),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.100005087012526447295176964142107611),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0128341535890117646540050072234142603),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00107150448466867929159660677016658186),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.586168368028999183607733369248338474e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.196230608502104324965623171516808796e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.313388521582925207734229967907890146e-7),
- };
- result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z)));
- }
- }
- else if(invert ? (z < 110) : (z < 8.65f))
- {
- //
- // We'll be calculating erfc:
- //
- invert = !invert;
- if(z < 1)
- {
- // Max Error found at long double precision = 3.246278e-35
- // Maximum Deviation Found: 1.388e-35
- // Expected Error Term: 1.387e-35
- // Maximum Relative Change in Control Points: 6.127e-05
- static const T Y = 0.371877193450927734375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0640320213544647969396032886581290455),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.200769874440155895637857443946706731),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.378447199873537170666487408805779826),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.30521399466465939450398642044975127),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.146890026406815277906781824723458196),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0464837937749539978247589252732769567),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00987895759019540115099100165904822903),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00137507575429025512038051025154301132),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0001144764551085935580772512359680516),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.436544865032836914773944382339900079e-5),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.47651182872457465043733800302427977),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.78706486002517996428836400245547955),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.87295924621659627926365005293130693),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.829375825174365625428280908787261065),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.251334771307848291593780143950311514),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0522110268876176186719436765734722473),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00718332151250963182233267040106902368),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000595279058621482041084986219276392459),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.226988669466501655990637599399326874e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.270666232259029102353426738909226413e-10),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 1.5)
- {
- // Max Error found at long double precision = 2.215785e-35
- // Maximum Deviation Found: 1.539e-35
- // Expected Error Term: 1.538e-35
- // Maximum Relative Change in Control Points: 6.104e-05
- static const T Y = 0.45658016204833984375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0289965858925328393392496555094848345),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0868181194868601184627743162571779226),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.169373435121178901746317404936356745),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.13350446515949251201104889028133486),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0617447837290183627136837688446313313),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0185618495228251406703152962489700468),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00371949406491883508764162050169531013),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000485121708792921297742105775823900772),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.376494706741453489892108068231400061e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.133166058052466262415271732172490045e-5),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.32970330146503867261275580968135126),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.46325715420422771961250513514928746),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.55307882560757679068505047390857842),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.644274289865972449441174485441409076),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.182609091063258208068606847453955649),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0354171651271241474946129665801606795),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00454060370165285246451879969534083997),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000349871943711566546821198612518656486),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.123749319840299552925421880481085392e-4),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 1.0f)) / tools::evaluate_polynomial(Q, T(z - 1.0f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 2.25)
- {
- // Maximum Deviation Found: 1.418e-35
- // Expected Error Term: 1.418e-35
- // Maximum Relative Change in Control Points: 1.316e-04
- // Max Error found at long double precision = 1.998462e-35
- static const T Y = 0.50250148773193359375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0201233630504573402185161184151016606),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0331864357574860196516686996302305002),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0716562720864787193337475444413405461),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0545835322082103985114927569724880658),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0236692635189696678976549720784989593),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00656970902163248872837262539337601845),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00120282643299089441390490459256235021),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000142123229065182650020762792081622986),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.991531438367015135346716277792989347e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.312857043762117596999398067153076051e-6),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.13506082409097783827103424943508554),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2.06399257267556230937723190496806215),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.18678481279932541314830499880691109),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.447733186643051752513538142316799562),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.11505680005657879437196953047542148),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.020163993632192726170219663831914034),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00232708971840141388847728782209730585),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000160733201627963528519726484608224112),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.507158721790721802724402992033269266e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.18647774409821470950544212696270639e-12),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if (z < 3)
- {
- // Maximum Deviation Found: 3.575e-36
- // Expected Error Term: 3.575e-36
- // Maximum Relative Change in Control Points: 7.103e-05
- // Max Error found at long double precision = 5.794737e-36
- static const T Y = 0.52896785736083984375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.00902152521745813634562524098263360074),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0145207142776691539346923710537580927),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0301681239582193983824211995978678571),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0215548540823305814379020678660434461),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00864683476267958365678294164340749949),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00219693096885585491739823283511049902),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000364961639163319762492184502159894371),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.388174251026723752769264051548703059e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.241918026931789436000532513553594321e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.676586625472423508158937481943649258e-7),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.93669171363907292305550231764920001),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.69468476144051356810672506101377494),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.880023580986436640372794392579985511),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.299099106711315090710836273697708402),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0690593962363545715997445583603382337),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0108427016361318921960863149875360222),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00111747247208044534520499324234317695),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.686843205749767250666787987163701209e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.192093541425429248675532015101904262e-5),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 2.25f)) / tools::evaluate_polynomial(Q, T(z - 2.25f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 3.5)
- {
- // Maximum Deviation Found: 8.126e-37
- // Expected Error Term: -8.126e-37
- // Maximum Relative Change in Control Points: 1.363e-04
- // Max Error found at long double precision = 1.747062e-36
- static const T Y = 0.54037380218505859375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.0033703486408887424921155540591370375),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0104948043110005245215286678898115811),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0148530118504000311502310457390417795),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00816693029245443090102738825536188916),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00249716579989140882491939681805594585),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0004655591010047353023978045800916647),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.531129557920045295895085236636025323e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.343526765122727069515775194111741049e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.971120407556888763695313774578711839e-7),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.59911256167540354915906501335919317),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.136006830764025173864831382946934),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.468565867990030871678574840738423023),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.122821824954470343413956476900662236),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0209670914950115943338996513330141633),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00227845718243186165620199012883547257),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000144243326443913171313947613547085553),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.407763415954267700941230249989140046e-5),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 3.0f)) / tools::evaluate_polynomial(Q, T(z - 3.0f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 5.5)
- {
- // Maximum Deviation Found: 5.804e-36
- // Expected Error Term: -5.803e-36
- // Maximum Relative Change in Control Points: 2.475e-05
- // Max Error found at long double precision = 1.349545e-35
- static const T Y = 0.55000019073486328125f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00118142849742309772151454518093813615),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0072201822885703318172366893469382745),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0078782276276860110721875733778481505),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00418229166204362376187593976656261146),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00134198400587769200074194304298642705),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000283210387078004063264777611497435572),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.405687064094911866569295610914844928e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.39348283801568113807887364414008292e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.248798540917787001526976889284624449e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.929502490223452372919607105387474751e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.156161469668275442569286723236274457e-9),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.52955245103668419479878456656709381),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.06263944820093830054635017117417064),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.441684612681607364321013134378316463),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.121665258426166960049773715928906382),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0232134512374747691424978642874321434),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00310778180686296328582860464875562636),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000288361770756174705123674838640161693),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.177529187194133944622193191942300132e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.655068544833064069223029299070876623e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.11005507545746069573608988651927452e-7),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 4.5f)) / tools::evaluate_polynomial(Q, T(z - 4.5f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 7.5)
- {
- // Maximum Deviation Found: 1.007e-36
- // Expected Error Term: 1.007e-36
- // Maximum Relative Change in Control Points: 1.027e-03
- // Max Error found at long double precision = 2.646420e-36
- static const T Y = 0.5574436187744140625f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000293236907400849056269309713064107674),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00225110719535060642692275221961480162),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00190984458121502831421717207849429799),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000747757733460111743833929141001680706),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000170663175280949889583158597373928096),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.246441188958013822253071608197514058e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.229818000860544644974205957895688106e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.134886977703388748488480980637704864e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.454764611880548962757125070106650958e-8),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.673002744115866600294723141176820155e-10),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.12843690320861239631195353379313367),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.569900657061622955362493442186537259),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.169094404206844928112348730277514273),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0324887449084220415058158657252147063),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00419252877436825753042680842608219552),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00036344133176118603523976748563178578),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.204123895931375107397698245752850347e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.674128352521481412232785122943508729e-6),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.997637501418963696542159244436245077e-8),
- };
- result = Y + tools::evaluate_polynomial(P, T(z - 6.5f)) / tools::evaluate_polynomial(Q, T(z - 6.5f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else if(z < 11.5)
- {
- // Maximum Deviation Found: 8.380e-36
- // Expected Error Term: 8.380e-36
- // Maximum Relative Change in Control Points: 2.632e-06
- // Max Error found at long double precision = 9.849522e-36
- static const T Y = 0.56083202362060546875f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000282420728751494363613829834891390121),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00175387065018002823433704079355125161),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0021344978564889819420775336322920375),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00124151356560137532655039683963075661),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000423600733566948018555157026862139644),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.914030340865175237133613697319509698e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.126999927156823363353809747017945494e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.110610959842869849776179749369376402e-5),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.55075079477173482096725348704634529e-7),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.119735694018906705225870691331543806e-8),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.69889613396167354566098060039549882),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.28824647372749624464956031163282674),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.572297795434934493541628008224078717),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.164157697425571712377043857240773164),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.0315311145224594430281219516531649562),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00405588922155632380812945849777127458),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000336929033691445666232029762868642417),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.164033049810404773469413526427932109e-4),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.356615210500531410114914617294694857e-6),
- };
- result = Y + tools::evaluate_polynomial(P, T(z / 2 - 4.75f)) / tools::evaluate_polynomial(Q, T(z / 2 - 4.75f));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- else
- {
- // Maximum Deviation Found: 1.132e-35
- // Expected Error Term: -1.132e-35
- // Maximum Relative Change in Control Points: 4.674e-04
- // Max Error found at long double precision = 1.162590e-35
- static const T Y = 0.5632686614990234375f;
- static const T P[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.000920922048732849448079451574171836943),
- BOOST_MATH_BIG_CONSTANT(T, 113, 0.00321439044532288750501700028748922439),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.250455263029390118657884864261823431),
- BOOST_MATH_BIG_CONSTANT(T, 113, -0.906807635364090342031792404764598142),
- BOOST_MATH_BIG_CONSTANT(T, 113, -8.92233572835991735876688745989985565),
- BOOST_MATH_BIG_CONSTANT(T, 113, -21.7797433494422564811782116907878495),
- BOOST_MATH_BIG_CONSTANT(T, 113, -91.1451915251976354349734589601171659),
- BOOST_MATH_BIG_CONSTANT(T, 113, -144.1279109655993927069052125017673),
- BOOST_MATH_BIG_CONSTANT(T, 113, -313.845076581796338665519022313775589),
- BOOST_MATH_BIG_CONSTANT(T, 113, -273.11378811923343424081101235736475),
- BOOST_MATH_BIG_CONSTANT(T, 113, -271.651566205951067025696102600443452),
- BOOST_MATH_BIG_CONSTANT(T, 113, -60.0530577077238079968843307523245547),
- };
- static const T Q[] = {
- BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
- BOOST_MATH_BIG_CONSTANT(T, 113, 3.49040448075464744191022350947892036),
- BOOST_MATH_BIG_CONSTANT(T, 113, 34.3563592467165971295915749548313227),
- BOOST_MATH_BIG_CONSTANT(T, 113, 84.4993232033879023178285731843850461),
- BOOST_MATH_BIG_CONSTANT(T, 113, 376.005865281206894120659401340373818),
- BOOST_MATH_BIG_CONSTANT(T, 113, 629.95369438888946233003926191755125),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1568.35771983533158591604513304269098),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1646.02452040831961063640827116581021),
- BOOST_MATH_BIG_CONSTANT(T, 113, 2299.96860633240298708910425594484895),
- BOOST_MATH_BIG_CONSTANT(T, 113, 1222.73204392037452750381340219906374),
- BOOST_MATH_BIG_CONSTANT(T, 113, 799.359797306084372350264298361110448),
- BOOST_MATH_BIG_CONSTANT(T, 113, 72.7415265778588087243442792401576737),
- };
- result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
- T hi, lo;
- int expon;
- hi = floor(ldexp(frexp(z, &expon), 56));
- hi = ldexp(hi, expon - 56);
- lo = z - hi;
- T sq = z * z;
- T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
- result *= exp(-sq) * exp(-err_sqr) / z;
- }
- }
- else
- {
- //
- // Any value of z larger than 110 will underflow to zero:
- //
- result = 0;
- invert = !invert;
- }
-
- if(invert)
- {
- result = 1 - result;
- }
-
- return result;
-} // template <class T, class Lanczos>T erf_imp(T z, bool invert, const Lanczos& l, const mpl::int_<113>& t)
-
-template <class T, class Policy, class tag>
-struct erf_initializer
-{
- struct init
- {
- init()
- {
- do_init(tag());
- }
- static void do_init(const mpl::int_<0>&){}
- static void do_init(const mpl::int_<53>&)
- {
- boost::math::erf(static_cast<T>(1e-12), Policy());
- boost::math::erf(static_cast<T>(0.25), Policy());
- boost::math::erf(static_cast<T>(1.25), Policy());
- boost::math::erf(static_cast<T>(2.25), Policy());
- boost::math::erf(static_cast<T>(4.25), Policy());
- boost::math::erf(static_cast<T>(5.25), Policy());
- }
- static void do_init(const mpl::int_<64>&)
- {
- boost::math::erf(static_cast<T>(1e-12), Policy());
- boost::math::erf(static_cast<T>(0.25), Policy());
- boost::math::erf(static_cast<T>(1.25), Policy());
- boost::math::erf(static_cast<T>(2.25), Policy());
- boost::math::erf(static_cast<T>(4.25), Policy());
- boost::math::erf(static_cast<T>(5.25), Policy());
- }
- static void do_init(const mpl::int_<113>&)
- {
- boost::math::erf(static_cast<T>(1e-22), Policy());
- boost::math::erf(static_cast<T>(0.25), Policy());
- boost::math::erf(static_cast<T>(1.25), Policy());
- boost::math::erf(static_cast<T>(2.125), Policy());
- boost::math::erf(static_cast<T>(2.75), Policy());
- boost::math::erf(static_cast<T>(3.25), Policy());
- boost::math::erf(static_cast<T>(5.25), Policy());
- boost::math::erf(static_cast<T>(7.25), Policy());
- boost::math::erf(static_cast<T>(11.25), Policy());
- boost::math::erf(static_cast<T>(12.5), Policy());
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T, class Policy, class tag>
-const typename erf_initializer<T, Policy, tag>::init erf_initializer<T, Policy, tag>::initializer;
-
-} // namespace detail
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type erf(T z, const Policy& /* pol */)
-{
- typedef typename tools::promote_args<T>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- typedef typename policies::precision<result_type, Policy>::type precision_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- BOOST_MATH_INSTRUMENT_CODE("result_type = " << typeid(result_type).name());
- BOOST_MATH_INSTRUMENT_CODE("value_type = " << typeid(value_type).name());
- BOOST_MATH_INSTRUMENT_CODE("precision_type = " << typeid(precision_type).name());
-
- typedef typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<0> >,
- mpl::int_<0>,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<53> >,
- mpl::int_<53>, // double
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<64> >,
- mpl::int_<64>, // 80-bit long double
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<113> >,
- mpl::int_<113>, // 128-bit long double
- mpl::int_<0> // too many bits, use generic version.
- >::type
- >::type
- >::type
- >::type tag_type;
-
- BOOST_MATH_INSTRUMENT_CODE("tag_type = " << typeid(tag_type).name());
-
- detail::erf_initializer<value_type, forwarding_policy, tag_type>::force_instantiate(); // Force constants to be initialized before main
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
- static_cast<value_type>(z),
- false,
- forwarding_policy(),
- tag_type()), "boost::math::erf<%1%>(%1%, %1%)");
-}
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type erfc(T z, const Policy& /* pol */)
-{
- typedef typename tools::promote_args<T>::type result_type;
- typedef typename policies::evaluation<result_type, Policy>::type value_type;
- typedef typename policies::precision<result_type, Policy>::type precision_type;
- typedef typename policies::normalise<
- Policy,
- policies::promote_float<false>,
- policies::promote_double<false>,
- policies::discrete_quantile<>,
- policies::assert_undefined<> >::type forwarding_policy;
-
- BOOST_MATH_INSTRUMENT_CODE("result_type = " << typeid(result_type).name());
- BOOST_MATH_INSTRUMENT_CODE("value_type = " << typeid(value_type).name());
- BOOST_MATH_INSTRUMENT_CODE("precision_type = " << typeid(precision_type).name());
-
- typedef typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<0> >,
- mpl::int_<0>,
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<53> >,
- mpl::int_<53>, // double
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<64> >,
- mpl::int_<64>, // 80-bit long double
- typename mpl::if_<
- mpl::less_equal<precision_type, mpl::int_<113> >,
- mpl::int_<113>, // 128-bit long double
- mpl::int_<0> // too many bits, use generic version.
- >::type
- >::type
- >::type
- >::type tag_type;
-
- BOOST_MATH_INSTRUMENT_CODE("tag_type = " << typeid(tag_type).name());
-
- detail::erf_initializer<value_type, forwarding_policy, tag_type>::force_instantiate(); // Force constants to be initialized before main
-
- return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
- static_cast<value_type>(z),
- true,
- forwarding_policy(),
- tag_type()), "boost::math::erfc<%1%>(%1%, %1%)");
-}
-
-template <class T>
-inline typename tools::promote_args<T>::type erf(T z)
-{
- return boost::math::erf(z, policies::policy<>());
-}
-
-template <class T>
-inline typename tools::promote_args<T>::type erfc(T z)
-{
- return boost::math::erfc(z, policies::policy<>());
-}
-
-} // namespace math
-} // namespace boost
-
-#include <boost/math/special_functions/detail/erf_inv.hpp>
-
-#endif // BOOST_MATH_SPECIAL_ERF_HPP
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/math_fwd.hpp b/src/third_party/boost-1.68.0/boost/math/special_functions/math_fwd.hpp
deleted file mode 100644
index 4f44f561136..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/math_fwd.hpp
+++ /dev/null
@@ -1,1651 +0,0 @@
-// math_fwd.hpp
-
-// TODO revise completely for new distribution classes.
-
-// Copyright Paul A. Bristow 2006.
-// Copyright John Maddock 2006.
-
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt
-// or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// Omnibus list of forward declarations of math special functions.
-
-// IT = Integer type.
-// RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types
-// AT = Integer or Real type
-
-#ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP
-#define BOOST_MATH_SPECIAL_MATH_FWD_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <vector>
-#include <boost/math/special_functions/detail/round_fwd.hpp>
-#include <boost/math/tools/promotion.hpp> // for argument promotion.
-#include <boost/math/policies/policy.hpp>
-#include <boost/mpl/comparison.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/config/no_tr1/complex.hpp>
-
-#define BOOST_NO_MACRO_EXPAND /**/
-
-namespace boost
-{
- namespace math
- { // Math functions (in roughly alphabetic order).
-
- // Beta functions.
- template <class RT1, class RT2>
- typename tools::promote_args<RT1, RT2>::type
- beta(RT1 a, RT2 b); // Beta function (2 arguments).
-
- template <class RT1, class RT2, class A>
- typename tools::promote_args<RT1, RT2, A>::type
- beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- betac(RT1 a, RT2 b, RT3 x);
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
-
- template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
- ibeta_inv(T1 a, T2 b, T3 p, T4* py);
-
- template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
- ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
-
- template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
- ibetac_inv(T1 a, T2 b, T3 q, T4* py);
-
- template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
- ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
-
- template <class RT1, class RT2, class RT3>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta_derivative(RT1 a, RT2 b, RT3 x); // derivative of incomplete beta
-
- template <class RT1, class RT2, class RT3, class Policy>
- typename tools::promote_args<RT1, RT2, RT3>::type
- ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); // derivative of incomplete beta
-
- // Binomial:
- template <class T, class Policy>
- T binomial_coefficient(unsigned n, unsigned k, const Policy& pol);
- template <class T>
- T binomial_coefficient(unsigned n, unsigned k);
-
- // erf & erfc error functions.
- template <class RT> // Error function.
- typename tools::promote_args<RT>::type erf(RT z);
- template <class RT, class Policy> // Error function.
- typename tools::promote_args<RT>::type erf(RT z, const Policy&);
-
- template <class RT>// Error function complement.
- typename tools::promote_args<RT>::type erfc(RT z);
- template <class RT, class Policy>// Error function complement.
- typename tools::promote_args<RT>::type erfc(RT z, const Policy&);
-
- template <class RT>// Error function inverse.
- typename tools::promote_args<RT>::type erf_inv(RT z);
- template <class RT, class Policy>// Error function inverse.
- typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol);
-
- template <class RT>// Error function complement inverse.
- typename tools::promote_args<RT>::type erfc_inv(RT z);
- template <class RT, class Policy>// Error function complement inverse.
- typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
-
- // Polynomials:
- template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
- legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
-
- template <class T>
- typename tools::promote_args<T>::type
- legendre_p(int l, T x);
- template <class T>
- typename tools::promote_args<T>::type
- legendre_p_prime(int l, T x);
-
-
- template <class T, class Policy>
- inline std::vector<T> legendre_p_zeros(int l, const Policy& pol);
-
- template <class T>
- inline std::vector<T> legendre_p_zeros(int l);
-
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
- template <class T, class Policy>
- typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
- legendre_p(int l, T x, const Policy& pol);
- template <class T, class Policy>
- inline typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
- legendre_p_prime(int l, T x, const Policy& pol);
-#endif
- template <class T>
- typename tools::promote_args<T>::type
- legendre_q(unsigned l, T x);
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
- template <class T, class Policy>
- typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
- legendre_q(unsigned l, T x, const Policy& pol);
-#endif
- template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
- legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
-
- template <class T>
- typename tools::promote_args<T>::type
- legendre_p(int l, int m, T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type
- legendre_p(int l, int m, T x, const Policy& pol);
-
- template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
- laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
-
- template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
- laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
-
- template <class T>
- typename tools::promote_args<T>::type
- laguerre(unsigned n, T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type
- laguerre(unsigned n, unsigned m, T x, const Policy& pol);
-
- template <class T1, class T2>
- struct laguerre_result
- {
- typedef typename mpl::if_<
- policies::is_policy<T2>,
- typename tools::promote_args<T1>::type,
- typename tools::promote_args<T2>::type
- >::type type;
- };
-
- template <class T1, class T2>
- typename laguerre_result<T1, T2>::type
- laguerre(unsigned n, T1 m, T2 x);
-
- template <class T>
- typename tools::promote_args<T>::type
- hermite(unsigned n, T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type
- hermite(unsigned n, T x, const Policy& pol);
-
- template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
- hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
-
- template<class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type chebyshev_next(T1 const & x, T2 const & Tn, T3 const & Tn_1);
-
- template <class Real, class Policy>
- typename tools::promote_args<Real>::type
- chebyshev_t(unsigned n, Real const & x, const Policy&);
- template<class Real>
- typename tools::promote_args<Real>::type chebyshev_t(unsigned n, Real const & x);
-
- template <class Real, class Policy>
- typename tools::promote_args<Real>::type
- chebyshev_u(unsigned n, Real const & x, const Policy&);
- template<class Real>
- typename tools::promote_args<Real>::type chebyshev_u(unsigned n, Real const & x);
-
- template <class Real, class Policy>
- typename tools::promote_args<Real>::type
- chebyshev_t_prime(unsigned n, Real const & x, const Policy&);
- template<class Real>
- typename tools::promote_args<Real>::type chebyshev_t_prime(unsigned n, Real const & x);
-
- template<class Real, class T2>
- Real chebyshev_clenshaw_recurrence(const Real* const c, size_t length, const T2& x);
-
- template <class T1, class T2>
- std::complex<typename tools::promote_args<T1, T2>::type>
- spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
-
- template <class T1, class T2, class Policy>
- std::complex<typename tools::promote_args<T1, T2>::type>
- spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
- spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
- spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
- spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
- spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
-
- // Elliptic integrals:
- template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
- ellint_rf(T1 x, T2 y, T3 z);
-
- template <class T1, class T2, class T3, class Policy>
- typename tools::promote_args<T1, T2, T3>::type
- ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
-
- template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
- ellint_rd(T1 x, T2 y, T3 z);
-
- template <class T1, class T2, class T3, class Policy>
- typename tools::promote_args<T1, T2, T3>::type
- ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
- ellint_rc(T1 x, T2 y);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
- ellint_rc(T1 x, T2 y, const Policy& pol);
-
- template <class T1, class T2, class T3, class T4>
- typename tools::promote_args<T1, T2, T3, T4>::type
- ellint_rj(T1 x, T2 y, T3 z, T4 p);
-
- template <class T1, class T2, class T3, class T4, class Policy>
- typename tools::promote_args<T1, T2, T3, T4>::type
- ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
-
- template <class T1, class T2, class T3>
- typename tools::promote_args<T1, T2, T3>::type
- ellint_rg(T1 x, T2 y, T3 z);
-
- template <class T1, class T2, class T3, class Policy>
- typename tools::promote_args<T1, T2, T3>::type
- ellint_rg(T1 x, T2 y, T3 z, const Policy& pol);
-
- template <typename T>
- typename tools::promote_args<T>::type ellint_2(T k);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol);
-
- template <typename T>
- typename tools::promote_args<T>::type ellint_1(T k);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol);
-
- template <typename T>
- typename tools::promote_args<T>::type ellint_d(T k);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi, const Policy& pol);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi, const Policy& pol);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi, const Policy& pol);
-
- namespace detail{
-
- template <class T, class U, class V>
- struct ellint_3_result
- {
- typedef typename mpl::if_<
- policies::is_policy<V>,
- typename tools::promote_args<T, U>::type,
- typename tools::promote_args<T, U, V>::type
- >::type type;
- };
-
- } // namespace detail
-
-
- template <class T1, class T2, class T3>
- typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi);
-
- template <class T1, class T2, class T3, class Policy>
- typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v);
-
- // Factorial functions.
- // Note: not for integral types, at present.
- template <class RT>
- struct max_factorial;
- template <class RT>
- RT factorial(unsigned int);
- template <class RT, class Policy>
- RT factorial(unsigned int, const Policy& pol);
- template <class RT>
- RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT));
- template <class RT>
- RT double_factorial(unsigned i);
- template <class RT, class Policy>
- RT double_factorial(unsigned i, const Policy& pol);
-
- template <class RT>
- typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n);
-
- template <class RT, class Policy>
- typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol);
-
- template <class RT>
- typename tools::promote_args<RT>::type rising_factorial(RT x, int n);
-
- template <class RT, class Policy>
- typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
-
- // Gamma functions.
- template <class RT>
- typename tools::promote_args<RT>::type tgamma(RT z);
-
- template <class RT>
- typename tools::promote_args<RT>::type tgamma1pm1(RT z);
-
- template <class RT, class Policy>
- typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol);
-
- template <class RT1, class RT2>
- typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z);
-
- template <class RT1, class RT2, class Policy>
- typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol);
-
- template <class RT>
- typename tools::promote_args<RT>::type lgamma(RT z, int* sign);
-
- template <class RT, class Policy>
- typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol);
-
- template <class RT>
- typename tools::promote_args<RT>::type lgamma(RT x);
-
- template <class RT, class Policy>
- typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol);
-
- template <class RT1, class RT2>
- typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z);
-
- template <class RT1, class RT2, class Policy>
- typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&);
-
- template <class RT1, class RT2>
- typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z);
-
- template <class RT1, class RT2, class Policy>
- typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&);
-
- template <class RT1, class RT2>
- typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z);
-
- template <class RT1, class RT2, class Policy>
- typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&);
-
- // gamma inverse.
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&);
-
- // digamma:
- template <class T>
- typename tools::promote_args<T>::type digamma(T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type digamma(T x, const Policy&);
-
- // trigamma:
- template <class T>
- typename tools::promote_args<T>::type trigamma(T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type trigamma(T x, const Policy&);
-
- // polygamma:
- template <class T>
- typename tools::promote_args<T>::type polygamma(int n, T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type polygamma(int n, T x, const Policy&);
-
- // Hypotenuse function sqrt(x ^ 2 + y ^ 2).
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
- hypot(T1 x, T2 y);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
- hypot(T1 x, T2 y, const Policy&);
-
- // cbrt - cube root.
- template <class RT>
- typename tools::promote_args<RT>::type cbrt(RT z);
-
- template <class RT, class Policy>
- typename tools::promote_args<RT>::type cbrt(RT z, const Policy&);
-
- // log1p is log(x + 1)
- template <class T>
- typename tools::promote_args<T>::type log1p(T);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type log1p(T, const Policy&);
-
- // log1pmx is log(x + 1) - x
- template <class T>
- typename tools::promote_args<T>::type log1pmx(T);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type log1pmx(T, const Policy&);
-
- // Exp (x) minus 1 functions.
- template <class T>
- typename tools::promote_args<T>::type expm1(T);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type expm1(T, const Policy&);
-
- // Power - 1
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type
- powm1(const T1 a, const T2 z);
-
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type
- powm1(const T1 a, const T2 z, const Policy&);
-
- // sqrt(1+x) - 1
- template <class T>
- typename tools::promote_args<T>::type sqrt1pm1(const T& val);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&);
-
- // sinus cardinals:
- template <class T>
- typename tools::promote_args<T>::type sinc_pi(T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type sinc_pi(T x, const Policy&);
-
- template <class T>
- typename tools::promote_args<T>::type sinhc_pi(T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&);
-
- // inverse hyperbolics:
- template<typename T>
- typename tools::promote_args<T>::type asinh(T x);
-
- template<typename T, class Policy>
- typename tools::promote_args<T>::type asinh(T x, const Policy&);
-
- template<typename T>
- typename tools::promote_args<T>::type acosh(T x);
-
- template<typename T, class Policy>
- typename tools::promote_args<T>::type acosh(T x, const Policy&);
-
- template<typename T>
- typename tools::promote_args<T>::type atanh(T x);
-
- template<typename T, class Policy>
- typename tools::promote_args<T>::type atanh(T x, const Policy&);
-
- namespace detail{
-
- typedef mpl::int_<0> bessel_no_int_tag; // No integer optimisation possible.
- typedef mpl::int_<1> bessel_maybe_int_tag; // Maybe integer optimisation.
- typedef mpl::int_<2> bessel_int_tag; // Definite integer optimistaion.
-
- template <class T1, class T2, class Policy>
- struct bessel_traits
- {
- typedef typename mpl::if_<
- is_integral<T1>,
- typename tools::promote_args<T2>::type,
- typename tools::promote_args<T1, T2>::type
- >::type result_type;
-
- typedef typename policies::precision<result_type, Policy>::type precision_type;
-
- typedef typename mpl::if_<
- mpl::or_<
- mpl::less_equal<precision_type, mpl::int_<0> >,
- mpl::greater<precision_type, mpl::int_<64> > >,
- bessel_no_int_tag,
- typename mpl::if_<
- is_integral<T1>,
- bessel_int_tag,
- bessel_maybe_int_tag
- >::type
- >::type optimisation_tag;
- typedef typename mpl::if_<
- mpl::or_<
- mpl::less_equal<precision_type, mpl::int_<0> >,
- mpl::greater<precision_type, mpl::int_<113> > >,
- bessel_no_int_tag,
- typename mpl::if_<
- is_integral<T1>,
- bessel_int_tag,
- bessel_maybe_int_tag
- >::type
- >::type optimisation_tag128;
- };
- } // detail
-
- // Bessel functions:
- template <class T1, class T2, class Policy>
- typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
- template <class T1, class T2, class Policy>
- typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j_prime(T1 v, T2 x, const Policy& pol);
-
- template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
- template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j_prime(T1 v, T2 x);
-
- template <class T, class Policy>
- typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
- template <class T, class Policy>
- typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel_prime(unsigned v, T x, const Policy& pol);
-
- template <class T>
- typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
- template <class T>
- typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel_prime(unsigned v, T x);
-
- template <class T1, class T2, class Policy>
- typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
- template <class T1, class T2, class Policy>
- typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i_prime(T1 v, T2 x, const Policy& pol);
-
- template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
- template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i_prime(T1 v, T2 x);
-
- template <class T1, class T2, class Policy>
- typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
- template <class T1, class T2, class Policy>
- typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k_prime(T1 v, T2 x, const Policy& pol);
-
- template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
- template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k_prime(T1 v, T2 x);
-
- template <class T1, class T2, class Policy>
- typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
- template <class T1, class T2, class Policy>
- typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann_prime(T1 v, T2 x, const Policy& pol);
-
- template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
- template <class T1, class T2>
- typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann_prime(T1 v, T2 x);
-
- template <class T, class Policy>
- typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
- template <class T, class Policy>
- typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann_prime(unsigned v, T x, const Policy& pol);
-
- template <class T>
- typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
- template <class T>
- typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann_prime(unsigned v, T x);
-
- template <class T, class Policy>
- typename detail::bessel_traits<T, T, Policy>::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol);
-
- template <class T>
- typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_bessel_j_zero(T v, int m);
-
- template <class T, class OutputIterator>
- OutputIterator cyl_bessel_j_zero(T v,
- int start_index,
- unsigned number_of_zeros,
- OutputIterator out_it);
-
- template <class T, class OutputIterator, class Policy>
- OutputIterator cyl_bessel_j_zero(T v,
- int start_index,
- unsigned number_of_zeros,
- OutputIterator out_it,
- const Policy&);
-
- template <class T, class Policy>
- typename detail::bessel_traits<T, T, Policy>::result_type cyl_neumann_zero(T v, int m, const Policy& pol);
-
- template <class T>
- typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_neumann_zero(T v, int m);
-
- template <class T, class OutputIterator>
- OutputIterator cyl_neumann_zero(T v,
- int start_index,
- unsigned number_of_zeros,
- OutputIterator out_it);
-
- template <class T, class OutputIterator, class Policy>
- OutputIterator cyl_neumann_zero(T v,
- int start_index,
- unsigned number_of_zeros,
- OutputIterator out_it,
- const Policy&);
-
- template <class T1, class T2>
- std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
-
- template <class T1, class T2, class Policy>
- std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
-
- template <class T1, class T2, class Policy>
- std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol);
-
- template <class T1, class T2>
- std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x);
-
- template <class T1, class T2, class Policy>
- std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol);
-
- template <class T1, class T2>
- std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_1(T1 v, T2 x);
-
- template <class T1, class T2, class Policy>
- std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol);
-
- template <class T1, class T2>
- std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_2(T1 v, T2 x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type airy_ai(T x, const Policy&);
-
- template <class T>
- typename tools::promote_args<T>::type airy_ai(T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type airy_bi(T x, const Policy&);
-
- template <class T>
- typename tools::promote_args<T>::type airy_bi(T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type airy_ai_prime(T x, const Policy&);
-
- template <class T>
- typename tools::promote_args<T>::type airy_ai_prime(T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&);
-
- template <class T>
- typename tools::promote_args<T>::type airy_bi_prime(T x);
-
- template <class T>
- T airy_ai_zero(int m);
- template <class T, class Policy>
- T airy_ai_zero(int m, const Policy&);
-
- template <class OutputIterator>
- OutputIterator airy_ai_zero(
- int start_index,
- unsigned number_of_zeros,
- OutputIterator out_it);
- template <class OutputIterator, class Policy>
- OutputIterator airy_ai_zero(
- int start_index,
- unsigned number_of_zeros,
- OutputIterator out_it,
- const Policy&);
-
- template <class T>
- T airy_bi_zero(int m);
- template <class T, class Policy>
- T airy_bi_zero(int m, const Policy&);
-
- template <class OutputIterator>
- OutputIterator airy_bi_zero(
- int start_index,
- unsigned number_of_zeros,
- OutputIterator out_it);
- template <class OutputIterator, class Policy>
- OutputIterator airy_bi_zero(
- int start_index,
- unsigned number_of_zeros,
- OutputIterator out_it,
- const Policy&);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
-
- template <class T>
- typename tools::promote_args<T>::type sin_pi(T x);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type cos_pi(T x, const Policy&);
-
- template <class T>
- typename tools::promote_args<T>::type cos_pi(T x);
-
- template <class T>
- int fpclassify BOOST_NO_MACRO_EXPAND(T t);
-
- template <class T>
- bool isfinite BOOST_NO_MACRO_EXPAND(T z);
-
- template <class T>
- bool isinf BOOST_NO_MACRO_EXPAND(T t);
-
- template <class T>
- bool isnan BOOST_NO_MACRO_EXPAND(T t);
-
- template <class T>
- bool isnormal BOOST_NO_MACRO_EXPAND(T t);
-
- template<class T>
- int signbit BOOST_NO_MACRO_EXPAND(T x);
-
- template <class T>
- int sign BOOST_NO_MACRO_EXPAND(const T& z);
-
- template <class T, class U>
- typename tools::promote_args_permissive<T, U>::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y);
-
- template <class T>
- typename tools::promote_args_permissive<T>::type changesign BOOST_NO_MACRO_EXPAND(const T& z);
-
- // Exponential integrals:
- namespace detail{
-
- template <class T, class U>
- struct expint_result
- {
- typedef typename mpl::if_<
- policies::is_policy<U>,
- typename tools::promote_args<T>::type,
- typename tools::promote_args<U>::type
- >::type type;
- };
-
- } // namespace detail
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&);
-
- template <class T, class U>
- typename detail::expint_result<T, U>::type expint(T const z, U const u);
-
- template <class T>
- typename tools::promote_args<T>::type expint(T z);
-
- // Zeta:
- template <class T, class Policy>
- typename tools::promote_args<T>::type zeta(T s, const Policy&);
-
- // Owen's T function:
- template <class T1, class T2, class Policy>
- typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol);
-
- template <class T1, class T2>
- typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a);
-
- // Jacobi Functions:
- template <class T, class U, class V, class Policy>
- typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&);
-
- template <class T, class U, class V>
- typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0);
-
- template <class U, class T, class Policy>
- typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol);
-
- template <class U, class T>
- typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta);
-
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta, const Policy& pol);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta);
-
-
- template <class T>
- typename tools::promote_args<T>::type zeta(T s);
-
- // pow:
- template <int N, typename T, class Policy>
- typename tools::promote_args<T>::type pow(T base, const Policy& policy);
-
- template <int N, typename T>
- typename tools::promote_args<T>::type pow(T base);
-
- // next:
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type nextafter(const T&, const U&, const Policy&);
- template <class T, class U>
- typename tools::promote_args<T, U>::type nextafter(const T&, const U&);
- template <class T, class Policy>
- typename tools::promote_args<T>::type float_next(const T&, const Policy&);
- template <class T>
- typename tools::promote_args<T>::type float_next(const T&);
- template <class T, class Policy>
- typename tools::promote_args<T>::type float_prior(const T&, const Policy&);
- template <class T>
- typename tools::promote_args<T>::type float_prior(const T&);
- template <class T, class U, class Policy>
- typename tools::promote_args<T, U>::type float_distance(const T&, const U&, const Policy&);
- template <class T, class U>
- typename tools::promote_args<T, U>::type float_distance(const T&, const U&);
- template <class T, class Policy>
- typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol);
- template <class T>
- typename tools::promote_args<T>::type float_advance(const T& val, int distance);
-
- template <class T, class Policy>
- typename tools::promote_args<T>::type ulp(const T& val, const Policy& pol);
- template <class T>
- typename tools::promote_args<T>::type ulp(const T& val);
-
- template <class T, class U>
- typename tools::promote_args<T, U>::type relative_difference(const T&, const U&);
- template <class T, class U>
- typename tools::promote_args<T, U>::type epsilon_difference(const T&, const U&);
-
- template<class T>
- BOOST_MATH_CONSTEXPR_TABLE_FUNCTION T unchecked_bernoulli_b2n(const std::size_t n);
- template <class T, class Policy>
- T bernoulli_b2n(const int i, const Policy &pol);
- template <class T>
- T bernoulli_b2n(const int i);
- template <class T, class OutputIterator, class Policy>
- OutputIterator bernoulli_b2n(const int start_index,
- const unsigned number_of_bernoullis_b2n,
- OutputIterator out_it,
- const Policy& pol);
- template <class T, class OutputIterator>
- OutputIterator bernoulli_b2n(const int start_index,
- const unsigned number_of_bernoullis_b2n,
- OutputIterator out_it);
- template <class T, class Policy>
- T tangent_t2n(const int i, const Policy &pol);
- template <class T>
- T tangent_t2n(const int i);
- template <class T, class OutputIterator, class Policy>
- OutputIterator tangent_t2n(const int start_index,
- const unsigned number_of_bernoullis_b2n,
- OutputIterator out_it,
- const Policy& pol);
- template <class T, class OutputIterator>
- OutputIterator tangent_t2n(const int start_index,
- const unsigned number_of_bernoullis_b2n,
- OutputIterator out_it);
-
- } // namespace math
-} // namespace boost
-
-#ifdef BOOST_HAS_LONG_LONG
-#define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
- \
- template <class T>\
- inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
- \
- template <class T>\
- inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\
- \
- template <class T>\
- inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\
-
-#else
-#define BOOST_MATH_DETAIL_LL_FUNC(Policy)
-#endif
-
-#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
- \
- BOOST_MATH_DETAIL_LL_FUNC(Policy)\
- \
- template <class RT1, class RT2>\
- inline typename boost::math::tools::promote_args<RT1, RT2>::type \
- beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\
-\
- template <class RT1, class RT2, class A>\
- inline typename boost::math::tools::promote_args<RT1, RT2, A>::type \
- beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\
-\
- template <class RT1, class RT2, class RT3>\
- inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
- betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\
-\
- template <class RT1, class RT2, class RT3>\
- inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
- ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\
-\
- template <class RT1, class RT2, class RT3>\
- inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
- ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\
-\
- template <class T1, class T2, class T3, class T4>\
- inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
- ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\
-\
- template <class RT1, class RT2, class RT3>\
- inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
- ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\
-\
- template <class T1, class T2, class T3, class T4>\
- inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
- ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\
-\
- template <class RT1, class RT2, class RT3>\
- inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
- ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\
-\
- template <class T1, class T2, class T3>\
- inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
- ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\
-\
- template <class RT1, class RT2, class RT3>\
- inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
- ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\
-\
- template <class T1, class T2, class T3>\
- inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
- ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\
-\
- template <class RT1, class RT2, class RT3>\
- inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
- ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\
-\
- template <class RT1, class RT2, class RT3>\
- inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
- ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\
-\
- template <class T> T binomial_coefficient(unsigned n, unsigned k){ return ::boost::math::binomial_coefficient<T, Policy>(n, k, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\
-\
- using boost::math::legendre_next;\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type \
- legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type \
- legendre_p_prime(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type \
- legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\
-\
- using ::boost::math::legendre_next;\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type \
- legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\
-\
- using ::boost::math::laguerre_next;\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type \
- laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::laguerre_result<T1, T2>::type \
- laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type \
- hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\
-\
- using boost::math::hermite_next;\
-\
- using boost::math::chebyshev_next;\
-\
- template<class Real>\
- Real chebyshev_t(unsigned n, Real const & x){ return ::boost::math::chebyshev_t(n, x, Policy()); }\
-\
- template<class Real>\
- Real chebyshev_u(unsigned n, Real const & x){ return ::boost::math::chebyshev_u(n, x, Policy()); }\
-\
- template<class Real>\
- Real chebyshev_t_prime(unsigned n, Real const & x){ return ::boost::math::chebyshev_t_prime(n, x, Policy()); }\
-\
- using ::boost::math::chebyshev_clenshaw_recurrence;\
-\
- template <class T1, class T2>\
- inline std::complex<typename boost::math::tools::promote_args<T1, T2>::type> \
- spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type \
- spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type \
- spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\
-\
- template <class T1, class T2, class Policy>\
- inline typename boost::math::tools::promote_args<T1, T2>::type \
- spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\
-\
- template <class T1, class T2, class T3>\
- inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
- ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\
-\
- template <class T1, class T2, class T3>\
- inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
- ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type \
- ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\
-\
- template <class T1, class T2, class T3, class T4>\
- inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
- ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\
-\
- template <class T1, class T2, class T3>\
- inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
- ellint_rg(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rg(x, y, z, Policy()); }\
- \
- template <typename T>\
- inline typename boost::math::tools::promote_args<T>::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\
-\
- template <typename T>\
- inline typename boost::math::tools::promote_args<T>::type ellint_d(T k){ return boost::math::ellint_d(k, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi){ return boost::math::ellint_d(k, phi, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi){ return boost::math::jacobi_zeta(k, phi, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi){ return boost::math::heuman_lambda(k, phi, Policy()); }\
-\
- template <typename T>\
- inline typename boost::math::tools::promote_args<T>::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\
-\
- template <class T1, class T2, class T3>\
- inline typename boost::math::tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi){ return boost::math::ellint_3(k, v, phi, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\
-\
- using boost::math::max_factorial;\
- template <class RT>\
- inline RT factorial(unsigned int i) { return boost::math::factorial<RT>(i, Policy()); }\
- using boost::math::unchecked_factorial;\
- template <class RT>\
- inline RT double_factorial(unsigned i){ return boost::math::double_factorial<RT>(i, Policy()); }\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\
-\
- template <class RT1, class RT2>\
- inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\
-\
- template <class RT1, class RT2>\
- inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\
-\
- template <class RT1, class RT2>\
- inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\
-\
- template <class RT1, class RT2>\
- inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta){ return boost::math::tgamma_delta_ratio(z, delta, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x){ return boost::math::gamma_p_derivative(a, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type digamma(T x){ return boost::math::digamma(x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type trigamma(T x){ return boost::math::trigamma(x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type polygamma(int n, T x){ return boost::math::polygamma(n, x, Policy()); }\
- \
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type \
- hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\
-\
- template <class RT>\
- inline typename boost::math::tools::promote_args<RT>::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type log1p(T x){ return boost::math::log1p(x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type expm1(T x){ return boost::math::expm1(x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::tools::promote_args<T1, T2>::type \
- powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\
-\
- template<typename T>\
- inline typename boost::math::tools::promote_args<T>::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\
-\
- template<typename T>\
- inline typename boost::math::tools::promote_args<T>::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\
-\
- template<typename T>\
- inline typename boost::math::tools::promote_args<T>::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\
- { return boost::math::cyl_bessel_j(v, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j_prime(T1 v, T2 x)\
- { return boost::math::cyl_bessel_j_prime(v, x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\
- { return boost::math::sph_bessel(v, x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel_prime(unsigned v, T x)\
- { return boost::math::sph_bessel_prime(v, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
- cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
- cyl_bessel_i_prime(T1 v, T2 x) { return boost::math::cyl_bessel_i_prime(v, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
- cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
- cyl_bessel_k_prime(T1 v, T2 x) { return boost::math::cyl_bessel_k_prime(v, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
- cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\
-\
- template <class T1, class T2>\
- inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
- cyl_neumann_prime(T1 v, T2 x){ return boost::math::cyl_neumann_prime(v, x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
- sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
- sph_neumann_prime(unsigned v, T x){ return boost::math::sph_neumann_prime(v, x, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_bessel_j_zero(T v, int m)\
- { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\
-\
-template <class OutputIterator, class T>\
- inline void cyl_bessel_j_zero(T v,\
- int start_index,\
- unsigned number_of_zeros,\
- OutputIterator out_it)\
- { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_neumann_zero(T v, int m)\
- { return boost::math::cyl_neumann_zero(v, m, Policy()); }\
-\
-template <class OutputIterator, class T>\
- inline void cyl_neumann_zero(T v,\
- int start_index,\
- unsigned number_of_zeros,\
- OutputIterator out_it)\
- { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\
-\
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type cos_pi(T x){ return boost::math::cos_pi(x); }\
-\
- using boost::math::fpclassify;\
- using boost::math::isfinite;\
- using boost::math::isinf;\
- using boost::math::isnan;\
- using boost::math::isnormal;\
- using boost::math::signbit;\
- using boost::math::sign;\
- using boost::math::copysign;\
- using boost::math::changesign;\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\
- { return boost::math::expint(z, u, Policy()); }\
- \
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type expint(T z){ return boost::math::expint(z, Policy()); }\
- \
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type zeta(T s){ return boost::math::zeta(s, Policy()); }\
- \
- template <class T>\
- inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\
- \
- template <class T>\
- inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\
- \
- template <class T>\
- inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\
- \
- template <class T>\
- inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\
- \
- template <class T>\
- inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\
- \
- template <class T>\
- inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\
- \
- template <class T>\
- inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
- \
- template <class T>\
- inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
- \
- template <class T>\
- inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
- \
- template <int N, class T>\
- inline typename boost::math::tools::promote_args<T>::type pow(T v){ return boost::math::pow<N>(v, Policy()); }\
- \
- template <class T> T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\
- template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\
- template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\
- template <class T> T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\
- template <class T> T ulp(const T& a){ return boost::math::ulp(a, Policy()); }\
- \
- template <class RT1, class RT2>\
- inline typename boost::math::tools::promote_args<RT1, RT2>::type owens_t(RT1 a, RT2 z){ return boost::math::owens_t(a, z, Policy()); }\
- \
- template <class T1, class T2>\
- inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_1(T1 v, T2 x)\
- { return boost::math::cyl_hankel_1(v, x, Policy()); }\
- \
- template <class T1, class T2>\
- inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_2(T1 v, T2 x)\
- { return boost::math::cyl_hankel_2(v, x, Policy()); }\
- \
- template <class T1, class T2>\
- inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_1(T1 v, T2 x)\
- { return boost::math::sph_hankel_1(v, x, Policy()); }\
- \
- template <class T1, class T2>\
- inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_2(T1 v, T2 x)\
- { return boost::math::sph_hankel_2(v, x, Policy()); }\
- \
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\
- { return boost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\
- \
- template <class U, class T>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_sn(U k, T theta)\
- { return boost::math::jacobi_sn(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_cn(T k, U theta)\
- { return boost::math::jacobi_cn(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_dn(T k, U theta)\
- { return boost::math::jacobi_dn(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_cd(T k, U theta)\
- { return boost::math::jacobi_cd(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_dc(T k, U theta)\
- { return boost::math::jacobi_dc(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_ns(T k, U theta)\
- { return boost::math::jacobi_ns(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_sd(T k, U theta)\
- { return boost::math::jacobi_sd(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_ds(T k, U theta)\
- { return boost::math::jacobi_ds(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_nc(T k, U theta)\
- { return boost::math::jacobi_nc(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_nd(T k, U theta)\
- { return boost::math::jacobi_nd(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_sc(T k, U theta)\
- { return boost::math::jacobi_sc(k, theta, Policy()); }\
- \
- template <class T, class U>\
- inline typename boost::math::tools::promote_args<T, U>::type jacobi_cs(T k, U theta)\
- { return boost::math::jacobi_cs(k, theta, Policy()); }\
- \
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type airy_ai(T x)\
- { return boost::math::airy_ai(x, Policy()); }\
- \
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type airy_bi(T x)\
- { return boost::math::airy_bi(x, Policy()); }\
- \
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type airy_ai_prime(T x)\
- { return boost::math::airy_ai_prime(x, Policy()); }\
- \
- template <class T>\
- inline typename boost::math::tools::promote_args<T>::type airy_bi_prime(T x)\
- { return boost::math::airy_bi_prime(x, Policy()); }\
- \
- template <class T>\
- inline T airy_ai_zero(int m)\
- { return boost::math::airy_ai_zero<T>(m, Policy()); }\
- template <class T, class OutputIterator>\
- OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
- { return boost::math::airy_ai_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
- \
- template <class T>\
- inline T airy_bi_zero(int m)\
- { return boost::math::airy_bi_zero<T>(m, Policy()); }\
- template <class T, class OutputIterator>\
- OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
- { return boost::math::airy_bi_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
- \
- template <class T>\
- T bernoulli_b2n(const int i)\
- { return boost::math::bernoulli_b2n<T>(i, Policy()); }\
- template <class T, class OutputIterator>\
- OutputIterator bernoulli_b2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\
- { return boost::math::bernoulli_b2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\
- \
- template <class T>\
- T tangent_t2n(const int i)\
- { return boost::math::tangent_t2n<T>(i, Policy()); }\
- template <class T, class OutputIterator>\
- OutputIterator tangent_t2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\
- { return boost::math::tangent_t2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\
- \
-
-
-
-
-
-#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/next.hpp b/src/third_party/boost-1.68.0/boost/math/special_functions/next.hpp
deleted file mode 100644
index a63983e1c3d..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/next.hpp
+++ /dev/null
@@ -1,858 +0,0 @@
-// (C) Copyright John Maddock 2008.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_SPECIAL_NEXT_HPP
-#define BOOST_MATH_SPECIAL_NEXT_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/special_functions/math_fwd.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/special_functions/fpclassify.hpp>
-#include <boost/math/special_functions/sign.hpp>
-#include <boost/math/special_functions/trunc.hpp>
-
-#include <float.h>
-
-#if !defined(_CRAYC) && !defined(__CUDACC__) && (!defined(__GNUC__) || (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)))
-#if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__SSE2__)
-#include "xmmintrin.h"
-#define BOOST_MATH_CHECK_SSE2
-#endif
-#endif
-
-namespace boost{ namespace math{
-
- namespace concepts {
-
- class real_concept;
- class std_real_concept;
-
- }
-
-namespace detail{
-
-template <class T>
-struct has_hidden_guard_digits;
-template <>
-struct has_hidden_guard_digits<float> : public mpl::false_ {};
-template <>
-struct has_hidden_guard_digits<double> : public mpl::false_ {};
-template <>
-struct has_hidden_guard_digits<long double> : public mpl::false_ {};
-#ifdef BOOST_HAS_FLOAT128
-template <>
-struct has_hidden_guard_digits<__float128> : public mpl::false_ {};
-#endif
-template <>
-struct has_hidden_guard_digits<boost::math::concepts::real_concept> : public mpl::false_ {};
-template <>
-struct has_hidden_guard_digits<boost::math::concepts::std_real_concept> : public mpl::false_ {};
-
-template <class T, bool b>
-struct has_hidden_guard_digits_10 : public mpl::false_ {};
-template <class T>
-struct has_hidden_guard_digits_10<T, true> : public mpl::bool_<(std::numeric_limits<T>::digits10 != std::numeric_limits<T>::max_digits10)> {};
-
-template <class T>
-struct has_hidden_guard_digits
- : public has_hidden_guard_digits_10<T,
- std::numeric_limits<T>::is_specialized
- && (std::numeric_limits<T>::radix == 10) >
-{};
-
-template <class T>
-inline const T& normalize_value(const T& val, const mpl::false_&) { return val; }
-template <class T>
-inline T normalize_value(const T& val, const mpl::true_&)
-{
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
-
- boost::intmax_t shift = std::numeric_limits<T>::digits - ilogb(val) - 1;
- T result = scalbn(val, shift);
- result = round(result);
- return scalbn(result, -shift);
-}
-
-template <class T>
-inline T get_smallest_value(mpl::true_ const&)
-{
- //
- // numeric_limits lies about denorms being present - particularly
- // when this can be turned on or off at runtime, as is the case
- // when using the SSE2 registers in DAZ or FTZ mode.
- //
- static const T m = std::numeric_limits<T>::denorm_min();
-#ifdef BOOST_MATH_CHECK_SSE2
- return (_mm_getcsr() & (_MM_FLUSH_ZERO_ON | 0x40)) ? tools::min_value<T>() : m;;
-#else
- return ((tools::min_value<T>() / 2) == 0) ? tools::min_value<T>() : m;
-#endif
-}
-
-template <class T>
-inline T get_smallest_value(mpl::false_ const&)
-{
- return tools::min_value<T>();
-}
-
-template <class T>
-inline T get_smallest_value()
-{
-#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1310)
- return get_smallest_value<T>(mpl::bool_<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == 1)>());
-#else
- return get_smallest_value<T>(mpl::bool_<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == std::denorm_present)>());
-#endif
-}
-
-//
-// Returns the smallest value that won't generate denorms when
-// we calculate the value of the least-significant-bit:
-//
-template <class T>
-T get_min_shift_value();
-
-template <class T>
-struct min_shift_initializer
-{
- struct init
- {
- init()
- {
- do_init();
- }
- static void do_init()
- {
- get_min_shift_value<T>();
- }
- void force_instantiate()const{}
- };
- static const init initializer;
- static void force_instantiate()
- {
- initializer.force_instantiate();
- }
-};
-
-template <class T>
-const typename min_shift_initializer<T>::init min_shift_initializer<T>::initializer;
-
-template <class T>
-inline T calc_min_shifted(const mpl::true_&)
-{
- BOOST_MATH_STD_USING
- return ldexp(tools::min_value<T>(), tools::digits<T>() + 1);
-}
-template <class T>
-inline T calc_min_shifted(const mpl::false_&)
-{
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
-
- return scalbn(tools::min_value<T>(), std::numeric_limits<T>::digits + 1);
-}
-
-
-template <class T>
-inline T get_min_shift_value()
-{
- static const T val = calc_min_shifted<T>(mpl::bool_<!std::numeric_limits<T>::is_specialized || std::numeric_limits<T>::radix == 2>());
- min_shift_initializer<T>::force_instantiate();
-
- return val;
-}
-
-template <class T, class Policy>
-T float_next_imp(const T& val, const mpl::true_&, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- int expon;
- static const char* function = "float_next<%1%>(%1%)";
-
- int fpclass = (boost::math::fpclassify)(val);
-
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
- {
- if(val < 0)
- return -tools::max_value<T>();
- return policies::raise_domain_error<T>(
- function,
- "Argument must be finite, but got %1%", val, pol);
- }
-
- if(val >= tools::max_value<T>())
- return policies::raise_overflow_error<T>(function, 0, pol);
-
- if(val == 0)
- return detail::get_smallest_value<T>();
-
- if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != -tools::min_value<T>()))
- {
- //
- // Special case: if the value of the least significant bit is a denorm, and the result
- // would not be a denorm, then shift the input, increment, and shift back.
- // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
- //
- return ldexp(float_next(T(ldexp(val, 2 * tools::digits<T>())), pol), -2 * tools::digits<T>());
- }
-
- if(-0.5f == frexp(val, &expon))
- --expon; // reduce exponent when val is a power of two, and negative.
- T diff = ldexp(T(1), expon - tools::digits<T>());
- if(diff == 0)
- diff = detail::get_smallest_value<T>();
- return val + diff;
-} // float_next_imp
-//
-// Special version for some base other than 2:
-//
-template <class T, class Policy>
-T float_next_imp(const T& val, const mpl::false_&, const Policy& pol)
-{
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
-
- BOOST_MATH_STD_USING
- boost::intmax_t expon;
- static const char* function = "float_next<%1%>(%1%)";
-
- int fpclass = (boost::math::fpclassify)(val);
-
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
- {
- if(val < 0)
- return -tools::max_value<T>();
- return policies::raise_domain_error<T>(
- function,
- "Argument must be finite, but got %1%", val, pol);
- }
-
- if(val >= tools::max_value<T>())
- return policies::raise_overflow_error<T>(function, 0, pol);
-
- if(val == 0)
- return detail::get_smallest_value<T>();
-
- if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != -tools::min_value<T>()))
- {
- //
- // Special case: if the value of the least significant bit is a denorm, and the result
- // would not be a denorm, then shift the input, increment, and shift back.
- // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
- //
- return scalbn(float_next(T(scalbn(val, 2 * std::numeric_limits<T>::digits)), pol), -2 * std::numeric_limits<T>::digits);
- }
-
- expon = 1 + ilogb(val);
- if(-1 == scalbn(val, -expon) * std::numeric_limits<T>::radix)
- --expon; // reduce exponent when val is a power of base, and negative.
- T diff = scalbn(T(1), expon - std::numeric_limits<T>::digits);
- if(diff == 0)
- diff = detail::get_smallest_value<T>();
- return val + diff;
-} // float_next_imp
-
-} // namespace detail
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type float_next(const T& val, const Policy& pol)
-{
- typedef typename tools::promote_args<T>::type result_type;
- return detail::float_next_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol);
-}
-
-#if 0 //def BOOST_MSVC
-//
-// We used to use ::_nextafter here, but doing so fails when using
-// the SSE2 registers if the FTZ or DAZ flags are set, so use our own
-// - albeit slower - code instead as at least that gives the correct answer.
-//
-template <class Policy>
-inline double float_next(const double& val, const Policy& pol)
-{
- static const char* function = "float_next<%1%>(%1%)";
-
- if(!(boost::math::isfinite)(val) && (val > 0))
- return policies::raise_domain_error<double>(
- function,
- "Argument must be finite, but got %1%", val, pol);
-
- if(val >= tools::max_value<double>())
- return policies::raise_overflow_error<double>(function, 0, pol);
-
- return ::_nextafter(val, tools::max_value<double>());
-}
-#endif
-
-template <class T>
-inline typename tools::promote_args<T>::type float_next(const T& val)
-{
- return float_next(val, policies::policy<>());
-}
-
-namespace detail{
-
-template <class T, class Policy>
-T float_prior_imp(const T& val, const mpl::true_&, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- int expon;
- static const char* function = "float_prior<%1%>(%1%)";
-
- int fpclass = (boost::math::fpclassify)(val);
-
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
- {
- if(val > 0)
- return tools::max_value<T>();
- return policies::raise_domain_error<T>(
- function,
- "Argument must be finite, but got %1%", val, pol);
- }
-
- if(val <= -tools::max_value<T>())
- return -policies::raise_overflow_error<T>(function, 0, pol);
-
- if(val == 0)
- return -detail::get_smallest_value<T>();
-
- if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != tools::min_value<T>()))
- {
- //
- // Special case: if the value of the least significant bit is a denorm, and the result
- // would not be a denorm, then shift the input, increment, and shift back.
- // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
- //
- return ldexp(float_prior(T(ldexp(val, 2 * tools::digits<T>())), pol), -2 * tools::digits<T>());
- }
-
- T remain = frexp(val, &expon);
- if(remain == 0.5f)
- --expon; // when val is a power of two we must reduce the exponent
- T diff = ldexp(T(1), expon - tools::digits<T>());
- if(diff == 0)
- diff = detail::get_smallest_value<T>();
- return val - diff;
-} // float_prior_imp
-//
-// Special version for bases other than 2:
-//
-template <class T, class Policy>
-T float_prior_imp(const T& val, const mpl::false_&, const Policy& pol)
-{
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
-
- BOOST_MATH_STD_USING
- boost::intmax_t expon;
- static const char* function = "float_prior<%1%>(%1%)";
-
- int fpclass = (boost::math::fpclassify)(val);
-
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
- {
- if(val > 0)
- return tools::max_value<T>();
- return policies::raise_domain_error<T>(
- function,
- "Argument must be finite, but got %1%", val, pol);
- }
-
- if(val <= -tools::max_value<T>())
- return -policies::raise_overflow_error<T>(function, 0, pol);
-
- if(val == 0)
- return -detail::get_smallest_value<T>();
-
- if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != tools::min_value<T>()))
- {
- //
- // Special case: if the value of the least significant bit is a denorm, and the result
- // would not be a denorm, then shift the input, increment, and shift back.
- // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
- //
- return scalbn(float_prior(T(scalbn(val, 2 * std::numeric_limits<T>::digits)), pol), -2 * std::numeric_limits<T>::digits);
- }
-
- expon = 1 + ilogb(val);
- T remain = scalbn(val, -expon);
- if(remain * std::numeric_limits<T>::radix == 1)
- --expon; // when val is a power of two we must reduce the exponent
- T diff = scalbn(T(1), expon - std::numeric_limits<T>::digits);
- if(diff == 0)
- diff = detail::get_smallest_value<T>();
- return val - diff;
-} // float_prior_imp
-
-} // namespace detail
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type float_prior(const T& val, const Policy& pol)
-{
- typedef typename tools::promote_args<T>::type result_type;
- return detail::float_prior_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol);
-}
-
-#if 0 //def BOOST_MSVC
-//
-// We used to use ::_nextafter here, but doing so fails when using
-// the SSE2 registers if the FTZ or DAZ flags are set, so use our own
-// - albeit slower - code instead as at least that gives the correct answer.
-//
-template <class Policy>
-inline double float_prior(const double& val, const Policy& pol)
-{
- static const char* function = "float_prior<%1%>(%1%)";
-
- if(!(boost::math::isfinite)(val) && (val < 0))
- return policies::raise_domain_error<double>(
- function,
- "Argument must be finite, but got %1%", val, pol);
-
- if(val <= -tools::max_value<double>())
- return -policies::raise_overflow_error<double>(function, 0, pol);
-
- return ::_nextafter(val, -tools::max_value<double>());
-}
-#endif
-
-template <class T>
-inline typename tools::promote_args<T>::type float_prior(const T& val)
-{
- return float_prior(val, policies::policy<>());
-}
-
-template <class T, class U, class Policy>
-inline typename tools::promote_args<T, U>::type nextafter(const T& val, const U& direction, const Policy& pol)
-{
- typedef typename tools::promote_args<T, U>::type result_type;
- return val < direction ? boost::math::float_next<result_type>(val, pol) : val == direction ? val : boost::math::float_prior<result_type>(val, pol);
-}
-
-template <class T, class U>
-inline typename tools::promote_args<T, U>::type nextafter(const T& val, const U& direction)
-{
- return nextafter(val, direction, policies::policy<>());
-}
-
-namespace detail{
-
-template <class T, class Policy>
-T float_distance_imp(const T& a, const T& b, const mpl::true_&, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- //
- // Error handling:
- //
- static const char* function = "float_distance<%1%>(%1%, %1%)";
- if(!(boost::math::isfinite)(a))
- return policies::raise_domain_error<T>(
- function,
- "Argument a must be finite, but got %1%", a, pol);
- if(!(boost::math::isfinite)(b))
- return policies::raise_domain_error<T>(
- function,
- "Argument b must be finite, but got %1%", b, pol);
- //
- // Special cases:
- //
- if(a > b)
- return -float_distance(b, a, pol);
- if(a == b)
- return T(0);
- if(a == 0)
- return 1 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol));
- if(b == 0)
- return 1 + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol));
- if(boost::math::sign(a) != boost::math::sign(b))
- return 2 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol))
- + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol));
- //
- // By the time we get here, both a and b must have the same sign, we want
- // b > a and both postive for the following logic:
- //
- if(a < 0)
- return float_distance(static_cast<T>(-b), static_cast<T>(-a), pol);
-
- BOOST_ASSERT(a >= 0);
- BOOST_ASSERT(b >= a);
-
- int expon;
- //
- // Note that if a is a denorm then the usual formula fails
- // because we actually have fewer than tools::digits<T>()
- // significant bits in the representation:
- //
- frexp(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) ? tools::min_value<T>() : a, &expon);
- T upper = ldexp(T(1), expon);
- T result = T(0);
- //
- // If b is greater than upper, then we *must* split the calculation
- // as the size of the ULP changes with each order of magnitude change:
- //
- if(b > upper)
- {
- int expon2;
- frexp(b, &expon2);
- T upper2 = ldexp(T(0.5), expon2);
- result = float_distance(upper2, b);
- result += (expon2 - expon - 1) * ldexp(T(1), tools::digits<T>() - 1);
- }
- //
- // Use compensated double-double addition to avoid rounding
- // errors in the subtraction:
- //
- expon = tools::digits<T>() - expon;
- T mb, x, y, z;
- if(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) || (b - a < tools::min_value<T>()))
- {
- //
- // Special case - either one end of the range is a denormal, or else the difference is.
- // The regular code will fail if we're using the SSE2 registers on Intel and either
- // the FTZ or DAZ flags are set.
- //
- T a2 = ldexp(a, tools::digits<T>());
- T b2 = ldexp(b, tools::digits<T>());
- mb = -(std::min)(T(ldexp(upper, tools::digits<T>())), b2);
- x = a2 + mb;
- z = x - a2;
- y = (a2 - (x - z)) + (mb - z);
-
- expon -= tools::digits<T>();
- }
- else
- {
- mb = -(std::min)(upper, b);
- x = a + mb;
- z = x - a;
- y = (a - (x - z)) + (mb - z);
- }
- if(x < 0)
- {
- x = -x;
- y = -y;
- }
- result += ldexp(x, expon) + ldexp(y, expon);
- //
- // Result must be an integer:
- //
- BOOST_ASSERT(result == floor(result));
- return result;
-} // float_distance_imp
-//
-// Special versions for bases other than 2:
-//
-template <class T, class Policy>
-T float_distance_imp(const T& a, const T& b, const mpl::false_&, const Policy& pol)
-{
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
-
- BOOST_MATH_STD_USING
- //
- // Error handling:
- //
- static const char* function = "float_distance<%1%>(%1%, %1%)";
- if(!(boost::math::isfinite)(a))
- return policies::raise_domain_error<T>(
- function,
- "Argument a must be finite, but got %1%", a, pol);
- if(!(boost::math::isfinite)(b))
- return policies::raise_domain_error<T>(
- function,
- "Argument b must be finite, but got %1%", b, pol);
- //
- // Special cases:
- //
- if(a > b)
- return -float_distance(b, a, pol);
- if(a == b)
- return T(0);
- if(a == 0)
- return 1 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol));
- if(b == 0)
- return 1 + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol));
- if(boost::math::sign(a) != boost::math::sign(b))
- return 2 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol))
- + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol));
- //
- // By the time we get here, both a and b must have the same sign, we want
- // b > a and both postive for the following logic:
- //
- if(a < 0)
- return float_distance(static_cast<T>(-b), static_cast<T>(-a), pol);
-
- BOOST_ASSERT(a >= 0);
- BOOST_ASSERT(b >= a);
-
- boost::intmax_t expon;
- //
- // Note that if a is a denorm then the usual formula fails
- // because we actually have fewer than tools::digits<T>()
- // significant bits in the representation:
- //
- expon = 1 + ilogb(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) ? tools::min_value<T>() : a);
- T upper = scalbn(T(1), expon);
- T result = T(0);
- //
- // If b is greater than upper, then we *must* split the calculation
- // as the size of the ULP changes with each order of magnitude change:
- //
- if(b > upper)
- {
- boost::intmax_t expon2 = 1 + ilogb(b);
- T upper2 = scalbn(T(1), expon2 - 1);
- result = float_distance(upper2, b);
- result += (expon2 - expon - 1) * scalbn(T(1), std::numeric_limits<T>::digits - 1);
- }
- //
- // Use compensated double-double addition to avoid rounding
- // errors in the subtraction:
- //
- expon = std::numeric_limits<T>::digits - expon;
- T mb, x, y, z;
- if(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) || (b - a < tools::min_value<T>()))
- {
- //
- // Special case - either one end of the range is a denormal, or else the difference is.
- // The regular code will fail if we're using the SSE2 registers on Intel and either
- // the FTZ or DAZ flags are set.
- //
- T a2 = scalbn(a, std::numeric_limits<T>::digits);
- T b2 = scalbn(b, std::numeric_limits<T>::digits);
- mb = -(std::min)(T(scalbn(upper, std::numeric_limits<T>::digits)), b2);
- x = a2 + mb;
- z = x - a2;
- y = (a2 - (x - z)) + (mb - z);
-
- expon -= std::numeric_limits<T>::digits;
- }
- else
- {
- mb = -(std::min)(upper, b);
- x = a + mb;
- z = x - a;
- y = (a - (x - z)) + (mb - z);
- }
- if(x < 0)
- {
- x = -x;
- y = -y;
- }
- result += scalbn(x, expon) + scalbn(y, expon);
- //
- // Result must be an integer:
- //
- BOOST_ASSERT(result == floor(result));
- return result;
-} // float_distance_imp
-
-} // namespace detail
-
-template <class T, class U, class Policy>
-inline typename tools::promote_args<T, U>::type float_distance(const T& a, const U& b, const Policy& pol)
-{
- typedef typename tools::promote_args<T, U>::type result_type;
- return detail::float_distance_imp(detail::normalize_value(static_cast<result_type>(a), typename detail::has_hidden_guard_digits<result_type>::type()), detail::normalize_value(static_cast<result_type>(b), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol);
-}
-
-template <class T, class U>
-typename tools::promote_args<T, U>::type float_distance(const T& a, const U& b)
-{
- return boost::math::float_distance(a, b, policies::policy<>());
-}
-
-namespace detail{
-
-template <class T, class Policy>
-T float_advance_imp(T val, int distance, const mpl::true_&, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- //
- // Error handling:
- //
- static const char* function = "float_advance<%1%>(%1%, int)";
-
- int fpclass = (boost::math::fpclassify)(val);
-
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
- return policies::raise_domain_error<T>(
- function,
- "Argument val must be finite, but got %1%", val, pol);
-
- if(val < 0)
- return -float_advance(-val, -distance, pol);
- if(distance == 0)
- return val;
- if(distance == 1)
- return float_next(val, pol);
- if(distance == -1)
- return float_prior(val, pol);
-
- if(fabs(val) < detail::get_min_shift_value<T>())
- {
- //
- // Special case: if the value of the least significant bit is a denorm,
- // implement in terms of float_next/float_prior.
- // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
- //
- if(distance > 0)
- {
- do{ val = float_next(val, pol); } while(--distance);
- }
- else
- {
- do{ val = float_prior(val, pol); } while(++distance);
- }
- return val;
- }
-
- int expon;
- frexp(val, &expon);
- T limit = ldexp((distance < 0 ? T(0.5f) : T(1)), expon);
- if(val <= tools::min_value<T>())
- {
- limit = sign(T(distance)) * tools::min_value<T>();
- }
- T limit_distance = float_distance(val, limit);
- while(fabs(limit_distance) < abs(distance))
- {
- distance -= itrunc(limit_distance);
- val = limit;
- if(distance < 0)
- {
- limit /= 2;
- expon--;
- }
- else
- {
- limit *= 2;
- expon++;
- }
- limit_distance = float_distance(val, limit);
- if(distance && (limit_distance == 0))
- {
- return policies::raise_evaluation_error<T>(function, "Internal logic failed while trying to increment floating point value %1%: most likely your FPU is in non-IEEE conforming mode.", val, pol);
- }
- }
- if((0.5f == frexp(val, &expon)) && (distance < 0))
- --expon;
- T diff = 0;
- if(val != 0)
- diff = distance * ldexp(T(1), expon - tools::digits<T>());
- if(diff == 0)
- diff = distance * detail::get_smallest_value<T>();
- return val += diff;
-} // float_advance_imp
-//
-// Special version for bases other than 2:
-//
-template <class T, class Policy>
-T float_advance_imp(T val, int distance, const mpl::false_&, const Policy& pol)
-{
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
-
- BOOST_MATH_STD_USING
- //
- // Error handling:
- //
- static const char* function = "float_advance<%1%>(%1%, int)";
-
- int fpclass = (boost::math::fpclassify)(val);
-
- if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
- return policies::raise_domain_error<T>(
- function,
- "Argument val must be finite, but got %1%", val, pol);
-
- if(val < 0)
- return -float_advance(-val, -distance, pol);
- if(distance == 0)
- return val;
- if(distance == 1)
- return float_next(val, pol);
- if(distance == -1)
- return float_prior(val, pol);
-
- if(fabs(val) < detail::get_min_shift_value<T>())
- {
- //
- // Special case: if the value of the least significant bit is a denorm,
- // implement in terms of float_next/float_prior.
- // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
- //
- if(distance > 0)
- {
- do{ val = float_next(val, pol); } while(--distance);
- }
- else
- {
- do{ val = float_prior(val, pol); } while(++distance);
- }
- return val;
- }
-
- boost::intmax_t expon = 1 + ilogb(val);
- T limit = scalbn(T(1), distance < 0 ? expon - 1 : expon);
- if(val <= tools::min_value<T>())
- {
- limit = sign(T(distance)) * tools::min_value<T>();
- }
- T limit_distance = float_distance(val, limit);
- while(fabs(limit_distance) < abs(distance))
- {
- distance -= itrunc(limit_distance);
- val = limit;
- if(distance < 0)
- {
- limit /= std::numeric_limits<T>::radix;
- expon--;
- }
- else
- {
- limit *= std::numeric_limits<T>::radix;
- expon++;
- }
- limit_distance = float_distance(val, limit);
- if(distance && (limit_distance == 0))
- {
- return policies::raise_evaluation_error<T>(function, "Internal logic failed while trying to increment floating point value %1%: most likely your FPU is in non-IEEE conforming mode.", val, pol);
- }
- }
- /*expon = 1 + ilogb(val);
- if((1 == scalbn(val, 1 + expon)) && (distance < 0))
- --expon;*/
- T diff = 0;
- if(val != 0)
- diff = distance * scalbn(T(1), expon - std::numeric_limits<T>::digits);
- if(diff == 0)
- diff = distance * detail::get_smallest_value<T>();
- return val += diff;
-} // float_advance_imp
-
-} // namespace detail
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol)
-{
- typedef typename tools::promote_args<T>::type result_type;
- return detail::float_advance_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), distance, mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol);
-}
-
-template <class T>
-inline typename tools::promote_args<T>::type float_advance(const T& val, int distance)
-{
- return boost::math::float_advance(val, distance, policies::policy<>());
-}
-
-}} // boost math namespaces
-
-#endif // BOOST_MATH_SPECIAL_NEXT_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/trunc.hpp b/src/third_party/boost-1.68.0/boost/math/special_functions/trunc.hpp
deleted file mode 100644
index 3f80c96fee4..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/trunc.hpp
+++ /dev/null
@@ -1,111 +0,0 @@
-// Copyright John Maddock 2007.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_TRUNC_HPP
-#define BOOST_MATH_TRUNC_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/special_functions/math_fwd.hpp>
-#include <boost/math/tools/config.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/special_functions/fpclassify.hpp>
-
-namespace boost{ namespace math{ namespace detail{
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol, const mpl::false_&)
-{
- BOOST_MATH_STD_USING
- typedef typename tools::promote_args<T>::type result_type;
- if(!(boost::math::isfinite)(v))
- return policies::raise_rounding_error("boost::math::trunc<%1%>(%1%)", 0, static_cast<result_type>(v), static_cast<result_type>(v), pol);
- return (v >= 0) ? static_cast<result_type>(floor(v)) : static_cast<result_type>(ceil(v));
-}
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type trunc(const T& v, const Policy&, const mpl::true_&)
-{
- return v;
-}
-
-}
-
-template <class T, class Policy>
-inline typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol)
-{
- return detail::trunc(v, pol, mpl::bool_<detail::is_integer_for_rounding<T>::value>());
-}
-template <class T>
-inline typename tools::promote_args<T>::type trunc(const T& v)
-{
- return trunc(v, policies::policy<>());
-}
-//
-// The following functions will not compile unless T has an
-// implicit convertion to the integer types. For user-defined
-// number types this will likely not be the case. In that case
-// these functions should either be specialized for the UDT in
-// question, or else overloads should be placed in the same
-// namespace as the UDT: these will then be found via argument
-// dependent lookup. See our concept archetypes for examples.
-//
-template <class T, class Policy>
-inline int itrunc(const T& v, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- typedef typename tools::promote_args<T>::type result_type;
- result_type r = boost::math::trunc(v, pol);
- if((r > (std::numeric_limits<int>::max)()) || (r < (std::numeric_limits<int>::min)()))
- return static_cast<int>(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, static_cast<result_type>(v), 0, pol));
- return static_cast<int>(r);
-}
-template <class T>
-inline int itrunc(const T& v)
-{
- return itrunc(v, policies::policy<>());
-}
-
-template <class T, class Policy>
-inline long ltrunc(const T& v, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- typedef typename tools::promote_args<T>::type result_type;
- result_type r = boost::math::trunc(v, pol);
- if((r > (std::numeric_limits<long>::max)()) || (r < (std::numeric_limits<long>::min)()))
- return static_cast<long>(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, static_cast<result_type>(v), 0L, pol));
- return static_cast<long>(r);
-}
-template <class T>
-inline long ltrunc(const T& v)
-{
- return ltrunc(v, policies::policy<>());
-}
-
-#ifdef BOOST_HAS_LONG_LONG
-
-template <class T, class Policy>
-inline boost::long_long_type lltrunc(const T& v, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- typedef typename tools::promote_args<T>::type result_type;
- result_type r = boost::math::trunc(v, pol);
- if((r > (std::numeric_limits<boost::long_long_type>::max)()) || (r < (std::numeric_limits<boost::long_long_type>::min)()))
- return static_cast<boost::long_long_type>(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, static_cast<boost::long_long_type>(0), pol));
- return static_cast<boost::long_long_type>(r);
-}
-template <class T>
-inline boost::long_long_type lltrunc(const T& v)
-{
- return lltrunc(v, policies::policy<>());
-}
-
-#endif
-
-}} // namespaces
-
-#endif // BOOST_MATH_TRUNC_HPP
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/fraction.hpp b/src/third_party/boost-1.68.0/boost/math/tools/fraction.hpp
deleted file mode 100644
index a787c603f34..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/tools/fraction.hpp
+++ /dev/null
@@ -1,260 +0,0 @@
-// (C) Copyright John Maddock 2005-2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_TOOLS_FRACTION_INCLUDED
-#define BOOST_MATH_TOOLS_FRACTION_INCLUDED
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/config/no_tr1/cmath.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/math/tools/precision.hpp>
-
-namespace boost{ namespace math{ namespace tools{
-
-namespace detail
-{
-
- template <class T>
- struct is_pair : public boost::false_type{};
-
- template <class T, class U>
- struct is_pair<std::pair<T,U> > : public boost::true_type{};
-
- template <class Gen>
- struct fraction_traits_simple
- {
- typedef typename Gen::result_type result_type;
- typedef typename Gen::result_type value_type;
-
- static result_type a(const value_type&) BOOST_MATH_NOEXCEPT(value_type)
- {
- return 1;
- }
- static result_type b(const value_type& v) BOOST_MATH_NOEXCEPT(value_type)
- {
- return v;
- }
- };
-
- template <class Gen>
- struct fraction_traits_pair
- {
- typedef typename Gen::result_type value_type;
- typedef typename value_type::first_type result_type;
-
- static result_type a(const value_type& v) BOOST_MATH_NOEXCEPT(value_type)
- {
- return v.first;
- }
- static result_type b(const value_type& v) BOOST_MATH_NOEXCEPT(value_type)
- {
- return v.second;
- }
- };
-
- template <class Gen>
- struct fraction_traits
- : public boost::mpl::if_c<
- is_pair<typename Gen::result_type>::value,
- fraction_traits_pair<Gen>,
- fraction_traits_simple<Gen> >::type
- {
- };
-
-} // namespace detail
-
-//
-// continued_fraction_b
-// Evaluates:
-//
-// b0 + a1
-// ---------------
-// b1 + a2
-// ----------
-// b2 + a3
-// -----
-// b3 + ...
-//
-// Note that the first a0 returned by generator Gen is disarded.
-//
-template <class Gen, class U>
-inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, const U& factor, boost::uintmax_t& max_terms)
- BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
-{
- BOOST_MATH_STD_USING // ADL of std names
-
- typedef detail::fraction_traits<Gen> traits;
- typedef typename traits::result_type result_type;
- typedef typename traits::value_type value_type;
-
- result_type tiny = tools::min_value<result_type>();
-
- value_type v = g();
-
- result_type f, C, D, delta;
- f = traits::b(v);
- if(f == 0)
- f = tiny;
- C = f;
- D = 0;
-
- boost::uintmax_t counter(max_terms);
-
- do{
- v = g();
- D = traits::b(v) + traits::a(v) * D;
- if(D == 0)
- D = tiny;
- C = traits::b(v) + traits::a(v) / C;
- if(C == 0)
- C = tiny;
- D = 1/D;
- delta = C*D;
- f = f * delta;
- }while((fabs(delta - 1) > factor) && --counter);
-
- max_terms = max_terms - counter;
-
- return f;
-}
-
-template <class Gen, class U>
-inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, const U& factor)
- BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
-{
- boost::uintmax_t max_terms = (std::numeric_limits<boost::uintmax_t>::max)();
- return continued_fraction_b(g, factor, max_terms);
-}
-
-template <class Gen>
-inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits)
- BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
-{
- BOOST_MATH_STD_USING // ADL of std names
-
- typedef detail::fraction_traits<Gen> traits;
- typedef typename traits::result_type result_type;
-
- result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
- boost::uintmax_t max_terms = (std::numeric_limits<boost::uintmax_t>::max)();
- return continued_fraction_b(g, factor, max_terms);
-}
-
-template <class Gen>
-inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits, boost::uintmax_t& max_terms)
- BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
-{
- BOOST_MATH_STD_USING // ADL of std names
-
- typedef detail::fraction_traits<Gen> traits;
- typedef typename traits::result_type result_type;
-
- result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
- return continued_fraction_b(g, factor, max_terms);
-}
-
-//
-// continued_fraction_a
-// Evaluates:
-//
-// a1
-// ---------------
-// b1 + a2
-// ----------
-// b2 + a3
-// -----
-// b3 + ...
-//
-// Note that the first a1 and b1 returned by generator Gen are both used.
-//
-template <class Gen, class U>
-inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, const U& factor, boost::uintmax_t& max_terms)
- BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
-{
- BOOST_MATH_STD_USING // ADL of std names
-
- typedef detail::fraction_traits<Gen> traits;
- typedef typename traits::result_type result_type;
- typedef typename traits::value_type value_type;
-
- result_type tiny = tools::min_value<result_type>();
-
- value_type v = g();
-
- result_type f, C, D, delta, a0;
- f = traits::b(v);
- a0 = traits::a(v);
- if(f == 0)
- f = tiny;
- C = f;
- D = 0;
-
- boost::uintmax_t counter(max_terms);
-
- do{
- v = g();
- D = traits::b(v) + traits::a(v) * D;
- if(D == 0)
- D = tiny;
- C = traits::b(v) + traits::a(v) / C;
- if(C == 0)
- C = tiny;
- D = 1/D;
- delta = C*D;
- f = f * delta;
- }while((fabs(delta - 1) > factor) && --counter);
-
- max_terms = max_terms - counter;
-
- return a0/f;
-}
-
-template <class Gen, class U>
-inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, const U& factor)
- BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
-{
- boost::uintmax_t max_iter = (std::numeric_limits<boost::uintmax_t>::max)();
- return continued_fraction_a(g, factor, max_iter);
-}
-
-template <class Gen>
-inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits)
- BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
-{
- BOOST_MATH_STD_USING // ADL of std names
-
- typedef detail::fraction_traits<Gen> traits;
- typedef typename traits::result_type result_type;
-
- result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
- boost::uintmax_t max_iter = (std::numeric_limits<boost::uintmax_t>::max)();
-
- return continued_fraction_a(g, factor, max_iter);
-}
-
-template <class Gen>
-inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits, boost::uintmax_t& max_terms)
- BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
-{
- BOOST_MATH_STD_USING // ADL of std names
-
- typedef detail::fraction_traits<Gen> traits;
- typedef typename traits::result_type result_type;
-
- result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
- return continued_fraction_a(g, factor, max_terms);
-}
-
-} // namespace tools
-} // namespace math
-} // namespace boost
-
-#endif // BOOST_MATH_TOOLS_FRACTION_INCLUDED
-
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/precision.hpp b/src/third_party/boost-1.68.0/boost/math/tools/precision.hpp
deleted file mode 100644
index 6538083b99c..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/tools/precision.hpp
+++ /dev/null
@@ -1,409 +0,0 @@
-// Copyright John Maddock 2005-2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_TOOLS_PRECISION_INCLUDED
-#define BOOST_MATH_TOOLS_PRECISION_INCLUDED
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/limits.hpp>
-#include <boost/assert.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/mpl/int.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/math/policies/policy.hpp>
-
-// These two are for LDBL_MAN_DIG:
-#include <limits.h>
-#include <math.h>
-
-namespace boost{ namespace math
-{
-namespace tools
-{
-// If T is not specialized, the functions digits, max_value and min_value,
-// all get synthesised automatically from std::numeric_limits.
-// However, if numeric_limits is not specialised for type RealType,
-// for example with NTL::RR type, then you will get a compiler error
-// when code tries to use these functions, unless you explicitly specialise them.
-
-// For example if the precision of RealType varies at runtime,
-// then numeric_limits support may not be appropriate,
-// see boost/math/tools/ntl.hpp for examples like
-// template <> NTL::RR max_value<NTL::RR> ...
-// See Conceptual Requirements for Real Number Types.
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_NOEXCEPT
-{
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
- BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2 || ::std::numeric_limits<T>::radix == 10);
-#else
- BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
- BOOST_ASSERT(::std::numeric_limits<T>::radix == 2 || ::std::numeric_limits<T>::radix == 10);
-#endif
- return std::numeric_limits<T>::radix == 2
- ? std::numeric_limits<T>::digits
- : ((std::numeric_limits<T>::digits + 1) * 1000L) / 301L;
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
-#else
- BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
-#endif
- return (std::numeric_limits<T>::max)();
-} // Also used as a finite 'infinite' value for - and +infinity, for example:
-// -max_value<double> = -1.79769e+308, max_value<double> = 1.79769e+308.
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
-#else
- BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
-#endif
- return (std::numeric_limits<T>::min)();
-}
-
-namespace detail{
-//
-// Logarithmic limits come next, note that although
-// we can compute these from the log of the max value
-// that is not in general thread safe (if we cache the value)
-// so it's better to specialise these:
-//
-// For type float first:
-//
-template <class T>
-inline BOOST_MATH_CONSTEXPR T log_max_value(const mpl::int_<128>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
- return 88.0f;
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T log_min_value(const mpl::int_<128>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
- return -87.0f;
-}
-//
-// Now double:
-//
-template <class T>
-inline BOOST_MATH_CONSTEXPR T log_max_value(const mpl::int_<1024>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
- return 709.0;
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T log_min_value(const mpl::int_<1024>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
- return -708.0;
-}
-//
-// 80 and 128-bit long doubles:
-//
-template <class T>
-inline BOOST_MATH_CONSTEXPR T log_max_value(const mpl::int_<16384>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
- return 11356.0L;
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T log_min_value(const mpl::int_<16384>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
- return -11355.0L;
-}
-
-template <class T>
-inline T log_max_value(const mpl::int_<0>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
-{
- BOOST_MATH_STD_USING
-#ifdef __SUNPRO_CC
- static const T m = boost::math::tools::max_value<T>();
- static const T val = log(m);
-#else
- static const T val = log(boost::math::tools::max_value<T>());
-#endif
- return val;
-}
-
-template <class T>
-inline T log_min_value(const mpl::int_<0>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
-{
- BOOST_MATH_STD_USING
-#ifdef __SUNPRO_CC
- static const T m = boost::math::tools::min_value<T>();
- static const T val = log(m);
-#else
- static const T val = log(boost::math::tools::min_value<T>());
-#endif
- return val;
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T epsilon(const mpl::true_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
-{
- return std::numeric_limits<T>::epsilon();
-}
-
-#if defined(__GNUC__) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106))
-template <>
-inline BOOST_MATH_CONSTEXPR long double epsilon<long double>(const mpl::true_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) BOOST_MATH_NOEXCEPT(long double)
-{
- // numeric_limits on Darwin (and elsewhere) tells lies here:
- // the issue is that long double on a few platforms is
- // really a "double double" which has a non-contiguous
- // mantissa: 53 bits followed by an unspecified number of
- // zero bits, followed by 53 more bits. Thus the apparent
- // precision of the type varies depending where it's been.
- // Set epsilon to the value that a 106 bit fixed mantissa
- // type would have, as that will give us sensible behaviour everywhere.
- //
- // This static assert fails for some unknown reason, so
- // disabled for now...
- // BOOST_STATIC_ASSERT(std::numeric_limits<long double>::digits == 106);
- return 2.4651903288156618919116517665087e-32L;
-}
-#endif
-
-template <class T>
-inline T epsilon(const mpl::false_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
-{
- // Note: don't cache result as precision may vary at runtime:
- BOOST_MATH_STD_USING // for ADL of std names
- return ldexp(static_cast<T>(1), 1-policies::digits<T, policies::policy<> >());
-}
-
-template <class T>
-struct log_limit_traits
-{
- typedef typename mpl::if_c<
- (std::numeric_limits<T>::radix == 2) &&
- (std::numeric_limits<T>::max_exponent == 128
- || std::numeric_limits<T>::max_exponent == 1024
- || std::numeric_limits<T>::max_exponent == 16384),
- mpl::int_<(std::numeric_limits<T>::max_exponent > INT_MAX ? INT_MAX : static_cast<int>(std::numeric_limits<T>::max_exponent))>,
- mpl::int_<0>
- >::type tag_type;
- BOOST_STATIC_CONSTANT(bool, value = tag_type::value ? true : false);
- BOOST_STATIC_ASSERT(::std::numeric_limits<T>::is_specialized || (value == 0));
-};
-
-template <class T, bool b> struct log_limit_noexcept_traits_imp : public log_limit_traits<T> {};
-template <class T> struct log_limit_noexcept_traits_imp<T, false> : public boost::integral_constant<bool, false> {};
-
-template <class T>
-struct log_limit_noexcept_traits : public log_limit_noexcept_traits_imp<T, BOOST_MATH_IS_FLOAT(T)> {};
-
-} // namespace detail
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4309)
-#endif
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_NOEXCEPT_IF(detail::log_limit_noexcept_traits<T>::value)
-{
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- return detail::log_max_value<T>(typename detail::log_limit_traits<T>::tag_type());
-#else
- BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
- BOOST_MATH_STD_USING
- static const T val = log((std::numeric_limits<T>::max)());
- return val;
-#endif
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_NOEXCEPT_IF(detail::log_limit_noexcept_traits<T>::value)
-{
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- return detail::log_min_value<T>(typename detail::log_limit_traits<T>::tag_type());
-#else
- BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
- BOOST_MATH_STD_USING
- static const T val = log((std::numeric_limits<T>::min)());
- return val;
-#endif
-}
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_MATH_NOEXCEPT(T)
-{
-#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
- return detail::epsilon<T>(mpl::bool_< ::std::numeric_limits<T>::is_specialized>());
-#else
- return ::std::numeric_limits<T>::is_specialized ?
- detail::epsilon<T>(mpl::true_()) :
- detail::epsilon<T>(mpl::false_());
-#endif
-}
-
-namespace detail{
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T root_epsilon_imp(const mpl::int_<24>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.00034526698300124390839884978618400831996329879769945L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T root_epsilon_imp(const T*, const mpl::int_<53>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.1490116119384765625e-7L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T root_epsilon_imp(const T*, const mpl::int_<64>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.32927225399135962333569506281281311031656150598474e-9L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T root_epsilon_imp(const T*, const mpl::int_<113>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.1387778780781445675529539585113525390625e-16L);
-}
-
-template <class T, class Tag>
-inline T root_epsilon_imp(const T*, const Tag&)
-{
- BOOST_MATH_STD_USING
- static const T r_eps = sqrt(tools::epsilon<T>());
- return r_eps;
-}
-
-template <class T>
-inline T root_epsilon_imp(const T*, const mpl::int_<0>&)
-{
- BOOST_MATH_STD_USING
- return sqrt(tools::epsilon<T>());
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const mpl::int_<24>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.0049215666011518482998719164346805794944150447839903L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const T*, const mpl::int_<53>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(6.05545445239333906078989272793696693569753008995e-6L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const T*, const mpl::int_<64>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(4.76837158203125e-7L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const T*, const mpl::int_<113>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(5.7749313854154005630396773604745549542403508090496e-12L);
-}
-
-template <class T, class Tag>
-inline T cbrt_epsilon_imp(const T*, const Tag&)
-{
- BOOST_MATH_STD_USING;
- static const T cbrt_eps = pow(tools::epsilon<T>(), T(1) / 3);
- return cbrt_eps;
-}
-
-template <class T>
-inline T cbrt_epsilon_imp(const T*, const mpl::int_<0>&)
-{
- BOOST_MATH_STD_USING;
- return pow(tools::epsilon<T>(), T(1) / 3);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<24>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.018581361171917516667460937040007436176452688944747L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<53>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.0001220703125L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<64>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.18145860519450699870567321328132261891067079047605e-4L);
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<113>&) BOOST_MATH_NOEXCEPT(T)
-{
- return static_cast<T>(0.37252902984619140625e-8L);
-}
-
-template <class T, class Tag>
-inline T forth_root_epsilon_imp(const T*, const Tag&)
-{
- BOOST_MATH_STD_USING
- static const T r_eps = sqrt(sqrt(tools::epsilon<T>()));
- return r_eps;
-}
-
-template <class T>
-inline T forth_root_epsilon_imp(const T*, const mpl::int_<0>&)
-{
- BOOST_MATH_STD_USING
- return sqrt(sqrt(tools::epsilon<T>()));
-}
-
-template <class T>
-struct root_epsilon_traits
-{
- typedef mpl::int_< (::std::numeric_limits<T>::radix == 2) ? std::numeric_limits<T>::digits : 0> tag_type;
- BOOST_STATIC_CONSTANT(bool, has_noexcept = (tag_type::value == 113) || (tag_type::value == 64) || (tag_type::value == 53) || (tag_type::value == 24));
-};
-
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T root_epsilon() BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && detail::root_epsilon_traits<T>::has_noexcept)
-{
- return detail::root_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type());
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T cbrt_epsilon() BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && detail::root_epsilon_traits<T>::has_noexcept)
-{
- return detail::cbrt_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type());
-}
-
-template <class T>
-inline BOOST_MATH_CONSTEXPR T forth_root_epsilon() BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && detail::root_epsilon_traits<T>::has_noexcept)
-{
- return detail::forth_root_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type());
-}
-
-} // namespace tools
-} // namespace math
-} // namespace boost
-
-#endif // BOOST_MATH_TOOLS_PRECISION_INCLUDED
-
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/roots.hpp b/src/third_party/boost-1.68.0/boost/math/tools/roots.hpp
deleted file mode 100644
index 25300fee383..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/tools/roots.hpp
+++ /dev/null
@@ -1,563 +0,0 @@
-// (C) Copyright John Maddock 2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
-#define BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <utility>
-#include <boost/config/no_tr1/cmath.hpp>
-#include <stdexcept>
-
-#include <boost/math/tools/config.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/assert.hpp>
-#include <boost/throw_exception.hpp>
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4512)
-#endif
-#include <boost/math/tools/tuple.hpp>
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#include <boost/math/special_functions/sign.hpp>
-#include <boost/math/tools/toms748_solve.hpp>
-#include <boost/math/policies/error_handling.hpp>
-
-namespace boost{ namespace math{ namespace tools{
-
-namespace detail{
-
-namespace dummy{
-
- template<int n, class T>
- typename T::value_type get(const T&) BOOST_MATH_NOEXCEPT(T);
-}
-
-template <class Tuple, class T>
-void unpack_tuple(const Tuple& t, T& a, T& b) BOOST_MATH_NOEXCEPT(T)
-{
- using dummy::get;
- // Use ADL to find the right overload for get:
- a = get<0>(t);
- b = get<1>(t);
-}
-template <class Tuple, class T>
-void unpack_tuple(const Tuple& t, T& a, T& b, T& c) BOOST_MATH_NOEXCEPT(T)
-{
- using dummy::get;
- // Use ADL to find the right overload for get:
- a = get<0>(t);
- b = get<1>(t);
- c = get<2>(t);
-}
-
-template <class Tuple, class T>
-inline void unpack_0(const Tuple& t, T& val) BOOST_MATH_NOEXCEPT(T)
-{
- using dummy::get;
- // Rely on ADL to find the correct overload of get:
- val = get<0>(t);
-}
-
-template <class T, class U, class V>
-inline void unpack_tuple(const std::pair<T, U>& p, V& a, V& b) BOOST_MATH_NOEXCEPT(T)
-{
- a = p.first;
- b = p.second;
-}
-template <class T, class U, class V>
-inline void unpack_0(const std::pair<T, U>& p, V& a) BOOST_MATH_NOEXCEPT(T)
-{
- a = p.first;
-}
-
-template <class F, class T>
-void handle_zero_derivative(F f,
- T& last_f0,
- const T& f0,
- T& delta,
- T& result,
- T& guess,
- const T& min,
- const T& max) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- if(last_f0 == 0)
- {
- // this must be the first iteration, pretend that we had a
- // previous one at either min or max:
- if(result == min)
- {
- guess = max;
- }
- else
- {
- guess = min;
- }
- unpack_0(f(guess), last_f0);
- delta = guess - result;
- }
- if(sign(last_f0) * sign(f0) < 0)
- {
- // we've crossed over so move in opposite direction to last step:
- if(delta < 0)
- {
- delta = (result - min) / 2;
- }
- else
- {
- delta = (result - max) / 2;
- }
- }
- else
- {
- // move in same direction as last step:
- if(delta < 0)
- {
- delta = (result - max) / 2;
- }
- else
- {
- delta = (result - min) / 2;
- }
- }
-}
-
-} // namespace
-
-template <class F, class T, class Tol, class Policy>
-std::pair<T, T> bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter, const Policy& pol) BOOST_NOEXCEPT_IF(policies::is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- T fmin = f(min);
- T fmax = f(max);
- if(fmin == 0)
- {
- max_iter = 2;
- return std::make_pair(min, min);
- }
- if(fmax == 0)
- {
- max_iter = 2;
- return std::make_pair(max, max);
- }
-
- //
- // Error checking:
- //
- static const char* function = "boost::math::tools::bisect<%1%>";
- if(min >= max)
- {
- return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function,
- "Arguments in wrong order in boost::math::tools::bisect (first arg=%1%)", min, pol));
- }
- if(fmin * fmax >= 0)
- {
- return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function,
- "No change of sign in boost::math::tools::bisect, either there is no root to find, or there are multiple roots in the interval (f(min) = %1%).", fmin, pol));
- }
-
- //
- // Three function invocations so far:
- //
- boost::uintmax_t count = max_iter;
- if(count < 3)
- count = 0;
- else
- count -= 3;
-
- while(count && (0 == tol(min, max)))
- {
- T mid = (min + max) / 2;
- T fmid = f(mid);
- if((mid == max) || (mid == min))
- break;
- if(fmid == 0)
- {
- min = max = mid;
- break;
- }
- else if(sign(fmid) * sign(fmin) < 0)
- {
- max = mid;
- fmax = fmid;
- }
- else
- {
- min = mid;
- fmin = fmid;
- }
- --count;
- }
-
- max_iter -= count;
-
-#ifdef BOOST_MATH_INSTRUMENT
- std::cout << "Bisection iteration, final count = " << max_iter << std::endl;
-
- static boost::uintmax_t max_count = 0;
- if(max_iter > max_count)
- {
- max_count = max_iter;
- std::cout << "Maximum iterations: " << max_iter << std::endl;
- }
-#endif
-
- return std::make_pair(min, max);
-}
-
-template <class F, class T, class Tol>
-inline std::pair<T, T> bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(policies::is_noexcept_error_policy<policies::policy<> >::value && BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- return bisect(f, min, max, tol, max_iter, policies::policy<>());
-}
-
-template <class F, class T, class Tol>
-inline std::pair<T, T> bisect(F f, T min, T max, Tol tol) BOOST_NOEXCEPT_IF(policies::is_noexcept_error_policy<policies::policy<> >::value && BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
- return bisect(f, min, max, tol, m, policies::policy<>());
-}
-
-
-template <class F, class T>
-T newton_raphson_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- BOOST_MATH_STD_USING
-
- T f0(0), f1, last_f0(0);
- T result = guess;
-
- T factor = static_cast<T>(ldexp(1.0, 1 - digits));
- T delta = tools::max_value<T>();
- T delta1 = tools::max_value<T>();
- T delta2 = tools::max_value<T>();
-
- boost::uintmax_t count(max_iter);
-
- do{
- last_f0 = f0;
- delta2 = delta1;
- delta1 = delta;
- detail::unpack_tuple(f(result), f0, f1);
- --count;
- if(0 == f0)
- break;
- if(f1 == 0)
- {
- // Oops zero derivative!!!
-#ifdef BOOST_MATH_INSTRUMENT
- std::cout << "Newton iteration, zero derivative found" << std::endl;
-#endif
- detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max);
- }
- else
- {
- delta = f0 / f1;
- }
-#ifdef BOOST_MATH_INSTRUMENT
- std::cout << "Newton iteration, delta = " << delta << std::endl;
-#endif
- if(fabs(delta * 2) > fabs(delta2))
- {
- // last two steps haven't converged, try bisection:
- delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
- }
- guess = result;
- result -= delta;
- if(result <= min)
- {
- delta = 0.5F * (guess - min);
- result = guess - delta;
- if((result == min) || (result == max))
- break;
- }
- else if(result >= max)
- {
- delta = 0.5F * (guess - max);
- result = guess - delta;
- if((result == min) || (result == max))
- break;
- }
- // update brackets:
- if(delta > 0)
- max = guess;
- else
- min = guess;
- }while(count && (fabs(result * factor) < fabs(delta)));
-
- max_iter -= count;
-
-#ifdef BOOST_MATH_INSTRUMENT
- std::cout << "Newton Raphson iteration, final count = " << max_iter << std::endl;
-
- static boost::uintmax_t max_count = 0;
- if(max_iter > max_count)
- {
- max_count = max_iter;
- std::cout << "Maximum iterations: " << max_iter << std::endl;
- }
-#endif
-
- return result;
-}
-
-template <class F, class T>
-inline T newton_raphson_iterate(F f, T guess, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
- return newton_raphson_iterate(f, guess, min, max, digits, m);
-}
-
-namespace detail{
-
- struct halley_step
- {
- template <class T>
- static T step(const T& /*x*/, const T& f0, const T& f1, const T& f2) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T))
- {
- using std::fabs;
- T denom = 2 * f0;
- T num = 2 * f1 - f0 * (f2 / f1);
- T delta;
-
- BOOST_MATH_INSTRUMENT_VARIABLE(denom);
- BOOST_MATH_INSTRUMENT_VARIABLE(num);
-
- if((fabs(num) < 1) && (fabs(denom) >= fabs(num) * tools::max_value<T>()))
- {
- // possible overflow, use Newton step:
- delta = f0 / f1;
- }
- else
- delta = denom / num;
- return delta;
- }
- };
-
- template <class Stepper, class F, class T>
- T second_order_root_finder(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
- {
- BOOST_MATH_STD_USING
-
- T f0(0), f1, f2;
- T result = guess;
-
- T factor = static_cast<T>(ldexp(1.0, 1 - digits));
- T delta = (std::max)(T(10000000 * guess), T(10000000)); // arbitarily large delta
- T last_f0 = 0;
- T delta1 = delta;
- T delta2 = delta;
-
- bool out_of_bounds_sentry = false;
-
-#ifdef BOOST_MATH_INSTRUMENT
- std::cout << "Second order root iteration, limit = " << factor << std::endl;
-#endif
-
- boost::uintmax_t count(max_iter);
-
- do{
- last_f0 = f0;
- delta2 = delta1;
- delta1 = delta;
- detail::unpack_tuple(f(result), f0, f1, f2);
- --count;
-
- BOOST_MATH_INSTRUMENT_VARIABLE(f0);
- BOOST_MATH_INSTRUMENT_VARIABLE(f1);
- BOOST_MATH_INSTRUMENT_VARIABLE(f2);
-
- if(0 == f0)
- break;
- if(f1 == 0)
- {
- // Oops zero derivative!!!
-#ifdef BOOST_MATH_INSTRUMENT
- std::cout << "Second order root iteration, zero derivative found" << std::endl;
-#endif
- detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max);
- }
- else
- {
- if(f2 != 0)
- {
- delta = Stepper::step(result, f0, f1, f2);
- if(delta * f1 / f0 < 0)
- {
- // Oh dear, we have a problem as Newton and Halley steps
- // disagree about which way we should move. Probably
- // there is cancelation error in the calculation of the
- // Halley step, or else the derivatives are so small
- // that their values are basically trash. We will move
- // in the direction indicated by a Newton step, but
- // by no more than twice the current guess value, otherwise
- // we can jump way out of bounds if we're not careful.
- // See https://svn.boost.org/trac/boost/ticket/8314.
- delta = f0 / f1;
- if(fabs(delta) > 2 * fabs(guess))
- delta = (delta < 0 ? -1 : 1) * 2 * fabs(guess);
- }
- }
- else
- delta = f0 / f1;
- }
-#ifdef BOOST_MATH_INSTRUMENT
- std::cout << "Second order root iteration, delta = " << delta << std::endl;
-#endif
- T convergence = fabs(delta / delta2);
- if((convergence > 0.8) && (convergence < 2))
- {
- // last two steps haven't converged, try bisection:
- delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
- if(fabs(delta) > result)
- delta = sign(delta) * result; // protect against huge jumps!
- // reset delta2 so that this branch will *not* be taken on the
- // next iteration:
- delta2 = delta * 3;
- BOOST_MATH_INSTRUMENT_VARIABLE(delta);
- }
- guess = result;
- result -= delta;
- BOOST_MATH_INSTRUMENT_VARIABLE(result);
-
- // check for out of bounds step:
- if(result < min)
- {
- T diff = ((fabs(min) < 1) && (fabs(result) > 1) && (tools::max_value<T>() / fabs(result) < fabs(min))) ? T(1000) : T(result / min);
- if(fabs(diff) < 1)
- diff = 1 / diff;
- if(!out_of_bounds_sentry && (diff > 0) && (diff < 3))
- {
- // Only a small out of bounds step, lets assume that the result
- // is probably approximately at min:
- delta = 0.99f * (guess - min);
- result = guess - delta;
- out_of_bounds_sentry = true; // only take this branch once!
- }
- else
- {
- delta = (guess - min) / 2;
- result = guess - delta;
- if((result == min) || (result == max))
- break;
- }
- }
- else if(result > max)
- {
- T diff = ((fabs(max) < 1) && (fabs(result) > 1) && (tools::max_value<T>() / fabs(result) < fabs(max))) ? T(1000) : T(result / max);
- if(fabs(diff) < 1)
- diff = 1 / diff;
- if(!out_of_bounds_sentry && (diff > 0) && (diff < 3))
- {
- // Only a small out of bounds step, lets assume that the result
- // is probably approximately at min:
- delta = 0.99f * (guess - max);
- result = guess - delta;
- out_of_bounds_sentry = true; // only take this branch once!
- }
- else
- {
- delta = (guess - max) / 2;
- result = guess - delta;
- if((result == min) || (result == max))
- break;
- }
- }
- // update brackets:
- if(delta > 0)
- max = guess;
- else
- min = guess;
- } while(count && (fabs(result * factor) < fabs(delta)));
-
- max_iter -= count;
-
-#ifdef BOOST_MATH_INSTRUMENT
- std::cout << "Second order root iteration, final count = " << max_iter << std::endl;
-#endif
-
- return result;
- }
-
-}
-
-template <class F, class T>
-T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- return detail::second_order_root_finder<detail::halley_step>(f, guess, min, max, digits, max_iter);
-}
-
-template <class F, class T>
-inline T halley_iterate(F f, T guess, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
- return halley_iterate(f, guess, min, max, digits, m);
-}
-
-namespace detail{
-
- struct schroder_stepper
- {
- template <class T>
- static T step(const T& x, const T& f0, const T& f1, const T& f2) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T))
- {
- T ratio = f0 / f1;
- T delta;
- if(ratio / x < 0.1)
- {
- delta = ratio + (f2 / (2 * f1)) * ratio * ratio;
- // check second derivative doesn't over compensate:
- if(delta * ratio < 0)
- delta = ratio;
- }
- else
- delta = ratio; // fall back to Newton iteration.
- return delta;
- }
- };
-
-}
-
-template <class F, class T>
-T schroder_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- return detail::second_order_root_finder<detail::schroder_stepper>(f, guess, min, max, digits, max_iter);
-}
-
-template <class F, class T>
-inline T schroder_iterate(F f, T guess, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
- return schroder_iterate(f, guess, min, max, digits, m);
-}
-//
-// These two are the old spelling of this function, retained for backwards compatibity just in case:
-//
-template <class F, class T>
-T schroeder_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- return detail::second_order_root_finder<detail::schroder_stepper>(f, guess, min, max, digits, max_iter);
-}
-
-template <class F, class T>
-inline T schroeder_iterate(F f, T guess, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
-{
- boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
- return schroder_iterate(f, guess, min, max, digits, m);
-}
-
-
-} // namespace tools
-} // namespace math
-} // namespace boost
-
-#endif // BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/series.hpp b/src/third_party/boost-1.68.0/boost/math/tools/series.hpp
deleted file mode 100644
index ab01549a2dc..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/tools/series.hpp
+++ /dev/null
@@ -1,158 +0,0 @@
-// (C) Copyright John Maddock 2005-2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_TOOLS_SERIES_INCLUDED
-#define BOOST_MATH_TOOLS_SERIES_INCLUDED
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/config/no_tr1/cmath.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/limits.hpp>
-#include <boost/math/tools/config.hpp>
-
-namespace boost{ namespace math{ namespace tools{
-
-//
-// Simple series summation come first:
-//
-template <class Functor, class U, class V>
-inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms, const V& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
-{
- BOOST_MATH_STD_USING
-
- typedef typename Functor::result_type result_type;
-
- boost::uintmax_t counter = max_terms;
-
- result_type result = init_value;
- result_type next_term;
- do{
- next_term = func();
- result += next_term;
- }
- while((fabs(factor * result) < fabs(next_term)) && --counter);
-
- // set max_terms to the actual number of terms of the series evaluated:
- max_terms = max_terms - counter;
-
- return result;
-}
-
-template <class Functor, class U>
-inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
-{
- typename Functor::result_type init_value = 0;
- return sum_series(func, factor, max_terms, init_value);
-}
-
-template <class Functor, class U>
-inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms, const U& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
-{
- BOOST_MATH_STD_USING
- typedef typename Functor::result_type result_type;
- result_type factor = ldexp(result_type(1), 1 - bits);
- return sum_series(func, factor, max_terms, init_value);
-}
-
-template <class Functor>
-inline typename Functor::result_type sum_series(Functor& func, int bits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
-{
- BOOST_MATH_STD_USING
- typedef typename Functor::result_type result_type;
- boost::uintmax_t iters = (std::numeric_limits<boost::uintmax_t>::max)();
- result_type init_val = 0;
- return sum_series(func, bits, iters, init_val);
-}
-
-template <class Functor>
-inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
-{
- BOOST_MATH_STD_USING
- typedef typename Functor::result_type result_type;
- result_type init_val = 0;
- return sum_series(func, bits, max_terms, init_val);
-}
-
-template <class Functor, class U>
-inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
-{
- BOOST_MATH_STD_USING
- boost::uintmax_t iters = (std::numeric_limits<boost::uintmax_t>::max)();
- return sum_series(func, bits, iters, init_value);
-}
-
-//
-// Algorithm kahan_sum_series invokes Functor func until the N'th
-// term is too small to have any effect on the total, the terms
-// are added using the Kahan summation method.
-//
-// CAUTION: Optimizing compilers combined with extended-precision
-// machine registers conspire to render this algorithm partly broken:
-// double rounding of intermediate terms (first to a long double machine
-// register, and then to a double result) cause the rounding error computed
-// by the algorithm to be off by up to 1ulp. However this occurs rarely, and
-// in any case the result is still much better than a naive summation.
-//
-template <class Functor>
-inline typename Functor::result_type kahan_sum_series(Functor& func, int bits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
-{
- BOOST_MATH_STD_USING
-
- typedef typename Functor::result_type result_type;
-
- result_type factor = pow(result_type(2), bits);
- result_type result = func();
- result_type next_term, y, t;
- result_type carry = 0;
- do{
- next_term = func();
- y = next_term - carry;
- t = result + y;
- carry = t - result;
- carry -= y;
- result = t;
- }
- while(fabs(result) < fabs(factor * next_term));
- return result;
-}
-
-template <class Functor>
-inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
-{
- BOOST_MATH_STD_USING
-
- typedef typename Functor::result_type result_type;
-
- boost::uintmax_t counter = max_terms;
-
- result_type factor = ldexp(result_type(1), bits);
- result_type result = func();
- result_type next_term, y, t;
- result_type carry = 0;
- do{
- next_term = func();
- y = next_term - carry;
- t = result + y;
- carry = t - result;
- carry -= y;
- result = t;
- }
- while((fabs(result) < fabs(factor * next_term)) && --counter);
-
- // set max_terms to the actual number of terms of the series evaluated:
- max_terms = max_terms - counter;
-
- return result;
-}
-
-} // namespace tools
-} // namespace math
-} // namespace boost
-
-#endif // BOOST_MATH_TOOLS_SERIES_INCLUDED
-
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/toms748_solve.hpp b/src/third_party/boost-1.68.0/boost/math/tools/toms748_solve.hpp
deleted file mode 100644
index aee6258e11c..00000000000
--- a/src/third_party/boost-1.68.0/boost/math/tools/toms748_solve.hpp
+++ /dev/null
@@ -1,613 +0,0 @@
-// (C) Copyright John Maddock 2006.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
-#define BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
-
-#ifdef _MSC_VER
-#pragma once
-#endif
-
-#include <boost/math/tools/precision.hpp>
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/math/tools/config.hpp>
-#include <boost/math/special_functions/sign.hpp>
-#include <boost/cstdint.hpp>
-#include <limits>
-
-#ifdef BOOST_MATH_LOG_ROOT_ITERATIONS
-# define BOOST_MATH_LOGGER_INCLUDE <boost/math/tools/iteration_logger.hpp>
-# include BOOST_MATH_LOGGER_INCLUDE
-# undef BOOST_MATH_LOGGER_INCLUDE
-#else
-# define BOOST_MATH_LOG_COUNT(count)
-#endif
-
-namespace boost{ namespace math{ namespace tools{
-
-template <class T>
-class eps_tolerance
-{
-public:
- eps_tolerance()
- {
- eps = 4 * tools::epsilon<T>();
- }
- eps_tolerance(unsigned bits)
- {
- BOOST_MATH_STD_USING
- eps = (std::max)(T(ldexp(1.0F, 1-bits)), T(4 * tools::epsilon<T>()));
- }
- bool operator()(const T& a, const T& b)
- {
- BOOST_MATH_STD_USING
- return fabs(a - b) <= (eps * (std::min)(fabs(a), fabs(b)));
- }
-private:
- T eps;
-};
-
-struct equal_floor
-{
- equal_floor(){}
- template <class T>
- bool operator()(const T& a, const T& b)
- {
- BOOST_MATH_STD_USING
- return floor(a) == floor(b);
- }
-};
-
-struct equal_ceil
-{
- equal_ceil(){}
- template <class T>
- bool operator()(const T& a, const T& b)
- {
- BOOST_MATH_STD_USING
- return ceil(a) == ceil(b);
- }
-};
-
-struct equal_nearest_integer
-{
- equal_nearest_integer(){}
- template <class T>
- bool operator()(const T& a, const T& b)
- {
- BOOST_MATH_STD_USING
- return floor(a + 0.5f) == floor(b + 0.5f);
- }
-};
-
-namespace detail{
-
-template <class F, class T>
-void bracket(F f, T& a, T& b, T c, T& fa, T& fb, T& d, T& fd)
-{
- //
- // Given a point c inside the existing enclosing interval
- // [a, b] sets a = c if f(c) == 0, otherwise finds the new
- // enclosing interval: either [a, c] or [c, b] and sets
- // d and fd to the point that has just been removed from
- // the interval. In other words d is the third best guess
- // to the root.
- //
- BOOST_MATH_STD_USING // For ADL of std math functions
- T tol = tools::epsilon<T>() * 2;
- //
- // If the interval [a,b] is very small, or if c is too close
- // to one end of the interval then we need to adjust the
- // location of c accordingly:
- //
- if((b - a) < 2 * tol * a)
- {
- c = a + (b - a) / 2;
- }
- else if(c <= a + fabs(a) * tol)
- {
- c = a + fabs(a) * tol;
- }
- else if(c >= b - fabs(b) * tol)
- {
- c = b - fabs(b) * tol;
- }
- //
- // OK, lets invoke f(c):
- //
- T fc = f(c);
- //
- // if we have a zero then we have an exact solution to the root:
- //
- if(fc == 0)
- {
- a = c;
- fa = 0;
- d = 0;
- fd = 0;
- return;
- }
- //
- // Non-zero fc, update the interval:
- //
- if(boost::math::sign(fa) * boost::math::sign(fc) < 0)
- {
- d = b;
- fd = fb;
- b = c;
- fb = fc;
- }
- else
- {
- d = a;
- fd = fa;
- a = c;
- fa= fc;
- }
-}
-
-template <class T>
-inline T safe_div(T num, T denom, T r)
-{
- //
- // return num / denom without overflow,
- // return r if overflow would occur.
- //
- BOOST_MATH_STD_USING // For ADL of std math functions
-
- if(fabs(denom) < 1)
- {
- if(fabs(denom * tools::max_value<T>()) <= fabs(num))
- return r;
- }
- return num / denom;
-}
-
-template <class T>
-inline T secant_interpolate(const T& a, const T& b, const T& fa, const T& fb)
-{
- //
- // Performs standard secant interpolation of [a,b] given
- // function evaluations f(a) and f(b). Performs a bisection
- // if secant interpolation would leave us very close to either
- // a or b. Rationale: we only call this function when at least
- // one other form of interpolation has already failed, so we know
- // that the function is unlikely to be smooth with a root very
- // close to a or b.
- //
- BOOST_MATH_STD_USING // For ADL of std math functions
-
- T tol = tools::epsilon<T>() * 5;
- T c = a - (fa / (fb - fa)) * (b - a);
- if((c <= a + fabs(a) * tol) || (c >= b - fabs(b) * tol))
- return (a + b) / 2;
- return c;
-}
-
-template <class T>
-T quadratic_interpolate(const T& a, const T& b, T const& d,
- const T& fa, const T& fb, T const& fd,
- unsigned count)
-{
- //
- // Performs quadratic interpolation to determine the next point,
- // takes count Newton steps to find the location of the
- // quadratic polynomial.
- //
- // Point d must lie outside of the interval [a,b], it is the third
- // best approximation to the root, after a and b.
- //
- // Note: this does not guarantee to find a root
- // inside [a, b], so we fall back to a secant step should
- // the result be out of range.
- //
- // Start by obtaining the coefficients of the quadratic polynomial:
- //
- T B = safe_div(T(fb - fa), T(b - a), tools::max_value<T>());
- T A = safe_div(T(fd - fb), T(d - b), tools::max_value<T>());
- A = safe_div(T(A - B), T(d - a), T(0));
-
- if(A == 0)
- {
- // failure to determine coefficients, try a secant step:
- return secant_interpolate(a, b, fa, fb);
- }
- //
- // Determine the starting point of the Newton steps:
- //
- T c;
- if(boost::math::sign(A) * boost::math::sign(fa) > 0)
- {
- c = a;
- }
- else
- {
- c = b;
- }
- //
- // Take the Newton steps:
- //
- for(unsigned i = 1; i <= count; ++i)
- {
- //c -= safe_div(B * c, (B + A * (2 * c - a - b)), 1 + c - a);
- c -= safe_div(T(fa+(B+A*(c-b))*(c-a)), T(B + A * (2 * c - a - b)), T(1 + c - a));
- }
- if((c <= a) || (c >= b))
- {
- // Oops, failure, try a secant step:
- c = secant_interpolate(a, b, fa, fb);
- }
- return c;
-}
-
-template <class T>
-T cubic_interpolate(const T& a, const T& b, const T& d,
- const T& e, const T& fa, const T& fb,
- const T& fd, const T& fe)
-{
- //
- // Uses inverse cubic interpolation of f(x) at points
- // [a,b,d,e] to obtain an approximate root of f(x).
- // Points d and e lie outside the interval [a,b]
- // and are the third and forth best approximations
- // to the root that we have found so far.
- //
- // Note: this does not guarantee to find a root
- // inside [a, b], so we fall back to quadratic
- // interpolation in case of an erroneous result.
- //
- BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b
- << " d = " << d << " e = " << e << " fa = " << fa << " fb = " << fb
- << " fd = " << fd << " fe = " << fe);
- T q11 = (d - e) * fd / (fe - fd);
- T q21 = (b - d) * fb / (fd - fb);
- T q31 = (a - b) * fa / (fb - fa);
- T d21 = (b - d) * fd / (fd - fb);
- T d31 = (a - b) * fb / (fb - fa);
- BOOST_MATH_INSTRUMENT_CODE(
- "q11 = " << q11 << " q21 = " << q21 << " q31 = " << q31
- << " d21 = " << d21 << " d31 = " << d31);
- T q22 = (d21 - q11) * fb / (fe - fb);
- T q32 = (d31 - q21) * fa / (fd - fa);
- T d32 = (d31 - q21) * fd / (fd - fa);
- T q33 = (d32 - q22) * fa / (fe - fa);
- T c = q31 + q32 + q33 + a;
- BOOST_MATH_INSTRUMENT_CODE(
- "q22 = " << q22 << " q32 = " << q32 << " d32 = " << d32
- << " q33 = " << q33 << " c = " << c);
-
- if((c <= a) || (c >= b))
- {
- // Out of bounds step, fall back to quadratic interpolation:
- c = quadratic_interpolate(a, b, d, fa, fb, fd, 3);
- BOOST_MATH_INSTRUMENT_CODE(
- "Out of bounds interpolation, falling back to quadratic interpolation. c = " << c);
- }
-
- return c;
-}
-
-} // namespace detail
-
-template <class F, class T, class Tol, class Policy>
-std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
-{
- //
- // Main entry point and logic for Toms Algorithm 748
- // root finder.
- //
- BOOST_MATH_STD_USING // For ADL of std math functions
-
- static const char* function = "boost::math::tools::toms748_solve<%1%>";
-
- boost::uintmax_t count = max_iter;
- T a, b, fa, fb, c, u, fu, a0, b0, d, fd, e, fe;
- static const T mu = 0.5f;
-
- // initialise a, b and fa, fb:
- a = ax;
- b = bx;
- if(a >= b)
- return boost::math::detail::pair_from_single(policies::raise_domain_error(
- function,
- "Parameters a and b out of order: a=%1%", a, pol));
- fa = fax;
- fb = fbx;
-
- if(tol(a, b) || (fa == 0) || (fb == 0))
- {
- max_iter = 0;
- if(fa == 0)
- b = a;
- else if(fb == 0)
- a = b;
- return std::make_pair(a, b);
- }
-
- if(boost::math::sign(fa) * boost::math::sign(fb) > 0)
- return boost::math::detail::pair_from_single(policies::raise_domain_error(
- function,
- "Parameters a and b do not bracket the root: a=%1%", a, pol));
- // dummy value for fd, e and fe:
- fe = e = fd = 1e5F;
-
- if(fa != 0)
- {
- //
- // On the first step we take a secant step:
- //
- c = detail::secant_interpolate(a, b, fa, fb);
- detail::bracket(f, a, b, c, fa, fb, d, fd);
- --count;
- BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
-
- if(count && (fa != 0) && !tol(a, b))
- {
- //
- // On the second step we take a quadratic interpolation:
- //
- c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 2);
- e = d;
- fe = fd;
- detail::bracket(f, a, b, c, fa, fb, d, fd);
- --count;
- BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
- }
- }
-
- while(count && (fa != 0) && !tol(a, b))
- {
- // save our brackets:
- a0 = a;
- b0 = b;
- //
- // Starting with the third step taken
- // we can use either quadratic or cubic interpolation.
- // Cubic interpolation requires that all four function values
- // fa, fb, fd, and fe are distinct, should that not be the case
- // then variable prof will get set to true, and we'll end up
- // taking a quadratic step instead.
- //
- T min_diff = tools::min_value<T>() * 32;
- bool prof = (fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb - fd) < min_diff) || (fabs(fb - fe) < min_diff) || (fabs(fd - fe) < min_diff);
- if(prof)
- {
- c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 2);
- BOOST_MATH_INSTRUMENT_CODE("Can't take cubic step!!!!");
- }
- else
- {
- c = detail::cubic_interpolate(a, b, d, e, fa, fb, fd, fe);
- }
- //
- // re-bracket, and check for termination:
- //
- e = d;
- fe = fd;
- detail::bracket(f, a, b, c, fa, fb, d, fd);
- if((0 == --count) || (fa == 0) || tol(a, b))
- break;
- BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
- //
- // Now another interpolated step:
- //
- prof = (fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb - fd) < min_diff) || (fabs(fb - fe) < min_diff) || (fabs(fd - fe) < min_diff);
- if(prof)
- {
- c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 3);
- BOOST_MATH_INSTRUMENT_CODE("Can't take cubic step!!!!");
- }
- else
- {
- c = detail::cubic_interpolate(a, b, d, e, fa, fb, fd, fe);
- }
- //
- // Bracket again, and check termination condition, update e:
- //
- detail::bracket(f, a, b, c, fa, fb, d, fd);
- if((0 == --count) || (fa == 0) || tol(a, b))
- break;
- BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
- //
- // Now we take a double-length secant step:
- //
- if(fabs(fa) < fabs(fb))
- {
- u = a;
- fu = fa;
- }
- else
- {
- u = b;
- fu = fb;
- }
- c = u - 2 * (fu / (fb - fa)) * (b - a);
- if(fabs(c - u) > (b - a) / 2)
- {
- c = a + (b - a) / 2;
- }
- //
- // Bracket again, and check termination condition:
- //
- e = d;
- fe = fd;
- detail::bracket(f, a, b, c, fa, fb, d, fd);
- BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
- BOOST_MATH_INSTRUMENT_CODE(" tol = " << T((fabs(a) - fabs(b)) / fabs(a)));
- if((0 == --count) || (fa == 0) || tol(a, b))
- break;
- //
- // And finally... check to see if an additional bisection step is
- // to be taken, we do this if we're not converging fast enough:
- //
- if((b - a) < mu * (b0 - a0))
- continue;
- //
- // bracket again on a bisection:
- //
- e = d;
- fe = fd;
- detail::bracket(f, a, b, T(a + (b - a) / 2), fa, fb, d, fd);
- --count;
- BOOST_MATH_INSTRUMENT_CODE("Not converging: Taking a bisection!!!!");
- BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
- } // while loop
-
- max_iter -= count;
- if(fa == 0)
- {
- b = a;
- }
- else if(fb == 0)
- {
- a = b;
- }
- BOOST_MATH_LOG_COUNT(max_iter)
- return std::make_pair(a, b);
-}
-
-template <class F, class T, class Tol>
-inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter)
-{
- return toms748_solve(f, ax, bx, fax, fbx, tol, max_iter, policies::policy<>());
-}
-
-template <class F, class T, class Tol, class Policy>
-inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
-{
- max_iter -= 2;
- std::pair<T, T> r = toms748_solve(f, ax, bx, f(ax), f(bx), tol, max_iter, pol);
- max_iter += 2;
- return r;
-}
-
-template <class F, class T, class Tol>
-inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter)
-{
- return toms748_solve(f, ax, bx, tol, max_iter, policies::policy<>());
-}
-
-template <class F, class T, class Tol, class Policy>
-std::pair<T, T> bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
-{
- BOOST_MATH_STD_USING
- static const char* function = "boost::math::tools::bracket_and_solve_root<%1%>";
- //
- // Set up inital brackets:
- //
- T a = guess;
- T b = a;
- T fa = f(a);
- T fb = fa;
- //
- // Set up invocation count:
- //
- boost::uintmax_t count = max_iter - 1;
-
- int step = 32;
-
- if((fa < 0) == (guess < 0 ? !rising : rising))
- {
- //
- // Zero is to the right of b, so walk upwards
- // until we find it:
- //
- while((boost::math::sign)(fb) == (boost::math::sign)(fa))
- {
- if(count == 0)
- return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", b, pol));
- //
- // Heuristic: normally it's best not to increase the step sizes as we'll just end up
- // with a really wide range to search for the root. However, if the initial guess was *really*
- // bad then we need to speed up the search otherwise we'll take forever if we're orders of
- // magnitude out. This happens most often if the guess is a small value (say 1) and the result
- // we're looking for is close to std::numeric_limits<T>::min().
- //
- if((max_iter - count) % step == 0)
- {
- factor *= 2;
- if(step > 1) step /= 2;
- }
- //
- // Now go ahead and move our guess by "factor":
- //
- a = b;
- fa = fb;
- b *= factor;
- fb = f(b);
- --count;
- BOOST_MATH_INSTRUMENT_CODE("a = " << a << " b = " << b << " fa = " << fa << " fb = " << fb << " count = " << count);
- }
- }
- else
- {
- //
- // Zero is to the left of a, so walk downwards
- // until we find it:
- //
- while((boost::math::sign)(fb) == (boost::math::sign)(fa))
- {
- if(fabs(a) < tools::min_value<T>())
- {
- // Escape route just in case the answer is zero!
- max_iter -= count;
- max_iter += 1;
- return a > 0 ? std::make_pair(T(0), T(a)) : std::make_pair(T(a), T(0));
- }
- if(count == 0)
- return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, pol));
- //
- // Heuristic: normally it's best not to increase the step sizes as we'll just end up
- // with a really wide range to search for the root. However, if the initial guess was *really*
- // bad then we need to speed up the search otherwise we'll take forever if we're orders of
- // magnitude out. This happens most often if the guess is a small value (say 1) and the result
- // we're looking for is close to std::numeric_limits<T>::min().
- //
- if((max_iter - count) % step == 0)
- {
- factor *= 2;
- if(step > 1) step /= 2;
- }
- //
- // Now go ahead and move are guess by "factor":
- //
- b = a;
- fb = fa;
- a /= factor;
- fa = f(a);
- --count;
- BOOST_MATH_INSTRUMENT_CODE("a = " << a << " b = " << b << " fa = " << fa << " fb = " << fb << " count = " << count);
- }
- }
- max_iter -= count;
- max_iter += 1;
- std::pair<T, T> r = toms748_solve(
- f,
- (a < 0 ? b : a),
- (a < 0 ? a : b),
- (a < 0 ? fb : fa),
- (a < 0 ? fa : fb),
- tol,
- count,
- pol);
- max_iter += count;
- BOOST_MATH_INSTRUMENT_CODE("max_iter = " << max_iter << " count = " << count);
- BOOST_MATH_LOG_COUNT(max_iter)
- return r;
-}
-
-template <class F, class T, class Tol>
-inline std::pair<T, T> bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, boost::uintmax_t& max_iter)
-{
- return bracket_and_solve_root(f, guess, factor, rising, tol, max_iter, policies::policy<>());
-}
-
-} // namespace tools
-} // namespace math
-} // namespace boost
-
-
-#endif // BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/move.hpp b/src/third_party/boost-1.68.0/boost/move/algo/move.hpp
deleted file mode 100644
index 2390877a43b..00000000000
--- a/src/third_party/boost-1.68.0/boost/move/algo/move.hpp
+++ /dev/null
@@ -1,156 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2012-2016.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! \file
-
-#ifndef BOOST_MOVE_ALGO_MOVE_HPP
-#define BOOST_MOVE_ALGO_MOVE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/move/detail/config_begin.hpp>
-
-#include <boost/move/utility_core.hpp>
-#include <boost/move/detail/iterator_traits.hpp>
-#include <boost/move/detail/iterator_to_raw_pointer.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-
-namespace boost {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// move
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
-
- //! <b>Effects</b>: Moves elements in the range [first,last) into the range [result,result + (last -
- //! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first),
- //! performs *(result + n) = ::boost::move (*(first + n)).
- //!
- //! <b>Effects</b>: result + (last - first).
- //!
- //! <b>Requires</b>: result shall not be in the range [first,last).
- //!
- //! <b>Complexity</b>: Exactly last - first move assignments.
- template <typename I, // I models InputIterator
- typename O> // O models OutputIterator
- O move(I f, I l, O result)
- {
- while (f != l) {
- *result = ::boost::move(*f);
- ++f; ++result;
- }
- return result;
- }
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // move_backward
- //
- //////////////////////////////////////////////////////////////////////////////
-
- //! <b>Effects</b>: Moves elements in the range [first,last) into the range
- //! [result - (last-first),result) starting from last - 1 and proceeding to
- //! first. For each positive integer n <= (last - first),
- //! performs *(result - n) = ::boost::move(*(last - n)).
- //!
- //! <b>Requires</b>: result shall not be in the range [first,last).
- //!
- //! <b>Returns</b>: result - (last - first).
- //!
- //! <b>Complexity</b>: Exactly last - first assignments.
- template <typename I, // I models BidirectionalIterator
- typename O> // O models BidirectionalIterator
- O move_backward(I f, I l, O result)
- {
- while (f != l) {
- --l; --result;
- *result = ::boost::move(*l);
- }
- return result;
- }
-
-#else
-
- using ::std::move_backward;
-
-#endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_move
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; first != last; ++result, ++first)
-//! new (static_cast<void*>(&*result))
-//! typename iterator_traits<ForwardIterator>::value_type(boost::move(*first));
-//! \endcode
-//!
-//! <b>Returns</b>: result
-template
- <typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-F uninitialized_move(I f, I l, F r
- /// @cond
-// ,typename ::boost::move_detail::enable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0
- /// @endcond
- )
-{
- typedef typename boost::movelib::iterator_traits<I>::value_type input_value_type;
-
- F back = r;
- BOOST_TRY{
- while (f != l) {
- void * const addr = static_cast<void*>(::boost::move_detail::addressof(*r));
- ::new(addr) input_value_type(::boost::move(*f));
- ++f; ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- boost::movelib::iterator_to_raw_pointer(back)->~input_value_type();
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-/// @cond
-/*
-template
- <typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-F uninitialized_move(I f, I l, F r,
- typename ::boost::move_detail::disable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0)
-{
- return std::uninitialized_copy(f, l, r);
-}
-*/
-
-/// @endcond
-
-} //namespace boost {
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_MOVE_ALGO_MOVE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/move/algorithm.hpp b/src/third_party/boost-1.68.0/boost/move/algorithm.hpp
deleted file mode 100644
index 825d7716c23..00000000000
--- a/src/third_party/boost-1.68.0/boost/move/algorithm.hpp
+++ /dev/null
@@ -1,167 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2012-2012.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! \file
-
-#ifndef BOOST_MOVE_ALGORITHM_HPP
-#define BOOST_MOVE_ALGORITHM_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/move/detail/config_begin.hpp>
-
-#include <boost/move/utility_core.hpp>
-#include <boost/move/iterator.hpp>
-#include <boost/move/algo/move.hpp>
-#include <boost/detail/no_exceptions_support.hpp>
-
-#include <algorithm> //copy, copy_backward
-#include <memory> //uninitialized_copy
-
-namespace boost {
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_copy_or_move
-//
-//////////////////////////////////////////////////////////////////////////////
-
-namespace move_detail {
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline F uninitialized_move_move_iterator(I f, I l, F r
-// ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0
-)
-{
- return ::boost::uninitialized_move(f, l, r);
-}
-/*
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-F uninitialized_move_move_iterator(I f, I l, F r,
- typename ::boost::move_detail::disable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0)
-{
- return std::uninitialized_copy(f.base(), l.base(), r);
-}
-*/
-} //namespace move_detail {
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline F uninitialized_copy_or_move(I f, I l, F r,
- typename ::boost::move_detail::enable_if< move_detail::is_move_iterator<I> >::type* = 0)
-{
- return ::boost::move_detail::uninitialized_move_move_iterator(f, l, r);
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// copy_or_move
-//
-//////////////////////////////////////////////////////////////////////////////
-
-namespace move_detail {
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline F move_move_iterator(I f, I l, F r
-// ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0
-)
-{
- return ::boost::move(f, l, r);
-}
-/*
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-F move_move_iterator(I f, I l, F r,
- typename ::boost::move_detail::disable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0)
-{
- return std::copy(f.base(), l.base(), r);
-}
-*/
-
-} //namespace move_detail {
-
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline F copy_or_move(I f, I l, F r,
- typename ::boost::move_detail::enable_if< move_detail::is_move_iterator<I> >::type* = 0)
-{
- return ::boost::move_detail::move_move_iterator(f, l, r);
-}
-
-/// @endcond
-
-//! <b>Effects</b>:
-//! \code
-//! for (; first != last; ++result, ++first)
-//! new (static_cast<void*>(&*result))
-//! typename iterator_traits<ForwardIterator>::value_type(*first);
-//! \endcode
-//!
-//! <b>Returns</b>: result
-//!
-//! <b>Note</b>: This function is provided because
-//! <i>std::uninitialized_copy</i> from some STL implementations
-//! is not compatible with <i>move_iterator</i>
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline F uninitialized_copy_or_move(I f, I l, F r
- /// @cond
- ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator<I> >::type* = 0
- /// @endcond
- )
-{
- return std::uninitialized_copy(f, l, r);
-}
-
-//! <b>Effects</b>:
-//! \code
-//! for (; first != last; ++result, ++first)
-//! *result = *first;
-//! \endcode
-//!
-//! <b>Returns</b>: result
-//!
-//! <b>Note</b>: This function is provided because
-//! <i>std::uninitialized_copy</i> from some STL implementations
-//! is not compatible with <i>move_iterator</i>
-template
-<typename I, // I models InputIterator
-typename F> // F models ForwardIterator
-inline F copy_or_move(I f, I l, F r
- /// @cond
- ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator<I> >::type* = 0
- /// @endcond
- )
-{
- return std::copy(f, l, r);
-}
-
-} //namespace boost {
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_MOVE_ALGORITHM_HPP
diff --git a/src/third_party/boost-1.68.0/boost/move/core.hpp b/src/third_party/boost-1.68.0/boost/move/core.hpp
deleted file mode 100644
index c0f5be59d47..00000000000
--- a/src/third_party/boost-1.68.0/boost/move/core.hpp
+++ /dev/null
@@ -1,490 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2012-2012.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! \file
-//! This header implements macros to define movable classes and
-//! move-aware functions
-
-#ifndef BOOST_MOVE_CORE_HPP
-#define BOOST_MOVE_CORE_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/move/detail/config_begin.hpp>
-#include <boost/move/detail/workaround.hpp>
-
-// @cond
-
-//boost_move_no_copy_constructor_or_assign typedef
-//used to detect noncopyable types for other Boost libraries.
-#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
- #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \
- private:\
- TYPE(TYPE &);\
- TYPE& operator=(TYPE &);\
- public:\
- typedef int boost_move_no_copy_constructor_or_assign; \
- private:\
- //
-#else
- #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \
- public:\
- TYPE(TYPE const &) = delete;\
- TYPE& operator=(TYPE const &) = delete;\
- public:\
- typedef int boost_move_no_copy_constructor_or_assign; \
- private:\
- //
-#endif //BOOST_NO_CXX11_DELETED_FUNCTIONS
-
-// @endcond
-
-#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
-
- #include <boost/move/detail/type_traits.hpp>
-
- #define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) reinterpret_cast<RV_TYPE>(ARG)
-
- //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
- #define BOOST_MOVE_ATTRIBUTE_MAY_ALIAS BOOST_MAY_ALIAS
-
- namespace boost {
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // struct rv
- //
- //////////////////////////////////////////////////////////////////////////////
- template <class T>
- class rv
- : public ::boost::move_detail::if_c
- < ::boost::move_detail::is_class<T>::value
- , T
- , ::boost::move_detail::nat
- >::type
- {
- rv();
- ~rv() throw();
- rv(rv const&);
- void operator=(rv const&);
- } BOOST_MOVE_ATTRIBUTE_MAY_ALIAS;
-
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // is_rv
- //
- //////////////////////////////////////////////////////////////////////////////
-
- namespace move_detail {
-
- template <class T>
- struct is_rv
- //Derive from integral constant because some Boost code assummes it has
- //a "type" internal typedef
- : integral_constant<bool, ::boost::move_detail::is_rv_impl<T>::value >
- {};
-
- template <class T>
- struct is_not_rv
- {
- static const bool value = !is_rv<T>::value;
- };
-
- } //namespace move_detail {
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // has_move_emulation_enabled
- //
- //////////////////////////////////////////////////////////////////////////////
- template<class T>
- struct has_move_emulation_enabled
- : ::boost::move_detail::has_move_emulation_enabled_impl<T>
- {};
-
- template<class T>
- struct has_move_emulation_disabled
- {
- static const bool value = !::boost::move_detail::has_move_emulation_enabled_impl<T>::value;
- };
-
- } //namespace boost {
-
- #define BOOST_RV_REF(TYPE)\
- ::boost::rv< TYPE >& \
- //
-
- #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
- ::boost::rv< TYPE<ARG1, ARG2> >& \
- //
-
- #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
- ::boost::rv< TYPE<ARG1, ARG2, ARG3> >& \
- //
-
- #define BOOST_RV_REF_BEG\
- ::boost::rv< \
- //
-
- #define BOOST_RV_REF_END\
- >& \
- //
-
- #define BOOST_RV_REF_BEG_IF_CXX11 \
- \
- //
-
- #define BOOST_RV_REF_END_IF_CXX11 \
- \
- //
-
- #define BOOST_FWD_REF(TYPE)\
- const TYPE & \
- //
-
- #define BOOST_COPY_ASSIGN_REF(TYPE)\
- const ::boost::rv< TYPE >& \
- //
-
- #define BOOST_COPY_ASSIGN_REF_BEG \
- const ::boost::rv< \
- //
-
- #define BOOST_COPY_ASSIGN_REF_END \
- >& \
- //
-
- #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
- const ::boost::rv< TYPE<ARG1, ARG2> >& \
- //
-
- #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
- const ::boost::rv< TYPE<ARG1, ARG2, ARG3> >& \
- //
-
- #define BOOST_CATCH_CONST_RLVALUE(TYPE)\
- const ::boost::rv< TYPE >& \
- //
-
- namespace boost {
- namespace move_detail {
-
- template <class Ret, class T>
- BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
- < ::boost::move_detail::is_lvalue_reference<Ret>::value ||
- !::boost::has_move_emulation_enabled<T>::value
- , T&>::type
- move_return(T& x) BOOST_NOEXCEPT
- {
- return x;
- }
-
- template <class Ret, class T>
- BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
- < !::boost::move_detail::is_lvalue_reference<Ret>::value &&
- ::boost::has_move_emulation_enabled<T>::value
- , ::boost::rv<T>&>::type
- move_return(T& x) BOOST_NOEXCEPT
- {
- return *BOOST_MOVE_TO_RV_CAST(::boost::rv<T>*, ::boost::move_detail::addressof(x));
- }
-
- template <class Ret, class T>
- BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
- < !::boost::move_detail::is_lvalue_reference<Ret>::value &&
- ::boost::has_move_emulation_enabled<T>::value
- , ::boost::rv<T>&>::type
- move_return(::boost::rv<T>& x) BOOST_NOEXCEPT
- {
- return x;
- }
-
- } //namespace move_detail {
- } //namespace boost {
-
- #define BOOST_MOVE_RET(RET_TYPE, REF)\
- boost::move_detail::move_return< RET_TYPE >(REF)
- //
-
- #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \
- ::boost::move((BASE_TYPE&)(ARG))
- //
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // BOOST_MOVABLE_BUT_NOT_COPYABLE
- //
- //////////////////////////////////////////////////////////////////////////////
- #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
- BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
- public:\
- BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
- { return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
- BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
- { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
- private:\
- //
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // BOOST_COPYABLE_AND_MOVABLE
- //
- //////////////////////////////////////////////////////////////////////////////
-
- #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
- public:\
- BOOST_MOVE_FORCEINLINE TYPE& operator=(TYPE &t)\
- { this->operator=(const_cast<const TYPE&>(t)); return *this;}\
- public:\
- BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
- { return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
- BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
- { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
- private:\
- //
-
- #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
- public:\
- BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
- { return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
- BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
- { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
- private:\
- //
-
- namespace boost{
- namespace move_detail{
-
- template< class T>
- struct forward_type
- { typedef const T &type; };
-
- template< class T>
- struct forward_type< boost::rv<T> >
- { typedef T type; };
-
- }}
-
-#else //BOOST_NO_CXX11_RVALUE_REFERENCES
-
- //! This macro marks a type as movable but not copyable, disabling copy construction
- //! and assignment. The user will need to write a move constructor/assignment as explained
- //! in the documentation to fully write a movable but not copyable class.
- #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
- BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
- public:\
- typedef int boost_move_emulation_t;\
- private:\
- //
-
- //! This macro marks a type as copyable and movable.
- //! The user will need to write a move constructor/assignment and a copy assignment
- //! as explained in the documentation to fully write a copyable and movable class.
- #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
- //
-
- #if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
- #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
- //
- #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
-
- namespace boost {
-
- //!This trait yields to a compile-time true boolean if T was marked as
- //!BOOST_MOVABLE_BUT_NOT_COPYABLE or BOOST_COPYABLE_AND_MOVABLE and
- //!rvalue references are not available on the platform. False otherwise.
- template<class T>
- struct has_move_emulation_enabled
- {
- static const bool value = false;
- };
-
- template<class T>
- struct has_move_emulation_disabled
- {
- static const bool value = true;
- };
-
- } //namespace boost{
-
- //!This macro is used to achieve portable syntax in move
- //!constructors and assignments for classes marked as
- //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE
- #define BOOST_RV_REF(TYPE)\
- TYPE && \
- //
-
- //!This macro is used to achieve portable syntax in move
- //!constructors and assignments for template classes marked as
- //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE.
- //!As macros have problems with comma-separated template arguments,
- //!the template argument must be preceded with BOOST_RV_REF_BEG
- //!and ended with BOOST_RV_REF_END
- #define BOOST_RV_REF_BEG\
- \
- //
-
- //!This macro is used to achieve portable syntax in move
- //!constructors and assignments for template classes marked as
- //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE.
- //!As macros have problems with comma-separated template arguments,
- //!the template argument must be preceded with BOOST_RV_REF_BEG
- //!and ended with BOOST_RV_REF_END
- #define BOOST_RV_REF_END\
- && \
- //
-
- //!This macro expands to BOOST_RV_REF_BEG if BOOST_NO_CXX11_RVALUE_REFERENCES
- //!is not defined, empty otherwise
- #define BOOST_RV_REF_BEG_IF_CXX11 \
- BOOST_RV_REF_BEG \
- //
-
- //!This macro expands to BOOST_RV_REF_END if BOOST_NO_CXX11_RVALUE_REFERENCES
- //!is not defined, empty otherwise
- #define BOOST_RV_REF_END_IF_CXX11 \
- BOOST_RV_REF_END \
- //
-
- //!This macro is used to achieve portable syntax in copy
- //!assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE.
- #define BOOST_COPY_ASSIGN_REF(TYPE)\
- const TYPE & \
- //
-
- //! This macro is used to implement portable perfect forwarding
- //! as explained in the documentation.
- #define BOOST_FWD_REF(TYPE)\
- TYPE && \
- //
-
- #if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
-
- #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
- TYPE<ARG1, ARG2> && \
- //
-
- #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
- TYPE<ARG1, ARG2, ARG3> && \
- //
-
- #define BOOST_COPY_ASSIGN_REF_BEG \
- const \
- //
-
- #define BOOST_COPY_ASSIGN_REF_END \
- & \
- //
-
- #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
- const TYPE<ARG1, ARG2> & \
- //
-
- #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
- const TYPE<ARG1, ARG2, ARG3>& \
- //
-
- #define BOOST_CATCH_CONST_RLVALUE(TYPE)\
- const TYPE & \
- //
-
- #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
-
- #if !defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
-
- //!This macro is used to achieve portable move return semantics.
- //!The C++11 Standard allows implicit move returns when the object to be returned
- //!is designated by a lvalue and:
- //! - The criteria for elision of a copy operation are met OR
- //! - The criteria would be met save for the fact that the source object is a function parameter
- //!
- //!For C++11 conforming compilers this macros only yields to REF:
- //! <code>return BOOST_MOVE_RET(RET_TYPE, REF);</code> -> <code>return REF;</code>
- //!
- //!For compilers without rvalue references
- //!this macro does an explicit move if the move emulation is activated
- //!and the return type (RET_TYPE) is not a reference.
- //!
- //!For non-conforming compilers with rvalue references like Visual 2010 & 2012,
- //!an explicit move is performed if RET_TYPE is not a reference.
- //!
- //! <b>Caution</b>: When using this macro in non-conforming or C++03
- //!compilers, a move will be performed even if the C++11 standard does not allow it
- //!(e.g. returning a static variable). The user is responsible for using this macro
- //!only to return local objects that met C++11 criteria.
- #define BOOST_MOVE_RET(RET_TYPE, REF)\
- REF
- //
-
- #else //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
-
- #include <boost/move/detail/meta_utils.hpp>
-
- namespace boost {
- namespace move_detail {
-
- template <class Ret, class T>
- BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
- < ::boost::move_detail::is_lvalue_reference<Ret>::value
- , T&>::type
- move_return(T& x) BOOST_NOEXCEPT
- {
- return x;
- }
-
- template <class Ret, class T>
- BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
- < !::boost::move_detail::is_lvalue_reference<Ret>::value
- , Ret && >::type
- move_return(T&& t) BOOST_NOEXCEPT
- {
- return static_cast< Ret&& >(t);
- }
-
- } //namespace move_detail {
- } //namespace boost {
-
- #define BOOST_MOVE_RET(RET_TYPE, REF)\
- boost::move_detail::move_return< RET_TYPE >(REF)
- //
-
- #endif //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
-
- //!This macro is used to achieve portable optimal move constructors.
- //!
- //!When implementing the move constructor, in C++03 compilers the moved-from argument must be
- //!cast to the base type before calling `::boost::move()` due to rvalue reference limitations.
- //!
- //!In C++11 compilers the cast from a rvalue reference of a derived type to a rvalue reference of
- //!a base type is implicit.
- #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \
- ::boost::move((BASE_TYPE&)(ARG))
- //
-
- namespace boost {
- namespace move_detail {
-
- template< class T> struct forward_type { typedef T type; };
-
- }}
-
-#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_MOVE_CORE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/meta_utils.hpp b/src/third_party/boost-1.68.0/boost/move/detail/meta_utils.hpp
deleted file mode 100644
index e45394c97d6..00000000000
--- a/src/third_party/boost-1.68.0/boost/move/detail/meta_utils.hpp
+++ /dev/null
@@ -1,585 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2012-2015.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! \file
-
-#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
-#define BOOST_MOVE_DETAIL_META_UTILS_HPP
-
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-#include <boost/move/detail/config_begin.hpp>
-#include <boost/move/detail/workaround.hpp> //forceinline
-#include <boost/move/detail/meta_utils_core.hpp>
-#include <cstddef> //for std::size_t
-
-//Small meta-typetraits to support move
-
-namespace boost {
-
-//Forward declare boost::rv
-template <class T> class rv;
-
-namespace move_detail {
-
-//////////////////////////////////////
-// is_different
-//////////////////////////////////////
-template<class T, class U>
-struct is_different
-{
- static const bool value = !is_same<T, U>::value;
-};
-
-//////////////////////////////////////
-// apply
-//////////////////////////////////////
-template<class F, class Param>
-struct apply
-{
- typedef typename F::template apply<Param>::type type;
-};
-
-//////////////////////////////////////
-// bool_
-//////////////////////////////////////
-
-template< bool C_ >
-struct bool_ : integral_constant<bool, C_>
-{
- operator bool() const { return C_; }
- bool operator()() const { return C_; }
-};
-
-typedef bool_<true> true_;
-typedef bool_<false> false_;
-
-//////////////////////////////////////
-// nat
-//////////////////////////////////////
-struct nat{};
-
-//////////////////////////////////////
-// yes_type/no_type
-//////////////////////////////////////
-typedef char yes_type;
-
-struct no_type
-{
- char _[2];
-};
-
-//////////////////////////////////////
-// natify
-//////////////////////////////////////
-template <class T> struct natify{};
-
-//////////////////////////////////////
-// remove_reference
-//////////////////////////////////////
-template<class T>
-struct remove_reference
-{
- typedef T type;
-};
-
-template<class T>
-struct remove_reference<T&>
-{
- typedef T type;
-};
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template<class T>
-struct remove_reference<T&&>
-{
- typedef T type;
-};
-
-#else
-
-template<class T>
-struct remove_reference< rv<T> >
-{
- typedef T type;
-};
-
-template<class T>
-struct remove_reference< rv<T> &>
-{
- typedef T type;
-};
-
-template<class T>
-struct remove_reference< const rv<T> &>
-{
- typedef T type;
-};
-
-#endif
-
-//////////////////////////////////////
-// remove_pointer
-//////////////////////////////////////
-
-template< class T > struct remove_pointer { typedef T type; };
-template< class T > struct remove_pointer<T*> { typedef T type; };
-template< class T > struct remove_pointer<T* const> { typedef T type; };
-template< class T > struct remove_pointer<T* volatile> { typedef T type; };
-template< class T > struct remove_pointer<T* const volatile> { typedef T type; };
-
-//////////////////////////////////////
-// add_pointer
-//////////////////////////////////////
-template< class T >
-struct add_pointer
-{
- typedef typename remove_reference<T>::type* type;
-};
-
-//////////////////////////////////////
-// add_const
-//////////////////////////////////////
-template<class T>
-struct add_const
-{
- typedef const T type;
-};
-
-template<class T>
-struct add_const<T&>
-{
- typedef const T& type;
-};
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template<class T>
-struct add_const<T&&>
-{
- typedef T&& type;
-};
-
-#endif
-
-//////////////////////////////////////
-// add_lvalue_reference
-//////////////////////////////////////
-template<class T>
-struct add_lvalue_reference
-{ typedef T& type; };
-
-template<class T> struct add_lvalue_reference<T&> { typedef T& type; };
-template<> struct add_lvalue_reference<void> { typedef void type; };
-template<> struct add_lvalue_reference<const void> { typedef const void type; };
-template<> struct add_lvalue_reference<volatile void> { typedef volatile void type; };
-template<> struct add_lvalue_reference<const volatile void>{ typedef const volatile void type; };
-
-template<class T>
-struct add_const_lvalue_reference
-{
- typedef typename remove_reference<T>::type t_unreferenced;
- typedef typename add_const<t_unreferenced>::type t_unreferenced_const;
- typedef typename add_lvalue_reference
- <t_unreferenced_const>::type type;
-};
-
-//////////////////////////////////////
-// is_lvalue_reference
-//////////////////////////////////////
-template<class T>
-struct is_lvalue_reference
-{
- static const bool value = false;
-};
-
-template<class T>
-struct is_lvalue_reference<T&>
-{
- static const bool value = true;
-};
-
-
-//////////////////////////////////////
-// identity
-//////////////////////////////////////
-template <class T>
-struct identity
-{
- typedef T type;
- typedef typename add_const_lvalue_reference<T>::type reference;
- reference operator()(reference t)
- { return t; }
-};
-
-//////////////////////////////////////
-// is_class_or_union
-//////////////////////////////////////
-template<class T>
-struct is_class_or_union
-{
- struct twochar { char dummy[2]; };
- template <class U>
- static char is_class_or_union_tester(void(U::*)(void));
- template <class U>
- static twochar is_class_or_union_tester(...);
- static const bool value = sizeof(is_class_or_union_tester<T>(0)) == sizeof(char);
-};
-
-//////////////////////////////////////
-// addressof
-//////////////////////////////////////
-template<class T>
-struct addr_impl_ref
-{
- T & v_;
- BOOST_MOVE_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {}
- BOOST_MOVE_FORCEINLINE operator T& () const { return v_; }
-
- private:
- addr_impl_ref & operator=(const addr_impl_ref &);
-};
-
-template<class T>
-struct addressof_impl
-{
- BOOST_MOVE_FORCEINLINE static T * f( T & v, long )
- {
- return reinterpret_cast<T*>(
- &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
- }
-
- BOOST_MOVE_FORCEINLINE static T * f( T * v, int )
- { return v; }
-};
-
-template<class T>
-BOOST_MOVE_FORCEINLINE T * addressof( T & v )
-{
- return ::boost::move_detail::addressof_impl<T>::f
- ( ::boost::move_detail::addr_impl_ref<T>( v ), 0 );
-}
-
-//////////////////////////////////////
-// has_pointer_type
-//////////////////////////////////////
-template <class T>
-struct has_pointer_type
-{
- struct two { char c[2]; };
- template <class U> static two test(...);
- template <class U> static char test(typename U::pointer* = 0);
- static const bool value = sizeof(test<T>(0)) == 1;
-};
-
-//////////////////////////////////////
-// is_convertible
-//////////////////////////////////////
-#if defined(_MSC_VER) && (_MSC_VER >= 1400)
-
-//use intrinsic since in MSVC
-//overaligned types can't go through ellipsis
-template <class T, class U>
-struct is_convertible
-{
- static const bool value = __is_convertible_to(T, U);
-};
-
-#else
-
-template <class T, class U>
-class is_convertible
-{
- typedef typename add_lvalue_reference<T>::type t_reference;
- typedef char true_t;
- class false_t { char dummy[2]; };
- static false_t dispatch(...);
- static true_t dispatch(U);
- static t_reference trigger();
- public:
- static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t);
-};
-
-#endif
-
-template <class T, class U, bool IsSame = is_same<T, U>::value>
-struct is_same_or_convertible
- : is_convertible<T, U>
-{};
-
-template <class T, class U>
-struct is_same_or_convertible<T, U, true>
-{
- static const bool value = true;
-};
-
-template<
- bool C
- , typename F1
- , typename F2
- >
-struct eval_if_c
- : if_c<C,F1,F2>::type
-{};
-
-template<
- typename C
- , typename T1
- , typename T2
- >
-struct eval_if
- : if_<C,T1,T2>::type
-{};
-
-
-#if defined(BOOST_GCC) && (BOOST_GCC <= 40000)
-#define BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN
-#endif
-
-template<class T, class U, class R = void>
-struct enable_if_convertible
- : enable_if< is_convertible<T, U>, R>
-{};
-
-template<class T, class U, class R = void>
-struct disable_if_convertible
- : disable_if< is_convertible<T, U>, R>
-{};
-
-template<class T, class U, class R = void>
-struct enable_if_same_or_convertible
- : enable_if< is_same_or_convertible<T, U>, R>
-{};
-
-template<class T, class U, class R = void>
-struct disable_if_same_or_convertible
- : disable_if< is_same_or_convertible<T, U>, R>
-{};
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// and_
-//
-//////////////////////////////////////////////////////////////////////////////
-template<bool, class B = true_, class C = true_, class D = true_>
-struct and_impl
- : and_impl<B::value, C, D>
-{};
-
-template<>
-struct and_impl<true, true_, true_, true_>
-{
- static const bool value = true;
-};
-
-template<class B, class C, class D>
-struct and_impl<false, B, C, D>
-{
- static const bool value = false;
-};
-
-template<class A, class B, class C = true_, class D = true_>
-struct and_
- : and_impl<A::value, B, C, D>
-{};
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// or_
-//
-//////////////////////////////////////////////////////////////////////////////
-template<bool, class B = false_, class C = false_, class D = false_>
-struct or_impl
- : or_impl<B::value, C, D>
-{};
-
-template<>
-struct or_impl<false, false_, false_, false_>
-{
- static const bool value = false;
-};
-
-template<class B, class C, class D>
-struct or_impl<true, B, C, D>
-{
- static const bool value = true;
-};
-
-template<class A, class B, class C = false_, class D = false_>
-struct or_
- : or_impl<A::value, B, C, D>
-{};
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// not_
-//
-//////////////////////////////////////////////////////////////////////////////
-template<class T>
-struct not_
-{
- static const bool value = !T::value;
-};
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// enable_if_and / disable_if_and / enable_if_or / disable_if_or
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template<class R, class A, class B, class C = true_, class D = true_>
-struct enable_if_and
- : enable_if_c< and_<A, B, C, D>::value, R>
-{};
-
-template<class R, class A, class B, class C = true_, class D = true_>
-struct disable_if_and
- : disable_if_c< and_<A, B, C, D>::value, R>
-{};
-
-template<class R, class A, class B, class C = false_, class D = false_>
-struct enable_if_or
- : enable_if_c< or_<A, B, C, D>::value, R>
-{};
-
-template<class R, class A, class B, class C = false_, class D = false_>
-struct disable_if_or
- : disable_if_c< or_<A, B, C, D>::value, R>
-{};
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// has_move_emulation_enabled_impl
-//
-//////////////////////////////////////////////////////////////////////////////
-template<class T>
-struct has_move_emulation_enabled_impl
- : is_convertible< T, ::boost::rv<T>& >
-{};
-
-template<class T>
-struct has_move_emulation_enabled_impl<T&>
-{ static const bool value = false; };
-
-template<class T>
-struct has_move_emulation_enabled_impl< ::boost::rv<T> >
-{ static const bool value = false; };
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// is_rv_impl
-//
-//////////////////////////////////////////////////////////////////////////////
-
-template <class T>
-struct is_rv_impl
-{ static const bool value = false; };
-
-template <class T>
-struct is_rv_impl< rv<T> >
-{ static const bool value = true; };
-
-template <class T>
-struct is_rv_impl< const rv<T> >
-{ static const bool value = true; };
-
-// Code from Jeffrey Lee Hellrung, many thanks
-
-template< class T >
-struct is_rvalue_reference
-{ static const bool value = false; };
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template< class T >
-struct is_rvalue_reference< T&& >
-{ static const bool value = true; };
-
-#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template< class T >
-struct is_rvalue_reference< boost::rv<T>& >
-{ static const bool value = true; };
-
-template< class T >
-struct is_rvalue_reference< const boost::rv<T>& >
-{ static const bool value = true; };
-
-#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template< class T >
-struct add_rvalue_reference
-{ typedef T&& type; };
-
-#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-namespace detail_add_rvalue_reference
-{
- template< class T
- , bool emulation = has_move_emulation_enabled_impl<T>::value
- , bool rv = is_rv_impl<T>::value >
- struct add_rvalue_reference_impl { typedef T type; };
-
- template< class T, bool emulation>
- struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; };
-
- template< class T, bool rv >
- struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv<T>& type; };
-} // namespace detail_add_rvalue_reference
-
-template< class T >
-struct add_rvalue_reference
- : detail_add_rvalue_reference::add_rvalue_reference_impl<T>
-{ };
-
-template< class T >
-struct add_rvalue_reference<T &>
-{ typedef T & type; };
-
-#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-template< class T > struct remove_rvalue_reference { typedef T type; };
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- template< class T > struct remove_rvalue_reference< T&& > { typedef T type; };
-#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- template< class T > struct remove_rvalue_reference< rv<T> > { typedef T type; };
- template< class T > struct remove_rvalue_reference< const rv<T> > { typedef T type; };
- template< class T > struct remove_rvalue_reference< volatile rv<T> > { typedef T type; };
- template< class T > struct remove_rvalue_reference< const volatile rv<T> > { typedef T type; };
- template< class T > struct remove_rvalue_reference< rv<T>& > { typedef T type; };
- template< class T > struct remove_rvalue_reference< const rv<T>& > { typedef T type; };
- template< class T > struct remove_rvalue_reference< volatile rv<T>& > { typedef T type; };
- template< class T > struct remove_rvalue_reference< const volatile rv<T>& >{ typedef T type; };
-#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-
-// Ideas from Boost.Move review, Jeffrey Lee Hellrung:
-//
-//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ?
-// Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue
-// references the same as wrt real rvalue references, i.e., add_reference< rv<T>& > -> T& rather than
-// rv<T>& (since T&& & -> T&).
-//
-//- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...?
-//
-//- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated
-// rvalue references in C++03. This may be necessary to prevent "accidental moves".
-
-} //namespace move_detail {
-} //namespace boost {
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/type_traits.hpp b/src/third_party/boost-1.68.0/boost/move/detail/type_traits.hpp
deleted file mode 100644
index a3326d00e18..00000000000
--- a/src/third_party/boost-1.68.0/boost/move/detail/type_traits.hpp
+++ /dev/null
@@ -1,1086 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-// (C) Copyright John Maddock 2000.
-// (C) Copyright Ion Gaztanaga 2005-2015.
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/move for documentation.
-//
-// The alignment and Type traits implementation comes from
-// John Maddock's TypeTraits library.
-//
-// Some other tricks come from Howard Hinnant's papers and StackOverflow replies
-//////////////////////////////////////////////////////////////////////////////
-#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP
-#define BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP
-
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
-#if defined(BOOST_HAS_PRAGMA_ONCE)
-# pragma once
-#endif
-
-#include <boost/move/detail/config_begin.hpp>
-#include <boost/move/detail/workaround.hpp>
-
-// move/detail
-#include <boost/move/detail/meta_utils.hpp>
-// other
-#include <boost/assert.hpp>
-#include <boost/static_assert.hpp>
-// std
-#include <cstddef>
-
-//Use of Boost.TypeTraits leads to long preprocessed source code due to
-//MPL dependencies. We'll use intrinsics directly and make or own
-//simplified version of TypeTraits.
-//If someday Boost.TypeTraits dependencies are minimized, we should
-//revisit this file redirecting code to Boost.TypeTraits traits.
-
-//These traits don't care about volatile, reference or other checks
-//made by Boost.TypeTraits because no volatile or reference types
-//can be hold in Boost.Containers. This helps to avoid any Boost.TypeTraits
-//dependency.
-
-// Helper macros for builtin compiler support.
-// If your compiler has builtin support for any of the following
-// traits concepts, then redefine the appropriate macros to pick
-// up on the compiler support:
-//
-// (these should largely ignore cv-qualifiers)
-// BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type
-// BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
-// BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
-// (Note: this trait does not guarantee T is copy constructible, the copy constructor could be deleted but still be trivial)
-// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy
-// BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
-// (Note: this trait does not guarantee T is assignable , the copy assignmen could be deleted but still be trivial)
-// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy
-// BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
-// BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw
-// BOOST_MOVE_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw
-// BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw
-// BOOST_MOVE_IS_ENUM(T) should evaluate to true it t is a union type.
-//
-// The following can also be defined: when detected our implementation is greatly simplified.
-//
-// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T.
-
-#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000)
- // Metrowerks compiler is acquiring intrinsic type traits support
- // post version 8. We hook into the published interface to pick up
- // user defined specializations as well as compiler intrinsics as
- // and when they become available:
-# include <msl_utility>
-# define BOOST_MOVE_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union<T>::value
-# define BOOST_MOVE_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD<T>::value
-# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor<T>::value
-# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor<T>::value
-# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment<T>::value
-# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor<T>::value
-#endif
-
-#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\
- || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500))
-# define BOOST_MOVE_IS_UNION(T) __is_union(T)
-# define BOOST_MOVE_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T))
-# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
-# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ::boost::move_detail::is_pod<T>::value)
-# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ::boost::move_detail::is_pod<T>::value)
-# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::move_detail::is_pod<T>::value)
-# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::move_detail::is_trivially_default_constructible<T>::value)
-# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::move_detail::is_trivially_copy_constructible<T>::value)
-# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::move_detail::is_trivially_copy_assignable<T>::value)
-
-# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
-# if defined(_MSC_VER) && (_MSC_VER >= 1700)
-# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__has_trivial_move_constructor(T) || ::boost::move_detail::is_pod<T>::value)
-# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) (__has_trivial_move_assign(T) || ::boost::move_detail::is_pod<T>::value)
-# endif
-#endif
-
-#if defined(BOOST_CLANG) && defined(__has_feature)
-
-# if __has_feature(is_union)
-# define BOOST_MOVE_IS_UNION(T) __is_union(T)
-# endif
-# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod)
-# define BOOST_MOVE_IS_POD(T) __is_pod(T)
-# endif
-# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty)
-# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
-# endif
-# if __has_feature(has_trivial_constructor)
-# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-# endif
-# if __has_feature(has_trivial_copy)
-# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
-# endif
-# if __has_feature(has_trivial_assign)
-# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) )
-# endif
-# if __has_feature(has_trivial_destructor)
-# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
-# endif
-# if __has_feature(has_nothrow_constructor)
-# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
-# endif
-# if __has_feature(has_nothrow_copy)
-# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T))
-# endif
-# if __has_feature(is_nothrow_copy_assignable)
-# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T))
-# endif
-# if __has_feature(is_enum)
-# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
-# endif
-# if __has_feature(has_trivial_move_constructor)
-# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T)
-# endif
-# if __has_feature(has_trivial_move_assign)
-# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T)
-# endif
-# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof(T)
-#endif
-
-#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG)
-
-#ifdef BOOST_INTEL
-# define BOOST_MOVE_INTEL_TT_OPTS || ::boost::move_detail::is_pod<T>::value
-#else
-# define BOOST_MOVE_INTEL_TT_OPTS
-#endif
-
-# define BOOST_MOVE_IS_UNION(T) __is_union(T)
-# define BOOST_MOVE_IS_POD(T) __is_pod(T)
-# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
-# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_MOVE_INTEL_TT_OPTS))
-# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_MOVE_INTEL_TT_OPTS))
-# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_MOVE_INTEL_TT_OPTS) )
-# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_MOVE_INTEL_TT_OPTS)
-# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_MOVE_INTEL_TT_OPTS)
-# define BOOST_MOVE_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_MOVE_INTEL_TT_OPTS))
-# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_MOVE_INTEL_TT_OPTS))
-
-# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
-# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__)
- // GCC sometimes lies about alignment requirements
- // of type double on 32-bit unix platforms, use the
- // old implementation instead in that case:
-# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T)
-# endif
-#endif
-
-#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
-
-# define BOOST_MOVE_IS_UNION(T) __is_union(T)
-# define BOOST_MOVE_IS_POD(T) __is_pod(T)
-# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
-# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
-# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T))
-# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T))
-# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
-# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
-# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T))
-# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T))
-
-# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
-# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T)
-#endif
-
-# if defined(__CODEGEARC__)
-# define BOOST_MOVE_IS_UNION(T) __is_union(T)
-# define BOOST_MOVE_IS_POD(T) __is_pod(T)
-# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
-# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T))
-# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T))
-# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T))
-# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T))
-# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T))
-# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T))
-# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T))
-
-# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
-# define BOOST_MOVE_ALIGNMENT_OF(T) alignof(T)
-
-#endif
-
-//Fallback definitions
-
-#ifdef BOOST_MOVE_IS_UNION
- #define BOOST_MOVE_IS_UNION_IMPL(T) BOOST_MOVE_IS_UNION(T)
-#else
- #define BOOST_MOVE_IS_UNION_IMPL(T) false
-#endif
-
-#ifdef BOOST_MOVE_IS_POD
- //in some compilers the intrinsic is limited to class types so add scalar and void
- #define BOOST_MOVE_IS_POD_IMPL(T) (::boost::move_detail::is_scalar<T>::value ||\
- ::boost::move_detail::is_void<T>::value ||\
- BOOST_MOVE_IS_POD(T))
-#else
- #define BOOST_MOVE_IS_POD_IMPL(T) \
- (::boost::move_detail::is_scalar<T>::value || ::boost::move_detail::is_void<T>::value)
-#endif
-
-#ifdef BOOST_MOVE_IS_EMPTY
- #define BOOST_MOVE_IS_EMPTY_IMPL(T) BOOST_MOVE_IS_EMPTY(T)
-#else
- #define BOOST_MOVE_IS_EMPTY_IMPL(T) ::boost::move_detail::is_empty_nonintrinsic<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value ||\
- (::boost::move_detail::is_copy_constructible<T>::value &&\
- BOOST_MOVE_HAS_TRIVIAL_COPY(T))
-#else
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR
- #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T)
-#else
- #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR
- #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)
-#else
- #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value ||\
- ( ::boost::move_detail::is_copy_assignable<T>::value &&\
- BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T))
-#else
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN
- #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T)
-#else
- #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR
- #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T)
-#else
- #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR
- #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T)
-#else
- #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_NOTHROW_COPY
- #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_COPY(T)
-#else
- #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE
- #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE(T)
-#else
- #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_NOTHROW_ASSIGN
- #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_ASSIGN(T)
-#else
- #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN
- #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T)
-#else
- #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
-#ifdef BOOST_MOVE_IS_ENUM
- #define BOOST_MOVE_IS_ENUM_IMPL(T) BOOST_MOVE_IS_ENUM(T)
-#else
- #define BOOST_MOVE_IS_ENUM_IMPL(T) ::boost::move_detail::is_enum_nonintrinsic<T>::value
-#endif
-
-namespace boost {
-namespace move_detail {
-
-//////////////////////////
-// is_reference
-//////////////////////////
-template<class T>
-struct is_reference
-{ static const bool value = false; };
-
-template<class T>
-struct is_reference<T&>
-{ static const bool value = true; };
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-template<class T>
-struct is_reference<T&&>
-{ static const bool value = true; };
-#endif
-
-//////////////////////////
-// is_pointer
-//////////////////////////
-template<class T>
-struct is_pointer
-{ static const bool value = false; };
-
-template<class T>
-struct is_pointer<T*>
-{ static const bool value = true; };
-
-//////////////////////////
-// is_const
-//////////////////////////
-template<class T>
-struct is_const
-{ static const bool value = false; };
-
-template<class T>
-struct is_const<const T>
-{ static const bool value = true; };
-
-//////////////////////////
-// unvoid_ref
-//////////////////////////
-template <typename T> struct unvoid_ref : add_lvalue_reference<T>{};
-template <> struct unvoid_ref<void> { typedef unvoid_ref & type; };
-template <> struct unvoid_ref<const void> { typedef unvoid_ref & type; };
-template <> struct unvoid_ref<volatile void> { typedef unvoid_ref & type; };
-template <> struct unvoid_ref<const volatile void> { typedef unvoid_ref & type; };
-
-template <typename T>
-struct add_reference : add_lvalue_reference<T>
-{};
-
-//////////////////////////
-// add_const_reference
-//////////////////////////
-template <class T>
-struct add_const_reference
-{ typedef const T &type; };
-
-template <class T>
-struct add_const_reference<T&>
-{ typedef T& type; };
-
-//////////////////////////
-// add_const_if_c
-//////////////////////////
-template<class T, bool Add>
-struct add_const_if_c
- : if_c<Add, typename add_const<T>::type, T>
-{};
-
-//////////////////////////
-// remove_const
-//////////////////////////
-template<class T>
-struct remove_const
-{ typedef T type; };
-
-template<class T>
-struct remove_const< const T>
-{ typedef T type; };
-
-//////////////////////////
-// remove_cv
-//////////////////////////
-template<typename T> struct remove_cv { typedef T type; };
-template<typename T> struct remove_cv<const T> { typedef T type; };
-template<typename T> struct remove_cv<const volatile T> { typedef T type; };
-template<typename T> struct remove_cv<volatile T> { typedef T type; };
-
-//////////////////////////
-// make_unsigned
-//////////////////////////
-template <class T>
-struct make_unsigned_impl { typedef T type; };
-template <> struct make_unsigned_impl<signed char> { typedef unsigned char type; };
-template <> struct make_unsigned_impl<signed short> { typedef unsigned short type; };
-template <> struct make_unsigned_impl<signed int> { typedef unsigned int type; };
-template <> struct make_unsigned_impl<signed long> { typedef unsigned long type; };
-#ifdef BOOST_HAS_LONG_LONG
-template <> struct make_unsigned_impl< ::boost::long_long_type > { typedef ::boost::ulong_long_type type; };
-#endif
-
-template <class T>
-struct make_unsigned
- : make_unsigned_impl<typename remove_cv<T>::type>
-{};
-
-//////////////////////////
-// is_floating_point
-//////////////////////////
-template<class T> struct is_floating_point_cv { static const bool value = false; };
-template<> struct is_floating_point_cv<float> { static const bool value = true; };
-template<> struct is_floating_point_cv<double> { static const bool value = true; };
-template<> struct is_floating_point_cv<long double> { static const bool value = true; };
-
-template<class T>
-struct is_floating_point
- : is_floating_point_cv<typename remove_cv<T>::type>
-{};
-
-//////////////////////////
-// is_integral
-//////////////////////////
-template<class T> struct is_integral_cv { static const bool value = false; };
-template<> struct is_integral_cv< bool>{ static const bool value = true; };
-template<> struct is_integral_cv< char>{ static const bool value = true; };
-template<> struct is_integral_cv< unsigned char>{ static const bool value = true; };
-template<> struct is_integral_cv< signed char>{ static const bool value = true; };
-#ifndef BOOST_NO_CXX11_CHAR16_T
-template<> struct is_integral_cv< char16_t>{ static const bool value = true; };
-#endif
-#ifndef BOOST_NO_CXX11_CHAR32_T
-template<> struct is_integral_cv< char32_t>{ static const bool value = true; };
-#endif
-#ifndef BOOST_NO_INTRINSIC_WCHAR_T
-template<> struct is_integral_cv< wchar_t>{ static const bool value = true; };
-#endif
-template<> struct is_integral_cv< short>{ static const bool value = true; };
-template<> struct is_integral_cv< unsigned short>{ static const bool value = true; };
-template<> struct is_integral_cv< int>{ static const bool value = true; };
-template<> struct is_integral_cv< unsigned int>{ static const bool value = true; };
-template<> struct is_integral_cv< long>{ static const bool value = true; };
-template<> struct is_integral_cv< unsigned long>{ static const bool value = true; };
-#ifdef BOOST_HAS_LONG_LONG
-template<> struct is_integral_cv< ::boost:: long_long_type>{ static const bool value = true; };
-template<> struct is_integral_cv< ::boost::ulong_long_type>{ static const bool value = true; };
-#endif
-
-template<class T>
-struct is_integral
- : public is_integral_cv<typename remove_cv<T>::type>
-{};
-
-//////////////////////////////////////
-// remove_all_extents
-//////////////////////////////////////
-template <class T>
-struct remove_all_extents
-{ typedef T type;};
-
-template <class T>
-struct remove_all_extents<T[]>
-{ typedef typename remove_all_extents<T>::type type; };
-
-template <class T, std::size_t N>
-struct remove_all_extents<T[N]>
-{ typedef typename remove_all_extents<T>::type type;};
-
-//////////////////////////
-// is_scalar
-//////////////////////////
-template<class T>
-struct is_scalar
-{ static const bool value = is_integral<T>::value || is_floating_point<T>::value; };
-
-//////////////////////////
-// is_void
-//////////////////////////
-template<class T>
-struct is_void_cv
-{ static const bool value = false; };
-
-template<>
-struct is_void_cv<void>
-{ static const bool value = true; };
-
-template<class T>
-struct is_void
- : is_void_cv<typename remove_cv<T>::type>
-{};
-
-//////////////////////////////////////
-// is_array
-//////////////////////////////////////
-template<class T>
-struct is_array
-{ static const bool value = false; };
-
-template<class T>
-struct is_array<T[]>
-{ static const bool value = true; };
-
-template<class T, std::size_t N>
-struct is_array<T[N]>
-{ static const bool value = true; };
-
-//////////////////////////////////////
-// is_member_pointer
-//////////////////////////////////////
-template <class T> struct is_member_pointer_cv { static const bool value = false; };
-template <class T, class U>struct is_member_pointer_cv<T U::*> { static const bool value = true; };
-
-template <class T>
-struct is_member_pointer
- : is_member_pointer_cv<typename remove_cv<T>::type>
-{};
-
-//////////////////////////////////////
-// is_nullptr_t
-//////////////////////////////////////
-template <class T>
-struct is_nullptr_t_cv
-{ static const bool value = false; };
-
-#if !defined(BOOST_NO_CXX11_NULLPTR)
-template <>
-struct is_nullptr_t_cv
- #if !defined(BOOST_NO_CXX11_DECLTYPE)
- <decltype(nullptr)>
- #else
- <std::nullptr_t>
- #endif
-{ static const bool value = true; };
-#endif
-
-template <class T>
-struct is_nullptr_t
- : is_nullptr_t_cv<typename remove_cv<T>::type>
-{};
-
-//////////////////////////////////////
-// is_function
-//////////////////////////////////////
-//Inspired by libc++, thanks to Howard Hinnant
-//For a function to pointer an lvalue of function type T can be implicitly converted to a prvalue
-//pointer to that function. This does not apply to non-static member functions because lvalues
-//that refer to non-static member functions do not exist.
-template <class T>
-struct is_reference_convertible_to_pointer
-{
- struct twochar { char dummy[2]; };
- template <class U> static char test(U*);
- template <class U> static twochar test(...);
- static T& source();
- static const bool value = sizeof(char) == sizeof(test<T>(source()));
-};
-//Filter out:
-// - class types that might have implicit conversions
-// - void (to avoid forming a reference to void later)
-// - references (e.g.: filtering reference to functions)
-// - nullptr_t (convertible to pointer)
-template < class T
- , bool Filter = is_class_or_union<T>::value ||
- is_void<T>::value ||
- is_reference<T>::value ||
- is_nullptr_t<T>::value >
-struct is_function_impl
-{ static const bool value = is_reference_convertible_to_pointer<T>::value; };
-
-template <class T>
-struct is_function_impl<T, true>
-{ static const bool value = false; };
-
-template <class T>
-struct is_function
- : is_function_impl<T>
-{};
-
-//////////////////////////////////////
-// is_union
-//////////////////////////////////////
-template<class T>
-struct is_union_noextents_cv
-{ static const bool value = BOOST_MOVE_IS_UNION_IMPL(T); };
-
-template<class T>
-struct is_union
- : is_union_noextents_cv<typename remove_cv<typename remove_all_extents<T>::type>::type>
-{};
-
-//////////////////////////////////////
-// is_class
-//////////////////////////////////////
-template <class T>
-struct is_class
-{
- static const bool value = is_class_or_union<T>::value && ! is_union<T>::value;
-};
-
-
-//////////////////////////////////////
-// is_arithmetic
-//////////////////////////////////////
-template <class T>
-struct is_arithmetic
-{
- static const bool value = is_floating_point<T>::value ||
- is_integral<T>::value;
-};
-
-//////////////////////////////////////
-// is_member_function_pointer
-//////////////////////////////////////
-template <class T>
-struct is_member_function_pointer_cv
-{
- static const bool value = false;
-};
-
-template <class T, class C>
-struct is_member_function_pointer_cv<T C::*>
- : is_function<T>
-{};
-
-template <class T>
-struct is_member_function_pointer
- : is_member_function_pointer_cv<typename remove_cv<T>::type>
-{};
-
-//////////////////////////////////////
-// is_enum
-//////////////////////////////////////
-#if !defined(BOOST_MOVE_IS_ENUM)
-//Based on (http://howardhinnant.github.io/TypeHiearchy.pdf)
-template <class T>
-struct is_enum_nonintrinsic
-{
- static const bool value = !is_arithmetic<T>::value &&
- !is_reference<T>::value &&
- !is_class_or_union<T>::value &&
- !is_array<T>::value &&
- !is_void<T>::value &&
- !is_nullptr_t<T>::value &&
- !is_member_pointer<T>::value &&
- !is_pointer<T>::value &&
- !is_function<T>::value;
-};
-#endif
-
-template <class T>
-struct is_enum
-{ static const bool value = BOOST_MOVE_IS_ENUM_IMPL(T); };
-
-//////////////////////////////////////
-// is_pod
-//////////////////////////////////////
-template<class T>
-struct is_pod_noextents_cv //for non-c++11 compilers, a safe fallback
-{ static const bool value = BOOST_MOVE_IS_POD_IMPL(T); };
-
-template<class T>
-struct is_pod
- : is_pod_noextents_cv<typename remove_cv<typename remove_all_extents<T>::type>::type>
-{};
-
-//////////////////////////////////////
-// is_empty
-//////////////////////////////////////
-#if !defined(BOOST_MOVE_IS_EMPTY)
-
-template <typename T>
-struct empty_helper_t1 : public T
-{
- empty_helper_t1(); // hh compiler bug workaround
- int i[256];
- private:
-
- empty_helper_t1(const empty_helper_t1&);
- empty_helper_t1& operator=(const empty_helper_t1&);
-};
-
-struct empty_helper_t2 { int i[256]; };
-
-template <typename T, bool IsClass = is_class<T>::value >
-struct is_empty_nonintrinsic
-{
- static const bool value = false;
-};
-
-template <typename T>
-struct is_empty_nonintrinsic<T, true>
-{
- static const bool value = sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2);
-};
-#endif
-
-template <class T>
-struct is_empty
-{ static const bool value = BOOST_MOVE_IS_EMPTY_IMPL(T); };
-
-
-template<class T>
-struct has_boost_move_no_copy_constructor_or_assign_type
-{
- template <class U>
- static yes_type test(typename U::boost_move_no_copy_constructor_or_assign*);
-
- template <class U>
- static no_type test(...);
-
- static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
-};
-
-//////////////////////////////////////
-// is_copy_constructible
-//////////////////////////////////////
-#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \
- && !defined(BOOST_INTEL_CXX_VERSION) && \
- !(defined(BOOST_MSVC) && _MSC_VER == 1800)
-#define BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE
-#endif
-
-template<class T>
-struct is_copy_constructible
-{
- // Intel compiler has problems with SFINAE for copy constructors and deleted functions:
- //
- // error: function *function_name* cannot be referenced -- it is a deleted function
- // static yes_type test(U&, decltype(U(boost::declval<U&>()))* = 0);
- // ^
- // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
- // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
- #if defined(BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE)
- template<class U> static typename add_reference<U>::type source();
- static no_type test(...);
- #ifdef BOOST_NO_CXX11_DECLTYPE
- template <class U>
- static yes_type test(U&, bool_<sizeof(U(source<U>()))>* = 0);
- #else
- template <class U>
- static yes_type test(U&, decltype(U(source<U>()))* = 0);
- #endif
- static const bool value = sizeof(test(source<T>())) == sizeof(yes_type);
- #else
- static const bool value = !has_boost_move_no_copy_constructor_or_assign_type<T>::value;
- #endif
-};
-
-
-//////////////////////////////////////
-// is_copy_assignable
-//////////////////////////////////////
-#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \
- && !defined(BOOST_INTEL_CXX_VERSION) && \
- !(defined(BOOST_MSVC) && _MSC_VER == 1800)
-#define BOOST_MOVE_TT_CXX11_IS_COPY_ASSIGNABLE
-#endif
-
-template <class T>
-struct is_copy_assignable
-{
-// Intel compiler has problems with SFINAE for copy constructors and deleted functions:
-//
-// error: function *function_name* cannot be referenced -- it is a deleted function
-// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval<T1&>()))* = 0);
-// ^
-//
-// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
-// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
-#if defined(BOOST_MOVE_TT_CXX11_IS_COPY_ASSIGNABLE)
- typedef char yes_type;
- struct no_type { char dummy[2]; };
-
- template <class U> static typename add_reference<U>::type source();
- template <class U> static decltype(source<U&>() = source<const U&>(), yes_type() ) test(int);
- template <class> static no_type test(...);
-
- static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
-#else
- static const bool value = !has_boost_move_no_copy_constructor_or_assign_type<T>::value;
-#endif
-};
-
-//////////////////////////////////////
-// is_trivially_destructible
-//////////////////////////////////////
-template<class T>
-struct is_trivially_destructible
-{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T); };
-
-//////////////////////////////////////
-// is_trivially_default_constructible
-//////////////////////////////////////
-template<class T>
-struct is_trivially_default_constructible
-{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T); };
-
-//////////////////////////////////////
-// is_trivially_copy_constructible
-//////////////////////////////////////
-template<class T>
-struct is_trivially_copy_constructible
-{
- //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
- //deleted copy constructors so make sure the type is copy constructible.
- static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T);
-};
-
-//////////////////////////////////////
-// is_trivially_move_constructible
-//////////////////////////////////////
-template<class T>
-struct is_trivially_move_constructible
-{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
-
-//////////////////////////////////////
-// is_trivially_copy_assignable
-//////////////////////////////////////
-template<class T>
-struct is_trivially_copy_assignable
-{
- //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
- //deleted copy constructors so make sure the type is copy constructible.
- static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T);
-};
-
-//////////////////////////////////////
-// is_trivially_move_assignable
-//////////////////////////////////////
-template<class T>
-struct is_trivially_move_assignable
-{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T); };
-
-//////////////////////////////////////
-// is_nothrow_default_constructible
-//////////////////////////////////////
-template<class T>
-struct is_nothrow_default_constructible
- : is_pod<T>
-{ static const bool value = BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T); };
-
-//////////////////////////////////////
-// is_nothrow_copy_constructible
-//////////////////////////////////////
-template<class T>
-struct is_nothrow_copy_constructible
-{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T); };
-
-//////////////////////////////////////
-// is_nothrow_move_constructible
-//////////////////////////////////////
-template<class T>
-struct is_nothrow_move_constructible
-{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T); };
-
-//////////////////////////////////////
-// is_nothrow_copy_assignable
-//////////////////////////////////////
-template<class T>
-struct is_nothrow_copy_assignable
-{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T); };
-
-//////////////////////////////////////
-// is_nothrow_move_assignable
-//////////////////////////////////////
-template<class T>
-struct is_nothrow_move_assignable
-{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T); };
-
-//////////////////////////////////////
-// is_nothrow_swappable
-//////////////////////////////////////
-template<class T>
-struct is_nothrow_swappable
-{
- static const bool value = is_empty<T>::value || is_pod<T>::value;
-};
-
-//////////////////////////////////////
-// alignment_of
-//////////////////////////////////////
-template <typename T>
-struct alignment_of_hack
-{
- T t1;
- char c;
- T t2;
- alignment_of_hack();
-};
-
-template <unsigned A, unsigned S>
-struct alignment_logic
-{ static const std::size_t value = A < S ? A : S; };
-
-template< typename T >
-struct alignment_of_impl
-#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
- // With MSVC both the native __alignof operator
- // and our own logic gets things wrong from time to time :-(
- // Using a combination of the two seems to make the most of a bad job:
- : alignment_logic< sizeof(alignment_of_hack<T>) - 2*sizeof(T), __alignof(T)>
-{};
-#elif !defined(BOOST_MOVE_ALIGNMENT_OF)
- : alignment_logic< sizeof(alignment_of_hack<T>) - 2*sizeof(T), sizeof(T)>
-{};
-#else
-{ static const std::size_t value = BOOST_MOVE_ALIGNMENT_OF(T); };
-#endif
-
-template< typename T >
-struct alignment_of
- : alignment_of_impl<T>
-{};
-
-class alignment_dummy;
-typedef void (*function_ptr)();
-typedef int (alignment_dummy::*member_ptr);
-typedef int (alignment_dummy::*member_function_ptr)();
-struct alignment_struct
-{ long double dummy[4]; };
-
-/////////////////////////////
-// max_align_t
-/////////////////////////////
-//This is not standard, but should work with all compilers
-union max_align
-{
- char char_;
- short short_;
- int int_;
- long long_;
- #ifdef BOOST_HAS_LONG_LONG
- ::boost::long_long_type long_long_;
- #endif
- float float_;
- double double_;
- void * void_ptr_;
- long double long_double_[4];
- alignment_dummy *unknown_class_ptr_;
- function_ptr function_ptr_;
- member_function_ptr member_function_ptr_;
- alignment_struct alignment_struct_;
-};
-
-typedef union max_align max_align_t;
-
-/////////////////////////////
-// aligned_storage
-/////////////////////////////
-
-#if !defined(BOOST_NO_ALIGNMENT)
-
-template<std::size_t Len, std::size_t Align>
-struct aligned_struct;
-
-#define BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(A)\
-template<std::size_t Len>\
-struct BOOST_ALIGNMENT(A) aligned_struct<Len, A>\
-{\
- char data[Len];\
-};\
-//
-
-//Up to 4K alignment (typical page size)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x2)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x4)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x8)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x10)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x20)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x40)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x80)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x100)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x200)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x400)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x800)
-BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000)
-
-#undef BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT
-
-// Workaround for bogus [-Wignored-attributes] warning on GCC 6.x/7.x: don't use a type that "directly" carries the alignment attribute.
-// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82270
-template<std::size_t Len, std::size_t Align>
-union aligned_struct_wrapper
-{
- aligned_struct<Len, Align> aligner;
- char data[sizeof(aligned_struct<Len, Align>)];
-};
-
-template<std::size_t Len, std::size_t Align>
-struct aligned_storage_impl
-{
- typedef aligned_struct_wrapper<Len, Align> type;
-};
-
-#else //BOOST_NO_ALIGNMENT
-
-template<class T, std::size_t Len>
-union aligned_union
-{
- T aligner;
- char data[Len];
-};
-
-template<std::size_t Len, std::size_t Align, class T, bool Ok>
-struct aligned_next;
-
-template<std::size_t Len, std::size_t Align, class T>
-struct aligned_next<Len, Align, T, true>
-{
- BOOST_STATIC_ASSERT((alignment_of<T>::value == Align));
- typedef aligned_union<T, Len> type;
-};
-
-//End of search defaults to max_align_t
-template<std::size_t Len, std::size_t Align>
-struct aligned_next<Len, Align, max_align_t, false>
-{ typedef aligned_union<max_align_t, Len> type; };
-
-//Now define a search list through types
-#define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\
- template<std::size_t Len, std::size_t Align>\
- struct aligned_next<Len, Align, TYPE, false>\
- : aligned_next<Len, Align, NEXT_TYPE, Align == alignment_of<NEXT_TYPE>::value>\
- {};\
- //
- BOOST_MOVE_ALIGNED_NEXT_STEP(long double, max_align_t)
- BOOST_MOVE_ALIGNED_NEXT_STEP(double, long double)
- #ifdef BOOST_HAS_LONG_LONG
- BOOST_MOVE_ALIGNED_NEXT_STEP(::boost::long_long_type, double)
- BOOST_MOVE_ALIGNED_NEXT_STEP(long, ::boost::long_long_type)
- #else
- BOOST_MOVE_ALIGNED_NEXT_STEP(long, double)
- #endif
- BOOST_MOVE_ALIGNED_NEXT_STEP(int, long)
- BOOST_MOVE_ALIGNED_NEXT_STEP(short, int)
- BOOST_MOVE_ALIGNED_NEXT_STEP(char, short)
-#undef BOOST_MOVE_ALIGNED_NEXT_STEP
-
-template<std::size_t Len, std::size_t Align>
-struct aligned_storage_impl
- : aligned_next<Len, Align, char, Align == alignment_of<char>::value>
-{};
-
-#endif
-
-template<std::size_t Len, std::size_t Align = alignment_of<max_align_t>::value>
-struct aligned_storage
-{
- //Sanity checks for input parameters
- BOOST_STATIC_ASSERT(Align > 0);
-
- //Sanity checks for output type
- typedef typename aligned_storage_impl<Len ? Len : 1, Align>::type type;
- static const std::size_t value = alignment_of<type>::value;
- BOOST_STATIC_ASSERT(value >= Align);
- BOOST_STATIC_ASSERT((value % Align) == 0);
-
- //Just in case someone instantiates aligned_storage
- //instead of aligned_storage::type (typical error).
- private:
- aligned_storage();
-};
-
-} //namespace move_detail {
-} //namespace boost {
-
-#include <boost/move/detail/config_end.hpp>
-
-#endif //#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/mpl/assert.hpp b/src/third_party/boost-1.68.0/boost/mpl/assert.hpp
deleted file mode 100644
index e41b583c6d6..00000000000
--- a/src/third_party/boost-1.68.0/boost/mpl/assert.hpp
+++ /dev/null
@@ -1,450 +0,0 @@
-
-#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED
-#define BOOST_MPL_ASSERT_HPP_INCLUDED
-
-// Copyright Aleksey Gurtovoy 2000-2006
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/mpl for documentation.
-
-// $Id$
-// $Date$
-// $Revision$
-
-#include <boost/mpl/not.hpp>
-#include <boost/mpl/aux_/value_wknd.hpp>
-#include <boost/mpl/aux_/nested_type_wknd.hpp>
-#include <boost/mpl/aux_/yes_no.hpp>
-#include <boost/mpl/aux_/na.hpp>
-#include <boost/mpl/aux_/adl_barrier.hpp>
-
-#include <boost/mpl/aux_/config/nttp.hpp>
-#include <boost/mpl/aux_/config/dtp.hpp>
-#include <boost/mpl/aux_/config/gcc.hpp>
-#include <boost/mpl/aux_/config/msvc.hpp>
-#include <boost/mpl/aux_/config/gpu.hpp>
-#include <boost/mpl/aux_/config/static_constant.hpp>
-#include <boost/mpl/aux_/config/pp_counter.hpp>
-#include <boost/mpl/aux_/config/workaround.hpp>
-
-#include <boost/preprocessor/cat.hpp>
-
-#include <boost/config.hpp> // make sure 'size_t' is placed into 'std'
-#include <cstddef>
-
-#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
-#include <boost/mpl/if.hpp>
-#endif
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
- || (BOOST_MPL_CFG_GCC != 0) \
- || BOOST_WORKAROUND(__IBMCPP__, <= 600)
-# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
-#endif
-
-#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \
- || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
- || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
- || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
-# define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
-#endif
-
-// agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants)
-// and GCC (which issues "unused variable" warnings when static constants are used
-// at a function scope)
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
- || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) || defined(__PGI)
-# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
-#else
-# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
-#endif
-
-
-BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
-
-struct failed {};
-
-// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept
-// 'assert<false>' by reference; can't apply it unconditionally -- apparently it
-// degrades the quality of GCC diagnostics
-#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
-# define AUX778076_ASSERT_ARG(x) x&
-#else
-# define AUX778076_ASSERT_ARG(x) x
-#endif
-
-template< bool C > struct assert { typedef void* type; };
-template<> struct assert<false> { typedef AUX778076_ASSERT_ARG(assert) type; };
-
-template< bool C >
-int assertion_failed( typename assert<C>::type );
-
-template< bool C >
-struct assertion
-{
- static int failed( assert<false> );
-};
-
-template<>
-struct assertion<true>
-{
- static int failed( void* );
-};
-
-struct assert_
-{
-#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
- template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {};
-#endif
- static assert_ const arg;
- enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal };
-};
-
-
-#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
-
-bool operator==( failed, failed );
-bool operator!=( failed, failed );
-bool operator>( failed, failed );
-bool operator>=( failed, failed );
-bool operator<( failed, failed );
-bool operator<=( failed, failed );
-
-#if defined(__EDG_VERSION__)
-template< bool (*)(failed, failed), long x, long y > struct assert_relation {};
-# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<r,x,y>
-#else
-template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) >
-struct assert_relation {};
-# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<x,y,r>
-#endif
-
-#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
-
-boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ );
-boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ );
-boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ );
-boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ );
-boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ );
-boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ );
-
-template< assert_::relations r, long x, long y > struct assert_relation {};
-
-#endif
-
-#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
-
-template<class Pred>
-struct extract_assert_pred;
-
-template<class Pred>
-struct extract_assert_pred<void(Pred)> { typedef Pred type; };
-
-template<class Pred>
-struct eval_assert {
- typedef typename extract_assert_pred<Pred>::type P;
- typedef typename P::type p_type;
- typedef typename ::boost::mpl::if_c<p_type::value,
- AUX778076_ASSERT_ARG(assert<false>),
- failed ************ P::************
- >::type type;
-};
-
-template<class Pred>
-struct eval_assert_not {
- typedef typename extract_assert_pred<Pred>::type P;
- typedef typename P::type p_type;
- typedef typename ::boost::mpl::if_c<!p_type::value,
- AUX778076_ASSERT_ARG(assert<false>),
- failed ************ ::boost::mpl::not_<P>::************
- >::type type;
-};
-
-template< typename T >
-T make_assert_arg();
-
-#elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
-
-template< bool > struct assert_arg_pred_impl { typedef int type; };
-template<> struct assert_arg_pred_impl<true> { typedef void* type; };
-
-template< typename P > struct assert_arg_pred
-{
- typedef typename P::type p_type;
- typedef typename assert_arg_pred_impl< p_type::value >::type type;
-};
-
-template< typename P > struct assert_arg_pred_not
-{
- typedef typename P::type p_type;
- BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value );
- typedef typename assert_arg_pred_impl<p>::type type;
-};
-
-#if defined(BOOST_GCC) && BOOST_GCC >= 80000
-#define BOOST_MPL_IGNORE_PARENTHESES_WARNING
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wparentheses"
-#endif
-
-template< typename Pred >
-failed ************ (Pred::************
- assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
- );
-
-template< typename Pred >
-failed ************ (boost::mpl::not_<Pred>::************
- assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
- );
-
-#ifdef BOOST_MPL_IGNORE_PARENTHESES_WARNING
-#undef BOOST_MPL_IGNORE_PARENTHESES_WARNING
-#pragma GCC diagnostic pop
-#endif
-
-template< typename Pred >
-AUX778076_ASSERT_ARG(assert<false>)
-assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );
-
-template< typename Pred >
-AUX778076_ASSERT_ARG(assert<false>)
-assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
-
-
-#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
-
-template< bool c, typename Pred > struct assert_arg_type_impl
-{
- typedef failed ************ Pred::* mwcw83_wknd;
- typedef mwcw83_wknd ************* type;
-};
-
-template< typename Pred > struct assert_arg_type_impl<true,Pred>
-{
- typedef AUX778076_ASSERT_ARG(assert<false>) type;
-};
-
-template< typename Pred > struct assert_arg_type
- : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred >
-{
-};
-
-template< typename Pred >
-typename assert_arg_type<Pred>::type
-assert_arg(void (*)(Pred), int);
-
-template< typename Pred >
-typename assert_arg_type< boost::mpl::not_<Pred> >::type
-assert_not_arg(void (*)(Pred), int);
-
-# if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
-template< long x, long y, bool (*r)(failed, failed) >
-typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type
-assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) );
-# else
-template< assert_::relations r, long x, long y >
-typename assert_arg_type_impl< false,assert_relation<r,x,y> >::type
-assert_rel_arg( assert_relation<r,x,y> );
-# endif
-
-#endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
-
-#undef AUX778076_ASSERT_ARG
-
-BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
-
-#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
-
-// BOOST_MPL_ASSERT((pred<x,...>))
-
-#define BOOST_MPL_ASSERT(pred) \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
- boost::mpl::assertion_failed<false>( \
- boost::mpl::make_assert_arg< \
- typename boost::mpl::eval_assert<void pred>::type \
- >() \
- ) \
- ) \
- ) \
-/**/
-
-// BOOST_MPL_ASSERT_NOT((pred<x,...>))
-
-#define BOOST_MPL_ASSERT_NOT(pred) \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
- boost::mpl::assertion_failed<false>( \
- boost::mpl::make_assert_arg< \
- typename boost::mpl::eval_assert_not<void pred>::type \
- >() \
- ) \
- ) \
- ) \
-/**/
-
-#else
-
-// BOOST_MPL_ASSERT((pred<x,...>))
-
-#define BOOST_MPL_ASSERT(pred) \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
- boost::mpl::assertion_failed<false>( \
- boost::mpl::assert_arg( (void (*) pred)0, 1 ) \
- ) \
- ) \
- ) \
-/**/
-
-// BOOST_MPL_ASSERT_NOT((pred<x,...>))
-
-#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
-# define BOOST_MPL_ASSERT_NOT(pred) \
-enum { \
- BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
- boost::mpl::assertion<false>::failed( \
- boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
- ) \
- ) \
-}\
-/**/
-#else
-# define BOOST_MPL_ASSERT_NOT(pred) \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
- boost::mpl::assertion_failed<false>( \
- boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
- ) \
- ) \
- ) \
-/**/
-#endif
-
-#endif
-
-// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y)
-
-#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
-
-# if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
-// agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518
-# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
-enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
- boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
- (boost::mpl::failed ************ ( boost::mpl::assert_relation< \
- boost::mpl::assert_::relations( sizeof( \
- boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
- ) ) \
- , x \
- , y \
- >::************)) 0 ) \
- ) \
- ) \
-/**/
-# else
-# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \
- boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
- ) \
- ); \
-BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
- boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
- boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \
- boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \
- , x \
- , y \
- >() ) \
- ) \
- ) \
- ) \
-/**/
-# endif
-
-# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
-BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \
-/**/
-
-#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
-
-# if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
-# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
- boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \
- boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \
- ) ) \
- ) \
- ) \
-/**/
-# else
-# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
- boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \
- boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \
- ) \
- ) \
-/**/
-# endif
-
-#endif
-
-
-// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )
-
-#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
-# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
-struct msg; \
-typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
-{ \
- using boost::mpl::assert_::types; \
- static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
- { return 0; } \
-} BOOST_PP_CAT(mpl_assert_arg,counter); \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
- boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
- ) \
- ) \
-/**/
-#else
-# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
-struct msg; \
-typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
-{ \
- static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
- { return 0; } \
-} BOOST_PP_CAT(mpl_assert_arg,counter); \
-BOOST_MPL_AUX_ASSERT_CONSTANT( \
- std::size_t \
- , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
- boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
- ) \
- ) \
-/**/
-#endif
-
-#define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
-BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \
-/**/
-
-#endif // BOOST_MPL_ASSERT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float.hpp
deleted file mode 100644
index 8d31e408cd8..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float.hpp
+++ /dev/null
@@ -1,2025 +0,0 @@
-///////////////////////////////////////////////////////////////
-// Copyright 2013 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
-
-#ifndef BOOST_MATH_CPP_BIN_FLOAT_HPP
-#define BOOST_MATH_CPP_BIN_FLOAT_HPP
-
-#include <boost/multiprecision/cpp_int.hpp>
-#include <boost/multiprecision/integer.hpp>
-#include <boost/math/special_functions/trunc.hpp>
-#include <boost/multiprecision/detail/float_string_cvt.hpp>
-
-//
-// Some includes we need from Boost.Math, since we rely on that library to provide these functions:
-//
-#include <boost/math/special_functions/asinh.hpp>
-#include <boost/math/special_functions/acosh.hpp>
-#include <boost/math/special_functions/atanh.hpp>
-#include <boost/math/special_functions/cbrt.hpp>
-#include <boost/math/special_functions/expm1.hpp>
-#include <boost/math/special_functions/gamma.hpp>
-
-#ifdef BOOST_HAS_FLOAT128
-#include <quadmath.h>
-#endif
-
-namespace boost{ namespace multiprecision{ namespace backends{
-
-enum digit_base_type
-{
- digit_base_2 = 2,
- digit_base_10 = 10
-};
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4522 6326) // multiple assignment operators specified, comparison of two constants
-#endif
-
-namespace detail{
-
-template <class U>
-inline typename enable_if_c<is_unsigned<U>::value, bool>::type is_negative(U) { return false; }
-template <class S>
-inline typename disable_if_c<is_unsigned<S>::value, bool>::type is_negative(S s) { return s < 0; }
-
-}
-
-template <unsigned Digits, digit_base_type DigitBase = digit_base_10, class Allocator = void, class Exponent = int, Exponent MinExponent = 0, Exponent MaxExponent = 0>
-class cpp_bin_float
-{
-public:
- static const unsigned bit_count = DigitBase == digit_base_2 ? Digits : (Digits * 1000uL) / 301uL + (((Digits * 1000uL) % 301) ? 2u : 1u);
- typedef cpp_int_backend<is_void<Allocator>::value ? bit_count : 0, bit_count, is_void<Allocator>::value ? unsigned_magnitude : signed_magnitude, unchecked, Allocator> rep_type;
- typedef cpp_int_backend<is_void<Allocator>::value ? 2 * bit_count : 0, 2 * bit_count, is_void<Allocator>::value ? unsigned_magnitude : signed_magnitude, unchecked, Allocator> double_rep_type;
-
- typedef typename rep_type::signed_types signed_types;
- typedef typename rep_type::unsigned_types unsigned_types;
- typedef boost::mpl::list<float, double, long double> float_types;
- typedef Exponent exponent_type;
-
- static const exponent_type max_exponent_limit = boost::integer_traits<exponent_type>::const_max - 2 * static_cast<exponent_type>(bit_count);
- static const exponent_type min_exponent_limit = boost::integer_traits<exponent_type>::const_min + 2 * static_cast<exponent_type>(bit_count);
-
- BOOST_STATIC_ASSERT_MSG(MinExponent >= min_exponent_limit, "Template parameter MinExponent is too negative for our internal logic to function correctly, sorry!");
- BOOST_STATIC_ASSERT_MSG(MaxExponent <= max_exponent_limit, "Template parameter MaxExponent is too large for our internal logic to function correctly, sorry!");
- BOOST_STATIC_ASSERT_MSG(MinExponent <= 0, "Template parameter MinExponent can not be positive!");
- BOOST_STATIC_ASSERT_MSG(MaxExponent >= 0, "Template parameter MaxExponent can not be negative!");
-
- static const exponent_type max_exponent = MaxExponent == 0 ? max_exponent_limit : MaxExponent;
- static const exponent_type min_exponent = MinExponent == 0 ? min_exponent_limit : MinExponent;
-
- static const exponent_type exponent_zero = max_exponent + 1;
- static const exponent_type exponent_infinity = max_exponent + 2;
- static const exponent_type exponent_nan = max_exponent + 3;
-
-private:
-
- rep_type m_data;
- exponent_type m_exponent;
- bool m_sign;
-public:
- cpp_bin_float() BOOST_MP_NOEXCEPT_IF(noexcept(rep_type())) : m_data(), m_exponent(exponent_zero), m_sign(false) {}
-
- cpp_bin_float(const cpp_bin_float &o) BOOST_MP_NOEXCEPT_IF(noexcept(rep_type(std::declval<const rep_type&>())))
- : m_data(o.m_data), m_exponent(o.m_exponent), m_sign(o.m_sign) {}
-
- template <unsigned D, digit_base_type B, class A, class E, E MinE, E MaxE>
- cpp_bin_float(const cpp_bin_float<D, B, A, E, MinE, MaxE> &o, typename boost::enable_if_c<(bit_count >= cpp_bin_float<D, B, A, E, MinE, MaxE>::bit_count)>::type const* = 0)
- {
- *this = o;
- }
- template <unsigned D, digit_base_type B, class A, class E, E MinE, E MaxE>
- explicit cpp_bin_float(const cpp_bin_float<D, B, A, E, MinE, MaxE> &o, typename boost::disable_if_c<(bit_count >= cpp_bin_float<D, B, A, E, MinE, MaxE>::bit_count)>::type const* = 0)
- : m_exponent(o.exponent()), m_sign(o.sign())
- {
- *this = o;
- }
- template <class Float>
- cpp_bin_float(const Float& f,
- typename boost::enable_if_c<
- (number_category<Float>::value == number_kind_floating_point)
- && (std::numeric_limits<Float>::digits <= (int)bit_count)
- && (std::numeric_limits<Float>::radix == 2)
- && (std::numeric_limits<Float>::is_specialized)
-#ifdef BOOST_HAS_FLOAT128
- && !boost::is_same<Float, __float128>::value
-#endif
- >::type const* = 0)
- : m_data(), m_exponent(0), m_sign(false)
- {
- this->assign_float(f);
- }
-
- template <class Float>
- explicit cpp_bin_float(const Float& f,
- typename boost::enable_if_c<
- (number_category<Float>::value == number_kind_floating_point)
- && (std::numeric_limits<Float>::digits > (int)bit_count)
- && (std::numeric_limits<Float>::radix == 2)
- && (std::numeric_limits<Float>::is_specialized)
-#ifdef BOOST_HAS_FLOAT128
- && !boost::is_same<Float, __float128>::value
-#endif
->::type const* = 0)
- : m_data(), m_exponent(0), m_sign(false)
- {
- this->assign_float(f);
- }
-#ifdef BOOST_HAS_FLOAT128
- template <class Float>
- cpp_bin_float(const Float& f,
- typename boost::enable_if_c<
- boost::is_same<Float, __float128>::value
- && ((int)bit_count >= 113)
- >::type const* = 0)
- : m_data(), m_exponent(0), m_sign(false)
- {
- this->assign_float(f);
- }
- template <class Float>
- explicit cpp_bin_float(const Float& f,
- typename boost::enable_if_c<
- boost::is_same<Float, __float128>::value
- && ((int)bit_count < 113)
- >::type const* = 0)
- : m_data(), m_exponent(0), m_sign(false)
- {
- this->assign_float(f);
- }
-#endif
- cpp_bin_float& operator=(const cpp_bin_float &o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<rep_type&>() = std::declval<const rep_type&>()))
- {
- m_data = o.m_data;
- m_exponent = o.m_exponent;
- m_sign = o.m_sign;
- return *this;
- }
-
- template <unsigned D, digit_base_type B, class A, class E, E MinE, E MaxE>
- cpp_bin_float& operator=(const cpp_bin_float<D, B, A, E, MinE, MaxE> &f)
- {
- switch(eval_fpclassify(f))
- {
- case FP_ZERO:
- m_data = limb_type(0);
- m_sign = f.sign();
- m_exponent = exponent_zero;
- break;
- case FP_NAN:
- m_data = limb_type(0);
- m_sign = false;
- m_exponent = exponent_nan;
- break;;
- case FP_INFINITE:
- m_data = limb_type(0);
- m_sign = f.sign();
- m_exponent = exponent_infinity;
- break;
- default:
- typename cpp_bin_float<D, B, A, E, MinE, MaxE>::rep_type b(f.bits());
- this->exponent() = f.exponent() + (E)bit_count - (E)cpp_bin_float<D, B, A, E, MinE, MaxE>::bit_count;
- this->sign() = f.sign();
- copy_and_round(*this, b);
- }
- return *this;
- }
-#ifdef BOOST_HAS_FLOAT128
- template <class Float>
- typename boost::enable_if_c<
- (number_category<Float>::value == number_kind_floating_point)
- //&& (std::numeric_limits<Float>::digits <= (int)bit_count)
- && ((std::numeric_limits<Float>::radix == 2) || (boost::is_same<Float, __float128>::value)), cpp_bin_float&>::type
- operator=(const Float& f)
-#else
- template <class Float>
- typename boost::enable_if_c<
- (number_category<Float>::value == number_kind_floating_point)
- //&& (std::numeric_limits<Float>::digits <= (int)bit_count)
- && (std::numeric_limits<Float>::radix == 2), cpp_bin_float&>::type
- operator=(const Float& f)
-#endif
- {
- return assign_float(f);
- }
-
-#ifdef BOOST_HAS_FLOAT128
- template <class Float>
- typename boost::enable_if_c<boost::is_same<Float, __float128>::value, cpp_bin_float& >::type assign_float(Float f)
- {
- using default_ops::eval_add;
- typedef typename boost::multiprecision::detail::canonical<int, cpp_bin_float>::type bf_int_type;
- if(f == 0)
- {
- m_data = limb_type(0);
- m_sign = (signbitq(f) > 0);
- m_exponent = exponent_zero;
- return *this;
- }
- else if(isnanq(f))
- {
- m_data = limb_type(0);
- m_sign = false;
- m_exponent = exponent_nan;
- return *this;
- }
- else if(isinfq(f))
- {
- m_data = limb_type(0);
- m_sign = (f < 0);
- m_exponent = exponent_infinity;
- return *this;
- }
- if(f < 0)
- {
- *this = -f;
- this->negate();
- return *this;
- }
-
- typedef typename mpl::front<unsigned_types>::type ui_type;
- m_data = static_cast<ui_type>(0u);
- m_sign = false;
- m_exponent = 0;
-
- static const int bits = sizeof(int) * CHAR_BIT - 1;
- int e;
- f = frexpq(f, &e);
- while(f)
- {
- f = ldexpq(f, bits);
- e -= bits;
- int ipart = (int)truncq(f);
- f -= ipart;
- m_exponent += bits;
- cpp_bin_float t;
- t = static_cast<bf_int_type>(ipart);
- eval_add(*this, t);
- }
- m_exponent += static_cast<Exponent>(e);
- return *this;
- }
-#endif
-#ifdef BOOST_HAS_FLOAT128
- template <class Float>
- typename boost::enable_if_c<is_floating_point<Float>::value && !is_same<Float, __float128>::value, cpp_bin_float&>::type assign_float(Float f)
-#else
- template <class Float>
- typename boost::enable_if_c<is_floating_point<Float>::value, cpp_bin_float&>::type assign_float(Float f)
-#endif
- {
- BOOST_MATH_STD_USING
- using default_ops::eval_add;
- typedef typename boost::multiprecision::detail::canonical<int, cpp_bin_float>::type bf_int_type;
-
- switch((boost::math::fpclassify)(f))
- {
- case FP_ZERO:
- m_data = limb_type(0);
- m_sign = ((boost::math::signbit)(f) > 0);
- m_exponent = exponent_zero;
- return *this;
- case FP_NAN:
- m_data = limb_type(0);
- m_sign = false;
- m_exponent = exponent_nan;
- return *this;
- case FP_INFINITE:
- m_data = limb_type(0);
- m_sign = (f < 0);
- m_exponent = exponent_infinity;
- return *this;
- }
- if(f < 0)
- {
- *this = -f;
- this->negate();
- return *this;
- }
-
- typedef typename mpl::front<unsigned_types>::type ui_type;
- m_data = static_cast<ui_type>(0u);
- m_sign = false;
- m_exponent = 0;
-
- static const int bits = sizeof(int) * CHAR_BIT - 1;
- int e;
- f = frexp(f, &e);
- while(f)
- {
- f = ldexp(f, bits);
- e -= bits;
-#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
- int ipart = itrunc(f);
-#else
- int ipart = static_cast<int>(f);
-#endif
- f -= ipart;
- m_exponent += bits;
- cpp_bin_float t;
- t = static_cast<bf_int_type>(ipart);
- eval_add(*this, t);
- }
- m_exponent += static_cast<Exponent>(e);
- return *this;
- }
-
- template <class Float>
- typename boost::enable_if_c<
- (number_category<Float>::value == number_kind_floating_point)
- && !boost::is_floating_point<Float>::value
- /*&& (std::numeric_limits<number<Float> >::radix == 2)*/,
- cpp_bin_float&>::type assign_float(Float f)
- {
- BOOST_MATH_STD_USING
- using default_ops::eval_add;
- using default_ops::eval_get_sign;
- using default_ops::eval_convert_to;
- using default_ops::eval_subtract;
-
- typedef typename boost::multiprecision::detail::canonical<int, Float>::type f_int_type;
- typedef typename boost::multiprecision::detail::canonical<int, cpp_bin_float>::type bf_int_type;
-
- switch(eval_fpclassify(f))
- {
- case FP_ZERO:
- m_data = limb_type(0);
- m_sign = ((boost::math::signbit)(f) > 0);
- m_exponent = exponent_zero;
- return *this;
- case FP_NAN:
- m_data = limb_type(0);
- m_sign = false;
- m_exponent = exponent_nan;
- return *this;
- case FP_INFINITE:
- m_data = limb_type(0);
- m_sign = (f < 0);
- m_exponent = exponent_infinity;
- return *this;
- }
- if(eval_get_sign(f) < 0)
- {
- f.negate();
- *this = f;
- this->negate();
- return *this;
- }
-
- typedef typename mpl::front<unsigned_types>::type ui_type;
- m_data = static_cast<ui_type>(0u);
- m_sign = false;
- m_exponent = 0;
-
- static const int bits = sizeof(int) * CHAR_BIT - 1;
- int e;
- eval_frexp(f, f, &e);
- while(eval_get_sign(f) != 0)
- {
- eval_ldexp(f, f, bits);
- e -= bits;
- int ipart;
- eval_convert_to(&ipart, f);
- eval_subtract(f, static_cast<f_int_type>(ipart));
- m_exponent += bits;
- eval_add(*this, static_cast<bf_int_type>(ipart));
- }
- m_exponent += e;
- if(m_exponent > max_exponent)
- m_exponent = exponent_infinity;
- if(m_exponent < min_exponent)
- {
- m_data = limb_type(0u);
- m_exponent = exponent_zero;
- m_sign = ((boost::math::signbit)(f) > 0);
- }
- else if(eval_get_sign(m_data) == 0)
- {
- m_exponent = exponent_zero;
- m_sign = ((boost::math::signbit)(f) > 0);
- }
- return *this;
- }
-
- template <class I>
- typename boost::enable_if<is_integral<I>, cpp_bin_float&>::type operator=(const I& i)
- {
- using default_ops::eval_bit_test;
- if(!i)
- {
- m_data = static_cast<limb_type>(0);
- m_exponent = exponent_zero;
- m_sign = false;
- }
- else
- {
- typedef typename make_unsigned<I>::type ui_type;
- ui_type fi = static_cast<ui_type>(boost::multiprecision::detail::unsigned_abs(i));
- typedef typename boost::multiprecision::detail::canonical<ui_type, rep_type>::type ar_type;
- m_data = static_cast<ar_type>(fi);
- unsigned shift = msb(fi);
- if(shift >= bit_count)
- {
- m_exponent = static_cast<Exponent>(shift);
- m_data = static_cast<ar_type>(fi >> (shift + 1 - bit_count));
- }
- else
- {
- m_exponent = static_cast<Exponent>(shift);
- eval_left_shift(m_data, bit_count - shift - 1);
- }
- BOOST_ASSERT(eval_bit_test(m_data, bit_count-1));
- m_sign = detail::is_negative(i);
- }
- return *this;
- }
-
- cpp_bin_float& operator=(const char *s);
-
- void swap(cpp_bin_float &o) BOOST_NOEXCEPT
- {
- m_data.swap(o.m_data);
- std::swap(m_exponent, o.m_exponent);
- std::swap(m_sign, o.m_sign);
- }
-
- std::string str(std::streamsize dig, std::ios_base::fmtflags f) const;
-
- void negate()
- {
- if(m_exponent != exponent_nan)
- m_sign = !m_sign;
- }
-
- int compare(const cpp_bin_float &o) const BOOST_NOEXCEPT
- {
- if(m_sign != o.m_sign)
- return (m_exponent == exponent_zero) && (m_exponent == o.m_exponent) ? 0 : m_sign ? -1 : 1;
- int result;
- if(m_exponent == exponent_nan)
- return -1;
- else if(m_exponent != o.m_exponent)
- {
- if(m_exponent == exponent_zero)
- result = -1;
- else if(o.m_exponent == exponent_zero)
- result = 1;
- else
- result = m_exponent > o.m_exponent ? 1 : -1;
- }
- else
- result = m_data.compare(o.m_data);
- if(m_sign)
- result = -result;
- return result;
- }
- template <class A>
- int compare(const A& o) const BOOST_NOEXCEPT
- {
- cpp_bin_float b;
- b = o;
- return compare(b);
- }
-
- rep_type& bits() { return m_data; }
- const rep_type& bits()const { return m_data; }
- exponent_type& exponent() { return m_exponent; }
- const exponent_type& exponent()const { return m_exponent; }
- bool& sign() { return m_sign; }
- const bool& sign()const { return m_sign; }
- void check_invariants()
- {
- using default_ops::eval_bit_test;
- using default_ops::eval_is_zero;
- if((m_exponent <= max_exponent) && (m_exponent >= min_exponent))
- {
- BOOST_ASSERT(eval_bit_test(m_data, bit_count - 1));
- }
- else
- {
- BOOST_ASSERT(m_exponent > max_exponent);
- BOOST_ASSERT(m_exponent <= exponent_nan);
- BOOST_ASSERT(eval_is_zero(m_data));
- }
- }
- template<class Archive>
- void serialize(Archive & ar, const unsigned int /*version*/)
- {
- ar & m_data;
- ar & m_exponent;
- ar & m_sign;
- }
-};
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class Int>
-inline void copy_and_round(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, Int &arg, int bits_to_keep = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
-{
- // Precondition: exponent of res must have been set before this function is called
- // as we may need to adjust it based on how many bits_to_keep in arg are set.
- using default_ops::eval_msb;
- using default_ops::eval_lsb;
- using default_ops::eval_left_shift;
- using default_ops::eval_bit_test;
- using default_ops::eval_right_shift;
- using default_ops::eval_increment;
- using default_ops::eval_get_sign;
-
- // cancellation may have resulted in arg being all zeros:
- if(eval_get_sign(arg) == 0)
- {
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
- res.sign() = false;
- res.bits() = static_cast<limb_type>(0u);
- return;
- }
- int msb = eval_msb(arg);
- if(static_cast<int>(bits_to_keep) > msb + 1)
- {
- // Must have had cancellation in subtraction,
- // or be converting from a narrower type, so shift left:
- res.bits() = arg;
- eval_left_shift(res.bits(), bits_to_keep - msb - 1);
- res.exponent() -= static_cast<Exponent>(bits_to_keep - msb - 1);
- }
- else if(static_cast<int>(bits_to_keep) < msb + 1)
- {
- // We have more bits_to_keep than we need, so round as required,
- // first get the rounding bit:
- bool roundup = eval_bit_test(arg, msb - bits_to_keep);
- // Then check for a tie:
- if(roundup && (msb - bits_to_keep == (int)eval_lsb(arg)))
- {
- // Ties round towards even:
- if(!eval_bit_test(arg, msb - bits_to_keep + 1))
- roundup = false;
- }
- // Shift off the bits_to_keep we don't need:
- eval_right_shift(arg, msb - bits_to_keep + 1);
- res.exponent() += static_cast<Exponent>(msb - bits_to_keep + 1);
- if(roundup)
- {
- eval_increment(arg);
- if(bits_to_keep)
- {
- if(eval_bit_test(arg, bits_to_keep))
- {
- // This happens very very rairly, all the bits left after
- // truncation must be 1's and we're rounding up an order of magnitude:
- eval_right_shift(arg, 1u);
- ++res.exponent();
- }
- }
- else
- {
- // We get here when bits_to_keep is zero but we're rounding up,
- // as a result we end up with a single digit that is a 1:
- ++bits_to_keep;
- }
- }
- if(bits_to_keep != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
- {
- // Normalize result when we're rounding to fewer bits than we can hold, only happens in conversions
- // to narrower types:
- eval_left_shift(arg, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - bits_to_keep);
- res.exponent() -= static_cast<Exponent>(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - bits_to_keep);
- }
- res.bits() = arg;
- }
- else
- {
- res.bits() = arg;
- }
- if(!bits_to_keep && !res.bits().limbs()[0])
- {
- // We're keeping zero bits and did not round up, so result is zero:
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
- return;
- }
- // Result must be normalized:
- BOOST_ASSERT(((int)eval_msb(res.bits()) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1));
-
- if(res.exponent() > cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent)
- {
- // Overflow:
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
- res.bits() = static_cast<limb_type>(0u);
- }
- else if(res.exponent() < cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent)
- {
- // Underflow:
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
- res.bits() = static_cast<limb_type>(0u);
- }
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void do_eval_add(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
-{
- if(a.exponent() < b.exponent())
- {
- bool s = a.sign();
- do_eval_add(res, b, a);
- if(res.sign() != s)
- res.negate();
- return;
- }
-
- using default_ops::eval_add;
- using default_ops::eval_bit_test;
-
- typedef typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type exponent_type;
-
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
-
- // Special cases first:
- switch(a.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- {
- bool s = a.sign();
- res = b;
- res.sign() = s;
- return;
- }
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan)
- res = b;
- else
- res = a;
- return; // result is still infinite.
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = a;
- return; // result is still a NaN.
- }
- switch(b.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- res = a;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- res = b;
- if(res.sign())
- res.negate();
- return; // result is infinite.
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = b;
- return; // result is a NaN.
- }
-
- BOOST_STATIC_ASSERT(boost::integer_traits<exponent_type>::const_max - cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count > cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent);
-
- bool s = a.sign();
- dt = a.bits();
- if(a.exponent() > (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + b.exponent())
- {
- res.exponent() = a.exponent();
- }
- else
- {
- exponent_type e_diff = a.exponent() - b.exponent();
- BOOST_ASSERT(e_diff >= 0);
- eval_left_shift(dt, e_diff);
- res.exponent() = a.exponent() - e_diff;
- eval_add(dt, b.bits());
- }
-
- copy_and_round(res, dt);
- res.check_invariants();
- if(res.sign() != s)
- res.negate();
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void do_eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
-{
- using default_ops::eval_subtract;
- using default_ops::eval_bit_test;
- using default_ops::eval_decrement;
-
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
-
- // Special cases first:
- switch(a.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan)
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- else
- {
- bool s = a.sign();
- res = b;
- if(res.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero)
- res.sign() = false;
- else if(res.sign() == s)
- res.negate();
- }
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- if((b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan) || (b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity))
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- else
- res = a;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = a;
- return; // result is still a NaN.
- }
- switch(b.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- res = a;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
- res.sign() = !a.sign();
- res.bits() = static_cast<limb_type>(0u);
- return; // result is a NaN.
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = b;
- return; // result is still a NaN.
- }
-
- bool s = a.sign();
- if((a.exponent() > b.exponent()) || ((a.exponent() == b.exponent()) && a.bits().compare(b.bits()) >= 0))
- {
- dt = a.bits();
- if(a.exponent() <= (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + b.exponent())
- {
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e_diff = a.exponent() - b.exponent();
- eval_left_shift(dt, e_diff);
- res.exponent() = a.exponent() - e_diff;
- eval_subtract(dt, b.bits());
- }
- else if(a.exponent() == (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + b.exponent() + 1)
- {
- if(eval_lsb(b.bits()) != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1)
- {
- eval_left_shift(dt, 1);
- eval_decrement(dt);
- res.exponent() = a.exponent() - 1;
- }
- else
- res.exponent() = a.exponent();
- }
- else
- res.exponent() = a.exponent();
- }
- else
- {
- dt = b.bits();
- if(b.exponent() <= (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + a.exponent())
- {
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e_diff = a.exponent() - b.exponent();
- eval_left_shift(dt, -e_diff);
- res.exponent() = b.exponent() + e_diff;
- eval_subtract(dt, a.bits());
- }
- else if(b.exponent() == (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + a.exponent() + 1)
- {
- if(eval_lsb(a.bits()) != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1)
- {
- eval_left_shift(dt, 1);
- eval_decrement(dt);
- res.exponent() = b.exponent() - 1;
- }
- else
- res.exponent() = b.exponent();
- }
- else
- res.exponent() = b.exponent();
- s = !s;
- }
-
- copy_and_round(res, dt);
- if(res.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero)
- res.sign() = false;
- else if(res.sign() != s)
- res.negate();
- res.check_invariants();
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_add(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
-{
- if(a.sign() == b.sign())
- do_eval_add(res, a, b);
- else
- do_eval_subtract(res, a, b);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_add(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a)
-{
- return eval_add(res, res, a);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
-{
- if(a.sign() != b.sign())
- do_eval_add(res, a, b);
- else
- do_eval_subtract(res, a, b);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a)
-{
- return eval_subtract(res, res, a);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
-{
- using default_ops::eval_bit_test;
- using default_ops::eval_multiply;
-
- // Special cases first:
- switch(a.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- {
- if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan)
- res = b;
- else if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity)
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- else
- {
- bool s = a.sign() != b.sign();
- res = a;
- res.sign() = s;
- }
- return;
- }
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- switch(b.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- break;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = b;
- break;
- default:
- bool s = a.sign() != b.sign();
- res = a;
- res.sign() = s;
- break;
- }
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = a;
- return;
- }
- if(b.exponent() > cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent)
- {
- bool s = a.sign() != b.sign();
- res = b;
- res.sign() = s;
- return;
- }
- if((a.exponent() > 0) && (b.exponent() > 0))
- {
- if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent + 2 - a.exponent() < b.exponent())
- {
- // We will certainly overflow:
- bool s = a.sign() != b.sign();
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
- res.sign() = s;
- res.bits() = static_cast<limb_type>(0u);
- return;
- }
- }
- if((a.exponent() < 0) && (b.exponent() < 0))
- {
- if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent - 2 - a.exponent() > b.exponent())
- {
- // We will certainly underflow:
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
- res.sign() = a.sign() != b.sign();
- res.bits() = static_cast<limb_type>(0u);
- return;
- }
- }
-
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
- eval_multiply(dt, a.bits(), b.bits());
- res.exponent() = a.exponent() + b.exponent() - (Exponent)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + 1;
- copy_and_round(res, dt);
- res.check_invariants();
- res.sign() = a.sign() != b.sign();
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a)
-{
- eval_multiply(res, res, a);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class U>
-inline typename enable_if_c<is_unsigned<U>::value>::type eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const U &b)
-{
- using default_ops::eval_bit_test;
- using default_ops::eval_multiply;
-
- // Special cases first:
- switch(a.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- {
- bool s = a.sign();
- res = a;
- res.sign() = s;
- return;
- }
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- if(b == 0)
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- else
- res = a;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = a;
- return;
- }
-
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
- typedef typename boost::multiprecision::detail::canonical<U, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type>::type canon_ui_type;
- eval_multiply(dt, a.bits(), static_cast<canon_ui_type>(b));
- res.exponent() = a.exponent();
- copy_and_round(res, dt);
- res.check_invariants();
- res.sign() = a.sign();
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class U>
-inline typename enable_if_c<is_unsigned<U>::value>::type eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const U &b)
-{
- eval_multiply(res, res, b);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class S>
-inline typename enable_if_c<is_signed<S>::value>::type eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const S &b)
-{
- typedef typename make_unsigned<S>::type ui_type;
- eval_multiply(res, a, static_cast<ui_type>(boost::multiprecision::detail::unsigned_abs(b)));
- if(b < 0)
- res.negate();
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class S>
-inline typename enable_if_c<is_signed<S>::value>::type eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const S &b)
-{
- eval_multiply(res, res, b);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &u, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &v)
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:6326) // comparison of two constants
-#endif
- using default_ops::eval_subtract;
- using default_ops::eval_qr;
- using default_ops::eval_bit_test;
- using default_ops::eval_get_sign;
- using default_ops::eval_increment;
-
- //
- // Special cases first:
- //
- switch(u.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- {
- switch(v.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- return;
- }
- bool s = u.sign() != v.sign();
- res = u;
- res.sign() = s;
- return;
- }
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- {
- switch(v.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- return;
- }
- bool s = u.sign() != v.sign();
- res = u;
- res.sign() = s;
- return;
- }
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- return;
- }
- switch(v.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- {
- bool s = u.sign() != v.sign();
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
- res.sign() = s;
- return;
- }
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
- res.bits() = limb_type(0);
- res.sign() = u.sign() != v.sign();
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- return;
- }
-
- // We can scale u and v so that both are integers, then perform integer
- // division to obtain quotient q and remainder r, such that:
- //
- // q * v + r = u
- //
- // and hense:
- //
- // q + r/v = u/v
- //
- // From this, assuming q has cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count
- // bits we only need to determine whether
- // r/v is less than, equal to, or greater than 0.5 to determine rounding -
- // this we can do with a shift and comparison.
- //
- // We can set the exponent and sign of the result up front:
- //
- if((v.exponent() < 0) && (u.exponent() > 0))
- {
- // Check for overflow:
- if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent + v.exponent() < u.exponent() - 1)
- {
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
- res.sign() = u.sign() != v.sign();
- res.bits() = static_cast<limb_type>(0u);
- return;
- }
- }
- else if((v.exponent() > 0) && (u.exponent() < 0))
- {
- // Check for underflow:
- if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent + v.exponent() > u.exponent())
- {
- // We will certainly underflow:
- res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
- res.sign() = u.sign() != v.sign();
- res.bits() = static_cast<limb_type>(0u);
- return;
- }
- }
- res.exponent() = u.exponent() - v.exponent() - 1;
- res.sign() = u.sign() != v.sign();
- //
- // Now get the quotient and remainder:
- //
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type t(u.bits()), t2(v.bits()), q, r;
- eval_left_shift(t, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count);
- eval_qr(t, t2, q, r);
- //
- // We now have either "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count"
- // or "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count+1" significant
- // bits in q.
- //
- static const unsigned limb_bits = sizeof(limb_type) * CHAR_BIT;
- if(eval_bit_test(q, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count))
- {
- //
- // OK we have cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count+1 bits,
- // so we already have rounding info,
- // we just need to changes things if the last bit is 1 and either the
- // remainder is non-zero (ie we do not have a tie) or the quotient would
- // be odd if it were shifted to the correct number of bits (ie a tiebreak).
- //
- BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count));
- if((q.limbs()[0] & 1u) && (eval_get_sign(r) || (q.limbs()[0] & 2u)))
- {
- eval_increment(q);
- }
- }
- else
- {
- //
- // We have exactly "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count" bits in q.
- // Get rounding info, which we can get by comparing 2r with v.
- // We want to call copy_and_round to handle rounding and general cleanup,
- // so we'll left shift q and add some fake digits on the end to represent
- // how we'll be rounding.
- //
- BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1));
- static const unsigned lshift = (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count < limb_bits) ? 2 : limb_bits;
- eval_left_shift(q, lshift);
- res.exponent() -= lshift;
- eval_left_shift(r, 1u);
- int c = r.compare(v.bits());
- if(c == 0)
- q.limbs()[0] |= static_cast<limb_type>(1u) << (lshift - 1);
- else if(c > 0)
- q.limbs()[0] |= (static_cast<limb_type>(1u) << (lshift - 1)) + static_cast<limb_type>(1u);
- }
- copy_and_round(res, q);
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- eval_divide(res, res, arg);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class U>
-inline typename enable_if_c<is_unsigned<U>::value>::type eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &u, const U &v)
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:6326) // comparison of two constants
-#endif
- using default_ops::eval_subtract;
- using default_ops::eval_qr;
- using default_ops::eval_bit_test;
- using default_ops::eval_get_sign;
- using default_ops::eval_increment;
-
- //
- // Special cases first:
- //
- switch(u.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- {
- if(v == 0)
- {
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- return;
- }
- bool s = u.sign() != (v < 0);
- res = u;
- res.sign() = s;
- return;
- }
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- res = u;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- return;
- }
- if(v == 0)
- {
- bool s = u.sign();
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
- res.sign() = s;
- return;
- }
-
- // We can scale u and v so that both are integers, then perform integer
- // division to obtain quotient q and remainder r, such that:
- //
- // q * v + r = u
- //
- // and hense:
- //
- // q + r/v = u/v
- //
- // From this, assuming q has "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count" cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count, we only need to determine whether
- // r/v is less than, equal to, or greater than 0.5 to determine rounding -
- // this we can do with a shift and comparison.
- //
- // We can set the exponent and sign of the result up front:
- //
- int gb = msb(v);
- res.exponent() = u.exponent() - static_cast<Exponent>(gb) - static_cast<Exponent>(1);
- res.sign() = u.sign();
- //
- // Now get the quotient and remainder:
- //
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type t(u.bits()), q, r;
- eval_left_shift(t, gb + 1);
- eval_qr(t, number<typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type>::canonical_value(v), q, r);
- //
- // We now have either "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count" or "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count+1" significant cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count in q.
- //
- static const unsigned limb_bits = sizeof(limb_type) * CHAR_BIT;
- if(eval_bit_test(q, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count))
- {
- //
- // OK we have cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count+1 cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count, so we already have rounding info,
- // we just need to changes things if the last bit is 1 and the
- // remainder is non-zero (ie we do not have a tie).
- //
- BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count));
- if((q.limbs()[0] & 1u) && eval_get_sign(r))
- {
- eval_increment(q);
- }
- }
- else
- {
- //
- // We have exactly "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count" cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count in q.
- // Get rounding info, which we can get by comparing 2r with v.
- // We want to call copy_and_round to handle rounding and general cleanup,
- // so we'll left shift q and add some fake cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count on the end to represent
- // how we'll be rounding.
- //
- BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1));
- static const unsigned lshift = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count < limb_bits ? 2 : limb_bits;
- eval_left_shift(q, lshift);
- res.exponent() -= lshift;
- eval_left_shift(r, 1u);
- int c = r.compare(number<typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type>::canonical_value(v));
- if(c == 0)
- q.limbs()[0] |= static_cast<limb_type>(1u) << (lshift - 1);
- else if(c > 0)
- q.limbs()[0] |= (static_cast<limb_type>(1u) << (lshift - 1)) + static_cast<limb_type>(1u);
- }
- copy_and_round(res, q);
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class U>
-inline typename enable_if_c<is_unsigned<U>::value>::type eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const U &v)
-{
- eval_divide(res, res, v);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class S>
-inline typename enable_if_c<is_signed<S>::value>::type eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &u, const S &v)
-{
- typedef typename make_unsigned<S>::type ui_type;
- eval_divide(res, u, static_cast<ui_type>(boost::multiprecision::detail::unsigned_abs(v)));
- if(v < 0)
- res.negate();
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class S>
-inline typename enable_if_c<is_signed<S>::value>::type eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const S &v)
-{
- eval_divide(res, res, v);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline int eval_get_sign(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- return arg.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero ? 0 : arg.sign() ? -1 : 1;
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline bool eval_is_zero(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- return arg.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline bool eval_eq(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
-{
- if(a.exponent() == b.exponent())
- {
- if(a.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero)
- return true;
- return (a.sign() == b.sign())
- && (a.bits().compare(b.bits()) == 0)
- && (a.exponent() != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan);
- }
- return false;
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_convert_to(boost::long_long_type *res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- switch(arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- *res = 0;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- BOOST_THROW_EXCEPTION(std::runtime_error("Could not convert NaN to integer."));
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- *res = (std::numeric_limits<boost::long_long_type>::max)();
- if(arg.sign())
- *res = -*res;
- return;
- }
- typedef typename mpl::if_c < sizeof(typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type) < sizeof(int), int, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type > ::type shift_type;
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::rep_type man(arg.bits());
- shift_type shift
- = (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1 - arg.exponent();
- if(shift > (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1)
- {
- *res = 0;
- return;
- }
- if(arg.sign() && (arg.compare((std::numeric_limits<boost::long_long_type>::min)()) <= 0))
- {
- *res = (std::numeric_limits<boost::long_long_type>::min)();
- return;
- }
- else if(!arg.sign() && (arg.compare((std::numeric_limits<boost::long_long_type>::max)()) >= 0))
- {
- *res = (std::numeric_limits<boost::long_long_type>::max)();
- return;
- }
-
- if (shift < 0)
- {
- if (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - shift <= std::numeric_limits<boost::long_long_type>::digits)
- {
- // We have more bits in long_long_type than the float, so it's OK to left shift:
- eval_convert_to(res, man);
- *res <<= -shift;
- }
- else
- {
- *res = (std::numeric_limits<boost::long_long_type>::max)();
- return;
- }
- }
- else
- {
- eval_right_shift(man, shift);
- eval_convert_to(res, man);
- }
- if(arg.sign())
- {
- *res = -*res;
- }
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_convert_to(boost::ulong_long_type *res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- switch(arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- *res = 0;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- BOOST_THROW_EXCEPTION(std::runtime_error("Could not convert NaN to integer."));
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- *res = (std::numeric_limits<boost::ulong_long_type>::max)();
- return;
- }
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::rep_type man(arg.bits());
- typedef typename mpl::if_c < sizeof(typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type) < sizeof(int), int, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type > ::type shift_type;
- shift_type shift
- = (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1 - arg.exponent();
- if(shift > (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1)
- {
- *res = 0;
- return;
- }
- else if(shift < 0)
- {
- if (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - shift <= std::numeric_limits<boost::ulong_long_type>::digits)
- {
- // We have more bits in ulong_long_type than the float, so it's OK to left shift:
- eval_convert_to(res, man);
- *res <<= -shift;
- return;
- }
- *res = (std::numeric_limits<boost::ulong_long_type>::max)();
- return;
- }
- eval_right_shift(man, shift);
- eval_convert_to(res, man);
-}
-
-template <class Float, unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline typename boost::enable_if_c<boost::is_float<Float>::value>::type eval_convert_to(Float *res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &original_arg)
-{
- typedef cpp_bin_float<std::numeric_limits<Float>::digits, digit_base_2, void, Exponent, MinE, MaxE> conv_type;
- typedef typename common_type<typename conv_type::exponent_type, int>::type common_exp_type;
- //
- // Special cases first:
- //
- switch(original_arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- *res = 0;
- if(original_arg.sign())
- *res = -*res;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- *res = std::numeric_limits<Float>::quiet_NaN();
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- *res = (std::numeric_limits<Float>::infinity)();
- if(original_arg.sign())
- *res = -*res;
- return;
- }
- //
- // Check for super large exponent that must be converted to infinity:
- //
- if(original_arg.exponent() > std::numeric_limits<Float>::max_exponent)
- {
- *res = std::numeric_limits<Float>::has_infinity ? std::numeric_limits<Float>::infinity() : (std::numeric_limits<Float>::max)();
- if(original_arg.sign())
- *res = -*res;
- return;
- }
- //
- // Figure out how many digits we will have in our result,
- // allowing for a possibly denormalized result:
- //
- common_exp_type digits_to_round_to = std::numeric_limits<Float>::digits;
- if(original_arg.exponent() < std::numeric_limits<Float>::min_exponent - 1)
- {
- common_exp_type diff = original_arg.exponent();
- diff -= std::numeric_limits<Float>::min_exponent - 1;
- digits_to_round_to += diff;
- }
- if(digits_to_round_to < 0)
- {
- // Result must be zero:
- *res = 0;
- if(original_arg.sign())
- *res = -*res;
- return;
- }
- //
- // Perform rounding first, then afterwards extract the digits:
- //
- cpp_bin_float<std::numeric_limits<Float>::digits, digit_base_2, Allocator, Exponent, MinE, MaxE> arg;
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::rep_type bits(original_arg.bits());
- arg.exponent() = original_arg.exponent();
- copy_and_round(arg, bits, (int)digits_to_round_to);
- common_exp_type e = arg.exponent();
- e -= cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1;
- static const unsigned limbs_needed = std::numeric_limits<Float>::digits / (sizeof(*arg.bits().limbs()) * CHAR_BIT)
- + (std::numeric_limits<Float>::digits % (sizeof(*arg.bits().limbs()) * CHAR_BIT) ? 1 : 0);
- unsigned first_limb_needed = arg.bits().size() - limbs_needed;
- *res = 0;
- e += first_limb_needed * sizeof(*arg.bits().limbs()) * CHAR_BIT;
- while(first_limb_needed < arg.bits().size())
- {
- *res += std::ldexp(static_cast<Float>(arg.bits().limbs()[first_limb_needed]), static_cast<int>(e));
- ++first_limb_needed;
- e += sizeof(*arg.bits().limbs()) * CHAR_BIT;
- }
- if(original_arg.sign())
- *res = -*res;
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_frexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, Exponent *e)
-{
- switch(arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- *e = 0;
- res = arg;
- return;
- }
- res = arg;
- *e = arg.exponent() + 1;
- res.exponent() = -1;
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class I>
-inline void eval_frexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, I *pe)
-{
- Exponent e;
- eval_frexp(res, arg, &e);
- if((e > (std::numeric_limits<I>::max)()) || (e < (std::numeric_limits<I>::min)()))
- {
- BOOST_THROW_EXCEPTION(std::runtime_error("Exponent was outside of the range of the argument type to frexp."));
- }
- *pe = static_cast<I>(e);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_ldexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, Exponent e)
-{
- switch(arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- res = arg;
- return;
- }
- if((e > 0) && (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent - e < arg.exponent()))
- {
- // Overflow:
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
- res.sign() = arg.sign();
- }
- else if((e < 0) && (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent - e > arg.exponent()))
- {
- // Underflow:
- res = limb_type(0);
- }
- else
- {
- res = arg;
- res.exponent() += e;
- }
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class I>
-inline typename enable_if_c<is_unsigned<I>::value>::type eval_ldexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, I e)
-{
- typedef typename make_signed<I>::type si_type;
- if(e > static_cast<I>((std::numeric_limits<si_type>::max)()))
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
- else
- eval_ldexp(res, arg, static_cast<si_type>(e));
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class I>
-inline typename enable_if_c<is_signed<I>::value>::type eval_ldexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, I e)
-{
- if((e > (std::numeric_limits<Exponent>::max)()) || (e < (std::numeric_limits<Exponent>::min)()))
- {
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
- if(e < 0)
- res.negate();
- }
- else
- eval_ldexp(res, arg, static_cast<Exponent>(e));
-}
-
-/*
-* Sign manipulation
-*/
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_abs(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- res = arg;
- res.sign() = false;
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_fabs(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- res = arg;
- res.sign() = false;
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline int eval_fpclassify(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- switch(arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- return FP_ZERO;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- return FP_INFINITE;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- return FP_NAN;
- }
- return FP_NORMAL;
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_sqrt(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- using default_ops::eval_integer_sqrt;
- using default_ops::eval_bit_test;
- using default_ops::eval_increment;
- switch(arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- errno = EDOM;
- // fallthrough...
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- res = arg;
- return;
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- if(arg.sign())
- {
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- errno = EDOM;
- }
- else
- res = arg;
- return;
- }
- if(arg.sign())
- {
- res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
- errno = EDOM;
- return;
- }
-
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type t(arg.bits()), r, s;
- eval_left_shift(t, arg.exponent() & 1 ? cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count : cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1);
- eval_integer_sqrt(s, r, t);
-
- if(!eval_bit_test(s, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count))
- {
- // We have exactly the right number of cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count in the result, round as required:
- if(s.compare(r) < 0)
- {
- eval_increment(s);
- }
- }
- typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type ae = arg.exponent();
- res.exponent() = ae / 2;
- if((ae & 1) && (ae < 0))
- --res.exponent();
- copy_and_round(res, s);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_floor(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- using default_ops::eval_increment;
- switch(arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- errno = EDOM;
- // fallthrough...
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- res = arg;
- return;
- }
- typedef typename mpl::if_c < sizeof(typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type) < sizeof(int), int, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type > ::type shift_type;
- shift_type shift =
- (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - arg.exponent() - 1;
- if((arg.exponent() > (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent) || (shift <= 0))
- {
- // Either arg is already an integer, or a special value:
- res = arg;
- return;
- }
- if(shift >= (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
- {
- res = static_cast<signed_limb_type>(arg.sign() ? -1 : 0);
- return;
- }
- bool fractional = (shift_type)eval_lsb(arg.bits()) < shift;
- res = arg;
- eval_right_shift(res.bits(), shift);
- if(fractional && res.sign())
- {
- eval_increment(res.bits());
- if(eval_msb(res.bits()) != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1 - shift)
- {
- // Must have extended result by one bit in the increment:
- --shift;
- ++res.exponent();
- }
- }
- eval_left_shift(res.bits(), shift);
-}
-
-template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-inline void eval_ceil(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
-{
- using default_ops::eval_increment;
- switch(arg.exponent())
- {
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
- errno = EDOM;
- // fallthrough...
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
- case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
- res = arg;
- return;
- }
- typedef typename mpl::if_c < sizeof(typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type) < sizeof(int), int, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type > ::type shift_type;
- shift_type shift = (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - arg.exponent() - 1;
- if((arg.exponent() > (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent) || (shift <= 0))
- {
- // Either arg is already an integer, or a special value:
- res = arg;
- return;
- }
- if(shift >= (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
- {
- bool s = arg.sign(); // takes care of signed zeros
- res = static_cast<signed_limb_type>(arg.sign() ? 0 : 1);
- res.sign() = s;
- return;
- }
- bool fractional = (shift_type)eval_lsb(arg.bits()) < shift;
- res = arg;
- eval_right_shift(res.bits(), shift);
- if(fractional && !res.sign())
- {
- eval_increment(res.bits());
- if(eval_msb(res.bits()) != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1 - shift)
- {
- // Must have extended result by one bit in the increment:
- --shift;
- ++res.exponent();
- }
- }
- eval_left_shift(res.bits(), shift);
-}
-
-template<unsigned D1, backends::digit_base_type B1, class A1, class E1, E1 M1, E1 M2>
-int eval_signbit(const cpp_bin_float<D1, B1, A1, E1, M1, M2>& val)
-{
- return val.sign();
-}
-
-template<unsigned D1, backends::digit_base_type B1, class A1, class E1, E1 M1, E1 M2>
-inline std::size_t hash_value(const cpp_bin_float<D1, B1, A1, E1, M1, M2>& val)
-{
- std::size_t result = hash_value(val.bits());
- boost::hash_combine(result, val.exponent());
- boost::hash_combine(result, val.sign());
- return result;
-}
-
-
-} // namespace backends
-
-#ifdef BOOST_NO_SFINAE_EXPR
-
-namespace detail{
-
-template<unsigned D1, backends::digit_base_type B1, class A1, class E1, E1 M1, E1 M2, unsigned D2, backends::digit_base_type B2, class A2, class E2, E2 M3, E2 M4>
-struct is_explicitly_convertible<backends::cpp_bin_float<D1, B1, A1, E1, M1, M2>, backends::cpp_bin_float<D2, B2, A2, E2, M3, M4> > : public mpl::true_ {};
-template<class FloatT, unsigned D2, backends::digit_base_type B2, class A2, class E2, E2 M3, E2 M4>
-struct is_explicitly_convertible<FloatT, backends::cpp_bin_float<D2, B2, A2, E2, M3, M4> > : public boost::is_floating_point<FloatT> {};
-
-}
-#endif
-
-template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Exponent, Exponent MinE, Exponent MaxE, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
-inline boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>
-copysign BOOST_PREVENT_MACRO_SUBSTITUTION(
- const boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>& a,
- const boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>& b)
-{
- boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> res(a);
- res.backend().sign() = b.backend().sign();
- return res;
-}
-
-using backends::cpp_bin_float;
-using backends::digit_base_2;
-using backends::digit_base_10;
-
-template<unsigned Digits, backends::digit_base_type DigitBase, class Exponent, Exponent MinE, Exponent MaxE, class Allocator>
-struct number_category<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > : public boost::mpl::int_<boost::multiprecision::number_kind_floating_point>{};
-
-template<unsigned Digits, backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
-struct expression_template_default<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >
-{
- static const expression_template_option value = is_void<Allocator>::value ? et_off : et_on;
-};
-
-typedef number<backends::cpp_bin_float<50> > cpp_bin_float_50;
-typedef number<backends::cpp_bin_float<100> > cpp_bin_float_100;
-
-typedef number<backends::cpp_bin_float<24, backends::digit_base_2, void, boost::int16_t, -126, 127>, et_off> cpp_bin_float_single;
-typedef number<backends::cpp_bin_float<53, backends::digit_base_2, void, boost::int16_t, -1022, 1023>, et_off> cpp_bin_float_double;
-typedef number<backends::cpp_bin_float<64, backends::digit_base_2, void, boost::int16_t, -16382, 16383>, et_off> cpp_bin_float_double_extended;
-typedef number<backends::cpp_bin_float<113, backends::digit_base_2, void, boost::int16_t, -16382, 16383>, et_off> cpp_bin_float_quad;
-
-} // namespace multiprecision
-
-namespace math {
-
- using boost::multiprecision::signbit;
- using boost::multiprecision::copysign;
-
-} // namespace math
-
-} // namespace boost
-
-#include <boost/multiprecision/cpp_bin_float/io.hpp>
-#include <boost/multiprecision/cpp_bin_float/transcendental.hpp>
-
-namespace std{
-
-//
-// numeric_limits [partial] specializations for the types declared in this header:
-//
-template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-class numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >
-{
- typedef boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> number_type;
-public:
- BOOST_STATIC_CONSTEXPR bool is_specialized = true;
- static number_type (min)()
- {
- initializer.do_nothing();
- static std::pair<bool, number_type> value;
- if(!value.first)
- {
- value.first = true;
- typedef typename boost::mpl::front<typename number_type::backend_type::unsigned_types>::type ui_type;
- value.second.backend() = ui_type(1u);
- value.second.backend().exponent() = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent;
- }
- return value.second;
- }
- static number_type (max)()
- {
- initializer.do_nothing();
- static std::pair<bool, number_type> value;
- if(!value.first)
- {
- value.first = true;
- if(boost::is_void<Allocator>::value)
- eval_complement(value.second.backend().bits(), value.second.backend().bits());
- else
- {
- // We jump through hoops here using the backend type directly just to keep VC12 happy
- // (ie compiler workaround, for very strange compiler bug):
- using boost::multiprecision::default_ops::eval_add;
- using boost::multiprecision::default_ops::eval_decrement;
- using boost::multiprecision::default_ops::eval_left_shift;
- typedef typename number_type::backend_type::rep_type int_backend_type;
- typedef typename boost::mpl::front<typename int_backend_type::unsigned_types>::type ui_type;
- int_backend_type i;
- i = ui_type(1u);
- eval_left_shift(i, boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1);
- int_backend_type j(i);
- eval_decrement(i);
- eval_add(j, i);
- value.second.backend().bits() = j;
- }
- value.second.backend().exponent() = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent;
- }
- return value.second;
- }
- BOOST_STATIC_CONSTEXPR number_type lowest()
- {
- return -(max)();
- }
- BOOST_STATIC_CONSTEXPR int digits = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count;
- BOOST_STATIC_CONSTEXPR int digits10 = (digits - 1) * 301 / 1000;
- // Is this really correct???
- BOOST_STATIC_CONSTEXPR int max_digits10 = (digits * 301 / 1000) + 3;
- BOOST_STATIC_CONSTEXPR bool is_signed = true;
- BOOST_STATIC_CONSTEXPR bool is_integer = false;
- BOOST_STATIC_CONSTEXPR bool is_exact = false;
- BOOST_STATIC_CONSTEXPR int radix = 2;
- static number_type epsilon()
- {
- initializer.do_nothing();
- static std::pair<bool, number_type> value;
- if(!value.first)
- {
- // We jump through hoops here just to keep VC12 happy (ie compiler workaround, for very strange compiler bug):
- typedef typename boost::mpl::front<typename number_type::backend_type::unsigned_types>::type ui_type;
- value.first = true;
- value.second.backend() = ui_type(1u);
- value.second = ldexp(value.second, 1 - (int)digits);
- }
- return value.second;
- }
- // What value should this be????
- static number_type round_error()
- {
- // returns 0.5
- initializer.do_nothing();
- static std::pair<bool, number_type> value;
- if(!value.first)
- {
- value.first = true;
- // We jump through hoops here just to keep VC12 happy (ie compiler workaround, for very strange compiler bug):
- typedef typename boost::mpl::front<typename number_type::backend_type::unsigned_types>::type ui_type;
- value.second.backend() = ui_type(1u);
- value.second = ldexp(value.second, -1);
- }
- return value.second;
- }
- BOOST_STATIC_CONSTEXPR typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type min_exponent = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent;
- BOOST_STATIC_CONSTEXPR typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type min_exponent10 = (min_exponent / 1000) * 301L;
- BOOST_STATIC_CONSTEXPR typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type max_exponent = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent;
- BOOST_STATIC_CONSTEXPR typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type max_exponent10 = (max_exponent / 1000) * 301L;
- BOOST_STATIC_CONSTEXPR bool has_infinity = true;
- BOOST_STATIC_CONSTEXPR bool has_quiet_NaN = true;
- BOOST_STATIC_CONSTEXPR bool has_signaling_NaN = false;
- BOOST_STATIC_CONSTEXPR float_denorm_style has_denorm = denorm_absent;
- BOOST_STATIC_CONSTEXPR bool has_denorm_loss = false;
- static number_type infinity()
- {
- initializer.do_nothing();
- static std::pair<bool, number_type> value;
- if(!value.first)
- {
- value.first = true;
- value.second.backend().exponent() = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
- }
- return value.second;
- }
- static number_type quiet_NaN()
- {
- initializer.do_nothing();
- static std::pair<bool, number_type> value;
- if(!value.first)
- {
- value.first = true;
- value.second.backend().exponent() = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan;
- }
- return value.second;
- }
- BOOST_STATIC_CONSTEXPR number_type signaling_NaN()
- {
- return number_type(0);
- }
- BOOST_STATIC_CONSTEXPR number_type denorm_min() { return number_type(0); }
- BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
- BOOST_STATIC_CONSTEXPR bool is_bounded = true;
- BOOST_STATIC_CONSTEXPR bool is_modulo = false;
- BOOST_STATIC_CONSTEXPR bool traps = true;
- BOOST_STATIC_CONSTEXPR bool tinyness_before = false;
- BOOST_STATIC_CONSTEXPR float_round_style round_style = round_to_nearest;
-private:
- struct data_initializer
- {
- data_initializer()
- {
- std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::epsilon();
- std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::round_error();
- (std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::min)();
- (std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::max)();
- std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity();
- std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN();
- }
- void do_nothing()const{}
- };
- static const data_initializer initializer;
-};
-
-template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-const typename numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::data_initializer numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::initializer;
-
-#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::digits;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::digits10;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::max_digits10;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_signed;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_integer;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_exact;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::radix;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::min_exponent;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::min_exponent10;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::max_exponent;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::max_exponent10;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_infinity;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_quiet_NaN;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_signaling_NaN;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST float_denorm_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_denorm;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_denorm_loss;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_iec559;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_bounded;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_modulo;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::traps;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::tinyness_before;
-template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
-BOOST_CONSTEXPR_OR_CONST float_round_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::round_style;
-
-#endif
-
-} // namespace std
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int.hpp
deleted file mode 100644
index 8426c72df30..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int.hpp
+++ /dev/null
@@ -1,1978 +0,0 @@
-//////////////////3/////////////////////////////////////////////
-// Copyright 2012 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
-
-#ifndef BOOST_MP_CPP_INT_HPP
-#define BOOST_MP_CPP_INT_HPP
-
-#include <iostream>
-#include <iomanip>
-#include <boost/cstdint.hpp>
-#include <boost/multiprecision/number.hpp>
-#include <boost/multiprecision/detail/integer_ops.hpp>
-#include <boost/array.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-#include <boost/multiprecision/cpp_int/cpp_int_config.hpp>
-#include <boost/multiprecision/rational_adaptor.hpp>
-#include <boost/multiprecision/traits/is_byte_container.hpp>
-#include <boost/detail/endian.hpp>
-#include <boost/integer/static_min_max.hpp>
-#include <boost/type_traits/common_type.hpp>
-#include <boost/type_traits/make_signed.hpp>
-#include <boost/multiprecision/cpp_int/checked.hpp>
-#ifdef BOOST_MP_USER_DEFINED_LITERALS
-#include <boost/multiprecision/cpp_int/value_pack.hpp>
-#endif
-
-namespace boost{
-namespace multiprecision{
-namespace backends{
-
- using boost::enable_if;
-
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4307) // integral constant overflow (oveflow is in a branch not taken when it would overflow)
-#pragma warning(disable:4127) // conditional expression is constant
-#pragma warning(disable:4702) // Unreachable code (reachability depends on template params)
-#endif
-
-template <unsigned MinBits = 0, unsigned MaxBits = 0, boost::multiprecision::cpp_integer_type SignType = signed_magnitude, cpp_int_check_type Checked = unchecked, class Allocator = typename mpl::if_c<MinBits && (MinBits == MaxBits), void, std::allocator<limb_type> >::type >
-struct cpp_int_backend;
-
-} // namespace backends
-
-namespace detail {
-
- template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
- struct is_byte_container<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > : public boost::false_type {};
-
-} // namespace detail
-
-namespace backends{
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, bool trivial = false>
-struct cpp_int_base;
-//
-// Traits class determines the maximum and minimum precision values:
-//
-template <class T> struct max_precision;
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
-{
- static const unsigned value = is_void<Allocator>::value ?
- static_unsigned_max<MinBits, MaxBits>::value
- : (((MaxBits >= MinBits) && MaxBits) ? MaxBits : UINT_MAX);
-};
-
-template <class T> struct min_precision;
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct min_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
-{
- static const unsigned value = (is_void<Allocator>::value ? static_unsigned_max<MinBits, MaxBits>::value : MinBits);
-};
-//
-// Traits class determines whether the number of bits precision requested could fit in a native type,
-// we call this a "trivial" cpp_int:
-//
-template <class T>
-struct is_trivial_cpp_int
-{
- static const bool value = false;
-};
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
-{
- typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> self;
- static const bool value = is_void<Allocator>::value && (max_precision<self>::value <= (sizeof(double_limb_type) * CHAR_BIT) - (SignType == signed_packed ? 1 : 0));
-};
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct is_trivial_cpp_int<cpp_int_base<MinBits, MaxBits, SignType, Checked, Allocator, true> >
-{
- static const bool value = true;
-};
-
-} // namespace backends
-//
-// Traits class to determine whether a cpp_int_backend is signed or not:
-//
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct is_unsigned_number<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
- : public mpl::bool_<(SignType == unsigned_magnitude) || (SignType == unsigned_packed)>{};
-
-namespace backends{
-//
-// Traits class determines whether T should be implicitly convertible to U, or
-// whether the constructor should be made explicit. The latter happens if we
-// are losing the sign, or have fewer digits precision in the target type:
-//
-template <class T, class U>
-struct is_implicit_cpp_int_conversion;
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-struct is_implicit_cpp_int_conversion<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >
-{
- typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> t1;
- typedef cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> t2;
- static const bool value =
- (is_signed_number<t2>::value || !is_signed_number<t1>::value)
- && (max_precision<t1>::value <= max_precision<t2>::value);
-};
-
-//
-// Traits class to determine whether operations on a cpp_int may throw:
-//
-template <class T>
-struct is_non_throwing_cpp_int : public mpl::false_{};
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType>
-struct is_non_throwing_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, unchecked, void> > : public mpl::true_ {};
-
-//
-// Traits class, determines whether the cpp_int is fixed precision or not:
-//
-template <class T>
-struct is_fixed_precision;
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct is_fixed_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
- : public mpl::bool_<max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value != UINT_MAX> {};
-
-namespace detail{
-
-inline void verify_new_size(unsigned new_size, unsigned min_size, const mpl::int_<checked>&)
-{
- if(new_size < min_size)
- BOOST_THROW_EXCEPTION(std::overflow_error("Unable to allocate sufficient storage for the value of the result: value overflows the maximum allowable magnitude."));
-}
-inline void verify_new_size(unsigned /*new_size*/, unsigned /*min_size*/, const mpl::int_<unchecked>&){}
-
-template <class U>
-inline void verify_limb_mask(bool b, U limb, U mask, const mpl::int_<checked>&)
-{
- // When we mask out "limb" with "mask", do we loose bits? If so it's an overflow error:
- if(b && (limb & ~mask))
- BOOST_THROW_EXCEPTION(std::overflow_error("Overflow in cpp_int arithmetic: there is insufficient precision in the target type to hold all of the bits of the result."));
-}
-template <class U>
-inline void verify_limb_mask(bool /*b*/, U /*limb*/, U /*mask*/, const mpl::int_<unchecked>&){}
-
-}
-
-//
-// Now define the various data layouts that are possible as partial specializations of the base class,
-// starting with the default arbitrary precision signed integer type:
-//
-template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
-struct cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false> : private Allocator::template rebind<limb_type>::other
-{
- typedef typename Allocator::template rebind<limb_type>::other allocator_type;
-#ifdef BOOST_NO_CXX11_ALLOCATOR
- typedef typename allocator_type::pointer limb_pointer;
- typedef typename allocator_type::const_pointer const_limb_pointer;
-#else
- typedef typename std::allocator_traits<allocator_type>::pointer limb_pointer;
- typedef typename std::allocator_traits<allocator_type>::const_pointer const_limb_pointer;
-#endif
- typedef mpl::int_<Checked> checked_type;
-
- //
- // Interface invariants:
- //
- BOOST_STATIC_ASSERT(!is_void<Allocator>::value);
-
-private:
- struct limb_data
- {
- unsigned capacity;
- limb_pointer data;
- };
-
-public:
- BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT);
- BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast<limb_type>(0u));
- BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1));
- BOOST_STATIC_CONSTANT(unsigned, internal_limb_count =
- MinBits
- ? (MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0))
- : (sizeof(limb_data) / sizeof(limb_type)));
- BOOST_STATIC_CONSTANT(bool, variable = true);
-
-private:
- union data_type
- {
- limb_data ld;
- limb_type la[internal_limb_count];
- limb_type first;
- double_limb_type double_first;
-
- BOOST_CONSTEXPR data_type() : first(0) {}
- BOOST_CONSTEXPR data_type(limb_type i) : first(i) {}
- BOOST_CONSTEXPR data_type(signed_limb_type i) : first(i < 0 ? static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i) {}
-#ifdef BOOST_LITTLE_ENDIAN
- BOOST_CONSTEXPR data_type(double_limb_type i) : double_first(i) {}
- BOOST_CONSTEXPR data_type(signed_double_limb_type i) : double_first(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i) {}
-#endif
- };
-
- data_type m_data;
- unsigned m_limbs;
- bool m_sign, m_internal;
-
-public:
- //
- // Direct construction:
- //
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(limb_type i)BOOST_NOEXCEPT
- : m_data(i), m_limbs(1), m_sign(false), m_internal(true) { }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_limb_type i)BOOST_NOEXCEPT
- : m_data(i), m_limbs(1), m_sign(i < 0), m_internal(true) { }
-#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
- : m_data(i), m_limbs(i > max_limb_value ? 2 : 1), m_sign(false), m_internal(true) { }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_double_limb_type i)BOOST_NOEXCEPT
- : m_data(i), m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > static_cast<double_limb_type>(max_limb_value) ? 2 : 1) : (i > max_limb_value ? 2 : 1)),
- m_sign(i < 0), m_internal(true) { }
-#endif
- //
- // Helper functions for getting at our internal data, and manipulating storage:
- //
- BOOST_MP_FORCEINLINE allocator_type& allocator() BOOST_NOEXCEPT { return *this; }
- BOOST_MP_FORCEINLINE const allocator_type& allocator()const BOOST_NOEXCEPT { return *this; }
- BOOST_MP_FORCEINLINE unsigned size()const BOOST_NOEXCEPT { return m_limbs; }
- BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return m_internal ? m_data.la : m_data.ld.data; }
- BOOST_MP_FORCEINLINE const_limb_pointer limbs()const BOOST_NOEXCEPT { return m_internal ? m_data.la : m_data.ld.data; }
- BOOST_MP_FORCEINLINE unsigned capacity()const BOOST_NOEXCEPT { return m_internal ? internal_limb_count : m_data.ld.capacity; }
- BOOST_MP_FORCEINLINE bool sign()const BOOST_NOEXCEPT { return m_sign; }
- void sign(bool b) BOOST_NOEXCEPT
- {
- m_sign = b;
- // Check for zero value:
- if(m_sign && (m_limbs == 1))
- {
- if(limbs()[0] == 0)
- m_sign = false;
- }
- }
- void resize(unsigned new_size, unsigned min_size)
- {
- static const unsigned max_limbs = MaxBits / (CHAR_BIT * sizeof(limb_type)) + ((MaxBits % (CHAR_BIT * sizeof(limb_type))) ? 1 : 0);
- // We never resize beyond MaxSize:
- if(new_size > max_limbs)
- new_size = max_limbs;
- detail::verify_new_size(new_size, min_size, checked_type());
- // See if we have enough capacity already:
- unsigned cap = capacity();
- if(new_size > cap)
- {
- // Allocate a new buffer and copy everything over:
- cap = (std::min)((std::max)(cap * 4, new_size), max_limbs);
- limb_pointer pl = allocator().allocate(cap);
- std::memcpy(pl, limbs(), size() * sizeof(limbs()[0]));
- if(!m_internal)
- allocator().deallocate(limbs(), capacity());
- else
- m_internal = false;
- m_limbs = new_size;
- m_data.ld.capacity = cap;
- m_data.ld.data = pl;
- }
- else
- {
- m_limbs = new_size;
- }
- }
- BOOST_MP_FORCEINLINE void normalize() BOOST_NOEXCEPT
- {
- limb_pointer p = limbs();
- while((m_limbs-1) && !p[m_limbs - 1])--m_limbs;
- }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base() BOOST_NOEXCEPT : m_data(), m_limbs(1), m_sign(false), m_internal(true) {}
- BOOST_MP_FORCEINLINE cpp_int_base(const cpp_int_base& o) : allocator_type(o), m_limbs(0), m_internal(true)
- {
- resize(o.size(), o.size());
- std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
- m_sign = o.m_sign;
- }
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- cpp_int_base(cpp_int_base&& o)
- : allocator_type(static_cast<allocator_type&&>(o)), m_limbs(o.m_limbs), m_sign(o.m_sign), m_internal(o.m_internal)
- {
- if(m_internal)
- {
- std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
- }
- else
- {
- m_data.ld = o.m_data.ld;
- o.m_limbs = 0;
- o.m_internal = true;
- }
- }
- cpp_int_base& operator = (cpp_int_base&& o) BOOST_NOEXCEPT
- {
- if(!m_internal)
- allocator().deallocate(m_data.ld.data, m_data.ld.capacity);
- *static_cast<allocator_type*>(this) = static_cast<allocator_type&&>(o);
- m_limbs = o.m_limbs;
- m_sign = o.m_sign;
- m_internal = o.m_internal;
- if(m_internal)
- {
- std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
- }
- else
- {
- m_data.ld = o.m_data.ld;
- o.m_limbs = 0;
- o.m_internal = true;
- }
- return *this;
- }
-#endif
- BOOST_MP_FORCEINLINE ~cpp_int_base() BOOST_NOEXCEPT
- {
- if(!m_internal)
- allocator().deallocate(limbs(), capacity());
- }
- void assign(const cpp_int_base& o)
- {
- if(this != &o)
- {
- static_cast<allocator_type&>(*this) = static_cast<const allocator_type&>(o);
- m_limbs = 0;
- resize(o.size(), o.size());
- std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
- m_sign = o.m_sign;
- }
- }
- BOOST_MP_FORCEINLINE void negate() BOOST_NOEXCEPT
- {
- m_sign = !m_sign;
- // Check for zero value:
- if(m_sign && (m_limbs == 1))
- {
- if(limbs()[0] == 0)
- m_sign = false;
- }
- }
- BOOST_MP_FORCEINLINE bool isneg()const BOOST_NOEXCEPT
- {
- return m_sign;
- }
- BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
- {
- std::swap(m_data, o.m_data);
- std::swap(m_sign, o.m_sign);
- std::swap(m_internal, o.m_internal);
- std::swap(m_limbs, o.m_limbs);
- }
-protected:
- template <class A>
- void check_in_range(const A&) BOOST_NOEXCEPT {}
-};
-
-#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-
-template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
-const unsigned cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::limb_bits;
-template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
-const limb_type cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::max_limb_value;
-template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
-const limb_type cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::sign_bit_mask;
-template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
-const unsigned cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::internal_limb_count;
-template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
-const bool cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::variable;
-
-#endif
-
-template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
-struct cpp_int_base<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator, false> : private Allocator::template rebind<limb_type>::other
-{
- //
- // There is currently no support for unsigned arbitrary precision arithmetic, largely
- // because it's not clear what subtraction should do:
- //
- BOOST_STATIC_ASSERT_MSG(((sizeof(Allocator) == 0) && !is_void<Allocator>::value), "There is curently no support for unsigned arbitrary precision integers.");
-};
-//
-// Fixed precision (i.e. no allocator), signed-magnitude type with limb-usage count:
-//
-template <unsigned MinBits, cpp_int_check_type Checked>
-struct cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>
-{
- typedef limb_type* limb_pointer;
- typedef const limb_type* const_limb_pointer;
- typedef mpl::int_<Checked> checked_type;
-
- //
- // Interface invariants:
- //
- BOOST_STATIC_ASSERT_MSG(MinBits > sizeof(double_limb_type) * CHAR_BIT, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?");
-
-public:
- BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT);
- BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast<limb_type>(0u));
- BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1));
- BOOST_STATIC_CONSTANT(unsigned, internal_limb_count = MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0));
- BOOST_STATIC_CONSTANT(bool, variable = false);
- BOOST_STATIC_CONSTANT(limb_type, upper_limb_mask = (MinBits % limb_bits) ? (limb_type(1) << (MinBits % limb_bits)) -1 : (~limb_type(0)));
- BOOST_STATIC_ASSERT_MSG(internal_limb_count >= 2, "A fixed precision integer type must have at least 2 limbs");
-
-private:
- union data_type{
- limb_type m_data[internal_limb_count];
- limb_type m_first_limb;
- double_limb_type m_double_first_limb;
-
- BOOST_CONSTEXPR data_type() : m_first_limb(0) {}
- BOOST_CONSTEXPR data_type(limb_type i) : m_first_limb(i) {}
- BOOST_CONSTEXPR data_type(double_limb_type i) : m_double_first_limb(i) {}
-#if defined(BOOST_MP_USER_DEFINED_LITERALS)
- template <limb_type...VALUES>
- BOOST_CONSTEXPR data_type(literals::detail::value_pack<VALUES...>) : m_data{ VALUES... } {}
-#endif
- } m_wrapper;
- boost::uint16_t m_limbs;
- bool m_sign;
-
-public:
- //
- // Direct construction:
- //
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(limb_type i)BOOST_NOEXCEPT
- : m_wrapper(i), m_limbs(1), m_sign(false) {}
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_limb_type i)BOOST_NOEXCEPT
- : m_wrapper(limb_type(i < 0 ? static_cast<limb_type>(-static_cast<signed_double_limb_type>(i)) : i)), m_limbs(1), m_sign(i < 0) {}
-#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
- : m_wrapper(i), m_limbs(i > max_limb_value ? 2 : 1), m_sign(false) {}
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_double_limb_type i)BOOST_NOEXCEPT
- : m_wrapper(double_limb_type(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i)),
- m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > max_limb_value ? 2 : 1) : (i > max_limb_value ? 2 : 1)),
- m_sign(i < 0) {}
-#endif
-#if defined(BOOST_MP_USER_DEFINED_LITERALS)
- template <limb_type...VALUES>
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<VALUES...> i)
- : m_wrapper(i), m_limbs(sizeof...(VALUES)), m_sign(false) {}
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<> i)
- : m_wrapper(i), m_limbs(1), m_sign(false) {}
- BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& a, const literals::detail::negate_tag&)
- : m_wrapper(a.m_wrapper), m_limbs(a.m_limbs), m_sign((a.m_limbs == 1) && (*a.limbs() == 0) ? false : !a.m_sign) {}
-#endif
- //
- // Helper functions for getting at our internal data, and manipulating storage:
- //
- BOOST_MP_FORCEINLINE unsigned size()const BOOST_NOEXCEPT { return m_limbs; }
- BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return m_wrapper.m_data; }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const_limb_pointer limbs()const BOOST_NOEXCEPT { return m_wrapper.m_data; }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool sign()const BOOST_NOEXCEPT { return m_sign; }
- BOOST_MP_FORCEINLINE void sign(bool b) BOOST_NOEXCEPT
- {
- m_sign = b;
- // Check for zero value:
- if(m_sign && (m_limbs == 1))
- {
- if(limbs()[0] == 0)
- m_sign = false;
- }
- }
- BOOST_MP_FORCEINLINE void resize(unsigned new_size, unsigned min_size) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- m_limbs = static_cast<boost::uint16_t>((std::min)(new_size, internal_limb_count));
- detail::verify_new_size(m_limbs, min_size, checked_type());
- }
- BOOST_MP_FORCEINLINE void normalize() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- limb_pointer p = limbs();
- detail::verify_limb_mask(m_limbs == internal_limb_count, p[internal_limb_count-1], upper_limb_mask, checked_type());
- p[internal_limb_count-1] &= upper_limb_mask;
- while((m_limbs-1) && !p[m_limbs - 1])--m_limbs;
- if((m_limbs == 1) && (!*p)) m_sign = false; // zero is always unsigned
- }
-
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base()BOOST_NOEXCEPT : m_wrapper(limb_type(0u)), m_limbs(1), m_sign(false) {}
- // Not defaulted, it breaks constexpr support in the Intel compiler for some reason:
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& o)BOOST_NOEXCEPT
- : m_wrapper(o.m_wrapper), m_limbs(o.m_limbs), m_sign(o.m_sign) {}
- // Defaulted functions:
- //~cpp_int_base() BOOST_NOEXCEPT {}
-
- void assign(const cpp_int_base& o) BOOST_NOEXCEPT
- {
- if(this != &o)
- {
- m_limbs = o.m_limbs;
- std::memcpy(limbs(), o.limbs(), o.size() * sizeof(o.limbs()[0]));
- m_sign = o.m_sign;
- }
- }
- BOOST_MP_FORCEINLINE void negate() BOOST_NOEXCEPT
- {
- m_sign = !m_sign;
- // Check for zero value:
- if(m_sign && (m_limbs == 1))
- {
- if(limbs()[0] == 0)
- m_sign = false;
- }
- }
- BOOST_MP_FORCEINLINE bool isneg()const BOOST_NOEXCEPT
- {
- return m_sign;
- }
- BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
- {
- for(unsigned i = 0; i < (std::max)(size(), o.size()); ++i)
- std::swap(m_wrapper.m_data[i], o.m_wrapper.m_data[i]);
- std::swap(m_sign, o.m_sign);
- std::swap(m_limbs, o.m_limbs);
- }
-protected:
- template <class A>
- void check_in_range(const A&) BOOST_NOEXCEPT {}
-};
-#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-
-template <unsigned MinBits, cpp_int_check_type Checked>
-const unsigned cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::limb_bits;
-template <unsigned MinBits, cpp_int_check_type Checked>
-const limb_type cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::max_limb_value;
-template <unsigned MinBits, cpp_int_check_type Checked>
-const limb_type cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::sign_bit_mask;
-template <unsigned MinBits, cpp_int_check_type Checked>
-const unsigned cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::internal_limb_count;
-template <unsigned MinBits, cpp_int_check_type Checked>
-const bool cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::variable;
-
-#endif
-//
-// Fixed precision (i.e. no allocator), unsigned type with limb-usage count:
-//
-template <unsigned MinBits, cpp_int_check_type Checked>
-struct cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>
-{
- typedef limb_type* limb_pointer;
- typedef const limb_type* const_limb_pointer;
- typedef mpl::int_<Checked> checked_type;
-
- //
- // Interface invariants:
- //
- BOOST_STATIC_ASSERT_MSG(MinBits > sizeof(double_limb_type) * CHAR_BIT, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?");
-
-public:
- BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT);
- BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast<limb_type>(0u));
- BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1));
- BOOST_STATIC_CONSTANT(unsigned, internal_limb_count = MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0));
- BOOST_STATIC_CONSTANT(bool, variable = false);
- BOOST_STATIC_CONSTANT(limb_type, upper_limb_mask = (MinBits % limb_bits) ? (limb_type(1) << (MinBits % limb_bits)) -1 : (~limb_type(0)));
- BOOST_STATIC_ASSERT_MSG(internal_limb_count >= 2, "A fixed precision integer type must have at least 2 limbs");
-
-private:
- union data_type{
- limb_type m_data[internal_limb_count];
- limb_type m_first_limb;
- double_limb_type m_double_first_limb;
-
- BOOST_CONSTEXPR data_type() : m_first_limb(0) {}
- BOOST_CONSTEXPR data_type(limb_type i) : m_first_limb(i) {}
- BOOST_CONSTEXPR data_type(double_limb_type i) : m_double_first_limb(i) {}
-#if defined(BOOST_MP_USER_DEFINED_LITERALS)
- template <limb_type...VALUES>
- BOOST_CONSTEXPR data_type(literals::detail::value_pack<VALUES...>) : m_data{ VALUES... } {}
-#endif
- } m_wrapper;
- limb_type m_limbs;
-
-public:
- //
- // Direct construction:
- //
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(limb_type i)BOOST_NOEXCEPT
- : m_wrapper(i), m_limbs(1) {}
- BOOST_MP_FORCEINLINE cpp_int_base(signed_limb_type i)BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- : m_wrapper(limb_type(i < 0 ? static_cast<limb_type>(-static_cast<signed_double_limb_type>(i)) : i)), m_limbs(1) { if(i < 0) negate(); }
-#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
- : m_wrapper(i), m_limbs(i > max_limb_value ? 2 : 1) {}
- BOOST_MP_FORCEINLINE cpp_int_base(signed_double_limb_type i)BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- : m_wrapper(double_limb_type(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i)),
- m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > max_limb_value ? 2 : 1) : (i > max_limb_value ? 2 : 1))
- {
- if (i < 0) negate();
- }
-#endif
-#if defined(BOOST_MP_USER_DEFINED_LITERALS)
- template <limb_type...VALUES>
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<VALUES...> i)
- : m_wrapper(i), m_limbs(sizeof...(VALUES)) {}
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<>)
- : m_wrapper(static_cast<limb_type>(0u)), m_limbs(1) {}
-#endif
- //
- // Helper functions for getting at our internal data, and manipulating storage:
- //
- BOOST_MP_FORCEINLINE unsigned size()const BOOST_NOEXCEPT { return m_limbs; }
- BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return m_wrapper.m_data; }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const_limb_pointer limbs()const BOOST_NOEXCEPT { return m_wrapper.m_data; }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool sign()const BOOST_NOEXCEPT { return false; }
- BOOST_MP_FORCEINLINE void sign(bool b) BOOST_MP_NOEXCEPT_IF((Checked == unchecked)) { if(b) negate(); }
- BOOST_MP_FORCEINLINE void resize(unsigned new_size, unsigned min_size) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- m_limbs = (std::min)(new_size, internal_limb_count);
- detail::verify_new_size(m_limbs, min_size, checked_type());
- }
- BOOST_MP_FORCEINLINE void normalize() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- limb_pointer p = limbs();
- detail::verify_limb_mask(m_limbs == internal_limb_count, p[internal_limb_count-1], upper_limb_mask, checked_type());
- p[internal_limb_count-1] &= upper_limb_mask;
- while((m_limbs-1) && !p[m_limbs - 1])--m_limbs;
- }
-
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base() BOOST_NOEXCEPT
- : m_wrapper(limb_type(0u)), m_limbs(1) {}
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& o) BOOST_NOEXCEPT
- : m_wrapper(o.m_wrapper), m_limbs(o.m_limbs) {}
- // Defaulted functions:
- //~cpp_int_base() BOOST_NOEXCEPT {}
-
- BOOST_MP_FORCEINLINE void assign(const cpp_int_base& o) BOOST_NOEXCEPT
- {
- if(this != &o)
- {
- m_limbs = o.m_limbs;
- std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
- }
- }
-private:
- void check_negate(const mpl::int_<checked>&)
- {
- BOOST_THROW_EXCEPTION(std::range_error("Attempt to negate an unsigned number."));
- }
- void check_negate(const mpl::int_<unchecked>&){}
-public:
- void negate() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- // Not so much a negate as a complement - this gets called when subtraction
- // would result in a "negative" number:
- unsigned i;
- if((m_limbs == 1) && (m_wrapper.m_data[0] == 0))
- return; // negating zero is always zero, and always OK.
- check_negate(checked_type());
- for(i = m_limbs; i < internal_limb_count; ++i)
- m_wrapper.m_data[i] = 0;
- m_limbs = internal_limb_count;
- for(i = 0; i < internal_limb_count; ++i)
- m_wrapper.m_data[i] = ~m_wrapper.m_data[i];
- normalize();
- eval_increment(static_cast<cpp_int_backend<MinBits, MinBits, unsigned_magnitude, Checked, void>& >(*this));
- }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool isneg()const BOOST_NOEXCEPT
- {
- return false;
- }
- BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
- {
- for(unsigned i = 0; i < (std::max)(size(), o.size()); ++i)
- std::swap(m_wrapper.m_data[i], o.m_wrapper.m_data[i]);
- std::swap(m_limbs, o.m_limbs);
- }
-protected:
- template <class A>
- void check_in_range(const A&) BOOST_NOEXCEPT {}
-};
-#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
-
-template <unsigned MinBits, cpp_int_check_type Checked>
-const unsigned cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::limb_bits;
-template <unsigned MinBits, cpp_int_check_type Checked>
-const limb_type cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::max_limb_value;
-template <unsigned MinBits, cpp_int_check_type Checked>
-const limb_type cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::sign_bit_mask;
-template <unsigned MinBits, cpp_int_check_type Checked>
-const unsigned cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::internal_limb_count;
-template <unsigned MinBits, cpp_int_check_type Checked>
-const bool cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::variable;
-
-#endif
-//
-// Traits classes to figure out a native type with N bits, these vary from boost::uint_t<N> only
-// because some platforms have native integer types longer than boost::long_long_type, "really boost::long_long_type" anyone??
-//
-template <unsigned N, bool s>
-struct trivial_limb_type_imp
-{
- typedef double_limb_type type;
-};
-
-template <unsigned N>
-struct trivial_limb_type_imp<N, true>
-{
- typedef typename boost::uint_t<N>::least type;
-};
-
-template <unsigned N>
-struct trivial_limb_type : public trivial_limb_type_imp<N, N <= sizeof(boost::long_long_type) * CHAR_BIT> {};
-//
-// Backend for fixed precision signed-magnitude type which will fit entirely inside a "double_limb_type":
-//
-template <unsigned MinBits, cpp_int_check_type Checked>
-struct cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, true>
-{
- typedef typename trivial_limb_type<MinBits>::type local_limb_type;
- typedef local_limb_type* limb_pointer;
- typedef const local_limb_type* const_limb_pointer;
- typedef mpl::int_<Checked> checked_type;
-protected:
- BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(local_limb_type) * CHAR_BIT);
- BOOST_STATIC_CONSTANT(local_limb_type, limb_mask = (MinBits < limb_bits) ? local_limb_type((local_limb_type(~local_limb_type(0))) >> (limb_bits - MinBits)) : local_limb_type(~local_limb_type(0)));
-private:
- local_limb_type m_data;
- bool m_sign;
-
- //
- // Interface invariants:
- //
- BOOST_STATIC_ASSERT_MSG(MinBits <= sizeof(double_limb_type) * CHAR_BIT, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?");
-protected:
- template <class T>
- typename boost::disable_if_c<!boost::is_integral<T>::value || (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits))>::type
- check_in_range(T val, const mpl::int_<checked>&)
- {
- typedef typename common_type<typename make_unsigned<T>::type, local_limb_type>::type common_type;
-
- if(static_cast<common_type>(boost::multiprecision::detail::unsigned_abs(val)) > static_cast<common_type>(limb_mask))
- BOOST_THROW_EXCEPTION(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."));
- }
- template <class T>
- typename boost::disable_if_c<boost::is_integral<T>::value || (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits))>::type
- check_in_range(T val, const mpl::int_<checked>&)
- {
- using std::abs;
- typedef typename common_type<T, local_limb_type>::type common_type;
-
- if (static_cast<common_type>(abs(val)) > static_cast<common_type>(limb_mask))
- BOOST_THROW_EXCEPTION(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."));
- }
- template <class T, int C>
- void check_in_range(T, const mpl::int_<C>&) BOOST_NOEXCEPT {}
-
- template <class T>
- void check_in_range(T val) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<T>(), checked_type())))
- {
- check_in_range(val, checked_type());
- }
-
-public:
- //
- // Direct construction:
- //
- template <class SI>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
- : m_data(i < 0 ? static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask) : static_cast<local_limb_type>(i & limb_mask)), m_sign(i < 0) {}
- template <class SI>
- BOOST_MP_FORCEINLINE cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
- : m_data(i < 0 ? (static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask)) : static_cast<local_limb_type>(i & limb_mask)), m_sign(i < 0)
- { check_in_range(i); }
- template <class UI>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked)>::type const* = 0) BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(i) & limb_mask), m_sign(false) {}
- template <class UI>
- BOOST_MP_FORCEINLINE cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked)>::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))
- : m_data(static_cast<local_limb_type>(i) & limb_mask), m_sign(false) { check_in_range(i); }
- template <class F>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(F i, typename boost::enable_if_c<is_floating_point<F>::value && (Checked == unchecked)>::type const* = 0) BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask), m_sign(i < 0) {}
- template <class F>
- BOOST_MP_FORCEINLINE cpp_int_base(F i, typename boost::enable_if_c<is_floating_point<F>::value && (Checked == checked)>::type const* = 0)
- : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask), m_sign(i < 0) { check_in_range(i); }
-#if defined(BOOST_MP_USER_DEFINED_LITERALS)
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<>) BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(0u)), m_sign(false) {}
- template <limb_type a>
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<a>)BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(a)), m_sign(false) {}
- template <limb_type a, limb_type b>
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<a, b>)BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(a) | (static_cast<local_limb_type>(b) << bits_per_limb)), m_sign(false) {}
- BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& a, const literals::detail::negate_tag&)BOOST_NOEXCEPT
- : m_data(a.m_data), m_sign(a.m_data ? !a.m_sign : false) {}
-#endif
- //
- // Helper functions for getting at our internal data, and manipulating storage:
- //
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR unsigned size()const BOOST_NOEXCEPT { return 1; }
- BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return &m_data; }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const_limb_pointer limbs()const BOOST_NOEXCEPT { return &m_data; }
- BOOST_MP_FORCEINLINE bool sign()const BOOST_NOEXCEPT { return m_sign; }
- BOOST_MP_FORCEINLINE void sign(bool b) BOOST_NOEXCEPT
- {
- m_sign = b;
- // Check for zero value:
- if(m_sign && !m_data)
- {
- m_sign = false;
- }
- }
- BOOST_MP_FORCEINLINE void resize(unsigned new_size, unsigned min_size)
- {
- detail::verify_new_size(2, min_size, checked_type());
- }
- BOOST_MP_FORCEINLINE void normalize() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- if(!m_data)
- m_sign = false; // zero is always unsigned
- detail::verify_limb_mask(true, m_data, limb_mask, checked_type());
- m_data &= limb_mask;
- }
-
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base() BOOST_NOEXCEPT : m_data(0), m_sign(false) {}
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& o) BOOST_NOEXCEPT
- : m_data(o.m_data), m_sign(o.m_sign) {}
- //~cpp_int_base() BOOST_NOEXCEPT {}
- BOOST_MP_FORCEINLINE void assign(const cpp_int_base& o) BOOST_NOEXCEPT
- {
- m_data = o.m_data;
- m_sign = o.m_sign;
- }
- BOOST_MP_FORCEINLINE void negate() BOOST_NOEXCEPT
- {
- m_sign = !m_sign;
- // Check for zero value:
- if(m_data == 0)
- {
- m_sign = false;
- }
- }
- BOOST_MP_FORCEINLINE bool isneg()const BOOST_NOEXCEPT
- {
- return m_sign;
- }
- BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
- {
- std::swap(m_sign, o.m_sign);
- std::swap(m_data, o.m_data);
- }
-};
-//
-// Backend for unsigned fixed precision (i.e. no allocator) type which will fit entirely inside a "double_limb_type":
-//
-template <unsigned MinBits, cpp_int_check_type Checked>
-struct cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, true>
-{
- typedef typename trivial_limb_type<MinBits>::type local_limb_type;
- typedef local_limb_type* limb_pointer;
- typedef const local_limb_type* const_limb_pointer;
-private:
- BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(local_limb_type) * CHAR_BIT);
- BOOST_STATIC_CONSTANT(local_limb_type, limb_mask = limb_bits != MinBits ?
- static_cast<local_limb_type>(static_cast<local_limb_type>(~local_limb_type(0)) >> (limb_bits - MinBits))
- : static_cast<local_limb_type>(~local_limb_type(0)));
-
- local_limb_type m_data;
-
- typedef mpl::int_<Checked> checked_type;
-
- //
- // Interface invariants:
- //
- BOOST_STATIC_ASSERT_MSG(MinBits <= sizeof(double_limb_type) * CHAR_BIT, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?");
-protected:
- template <class T>
- typename boost::disable_if_c<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits)>::type
- check_in_range(T val, const mpl::int_<checked>&, const boost::false_type&)
- {
- typedef typename common_type<T, local_limb_type>::type common_type;
-
- if(static_cast<common_type>(val) > limb_mask)
- BOOST_THROW_EXCEPTION(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."));
- }
- template <class T>
- void check_in_range(T val, const mpl::int_<checked>&, const boost::true_type&)
- {
- typedef typename common_type<T, local_limb_type>::type common_type;
-
- if(static_cast<common_type>(val) > limb_mask)
- BOOST_THROW_EXCEPTION(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."));
- if(val < 0)
- BOOST_THROW_EXCEPTION(std::range_error("The argument to an unsigned cpp_int constructor was negative."));
- }
- template <class T, int C, bool B>
- BOOST_MP_FORCEINLINE void check_in_range(T, const mpl::int_<C>&, const boost::integral_constant<bool, B>&) BOOST_NOEXCEPT {}
-
- template <class T>
- BOOST_MP_FORCEINLINE void check_in_range(T val) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<T>(), checked_type(), is_signed<T>())))
- {
- check_in_range(val, checked_type(), is_signed<T>());
- }
-
-public:
- //
- // Direct construction:
- //
-#ifdef __MSVC_RUNTIME_CHECKS
- template <class SI>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
- : m_data(i < 0 ? (1 + ~static_cast<local_limb_type>(-i & limb_mask)) & limb_mask : static_cast<local_limb_type>(i & limb_mask)) {}
- template <class SI>
- BOOST_MP_FORCEINLINE cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
- : m_data(i < 0 ? 1 + ~static_cast<local_limb_type>(-i & limb_mask) : static_cast<local_limb_type>(i & limb_mask)) { check_in_range(i); }
- template <class UI>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(i & limb_mask)) {}
- template <class UI>
- BOOST_MP_FORCEINLINE cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))
- : m_data(static_cast<local_limb_type>(i & limb_mask)) { check_in_range(i); }
-#else
- template <class SI>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
- : m_data(i < 0 ? (1 + ~static_cast<local_limb_type>(-i)) & limb_mask : static_cast<local_limb_type>(i) & limb_mask) {}
- template <class SI>
- BOOST_MP_FORCEINLINE cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
- : m_data(i < 0 ? 1 + ~static_cast<local_limb_type>(-i) : static_cast<local_limb_type>(i)) { check_in_range(i); }
- template <class UI>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(i) & limb_mask) {}
- template <class UI>
- BOOST_MP_FORCEINLINE cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))
- : m_data(static_cast<local_limb_type>(i)) { check_in_range(i); }
-#endif
- template <class F>
- BOOST_MP_FORCEINLINE cpp_int_base(F i, typename boost::enable_if<is_floating_point<F> >::type const* = 0) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask)
- {
- check_in_range(i);
- if(i < 0)
- negate();
- }
-#if defined(BOOST_MP_USER_DEFINED_LITERALS)
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<>) BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(0u)) {}
- template <limb_type a>
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<a>) BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(a)) {}
- template <limb_type a, limb_type b>
- BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<a, b>) BOOST_NOEXCEPT
- : m_data(static_cast<local_limb_type>(a) | (static_cast<local_limb_type>(b) << bits_per_limb)) {}
-#endif
- //
- // Helper functions for getting at our internal data, and manipulating storage:
- //
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR unsigned size()const BOOST_NOEXCEPT { return 1; }
- BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return &m_data; }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const_limb_pointer limbs()const BOOST_NOEXCEPT { return &m_data; }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool sign()const BOOST_NOEXCEPT { return false; }
- BOOST_MP_FORCEINLINE void sign(bool b) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- if(b)
- negate();
- }
- BOOST_MP_FORCEINLINE void resize(unsigned, unsigned min_size)
- {
- detail::verify_new_size(2, min_size, checked_type());
- }
- BOOST_MP_FORCEINLINE void normalize() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- detail::verify_limb_mask(true, m_data, limb_mask, checked_type());
- m_data &= limb_mask;
- }
-
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base() BOOST_NOEXCEPT : m_data(0) {}
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& o) BOOST_NOEXCEPT
- : m_data(o.m_data) {}
- //~cpp_int_base() BOOST_NOEXCEPT {}
- BOOST_MP_FORCEINLINE void assign(const cpp_int_base& o) BOOST_NOEXCEPT
- {
- m_data = o.m_data;
- }
- BOOST_MP_FORCEINLINE void negate() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
- {
- if(Checked == checked)
- {
- BOOST_THROW_EXCEPTION(std::range_error("Attempt to negate an unsigned type."));
- }
- m_data = ~m_data;
- ++m_data;
- }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool isneg()const BOOST_NOEXCEPT
- {
- return false;
- }
- BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
- {
- std::swap(m_data, o.m_data);
- }
-};
-//
-// Traits class, lets us know whether type T can be directly converted to the base type,
-// used to enable/disable constructors etc:
-//
-template <class Arg, class Base>
-struct is_allowed_cpp_int_base_conversion : public mpl::if_c<
- is_same<Arg, limb_type>::value || is_same<Arg, signed_limb_type>::value
-#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
- || is_same<Arg, double_limb_type>::value || is_same<Arg, signed_double_limb_type>::value
-#endif
-#if defined(BOOST_MP_USER_DEFINED_LITERALS)
- || literals::detail::is_value_pack<Arg>::value
-#endif
- || (is_trivial_cpp_int<Base>::value && is_arithmetic<Arg>::value),
- mpl::true_,
- mpl::false_
- >::type
-{};
-//
-// Now the actual backend, normalising parameters passed to the base class:
-//
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct cpp_int_backend
- : public cpp_int_base<
- min_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
- max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
- SignType,
- Checked,
- Allocator,
- is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value>
-{
- typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> self_type;
- typedef cpp_int_base<
- min_precision<self_type>::value,
- max_precision<self_type>::value,
- SignType,
- Checked,
- Allocator,
- is_trivial_cpp_int<self_type>::value> base_type;
- typedef mpl::bool_<is_trivial_cpp_int<self_type>::value> trivial_tag;
-public:
- typedef typename mpl::if_<
- trivial_tag,
- mpl::list<
- signed char, short, int, long,
- boost::long_long_type, signed_double_limb_type>,
- mpl::list<signed_limb_type, signed_double_limb_type>
- >::type signed_types;
- typedef typename mpl::if_<
- trivial_tag,
- mpl::list<unsigned char, unsigned short, unsigned,
- unsigned long, boost::ulong_long_type, double_limb_type>,
- mpl::list<limb_type, double_limb_type>
- >::type unsigned_types;
- typedef typename mpl::if_<
- trivial_tag,
- mpl::list<float, double, long double>,
- mpl::list<long double>
- >::type float_types;
- typedef mpl::int_<Checked> checked_type;
-
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend() BOOST_NOEXCEPT{}
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend(const cpp_int_backend& o) BOOST_MP_NOEXCEPT_IF(boost::is_void<Allocator>::value) : base_type(o) {}
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend(cpp_int_backend&& o) BOOST_NOEXCEPT
- : base_type(static_cast<base_type&&>(o)) {}
-#endif
- //
- // Direct construction from arithmetic type:
- //
- template <class Arg>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend(Arg i, typename boost::enable_if_c<is_allowed_cpp_int_base_conversion<Arg, base_type>::value >::type const* = 0)BOOST_MP_NOEXCEPT_IF(noexcept(base_type(std::declval<Arg>())))
- : base_type(i) {}
-
-private:
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::true_ const&, mpl::true_ const &)
- {
- // Assigning trivial type to trivial type:
- this->check_in_range(*other.limbs());
- *this->limbs() = static_cast<typename self_type::local_limb_type>(*other.limbs());
- this->sign(other.sign());
- this->normalize();
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::true_ const&, mpl::false_ const &)
- {
- // non-trivial to trivial narrowing conversion:
- double_limb_type v = *other.limbs();
- if(other.size() > 1)
- {
- v |= static_cast<double_limb_type>(other.limbs()[1]) << bits_per_limb;
- if((Checked == checked) && (other.size() > 2))
- {
- BOOST_THROW_EXCEPTION(std::range_error("Assignment of a cpp_int that is out of range for the target type."));
- }
- }
- *this = v;
- this->sign(other.sign());
- this->normalize();
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::false_ const&, mpl::true_ const &)
- {
- // trivial to non-trivial, treat the trivial argument as if it were an unsigned arithmetic type, then set the sign afterwards:
- *this = static_cast<
- typename boost::multiprecision::detail::canonical<
- typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::local_limb_type,
- cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>
- >::type
- >(*other.limbs());
- this->sign(other.sign());
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::false_ const&, mpl::false_ const &)
- {
- // regular non-trivial to non-trivial assign:
- this->resize(other.size(), other.size());
- std::memcpy(this->limbs(), other.limbs(), (std::min)(other.size(), this->size()) * sizeof(this->limbs()[0]));
- this->sign(other.sign());
- this->normalize();
- }
-public:
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- cpp_int_backend(
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other,
- typename boost::enable_if_c<is_implicit_cpp_int_conversion<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>, self_type>::value>::type* = 0)
- : base_type()
- {
- do_assign(
- other,
- mpl::bool_<is_trivial_cpp_int<self_type>::value>(),
- mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>());
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- explicit cpp_int_backend(
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other,
- typename boost::disable_if_c<is_implicit_cpp_int_conversion<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>, self_type>::value>::type* = 0)
- : base_type()
- {
- do_assign(
- other,
- mpl::bool_<is_trivial_cpp_int<self_type>::value>(),
- mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>());
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- cpp_int_backend& operator=(
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other)
- {
- do_assign(
- other,
- mpl::bool_<is_trivial_cpp_int<self_type>::value>(),
- mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>());
- return *this;
- }
-#ifdef BOOST_MP_USER_DEFINED_LITERALS
- BOOST_CONSTEXPR cpp_int_backend(const cpp_int_backend& a, const literals::detail::negate_tag& tag)
- : base_type(static_cast<const base_type&>(a), tag){}
-#endif
-
- BOOST_MP_FORCEINLINE cpp_int_backend& operator = (const cpp_int_backend& o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().assign(std::declval<const cpp_int_backend&>())))
- {
- this->assign(o);
- return *this;
- }
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- BOOST_MP_FORCEINLINE cpp_int_backend& operator = (cpp_int_backend&& o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<base_type&>() = std::declval<base_type>()))
- {
- *static_cast<base_type*>(this) = static_cast<base_type&&>(o);
- return *this;
- }
-#endif
-private:
- template <class A>
- typename boost::enable_if<is_unsigned<A> >::type do_assign_arithmetic(A val, const mpl::true_&)
- BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().check_in_range(std::declval<A>())))
- {
- this->check_in_range(val);
- *this->limbs() = static_cast<typename self_type::local_limb_type>(val);
- this->sign(false);
- this->normalize();
- }
- template <class A>
- typename boost::disable_if_c<is_unsigned<A>::value || !is_integral<A>::value >::type do_assign_arithmetic(A val, const mpl::true_&)
- BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().check_in_range(std::declval<A>())) && noexcept(std::declval<cpp_int_backend>().sign(true)))
- {
- this->check_in_range(val);
- *this->limbs() = (val < 0) ? static_cast<typename self_type::local_limb_type>(boost::multiprecision::detail::unsigned_abs(val)) : static_cast<typename self_type::local_limb_type>(val);
- this->sign(val < 0);
- this->normalize();
- }
- template <class A>
- typename boost::enable_if_c< !is_integral<A>::value>::type do_assign_arithmetic(A val, const mpl::true_&)
- {
- this->check_in_range(val);
- *this->limbs() = (val < 0) ? static_cast<typename self_type::local_limb_type>(boost::multiprecision::detail::abs(val)) : static_cast<typename self_type::local_limb_type>(val);
- this->sign(val < 0);
- this->normalize();
- }
- BOOST_MP_FORCEINLINE void do_assign_arithmetic(limb_type i, const mpl::false_&) BOOST_NOEXCEPT
- {
- this->resize(1, 1);
- *this->limbs() = i;
- this->sign(false);
- }
- BOOST_MP_FORCEINLINE void do_assign_arithmetic(signed_limb_type i, const mpl::false_&) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().sign(true)))
- {
- this->resize(1, 1);
- *this->limbs() = static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(i));
- this->sign(i < 0);
- }
- void do_assign_arithmetic(double_limb_type i, const mpl::false_&) BOOST_NOEXCEPT
- {
- BOOST_STATIC_ASSERT(sizeof(i) == 2 * sizeof(limb_type));
- BOOST_STATIC_ASSERT(base_type::internal_limb_count >= 2);
- typename base_type::limb_pointer p = this->limbs();
-#ifdef __MSVC_RUNTIME_CHECKS
- *p = static_cast<limb_type>(i & ~static_cast<limb_type>(0));
-#else
- *p = static_cast<limb_type>(i);
-#endif
- p[1] = static_cast<limb_type>(i >> base_type::limb_bits);
- this->resize(p[1] ? 2 : 1, p[1] ? 2 : 1);
- this->sign(false);
- }
- void do_assign_arithmetic(signed_double_limb_type i, const mpl::false_&) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().sign(true)))
- {
- BOOST_STATIC_ASSERT(sizeof(i) == 2 * sizeof(limb_type));
- BOOST_STATIC_ASSERT(base_type::internal_limb_count >= 2);
- bool s = false;
- double_limb_type ui;
- if(i < 0)
- s = true;
- ui = static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i));
- typename base_type::limb_pointer p = this->limbs();
-#ifdef __MSVC_RUNTIME_CHECKS
- *p = static_cast<limb_type>(ui & ~static_cast<limb_type>(0));
-#else
- *p = static_cast<limb_type>(ui);
-#endif
- p[1] = static_cast<limb_type>(ui >> base_type::limb_bits);
- this->resize(p[1] ? 2 : 1, p[1] ? 2 : 1);
- this->sign(s);
- }
-
- void do_assign_arithmetic(long double a, const mpl::false_&)
- {
- using default_ops::eval_add;
- using default_ops::eval_subtract;
- using std::frexp;
- using std::ldexp;
- using std::floor;
-
- if(a < 0)
- {
- do_assign_arithmetic(-a, mpl::false_());
- this->sign(true);
- return;
- }
-
- if (a == 0) {
- *this = static_cast<limb_type>(0u);
- }
-
- if (a == 1) {
- *this = static_cast<limb_type>(1u);
- }
-
- BOOST_ASSERT(!(boost::math::isinf)(a));
- BOOST_ASSERT(!(boost::math::isnan)(a));
-
- int e;
- long double f, term;
- *this = static_cast<limb_type>(0u);
-
- f = frexp(a, &e);
-
- static const limb_type shift = std::numeric_limits<limb_type>::digits;
-
- while(f)
- {
- // extract int sized bits from f:
- f = ldexp(f, shift);
- term = floor(f);
- e -= shift;
- eval_left_shift(*this, shift);
- if(term > 0)
- eval_add(*this, static_cast<limb_type>(term));
- else
- eval_subtract(*this, static_cast<limb_type>(-term));
- f -= term;
- }
- if(e > 0)
- eval_left_shift(*this, e);
- else if(e < 0)
- eval_right_shift(*this, -e);
- }
-public:
- template <class Arithmetic>
- BOOST_MP_FORCEINLINE typename boost::enable_if_c<!boost::multiprecision::detail::is_byte_container<Arithmetic>::value, cpp_int_backend&>::type operator = (Arithmetic val) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().do_assign_arithmetic(std::declval<Arithmetic>(), trivial_tag())))
- {
- do_assign_arithmetic(val, trivial_tag());
- return *this;
- }
-private:
- void do_assign_string(const char* s, const mpl::true_&)
- {
- std::size_t n = s ? std::strlen(s) : 0;
- *this = 0;
- unsigned radix = 10;
- bool isneg = false;
- if(n && (*s == '-'))
- {
- --n;
- ++s;
- isneg = true;
- }
- if(n && (*s == '0'))
- {
- if((n > 1) && ((s[1] == 'x') || (s[1] == 'X')))
- {
- radix = 16;
- s +=2;
- n -= 2;
- }
- else
- {
- radix = 8;
- n -= 1;
- }
- }
- if(n)
- {
- unsigned val;
- while(*s)
- {
- if(*s >= '0' && *s <= '9')
- val = *s - '0';
- else if(*s >= 'a' && *s <= 'f')
- val = 10 + *s - 'a';
- else if(*s >= 'A' && *s <= 'F')
- val = 10 + *s - 'A';
- else
- val = radix + 1;
- if(val >= radix)
- {
- BOOST_THROW_EXCEPTION(std::runtime_error("Unexpected content found while parsing character string."));
- }
- *this->limbs() = detail::checked_multiply(*this->limbs(), static_cast<typename base_type::local_limb_type>(radix), checked_type());
- *this->limbs() = detail::checked_add(*this->limbs(), static_cast<typename base_type::local_limb_type>(val), checked_type());
- ++s;
- }
- }
- if(isneg)
- this->negate();
- }
- void do_assign_string(const char* s, const mpl::false_&)
- {
- using default_ops::eval_multiply;
- using default_ops::eval_add;
- std::size_t n = s ? std::strlen(s) : 0;
- *this = static_cast<limb_type>(0u);
- unsigned radix = 10;
- bool isneg = false;
- if(n && (*s == '-'))
- {
- --n;
- ++s;
- isneg = true;
- }
- if(n && (*s == '0'))
- {
- if((n > 1) && ((s[1] == 'x') || (s[1] == 'X')))
- {
- radix = 16;
- s +=2;
- n -= 2;
- }
- else
- {
- radix = 8;
- n -= 1;
- }
- }
- //
- // Exception guarantee: create the result in stack variable "result"
- // then do a swap at the end. In the event of a throw, *this will
- // be left unchanged.
- //
- cpp_int_backend result;
- if(n)
- {
- if(radix == 16)
- {
- while(*s == '0') ++s;
- std::size_t bitcount = 4 * std::strlen(s);
- limb_type val;
- std::size_t limb, shift;
- if(bitcount > 4)
- bitcount -= 4;
- else
- bitcount = 0;
- std::size_t newsize = bitcount / (sizeof(limb_type) * CHAR_BIT) + 1;
- result.resize(static_cast<unsigned>(newsize), static_cast<unsigned>(newsize)); // will throw if this is a checked integer that cannot be resized
- std::memset(result.limbs(), 0, result.size() * sizeof(limb_type));
- while(*s)
- {
- if(*s >= '0' && *s <= '9')
- val = *s - '0';
- else if(*s >= 'a' && *s <= 'f')
- val = 10 + *s - 'a';
- else if(*s >= 'A' && *s <= 'F')
- val = 10 + *s - 'A';
- else
- {
- BOOST_THROW_EXCEPTION(std::runtime_error("Unexpected content found while parsing character string."));
- }
- limb = bitcount / (sizeof(limb_type) * CHAR_BIT);
- shift = bitcount % (sizeof(limb_type) * CHAR_BIT);
- val <<= shift;
- if(result.size() > limb)
- {
- result.limbs()[limb] |= val;
- }
- ++s;
- bitcount -= 4;
- }
- result.normalize();
- }
- else if(radix == 8)
- {
- while(*s == '0') ++s;
- std::size_t bitcount = 3 * std::strlen(s);
- limb_type val;
- std::size_t limb, shift;
- if(bitcount > 3)
- bitcount -= 3;
- else
- bitcount = 0;
- std::size_t newsize = bitcount / (sizeof(limb_type) * CHAR_BIT) + 1;
- result.resize(static_cast<unsigned>(newsize), static_cast<unsigned>(newsize)); // will throw if this is a checked integer that cannot be resized
- std::memset(result.limbs(), 0, result.size() * sizeof(limb_type));
- while(*s)
- {
- if(*s >= '0' && *s <= '7')
- val = *s - '0';
- else
- {
- BOOST_THROW_EXCEPTION(std::runtime_error("Unexpected content found while parsing character string."));
- }
- limb = bitcount / (sizeof(limb_type) * CHAR_BIT);
- shift = bitcount % (sizeof(limb_type) * CHAR_BIT);
- if(result.size() > limb)
- {
- result.limbs()[limb] |= (val << shift);
- if(shift > sizeof(limb_type) * CHAR_BIT - 3)
- {
- // Deal with the bits in val that overflow into the next limb:
- val >>= (sizeof(limb_type) * CHAR_BIT - shift);
- if(val)
- {
- // If this is the most-significant-limb, we may need to allocate an extra one for the overflow:
- if(limb + 1 == newsize)
- result.resize(static_cast<unsigned>(newsize + 1), static_cast<unsigned>(newsize + 1));
- if(result.size() > limb + 1)
- {
- result.limbs()[limb + 1] |= val;
- }
- }
- }
- }
- ++s;
- bitcount -= 3;
- }
- result.normalize();
- }
- else
- {
- // Base 10, we extract blocks of size 10^9 at a time, that way
- // the number of multiplications is kept to a minimum:
- limb_type block_mult = max_block_10;
- while(*s)
- {
- limb_type block = 0;
- for(unsigned i = 0; i < digits_per_block_10; ++i)
- {
- limb_type val;
- if(*s >= '0' && *s <= '9')
- val = *s - '0';
- else
- BOOST_THROW_EXCEPTION(std::runtime_error("Unexpected character encountered in input."));
- block *= 10;
- block += val;
- if(!*++s)
- {
- block_mult = block_multiplier(i);
- break;
- }
- }
- eval_multiply(result, block_mult);
- eval_add(result, block);
- }
- }
- }
- if(isneg)
- result.negate();
- result.swap(*this);
- }
-public:
- cpp_int_backend& operator = (const char* s)
- {
- do_assign_string(s, trivial_tag());
- return *this;
- }
- BOOST_MP_FORCEINLINE void swap(cpp_int_backend& o) BOOST_NOEXCEPT
- {
- this->do_swap(o);
- }
-private:
- std::string do_get_trivial_string(std::ios_base::fmtflags f, const mpl::false_&)const
- {
- typedef typename mpl::if_c<sizeof(typename base_type::local_limb_type) == 1, unsigned, typename base_type::local_limb_type>::type io_type;
- if(this->sign() && (((f & std::ios_base::hex) == std::ios_base::hex) || ((f & std::ios_base::oct) == std::ios_base::oct)))
- BOOST_THROW_EXCEPTION(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."));
- std::stringstream ss;
- ss.flags(f & ~std::ios_base::showpos);
- ss << static_cast<io_type>(*this->limbs());
- std::string result;
- if(this->sign())
- result += '-';
- else if(f & std::ios_base::showpos)
- result += '+';
- result += ss.str();
- return result;
- }
- std::string do_get_trivial_string(std::ios_base::fmtflags f, const mpl::true_&)const
- {
- // Even though we have only one limb, we can't do IO on it :-(
- int base = 10;
- if((f & std::ios_base::oct) == std::ios_base::oct)
- base = 8;
- else if((f & std::ios_base::hex) == std::ios_base::hex)
- base = 16;
- std::string result;
-
- unsigned Bits = sizeof(typename base_type::local_limb_type) * CHAR_BIT;
-
- if(base == 8 || base == 16)
- {
- if(this->sign())
- BOOST_THROW_EXCEPTION(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."));
- limb_type shift = base == 8 ? 3 : 4;
- limb_type mask = static_cast<limb_type>((1u << shift) - 1);
- typename base_type::local_limb_type v = *this->limbs();
- result.assign(Bits / shift + (Bits % shift ? 1 : 0), '0');
- std::string::difference_type pos = result.size() - 1;
- for(unsigned i = 0; i < Bits / shift; ++i)
- {
- char c = '0' + static_cast<char>(v & mask);
- if(c > '9')
- c += 'A' - '9' - 1;
- result[pos--] = c;
- v >>= shift;
- }
- if(Bits % shift)
- {
- mask = static_cast<limb_type>((1u << (Bits % shift)) - 1);
- char c = '0' + static_cast<char>(v & mask);
- if(c > '9')
- c += 'A' - '9';
- result[pos] = c;
- }
- //
- // Get rid of leading zeros:
- //
- std::string::size_type n = result.find_first_not_of('0');
- if(!result.empty() && (n == std::string::npos))
- n = result.size() - 1;
- result.erase(0, n);
- if(f & std::ios_base::showbase)
- {
- const char* pp = base == 8 ? "0" : "0x";
- result.insert(static_cast<std::string::size_type>(0), pp);
- }
- }
- else
- {
- result.assign(Bits / 3 + 1, '0');
- std::string::difference_type pos = result.size() - 1;
- typename base_type::local_limb_type v(*this->limbs());
- bool neg = false;
- if(this->sign())
- {
- neg = true;
- }
- while(v)
- {
- result[pos] = (v % 10) + '0';
- --pos;
- v /= 10;
- }
- std::string::size_type n = result.find_first_not_of('0');
- result.erase(0, n);
- if(result.empty())
- result = "0";
- if(neg)
- result.insert(static_cast<std::string::size_type>(0), 1, '-');
- else if(f & std::ios_base::showpos)
- result.insert(static_cast<std::string::size_type>(0), 1, '+');
- }
- return result;
- }
- std::string do_get_string(std::ios_base::fmtflags f, const mpl::true_&)const
- {
-#ifdef BOOST_MP_NO_DOUBLE_LIMB_TYPE_IO
- return do_get_trivial_string(f, mpl::bool_<is_same<typename base_type::local_limb_type, double_limb_type>::value>());
-#else
- return do_get_trivial_string(f, mpl::bool_<false>());
-#endif
- }
- std::string do_get_string(std::ios_base::fmtflags f, const mpl::false_&)const
- {
- using default_ops::eval_get_sign;
- int base = 10;
- if((f & std::ios_base::oct) == std::ios_base::oct)
- base = 8;
- else if((f & std::ios_base::hex) == std::ios_base::hex)
- base = 16;
- std::string result;
-
- unsigned Bits = this->size() * base_type::limb_bits;
-
- if(base == 8 || base == 16)
- {
- if(this->sign())
- BOOST_THROW_EXCEPTION(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."));
- limb_type shift = base == 8 ? 3 : 4;
- limb_type mask = static_cast<limb_type>((1u << shift) - 1);
- cpp_int_backend t(*this);
- result.assign(Bits / shift + ((Bits % shift) ? 1 : 0), '0');
- std::string::difference_type pos = result.size() - 1;
- for(unsigned i = 0; i < Bits / shift; ++i)
- {
- char c = '0' + static_cast<char>(t.limbs()[0] & mask);
- if(c > '9')
- c += 'A' - '9' - 1;
- result[pos--] = c;
- eval_right_shift(t, shift);
- }
- if(Bits % shift)
- {
- mask = static_cast<limb_type>((1u << (Bits % shift)) - 1);
- char c = '0' + static_cast<char>(t.limbs()[0] & mask);
- if(c > '9')
- c += 'A' - '9';
- result[pos] = c;
- }
- //
- // Get rid of leading zeros:
- //
- std::string::size_type n = result.find_first_not_of('0');
- if(!result.empty() && (n == std::string::npos))
- n = result.size() - 1;
- result.erase(0, n);
- if(f & std::ios_base::showbase)
- {
- const char* pp = base == 8 ? "0" : "0x";
- result.insert(static_cast<std::string::size_type>(0), pp);
- }
- }
- else
- {
- result.assign(Bits / 3 + 1, '0');
- std::string::difference_type pos = result.size() - 1;
- cpp_int_backend t(*this);
- cpp_int_backend r;
- bool neg = false;
- if(t.sign())
- {
- t.negate();
- neg = true;
- }
- if(this->size() == 1)
- {
- result = boost::lexical_cast<std::string>(t.limbs()[0]);
- }
- else
- {
- cpp_int_backend block10;
- block10 = max_block_10;
- while(eval_get_sign(t) != 0)
- {
- cpp_int_backend t2;
- divide_unsigned_helper(&t2, t, block10, r);
- t = t2;
- limb_type v = r.limbs()[0];
- for(unsigned i = 0; i < digits_per_block_10; ++i)
- {
- char c = '0' + v % 10;
- v /= 10;
- result[pos] = c;
- if(pos-- == 0)
- break;
- }
- }
- }
- std::string::size_type n = result.find_first_not_of('0');
- result.erase(0, n);
- if(result.empty())
- result = "0";
- if(neg)
- result.insert(static_cast<std::string::size_type>(0), 1, '-');
- else if(f & std::ios_base::showpos)
- result.insert(static_cast<std::string::size_type>(0), 1, '+');
- }
- return result;
- }
-public:
- std::string str(std::streamsize /*digits*/, std::ios_base::fmtflags f)const
- {
- return do_get_string(f, trivial_tag());
- }
-private:
- template <class Container>
- void construct_from_container(const Container& c, const mpl::false_&)
- {
- //
- // We assume that c is a sequence of (unsigned) bytes with the most significant byte first:
- //
- unsigned newsize = static_cast<unsigned>(c.size() / sizeof(limb_type));
- if(c.size() % sizeof(limb_type))
- {
- ++newsize;
- }
- if(newsize)
- {
- this->resize(newsize, newsize); // May throw
- std::memset(this->limbs(), 0, this->size());
- typename Container::const_iterator i(c.begin()), j(c.end());
- unsigned byte_location = static_cast<unsigned>(c.size() - 1);
- while(i != j)
- {
- unsigned limb = byte_location / sizeof(limb_type);
- unsigned shift = (byte_location % sizeof(limb_type)) * CHAR_BIT;
- if(this->size() > limb)
- this->limbs()[limb] |= static_cast<limb_type>(static_cast<unsigned char>(*i)) << shift;
- ++i;
- --byte_location;
- }
- }
- }
- template <class Container>
- void construct_from_container(const Container& c, const mpl::true_&)
- {
- //
- // We assume that c is a sequence of (unsigned) bytes with the most significant byte first:
- //
- typedef typename base_type::local_limb_type local_limb_type;
- *this->limbs() = 0;
- if(c.size())
- {
- typename Container::const_iterator i(c.begin()), j(c.end());
- unsigned byte_location = static_cast<unsigned>(c.size() - 1);
- while(i != j)
- {
- unsigned limb = byte_location / sizeof(local_limb_type);
- unsigned shift = (byte_location % sizeof(local_limb_type)) * CHAR_BIT;
- if(limb == 0)
- this->limbs()[0] |= static_cast<limb_type>(static_cast<unsigned char>(*i)) << shift;
- ++i;
- --byte_location;
- }
- }
- }
-public:
- template <class Container>
- cpp_int_backend(const Container& c, typename boost::enable_if_c<boost::multiprecision::detail::is_byte_container<Container>::value>::type const* = 0)
- {
- //
- // We assume that c is a sequence of (unsigned) bytes with the most significant byte first:
- //
- construct_from_container(c, trivial_tag());
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::false_&, const mpl::false_&)const BOOST_NOEXCEPT
- {
- if(this->sign() != o.sign())
- return this->sign() ? -1 : 1;
-
- // Only do the compare if the same sign:
- int result = compare_unsigned(o);
-
- if(this->sign())
- result = -result;
- return result;
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::true_&, const mpl::false_&)const
- {
- cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> t(*this);
- return t.compare(o);
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::false_&, const mpl::true_&)const
- {
- cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> t(o);
- return compare(t);
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::true_&, const mpl::true_&)const BOOST_NOEXCEPT
- {
- if(this->sign())
- {
- if(o.sign())
- {
- return *this->limbs() < *o.limbs() ? 1 : (*this->limbs() > *o.limbs() ? -1 : 0);
- }
- else
- return -1;
- }
- else
- {
- if(o.sign())
- return 1;
- return *this->limbs() < *o.limbs() ? -1 : (*this->limbs() > *o.limbs() ? 1 : 0);
- }
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- int compare(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o)const BOOST_NOEXCEPT
- {
- typedef mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> t1;
- typedef mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value> t2;
- return compare_imp(o, t1(), t2());
- }
- template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
- int compare_unsigned(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o)const BOOST_NOEXCEPT
- {
- if(this->size() != o.size())
- {
- return this->size() > o.size() ? 1 : -1;
- }
- typename base_type::const_limb_pointer pa = this->limbs();
- typename base_type::const_limb_pointer pb = o.limbs();
- for(int i = this->size() - 1; i >= 0; --i)
- {
- if(pa[i] != pb[i])
- return pa[i] > pb[i] ? 1 : -1;
- }
- return 0;
- }
- template <class Arithmetic>
- BOOST_MP_FORCEINLINE typename boost::enable_if<is_arithmetic<Arithmetic>, int>::type compare(Arithmetic i)const
- {
- // braindead version:
- cpp_int_backend t;
- t = i;
- return compare(t);
- }
-};
-
-} // namespace backends
-
-namespace default_ops{
-
-template <class Backend>
-struct double_precision_type;
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct double_precision_type<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
-{
- typedef typename mpl::if_c<
- backends::is_fixed_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
- backends::cpp_int_backend<
- (is_void<Allocator>::value ?
- 2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value
- : MinBits),
- 2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
- SignType,
- Checked,
- Allocator>,
- backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>
- >::type type;
-};
-
-
-}
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked>
-struct expression_template_default<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, void> >
-{
- static const expression_template_option value = et_off;
-};
-
-using boost::multiprecision::backends::cpp_int_backend;
-
-template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
-struct number_category<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > : public mpl::int_<number_kind_integer>{};
-
-typedef number<cpp_int_backend<> > cpp_int;
-typedef rational_adaptor<cpp_int_backend<> > cpp_rational_backend;
-typedef number<cpp_rational_backend> cpp_rational;
-
-// Fixed precision unsigned types:
-typedef number<cpp_int_backend<128, 128, unsigned_magnitude, unchecked, void> > uint128_t;
-typedef number<cpp_int_backend<256, 256, unsigned_magnitude, unchecked, void> > uint256_t;
-typedef number<cpp_int_backend<512, 512, unsigned_magnitude, unchecked, void> > uint512_t;
-typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, unchecked, void> > uint1024_t;
-
-// Fixed precision signed types:
-typedef number<cpp_int_backend<128, 128, signed_magnitude, unchecked, void> > int128_t;
-typedef number<cpp_int_backend<256, 256, signed_magnitude, unchecked, void> > int256_t;
-typedef number<cpp_int_backend<512, 512, signed_magnitude, unchecked, void> > int512_t;
-typedef number<cpp_int_backend<1024, 1024, signed_magnitude, unchecked, void> > int1024_t;
-
-// Over again, but with checking enabled this time:
-typedef number<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_int;
-typedef rational_adaptor<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_rational_backend;
-typedef number<checked_cpp_rational_backend> checked_cpp_rational;
-// Fixed precision unsigned types:
-typedef number<cpp_int_backend<128, 128, unsigned_magnitude, checked, void> > checked_uint128_t;
-typedef number<cpp_int_backend<256, 256, unsigned_magnitude, checked, void> > checked_uint256_t;
-typedef number<cpp_int_backend<512, 512, unsigned_magnitude, checked, void> > checked_uint512_t;
-typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, checked, void> > checked_uint1024_t;
-
-// Fixed precision signed types:
-typedef number<cpp_int_backend<128, 128, signed_magnitude, checked, void> > checked_int128_t;
-typedef number<cpp_int_backend<256, 256, signed_magnitude, checked, void> > checked_int256_t;
-typedef number<cpp_int_backend<512, 512, signed_magnitude, checked, void> > checked_int512_t;
-typedef number<cpp_int_backend<1024, 1024, signed_magnitude, checked, void> > checked_int1024_t;
-
-#ifdef BOOST_NO_SFINAE_EXPR
-
-namespace detail{
-
-template<unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-struct is_explicitly_convertible<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > : public mpl::true_ {};
-
-}
-#endif
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-}} // namespaces
-
-//
-// Last of all we include the implementations of all the eval_* non member functions:
-//
-#include <boost/multiprecision/cpp_int/comparison.hpp>
-#include <boost/multiprecision/cpp_int/add.hpp>
-#include <boost/multiprecision/cpp_int/multiply.hpp>
-#include <boost/multiprecision/cpp_int/divide.hpp>
-#include <boost/multiprecision/cpp_int/bitwise.hpp>
-#include <boost/multiprecision/cpp_int/misc.hpp>
-#include <boost/multiprecision/cpp_int/limits.hpp>
-#ifdef BOOST_MP_USER_DEFINED_LITERALS
-#include <boost/multiprecision/cpp_int/literals.hpp>
-#endif
-#include <boost/multiprecision/cpp_int/serialize.hpp>
-#include <boost/multiprecision/cpp_int/import_export.hpp>
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/bitwise.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/bitwise.hpp
deleted file mode 100644
index 168544c9bb6..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/bitwise.hpp
+++ /dev/null
@@ -1,842 +0,0 @@
-///////////////////////////////////////////////////////////////
-// Copyright 2012 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
-//
-// Comparison operators for cpp_int_backend:
-//
-#ifndef BOOST_MP_CPP_INT_BIT_HPP
-#define BOOST_MP_CPP_INT_BIT_HPP
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4319)
-#endif
-
-namespace boost{ namespace multiprecision{ namespace backends{
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-void is_valid_bitwise_op(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::int_<checked>&)
-{
- if(result.sign() || o.sign())
- BOOST_THROW_EXCEPTION(std::range_error("Bitwise operations on negative values results in undefined behavior."));
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-void is_valid_bitwise_op(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>&,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& , const mpl::int_<unchecked>&){}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
-void is_valid_bitwise_op(
- const cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>& result, const mpl::int_<checked>&)
-{
- if(result.sign())
- BOOST_THROW_EXCEPTION(std::range_error("Bitwise operations on negative values results in undefined behavior."));
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
-void is_valid_bitwise_op(
- const cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>&, const mpl::int_<checked>&){}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-void is_valid_bitwise_op(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>&, const mpl::int_<unchecked>&){}
-
-template <class CppInt1, class CppInt2, class Op>
-void bitwise_op(
- CppInt1& result,
- const CppInt2& o,
- Op op, const mpl::true_&) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<CppInt1>::value))
-{
- //
- // There are 4 cases:
- // * Both positive.
- // * result negative, o positive.
- // * o negative, result positive.
- // * Both negative.
- //
- // When one arg is negative we convert to 2's complement form "on the fly",
- // and then convert back to signed-magnitude form at the end.
- //
- // Note however, that if the type is checked, then bitwise ops on negative values
- // are not permitted and an exception will result.
- //
- is_valid_bitwise_op(result, o, typename CppInt1::checked_type());
- //
- // First figure out how big the result needs to be and set up some data:
- //
- unsigned rs = result.size();
- unsigned os = o.size();
- unsigned m, x;
- minmax(rs, os, m, x);
- result.resize(x, x);
- typename CppInt1::limb_pointer pr = result.limbs();
- typename CppInt2::const_limb_pointer po = o.limbs();
- for(unsigned i = rs; i < x; ++i)
- pr[i] = 0;
-
- limb_type next_limb = 0;
-
- if(!result.sign())
- {
- if(!o.sign())
- {
- for(unsigned i = 0; i < os; ++i)
- pr[i] = op(pr[i], po[i]);
- for(unsigned i = os; i < x; ++i)
- pr[i] = op(pr[i], limb_type(0));
- }
- else
- {
- // "o" is negative:
- double_limb_type carry = 1;
- for(unsigned i = 0; i < os; ++i)
- {
- carry += static_cast<double_limb_type>(~po[i]);
- pr[i] = op(pr[i], static_cast<limb_type>(carry));
- carry >>= CppInt1::limb_bits;
- }
- for(unsigned i = os; i < x; ++i)
- {
- carry += static_cast<double_limb_type>(~limb_type(0));
- pr[i] = op(pr[i], static_cast<limb_type>(carry));
- carry >>= CppInt1::limb_bits;
- }
- // Set the overflow into the "extra" limb:
- carry += static_cast<double_limb_type>(~limb_type(0));
- next_limb = op(limb_type(0), static_cast<limb_type>(carry));
- }
- }
- else
- {
- if(!o.sign())
- {
- // "result" is negative:
- double_limb_type carry = 1;
- for(unsigned i = 0; i < os; ++i)
- {
- carry += static_cast<double_limb_type>(~pr[i]);
- pr[i] = op(static_cast<limb_type>(carry), po[i]);
- carry >>= CppInt1::limb_bits;
- }
- for(unsigned i = os; i < x; ++i)
- {
- carry += static_cast<double_limb_type>(~pr[i]);
- pr[i] = op(static_cast<limb_type>(carry), limb_type(0));
- carry >>= CppInt1::limb_bits;
- }
- // Set the overflow into the "extra" limb:
- carry += static_cast<double_limb_type>(~limb_type(0));
- next_limb = op(static_cast<limb_type>(carry), limb_type(0));
- }
- else
- {
- // both are negative:
- double_limb_type r_carry = 1;
- double_limb_type o_carry = 1;
- for(unsigned i = 0; i < os; ++i)
- {
- r_carry += static_cast<double_limb_type>(~pr[i]);
- o_carry += static_cast<double_limb_type>(~po[i]);
- pr[i] = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry));
- r_carry >>= CppInt1::limb_bits;
- o_carry >>= CppInt1::limb_bits;
- }
- for(unsigned i = os; i < x; ++i)
- {
- r_carry += static_cast<double_limb_type>(~pr[i]);
- o_carry += static_cast<double_limb_type>(~limb_type(0));
- pr[i] = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry));
- r_carry >>= CppInt1::limb_bits;
- o_carry >>= CppInt1::limb_bits;
- }
- // Set the overflow into the "extra" limb:
- r_carry += static_cast<double_limb_type>(~limb_type(0));
- o_carry += static_cast<double_limb_type>(~limb_type(0));
- next_limb = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry));
- }
- }
- //
- // See if the result is negative or not:
- //
- if(static_cast<signed_limb_type>(next_limb) < 0)
- {
- double_limb_type carry = 1;
- for(unsigned i = 0; i < x; ++i)
- {
- carry += static_cast<double_limb_type>(~pr[i]);
- pr[i] = static_cast<limb_type>(carry);
- carry >>= CppInt1::limb_bits;
- }
- if(carry)
- {
- result.resize(x + 1, x);
- if(result.size() > x)
- result.limbs()[x] = static_cast<limb_type>(carry);
- }
- result.sign(true);
- }
- else
- result.sign(false);
-
- result.normalize();
-}
-
-template <class CppInt1, class CppInt2, class Op>
-void bitwise_op(
- CppInt1& result,
- const CppInt2& o,
- Op op, const mpl::false_&) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<CppInt1>::value))
-{
- //
- // Both arguments are unsigned types, very simple case handled as a special case.
- //
- // First figure out how big the result needs to be and set up some data:
- //
- unsigned rs = result.size();
- unsigned os = o.size();
- unsigned m, x;
- minmax(rs, os, m, x);
- result.resize(x, x);
- typename CppInt1::limb_pointer pr = result.limbs();
- typename CppInt2::const_limb_pointer po = o.limbs();
- for(unsigned i = rs; i < x; ++i)
- pr[i] = 0;
-
- for(unsigned i = 0; i < os; ++i)
- pr[i] = op(pr[i], po[i]);
- for(unsigned i = os; i < x; ++i)
- pr[i] = op(pr[i], limb_type(0));
-
- result.normalize();
-}
-
-struct bit_and{ limb_type operator()(limb_type a, limb_type b)const BOOST_NOEXCEPT { return a & b; } };
-struct bit_or { limb_type operator()(limb_type a, limb_type b)const BOOST_NOEXCEPT { return a | b; } };
-struct bit_xor{ limb_type operator()(limb_type a, limb_type b)const BOOST_NOEXCEPT { return a ^ b; } };
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_bitwise_and(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- bitwise_op(result, o, bit_and(),
- mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>());
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_bitwise_or(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- bitwise_op(result, o, bit_or(),
- mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>());
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_bitwise_xor(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- bitwise_op(result, o, bit_xor(),
- mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>());
-}
-//
-// Again for operands which are single limbs:
-//
-template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type
- eval_bitwise_and(
- cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result,
- limb_type l) BOOST_NOEXCEPT
-{
- result.limbs()[0] &= l;
- result.resize(1, 1);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type
- eval_bitwise_or(
- cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result,
- limb_type l) BOOST_NOEXCEPT
-{
- result.limbs()[0] |= l;
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type
- eval_bitwise_xor(
- cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result,
- limb_type l) BOOST_NOEXCEPT
-{
- result.limbs()[0] ^= l;
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_complement(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- BOOST_STATIC_ASSERT_MSG(((Checked1 != checked) || (Checked2 != checked)), "Attempt to take the complement of a signed type results in undefined behavior.");
- // Increment and negate:
- result = o;
- eval_increment(result);
- result.negate();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value >::type
- eval_complement(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- unsigned os = o.size();
- result.resize(UINT_MAX, os);
- for(unsigned i = 0; i < os; ++i)
- result.limbs()[i] = ~o.limbs()[i];
- for(unsigned i = os; i < result.size(); ++i)
- result.limbs()[i] = ~static_cast<limb_type>(0);
- result.normalize();
-}
-
-template <class Int>
-inline void left_shift_byte(Int& result, double_limb_type s)
-{
- limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
- limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
- unsigned ors = result.size();
- if((ors == 1) && (!*result.limbs()))
- return; // shifting zero yields zero.
- unsigned rs = ors;
- if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift)))
- ++rs; // Most significant limb will overflow when shifted
- rs += offset;
- result.resize(rs, rs);
- rs = result.size();
-
- typename Int::limb_pointer pr = result.limbs();
-
- if(rs != ors)
- pr[rs - 1] = 0u;
- std::size_t bytes = static_cast<std::size_t>(s / CHAR_BIT);
- std::size_t len = (std::min)(ors * sizeof(limb_type), rs * sizeof(limb_type) - bytes);
- if(bytes >= rs * sizeof(limb_type))
- result = static_cast<limb_type>(0u);
- else
- {
- unsigned char* pc = reinterpret_cast<unsigned char*>(pr);
- std::memmove(pc + bytes, pc, len);
- std::memset(pc, 0, bytes);
- }
-}
-
-template <class Int>
-inline void left_shift_limb(Int& result, double_limb_type s)
-{
- limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
- limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
-
- unsigned ors = result.size();
- if((ors == 1) && (!*result.limbs()))
- return; // shifting zero yields zero.
- unsigned rs = ors;
- if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift)))
- ++rs; // Most significant limb will overflow when shifted
- rs += offset;
- result.resize(rs, rs);
-
- typename Int::limb_pointer pr = result.limbs();
-
- if(offset > rs)
- {
- // The result is shifted past the end of the result:
- result = static_cast<limb_type>(0);
- return;
- }
-
- unsigned i = rs - result.size();
- for(; i < ors; ++i)
- pr[rs - 1 - i] = pr[ors - 1 - i];
- for(; i < rs; ++i)
- pr[rs - 1 - i] = 0;
-}
-
-template <class Int>
-inline void left_shift_generic(Int& result, double_limb_type s)
-{
- limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
- limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
-
- unsigned ors = result.size();
- if((ors == 1) && (!*result.limbs()))
- return; // shifting zero yields zero.
- unsigned rs = ors;
- if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift)))
- ++rs; // Most significant limb will overflow when shifted
- rs += offset;
- result.resize(rs, rs);
- bool truncated = result.size() != rs;
-
- typename Int::limb_pointer pr = result.limbs();
-
- if(offset > rs)
- {
- // The result is shifted past the end of the result:
- result = static_cast<limb_type>(0);
- return;
- }
-
- unsigned i = rs - result.size();
- // This code only works when shift is non-zero, otherwise we invoke undefined behaviour!
- BOOST_ASSERT(shift);
- if(!truncated)
- {
- if(rs > ors + offset)
- {
- pr[rs - 1 - i] = pr[ors - 1 - i] >> (Int::limb_bits - shift);
- --rs;
- }
- else
- {
- pr[rs - 1 - i] = pr[ors - 1 - i] << shift;
- if(ors > 1)
- pr[rs - 1 - i] |= pr[ors - 2 - i] >> (Int::limb_bits - shift);
- ++i;
- }
- }
- for(; rs - i >= 2 + offset; ++i)
- {
- pr[rs - 1 - i] = pr[rs - 1 - i - offset] << shift;
- pr[rs - 1 - i] |= pr[rs - 2 - i - offset] >> (Int::limb_bits - shift);
- }
- if(rs - i >= 1 + offset)
- {
- pr[rs - 1 - i] = pr[rs - 1 - i - offset] << shift;
- ++i;
- }
- for(; i < rs; ++i)
- pr[rs - 1 - i] = 0;
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
- eval_left_shift(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- double_limb_type s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- if(!s)
- return;
-
-#if defined(BOOST_LITTLE_ENDIAN) && defined(BOOST_MP_USE_LIMB_SHIFT)
- static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits - 1;
- static const limb_type byte_shift_mask = CHAR_BIT - 1;
- if((s & limb_shift_mask) == 0)
- {
- left_shift_limb(result, s);
- }
- else if((s & byte_shift_mask) == 0)
- {
- left_shift_byte(result, s);
- }
-#elif defined(BOOST_LITTLE_ENDIAN)
- static const limb_type byte_shift_mask = CHAR_BIT - 1;
- if((s & byte_shift_mask) == 0)
- {
- left_shift_byte(result, s);
- }
-#else
- static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits - 1;
- if((s & limb_shift_mask) == 0)
- {
- left_shift_limb(result, s);
- }
-#endif
- else
- {
- left_shift_generic(result, s);
- }
- //
- // We may have shifted off the end and have leading zeros:
- //
- result.normalize();
-}
-
-template <class Int>
-inline void right_shift_byte(Int& result, double_limb_type s)
-{
- limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
- limb_type shift;
- BOOST_ASSERT((s % CHAR_BIT) == 0);
- unsigned ors = result.size();
- unsigned rs = ors;
- if(offset >= rs)
- {
- result = limb_type(0);
- return;
- }
- rs -= offset;
- typename Int::limb_pointer pr = result.limbs();
- unsigned char* pc = reinterpret_cast<unsigned char*>(pr);
- shift = static_cast<limb_type>(s / CHAR_BIT);
- std::memmove(pc, pc + shift, ors * sizeof(pr[0]) - shift);
- shift = (sizeof(limb_type) - shift % sizeof(limb_type)) * CHAR_BIT;
- if(shift < Int::limb_bits)
- {
- pr[ors - offset - 1] &= (static_cast<limb_type>(1u) << shift) - 1;
- if(!pr[ors - offset - 1] && (rs > 1))
- --rs;
- }
- result.resize(rs, rs);
-}
-
-template <class Int>
-inline void right_shift_limb(Int& result, double_limb_type s)
-{
- limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
- BOOST_ASSERT((s % Int::limb_bits) == 0);
- unsigned ors = result.size();
- unsigned rs = ors;
- if(offset >= rs)
- {
- result = limb_type(0);
- return;
- }
- rs -= offset;
- typename Int::limb_pointer pr = result.limbs();
- unsigned i = 0;
- for(; i < rs; ++i)
- pr[i] = pr[i + offset];
- result.resize(rs, rs);
-}
-
-template <class Int>
-inline void right_shift_generic(Int& result, double_limb_type s)
-{
- limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
- limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
- unsigned ors = result.size();
- unsigned rs = ors;
- if(offset >= rs)
- {
- result = limb_type(0);
- return;
- }
- rs -= offset;
- typename Int::limb_pointer pr = result.limbs();
- if((pr[ors - 1] >> shift) == 0)
- {
- if(--rs == 0)
- {
- result = limb_type(0);
- return;
- }
- }
- unsigned i = 0;
-
- // This code only works for non-zero shift, otherwise we invoke undefined behaviour!
- BOOST_ASSERT(shift);
- for(; i + offset + 1 < ors; ++i)
- {
- pr[i] = pr[i + offset] >> shift;
- pr[i] |= pr[i + offset + 1] << (Int::limb_bits - shift);
- }
- pr[i] = pr[i + offset] >> shift;
- result.resize(rs, rs);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
-inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type
- eval_right_shift(
- cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result,
- double_limb_type s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value))
-{
- is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>::checked_type());
- if(!s)
- return;
-
-#if defined(BOOST_LITTLE_ENDIAN) && defined(BOOST_MP_USE_LIMB_SHIFT)
- static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::limb_bits - 1;
- static const limb_type byte_shift_mask = CHAR_BIT - 1;
- if((s & limb_shift_mask) == 0)
- right_shift_limb(result, s);
- else if((s & byte_shift_mask) == 0)
- right_shift_byte(result, s);
-#elif defined(BOOST_LITTLE_ENDIAN)
- static const limb_type byte_shift_mask = CHAR_BIT - 1;
- if((s & byte_shift_mask) == 0)
- right_shift_byte(result, s);
-#else
- static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::limb_bits - 1;
- if((s & limb_shift_mask) == 0)
- right_shift_limb(result, s);
-#endif
- else
- right_shift_generic(result, s);
-}
-template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
-inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1> >::value>::type
- eval_right_shift(
- cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>& result,
- double_limb_type s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1> >::value))
-{
- is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::checked_type());
- if(!s)
- return;
-
- bool is_neg = result.sign();
- if(is_neg)
- eval_increment(result);
-
-#if defined(BOOST_LITTLE_ENDIAN) && defined(BOOST_MP_USE_LIMB_SHIFT)
- static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::limb_bits - 1;
- static const limb_type byte_shift_mask = CHAR_BIT - 1;
- if((s & limb_shift_mask) == 0)
- right_shift_limb(result, s);
- else if((s & byte_shift_mask) == 0)
- right_shift_byte(result, s);
-#elif defined(BOOST_LITTLE_ENDIAN)
- static const limb_type byte_shift_mask = CHAR_BIT - 1;
- if((s & byte_shift_mask) == 0)
- right_shift_byte(result, s);
-#else
- static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::limb_bits - 1;
- if((s & limb_shift_mask) == 0)
- right_shift_limb(result, s);
-#endif
- else
- right_shift_generic(result, s);
- if(is_neg)
- eval_decrement(result);
-}
-
-//
-// Over again for trivial cpp_int's:
-//
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class T>
-BOOST_MP_FORCEINLINE typename enable_if<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::type
- eval_left_shift(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, T s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- *result.limbs() = detail::checked_left_shift(*result.limbs(), s, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- result.normalize();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class T>
-BOOST_MP_FORCEINLINE typename enable_if<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::type
- eval_right_shift(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, T s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- // Nothing to check here... just make sure we don't invoke undefined behavior:
- is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- *result.limbs() = (static_cast<unsigned>(s) >= sizeof(*result.limbs()) * CHAR_BIT) ? 0 : (result.sign() ? ((--*result.limbs()) >> s) + 1 : *result.limbs() >> s);
- if(result.sign() && (*result.limbs() == 0))
- result = static_cast<signed_limb_type>(-1);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value)
- >::type
- eval_complement(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- BOOST_STATIC_ASSERT_MSG(((Checked1 != checked) || (Checked2 != checked)), "Attempt to take the complement of a signed type results in undefined behavior.");
- //
- // If we're not checked then emulate 2's complement behavior:
- //
- if(o.sign())
- {
- *result.limbs() = *o.limbs() - 1;
- result.sign(false);
- }
- else
- {
- *result.limbs() = 1 + *o.limbs();
- result.sign(true);
- }
- result.normalize();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- >::type
- eval_complement(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- *result.limbs() = ~*o.limbs();
- result.normalize();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- >::type
- eval_bitwise_and(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- *result.limbs() &= *o.limbs();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value)
- >::type
- eval_bitwise_and(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
-
- using default_ops::eval_bit_test;
- using default_ops::eval_increment;
-
- if(result.sign() || o.sign())
- {
- static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value;
- cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result);
- cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o);
- eval_bitwise_and(t1, t2);
- bool s = eval_bit_test(t1, m + 1);
- if(s)
- {
- eval_complement(t1, t1);
- eval_increment(t1);
- }
- result = t1;
- result.sign(s);
- }
- else
- {
- *result.limbs() &= *o.limbs();
- }
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- >::type
- eval_bitwise_or(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- *result.limbs() |= *o.limbs();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value)
- >::type
- eval_bitwise_or(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
-
- using default_ops::eval_bit_test;
- using default_ops::eval_increment;
-
- if(result.sign() || o.sign())
- {
- static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value;
- cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result);
- cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o);
- eval_bitwise_or(t1, t2);
- bool s = eval_bit_test(t1, m + 1);
- if(s)
- {
- eval_complement(t1, t1);
- eval_increment(t1);
- }
- result = t1;
- result.sign(s);
- }
- else
- {
- *result.limbs() |= *o.limbs();
- result.normalize();
- }
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- >::type
- eval_bitwise_xor(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- *result.limbs() ^= *o.limbs();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value)
- >::type
- eval_bitwise_xor(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
-
- using default_ops::eval_bit_test;
- using default_ops::eval_increment;
-
- if(result.sign() || o.sign())
- {
- static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value;
- cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result);
- cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o);
- eval_bitwise_xor(t1, t2);
- bool s = eval_bit_test(t1, m + 1);
- if(s)
- {
- eval_complement(t1, t1);
- eval_increment(t1);
- }
- result = t1;
- result.sign(s);
- }
- else
- {
- *result.limbs() ^= *o.limbs();
- }
-}
-
-}}} // namespaces
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/import_export.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/import_export.hpp
deleted file mode 100644
index b975a79663f..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/import_export.hpp
+++ /dev/null
@@ -1,251 +0,0 @@
-///////////////////////////////////////////////////////////////
-// Copyright 2015 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
-
-#ifndef BOOST_MP_CPP_INT_IMPORT_EXPORT_HPP
-#define BOOST_MP_CPP_INT_IMPORT_EXPORT_HPP
-
-
-namespace boost {
- namespace multiprecision {
-
- namespace detail {
-
- template <class Backend, class Unsigned>
- void assign_bits(Backend& val, Unsigned bits, unsigned bit_location, unsigned chunk_bits, const mpl::false_& tag)
- {
- unsigned limb = bit_location / (sizeof(limb_type) * CHAR_BIT);
- unsigned shift = bit_location % (sizeof(limb_type) * CHAR_BIT);
-
- limb_type mask = chunk_bits >= sizeof(limb_type) * CHAR_BIT ? ~static_cast<limb_type>(0u) : (static_cast<limb_type>(1u) << chunk_bits) - 1;
-
- limb_type value = static_cast<limb_type>(bits & mask) << shift;
- if(value)
- {
- if(val.size() == limb)
- {
- val.resize(limb + 1, limb + 1);
- if(val.size() > limb)
- val.limbs()[limb] = value;
- }
- else if(val.size() > limb)
- val.limbs()[limb] |= value;
- }
- if(chunk_bits > sizeof(limb_type) * CHAR_BIT - shift)
- {
- shift = sizeof(limb_type) * CHAR_BIT - shift;
- chunk_bits -= shift;
- bit_location += shift;
- bits >>= shift;
- if(bits)
- assign_bits(val, bits, bit_location, chunk_bits, tag);
- }
- }
- template <class Backend, class Unsigned>
- void assign_bits(Backend& val, Unsigned bits, unsigned bit_location, unsigned chunk_bits, const mpl::true_&)
- {
- typedef typename Backend::local_limb_type local_limb_type;
- //
- // Check for possible overflow, this may trigger an exception, or have no effect
- // depending on whether this is a checked integer or not:
- //
- if((bit_location >= sizeof(local_limb_type) * CHAR_BIT) && bits)
- val.resize(2, 2);
- else
- {
- local_limb_type mask = chunk_bits >= sizeof(local_limb_type) * CHAR_BIT ? ~static_cast<local_limb_type>(0u) : (static_cast<local_limb_type>(1u) << chunk_bits) - 1;
- local_limb_type value = (static_cast<local_limb_type>(bits) & mask) << bit_location;
- *val.limbs() |= value;
- //
- // Check for overflow bits:
- //
- bit_location = sizeof(local_limb_type) * CHAR_BIT - bit_location;
- if((bit_location < sizeof(bits)*CHAR_BIT) && (bits >>= bit_location))
- val.resize(2, 2); // May throw!
- }
- }
-
- template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
- inline void resize_to_bit_size(cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& newval, unsigned bits, const mpl::false_&)
- {
- unsigned limb_count = static_cast<unsigned>(bits / (sizeof(limb_type) * CHAR_BIT));
- if(bits % (sizeof(limb_type) * CHAR_BIT))
- ++limb_count;
- static const unsigned max_limbs = MaxBits ? MaxBits / (CHAR_BIT * sizeof(limb_type)) + ((MaxBits % (CHAR_BIT * sizeof(limb_type))) ? 1 : 0) : (std::numeric_limits<unsigned>::max)();
- if(limb_count > max_limbs)
- limb_count = max_limbs;
- newval.resize(limb_count, limb_count);
- std::memset(newval.limbs(), 0, newval.size() * sizeof(limb_type));
- }
- template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
- inline void resize_to_bit_size(cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& newval, unsigned, const mpl::true_&)
- {
- *newval.limbs() = 0;
- }
-
- template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class Iterator>
- number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&
- import_bits_generic(
- number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, Iterator i, Iterator j, unsigned chunk_size = 0, bool msv_first = true)
- {
- typename number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>::backend_type newval;
-
- typedef typename std::iterator_traits<Iterator>::value_type value_type;
- typedef typename boost::make_unsigned<value_type>::type unsigned_value_type;
- typedef typename std::iterator_traits<Iterator>::difference_type difference_type;
- typedef typename boost::make_unsigned<difference_type>::type size_type;
- typedef typename cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>::trivial_tag tag_type;
-
- if(!chunk_size)
- chunk_size = std::numeric_limits<value_type>::digits;
-
- size_type limbs = std::distance(i, j);
- size_type bits = limbs * chunk_size;
-
- detail::resize_to_bit_size(newval, static_cast<unsigned>(bits), tag_type());
-
- difference_type bit_location = msv_first ? bits - chunk_size : 0;
- difference_type bit_location_change = msv_first ? -static_cast<difference_type>(chunk_size) : chunk_size;
-
- while(i != j)
- {
- detail::assign_bits(newval, static_cast<unsigned_value_type>(*i), static_cast<unsigned>(bit_location), chunk_size, tag_type());
- ++i;
- bit_location += bit_location_change;
- }
-
- newval.normalize();
-
- val.backend().swap(newval);
- return val;
- }
-
- template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T>
- inline typename boost::disable_if_c<boost::multiprecision::backends::is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&>::type
- import_bits_fast(
- number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0)
- {
- std::size_t byte_len = (j - i) * (chunk_size ? chunk_size / CHAR_BIT : sizeof(*i));
- std::size_t limb_len = byte_len / sizeof(limb_type);
- if(byte_len % sizeof(limb_type))
- ++limb_len;
- cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& result = val.backend();
- result.resize(static_cast<unsigned>(limb_len), static_cast<unsigned>(limb_len)); // checked types may throw here if they're not large enough to hold the data!
- result.limbs()[result.size() - 1] = 0u;
- std::memcpy(result.limbs(), i, (std::min)(byte_len, result.size() * sizeof(limb_type)));
- result.normalize(); // In case data has leading zeros.
- return val;
- }
- template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T>
- inline typename boost::enable_if_c<boost::multiprecision::backends::is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&>::type
- import_bits_fast(
- number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0)
- {
- cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& result = val.backend();
- std::size_t byte_len = (j - i) * (chunk_size ? chunk_size / CHAR_BIT : sizeof(*i));
- std::size_t limb_len = byte_len / sizeof(result.limbs()[0]);
- if(byte_len % sizeof(result.limbs()[0]))
- ++limb_len;
- result.limbs()[0] = 0u;
- result.resize(static_cast<unsigned>(limb_len), static_cast<unsigned>(limb_len)); // checked types may throw here if they're not large enough to hold the data!
- std::memcpy(result.limbs(), i, (std::min)(byte_len, result.size() * sizeof(result.limbs()[0])));
- result.normalize(); // In case data has leading zeros.
- return val;
- }
- }
-
-
- template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class Iterator>
- inline number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&
- import_bits(
- number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, Iterator i, Iterator j, unsigned chunk_size = 0, bool msv_first = true)
- {
- return detail::import_bits_generic(val, i, j, chunk_size, msv_first);
- }
-
- template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T>
- inline number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&
- import_bits(
- number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0, bool msv_first = true)
- {
-#ifdef BOOST_LITTLE_ENDIAN
- if(((chunk_size % CHAR_BIT) == 0) && !msv_first)
- return detail::import_bits_fast(val, i, j, chunk_size);
-#endif
- return detail::import_bits_generic(val, i, j, chunk_size, msv_first);
- }
-
- namespace detail {
-
- template <class Backend>
- boost::uintmax_t extract_bits(const Backend& val, unsigned location, unsigned count, const mpl::false_& tag)
- {
- unsigned limb = location / (sizeof(limb_type) * CHAR_BIT);
- unsigned shift = location % (sizeof(limb_type) * CHAR_BIT);
- boost::uintmax_t result = 0;
- boost::uintmax_t mask = count == std::numeric_limits<boost::uintmax_t>::digits ? ~static_cast<boost::uintmax_t>(0) : (static_cast<boost::uintmax_t>(1u) << count) - 1;
- if(count > (sizeof(limb_type) * CHAR_BIT - shift))
- {
- result = extract_bits(val, location + sizeof(limb_type) * CHAR_BIT - shift, count - sizeof(limb_type) * CHAR_BIT + shift, tag);
- result <<= sizeof(limb_type) * CHAR_BIT - shift;
- }
- if(limb < val.size())
- result |= (val.limbs()[limb] >> shift) & mask;
- return result;
- }
-
- template <class Backend>
- inline boost::uintmax_t extract_bits(const Backend& val, unsigned location, unsigned count, const mpl::true_&)
- {
- typename Backend::local_limb_type result = *val.limbs();
- typename Backend::local_limb_type mask = count >= std::numeric_limits<typename Backend::local_limb_type>::digits ? ~static_cast<typename Backend::local_limb_type>(0) : (static_cast<typename Backend::local_limb_type>(1u) << count) - 1;
- return (result >> location) & mask;
- }
-
- }
-
- template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class OutputIterator>
- OutputIterator export_bits(
- const number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, OutputIterator out, unsigned chunk_size, bool msv_first = true)
- {
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4244)
-#endif
- typedef typename cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>::trivial_tag tag_type;
- if(!val)
- {
- *out = 0;
- ++out;
- return out;
- }
- unsigned bitcount = boost::multiprecision::backends::eval_msb_imp(val.backend()) + 1;
- unsigned chunks = bitcount / chunk_size;
- if(bitcount % chunk_size)
- ++chunks;
-
- int bit_location = msv_first ? bitcount - chunk_size : 0;
- int bit_step = msv_first ? -static_cast<int>(chunk_size) : chunk_size;
- while(bit_location % bit_step) ++bit_location;
-
- do
- {
- *out = detail::extract_bits(val.backend(), bit_location, chunk_size, tag_type());
- ++out;
- bit_location += bit_step;
- } while((bit_location >= 0) && (bit_location < (int)bitcount));
-
- return out;
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
- }
-
- }
-}
-
-
-
-#endif // BOOST_MP_CPP_INT_IMPORT_EXPORT_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/multiply.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/multiply.hpp
deleted file mode 100644
index 151b2294c75..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/multiply.hpp
+++ /dev/null
@@ -1,498 +0,0 @@
-///////////////////////////////////////////////////////////////
-// Copyright 2012 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
-//
-// Comparison operators for cpp_int_backend:
-//
-#ifndef BOOST_MP_CPP_INT_MUL_HPP
-#define BOOST_MP_CPP_INT_MUL_HPP
-
-namespace boost{ namespace multiprecision{ namespace backends{
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable:4127) // conditional expression is constant
-#endif
-
- template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
- const limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- if(!val)
- {
- result = static_cast<limb_type>(0);
- return;
- }
- if((void*)&a != (void*)&result)
- result.resize(a.size(), a.size());
- double_limb_type carry = 0;
- typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer p = result.limbs();
- typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer pe = result.limbs() + result.size();
- typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::const_limb_pointer pa = a.limbs();
- while(p != pe)
- {
- carry += static_cast<double_limb_type>(*pa) * static_cast<double_limb_type>(val);
-#ifdef __MSVC_RUNTIME_CHECKS
- *p = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
-#else
- *p = static_cast<limb_type>(carry);
-#endif
- carry >>= cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits;
- ++p, ++pa;
- }
- if(carry)
- {
- unsigned i = result.size();
- result.resize(i + 1, i + 1);
- if(result.size() > i)
- result.limbs()[i] = static_cast<limb_type>(carry);
- }
- result.sign(a.sign());
- if(!cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::variable)
- result.normalize();
-}
-
-//
-// resize_for_carry forces a resize of the underlying buffer only if a previous request
-// for "required" elements could possibly have failed, *and* we have checking enabled.
-// This will cause an overflow error inside resize():
-//
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-inline void resize_for_carry(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& /*result*/, unsigned /*required*/){}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, class Allocator1>
-inline void resize_for_carry(cpp_int_backend<MinBits1, MaxBits1, SignType1, checked, Allocator1>& result, unsigned required)
-{
- if(result.size() < required)
- result.resize(required, required);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3, unsigned MaxBits3, cpp_integer_type SignType3, cpp_int_check_type Checked3, class Allocator3>
-inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3> >::value >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
- const cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>& b) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- // Very simple long multiplication, only usable for small numbers of limb_type's
- // but that's the typical use case for this type anyway:
- //
- // Special cases first:
- //
- unsigned as = a.size();
- unsigned bs = b.size();
- typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::const_limb_pointer pa = a.limbs();
- typename cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>::const_limb_pointer pb = b.limbs();
- if(as == 1)
- {
- bool s = b.sign() != a.sign();
- if(bs == 1)
- {
- result = static_cast<double_limb_type>(*pa) * static_cast<double_limb_type>(*pb);
- }
- else
- {
- limb_type l = *pa;
- eval_multiply(result, b, l);
- }
- result.sign(s);
- return;
- }
- if(bs == 1)
- {
- bool s = b.sign() != a.sign();
- limb_type l = *pb;
- eval_multiply(result, a, l);
- result.sign(s);
- return;
- }
-
- if((void*)&result == (void*)&a)
- {
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(a);
- eval_multiply(result, t, b);
- return;
- }
- if((void*)&result == (void*)&b)
- {
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(b);
- eval_multiply(result, a, t);
- return;
- }
-
- result.resize(as + bs, as + bs - 1);
- typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer pr = result.limbs();
-
- static const double_limb_type limb_max = ~static_cast<limb_type>(0u);
- static const double_limb_type double_limb_max = ~static_cast<double_limb_type>(0u);
- BOOST_STATIC_ASSERT(double_limb_max - 2 * limb_max >= limb_max * limb_max);
-
- double_limb_type carry = 0;
- std::memset(pr, 0, result.size() * sizeof(limb_type));
- for(unsigned i = 0; i < as; ++i)
- {
- unsigned inner_limit = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::variable ? bs : (std::min)(result.size() - i, bs);
- unsigned j;
- for(j = 0; j < inner_limit; ++j)
- {
- BOOST_ASSERT(i+j < result.size());
-#if (!defined(__GLIBCXX__) && !defined(__GLIBCPP__)) || !BOOST_WORKAROUND(BOOST_GCC_VERSION, <= 50100)
- BOOST_ASSERT(!std::numeric_limits<double_limb_type>::is_specialized
- || ((std::numeric_limits<double_limb_type>::max)() - carry
- >
- static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value) * static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value)));
-#endif
- carry += static_cast<double_limb_type>(pa[i]) * static_cast<double_limb_type>(pb[j]);
- BOOST_ASSERT(!std::numeric_limits<double_limb_type>::is_specialized || ((std::numeric_limits<double_limb_type>::max)() - carry >= pr[i+j]));
- carry += pr[i + j];
-#ifdef __MSVC_RUNTIME_CHECKS
- pr[i + j] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
-#else
- pr[i + j] = static_cast<limb_type>(carry);
-#endif
- carry >>= cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits;
- BOOST_ASSERT(carry <= (cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value));
- }
- if(carry)
- {
- resize_for_carry(result, i + j + 1); // May throw if checking is enabled
- if(i + j < result.size())
-#ifdef __MSVC_RUNTIME_CHECKS
- pr[i + j] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
-#else
- pr[i + j] = static_cast<limb_type>(carry);
-#endif
- }
- carry = 0;
- }
- result.normalize();
- //
- // Set the sign of the result:
- //
- result.sign(a.sign() != b.sign());
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- eval_multiply(result, result, a);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
- eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- eval_multiply(result, result, val);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
- const double_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- if(val <= (std::numeric_limits<limb_type>::max)())
- {
- eval_multiply(result, a, static_cast<limb_type>(val));
- }
- else
- {
-#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(val);
-#else
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t;
- t = val;
-#endif
- eval_multiply(result, a, t);
- }
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
- eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const double_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- eval_multiply(result, result, val);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
- const signed_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- if(val > 0)
- eval_multiply(result, a, static_cast<limb_type>(val));
- else
- {
- eval_multiply(result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(val)));
- result.negate();
- }
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
- eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const signed_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- eval_multiply(result, result, val);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
- const signed_double_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- if(val > 0)
- {
- if(val <= (std::numeric_limits<limb_type>::max)())
- {
- eval_multiply(result, a, static_cast<limb_type>(val));
- return;
- }
- }
- else if(val >= -static_cast<signed_double_limb_type>((std::numeric_limits<limb_type>::max)()))
- {
- eval_multiply(result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(val)));
- result.negate();
- return;
- }
-#if defined(BOOST_LITTLE_ENDIAN) && !defined(BOOST_MP_TEST_NO_LE)
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(val);
-#else
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t;
- t = val;
-#endif
- eval_multiply(result, a, t);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
- eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const signed_double_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- eval_multiply(result, result, val);
-}
-
-//
-// Now over again for trivial cpp_int's:
-//
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value)
- >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- *result.limbs() = detail::checked_multiply(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- result.sign(result.sign() != o.sign());
- result.normalize();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- *result.limbs() = detail::checked_multiply(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- result.normalize();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value)
- >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a,
- const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- *result.limbs() = detail::checked_multiply(*a.limbs(), *b.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- result.sign(a.sign() != b.sign());
- result.normalize();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<
- is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a,
- const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
-{
- *result.limbs() = detail::checked_multiply(*a.limbs(), *b.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
- result.normalize();
-}
-
-//
-// Special routines for multiplying two integers to obtain a multiprecision result:
-//
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<
- !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- signed_double_limb_type a, signed_double_limb_type b)
-{
- static const signed_double_limb_type mask = ~static_cast<limb_type>(0);
- static const unsigned limb_bits = sizeof(limb_type) * CHAR_BIT;
- bool s = false;
- double_limb_type w, x, y, z;
- if(a < 0)
- {
- a = -a;
- s = true;
- }
- if(b < 0)
- {
- b = -b;
- s = !s;
- }
- w = a & mask;
- x = a >> limb_bits;
- y = b & mask;
- z = b >> limb_bits;
-
- result.resize(4, 4);
- limb_type* pr = result.limbs();
-
- double_limb_type carry = w * y;
-#ifdef __MSVC_RUNTIME_CHECKS
- pr[0] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
- carry >>= limb_bits;
- carry += w * z + x * y;
- pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
- carry >>= limb_bits;
- carry += x * z;
- pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
- pr[3] = static_cast<limb_type>(carry >> limb_bits);
-#else
- pr[0] = static_cast<limb_type>(carry);
- carry >>= limb_bits;
- carry += w * z + x * y;
- pr[1] = static_cast<limb_type>(carry);
- carry >>= limb_bits;
- carry += x * z;
- pr[2] = static_cast<limb_type>(carry);
- pr[3] = static_cast<limb_type>(carry >> limb_bits);
-#endif
- result.sign(s);
- result.normalize();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
-BOOST_MP_FORCEINLINE typename enable_if_c<
- !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- double_limb_type a, double_limb_type b)
-{
- static const signed_double_limb_type mask = ~static_cast<limb_type>(0);
- static const unsigned limb_bits = sizeof(limb_type) * CHAR_BIT;
-
- double_limb_type w, x, y, z;
- w = a & mask;
- x = a >> limb_bits;
- y = b & mask;
- z = b >> limb_bits;
-
- result.resize(4, 4);
- limb_type* pr = result.limbs();
-
- double_limb_type carry = w * y;
-#ifdef __MSVC_RUNTIME_CHECKS
- pr[0] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
- carry >>= limb_bits;
- carry += w * z;
- pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
- carry >>= limb_bits;
- pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
- carry = x * y + pr[1];
- pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
- carry >>= limb_bits;
- carry += pr[2] + x * z;
- pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
- pr[3] = static_cast<limb_type>(carry >> limb_bits);
-#else
- pr[0] = static_cast<limb_type>(carry);
- carry >>= limb_bits;
- carry += w * z;
- pr[1] = static_cast<limb_type>(carry);
- carry >>= limb_bits;
- pr[2] = static_cast<limb_type>(carry);
- carry = x * y + pr[1];
- pr[1] = static_cast<limb_type>(carry);
- carry >>= limb_bits;
- carry += pr[2] + x * z;
- pr[2] = static_cast<limb_type>(carry);
- pr[3] = static_cast<limb_type>(carry >> limb_bits);
-#endif
- result.sign(false);
- result.normalize();
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1,
- unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
-BOOST_MP_FORCEINLINE typename enable_if_c<
- !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
- >::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> const& a,
- cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> const& b)
-{
- typedef typename boost::multiprecision::detail::canonical<typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::local_limb_type, cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::type canonical_type;
- eval_multiply(result, static_cast<canonical_type>(*a.limbs()), static_cast<canonical_type>(*b.limbs()));
- result.sign(a.sign() != b.sign());
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class SI>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_signed<SI>::value && (sizeof(SI) <= sizeof(signed_double_limb_type) / 2)>::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- SI a, SI b)
-{
- result = static_cast<signed_double_limb_type>(a) * static_cast<signed_double_limb_type>(b);
-}
-
-template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class UI>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_unsigned<UI>::value && (sizeof(UI) <= sizeof(signed_double_limb_type) / 2)>::type
- eval_multiply(
- cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
- UI a, UI b)
-{
- result = static_cast<double_limb_type>(a) * static_cast<double_limb_type>(b);
-}
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-
-}}} // namespaces
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/bitscan.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/detail/bitscan.hpp
deleted file mode 100644
index d7e39370bde..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/bitscan.hpp
+++ /dev/null
@@ -1,265 +0,0 @@
-///////////////////////////////////////////////////////////////
-// Copyright 2013 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
-//
-// Comparison operators for cpp_int_backend:
-//
-#ifndef BOOST_MP_DETAIL_BITSCAN_HPP
-#define BOOST_MP_DETAIL_BITSCAN_HPP
-
-#include <boost/detail/endian.hpp>
-#include <boost/cstdint.hpp>
-
-#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
-#include <intrin.h>
-#endif
-
-namespace boost{ namespace multiprecision{ namespace detail{
-
-template <class Unsigned>
-inline unsigned find_lsb(Unsigned mask, const mpl::int_<0>&)
-{
- unsigned result = 0;
- while(!(mask & 1u))
- {
- mask >>= 1;
- ++result;
- }
- return result;
-}
-
-template <class Unsigned>
-inline unsigned find_msb(Unsigned mask, const mpl::int_<0>&)
-{
- unsigned index = 0;
- while(mask)
- {
- ++index;
- mask >>= 1;
- }
- return --index;
-}
-
-#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
-
-#pragma intrinsic(_BitScanForward,_BitScanReverse)
-
-BOOST_FORCEINLINE unsigned find_lsb(unsigned long mask, const mpl::int_<1>&)
-{
- unsigned long result;
- _BitScanForward(&result, mask);
- return result;
-}
-
-BOOST_FORCEINLINE unsigned find_msb(unsigned long mask, const mpl::int_<1>&)
-{
- unsigned long result;
- _BitScanReverse(&result, mask);
- return result;
-}
-#ifdef _M_X64
-
-#pragma intrinsic(_BitScanForward64,_BitScanReverse64)
-
-BOOST_FORCEINLINE unsigned find_lsb(unsigned __int64 mask, const mpl::int_<2>&)
-{
- unsigned long result;
- _BitScanForward64(&result, mask);
- return result;
-}
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_msb(Unsigned mask, const mpl::int_<2>&)
-{
- unsigned long result;
- _BitScanReverse64(&result, mask);
- return result;
-}
-#endif
-
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
-{
- typedef typename make_unsigned<Unsigned>::type ui_type;
- typedef typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(unsigned long),
- mpl::int_<1>,
-#ifdef _M_X64
- typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(__int64),
- mpl::int_<2>,
- mpl::int_<0>
- >::type
-#else
- mpl::int_<0>
-#endif
- >::type tag_type;
- return find_lsb(static_cast<ui_type>(mask), tag_type());
-}
-
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
-{
- typedef typename make_unsigned<Unsigned>::type ui_type;
- typedef typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(unsigned long),
- mpl::int_<1>,
-#ifdef _M_X64
- typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(__int64),
- mpl::int_<2>,
- mpl::int_<0>
- >::type
-#else
- mpl::int_<0>
-#endif
- >::type tag_type;
- return find_msb(static_cast<ui_type>(mask), tag_type());
-}
-
-#elif defined(BOOST_GCC) || defined(__clang__) || (defined(BOOST_INTEL) && defined(__GNUC__))
-
-BOOST_FORCEINLINE unsigned find_lsb(unsigned mask, mpl::int_<1> const&)
-{
- return __builtin_ctz(mask);
-}
-BOOST_FORCEINLINE unsigned find_lsb(unsigned long mask, mpl::int_<2> const&)
-{
- return __builtin_ctzl(mask);
-}
-BOOST_FORCEINLINE unsigned find_lsb(boost::ulong_long_type mask, mpl::int_<3> const&)
-{
- return __builtin_ctzll(mask);
-}
-BOOST_FORCEINLINE unsigned find_msb(unsigned mask, mpl::int_<1> const&)
-{
- return sizeof(unsigned) * CHAR_BIT - 1 - __builtin_clz(mask);
-}
-BOOST_FORCEINLINE unsigned find_msb(unsigned long mask, mpl::int_<2> const&)
-{
- return sizeof(unsigned long) * CHAR_BIT - 1 - __builtin_clzl(mask);
-}
-BOOST_FORCEINLINE unsigned find_msb(boost::ulong_long_type mask, mpl::int_<3> const&)
-{
- return sizeof(boost::ulong_long_type) * CHAR_BIT - 1 - __builtin_clzll(mask);
-}
-#ifdef BOOST_HAS_INT128
-
-__extension__ typedef unsigned __int128 uint128_type;
-
-BOOST_FORCEINLINE unsigned find_msb(uint128_type mask, mpl::int_<0> const&)
-{
- union { uint128_type v; boost::uint64_t sv[2]; } val;
- val.v = mask;
-#ifdef BOOST_LITTLE_ENDIAN
- if(val.sv[1])
- return find_msb(val.sv[1], mpl::int_<3>()) + 64;
- return find_msb(val.sv[0], mpl::int_<3>());
-#else
- if(val.sv[0])
- return find_msb(val.sv[0], mpl::int_<3>()) + 64;
- return find_msb(val.sv[1], mpl::int_<3>());
-#endif
-}
-BOOST_FORCEINLINE unsigned find_lsb(uint128_type mask, mpl::int_<0> const&)
-{
- union { uint128_type v; boost::uint64_t sv[2]; } val;
- val.v = mask;
-#ifdef BOOST_LITTLE_ENDIAN
- if(val.sv[0] == 0)
- return find_lsb(val.sv[1], mpl::int_<3>()) + 64;
- return find_lsb(val.sv[0], mpl::int_<3>());
-#else
- if(val.sv[1] == 0)
- return find_lsb(val.sv[0], mpl::int_<3>()) + 64;
- return find_lsb(val.sv[1], mpl::int_<3>());
-#endif
-}
-#endif
-
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
-{
- typedef typename make_unsigned<Unsigned>::type ui_type;
- typedef typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(unsigned),
- mpl::int_<1>,
- typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(unsigned long),
- mpl::int_<2>,
- typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(boost::ulong_long_type),
- mpl::int_<3>,
- mpl::int_<0>
- >::type
- >::type
- >::type tag_type;
- return find_lsb(static_cast<ui_type>(mask), tag_type());
-}
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
-{
- typedef typename make_unsigned<Unsigned>::type ui_type;
- typedef typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(unsigned),
- mpl::int_<1>,
- typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(unsigned long),
- mpl::int_<2>,
- typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(boost::ulong_long_type),
- mpl::int_<3>,
- mpl::int_<0>
- >::type
- >::type
- >::type tag_type;
- return find_msb(static_cast<ui_type>(mask), tag_type());
-}
-#elif defined(BOOST_INTEL)
-BOOST_FORCEINLINE unsigned find_lsb(unsigned mask, mpl::int_<1> const&)
-{
- return _bit_scan_forward(mask);
-}
-BOOST_FORCEINLINE unsigned find_msb(unsigned mask, mpl::int_<1> const&)
-{
- return _bit_scan_reverse(mask);
-}
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
-{
- typedef typename make_unsigned<Unsigned>::type ui_type;
- typedef typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(unsigned),
- mpl::int_<1>,
- mpl::int_<0>
- >::type tag_type;
- return find_lsb(static_cast<ui_type>(mask), tag_type());
-}
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
-{
- typedef typename make_unsigned<Unsigned>::type ui_type;
- typedef typename mpl::if_c<
- sizeof(Unsigned) <= sizeof(unsigned),
- mpl::int_<1>,
- mpl::int_<0>
- >::type tag_type;
- return find_msb(static_cast<ui_type>(mask), tag_type());
-}
-#else
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
-{
- return find_lsb(mask, mpl::int_<0>());
-}
-template <class Unsigned>
-BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
-{
- return find_msb(mask, mpl::int_<0>());
-}
-#endif
-
-}}}
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/default_ops.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/detail/default_ops.hpp
deleted file mode 100644
index 07fb02b8a02..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/default_ops.hpp
+++ /dev/null
@@ -1,3743 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Copyright 2011 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_BIG_NUM_DEF_OPS
-#define BOOST_MATH_BIG_NUM_DEF_OPS
-
-#include <boost/math/policies/error_handling.hpp>
-#include <boost/multiprecision/detail/number_base.hpp>
-#include <boost/math/special_functions/fpclassify.hpp>
-#include <boost/math/special_functions/next.hpp>
-#include <boost/math/special_functions/hypot.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/mpl/front.hpp>
-#include <boost/mpl/fold.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/type_traits/make_unsigned.hpp>
-
-#ifndef INSTRUMENT_BACKEND
-#ifndef BOOST_MP_INSTRUMENT
-#define INSTRUMENT_BACKEND(x)
-#else
-#define INSTRUMENT_BACKEND(x)\
- std::cout << BOOST_STRINGIZE(x) << " = " << x.str(0, std::ios_base::scientific) << std::endl;
-#endif
-#endif
-
-
-namespace boost{ namespace multiprecision{
-
- namespace detail {
-
- template <class T>
- struct is_backend;
-
- template <class To, class From>
- void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
- template <class To, class From>
- void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_integer>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
- template <class To, class From>
- void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& /*to_type*/, const mpl::int_<number_kind_floating_point>& /*from_type*/);
- template <class To, class From>
- void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& /*to_type*/, const mpl::int_<number_kind_rational>& /*from_type*/);
- template <class To, class From>
- void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
-
-}
-
-namespace default_ops{
-
-#ifdef BOOST_MSVC
-// warning C4127: conditional expression is constant
-// warning C4146: unary minus operator applied to unsigned type, result still unsigned
-#pragma warning(push)
-#pragma warning(disable:4127 4146)
-#endif
-//
-// Default versions of mixed arithmetic, these just construct a temporary
-// from the arithmetic value and then do the arithmetic on that, two versions
-// of each depending on whether the backend can be directly constructed from type V.
-//
-// Note that we have to provide *all* the template parameters to class number when used in
-// enable_if as MSVC-10 won't compile the code if we rely on a computed-default parameter.
-// Since the result of the test doesn't depend on whether expression templates are on or off
-// we just use et_on everywhere. We could use a BOOST_WORKAROUND but that just obfuscates the
-// code even more....
-//
-template <class T, class V>
-inline typename disable_if_c<is_convertible<V, T>::value >::type
- eval_add(T& result, V const& v)
-{
- T t;
- t = v;
- eval_add(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, T>::value >::type
- eval_add(T& result, V const& v)
-{
- T t(v);
- eval_add(result, t);
-}
-template <class T, class V>
-inline typename disable_if_c<is_convertible<V, T>::value>::type
- eval_subtract(T& result, V const& v)
-{
- T t;
- t = v;
- eval_subtract(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, T>::value>::type
- eval_subtract(T& result, V const& v)
-{
- T t(v);
- eval_subtract(result, t);
-}
-template <class T, class V>
-inline typename disable_if_c<is_convertible<V, T>::value>::type
- eval_multiply(T& result, V const& v)
-{
- T t;
- t = v;
- eval_multiply(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, T>::value>::type
- eval_multiply(T& result, V const& v)
-{
- T t(v);
- eval_multiply(result, t);
-}
-
-template <class T, class U, class V>
-void eval_multiply(T& t, const U& u, const V& v);
-
-template <class T, class U, class V>
-inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v)
-{
- T z;
- eval_multiply(z, u, v);
- eval_add(t, z);
-}
-template <class T, class U, class V>
-inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v)
-{
- eval_multiply_add(t, v, u);
-}
-template <class T, class U, class V>
-inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v)
-{
- T z;
- eval_multiply(z, u, v);
- eval_subtract(t, z);
-}
-template <class T, class U, class V>
-inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v)
-{
- eval_multiply_subtract(t, v, u);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
- eval_divide(T& result, V const& v)
-{
- T t;
- t = v;
- eval_divide(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
- eval_divide(T& result, V const& v)
-{
- T t(v);
- eval_divide(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
- eval_modulus(T& result, V const& v)
-{
- T t;
- t = v;
- eval_modulus(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value&& is_convertible<V, T>::value>::type
- eval_modulus(T& result, V const& v)
-{
- T t(v);
- eval_modulus(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
- eval_bitwise_and(T& result, V const& v)
-{
- T t;
- t = v;
- eval_bitwise_and(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
- eval_bitwise_and(T& result, V const& v)
-{
- T t(v);
- eval_bitwise_and(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
- eval_bitwise_or(T& result, V const& v)
-{
- T t;
- t = v;
- eval_bitwise_or(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
- eval_bitwise_or(T& result, V const& v)
-{
- T t(v);
- eval_bitwise_or(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
- eval_bitwise_xor(T& result, V const& v)
-{
- T t;
- t = v;
- eval_bitwise_xor(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
- eval_bitwise_xor(T& result, V const& v)
-{
- T t(v);
- eval_bitwise_xor(result, t);
-}
-
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
- eval_complement(T& result, V const& v)
-{
- T t;
- t = v;
- eval_complement(result, t);
-}
-template <class T, class V>
-inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
- eval_complement(T& result, V const& v)
-{
- T t(v);
- eval_complement(result, t);
-}
-
-//
-// Default versions of 3-arg arithmetic functions, these mostly just forward to the 2 arg versions:
-//
-template <class T, class U, class V>
-void eval_add(T& t, const U& u, const V& v);
-
-template <class T>
-inline void eval_add_default(T& t, const T& u, const T& v)
-{
- if(&t == &v)
- {
- eval_add(t, u);
- }
- else if(&t == &u)
- {
- eval_add(t, v);
- }
- else
- {
- t = u;
- eval_add(t, v);
- }
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_add_default(T& t, const T& u, const U& v)
-{
- T vv;
- vv = v;
- eval_add(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_add_default(T& t, const T& u, const U& v)
-{
- T vv(v);
- eval_add(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_add_default(T& t, const U& u, const T& v)
-{
- eval_add(t, v, u);
-}
-template <class T, class U, class V>
-inline void eval_add_default(T& t, const U& u, const V& v)
-{
- if(is_same<T, V>::value && ((void*)&t == (void*)&v))
- {
- eval_add(t, u);
- }
- else
- {
- t = u;
- eval_add(t, v);
- }
-}
-template <class T, class U, class V>
-inline void eval_add(T& t, const U& u, const V& v)
-{
- eval_add_default(t, u, v);
-}
-
-template <class T, class U, class V>
-void eval_subtract(T& t, const U& u, const V& v);
-
-template <class T>
-inline void eval_subtract_default(T& t, const T& u, const T& v)
-{
- if((&t == &v) && is_signed_number<T>::value)
- {
- eval_subtract(t, u);
- t.negate();
- }
- else if(&t == &u)
- {
- eval_subtract(t, v);
- }
- else
- {
- t = u;
- eval_subtract(t, v);
- }
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_subtract_default(T& t, const T& u, const U& v)
-{
- T vv;
- vv = v;
- eval_subtract(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_subtract_default(T& t, const T& u, const U& v)
-{
- T vv(v);
- eval_subtract(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_signed_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
-{
- eval_subtract(t, v, u);
- t.negate();
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
-{
- T temp;
- temp = u;
- eval_subtract(t, temp, v);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
-{
- T temp(u);
- eval_subtract(t, temp, v);
-}
-template <class T, class U, class V>
-inline void eval_subtract_default(T& t, const U& u, const V& v)
-{
- if(is_same<T, V>::value && ((void*)&t == (void*)&v))
- {
- eval_subtract(t, u);
- t.negate();
- }
- else
- {
- t = u;
- eval_subtract(t, v);
- }
-}
-template <class T, class U, class V>
-inline void eval_subtract(T& t, const U& u, const V& v)
-{
- eval_subtract_default(t, u, v);
-}
-
-template <class T>
-inline void eval_multiply_default(T& t, const T& u, const T& v)
-{
- if(&t == &v)
- {
- eval_multiply(t, u);
- }
- else if(&t == &u)
- {
- eval_multiply(t, v);
- }
- else
- {
- t = u;
- eval_multiply(t, v);
- }
-}
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_multiply_default(T& t, const T& u, const U& v)
-{
- T vv;
- vv = v;
- eval_multiply(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_multiply_default(T& t, const T& u, const U& v)
-{
- T vv(v);
- eval_multiply(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_multiply_default(T& t, const U& u, const T& v)
-{
- eval_multiply(t, v, u);
-}
-#endif
-template <class T, class U, class V>
-inline void eval_multiply_default(T& t, const U& u, const V& v)
-{
- if(is_same<T, V>::value && ((void*)&t == (void*)&v))
- {
- eval_multiply(t, u);
- }
- else
- {
- t = number<T>::canonical_value(u);
- eval_multiply(t, v);
- }
-}
-template <class T, class U, class V>
-inline void eval_multiply(T& t, const U& u, const V& v)
-{
- eval_multiply_default(t, u, v);
-}
-
-template <class T>
-inline void eval_multiply_add(T& t, const T& u, const T& v, const T& x)
-{
- if((void*)&x == (void*)&t)
- {
- T z;
- z = number<T>::canonical_value(x);
- eval_multiply_add(t, u, v, z);
- }
- else
- {
- eval_multiply(t, u, v);
- eval_add(t, x);
- }
-}
-
-template <class T, class U>
-inline typename boost::disable_if_c<boost::is_same<T, U>::value, T>::type make_T(const U& u)
-{
- T t;
- t = number<T>::canonical_value(u);
- return BOOST_MP_MOVE(t);
-}
-template <class T>
-inline const T& make_T(const T& t)
-{
- return t;
-}
-
-template <class T, class U, class V, class X>
-inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v, const X& x)
-{
- eval_multiply_add(t, make_T<T>(u), make_T<T>(v), make_T<T>(x));
-}
-template <class T, class U, class V, class X>
-inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v, const X& x)
-{
- eval_multiply_add(t, v, u, x);
-}
-template <class T, class U, class V, class X>
-inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v, const X& x)
-{
- if((void*)&x == (void*)&t)
- {
- T z;
- z = x;
- eval_multiply_subtract(t, u, v, z);
- }
- else
- {
- eval_multiply(t, u, v);
- eval_subtract(t, x);
- }
-}
-template <class T, class U, class V, class X>
-inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v, const X& x)
-{
- eval_multiply_subtract(t, v, u, x);
-}
-
-template <class T, class U, class V>
-void eval_divide(T& t, const U& u, const V& v);
-
-template <class T>
-inline void eval_divide_default(T& t, const T& u, const T& v)
-{
- if(&t == &u)
- eval_divide(t, v);
- else if(&t == &v)
- {
- T temp;
- eval_divide(temp, u, v);
- temp.swap(t);
- }
- else
- {
- t = u;
- eval_divide(t, v);
- }
-}
-#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_divide_default(T& t, const T& u, const U& v)
-{
- T vv;
- vv = v;
- eval_divide(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_divide_default(T& t, const T& u, const U& v)
-{
- T vv(v);
- eval_divide(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_divide_default(T& t, const U& u, const T& v)
-{
- T uu;
- uu = u;
- eval_divide(t, uu, v);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_divide_default(T& t, const U& u, const T& v)
-{
- T uu(u);
- eval_divide(t, uu, v);
-}
-#endif
-template <class T, class U, class V>
-inline void eval_divide_default(T& t, const U& u, const V& v)
-{
- if(is_same<T, V>::value && ((void*)&t == (void*)&v))
- {
- T temp;
- temp = u;
- eval_divide(temp, v);
- t = temp;
- }
- else
- {
- t = u;
- eval_divide(t, v);
- }
-}
-template <class T, class U, class V>
-inline void eval_divide(T& t, const U& u, const V& v)
-{
- eval_divide_default(t, u, v);
-}
-
-template <class T, class U, class V>
-void eval_modulus(T& t, const U& u, const V& v);
-
-template <class T>
-inline void eval_modulus_default(T& t, const T& u, const T& v)
-{
- if(&t == &u)
- eval_modulus(t, v);
- else if(&t == &v)
- {
- T temp;
- eval_modulus(temp, u, v);
- temp.swap(t);
- }
- else
- {
- t = u;
- eval_modulus(t, v);
- }
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_modulus_default(T& t, const T& u, const U& v)
-{
- T vv;
- vv = v;
- eval_modulus(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_modulus_default(T& t, const T& u, const U& v)
-{
- T vv(v);
- eval_modulus(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_modulus_default(T& t, const U& u, const T& v)
-{
- T uu;
- uu = u;
- eval_modulus(t, uu, v);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_modulus_default(T& t, const U& u, const T& v)
-{
- T uu(u);
- eval_modulus(t, uu, v);
-}
-template <class T, class U, class V>
-inline void eval_modulus_default(T& t, const U& u, const V& v)
-{
- if(is_same<T, V>::value && ((void*)&t == (void*)&v))
- {
- T temp(u);
- eval_modulus(temp, v);
- t = temp;
- }
- else
- {
- t = u;
- eval_modulus(t, v);
- }
-}
-template <class T, class U, class V>
-inline void eval_modulus(T& t, const U& u, const V& v)
-{
- eval_modulus_default(t, u, v);
-}
-
-template <class T, class U, class V>
-void eval_bitwise_and(T& t, const U& u, const V& v);
-
-template <class T>
-inline void eval_bitwise_and_default(T& t, const T& u, const T& v)
-{
- if(&t == &v)
- {
- eval_bitwise_and(t, u);
- }
- else if(&t == &u)
- {
- eval_bitwise_and(t, v);
- }
- else
- {
- t = u;
- eval_bitwise_and(t, v);
- }
-}
-template <class T, class U>
-inline typename disable_if_c<is_convertible<U, T>::value>::type eval_bitwise_and_default(T& t, const T& u, const U& v)
-{
- T vv;
- vv = v;
- eval_bitwise_and(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, T>::value>::type eval_bitwise_and_default(T& t, const T& u, const U& v)
-{
- T vv(v);
- eval_bitwise_and(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_and_default(T& t, const U& u, const T& v)
-{
- eval_bitwise_and(t, v, u);
-}
-template <class T, class U, class V>
-inline typename disable_if_c<is_same<T, U>::value || is_same<T, V>::value>::type eval_bitwise_and_default(T& t, const U& u, const V& v)
-{
- t = u;
- eval_bitwise_and(t, v);
-}
-template <class T, class U, class V>
-inline void eval_bitwise_and(T& t, const U& u, const V& v)
-{
- eval_bitwise_and_default(t, u, v);
-}
-
-template <class T, class U, class V>
-void eval_bitwise_or(T& t, const U& u, const V& v);
-
-template <class T>
-inline void eval_bitwise_or_default(T& t, const T& u, const T& v)
-{
- if(&t == &v)
- {
- eval_bitwise_or(t, u);
- }
- else if(&t == &u)
- {
- eval_bitwise_or(t, v);
- }
- else
- {
- t = u;
- eval_bitwise_or(t, v);
- }
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_bitwise_or_default(T& t, const T& u, const U& v)
-{
- T vv;
- vv = v;
- eval_bitwise_or(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_bitwise_or_default(T& t, const T& u, const U& v)
-{
- T vv(v);
- eval_bitwise_or(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_or_default(T& t, const U& u, const T& v)
-{
- eval_bitwise_or(t, v, u);
-}
-template <class T, class U, class V>
-inline void eval_bitwise_or_default(T& t, const U& u, const V& v)
-{
- if(is_same<T, V>::value && ((void*)&t == (void*)&v))
- {
- eval_bitwise_or(t, u);
- }
- else
- {
- t = u;
- eval_bitwise_or(t, v);
- }
-}
-template <class T, class U, class V>
-inline void eval_bitwise_or(T& t, const U& u, const V& v)
-{
- eval_bitwise_or_default(t, u, v);
-}
-
-template <class T, class U, class V>
-void eval_bitwise_xor(T& t, const U& u, const V& v);
-
-template <class T>
-inline void eval_bitwise_xor_default(T& t, const T& u, const T& v)
-{
- if(&t == &v)
- {
- eval_bitwise_xor(t, u);
- }
- else if(&t == &u)
- {
- eval_bitwise_xor(t, v);
- }
- else
- {
- t = u;
- eval_bitwise_xor(t, v);
- }
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_bitwise_xor_default(T& t, const T& u, const U& v)
-{
- T vv;
- vv = v;
- eval_bitwise_xor(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_bitwise_xor_default(T& t, const T& u, const U& v)
-{
- T vv(v);
- eval_bitwise_xor(t, u, vv);
-}
-template <class T, class U>
-inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_xor_default(T& t, const U& u, const T& v)
-{
- eval_bitwise_xor(t, v, u);
-}
-template <class T, class U, class V>
-inline void eval_bitwise_xor_default(T& t, const U& u, const V& v)
-{
- if(is_same<T, V>::value && ((void*)&t == (void*)&v))
- {
- eval_bitwise_xor(t, u);
- }
- else
- {
- t = u;
- eval_bitwise_xor(t, v);
- }
-}
-template <class T, class U, class V>
-inline void eval_bitwise_xor(T& t, const U& u, const V& v)
-{
- eval_bitwise_xor_default(t, u, v);
-}
-
-template <class T>
-inline void eval_increment(T& val)
-{
- typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
- eval_add(val, static_cast<ui_type>(1u));
-}
-template <class T>
-inline void eval_decrement(T& val)
-{
- typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
- eval_subtract(val, static_cast<ui_type>(1u));
-}
-
-template <class T, class V>
-inline void eval_left_shift(T& result, const T& arg, const V val)
-{
- result = arg;
- eval_left_shift(result, val);
-}
-
-template <class T, class V>
-inline void eval_right_shift(T& result, const T& arg, const V val)
-{
- result = arg;
- eval_right_shift(result, val);
-}
-
-template <class T>
-inline bool eval_is_zero(const T& val)
-{
- typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
- return val.compare(static_cast<ui_type>(0)) == 0;
-}
-template <class T>
-inline int eval_get_sign(const T& val)
-{
- typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
- return val.compare(static_cast<ui_type>(0));
-}
-
-template <class T, class V, class U>
-inline void assign_components_imp(T& result, const V& v1, const U& v2, const mpl::int_<number_kind_rational>&)
-{
- result = v1;
- T t;
- t = v2;
- eval_divide(result, t);
-}
-
-template <class T, class V, class U, int N>
-inline void assign_components_imp(T& result, const V& v1, const U& v2, const mpl::int_<N>&)
-{
- typedef typename component_type<number<T> >::type component_number_type;
-
- component_number_type x(v1), y(v2);
- assign_components(result, x.backend(), y.backend());
-}
-
-template <class T, class V, class U>
-inline void assign_components(T& result, const V& v1, const U& v2)
-{
- return assign_components_imp(result, v1, v2, typename number_category<T>::type());
-}
-
-template <class R, int b>
-struct has_enough_bits
-{
- template <class T>
- struct type : public mpl::and_<mpl::not_<is_same<R, T> >, mpl::bool_<std::numeric_limits<T>::digits >= b> >{};
-};
-
-template <class R>
-struct terminal
-{
- terminal(const R& v) : value(v){}
- terminal(){}
- terminal& operator = (R val) { value = val; return *this; }
- R value;
- operator R()const { return value; }
-};
-
-template<class R, class B>
-struct calculate_next_larger_type
-{
- // Find which list we're looking through:
- typedef typename mpl::if_<
- is_signed<R>,
- typename B::signed_types,
- typename mpl::if_<
- is_unsigned<R>,
- typename B::unsigned_types,
- typename B::float_types
- >::type
- >::type list_type;
- // A predicate to find a type with enough bits:
- typedef typename has_enough_bits<R, std::numeric_limits<R>::digits>::template type<mpl::_> pred_type;
- // See if the last type is in the list, if so we have to start after this:
- typedef typename mpl::find_if<
- list_type,
- is_same<R, mpl::_>
- >::type start_last;
- // Where we're starting from, either the start of the sequence or the last type found:
- typedef typename mpl::if_<is_same<start_last, typename mpl::end<list_type>::type>, typename mpl::begin<list_type>::type, start_last>::type start_seq;
- // The range we're searching:
- typedef mpl::iterator_range<start_seq, typename mpl::end<list_type>::type> range;
- // Find the next type:
- typedef typename mpl::find_if<
- range,
- pred_type
- >::type iter_type;
- // Either the next type, or a "terminal" to indicate we've run out of types to search:
- typedef typename mpl::eval_if<
- is_same<typename mpl::end<list_type>::type, iter_type>,
- mpl::identity<terminal<R> >,
- mpl::deref<iter_type>
- >::type type;
-};
-
-template <class R, class T>
-inline typename boost::enable_if_c<boost::is_integral<R>::value, bool>::type check_in_range(const T& t)
-{
- // Can t fit in an R?
- if((t > 0) && std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (t > (std::numeric_limits<R>::max)()))
- return true;
- else
- return false;
-}
-
-template <class R, class B>
-inline typename boost::enable_if_c<boost::is_integral<R>::value>::type eval_convert_to(R* result, const B& backend)
-{
- typedef typename calculate_next_larger_type<R, B>::type next_type;
- next_type n;
- eval_convert_to(&n, backend);
- if(!boost::is_unsigned<R>::value && std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (n > (next_type)(std::numeric_limits<R>::max)()))
- {
- *result = (std::numeric_limits<R>::max)();
- }
- else if (std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (n < (next_type)(std::numeric_limits<R>::min)()))
- {
- *result = (std::numeric_limits<R>::min)();
- }
- else
- *result = static_cast<R>(n);
-}
-
-template <class R, class B>
-inline typename boost::disable_if_c<boost::is_integral<R>::value>::type eval_convert_to(R* result, const B& backend)
-{
- typedef typename calculate_next_larger_type<R, B>::type next_type;
- next_type n;
- eval_convert_to(&n, backend);
- if(std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && ((n > (next_type)(std::numeric_limits<R>::max)() || (n < (next_type)-(std::numeric_limits<R>::max)()) )))
- {
- *result = n > 0 ? (std::numeric_limits<R>::max)() : -(std::numeric_limits<R>::max)();
- }
- else
- *result = static_cast<R>(n);
-}
-
-template <class R, class B>
-inline void last_chance_eval_convert_to(terminal<R>* result, const B& backend, const mpl::false_&)
-{
- //
- // We ran out of types to try for the conversion, try
- // a lexical_cast and hope for the best:
- //
- if (std::numeric_limits<R>::is_integer && !std::numeric_limits<R>::is_signed && (eval_get_sign(backend) < 0))
- BOOST_THROW_EXCEPTION(std::range_error("Attempt to convert negative value to an unsigned integer results in undefined behaviour"));
- try
- {
- result->value = boost::lexical_cast<R>(backend.str(0, std::ios_base::fmtflags(0)));
- }
- catch (const bad_lexical_cast&)
- {
- if (eval_get_sign(backend) < 0)
- {
- *result = std::numeric_limits<R>::is_integer && std::numeric_limits<R>::is_signed ? (std::numeric_limits<R>::min)() : -(std::numeric_limits<R>::max)();
- }
- else
- *result = (std::numeric_limits<R>::max)();
- }
-}
-
-template <class R, class B>
-inline void last_chance_eval_convert_to(terminal<R>* result, const B& backend, const mpl::true_&)
-{
- //
- // We ran out of types to try for the conversion, try
- // a lexical_cast and hope for the best:
- //
- if (std::numeric_limits<R>::is_integer && !std::numeric_limits<R>::is_signed && (eval_get_sign(backend) < 0))
- BOOST_THROW_EXCEPTION(std::range_error("Attempt to convert negative value to an unsigned integer results in undefined behaviour"));
- try
- {
- B t(backend);
- R mask = ~static_cast<R>(0u);
- eval_bitwise_and(t, mask);
- result->value = boost::lexical_cast<R>(t.str(0, std::ios_base::fmtflags(0)));
- }
- catch (const bad_lexical_cast&)
- {
- if (eval_get_sign(backend) < 0)
- {
- *result = std::numeric_limits<R>::is_integer && std::numeric_limits<R>::is_signed ? (std::numeric_limits<R>::min)() : -(std::numeric_limits<R>::max)();
- }
- else
- *result = (std::numeric_limits<R>::max)();
- }
-}
-
-template <class R, class B>
-inline void eval_convert_to(terminal<R>* result, const B& backend)
-{
- typedef mpl::bool_<boost::is_unsigned<R>::value && number_category<B>::value == number_kind_integer> tag_type;
- last_chance_eval_convert_to(result, backend, tag_type());
-}
-
-template <class B1, class B2, expression_template_option et>
-inline void eval_convert_to(terminal<number<B1, et> >* result, const B2& backend)
-{
- //
- // We ran out of types to try for the conversion, try
- // a generic conversion and hope for the best:
- //
- boost::multiprecision::detail::generic_interconvert(result->value.backend(), backend, number_category<B1>(), number_category<B2>());
-}
-
-template <class B>
-inline void eval_convert_to(std::string* result, const B& backend)
-{
- *result = backend.str(0, std::ios_base::fmtflags(0));
-}
-
-template <class B>
-inline void eval_convert_to(std::complex<float>* result, const B& backend)
-{
- typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type;
- scalar_type re, im;
- eval_real(re.backend(), backend);
- eval_imag(im.backend(), backend);
-
- *result = std::complex<float>(re.template convert_to<float>(), im.template convert_to<float>());
-}
-
-template <class B>
-inline void eval_convert_to(std::complex<double>* result, const B& backend)
-{
- typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type;
- scalar_type re, im;
- eval_real(re.backend(), backend);
- eval_imag(im.backend(), backend);
-
- *result = std::complex<double>(re.template convert_to<double>(), im.template convert_to<double>());
-}
-
-template <class B>
-inline void eval_convert_to(std::complex<long double>* result, const B& backend)
-{
- typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type;
- scalar_type re, im;
- eval_real(re.backend(), backend);
- eval_imag(im.backend(), backend);
-
- *result = std::complex<long double>(re.template convert_to<long double>(), im.template convert_to<long double>());
-}
-
-//
-// Functions:
-//
-template <class T>
-void eval_abs(T& result, const T& arg)
-{
- typedef typename T::signed_types type_list;
- typedef typename mpl::front<type_list>::type front;
- result = arg;
- if(arg.compare(front(0)) < 0)
- result.negate();
-}
-template <class T>
-void eval_fabs(T& result, const T& arg)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The fabs function is only valid for floating point types.");
- typedef typename T::signed_types type_list;
- typedef typename mpl::front<type_list>::type front;
- result = arg;
- if(arg.compare(front(0)) < 0)
- result.negate();
-}
-
-template <class Backend>
-inline int eval_fpclassify(const Backend& arg)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_floating_point, "The fpclassify function is only valid for floating point types.");
- return eval_is_zero(arg) ? FP_ZERO : FP_NORMAL;
-}
-
-template <class T>
-inline void eval_fmod(T& result, const T& a, const T& b)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The fmod function is only valid for floating point types.");
- if((&result == &a) || (&result == &b))
- {
- T temp;
- eval_fmod(temp, a, b);
- result = temp;
- return;
- }
- switch(eval_fpclassify(a))
- {
- case FP_ZERO:
- result = a;
- return;
- case FP_INFINITE:
- case FP_NAN:
- result = std::numeric_limits<number<T> >::quiet_NaN().backend();
- errno = EDOM;
- return;
- }
- switch(eval_fpclassify(b))
- {
- case FP_ZERO:
- case FP_NAN:
- result = std::numeric_limits<number<T> >::quiet_NaN().backend();
- errno = EDOM;
- return;
- }
- T n;
- eval_divide(result, a, b);
- if(eval_get_sign(result) < 0)
- eval_ceil(n, result);
- else
- eval_floor(n, result);
- eval_multiply(n, b);
- eval_subtract(result, a, n);
-}
-template<class T, class A>
-inline typename enable_if<is_arithmetic<A>, void>::type eval_fmod(T& result, const T& x, const A& a)
-{
- typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
- typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
- cast_type c;
- c = a;
- eval_fmod(result, x, c);
-}
-
-template<class T, class A>
-inline typename enable_if<is_arithmetic<A>, void>::type eval_fmod(T& result, const A& x, const T& a)
-{
- typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
- typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
- cast_type c;
- c = x;
- eval_fmod(result, c, a);
-}
-
-template <class T>
-void eval_round(T& result, const T& a);
-
-template <class T>
-inline void eval_remquo(T& result, const T& a, const T& b, int* pi)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The remquo function is only valid for floating point types.");
- if((&result == &a) || (&result == &b))
- {
- T temp;
- eval_remquo(temp, a, b, pi);
- result = temp;
- return;
- }
- T n;
- eval_divide(result, a, b);
- eval_round(n, result);
- eval_convert_to(pi, n);
- eval_multiply(n, b);
- eval_subtract(result, a, n);
-}
-template<class T, class A>
-inline typename enable_if<is_arithmetic<A>, void>::type eval_remquo(T& result, const T& x, const A& a, int* pi)
-{
- typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
- typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
- cast_type c;
- c = a;
- eval_remquo(result, x, c, pi);
-}
-template<class T, class A>
-inline typename enable_if<is_arithmetic<A>, void>::type eval_remquo(T& result, const A& x, const T& a, int* pi)
-{
- typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
- typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
- cast_type c;
- c = x;
- eval_remquo(result, c, a, pi);
-}
-template <class T, class U, class V>
-inline void eval_remainder(T& result, const U& a, const V& b)
-{
- int i;
- eval_remquo(result, a, b, &i);
-}
-
-template <class B>
-bool eval_gt(const B& a, const B& b);
-template <class T, class U>
-bool eval_gt(const T& a, const U& b);
-template <class B>
-bool eval_lt(const B& a, const B& b);
-template <class T, class U>
-bool eval_lt(const T& a, const U& b);
-
-template<class T>
-inline void eval_fdim(T& result, const T& a, const T& b)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- static const ui_type zero = 0u;
- switch(eval_fpclassify(b))
- {
- case FP_NAN:
- case FP_INFINITE:
- result = zero;
- return;
- }
- switch(eval_fpclassify(a))
- {
- case FP_NAN:
- result = zero;
- return;
- case FP_INFINITE:
- result = a;
- return;
- }
- if(eval_gt(a, b))
- {
- eval_subtract(result, a, b);
- }
- else
- result = zero;
-}
-
-template<class T, class A>
-inline typename boost::enable_if_c<boost::is_arithmetic<A>::value>::type eval_fdim(T& result, const T& a, const A& b)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- typedef typename boost::multiprecision::detail::canonical<A, T>::type arithmetic_type;
- static const ui_type zero = 0u;
- arithmetic_type canonical_b = b;
- switch((::boost::math::fpclassify)(b))
- {
- case FP_NAN:
- case FP_INFINITE:
- result = zero;
- return;
- }
- switch(eval_fpclassify(a))
- {
- case FP_NAN:
- result = zero;
- return;
- case FP_INFINITE:
- result = a;
- return;
- }
- if(eval_gt(a, canonical_b))
- {
- eval_subtract(result, a, canonical_b);
- }
- else
- result = zero;
-}
-
-template<class T, class A>
-inline typename boost::enable_if_c<boost::is_arithmetic<A>::value>::type eval_fdim(T& result, const A& a, const T& b)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- typedef typename boost::multiprecision::detail::canonical<A, T>::type arithmetic_type;
- static const ui_type zero = 0u;
- arithmetic_type canonical_a = a;
- switch(eval_fpclassify(b))
- {
- case FP_NAN:
- case FP_INFINITE:
- result = zero;
- return;
- }
- switch((::boost::math::fpclassify)(a))
- {
- case FP_NAN:
- result = zero;
- return;
- case FP_INFINITE:
- result = std::numeric_limits<number<T> >::infinity().backend();
- return;
- }
- if(eval_gt(canonical_a, b))
- {
- eval_subtract(result, canonical_a, b);
- }
- else
- result = zero;
-}
-
-template <class T>
-inline void eval_trunc(T& result, const T& a)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The trunc function is only valid for floating point types.");
- switch(eval_fpclassify(a))
- {
- case FP_NAN:
- errno = EDOM;
- // fallthrough...
- case FP_ZERO:
- case FP_INFINITE:
- result = a;
- return;
- }
- if(eval_get_sign(a) < 0)
- eval_ceil(result, a);
- else
- eval_floor(result, a);
-}
-
-template <class T>
-inline void eval_modf(T& result, T const& arg, T* pipart)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- int c = eval_fpclassify(arg);
- if(c == (int)FP_NAN)
- {
- if(pipart)
- *pipart = arg;
- result = arg;
- return;
- }
- else if(c == (int)FP_INFINITE)
- {
- if(pipart)
- *pipart = arg;
- result = ui_type(0u);
- return;
- }
- if(pipart)
- {
- eval_trunc(*pipart, arg);
- eval_subtract(result, arg, *pipart);
- }
- else
- {
- T ipart;
- eval_trunc(ipart, arg);
- eval_subtract(result, arg, ipart);
- }
-}
-
-template <class T>
-inline void eval_round(T& result, const T& a)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The round function is only valid for floating point types.");
- typedef typename boost::multiprecision::detail::canonical<float, T>::type fp_type;
- int c = eval_fpclassify(a);
- if(c == (int)FP_NAN)
- {
- result = a;
- errno = EDOM;
- return;
- }
- if((c == FP_ZERO) || (c == (int)FP_INFINITE))
- {
- result = a;
- }
- else if(eval_get_sign(a) < 0)
- {
- eval_subtract(result, a, fp_type(0.5f));
- eval_ceil(result, result);
- }
- else
- {
- eval_add(result, a, fp_type(0.5f));
- eval_floor(result, result);
- }
-}
-
-template <class B>
-void eval_lcm(B& result, const B& a, const B& b);
-template <class B>
-void eval_gcd(B& result, const B& a, const B& b);
-
-template <class T, class Arithmetic>
-inline typename enable_if<is_integral<Arithmetic> >::type eval_gcd(T& result, const T& a, const Arithmetic& b)
-{
- typedef typename boost::multiprecision::detail::canonical<Arithmetic, T>::type si_type;
- using default_ops::eval_gcd;
- T t;
- t = static_cast<si_type>(b);
- eval_gcd(result, a, t);
-}
-template <class T, class Arithmetic>
-inline typename enable_if<is_integral<Arithmetic> >::type eval_gcd(T& result, const Arithmetic& a, const T& b)
-{
- eval_gcd(result, b, a);
-}
-template <class T, class Arithmetic>
-inline typename enable_if<is_integral<Arithmetic> >::type eval_lcm(T& result, const T& a, const Arithmetic& b)
-{
- typedef typename boost::multiprecision::detail::canonical<Arithmetic, T>::type si_type;
- using default_ops::eval_lcm;
- T t;
- t = static_cast<si_type>(b);
- eval_lcm(result, a, t);
-}
-template <class T, class Arithmetic>
-inline typename enable_if<is_integral<Arithmetic> >::type eval_lcm(T& result, const Arithmetic& a, const T& b)
-{
- eval_lcm(result, b, a);
-}
-
-template <class T>
-inline unsigned eval_lsb(const T& val)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- int c = eval_get_sign(val);
- if(c == 0)
- {
- BOOST_THROW_EXCEPTION(std::range_error("No bits were set in the operand."));
- }
- if(c < 0)
- {
- BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
- }
- unsigned result = 0;
- T mask, t;
- mask = ui_type(1);
- do
- {
- eval_bitwise_and(t, mask, val);
- ++result;
- eval_left_shift(mask, 1);
- }
- while(eval_is_zero(t));
-
- return --result;
-}
-
-template <class T>
-inline int eval_msb(const T& val)
-{
- int c = eval_get_sign(val);
- if(c == 0)
- {
- BOOST_THROW_EXCEPTION(std::range_error("No bits were set in the operand."));
- }
- if(c < 0)
- {
- BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
- }
- //
- // This implementation is really really rubbish - it does
- // a linear scan for the most-significant-bit. We should really
- // do a binary search, but as none of our backends actually needs
- // this implementation, we'll leave it for now. In fact for most
- // backends it's likely that there will always be a more efficient
- // native implementation possible.
- //
- unsigned result = 0;
- T t(val);
- while(!eval_is_zero(t))
- {
- eval_right_shift(t, 1);
- ++result;
- }
- return --result;
-}
-
-template <class T>
-inline bool eval_bit_test(const T& val, unsigned index)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- T mask, t;
- mask = ui_type(1);
- eval_left_shift(mask, index);
- eval_bitwise_and(t, mask, val);
- return !eval_is_zero(t);
-}
-
-template <class T>
-inline void eval_bit_set(T& val, unsigned index)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- T mask;
- mask = ui_type(1);
- eval_left_shift(mask, index);
- eval_bitwise_or(val, mask);
-}
-
-template <class T>
-inline void eval_bit_flip(T& val, unsigned index)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- T mask;
- mask = ui_type(1);
- eval_left_shift(mask, index);
- eval_bitwise_xor(val, mask);
-}
-
-template <class T>
-inline void eval_bit_unset(T& val, unsigned index)
-{
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- T mask, t;
- mask = ui_type(1);
- eval_left_shift(mask, index);
- eval_bitwise_and(t, mask, val);
- if(!eval_is_zero(t))
- eval_bitwise_xor(val, mask);
-}
-
-template <class B>
-void eval_integer_sqrt(B& s, B& r, const B& x)
-{
- //
- // This is slow bit-by-bit integer square root, see for example
- // http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Binary_numeral_system_.28base_2.29
- // There are better methods such as http://hal.inria.fr/docs/00/07/28/54/PDF/RR-3805.pdf
- // and http://hal.inria.fr/docs/00/07/21/13/PDF/RR-4475.pdf which should be implemented
- // at some point.
- //
- typedef typename boost::multiprecision::detail::canonical<unsigned char, B>::type ui_type;
-
- s = ui_type(0u);
- if(eval_get_sign(x) == 0)
- {
- r = ui_type(0u);
- return;
- }
- int g = eval_msb(x);
- if(g <= 1)
- {
- s = ui_type(1);
- eval_subtract(r, x, s);
- return;
- }
-
- B t;
- r = x;
- g /= 2;
- int org_g = g;
- eval_bit_set(s, g);
- eval_bit_set(t, 2 * g);
- eval_subtract(r, x, t);
- --g;
- if(eval_get_sign(r) == 0)
- return;
- int msbr = eval_msb(r);
- do
- {
- if(msbr >= org_g + g + 1)
- {
- t = s;
- eval_left_shift(t, g + 1);
- eval_bit_set(t, 2 * g);
- if(t.compare(r) <= 0)
- {
- BOOST_ASSERT(g >= 0);
- eval_bit_set(s, g);
- eval_subtract(r, t);
- if(eval_get_sign(r) == 0)
- return;
- msbr = eval_msb(r);
- }
- }
- --g;
- }
- while(g >= 0);
-}
-
-template <class B>
-inline void eval_conj(B& result, const B& val)
-{
- result = val; // assume non-complex result.
-}
-template <class B>
-inline void eval_proj(B& result, const B& val)
-{
- result = val; // assume non-complex result.
-}
-
-//
-// These have to implemented by the backend, declared here so that our macro generated code compiles OK.
-//
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_floor();
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_ceil();
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_trunc();
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_sqrt();
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_ldexp();
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_frexp();
-// TODO implement default versions of these:
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_asinh();
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_acosh();
-template <class T>
-typename enable_if_c<sizeof(T) == 0>::type eval_atanh();
-
-//
-// eval_logb and eval_scalbn simply assume base 2 and forward to
-// eval_ldexp and eval_frexp:
-//
-template <class B>
-inline typename B::exponent_type eval_ilogb(const B& val)
-{
- BOOST_STATIC_ASSERT_MSG(!std::numeric_limits<number<B> >::is_specialized || (std::numeric_limits<number<B> >::radix == 2), "The default implementation of ilogb requires a base 2 number type");
- typename B::exponent_type e;
- switch(eval_fpclassify(val))
- {
- case FP_NAN:
-#ifdef FP_ILOGBNAN
- return FP_ILOGBNAN > 0 ? (std::numeric_limits<typename B::exponent_type>::max)() : (std::numeric_limits<typename B::exponent_type>::min)();
-#else
- return (std::numeric_limits<typename B::exponent_type>::max)();
-#endif
- case FP_INFINITE:
- return (std::numeric_limits<typename B::exponent_type>::max)();
- case FP_ZERO:
- return (std::numeric_limits<typename B::exponent_type>::min)();
- }
- B result;
- eval_frexp(result, val, &e);
- return e - 1;
-}
-
-template <class T>
-int eval_signbit(const T& val);
-
-template <class B>
-inline void eval_logb(B& result, const B& val)
-{
- switch(eval_fpclassify(val))
- {
- case FP_NAN:
- result = val;
- errno = EDOM;
- return;
- case FP_ZERO:
- result = std::numeric_limits<number<B> >::infinity().backend();
- result.negate();
- errno = ERANGE;
- return;
- case FP_INFINITE:
- result = val;
- if(eval_signbit(val))
- result.negate();
- return;
- }
- typedef typename boost::mpl::if_c<boost::is_same<boost::intmax_t, long>::value, boost::long_long_type, boost::intmax_t>::type max_t;
- result = static_cast<max_t>(eval_ilogb(val));
-}
-template <class B, class A>
-inline void eval_scalbn(B& result, const B& val, A e)
-{
- BOOST_STATIC_ASSERT_MSG(!std::numeric_limits<number<B> >::is_specialized || (std::numeric_limits<number<B> >::radix == 2), "The default implementation of scalbn requires a base 2 number type");
- eval_ldexp(result, val, static_cast<typename B::exponent_type>(e));
-}
-template <class B, class A>
-inline void eval_scalbln(B& result, const B& val, A e)
-{
- eval_scalbn(result, val, e);
-}
-
-template <class T>
-inline bool is_arg_nan(const T& val, mpl::true_ const&, const mpl::false_&)
-{
- return eval_fpclassify(val) == FP_NAN;
-}
-template <class T>
-inline bool is_arg_nan(const T& val, mpl::false_ const&, const mpl::true_&)
-{
- return (boost::math::isnan)(val);
-}
-template <class T>
-inline bool is_arg_nan(const T&, mpl::false_ const&, const mpl::false_&)
-{
- return false;
-}
-
-template <class T>
-inline bool is_arg_nan(const T& val)
-{
- return is_arg_nan(val, mpl::bool_<boost::multiprecision::detail::is_backend<T>::value>(), is_floating_point<T>());
-}
-
-template <class T, class U, class V>
-inline void eval_fmax(T& result, const U& a, const V& b)
-{
- if(is_arg_nan(a))
- result = number<T>::canonical_value(b);
- else if(is_arg_nan(b))
- result = number<T>::canonical_value(a);
- else if(eval_lt(number<T>::canonical_value(a), number<T>::canonical_value(b)))
- result = number<T>::canonical_value(b);
- else
- result = number<T>::canonical_value(a);
-}
-template <class T, class U, class V>
-inline void eval_fmin(T& result, const U& a, const V& b)
-{
- if(is_arg_nan(a))
- result = number<T>::canonical_value(b);
- else if(is_arg_nan(b))
- result = number<T>::canonical_value(a);
- else if(eval_lt(number<T>::canonical_value(a), number<T>::canonical_value(b)))
- result = number<T>::canonical_value(a);
- else
- result = number<T>::canonical_value(b);
-}
-
-template <class R, class T, class U>
-inline void eval_hypot(R& result, const T& a, const U& b)
-{
- //
- // Normalize x and y, so that both are positive and x >= y:
- //
- R x, y;
- x = number<R>::canonical_value(a);
- y = number<R>::canonical_value(b);
- if(eval_get_sign(x) < 0)
- x.negate();
- if(eval_get_sign(y) < 0)
- y.negate();
-
- // Special case, see C99 Annex F.
- // The order of the if's is important: do not change!
- int c1 = eval_fpclassify(x);
- int c2 = eval_fpclassify(y);
-
- if(c1 == FP_ZERO)
- {
- result = y;
- return;
- }
- if(c2 == FP_ZERO)
- {
- result = x;
- return;
- }
- if(c1 == FP_INFINITE)
- {
- result = x;
- return;
- }
- if((c2 == FP_INFINITE) || (c2 == FP_NAN))
- {
- result = y;
- return;
- }
- if(c1 == FP_NAN)
- {
- result = x;
- return;
- }
-
- if(eval_gt(y, x))
- x.swap(y);
-
- eval_multiply(result, x, std::numeric_limits<number<R> >::epsilon().backend());
-
- if(eval_gt(result, y))
- {
- result = x;
- return;
- }
-
- R rat;
- eval_divide(rat, y, x);
- eval_multiply(result, rat, rat);
- eval_increment(result);
- eval_sqrt(rat, result);
- eval_multiply(result, rat, x);
-}
-
-template <class R, class T>
-inline void eval_nearbyint(R& result, const T& a)
-{
- eval_round(result, a);
-}
-template <class R, class T>
-inline void eval_rint(R& result, const T& a)
-{
- eval_nearbyint(result, a);
-}
-
-template <class T>
-inline int eval_signbit(const T& val)
-{
- return eval_get_sign(val) < 0 ? 1 : 0;
-}
-
-//
-// Real and imaginary parts:
-//
-template <class To, class From>
-inline void eval_real(To& to, const From& from)
-{
- to = from;
-}
-template <class To, class From>
-inline void eval_imag(To& to, const From& )
-{
- typedef typename mpl::front<typename To::unsigned_types>::type ui_type;
- to = ui_type(0);
-}
-
-} namespace default_ops_adl {
-
-template <class To, class From>
-inline void eval_set_real_imp(To& to, const From& from)
-{
- typedef typename component_type<number<To> >::type to_component_type;
- typename to_component_type::backend_type to_component;
- to_component = from;
- eval_set_real(to, to_component);
-}
-template <class To, class From>
-inline void eval_set_imag_imp(To& to, const From& from)
-{
- typedef typename component_type<number<To> >::type to_component_type;
- typename to_component_type::backend_type to_component;
- to_component = from;
- eval_set_imag(to, to_component);
-}
-
-} namespace default_ops{
-
-template <class To, class From>
-inline typename enable_if_c<number_category<To>::value == number_kind_complex>::type eval_set_real(To& to, const From& from)
-{
- default_ops_adl::eval_set_real_imp(to, from);
-}
-template <class To, class From>
-inline typename disable_if_c<number_category<To>::value == number_kind_complex>::type eval_set_real(To& to, const From& from)
-{
- to = from;
-}
-
-template <class To, class From>
-inline void eval_set_imag(To& to, const From& from)
-{
- default_ops_adl::eval_set_imag_imp(to, from);
-}
-
-template <class T>
-inline void eval_set_real(T& to, const T& from)
-{
- to = from;
-}
-template <class T>
-void eval_set_imag(T&, const T&)
-{
- BOOST_STATIC_ASSERT_MSG(sizeof(T) == INT_MAX, "eval_set_imag needs to be specialised for each specific backend");
-}
-
-//
-// These functions are implemented in separate files, but expanded inline here,
-// DO NOT CHANGE THE ORDER OF THESE INCLUDES:
-//
-#include <boost/multiprecision/detail/functions/constants.hpp>
-#include <boost/multiprecision/detail/functions/pow.hpp>
-#include <boost/multiprecision/detail/functions/trig.hpp>
-
-}
-
-//
-// Default versions of floating point classification routines:
-//
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline int fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
-{
- using multiprecision::default_ops::eval_fpclassify;
- return eval_fpclassify(arg.backend());
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline int fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline bool isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
-{
- int v = fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(arg);
- return (v != (int)FP_INFINITE) && (v != (int)FP_NAN);
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline bool isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline bool isnan BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
-{
- return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(arg) == (int)FP_NAN;
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline bool isnan BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return isnan BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline bool isinf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
-{
- return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(arg) == (int)FP_INFINITE;
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline bool isinf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return isinf BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline bool isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
-{
- return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(arg) == (int)FP_NORMAL;
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline bool isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
-}
-
-// Default versions of sign manipulation functions, if individual backends can do better than this
-// (for example with signed zero), then they should overload these functions further:
-
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline int sign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
-{
- return arg.sign();
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline int sign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return sign BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
-}
-
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
-{
- using default_ops::eval_signbit;
- return eval_signbit(arg.backend());
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return signbit BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline multiprecision::number<Backend, ExpressionTemplates> changesign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
-{
- return -arg;
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type changesign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return changesign BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline multiprecision::number<Backend, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
-{
- return (boost::multiprecision::signbit)(a) != (boost::multiprecision::signbit)(b) ? (boost::multiprecision::changesign)(a) : a;
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
-inline multiprecision::number<Backend, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b)
-{
- return copysign BOOST_PREVENT_MACRO_SUBSTITUTION(a, multiprecision::number<Backend, ExpressionTemplates>(b));
-}
-template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline multiprecision::number<Backend, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
-{
- return copysign BOOST_PREVENT_MACRO_SUBSTITUTION(multiprecision::number<Backend, ExpressionTemplates>(a), b);
-}
-template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
-inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return copysign BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(a), value_type(b));
-}
-//
-// real and imag:
-//
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type
- real(const multiprecision::number<Backend, ExpressionTemplates>& a)
-{
- using default_ops::eval_real;
- typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result;
- eval_real(result.backend(), a.backend());
- return result;
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type
- imag(const multiprecision::number<Backend, ExpressionTemplates>& a)
-{
- using default_ops::eval_imag;
- typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result;
- eval_imag(result.backend(), a.backend());
- return result;
-}
-
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename scalar_result_from_possible_complex<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
- real(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return real(value_type(arg));
-}
-
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename scalar_result_from_possible_complex<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
- imag(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return imag(value_type(arg));
-}
-
-//
-// Complex number functions, these are overloaded at the Backend level, we just provide the
-// expression template versions here, plus overloads for non-complex types:
-//
-template <class T, expression_template_option ExpressionTemplates>
-inline typename boost::lazy_enable_if_c<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates> > >::type
- abs(const number<T, ExpressionTemplates>& v)
-{
- return BOOST_MP_MOVE(boost::math::hypot(real(v), imag(v)));
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename boost::lazy_enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex, component_type<typename detail::expression<tag, A1, A2, A3, A4>::result_type> >::type
- abs(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(abs(static_cast<number_type>(v)));
-}
-
-template <class T, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<T>::value == number_kind_complex, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type>::type
-arg(const number<T, ExpressionTemplates>& v)
-{
- return BOOST_MP_MOVE(atan2(imag(v), real(v)));
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type>::type
-arg(const number<T, ExpressionTemplates>&)
-{
- return 0;
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex || number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename scalar_result_from_possible_complex<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type>::type
-arg(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(arg(static_cast<number_type>(v)));
-}
-
-template <class T, expression_template_option ExpressionTemplates>
-inline typename boost::lazy_enable_if_c<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates> > >::type
-norm(const number<T, ExpressionTemplates>& v)
-{
- typename component_type<number<T, ExpressionTemplates> >::type a(real(v)), b(imag(v));
- return BOOST_MP_MOVE(a * a + b * b);
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline typename boost::enable_if_c<number_category<T>::value != number_kind_complex, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type >::type
-norm(const number<T, ExpressionTemplates>& v)
-{
- return v * v;
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename scalar_result_from_possible_complex<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
-norm(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(norm(static_cast<number_type>(v)));
-}
-
-template <class Backend, expression_template_option ExpressionTemplates>
-typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type polar(number<Backend, ExpressionTemplates> const& r, number<Backend, ExpressionTemplates> const& theta)
-{
- return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta)));
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class Backend, expression_template_option ExpressionTemplates>
-typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, ExpressionTemplates> >::value,
- typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type
- polar(detail::expression<tag, A1, A2, A3, A4> const& r, number<Backend, ExpressionTemplates> const& theta)
-{
- return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta)));
-}
-
-template <class Backend, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
-typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, ExpressionTemplates> >::value,
- typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type
- polar(number<Backend, ExpressionTemplates> const& r, detail::expression<tag, A1, A2, A3, A4> const& theta)
-{
- return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta)));
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
-typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, typename detail::expression<tagb, A1b, A2b, A3b, A4b>::result_type >::value,
- typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type >::type>::type
- polar(detail::expression<tag, A1, A2, A3, A4> const& r, detail::expression<tagb, A1b, A2b, A3b, A4b> const& theta)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type scalar_type;
- return typename complex_result_from_scalar<scalar_type>::type(scalar_type(r * cos(theta)), scalar_type(r * sin(theta)));
-}
-//
-// We also allow the first argument to polar to be an arithmetic type (probably a literal):
-//
-template <class Scalar, class Backend, expression_template_option ExpressionTemplates>
-typename boost::enable_if_c<boost::is_arithmetic<Scalar>::value, typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type
- polar(Scalar const& r, number<Backend, ExpressionTemplates> const& theta)
-{
- return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta)));
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class Scalar>
-typename enable_if_c<boost::is_arithmetic<Scalar>::value,
- typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type>::type
- polar(Scalar const& r, detail::expression<tag, A1, A2, A3, A4> const& theta)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type scalar_type;
- return typename complex_result_from_scalar<scalar_type>::type(scalar_type(r * cos(theta)), scalar_type(r * sin(theta)));
-}
-//
-// Single argument overloads:
-//
-template <class Backend, expression_template_option ExpressionTemplates>
-typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type polar(number<Backend, ExpressionTemplates> const& r)
-{
- return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(r);
-}
-
-template <class tag, class A1, class A2, class A3, class A4>
-typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
- polar(detail::expression<tag, A1, A2, A3, A4> const& r)
-{
- return typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type(r);
-}
-
-
-
-} // namespace multiprecision
-
-namespace math {
-
- //
- // Import Math functions here, so they can be found by Boost.Math:
- //
- using boost::multiprecision::signbit;
- using boost::multiprecision::sign;
- using boost::multiprecision::copysign;
- using boost::multiprecision::changesign;
- using boost::multiprecision::fpclassify;
- using boost::multiprecision::isinf;
- using boost::multiprecision::isnan;
- using boost::multiprecision::isnormal;
- using boost::multiprecision::isfinite;
-
-}
-
-namespace multiprecision{
-
- typedef ::boost::math::policies::policy<
- ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>,
- ::boost::math::policies::pole_error< ::boost::math::policies::errno_on_error>,
- ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>,
- ::boost::math::policies::evaluation_error< ::boost::math::policies::errno_on_error>,
- ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error>
- > c99_error_policy;
-
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type
- asinh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return boost::math::asinh(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
- asinh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return asinh(value_type(arg));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type
- acosh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return boost::math::acosh(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
- acosh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return acosh(value_type(arg));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type
- atanh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return boost::math::atanh(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
- atanh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return atanh(value_type(arg));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return boost::math::cbrt(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return cbrt(value_type(arg));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> erf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return boost::math::erf(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type erf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return erf(value_type(arg));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> erfc BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return boost::math::erfc(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type erfc BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return erfc(value_type(arg));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return boost::math::expm1(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return expm1(value_type(arg));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- multiprecision::number<Backend, ExpressionTemplates> result;
- result = boost::math::lgamma(arg, c99_error_policy());
- if((boost::multiprecision::isnan)(result) && !(boost::multiprecision::isnan)(arg))
- {
- result = std::numeric_limits<multiprecision::number<Backend, ExpressionTemplates> >::infinity();
- errno = ERANGE;
- }
- return result;
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return lgamma(value_type(arg));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- if((arg == 0) && std::numeric_limits<multiprecision::number<Backend, ExpressionTemplates> >::has_infinity)
- {
- errno = ERANGE;
- return 1 / arg;
- }
- return boost::math::tgamma(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return tgamma(value_type(arg));
- }
-
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline long lrint BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return lround(arg);
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline long lrint BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- return lround(arg);
- }
-#ifndef BOOST_NO_LONG_LONG
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline boost::long_long_type llrint BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return llround(arg);
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline boost::long_long_type llrint BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- return llround(arg);
- }
-#endif
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> log1p BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
- {
- return boost::math::log1p(arg, c99_error_policy());
- }
- template <class tag, class A1, class A2, class A3, class A4>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type log1p BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return log1p(value_type(arg));
- }
-
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
- {
- return boost::math::nextafter(a, b, c99_error_policy());
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
- inline multiprecision::number<Backend, ExpressionTemplates> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b)
- {
- return nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(a, multiprecision::number<Backend, ExpressionTemplates>(b));
- }
- template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
- {
- return nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(multiprecision::number<Backend, ExpressionTemplates>(a), b);
- }
- template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(a), value_type(b));
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
- {
- return boost::math::nextafter(a, b, c99_error_policy());
- }
- template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
- inline multiprecision::number<Backend, ExpressionTemplates> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b)
- {
- return nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(a, multiprecision::number<Backend, ExpressionTemplates>(b));
- }
- template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates>
- inline multiprecision::number<Backend, ExpressionTemplates> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
- {
- return nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(multiprecision::number<Backend, ExpressionTemplates>(a), b);
- }
- template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
- inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b)
- {
- typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
- return nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(a), value_type(b));
- }
-
-template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3>
-inline number<B1, ET1>& add(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b)
-{
- BOOST_STATIC_ASSERT_MSG((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists");
- BOOST_STATIC_ASSERT_MSG((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists");
- using default_ops::eval_add;
- eval_add(result.backend(), a.backend(), b.backend());
- return result;
-}
-
-template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3>
-inline number<B1, ET1>& subtract(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b)
-{
- BOOST_STATIC_ASSERT_MSG((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists");
- BOOST_STATIC_ASSERT_MSG((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists");
- using default_ops::eval_subtract;
- eval_subtract(result.backend(), a.backend(), b.backend());
- return result;
-}
-
-template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3>
-inline number<B1, ET1>& multiply(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b)
-{
- BOOST_STATIC_ASSERT_MSG((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists");
- BOOST_STATIC_ASSERT_MSG((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists");
- using default_ops::eval_multiply;
- eval_multiply(result.backend(), a.backend(), b.backend());
- return result;
-}
-
-template <class B, expression_template_option ET, class I>
-inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type
- add(number<B, ET>& result, const I& a, const I& b)
-{
- using default_ops::eval_add;
- typedef typename detail::canonical<I, B>::type canonical_type;
- eval_add(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b));
- return result;
-}
-
-template <class B, expression_template_option ET, class I>
-inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type
- subtract(number<B, ET>& result, const I& a, const I& b)
-{
- using default_ops::eval_subtract;
- typedef typename detail::canonical<I, B>::type canonical_type;
- eval_subtract(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b));
- return result;
-}
-
-template <class B, expression_template_option ET, class I>
-inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type
- multiply(number<B, ET>& result, const I& a, const I& b)
-{
- using default_ops::eval_multiply;
- typedef typename detail::canonical<I, B>::type canonical_type;
- eval_multiply(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b));
- return result;
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class Policy>
-inline typename detail::expression<tag, A1, A2, A3, A4>::result_type trunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(trunc(number_type(v), pol));
-}
-
-template <class Backend, expression_template_option ExpressionTemplates, class Policy>
-inline number<Backend, ExpressionTemplates> trunc(const number<Backend, ExpressionTemplates>& v, const Policy&)
-{
- using default_ops::eval_trunc;
- number<Backend, ExpressionTemplates> result;
- eval_trunc(result.backend(), v.backend());
- return BOOST_MP_MOVE(result);
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class Policy>
-inline int itrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- number_type r = trunc(v, pol);
- if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::itrunc<%1%>(%1%)", 0, number_type(v), 0, pol);
- return r.template convert_to<int>();
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline int itrunc(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- return itrunc(v, boost::math::policies::policy<>());
-}
-template <class Backend, expression_template_option ExpressionTemplates, class Policy>
-inline int itrunc(const number<Backend, ExpressionTemplates>& v, const Policy& pol)
-{
- number<Backend, ExpressionTemplates> r = trunc(v, pol);
- if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::itrunc<%1%>(%1%)", 0, v, 0, pol);
- return r.template convert_to<int>();
-}
-template <class Backend, expression_template_option ExpressionTemplates>
-inline int itrunc(const number<Backend, ExpressionTemplates>& v)
-{
- return itrunc(v, boost::math::policies::policy<>());
-}
-template <class tag, class A1, class A2, class A3, class A4, class Policy>
-inline long ltrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- number_type r = trunc(v, pol);
- if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::ltrunc<%1%>(%1%)", 0, number_type(v), 0L, pol);
- return r.template convert_to<long>();
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline long ltrunc(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- return ltrunc(v, boost::math::policies::policy<>());
-}
-template <class T, expression_template_option ExpressionTemplates, class Policy>
-inline long ltrunc(const number<T, ExpressionTemplates>& v, const Policy& pol)
-{
- number<T, ExpressionTemplates> r = trunc(v, pol);
- if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::ltrunc<%1%>(%1%)", 0, v, 0L, pol);
- return r.template convert_to<long>();
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline long ltrunc(const number<T, ExpressionTemplates>& v)
-{
- return ltrunc(v, boost::math::policies::policy<>());
-}
-#ifndef BOOST_NO_LONG_LONG
-template <class tag, class A1, class A2, class A3, class A4, class Policy>
-inline boost::long_long_type lltrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- number_type r = trunc(v, pol);
- if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::lltrunc<%1%>(%1%)", 0, number_type(v), 0LL, pol);
- return r.template convert_to<boost::long_long_type>();
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline boost::long_long_type lltrunc(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- return lltrunc(v, boost::math::policies::policy<>());
-}
-template <class T, expression_template_option ExpressionTemplates, class Policy>
-inline boost::long_long_type lltrunc(const number<T, ExpressionTemplates>& v, const Policy& pol)
-{
- number<T, ExpressionTemplates> r = trunc(v, pol);
- if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::lltrunc<%1%>(%1%)", 0, v, 0LL, pol);
- return r.template convert_to<boost::long_long_type>();
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline boost::long_long_type lltrunc(const number<T, ExpressionTemplates>& v)
-{
- return lltrunc(v, boost::math::policies::policy<>());
-}
-#endif
-template <class tag, class A1, class A2, class A3, class A4, class Policy>
-inline typename detail::expression<tag, A1, A2, A3, A4>::result_type round(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(round(static_cast<number_type>(v), pol));
-}
-template <class T, expression_template_option ExpressionTemplates, class Policy>
-inline number<T, ExpressionTemplates> round(const number<T, ExpressionTemplates>& v, const Policy&)
-{
- using default_ops::eval_round;
- number<T, ExpressionTemplates> result;
- eval_round(result.backend(), v.backend());
- return BOOST_MP_MOVE(result);
-}
-
-template <class tag, class A1, class A2, class A3, class A4, class Policy>
-inline int iround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- number_type r = round(v, pol);
- if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, number_type(v), 0, pol);
- return r.template convert_to<int>();
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline int iround(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- return iround(v, boost::math::policies::policy<>());
-}
-template <class T, expression_template_option ExpressionTemplates, class Policy>
-inline int iround(const number<T, ExpressionTemplates>& v, const Policy& pol)
-{
- number<T, ExpressionTemplates> r = round(v, pol);
- if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, v, 0, pol);
- return r.template convert_to<int>();
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline int iround(const number<T, ExpressionTemplates>& v)
-{
- return iround(v, boost::math::policies::policy<>());
-}
-template <class tag, class A1, class A2, class A3, class A4, class Policy>
-inline long lround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- number_type r = round(v, pol);
- if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::lround<%1%>(%1%)", 0, number_type(v), 0L, pol);
- return r.template convert_to<long>();
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline long lround(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- return lround(v, boost::math::policies::policy<>());
-}
-template <class T, expression_template_option ExpressionTemplates, class Policy>
-inline long lround(const number<T, ExpressionTemplates>& v, const Policy& pol)
-{
- number<T, ExpressionTemplates> r = round(v, pol);
- if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::lround<%1%>(%1%)", 0, v, 0L, pol);
- return r.template convert_to<long>();
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline long lround(const number<T, ExpressionTemplates>& v)
-{
- return lround(v, boost::math::policies::policy<>());
-}
-#ifndef BOOST_NO_LONG_LONG
-template <class tag, class A1, class A2, class A3, class A4, class Policy>
-inline boost::long_long_type llround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- number_type r = round(v, pol);
- if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, number_type(v), 0LL, pol);
- return r.template convert_to<boost::long_long_type>();
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline boost::long_long_type llround(const detail::expression<tag, A1, A2, A3, A4>& v)
-{
- return llround(v, boost::math::policies::policy<>());
-}
-template <class T, expression_template_option ExpressionTemplates, class Policy>
-inline boost::long_long_type llround(const number<T, ExpressionTemplates>& v, const Policy& pol)
-{
- number<T, ExpressionTemplates> r = round(v, pol);
- if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v))
- return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, v, 0LL, pol);
- return r.template convert_to<boost::long_long_type>();
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline boost::long_long_type llround(const number<T, ExpressionTemplates>& v)
-{
- return llround(v, boost::math::policies::policy<>());
-}
-#endif
-//
-// frexp does not return an expression template since we require the
-// integer argument to be evaluated even if the returned value is
-// not assigned to anything...
-//
-template <class T, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, short* pint)
-{
- using default_ops::eval_frexp;
- number<T, ExpressionTemplates> result;
- eval_frexp(result.backend(), v.backend(), pint);
- return BOOST_MP_MOVE(result);
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
- frexp(const detail::expression<tag, A1, A2, A3, A4>& v, short* pint)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, int* pint)
-{
- using default_ops::eval_frexp;
- number<T, ExpressionTemplates> result;
- eval_frexp(result.backend(), v.backend(), pint);
- return BOOST_MP_MOVE(result);
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
-frexp(const detail::expression<tag, A1, A2, A3, A4>& v, int* pint)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, long* pint)
-{
- using default_ops::eval_frexp;
- number<T, ExpressionTemplates> result;
- eval_frexp(result.backend(), v.backend(), pint);
- return BOOST_MP_MOVE(result);
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
-frexp(const detail::expression<tag, A1, A2, A3, A4>& v, long* pint)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
-}
-template <class T, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, boost::long_long_type* pint)
-{
- using default_ops::eval_frexp;
- number<T, ExpressionTemplates> result;
- eval_frexp(result.backend(), v.backend(), pint);
- return BOOST_MP_MOVE(result);
-}
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
-frexp(const detail::expression<tag, A1, A2, A3, A4>& v, boost::long_long_type* pint)
-{
- typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
- return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
-}
-//
-// modf does not return an expression template since we require the
-// second argument to be evaluated even if the returned value is
-// not assigned to anything...
-//
-template <class T, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type modf(const number<T, ExpressionTemplates>& v, number<T, ExpressionTemplates>* pipart)
-{
- using default_ops::eval_modf;
- number<T, ExpressionTemplates> result;
- eval_modf(result.backend(), v.backend(), pipart ? &pipart->backend() : 0);
- return BOOST_MP_MOVE(result);
-}
-template <class T, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
-inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type modf(const detail::expression<tag, A1, A2, A3, A4>& v, number<T, ExpressionTemplates>* pipart)
-{
- using default_ops::eval_modf;
- number<T, ExpressionTemplates> result, arg(v);
- eval_modf(result.backend(), arg.backend(), pipart ? &pipart->backend() : 0);
- return BOOST_MP_MOVE(result);
-}
-
-//
-// Integer square root:
-//
-template <class B, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, ExpressionTemplates> >::type
- sqrt(const number<B, ExpressionTemplates>& x)
-{
- using default_ops::eval_integer_sqrt;
- number<B, ExpressionTemplates> s, r;
- eval_integer_sqrt(s.backend(), r.backend(), x.backend());
- return s;
-}
-//
-// fma:
-//
-
-namespace default_ops {
-
- struct fma_func
- {
- template <class B, class T, class U, class V>
- void operator()(B& result, const T& a, const U& b, const V& c)const
- {
- eval_multiply_add(result, a, b, c);
- }
- };
-
-
-}
-
-template <class Backend, class U, class V>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>,
- mpl::or_<
- is_number<U>,
- is_number_expression<U>,
- is_arithmetic<U>
- >,
- mpl::or_<
- is_number<V>,
- is_number_expression<V>,
- is_arithmetic<V>
- >
- >,
- detail::expression<detail::function, default_ops::fma_func, number<Backend, et_on>, U, V>
->::type
-fma(const number<Backend, et_on>& a, const U& b, const V& c)
-{
- return detail::expression<detail::function, default_ops::fma_func, number<Backend, et_on>, U, V>(
- default_ops::fma_func(), a, b, c);
-}
-
-template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class U, class V>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>,
- mpl::or_<
- is_number<U>,
- is_number_expression<U>,
- is_arithmetic<U>
- >,
- mpl::or_<
- is_number<V>,
- is_number_expression<V>,
- is_arithmetic<V>
- >
- >,
- detail::expression<detail::function, default_ops::fma_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, V>
->::type
-fma(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const U& b, const V& c)
-{
- return detail::expression<detail::function, default_ops::fma_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, V>(
- default_ops::fma_func(), a, b, c);
-}
-
-template <class Backend, class U, class V>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>,
- mpl::or_<
- is_number<U>,
- is_number_expression<U>,
- is_arithmetic<U>
- >,
- mpl::or_<
- is_number<V>,
- is_number_expression<V>,
- is_arithmetic<V>
- >
- >,
- number<Backend, et_off>
->::type
-fma(const number<Backend, et_off>& a, const U& b, const V& c)
-{
- using default_ops::eval_multiply_add;
- number<Backend, et_off> result;
- eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c));
- return BOOST_MP_MOVE(result);
-}
-
-template <class U, class Backend, class V>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>,
- is_arithmetic<U>,
- mpl::or_<
- is_number<V>,
- is_number_expression<V>,
- is_arithmetic<V>
- >
- >,
- detail::expression<detail::function, default_ops::fma_func, U, number<Backend, et_on>, V>
->::type
-fma(const U& a, const number<Backend, et_on>& b, const V& c)
-{
- return detail::expression<detail::function, default_ops::fma_func, U, number<Backend, et_on>, V>(
- default_ops::fma_func(), a, b, c);
-}
-
-template <class U, class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>,
- is_arithmetic<U>,
- mpl::or_<
- is_number<V>,
- is_number_expression<V>,
- is_arithmetic<V>
- >
- >,
- detail::expression<detail::function, default_ops::fma_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>
->::type
-fma(const U& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b, const V& c)
-{
- return detail::expression<detail::function, default_ops::fma_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(
- default_ops::fma_func(), a, b, c);
-}
-
-template <class U, class Backend, class V>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>,
- is_arithmetic<U>,
- mpl::or_<
- is_number<V>,
- is_number_expression<V>,
- is_arithmetic<V>
- >
- >,
- number<Backend, et_off>
->::type
-fma(const U& a, const number<Backend, et_off>& b, const V& c)
-{
- using default_ops::eval_multiply_add;
- number<Backend, et_off> result;
- eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c));
- return BOOST_MP_MOVE(result);
-}
-
-template <class U, class V, class Backend>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>,
- is_arithmetic<U>,
- is_arithmetic<V>
- >,
- detail::expression<detail::function, default_ops::fma_func, U, V, number<Backend, et_on> >
->::type
-fma(const U& a, const V& b, const number<Backend, et_on>& c)
-{
- return detail::expression<detail::function, default_ops::fma_func, U, V, number<Backend, et_on> >(
- default_ops::fma_func(), a, b, c);
-}
-
-template <class U, class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>,
- is_arithmetic<U>,
- is_arithmetic<V>
- >,
- detail::expression<detail::function, default_ops::fma_func, U, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
->::type
-fma(const U& a, const V& b, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& c)
-{
- return detail::expression<detail::function, default_ops::fma_func, U, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(
- default_ops::fma_func(), a, b, c);
-}
-
-template <class U, class V, class Backend>
-inline typename enable_if<
- mpl::and_<
- mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>,
- is_arithmetic<U>,
- is_arithmetic<V>
- >,
- number<Backend, et_off>
->::type
-fma(const U& a, const V& b, const number<Backend, et_off>& c)
-{
- using default_ops::eval_multiply_add;
- number<Backend, et_off> result;
- eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c));
- return BOOST_MP_MOVE(result);
-}
-
-namespace default_ops {
-
- struct remquo_func
- {
- template <class B, class T, class U>
- void operator()(B& result, const T& a, const U& b, int* pi)const
- {
- eval_remquo(result, a, b, pi);
- }
- };
-
-}
-
-template <class Backend, class U>
-inline typename enable_if_c<
- number_category<number<Backend, et_on> >::value == number_kind_floating_point,
- detail::expression<detail::function, default_ops::remquo_func, number<Backend, et_on>, U, int*>
->::type
-remquo(const number<Backend, et_on>& a, const U& b, int* pi)
-{
- return detail::expression<detail::function, default_ops::remquo_func, number<Backend, et_on>, U, int*>(
- default_ops::remquo_func(), a, b, pi);
-}
-
-template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class U>
-inline typename enable_if_c<
- number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point,
- detail::expression<detail::function, default_ops::remquo_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, int*>
->::type
-remquo(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const U& b, int* pi)
-{
- return detail::expression<detail::function, default_ops::remquo_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, int*>(
- default_ops::remquo_func(), a, b, pi);
-}
-
-template <class U, class Backend>
-inline typename enable_if_c<
- (number_category<number<Backend, et_on> >::value == number_kind_floating_point)
- && !is_number<U>::value && !is_number_expression<U>::value,
- detail::expression<detail::function, default_ops::remquo_func, U, number<Backend, et_on>, int*>
->::type
-remquo(const U& a, const number<Backend, et_on>& b, int* pi)
-{
- return detail::expression<detail::function, default_ops::remquo_func, U, number<Backend, et_on>, int*>(
- default_ops::remquo_func(), a, b, pi);
-}
-
-template <class U, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
-inline typename enable_if_c<
- (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point)
- && !is_number<U>::value && !is_number_expression<U>::value,
- detail::expression<detail::function, default_ops::remquo_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, int*>
->::type
-remquo(const U& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b, int* pi)
-{
- return detail::expression<detail::function, default_ops::remquo_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, int*>(
- default_ops::remquo_func(), a, b, pi);
-}
-
-template <class Backend, class U>
-inline typename enable_if_c<
- number_category<number<Backend, et_on> >::value == number_kind_floating_point,
- number<Backend, et_off>
->::type
-remquo(const number<Backend, et_off>& a, const U& b, int* pi)
-{
- using default_ops::eval_remquo;
- number<Backend, et_off> result;
- eval_remquo(result.backend(), a.backend(), number<Backend, et_off>::canonical_value(b), pi);
- return BOOST_MP_MOVE(result);
-}
-template <class U, class Backend>
-inline typename enable_if_c<
-(number_category<number<Backend, et_on> >::value == number_kind_floating_point)
-&& !is_number<U>::value && !is_number_expression<U>::value,
-number<Backend, et_off>
->::type
-remquo(const U& a, const number<Backend, et_off>& b, int* pi)
-{
- using default_ops::eval_remquo;
- number<Backend, et_off> result;
- eval_remquo(result.backend(), number<Backend, et_off>::canonical_value(a), b.backend(), pi);
- return BOOST_MP_MOVE(result);
-}
-
-
-template <class B, expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, ExpressionTemplates> >::type
- sqrt(const number<B, ExpressionTemplates>& x, number<B, ExpressionTemplates>& r)
-{
- using default_ops::eval_integer_sqrt;
- number<B, ExpressionTemplates> s;
- eval_integer_sqrt(s.backend(), r.backend(), x.backend());
- return s;
-}
-
-#define UNARY_OP_FUNCTOR(func, category)\
-namespace detail{\
-template <class Backend> \
-struct BOOST_JOIN(category, BOOST_JOIN(func, _funct))\
-{\
- void operator()(Backend& result, const Backend& arg)const\
- {\
- using default_ops::BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result, arg);\
- }\
- template <class U>\
- void operator()(U& result, const Backend& arg)const\
- {\
- using default_ops::BOOST_JOIN(eval_,func);\
- Backend temp;\
- BOOST_JOIN(eval_,func)(temp, arg);\
- result = temp;\
- }\
-};\
-\
-}\
-\
-template <class tag, class A1, class A2, class A3, class A4> \
-inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category,\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , detail::expression<tag, A1, A2, A3, A4> > \
->::type \
-func(const detail::expression<tag, A1, A2, A3, A4>& arg)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , detail::expression<tag, A1, A2, A3, A4> \
-> (\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
- , arg \
- );\
-}\
-template <class Backend> \
-inline typename enable_if_c<number_category<Backend>::value == category,\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> > \
->::type \
-func(const number<Backend, et_on>& arg)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
- , arg \
- );\
-}\
-template <class Backend> \
-inline typename boost::enable_if_c<\
- boost::multiprecision::number_category<Backend>::value == category,\
- number<Backend, et_off> >::type \
-func(const number<Backend, et_off>& arg)\
-{\
- number<Backend, et_off> result;\
- using default_ops::BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result.backend(), arg.backend());\
- return BOOST_MP_MOVE(result);\
-}
-
-#define BINARY_OP_FUNCTOR(func, category)\
-namespace detail{\
-template <class Backend> \
-struct BOOST_JOIN(category, BOOST_JOIN(func, _funct))\
-{\
- void operator()(Backend& result, const Backend& arg, const Backend& a)const\
- {\
- using default_ops:: BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result, arg, a);\
- }\
- template <class Arithmetic> \
- void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const\
- {\
- using default_ops:: BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result, arg, number<Backend>::canonical_value(a));\
- }\
- template <class Arithmetic> \
- void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const\
- {\
- using default_ops:: BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result, number<Backend>::canonical_value(arg), a);\
- }\
- template <class U>\
- void operator()(U& result, const Backend& arg, const Backend& a)const\
- {\
- using default_ops:: BOOST_JOIN(eval_,func);\
- Backend r;\
- BOOST_JOIN(eval_,func)(r, arg, a);\
- result = r;\
- }\
- template <class U, class Arithmetic> \
- void operator()(U& result, const Backend& arg, const Arithmetic& a)const\
- {\
- using default_ops:: BOOST_JOIN(eval_,func);\
- Backend r;\
- BOOST_JOIN(eval_,func)(r, arg, number<Backend>::canonical_value(a));\
- result = r;\
- }\
- template <class U, class Arithmetic> \
- void operator()(U& result, const Arithmetic& arg, const Backend& a)const\
- {\
- using default_ops:: BOOST_JOIN(eval_,func);\
- Backend r;\
- BOOST_JOIN(eval_,func)(r, number<Backend>::canonical_value(arg), a);\
- result = r;\
- }\
-};\
-\
-}\
-template <class Backend> \
-inline typename enable_if_c<number_category<Backend>::value == category,\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- , number<Backend, et_on> > \
->::type \
-func(const number<Backend, et_on>& arg, const number<Backend, et_on>& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- , number<Backend, et_on> \
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
- , arg,\
- a\
- );\
-}\
-template <class Backend, class tag, class A1, class A2, class A3, class A4> \
-inline typename enable_if_c<\
- (number_category<Backend>::value == category) && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- , detail::expression<tag, A1, A2, A3, A4> > \
->::type \
-func(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- , detail::expression<tag, A1, A2, A3, A4> \
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
- , arg,\
- a\
- );\
-}\
-template <class tag, class A1, class A2, class A3, class A4, class Backend> \
-inline typename enable_if_c<\
- (number_category<Backend>::value == category) && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , detail::expression<tag, A1, A2, A3, A4> \
- , number<Backend, et_on> > \
->::type \
-func(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , detail::expression<tag, A1, A2, A3, A4> \
- , number<Backend, et_on> \
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
- , arg,\
- a\
- );\
-}\
-template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> \
-inline typename enable_if_c<\
- (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , detail::expression<tag, A1, A2, A3, A4> \
- , detail::expression<tagb, A1b, A2b, A3b, A4b> > \
->::type \
-func(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , detail::expression<tag, A1, A2, A3, A4> \
- , detail::expression<tagb, A1b, A2b, A3b, A4b> \
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
- , arg,\
- a\
- );\
-}\
-template <class Backend, class Arithmetic> \
-inline typename enable_if_c<\
- is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- , Arithmetic\
- > \
->::type \
-func(const number<Backend, et_on>& arg, const Arithmetic& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- , Arithmetic\
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
- , arg,\
- a\
- );\
-}\
-template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> \
-inline typename enable_if_c<\
- is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , detail::expression<tag, A1, A2, A3, A4> \
- , Arithmetic\
- > \
->::type \
-func(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , detail::expression<tag, A1, A2, A3, A4> \
- , Arithmetic\
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
- , arg,\
- a\
- );\
-}\
-template <class Backend, class Arithmetic> \
-inline typename enable_if_c<\
- is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , Arithmetic \
- , number<Backend, et_on> \
- > \
->::type \
-func(const Arithmetic& arg, const number<Backend, et_on>& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , Arithmetic \
- , number<Backend, et_on> \
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
- , arg,\
- a\
- );\
-}\
-template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> \
-inline typename enable_if_c<\
- is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , Arithmetic \
- , detail::expression<tag, A1, A2, A3, A4> \
- > \
->::type \
-func(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , Arithmetic \
- , detail::expression<tag, A1, A2, A3, A4> \
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
- , arg,\
- a\
- );\
-}\
-template <class Backend> \
-inline typename enable_if_c<(number_category<Backend>::value == category),\
- number<Backend, et_off> >::type \
-func(const number<Backend, et_off>& arg, const number<Backend, et_off>& a)\
-{\
- number<Backend, et_off> result;\
- using default_ops:: BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result.backend(), arg.backend(), a.backend());\
- return BOOST_MP_MOVE(result);\
-}\
-template <class Backend, class Arithmetic> \
-inline typename enable_if_c<\
- is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == category),\
- number<Backend, et_off> \
->::type \
-func(const number<Backend, et_off>& arg, const Arithmetic& a)\
-{\
- number<Backend, et_off> result;\
- using default_ops:: BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a));\
- return BOOST_MP_MOVE(result);\
-}\
-template <class Backend, class Arithmetic> \
-inline typename enable_if_c<\
- is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == category),\
- number<Backend, et_off> \
->::type \
-func(const Arithmetic& a, const number<Backend, et_off>& arg)\
-{\
- number<Backend, et_off> result;\
- using default_ops:: BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend());\
- return BOOST_MP_MOVE(result);\
-}\
-
-
-#define HETERO_BINARY_OP_FUNCTOR_B(func, Arg2, category)\
-template <class tag, class A1, class A2, class A3, class A4> \
-inline typename enable_if_c<\
- (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , detail::expression<tag, A1, A2, A3, A4> \
- , Arg2> \
->::type \
-func(const detail::expression<tag, A1, A2, A3, A4>& arg, Arg2 const& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
- , detail::expression<tag, A1, A2, A3, A4> \
- , Arg2\
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
- , arg, a \
- );\
-}\
-template <class Backend> \
-inline typename enable_if_c<\
- (number_category<Backend>::value == category),\
- detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- , Arg2> \
->::type \
-func(const number<Backend, et_on>& arg, Arg2 const& a)\
-{\
- return detail::expression<\
- detail::function\
- , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
- , number<Backend, et_on> \
- , Arg2\
- >(\
- detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
- , arg,\
- a\
- );\
-}\
-template <class Backend> \
-inline typename enable_if_c<\
- (number_category<Backend>::value == category),\
- number<Backend, et_off> >::type \
-func(const number<Backend, et_off>& arg, Arg2 const& a)\
-{\
- number<Backend, et_off> result;\
- using default_ops:: BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result.backend(), arg.backend(), a);\
- return BOOST_MP_MOVE(result);\
-}\
-
-#define HETERO_BINARY_OP_FUNCTOR(func, Arg2, category)\
-namespace detail{\
-template <class Backend> \
-struct BOOST_JOIN(category, BOOST_JOIN(func, _funct))\
-{\
- template <class Arg>\
- void operator()(Backend& result, Backend const& arg, Arg a)const\
- {\
- using default_ops:: BOOST_JOIN(eval_,func);\
- BOOST_JOIN(eval_,func)(result, arg, a);\
- }\
-};\
-\
-}\
-\
-HETERO_BINARY_OP_FUNCTOR_B(func, Arg2, category)
-
-namespace detail{
-template <class Backend>
-struct abs_funct
-{
- void operator()(Backend& result, const Backend& arg)const
- {
- using default_ops::eval_abs;
- eval_abs(result, arg);
- }
-};
-template <class Backend>
-struct conj_funct
-{
- void operator()(Backend& result, const Backend& arg)const
- {
- using default_ops::eval_conj;
- eval_conj(result, arg);
- }
-};
-template <class Backend>
-struct proj_funct
-{
- void operator()(Backend& result, const Backend& arg)const
- {
- using default_ops::eval_proj;
- eval_proj(result, arg);
- }
-};
-
-}
-
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename boost::disable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex,
- detail::expression<
- detail::function
- , detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
- , detail::expression<tag, A1, A2, A3, A4> > >::type
-abs(const detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- return detail::expression<
- detail::function
- , detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
- , detail::expression<tag, A1, A2, A3, A4>
-> (
- detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>()
- , arg
- );
-}
-template <class Backend>
-inline typename disable_if_c<number_category<Backend>::value == number_kind_complex,
- detail::expression<
- detail::function
- , detail::abs_funct<Backend>
- , number<Backend, et_on> > >::type
-abs(const number<Backend, et_on>& arg)
-{
- return detail::expression<
- detail::function
- , detail::abs_funct<Backend>
- , number<Backend, et_on>
- >(
- detail::abs_funct<Backend>()
- , arg
- );
-}
-template <class Backend>
-inline typename disable_if_c<number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type
-abs(const number<Backend, et_off>& arg)
-{
- number<Backend, et_off> result;
- using default_ops::eval_abs;
- eval_abs(result.backend(), arg.backend());
- return BOOST_MP_MOVE(result);
-}
-
-template <class tag, class A1, class A2, class A3, class A4>
-inline detail::expression<
- detail::function
- , detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
- , detail::expression<tag, A1, A2, A3, A4> >
-conj(const detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- return detail::expression<
- detail::function
- , detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
- , detail::expression<tag, A1, A2, A3, A4>
-> (
- detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>()
- , arg
- );
-}
-template <class Backend>
-inline detail::expression<
- detail::function
- , detail::conj_funct<Backend>
- , number<Backend, et_on> >
-conj(const number<Backend, et_on>& arg)
-{
- return detail::expression<
- detail::function
- , detail::conj_funct<Backend>
- , number<Backend, et_on>
- >(
- detail::conj_funct<Backend>()
- , arg
- );
-}
-template <class Backend>
-inline number<Backend, et_off>
-conj(const number<Backend, et_off>& arg)
-{
- number<Backend, et_off> result;
- using default_ops::eval_conj;
- eval_conj(result.backend(), arg.backend());
- return BOOST_MP_MOVE(result);
-}
-
-template <class tag, class A1, class A2, class A3, class A4>
-inline detail::expression<
- detail::function
- , detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
- , detail::expression<tag, A1, A2, A3, A4> >
-proj(const detail::expression<tag, A1, A2, A3, A4>& arg)
-{
- return detail::expression<
- detail::function
- , detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
- , detail::expression<tag, A1, A2, A3, A4>
-> (
- detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>()
- , arg
- );
-}
-template <class Backend>
-inline detail::expression<
- detail::function
- , detail::proj_funct<Backend>
- , number<Backend, et_on> >
-proj(const number<Backend, et_on>& arg)
-{
- return detail::expression<
- detail::function
- , detail::proj_funct<Backend>
- , number<Backend, et_on>
- >(
- detail::proj_funct<Backend>()
- , arg
- );
-}
-template <class Backend>
-inline number<Backend, et_off>
-proj(const number<Backend, et_off>& arg)
-{
- number<Backend, et_off> result;
- using default_ops::eval_proj;
- eval_proj(result.backend(), arg.backend());
- return BOOST_MP_MOVE(result);
-}
-
-UNARY_OP_FUNCTOR(fabs, number_kind_floating_point)
-UNARY_OP_FUNCTOR(sqrt, number_kind_floating_point)
-UNARY_OP_FUNCTOR(floor, number_kind_floating_point)
-UNARY_OP_FUNCTOR(ceil, number_kind_floating_point)
-UNARY_OP_FUNCTOR(trunc, number_kind_floating_point)
-UNARY_OP_FUNCTOR(round, number_kind_floating_point)
-UNARY_OP_FUNCTOR(exp, number_kind_floating_point)
-UNARY_OP_FUNCTOR(exp2, number_kind_floating_point)
-UNARY_OP_FUNCTOR(log, number_kind_floating_point)
-UNARY_OP_FUNCTOR(log10, number_kind_floating_point)
-UNARY_OP_FUNCTOR(cos, number_kind_floating_point)
-UNARY_OP_FUNCTOR(sin, number_kind_floating_point)
-UNARY_OP_FUNCTOR(tan, number_kind_floating_point)
-UNARY_OP_FUNCTOR(asin, number_kind_floating_point)
-UNARY_OP_FUNCTOR(acos, number_kind_floating_point)
-UNARY_OP_FUNCTOR(atan, number_kind_floating_point)
-UNARY_OP_FUNCTOR(cosh, number_kind_floating_point)
-UNARY_OP_FUNCTOR(sinh, number_kind_floating_point)
-UNARY_OP_FUNCTOR(tanh, number_kind_floating_point)
-UNARY_OP_FUNCTOR(log2, number_kind_floating_point)
-UNARY_OP_FUNCTOR(nearbyint, number_kind_floating_point)
-UNARY_OP_FUNCTOR(rint, number_kind_floating_point)
-
-HETERO_BINARY_OP_FUNCTOR(ldexp, short, number_kind_floating_point)
-//HETERO_BINARY_OP_FUNCTOR(frexp, short*, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(ldexp, int, number_kind_floating_point)
-//HETERO_BINARY_OP_FUNCTOR_B(frexp, int*, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(ldexp, long, number_kind_floating_point)
-//HETERO_BINARY_OP_FUNCTOR_B(frexp, long*, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(ldexp, boost::long_long_type, number_kind_floating_point)
-//HETERO_BINARY_OP_FUNCTOR_B(frexp, boost::long_long_type*, number_kind_floating_point)
-BINARY_OP_FUNCTOR(pow, number_kind_floating_point)
-BINARY_OP_FUNCTOR(fmod, number_kind_floating_point)
-BINARY_OP_FUNCTOR(fmax, number_kind_floating_point)
-BINARY_OP_FUNCTOR(fmin, number_kind_floating_point)
-BINARY_OP_FUNCTOR(atan2, number_kind_floating_point)
-BINARY_OP_FUNCTOR(fdim, number_kind_floating_point)
-BINARY_OP_FUNCTOR(hypot, number_kind_floating_point)
-BINARY_OP_FUNCTOR(remainder, number_kind_floating_point)
-
-UNARY_OP_FUNCTOR(logb, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR(scalbn, short, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR(scalbln, short, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(scalbn, int, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(scalbln, int, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(scalbn, long, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(scalbln, long, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(scalbn, boost::long_long_type, number_kind_floating_point)
-HETERO_BINARY_OP_FUNCTOR_B(scalbln, boost::long_long_type, number_kind_floating_point)
-
-//
-// Complex functions:
-//
-UNARY_OP_FUNCTOR(exp, number_kind_complex)
-UNARY_OP_FUNCTOR(log, number_kind_complex)
-UNARY_OP_FUNCTOR(log10, number_kind_complex)
-BINARY_OP_FUNCTOR(pow, number_kind_complex)
-UNARY_OP_FUNCTOR(sqrt, number_kind_complex)
-UNARY_OP_FUNCTOR(sin, number_kind_complex)
-UNARY_OP_FUNCTOR(cos, number_kind_complex)
-UNARY_OP_FUNCTOR(tan, number_kind_complex)
-UNARY_OP_FUNCTOR(asin, number_kind_complex)
-UNARY_OP_FUNCTOR(acos, number_kind_complex)
-UNARY_OP_FUNCTOR(atan, number_kind_complex)
-UNARY_OP_FUNCTOR(sinh, number_kind_complex)
-UNARY_OP_FUNCTOR(cosh, number_kind_complex)
-UNARY_OP_FUNCTOR(tanh, number_kind_complex)
-UNARY_OP_FUNCTOR(asinh, number_kind_complex)
-UNARY_OP_FUNCTOR(acosh, number_kind_complex)
-UNARY_OP_FUNCTOR(atanh, number_kind_complex)
-
-//
-// Integer functions:
-//
-BINARY_OP_FUNCTOR(gcd, number_kind_integer)
-BINARY_OP_FUNCTOR(lcm, number_kind_integer)
-HETERO_BINARY_OP_FUNCTOR(pow, unsigned, number_kind_integer)
-
-#undef BINARY_OP_FUNCTOR
-#undef UNARY_OP_FUNCTOR
-
-//
-// ilogb:
-//
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, typename Backend::exponent_type>::type
- ilogb(const multiprecision::number<Backend, ExpressionTemplates>& val)
-{
- using default_ops::eval_ilogb;
- return eval_ilogb(val.backend());
-}
-
-template <class tag, class A1, class A2, class A3, class A4>
-inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type::backend_type::exponent_type>::type
-ilogb(const detail::expression<tag, A1, A2, A3, A4>& val)
-{
- using default_ops::eval_ilogb;
- typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type arg(val);
- return eval_ilogb(arg.backend());
-}
-
-} //namespace multiprecision
-
-namespace math{
-//
-// Overload of Boost.Math functions that find the wrong overload when used with number:
-//
-namespace detail{
- template <class T> T sinc_pi_imp(T);
- template <class T> T sinhc_pi_imp(T);
-}
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline multiprecision::number<Backend, ExpressionTemplates> sinc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x)
-{
- return BOOST_MP_MOVE(detail::sinc_pi_imp(x));
-}
-
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class Policy>
-inline multiprecision::number<Backend, ExpressionTemplates> sinc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x, const Policy&)
-{
- return BOOST_MP_MOVE(detail::sinc_pi_imp(x));
-}
-
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline multiprecision::number<Backend, ExpressionTemplates> sinhc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x)
-{
- return BOOST_MP_MOVE(detail::sinhc_pi_imp(x));
-}
-
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class Policy>
-inline multiprecision::number<Backend, ExpressionTemplates> sinhc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x, const Policy&)
-{
- return BOOST_MP_MOVE(boost::math::sinhc_pi(x));
-}
-
-using boost::multiprecision::gcd;
-using boost::multiprecision::lcm;
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-} // namespace math
-
-namespace integer {
-
-using boost::multiprecision::gcd;
-using boost::multiprecision::lcm;
-
-}
-
-} // namespace boost
-
-//
-// This has to come last of all:
-//
-#include <boost/multiprecision/detail/no_et_ops.hpp>
-#include <boost/multiprecision/detail/et_ops.hpp>
-//
-// min/max overloads:
-//
-#include <boost/multiprecision/detail/min_max.hpp>
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/constants.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/constants.hpp
deleted file mode 100644
index 48b4a5c29ad..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/constants.hpp
+++ /dev/null
@@ -1,314 +0,0 @@
-// Copyright 2011 John Maddock. Distributed under the Boost
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// This file has no include guards or namespaces - it's expanded inline inside default_ops.hpp
-//
-
-template <class T>
-void calc_log2(T& num, unsigned digits)
-{
- typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
- typedef typename mpl::front<typename T::signed_types>::type si_type;
-
- //
- // String value with 1100 digits:
- //
- static const char* string_val = "0."
- "6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875"
- "4200148102057068573368552023575813055703267075163507596193072757082837143519030703862389167347112335"
- "0115364497955239120475172681574932065155524734139525882950453007095326366642654104239157814952043740"
- "4303855008019441706416715186447128399681717845469570262716310645461502572074024816377733896385506952"
- "6066834113727387372292895649354702576265209885969320196505855476470330679365443254763274495125040606"
- "9438147104689946506220167720424524529612687946546193165174681392672504103802546259656869144192871608"
- "2938031727143677826548775664850856740776484514644399404614226031930967354025744460703080960850474866"
- "3852313818167675143866747664789088143714198549423151997354880375165861275352916610007105355824987941"
- "4729509293113897155998205654392871700072180857610252368892132449713893203784393530887748259701715591"
- "0708823683627589842589185353024363421436706118923678919237231467232172053401649256872747782344535347"
- "6481149418642386776774406069562657379600867076257199184734022651462837904883062033061144630073719489";
- //
- // Check if we can just construct from string:
- //
- if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
- {
- num = string_val;
- return;
- }
- //
- // We calculate log2 from using the formula:
- //
- // ln(2) = 3/4 SUM[n>=0] ((-1)^n * N!^2 / (2^n(2n+1)!))
- //
- // Numerator and denominator are calculated separately and then
- // divided at the end, we also precalculate the terms up to n = 5
- // since these fit in a 32-bit integer anyway.
- //
- // See Gourdon, X., and Sebah, P. The logarithmic constant: log 2, Jan. 2004.
- // Also http://www.mpfr.org/algorithms.pdf.
- //
- num = static_cast<ui_type>(1180509120uL);
- T denom, next_term, temp;
- denom = static_cast<ui_type>(1277337600uL);
- next_term = static_cast<ui_type>(120uL);
- si_type sign = -1;
-
- ui_type limit = digits / 3 + 1;
-
- for(ui_type n = 6; n < limit; ++n)
- {
- temp = static_cast<ui_type>(2);
- eval_multiply(temp, ui_type(2 * n));
- eval_multiply(temp, ui_type(2 * n + 1));
- eval_multiply(num, temp);
- eval_multiply(denom, temp);
- sign = -sign;
- eval_multiply(next_term, n);
- eval_multiply(temp, next_term, next_term);
- if(sign < 0)
- temp.negate();
- eval_add(num, temp);
- }
- eval_multiply(denom, ui_type(4));
- eval_multiply(num, ui_type(3));
- INSTRUMENT_BACKEND(denom);
- INSTRUMENT_BACKEND(num);
- eval_divide(num, denom);
- INSTRUMENT_BACKEND(num);
-}
-
-template <class T>
-void calc_e(T& result, unsigned digits)
-{
- typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
- //
- // 1100 digits in string form:
- //
- const char* string_val = "2."
- "7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274"
- "2746639193200305992181741359662904357290033429526059563073813232862794349076323382988075319525101901"
- "1573834187930702154089149934884167509244761460668082264800168477411853742345442437107539077744992069"
- "5517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416"
- "9283681902551510865746377211125238978442505695369677078544996996794686445490598793163688923009879312"
- "7736178215424999229576351482208269895193668033182528869398496465105820939239829488793320362509443117"
- "3012381970684161403970198376793206832823764648042953118023287825098194558153017567173613320698112509"
- "9618188159304169035159888851934580727386673858942287922849989208680582574927961048419844436346324496"
- "8487560233624827041978623209002160990235304369941849146314093431738143640546253152096183690888707016"
- "7683964243781405927145635490613031072085103837505101157477041718986106873969655212671546889570350354"
- "0212340784981933432106817012100562788023519303322474501585390473041995777709350366041699732972508869";
- //
- // Check if we can just construct from string:
- //
- if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
- {
- result = string_val;
- return;
- }
-
- T lim;
- lim = ui_type(1);
- eval_ldexp(lim, lim, digits);
-
- //
- // Standard evaluation from the definition of e: http://functions.wolfram.com/Constants/E/02/
- //
- result = ui_type(2);
- T denom;
- denom = ui_type(1);
- ui_type i = 2;
- do{
- eval_multiply(denom, i);
- eval_multiply(result, i);
- eval_add(result, ui_type(1));
- ++i;
- }while(denom.compare(lim) <= 0);
- eval_divide(result, denom);
-}
-
-template <class T>
-void calc_pi(T& result, unsigned digits)
-{
- typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
- typedef typename mpl::front<typename T::float_types>::type real_type;
- //
- // 1100 digits in string form:
- //
- const char* string_val = "3."
- "1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"
- "8214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196"
- "4428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273"
- "7245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094"
- "3305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912"
- "9833673362440656643086021394946395224737190702179860943702770539217176293176752384674818467669405132"
- "0005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235"
- "4201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859"
- "5024459455346908302642522308253344685035261931188171010003137838752886587533208381420617177669147303"
- "5982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989"
- "3809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913152";
- //
- // Check if we can just construct from string:
- //
- if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
- {
- result = string_val;
- return;
- }
-
- T a;
- a = ui_type(1);
- T b;
- T A(a);
- T B;
- B = real_type(0.5f);
- T D;
- D = real_type(0.25f);
-
- T lim;
- lim = ui_type(1);
- eval_ldexp(lim, lim, -(int)digits);
-
- //
- // This algorithm is from:
- // Schonhage, A., Grotefeld, A. F. W., and Vetter, E. Fast Algorithms: A Multitape Turing
- // Machine Implementation. BI Wissenschaftverlag, 1994.
- // Also described in MPFR's algorithm guide: http://www.mpfr.org/algorithms.pdf.
- //
- // Let:
- // a[0] = A[0] = 1
- // B[0] = 1/2
- // D[0] = 1/4
- // Then:
- // S[k+1] = (A[k]+B[k]) / 4
- // b[k] = sqrt(B[k])
- // a[k+1] = a[k]^2
- // B[k+1] = 2(A[k+1]-S[k+1])
- // D[k+1] = D[k] - 2^k(A[k+1]-B[k+1])
- // Stop when |A[k]-B[k]| <= 2^(k-p)
- // and PI = B[k]/D[k]
-
- unsigned k = 1;
-
- do
- {
- eval_add(result, A, B);
- eval_ldexp(result, result, -2);
- eval_sqrt(b, B);
- eval_add(a, b);
- eval_ldexp(a, a, -1);
- eval_multiply(A, a, a);
- eval_subtract(B, A, result);
- eval_ldexp(B, B, 1);
- eval_subtract(result, A, B);
- bool neg = eval_get_sign(result) < 0;
- if(neg)
- result.negate();
- if(result.compare(lim) <= 0)
- break;
- if(neg)
- result.negate();
- eval_ldexp(result, result, k - 1);
- eval_subtract(D, result);
- ++k;
- eval_ldexp(lim, lim, 1);
- }
- while(true);
-
- eval_divide(result, B, D);
-}
-
-template <class T, const T& (*F)(void)>
-struct constant_initializer
-{
- static void do_nothing()
- {
- init.do_nothing();
- }
-private:
- struct initializer
- {
- initializer()
- {
- F();
- }
- void do_nothing()const{}
- };
- static const initializer init;
-};
-
-template <class T, const T& (*F)(void)>
-typename constant_initializer<T, F>::initializer const constant_initializer<T, F>::init;
-
-template <class T>
-const T& get_constant_ln2()
-{
- static BOOST_MP_THREAD_LOCAL T result;
- static BOOST_MP_THREAD_LOCAL bool b = false;
- static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
- if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
- {
- calc_log2(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
- b = true;
- digits = boost::multiprecision::detail::digits2<number<T> >::value();
- }
-
- constant_initializer<T, &get_constant_ln2<T> >::do_nothing();
-
- return result;
-}
-#ifndef BOOST_MP_THREAD_LOCAL
-#error 1
-#endif
-
-template <class T>
-const T& get_constant_e()
-{
- static BOOST_MP_THREAD_LOCAL T result;
- static BOOST_MP_THREAD_LOCAL bool b = false;
- static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
- if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
- {
- calc_e(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
- b = true;
- digits = boost::multiprecision::detail::digits2<number<T> >::value();
- }
-
- constant_initializer<T, &get_constant_e<T> >::do_nothing();
-
- return result;
-}
-
-template <class T>
-const T& get_constant_pi()
-{
- static BOOST_MP_THREAD_LOCAL T result;
- static BOOST_MP_THREAD_LOCAL bool b = false;
- static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
- if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
- {
- calc_pi(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
- b = true;
- digits = boost::multiprecision::detail::digits2<number<T> >::value();
- }
-
- constant_initializer<T, &get_constant_pi<T> >::do_nothing();
-
- return result;
-}
-
-template <class T>
-const T& get_constant_one_over_epsilon()
-{
- static const bool is_init = false;
- static T result;
- if (is_init == false)
- {
- typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
- result = static_cast<ui_type>(1u);
- eval_divide(result, std::numeric_limits<number<T> >::epsilon().backend());
- }
-
- constant_initializer<T, &get_constant_one_over_epsilon<T> >::do_nothing();
-
- return result;
-}
-
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/pow.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/pow.hpp
deleted file mode 100644
index ec2a045f7a9..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/pow.hpp
+++ /dev/null
@@ -1,904 +0,0 @@
-
-// Copyright Christopher Kormanyos 2002 - 2013.
-// Copyright 2011 - 2013 John Maddock. Distributed under the Boost
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// This work is based on an earlier work:
-// "Algorithm 910: A Portable C++ Multiple-Precision System for Special-Function Calculations",
-// in ACM TOMS, {VOL 37, ISSUE 4, (February 2011)} (C) ACM, 2011. http://doi.acm.org/10.1145/1916461.1916469
-//
-// This file has no include guards or namespaces - it's expanded inline inside default_ops.hpp
-//
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:6326) // comparison of two constants
-#endif
-
-namespace detail{
-
-template<typename T, typename U>
-inline void pow_imp(T& result, const T& t, const U& p, const mpl::false_&)
-{
- // Compute the pure power of typename T t^p.
- // Use the S-and-X binary method, as described in
- // D. E. Knuth, "The Art of Computer Programming", Vol. 2,
- // Section 4.6.3 . The resulting computational complexity
- // is order log2[abs(p)].
-
- typedef typename boost::multiprecision::detail::canonical<U, T>::type int_type;
-
- if(&result == &t)
- {
- T temp;
- pow_imp(temp, t, p, mpl::false_());
- result = temp;
- return;
- }
-
- // This will store the result.
- if(U(p % U(2)) != U(0))
- {
- result = t;
- }
- else
- result = int_type(1);
-
- U p2(p);
-
- // The variable x stores the binary powers of t.
- T x(t);
-
- while(U(p2 /= 2) != U(0))
- {
- // Square x for each binary power.
- eval_multiply(x, x);
-
- const bool has_binary_power = (U(p2 % U(2)) != U(0));
-
- if(has_binary_power)
- {
- // Multiply the result with each binary power contained in the exponent.
- eval_multiply(result, x);
- }
- }
-}
-
-template<typename T, typename U>
-inline void pow_imp(T& result, const T& t, const U& p, const mpl::true_&)
-{
- // Signed integer power, just take care of the sign then call the unsigned version:
- typedef typename boost::multiprecision::detail::canonical<U, T>::type int_type;
- typedef typename make_unsigned<U>::type ui_type;
-
- if(p < 0)
- {
- T temp;
- temp = static_cast<int_type>(1);
- T denom;
- pow_imp(denom, t, static_cast<ui_type>(-p), mpl::false_());
- eval_divide(result, temp, denom);
- return;
- }
- pow_imp(result, t, static_cast<ui_type>(p), mpl::false_());
-}
-
-} // namespace detail
-
-template<typename T, typename U>
-inline typename enable_if_c<is_integral<U>::value>::type eval_pow(T& result, const T& t, const U& p)
-{
- detail::pow_imp(result, t, p, boost::is_signed<U>());
-}
-
-template <class T>
-void hyp0F0(T& H0F0, const T& x)
-{
- // Compute the series representation of Hypergeometric0F0 taken from
- // http://functions.wolfram.com/HypergeometricFunctions/Hypergeometric0F0/06/01/
- // There are no checks on input range or parameter boundaries.
-
- typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
-
- BOOST_ASSERT(&H0F0 != &x);
- long tol = boost::multiprecision::detail::digits2<number<T, et_on> >::value();
- T t;
-
- T x_pow_n_div_n_fact(x);
-
- eval_add(H0F0, x_pow_n_div_n_fact, ui_type(1));
-
- T lim;
- eval_ldexp(lim, H0F0, 1 - tol);
- if(eval_get_sign(lim) < 0)
- lim.negate();
-
- ui_type n;
-
- const unsigned series_limit =
- boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100
- ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value();
- // Series expansion of hyperg_0f0(; ; x).
- for(n = 2; n < series_limit; ++n)
- {
- eval_multiply(x_pow_n_div_n_fact, x);
- eval_divide(x_pow_n_div_n_fact, n);
- eval_add(H0F0, x_pow_n_div_n_fact);
- bool neg = eval_get_sign(x_pow_n_div_n_fact) < 0;
- if(neg)
- x_pow_n_div_n_fact.negate();
- if(lim.compare(x_pow_n_div_n_fact) > 0)
- break;
- if(neg)
- x_pow_n_div_n_fact.negate();
- }
- if(n >= series_limit)
- BOOST_THROW_EXCEPTION(std::runtime_error("H0F0 failed to converge"));
-}
-
-template <class T>
-void hyp1F0(T& H1F0, const T& a, const T& x)
-{
- // Compute the series representation of Hypergeometric1F0 taken from
- // http://functions.wolfram.com/HypergeometricFunctions/Hypergeometric1F0/06/01/01/
- // and also see the corresponding section for the power function (i.e. x^a).
- // There are no checks on input range or parameter boundaries.
-
- typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
-
- BOOST_ASSERT(&H1F0 != &x);
- BOOST_ASSERT(&H1F0 != &a);
-
- T x_pow_n_div_n_fact(x);
- T pochham_a (a);
- T ap (a);
-
- eval_multiply(H1F0, pochham_a, x_pow_n_div_n_fact);
- eval_add(H1F0, si_type(1));
- T lim;
- eval_ldexp(lim, H1F0, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
- if(eval_get_sign(lim) < 0)
- lim.negate();
-
- si_type n;
- T term, part;
-
- const si_type series_limit =
- boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100
- ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value();
- // Series expansion of hyperg_1f0(a; ; x).
- for(n = 2; n < series_limit; n++)
- {
- eval_multiply(x_pow_n_div_n_fact, x);
- eval_divide(x_pow_n_div_n_fact, n);
- eval_increment(ap);
- eval_multiply(pochham_a, ap);
- eval_multiply(term, pochham_a, x_pow_n_div_n_fact);
- eval_add(H1F0, term);
- if(eval_get_sign(term) < 0)
- term.negate();
- if(lim.compare(term) >= 0)
- break;
- }
- if(n >= series_limit)
- BOOST_THROW_EXCEPTION(std::runtime_error("H1F0 failed to converge"));
-}
-
-template <class T>
-void eval_exp(T& result, const T& x)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The exp function is only valid for floating point types.");
- if(&x == &result)
- {
- T temp;
- eval_exp(temp, x);
- result = temp;
- return;
- }
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
- typedef typename T::exponent_type exp_type;
- typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
-
- // Handle special arguments.
- int type = eval_fpclassify(x);
- bool isneg = eval_get_sign(x) < 0;
- if(type == (int)FP_NAN)
- {
- result = x;
- errno = EDOM;
- return;
- }
- else if(type == (int)FP_INFINITE)
- {
- if(isneg)
- result = ui_type(0u);
- else
- result = x;
- return;
- }
- else if(type == (int)FP_ZERO)
- {
- result = ui_type(1);
- return;
- }
-
- // Get local copy of argument and force it to be positive.
- T xx = x;
- T exp_series;
- if(isneg)
- xx.negate();
-
- // Check the range of the argument.
- if(xx.compare(si_type(1)) <= 0)
- {
- //
- // Use series for exp(x) - 1:
- //
- T lim;
- if(std::numeric_limits<number<T, et_on> >::is_specialized)
- lim = std::numeric_limits<number<T, et_on> >::epsilon().backend();
- else
- {
- result = ui_type(1);
- eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
- }
- unsigned k = 2;
- exp_series = xx;
- result = si_type(1);
- if(isneg)
- eval_subtract(result, exp_series);
- else
- eval_add(result, exp_series);
- eval_multiply(exp_series, xx);
- eval_divide(exp_series, ui_type(k));
- eval_add(result, exp_series);
- while(exp_series.compare(lim) > 0)
- {
- ++k;
- eval_multiply(exp_series, xx);
- eval_divide(exp_series, ui_type(k));
- if(isneg && (k&1))
- eval_subtract(result, exp_series);
- else
- eval_add(result, exp_series);
- }
- return;
- }
-
- // Check for pure-integer arguments which can be either signed or unsigned.
- typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type ll;
- eval_trunc(exp_series, x);
- eval_convert_to(&ll, exp_series);
- if(x.compare(ll) == 0)
- {
- detail::pow_imp(result, get_constant_e<T>(), ll, mpl::true_());
- return;
- }
- else if(exp_series.compare(x) == 0)
- {
- // We have a value that has no fractional part, but is too large to fit
- // in a long long, in this situation the code below will fail, so
- // we're just going to assume that this will overflow:
- if(isneg)
- result = ui_type(0);
- else
- result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend();
- return;
- }
-
- // The algorithm for exp has been taken from MPFUN.
- // exp(t) = [ (1 + r + r^2/2! + r^3/3! + r^4/4! ...)^p2 ] * 2^n
- // where p2 is a power of 2 such as 2048, r = t_prime / p2, and
- // t_prime = t - n*ln2, with n chosen to minimize the absolute
- // value of t_prime. In the resulting Taylor series, which is
- // implemented as a hypergeometric function, |r| is bounded by
- // ln2 / p2. For small arguments, no scaling is done.
-
- // Compute the exponential series of the (possibly) scaled argument.
-
- eval_divide(result, xx, get_constant_ln2<T>());
- exp_type n;
- eval_convert_to(&n, result);
-
- if (n == (std::numeric_limits<exp_type>::max)())
- {
- // Exponent is too large to fit in our exponent type:
- if (isneg)
- result = ui_type(0);
- else
- result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend();
- return;
- }
-
- // The scaling is 2^11 = 2048.
- const si_type p2 = static_cast<si_type>(si_type(1) << 11);
-
- eval_multiply(exp_series, get_constant_ln2<T>(), static_cast<canonical_exp_type>(n));
- eval_subtract(exp_series, xx);
- eval_divide(exp_series, p2);
- exp_series.negate();
- hyp0F0(result, exp_series);
-
- detail::pow_imp(exp_series, result, p2, mpl::true_());
- result = ui_type(1);
- eval_ldexp(result, result, n);
- eval_multiply(exp_series, result);
-
- if(isneg)
- eval_divide(result, ui_type(1), exp_series);
- else
- result = exp_series;
-}
-
-template <class T>
-void eval_log(T& result, const T& arg)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The log function is only valid for floating point types.");
- //
- // We use a variation of http://dlmf.nist.gov/4.45#i
- // using frexp to reduce the argument to x * 2^n,
- // then let y = x - 1 and compute:
- // log(x) = log(2) * n + log1p(1 + y)
- //
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- typedef typename T::exponent_type exp_type;
- typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
- typedef typename mpl::front<typename T::float_types>::type fp_type;
- int s = eval_signbit(arg);
- switch(eval_fpclassify(arg))
- {
- case FP_NAN:
- result = arg;
- errno = EDOM;
- return;
- case FP_INFINITE:
- if(s) break;
- result = arg;
- return;
- case FP_ZERO:
- result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend();
- result.negate();
- errno = ERANGE;
- return;
- }
- if(s)
- {
- result = std::numeric_limits<number<T> >::quiet_NaN().backend();
- errno = EDOM;
- return;
- }
-
- exp_type e;
- T t;
- eval_frexp(t, arg, &e);
- bool alternate = false;
-
- if(t.compare(fp_type(2) / fp_type(3)) <= 0)
- {
- alternate = true;
- eval_ldexp(t, t, 1);
- --e;
- }
-
- eval_multiply(result, get_constant_ln2<T>(), canonical_exp_type(e));
- INSTRUMENT_BACKEND(result);
- eval_subtract(t, ui_type(1)); /* -0.3 <= t <= 0.3 */
- if(!alternate)
- t.negate(); /* 0 <= t <= 0.33333 */
- T pow = t;
- T lim;
- T t2;
-
- if(alternate)
- eval_add(result, t);
- else
- eval_subtract(result, t);
-
- if(std::numeric_limits<number<T, et_on> >::is_specialized)
- eval_multiply(lim, result, std::numeric_limits<number<T, et_on> >::epsilon().backend());
- else
- eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
- if(eval_get_sign(lim) < 0)
- lim.negate();
- INSTRUMENT_BACKEND(lim);
-
- ui_type k = 1;
- do
- {
- ++k;
- eval_multiply(pow, t);
- eval_divide(t2, pow, k);
- INSTRUMENT_BACKEND(t2);
- if(alternate && ((k & 1) != 0))
- eval_add(result, t2);
- else
- eval_subtract(result, t2);
- INSTRUMENT_BACKEND(result);
- }while(lim.compare(t2) < 0);
-}
-
-template <class T>
-const T& get_constant_log10()
-{
- static BOOST_MP_THREAD_LOCAL T result;
- static BOOST_MP_THREAD_LOCAL bool b = false;
- static BOOST_MP_THREAD_LOCAL long digits = boost::multiprecision::detail::digits2<number<T> >::value();
- if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
- {
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- T ten;
- ten = ui_type(10u);
- eval_log(result, ten);
- b = true;
- digits = boost::multiprecision::detail::digits2<number<T> >::value();
- }
-
- constant_initializer<T, &get_constant_log10<T> >::do_nothing();
-
- return result;
-}
-
-template <class T>
-void eval_log10(T& result, const T& arg)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The log10 function is only valid for floating point types.");
- eval_log(result, arg);
- eval_divide(result, get_constant_log10<T>());
-}
-
-template <class R, class T>
-inline void eval_log2(R& result, const T& a)
-{
- eval_log(result, a);
- eval_divide(result, get_constant_ln2<R>());
-}
-
-template<typename T>
-inline void eval_pow(T& result, const T& x, const T& a)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The pow function is only valid for floating point types.");
- typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
- typedef typename mpl::front<typename T::float_types>::type fp_type;
-
- if((&result == &x) || (&result == &a))
- {
- T t;
- eval_pow(t, x, a);
- result = t;
- return;
- }
-
- if((a.compare(si_type(1)) == 0) || (x.compare(si_type(1)) == 0))
- {
- result = x;
- return;
- }
- if(a.compare(si_type(0)) == 0)
- {
- result = si_type(1);
- return;
- }
-
- int type = eval_fpclassify(x);
-
- switch(type)
- {
- case FP_ZERO:
- switch(eval_fpclassify(a))
- {
- case FP_ZERO:
- result = si_type(1);
- break;
- case FP_NAN:
- result = a;
- break;
- case FP_NORMAL:
- {
- // Need to check for a an odd integer as a special case:
- try
- {
- typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type i;
- eval_convert_to(&i, a);
- if(a.compare(i) == 0)
- {
- if(eval_signbit(a))
- {
- if(i & 1)
- {
- result = std::numeric_limits<number<T> >::infinity().backend();
- if(eval_signbit(x))
- result.negate();
- errno = ERANGE;
- }
- else
- {
- result = std::numeric_limits<number<T> >::infinity().backend();
- errno = ERANGE;
- }
- }
- else if(i & 1)
- {
- result = x;
- }
- else
- result = si_type(0);
- return;
- }
- }
- catch(const std::exception&)
- {
- // fallthrough..
- }
- }
- default:
- if(eval_signbit(a))
- {
- result = std::numeric_limits<number<T> >::infinity().backend();
- errno = ERANGE;
- }
- else
- result = x;
- break;
- }
- return;
- case FP_NAN:
- result = x;
- errno = ERANGE;
- return;
- default: ;
- }
-
- int s = eval_get_sign(a);
- if(s == 0)
- {
- result = si_type(1);
- return;
- }
-
- if(s < 0)
- {
- T t, da;
- t = a;
- t.negate();
- eval_pow(da, x, t);
- eval_divide(result, si_type(1), da);
- return;
- }
-
- typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type an;
- typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type max_an =
- std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::is_specialized ?
- (std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::max)() :
- static_cast<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>(1) << (sizeof(typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type) * CHAR_BIT - 2);
- typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type min_an =
- std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::is_specialized ?
- (std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::min)() :
- -min_an;
-
-
- T fa;
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- eval_convert_to(&an, a);
- if(a.compare(an) == 0)
- {
- detail::pow_imp(result, x, an, mpl::true_());
- return;
- }
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(const std::exception&)
- {
- // conversion failed, just fall through, value is not an integer.
- an = (std::numeric_limits<boost::intmax_t>::max)();
- }
-#endif
- if((eval_get_sign(x) < 0))
- {
- typename boost::multiprecision::detail::canonical<boost::uintmax_t, T>::type aun;
-#ifndef BOOST_NO_EXCEPTIONS
- try
- {
-#endif
- eval_convert_to(&aun, a);
- if(a.compare(aun) == 0)
- {
- fa = x;
- fa.negate();
- eval_pow(result, fa, a);
- if(aun & 1u)
- result.negate();
- return;
- }
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(const std::exception&)
- {
- // conversion failed, just fall through, value is not an integer.
- }
-#endif
- eval_floor(result, a);
- // -1^INF is a special case in C99:
- if((x.compare(si_type(-1)) == 0) && (eval_fpclassify(a) == FP_INFINITE))
- {
- result = si_type(1);
- }
- else if(a.compare(result) == 0)
- {
- // exponent is so large we have no fractional part:
- if(x.compare(si_type(-1)) < 0)
- {
- result = std::numeric_limits<number<T, et_on> >::infinity().backend();
- }
- else
- {
- result = si_type(0);
- }
- }
- else if(type == FP_INFINITE)
- {
- result = std::numeric_limits<number<T, et_on> >::infinity().backend();
- }
- else if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN)
- {
- result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend();
- errno = EDOM;
- }
- else
- {
- BOOST_THROW_EXCEPTION(std::domain_error("Result of pow is undefined or non-real and there is no NaN for this number type."));
- }
- return;
- }
-
- T t, da;
-
- eval_subtract(da, a, an);
-
- if((x.compare(fp_type(0.5)) >= 0) && (x.compare(fp_type(0.9)) < 0) && (an < max_an) && (an > min_an))
- {
- if(a.compare(fp_type(1e-5f)) <= 0)
- {
- // Series expansion for small a.
- eval_log(t, x);
- eval_multiply(t, a);
- hyp0F0(result, t);
- return;
- }
- else
- {
- // Series expansion for moderately sized x. Note that for large power of a,
- // the power of the integer part of a is calculated using the pown function.
- if(an)
- {
- da.negate();
- t = si_type(1);
- eval_subtract(t, x);
- hyp1F0(result, da, t);
- detail::pow_imp(t, x, an, mpl::true_());
- eval_multiply(result, t);
- }
- else
- {
- da = a;
- da.negate();
- t = si_type(1);
- eval_subtract(t, x);
- hyp1F0(result, da, t);
- }
- }
- }
- else
- {
- // Series expansion for pow(x, a). Note that for large power of a, the power
- // of the integer part of a is calculated using the pown function.
- if(an)
- {
- eval_log(t, x);
- eval_multiply(t, da);
- eval_exp(result, t);
- detail::pow_imp(t, x, an, mpl::true_());
- eval_multiply(result, t);
- }
- else
- {
- eval_log(t, x);
- eval_multiply(t, a);
- eval_exp(result, t);
- }
- }
-}
-
-template<class T, class A>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1800)
-inline typename enable_if_c<!is_integral<A>::value, void>::type
-#else
-inline typename enable_if_c<is_compatible_arithmetic_type<A, number<T> >::value && !is_integral<A>::value, void>::type
-#endif
- eval_pow(T& result, const T& x, const A& a)
-{
- // Note this one is restricted to float arguments since pow.hpp already has a version for
- // integer powers....
- typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
- typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
- cast_type c;
- c = a;
- eval_pow(result, x, c);
-}
-
-template<class T, class A>
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1800)
-inline void
-#else
-inline typename enable_if_c<is_compatible_arithmetic_type<A, number<T> >::value, void>::type
-#endif
- eval_pow(T& result, const A& x, const T& a)
-{
- typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
- typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
- cast_type c;
- c = x;
- eval_pow(result, c, a);
-}
-
-template <class T>
-void eval_exp2(T& result, const T& arg)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The log function is only valid for floating point types.");
-
- // Check for pure-integer arguments which can be either signed or unsigned.
- typename boost::multiprecision::detail::canonical<typename T::exponent_type, T>::type i;
- T temp;
- try {
- eval_trunc(temp, arg);
- eval_convert_to(&i, temp);
- if(arg.compare(i) == 0)
- {
- temp = static_cast<typename mpl::front<typename T::unsigned_types>::type>(1u);
- eval_ldexp(result, temp, i);
- return;
- }
- }
- catch(const boost::math::rounding_error&)
- { /* Fallthrough */ }
- catch(const std::runtime_error&)
- { /* Fallthrough */ }
-
- temp = static_cast<typename mpl::front<typename T::unsigned_types>::type>(2u);
- eval_pow(result, temp, arg);
-}
-
-namespace detail{
-
- template <class T>
- void small_sinh_series(T x, T& result)
- {
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- bool neg = eval_get_sign(x) < 0;
- if(neg)
- x.negate();
- T p(x);
- T mult(x);
- eval_multiply(mult, x);
- result = x;
- ui_type k = 1;
-
- T lim(x);
- eval_ldexp(lim, lim, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
-
- do
- {
- eval_multiply(p, mult);
- eval_divide(p, ++k);
- eval_divide(p, ++k);
- eval_add(result, p);
- }while(p.compare(lim) >= 0);
- if(neg)
- result.negate();
- }
-
- template <class T>
- void sinhcosh(const T& x, T* p_sinh, T* p_cosh)
- {
- typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
- typedef typename mpl::front<typename T::float_types>::type fp_type;
-
- switch(eval_fpclassify(x))
- {
- case FP_NAN:
- errno = EDOM;
- // fallthrough...
- case FP_INFINITE:
- if(p_sinh)
- *p_sinh = x;
- if(p_cosh)
- {
- *p_cosh = x;
- if(eval_get_sign(x) < 0)
- p_cosh->negate();
- }
- return;
- case FP_ZERO:
- if(p_sinh)
- *p_sinh = x;
- if(p_cosh)
- *p_cosh = ui_type(1);
- return;
- default: ;
- }
-
- bool small_sinh = eval_get_sign(x) < 0 ? x.compare(fp_type(-0.5)) > 0 : x.compare(fp_type(0.5)) < 0;
-
- if(p_cosh || !small_sinh)
- {
- T e_px, e_mx;
- eval_exp(e_px, x);
- eval_divide(e_mx, ui_type(1), e_px);
- if(eval_signbit(e_mx) != eval_signbit(e_px))
- e_mx.negate(); // Handles lack of signed zero in some types
-
- if(p_sinh)
- {
- if(small_sinh)
- {
- small_sinh_series(x, *p_sinh);
- }
- else
- {
- eval_subtract(*p_sinh, e_px, e_mx);
- eval_ldexp(*p_sinh, *p_sinh, -1);
- }
- }
- if(p_cosh)
- {
- eval_add(*p_cosh, e_px, e_mx);
- eval_ldexp(*p_cosh, *p_cosh, -1);
- }
- }
- else
- {
- small_sinh_series(x, *p_sinh);
- }
- }
-
-} // namespace detail
-
-template <class T>
-inline void eval_sinh(T& result, const T& x)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The sinh function is only valid for floating point types.");
- detail::sinhcosh(x, &result, static_cast<T*>(0));
-}
-
-template <class T>
-inline void eval_cosh(T& result, const T& x)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The cosh function is only valid for floating point types.");
- detail::sinhcosh(x, static_cast<T*>(0), &result);
-}
-
-template <class T>
-inline void eval_tanh(T& result, const T& x)
-{
- BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The tanh function is only valid for floating point types.");
- T c;
- detail::sinhcosh(x, &result, &c);
- if((eval_fpclassify(result) == FP_INFINITE) && (eval_fpclassify(c) == FP_INFINITE))
- {
- bool s = eval_signbit(result) != eval_signbit(c);
- result = static_cast<typename mpl::front<typename T::unsigned_types>::type>(1u);
- if(s)
- result.negate();
- return;
- }
- eval_divide(result, c);
-}
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/no_et_ops.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/detail/no_et_ops.hpp
deleted file mode 100644
index 2faee69d03c..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/no_et_ops.hpp
+++ /dev/null
@@ -1,624 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Copyright 2012 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MP_NO_ET_OPS_HPP
-#define BOOST_MP_NO_ET_OPS_HPP
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4714)
-#endif
-
-namespace boost{
-namespace multiprecision{
-
-//
-// Operators for non-expression template enabled number.
-// NOTE: this is not a complete header - really just a suffix to default_ops.hpp.
-// NOTE: these operators have to be defined after the methods in default_ops.hpp.
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator - (const number<B, et_off>& v)
-{
- BOOST_STATIC_ASSERT_MSG(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
- number<B, et_off> result(v);
- result.backend().negate();
- return result;
-}
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator ~ (const number<B, et_off>& v)
-{
- number<B, et_off> result;
- eval_complement(result.backend(), v.backend());
- return result;
-}
-//
-// Addition:
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator + (const number<B, et_off>& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_add;
- eval_add(result.backend(), a.backend(), b.backend());
- return result;
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator + (const number<B, et_off>& a, const V& b)
-{
- number<B, et_off> result;
- using default_ops::eval_add;
- eval_add(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
- return result;
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator + (const V& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_add;
- eval_add(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
- return result;
-}
-//
-// Subtraction:
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator - (const number<B, et_off>& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_subtract;
- eval_subtract(result.backend(), a.backend(), b.backend());
- return result;
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator - (const number<B, et_off>& a, const V& b)
-{
- number<B, et_off> result;
- using default_ops::eval_subtract;
- eval_subtract(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
- return result;
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator - (const V& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_subtract;
- eval_subtract(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
- return result;
-}
-//
-// Multiply:
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator * (const number<B, et_off>& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_multiply;
- eval_multiply(result.backend(), a.backend(), b.backend());
- return result;
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator * (const number<B, et_off>& a, const V& b)
-{
- number<B, et_off> result;
- using default_ops::eval_multiply;
- eval_multiply(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
- return result;
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator * (const V& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_multiply;
- eval_multiply(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
- return result;
-}
-//
-// divide:
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator / (const number<B, et_off>& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_divide;
- eval_divide(result.backend(), a.backend(), b.backend());
- return result;
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator / (const number<B, et_off>& a, const V& b)
-{
- number<B, et_off> result;
- using default_ops::eval_divide;
- eval_divide(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
- return result;
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator / (const V& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_divide;
- eval_divide(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
- return result;
-}
-//
-// modulus:
-//
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator % (const number<B, et_off>& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_modulus;
- eval_modulus(result.backend(), a.backend(), b.backend());
- return result;
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator % (const number<B, et_off>& a, const V& b)
-{
- number<B, et_off> result;
- using default_ops::eval_modulus;
- eval_modulus(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
- return result;
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator % (const V& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_modulus;
- eval_modulus(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
- return result;
-}
-//
-// Bitwise or:
-//
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (const number<B, et_off>& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(result.backend(), a.backend(), b.backend());
- return result;
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator | (const number<B, et_off>& a, const V& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
- return result;
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator | (const V& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
- return result;
-}
-//
-// Bitwise xor:
-//
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (const number<B, et_off>& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(result.backend(), a.backend(), b.backend());
- return result;
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator ^ (const number<B, et_off>& a, const V& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
- return result;
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator ^ (const V& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
- return result;
-}
-//
-// Bitwise and:
-//
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (const number<B, et_off>& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(result.backend(), a.backend(), b.backend());
- return result;
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator & (const number<B, et_off>& a, const V& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
- return result;
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator & (const V& a, const number<B, et_off>& b)
-{
- number<B, et_off> result;
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
- return result;
-}
-//
-// shifts:
-//
-template <class B, class I>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator << (const number<B, et_off>& a, const I& b)
-{
- number<B, et_off> result(a);
- using default_ops::eval_left_shift;
- detail::check_shift_range(b, mpl::bool_<(sizeof(I) > sizeof(std::size_t))>(), is_signed<I>());
- eval_left_shift(result.backend(), b);
- return result;
-}
-template <class B, class I>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator >> (const number<B, et_off>& a, const I& b)
-{
- number<B, et_off> result(a);
- using default_ops::eval_right_shift;
- detail::check_shift_range(b, mpl::bool_<(sizeof(I) > sizeof(std::size_t))>(), is_signed<I>());
- eval_right_shift(result.backend(), b);
- return result;
-}
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !(defined(__GNUC__) && ((__GNUC__ == 4) && (__GNUC_MINOR__ < 5)))
-//
-// If we have rvalue references go all over again with rvalue ref overloads and move semantics.
-// Note that while it would be tempting to implement these so they return an rvalue reference
-// (and indeed this would be optimally efficient), this is unsafe due to users propensity to
-// write:
-//
-// const T& t = a * b;
-//
-// which would lead to a dangling reference if we didn't return by value. Of course move
-// semantics help a great deal in return by value, so performance is still pretty good...
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& v)
-{
- BOOST_STATIC_ASSERT_MSG(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
- v.backend().negate();
- return static_cast<number<B, et_off>&&>(v);
-}
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ~ (number<B, et_off>&& v)
-{
- eval_complement(v.backend(), v.backend());
- return static_cast<number<B, et_off>&&>(v);
-}
-//
-// Addition:
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator + (number<B, et_off>&& a, const number<B, et_off>& b)
-{
- using default_ops::eval_add;
- eval_add(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator + (const number<B, et_off>& a, number<B, et_off>&& b)
-{
- using default_ops::eval_add;
- eval_add(b.backend(), a.backend());
- return static_cast<number<B, et_off>&&>(b);
-}
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator + (number<B, et_off>&& a, number<B, et_off>&& b)
-{
- using default_ops::eval_add;
- eval_add(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator + (number<B, et_off>&& a, const V& b)
-{
- using default_ops::eval_add;
- eval_add(a.backend(), number<B, et_off>::canonical_value(b));
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator + (const V& a, number<B, et_off>&& b)
-{
- using default_ops::eval_add;
- eval_add(b.backend(), number<B, et_off>::canonical_value(a));
- return static_cast<number<B, et_off>&&>(b);
-}
-//
-// Subtraction:
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& a, const number<B, et_off>& b)
-{
- using default_ops::eval_subtract;
- eval_subtract(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if<is_signed_number<B>, number<B, et_off> >::type operator - (const number<B, et_off>& a, number<B, et_off>&& b)
-{
- using default_ops::eval_subtract;
- eval_subtract(b.backend(), a.backend());
- b.backend().negate();
- return static_cast<number<B, et_off>&&>(b);
-}
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& a, number<B, et_off>&& b)
-{
- using default_ops::eval_subtract;
- eval_subtract(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator - (number<B, et_off>&& a, const V& b)
-{
- using default_ops::eval_subtract;
- eval_subtract(a.backend(), number<B, et_off>::canonical_value(b));
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<(is_compatible_arithmetic_type<V, number<B, et_off> >::value && is_signed_number<B>::value), number<B, et_off> >::type
- operator - (const V& a, number<B, et_off>&& b)
-{
- using default_ops::eval_subtract;
- eval_subtract(b.backend(), number<B, et_off>::canonical_value(a));
- b.backend().negate();
- return static_cast<number<B, et_off>&&>(b);
-}
-//
-// Multiply:
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator * (number<B, et_off>&& a, const number<B, et_off>& b)
-{
- using default_ops::eval_multiply;
- eval_multiply(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator * (const number<B, et_off>& a, number<B, et_off>&& b)
-{
- using default_ops::eval_multiply;
- eval_multiply(b.backend(), a.backend());
- return static_cast<number<B, et_off>&&>(b);
-}
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator * (number<B, et_off>&& a, number<B, et_off>&& b)
-{
- using default_ops::eval_multiply;
- eval_multiply(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator * (number<B, et_off>&& a, const V& b)
-{
- using default_ops::eval_multiply;
- eval_multiply(a.backend(), number<B, et_off>::canonical_value(b));
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator * (const V& a, number<B, et_off>&& b)
-{
- using default_ops::eval_multiply;
- eval_multiply(b.backend(), number<B, et_off>::canonical_value(a));
- return static_cast<number<B, et_off>&&>(b);
-}
-//
-// divide:
-//
-template <class B>
-BOOST_MP_FORCEINLINE number<B, et_off> operator / (number<B, et_off>&& a, const number<B, et_off>& b)
-{
- using default_ops::eval_divide;
- eval_divide(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
- operator / (number<B, et_off>&& a, const V& b)
-{
- using default_ops::eval_divide;
- eval_divide(a.backend(), number<B, et_off>::canonical_value(b));
- return static_cast<number<B, et_off>&&>(a);
-}
-//
-// modulus:
-//
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator % (number<B, et_off>&& a, const number<B, et_off>& b)
-{
- using default_ops::eval_modulus;
- eval_modulus(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator % (number<B, et_off>&& a, const V& b)
-{
- using default_ops::eval_modulus;
- eval_modulus(a.backend(), number<B, et_off>::canonical_value(b));
- return static_cast<number<B, et_off>&&>(a);
-}
-//
-// Bitwise or:
-//
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (number<B, et_off>&& a, const number<B, et_off>& b)
-{
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (const number<B, et_off>& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(b.backend(), a.backend());
- return static_cast<number<B, et_off>&&>(b);
-}
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (number<B, et_off>&& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator | (number<B, et_off>&& a, const V& b)
-{
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(a.backend(), number<B, et_off>::canonical_value(b));
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator | (const V& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(b.backend(), number<B, et_off>::canonical_value(a));
- return static_cast<number<B, et_off>&&>(b);
-}
-//
-// Bitwise xor:
-//
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (number<B, et_off>&& a, const number<B, et_off>& b)
-{
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (const number<B, et_off>& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(b.backend(), a.backend());
- return static_cast<number<B, et_off>&&>(b);
-}
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (number<B, et_off>&& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator ^ (number<B, et_off>&& a, const V& b)
-{
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(a.backend(), number<B, et_off>::canonical_value(b));
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator ^ (const V& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(b.backend(), number<B, et_off>::canonical_value(a));
- return static_cast<number<B, et_off>&&>(b);
-}
-//
-// Bitwise and:
-//
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (number<B, et_off>&& a, const number<B, et_off>& b)
-{
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (const number<B, et_off>& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(b.backend(), a.backend());
- return static_cast<number<B, et_off>&&>(b);
-}
-template <class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (number<B, et_off>&& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(a.backend(), b.backend());
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class V>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator & (number<B, et_off>&& a, const V& b)
-{
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(a.backend(), number<B, et_off>::canonical_value(b));
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class V, class B>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator & (const V& a, number<B, et_off>&& b)
-{
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(b.backend(), number<B, et_off>::canonical_value(a));
- return static_cast<number<B, et_off>&&>(b);
-}
-//
-// shifts:
-//
-template <class B, class I>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator << (number<B, et_off>&& a, const I& b)
-{
- using default_ops::eval_left_shift;
- eval_left_shift(a.backend(), b);
- return static_cast<number<B, et_off>&&>(a);
-}
-template <class B, class I>
-BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
- operator >> (number<B, et_off>&& a, const I& b)
-{
- using default_ops::eval_right_shift;
- eval_right_shift(a.backend(), b);
- return static_cast<number<B, et_off>&&>(a);
-}
-
-#endif
-
-}} // namespaces
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_MP_NO_ET_OPS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/number_base.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/detail/number_base.hpp
deleted file mode 100644
index 5e3005e1a19..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/number_base.hpp
+++ /dev/null
@@ -1,1636 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Copyright 2011 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_BIG_NUM_BASE_HPP
-#define BOOST_MATH_BIG_NUM_BASE_HPP
-
-#include <limits>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_constructible.hpp>
-#include <boost/type_traits/decay.hpp>
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:4307)
-#endif
-#include <boost/lexical_cast.hpp>
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#if defined(NDEBUG) && !defined(_DEBUG)
-# define BOOST_MP_FORCEINLINE BOOST_FORCEINLINE
-#else
-# define BOOST_MP_FORCEINLINE inline
-#endif
-
-#if (defined(BOOST_GCC) && (BOOST_GCC <= 40700)) || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5140)
-# define BOOST_MP_NOEXCEPT_IF(x)
-#else
-# define BOOST_MP_NOEXCEPT_IF(x) BOOST_NOEXCEPT_IF(x)
-#endif
-
-#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5140)
-#define BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-#endif
-
-//
-// Thread local storage:
-// Note fails on Mingw, see https://sourceforge.net/p/mingw-w64/bugs/527/
-//
-#if !defined(BOOST_NO_CXX11_THREAD_LOCAL) && !defined(BOOST_INTEL) && !defined(__MINGW32__)
-# define BOOST_MP_THREAD_LOCAL thread_local
-#else
-# define BOOST_MP_THREAD_LOCAL
-#endif
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:6326)
-#endif
-
-namespace boost{
- namespace multiprecision{
-
-enum expression_template_option
-{
- et_off = 0,
- et_on = 1
-};
-
-template <class Backend>
-struct expression_template_default
-{
- static const expression_template_option value = et_on;
-};
-
-template <class Backend, expression_template_option ExpressionTemplates = expression_template_default<Backend>::value>
-class number;
-
-template <class T>
-struct is_number : public mpl::false_ {};
-
-template <class Backend, expression_template_option ExpressionTemplates>
-struct is_number<number<Backend, ExpressionTemplates> > : public mpl::true_ {};
-
-template <class T>
-struct is_et_number : public mpl::false_ {};
-
-template <class Backend>
-struct is_et_number<number<Backend, et_on> > : public mpl::true_ {};
-
-template <class T>
-struct is_no_et_number : public mpl::false_ {};
-
-template <class Backend>
-struct is_no_et_number<number<Backend, et_off> > : public mpl::true_ {};
-
-namespace detail{
-
-// Forward-declare an expression wrapper
-template<class tag, class Arg1 = void, class Arg2 = void, class Arg3 = void, class Arg4 = void>
-struct expression;
-
-} // namespace detail
-
-template <class T>
-struct is_number_expression : public mpl::false_ {};
-
-template<class tag, class Arg1, class Arg2, class Arg3, class Arg4>
-struct is_number_expression<detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > : public mpl::true_ {};
-
-template <class T, class Num>
-struct is_compatible_arithmetic_type
- : public mpl::bool_<
- is_convertible<T, Num>::value
- && !is_same<T, Num>::value
- && !is_number_expression<T>::value>
-{};
-
-namespace detail{
-//
-// Workaround for missing abs(boost::long_long_type) and abs(__int128) on some compilers:
-//
-template <class T>
-BOOST_CONSTEXPR typename enable_if_c<(is_signed<T>::value || is_floating_point<T>::value), T>::type abs(T t) BOOST_NOEXCEPT
-{
- // This strange expression avoids a hardware trap in the corner case
- // that val is the most negative value permitted in boost::long_long_type.
- // See https://svn.boost.org/trac/boost/ticket/9740.
- return t < 0 ? T(1u) + T(-(t + 1)) : t;
-}
-template <class T>
-BOOST_CONSTEXPR typename enable_if_c<(is_unsigned<T>::value), T>::type abs(T t) BOOST_NOEXCEPT
-{
- return t;
-}
-
-#define BOOST_MP_USING_ABS using boost::multiprecision::detail::abs;
-
-template <class T>
-BOOST_CONSTEXPR typename enable_if_c<(is_signed<T>::value || is_floating_point<T>::value), typename make_unsigned<T>::type>::type unsigned_abs(T t) BOOST_NOEXCEPT
-{
- // This strange expression avoids a hardware trap in the corner case
- // that val is the most negative value permitted in boost::long_long_type.
- // See https://svn.boost.org/trac/boost/ticket/9740.
- return t < 0 ? static_cast<typename make_unsigned<T>::type>(1u) + static_cast<typename make_unsigned<T>::type>(-(t + 1)) : static_cast<typename make_unsigned<T>::type>(t);
-}
-template <class T>
-BOOST_CONSTEXPR typename enable_if_c<(is_unsigned<T>::value), T>::type unsigned_abs(T t) BOOST_NOEXCEPT
-{
- return t;
-}
-
-//
-// Move support:
-//
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-# define BOOST_MP_MOVE(x) std::move(x)
-#else
-# define BOOST_MP_MOVE(x) x
-#endif
-
-template <class T>
-struct bits_of
-{
- BOOST_STATIC_ASSERT(is_integral<T>::value || is_enum<T>::value || std::numeric_limits<T>::is_specialized);
- static const unsigned value =
- std::numeric_limits<T>::is_specialized ?
- std::numeric_limits<T>::digits
- : sizeof(T) * CHAR_BIT - (is_signed<T>::value ? 1 : 0);
-};
-
-#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__)
-template<> struct bits_of<__float128> { static const unsigned value = 113; };
-#endif
-
-template <int b>
-struct has_enough_bits
-{
- template <class T>
- struct type : public mpl::bool_<bits_of<T>::value>= b>{};
-};
-
-template <class Val, class Backend, class Tag>
-struct canonical_imp
-{
- typedef typename remove_cv<typename decay<const Val>::type>::type type;
-};
-template <class B, class Backend, class Tag>
-struct canonical_imp<number<B, et_on>, Backend, Tag>
-{
- typedef B type;
-};
-template <class B, class Backend, class Tag>
-struct canonical_imp<number<B, et_off>, Backend, Tag>
-{
- typedef B type;
-};
-#ifdef __SUNPRO_CC
-template <class B, class Backend>
-struct canonical_imp<number<B, et_on>, Backend, mpl::int_<3> >
-{
- typedef B type;
-};
-template <class B, class Backend>
-struct canonical_imp<number<B, et_off>, Backend, mpl::int_<3> >
-{
- typedef B type;
-};
-#endif
-template <class Val, class Backend>
-struct canonical_imp<Val, Backend, mpl::int_<0> >
-{
- typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type;
- typedef typename mpl::find_if<
- typename Backend::signed_types,
- pred_type
- >::type iter_type;
- typedef typename mpl::end<typename Backend::signed_types>::type end_type;
- typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type;
-};
-template <class Val, class Backend>
-struct canonical_imp<Val, Backend, mpl::int_<1> >
-{
- typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type;
- typedef typename mpl::find_if<
- typename Backend::unsigned_types,
- pred_type
- >::type iter_type;
- typedef typename mpl::end<typename Backend::unsigned_types>::type end_type;
- typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type;
-};
-template <class Val, class Backend>
-struct canonical_imp<Val, Backend, mpl::int_<2> >
-{
- typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type;
- typedef typename mpl::find_if<
- typename Backend::float_types,
- pred_type
- >::type iter_type;
- typedef typename mpl::end<typename Backend::float_types>::type end_type;
- typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type;
-};
-template <class Val, class Backend>
-struct canonical_imp<Val, Backend, mpl::int_<3> >
-{
- typedef const char* type;
-};
-
-template <class Val, class Backend>
-struct canonical
-{
- typedef typename mpl::if_<
- is_signed<Val>,
- mpl::int_<0>,
- typename mpl::if_<
- is_unsigned<Val>,
- mpl::int_<1>,
- typename mpl::if_<
- is_floating_point<Val>,
- mpl::int_<2>,
- typename mpl::if_<
- mpl::or_<
- is_convertible<Val, const char*>,
- is_same<Val, std::string>
- >,
- mpl::int_<3>,
- mpl::int_<4>
- >::type
- >::type
- >::type
- >::type tag_type;
-
- typedef typename canonical_imp<Val, Backend, tag_type>::type type;
-};
-
-struct terminal{};
-struct negate{};
-struct plus{};
-struct minus{};
-struct multiplies{};
-struct divides{};
-struct modulus{};
-struct shift_left{};
-struct shift_right{};
-struct bitwise_and{};
-struct bitwise_or{};
-struct bitwise_xor{};
-struct bitwise_complement{};
-struct add_immediates{};
-struct subtract_immediates{};
-struct multiply_immediates{};
-struct divide_immediates{};
-struct modulus_immediates{};
-struct bitwise_and_immediates{};
-struct bitwise_or_immediates{};
-struct bitwise_xor_immediates{};
-struct complement_immediates{};
-struct function{};
-struct multiply_add{};
-struct multiply_subtract{};
-
-template <class T>
-struct backend_type;
-
-template <class T, expression_template_option ExpressionTemplates>
-struct backend_type<number<T, ExpressionTemplates> >
-{
- typedef T type;
-};
-
-template <class tag, class A1, class A2, class A3, class A4>
-struct backend_type<expression<tag, A1, A2, A3, A4> >
-{
- typedef typename backend_type<typename expression<tag, A1, A2, A3, A4>::result_type>::type type;
-};
-
-
-template <class T1, class T2>
-struct combine_expression
-{
-#ifdef BOOST_NO_CXX11_DECLTYPE
- typedef typename mpl::if_c<(sizeof(T1() + T2()) == sizeof(T1)), T1, T2>::type type;
-#else
- typedef decltype(T1() + T2()) type;
-#endif
-};
-
-template <class T1, expression_template_option ExpressionTemplates, class T2>
-struct combine_expression<number<T1, ExpressionTemplates>, T2>
-{
- typedef number<T1, ExpressionTemplates> type;
-};
-
-template <class T1, class T2, expression_template_option ExpressionTemplates>
-struct combine_expression<T1, number<T2, ExpressionTemplates> >
-{
- typedef number<T2, ExpressionTemplates> type;
-};
-
-template <class T, expression_template_option ExpressionTemplates>
-struct combine_expression<number<T, ExpressionTemplates>, number<T, ExpressionTemplates> >
-{
- typedef number<T, ExpressionTemplates> type;
-};
-
-template <class T1, expression_template_option ExpressionTemplates1, class T2, expression_template_option ExpressionTemplates2>
-struct combine_expression<number<T1, ExpressionTemplates1>, number<T2, ExpressionTemplates2> >
-{
- typedef typename mpl::if_c<
- is_convertible<number<T2, ExpressionTemplates2>, number<T1, ExpressionTemplates2> >::value,
- number<T1, ExpressionTemplates1>,
- number<T2, ExpressionTemplates2>
- >::type type;
-};
-
-template <class T>
-struct arg_type
-{
- typedef expression<terminal, T> type;
-};
-
-template <class Tag, class Arg1, class Arg2, class Arg3, class Arg4>
-struct arg_type<expression<Tag, Arg1, Arg2, Arg3, Arg4> >
-{
- typedef expression<Tag, Arg1, Arg2, Arg3, Arg4> type;
-};
-
-struct unmentionable
-{
- unmentionable* proc(){ return 0; }
-};
-
-typedef unmentionable* (unmentionable::*unmentionable_type)();
-
-template <class T, bool b>
-struct expression_storage_base
-{
- typedef const T& type;
-};
-
-template <class T>
-struct expression_storage_base<T, true>
-{
- typedef T type;
-};
-
-template <class T>
-struct expression_storage : public expression_storage_base<T, boost::is_arithmetic<T>::value> {};
-
-template <class T>
-struct expression_storage<T*>
-{
- typedef T* type;
-};
-
-template <class T>
-struct expression_storage<const T*>
-{
- typedef const T* type;
-};
-
-template <class tag, class A1, class A2, class A3, class A4>
-struct expression_storage<expression<tag, A1, A2, A3, A4> >
-{
- typedef expression<tag, A1, A2, A3, A4> type;
-};
-
-template<class tag, class Arg1>
-struct expression<tag, Arg1, void, void, void>
-{
- typedef mpl::int_<1> arity;
- typedef typename arg_type<Arg1>::type left_type;
- typedef typename left_type::result_type left_result_type;
- typedef typename left_type::result_type result_type;
- typedef tag tag_type;
-
- explicit expression(const Arg1& a) : arg(a) {}
-
-#ifndef BOOST_NO_CXX11_STATIC_ASSERT
- //
- // If we have static_assert we can give a more useful error message
- // than if we simply have no operator defined at all:
- //
- template <class Other>
- expression& operator=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator+=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator-=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator*=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator/=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator%=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator|=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator&=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator^=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator<<=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator>>=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
-#endif
-
- left_type left()const { return left_type(arg); }
-
- const Arg1& left_ref()const BOOST_NOEXCEPT { return arg; }
-
- static const unsigned depth = left_type::depth + 1;
-#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
- //
- // Horrible workaround for gcc-4.6.x which always prefers the template
- // operator bool() rather than the non-template operator when converting to
- // an arithmetic type:
- //
- template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
- explicit operator T ()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
- }
- template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
- explicit operator T ()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
-# else
- template <class T
-#ifndef __SUNPRO_CC
-, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
-#endif
->
- explicit operator T()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
- BOOST_MP_FORCEINLINE explicit operator bool()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
- }
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
- BOOST_MP_FORCEINLINE explicit operator void()const {}
-#endif
-# endif
-#else
- operator unmentionable_type()const
- {
- result_type r(*this);
- return r ? &unmentionable::proc : 0;
- }
-#endif
-
- template <class T>
- T convert_to()
- {
- result_type r(*this);
- return r.template convert_to<T>();
- }
-
-private:
- typename expression_storage<Arg1>::type arg;
- expression& operator=(const expression&);
-};
-
-template<class Arg1>
-struct expression<terminal, Arg1, void, void, void>
-{
- typedef mpl::int_<0> arity;
- typedef Arg1 result_type;
- typedef terminal tag_type;
-
- explicit expression(const Arg1& a) : arg(a) {}
-
-#ifndef BOOST_NO_CXX11_STATIC_ASSERT
- //
- // If we have static_assert we can give a more useful error message
- // than if we simply have no operator defined at all:
- //
- template <class Other>
- expression& operator=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator+=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator-=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator*=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator/=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator%=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator|=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator&=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator^=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator<<=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator>>=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
-#endif
-
- const Arg1& value()const BOOST_NOEXCEPT { return arg; }
-
- static const unsigned depth = 0;
-
-#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
- //
- // Horrible workaround for gcc-4.6.x which always prefers the template
- // operator bool() rather than the non-template operator when converting to
- // an arithmetic type:
- //
- template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
- explicit operator T ()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
-}
- template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
- explicit operator T ()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
-# else
- template <class T
-#ifndef __SUNPRO_CC
-, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
-#endif
->
- explicit operator T()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
- BOOST_MP_FORCEINLINE explicit operator bool()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
- }
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
- BOOST_MP_FORCEINLINE explicit operator void()const {}
-#endif
-# endif
-#else
- operator unmentionable_type()const
- {
- return arg ? &unmentionable::proc : 0;
- }
-#endif
-
- template <class T>
- T convert_to()
- {
- result_type r(*this);
- return r.template convert_to<T>();
- }
-
-private:
- typename expression_storage<Arg1>::type arg;
- expression& operator=(const expression&);
-};
-
-template <class tag, class Arg1, class Arg2>
-struct expression<tag, Arg1, Arg2, void, void>
-{
- typedef mpl::int_<2> arity;
- typedef typename arg_type<Arg1>::type left_type;
- typedef typename arg_type<Arg2>::type right_type;
- typedef typename left_type::result_type left_result_type;
- typedef typename right_type::result_type right_result_type;
- typedef typename combine_expression<left_result_type, right_result_type>::type result_type;
- typedef tag tag_type;
-
- expression(const Arg1& a1, const Arg2& a2) : arg1(a1), arg2(a2) {}
-
-#ifndef BOOST_NO_CXX11_STATIC_ASSERT
- //
- // If we have static_assert we can give a more useful error message
- // than if we simply have no operator defined at all:
- //
- template <class Other>
- expression& operator=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator+=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator-=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator*=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator/=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator%=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator|=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator&=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator^=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator<<=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator>>=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
-#endif
-
- left_type left()const { return left_type(arg1); }
- right_type right()const { return right_type(arg2); }
- const Arg1& left_ref()const BOOST_NOEXCEPT { return arg1; }
- const Arg2& right_ref()const BOOST_NOEXCEPT { return arg2; }
-
-#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
- //
- // Horrible workaround for gcc-4.6.x which always prefers the template
- // operator bool() rather than the non-template operator when converting to
- // an arithmetic type:
- //
- template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
- explicit operator T ()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
-}
- template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
- explicit operator T ()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
-# else
- template <class T
-#ifndef __SUNPRO_CC
-, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
-#endif
->
- explicit operator T()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
- BOOST_MP_FORCEINLINE explicit operator bool()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
- }
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
- BOOST_MP_FORCEINLINE explicit operator void()const {}
-#endif
-# endif
-#else
- operator unmentionable_type()const
- {
- result_type r(*this);
- return r ? &unmentionable::proc : 0;
- }
-#endif
- template <class T>
- T convert_to()
- {
- result_type r(*this);
- return r.template convert_to<T>();
- }
-
- static const unsigned left_depth = left_type::depth + 1;
- static const unsigned right_depth = right_type::depth + 1;
- static const unsigned depth = left_depth > right_depth ? left_depth : right_depth;
-private:
- typename expression_storage<Arg1>::type arg1;
- typename expression_storage<Arg2>::type arg2;
- expression& operator=(const expression&);
-};
-
-template <class tag, class Arg1, class Arg2, class Arg3>
-struct expression<tag, Arg1, Arg2, Arg3, void>
-{
- typedef mpl::int_<3> arity;
- typedef typename arg_type<Arg1>::type left_type;
- typedef typename arg_type<Arg2>::type middle_type;
- typedef typename arg_type<Arg3>::type right_type;
- typedef typename left_type::result_type left_result_type;
- typedef typename middle_type::result_type middle_result_type;
- typedef typename right_type::result_type right_result_type;
- typedef typename combine_expression<
- left_result_type,
- typename combine_expression<right_result_type, middle_result_type>::type
- >::type result_type;
- typedef tag tag_type;
-
- expression(const Arg1& a1, const Arg2& a2, const Arg3& a3) : arg1(a1), arg2(a2), arg3(a3) {}
-
-#ifndef BOOST_NO_CXX11_STATIC_ASSERT
- //
- // If we have static_assert we can give a more useful error message
- // than if we simply have no operator defined at all:
- //
- template <class Other>
- expression& operator=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator+=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator-=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator*=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator/=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator%=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator|=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator&=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator^=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator<<=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator>>=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
-#endif
-
- left_type left()const { return left_type(arg1); }
- middle_type middle()const { return middle_type(arg2); }
- right_type right()const { return right_type(arg3); }
- const Arg1& left_ref()const BOOST_NOEXCEPT { return arg1; }
- const Arg2& middle_ref()const BOOST_NOEXCEPT { return arg2; }
- const Arg3& right_ref()const BOOST_NOEXCEPT { return arg3; }
-
-#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
- //
- // Horrible workaround for gcc-4.6.x which always prefers the template
- // operator bool() rather than the non-template operator when converting to
- // an arithmetic type:
- //
- template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
- explicit operator T ()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
-}
- template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
- explicit operator T ()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
-# else
- template <class T
-#ifndef __SUNPRO_CC
-, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
-#endif
->
- explicit operator T()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
- BOOST_MP_FORCEINLINE explicit operator bool()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
- }
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
- BOOST_MP_FORCEINLINE explicit operator void()const {}
-#endif
-# endif
-#else
- operator unmentionable_type()const
- {
- result_type r(*this);
- return r ? &unmentionable::proc : 0;
- }
-#endif
- template <class T>
- T convert_to()
- {
- result_type r(*this);
- return r.template convert_to<T>();
- }
-
- static const unsigned left_depth = left_type::depth + 1;
- static const unsigned middle_depth = middle_type::depth + 1;
- static const unsigned right_depth = right_type::depth + 1;
- static const unsigned depth = left_depth > right_depth ? (left_depth > middle_depth ? left_depth : middle_depth) : (right_depth > middle_depth ? right_depth : middle_depth);
-private:
- typename expression_storage<Arg1>::type arg1;
- typename expression_storage<Arg2>::type arg2;
- typename expression_storage<Arg3>::type arg3;
- expression& operator=(const expression&);
-};
-
-template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
-struct expression
-{
- typedef mpl::int_<4> arity;
- typedef typename arg_type<Arg1>::type left_type;
- typedef typename arg_type<Arg2>::type left_middle_type;
- typedef typename arg_type<Arg3>::type right_middle_type;
- typedef typename arg_type<Arg4>::type right_type;
- typedef typename left_type::result_type left_result_type;
- typedef typename left_middle_type::result_type left_middle_result_type;
- typedef typename right_middle_type::result_type right_middle_result_type;
- typedef typename right_type::result_type right_result_type;
- typedef typename combine_expression<
- left_result_type,
- typename combine_expression<
- left_middle_result_type,
- typename combine_expression<right_middle_result_type, right_result_type>::type
- >::type
- >::type result_type;
- typedef tag tag_type;
-
- expression(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) : arg1(a1), arg2(a2), arg3(a3), arg4(a4) {}
-
-#ifndef BOOST_NO_CXX11_STATIC_ASSERT
- //
- // If we have static_assert we can give a more useful error message
- // than if we simply have no operator defined at all:
- //
- template <class Other>
- expression& operator=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator++(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--()
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- expression& operator--(int)
- {
- // This should always fail:
- static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator+=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator-=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator*=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator/=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator%=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator|=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator&=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator^=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator<<=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
- template <class Other>
- expression& operator>>=(const Other&)
- {
- // This should always fail:
- static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
- return *this;
- }
-#endif
-
- left_type left()const { return left_type(arg1); }
- left_middle_type left_middle()const { return left_middle_type(arg2); }
- right_middle_type right_middle()const { return right_middle_type(arg3); }
- right_type right()const { return right_type(arg4); }
- const Arg1& left_ref()const BOOST_NOEXCEPT { return arg1; }
- const Arg2& left_middle_ref()const BOOST_NOEXCEPT { return arg2; }
- const Arg3& right_middle_ref()const BOOST_NOEXCEPT { return arg3; }
- const Arg4& right_ref()const BOOST_NOEXCEPT { return arg4; }
-
-#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
- //
- // Horrible workaround for gcc-4.6.x which always prefers the template
- // operator bool() rather than the non-template operator when converting to
- // an arithmetic type:
- //
- template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
- explicit operator T ()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
-}
- template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
- explicit operator T ()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
-# else
- template <class T
-#ifndef __SUNPRO_CC
-, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
-#endif
->
- explicit operator T()const
- {
- return static_cast<T>(static_cast<result_type>(*this));
- }
- BOOST_MP_FORCEINLINE explicit operator bool()const
- {
- result_type r(*this);
- return static_cast<bool>(r);
- }
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
- BOOST_MP_FORCEINLINE explicit operator void()const {}
-#endif
-# endif
-#else
- operator unmentionable_type()const
- {
- result_type r(*this);
- return r ? &unmentionable::proc : 0;
- }
-#endif
- template <class T>
- T convert_to()
- {
- result_type r(*this);
- return r.template convert_to<T>();
- }
-
- static const unsigned left_depth = left_type::depth + 1;
- static const unsigned left_middle_depth = left_middle_type::depth + 1;
- static const unsigned right_middle_depth = right_middle_type::depth + 1;
- static const unsigned right_depth = right_type::depth + 1;
-
- static const unsigned left_max_depth = left_depth > left_middle_depth ? left_depth : left_middle_depth;
- static const unsigned right_max_depth = right_depth > right_middle_depth ? right_depth : right_middle_depth;
-
- static const unsigned depth = left_max_depth > right_max_depth ? left_max_depth : right_max_depth;
-private:
- typename expression_storage<Arg1>::type arg1;
- typename expression_storage<Arg2>::type arg2;
- typename expression_storage<Arg3>::type arg3;
- typename expression_storage<Arg4>::type arg4;
- expression& operator=(const expression&);
-};
-
-template <class T>
-struct digits2
-{
- BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
- BOOST_STATIC_ASSERT((std::numeric_limits<T>::radix == 2) || (std::numeric_limits<T>::radix == 10));
- // If we really have so many digits that this fails, then we're probably going to hit other problems anyway:
- BOOST_STATIC_ASSERT(LONG_MAX / 1000 > (std::numeric_limits<T>::digits + 1));
- static const long m_value = std::numeric_limits<T>::radix == 10 ? (((std::numeric_limits<T>::digits + 1) * 1000L) / 301L) : std::numeric_limits<T>::digits;
- static inline BOOST_CONSTEXPR long value()BOOST_NOEXCEPT { return m_value; }
-};
-
-#ifndef BOOST_MP_MIN_EXPONENT_DIGITS
-#ifdef _MSC_VER
-# define BOOST_MP_MIN_EXPONENT_DIGITS 2
-#else
-# define BOOST_MP_MIN_EXPONENT_DIGITS 2
-#endif
-#endif
-
-template <class S>
-void format_float_string(S& str, boost::intmax_t my_exp, boost::intmax_t digits, std::ios_base::fmtflags f, bool iszero)
-{
- typedef typename S::size_type size_type;
- bool scientific = (f & std::ios_base::scientific) == std::ios_base::scientific;
- bool fixed = (f & std::ios_base::fixed) == std::ios_base::fixed;
- bool showpoint = (f & std::ios_base::showpoint) == std::ios_base::showpoint;
- bool showpos = (f & std::ios_base::showpos) == std::ios_base::showpos;
-
- bool neg = str.size() && (str[0] == '-');
-
- if(neg)
- str.erase(0, 1);
-
- if(digits == 0)
- {
- digits = (std::max)(str.size(), size_type(16));
- }
-
- if(iszero || str.empty() || (str.find_first_not_of('0') == S::npos))
- {
- // We will be printing zero, even though the value might not
- // actually be zero (it just may have been rounded to zero).
- str = "0";
- if(scientific || fixed)
- {
- str.append(1, '.');
- str.append(size_type(digits), '0');
- if(scientific)
- str.append("e+00");
- }
- else
- {
- if(showpoint)
- {
- str.append(1, '.');
- if(digits > 1)
- str.append(size_type(digits - 1), '0');
- }
- }
- if(neg)
- str.insert(static_cast<std::string::size_type>(0), 1, '-');
- else if(showpos)
- str.insert(static_cast<std::string::size_type>(0), 1, '+');
- return;
- }
-
- if(!fixed && !scientific && !showpoint)
- {
- //
- // Suppress trailing zeros:
- //
- std::string::iterator pos = str.end();
- while(pos != str.begin() && *--pos == '0'){}
- if(pos != str.end())
- ++pos;
- str.erase(pos, str.end());
- if(str.empty())
- str = '0';
- }
- else if(!fixed || (my_exp >= 0))
- {
- //
- // Pad out the end with zero's if we need to:
- //
- boost::intmax_t chars = str.size();
- chars = digits - chars;
- if(scientific)
- ++chars;
- if(chars > 0)
- {
- str.append(static_cast<std::string::size_type>(chars), '0');
- }
- }
-
- if(fixed || (!scientific && (my_exp >= -4) && (my_exp < digits)))
- {
- if(1 + my_exp > static_cast<boost::intmax_t>(str.size()))
- {
- // Just pad out the end with zeros:
- str.append(static_cast<std::string::size_type>(1 + my_exp - str.size()), '0');
- if(showpoint || fixed)
- str.append(".");
- }
- else if(my_exp + 1 < static_cast<boost::intmax_t>(str.size()))
- {
- if(my_exp < 0)
- {
- str.insert(static_cast<std::string::size_type>(0), static_cast<std::string::size_type>(-1 - my_exp), '0');
- str.insert(static_cast<std::string::size_type>(0), "0.");
- }
- else
- {
- // Insert the decimal point:
- str.insert(static_cast<std::string::size_type>(my_exp + 1), 1, '.');
- }
- }
- else if(showpoint || fixed) // we have exactly the digits we require to left of the point
- str += ".";
-
- if(fixed)
- {
- // We may need to add trailing zeros:
- boost::intmax_t l = str.find('.') + 1;
- l = digits - (str.size() - l);
- if(l > 0)
- str.append(size_type(l), '0');
- }
- }
- else
- {
- BOOST_MP_USING_ABS
- // Scientific format:
- if(showpoint || (str.size() > 1))
- str.insert(static_cast<std::string::size_type>(1u), 1, '.');
- str.append(static_cast<std::string::size_type>(1u), 'e');
- S e = boost::lexical_cast<S>(abs(my_exp));
- if(e.size() < BOOST_MP_MIN_EXPONENT_DIGITS)
- e.insert(static_cast<std::string::size_type>(0), BOOST_MP_MIN_EXPONENT_DIGITS - e.size(), '0');
- if(my_exp < 0)
- e.insert(static_cast<std::string::size_type>(0), 1, '-');
- else
- e.insert(static_cast<std::string::size_type>(0), 1, '+');
- str.append(e);
- }
- if(neg)
- str.insert(static_cast<std::string::size_type>(0), 1, '-');
- else if(showpos)
- str.insert(static_cast<std::string::size_type>(0), 1, '+');
-}
-
-template <class V>
-void check_shift_range(V val, const mpl::true_&, const mpl::true_&)
-{
- if(val > (std::numeric_limits<std::size_t>::max)())
- BOOST_THROW_EXCEPTION(std::out_of_range("Can not shift by a value greater than std::numeric_limits<std::size_t>::max()."));
- if(val < 0)
- BOOST_THROW_EXCEPTION(std::out_of_range("Can not shift by a negative value."));
-}
-template <class V>
-void check_shift_range(V val, const mpl::false_&, const mpl::true_&)
-{
- if(val < 0)
- BOOST_THROW_EXCEPTION(std::out_of_range("Can not shift by a negative value."));
-}
-template <class V>
-void check_shift_range(V val, const mpl::true_&, const mpl::false_&)
-{
- if(val > (std::numeric_limits<std::size_t>::max)())
- BOOST_THROW_EXCEPTION(std::out_of_range("Can not shift by a value greater than std::numeric_limits<std::size_t>::max()."));
-}
-template <class V>
-void check_shift_range(V, const mpl::false_&, const mpl::false_&) BOOST_NOEXCEPT{}
-
-template <class T>
-const T& evaluate_if_expression(const T& val) { return val; }
-template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
-typename expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type evaluate_if_expression(const expression<tag, Arg1, Arg2, Arg3, Arg4>& val) { return val; }
-
-
-} // namespace detail
-
-//
-// Traits class, lets us know what kind of number we have, defaults to a floating point type:
-//
-enum number_category_type
-{
- number_kind_unknown = -1,
- number_kind_integer = 0,
- number_kind_floating_point = 1,
- number_kind_rational = 2,
- number_kind_fixed_point = 3,
- number_kind_complex = 4
-};
-
-template <class Num>
-struct number_category : public mpl::int_<std::numeric_limits<Num>::is_integer ? number_kind_integer : (std::numeric_limits<Num>::max_exponent ? number_kind_floating_point : number_kind_unknown)> {};
-template <class Backend, expression_template_option ExpressionTemplates>
-struct number_category<number<Backend, ExpressionTemplates> > : public number_category<Backend>{};
-template <class tag, class A1, class A2, class A3, class A4>
-struct number_category<detail::expression<tag, A1, A2, A3, A4> > : public number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>{};
-//
-// Specializations for types which do not always have numberic_limits specializations:
-//
-#ifdef BOOST_HAS_INT128
-template <>
-struct number_category<__int128> : public mpl::int_<number_kind_integer> {};
-template <>
-struct number_category<unsigned __int128> : public mpl::int_<number_kind_integer> {};
-#endif
-#ifdef BOOST_HAS_FLOAT128
-template <>
-struct number_category<__float128> : public mpl::int_<number_kind_floating_point> {};
-#endif
-
-template <class T>
-struct component_type { typedef T type; };
-template <class tag, class A1, class A2, class A3, class A4>
-struct component_type<detail::expression<tag, A1, A2, A3, A4> > : public component_type<typename detail::expression<tag, A1, A2, A3, A4>::result_type>{};
-
-template <class T>
-struct scalar_result_from_possible_complex
-{
- typedef typename mpl::if_c<number_category<T>::value == number_kind_complex,
- typename component_type<T>::type, T>::type type;
-};
-
-template <class T>
-struct complex_result_from_scalar; // individual backends must specialize this trait.
-
-template <class T>
-struct is_unsigned_number : public mpl::false_{};
-template <class Backend, expression_template_option ExpressionTemplates>
-struct is_unsigned_number<number<Backend, ExpressionTemplates> > : public is_unsigned_number<Backend> {};
-template <class T>
-struct is_signed_number : public mpl::bool_<!is_unsigned_number<T>::value> {};
-template <class T>
-struct is_interval_number : public mpl::false_ {};
-template <class Backend, expression_template_option ExpressionTemplates>
-struct is_interval_number<number<Backend, ExpressionTemplates> > : public is_interval_number<Backend>{};
-
-}} // namespaces
-
-namespace boost{ namespace math{ namespace tools{
-
-template <class T>
-struct promote_arg;
-
-template <class tag, class A1, class A2, class A3, class A4>
-struct promote_arg<boost::multiprecision::detail::expression<tag, A1, A2, A3, A4> >
-{
- typedef typename boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type type;
-};
-
-template <class R, class B, boost::multiprecision::expression_template_option ET>
-inline R real_cast(const boost::multiprecision::number<B, ET>& val)
-{
- return val.template convert_to<R>();
-}
-
-template <class R, class tag, class A1, class A2, class A3, class A4>
-inline R real_cast(const boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>& val)
-{
- typedef typename boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type val_type;
- return val_type(val).template convert_to<R>();
-}
-
-
-}
-
-namespace constants{
-
- template <class T>
- struct is_explicitly_convertible_from_string;
-
- template <class B, boost::multiprecision::expression_template_option ET>
- struct is_explicitly_convertible_from_string<boost::multiprecision::number<B, ET> >
- {
- static const bool value = true;
- };
-
-}
-
-}}
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#endif // BOOST_MATH_BIG_NUM_BASE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/number.hpp b/src/third_party/boost-1.68.0/boost/multiprecision/number.hpp
deleted file mode 100644
index 6ea0673a9f8..00000000000
--- a/src/third_party/boost-1.68.0/boost/multiprecision/number.hpp
+++ /dev/null
@@ -1,1987 +0,0 @@
-///////////////////////////////////////////////////////////////////////////////
-// Copyright 2011 John Maddock. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_MATH_EXTENDED_REAL_HPP
-#define BOOST_MATH_EXTENDED_REAL_HPP
-
-#include <boost/cstdint.hpp>
-#include <boost/mpl/max.hpp>
-#include <boost/mpl/plus.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/mpl/find_if.hpp>
-#include <boost/assert.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/type_traits/is_signed.hpp>
-#include <boost/type_traits/is_unsigned.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_complex.hpp>
-#include <boost/type_traits/make_unsigned.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/multiprecision/detail/generic_interconvert.hpp>
-#include <boost/multiprecision/detail/number_compare.hpp>
-#include <boost/multiprecision/traits/is_restricted_conversion.hpp>
-#include <boost/container_hash/hash.hpp>
-#include <istream> // stream operators
-#include <cstdio> // EOF
-#include <cctype> // isspace
-
-namespace boost{ namespace multiprecision{
-
-#ifdef BOOST_MSVC
-// warning C4127: conditional expression is constant
-// warning C4714: function marked as __forceinline not inlined
-#pragma warning(push)
-#pragma warning(disable:4127 4714 6326)
-#endif
-
-template <class Backend, expression_template_option ExpressionTemplates>
-class number
-{
- typedef number<Backend, ExpressionTemplates> self_type;
-public:
- typedef Backend backend_type;
- typedef typename component_type<self_type>::type value_type;
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number() BOOST_MP_NOEXCEPT_IF(noexcept(Backend())) {}
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const number& e) BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend const&>()))) : m_backend(e.m_backend){}
- template <class V>
- BOOST_MP_FORCEINLINE number(const V& v, typename boost::enable_if_c<
- (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value)
- && !is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value
- && !detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
-#ifdef BOOST_HAS_FLOAT128
- && !boost::is_same<V, __float128>::value
-#endif
- >::type* = 0)
- {
- m_backend = canonical_value(v);
- }
- template <class V>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const V& v, typename boost::enable_if_c<
- is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value
- && !detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
- >::type* = 0)
-#ifndef BOOST_INTEL
- BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<typename detail::canonical<V, Backend>::type const&>())))
-#endif
- : m_backend(canonical_value(v)) {}
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const number& e, unsigned digits10)
- BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend const&>(), std::declval<unsigned>())))
- : m_backend(e.m_backend, digits10){}
- template <class V>
- explicit BOOST_MP_FORCEINLINE number(const V& v, typename boost::enable_if_c<
- (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value)
- && !detail::is_explicitly_convertible<typename detail::canonical<V, Backend>::type, Backend>::value
- && detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
- >::type* = 0)
- BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<typename detail::canonical<V, Backend>::type const&>()))
- {
- m_backend = canonical_value(v);
- }
- template <class V>
- explicit BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const V& v, typename boost::enable_if_c<
- detail::is_explicitly_convertible<typename detail::canonical<V, Backend>::type, Backend>::value
- && (detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
- || !is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value)
- >::type* = 0)
- BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<typename detail::canonical<V, Backend>::type const&>())))
- : m_backend(canonical_value(v)) {}
- /*
- //
- // This conflicts with component based initialization (for rational and complex types)
- // which is arguably more useful. Disabled for now.
- //
- template <class V>
- number(V v, unsigned digits10, typename boost::enable_if<mpl::or_<boost::is_arithmetic<V>, is_same<std::string, V>, is_convertible<V, const char*> > >::type* dummy1 = 0)
- {
- m_backend.precision(digits10);
- m_backend = canonical_value(v);
- }
- */
- template<expression_template_option ET>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const number<Backend, ET>& val)
- BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend const&>()))) : m_backend(val.backend()) {}
-
- template <class Other, expression_template_option ET>
- BOOST_MP_FORCEINLINE number(const number<Other, ET>& val,
- typename boost::enable_if_c<(boost::is_convertible<Other, Backend>::value && !detail::is_restricted_conversion<Other, Backend>::value)>::type* = 0)
- BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Other const&>())))
- : m_backend(val.backend()) {}
-
- template <class Other, expression_template_option ET>
- explicit number(const number<Other, ET>& val, typename boost::enable_if_c<
- (!detail::is_explicitly_convertible<Other, Backend>::value)
- >::type* = 0)
- {
- //
- // Attempt a generic interconvertion:
- //
- using detail::generic_interconvert;
- generic_interconvert(backend(), val.backend(), number_category<Backend>(), number_category<Other>());
- }
- template <class Other, expression_template_option ET>
- explicit BOOST_MP_FORCEINLINE number(const number<Other, ET>& val, typename boost::enable_if_c<
- (detail::is_explicitly_convertible<Other, Backend>::value
- && (detail::is_restricted_conversion<Other, Backend>::value || !boost::is_convertible<Other, Backend>::value))
- >::type* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Other const&>())))
- : m_backend(val.backend()) {}
-
- template <class V, class U>
- BOOST_MP_FORCEINLINE number(const V& v1, const U& v2,
- typename boost::enable_if_c<(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value && !is_same<typename component_type<self_type>::type, self_type>::value)>::type* = 0)
- {
- using default_ops::assign_components;
- assign_components(m_backend, canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2)));
- }
- template <class V, class U>
- BOOST_MP_FORCEINLINE explicit number(const V& v1, const U& v2,
- typename boost::enable_if_c<((is_constructible<value_type, V>::value || is_convertible<V, std::string>::value) && (is_constructible<value_type, U>::value || is_convertible<U, std::string>::value) && !is_same<typename component_type<self_type>::type, self_type>::value) && !(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value)>::type* = 0)
- {
- using default_ops::assign_components;
- assign_components(m_backend, canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2)));
- }
-
- template <class Other, expression_template_option ET>
- BOOST_MP_FORCEINLINE number(const number<Other, ET>& v1, const number<Other, ET>& v2, typename boost::enable_if<boost::is_convertible<Other, Backend> >::type* = 0)
- {
- using default_ops::assign_components;
- assign_components(m_backend, v1.backend(), v2.backend());
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- typedef typename is_same<number, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::type tag_type;
- do_assign(e, tag_type());
- return *this;
- }
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- number& assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- typedef typename is_same<number, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::type tag_type;
- do_assign(e, tag_type());
- return *this;
- }
-
- BOOST_MP_FORCEINLINE number& operator=(const number& e)
- BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<Backend const&>()))
- {
- m_backend = e.m_backend;
- return *this;
- }
-
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if<is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator=(const V& v)
- BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<const typename detail::canonical<V, Backend>::type&>()))
- {
- m_backend = canonical_value(v);
- return *this;
- }
- template <class V>
- BOOST_MP_FORCEINLINE number<Backend, ExpressionTemplates>& assign(const V& v)
- BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<const typename detail::canonical<V, Backend>::type&>()))
- {
- m_backend = canonical_value(v);
- return *this;
- }
- template <class Other, expression_template_option ET>
- typename boost::disable_if<boost::multiprecision::detail::is_explicitly_convertible<Other, Backend>, number<Backend, ExpressionTemplates>& >::type
- assign(const number<Other, ET>& v)
- {
- //
- // Attempt a generic interconvertion:
- //
- using detail::generic_interconvert;
- generic_interconvert(backend(), v.backend(), number_category<Backend>(), number_category<Other>());
- return *this;
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- number(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, typename boost::enable_if_c<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value>::type* = 0)
- {
- *this = e;
- }
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- explicit number(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e,
- typename boost::enable_if_c<!is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value
- && boost::multiprecision::detail::is_explicitly_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value>::type* = 0)
- {
- assign(e);
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(number&& r)
- BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend>())))
- : m_backend(static_cast<Backend&&>(r.m_backend)){}
- BOOST_MP_FORCEINLINE number& operator=(number&& r) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<Backend>()))
- {
- m_backend = static_cast<Backend&&>(r.m_backend);
- return *this;
- }
-#endif
-
- number& operator+=(const self_type& val)
- {
- do_add(detail::expression<detail::terminal, self_type>(val), detail::terminal());
- return *this;
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator+=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- // Create a copy if e contains this, but not if we're just doing a
- // x += x
- if(contains_self(e) && !is_self(e))
- {
- self_type temp(e);
- do_add(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
- else
- {
- do_add(e, tag());
- }
- return *this;
- }
-
- template <class Arg1, class Arg2, class Arg3, class Arg4>
- number& operator+=(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& e)
- {
- //
- // Fused multiply-add:
- //
- using default_ops::eval_multiply_add;
- eval_multiply_add(m_backend, canonical_value(e.left_ref()), canonical_value(e.right_ref()));
- return *this;
- }
-
- template <class V>
- typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator+=(const V& v)
- {
- using default_ops::eval_add;
- eval_add(m_backend, canonical_value(v));
- return *this;
- }
-
- number& operator-=(const self_type& val)
- {
- do_subtract(detail::expression<detail::terminal, self_type>(val), detail::terminal());
- return *this;
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator-=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- // Create a copy if e contains this:
- if(contains_self(e))
- {
- self_type temp(e);
- do_subtract(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
- else
- {
- do_subtract(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
- }
- return *this;
- }
-
- template <class V>
- typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator-=(const V& v)
- {
- using default_ops::eval_subtract;
- eval_subtract(m_backend, canonical_value(v));
- return *this;
- }
-
- template <class Arg1, class Arg2, class Arg3, class Arg4>
- number& operator-=(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& e)
- {
- //
- // Fused multiply-subtract:
- //
- using default_ops::eval_multiply_subtract;
- eval_multiply_subtract(m_backend, canonical_value(e.left_ref()), canonical_value(e.right_ref()));
- return *this;
- }
-
-
- number& operator *= (const self_type& e)
- {
- do_multiplies(detail::expression<detail::terminal, self_type>(e), detail::terminal());
- return *this;
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator*=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- // Create a temporary if the RHS references *this, but not
- // if we're just doing an x *= x;
- if(contains_self(e) && !is_self(e))
- {
- self_type temp(e);
- do_multiplies(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
- else
- {
- do_multiplies(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
- }
- return *this;
- }
-
- template <class V>
- typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator*=(const V& v)
- {
- using default_ops::eval_multiply;
- eval_multiply(m_backend, canonical_value(v));
- return *this;
- }
-
- number& operator%=(const self_type& e)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
- do_modulus(detail::expression<detail::terminal, self_type>(e), detail::terminal());
- return *this;
- }
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator%=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
- // Create a temporary if the RHS references *this:
- if(contains_self(e))
- {
- self_type temp(e);
- do_modulus(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
- else
- {
- do_modulus(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
- }
- return *this;
- }
- template <class V>
- typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator%=(const V& v)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
- using default_ops::eval_modulus;
- eval_modulus(m_backend, canonical_value(v));
- return *this;
- }
-
- //
- // These operators are *not* proto-ized.
- // The issue is that the increment/decrement must happen
- // even if the result of the operator *is never used*.
- // Possibly we could modify our expression wrapper to
- // execute the increment/decrement on destruction, but
- // correct implementation will be tricky, so defered for now...
- //
- BOOST_MP_FORCEINLINE number& operator++()
- {
- using default_ops::eval_increment;
- eval_increment(m_backend);
- return *this;
- }
-
- BOOST_MP_FORCEINLINE number& operator--()
- {
- using default_ops::eval_decrement;
- eval_decrement(m_backend);
- return *this;
- }
-
- inline number operator++(int)
- {
- using default_ops::eval_increment;
- self_type temp(*this);
- eval_increment(m_backend);
- return BOOST_MP_MOVE(temp);
- }
-
- inline number operator--(int)
- {
- using default_ops::eval_decrement;
- self_type temp(*this);
- eval_decrement(m_backend);
- return BOOST_MP_MOVE(temp);
- }
-
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if<is_integral<V>, number&>::type operator <<= (V val)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The left-shift operation is only valid for integer types");
- detail::check_shift_range(val, mpl::bool_<(sizeof(V) > sizeof(std::size_t))>(), is_signed<V>());
- eval_left_shift(m_backend, static_cast<std::size_t>(canonical_value(val)));
- return *this;
- }
-
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if<is_integral<V>, number&>::type operator >>= (V val)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The right-shift operation is only valid for integer types");
- detail::check_shift_range(val, mpl::bool_<(sizeof(V) > sizeof(std::size_t))>(), is_signed<V>());
- eval_right_shift(m_backend, static_cast<std::size_t>(canonical_value(val)));
- return *this;
- }
-
- BOOST_MP_FORCEINLINE number& operator /= (const self_type& e)
- {
- do_divide(detail::expression<detail::terminal, self_type>(e), detail::terminal());
- return *this;
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator/=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- // Create a temporary if the RHS references *this:
- if(contains_self(e))
- {
- self_type temp(e);
- do_divide(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
- else
- {
- do_divide(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
- }
- return *this;
- }
-
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator/=(const V& v)
- {
- using default_ops::eval_divide;
- eval_divide(m_backend, canonical_value(v));
- return *this;
- }
-
- BOOST_MP_FORCEINLINE number& operator&=(const self_type& e)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
- do_bitwise_and(detail::expression<detail::terminal, self_type>(e), detail::terminal());
- return *this;
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator&=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
- // Create a temporary if the RHS references *this, but not
- // if we're just doing an x &= x;
- if(contains_self(e) && !is_self(e))
- {
- self_type temp(e);
- do_bitwise_and(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
- else
- {
- do_bitwise_and(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
- }
- return *this;
- }
-
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator&=(const V& v)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(m_backend, canonical_value(v));
- return *this;
- }
-
- BOOST_MP_FORCEINLINE number& operator|=(const self_type& e)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
- do_bitwise_or(detail::expression<detail::terminal, self_type>(e), detail::terminal());
- return *this;
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator|=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
- // Create a temporary if the RHS references *this, but not
- // if we're just doing an x |= x;
- if(contains_self(e) && !is_self(e))
- {
- self_type temp(e);
- do_bitwise_or(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
- else
- {
- do_bitwise_or(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
- }
- return *this;
- }
-
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator|=(const V& v)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(m_backend, canonical_value(v));
- return *this;
- }
-
- BOOST_MP_FORCEINLINE number& operator^=(const self_type& e)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
- do_bitwise_xor(detail::expression<detail::terminal, self_type>(e), detail::terminal());
- return *this;
- }
-
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator^=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
- if(contains_self(e))
- {
- self_type temp(e);
- do_bitwise_xor(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
- else
- {
- do_bitwise_xor(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
- }
- return *this;
- }
-
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
- operator^=(const V& v)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(m_backend, canonical_value(v));
- return *this;
- }
- //
- // swap:
- //
- BOOST_MP_FORCEINLINE void swap(self_type& other) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend>().swap(std::declval<Backend&>())))
- {
- m_backend.swap(other.backend());
- }
- //
- // Zero and sign:
- //
- BOOST_MP_FORCEINLINE bool is_zero()const
- {
- using default_ops::eval_is_zero;
- return eval_is_zero(m_backend);
- }
- BOOST_MP_FORCEINLINE int sign()const
- {
- using default_ops::eval_get_sign;
- return eval_get_sign(m_backend);
- }
- //
- // String conversion functions:
- //
- std::string str(std::streamsize digits = 0, std::ios_base::fmtflags f = std::ios_base::fmtflags(0))const
- {
- return m_backend.str(digits, f);
- }
- template<class Archive>
- void serialize(Archive & ar, const unsigned int /*version*/)
- {
- ar & m_backend;
- }
-private:
- template <class T>
- void convert_to_imp(T* result)const
- {
- using default_ops::eval_convert_to;
- eval_convert_to(result, m_backend);
- }
- template <class B2, expression_template_option ET>
- void convert_to_imp(number<B2, ET>* result)const
- {
- result->assign(*this);
- }
- void convert_to_imp(std::string* result)const
- {
- *result = this->str();
- }
-public:
- template <class T>
- T convert_to()const
- {
- T result;
- convert_to_imp(&result);
- return result;
- }
- //
- // Use in boolean context, and explicit conversion operators:
- //
-#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
-# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
- //
- // Horrible workaround for gcc-4.6.x which always prefers the template
- // operator bool() rather than the non-template operator when converting to
- // an arithmetic type:
- //
- template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
- explicit operator T ()const
- {
- using default_ops::eval_is_zero;
- return !eval_is_zero(backend());
- }
- template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value, int>::type = 0>
- explicit operator T ()const
- {
- return this->template convert_to<T>();
- }
-# else
-#if BOOST_WORKAROUND(BOOST_MSVC, < 1900) || (defined(__APPLE_CC__) && BOOST_WORKAROUND(__clang_major__, < 9))
- template <class T>
-#else
- template <class T, class = typename boost::disable_if_c<boost::is_constructible<T, self_type const&>::value || !boost::is_default_constructible<T>::value || (!boost::is_arithmetic<T>::value && !boost::is_complex<T>::value), T>::type>
-#endif
- explicit operator T ()const
- {
- return this->template convert_to<T>();
- }
- BOOST_MP_FORCEINLINE explicit operator bool()const
- {
- return !is_zero();
- }
-#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
- BOOST_MP_FORCEINLINE explicit operator void()const {}
-#endif
-# endif
-#else
- typedef bool (self_type::*unmentionable_type)()const;
-
- BOOST_MP_FORCEINLINE operator unmentionable_type()const
- {
- return is_zero() ? 0 : &self_type::is_zero;
- }
-#endif
- //
- // Default precision:
- //
- static unsigned default_precision() BOOST_NOEXCEPT
- {
- return Backend::default_precision();
- }
- static void default_precision(unsigned digits10)
- {
- Backend::default_precision(digits10);
- }
- unsigned precision()const BOOST_NOEXCEPT
- {
- return m_backend.precision();
- }
- void precision(unsigned digits10)
- {
- m_backend.precision(digits10);
- }
- //
- // Comparison:
- //
- BOOST_MP_FORCEINLINE int compare(const number<Backend, ExpressionTemplates>& o)const
- BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend>().compare(std::declval<Backend>())))
- {
- return m_backend.compare(o.m_backend);
- }
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if_c<is_arithmetic<V>::value && (number_category<Backend>::value != number_kind_complex), int>::type compare(const V& o)const
- {
- using default_ops::eval_get_sign;
- if(o == 0)
- return eval_get_sign(m_backend);
- return m_backend.compare(canonical_value(o));
- }
- template <class V>
- BOOST_MP_FORCEINLINE typename boost::enable_if_c<is_arithmetic<V>::value && (number_category<Backend>::value == number_kind_complex), int>::type compare(const V& o)const
- {
- using default_ops::eval_get_sign;
- return m_backend.compare(canonical_value(o));
- }
- //
- // Direct access to the underlying backend:
- //
- BOOST_MP_FORCEINLINE Backend& backend() BOOST_NOEXCEPT
- {
- return m_backend;
- }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& backend()const BOOST_NOEXCEPT
- {
- return m_backend;
- }
- //
- // Complex number real and imag:
- //
- typename scalar_result_from_possible_complex<number<Backend, ExpressionTemplates> >::type
- real()const
- {
- using default_ops::eval_real;
- typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result;
- eval_real(result.backend(), backend());
- return result;
- }
- typename scalar_result_from_possible_complex<number<Backend, ExpressionTemplates> >::type
- imag()const
- {
- using default_ops::eval_imag;
- typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result;
- eval_imag(result.backend(), backend());
- return result;
- }
- template <class T>
- inline typename enable_if_c<boost::is_convertible<T, self_type>::value, self_type&>::type real(const T& val)
- {
- using default_ops::eval_set_real;
- eval_set_real(backend(), canonical_value(val));
- return *this;
- }
- template <class T>
- inline typename enable_if_c<boost::is_convertible<T, self_type>::value && number_category<self_type>::value == number_kind_complex, self_type&>::type imag(const T& val)
- {
- using default_ops::eval_set_imag;
- eval_set_imag(backend(), canonical_value(val));
- return *this;
- }
-private:
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- void do_assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, const mpl::true_&)
- {
- do_assign(e, tag());
- }
- template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
- void do_assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, const mpl::false_&)
- {
- // The result of the expression isn't the same type as this -
- // create a temporary result and assign it to *this:
- typedef typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type temp_type;
- temp_type t(e);
- this->assign(t);
- }
-
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::add_immediates&)
- {
- using default_ops::eval_add;
- eval_add(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::subtract_immediates&)
- {
- using default_ops::eval_subtract;
- eval_subtract(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::multiply_immediates&)
- {
- using default_ops::eval_multiply;
- eval_multiply(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::multiply_add&)
- {
- using default_ops::eval_multiply_add;
- eval_multiply_add(m_backend, canonical_value(e.left().value()), canonical_value(e.middle().value()), canonical_value(e.right().value()));
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::multiply_subtract&)
- {
- using default_ops::eval_multiply_subtract;
- eval_multiply_subtract(m_backend, canonical_value(e.left().value()), canonical_value(e.middle().value()), canonical_value(e.right().value()));
- }
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::divide_immediates&)
- {
- using default_ops::eval_divide;
- eval_divide(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
- }
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::negate&)
- {
- typedef typename Exp::left_type left_type;
- do_assign(e.left(), typename left_type::tag_type());
- m_backend.negate();
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::plus&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
-
- static int const left_depth = left_type::depth;
- static int const right_depth = right_type::depth;
-
- bool bl = contains_self(e.left());
- bool br = contains_self(e.right());
-
- if(bl && br)
- {
- self_type temp(e);
- temp.m_backend.swap(this->m_backend);
- }
- else if(bl && is_self(e.left()))
- {
- // Ignore the left node, it's *this, just add the right:
- do_add(e.right(), typename right_type::tag_type());
- }
- else if(br && is_self(e.right()))
- {
- // Ignore the right node, it's *this, just add the left:
- do_add(e.left(), typename left_type::tag_type());
- }
- else if(!br && (bl || (left_depth >= right_depth)))
- { // br is always false, but if bl is true we must take the this branch:
- do_assign(e.left(), typename left_type::tag_type());
- do_add(e.right(), typename right_type::tag_type());
- }
- else
- {
- do_assign(e.right(), typename right_type::tag_type());
- do_add(e.left(), typename left_type::tag_type());
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::minus&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
-
- static int const left_depth = left_type::depth;
- static int const right_depth = right_type::depth;
-
- bool bl = contains_self(e.left());
- bool br = contains_self(e.right());
-
- if(bl && br)
- {
- self_type temp(e);
- temp.m_backend.swap(this->m_backend);
- }
- else if(bl && is_self(e.left()))
- {
- // Ignore the left node, it's *this, just subtract the right:
- do_subtract(e.right(), typename right_type::tag_type());
- }
- else if(br && is_self(e.right()))
- {
- // Ignore the right node, it's *this, just subtract the left and negate the result:
- do_subtract(e.left(), typename left_type::tag_type());
- m_backend.negate();
- }
- else if(!br && (bl || (left_depth >= right_depth)))
- { // br is always false, but if bl is true we must take the this branch:
- do_assign(e.left(), typename left_type::tag_type());
- do_subtract(e.right(), typename right_type::tag_type());
- }
- else
- {
- do_assign(e.right(), typename right_type::tag_type());
- do_subtract(e.left(), typename left_type::tag_type());
- m_backend.negate();
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::multiplies&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
-
- static int const left_depth = left_type::depth;
- static int const right_depth = right_type::depth;
-
- bool bl = contains_self(e.left());
- bool br = contains_self(e.right());
-
- if(bl && br)
- {
- self_type temp(e);
- temp.m_backend.swap(this->m_backend);
- }
- else if(bl && is_self(e.left()))
- {
- // Ignore the left node, it's *this, just add the right:
- do_multiplies(e.right(), typename right_type::tag_type());
- }
- else if(br && is_self(e.right()))
- {
- // Ignore the right node, it's *this, just add the left:
- do_multiplies(e.left(), typename left_type::tag_type());
- }
- else if(!br && (bl || (left_depth >= right_depth)))
- { // br is always false, but if bl is true we must take the this branch:
- do_assign(e.left(), typename left_type::tag_type());
- do_multiplies(e.right(), typename right_type::tag_type());
- }
- else
- {
- do_assign(e.right(), typename right_type::tag_type());
- do_multiplies(e.left(), typename left_type::tag_type());
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::divides&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
-
- bool bl = contains_self(e.left());
- bool br = contains_self(e.right());
-
- if(bl && is_self(e.left()))
- {
- // Ignore the left node, it's *this, just add the right:
- do_divide(e.right(), typename right_type::tag_type());
- }
- else if(br)
- {
- self_type temp(e);
- temp.m_backend.swap(this->m_backend);
- }
- else
- {
- do_assign(e.left(), typename left_type::tag_type());
- do_divide(e.right(), typename right_type::tag_type());
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::modulus&)
- {
- //
- // This operation is only valid for integer backends:
- //
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
-
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
-
- bool bl = contains_self(e.left());
- bool br = contains_self(e.right());
-
- if(bl && is_self(e.left()))
- {
- // Ignore the left node, it's *this, just add the right:
- do_modulus(e.right(), typename right_type::tag_type());
- }
- else if(br)
- {
- self_type temp(e);
- temp.m_backend.swap(this->m_backend);
- }
- else
- {
- do_assign(e.left(), typename left_type::tag_type());
- do_modulus(e.right(), typename right_type::tag_type());
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::modulus_immediates&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
- using default_ops::eval_modulus;
- eval_modulus(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
- }
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::bitwise_and&)
- {
- //
- // This operation is only valid for integer backends:
- //
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
-
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
-
- static int const left_depth = left_type::depth;
- static int const right_depth = right_type::depth;
-
- bool bl = contains_self(e.left());
- bool br = contains_self(e.right());
-
- if(bl && is_self(e.left()))
- {
- // Ignore the left node, it's *this, just add the right:
- do_bitwise_and(e.right(), typename right_type::tag_type());
- }
- else if(br && is_self(e.right()))
- {
- do_bitwise_and(e.left(), typename left_type::tag_type());
- }
- else if(!br && (bl || (left_depth >= right_depth)))
- {
- do_assign(e.left(), typename left_type::tag_type());
- do_bitwise_and(e.right(), typename right_type::tag_type());
- }
- else
- {
- do_assign(e.right(), typename right_type::tag_type());
- do_bitwise_and(e.left(), typename left_type::tag_type());
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::bitwise_and_immediates&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
- }
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::bitwise_or&)
- {
- //
- // This operation is only valid for integer backends:
- //
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
-
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
-
- static int const left_depth = left_type::depth;
- static int const right_depth = right_type::depth;
-
- bool bl = contains_self(e.left());
- bool br = contains_self(e.right());
-
- if(bl && is_self(e.left()))
- {
- // Ignore the left node, it's *this, just add the right:
- do_bitwise_or(e.right(), typename right_type::tag_type());
- }
- else if(br && is_self(e.right()))
- {
- do_bitwise_or(e.left(), typename left_type::tag_type());
- }
- else if(!br && (bl || (left_depth >= right_depth)))
- {
- do_assign(e.left(), typename left_type::tag_type());
- do_bitwise_or(e.right(), typename right_type::tag_type());
- }
- else
- {
- do_assign(e.right(), typename right_type::tag_type());
- do_bitwise_or(e.left(), typename left_type::tag_type());
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::bitwise_or_immediates&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
- }
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::bitwise_xor&)
- {
- //
- // This operation is only valid for integer backends:
- //
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
-
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
-
- static int const left_depth = left_type::depth;
- static int const right_depth = right_type::depth;
-
- bool bl = contains_self(e.left());
- bool br = contains_self(e.right());
-
- if(bl && is_self(e.left()))
- {
- // Ignore the left node, it's *this, just add the right:
- do_bitwise_xor(e.right(), typename right_type::tag_type());
- }
- else if(br && is_self(e.right()))
- {
- do_bitwise_xor(e.left(), typename left_type::tag_type());
- }
- else if(!br && (bl || (left_depth >= right_depth)))
- {
- do_assign(e.left(), typename left_type::tag_type());
- do_bitwise_xor(e.right(), typename right_type::tag_type());
- }
- else
- {
- do_assign(e.right(), typename right_type::tag_type());
- do_bitwise_xor(e.left(), typename left_type::tag_type());
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::bitwise_xor_immediates&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::terminal&)
- {
- if(!is_self(e))
- {
- m_backend = canonical_value(e.value());
- }
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::function&)
- {
- typedef typename Exp::arity tag_type;
- do_assign_function(e, tag_type());
- }
- template <class Exp>
- void do_assign(const Exp& e, const detail::shift_left&)
- {
- // We can only shift by an integer value, not an arbitrary expression:
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- typedef typename right_type::arity right_arity;
- BOOST_STATIC_ASSERT_MSG(right_arity::value == 0, "The left shift operator requires an integer value for the shift operand.");
- typedef typename right_type::result_type right_value_type;
- BOOST_STATIC_ASSERT_MSG(is_integral<right_value_type>::value, "The left shift operator requires an integer value for the shift operand.");
- typedef typename left_type::tag_type tag_type;
- do_assign_left_shift(e.left(), canonical_value(e.right().value()), tag_type());
- }
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::shift_right&)
- {
- // We can only shift by an integer value, not an arbitrary expression:
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- typedef typename right_type::arity right_arity;
- BOOST_STATIC_ASSERT_MSG(right_arity::value == 0, "The left shift operator requires an integer value for the shift operand.");
- typedef typename right_type::result_type right_value_type;
- BOOST_STATIC_ASSERT_MSG(is_integral<right_value_type>::value, "The left shift operator requires an integer value for the shift operand.");
- typedef typename left_type::tag_type tag_type;
- do_assign_right_shift(e.left(), canonical_value(e.right().value()), tag_type());
- }
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::bitwise_complement&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ~ operation is only valid for integer types");
- using default_ops::eval_complement;
- self_type temp(e.left());
- eval_complement(m_backend, temp.backend());
- }
-
- template <class Exp>
- void do_assign(const Exp& e, const detail::complement_immediates&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ~ operation is only valid for integer types");
- using default_ops::eval_complement;
- eval_complement(m_backend, canonical_value(e.left().value()));
- }
-
- template <class Exp, class Val>
- void do_assign_right_shift(const Exp& e, const Val& val, const detail::terminal&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The right shift operation is only valid for integer types");
- using default_ops::eval_right_shift;
- detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>());
- eval_right_shift(m_backend, canonical_value(e.value()), static_cast<std::size_t>(val));
- }
-
- template <class Exp, class Val>
- void do_assign_left_shift(const Exp& e, const Val& val, const detail::terminal&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The left shift operation is only valid for integer types");
- using default_ops::eval_left_shift;
- detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>());
- eval_left_shift(m_backend, canonical_value(e.value()), static_cast<std::size_t>(val));
- }
-
- template <class Exp, class Val, class Tag>
- void do_assign_right_shift(const Exp& e, const Val& val, const Tag&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The right shift operation is only valid for integer types");
- using default_ops::eval_right_shift;
- self_type temp(e);
- detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>());
- eval_right_shift(m_backend, temp.backend(), static_cast<std::size_t>(val));
- }
-
- template <class Exp, class Val, class Tag>
- void do_assign_left_shift(const Exp& e, const Val& val, const Tag&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The left shift operation is only valid for integer types");
- using default_ops::eval_left_shift;
- self_type temp(e);
- detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>());
- eval_left_shift(m_backend, temp.backend(), static_cast<std::size_t>(val));
- }
-
- template <class Exp>
- void do_assign_function(const Exp& e, const mpl::int_<1>&)
- {
- e.left().value()(&m_backend);
- }
- template <class Exp>
- void do_assign_function(const Exp& e, const mpl::int_<2>&)
- {
- typedef typename Exp::right_type right_type;
- typedef typename right_type::tag_type tag_type;
- do_assign_function_1(e.left().value(), e.right_ref(), tag_type());
- }
- template <class F, class Exp>
- void do_assign_function_1(const F& f, const Exp& val, const detail::terminal&)
- {
- f(m_backend, function_arg_value(val));
- }
- template <class F, class Exp, class Tag>
- void do_assign_function_1(const F& f, const Exp& val, const Tag&)
- {
- typename Exp::result_type t(val);
- f(m_backend, t.backend());
- }
- template <class Exp>
- void do_assign_function(const Exp& e, const mpl::int_<3>&)
- {
- typedef typename Exp::middle_type middle_type;
- typedef typename middle_type::tag_type tag_type;
- typedef typename Exp::right_type end_type;
- typedef typename end_type::tag_type end_tag;
- do_assign_function_2(e.left().value(), e.middle_ref(), e.right_ref(), tag_type(), end_tag());
- }
- template <class F, class Exp1, class Exp2>
- void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const detail::terminal&, const detail::terminal&)
- {
- f(m_backend, function_arg_value(val1), function_arg_value(val2));
- }
- template <class F, class Exp1, class Exp2, class Tag1>
- void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const Tag1&, const detail::terminal&)
- {
- typename Exp1::result_type temp1(val1);
- f(m_backend, BOOST_MP_MOVE(temp1.backend()), function_arg_value(val2));
- }
- template <class F, class Exp1, class Exp2, class Tag2>
- void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const detail::terminal&, const Tag2&)
- {
- typename Exp2::result_type temp2(val2);
- f(m_backend, function_arg_value(val1), BOOST_MP_MOVE(temp2.backend()));
- }
- template <class F, class Exp1, class Exp2, class Tag1, class Tag2>
- void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const Tag1&, const Tag2&)
- {
- typename Exp1::result_type temp1(val1);
- typename Exp2::result_type temp2(val2);
- f(m_backend, BOOST_MP_MOVE(temp1.backend()), BOOST_MP_MOVE(temp2.backend()));
- }
-
- template <class Exp>
- void do_assign_function(const Exp& e, const mpl::int_<4>&)
- {
- typedef typename Exp::left_middle_type left_type;
- typedef typename left_type::tag_type left_tag_type;
- typedef typename Exp::right_middle_type middle_type;
- typedef typename middle_type::tag_type middle_tag_type;
- typedef typename Exp::right_type right_type;
- typedef typename right_type::tag_type right_tag_type;
- do_assign_function_3a(e.left().value(), e.left_middle_ref(), e.right_middle_ref(), e.right_ref(), left_tag_type(), middle_tag_type(), right_tag_type());
- }
- template <class F, class Exp1, class Exp2, class Exp3, class Tag2, class Tag3>
- void do_assign_function_3a(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&, const Tag2& t2, const Tag3& t3)
- {
- do_assign_function_3b(f, val1, val2, val3, t2, t3);
- }
- template <class F, class Exp1, class Exp2, class Exp3, class Tag1, class Tag2, class Tag3>
- void do_assign_function_3a(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag1&, const Tag2& t2, const Tag3& t3)
- {
- typename Exp1::result_type t(val1);
- do_assign_function_3b(f, BOOST_MP_MOVE(t), val2, val3, t2, t3);
- }
- template <class F, class Exp1, class Exp2, class Exp3, class Tag3>
- void do_assign_function_3b(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&, const Tag3& t3)
- {
- do_assign_function_3c(f, val1, val2, val3, t3);
- }
- template <class F, class Exp1, class Exp2, class Exp3, class Tag2, class Tag3>
- void do_assign_function_3b(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag2& /*t2*/, const Tag3& t3)
- {
- typename Exp2::result_type t(val2);
- do_assign_function_3c(f, val1, BOOST_MP_MOVE(t), val3, t3);
- }
- template <class F, class Exp1, class Exp2, class Exp3>
- void do_assign_function_3c(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&)
- {
- f(m_backend, function_arg_value(val1), function_arg_value(val2), function_arg_value(val3));
- }
- template <class F, class Exp1, class Exp2, class Exp3, class Tag3>
- void do_assign_function_3c(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag3& /*t3*/)
- {
- typename Exp3::result_type t(val3);
- do_assign_function_3c(f, val1, val2, BOOST_MP_MOVE(t), detail::terminal());
- }
-
- template <class Exp>
- void do_add(const Exp& e, const detail::terminal&)
- {
- using default_ops::eval_add;
- eval_add(m_backend, canonical_value(e.value()));
- }
-
- template <class Exp>
- void do_add(const Exp& e, const detail::negate&)
- {
- typedef typename Exp::left_type left_type;
- do_subtract(e.left(), typename left_type::tag_type());
- }
-
- template <class Exp>
- void do_add(const Exp& e, const detail::plus&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_add(e.left(), typename left_type::tag_type());
- do_add(e.right(), typename right_type::tag_type());
- }
-
- template <class Exp>
- void do_add(const Exp& e, const detail::minus&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_add(e.left(), typename left_type::tag_type());
- do_subtract(e.right(), typename right_type::tag_type());
- }
-
- template <class Exp, class unknown>
- void do_add(const Exp& e, const unknown&)
- {
- self_type temp(e);
- do_add(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
-
- template <class Exp>
- void do_add(const Exp& e, const detail::add_immediates&)
- {
- using default_ops::eval_add;
- eval_add(m_backend, canonical_value(e.left().value()));
- eval_add(m_backend, canonical_value(e.right().value()));
- }
- template <class Exp>
- void do_add(const Exp& e, const detail::subtract_immediates&)
- {
- using default_ops::eval_add;
- using default_ops::eval_subtract;
- eval_add(m_backend, canonical_value(e.left().value()));
- eval_subtract(m_backend, canonical_value(e.right().value()));
- }
- template <class Exp>
- void do_subtract(const Exp& e, const detail::terminal&)
- {
- using default_ops::eval_subtract;
- eval_subtract(m_backend, canonical_value(e.value()));
- }
-
- template <class Exp>
- void do_subtract(const Exp& e, const detail::negate&)
- {
- typedef typename Exp::left_type left_type;
- do_add(e.left(), typename left_type::tag_type());
- }
-
- template <class Exp>
- void do_subtract(const Exp& e, const detail::plus&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_subtract(e.left(), typename left_type::tag_type());
- do_subtract(e.right(), typename right_type::tag_type());
- }
-
- template <class Exp>
- void do_subtract(const Exp& e, const detail::minus&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_subtract(e.left(), typename left_type::tag_type());
- do_add(e.right(), typename right_type::tag_type());
- }
- template <class Exp>
- void do_subtract(const Exp& e, const detail::add_immediates&)
- {
- using default_ops::eval_subtract;
- eval_subtract(m_backend, canonical_value(e.left().value()));
- eval_subtract(m_backend, canonical_value(e.right().value()));
- }
- template <class Exp>
- void do_subtract(const Exp& e, const detail::subtract_immediates&)
- {
- using default_ops::eval_add;
- using default_ops::eval_subtract;
- eval_subtract(m_backend, canonical_value(e.left().value()));
- eval_add(m_backend, canonical_value(e.right().value()));
- }
- template <class Exp, class unknown>
- void do_subtract(const Exp& e, const unknown&)
- {
- self_type temp(e);
- do_subtract(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
- }
-
- template <class Exp>
- void do_multiplies(const Exp& e, const detail::terminal&)
- {
- using default_ops::eval_multiply;
- eval_multiply(m_backend, canonical_value(e.value()));
- }
-
- template <class Exp>
- void do_multiplies(const Exp& e, const detail::negate&)
- {
- typedef typename Exp::left_type left_type;
- do_multiplies(e.left(), typename left_type::tag_type());
- m_backend.negate();
- }
-
- template <class Exp>
- void do_multiplies(const Exp& e, const detail::multiplies&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_multiplies(e.left(), typename left_type::tag_type());
- do_multiplies(e.right(), typename right_type::tag_type());
- }
- //
- // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
- // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
- //
- template <class Exp>
- typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
- do_multiplies(const Exp& e, const detail::divides&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_multiplies(e.left(), typename left_type::tag_type());
- do_divide(e.right(), typename right_type::tag_type());
- }
-
- template <class Exp>
- void do_multiplies(const Exp& e, const detail::multiply_immediates&)
- {
- using default_ops::eval_multiply;
- eval_multiply(m_backend, canonical_value(e.left().value()));
- eval_multiply(m_backend, canonical_value(e.right().value()));
- }
- //
- // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
- // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
- //
- template <class Exp>
- typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
- do_multiplies(const Exp& e, const detail::divide_immediates&)
- {
- using default_ops::eval_multiply;
- using default_ops::eval_divide;
- eval_multiply(m_backend, canonical_value(e.left().value()));
- eval_divide(m_backend, canonical_value(e.right().value()));
- }
- template <class Exp, class unknown>
- void do_multiplies(const Exp& e, const unknown&)
- {
- using default_ops::eval_multiply;
- self_type temp(e);
- eval_multiply(m_backend, temp.m_backend);
- }
-
- template <class Exp>
- void do_divide(const Exp& e, const detail::terminal&)
- {
- using default_ops::eval_divide;
- eval_divide(m_backend, canonical_value(e.value()));
- }
-
- template <class Exp>
- void do_divide(const Exp& e, const detail::negate&)
- {
- typedef typename Exp::left_type left_type;
- do_divide(e.left(), typename left_type::tag_type());
- m_backend.negate();
- }
- //
- // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
- // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
- //
- template <class Exp>
- typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
- do_divide(const Exp& e, const detail::multiplies&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_divide(e.left(), typename left_type::tag_type());
- do_divide(e.right(), typename right_type::tag_type());
- }
- //
- // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
- // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
- //
- template <class Exp>
- typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
- do_divide(const Exp& e, const detail::divides&)
- {
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_divide(e.left(), typename left_type::tag_type());
- do_multiplies(e.right(), typename right_type::tag_type());
- }
- //
- // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
- // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
- //
- template <class Exp>
- typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
- do_divides(const Exp& e, const detail::multiply_immediates&)
- {
- using default_ops::eval_divide;
- eval_divide(m_backend, canonical_value(e.left().value()));
- eval_divide(m_backend, canonical_value(e.right().value()));
- }
- //
- // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
- // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
- //
- template <class Exp>
- typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
- do_divides(const Exp& e, const detail::divide_immediates&)
- {
- using default_ops::eval_multiply;
- using default_ops::eval_divide;
- eval_divide(m_backend, canonical_value(e.left().value()));
- mutiply(m_backend, canonical_value(e.right().value()));
- }
-
- template <class Exp, class unknown>
- void do_divide(const Exp& e, const unknown&)
- {
- using default_ops::eval_multiply;
- self_type temp(e);
- eval_divide(m_backend, temp.m_backend);
- }
-
- template <class Exp>
- void do_modulus(const Exp& e, const detail::terminal&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
- using default_ops::eval_modulus;
- eval_modulus(m_backend, canonical_value(e.value()));
- }
-
- template <class Exp, class Unknown>
- void do_modulus(const Exp& e, const Unknown&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
- using default_ops::eval_modulus;
- self_type temp(e);
- eval_modulus(m_backend, canonical_value(temp));
- }
-
- template <class Exp>
- void do_bitwise_and(const Exp& e, const detail::terminal&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
- using default_ops::eval_bitwise_and;
- eval_bitwise_and(m_backend, canonical_value(e.value()));
- }
- template <class Exp>
- void do_bitwise_and(const Exp& e, const detail::bitwise_and&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_bitwise_and(e.left(), typename left_type::tag_type());
- do_bitwise_and(e.right(), typename right_type::tag_type());
- }
- template <class Exp, class unknown>
- void do_bitwise_and(const Exp& e, const unknown&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
- using default_ops::eval_bitwise_and;
- self_type temp(e);
- eval_bitwise_and(m_backend, temp.m_backend);
- }
-
- template <class Exp>
- void do_bitwise_or(const Exp& e, const detail::terminal&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
- using default_ops::eval_bitwise_or;
- eval_bitwise_or(m_backend, canonical_value(e.value()));
- }
- template <class Exp>
- void do_bitwise_or(const Exp& e, const detail::bitwise_or&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_bitwise_or(e.left(), typename left_type::tag_type());
- do_bitwise_or(e.right(), typename right_type::tag_type());
- }
- template <class Exp, class unknown>
- void do_bitwise_or(const Exp& e, const unknown&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
- using default_ops::eval_bitwise_or;
- self_type temp(e);
- eval_bitwise_or(m_backend, temp.m_backend);
- }
-
- template <class Exp>
- void do_bitwise_xor(const Exp& e, const detail::terminal&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
- using default_ops::eval_bitwise_xor;
- eval_bitwise_xor(m_backend, canonical_value(e.value()));
- }
- template <class Exp>
- void do_bitwise_xor(const Exp& e, const detail::bitwise_xor&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
- typedef typename Exp::left_type left_type;
- typedef typename Exp::right_type right_type;
- do_bitwise_xor(e.left(), typename left_type::tag_type());
- do_bitwise_xor(e.right(), typename right_type::tag_type());
- }
- template <class Exp, class unknown>
- void do_bitwise_xor(const Exp& e, const unknown&)
- {
- BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
- using default_ops::eval_bitwise_xor;
- self_type temp(e);
- eval_bitwise_xor(m_backend, temp.m_backend);
- }
-
- // Tests if the expression contains a reference to *this:
- template <class Exp>
- BOOST_MP_FORCEINLINE bool contains_self(const Exp& e)const BOOST_NOEXCEPT
- {
- return contains_self(e, typename Exp::arity());
- }
- template <class Exp>
- BOOST_MP_FORCEINLINE bool contains_self(const Exp& e, mpl::int_<0> const&)const BOOST_NOEXCEPT
- {
- return is_realy_self(e.value());
- }
- template <class Exp>
- BOOST_MP_FORCEINLINE bool contains_self(const Exp& e, mpl::int_<1> const&)const BOOST_NOEXCEPT
- {
- typedef typename Exp::left_type child_type;
- return contains_self(e.left(), typename child_type::arity());
- }
- template <class Exp>
- BOOST_MP_FORCEINLINE bool contains_self(const Exp& e, mpl::int_<2> const&)const BOOST_NOEXCEPT
- {
- typedef typename Exp::left_type child0_type;
- typedef typename Exp::right_type child1_type;
- return contains_self(e.left(), typename child0_type::arity())
- || contains_self(e.right(), typename child1_type::arity());
- }
- template <class Exp>
- BOOST_MP_FORCEINLINE bool contains_self(const Exp& e, mpl::int_<3> const&)const BOOST_NOEXCEPT
- {
- typedef typename Exp::left_type child0_type;
- typedef typename Exp::middle_type child1_type;
- typedef typename Exp::right_type child2_type;
- return contains_self(e.left(), typename child0_type::arity())
- || contains_self(e.middle(), typename child1_type::arity())
- || contains_self(e.right(), typename child2_type::arity());
- }
-
- // Test if the expression is a reference to *this:
- template <class Exp>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_self(const Exp& e)const BOOST_NOEXCEPT
- {
- return is_self(e, typename Exp::arity());
- }
- template <class Exp>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_self(const Exp& e, mpl::int_<0> const&)const BOOST_NOEXCEPT
- {
- return is_realy_self(e.value());
- }
- template <class Exp, int v>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_self(const Exp&, mpl::int_<v> const&)const BOOST_NOEXCEPT
- {
- return false;
- }
-
- template <class Val>
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_realy_self(const Val&)const BOOST_NOEXCEPT{ return false; }
- BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_realy_self(const self_type& v)const BOOST_NOEXCEPT{ return &v == this; }
-
- static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& function_arg_value(const self_type& v) BOOST_NOEXCEPT { return v.backend(); }
- template <class Other, expression_template_option ET2>
- static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Other& function_arg_value(const number<Other, ET2>& v) BOOST_NOEXCEPT { return v.backend(); }
- template <class V>
- static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const V& function_arg_value(const V& v) BOOST_NOEXCEPT { return v; }
- template <class A1, class A2, class A3, class A4>
- static BOOST_MP_FORCEINLINE const A1& function_arg_value(const detail::expression<detail::terminal, A1, A2, A3, A4>& exp) BOOST_NOEXCEPT { return exp.value(); }
- template <class A2, class A3, class A4>
- static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& function_arg_value(const detail::expression<detail::terminal, number<Backend>, A2, A3, A4>& exp) BOOST_NOEXCEPT { return exp.value().backend(); }
- Backend m_backend;
-
-public:
- //
- // These shouldn't really need to be public, or even member functions, but it makes implementing
- // the non-member operators way easier if they are:
- //
- static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& canonical_value(const self_type& v) BOOST_NOEXCEPT { return v.m_backend; }
- template <class B2, expression_template_option ET>
- static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const B2& canonical_value(const number<B2, ET>& v) BOOST_NOEXCEPT { return v.backend(); }
- template <class V>
- static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR typename boost::disable_if<is_same<typename detail::canonical<V, Backend>::type, V>, typename detail::canonical<V, Backend>::type>::type
- canonical_value(const V& v) BOOST_NOEXCEPT { return static_cast<typename detail::canonical<V, Backend>::type>(v); }
- template <class V>
- static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR typename boost::enable_if<is_same<typename detail::canonical<V, Backend>::type, V>, const V&>::type
- canonical_value(const V& v) BOOST_NOEXCEPT { return v; }
- static BOOST_MP_FORCEINLINE typename detail::canonical<std::string, Backend>::type canonical_value(const std::string& v) BOOST_NOEXCEPT { return v.c_str(); }
-
-};
-
-template <class Backend, expression_template_option ExpressionTemplates>
-inline std::ostream& operator << (std::ostream& os, const number<Backend, ExpressionTemplates>& r)
-{
- std::streamsize d = os.precision();
- std::string s = r.str(d, os.flags());
- std::streamsize ss = os.width();
- if(ss > static_cast<std::streamsize>(s.size()))
- {
- char fill = os.fill();
- if((os.flags() & std::ios_base::left) == std::ios_base::left)
- s.append(static_cast<std::string::size_type>(ss - s.size()), fill);
- else
- s.insert(static_cast<std::string::size_type>(0), static_cast<std::string::size_type>(ss - s.size()), fill);
- }
- return os << s;
-}
-
-namespace detail{
-
-template <class tag, class A1, class A2, class A3, class A4>
-inline std::ostream& operator << (std::ostream& os, const expression<tag, A1, A2, A3, A4>& r)
-{
- typedef typename expression<tag, A1, A2, A3, A4>::result_type value_type;
- value_type temp(r);
- return os << temp;
-}
-//
-// What follows is the input streaming code: this is not "proper" iostream code at all
-// but that's fiendishly hard to write when dealing with multiple backends all
-// with different requirements... yes we could deligate this to the backend author...
-// but we really want backends to be EASY to write!
-// For now just pull in all the characters that could possibly form the number
-// and let the backend's string parser make use of it. This fixes most use cases
-// including CSV type formats such as those used by the Random lib.
-//
-inline std::string read_string_while(std::istream& is, std::string const& permitted_chars)
-{
- std::ios_base::iostate state = std::ios_base::goodbit;
- const std::istream::sentry sentry_check(is);
- std::string result;
-
- if(sentry_check)
- {
- int c = is.rdbuf()->sgetc();
-
- for(;; c = is.rdbuf()->snextc())
- if(std::istream::traits_type::eq_int_type(std::istream::traits_type::eof(), c))
- { // end of file:
- state |= std::ios_base::eofbit;
- break;
- }
- else if(permitted_chars.find_first_of(std::istream::traits_type::to_char_type(c)) == std::string::npos)
- {
- // Invalid numeric character, stop reading:
- //is.rdbuf()->sputbackc(static_cast<char>(c));
- break;
- }
- else
- {
- result.append(1, std::istream::traits_type::to_char_type(c));
- }
- }
-
- if(!result.size())
- state |= std::ios_base::failbit;
- is.setstate(state);
- return result;
-}
-
-} // namespace detail
-
-template <class Backend, expression_template_option ExpressionTemplates>
-inline std::istream& operator >> (std::istream& is, number<Backend, ExpressionTemplates>& r)
-{
- bool hex_format = (is.flags() & std::ios_base::hex) == std::ios_base::hex;
- bool oct_format = (is.flags() & std::ios_base::oct) == std::ios_base::oct;
- std::string s;
- switch(boost::multiprecision::number_category<number<Backend, ExpressionTemplates> >::value)
- {
- case boost::multiprecision::number_kind_integer:
- if(oct_format)
- s = detail::read_string_while(is, "+-01234567");
- else if(hex_format)
- s = detail::read_string_while(is, "+-xXabcdefABCDEF0123456789");
- else
- s = detail::read_string_while(is, "+-0123456789");
- break;
- case boost::multiprecision::number_kind_floating_point:
- s = detail::read_string_while(is, "+-eE.0123456789infINFnanNANinfinityINFINITY");
- break;
- default:
- is >> s;
- }
- if(s.size())
- {
- if(hex_format && (number_category<Backend>::value == number_kind_integer) && ((s[0] != '0') || (s[1] != 'x')))
- s.insert(s.find_first_not_of("+-"), "0x");
- if(oct_format && (number_category<Backend>::value == number_kind_integer) && (s[0] != '0'))
- s.insert(s.find_first_not_of("+-"), "0");
- r.assign(s);
- }
- else if(!is.fail())
- is.setstate(std::istream::failbit);
- return is;
-}
-
-template <class Backend, expression_template_option ExpressionTemplates>
-BOOST_MP_FORCEINLINE void swap(number<Backend, ExpressionTemplates>& a, number<Backend, ExpressionTemplates>& b)
- BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<number<Backend, ExpressionTemplates>&>() = std::declval<number<Backend, ExpressionTemplates>&>()))
-{
- a.swap(b);
-}
-//
-// Boost.Hash support, just call hash_value for the backend, which may or may not be supported:
-//
-template <class Backend, expression_template_option ExpressionTemplates>
-inline std::size_t hash_value(const number<Backend, ExpressionTemplates>& val)
-{
- return hash_value(val.backend());
-}
-
-} // namespace multiprecision
-
-template <class T>
-class rational;
-
-template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
-inline std::istream& operator >> (std::istream& is, rational<multiprecision::number<Backend, ExpressionTemplates> >& r)
-{
- std::string s1;
- multiprecision::number<Backend, ExpressionTemplates> v1, v2;
- char c;
- bool have_hex = false;
- bool hex_format = (is.flags() & std::ios_base::hex) == std::ios_base::hex;
- bool oct_format = (is.flags() & std::ios_base::oct) == std::ios_base::oct;
-
- while((EOF != (c = static_cast<char>(is.peek()))) && (c == 'x' || c == 'X' || c == '-' || c == '+' || (c >= '0' && c <= '9') || (have_hex && (c >= 'a' && c <= 'f')) || (have_hex && (c >= 'A' && c <= 'F'))))
- {
- if(c == 'x' || c == 'X')
- have_hex = true;
- s1.append(1, c);
- is.get();
- }
- if(hex_format && ((s1[0] != '0') || (s1[1] != 'x')))
- s1.insert(static_cast<std::string::size_type>(0), "0x");
- if(oct_format && (s1[0] != '0'))
- s1.insert(static_cast<std::string::size_type>(0), "0");
- v1.assign(s1);
- s1.erase();
- if(c == '/')
- {
- is.get();
- while((EOF != (c = static_cast<char>(is.peek()))) && (c == 'x' || c == 'X' || c == '-' || c == '+' || (c >= '0' && c <= '9') || (have_hex && (c >= 'a' && c <= 'f')) || (have_hex && (c >= 'A' && c <= 'F'))))
- {
- if(c == 'x' || c == 'X')
- have_hex = true;
- s1.append(1, c);
- is.get();
- }
- if(hex_format && ((s1[0] != '0') || (s1[1] != 'x')))
- s1.insert(static_cast<std::string::size_type>(0), "0x");
- if(oct_format && (s1[0] != '0'))
- s1.insert(static_cast<std::string::size_type>(0), "0");
- v2.assign(s1);
- }
- else
- v2 = 1;
- r.assign(v1, v2);
- return is;
-}
-
-template <class T, multiprecision::expression_template_option ExpressionTemplates>
-inline multiprecision::number<T, ExpressionTemplates> numerator(const rational<multiprecision::number<T, ExpressionTemplates> >& a)
-{
- return a.numerator();
-}
-
-template <class T, multiprecision::expression_template_option ExpressionTemplates>
-inline multiprecision::number<T, ExpressionTemplates> denominator(const rational<multiprecision::number<T, ExpressionTemplates> >& a)
-{
- return a.denominator();
-}
-
-template <class T, multiprecision::expression_template_option ExpressionTemplates>
-inline std::size_t hash_value(const rational<multiprecision::number<T, ExpressionTemplates> >& val)
-{
- std::size_t result = hash_value(val.numerator());
- boost::hash_combine(result, hash_value(val.denominator()));
- return result;
-}
-
-namespace multiprecision
-{
-
-template <class I>
-struct component_type<boost::rational<I> >
-{
- typedef I type;
-};
-
-}
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespaces
-
-#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
-
-#include <functional>
-
-namespace std {
-
- template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates>
- struct hash<boost::multiprecision::number<Backend, ExpressionTemplates> >
- {
- std::size_t operator()(const boost::multiprecision::number<Backend, ExpressionTemplates>& val)const { return hash_value(val); }
- };
- template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates>
- struct hash<boost::rational<boost::multiprecision::number<Backend, ExpressionTemplates> > >
- {
- std::size_t operator()(const boost::rational<boost::multiprecision::number<Backend, ExpressionTemplates> >& val)const
- {
- std::size_t result = hash_value(val.numerator());
- boost::hash_combine(result, hash_value(val.denominator()));
- return result;
- }
- };
-
-}
-
-#endif
-
-#include <boost/multiprecision/detail/ublas_interop.hpp>
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/old_optional_implementation.hpp b/src/third_party/boost-1.68.0/boost/optional/detail/old_optional_implementation.hpp
deleted file mode 100644
index 62c31eecebb..00000000000
--- a/src/third_party/boost-1.68.0/boost/optional/detail/old_optional_implementation.hpp
+++ /dev/null
@@ -1,1059 +0,0 @@
-// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
-// Copyright (C) 2014-2016 Andrzej Krzemienski.
-//
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/optional for documentation.
-//
-// You are welcome to contact the maintainer at:
-// akrzemi1@gmail.com
-
-#ifndef BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
-#define BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
-
-#include <boost/detail/reference_content.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/not.hpp>
-#include <boost/type_traits/is_reference.hpp>
-
-namespace boost {
-
-namespace optional_detail {
-
-
-template<class T>
-struct types_when_isnt_ref
-{
- typedef T const& reference_const_type ;
- typedef T & reference_type ;
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- typedef T && rval_reference_type ;
- typedef T && reference_type_of_temporary_wrapper;
-#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
- // GCC 4.4 has support for an early draft of rvalue references. The conforming version below
- // causes warnings about returning references to a temporary.
- static T&& move(T&& r) { return r; }
-#else
- static rval_reference_type move(reference_type r) { return boost::move(r); }
-#endif
-#endif
- typedef T const* pointer_const_type ;
- typedef T * pointer_type ;
- typedef T const& argument_type ;
-} ;
-
-template<class T>
-struct types_when_is_ref
-{
- typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type raw_type ;
-
- typedef raw_type& reference_const_type ;
- typedef raw_type& reference_type ;
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- typedef BOOST_DEDUCED_TYPENAME remove_const<raw_type>::type&& rval_reference_type ;
- typedef raw_type& reference_type_of_temporary_wrapper;
- static reference_type move(reference_type r) { return r; }
-#endif
- typedef raw_type* pointer_const_type ;
- typedef raw_type* pointer_type ;
- typedef raw_type& argument_type ;
-} ;
-
-template <class To, class From>
-void prevent_binding_rvalue_ref_to_optional_lvalue_ref()
-{
-#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
- BOOST_STATIC_ASSERT_MSG(
- !boost::is_lvalue_reference<To>::value || !boost::is_rvalue_reference<From>::value,
- "binding rvalue references to optional lvalue references is disallowed");
-#endif
-}
-
-struct optional_tag {} ;
-
-template<class T>
-class optional_base : public optional_tag
-{
- private :
-
- typedef
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- BOOST_DEDUCED_TYPENAME
-#endif
- ::boost::detail::make_reference_content<T>::type internal_type ;
-
- typedef aligned_storage<internal_type> storage_type ;
-
- typedef types_when_isnt_ref<T> types_when_not_ref ;
- typedef types_when_is_ref<T> types_when_ref ;
-
- typedef optional_base<T> this_type ;
-
- protected :
-
- typedef T value_type ;
-
- typedef mpl::true_ is_reference_tag ;
- typedef mpl::false_ is_not_reference_tag ;
-
- typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
-
- public:
- typedef BOOST_DEDUCED_TYPENAME mpl::if_<is_reference_predicate,types_when_ref,types_when_not_ref>::type types ;
-
- protected:
- typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ;
- typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ;
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- typedef BOOST_DEDUCED_TYPENAME types::rval_reference_type rval_reference_type ;
- typedef BOOST_DEDUCED_TYPENAME types::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
-#endif
- typedef BOOST_DEDUCED_TYPENAME types::pointer_type pointer_type ;
- typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type pointer_const_type ;
- typedef BOOST_DEDUCED_TYPENAME types::argument_type argument_type ;
-
- // Creates an optional<T> uninitialized.
- // No-throw
- optional_base()
- :
- m_initialized(false) {}
-
- // Creates an optional<T> uninitialized.
- // No-throw
- optional_base ( none_t )
- :
- m_initialized(false) {}
-
- // Creates an optional<T> initialized with 'val'.
- // Can throw if T::T(T const&) does
- optional_base ( argument_type val )
- :
- m_initialized(false)
- {
- construct(val);
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // move-construct an optional<T> initialized from an rvalue-ref to 'val'.
- // Can throw if T::T(T&&) does
- optional_base ( rval_reference_type val )
- :
- m_initialized(false)
- {
- construct( boost::move(val) );
- }
-#endif
-
- // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional<T>.
- // Can throw if T::T(T const&) does
- optional_base ( bool cond, argument_type val )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(val);
- }
-
- // Creates a deep copy of another optional<T>
- // Can throw if T::T(T const&) does
- optional_base ( optional_base const& rhs )
- :
- m_initialized(false)
- {
- if ( rhs.is_initialized() )
- construct(rhs.get_impl());
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates a deep move of another optional<T>
- // Can throw if T::T(T&&) does
- optional_base ( optional_base&& rhs )
- :
- m_initialized(false)
- {
- if ( rhs.is_initialized() )
- construct( boost::move(rhs.get_impl()) );
- }
-#endif
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
- template<class Expr, class PtrExpr>
- explicit optional_base ( Expr&& expr, PtrExpr const* tag )
- :
- m_initialized(false)
- {
- construct(boost::forward<Expr>(expr),tag);
- }
-
-#else
- // This is used for both converting and in-place constructions.
- // Derived classes use the 'tag' to select the appropriate
- // implementation (the correct 'construct()' overload)
- template<class Expr>
- explicit optional_base ( Expr const& expr, Expr const* tag )
- :
- m_initialized(false)
- {
- construct(expr,tag);
- }
-
-#endif
-
-
- // No-throw (assuming T::~T() doesn't)
- ~optional_base() { destroy() ; }
-
- // Assigns from another optional<T> (deep-copies the rhs value)
- void assign ( optional_base const& rhs )
- {
- if (is_initialized())
- {
- if ( rhs.is_initialized() )
- assign_value(rhs.get_impl(), is_reference_predicate() );
- else destroy();
- }
- else
- {
- if ( rhs.is_initialized() )
- construct(rhs.get_impl());
- }
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Assigns from another optional<T> (deep-moves the rhs value)
- void assign ( optional_base&& rhs )
- {
- if (is_initialized())
- {
- if ( rhs.is_initialized() )
- assign_value(boost::move(rhs.get_impl()), is_reference_predicate() );
- else destroy();
- }
- else
- {
- if ( rhs.is_initialized() )
- construct(boost::move(rhs.get_impl()));
- }
- }
-#endif
-
- // Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
- template<class U>
- void assign ( optional<U> const& rhs )
- {
- if (is_initialized())
- {
- if ( rhs.is_initialized() )
-#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
- assign_value(rhs.get(), is_reference_predicate() );
-#else
- assign_value(static_cast<value_type>(rhs.get()), is_reference_predicate() );
-#endif
-
- else destroy();
- }
- else
- {
- if ( rhs.is_initialized() )
-#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
- construct(rhs.get());
-#else
- construct(static_cast<value_type>(rhs.get()));
-#endif
- }
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // move-assigns from another _convertible_ optional<U> (deep-moves from the rhs value)
- template<class U>
- void assign ( optional<U>&& rhs )
- {
- typedef BOOST_DEDUCED_TYPENAME optional<U>::rval_reference_type ref_type;
- if (is_initialized())
- {
- if ( rhs.is_initialized() )
- assign_value(static_cast<ref_type>(rhs.get()), is_reference_predicate() );
- else destroy();
- }
- else
- {
- if ( rhs.is_initialized() )
- construct(static_cast<ref_type>(rhs.get()));
- }
- }
-#endif
-
- // Assigns from a T (deep-copies the rhs value)
- void assign ( argument_type val )
- {
- if (is_initialized())
- assign_value(val, is_reference_predicate() );
- else construct(val);
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Assigns from a T (deep-moves the rhs value)
- void assign ( rval_reference_type val )
- {
- if (is_initialized())
- assign_value( boost::move(val), is_reference_predicate() );
- else construct( boost::move(val) );
- }
-#endif
-
- // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
- // No-throw (assuming T::~T() doesn't)
- void assign ( none_t ) BOOST_NOEXCEPT { destroy(); }
-
-#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- template<class Expr, class ExprPtr>
- void assign_expr ( Expr&& expr, ExprPtr const* tag )
- {
- if (is_initialized())
- assign_expr_to_initialized(boost::forward<Expr>(expr),tag);
- else construct(boost::forward<Expr>(expr),tag);
- }
-#else
- template<class Expr>
- void assign_expr ( Expr const& expr, Expr const* tag )
- {
- if (is_initialized())
- assign_expr_to_initialized(expr,tag);
- else construct(expr,tag);
- }
-#endif
-
-#endif
-
- public :
-
- // **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
- // No-throw (assuming T::~T() doesn't)
- void reset() BOOST_NOEXCEPT { destroy(); }
-
- // **DEPPRECATED** Replaces the current value -if any- with 'val'
- void reset ( argument_type val ) { assign(val); }
-
- // Returns a pointer to the value if this is initialized, otherwise,
- // returns NULL.
- // No-throw
- pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
- pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
-
- bool is_initialized() const { return m_initialized ; }
-
- protected :
-
- void construct ( argument_type val )
- {
- ::new (m_storage.address()) internal_type(val) ;
- m_initialized = true ;
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- void construct ( rval_reference_type val )
- {
- ::new (m_storage.address()) internal_type( types::move(val) ) ;
- m_initialized = true ;
- }
-#endif
-
-
-#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- // Constructs in-place
- // upon exception *this is always uninitialized
- template<class... Args>
- void emplace_assign ( Args&&... args )
- {
- destroy();
- ::new (m_storage.address()) internal_type( boost::forward<Args>(args)... );
- m_initialized = true ;
- }
-#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- template<class Arg>
- void emplace_assign ( Arg&& arg )
- {
- destroy();
- ::new (m_storage.address()) internal_type( boost::forward<Arg>(arg) );
- m_initialized = true ;
- }
-
- void emplace_assign ()
- {
- destroy();
- ::new (m_storage.address()) internal_type();
- m_initialized = true ;
- }
-#else
- template<class Arg>
- void emplace_assign ( const Arg& arg )
- {
- destroy();
- ::new (m_storage.address()) internal_type( arg );
- m_initialized = true ;
- }
-
- template<class Arg>
- void emplace_assign ( Arg& arg )
- {
- destroy();
- ::new (m_storage.address()) internal_type( arg );
- m_initialized = true ;
- }
-
- void emplace_assign ()
- {
- destroy();
- ::new (m_storage.address()) internal_type();
- m_initialized = true ;
- }
-#endif
-
-#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Constructs in-place using the given factory
- template<class Expr>
- void construct ( Expr&& factory, in_place_factory_base const* )
- {
- BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
- boost_optional_detail::construct<value_type>(factory, m_storage.address());
- m_initialized = true ;
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void construct ( Expr&& factory, typed_in_place_factory_base const* )
- {
- BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
- factory.apply(m_storage.address()) ;
- m_initialized = true ;
- }
-
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
-#else
- // Constructs in-place using the given factory
- template<class Expr>
- void construct ( Expr const& factory, in_place_factory_base const* )
- {
- BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
- boost_optional_detail::construct<value_type>(factory, m_storage.address());
- m_initialized = true ;
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void construct ( Expr const& factory, typed_in_place_factory_base const* )
- {
- BOOST_STATIC_ASSERT ( ::boost::mpl::not_<is_reference_predicate>::value ) ;
- factory.apply(m_storage.address()) ;
- m_initialized = true ;
- }
-
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-#endif
-
-#endif
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Constructs using any expression implicitly convertible to the single argument
- // of a one-argument T constructor.
- // Converting constructions of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
- template<class Expr>
- void construct ( Expr&& expr, void const* )
- {
- new (m_storage.address()) internal_type(boost::forward<Expr>(expr)) ;
- m_initialized = true ;
- }
-
- // Assigns using a form any expression implicitly convertible to the single argument
- // of a T's assignment operator.
- // Converting assignments of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& expr, void const* )
- {
- assign_value(boost::forward<Expr>(expr), is_reference_predicate());
- }
-#else
- // Constructs using any expression implicitly convertible to the single argument
- // of a one-argument T constructor.
- // Converting constructions of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
- template<class Expr>
- void construct ( Expr const& expr, void const* )
- {
- new (m_storage.address()) internal_type(expr) ;
- m_initialized = true ;
- }
-
- // Assigns using a form any expression implicitly convertible to the single argument
- // of a T's assignment operator.
- // Converting assignments of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& expr, void const* )
- {
- assign_value(expr, is_reference_predicate());
- }
-
-#endif
-
-#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
- // BCB5.64 (and probably lower versions) workaround.
- // The in-place factories are supported by means of catch-all constructors
- // and assignment operators (the functions are parameterized in terms of
- // an arbitrary 'Expr' type)
- // This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
- // to the 'Expr'-taking functions even though explicit overloads are present for them.
- // Thus, the following overload is needed to properly handle the case when the 'lhs'
- // is another optional.
- //
- // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
- // instead of choosing the wrong overload
- //
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
- template<class Expr>
- void construct ( Expr&& expr, optional_tag const* )
- {
- if ( expr.is_initialized() )
- {
- // An exception can be thrown here.
- // It it happens, THIS will be left uninitialized.
- new (m_storage.address()) internal_type(types::move(expr.get())) ;
- m_initialized = true ;
- }
- }
-#else
- // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
- template<class Expr>
- void construct ( Expr const& expr, optional_tag const* )
- {
- if ( expr.is_initialized() )
- {
- // An exception can be thrown here.
- // It it happens, THIS will be left uninitialized.
- new (m_storage.address()) internal_type(expr.get()) ;
- m_initialized = true ;
- }
- }
-#endif
-#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
-
- void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; }
- void assign_value ( argument_type val, is_reference_tag ) { construct(val); }
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- void assign_value ( rval_reference_type val, is_not_reference_tag ) { get_impl() = static_cast<rval_reference_type>(val); }
- void assign_value ( rval_reference_type val, is_reference_tag ) { construct( static_cast<rval_reference_type>(val) ); }
-#endif
-
- void destroy()
- {
- if ( m_initialized )
- destroy_impl(is_reference_predicate()) ;
- }
-
- reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; }
- reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; }
-
- pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; }
- pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; }
-
- private :
-
- // internal_type can be either T or reference_content<T>
-#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
- // This workaround is supposed to silence GCC warnings about broken strict aliasing rules
- internal_type const* get_object() const
- {
- union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() };
- return caster.as_ptype;
- }
- internal_type * get_object()
- {
- union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() };
- return caster.as_ptype;
- }
-#else
- internal_type const* get_object() const { return static_cast<internal_type const*>(m_storage.address()); }
- internal_type * get_object() { return static_cast<internal_type *> (m_storage.address()); }
-#endif
-
- // reference_content<T> lacks an implicit conversion to T&, so the following is needed to obtain a proper reference.
- reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; }
- reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; }
- reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; }
- reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; }
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
- void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; }
-#else
- void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->~T() ; m_initialized = false ; }
-#endif
-
- void destroy_impl ( is_reference_tag ) { m_initialized = false ; }
-
- // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.
- // Decent compilers should disallow conversions from reference_content<T>* to T*, but just in case,
- // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
- pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
- pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; }
- pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; }
- pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; }
-
- bool m_initialized ;
- storage_type m_storage ;
-} ;
-
-} // namespace optional_detail
-
-template<class T>
-class optional : public optional_detail::optional_base<T>
-{
- typedef optional_detail::optional_base<T> base ;
-
- public :
-
- typedef optional<T> this_type ;
-
- typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ;
- typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ;
- typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ;
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- typedef BOOST_DEDUCED_TYPENAME base::rval_reference_type rval_reference_type ;
- typedef BOOST_DEDUCED_TYPENAME base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
-#endif
- typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ;
- typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ;
- typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ;
-
- // Creates an optional<T> uninitialized.
- // No-throw
- optional() BOOST_NOEXCEPT : base() {}
-
- // Creates an optional<T> uninitialized.
- // No-throw
- optional( none_t none_ ) BOOST_NOEXCEPT : base(none_) {}
-
- // Creates an optional<T> initialized with 'val'.
- // Can throw if T::T(T const&) does
- optional ( argument_type val ) : base(val) {}
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates an optional<T> initialized with 'move(val)'.
- // Can throw if T::T(T &&) does
- optional ( rval_reference_type val ) : base( boost::forward<T>(val) )
- {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();}
-#endif
-
- // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
- // Can throw if T::T(T const&) does
- optional ( bool cond, argument_type val ) : base(cond,val) {}
-
- // NOTE: MSVC needs templated versions first
-
- // Creates a deep copy of another convertible optional<U>
- // Requires a valid conversion from U to T.
- // Can throw if T::T(U const&) does
- template<class U>
- explicit optional ( optional<U> const& rhs )
- :
- base()
- {
- if ( rhs.is_initialized() )
- this->construct(rhs.get());
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates a deep move of another convertible optional<U>
- // Requires a valid conversion from U to T.
- // Can throw if T::T(U&&) does
- template<class U>
- explicit optional ( optional<U> && rhs )
- :
- base()
- {
- if ( rhs.is_initialized() )
- this->construct( boost::move(rhs.get()) );
- }
-#endif
-
-#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
- // Creates an optional<T> with an expression which can be either
- // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n);
- // (b) An instance of TypedInPlaceFactory ( i.e. in_place<T>(a,b,...,n);
- // (c) Any expression implicitly convertible to the single type
- // of a one-argument T's constructor.
- // (d*) Weak compilers (BCB) might also resolved Expr as optional<T> and optional<U>
- // even though explicit overloads are present for these.
- // Depending on the above some T ctor is called.
- // Can throw if the resolved T ctor throws.
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
-
- template<class Expr>
- explicit optional ( Expr&& expr,
- BOOST_DEDUCED_TYPENAME boost::disable_if_c<
- (boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value) ||
- boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value, bool >::type = true
- )
- : base(boost::forward<Expr>(expr),boost::addressof(expr))
- {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();}
-
-#else
- template<class Expr>
- explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {}
-#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-#endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-
- // Creates a deep copy of another optional<T>
- // Can throw if T::T(T const&) does
- optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates a deep move of another optional<T>
- // Can throw if T::T(T&&) does
- optional ( optional && rhs )
- BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
- : base( boost::move(rhs) )
- {}
-
-#endif
- // No-throw (assuming T::~T() doesn't)
- ~optional() {}
-
-#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
- // Assigns from an expression. See corresponding constructor.
- // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
- template<class Expr>
- BOOST_DEDUCED_TYPENAME boost::disable_if_c<
- boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value ||
- boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value,
- optional&
- >::type
- operator= ( Expr&& expr )
- {
- optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();
- this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
- return *this ;
- }
-
-#else
- template<class Expr>
- optional& operator= ( Expr const& expr )
- {
- this->assign_expr(expr,boost::addressof(expr));
- return *this ;
- }
-#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-#endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
-
- // Copy-assigns from another convertible optional<U> (converts && deep-copies the rhs value)
- // Requires a valid conversion from U to T.
- // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED
- template<class U>
- optional& operator= ( optional<U> const& rhs )
- {
- this->assign(rhs);
- return *this ;
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Move-assigns from another convertible optional<U> (converts && deep-moves the rhs value)
- // Requires a valid conversion from U to T.
- // Basic Guarantee: If T::T( U && ) throws, this is left UNINITIALIZED
- template<class U>
- optional& operator= ( optional<U> && rhs )
- {
- this->assign(boost::move(rhs));
- return *this ;
- }
-#endif
-
- // Assigns from another optional<T> (deep-copies the rhs value)
- // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED
- // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
- optional& operator= ( optional const& rhs )
- {
- this->assign( static_cast<base const&>(rhs) ) ;
- return *this ;
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Assigns from another optional<T> (deep-moves the rhs value)
- optional& operator= ( optional && rhs )
- BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
- {
- this->assign( static_cast<base &&>(rhs) ) ;
- return *this ;
- }
-#endif
-
- // Assigns from a T (deep-copies the rhs value)
- // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED
- optional& operator= ( argument_type val )
- {
- this->assign( val ) ;
- return *this ;
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Assigns from a T (deep-moves the rhs value)
- optional& operator= ( rval_reference_type val )
- {
- optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();
- this->assign( boost::move(val) ) ;
- return *this ;
- }
-#endif
-
- // Assigns from a "none"
- // Which destroys the current value, if any, leaving this UNINITIALIZED
- // No-throw (assuming T::~T() doesn't)
- optional& operator= ( none_t none_ ) BOOST_NOEXCEPT
- {
- this->assign( none_ ) ;
- return *this ;
- }
-
-#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- // Constructs in-place
- // upon exception *this is always uninitialized
- template<class... Args>
- void emplace ( Args&&... args )
- {
- this->emplace_assign( boost::forward<Args>(args)... );
- }
-#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- template<class Arg>
- void emplace ( Arg&& arg )
- {
- this->emplace_assign( boost::forward<Arg>(arg) );
- }
-
- void emplace ()
- {
- this->emplace_assign();
- }
-#else
- template<class Arg>
- void emplace ( const Arg& arg )
- {
- this->emplace_assign( arg );
- }
-
- template<class Arg>
- void emplace ( Arg& arg )
- {
- this->emplace_assign( arg );
- }
-
- void emplace ()
- {
- this->emplace_assign();
- }
-#endif
-
- void swap( optional & arg )
- BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
- {
- // allow for Koenig lookup
- boost::swap(*this, arg);
- }
-
-
- // Returns a reference to the value if this is initialized, otherwise,
- // the behaviour is UNDEFINED
- // No-throw
- reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
- reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
-
- // Returns a copy of the value if this is initialized, 'v' otherwise
- reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
- reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; }
-
- // Returns a pointer to the value if this is initialized, otherwise,
- // the behaviour is UNDEFINED
- // No-throw
- pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
- pointer_type operator->() { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
-
- // Returns a reference to the value if this is initialized, otherwise,
- // the behaviour is UNDEFINED
- // No-throw
-#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- reference_const_type operator *() const& { return this->get() ; }
- reference_type operator *() & { return this->get() ; }
- reference_type_of_temporary_wrapper operator *() && { return base::types::move(this->get()) ; }
-#else
- reference_const_type operator *() const { return this->get() ; }
- reference_type operator *() { return this->get() ; }
-#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
-
-#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- reference_const_type value() const&
- {
- if (this->is_initialized())
- return this->get() ;
- else
- throw_exception(bad_optional_access());
- }
-
- reference_type value() &
- {
- if (this->is_initialized())
- return this->get() ;
- else
- throw_exception(bad_optional_access());
- }
-
- reference_type_of_temporary_wrapper value() &&
- {
- if (this->is_initialized())
- return base::types::move(this->get()) ;
- else
- throw_exception(bad_optional_access());
- }
-
-#else
- reference_const_type value() const
- {
- if (this->is_initialized())
- return this->get() ;
- else
- throw_exception(bad_optional_access());
- }
-
- reference_type value()
- {
- if (this->is_initialized())
- return this->get() ;
- else
- throw_exception(bad_optional_access());
- }
-#endif
-
-
-#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
- template <class U>
- value_type value_or ( U&& v ) const&
- {
- if (this->is_initialized())
- return get();
- else
- return boost::forward<U>(v);
- }
-
- template <class U>
- value_type value_or ( U&& v ) &&
- {
- if (this->is_initialized())
- return base::types::move(get());
- else
- return boost::forward<U>(v);
- }
-#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- template <class U>
- value_type value_or ( U&& v ) const
- {
- if (this->is_initialized())
- return get();
- else
- return boost::forward<U>(v);
- }
-#else
- template <class U>
- value_type value_or ( U const& v ) const
- {
- if (this->is_initialized())
- return get();
- else
- return v;
- }
-
- template <class U>
- value_type value_or ( U& v ) const
- {
- if (this->is_initialized())
- return get();
- else
- return v;
- }
-#endif
-
-
-#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
- template <typename F>
- value_type value_or_eval ( F f ) const&
- {
- if (this->is_initialized())
- return get();
- else
- return f();
- }
-
- template <typename F>
- value_type value_or_eval ( F f ) &&
- {
- if (this->is_initialized())
- return base::types::move(get());
- else
- return f();
- }
-#else
- template <typename F>
- value_type value_or_eval ( F f ) const
- {
- if (this->is_initialized())
- return get();
- else
- return f();
- }
-#endif
-
- bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; }
-
- BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
-} ;
-
-} // namespace boost
-
-
-#endif // header guard
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/optional_trivially_copyable_base.hpp b/src/third_party/boost-1.68.0/boost/optional/detail/optional_trivially_copyable_base.hpp
deleted file mode 100644
index 91328ac4e77..00000000000
--- a/src/third_party/boost-1.68.0/boost/optional/detail/optional_trivially_copyable_base.hpp
+++ /dev/null
@@ -1,499 +0,0 @@
-// trivilally-copyable version of the storage
-
-template<class T>
-class tc_optional_base : public optional_tag
-{
- private :
-
- typedef tc_optional_base<T> this_type ;
-
- protected :
-
- typedef T value_type ;
-
- protected:
- typedef T & reference_type ;
- typedef T const& reference_const_type ;
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- typedef T && rval_reference_type ;
- typedef T && reference_type_of_temporary_wrapper ;
-#endif
- typedef T * pointer_type ;
- typedef T const* pointer_const_type ;
- typedef T const& argument_type ;
-
- tc_optional_base()
- :
- m_initialized(false) {}
-
- tc_optional_base ( none_t )
- :
- m_initialized(false) {}
-
- tc_optional_base ( argument_type val )
- :
- m_initialized(true), m_storage(val) {}
-
- tc_optional_base ( bool cond, argument_type val )
- :
- m_initialized(cond), m_storage(val) {}
-
- // tc_optional_base ( tc_optional_base const& ) = default;
-
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
- template<class Expr, class PtrExpr>
- explicit tc_optional_base ( Expr&& expr, PtrExpr const* tag )
- :
- m_initialized(false)
- {
- construct(boost::forward<Expr>(expr),tag);
- }
-
-#else
- // This is used for both converting and in-place constructions.
- // Derived classes use the 'tag' to select the appropriate
- // implementation (the correct 'construct()' overload)
- template<class Expr>
- explicit tc_optional_base ( Expr const& expr, Expr const* tag )
- :
- m_initialized(false)
- {
- construct(expr,tag);
- }
-
-#endif
-
- // tc_optional_base& operator= ( tc_optional_base const& ) = default;
- // ~tc_optional_base() = default;
-
- // Assigns from another optional<T> (deep-copies the rhs value)
- void assign ( tc_optional_base const& rhs )
- {
- this->operator=(rhs);
- }
-
- // Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
- template<class U>
- void assign ( optional<U> const& rhs )
- {
- if ( rhs.is_initialized() )
-#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
- m_storage = rhs.get();
-#else
- m_storage = static_cast<value_type>(rhs.get());
-#endif
-
- m_initialized = rhs.is_initialized();
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // move-assigns from another _convertible_ optional<U> (deep-moves from the rhs value)
- template<class U>
- void assign ( optional<U>&& rhs )
- {
- typedef BOOST_DEDUCED_TYPENAME optional<U>::rval_reference_type ref_type;
- if ( rhs.is_initialized() )
- m_storage = static_cast<ref_type>(rhs.get());
- m_initialized = rhs.is_initialized();
- }
-#endif
-
- void assign ( argument_type val )
- {
- construct(val);
- }
-
- void assign ( none_t ) { destroy(); }
-
-#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- template<class Expr, class ExprPtr>
- void assign_expr ( Expr&& expr, ExprPtr const* tag )
- {
- construct(boost::forward<Expr>(expr),tag);
- }
-#else
- template<class Expr>
- void assign_expr ( Expr const& expr, Expr const* tag )
- {
- construct(expr,tag);
- }
-#endif
-
-#endif
-
- public :
-
- // **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
- // No-throw (assuming T::~T() doesn't)
- void reset() BOOST_NOEXCEPT { destroy(); }
-
- // **DEPPRECATED** Replaces the current value -if any- with 'val'
- void reset ( argument_type val ) BOOST_NOEXCEPT { assign(val); }
-
- // Returns a pointer to the value if this is initialized, otherwise,
- // returns NULL.
- // No-throw
- pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
- pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
-
- bool is_initialized() const { return m_initialized ; }
-
- protected :
-
- void construct ( argument_type val )
- {
- m_storage = val ;
- m_initialized = true ;
- }
-
-
-#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- // Constructs in-place
- // upon exception *this is always uninitialized
- template<class... Args>
- void construct ( in_place_init_t, Args&&... args )
- {
- m_storage = value_type( boost::forward<Args>(args)... ) ;
- m_initialized = true ;
- }
-
- template<class... Args>
- void emplace_assign ( Args&&... args )
- {
- construct(in_place_init, boost::forward<Args>(args)...);
- }
-
- template<class... Args>
- explicit tc_optional_base ( in_place_init_t, Args&&... args )
- :
- m_initialized(false)
- {
- construct(in_place_init, boost::forward<Args>(args)...);
- }
-
- template<class... Args>
- explicit tc_optional_base ( in_place_init_if_t, bool cond, Args&&... args )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(in_place_init, boost::forward<Args>(args)...);
- }
-#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- template<class Arg>
- void construct ( in_place_init_t, Arg&& arg )
- {
- m_storage = value_type( boost::forward<Arg>(arg) );
- m_initialized = true ;
- }
-
- void construct ( in_place_init_t )
- {
- m_storage = value_type();
- m_initialized = true ;
- }
-
- template<class Arg>
- void emplace_assign ( Arg&& arg )
- {
- construct(in_place_init, boost::forward<Arg>(arg)) ;
- }
-
- void emplace_assign ()
- {
- construct(in_place_init) ;
- }
-
- template<class Arg>
- explicit tc_optional_base ( in_place_init_t, Arg&& arg )
- :
- m_initialized(false)
- {
- construct(in_place_init, boost::forward<Arg>(arg));
- }
-
- explicit tc_optional_base ( in_place_init_t )
- :
- m_initialized(false), m_storage() {}
-
- template<class Arg>
- explicit tc_optional_base ( in_place_init_if_t, bool cond, Arg&& arg )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(in_place_init, boost::forward<Arg>(arg));
- }
-
- explicit tc_optional_base ( in_place_init_if_t, bool cond )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(in_place_init);
- }
-
-#else
-
- template<class Arg>
- void construct ( in_place_init_t, const Arg& arg )
- {
- m_storage = value_type( arg );
- m_initialized = true ;
- }
-
- template<class Arg>
- void construct ( in_place_init_t, Arg& arg )
- {
- m_storage = value_type( arg );
- m_initialized = true ;
- }
-
- void construct ( in_place_init_t )
- {
- m_storage = value_type();
- m_initialized = true ;
- }
-
- template<class Arg>
- void emplace_assign ( const Arg& arg )
- {
- construct(in_place_init, arg);
- }
-
- template<class Arg>
- void emplace_assign ( Arg& arg )
- {
- construct(in_place_init, arg);
- }
-
- void emplace_assign ()
- {
- construct(in_place_init);
- }
-
- template<class Arg>
- explicit tc_optional_base ( in_place_init_t, const Arg& arg )
- : m_initialized(false)
- {
- construct(in_place_init, arg);
- }
-
- template<class Arg>
- explicit tc_optional_base ( in_place_init_t, Arg& arg )
- : m_initialized(false)
- {
- construct(in_place_init, arg);
- }
-
- explicit tc_optional_base ( in_place_init_t )
- : m_initialized(false)
- {
- construct(in_place_init);
- }
-
- template<class Arg>
- explicit tc_optional_base ( in_place_init_if_t, bool cond, const Arg& arg )
- : m_initialized(false)
- {
- if ( cond )
- construct(in_place_init, arg);
- }
-
- template<class Arg>
- explicit tc_optional_base ( in_place_init_if_t, bool cond, Arg& arg )
- : m_initialized(false)
- {
- if ( cond )
- construct(in_place_init, arg);
- }
-
- explicit tc_optional_base ( in_place_init_if_t, bool cond )
- : m_initialized(false)
- {
- if ( cond )
- construct(in_place_init);
- }
-#endif
-
-#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Constructs in-place using the given factory
- template<class Expr>
- void construct ( Expr&& factory, in_place_factory_base const* )
- {
- boost_optional_detail::construct<value_type>(factory, boost::addressof(m_storage));
- m_initialized = true ;
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void construct ( Expr&& factory, typed_in_place_factory_base const* )
- {
- factory.apply(boost::addressof(m_storage)) ;
- m_initialized = true ;
- }
-
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
-#else
- // Constructs in-place using the given factory
- template<class Expr>
- void construct ( Expr const& factory, in_place_factory_base const* )
- {
- boost_optional_detail::construct<value_type>(factory, m_storage.address());
- m_initialized = true ;
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void construct ( Expr const& factory, typed_in_place_factory_base const* )
- {
- factory.apply(boost::addressof(m_storage)) ;
- m_initialized = true ;
- }
-
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-#endif
-
-#endif
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Constructs using any expression implicitly convertible to the single argument
- // of a one-argument T constructor.
- // Converting constructions of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
- template<class Expr>
- void construct ( Expr&& expr, void const* )
- {
- m_storage = value_type(boost::forward<Expr>(expr)) ;
- m_initialized = true ;
- }
-
- // Assigns using a form any expression implicitly convertible to the single argument
- // of a T's assignment operator.
- // Converting assignments of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& expr, void const* )
- {
- assign_value( boost::forward<Expr>(expr) );
- }
-#else
- // Constructs using any expression implicitly convertible to the single argument
- // of a one-argument T constructor.
- // Converting constructions of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
- template<class Expr>
- void construct ( Expr const& expr, void const* )
- {
- m_storage = value_type(expr) ;
- m_initialized = true ;
- }
-
- // Assigns using a form any expression implicitly convertible to the single argument
- // of a T's assignment operator.
- // Converting assignments of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& expr, void const* )
- {
- assign_value(expr);
- }
-
-#endif
-
-#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
- // BCB5.64 (and probably lower versions) workaround.
- // The in-place factories are supported by means of catch-all constructors
- // and assignment operators (the functions are parameterized in terms of
- // an arbitrary 'Expr' type)
- // This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
- // to the 'Expr'-taking functions even though explicit overloads are present for them.
- // Thus, the following overload is needed to properly handle the case when the 'lhs'
- // is another optional.
- //
- // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
- // instead of choosing the wrong overload
- //
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Notice that 'Expr' will be optional<T> or optional<U> (but not tc_optional_base<..>)
- template<class Expr>
- void construct ( Expr&& expr, optional_tag const* )
- {
- if ( expr.is_initialized() )
- {
- // An exception can be thrown here.
- // It it happens, THIS will be left uninitialized.
- m_storage = value_type(boost::move(expr.get())) ;
- m_initialized = true ;
- }
- }
-#else
- // Notice that 'Expr' will be optional<T> or optional<U> (but not tc_optional_base<..>)
- template<class Expr>
- void construct ( Expr const& expr, optional_tag const* )
- {
- if ( expr.is_initialized() )
- {
- // An exception can be thrown here.
- // It it happens, THIS will be left uninitialized.
- m_storage = value_type(expr.get()) ;
- m_initialized = true ;
- }
- }
-#endif
-#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
-
- void assign_value ( argument_type val ) { m_storage = val; }
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- void assign_value ( rval_reference_type val ) { m_storage = static_cast<rval_reference_type>(val); }
-#endif
-
- void destroy()
- {
- m_initialized = false;
- }
-
- reference_const_type get_impl() const { return m_storage ; }
- reference_type get_impl() { return m_storage ; }
-
- pointer_const_type get_ptr_impl() const { return boost::addressof(m_storage); }
- pointer_type get_ptr_impl() { return boost::addressof(m_storage); }
-
- private :
-
- bool m_initialized ;
- T m_storage ;
-} ;
diff --git a/src/third_party/boost-1.68.0/boost/optional/optional.hpp b/src/third_party/boost-1.68.0/boost/optional/optional.hpp
deleted file mode 100644
index 01cb2bda1f6..00000000000
--- a/src/third_party/boost-1.68.0/boost/optional/optional.hpp
+++ /dev/null
@@ -1,1598 +0,0 @@
-// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
-// Copyright (C) 2014 - 2018 Andrzej Krzemienski.
-//
-// Use, modification, and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/optional for documentation.
-//
-// You are welcome to contact the author at:
-// fernando_cacciola@hotmail.com
-//
-// Revisions:
-// 27 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen
-// 05 May 2014 (Added move semantics) Andrzej Krzemienski
-//
-#ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
-#define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
-
-#include <new>
-#include <iosfwd>
-
-#ifdef BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
-# include <type_traits>
-#endif
-
-#include <boost/assert.hpp>
-#include <boost/core/addressof.hpp>
-#include <boost/core/enable_if.hpp>
-#include <boost/core/explicit_operator_bool.hpp>
-#include <boost/core/swap.hpp>
-#include <boost/optional/bad_optional_access.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/type.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <boost/type_traits/conditional.hpp>
-#include <boost/type_traits/has_nothrow_constructor.hpp>
-#include <boost/type_traits/type_with_alignment.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/decay.hpp>
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_constructible.hpp>
-#include <boost/type_traits/is_lvalue_reference.hpp>
-#include <boost/type_traits/is_nothrow_move_assignable.hpp>
-#include <boost/type_traits/is_nothrow_move_constructible.hpp>
-#include <boost/type_traits/is_rvalue_reference.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#include <boost/type_traits/is_scalar.hpp>
-#include <boost/move/utility.hpp>
-#include <boost/none.hpp>
-#include <boost/utility/compare_pointees.hpp>
-#include <boost/utility/result_of.hpp>
-
-#include <boost/optional/optional_fwd.hpp>
-#include <boost/optional/detail/optional_config.hpp>
-#include <boost/optional/detail/optional_factory_support.hpp>
-#include <boost/optional/detail/optional_aligned_storage.hpp>
-
-namespace boost { namespace optional_detail {
-
-template <typename T>
-struct optional_value_type
-{
-};
-
-template <typename T>
-struct optional_value_type< ::boost::optional<T> >
-{
- typedef T type;
-};
-
-}} // namespace boost::optional_detail
-
-#ifdef BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
-#include <boost/optional/detail/old_optional_implementation.hpp>
-#else
-namespace boost {
-
-namespace optional_ns {
-
-// a tag for in-place initialization of contained value
-struct in_place_init_t
-{
- struct init_tag{};
- explicit in_place_init_t(init_tag){}
-};
-const in_place_init_t in_place_init ((in_place_init_t::init_tag()));
-
-// a tag for conditional in-place initialization of contained value
-struct in_place_init_if_t
-{
- struct init_tag{};
- explicit in_place_init_if_t(init_tag){}
-};
-const in_place_init_if_t in_place_init_if ((in_place_init_if_t::init_tag()));
-
-} // namespace optional_ns
-
-using optional_ns::in_place_init_t;
-using optional_ns::in_place_init;
-using optional_ns::in_place_init_if_t;
-using optional_ns::in_place_init_if;
-
-namespace optional_detail {
-
-struct optional_tag {} ;
-
-
-template<class T>
-class optional_base : public optional_tag
-{
- private :
-
- typedef aligned_storage<T> storage_type ;
- typedef optional_base<T> this_type ;
-
- protected :
-
- typedef T value_type ;
-
- protected:
- typedef T & reference_type ;
- typedef T const& reference_const_type ;
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- typedef T && rval_reference_type ;
- typedef T && reference_type_of_temporary_wrapper ;
-#endif
- typedef T * pointer_type ;
- typedef T const* pointer_const_type ;
- typedef T const& argument_type ;
-
- // Creates an optional<T> uninitialized.
- // No-throw
- optional_base()
- :
- m_initialized(false) {}
-
- // Creates an optional<T> uninitialized.
- // No-throw
- optional_base ( none_t )
- :
- m_initialized(false) {}
-
- // Creates an optional<T> initialized with 'val'.
- // Can throw if T::T(T const&) does
- optional_base ( argument_type val )
- :
- m_initialized(false)
- {
- construct(val);
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // move-construct an optional<T> initialized from an rvalue-ref to 'val'.
- // Can throw if T::T(T&&) does
- optional_base ( rval_reference_type val )
- :
- m_initialized(false)
- {
- construct( boost::move(val) );
- }
-#endif
-
- // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional<T>.
- // Can throw if T::T(T const&) does
- optional_base ( bool cond, argument_type val )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(val);
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates an optional<T> initialized with 'move(val)' IFF cond is true, otherwise creates an uninitialized optional<T>.
- // Can throw if T::T(T &&) does
- optional_base ( bool cond, rval_reference_type val )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(boost::move(val));
- }
-#endif
-
- // Creates a deep copy of another optional<T>
- // Can throw if T::T(T const&) does
- optional_base ( optional_base const& rhs )
- :
- m_initialized(false)
- {
- if ( rhs.is_initialized() )
- construct(rhs.get_impl());
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates a deep move of another optional<T>
- // Can throw if T::T(T&&) does
- optional_base ( optional_base&& rhs )
- BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
- :
- m_initialized(false)
- {
- if ( rhs.is_initialized() )
- construct( boost::move(rhs.get_impl()) );
- }
-#endif
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
- template<class Expr, class PtrExpr>
- explicit optional_base ( Expr&& expr, PtrExpr const* tag )
- :
- m_initialized(false)
- {
- construct(boost::forward<Expr>(expr),tag);
- }
-
-#else
- // This is used for both converting and in-place constructions.
- // Derived classes use the 'tag' to select the appropriate
- // implementation (the correct 'construct()' overload)
- template<class Expr>
- explicit optional_base ( Expr const& expr, Expr const* tag )
- :
- m_initialized(false)
- {
- construct(expr,tag);
- }
-
-#endif
-
- optional_base& operator= ( optional_base const& rhs )
- {
- this->assign(rhs);
- return *this;
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- optional_base& operator= ( optional_base && rhs )
- BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
- {
- this->assign(static_cast<optional_base&&>(rhs));
- return *this;
- }
-#endif
-
- // No-throw (assuming T::~T() doesn't)
- ~optional_base() { destroy() ; }
-
- // Assigns from another optional<T> (deep-copies the rhs value)
- void assign ( optional_base const& rhs )
- {
- if (is_initialized())
- {
- if ( rhs.is_initialized() )
- assign_value(rhs.get_impl());
- else destroy();
- }
- else
- {
- if ( rhs.is_initialized() )
- construct(rhs.get_impl());
- }
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Assigns from another optional<T> (deep-moves the rhs value)
- void assign ( optional_base&& rhs )
- {
- if (is_initialized())
- {
- if ( rhs.is_initialized() )
- assign_value( boost::move(rhs.get_impl()) );
- else destroy();
- }
- else
- {
- if ( rhs.is_initialized() )
- construct(boost::move(rhs.get_impl()));
- }
- }
-#endif
-
- // Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
- template<class U>
- void assign ( optional<U> const& rhs )
- {
- if (is_initialized())
- {
- if ( rhs.is_initialized() )
-#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
- assign_value( rhs.get() );
-#else
- assign_value( static_cast<value_type>(rhs.get()) );
-#endif
-
- else destroy();
- }
- else
- {
- if ( rhs.is_initialized() )
-#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
- construct(rhs.get());
-#else
- construct(static_cast<value_type>(rhs.get()));
-#endif
- }
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // move-assigns from another _convertible_ optional<U> (deep-moves from the rhs value)
- template<class U>
- void assign ( optional<U>&& rhs )
- {
- typedef BOOST_DEDUCED_TYPENAME optional<U>::rval_reference_type ref_type;
- if (is_initialized())
- {
- if ( rhs.is_initialized() )
- assign_value( static_cast<ref_type>(rhs.get()) );
- else destroy();
- }
- else
- {
- if ( rhs.is_initialized() )
- construct(static_cast<ref_type>(rhs.get()));
- }
- }
-#endif
-
- // Assigns from a T (deep-copies the rhs value)
- void assign ( argument_type val )
- {
- if (is_initialized())
- assign_value(val);
- else construct(val);
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Assigns from a T (deep-moves the rhs value)
- void assign ( rval_reference_type val )
- {
- if (is_initialized())
- assign_value( boost::move(val) );
- else construct( boost::move(val) );
- }
-#endif
-
- // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
- // No-throw (assuming T::~T() doesn't)
- void assign ( none_t ) BOOST_NOEXCEPT { destroy(); }
-
-#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- template<class Expr, class ExprPtr>
- void assign_expr ( Expr&& expr, ExprPtr const* tag )
- {
- if (is_initialized())
- assign_expr_to_initialized(boost::forward<Expr>(expr),tag);
- else construct(boost::forward<Expr>(expr),tag);
- }
-#else
- template<class Expr>
- void assign_expr ( Expr const& expr, Expr const* tag )
- {
- if (is_initialized())
- assign_expr_to_initialized(expr,tag);
- else construct(expr,tag);
- }
-#endif
-
-#endif
-
- public :
-
- // **DEPPRECATED** Destroys the current value, if any, leaving this UNINITIALIZED
- // No-throw (assuming T::~T() doesn't)
- void reset() BOOST_NOEXCEPT { destroy(); }
-
- // **DEPPRECATED** Replaces the current value -if any- with 'val'
- void reset ( argument_type val ) { assign(val); }
-
- // Returns a pointer to the value if this is initialized, otherwise,
- // returns NULL.
- // No-throw
- pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
- pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
-
- bool is_initialized() const BOOST_NOEXCEPT { return m_initialized ; }
-
- protected :
-
- void construct ( argument_type val )
- {
- ::new (m_storage.address()) value_type(val) ;
- m_initialized = true ;
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- void construct ( rval_reference_type val )
- {
- ::new (m_storage.address()) value_type( boost::move(val) ) ;
- m_initialized = true ;
- }
-#endif
-
-
-#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- // Constructs in-place
- // upon exception *this is always uninitialized
- template<class... Args>
- void construct ( in_place_init_t, Args&&... args )
- {
- ::new (m_storage.address()) value_type( boost::forward<Args>(args)... ) ;
- m_initialized = true ;
- }
-
- template<class... Args>
- void emplace_assign ( Args&&... args )
- {
- destroy();
- construct(in_place_init, boost::forward<Args>(args)...);
- }
-
- template<class... Args>
- explicit optional_base ( in_place_init_t, Args&&... args )
- :
- m_initialized(false)
- {
- construct(in_place_init, boost::forward<Args>(args)...);
- }
-
- template<class... Args>
- explicit optional_base ( in_place_init_if_t, bool cond, Args&&... args )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(in_place_init, boost::forward<Args>(args)...);
- }
-#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- template<class Arg>
- void construct ( in_place_init_t, Arg&& arg )
- {
- ::new (m_storage.address()) value_type( boost::forward<Arg>(arg) );
- m_initialized = true ;
- }
-
- void construct ( in_place_init_t )
- {
- ::new (m_storage.address()) value_type();
- m_initialized = true ;
- }
-
- template<class Arg>
- void emplace_assign ( Arg&& arg )
- {
- destroy();
- construct(in_place_init, boost::forward<Arg>(arg)) ;
- }
-
- void emplace_assign ()
- {
- destroy();
- construct(in_place_init) ;
- }
-
- template<class Arg>
- explicit optional_base ( in_place_init_t, Arg&& arg )
- :
- m_initialized(false)
- {
- construct(in_place_init, boost::forward<Arg>(arg));
- }
-
- explicit optional_base ( in_place_init_t )
- :
- m_initialized(false)
- {
- construct(in_place_init);
- }
-
- template<class Arg>
- explicit optional_base ( in_place_init_if_t, bool cond, Arg&& arg )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(in_place_init, boost::forward<Arg>(arg));
- }
-
- explicit optional_base ( in_place_init_if_t, bool cond )
- :
- m_initialized(false)
- {
- if ( cond )
- construct(in_place_init);
- }
-
-#else
-
- template<class Arg>
- void construct ( in_place_init_t, const Arg& arg )
- {
- ::new (m_storage.address()) value_type( arg );
- m_initialized = true ;
- }
-
- template<class Arg>
- void construct ( in_place_init_t, Arg& arg )
- {
- ::new (m_storage.address()) value_type( arg );
- m_initialized = true ;
- }
-
- void construct ( in_place_init_t )
- {
- ::new (m_storage.address()) value_type();
- m_initialized = true ;
- }
-
- template<class Arg>
- void emplace_assign ( const Arg& arg )
- {
- destroy();
- construct(in_place_init, arg);
- }
-
- template<class Arg>
- void emplace_assign ( Arg& arg )
- {
- destroy();
- construct(in_place_init, arg);
- }
-
- void emplace_assign ()
- {
- destroy();
- construct(in_place_init);
- }
-
- template<class Arg>
- explicit optional_base ( in_place_init_t, const Arg& arg )
- : m_initialized(false)
- {
- construct(in_place_init, arg);
- }
-
- template<class Arg>
- explicit optional_base ( in_place_init_t, Arg& arg )
- : m_initialized(false)
- {
- construct(in_place_init, arg);
- }
-
- explicit optional_base ( in_place_init_t )
- : m_initialized(false)
- {
- construct(in_place_init);
- }
-
- template<class Arg>
- explicit optional_base ( in_place_init_if_t, bool cond, const Arg& arg )
- : m_initialized(false)
- {
- if ( cond )
- construct(in_place_init, arg);
- }
-
- template<class Arg>
- explicit optional_base ( in_place_init_if_t, bool cond, Arg& arg )
- : m_initialized(false)
- {
- if ( cond )
- construct(in_place_init, arg);
- }
-
- explicit optional_base ( in_place_init_if_t, bool cond )
- : m_initialized(false)
- {
- if ( cond )
- construct(in_place_init);
- }
-#endif
-
-#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Constructs in-place using the given factory
- template<class Expr>
- void construct ( Expr&& factory, in_place_factory_base const* )
- {
- boost_optional_detail::construct<value_type>(factory, m_storage.address());
- m_initialized = true ;
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void construct ( Expr&& factory, typed_in_place_factory_base const* )
- {
- factory.apply(m_storage.address()) ;
- m_initialized = true ;
- }
-
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
-#else
- // Constructs in-place using the given factory
- template<class Expr>
- void construct ( Expr const& factory, in_place_factory_base const* )
- {
- boost_optional_detail::construct<value_type>(factory, m_storage.address());
- m_initialized = true ;
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void construct ( Expr const& factory, typed_in_place_factory_base const* )
- {
- factory.apply(m_storage.address()) ;
- m_initialized = true ;
- }
-
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-
- // Constructs in-place using the given typed factory
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
- {
- destroy();
- construct(factory,tag);
- }
-#endif
-
-#endif
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Constructs using any expression implicitly convertible to the single argument
- // of a one-argument T constructor.
- // Converting constructions of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
- template<class Expr>
- void construct ( Expr&& expr, void const* )
- {
- new (m_storage.address()) value_type(boost::forward<Expr>(expr)) ;
- m_initialized = true ;
- }
-
- // Assigns using a form any expression implicitly convertible to the single argument
- // of a T's assignment operator.
- // Converting assignments of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
- template<class Expr>
- void assign_expr_to_initialized ( Expr&& expr, void const* )
- {
- assign_value( boost::forward<Expr>(expr) );
- }
-#else
- // Constructs using any expression implicitly convertible to the single argument
- // of a one-argument T constructor.
- // Converting constructions of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
- template<class Expr>
- void construct ( Expr const& expr, void const* )
- {
- new (m_storage.address()) value_type(expr) ;
- m_initialized = true ;
- }
-
- // Assigns using a form any expression implicitly convertible to the single argument
- // of a T's assignment operator.
- // Converting assignments of optional<T> from optional<U> uses this function with
- // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
- template<class Expr>
- void assign_expr_to_initialized ( Expr const& expr, void const* )
- {
- assign_value(expr);
- }
-
-#endif
-
-#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
- // BCB5.64 (and probably lower versions) workaround.
- // The in-place factories are supported by means of catch-all constructors
- // and assignment operators (the functions are parameterized in terms of
- // an arbitrary 'Expr' type)
- // This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
- // to the 'Expr'-taking functions even though explicit overloads are present for them.
- // Thus, the following overload is needed to properly handle the case when the 'lhs'
- // is another optional.
- //
- // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
- // instead of choosing the wrong overload
- //
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
- template<class Expr>
- void construct ( Expr&& expr, optional_tag const* )
- {
- if ( expr.is_initialized() )
- {
- // An exception can be thrown here.
- // It it happens, THIS will be left uninitialized.
- new (m_storage.address()) value_type(boost::move(expr.get())) ;
- m_initialized = true ;
- }
- }
-#else
- // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
- template<class Expr>
- void construct ( Expr const& expr, optional_tag const* )
- {
- if ( expr.is_initialized() )
- {
- // An exception can be thrown here.
- // It it happens, THIS will be left uninitialized.
- new (m_storage.address()) value_type(expr.get()) ;
- m_initialized = true ;
- }
- }
-#endif
-#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
-
- void assign_value ( argument_type val ) { get_impl() = val; }
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- void assign_value ( rval_reference_type val ) { get_impl() = static_cast<rval_reference_type>(val); }
-#endif
-
- void destroy()
- {
- if ( m_initialized )
- destroy_impl() ;
- }
-
- reference_const_type get_impl() const { return m_storage.ref() ; }
- reference_type get_impl() { return m_storage.ref() ; }
-
- pointer_const_type get_ptr_impl() const { return m_storage.ptr_ref(); }
- pointer_type get_ptr_impl() { return m_storage.ptr_ref(); }
-
- private :
-
-#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1900))
- void destroy_impl ( ) { m_storage.ptr_ref()->~T() ; m_initialized = false ; }
-#else
- void destroy_impl ( ) { m_storage.ref().T::~T() ; m_initialized = false ; }
-#endif
-
- bool m_initialized ;
- storage_type m_storage ;
-} ;
-
-#include <boost/optional/detail/optional_trivially_copyable_base.hpp>
-
-// definition of metafunciton is_optional_val_init_candidate
-template <typename U>
-struct is_optional_related
- : boost::conditional< boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
- || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, none_t>::value
- || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, in_place_init_t>::value
- || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, in_place_init_if_t>::value,
- boost::true_type, boost::false_type>::type
-{};
-
-#if !defined(BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT)
-
-template <typename T, typename U>
-struct is_convertible_to_T_or_factory
- : boost::conditional< boost::is_base_of<boost::in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
- || boost::is_base_of<boost::typed_in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
- || (boost::is_constructible<T, U&&>::value && !boost::is_same<T, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value)
- , boost::true_type, boost::false_type>::type
-{};
-
-template <typename T, typename U>
-struct is_optional_constructible : boost::is_constructible<T, U>
-{};
-
-#else
-
-template <typename, typename>
-struct is_convertible_to_T_or_factory : boost::true_type
-{};
-
-template <typename T, typename U>
-struct is_optional_constructible : boost::true_type
-{};
-
-#endif // is_convertible condition
-
-template <typename T, typename U>
-struct is_optional_val_init_candidate
- : boost::conditional< !is_optional_related<U>::value && is_convertible_to_T_or_factory<T, U>::value
- , boost::true_type, boost::false_type>::type
-{};
-
-} // namespace optional_detail
-
-namespace optional_config {
-
-template <typename T>
-struct optional_uses_direct_storage_for
- : boost::conditional<(boost::is_scalar<T>::value && !boost::is_const<T>::value && !boost::is_volatile<T>::value)
- , boost::true_type, boost::false_type>::type
-{};
-
-} // namespace optional_config
-
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_DIRECT_STORAGE_SPEC
-# define BOOST_OPTIONAL_BASE_TYPE(T) boost::conditional< optional_config::optional_uses_direct_storage_for<T>::value, \
- optional_detail::tc_optional_base<T>, \
- optional_detail::optional_base<T> \
- >::type
-#else
-# define BOOST_OPTIONAL_BASE_TYPE(T) optional_detail::optional_base<T>
-#endif
-
-template<class T>
-class optional
- : public BOOST_OPTIONAL_BASE_TYPE(T)
-{
- typedef typename BOOST_OPTIONAL_BASE_TYPE(T) base ;
-
- public :
-
- typedef optional<T> this_type ;
-
- typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ;
- typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ;
- typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ;
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- typedef BOOST_DEDUCED_TYPENAME base::rval_reference_type rval_reference_type ;
- typedef BOOST_DEDUCED_TYPENAME base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
-#endif
- typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ;
- typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ;
- typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ;
-
- // Creates an optional<T> uninitialized.
- // No-throw
- optional() BOOST_NOEXCEPT : base() {}
-
- // Creates an optional<T> uninitialized.
- // No-throw
- optional( none_t none_ ) BOOST_NOEXCEPT : base(none_) {}
-
- // Creates an optional<T> initialized with 'val'.
- // Can throw if T::T(T const&) does
- optional ( argument_type val ) : base(val) {}
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates an optional<T> initialized with 'move(val)'.
- // Can throw if T::T(T &&) does
- optional ( rval_reference_type val ) : base( boost::forward<T>(val) )
- {}
-#endif
-
- // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
- // Can throw if T::T(T const&) does
- optional ( bool cond, argument_type val ) : base(cond,val) {}
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- /// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
- // Can throw if T::T(T &&) does
- optional ( bool cond, rval_reference_type val ) : base( cond, boost::forward<T>(val) )
- {}
-#endif
-
- // NOTE: MSVC needs templated versions first
-
- // Creates a deep copy of another convertible optional<U>
- // Requires a valid conversion from U to T.
- // Can throw if T::T(U const&) does
- template<class U>
- explicit optional ( optional<U> const& rhs
-#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
- ,BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_constructible<T, U const&>, bool>::type = true
-#endif
- )
- :
- base()
- {
- if ( rhs.is_initialized() )
- this->construct(rhs.get());
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates a deep move of another convertible optional<U>
- // Requires a valid conversion from U to T.
- // Can throw if T::T(U&&) does
- template<class U>
- explicit optional ( optional<U> && rhs
-#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
- ,BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_constructible<T, U>, bool>::type = true
-#endif
- )
- :
- base()
- {
- if ( rhs.is_initialized() )
- this->construct( boost::move(rhs.get()) );
- }
-#endif
-
-#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
- // Creates an optional<T> with an expression which can be either
- // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n);
- // (b) An instance of TypedInPlaceFactory ( i.e. in_place<T>(a,b,...,n);
- // (c) Any expression implicitly convertible to the single type
- // of a one-argument T's constructor.
- // (d*) Weak compilers (BCB) might also resolved Expr as optional<T> and optional<U>
- // even though explicit overloads are present for these.
- // Depending on the above some T ctor is called.
- // Can throw if the resolved T ctor throws.
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
-
- template<class Expr>
- explicit optional ( Expr&& expr,
- BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr>, bool>::type = true
- )
- : base(boost::forward<Expr>(expr),boost::addressof(expr))
- {}
-
-#else
- template<class Expr>
- explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {}
-#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-#endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
-
- // Creates a deep copy of another optional<T>
- // Can throw if T::T(T const&) does
-#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
- optional ( optional const& ) = default;
-#else
- optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
-#endif
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Creates a deep move of another optional<T>
- // Can throw if T::T(T&&) does
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
- optional ( optional && rhs ) = default;
-#else
- optional ( optional && rhs )
- BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
- : base( boost::move(rhs) )
- {}
-#endif
-
-#endif
-
-#if BOOST_WORKAROUND(_MSC_VER, <= 1600)
- // On old MSVC compilers the implicitly declared dtor is not called
- ~optional() {}
-#endif
-
-
-#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
- // Assigns from an expression. See corresponding constructor.
- // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
- template<class Expr>
- BOOST_DEDUCED_TYPENAME boost::enable_if<optional_detail::is_optional_val_init_candidate<T, Expr>, optional&>::type
- operator= ( Expr&& expr )
- {
- this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
- return *this ;
- }
-
-#else
- template<class Expr>
- optional& operator= ( Expr const& expr )
- {
- this->assign_expr(expr,boost::addressof(expr));
- return *this ;
- }
-#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-#endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
-
- // Copy-assigns from another convertible optional<U> (converts && deep-copies the rhs value)
- // Requires a valid conversion from U to T.
- // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED
- template<class U>
- optional& operator= ( optional<U> const& rhs )
- {
- this->assign(rhs);
- return *this ;
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Move-assigns from another convertible optional<U> (converts && deep-moves the rhs value)
- // Requires a valid conversion from U to T.
- // Basic Guarantee: If T::T( U && ) throws, this is left UNINITIALIZED
- template<class U>
- optional& operator= ( optional<U> && rhs )
- {
- this->assign(boost::move(rhs));
- return *this ;
- }
-#endif
-
- // Assigns from another optional<T> (deep-copies the rhs value)
- // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED
- // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
-#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
- optional& operator= ( optional const& rhs ) = default;
-#else
- optional& operator= ( optional const& rhs )
- {
- this->assign( static_cast<base const&>(rhs) ) ;
- return *this ;
- }
-#endif
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Assigns from another optional<T> (deep-moves the rhs value)
-#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
- optional& operator= ( optional && ) = default;
-#else
- optional& operator= ( optional && rhs )
- BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
- {
- this->assign( static_cast<base &&>(rhs) ) ;
- return *this ;
- }
-#endif
-
-#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
-#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-
- // Assigns from a T (deep-moves/copies the rhs value)
- template <typename T_>
- BOOST_DEDUCED_TYPENAME boost::enable_if<boost::is_same<T, BOOST_DEDUCED_TYPENAME boost::decay<T_>::type>, optional&>::type
- operator= ( T_&& val )
- {
- this->assign( boost::forward<T_>(val) ) ;
- return *this ;
- }
-
-#else
-
- // Assigns from a T (deep-copies the rhs value)
- // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED
- optional& operator= ( argument_type val )
- {
- this->assign( val ) ;
- return *this ;
- }
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- // Assigns from a T (deep-moves the rhs value)
- optional& operator= ( rval_reference_type val )
- {
- this->assign( boost::move(val) ) ;
- return *this ;
- }
-#endif
-
-#endif // BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
-
- // Assigns from a "none"
- // Which destroys the current value, if any, leaving this UNINITIALIZED
- // No-throw (assuming T::~T() doesn't)
- optional& operator= ( none_t none_ ) BOOST_NOEXCEPT
- {
- this->assign( none_ ) ;
- return *this ;
- }
-
-#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
- // Constructs in-place
- // upon exception *this is always uninitialized
- template<class... Args>
- void emplace ( Args&&... args )
- {
- this->emplace_assign( boost::forward<Args>(args)... );
- }
-
- template<class... Args>
- explicit optional ( in_place_init_t, Args&&... args )
- : base( in_place_init, boost::forward<Args>(args)... )
- {}
-
- template<class... Args>
- explicit optional ( in_place_init_if_t, bool cond, Args&&... args )
- : base( in_place_init_if, cond, boost::forward<Args>(args)... )
- {}
-
-#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- template<class Arg>
- void emplace ( Arg&& arg )
- {
- this->emplace_assign( boost::forward<Arg>(arg) );
- }
-
- void emplace ()
- {
- this->emplace_assign();
- }
-
- template<class Args>
- explicit optional ( in_place_init_t, Args&& args )
- : base( in_place_init, boost::forward<Args>(args) )
- {}
-
- explicit optional ( in_place_init_t )
- : base( in_place_init )
- {}
-
- template<class Args>
- explicit optional ( in_place_init_if_t, bool cond, Args&& args )
- : base( in_place_init_if, cond, boost::forward<Args>(args) )
- {}
-
- explicit optional ( in_place_init_if_t, bool cond )
- : base( in_place_init_if, cond )
- {}
-#else
- template<class Arg>
- void emplace ( const Arg& arg )
- {
- this->emplace_assign( arg );
- }
-
- template<class Arg>
- void emplace ( Arg& arg )
- {
- this->emplace_assign( arg );
- }
-
- void emplace ()
- {
- this->emplace_assign();
- }
-
- template<class Arg>
- explicit optional ( in_place_init_t, const Arg& arg )
- : base( in_place_init, arg )
- {}
-
- template<class Arg>
- explicit optional ( in_place_init_t, Arg& arg )
- : base( in_place_init, arg )
- {}
-
- explicit optional ( in_place_init_t )
- : base( in_place_init )
- {}
-
- template<class Arg>
- explicit optional ( in_place_init_if_t, bool cond, const Arg& arg )
- : base( in_place_init_if, cond, arg )
- {}
-
- template<class Arg>
- explicit optional ( in_place_init_if_t, bool cond, Arg& arg )
- : base( in_place_init_if, cond, arg )
- {}
-
- explicit optional ( in_place_init_if_t, bool cond )
- : base( in_place_init_if, cond )
- {}
-#endif
-
- void swap( optional & arg )
- BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
- {
- // allow for Koenig lookup
- boost::swap(*this, arg);
- }
-
-
- // Returns a reference to the value if this is initialized, otherwise,
- // the behaviour is UNDEFINED
- // No-throw
- reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
- reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
-
- // Returns a copy of the value if this is initialized, 'v' otherwise
- reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
- reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; }
-
- // Returns a pointer to the value if this is initialized, otherwise,
- // the behaviour is UNDEFINED
- // No-throw
- pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
- pointer_type operator->() { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
-
- // Returns a reference to the value if this is initialized, otherwise,
- // the behaviour is UNDEFINED
- // No-throw
-#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- reference_const_type operator *() const& { return this->get() ; }
- reference_type operator *() & { return this->get() ; }
- reference_type_of_temporary_wrapper operator *() && { return boost::move(this->get()) ; }
-#else
- reference_const_type operator *() const { return this->get() ; }
- reference_type operator *() { return this->get() ; }
-#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
-
-#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- reference_const_type value() const&
- {
- if (this->is_initialized())
- return this->get() ;
- else
- throw_exception(bad_optional_access());
- }
-
- reference_type value() &
- {
- if (this->is_initialized())
- return this->get() ;
- else
- throw_exception(bad_optional_access());
- }
-
- reference_type_of_temporary_wrapper value() &&
- {
- if (this->is_initialized())
- return boost::move(this->get()) ;
- else
- throw_exception(bad_optional_access());
- }
-
-#else
- reference_const_type value() const
- {
- if (this->is_initialized())
- return this->get() ;
- else
- throw_exception(bad_optional_access());
- }
-
- reference_type value()
- {
- if (this->is_initialized())
- return this->get() ;
- else
- throw_exception(bad_optional_access());
- }
-#endif
-
-
-#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
- template <class U>
- value_type value_or ( U&& v ) const&
- {
- if (this->is_initialized())
- return get();
- else
- return boost::forward<U>(v);
- }
-
- template <class U>
- value_type value_or ( U&& v ) &&
- {
- if (this->is_initialized())
- return boost::move(get());
- else
- return boost::forward<U>(v);
- }
-#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
- template <class U>
- value_type value_or ( U&& v ) const
- {
- if (this->is_initialized())
- return get();
- else
- return boost::forward<U>(v);
- }
-#else
- template <class U>
- value_type value_or ( U const& v ) const
- {
- if (this->is_initialized())
- return get();
- else
- return v;
- }
-
- template <class U>
- value_type value_or ( U& v ) const
- {
- if (this->is_initialized())
- return get();
- else
- return v;
- }
-#endif
-
-
-#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
- template <typename F>
- value_type value_or_eval ( F f ) const&
- {
- if (this->is_initialized())
- return get();
- else
- return f();
- }
-
- template <typename F>
- value_type value_or_eval ( F f ) &&
- {
- if (this->is_initialized())
- return boost::move(get());
- else
- return f();
- }
-
- template <typename F>
- optional<typename boost::result_of<F(reference_type)>::type> map(F f) &
- {
- if (this->has_value())
- return f(get());
- else
- return none;
- }
-
- template <typename F>
- optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const&
- {
- if (this->has_value())
- return f(get());
- else
- return none;
- }
-
- template <typename F>
- optional<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type> map(F f) &&
- {
- if (this->has_value())
- return f(boost::move(this->get()));
- else
- return none;
- }
-
- template <typename F>
- optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f) &
- {
- if (this->has_value())
- return f(get());
- else
- return none;
- }
-
- template <typename F>
- optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const&
- {
- if (this->has_value())
- return f(get());
- else
- return none;
- }
-
- template <typename F>
- optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type>::type> flat_map(F f) &&
- {
- if (this->has_value())
- return f(boost::move(get()));
- else
- return none;
- }
-
-#else
- template <typename F>
- value_type value_or_eval ( F f ) const
- {
- if (this->is_initialized())
- return get();
- else
- return f();
- }
-
- template <typename F>
- optional<typename boost::result_of<F(reference_type)>::type> map(F f)
- {
- if (this->has_value())
- return f(get());
- else
- return none;
- }
-
- template <typename F>
- optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const
- {
- if (this->has_value())
- return f(get());
- else
- return none;
- }
-
- template <typename F>
- optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f)
- {
- if (this->has_value())
- return f(get());
- else
- return none;
- }
-
- template <typename F>
- optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const
- {
- if (this->has_value())
- return f(get());
- else
- return none;
- }
-
-#endif
-
- bool has_value() const BOOST_NOEXCEPT { return this->is_initialized() ; }
-
- bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; }
-
- BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
-} ;
-
-} // namespace boost
-
-#endif // BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
-
-namespace boost {
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-template<class T>
-class optional<T&&>
-{
- BOOST_STATIC_ASSERT_MSG(sizeof(T) == 0, "Optional rvalue references are illegal.");
-} ;
-#endif
-
-} // namespace boost
-
-#ifndef BOOST_OPTIONAL_CONFIG_DONT_SPECIALIZE_OPTIONAL_REFS
-# include <boost/optional/detail/optional_reference_spec.hpp>
-#endif
-
-namespace boost {
-
-#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
-template<class T>
-inline
-optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type> make_optional ( T && v )
-{
- return optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>(boost::forward<T>(v));
-}
-
-// Returns optional<T>(cond,v)
-template<class T>
-inline
-optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type> make_optional ( bool cond, T && v )
-{
- return optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>(cond,boost::forward<T>(v));
-}
-
-#else
-
-// Returns optional<T>(v)
-template<class T>
-inline
-optional<T> make_optional ( T const& v )
-{
- return optional<T>(v);
-}
-
-// Returns optional<T>(cond,v)
-template<class T>
-inline
-optional<T> make_optional ( bool cond, T const& v )
-{
- return optional<T>(cond,v);
-}
-
-#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
-
-// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
-// No-throw
-template<class T>
-inline
-BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type
-get ( optional<T> const& opt )
-{
- return opt.get() ;
-}
-
-template<class T>
-inline
-BOOST_DEDUCED_TYPENAME optional<T>::reference_type
-get ( optional<T>& opt )
-{
- return opt.get() ;
-}
-
-// Returns a pointer to the value if this is initialized, otherwise, returns NULL.
-// No-throw
-template<class T>
-inline
-BOOST_DEDUCED_TYPENAME optional<T>::pointer_const_type
-get ( optional<T> const* opt )
-{
- return opt->get_ptr() ;
-}
-
-template<class T>
-inline
-BOOST_DEDUCED_TYPENAME optional<T>::pointer_type
-get ( optional<T>* opt )
-{
- return opt->get_ptr() ;
-}
-
-// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
-// No-throw
-template<class T>
-inline
-BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type
-get_optional_value_or ( optional<T> const& opt, BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type v )
-{
- return opt.get_value_or(v) ;
-}
-
-template<class T>
-inline
-BOOST_DEDUCED_TYPENAME optional<T>::reference_type
-get_optional_value_or ( optional<T>& opt, BOOST_DEDUCED_TYPENAME optional<T>::reference_type v )
-{
- return opt.get_value_or(v) ;
-}
-
-// Returns a pointer to the value if this is initialized, otherwise, returns NULL.
-// No-throw
-template<class T>
-inline
-BOOST_DEDUCED_TYPENAME optional<T>::pointer_const_type
-get_pointer ( optional<T> const& opt )
-{
- return opt.get_ptr() ;
-}
-
-template<class T>
-inline
-BOOST_DEDUCED_TYPENAME optional<T>::pointer_type
-get_pointer ( optional<T>& opt )
-{
- return opt.get_ptr() ;
-}
-
-} // namespace boost
-
-namespace boost {
-
-// The following declaration prevents a bug where operator safe-bool is used upon streaming optional object if you forget the IO header.
-template<class CharType, class CharTrait>
-std::basic_ostream<CharType, CharTrait>&
-operator<<(std::basic_ostream<CharType, CharTrait>& os, optional_detail::optional_tag const&)
-{
- BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
- return os;
-}
-
-} // namespace boost
-
-#include <boost/optional/detail/optional_relops.hpp>
-#include <boost/optional/detail/optional_swap.hpp>
-
-#endif // header guard
diff --git a/src/third_party/boost-1.68.0/boost/pending/integer_log2.hpp b/src/third_party/boost-1.68.0/boost/pending/integer_log2.hpp
deleted file mode 100644
index 023ec7af038..00000000000
--- a/src/third_party/boost-1.68.0/boost/pending/integer_log2.hpp
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef BOOST_PENDING_INTEGER_LOG2_HPP
-#define BOOST_PENDING_INTEGER_LOG2_HPP
-
-// The header file at this path is deprecated;
-// use boost/integer/integer_log2.hpp instead.
-
-#include <boost/integer/integer_log2.hpp>
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/pending/lowest_bit.hpp b/src/third_party/boost-1.68.0/boost/pending/lowest_bit.hpp
deleted file mode 100644
index 697f6d070f9..00000000000
--- a/src/third_party/boost-1.68.0/boost/pending/lowest_bit.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// -----------------------------------------------------------
-// lowest_bit.hpp
-//
-// Position of the lowest bit 'on'
-//
-// Copyright (c) 2003-2004, 2008 Gennaro Prota
-//
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// -----------------------------------------------------------
-
-#ifndef BOOST_LOWEST_BIT_HPP_GP_20030301
-#define BOOST_LOWEST_BIT_HPP_GP_20030301
-
-#include <assert.h>
-#include "boost/integer/integer_log2.hpp"
-
-
-namespace boost {
-
- template <typename T>
- int lowest_bit(T x) {
-
- assert(x >= 1); // PRE
-
- // clear all bits on except the rightmost one,
- // then calculate the logarithm base 2
- //
- return boost::integer_log2<T>( x - ( x & (x-1) ) );
-
- }
-
-
-}
-
-
-#endif // include guard
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/compaq.h b/src/third_party/boost-1.68.0/boost/predef/compiler/compaq.h
deleted file mode 100644
index 96a79e67561..00000000000
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/compaq.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Copyright Rene Rivera 2008-2015
-Distributed under the Boost Software License, Version 1.0.
-(See accompanying file LICENSE_1_0.txt or copy at
-http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_PREDEF_COMPILER_COMPAQ_H
-#define BOOST_PREDEF_COMPILER_COMPAQ_H
-
-#include <boost/predef/version_number.h>
-#include <boost/predef/make.h>
-
-/*`
-[heading `BOOST_COMP_DEC`]
-
-[@http://www.openvms.compaq.com/openvms/brochures/deccplus/ Compaq C/C++] compiler.
-Version number available as major, minor, and patch.
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`__DECCXX`] [__predef_detection__]]
- [[`__DECC`] [__predef_detection__]]
-
- [[`__DECCXX_VER`] [V.R.P]]
- [[`__DECC_VER`] [V.R.P]]
- ]
- */
-
-#define BOOST_COMP_DEC BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-#if defined(__DECC) || defined(__DECCXX)
-# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECCXX_VER)
-# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECCXX_VER)
-# endif
-# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECC_VER)
-# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER)
-# endif
-# if !defined(BOOST_COMP_DEC_DETECTION)
-# define BOOST_COM_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
-# endif
-#endif
-
-#ifdef BOOST_COMP_DEC_DETECTION
-# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
-# define BOOST_COMP_DEC_EMULATED BOOST_COMP_DEC_DETECTION
-# else
-# undef BOOST_COMP_DEC
-# define BOOST_COMP_DEC BOOST_COMP_DEC_DETECTION
-# endif
-# define BOOST_COMP_DEC_AVAILABLE
-# include <boost/predef/detail/comp_detected.h>
-#endif
-
-#define BOOST_COMP_DEC_NAME "Compaq C/C++"
-
-#endif
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC,BOOST_COMP_DEC_NAME)
-
-#ifdef BOOST_COMP_DEC_EMULATED
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC_EMULATED,BOOST_COMP_DEC_NAME)
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/nvcc.h b/src/third_party/boost-1.68.0/boost/predef/compiler/nvcc.h
deleted file mode 100644
index 3c35ef7cd84..00000000000
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/nvcc.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-Copyright Benjamin Worpitz 2018
-Distributed under the Boost Software License, Version 1.0.
-(See accompanying file LICENSE_1_0.txt or copy at
-http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_PREDEF_COMPILER_NVCC_H
-#define BOOST_PREDEF_COMPILER_NVCC_H
-
-#include <boost/predef/version_number.h>
-#include <boost/predef/make.h>
-
-/*`
-[heading `BOOST_COMP_NVCC`]
-
-[@https://en.wikipedia.org/wiki/NVIDIA_CUDA_Compiler NVCC] compiler.
-Version number available as major, minor, and patch beginning with version 7.5.
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`__NVCC__`] [__predef_detection__]]
-
- [[`__CUDACC_VER_MAJOR__`, `__CUDACC_VER_MINOR__`, `__CUDACC_VER_BUILD__`] [V.R.P]]
- ]
- */
-
-#define BOOST_COMP_NVCC BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-#if defined(__NVCC__)
-# if !defined(__CUDACC_VER_MAJOR__) || !defined(__CUDACC_VER_MINOR__) || !defined(__CUDACC_VER_BUILD__)
-# define BOOST_COMP_NVCC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
-# else
-# define BOOST_COMP_NVCC_DETECTION BOOST_VERSION_NUMBER(__CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, __CUDACC_VER_BUILD__)
-# endif
-#endif
-
-#ifdef BOOST_COMP_NVCC_DETECTION
-# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
-# define BOOST_COMP_NVCC_EMULATED BOOST_COMP_NVCC_DETECTION
-# else
-# undef BOOST_COMP_NVCC
-# define BOOST_COMP_NVCC BOOST_COMP_NVCC_DETECTION
-# endif
-# define BOOST_COMP_NVCC_AVAILABLE
-# include <boost/predef/detail/comp_detected.h>
-#endif
-
-#define BOOST_COMP_NVCC_NAME "NVCC"
-
-#endif
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_NVCC,BOOST_COMP_NVCC_NAME)
-
-#ifdef BOOST_COMP_NVCC_EMULATED
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_NVCC_EMULATED,BOOST_COMP_NVCC_NAME)
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/predef/detail/endian_compat.h b/src/third_party/boost-1.68.0/boost/predef/detail/endian_compat.h
deleted file mode 100644
index 7725e6823c3..00000000000
--- a/src/third_party/boost-1.68.0/boost/predef/detail/endian_compat.h
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Copyright Rene Rivera 2013
-Distributed under the Boost Software License, Version 1.0.
-(See accompanying file LICENSE_1_0.txt or copy at
-http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H
-#define BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H
-
-#include <boost/predef/other/endian.h>
-
-#if BOOST_ENDIAN_BIG_BYTE
-# define BOOST_BIG_ENDIAN
-# define BOOST_BYTE_ORDER 4321
-#endif
-#if BOOST_ENDIAN_LITTLE_BYTE
-# define BOOST_LITTLE_ENDIAN
-# define BOOST_BYTE_ORDER 1234
-#endif
-#if BOOST_ENDIAN_LITTLE_WORD
-# define BOOST_PDP_ENDIAN
-# define BOOST_BYTE_ORDER 2134
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/cygwin.h b/src/third_party/boost-1.68.0/boost/predef/os/cygwin.h
deleted file mode 100644
index 9d36f0f3174..00000000000
--- a/src/third_party/boost-1.68.0/boost/predef/os/cygwin.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-Copyright Rene Rivera 2008-2015
-Distributed under the Boost Software License, Version 1.0.
-(See accompanying file LICENSE_1_0.txt or copy at
-http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_PREDEF_OS_CYGWIN_H
-#define BOOST_PREDEF_OS_CYGWIN_H
-
-#include <boost/predef/version_number.h>
-#include <boost/predef/make.h>
-
-/*`
-[heading `BOOST_OS_CYGWIN`]
-
-[@http://en.wikipedia.org/wiki/Cygwin Cygwin] evironment.
-
-[table
- [[__predef_symbol__] [__predef_version__]]
-
- [[`__CYGWIN__`] [__predef_detection__]]
- ]
- */
-
-#define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_NOT_AVAILABLE
-
-#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
- defined(__CYGWIN__) \
- )
-# undef BOOST_OS_CYGWIN
-# define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_AVAILABLE
-#endif
-
-#if BOOST_OS_CYGWIN
-# define BOOST_OS_CYGWIN_AVAILABLE
-# include <boost/predef/detail/os_detected.h>
-#endif
-
-#define BOOST_OS_CYGWIN_NAME "Cygwin"
-
-#endif
-
-#include <boost/predef/detail/test.h>
-BOOST_PREDEF_DECLARE_TEST(BOOST_OS_CYGWIN,BOOST_OS_CYGWIN_NAME)
diff --git a/src/third_party/boost-1.68.0/boost/predef/version.h b/src/third_party/boost-1.68.0/boost/predef/version.h
deleted file mode 100644
index 960292fec62..00000000000
--- a/src/third_party/boost-1.68.0/boost/predef/version.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/*
-Copyright Rene Rivera 2015-2016
-Distributed under the Boost Software License, Version 1.0.
-(See accompanying file LICENSE_1_0.txt or copy at
-http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_PREDEF_VERSION_H
-#define BOOST_PREDEF_VERSION_H
-
-#include <boost/predef/version_number.h>
-
-#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,8,0)
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/config/config.hpp b/src/third_party/boost-1.68.0/boost/preprocessor/config/config.hpp
deleted file mode 100644
index cdb044c87bb..00000000000
--- a/src/third_party/boost-1.68.0/boost/preprocessor/config/config.hpp
+++ /dev/null
@@ -1,106 +0,0 @@
-# /* **************************************************************************
-# * *
-# * (C) Copyright Paul Mensonides 2002-2011. *
-# * (C) Copyright Edward Diener 2011. *
-# * Distributed under the Boost Software License, Version 1.0. (See *
-# * accompanying file LICENSE_1_0.txt or copy at *
-# * http://www.boost.org/LICENSE_1_0.txt) *
-# * *
-# ************************************************************************** */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP
-# define BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP
-#
-# /* BOOST_PP_CONFIG_FLAGS */
-#
-# define BOOST_PP_CONFIG_STRICT() 0x0001
-# define BOOST_PP_CONFIG_IDEAL() 0x0002
-#
-# define BOOST_PP_CONFIG_MSVC() 0x0004
-# define BOOST_PP_CONFIG_MWCC() 0x0008
-# define BOOST_PP_CONFIG_BCC() 0x0010
-# define BOOST_PP_CONFIG_EDG() 0x0020
-# define BOOST_PP_CONFIG_DMC() 0x0040
-#
-# ifndef BOOST_PP_CONFIG_FLAGS
-# if defined(__GCCXML__) || defined(__WAVE__) || defined(__MWERKS__) && __MWERKS__ >= 0x3200
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
-# elif defined(__EDG__) || defined(__EDG_VERSION__)
-# if defined(_MSC_VER) && !defined(__clang__) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308)
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
-# else
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT())
-# endif
-# elif defined(_MSC_VER) && defined(__clang__)
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
-# elif defined(__MWERKS__)
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC())
-# elif defined(__DMC__)
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_DMC())
-# elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
-# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC())
-# elif defined(_MSC_VER)
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
-# else
-# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
-# endif
-# endif
-#
-# /* BOOST_PP_CONFIG_EXTENDED_LINE_INFO */
-#
-# ifndef BOOST_PP_CONFIG_EXTENDED_LINE_INFO
-# define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 0
-# endif
-#
-# /* BOOST_PP_CONFIG_ERRORS */
-#
-# ifndef BOOST_PP_CONFIG_ERRORS
-# ifdef NDEBUG
-# define BOOST_PP_CONFIG_ERRORS 0
-# else
-# define BOOST_PP_CONFIG_ERRORS 1
-# endif
-# endif
-#
-# /* BOOST_PP_VARIADICS */
-#
-# define BOOST_PP_VARIADICS_MSVC 0
-# if !defined BOOST_PP_VARIADICS
-# /* variadic support explicitly disabled for all untested compilers */
-# if defined __GCCXML__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || defined __PGI
-# define BOOST_PP_VARIADICS 0
-# elif defined(__CUDACC__)
-# define BOOST_PP_VARIADICS 1
-# elif defined(_MSC_VER) && defined(__clang__)
-# define BOOST_PP_VARIADICS 1
-# /* VC++ (C/C++) and Intel C++ Compiler >= 17.0 with MSVC */
-# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__) || defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700)
-# define BOOST_PP_VARIADICS 1
-# undef BOOST_PP_VARIADICS_MSVC
-# define BOOST_PP_VARIADICS_MSVC 1
-# /* Wave (C/C++), GCC (C++) */
-# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__ && __GXX_EXPERIMENTAL_CXX0X__
-# define BOOST_PP_VARIADICS 1
-# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */
-# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
-# define BOOST_PP_VARIADICS 1
-# else
-# define BOOST_PP_VARIADICS 0
-# endif
-# elif !BOOST_PP_VARIADICS + 1 < 2
-# undef BOOST_PP_VARIADICS
-# define BOOST_PP_VARIADICS 1
-# if defined _MSC_VER && _MSC_VER >= 1400 && !defined(__clang__) && (defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI))
-# undef BOOST_PP_VARIADICS_MSVC
-# define BOOST_PP_VARIADICS_MSVC 1
-# endif
-# else
-# undef BOOST_PP_VARIADICS
-# define BOOST_PP_VARIADICS 0
-# endif
-#
-# endif
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/stringize.hpp b/src/third_party/boost-1.68.0/boost/preprocessor/stringize.hpp
deleted file mode 100644
index 64dd5fde3e3..00000000000
--- a/src/third_party/boost-1.68.0/boost/preprocessor/stringize.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-# /* Copyright (C) 2001
-# * Housemarque Oy
-# * http://www.housemarque.com
-# *
-# * Distributed under the Boost Software License, Version 1.0. (See
-# * accompanying file LICENSE_1_0.txt or copy at
-# * http://www.boost.org/LICENSE_1_0.txt)
-# */
-#
-# /* Revised by Paul Mensonides (2002) */
-#
-# /* See http://www.boost.org for most recent version. */
-#
-# ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP
-# define BOOST_PREPROCESSOR_STRINGIZE_HPP
-#
-# include <boost/preprocessor/config/config.hpp>
-#
-# /* BOOST_PP_STRINGIZE */
-#
-# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
-# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text))
-# define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg
-# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
-# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text))
-# define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par
-# else
-# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text)
-# endif
-#
-# define BOOST_PP_STRINGIZE_I(text) #text
-#
-# endif
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/random_shuffle.hpp b/src/third_party/boost-1.68.0/boost/range/algorithm/random_shuffle.hpp
deleted file mode 100644
index 24751733993..00000000000
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/random_shuffle.hpp
+++ /dev/null
@@ -1,141 +0,0 @@
-// Copyright Neil Groves 2009. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// For more information, see http://www.boost.org/libs/range/
-//
-#ifndef BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED
-#define BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED
-
-#include <boost/concept_check.hpp>
-#include <boost/range/begin.hpp>
-#include <boost/range/end.hpp>
-#include <boost/range/concepts.hpp>
-#include <algorithm>
-#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
-#include <cstdlib>
-#endif
-
-namespace boost
-{
- namespace range
- {
-
- namespace detail
- {
-#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
-
-// wrap std::rand as UniformRandomBitGenerator
-struct wrap_rand
-{
- typedef unsigned int result_type;
-
- static result_type (min)()
- {
- return 0;
- }
-
- static result_type (max)()
- {
- return RAND_MAX;
- }
-
- result_type operator()()
- {
- return std::rand();
- }
-};
-
-template< class RandomIt >
-inline void random_shuffle(RandomIt first, RandomIt last)
-{
- std::shuffle(first, last, wrap_rand());
-}
-
-// wrap Generator as UniformRandomBitGenerator
-template< class Generator >
-struct wrap_generator
-{
- typedef unsigned int result_type;
- static const int max_arg = ((0u - 1u) >> 2) + 1;
- Generator& g;
-
- wrap_generator(Generator& gen) : g(gen) {}
-
- static result_type (min)()
- {
- return 0;
- }
-
- static result_type (max)()
- {
- return max_arg - 1;
- }
-
- result_type operator()()
- {
- return static_cast<result_type>(g(max_arg));
- }
-};
-
-template< class RandomIt, class Generator >
-inline void random_shuffle(RandomIt first, RandomIt last, Generator& gen)
-{
- std::shuffle(first, last, wrap_generator< Generator >(gen));
-}
-
-#else
-
-using std::random_shuffle;
-
-#endif
- } // namespace detail
-
-/// \brief template function random_shuffle
-///
-/// range-based version of the random_shuffle std algorithm
-///
-/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
-/// \pre Generator is a model of the UnaryFunctionConcept
-template<class RandomAccessRange>
-inline RandomAccessRange& random_shuffle(RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
- detail::random_shuffle(boost::begin(rng), boost::end(rng));
- return rng;
-}
-
-/// \overload
-template<class RandomAccessRange>
-inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- detail::random_shuffle(boost::begin(rng), boost::end(rng));
- return rng;
-}
-
-/// \overload
-template<class RandomAccessRange, class Generator>
-inline RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
- detail::random_shuffle(boost::begin(rng), boost::end(rng), gen);
- return rng;
-}
-
-/// \overload
-template<class RandomAccessRange, class Generator>
-inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen)
-{
- BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
- detail::random_shuffle(boost::begin(rng), boost::end(rng), gen);
- return rng;
-}
-
- } // namespace range
- using range::random_shuffle;
-} // namespace boost
-
-#endif // include guard
diff --git a/src/third_party/boost-1.68.0/boost/range/begin.hpp b/src/third_party/boost-1.68.0/boost/range/begin.hpp
deleted file mode 100644
index 0d7d3db1c89..00000000000
--- a/src/third_party/boost-1.68.0/boost/range/begin.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// Boost.Range library
-//
-// Copyright Thorsten Ottosen 2003-2004. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// For more information, see http://www.boost.org/libs/range/
-//
-
-#ifndef BOOST_RANGE_BEGIN_HPP
-#define BOOST_RANGE_BEGIN_HPP
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/range/config.hpp>
-
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-#include <boost/range/detail/begin.hpp>
-#else
-
-#include <boost/range/iterator.hpp>
-
-namespace boost
-{
-
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-namespace range_detail
-{
-#endif
-
- //////////////////////////////////////////////////////////////////////
- // primary template
- //////////////////////////////////////////////////////////////////////
-
- template< typename C >
- BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
- range_begin( C& c )
- {
- //
- // If you get a compile-error here, it is most likely because
- // you have not implemented range_begin() properly in
- // the namespace of C
- //
- return c.begin();
- }
-
- //////////////////////////////////////////////////////////////////////
- // pair
- //////////////////////////////////////////////////////////////////////
-
- template< typename Iterator >
- BOOST_CONSTEXPR inline Iterator range_begin( const std::pair<Iterator,Iterator>& p )
- {
- return p.first;
- }
-
- template< typename Iterator >
- BOOST_CONSTEXPR inline Iterator range_begin( std::pair<Iterator,Iterator>& p )
- {
- return p.first;
- }
-
- //////////////////////////////////////////////////////////////////////
- // array
- //////////////////////////////////////////////////////////////////////
-
- //
- // May this be discarded? Or is it needed for bad compilers?
- //
- template< typename T, std::size_t sz >
- BOOST_CONSTEXPR inline const T* range_begin( const T (&a)[sz] ) BOOST_NOEXCEPT
- {
- return a;
- }
-
- template< typename T, std::size_t sz >
- BOOST_CONSTEXPR inline T* range_begin( T (&a)[sz] ) BOOST_NOEXCEPT
- {
- return a;
- }
-
-
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-} // namespace 'range_detail'
-#endif
-
-// Use a ADL namespace barrier to avoid ambiguity with other unqualified
-// calls. This is particularly important with C++0x encouraging
-// unqualified calls to begin/end.
-namespace range_adl_barrier
-{
-
-template< class T >
-BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
-{
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- using namespace range_detail;
-#endif
- return range_begin( r );
-}
-
-template< class T >
-BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
-{
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- using namespace range_detail;
-#endif
- return range_begin( r );
-}
-
- } // namespace range_adl_barrier
-} // namespace boost
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-namespace boost
-{
- namespace range_adl_barrier
- {
- template< class T >
- inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
- const_begin( const T& r )
- {
- return boost::range_adl_barrier::begin( r );
- }
- } // namespace range_adl_barrier
-
- using namespace range_adl_barrier;
-} // namespace boost
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/range/distance.hpp b/src/third_party/boost-1.68.0/boost/range/distance.hpp
deleted file mode 100644
index 8dcf05bc688..00000000000
--- a/src/third_party/boost-1.68.0/boost/range/distance.hpp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Boost.Range library
-//
-// Copyright Thorsten Ottosen 2003-2006. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// For more information, see http://www.boost.org/libs/range/
-//
-
-#ifndef BOOST_RANGE_DISTANCE_HPP
-#define BOOST_RANGE_DISTANCE_HPP
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/iterator/distance.hpp>
-#include <boost/range/begin.hpp>
-#include <boost/range/end.hpp>
-#include <boost/range/difference_type.hpp>
-
-namespace boost
-{
-
- template< class T >
- inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME range_difference<T>::type
- distance( const T& r )
- {
- return boost::distance( boost::begin( r ), boost::end( r ) );
- }
-
-} // namespace 'boost'
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/range/end.hpp b/src/third_party/boost-1.68.0/boost/range/end.hpp
deleted file mode 100644
index 588495cee58..00000000000
--- a/src/third_party/boost-1.68.0/boost/range/end.hpp
+++ /dev/null
@@ -1,128 +0,0 @@
-// Boost.Range library
-//
-// Copyright Thorsten Ottosen 2003-2004. Use, modification and
-// distribution is subject to the Boost Software License, Version
-// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// For more information, see http://www.boost.org/libs/range/
-//
-
-#ifndef BOOST_RANGE_END_HPP
-#define BOOST_RANGE_END_HPP
-
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/range/config.hpp>
-
-#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-#include <boost/range/detail/end.hpp>
-#else
-
-#include <boost/range/detail/implementation_help.hpp>
-#include <boost/range/iterator.hpp>
-#include <boost/range/const_iterator.hpp>
-
-namespace boost
-{
-
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-namespace range_detail
-{
-#endif
-
- //////////////////////////////////////////////////////////////////////
- // primary template
- //////////////////////////////////////////////////////////////////////
- template< typename C >
- BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
- range_end( C& c )
- {
- //
- // If you get a compile-error here, it is most likely because
- // you have not implemented range_begin() properly in
- // the namespace of C
- //
- return c.end();
- }
-
- //////////////////////////////////////////////////////////////////////
- // pair
- //////////////////////////////////////////////////////////////////////
-
- template< typename Iterator >
- BOOST_CONSTEXPR inline Iterator range_end( const std::pair<Iterator,Iterator>& p )
- {
- return p.second;
- }
-
- template< typename Iterator >
- BOOST_CONSTEXPR inline Iterator range_end( std::pair<Iterator,Iterator>& p )
- {
- return p.second;
- }
-
- //////////////////////////////////////////////////////////////////////
- // array
- //////////////////////////////////////////////////////////////////////
-
- template< typename T, std::size_t sz >
- BOOST_CONSTEXPR inline const T* range_end( const T (&a)[sz] ) BOOST_NOEXCEPT
- {
- return range_detail::array_end<T,sz>( a );
- }
-
- template< typename T, std::size_t sz >
- BOOST_CONSTEXPR inline T* range_end( T (&a)[sz] ) BOOST_NOEXCEPT
- {
- return range_detail::array_end<T,sz>( a );
- }
-
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-} // namespace 'range_detail'
-#endif
-
-namespace range_adl_barrier
-{
-
-template< class T >
-BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
-{
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- using namespace range_detail;
-#endif
- return range_end( r );
-}
-
-template< class T >
-BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
-{
-#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
- using namespace range_detail;
-#endif
- return range_end( r );
-}
-
- } // namespace range_adl_barrier
-} // namespace 'boost'
-
-#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
-
-namespace boost
-{
- namespace range_adl_barrier
- {
- template< class T >
- BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
- const_end( const T& r )
- {
- return boost::range_adl_barrier::end( r );
- }
- } // namespace range_adl_barrier
- using namespace range_adl_barrier;
-} // namespace boost
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/ratio/config.hpp b/src/third_party/boost-1.68.0/boost/ratio/config.hpp
deleted file mode 100644
index 992a256d810..00000000000
--- a/src/third_party/boost-1.68.0/boost/ratio/config.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-// config.hpp ---------------------------------------------------------------//
-
-// Copyright 2012 Vicente J. Botet Escriba
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-
-#ifndef BOOST_RATIO_CONFIG_HPP
-#define BOOST_RATIO_CONFIG_HPP
-
-#include <boost/config.hpp>
-#include <boost/cstdint.hpp>
-
-
-#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
-# if ! defined BOOST_NO_CXX11_U16STRING
-# define BOOST_NO_CXX11_U16STRING
-# endif
-# if ! defined BOOST_NO_CXX11_U32STRING
-# define BOOST_NO_CXX11_U32STRING
-# endif
-#endif
-
-
-#if !defined BOOST_RATIO_VERSION
-#define BOOST_RATIO_VERSION 1
-#else
-#if BOOST_RATIO_VERSION!=1 && BOOST_RATIO_VERSION!=2
-#error "BOOST_RATIO_VERSION must be 1 or 2"
-#endif
-#endif
-
-#if BOOST_RATIO_VERSION==1
-#if ! defined BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
-#define BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
-#endif
-#endif
-
-#if BOOST_RATIO_VERSION==2
-#if ! defined BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
-#define BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
-#endif
-#endif
-
-#ifdef INTMAX_C
-#define BOOST_RATIO_INTMAX_C(a) INTMAX_C(a)
-#else
-#define BOOST_RATIO_INTMAX_C(a) a##LL
-#endif
-
-#ifdef UINTMAX_C
-#define BOOST_RATIO_UINTMAX_C(a) UINTMAX_C(a)
-#else
-#define BOOST_RATIO_UINTMAX_C(a) a##ULL
-#endif
-
-#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFELL)
-
-
-#ifndef BOOST_NO_CXX11_STATIC_ASSERT
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
-#elif defined(BOOST_RATIO_USES_STATIC_ASSERT)
-#include <boost/static_assert.hpp>
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
-#elif defined(BOOST_RATIO_USES_MPL_ASSERT)
-#include <boost/mpl/assert.hpp>
-#include <boost/mpl/bool.hpp>
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \
- BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
-#else
-//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
-#define BOOST_RATIO_CONCAT(A,B) A##B
-#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
-#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1]
-//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
-#endif
-
-#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_RATIO_USES_MPL_ASSERT)
-#define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add"
-#define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub"
-#define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul"
-#define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
-#define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
-#define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0"
-#define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
-#endif
-
-
-//#define BOOST_RATIO_EXTENSIONS
-
-#endif // header
diff --git a/src/third_party/boost-1.68.0/boost/rational.hpp b/src/third_party/boost-1.68.0/boost/rational.hpp
deleted file mode 100644
index 16e708c577e..00000000000
--- a/src/third_party/boost-1.68.0/boost/rational.hpp
+++ /dev/null
@@ -1,999 +0,0 @@
-// Boost rational.hpp header file ------------------------------------------//
-
-// (C) Copyright Paul Moore 1999. Permission to copy, use, modify, sell and
-// distribute this software is granted provided this copyright notice appears
-// in all copies. This software is provided "as is" without express or
-// implied warranty, and with no claim as to its suitability for any purpose.
-
-// boostinspect:nolicense (don't complain about the lack of a Boost license)
-// (Paul Moore hasn't been in contact for years, so there's no way to change the
-// license.)
-
-// See http://www.boost.org/libs/rational for documentation.
-
-// Credits:
-// Thanks to the boost mailing list in general for useful comments.
-// Particular contributions included:
-// Andrew D Jewell, for reminding me to take care to avoid overflow
-// Ed Brey, for many comments, including picking up on some dreadful typos
-// Stephen Silver contributed the test suite and comments on user-defined
-// IntType
-// Nickolay Mladenov, for the implementation of operator+=
-
-// Revision History
-// 02 Sep 13 Remove unneeded forward declarations; tweak private helper
-// function (Daryle Walker)
-// 30 Aug 13 Improve exception safety of "assign"; start modernizing I/O code
-// (Daryle Walker)
-// 27 Aug 13 Add cross-version constructor template, plus some private helper
-// functions; add constructor to exception class to take custom
-// messages (Daryle Walker)
-// 25 Aug 13 Add constexpr qualification wherever possible (Daryle Walker)
-// 05 May 12 Reduced use of implicit gcd (Mario Lang)
-// 05 Nov 06 Change rational_cast to not depend on division between different
-// types (Daryle Walker)
-// 04 Nov 06 Off-load GCD and LCM to Boost.Integer; add some invariant checks;
-// add std::numeric_limits<> requirement to help GCD (Daryle Walker)
-// 31 Oct 06 Recoded both operator< to use round-to-negative-infinity
-// divisions; the rational-value version now uses continued fraction
-// expansion to avoid overflows, for bug #798357 (Daryle Walker)
-// 20 Oct 06 Fix operator bool_type for CW 8.3 (Joaquín M López Muñoz)
-// 18 Oct 06 Use EXPLICIT_TEMPLATE_TYPE helper macros from Boost.Config
-// (Joaquín M López Muñoz)
-// 27 Dec 05 Add Boolean conversion operator (Daryle Walker)
-// 28 Sep 02 Use _left versions of operators from operators.hpp
-// 05 Jul 01 Recode gcd(), avoiding std::swap (Helmut Zeisel)
-// 03 Mar 01 Workarounds for Intel C++ 5.0 (David Abrahams)
-// 05 Feb 01 Update operator>> to tighten up input syntax
-// 05 Feb 01 Final tidy up of gcd code prior to the new release
-// 27 Jan 01 Recode abs() without relying on abs(IntType)
-// 21 Jan 01 Include Nickolay Mladenov's operator+= algorithm,
-// tidy up a number of areas, use newer features of operators.hpp
-// (reduces space overhead to zero), add operator!,
-// introduce explicit mixed-mode arithmetic operations
-// 12 Jan 01 Include fixes to handle a user-defined IntType better
-// 19 Nov 00 Throw on divide by zero in operator /= (John (EBo) David)
-// 23 Jun 00 Incorporate changes from Mark Rodgers for Borland C++
-// 22 Jun 00 Change _MSC_VER to BOOST_MSVC so other compilers are not
-// affected (Beman Dawes)
-// 6 Mar 00 Fix operator-= normalization, #include <string> (Jens Maurer)
-// 14 Dec 99 Modifications based on comments from the boost list
-// 09 Dec 99 Initial Version (Paul Moore)
-
-#ifndef BOOST_RATIONAL_HPP
-#define BOOST_RATIONAL_HPP
-
-#include <boost/config.hpp> // for BOOST_NO_STDC_NAMESPACE, BOOST_MSVC, etc
-#ifndef BOOST_NO_IOSTREAM
-#include <iomanip> // for std::setw
-#include <ios> // for std::noskipws, streamsize
-#include <istream> // for std::istream
-#include <ostream> // for std::ostream
-#include <sstream> // for std::ostringstream
-#endif
-#include <cstddef> // for NULL
-#include <stdexcept> // for std::domain_error
-#include <string> // for std::string implicit constructor
-#include <boost/operators.hpp> // for boost::addable etc
-#include <cstdlib> // for std::abs
-#include <boost/call_traits.hpp> // for boost::call_traits
-#include <boost/detail/workaround.hpp> // for BOOST_WORKAROUND
-#include <boost/assert.hpp> // for BOOST_ASSERT
-#include <boost/integer/common_factor_rt.hpp> // for boost::integer::gcd, lcm
-#include <limits> // for std::numeric_limits
-#include <boost/static_assert.hpp> // for BOOST_STATIC_ASSERT
-#include <boost/throw_exception.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_class.hpp>
-#include <boost/type_traits/is_same.hpp>
-
-// Control whether depreciated GCD and LCM functions are included (default: yes)
-#ifndef BOOST_CONTROL_RATIONAL_HAS_GCD
-#define BOOST_CONTROL_RATIONAL_HAS_GCD 1
-#endif
-
-namespace boost {
-
-#if BOOST_CONTROL_RATIONAL_HAS_GCD
-template <typename IntType>
-IntType gcd(IntType n, IntType m)
-{
- // Defer to the version in Boost.Integer
- return integer::gcd( n, m );
-}
-
-template <typename IntType>
-IntType lcm(IntType n, IntType m)
-{
- // Defer to the version in Boost.Integer
- return integer::lcm( n, m );
-}
-#endif // BOOST_CONTROL_RATIONAL_HAS_GCD
-
-namespace rational_detail{
-
- template <class FromInt, class ToInt>
- struct is_compatible_integer
- {
- BOOST_STATIC_CONSTANT(bool, value = ((std::numeric_limits<FromInt>::is_specialized && std::numeric_limits<FromInt>::is_integer
- && (std::numeric_limits<FromInt>::digits <= std::numeric_limits<ToInt>::digits)
- && (std::numeric_limits<FromInt>::radix == std::numeric_limits<ToInt>::radix)
- && ((std::numeric_limits<FromInt>::is_signed == false) || (std::numeric_limits<ToInt>::is_signed == true))
- && is_convertible<FromInt, ToInt>::value)
- || is_same<FromInt, ToInt>::value)
- || (is_class<ToInt>::value && is_class<FromInt>::value && is_convertible<FromInt, ToInt>::value));
- };
-
-}
-
-class bad_rational : public std::domain_error
-{
-public:
- explicit bad_rational() : std::domain_error("bad rational: zero denominator") {}
- explicit bad_rational( char const *what ) : std::domain_error( what ) {}
-};
-
-template <typename IntType>
-class rational
-{
- // Class-wide pre-conditions
- BOOST_STATIC_ASSERT( ::std::numeric_limits<IntType>::is_specialized );
-
- // Helper types
- typedef typename boost::call_traits<IntType>::param_type param_type;
-
- struct helper { IntType parts[2]; };
- typedef IntType (helper::* bool_type)[2];
-
-public:
- // Component type
- typedef IntType int_type;
-
- BOOST_CONSTEXPR
- rational() : num(0), den(1) {}
- template <class T>
- BOOST_CONSTEXPR rational(const T& n, typename enable_if_c<
- rational_detail::is_compatible_integer<T, IntType>::value
- >::type const* = 0) : num(n), den(1) {}
- template <class T, class U>
- rational(const T& n, const U& d, typename enable_if_c<
- rational_detail::is_compatible_integer<T, IntType>::value && rational_detail::is_compatible_integer<U, IntType>::value
- >::type const* = 0) : num(n), den(d) {
- normalize();
- }
-
- template < typename NewType >
- BOOST_CONSTEXPR explicit
- rational(rational<NewType> const &r, typename enable_if_c<rational_detail::is_compatible_integer<NewType, IntType>::value>::type const* = 0)
- : num(r.numerator()), den(is_normalized(int_type(r.numerator()),
- int_type(r.denominator())) ? r.denominator() :
- (BOOST_THROW_EXCEPTION(bad_rational("bad rational: denormalized conversion")), 0)){}
-
- template < typename NewType >
- BOOST_CONSTEXPR explicit
- rational(rational<NewType> const &r, typename disable_if_c<rational_detail::is_compatible_integer<NewType, IntType>::value>::type const* = 0)
- : num(r.numerator()), den(is_normalized(int_type(r.numerator()),
- int_type(r.denominator())) && is_safe_narrowing_conversion(r.denominator()) && is_safe_narrowing_conversion(r.numerator()) ? r.denominator() :
- (BOOST_THROW_EXCEPTION(bad_rational("bad rational: denormalized conversion")), 0)){}
- // Default copy constructor and assignment are fine
-
- // Add assignment from IntType
- template <class T>
- typename enable_if_c<
- rational_detail::is_compatible_integer<T, IntType>::value, rational &
- >::type operator=(const T& n) { return assign(static_cast<IntType>(n), static_cast<IntType>(1)); }
-
- // Assign in place
- template <class T, class U>
- typename enable_if_c<
- rational_detail::is_compatible_integer<T, IntType>::value && rational_detail::is_compatible_integer<U, IntType>::value, rational &
- >::type assign(const T& n, const U& d)
- {
- return *this = rational<IntType>(static_cast<IntType>(n), static_cast<IntType>(d));
- }
- //
- // The following overloads should probably *not* be provided -
- // but are provided for backwards compatibity reasons only.
- // These allow for construction/assignment from types that
- // are wider than IntType only if there is an implicit
- // conversion from T to IntType, they will throw a bad_rational
- // if the conversion results in loss of precision or undefined behaviour.
- //
- template <class T>
- rational(const T& n, typename enable_if_c<
- std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer
- && !rational_detail::is_compatible_integer<T, IntType>::value
- && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix)
- && is_convertible<T, IntType>::value
- >::type const* = 0)
- {
- assign(n, static_cast<T>(1));
- }
- template <class T, class U>
- rational(const T& n, const U& d, typename enable_if_c<
- (!rational_detail::is_compatible_integer<T, IntType>::value
- || !rational_detail::is_compatible_integer<U, IntType>::value)
- && std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer
- && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix)
- && is_convertible<T, IntType>::value &&
- std::numeric_limits<U>::is_specialized && std::numeric_limits<U>::is_integer
- && (std::numeric_limits<U>::radix == std::numeric_limits<IntType>::radix)
- && is_convertible<U, IntType>::value
- >::type const* = 0)
- {
- assign(n, d);
- }
- template <class T>
- typename enable_if_c<
- std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer
- && !rational_detail::is_compatible_integer<T, IntType>::value
- && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix)
- && is_convertible<T, IntType>::value,
- rational &
- >::type operator=(const T& n) { return assign(n, static_cast<T>(1)); }
-
- template <class T, class U>
- typename enable_if_c<
- (!rational_detail::is_compatible_integer<T, IntType>::value
- || !rational_detail::is_compatible_integer<U, IntType>::value)
- && std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer
- && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix)
- && is_convertible<T, IntType>::value &&
- std::numeric_limits<U>::is_specialized && std::numeric_limits<U>::is_integer
- && (std::numeric_limits<U>::radix == std::numeric_limits<IntType>::radix)
- && is_convertible<U, IntType>::value,
- rational &
- >::type assign(const T& n, const U& d)
- {
- if(!is_safe_narrowing_conversion(n) || !is_safe_narrowing_conversion(d))
- BOOST_THROW_EXCEPTION(bad_rational());
- return *this = rational<IntType>(static_cast<IntType>(n), static_cast<IntType>(d));
- }
-
- // Access to representation
- BOOST_CONSTEXPR
- const IntType& numerator() const { return num; }
- BOOST_CONSTEXPR
- const IntType& denominator() const { return den; }
-
- // Arithmetic assignment operators
- rational& operator+= (const rational& r);
- rational& operator-= (const rational& r);
- rational& operator*= (const rational& r);
- rational& operator/= (const rational& r);
-
- template <class T>
- typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator+= (const T& i)
- {
- num += i * den;
- return *this;
- }
- template <class T>
- typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator-= (const T& i)
- {
- num -= i * den;
- return *this;
- }
- template <class T>
- typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator*= (const T& i)
- {
- // Avoid overflow and preserve normalization
- IntType gcd = integer::gcd(static_cast<IntType>(i), den);
- num *= i / gcd;
- den /= gcd;
- return *this;
- }
- template <class T>
- typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator/= (const T& i)
- {
- // Avoid repeated construction
- IntType const zero(0);
-
- if(i == zero) BOOST_THROW_EXCEPTION(bad_rational());
- if(num == zero) return *this;
-
- // Avoid overflow and preserve normalization
- IntType const gcd = integer::gcd(num, static_cast<IntType>(i));
- num /= gcd;
- den *= i / gcd;
-
- if(den < zero) {
- num = -num;
- den = -den;
- }
-
- return *this;
- }
-
- // Increment and decrement
- const rational& operator++() { num += den; return *this; }
- const rational& operator--() { num -= den; return *this; }
-
- rational operator++(int)
- {
- rational t(*this);
- ++(*this);
- return t;
- }
- rational operator--(int)
- {
- rational t(*this);
- --(*this);
- return t;
- }
-
- // Operator not
- BOOST_CONSTEXPR
- bool operator!() const { return !num; }
-
- // Boolean conversion
-
-#if BOOST_WORKAROUND(__MWERKS__,<=0x3003)
- // The "ISO C++ Template Parser" option in CW 8.3 chokes on the
- // following, hence we selectively disable that option for the
- // offending memfun.
-#pragma parse_mfunc_templ off
-#endif
-
- BOOST_CONSTEXPR
- operator bool_type() const { return operator !() ? 0 : &helper::parts; }
-
-#if BOOST_WORKAROUND(__MWERKS__,<=0x3003)
-#pragma parse_mfunc_templ reset
-#endif
-
- // Comparison operators
- bool operator< (const rational& r) const;
- bool operator> (const rational& r) const { return r < *this; }
- BOOST_CONSTEXPR
- bool operator== (const rational& r) const;
-
- template <class T>
- typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator< (const T& i) const
- {
- // Avoid repeated construction
- int_type const zero(0);
-
- // Break value into mixed-fraction form, w/ always-nonnegative remainder
- BOOST_ASSERT(this->den > zero);
- int_type q = this->num / this->den, r = this->num % this->den;
- while(r < zero) { r += this->den; --q; }
-
- // Compare with just the quotient, since the remainder always bumps the
- // value up. [Since q = floor(n/d), and if n/d < i then q < i, if n/d == i
- // then q == i, if n/d == i + r/d then q == i, and if n/d >= i + 1 then
- // q >= i + 1 > i; therefore n/d < i iff q < i.]
- return q < i;
- }
- template <class T>
- typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator>(const T& i) const
- {
- return operator==(i) ? false : !operator<(i);
- }
- template <class T>
- BOOST_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator== (const T& i) const
- {
- return ((den == IntType(1)) && (num == i));
- }
-
-private:
- // Implementation - numerator and denominator (normalized).
- // Other possibilities - separate whole-part, or sign, fields?
- IntType num;
- IntType den;
-
- // Helper functions
- static BOOST_CONSTEXPR
- int_type inner_gcd( param_type a, param_type b, int_type const &zero =
- int_type(0) )
- { return b == zero ? a : inner_gcd(b, a % b, zero); }
-
- static BOOST_CONSTEXPR
- int_type inner_abs( param_type x, int_type const &zero = int_type(0) )
- { return x < zero ? -x : +x; }
-
- // Representation note: Fractions are kept in normalized form at all
- // times. normalized form is defined as gcd(num,den) == 1 and den > 0.
- // In particular, note that the implementation of abs() below relies
- // on den always being positive.
- bool test_invariant() const;
- void normalize();
-
- static BOOST_CONSTEXPR
- bool is_normalized( param_type n, param_type d, int_type const &zero =
- int_type(0), int_type const &one = int_type(1) )
- {
- return d > zero && ( n != zero || d == one ) && inner_abs( inner_gcd(n,
- d, zero), zero ) == one;
- }
- //
- // Conversion checks:
- //
- // (1) From an unsigned type with more digits than IntType:
- //
- template <class T>
- BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val)
- {
- return val < (T(1) << std::numeric_limits<IntType>::digits);
- }
- //
- // (2) From a signed type with more digits than IntType, and IntType also signed:
- //
- template <class T>
- BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T& val)
- {
- // Note that this check assumes IntType has a 2's complement representation,
- // we don't want to try to convert a std::numeric_limits<IntType>::min() to
- // a T because that conversion may not be allowed (this happens when IntType
- // is from Boost.Multiprecision).
- return (val < (T(1) << std::numeric_limits<IntType>::digits)) && (val >= -(T(1) << std::numeric_limits<IntType>::digits));
- }
- //
- // (3) From a signed type with more digits than IntType, and IntType unsigned:
- //
- template <class T>
- BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val)
- {
- return (val < (T(1) << std::numeric_limits<IntType>::digits)) && (val >= 0);
- }
- //
- // (4) From a signed type with fewer digits than IntType, and IntType unsigned:
- //
- template <class T>
- BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val)
- {
- return val >= 0;
- }
- //
- // (5) From an unsigned type with fewer digits than IntType, and IntType signed:
- //
- template <class T>
- BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T&)
- {
- return true;
- }
- //
- // (6) From an unsigned type with fewer digits than IntType, and IntType unsigned:
- //
- template <class T>
- BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T&)
- {
- return true;
- }
- //
- // (7) From an signed type with fewer digits than IntType, and IntType signed:
- //
- template <class T>
- BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T&)
- {
- return true;
- }
-};
-
-// Unary plus and minus
-template <typename IntType>
-BOOST_CONSTEXPR
-inline rational<IntType> operator+ (const rational<IntType>& r)
-{
- return r;
-}
-
-template <typename IntType>
-inline rational<IntType> operator- (const rational<IntType>& r)
-{
- return rational<IntType>(static_cast<IntType>(-r.numerator()), r.denominator());
-}
-
-// Arithmetic assignment operators
-template <typename IntType>
-rational<IntType>& rational<IntType>::operator+= (const rational<IntType>& r)
-{
- // This calculation avoids overflow, and minimises the number of expensive
- // calculations. Thanks to Nickolay Mladenov for this algorithm.
- //
- // Proof:
- // We have to compute a/b + c/d, where gcd(a,b)=1 and gcd(b,c)=1.
- // Let g = gcd(b,d), and b = b1*g, d=d1*g. Then gcd(b1,d1)=1
- //
- // The result is (a*d1 + c*b1) / (b1*d1*g).
- // Now we have to normalize this ratio.
- // Let's assume h | gcd((a*d1 + c*b1), (b1*d1*g)), and h > 1
- // If h | b1 then gcd(h,d1)=1 and hence h|(a*d1+c*b1) => h|a.
- // But since gcd(a,b1)=1 we have h=1.
- // Similarly h|d1 leads to h=1.
- // So we have that h | gcd((a*d1 + c*b1) , (b1*d1*g)) => h|g
- // Finally we have gcd((a*d1 + c*b1), (b1*d1*g)) = gcd((a*d1 + c*b1), g)
- // Which proves that instead of normalizing the result, it is better to
- // divide num and den by gcd((a*d1 + c*b1), g)
-
- // Protect against self-modification
- IntType r_num = r.num;
- IntType r_den = r.den;
-
- IntType g = integer::gcd(den, r_den);
- den /= g; // = b1 from the calculations above
- num = num * (r_den / g) + r_num * den;
- g = integer::gcd(num, g);
- num /= g;
- den *= r_den/g;
-
- return *this;
-}
-
-template <typename IntType>
-rational<IntType>& rational<IntType>::operator-= (const rational<IntType>& r)
-{
- // Protect against self-modification
- IntType r_num = r.num;
- IntType r_den = r.den;
-
- // This calculation avoids overflow, and minimises the number of expensive
- // calculations. It corresponds exactly to the += case above
- IntType g = integer::gcd(den, r_den);
- den /= g;
- num = num * (r_den / g) - r_num * den;
- g = integer::gcd(num, g);
- num /= g;
- den *= r_den/g;
-
- return *this;
-}
-
-template <typename IntType>
-rational<IntType>& rational<IntType>::operator*= (const rational<IntType>& r)
-{
- // Protect against self-modification
- IntType r_num = r.num;
- IntType r_den = r.den;
-
- // Avoid overflow and preserve normalization
- IntType gcd1 = integer::gcd(num, r_den);
- IntType gcd2 = integer::gcd(r_num, den);
- num = (num/gcd1) * (r_num/gcd2);
- den = (den/gcd2) * (r_den/gcd1);
- return *this;
-}
-
-template <typename IntType>
-rational<IntType>& rational<IntType>::operator/= (const rational<IntType>& r)
-{
- // Protect against self-modification
- IntType r_num = r.num;
- IntType r_den = r.den;
-
- // Avoid repeated construction
- IntType zero(0);
-
- // Trap division by zero
- if (r_num == zero)
- BOOST_THROW_EXCEPTION(bad_rational());
- if (num == zero)
- return *this;
-
- // Avoid overflow and preserve normalization
- IntType gcd1 = integer::gcd(num, r_num);
- IntType gcd2 = integer::gcd(r_den, den);
- num = (num/gcd1) * (r_den/gcd2);
- den = (den/gcd2) * (r_num/gcd1);
-
- if (den < zero) {
- num = -num;
- den = -den;
- }
- return *this;
-}
-
-
-//
-// Non-member operators: previously these were provided by Boost.Operator, but these had a number of
-// drawbacks, most notably, that in order to allow inter-operability with IntType code such as this:
-//
-// rational<int> r(3);
-// assert(r == 3.5); // compiles and passes!!
-//
-// Happens to be allowed as well :-(
-//
-// There are three possible cases for each operator:
-// 1) rational op rational.
-// 2) rational op integer
-// 3) integer op rational
-// Cases (1) and (2) are folded into the one function.
-//
-template <class IntType, class Arg>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type
- operator + (const rational<IntType>& a, const Arg& b)
-{
- rational<IntType> t(a);
- return t += b;
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type
- operator + (const Arg& b, const rational<IntType>& a)
-{
- rational<IntType> t(a);
- return t += b;
-}
-
-template <class IntType, class Arg>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type
- operator - (const rational<IntType>& a, const Arg& b)
-{
- rational<IntType> t(a);
- return t -= b;
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type
- operator - (const Arg& b, const rational<IntType>& a)
-{
- rational<IntType> t(a);
- return -(t -= b);
-}
-
-template <class IntType, class Arg>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type
- operator * (const rational<IntType>& a, const Arg& b)
-{
- rational<IntType> t(a);
- return t *= b;
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type
- operator * (const Arg& b, const rational<IntType>& a)
-{
- rational<IntType> t(a);
- return t *= b;
-}
-
-template <class IntType, class Arg>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type
- operator / (const rational<IntType>& a, const Arg& b)
-{
- rational<IntType> t(a);
- return t /= b;
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type
- operator / (const Arg& b, const rational<IntType>& a)
-{
- rational<IntType> t(b);
- return t /= a;
-}
-
-template <class IntType, class Arg>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type
- operator <= (const rational<IntType>& a, const Arg& b)
-{
- return !(a > b);
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
- operator <= (const Arg& b, const rational<IntType>& a)
-{
- return a >= b;
-}
-
-template <class IntType, class Arg>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type
- operator >= (const rational<IntType>& a, const Arg& b)
-{
- return !(a < b);
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
- operator >= (const Arg& b, const rational<IntType>& a)
-{
- return a <= b;
-}
-
-template <class IntType, class Arg>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type
- operator != (const rational<IntType>& a, const Arg& b)
-{
- return !(a == b);
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
- operator != (const Arg& b, const rational<IntType>& a)
-{
- return !(b == a);
-}
-
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
- operator < (const Arg& b, const rational<IntType>& a)
-{
- return a > b;
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
- operator > (const Arg& b, const rational<IntType>& a)
-{
- return a < b;
-}
-template <class Arg, class IntType>
-inline typename boost::enable_if_c <
- rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
- operator == (const Arg& b, const rational<IntType>& a)
-{
- return a == b;
-}
-
-// Comparison operators
-template <typename IntType>
-bool rational<IntType>::operator< (const rational<IntType>& r) const
-{
- // Avoid repeated construction
- int_type const zero( 0 );
-
- // This should really be a class-wide invariant. The reason for these
- // checks is that for 2's complement systems, INT_MIN has no corresponding
- // positive, so negating it during normalization keeps it INT_MIN, which
- // is bad for later calculations that assume a positive denominator.
- BOOST_ASSERT( this->den > zero );
- BOOST_ASSERT( r.den > zero );
-
- // Determine relative order by expanding each value to its simple continued
- // fraction representation using the Euclidian GCD algorithm.
- struct { int_type n, d, q, r; }
- ts = { this->num, this->den, static_cast<int_type>(this->num / this->den),
- static_cast<int_type>(this->num % this->den) },
- rs = { r.num, r.den, static_cast<int_type>(r.num / r.den),
- static_cast<int_type>(r.num % r.den) };
- unsigned reverse = 0u;
-
- // Normalize negative moduli by repeatedly adding the (positive) denominator
- // and decrementing the quotient. Later cycles should have all positive
- // values, so this only has to be done for the first cycle. (The rules of
- // C++ require a nonnegative quotient & remainder for a nonnegative dividend
- // & positive divisor.)
- while ( ts.r < zero ) { ts.r += ts.d; --ts.q; }
- while ( rs.r < zero ) { rs.r += rs.d; --rs.q; }
-
- // Loop through and compare each variable's continued-fraction components
- for ( ;; )
- {
- // The quotients of the current cycle are the continued-fraction
- // components. Comparing two c.f. is comparing their sequences,
- // stopping at the first difference.
- if ( ts.q != rs.q )
- {
- // Since reciprocation changes the relative order of two variables,
- // and c.f. use reciprocals, the less/greater-than test reverses
- // after each index. (Start w/ non-reversed @ whole-number place.)
- return reverse ? ts.q > rs.q : ts.q < rs.q;
- }
-
- // Prepare the next cycle
- reverse ^= 1u;
-
- if ( (ts.r == zero) || (rs.r == zero) )
- {
- // At least one variable's c.f. expansion has ended
- break;
- }
-
- ts.n = ts.d; ts.d = ts.r;
- ts.q = ts.n / ts.d; ts.r = ts.n % ts.d;
- rs.n = rs.d; rs.d = rs.r;
- rs.q = rs.n / rs.d; rs.r = rs.n % rs.d;
- }
-
- // Compare infinity-valued components for otherwise equal sequences
- if ( ts.r == rs.r )
- {
- // Both remainders are zero, so the next (and subsequent) c.f.
- // components for both sequences are infinity. Therefore, the sequences
- // and their corresponding values are equal.
- return false;
- }
- else
- {
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4800)
-#endif
- // Exactly one of the remainders is zero, so all following c.f.
- // components of that variable are infinity, while the other variable
- // has a finite next c.f. component. So that other variable has the
- // lesser value (modulo the reversal flag!).
- return ( ts.r != zero ) != static_cast<bool>( reverse );
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
- }
-}
-
-template <typename IntType>
-BOOST_CONSTEXPR
-inline bool rational<IntType>::operator== (const rational<IntType>& r) const
-{
- return ((num == r.num) && (den == r.den));
-}
-
-// Invariant check
-template <typename IntType>
-inline bool rational<IntType>::test_invariant() const
-{
- return ( this->den > int_type(0) ) && ( integer::gcd(this->num, this->den) ==
- int_type(1) );
-}
-
-// Normalisation
-template <typename IntType>
-void rational<IntType>::normalize()
-{
- // Avoid repeated construction
- IntType zero(0);
-
- if (den == zero)
- BOOST_THROW_EXCEPTION(bad_rational());
-
- // Handle the case of zero separately, to avoid division by zero
- if (num == zero) {
- den = IntType(1);
- return;
- }
-
- IntType g = integer::gcd(num, den);
-
- num /= g;
- den /= g;
-
- if (den < -(std::numeric_limits<IntType>::max)()) {
- BOOST_THROW_EXCEPTION(bad_rational("bad rational: non-zero singular denominator"));
- }
-
- // Ensure that the denominator is positive
- if (den < zero) {
- num = -num;
- den = -den;
- }
-
- BOOST_ASSERT( this->test_invariant() );
-}
-
-#ifndef BOOST_NO_IOSTREAM
-namespace detail {
-
- // A utility class to reset the format flags for an istream at end
- // of scope, even in case of exceptions
- struct resetter {
- resetter(std::istream& is) : is_(is), f_(is.flags()) {}
- ~resetter() { is_.flags(f_); }
- std::istream& is_;
- std::istream::fmtflags f_; // old GNU c++ lib has no ios_base
- };
-
-}
-
-// Input and output
-template <typename IntType>
-std::istream& operator>> (std::istream& is, rational<IntType>& r)
-{
- using std::ios;
-
- IntType n = IntType(0), d = IntType(1);
- char c = 0;
- detail::resetter sentry(is);
-
- if ( is >> n )
- {
- if ( is.get(c) )
- {
- if ( c == '/' )
- {
- if ( is >> std::noskipws >> d )
- try {
- r.assign( n, d );
- } catch ( bad_rational & ) { // normalization fail
- try { is.setstate(ios::failbit); }
- catch ( ... ) {} // don't throw ios_base::failure...
- if ( is.exceptions() & ios::failbit )
- throw; // ...but the original exception instead
- // ELSE: suppress the exception, use just error flags
- }
- }
- else
- is.setstate( ios::failbit );
- }
- }
-
- return is;
-}
-
-// Add manipulators for output format?
-template <typename IntType>
-std::ostream& operator<< (std::ostream& os, const rational<IntType>& r)
-{
- // The slash directly precedes the denominator, which has no prefixes.
- std::ostringstream ss;
-
- ss.copyfmt( os );
- ss.tie( NULL );
- ss.exceptions( std::ios::goodbit );
- ss.width( 0 );
- ss << std::noshowpos << std::noshowbase << '/' << r.denominator();
-
- // The numerator holds the showpos, internal, and showbase flags.
- std::string const tail = ss.str();
- std::streamsize const w =
- os.width() - static_cast<std::streamsize>( tail.size() );
-
- ss.clear();
- ss.str( "" );
- ss.flags( os.flags() );
- ss << std::setw( w < 0 || (os.flags() & std::ios::adjustfield) !=
- std::ios::internal ? 0 : w ) << r.numerator();
- return os << ss.str() + tail;
-}
-#endif // BOOST_NO_IOSTREAM
-
-// Type conversion
-template <typename T, typename IntType>
-BOOST_CONSTEXPR
-inline T rational_cast(const rational<IntType>& src)
-{
- return static_cast<T>(src.numerator())/static_cast<T>(src.denominator());
-}
-
-// Do not use any abs() defined on IntType - it isn't worth it, given the
-// difficulties involved (Koenig lookup required, there may not *be* an abs()
-// defined, etc etc).
-template <typename IntType>
-inline rational<IntType> abs(const rational<IntType>& r)
-{
- return r.numerator() >= IntType(0)? r: -r;
-}
-
-namespace integer {
-
-template <typename IntType>
-struct gcd_evaluator< rational<IntType> >
-{
- typedef rational<IntType> result_type,
- first_argument_type, second_argument_type;
- result_type operator() ( first_argument_type const &a
- , second_argument_type const &b
- ) const
- {
- return result_type(integer::gcd(a.numerator(), b.numerator()),
- integer::lcm(a.denominator(), b.denominator()));
- }
-};
-
-template <typename IntType>
-struct lcm_evaluator< rational<IntType> >
-{
- typedef rational<IntType> result_type,
- first_argument_type, second_argument_type;
- result_type operator() ( first_argument_type const &a
- , second_argument_type const &b
- ) const
- {
- return result_type(integer::lcm(a.numerator(), b.numerator()),
- integer::gcd(a.denominator(), b.denominator()));
- }
-};
-
-} // namespace integer
-
-} // namespace boost
-
-#endif // BOOST_RATIONAL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/regex/config.hpp b/src/third_party/boost-1.68.0/boost/regex/config.hpp
deleted file mode 100644
index eb998110bfa..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/config.hpp
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE config.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: regex extended config setup.
- */
-
-#ifndef BOOST_REGEX_CONFIG_HPP
-#define BOOST_REGEX_CONFIG_HPP
-/*
- * Borland C++ Fix/error check
- * this has to go *before* we include any std lib headers:
- */
-#if defined(__BORLANDC__)
-# include <boost/regex/config/borland.hpp>
-#endif
-#include <boost/version.hpp>
-
-/*****************************************************************************
- *
- * Include all the headers we need here:
- *
- ****************************************************************************/
-
-#ifdef __cplusplus
-
-# ifndef BOOST_REGEX_USER_CONFIG
-# define BOOST_REGEX_USER_CONFIG <boost/regex/user.hpp>
-# endif
-
-# include BOOST_REGEX_USER_CONFIG
-
-# include <boost/config.hpp>
-# include <boost/predef.h>
-
-#else
- /*
- * C build,
- * don't include <boost/config.hpp> because that may
- * do C++ specific things in future...
- */
-# include <stdlib.h>
-# include <stddef.h>
-# ifdef _MSC_VER
-# define BOOST_MSVC _MSC_VER
-# endif
-#endif
-
-/*****************************************************************************
- *
- * Boilerplate regex config options:
- *
- ****************************************************************************/
-
-/* Obsolete macro, use BOOST_VERSION instead: */
-#define BOOST_RE_VERSION 320
-
-/* fix: */
-#if defined(_UNICODE) && !defined(UNICODE)
-#define UNICODE
-#endif
-
-
-/*
-* Define a macro for the namespace that details are placed in, this includes the Boost
-* version number to avoid mismatched header and library versions:
-*/
-#define BOOST_REGEX_DETAIL_NS BOOST_JOIN(re_detail_, BOOST_VERSION)
-
-/*
- * Fix for gcc prior to 3.4: std::ctype<wchar_t> doesn't allow
- * masks to be combined, for example:
- * std::use_facet<std::ctype<wchar_t> >.is(std::ctype_base::lower|std::ctype_base::upper, L'a');
- * returns *false*.
- */
-#ifdef __GLIBCPP__
-# define BOOST_REGEX_BUGGY_CTYPE_FACET
-#endif
-
-/*
- * Intel C++ before 8.0 ends up with unresolved externals unless we turn off
- * extern template support:
- */
-#if defined(BOOST_INTEL) && defined(__cplusplus) && (BOOST_INTEL <= 800)
-# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-#endif
-/*
- * Visual C++ doesn't support external templates with C++ extensions turned off:
- */
-#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
-# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-#endif
- /*
- * Oracle compiler in C++11 mode doesn't like external templates for some reason:
- */
-#ifdef __SUNPRO_CC
-# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-#endif
- /*
- * Shared regex lib will crash without this, frankly it looks a lot like a gcc bug:
- */
-#if defined(__MINGW32__)
-# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-#endif
-
-/*
- * If there isn't good enough wide character support then there will
- * be no wide character regular expressions:
- */
-#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
-# if !defined(BOOST_NO_WREGEX)
-# define BOOST_NO_WREGEX
-# endif
-#else
-# if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
- /* STLPort on IRIX is misconfigured: <cwctype> does not compile
- * as a temporary fix include <wctype.h> instead and prevent inclusion
- * of STLPort version of <cwctype> */
-# include <wctype.h>
-# define __STLPORT_CWCTYPE
-# define _STLP_CWCTYPE
-# endif
-
-#ifdef __cplusplus
-# include <boost/regex/config/cwchar.hpp>
-#endif
-
-#endif
-
-/*
- * If Win32 support has been disabled for boost in general, then
- * it is for regex in particular:
- */
-#if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32)
-# define BOOST_REGEX_NO_W32
-#endif
-
-/* disable our own file-iterators and mapfiles if we can't
- * support them: */
-#if defined(_WIN32)
-# if defined(BOOST_REGEX_NO_W32) || BOOST_PLAT_WINDOWS_RUNTIME
-# define BOOST_REGEX_NO_FILEITER
-# endif
-#else /* defined(_WIN32) */
-# if !defined(BOOST_HAS_DIRENT_H)
-# define BOOST_REGEX_NO_FILEITER
-# endif
-#endif
-
-/* backwards compatibitity: */
-#if defined(BOOST_RE_NO_LIB)
-# define BOOST_REGEX_NO_LIB
-#endif
-
-#if defined(__GNUC__) && !defined(_MSC_VER) && (defined(_WIN32) || defined(__CYGWIN__))
-/* gcc on win32 has problems if you include <windows.h>
- (sporadically generates bad code). */
-# define BOOST_REGEX_NO_W32
-#endif
-#if defined(__COMO__) && !defined(BOOST_REGEX_NO_W32) && !defined(_MSC_EXTENSIONS)
-# define BOOST_REGEX_NO_W32
-#endif
-
-/*****************************************************************************
- *
- * Wide character workarounds:
- *
- ****************************************************************************/
-
-/*
- * define BOOST_REGEX_HAS_OTHER_WCHAR_T when wchar_t is a native type, but the users
- * code may be built with wchar_t as unsigned short: basically when we're building
- * with MSVC and the /Zc:wchar_t option we place some extra unsigned short versions
- * of the non-inline functions in the library, so that users can still link to the lib,
- * irrespective of whether their own code is built with /Zc:wchar_t.
- * Note that this does NOT WORK with VC10 and VC14 when the C++ locale is in effect as
- * the locale's <unsigned short> facets simply do not compile in that case.
- * As we default to the C++ locale when compiling for the windows runtime we
- * skip in this case aswell.
- */
-#if defined(__cplusplus) && \
- (defined(BOOST_MSVC) || defined(__ICL)) && \
- !defined(BOOST_NO_INTRINSIC_WCHAR_T) && \
- defined(BOOST_WINDOWS) && \
- !defined(__SGI_STL_PORT) && \
- !defined(_STLPORT_VERSION) && \
- !defined(BOOST_RWSTD_VER) && \
- ((_MSC_VER < 1600) || !defined(BOOST_REGEX_USE_CPP_LOCALE)) && \
- !BOOST_PLAT_WINDOWS_RUNTIME
-# define BOOST_REGEX_HAS_OTHER_WCHAR_T
-# ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4251 4231)
-# if BOOST_MSVC < 1600
-# pragma warning(disable : 4660)
-# endif
-# endif
-# if defined(_DLL) && defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
-# include <string>
- extern template class __declspec(dllimport) std::basic_string<unsigned short>;
-# endif
-# ifdef BOOST_MSVC
-# pragma warning(pop)
-# endif
-#endif
-
-
-/*****************************************************************************
- *
- * Set up dll import/export options:
- *
- ****************************************************************************/
-
-#ifndef BOOST_SYMBOL_EXPORT
-# define BOOST_SYMBOL_EXPORT
-# define BOOST_SYMBOL_IMPORT
-#endif
-
-#if (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
-# if defined(BOOST_REGEX_SOURCE)
-# define BOOST_REGEX_DECL BOOST_SYMBOL_EXPORT
-# define BOOST_REGEX_BUILD_DLL
-# else
-# define BOOST_REGEX_DECL BOOST_SYMBOL_IMPORT
-# endif
-#else
-# define BOOST_REGEX_DECL
-#endif
-
-#if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)
-# define BOOST_LIB_NAME boost_regex
-# if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
-# define BOOST_DYN_LINK
-# endif
-# ifdef BOOST_REGEX_DIAG
-# define BOOST_LIB_DIAGNOSTIC
-# endif
-# include <boost/config/auto_link.hpp>
-#endif
-
-/*****************************************************************************
- *
- * Set up function call type:
- *
- ****************************************************************************/
-
-#if defined(_MSC_VER) && defined(_MSC_EXTENSIONS)
-#if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL)
-# define BOOST_REGEX_CALL __cdecl
-#else
-# define BOOST_REGEX_CALL __fastcall
-#endif
-# define BOOST_REGEX_CCALL __cdecl
-#endif
-
-#if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)
-# define BOOST_REGEX_CALL __fastcall
-# define BOOST_REGEX_CCALL __stdcall
-#endif
-
-#ifndef BOOST_REGEX_CALL
-# define BOOST_REGEX_CALL
-#endif
-#ifndef BOOST_REGEX_CCALL
-#define BOOST_REGEX_CCALL
-#endif
-
-/*****************************************************************************
- *
- * Set up localisation model:
- *
- ****************************************************************************/
-
-/* backwards compatibility: */
-#ifdef BOOST_RE_LOCALE_C
-# define BOOST_REGEX_USE_C_LOCALE
-#endif
-
-#ifdef BOOST_RE_LOCALE_CPP
-# define BOOST_REGEX_USE_CPP_LOCALE
-#endif
-
-#if defined(__CYGWIN__)
-# define BOOST_REGEX_USE_C_LOCALE
-#endif
-
-/* use C++ locale when targeting windows store */
-#if BOOST_PLAT_WINDOWS_RUNTIME
-# define BOOST_REGEX_USE_CPP_LOCALE
-# define BOOST_REGEX_NO_WIN32_LOCALE
-#endif
-
-/* Win32 defaults to native Win32 locale: */
-#if defined(_WIN32) && \
- !defined(BOOST_REGEX_USE_WIN32_LOCALE) && \
- !defined(BOOST_REGEX_USE_C_LOCALE) && \
- !defined(BOOST_REGEX_USE_CPP_LOCALE) && \
- !defined(BOOST_REGEX_NO_W32) && \
- !defined(BOOST_REGEX_NO_WIN32_LOCALE)
-# define BOOST_REGEX_USE_WIN32_LOCALE
-#endif
-/* otherwise use C++ locale if supported: */
-#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_NO_STD_LOCALE)
-# define BOOST_REGEX_USE_CPP_LOCALE
-#endif
-/* otherwise use C+ locale: */
-#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE)
-# define BOOST_REGEX_USE_C_LOCALE
-#endif
-
-#ifndef BOOST_REGEX_MAX_STATE_COUNT
-# define BOOST_REGEX_MAX_STATE_COUNT 100000000
-#endif
-
-
-/*****************************************************************************
- *
- * Error Handling for exception free compilers:
- *
- ****************************************************************************/
-
-#ifdef BOOST_NO_EXCEPTIONS
-/*
- * If there are no exceptions then we must report critical-errors
- * the only way we know how; by terminating.
- */
-#include <stdexcept>
-#include <string>
-#include <boost/throw_exception.hpp>
-
-# define BOOST_REGEX_NOEH_ASSERT(x)\
-if(0 == (x))\
-{\
- std::string s("Error: critical regex++ failure in: ");\
- s.append(#x);\
- std::runtime_error e(s);\
- boost::throw_exception(e);\
-}
-#else
-/*
- * With exceptions then error handling is taken care of and
- * there is no need for these checks:
- */
-# define BOOST_REGEX_NOEH_ASSERT(x)
-#endif
-
-
-/*****************************************************************************
- *
- * Stack protection under MS Windows:
- *
- ****************************************************************************/
-
-#if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3)
-# if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
- && !defined(__GNUC__) \
- && !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
- && !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
-# define BOOST_REGEX_HAS_MS_STACK_GUARD
-# endif
-#elif defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
-# undef BOOST_REGEX_HAS_MS_STACK_GUARD
-#endif
-
-#if defined(__cplusplus) && defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
-
-namespace boost{
-namespace BOOST_REGEX_DETAIL_NS{
-
-BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page();
-
-}
-}
-
-#endif
-
-
-/*****************************************************************************
- *
- * Algorithm selection and configuration:
- *
- ****************************************************************************/
-
-#if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
-# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(_MSC_VER) && (_MSC_VER >= 1400))
-# define BOOST_REGEX_RECURSIVE
-# else
-# define BOOST_REGEX_NON_RECURSIVE
-# endif
-#endif
-
-#ifdef BOOST_REGEX_NON_RECURSIVE
-# ifdef BOOST_REGEX_RECURSIVE
-# error "Can't set both BOOST_REGEX_RECURSIVE and BOOST_REGEX_NON_RECURSIVE"
-# endif
-# ifndef BOOST_REGEX_BLOCKSIZE
-# define BOOST_REGEX_BLOCKSIZE 4096
-# endif
-# if BOOST_REGEX_BLOCKSIZE < 512
-# error "BOOST_REGEX_BLOCKSIZE must be at least 512"
-# endif
-# ifndef BOOST_REGEX_MAX_BLOCKS
-# define BOOST_REGEX_MAX_BLOCKS 1024
-# endif
-# ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
-# undef BOOST_REGEX_HAS_MS_STACK_GUARD
-# endif
-# ifndef BOOST_REGEX_MAX_CACHE_BLOCKS
-# define BOOST_REGEX_MAX_CACHE_BLOCKS 16
-# endif
-#endif
-
-
-/*****************************************************************************
- *
- * helper memory allocation functions:
- *
- ****************************************************************************/
-
-#if defined(__cplusplus) && defined(BOOST_REGEX_NON_RECURSIVE)
-namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
-
-BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block();
-BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void*);
-
-}} /* namespaces */
-#endif
-
-/*****************************************************************************
- *
- * Diagnostics:
- *
- ****************************************************************************/
-
-#ifdef BOOST_REGEX_CONFIG_INFO
-BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info();
-#endif
-
-#if defined(BOOST_REGEX_DIAG)
-# pragma message ("BOOST_REGEX_DECL" BOOST_STRINGIZE(=BOOST_REGEX_DECL))
-# pragma message ("BOOST_REGEX_CALL" BOOST_STRINGIZE(=BOOST_REGEX_CALL))
-# pragma message ("BOOST_REGEX_CCALL" BOOST_STRINGIZE(=BOOST_REGEX_CCALL))
-#ifdef BOOST_REGEX_USE_C_LOCALE
-# pragma message ("Using C locale in regex traits class")
-#elif BOOST_REGEX_USE_CPP_LOCALE
-# pragma message ("Using C++ locale in regex traits class")
-#else
-# pragma message ("Using Win32 locale in regex traits class")
-#endif
-#if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
-# pragma message ("Dynamic linking enabled")
-#endif
-#if defined(BOOST_REGEX_NO_LIB) || defined(BOOST_ALL_NO_LIB)
-# pragma message ("Auto-linking disabled")
-#endif
-#ifdef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-# pragma message ("Extern templates disabled")
-#endif
-
-#endif
-
-#endif
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/icu.hpp b/src/third_party/boost-1.68.0/boost/regex/icu.hpp
deleted file mode 100644
index cdae1c8bb72..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/icu.hpp
+++ /dev/null
@@ -1,1040 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE icu.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Unicode regular expressions on top of the ICU Library.
- */
-
-#ifndef BOOST_REGEX_ICU_HPP
-#define BOOST_REGEX_ICU_HPP
-
-#include <boost/config.hpp>
-#include <unicode/utypes.h>
-#include <unicode/uchar.h>
-#include <unicode/coll.h>
-#include <boost/regex.hpp>
-#include <boost/regex/pending/unicode_iterator.hpp>
-#include <boost/mpl/int_fwd.hpp>
-#include <bitset>
-
-#ifdef BOOST_MSVC
-#pragma warning (push)
-#pragma warning (disable: 4251)
-#endif
-
-namespace boost{
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-//
-// Implementation details:
-//
-class BOOST_REGEX_DECL icu_regex_traits_implementation
-{
- typedef UChar32 char_type;
- typedef std::size_t size_type;
- typedef std::vector<char_type> string_type;
- typedef U_NAMESPACE_QUALIFIER Locale locale_type;
- typedef boost::uint_least32_t char_class_type;
-public:
- icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& l)
- : m_locale(l)
- {
- UErrorCode success = U_ZERO_ERROR;
- m_collator.reset(U_NAMESPACE_QUALIFIER Collator::createInstance(l, success));
- if(U_SUCCESS(success) == 0)
- init_error();
- m_collator->setStrength(U_NAMESPACE_QUALIFIER Collator::IDENTICAL);
- success = U_ZERO_ERROR;
- m_primary_collator.reset(U_NAMESPACE_QUALIFIER Collator::createInstance(l, success));
- if(U_SUCCESS(success) == 0)
- init_error();
- m_primary_collator->setStrength(U_NAMESPACE_QUALIFIER Collator::PRIMARY);
- }
- U_NAMESPACE_QUALIFIER Locale getloc()const
- {
- return m_locale;
- }
- string_type do_transform(const char_type* p1, const char_type* p2, const U_NAMESPACE_QUALIFIER Collator* pcoll) const;
- string_type transform(const char_type* p1, const char_type* p2) const
- {
- return do_transform(p1, p2, m_collator.get());
- }
- string_type transform_primary(const char_type* p1, const char_type* p2) const
- {
- return do_transform(p1, p2, m_primary_collator.get());
- }
-private:
- void init_error()
- {
- std::runtime_error e("Could not initialize ICU resources");
- boost::throw_exception(e);
- }
- U_NAMESPACE_QUALIFIER Locale m_locale; // The ICU locale that we're using
- boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_collator; // The full collation object
- boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_primary_collator; // The primary collation object
-};
-
-inline boost::shared_ptr<icu_regex_traits_implementation> get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc)
-{
- return boost::shared_ptr<icu_regex_traits_implementation>(new icu_regex_traits_implementation(loc));
-}
-
-}
-
-class BOOST_REGEX_DECL icu_regex_traits
-{
-public:
- typedef UChar32 char_type;
- typedef std::size_t size_type;
- typedef std::vector<char_type> string_type;
- typedef U_NAMESPACE_QUALIFIER Locale locale_type;
-#ifdef BOOST_NO_INT64_T
- typedef std::bitset<64> char_class_type;
-#else
- typedef boost::uint64_t char_class_type;
-#endif
-
- struct boost_extensions_tag{};
-
- icu_regex_traits()
- : m_pimpl(BOOST_REGEX_DETAIL_NS::get_icu_regex_traits_implementation(U_NAMESPACE_QUALIFIER Locale()))
- {
- }
- static size_type length(const char_type* p);
-
- ::boost::regex_constants::syntax_type syntax_type(char_type c)const
- {
- return ((c < 0x7f) && (c > 0)) ? BOOST_REGEX_DETAIL_NS::get_default_syntax_type(static_cast<char>(c)) : regex_constants::syntax_char;
- }
- ::boost::regex_constants::escape_syntax_type escape_syntax_type(char_type c) const
- {
- return ((c < 0x7f) && (c > 0)) ? BOOST_REGEX_DETAIL_NS::get_default_escape_syntax_type(static_cast<char>(c)) : regex_constants::syntax_char;
- }
- char_type translate(char_type c) const
- {
- return c;
- }
- char_type translate_nocase(char_type c) const
- {
- return ::u_tolower(c);
- }
- char_type translate(char_type c, bool icase) const
- {
- return icase ? translate_nocase(c) : translate(c);
- }
- char_type tolower(char_type c) const
- {
- return ::u_tolower(c);
- }
- char_type toupper(char_type c) const
- {
- return ::u_toupper(c);
- }
- string_type transform(const char_type* p1, const char_type* p2) const
- {
- return m_pimpl->transform(p1, p2);
- }
- string_type transform_primary(const char_type* p1, const char_type* p2) const
- {
- return m_pimpl->transform_primary(p1, p2);
- }
- char_class_type lookup_classname(const char_type* p1, const char_type* p2) const;
- string_type lookup_collatename(const char_type* p1, const char_type* p2) const;
- bool isctype(char_type c, char_class_type f) const;
- boost::intmax_t toi(const char_type*& p1, const char_type* p2, int radix)const
- {
- return BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
- }
- int value(char_type c, int radix)const
- {
- return u_digit(c, static_cast< ::int8_t>(radix));
- }
- locale_type imbue(locale_type l)
- {
- locale_type result(m_pimpl->getloc());
- m_pimpl = BOOST_REGEX_DETAIL_NS::get_icu_regex_traits_implementation(l);
- return result;
- }
- locale_type getloc()const
- {
- return locale_type();
- }
- std::string error_string(::boost::regex_constants::error_type n) const
- {
- return BOOST_REGEX_DETAIL_NS::get_default_error_string(n);
- }
-private:
- icu_regex_traits(const icu_regex_traits&);
- icu_regex_traits& operator=(const icu_regex_traits&);
-
- //
- // define the bitmasks offsets we need for additional character properties:
- //
- enum{
- offset_blank = U_CHAR_CATEGORY_COUNT,
- offset_space = U_CHAR_CATEGORY_COUNT+1,
- offset_xdigit = U_CHAR_CATEGORY_COUNT+2,
- offset_underscore = U_CHAR_CATEGORY_COUNT+3,
- offset_unicode = U_CHAR_CATEGORY_COUNT+4,
- offset_any = U_CHAR_CATEGORY_COUNT+5,
- offset_ascii = U_CHAR_CATEGORY_COUNT+6,
- offset_horizontal = U_CHAR_CATEGORY_COUNT+7,
- offset_vertical = U_CHAR_CATEGORY_COUNT+8
- };
-
- //
- // and now the masks:
- //
- static const char_class_type mask_blank;
- static const char_class_type mask_space;
- static const char_class_type mask_xdigit;
- static const char_class_type mask_underscore;
- static const char_class_type mask_unicode;
- static const char_class_type mask_any;
- static const char_class_type mask_ascii;
- static const char_class_type mask_horizontal;
- static const char_class_type mask_vertical;
-
- static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2);
-
- boost::shared_ptr< ::boost::BOOST_REGEX_DETAIL_NS::icu_regex_traits_implementation> m_pimpl;
-};
-
-} // namespace boost
-
-//
-// template instances:
-//
-#define BOOST_REGEX_CHAR_T UChar32
-#undef BOOST_REGEX_TRAITS_T
-#define BOOST_REGEX_TRAITS_T , icu_regex_traits
-#define BOOST_REGEX_ICU_INSTANCES
-#ifdef BOOST_REGEX_ICU_INSTANTIATE
-# define BOOST_REGEX_INSTANTIATE
-#endif
-#include <boost/regex/v4/instances.hpp>
-#undef BOOST_REGEX_CHAR_T
-#undef BOOST_REGEX_TRAITS_T
-#undef BOOST_REGEX_ICU_INSTANCES
-#ifdef BOOST_REGEX_INSTANTIATE
-# undef BOOST_REGEX_INSTANTIATE
-#endif
-
-namespace boost{
-
-// types:
-typedef basic_regex< ::UChar32, icu_regex_traits> u32regex;
-typedef match_results<const ::UChar32*> u32match;
-typedef match_results<const ::UChar*> u16match;
-
-//
-// Construction of 32-bit regex types from UTF-8 and UTF-16 primitives:
-//
-namespace BOOST_REGEX_DETAIL_NS{
-
-#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__)
-template <class InputIterator>
-inline u32regex do_make_u32regex(InputIterator i,
- InputIterator j,
- boost::regex_constants::syntax_option_type opt,
- const boost::mpl::int_<1>*)
-{
- typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
- return u32regex(conv_type(i, i, j), conv_type(j, i, j), opt);
-}
-
-template <class InputIterator>
-inline u32regex do_make_u32regex(InputIterator i,
- InputIterator j,
- boost::regex_constants::syntax_option_type opt,
- const boost::mpl::int_<2>*)
-{
- typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
- return u32regex(conv_type(i, i, j), conv_type(j, i, j), opt);
-}
-
-template <class InputIterator>
-inline u32regex do_make_u32regex(InputIterator i,
- InputIterator j,
- boost::regex_constants::syntax_option_type opt,
- const boost::mpl::int_<4>*)
-{
- return u32regex(i, j, opt);
-}
-#else
-template <class InputIterator>
-inline u32regex do_make_u32regex(InputIterator i,
- InputIterator j,
- boost::regex_constants::syntax_option_type opt,
- const boost::mpl::int_<1>*)
-{
- typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
- typedef std::vector<UChar32> vector_type;
- vector_type v;
- conv_type a(i, i, j), b(j, i, j);
- while(a != b)
- {
- v.push_back(*a);
- ++a;
- }
- if(v.size())
- return u32regex(&*v.begin(), v.size(), opt);
- return u32regex(static_cast<UChar32 const*>(0), static_cast<u32regex::size_type>(0), opt);
-}
-
-template <class InputIterator>
-inline u32regex do_make_u32regex(InputIterator i,
- InputIterator j,
- boost::regex_constants::syntax_option_type opt,
- const boost::mpl::int_<2>*)
-{
- typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
- typedef std::vector<UChar32> vector_type;
- vector_type v;
- conv_type a(i, i, j), b(j, i, j);
- while(a != b)
- {
- v.push_back(*a);
- ++a;
- }
- if(v.size())
- return u32regex(&*v.begin(), v.size(), opt);
- return u32regex(static_cast<UChar32 const*>(0), static_cast<u32regex::size_type>(0), opt);
-}
-
-template <class InputIterator>
-inline u32regex do_make_u32regex(InputIterator i,
- InputIterator j,
- boost::regex_constants::syntax_option_type opt,
- const boost::mpl::int_<4>*)
-{
- typedef std::vector<UChar32> vector_type;
- vector_type v;
- while(i != j)
- {
- v.push_back((UChar32)(*i));
- ++i;
- }
- if(v.size())
- return u32regex(&*v.begin(), v.size(), opt);
- return u32regex(static_cast<UChar32 const*>(0), static_cast<u32regex::size_type>(0), opt);
-}
-#endif
-}
-
-//
-// Construction from an iterator pair:
-//
-template <class InputIterator>
-inline u32regex make_u32regex(InputIterator i,
- InputIterator j,
- boost::regex_constants::syntax_option_type opt)
-{
- return BOOST_REGEX_DETAIL_NS::do_make_u32regex(i, j, opt, static_cast<boost::mpl::int_<sizeof(*i)> const*>(0));
-}
-//
-// construction from UTF-8 nul-terminated strings:
-//
-inline u32regex make_u32regex(const char* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
-{
- return BOOST_REGEX_DETAIL_NS::do_make_u32regex(p, p + std::strlen(p), opt, static_cast<boost::mpl::int_<1> const*>(0));
-}
-inline u32regex make_u32regex(const unsigned char* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
-{
- return BOOST_REGEX_DETAIL_NS::do_make_u32regex(p, p + std::strlen(reinterpret_cast<const char*>(p)), opt, static_cast<boost::mpl::int_<1> const*>(0));
-}
-//
-// construction from UTF-16 nul-terminated strings:
-//
-#ifndef BOOST_NO_WREGEX
-inline u32regex make_u32regex(const wchar_t* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
-{
- return BOOST_REGEX_DETAIL_NS::do_make_u32regex(p, p + std::wcslen(p), opt, static_cast<boost::mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
-inline u32regex make_u32regex(const UChar* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
-{
- return BOOST_REGEX_DETAIL_NS::do_make_u32regex(p, p + u_strlen(p), opt, static_cast<boost::mpl::int_<2> const*>(0));
-}
-#endif
-//
-// construction from basic_string class-template:
-//
-template<class C, class T, class A>
-inline u32regex make_u32regex(const std::basic_string<C, T, A>& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
-{
- return BOOST_REGEX_DETAIL_NS::do_make_u32regex(s.begin(), s.end(), opt, static_cast<boost::mpl::int_<sizeof(C)> const*>(0));
-}
-//
-// Construction from ICU string type:
-//
-inline u32regex make_u32regex(const U_NAMESPACE_QUALIFIER UnicodeString& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
-{
- return BOOST_REGEX_DETAIL_NS::do_make_u32regex(s.getBuffer(), s.getBuffer() + s.length(), opt, static_cast<boost::mpl::int_<2> const*>(0));
-}
-
-//
-// regex_match overloads that widen the character type as appropriate:
-//
-namespace BOOST_REGEX_DETAIL_NS{
-template<class MR1, class MR2, class NSubs>
-void copy_results(MR1& out, MR2 const& in, NSubs named_subs)
-{
- // copy results from an adapted MR2 match_results:
- out.set_size(in.size(), in.prefix().first.base(), in.suffix().second.base());
- out.set_base(in.base().base());
- out.set_named_subs(named_subs);
- for(int i = 0; i < (int)in.size(); ++i)
- {
- if(in[i].matched || !i)
- {
- out.set_first(in[i].first.base(), i);
- out.set_second(in[i].second.base(), i, in[i].matched);
- }
- }
-#ifdef BOOST_REGEX_MATCH_EXTRA
- // Copy full capture info as well:
- for(int i = 0; i < (int)in.size(); ++i)
- {
- if(in[i].captures().size())
- {
- out[i].get_captures().assign(in[i].captures().size(), typename MR1::value_type());
- for(int j = 0; j < (int)out[i].captures().size(); ++j)
- {
- out[i].get_captures()[j].first = in[i].captures()[j].first.base();
- out[i].get_captures()[j].second = in[i].captures()[j].second.base();
- out[i].get_captures()[j].matched = in[i].captures()[j].matched;
- }
- }
- }
-#endif
-}
-
-template <class BidiIterator, class Allocator>
-inline bool do_regex_match(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags,
- boost::mpl::int_<4> const*)
-{
- return ::boost::regex_match(first, last, m, e, flags);
-}
-template <class BidiIterator, class Allocator>
-bool do_regex_match(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags,
- boost::mpl::int_<2> const*)
-{
- typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
- typedef match_results<conv_type> match_type;
- //typedef typename match_type::allocator_type alloc_type;
- match_type what;
- bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
- // copy results across to m:
- if(result) copy_results(m, what, e.get_named_subs());
- return result;
-}
-template <class BidiIterator, class Allocator>
-bool do_regex_match(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags,
- boost::mpl::int_<1> const*)
-{
- typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
- typedef match_results<conv_type> match_type;
- //typedef typename match_type::allocator_type alloc_type;
- match_type what;
- bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
- // copy results across to m:
- if(result) copy_results(m, what, e.get_named_subs());
- return result;
-}
-} // namespace BOOST_REGEX_DETAIL_NS
-
-template <class BidiIterator, class Allocator>
-inline bool u32regex_match(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
-}
-inline bool u32regex_match(const UChar* p,
- match_results<const UChar*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
-}
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
-inline bool u32regex_match(const wchar_t* p,
- match_results<const wchar_t*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-inline bool u32regex_match(const char* p,
- match_results<const char*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
-}
-inline bool u32regex_match(const unsigned char* p,
- match_results<const unsigned char*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
-}
-inline bool u32regex_match(const std::string& s,
- match_results<std::string::const_iterator>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
-}
-#ifndef BOOST_NO_STD_WSTRING
-inline bool u32regex_match(const std::wstring& s,
- match_results<std::wstring::const_iterator>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
- match_results<const UChar*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-//
-// regex_match overloads that do not return what matched:
-//
-template <class BidiIterator>
-inline bool u32regex_match(BidiIterator first, BidiIterator last,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<BidiIterator> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
-}
-inline bool u32regex_match(const UChar* p,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const UChar*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
-}
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
-inline bool u32regex_match(const wchar_t* p,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const wchar_t*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-inline bool u32regex_match(const char* p,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const char*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
-}
-inline bool u32regex_match(const unsigned char* p,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const unsigned char*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
-}
-inline bool u32regex_match(const std::string& s,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<std::string::const_iterator> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
-}
-#ifndef BOOST_NO_STD_WSTRING
-inline bool u32regex_match(const std::wstring& s,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<std::wstring::const_iterator> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const UChar*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-
-//
-// regex_search overloads that widen the character type as appropriate:
-//
-namespace BOOST_REGEX_DETAIL_NS{
-template <class BidiIterator, class Allocator>
-inline bool do_regex_search(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags,
- BidiIterator base,
- boost::mpl::int_<4> const*)
-{
- return ::boost::regex_search(first, last, m, e, flags, base);
-}
-template <class BidiIterator, class Allocator>
-bool do_regex_search(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags,
- BidiIterator base,
- boost::mpl::int_<2> const*)
-{
- typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
- typedef match_results<conv_type> match_type;
- //typedef typename match_type::allocator_type alloc_type;
- match_type what;
- bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
- // copy results across to m:
- if(result) copy_results(m, what, e.get_named_subs());
- return result;
-}
-template <class BidiIterator, class Allocator>
-bool do_regex_search(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags,
- BidiIterator base,
- boost::mpl::int_<1> const*)
-{
- typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
- typedef match_results<conv_type> match_type;
- //typedef typename match_type::allocator_type alloc_type;
- match_type what;
- bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
- // copy results across to m:
- if(result) copy_results(m, what, e.get_named_subs());
- return result;
-}
-}
-
-template <class BidiIterator, class Allocator>
-inline bool u32regex_search(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, first, static_cast<mpl::int_<sizeof(*first)> const*>(0));
-}
-template <class BidiIterator, class Allocator>
-inline bool u32regex_search(BidiIterator first, BidiIterator last,
- match_results<BidiIterator, Allocator>& m,
- const u32regex& e,
- match_flag_type flags,
- BidiIterator base)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, base, static_cast<mpl::int_<sizeof(*first)> const*>(0));
-}
-inline bool u32regex_search(const UChar* p,
- match_results<const UChar*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0));
-}
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
-inline bool u32regex_search(const wchar_t* p,
- match_results<const wchar_t*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-inline bool u32regex_search(const char* p,
- match_results<const char*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
-}
-inline bool u32regex_search(const unsigned char* p,
- match_results<const unsigned char*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
-}
-inline bool u32regex_search(const std::string& s,
- match_results<std::string::const_iterator>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<1> const*>(0));
-}
-#ifndef BOOST_NO_STD_WSTRING
-inline bool u32regex_search(const std::wstring& s,
- match_results<std::wstring::const_iterator>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
- match_results<const UChar*>& m,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, s.getBuffer(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-template <class BidiIterator>
-inline bool u32regex_search(BidiIterator first, BidiIterator last,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<BidiIterator> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, first, static_cast<mpl::int_<sizeof(*first)> const*>(0));
-}
-inline bool u32regex_search(const UChar* p,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const UChar*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0));
-}
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2) && !defined(BOOST_NO_WREGEX)
-inline bool u32regex_search(const wchar_t* p,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const wchar_t*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-inline bool u32regex_search(const char* p,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const char*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
-}
-inline bool u32regex_search(const unsigned char* p,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const unsigned char*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
-}
-inline bool u32regex_search(const std::string& s,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<std::string::const_iterator> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<1> const*>(0));
-}
-#ifndef BOOST_NO_STD_WSTRING
-inline bool u32regex_search(const std::wstring& s,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<std::wstring::const_iterator> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-#endif
-inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
- const u32regex& e,
- match_flag_type flags = match_default)
-{
- match_results<const UChar*> m;
- return BOOST_REGEX_DETAIL_NS::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, s.getBuffer(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
-}
-
-//
-// overloads for regex_replace with utf-8 and utf-16 data types:
-//
-namespace BOOST_REGEX_DETAIL_NS{
-template <class I>
-inline std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >
- make_utf32_seq(I i, I j, mpl::int_<1> const*)
-{
- return std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >(boost::u8_to_u32_iterator<I>(i, i, j), boost::u8_to_u32_iterator<I>(j, i, j));
-}
-template <class I>
-inline std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >
- make_utf32_seq(I i, I j, mpl::int_<2> const*)
-{
- return std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >(boost::u16_to_u32_iterator<I>(i, i, j), boost::u16_to_u32_iterator<I>(j, i, j));
-}
-template <class I>
-inline std::pair< I, I >
- make_utf32_seq(I i, I j, mpl::int_<4> const*)
-{
- return std::pair< I, I >(i, j);
-}
-template <class charT>
-inline std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >
- make_utf32_seq(const charT* p, mpl::int_<1> const*)
-{
- std::size_t len = std::strlen((const char*)p);
- return std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >(boost::u8_to_u32_iterator<const charT*>(p, p, p+len), boost::u8_to_u32_iterator<const charT*>(p+len, p, p+len));
-}
-template <class charT>
-inline std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >
- make_utf32_seq(const charT* p, mpl::int_<2> const*)
-{
- std::size_t len = u_strlen((const UChar*)p);
- return std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >(boost::u16_to_u32_iterator<const charT*>(p, p, p + len), boost::u16_to_u32_iterator<const charT*>(p+len, p, p + len));
-}
-template <class charT>
-inline std::pair< const charT*, const charT* >
- make_utf32_seq(const charT* p, mpl::int_<4> const*)
-{
- return std::pair< const charT*, const charT* >(p, p+icu_regex_traits::length((UChar32 const*)p));
-}
-template <class OutputIterator>
-inline OutputIterator make_utf32_out(OutputIterator o, mpl::int_<4> const*)
-{
- return o;
-}
-template <class OutputIterator>
-inline utf16_output_iterator<OutputIterator> make_utf32_out(OutputIterator o, mpl::int_<2> const*)
-{
- return o;
-}
-template <class OutputIterator>
-inline utf8_output_iterator<OutputIterator> make_utf32_out(OutputIterator o, mpl::int_<1> const*)
-{
- return o;
-}
-
-template <class OutputIterator, class I1, class I2>
-OutputIterator do_regex_replace(OutputIterator out,
- std::pair<I1, I1> const& in,
- const u32regex& e,
- const std::pair<I2, I2>& fmt,
- match_flag_type flags
- )
-{
- // unfortunately we have to copy the format string in order to pass in onward:
- std::vector<UChar32> f;
-#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
- f.assign(fmt.first, fmt.second);
-#else
- f.clear();
- I2 pos = fmt.first;
- while(pos != fmt.second)
- f.push_back(*pos++);
-#endif
-
- regex_iterator<I1, UChar32, icu_regex_traits> i(in.first, in.second, e, flags);
- regex_iterator<I1, UChar32, icu_regex_traits> j;
- if(i == j)
- {
- if(!(flags & regex_constants::format_no_copy))
- out = BOOST_REGEX_DETAIL_NS::copy(in.first, in.second, out);
- }
- else
- {
- I1 last_m = in.first;
- while(i != j)
- {
- if(!(flags & regex_constants::format_no_copy))
- out = BOOST_REGEX_DETAIL_NS::copy(i->prefix().first, i->prefix().second, out);
- if(f.size())
- out = ::boost::BOOST_REGEX_DETAIL_NS::regex_format_imp(out, *i, &*f.begin(), &*f.begin() + f.size(), flags, e.get_traits());
- else
- out = ::boost::BOOST_REGEX_DETAIL_NS::regex_format_imp(out, *i, static_cast<UChar32 const*>(0), static_cast<UChar32 const*>(0), flags, e.get_traits());
- last_m = (*i)[0].second;
- if(flags & regex_constants::format_first_only)
- break;
- ++i;
- }
- if(!(flags & regex_constants::format_no_copy))
- out = BOOST_REGEX_DETAIL_NS::copy(last_m, in.second, out);
- }
- return out;
-}
-template <class BaseIterator>
-inline const BaseIterator& extract_output_base(const BaseIterator& b)
-{
- return b;
-}
-template <class BaseIterator>
-inline BaseIterator extract_output_base(const utf8_output_iterator<BaseIterator>& b)
-{
- return b.base();
-}
-template <class BaseIterator>
-inline BaseIterator extract_output_base(const utf16_output_iterator<BaseIterator>& b)
-{
- return b.base();
-}
-} // BOOST_REGEX_DETAIL_NS
-
-template <class OutputIterator, class BidirectionalIterator, class charT>
-inline OutputIterator u32regex_replace(OutputIterator out,
- BidirectionalIterator first,
- BidirectionalIterator last,
- const u32regex& e,
- const charT* fmt,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::extract_output_base
- (
- BOOST_REGEX_DETAIL_NS::do_regex_replace(
- BOOST_REGEX_DETAIL_NS::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
- BOOST_REGEX_DETAIL_NS::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
- e,
- BOOST_REGEX_DETAIL_NS::make_utf32_seq(fmt, static_cast<mpl::int_<sizeof(*fmt)> const*>(0)),
- flags)
- );
-}
-
-template <class OutputIterator, class Iterator, class charT>
-inline OutputIterator u32regex_replace(OutputIterator out,
- Iterator first,
- Iterator last,
- const u32regex& e,
- const std::basic_string<charT>& fmt,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::extract_output_base
- (
- BOOST_REGEX_DETAIL_NS::do_regex_replace(
- BOOST_REGEX_DETAIL_NS::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
- BOOST_REGEX_DETAIL_NS::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
- e,
- BOOST_REGEX_DETAIL_NS::make_utf32_seq(fmt.begin(), fmt.end(), static_cast<mpl::int_<sizeof(charT)> const*>(0)),
- flags)
- );
-}
-
-template <class OutputIterator, class Iterator>
-inline OutputIterator u32regex_replace(OutputIterator out,
- Iterator first,
- Iterator last,
- const u32regex& e,
- const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
- match_flag_type flags = match_default)
-{
- return BOOST_REGEX_DETAIL_NS::extract_output_base
- (
- BOOST_REGEX_DETAIL_NS::do_regex_replace(
- BOOST_REGEX_DETAIL_NS::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
- BOOST_REGEX_DETAIL_NS::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
- e,
- BOOST_REGEX_DETAIL_NS::make_utf32_seq(fmt.getBuffer(), fmt.getBuffer() + fmt.length(), static_cast<mpl::int_<2> const*>(0)),
- flags)
- );
-}
-
-template <class charT>
-std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
- const u32regex& e,
- const charT* fmt,
- match_flag_type flags = match_default)
-{
- std::basic_string<charT> result;
- BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<charT> > i(result);
- u32regex_replace(i, s.begin(), s.end(), e, fmt, flags);
- return result;
-}
-
-template <class charT>
-std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
- const u32regex& e,
- const std::basic_string<charT>& fmt,
- match_flag_type flags = match_default)
-{
- std::basic_string<charT> result;
- BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<charT> > i(result);
- u32regex_replace(i, s.begin(), s.end(), e, fmt.c_str(), flags);
- return result;
-}
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-class unicode_string_out_iterator
-{
- U_NAMESPACE_QUALIFIER UnicodeString* out;
-public:
- unicode_string_out_iterator(U_NAMESPACE_QUALIFIER UnicodeString& s) : out(&s) {}
- unicode_string_out_iterator& operator++() { return *this; }
- unicode_string_out_iterator& operator++(int) { return *this; }
- unicode_string_out_iterator& operator*() { return *this; }
- unicode_string_out_iterator& operator=(UChar v)
- {
- *out += v;
- return *this;
- }
- typedef std::ptrdiff_t difference_type;
- typedef UChar value_type;
- typedef value_type* pointer;
- typedef value_type& reference;
- typedef std::output_iterator_tag iterator_category;
-};
-
-}
-
-inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
- const u32regex& e,
- const UChar* fmt,
- match_flag_type flags = match_default)
-{
- U_NAMESPACE_QUALIFIER UnicodeString result;
- BOOST_REGEX_DETAIL_NS::unicode_string_out_iterator i(result);
- u32regex_replace(i, s.getBuffer(), s.getBuffer()+s.length(), e, fmt, flags);
- return result;
-}
-
-inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
- const u32regex& e,
- const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
- match_flag_type flags = match_default)
-{
- U_NAMESPACE_QUALIFIER UnicodeString result;
- BOOST_REGEX_DETAIL_NS::unicode_string_out_iterator i(result);
- BOOST_REGEX_DETAIL_NS::do_regex_replace(
- BOOST_REGEX_DETAIL_NS::make_utf32_out(i, static_cast<mpl::int_<2> const*>(0)),
- BOOST_REGEX_DETAIL_NS::make_utf32_seq(s.getBuffer(), s.getBuffer()+s.length(), static_cast<mpl::int_<2> const*>(0)),
- e,
- BOOST_REGEX_DETAIL_NS::make_utf32_seq(fmt.getBuffer(), fmt.getBuffer() + fmt.length(), static_cast<mpl::int_<2> const*>(0)),
- flags);
- return result;
-}
-
-} // namespace boost.
-
-#ifdef BOOST_MSVC
-#pragma warning (pop)
-#endif
-
-#include <boost/regex/v4/u32regex_iterator.hpp>
-#include <boost/regex/v4/u32regex_token_iterator.hpp>
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex.hpp
deleted file mode 100644
index ac91af2914c..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex.hpp
+++ /dev/null
@@ -1,781 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2004 John Maddock
- * Copyright 2011 Garmin Ltd. or its subsidiaries
- *
- * Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org/ for most recent version.
- * FILE basic_regex.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares template class basic_regex.
- */
-
-#ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP
-#define BOOST_REGEX_V4_BASIC_REGEX_HPP
-
-#include <boost/type_traits/is_same.hpp>
-#include <boost/functional/hash.hpp>
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-namespace boost{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable : 4251 4231 4800)
-#if BOOST_MSVC < 1600
-#pragma warning(disable : 4660)
-#endif
-#endif
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-//
-// forward declaration, we will need this one later:
-//
-template <class charT, class traits>
-class basic_regex_parser;
-
-template <class I>
-void bubble_down_one(I first, I last)
-{
- if(first != last)
- {
- I next = last - 1;
- while((next != first) && (*next < *(next-1)))
- {
- (next-1)->swap(*next);
- --next;
- }
- }
-}
-
-template <class Iterator>
-inline int hash_value_from_capture_name(Iterator i, Iterator j)
-{
- std::size_t r = boost::hash_range(i, j);
- r %= ((std::numeric_limits<int>::max)() - 10001);
- r += 10000;
- return static_cast<int>(r);
-}
-
-class named_subexpressions
-{
-public:
- struct name
- {
- template <class charT>
- name(const charT* i, const charT* j, int idx)
- : index(idx)
- {
- hash = hash_value_from_capture_name(i, j);
- }
- name(int h, int idx)
- : index(idx), hash(h)
- {
- }
- int index;
- int hash;
- bool operator < (const name& other)const
- {
- return hash < other.hash;
- }
- bool operator == (const name& other)const
- {
- return hash == other.hash;
- }
- void swap(name& other)
- {
- std::swap(index, other.index);
- std::swap(hash, other.hash);
- }
- };
-
- typedef std::vector<name>::const_iterator const_iterator;
- typedef std::pair<const_iterator, const_iterator> range_type;
-
- named_subexpressions(){}
-
- template <class charT>
- void set_name(const charT* i, const charT* j, int index)
- {
- m_sub_names.push_back(name(i, j, index));
- bubble_down_one(m_sub_names.begin(), m_sub_names.end());
- }
- template <class charT>
- int get_id(const charT* i, const charT* j)const
- {
- name t(i, j, 0);
- typename std::vector<name>::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
- if((pos != m_sub_names.end()) && (*pos == t))
- {
- return pos->index;
- }
- return -1;
- }
- template <class charT>
- range_type equal_range(const charT* i, const charT* j)const
- {
- name t(i, j, 0);
- return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t);
- }
- int get_id(int h)const
- {
- name t(h, 0);
- std::vector<name>::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
- if((pos != m_sub_names.end()) && (*pos == t))
- {
- return pos->index;
- }
- return -1;
- }
- range_type equal_range(int h)const
- {
- name t(h, 0);
- return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t);
- }
-private:
- std::vector<name> m_sub_names;
-};
-
-//
-// class regex_data:
-// represents the data we wish to expose to the matching algorithms.
-//
-template <class charT, class traits>
-struct regex_data : public named_subexpressions
-{
- typedef regex_constants::syntax_option_type flag_type;
- typedef std::size_t size_type;
-
- regex_data(const ::boost::shared_ptr<
- ::boost::regex_traits_wrapper<traits> >& t)
- : m_ptraits(t), m_expression(0), m_expression_len(0), m_disable_match_any(false) {}
- regex_data()
- : m_ptraits(new ::boost::regex_traits_wrapper<traits>()), m_expression(0), m_expression_len(0), m_disable_match_any(false) {}
-
- ::boost::shared_ptr<
- ::boost::regex_traits_wrapper<traits>
- > m_ptraits; // traits class instance
- flag_type m_flags; // flags with which we were compiled
- int m_status; // error code (0 implies OK).
- const charT* m_expression; // the original expression
- std::ptrdiff_t m_expression_len; // the length of the original expression
- size_type m_mark_count; // the number of marked sub-expressions
- BOOST_REGEX_DETAIL_NS::re_syntax_base* m_first_state; // the first state of the machine
- unsigned m_restart_type; // search optimisation type
- unsigned char m_startmap[1 << CHAR_BIT]; // which characters can start a match
- unsigned int m_can_be_null; // whether we can match a null string
- BOOST_REGEX_DETAIL_NS::raw_storage m_data; // the buffer in which our states are constructed
- typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character
- std::vector<
- std::pair<
- std::size_t, std::size_t> > m_subs; // Position of sub-expressions within the *string*.
- bool m_has_recursions; // whether we have recursive expressions;
- bool m_disable_match_any; // when set we need to disable the match_any flag as it causes different/buggy behaviour.
-};
-//
-// class basic_regex_implementation
-// pimpl implementation class for basic_regex.
-//
-template <class charT, class traits>
-class basic_regex_implementation
- : public regex_data<charT, traits>
-{
-public:
- typedef regex_constants::syntax_option_type flag_type;
- typedef std::ptrdiff_t difference_type;
- typedef std::size_t size_type;
- typedef typename traits::locale_type locale_type;
- typedef const charT* const_iterator;
-
- basic_regex_implementation(){}
- basic_regex_implementation(const ::boost::shared_ptr<
- ::boost::regex_traits_wrapper<traits> >& t)
- : regex_data<charT, traits>(t) {}
- void assign(const charT* arg_first,
- const charT* arg_last,
- flag_type f)
- {
- regex_data<charT, traits>* pdat = this;
- basic_regex_parser<charT, traits> parser(pdat);
- parser.parse(arg_first, arg_last, f);
- }
-
- locale_type BOOST_REGEX_CALL imbue(locale_type l)
- {
- return this->m_ptraits->imbue(l);
- }
- locale_type BOOST_REGEX_CALL getloc()const
- {
- return this->m_ptraits->getloc();
- }
- std::basic_string<charT> BOOST_REGEX_CALL str()const
- {
- std::basic_string<charT> result;
- if(this->m_status == 0)
- result = std::basic_string<charT>(this->m_expression, this->m_expression_len);
- return result;
- }
- const_iterator BOOST_REGEX_CALL expression()const
- {
- return this->m_expression;
- }
- std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const
- {
- const std::pair<std::size_t, std::size_t>& pi = this->m_subs.at(n);
- std::pair<const_iterator, const_iterator> p(expression() + pi.first, expression() + pi.second);
- return p;
- }
- //
- // begin, end:
- const_iterator BOOST_REGEX_CALL begin()const
- {
- return (this->m_status ? 0 : this->m_expression);
- }
- const_iterator BOOST_REGEX_CALL end()const
- {
- return (this->m_status ? 0 : this->m_expression + this->m_expression_len);
- }
- flag_type BOOST_REGEX_CALL flags()const
- {
- return this->m_flags;
- }
- size_type BOOST_REGEX_CALL size()const
- {
- return this->m_expression_len;
- }
- int BOOST_REGEX_CALL status()const
- {
- return this->m_status;
- }
- size_type BOOST_REGEX_CALL mark_count()const
- {
- return this->m_mark_count - 1;
- }
- const BOOST_REGEX_DETAIL_NS::re_syntax_base* get_first_state()const
- {
- return this->m_first_state;
- }
- unsigned get_restart_type()const
- {
- return this->m_restart_type;
- }
- const unsigned char* get_map()const
- {
- return this->m_startmap;
- }
- const ::boost::regex_traits_wrapper<traits>& get_traits()const
- {
- return *(this->m_ptraits);
- }
- bool can_be_null()const
- {
- return this->m_can_be_null;
- }
- const regex_data<charT, traits>& get_data()const
- {
- basic_regex_implementation<charT, traits> const* p = this;
- return *static_cast<const regex_data<charT, traits>*>(p);
- }
-};
-
-} // namespace BOOST_REGEX_DETAIL_NS
-//
-// class basic_regex:
-// represents the compiled
-// regular expression:
-//
-
-#ifdef BOOST_REGEX_NO_FWD
-template <class charT, class traits = regex_traits<charT> >
-#else
-template <class charT, class traits >
-#endif
-class basic_regex : public regbase
-{
-public:
- // typedefs:
- typedef std::size_t traits_size_type;
- typedef typename traits::string_type traits_string_type;
- typedef charT char_type;
- typedef traits traits_type;
-
- typedef charT value_type;
- typedef charT& reference;
- typedef const charT& const_reference;
- typedef const charT* const_iterator;
- typedef const_iterator iterator;
- typedef std::ptrdiff_t difference_type;
- typedef std::size_t size_type;
- typedef regex_constants::syntax_option_type flag_type;
- // locale_type
- // placeholder for actual locale type used by the
- // traits class to localise *this.
- typedef typename traits::locale_type locale_type;
-
-public:
- explicit basic_regex(){}
- explicit basic_regex(const charT* p, flag_type f = regex_constants::normal)
- {
- assign(p, f);
- }
- basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
- {
- assign(p1, p2, f);
- }
- basic_regex(const charT* p, size_type len, flag_type f)
- {
- assign(p, len, f);
- }
- basic_regex(const basic_regex& that)
- : m_pimpl(that.m_pimpl) {}
- ~basic_regex(){}
- basic_regex& BOOST_REGEX_CALL operator=(const basic_regex& that)
- {
- return assign(that);
- }
- basic_regex& BOOST_REGEX_CALL operator=(const charT* ptr)
- {
- return assign(ptr);
- }
-
- //
- // assign:
- basic_regex& assign(const basic_regex& that)
- {
- m_pimpl = that.m_pimpl;
- return *this;
- }
- basic_regex& assign(const charT* p, flag_type f = regex_constants::normal)
- {
- return assign(p, p + traits::length(p), f);
- }
- basic_regex& assign(const charT* p, size_type len, flag_type f)
- {
- return assign(p, p + len, f);
- }
-private:
- basic_regex& do_assign(const charT* p1,
- const charT* p2,
- flag_type f);
-public:
- basic_regex& assign(const charT* p1,
- const charT* p2,
- flag_type f = regex_constants::normal)
- {
- return do_assign(p1, p2, f);
- }
-#if !defined(BOOST_NO_MEMBER_TEMPLATES)
-
- template <class ST, class SA>
- unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
- {
- return set_expression(p.data(), p.data() + p.size(), f);
- }
-
- template <class ST, class SA>
- explicit basic_regex(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
- {
- assign(p, f);
- }
-
- template <class InputIterator>
- basic_regex(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal)
- {
- typedef typename traits::string_type seq_type;
- seq_type a(arg_first, arg_last);
- if(a.size())
- assign(static_cast<const charT*>(&*a.begin()), static_cast<const charT*>(&*a.begin() + a.size()), f);
- else
- assign(static_cast<const charT*>(0), static_cast<const charT*>(0), f);
- }
-
- template <class ST, class SA>
- basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
- {
- return assign(p.data(), p.data() + p.size(), regex_constants::normal);
- }
-
- template <class string_traits, class A>
- basic_regex& BOOST_REGEX_CALL assign(
- const std::basic_string<charT, string_traits, A>& s,
- flag_type f = regex_constants::normal)
- {
- return assign(s.data(), s.data() + s.size(), f);
- }
-
- template <class InputIterator>
- basic_regex& BOOST_REGEX_CALL assign(InputIterator arg_first,
- InputIterator arg_last,
- flag_type f = regex_constants::normal)
- {
- typedef typename traits::string_type seq_type;
- seq_type a(arg_first, arg_last);
- if(a.size())
- {
- const charT* p1 = &*a.begin();
- const charT* p2 = &*a.begin() + a.size();
- return assign(p1, p2, f);
- }
- return assign(static_cast<const charT*>(0), static_cast<const charT*>(0), f);
- }
-#else
- unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
- {
- return set_expression(p.data(), p.data() + p.size(), f);
- }
-
- basic_regex(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
- {
- assign(p, f);
- }
-
- basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
- {
- return assign(p.data(), p.data() + p.size(), regex_constants::normal);
- }
-
- basic_regex& BOOST_REGEX_CALL assign(
- const std::basic_string<charT>& s,
- flag_type f = regex_constants::normal)
- {
- return assign(s.data(), s.data() + s.size(), f);
- }
-
-#endif
-
- //
- // locale:
- locale_type BOOST_REGEX_CALL imbue(locale_type l);
- locale_type BOOST_REGEX_CALL getloc()const
- {
- return m_pimpl.get() ? m_pimpl->getloc() : locale_type();
- }
- //
- // getflags:
- // retained for backwards compatibility only, "flags"
- // is now the preferred name:
- flag_type BOOST_REGEX_CALL getflags()const
- {
- return flags();
- }
- flag_type BOOST_REGEX_CALL flags()const
- {
- return m_pimpl.get() ? m_pimpl->flags() : 0;
- }
- //
- // str:
- std::basic_string<charT> BOOST_REGEX_CALL str()const
- {
- return m_pimpl.get() ? m_pimpl->str() : std::basic_string<charT>();
- }
- //
- // begin, end, subexpression:
- std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const
- {
- if(!m_pimpl.get())
- boost::throw_exception(std::logic_error("Can't access subexpressions in an invalid regex."));
- return m_pimpl->subexpression(n);
- }
- const_iterator BOOST_REGEX_CALL begin()const
- {
- return (m_pimpl.get() ? m_pimpl->begin() : 0);
- }
- const_iterator BOOST_REGEX_CALL end()const
- {
- return (m_pimpl.get() ? m_pimpl->end() : 0);
- }
- //
- // swap:
- void BOOST_REGEX_CALL swap(basic_regex& that)throw()
- {
- m_pimpl.swap(that.m_pimpl);
- }
- //
- // size:
- size_type BOOST_REGEX_CALL size()const
- {
- return (m_pimpl.get() ? m_pimpl->size() : 0);
- }
- //
- // max_size:
- size_type BOOST_REGEX_CALL max_size()const
- {
- return UINT_MAX;
- }
- //
- // empty:
- bool BOOST_REGEX_CALL empty()const
- {
- return (m_pimpl.get() ? 0 != m_pimpl->status() : true);
- }
-
- size_type BOOST_REGEX_CALL mark_count()const
- {
- return (m_pimpl.get() ? m_pimpl->mark_count() : 0);
- }
-
- int status()const
- {
- return (m_pimpl.get() ? m_pimpl->status() : regex_constants::error_empty);
- }
-
- int BOOST_REGEX_CALL compare(const basic_regex& that) const
- {
- if(m_pimpl.get() == that.m_pimpl.get())
- return 0;
- if(!m_pimpl.get())
- return -1;
- if(!that.m_pimpl.get())
- return 1;
- if(status() != that.status())
- return status() - that.status();
- if(flags() != that.flags())
- return flags() - that.flags();
- return str().compare(that.str());
- }
- bool BOOST_REGEX_CALL operator==(const basic_regex& e)const
- {
- return compare(e) == 0;
- }
- bool BOOST_REGEX_CALL operator != (const basic_regex& e)const
- {
- return compare(e) != 0;
- }
- bool BOOST_REGEX_CALL operator<(const basic_regex& e)const
- {
- return compare(e) < 0;
- }
- bool BOOST_REGEX_CALL operator>(const basic_regex& e)const
- {
- return compare(e) > 0;
- }
- bool BOOST_REGEX_CALL operator<=(const basic_regex& e)const
- {
- return compare(e) <= 0;
- }
- bool BOOST_REGEX_CALL operator>=(const basic_regex& e)const
- {
- return compare(e) >= 0;
- }
-
- //
- // The following are deprecated as public interfaces
- // but are available for compatibility with earlier versions.
- const charT* BOOST_REGEX_CALL expression()const
- {
- return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0);
- }
- unsigned int BOOST_REGEX_CALL set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
- {
- assign(p1, p2, f | regex_constants::no_except);
- return status();
- }
- unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal)
- {
- assign(p, f | regex_constants::no_except);
- return status();
- }
- unsigned int BOOST_REGEX_CALL error_code()const
- {
- return status();
- }
- //
- // private access methods:
- //
- const BOOST_REGEX_DETAIL_NS::re_syntax_base* get_first_state()const
- {
- BOOST_ASSERT(0 != m_pimpl.get());
- return m_pimpl->get_first_state();
- }
- unsigned get_restart_type()const
- {
- BOOST_ASSERT(0 != m_pimpl.get());
- return m_pimpl->get_restart_type();
- }
- const unsigned char* get_map()const
- {
- BOOST_ASSERT(0 != m_pimpl.get());
- return m_pimpl->get_map();
- }
- const ::boost::regex_traits_wrapper<traits>& get_traits()const
- {
- BOOST_ASSERT(0 != m_pimpl.get());
- return m_pimpl->get_traits();
- }
- bool can_be_null()const
- {
- BOOST_ASSERT(0 != m_pimpl.get());
- return m_pimpl->can_be_null();
- }
- const BOOST_REGEX_DETAIL_NS::regex_data<charT, traits>& get_data()const
- {
- BOOST_ASSERT(0 != m_pimpl.get());
- return m_pimpl->get_data();
- }
- boost::shared_ptr<BOOST_REGEX_DETAIL_NS::named_subexpressions > get_named_subs()const
- {
- return m_pimpl;
- }
-
-private:
- shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> > m_pimpl;
-};
-
-//
-// out of line members;
-// these are the only members that mutate the basic_regex object,
-// and are designed to provide the strong exception guarentee
-// (in the event of a throw, the state of the object remains unchanged).
-//
-template <class charT, class traits>
-basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p1,
- const charT* p2,
- flag_type f)
-{
- shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> > temp;
- if(!m_pimpl.get())
- {
- temp = shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> >(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>());
- }
- else
- {
- temp = shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> >(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits));
- }
- temp->assign(p1, p2, f);
- temp.swap(m_pimpl);
- return *this;
-}
-
-template <class charT, class traits>
-typename basic_regex<charT, traits>::locale_type BOOST_REGEX_CALL basic_regex<charT, traits>::imbue(locale_type l)
-{
- shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> > temp(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>());
- locale_type result = temp->imbue(l);
- temp.swap(m_pimpl);
- return result;
-}
-
-//
-// non-members:
-//
-template <class charT, class traits>
-void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2)
-{
- e1.swap(e2);
-}
-
-#ifndef BOOST_NO_STD_LOCALE
-template <class charT, class traits, class traits2>
-std::basic_ostream<charT, traits>&
- operator << (std::basic_ostream<charT, traits>& os,
- const basic_regex<charT, traits2>& e)
-{
- return (os << e.str());
-}
-#else
-template <class traits>
-std::ostream& operator << (std::ostream& os, const basic_regex<char, traits>& e)
-{
- return (os << e.str());
-}
-#endif
-
-//
-// class reg_expression:
-// this is provided for backwards compatibility only,
-// it is deprecated, no not use!
-//
-#ifdef BOOST_REGEX_NO_FWD
-template <class charT, class traits = regex_traits<charT> >
-#else
-template <class charT, class traits >
-#endif
-class reg_expression : public basic_regex<charT, traits>
-{
-public:
- typedef typename basic_regex<charT, traits>::flag_type flag_type;
- typedef typename basic_regex<charT, traits>::size_type size_type;
- explicit reg_expression(){}
- explicit reg_expression(const charT* p, flag_type f = regex_constants::normal)
- : basic_regex<charT, traits>(p, f){}
- reg_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
- : basic_regex<charT, traits>(p1, p2, f){}
- reg_expression(const charT* p, size_type len, flag_type f)
- : basic_regex<charT, traits>(p, len, f){}
- reg_expression(const reg_expression& that)
- : basic_regex<charT, traits>(that) {}
- ~reg_expression(){}
- reg_expression& BOOST_REGEX_CALL operator=(const reg_expression& that)
- {
- return this->assign(that);
- }
-
-#if !defined(BOOST_NO_MEMBER_TEMPLATES)
- template <class ST, class SA>
- explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
- : basic_regex<charT, traits>(p, f)
- {
- }
-
- template <class InputIterator>
- reg_expression(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal)
- : basic_regex<charT, traits>(arg_first, arg_last, f)
- {
- }
-
- template <class ST, class SA>
- reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
- {
- this->assign(p);
- return *this;
- }
-#else
- explicit reg_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
- : basic_regex<charT, traits>(p, f)
- {
- }
-
- reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
- {
- this->assign(p);
- return *this;
- }
-#endif
-
-};
-
-#ifdef BOOST_MSVC
-#pragma warning (pop)
-#endif
-
-} // namespace boost
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex_creator.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex_creator.hpp
deleted file mode 100644
index 623e06f1622..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex_creator.hpp
+++ /dev/null
@@ -1,1573 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE basic_regex_creator.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares template class basic_regex_creator which fills in
- * the data members of a regex_data object.
- */
-
-#ifndef BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP
-#define BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4800)
-#endif
-
-namespace boost{
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-template <class charT>
-struct digraph : public std::pair<charT, charT>
-{
- digraph() : std::pair<charT, charT>(charT(0), charT(0)){}
- digraph(charT c1) : std::pair<charT, charT>(c1, charT(0)){}
- digraph(charT c1, charT c2) : std::pair<charT, charT>(c1, c2)
- {}
- digraph(const digraph<charT>& d) : std::pair<charT, charT>(d.first, d.second){}
- template <class Seq>
- digraph(const Seq& s) : std::pair<charT, charT>()
- {
- BOOST_ASSERT(s.size() <= 2);
- BOOST_ASSERT(s.size());
- this->first = s[0];
- this->second = (s.size() > 1) ? s[1] : 0;
- }
-};
-
-template <class charT, class traits>
-class basic_char_set
-{
-public:
- typedef digraph<charT> digraph_type;
- typedef typename traits::string_type string_type;
- typedef typename traits::char_class_type m_type;
-
- basic_char_set()
- {
- m_negate = false;
- m_has_digraphs = false;
- m_classes = 0;
- m_negated_classes = 0;
- m_empty = true;
- }
-
- void add_single(const digraph_type& s)
- {
- m_singles.insert(s);
- if(s.second)
- m_has_digraphs = true;
- m_empty = false;
- }
- void add_range(const digraph_type& first, const digraph_type& end)
- {
- m_ranges.push_back(first);
- m_ranges.push_back(end);
- if(first.second)
- {
- m_has_digraphs = true;
- add_single(first);
- }
- if(end.second)
- {
- m_has_digraphs = true;
- add_single(end);
- }
- m_empty = false;
- }
- void add_class(m_type m)
- {
- m_classes |= m;
- m_empty = false;
- }
- void add_negated_class(m_type m)
- {
- m_negated_classes |= m;
- m_empty = false;
- }
- void add_equivalent(const digraph_type& s)
- {
- m_equivalents.insert(s);
- if(s.second)
- {
- m_has_digraphs = true;
- add_single(s);
- }
- m_empty = false;
- }
- void negate()
- {
- m_negate = true;
- //m_empty = false;
- }
-
- //
- // accessor functions:
- //
- bool has_digraphs()const
- {
- return m_has_digraphs;
- }
- bool is_negated()const
- {
- return m_negate;
- }
- typedef typename std::vector<digraph_type>::const_iterator list_iterator;
- typedef typename std::set<digraph_type>::const_iterator set_iterator;
- set_iterator singles_begin()const
- {
- return m_singles.begin();
- }
- set_iterator singles_end()const
- {
- return m_singles.end();
- }
- list_iterator ranges_begin()const
- {
- return m_ranges.begin();
- }
- list_iterator ranges_end()const
- {
- return m_ranges.end();
- }
- set_iterator equivalents_begin()const
- {
- return m_equivalents.begin();
- }
- set_iterator equivalents_end()const
- {
- return m_equivalents.end();
- }
- m_type classes()const
- {
- return m_classes;
- }
- m_type negated_classes()const
- {
- return m_negated_classes;
- }
- bool empty()const
- {
- return m_empty;
- }
-private:
- std::set<digraph_type> m_singles; // a list of single characters to match
- std::vector<digraph_type> m_ranges; // a list of end points of our ranges
- bool m_negate; // true if the set is to be negated
- bool m_has_digraphs; // true if we have digraphs present
- m_type m_classes; // character classes to match
- m_type m_negated_classes; // negated character classes to match
- bool m_empty; // whether we've added anything yet
- std::set<digraph_type> m_equivalents; // a list of equivalence classes
-};
-
-template <class charT, class traits>
-class basic_regex_creator
-{
-public:
- basic_regex_creator(regex_data<charT, traits>* data);
- std::ptrdiff_t getoffset(void* addr)
- {
- return getoffset(addr, m_pdata->m_data.data());
- }
- std::ptrdiff_t getoffset(const void* addr, const void* base)
- {
- return static_cast<const char*>(addr) - static_cast<const char*>(base);
- }
- re_syntax_base* getaddress(std::ptrdiff_t off)
- {
- return getaddress(off, m_pdata->m_data.data());
- }
- re_syntax_base* getaddress(std::ptrdiff_t off, void* base)
- {
- return static_cast<re_syntax_base*>(static_cast<void*>(static_cast<char*>(base) + off));
- }
- void init(unsigned l_flags)
- {
- m_pdata->m_flags = l_flags;
- m_icase = l_flags & regex_constants::icase;
- }
- regbase::flag_type flags()
- {
- return m_pdata->m_flags;
- }
- void flags(regbase::flag_type f)
- {
- m_pdata->m_flags = f;
- if(m_icase != static_cast<bool>(f & regbase::icase))
- {
- m_icase = static_cast<bool>(f & regbase::icase);
- }
- }
- re_syntax_base* append_state(syntax_element_type t, std::size_t s = sizeof(re_syntax_base));
- re_syntax_base* insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s = sizeof(re_syntax_base));
- re_literal* append_literal(charT c);
- re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set);
- re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set, mpl::false_*);
- re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set, mpl::true_*);
- void finalize(const charT* p1, const charT* p2);
-protected:
- regex_data<charT, traits>* m_pdata; // pointer to the basic_regex_data struct we are filling in
- const ::boost::regex_traits_wrapper<traits>&
- m_traits; // convenience reference to traits class
- re_syntax_base* m_last_state; // the last state we added
- bool m_icase; // true for case insensitive matches
- unsigned m_repeater_id; // the state_id of the next repeater
- bool m_has_backrefs; // true if there are actually any backrefs
- unsigned m_backrefs; // bitmask of permitted backrefs
- boost::uintmax_t m_bad_repeats; // bitmask of repeats we can't deduce a startmap for;
- bool m_has_recursions; // set when we have recursive expresisons to fixup
- std::vector<unsigned char> m_recursion_checks; // notes which recursions we've followed while analysing this expression
- typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character
- typename traits::char_class_type m_mask_space; // mask used to determine if a character is a word character
- typename traits::char_class_type m_lower_mask; // mask used to determine if a character is a lowercase character
- typename traits::char_class_type m_upper_mask; // mask used to determine if a character is an uppercase character
- typename traits::char_class_type m_alpha_mask; // mask used to determine if a character is an alphabetic character
-private:
- basic_regex_creator& operator=(const basic_regex_creator&);
- basic_regex_creator(const basic_regex_creator&);
-
- void fixup_pointers(re_syntax_base* state);
- void fixup_recursions(re_syntax_base* state);
- void create_startmaps(re_syntax_base* state);
- int calculate_backstep(re_syntax_base* state);
- void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask);
- unsigned get_restart_type(re_syntax_base* state);
- void set_all_masks(unsigned char* bits, unsigned char);
- bool is_bad_repeat(re_syntax_base* pt);
- void set_bad_repeat(re_syntax_base* pt);
- syntax_element_type get_repeat_type(re_syntax_base* state);
- void probe_leading_repeat(re_syntax_base* state);
-};
-
-template <class charT, class traits>
-basic_regex_creator<charT, traits>::basic_regex_creator(regex_data<charT, traits>* data)
- : m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0), m_has_recursions(false)
-{
- m_pdata->m_data.clear();
- m_pdata->m_status = ::boost::regex_constants::error_ok;
- static const charT w = 'w';
- static const charT s = 's';
- static const charT l[5] = { 'l', 'o', 'w', 'e', 'r', };
- static const charT u[5] = { 'u', 'p', 'p', 'e', 'r', };
- static const charT a[5] = { 'a', 'l', 'p', 'h', 'a', };
- m_word_mask = m_traits.lookup_classname(&w, &w +1);
- m_mask_space = m_traits.lookup_classname(&s, &s +1);
- m_lower_mask = m_traits.lookup_classname(l, l + 5);
- m_upper_mask = m_traits.lookup_classname(u, u + 5);
- m_alpha_mask = m_traits.lookup_classname(a, a + 5);
- m_pdata->m_word_mask = m_word_mask;
- BOOST_ASSERT(m_word_mask != 0);
- BOOST_ASSERT(m_mask_space != 0);
- BOOST_ASSERT(m_lower_mask != 0);
- BOOST_ASSERT(m_upper_mask != 0);
- BOOST_ASSERT(m_alpha_mask != 0);
-}
-
-template <class charT, class traits>
-re_syntax_base* basic_regex_creator<charT, traits>::append_state(syntax_element_type t, std::size_t s)
-{
- // if the state is a backref then make a note of it:
- if(t == syntax_element_backref)
- this->m_has_backrefs = true;
- // append a new state, start by aligning our last one:
- m_pdata->m_data.align();
- // set the offset to the next state in our last one:
- if(m_last_state)
- m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state);
- // now actually extent our data:
- m_last_state = static_cast<re_syntax_base*>(m_pdata->m_data.extend(s));
- // fill in boilerplate options in the new state:
- m_last_state->next.i = 0;
- m_last_state->type = t;
- return m_last_state;
-}
-
-template <class charT, class traits>
-re_syntax_base* basic_regex_creator<charT, traits>::insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s)
-{
- // append a new state, start by aligning our last one:
- m_pdata->m_data.align();
- // set the offset to the next state in our last one:
- if(m_last_state)
- m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state);
- // remember the last state position:
- std::ptrdiff_t off = getoffset(m_last_state) + s;
- // now actually insert our data:
- re_syntax_base* new_state = static_cast<re_syntax_base*>(m_pdata->m_data.insert(pos, s));
- // fill in boilerplate options in the new state:
- new_state->next.i = s;
- new_state->type = t;
- m_last_state = getaddress(off);
- return new_state;
-}
-
-template <class charT, class traits>
-re_literal* basic_regex_creator<charT, traits>::append_literal(charT c)
-{
- re_literal* result;
- // start by seeing if we have an existing re_literal we can extend:
- if((0 == m_last_state) || (m_last_state->type != syntax_element_literal))
- {
- // no existing re_literal, create a new one:
- result = static_cast<re_literal*>(append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT)));
- result->length = 1;
- *static_cast<charT*>(static_cast<void*>(result+1)) = m_traits.translate(c, m_icase);
- }
- else
- {
- // we have an existing re_literal, extend it:
- std::ptrdiff_t off = getoffset(m_last_state);
- m_pdata->m_data.extend(sizeof(charT));
- m_last_state = result = static_cast<re_literal*>(getaddress(off));
- charT* characters = static_cast<charT*>(static_cast<void*>(result+1));
- characters[result->length] = m_traits.translate(c, m_icase);
- result->length += 1;
- }
- return result;
-}
-
-template <class charT, class traits>
-inline re_syntax_base* basic_regex_creator<charT, traits>::append_set(
- const basic_char_set<charT, traits>& char_set)
-{
- typedef mpl::bool_< (sizeof(charT) == 1) > truth_type;
- return char_set.has_digraphs()
- ? append_set(char_set, static_cast<mpl::false_*>(0))
- : append_set(char_set, static_cast<truth_type*>(0));
-}
-
-template <class charT, class traits>
-re_syntax_base* basic_regex_creator<charT, traits>::append_set(
- const basic_char_set<charT, traits>& char_set, mpl::false_*)
-{
- typedef typename traits::string_type string_type;
- typedef typename basic_char_set<charT, traits>::list_iterator item_iterator;
- typedef typename basic_char_set<charT, traits>::set_iterator set_iterator;
- typedef typename traits::char_class_type m_type;
-
- re_set_long<m_type>* result = static_cast<re_set_long<m_type>*>(append_state(syntax_element_long_set, sizeof(re_set_long<m_type>)));
- //
- // fill in the basics:
- //
- result->csingles = static_cast<unsigned int>(::boost::BOOST_REGEX_DETAIL_NS::distance(char_set.singles_begin(), char_set.singles_end()));
- result->cranges = static_cast<unsigned int>(::boost::BOOST_REGEX_DETAIL_NS::distance(char_set.ranges_begin(), char_set.ranges_end())) / 2;
- result->cequivalents = static_cast<unsigned int>(::boost::BOOST_REGEX_DETAIL_NS::distance(char_set.equivalents_begin(), char_set.equivalents_end()));
- result->cclasses = char_set.classes();
- result->cnclasses = char_set.negated_classes();
- if(flags() & regbase::icase)
- {
- // adjust classes as needed:
- if(((result->cclasses & m_lower_mask) == m_lower_mask) || ((result->cclasses & m_upper_mask) == m_upper_mask))
- result->cclasses |= m_alpha_mask;
- if(((result->cnclasses & m_lower_mask) == m_lower_mask) || ((result->cnclasses & m_upper_mask) == m_upper_mask))
- result->cnclasses |= m_alpha_mask;
- }
-
- result->isnot = char_set.is_negated();
- result->singleton = !char_set.has_digraphs();
- //
- // remember where the state is for later:
- //
- std::ptrdiff_t offset = getoffset(result);
- //
- // now extend with all the singles:
- //
- item_iterator first, last;
- set_iterator sfirst, slast;
- sfirst = char_set.singles_begin();
- slast = char_set.singles_end();
- while(sfirst != slast)
- {
- charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (sfirst->first == static_cast<charT>(0) ? 1 : sfirst->second ? 3 : 2)));
- p[0] = m_traits.translate(sfirst->first, m_icase);
- if(sfirst->first == static_cast<charT>(0))
- {
- p[0] = 0;
- }
- else if(sfirst->second)
- {
- p[1] = m_traits.translate(sfirst->second, m_icase);
- p[2] = 0;
- }
- else
- p[1] = 0;
- ++sfirst;
- }
- //
- // now extend with all the ranges:
- //
- first = char_set.ranges_begin();
- last = char_set.ranges_end();
- while(first != last)
- {
- // first grab the endpoints of the range:
- digraph<charT> c1 = *first;
- c1.first = this->m_traits.translate(c1.first, this->m_icase);
- c1.second = this->m_traits.translate(c1.second, this->m_icase);
- ++first;
- digraph<charT> c2 = *first;
- c2.first = this->m_traits.translate(c2.first, this->m_icase);
- c2.second = this->m_traits.translate(c2.second, this->m_icase);
- ++first;
- string_type s1, s2;
- // different actions now depending upon whether collation is turned on:
- if(flags() & regex_constants::collate)
- {
- // we need to transform our range into sort keys:
- charT a1[3] = { c1.first, c1.second, charT(0), };
- charT a2[3] = { c2.first, c2.second, charT(0), };
- s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1));
- s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1));
- if(s1.size() == 0)
- s1 = string_type(1, charT(0));
- if(s2.size() == 0)
- s2 = string_type(1, charT(0));
- }
- else
- {
- if(c1.second)
- {
- s1.insert(s1.end(), c1.first);
- s1.insert(s1.end(), c1.second);
- }
- else
- s1 = string_type(1, c1.first);
- if(c2.second)
- {
- s2.insert(s2.end(), c2.first);
- s2.insert(s2.end(), c2.second);
- }
- else
- s2.insert(s2.end(), c2.first);
- }
- if(s1 > s2)
- {
- // Oops error:
- return 0;
- }
- charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (s1.size() + s2.size() + 2) ) );
- BOOST_REGEX_DETAIL_NS::copy(s1.begin(), s1.end(), p);
- p[s1.size()] = charT(0);
- p += s1.size() + 1;
- BOOST_REGEX_DETAIL_NS::copy(s2.begin(), s2.end(), p);
- p[s2.size()] = charT(0);
- }
- //
- // now process the equivalence classes:
- //
- sfirst = char_set.equivalents_begin();
- slast = char_set.equivalents_end();
- while(sfirst != slast)
- {
- string_type s;
- if(sfirst->second)
- {
- charT cs[3] = { sfirst->first, sfirst->second, charT(0), };
- s = m_traits.transform_primary(cs, cs+2);
- }
- else
- s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1);
- if(s.empty())
- return 0; // invalid or unsupported equivalence class
- charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (s.size()+1) ) );
- BOOST_REGEX_DETAIL_NS::copy(s.begin(), s.end(), p);
- p[s.size()] = charT(0);
- ++sfirst;
- }
- //
- // finally reset the address of our last state:
- //
- m_last_state = result = static_cast<re_set_long<m_type>*>(getaddress(offset));
- return result;
-}
-
-template<class T>
-inline bool char_less(T t1, T t2)
-{
- return t1 < t2;
-}
-inline bool char_less(char t1, char t2)
-{
- return static_cast<unsigned char>(t1) < static_cast<unsigned char>(t2);
-}
-inline bool char_less(signed char t1, signed char t2)
-{
- return static_cast<unsigned char>(t1) < static_cast<unsigned char>(t2);
-}
-
-template <class charT, class traits>
-re_syntax_base* basic_regex_creator<charT, traits>::append_set(
- const basic_char_set<charT, traits>& char_set, mpl::true_*)
-{
- typedef typename traits::string_type string_type;
- typedef typename basic_char_set<charT, traits>::list_iterator item_iterator;
- typedef typename basic_char_set<charT, traits>::set_iterator set_iterator;
-
- re_set* result = static_cast<re_set*>(append_state(syntax_element_set, sizeof(re_set)));
- bool negate = char_set.is_negated();
- std::memset(result->_map, 0, sizeof(result->_map));
- //
- // handle singles first:
- //
- item_iterator first, last;
- set_iterator sfirst, slast;
- sfirst = char_set.singles_begin();
- slast = char_set.singles_end();
- while(sfirst != slast)
- {
- for(unsigned int i = 0; i < (1 << CHAR_BIT); ++i)
- {
- if(this->m_traits.translate(static_cast<charT>(i), this->m_icase)
- == this->m_traits.translate(sfirst->first, this->m_icase))
- result->_map[i] = true;
- }
- ++sfirst;
- }
- //
- // OK now handle ranges:
- //
- first = char_set.ranges_begin();
- last = char_set.ranges_end();
- while(first != last)
- {
- // first grab the endpoints of the range:
- charT c1 = this->m_traits.translate(first->first, this->m_icase);
- ++first;
- charT c2 = this->m_traits.translate(first->first, this->m_icase);
- ++first;
- // different actions now depending upon whether collation is turned on:
- if(flags() & regex_constants::collate)
- {
- // we need to transform our range into sort keys:
- charT c3[2] = { c1, charT(0), };
- string_type s1 = this->m_traits.transform(c3, c3+1);
- c3[0] = c2;
- string_type s2 = this->m_traits.transform(c3, c3+1);
- if(s1 > s2)
- {
- // Oops error:
- return 0;
- }
- BOOST_ASSERT(c3[1] == charT(0));
- for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
- {
- c3[0] = static_cast<charT>(i);
- string_type s3 = this->m_traits.transform(c3, c3 +1);
- if((s1 <= s3) && (s3 <= s2))
- result->_map[i] = true;
- }
- }
- else
- {
- if(char_less(c2, c1))
- {
- // Oops error:
- return 0;
- }
- // everything in range matches:
- std::memset(result->_map + static_cast<unsigned char>(c1), true, 1 + static_cast<unsigned char>(c2) - static_cast<unsigned char>(c1));
- }
- }
- //
- // and now the classes:
- //
- typedef typename traits::char_class_type m_type;
- m_type m = char_set.classes();
- if(flags() & regbase::icase)
- {
- // adjust m as needed:
- if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask))
- m |= m_alpha_mask;
- }
- if(m != 0)
- {
- for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
- {
- if(this->m_traits.isctype(static_cast<charT>(i), m))
- result->_map[i] = true;
- }
- }
- //
- // and now the negated classes:
- //
- m = char_set.negated_classes();
- if(flags() & regbase::icase)
- {
- // adjust m as needed:
- if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask))
- m |= m_alpha_mask;
- }
- if(m != 0)
- {
- for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
- {
- if(0 == this->m_traits.isctype(static_cast<charT>(i), m))
- result->_map[i] = true;
- }
- }
- //
- // now process the equivalence classes:
- //
- sfirst = char_set.equivalents_begin();
- slast = char_set.equivalents_end();
- while(sfirst != slast)
- {
- string_type s;
- BOOST_ASSERT(static_cast<charT>(0) == sfirst->second);
- s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1);
- if(s.empty())
- return 0; // invalid or unsupported equivalence class
- for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
- {
- charT c[2] = { (static_cast<charT>(i)), charT(0), };
- string_type s2 = this->m_traits.transform_primary(c, c+1);
- if(s == s2)
- result->_map[i] = true;
- }
- ++sfirst;
- }
- if(negate)
- {
- for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
- {
- result->_map[i] = !(result->_map[i]);
- }
- }
- return result;
-}
-
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::finalize(const charT* p1, const charT* p2)
-{
- if(this->m_pdata->m_status)
- return;
- // we've added all the states we need, now finish things off.
- // start by adding a terminating state:
- append_state(syntax_element_match);
- // extend storage to store original expression:
- std::ptrdiff_t len = p2 - p1;
- m_pdata->m_expression_len = len;
- charT* ps = static_cast<charT*>(m_pdata->m_data.extend(sizeof(charT) * (1 + (p2 - p1))));
- m_pdata->m_expression = ps;
- BOOST_REGEX_DETAIL_NS::copy(p1, p2, ps);
- ps[p2 - p1] = 0;
- // fill in our other data...
- // successful parsing implies a zero status:
- m_pdata->m_status = 0;
- // get the first state of the machine:
- m_pdata->m_first_state = static_cast<re_syntax_base*>(m_pdata->m_data.data());
- // fixup pointers in the machine:
- fixup_pointers(m_pdata->m_first_state);
- if(m_has_recursions)
- {
- m_pdata->m_has_recursions = true;
- fixup_recursions(m_pdata->m_first_state);
- if(this->m_pdata->m_status)
- return;
- }
- else
- m_pdata->m_has_recursions = false;
- // create nested startmaps:
- create_startmaps(m_pdata->m_first_state);
- // create main startmap:
- std::memset(m_pdata->m_startmap, 0, sizeof(m_pdata->m_startmap));
- m_pdata->m_can_be_null = 0;
-
- m_bad_repeats = 0;
- if(m_has_recursions)
- m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
- create_startmap(m_pdata->m_first_state, m_pdata->m_startmap, &(m_pdata->m_can_be_null), mask_all);
- // get the restart type:
- m_pdata->m_restart_type = get_restart_type(m_pdata->m_first_state);
- // optimise a leading repeat if there is one:
- probe_leading_repeat(m_pdata->m_first_state);
-}
-
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::fixup_pointers(re_syntax_base* state)
-{
- while(state)
- {
- switch(state->type)
- {
- case syntax_element_recurse:
- m_has_recursions = true;
- if(state->next.i)
- state->next.p = getaddress(state->next.i, state);
- else
- state->next.p = 0;
- break;
- case syntax_element_rep:
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_long_set_rep:
- // set the state_id of this repeat:
- static_cast<re_repeat*>(state)->state_id = m_repeater_id++;
- BOOST_FALLTHROUGH;
- case syntax_element_alt:
- std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map));
- static_cast<re_alt*>(state)->can_be_null = 0;
- BOOST_FALLTHROUGH;
- case syntax_element_jump:
- static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state);
- BOOST_FALLTHROUGH;
- default:
- if(state->next.i)
- state->next.p = getaddress(state->next.i, state);
- else
- state->next.p = 0;
- }
- state = state->next.p;
- }
-}
-
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
-{
- re_syntax_base* base = state;
- while(state)
- {
- switch(state->type)
- {
- case syntax_element_assert_backref:
- {
- // just check that the index is valid:
- int idx = static_cast<const re_brace*>(state)->index;
- if(idx < 0)
- {
- idx = -idx-1;
- if(idx >= 10000)
- {
- idx = m_pdata->get_id(idx);
- if(idx <= 0)
- {
- // check of sub-expression that doesn't exist:
- if(0 == this->m_pdata->m_status) // update the error code if not already set
- this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
- //
- // clear the expression, we should be empty:
- //
- this->m_pdata->m_expression = 0;
- this->m_pdata->m_expression_len = 0;
- //
- // and throw if required:
- //
- if(0 == (this->flags() & regex_constants::no_except))
- {
- std::string message = "Encountered a forward reference to a marked sub-expression that does not exist.";
- boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
- e.raise();
- }
- }
- }
- }
- }
- break;
- case syntax_element_recurse:
- {
- bool ok = false;
- re_syntax_base* p = base;
- std::ptrdiff_t idx = static_cast<re_jump*>(state)->alt.i;
- if(idx > 10000)
- {
- //
- // There may be more than one capture group with this hash, just do what Perl
- // does and recurse to the leftmost:
- //
- idx = m_pdata->get_id(static_cast<int>(idx));
- }
- if(idx < 0)
- {
- ok = false;
- }
- else
- {
- while(p)
- {
- if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == idx))
- {
- //
- // We've found the target of the recursion, set the jump target:
- //
- static_cast<re_jump*>(state)->alt.p = p;
- ok = true;
- //
- // Now scan the target for nested repeats:
- //
- p = p->next.p;
- int next_rep_id = 0;
- while(p)
- {
- switch(p->type)
- {
- case syntax_element_rep:
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_long_set_rep:
- next_rep_id = static_cast<re_repeat*>(p)->state_id;
- break;
- case syntax_element_endmark:
- if(static_cast<const re_brace*>(p)->index == idx)
- next_rep_id = -1;
- break;
- default:
- break;
- }
- if(next_rep_id)
- break;
- p = p->next.p;
- }
- if(next_rep_id > 0)
- {
- static_cast<re_recurse*>(state)->state_id = next_rep_id - 1;
- }
-
- break;
- }
- p = p->next.p;
- }
- }
- if(!ok)
- {
- // recursion to sub-expression that doesn't exist:
- if(0 == this->m_pdata->m_status) // update the error code if not already set
- this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
- //
- // clear the expression, we should be empty:
- //
- this->m_pdata->m_expression = 0;
- this->m_pdata->m_expression_len = 0;
- //
- // and throw if required:
- //
- if(0 == (this->flags() & regex_constants::no_except))
- {
- std::string message = "Encountered a forward reference to a recursive sub-expression that does not exist.";
- boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
- e.raise();
- }
- }
- }
- break;
- default:
- break;
- }
- state = state->next.p;
- }
-}
-
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
-{
- // non-recursive implementation:
- // create the last map in the machine first, so that earlier maps
- // can make use of the result...
- //
- // This was originally a recursive implementation, but that caused stack
- // overflows with complex expressions on small stacks (think COM+).
-
- // start by saving the case setting:
- bool l_icase = m_icase;
- std::vector<std::pair<bool, re_syntax_base*> > v;
-
- while(state)
- {
- switch(state->type)
- {
- case syntax_element_toggle_case:
- // we need to track case changes here:
- m_icase = static_cast<re_case*>(state)->icase;
- state = state->next.p;
- continue;
- case syntax_element_alt:
- case syntax_element_rep:
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_long_set_rep:
- // just push the state onto our stack for now:
- v.push_back(std::pair<bool, re_syntax_base*>(m_icase, state));
- state = state->next.p;
- break;
- case syntax_element_backstep:
- // we need to calculate how big the backstep is:
- static_cast<re_brace*>(state)->index
- = this->calculate_backstep(state->next.p);
- if(static_cast<re_brace*>(state)->index < 0)
- {
- // Oops error:
- if(0 == this->m_pdata->m_status) // update the error code if not already set
- this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
- //
- // clear the expression, we should be empty:
- //
- this->m_pdata->m_expression = 0;
- this->m_pdata->m_expression_len = 0;
- //
- // and throw if required:
- //
- if(0 == (this->flags() & regex_constants::no_except))
- {
- std::string message = "Invalid lookbehind assertion encountered in the regular expression.";
- boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
- e.raise();
- }
- }
- BOOST_FALLTHROUGH;
- default:
- state = state->next.p;
- }
- }
-
- // now work through our list, building all the maps as we go:
- while(v.size())
- {
- // Initialize m_recursion_checks if we need it:
- if(m_has_recursions)
- m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
-
- const std::pair<bool, re_syntax_base*>& p = v.back();
- m_icase = p.first;
- state = p.second;
- v.pop_back();
-
- // Build maps:
- m_bad_repeats = 0;
- create_startmap(state->next.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_take);
- m_bad_repeats = 0;
-
- if(m_has_recursions)
- m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
- create_startmap(static_cast<re_alt*>(state)->alt.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_skip);
- // adjust the type of the state to allow for faster matching:
- state->type = this->get_repeat_type(state);
- }
- // restore case sensitivity:
- m_icase = l_icase;
-}
-
-template <class charT, class traits>
-int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state)
-{
- typedef typename traits::char_class_type m_type;
- int result = 0;
- while(state)
- {
- switch(state->type)
- {
- case syntax_element_startmark:
- if((static_cast<re_brace*>(state)->index == -1)
- || (static_cast<re_brace*>(state)->index == -2))
- {
- state = static_cast<re_jump*>(state->next.p)->alt.p->next.p;
- continue;
- }
- else if(static_cast<re_brace*>(state)->index == -3)
- {
- state = state->next.p->next.p;
- continue;
- }
- break;
- case syntax_element_endmark:
- if((static_cast<re_brace*>(state)->index == -1)
- || (static_cast<re_brace*>(state)->index == -2))
- return result;
- break;
- case syntax_element_literal:
- result += static_cast<re_literal*>(state)->length;
- break;
- case syntax_element_wild:
- case syntax_element_set:
- result += 1;
- break;
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_backref:
- case syntax_element_rep:
- case syntax_element_combining:
- case syntax_element_long_set_rep:
- case syntax_element_backstep:
- {
- re_repeat* rep = static_cast<re_repeat *>(state);
- // adjust the type of the state to allow for faster matching:
- state->type = this->get_repeat_type(state);
- if((state->type == syntax_element_dot_rep)
- || (state->type == syntax_element_char_rep)
- || (state->type == syntax_element_short_set_rep))
- {
- if(rep->max != rep->min)
- return -1;
- result += static_cast<int>(rep->min);
- state = rep->alt.p;
- continue;
- }
- else if(state->type == syntax_element_long_set_rep)
- {
- BOOST_ASSERT(rep->next.p->type == syntax_element_long_set);
- if(static_cast<re_set_long<m_type>*>(rep->next.p)->singleton == 0)
- return -1;
- if(rep->max != rep->min)
- return -1;
- result += static_cast<int>(rep->min);
- state = rep->alt.p;
- continue;
- }
- }
- return -1;
- case syntax_element_long_set:
- if(static_cast<re_set_long<m_type>*>(state)->singleton == 0)
- return -1;
- result += 1;
- break;
- case syntax_element_jump:
- state = static_cast<re_jump*>(state)->alt.p;
- continue;
- case syntax_element_alt:
- {
- int r1 = calculate_backstep(state->next.p);
- int r2 = calculate_backstep(static_cast<re_alt*>(state)->alt.p);
- if((r1 < 0) || (r1 != r2))
- return -1;
- return result + r1;
- }
- default:
- break;
- }
- state = state->next.p;
- }
- return -1;
-}
-
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask)
-{
- int not_last_jump = 1;
- re_syntax_base* recursion_start = 0;
- int recursion_sub = 0;
- re_syntax_base* recursion_restart = 0;
-
- // track case sensitivity:
- bool l_icase = m_icase;
-
- while(state)
- {
- switch(state->type)
- {
- case syntax_element_toggle_case:
- l_icase = static_cast<re_case*>(state)->icase;
- state = state->next.p;
- break;
- case syntax_element_literal:
- {
- // don't set anything in *pnull, set each element in l_map
- // that could match the first character in the literal:
- if(l_map)
- {
- l_map[0] |= mask_init;
- charT first_char = *static_cast<charT*>(static_cast<void*>(static_cast<re_literal*>(state) + 1));
- for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
- {
- if(m_traits.translate(static_cast<charT>(i), l_icase) == first_char)
- l_map[i] |= mask;
- }
- }
- return;
- }
- case syntax_element_end_line:
- {
- // next character must be a line separator (if there is one):
- if(l_map)
- {
- l_map[0] |= mask_init;
- l_map[static_cast<unsigned>('\n')] |= mask;
- l_map[static_cast<unsigned>('\r')] |= mask;
- l_map[static_cast<unsigned>('\f')] |= mask;
- l_map[0x85] |= mask;
- }
- // now figure out if we can match a NULL string at this point:
- if(pnull)
- create_startmap(state->next.p, 0, pnull, mask);
- return;
- }
- case syntax_element_recurse:
- {
- BOOST_ASSERT(static_cast<const re_jump*>(state)->alt.p->type == syntax_element_startmark);
- recursion_sub = static_cast<re_brace*>(static_cast<const re_jump*>(state)->alt.p)->index;
- if(m_recursion_checks[recursion_sub] & 1u)
- {
- // Infinite recursion!!
- if(0 == this->m_pdata->m_status) // update the error code if not already set
- this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
- //
- // clear the expression, we should be empty:
- //
- this->m_pdata->m_expression = 0;
- this->m_pdata->m_expression_len = 0;
- //
- // and throw if required:
- //
- if(0 == (this->flags() & regex_constants::no_except))
- {
- std::string message = "Encountered an infinite recursion.";
- boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
- e.raise();
- }
- }
- else if(recursion_start == 0)
- {
- recursion_start = state;
- recursion_restart = state->next.p;
- state = static_cast<re_jump*>(state)->alt.p;
- m_recursion_checks[recursion_sub] |= 1u;
- break;
- }
- m_recursion_checks[recursion_sub] |= 1u;
- // can't handle nested recursion here...
- BOOST_FALLTHROUGH;
- }
- case syntax_element_backref:
- // can be null, and any character can match:
- if(pnull)
- *pnull |= mask;
- BOOST_FALLTHROUGH;
- case syntax_element_wild:
- {
- // can't be null, any character can match:
- set_all_masks(l_map, mask);
- return;
- }
- case syntax_element_accept:
- case syntax_element_match:
- {
- // must be null, any character can match:
- set_all_masks(l_map, mask);
- if(pnull)
- *pnull |= mask;
- return;
- }
- case syntax_element_word_start:
- {
- // recurse, then AND with all the word characters:
- create_startmap(state->next.p, l_map, pnull, mask);
- if(l_map)
- {
- l_map[0] |= mask_init;
- for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
- {
- if(!m_traits.isctype(static_cast<charT>(i), m_word_mask))
- l_map[i] &= static_cast<unsigned char>(~mask);
- }
- }
- return;
- }
- case syntax_element_word_end:
- {
- // recurse, then AND with all the word characters:
- create_startmap(state->next.p, l_map, pnull, mask);
- if(l_map)
- {
- l_map[0] |= mask_init;
- for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
- {
- if(m_traits.isctype(static_cast<charT>(i), m_word_mask))
- l_map[i] &= static_cast<unsigned char>(~mask);
- }
- }
- return;
- }
- case syntax_element_buffer_end:
- {
- // we *must be null* :
- if(pnull)
- *pnull |= mask;
- return;
- }
- case syntax_element_long_set:
- if(l_map)
- {
- typedef typename traits::char_class_type m_type;
- if(static_cast<re_set_long<m_type>*>(state)->singleton)
- {
- l_map[0] |= mask_init;
- for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
- {
- charT c = static_cast<charT>(i);
- if(&c != re_is_set_member(&c, &c + 1, static_cast<re_set_long<m_type>*>(state), *m_pdata, l_icase))
- l_map[i] |= mask;
- }
- }
- else
- set_all_masks(l_map, mask);
- }
- return;
- case syntax_element_set:
- if(l_map)
- {
- l_map[0] |= mask_init;
- for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
- {
- if(static_cast<re_set*>(state)->_map[
- static_cast<unsigned char>(m_traits.translate(static_cast<charT>(i), l_icase))])
- l_map[i] |= mask;
- }
- }
- return;
- case syntax_element_jump:
- // take the jump:
- state = static_cast<re_alt*>(state)->alt.p;
- not_last_jump = -1;
- break;
- case syntax_element_alt:
- case syntax_element_rep:
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_long_set_rep:
- {
- re_alt* rep = static_cast<re_alt*>(state);
- if(rep->_map[0] & mask_init)
- {
- if(l_map)
- {
- // copy previous results:
- l_map[0] |= mask_init;
- for(unsigned int i = 0; i <= UCHAR_MAX; ++i)
- {
- if(rep->_map[i] & mask_any)
- l_map[i] |= mask;
- }
- }
- if(pnull)
- {
- if(rep->can_be_null & mask_any)
- *pnull |= mask;
- }
- }
- else
- {
- // we haven't created a startmap for this alternative yet
- // so take the union of the two options:
- if(is_bad_repeat(state))
- {
- set_all_masks(l_map, mask);
- if(pnull)
- *pnull |= mask;
- return;
- }
- set_bad_repeat(state);
- create_startmap(state->next.p, l_map, pnull, mask);
- if((state->type == syntax_element_alt)
- || (static_cast<re_repeat*>(state)->min == 0)
- || (not_last_jump == 0))
- create_startmap(rep->alt.p, l_map, pnull, mask);
- }
- }
- return;
- case syntax_element_soft_buffer_end:
- // match newline or null:
- if(l_map)
- {
- l_map[0] |= mask_init;
- l_map[static_cast<unsigned>('\n')] |= mask;
- l_map[static_cast<unsigned>('\r')] |= mask;
- }
- if(pnull)
- *pnull |= mask;
- return;
- case syntax_element_endmark:
- // need to handle independent subs as a special case:
- if(static_cast<re_brace*>(state)->index < 0)
- {
- // can be null, any character can match:
- set_all_masks(l_map, mask);
- if(pnull)
- *pnull |= mask;
- return;
- }
- else if(recursion_start && (recursion_sub != 0) && (recursion_sub == static_cast<re_brace*>(state)->index))
- {
- // recursion termination:
- recursion_start = 0;
- state = recursion_restart;
- break;
- }
-
- //
- // Normally we just go to the next state... but if this sub-expression is
- // the target of a recursion, then we might be ending a recursion, in which
- // case we should check whatever follows that recursion, as well as whatever
- // follows this state:
- //
- if(m_pdata->m_has_recursions && static_cast<re_brace*>(state)->index)
- {
- bool ok = false;
- re_syntax_base* p = m_pdata->m_first_state;
- while(p)
- {
- if(p->type == syntax_element_recurse)
- {
- re_brace* p2 = static_cast<re_brace*>(static_cast<re_jump*>(p)->alt.p);
- if((p2->type == syntax_element_startmark) && (p2->index == static_cast<re_brace*>(state)->index))
- {
- ok = true;
- break;
- }
- }
- p = p->next.p;
- }
- if(ok && ((m_recursion_checks[static_cast<re_brace*>(state)->index] & 2u) == 0))
- {
- m_recursion_checks[static_cast<re_brace*>(state)->index] |= 2u;
- create_startmap(p->next.p, l_map, pnull, mask);
- }
- }
- state = state->next.p;
- break;
-
- case syntax_element_commit:
- set_all_masks(l_map, mask);
- // Continue scanning so we can figure out whether we can be null:
- state = state->next.p;
- break;
- case syntax_element_startmark:
- // need to handle independent subs as a special case:
- if(static_cast<re_brace*>(state)->index == -3)
- {
- state = state->next.p->next.p;
- break;
- }
- BOOST_FALLTHROUGH;
- default:
- state = state->next.p;
- }
- ++not_last_jump;
- }
-}
-
-template <class charT, class traits>
-unsigned basic_regex_creator<charT, traits>::get_restart_type(re_syntax_base* state)
-{
- //
- // find out how the machine starts, so we can optimise the search:
- //
- while(state)
- {
- switch(state->type)
- {
- case syntax_element_startmark:
- case syntax_element_endmark:
- state = state->next.p;
- continue;
- case syntax_element_start_line:
- return regbase::restart_line;
- case syntax_element_word_start:
- return regbase::restart_word;
- case syntax_element_buffer_start:
- return regbase::restart_buf;
- case syntax_element_restart_continue:
- return regbase::restart_continue;
- default:
- state = 0;
- continue;
- }
- }
- return regbase::restart_any;
-}
-
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::set_all_masks(unsigned char* bits, unsigned char mask)
-{
- //
- // set mask in all of bits elements,
- // if bits[0] has mask_init not set then we can
- // optimise this to a call to memset:
- //
- if(bits)
- {
- if(bits[0] == 0)
- (std::memset)(bits, mask, 1u << CHAR_BIT);
- else
- {
- for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
- bits[i] |= mask;
- }
- bits[0] |= mask_init;
- }
-}
-
-template <class charT, class traits>
-bool basic_regex_creator<charT, traits>::is_bad_repeat(re_syntax_base* pt)
-{
- switch(pt->type)
- {
- case syntax_element_rep:
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_long_set_rep:
- {
- unsigned state_id = static_cast<re_repeat*>(pt)->state_id;
- if(state_id >= sizeof(m_bad_repeats) * CHAR_BIT)
- return true; // run out of bits, assume we can't traverse this one.
- static const boost::uintmax_t one = 1uL;
- return m_bad_repeats & (one << state_id);
- }
- default:
- return false;
- }
-}
-
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::set_bad_repeat(re_syntax_base* pt)
-{
- switch(pt->type)
- {
- case syntax_element_rep:
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_long_set_rep:
- {
- unsigned state_id = static_cast<re_repeat*>(pt)->state_id;
- static const boost::uintmax_t one = 1uL;
- if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT)
- m_bad_repeats |= (one << state_id);
- }
- break;
- default:
- break;
- }
-}
-
-template <class charT, class traits>
-syntax_element_type basic_regex_creator<charT, traits>::get_repeat_type(re_syntax_base* state)
-{
- typedef typename traits::char_class_type m_type;
- if(state->type == syntax_element_rep)
- {
- // check to see if we are repeating a single state:
- if(state->next.p->next.p->next.p == static_cast<re_alt*>(state)->alt.p)
- {
- switch(state->next.p->type)
- {
- case BOOST_REGEX_DETAIL_NS::syntax_element_wild:
- return BOOST_REGEX_DETAIL_NS::syntax_element_dot_rep;
- case BOOST_REGEX_DETAIL_NS::syntax_element_literal:
- return BOOST_REGEX_DETAIL_NS::syntax_element_char_rep;
- case BOOST_REGEX_DETAIL_NS::syntax_element_set:
- return BOOST_REGEX_DETAIL_NS::syntax_element_short_set_rep;
- case BOOST_REGEX_DETAIL_NS::syntax_element_long_set:
- if(static_cast<BOOST_REGEX_DETAIL_NS::re_set_long<m_type>*>(state->next.p)->singleton)
- return BOOST_REGEX_DETAIL_NS::syntax_element_long_set_rep;
- break;
- default:
- break;
- }
- }
- }
- return state->type;
-}
-
-template <class charT, class traits>
-void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* state)
-{
- // enumerate our states, and see if we have a leading repeat
- // for which failed search restarts can be optimised;
- do
- {
- switch(state->type)
- {
- case syntax_element_startmark:
- if(static_cast<re_brace*>(state)->index >= 0)
- {
- state = state->next.p;
- continue;
- }
- if((static_cast<re_brace*>(state)->index == -1)
- || (static_cast<re_brace*>(state)->index == -2))
- {
- // skip past the zero width assertion:
- state = static_cast<const re_jump*>(state->next.p)->alt.p->next.p;
- continue;
- }
- if(static_cast<re_brace*>(state)->index == -3)
- {
- // Have to skip the leading jump state:
- state = state->next.p->next.p;
- continue;
- }
- return;
- case syntax_element_endmark:
- case syntax_element_start_line:
- case syntax_element_end_line:
- case syntax_element_word_boundary:
- case syntax_element_within_word:
- case syntax_element_word_start:
- case syntax_element_word_end:
- case syntax_element_buffer_start:
- case syntax_element_buffer_end:
- case syntax_element_restart_continue:
- state = state->next.p;
- break;
- case syntax_element_dot_rep:
- case syntax_element_char_rep:
- case syntax_element_short_set_rep:
- case syntax_element_long_set_rep:
- if(this->m_has_backrefs == 0)
- static_cast<re_repeat*>(state)->leading = true;
- BOOST_FALLTHROUGH;
- default:
- return;
- }
- }while(state);
-}
-
-
-} // namespace BOOST_REGEX_DETAIL_NS
-
-} // namespace boost
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex_parser.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex_parser.hpp
deleted file mode 100644
index 7c2852fa510..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/basic_regex_parser.hpp
+++ /dev/null
@@ -1,3140 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE basic_regex_parser.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares template class basic_regex_parser.
- */
-
-#ifndef BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP
-#define BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-namespace boost{
-namespace BOOST_REGEX_DETAIL_NS{
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4244 4800)
-#endif
-
-inline boost::intmax_t umax(mpl::false_ const&)
-{
- // Get out clause here, just in case numeric_limits is unspecialized:
- return std::numeric_limits<boost::intmax_t>::is_specialized ? (std::numeric_limits<boost::intmax_t>::max)() : INT_MAX;
-}
-inline boost::intmax_t umax(mpl::true_ const&)
-{
- return (std::numeric_limits<std::size_t>::max)();
-}
-
-inline boost::intmax_t umax()
-{
- return umax(mpl::bool_<std::numeric_limits<boost::intmax_t>::digits >= std::numeric_limits<std::size_t>::digits>());
-}
-
-template <class charT, class traits>
-class basic_regex_parser : public basic_regex_creator<charT, traits>
-{
-public:
- basic_regex_parser(regex_data<charT, traits>* data);
- void parse(const charT* p1, const charT* p2, unsigned flags);
- void fail(regex_constants::error_type error_code, std::ptrdiff_t position);
- void fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos);
- void fail(regex_constants::error_type error_code, std::ptrdiff_t position, const std::string& message)
- {
- fail(error_code, position, message, position);
- }
-
- bool parse_all();
- bool parse_basic();
- bool parse_extended();
- bool parse_literal();
- bool parse_open_paren();
- bool parse_basic_escape();
- bool parse_extended_escape();
- bool parse_match_any();
- bool parse_repeat(std::size_t low = 0, std::size_t high = (std::numeric_limits<std::size_t>::max)());
- bool parse_repeat_range(bool isbasic);
- bool parse_alt();
- bool parse_set();
- bool parse_backref();
- void parse_set_literal(basic_char_set<charT, traits>& char_set);
- bool parse_inner_set(basic_char_set<charT, traits>& char_set);
- bool parse_QE();
- bool parse_perl_extension();
- bool parse_perl_verb();
- bool match_verb(const char*);
- bool add_emacs_code(bool negate);
- bool unwind_alts(std::ptrdiff_t last_paren_start);
- digraph<charT> get_next_set_literal(basic_char_set<charT, traits>& char_set);
- charT unescape_character();
- regex_constants::syntax_option_type parse_options();
-
-private:
- typedef bool (basic_regex_parser::*parser_proc_type)();
- typedef typename traits::string_type string_type;
- typedef typename traits::char_class_type char_class_type;
- parser_proc_type m_parser_proc; // the main parser to use
- const charT* m_base; // the start of the string being parsed
- const charT* m_end; // the end of the string being parsed
- const charT* m_position; // our current parser position
- unsigned m_mark_count; // how many sub-expressions we have
- int m_mark_reset; // used to indicate that we're inside a (?|...) block.
- unsigned m_max_mark; // largest mark count seen inside a (?|...) block.
- std::ptrdiff_t m_paren_start; // where the last seen ')' began (where repeats are inserted).
- std::ptrdiff_t m_alt_insert_point; // where to insert the next alternative
- bool m_has_case_change; // true if somewhere in the current block the case has changed
- unsigned m_recursion_count; // How many times we've called parse_all.
-#if defined(BOOST_MSVC) && defined(_M_IX86)
- // This is an ugly warning suppression workaround (for warnings *inside* std::vector
- // that can not otherwise be suppressed)...
- BOOST_STATIC_ASSERT(sizeof(long) >= sizeof(void*));
- std::vector<long> m_alt_jumps; // list of alternative in the current scope.
-#else
- std::vector<std::ptrdiff_t> m_alt_jumps; // list of alternative in the current scope.
-#endif
-
- basic_regex_parser& operator=(const basic_regex_parser&);
- basic_regex_parser(const basic_regex_parser&);
-};
-
-template <class charT, class traits>
-basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data)
- : basic_regex_creator<charT, traits>(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false), m_recursion_count(0)
-{
-}
-
-template <class charT, class traits>
-void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2, unsigned l_flags)
-{
- // pass l_flags on to base class:
- this->init(l_flags);
- // set up pointers:
- m_position = m_base = p1;
- m_end = p2;
- // empty strings are errors:
- if((p1 == p2) &&
- (
- ((l_flags & regbase::main_option_type) != regbase::perl_syntax_group)
- || (l_flags & regbase::no_empty_expressions)
- )
- )
- {
- fail(regex_constants::error_empty, 0);
- return;
- }
- // select which parser to use:
- switch(l_flags & regbase::main_option_type)
- {
- case regbase::perl_syntax_group:
- {
- m_parser_proc = &basic_regex_parser<charT, traits>::parse_extended;
- //
- // Add a leading paren with index zero to give recursions a target:
- //
- re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
- br->index = 0;
- br->icase = this->flags() & regbase::icase;
- break;
- }
- case regbase::basic_syntax_group:
- m_parser_proc = &basic_regex_parser<charT, traits>::parse_basic;
- break;
- case regbase::literal:
- m_parser_proc = &basic_regex_parser<charT, traits>::parse_literal;
- break;
- default:
- // Ooops, someone has managed to set more than one of the main option flags,
- // so this must be an error:
- fail(regex_constants::error_unknown, 0, "An invalid combination of regular expression syntax flags was used.");
- return;
- }
-
- // parse all our characters:
- bool result = parse_all();
- //
- // Unwind our alternatives:
- //
- unwind_alts(-1);
- // reset l_flags as a global scope (?imsx) may have altered them:
- this->flags(l_flags);
- // if we haven't gobbled up all the characters then we must
- // have had an unexpected ')' :
- if(!result)
- {
- fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_position), "Found a closing ) with no corresponding openening parenthesis.");
- return;
- }
- // if an error has been set then give up now:
- if(this->m_pdata->m_status)
- return;
- // fill in our sub-expression count:
- this->m_pdata->m_mark_count = 1 + m_mark_count;
- this->finalize(p1, p2);
-}
-
-template <class charT, class traits>
-void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position)
-{
- // get the error message:
- std::string message = this->m_pdata->m_ptraits->error_string(error_code);
- fail(error_code, position, message);
-}
-
-template <class charT, class traits>
-void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos)
-{
- if(0 == this->m_pdata->m_status) // update the error code if not already set
- this->m_pdata->m_status = error_code;
- m_position = m_end; // don't bother parsing anything else
-
-#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
- //
- // Augment error message with the regular expression text:
- //
- if(start_pos == position)
- start_pos = (std::max)(static_cast<std::ptrdiff_t>(0), position - static_cast<std::ptrdiff_t>(10));
- std::ptrdiff_t end_pos = (std::min)(position + static_cast<std::ptrdiff_t>(10), static_cast<std::ptrdiff_t>(m_end - m_base));
- if(error_code != regex_constants::error_empty)
- {
- if((start_pos != 0) || (end_pos != (m_end - m_base)))
- message += " The error occurred while parsing the regular expression fragment: '";
- else
- message += " The error occurred while parsing the regular expression: '";
- if(start_pos != end_pos)
- {
- message += std::string(m_base + start_pos, m_base + position);
- message += ">>>HERE>>>";
- message += std::string(m_base + position, m_base + end_pos);
- }
- message += "'.";
- }
-#endif
-
-#ifndef BOOST_NO_EXCEPTIONS
- if(0 == (this->flags() & regex_constants::no_except))
- {
- boost::regex_error e(message, error_code, position);
- e.raise();
- }
-#else
- (void)position; // suppress warnings.
-#endif
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_all()
-{
- if (++m_recursion_count > 400)
- {
- // exceeded internal limits
- fail(boost::regex_constants::error_complexity, m_position - m_base, "Exceeded nested brace limit.");
- }
- bool result = true;
- while(result && (m_position != m_end))
- {
- result = (this->*m_parser_proc)();
- }
- --m_recursion_count;
- return result;
-}
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4702)
-#endif
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_basic()
-{
- switch(this->m_traits.syntax_type(*m_position))
- {
- case regex_constants::syntax_escape:
- return parse_basic_escape();
- case regex_constants::syntax_dot:
- return parse_match_any();
- case regex_constants::syntax_caret:
- ++m_position;
- this->append_state(syntax_element_start_line);
- break;
- case regex_constants::syntax_dollar:
- ++m_position;
- this->append_state(syntax_element_end_line);
- break;
- case regex_constants::syntax_star:
- if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line))
- return parse_literal();
- else
- {
- ++m_position;
- return parse_repeat();
- }
- case regex_constants::syntax_plus:
- if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex))
- return parse_literal();
- else
- {
- ++m_position;
- return parse_repeat(1);
- }
- case regex_constants::syntax_question:
- if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex))
- return parse_literal();
- else
- {
- ++m_position;
- return parse_repeat(0, 1);
- }
- case regex_constants::syntax_open_set:
- return parse_set();
- case regex_constants::syntax_newline:
- if(this->flags() & regbase::newline_alt)
- return parse_alt();
- else
- return parse_literal();
- default:
- return parse_literal();
- }
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_extended()
-{
- bool result = true;
- switch(this->m_traits.syntax_type(*m_position))
- {
- case regex_constants::syntax_open_mark:
- return parse_open_paren();
- case regex_constants::syntax_close_mark:
- return false;
- case regex_constants::syntax_escape:
- return parse_extended_escape();
- case regex_constants::syntax_dot:
- return parse_match_any();
- case regex_constants::syntax_caret:
- ++m_position;
- this->append_state(
- (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_start : syntax_element_start_line));
- break;
- case regex_constants::syntax_dollar:
- ++m_position;
- this->append_state(
- (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_end : syntax_element_end_line));
- break;
- case regex_constants::syntax_star:
- if(m_position == this->m_base)
- {
- fail(regex_constants::error_badrepeat, 0, "The repeat operator \"*\" cannot start a regular expression.");
- return false;
- }
- ++m_position;
- return parse_repeat();
- case regex_constants::syntax_question:
- if(m_position == this->m_base)
- {
- fail(regex_constants::error_badrepeat, 0, "The repeat operator \"?\" cannot start a regular expression.");
- return false;
- }
- ++m_position;
- return parse_repeat(0,1);
- case regex_constants::syntax_plus:
- if(m_position == this->m_base)
- {
- fail(regex_constants::error_badrepeat, 0, "The repeat operator \"+\" cannot start a regular expression.");
- return false;
- }
- ++m_position;
- return parse_repeat(1);
- case regex_constants::syntax_open_brace:
- ++m_position;
- return parse_repeat_range(false);
- case regex_constants::syntax_close_brace:
- if((this->flags() & regbase::no_perl_ex) == regbase::no_perl_ex)
- {
- fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {.");
- return false;
- }
- result = parse_literal();
- break;
- case regex_constants::syntax_or:
- return parse_alt();
- case regex_constants::syntax_open_set:
- return parse_set();
- case regex_constants::syntax_newline:
- if(this->flags() & regbase::newline_alt)
- return parse_alt();
- else
- return parse_literal();
- case regex_constants::syntax_hash:
- //
- // If we have a mod_x flag set, then skip until
- // we get to a newline character:
- //
- if((this->flags()
- & (regbase::no_perl_ex|regbase::mod_x))
- == regbase::mod_x)
- {
- while((m_position != m_end) && !is_separator(*m_position++)){}
- return true;
- }
- BOOST_FALLTHROUGH;
- default:
- result = parse_literal();
- break;
- }
- return result;
-}
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_literal()
-{
- // append this as a literal provided it's not a space character
- // or the perl option regbase::mod_x is not set:
- if(
- ((this->flags()
- & (regbase::main_option_type|regbase::mod_x|regbase::no_perl_ex))
- != regbase::mod_x)
- || !this->m_traits.isctype(*m_position, this->m_mask_space))
- this->append_literal(*m_position);
- ++m_position;
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_open_paren()
-{
- //
- // skip the '(' and error check:
- //
- if(++m_position == m_end)
- {
- fail(regex_constants::error_paren, m_position - m_base);
- return false;
- }
- //
- // begin by checking for a perl-style (?...) extension:
- //
- if(
- ((this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) == 0)
- || ((this->flags() & (regbase::main_option_type | regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex))
- )
- {
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question)
- return parse_perl_extension();
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_star)
- return parse_perl_verb();
- }
- //
- // update our mark count, and append the required state:
- //
- unsigned markid = 0;
- if(0 == (this->flags() & regbase::nosubs))
- {
- markid = ++m_mark_count;
-#ifndef BOOST_NO_STD_DISTANCE
- if(this->flags() & regbase::save_subexpression_location)
- this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 1, 0));
-#else
- if(this->flags() & regbase::save_subexpression_location)
- this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 1, 0));
-#endif
- }
- re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
- pb->index = markid;
- pb->icase = this->flags() & regbase::icase;
- std::ptrdiff_t last_paren_start = this->getoffset(pb);
- // back up insertion point for alternations, and set new point:
- std::ptrdiff_t last_alt_point = m_alt_insert_point;
- this->m_pdata->m_data.align();
- m_alt_insert_point = this->m_pdata->m_data.size();
- //
- // back up the current flags in case we have a nested (?imsx) group:
- //
- regex_constants::syntax_option_type opts = this->flags();
- bool old_case_change = m_has_case_change;
- m_has_case_change = false; // no changes to this scope as yet...
- //
- // Back up branch reset data in case we have a nested (?|...)
- //
- int mark_reset = m_mark_reset;
- m_mark_reset = -1;
- //
- // now recursively add more states, this will terminate when we get to a
- // matching ')' :
- //
- parse_all();
- //
- // Unwind pushed alternatives:
- //
- if(0 == unwind_alts(last_paren_start))
- return false;
- //
- // restore flags:
- //
- if(m_has_case_change)
- {
- // the case has changed in one or more of the alternatives
- // within the scoped (...) block: we have to add a state
- // to reset the case sensitivity:
- static_cast<re_case*>(
- this->append_state(syntax_element_toggle_case, sizeof(re_case))
- )->icase = opts & regbase::icase;
- }
- this->flags(opts);
- m_has_case_change = old_case_change;
- //
- // restore branch reset:
- //
- m_mark_reset = mark_reset;
- //
- // we either have a ')' or we have run out of characters prematurely:
- //
- if(m_position == m_end)
- {
- this->fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_end));
- return false;
- }
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
- return false;
-#ifndef BOOST_NO_STD_DISTANCE
- if(markid && (this->flags() & regbase::save_subexpression_location))
- this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
-#else
- if(markid && (this->flags() & regbase::save_subexpression_location))
- this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base);
-#endif
- ++m_position;
- //
- // append closing parenthesis state:
- //
- pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
- pb->index = markid;
- pb->icase = this->flags() & regbase::icase;
- this->m_paren_start = last_paren_start;
- //
- // restore the alternate insertion point:
- //
- this->m_alt_insert_point = last_alt_point;
- //
- // allow backrefs to this mark:
- //
- if((markid > 0) && (markid < sizeof(unsigned) * CHAR_BIT))
- this->m_backrefs |= 1u << (markid - 1);
-
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_basic_escape()
-{
- if(++m_position == m_end)
- {
- fail(regex_constants::error_paren, m_position - m_base);
- return false;
- }
- bool result = true;
- switch(this->m_traits.escape_syntax_type(*m_position))
- {
- case regex_constants::syntax_open_mark:
- return parse_open_paren();
- case regex_constants::syntax_close_mark:
- return false;
- case regex_constants::syntax_plus:
- if(this->flags() & regex_constants::bk_plus_qm)
- {
- ++m_position;
- return parse_repeat(1);
- }
- else
- return parse_literal();
- case regex_constants::syntax_question:
- if(this->flags() & regex_constants::bk_plus_qm)
- {
- ++m_position;
- return parse_repeat(0, 1);
- }
- else
- return parse_literal();
- case regex_constants::syntax_open_brace:
- if(this->flags() & regbase::no_intervals)
- return parse_literal();
- ++m_position;
- return parse_repeat_range(true);
- case regex_constants::syntax_close_brace:
- if(this->flags() & regbase::no_intervals)
- return parse_literal();
- fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {.");
- return false;
- case regex_constants::syntax_or:
- if(this->flags() & regbase::bk_vbar)
- return parse_alt();
- else
- result = parse_literal();
- break;
- case regex_constants::syntax_digit:
- return parse_backref();
- case regex_constants::escape_type_start_buffer:
- if(this->flags() & regbase::emacs_ex)
- {
- ++m_position;
- this->append_state(syntax_element_buffer_start);
- }
- else
- result = parse_literal();
- break;
- case regex_constants::escape_type_end_buffer:
- if(this->flags() & regbase::emacs_ex)
- {
- ++m_position;
- this->append_state(syntax_element_buffer_end);
- }
- else
- result = parse_literal();
- break;
- case regex_constants::escape_type_word_assert:
- if(this->flags() & regbase::emacs_ex)
- {
- ++m_position;
- this->append_state(syntax_element_word_boundary);
- }
- else
- result = parse_literal();
- break;
- case regex_constants::escape_type_not_word_assert:
- if(this->flags() & regbase::emacs_ex)
- {
- ++m_position;
- this->append_state(syntax_element_within_word);
- }
- else
- result = parse_literal();
- break;
- case regex_constants::escape_type_left_word:
- if(this->flags() & regbase::emacs_ex)
- {
- ++m_position;
- this->append_state(syntax_element_word_start);
- }
- else
- result = parse_literal();
- break;
- case regex_constants::escape_type_right_word:
- if(this->flags() & regbase::emacs_ex)
- {
- ++m_position;
- this->append_state(syntax_element_word_end);
- }
- else
- result = parse_literal();
- break;
- default:
- if(this->flags() & regbase::emacs_ex)
- {
- bool negate = true;
- switch(*m_position)
- {
- case 'w':
- negate = false;
- BOOST_FALLTHROUGH;
- case 'W':
- {
- basic_char_set<charT, traits> char_set;
- if(negate)
- char_set.negate();
- char_set.add_class(this->m_word_mask);
- if(0 == this->append_set(char_set))
- {
- fail(regex_constants::error_ctype, m_position - m_base);
- return false;
- }
- ++m_position;
- return true;
- }
- case 's':
- negate = false;
- BOOST_FALLTHROUGH;
- case 'S':
- return add_emacs_code(negate);
- case 'c':
- case 'C':
- // not supported yet:
- fail(regex_constants::error_escape, m_position - m_base, "The \\c and \\C escape sequences are not supported by POSIX basic regular expressions: try the Perl syntax instead.");
- return false;
- default:
- break;
- }
- }
- result = parse_literal();
- break;
- }
- return result;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_extended_escape()
-{
- ++m_position;
- if(m_position == m_end)
- {
- fail(regex_constants::error_escape, m_position - m_base, "Incomplete escape sequence found.");
- return false;
- }
- bool negate = false; // in case this is a character class escape: \w \d etc
- switch(this->m_traits.escape_syntax_type(*m_position))
- {
- case regex_constants::escape_type_not_class:
- negate = true;
- BOOST_FALLTHROUGH;
- case regex_constants::escape_type_class:
- {
-escape_type_class_jump:
- typedef typename traits::char_class_type m_type;
- m_type m = this->m_traits.lookup_classname(m_position, m_position+1);
- if(m != 0)
- {
- basic_char_set<charT, traits> char_set;
- if(negate)
- char_set.negate();
- char_set.add_class(m);
- if(0 == this->append_set(char_set))
- {
- fail(regex_constants::error_ctype, m_position - m_base);
- return false;
- }
- ++m_position;
- return true;
- }
- //
- // not a class, just a regular unknown escape:
- //
- this->append_literal(unescape_character());
- break;
- }
- case regex_constants::syntax_digit:
- return parse_backref();
- case regex_constants::escape_type_left_word:
- ++m_position;
- this->append_state(syntax_element_word_start);
- break;
- case regex_constants::escape_type_right_word:
- ++m_position;
- this->append_state(syntax_element_word_end);
- break;
- case regex_constants::escape_type_start_buffer:
- ++m_position;
- this->append_state(syntax_element_buffer_start);
- break;
- case regex_constants::escape_type_end_buffer:
- ++m_position;
- this->append_state(syntax_element_buffer_end);
- break;
- case regex_constants::escape_type_word_assert:
- ++m_position;
- this->append_state(syntax_element_word_boundary);
- break;
- case regex_constants::escape_type_not_word_assert:
- ++m_position;
- this->append_state(syntax_element_within_word);
- break;
- case regex_constants::escape_type_Z:
- ++m_position;
- this->append_state(syntax_element_soft_buffer_end);
- break;
- case regex_constants::escape_type_Q:
- return parse_QE();
- case regex_constants::escape_type_C:
- return parse_match_any();
- case regex_constants::escape_type_X:
- ++m_position;
- this->append_state(syntax_element_combining);
- break;
- case regex_constants::escape_type_G:
- ++m_position;
- this->append_state(syntax_element_restart_continue);
- break;
- case regex_constants::escape_type_not_property:
- negate = true;
- BOOST_FALLTHROUGH;
- case regex_constants::escape_type_property:
- {
- ++m_position;
- char_class_type m;
- if(m_position == m_end)
- {
- fail(regex_constants::error_escape, m_position - m_base, "Incomplete property escape found.");
- return false;
- }
- // maybe have \p{ddd}
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
- {
- const charT* base = m_position;
- // skip forward until we find enclosing brace:
- while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
- ++m_position;
- if(m_position == m_end)
- {
- fail(regex_constants::error_escape, m_position - m_base, "Closing } missing from property escape sequence.");
- return false;
- }
- m = this->m_traits.lookup_classname(++base, m_position++);
- }
- else
- {
- m = this->m_traits.lookup_classname(m_position, m_position+1);
- ++m_position;
- }
- if(m != 0)
- {
- basic_char_set<charT, traits> char_set;
- if(negate)
- char_set.negate();
- char_set.add_class(m);
- if(0 == this->append_set(char_set))
- {
- fail(regex_constants::error_ctype, m_position - m_base);
- return false;
- }
- return true;
- }
- fail(regex_constants::error_ctype, m_position - m_base, "Escape sequence was neither a valid property nor a valid character class name.");
- return false;
- }
- case regex_constants::escape_type_reset_start_mark:
- if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
- {
- re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
- pb->index = -5;
- pb->icase = this->flags() & regbase::icase;
- this->m_pdata->m_data.align();
- ++m_position;
- return true;
- }
- goto escape_type_class_jump;
- case regex_constants::escape_type_line_ending:
- if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
- {
- const charT* e = get_escape_R_string<charT>();
- const charT* old_position = m_position;
- const charT* old_end = m_end;
- const charT* old_base = m_base;
- m_position = e;
- m_base = e;
- m_end = e + traits::length(e);
- bool r = parse_all();
- m_position = ++old_position;
- m_end = old_end;
- m_base = old_base;
- return r;
- }
- goto escape_type_class_jump;
- case regex_constants::escape_type_extended_backref:
- if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
- {
- bool have_brace = false;
- bool negative = false;
- static const char* incomplete_message = "Incomplete \\g escape found.";
- if(++m_position == m_end)
- {
- fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
- return false;
- }
- // maybe have \g{ddd}
- regex_constants::syntax_type syn = this->m_traits.syntax_type(*m_position);
- regex_constants::syntax_type syn_end = 0;
- if((syn == regex_constants::syntax_open_brace)
- || (syn == regex_constants::escape_type_left_word)
- || (syn == regex_constants::escape_type_end_buffer))
- {
- if(++m_position == m_end)
- {
- fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
- return false;
- }
- have_brace = true;
- switch(syn)
- {
- case regex_constants::syntax_open_brace:
- syn_end = regex_constants::syntax_close_brace;
- break;
- case regex_constants::escape_type_left_word:
- syn_end = regex_constants::escape_type_right_word;
- break;
- default:
- syn_end = regex_constants::escape_type_end_buffer;
- break;
- }
- }
- negative = (*m_position == static_cast<charT>('-'));
- if((negative) && (++m_position == m_end))
- {
- fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
- return false;
- }
- const charT* pc = m_position;
- boost::intmax_t i = this->m_traits.toi(pc, m_end, 10);
- if((i < 0) && syn_end)
- {
- // Check for a named capture, get the leftmost one if there is more than one:
- const charT* base = m_position;
- while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != syn_end))
- {
- ++m_position;
- }
- i = hash_value_from_capture_name(base, m_position);
- pc = m_position;
- }
- if(negative)
- i = 1 + m_mark_count - i;
- if(((i > 0) && (i < std::numeric_limits<unsigned>::digits) && (i - 1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (i-1)))) || ((i > 10000) && (this->m_pdata->get_id(i) > 0) && (this->m_pdata->get_id(i)-1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (this->m_pdata->get_id(i)-1)))))
- {
- m_position = pc;
- re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
- pb->index = i;
- pb->icase = this->flags() & regbase::icase;
- }
- else
- {
- fail(regex_constants::error_backref, m_position - m_base);
- return false;
- }
- m_position = pc;
- if(have_brace)
- {
- if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != syn_end))
- {
- fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
- return false;
- }
- ++m_position;
- }
- return true;
- }
- goto escape_type_class_jump;
- case regex_constants::escape_type_control_v:
- if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
- goto escape_type_class_jump;
- BOOST_FALLTHROUGH;
- default:
- this->append_literal(unescape_character());
- break;
- }
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_match_any()
-{
- //
- // we have a '.' that can match any character:
- //
- ++m_position;
- static_cast<re_dot*>(
- this->append_state(syntax_element_wild, sizeof(re_dot))
- )->mask = static_cast<unsigned char>(this->flags() & regbase::no_mod_s
- ? BOOST_REGEX_DETAIL_NS::force_not_newline
- : this->flags() & regbase::mod_s ?
- BOOST_REGEX_DETAIL_NS::force_newline : BOOST_REGEX_DETAIL_NS::dont_care);
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_t high)
-{
- bool greedy = true;
- bool pocessive = false;
- std::size_t insert_point;
- //
- // when we get to here we may have a non-greedy ? mark still to come:
- //
- if((m_position != m_end)
- && (
- (0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
- || ((regbase::basic_syntax_group|regbase::emacs_ex) == (this->flags() & (regbase::main_option_type | regbase::emacs_ex)))
- )
- )
- {
- // OK we have a perl or emacs regex, check for a '?':
- if ((this->flags() & (regbase::main_option_type | regbase::mod_x | regbase::no_perl_ex)) == regbase::mod_x)
- {
- // whitespace skip:
- while ((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
- ++m_position;
- }
- if((m_position != m_end) && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question))
- {
- greedy = false;
- ++m_position;
- }
- // for perl regexes only check for pocessive ++ repeats.
- if((m_position != m_end)
- && (0 == (this->flags() & regbase::main_option_type))
- && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
- {
- pocessive = true;
- ++m_position;
- }
- }
- if(0 == this->m_last_state)
- {
- fail(regex_constants::error_badrepeat, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_position), "Nothing to repeat.");
- return false;
- }
- if(this->m_last_state->type == syntax_element_endmark)
- {
- // insert a repeat before the '(' matching the last ')':
- insert_point = this->m_paren_start;
- }
- else if((this->m_last_state->type == syntax_element_literal) && (static_cast<re_literal*>(this->m_last_state)->length > 1))
- {
- // the last state was a literal with more than one character, split it in two:
- re_literal* lit = static_cast<re_literal*>(this->m_last_state);
- charT c = (static_cast<charT*>(static_cast<void*>(lit+1)))[lit->length - 1];
- lit->length -= 1;
- // now append new state:
- lit = static_cast<re_literal*>(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT)));
- lit->length = 1;
- (static_cast<charT*>(static_cast<void*>(lit+1)))[0] = c;
- insert_point = this->getoffset(this->m_last_state);
- }
- else
- {
- // repeat the last state whatever it was, need to add some error checking here:
- switch(this->m_last_state->type)
- {
- case syntax_element_start_line:
- case syntax_element_end_line:
- case syntax_element_word_boundary:
- case syntax_element_within_word:
- case syntax_element_word_start:
- case syntax_element_word_end:
- case syntax_element_buffer_start:
- case syntax_element_buffer_end:
- case syntax_element_alt:
- case syntax_element_soft_buffer_end:
- case syntax_element_restart_continue:
- case syntax_element_jump:
- case syntax_element_startmark:
- case syntax_element_backstep:
- // can't legally repeat any of the above:
- fail(regex_constants::error_badrepeat, m_position - m_base);
- return false;
- default:
- // do nothing...
- break;
- }
- insert_point = this->getoffset(this->m_last_state);
- }
- //
- // OK we now know what to repeat, so insert the repeat around it:
- //
- re_repeat* rep = static_cast<re_repeat*>(this->insert_state(insert_point, syntax_element_rep, re_repeater_size));
- rep->min = low;
- rep->max = high;
- rep->greedy = greedy;
- rep->leading = false;
- // store our repeater position for later:
- std::ptrdiff_t rep_off = this->getoffset(rep);
- // and append a back jump to the repeat:
- re_jump* jmp = static_cast<re_jump*>(this->append_state(syntax_element_jump, sizeof(re_jump)));
- jmp->alt.i = rep_off - this->getoffset(jmp);
- this->m_pdata->m_data.align();
- // now fill in the alt jump for the repeat:
- rep = static_cast<re_repeat*>(this->getaddress(rep_off));
- rep->alt.i = this->m_pdata->m_data.size() - rep_off;
- //
- // If the repeat is pocessive then bracket the repeat with a (?>...)
- // independent sub-expression construct:
- //
- if(pocessive)
- {
- if(m_position != m_end)
- {
- //
- // Check for illegal following quantifier, we have to do this here, because
- // the extra states we insert below circumvents our usual error checking :-(
- //
- bool contin = false;
- do
- {
- if ((this->flags() & (regbase::main_option_type | regbase::mod_x | regbase::no_perl_ex)) == regbase::mod_x)
- {
- // whitespace skip:
- while ((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
- ++m_position;
- }
- if (m_position != m_end)
- {
- switch (this->m_traits.syntax_type(*m_position))
- {
- case regex_constants::syntax_star:
- case regex_constants::syntax_plus:
- case regex_constants::syntax_question:
- case regex_constants::syntax_open_brace:
- fail(regex_constants::error_badrepeat, m_position - m_base);
- return false;
- case regex_constants::syntax_open_mark:
- // Do we have a comment? If so we need to skip it here...
- if ((m_position + 2 < m_end) && this->m_traits.syntax_type(*(m_position + 1)) == regex_constants::syntax_question
- && this->m_traits.syntax_type(*(m_position + 2)) == regex_constants::syntax_hash)
- {
- while ((m_position != m_end)
- && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark)) {
- }
- contin = true;
- }
- else
- contin = false;
- }
- }
- else
- contin = false;
- } while (contin);
- }
- re_brace* pb = static_cast<re_brace*>(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace)));
- pb->index = -3;
- pb->icase = this->flags() & regbase::icase;
- jmp = static_cast<re_jump*>(this->insert_state(insert_point + sizeof(re_brace), syntax_element_jump, sizeof(re_jump)));
- this->m_pdata->m_data.align();
- jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
- pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
- pb->index = -3;
- pb->icase = this->flags() & regbase::icase;
- }
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
-{
- static const char* incomplete_message = "Missing } in quantified repetition.";
- //
- // parse a repeat-range:
- //
- std::size_t min, max;
- boost::intmax_t v;
- // skip whitespace:
- while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
- ++m_position;
- if(this->m_position == this->m_end)
- {
- if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
- {
- fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
- return false;
- }
- // Treat the opening '{' as a literal character, rewind to start of error:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
- return parse_literal();
- }
- // get min:
- v = this->m_traits.toi(m_position, m_end, 10);
- // skip whitespace:
- if((v < 0) || (v > umax()))
- {
- if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
- {
- fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
- return false;
- }
- // Treat the opening '{' as a literal character, rewind to start of error:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
- return parse_literal();
- }
- while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
- ++m_position;
- if(this->m_position == this->m_end)
- {
- if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
- {
- fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
- return false;
- }
- // Treat the opening '{' as a literal character, rewind to start of error:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
- return parse_literal();
- }
- min = static_cast<std::size_t>(v);
- // see if we have a comma:
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_comma)
- {
- // move on and error check:
- ++m_position;
- // skip whitespace:
- while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
- ++m_position;
- if(this->m_position == this->m_end)
- {
- if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
- {
- fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
- return false;
- }
- // Treat the opening '{' as a literal character, rewind to start of error:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
- return parse_literal();
- }
- // get the value if any:
- v = this->m_traits.toi(m_position, m_end, 10);
- max = ((v >= 0) && (v < umax())) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
- }
- else
- {
- // no comma, max = min:
- max = min;
- }
- // skip whitespace:
- while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
- ++m_position;
- // OK now check trailing }:
- if(this->m_position == this->m_end)
- {
- if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
- {
- fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
- return false;
- }
- // Treat the opening '{' as a literal character, rewind to start of error:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
- return parse_literal();
- }
- if(isbasic)
- {
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_escape)
- {
- ++m_position;
- if(this->m_position == this->m_end)
- {
- fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
- return false;
- }
- }
- else
- {
- fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
- return false;
- }
- }
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_brace)
- ++m_position;
- else
- {
- // Treat the opening '{' as a literal character, rewind to start of error:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
- return parse_literal();
- }
- //
- // finally go and add the repeat, unless error:
- //
- if(min > max)
- {
- // Backtrack to error location:
- m_position -= 2;
- while(this->m_traits.isctype(*m_position, this->m_word_mask)) --m_position;
- ++m_position;
- fail(regex_constants::error_badbrace, m_position - m_base);
- return false;
- }
- return parse_repeat(min, max);
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_alt()
-{
- //
- // error check: if there have been no previous states,
- // or if the last state was a '(' then error:
- //
- if(
- ((this->m_last_state == 0) || (this->m_last_state->type == syntax_element_startmark))
- &&
- !(
- ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group)
- &&
- ((this->flags() & regbase::no_empty_expressions) == 0)
- )
- )
- {
- fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression cannot start with the alternation operator |.");
- return false;
- }
- //
- // Reset mark count if required:
- //
- if(m_max_mark < m_mark_count)
- m_max_mark = m_mark_count;
- if(m_mark_reset >= 0)
- m_mark_count = m_mark_reset;
-
- ++m_position;
- //
- // we need to append a trailing jump:
- //
- re_syntax_base* pj = this->append_state(BOOST_REGEX_DETAIL_NS::syntax_element_jump, sizeof(re_jump));
- std::ptrdiff_t jump_offset = this->getoffset(pj);
- //
- // now insert the alternative:
- //
- re_alt* palt = static_cast<re_alt*>(this->insert_state(this->m_alt_insert_point, syntax_element_alt, re_alt_size));
- jump_offset += re_alt_size;
- this->m_pdata->m_data.align();
- palt->alt.i = this->m_pdata->m_data.size() - this->getoffset(palt);
- //
- // update m_alt_insert_point so that the next alternate gets
- // inserted at the start of the second of the two we've just created:
- //
- this->m_alt_insert_point = this->m_pdata->m_data.size();
- //
- // the start of this alternative must have a case changes state
- // if the current block has messed around with case changes:
- //
- if(m_has_case_change)
- {
- static_cast<re_case*>(
- this->append_state(syntax_element_toggle_case, sizeof(re_case))
- )->icase = this->m_icase;
- }
- //
- // push the alternative onto our stack, a recursive
- // implementation here is easier to understand (and faster
- // as it happens), but causes all kinds of stack overflow problems
- // on programs with small stacks (COM+).
- //
- m_alt_jumps.push_back(jump_offset);
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_set()
-{
- static const char* incomplete_message = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
- ++m_position;
- if(m_position == m_end)
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- basic_char_set<charT, traits> char_set;
-
- const charT* base = m_position; // where the '[' was
- const charT* item_base = m_position; // where the '[' or '^' was
-
- while(m_position != m_end)
- {
- switch(this->m_traits.syntax_type(*m_position))
- {
- case regex_constants::syntax_caret:
- if(m_position == base)
- {
- char_set.negate();
- ++m_position;
- item_base = m_position;
- }
- else
- parse_set_literal(char_set);
- break;
- case regex_constants::syntax_close_set:
- if(m_position == item_base)
- {
- parse_set_literal(char_set);
- break;
- }
- else
- {
- ++m_position;
- if(0 == this->append_set(char_set))
- {
- fail(regex_constants::error_ctype, m_position - m_base);
- return false;
- }
- }
- return true;
- case regex_constants::syntax_open_set:
- if(parse_inner_set(char_set))
- break;
- return true;
- case regex_constants::syntax_escape:
- {
- //
- // look ahead and see if this is a character class shortcut
- // \d \w \s etc...
- //
- ++m_position;
- if(this->m_traits.escape_syntax_type(*m_position)
- == regex_constants::escape_type_class)
- {
- char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1);
- if(m != 0)
- {
- char_set.add_class(m);
- ++m_position;
- break;
- }
- }
- else if(this->m_traits.escape_syntax_type(*m_position)
- == regex_constants::escape_type_not_class)
- {
- // negated character class:
- char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1);
- if(m != 0)
- {
- char_set.add_negated_class(m);
- ++m_position;
- break;
- }
- }
- // not a character class, just a regular escape:
- --m_position;
- parse_set_literal(char_set);
- break;
- }
- default:
- parse_set_literal(char_set);
- break;
- }
- }
- return m_position != m_end;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, traits>& char_set)
-{
- static const char* incomplete_message = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
- //
- // we have either a character class [:name:]
- // a collating element [.name.]
- // or an equivalence class [=name=]
- //
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- switch(this->m_traits.syntax_type(*m_position))
- {
- case regex_constants::syntax_dot:
- //
- // a collating element is treated as a literal:
- //
- --m_position;
- parse_set_literal(char_set);
- return true;
- case regex_constants::syntax_colon:
- {
- // check that character classes are actually enabled:
- if((this->flags() & (regbase::main_option_type | regbase::no_char_classes))
- == (regbase::basic_syntax_group | regbase::no_char_classes))
- {
- --m_position;
- parse_set_literal(char_set);
- return true;
- }
- // skip the ':'
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- const charT* name_first = m_position;
- // skip at least one character, then find the matching ':]'
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- while((m_position != m_end)
- && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_colon))
- ++m_position;
- const charT* name_last = m_position;
- if(m_end == m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- if((m_end == ++m_position)
- || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- //
- // check for negated class:
- //
- bool negated = false;
- if(this->m_traits.syntax_type(*name_first) == regex_constants::syntax_caret)
- {
- ++name_first;
- negated = true;
- }
- typedef typename traits::char_class_type m_type;
- m_type m = this->m_traits.lookup_classname(name_first, name_last);
- if(m == 0)
- {
- if(char_set.empty() && (name_last - name_first == 1))
- {
- // maybe a special case:
- ++m_position;
- if( (m_position != m_end)
- && (this->m_traits.syntax_type(*m_position)
- == regex_constants::syntax_close_set))
- {
- if(this->m_traits.escape_syntax_type(*name_first)
- == regex_constants::escape_type_left_word)
- {
- ++m_position;
- this->append_state(syntax_element_word_start);
- return false;
- }
- if(this->m_traits.escape_syntax_type(*name_first)
- == regex_constants::escape_type_right_word)
- {
- ++m_position;
- this->append_state(syntax_element_word_end);
- return false;
- }
- }
- }
- fail(regex_constants::error_ctype, name_first - m_base);
- return false;
- }
- if(negated == false)
- char_set.add_class(m);
- else
- char_set.add_negated_class(m);
- ++m_position;
- break;
- }
- case regex_constants::syntax_equal:
- {
- // skip the '='
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- const charT* name_first = m_position;
- // skip at least one character, then find the matching '=]'
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- while((m_position != m_end)
- && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal))
- ++m_position;
- const charT* name_last = m_position;
- if(m_end == m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- if((m_end == ++m_position)
- || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
- {
- fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
- return false;
- }
- string_type m = this->m_traits.lookup_collatename(name_first, name_last);
- if((0 == m.size()) || (m.size() > 2))
- {
- fail(regex_constants::error_collate, name_first - m_base);
- return false;
- }
- digraph<charT> d;
- d.first = m[0];
- if(m.size() > 1)
- d.second = m[1];
- else
- d.second = 0;
- char_set.add_equivalent(d);
- ++m_position;
- break;
- }
- default:
- --m_position;
- parse_set_literal(char_set);
- break;
- }
- return true;
-}
-
-template <class charT, class traits>
-void basic_regex_parser<charT, traits>::parse_set_literal(basic_char_set<charT, traits>& char_set)
-{
- digraph<charT> start_range(get_next_set_literal(char_set));
- if(m_end == m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base);
- return;
- }
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash)
- {
- // we have a range:
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base);
- return;
- }
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)
- {
- digraph<charT> end_range = get_next_set_literal(char_set);
- char_set.add_range(start_range, end_range);
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash)
- {
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_brack, m_position - m_base);
- return;
- }
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set)
- {
- // trailing - :
- --m_position;
- return;
- }
- fail(regex_constants::error_range, m_position - m_base);
- return;
- }
- return;
- }
- --m_position;
- }
- char_set.add_single(start_range);
-}
-
-template <class charT, class traits>
-digraph<charT> basic_regex_parser<charT, traits>::get_next_set_literal(basic_char_set<charT, traits>& char_set)
-{
- digraph<charT> result;
- switch(this->m_traits.syntax_type(*m_position))
- {
- case regex_constants::syntax_dash:
- if(!char_set.empty())
- {
- // see if we are at the end of the set:
- if((++m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
- {
- fail(regex_constants::error_range, m_position - m_base);
- return result;
- }
- --m_position;
- }
- result.first = *m_position++;
- return result;
- case regex_constants::syntax_escape:
- // check to see if escapes are supported first:
- if(this->flags() & regex_constants::no_escape_in_lists)
- {
- result = *m_position++;
- break;
- }
- ++m_position;
- result = unescape_character();
- break;
- case regex_constants::syntax_open_set:
- {
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_collate, m_position - m_base);
- return result;
- }
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot)
- {
- --m_position;
- result.first = *m_position;
- ++m_position;
- return result;
- }
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_collate, m_position - m_base);
- return result;
- }
- const charT* name_first = m_position;
- // skip at least one character, then find the matching ':]'
- if(m_end == ++m_position)
- {
- fail(regex_constants::error_collate, name_first - m_base);
- return result;
- }
- while((m_position != m_end)
- && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot))
- ++m_position;
- const charT* name_last = m_position;
- if(m_end == m_position)
- {
- fail(regex_constants::error_collate, name_first - m_base);
- return result;
- }
- if((m_end == ++m_position)
- || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
- {
- fail(regex_constants::error_collate, name_first - m_base);
- return result;
- }
- ++m_position;
- string_type s = this->m_traits.lookup_collatename(name_first, name_last);
- if(s.empty() || (s.size() > 2))
- {
- fail(regex_constants::error_collate, name_first - m_base);
- return result;
- }
- result.first = s[0];
- if(s.size() > 1)
- result.second = s[1];
- else
- result.second = 0;
- return result;
- }
- default:
- result = *m_position++;
- }
- return result;
-}
-
-//
-// does a value fit in the specified charT type?
-//
-template <class charT>
-bool valid_value(charT, boost::intmax_t v, const mpl::true_&)
-{
- return (v >> (sizeof(charT) * CHAR_BIT)) == 0;
-}
-template <class charT>
-bool valid_value(charT, boost::intmax_t, const mpl::false_&)
-{
- return true; // v will alsways fit in a charT
-}
-template <class charT>
-bool valid_value(charT c, boost::intmax_t v)
-{
- return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(boost::intmax_t))>());
-}
-
-template <class charT, class traits>
-charT basic_regex_parser<charT, traits>::unescape_character()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
- charT result(0);
- if(m_position == m_end)
- {
- fail(regex_constants::error_escape, m_position - m_base, "Escape sequence terminated prematurely.");
- return false;
- }
- switch(this->m_traits.escape_syntax_type(*m_position))
- {
- case regex_constants::escape_type_control_a:
- result = charT('\a');
- break;
- case regex_constants::escape_type_e:
- result = charT(27);
- break;
- case regex_constants::escape_type_control_f:
- result = charT('\f');
- break;
- case regex_constants::escape_type_control_n:
- result = charT('\n');
- break;
- case regex_constants::escape_type_control_r:
- result = charT('\r');
- break;
- case regex_constants::escape_type_control_t:
- result = charT('\t');
- break;
- case regex_constants::escape_type_control_v:
- result = charT('\v');
- break;
- case regex_constants::escape_type_word_assert:
- result = charT('\b');
- break;
- case regex_constants::escape_type_ascii_control:
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base, "ASCII escape sequence terminated prematurely.");
- return result;
- }
- result = static_cast<charT>(*m_position % 32);
- break;
- case regex_constants::escape_type_hex:
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base, "Hexadecimal escape sequence terminated prematurely.");
- return result;
- }
- // maybe have \x{ddd}
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
- {
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence.");
- return result;
- }
- boost::intmax_t i = this->m_traits.toi(m_position, m_end, 16);
- if((m_position == m_end)
- || (i < 0)
- || ((std::numeric_limits<charT>::is_specialized) && (i > (boost::intmax_t)(std::numeric_limits<charT>::max)()))
- || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_badbrace, m_position - m_base, "Hexadecimal escape sequence was invalid.");
- return result;
- }
- ++m_position;
- result = charT(i);
- }
- else
- {
- std::ptrdiff_t len = (std::min)(static_cast<std::ptrdiff_t>(2), static_cast<std::ptrdiff_t>(m_end - m_position));
- boost::intmax_t i = this->m_traits.toi(m_position, m_position + len, 16);
- if((i < 0)
- || !valid_value(charT(0), i))
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base, "Escape sequence did not encode a valid character.");
- return result;
- }
- result = charT(i);
- }
- return result;
- case regex_constants::syntax_digit:
- {
- // an octal escape sequence, the first character must be a zero
- // followed by up to 3 octal digits:
- std::ptrdiff_t len = (std::min)(::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end), static_cast<std::ptrdiff_t>(4));
- const charT* bp = m_position;
- boost::intmax_t val = this->m_traits.toi(bp, bp + 1, 8);
- if(val != 0)
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- // Oops not an octal escape after all:
- fail(regex_constants::error_escape, m_position - m_base, "Invalid octal escape sequence.");
- return result;
- }
- val = this->m_traits.toi(m_position, m_position + len, 8);
- if((val < 0) || (val > (boost::intmax_t)(std::numeric_limits<charT>::max)()))
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base, "Octal escape sequence is invalid.");
- return result;
- }
- return static_cast<charT>(val);
- }
- case regex_constants::escape_type_named_char:
- {
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base);
- return false;
- }
- // maybe have \N{name}
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
- {
- const charT* base = m_position;
- // skip forward until we find enclosing brace:
- while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base);
- return false;
- }
- string_type s = this->m_traits.lookup_collatename(++base, m_position++);
- if(s.empty())
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_collate, m_position - m_base);
- return false;
- }
- if(s.size() == 1)
- {
- return s[0];
- }
- }
- // fall through is a failure:
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base);
- return false;
- }
- default:
- result = *m_position;
- break;
- }
- ++m_position;
- return result;
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_backref()
-{
- BOOST_ASSERT(m_position != m_end);
- const charT* pc = m_position;
- boost::intmax_t i = this->m_traits.toi(pc, pc + 1, 10);
- if((i == 0) || (((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && (this->flags() & regbase::no_bk_refs)))
- {
- // not a backref at all but an octal escape sequence:
- charT c = unescape_character();
- this->append_literal(c);
- }
- else if((i > 0) && (this->m_backrefs & (1u << (i-1))))
- {
- m_position = pc;
- re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
- pb->index = i;
- pb->icase = this->flags() & regbase::icase;
- }
- else
- {
- // Rewind to start of escape:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_backref, m_position - m_base);
- return false;
- }
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_QE()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
- //
- // parse a \Q...\E sequence:
- //
- ++m_position; // skip the Q
- const charT* start = m_position;
- const charT* end;
- do
- {
- while((m_position != m_end)
- && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape))
- ++m_position;
- if(m_position == m_end)
- {
- // a \Q...\E sequence may terminate with the end of the expression:
- end = m_position;
- break;
- }
- if(++m_position == m_end) // skip the escape
- {
- fail(regex_constants::error_escape, m_position - m_base, "Unterminated \\Q...\\E sequence.");
- return false;
- }
- // check to see if it's a \E:
- if(this->m_traits.escape_syntax_type(*m_position) == regex_constants::escape_type_E)
- {
- ++m_position;
- end = m_position - 2;
- break;
- }
- // otherwise go round again:
- }while(true);
- //
- // now add all the character between the two escapes as literals:
- //
- while(start != end)
- {
- this->append_literal(*start);
- ++start;
- }
- return true;
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_perl_extension()
-{
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- //
- // treat comments as a special case, as these
- // are the only ones that don't start with a leading
- // startmark state:
- //
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_hash)
- {
- while((m_position != m_end)
- && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark))
- {}
- return true;
- }
- //
- // backup some state, and prepare the way:
- //
- int markid = 0;
- std::ptrdiff_t jump_offset = 0;
- re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
- pb->icase = this->flags() & regbase::icase;
- std::ptrdiff_t last_paren_start = this->getoffset(pb);
- // back up insertion point for alternations, and set new point:
- std::ptrdiff_t last_alt_point = m_alt_insert_point;
- this->m_pdata->m_data.align();
- m_alt_insert_point = this->m_pdata->m_data.size();
- std::ptrdiff_t expected_alt_point = m_alt_insert_point;
- bool restore_flags = true;
- regex_constants::syntax_option_type old_flags = this->flags();
- bool old_case_change = m_has_case_change;
- m_has_case_change = false;
- charT name_delim;
- int mark_reset = m_mark_reset;
- int max_mark = m_max_mark;
- m_mark_reset = -1;
- m_max_mark = m_mark_count;
- boost::intmax_t v;
- //
- // select the actual extension used:
- //
- switch(this->m_traits.syntax_type(*m_position))
- {
- case regex_constants::syntax_or:
- m_mark_reset = m_mark_count;
- BOOST_FALLTHROUGH;
- case regex_constants::syntax_colon:
- //
- // a non-capturing mark:
- //
- pb->index = markid = 0;
- ++m_position;
- break;
- case regex_constants::syntax_digit:
- {
- //
- // a recursive subexpression:
- //
- v = this->m_traits.toi(m_position, m_end, 10);
- if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base, "The recursive sub-expression refers to an invalid marking group, or is unterminated.");
- return false;
- }
-insert_recursion:
- pb->index = markid = 0;
- re_recurse* pr = static_cast<re_recurse*>(this->append_state(syntax_element_recurse, sizeof(re_recurse)));
- pr->alt.i = v;
- pr->state_id = 0;
- static_cast<re_case*>(
- this->append_state(syntax_element_toggle_case, sizeof(re_case))
- )->icase = this->flags() & regbase::icase;
- break;
- }
- case regex_constants::syntax_plus:
- //
- // A forward-relative recursive subexpression:
- //
- ++m_position;
- v = this->m_traits.toi(m_position, m_end, 10);
- if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
- return false;
- }
- if ((std::numeric_limits<boost::intmax_t>::max)() - m_mark_count < v)
- {
- fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
- return false;
- }
- v += m_mark_count;
- goto insert_recursion;
- case regex_constants::syntax_dash:
- //
- // Possibly a backward-relative recursive subexpression:
- //
- ++m_position;
- v = this->m_traits.toi(m_position, m_end, 10);
- if(v <= 0)
- {
- --m_position;
- // Oops not a relative recursion at all, but a (?-imsx) group:
- goto option_group_jump;
- }
- v = m_mark_count + 1 - v;
- if(v <= 0)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
- return false;
- }
- goto insert_recursion;
- case regex_constants::syntax_equal:
- pb->index = markid = -1;
- ++m_position;
- jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
- this->m_pdata->m_data.align();
- m_alt_insert_point = this->m_pdata->m_data.size();
- break;
- case regex_constants::syntax_not:
- pb->index = markid = -2;
- ++m_position;
- jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
- this->m_pdata->m_data.align();
- m_alt_insert_point = this->m_pdata->m_data.size();
- break;
- case regex_constants::escape_type_left_word:
- {
- // a lookbehind assertion:
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- regex_constants::syntax_type t = this->m_traits.syntax_type(*m_position);
- if(t == regex_constants::syntax_not)
- pb->index = markid = -2;
- else if(t == regex_constants::syntax_equal)
- pb->index = markid = -1;
- else
- {
- // Probably a named capture which also starts (?< :
- name_delim = '>';
- --m_position;
- goto named_capture_jump;
- }
- ++m_position;
- jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
- this->append_state(syntax_element_backstep, sizeof(re_brace));
- this->m_pdata->m_data.align();
- m_alt_insert_point = this->m_pdata->m_data.size();
- break;
- }
- case regex_constants::escape_type_right_word:
- //
- // an independent sub-expression:
- //
- pb->index = markid = -3;
- ++m_position;
- jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
- this->m_pdata->m_data.align();
- m_alt_insert_point = this->m_pdata->m_data.size();
- break;
- case regex_constants::syntax_open_mark:
- {
- // a conditional expression:
- pb->index = markid = -4;
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- v = this->m_traits.toi(m_position, m_end, 10);
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(*m_position == charT('R'))
- {
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(*m_position == charT('&'))
- {
- const charT* base = ++m_position;
- while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- v = -static_cast<int>(hash_value_from_capture_name(base, m_position));
- }
- else
- {
- v = -this->m_traits.toi(m_position, m_end, 10);
- }
- re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
- br->index = v < 0 ? (v - 1) : 0;
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- }
- else if((*m_position == charT('\'')) || (*m_position == charT('<')))
- {
- const charT* base = ++m_position;
- while((m_position != m_end) && (*m_position != charT('>')) && (*m_position != charT('\'')))
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- v = static_cast<int>(hash_value_from_capture_name(base, m_position));
- re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
- br->index = v;
- if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end))
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base, "Unterminated named capture.");
- return false;
- }
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- }
- else if(*m_position == charT('D'))
- {
- const char* def = "DEFINE";
- while(*def && (m_position != m_end) && (*m_position == charT(*def)))
- ++m_position, ++def;
- if((m_position == m_end) || *def)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
- br->index = 9999; // special magic value!
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- }
- else if(v > 0)
- {
- re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
- br->index = v;
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- }
- else
- {
- // verify that we have a lookahead or lookbehind assert:
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_question)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(this->m_traits.syntax_type(*m_position) == regex_constants::escape_type_left_word)
- {
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
- && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- m_position -= 3;
- }
- else
- {
- if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
- && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- m_position -= 2;
- }
- }
- break;
- }
- case regex_constants::syntax_close_mark:
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- case regex_constants::escape_type_end_buffer:
- {
- name_delim = *m_position;
-named_capture_jump:
- markid = 0;
- if(0 == (this->flags() & regbase::nosubs))
- {
- markid = ++m_mark_count;
- #ifndef BOOST_NO_STD_DISTANCE
- if(this->flags() & regbase::save_subexpression_location)
- this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 2, 0));
- #else
- if(this->flags() & regbase::save_subexpression_location)
- this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 2, 0));
- #endif
- }
- pb->index = markid;
- const charT* base = ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- while((m_position != m_end) && (*m_position != name_delim))
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- this->m_pdata->set_name(base, m_position, markid);
- ++m_position;
- break;
- }
- default:
- if(*m_position == charT('R'))
- {
- ++m_position;
- v = 0;
- if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- goto insert_recursion;
- }
- if(*m_position == charT('&'))
- {
- ++m_position;
- const charT* base = m_position;
- while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- v = static_cast<int>(hash_value_from_capture_name(base, m_position));
- goto insert_recursion;
- }
- if(*m_position == charT('P'))
- {
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(*m_position == charT('>'))
- {
- ++m_position;
- const charT* base = m_position;
- while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- ++m_position;
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- v = static_cast<int>(hash_value_from_capture_name(base, m_position));
- goto insert_recursion;
- }
- }
- //
- // lets assume that we have a (?imsx) group and try and parse it:
- //
-option_group_jump:
- regex_constants::syntax_option_type opts = parse_options();
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- // make a note of whether we have a case change:
- m_has_case_change = ((opts & regbase::icase) != (this->flags() & regbase::icase));
- pb->index = markid = 0;
- if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark)
- {
- // update flags and carry on as normal:
- this->flags(opts);
- restore_flags = false;
- old_case_change |= m_has_case_change; // defer end of scope by one ')'
- }
- else if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_colon)
- {
- // update flags and carry on until the matching ')' is found:
- this->flags(opts);
- ++m_position;
- }
- else
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
-
- // finally append a case change state if we need it:
- if(m_has_case_change)
- {
- static_cast<re_case*>(
- this->append_state(syntax_element_toggle_case, sizeof(re_case))
- )->icase = opts & regbase::icase;
- }
-
- }
- //
- // now recursively add more states, this will terminate when we get to a
- // matching ')' :
- //
- parse_all();
- //
- // Unwind alternatives:
- //
- if(0 == unwind_alts(last_paren_start))
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid alternation operators within (?...) block.");
- return false;
- }
- //
- // we either have a ')' or we have run out of characters prematurely:
- //
- if(m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- this->fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_end));
- return false;
- }
- BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark);
- ++m_position;
- //
- // restore the flags:
- //
- if(restore_flags)
- {
- // append a case change state if we need it:
- if(m_has_case_change)
- {
- static_cast<re_case*>(
- this->append_state(syntax_element_toggle_case, sizeof(re_case))
- )->icase = old_flags & regbase::icase;
- }
- this->flags(old_flags);
- }
- //
- // set up the jump pointer if we have one:
- //
- if(jump_offset)
- {
- this->m_pdata->m_data.align();
- re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
- jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
- if((this->m_last_state == jmp) && (markid != -2))
- {
- // Oops... we didn't have anything inside the assertion.
- // Note we don't get here for negated forward lookahead as (?!)
- // does have some uses.
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid or empty zero width assertion.");
- return false;
- }
- }
- //
- // verify that if this is conditional expression, that we do have
- // an alternative, if not add one:
- //
- if(markid == -4)
- {
- re_syntax_base* b = this->getaddress(expected_alt_point);
- // Make sure we have exactly one alternative following this state:
- if(b->type != syntax_element_alt)
- {
- re_alt* alt = static_cast<re_alt*>(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt)));
- alt->alt.i = this->m_pdata->m_data.size() - this->getoffset(alt);
- }
- else if(((std::ptrdiff_t)this->m_pdata->m_data.size() > (static_cast<re_alt*>(b)->alt.i + this->getoffset(b))) && (static_cast<re_alt*>(b)->alt.i > 0) && this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt)
- {
- // Can't have seen more than one alternative:
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_bad_pattern, m_position - m_base, "More than one alternation operator | was encountered inside a conditional expression.");
- return false;
- }
- else
- {
- // We must *not* have seen an alternative inside a (DEFINE) block:
- b = this->getaddress(b->next.i, b);
- if((b->type == syntax_element_assert_backref) && (static_cast<re_brace*>(b)->index == 9999))
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_bad_pattern, m_position - m_base, "Alternation operators are not allowed inside a DEFINE block.");
- return false;
- }
- }
- // check for invalid repetition of next state:
- b = this->getaddress(expected_alt_point);
- b = this->getaddress(static_cast<re_alt*>(b)->next.i, b);
- if((b->type != syntax_element_assert_backref)
- && (b->type != syntax_element_startmark))
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_badrepeat, m_position - m_base, "A repetition operator cannot be applied to a zero-width assertion.");
- return false;
- }
- }
- //
- // append closing parenthesis state:
- //
- pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
- pb->index = markid;
- pb->icase = this->flags() & regbase::icase;
- this->m_paren_start = last_paren_start;
- //
- // restore the alternate insertion point:
- //
- this->m_alt_insert_point = last_alt_point;
- //
- // and the case change data:
- //
- m_has_case_change = old_case_change;
- //
- // And the mark_reset data:
- //
- if(m_max_mark > m_mark_count)
- {
- m_mark_count = m_max_mark;
- }
- m_mark_reset = mark_reset;
- m_max_mark = max_mark;
-
-
- if(markid > 0)
- {
-#ifndef BOOST_NO_STD_DISTANCE
- if(this->flags() & regbase::save_subexpression_location)
- this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position) - 1;
-#else
- if(this->flags() & regbase::save_subexpression_location)
- this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base) - 1;
-#endif
- //
- // allow backrefs to this mark:
- //
- if(markid < (int)(sizeof(unsigned) * CHAR_BIT))
- this->m_backrefs |= 1u << (markid - 1);
- }
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::match_verb(const char* verb)
-{
- while(*verb)
- {
- if(static_cast<charT>(*verb) != *m_position)
- {
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(++m_position == m_end)
- {
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- ++verb;
- }
- return true;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::parse_perl_verb()
-{
- if(++m_position == m_end)
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- switch(*m_position)
- {
- case 'F':
- if(++m_position == m_end)
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if((this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) || match_verb("AIL"))
- {
- if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- ++m_position;
- this->append_state(syntax_element_fail);
- return true;
- }
- break;
- case 'A':
- if(++m_position == m_end)
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(match_verb("CCEPT"))
- {
- if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- ++m_position;
- this->append_state(syntax_element_accept);
- return true;
- }
- break;
- case 'C':
- if(++m_position == m_end)
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(match_verb("OMMIT"))
- {
- if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- ++m_position;
- static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_commit;
- this->m_pdata->m_disable_match_any = true;
- return true;
- }
- break;
- case 'P':
- if(++m_position == m_end)
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(match_verb("RUNE"))
- {
- if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- ++m_position;
- static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_prune;
- this->m_pdata->m_disable_match_any = true;
- return true;
- }
- break;
- case 'S':
- if(++m_position == m_end)
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(match_verb("KIP"))
- {
- if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- ++m_position;
- static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_skip;
- this->m_pdata->m_disable_match_any = true;
- return true;
- }
- break;
- case 'T':
- if(++m_position == m_end)
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- if(match_verb("HEN"))
- {
- if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
- {
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
- }
- ++m_position;
- this->append_state(syntax_element_then);
- this->m_pdata->m_disable_match_any = true;
- return true;
- }
- break;
- }
- // Rewind to start of (* sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_perl_extension, m_position - m_base);
- return false;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::add_emacs_code(bool negate)
-{
- //
- // parses an emacs style \sx or \Sx construct.
- //
- if(++m_position == m_end)
- {
- // Rewind to start of sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
- fail(regex_constants::error_escape, m_position - m_base);
- return false;
- }
- basic_char_set<charT, traits> char_set;
- if(negate)
- char_set.negate();
-
- static const charT s_punct[5] = { 'p', 'u', 'n', 'c', 't', };
-
- switch(*m_position)
- {
- case 's':
- case ' ':
- char_set.add_class(this->m_mask_space);
- break;
- case 'w':
- char_set.add_class(this->m_word_mask);
- break;
- case '_':
- char_set.add_single(digraph<charT>(charT('$')));
- char_set.add_single(digraph<charT>(charT('&')));
- char_set.add_single(digraph<charT>(charT('*')));
- char_set.add_single(digraph<charT>(charT('+')));
- char_set.add_single(digraph<charT>(charT('-')));
- char_set.add_single(digraph<charT>(charT('_')));
- char_set.add_single(digraph<charT>(charT('<')));
- char_set.add_single(digraph<charT>(charT('>')));
- break;
- case '.':
- char_set.add_class(this->m_traits.lookup_classname(s_punct, s_punct+5));
- break;
- case '(':
- char_set.add_single(digraph<charT>(charT('(')));
- char_set.add_single(digraph<charT>(charT('[')));
- char_set.add_single(digraph<charT>(charT('{')));
- break;
- case ')':
- char_set.add_single(digraph<charT>(charT(')')));
- char_set.add_single(digraph<charT>(charT(']')));
- char_set.add_single(digraph<charT>(charT('}')));
- break;
- case '"':
- char_set.add_single(digraph<charT>(charT('"')));
- char_set.add_single(digraph<charT>(charT('\'')));
- char_set.add_single(digraph<charT>(charT('`')));
- break;
- case '\'':
- char_set.add_single(digraph<charT>(charT('\'')));
- char_set.add_single(digraph<charT>(charT(',')));
- char_set.add_single(digraph<charT>(charT('#')));
- break;
- case '<':
- char_set.add_single(digraph<charT>(charT(';')));
- break;
- case '>':
- char_set.add_single(digraph<charT>(charT('\n')));
- char_set.add_single(digraph<charT>(charT('\f')));
- break;
- default:
- fail(regex_constants::error_ctype, m_position - m_base);
- return false;
- }
- if(0 == this->append_set(char_set))
- {
- fail(regex_constants::error_ctype, m_position - m_base);
- return false;
- }
- ++m_position;
- return true;
-}
-
-template <class charT, class traits>
-regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_options()
-{
- // we have a (?imsx-imsx) group, convert it into a set of flags:
- regex_constants::syntax_option_type f = this->flags();
- bool breakout = false;
- do
- {
- switch(*m_position)
- {
- case 's':
- f |= regex_constants::mod_s;
- f &= ~regex_constants::no_mod_s;
- break;
- case 'm':
- f &= ~regex_constants::no_mod_m;
- break;
- case 'i':
- f |= regex_constants::icase;
- break;
- case 'x':
- f |= regex_constants::mod_x;
- break;
- default:
- breakout = true;
- continue;
- }
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_paren, m_position - m_base);
- return false;
- }
- }
- while(!breakout);
-
- breakout = false;
-
- if(*m_position == static_cast<charT>('-'))
- {
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_paren, m_position - m_base);
- return false;
- }
- do
- {
- switch(*m_position)
- {
- case 's':
- f &= ~regex_constants::mod_s;
- f |= regex_constants::no_mod_s;
- break;
- case 'm':
- f |= regex_constants::no_mod_m;
- break;
- case 'i':
- f &= ~regex_constants::icase;
- break;
- case 'x':
- f &= ~regex_constants::mod_x;
- break;
- default:
- breakout = true;
- continue;
- }
- if(++m_position == m_end)
- {
- // Rewind to start of (? sequence:
- --m_position;
- while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
- fail(regex_constants::error_paren, m_position - m_base);
- return false;
- }
- }
- while(!breakout);
- }
- return f;
-}
-
-template <class charT, class traits>
-bool basic_regex_parser<charT, traits>::unwind_alts(std::ptrdiff_t last_paren_start)
-{
- //
- // If we didn't actually add any states after the last
- // alternative then that's an error:
- //
- if((this->m_alt_insert_point == static_cast<std::ptrdiff_t>(this->m_pdata->m_data.size()))
- && m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start)
- &&
- !(
- ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group)
- &&
- ((this->flags() & regbase::no_empty_expressions) == 0)
- )
- )
- {
- fail(regex_constants::error_empty, this->m_position - this->m_base, "Can't terminate a sub-expression with an alternation operator |.");
- return false;
- }
- //
- // Fix up our alternatives:
- //
- while(m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start))
- {
- //
- // fix up the jump to point to the end of the states
- // that we've just added:
- //
- std::ptrdiff_t jump_offset = m_alt_jumps.back();
- m_alt_jumps.pop_back();
- this->m_pdata->m_data.align();
- re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
- BOOST_ASSERT(jmp->type == syntax_element_jump);
- jmp->alt.i = this->m_pdata->m_data.size() - jump_offset;
- }
- return true;
-}
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespace BOOST_REGEX_DETAIL_NS
-} // namespace boost
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/fileiter.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/fileiter.hpp
deleted file mode 100644
index 256a7e4606c..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/fileiter.hpp
+++ /dev/null
@@ -1,455 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE fileiter.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares various platform independent file and
- * directory iterators, plus binary file input in
- * the form of class map_file.
- */
-
-#ifndef BOOST_RE_FILEITER_HPP_INCLUDED
-#define BOOST_RE_FILEITER_HPP_INCLUDED
-
-#ifndef BOOST_REGEX_CONFIG_HPP
-#include <boost/regex/config.hpp>
-#endif
-#include <boost/assert.hpp>
-
-#ifndef BOOST_REGEX_NO_FILEITER
-
-#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
-#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
-#define BOOST_REGEX_FI_WIN32_MAP
-#define BOOST_REGEX_FI_POSIX_DIR
-#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
-#define BOOST_REGEX_FI_WIN32_MAP
-#define BOOST_REGEX_FI_WIN32_DIR
-#else
-#define BOOST_REGEX_FI_POSIX_MAP
-#define BOOST_REGEX_FI_POSIX_DIR
-#endif
-
-#if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR)
-#include <windows.h>
-#endif
-
-#if defined(BOOST_REGEX_FI_WIN32_DIR)
-
-#include <cstddef>
-
-namespace boost{
- namespace BOOST_REGEX_DETAIL_NS{
-
-#ifndef BOOST_NO_ANSI_APIS
-typedef WIN32_FIND_DATAA _fi_find_data;
-#else
-typedef WIN32_FIND_DATAW _fi_find_data;
-#endif
-typedef HANDLE _fi_find_handle;
-
- } // namespace BOOST_REGEX_DETAIL_NS
-
-} // namespace boost
-
-#define _fi_invalid_handle INVALID_HANDLE_VALUE
-#define _fi_dir FILE_ATTRIBUTE_DIRECTORY
-
-#elif defined(BOOST_REGEX_FI_POSIX_DIR)
-
-#include <cstddef>
-#include <cstdio>
-#include <cctype>
-#include <iterator>
-#include <list>
-#include <cassert>
-#include <dirent.h>
-
-#if defined(__SUNPRO_CC)
-using std::list;
-#endif
-
-#ifndef MAX_PATH
-#define MAX_PATH 256
-#endif
-
-namespace boost{
- namespace BOOST_REGEX_DETAIL_NS{
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-struct _fi_find_data
-{
- unsigned dwFileAttributes;
- char cFileName[MAX_PATH];
-};
-
-struct _fi_priv_data;
-
-typedef _fi_priv_data* _fi_find_handle;
-#define _fi_invalid_handle 0
-#define _fi_dir 1
-
-_fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData);
-bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData);
-bool _fi_FindClose(_fi_find_handle hFindFile);
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
- } // namespace BOOST_REGEX_DETAIL_NS
-} // namespace boost
-
-#ifdef FindFirstFile
- #undef FindFirstFile
-#endif
-#ifdef FindNextFile
- #undef FindNextFile
-#endif
-#ifdef FindClose
- #undef FindClose
-#endif
-
-#define FindFirstFileA _fi_FindFirstFile
-#define FindNextFileA _fi_FindNextFile
-#define FindClose _fi_FindClose
-
-#endif
-
-namespace boost{
- namespace BOOST_REGEX_DETAIL_NS{
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-#ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile
-
-class BOOST_REGEX_DECL mapfile
-{
- HANDLE hfile;
- HANDLE hmap;
- const char* _first;
- const char* _last;
-public:
-
- typedef const char* iterator;
-
- mapfile(){ hfile = hmap = 0; _first = _last = 0; }
- mapfile(const char* file){ hfile = hmap = 0; _first = _last = 0; open(file); }
- ~mapfile(){ close(); }
- void open(const char* file);
- void close();
- const char* begin(){ return _first; }
- const char* end(){ return _last; }
- size_t size(){ return _last - _first; }
- bool valid(){ return (hfile != 0) && (hfile != INVALID_HANDLE_VALUE); }
-};
-
-
-#else
-
-class BOOST_REGEX_DECL mapfile_iterator;
-
-class BOOST_REGEX_DECL mapfile
-{
- typedef char* pointer;
- std::FILE* hfile;
- long int _size;
- pointer* _first;
- pointer* _last;
- mutable std::list<pointer*> condemed;
- enum sizes
- {
- buf_size = 4096
- };
- void lock(pointer* node)const;
- void unlock(pointer* node)const;
-public:
-
- typedef mapfile_iterator iterator;
-
- mapfile(){ hfile = 0; _size = 0; _first = _last = 0; }
- mapfile(const char* file){ hfile = 0; _size = 0; _first = _last = 0; open(file); }
- ~mapfile(){ close(); }
- void open(const char* file);
- void close();
- iterator begin()const;
- iterator end()const;
- unsigned long size()const{ return _size; }
- bool valid()const{ return hfile != 0; }
- friend class mapfile_iterator;
-};
-
-class BOOST_REGEX_DECL mapfile_iterator
-#if !defined(BOOST_NO_STD_ITERATOR) || defined(BOOST_MSVC_STD_ITERATOR)
-: public std::iterator<std::random_access_iterator_tag, char>
-#endif
-{
- typedef mapfile::pointer internal_pointer;
- internal_pointer* node;
- const mapfile* file;
- unsigned long offset;
- long position()const
- {
- return file ? ((node - file->_first) * mapfile::buf_size + offset) : 0;
- }
- void position(long pos)
- {
- if(file)
- {
- node = file->_first + (pos / mapfile::buf_size);
- offset = pos % mapfile::buf_size;
- }
- }
-public:
- typedef std::ptrdiff_t difference_type;
- typedef char value_type;
- typedef const char* pointer;
- typedef const char& reference;
- typedef std::random_access_iterator_tag iterator_category;
-
- mapfile_iterator() { node = 0; file = 0; offset = 0; }
- mapfile_iterator(const mapfile* f, long arg_position)
- {
- BOOST_ASSERT(f);
- file = f;
- node = f->_first + arg_position / mapfile::buf_size;
- offset = arg_position % mapfile::buf_size;
- file->lock(node);
- }
- mapfile_iterator(const mapfile_iterator& i)
- {
- file = i.file;
- node = i.node;
- offset = i.offset;
- if(file)
- file->lock(node);
- }
- ~mapfile_iterator()
- {
- if(file && node)
- file->unlock(node);
- }
- mapfile_iterator& operator = (const mapfile_iterator& i);
- char operator* ()const
- {
- BOOST_ASSERT(node >= file->_first);
- BOOST_ASSERT(node < file->_last);
- return file ? *(*node + sizeof(int) + offset) : char(0);
- }
- char operator[] (long off)const
- {
- mapfile_iterator tmp(*this);
- tmp += off;
- return *tmp;
- }
- mapfile_iterator& operator++ ();
- mapfile_iterator operator++ (int);
- mapfile_iterator& operator-- ();
- mapfile_iterator operator-- (int);
-
- mapfile_iterator& operator += (long off)
- {
- position(position() + off);
- return *this;
- }
- mapfile_iterator& operator -= (long off)
- {
- position(position() - off);
- return *this;
- }
-
- friend inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
- }
-
- friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return !(i == j);
- }
-
- friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() < j.position();
- }
- friend inline bool operator>(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() > j.position();
- }
- friend inline bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() <= j.position();
- }
- friend inline bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() >= j.position();
- }
-
- friend mapfile_iterator operator + (const mapfile_iterator& i, long off);
- friend mapfile_iterator operator + (long off, const mapfile_iterator& i)
- {
- mapfile_iterator tmp(i);
- return tmp += off;
- }
- friend mapfile_iterator operator - (const mapfile_iterator& i, long off);
- friend inline long operator - (const mapfile_iterator& i, const mapfile_iterator& j)
- {
- return i.position() - j.position();
- }
-};
-
-#endif
-
-// _fi_sep determines the directory separator, either '\\' or '/'
-BOOST_REGEX_DECL extern const char* _fi_sep;
-
-struct file_iterator_ref
-{
- _fi_find_handle hf;
- _fi_find_data _data;
- long count;
-};
-
-
-class BOOST_REGEX_DECL file_iterator
-{
- char* _root;
- char* _path;
- char* ptr;
- file_iterator_ref* ref;
-
-public:
- typedef std::ptrdiff_t difference_type;
- typedef const char* value_type;
- typedef const char** pointer;
- typedef const char*& reference;
- typedef std::input_iterator_tag iterator_category;
-
- file_iterator();
- file_iterator(const char* wild);
- ~file_iterator();
- file_iterator(const file_iterator&);
- file_iterator& operator=(const file_iterator&);
- const char* root()const { return _root; }
- const char* path()const { return _path; }
- const char* name()const { return ptr; }
- _fi_find_data* data() { return &(ref->_data); }
- void next();
- file_iterator& operator++() { next(); return *this; }
- file_iterator operator++(int);
- const char* operator*() { return path(); }
-
- friend inline bool operator == (const file_iterator& f1, const file_iterator& f2)
- {
- return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
- }
-
- friend inline bool operator != (const file_iterator& f1, const file_iterator& f2)
- {
- return !(f1 == f2);
- }
-
-};
-
-// dwa 9/13/00 - suppress unused parameter warning
-inline bool operator < (const file_iterator&, const file_iterator&)
-{
- return false;
-}
-
-
-class BOOST_REGEX_DECL directory_iterator
-{
- char* _root;
- char* _path;
- char* ptr;
- file_iterator_ref* ref;
-
-public:
- typedef std::ptrdiff_t difference_type;
- typedef const char* value_type;
- typedef const char** pointer;
- typedef const char*& reference;
- typedef std::input_iterator_tag iterator_category;
-
- directory_iterator();
- directory_iterator(const char* wild);
- ~directory_iterator();
- directory_iterator(const directory_iterator& other);
- directory_iterator& operator=(const directory_iterator& other);
-
- const char* root()const { return _root; }
- const char* path()const { return _path; }
- const char* name()const { return ptr; }
- _fi_find_data* data() { return &(ref->_data); }
- void next();
- directory_iterator& operator++() { next(); return *this; }
- directory_iterator operator++(int);
- const char* operator*() { return path(); }
-
- static const char* separator() { return _fi_sep; }
-
- friend inline bool operator == (const directory_iterator& f1, const directory_iterator& f2)
- {
- return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
- }
-
-
- friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
- {
- return !(f1 == f2);
- }
-
- };
-
-inline bool operator < (const directory_iterator&, const directory_iterator&)
-{
- return false;
-}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-
-} // namespace BOOST_REGEX_DETAIL_NS
-using boost::BOOST_REGEX_DETAIL_NS::directory_iterator;
-using boost::BOOST_REGEX_DETAIL_NS::file_iterator;
-using boost::BOOST_REGEX_DETAIL_NS::mapfile;
-} // namespace boost
-
-#endif // BOOST_REGEX_NO_FILEITER
-#endif // BOOST_RE_FILEITER_HPP
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/instances.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/instances.hpp
deleted file mode 100644
index 05ac71a6862..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/instances.hpp
+++ /dev/null
@@ -1,225 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE instances.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Defines those template instances that are placed in the
- * library rather than in the users object files.
- */
-
-//
-// note no include guard, we may include this multiple times:
-//
-#ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-
-namespace boost{
-
-//
-// this header can be included multiple times, each time with
-// a different character type, BOOST_REGEX_CHAR_T must be defined
-// first:
-//
-#ifndef BOOST_REGEX_CHAR_T
-# error "BOOST_REGEX_CHAR_T not defined"
-#endif
-
-#ifndef BOOST_REGEX_TRAITS_T
-# define BOOST_REGEX_TRAITS_T , boost::regex_traits<BOOST_REGEX_CHAR_T >
-#endif
-
-//
-// what follows is compiler specific:
-//
-
-#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-# ifndef BOOST_REGEX_INSTANTIATE
-# pragma option push -Jgx
-# endif
-
-template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
-template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >;
-#ifndef BOOST_NO_STD_ALLOCATOR
-template class BOOST_REGEX_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
-#endif
-
-# ifndef BOOST_REGEX_INSTANTIATE
-# pragma option pop
-# endif
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-#elif defined(BOOST_MSVC) || defined(__ICL)
-
-# ifndef BOOST_REGEX_INSTANTIATE
-# ifdef __GNUC__
-# define template __extension__ extern template
-# else
-# if BOOST_MSVC > 1310
-# define BOOST_REGEX_TEMPLATE_DECL
-# endif
-# define template extern template
-# endif
-# endif
-
-#ifndef BOOST_REGEX_TEMPLATE_DECL
-# define BOOST_REGEX_TEMPLATE_DECL BOOST_REGEX_DECL
-#endif
-
-# ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4251 4231)
-# if BOOST_MSVC < 1600
-# pragma warning(disable : 4660)
-# endif
-# endif
-
-template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
-
-template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >;
-#ifndef BOOST_NO_STD_ALLOCATOR
-template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
-#endif
-#if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\
- && !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\
- && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\
- && !defined(BOOST_REGEX_ICU_INSTANCES)
-template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >;
-#ifndef BOOST_NO_STD_ALLOCATOR
-template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >;
-#endif
-#endif
-
-
-# ifdef BOOST_MSVC
-# pragma warning(pop)
-# endif
-
-# ifdef template
-# undef template
-# endif
-
-#undef BOOST_REGEX_TEMPLATE_DECL
-
-#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE)
-
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wkeyword-macro"
-#endif
-
-# ifndef BOOST_REGEX_INSTANTIATE
-# ifdef __GNUC__
-# define template __extension__ extern template
-# else
-# define template extern template
-# endif
-# endif
-
-#if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES)
-namespace BOOST_REGEX_DETAIL_NS{
-template BOOST_REGEX_DECL
-std::locale cpp_regex_traits_base<BOOST_REGEX_CHAR_T>::imbue(const std::locale& l);
-
-template BOOST_REGEX_DECL
-cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
- cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform_primary(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
-template BOOST_REGEX_DECL
-cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
- cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
-template BOOST_REGEX_DECL
-cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
- cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_collatename(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
-template BOOST_REGEX_DECL
-void cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::init();
-template BOOST_REGEX_DECL
-cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::char_class_type
- cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_classname_imp(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
-#ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
-template BOOST_REGEX_DECL
-bool cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::isctype(const BOOST_REGEX_CHAR_T c, char_class_type mask) const;
-#endif
-} // namespace
-template BOOST_REGEX_DECL
-boost::intmax_t cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const;
-template BOOST_REGEX_DECL
-std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::catalog_name(const std::string& name);
-template BOOST_REGEX_DECL
-std::string& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name_inst();
-template BOOST_REGEX_DECL
-std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name();
-#ifdef BOOST_HAS_THREADS
-template BOOST_REGEX_DECL
-static_mutex& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_mutex_inst();
-#endif
-#endif
-
-template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >&
- basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::do_assign(
- const BOOST_REGEX_CHAR_T* p1,
- const BOOST_REGEX_CHAR_T* p2,
- flag_type f);
-template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::locale_type BOOST_REGEX_CALL
- basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::imbue(locale_type l);
-
-template BOOST_REGEX_DECL void BOOST_REGEX_CALL
- match_results<const BOOST_REGEX_CHAR_T*>::maybe_assign(
- const match_results<const BOOST_REGEX_CHAR_T*>& m);
-
-namespace BOOST_REGEX_DETAIL_NS{
-template BOOST_REGEX_DECL void perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::construct_init(
- const basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& e, match_flag_type f);
-template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::match();
-template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::find();
-} // namespace
-
-#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
- && !defined(BOOST_REGEX_ICU_INSTANCES)\
- && !defined(__SGI_STL_PORT)\
- && !defined(_STLPORT_VERSION)
-// std:basic_string<>::const_iterator instances as well:
-template BOOST_REGEX_DECL void BOOST_REGEX_CALL
- match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::maybe_assign(
- const match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& m);
-
-namespace BOOST_REGEX_DETAIL_NS{
-template BOOST_REGEX_DECL void perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::construct_init(
- const basic_regex<BOOST_REGEX_CHAR_T>& e, match_flag_type f);
-template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::match();
-template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::find();
-} // namespace
-#endif
-
-# ifdef template
-# undef template
-# endif
-
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
-
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/match_flags.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/match_flags.hpp
deleted file mode 100644
index 1938b27a441..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/match_flags.hpp
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE match_flags.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares match_flags type.
- */
-
-#ifndef BOOST_REGEX_V4_MATCH_FLAGS
-#define BOOST_REGEX_V4_MATCH_FLAGS
-
-#ifdef __cplusplus
-# include <boost/cstdint.hpp>
-#endif
-#include <boost/detail/workaround.hpp>
-
-#ifdef __cplusplus
-namespace boost{
- namespace regex_constants{
-#endif
-
-typedef enum _match_flags
-{
- match_default = 0,
- match_not_bol = 1, /* first is not start of line */
- match_not_eol = match_not_bol << 1, /* last is not end of line */
- match_not_bob = match_not_eol << 1, /* first is not start of buffer */
- match_not_eob = match_not_bob << 1, /* last is not end of buffer */
- match_not_bow = match_not_eob << 1, /* first is not start of word */
- match_not_eow = match_not_bow << 1, /* last is not end of word */
- match_not_dot_newline = match_not_eow << 1, /* \n is not matched by '.' */
- match_not_dot_null = match_not_dot_newline << 1, /* '\0' is not matched by '.' */
- match_prev_avail = match_not_dot_null << 1, /* *--first is a valid expression */
- match_init = match_prev_avail << 1, /* internal use */
- match_any = match_init << 1, /* don't care what we match */
- match_not_null = match_any << 1, /* string can't be null */
- match_continuous = match_not_null << 1, /* each grep match must continue from */
- /* uninterupted from the previous one */
- match_partial = match_continuous << 1, /* find partial matches */
-
- match_stop = match_partial << 1, /* stop after first match (grep) V3 only */
- match_not_initial_null = match_stop, /* don't match initial null, V4 only */
- match_all = match_stop << 1, /* must find the whole of input even if match_any is set */
- match_perl = match_all << 1, /* Use perl matching rules */
- match_posix = match_perl << 1, /* Use POSIX matching rules */
- match_nosubs = match_posix << 1, /* don't trap marked subs */
- match_extra = match_nosubs << 1, /* include full capture information for repeated captures */
- match_single_line = match_extra << 1, /* treat text as single line and ignor any \n's when matching ^ and $. */
- match_unused1 = match_single_line << 1, /* unused */
- match_unused2 = match_unused1 << 1, /* unused */
- match_unused3 = match_unused2 << 1, /* unused */
- match_max = match_unused3,
-
- format_perl = 0, /* perl style replacement */
- format_default = 0, /* ditto. */
- format_sed = match_max << 1, /* sed style replacement. */
- format_all = format_sed << 1, /* enable all extentions to sytax. */
- format_no_copy = format_all << 1, /* don't copy non-matching segments. */
- format_first_only = format_no_copy << 1, /* Only replace first occurance. */
- format_is_if = format_first_only << 1, /* internal use only. */
- format_literal = format_is_if << 1, /* treat string as a literal */
-
- match_not_any = match_not_bol | match_not_eol | match_not_bob
- | match_not_eob | match_not_bow | match_not_eow | match_not_dot_newline
- | match_not_dot_null | match_prev_avail | match_init | match_not_null
- | match_continuous | match_partial | match_stop | match_not_initial_null
- | match_stop | match_all | match_perl | match_posix | match_nosubs
- | match_extra | match_single_line | match_unused1 | match_unused2
- | match_unused3 | match_max | format_perl | format_default | format_sed
- | format_all | format_no_copy | format_first_only | format_is_if
- | format_literal
-
-
-} match_flags;
-
-#if defined(__BORLANDC__) || BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
-typedef unsigned long match_flag_type;
-#else
-typedef match_flags match_flag_type;
-
-
-#ifdef __cplusplus
-inline match_flags operator&(match_flags m1, match_flags m2)
-{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) & static_cast<boost::int32_t>(m2)); }
-inline match_flags operator|(match_flags m1, match_flags m2)
-{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) | static_cast<boost::int32_t>(m2)); }
-inline match_flags operator^(match_flags m1, match_flags m2)
-{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) ^ static_cast<boost::int32_t>(m2)); }
-inline match_flags operator~(match_flags m1)
-{ return static_cast<match_flags>(~static_cast<boost::int32_t>(m1)); }
-inline match_flags& operator&=(match_flags& m1, match_flags m2)
-{ m1 = m1&m2; return m1; }
-inline match_flags& operator|=(match_flags& m1, match_flags m2)
-{ m1 = m1|m2; return m1; }
-inline match_flags& operator^=(match_flags& m1, match_flags m2)
-{ m1 = m1^m2; return m1; }
-#endif
-#endif
-
-#ifdef __cplusplus
-} /* namespace regex_constants */
-/*
- * import names into boost for backwards compatiblity:
- */
-using regex_constants::match_flag_type;
-using regex_constants::match_default;
-using regex_constants::match_not_bol;
-using regex_constants::match_not_eol;
-using regex_constants::match_not_bob;
-using regex_constants::match_not_eob;
-using regex_constants::match_not_bow;
-using regex_constants::match_not_eow;
-using regex_constants::match_not_dot_newline;
-using regex_constants::match_not_dot_null;
-using regex_constants::match_prev_avail;
-/* using regex_constants::match_init; */
-using regex_constants::match_any;
-using regex_constants::match_not_null;
-using regex_constants::match_continuous;
-using regex_constants::match_partial;
-/*using regex_constants::match_stop; */
-using regex_constants::match_all;
-using regex_constants::match_perl;
-using regex_constants::match_posix;
-using regex_constants::match_nosubs;
-using regex_constants::match_extra;
-using regex_constants::match_single_line;
-/*using regex_constants::match_max; */
-using regex_constants::format_all;
-using regex_constants::format_sed;
-using regex_constants::format_perl;
-using regex_constants::format_default;
-using regex_constants::format_no_copy;
-using regex_constants::format_first_only;
-/*using regex_constants::format_is_if;*/
-
-} /* namespace boost */
-#endif /* __cplusplus */
-#endif /* include guard */
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/match_results.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/match_results.hpp
deleted file mode 100644
index c8233bdd874..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/match_results.hpp
+++ /dev/null
@@ -1,707 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2009
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE match_results.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares template class match_results.
- */
-
-#ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP
-#define BOOST_REGEX_V4_MATCH_RESULTS_HPP
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-namespace boost{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable : 4251 4231)
-# if BOOST_MSVC < 1600
-# pragma warning(disable : 4660)
-# endif
-#endif
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-class named_subexpressions;
-
-}
-
-template <class BidiIterator, class Allocator>
-class match_results
-{
-private:
-#ifndef BOOST_NO_STD_ALLOCATOR
- typedef std::vector<sub_match<BidiIterator>, Allocator> vector_type;
-#else
- typedef std::vector<sub_match<BidiIterator> > vector_type;
-#endif
-public:
- typedef sub_match<BidiIterator> value_type;
-#if !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION))
- typedef typename Allocator::const_reference const_reference;
-#else
- typedef const value_type& const_reference;
-#endif
- typedef const_reference reference;
- typedef typename vector_type::const_iterator const_iterator;
- typedef const_iterator iterator;
- typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<
- BidiIterator>::difference_type difference_type;
- typedef typename Allocator::size_type size_type;
- typedef Allocator allocator_type;
- typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<
- BidiIterator>::value_type char_type;
- typedef std::basic_string<char_type> string_type;
- typedef BOOST_REGEX_DETAIL_NS::named_subexpressions named_sub_type;
-
- // construct/copy/destroy:
- explicit match_results(const Allocator& a = Allocator())
-#ifndef BOOST_NO_STD_ALLOCATOR
- : m_subs(a), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) {}
-#else
- : m_subs(), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) { (void)a; }
-#endif
- //
- // IMPORTANT: in the code below, the crazy looking checks around m_is_singular are
- // all required because it is illegal to copy a singular iterator.
- // See https://svn.boost.org/trac/boost/ticket/3632.
- //
- match_results(const match_results& m)
- : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular)
- {
- if(!m_is_singular)
- {
- m_base = m.m_base;
- m_null = m.m_null;
- }
- }
- match_results& operator=(const match_results& m)
- {
- m_subs = m.m_subs;
- m_named_subs = m.m_named_subs;
- m_last_closed_paren = m.m_last_closed_paren;
- m_is_singular = m.m_is_singular;
- if(!m_is_singular)
- {
- m_base = m.m_base;
- m_null = m.m_null;
- }
- return *this;
- }
- ~match_results(){}
-
- // size:
- size_type size() const
- { return empty() ? 0 : m_subs.size() - 2; }
- size_type max_size() const
- { return m_subs.max_size(); }
- bool empty() const
- { return m_subs.size() < 2; }
- // element access:
- difference_type length(int sub = 0) const
- {
- if(m_is_singular)
- raise_logic_error();
- sub += 2;
- if((sub < (int)m_subs.size()) && (sub > 0))
- return m_subs[sub].length();
- return 0;
- }
- difference_type length(const char_type* sub) const
- {
- if(m_is_singular)
- raise_logic_error();
- const char_type* sub_end = sub;
- while(*sub_end) ++sub_end;
- return length(named_subexpression_index(sub, sub_end));
- }
- template <class charT>
- difference_type length(const charT* sub) const
- {
- if(m_is_singular)
- raise_logic_error();
- const charT* sub_end = sub;
- while(*sub_end) ++sub_end;
- return length(named_subexpression_index(sub, sub_end));
- }
- template <class charT, class Traits, class A>
- difference_type length(const std::basic_string<charT, Traits, A>& sub) const
- {
- return length(sub.c_str());
- }
- difference_type position(size_type sub = 0) const
- {
- if(m_is_singular)
- raise_logic_error();
- sub += 2;
- if(sub < m_subs.size())
- {
- const sub_match<BidiIterator>& s = m_subs[sub];
- if(s.matched || (sub == 2))
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::distance((BidiIterator)(m_base), (BidiIterator)(s.first));
- }
- }
- return ~static_cast<difference_type>(0);
- }
- difference_type position(const char_type* sub) const
- {
- const char_type* sub_end = sub;
- while(*sub_end) ++sub_end;
- return position(named_subexpression_index(sub, sub_end));
- }
- template <class charT>
- difference_type position(const charT* sub) const
- {
- const charT* sub_end = sub;
- while(*sub_end) ++sub_end;
- return position(named_subexpression_index(sub, sub_end));
- }
- template <class charT, class Traits, class A>
- difference_type position(const std::basic_string<charT, Traits, A>& sub) const
- {
- return position(sub.c_str());
- }
- string_type str(int sub = 0) const
- {
- if(m_is_singular)
- raise_logic_error();
- sub += 2;
- string_type result;
- if(sub < (int)m_subs.size() && (sub > 0))
- {
- const sub_match<BidiIterator>& s = m_subs[sub];
- if(s.matched)
- {
- result = s.str();
- }
- }
- return result;
- }
- string_type str(const char_type* sub) const
- {
- return (*this)[sub].str();
- }
- template <class Traits, class A>
- string_type str(const std::basic_string<char_type, Traits, A>& sub) const
- {
- return (*this)[sub].str();
- }
- template <class charT>
- string_type str(const charT* sub) const
- {
- return (*this)[sub].str();
- }
- template <class charT, class Traits, class A>
- string_type str(const std::basic_string<charT, Traits, A>& sub) const
- {
- return (*this)[sub].str();
- }
- const_reference operator[](int sub) const
- {
- if(m_is_singular && m_subs.empty())
- raise_logic_error();
- sub += 2;
- if(sub < (int)m_subs.size() && (sub >= 0))
- {
- return m_subs[sub];
- }
- return m_null;
- }
- //
- // Named sub-expressions:
- //
- const_reference named_subexpression(const char_type* i, const char_type* j) const
- {
- //
- // Scan for the leftmost *matched* subexpression with the specified named:
- //
- if(m_is_singular)
- raise_logic_error();
- BOOST_REGEX_DETAIL_NS::named_subexpressions::range_type r = m_named_subs->equal_range(i, j);
- while((r.first != r.second) && ((*this)[r.first->index].matched == false))
- ++r.first;
- return r.first != r.second ? (*this)[r.first->index] : m_null;
- }
- template <class charT>
- const_reference named_subexpression(const charT* i, const charT* j) const
- {
- BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
- if(i == j)
- return m_null;
- std::vector<char_type> s;
- while(i != j)
- s.insert(s.end(), *i++);
- return named_subexpression(&*s.begin(), &*s.begin() + s.size());
- }
- int named_subexpression_index(const char_type* i, const char_type* j) const
- {
- //
- // Scan for the leftmost *matched* subexpression with the specified named.
- // If none found then return the leftmost expression with that name,
- // otherwise an invalid index:
- //
- if(m_is_singular)
- raise_logic_error();
- BOOST_REGEX_DETAIL_NS::named_subexpressions::range_type s, r;
- s = r = m_named_subs->equal_range(i, j);
- while((r.first != r.second) && ((*this)[r.first->index].matched == false))
- ++r.first;
- if(r.first == r.second)
- r = s;
- return r.first != r.second ? r.first->index : -20;
- }
- template <class charT>
- int named_subexpression_index(const charT* i, const charT* j) const
- {
- BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
- if(i == j)
- return -20;
- std::vector<char_type> s;
- while(i != j)
- s.insert(s.end(), *i++);
- return named_subexpression_index(&*s.begin(), &*s.begin() + s.size());
- }
- template <class Traits, class A>
- const_reference operator[](const std::basic_string<char_type, Traits, A>& s) const
- {
- return named_subexpression(s.c_str(), s.c_str() + s.size());
- }
- const_reference operator[](const char_type* p) const
- {
- const char_type* e = p;
- while(*e) ++e;
- return named_subexpression(p, e);
- }
-
- template <class charT>
- const_reference operator[](const charT* p) const
- {
- BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
- if(*p == 0)
- return m_null;
- std::vector<char_type> s;
- while(*p)
- s.insert(s.end(), *p++);
- return named_subexpression(&*s.begin(), &*s.begin() + s.size());
- }
- template <class charT, class Traits, class A>
- const_reference operator[](const std::basic_string<charT, Traits, A>& ns) const
- {
- BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
- if(ns.empty())
- return m_null;
- std::vector<char_type> s;
- for(unsigned i = 0; i < ns.size(); ++i)
- s.insert(s.end(), ns[i]);
- return named_subexpression(&*s.begin(), &*s.begin() + s.size());
- }
-
- const_reference prefix() const
- {
- if(m_is_singular)
- raise_logic_error();
- return (*this)[-1];
- }
-
- const_reference suffix() const
- {
- if(m_is_singular)
- raise_logic_error();
- return (*this)[-2];
- }
- const_iterator begin() const
- {
- return (m_subs.size() > 2) ? (m_subs.begin() + 2) : m_subs.end();
- }
- const_iterator end() const
- {
- return m_subs.end();
- }
- // format:
- template <class OutputIterator, class Functor>
- OutputIterator format(OutputIterator out,
- Functor fmt,
- match_flag_type flags = format_default) const
- {
- if(m_is_singular)
- raise_logic_error();
- typedef typename BOOST_REGEX_DETAIL_NS::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, OutputIterator>::type F;
- F func(fmt);
- return func(*this, out, flags);
- }
- template <class Functor>
- string_type format(Functor fmt, match_flag_type flags = format_default) const
- {
- if(m_is_singular)
- raise_logic_error();
- std::basic_string<char_type> result;
- BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<char_type> > i(result);
-
- typedef typename BOOST_REGEX_DETAIL_NS::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<char_type> > >::type F;
- F func(fmt);
-
- func(*this, i, flags);
- return result;
- }
- // format with locale:
- template <class OutputIterator, class Functor, class RegexT>
- OutputIterator format(OutputIterator out,
- Functor fmt,
- match_flag_type flags,
- const RegexT& re) const
- {
- if(m_is_singular)
- raise_logic_error();
- typedef ::boost::regex_traits_wrapper<typename RegexT::traits_type> traits_type;
- typedef typename BOOST_REGEX_DETAIL_NS::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, OutputIterator, traits_type>::type F;
- F func(fmt);
- return func(*this, out, flags, re.get_traits());
- }
- template <class RegexT, class Functor>
- string_type format(Functor fmt,
- match_flag_type flags,
- const RegexT& re) const
- {
- if(m_is_singular)
- raise_logic_error();
- typedef ::boost::regex_traits_wrapper<typename RegexT::traits_type> traits_type;
- std::basic_string<char_type> result;
- BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<char_type> > i(result);
-
- typedef typename BOOST_REGEX_DETAIL_NS::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<char_type> >, traits_type >::type F;
- F func(fmt);
-
- func(*this, i, flags, re.get_traits());
- return result;
- }
-
- const_reference get_last_closed_paren()const
- {
- if(m_is_singular)
- raise_logic_error();
- return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren];
- }
-
- allocator_type get_allocator() const
- {
-#ifndef BOOST_NO_STD_ALLOCATOR
- return m_subs.get_allocator();
-#else
- return allocator_type();
-#endif
- }
- void swap(match_results& that)
- {
- std::swap(m_subs, that.m_subs);
- std::swap(m_named_subs, that.m_named_subs);
- std::swap(m_last_closed_paren, that.m_last_closed_paren);
- if(m_is_singular)
- {
- if(!that.m_is_singular)
- {
- m_base = that.m_base;
- m_null = that.m_null;
- }
- }
- else if(that.m_is_singular)
- {
- that.m_base = m_base;
- that.m_null = m_null;
- }
- else
- {
- std::swap(m_base, that.m_base);
- std::swap(m_null, that.m_null);
- }
- std::swap(m_is_singular, that.m_is_singular);
- }
- bool operator==(const match_results& that)const
- {
- if(m_is_singular)
- {
- return that.m_is_singular;
- }
- else if(that.m_is_singular)
- {
- return false;
- }
- return (m_subs == that.m_subs) && (m_base == that.m_base) && (m_last_closed_paren == that.m_last_closed_paren);
- }
- bool operator!=(const match_results& that)const
- { return !(*this == that); }
-
-#ifdef BOOST_REGEX_MATCH_EXTRA
- typedef typename sub_match<BidiIterator>::capture_sequence_type capture_sequence_type;
-
- const capture_sequence_type& captures(int i)const
- {
- if(m_is_singular)
- raise_logic_error();
- return (*this)[i].captures();
- }
-#endif
-
- //
- // private access functions:
- void BOOST_REGEX_CALL set_second(BidiIterator i)
- {
- BOOST_ASSERT(m_subs.size() > 2);
- m_subs[2].second = i;
- m_subs[2].matched = true;
- m_subs[0].first = i;
- m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
- m_null.first = i;
- m_null.second = i;
- m_null.matched = false;
- m_is_singular = false;
- }
-
- void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false)
- {
- if(pos)
- m_last_closed_paren = static_cast<int>(pos);
- pos += 2;
- BOOST_ASSERT(m_subs.size() > pos);
- m_subs[pos].second = i;
- m_subs[pos].matched = m;
- if((pos == 2) && !escape_k)
- {
- m_subs[0].first = i;
- m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
- m_null.first = i;
- m_null.second = i;
- m_null.matched = false;
- m_is_singular = false;
- }
- }
- void BOOST_REGEX_CALL set_size(size_type n, BidiIterator i, BidiIterator j)
- {
- value_type v(j);
- size_type len = m_subs.size();
- if(len > n + 2)
- {
- m_subs.erase(m_subs.begin()+n+2, m_subs.end());
- std::fill(m_subs.begin(), m_subs.end(), v);
- }
- else
- {
- std::fill(m_subs.begin(), m_subs.end(), v);
- if(n+2 != len)
- m_subs.insert(m_subs.end(), n+2-len, v);
- }
- m_subs[1].first = i;
- m_last_closed_paren = 0;
- }
- void BOOST_REGEX_CALL set_base(BidiIterator pos)
- {
- m_base = pos;
- }
- BidiIterator base()const
- {
- return m_base;
- }
- void BOOST_REGEX_CALL set_first(BidiIterator i)
- {
- BOOST_ASSERT(m_subs.size() > 2);
- // set up prefix:
- m_subs[1].second = i;
- m_subs[1].matched = (m_subs[1].first != i);
- // set up $0:
- m_subs[2].first = i;
- // zero out everything else:
- for(size_type n = 3; n < m_subs.size(); ++n)
- {
- m_subs[n].first = m_subs[n].second = m_subs[0].second;
- m_subs[n].matched = false;
- }
- }
- void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos, bool escape_k = false)
- {
- BOOST_ASSERT(pos+2 < m_subs.size());
- if(pos || escape_k)
- {
- m_subs[pos+2].first = i;
- if(escape_k)
- {
- m_subs[1].second = i;
- m_subs[1].matched = (m_subs[1].first != m_subs[1].second);
- }
- }
- else
- set_first(i);
- }
- void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m);
-
- void BOOST_REGEX_CALL set_named_subs(boost::shared_ptr<named_sub_type> subs)
- {
- m_named_subs = subs;
- }
-
-private:
- //
- // Error handler called when an uninitialized match_results is accessed:
- //
- static void raise_logic_error()
- {
- std::logic_error e("Attempt to access an uninitialzed boost::match_results<> class.");
- boost::throw_exception(e);
- }
-
-
- vector_type m_subs; // subexpressions
- BidiIterator m_base; // where the search started from
- sub_match<BidiIterator> m_null; // a null match
- boost::shared_ptr<named_sub_type> m_named_subs; // Shared copy of named subs in the regex object
- int m_last_closed_paren; // Last ) to be seen - used for formatting
- bool m_is_singular; // True if our stored iterators are singular
-};
-
-template <class BidiIterator, class Allocator>
-void BOOST_REGEX_CALL match_results<BidiIterator, Allocator>::maybe_assign(const match_results<BidiIterator, Allocator>& m)
-{
- if(m_is_singular)
- {
- *this = m;
- return;
- }
- const_iterator p1, p2;
- p1 = begin();
- p2 = m.begin();
- //
- // Distances are measured from the start of *this* match, unless this isn't
- // a valid match in which case we use the start of the whole sequence. Note that
- // no subsequent match-candidate can ever be to the left of the first match found.
- // This ensures that when we are using bidirectional iterators, that distances
- // measured are as short as possible, and therefore as efficient as possible
- // to compute. Finally note that we don't use the "matched" data member to test
- // whether a sub-expression is a valid match, because partial matches set this
- // to false for sub-expression 0.
- //
- BidiIterator l_end = this->suffix().second;
- BidiIterator l_base = (p1->first == l_end) ? this->prefix().first : (*this)[0].first;
- difference_type len1 = 0;
- difference_type len2 = 0;
- difference_type base1 = 0;
- difference_type base2 = 0;
- std::size_t i;
- for(i = 0; i < size(); ++i, ++p1, ++p2)
- {
- //
- // Leftmost takes priority over longest; handle special cases
- // where distances need not be computed first (an optimisation
- // for bidirectional iterators: ensure that we don't accidently
- // compute the length of the whole sequence, as this can be really
- // expensive).
- //
- if(p1->first == l_end)
- {
- if(p2->first != l_end)
- {
- // p2 must be better than p1, and no need to calculate
- // actual distances:
- base1 = 1;
- base2 = 0;
- break;
- }
- else
- {
- // *p1 and *p2 are either unmatched or match end-of sequence,
- // either way no need to calculate distances:
- if((p1->matched == false) && (p2->matched == true))
- break;
- if((p1->matched == true) && (p2->matched == false))
- return;
- continue;
- }
- }
- else if(p2->first == l_end)
- {
- // p1 better than p2, and no need to calculate distances:
- return;
- }
- base1 = ::boost::BOOST_REGEX_DETAIL_NS::distance(l_base, p1->first);
- base2 = ::boost::BOOST_REGEX_DETAIL_NS::distance(l_base, p2->first);
- BOOST_ASSERT(base1 >= 0);
- BOOST_ASSERT(base2 >= 0);
- if(base1 < base2) return;
- if(base2 < base1) break;
-
- len1 = ::boost::BOOST_REGEX_DETAIL_NS::distance((BidiIterator)p1->first, (BidiIterator)p1->second);
- len2 = ::boost::BOOST_REGEX_DETAIL_NS::distance((BidiIterator)p2->first, (BidiIterator)p2->second);
- BOOST_ASSERT(len1 >= 0);
- BOOST_ASSERT(len2 >= 0);
- if((len1 != len2) || ((p1->matched == false) && (p2->matched == true)))
- break;
- if((p1->matched == true) && (p2->matched == false))
- return;
- }
- if(i == size())
- return;
- if(base2 < base1)
- *this = m;
- else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) )
- *this = m;
-}
-
-template <class BidiIterator, class Allocator>
-void swap(match_results<BidiIterator, Allocator>& a, match_results<BidiIterator, Allocator>& b)
-{
- a.swap(b);
-}
-
-#ifndef BOOST_NO_STD_LOCALE
-template <class charT, class traits, class BidiIterator, class Allocator>
-std::basic_ostream<charT, traits>&
- operator << (std::basic_ostream<charT, traits>& os,
- const match_results<BidiIterator, Allocator>& s)
-{
- return (os << s.str());
-}
-#else
-template <class BidiIterator, class Allocator>
-std::ostream& operator << (std::ostream& os,
- const match_results<BidiIterator, Allocator>& s)
-{
- return (os << s.str());
-}
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-} // namespace boost
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher.hpp
deleted file mode 100644
index a696e5d99b5..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher.hpp
+++ /dev/null
@@ -1,621 +0,0 @@
-/*
- *
- * Copyright (c) 2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
-#ifndef BOOST_REGEX_MATCHER_HPP
-#define BOOST_REGEX_MATCHER_HPP
-
-#include <boost/regex/v4/iterator_category.hpp>
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4800)
-#endif
-
-namespace boost{
-namespace BOOST_REGEX_DETAIL_NS{
-
-//
-// error checking API:
-//
-BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex_constants::syntax_option_type ef, match_flag_type mf);
-//
-// function can_start:
-//
-template <class charT>
-inline bool can_start(charT c, const unsigned char* map, unsigned char mask)
-{
- return ((c < static_cast<charT>(0)) ? true : ((c >= static_cast<charT>(1 << CHAR_BIT)) ? true : map[c] & mask));
-}
-inline bool can_start(char c, const unsigned char* map, unsigned char mask)
-{
- return map[(unsigned char)c] & mask;
-}
-inline bool can_start(signed char c, const unsigned char* map, unsigned char mask)
-{
- return map[(unsigned char)c] & mask;
-}
-inline bool can_start(unsigned char c, const unsigned char* map, unsigned char mask)
-{
- return map[c] & mask;
-}
-inline bool can_start(unsigned short c, const unsigned char* map, unsigned char mask)
-{
- return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask);
-}
-#if !defined(__hpux) && !defined(__WINSCW__)// WCHAR_MIN not usable in pp-directives.
-#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask)
-{
- return ((c >= static_cast<wchar_t>(1u << CHAR_BIT)) ? true : map[c] & mask);
-}
-#endif
-#endif
-#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-inline bool can_start(unsigned int c, const unsigned char* map, unsigned char mask)
-{
- return (((c >= static_cast<unsigned int>(1u << CHAR_BIT)) ? true : map[c] & mask));
-}
-#endif
-
-
-//
-// Unfortunately Rogue Waves standard library appears to have a bug
-// in std::basic_string::compare that results in eroneous answers
-// in some cases (tested with Borland C++ 5.1, Rogue Wave lib version
-// 0x020101) the test case was:
-// {39135,0} < {0xff,0}
-// which succeeds when it should not.
-//
-#ifndef _RWSTD_VER
-template <class C, class T, class A>
-inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
-{
- if(0 == *p)
- {
- if(s.empty() || ((s.size() == 1) && (s[0] == 0)))
- return 0;
- }
- return s.compare(p);
-}
-#else
-template <class C, class T, class A>
-inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
-{
- if(0 == *p)
- {
- if(s.empty() || ((s.size() == 1) && (s[0] == 0)))
- return 0;
- }
- return s.compare(p);
-}
-inline int string_compare(const std::string& s, const char* p)
-{ return std::strcmp(s.c_str(), p); }
-# ifndef BOOST_NO_WREGEX
-inline int string_compare(const std::wstring& s, const wchar_t* p)
-{ return std::wcscmp(s.c_str(), p); }
-#endif
-#endif
-template <class Seq, class C>
-inline int string_compare(const Seq& s, const C* p)
-{
- std::size_t i = 0;
- while((i < s.size()) && (p[i] == s[i]))
- {
- ++i;
- }
- return (i == s.size()) ? -(int)p[i] : (int)s[i] - (int)p[i];
-}
-# define STR_COMP(s,p) string_compare(s,p)
-
-template<class charT>
-inline const charT* re_skip_past_null(const charT* p)
-{
- while (*p != static_cast<charT>(0)) ++p;
- return ++p;
-}
-
-template <class iterator, class charT, class traits_type, class char_classT>
-iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
- iterator last,
- const re_set_long<char_classT>* set_,
- const regex_data<charT, traits_type>& e, bool icase)
-{
- const charT* p = reinterpret_cast<const charT*>(set_+1);
- iterator ptr;
- unsigned int i;
- //bool icase = e.m_flags & regex_constants::icase;
-
- if(next == last) return next;
-
- typedef typename traits_type::string_type traits_string_type;
- const ::boost::regex_traits_wrapper<traits_type>& traits_inst = *(e.m_ptraits);
-
- // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
- // referenced
- (void)traits_inst;
-
- // try and match a single character, could be a multi-character
- // collating element...
- for(i = 0; i < set_->csingles; ++i)
- {
- ptr = next;
- if(*p == static_cast<charT>(0))
- {
- // treat null string as special case:
- if(traits_inst.translate(*ptr, icase))
- {
- ++p;
- continue;
- }
- return set_->isnot ? next : (ptr == next) ? ++next : ptr;
- }
- else
- {
- while(*p && (ptr != last))
- {
- if(traits_inst.translate(*ptr, icase) != *p)
- break;
- ++p;
- ++ptr;
- }
-
- if(*p == static_cast<charT>(0)) // if null we've matched
- return set_->isnot ? next : (ptr == next) ? ++next : ptr;
-
- p = re_skip_past_null(p); // skip null
- }
- }
-
- charT col = traits_inst.translate(*next, icase);
-
-
- if(set_->cranges || set_->cequivalents)
- {
- traits_string_type s1;
- //
- // try and match a range, NB only a single character can match
- if(set_->cranges)
- {
- if((e.m_flags & regex_constants::collate) == 0)
- s1.assign(1, col);
- else
- {
- charT a[2] = { col, charT(0), };
- s1 = traits_inst.transform(a, a + 1);
- }
- for(i = 0; i < set_->cranges; ++i)
- {
- if(STR_COMP(s1, p) >= 0)
- {
- do{ ++p; }while(*p);
- ++p;
- if(STR_COMP(s1, p) <= 0)
- return set_->isnot ? next : ++next;
- }
- else
- {
- // skip first string
- do{ ++p; }while(*p);
- ++p;
- }
- // skip second string
- do{ ++p; }while(*p);
- ++p;
- }
- }
- //
- // try and match an equivalence class, NB only a single character can match
- if(set_->cequivalents)
- {
- charT a[2] = { col, charT(0), };
- s1 = traits_inst.transform_primary(a, a +1);
- for(i = 0; i < set_->cequivalents; ++i)
- {
- if(STR_COMP(s1, p) == 0)
- return set_->isnot ? next : ++next;
- // skip string
- do{ ++p; }while(*p);
- ++p;
- }
- }
- }
- if(traits_inst.isctype(col, set_->cclasses) == true)
- return set_->isnot ? next : ++next;
- if((set_->cnclasses != 0) && (traits_inst.isctype(col, set_->cnclasses) == false))
- return set_->isnot ? next : ++next;
- return set_->isnot ? ++next : next;
-}
-
-template <class BidiIterator>
-class repeater_count
-{
- repeater_count** stack;
- repeater_count* next;
- int state_id;
- std::size_t count; // the number of iterations so far
- BidiIterator start_pos; // where the last repeat started
-
- repeater_count* unwind_until(int n, repeater_count* p, int current_recursion_id)
- {
- while(p && (p->state_id != n))
- {
- if(-2 - current_recursion_id == p->state_id)
- return 0;
- p = p->next;
- if(p && (p->state_id < 0))
- {
- p = unwind_until(p->state_id, p, current_recursion_id);
- if(!p)
- return p;
- p = p->next;
- }
- }
- return p;
- }
-public:
- repeater_count(repeater_count** s) : stack(s), next(0), state_id(-1), count(0), start_pos() {}
-
- repeater_count(int i, repeater_count** s, BidiIterator start, int current_recursion_id)
- : start_pos(start)
- {
- state_id = i;
- stack = s;
- next = *stack;
- *stack = this;
- if((state_id > next->state_id) && (next->state_id >= 0))
- count = 0;
- else
- {
- repeater_count* p = next;
- p = unwind_until(state_id, p, current_recursion_id);
- if(p)
- {
- count = p->count;
- start_pos = p->start_pos;
- }
- else
- count = 0;
- }
- }
- ~repeater_count()
- {
- if(next)
- *stack = next;
- }
- std::size_t get_count() { return count; }
- int get_id() { return state_id; }
- std::size_t operator++() { return ++count; }
- bool check_null_repeat(const BidiIterator& pos, std::size_t max)
- {
- // this is called when we are about to start a new repeat,
- // if the last one was NULL move our count to max,
- // otherwise save the current position.
- bool result = (count == 0) ? false : (pos == start_pos);
- if(result)
- count = max;
- else
- start_pos = pos;
- return result;
- }
-};
-
-struct saved_state;
-
-enum saved_state_type
-{
- saved_type_end = 0,
- saved_type_paren = 1,
- saved_type_recurse = 2,
- saved_type_assertion = 3,
- saved_state_alt = 4,
- saved_state_repeater_count = 5,
- saved_state_extra_block = 6,
- saved_state_greedy_single_repeat = 7,
- saved_state_rep_slow_dot = 8,
- saved_state_rep_fast_dot = 9,
- saved_state_rep_char = 10,
- saved_state_rep_short_set = 11,
- saved_state_rep_long_set = 12,
- saved_state_non_greedy_long_repeat = 13,
- saved_state_count = 14
-};
-
-template <class Results>
-struct recursion_info
-{
- typedef typename Results::value_type value_type;
- typedef typename value_type::iterator iterator;
- int idx;
- const re_syntax_base* preturn_address;
- Results results;
- repeater_count<iterator>* repeater_stack;
- iterator location_of_start;
-};
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable : 4251 4231)
-# if BOOST_MSVC < 1600
-# pragma warning(disable : 4660)
-# endif
-#endif
-
-template <class BidiIterator, class Allocator, class traits>
-class perl_matcher
-{
-public:
- typedef typename traits::char_type char_type;
- typedef perl_matcher<BidiIterator, Allocator, traits> self_type;
- typedef bool (self_type::*matcher_proc_type)(void);
- typedef std::size_t traits_size_type;
- typedef typename is_byte<char_type>::width_type width_type;
- typedef typename regex_iterator_traits<BidiIterator>::difference_type difference_type;
- typedef match_results<BidiIterator, Allocator> results_type;
-
- perl_matcher(BidiIterator first, BidiIterator end,
- match_results<BidiIterator, Allocator>& what,
- const basic_regex<char_type, traits>& e,
- match_flag_type f,
- BidiIterator l_base)
- : m_result(what), base(first), last(end),
- position(first), backstop(l_base), re(e), traits_inst(e.get_traits()),
- m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
-#ifdef BOOST_REGEX_NON_RECURSIVE
- , m_recursions(0)
-#endif
- {
- construct_init(e, f);
- }
-
- bool match();
- bool find();
-
- void setf(match_flag_type f)
- { m_match_flags |= f; }
- void unsetf(match_flag_type f)
- { m_match_flags &= ~f; }
-
-private:
- void construct_init(const basic_regex<char_type, traits>& e, match_flag_type f);
-
- bool find_imp();
- bool match_imp();
-#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
- typedef bool (perl_matcher::*protected_proc_type)();
- bool protected_call(protected_proc_type);
-#endif
- void estimate_max_state_count(std::random_access_iterator_tag*);
- void estimate_max_state_count(void*);
- bool match_prefix();
- bool match_all_states();
-
- // match procs, stored in s_match_vtable:
- bool match_startmark();
- bool match_endmark();
- bool match_literal();
- bool match_start_line();
- bool match_end_line();
- bool match_wild();
- bool match_match();
- bool match_word_boundary();
- bool match_within_word();
- bool match_word_start();
- bool match_word_end();
- bool match_buffer_start();
- bool match_buffer_end();
- bool match_backref();
- bool match_long_set();
- bool match_set();
- bool match_jump();
- bool match_alt();
- bool match_rep();
- bool match_combining();
- bool match_soft_buffer_end();
- bool match_restart_continue();
- bool match_long_set_repeat();
- bool match_set_repeat();
- bool match_char_repeat();
- bool match_dot_repeat_fast();
- bool match_dot_repeat_slow();
- bool match_dot_repeat_dispatch()
- {
- return ::boost::is_random_access_iterator<BidiIterator>::value ? match_dot_repeat_fast() : match_dot_repeat_slow();
- }
- bool match_backstep();
- bool match_assert_backref();
- bool match_toggle_case();
-#ifdef BOOST_REGEX_RECURSIVE
- bool backtrack_till_match(std::size_t count);
-#endif
- bool match_recursion();
- bool match_fail();
- bool match_accept();
- bool match_commit();
- bool match_then();
- bool skip_until_paren(int index, bool match = true);
-
- // find procs stored in s_find_vtable:
- bool find_restart_any();
- bool find_restart_word();
- bool find_restart_line();
- bool find_restart_buf();
- bool find_restart_lit();
-
-private:
- // final result structure to be filled in:
- match_results<BidiIterator, Allocator>& m_result;
- // temporary result for POSIX matches:
- scoped_ptr<match_results<BidiIterator, Allocator> > m_temp_match;
- // pointer to actual result structure to fill in:
- match_results<BidiIterator, Allocator>* m_presult;
- // start of sequence being searched:
- BidiIterator base;
- // end of sequence being searched:
- BidiIterator last;
- // current character being examined:
- BidiIterator position;
- // where to restart next search after failed match attempt:
- BidiIterator restart;
- // where the current search started from, acts as base for $` during grep:
- BidiIterator search_base;
- // how far we can go back when matching lookbehind:
- BidiIterator backstop;
- // the expression being examined:
- const basic_regex<char_type, traits>& re;
- // the expression's traits class:
- const ::boost::regex_traits_wrapper<traits>& traits_inst;
- // the next state in the machine being matched:
- const re_syntax_base* pstate;
- // matching flags in use:
- match_flag_type m_match_flags;
- // how many states we have examined so far:
- std::ptrdiff_t state_count;
- // max number of states to examine before giving up:
- std::ptrdiff_t max_state_count;
- // whether we should ignore case or not:
- bool icase;
- // set to true when (position == last), indicates that we may have a partial match:
- bool m_has_partial_match;
- // set to true whenever we get a match:
- bool m_has_found_match;
- // set to true whenever we're inside an independent sub-expression:
- bool m_independent;
- // the current repeat being examined:
- repeater_count<BidiIterator>* next_count;
- // the first repeat being examined (top of linked list):
- repeater_count<BidiIterator> rep_obj;
- // the mask to pass when matching word boundaries:
- typename traits::char_class_type m_word_mask;
- // the bitmask to use when determining whether a match_any matches a newline or not:
- unsigned char match_any_mask;
- // recursion information:
- std::vector<recursion_info<results_type> > recursion_stack;
-#ifdef BOOST_REGEX_RECURSIVE
- // Set to false by a (*COMMIT):
- bool m_can_backtrack;
- bool m_have_accept;
- bool m_have_then;
-#endif
-#ifdef BOOST_REGEX_NON_RECURSIVE
- //
- // additional members for non-recursive version:
- //
- typedef bool (self_type::*unwind_proc_type)(bool);
-
- void extend_stack();
- bool unwind(bool);
- bool unwind_end(bool);
- bool unwind_paren(bool);
- bool unwind_recursion_stopper(bool);
- bool unwind_assertion(bool);
- bool unwind_alt(bool);
- bool unwind_repeater_counter(bool);
- bool unwind_extra_block(bool);
- bool unwind_greedy_single_repeat(bool);
- bool unwind_slow_dot_repeat(bool);
- bool unwind_fast_dot_repeat(bool);
- bool unwind_char_repeat(bool);
- bool unwind_short_set_repeat(bool);
- bool unwind_long_set_repeat(bool);
- bool unwind_non_greedy_repeat(bool);
- bool unwind_recursion(bool);
- bool unwind_recursion_pop(bool);
- bool unwind_commit(bool);
- bool unwind_then(bool);
- bool unwind_case(bool);
- void destroy_single_repeat();
- void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
- void push_recursion_stopper();
- void push_assertion(const re_syntax_base* ps, bool positive);
- void push_alt(const re_syntax_base* ps);
- void push_repeater_count(int i, repeater_count<BidiIterator>** s);
- void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id);
- void push_non_greedy_repeat(const re_syntax_base* ps);
- void push_recursion(int idx, const re_syntax_base* p, results_type* presults, results_type* presults2);
- void push_recursion_pop();
- void push_case_change(bool);
-
- // pointer to base of stack:
- saved_state* m_stack_base;
- // pointer to current stack position:
- saved_state* m_backup_state;
- // how many memory blocks have we used up?:
- unsigned used_block_count;
- // determines what value to return when unwinding from recursion,
- // allows for mixed recursive/non-recursive algorithm:
- bool m_recursive_result;
- // We have unwound to a lookahead/lookbehind, used by COMMIT/PRUNE/SKIP:
- bool m_unwound_lookahead;
- // We have unwound to an alternative, used by THEN:
- bool m_unwound_alt;
- // We are unwinding a commit - used by independent subs to determine whether to stop there or carry on unwinding:
- //bool m_unwind_commit;
- // Recursion limit:
- unsigned m_recursions;
-#endif
-
- // these operations aren't allowed, so are declared private,
- // bodies are provided to keep explicit-instantiation requests happy:
- perl_matcher& operator=(const perl_matcher&)
- {
- return *this;
- }
- perl_matcher(const perl_matcher& that)
- : m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {}
-};
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespace BOOST_REGEX_DETAIL_NS
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespace boost
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-//
-// include the implementation of perl_matcher:
-//
-#ifdef BOOST_REGEX_RECURSIVE
-#include <boost/regex/v4/perl_matcher_recursive.hpp>
-#else
-#include <boost/regex/v4/perl_matcher_non_recursive.hpp>
-#endif
-// this one has to be last:
-#include <boost/regex/v4/perl_matcher_common.hpp>
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_common.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_common.hpp
deleted file mode 100644
index a0973da92a6..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_common.hpp
+++ /dev/null
@@ -1,1016 +0,0 @@
-/*
- *
- * Copyright (c) 2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE perl_matcher_common.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Definitions of perl_matcher member functions that are
- * common to both the recursive and non-recursive versions.
- */
-
-#ifndef BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP
-#define BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#ifdef __BORLANDC__
-# pragma option push -w-8008 -w-8066
-#endif
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4800)
-#endif
-
-namespace boost{
-namespace BOOST_REGEX_DETAIL_NS{
-
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_regex<char_type, traits>& e, match_flag_type f)
-{
- typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
- typedef typename basic_regex<char_type, traits>::flag_type expression_flag_type;
-
- if(e.empty())
- {
- // precondition failure: e is not a valid regex.
- std::invalid_argument ex("Invalid regular expression object");
- boost::throw_exception(ex);
- }
- pstate = 0;
- m_match_flags = f;
- estimate_max_state_count(static_cast<category*>(0));
- expression_flag_type re_f = re.flags();
- icase = re_f & regex_constants::icase;
- if(!(m_match_flags & (match_perl|match_posix)))
- {
- if((re_f & (regbase::main_option_type|regbase::no_perl_ex)) == 0)
- m_match_flags |= match_perl;
- else if((re_f & (regbase::main_option_type|regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex))
- m_match_flags |= match_perl;
- else if((re_f & (regbase::main_option_type|regbase::literal)) == (regbase::literal))
- m_match_flags |= match_perl;
- else
- m_match_flags |= match_posix;
- }
- if(m_match_flags & match_posix)
- {
- m_temp_match.reset(new match_results<BidiIterator, Allocator>());
- m_presult = m_temp_match.get();
- }
- else
- m_presult = &m_result;
-#ifdef BOOST_REGEX_NON_RECURSIVE
- m_stack_base = 0;
- m_backup_state = 0;
-#elif defined(BOOST_REGEX_RECURSIVE)
- m_can_backtrack = true;
- m_have_accept = false;
-#endif
- // find the value to use for matching word boundaries:
- m_word_mask = re.get_data().m_word_mask;
- // find bitmask to use for matching '.':
- match_any_mask = static_cast<unsigned char>((f & match_not_dot_newline) ? BOOST_REGEX_DETAIL_NS::test_not_newline : BOOST_REGEX_DETAIL_NS::test_newline);
- // Disable match_any if requested in the state machine:
- if(e.get_data().m_disable_match_any)
- m_match_flags &= regex_constants::match_not_any;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(std::random_access_iterator_tag*)
-{
- //
- // How many states should we allow our machine to visit before giving up?
- // This is a heuristic: it takes the greater of O(N^2) and O(NS^2)
- // where N is the length of the string, and S is the number of states
- // in the machine. It's tempting to up this to O(N^2S) or even O(N^2S^2)
- // but these take unreasonably amounts of time to bale out in pathological
- // cases.
- //
- // Calculate NS^2 first:
- //
- static const std::ptrdiff_t k = 100000;
- std::ptrdiff_t dist = boost::BOOST_REGEX_DETAIL_NS::distance(base, last);
- if(dist == 0)
- dist = 1;
- std::ptrdiff_t states = re.size();
- if(states == 0)
- states = 1;
- if ((std::numeric_limits<std::ptrdiff_t>::max)() / states < states)
- {
- max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
- return;
- }
- states *= states;
- if((std::numeric_limits<std::ptrdiff_t>::max)() / dist < states)
- {
- max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
- return;
- }
- states *= dist;
- if((std::numeric_limits<std::ptrdiff_t>::max)() - k < states)
- {
- max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
- return;
- }
- states += k;
-
- max_state_count = states;
-
- //
- // Now calculate N^2:
- //
- states = dist;
- if((std::numeric_limits<std::ptrdiff_t>::max)() / dist < states)
- {
- max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
- return;
- }
- states *= dist;
- if((std::numeric_limits<std::ptrdiff_t>::max)() - k < states)
- {
- max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
- return;
- }
- states += k;
- //
- // N^2 can be a very large number indeed, to prevent things getting out
- // of control, cap the max states:
- //
- if(states > BOOST_REGEX_MAX_STATE_COUNT)
- states = BOOST_REGEX_MAX_STATE_COUNT;
- //
- // If (the possibly capped) N^2 is larger than our first estimate,
- // use this instead:
- //
- if(states > max_state_count)
- max_state_count = states;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(void*)
-{
- // we don't know how long the sequence is:
- max_state_count = BOOST_REGEX_MAX_STATE_COUNT;
-}
-
-#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
-template <class BidiIterator, class Allocator, class traits>
-inline bool perl_matcher<BidiIterator, Allocator, traits>::protected_call(
- protected_proc_type proc)
-{
- ::boost::BOOST_REGEX_DETAIL_NS::concrete_protected_call
- <perl_matcher<BidiIterator, Allocator, traits> >
- obj(this, proc);
- return obj.execute();
-
-}
-#endif
-
-template <class BidiIterator, class Allocator, class traits>
-inline bool perl_matcher<BidiIterator, Allocator, traits>::match()
-{
-#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
- return protected_call(&perl_matcher<BidiIterator, Allocator, traits>::match_imp);
-#else
- return match_imp();
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()
-{
- // initialise our stack if we are non-recursive:
-#ifdef BOOST_REGEX_NON_RECURSIVE
- save_state_init init(&m_stack_base, &m_backup_state);
- used_block_count = BOOST_REGEX_MAX_BLOCKS;
-#if !defined(BOOST_NO_EXCEPTIONS)
- try{
-#endif
-#endif
-
- // reset our state machine:
- position = base;
- search_base = base;
- state_count = 0;
- m_match_flags |= regex_constants::match_all;
- m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), search_base, last);
- m_presult->set_base(base);
- m_presult->set_named_subs(this->re.get_named_subs());
- if(m_match_flags & match_posix)
- m_result = *m_presult;
- verify_options(re.flags(), m_match_flags);
- if(0 == match_prefix())
- return false;
- return (m_result[0].second == last) && (m_result[0].first == base);
-
-#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
- }
- catch(...)
- {
- // unwind all pushed states, apart from anything else this
- // ensures that all the states are correctly destructed
- // not just the memory freed.
- while(unwind(true)){}
- throw;
- }
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline bool perl_matcher<BidiIterator, Allocator, traits>::find()
-{
-#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
- return protected_call(&perl_matcher<BidiIterator, Allocator, traits>::find_imp);
-#else
- return find_imp();
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
-{
- static matcher_proc_type const s_find_vtable[7] =
- {
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_any,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_word,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_line,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_buf,
- &perl_matcher<BidiIterator, Allocator, traits>::match_prefix,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit,
- &perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit,
- };
-
- // initialise our stack if we are non-recursive:
-#ifdef BOOST_REGEX_NON_RECURSIVE
- save_state_init init(&m_stack_base, &m_backup_state);
- used_block_count = BOOST_REGEX_MAX_BLOCKS;
-#if !defined(BOOST_NO_EXCEPTIONS)
- try{
-#endif
-#endif
-
- state_count = 0;
- if((m_match_flags & regex_constants::match_init) == 0)
- {
- // reset our state machine:
- search_base = position = base;
- pstate = re.get_first_state();
- m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), base, last);
- m_presult->set_base(base);
- m_presult->set_named_subs(this->re.get_named_subs());
- m_match_flags |= regex_constants::match_init;
- }
- else
- {
- // start again:
- search_base = position = m_result[0].second;
- // If last match was null and match_not_null was not set then increment
- // our start position, otherwise we go into an infinite loop:
- if(((m_match_flags & match_not_null) == 0) && (m_result.length() == 0))
- {
- if(position == last)
- return false;
- else
- ++position;
- }
- // reset $` start:
- m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), search_base, last);
- //if((base != search_base) && (base == backstop))
- // m_match_flags |= match_prev_avail;
- }
- if(m_match_flags & match_posix)
- {
- m_result.set_size(static_cast<typename results_type::size_type>(1u + re.mark_count()), base, last);
- m_result.set_base(base);
- }
-
- verify_options(re.flags(), m_match_flags);
- // find out what kind of expression we have:
- unsigned type = (m_match_flags & match_continuous) ?
- static_cast<unsigned int>(regbase::restart_continue)
- : static_cast<unsigned int>(re.get_restart_type());
-
- // call the appropriate search routine:
- matcher_proc_type proc = s_find_vtable[type];
- return (this->*proc)();
-
-#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
- }
- catch(...)
- {
- // unwind all pushed states, apart from anything else this
- // ensures that all the states are correctly destructed
- // not just the memory freed.
- while(unwind(true)){}
- throw;
- }
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_prefix()
-{
- m_has_partial_match = false;
- m_has_found_match = false;
- pstate = re.get_first_state();
- m_presult->set_first(position);
- restart = position;
- match_all_states();
- if(!m_has_found_match && m_has_partial_match && (m_match_flags & match_partial))
- {
- m_has_found_match = true;
- m_presult->set_second(last, 0, false);
- position = last;
- if((m_match_flags & match_posix) == match_posix)
- {
- m_result.maybe_assign(*m_presult);
- }
- }
-#ifdef BOOST_REGEX_MATCH_EXTRA
- if(m_has_found_match && (match_extra & m_match_flags))
- {
- //
- // we have a match, reverse the capture information:
- //
- for(unsigned i = 0; i < m_presult->size(); ++i)
- {
- typename sub_match<BidiIterator>::capture_sequence_type & seq = ((*m_presult)[i]).get_captures();
- std::reverse(seq.begin(), seq.end());
- }
- }
-#endif
- if(!m_has_found_match)
- position = restart; // reset search postion
-#ifdef BOOST_REGEX_RECURSIVE
- m_can_backtrack = true; // reset for further searches
-#endif
- return m_has_found_match;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_literal()
-{
- unsigned int len = static_cast<const re_literal*>(pstate)->length;
- const char_type* what = reinterpret_cast<const char_type*>(static_cast<const re_literal*>(pstate) + 1);
- //
- // compare string with what we stored in
- // our records:
- for(unsigned int i = 0; i < len; ++i, ++position)
- {
- if((position == last) || (traits_inst.translate(*position, icase) != what[i]))
- return false;
- }
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_start_line()
-{
- if(position == backstop)
- {
- if((m_match_flags & match_prev_avail) == 0)
- {
- if((m_match_flags & match_not_bol) == 0)
- {
- pstate = pstate->next.p;
- return true;
- }
- return false;
- }
- }
- else if(m_match_flags & match_single_line)
- return false;
-
- // check the previous value character:
- BidiIterator t(position);
- --t;
- if(position != last)
- {
- if(is_separator(*t) && !((*t == static_cast<char_type>('\r')) && (*position == static_cast<char_type>('\n'))) )
- {
- pstate = pstate->next.p;
- return true;
- }
- }
- else if(is_separator(*t))
- {
- pstate = pstate->next.p;
- return true;
- }
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_end_line()
-{
- if(position != last)
- {
- if(m_match_flags & match_single_line)
- return false;
- // we're not yet at the end so *first is always valid:
- if(is_separator(*position))
- {
- if((position != backstop) || (m_match_flags & match_prev_avail))
- {
- // check that we're not in the middle of \r\n sequence
- BidiIterator t(position);
- --t;
- if((*t == static_cast<char_type>('\r')) && (*position == static_cast<char_type>('\n')))
- {
- return false;
- }
- }
- pstate = pstate->next.p;
- return true;
- }
- }
- else if((m_match_flags & match_not_eol) == 0)
- {
- pstate = pstate->next.p;
- return true;
- }
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_wild()
-{
- if(position == last)
- return false;
- if(is_separator(*position) && ((match_any_mask & static_cast<const re_dot*>(pstate)->mask) == 0))
- return false;
- if((*position == char_type(0)) && (m_match_flags & match_not_dot_null))
- return false;
- pstate = pstate->next.p;
- ++position;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
-{
- bool b; // indcates whether next character is a word character
- if(position != last)
- {
- // prev and this character must be opposites:
- b = traits_inst.isctype(*position, m_word_mask);
- }
- else
- {
- b = (m_match_flags & match_not_eow) ? true : false;
- }
- if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
- {
- if(m_match_flags & match_not_bow)
- b ^= true;
- else
- b ^= false;
- }
- else
- {
- --position;
- b ^= traits_inst.isctype(*position, m_word_mask);
- ++position;
- }
- if(b)
- {
- pstate = pstate->next.p;
- return true;
- }
- return false; // no match if we get to here...
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
-{
- if(position == last)
- return false;
- // both prev and this character must be m_word_mask:
- bool prev = traits_inst.isctype(*position, m_word_mask);
- {
- bool b;
- if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
- return false;
- else
- {
- --position;
- b = traits_inst.isctype(*position, m_word_mask);
- ++position;
- }
- if(b == prev)
- {
- pstate = pstate->next.p;
- return true;
- }
- }
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_word_start()
-{
- if(position == last)
- return false; // can't be starting a word if we're already at the end of input
- if(!traits_inst.isctype(*position, m_word_mask))
- return false; // next character isn't a word character
- if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
- {
- if(m_match_flags & match_not_bow)
- return false; // no previous input
- }
- else
- {
- // otherwise inside buffer:
- BidiIterator t(position);
- --t;
- if(traits_inst.isctype(*t, m_word_mask))
- return false; // previous character not non-word
- }
- // OK we have a match:
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_word_end()
-{
- if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
- return false; // start of buffer can't be end of word
- BidiIterator t(position);
- --t;
- if(traits_inst.isctype(*t, m_word_mask) == false)
- return false; // previous character wasn't a word character
-
- if(position == last)
- {
- if(m_match_flags & match_not_eow)
- return false; // end of buffer but not end of word
- }
- else
- {
- // otherwise inside buffer:
- if(traits_inst.isctype(*position, m_word_mask))
- return false; // next character is a word character
- }
- pstate = pstate->next.p;
- return true; // if we fall through to here then we've succeeded
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start()
-{
- if((position != backstop) || (m_match_flags & match_not_bob))
- return false;
- // OK match:
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end()
-{
- if((position != last) || (m_match_flags & match_not_eob))
- return false;
- // OK match:
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_backref()
-{
- //
- // Compare with what we previously matched.
- // Note that this succeeds if the backref did not partisipate
- // in the match, this is in line with ECMAScript, but not Perl
- // or PCRE.
- //
- int index = static_cast<const re_brace*>(pstate)->index;
- if(index >= 10000)
- {
- named_subexpressions::range_type r = re.get_data().equal_range(index);
- BOOST_ASSERT(r.first != r.second);
- do
- {
- index = r.first->index;
- ++r.first;
- }while((r.first != r.second) && ((*m_presult)[index].matched != true));
- }
-
- if((m_match_flags & match_perl) && !(*m_presult)[index].matched)
- return false;
-
- BidiIterator i = (*m_presult)[index].first;
- BidiIterator j = (*m_presult)[index].second;
- while(i != j)
- {
- if((position == last) || (traits_inst.translate(*position, icase) != traits_inst.translate(*i, icase)))
- return false;
- ++i;
- ++position;
- }
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set()
-{
- typedef typename traits::char_class_type char_class_type;
- // let the traits class do the work:
- if(position == last)
- return false;
- BidiIterator t = re_is_set_member(position, last, static_cast<const re_set_long<char_class_type>*>(pstate), re.get_data(), icase);
- if(t != position)
- {
- pstate = pstate->next.p;
- position = t;
- return true;
- }
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_set()
-{
- if(position == last)
- return false;
- if(static_cast<const re_set*>(pstate)->_map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
- {
- pstate = pstate->next.p;
- ++position;
- return true;
- }
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_jump()
-{
- pstate = static_cast<const re_jump*>(pstate)->alt.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_combining()
-{
- if(position == last)
- return false;
- if(is_combining(traits_inst.translate(*position, icase)))
- return false;
- ++position;
- while((position != last) && is_combining(traits_inst.translate(*position, icase)))
- ++position;
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end()
-{
- if(m_match_flags & match_not_eob)
- return false;
- BidiIterator p(position);
- while((p != last) && is_separator(traits_inst.translate(*p, icase)))++p;
- if(p != last)
- return false;
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue()
-{
- if(position == search_base)
- {
- pstate = pstate->next.p;
- return true;
- }
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_backstep()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
- if( ::boost::is_random_access_iterator<BidiIterator>::value)
- {
- std::ptrdiff_t maxlen = ::boost::BOOST_REGEX_DETAIL_NS::distance(backstop, position);
- if(maxlen < static_cast<const re_brace*>(pstate)->index)
- return false;
- std::advance(position, -static_cast<const re_brace*>(pstate)->index);
- }
- else
- {
- int c = static_cast<const re_brace*>(pstate)->index;
- while(c--)
- {
- if(position == backstop)
- return false;
- --position;
- }
- }
- pstate = pstate->next.p;
- return true;
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref()
-{
- // return true if marked sub-expression N has been matched:
- int index = static_cast<const re_brace*>(pstate)->index;
- bool result = false;
- if(index == 9999)
- {
- // Magic value for a (DEFINE) block:
- return false;
- }
- else if(index > 0)
- {
- // Have we matched subexpression "index"?
- // Check if index is a hash value:
- if(index >= 10000)
- {
- named_subexpressions::range_type r = re.get_data().equal_range(index);
- while(r.first != r.second)
- {
- if((*m_presult)[r.first->index].matched)
- {
- result = true;
- break;
- }
- ++r.first;
- }
- }
- else
- {
- result = (*m_presult)[index].matched;
- }
- pstate = pstate->next.p;
- }
- else
- {
- // Have we recursed into subexpression "index"?
- // If index == 0 then check for any recursion at all, otherwise for recursion to -index-1.
- int idx = -(index+1);
- if(idx >= 10000)
- {
- named_subexpressions::range_type r = re.get_data().equal_range(idx);
- int stack_index = recursion_stack.empty() ? -1 : recursion_stack.back().idx;
- while(r.first != r.second)
- {
- result |= (stack_index == r.first->index);
- if(result)break;
- ++r.first;
- }
- }
- else
- {
- result = !recursion_stack.empty() && ((recursion_stack.back().idx == idx) || (index == 0));
- }
- pstate = pstate->next.p;
- }
- return result;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_fail()
-{
- // Just force a backtrack:
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_accept()
-{
- if(!recursion_stack.empty())
- {
- return skip_until_paren(recursion_stack.back().idx);
- }
- else
- {
- return skip_until_paren(INT_MAX);
- }
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_any()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
- const unsigned char* _map = re.get_map();
- while(true)
- {
- // skip everything we can't match:
- while((position != last) && !can_start(*position, _map, (unsigned char)mask_any) )
- ++position;
- if(position == last)
- {
- // run out of characters, try a null match if possible:
- if(re.can_be_null())
- return match_prefix();
- break;
- }
- // now try and obtain a match:
- if(match_prefix())
- return true;
- if(position == last)
- return false;
- ++position;
- }
- return false;
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_word()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
- // do search optimised for word starts:
- const unsigned char* _map = re.get_map();
- if((m_match_flags & match_prev_avail) || (position != base))
- --position;
- else if(match_prefix())
- return true;
- do
- {
- while((position != last) && traits_inst.isctype(*position, m_word_mask))
- ++position;
- while((position != last) && !traits_inst.isctype(*position, m_word_mask))
- ++position;
- if(position == last)
- break;
-
- if(can_start(*position, _map, (unsigned char)mask_any) )
- {
- if(match_prefix())
- return true;
- }
- if(position == last)
- break;
- } while(true);
- return false;
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_line()
-{
- // do search optimised for line starts:
- const unsigned char* _map = re.get_map();
- if(match_prefix())
- return true;
- while(position != last)
- {
- while((position != last) && !is_separator(*position))
- ++position;
- if(position == last)
- return false;
- ++position;
- if(position == last)
- {
- if(re.can_be_null() && match_prefix())
- return true;
- return false;
- }
-
- if( can_start(*position, _map, (unsigned char)mask_any) )
- {
- if(match_prefix())
- return true;
- }
- if(position == last)
- return false;
- //++position;
- }
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_buf()
-{
- if((position == base) && ((m_match_flags & match_not_bob) == 0))
- return match_prefix();
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit()
-{
-#if 0
- if(position == last)
- return false; // can't possibly match if we're at the end already
-
- unsigned type = (m_match_flags & match_continuous) ?
- static_cast<unsigned int>(regbase::restart_continue)
- : static_cast<unsigned int>(re.get_restart_type());
-
- const kmp_info<char_type>* info = access::get_kmp(re);
- int len = info->len;
- const char_type* x = info->pstr;
- int j = 0;
- while (position != last)
- {
- while((j > -1) && (x[j] != traits_inst.translate(*position, icase)))
- j = info->kmp_next[j];
- ++position;
- ++j;
- if(j >= len)
- {
- if(type == regbase::restart_fixed_lit)
- {
- std::advance(position, -j);
- restart = position;
- std::advance(restart, len);
- m_result.set_first(position);
- m_result.set_second(restart);
- position = restart;
- return true;
- }
- else
- {
- restart = position;
- std::advance(position, -j);
- if(match_prefix())
- return true;
- else
- {
- for(int k = 0; (restart != position) && (k < j); ++k, --restart)
- {} // dwa 10/20/2000 - warning suppression for MWCW
- if(restart != last)
- ++restart;
- position = restart;
- j = 0; //we could do better than this...
- }
- }
- }
- }
- if((m_match_flags & match_partial) && (position == last) && j)
- {
- // we need to check for a partial match:
- restart = position;
- std::advance(position, -j);
- return match_prefix();
- }
-#endif
- return false;
-}
-
-} // namespace BOOST_REGEX_DETAIL_NS
-
-} // namespace boost
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#ifdef __BORLANDC__
-# pragma option pop
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_non_recursive.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_non_recursive.hpp
deleted file mode 100644
index 3d89749d020..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_non_recursive.hpp
+++ /dev/null
@@ -1,1944 +0,0 @@
-/*
- *
- * Copyright (c) 2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE perl_matcher_common.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Definitions of perl_matcher member functions that are
- * specific to the non-recursive implementation.
- */
-
-#ifndef BOOST_REGEX_V4_PERL_MATCHER_NON_RECURSIVE_HPP
-#define BOOST_REGEX_V4_PERL_MATCHER_NON_RECURSIVE_HPP
-
-#include <new>
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4800 4706)
-#endif
-
-namespace boost{
-namespace BOOST_REGEX_DETAIL_NS{
-
-template <class T>
-inline void inplace_destroy(T* p)
-{
- (void)p; // warning suppression
- p->~T();
-}
-
-struct saved_state
-{
- union{
- unsigned int state_id;
- // this padding ensures correct alignment on 64-bit platforms:
- std::size_t padding1;
- std::ptrdiff_t padding2;
- void* padding3;
- };
- saved_state(unsigned i) : state_id(i) {}
-};
-
-template <class BidiIterator>
-struct saved_matched_paren : public saved_state
-{
- int index;
- sub_match<BidiIterator> sub;
- saved_matched_paren(int i, const sub_match<BidiIterator>& s) : saved_state(1), index(i), sub(s){};
-};
-
-template <class BidiIterator>
-struct saved_position : public saved_state
-{
- const re_syntax_base* pstate;
- BidiIterator position;
- saved_position(const re_syntax_base* ps, BidiIterator pos, int i) : saved_state(i), pstate(ps), position(pos){};
-};
-
-template <class BidiIterator>
-struct saved_assertion : public saved_position<BidiIterator>
-{
- bool positive;
- saved_assertion(bool p, const re_syntax_base* ps, BidiIterator pos)
- : saved_position<BidiIterator>(ps, pos, saved_type_assertion), positive(p){};
-};
-
-template <class BidiIterator>
-struct saved_repeater : public saved_state
-{
- repeater_count<BidiIterator> count;
- saved_repeater(int i, repeater_count<BidiIterator>** s, BidiIterator start, int current_recursion_id)
- : saved_state(saved_state_repeater_count), count(i, s, start, current_recursion_id){}
-};
-
-struct saved_extra_block : public saved_state
-{
- saved_state *base, *end;
- saved_extra_block(saved_state* b, saved_state* e)
- : saved_state(saved_state_extra_block), base(b), end(e) {}
-};
-
-struct save_state_init
-{
- saved_state** stack;
- save_state_init(saved_state** base, saved_state** end)
- : stack(base)
- {
- *base = static_cast<saved_state*>(get_mem_block());
- *end = reinterpret_cast<saved_state*>(reinterpret_cast<char*>(*base)+BOOST_REGEX_BLOCKSIZE);
- --(*end);
- (void) new (*end)saved_state(0);
- BOOST_ASSERT(*end > *base);
- }
- ~save_state_init()
- {
- put_mem_block(*stack);
- *stack = 0;
- }
-};
-
-template <class BidiIterator>
-struct saved_single_repeat : public saved_state
-{
- std::size_t count;
- const re_repeat* rep;
- BidiIterator last_position;
- saved_single_repeat(std::size_t c, const re_repeat* r, BidiIterator lp, int arg_id)
- : saved_state(arg_id), count(c), rep(r), last_position(lp){}
-};
-
-template <class Results>
-struct saved_recursion : public saved_state
-{
- saved_recursion(int idx, const re_syntax_base* p, Results* pr, Results* pr2)
- : saved_state(14), recursion_id(idx), preturn_address(p), internal_results(*pr), prior_results(*pr2) {}
- int recursion_id;
- const re_syntax_base* preturn_address;
- Results internal_results, prior_results;
-};
-
-struct saved_change_case : public saved_state
-{
- bool icase;
- saved_change_case(bool c) : saved_state(18), icase(c) {}
-};
-
-struct incrementer
-{
- incrementer(unsigned* pu) : m_pu(pu) { ++*m_pu; }
- ~incrementer() { --*m_pu; }
- bool operator > (unsigned i) { return *m_pu > i; }
-private:
- unsigned* m_pu;
-};
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
-{
- static matcher_proc_type const s_match_vtable[34] =
- {
- (&perl_matcher<BidiIterator, Allocator, traits>::match_startmark),
- &perl_matcher<BidiIterator, Allocator, traits>::match_endmark,
- &perl_matcher<BidiIterator, Allocator, traits>::match_literal,
- &perl_matcher<BidiIterator, Allocator, traits>::match_start_line,
- &perl_matcher<BidiIterator, Allocator, traits>::match_end_line,
- &perl_matcher<BidiIterator, Allocator, traits>::match_wild,
- &perl_matcher<BidiIterator, Allocator, traits>::match_match,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary,
- &perl_matcher<BidiIterator, Allocator, traits>::match_within_word,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_start,
- &perl_matcher<BidiIterator, Allocator, traits>::match_word_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start,
- &perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_backref,
- &perl_matcher<BidiIterator, Allocator, traits>::match_long_set,
- &perl_matcher<BidiIterator, Allocator, traits>::match_set,
- &perl_matcher<BidiIterator, Allocator, traits>::match_jump,
- &perl_matcher<BidiIterator, Allocator, traits>::match_alt,
- &perl_matcher<BidiIterator, Allocator, traits>::match_rep,
- &perl_matcher<BidiIterator, Allocator, traits>::match_combining,
- &perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
- &perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
- // Although this next line *should* be evaluated at compile time, in practice
- // some compilers (VC++) emit run-time initialisation which breaks thread
- // safety, so use a dispatch function instead:
- //(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
- &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
- &perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::match_backstep,
- &perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref,
- &perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case,
- &perl_matcher<BidiIterator, Allocator, traits>::match_recursion,
- &perl_matcher<BidiIterator, Allocator, traits>::match_fail,
- &perl_matcher<BidiIterator, Allocator, traits>::match_accept,
- &perl_matcher<BidiIterator, Allocator, traits>::match_commit,
- &perl_matcher<BidiIterator, Allocator, traits>::match_then,
- };
- incrementer inc(&m_recursions);
- if(inc > 80)
- raise_error(traits_inst, regex_constants::error_complexity);
- push_recursion_stopper();
- do{
- while(pstate)
- {
- matcher_proc_type proc = s_match_vtable[pstate->type];
- ++state_count;
- if(!(this->*proc)())
- {
- if(state_count > max_state_count)
- raise_error(traits_inst, regex_constants::error_complexity);
- if((m_match_flags & match_partial) && (position == last) && (position != search_base))
- m_has_partial_match = true;
- bool successful_unwind = unwind(false);
- if((m_match_flags & match_partial) && (position == last) && (position != search_base))
- m_has_partial_match = true;
- if(false == successful_unwind)
- return m_recursive_result;
- }
- }
- }while(unwind(true));
- return m_recursive_result;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::extend_stack()
-{
- if(used_block_count)
- {
- --used_block_count;
- saved_state* stack_base;
- saved_state* backup_state;
- stack_base = static_cast<saved_state*>(get_mem_block());
- backup_state = reinterpret_cast<saved_state*>(reinterpret_cast<char*>(stack_base)+BOOST_REGEX_BLOCKSIZE);
- saved_extra_block* block = static_cast<saved_extra_block*>(backup_state);
- --block;
- (void) new (block) saved_extra_block(m_stack_base, m_backup_state);
- m_stack_base = stack_base;
- m_backup_state = block;
- }
- else
- raise_error(traits_inst, regex_constants::error_stack);
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_matched_paren(int index, const sub_match<BidiIterator>& sub)
-{
- //BOOST_ASSERT(index);
- saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_matched_paren<BidiIterator>(index, sub);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_case_change(bool c)
-{
- //BOOST_ASSERT(index);
- saved_change_case* pmp = static_cast<saved_change_case*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_change_case*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_change_case(c);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_stopper()
-{
- saved_state* pmp = m_backup_state;
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = m_backup_state;
- --pmp;
- }
- (void) new (pmp)saved_state(saved_type_recurse);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_assertion(const re_syntax_base* ps, bool positive)
-{
- saved_assertion<BidiIterator>* pmp = static_cast<saved_assertion<BidiIterator>*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_assertion<BidiIterator>*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_assertion<BidiIterator>(positive, ps, position);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_alt(const re_syntax_base* ps)
-{
- saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_position<BidiIterator>(ps, position, saved_state_alt);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_non_greedy_repeat(const re_syntax_base* ps)
-{
- saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_position<BidiIterator>(ps, position, saved_state_non_greedy_long_repeat);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_repeater_count(int i, repeater_count<BidiIterator>** s)
-{
- saved_repeater<BidiIterator>* pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_repeater<BidiIterator>(i, s, position, this->recursion_stack.size() ? this->recursion_stack.back().idx : (INT_MIN + 3));
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id)
-{
- saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_single_repeat<BidiIterator>(c, r, last_position, state_id);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int idx, const re_syntax_base* p, results_type* presults, results_type* presults2)
-{
- saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_recursion<results_type>(idx, p, presults, presults2);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
-{
- // change our case sensitivity:
- push_case_change(this->icase);
- this->icase = static_cast<const re_case*>(pstate)->icase;
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
-{
- int index = static_cast<const re_brace*>(pstate)->index;
- icase = static_cast<const re_brace*>(pstate)->icase;
- switch(index)
- {
- case 0:
- pstate = pstate->next.p;
- break;
- case -1:
- case -2:
- {
- // forward lookahead assert:
- const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
- pstate = pstate->next.p->next.p;
- push_assertion(next_pstate, index == -1);
- break;
- }
- case -3:
- {
- // independent sub-expression, currently this is always recursive:
- bool old_independent = m_independent;
- m_independent = true;
- const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
- pstate = pstate->next.p->next.p;
- bool r = false;
-#if !defined(BOOST_NO_EXCEPTIONS)
- try{
-#endif
- r = match_all_states();
- if(!r && !m_independent)
- {
- // Must be unwinding from a COMMIT/SKIP/PRUNE and the independent
- // sub failed, need to unwind everything else:
- while(unwind(false));
- return false;
- }
-#if !defined(BOOST_NO_EXCEPTIONS)
- }
- catch(...)
- {
- pstate = next_pstate;
- // unwind all pushed states, apart from anything else this
- // ensures that all the states are correctly destructed
- // not just the memory freed.
- while(unwind(true)) {}
- throw;
- }
-#endif
- pstate = next_pstate;
- m_independent = old_independent;
-#ifdef BOOST_REGEX_MATCH_EXTRA
- if(r && (m_match_flags & match_extra))
- {
- //
- // our captures have been stored in *m_presult
- // we need to unpack them, and insert them
- // back in the right order when we unwind the stack:
- //
- match_results<BidiIterator, Allocator> temp_match(*m_presult);
- unsigned i;
- for(i = 0; i < temp_match.size(); ++i)
- (*m_presult)[i].get_captures().clear();
- // match everything else:
-#if !defined(BOOST_NO_EXCEPTIONS)
- try{
-#endif
- r = match_all_states();
-#if !defined(BOOST_NO_EXCEPTIONS)
- }
- catch(...)
- {
- pstate = next_pstate;
- // unwind all pushed states, apart from anything else this
- // ensures that all the states are correctly destructed
- // not just the memory freed.
- while(unwind(true)) {}
- throw;
- }
-#endif
- // now place the stored captures back:
- for(i = 0; i < temp_match.size(); ++i)
- {
- typedef typename sub_match<BidiIterator>::capture_sequence_type seq;
- seq& s1 = (*m_presult)[i].get_captures();
- const seq& s2 = temp_match[i].captures();
- s1.insert(
- s1.end(),
- s2.begin(),
- s2.end());
- }
- }
-#endif
- return r;
- }
- case -4:
- {
- // conditional expression:
- const re_alt* alt = static_cast<const re_alt*>(pstate->next.p);
- BOOST_ASSERT(alt->type == syntax_element_alt);
- pstate = alt->next.p;
- if(pstate->type == syntax_element_assert_backref)
- {
- if(!match_assert_backref())
- pstate = alt->alt.p;
- break;
- }
- else
- {
- // zero width assertion, have to match this recursively:
- BOOST_ASSERT(pstate->type == syntax_element_startmark);
- bool negated = static_cast<const re_brace*>(pstate)->index == -2;
- BidiIterator saved_position = position;
- const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
- pstate = pstate->next.p->next.p;
-#if !defined(BOOST_NO_EXCEPTIONS)
- try{
-#endif
- bool r = match_all_states();
- position = saved_position;
- if(negated)
- r = !r;
- if(r)
- pstate = next_pstate;
- else
- pstate = alt->alt.p;
-#if !defined(BOOST_NO_EXCEPTIONS)
- }
- catch(...)
- {
- pstate = next_pstate;
- // unwind all pushed states, apart from anything else this
- // ensures that all the states are correctly destructed
- // not just the memory freed.
- while(unwind(true)){}
- throw;
- }
-#endif
- break;
- }
- }
- case -5:
- {
- push_matched_paren(0, (*m_presult)[0]);
- m_presult->set_first(position, 0, true);
- pstate = pstate->next.p;
- break;
- }
- default:
- {
- BOOST_ASSERT(index > 0);
- if((m_match_flags & match_nosubs) == 0)
- {
- push_matched_paren(index, (*m_presult)[index]);
- m_presult->set_first(position, index);
- }
- pstate = pstate->next.p;
- break;
- }
- }
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_alt()
-{
- bool take_first, take_second;
- const re_alt* jmp = static_cast<const re_alt*>(pstate);
-
- // find out which of these two alternatives we need to take:
- if(position == last)
- {
- take_first = jmp->can_be_null & mask_take;
- take_second = jmp->can_be_null & mask_skip;
- }
- else
- {
- take_first = can_start(*position, jmp->_map, (unsigned char)mask_take);
- take_second = can_start(*position, jmp->_map, (unsigned char)mask_skip);
- }
-
- if(take_first)
- {
- // we can take the first alternative,
- // see if we need to push next alternative:
- if(take_second)
- {
- push_alt(jmp->alt.p);
- }
- pstate = pstate->next.p;
- return true;
- }
- if(take_second)
- {
- pstate = jmp->alt.p;
- return true;
- }
- return false; // neither option is possible
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127 4244)
-#endif
-#ifdef __BORLANDC__
-#pragma option push -w-8008 -w-8066 -w-8004
-#endif
- const re_repeat* rep = static_cast<const re_repeat*>(pstate);
-
- // find out which of these two alternatives we need to take:
- bool take_first, take_second;
- if(position == last)
- {
- take_first = rep->can_be_null & mask_take;
- take_second = rep->can_be_null & mask_skip;
- }
- else
- {
- take_first = can_start(*position, rep->_map, (unsigned char)mask_take);
- take_second = can_start(*position, rep->_map, (unsigned char)mask_skip);
- }
-
- if((m_backup_state->state_id != saved_state_repeater_count)
- || (static_cast<saved_repeater<BidiIterator>*>(m_backup_state)->count.get_id() != rep->state_id)
- || (next_count->get_id() != rep->state_id))
- {
- // we're moving to a different repeat from the last
- // one, so set up a counter object:
- push_repeater_count(rep->state_id, &next_count);
- }
- //
- // If we've had at least one repeat already, and the last one
- // matched the NULL string then set the repeat count to
- // maximum:
- //
- next_count->check_null_repeat(position, rep->max);
-
- if(next_count->get_count() < rep->min)
- {
- // we must take the repeat:
- if(take_first)
- {
- // increase the counter:
- ++(*next_count);
- pstate = rep->next.p;
- return true;
- }
- return false;
- }
-
- bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
- if(greedy)
- {
- // try and take the repeat if we can:
- if((next_count->get_count() < rep->max) && take_first)
- {
- if(take_second)
- {
- // store position in case we fail:
- push_alt(rep->alt.p);
- }
- // increase the counter:
- ++(*next_count);
- pstate = rep->next.p;
- return true;
- }
- else if(take_second)
- {
- pstate = rep->alt.p;
- return true;
- }
- return false; // can't take anything, fail...
- }
- else // non-greedy
- {
- // try and skip the repeat if we can:
- if(take_second)
- {
- if((next_count->get_count() < rep->max) && take_first)
- {
- // store position in case we fail:
- push_non_greedy_repeat(rep->next.p);
- }
- pstate = rep->alt.p;
- return true;
- }
- if((next_count->get_count() < rep->max) && take_first)
- {
- // increase the counter:
- ++(*next_count);
- pstate = rep->next.p;
- return true;
- }
- }
- return false;
-#ifdef __BORLANDC__
-#pragma option pop
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow()
-{
- std::size_t count = 0;
- const re_repeat* rep = static_cast<const re_repeat*>(pstate);
- re_syntax_base* psingle = rep->next.p;
- // match compulsary repeats first:
- while(count < rep->min)
- {
- pstate = psingle;
- if(!match_wild())
- return false;
- ++count;
- }
- bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
- if(greedy)
- {
- // repeat for as long as we can:
- while(count < rep->max)
- {
- pstate = psingle;
- if(!match_wild())
- break;
- ++count;
- }
- // remember where we got to if this is a leading repeat:
- if((rep->leading) && (count < rep->max))
- restart = position;
- // push backtrack info if available:
- if(count - rep->min)
- push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
- // jump to next state:
- pstate = rep->alt.p;
- return true;
- }
- else
- {
- // non-greedy, push state and return true if we can skip:
- if(count < rep->max)
- push_single_repeat(count, rep, position, saved_state_rep_slow_dot);
- pstate = rep->alt.p;
- return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
- }
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast()
-{
- if(m_match_flags & match_not_dot_null)
- return match_dot_repeat_slow();
- if((static_cast<const re_dot*>(pstate->next.p)->mask & match_any_mask) == 0)
- return match_dot_repeat_slow();
-
- const re_repeat* rep = static_cast<const re_repeat*>(pstate);
- bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
- std::size_t count = static_cast<std::size_t>((std::min)(static_cast<std::size_t>(::boost::BOOST_REGEX_DETAIL_NS::distance(position, last)), greedy ? rep->max : rep->min));
- if(rep->min > count)
- {
- position = last;
- return false; // not enough text left to match
- }
- std::advance(position, count);
-
- if(greedy)
- {
- if((rep->leading) && (count < rep->max))
- restart = position;
- // push backtrack info if available:
- if(count - rep->min)
- push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
- // jump to next state:
- pstate = rep->alt.p;
- return true;
- }
- else
- {
- // non-greedy, push state and return true if we can skip:
- if(count < rep->max)
- push_single_repeat(count, rep, position, saved_state_rep_fast_dot);
- pstate = rep->alt.p;
- return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
- }
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
-#ifdef __BORLANDC__
-#pragma option push -w-8008 -w-8066 -w-8004
-#endif
- const re_repeat* rep = static_cast<const re_repeat*>(pstate);
- BOOST_ASSERT(1 == static_cast<const re_literal*>(rep->next.p)->length);
- const char_type what = *reinterpret_cast<const char_type*>(static_cast<const re_literal*>(rep->next.p) + 1);
- std::size_t count = 0;
- //
- // start by working out how much we can skip:
- //
- bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
- std::size_t desired = greedy ? rep->max : rep->min;
- if(::boost::is_random_access_iterator<BidiIterator>::value)
- {
- BidiIterator end = position;
- // Move end forward by "desired", preferably without using distance or advance if we can
- // as these can be slow for some iterator types.
- std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::BOOST_REGEX_DETAIL_NS::distance(position, last);
- if(desired >= len)
- end = last;
- else
- std::advance(end, desired);
- BidiIterator origin(position);
- while((position != end) && (traits_inst.translate(*position, icase) == what))
- {
- ++position;
- }
- count = (unsigned)::boost::BOOST_REGEX_DETAIL_NS::distance(origin, position);
- }
- else
- {
- while((count < desired) && (position != last) && (traits_inst.translate(*position, icase) == what))
- {
- ++position;
- ++count;
- }
- }
-
- if(count < rep->min)
- return false;
-
- if(greedy)
- {
- if((rep->leading) && (count < rep->max))
- restart = position;
- // push backtrack info if available:
- if(count - rep->min)
- push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
- // jump to next state:
- pstate = rep->alt.p;
- return true;
- }
- else
- {
- // non-greedy, push state and return true if we can skip:
- if(count < rep->max)
- push_single_repeat(count, rep, position, saved_state_rep_char);
- pstate = rep->alt.p;
- return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
- }
-#ifdef __BORLANDC__
-#pragma option pop
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
-#ifdef __BORLANDC__
-#pragma option push -w-8008 -w-8066 -w-8004
-#endif
- const re_repeat* rep = static_cast<const re_repeat*>(pstate);
- const unsigned char* map = static_cast<const re_set*>(rep->next.p)->_map;
- std::size_t count = 0;
- //
- // start by working out how much we can skip:
- //
- bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
- std::size_t desired = greedy ? rep->max : rep->min;
- if(::boost::is_random_access_iterator<BidiIterator>::value)
- {
- BidiIterator end = position;
- // Move end forward by "desired", preferably without using distance or advance if we can
- // as these can be slow for some iterator types.
- std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::BOOST_REGEX_DETAIL_NS::distance(position, last);
- if(desired >= len)
- end = last;
- else
- std::advance(end, desired);
- BidiIterator origin(position);
- while((position != end) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
- {
- ++position;
- }
- count = (unsigned)::boost::BOOST_REGEX_DETAIL_NS::distance(origin, position);
- }
- else
- {
- while((count < desired) && (position != last) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
- {
- ++position;
- ++count;
- }
- }
-
- if(count < rep->min)
- return false;
-
- if(greedy)
- {
- if((rep->leading) && (count < rep->max))
- restart = position;
- // push backtrack info if available:
- if(count - rep->min)
- push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
- // jump to next state:
- pstate = rep->alt.p;
- return true;
- }
- else
- {
- // non-greedy, push state and return true if we can skip:
- if(count < rep->max)
- push_single_repeat(count, rep, position, saved_state_rep_short_set);
- pstate = rep->alt.p;
- return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
- }
-#ifdef __BORLANDC__
-#pragma option pop
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
-{
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4127)
-#endif
-#ifdef __BORLANDC__
-#pragma option push -w-8008 -w-8066 -w-8004
-#endif
- typedef typename traits::char_class_type m_type;
- const re_repeat* rep = static_cast<const re_repeat*>(pstate);
- const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate->next.p);
- std::size_t count = 0;
- //
- // start by working out how much we can skip:
- //
- bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
- std::size_t desired = greedy ? rep->max : rep->min;
- if(::boost::is_random_access_iterator<BidiIterator>::value)
- {
- BidiIterator end = position;
- // Move end forward by "desired", preferably without using distance or advance if we can
- // as these can be slow for some iterator types.
- std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::BOOST_REGEX_DETAIL_NS::distance(position, last);
- if(desired >= len)
- end = last;
- else
- std::advance(end, desired);
- BidiIterator origin(position);
- while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
- {
- ++position;
- }
- count = (unsigned)::boost::BOOST_REGEX_DETAIL_NS::distance(origin, position);
- }
- else
- {
- while((count < desired) && (position != last) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
- {
- ++position;
- ++count;
- }
- }
-
- if(count < rep->min)
- return false;
-
- if(greedy)
- {
- if((rep->leading) && (count < rep->max))
- restart = position;
- // push backtrack info if available:
- if(count - rep->min)
- push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
- // jump to next state:
- pstate = rep->alt.p;
- return true;
- }
- else
- {
- // non-greedy, push state and return true if we can skip:
- if(count < rep->max)
- push_single_repeat(count, rep, position, saved_state_rep_long_set);
- pstate = rep->alt.p;
- return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
- }
-#ifdef __BORLANDC__
-#pragma option pop
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
-{
- BOOST_ASSERT(pstate->type == syntax_element_recurse);
- //
- // See if we've seen this recursion before at this location, if we have then
- // we need to prevent infinite recursion:
- //
- for(typename std::vector<recursion_info<results_type> >::reverse_iterator i = recursion_stack.rbegin(); i != recursion_stack.rend(); ++i)
- {
- if(i->idx == static_cast<const re_brace*>(static_cast<const re_jump*>(pstate)->alt.p)->index)
- {
- if(i->location_of_start == position)
- return false;
- break;
- }
- }
- //
- // Backup call stack:
- //
- push_recursion_pop();
- //
- // Set new call stack:
- //
- if(recursion_stack.capacity() == 0)
- {
- recursion_stack.reserve(50);
- }
- recursion_stack.push_back(recursion_info<results_type>());
- recursion_stack.back().preturn_address = pstate->next.p;
- recursion_stack.back().results = *m_presult;
- pstate = static_cast<const re_jump*>(pstate)->alt.p;
- recursion_stack.back().idx = static_cast<const re_brace*>(pstate)->index;
- recursion_stack.back().location_of_start = position;
- //if(static_cast<const re_recurse*>(pstate)->state_id > 0)
- {
- push_repeater_count(-(2 + static_cast<const re_brace*>(pstate)->index), &next_count);
- }
-
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
-{
- int index = static_cast<const re_brace*>(pstate)->index;
- icase = static_cast<const re_brace*>(pstate)->icase;
- if(index > 0)
- {
- if((m_match_flags & match_nosubs) == 0)
- {
- m_presult->set_second(position, index);
- }
- if(!recursion_stack.empty())
- {
- if(index == recursion_stack.back().idx)
- {
- pstate = recursion_stack.back().preturn_address;
- *m_presult = recursion_stack.back().results;
- push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, m_presult, &recursion_stack.back().results);
- recursion_stack.pop_back();
- push_repeater_count(-(2 + index), &next_count);
- }
- }
- }
- else if((index < 0) && (index != -4))
- {
- // matched forward lookahead:
- pstate = 0;
- return true;
- }
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
-{
- if(!recursion_stack.empty())
- {
- BOOST_ASSERT(0 == recursion_stack.back().idx);
- pstate = recursion_stack.back().preturn_address;
- push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, m_presult, &recursion_stack.back().results);
- *m_presult = recursion_stack.back().results;
- recursion_stack.pop_back();
- return true;
- }
- if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
- return false;
- if((m_match_flags & match_all) && (position != last))
- return false;
- if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
- return false;
- m_presult->set_second(position);
- pstate = 0;
- m_has_found_match = true;
- if((m_match_flags & match_posix) == match_posix)
- {
- m_result.maybe_assign(*m_presult);
- if((m_match_flags & match_any) == 0)
- return false;
- }
-#ifdef BOOST_REGEX_MATCH_EXTRA
- if(match_extra & m_match_flags)
- {
- for(unsigned i = 0; i < m_presult->size(); ++i)
- if((*m_presult)[i].matched)
- ((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
- }
-#endif
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_commit()
-{
- // Ideally we would just junk all the states that are on the stack,
- // however we might not unwind correctly in that case, so for now,
- // just mark that we don't backtrack into whatever is left (or rather
- // we'll unwind it unconditionally without pausing to try other matches).
-
- switch(static_cast<const re_commit*>(pstate)->action)
- {
- case commit_commit:
- restart = last;
- break;
- case commit_skip:
- if(base != position)
- {
- restart = position;
- // Have to decrement restart since it will get incremented again later:
- --restart;
- }
- break;
- case commit_prune:
- break;
- }
-
- saved_state* pmp = m_backup_state;
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = m_backup_state;
- --pmp;
- }
- (void) new (pmp)saved_state(16);
- m_backup_state = pmp;
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::match_then()
-{
- // Just leave a mark that we need to skip to next alternative:
- saved_state* pmp = m_backup_state;
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = m_backup_state;
- --pmp;
- }
- (void) new (pmp)saved_state(17);
- m_backup_state = pmp;
- pstate = pstate->next.p;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::skip_until_paren(int index, bool have_match)
-{
- while(pstate)
- {
- if(pstate->type == syntax_element_endmark)
- {
- if(static_cast<const re_brace*>(pstate)->index == index)
- {
- if(have_match)
- return this->match_endmark();
- pstate = pstate->next.p;
- return true;
- }
- else
- {
- // Unenclosed closing ), occurs when (*ACCEPT) is inside some other
- // parenthesis which may or may not have other side effects associated with it.
- const re_syntax_base* sp = pstate;
- match_endmark();
- if(!pstate)
- {
- unwind(true);
- // unwind may leave pstate NULL if we've unwound a forward lookahead, in which
- // case just move to the next state and keep looking...
- if (!pstate)
- pstate = sp->next.p;
- }
- }
- continue;
- }
- else if(pstate->type == syntax_element_match)
- return true;
- else if(pstate->type == syntax_element_startmark)
- {
- int idx = static_cast<const re_brace*>(pstate)->index;
- pstate = pstate->next.p;
- skip_until_paren(idx, false);
- continue;
- }
- pstate = pstate->next.p;
- }
- return true;
-}
-
-/****************************************************************************
-
-Unwind and associated proceedures follow, these perform what normal stack
-unwinding does in the recursive implementation.
-
-****************************************************************************/
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind(bool have_match)
-{
- static unwind_proc_type const s_unwind_table[19] =
- {
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_end,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_paren,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_stopper,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_assertion,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_alt,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_repeater_counter,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_extra_block,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_greedy_single_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_slow_dot_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_char_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_commit,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_then,
- &perl_matcher<BidiIterator, Allocator, traits>::unwind_case,
- };
-
- m_recursive_result = have_match;
- m_unwound_lookahead = false;
- m_unwound_alt = false;
- unwind_proc_type unwinder;
- bool cont;
- //
- // keep unwinding our stack until we have something to do:
- //
- do
- {
- unwinder = s_unwind_table[m_backup_state->state_id];
- cont = (this->*unwinder)(m_recursive_result);
- }while(cont);
- //
- // return true if we have more states to try:
- //
- return pstate ? true : false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_end(bool)
-{
- pstate = 0; // nothing left to search
- return false; // end of stack nothing more to search
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_case(bool)
-{
- saved_change_case* pmp = static_cast<saved_change_case*>(m_backup_state);
- icase = pmp->icase;
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_paren(bool have_match)
-{
- saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
- // restore previous values if no match was found:
- if(have_match == false)
- {
- m_presult->set_first(pmp->sub.first, pmp->index, pmp->index == 0);
- m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched, pmp->index == 0);
- }
-#ifdef BOOST_REGEX_MATCH_EXTRA
- //
- // we have a match, push the capture information onto the stack:
- //
- else if(pmp->sub.matched && (match_extra & m_match_flags))
- ((*m_presult)[pmp->index]).get_captures().push_back(pmp->sub);
-#endif
- // unwind stack:
- m_backup_state = pmp+1;
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp);
- return true; // keep looking
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_stopper(bool)
-{
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(m_backup_state++);
- pstate = 0; // nothing left to search
- return false; // end of stack nothing more to search
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_assertion(bool r)
-{
- saved_assertion<BidiIterator>* pmp = static_cast<saved_assertion<BidiIterator>*>(m_backup_state);
- pstate = pmp->pstate;
- position = pmp->position;
- bool result = (r == pmp->positive);
- m_recursive_result = pmp->positive ? r : !r;
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- m_unwound_lookahead = true;
- return !result; // return false if the assertion was matched to stop search.
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_alt(bool r)
-{
- saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- if(!r)
- {
- pstate = pmp->pstate;
- position = pmp->position;
- }
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- m_unwound_alt = !r;
- return r;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_repeater_counter(bool)
-{
- saved_repeater<BidiIterator>* pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- return true; // keep looking
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_extra_block(bool)
-{
- saved_extra_block* pmp = static_cast<saved_extra_block*>(m_backup_state);
- void* condemmed = m_stack_base;
- m_stack_base = pmp->base;
- m_backup_state = pmp->end;
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp);
- put_mem_block(condemmed);
- return true; // keep looking
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::destroy_single_repeat()
-{
- saved_single_repeat<BidiIterator>* p = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(p++);
- m_backup_state = p;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_greedy_single_repeat(bool r)
-{
- saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
-
- // if we have a match, just discard this state:
- if(r)
- {
- destroy_single_repeat();
- return true;
- }
-
- const re_repeat* rep = pmp->rep;
- std::size_t count = pmp->count;
- BOOST_ASSERT(rep->next.p != 0);
- BOOST_ASSERT(rep->alt.p != 0);
-
- count -= rep->min;
-
- if((m_match_flags & match_partial) && (position == last))
- m_has_partial_match = true;
-
- BOOST_ASSERT(count);
- position = pmp->last_position;
-
- // backtrack till we can skip out:
- do
- {
- --position;
- --count;
- ++state_count;
- }while(count && !can_start(*position, rep->_map, mask_skip));
-
- // if we've hit base, destroy this state:
- if(count == 0)
- {
- destroy_single_repeat();
- if(!can_start(*position, rep->_map, mask_skip))
- return true;
- }
- else
- {
- pmp->count = count + rep->min;
- pmp->last_position = position;
- }
- pstate = rep->alt.p;
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_slow_dot_repeat(bool r)
-{
- saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
-
- // if we have a match, just discard this state:
- if(r)
- {
- destroy_single_repeat();
- return true;
- }
-
- const re_repeat* rep = pmp->rep;
- std::size_t count = pmp->count;
- BOOST_ASSERT(rep->type == syntax_element_dot_rep);
- BOOST_ASSERT(rep->next.p != 0);
- BOOST_ASSERT(rep->alt.p != 0);
- BOOST_ASSERT(rep->next.p->type == syntax_element_wild);
-
- BOOST_ASSERT(count < rep->max);
- pstate = rep->next.p;
- position = pmp->last_position;
-
- if(position != last)
- {
- // wind forward until we can skip out of the repeat:
- do
- {
- if(!match_wild())
- {
- // failed repeat match, discard this state and look for another:
- destroy_single_repeat();
- return true;
- }
- ++count;
- ++state_count;
- pstate = rep->next.p;
- }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
- }
- if(position == last)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if((m_match_flags & match_partial) && (position == last) && (position != search_base))
- m_has_partial_match = true;
- if(0 == (rep->can_be_null & mask_skip))
- return true;
- }
- else if(count == rep->max)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if(!can_start(*position, rep->_map, mask_skip))
- return true;
- }
- else
- {
- pmp->count = count;
- pmp->last_position = position;
- }
- pstate = rep->alt.p;
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat(bool r)
-{
- saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
-
- // if we have a match, just discard this state:
- if(r)
- {
- destroy_single_repeat();
- return true;
- }
-
- const re_repeat* rep = pmp->rep;
- std::size_t count = pmp->count;
-
- BOOST_ASSERT(count < rep->max);
- position = pmp->last_position;
- if(position != last)
- {
-
- // wind forward until we can skip out of the repeat:
- do
- {
- ++position;
- ++count;
- ++state_count;
- }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
- }
-
- // remember where we got to if this is a leading repeat:
- if((rep->leading) && (count < rep->max))
- restart = position;
- if(position == last)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if((m_match_flags & match_partial) && (position == last) && (position != search_base))
- m_has_partial_match = true;
- if(0 == (rep->can_be_null & mask_skip))
- return true;
- }
- else if(count == rep->max)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if(!can_start(*position, rep->_map, mask_skip))
- return true;
- }
- else
- {
- pmp->count = count;
- pmp->last_position = position;
- }
- pstate = rep->alt.p;
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_char_repeat(bool r)
-{
- saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
-
- // if we have a match, just discard this state:
- if(r)
- {
- destroy_single_repeat();
- return true;
- }
-
- const re_repeat* rep = pmp->rep;
- std::size_t count = pmp->count;
- pstate = rep->next.p;
- const char_type what = *reinterpret_cast<const char_type*>(static_cast<const re_literal*>(pstate) + 1);
- position = pmp->last_position;
-
- BOOST_ASSERT(rep->type == syntax_element_char_rep);
- BOOST_ASSERT(rep->next.p != 0);
- BOOST_ASSERT(rep->alt.p != 0);
- BOOST_ASSERT(rep->next.p->type == syntax_element_literal);
- BOOST_ASSERT(count < rep->max);
-
- if(position != last)
- {
- // wind forward until we can skip out of the repeat:
- do
- {
- if(traits_inst.translate(*position, icase) != what)
- {
- // failed repeat match, discard this state and look for another:
- destroy_single_repeat();
- return true;
- }
- ++count;
- ++ position;
- ++state_count;
- pstate = rep->next.p;
- }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
- }
- // remember where we got to if this is a leading repeat:
- if((rep->leading) && (count < rep->max))
- restart = position;
- if(position == last)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if((m_match_flags & match_partial) && (position == last) && (position != search_base))
- m_has_partial_match = true;
- if(0 == (rep->can_be_null & mask_skip))
- return true;
- }
- else if(count == rep->max)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if(!can_start(*position, rep->_map, mask_skip))
- return true;
- }
- else
- {
- pmp->count = count;
- pmp->last_position = position;
- }
- pstate = rep->alt.p;
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat(bool r)
-{
- saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
-
- // if we have a match, just discard this state:
- if(r)
- {
- destroy_single_repeat();
- return true;
- }
-
- const re_repeat* rep = pmp->rep;
- std::size_t count = pmp->count;
- pstate = rep->next.p;
- const unsigned char* map = static_cast<const re_set*>(rep->next.p)->_map;
- position = pmp->last_position;
-
- BOOST_ASSERT(rep->type == syntax_element_short_set_rep);
- BOOST_ASSERT(rep->next.p != 0);
- BOOST_ASSERT(rep->alt.p != 0);
- BOOST_ASSERT(rep->next.p->type == syntax_element_set);
- BOOST_ASSERT(count < rep->max);
-
- if(position != last)
- {
- // wind forward until we can skip out of the repeat:
- do
- {
- if(!map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
- {
- // failed repeat match, discard this state and look for another:
- destroy_single_repeat();
- return true;
- }
- ++count;
- ++ position;
- ++state_count;
- pstate = rep->next.p;
- }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
- }
- // remember where we got to if this is a leading repeat:
- if((rep->leading) && (count < rep->max))
- restart = position;
- if(position == last)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if((m_match_flags & match_partial) && (position == last) && (position != search_base))
- m_has_partial_match = true;
- if(0 == (rep->can_be_null & mask_skip))
- return true;
- }
- else if(count == rep->max)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if(!can_start(*position, rep->_map, mask_skip))
- return true;
- }
- else
- {
- pmp->count = count;
- pmp->last_position = position;
- }
- pstate = rep->alt.p;
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool r)
-{
- typedef typename traits::char_class_type m_type;
- saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
-
- // if we have a match, just discard this state:
- if(r)
- {
- destroy_single_repeat();
- return true;
- }
-
- const re_repeat* rep = pmp->rep;
- std::size_t count = pmp->count;
- pstate = rep->next.p;
- const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate);
- position = pmp->last_position;
-
- BOOST_ASSERT(rep->type == syntax_element_long_set_rep);
- BOOST_ASSERT(rep->next.p != 0);
- BOOST_ASSERT(rep->alt.p != 0);
- BOOST_ASSERT(rep->next.p->type == syntax_element_long_set);
- BOOST_ASSERT(count < rep->max);
-
- if(position != last)
- {
- // wind forward until we can skip out of the repeat:
- do
- {
- if(position == re_is_set_member(position, last, set, re.get_data(), icase))
- {
- // failed repeat match, discard this state and look for another:
- destroy_single_repeat();
- return true;
- }
- ++position;
- ++count;
- ++state_count;
- pstate = rep->next.p;
- }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
- }
- // remember where we got to if this is a leading repeat:
- if((rep->leading) && (count < rep->max))
- restart = position;
- if(position == last)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if((m_match_flags & match_partial) && (position == last) && (position != search_base))
- m_has_partial_match = true;
- if(0 == (rep->can_be_null & mask_skip))
- return true;
- }
- else if(count == rep->max)
- {
- // can't repeat any more, remove the pushed state:
- destroy_single_repeat();
- if(!can_start(*position, rep->_map, mask_skip))
- return true;
- }
- else
- {
- pmp->count = count;
- pmp->last_position = position;
- }
- pstate = rep->alt.p;
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat(bool r)
-{
- saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- if(!r)
- {
- position = pmp->position;
- pstate = pmp->pstate;
- ++(*next_count);
- }
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- return r;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion(bool r)
-{
- // We are backtracking back inside a recursion, need to push the info
- // back onto the recursion stack, and do so unconditionally, otherwise
- // we can get mismatched pushes and pops...
- saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
- if (!r)
- {
- recursion_stack.push_back(recursion_info<results_type>());
- recursion_stack.back().idx = pmp->recursion_id;
- recursion_stack.back().preturn_address = pmp->preturn_address;
- recursion_stack.back().results = pmp->prior_results;
- recursion_stack.back().location_of_start = position;
- *m_presult = pmp->internal_results;
- }
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop(bool r)
-{
- // Backtracking out of a recursion, we must pop state off the recursion
- // stack unconditionally to ensure matched pushes and pops:
- saved_state* pmp = static_cast<saved_state*>(m_backup_state);
- if (!r)
- {
- *m_presult = recursion_stack.back().results;
- position = recursion_stack.back().location_of_start;
- recursion_stack.pop_back();
- }
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_pop()
-{
- saved_state* pmp = static_cast<saved_state*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_state*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_state(15);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_commit(bool b)
-{
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(m_backup_state++);
- while(unwind(b) && !m_unwound_lookahead){}
- if(m_unwound_lookahead && pstate)
- {
- //
- // If we stop because we just unwound an assertion, put the
- // commit state back on the stack again:
- //
- saved_state* pmp = m_backup_state;
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = m_backup_state;
- --pmp;
- }
- (void) new (pmp)saved_state(16);
- m_backup_state = pmp;
- }
- // This prevents us from stopping when we exit from an independent sub-expression:
- m_independent = false;
- return false;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_then(bool b)
-{
- // Unwind everything till we hit an alternative:
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(m_backup_state++);
- bool result = false;
- while((result = unwind(b)) && !m_unwound_alt){}
- // We're now pointing at the next alternative, need one more backtrack
- // since *all* the other alternatives must fail once we've reached a THEN clause:
- if(result && m_unwound_alt)
- unwind(b);
- return false;
-}
-
-/*
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_pop(bool r)
-{
- saved_state* pmp = static_cast<saved_state*>(m_backup_state);
- if(!r)
- {
- --parenthesis_stack_position;
- }
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_pop()
-{
- saved_state* pmp = static_cast<saved_state*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_state*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_state(16);
- m_backup_state = pmp;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_push(bool r)
-{
- saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- if(!r)
- {
- parenthesis_stack[parenthesis_stack_position++] = pmp->position;
- }
- boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
- m_backup_state = pmp;
- return true;
-}
-
-template <class BidiIterator, class Allocator, class traits>
-inline void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_push(BidiIterator p)
-{
- saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- --pmp;
- if(pmp < m_stack_base)
- {
- extend_stack();
- pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
- --pmp;
- }
- (void) new (pmp)saved_position<BidiIterator>(0, p, 17);
- m_backup_state = pmp;
-}
-*/
-} // namespace BOOST_REGEX_DETAIL_NS
-} // namespace boost
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_format.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/regex_format.hpp
deleted file mode 100644
index f0a0a11e40c..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_format.hpp
+++ /dev/null
@@ -1,1156 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2009 John Maddock
- * Copyright 2008 Eric Niebler.
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_format.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Provides formatting output routines for search and replace
- * operations. Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_FORMAT_HPP
-#define BOOST_REGEX_FORMAT_HPP
-
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/type_traits/is_function.hpp>
-#include <boost/type_traits/is_class.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/not.hpp>
-#ifndef BOOST_NO_SFINAE
-#include <boost/mpl/has_xxx.hpp>
-#endif
-#include <boost/ref.hpp>
-
-namespace boost{
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-//
-// Forward declaration:
-//
- template <class BidiIterator, class Allocator = BOOST_DEDUCED_TYPENAME std::vector<sub_match<BidiIterator> >::allocator_type >
-class match_results;
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-//
-// struct trivial_format_traits:
-// defines minimum localisation support for formatting
-// in the case that the actual regex traits is unavailable.
-//
-template <class charT>
-struct trivial_format_traits
-{
- typedef charT char_type;
-
- static std::ptrdiff_t length(const charT* p)
- {
- return global_length(p);
- }
- static charT tolower(charT c)
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::global_lower(c);
- }
- static charT toupper(charT c)
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::global_upper(c);
- }
- static int value(const charT c, int radix)
- {
- int result = global_value(c);
- return result >= radix ? -1 : result;
- }
- int toi(const charT*& p1, const charT* p2, int radix)const
- {
- return (int)global_toi(p1, p2, radix, *this);
- }
-};
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-class basic_regex_formatter
-{
-public:
- typedef typename traits::char_type char_type;
- basic_regex_formatter(OutputIterator o, const Results& r, const traits& t)
- : m_traits(t), m_results(r), m_out(o), m_position(), m_end(), m_flags(), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {}
- OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f);
- OutputIterator format(ForwardIter p1, match_flag_type f)
- {
- return format(p1, p1 + m_traits.length(p1), f);
- }
-private:
- typedef typename Results::value_type sub_match_type;
- enum output_state
- {
- output_copy,
- output_next_lower,
- output_next_upper,
- output_lower,
- output_upper,
- output_none
- };
-
- void put(char_type c);
- void put(const sub_match_type& sub);
- void format_all();
- void format_perl();
- void format_escape();
- void format_conditional();
- void format_until_scope_end();
- bool handle_perl_verb(bool have_brace);
-
- inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::false_&)
- {
- std::vector<char_type> v(i, j);
- return (i != j) ? this->m_results.named_subexpression(&v[0], &v[0] + v.size())
- : this->m_results.named_subexpression(static_cast<const char_type*>(0), static_cast<const char_type*>(0));
- }
- inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::true_&)
- {
- return this->m_results.named_subexpression(i, j);
- }
- inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j)
- {
- typedef typename boost::is_convertible<ForwardIter, const char_type*>::type tag_type;
- return get_named_sub(i, j, tag_type());
- }
- inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::false_&)
- {
- std::vector<char_type> v(i, j);
- return (i != j) ? this->m_results.named_subexpression_index(&v[0], &v[0] + v.size())
- : this->m_results.named_subexpression_index(static_cast<const char_type*>(0), static_cast<const char_type*>(0));
- }
- inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::true_&)
- {
- return this->m_results.named_subexpression_index(i, j);
- }
- inline int get_named_sub_index(ForwardIter i, ForwardIter j)
- {
- typedef typename boost::is_convertible<ForwardIter, const char_type*>::type tag_type;
- return get_named_sub_index(i, j, tag_type());
- }
-#ifdef BOOST_MSVC
- // msvc-8.0 issues a spurious warning on the call to std::advance here:
-#pragma warning(push)
-#pragma warning(disable:4244)
-#endif
- inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::false_&)
- {
- if(i != j)
- {
- std::vector<char_type> v(i, j);
- const char_type* start = &v[0];
- const char_type* pos = start;
- int r = (int)m_traits.toi(pos, &v[0] + v.size(), base);
- std::advance(i, pos - start);
- return r;
- }
- return -1;
- }
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
- inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::true_&)
- {
- return m_traits.toi(i, j, base);
- }
- inline int toi(ForwardIter& i, ForwardIter j, int base)
- {
-#if defined(_MSC_VER) && defined(__INTEL_COMPILER) && ((__INTEL_COMPILER == 9999) || (__INTEL_COMPILER == 1210))
- // Workaround for Intel support issue #656654.
- // See also https://svn.boost.org/trac/boost/ticket/6359
- return toi(i, j, base, mpl::false_());
-#else
- typedef typename boost::is_convertible<ForwardIter, const char_type*&>::type tag_type;
- return toi(i, j, base, tag_type());
-#endif
- }
-
- const traits& m_traits; // the traits class for localised formatting operations
- const Results& m_results; // the match_results being used.
- OutputIterator m_out; // where to send output.
- ForwardIter m_position; // format string, current position
- ForwardIter m_end; // format string end
- match_flag_type m_flags; // format flags to use
- output_state m_state; // what to do with the next character
- output_state m_restore_state; // what state to restore to.
- bool m_have_conditional; // we are parsing a conditional
-private:
- basic_regex_formatter(const basic_regex_formatter&);
- basic_regex_formatter& operator=(const basic_regex_formatter&);
-};
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-OutputIterator basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format(ForwardIter p1, ForwardIter p2, match_flag_type f)
-{
- m_position = p1;
- m_end = p2;
- m_flags = f;
- format_all();
- return m_out;
-}
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_all()
-{
- // over and over:
- while(m_position != m_end)
- {
- switch(*m_position)
- {
- case '&':
- if(m_flags & ::boost::regex_constants::format_sed)
- {
- ++m_position;
- put(m_results[0]);
- break;
- }
- put(*m_position++);
- break;
- case '\\':
- format_escape();
- break;
- case '(':
- if(m_flags & boost::regex_constants::format_all)
- {
- ++m_position;
- bool have_conditional = m_have_conditional;
- m_have_conditional = false;
- format_until_scope_end();
- m_have_conditional = have_conditional;
- if(m_position == m_end)
- return;
- BOOST_ASSERT(*m_position == static_cast<char_type>(')'));
- ++m_position; // skip the closing ')'
- break;
- }
- put(*m_position);
- ++m_position;
- break;
- case ')':
- if(m_flags & boost::regex_constants::format_all)
- {
- return;
- }
- put(*m_position);
- ++m_position;
- break;
- case ':':
- if((m_flags & boost::regex_constants::format_all) && m_have_conditional)
- {
- return;
- }
- put(*m_position);
- ++m_position;
- break;
- case '?':
- if(m_flags & boost::regex_constants::format_all)
- {
- ++m_position;
- format_conditional();
- break;
- }
- put(*m_position);
- ++m_position;
- break;
- case '$':
- if((m_flags & format_sed) == 0)
- {
- format_perl();
- break;
- }
- // not a special character:
- BOOST_FALLTHROUGH;
- default:
- put(*m_position);
- ++m_position;
- break;
- }
- }
-}
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_perl()
-{
- //
- // On entry *m_position points to a '$' character
- // output the information that goes with it:
- //
- BOOST_ASSERT(*m_position == '$');
- //
- // see if this is a trailing '$':
- //
- if(++m_position == m_end)
- {
- --m_position;
- put(*m_position);
- ++m_position;
- return;
- }
- //
- // OK find out what kind it is:
- //
- bool have_brace = false;
- ForwardIter save_position = m_position;
- switch(*m_position)
- {
- case '&':
- ++m_position;
- put(this->m_results[0]);
- break;
- case '`':
- ++m_position;
- put(this->m_results.prefix());
- break;
- case '\'':
- ++m_position;
- put(this->m_results.suffix());
- break;
- case '$':
- put(*m_position++);
- break;
- case '+':
- if((++m_position != m_end) && (*m_position == '{'))
- {
- ForwardIter base = ++m_position;
- while((m_position != m_end) && (*m_position != '}')) ++m_position;
- if(m_position != m_end)
- {
- // Named sub-expression:
- put(get_named_sub(base, m_position));
- ++m_position;
- break;
- }
- else
- {
- m_position = --base;
- }
- }
- put((this->m_results)[this->m_results.size() > 1 ? static_cast<int>(this->m_results.size() - 1) : 1]);
- break;
- case '{':
- have_brace = true;
- ++m_position;
- BOOST_FALLTHROUGH;
- default:
- // see if we have a number:
- {
- std::ptrdiff_t len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
- //len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
- int v = this->toi(m_position, m_position + len, 10);
- if((v < 0) || (have_brace && ((m_position == m_end) || (*m_position != '}'))))
- {
- // Look for a Perl-5.10 verb:
- if(!handle_perl_verb(have_brace))
- {
- // leave the $ as is, and carry on:
- m_position = --save_position;
- put(*m_position);
- ++m_position;
- }
- break;
- }
- // otherwise output sub v:
- put(this->m_results[v]);
- if(have_brace)
- ++m_position;
- }
- }
-}
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-bool basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::handle_perl_verb(bool have_brace)
-{
- //
- // We may have a capitalised string containing a Perl action:
- //
- static const char_type MATCH[] = { 'M', 'A', 'T', 'C', 'H' };
- static const char_type PREMATCH[] = { 'P', 'R', 'E', 'M', 'A', 'T', 'C', 'H' };
- static const char_type POSTMATCH[] = { 'P', 'O', 'S', 'T', 'M', 'A', 'T', 'C', 'H' };
- static const char_type LAST_PAREN_MATCH[] = { 'L', 'A', 'S', 'T', '_', 'P', 'A', 'R', 'E', 'N', '_', 'M', 'A', 'T', 'C', 'H' };
- static const char_type LAST_SUBMATCH_RESULT[] = { 'L', 'A', 'S', 'T', '_', 'S', 'U', 'B', 'M', 'A', 'T', 'C', 'H', '_', 'R', 'E', 'S', 'U', 'L', 'T' };
- static const char_type LAST_SUBMATCH_RESULT_ALT[] = { '^', 'N' };
-
- if(m_position == m_end)
- return false;
- if(have_brace && (*m_position == '^'))
- ++m_position;
-
- std::ptrdiff_t max_len = m_end - m_position;
-
- if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH))
- {
- m_position += 5;
- if(have_brace)
- {
- if((m_position != m_end) && (*m_position == '}'))
- ++m_position;
- else
- {
- m_position -= 5;
- return false;
- }
- }
- put(this->m_results[0]);
- return true;
- }
- if((max_len >= 8) && std::equal(m_position, m_position + 8, PREMATCH))
- {
- m_position += 8;
- if(have_brace)
- {
- if((m_position != m_end) && (*m_position == '}'))
- ++m_position;
- else
- {
- m_position -= 8;
- return false;
- }
- }
- put(this->m_results.prefix());
- return true;
- }
- if((max_len >= 9) && std::equal(m_position, m_position + 9, POSTMATCH))
- {
- m_position += 9;
- if(have_brace)
- {
- if((m_position != m_end) && (*m_position == '}'))
- ++m_position;
- else
- {
- m_position -= 9;
- return false;
- }
- }
- put(this->m_results.suffix());
- return true;
- }
- if((max_len >= 16) && std::equal(m_position, m_position + 16, LAST_PAREN_MATCH))
- {
- m_position += 16;
- if(have_brace)
- {
- if((m_position != m_end) && (*m_position == '}'))
- ++m_position;
- else
- {
- m_position -= 16;
- return false;
- }
- }
- put((this->m_results)[this->m_results.size() > 1 ? static_cast<int>(this->m_results.size() - 1) : 1]);
- return true;
- }
- if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT))
- {
- m_position += 20;
- if(have_brace)
- {
- if((m_position != m_end) && (*m_position == '}'))
- ++m_position;
- else
- {
- m_position -= 20;
- return false;
- }
- }
- put(this->m_results.get_last_closed_paren());
- return true;
- }
- if((max_len >= 2) && std::equal(m_position, m_position + 2, LAST_SUBMATCH_RESULT_ALT))
- {
- m_position += 2;
- if(have_brace)
- {
- if((m_position != m_end) && (*m_position == '}'))
- ++m_position;
- else
- {
- m_position -= 2;
- return false;
- }
- }
- put(this->m_results.get_last_closed_paren());
- return true;
- }
- return false;
-}
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_escape()
-{
- // skip the escape and check for trailing escape:
- if(++m_position == m_end)
- {
- put(static_cast<char_type>('\\'));
- return;
- }
- // now switch on the escape type:
- switch(*m_position)
- {
- case 'a':
- put(static_cast<char_type>('\a'));
- ++m_position;
- break;
- case 'f':
- put(static_cast<char_type>('\f'));
- ++m_position;
- break;
- case 'n':
- put(static_cast<char_type>('\n'));
- ++m_position;
- break;
- case 'r':
- put(static_cast<char_type>('\r'));
- ++m_position;
- break;
- case 't':
- put(static_cast<char_type>('\t'));
- ++m_position;
- break;
- case 'v':
- put(static_cast<char_type>('\v'));
- ++m_position;
- break;
- case 'x':
- if(++m_position == m_end)
- {
- put(static_cast<char_type>('x'));
- return;
- }
- // maybe have \x{ddd}
- if(*m_position == static_cast<char_type>('{'))
- {
- ++m_position;
- int val = this->toi(m_position, m_end, 16);
- if(val < 0)
- {
- // invalid value treat everything as literals:
- put(static_cast<char_type>('x'));
- put(static_cast<char_type>('{'));
- return;
- }
- if((m_position == m_end) || (*m_position != static_cast<char_type>('}')))
- {
- --m_position;
- while(*m_position != static_cast<char_type>('\\'))
- --m_position;
- ++m_position;
- put(*m_position++);
- return;
- }
- ++m_position;
- put(static_cast<char_type>(val));
- return;
- }
- else
- {
- std::ptrdiff_t len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
- len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
- int val = this->toi(m_position, m_position + len, 16);
- if(val < 0)
- {
- --m_position;
- put(*m_position++);
- return;
- }
- put(static_cast<char_type>(val));
- }
- break;
- case 'c':
- if(++m_position == m_end)
- {
- --m_position;
- put(*m_position++);
- return;
- }
- put(static_cast<char_type>(*m_position++ % 32));
- break;
- case 'e':
- put(static_cast<char_type>(27));
- ++m_position;
- break;
- default:
- // see if we have a perl specific escape:
- if((m_flags & boost::regex_constants::format_sed) == 0)
- {
- bool breakout = false;
- switch(*m_position)
- {
- case 'l':
- ++m_position;
- m_restore_state = m_state;
- m_state = output_next_lower;
- breakout = true;
- break;
- case 'L':
- ++m_position;
- m_state = output_lower;
- breakout = true;
- break;
- case 'u':
- ++m_position;
- m_restore_state = m_state;
- m_state = output_next_upper;
- breakout = true;
- break;
- case 'U':
- ++m_position;
- m_state = output_upper;
- breakout = true;
- break;
- case 'E':
- ++m_position;
- m_state = output_copy;
- breakout = true;
- break;
- }
- if(breakout)
- break;
- }
- // see if we have a \n sed style backreference:
- std::ptrdiff_t len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
- len = (std::min)(static_cast<std::ptrdiff_t>(1), len);
- int v = this->toi(m_position, m_position+len, 10);
- if((v > 0) || ((v == 0) && (m_flags & ::boost::regex_constants::format_sed)))
- {
- put(m_results[v]);
- break;
- }
- else if(v == 0)
- {
- // octal ecape sequence:
- --m_position;
- len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
- len = (std::min)(static_cast<std::ptrdiff_t>(4), len);
- v = this->toi(m_position, m_position + len, 8);
- BOOST_ASSERT(v >= 0);
- put(static_cast<char_type>(v));
- break;
- }
- // Otherwise output the character "as is":
- put(*m_position++);
- break;
- }
-}
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_conditional()
-{
- if(m_position == m_end)
- {
- // oops trailing '?':
- put(static_cast<char_type>('?'));
- return;
- }
- int v;
- if(*m_position == '{')
- {
- ForwardIter base = m_position;
- ++m_position;
- v = this->toi(m_position, m_end, 10);
- if(v < 0)
- {
- // Try a named subexpression:
- while((m_position != m_end) && (*m_position != '}'))
- ++m_position;
- v = this->get_named_sub_index(base + 1, m_position);
- }
- if((v < 0) || (*m_position != '}'))
- {
- m_position = base;
- // oops trailing '?':
- put(static_cast<char_type>('?'));
- return;
- }
- // Skip trailing '}':
- ++m_position;
- }
- else
- {
- std::ptrdiff_t len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
- len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
- v = this->toi(m_position, m_position + len, 10);
- }
- if(v < 0)
- {
- // oops not a number:
- put(static_cast<char_type>('?'));
- return;
- }
-
- // output varies depending upon whether sub-expression v matched or not:
- if(m_results[v].matched)
- {
- m_have_conditional = true;
- format_all();
- m_have_conditional = false;
- if((m_position != m_end) && (*m_position == static_cast<char_type>(':')))
- {
- // skip the ':':
- ++m_position;
- // save output state, then turn it off:
- output_state saved_state = m_state;
- m_state = output_none;
- // format the rest of this scope:
- format_until_scope_end();
- // restore output state:
- m_state = saved_state;
- }
- }
- else
- {
- // save output state, then turn it off:
- output_state saved_state = m_state;
- m_state = output_none;
- // format until ':' or ')':
- m_have_conditional = true;
- format_all();
- m_have_conditional = false;
- // restore state:
- m_state = saved_state;
- if((m_position != m_end) && (*m_position == static_cast<char_type>(':')))
- {
- // skip the ':':
- ++m_position;
- // format the rest of this scope:
- format_until_scope_end();
- }
- }
-}
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_until_scope_end()
-{
- do
- {
- format_all();
- if((m_position == m_end) || (*m_position == static_cast<char_type>(')')))
- return;
- put(*m_position++);
- }while(m_position != m_end);
-}
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::put(char_type c)
-{
- // write a single character to output
- // according to which case translation mode we are in:
- switch(this->m_state)
- {
- case output_none:
- return;
- case output_next_lower:
- c = m_traits.tolower(c);
- this->m_state = m_restore_state;
- break;
- case output_next_upper:
- c = m_traits.toupper(c);
- this->m_state = m_restore_state;
- break;
- case output_lower:
- c = m_traits.tolower(c);
- break;
- case output_upper:
- c = m_traits.toupper(c);
- break;
- default:
- break;
- }
- *m_out = c;
- ++m_out;
-}
-
-template <class OutputIterator, class Results, class traits, class ForwardIter>
-void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::put(const sub_match_type& sub)
-{
- typedef typename sub_match_type::iterator iterator_type;
- iterator_type i = sub.first;
- while(i != sub.second)
- {
- put(*i);
- ++i;
- }
-}
-
-template <class S>
-class string_out_iterator
-#ifndef BOOST_NO_STD_ITERATOR
- : public std::iterator<std::output_iterator_tag, typename S::value_type>
-#endif
-{
- S* out;
-public:
- string_out_iterator(S& s) : out(&s) {}
- string_out_iterator& operator++() { return *this; }
- string_out_iterator& operator++(int) { return *this; }
- string_out_iterator& operator*() { return *this; }
- string_out_iterator& operator=(typename S::value_type v)
- {
- out->append(1, v);
- return *this;
- }
-
-#ifdef BOOST_NO_STD_ITERATOR
- typedef std::ptrdiff_t difference_type;
- typedef typename S::value_type value_type;
- typedef value_type* pointer;
- typedef value_type& reference;
- typedef std::output_iterator_tag iterator_category;
-#endif
-};
-
-template <class OutputIterator, class Iterator, class Alloc, class ForwardIter, class traits>
-OutputIterator regex_format_imp(OutputIterator out,
- const match_results<Iterator, Alloc>& m,
- ForwardIter p1, ForwardIter p2,
- match_flag_type flags,
- const traits& t
- )
-{
- if(flags & regex_constants::format_literal)
- {
- return BOOST_REGEX_DETAIL_NS::copy(p1, p2, out);
- }
-
- BOOST_REGEX_DETAIL_NS::basic_regex_formatter<
- OutputIterator,
- match_results<Iterator, Alloc>,
- traits, ForwardIter> f(out, m, t);
- return f.format(p1, p2, flags);
-}
-
-#ifndef BOOST_NO_SFINAE
-
-BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
-
-struct any_type
-{
- template <class T>
- any_type(const T&);
- template <class T, class U>
- any_type(const T&, const U&);
- template <class T, class U, class V>
- any_type(const T&, const U&, const V&);
-};
-typedef char no_type;
-typedef char (&unary_type)[2];
-typedef char (&binary_type)[3];
-typedef char (&ternary_type)[4];
-
-no_type check_is_formatter(unary_type, binary_type, ternary_type);
-template<typename T>
-unary_type check_is_formatter(T const &, binary_type, ternary_type);
-template<typename T>
-binary_type check_is_formatter(unary_type, T const &, ternary_type);
-template<typename T, typename U>
-binary_type check_is_formatter(T const &, U const &, ternary_type);
-template<typename T>
-ternary_type check_is_formatter(unary_type, binary_type, T const &);
-template<typename T, typename U>
-ternary_type check_is_formatter(T const &, binary_type, U const &);
-template<typename T, typename U>
-ternary_type check_is_formatter(unary_type, T const &, U const &);
-template<typename T, typename U, typename V>
-ternary_type check_is_formatter(T const &, U const &, V const &);
-
-struct unary_binary_ternary
-{
- typedef unary_type (*unary_fun)(any_type);
- typedef binary_type (*binary_fun)(any_type, any_type);
- typedef ternary_type (*ternary_fun)(any_type, any_type, any_type);
- operator unary_fun();
- operator binary_fun();
- operator ternary_fun();
-};
-
-template<typename Formatter, bool IsFunction = boost::is_function<Formatter>::value>
-struct formatter_wrapper
- : Formatter
- , unary_binary_ternary
-{
- formatter_wrapper(){}
-};
-
-template<typename Formatter>
-struct formatter_wrapper<Formatter, true>
- : unary_binary_ternary
-{
- operator Formatter *();
-};
-
-template<typename Formatter>
-struct formatter_wrapper<Formatter *, false>
- : unary_binary_ternary
-{
- operator Formatter *();
-};
-
-template <class F, class M, class O>
-struct format_traits_imp
-{
-private:
- //
- // F must be a pointer, a function, or a class with a function call operator:
- //
- BOOST_STATIC_ASSERT((::boost::is_pointer<F>::value || ::boost::is_function<F>::value || ::boost::is_class<F>::value));
- static formatter_wrapper<typename unwrap_reference<F>::type> f;
- static M m;
- static O out;
- static boost::regex_constants::match_flag_type flags;
-public:
- BOOST_STATIC_CONSTANT(int, value = sizeof(check_is_formatter(f(m), f(m, out), f(m, out, flags))));
-};
-
-template <class F, class M, class O>
-struct format_traits
-{
-public:
- //
- // Type is mpl::int_<N> where N is one of:
- //
- // 0 : F is a pointer to a presumably null-terminated string.
- // 1 : F is a character-container such as a std::string.
- // 2 : F is a Unary Functor.
- // 3 : F is a Binary Functor.
- // 4 : F is a Ternary Functor.
- //
- typedef typename boost::mpl::if_<
- boost::mpl::and_<boost::is_pointer<F>, boost::mpl::not_<boost::is_function<typename boost::remove_pointer<F>::type> > >,
- boost::mpl::int_<0>,
- typename boost::mpl::if_<
- has_const_iterator<F>,
- boost::mpl::int_<1>,
- boost::mpl::int_<format_traits_imp<F, M, O>::value>
- >::type
- >::type type;
- //
- // This static assertion will fail if the functor passed does not accept
- // the same type of arguments passed.
- //
- BOOST_STATIC_ASSERT( boost::is_class<F>::value && !has_const_iterator<F>::value ? (type::value > 1) : true);
-};
-
-#else // BOOST_NO_SFINAE
-
-template <class F, class M, class O>
-struct format_traits
-{
-public:
- //
- // Type is mpl::int_<N> where N is one of:
- //
- // 0 : F is a pointer to a presumably null-terminated string.
- // 1 : F is a character-container such as a std::string.
- //
- // Other options such as F being a Functor are not supported without
- // SFINAE support.
- //
- typedef typename boost::mpl::if_<
- boost::is_pointer<F>,
- boost::mpl::int_<0>,
- boost::mpl::int_<1>
- >::type type;
-};
-
-#endif // BOOST_NO_SFINAE
-
-template <class Base, class Match>
-struct format_functor3
-{
- format_functor3(Base b) : func(b) {}
- template <class OutputIter>
- OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f)
- {
- return boost::unwrap_ref(func)(m, i, f);
- }
- template <class OutputIter, class Traits>
- OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
- {
- return (*this)(m, i, f);
- }
-private:
- Base func;
- format_functor3(const format_functor3&);
- format_functor3& operator=(const format_functor3&);
-};
-
-template <class Base, class Match>
-struct format_functor2
-{
- format_functor2(Base b) : func(b) {}
- template <class OutputIter>
- OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
- {
- return boost::unwrap_ref(func)(m, i);
- }
- template <class OutputIter, class Traits>
- OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
- {
- return (*this)(m, i, f);
- }
-private:
- Base func;
- format_functor2(const format_functor2&);
- format_functor2& operator=(const format_functor2&);
-};
-
-template <class Base, class Match>
-struct format_functor1
-{
- format_functor1(Base b) : func(b) {}
-
- template <class S, class OutputIter>
- OutputIter do_format_string(const S& s, OutputIter i)
- {
- return BOOST_REGEX_DETAIL_NS::copy(s.begin(), s.end(), i);
- }
- template <class S, class OutputIter>
- inline OutputIter do_format_string(const S* s, OutputIter i)
- {
- while(s && *s)
- {
- *i = *s;
- ++i;
- ++s;
- }
- return i;
- }
- template <class OutputIter>
- OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
- {
- return do_format_string(boost::unwrap_ref(func)(m), i);
- }
- template <class OutputIter, class Traits>
- OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
- {
- return (*this)(m, i, f);
- }
-private:
- Base func;
- format_functor1(const format_functor1&);
- format_functor1& operator=(const format_functor1&);
-};
-
-template <class charT, class Match, class Traits>
-struct format_functor_c_string
-{
- format_functor_c_string(const charT* ps) : func(ps) {}
-
- template <class OutputIter>
- OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())
- {
- //typedef typename Match::char_type char_type;
- const charT* end = func;
- while(*end) ++end;
- return regex_format_imp(i, m, func, end, f, t);
- }
-private:
- const charT* func;
- format_functor_c_string(const format_functor_c_string&);
- format_functor_c_string& operator=(const format_functor_c_string&);
-};
-
-template <class Container, class Match, class Traits>
-struct format_functor_container
-{
- format_functor_container(const Container& c) : func(c) {}
-
- template <class OutputIter>
- OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())
- {
- //typedef typename Match::char_type char_type;
- return BOOST_REGEX_DETAIL_NS::regex_format_imp(i, m, func.begin(), func.end(), f, t);
- }
-private:
- const Container& func;
- format_functor_container(const format_functor_container&);
- format_functor_container& operator=(const format_functor_container&);
-};
-
-template <class Func, class Match, class OutputIterator, class Traits = BOOST_REGEX_DETAIL_NS::trivial_format_traits<typename Match::char_type> >
-struct compute_functor_type
-{
- typedef typename format_traits<Func, Match, OutputIterator>::type tag;
- typedef typename boost::remove_cv< typename boost::remove_pointer<Func>::type>::type maybe_char_type;
-
- typedef typename mpl::if_<
- ::boost::is_same<tag, mpl::int_<0> >, format_functor_c_string<maybe_char_type, Match, Traits>,
- typename mpl::if_<
- ::boost::is_same<tag, mpl::int_<1> >, format_functor_container<Func, Match, Traits>,
- typename mpl::if_<
- ::boost::is_same<tag, mpl::int_<2> >, format_functor1<Func, Match>,
- typename mpl::if_<
- ::boost::is_same<tag, mpl::int_<3> >, format_functor2<Func, Match>,
- format_functor3<Func, Match>
- >::type
- >::type
- >::type
- >::type type;
-};
-
-} // namespace BOOST_REGEX_DETAIL_NS
-
-template <class OutputIterator, class Iterator, class Allocator, class Functor>
-inline OutputIterator regex_format(OutputIterator out,
- const match_results<Iterator, Allocator>& m,
- Functor fmt,
- match_flag_type flags = format_all
- )
-{
- return m.format(out, fmt, flags);
-}
-
-template <class Iterator, class Allocator, class Functor>
-inline std::basic_string<typename match_results<Iterator, Allocator>::char_type> regex_format(const match_results<Iterator, Allocator>& m,
- Functor fmt,
- match_flag_type flags = format_all)
-{
- return m.format(fmt, flags);
-}
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_FORMAT_HPP
-
-
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_iterator.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/regex_iterator.hpp
deleted file mode 100644
index 0d10a1b98f9..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_iterator.hpp
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- *
- * Copyright (c) 2003
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_iterator.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Provides regex_iterator implementation.
- */
-
-#ifndef BOOST_REGEX_V4_REGEX_ITERATOR_HPP
-#define BOOST_REGEX_V4_REGEX_ITERATOR_HPP
-
-#include <boost/shared_ptr.hpp>
-
-namespace boost{
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-template <class BidirectionalIterator,
- class charT,
- class traits>
-class regex_iterator_implementation
-{
- typedef basic_regex<charT, traits> regex_type;
-
- match_results<BidirectionalIterator> what; // current match
- BidirectionalIterator base; // start of sequence
- BidirectionalIterator end; // end of sequence
- const regex_type re; // the expression
- match_flag_type flags; // flags for matching
-
-public:
- regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f)
- : base(), end(last), re(*p), flags(f){}
- bool init(BidirectionalIterator first)
- {
- base = first;
- return regex_search(first, end, what, re, flags);
- }
- bool compare(const regex_iterator_implementation& that)
- {
- if(this == &that) return true;
- return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second);
- }
- const match_results<BidirectionalIterator>& get()
- { return what; }
- bool next()
- {
- //if(what.prefix().first != what[0].second)
- // flags |= match_prev_avail;
- BidirectionalIterator next_start = what[0].second;
- match_flag_type f(flags);
- if(!what.length() || (f & regex_constants::match_posix))
- f |= regex_constants::match_not_initial_null;
- //if(base != next_start)
- // f |= regex_constants::match_not_bob;
- bool result = regex_search(next_start, end, what, re, f, base);
- if(result)
- what.set_base(base);
- return result;
- }
-private:
- regex_iterator_implementation& operator=(const regex_iterator_implementation&);
-};
-
-template <class BidirectionalIterator,
- class charT = BOOST_DEDUCED_TYPENAME BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::value_type,
- class traits = regex_traits<charT> >
-class regex_iterator
-#ifndef BOOST_NO_STD_ITERATOR
- : public std::iterator<
- std::forward_iterator_tag,
- match_results<BidirectionalIterator>,
- typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type,
- const match_results<BidirectionalIterator>*,
- const match_results<BidirectionalIterator>& >
-#endif
-{
-private:
- typedef regex_iterator_implementation<BidirectionalIterator, charT, traits> impl;
- typedef shared_ptr<impl> pimpl;
-public:
- typedef basic_regex<charT, traits> regex_type;
- typedef match_results<BidirectionalIterator> value_type;
- typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type
- difference_type;
- typedef const value_type* pointer;
- typedef const value_type& reference;
- typedef std::forward_iterator_tag iterator_category;
-
- regex_iterator(){}
- regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
- const regex_type& re,
- match_flag_type m = match_default)
- : pdata(new impl(&re, b, m))
- {
- if(!pdata->init(a))
- {
- pdata.reset();
- }
- }
- regex_iterator(const regex_iterator& that)
- : pdata(that.pdata) {}
- regex_iterator& operator=(const regex_iterator& that)
- {
- pdata = that.pdata;
- return *this;
- }
- bool operator==(const regex_iterator& that)const
- {
- if((pdata.get() == 0) || (that.pdata.get() == 0))
- return pdata.get() == that.pdata.get();
- return pdata->compare(*(that.pdata.get()));
- }
- bool operator!=(const regex_iterator& that)const
- { return !(*this == that); }
- const value_type& operator*()const
- { return pdata->get(); }
- const value_type* operator->()const
- { return &(pdata->get()); }
- regex_iterator& operator++()
- {
- cow();
- if(0 == pdata->next())
- {
- pdata.reset();
- }
- return *this;
- }
- regex_iterator operator++(int)
- {
- regex_iterator result(*this);
- ++(*this);
- return result;
- }
-private:
-
- pimpl pdata;
-
- void cow()
- {
- // copy-on-write
- if(pdata.get() && !pdata.unique())
- {
- pdata.reset(new impl(*(pdata.get())));
- }
- }
-};
-
-typedef regex_iterator<const char*> cregex_iterator;
-typedef regex_iterator<std::string::const_iterator> sregex_iterator;
-#ifndef BOOST_NO_WREGEX
-typedef regex_iterator<const wchar_t*> wcregex_iterator;
-typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator;
-#endif
-
-// make_regex_iterator:
-template <class charT, class traits>
-inline regex_iterator<const charT*, charT, traits> make_regex_iterator(const charT* p, const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return regex_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, m);
-}
-template <class charT, class traits, class ST, class SA>
-inline regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, m);
-}
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_V4_REGEX_ITERATOR_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_raw_buffer.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/regex_raw_buffer.hpp
deleted file mode 100644
index fcdb856a55e..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_raw_buffer.hpp
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_raw_buffer.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Raw character buffer for regex code.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_RAW_BUFFER_HPP
-#define BOOST_REGEX_RAW_BUFFER_HPP
-
-#ifndef BOOST_REGEX_CONFIG_HPP
-#include <boost/regex/config.hpp>
-#endif
-
-#include <algorithm>
-#include <cstddef>
-
-namespace boost{
- namespace BOOST_REGEX_DETAIL_NS{
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-struct empty_padding{};
-
-union padding
-{
- void* p;
- unsigned int i;
-};
-
-template <int N>
-struct padding3
-{
- enum{
- padding_size = 8,
- padding_mask = 7
- };
-};
-
-template<>
-struct padding3<2>
-{
- enum{
- padding_size = 2,
- padding_mask = 1
- };
-};
-
-template<>
-struct padding3<4>
-{
- enum{
- padding_size = 4,
- padding_mask = 3
- };
-};
-
-template<>
-struct padding3<8>
-{
- enum{
- padding_size = 8,
- padding_mask = 7
- };
-};
-
-template<>
-struct padding3<16>
-{
- enum{
- padding_size = 16,
- padding_mask = 15
- };
-};
-
-enum{
- padding_size = padding3<sizeof(padding)>::padding_size,
- padding_mask = padding3<sizeof(padding)>::padding_mask
-};
-
-//
-// class raw_storage
-// basically this is a simplified vector<unsigned char>
-// this is used by basic_regex for expression storage
-//
-
-class BOOST_REGEX_DECL raw_storage
-{
-public:
- typedef std::size_t size_type;
- typedef unsigned char* pointer;
-private:
- pointer last, start, end;
-public:
-
- raw_storage();
- raw_storage(size_type n);
-
- ~raw_storage()
- {
- ::operator delete(start);
- }
-
- void BOOST_REGEX_CALL resize(size_type n);
-
- void* BOOST_REGEX_CALL extend(size_type n)
- {
- if(size_type(last - end) < n)
- resize(n + (end - start));
- pointer result = end;
- end += n;
- return result;
- }
-
- void* BOOST_REGEX_CALL insert(size_type pos, size_type n);
-
- size_type BOOST_REGEX_CALL size()
- {
- return end - start;
- }
-
- size_type BOOST_REGEX_CALL capacity()
- {
- return last - start;
- }
-
- void* BOOST_REGEX_CALL data()const
- {
- return start;
- }
-
- size_type BOOST_REGEX_CALL index(void* ptr)
- {
- return static_cast<pointer>(ptr) - static_cast<pointer>(data());
- }
-
- void BOOST_REGEX_CALL clear()
- {
- end = start;
- }
-
- void BOOST_REGEX_CALL align()
- {
- // move end up to a boundary:
- end = start + (((end - start) + padding_mask) & ~padding_mask);
- }
- void swap(raw_storage& that)
- {
- std::swap(start, that.start);
- std::swap(end, that.end);
- std::swap(last, that.last);
- }
-};
-
-inline raw_storage::raw_storage()
-{
- last = start = end = 0;
-}
-
-inline raw_storage::raw_storage(size_type n)
-{
- start = end = static_cast<pointer>(::operator new(n));
- BOOST_REGEX_NOEH_ASSERT(start)
- last = start + n;
-}
-
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespace BOOST_REGEX_DETAIL_NS
-} // namespace boost
-
-#endif
-
-
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_split.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/regex_split.hpp
deleted file mode 100644
index 65b2c64abf7..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_split.hpp
+++ /dev/null
@@ -1,172 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_split.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Implements regex_split and associated functions.
- * Note this is an internal header file included
- * by regex.hpp, do not include on its own.
- */
-
-#ifndef BOOST_REGEX_SPLIT_HPP
-#define BOOST_REGEX_SPLIT_HPP
-
-namespace boost{
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4800)
-#endif
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-template <class charT>
-const basic_regex<charT>& get_default_expression(charT)
-{
- static const charT expression_text[4] = { '\\', 's', '+', '\00', };
- static const basic_regex<charT> e(expression_text);
- return e;
-}
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1>
-class split_pred
-{
- typedef std::basic_string<charT, Traits1, Alloc1> string_type;
- typedef typename string_type::const_iterator iterator_type;
- iterator_type* p_last;
- OutputIterator* p_out;
- std::size_t* p_max;
- std::size_t initial_max;
-public:
- split_pred(iterator_type* a, OutputIterator* b, std::size_t* c)
- : p_last(a), p_out(b), p_max(c), initial_max(*c) {}
-
- bool operator()(const match_results<iterator_type>& what);
-};
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1>
-bool split_pred<OutputIterator, charT, Traits1, Alloc1>::operator()
- (const match_results<iterator_type>& what)
-{
- *p_last = what[0].second;
- if(what.size() > 1)
- {
- // output sub-expressions only:
- for(unsigned i = 1; i < what.size(); ++i)
- {
- *(*p_out) = what.str(i);
- ++(*p_out);
- if(0 == --*p_max) return false;
- }
- return *p_max != 0;
- }
- else
- {
- // output $` only if it's not-null or not at the start of the input:
- const sub_match<iterator_type>& sub = what[-1];
- if((sub.first != sub.second) || (*p_max != initial_max))
- {
- *(*p_out) = sub.str();
- ++(*p_out);
- return --*p_max;
- }
- }
- //
- // initial null, do nothing:
- return true;
-}
-
-} // namespace BOOST_REGEX_DETAIL_NS
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
-std::size_t regex_split(OutputIterator out,
- std::basic_string<charT, Traits1, Alloc1>& s,
- const basic_regex<charT, Traits2>& e,
- match_flag_type flags,
- std::size_t max_split)
-{
- typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator ci_t;
- //typedef typename match_results<ci_t>::allocator_type match_allocator;
- ci_t last = s.begin();
- std::size_t init_size = max_split;
- BOOST_REGEX_DETAIL_NS::split_pred<OutputIterator, charT, Traits1, Alloc1> pred(&last, &out, &max_split);
- ci_t i, j;
- i = s.begin();
- j = s.end();
- regex_grep(pred, i, j, e, flags);
- //
- // if there is still input left, do a final push as long as max_split
- // is not exhausted, and we're not splitting sub-expressions rather
- // than whitespace:
- if(max_split && (last != s.end()) && (e.mark_count() == 0))
- {
- *out = std::basic_string<charT, Traits1, Alloc1>((ci_t)last, (ci_t)s.end());
- ++out;
- last = s.end();
- --max_split;
- }
- //
- // delete from the string everything that has been processed so far:
- s.erase(0, last - s.begin());
- //
- // return the number of new records pushed:
- return init_size - max_split;
-}
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
-inline std::size_t regex_split(OutputIterator out,
- std::basic_string<charT, Traits1, Alloc1>& s,
- const basic_regex<charT, Traits2>& e,
- match_flag_type flags = match_default)
-{
- return regex_split(out, s, e, flags, UINT_MAX);
-}
-
-template <class OutputIterator, class charT, class Traits1, class Alloc1>
-inline std::size_t regex_split(OutputIterator out,
- std::basic_string<charT, Traits1, Alloc1>& s)
-{
- return regex_split(out, s, BOOST_REGEX_DETAIL_NS::get_default_expression(charT(0)), match_default, UINT_MAX);
-}
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespace boost
-
-#endif
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_token_iterator.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/regex_token_iterator.hpp
deleted file mode 100644
index 1d75604bf14..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_token_iterator.hpp
+++ /dev/null
@@ -1,333 +0,0 @@
-/*
- *
- * Copyright (c) 2003
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_token_iterator.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Provides regex_token_iterator implementation.
- */
-
-#ifndef BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
-#define BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
-
-#include <boost/shared_ptr.hpp>
-#include <boost/detail/workaround.hpp>
-#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
- || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
-//
-// Borland C++ Builder 6, and Visual C++ 6,
-// can't cope with the array template constructor
-// so we have a template member that will accept any type as
-// argument, and then assert that is really is an array:
-//
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_array.hpp>
-#endif
-
-namespace boost{
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#pragma warning(push)
-#pragma warning(disable:4700)
-#endif
-
-template <class BidirectionalIterator,
- class charT,
- class traits>
-class regex_token_iterator_implementation
-{
- typedef basic_regex<charT, traits> regex_type;
- typedef sub_match<BidirectionalIterator> value_type;
-
- match_results<BidirectionalIterator> what; // current match
- BidirectionalIterator base; // start of search area
- BidirectionalIterator end; // end of search area
- const regex_type re; // the expression
- match_flag_type flags; // match flags
- value_type result; // the current string result
- int N; // the current sub-expression being enumerated
- std::vector<int> subs; // the sub-expressions to enumerate
-
-public:
- regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f)
- : end(last), re(*p), flags(f){ subs.push_back(sub); }
- regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
- : end(last), re(*p), flags(f), subs(v){}
-#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
-#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
- || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
- || BOOST_WORKAROUND(__HP_aCC, < 60700)
- template <class T>
- regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f)
- : end(last), re(*p), flags(f)
- {
- // assert that T really is an array:
- BOOST_STATIC_ASSERT(::boost::is_array<T>::value);
- const std::size_t array_size = sizeof(T) / sizeof(submatches[0]);
- for(std::size_t i = 0; i < array_size; ++i)
- {
- subs.push_back(submatches[i]);
- }
- }
-#else
- template <std::size_t CN>
- regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f)
- : end(last), re(*p), flags(f)
- {
- for(std::size_t i = 0; i < CN; ++i)
- {
- subs.push_back(submatches[i]);
- }
- }
-#endif
-#endif
- bool init(BidirectionalIterator first)
- {
- N = 0;
- base = first;
- if(regex_search(first, end, what, re, flags, base) == true)
- {
- N = 0;
- result = ((subs[N] == -1) ? what.prefix() : what[(int)subs[N]]);
- return true;
- }
- else if((subs[N] == -1) && (first != end))
- {
- result.first = first;
- result.second = end;
- result.matched = (first != end);
- N = -1;
- return true;
- }
- return false;
- }
- bool compare(const regex_token_iterator_implementation& that)
- {
- if(this == &that) return true;
- return (&re.get_data() == &that.re.get_data())
- && (end == that.end)
- && (flags == that.flags)
- && (N == that.N)
- && (what[0].first == that.what[0].first)
- && (what[0].second == that.what[0].second);
- }
- const value_type& get()
- { return result; }
- bool next()
- {
- if(N == -1)
- return false;
- if(N+1 < (int)subs.size())
- {
- ++N;
- result =((subs[N] == -1) ? what.prefix() : what[subs[N]]);
- return true;
- }
- //if(what.prefix().first != what[0].second)
- // flags |= /*match_prev_avail |*/ regex_constants::match_not_bob;
- BidirectionalIterator last_end(what[0].second);
- if(regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags), base))
- {
- N =0;
- result =((subs[N] == -1) ? what.prefix() : what[subs[N]]);
- return true;
- }
- else if((last_end != end) && (subs[0] == -1))
- {
- N =-1;
- result.first = last_end;
- result.second = end;
- result.matched = (last_end != end);
- return true;
- }
- return false;
- }
-private:
- regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&);
-};
-
-template <class BidirectionalIterator,
- class charT = BOOST_DEDUCED_TYPENAME BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::value_type,
- class traits = regex_traits<charT> >
-class regex_token_iterator
-#ifndef BOOST_NO_STD_ITERATOR
- : public std::iterator<
- std::forward_iterator_tag,
- sub_match<BidirectionalIterator>,
- typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type,
- const sub_match<BidirectionalIterator>*,
- const sub_match<BidirectionalIterator>& >
-#endif
-{
-private:
- typedef regex_token_iterator_implementation<BidirectionalIterator, charT, traits> impl;
- typedef shared_ptr<impl> pimpl;
-public:
- typedef basic_regex<charT, traits> regex_type;
- typedef sub_match<BidirectionalIterator> value_type;
- typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type
- difference_type;
- typedef const value_type* pointer;
- typedef const value_type& reference;
- typedef std::forward_iterator_tag iterator_category;
-
- regex_token_iterator(){}
- regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
- int submatch = 0, match_flag_type m = match_default)
- : pdata(new impl(&re, b, submatch, m))
- {
- if(!pdata->init(a))
- pdata.reset();
- }
- regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
- const std::vector<int>& submatches, match_flag_type m = match_default)
- : pdata(new impl(&re, b, submatches, m))
- {
- if(!pdata->init(a))
- pdata.reset();
- }
-#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
-#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
- || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
- || BOOST_WORKAROUND(__HP_aCC, < 60700)
- template <class T>
- regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
- const T& submatches, match_flag_type m = match_default)
- : pdata(new impl(&re, b, submatches, m))
- {
- if(!pdata->init(a))
- pdata.reset();
- }
-#else
- template <std::size_t N>
- regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
- const int (&submatches)[N], match_flag_type m = match_default)
- : pdata(new impl(&re, b, submatches, m))
- {
- if(!pdata->init(a))
- pdata.reset();
- }
-#endif
-#endif
- regex_token_iterator(const regex_token_iterator& that)
- : pdata(that.pdata) {}
- regex_token_iterator& operator=(const regex_token_iterator& that)
- {
- pdata = that.pdata;
- return *this;
- }
- bool operator==(const regex_token_iterator& that)const
- {
- if((pdata.get() == 0) || (that.pdata.get() == 0))
- return pdata.get() == that.pdata.get();
- return pdata->compare(*(that.pdata.get()));
- }
- bool operator!=(const regex_token_iterator& that)const
- { return !(*this == that); }
- const value_type& operator*()const
- { return pdata->get(); }
- const value_type* operator->()const
- { return &(pdata->get()); }
- regex_token_iterator& operator++()
- {
- cow();
- if(0 == pdata->next())
- {
- pdata.reset();
- }
- return *this;
- }
- regex_token_iterator operator++(int)
- {
- regex_token_iterator result(*this);
- ++(*this);
- return result;
- }
-private:
-
- pimpl pdata;
-
- void cow()
- {
- // copy-on-write
- if(pdata.get() && !pdata.unique())
- {
- pdata.reset(new impl(*(pdata.get())));
- }
- }
-};
-
-typedef regex_token_iterator<const char*> cregex_token_iterator;
-typedef regex_token_iterator<std::string::const_iterator> sregex_token_iterator;
-#ifndef BOOST_NO_WREGEX
-typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
-typedef regex_token_iterator<std::wstring::const_iterator> wsregex_token_iterator;
-#endif
-
-template <class charT, class traits>
-inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
-}
-template <class charT, class traits, class ST, class SA>
-inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
-}
-template <class charT, class traits, std::size_t N>
-inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
-}
-template <class charT, class traits, class ST, class SA, std::size_t N>
-inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
-}
-template <class charT, class traits>
-inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
-}
-template <class charT, class traits, class ST, class SA>
-inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
-}
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_traits_defaults.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/regex_traits_defaults.hpp
deleted file mode 100644
index df9922dfd4c..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_traits_defaults.hpp
+++ /dev/null
@@ -1,380 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_traits_defaults.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares API's for access to regex_traits default properties.
- */
-
-#ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED
-#define BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#include <boost/regex/config.hpp>
-
-#ifndef BOOST_REGEX_SYNTAX_TYPE_HPP
-#include <boost/regex/v4/syntax_type.hpp>
-#endif
-#ifndef BOOST_REGEX_ERROR_TYPE_HPP
-#include <boost/regex/v4/error_type.hpp>
-#endif
-#include <boost/type_traits/make_unsigned.hpp>
-
-#ifdef BOOST_NO_STDC_NAMESPACE
-namespace std{
- using ::strlen;
-}
-#endif
-
-namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
-
-
-//
-// helpers to suppress warnings:
-//
-template <class charT>
-inline bool is_extended(charT c)
-{
- typedef typename make_unsigned<charT>::type unsigned_type;
- return (sizeof(charT) > 1) && (static_cast<unsigned_type>(c) >= 256u);
-}
-inline bool is_extended(char)
-{ return false; }
-
-
-BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants::syntax_type n);
-BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n);
-BOOST_REGEX_DECL regex_constants::syntax_type BOOST_REGEX_CALL get_default_syntax_type(char c);
-BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_default_escape_syntax_type(char c);
-
-// is charT c a combining character?
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining_implementation(uint_least16_t s);
-
-template <class charT>
-inline bool is_combining(charT c)
-{
- return (c <= static_cast<charT>(0)) ? false : ((c >= static_cast<charT>((std::numeric_limits<uint_least16_t>::max)())) ? false : is_combining_implementation(static_cast<unsigned short>(c)));
-}
-template <>
-inline bool is_combining<char>(char)
-{
- return false;
-}
-template <>
-inline bool is_combining<signed char>(signed char)
-{
- return false;
-}
-template <>
-inline bool is_combining<unsigned char>(unsigned char)
-{
- return false;
-}
-#if !defined(__hpux) && !defined(__WINSCW__) // can't use WCHAR_MAX/MIN in pp-directives
-#ifdef _MSC_VER
-template<>
-inline bool is_combining<wchar_t>(wchar_t c)
-{
- return is_combining_implementation(static_cast<unsigned short>(c));
-}
-#elif !defined(__DECCXX) && !defined(__osf__) && !defined(__OSF__) && defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
-#if defined(WCHAR_MAX) && (WCHAR_MAX <= USHRT_MAX)
-template<>
-inline bool is_combining<wchar_t>(wchar_t c)
-{
- return is_combining_implementation(static_cast<unsigned short>(c));
-}
-#else
-template<>
-inline bool is_combining<wchar_t>(wchar_t c)
-{
- return (c >= (std::numeric_limits<uint_least16_t>::max)()) ? false : is_combining_implementation(static_cast<unsigned short>(c));
-}
-#endif
-#endif
-#endif
-
-//
-// is a charT c a line separator?
-//
-template <class charT>
-inline bool is_separator(charT c)
-{
- return BOOST_REGEX_MAKE_BOOL(
- (c == static_cast<charT>('\n'))
- || (c == static_cast<charT>('\r'))
- || (c == static_cast<charT>('\f'))
- || (static_cast<boost::uint16_t>(c) == 0x2028u)
- || (static_cast<boost::uint16_t>(c) == 0x2029u)
- || (static_cast<boost::uint16_t>(c) == 0x85u));
-}
-template <>
-inline bool is_separator<char>(char c)
-{
- return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r') || (c == '\f'));
-}
-
-//
-// get a default collating element:
-//
-BOOST_REGEX_DECL std::string BOOST_REGEX_CALL lookup_default_collate_name(const std::string& name);
-
-//
-// get the state_id of a character clasification, the individual
-// traits classes then transform that state_id into a bitmask:
-//
-template <class charT>
-struct character_pointer_range
-{
- const charT* p1;
- const charT* p2;
-
- bool operator < (const character_pointer_range& r)const
- {
- return std::lexicographical_compare(p1, p2, r.p1, r.p2);
- }
- bool operator == (const character_pointer_range& r)const
- {
- // Not only do we check that the ranges are of equal size before
- // calling std::equal, but there is no other algorithm available:
- // not even a non-standard MS one. So forward to unchecked_equal
- // in the MS case.
- return ((p2 - p1) == (r.p2 - r.p1)) && BOOST_REGEX_DETAIL_NS::equal(p1, p2, r.p1);
- }
-};
-template <class charT>
-int get_default_class_id(const charT* p1, const charT* p2)
-{
- static const charT data[73] = {
- 'a', 'l', 'n', 'u', 'm',
- 'a', 'l', 'p', 'h', 'a',
- 'b', 'l', 'a', 'n', 'k',
- 'c', 'n', 't', 'r', 'l',
- 'd', 'i', 'g', 'i', 't',
- 'g', 'r', 'a', 'p', 'h',
- 'l', 'o', 'w', 'e', 'r',
- 'p', 'r', 'i', 'n', 't',
- 'p', 'u', 'n', 'c', 't',
- 's', 'p', 'a', 'c', 'e',
- 'u', 'n', 'i', 'c', 'o', 'd', 'e',
- 'u', 'p', 'p', 'e', 'r',
- 'v',
- 'w', 'o', 'r', 'd',
- 'x', 'd', 'i', 'g', 'i', 't',
- };
-
- static const character_pointer_range<charT> ranges[21] =
- {
- {data+0, data+5,}, // alnum
- {data+5, data+10,}, // alpha
- {data+10, data+15,}, // blank
- {data+15, data+20,}, // cntrl
- {data+20, data+21,}, // d
- {data+20, data+25,}, // digit
- {data+25, data+30,}, // graph
- {data+29, data+30,}, // h
- {data+30, data+31,}, // l
- {data+30, data+35,}, // lower
- {data+35, data+40,}, // print
- {data+40, data+45,}, // punct
- {data+45, data+46,}, // s
- {data+45, data+50,}, // space
- {data+57, data+58,}, // u
- {data+50, data+57,}, // unicode
- {data+57, data+62,}, // upper
- {data+62, data+63,}, // v
- {data+63, data+64,}, // w
- {data+63, data+67,}, // word
- {data+67, data+73,}, // xdigit
- };
- static const character_pointer_range<charT>* ranges_begin = ranges;
- static const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
-
- character_pointer_range<charT> t = { p1, p2, };
- const character_pointer_range<charT>* p = std::lower_bound(ranges_begin, ranges_end, t);
- if((p != ranges_end) && (t == *p))
- return static_cast<int>(p - ranges);
- return -1;
-}
-
-//
-// helper functions:
-//
-template <class charT>
-std::ptrdiff_t global_length(const charT* p)
-{
- std::ptrdiff_t n = 0;
- while(*p)
- {
- ++p;
- ++n;
- }
- return n;
-}
-template<>
-inline std::ptrdiff_t global_length<char>(const char* p)
-{
- return (std::strlen)(p);
-}
-#ifndef BOOST_NO_WREGEX
-template<>
-inline std::ptrdiff_t global_length<wchar_t>(const wchar_t* p)
-{
- return (std::wcslen)(p);
-}
-#endif
-template <class charT>
-inline charT BOOST_REGEX_CALL global_lower(charT c)
-{
- return c;
-}
-template <class charT>
-inline charT BOOST_REGEX_CALL global_upper(charT c)
-{
- return c;
-}
-
-BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_lower(char c);
-BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_upper(char c);
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_lower(wchar_t c);
-BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_upper(wchar_t c);
-#endif
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_lower(unsigned short c);
-BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_upper(unsigned short c);
-#endif
-//
-// This sucks: declare template specialisations of global_lower/global_upper
-// that just forward to the non-template implementation functions. We do
-// this because there is one compiler (Compaq Tru64 C++) that doesn't seem
-// to differentiate between templates and non-template overloads....
-// what's more, the primary template, plus all overloads have to be
-// defined in the same translation unit (if one is inline they all must be)
-// otherwise the "local template instantiation" compiler option can pick
-// the wrong instantiation when linking:
-//
-template<> inline char BOOST_REGEX_CALL global_lower<char>(char c){ return do_global_lower(c); }
-template<> inline char BOOST_REGEX_CALL global_upper<char>(char c){ return do_global_upper(c); }
-#ifndef BOOST_NO_WREGEX
-template<> inline wchar_t BOOST_REGEX_CALL global_lower<wchar_t>(wchar_t c){ return do_global_lower(c); }
-template<> inline wchar_t BOOST_REGEX_CALL global_upper<wchar_t>(wchar_t c){ return do_global_upper(c); }
-#endif
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-template<> inline unsigned short BOOST_REGEX_CALL global_lower<unsigned short>(unsigned short c){ return do_global_lower(c); }
-template<> inline unsigned short BOOST_REGEX_CALL global_upper<unsigned short>(unsigned short c){ return do_global_upper(c); }
-#endif
-
-template <class charT>
-int global_value(charT c)
-{
- static const charT zero = '0';
- static const charT nine = '9';
- static const charT a = 'a';
- static const charT f = 'f';
- static const charT A = 'A';
- static const charT F = 'F';
-
- if(c > f) return -1;
- if(c >= a) return 10 + (c - a);
- if(c > F) return -1;
- if(c >= A) return 10 + (c - A);
- if(c > nine) return -1;
- if(c >= zero) return c - zero;
- return -1;
-}
-template <class charT, class traits>
-boost::intmax_t global_toi(const charT*& p1, const charT* p2, int radix, const traits& t)
-{
- (void)t; // warning suppression
- boost::intmax_t limit = (std::numeric_limits<boost::intmax_t>::max)() / radix;
- boost::intmax_t next_value = t.value(*p1, radix);
- if((p1 == p2) || (next_value < 0) || (next_value >= radix))
- return -1;
- boost::intmax_t result = 0;
- while(p1 != p2)
- {
- next_value = t.value(*p1, radix);
- if((next_value < 0) || (next_value >= radix))
- break;
- result *= radix;
- result += next_value;
- ++p1;
- if (result > limit)
- return -1;
- }
- return result;
-}
-
-template <class charT>
-inline const charT* get_escape_R_string()
-{
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:4309 4245)
-#endif
- static const charT e1[] = { '(', '?', '>', '\\', 'x', '0', 'D', '\\', 'x', '0', 'A', '?',
- '|', '[', '\\', 'x', '0', 'A', '\\', 'x', '0', 'B', '\\', 'x', '0', 'C', static_cast<unsigned char>('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}',
- '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' };
- static const charT e2[] = { '(', '?', '>', '\\', 'x', '0', 'D', '\\', 'x', '0', 'A', '?',
- '|', '[', '\\', 'x', '0', 'A', '\\', 'x', '0', 'B', '\\', 'x', '0', 'C', static_cast<unsigned char>('\x85'), ']', ')', '\0' };
-
- charT c = static_cast<charT>(0x2029u);
- bool b = (static_cast<unsigned>(c) == 0x2029u);
-
- return (b ? e1 : e2);
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-}
-
-template <>
-inline const char* get_escape_R_string<char>()
-{
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:4309)
-#endif
- static const char e2[] = { '(', '?', '>', '\\', 'x', '0', 'D', '\\', 'x', '0', 'A', '?',
- '|', '[', '\\', 'x', '0', 'A', '\\', 'x', '0', 'B', '\\', 'x', '0', 'C', '\\', 'x', '8', '5', ']', ')', '\0' };
- return e2;
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-}
-
-} // BOOST_REGEX_DETAIL_NS
-} // boost
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_workaround.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/regex_workaround.hpp
deleted file mode 100644
index f245f90d4e5..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_workaround.hpp
+++ /dev/null
@@ -1,234 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2005
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE regex_workarounds.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares Misc workarounds.
- */
-
-#ifndef BOOST_REGEX_WORKAROUND_HPP
-#define BOOST_REGEX_WORKAROUND_HPP
-
-#include <boost/config.hpp>
-#include <new>
-#include <cstring>
-#include <cstdlib>
-#include <cstddef>
-#include <cassert>
-#include <cstdio>
-#include <climits>
-#include <string>
-#include <stdexcept>
-#include <iterator>
-#include <algorithm>
-#include <iosfwd>
-#include <vector>
-#include <set>
-#include <map>
-#include <boost/limits.hpp>
-#include <boost/assert.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/scoped_ptr.hpp>
-#include <boost/scoped_array.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/mpl/bool_fwd.hpp>
-#include <boost/regex/config.hpp>
-#ifndef BOOST_NO_STD_LOCALE
-# include <locale>
-#endif
-
-#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{
- using ::sprintf; using ::strcpy; using ::strcat; using ::strlen;
-}
-#endif
-
-namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
-#ifdef BOOST_NO_STD_DISTANCE
-template <class T>
-std::ptrdiff_t distance(const T& x, const T& y)
-{ return y - x; }
-#else
-using std::distance;
-#endif
-}}
-
-
-#ifdef BOOST_REGEX_NO_BOOL
-# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>((x) ? true : false)
-#else
-# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>(x)
-#endif
-
-/*****************************************************************************
- *
- * Fix broken namespace support:
- *
- ****************************************************************************/
-
-#if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
-
-namespace std{
- using ::ptrdiff_t;
- using ::size_t;
- using ::abs;
- using ::memset;
- using ::memcpy;
-}
-
-#endif
-
-/*****************************************************************************
- *
- * helper functions pointer_construct/pointer_destroy:
- *
- ****************************************************************************/
-
-#ifdef __cplusplus
-namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
-
-#ifdef BOOST_MSVC
-#pragma warning (push)
-#pragma warning (disable : 4100)
-#endif
-
-template <class T>
-inline void pointer_destroy(T* p)
-{ p->~T(); (void)p; }
-
-#ifdef BOOST_MSVC
-#pragma warning (pop)
-#endif
-
-template <class T>
-inline void pointer_construct(T* p, const T& t)
-{ new (p) T(t); }
-
-}} // namespaces
-#endif
-
-/*****************************************************************************
- *
- * helper function copy:
- *
- ****************************************************************************/
-
-#ifdef __cplusplus
-namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
-#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && BOOST_WORKAROUND(BOOST_MSVC, <1600) && defined(_CPPLIB_VER) && defined(BOOST_DINKUMWARE_STDLIB) && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
- //
- // MSVC 8 will either emit warnings or else refuse to compile
- // code that makes perfectly legitimate use of std::copy, when
- // the OutputIterator type is a user-defined class (apparently all user
- // defined iterators are "unsafe"). This code works around that:
- //
- template<class InputIterator, class OutputIterator>
- inline OutputIterator copy(
- InputIterator first,
- InputIterator last,
- OutputIterator dest
- )
- {
- return stdext::unchecked_copy(first, last, dest);
- }
- template<class InputIterator1, class InputIterator2>
- inline bool equal(
- InputIterator1 first,
- InputIterator1 last,
- InputIterator2 with
- )
- {
- return stdext::unchecked_equal(first, last, with);
- }
-#elif BOOST_WORKAROUND(BOOST_MSVC, > 1500)
- //
- // MSVC 10 will either emit warnings or else refuse to compile
- // code that makes perfectly legitimate use of std::copy, when
- // the OutputIterator type is a user-defined class (apparently all user
- // defined iterators are "unsafe"). What's more Microsoft have removed their
- // non-standard "unchecked" versions, even though their still in the MS
- // documentation!! Work around this as best we can:
- //
- template<class InputIterator, class OutputIterator>
- inline OutputIterator copy(
- InputIterator first,
- InputIterator last,
- OutputIterator dest
- )
- {
- while(first != last)
- *dest++ = *first++;
- return dest;
- }
- template<class InputIterator1, class InputIterator2>
- inline bool equal(
- InputIterator1 first,
- InputIterator1 last,
- InputIterator2 with
- )
- {
- while(first != last)
- if(*first++ != *with++) return false;
- return true;
- }
-#else
- using std::copy;
- using std::equal;
-#endif
-#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__
-
- // use safe versions of strcpy etc:
- using ::strcpy_s;
- using ::strcat_s;
-#else
- inline std::size_t strcpy_s(
- char *strDestination,
- std::size_t sizeInBytes,
- const char *strSource
- )
- {
- if(std::strlen(strSource)+1 > sizeInBytes)
- return 1;
- std::strcpy(strDestination, strSource);
- return 0;
- }
- inline std::size_t strcat_s(
- char *strDestination,
- std::size_t sizeInBytes,
- const char *strSource
- )
- {
- if(std::strlen(strSource) + std::strlen(strDestination) + 1 > sizeInBytes)
- return 1;
- std::strcat(strDestination, strSource);
- return 0;
- }
-
-#endif
-
- inline void overflow_error_if_not_zero(std::size_t i)
- {
- if(i)
- {
- std::overflow_error e("String buffer too small");
- boost::throw_exception(e);
- }
- }
-
-}} // namespaces
-
-#endif // __cplusplus
-
-#endif // include guard
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/u32regex_iterator.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/u32regex_iterator.hpp
deleted file mode 100644
index 701ef3d80ec..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/u32regex_iterator.hpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/*
- *
- * Copyright (c) 2003
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE u32regex_iterator.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Provides u32regex_iterator implementation.
- */
-
-#ifndef BOOST_REGEX_V4_U32REGEX_ITERATOR_HPP
-#define BOOST_REGEX_V4_U32REGEX_ITERATOR_HPP
-
-namespace boost{
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-
-template <class BidirectionalIterator>
-class u32regex_iterator_implementation
-{
- typedef u32regex regex_type;
-
- match_results<BidirectionalIterator> what; // current match
- BidirectionalIterator base; // start of sequence
- BidirectionalIterator end; // end of sequence
- const regex_type re; // the expression
- match_flag_type flags; // flags for matching
-
-public:
- u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f)
- : base(), end(last), re(*p), flags(f){}
- bool init(BidirectionalIterator first)
- {
- base = first;
- return u32regex_search(first, end, what, re, flags, base);
- }
- bool compare(const u32regex_iterator_implementation& that)
- {
- if(this == &that) return true;
- return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second);
- }
- const match_results<BidirectionalIterator>& get()
- { return what; }
- bool next()
- {
- //if(what.prefix().first != what[0].second)
- // flags |= match_prev_avail;
- BidirectionalIterator next_start = what[0].second;
- match_flag_type f(flags);
- if(!what.length())
- f |= regex_constants::match_not_initial_null;
- //if(base != next_start)
- // f |= regex_constants::match_not_bob;
- bool result = u32regex_search(next_start, end, what, re, f, base);
- if(result)
- what.set_base(base);
- return result;
- }
-private:
- u32regex_iterator_implementation& operator=(const u32regex_iterator_implementation&);
-};
-
-template <class BidirectionalIterator>
-class u32regex_iterator
-#ifndef BOOST_NO_STD_ITERATOR
- : public std::iterator<
- std::forward_iterator_tag,
- match_results<BidirectionalIterator>,
- typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type,
- const match_results<BidirectionalIterator>*,
- const match_results<BidirectionalIterator>& >
-#endif
-{
-private:
- typedef u32regex_iterator_implementation<BidirectionalIterator> impl;
- typedef shared_ptr<impl> pimpl;
-public:
- typedef u32regex regex_type;
- typedef match_results<BidirectionalIterator> value_type;
- typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type
- difference_type;
- typedef const value_type* pointer;
- typedef const value_type& reference;
- typedef std::forward_iterator_tag iterator_category;
-
- u32regex_iterator(){}
- u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
- const regex_type& re,
- match_flag_type m = match_default)
- : pdata(new impl(&re, b, m))
- {
- if(!pdata->init(a))
- {
- pdata.reset();
- }
- }
- u32regex_iterator(const u32regex_iterator& that)
- : pdata(that.pdata) {}
- u32regex_iterator& operator=(const u32regex_iterator& that)
- {
- pdata = that.pdata;
- return *this;
- }
- bool operator==(const u32regex_iterator& that)const
- {
- if((pdata.get() == 0) || (that.pdata.get() == 0))
- return pdata.get() == that.pdata.get();
- return pdata->compare(*(that.pdata.get()));
- }
- bool operator!=(const u32regex_iterator& that)const
- { return !(*this == that); }
- const value_type& operator*()const
- { return pdata->get(); }
- const value_type* operator->()const
- { return &(pdata->get()); }
- u32regex_iterator& operator++()
- {
- cow();
- if(0 == pdata->next())
- {
- pdata.reset();
- }
- return *this;
- }
- u32regex_iterator operator++(int)
- {
- u32regex_iterator result(*this);
- ++(*this);
- return result;
- }
-private:
-
- pimpl pdata;
-
- void cow()
- {
- // copy-on-write
- if(pdata.get() && !pdata.unique())
- {
- pdata.reset(new impl(*(pdata.get())));
- }
- }
-};
-
-typedef u32regex_iterator<const char*> utf8regex_iterator;
-typedef u32regex_iterator<const UChar*> utf16regex_iterator;
-typedef u32regex_iterator<const UChar32*> utf32regex_iterator;
-
-inline u32regex_iterator<const char*> make_u32regex_iterator(const char* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_iterator<const char*>(p, p+std::strlen(p), e, m);
-}
-#ifndef BOOST_NO_WREGEX
-inline u32regex_iterator<const wchar_t*> make_u32regex_iterator(const wchar_t* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_iterator<const wchar_t*>(p, p+std::wcslen(p), e, m);
-}
-#endif
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
-inline u32regex_iterator<const UChar*> make_u32regex_iterator(const UChar* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_iterator<const UChar*>(p, p+u_strlen(p), e, m);
-}
-#endif
-template <class charT, class Traits, class Alloc>
-inline u32regex_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
- return u32regex_iterator<iter_type>(p.begin(), p.end(), e, m);
-}
-inline u32regex_iterator<const UChar*> make_u32regex_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, m);
-}
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_V4_REGEX_ITERATOR_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/u32regex_token_iterator.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/u32regex_token_iterator.hpp
deleted file mode 100644
index 9eabbe48a1a..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/u32regex_token_iterator.hpp
+++ /dev/null
@@ -1,368 +0,0 @@
-/*
- *
- * Copyright (c) 2003
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE u32regex_token_iterator.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Provides u32regex_token_iterator implementation.
- */
-
-#ifndef BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP
-#define BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP
-
-#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
- || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
-//
-// Borland C++ Builder 6, and Visual C++ 6,
-// can't cope with the array template constructor
-// so we have a template member that will accept any type as
-// argument, and then assert that is really is an array:
-//
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_array.hpp>
-#endif
-
-namespace boost{
-
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable:4700)
-#endif
-
-template <class BidirectionalIterator>
-class u32regex_token_iterator_implementation
-{
- typedef u32regex regex_type;
- typedef sub_match<BidirectionalIterator> value_type;
-
- match_results<BidirectionalIterator> what; // current match
- BidirectionalIterator end; // end of search area
- BidirectionalIterator base; // start of search area
- const regex_type re; // the expression
- match_flag_type flags; // match flags
- value_type result; // the current string result
- int N; // the current sub-expression being enumerated
- std::vector<int> subs; // the sub-expressions to enumerate
-
-public:
- u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f)
- : end(last), re(*p), flags(f){ subs.push_back(sub); }
- u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
- : end(last), re(*p), flags(f), subs(v){}
-#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
- || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
- || BOOST_WORKAROUND(__HP_aCC, < 60700)
- template <class T>
- u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f)
- : end(last), re(*p), flags(f)
- {
- // assert that T really is an array:
- BOOST_STATIC_ASSERT(::boost::is_array<T>::value);
- const std::size_t array_size = sizeof(T) / sizeof(submatches[0]);
- for(std::size_t i = 0; i < array_size; ++i)
- {
- subs.push_back(submatches[i]);
- }
- }
-#else
- template <std::size_t CN>
- u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f)
- : end(last), re(*p), flags(f)
- {
- for(std::size_t i = 0; i < CN; ++i)
- {
- subs.push_back(submatches[i]);
- }
- }
-#endif
-
- bool init(BidirectionalIterator first)
- {
- base = first;
- N = 0;
- if(u32regex_search(first, end, what, re, flags, base) == true)
- {
- N = 0;
- result = ((subs[N] == -1) ? what.prefix() : what[(int)subs[N]]);
- return true;
- }
- else if((subs[N] == -1) && (first != end))
- {
- result.first = first;
- result.second = end;
- result.matched = (first != end);
- N = -1;
- return true;
- }
- return false;
- }
- bool compare(const u32regex_token_iterator_implementation& that)
- {
- if(this == &that) return true;
- return (&re.get_data() == &that.re.get_data())
- && (end == that.end)
- && (flags == that.flags)
- && (N == that.N)
- && (what[0].first == that.what[0].first)
- && (what[0].second == that.what[0].second);
- }
- const value_type& get()
- { return result; }
- bool next()
- {
- if(N == -1)
- return false;
- if(N+1 < (int)subs.size())
- {
- ++N;
- result =((subs[N] == -1) ? what.prefix() : what[subs[N]]);
- return true;
- }
- //if(what.prefix().first != what[0].second)
- // flags |= match_prev_avail | regex_constants::match_not_bob;
- BidirectionalIterator last_end(what[0].second);
- if(u32regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags), base))
- {
- N =0;
- result =((subs[N] == -1) ? what.prefix() : what[subs[N]]);
- return true;
- }
- else if((last_end != end) && (subs[0] == -1))
- {
- N =-1;
- result.first = last_end;
- result.second = end;
- result.matched = (last_end != end);
- return true;
- }
- return false;
- }
-private:
- u32regex_token_iterator_implementation& operator=(const u32regex_token_iterator_implementation&);
-};
-
-template <class BidirectionalIterator>
-class u32regex_token_iterator
-#ifndef BOOST_NO_STD_ITERATOR
- : public std::iterator<
- std::forward_iterator_tag,
- sub_match<BidirectionalIterator>,
- typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type,
- const sub_match<BidirectionalIterator>*,
- const sub_match<BidirectionalIterator>& >
-#endif
-{
-private:
- typedef u32regex_token_iterator_implementation<BidirectionalIterator> impl;
- typedef shared_ptr<impl> pimpl;
-public:
- typedef u32regex regex_type;
- typedef sub_match<BidirectionalIterator> value_type;
- typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type
- difference_type;
- typedef const value_type* pointer;
- typedef const value_type& reference;
- typedef std::forward_iterator_tag iterator_category;
-
- u32regex_token_iterator(){}
- u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
- int submatch = 0, match_flag_type m = match_default)
- : pdata(new impl(&re, b, submatch, m))
- {
- if(!pdata->init(a))
- pdata.reset();
- }
- u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
- const std::vector<int>& submatches, match_flag_type m = match_default)
- : pdata(new impl(&re, b, submatches, m))
- {
- if(!pdata->init(a))
- pdata.reset();
- }
-#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
- || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
- || BOOST_WORKAROUND(__HP_aCC, < 60700)
- template <class T>
- u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
- const T& submatches, match_flag_type m = match_default)
- : pdata(new impl(&re, b, submatches, m))
- {
- if(!pdata->init(a))
- pdata.reset();
- }
-#else
- template <std::size_t N>
- u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
- const int (&submatches)[N], match_flag_type m = match_default)
- : pdata(new impl(&re, b, submatches, m))
- {
- if(!pdata->init(a))
- pdata.reset();
- }
-#endif
- u32regex_token_iterator(const u32regex_token_iterator& that)
- : pdata(that.pdata) {}
- u32regex_token_iterator& operator=(const u32regex_token_iterator& that)
- {
- pdata = that.pdata;
- return *this;
- }
- bool operator==(const u32regex_token_iterator& that)const
- {
- if((pdata.get() == 0) || (that.pdata.get() == 0))
- return pdata.get() == that.pdata.get();
- return pdata->compare(*(that.pdata.get()));
- }
- bool operator!=(const u32regex_token_iterator& that)const
- { return !(*this == that); }
- const value_type& operator*()const
- { return pdata->get(); }
- const value_type* operator->()const
- { return &(pdata->get()); }
- u32regex_token_iterator& operator++()
- {
- cow();
- if(0 == pdata->next())
- {
- pdata.reset();
- }
- return *this;
- }
- u32regex_token_iterator operator++(int)
- {
- u32regex_token_iterator result(*this);
- ++(*this);
- return result;
- }
-private:
-
- pimpl pdata;
-
- void cow()
- {
- // copy-on-write
- if(pdata.get() && !pdata.unique())
- {
- pdata.reset(new impl(*(pdata.get())));
- }
- }
-};
-
-typedef u32regex_token_iterator<const char*> utf8regex_token_iterator;
-typedef u32regex_token_iterator<const UChar*> utf16regex_token_iterator;
-typedef u32regex_token_iterator<const UChar32*> utf32regex_token_iterator;
-
-// construction from an integral sub_match state_id:
-inline u32regex_token_iterator<const char*> make_u32regex_token_iterator(const char* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const char*>(p, p+std::strlen(p), e, submatch, m);
-}
-#ifndef BOOST_NO_WREGEX
-inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
-}
-#endif
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
-inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, submatch, m);
-}
-#endif
-template <class charT, class Traits, class Alloc>
-inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
- return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m);
-}
-inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
-}
-
-// construction from a reference to an array:
-template <std::size_t N>
-inline u32regex_token_iterator<const char*> make_u32regex_token_iterator(const char* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const char*>(p, p+std::strlen(p), e, submatch, m);
-}
-#ifndef BOOST_NO_WREGEX
-template <std::size_t N>
-inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
-}
-#endif
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
-template <std::size_t N>
-inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, submatch, m);
-}
-#endif
-template <class charT, class Traits, class Alloc, std::size_t N>
-inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
-{
- typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
- return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m);
-}
-template <std::size_t N>
-inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
-}
-
-// construction from a vector of sub_match state_id's:
-inline u32regex_token_iterator<const char*> make_u32regex_token_iterator(const char* p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const char*>(p, p+std::strlen(p), e, submatch, m);
-}
-#ifndef BOOST_NO_WREGEX
-inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
-}
-#endif
-#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
-inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, submatch, m);
-}
-#endif
-template <class charT, class Traits, class Alloc>
-inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
- return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m);
-}
-inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
-{
- return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
-}
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-
-} // namespace boost
-
-#endif // BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/w32_regex_traits.hpp b/src/third_party/boost-1.68.0/boost/regex/v4/w32_regex_traits.hpp
deleted file mode 100644
index bf996d61197..00000000000
--- a/src/third_party/boost-1.68.0/boost/regex/v4/w32_regex_traits.hpp
+++ /dev/null
@@ -1,743 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE w32_regex_traits.hpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Declares regular expression traits class w32_regex_traits.
- */
-
-#ifndef BOOST_W32_REGEX_TRAITS_HPP_INCLUDED
-#define BOOST_W32_REGEX_TRAITS_HPP_INCLUDED
-
-#ifndef BOOST_REGEX_NO_WIN32_LOCALE
-
-#ifndef BOOST_RE_PAT_EXCEPT_HPP
-#include <boost/regex/pattern_except.hpp>
-#endif
-#ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED
-#include <boost/regex/v4/regex_traits_defaults.hpp>
-#endif
-#ifdef BOOST_HAS_THREADS
-#include <boost/regex/pending/static_mutex.hpp>
-#endif
-#ifndef BOOST_REGEX_PRIMARY_TRANSFORM
-#include <boost/regex/v4/primary_transform.hpp>
-#endif
-#ifndef BOOST_REGEX_OBJECT_CACHE_HPP
-#include <boost/regex/pending/object_cache.hpp>
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_PREFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4786)
-#pragma warning(disable:4800)
-#endif
-
-namespace boost{
-
-//
-// forward declaration is needed by some compilers:
-//
-template <class charT>
-class w32_regex_traits;
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-//
-// start by typedeffing the types we'll need:
-//
-typedef ::boost::uint32_t lcid_type; // placeholder for LCID.
-typedef ::boost::shared_ptr<void> cat_type; // placeholder for dll HANDLE.
-
-//
-// then add wrappers around the actual Win32 API's (ie implementation hiding):
-//
-BOOST_REGEX_DECL lcid_type BOOST_REGEX_CALL w32_get_default_locale();
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(char, lcid_type);
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t, lcid_type);
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(unsigned short ca, lcid_type state_id);
-#endif
-#endif
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(char, lcid_type);
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(wchar_t, lcid_type);
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(unsigned short ca, lcid_type state_id);
-#endif
-#endif
-BOOST_REGEX_DECL cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name);
-BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::string& def);
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::wstring& def);
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL std::basic_string<unsigned short> BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::basic_string<unsigned short>& def);
-#endif
-#endif
-BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_transform(lcid_type state_id, const char* p1, const char* p2);
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_transform(lcid_type state_id, const wchar_t* p1, const wchar_t* p2);
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL std::basic_string<unsigned short> BOOST_REGEX_CALL w32_transform(lcid_type state_id, const unsigned short* p1, const unsigned short* p2);
-#endif
-#endif
-BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_tolower(char c, lcid_type);
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_tolower(wchar_t c, lcid_type);
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL w32_tolower(unsigned short c, lcid_type state_id);
-#endif
-#endif
-BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_toupper(char c, lcid_type);
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_toupper(wchar_t c, lcid_type);
-#endif
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, char c);
-#ifndef BOOST_NO_WREGEX
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, wchar_t c);
-#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
-BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type state_id, boost::uint32_t m, unsigned short c);
-#endif
-#endif
-//
-// class w32_regex_traits_base:
-// acts as a container for locale and the facets we are using.
-//
-template <class charT>
-struct w32_regex_traits_base
-{
- w32_regex_traits_base(lcid_type l)
- { imbue(l); }
- lcid_type imbue(lcid_type l);
-
- lcid_type m_locale;
-};
-
-template <class charT>
-inline lcid_type w32_regex_traits_base<charT>::imbue(lcid_type l)
-{
- lcid_type result(m_locale);
- m_locale = l;
- return result;
-}
-
-//
-// class w32_regex_traits_char_layer:
-// implements methods that require specialisation for narrow characters:
-//
-template <class charT>
-class w32_regex_traits_char_layer : public w32_regex_traits_base<charT>
-{
- typedef std::basic_string<charT> string_type;
- typedef std::map<charT, regex_constants::syntax_type> map_type;
- typedef typename map_type::const_iterator map_iterator_type;
-public:
- w32_regex_traits_char_layer(const lcid_type l);
-
- regex_constants::syntax_type syntax_type(charT c)const
- {
- map_iterator_type i = m_char_map.find(c);
- return ((i == m_char_map.end()) ? 0 : i->second);
- }
- regex_constants::escape_syntax_type escape_syntax_type(charT c) const
- {
- map_iterator_type i = m_char_map.find(c);
- if(i == m_char_map.end())
- {
- if(::boost::BOOST_REGEX_DETAIL_NS::w32_is_lower(c, this->m_locale)) return regex_constants::escape_type_class;
- if(::boost::BOOST_REGEX_DETAIL_NS::w32_is_upper(c, this->m_locale)) return regex_constants::escape_type_not_class;
- return 0;
- }
- return i->second;
- }
- charT tolower(charT c)const
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::w32_tolower(c, this->m_locale);
- }
- bool isctype(boost::uint32_t mask, charT c)const
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::w32_is(this->m_locale, mask, c);
- }
-
-private:
- string_type get_default_message(regex_constants::syntax_type);
- // TODO: use a hash table when available!
- map_type m_char_map;
-};
-
-template <class charT>
-w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l)
- : w32_regex_traits_base<charT>(l)
-{
- // we need to start by initialising our syntax map so we know which
- // character is used for which purpose:
- cat_type cat;
- std::string cat_name(w32_regex_traits<charT>::get_catalog_name());
- if(cat_name.size())
- {
- cat = ::boost::BOOST_REGEX_DETAIL_NS::w32_cat_open(cat_name);
- if(!cat)
- {
- std::string m("Unable to open message catalog: ");
- std::runtime_error err(m + cat_name);
- boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
- }
- }
- //
- // if we have a valid catalog then load our messages:
- //
- if(cat)
- {
- for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i)
- {
- string_type mss = ::boost::BOOST_REGEX_DETAIL_NS::w32_cat_get(cat, this->m_locale, i, get_default_message(i));
- for(typename string_type::size_type j = 0; j < mss.size(); ++j)
- {
- this->m_char_map[mss[j]] = i;
- }
- }
- }
- else
- {
- for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i)
- {
- const char* ptr = get_default_syntax(i);
- while(ptr && *ptr)
- {
- this->m_char_map[static_cast<charT>(*ptr)] = i;
- ++ptr;
- }
- }
- }
-}
-
-template <class charT>
-typename w32_regex_traits_char_layer<charT>::string_type
- w32_regex_traits_char_layer<charT>::get_default_message(regex_constants::syntax_type i)
-{
- const char* ptr = get_default_syntax(i);
- string_type result;
- while(ptr && *ptr)
- {
- result.append(1, static_cast<charT>(*ptr));
- ++ptr;
- }
- return result;
-}
-
-//
-// specialised version for narrow characters:
-//
-template <>
-class BOOST_REGEX_DECL w32_regex_traits_char_layer<char> : public w32_regex_traits_base<char>
-{
- typedef std::string string_type;
-public:
- w32_regex_traits_char_layer(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l)
- : w32_regex_traits_base<char>(l)
- {
- init();
- }
-
- regex_constants::syntax_type syntax_type(char c)const
- {
- return m_char_map[static_cast<unsigned char>(c)];
- }
- regex_constants::escape_syntax_type escape_syntax_type(char c) const
- {
- return m_char_map[static_cast<unsigned char>(c)];
- }
- char tolower(char c)const
- {
- return m_lower_map[static_cast<unsigned char>(c)];
- }
- bool isctype(boost::uint32_t mask, char c)const
- {
- return m_type_map[static_cast<unsigned char>(c)] & mask;
- }
-
-private:
- regex_constants::syntax_type m_char_map[1u << CHAR_BIT];
- char m_lower_map[1u << CHAR_BIT];
- boost::uint16_t m_type_map[1u << CHAR_BIT];
- void init();
-};
-
-//
-// class w32_regex_traits_implementation:
-// provides pimpl implementation for w32_regex_traits.
-//
-template <class charT>
-class w32_regex_traits_implementation : public w32_regex_traits_char_layer<charT>
-{
-public:
- typedef typename w32_regex_traits<charT>::char_class_type char_class_type;
- BOOST_STATIC_CONSTANT(char_class_type, mask_word = 0x0400); // must be C1_DEFINED << 1
- BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 0x0800); // must be C1_DEFINED << 2
- BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 0x1000); // must be C1_DEFINED << 3
- BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 0x2000); // must be C1_DEFINED << 4
- BOOST_STATIC_CONSTANT(char_class_type, mask_base = 0x3ff); // all the masks used by the CT_CTYPE1 group
-
- typedef std::basic_string<charT> string_type;
- typedef charT char_type;
- w32_regex_traits_implementation(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l);
- std::string error_string(regex_constants::error_type n) const
- {
- if(!m_error_strings.empty())
- {
- std::map<int, std::string>::const_iterator p = m_error_strings.find(n);
- return (p == m_error_strings.end()) ? std::string(get_default_error_string(n)) : p->second;
- }
- return get_default_error_string(n);
- }
- char_class_type lookup_classname(const charT* p1, const charT* p2) const
- {
- char_class_type result = lookup_classname_imp(p1, p2);
- if(result == 0)
- {
- typedef typename string_type::size_type size_type;
- string_type temp(p1, p2);
- for(size_type i = 0; i < temp.size(); ++i)
- temp[i] = this->tolower(temp[i]);
- result = lookup_classname_imp(&*temp.begin(), &*temp.begin() + temp.size());
- }
- return result;
- }
- string_type lookup_collatename(const charT* p1, const charT* p2) const;
- string_type transform_primary(const charT* p1, const charT* p2) const;
- string_type transform(const charT* p1, const charT* p2) const
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::w32_transform(this->m_locale, p1, p2);
- }
-private:
- std::map<int, std::string> m_error_strings; // error messages indexed by numberic ID
- std::map<string_type, char_class_type> m_custom_class_names; // character class names
- std::map<string_type, string_type> m_custom_collate_names; // collating element names
- unsigned m_collate_type; // the form of the collation string
- charT m_collate_delim; // the collation group delimiter
- //
- // helpers:
- //
- char_class_type lookup_classname_imp(const charT* p1, const charT* p2) const;
-};
-
-template <class charT>
-typename w32_regex_traits_implementation<charT>::string_type
- w32_regex_traits_implementation<charT>::transform_primary(const charT* p1, const charT* p2) const
-{
- string_type result;
- //
- // What we do here depends upon the format of the sort key returned by
- // sort key returned by this->transform:
- //
- switch(m_collate_type)
- {
- case sort_C:
- case sort_unknown:
- // the best we can do is translate to lower case, then get a regular sort key:
- {
- result.assign(p1, p2);
- typedef typename string_type::size_type size_type;
- for(size_type i = 0; i < result.size(); ++i)
- result[i] = this->tolower(result[i]);
- result = this->transform(&*result.begin(), &*result.begin() + result.size());
- break;
- }
- case sort_fixed:
- {
- // get a regular sort key, and then truncate it:
- result.assign(this->transform(p1, p2));
- result.erase(this->m_collate_delim);
- break;
- }
- case sort_delim:
- // get a regular sort key, and then truncate everything after the delim:
- result.assign(this->transform(p1, p2));
- std::size_t i;
- for(i = 0; i < result.size(); ++i)
- {
- if(result[i] == m_collate_delim)
- break;
- }
- result.erase(i);
- break;
- }
- if(result.empty())
- result = string_type(1, charT(0));
- return result;
-}
-
-template <class charT>
-typename w32_regex_traits_implementation<charT>::string_type
- w32_regex_traits_implementation<charT>::lookup_collatename(const charT* p1, const charT* p2) const
-{
- typedef typename std::map<string_type, string_type>::const_iterator iter_type;
- if(m_custom_collate_names.size())
- {
- iter_type pos = m_custom_collate_names.find(string_type(p1, p2));
- if(pos != m_custom_collate_names.end())
- return pos->second;
- }
-#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
- && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
- std::string name(p1, p2);
-#else
- std::string name;
- const charT* p0 = p1;
- while(p0 != p2)
- name.append(1, char(*p0++));
-#endif
- name = lookup_default_collate_name(name);
-#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
- && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
- if(name.size())
- return string_type(name.begin(), name.end());
-#else
- if(name.size())
- {
- string_type result;
- typedef std::string::const_iterator iter;
- iter b = name.begin();
- iter e = name.end();
- while(b != e)
- result.append(1, charT(*b++));
- return result;
- }
-#endif
- if(p2 - p1 == 1)
- return string_type(1, *p1);
- return string_type();
-}
-
-template <class charT>
-w32_regex_traits_implementation<charT>::w32_regex_traits_implementation(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l)
-: w32_regex_traits_char_layer<charT>(l)
-{
- cat_type cat;
- std::string cat_name(w32_regex_traits<charT>::get_catalog_name());
- if(cat_name.size())
- {
- cat = ::boost::BOOST_REGEX_DETAIL_NS::w32_cat_open(cat_name);
- if(!cat)
- {
- std::string m("Unable to open message catalog: ");
- std::runtime_error err(m + cat_name);
- boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
- }
- }
- //
- // if we have a valid catalog then load our messages:
- //
- if(cat)
- {
- //
- // Error messages:
- //
- for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0);
- i <= boost::regex_constants::error_unknown;
- i = static_cast<boost::regex_constants::error_type>(i + 1))
- {
- const char* p = get_default_error_string(i);
- string_type default_message;
- while(*p)
- {
- default_message.append(1, static_cast<charT>(*p));
- ++p;
- }
- string_type s = ::boost::BOOST_REGEX_DETAIL_NS::w32_cat_get(cat, this->m_locale, i+200, default_message);
- std::string result;
- for(std::string::size_type j = 0; j < s.size(); ++j)
- {
- result.append(1, static_cast<char>(s[j]));
- }
- m_error_strings[i] = result;
- }
- //
- // Custom class names:
- //
- static const char_class_type masks[14] =
- {
- 0x0104u, // C1_ALPHA | C1_DIGIT
- 0x0100u, // C1_ALPHA
- 0x0020u, // C1_CNTRL
- 0x0004u, // C1_DIGIT
- (~(0x0020u|0x0008u) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE
- 0x0002u, // C1_LOWER
- (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL
- 0x0010u, // C1_PUNCT
- 0x0008u, // C1_SPACE
- 0x0001u, // C1_UPPER
- 0x0080u, // C1_XDIGIT
- 0x0040u, // C1_BLANK
- w32_regex_traits_implementation<charT>::mask_word,
- w32_regex_traits_implementation<charT>::mask_unicode,
- };
- static const string_type null_string;
- for(unsigned int j = 0; j <= 13; ++j)
- {
- string_type s(::boost::BOOST_REGEX_DETAIL_NS::w32_cat_get(cat, this->m_locale, j+300, null_string));
- if(s.size())
- this->m_custom_class_names[s] = masks[j];
- }
- }
- //
- // get the collation format used by m_pcollate:
- //
- m_collate_type = BOOST_REGEX_DETAIL_NS::find_sort_syntax(this, &m_collate_delim);
-}
-
-template <class charT>
-typename w32_regex_traits_implementation<charT>::char_class_type
- w32_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const
-{
- static const char_class_type masks[22] =
- {
- 0,
- 0x0104u, // C1_ALPHA | C1_DIGIT
- 0x0100u, // C1_ALPHA
- 0x0040u, // C1_BLANK
- 0x0020u, // C1_CNTRL
- 0x0004u, // C1_DIGIT
- 0x0004u, // C1_DIGIT
- (~(0x0020u|0x0008u|0x0040) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE or C1_BLANK
- w32_regex_traits_implementation<charT>::mask_horizontal,
- 0x0002u, // C1_LOWER
- 0x0002u, // C1_LOWER
- (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL
- 0x0010u, // C1_PUNCT
- 0x0008u, // C1_SPACE
- 0x0008u, // C1_SPACE
- 0x0001u, // C1_UPPER
- w32_regex_traits_implementation<charT>::mask_unicode,
- 0x0001u, // C1_UPPER
- w32_regex_traits_implementation<charT>::mask_vertical,
- 0x0104u | w32_regex_traits_implementation<charT>::mask_word,
- 0x0104u | w32_regex_traits_implementation<charT>::mask_word,
- 0x0080u, // C1_XDIGIT
- };
- if(m_custom_class_names.size())
- {
- typedef typename std::map<std::basic_string<charT>, char_class_type>::const_iterator map_iter;
- map_iter pos = m_custom_class_names.find(string_type(p1, p2));
- if(pos != m_custom_class_names.end())
- return pos->second;
- }
- std::size_t state_id = 1 + BOOST_REGEX_DETAIL_NS::get_default_class_id(p1, p2);
- if(state_id < sizeof(masks) / sizeof(masks[0]))
- return masks[state_id];
- return masks[0];
-}
-
-
-template <class charT>
-boost::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l)
-{
- // TODO: create a cache for previously constructed objects.
- return boost::object_cache< ::boost::BOOST_REGEX_DETAIL_NS::lcid_type, w32_regex_traits_implementation<charT> >::get(l, 5);
-}
-
-} // BOOST_REGEX_DETAIL_NS
-
-template <class charT>
-class w32_regex_traits
-{
-public:
- typedef charT char_type;
- typedef std::size_t size_type;
- typedef std::basic_string<char_type> string_type;
- typedef ::boost::BOOST_REGEX_DETAIL_NS::lcid_type locale_type;
- typedef boost::uint_least32_t char_class_type;
-
- struct boost_extensions_tag{};
-
- w32_regex_traits()
- : m_pimpl(BOOST_REGEX_DETAIL_NS::create_w32_regex_traits<charT>(::boost::BOOST_REGEX_DETAIL_NS::w32_get_default_locale()))
- { }
- static size_type length(const char_type* p)
- {
- return std::char_traits<charT>::length(p);
- }
- regex_constants::syntax_type syntax_type(charT c)const
- {
- return m_pimpl->syntax_type(c);
- }
- regex_constants::escape_syntax_type escape_syntax_type(charT c) const
- {
- return m_pimpl->escape_syntax_type(c);
- }
- charT translate(charT c) const
- {
- return c;
- }
- charT translate_nocase(charT c) const
- {
- return this->m_pimpl->tolower(c);
- }
- charT translate(charT c, bool icase) const
- {
- return icase ? this->m_pimpl->tolower(c) : c;
- }
- charT tolower(charT c) const
- {
- return this->m_pimpl->tolower(c);
- }
- charT toupper(charT c) const
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::w32_toupper(c, this->m_pimpl->m_locale);
- }
- string_type transform(const charT* p1, const charT* p2) const
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::w32_transform(this->m_pimpl->m_locale, p1, p2);
- }
- string_type transform_primary(const charT* p1, const charT* p2) const
- {
- return m_pimpl->transform_primary(p1, p2);
- }
- char_class_type lookup_classname(const charT* p1, const charT* p2) const
- {
- return m_pimpl->lookup_classname(p1, p2);
- }
- string_type lookup_collatename(const charT* p1, const charT* p2) const
- {
- return m_pimpl->lookup_collatename(p1, p2);
- }
- bool isctype(charT c, char_class_type f) const
- {
- if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_base)
- && (this->m_pimpl->isctype(f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_base, c)))
- return true;
- else if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_unicode) && BOOST_REGEX_DETAIL_NS::is_extended(c))
- return true;
- else if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_word) && (c == '_'))
- return true;
- else if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_vertical)
- && (::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) || (c == '\v')))
- return true;
- else if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_horizontal)
- && this->isctype(c, 0x0008u) && !this->isctype(c, BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_vertical))
- return true;
- return false;
- }
- boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const
- {
- return ::boost::BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
- }
- int value(charT c, int radix)const
- {
- int result = (int)::boost::BOOST_REGEX_DETAIL_NS::global_value(c);
- return result < radix ? result : -1;
- }
- locale_type imbue(locale_type l)
- {
- ::boost::BOOST_REGEX_DETAIL_NS::lcid_type result(getloc());
- m_pimpl = BOOST_REGEX_DETAIL_NS::create_w32_regex_traits<charT>(l);
- return result;
- }
- locale_type getloc()const
- {
- return m_pimpl->m_locale;
- }
- std::string error_string(regex_constants::error_type n) const
- {
- return m_pimpl->error_string(n);
- }
-
- //
- // extension:
- // set the name of the message catalog in use (defaults to "boost_regex").
- //
- static std::string catalog_name(const std::string& name);
- static std::string get_catalog_name();
-
-private:
- boost::shared_ptr<const BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT> > m_pimpl;
- //
- // catalog name handler:
- //
- static std::string& get_catalog_name_inst();
-
-#ifdef BOOST_HAS_THREADS
- static static_mutex& get_mutex_inst();
-#endif
-};
-
-template <class charT>
-std::string w32_regex_traits<charT>::catalog_name(const std::string& name)
-{
-#ifdef BOOST_HAS_THREADS
- static_mutex::scoped_lock lk(get_mutex_inst());
-#endif
- std::string result(get_catalog_name_inst());
- get_catalog_name_inst() = name;
- return result;
-}
-
-template <class charT>
-std::string& w32_regex_traits<charT>::get_catalog_name_inst()
-{
- static std::string s_name;
- return s_name;
-}
-
-template <class charT>
-std::string w32_regex_traits<charT>::get_catalog_name()
-{
-#ifdef BOOST_HAS_THREADS
- static_mutex::scoped_lock lk(get_mutex_inst());
-#endif
- std::string result(get_catalog_name_inst());
- return result;
-}
-
-#ifdef BOOST_HAS_THREADS
-template <class charT>
-static_mutex& w32_regex_traits<charT>::get_mutex_inst()
-{
- static static_mutex s_mutex = BOOST_STATIC_MUTEX_INIT;
- return s_mutex;
-}
-#endif
-
-
-} // boost
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable: 4103)
-#endif
-#ifdef BOOST_HAS_ABI_HEADERS
-# include BOOST_ABI_SUFFIX
-#endif
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_REGEX_NO_WIN32_LOCALE
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/serialization/singleton.hpp b/src/third_party/boost-1.68.0/boost/serialization/singleton.hpp
deleted file mode 100644
index 3437f3883b5..00000000000
--- a/src/third_party/boost-1.68.0/boost/serialization/singleton.hpp
+++ /dev/null
@@ -1,173 +0,0 @@
-#ifndef BOOST_SERIALIZATION_SINGLETON_HPP
-#define BOOST_SERIALIZATION_SINGLETON_HPP
-
-/////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8
-// singleton.hpp
-//
-// Copyright David Abrahams 2006. Original version
-//
-// Copyright Robert Ramey 2007. Changes made to permit
-// application throughout the serialization library.
-//
-// Distributed under the Boost
-// Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// The intention here is to define a template which will convert
-// any class into a singleton with the following features:
-//
-// a) initialized before first use.
-// b) thread-safe for const access to the class
-// c) non-locking
-//
-// In order to do this,
-// a) Initialize dynamically when used.
-// b) Require that all singletons be initialized before main
-// is called or any entry point into the shared library is invoked.
-// This guarentees no race condition for initialization.
-// In debug mode, we assert that no non-const functions are called
-// after main is invoked.
-//
-
-// MS compatible compilers support #pragma once
-#if defined(_MSC_VER)
-# pragma once
-#endif
-
-#include <boost/assert.hpp>
-#include <boost/config.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/serialization/force_include.hpp>
-
-#include <boost/archive/detail/auto_link_archive.hpp>
-#include <boost/serialization/config.hpp>
-#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-namespace boost {
-namespace serialization {
-
-//////////////////////////////////////////////////////////////////////
-// Provides a dynamically-initialized (singleton) instance of T in a
-// way that avoids LNK1179 on vc6. See http://tinyurl.com/ljdp8 or
-// http://lists.boost.org/Archives/boost/2006/05/105286.php for
-// details.
-//
-
-// singletons created by this code are guarenteed to be unique
-// within the executable or shared library which creates them.
-// This is sufficient and in fact ideal for the serialization library.
-// The singleton is created when the module is loaded and destroyed
-// when the module is unloaded.
-
-// This base class has two functions.
-
-// First it provides a module handle for each singleton indicating
-// the executable or shared library in which it was created. This
-// turns out to be necessary and sufficient to implement the tables
-// used by serialization library.
-
-// Second, it provides a mechanism to detect when a non-const function
-// is called after initialization.
-
-// make a singleton to lock/unlock all singletons for alteration.
-// The intent is that all singletons created/used by this code
-// are to be initialized before main is called. A test program
-// can lock all the singletons when main is entereed. This any
-// attempt to retieve a mutable instances while locked will
-// generate a assertion if compiled for debug.
-
-// note usage of BOOST_DLLEXPORT. These functions are in danger of
-// being eliminated by the optimizer when building an application in
-// release mode. Usage of the macro is meant to signal the compiler/linker
-// to avoid dropping these functions which seem to be unreferenced.
-// This usage is not related to autolinking.
-
-class BOOST_SYMBOL_VISIBLE singleton_module :
- public boost::noncopyable
-{
-private:
- BOOST_DLLEXPORT static bool & get_lock() BOOST_USED {
- static bool lock = false;
- return lock;
- }
-
-public:
- BOOST_DLLEXPORT static void lock(){
- get_lock() = true;
- }
- BOOST_DLLEXPORT static void unlock(){
- get_lock() = false;
- }
- BOOST_DLLEXPORT static bool is_locked(){
- return get_lock();
- }
-};
-
-template <class T>
-class singleton : public singleton_module
-{
-private:
- static T & m_instance;
- // include this to provoke instantiation at pre-execution time
- static void use(T const *) {}
- static T & get_instance() {
- // use a wrapper so that types T with protected constructors
- // can be used
- class singleton_wrapper : public T {};
- static singleton_wrapper t;
-
- // refer to instance, causing it to be instantiated (and
- // initialized at startup on working compilers)
- BOOST_ASSERT(! is_destroyed());
-
- // note that the following is absolutely essential.
- // commenting out this statement will cause compilers to fail to
- // construct the instance at pre-execution time. This would prevent
- // our usage/implementation of "locking" and introduce uncertainty into
- // the sequence of object initializaition.
- use(& m_instance);
-
- return static_cast<T &>(t);
- }
- static bool & get_is_destroyed(){
- static bool is_destroyed;
- return is_destroyed;
- }
-
-public:
- BOOST_DLLEXPORT static T & get_mutable_instance(){
- BOOST_ASSERT(! is_locked());
- return get_instance();
- }
- BOOST_DLLEXPORT static const T & get_const_instance(){
- return get_instance();
- }
- BOOST_DLLEXPORT static bool is_destroyed(){
- return get_is_destroyed();
- }
- BOOST_DLLEXPORT singleton(){
- get_is_destroyed() = false;
- }
- BOOST_DLLEXPORT ~singleton() {
- get_is_destroyed() = true;
- }
-};
-
-template<class T>
-T & singleton< T >::m_instance = singleton< T >::get_instance();
-
-} // namespace serialization
-} // namespace boost
-
-#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif // BOOST_SERIALIZATION_SINGLETON_HPP
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/allocate_local_shared_array.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/allocate_local_shared_array.hpp
deleted file mode 100644
index f46f11049bd..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/allocate_local_shared_array.hpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
-Copyright 2017 Glen Joseph Fernandes
-(glenjofe@gmail.com)
-
-Distributed under the Boost Software License, Version 1.0.
-(http://www.boost.org/LICENSE_1_0.txt)
-*/
-#ifndef BOOST_SMART_PTR_ALLOCATE_LOCAL_SHARED_ARRAY_HPP
-#define BOOST_SMART_PTR_ALLOCATE_LOCAL_SHARED_ARRAY_HPP
-
-#include <boost/smart_ptr/allocate_shared_array.hpp>
-#include <boost/smart_ptr/local_shared_ptr.hpp>
-
-namespace boost {
-namespace detail {
-
-template<class>
-struct lsp_if_array { };
-
-template<class T>
-struct lsp_if_array<T[]> {
- typedef boost::local_shared_ptr<T[]> type;
-};
-
-template<class>
-struct lsp_if_size_array { };
-
-template<class T, std::size_t N>
-struct lsp_if_size_array<T[N]> {
- typedef boost::local_shared_ptr<T[N]> type;
-};
-
-class lsp_array_base
- : public local_counted_base {
-public:
- void set(sp_counted_base* base) BOOST_SP_NOEXCEPT {
- count_ = shared_count(base);
- }
-
- virtual void local_cb_destroy() BOOST_SP_NOEXCEPT {
- shared_count().swap(count_);
- }
-
- virtual shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT {
- return count_;
- }
-
-private:
- shared_count count_;
-};
-
-template<class A>
-class lsp_array_state
- : public sp_array_state<A> {
-public:
- template<class U>
- lsp_array_state(const U& other, std::size_t size) BOOST_SP_NOEXCEPT
- : sp_array_state<A>(other, size) { }
-
- lsp_array_base& base() BOOST_SP_NOEXCEPT {
- return base_;
- }
-
-private:
- lsp_array_base base_;
-};
-
-template<class A, std::size_t N>
-class lsp_size_array_state
- : public sp_size_array_state<A, N> {
-public:
- template<class U>
- lsp_size_array_state(const U& other, std::size_t size) BOOST_SP_NOEXCEPT
- : sp_size_array_state<A, N>(other, size) { }
-
- lsp_array_base& base() BOOST_SP_NOEXCEPT {
- return base_;
- }
-
-private:
- lsp_array_base base_;
-};
-
-} /* detail */
-
-template<class T, class A>
-inline typename detail::lsp_if_array<T>::type
-allocate_local_shared(const A& allocator, std::size_t count)
-{
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::lsp_array_state<other> state;
- typedef detail::sp_array_base<state> base;
- std::size_t size = count * detail::sp_array_count<type>::value;
- detail::sp_array_result<other, base> result(allocator, size);
- base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(allocator, size, start);
- detail::lsp_array_base& local = node->state().base();
- local.set(node);
- result.release();
- return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), &local);
-}
-
-template<class T, class A>
-inline typename detail::lsp_if_size_array<T>::type
-allocate_local_shared(const A& allocator)
-{
- enum {
- size = detail::sp_array_count<T>::value
- };
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::lsp_size_array_state<other, size> state;
- typedef detail::sp_array_base<state> base;
- detail::sp_array_result<other, base> result(allocator, size);
- base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(allocator, size, start);
- detail::lsp_array_base& local = node->state().base();
- local.set(node);
- result.release();
- return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), &local);
-}
-
-template<class T, class A>
-inline typename detail::lsp_if_array<T>::type
-allocate_local_shared(const A& allocator, std::size_t count,
- const typename detail::sp_array_element<T>::type& value)
-{
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::lsp_array_state<other> state;
- typedef detail::sp_array_base<state> base;
- std::size_t size = count * detail::sp_array_count<type>::value;
- detail::sp_array_result<other, base> result(allocator, size);
- base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(allocator, size,
- reinterpret_cast<const scalar*>(&value),
- detail::sp_array_count<type>::value, start);
- detail::lsp_array_base& local = node->state().base();
- local.set(node);
- result.release();
- return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), &local);
-}
-
-template<class T, class A>
-inline typename detail::lsp_if_size_array<T>::type
-allocate_local_shared(const A& allocator,
- const typename detail::sp_array_element<T>::type& value)
-{
- enum {
- size = detail::sp_array_count<T>::value
- };
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::lsp_size_array_state<other, size> state;
- typedef detail::sp_array_base<state> base;
- detail::sp_array_result<other, base> result(allocator, size);
- base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(allocator, size,
- reinterpret_cast<const scalar*>(&value),
- detail::sp_array_count<type>::value, start);
- detail::lsp_array_base& local = node->state().base();
- local.set(node);
- result.release();
- return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), &local);
-}
-
-template<class T, class A>
-inline typename detail::lsp_if_array<T>::type
-allocate_local_shared_noinit(const A& allocator, std::size_t count)
-{
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::lsp_array_state<other> state;
- typedef detail::sp_array_base<state, false> base;
- std::size_t size = count * detail::sp_array_count<type>::value;
- detail::sp_array_result<other, base> result(allocator, size);
- base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(detail::sp_default(), allocator,
- size, start);
- detail::lsp_array_base& local = node->state().base();
- local.set(node);
- result.release();
- return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), &local);
-}
-
-template<class T, class A>
-inline typename detail::lsp_if_size_array<T>::type
-allocate_local_shared_noinit(const A& allocator)
-{
- enum {
- size = detail::sp_array_count<T>::value
- };
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::lsp_size_array_state<other, size> state;
- typedef detail::sp_array_base<state, false> base;
- detail::sp_array_result<other, base> result(allocator, size);
- base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(detail::sp_default(), allocator,
- size, start);
- detail::lsp_array_base& local = node->state().base();
- local.set(node);
- result.release();
- return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), &local);
-}
-
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/allocate_shared_array.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/allocate_shared_array.hpp
deleted file mode 100644
index 340688146ca..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/allocate_shared_array.hpp
+++ /dev/null
@@ -1,703 +0,0 @@
-/*
-Copyright 2012-2017 Glen Joseph Fernandes
-(glenjofe@gmail.com)
-
-Distributed under the Boost Software License, Version 1.0.
-(http://www.boost.org/LICENSE_1_0.txt)
-*/
-#ifndef BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP
-#define BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP
-
-#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <boost/type_traits/has_trivial_assign.hpp>
-#include <boost/type_traits/has_trivial_constructor.hpp>
-#include <boost/type_traits/has_trivial_destructor.hpp>
-#include <boost/type_traits/type_with_alignment.hpp>
-
-namespace boost {
-namespace detail {
-
-template<class>
-struct sp_if_array { };
-
-template<class T>
-struct sp_if_array<T[]> {
- typedef boost::shared_ptr<T[]> type;
-};
-
-template<class>
-struct sp_if_size_array { };
-
-template<class T, std::size_t N>
-struct sp_if_size_array<T[N]> {
- typedef boost::shared_ptr<T[N]> type;
-};
-
-template<class>
-struct sp_array_element { };
-
-template<class T>
-struct sp_array_element<T[]> {
- typedef T type;
-};
-
-template<class T, std::size_t N>
-struct sp_array_element<T[N]> {
- typedef T type;
-};
-
-template<class T>
-struct sp_array_scalar {
- typedef T type;
-};
-
-template<class T, std::size_t N>
-struct sp_array_scalar<T[N]> {
- typedef typename sp_array_scalar<T>::type type;
-};
-
-template<class T, std::size_t N>
-struct sp_array_scalar<const T[N]> {
- typedef typename sp_array_scalar<T>::type type;
-};
-
-template<class T, std::size_t N>
-struct sp_array_scalar<volatile T[N]> {
- typedef typename sp_array_scalar<T>::type type;
-};
-
-template<class T, std::size_t N>
-struct sp_array_scalar<const volatile T[N]> {
- typedef typename sp_array_scalar<T>::type type;
-};
-
-template<class T>
-struct sp_array_scalar<T[]> {
- typedef typename sp_array_scalar<T>::type type;
-};
-
-template<class T>
-struct sp_array_scalar<const T[]> {
- typedef typename sp_array_scalar<T>::type type;
-};
-
-template<class T>
-struct sp_array_scalar<volatile T[]> {
- typedef typename sp_array_scalar<T>::type type;
-};
-
-template<class T>
-struct sp_array_scalar<const volatile T[]> {
- typedef typename sp_array_scalar<T>::type type;
-};
-
-template<class T>
-struct sp_array_count {
- enum {
- value = 1
- };
-};
-
-template<class T, std::size_t N>
-struct sp_array_count<T[N]> {
- enum {
- value = N * sp_array_count<T>::value
- };
-};
-
-template<std::size_t N, std::size_t M>
-struct sp_max_size {
- enum {
- value = N < M ? M : N
- };
-};
-
-template<std::size_t N, std::size_t M>
-struct sp_align_up {
- enum {
- value = (N + M - 1) & ~(M - 1)
- };
-};
-
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
-template<class A, class T>
-struct sp_bind_allocator {
- typedef typename std::allocator_traits<A>::template rebind_alloc<T> type;
-};
-#else
-template<class A, class T>
-struct sp_bind_allocator {
- typedef typename A::template rebind<T>::other type;
-};
-#endif
-
-template<class T>
-BOOST_CONSTEXPR inline std::size_t
-sp_objects(std::size_t size) BOOST_SP_NOEXCEPT
-{
- return (size + sizeof(T) - 1) / sizeof(T);
-}
-
-template<bool, class = void>
-struct sp_enable { };
-
-template<class T>
-struct sp_enable<true, T> {
- typedef T type;
-};
-
-template<bool E, class A, class T>
-inline typename sp_enable<!E && boost::has_trivial_destructor<T>::value>::type
-sp_array_destroy(A&, T*, std::size_t) BOOST_SP_NOEXCEPT { }
-
-template<bool E, class A, class T>
-inline typename sp_enable<!E &&
- !boost::has_trivial_destructor<T>::value>::type
-sp_array_destroy(A&, T* start, std::size_t size)
-{
- while (size > 0) {
- start[--size].~T();
- }
-}
-
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
-template<bool E, class A, class T>
-inline typename sp_enable<E>::type
-sp_array_destroy(A& allocator, T* start, std::size_t size)
-{
- while (size > 0) {
- std::allocator_traits<A>::destroy(allocator, start + --size);
- }
-}
-#endif
-
-template<bool E, class A, class T>
-inline typename sp_enable<!E &&
- boost::has_trivial_constructor<T>::value &&
- boost::has_trivial_assign<T>::value &&
- boost::has_trivial_destructor<T>::value>::type
-sp_array_construct(A&, T* start, std::size_t size)
-{
- for (std::size_t i = 0; i < size; ++i) {
- start[i] = T();
- }
-}
-
-template<bool E, class A, class T>
-inline typename sp_enable<!E &&
- boost::has_trivial_constructor<T>::value &&
- boost::has_trivial_assign<T>::value &&
- boost::has_trivial_destructor<T>::value>::type
-sp_array_construct(A&, T* start, std::size_t size, const T* list,
- std::size_t count)
-{
- for (std::size_t i = 0; i < size; ++i) {
- start[i] = list[i % count];
- }
-}
-
-#if !defined(BOOST_NO_EXCEPTIONS)
-template<bool E, class A, class T>
-inline typename sp_enable<!E &&
- !(boost::has_trivial_constructor<T>::value &&
- boost::has_trivial_assign<T>::value &&
- boost::has_trivial_destructor<T>::value)>::type
-sp_array_construct(A& none, T* start, std::size_t size)
-{
- std::size_t i = 0;
- try {
- for (; i < size; ++i) {
- ::new(static_cast<void*>(start + i)) T();
- }
- } catch (...) {
- sp_array_destroy<E>(none, start, i);
- throw;
- }
-}
-
-template<bool E, class A, class T>
-inline typename sp_enable<!E &&
- !(boost::has_trivial_constructor<T>::value &&
- boost::has_trivial_assign<T>::value &&
- boost::has_trivial_destructor<T>::value)>::type
-sp_array_construct(A& none, T* start, std::size_t size, const T* list,
- std::size_t count)
-{
- std::size_t i = 0;
- try {
- for (; i < size; ++i) {
- ::new(static_cast<void*>(start + i)) T(list[i % count]);
- }
- } catch (...) {
- sp_array_destroy<E>(none, start, i);
- throw;
- }
-}
-#else
-template<bool E, class A, class T>
-inline typename sp_enable<!E &&
- !(boost::has_trivial_constructor<T>::value &&
- boost::has_trivial_assign<T>::value &&
- boost::has_trivial_destructor<T>::value)>::type
-sp_array_construct(A&, T* start, std::size_t size)
-{
- for (std::size_t i = 0; i < size; ++i) {
- ::new(static_cast<void*>(start + i)) T();
- }
-}
-
-template<bool E, class A, class T>
-inline typename sp_enable<!E &&
- !(boost::has_trivial_constructor<T>::value &&
- boost::has_trivial_assign<T>::value &&
- boost::has_trivial_destructor<T>::value)>::type
-sp_array_construct(A&, T* start, std::size_t size, const T* list,
- std::size_t count)
-{
- for (std::size_t i = 0; i < size; ++i) {
- ::new(static_cast<void*>(start + i)) T(list[i % count]);
- }
-}
-#endif
-
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
-#if !defined(BOOST_NO_EXCEPTIONS)
-template<bool E, class A, class T>
-inline typename sp_enable<E>::type
-sp_array_construct(A& allocator, T* start, std::size_t size)
-{
- std::size_t i = 0;
- try {
- for (i = 0; i < size; ++i) {
- std::allocator_traits<A>::construct(allocator, start + i);
- }
- } catch (...) {
- sp_array_destroy<E>(allocator, start, i);
- throw;
- }
-}
-
-template<bool E, class A, class T>
-inline typename sp_enable<E>::type
-sp_array_construct(A& allocator, T* start, std::size_t size, const T* list,
- std::size_t count)
-{
- std::size_t i = 0;
- try {
- for (i = 0; i < size; ++i) {
- std::allocator_traits<A>::construct(allocator, start + i,
- list[i % count]);
- }
- } catch (...) {
- sp_array_destroy<E>(allocator, start, i);
- throw;
- }
-}
-#else
-template<bool E, class A, class T>
-inline typename sp_enable<E>::type
-sp_array_construct(A& allocator, T* start, std::size_t size)
-{
- for (std::size_t i = 0; i < size; ++i) {
- std::allocator_traits<A>::construct(allocator, start + i);
- }
-}
-
-template<bool E, class A, class T>
-inline typename sp_enable<E>::type
-sp_array_construct(A& allocator, T* start, std::size_t size, const T* list,
- std::size_t count)
-{
- for (std::size_t i = 0; i < size; ++i) {
- std::allocator_traits<A>::construct(allocator, start + i,
- list[i % count]);
- }
-}
-#endif
-#endif
-
-template<class A, class T>
-inline typename sp_enable<boost::has_trivial_constructor<T>::value>::type
-sp_array_default(A&, T*, std::size_t) BOOST_SP_NOEXCEPT { }
-
-#if !defined(BOOST_NO_EXCEPTIONS)
-template<class A, class T>
-inline typename sp_enable<!boost::has_trivial_constructor<T>::value>::type
-sp_array_default(A& none, T* start, std::size_t size)
-{
- std::size_t i = 0;
- try {
- for (; i < size; ++i) {
- ::new(static_cast<void*>(start + i)) T;
- }
- } catch (...) {
- sp_array_destroy<false>(none, start, i);
- throw;
- }
-}
-#else
-template<bool E, class A, class T>
-inline typename sp_enable<!boost::has_trivial_constructor<T>::value>::type
-sp_array_default(A&, T* start, std::size_t size)
-{
- for (std::size_t i = 0; i < size; ++i) {
- ::new(static_cast<void*>(start + i)) T;
- }
-}
-#endif
-
-template<class A>
-class sp_array_state {
-public:
- typedef A type;
-
- template<class U>
- sp_array_state(const U& _allocator, std::size_t _size) BOOST_SP_NOEXCEPT
- : allocator_(_allocator),
- size_(_size) { }
-
- A& allocator() BOOST_SP_NOEXCEPT {
- return allocator_;
- }
-
- std::size_t size() const BOOST_SP_NOEXCEPT {
- return size_;
- }
-
-private:
- A allocator_;
- std::size_t size_;
-};
-
-template<class A, std::size_t N>
-class sp_size_array_state {
-public:
- typedef A type;
-
- template<class U>
- sp_size_array_state(const U& _allocator, std::size_t) BOOST_SP_NOEXCEPT
- : allocator_(_allocator) { }
-
- A& allocator() BOOST_SP_NOEXCEPT {
- return allocator_;
- }
-
- BOOST_CONSTEXPR std::size_t size() const BOOST_SP_NOEXCEPT {
- return N;
- }
-
-private:
- A allocator_;
-};
-
-#if !defined(BOOST_NO_CXX11_ALLOCATOR)
-template<class A>
-struct sp_use_construct {
- enum {
- value = true
- };
-};
-
-template<class T>
-struct sp_use_construct<std::allocator<T> > {
- enum {
- value = false
- };
-};
-#else
-template<class>
-struct sp_use_construct {
- enum {
- value = false
- };
-};
-#endif
-
-template<class T, class U>
-struct sp_array_alignment {
- enum {
- value = sp_max_size<boost::alignment_of<T>::value,
- boost::alignment_of<U>::value>::value
- };
-};
-
-template<class T, class U>
-struct sp_array_offset {
- enum {
- value = sp_align_up<sizeof(T), sp_array_alignment<T, U>::value>::value
- };
-};
-
-template<class T, class U>
-struct sp_array_storage {
- enum {
- value = sp_array_alignment<T, U>::value
- };
- typedef typename boost::type_with_alignment<value>::type type;
-};
-
-template<class T, class U>
-inline U*
-sp_array_start(void* base) BOOST_SP_NOEXCEPT
-{
- enum {
- size = sp_array_offset<T, U>::value
- };
- return reinterpret_cast<U*>(static_cast<char*>(base) + size);
-}
-
-template<class A, class T>
-class sp_array_creator {
- typedef typename A::value_type scalar;
-
- enum {
- offset = sp_array_offset<T, scalar>::value
- };
-
- typedef typename sp_array_storage<T, scalar>::type type;
-
-public:
- template<class U>
- sp_array_creator(const U& other, std::size_t size) BOOST_SP_NOEXCEPT
- : other_(other),
- size_(sp_objects<type>(offset + sizeof(scalar) * size)) { }
-
- T* create() {
- return reinterpret_cast<T*>(other_.allocate(size_));
- }
-
- void destroy(T* base) {
- other_.deallocate(reinterpret_cast<type*>(base), size_);
- }
-
-private:
- typename sp_bind_allocator<A, type>::type other_;
- std::size_t size_;
-};
-
-struct sp_default { };
-
-template<class T, bool E = sp_use_construct<T>::value>
-class sp_array_base
- : public sp_counted_base {
- typedef typename T::type allocator;
-
-public:
- typedef typename allocator::value_type type;
-
- template<class A>
- sp_array_base(const A& other, std::size_t size, type* start)
- : state_(other, size) {
- sp_array_construct<E>(state_.allocator(), start, state_.size());
- }
-
- template<class A>
- sp_array_base(const A& other, std::size_t size, const type* list,
- std::size_t count, type* start)
- : state_(other, size) {
- sp_array_construct<E>(state_.allocator(), start, state_.size(), list,
- count);
- }
-
- template<class A>
- sp_array_base(sp_default, const A& other, std::size_t size, type* start)
- : state_(other, size) {
- sp_array_default(state_.allocator(), start, state_.size());
- }
-
- T& state() BOOST_SP_NOEXCEPT {
- return state_;
- }
-
- virtual void dispose() {
- sp_array_destroy<E>(state_.allocator(),
- sp_array_start<sp_array_base, type>(this), state_.size());
- }
-
- virtual void destroy() {
- sp_array_creator<allocator, sp_array_base> other(state_.allocator(),
- state_.size());
- this->~sp_array_base();
- other.destroy(this);
- }
-
- virtual void* get_deleter(const sp_typeinfo&) {
- return 0;
- }
-
- virtual void* get_local_deleter(const sp_typeinfo&) {
- return 0;
- }
-
- virtual void* get_untyped_deleter() {
- return 0;
- }
-
-private:
- T state_;
-};
-
-template<class A, class T>
-struct sp_array_result {
-public:
- template<class U>
- sp_array_result(const U& other, std::size_t size)
- : creator_(other, size),
- result_(creator_.create()) { }
-
- ~sp_array_result() {
- if (result_) {
- creator_.destroy(result_);
- }
- }
-
- T* get() const {
- return result_;
- }
-
- void release() {
- result_ = 0;
- }
-
-private:
- sp_array_result(const sp_array_result&);
- sp_array_result& operator=(const sp_array_result&);
-
- sp_array_creator<A, T> creator_;
- T* result_;
-};
-
-} /* detail */
-
-template<class T, class A>
-inline typename detail::sp_if_array<T>::type
-allocate_shared(const A& allocator, std::size_t count)
-{
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::sp_array_state<other> state;
- typedef detail::sp_array_base<state> base;
- std::size_t size = count * detail::sp_array_count<type>::value;
- detail::sp_array_result<other, base> result(allocator, size);
- detail::sp_counted_base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(allocator, size, start);
- result.release();
- return shared_ptr<T>(detail::sp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), detail::shared_count(node));
-}
-
-template<class T, class A>
-inline typename detail::sp_if_size_array<T>::type
-allocate_shared(const A& allocator)
-{
- enum {
- size = detail::sp_array_count<T>::value
- };
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::sp_size_array_state<other, size> state;
- typedef detail::sp_array_base<state> base;
- detail::sp_array_result<other, base> result(allocator, size);
- detail::sp_counted_base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(allocator, size, start);
- result.release();
- return shared_ptr<T>(detail::sp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), detail::shared_count(node));
-}
-
-template<class T, class A>
-inline typename detail::sp_if_array<T>::type
-allocate_shared(const A& allocator, std::size_t count,
- const typename detail::sp_array_element<T>::type& value)
-{
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::sp_array_state<other> state;
- typedef detail::sp_array_base<state> base;
- std::size_t size = count * detail::sp_array_count<type>::value;
- detail::sp_array_result<other, base> result(allocator, size);
- detail::sp_counted_base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(allocator, size,
- reinterpret_cast<const scalar*>(&value),
- detail::sp_array_count<type>::value, start);
- result.release();
- return shared_ptr<T>(detail::sp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), detail::shared_count(node));
-}
-
-template<class T, class A>
-inline typename detail::sp_if_size_array<T>::type
-allocate_shared(const A& allocator,
- const typename detail::sp_array_element<T>::type& value)
-{
- enum {
- size = detail::sp_array_count<T>::value
- };
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::sp_size_array_state<other, size> state;
- typedef detail::sp_array_base<state> base;
- detail::sp_array_result<other, base> result(allocator, size);
- detail::sp_counted_base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(allocator, size,
- reinterpret_cast<const scalar*>(&value),
- detail::sp_array_count<type>::value, start);
- result.release();
- return shared_ptr<T>(detail::sp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), detail::shared_count(node));
-}
-
-template<class T, class A>
-inline typename detail::sp_if_array<T>::type
-allocate_shared_noinit(const A& allocator, std::size_t count)
-{
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::sp_array_state<other> state;
- typedef detail::sp_array_base<state, false> base;
- std::size_t size = count * detail::sp_array_count<type>::value;
- detail::sp_array_result<other, base> result(allocator, size);
- detail::sp_counted_base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(detail::sp_default(), allocator,
- size, start);
- result.release();
- return shared_ptr<T>(detail::sp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), detail::shared_count(node));
-}
-
-template<class T, class A>
-inline typename detail::sp_if_size_array<T>::type
-allocate_shared_noinit(const A& allocator)
-{
- enum {
- size = detail::sp_array_count<T>::value
- };
- typedef typename detail::sp_array_element<T>::type type;
- typedef typename detail::sp_array_scalar<T>::type scalar;
- typedef typename detail::sp_bind_allocator<A, scalar>::type other;
- typedef detail::sp_size_array_state<other, size> state;
- typedef detail::sp_array_base<state, false> base;
- detail::sp_array_result<other, base> result(allocator, size);
- detail::sp_counted_base* node = result.get();
- scalar* start = detail::sp_array_start<base, scalar>(node);
- ::new(static_cast<void*>(node)) base(detail::sp_default(), allocator,
- size, start);
- result.release();
- return shared_ptr<T>(detail::sp_internal_constructor_tag(),
- reinterpret_cast<type*>(start), detail::shared_count(node));
-}
-
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_gcc.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_gcc.hpp
deleted file mode 100644
index 54807e944e2..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_gcc.hpp
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
-
-//
-// boost/detail/atomic_count_gcc.hpp
-//
-// atomic_count for GNU libstdc++ v3
-//
-// http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html
-//
-// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
-// Copyright (c) 2002 Lars Gullik Bjønnes <larsbj@lyx.org>
-// Copyright 2003-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#if __GNUC__ * 100 + __GNUC_MINOR__ >= 402
-# include <ext/atomicity.h>
-#else
-# include <bits/atomicity.h>
-#endif
-
-namespace boost
-{
-
-namespace detail
-{
-
-#if defined(__GLIBCXX__) // g++ 3.4+
-
-using __gnu_cxx::__atomic_add;
-using __gnu_cxx::__exchange_and_add;
-
-#endif
-
-class atomic_count
-{
-public:
-
- explicit atomic_count( long v ) : value_( v ) {}
-
- long operator++()
- {
- return __exchange_and_add( &value_, +1 ) + 1;
- }
-
- long operator--()
- {
- return __exchange_and_add( &value_, -1 ) - 1;
- }
-
- operator long() const
- {
- return __exchange_and_add( &value_, 0 );
- }
-
-private:
-
- atomic_count(atomic_count const &);
- atomic_count & operator=(atomic_count const &);
-
- mutable _Atomic_word value_;
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/local_counted_base.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/local_counted_base.hpp
deleted file mode 100644
index fdfe2c65cd2..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/local_counted_base.hpp
+++ /dev/null
@@ -1,148 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// detail/local_counted_base.hpp
-//
-// Copyright 2017 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/smart_ptr/ for documentation.
-
-#include <boost/smart_ptr/detail/shared_count.hpp>
-#include <boost/config.hpp>
-#include <utility>
-
-namespace boost
-{
-
-namespace detail
-{
-
-class local_counted_base
-{
-private:
-
- local_counted_base & operator= ( local_counted_base const & );
-
-private:
-
- // not 'int' or 'unsigned' to avoid aliasing and enable optimizations
- enum count_type { min_ = 0, initial_ = 1, max_ = 2147483647 };
-
- count_type local_use_count_;
-
-public:
-
- BOOST_CONSTEXPR local_counted_base() BOOST_SP_NOEXCEPT: local_use_count_( initial_ )
- {
- }
-
- BOOST_CONSTEXPR local_counted_base( local_counted_base const & ) BOOST_SP_NOEXCEPT: local_use_count_( initial_ )
- {
- }
-
- virtual ~local_counted_base() /*BOOST_SP_NOEXCEPT*/
- {
- }
-
- virtual void local_cb_destroy() BOOST_SP_NOEXCEPT = 0;
-
- virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT = 0;
-
- void add_ref() BOOST_SP_NOEXCEPT
- {
-#if !defined(__NVCC__)
-#if defined( __has_builtin )
-# if __has_builtin( __builtin_assume )
-
- __builtin_assume( local_use_count_ >= 1 );
-
-# endif
-#endif
-#endif
-
- local_use_count_ = static_cast<count_type>( local_use_count_ + 1 );
- }
-
- void release() BOOST_SP_NOEXCEPT
- {
- local_use_count_ = static_cast<count_type>( local_use_count_ - 1 );
-
- if( local_use_count_ == 0 )
- {
- local_cb_destroy();
- }
- }
-
- long local_use_count() const BOOST_SP_NOEXCEPT
- {
- return local_use_count_;
- }
-};
-
-class local_counted_impl: public local_counted_base
-{
-private:
-
- local_counted_impl( local_counted_impl const & );
-
-private:
-
- shared_count pn_;
-
-public:
-
- explicit local_counted_impl( shared_count const& pn ): pn_( pn )
- {
- }
-
-#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
-
- explicit local_counted_impl( shared_count && pn ): pn_( std::move(pn) )
- {
- }
-
-#endif
-
- virtual void local_cb_destroy() BOOST_SP_NOEXCEPT
- {
- delete this;
- }
-
- virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT
- {
- return pn_;
- }
-};
-
-class local_counted_impl_em: public local_counted_base
-{
-public:
-
- shared_count pn_;
-
- virtual void local_cb_destroy() BOOST_SP_NOEXCEPT
- {
- shared_count().swap( pn_ );
- }
-
- virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT
- {
- return pn_;
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp
deleted file mode 100644
index ec6f6ee1840..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp
+++ /dev/null
@@ -1,152 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED
-
-//
-// detail/sp_counted_base_acc_ia64.hpp - aC++ on HP-UX IA64
-//
-// Copyright 2007 Baruch Zilber
-// Copyright 2007 Boris Gubenko
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <machine/sys/inline.h>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void atomic_increment( int * pw )
-{
- // ++*pw;
-
- _Asm_fetchadd(_FASZ_W, _SEM_REL, pw, +1, _LDHINT_NONE);
-}
-
-inline int atomic_decrement( int * pw )
-{
- // return --*pw;
-
- int r = static_cast<int>(_Asm_fetchadd(_FASZ_W, _SEM_REL, pw, -1, _LDHINT_NONE));
- if (1 == r)
- {
- _Asm_mf();
- }
-
- return r - 1;
-}
-
-inline int atomic_conditional_increment( int * pw )
-{
- // if( *pw != 0 ) ++*pw;
- // return *pw;
-
- int v = *pw;
-
- for (;;)
- {
- if (0 == v)
- {
- return 0;
- }
-
- _Asm_mov_to_ar(_AREG_CCV,
- v,
- (_UP_CALL_FENCE | _UP_SYS_FENCE | _DOWN_CALL_FENCE | _DOWN_SYS_FENCE));
- int r = static_cast<int>(_Asm_cmpxchg(_SZ_W, _SEM_ACQ, pw, v + 1, _LDHINT_NONE));
- if (r == v)
- {
- return r + 1;
- }
-
- v = r;
- }
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int use_count_; // #shared
- int weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<int const volatile &>( use_count_ ); // TODO use ld.acq here
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp
deleted file mode 100644
index ce8ee686ba0..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp
+++ /dev/null
@@ -1,144 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
-
-//
-// detail/sp_counted_base_aix.hpp
-// based on: detail/sp_counted_base_w32.hpp
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-// Copyright 2006 Michael van der Westhuizen
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-// Thanks to Ben Hitchings for the #weak + (#shared != 0)
-// formulation
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <builtins.h>
-#include <sys/atomic_op.h>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void atomic_increment( int32_t* pw )
-{
- // ++*pw;
-
- fetch_and_add( pw, 1 );
-}
-
-inline int32_t atomic_decrement( int32_t * pw )
-{
- // return --*pw;
-
- int32_t originalValue;
-
- __lwsync();
- originalValue = fetch_and_add( pw, -1 );
- __isync();
-
- return (originalValue - 1);
-}
-
-inline int32_t atomic_conditional_increment( int32_t * pw )
-{
- // if( *pw != 0 ) ++*pw;
- // return *pw;
-
- int32_t tmp = fetch_and_add( pw, 0 );
- for( ;; )
- {
- if( tmp == 0 ) return 0;
- if( compare_and_swap( pw, &tmp, tmp + 1 ) ) return (tmp + 1);
- }
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int32_t use_count_; // #shared
- int32_t weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return fetch_and_add( const_cast<int32_t*>(&use_count_), 0 );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp
deleted file mode 100644
index 5d6e073d957..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp
+++ /dev/null
@@ -1,150 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// detail/sp_counted_base_clang.hpp - __c11 clang intrinsics
-//
-// Copyright (c) 2007, 2013, 2015 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <boost/cstdint.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t;
-
-inline void atomic_increment( atomic_int_least32_t * pw )
-{
- __c11_atomic_fetch_add( pw, 1, __ATOMIC_RELAXED );
-}
-
-inline boost::int_least32_t atomic_decrement( atomic_int_least32_t * pw )
-{
- return __c11_atomic_fetch_sub( pw, 1, __ATOMIC_ACQ_REL );
-}
-
-inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * pw )
-{
- // long r = *pw;
- // if( r != 0 ) ++*pw;
- // return r;
-
- boost::int_least32_t r = __c11_atomic_load( pw, __ATOMIC_RELAXED );
-
- for( ;; )
- {
- if( r == 0 )
- {
- return r;
- }
-
- if( __c11_atomic_compare_exchange_weak( pw, &r, r + 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED ) )
- {
- return r;
- }
- }
-}
-
-#if defined(__clang__)
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wweak-vtables"
-#endif
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- atomic_int_least32_t use_count_; // #shared
- atomic_int_least32_t weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base()
- {
- __c11_atomic_init( &use_count_, 1 );
- __c11_atomic_init( &weak_count_, 1 );
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 1 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 1 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return __c11_atomic_load( const_cast< atomic_int_least32_t* >( &use_count_ ), __ATOMIC_ACQUIRE );
- }
-};
-
-#if defined(__clang__)
-# pragma clang diagnostic pop
-#endif
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp
deleted file mode 100644
index 065f7c3d149..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp
+++ /dev/null
@@ -1,172 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_cw_ppc.hpp - CodeWarrior on PowerPC
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-// Thanks to Ben Hitchings for the #weak + (#shared != 0)
-// formulation
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void atomic_increment( register long * pw )
-{
- register int a;
-
- asm
- {
-loop:
-
- lwarx a, 0, pw
- addi a, a, 1
- stwcx. a, 0, pw
- bne- loop
- }
-}
-
-inline long atomic_decrement( register long * pw )
-{
- register int a;
-
- asm
- {
- sync
-
-loop:
-
- lwarx a, 0, pw
- addi a, a, -1
- stwcx. a, 0, pw
- bne- loop
-
- isync
- }
-
- return a;
-}
-
-inline long atomic_conditional_increment( register long * pw )
-{
- register int a;
-
- asm
- {
-loop:
-
- lwarx a, 0, pw
- cmpwi a, 0
- beq store
-
- addi a, a, 1
-
-store:
-
- stwcx. a, 0, pw
- bne- loop
- }
-
- return a;
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- long use_count_; // #shared
- long weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<long const volatile &>( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp
deleted file mode 100644
index 3a3d4d4119e..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp
+++ /dev/null
@@ -1,160 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_cw_x86.hpp - CodeWarrion on 486+
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-// Copyright 2005 Rene Rivera
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-// Thanks to Ben Hitchings for the #weak + (#shared != 0)
-// formulation
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline int atomic_exchange_and_add( int * pw, int dv )
-{
- // int r = *pw;
- // *pw += dv;
- // return r;
-
- asm
- {
- mov esi, [pw]
- mov eax, dv
- lock xadd dword ptr [esi], eax
- }
-}
-
-inline void atomic_increment( int * pw )
-{
- //atomic_exchange_and_add( pw, 1 );
-
- asm
- {
- mov esi, [pw]
- lock inc dword ptr [esi]
- }
-}
-
-inline int atomic_conditional_increment( int * pw )
-{
- // int rv = *pw;
- // if( rv != 0 ) ++*pw;
- // return rv;
-
- asm
- {
- mov esi, [pw]
- mov eax, dword ptr [esi]
- L0:
- test eax, eax
- je L1
- mov ebx, eax
- inc ebx
- lock cmpxchg dword ptr [esi], ebx
- jne L0
- L1:
- }
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int use_count_; // #shared
- int weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<int const volatile &>( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp
deleted file mode 100644
index 6c3cce8d44a..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp
+++ /dev/null
@@ -1,159 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED
-
-//
-// detail/sp_counted_base_gcc_ia64.hpp - g++ on IA64
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2006 Peter Dimov
-// Copyright 2005 Ben Hutchings
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void atomic_increment( int * pw )
-{
- // ++*pw;
-
- int tmp;
-
- // No barrier is required here but fetchadd always has an acquire or
- // release barrier associated with it. We choose release as it should be
- // cheaper.
- __asm__ ("fetchadd4.rel %0=%1,1" :
- "=r"(tmp), "=m"(*pw) :
- "m"( *pw ));
-}
-
-inline int atomic_decrement( int * pw )
-{
- // return --*pw;
-
- int rv;
-
- __asm__ (" fetchadd4.rel %0=%1,-1 ;; \n"
- " cmp.eq p7,p0=1,%0 ;; \n"
- "(p7) ld4.acq %0=%1 " :
- "=&r"(rv), "=m"(*pw) :
- "m"( *pw ) :
- "p7");
-
- return rv;
-}
-
-inline int atomic_conditional_increment( int * pw )
-{
- // if( *pw != 0 ) ++*pw;
- // return *pw;
-
- int rv, tmp, tmp2;
-
- __asm__ ("0: ld4 %0=%3 ;; \n"
- " cmp.eq p7,p0=0,%0 ;; \n"
- "(p7) br.cond.spnt 1f \n"
- " mov ar.ccv=%0 \n"
- " add %1=1,%0 ;; \n"
- " cmpxchg4.acq %2=%3,%1,ar.ccv ;; \n"
- " cmp.ne p7,p0=%0,%2 ;; \n"
- "(p7) br.cond.spnt 0b \n"
- " mov %0=%1 ;; \n"
- "1:" :
- "=&r"(rv), "=&r"(tmp), "=&r"(tmp2), "=m"(*pw) :
- "m"( *pw ) :
- "ar.ccv", "p7");
-
- return rv;
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int use_count_; // #shared
- int weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<int const volatile &>( use_count_ ); // TODO use ld.acq here
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
deleted file mode 100644
index c3175cf8ed1..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
+++ /dev/null
@@ -1,189 +0,0 @@
-#ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED
-#define BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_gcc_mips.hpp - g++ on MIPS
-//
-// Copyright (c) 2009, Spirent Communications, Inc.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void atomic_increment( int * pw )
-{
- // ++*pw;
-
- int tmp;
-
- __asm__ __volatile__
- (
- "0:\n\t"
- ".set push\n\t"
-#if !defined(__mips_isa_rev) || (__mips_isa_rev < 6)
- ".set mips2\n\t"
-#endif
- "ll %0, %1\n\t"
- "addiu %0, 1\n\t"
- "sc %0, %1\n\t"
- ".set pop\n\t"
- "beqz %0, 0b":
- "=&r"( tmp ), "=m"( *pw ):
- "m"( *pw )
- );
-}
-
-inline int atomic_decrement( int * pw )
-{
- // return --*pw;
-
- int rv, tmp;
-
- __asm__ __volatile__
- (
- "0:\n\t"
- ".set push\n\t"
-#if !defined(__mips_isa_rev) || (__mips_isa_rev < 6)
- ".set mips2\n\t"
-#endif
- "ll %1, %2\n\t"
- "addiu %0, %1, -1\n\t"
- "sc %0, %2\n\t"
- ".set pop\n\t"
- "beqz %0, 0b\n\t"
- "addiu %0, %1, -1":
- "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):
- "m"( *pw ):
- "memory"
- );
-
- return rv;
-}
-
-inline int atomic_conditional_increment( int * pw )
-{
- // if( *pw != 0 ) ++*pw;
- // return *pw;
-
- int rv, tmp;
-
- __asm__ __volatile__
- (
- "0:\n\t"
- ".set push\n\t"
-#if !defined(__mips_isa_rev) || (__mips_isa_rev < 6)
- ".set mips2\n\t"
-#endif
- "ll %0, %2\n\t"
- "beqz %0, 1f\n\t"
- "addiu %1, %0, 1\n\t"
- "sc %1, %2\n\t"
- ".set pop\n\t"
- "beqz %1, 0b\n\t"
- "addiu %0, %0, 1\n\t"
- "1:":
- "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):
- "m"( *pw ):
- "memory"
- );
-
- return rv;
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int use_count_; // #shared
- int weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<int const volatile &>( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp
deleted file mode 100644
index 0fb807488ae..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp
+++ /dev/null
@@ -1,183 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_gcc_ppc.hpp - g++ on PowerPC
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-// Thanks to Ben Hitchings for the #weak + (#shared != 0)
-// formulation
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void atomic_increment( int * pw )
-{
- // ++*pw;
-
- int tmp;
-
- __asm__
- (
- "0:\n\t"
- "lwarx %1, 0, %2\n\t"
- "addi %1, %1, 1\n\t"
- "stwcx. %1, 0, %2\n\t"
- "bne- 0b":
-
- "=m"( *pw ), "=&b"( tmp ):
- "r"( pw ), "m"( *pw ):
- "cc"
- );
-}
-
-inline int atomic_decrement( int * pw )
-{
- // return --*pw;
-
- int rv;
-
- __asm__ __volatile__
- (
- "sync\n\t"
- "0:\n\t"
- "lwarx %1, 0, %2\n\t"
- "addi %1, %1, -1\n\t"
- "stwcx. %1, 0, %2\n\t"
- "bne- 0b\n\t"
- "isync":
-
- "=m"( *pw ), "=&b"( rv ):
- "r"( pw ), "m"( *pw ):
- "memory", "cc"
- );
-
- return rv;
-}
-
-inline int atomic_conditional_increment( int * pw )
-{
- // if( *pw != 0 ) ++*pw;
- // return *pw;
-
- int rv;
-
- __asm__
- (
- "0:\n\t"
- "lwarx %1, 0, %2\n\t"
- "cmpwi %1, 0\n\t"
- "beq 1f\n\t"
- "addi %1, %1, 1\n\t"
- "1:\n\t"
- "stwcx. %1, 0, %2\n\t"
- "bne- 0b":
-
- "=m"( *pw ), "=&b"( rv ):
- "r"( pw ), "m"( *pw ):
- "cc"
- );
-
- return rv;
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int use_count_; // #shared
- int weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<int const volatile &>( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp
deleted file mode 100644
index b8bb707f1b9..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp
+++ /dev/null
@@ -1,168 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+
-//
-// Copyright (c) 2006 Piotr Wyderski
-// Copyright (c) 2006 Tomas Puverle
-// Copyright (c) 2006 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-//
-// Thanks to Michael van der Westhuizen
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <inttypes.h> // int32_t
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ )
-{
- __asm__ __volatile__( "cas [%1], %2, %0"
- : "+r" (swap_)
- : "r" (dest_), "r" (compare_)
- : "memory" );
-
- return swap_;
-}
-
-inline int32_t atomic_fetch_and_add( int32_t * pw, int32_t dv )
-{
- // long r = *pw;
- // *pw += dv;
- // return r;
-
- for( ;; )
- {
- int32_t r = *pw;
-
- if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) )
- {
- return r;
- }
- }
-}
-
-inline void atomic_increment( int32_t * pw )
-{
- atomic_fetch_and_add( pw, 1 );
-}
-
-inline int32_t atomic_decrement( int32_t * pw )
-{
- return atomic_fetch_and_add( pw, -1 );
-}
-
-inline int32_t atomic_conditional_increment( int32_t * pw )
-{
- // long r = *pw;
- // if( r != 0 ) ++*pw;
- // return r;
-
- for( ;; )
- {
- int32_t r = *pw;
-
- if( r == 0 )
- {
- return r;
- }
-
- if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) )
- {
- return r;
- }
- }
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int32_t use_count_; // #shared
- int32_t weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 1 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 1 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return const_cast< int32_t const volatile & >( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp
deleted file mode 100644
index 3d2dd61ed67..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp
+++ /dev/null
@@ -1,175 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_gcc_x86.hpp - g++ on 486+ or AMD64
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-// Thanks to Ben Hitchings for the #weak + (#shared != 0)
-// formulation
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline int atomic_exchange_and_add( int * pw, int dv )
-{
- // int r = *pw;
- // *pw += dv;
- // return r;
-
- int r;
-
- __asm__ __volatile__
- (
- "lock\n\t"
- "xadd %1, %0":
- "=m"( *pw ), "=r"( r ): // outputs (%0, %1)
- "m"( *pw ), "1"( dv ): // inputs (%2, %3 == %1)
- "memory", "cc" // clobbers
- );
-
- return r;
-}
-
-inline void atomic_increment( int * pw )
-{
- //atomic_exchange_and_add( pw, 1 );
-
- __asm__
- (
- "lock\n\t"
- "incl %0":
- "=m"( *pw ): // output (%0)
- "m"( *pw ): // input (%1)
- "cc" // clobbers
- );
-}
-
-inline int atomic_conditional_increment( int * pw )
-{
- // int rv = *pw;
- // if( rv != 0 ) ++*pw;
- // return rv;
-
- int rv, tmp;
-
- __asm__
- (
- "movl %0, %%eax\n\t"
- "0:\n\t"
- "test %%eax, %%eax\n\t"
- "je 1f\n\t"
- "movl %%eax, %2\n\t"
- "incl %2\n\t"
- "lock\n\t"
- "cmpxchgl %2, %0\n\t"
- "jne 0b\n\t"
- "1:":
- "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): // outputs (%0, %1, %2)
- "m"( *pw ): // input (%3)
- "cc" // clobbers
- );
-
- return rv;
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int use_count_; // #shared
- int weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<int const volatile &>( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp
deleted file mode 100644
index dea905c905f..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp
+++ /dev/null
@@ -1,109 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_nt.hpp
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- long use_count_; // #shared
- long weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- ++use_count_;
- }
-
- bool add_ref_lock() // true on success
- {
- if( use_count_ == 0 ) return false;
- ++use_count_;
- return true;
- }
-
- void release() // nothrow
- {
- if( --use_count_ == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- ++weak_count_;
- }
-
- void weak_release() // nothrow
- {
- if( --weak_count_ == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return use_count_;
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp
deleted file mode 100644
index 85f2563d5d5..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp
+++ /dev/null
@@ -1,138 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_pt.hpp
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <boost/assert.hpp>
-#include <pthread.h>
-
-namespace boost
-{
-
-namespace detail
-{
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- long use_count_; // #shared
- long weak_count_; // #weak + (#shared != 0)
-
- mutable pthread_mutex_t m_;
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
-// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init
-
-#if defined(__hpux) && defined(_DECTHREADS_)
- BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 );
-#else
- BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 );
-#endif
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 );
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
- ++use_count_;
- BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
- }
-
- bool add_ref_lock() // true on success
- {
- BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
- bool r = use_count_ == 0? false: ( ++use_count_, true );
- BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
- return r;
- }
-
- void release() // nothrow
- {
- BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
- long new_use_count = --use_count_;
- BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
-
- if( new_use_count == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
- ++weak_count_;
- BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
- }
-
- void weak_release() // nothrow
- {
- BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
- long new_weak_count = --weak_count_;
- BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
-
- if( new_weak_count == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
- long r = use_count_;
- BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
-
- return r;
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp
deleted file mode 100644
index 7b5f9178a6b..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp
+++ /dev/null
@@ -1,163 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+
-//
-// Copyright (c) 2006 Piotr Wyderski
-// Copyright (c) 2006 Tomas Puverle
-// Copyright (c) 2006 Peter Dimov
-// Copyright (c) 2011 Emil Dotchevski
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-//
-// Thanks to Michael van der Westhuizen
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <inttypes.h> // uint32_t
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline uint32_t compare_and_swap( uint32_t * dest_, uint32_t compare_, uint32_t swap_ )
-{
- return __builtin_cellAtomicCompareAndSwap32(dest_,compare_,swap_);
-}
-
-inline uint32_t atomic_fetch_and_add( uint32_t * pw, uint32_t dv )
-{
- // long r = *pw;
- // *pw += dv;
- // return r;
-
- for( ;; )
- {
- uint32_t r = *pw;
-
- if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) )
- {
- return r;
- }
- }
-}
-
-inline void atomic_increment( uint32_t * pw )
-{
- (void) __builtin_cellAtomicIncr32( pw );
-}
-
-inline uint32_t atomic_decrement( uint32_t * pw )
-{
- return __builtin_cellAtomicDecr32( pw );
-}
-
-inline uint32_t atomic_conditional_increment( uint32_t * pw )
-{
- // long r = *pw;
- // if( r != 0 ) ++*pw;
- // return r;
-
- for( ;; )
- {
- uint32_t r = *pw;
-
- if( r == 0 )
- {
- return r;
- }
-
- if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) )
- {
- return r;
- }
- }
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- uint32_t use_count_; // #shared
- uint32_t weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 1 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 1 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return const_cast< uint32_t const volatile & >( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp
deleted file mode 100644
index 0db9c6cbd56..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp
+++ /dev/null
@@ -1,115 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED
-
-//
-// detail/sp_counted_base_solaris.hpp
-// based on: detail/sp_counted_base_w32.hpp
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-// Copyright 2006 Michael van der Westhuizen
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-// Thanks to Ben Hitchings for the #weak + (#shared != 0)
-// formulation
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <atomic.h>
-
-namespace boost
-{
-
-namespace detail
-{
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- uint32_t use_count_; // #shared
- uint32_t weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_inc_32( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- for( ;; )
- {
- uint32_t tmp = static_cast< uint32_t const volatile& >( use_count_ );
- if( tmp == 0 ) return false;
- if( atomic_cas_32( &use_count_, tmp, tmp + 1 ) == tmp ) return true;
- }
- }
-
- void release() // nothrow
- {
- if( atomic_dec_32_nv( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_inc_32( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_dec_32_nv( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<long const volatile &>( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp
deleted file mode 100644
index faf503ad572..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp
+++ /dev/null
@@ -1,133 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_spin.hpp - spinlock pool atomic emulation
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2008 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <boost/smart_ptr/detail/spinlock_pool.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline int atomic_exchange_and_add( int * pw, int dv )
-{
- spinlock_pool<1>::scoped_lock lock( pw );
-
- int r = *pw;
- *pw += dv;
- return r;
-}
-
-inline void atomic_increment( int * pw )
-{
- spinlock_pool<1>::scoped_lock lock( pw );
- ++*pw;
-}
-
-inline int atomic_conditional_increment( int * pw )
-{
- spinlock_pool<1>::scoped_lock lock( pw );
-
- int rv = *pw;
- if( rv != 0 ) ++*pw;
- return rv;
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int use_count_; // #shared
- int weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- spinlock_pool<1>::scoped_lock lock( &use_count_ );
- return use_count_;
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp
deleted file mode 100644
index 9f562b9b4aa..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp
+++ /dev/null
@@ -1,138 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// detail/sp_counted_base_std_atomic.hpp - C++11 std::atomic
-//
-// Copyright (c) 2007, 2013 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <atomic>
-#include <cstdint>
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void atomic_increment( std::atomic_int_least32_t * pw )
-{
- pw->fetch_add( 1, std::memory_order_relaxed );
-}
-
-inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw )
-{
- return pw->fetch_sub( 1, std::memory_order_acq_rel );
-}
-
-inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw )
-{
- // long r = *pw;
- // if( r != 0 ) ++*pw;
- // return r;
-
- std::int_least32_t r = pw->load( std::memory_order_relaxed );
-
- for( ;; )
- {
- if( r == 0 )
- {
- return r;
- }
-
- if( pw->compare_exchange_weak( r, r + 1, std::memory_order_relaxed, std::memory_order_relaxed ) )
- {
- return r;
- }
- }
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- std::atomic_int_least32_t use_count_; // #shared
- std::atomic_int_least32_t weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 1 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 1 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return use_count_.load( std::memory_order_acquire );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp
deleted file mode 100644
index d2138e7c261..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp
+++ /dev/null
@@ -1,157 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-// detail/sp_counted_base_sync.hpp - g++ 4.1+ __sync intrinsics
-//
-// Copyright (c) 2007 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-
-#include <boost/detail/sp_typeinfo.hpp>
-#include <limits.h>
-
-#if defined( __ia64__ ) && defined( __INTEL_COMPILER )
-# include <ia64intrin.h>
-#endif
-
-namespace boost
-{
-
-namespace detail
-{
-
-#if INT_MAX >= 2147483647
-
-typedef int sp_int32_t;
-
-#else
-
-typedef long sp_int32_t;
-
-#endif
-
-inline void atomic_increment( sp_int32_t * pw )
-{
- __sync_fetch_and_add( pw, 1 );
-}
-
-inline sp_int32_t atomic_decrement( sp_int32_t * pw )
-{
- return __sync_fetch_and_add( pw, -1 );
-}
-
-inline sp_int32_t atomic_conditional_increment( sp_int32_t * pw )
-{
- // long r = *pw;
- // if( r != 0 ) ++*pw;
- // return r;
-
- sp_int32_t r = *pw;
-
- for( ;; )
- {
- if( r == 0 )
- {
- return r;
- }
-
- sp_int32_t r2 = __sync_val_compare_and_swap( pw, r, r + 1 );
-
- if( r2 == r )
- {
- return r;
- }
- else
- {
- r = r2;
- }
- }
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- sp_int32_t use_count_; // #shared
- sp_int32_t weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 1 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 1 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return const_cast< sp_int32_t const volatile & >( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
deleted file mode 100644
index f2de3b02d8e..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
+++ /dev/null
@@ -1,152 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
-
-//
-// detail/sp_counted_base_vacpp_ppc.hpp - xlC(vacpp) on POWER
-// based on: detail/sp_counted_base_w32.hpp
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-// Copyright 2006 Michael van der Westhuizen
-// Copyright 2012 IBM Corp.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-// Thanks to Ben Hitchings for the #weak + (#shared != 0)
-// formulation
-//
-
-#include <boost/detail/sp_typeinfo.hpp>
-
-extern "builtin" void __lwsync(void);
-extern "builtin" void __isync(void);
-extern "builtin" int __fetch_and_add(volatile int* addr, int val);
-extern "builtin" int __compare_and_swap(volatile int*, int*, int);
-
-namespace boost
-{
-
-namespace detail
-{
-
-inline void atomic_increment( int *pw )
-{
- // ++*pw;
- __lwsync();
- __fetch_and_add(pw, 1);
- __isync();
-}
-
-inline int atomic_decrement( int *pw )
-{
- // return --*pw;
- __lwsync();
- int originalValue = __fetch_and_add(pw, -1);
- __isync();
-
- return (originalValue - 1);
-}
-
-inline int atomic_conditional_increment( int *pw )
-{
- // if( *pw != 0 ) ++*pw;
- // return *pw;
-
- __lwsync();
- int v = *const_cast<volatile int*>(pw);
- for (;;)
- // loop until state is known
- {
- if (v == 0) return 0;
- if (__compare_and_swap(pw, &v, v + 1))
- {
- __isync(); return (v + 1);
- }
- }
-}
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- int use_count_; // #shared
- int weak_count_; // #weak + (#shared != 0)
- char pad[64] __attribute__((__aligned__(64)));
- // pad to prevent false sharing
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- atomic_increment( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- return atomic_conditional_increment( &use_count_ ) != 0;
- }
-
- void release() // nothrow
- {
- if( atomic_decrement( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- atomic_increment( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( atomic_decrement( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return *const_cast<volatile int*>(&use_count_);
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp
deleted file mode 100644
index 960e42e1282..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp
+++ /dev/null
@@ -1,132 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_base_w32.hpp
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-//
-// Lock-free algorithm by Alexander Terekhov
-//
-// Thanks to Ben Hitchings for the #weak + (#shared != 0)
-// formulation
-//
-
-#include <boost/smart_ptr/detail/sp_interlocked.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/detail/sp_typeinfo.hpp>
-
-namespace boost
-{
-
-namespace detail
-{
-
-class sp_counted_base
-{
-private:
-
- sp_counted_base( sp_counted_base const & );
- sp_counted_base & operator= ( sp_counted_base const & );
-
- long use_count_; // #shared
- long weak_count_; // #weak + (#shared != 0)
-
-public:
-
- sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
- {
- }
-
- virtual ~sp_counted_base() // nothrow
- {
- }
-
- // dispose() is called when use_count_ drops to zero, to release
- // the resources managed by *this.
-
- virtual void dispose() = 0; // nothrow
-
- // destroy() is called when weak_count_ drops to zero.
-
- virtual void destroy() // nothrow
- {
- delete this;
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
- virtual void * get_untyped_deleter() = 0;
-
- void add_ref_copy()
- {
- BOOST_SP_INTERLOCKED_INCREMENT( &use_count_ );
- }
-
- bool add_ref_lock() // true on success
- {
- for( ;; )
- {
- long tmp = static_cast< long const volatile& >( use_count_ );
- if( tmp == 0 ) return false;
-
-#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1200 )
-
- // work around a code generation bug
-
- long tmp2 = tmp + 1;
- if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true;
-
-#else
-
- if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true;
-
-#endif
- }
- }
-
- void release() // nothrow
- {
- if( BOOST_SP_INTERLOCKED_DECREMENT( &use_count_ ) == 0 )
- {
- dispose();
- weak_release();
- }
- }
-
- void weak_add_ref() // nothrow
- {
- BOOST_SP_INTERLOCKED_INCREMENT( &weak_count_ );
- }
-
- void weak_release() // nothrow
- {
- if( BOOST_SP_INTERLOCKED_DECREMENT( &weak_count_ ) == 0 )
- {
- destroy();
- }
- }
-
- long use_count() const // nothrow
- {
- return static_cast<long const volatile &>( use_count_ );
- }
-};
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_impl.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_impl.hpp
deleted file mode 100644
index fa2f75eb1aa..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_impl.hpp
+++ /dev/null
@@ -1,292 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// detail/sp_counted_impl.hpp
-//
-// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
-// Copyright 2004-2005 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#include <boost/config.hpp>
-
-#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR)
-# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible.
-#endif
-
-#include <boost/checked_delete.hpp>
-#include <boost/smart_ptr/detail/sp_counted_base.hpp>
-#include <boost/core/addressof.hpp>
-
-#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
-#include <boost/smart_ptr/detail/quick_allocator.hpp>
-#endif
-
-#if defined(BOOST_SP_USE_STD_ALLOCATOR)
-#include <memory> // std::allocator
-#endif
-
-#include <cstddef> // std::size_t
-
-namespace boost
-{
-
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
-
-void sp_scalar_constructor_hook( void * px, std::size_t size, void * pn );
-void sp_scalar_destructor_hook( void * px, std::size_t size, void * pn );
-
-#endif
-
-namespace detail
-{
-
-// get_local_deleter
-
-template<class D> class local_sp_deleter;
-
-template<class D> D * get_local_deleter( D * /*p*/ )
-{
- return 0;
-}
-
-template<class D> D * get_local_deleter( local_sp_deleter<D> * p );
-
-//
-
-template<class X> class sp_counted_impl_p: public sp_counted_base
-{
-private:
-
- X * px_;
-
- sp_counted_impl_p( sp_counted_impl_p const & );
- sp_counted_impl_p & operator= ( sp_counted_impl_p const & );
-
- typedef sp_counted_impl_p<X> this_type;
-
-public:
-
- explicit sp_counted_impl_p( X * px ): px_( px )
- {
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- boost::sp_scalar_constructor_hook( px, sizeof(X), this );
-#endif
- }
-
- virtual void dispose() // nothrow
- {
-#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
- boost::sp_scalar_destructor_hook( px_, sizeof(X), this );
-#endif
- boost::checked_delete( px_ );
- }
-
- virtual void * get_deleter( sp_typeinfo const & )
- {
- return 0;
- }
-
- virtual void * get_local_deleter( sp_typeinfo const & )
- {
- return 0;
- }
-
- virtual void * get_untyped_deleter()
- {
- return 0;
- }
-
-#if defined(BOOST_SP_USE_STD_ALLOCATOR)
-
- void * operator new( std::size_t )
- {
- return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
- }
-
- void operator delete( void * p )
- {
- std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
- }
-
-#endif
-
-#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
-
- void * operator new( std::size_t )
- {
- return quick_allocator<this_type>::alloc();
- }
-
- void operator delete( void * p )
- {
- quick_allocator<this_type>::dealloc( p );
- }
-
-#endif
-};
-
-//
-// Borland's Codeguard trips up over the -Vx- option here:
-//
-#ifdef __CODEGUARD__
-# pragma option push -Vx-
-#endif
-
-template<class P, class D> class sp_counted_impl_pd: public sp_counted_base
-{
-private:
-
- P ptr; // copy constructor must not throw
- D del; // copy constructor must not throw
-
- sp_counted_impl_pd( sp_counted_impl_pd const & );
- sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & );
-
- typedef sp_counted_impl_pd<P, D> this_type;
-
-public:
-
- // pre: d(p) must not throw
-
- sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d )
- {
- }
-
- sp_counted_impl_pd( P p ): ptr( p ), del()
- {
- }
-
- virtual void dispose() // nothrow
- {
- del( ptr );
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti )
- {
- return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
- }
-
- virtual void * get_local_deleter( sp_typeinfo const & ti )
- {
- return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0;
- }
-
- virtual void * get_untyped_deleter()
- {
- return &reinterpret_cast<char&>( del );
- }
-
-#if defined(BOOST_SP_USE_STD_ALLOCATOR)
-
- void * operator new( std::size_t )
- {
- return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
- }
-
- void operator delete( void * p )
- {
- std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
- }
-
-#endif
-
-#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
-
- void * operator new( std::size_t )
- {
- return quick_allocator<this_type>::alloc();
- }
-
- void operator delete( void * p )
- {
- quick_allocator<this_type>::dealloc( p );
- }
-
-#endif
-};
-
-template<class P, class D, class A> class sp_counted_impl_pda: public sp_counted_base
-{
-private:
-
- P p_; // copy constructor must not throw
- D d_; // copy constructor must not throw
- A a_; // copy constructor must not throw
-
- sp_counted_impl_pda( sp_counted_impl_pda const & );
- sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & );
-
- typedef sp_counted_impl_pda<P, D, A> this_type;
-
-public:
-
- // pre: d( p ) must not throw
-
- sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a )
- {
- }
-
- sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a )
- {
- }
-
- virtual void dispose() // nothrow
- {
- d_( p_ );
- }
-
- virtual void destroy() // nothrow
- {
-#if !defined( BOOST_NO_CXX11_ALLOCATOR )
-
- typedef typename std::allocator_traits<A>::template rebind_alloc< this_type > A2;
-
-#else
-
- typedef typename A::template rebind< this_type >::other A2;
-
-#endif
-
- A2 a2( a_ );
-
- this->~this_type();
-
- a2.deallocate( this, 1 );
- }
-
- virtual void * get_deleter( sp_typeinfo const & ti )
- {
- return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
- }
-
- virtual void * get_local_deleter( sp_typeinfo const & ti )
- {
- return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0;
- }
-
- virtual void * get_untyped_deleter()
- {
- return &reinterpret_cast<char&>( d_ );
- }
-};
-
-#ifdef __CODEGUARD__
-# pragma option pop
-#endif
-
-} // namespace detail
-
-} // namespace boost
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_interlocked.hpp b/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_interlocked.hpp
deleted file mode 100644
index 68ce292fcc6..00000000000
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_interlocked.hpp
+++ /dev/null
@@ -1,168 +0,0 @@
-#ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
-#define BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// boost/detail/sp_interlocked.hpp
-//
-// Copyright 2005, 2014 Peter Dimov
-//
-// Distributed under the Boost Software License, Version 1.0.
-// See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt
-//
-
-#include <boost/config.hpp>
-
-// BOOST_SP_HAS_INTRIN_H
-
-// VC9 has intrin.h, but it collides with <utility>
-#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
-
-# define BOOST_SP_HAS_INTRIN_H
-
-// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
-#elif defined( __MINGW64_VERSION_MAJOR )
-
-// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
-# define BOOST_SP_HAS_INTRIN_H
-
-#elif defined( __LP64__ )
-
-// We have to use intrin.h on Cygwin 64
-# define BOOST_SP_HAS_INTRIN_H
-
-// Intel C++ on Windows on VC10+ stdlib
-#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
-
-# define BOOST_SP_HAS_INTRIN_H
-
-#endif
-
-#if defined( BOOST_USE_WINDOWS_H )
-
-# include <windows.h>
-
-# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement
-# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement
-# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
-
-#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_SP_HAS_INTRIN_H )
-
-#include <intrin.h>
-
-# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
-
-#elif defined( _WIN32_WCE )
-
-#if _WIN32_WCE >= 0x600
-
-extern "C" long __cdecl _InterlockedIncrement( long volatile * );
-extern "C" long __cdecl _InterlockedDecrement( long volatile * );
-extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
-extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
-extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
-
-# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
-
-#else
-
-// under Windows CE we still have old-style Interlocked* functions
-
-extern "C" long __cdecl InterlockedIncrement( long* );
-extern "C" long __cdecl InterlockedDecrement( long* );
-extern "C" long __cdecl InterlockedCompareExchange( long*, long, long );
-extern "C" long __cdecl InterlockedExchange( long*, long );
-extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
-
-# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement
-# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement
-# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
-
-#endif
-
-#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
-
-#if defined( __CLRCALL_PURE_OR_CDECL )
-
-extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
-extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
-extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
-extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
-extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
-
-#else
-
-extern "C" long __cdecl _InterlockedIncrement( long volatile * );
-extern "C" long __cdecl _InterlockedDecrement( long volatile * );
-extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
-extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
-extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
-
-# if defined( BOOST_MSVC ) && BOOST_MSVC == 1310
-//From MSDN, Visual Studio .NET 2003 spedific: To declare one of the interlocked functions
-//for use as an intrinsic, the function must be declared with the leading underscore and
-//the new function must appear in a #pragma intrinsic statement.
-# pragma intrinsic( _InterlockedIncrement )
-# pragma intrinsic( _InterlockedDecrement )
-# pragma intrinsic( _InterlockedCompareExchange )
-# pragma intrinsic( _InterlockedExchange )
-# pragma intrinsic( _InterlockedExchangeAdd )
-# endif
-
-#endif
-
-# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
-# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
-# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
-
-#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
-
-namespace boost
-{
-
-namespace detail
-{
-
-extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * );
-extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * );
-extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long );
-extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long );
-extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long );
-
-} // namespace detail
-
-} // namespace boost
-
-# define BOOST_SP_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement
-# define BOOST_SP_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement
-# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
-# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
-
-#else
-
-# error "Interlocked intrinsics not available"
-
-#endif
-
-#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/version.hpp b/src/third_party/boost-1.68.0/boost/spirit/home/classic/version.hpp
deleted file mode 100644
index b0d358a26e5..00000000000
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/version.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-/*=============================================================================
- Copyright (c) 2001-2003 Hartmut Kaiser
- http://spirit.sourceforge.net/
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================*/
-#if !defined(SPIRIT_CLASSIC_VERSION_HPP)
-#define SPIRIT_CLASSIC_VERSION_HPP
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// This checks, whether the used Boost library is at least V1.32.0
-//
-///////////////////////////////////////////////////////////////////////////////
-#include <boost/version.hpp>
-
-#if BOOST_VERSION < 103200
-#error "Spirit v1.8.x needs at least Boost V1.32.0 to compile successfully."
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
-//
-// This is the version of the current Spirit distribution
-//
-///////////////////////////////////////////////////////////////////////////////
-#define SPIRIT_VERSION 0x1809
-#define SPIRIT_PIZZA_VERSION SPIRIT_MEGA_VEGGI // :-)
-
-#endif // defined(SPIRIT_VERSION_HPP)
diff --git a/src/third_party/boost-1.68.0/boost/system/config.hpp b/src/third_party/boost-1.68.0/boost/system/config.hpp
deleted file mode 100644
index 14faa634207..00000000000
--- a/src/third_party/boost-1.68.0/boost/system/config.hpp
+++ /dev/null
@@ -1,70 +0,0 @@
-// boost/system/config.hpp -----------------------------------------------------------//
-
-// Copyright Beman Dawes 2003, 2006
-
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/system for documentation.
-
-#ifndef BOOST_SYSTEM_CONFIG_HPP
-#define BOOST_SYSTEM_CONFIG_HPP
-
-#include <boost/config.hpp>
-#include <boost/predef/platform.h>
-#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
-
-// This header implements separate compilation features as described in
-// http://www.boost.org/more/separate_compilation.html
-
-// normalize macros ------------------------------------------------------------------//
-
-#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
- && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
-# define BOOST_SYSTEM_STATIC_LINK
-#endif
-
-#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
-# define BOOST_SYSTEM_DYN_LINK
-#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
-# define BOOST_SYSTEM_STATIC_LINK
-#endif
-
-#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
-# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
-#endif
-
-// enable dynamic or static linking as requested --------------------------------------//
-
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
-# if defined(BOOST_SYSTEM_SOURCE)
-# define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
-# else
-# define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
-# endif
-#else
-# define BOOST_SYSTEM_DECL
-#endif
-
-// enable automatic library variant selection ----------------------------------------//
-
-#if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
-//
-// Set the name of our library, this will get undef'ed by auto_link.hpp
-// once it's done with it:
-//
-#define BOOST_LIB_NAME boost_system
-//
-// If we're importing code from a dll, then tell auto_link.hpp about it:
-//
-#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
-# define BOOST_DYN_LINK
-#endif
-//
-// And include the header that does the work:
-//
-#include <boost/config/auto_link.hpp>
-#endif // auto-linking disabled
-
-#endif // BOOST_SYSTEM_CONFIG_HPP
-
diff --git a/src/third_party/boost-1.68.0/boost/system/detail/error_code.ipp b/src/third_party/boost-1.68.0/boost/system/detail/error_code.ipp
deleted file mode 100644
index f9516e0874d..00000000000
--- a/src/third_party/boost-1.68.0/boost/system/detail/error_code.ipp
+++ /dev/null
@@ -1,496 +0,0 @@
-// error_code support implementation file --------------------------------------------//
-
-// Copyright Beman Dawes 2002, 2006
-// Copyright (c) Microsoft Corporation 2014
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See library home page at http://www.boost.org/libs/system
-
-//--------------------------------------------------------------------------------------//
-
-#include <boost/config/warning_disable.hpp>
-
-#include <boost/system/config.hpp>
-#include <boost/system/error_code.hpp>
-#include <boost/cerrno.hpp>
-#include <vector>
-#include <cstdlib>
-#include <cassert>
-
-#include <cstring> // for strerror/strerror_r
-
-# if defined( BOOST_WINDOWS_API )
-# include <boost/winapi/error_codes.hpp>
-# include <boost/winapi/error_handling.hpp>
-# include <boost/winapi/character_code_conversion.hpp>
-# if !BOOST_PLAT_WINDOWS_RUNTIME
-# include <boost/system/detail/local_free_on_destruction.hpp>
-# endif
-# ifndef ERROR_INCORRECT_SIZE
-# define ERROR_INCORRECT_SIZE ERROR_BAD_ARGUMENTS
-# endif
-# endif
-
-//--------------------------------------------------------------------------------------//
-namespace boost
-{
-
-namespace system
-{
-
-namespace detail
-{
-
-#ifdef BOOST_ERROR_CODE_HEADER_ONLY
-# define BOOST_SYSTEM_DECL_ inline
-#else
-# define BOOST_SYSTEM_DECL_ BOOST_SYSTEM_DECL
-#endif
-
- // generic_error_category implementation ---------------------------------//
-
- BOOST_SYSTEM_DECL_ std::string generic_error_category::message( int ev ) const
- {
- using namespace boost::system::errc;
-#if defined(__PGI)
- using boost::system::errc::invalid_argument;
-#endif
-
- static std::string unknown_err( "Unknown error" );
- // strerror_r is preferred because it is always thread safe,
- // however, we fallback to strerror in certain cases because:
- // -- Windows doesn't provide strerror_r.
- // -- HP and Sun do provide strerror_r on newer systems, but there is
- // no way to tell if is available at runtime and in any case their
- // versions of strerror are thread safe anyhow.
- // -- Linux only sometimes provides strerror_r.
- // -- Tru64 provides strerror_r only when compiled -pthread.
- // -- VMS doesn't provide strerror_r, but on this platform, strerror is
- // thread safe.
- # if defined(BOOST_WINDOWS_API) || defined(__hpux) || defined(__sun)\
- || (defined(__linux) && (!defined(__USE_XOPEN2K)\
- || defined(BOOST_SYSTEM_USE_STRERROR)))\
- || (defined(__osf__) && !defined(_REENTRANT))\
- || (defined(__INTEGRITY))\
- || (defined(__vms))\
- || (defined(__QNXNTO__))
- const char * c_str = std::strerror( ev );
- return c_str
- ? std::string( c_str )
- : unknown_err;
- # else // use strerror_r
- char buf[64];
- char * bp = buf;
- std::size_t sz = sizeof(buf);
- # if defined(__CYGWIN__) || defined(__USE_GNU)
- // Oddball version of strerror_r
- const char * c_str = strerror_r( ev, bp, sz );
- return c_str
- ? std::string( c_str )
- : unknown_err;
- # else
- // POSIX version of strerror_r
- int result;
- for (;;)
- {
- // strerror_r returns 0 on success, otherwise ERANGE if buffer too small,
- // invalid_argument if ev not a valid error number
- # if defined (__sgi)
- const char * c_str = strerror( ev );
- result = 0;
- return c_str
- ? std::string( c_str )
- : unknown_err;
- # else
- result = strerror_r( ev, bp, sz );
- # endif
- if (result == 0 )
- break;
- else
- {
- # if defined(__linux)
- // Linux strerror_r returns -1 on error, with error number in errno
- result = errno;
- # endif
- if ( result != ERANGE ) break;
- if ( sz > sizeof(buf) ) std::free( bp );
- sz *= 2;
- if ( (bp = static_cast<char*>(std::malloc( sz ))) == 0 )
- return std::string( "ENOMEM" );
- }
- }
- std::string msg;
-# ifndef BOOST_NO_EXCEPTIONS
- try
-# endif
- {
- msg = ( ( result == invalid_argument ) ? "Unknown error" : bp );
- }
-
-# ifndef BOOST_NO_EXCEPTIONS
- // See ticket #2098
- catch(...)
- {
- // just eat the exception
- }
-# endif
-
- if ( sz > sizeof(buf) ) std::free( bp );
- return msg;
- # endif // else POSIX version of strerror_r
- # endif // else use strerror_r
- }
- // system_error_category implementation --------------------------------------------//
-
- BOOST_SYSTEM_DECL_ error_condition system_error_category::default_error_condition( int ev ) const
- BOOST_SYSTEM_NOEXCEPT
- {
- using namespace boost::system::errc;
-#if defined(__PGI)
- using boost::system::errc::invalid_argument;
-#endif
-
-# if defined(BOOST_WINDOWS_API)
-# if defined(WINAPI_FAMILY) && ((WINAPI_FAMILY & WINAPI_PARTITION_APP) != 0)
- // When using the Windows Runtime, most system errors are reported as HRESULTs.
- // We want to map the common Win32 errors to their equivalent error condition,
- // whether or not they are reported via an HRESULT.
- if ( ev < 0 ) // Check for failed HRESULTs only.
- if ( HRESULT_FACILITY( ev ) == FACILITY_WIN32 )
- ev = HRESULT_CODE( ev );
-# endif
-# endif
-
-# if defined(BOOST_WINDOWS_API)
-
- using namespace boost::winapi; // for error codes
-
-# endif
-
- switch ( ev )
- {
- case 0: return make_error_condition( success );
-# if defined(BOOST_POSIX_API)
- // POSIX-like O/S -> posix_errno decode table -------------------------------------//
- case E2BIG: return make_error_condition( argument_list_too_long );
- case EACCES: return make_error_condition( permission_denied );
- case EADDRINUSE: return make_error_condition( address_in_use );
- case EADDRNOTAVAIL: return make_error_condition( address_not_available );
- case EAFNOSUPPORT: return make_error_condition( address_family_not_supported );
- case EAGAIN: return make_error_condition( resource_unavailable_try_again );
-# if EALREADY != EBUSY // EALREADY and EBUSY are the same on QNX Neutrino
- case EALREADY: return make_error_condition( connection_already_in_progress );
-# endif
- case EBADF: return make_error_condition( bad_file_descriptor );
- case EBADMSG: return make_error_condition( bad_message );
- case EBUSY: return make_error_condition( device_or_resource_busy );
- case ECANCELED: return make_error_condition( operation_canceled );
- case ECHILD: return make_error_condition( no_child_process );
- case ECONNABORTED: return make_error_condition( connection_aborted );
- case ECONNREFUSED: return make_error_condition( connection_refused );
- case ECONNRESET: return make_error_condition( connection_reset );
- case EDEADLK: return make_error_condition( resource_deadlock_would_occur );
- case EDESTADDRREQ: return make_error_condition( destination_address_required );
- case EDOM: return make_error_condition( argument_out_of_domain );
- case EEXIST: return make_error_condition( file_exists );
- case EFAULT: return make_error_condition( bad_address );
- case EFBIG: return make_error_condition( file_too_large );
- case EHOSTUNREACH: return make_error_condition( host_unreachable );
- case EIDRM: return make_error_condition( identifier_removed );
- case EILSEQ: return make_error_condition( illegal_byte_sequence );
- case EINPROGRESS: return make_error_condition( operation_in_progress );
- case EINTR: return make_error_condition( interrupted );
- case EINVAL: return make_error_condition( invalid_argument );
- case EIO: return make_error_condition( io_error );
- case EISCONN: return make_error_condition( already_connected );
- case EISDIR: return make_error_condition( is_a_directory );
- case ELOOP: return make_error_condition( too_many_symbolic_link_levels );
- case EMFILE: return make_error_condition( too_many_files_open );
- case EMLINK: return make_error_condition( too_many_links );
- case EMSGSIZE: return make_error_condition( message_size );
- case ENAMETOOLONG: return make_error_condition( filename_too_long );
- case ENETDOWN: return make_error_condition( network_down );
- case ENETRESET: return make_error_condition( network_reset );
- case ENETUNREACH: return make_error_condition( network_unreachable );
- case ENFILE: return make_error_condition( too_many_files_open_in_system );
- case ENOBUFS: return make_error_condition( no_buffer_space );
- case ENODATA: return make_error_condition( no_message_available );
- case ENODEV: return make_error_condition( no_such_device );
- case ENOENT: return make_error_condition( no_such_file_or_directory );
- case ENOEXEC: return make_error_condition( executable_format_error );
- case ENOLCK: return make_error_condition( no_lock_available );
- case ENOLINK: return make_error_condition( no_link );
- case ENOMEM: return make_error_condition( not_enough_memory );
- case ENOMSG: return make_error_condition( no_message );
- case ENOPROTOOPT: return make_error_condition( no_protocol_option );
- case ENOSPC: return make_error_condition( no_space_on_device );
- case ENOSR: return make_error_condition( no_stream_resources );
- case ENOSTR: return make_error_condition( not_a_stream );
- case ENOSYS: return make_error_condition( function_not_supported );
- case ENOTCONN: return make_error_condition( not_connected );
- case ENOTDIR: return make_error_condition( not_a_directory );
- # if ENOTEMPTY != EEXIST // AIX treats ENOTEMPTY and EEXIST as the same value
- case ENOTEMPTY: return make_error_condition( directory_not_empty );
- # endif // ENOTEMPTY != EEXIST
- # if ENOTRECOVERABLE != ECONNRESET // the same on some Broadcom chips
- case ENOTRECOVERABLE: return make_error_condition( state_not_recoverable );
- # endif // ENOTRECOVERABLE != ECONNRESET
- case ENOTSOCK: return make_error_condition( not_a_socket );
- case ENOTSUP: return make_error_condition( not_supported );
- case ENOTTY: return make_error_condition( inappropriate_io_control_operation );
- case ENXIO: return make_error_condition( no_such_device_or_address );
- # if EOPNOTSUPP != ENOTSUP
- case EOPNOTSUPP: return make_error_condition( operation_not_supported );
- # endif // EOPNOTSUPP != ENOTSUP
- case EOVERFLOW: return make_error_condition( value_too_large );
- # if EOWNERDEAD != ECONNABORTED // the same on some Broadcom chips
- case EOWNERDEAD: return make_error_condition( owner_dead );
- # endif // EOWNERDEAD != ECONNABORTED
- case EPERM: return make_error_condition( operation_not_permitted );
- case EPIPE: return make_error_condition( broken_pipe );
- case EPROTO: return make_error_condition( protocol_error );
- case EPROTONOSUPPORT: return make_error_condition( protocol_not_supported );
- case EPROTOTYPE: return make_error_condition( wrong_protocol_type );
- case ERANGE: return make_error_condition( result_out_of_range );
- case EROFS: return make_error_condition( read_only_file_system );
- case ESPIPE: return make_error_condition( invalid_seek );
- case ESRCH: return make_error_condition( no_such_process );
- case ETIME: return make_error_condition( stream_timeout );
- case ETIMEDOUT: return make_error_condition( timed_out );
- case ETXTBSY: return make_error_condition( text_file_busy );
- # if EAGAIN != EWOULDBLOCK
- case EWOULDBLOCK: return make_error_condition( operation_would_block );
- # endif // EAGAIN != EWOULDBLOCK
- case EXDEV: return make_error_condition( cross_device_link );
- #else
- // Windows system -> posix_errno decode table ---------------------------//
- // see WinError.h comments for descriptions of errors
- case ERROR_ACCESS_DENIED_: return make_error_condition( permission_denied );
- case ERROR_ALREADY_EXISTS_: return make_error_condition( file_exists );
- case ERROR_BAD_UNIT_: return make_error_condition( no_such_device );
- case ERROR_BUFFER_OVERFLOW_: return make_error_condition( filename_too_long );
- case ERROR_BUSY_: return make_error_condition( device_or_resource_busy );
- case ERROR_BUSY_DRIVE_: return make_error_condition( device_or_resource_busy );
- case ERROR_CANNOT_MAKE_: return make_error_condition( permission_denied );
- case ERROR_CANTOPEN_: return make_error_condition( io_error );
- case ERROR_CANTREAD_: return make_error_condition( io_error );
- case ERROR_CANTWRITE_: return make_error_condition( io_error );
- case ERROR_CURRENT_DIRECTORY_: return make_error_condition( permission_denied );
- case ERROR_DEV_NOT_EXIST_: return make_error_condition( no_such_device );
- case ERROR_DEVICE_IN_USE_: return make_error_condition( device_or_resource_busy );
- case ERROR_DIR_NOT_EMPTY_: return make_error_condition( directory_not_empty );
- case ERROR_DIRECTORY_: return make_error_condition( invalid_argument );\
- // WinError.h: "The directory name is invalid"
- case ERROR_DISK_FULL_: return make_error_condition( no_space_on_device );
- case ERROR_FILE_EXISTS_: return make_error_condition( file_exists );
- case ERROR_FILE_NOT_FOUND_: return make_error_condition( no_such_file_or_directory );
- case ERROR_HANDLE_DISK_FULL_: return make_error_condition( no_space_on_device );
- case ERROR_INVALID_ACCESS_: return make_error_condition( permission_denied );
- case ERROR_INVALID_DRIVE_: return make_error_condition( no_such_device );
- case ERROR_INVALID_FUNCTION_: return make_error_condition( function_not_supported );
- case ERROR_INVALID_HANDLE_: return make_error_condition( invalid_argument );
- case ERROR_INVALID_NAME_: return make_error_condition( invalid_argument );
- case ERROR_LOCK_VIOLATION_: return make_error_condition( no_lock_available );
- case ERROR_LOCKED_: return make_error_condition( no_lock_available );
- case ERROR_NEGATIVE_SEEK_: return make_error_condition( invalid_argument );
- case ERROR_NOACCESS_: return make_error_condition( permission_denied );
- case ERROR_NOT_ENOUGH_MEMORY_: return make_error_condition( not_enough_memory );
- case ERROR_NOT_READY_: return make_error_condition( resource_unavailable_try_again );
- case ERROR_NOT_SAME_DEVICE_: return make_error_condition( cross_device_link );
- case ERROR_OPEN_FAILED_: return make_error_condition( io_error );
- case ERROR_OPEN_FILES_: return make_error_condition( device_or_resource_busy );
- case ERROR_OPERATION_ABORTED_: return make_error_condition( operation_canceled );
- case ERROR_OUTOFMEMORY_: return make_error_condition( not_enough_memory );
- case ERROR_PATH_NOT_FOUND_: return make_error_condition( no_such_file_or_directory );
- case ERROR_READ_FAULT_: return make_error_condition( io_error );
- case ERROR_RETRY_: return make_error_condition( resource_unavailable_try_again );
- case ERROR_SEEK_: return make_error_condition( io_error );
- case ERROR_SHARING_VIOLATION_: return make_error_condition( permission_denied );
- case ERROR_TOO_MANY_OPEN_FILES_: return make_error_condition( too_many_files_open );
- case ERROR_WRITE_FAULT_: return make_error_condition( io_error );
- case ERROR_WRITE_PROTECT_: return make_error_condition( permission_denied );
- case WSAEACCES_: return make_error_condition( permission_denied );
- case WSAEADDRINUSE_: return make_error_condition( address_in_use );
- case WSAEADDRNOTAVAIL_: return make_error_condition( address_not_available );
- case WSAEAFNOSUPPORT_: return make_error_condition( address_family_not_supported );
- case WSAEALREADY_: return make_error_condition( connection_already_in_progress );
- case WSAEBADF_: return make_error_condition( bad_file_descriptor );
- case WSAECONNABORTED_: return make_error_condition( connection_aborted );
- case WSAECONNREFUSED_: return make_error_condition( connection_refused );
- case WSAECONNRESET_: return make_error_condition( connection_reset );
- case WSAEDESTADDRREQ_: return make_error_condition( destination_address_required );
- case WSAEFAULT_: return make_error_condition( bad_address );
- case WSAEHOSTUNREACH_: return make_error_condition( host_unreachable );
- case WSAEINPROGRESS_: return make_error_condition( operation_in_progress );
- case WSAEINTR_: return make_error_condition( interrupted );
- case WSAEINVAL_: return make_error_condition( invalid_argument );
- case WSAEISCONN_: return make_error_condition( already_connected );
- case WSAEMFILE_: return make_error_condition( too_many_files_open );
- case WSAEMSGSIZE_: return make_error_condition( message_size );
- case WSAENAMETOOLONG_: return make_error_condition( filename_too_long );
- case WSAENETDOWN_: return make_error_condition( network_down );
- case WSAENETRESET_: return make_error_condition( network_reset );
- case WSAENETUNREACH_: return make_error_condition( network_unreachable );
- case WSAENOBUFS_: return make_error_condition( no_buffer_space );
- case WSAENOPROTOOPT_: return make_error_condition( no_protocol_option );
- case WSAENOTCONN_: return make_error_condition( not_connected );
- case WSAENOTSOCK_: return make_error_condition( not_a_socket );
- case WSAEOPNOTSUPP_: return make_error_condition( operation_not_supported );
- case WSAEPROTONOSUPPORT_: return make_error_condition( protocol_not_supported );
- case WSAEPROTOTYPE_: return make_error_condition( wrong_protocol_type );
- case WSAETIMEDOUT_: return make_error_condition( timed_out );
- case WSAEWOULDBLOCK_: return make_error_condition( operation_would_block );
- #endif
- default: return error_condition( ev, system_category() );
- }
- }
-
-# if !defined( BOOST_WINDOWS_API )
-
- BOOST_SYSTEM_DECL_ std::string system_error_category::message( int ev ) const
- {
- return generic_category().message( ev );
- }
-# else
-
- BOOST_SYSTEM_DECL_ std::string system_error_category::message( int ev ) const
- {
-#if defined(UNDER_CE) || BOOST_PLAT_WINDOWS_RUNTIME || defined(BOOST_NO_ANSI_APIS)
- std::wstring buf(128, wchar_t());
- for (;;)
- {
- boost::winapi::DWORD_ retval = boost::winapi::FormatMessageW(
- boost::winapi::FORMAT_MESSAGE_FROM_SYSTEM_ |
- boost::winapi::FORMAT_MESSAGE_IGNORE_INSERTS_,
- NULL,
- ev,
- boost::winapi::MAKELANGID_(boost::winapi::LANG_NEUTRAL_,
- boost::winapi::SUBLANG_DEFAULT_), // Default language
- &buf[0],
- static_cast<boost::winapi::DWORD_>(buf.size()),
- NULL
- );
-
- if (retval > 0)
- {
- buf.resize(retval);
- break;
- }
- else if (boost::winapi::GetLastError() !=
- boost::winapi::ERROR_INSUFFICIENT_BUFFER_)
- {
- return std::string("Unknown error");
- }
- else
- {
- buf.resize(buf.size() + buf.size() / 2);
- }
- }
-
- int num_chars = static_cast<int>(buf.size() + 1) * 2;
-
- boost::winapi::LPSTR_ narrow_buffer =
-#if defined(__GNUC__)
- (boost::winapi::LPSTR_)__builtin_alloca(num_chars);
-#else
- (boost::winapi::LPSTR_)_alloca(num_chars);
-#endif
-
- if (boost::winapi::WideCharToMultiByte(boost::winapi::CP_ACP_, 0,
- buf.c_str(), -1, narrow_buffer, num_chars, NULL, NULL) == 0)
- {
- return std::string("Unknown error");
- }
-
- std::string str( narrow_buffer );
-#else
- boost::winapi::LPVOID_ lpMsgBuf = 0;
- boost::winapi::DWORD_ retval = boost::winapi::FormatMessageA(
- boost::winapi::FORMAT_MESSAGE_ALLOCATE_BUFFER_ |
- boost::winapi::FORMAT_MESSAGE_FROM_SYSTEM_ |
- boost::winapi::FORMAT_MESSAGE_IGNORE_INSERTS_,
- NULL,
- ev,
- boost::winapi::MAKELANGID_(boost::winapi::LANG_NEUTRAL_,
- boost::winapi::SUBLANG_DEFAULT_), // Default language
- (boost::winapi::LPSTR_) &lpMsgBuf,
- 0,
- NULL
- );
- detail::local_free_on_destruction lfod(lpMsgBuf);
- if (retval == 0)
- return std::string("Unknown error");
-
- std::string str(static_cast<boost::winapi::LPCSTR_>(lpMsgBuf));
-# endif
- while ( str.size()
- && (str[str.size()-1] == '\n' || str[str.size()-1] == '\r') )
- str.erase( str.size()-1 );
- if ( str.size() && str[str.size()-1] == '.' )
- { str.erase( str.size()-1 ); }
- return str;
- }
-# endif
-
-#undef BOOST_SYSTEM_DECL_
-
-} // namespace detail
-
-
-# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
- BOOST_SYSTEM_DECL error_code throws; // "throw on error" special error_code;
- // note that it doesn't matter if this
- // isn't initialized before use since
- // the only use is to take its
- // address for comparison purposes
-# endif
-
-#if defined(BOOST_ERROR_CODE_HEADER_ONLY)
-
-// defined in error_code.hpp
-
-#elif defined(BOOST_SYSTEM_HAS_CONSTEXPR)
-
-namespace detail
-{
-
-BOOST_SYSTEM_REQUIRE_CONST_INIT BOOST_SYSTEM_DECL system_error_category system_category_instance;
-BOOST_SYSTEM_REQUIRE_CONST_INIT BOOST_SYSTEM_DECL generic_error_category generic_category_instance;
-
-BOOST_SYSTEM_DECL const error_category & system_category_ncx() BOOST_SYSTEM_NOEXCEPT
-{
- return system_category_instance;
-}
-
-BOOST_SYSTEM_DECL const error_category & generic_category_ncx() BOOST_SYSTEM_NOEXCEPT
-{
- return generic_category_instance;
-}
-
-} // namespace detail
-
-#else
-
-namespace detail
-{
-
-BOOST_SYSTEM_DECL const error_category & system_category_ncx() BOOST_SYSTEM_NOEXCEPT
-{
- static const detail::system_error_category system_category_instance;
- return system_category_instance;
-}
-
-BOOST_SYSTEM_DECL const error_category & generic_category_ncx() BOOST_SYSTEM_NOEXCEPT
-{
- static const detail::generic_error_category generic_category_instance;
- return generic_category_instance;
-}
-
-} // namespace detail
-
-#endif
-
-} // namespace system
-
-} // namespace boost
diff --git a/src/third_party/boost-1.68.0/boost/system/detail/local_free_on_destruction.hpp b/src/third_party/boost-1.68.0/boost/system/detail/local_free_on_destruction.hpp
deleted file mode 100644
index 9016e7402d1..00000000000
--- a/src/third_party/boost-1.68.0/boost/system/detail/local_free_on_destruction.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// local_free_on_exit.hpp ------------------------------------------------------------//
-
-// Copyright (c) 2003-2010 Christopher M. Kohlhoff (chris at kohlhoff dot com)
-// Copyright (c) 2010 Beman Dawes
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// This is derived from boost/asio/detail/local_free_on_block_exit.hpp to avoid
-// a dependency on asio. Thanks to Chris Kohlhoff for pointing it out.
-
-#ifndef BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
-#define BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
-
-#include <boost/winapi/local_memory.hpp>
-
-namespace boost {
-namespace system {
-namespace detail {
-
-class local_free_on_destruction
-{
-public:
- explicit local_free_on_destruction(void* p)
- : p_(p) {}
-
- ~local_free_on_destruction()
- {
- boost::winapi::LocalFree(p_);
- }
-
-private:
- void* p_;
- local_free_on_destruction(const local_free_on_destruction&); // = deleted
- local_free_on_destruction& operator=(const local_free_on_destruction&); // = deleted
-};
-
-} // namespace detail
-} // namespace system
-} // namespace boost
-
-#endif // BOOST_SYSTEM_LOCAL_FREE_ON_EXIT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/system/error_code.hpp b/src/third_party/boost-1.68.0/boost/system/error_code.hpp
deleted file mode 100644
index c70ea04b5e9..00000000000
--- a/src/third_party/boost-1.68.0/boost/system/error_code.hpp
+++ /dev/null
@@ -1,944 +0,0 @@
-// boost/system/error_code.hpp -------------------------------------------------------//
-
-// Copyright Beman Dawes 2006, 2007
-// Copyright Christoper Kohlhoff 2007
-// Copyright Peter Dimov 2017, 2018
-
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See library home page at http://www.boost.org/libs/system
-
-#ifndef BOOST_SYSTEM_ERROR_CODE_HPP
-#define BOOST_SYSTEM_ERROR_CODE_HPP
-
-#include <boost/system/config.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/assert.hpp>
-#include <boost/noncopyable.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <ostream>
-#include <string>
-#include <stdexcept>
-#include <functional>
-
-// TODO: undef these macros if not already defined
-#include <boost/cerrno.hpp>
-
-#if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API)
-# error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined
-#endif
-
-#ifndef BOOST_NO_CXX11_HDR_SYSTEM_ERROR
-#include <system_error>
-#endif
-
-#include <boost/config/abi_prefix.hpp> // must be the last #include
-
-#ifndef BOOST_SYSTEM_NOEXCEPT
-#define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT
-#endif
-
-#if !defined(BOOST_NO_CXX14_CONSTEXPR)
-# define BOOST_SYSTEM_HAS_CONSTEXPR
-#endif
-
-#if defined(__GNUC__) && (__GNUC__ == 7 && __GNUC_MINOR__ < 4) && __cplusplus >= 201700L
-// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83835
-# undef BOOST_SYSTEM_HAS_CONSTEXPR
-#endif
-
-#if defined(__clang__) && defined(_MSC_VER) && defined(_CPPLIB_VER)
-// Clang on Windows with MSVC headers, the constructor of std::error_category
-// is not constexpr at least up to VS2017 15.7.x (_MSVC_STL_UPDATE 201803)
-# undef BOOST_SYSTEM_HAS_CONSTEXPR
-#endif
-
-#if defined(__clang__) && defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 40900
-// The constructor of std::error_category is not constexpr in libstdc++ 4.8
-# undef BOOST_SYSTEM_HAS_CONSTEXPR
-#endif
-
-#if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
-# define BOOST_SYSTEM_CONSTEXPR constexpr
-#else
-# define BOOST_SYSTEM_CONSTEXPR
-#endif
-
-namespace boost
-{
- namespace system
- {
-
- class error_code; // values defined by the operating system
- class error_condition; // portable generic values defined below, but ultimately
- // based on the POSIX standard
-
- // "Concept" helpers -------------------------------------------------------------//
-
- template< class T >
- struct is_error_code_enum { static const bool value = false; };
-
- template< class T >
- struct is_error_condition_enum { static const bool value = false; };
-
- // generic error_conditions ------------------------------------------------------//
-
- namespace errc
- {
- enum errc_t
- {
- success = 0,
- address_family_not_supported = EAFNOSUPPORT,
- address_in_use = EADDRINUSE,
- address_not_available = EADDRNOTAVAIL,
- already_connected = EISCONN,
- argument_list_too_long = E2BIG,
- argument_out_of_domain = EDOM,
- bad_address = EFAULT,
- bad_file_descriptor = EBADF,
- bad_message = EBADMSG,
- broken_pipe = EPIPE,
- connection_aborted = ECONNABORTED,
- connection_already_in_progress = EALREADY,
- connection_refused = ECONNREFUSED,
- connection_reset = ECONNRESET,
- cross_device_link = EXDEV,
- destination_address_required = EDESTADDRREQ,
- device_or_resource_busy = EBUSY,
- directory_not_empty = ENOTEMPTY,
- executable_format_error = ENOEXEC,
- file_exists = EEXIST,
- file_too_large = EFBIG,
- filename_too_long = ENAMETOOLONG,
- function_not_supported = ENOSYS,
- host_unreachable = EHOSTUNREACH,
- identifier_removed = EIDRM,
- illegal_byte_sequence = EILSEQ,
- inappropriate_io_control_operation = ENOTTY,
- interrupted = EINTR,
- invalid_argument = EINVAL,
- invalid_seek = ESPIPE,
- io_error = EIO,
- is_a_directory = EISDIR,
- message_size = EMSGSIZE,
- network_down = ENETDOWN,
- network_reset = ENETRESET,
- network_unreachable = ENETUNREACH,
- no_buffer_space = ENOBUFS,
- no_child_process = ECHILD,
- no_link = ENOLINK,
- no_lock_available = ENOLCK,
- no_message_available = ENODATA,
- no_message = ENOMSG,
- no_protocol_option = ENOPROTOOPT,
- no_space_on_device = ENOSPC,
- no_stream_resources = ENOSR,
- no_such_device_or_address = ENXIO,
- no_such_device = ENODEV,
- no_such_file_or_directory = ENOENT,
- no_such_process = ESRCH,
- not_a_directory = ENOTDIR,
- not_a_socket = ENOTSOCK,
- not_a_stream = ENOSTR,
- not_connected = ENOTCONN,
- not_enough_memory = ENOMEM,
- not_supported = ENOTSUP,
- operation_canceled = ECANCELED,
- operation_in_progress = EINPROGRESS,
- operation_not_permitted = EPERM,
- operation_not_supported = EOPNOTSUPP,
- operation_would_block = EWOULDBLOCK,
- owner_dead = EOWNERDEAD,
- permission_denied = EACCES,
- protocol_error = EPROTO,
- protocol_not_supported = EPROTONOSUPPORT,
- read_only_file_system = EROFS,
- resource_deadlock_would_occur = EDEADLK,
- resource_unavailable_try_again = EAGAIN,
- result_out_of_range = ERANGE,
- state_not_recoverable = ENOTRECOVERABLE,
- stream_timeout = ETIME,
- text_file_busy = ETXTBSY,
- timed_out = ETIMEDOUT,
- too_many_files_open_in_system = ENFILE,
- too_many_files_open = EMFILE,
- too_many_links = EMLINK,
- too_many_symbolic_link_levels = ELOOP,
- value_too_large = EOVERFLOW,
- wrong_protocol_type = EPROTOTYPE
- };
-
- } // namespace errc
-
-# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
- namespace posix = errc;
- namespace posix_error = errc;
-# endif
-
- template<> struct is_error_condition_enum<errc::errc_t>
- { static const bool value = true; };
-
-
- // --------------------------------------------------------------------------------//
-
- // Operating system specific interfaces ------------------------------------------//
-
-
- // The interface is divided into general and system-specific portions to
- // meet these requirements:
- //
- // * Code calling an operating system API can create an error_code with
- // a single category (system_category), even for POSIX-like operating
- // systems that return some POSIX errno values and some native errno
- // values. This code should not have to pay the cost of distinguishing
- // between categories, since it is not yet known if that is needed.
- //
- // * Users wishing to write system-specific code should be given enums for
- // at least the common error cases.
- //
- // * System specific code should fail at compile time if moved to another
- // operating system.
-
- // The system specific portions of the interface are located in headers
- // with names reflecting the operating system. For example,
- //
- // <boost/system/cygwin_error.hpp>
- // <boost/system/linux_error.hpp>
- // <boost/system/windows_error.hpp>
- //
- // These headers are effectively empty for compiles on operating systems
- // where they are not applicable.
-
- // --------------------------------------------------------------------------------//
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-// 'this' : used in base member initializer list
-#pragma warning(disable: 4355)
-#endif
-
- // class error_category ------------------------------------------------//
-
- class error_category : public noncopyable
- {
-#ifndef BOOST_NO_CXX11_HDR_SYSTEM_ERROR
-
- private:
-
- class std_category: public std::error_category
- {
- private:
-
- boost::system::error_category const * pc_;
-
- public:
-
- BOOST_SYSTEM_CONSTEXPR explicit std_category( boost::system::error_category const * pc ): pc_( pc )
- {
- }
-
- virtual const char * name() const BOOST_NOEXCEPT
- {
- return pc_->name();
- }
-
- virtual std::string message( int ev ) const
- {
- return pc_->message( ev );
- }
-
- virtual std::error_condition default_error_condition( int ev ) const
- BOOST_NOEXCEPT;
- virtual bool equivalent( int code, const std::error_condition & condition ) const
- BOOST_NOEXCEPT;
- virtual bool equivalent( const std::error_code & code, int condition ) const
- BOOST_NOEXCEPT;
- };
-
- std_category std_cat_;
-
- public:
-
- BOOST_SYSTEM_CONSTEXPR error_category() BOOST_SYSTEM_NOEXCEPT: std_cat_( this ) {}
-
- operator std::error_category const & () const BOOST_SYSTEM_NOEXCEPT
- {
- // do not map generic to std::generic on purpose; occasionally,
- // there are two std::generic categories in a program, which leads
- // to error codes/conditions mysteriously not being equal to themselves
- return std_cat_;
- }
-
-#else
-
- // to maintain ABI compatibility between 03 and 11,
- // define a class with the same layout
-
- private:
-
- class std_category
- {
- private:
-
- boost::system::error_category const * pc_;
-
- public:
-
- BOOST_SYSTEM_CONSTEXPR explicit std_category( boost::system::error_category const * pc ): pc_( pc )
- {
- }
-
- virtual ~std_category() {}
-
- virtual const char * name() const BOOST_NOEXCEPT
- {
- return pc_->name();
- }
-
- // we can't define message, because (1) it returns an std::string,
- // which can be different between 03 and 11, and (2) on mingw, there
- // are actually two `message` functions, not one, so it doesn't work
- // even if we do
-
- // neither can we define default_error_condition or equivalent
-
- // if these functions are called, it will crash, but that's still
- // better than the alternative of having the class layout change
- };
-
- std_category std_cat_;
-
- public:
-
- BOOST_SYSTEM_CONSTEXPR error_category() BOOST_SYSTEM_NOEXCEPT: std_cat_( this ) {}
-
-#endif
-
- public:
- virtual ~error_category(){}
-
- virtual const char * name() const BOOST_SYSTEM_NOEXCEPT = 0;
- virtual std::string message( int ev ) const = 0;
- inline virtual error_condition default_error_condition( int ev ) const
- BOOST_SYSTEM_NOEXCEPT;
- inline virtual bool equivalent( int code,
- const error_condition & condition ) const
- BOOST_SYSTEM_NOEXCEPT;
- inline virtual bool equivalent( const error_code & code,
- int condition ) const BOOST_SYSTEM_NOEXCEPT;
- };
-
- BOOST_SYSTEM_CONSTEXPR inline bool operator==( const error_category & lhs,
- const error_category & rhs ) BOOST_SYSTEM_NOEXCEPT
- { return &lhs == &rhs; }
-
- BOOST_SYSTEM_CONSTEXPR inline bool operator!=( const error_category & lhs,
- const error_category & rhs ) BOOST_SYSTEM_NOEXCEPT
- { return &lhs != &rhs; }
-
- inline bool operator<( const error_category & lhs,
- const error_category & rhs ) BOOST_SYSTEM_NOEXCEPT
- { return std::less<const error_category*>()( &lhs, &rhs ); }
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
- // predefined error categories ---------------------------------------------------//
-
-namespace detail
-{
-
-#ifdef BOOST_ERROR_CODE_HEADER_ONLY
-# define BOOST_SYSTEM_DECL_
-#else
-# define BOOST_SYSTEM_DECL_ BOOST_SYSTEM_DECL
-#endif
-
-class generic_error_category: public error_category
-{
-public:
-
- // clang++ 3.8 and below: initialization of const object
- // requires a user-provided default constructor
- BOOST_SYSTEM_CONSTEXPR generic_error_category() BOOST_SYSTEM_NOEXCEPT
- {
- }
-
- const char * name() const BOOST_SYSTEM_NOEXCEPT
- {
- return "generic";
- }
-
- BOOST_SYSTEM_DECL_ std::string message( int ev ) const;
-};
-
-class system_error_category: public error_category
-{
-public:
-
- BOOST_SYSTEM_CONSTEXPR system_error_category() BOOST_SYSTEM_NOEXCEPT
- {
- }
-
- const char * name() const BOOST_SYSTEM_NOEXCEPT
- {
- return "system";
- }
-
- BOOST_SYSTEM_DECL_ std::string message( int ev ) const;
- BOOST_SYSTEM_DECL_ error_condition default_error_condition( int ev ) const BOOST_SYSTEM_NOEXCEPT;
-};
-
-#undef BOOST_SYSTEM_DECL_
-
-} // namespace detail
-
-#define BOOST_SYSTEM_REQUIRE_CONST_INIT
-
-#if defined(__has_cpp_attribute)
-#if __has_cpp_attribute(clang::require_constant_initialization)
-# undef BOOST_SYSTEM_REQUIRE_CONST_INIT
-# define BOOST_SYSTEM_REQUIRE_CONST_INIT [[clang::require_constant_initialization]]
-#endif
-#endif
-
-#if defined(BOOST_ERROR_CODE_HEADER_ONLY)
-
-# if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
-
-namespace detail
-{
-
-template<class T> struct cat_holder
-{
- static system_error_category system_category_instance;
- static generic_error_category generic_category_instance;
-};
-
-template<class T> BOOST_SYSTEM_REQUIRE_CONST_INIT system_error_category cat_holder<T>::system_category_instance;
-template<class T> BOOST_SYSTEM_REQUIRE_CONST_INIT generic_error_category cat_holder<T>::generic_category_instance;
-
-} // namespace detail
-
-constexpr const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
-{
- return detail::cat_holder<void>::system_category_instance;
-}
-
-constexpr const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
-{
- return detail::cat_holder<void>::generic_category_instance;
-}
-
-# else
-
-inline const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
-{
- static const detail::system_error_category system_category_instance;
- return system_category_instance;
-}
-
-inline const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
-{
- static const detail::generic_error_category generic_category_instance;
- return generic_category_instance;
-}
-
-# endif
-
-#elif defined(BOOST_SYSTEM_HAS_CONSTEXPR)
-
-namespace detail
-{
-
-#if defined(BOOST_SYSTEM_SOURCE)
-
-// clang++ requires a strictly matching declaration
-BOOST_SYSTEM_DECL extern system_error_category system_category_instance;
-BOOST_SYSTEM_DECL extern generic_error_category generic_category_instance;
-
-#else
-
-extern system_error_category system_category_instance;
-extern generic_error_category generic_category_instance;
-
-#endif
-
-} // namespace detail
-
-constexpr const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
-{
- return detail::system_category_instance;
-}
-
-constexpr const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
-{
- return detail::generic_category_instance;
-}
-
-#else
-
-namespace detail
-{
-
-BOOST_SYSTEM_DECL const error_category & system_category_ncx() BOOST_SYSTEM_NOEXCEPT;
-BOOST_SYSTEM_DECL const error_category & generic_category_ncx() BOOST_SYSTEM_NOEXCEPT;
-
-} // namespace detail
-
-inline const error_category & system_category() BOOST_SYSTEM_NOEXCEPT
-{
- return detail::system_category_ncx();
-}
-
-inline const error_category & generic_category() BOOST_SYSTEM_NOEXCEPT
-{
- return detail::generic_category_ncx();
-}
-
-#endif
-
- // deprecated synonyms ------------------------------------------------------------//
-
-#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
- inline const error_category & get_system_category() { return system_category(); }
- inline const error_category & get_generic_category() { return generic_category(); }
- inline const error_category & get_posix_category() { return generic_category(); }
- static const error_category & posix_category BOOST_ATTRIBUTE_UNUSED
- = generic_category();
- static const error_category & errno_ecat BOOST_ATTRIBUTE_UNUSED
- = generic_category();
- static const error_category & native_ecat BOOST_ATTRIBUTE_UNUSED
- = system_category();
-#endif
-
- // class error_condition ---------------------------------------------------------//
-
- // error_conditions are portable, error_codes are system or library specific
-
- class error_condition
- {
- public:
-
- // constructors:
- BOOST_SYSTEM_CONSTEXPR error_condition() BOOST_SYSTEM_NOEXCEPT : m_val(0), m_cat(&generic_category()) {}
- BOOST_SYSTEM_CONSTEXPR error_condition( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT
- : m_val(val), m_cat(&cat) {}
-
- template <class ErrorConditionEnum>
- error_condition(ErrorConditionEnum e,
- typename boost::enable_if<is_error_condition_enum<ErrorConditionEnum> >::type*
- = 0) BOOST_SYSTEM_NOEXCEPT
- {
- *this = make_error_condition(e);
- }
-
- // modifiers:
-
- BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT
- {
- m_val = val;
- m_cat = &cat;
- }
-
- template<typename ErrorConditionEnum>
- typename boost::enable_if<is_error_condition_enum<ErrorConditionEnum>,
- error_condition>::type &
- operator=( ErrorConditionEnum val ) BOOST_SYSTEM_NOEXCEPT
- {
- *this = make_error_condition(val);
- return *this;
- }
-
- BOOST_SYSTEM_CONSTEXPR void clear() BOOST_SYSTEM_NOEXCEPT
- {
- m_val = 0;
- m_cat = &generic_category();
- }
-
- // observers:
- BOOST_SYSTEM_CONSTEXPR int value() const BOOST_SYSTEM_NOEXCEPT { return m_val; }
- BOOST_SYSTEM_CONSTEXPR const error_category & category() const BOOST_SYSTEM_NOEXCEPT { return *m_cat; }
- std::string message() const { return m_cat->message(value()); }
-
-#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
-
- BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_SYSTEM_NOEXCEPT // true if error
- {
- return m_val != 0;
- }
-
-#else
-
- typedef void (*unspecified_bool_type)();
- static void unspecified_bool_true() {}
-
- BOOST_SYSTEM_CONSTEXPR operator unspecified_bool_type() const BOOST_SYSTEM_NOEXCEPT // true if error
- {
- return m_val == 0 ? 0 : unspecified_bool_true;
- }
-
- BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_SYSTEM_NOEXCEPT // true if no error
- {
- return m_val == 0;
- }
-
-#endif
-
- // relationals:
- // the more symmetrical non-member syntax allows enum
- // conversions work for both rhs and lhs.
- BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_condition & lhs,
- const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT
- {
- return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val;
- }
-
- inline friend bool operator<( const error_condition & lhs,
- const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT
- // the more symmetrical non-member syntax allows enum
- // conversions work for both rhs and lhs.
- {
- return lhs.m_cat < rhs.m_cat
- || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val);
- }
-
-#ifndef BOOST_NO_CXX11_HDR_SYSTEM_ERROR
-
- operator std::error_condition () const BOOST_SYSTEM_NOEXCEPT
- {
- return std::error_condition( value(), category() );
- }
-
-#endif
-
- private:
- int m_val;
- const error_category * m_cat;
-
- };
-
- // class error_code --------------------------------------------------------------//
-
- // We want error_code to be a value type that can be copied without slicing
- // and without requiring heap allocation, but we also want it to have
- // polymorphic behavior based on the error category. This is achieved by
- // abstract base class error_category supplying the polymorphic behavior,
- // and error_code containing a pointer to an object of a type derived
- // from error_category.
- class error_code
- {
- public:
-
- // constructors:
- BOOST_SYSTEM_CONSTEXPR error_code() BOOST_SYSTEM_NOEXCEPT : m_val(0), m_cat(&system_category()) {}
- BOOST_SYSTEM_CONSTEXPR error_code( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT
- : m_val(val), m_cat(&cat) {}
-
- template <class ErrorCodeEnum>
- error_code(ErrorCodeEnum e,
- typename boost::enable_if<is_error_code_enum<ErrorCodeEnum> >::type* = 0)
- BOOST_SYSTEM_NOEXCEPT
- {
- *this = make_error_code(e);
- }
-
- // modifiers:
- BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) BOOST_SYSTEM_NOEXCEPT
- {
- m_val = val;
- m_cat = &cat;
- }
-
- template<typename ErrorCodeEnum>
- typename boost::enable_if<is_error_code_enum<ErrorCodeEnum>, error_code>::type &
- operator=( ErrorCodeEnum val ) BOOST_SYSTEM_NOEXCEPT
- {
- *this = make_error_code(val);
- return *this;
- }
-
- BOOST_SYSTEM_CONSTEXPR void clear() BOOST_SYSTEM_NOEXCEPT
- {
- m_val = 0;
- m_cat = &system_category();
- }
-
- // observers:
- BOOST_SYSTEM_CONSTEXPR int value() const BOOST_SYSTEM_NOEXCEPT { return m_val; }
- BOOST_SYSTEM_CONSTEXPR const error_category & category() const BOOST_SYSTEM_NOEXCEPT { return *m_cat; }
- error_condition default_error_condition() const BOOST_SYSTEM_NOEXCEPT
- { return m_cat->default_error_condition(value()); }
- std::string message() const { return m_cat->message(value()); }
-
-#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
-
- BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_SYSTEM_NOEXCEPT // true if error
- {
- return m_val != 0;
- }
-
-#else
-
- typedef void (*unspecified_bool_type)();
- static void unspecified_bool_true() {}
-
- BOOST_SYSTEM_CONSTEXPR operator unspecified_bool_type() const BOOST_SYSTEM_NOEXCEPT // true if error
- {
- return m_val == 0 ? 0 : unspecified_bool_true;
- }
-
- BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_SYSTEM_NOEXCEPT // true if no error
- {
- return m_val == 0;
- }
-
-#endif
-
- // relationals:
- BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_code & lhs,
- const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT
- // the more symmetrical non-member syntax allows enum
- // conversions work for both rhs and lhs.
- {
- return lhs.m_cat == rhs.m_cat && lhs.m_val == rhs.m_val;
- }
-
- inline friend bool operator<( const error_code & lhs,
- const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT
- // the more symmetrical non-member syntax allows enum
- // conversions work for both rhs and lhs.
- {
- return lhs.m_cat < rhs.m_cat
- || (lhs.m_cat == rhs.m_cat && lhs.m_val < rhs.m_val);
- }
-
-#ifndef BOOST_NO_CXX11_HDR_SYSTEM_ERROR
-
- operator std::error_code () const BOOST_SYSTEM_NOEXCEPT
- {
- return std::error_code( value(), category() );
- }
-
-#endif
-
- private:
- int m_val;
- const error_category * m_cat;
-
- };
-
- // predefined error_code object used as "throw on error" tag
-# ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
- BOOST_SYSTEM_DECL extern error_code throws;
-# endif
-
- // Moving from a "throws" object to a "throws" function without breaking
- // existing code is a bit of a problem. The workaround is to place the
- // "throws" function in namespace boost rather than namespace boost::system.
-
- } // namespace system
-
- namespace detail
- {
- // Misuse of the error_code object is turned into a noisy failure by
- // poisoning the reference. This particular implementation doesn't
- // produce warnings or errors from popular compilers, is very efficient
- // (as determined by inspecting generated code), and does not suffer
- // from order of initialization problems. In practice, it also seems
- // cause user function error handling implementation errors to be detected
- // very early in the development cycle.
- inline system::error_code* throws()
- {
- // See github.com/boostorg/system/pull/12 by visigoth for why the return
- // is poisoned with nonzero rather than (0). A test, test_throws_usage(),
- // has been added to error_code_test.cpp, and as visigoth mentioned it
- // fails on clang for release builds with a return of 0 but works fine
- // with (1).
- // Since the undefined behavior sanitizer (-fsanitize=undefined) does not
- // allow a reference to be formed to the unaligned address of (1), we use
- // (8) instead.
- return reinterpret_cast<system::error_code*>(8);
- }
- }
-
- inline system::error_code& throws()
- { return *detail::throws(); }
-
- namespace system
- {
- // non-member functions ------------------------------------------------//
-
- BOOST_SYSTEM_CONSTEXPR inline bool operator!=( const error_code & lhs,
- const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT
- {
- return !(lhs == rhs);
- }
-
- BOOST_SYSTEM_CONSTEXPR inline bool operator!=( const error_condition & lhs,
- const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT
- {
- return !(lhs == rhs);
- }
-
- inline bool operator==( const error_code & code,
- const error_condition & condition ) BOOST_SYSTEM_NOEXCEPT
- {
- return code.category().equivalent( code.value(), condition )
- || condition.category().equivalent( code, condition.value() );
- }
-
- inline bool operator!=( const error_code & lhs,
- const error_condition & rhs ) BOOST_SYSTEM_NOEXCEPT
- {
- return !(lhs == rhs);
- }
-
- inline bool operator==( const error_condition & condition,
- const error_code & code ) BOOST_SYSTEM_NOEXCEPT
- {
- return condition.category().equivalent( code, condition.value() )
- || code.category().equivalent( code.value(), condition );
- }
-
- inline bool operator!=( const error_condition & lhs,
- const error_code & rhs ) BOOST_SYSTEM_NOEXCEPT
- {
- return !(lhs == rhs);
- }
-
- // TODO: both of these may move elsewhere, but the LWG hasn't spoken yet.
-
- template <class charT, class traits>
- inline std::basic_ostream<charT,traits>&
- operator<< (std::basic_ostream<charT,traits>& os, error_code ec)
- {
- os << ec.category().name() << ':' << ec.value();
- return os;
- }
-
- inline std::size_t hash_value( const error_code & ec )
- {
- return static_cast<std::size_t>(ec.value())
- + reinterpret_cast<std::size_t>(&ec.category());
- }
-
- // make_* functions for errc::errc_t ---------------------------------------------//
-
- namespace errc
- {
- // explicit conversion:
- inline error_code make_error_code( errc_t e ) BOOST_SYSTEM_NOEXCEPT
- { return error_code( e, generic_category() ); }
-
- // implicit conversion:
- inline error_condition make_error_condition( errc_t e ) BOOST_SYSTEM_NOEXCEPT
- { return error_condition( e, generic_category() ); }
- }
-
- // error_category default implementation -----------------------------------------//
-
- error_condition error_category::default_error_condition( int ev ) const
- BOOST_SYSTEM_NOEXCEPT
- {
- return error_condition( ev, *this );
- }
-
- bool error_category::equivalent( int code,
- const error_condition & condition ) const BOOST_SYSTEM_NOEXCEPT
- {
- return default_error_condition( code ) == condition;
- }
-
- bool error_category::equivalent( const error_code & code,
- int condition ) const BOOST_SYSTEM_NOEXCEPT
- {
- return *this == code.category() && code.value() == condition;
- }
-
-#ifndef BOOST_NO_CXX11_HDR_SYSTEM_ERROR
-
- inline std::error_condition error_category::std_category::default_error_condition(
- int ev ) const BOOST_NOEXCEPT
- {
- return pc_->default_error_condition( ev );
- }
-
- inline bool error_category::std_category::equivalent( int code,
- const std::error_condition & condition ) const BOOST_NOEXCEPT
- {
- if( condition.category() == *this )
- {
- boost::system::error_condition bn( condition.value(), *pc_ );
- return pc_->equivalent( code, bn );
- }
- else if( condition.category() == std::generic_category()
- || condition.category() == boost::system::generic_category() )
- {
- boost::system::error_condition bn( condition.value(),
- boost::system::generic_category() );
-
- return pc_->equivalent( code, bn );
- }
-#ifndef BOOST_NO_RTTI
- else if( std_category const* pc2 = dynamic_cast< std_category const* >(
- &condition.category() ) )
- {
- boost::system::error_condition bn( condition.value(), *pc2->pc_ );
- return pc_->equivalent( code, bn );
- }
-#endif
- else
- {
- return default_error_condition( code ) == condition;
- }
- }
-
- inline bool error_category::std_category::equivalent( const std::error_code & code,
- int condition ) const BOOST_NOEXCEPT
- {
- if( code.category() == *this )
- {
- boost::system::error_code bc( code.value(), *pc_ );
- return pc_->equivalent( bc, condition );
- }
- else if( code.category() == std::generic_category()
- || code.category() == boost::system::generic_category() )
- {
- boost::system::error_code bc( code.value(),
- boost::system::generic_category() );
-
- return pc_->equivalent( bc, condition );
- }
-#ifndef BOOST_NO_RTTI
- else if( std_category const* pc2 = dynamic_cast< std_category const* >(
- &code.category() ) )
- {
- boost::system::error_code bc( code.value(), *pc2->pc_ );
- return pc_->equivalent( bc, condition );
- }
-#endif
- else if( *pc_ == boost::system::generic_category() )
- {
- return std::generic_category().equivalent( code, condition );
- }
- else
- {
- return false;
- }
- }
-
-#endif
-
- } // namespace system
-} // namespace boost
-
-#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
-
-# ifdef BOOST_ERROR_CODE_HEADER_ONLY
-# include <boost/system/detail/error_code.ipp>
-# endif
-
-#endif // BOOST_SYSTEM_ERROR_CODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/system/system_error.hpp b/src/third_party/boost-1.68.0/boost/system/system_error.hpp
deleted file mode 100644
index 694bb12f5fb..00000000000
--- a/src/third_party/boost-1.68.0/boost/system/system_error.hpp
+++ /dev/null
@@ -1,84 +0,0 @@
-// Boost system_error.hpp --------------------------------------------------//
-
-// Copyright Beman Dawes 2006
-
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_SYSTEM_SYSTEM_ERROR_HPP
-#define BOOST_SYSTEM_SYSTEM_ERROR_HPP
-
-#include <boost/system/error_code.hpp>
-#include <string>
-#include <stdexcept>
-#include <cassert>
-
-namespace boost
-{
- namespace system
- {
- // class system_error ------------------------------------------------------------//
-
- class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error
- // BOOST_SYMBOL_VISIBLE is needed by GCC to ensure system_error thrown from a shared
- // library can be caught. See svn.boost.org/trac/boost/ticket/3697
- {
- public:
- system_error( error_code ec )
- : std::runtime_error(""), m_error_code(ec) {}
-
- system_error( error_code ec, const std::string & what_arg )
- : std::runtime_error(what_arg), m_error_code(ec) {}
-
- system_error( error_code ec, const char* what_arg )
- : std::runtime_error(what_arg), m_error_code(ec) {}
-
- system_error( int ev, const error_category & ecat )
- : std::runtime_error(""), m_error_code(ev,ecat) {}
-
- system_error( int ev, const error_category & ecat,
- const std::string & what_arg )
- : std::runtime_error(what_arg), m_error_code(ev,ecat) {}
-
- system_error( int ev, const error_category & ecat,
- const char * what_arg )
- : std::runtime_error(what_arg), m_error_code(ev,ecat) {}
-
- virtual ~system_error() BOOST_NOEXCEPT_OR_NOTHROW {}
-
- const error_code & code() const BOOST_NOEXCEPT_OR_NOTHROW { return m_error_code; }
- const char * what() const BOOST_NOEXCEPT_OR_NOTHROW;
-
- private:
- error_code m_error_code;
- mutable std::string m_what;
- };
-
- // implementation ------------------------------------------------------//
-
- inline const char * system_error::what() const BOOST_NOEXCEPT_OR_NOTHROW
- // see http://www.boost.org/more/error_handling.html for lazy build rationale
- {
- if ( m_what.empty() )
- {
-#ifndef BOOST_NO_EXCEPTIONS
- try
-#endif
- {
- m_what = this->std::runtime_error::what();
- if ( !m_what.empty() ) m_what += ": ";
- m_what += m_error_code.message();
- }
-#ifndef BOOST_NO_EXCEPTIONS
- catch (...) { return std::runtime_error::what(); }
-#endif
- }
- return m_what.c_str();
- }
-
- } // namespace system
-} // namespace boost
-
-#endif // BOOST_SYSTEM_SYSTEM_ERROR_HPP
-
-
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/enable_warnings.hpp b/src/third_party/boost-1.68.0/boost/test/detail/enable_warnings.hpp
deleted file mode 100644
index 45afb319446..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/detail/enable_warnings.hpp
+++ /dev/null
@@ -1,36 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief enable previously suppressed warnings
-// ***************************************************************************
-
-#ifdef BOOST_MSVC
-# pragma warning(default: 4511) // copy constructor can't not be generated
-# pragma warning(default: 4512) // assignment operator can't not be generated
-# pragma warning(default: 4100) // unreferenced formal parameter
-# pragma warning(default: 4996) // <symbol> was declared deprecated
-# pragma warning(default: 4355) // 'this' : used in base member initializer list
-# pragma warning(default: 4706) // assignment within conditional expression
-# pragma warning(default: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
-# pragma warning(default: 4127) // conditional expression is constant
-# pragma warning(default: 4290) // C++ exception specification ignored except to ...
-# pragma warning(default: 4180) // qualifier applied to function type has no meaning; ignored
-# pragma warning(default: 4275) // non dll-interface class ... used as base for dll-interface class ...
-# pragma warning(default: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
-# pragma warning(default: 4511) // 'class' : copy constructor could not be generated
-# pragma warning(pop)
-#endif
-
-#if BOOST_CLANG
-#pragma clang diagnostic pop
-#endif
-
-#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 6 * 100)
-# pragma GCC diagnostic pop
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/global_typedef.hpp b/src/third_party/boost-1.68.0/boost/test/detail/global_typedef.hpp
deleted file mode 100644
index aeede00e9ca..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/detail/global_typedef.hpp
+++ /dev/null
@@ -1,111 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief some trivial global typedefs
-// ***************************************************************************
-
-#ifndef BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
-#define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
-
-#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
-#include <boost/test/detail/workaround.hpp>
-
-#define BOOST_TEST_L( s ) ::boost::unit_test::const_string( s, sizeof( s ) - 1 )
-#define BOOST_TEST_STRINGIZE( s ) BOOST_TEST_L( BOOST_STRINGIZE( s ) )
-#define BOOST_TEST_EMPTY_STRING BOOST_TEST_L( "" )
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-typedef unsigned long counter_t;
-
-//____________________________________________________________________________//
-
-enum report_level { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT };
-
-//____________________________________________________________________________//
-
-//! Indicates the output format for the loggers or the test tree printing
-enum output_format { OF_INVALID,
- OF_CLF, ///< compiler log format
- OF_XML, ///< XML format for report and log,
- OF_JUNIT, ///< JUNIT format for report and log,
- OF_CUSTOM_LOGGER, ///< User specified logger.
- OF_DOT ///< dot format for output content
-};
-
-//____________________________________________________________________________//
-
-enum test_unit_type { TUT_CASE = 0x01, TUT_SUITE = 0x10, TUT_ANY = 0x11 };
-
-//____________________________________________________________________________//
-
-enum assertion_result { AR_FAILED, AR_PASSED, AR_TRIGGERED };
-
-//____________________________________________________________________________//
-
-typedef unsigned long test_unit_id;
-
-const test_unit_id INV_TEST_UNIT_ID = 0xFFFFFFFF;
-const test_unit_id MAX_TEST_CASE_ID = 0xFFFFFFFE;
-const test_unit_id MIN_TEST_CASE_ID = 0x00010000;
-const test_unit_id MAX_TEST_SUITE_ID = 0x0000FF00;
-const test_unit_id MIN_TEST_SUITE_ID = 0x00000001;
-
-//____________________________________________________________________________//
-
-namespace ut_detail {
-
-inline test_unit_type
-test_id_2_unit_type( test_unit_id id )
-{
- return (id & 0xFFFF0000) != 0 ? TUT_CASE : TUT_SUITE;
-}
-
-//! Helper class for restoring the current test unit ID in a RAII manner
-struct test_unit_id_restore {
- test_unit_id_restore(test_unit_id& to_restore_, test_unit_id new_value)
- : to_restore(to_restore_)
- , bkup(to_restore_) {
- to_restore = new_value;
- }
- ~test_unit_id_restore() {
- to_restore = bkup;
- }
-private:
- test_unit_id& to_restore;
- test_unit_id bkup;
-};
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-// helper templates to prevent ODR violations
-template<class T>
-struct static_constant {
- static T value;
-};
-
-template<class T>
-T static_constant<T>::value;
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/suppress_warnings.hpp b/src/third_party/boost-1.68.0/boost/test/detail/suppress_warnings.hpp
deleted file mode 100644
index 4badf207581..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/detail/suppress_warnings.hpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief suppress some warnings
-// ***************************************************************************
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable: 4511) // copy constructor can't not be generated
-# pragma warning(disable: 4512) // assignment operator can't not be generated
-# pragma warning(disable: 4100) // unreferenced formal parameter
-# pragma warning(disable: 4996) // <symbol> was declared deprecated
-# pragma warning(disable: 4355) // 'this' : used in base member initializer list
-# pragma warning(disable: 4706) // assignment within conditional expression
-# pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
-# pragma warning(disable: 4127) // conditional expression is constant
-# pragma warning(disable: 4290) // C++ exception specification ignored except to ...
-# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
-# pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
-# pragma warning(disable: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
-# pragma warning(disable: 4511) // 'class' : copy constructor could not be generated
-#endif
-
-#if BOOST_CLANG
-# pragma clang diagnostic push
-# pragma clang diagnostic ignored "-Wvariadic-macros"
-#endif
-
-#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 6 * 100)
-# pragma GCC diagnostic push
-# pragma GCC diagnostic ignored "-Wvariadic-macros"
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/throw_exception.hpp b/src/third_party/boost-1.68.0/boost/test/detail/throw_exception.hpp
deleted file mode 100644
index 3f2f4687d34..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/detail/throw_exception.hpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief contains wrappers, which allows to build Boost.Test with no exception
-// ***************************************************************************
-
-#ifndef BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP
-#define BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP
-
-// Boost
-#include <boost/config.hpp> // BOOST_NO_EXCEPTIONS
-
-#ifdef BOOST_NO_EXCEPTIONS
-// C RUNTIME
-#include <stdlib.h>
-
-#endif
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace ut_detail {
-
-#ifdef BOOST_NO_EXCEPTIONS
-
-template<typename E>
-BOOST_NORETURN inline void
-throw_exception(E const& e) { abort(); }
-
-#define BOOST_TEST_I_TRY
-#define BOOST_TEST_I_CATCH( T, var ) for(T const& var = *(T*)0; false;)
-#define BOOST_TEST_I_CATCH0( T ) if(0)
-#define BOOST_TEST_I_CATCHALL() if(0)
-#define BOOST_TEST_I_RETHROW
-
-#else
-
-template<typename E>
-BOOST_NORETURN inline void
-throw_exception(E const& e) { throw e; }
-
-#define BOOST_TEST_I_TRY try
-#define BOOST_TEST_I_CATCH( T, var ) catch( T const& var )
-#define BOOST_TEST_I_CATCH0( T ) catch( T const& )
-#define BOOST_TEST_I_CATCHALL() catch(...)
-#define BOOST_TEST_I_RETHROW throw
-#endif
-
-//____________________________________________________________________________//
-
-#define BOOST_TEST_I_THROW( E ) unit_test::ut_detail::throw_exception( E )
-#define BOOST_TEST_I_ASSRT( cond, ex ) if( cond ) {} else BOOST_TEST_I_THROW( ex )
-
-
-} // namespace ut_detail
-} // namespace unit_test
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/execution_monitor.hpp b/src/third_party/boost-1.68.0/boost/test/execution_monitor.hpp
deleted file mode 100644
index eb3b21c6dc0..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/execution_monitor.hpp
+++ /dev/null
@@ -1,583 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// (C) Copyright Beman Dawes 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief Defines public interface of the Execution Monitor and related classes
-// ***************************************************************************
-
-#ifndef BOOST_TEST_EXECUTION_MONITOR_HPP_071894GER
-#define BOOST_TEST_EXECUTION_MONITOR_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-#include <boost/test/detail/throw_exception.hpp>
-
-#include <boost/test/utils/class_properties.hpp>
-
-// Boost
-#include <boost/shared_ptr.hpp>
-#include <boost/scoped_array.hpp>
-#include <boost/type.hpp>
-#include <boost/cstdlib.hpp>
-#include <boost/function/function0.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-#ifdef BOOST_SEH_BASED_SIGNAL_HANDLING
-
-// for the FP constants and control routines
-#include <float.h>
-
-#ifndef EM_INVALID
-#define EM_INVALID _EM_INVALID
-#endif
-
-#ifndef EM_DENORMAL
-#define EM_DENORMAL _EM_DENORMAL
-#endif
-
-#ifndef EM_ZERODIVIDE
-#define EM_ZERODIVIDE _EM_ZERODIVIDE
-#endif
-
-#ifndef EM_OVERFLOW
-#define EM_OVERFLOW _EM_OVERFLOW
-#endif
-
-#ifndef EM_UNDERFLOW
-#define EM_UNDERFLOW _EM_UNDERFLOW
-#endif
-
-#ifndef MCW_EM
-#define MCW_EM _MCW_EM
-#endif
-
-#else // based on ISO C standard
-
-#if !defined(BOOST_NO_FENV_H)
- #include <boost/detail/fenv.hpp>
-#endif
-
-#endif
-
-#if defined(BOOST_SEH_BASED_SIGNAL_HANDLING) && !defined(UNDER_CE)
- //! Indicates tha the floating point exception handling is supported
- //! through SEH
- #define BOOST_TEST_FPE_SUPPORT_WITH_SEH__
-#elif !defined(BOOST_SEH_BASED_SIGNAL_HANDLING) && !defined(UNDER_CE)
- #if !defined(BOOST_NO_FENV_H) && !defined(BOOST_CLANG) && \
- defined(__GLIBC__) && defined(__USE_GNU) && \
- !(defined(__UCLIBC__) || defined(__nios2__) || defined(__microblaze__))
- //! Indicates that floating point exception handling is supported for the
- //! non SEH version of it, for the GLIBC extensions only
- // see dicussions on the related topic: https://svn.boost.org/trac/boost/ticket/11756
- #define BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__
- #endif
-#endif
-
-
-// Additional macro documentations not being generated without this hack
-#ifdef BOOST_TEST_DOXYGEN_DOC__
-
-//! Disables the support of the alternative stack
-//! during the compilation of the Boost.test framework. This is especially useful
-//! in case it is not possible to detect the lack of alternative stack support for
-//! your compiler (for instance, ESXi).
-#define BOOST_TEST_DISABLE_ALT_STACK
-
-#endif
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-/// @defgroup ExecutionMonitor Function Execution Monitor
-/// @{
-/// @section Intro Introduction
-/// Sometimes we need to call a function and make sure that no user or system originated exceptions are being thrown by it. Uniform exception reporting
-/// is also may be convenient. That's the purpose of the Boost.Test's Execution Monitor.
-///
-/// The Execution Monitor is a lower-level component of the Boost Test Library. It is the base for implementing all other Boost.Test components, but also
-/// can be used standalone to get controlled execution of error-prone functions with a uniform error notification. The Execution Monitor calls a user-supplied
-/// function in a controlled environment, relieving users from messy error detection.
-///
-/// The Execution Monitor usage is demonstrated in the example exec_mon_example.
-///
-/// @section DesignRationale Design Rationale
-///
-/// The Execution Monitor design assumes that it can be used when no (or almost no) memory available. Also the Execution Monitor is intended to be portable to as many platforms as possible.
-///
-/// @section UserGuide User's guide
-/// The Execution Monitor is designed to solve the problem of executing potentially dangerous function that may result in any number of error conditions,
-/// in monitored environment that should prevent any undesirable exceptions to propagate out of function call and produce consistent result report for all outcomes.
-/// The Execution Monitor is able to produce informative report for all standard C++ exceptions and intrinsic types. All other exceptions are reported as unknown.
-/// If you prefer different message for your exception type or need to perform any action, the Execution Monitor supports custom exception translators.
-/// There are several other parameters of the monitored environment can be configured by setting appropriate properties of the Execution Monitor.
-///
-/// All symbols in the Execution Monitor implementation are located in the namespace boost. To use the Execution Monitor you need to:
-/// -# include @c boost/test/execution_monitor.hpp
-/// -# Make an instance of execution_monitor.
-/// -# Optionally register custom exception translators for exception classes which require special processing.
-///
-/// @subsection FuncExec Monitored function execution
-///
-/// The class execution_monitor can monitor functions with the following signatures:
-/// - int ()
-/// - void ()
-///
-/// This function is expected to be self sufficient part of your application. You can't pass any arguments to this function directly. Instead you
-/// should bind them into executable nullary function using bind function (either standard or boost variant). Neither you can return any other value,
-/// but an integer result code. If necessary you can bind output parameters by reference or use some other more complicated nullary functor, which
-/// maintains state. This includes class methods, static class methods etc.
-///
-/// To start the monitored function, invoke the method execution_monitor::execute and pass the monitored function as an argument. If the call succeeds,
-/// the method returns the result code produced by the monitored function. If any of the following conditions occur:
-/// - Uncaught C++ exception
-/// - Hardware or software signal, trap, or other exception
-/// - Timeout reached
-/// - Debug assert event occurred (under Microsoft Visual C++ or compatible compiler)
-///
-/// then the method throws the execution_exception. The exception contains unique error_code value identifying the error condition and the detailed message
-/// that can be used to report the error.
-///
-/// @subsection Reporting Errors reporting and translation
-///
-/// If you need to report an error inside monitored function execution you have to throw an exception. Do not use the execution_exception - it's not intended
-/// to be used for this purpose. The simplest choice is to use one of the following C++ types as an exception:
-/// - C string
-/// - std:string
-/// - any exception class in std::exception hierarchy
-/// - boost::exception
-///
-/// execution_monitor will catch and report these types of exceptions. If exception is thrown which is unknown to execution_monitor, it can only
-/// report the fact of the exception. So in case if you prefer to use your own exception types or can't govern what exceptions are generated by monitored
-/// function and would like to see proper error message in a report, execution_monitor can be configured with custom "translator" routine, which will have
-/// a chance to either record the fact of the exception itself or translate it into one of standard exceptions and rethrow (or both). The translator routine
-/// is registered per exception type and is invoked when exception of this class (or one inherited from it) is thrown inside monitored routine. You can
-/// register as many independent translators as you like. See execution_monitor::register_exception_translator specification for requirements on translator
-/// function.
-///
-/// Finally, if you need to abort the monitored function execution without reporting any errors, you can throw an exception execution_aborted. As a result
-/// the execution is aborted and zero result code is produced by the method execution_monitor::execute.
-///
-/// @subsection Parameters Supported parameters
-///
-/// The Execution Monitor behavior is configurable through the set of parameters (properties) associated with the instance of the monitor. See execution_monitor
-/// specification for a list of supported parameters and their semantic.
-
-// ************************************************************************** //
-// ************** detail::translator_holder_base ************** //
-// ************************************************************************** //
-
-namespace detail {
-
-class translator_holder_base;
-typedef boost::shared_ptr<translator_holder_base> translator_holder_base_ptr;
-
-class BOOST_TEST_DECL translator_holder_base {
-protected:
- typedef boost::unit_test::const_string const_string;
-public:
- // Constructor
- translator_holder_base( translator_holder_base_ptr next, const_string tag )
- : m_next( next )
- , m_tag( std::string() + tag )
- {
- }
-
- // Destructor
- virtual ~translator_holder_base() {}
-
- // translator holder interface
- // invokes the function F inside the try/catch guarding against specific exception
- virtual int operator()( boost::function<int ()> const& F ) = 0;
-
- // erases specific translator holder from the chain
- translator_holder_base_ptr erase( translator_holder_base_ptr this_, const_string tag )
- {
- if( m_next )
- m_next = m_next->erase( m_next, tag );
-
- return m_tag == tag ? m_next : this_;
- }
-#ifndef BOOST_NO_RTTI
- virtual translator_holder_base_ptr erase( translator_holder_base_ptr this_, std::type_info const& ) = 0;
- template<typename ExceptionType>
- translator_holder_base_ptr erase( translator_holder_base_ptr this_, boost::type<ExceptionType>* = 0 )
- {
- if( m_next )
- m_next = m_next->erase<ExceptionType>( m_next );
-
- return erase( this_, typeid(ExceptionType) );
- }
-#endif
-
-protected:
- // Data members
- translator_holder_base_ptr m_next;
- std::string m_tag;
-};
-
-} // namespace detail
-
-// ************************************************************************** //
-/// @class execution_exception
-/// @brief This class is used to report any kind of an failure during execution of a monitored function inside of execution_monitor
-///
-/// The instance of this class is thrown out of execution_monitor::execute invocation when failure is detected. Regardless of a kind of failure occurred
-/// the instance will provide a uniform way to catch and report it.
-///
-/// One important design rationale for this class is that we should be ready to work after fatal memory corruptions or out of memory conditions. To facilitate
-/// this class never allocates any memory and assumes that strings it refers to are either some constants or live in a some kind of persistent (preallocated) memory.
-// ************************************************************************** //
-
-class BOOST_TEST_DECL execution_exception {
- typedef boost::unit_test::const_string const_string;
-public:
- /// These values are sometimes used as program return codes.
- /// The particular values have been chosen to avoid conflicts with
- /// commonly used program return codes: values < 100 are often user
- /// assigned, values > 255 are sometimes used to report system errors.
- /// Gaps in values allow for orderly expansion.
- ///
- /// @note(1) Only uncaught C++ exceptions are treated as errors.
- /// If a function catches a C++ exception, it never reaches
- /// the execution_monitor.
- ///
- /// The implementation decides what is a system_fatal_error and what is
- /// just a system_exception. Fatal errors are so likely to have corrupted
- /// machine state (like a stack overflow or addressing exception) that it
- /// is unreasonable to continue execution.
- ///
- /// @note(2) These errors include Unix signals and Windows structured
- /// exceptions. They are often initiated by hardware traps.
- enum error_code {
- no_error = 0, ///< for completeness only; never returned
- user_error = 200, ///< user reported non-fatal error
- cpp_exception_error = 205, ///< see note (1) above
- system_error = 210, ///< see note (2) above
- timeout_error = 215, ///< only detectable on certain platforms
- user_fatal_error = 220, ///< user reported fatal error
- system_fatal_error = 225 ///< see note (2) above
- };
-
- /// Simple model for the location of failure in a source code
- struct BOOST_TEST_DECL location {
- explicit location( char const* file_name = 0, size_t line_num = 0, char const* func = 0 );
- explicit location( const_string file_name, size_t line_num = 0, char const* func = 0 );
-
- const_string m_file_name; ///< File name
- size_t m_line_num; ///< Line number
- const_string m_function; ///< Function name
- };
-
- /// @name Constructors
-
- /// Constructs instance based on message, location and error code
-
- /// @param[in] ec error code
- /// @param[in] what_msg error message
- /// @param[in] location error location
- execution_exception( error_code ec, const_string what_msg, location const& location );
-
- /// @name Access methods
-
- /// Exception error code
- error_code code() const { return m_error_code; }
- /// Exception message
- const_string what() const { return m_what; }
- /// Exception location
- location const& where() const { return m_location; }
- ///@}
-
-private:
- // Data members
- error_code m_error_code;
- const_string m_what;
- location m_location;
-}; // execution_exception
-
-// ************************************************************************** //
-/// @brief Function execution monitor
-
-/// This class is used to uniformly detect and report an occurrence of several types of signals and exceptions, reducing various
-/// errors to a uniform execution_exception that is returned to a caller.
-///
-/// The executiom_monitor behavior can be customized through a set of public parameters (properties) associated with the execution_monitor instance.
-/// All parameters are implemented as public unit_test::readwrite_property data members of the class execution_monitor.
-// ************************************************************************** //
-
-class BOOST_TEST_DECL execution_monitor {
- typedef boost::unit_test::const_string const_string;
-public:
-
- /// Default constructor initializes all execution monitor properties
- execution_monitor();
-
- /// Should monitor catch system errors.
- ///
- /// The @em p_catch_system_errors property is a boolean flag (default value is true) specifying whether or not execution_monitor should trap system
- /// errors/system level exceptions/signals, which would cause program to crash in a regular case (without execution_monitor).
- /// Set this property to false, for example, if you wish to force coredump file creation. The Unit Test Framework provides a
- /// runtime parameter @c \-\-catch_system_errors=yes to alter the behavior in monitored test cases.
- unit_test::readwrite_property<bool> p_catch_system_errors;
-
- /// Should monitor try to attach debugger in case of caught system error.
- ///
- /// The @em p_auto_start_dbg property is a boolean flag (default value is false) specifying whether or not execution_monitor should try to attach debugger
- /// in case system error is caught.
- unit_test::readwrite_property<bool> p_auto_start_dbg;
-
-
- /// Specifies the seconds that elapse before a timer_error occurs.
- ///
- /// The @em p_timeout property is an integer timeout (in seconds) for monitored function execution. Use this parameter to monitor code with possible deadlocks
- /// or indefinite loops. This feature is only available for some operating systems (not yet Microsoft Windows).
- unit_test::readwrite_property<unsigned> p_timeout;
-
- /// Should monitor use alternative stack for the signal catching.
- ///
- /// The @em p_use_alt_stack property is a boolean flag (default value is false) specifying whether or not execution_monitor should use an alternative stack
- /// for the sigaction based signal catching. When enabled the signals are delivered to the execution_monitor on a stack different from current execution
- /// stack, which is safer in case if it is corrupted by monitored function. For more details on alternative stack handling see appropriate manuals.
- unit_test::readwrite_property<bool> p_use_alt_stack;
-
- /// Should monitor try to detect hardware floating point exceptions (!= 0), and which specific exception to catch.
- ///
- /// The @em p_detect_fp_exceptions property is a boolean flag (default value is false) specifying whether or not execution_monitor should install hardware
- /// traps for the floating point exception on platforms where it's supported.
- unit_test::readwrite_property<unsigned> p_detect_fp_exceptions;
-
-
- // @name Monitoring entry points
-
- /// @brief Execution monitor entry point for functions returning integer value
- ///
- /// This method executes supplied function F inside a try/catch block and also may include other unspecified platform dependent error detection code.
- ///
- /// This method throws an execution_exception on an uncaught C++ exception, a hardware or software signal, trap, or other user exception.
- ///
- /// @note execute() doesn't consider it an error for F to return a non-zero value.
- /// @param[in] F Function to monitor
- /// @returns value returned by function call F().
- /// @see vexecute
- int execute( boost::function<int ()> const& F );
-
- /// @brief Execution monitor entry point for functions returning void
- ///
- /// This method is semantically identical to execution_monitor::execute, but des't produce any result code.
- /// @param[in] F Function to monitor
- /// @see execute
- void vexecute( boost::function<void ()> const& F );
- // @}
-
- // @name Exception translator registration
-
- /// @brief Registers custom (user supplied) exception translator
-
- /// This method template registers a translator for an exception type specified as a first template argument. For example
- /// @code
- /// void myExceptTr( MyException const& ex ) { /*do something with the exception here*/}
- /// em.register_exception_translator<MyException>( myExceptTr );
- /// @endcode
- /// The translator should be any unary function/functor object which accepts MyException const&. This can be free standing function
- /// or bound class method. The second argument is an optional string tag you can associate with this translator routine. The only reason
- /// to specify the tag is if you plan to erase the translator eventually. This can be useful in scenario when you reuse the same
- /// execution_monitor instance to monitor different routines and need to register a translator specific to the routine being monitored.
- /// While it is possible to erase the translator based on an exception type it was registered for, tag string provides simpler way of doing this.
- /// @tparam ExceptionType type of the exception we register a translator for
- /// @tparam ExceptionTranslator type of the translator we register for this exception
- /// @param[in] tr translator function object with the signature <em> void (ExceptionType const&)</em>
- /// @param[in] tag tag associated with this translator
- template<typename ExceptionType, typename ExceptionTranslator>
- void register_exception_translator( ExceptionTranslator const& tr, const_string tag = const_string(), boost::type<ExceptionType>* = 0 );
-
- /// @brief Erases custom exception translator based on a tag
-
- /// Use the same tag as the one used during translator registration
- /// @param[in] tag tag associated with translator you wants to erase
- void erase_exception_translator( const_string tag )
- {
- m_custom_translators = m_custom_translators->erase( m_custom_translators, tag );
- }
-#ifndef BOOST_NO_RTTI
- /// @brief Erases custom exception translator based on an exception type
- ///
- /// tparam ExceptionType Exception type for which you want to erase the translator
- template<typename ExceptionType>
- void erase_exception_translator( boost::type<ExceptionType>* = 0 )
- {
- m_custom_translators = m_custom_translators->erase<ExceptionType>( m_custom_translators );
- }
- //@}
-#endif
-
-private:
- // implementation helpers
- int catch_signals( boost::function<int ()> const& F );
-
- // Data members
- detail::translator_holder_base_ptr m_custom_translators;
- boost::scoped_array<char> m_alt_stack;
-}; // execution_monitor
-
-// ************************************************************************** //
-// ************** detail::translator_holder ************** //
-// ************************************************************************** //
-
-namespace detail {
-
-template<typename ExceptionType, typename ExceptionTranslator>
-class translator_holder : public translator_holder_base
-{
-public:
- explicit translator_holder( ExceptionTranslator const& tr, translator_holder_base_ptr& next, const_string tag = const_string() )
- : translator_holder_base( next, tag ), m_translator( tr ) {}
-
- // translator holder interface
- virtual int operator()( boost::function<int ()> const& F )
- {
- BOOST_TEST_I_TRY {
- return m_next ? (*m_next)( F ) : F();
- }
- BOOST_TEST_I_CATCH( ExceptionType, e ) {
- m_translator( e );
- return boost::exit_exception_failure;
- }
- }
-#ifndef BOOST_NO_RTTI
- virtual translator_holder_base_ptr erase( translator_holder_base_ptr this_, std::type_info const& ti )
- {
- return ti == typeid(ExceptionType) ? m_next : this_;
- }
-#endif
-
-private:
- // Data members
- ExceptionTranslator m_translator;
-};
-
-} // namespace detail
-
-template<typename ExceptionType, typename ExceptionTranslator>
-void
-execution_monitor::register_exception_translator( ExceptionTranslator const& tr, const_string tag, boost::type<ExceptionType>* )
-{
- m_custom_translators.reset(
- new detail::translator_holder<ExceptionType,ExceptionTranslator>( tr, m_custom_translators, tag ) );
-}
-
-// ************************************************************************** //
-/// @class execution_aborted
-/// @brief This is a trivial default constructible class. Use it to report graceful abortion of a monitored function execution.
-// ************************************************************************** //
-
-struct execution_aborted {};
-
-// ************************************************************************** //
-// ************** system_error ************** //
-// ************************************************************************** //
-
-class system_error {
-public:
- // Constructor
- explicit system_error( char const* exp );
-
- long const p_errno;
- char const* const p_failed_exp;
-};
-
-//!@internal
-#define BOOST_TEST_SYS_ASSERT( cond ) BOOST_TEST_I_ASSRT( cond, ::boost::system_error( BOOST_STRINGIZE( exp ) ) )
-
-// ************************************************************************** //
-// **************Floating point exception management interface ************** //
-// ************************************************************************** //
-
-namespace fpe {
-
-enum masks {
- BOOST_FPE_OFF = 0,
-
-#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__) /* *** */
- BOOST_FPE_DIVBYZERO = EM_ZERODIVIDE,
- BOOST_FPE_INEXACT = EM_INEXACT,
- BOOST_FPE_INVALID = EM_INVALID,
- BOOST_FPE_OVERFLOW = EM_OVERFLOW,
- BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL,
-
- BOOST_FPE_ALL = MCW_EM,
-
-#elif !defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__)/* *** */
- BOOST_FPE_DIVBYZERO = BOOST_FPE_OFF,
- BOOST_FPE_INEXACT = BOOST_FPE_OFF,
- BOOST_FPE_INVALID = BOOST_FPE_OFF,
- BOOST_FPE_OVERFLOW = BOOST_FPE_OFF,
- BOOST_FPE_UNDERFLOW = BOOST_FPE_OFF,
- BOOST_FPE_ALL = BOOST_FPE_OFF,
-#else /* *** */
-
-#if defined(FE_DIVBYZERO)
- BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
-#else
- BOOST_FPE_DIVBYZERO = BOOST_FPE_OFF,
-#endif
-
-#if defined(FE_INEXACT)
- BOOST_FPE_INEXACT = FE_INEXACT,
-#else
- BOOST_FPE_INEXACT = BOOST_FPE_OFF,
-#endif
-
-#if defined(FE_INVALID)
- BOOST_FPE_INVALID = FE_INVALID,
-#else
- BOOST_FPE_INVALID = BOOST_FPE_OFF,
-#endif
-
-#if defined(FE_OVERFLOW)
- BOOST_FPE_OVERFLOW = FE_OVERFLOW,
-#else
- BOOST_FPE_OVERFLOW = BOOST_FPE_OFF,
-#endif
-
-#if defined(FE_UNDERFLOW)
- BOOST_FPE_UNDERFLOW = FE_UNDERFLOW,
-#else
- BOOST_FPE_UNDERFLOW = BOOST_FPE_OFF,
-#endif
-
-#if defined(FE_ALL_EXCEPT)
- BOOST_FPE_ALL = FE_ALL_EXCEPT,
-#else
- BOOST_FPE_ALL = BOOST_FPE_OFF,
-#endif
-
-#endif /* *** */
- BOOST_FPE_INV = BOOST_FPE_ALL+1
-};
-
-//____________________________________________________________________________//
-
-// return the previous set of enabled exceptions when successful, and BOOST_FPE_INV otherwise
-unsigned BOOST_TEST_DECL enable( unsigned mask );
-unsigned BOOST_TEST_DECL disable( unsigned mask );
-
-//____________________________________________________________________________//
-
-} // namespace fpe
-
-///@}
-
-} // namespace boost
-
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/test/framework.hpp b/src/third_party/boost-1.68.0/boost/test/framework.hpp
deleted file mode 100644
index 099c02969b8..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/framework.hpp
+++ /dev/null
@@ -1,303 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief Defines Unit Test Framework mono-state interfaces.
-//! The framework interfaces are based on Monostate design pattern.
-// ***************************************************************************
-
-#ifndef BOOST_TEST_FRAMEWORK_HPP_020805GER
-#define BOOST_TEST_FRAMEWORK_HPP_020805GER
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-#include <boost/test/detail/throw_exception.hpp>
-
-#include <boost/test/utils/trivial_singleton.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-// STL
-#include <stdexcept>
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-/// Main namespace for the Unit Test Framework interfaces and implementation
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** init_unit_test_func ************** //
-// ************************************************************************** //
-
-/// Test module initialization routine signature
-
-/// Different depending on whether BOOST_TEST_ALTERNATIVE_INIT_API is defined or not
-#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
-typedef bool (*init_unit_test_func)();
-#else
-typedef test_suite* (*init_unit_test_func)( int, char* [] );
-#endif
-
-// ************************************************************************** //
-// ************** framework ************** //
-// ************************************************************************** //
-
-/// Namespace of the Unit Test Framework mono-state
-namespace framework {
-
-/// @name Unit Test Framework initialization and shutdown
-/// @{
-
-/// @brief This function performs initialization of the framework mono-state.
-///
-/// It needs to be called every time before the test is started.
-/// @param[in] init_func test module initialization routine
-/// @param[in] argc command line arguments collection
-/// @param[in] argv command line arguments collection
-BOOST_TEST_DECL void init( init_unit_test_func init_func, int argc, char* argv[] );
-
-/// This function applies all the decorators and figures out default run status. This argument facilitates an
-/// ability of the test cases to prepare some other test units (primarily used internally for self testing).
-/// @param[in] tu Optional id of the test unit representing root of test tree. If absent, master test suite is used
-BOOST_TEST_DECL void finalize_setup_phase( test_unit_id tu = INV_TEST_UNIT_ID);
-
-/// This function returns true when testing is in progress (setup is finished).
-BOOST_TEST_DECL bool test_in_progress();
-
-/// This function shuts down the framework and clears up its mono-state.
-///
-/// It needs to be at the very end of test module execution
-BOOST_TEST_DECL void shutdown();
-/// @}
-
-/// @name Test unit registration
-/// @{
-
-/// Provides both read and write access to current "leaf" auto test suite during the test unit registration phase.
-///
-/// During auto-registration phase the framework maintain a FIFO queue of test units being registered. New test units become children
-/// of the current "leaf" test suite and if this is test suite it is pushed back into queue and becomes a new leaf.
-/// When test suite registration is completed, a test suite is popped from the back of the queue. Only automatically registered test suites
-/// should be added to this queue. Master test suite is always a zero element in this queue, so if no other test suites are registered
-/// all test cases are added to master test suite.
-
-/// This function facilitates all three possible actions:
-/// - if no argument are provided it returns the current queue leaf test suite
-/// - if test suite is provided and no second argument are set, test suite is added to the queue
-/// - if no test suite are provided and last argument is false, the semantic of this function is similar to queue pop: last element is popped from the queue
-/// @param[in] ts test suite to push back to the queue
-/// @param[in] push_or_pop should we push ts to the queue or pop leaf test suite instead
-/// @returns a reference to the currently active/"leaf" test suite
-BOOST_TEST_DECL test_suite& current_auto_test_suite( test_suite* ts = 0, bool push_or_pop = true );
-
-/// This function add new test case into the global collection of test units the framework aware of.
-
-/// This function also assignes unique test unit id for every test case. Later on one can use this id to locate
-/// the test case if necessary. This is the way for the framework to maintain weak references between test units.
-/// @param[in] tc test case to register
-BOOST_TEST_DECL void register_test_unit( test_case* tc );
-
-/// This function add new test suite into the global collection of test units the framework aware of.
-
-/// This function also assignes unique test unit id for every test suite. Later on one can use this id to locate
-/// the test case if necessary. This is the way for the framework to maintain weak references between test units.
-/// @param[in] ts test suite to register
-BOOST_TEST_DECL void register_test_unit( test_suite* ts );
-
-/// This function removes the test unit from the collection of known test units and destroys the test unit object.
-
-/// This function also assigns unique test unit id for every test case. Later on one can use this id to located
-/// the test case if necessary. This is the way for the framework to maintain weak references between test units.
-/// @param[in] tu test unit to deregister
-BOOST_TEST_DECL void deregister_test_unit( test_unit* tu );
-
-// This function clears up the framework mono-state.
-
-/// After this call the framework can be reinitialized to perform a second test run during the same program lifetime.
-BOOST_TEST_DECL void clear();
-/// @}
-
-/// @name Test observer registration
-/// @{
-/// Adds new test execution observer object into the framework's list of test observers.
-
-/// Observer lifetime should exceed the the testing execution timeframe
-/// @param[in] to test observer object to add
-BOOST_TEST_DECL void register_observer( test_observer& to );
-
-/// Excludes the observer object form the framework's list of test observers
-/// @param[in] to test observer object to exclude
-BOOST_TEST_DECL void deregister_observer( test_observer& to );
-
-/// @}
-
-/// @name Global fixtures registration
-/// @{
-
-/// Adds a new global fixture to be setup before any other tests starts and tore down after
-/// any other tests finished.
-/// Test unit fixture lifetime should exceed the testing execution timeframe
-/// @param[in] tuf fixture to add
-BOOST_TEST_DECL void register_global_fixture( test_unit_fixture& tuf );
-
-/// Removes a test global fixture from the framework
-///
-/// Test unit fixture lifetime should exceed the testing execution timeframe
-/// @param[in] tuf fixture to remove
-BOOST_TEST_DECL void deregister_global_fixture( test_unit_fixture& tuf );
-/// @}
-
-/// @name Assertion/uncaught exception context support
-/// @{
-/// Context accessor
-struct BOOST_TEST_DECL context_generator {
- context_generator() : m_curr_frame( 0 ) {}
-
- /// Is there any context?
- bool is_empty() const;
-
- /// Give me next frame; empty - last frame
- const_string next() const;
-
-private:
- // Data members
- mutable unsigned m_curr_frame;
-};
-
-/// Records context frame message.
-
-/// Some context frames are sticky - they can only explicitly cleared by specifying context id. Other (non sticky) context frames cleared after every assertion.
-/// @param[in] context_descr context frame message
-/// @param[in] sticky is this sticky frame or not
-/// @returns id of the newly created frame
-BOOST_TEST_DECL int add_context( lazy_ostream const& context_descr, bool sticky );
-/// Erases context frame (when test exits context scope)
-
-/// If context_id is passed clears that specific context frame identified by this id, otherwise clears all non sticky contexts.
-BOOST_TEST_DECL void clear_context( int context_id = -1 );
-/// Produces an instance of small "delegate" object, which facilitates access to collected context.
-BOOST_TEST_DECL context_generator get_context();
-/// @}
-
-/// @name Access to registered test units.
-/// @{
-/// This function provides access to the master test suite.
-
-/// There is only only master test suite per test module.
-/// @returns a reference the master test suite instance
-BOOST_TEST_DECL master_test_suite_t& master_test_suite();
-
-/// This function provides an access to the test unit currently being executed.
-
-/// The difference with current_test_case is about the time between a test-suite
-/// is being set up or torn down (fixtures) and when the test-cases of that suite start.
-
-/// This function is only valid during test execution phase.
-/// @see current_test_case_id, current_test_case
-BOOST_TEST_DECL test_unit const& current_test_unit();
-
-/// This function provides an access to the test case currently being executed.
-
-/// This function is only valid during test execution phase.
-/// @see current_test_case_id
-BOOST_TEST_DECL test_case const& current_test_case();
-
-/// This function provides an access to an id of the test case currently being executed.
-
-/// This function safer than current_test_case, cause if wont throw if no test case is being executed.
-/// @see current_test_case
-BOOST_TEST_DECL test_unit_id current_test_case_id(); /* safe version of above */
-
-/// This function provides access to a test unit by id and type combination. It will throw if no test unit located.
-/// @param[in] tu_id id of a test unit to locate
-/// @param[in] tu_type type of a test unit to locate
-/// @returns located test unit
-BOOST_TEST_DECL test_unit& get( test_unit_id tu_id, test_unit_type tu_type );
-
-/// This function template provides access to a typed test unit by id
-
-/// It will throw if you specify incorrect test unit type
-/// @tparam UnitType compile time type of test unit to get (test_suite or test_case)
-/// @param id id of test unit to get
-template<typename UnitType>
-inline UnitType& get( test_unit_id id )
-{
- return static_cast<UnitType&>( get( id, static_cast<test_unit_type>(UnitType::type) ) );
-}
-///@}
-
-/// @name Test initiation interface
-/// @{
-
-/// Initiates test execution
-
-/// This function is used to start the test execution from a specific "root" test unit.
-/// If no root provided, test is started from master test suite. This second argument facilitates an ability of the test cases to
-/// start some other test units (primarily used internally for self testing).
-/// @param[in] tu Optional id of the test unit or test unit itself from which the test is started. If absent, master test suite is used
-/// @param[in] continue_test true == continue test if it was already started, false == restart the test from scratch regardless
-BOOST_TEST_DECL void run( test_unit_id tu = INV_TEST_UNIT_ID, bool continue_test = true );
-/// Initiates test execution. Same as other overload
-BOOST_TEST_DECL void run( test_unit const* tu, bool continue_test = true );
-/// @}
-
-/// @name Test events dispatchers
-/// @{
-/// Reports results of assertion to all test observers
-BOOST_TEST_DECL void assertion_result( unit_test::assertion_result ar );
-/// Reports uncaught exception to all test observers
-BOOST_TEST_DECL void exception_caught( execution_exception const& );
-/// Reports aborted test unit to all test observers
-BOOST_TEST_DECL void test_unit_aborted( test_unit const& );
-/// Reports aborted test module to all test observers
-BOOST_TEST_DECL void test_aborted( );
-/// @}
-
-namespace impl {
-// exclusively for self test
-BOOST_TEST_DECL void setup_for_execution( test_unit const& );
-BOOST_TEST_DECL void setup_loggers( );
-} // namespace impl
-
-// ************************************************************************** //
-// ************** framework errors ************** //
-// ************************************************************************** //
-
-/// This exception type is used to report internal Boost.Test framework errors.
-struct BOOST_TEST_DECL internal_error : public std::runtime_error {
- internal_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
-};
-
-//____________________________________________________________________________//
-
-/// This exception type is used to report test module setup errors.
-struct BOOST_TEST_DECL setup_error : public std::runtime_error {
- setup_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
-};
-
-#define BOOST_TEST_SETUP_ASSERT( cond, msg ) BOOST_TEST_I_ASSRT( cond, unit_test::framework::setup_error( msg ) )
-
-//____________________________________________________________________________//
-
-struct nothing_to_test {
- explicit nothing_to_test( int rc ) : m_result_code( rc ) {}
-
- int m_result_code;
-};
-
-//____________________________________________________________________________//
-
-} // namespace framework
-} // unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_FRAMEWORK_HPP_020805GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/compiler_log_formatter.ipp b/src/third_party/boost-1.68.0/boost/test/impl/compiler_log_formatter.ipp
deleted file mode 100644
index aa0a0e229f5..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/compiler_log_formatter.ipp
+++ /dev/null
@@ -1,298 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : implements compiler like Log formatter
-// ***************************************************************************
-
-#ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
-#define BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
-
-// Boost.Test
-#include <boost/test/output/compiler_log_formatter.hpp>
-
-#include <boost/test/framework.hpp>
-#include <boost/test/execution_monitor.hpp>
-#include <boost/test/unit_test_parameters.hpp>
-
-#include <boost/test/tree/test_unit.hpp>
-
-#include <boost/test/utils/basic_cstring/io.hpp>
-#include <boost/test/utils/lazy_ostream.hpp>
-#include <boost/test/utils/setcolor.hpp>
-
-
-// Boost
-#include <boost/version.hpp>
-
-// STL
-#include <iostream>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace output {
-
-// ************************************************************************** //
-// ************** compiler_log_formatter ************** //
-// ************************************************************************** //
-
-namespace {
-
-std::string
-test_phase_identifier()
-{
- return framework::test_in_progress() ? framework::current_test_unit().full_name() : std::string( "Test setup" );
-}
-
-} // local namespace
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_start( std::ostream& output, counter_t test_cases_amount )
-{
- m_color_output = runtime_config::get<bool>( runtime_config::btrt_color_output );
-
- if( test_cases_amount > 0 )
- output << "Running " << test_cases_amount << " test "
- << (test_cases_amount > 1 ? "cases" : "case") << "...\n";
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_finish( std::ostream& ostr )
-{
- ostr.flush();
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_build_info( std::ostream& output )
-{
- output << "Platform: " << BOOST_PLATFORM << '\n'
- << "Compiler: " << BOOST_COMPILER << '\n'
- << "STL : " << BOOST_STDLIB << '\n'
- << "Boost : " << BOOST_VERSION/100000 << "."
- << BOOST_VERSION/100 % 1000 << "."
- << BOOST_VERSION % 100 << std::endl;
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::test_unit_start( std::ostream& output, test_unit const& tu )
-{
- BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::BRIGHT, term_color::BLUE );
-
- print_prefix( output, tu.p_file_name, tu.p_line_num );
-
- output << "Entering test " << tu.p_type_name << " \"" << tu.p_name << "\"" << std::endl;
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::test_unit_finish( std::ostream& output, test_unit const& tu, unsigned long elapsed )
-{
- BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::BRIGHT, term_color::BLUE );
-
- print_prefix( output, tu.p_file_name, tu.p_line_num );
-
- output << "Leaving test " << tu.p_type_name << " \"" << tu.p_name << "\"";
-
- if( elapsed > 0 ) {
- output << "; testing time: ";
- if( elapsed % 1000 == 0 )
- output << elapsed/1000 << "ms";
- else
- output << elapsed << "us";
- }
-
- output << std::endl;
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::test_unit_skipped( std::ostream& output, test_unit const& tu, const_string reason )
-{
- BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::BRIGHT, term_color::YELLOW );
-
- print_prefix( output, tu.p_file_name, tu.p_line_num );
-
- output << "Test " << tu.p_type_name << " \"" << tu.full_name() << "\"" << " is skipped because " << reason << std::endl;
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_exception_start( std::ostream& output, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
-{
- execution_exception::location const& loc = ex.where();
-
- print_prefix( output, loc.m_file_name, loc.m_line_num );
-
- {
- BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::UNDERLINE, term_color::RED );
-
- output << "fatal error: in \"" << (loc.m_function.is_empty() ? test_phase_identifier() : loc.m_function ) << "\": "
- << ex.what();
- }
-
- if( !checkpoint_data.m_file_name.is_empty() ) {
- output << '\n';
- print_prefix( output, checkpoint_data.m_file_name, checkpoint_data.m_line_num );
-
- BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::BRIGHT, term_color::CYAN );
-
- output << "last checkpoint";
- if( !checkpoint_data.m_message.empty() )
- output << ": " << checkpoint_data.m_message;
- }
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_exception_finish( std::ostream& output )
-{
- output << std::endl;
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_entry_start( std::ostream& output, log_entry_data const& entry_data, log_entry_types let )
-{
- using namespace utils;
-
- switch( let ) {
- case BOOST_UTL_ET_INFO:
- print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
- if( m_color_output )
- output << setcolor( term_attr::BRIGHT, term_color::GREEN );
- output << "info: ";
- break;
- case BOOST_UTL_ET_MESSAGE:
- if( m_color_output )
- output << setcolor( term_attr::BRIGHT, term_color::CYAN );
- break;
- case BOOST_UTL_ET_WARNING:
- print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
- if( m_color_output )
- output << setcolor( term_attr::BRIGHT, term_color::YELLOW );
- output << "warning: in \"" << test_phase_identifier() << "\": ";
- break;
- case BOOST_UTL_ET_ERROR:
- print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
- if( m_color_output )
- output << setcolor( term_attr::BRIGHT, term_color::RED );
- output << "error: in \"" << test_phase_identifier() << "\": ";
- break;
- case BOOST_UTL_ET_FATAL_ERROR:
- print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
- if( m_color_output )
- output << setcolor( term_attr::UNDERLINE, term_color::RED );
- output << "fatal error: in \"" << test_phase_identifier() << "\": ";
- break;
- }
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_entry_value( std::ostream& output, const_string value )
-{
- output << value;
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_entry_value( std::ostream& output, lazy_ostream const& value )
-{
- output << value;
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_entry_finish( std::ostream& output )
-{
- if( m_color_output )
- output << utils::setcolor();
-
- output << std::endl;
-}
-
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::print_prefix( std::ostream& output, const_string file_name, std::size_t line_num )
-{
- if( !file_name.empty() ) {
-#ifdef __APPLE_CC__
- // Xcode-compatible logging format, idea by Richard Dingwall at
- // <http://richarddingwall.name/2008/06/01/using-the-boost-unit-test-framework-with-xcode-3/>.
- output << file_name << ':' << line_num << ": ";
-#else
- output << file_name << '(' << line_num << "): ";
-#endif
- }
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::entry_context_start( std::ostream& output, log_level l )
-{
- if( l == log_messages ) {
- output << "\n[context:";
- }
- else {
- output << (l == log_successful_tests ? "\nAssertion" : "\nFailure" ) << " occurred in a following context:";
- }
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::entry_context_finish( std::ostream& output, log_level l )
-{
- if( l == log_messages ) {
- output << "]";
- }
- output.flush();
-}
-
-//____________________________________________________________________________//
-
-void
-compiler_log_formatter::log_entry_context( std::ostream& output, log_level /*l*/, const_string context_descr )
-{
- output << "\n " << context_descr;
-}
-
-//____________________________________________________________________________//
-
-} // namespace output
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/decorator.ipp b/src/third_party/boost-1.68.0/boost/test/impl/decorator.ipp
deleted file mode 100644
index 0cc562ee2f2..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/decorator.ipp
+++ /dev/null
@@ -1,210 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : unit test decorators implementation
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TREE_DECORATOR_IPP_091911GER
-#define BOOST_TEST_TREE_DECORATOR_IPP_091911GER
-
-// Boost.Test
-#include <boost/test/tree/decorator.hpp>
-#include <boost/test/tree/test_unit.hpp>
-
-#include <boost/test/framework.hpp>
-#if BOOST_TEST_SUPPORT_TOKEN_ITERATOR
-#include <boost/test/utils/iterator/token_iterator.hpp>
-#endif
-
-#include <boost/test/detail/throw_exception.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace decorator {
-
-// ************************************************************************** //
-// ************** decorator::collector ************** //
-// ************************************************************************** //
-
-collector&
-collector::operator*( base const& d )
-{
- m_tu_decorators.push_back( d.clone() );
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-void
-collector::store_in( test_unit& tu )
-{
- tu.p_decorators.value.insert( tu.p_decorators.value.end(), m_tu_decorators.begin(), m_tu_decorators.end() );
-}
-
-//____________________________________________________________________________//
-
-void
-collector::reset()
-{
- m_tu_decorators.clear();
-}
-
-//____________________________________________________________________________//
-
-std::vector<base_ptr>
-collector::get_lazy_decorators() const
-{
- return m_tu_decorators;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::base ************** //
-// ************************************************************************** //
-
-collector&
-base::operator*() const
-{
- return collector::instance() * *this;
-}
-
-// ************************************************************************** //
-// ************** decorator::label ************** //
-// ************************************************************************** //
-
-void
-label::apply( test_unit& tu )
-{
- tu.add_label( m_label );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::expected_failures ************** //
-// ************************************************************************** //
-
-void
-expected_failures::apply( test_unit& tu )
-{
- tu.increase_exp_fail( m_exp_fail );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::timeout ************** //
-// ************************************************************************** //
-
-void
-timeout::apply( test_unit& tu )
-{
- tu.p_timeout.value = m_timeout;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::description ************** //
-// ************************************************************************** //
-
-void
-description::apply( test_unit& tu )
-{
- tu.p_description.value += m_description;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::depends_on ************** //
-// ************************************************************************** //
-
-void
-depends_on::apply( test_unit& tu )
-{
-#if !BOOST_TEST_SUPPORT_TOKEN_ITERATOR
- BOOST_TEST_SETUP_ASSERT( false, "depends_on decorator is not supported on this platform" );
-#else
- utils::string_token_iterator tit( m_dependency, (utils::dropped_delimeters = "/", utils::kept_delimeters = utils::dt_none) );
-
- test_unit* dep = &framework::master_test_suite();
- while( tit != utils::string_token_iterator() ) {
- BOOST_TEST_SETUP_ASSERT( dep->p_type == TUT_SUITE, std::string( "incorrect dependency specification " ) + m_dependency );
-
- test_unit_id next_id = static_cast<test_suite*>(dep)->get( *tit );
-
- BOOST_TEST_SETUP_ASSERT( next_id != INV_TEST_UNIT_ID,
- std::string( "incorrect dependency specification " ) + m_dependency );
-
- dep = &framework::get( next_id, TUT_ANY );
- ++tit;
- }
-
- tu.depends_on( dep );
-#endif
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::enable_if/enabled/disabled ************** //
-// ************************************************************************** //
-
-void
-enable_if_impl::apply_impl( test_unit& tu, bool condition )
-{
- BOOST_TEST_SETUP_ASSERT(tu.p_default_status == test_unit::RS_INHERIT,
- "Can't apply multiple enabled/disabled decorators "
- "to the same test unit " + tu.full_name());
-
- tu.p_default_status.value = condition ? test_unit::RS_ENABLED : test_unit::RS_DISABLED;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::fixture ************** //
-// ************************************************************************** //
-
-void
-fixture_t::apply( test_unit& tu )
-{
- tu.p_fixtures.value.push_back( m_impl );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::depends_on ************** //
-// ************************************************************************** //
-
-void
-precondition::apply( test_unit& tu )
-{
- tu.add_precondition( m_precondition );
-}
-
-//____________________________________________________________________________//
-
-} // namespace decorator
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TREE_DECORATOR_IPP_091911GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/execution_monitor.ipp b/src/third_party/boost-1.68.0/boost/test/impl/execution_monitor.ipp
deleted file mode 100644
index 035bb958c11..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/execution_monitor.ipp
+++ /dev/null
@@ -1,1448 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// (C) Copyright Beman Dawes and Ullrich Koethe 1995-2001.
-// Use, modification, and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// Provides execution monitor implementation for all supported
-/// configurations, including Microsoft structured exception based, unix signals
-/// based and special workarounds for borland
-///
-/// Note that when testing requirements or user wishes preclude use of this
-/// file as a separate compilation unit, it may be included as a header file.
-///
-/// Header dependencies are deliberately restricted to reduce coupling to other
-/// boost libraries.
-// ***************************************************************************
-
-#ifndef BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
-#define BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/workaround.hpp>
-#include <boost/test/detail/throw_exception.hpp>
-#include <boost/test/execution_monitor.hpp>
-#include <boost/test/debug.hpp>
-
-// Boost
-#include <boost/cstdlib.hpp> // for exit codes
-#include <boost/config.hpp> // for workarounds
-#include <boost/core/ignore_unused.hpp> // for ignore_unused
-#ifndef BOOST_NO_EXCEPTIONS
-#include <boost/exception/get_error_info.hpp> // for get_error_info
-#include <boost/exception/current_exception_cast.hpp> // for current_exception_cast
-#endif
-
-// STL
-#include <string> // for std::string
-#include <new> // for std::bad_alloc
-#include <typeinfo> // for std::bad_cast, std::bad_typeid
-#include <exception> // for std::exception, std::bad_exception
-#include <stdexcept> // for std exception hierarchy
-#include <cstring> // for C string API
-#include <cassert> // for assert
-#include <cstddef> // for NULL
-#include <cstdio> // for vsnprintf
-#include <cstdarg> // for varargs
-
-#include <iostream> // for varargs
-
-#ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::strerror; using ::strlen; using ::strncat; }
-#endif
-
-// to use vsnprintf
-#if defined(__SUNPRO_CC) || defined(__SunOS)
-# include <stdio.h>
-# include <stdarg.h>
-using std::va_list;
-#endif
-
-// to use vsnprintf
-#if defined(__QNXNTO__) || defined(__VXWORKS__)
-# include <stdio.h>
-using std::va_list;
-#endif
-
-#if defined(__VXWORKS__)
-# define BOOST_TEST_LIMITED_SIGNAL_DETAILS
-#endif
-
-#ifdef BOOST_SEH_BASED_SIGNAL_HANDLING
-# include <windows.h>
-
-# if defined(__MWERKS__) || (defined(_MSC_VER) && !defined(UNDER_CE))
-# include <eh.h>
-# endif
-
-# if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 || defined(__MWERKS__)
-# include <stdint.h>
-# endif
-
-# if defined(__BORLANDC__) && __BORLANDC__ < 0x560
- typedef unsigned uintptr_t;
-# endif
-
-# if defined(UNDER_CE) && BOOST_WORKAROUND(_MSC_VER, < 1500 )
- typedef void* uintptr_t;
-# elif defined(UNDER_CE)
-# include <crtdefs.h>
-# endif
-
-# if !defined(NDEBUG) && defined(_MSC_VER) && !defined(UNDER_CE)
-# include <crtdbg.h>
-# define BOOST_TEST_CRT_HOOK_TYPE _CRT_REPORT_HOOK
-# define BOOST_TEST_CRT_ASSERT _CRT_ASSERT
-# define BOOST_TEST_CRT_ERROR _CRT_ERROR
-# define BOOST_TEST_CRT_SET_HOOK(H) _CrtSetReportHook(H)
-# else
-# define BOOST_TEST_CRT_HOOK_TYPE void*
-# define BOOST_TEST_CRT_ASSERT 2
-# define BOOST_TEST_CRT_ERROR 1
-# define BOOST_TEST_CRT_SET_HOOK(H) (void*)(H)
-# endif
-
-# if (!BOOST_WORKAROUND(_MSC_VER, >= 1400 ) && \
- !defined(BOOST_COMO)) || defined(UNDER_CE)
-
-typedef void* _invalid_parameter_handler;
-
-inline _invalid_parameter_handler
-_set_invalid_parameter_handler( _invalid_parameter_handler arg )
-{
- return arg;
-}
-
-# endif
-
-# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) || defined(UNDER_CE)
-
-namespace { void _set_se_translator( void* ) {} }
-
-# endif
-
-#elif defined(BOOST_HAS_SIGACTION)
-
-# define BOOST_SIGACTION_BASED_SIGNAL_HANDLING
-
-# include <unistd.h>
-# include <signal.h>
-# include <setjmp.h>
-
-# if defined(__FreeBSD__)
-
-# include <osreldate.h>
-
-# ifndef SIGPOLL
-# define SIGPOLL SIGIO
-# endif
-
-# if (__FreeBSD_version < 70100)
-
-# define ILL_ILLADR 0 // ILL_RESAD_FAULT
-# define ILL_PRVOPC ILL_PRIVIN_FAULT
-# define ILL_ILLOPN 2 // ILL_RESOP_FAULT
-# define ILL_COPROC ILL_FPOP_FAULT
-
-# define BOOST_TEST_LIMITED_SIGNAL_DETAILS
-
-# endif
-# endif
-
-# if defined(__ANDROID__)
-# include <android/api-level.h>
-# endif
-
-// documentation of BOOST_TEST_DISABLE_ALT_STACK in execution_monitor.hpp
-# if !defined(__CYGWIN__) && !defined(__QNXNTO__) && !defined(__bgq__) && \
- (!defined(__ANDROID__) || __ANDROID_API__ >= 8) && \
- !defined(BOOST_TEST_DISABLE_ALT_STACK)
-# define BOOST_TEST_USE_ALT_STACK
-# endif
-
-# if defined(SIGPOLL) && !defined(__CYGWIN__) && \
- !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && \
- !defined(__NetBSD__) && \
- !defined(__QNXNTO__)
-# define BOOST_TEST_CATCH_SIGPOLL
-# endif
-
-# ifdef BOOST_TEST_USE_ALT_STACK
-# define BOOST_TEST_ALT_STACK_SIZE SIGSTKSZ
-# endif
-
-
-#else
-
-# define BOOST_NO_SIGNAL_HANDLING
-
-#endif
-
-#ifndef UNDER_CE
-#include <errno.h>
-#endif
-
-#if !defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
-# include <boost/core/demangle.hpp>
-#endif
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-
-// ************************************************************************** //
-// ************** throw_exception ************** //
-// ************************************************************************** //
-
-#ifdef BOOST_NO_EXCEPTIONS
-void throw_exception( std::exception const & e ) { abort(); }
-#endif
-
-// ************************************************************************** //
-// ************** report_error ************** //
-// ************************************************************************** //
-
-namespace detail {
-
-#ifdef __BORLANDC__
-# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) std::vsnprintf( (a1), (a2), (a3), (a4) )
-#elif BOOST_WORKAROUND(_MSC_VER, <= 1310) || \
- BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3000)) || \
- defined(UNDER_CE)
-# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) _vsnprintf( (a1), (a2), (a3), (a4) )
-#else
-# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) vsnprintf( (a1), (a2), (a3), (a4) )
-#endif
-
-#ifndef BOOST_NO_EXCEPTIONS
-
-template <typename ErrorInfo>
-typename ErrorInfo::value_type
-extract( boost::exception const* ex )
-{
- if( !ex )
- return 0;
-
- typename ErrorInfo::value_type const * val = boost::get_error_info<ErrorInfo>( *ex );
-
- return val ? *val : 0;
-}
-
-//____________________________________________________________________________//
-
-static void
-report_error( execution_exception::error_code ec, boost::exception const* be, char const* format, va_list* args )
-{
- static const int REPORT_ERROR_BUFFER_SIZE = 4096;
- static char buf[REPORT_ERROR_BUFFER_SIZE];
-
- BOOST_TEST_VSNPRINTF( buf, sizeof(buf)-1, format, *args );
- buf[sizeof(buf)-1] = 0;
-
- va_end( *args );
-
- BOOST_TEST_I_THROW(execution_exception( ec, buf, execution_exception::location( extract<throw_file>( be ),
- (size_t)extract<throw_line>( be ),
- extract<throw_function>( be ) ) ));
-}
-
-//____________________________________________________________________________//
-
-static void
-report_error( execution_exception::error_code ec, boost::exception const* be, char const* format, ... )
-{
- va_list args;
- va_start( args, format );
-
- report_error( ec, be, format, &args );
-}
-
-#endif
-
-//____________________________________________________________________________//
-
-static void
-report_error( execution_exception::error_code ec, char const* format, ... )
-{
- va_list args;
- va_start( args, format );
-
- report_error( ec, 0, format, &args );
-}
-
-//____________________________________________________________________________//
-
-template<typename Tr,typename Functor>
-inline int
-do_invoke( Tr const& tr, Functor const& F )
-{
- return tr ? (*tr)( F ) : F();
-}
-
-//____________________________________________________________________________//
-
-struct fpe_except_guard {
- explicit fpe_except_guard( unsigned detect_fpe )
- : m_detect_fpe( detect_fpe )
- {
- // prepare fp exceptions control
- m_previously_enabled = fpe::disable( fpe::BOOST_FPE_ALL );
- if( m_previously_enabled != fpe::BOOST_FPE_INV && detect_fpe != fpe::BOOST_FPE_OFF )
- fpe::enable( detect_fpe );
- }
- ~fpe_except_guard()
- {
- if( m_detect_fpe != fpe::BOOST_FPE_OFF )
- fpe::disable( m_detect_fpe );
- if( m_previously_enabled != fpe::BOOST_FPE_INV )
- fpe::enable( m_previously_enabled );
- }
-
- unsigned m_detect_fpe;
- unsigned m_previously_enabled;
-};
-
-
-// ************************************************************************** //
-// ************** typeid_name ************** //
-// ************************************************************************** //
-
-#if !defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
-template<typename T>
-std::string
-typeid_name( T const& t )
-{
- return boost::core::demangle(typeid(t).name());
-}
-#endif
-
-} // namespace detail
-
-#if defined(BOOST_SIGACTION_BASED_SIGNAL_HANDLING)
-
-// ************************************************************************** //
-// ************** Sigaction based signal handling ************** //
-// ************************************************************************** //
-
-namespace detail {
-
-// ************************************************************************** //
-// ************** boost::detail::system_signal_exception ************** //
-// ************************************************************************** //
-
-class system_signal_exception {
-public:
- // Constructor
- system_signal_exception()
- : m_sig_info( 0 )
- , m_context( 0 )
- {}
-
- // Access methods
- void operator()( siginfo_t* i, void* c )
- {
- m_sig_info = i;
- m_context = c;
- }
- void report() const;
-
-private:
- // Data members
- siginfo_t* m_sig_info; // system signal detailed info
- void* m_context; // signal context
-};
-
-//____________________________________________________________________________//
-
-void
-system_signal_exception::report() const
-{
- if( !m_sig_info )
- return; // no error actually occur?
-
- switch( m_sig_info->si_code ) {
-#ifdef __VXWORKS__
-// a bit of a hack to adapt code to small m_sig_info VxWorks uses
-#define si_addr si_value.sival_int
-#define si_band si_value.sival_int
-#else
- case SI_USER:
- report_error( execution_exception::system_error,
- "signal: generated by kill() (or family); uid=%d; pid=%d",
- (int)m_sig_info->si_uid, (int)m_sig_info->si_pid );
- break;
-#endif
- case SI_QUEUE:
- report_error( execution_exception::system_error,
- "signal: sent by sigqueue()" );
- break;
- case SI_TIMER:
- report_error( execution_exception::system_error,
- "signal: the expiration of a timer set by timer_settimer()" );
- break;
- case SI_ASYNCIO:
- report_error( execution_exception::system_error,
- "signal: generated by the completion of an asynchronous I/O request" );
- break;
- case SI_MESGQ:
- report_error( execution_exception::system_error,
- "signal: generated by the the arrival of a message on an empty message queue" );
- break;
- default:
- break;
- }
-
- switch( m_sig_info->si_signo ) {
- case SIGILL:
- switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
- case ILL_ILLOPC:
- report_error( execution_exception::system_fatal_error,
- "signal: illegal opcode; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case ILL_ILLTRP:
- report_error( execution_exception::system_fatal_error,
- "signal: illegal trap; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case ILL_PRVREG:
- report_error( execution_exception::system_fatal_error,
- "signal: privileged register; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case ILL_BADSTK:
- report_error( execution_exception::system_fatal_error,
- "signal: internal stack error; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
-#endif
- case ILL_ILLOPN:
- report_error( execution_exception::system_fatal_error,
- "signal: illegal operand; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case ILL_ILLADR:
- report_error( execution_exception::system_fatal_error,
- "signal: illegal addressing mode; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case ILL_PRVOPC:
- report_error( execution_exception::system_fatal_error,
- "signal: privileged opcode; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case ILL_COPROC:
- report_error( execution_exception::system_fatal_error,
- "signal: co-processor error; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- default:
- report_error( execution_exception::system_fatal_error,
- "signal: SIGILL, si_code: %d (illegal instruction; address of failing instruction: 0x%08lx)",
- m_sig_info->si_addr, m_sig_info->si_code );
- break;
- }
- break;
-
- case SIGFPE:
- switch( m_sig_info->si_code ) {
- case FPE_INTDIV:
- report_error( execution_exception::system_error,
- "signal: integer divide by zero; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case FPE_INTOVF:
- report_error( execution_exception::system_error,
- "signal: integer overflow; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case FPE_FLTDIV:
- report_error( execution_exception::system_error,
- "signal: floating point divide by zero; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case FPE_FLTOVF:
- report_error( execution_exception::system_error,
- "signal: floating point overflow; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case FPE_FLTUND:
- report_error( execution_exception::system_error,
- "signal: floating point underflow; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case FPE_FLTRES:
- report_error( execution_exception::system_error,
- "signal: floating point inexact result; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case FPE_FLTINV:
- report_error( execution_exception::system_error,
- "signal: invalid floating point operation; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- case FPE_FLTSUB:
- report_error( execution_exception::system_error,
- "signal: subscript out of range; address of failing instruction: 0x%08lx",
- m_sig_info->si_addr );
- break;
- default:
- report_error( execution_exception::system_error,
- "signal: SIGFPE, si_code: %d (errnoneous arithmetic operations; address of failing instruction: 0x%08lx)",
- m_sig_info->si_addr, m_sig_info->si_code );
- break;
- }
- break;
-
- case SIGSEGV:
- switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
- case SEGV_MAPERR:
- report_error( execution_exception::system_fatal_error,
- "memory access violation at address: 0x%08lx: no mapping at fault address",
- m_sig_info->si_addr );
- break;
- case SEGV_ACCERR:
- report_error( execution_exception::system_fatal_error,
- "memory access violation at address: 0x%08lx: invalid permissions",
- m_sig_info->si_addr );
- break;
-#endif
- default:
- report_error( execution_exception::system_fatal_error,
- "signal: SIGSEGV, si_code: %d (memory access violation at address: 0x%08lx)",
- m_sig_info->si_addr, m_sig_info->si_code );
- break;
- }
- break;
-
- case SIGBUS:
- switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
- case BUS_ADRALN:
- report_error( execution_exception::system_fatal_error,
- "memory access violation at address: 0x%08lx: invalid address alignment",
- m_sig_info->si_addr );
- break;
- case BUS_ADRERR:
- report_error( execution_exception::system_fatal_error,
- "memory access violation at address: 0x%08lx: non-existent physical address",
- m_sig_info->si_addr );
- break;
- case BUS_OBJERR:
- report_error( execution_exception::system_fatal_error,
- "memory access violation at address: 0x%08lx: object specific hardware error",
- m_sig_info->si_addr );
- break;
-#endif
- default:
- report_error( execution_exception::system_fatal_error,
- "signal: SIGSEGV, si_code: %d (memory access violation at address: 0x%08lx)",
- m_sig_info->si_addr, m_sig_info->si_code );
- break;
- }
- break;
-
-#if defined(BOOST_TEST_CATCH_SIGPOLL)
-
- case SIGPOLL:
- switch( m_sig_info->si_code ) {
-#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
- case POLL_IN:
- report_error( execution_exception::system_error,
- "data input available; band event %d",
- (int)m_sig_info->si_band );
- break;
- case POLL_OUT:
- report_error( execution_exception::system_error,
- "output buffers available; band event %d",
- (int)m_sig_info->si_band );
- break;
- case POLL_MSG:
- report_error( execution_exception::system_error,
- "input message available; band event %d",
- (int)m_sig_info->si_band );
- break;
- case POLL_ERR:
- report_error( execution_exception::system_error,
- "i/o error; band event %d",
- (int)m_sig_info->si_band );
- break;
- case POLL_PRI:
- report_error( execution_exception::system_error,
- "high priority input available; band event %d",
- (int)m_sig_info->si_band );
- break;
-#if defined(POLL_ERR) && defined(POLL_HUP) && (POLL_ERR - POLL_HUP)
- case POLL_HUP:
- report_error( execution_exception::system_error,
- "device disconnected; band event %d",
- (int)m_sig_info->si_band );
- break;
-#endif
-#endif
- default:
- report_error( execution_exception::system_error,
- "signal: SIGPOLL, si_code: %d (asynchronous I/O event occurred; band event %d)",
- (int)m_sig_info->si_band, m_sig_info->si_code );
- break;
- }
- break;
-
-#endif
-
- case SIGABRT:
- report_error( execution_exception::system_error,
- "signal: SIGABRT (application abort requested)" );
- break;
-
- case SIGALRM:
- report_error( execution_exception::timeout_error,
- "signal: SIGALRM (timeout while executing function)" );
- break;
-
- default:
- report_error( execution_exception::system_error,
- "unrecognized signal %d", m_sig_info->si_signo );
- }
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** boost::detail::signal_action ************** //
-// ************************************************************************** //
-
-// Forward declaration
-extern "C" {
-static void boost_execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context );
-static void boost_execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context );
-}
-
-class signal_action {
- typedef struct sigaction* sigaction_ptr;
-public:
- //Constructor
- signal_action();
- signal_action( int sig, bool install, bool attach_dbg, char* alt_stack );
- ~signal_action();
-
-private:
- // Data members
- int m_sig;
- bool m_installed;
- struct sigaction m_new_action;
- struct sigaction m_old_action;
-};
-
-//____________________________________________________________________________//
-
-signal_action::signal_action()
-: m_installed( false )
-{}
-
-//____________________________________________________________________________//
-
-signal_action::signal_action( int sig, bool install, bool attach_dbg, char* alt_stack )
-: m_sig( sig )
-, m_installed( install )
-{
- if( !install )
- return;
-
- std::memset( &m_new_action, 0, sizeof(struct sigaction) );
-
- BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig , sigaction_ptr(), &m_new_action ) != -1 );
-
- if( m_new_action.sa_sigaction || m_new_action.sa_handler ) {
- m_installed = false;
- return;
- }
-
- m_new_action.sa_flags |= SA_SIGINFO;
- m_new_action.sa_sigaction = attach_dbg ? &boost_execution_monitor_attaching_signal_handler
- : &boost_execution_monitor_jumping_signal_handler;
- BOOST_TEST_SYS_ASSERT( sigemptyset( &m_new_action.sa_mask ) != -1 );
-
-#ifdef BOOST_TEST_USE_ALT_STACK
- if( alt_stack )
- m_new_action.sa_flags |= SA_ONSTACK;
-#endif
-
- BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig, &m_new_action, &m_old_action ) != -1 );
-}
-
-//____________________________________________________________________________//
-
-signal_action::~signal_action()
-{
- if( m_installed )
- ::sigaction( m_sig, &m_old_action , sigaction_ptr() );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** boost::detail::signal_handler ************** //
-// ************************************************************************** //
-
-class signal_handler {
-public:
- // Constructor
- explicit signal_handler( bool catch_system_errors, bool detect_fpe, unsigned timeout, bool attach_dbg, char* alt_stack );
-
- // Destructor
- ~signal_handler();
-
- // access methods
- static sigjmp_buf& jump_buffer()
- {
- assert( !!s_active_handler );
-
- return s_active_handler->m_sigjmp_buf;
- }
-
- static system_signal_exception& sys_sig()
- {
- assert( !!s_active_handler );
-
- return s_active_handler->m_sys_sig;
- }
-
-private:
- // Data members
- signal_handler* m_prev_handler;
- unsigned m_timeout;
-
- // Note: We intentionality do not catch SIGCHLD. Users have to deal with it themselves
- signal_action m_ILL_action;
- signal_action m_FPE_action;
- signal_action m_SEGV_action;
- signal_action m_BUS_action;
- signal_action m_CHLD_action;
- signal_action m_POLL_action;
- signal_action m_ABRT_action;
- signal_action m_ALRM_action;
-
- sigjmp_buf m_sigjmp_buf;
- system_signal_exception m_sys_sig;
-
- static signal_handler* s_active_handler;
-};
-
-// !! need to be placed in thread specific storage
-typedef signal_handler* signal_handler_ptr;
-signal_handler* signal_handler::s_active_handler = signal_handler_ptr();
-
-//____________________________________________________________________________//
-
-signal_handler::signal_handler( bool catch_system_errors, bool detect_fpe, unsigned timeout, bool attach_dbg, char* alt_stack )
-: m_prev_handler( s_active_handler )
-, m_timeout( timeout )
-, m_ILL_action ( SIGILL , catch_system_errors, attach_dbg, alt_stack )
-, m_FPE_action ( SIGFPE , detect_fpe , attach_dbg, alt_stack )
-, m_SEGV_action( SIGSEGV, catch_system_errors, attach_dbg, alt_stack )
-, m_BUS_action ( SIGBUS , catch_system_errors, attach_dbg, alt_stack )
-#ifdef BOOST_TEST_CATCH_SIGPOLL
-, m_POLL_action( SIGPOLL, catch_system_errors, attach_dbg, alt_stack )
-#endif
-, m_ABRT_action( SIGABRT, catch_system_errors, attach_dbg, alt_stack )
-, m_ALRM_action( SIGALRM, timeout > 0 , attach_dbg, alt_stack )
-{
- s_active_handler = this;
-
- if( m_timeout > 0 ) {
- ::alarm( 0 );
- ::alarm( timeout );
- }
-
-#ifdef BOOST_TEST_USE_ALT_STACK
- if( alt_stack ) {
- stack_t sigstk;
- std::memset( &sigstk, 0, sizeof(stack_t) );
-
- BOOST_TEST_SYS_ASSERT( ::sigaltstack( 0, &sigstk ) != -1 );
-
- if( sigstk.ss_flags & SS_DISABLE ) {
- sigstk.ss_sp = alt_stack;
- sigstk.ss_size = BOOST_TEST_ALT_STACK_SIZE;
- sigstk.ss_flags = 0;
- BOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
- }
- }
-#endif
-}
-
-//____________________________________________________________________________//
-
-signal_handler::~signal_handler()
-{
- assert( s_active_handler == this );
-
- if( m_timeout > 0 )
- ::alarm( 0 );
-
-#ifdef BOOST_TEST_USE_ALT_STACK
-#ifdef __GNUC__
- // We shouldn't need to explicitly initialize all the members here,
- // but gcc warns if we don't, so add initializers for each of the
- // members specified in the POSIX std:
- stack_t sigstk = { 0, 0, 0 };
-#else
- stack_t sigstk = { };
-#endif
-
- sigstk.ss_size = MINSIGSTKSZ;
- sigstk.ss_flags = SS_DISABLE;
- if( ::sigaltstack( &sigstk, 0 ) == -1 ) {
- int error_n = errno;
- std::cerr << "******** errors disabling the alternate stack:" << std::endl
- << "\t#error:" << error_n << std::endl
- << "\t" << std::strerror( error_n ) << std::endl;
- }
-#endif
-
- s_active_handler = m_prev_handler;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** execution_monitor_signal_handler ************** //
-// ************************************************************************** //
-
-extern "C" {
-
-static void boost_execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context )
-{
- signal_handler::sys_sig()( info, context );
-
- siglongjmp( signal_handler::jump_buffer(), sig );
-}
-
-//____________________________________________________________________________//
-
-static void boost_execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context )
-{
- if( !debug::attach_debugger( false ) )
- boost_execution_monitor_jumping_signal_handler( sig, info, context );
-
- // debugger attached; it will handle the signal
- BOOST_TEST_SYS_ASSERT( ::signal( sig, SIG_DFL ) != SIG_ERR );
-}
-
-//____________________________________________________________________________//
-
-}
-
-} // namespace detail
-
-// ************************************************************************** //
-// ************** execution_monitor::catch_signals ************** //
-// ************************************************************************** //
-
-int
-execution_monitor::catch_signals( boost::function<int ()> const& F )
-{
- using namespace detail;
-
-#if defined(__CYGWIN__)
- p_catch_system_errors.value = false;
-#endif
-
-#ifdef BOOST_TEST_USE_ALT_STACK
- if( !!p_use_alt_stack && !m_alt_stack )
- m_alt_stack.reset( new char[BOOST_TEST_ALT_STACK_SIZE] );
-#else
- p_use_alt_stack.value = false;
-#endif
-
- signal_handler local_signal_handler( p_catch_system_errors,
- p_catch_system_errors || (p_detect_fp_exceptions != fpe::BOOST_FPE_OFF),
- p_timeout,
- p_auto_start_dbg,
- !p_use_alt_stack ? 0 : m_alt_stack.get() );
-
- if( !sigsetjmp( signal_handler::jump_buffer(), 1 ) )
- return detail::do_invoke( m_custom_translators , F );
- else
- BOOST_TEST_I_THROW( local_signal_handler.sys_sig() );
-}
-
-//____________________________________________________________________________//
-
-#elif defined(BOOST_SEH_BASED_SIGNAL_HANDLING)
-
-// ************************************************************************** //
-// ************** Microsoft structured exception handling ************** //
-// ************************************************************************** //
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564))
-namespace { void _set_se_translator( void* ) {} }
-#endif
-
-namespace detail {
-
-// ************************************************************************** //
-// ************** boost::detail::system_signal_exception ************** //
-// ************************************************************************** //
-
-class system_signal_exception {
-public:
- // Constructor
- explicit system_signal_exception( execution_monitor* em )
- : m_em( em )
- , m_se_id( 0 )
- , m_fault_address( 0 )
- , m_dir( false )
- {}
-
- void report() const;
- int operator()( unsigned id, _EXCEPTION_POINTERS* exps );
-
-private:
- // Data members
- execution_monitor* m_em;
-
- unsigned m_se_id;
- void* m_fault_address;
- bool m_dir;
-};
-
-//____________________________________________________________________________//
-
-#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
-static void
-seh_catch_preventer( unsigned /* id */, _EXCEPTION_POINTERS* /* exps */ )
-{
- throw;
-}
-#endif
-
-//____________________________________________________________________________//
-
-int
-system_signal_exception::operator()( unsigned id, _EXCEPTION_POINTERS* exps )
-{
- const unsigned MSFT_CPP_EXCEPT = 0xE06d7363; // EMSC
-
- // C++ exception - allow to go through
- if( id == MSFT_CPP_EXCEPT )
- return EXCEPTION_CONTINUE_SEARCH;
-
- // FPE detection is enabled, while system exception detection is not - check if this is actually FPE
- if( !m_em->p_catch_system_errors ) {
- if( !m_em->p_detect_fp_exceptions )
- return EXCEPTION_CONTINUE_SEARCH;
-
- switch( id ) {
- case EXCEPTION_FLT_DIVIDE_BY_ZERO:
- case EXCEPTION_FLT_STACK_CHECK:
- case EXCEPTION_FLT_DENORMAL_OPERAND:
- case EXCEPTION_FLT_INEXACT_RESULT:
- case EXCEPTION_FLT_OVERFLOW:
- case EXCEPTION_FLT_UNDERFLOW:
- case EXCEPTION_FLT_INVALID_OPERATION:
- case STATUS_FLOAT_MULTIPLE_FAULTS:
- case STATUS_FLOAT_MULTIPLE_TRAPS:
- break;
- default:
- return EXCEPTION_CONTINUE_SEARCH;
- }
- }
-
- if( !!m_em->p_auto_start_dbg && debug::attach_debugger( false ) ) {
- m_em->p_catch_system_errors.value = false;
-#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
- _set_se_translator( &seh_catch_preventer );
-#endif
- return EXCEPTION_CONTINUE_EXECUTION;
- }
-
- m_se_id = id;
- if( m_se_id == EXCEPTION_ACCESS_VIOLATION && exps->ExceptionRecord->NumberParameters == 2 ) {
- m_fault_address = (void*)exps->ExceptionRecord->ExceptionInformation[1];
- m_dir = exps->ExceptionRecord->ExceptionInformation[0] == 0;
- }
-
- return EXCEPTION_EXECUTE_HANDLER;
-}
-
-//____________________________________________________________________________//
-
-void
-system_signal_exception::report() const
-{
- switch( m_se_id ) {
- // cases classified as system_fatal_error
- case EXCEPTION_ACCESS_VIOLATION: {
- if( !m_fault_address )
- detail::report_error( execution_exception::system_fatal_error, "memory access violation" );
- else
- detail::report_error(
- execution_exception::system_fatal_error,
- "memory access violation occurred at address 0x%08lx, while attempting to %s",
- m_fault_address,
- m_dir ? " read inaccessible data"
- : " write to an inaccessible (or protected) address"
- );
- break;
- }
-
- case EXCEPTION_ILLEGAL_INSTRUCTION:
- detail::report_error( execution_exception::system_fatal_error, "illegal instruction" );
- break;
-
- case EXCEPTION_PRIV_INSTRUCTION:
- detail::report_error( execution_exception::system_fatal_error, "tried to execute an instruction whose operation is not allowed in the current machine mode" );
- break;
-
- case EXCEPTION_IN_PAGE_ERROR:
- detail::report_error( execution_exception::system_fatal_error, "access to a memory page that is not present" );
- break;
-
- case EXCEPTION_STACK_OVERFLOW:
- detail::report_error( execution_exception::system_fatal_error, "stack overflow" );
- break;
-
- case EXCEPTION_NONCONTINUABLE_EXCEPTION:
- detail::report_error( execution_exception::system_fatal_error, "tried to continue execution after a non continuable exception occurred" );
- break;
-
- // cases classified as (non-fatal) system_trap
- case EXCEPTION_DATATYPE_MISALIGNMENT:
- detail::report_error( execution_exception::system_error, "data misalignment" );
- break;
-
- case EXCEPTION_INT_DIVIDE_BY_ZERO:
- detail::report_error( execution_exception::system_error, "integer divide by zero" );
- break;
-
- case EXCEPTION_INT_OVERFLOW:
- detail::report_error( execution_exception::system_error, "integer overflow" );
- break;
-
- case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
- detail::report_error( execution_exception::system_error, "array bounds exceeded" );
- break;
-
- case EXCEPTION_FLT_DIVIDE_BY_ZERO:
- detail::report_error( execution_exception::system_error, "floating point divide by zero" );
- break;
-
- case EXCEPTION_FLT_STACK_CHECK:
- detail::report_error( execution_exception::system_error,
- "stack overflowed or underflowed as the result of a floating-point operation" );
- break;
-
- case EXCEPTION_FLT_DENORMAL_OPERAND:
- detail::report_error( execution_exception::system_error,
- "operand of floating point operation is denormal" );
- break;
-
- case EXCEPTION_FLT_INEXACT_RESULT:
- detail::report_error( execution_exception::system_error,
- "result of a floating-point operation cannot be represented exactly" );
- break;
-
- case EXCEPTION_FLT_OVERFLOW:
- detail::report_error( execution_exception::system_error,
- "exponent of a floating-point operation is greater than the magnitude allowed by the corresponding type" );
- break;
-
- case EXCEPTION_FLT_UNDERFLOW:
- detail::report_error( execution_exception::system_error,
- "exponent of a floating-point operation is less than the magnitude allowed by the corresponding type" );
- break;
-
- case EXCEPTION_FLT_INVALID_OPERATION:
- detail::report_error( execution_exception::system_error, "floating point error" );
- break;
-
- case STATUS_FLOAT_MULTIPLE_FAULTS:
- detail::report_error( execution_exception::system_error, "multiple floating point errors" );
- break;
-
- case STATUS_FLOAT_MULTIPLE_TRAPS:
- detail::report_error( execution_exception::system_error, "multiple floating point errors" );
- break;
-
- case EXCEPTION_BREAKPOINT:
- detail::report_error( execution_exception::system_error, "breakpoint encountered" );
- break;
-
- default:
- detail::report_error( execution_exception::system_error, "unrecognized exception. Id: 0x%08lx", m_se_id );
- break;
- }
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** assert_reporting_function ************** //
-// ************************************************************************** //
-
-int BOOST_TEST_CALL_DECL
-assert_reporting_function( int reportType, char* userMessage, int* )
-{
- // write this way instead of switch to avoid unreachable statements
- if( reportType == BOOST_TEST_CRT_ASSERT || reportType == BOOST_TEST_CRT_ERROR )
- detail::report_error( reportType == BOOST_TEST_CRT_ASSERT ? execution_exception::user_error : execution_exception::system_error, userMessage );
-
- return 0;
-} // assert_reporting_function
-
-//____________________________________________________________________________//
-
-void BOOST_TEST_CALL_DECL
-invalid_param_handler( wchar_t const* /* expr */,
- wchar_t const* /* func */,
- wchar_t const* /* file */,
- unsigned /* line */,
- uintptr_t /* reserved */)
-{
- detail::report_error( execution_exception::user_error,
- "Invalid parameter detected by C runtime library" );
-}
-
-//____________________________________________________________________________//
-
-} // namespace detail
-
-// ************************************************************************** //
-// ************** execution_monitor::catch_signals ************** //
-// ************************************************************************** //
-
-int
-execution_monitor::catch_signals( boost::function<int ()> const& F )
-{
- _invalid_parameter_handler old_iph = _invalid_parameter_handler();
- BOOST_TEST_CRT_HOOK_TYPE old_crt_hook = 0;
-
- if( p_catch_system_errors ) {
- old_crt_hook = BOOST_TEST_CRT_SET_HOOK( &detail::assert_reporting_function );
-
- old_iph = _set_invalid_parameter_handler(
- reinterpret_cast<_invalid_parameter_handler>( &detail::invalid_param_handler ) );
- } else if( !p_detect_fp_exceptions ) {
-#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
- _set_se_translator( &detail::seh_catch_preventer );
-#endif
- }
-
- detail::system_signal_exception SSE( this );
-
- int ret_val = 0;
- // clang windows workaround: this not available in __finally scope
- bool l_catch_system_errors = p_catch_system_errors;
-
- __try {
- __try {
- ret_val = detail::do_invoke( m_custom_translators, F );
- }
- __except( SSE( GetExceptionCode(), GetExceptionInformation() ) ) {
- throw SSE;
- }
- }
- __finally {
- if( l_catch_system_errors ) {
- BOOST_TEST_CRT_SET_HOOK( old_crt_hook );
-
- _set_invalid_parameter_handler( old_iph );
- }
- }
-
- return ret_val;
-}
-
-//____________________________________________________________________________//
-
-#else // default signal handler
-
-namespace detail {
-
-class system_signal_exception {
-public:
- void report() const {}
-};
-
-} // namespace detail
-
-int
-execution_monitor::catch_signals( boost::function<int ()> const& F )
-{
- return detail::do_invoke( m_custom_translators , F );
-}
-
-//____________________________________________________________________________//
-
-#endif // choose signal handler
-
-// ************************************************************************** //
-// ************** execution_monitor ************** //
-// ************************************************************************** //
-
-execution_monitor::execution_monitor()
-: p_catch_system_errors( true )
-, p_auto_start_dbg( false )
-, p_timeout( 0 )
-, p_use_alt_stack( true )
-, p_detect_fp_exceptions( fpe::BOOST_FPE_OFF )
-{}
-
-//____________________________________________________________________________//
-
-int
-execution_monitor::execute( boost::function<int ()> const& F )
-{
- if( debug::under_debugger() )
- p_catch_system_errors.value = false;
-
- BOOST_TEST_I_TRY {
- detail::fpe_except_guard G( p_detect_fp_exceptions );
- unit_test::ut_detail::ignore_unused_variable_warning( G );
-
- return catch_signals( F );
- }
-
-#ifndef BOOST_NO_EXCEPTIONS
-
- // Catch-clause reference arguments are a bit different from function
- // arguments (ISO 15.3 paragraphs 18 & 19). Apparently const isn't
- // required. Programmers ask for const anyhow, so we supply it. That's
- // easier than answering questions about non-const usage.
-
- catch( char const* ex )
- { detail::report_error( execution_exception::cpp_exception_error,
- "C string: %s", ex ); }
- catch( std::string const& ex )
- { detail::report_error( execution_exception::cpp_exception_error,
- "std::string: %s", ex.c_str() ); }
-
- // std:: exceptions
-#if defined(BOOST_NO_TYPEID) || defined(BOOST_NO_RTTI)
-#define CATCH_AND_REPORT_STD_EXCEPTION( ex_name ) \
- catch( ex_name const& ex ) \
- { detail::report_error( execution_exception::cpp_exception_error, \
- current_exception_cast<boost::exception const>(), \
- #ex_name ": %s", ex.what() ); } \
-/**/
-#else
-#define CATCH_AND_REPORT_STD_EXCEPTION( ex_name ) \
- catch( ex_name const& ex ) \
- { detail::report_error( execution_exception::cpp_exception_error, \
- current_exception_cast<boost::exception const>(), \
- "%s: %s", detail::typeid_name(ex).c_str(), ex.what() ); } \
-/**/
-#endif
-
- CATCH_AND_REPORT_STD_EXCEPTION( std::bad_alloc )
-
-#if BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
- CATCH_AND_REPORT_STD_EXCEPTION( std::bad_cast )
- CATCH_AND_REPORT_STD_EXCEPTION( std::bad_typeid )
-#else
- CATCH_AND_REPORT_STD_EXCEPTION( std::bad_cast )
- CATCH_AND_REPORT_STD_EXCEPTION( std::bad_typeid )
-#endif
-
- CATCH_AND_REPORT_STD_EXCEPTION( std::bad_exception )
- CATCH_AND_REPORT_STD_EXCEPTION( std::domain_error )
- CATCH_AND_REPORT_STD_EXCEPTION( std::invalid_argument )
- CATCH_AND_REPORT_STD_EXCEPTION( std::length_error )
- CATCH_AND_REPORT_STD_EXCEPTION( std::out_of_range )
- CATCH_AND_REPORT_STD_EXCEPTION( std::range_error )
- CATCH_AND_REPORT_STD_EXCEPTION( std::overflow_error )
- CATCH_AND_REPORT_STD_EXCEPTION( std::underflow_error )
- CATCH_AND_REPORT_STD_EXCEPTION( std::logic_error )
- CATCH_AND_REPORT_STD_EXCEPTION( std::runtime_error )
- CATCH_AND_REPORT_STD_EXCEPTION( std::exception )
-#undef CATCH_AND_REPORT_STD_EXCEPTION
-
- catch( boost::exception const& ex )
- { detail::report_error( execution_exception::cpp_exception_error,
- &ex,
-#if defined(BOOST_NO_TYPEID) || defined(BOOST_NO_RTTI)
- "unknown boost::exception" ); }
-#else
- typeid(ex).name() ); }
-#endif
-
- // system errors
- catch( system_error const& ex )
- { detail::report_error( execution_exception::cpp_exception_error,
- "system_error produced by: %s: %s", ex.p_failed_exp, std::strerror( ex.p_errno ) ); }
- catch( detail::system_signal_exception const& ex )
- { ex.report(); }
-
- // not an error
- catch( execution_aborted const& )
- { return 0; }
-
- // just forward
- catch( execution_exception const& )
- { throw; }
-
- // unknown error
- catch( ... )
- { detail::report_error( execution_exception::cpp_exception_error, "unknown type" ); }
-
-#endif // !BOOST_NO_EXCEPTIONS
-
- return 0; // never reached; supplied to quiet compiler warnings
-} // execute
-
-//____________________________________________________________________________//
-
-namespace detail {
-
-struct forward {
- explicit forward( boost::function<void ()> const& F ) : m_F( F ) {}
-
- int operator()() { m_F(); return 0; }
-
- boost::function<void ()> const& m_F;
-};
-
-} // namespace detail
-void
-execution_monitor::vexecute( boost::function<void ()> const& F )
-{
- execute( detail::forward( F ) );
-}
-
-// ************************************************************************** //
-// ************** system_error ************** //
-// ************************************************************************** //
-
-system_error::system_error( char const* exp )
-#ifdef UNDER_CE
-: p_errno( GetLastError() )
-#else
-: p_errno( errno )
-#endif
-, p_failed_exp( exp )
-{}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** execution_exception ************** //
-// ************************************************************************** //
-
-execution_exception::execution_exception( error_code ec_, const_string what_msg_, location const& location_ )
-: m_error_code( ec_ )
-, m_what( what_msg_.empty() ? BOOST_TEST_L( "uncaught exception, system error or abort requested" ) : what_msg_ )
-, m_location( location_ )
-{}
-
-//____________________________________________________________________________//
-
-execution_exception::location::location( char const* file_name, size_t line_num, char const* func )
-: m_file_name( file_name ? file_name : "unknown location" )
-, m_line_num( line_num )
-, m_function( func )
-{}
-
-execution_exception::location::location(const_string file_name, size_t line_num, char const* func )
-: m_file_name( file_name )
-, m_line_num( line_num )
-, m_function( func )
-{}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// **************Floating point exception management interface ************** //
-// ************************************************************************** //
-
-namespace fpe {
-
-unsigned
-enable( unsigned mask )
-{
- boost::ignore_unused(mask);
-#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__)
- _clearfp();
-
-#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
- unsigned old_cw = ::_controlfp( 0, 0 );
- ::_controlfp( old_cw & ~mask, BOOST_FPE_ALL );
-#else
- unsigned old_cw;
- if( ::_controlfp_s( &old_cw, 0, 0 ) != 0 )
- return BOOST_FPE_INV;
-
- // Set the control word
- if( ::_controlfp_s( 0, old_cw & ~mask, BOOST_FPE_ALL ) != 0 )
- return BOOST_FPE_INV;
-#endif
- return ~old_cw & BOOST_FPE_ALL;
-
-#elif defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__)
- // same macro definition as in execution_monitor.hpp
- if (BOOST_FPE_ALL == BOOST_FPE_OFF)
- /* Not Implemented */
- return BOOST_FPE_OFF;
- feclearexcept(BOOST_FPE_ALL);
- int res = feenableexcept( mask );
- return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
-#else
- /* Not Implemented */
- return BOOST_FPE_OFF;
-#endif
-}
-
-//____________________________________________________________________________//
-
-unsigned
-disable( unsigned mask )
-{
- boost::ignore_unused(mask);
-
-#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__)
- _clearfp();
-#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
- unsigned old_cw = ::_controlfp( 0, 0 );
- ::_controlfp( old_cw | mask, BOOST_FPE_ALL );
-#else
- unsigned old_cw;
- if( ::_controlfp_s( &old_cw, 0, 0 ) != 0 )
- return BOOST_FPE_INV;
-
- // Set the control word
- if( ::_controlfp_s( 0, old_cw | mask, BOOST_FPE_ALL ) != 0 )
- return BOOST_FPE_INV;
-#endif
- return ~old_cw & BOOST_FPE_ALL;
-
-#elif defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__)
- if (BOOST_FPE_ALL == BOOST_FPE_OFF)
- /* Not Implemented */
- return BOOST_FPE_INV;
- feclearexcept(BOOST_FPE_ALL);
- int res = fedisableexcept( mask );
- return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
-#else
- /* Not Implemented */
- return BOOST_FPE_INV;
-#endif
-}
-
-//____________________________________________________________________________//
-
-} // namespace fpe
-
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/framework.ipp b/src/third_party/boost-1.68.0/boost/test/impl/framework.ipp
deleted file mode 100644
index ddb0144d27d..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/framework.ipp
+++ /dev/null
@@ -1,1723 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : implements framework API - main driver for the test
-// ***************************************************************************
-
-#ifndef BOOST_TEST_FRAMEWORK_IPP_021005GER
-#define BOOST_TEST_FRAMEWORK_IPP_021005GER
-
-// Boost.Test
-#include <boost/test/framework.hpp>
-#include <boost/test/execution_monitor.hpp>
-#include <boost/test/debug.hpp>
-#include <boost/test/unit_test_parameters.hpp>
-
-#include <boost/test/unit_test_log.hpp>
-#include <boost/test/unit_test_log_formatter.hpp>
-#include <boost/test/unit_test_monitor.hpp>
-#include <boost/test/results_collector.hpp>
-#include <boost/test/progress_monitor.hpp>
-#include <boost/test/results_reporter.hpp>
-#include <boost/test/test_framework_init_observer.hpp>
-
-#include <boost/test/tree/observer.hpp>
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/tree/visitor.hpp>
-#include <boost/test/tree/traverse.hpp>
-#include <boost/test/tree/test_case_counter.hpp>
-
-#if BOOST_TEST_SUPPORT_TOKEN_ITERATOR
-#include <boost/test/utils/iterator/token_iterator.hpp>
-#endif
-
-#include <boost/test/utils/foreach.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-#include <boost/test/utils/basic_cstring/compare.hpp>
-
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/throw_exception.hpp>
-
-// Boost
-#include <boost/timer.hpp>
-#include <boost/bind.hpp>
-
-// STL
-#include <limits>
-#include <map>
-#include <set>
-#include <cstdlib>
-#include <ctime>
-#include <numeric>
-#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
-#include <iterator>
-#endif
-
-#ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::time; using ::srand; }
-#endif
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace framework {
-
-namespace impl {
-
-// ************************************************************************** //
-// ************** order detection helpers ************** //
-// ************************************************************************** //
-
-struct order_info {
- order_info() : depth(-1) {}
-
- int depth;
- std::vector<test_unit_id> dependant_siblings;
-};
-
-typedef std::set<test_unit_id> tu_id_set;
-typedef std::map<test_unit_id,order_info> order_info_per_tu; // !! ?? unordered map
-
-//____________________________________________________________________________//
-
-static test_unit_id
-get_tu_parent( test_unit_id tu_id )
-{
- return framework::get( tu_id, TUT_ANY ).p_parent_id;
-}
-
-//____________________________________________________________________________//
-
-static int
-tu_depth( test_unit_id tu_id, test_unit_id master_tu_id, order_info_per_tu& tuoi )
-{
- if( tu_id == master_tu_id )
- return 0;
-
- order_info& info = tuoi[tu_id];
-
- if( info.depth == -1 )
- info.depth = tu_depth( get_tu_parent( tu_id ), master_tu_id, tuoi ) + 1;
-
- return info.depth;
-}
-
-//____________________________________________________________________________//
-
-static void
-collect_dependant_siblings( test_unit_id from, test_unit_id to, test_unit_id master_tu_id, order_info_per_tu& tuoi )
-{
- int from_depth = tu_depth( from, master_tu_id, tuoi );
- int to_depth = tu_depth( to, master_tu_id, tuoi );
-
- while(from_depth > to_depth) {
- from = get_tu_parent( from );
- --from_depth;
- }
-
- while(from_depth < to_depth) {
- to = get_tu_parent( to );
- --to_depth;
- }
-
- while(true) {
- test_unit_id from_parent = get_tu_parent( from );
- test_unit_id to_parent = get_tu_parent( to );
- if( from_parent == to_parent )
- break;
- from = from_parent;
- to = to_parent;
- }
-
- tuoi[from].dependant_siblings.push_back( to );
-}
-
-//____________________________________________________________________________//
-
-static counter_t
-assign_sibling_rank( test_unit_id tu_id, order_info_per_tu& tuoi )
-{
- test_unit& tu = framework::get( tu_id, TUT_ANY );
-
- BOOST_TEST_SETUP_ASSERT( tu.p_sibling_rank != (std::numeric_limits<counter_t>::max)(),
- "Cyclic dependency detected involving test unit \"" + tu.full_name() + "\"" );
-
- if( tu.p_sibling_rank != 0 )
- return tu.p_sibling_rank;
-
- order_info const& info = tuoi[tu_id];
-
- // indicate in progress
- tu.p_sibling_rank.value = (std::numeric_limits<counter_t>::max)();
-
- counter_t new_rank = 1;
- BOOST_TEST_FOREACH( test_unit_id, sibling_id, info.dependant_siblings )
- new_rank = (std::max)(new_rank, assign_sibling_rank( sibling_id, tuoi ) + 1);
-
- return tu.p_sibling_rank.value = new_rank;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** test_init call wrapper ************** //
-// ************************************************************************** //
-
-static void
-invoke_init_func( init_unit_test_func init_func )
-{
-#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
- BOOST_TEST_I_ASSRT( (*init_func)(), std::runtime_error( "test module initialization failed" ) );
-#else
- test_suite* manual_test_units = (*init_func)( framework::master_test_suite().argc, framework::master_test_suite().argv );
-
- if( manual_test_units )
- framework::master_test_suite().add( manual_test_units );
-#endif
-}
-
-// ************************************************************************** //
-// ************** name_filter ************** //
-// ************************************************************************** //
-
-class name_filter : public test_tree_visitor {
- struct component {
- component( const_string name ) // has to be implicit
- {
- if( name == "*" )
- m_kind = SFK_ALL;
- else if( first_char( name ) == '*' && last_char( name ) == '*' ) {
- m_kind = SFK_SUBSTR;
- m_name = name.substr( 1, name.size()-1 );
- }
- else if( first_char( name ) == '*' ) {
- m_kind = SFK_TRAILING;
- m_name = name.substr( 1 );
- }
- else if( last_char( name ) == '*' ) {
- m_kind = SFK_LEADING;
- m_name = name.substr( 0, name.size()-1 );
- }
- else {
- m_kind = SFK_MATCH;
- m_name = name;
- }
- }
-
- bool pass( test_unit const& tu ) const
- {
- const_string name( tu.p_name );
-
- switch( m_kind ) {
- default:
- case SFK_ALL:
- return true;
- case SFK_LEADING:
- return name.substr( 0, m_name.size() ) == m_name;
- case SFK_TRAILING:
- return name.size() >= m_name.size() && name.substr( name.size() - m_name.size() ) == m_name;
- case SFK_SUBSTR:
- return name.find( m_name ) != const_string::npos;
- case SFK_MATCH:
- return m_name == tu.p_name.get();
- }
- }
- enum kind { SFK_ALL, SFK_LEADING, SFK_TRAILING, SFK_SUBSTR, SFK_MATCH };
-
- kind m_kind;
- const_string m_name;
- };
-
-public:
- // Constructor
- name_filter( test_unit_id_list& targ_list, const_string filter_expr ) : m_targ_list( targ_list ), m_depth( 0 )
- {
-#ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
- utils::string_token_iterator tit( filter_expr, (utils::dropped_delimeters = "/",
- utils::kept_delimeters = utils::dt_none) );
-
- while( tit != utils::string_token_iterator() ) {
- m_components.push_back(
- std::vector<component>( utils::string_token_iterator( *tit, (utils::dropped_delimeters = ",",
- utils::kept_delimeters = utils::dt_none) ),
- utils::string_token_iterator() ) );
-
- ++tit;
- }
-#endif
- }
-
-private:
- bool filter_unit( test_unit const& tu )
- {
- // skip master test suite
- if( m_depth == 0 )
- return true;
-
- // corresponding name filters are at level m_depth-1
- std::vector<component> const& filters = m_components[m_depth-1];
-
- // look for match
- using namespace boost::placeholders;
- return std::find_if( filters.begin(), filters.end(), bind( &component::pass, _1, boost::ref(tu) ) ) != filters.end();
- }
-
- // test_tree_visitor interface
- virtual void visit( test_case const& tc )
- {
- // make sure we only accept test cases if we match last component of the filter
- if( m_depth == m_components.size() && filter_unit( tc ) )
- m_targ_list.push_back( tc.p_id ); // found a test case
- }
- virtual bool test_suite_start( test_suite const& ts )
- {
- if( !filter_unit( ts ) )
- return false;
-
- if( m_depth < m_components.size() ) {
- ++m_depth;
- return true;
- }
-
- m_targ_list.push_back( ts.p_id ); // found a test suite
-
- return false;
- }
- virtual void test_suite_finish( test_suite const& /*ts*/ )
- {
- --m_depth;
- }
-
- // Data members
- typedef std::vector<std::vector<component> > components_per_level;
-
- components_per_level m_components;
- test_unit_id_list& m_targ_list;
- unsigned m_depth;
-};
-
-// ************************************************************************** //
-// ************** label_filter ************** //
-// ************************************************************************** //
-
-class label_filter : public test_tree_visitor {
-public:
- label_filter( test_unit_id_list& targ_list, const_string label )
- : m_targ_list( targ_list )
- , m_label( label )
- {}
-
-private:
- // test_tree_visitor interface
- virtual bool visit( test_unit const& tu )
- {
- if( tu.has_label( m_label ) ) {
- // found a test unit; add it to list of tu to enable with children and stop recursion in case of suites
- m_targ_list.push_back( tu.p_id );
- return false;
- }
-
- return true;
- }
-
- // Data members
- test_unit_id_list& m_targ_list;
- const_string m_label;
-};
-
-// ************************************************************************** //
-// ************** set_run_status ************** //
-// ************************************************************************** //
-
-class set_run_status : public test_tree_visitor {
-public:
- explicit set_run_status( test_unit::run_status rs, test_unit_id_list* dep_collector = 0 )
- : m_new_status( rs )
- , m_dep_collector( dep_collector )
- {}
-
- // test_tree_visitor interface
- virtual bool visit( test_unit const& tu )
- {
- const_cast<test_unit&>(tu).p_run_status.value = m_new_status == test_unit::RS_INVALID ? tu.p_default_status : m_new_status;
- if( m_dep_collector ) {
- BOOST_TEST_FOREACH( test_unit_id, dep_id, tu.p_dependencies.get() ) {
- test_unit const& dep = framework::get( dep_id, TUT_ANY );
-
- if( dep.p_run_status == tu.p_run_status )
- continue;
-
- BOOST_TEST_FRAMEWORK_MESSAGE( "Including test " << dep.p_type_name << ' ' << dep.full_name() <<
- " as a dependency of test " << tu.p_type_name << ' ' << tu.full_name() );
-
- m_dep_collector->push_back( dep_id );
- }
- }
- return true;
- }
-
-private:
- // Data members
- test_unit::run_status m_new_status;
- test_unit_id_list* m_dep_collector;
-};
-
-// ************************************************************************** //
-// ************** parse_filters ************** //
-// ************************************************************************** //
-
-static void
-add_filtered_test_units( test_unit_id master_tu_id, const_string filter, test_unit_id_list& targ )
-{
- // Choose between two kinds of filters
- if( filter[0] == '@' ) {
- filter.trim_left( 1 );
- label_filter lf( targ, filter );
- traverse_test_tree( master_tu_id, lf, true );
- }
- else {
- name_filter nf( targ, filter );
- traverse_test_tree( master_tu_id, nf, true );
- }
-}
-
-//____________________________________________________________________________//
-
-static bool
-parse_filters( test_unit_id master_tu_id, test_unit_id_list& tu_to_enable, test_unit_id_list& tu_to_disable )
-{
- // 10. collect tu to enable and disable based on filters
- bool had_selector_filter = false;
-
- std::vector<std::string> const& filters = runtime_config::get<std::vector<std::string> >( runtime_config::btrt_run_filters );
-
- BOOST_TEST_FOREACH( const_string, filter, filters ) {
- BOOST_TEST_SETUP_ASSERT( !filter.is_empty(), "Invalid filter specification" );
-
- // each --run_test command may also be separated by a ':' (environment variable)
- utils::string_token_iterator t_filter_it( filter, (utils::dropped_delimeters = ":",
- utils::kept_delimeters = utils::dt_none) );
-
- while( t_filter_it != utils::string_token_iterator() ) {
- const_string filter_token = *t_filter_it;
-
- enum { SELECTOR, ENABLER, DISABLER } filter_type = SELECTOR;
-
- // 11. Deduce filter type
- if( filter_token[0] == '!' || filter_token[0] == '+' ) {
- filter_type = filter_token[0] == '+' ? ENABLER : DISABLER;
- filter_token.trim_left( 1 );
- BOOST_TEST_SETUP_ASSERT( !filter_token.is_empty(), "Invalid filter specification" );
- }
-
- had_selector_filter |= filter_type == SELECTOR;
-
- // 12. Add test units to corresponding list
- switch( filter_type ) {
- case SELECTOR:
- case ENABLER: add_filtered_test_units( master_tu_id, filter_token, tu_to_enable ); break;
- case DISABLER: add_filtered_test_units( master_tu_id, filter_token, tu_to_disable ); break;
- }
-
- ++t_filter_it;
- }
- }
-
- return had_selector_filter;
-}
-
-//____________________________________________________________________________//
-
-#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
-
-// a poor man's implementation of random_shuffle
-template< class RandomIt, class RandomFunc >
-void random_shuffle( RandomIt first, RandomIt last, RandomFunc &r )
-{
- typedef typename std::iterator_traits<RandomIt>::difference_type difference_type;
- difference_type n = last - first;
- for (difference_type i = n-1; i > 0; --i) {
- difference_type j = r(i+1);
- if (j != i) {
- using std::swap;
- swap(first[i], first[j]);
- }
- }
-}
-
-#endif
-
-
-// A simple handle for registering the global fixtures to the master test suite
-// without deleting an existing static object (the global fixture itself) when the program
-// terminates (shared_ptr).
-class global_fixture_handle : public test_unit_fixture {
-public:
- global_fixture_handle(test_unit_fixture* fixture) : m_global_fixture(fixture) {}
- ~global_fixture_handle() {}
-
- virtual void setup() {
- m_global_fixture->setup();
- }
- virtual void teardown() {
- m_global_fixture->teardown();
- }
-
-private:
- test_unit_fixture* m_global_fixture;
-};
-
-
-} // namespace impl
-
-// ************************************************************************** //
-// ************** framework::state ************** //
-// ************************************************************************** //
-
-unsigned const TIMEOUT_EXCEEDED = static_cast<unsigned>( -1 );
-
-class state {
-public:
- state()
- : m_master_test_suite( 0 )
- , m_curr_test_unit( INV_TEST_UNIT_ID )
- , m_next_test_case_id( MIN_TEST_CASE_ID )
- , m_next_test_suite_id( MIN_TEST_SUITE_ID )
- , m_test_in_progress( false )
- , m_context_idx( 0 )
- , m_log_sinks( )
- , m_report_sink( std::cerr )
- {
- }
-
- ~state() { clear(); }
-
- void clear()
- {
- while( !m_test_units.empty() ) {
- test_unit_store::value_type const& tu = *m_test_units.begin();
- test_unit const* tu_ptr = tu.second;
-
- // the delete will erase this element from map
- if( ut_detail::test_id_2_unit_type( tu.second->p_id ) == TUT_SUITE )
- delete static_cast<test_suite const*>(tu_ptr);
- else
- delete static_cast<test_case const*>(tu_ptr);
- }
- }
-
- void set_tu_id( test_unit& tu, test_unit_id id ) { tu.p_id.value = id; }
-
- //////////////////////////////////////////////////////////////////
-
- // Validates the dependency graph and deduces the sibling dependency rank for each child
- void deduce_siblings_order( test_unit_id tu_id, test_unit_id master_tu_id, impl::order_info_per_tu& tuoi )
- {
- test_unit& tu = framework::get( tu_id, TUT_ANY );
-
- // collect all sibling dependancy from tu own list
- BOOST_TEST_FOREACH( test_unit_id, dep_id, tu.p_dependencies.get() )
- collect_dependant_siblings( tu_id, dep_id, master_tu_id, tuoi );
-
- if( tu.p_type != TUT_SUITE )
- return;
-
- test_suite& ts = static_cast<test_suite&>(tu);
-
- // recursive call to children first
- BOOST_TEST_FOREACH( test_unit_id, chld_id, ts.m_children )
- deduce_siblings_order( chld_id, master_tu_id, tuoi );
-
- ts.m_ranked_children.clear();
- BOOST_TEST_FOREACH( test_unit_id, chld_id, ts.m_children ) {
- counter_t rank = assign_sibling_rank( chld_id, tuoi );
- ts.m_ranked_children.insert( std::make_pair( rank, chld_id ) );
- }
- }
-
- //////////////////////////////////////////////////////////////////
-
- // Finalize default run status:
- // 1) inherit run status from parent where applicable
- // 2) if any of test units in test suite enabled enable it as well
- bool finalize_default_run_status( test_unit_id tu_id, test_unit::run_status parent_status )
- {
- test_unit& tu = framework::get( tu_id, TUT_ANY );
-
- if( tu.p_default_status == test_suite::RS_INHERIT )
- tu.p_default_status.value = parent_status;
-
- // go through list of children
- if( tu.p_type == TUT_SUITE ) {
- bool has_enabled_child = false;
- BOOST_TEST_FOREACH( test_unit_id, chld_id, static_cast<test_suite const&>(tu).m_children )
- has_enabled_child |= finalize_default_run_status( chld_id, tu.p_default_status );
-
- tu.p_default_status.value = has_enabled_child ? test_suite::RS_ENABLED : test_suite::RS_DISABLED;
- }
-
- return tu.p_default_status == test_suite::RS_ENABLED;
- }
-
- //////////////////////////////////////////////////////////////////
-
- bool finalize_run_status( test_unit_id tu_id )
- {
- test_unit& tu = framework::get( tu_id, TUT_ANY );
-
- // go through list of children
- if( tu.p_type == TUT_SUITE ) {
- bool has_enabled_child = false;
- BOOST_TEST_FOREACH( test_unit_id, chld_id, static_cast<test_suite const&>(tu).m_children)
- has_enabled_child |= finalize_run_status( chld_id );
-
- tu.p_run_status.value = has_enabled_child ? test_suite::RS_ENABLED : test_suite::RS_DISABLED;
- }
-
- return tu.is_enabled();
- }
-
- //////////////////////////////////////////////////////////////////
-
- void deduce_run_status( test_unit_id master_tu_id )
- {
- using namespace framework::impl;
- test_unit_id_list tu_to_enable;
- test_unit_id_list tu_to_disable;
-
- // 10. If there are any filters supplied, figure out lists of test units to enable/disable
- bool had_selector_filter = !runtime_config::get<std::vector<std::string> >( runtime_config::btrt_run_filters ).empty() &&
- parse_filters( master_tu_id, tu_to_enable, tu_to_disable );
-
- // 20. Set the stage: either use default run status or disable all test units
- set_run_status initial_setter( had_selector_filter ? test_unit::RS_DISABLED : test_unit::RS_INVALID );
- traverse_test_tree( master_tu_id, initial_setter, true );
-
- // 30. Apply all selectors and enablers.
- while( !tu_to_enable.empty() ) {
- test_unit& tu = framework::get( tu_to_enable.back(), TUT_ANY );
-
- tu_to_enable.pop_back();
-
- // 35. Ignore test units which are already enabled
- if( tu.is_enabled() )
- continue;
-
- // set new status and add all dependencies into tu_to_enable
- set_run_status enabler( test_unit::RS_ENABLED, &tu_to_enable );
- traverse_test_tree( tu.p_id, enabler, true );
-
- // Add the dependencies of the parent suites, see trac #13149
- test_unit_id parent_id = tu.p_parent_id;
- while( parent_id != INV_TEST_UNIT_ID
- && parent_id != master_tu_id )
- {
- // we do not use the traverse_test_tree as otherwise it would enable the sibblings and subtree
- // of the test case we want to enable (we need to enable the parent suites and their dependencies only)
- // the parent_id needs to be enabled in order to be properly parsed by finalize_run_status, the visit
- // does the job
- test_unit& tu_parent = framework::get( parent_id, TUT_ANY );
- enabler.visit( tu_parent );
- parent_id = tu_parent.p_parent_id;
- }
- }
-
- // 40. Apply all disablers
- while( !tu_to_disable.empty() ) {
- test_unit const& tu = framework::get( tu_to_disable.back(), TUT_ANY );
-
- tu_to_disable.pop_back();
-
- // 35. Ignore test units which already disabled
- if( !tu.is_enabled() )
- continue;
-
- set_run_status disabler( test_unit::RS_DISABLED );
- traverse_test_tree( tu.p_id, disabler, true );
- }
-
- // 50. Make sure parents of enabled test units are also enabled
- finalize_run_status( master_tu_id );
- }
-
- //////////////////////////////////////////////////////////////////
-
- typedef unit_test_monitor_t::error_level execution_result;
-
- // Random generator using the std::rand function (seeded prior to the call)
- struct random_generator_helper {
- size_t operator()(size_t i) const {
- return std::rand() % i;
- }
- };
-
- // Executes the test tree with the root at specified test unit
- execution_result execute_test_tree( test_unit_id tu_id,
- unsigned timeout = 0,
- random_generator_helper const * const p_random_generator = 0)
- {
- test_unit const& tu = framework::get( tu_id, TUT_ANY );
-
- execution_result result = unit_test_monitor_t::test_ok;
-
- if( !tu.is_enabled() )
- return result;
-
- // 10. Check preconditions, including zero time left for execution and
- // successful execution of all dependencies
- if( timeout == TIMEOUT_EXCEEDED ) {
- // notify all observers about skipped test unit
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
- to->test_unit_skipped( tu, "timeout for the test unit is exceeded" );
-
- return unit_test_monitor_t::os_timeout;
- }
- else if( timeout == 0 || timeout > tu.p_timeout ) // deduce timeout for this test unit
- timeout = tu.p_timeout;
-
- test_tools::assertion_result const precondition_res = tu.check_preconditions();
- if( !precondition_res ) {
- // notify all observers about skipped test unit
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
- to->test_unit_skipped( tu, precondition_res.message() );
-
- // It is not an error to skip the test if any of the parent tests
- // have failed. This one should be reported as skipped as if it was
- // disabled
- return unit_test_monitor_t::test_ok;
- }
-
- // 20. Notify all observers about the start of the test unit
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
- to->test_unit_start( tu );
-
- // 30. Execute setup fixtures if any; any failure here leads to test unit abortion
- BOOST_TEST_FOREACH( test_unit_fixture_ptr, F, tu.p_fixtures.get() ) {
- ut_detail::test_unit_id_restore restore_current_test_unit(m_curr_test_unit, tu.p_id);
- result = unit_test_monitor.execute_and_translate( boost::bind( &test_unit_fixture::setup, F ) );
- if( result != unit_test_monitor_t::test_ok )
- break;
- test_results const& test_rslt = unit_test::results_collector.results( m_curr_test_unit );
- if( test_rslt.aborted() ) {
- result = unit_test_monitor_t::test_setup_failure;
- break;
- }
- }
-
- // This is the time we are going to spend executing the test unit
- unsigned long elapsed = 0;
-
- if( result == unit_test_monitor_t::test_ok ) {
- // 40. We are going to time the execution
- boost::timer tu_timer;
-
- // we pass the random generator
- const random_generator_helper& rand_gen = p_random_generator ? *p_random_generator : random_generator_helper();
-
- if( tu.p_type == TUT_SUITE ) {
- test_suite const& ts = static_cast<test_suite const&>( tu );
-
- if( runtime_config::get<unsigned>( runtime_config::btrt_random_seed ) == 0 ) {
- typedef std::pair<counter_t,test_unit_id> value_type;
-
- BOOST_TEST_FOREACH( value_type, chld, ts.m_ranked_children ) {
- unsigned chld_timeout = child_timeout( timeout, tu_timer.elapsed() );
-
- result = (std::min)( result, execute_test_tree( chld.second, chld_timeout, &rand_gen ) );
-
- if( unit_test_monitor.is_critical_error( result ) )
- break;
- }
- }
- else {
- // Go through ranges of children with the same dependency rank and shuffle them
- // independently. Execute each subtree in this order
- test_unit_id_list children_with_the_same_rank;
-
- typedef test_suite::children_per_rank::const_iterator it_type;
- it_type it = ts.m_ranked_children.begin();
- while( it != ts.m_ranked_children.end() ) {
- children_with_the_same_rank.clear();
-
- std::pair<it_type,it_type> range = ts.m_ranked_children.equal_range( it->first );
- it = range.first;
- while( it != range.second ) {
- children_with_the_same_rank.push_back( it->second );
- it++;
- }
-
-#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
- impl::random_shuffle( children_with_the_same_rank.begin(), children_with_the_same_rank.end(), rand_gen );
-#else
- std::random_shuffle( children_with_the_same_rank.begin(), children_with_the_same_rank.end(), rand_gen );
-#endif
-
- BOOST_TEST_FOREACH( test_unit_id, chld, children_with_the_same_rank ) {
- unsigned chld_timeout = child_timeout( timeout, tu_timer.elapsed() );
-
- result = (std::min)( result, execute_test_tree( chld, chld_timeout, &rand_gen ) );
-
- if( unit_test_monitor.is_critical_error( result ) )
- break;
- }
- }
- }
-
- elapsed = static_cast<unsigned long>( tu_timer.elapsed() * 1e6 );
- }
- else { // TUT_CASE
- test_case const& tc = static_cast<test_case const&>( tu );
-
- // setup contexts
- m_context_idx = 0;
-
- // setup current test case
- ut_detail::test_unit_id_restore restore_current_test_unit(m_curr_test_unit, tc.p_id);
-
- // execute the test case body
- result = unit_test_monitor.execute_and_translate( tc.p_test_func, timeout );
- elapsed = static_cast<unsigned long>( tu_timer.elapsed() * 1e6 );
-
- // cleanup leftover context
- m_context.clear();
-
- // restore state (scope exit) and abort if necessary
- }
- }
-
- // if run error is critical skip teardown, who knows what the state of the program at this point
- if( !unit_test_monitor.is_critical_error( result ) ) {
- // execute teardown fixtures if any in reverse order
- BOOST_TEST_REVERSE_FOREACH( test_unit_fixture_ptr, F, tu.p_fixtures.get() ) {
- ut_detail::test_unit_id_restore restore_current_test_unit(m_curr_test_unit, tu.p_id);
- result = (std::min)( result, unit_test_monitor.execute_and_translate( boost::bind( &test_unit_fixture::teardown, F ), 0 ) );
-
- if( unit_test_monitor.is_critical_error( result ) )
- break;
- }
- }
-
- // notify all observers about abortion
- if( unit_test_monitor.is_critical_error( result ) ) {
- BOOST_TEST_FOREACH( test_observer*, to, m_observers )
- to->test_aborted();
- }
-
- // notify all observers about completion
- BOOST_TEST_REVERSE_FOREACH( test_observer*, to, m_observers )
- to->test_unit_finish( tu, elapsed );
-
- return result;
- }
-
- //////////////////////////////////////////////////////////////////
-
- unsigned child_timeout( unsigned tu_timeout, double elapsed )
- {
- if( tu_timeout == 0U )
- return 0U;
-
- unsigned elpsed_sec = static_cast<unsigned>(elapsed); // rounding to number of whole seconds
-
- return tu_timeout > elpsed_sec ? tu_timeout - elpsed_sec : TIMEOUT_EXCEEDED;
- }
-
- struct priority_order {
- bool operator()( test_observer* lhs, test_observer* rhs ) const
- {
- return (lhs->priority() < rhs->priority()) || ((lhs->priority() == rhs->priority()) && (lhs < rhs));
- }
- };
-
- // Data members
- typedef std::map<test_unit_id,test_unit*> test_unit_store;
- typedef std::set<test_observer*,priority_order> observer_store;
- struct context_frame {
- context_frame( std::string const& d, int id, bool sticky )
- : descr( d )
- , frame_id( id )
- , is_sticky( sticky )
- {}
-
- std::string descr;
- int frame_id;
- bool is_sticky;
- };
- typedef std::vector<context_frame> context_data;
-
- master_test_suite_t* m_master_test_suite;
- std::vector<test_suite*> m_auto_test_suites;
-
- test_unit_id m_curr_test_unit;
- test_unit_store m_test_units;
-
- test_unit_id m_next_test_case_id;
- test_unit_id m_next_test_suite_id;
-
- bool m_test_in_progress;
-
- observer_store m_observers;
- context_data m_context;
- int m_context_idx;
-
- std::set<test_unit_fixture*> m_global_fixtures;
-
- boost::execution_monitor m_aux_em;
-
- std::map<output_format, runtime_config::stream_holder> m_log_sinks;
- runtime_config::stream_holder m_report_sink;
-};
-
-//____________________________________________________________________________//
-
-namespace impl {
-namespace {
-
-#if defined(__CYGWIN__)
-framework::state& s_frk_state() { static framework::state* the_inst = 0; if(!the_inst) the_inst = new framework::state; return *the_inst; }
-#else
-framework::state& s_frk_state() { static framework::state the_inst; return the_inst; }
-#endif
-
-} // local namespace
-
-void
-setup_for_execution( test_unit const& tu )
-{
- s_frk_state().deduce_run_status( tu.p_id );
-}
-
-struct sum_to_first_only {
- sum_to_first_only() : is_first(true) {}
- template <class T, class U>
- T operator()(T const& l_, U const& r_) {
- if(is_first) {
- is_first = false;
- return l_ + r_.first;
- }
- return l_ + ", " + r_.first;
- }
-
- bool is_first;
-};
-
-void
-shutdown_loggers_and_reports()
-{
- s_frk_state().m_log_sinks.clear();
- s_frk_state().m_report_sink.setup( "stderr" );
-}
-
-void
-setup_loggers()
-{
-
- BOOST_TEST_I_TRY {
-
-#ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
- bool has_combined_logger = runtime_config::has( runtime_config::btrt_combined_logger )
- && !runtime_config::get< std::vector<std::string> >( runtime_config::btrt_combined_logger ).empty();
-#else
- bool has_combined_logger = false;
-#endif
-
- if( !has_combined_logger ) {
- unit_test_log.set_threshold_level( runtime_config::get<log_level>( runtime_config::btrt_log_level ) );
- const output_format format = runtime_config::get<output_format>( runtime_config::btrt_log_format );
- unit_test_log.set_format( format );
-
- runtime_config::stream_holder& stream_logger = s_frk_state().m_log_sinks[format];
- if( runtime_config::has( runtime_config::btrt_log_sink ) ) {
- // we remove all streams in this case, so we do not specify the format
- boost::function< void () > log_cleaner = boost::bind( &unit_test_log_t::set_stream,
- &unit_test_log,
- boost::ref(std::cout)
- );
- stream_logger.setup( runtime_config::get<std::string>( runtime_config::btrt_log_sink ),
- log_cleaner );
- }
- unit_test_log.set_stream( stream_logger.ref() );
- }
- else
- {
-
- const std::vector<std::string>& v_output_format = runtime_config::get< std::vector<std::string> >( runtime_config::btrt_combined_logger ) ;
-
- static const std::pair<const char*, log_level> all_log_levels[] = {
- std::make_pair( "all" , log_successful_tests ),
- std::make_pair( "success" , log_successful_tests ),
- std::make_pair( "test_suite" , log_test_units ),
- std::make_pair( "unit_scope" , log_test_units ),
- std::make_pair( "message" , log_messages ),
- std::make_pair( "warning" , log_warnings ),
- std::make_pair( "error" , log_all_errors ),
- std::make_pair( "cpp_exception" , log_cpp_exception_errors ),
- std::make_pair( "system_error" , log_system_errors ),
- std::make_pair( "fatal_error" , log_fatal_errors ),
- std::make_pair( "nothing" , log_nothing )
- };
-
- static const std::pair<const char*, output_format> all_formats[] = {
- std::make_pair( "HRF" , OF_CLF ),
- std::make_pair( "CLF" , OF_CLF ),
- std::make_pair( "XML" , OF_XML ),
- std::make_pair( "JUNIT", OF_JUNIT )
- };
-
-
- bool is_first = true;
-
- BOOST_TEST_FOREACH( const_string, current_multi_config, v_output_format ) {
-
- #ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
-
- // ':' may be used for file names: C:/tmp/mylogsink.xml
- // we merge the tokens that start with / or \ with the previous one.
- std::vector<std::string> v_processed_tokens;
-
- {
- utils::string_token_iterator current_config( current_multi_config, (utils::dropped_delimeters = ":",
- utils::kept_delimeters = utils::dt_none) );
-
- for( ; current_config != utils::string_token_iterator() ; ++current_config) {
- std::string str_copy(current_config->begin(), current_config->end());
- if( ( str_copy[0] == '\\' || str_copy[0] == '/' )
- && v_processed_tokens.size() > 0) {
- v_processed_tokens.back() += ":" + str_copy; // ':' has been eaten up
- }
- else {
- v_processed_tokens.push_back(str_copy);
- }
- }
- }
-
- BOOST_TEST_FOREACH( std::string const&, current_config, v_processed_tokens ) {
-
- utils::string_token_iterator current_format_specs( current_config, (utils::keep_empty_tokens,
- utils::dropped_delimeters = ",",
- utils::kept_delimeters = utils::dt_none) );
-
- output_format format = OF_INVALID ; // default
- if( current_format_specs != utils::string_token_iterator() &&
- current_format_specs->size() ) {
-
- for(size_t elem=0; elem < sizeof(all_formats)/sizeof(all_formats[0]); elem++) {
- if(const_string(all_formats[elem].first) == *current_format_specs) {
- format = all_formats[elem].second;
- break;
- }
- }
- }
-
- BOOST_TEST_I_ASSRT( format != OF_INVALID,
- boost::runtime::access_to_missing_argument()
- << "Unable to determine the logger type from '"
- << current_config
- << "'. Possible choices are: "
- << std::accumulate(all_formats,
- all_formats + sizeof(all_formats)/sizeof(all_formats[0]),
- std::string(""),
- sum_to_first_only())
- );
-
- // activates this format
- if( is_first ) {
- unit_test_log.set_format( format );
- }
- else {
- unit_test_log.add_format( format );
- }
- is_first = false;
-
- unit_test_log_formatter * const formatter = unit_test_log.get_formatter(format);
- BOOST_TEST_SETUP_ASSERT( formatter, "Logger setup error" );
-
- log_level formatter_log_level = invalid_log_level;
- ++current_format_specs ;
- if( !current_format_specs->size() ) {
- formatter_log_level = formatter->get_log_level(); // default log level given by the formatter
- }
- else if( current_format_specs != utils::string_token_iterator() ) {
-
- for(size_t elem=0; elem < sizeof(all_log_levels)/sizeof(all_log_levels[0]); elem++) {
- if(const_string(all_log_levels[elem].first) == *current_format_specs) {
- formatter_log_level = all_log_levels[elem].second;
- break;
- }
- }
- }
-
- BOOST_TEST_I_ASSRT( formatter_log_level != invalid_log_level,
- boost::runtime::access_to_missing_argument()
- << "Unable to determine the log level from '"
- << current_config
- << "'. Possible choices are: "
- << std::accumulate(all_log_levels,
- all_log_levels + sizeof(all_log_levels)/sizeof(all_log_levels[0]),
- std::string(""),
- sum_to_first_only())
- );
-
- unit_test_log.set_threshold_level( format, formatter_log_level );
-
- runtime_config::stream_holder& stream_logger = s_frk_state().m_log_sinks[format];
- boost::function< void () > log_cleaner = boost::bind( &unit_test_log_t::set_stream,
- &unit_test_log,
- format,
- boost::ref(std::cout) );
- if( ++current_format_specs != utils::string_token_iterator() &&
- current_format_specs->size() ) {
- stream_logger.setup( *current_format_specs,
- log_cleaner );
- }
- else {
- stream_logger.setup( formatter->get_default_stream_description(),
- log_cleaner );
- }
- unit_test_log.set_stream( format, stream_logger.ref() );
- }
- #endif
- } // for each logger
-
- } // if/else new logger API
- } // BOOST_TEST_I_TRY
- BOOST_TEST_I_CATCH( boost::runtime::init_error, ex ) {
- BOOST_TEST_SETUP_ASSERT( false, ex.msg );
- }
- BOOST_TEST_I_CATCH( boost::runtime::input_error, ex ) {
- std::cerr << ex.msg << "\n\n";
-
- BOOST_TEST_I_THROW( framework::nothing_to_test( boost::exit_exception_failure ) );
- }
-
-
-}
-
-//____________________________________________________________________________//
-
-} // namespace impl
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** framework::init ************** //
-// ************************************************************************** //
-
-void
-init( init_unit_test_func init_func, int argc, char* argv[] )
-{
- using namespace impl;
-
- // 10. Set up runtime parameters
- runtime_config::init( argc, argv );
-
- // 20. Set the desired log level, format and sink
- impl::setup_loggers();
-
- // 30. Set the desired report level, format and sink
- results_reporter::set_level( runtime_config::get<report_level>( runtime_config::btrt_report_level ) );
- results_reporter::set_format( runtime_config::get<output_format>( runtime_config::btrt_report_format ) );
-
- if( runtime_config::has( runtime_config::btrt_report_sink ) ) {
- boost::function< void () > report_cleaner = boost::bind( &results_reporter::set_stream,
- boost::ref(std::cerr)
- );
- s_frk_state().m_report_sink.setup( runtime_config::get<std::string>( runtime_config::btrt_report_sink ),
- report_cleaner );
- }
-
- results_reporter::set_stream( s_frk_state().m_report_sink.ref() );
-
- // 40. Register default test observers
- register_observer( results_collector );
- register_observer( unit_test_log );
- register_observer( framework_init_observer );
-
- if( runtime_config::get<bool>( runtime_config::btrt_show_progress ) ) {
- progress_monitor.set_stream( std::cout ); // defaults to stdout
- register_observer( progress_monitor );
- }
-
- // 50. Set up memory leak detection
- unsigned long detect_mem_leak = runtime_config::get<unsigned long>( runtime_config::btrt_detect_mem_leaks );
- if( detect_mem_leak > 0 ) {
- debug::detect_memory_leaks( true, runtime_config::get<std::string>( runtime_config::btrt_report_mem_leaks ) );
- debug::break_memory_alloc( (long)detect_mem_leak );
- }
-
- // 60. Initialize master unit test suite
- master_test_suite().argc = argc;
- master_test_suite().argv = argv;
-
- // 70. Invoke test module initialization routine
- BOOST_TEST_I_TRY {
- s_frk_state().m_aux_em.vexecute( boost::bind( &impl::invoke_init_func, init_func ) );
- }
- BOOST_TEST_I_CATCH( execution_exception, ex ) {
- BOOST_TEST_SETUP_ASSERT( false, ex.what() );
- }
-}
-
-//____________________________________________________________________________//
-
-void
-finalize_setup_phase( test_unit_id master_tu_id )
-{
- if( master_tu_id == INV_TEST_UNIT_ID )
- master_tu_id = master_test_suite().p_id;
-
- // 10. Apply all decorators to the auto test units
- class apply_decorators : public test_tree_visitor {
- private:
- // test_tree_visitor interface
-
- virtual bool test_suite_start( test_suite const& ts)
- {
- const_cast<test_suite&>(ts).generate();
- return test_tree_visitor::test_suite_start(ts);
- }
-
- virtual bool visit( test_unit const& tu )
- {
- BOOST_TEST_FOREACH( decorator::base_ptr, d, tu.p_decorators.get() )
- d->apply( const_cast<test_unit&>(tu) );
-
- return true;
- }
- } ad;
- traverse_test_tree( master_tu_id, ad, true );
-
- // 20. Finalize setup phase
- impl::order_info_per_tu tuoi;
- impl::s_frk_state().deduce_siblings_order( master_tu_id, master_tu_id, tuoi );
- impl::s_frk_state().finalize_default_run_status( master_tu_id, test_unit::RS_INVALID );
-}
-
-// ************************************************************************** //
-// ************** test_in_progress ************** //
-// ************************************************************************** //
-
-bool
-test_in_progress()
-{
- return impl::s_frk_state().m_test_in_progress;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** framework::shutdown ************** //
-// ************************************************************************** //
-
-void
-shutdown()
-{
- impl::shutdown_loggers_and_reports();
- // eliminating some fake memory leak reports. See for more details:
- // http://connect.microsoft.com/VisualStudio/feedback/details/106937/memory-leaks-reported-by-debug-crt-inside-typeinfo-name
-
-# if BOOST_WORKAROUND(BOOST_MSVC, <= 1600 ) && !defined(_DLL) && defined(_DEBUG)
-# if BOOST_WORKAROUND(BOOST_MSVC, < 1600 )
-#define _Next next
-#define _MemPtr memPtr
-#endif
- __type_info_node* pNode = __type_info_root_node._Next;
- __type_info_node* tmpNode = &__type_info_root_node;
-
- for( ; pNode!=NULL; pNode = tmpNode ) {
- tmpNode = pNode->_Next;
- delete pNode->_MemPtr;
- delete pNode;
- }
-# if BOOST_WORKAROUND(BOOST_MSVC, < 1600 )
-#undef _Next
-#undef _MemPtr
-#endif
-# endif
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** register_test_unit ************** //
-// ************************************************************************** //
-
-void
-register_test_unit( test_case* tc )
-{
- BOOST_TEST_SETUP_ASSERT( tc->p_id == INV_TEST_UNIT_ID, BOOST_TEST_L( "test case already registered" ) );
-
- test_unit_id new_id = impl::s_frk_state().m_next_test_case_id;
-
- BOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_CASE_ID, BOOST_TEST_L( "too many test cases" ) );
-
- typedef state::test_unit_store::value_type map_value_type;
-
- impl::s_frk_state().m_test_units.insert( map_value_type( new_id, tc ) );
- impl::s_frk_state().m_next_test_case_id++;
-
- impl::s_frk_state().set_tu_id( *tc, new_id );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** register_test_unit ************** //
-// ************************************************************************** //
-
-void
-register_test_unit( test_suite* ts )
-{
- BOOST_TEST_SETUP_ASSERT( ts->p_id == INV_TEST_UNIT_ID, BOOST_TEST_L( "test suite already registered" ) );
-
- test_unit_id new_id = impl::s_frk_state().m_next_test_suite_id;
-
- BOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_SUITE_ID, BOOST_TEST_L( "too many test suites" ) );
-
- typedef state::test_unit_store::value_type map_value_type;
-
- impl::s_frk_state().m_test_units.insert( map_value_type( new_id, ts ) );
- impl::s_frk_state().m_next_test_suite_id++;
-
- impl::s_frk_state().set_tu_id( *ts, new_id );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** deregister_test_unit ************** //
-// ************************************************************************** //
-
-void
-deregister_test_unit( test_unit* tu )
-{
- impl::s_frk_state().m_test_units.erase( tu->p_id );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** clear ************** //
-// ************************************************************************** //
-
-void
-clear()
-{
- impl::s_frk_state().clear();
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** register_observer ************** //
-// ************************************************************************** //
-
-void
-register_observer( test_observer& to )
-{
- impl::s_frk_state().m_observers.insert( &to );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** deregister_observer ************** //
-// ************************************************************************** //
-
-void
-deregister_observer( test_observer& to )
-{
- impl::s_frk_state().m_observers.erase( &to );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** register_global_fixture ************** //
-// ************************************************************************** //
-
-void
-register_global_fixture( test_unit_fixture& tuf )
-{
- impl::s_frk_state().m_global_fixtures.insert( &tuf );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** deregister_global_fixture ************** //
-// ************************************************************************** //
-
-void
-deregister_global_fixture( test_unit_fixture &tuf )
-{
- impl::s_frk_state().m_global_fixtures.erase( &tuf );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** add_context ************** //
-// ************************************************************************** //
-
-int
-add_context( ::boost::unit_test::lazy_ostream const& context_descr, bool sticky )
-{
- std::stringstream buffer;
- context_descr( buffer );
- int res_idx = impl::s_frk_state().m_context_idx++;
-
- impl::s_frk_state().m_context.push_back( state::context_frame( buffer.str(), res_idx, sticky ) );
-
- return res_idx;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** clear_context ************** //
-// ************************************************************************** //
-
-struct frame_with_id {
- explicit frame_with_id( int id ) : m_id( id ) {}
-
- bool operator()( state::context_frame const& f )
- {
- return f.frame_id == m_id;
- }
- int m_id;
-};
-
-//____________________________________________________________________________//
-
-void
-clear_context( int frame_id )
-{
- if( frame_id == -1 ) { // clear all non sticky frames
- for( int i=static_cast<int>(impl::s_frk_state().m_context.size())-1; i>=0; i-- )
- if( !impl::s_frk_state().m_context[i].is_sticky )
- impl::s_frk_state().m_context.erase( impl::s_frk_state().m_context.begin()+i );
- }
-
- else { // clear specific frame
- state::context_data::iterator it =
- std::find_if( impl::s_frk_state().m_context.begin(), impl::s_frk_state().m_context.end(), frame_with_id( frame_id ) );
-
- if( it != impl::s_frk_state().m_context.end() ) // really an internal error if this is not true
- impl::s_frk_state().m_context.erase( it );
- }
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** get_context ************** //
-// ************************************************************************** //
-
-context_generator
-get_context()
-{
- return context_generator();
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** context_generator ************** //
-// ************************************************************************** //
-
-bool
-context_generator::is_empty() const
-{
- return impl::s_frk_state().m_context.empty();
-}
-
-//____________________________________________________________________________//
-
-const_string
-context_generator::next() const
-{
- return m_curr_frame < impl::s_frk_state().m_context.size() ? impl::s_frk_state().m_context[m_curr_frame++].descr : const_string();
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** master_test_suite ************** //
-// ************************************************************************** //
-
-master_test_suite_t&
-master_test_suite()
-{
- if( !impl::s_frk_state().m_master_test_suite )
- impl::s_frk_state().m_master_test_suite = new master_test_suite_t;
-
- return *impl::s_frk_state().m_master_test_suite;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** current_auto_test_suite ************** //
-// ************************************************************************** //
-
-test_suite&
-current_auto_test_suite( test_suite* ts, bool push_or_pop )
-{
- if( impl::s_frk_state().m_auto_test_suites.empty() )
- impl::s_frk_state().m_auto_test_suites.push_back( &framework::master_test_suite() );
-
- if( !push_or_pop )
- impl::s_frk_state().m_auto_test_suites.pop_back();
- else if( ts )
- impl::s_frk_state().m_auto_test_suites.push_back( ts );
-
- return *impl::s_frk_state().m_auto_test_suites.back();
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** current_test_case ************** //
-// ************************************************************************** //
-
-test_case const&
-current_test_case()
-{
- return get<test_case>( impl::s_frk_state().m_curr_test_unit );
-}
-
-
-test_unit const&
-current_test_unit()
-{
- return *impl::s_frk_state().m_test_units[impl::s_frk_state().m_curr_test_unit];
-}
-
-//____________________________________________________________________________//
-
-test_unit_id
-current_test_case_id()
-{
- return impl::s_frk_state().m_curr_test_unit;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** framework::get ************** //
-// ************************************************************************** //
-
-test_unit&
-get( test_unit_id id, test_unit_type t )
-{
- test_unit* res = impl::s_frk_state().m_test_units[id];
-
- BOOST_TEST_I_ASSRT( (res->p_type & t) != 0, internal_error( "Invalid test unit type" ) );
-
- return *res;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** framework::run ************** //
-// ************************************************************************** //
-
-template <class Cont>
-struct swap_on_delete {
- swap_on_delete(Cont& c1, Cont& c2) : m_c1(c1), m_c2(c2){}
- ~swap_on_delete() {
- m_c1.swap(m_c2);
- }
-
- Cont& m_c1;
- Cont& m_c2;
-};
-
-void
-run( test_unit_id id, bool continue_test )
-{
- if( id == INV_TEST_UNIT_ID )
- id = master_test_suite().p_id;
-
- // Figure out run status for execution phase
- impl::s_frk_state().deduce_run_status( id );
-
- test_case_counter tcc;
- traverse_test_tree( id, tcc );
-
- BOOST_TEST_SETUP_ASSERT( tcc.p_count != 0 , runtime_config::get<std::vector<std::string> >( runtime_config::btrt_run_filters ).empty()
- ? BOOST_TEST_L( "test tree is empty" )
- : BOOST_TEST_L( "no test cases matching filter or all test cases were disabled" ) );
-
- bool was_in_progress = framework::test_in_progress();
- bool call_start_finish = !continue_test || !was_in_progress;
- bool init_ok = true;
- const_string setup_error;
-
- if( call_start_finish ) {
- // indicates the framework that no test is in progress now if observers need to be notified
- impl::s_frk_state().m_test_in_progress = false;
- // unit_test::framework_init_observer will get cleared first
- BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers ) {
- BOOST_TEST_I_TRY {
- ut_detail::test_unit_id_restore restore_current_test_unit(impl::s_frk_state().m_curr_test_unit, id);
- unit_test_monitor_t::error_level result = unit_test_monitor.execute_and_translate( boost::bind( &test_observer::test_start, to, tcc.p_count ) );
- if( init_ok ) {
- if( result != unit_test_monitor_t::test_ok ) {
- init_ok = false;
- }
- else {
- if( unit_test::framework_init_observer.has_failed() ) {
- init_ok = false;
- }
- }
- }
- }
- BOOST_TEST_I_CATCH( execution_exception, ex ) {
- if( init_ok ) {
- // log only the first error
- init_ok = false;
- setup_error = ex.what();
- }
- // break; // we should continue otherwise loggers may have improper structure (XML start missing for instance)
- }
- }
- }
-
- if( init_ok ) {
-
- // attaching the global fixtures to the main entry point
- test_unit& entry_test_unit = framework::get( id, TUT_ANY );
- std::vector<test_unit_fixture_ptr> v_saved_fixture(entry_test_unit.p_fixtures.value.begin(),
- entry_test_unit.p_fixtures.value.end());
-
- BOOST_TEST_FOREACH( test_unit_fixture*, tuf, impl::s_frk_state().m_global_fixtures ) {
- entry_test_unit.p_fixtures.value.insert( entry_test_unit.p_fixtures.value.begin(),
- test_unit_fixture_ptr(new impl::global_fixture_handle(tuf)) );
- }
-
- swap_on_delete< std::vector<test_unit_fixture_ptr> > raii_fixture(v_saved_fixture, entry_test_unit.p_fixtures.value);
-
- // now work in progress
- impl::s_frk_state().m_test_in_progress = true;
- unsigned seed = runtime_config::get<unsigned>( runtime_config::btrt_random_seed );
- switch( seed ) {
- case 0:
- break;
- case 1:
- seed = static_cast<unsigned>( std::rand() ^ std::time( 0 ) ); // better init using std::rand() ^ ...
- BOOST_FALLTHROUGH;
- default:
- BOOST_TEST_FRAMEWORK_MESSAGE( "Test cases order is shuffled using seed: " << seed );
- std::srand( seed );
- }
-
- // executing the test tree
- impl::s_frk_state().execute_test_tree( id );
-
- // removing previously added global fixtures: dtor raii_fixture
- }
-
- impl::s_frk_state().m_test_in_progress = false;
-
- results_reporter::make_report( INV_REPORT_LEVEL, id );
-
- unit_test::framework_init_observer.clear();
- if( call_start_finish ) {
- // indicates the framework that no test is in progress anymore if observers need to be notified
- // and this is a teardown, so assertions should not raise any exception otherwise an exception
- // might be raised in a dtor of a global fixture
- impl::s_frk_state().m_test_in_progress = false;
- BOOST_TEST_REVERSE_FOREACH( test_observer*, to, impl::s_frk_state().m_observers ) {
- ut_detail::test_unit_id_restore restore_current_test_unit(impl::s_frk_state().m_curr_test_unit, id);
- to->test_finish();
- }
- }
-
- impl::s_frk_state().m_test_in_progress = was_in_progress;
-
- // propagates the init/teardown error if any
- BOOST_TEST_SETUP_ASSERT( init_ok && !unit_test::framework_init_observer.has_failed(), setup_error );
-}
-
-//____________________________________________________________________________//
-
-void
-run( test_unit const* tu, bool continue_test )
-{
- run( tu->p_id, continue_test );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** assertion_result ************** //
-// ************************************************************************** //
-
-void
-assertion_result( unit_test::assertion_result ar )
-{
- BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers )
- to->assertion_result( ar );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** exception_caught ************** //
-// ************************************************************************** //
-
-void
-exception_caught( execution_exception const& ex )
-{
- BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers )
- to->exception_caught( ex );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** test_unit_aborted ************** //
-// ************************************************************************** //
-
-void
-test_unit_aborted( test_unit const& tu )
-{
- BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers )
- to->test_unit_aborted( tu );
-}
-
-// ************************************************************************** //
-// ************** test_aborted ************** //
-// ************************************************************************** //
-
-void
-test_aborted( )
-{
- BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers )
- to->test_aborted( );
-}
-
-
-//____________________________________________________________________________//
-
-} // namespace framework
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_FRAMEWORK_IPP_021005GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/progress_monitor.ipp b/src/third_party/boost-1.68.0/boost/test/impl/progress_monitor.ipp
deleted file mode 100644
index 34149745cf7..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/progress_monitor.ipp
+++ /dev/null
@@ -1,185 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : implements simple text based progress monitor
-// ***************************************************************************
-
-#ifndef BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
-#define BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
-
-// Boost.Test
-#include <boost/test/progress_monitor.hpp>
-#include <boost/test/unit_test_parameters.hpp>
-
-#include <boost/test/utils/setcolor.hpp>
-
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/tree/test_case_counter.hpp>
-#include <boost/test/tree/traverse.hpp>
-
-// Boost
-#include <boost/scoped_ptr.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** progress_monitor ************** //
-// ************************************************************************** //
-
-struct progress_display {
- progress_display( counter_t expected_count, std::ostream& os )
- : m_os(os)
- , m_count( 0 )
- , m_expected_count( expected_count )
- , m_next_tic_count( 0 )
- , m_tic( 0 )
- {
-
- m_os << "\n0% 10 20 30 40 50 60 70 80 90 100%"
- << "\n|----|----|----|----|----|----|----|----|----|----|"
- << std::endl;
-
- if( !m_expected_count )
- m_expected_count = 1; // prevent divide by zero
- }
-
- unsigned long operator+=( unsigned long increment )
- {
- if( (m_count += increment) < m_next_tic_count )
- return m_count;
-
- // use of floating point ensures that both large and small counts
- // work correctly. static_cast<>() is also used several places
- // to suppress spurious compiler warnings.
- unsigned int tics_needed = static_cast<unsigned int>(
- (static_cast<double>(m_count)/m_expected_count)*50.0 );
-
- do {
- m_os << '*' << std::flush;
- } while( ++m_tic < tics_needed );
-
- m_next_tic_count = static_cast<unsigned long>((m_tic/50.0) * m_expected_count);
-
- if( m_count == m_expected_count ) {
- if( m_tic < 51 )
- m_os << '*';
-
- m_os << std::endl;
- }
-
- return m_count;
- }
- unsigned long operator++() { return operator+=( 1 ); }
- unsigned long count() const { return m_count; }
-
-private:
- BOOST_DELETED_FUNCTION(progress_display(progress_display const&))
- BOOST_DELETED_FUNCTION(progress_display& operator=(progress_display const&))
-
- std::ostream& m_os; // may not be present in all imps
-
- unsigned long m_count;
- unsigned long m_expected_count;
- unsigned long m_next_tic_count;
- unsigned int m_tic;
-};
-
-namespace {
-
-struct progress_monitor_impl {
- // Constructor
- progress_monitor_impl()
- : m_stream( &std::cout )
- , m_color_output( false )
- {
- }
-
- std::ostream* m_stream;
- scoped_ptr<progress_display> m_progress_display;
- bool m_color_output;
-};
-
-progress_monitor_impl& s_pm_impl() { static progress_monitor_impl the_inst; return the_inst; }
-
-#define PM_SCOPED_COLOR() \
- BOOST_TEST_SCOPE_SETCOLOR( s_pm_impl().m_color_output, *s_pm_impl().m_stream, term_attr::BRIGHT, term_color::MAGENTA )
-
-} // local namespace
-
-//____________________________________________________________________________//
-
-void
-progress_monitor_t::test_start( counter_t test_cases_amount )
-{
- s_pm_impl().m_color_output = runtime_config::get<bool>( runtime_config::btrt_color_output );
-
- PM_SCOPED_COLOR();
-
- s_pm_impl().m_progress_display.reset( new progress_display( test_cases_amount, *s_pm_impl().m_stream ) );
-}
-
-//____________________________________________________________________________//
-
-void
-progress_monitor_t::test_aborted()
-{
- PM_SCOPED_COLOR();
-
- (*s_pm_impl().m_progress_display) += s_pm_impl().m_progress_display->count();
-}
-
-//____________________________________________________________________________//
-
-void
-progress_monitor_t::test_unit_finish( test_unit const& tu, unsigned long )
-{
- PM_SCOPED_COLOR();
-
- if( tu.p_type == TUT_CASE )
- ++(*s_pm_impl().m_progress_display);
-}
-
-//____________________________________________________________________________//
-
-void
-progress_monitor_t::test_unit_skipped( test_unit const& tu, const_string /*reason*/ )
-{
- PM_SCOPED_COLOR();
-
- test_case_counter tcc;
- traverse_test_tree( tu, tcc );
-
- (*s_pm_impl().m_progress_display) += tcc.p_count;
-}
-
-//____________________________________________________________________________//
-
-void
-progress_monitor_t::set_stream( std::ostream& ostr )
-{
- s_pm_impl().m_stream = &ostr;
-}
-
-//____________________________________________________________________________//
-
-#undef PM_SCOPED_COLOR
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/results_collector.ipp b/src/third_party/boost-1.68.0/boost/test/impl/results_collector.ipp
deleted file mode 100644
index ea5050937bd..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/results_collector.ipp
+++ /dev/null
@@ -1,295 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// Test results collecting facility.
-///
-// ***************************************************************************
-
-#ifndef BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
-#define BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
-
-// Boost.Test
-#include <boost/test/unit_test_log.hpp>
-#include <boost/test/results_collector.hpp>
-#include <boost/test/framework.hpp>
-
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/tree/visitor.hpp>
-#include <boost/test/tree/test_case_counter.hpp>
-#include <boost/test/tree/traverse.hpp>
-
-// Boost
-#include <boost/cstdlib.hpp>
-
-// STL
-#include <map>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** test_results ************** //
-// ************************************************************************** //
-
-test_results::test_results()
-{
- clear();
-}
-
-//____________________________________________________________________________//
-
-bool
-test_results::passed() const
-{
- // if it is skipped, it is not passed. However, if any children is not failed/aborted
- // then their skipped status is not taken into account.
- return !p_skipped &&
- p_test_cases_failed == 0 &&
- p_assertions_failed <= p_expected_failures &&
- // p_test_cases_skipped == 0 &&
- !p_aborted;
-}
-
-//____________________________________________________________________________//
-
-bool
-test_results::aborted() const
-{
- return p_aborted;
-}
-
-//____________________________________________________________________________//
-
-bool
-test_results::skipped() const
-{
- return p_skipped;
-}
-
-//____________________________________________________________________________//
-
-int
-test_results::result_code() const
-{
- return passed() ? exit_success
- : ( (p_assertions_failed > p_expected_failures || p_skipped )
- ? exit_test_failure
- : exit_exception_failure );
-}
-
-//____________________________________________________________________________//
-
-void
-test_results::operator+=( test_results const& tr )
-{
- p_assertions_passed.value += tr.p_assertions_passed;
- p_assertions_failed.value += tr.p_assertions_failed;
- p_warnings_failed.value += tr.p_warnings_failed;
- p_test_cases_passed.value += tr.p_test_cases_passed;
- p_test_cases_warned.value += tr.p_test_cases_warned;
- p_test_cases_failed.value += tr.p_test_cases_failed;
- p_test_cases_skipped.value += tr.p_test_cases_skipped;
- p_test_cases_aborted.value += tr.p_test_cases_aborted;
- p_duration_microseconds.value += tr.p_duration_microseconds;
-}
-
-//____________________________________________________________________________//
-
-void
-test_results::clear()
-{
- p_assertions_passed.value = 0;
- p_assertions_failed.value = 0;
- p_warnings_failed.value = 0;
- p_expected_failures.value = 0;
- p_test_cases_passed.value = 0;
- p_test_cases_warned.value = 0;
- p_test_cases_failed.value = 0;
- p_test_cases_skipped.value = 0;
- p_test_cases_aborted.value = 0;
- p_duration_microseconds.value= 0;
- p_aborted.value = false;
- p_skipped.value = false;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** results_collector ************** //
-// ************************************************************************** //
-
-namespace {
-
-struct results_collector_impl {
- std::map<test_unit_id,test_results> m_results_store;
-};
-
-results_collector_impl& s_rc_impl() { static results_collector_impl the_inst; return the_inst; }
-
-} // local namespace
-
-//____________________________________________________________________________//
-
-void
-results_collector_t::test_start( counter_t )
-{
- s_rc_impl().m_results_store.clear();
-}
-
-//____________________________________________________________________________//
-
-void
-results_collector_t::test_unit_start( test_unit const& tu )
-{
- // init test_results entry
- test_results& tr = s_rc_impl().m_results_store[tu.p_id];
-
- tr.clear();
-
- tr.p_expected_failures.value = tu.p_expected_failures;
-}
-
-//____________________________________________________________________________//
-
-class results_collect_helper : public test_tree_visitor {
-public:
- explicit results_collect_helper( test_results& tr, test_unit const& ts ) : m_tr( tr ), m_ts( ts ) {}
-
- void visit( test_case const& tc )
- {
- test_results const& tr = results_collector.results( tc.p_id );
- m_tr += tr;
-
- if( tr.passed() ) {
- if( tr.p_warnings_failed )
- m_tr.p_test_cases_warned.value++;
- else
- m_tr.p_test_cases_passed.value++;
- }
- else if( tr.p_skipped )
- m_tr.p_test_cases_skipped.value++;
- else {
- if( tr.p_aborted )
- m_tr.p_test_cases_aborted.value++;
-
- m_tr.p_test_cases_failed.value++;
- }
- }
- bool test_suite_start( test_suite const& ts )
- {
- if( m_ts.p_id == ts.p_id )
- return true;
-
- m_tr += results_collector.results( ts.p_id );
- return false;
- }
-
-private:
- // Data members
- test_results& m_tr;
- test_unit const& m_ts;
-};
-
-//____________________________________________________________________________//
-
-void
-results_collector_t::test_unit_finish( test_unit const& tu, unsigned long elapsed_in_microseconds )
-{
- if( tu.p_type == TUT_SUITE ) {
- results_collect_helper ch( s_rc_impl().m_results_store[tu.p_id], tu );
-
- traverse_test_tree( tu, ch );
- }
- else {
- test_results & tr = s_rc_impl().m_results_store[tu.p_id];
- tr.p_duration_microseconds.value = elapsed_in_microseconds;
-
- bool num_failures_match = tr.p_aborted || tr.p_assertions_failed >= tr.p_expected_failures;
- if( !num_failures_match )
- BOOST_TEST_FRAMEWORK_MESSAGE( "Test case " << tu.full_name() << " has fewer failures than expected" );
-
- bool check_any_assertions = tr.p_aborted || (tr.p_assertions_failed != 0) || (tr.p_assertions_passed != 0);
- if( !check_any_assertions )
- BOOST_TEST_FRAMEWORK_MESSAGE( "Test case " << tu.full_name() << " did not check any assertions" );
- }
-}
-
-//____________________________________________________________________________//
-
-void
-results_collector_t::test_unit_skipped( test_unit const& tu, const_string /*reason*/ )
-{
- test_results& tr = s_rc_impl().m_results_store[tu.p_id];
-
- tr.clear();
-
- tr.p_skipped.value = true;
-
- if( tu.p_type == TUT_SUITE ) {
- test_case_counter tcc;
- traverse_test_tree( tu, tcc );
-
- tr.p_test_cases_skipped.value = tcc.p_count;
- }
-}
-
-//____________________________________________________________________________//
-
-void
-results_collector_t::assertion_result( unit_test::assertion_result ar )
-{
- test_results& tr = s_rc_impl().m_results_store[framework::current_test_case_id()];
-
- switch( ar ) {
- case AR_PASSED: tr.p_assertions_passed.value++; break;
- case AR_FAILED: tr.p_assertions_failed.value++; break;
- case AR_TRIGGERED: tr.p_warnings_failed.value++; break;
- }
-
- if( tr.p_assertions_failed == 1 )
- first_failed_assertion();
-}
-
-//____________________________________________________________________________//
-
-void
-results_collector_t::exception_caught( execution_exception const& )
-{
- test_results& tr = s_rc_impl().m_results_store[framework::current_test_case_id()];
-
- tr.p_assertions_failed.value++;
-}
-
-//____________________________________________________________________________//
-
-void
-results_collector_t::test_unit_aborted( test_unit const& tu )
-{
- s_rc_impl().m_results_store[tu.p_id].p_aborted.value = true;
-}
-
-//____________________________________________________________________________//
-
-test_results const&
-results_collector_t::results( test_unit_id id ) const
-{
- return s_rc_impl().m_results_store[id];
-}
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/test_framework_init_observer.ipp b/src/third_party/boost-1.68.0/boost/test/impl/test_framework_init_observer.ipp
deleted file mode 100644
index 89f854aaedf..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/test_framework_init_observer.ipp
+++ /dev/null
@@ -1,109 +0,0 @@
-// (c) Copyright Raffi Enficiaud 2017.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//! @file
-//! An observer for monitoring the success/failure of the other observers
-// ***************************************************************************
-
-#ifndef BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
-#define BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
-
-// Boost.Test
-#include <boost/test/test_framework_init_observer.hpp>
-#include <boost/test/framework.hpp>
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** framework_init_observer_t ************** //
-// ************************************************************************** //
-
-namespace {
-
-struct test_init_observer_check {
- bool has_failure;
-
- void clear()
- {
- has_failure = false;
- }
-};
-
-
-test_init_observer_check& s_tioc_impl() { static test_init_observer_check the_inst; return the_inst; }
-
-} // local namespace
-
-void
-framework_init_observer_t::clear()
-{
- if(!framework::test_in_progress())
- s_tioc_impl().clear();
-}
-
-//____________________________________________________________________________//
-
-void
-framework_init_observer_t::test_start( counter_t )
-{
- clear();
-}
-
-//____________________________________________________________________________//
-
-void
-framework_init_observer_t::assertion_result( unit_test::assertion_result ar )
-{
- test_init_observer_check& tr = s_tioc_impl();
- switch( ar ) {
- case AR_TRIGGERED: break;
- case AR_PASSED: break;
- case AR_FAILED: tr.has_failure = true; break;
- default:
- break;
- }
-}
-
-//____________________________________________________________________________//
-
-void
-framework_init_observer_t::exception_caught( execution_exception const& )
-{
- test_init_observer_check& tr = s_tioc_impl();
- tr.has_failure = true;
-}
-
-void
-framework_init_observer_t::test_aborted()
-{
- s_tioc_impl().has_failure = true;
-}
-
-
-//____________________________________________________________________________//
-
-bool
-framework_init_observer_t::has_failed() const
-{
- return s_tioc_impl().has_failure;
-}
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/test_tree.ipp b/src/third_party/boost-1.68.0/boost/test/impl/test_tree.ipp
deleted file mode 100644
index cb48be4a99a..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/test_tree.ipp
+++ /dev/null
@@ -1,548 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// Provides core implementation for Unit Test Framework.
-/// Extensions can be provided in separate files
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
-
-// Boost.Test
-#include <boost/detail/workaround.hpp>
-
-#include <boost/test/framework.hpp>
-#include <boost/test/results_collector.hpp>
-
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/tree/visitor.hpp>
-#include <boost/test/tree/traverse.hpp>
-#include <boost/test/tree/auto_registration.hpp>
-#include <boost/test/tree/global_fixture.hpp>
-
-#include <boost/test/utils/foreach.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-
-#include <boost/test/unit_test_parameters.hpp>
-
-// Boost
-#include <boost/timer.hpp>
-
-// STL
-#include <algorithm>
-#include <vector>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** test_unit ************** //
-// ************************************************************************** //
-
-test_unit::test_unit( const_string name, const_string file_name, std::size_t line_num, test_unit_type t )
-: p_type( t )
-, p_type_name( t == TUT_CASE ? "case" : "suite" )
-, p_file_name( file_name )
-, p_line_num( line_num )
-, p_id( INV_TEST_UNIT_ID )
-, p_parent_id( INV_TEST_UNIT_ID )
-, p_name( std::string( name.begin(), name.size() ) )
-, p_timeout( 0 )
-, p_expected_failures( 0 )
-, p_default_status( RS_INHERIT )
-, p_run_status( RS_INVALID )
-, p_sibling_rank(0)
-{
-}
-
-//____________________________________________________________________________//
-
-test_unit::test_unit( const_string module_name )
-: p_type( TUT_SUITE )
-, p_type_name( "module" )
-, p_line_num( 0 )
-, p_id( INV_TEST_UNIT_ID )
-, p_parent_id( INV_TEST_UNIT_ID )
-, p_name( std::string( module_name.begin(), module_name.size() ) )
-, p_timeout( 0 )
-, p_expected_failures( 0 )
-, p_default_status( RS_INHERIT )
-, p_run_status( RS_INVALID )
-, p_sibling_rank(0)
-{
-}
-
-//____________________________________________________________________________//
-
-test_unit::~test_unit()
-{
- framework::deregister_test_unit( this );
-}
-
-//____________________________________________________________________________//
-
-void
-test_unit::depends_on( test_unit* tu )
-{
- BOOST_TEST_SETUP_ASSERT( p_id != framework::master_test_suite().p_id,
- "Can't add dependency to the master test suite" );
-
- p_dependencies.value.push_back( tu->p_id );
-}
-
-//____________________________________________________________________________//
-
-void
-test_unit::add_precondition( precondition_t const& pc )
-{
- p_preconditions.value.push_back( pc );
-}
-
-//____________________________________________________________________________//
-
-test_tools::assertion_result
-test_unit::check_preconditions() const
-{
- BOOST_TEST_FOREACH( test_unit_id, dep_id, p_dependencies.get() ) {
- test_unit const& dep = framework::get( dep_id, TUT_ANY );
-
- if( !dep.is_enabled() ) {
- test_tools::assertion_result res(false);
- res.message() << "dependency test " << dep.p_type_name << " \"" << dep.full_name() << "\" is disabled";
- return res;
- }
-
- test_results const& test_rslt = unit_test::results_collector.results( dep_id );
- if( !test_rslt.passed() ) {
- test_tools::assertion_result res(false);
- res.message() << "dependency test " << dep.p_type_name << " \"" << dep.full_name() << (test_rslt.skipped() ? "\" was skipped":"\" has failed");
- return res;
- }
-
- if( test_rslt.p_test_cases_skipped > 0 ) {
- test_tools::assertion_result res(false);
- res.message() << "dependency test " << dep.p_type_name << " \"" << dep.full_name() << "\" has skipped test cases";
- return res;
- }
- }
-
- BOOST_TEST_FOREACH( precondition_t, precondition, p_preconditions.get() ) {
- test_tools::assertion_result res = precondition( p_id );
- if( !res ) {
- test_tools::assertion_result res_out(false);
- res_out.message() << "precondition failed";
- if( !res.has_empty_message() )
- res_out.message() << ": " << res.message();
- return res_out;
- }
- }
-
- return true;
-}
-
-//____________________________________________________________________________//
-
-void
-test_unit::increase_exp_fail( counter_t num )
-{
- p_expected_failures.value += num;
-
- if( p_parent_id != INV_TEST_UNIT_ID )
- framework::get<test_suite>( p_parent_id ).increase_exp_fail( num );
-}
-
-//____________________________________________________________________________//
-
-std::string
-test_unit::full_name() const
-{
- if( p_parent_id == INV_TEST_UNIT_ID || p_parent_id == framework::master_test_suite().p_id )
- return p_name;
-
- std::string res = framework::get<test_suite>( p_parent_id ).full_name();
- res.append("/");
-
- res.append( p_name );
-
- return res;
-}
-
-//____________________________________________________________________________//
-
-void
-test_unit::add_label( const_string l )
-{
- p_labels.value.push_back( std::string() + l );
-}
-
-//____________________________________________________________________________//
-
-bool
-test_unit::has_label( const_string l ) const
-{
- return std::find( p_labels->begin(), p_labels->end(), l ) != p_labels->end();
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** test_case ************** //
-// ************************************************************************** //
-
-test_case::test_case( const_string name, boost::function<void ()> const& test_func )
-: test_unit( name, "", 0, static_cast<test_unit_type>(type) )
-, p_test_func( test_func )
-{
- framework::register_test_unit( this );
-}
-
-//____________________________________________________________________________//
-
-test_case::test_case( const_string name, const_string file_name, std::size_t line_num, boost::function<void ()> const& test_func )
-: test_unit( name, file_name, line_num, static_cast<test_unit_type>(type) )
-, p_test_func( test_func )
-{
- framework::register_test_unit( this );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** test_suite ************** //
-// ************************************************************************** //
-
-//____________________________________________________________________________//
-
-test_suite::test_suite( const_string name, const_string file_name, std::size_t line_num )
-: test_unit( ut_detail::normalize_test_case_name( name ), file_name, line_num, static_cast<test_unit_type>(type) )
-{
- framework::register_test_unit( this );
-}
-
-//____________________________________________________________________________//
-
-test_suite::test_suite( const_string module_name )
-: test_unit( module_name )
-{
- framework::register_test_unit( this );
-}
-
-//____________________________________________________________________________//
-
-void
-test_suite::add( test_unit* tu, counter_t expected_failures, unsigned timeout )
-{
- // check for clashing names #12597
- for( test_unit_id_list::const_iterator it(m_children.begin()), ite(m_children.end());
- it < ite;
- ++it) {
- BOOST_TEST_SETUP_ASSERT( tu->p_name != framework::get(*it, TUT_ANY).p_name,
- "test unit with name '" + tu->p_name.value + std::string("' registered multiple times") );
- }
-
- tu->p_timeout.value = timeout;
-
- m_children.push_back( tu->p_id );
- tu->p_parent_id.value = p_id;
-
- if( tu->p_expected_failures != 0 )
- increase_exp_fail( tu->p_expected_failures );
-
- if( expected_failures )
- tu->increase_exp_fail( expected_failures );
-}
-
-//____________________________________________________________________________//
-
-void
-test_suite::add( test_unit_generator const& gen, unsigned timeout )
-{
- test_unit* tu;
- while((tu = gen.next()) != 0)
- add( tu, 0, timeout );
-}
-
-//____________________________________________________________________________//
-
-void
-test_suite::add( test_unit_generator const& gen, decorator::collector& decorators )
-{
- test_unit* tu;
- while((tu = gen.next()) != 0) {
- decorators.store_in( *tu );
- add( tu, 0 );
- }
- decorators.reset();
-}
-
-void
-test_suite::add( boost::shared_ptr<test_unit_generator> gen_ptr, decorator::collector& decorators )
-{
- std::pair<boost::shared_ptr<test_unit_generator>, std::vector<decorator::base_ptr> > tmp_p(gen_ptr, decorators.get_lazy_decorators() );
- m_generators.push_back(tmp_p);
- decorators.reset();
-}
-
-void
-test_suite::generate( )
-{
- typedef std::pair<boost::shared_ptr<test_unit_generator>, std::vector<decorator::base_ptr> > element_t;
-
- for(std::vector<element_t>::iterator it(m_generators.begin()), ite(m_generators.end());
- it < ite;
- ++it)
- {
- test_unit* tu;
- while((tu = it->first->next()) != 0) {
- tu->p_decorators.value.insert( tu->p_decorators.value.end(), it->second.begin(), it->second.end() );
- //it->second.store_in( *tu );
- add( tu, 0 );
- }
-
- }
- m_generators.clear();
-
- #if 0
- test_unit* tu;
- while((tu = gen.next()) != 0) {
- decorators.store_in( *tu );
- add( tu, 0 );
- }
- #endif
-}
-
-
-//____________________________________________________________________________//
-
-void
-test_suite::remove( test_unit_id id )
-{
- test_unit_id_list::iterator it = std::find( m_children.begin(), m_children.end(), id );
-
- if( it != m_children.end() )
- m_children.erase( it );
-}
-
-//____________________________________________________________________________//
-
-test_unit_id
-test_suite::get( const_string tu_name ) const
-{
- BOOST_TEST_FOREACH( test_unit_id, id, m_children ) {
- if( tu_name == framework::get( id, ut_detail::test_id_2_unit_type( id ) ).p_name.get() )
- return id;
- }
-
- return INV_TEST_UNIT_ID;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** master_test_suite ************** //
-// ************************************************************************** //
-
-master_test_suite_t::master_test_suite_t()
-: test_suite( "Master Test Suite" )
-, argc( 0 )
-, argv( 0 )
-{
- p_default_status.value = RS_ENABLED;
-}
-
-// ************************************************************************** //
-// ************** traverse_test_tree ************** //
-// ************************************************************************** //
-
-void
-traverse_test_tree( test_case const& tc, test_tree_visitor& V, bool ignore_status )
-{
- if( tc.is_enabled() || ignore_status )
- V.visit( tc );
-}
-
-//____________________________________________________________________________//
-
-void
-traverse_test_tree( test_suite const& suite, test_tree_visitor& V, bool ignore_status )
-{
- // skip disabled test suite unless we asked to ignore this condition
- if( !ignore_status && !suite.is_enabled() )
- return;
-
- // Invoke test_suite_start callback
- if( !V.test_suite_start( suite ) )
- return;
-
- // Recurse into children
- std::size_t total_children = suite.m_children.size();
- for( std::size_t i=0; i < total_children; ) {
- // this statement can remove the test unit from this list
- traverse_test_tree( suite.m_children[i], V, ignore_status );
- if( total_children > suite.m_children.size() )
- total_children = suite.m_children.size();
- else
- ++i;
- }
-
- // Invoke test_suite_finish callback
- V.test_suite_finish( suite );
-}
-
-//____________________________________________________________________________//
-
-void
-traverse_test_tree( test_unit_id id, test_tree_visitor& V, bool ignore_status )
-{
- if( ut_detail::test_id_2_unit_type( id ) == TUT_CASE )
- traverse_test_tree( framework::get<test_case>( id ), V, ignore_status );
- else
- traverse_test_tree( framework::get<test_suite>( id ), V, ignore_status );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** object generators ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-std::string
-normalize_test_case_name( const_string name )
-{
- std::string norm_name( name.begin(), name.size() );
-
- if( name[0] == '&' )
- norm_name = norm_name.substr( 1 );
-
- // trim spaces
- std::size_t first_not_space = norm_name.find_first_not_of(' ');
- if( first_not_space ) {
- norm_name.erase(0, first_not_space);
- }
-
- std::size_t last_not_space = norm_name.find_last_not_of(' ');
- if( last_not_space !=std::string::npos ) {
- norm_name.erase(last_not_space + 1);
- }
-
- // sanitize all chars that might be used in runtime filters
- static const char to_replace[] = { ':', '*', '@', '+', '!', '/' };
- for(std::size_t index = 0;
- index < sizeof(to_replace)/sizeof(to_replace[0]);
- index++) {
- std::replace(norm_name.begin(), norm_name.end(), to_replace[index], '_');
- }
-
- return norm_name;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** auto_test_unit_registrar ************** //
-// ************************************************************************** //
-
-auto_test_unit_registrar::auto_test_unit_registrar( test_case* tc, decorator::collector& decorators, counter_t exp_fail )
-{
- framework::current_auto_test_suite().add( tc, exp_fail );
-
- decorators.store_in( *tc );
- decorators.reset();
-}
-
-//____________________________________________________________________________//
-
-auto_test_unit_registrar::auto_test_unit_registrar( const_string ts_name, const_string ts_file, std::size_t ts_line, decorator::collector& decorators )
-{
- test_unit_id id = framework::current_auto_test_suite().get( ts_name );
-
- test_suite* ts;
-
- if( id != INV_TEST_UNIT_ID ) {
- ts = &framework::get<test_suite>( id );
- BOOST_ASSERT( ts->p_parent_id == framework::current_auto_test_suite().p_id );
- }
- else {
- ts = new test_suite( ts_name, ts_file, ts_line );
- framework::current_auto_test_suite().add( ts );
- }
-
- decorators.store_in( *ts );
- decorators.reset();
-
- framework::current_auto_test_suite( ts );
-}
-
-//____________________________________________________________________________//
-
-auto_test_unit_registrar::auto_test_unit_registrar( test_unit_generator const& tc_gen, decorator::collector& decorators )
-{
- framework::current_auto_test_suite().add( tc_gen, decorators );
-}
-
-//____________________________________________________________________________//
-
-auto_test_unit_registrar::auto_test_unit_registrar( boost::shared_ptr<test_unit_generator> tc_gen, decorator::collector& decorators )
-{
- framework::current_auto_test_suite().add( tc_gen, decorators );
-}
-
-
-//____________________________________________________________________________//
-
-auto_test_unit_registrar::auto_test_unit_registrar( int )
-{
- framework::current_auto_test_suite( 0, false );
-}
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-// ************************************************************************** //
-// ************** global_fixture ************** //
-// ************************************************************************** //
-
-global_fixture::global_fixture()
-{
- framework::register_global_fixture( *this );
-}
-
-global_fixture::~global_fixture()
-{
- framework::deregister_global_fixture( *this );
-}
-
-// ************************************************************************** //
-// ************** global_configuration ************** //
-// ************************************************************************** //
-
-global_configuration::global_configuration()
-{
- framework::register_observer( *this );
-}
-
-global_configuration::~global_configuration()
-{
- framework::deregister_observer( *this );
-}
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/unit_test_log.ipp b/src/third_party/boost-1.68.0/boost/test/impl/unit_test_log.ipp
deleted file mode 100644
index 2a6c0f4bc68..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/unit_test_log.ipp
+++ /dev/null
@@ -1,691 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : implemets Unit Test Log
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
-
-// Boost.Test
-#include <boost/test/unit_test_log.hpp>
-#include <boost/test/unit_test_log_formatter.hpp>
-#include <boost/test/execution_monitor.hpp>
-#include <boost/test/framework.hpp>
-#include <boost/test/unit_test_parameters.hpp>
-
-#include <boost/test/utils/basic_cstring/compare.hpp>
-#include <boost/test/utils/foreach.hpp>
-
-#include <boost/test/output/compiler_log_formatter.hpp>
-#include <boost/test/output/xml_log_formatter.hpp>
-#include <boost/test/output/junit_log_formatter.hpp>
-
-// Boost
-#include <boost/shared_ptr.hpp>
-#include <boost/io/ios_state.hpp>
-typedef ::boost::io::ios_base_all_saver io_saver_type;
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** entry_value_collector ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-entry_value_collector const&
-entry_value_collector::operator<<( lazy_ostream const& v ) const
-{
- unit_test_log << v;
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-entry_value_collector const&
-entry_value_collector::operator<<( const_string v ) const
-{
- unit_test_log << v;
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-entry_value_collector::~entry_value_collector()
-{
- if( m_last )
- unit_test_log << log::end();
-}
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-// ************************************************************************** //
-// ************** unit_test_log ************** //
-// ************************************************************************** //
-
-namespace {
-
-// log data
-struct unit_test_log_data_helper_impl {
- typedef boost::shared_ptr<unit_test_log_formatter> formatter_ptr;
- typedef boost::shared_ptr<io_saver_type> saver_ptr;
-
- bool m_enabled;
- output_format m_format;
- std::ostream* m_stream;
- saver_ptr m_stream_state_saver;
- formatter_ptr m_log_formatter;
- bool m_entry_in_progress;
-
- unit_test_log_data_helper_impl(unit_test_log_formatter* p_log_formatter, output_format format, bool enabled = false)
- : m_enabled( enabled )
- , m_format( format )
- , m_stream( &std::cout )
- , m_stream_state_saver( new io_saver_type( std::cout ) )
- , m_log_formatter()
- , m_entry_in_progress( false )
- {
- m_log_formatter.reset(p_log_formatter);
- m_log_formatter->set_log_level(log_all_errors);
- }
-
- // helper functions
- std::ostream& stream()
- {
- return *m_stream;
- }
-
- log_level get_log_level() const
- {
- return m_log_formatter->get_log_level();
- }
-};
-
-struct unit_test_log_impl {
- // Constructor
- unit_test_log_impl()
- {
- m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::compiler_log_formatter, OF_CLF, true) ); // only this one is active by default,
- m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::xml_log_formatter, OF_XML, false) );
- m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::junit_log_formatter, OF_JUNIT, false) );
- }
-
- typedef std::vector<unit_test_log_data_helper_impl> v_formatter_data_t;
- v_formatter_data_t m_log_formatter_data;
-
- // entry data
- log_entry_data m_entry_data;
-
- bool has_entry_in_progress() const {
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl const&, current_logger_data, m_log_formatter_data ) {
- if( current_logger_data.m_entry_in_progress )
- return true;
- }
- return false;
- }
-
- // check point data
- log_checkpoint_data m_checkpoint_data;
-
- void set_checkpoint( const_string file, std::size_t line_num, const_string msg )
- {
- assign_op( m_checkpoint_data.m_message, msg, 0 );
- m_checkpoint_data.m_file_name = file;
- m_checkpoint_data.m_line_num = line_num;
- }
-};
-
-unit_test_log_impl& s_log_impl() { static unit_test_log_impl the_inst; return the_inst; }
-
-} // local namespace
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::test_start( counter_t test_cases_amount )
-{
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing )
- continue;
-
- current_logger_data.m_log_formatter->log_start( current_logger_data.stream(), test_cases_amount );
-
- if( runtime_config::get<bool>( runtime_config::btrt_build_info ) )
- current_logger_data.m_log_formatter->log_build_info( current_logger_data.stream() );
-
- //current_logger_data.stream().flush();
-
- current_logger_data.m_entry_in_progress = false;
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::test_finish()
-{
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing )
- continue;
-
- current_logger_data.m_log_formatter->log_finish( current_logger_data.stream() );
-
- current_logger_data.stream().flush();
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::test_aborted()
-{
- BOOST_TEST_LOG_ENTRY( log_messages ) << "Test is aborted";
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::test_unit_start( test_unit const& tu )
-{
- if( s_log_impl().has_entry_in_progress() )
- *this << log::end();
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
- continue;
- current_logger_data.m_log_formatter->test_unit_start( current_logger_data.stream(), tu );
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::test_unit_finish( test_unit const& tu, unsigned long elapsed )
-{
- s_log_impl().m_checkpoint_data.clear();
-
- if( s_log_impl().has_entry_in_progress() )
- *this << log::end();
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
-
- if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
- continue;
-
- current_logger_data.m_log_formatter->test_unit_finish( current_logger_data.stream(), tu, elapsed );
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::test_unit_skipped( test_unit const& tu, const_string reason )
-{
- if( s_log_impl().has_entry_in_progress() )
- *this << log::end();
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
- continue;
-
- current_logger_data.m_log_formatter->test_unit_skipped( current_logger_data.stream(), tu, reason );
- }
-}
-
-void
-unit_test_log_t::test_unit_aborted( test_unit const& tu )
-{
- if( s_log_impl().has_entry_in_progress() )
- *this << log::end();
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
- continue;
-
- current_logger_data.m_log_formatter->test_unit_aborted(current_logger_data.stream(), tu );
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::exception_caught( execution_exception const& ex )
-{
- log_level l =
- ex.code() <= execution_exception::cpp_exception_error ? log_cpp_exception_errors :
- (ex.code() <= execution_exception::timeout_error ? log_system_errors
- : log_fatal_errors );
-
- if( s_log_impl().has_entry_in_progress() )
- *this << log::end();
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
-
- if( current_logger_data.m_enabled && l >= current_logger_data.get_log_level() ) {
-
- current_logger_data.m_log_formatter->log_exception_start( current_logger_data.stream(), s_log_impl().m_checkpoint_data, ex );
-
- log_entry_context( l );
-
- current_logger_data.m_log_formatter->log_exception_finish( current_logger_data.stream() );
- }
- }
- clear_entry_context();
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::set_checkpoint( const_string file, std::size_t line_num, const_string msg )
-{
- s_log_impl().set_checkpoint( file, line_num, msg );
-}
-
-//____________________________________________________________________________//
-
-char
-set_unix_slash( char in )
-{
- return in == '\\' ? '/' : in;
-}
-
-unit_test_log_t&
-unit_test_log_t::operator<<( log::begin const& b )
-{
- if( s_log_impl().has_entry_in_progress() )
- *this << log::end();
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_enabled ) {
- current_logger_data.m_stream_state_saver->restore();
- }
- }
-
- s_log_impl().m_entry_data.clear();
-
- assign_op( s_log_impl().m_entry_data.m_file_name, b.m_file_name, 0 );
-
- // normalize file name
- std::transform( s_log_impl().m_entry_data.m_file_name.begin(), s_log_impl().m_entry_data.m_file_name.end(),
- s_log_impl().m_entry_data.m_file_name.begin(),
- &set_unix_slash );
-
- s_log_impl().m_entry_data.m_line_num = b.m_line_num;
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-unit_test_log_t&
-unit_test_log_t::operator<<( log::end const& )
-{
- if( s_log_impl().has_entry_in_progress() ) {
- log_entry_context( s_log_impl().m_entry_data.m_level );
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_enabled && current_logger_data.m_entry_in_progress ) {
- current_logger_data.m_log_formatter->log_entry_finish( current_logger_data.stream() );
- }
- current_logger_data.m_entry_in_progress = false;
- }
- }
-
- clear_entry_context();
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-unit_test_log_t&
-unit_test_log_t::operator<<( log_level l )
-{
- s_log_impl().m_entry_data.m_level = l;
-
- return *this;
-}
-
-//____________________________________________________________________________//
-
-ut_detail::entry_value_collector
-unit_test_log_t::operator()( log_level l )
-{
- *this << l;
-
- return ut_detail::entry_value_collector();
-}
-
-//____________________________________________________________________________//
-
-bool
-unit_test_log_t::log_entry_start(output_format log_format)
-{
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
-
- if( current_logger_data.m_format != log_format )
- continue;
-
- if( current_logger_data.m_entry_in_progress )
- return true;
-
- if( !current_logger_data.m_enabled )
- return false;
-
- switch( s_log_impl().m_entry_data.m_level ) {
- case log_successful_tests:
- current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_INFO );
- break;
- case log_messages:
- current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_MESSAGE );
- break;
- case log_warnings:
- current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_WARNING );
- break;
- case log_all_errors:
- case log_cpp_exception_errors:
- case log_system_errors:
- current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_ERROR );
- break;
- case log_fatal_errors:
- current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
- unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR );
- break;
- case log_nothing:
- case log_test_units:
- case invalid_log_level:
- return false;
- }
-
- current_logger_data.m_entry_in_progress = true;
- return true;
- }
-
- return false;
-}
-
-//____________________________________________________________________________//
-
-unit_test_log_t&
-unit_test_log_t::operator<<( const_string value )
-{
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_enabled && s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && !value.empty() && log_entry_start(current_logger_data.m_format) )
- current_logger_data.m_log_formatter->log_entry_value( current_logger_data.stream(), value );
-
- }
- return *this;
-}
-
-//____________________________________________________________________________//
-
-unit_test_log_t&
-unit_test_log_t::operator<<( lazy_ostream const& value )
-{
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_enabled && s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && !value.empty() ) {
- if( log_entry_start(current_logger_data.m_format) ) {
- current_logger_data.m_log_formatter->log_entry_value( current_logger_data.stream(), value );
- }
- }
- }
- return *this;
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::log_entry_context( log_level l )
-{
- framework::context_generator const& context = framework::get_context();
- if( context.is_empty() )
- return;
-
- const_string frame;
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_enabled ) {
- current_logger_data.m_log_formatter->entry_context_start( current_logger_data.stream(), l );
- }
- }
-
- while( !(frame=context.next()).is_empty() )
- {
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_enabled ) {
- current_logger_data.m_log_formatter->log_entry_context( current_logger_data.stream(), l, frame );
- }
- }
- }
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_enabled ) {
- current_logger_data.m_log_formatter->entry_context_finish( current_logger_data.stream(), l );
- }
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::clear_entry_context()
-{
- framework::clear_context();
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::set_stream( std::ostream& str )
-{
- if( s_log_impl().has_entry_in_progress() )
- return;
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- current_logger_data.m_stream = &str;
- current_logger_data.m_stream_state_saver.reset( new io_saver_type( str ) );
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::set_stream( output_format log_format, std::ostream& str )
-{
- if( s_log_impl().has_entry_in_progress() )
- return;
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_format == log_format) {
- current_logger_data.m_stream = &str;
- current_logger_data.m_stream_state_saver.reset( new io_saver_type( str ) );
- break;
- }
- }
-}
-
-std::ostream*
-unit_test_log_t::get_stream( output_format log_format ) const
-{
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_format == log_format) {
- return current_logger_data.m_stream;
- }
- }
- return 0;
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::set_threshold_level( log_level lev )
-{
- if( s_log_impl().has_entry_in_progress() || lev == invalid_log_level )
- return;
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- current_logger_data.m_log_formatter->set_log_level( lev );
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::set_threshold_level( output_format log_format, log_level lev )
-{
- if( s_log_impl().has_entry_in_progress() || lev == invalid_log_level )
- return;
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_format == log_format) {
- current_logger_data.m_log_formatter->set_log_level( lev );
- break;
- }
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::set_format( output_format log_format )
-{
- if( s_log_impl().has_entry_in_progress() )
- return;
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- current_logger_data.m_enabled = current_logger_data.m_format == log_format;
- }
-}
-
-//____________________________________________________________________________//
-
-void
-unit_test_log_t::add_format( output_format log_format )
-{
- if( s_log_impl().has_entry_in_progress() )
- return;
-
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_format == log_format) {
- current_logger_data.m_enabled = true;
- break;
- }
- }
-}
-
-//____________________________________________________________________________//
-
-unit_test_log_formatter*
-unit_test_log_t::get_formatter( output_format log_format ) {
- BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
- if( current_logger_data.m_format == log_format) {
- return current_logger_data.m_log_formatter.get();
- }
- }
- return 0;
-}
-
-
-void
-unit_test_log_t::add_formatter( unit_test_log_formatter* the_formatter )
-{
- // remove only user defined logger
- for(unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()),
- ite(s_log_impl().m_log_formatter_data.end());
- it != ite;
- ++it)
- {
- if( it->m_format == OF_CUSTOM_LOGGER) {
- s_log_impl().m_log_formatter_data.erase(it);
- break;
- }
- }
-
- if( the_formatter ) {
- s_log_impl().m_log_formatter_data.push_back( unit_test_log_data_helper_impl(the_formatter, OF_CUSTOM_LOGGER, true) );
- }
-}
-
-void
-unit_test_log_t::set_formatter( unit_test_log_formatter* the_formatter )
-{
- // remove only user defined logger
- log_level current_level = invalid_log_level;
- std::ostream *current_stream = 0;
- output_format previous_format = OF_INVALID;
- for(unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()),
- ite(s_log_impl().m_log_formatter_data.end());
- it != ite;
- ++it)
- {
- if( it->m_enabled ) {
- if( current_level == invalid_log_level || it->m_format < previous_format || it->m_format == OF_CUSTOM_LOGGER) {
- current_level = it->get_log_level();
- current_stream = &(it->stream());
- previous_format = it->m_format;
- }
- }
- }
-
- if( the_formatter ) {
- add_formatter(the_formatter);
- set_format(OF_CUSTOM_LOGGER);
- set_threshold_level(OF_CUSTOM_LOGGER, current_level);
- set_stream(OF_CUSTOM_LOGGER, *current_stream);
- }
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** unit_test_log_formatter ************** //
-// ************************************************************************** //
-
-void
-unit_test_log_formatter::log_entry_value( std::ostream& ostr, lazy_ostream const& value )
-{
- log_entry_value( ostr, (wrap_stringstream().ref() << value).str() );
-}
-
-void
-unit_test_log_formatter::set_log_level(log_level new_log_level)
-{
- m_log_level = new_log_level;
-}
-
-log_level
-unit_test_log_formatter::get_log_level() const
-{
- return m_log_level;
-}
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
-
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/unit_test_monitor.ipp b/src/third_party/boost-1.68.0/boost/test/impl/unit_test_monitor.ipp
deleted file mode 100644
index cfb41a239cf..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/impl/unit_test_monitor.ipp
+++ /dev/null
@@ -1,75 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : implements specific subclass of Executon Monitor used by Unit
-// Test Framework to monitor test cases run.
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
-#define BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
-
-// Boost.Test
-#include <boost/test/unit_test_monitor.hpp>
-#include <boost/test/framework.hpp>
-#include <boost/test/tree/test_unit.hpp>
-#include <boost/test/unit_test_parameters.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** unit_test_monitor ************** //
-// ************************************************************************** //
-
-unit_test_monitor_t::error_level
-unit_test_monitor_t::execute_and_translate( boost::function<void ()> const& func, unsigned timeout )
-{
- BOOST_TEST_I_TRY {
- p_catch_system_errors.value = runtime_config::get<bool>( runtime_config::btrt_catch_sys_errors );
- p_timeout.value = timeout;
- p_auto_start_dbg.value = runtime_config::get<bool>( runtime_config::btrt_auto_start_dbg );
- p_use_alt_stack.value = runtime_config::get<bool>( runtime_config::btrt_use_alt_stack );
- p_detect_fp_exceptions.value = runtime_config::get<bool>( runtime_config::btrt_detect_fp_except );
-
- vexecute( func );
- }
- BOOST_TEST_I_CATCH( execution_exception, ex ) {
- framework::exception_caught( ex );
- framework::test_unit_aborted( framework::current_test_unit() );
-
- // translate execution_exception::error_code to error_level
- switch( ex.code() ) {
- case execution_exception::no_error: return test_ok;
- case execution_exception::user_error: return unexpected_exception;
- case execution_exception::cpp_exception_error: return unexpected_exception;
- case execution_exception::system_error: return os_exception;
- case execution_exception::timeout_error: return os_timeout;
- case execution_exception::user_fatal_error:
- case execution_exception::system_fatal_error: return fatal_error;
- default: return unexpected_exception;
- }
- }
-
- return test_ok;
-}
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
diff --git a/src/third_party/boost-1.68.0/boost/test/minimal.hpp b/src/third_party/boost-1.68.0/boost/test/minimal.hpp
deleted file mode 100644
index c52295309e9..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/minimal.hpp
+++ /dev/null
@@ -1,156 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// @brief Deprecated implementation of simple minimal testing
-/// @deprecated
-/// To convert to Unit Test Framework simply rewrite:
-/// @code
-/// #include <boost/test/minimal.hpp>
-///
-/// int test_main( int, char *[] )
-/// {
-/// ...
-/// }
-/// @endcode
-/// as
-/// @code
-/// #include <boost/test/included/unit_test.hpp>
-///
-/// BOOST_AUTO_TEST_CASE(test_main)
-/// {
-/// ...
-/// }
-/// @endcode
-// ***************************************************************************
-
-#ifndef BOOST_TEST_MINIMAL_HPP_071894GER
-#define BOOST_TEST_MINIMAL_HPP_071894GER
-
-#define BOOST_CHECK(exp) \
- ( (exp) \
- ? static_cast<void>(0) \
- : boost::minimal_test::report_error(#exp,__FILE__,__LINE__, BOOST_CURRENT_FUNCTION) )
-
-#define BOOST_REQUIRE(exp) \
- ( (exp) \
- ? static_cast<void>(0) \
- : boost::minimal_test::report_critical_error(#exp,__FILE__,__LINE__,BOOST_CURRENT_FUNCTION))
-
-#define BOOST_ERROR( msg_ ) \
- boost::minimal_test::report_error( (msg_),__FILE__,__LINE__, BOOST_CURRENT_FUNCTION, true )
-#define BOOST_FAIL( msg_ ) \
- boost::minimal_test::report_critical_error( (msg_),__FILE__,__LINE__, BOOST_CURRENT_FUNCTION, true )
-
-//____________________________________________________________________________//
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/impl/execution_monitor.ipp>
-#include <boost/test/impl/debug.ipp>
-#include <boost/test/utils/class_properties.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-
-// Boost
-#include <boost/cstdlib.hpp> // for exit codes
-#include <boost/current_function.hpp> // for BOOST_CURRENT_FUNCTION
-
-// STL
-#include <iostream> // std::cerr, std::endl
-#include <string> // std::string
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-int test_main( int argc, char* argv[] ); // prototype for users test_main()
-
-namespace boost {
-namespace minimal_test {
-
-typedef boost::unit_test::const_string const_string;
-
-inline unit_test::counter_t& errors_counter() { static unit_test::counter_t ec = 0; return ec; }
-
-inline void
-report_error( const char* msg, const char* file, int line, const_string func_name, bool is_msg = false )
-{
- ++errors_counter();
- std::cerr << file << "(" << line << "): ";
-
- if( is_msg )
- std::cerr << msg;
- else
- std::cerr << "test " << msg << " failed";
-
- if( func_name != "(unknown)" )
- std::cerr << " in function: '" << func_name << "'";
-
- std::cerr << std::endl;
-}
-
-inline void
-report_critical_error( const char* msg, const char* file, int line, const_string func_name, bool is_msg = false )
-{
- report_error( msg, file, line, func_name, is_msg );
-
- throw boost::execution_aborted();
-}
-
-class caller {
-public:
- // constructor
- caller( int argc, char** argv )
- : m_argc( argc ), m_argv( argv ) {}
-
- // execution monitor hook implementation
- int operator()() { return test_main( m_argc, m_argv ); }
-
-private:
- // Data members
- int m_argc;
- char** m_argv;
-}; // monitor
-
-} // namespace minimal_test
-} // namespace boost
-
-//____________________________________________________________________________//
-
-int BOOST_TEST_CALL_DECL main( int argc, char* argv[] )
-{
- using namespace boost::minimal_test;
-
- try {
- ::boost::execution_monitor ex_mon;
- int run_result = ex_mon.execute( caller( argc, argv ) );
-
- BOOST_CHECK( run_result == 0 || run_result == boost::exit_success );
- }
- catch( boost::execution_exception const& exex ) {
- if( exex.code() != boost::execution_exception::no_error )
- BOOST_ERROR( (std::string( "exception \"" ) + exex.what() + "\" caught").c_str() );
- std::cerr << "\n**** Testing aborted.";
- }
-
- if( boost::minimal_test::errors_counter() != 0 ) {
- std::cerr << "\n**** " << errors_counter()
- << " error" << (errors_counter() > 1 ? "s" : "" ) << " detected\n";
-
- return boost::exit_test_failure;
- }
-
- std::cout << "\n**** no errors detected\n";
-
- return boost::exit_success;
-}
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_MINIMAL_HPP_071894GER
diff --git a/src/third_party/boost-1.68.0/boost/test/progress_monitor.hpp b/src/third_party/boost-1.68.0/boost/test/progress_monitor.hpp
deleted file mode 100644
index 2f661f58254..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/progress_monitor.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// @brief defines simple text based progress monitor
-// ***************************************************************************
-
-#ifndef BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
-#define BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
-
-// Boost.Test
-#include <boost/test/tree/observer.hpp>
-#include <boost/test/utils/trivial_singleton.hpp>
-
-// STL
-#include <iosfwd> // for std::ostream&
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** progress_monitor ************** //
-// ************************************************************************** //
-
-/// This class implements test observer interface and updates test progress as test units finish or get aborted
-class BOOST_TEST_DECL progress_monitor_t : public test_observer, public singleton<progress_monitor_t> {
-public:
- /// @name Test observer interface
- /// @{
- virtual void test_start( counter_t test_cases_amount );
- virtual void test_aborted();
-
- virtual void test_unit_finish( test_unit const&, unsigned long );
- virtual void test_unit_skipped( test_unit const&, const_string );
-
- virtual int priority() { return 4; }
- /// @}
-
- /// @name Configuration
- /// @{
- void set_stream( std::ostream& );
- /// @}
-
-private:
- BOOST_TEST_SINGLETON_CONS( progress_monitor_t )
-}; // progress_monitor_t
-
-BOOST_TEST_SINGLETON_INST( progress_monitor )
-
-} // namespace unit_test
-} // namespace boost
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
-
diff --git a/src/third_party/boost-1.68.0/boost/test/results_collector.hpp b/src/third_party/boost-1.68.0/boost/test/results_collector.hpp
deleted file mode 100644
index 75a0e551cde..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/results_collector.hpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// @brief Defines testing result collector components
-///
-/// Defines classes for keeping track (@ref test_results) and collecting
-/// (@ref results_collector_t) the states of the test units.
-// ***************************************************************************
-
-#ifndef BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
-#define BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/tree/observer.hpp>
-
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-
-#include <boost/test/utils/trivial_singleton.hpp>
-#include <boost/test/utils/class_properties.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-namespace {
-
-// ************************************************************************** //
-/// First failed assertion debugger hook
-///
-/// This function is a placeholder where user can set a breakpoint in debugger to catch the
-/// very first assertion failure in each test case
-// ************************************************************************** //
-inline void first_failed_assertion() {}
-}
-
-// ************************************************************************** //
-/// @brief Collection of attributes constituting test unit results
-///
-/// This class is a collection of attributes describing a test result.
-///
-/// The attributes presented as public properties on
-/// an instance of the class. In addition summary conclusion methods are presented to generate simple answer to pass/fail question
-
-class BOOST_TEST_DECL test_results {
-public:
- test_results();
-
- /// Type representing counter like public property
- typedef BOOST_READONLY_PROPERTY( counter_t, (results_collector_t)
- (test_results)
- (results_collect_helper) ) counter_prop;
- /// Type representing boolean like public property
- typedef BOOST_READONLY_PROPERTY( bool, (results_collector_t)
- (test_results)
- (results_collect_helper) ) bool_prop;
-
- counter_prop p_assertions_passed; //!< Number of successful assertions
- counter_prop p_assertions_failed; //!< Number of failing assertions
- counter_prop p_warnings_failed; //!< Number of warnings
- counter_prop p_expected_failures;
- counter_prop p_test_cases_passed; //!< Number of successfull test cases
- counter_prop p_test_cases_warned; //!< Number of warnings in test cases
- counter_prop p_test_cases_failed; //!< Number of failing test cases
- counter_prop p_test_cases_skipped; //!< Number of skipped test cases
- counter_prop p_test_cases_aborted; //!< Number of aborted test cases
- counter_prop p_duration_microseconds; //!< Duration of the test in microseconds
- bool_prop p_aborted; //!< Indicates that the test unit execution has been aborted
- bool_prop p_skipped; //!< Indicates that the test unit execution has been skipped
-
- /// Returns true if test unit passed
- bool passed() const;
-
- /// Returns true if test unit skipped
- ///
- /// For test suites, this indicates if the test suite itself has been marked as
- /// skipped, and not if the test suite contains any skipped test.
- bool skipped() const;
-
- /// Returns true if the test unit was aborted (hard failure)
- bool aborted() const;
-
- /// Produces result code for the test unit execution
- ///
- /// This methhod return one of the result codes defined in @c boost/cstdlib.hpp
- /// @returns
- /// - @c boost::exit_success on success,
- /// - @c boost::exit_exception_failure in case test unit
- /// was aborted for any reason (incuding uncaught exception)
- /// - and @c boost::exit_test_failure otherwise
- int result_code() const;
-
- //! Combines the results of the current instance with another
- //!
- //! Only the counters are updated and the @c p_aborted and @c p_skipped are left unchanged.
- void operator+=( test_results const& );
-
- //! Resets the current state of the result
- void clear();
-};
-
-// ************************************************************************** //
-/// @brief Collects and combines the test results
-///
-/// This class collects and combines the results of the test unit during the execution of the
-/// test tree. The results_collector_t::results() function combines the test results on a subtree
-/// of the test tree.
-///
-/// @see boost::unit_test::test_observer
-class BOOST_TEST_DECL results_collector_t : public test_observer, public singleton<results_collector_t> {
-public:
-
- virtual void test_start( counter_t );
-
- virtual void test_unit_start( test_unit const& );
- virtual void test_unit_finish( test_unit const&, unsigned long );
- virtual void test_unit_skipped( test_unit const&, const_string );
- virtual void test_unit_aborted( test_unit const& );
-
- virtual void assertion_result( unit_test::assertion_result );
- virtual void exception_caught( execution_exception const& );
-
- virtual int priority() { return 3; }
-
- /// Results access per test unit
- ///
- /// @param[in] tu_id id of a test unit
- test_results const& results( test_unit_id tu_id ) const;
-
-private:
- BOOST_TEST_SINGLETON_CONS( results_collector_t )
-};
-
-BOOST_TEST_SINGLETON_INST( results_collector )
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
diff --git a/src/third_party/boost-1.68.0/boost/test/test_framework_init_observer.hpp b/src/third_party/boost-1.68.0/boost/test/test_framework_init_observer.hpp
deleted file mode 100644
index cdf5ef5edd9..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/test_framework_init_observer.hpp
+++ /dev/null
@@ -1,63 +0,0 @@
-// (c) Copyright Raffi Enficiaud 2017.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// @brief Defines an observer that monitors the init of the unit test framework
-// ***************************************************************************
-
-#ifndef BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER
-#define BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/tree/observer.hpp>
-
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-
-#include <boost/test/utils/trivial_singleton.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-/// @brief Monitors the init of the framework
-///
-/// This class collects the state of the init/termination of the unit test framework.
-///
-/// @see boost::unit_test::test_observer
-class BOOST_TEST_DECL framework_init_observer_t : public test_observer, public singleton<framework_init_observer_t> {
-public:
-
- virtual void test_start( counter_t );
-
- virtual void assertion_result( unit_test::assertion_result );
- virtual void exception_caught( execution_exception const& );
- virtual void test_aborted();
-
- virtual int priority() { return 0; }
-
- void clear();
-
- /// Indicates if a failure has been recorded so far
- bool has_failed( ) const;
-
-private:
- BOOST_TEST_SINGLETON_CONS( framework_init_observer_t )
-};
-
-BOOST_TEST_SINGLETON_INST( framework_init_observer )
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/assertion.hpp b/src/third_party/boost-1.68.0/boost/test/tools/assertion.hpp
deleted file mode 100644
index cca2f52beb4..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tools/assertion.hpp
+++ /dev/null
@@ -1,410 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief Defines framework for automated assertion construction
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TOOLS_ASSERTION_HPP_100911GER
-#define BOOST_TEST_TOOLS_ASSERTION_HPP_100911GER
-
-// Boost.Test
-#include <boost/test/tools/assertion_result.hpp>
-#include <boost/test/tools/detail/print_helper.hpp>
-#include <boost/test/tools/detail/fwd.hpp>
-
-// Boost
-#include <boost/type.hpp>
-#include <boost/type_traits/decay.hpp>
-#include <boost/mpl/assert.hpp>
-#include <boost/utility/declval.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/remove_const.hpp>
-
-// STL
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-#include <utility>
-#endif
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace test_tools {
-namespace assertion {
-
-// ************************************************************************** //
-// ************** assertion::operators ************** //
-// ************************************************************************** //
-// precedence 4: ->*, .*
-// precedence 5: *, /, %
-// precedence 6: +, -
-// precedence 7: << , >>
-// precedence 8: <, <=, > and >=
-// precedence 9: == and !=
-// precedence 10: bitwise AND
-// precedence 11: bitwise XOR
-// precedence 12: bitwise OR
-// precedence 13: logical AND
-// disabled
-// precedence 14: logical OR
-// disabled
-// precedence 15: ternary conditional
-// disabled
-// precedence 16: = and OP= operators
-// precedence 17: throw operator
-// not supported
-// precedence 18: comma
-// not supported
-
-namespace op {
-
-#define BOOST_TEST_FOR_EACH_COMP_OP(action) \
- action( < , LT, >= ) \
- action( <=, LE, > ) \
- action( > , GT, <= ) \
- action( >=, GE, < ) \
- action( ==, EQ, != ) \
- action( !=, NE, == ) \
-/**/
-
-//____________________________________________________________________________//
-
-#ifndef BOOST_NO_CXX11_DECLTYPE
-
-#define BOOST_TEST_FOR_EACH_CONST_OP(action)\
- action(->*, MEMP, ->* ) \
- \
- action( * , MUL, * ) \
- action( / , DIV, / ) \
- action( % , MOD, % ) \
- \
- action( + , ADD, + ) \
- action( - , SUB, - ) \
- \
- action( <<, LSH, << ) \
- action( >>, RSH, >> ) \
- \
- BOOST_TEST_FOR_EACH_COMP_OP(action) \
- \
- action( & , BAND, & ) \
- action( ^ , XOR, ^ ) \
- action( | , BOR, | ) \
-/**/
-
-#else
-
-#define BOOST_TEST_FOR_EACH_CONST_OP(action)\
- BOOST_TEST_FOR_EACH_COMP_OP(action) \
-/**/
-
-#endif
-
-//____________________________________________________________________________//
-
-#define BOOST_TEST_FOR_EACH_MUT_OP(action) \
- action( = , SET , = ) \
- action( +=, IADD, += ) \
- action( -=, ISUB, -= ) \
- action( *=, IMUL, *= ) \
- action( /=, IDIV, /= ) \
- action( %=, IMOD, %= ) \
- action(<<=, ILSH, <<=) \
- action(>>=, IRSH, >>=) \
- action( &=, IAND, &= ) \
- action( ^=, IXOR, ^= ) \
- action( |=, IOR , |= ) \
-/**/
-
-//____________________________________________________________________________//
-
-#ifndef BOOST_NO_CXX11_DECLTYPE
-# define DEDUCE_RESULT_TYPE( oper ) \
- decltype(boost::declval<Lhs>() oper boost::declval<Rhs>() ) optype; \
- typedef typename boost::remove_reference<optype>::type \
-/**/
-#else
-# define DEDUCE_RESULT_TYPE( oper ) bool
-#endif
-
-#define DEFINE_CONST_OPER( oper, name, rev ) \
-template<typename Lhs, typename Rhs, \
- typename Enabler=void> \
-struct name { \
- typedef DEDUCE_RESULT_TYPE( oper ) result_type; \
- \
- static result_type \
- eval( Lhs const& lhs, Rhs const& rhs ) \
- { \
- return lhs oper rhs; \
- } \
- \
- template<typename PrevExprType> \
- static void \
- report( std::ostream& ostr, \
- PrevExprType const& lhs, \
- Rhs const& rhs) \
- { \
- lhs.report( ostr ); \
- ostr << revert() \
- << tt_detail::print_helper( rhs ); \
- } \
- \
- static char const* revert() \
- { return " " #rev " "; } \
-}; \
-/**/
-
-BOOST_TEST_FOR_EACH_CONST_OP( DEFINE_CONST_OPER )
-
-#undef DEDUCE_RESULT_TYPE
-#undef DEFINE_CONST_OPER
-
-//____________________________________________________________________________//
-
-} // namespace op
-
-// ************************************************************************** //
-// ************** assertion::expression_base ************** //
-// ************************************************************************** //
-// Defines expression operators
-
-template<typename Lhs, typename Rhs, typename OP> class binary_expr;
-
-template<typename ExprType,typename ValType>
-class expression_base {
-public:
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- template<typename T>
- struct RhsT : remove_const<typename remove_reference<T>::type> {};
-
-#define ADD_OP_SUPPORT( oper, name, _ ) \
- template<typename T> \
- binary_expr<ExprType,T, \
- op::name<ValType,typename RhsT<T>::type> > \
- operator oper( T&& rhs ) \
- { \
- return binary_expr<ExprType,T, \
- op::name<ValType,typename RhsT<T>::type> > \
- ( std::forward<ExprType>( \
- *static_cast<ExprType*>(this) ), \
- std::forward<T>(rhs) ); \
- } \
-/**/
-#else
-
-#define ADD_OP_SUPPORT( oper, name, _ ) \
- template<typename T> \
- binary_expr<ExprType,typename boost::decay<T const>::type, \
- op::name<ValType,typename boost::decay<T const>::type> >\
- operator oper( T const& rhs ) const \
- { \
- typedef typename boost::decay<T const>::type Rhs; \
- return binary_expr<ExprType,Rhs,op::name<ValType,Rhs> > \
- ( *static_cast<ExprType const*>(this), \
- rhs ); \
- } \
-/**/
-#endif
-
- BOOST_TEST_FOR_EACH_CONST_OP( ADD_OP_SUPPORT )
- #undef ADD_OP_SUPPORT
-
-#ifndef BOOST_NO_CXX11_AUTO_DECLARATIONS
- // Disabled operators
- template<typename T>
- ExprType&
- operator ||( T const& /*rhs*/ )
- {
- BOOST_MPL_ASSERT_MSG(false, CANT_USE_LOGICAL_OPERATOR_OR_WITHIN_THIS_TESTING_TOOL, () );
-
- return *static_cast<ExprType*>(this);
- }
-
- template<typename T>
- ExprType&
- operator &&( T const& /*rhs*/ )
- {
- BOOST_MPL_ASSERT_MSG(false, CANT_USE_LOGICAL_OPERATOR_AND_WITHIN_THIS_TESTING_TOOL, () );
-
- return *static_cast<ExprType*>(this);
- }
-
- operator bool()
- {
- BOOST_MPL_ASSERT_MSG(false, CANT_USE_TERNARY_OPERATOR_WITHIN_THIS_TESTING_TOOL, () );
-
- return false;
- }
-#endif
-};
-
-// ************************************************************************** //
-// ************** assertion::value_expr ************** //
-// ************************************************************************** //
-// simple value expression
-
-template<typename T>
-class value_expr : public expression_base<value_expr<T>,typename remove_const<typename remove_reference<T>::type>::type> {
-public:
- // Public types
- typedef T result_type;
-
- // Constructor
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- value_expr( value_expr&& ve )
- : m_value( std::forward<T>(ve.m_value) )
- {}
- explicit value_expr( T&& val )
- : m_value( std::forward<T>(val) )
- {}
-#else
- explicit value_expr( T const& val )
- : m_value( val )
- {}
-#endif
-
- // Specific expression interface
- T const& value() const
- {
- return m_value;
- }
- void report( std::ostream& ostr ) const
- {
- ostr << tt_detail::print_helper( m_value );
- }
-
- // Mutating operators
-#define ADD_OP_SUPPORT( OPER, ID, _ ) \
- template<typename U> \
- value_expr<T>& \
- operator OPER( U const& rhs ) \
- { \
- m_value OPER rhs; \
- \
- return *this; \
- } \
-/**/
-
- BOOST_TEST_FOR_EACH_MUT_OP( ADD_OP_SUPPORT )
-#undef ADD_OP_SUPPORT
-
- // expression interface
- assertion_result evaluate( bool no_message = false ) const
- {
- assertion_result res( value() );
- if( no_message || res )
- return res;
-
- format_message( res.message(), value() );
-
- return tt_detail::format_assertion_result( "", res.message().str() );
- }
-
-private:
- template<typename U>
- static void format_message( wrap_stringstream& ostr, U const& v ) { ostr << "[(bool)" << v << " is false]"; }
- static void format_message( wrap_stringstream& /*ostr*/, bool /*v*/ ) {}
- static void format_message( wrap_stringstream& /*ostr*/, assertion_result const& /*v*/ ) {}
-
- // Data members
- T m_value;
-};
-
-// ************************************************************************** //
-// ************** assertion::binary_expr ************** //
-// ************************************************************************** //
-// binary expression
-
-template<typename LExpr, typename Rhs, typename OP>
-class binary_expr : public expression_base<binary_expr<LExpr,Rhs,OP>,typename OP::result_type> {
-public:
- // Public types
- typedef typename OP::result_type result_type;
-
- // Constructor
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- binary_expr( binary_expr&& be )
- : m_lhs( std::forward<LExpr>(be.m_lhs) )
- , m_rhs( std::forward<Rhs>(be.m_rhs) )
- {}
- binary_expr( LExpr&& lhs, Rhs&& rhs )
- : m_lhs( std::forward<LExpr>(lhs) )
- , m_rhs( std::forward<Rhs>(rhs) )
- {}
-#else
- binary_expr( LExpr const& lhs, Rhs const& rhs )
- : m_lhs( lhs )
- , m_rhs( rhs )
- {}
-#endif
-
- // Specific expression interface
- result_type value() const
- {
- return OP::eval( m_lhs.value(), m_rhs );
- }
- void report( std::ostream& ostr ) const
- {
- return OP::report( ostr, m_lhs, m_rhs );
- }
-
- assertion_result evaluate( bool no_message = false ) const
- {
- assertion_result const expr_res( value() );
- if( no_message || expr_res )
- return expr_res;
-
- wrap_stringstream buff;
- report( buff.stream() );
-
- return tt_detail::format_assertion_result( buff.stream().str(), expr_res.message() );
- }
-
- // To support custom manipulators
- LExpr const& lhs() const { return m_lhs; }
- Rhs const& rhs() const { return m_rhs; }
-private:
- // Data members
- LExpr m_lhs;
- Rhs m_rhs;
-};
-
-// ************************************************************************** //
-// ************** assertion::seed ************** //
-// ************************************************************************** //
-// seed added ot the input expression to form an assertion expression
-
-class seed {
-public:
- // ->* is highest precedence left to right operator
- template<typename T>
- value_expr<T>
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- operator->*( T&& v ) const
- {
- return value_expr<T>( std::forward<T>( v ) );
- }
-#else
- operator->*( T const& v ) const
- {
- return value_expr<T>( v );
- }
-#endif
-};
-
-#undef BOOST_TEST_FOR_EACH_CONST_OP
-
-} // namespace assertion
-} // namespace test_tools
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TOOLS_ASSERTION_HPP_100911GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/collection_comparison_op.hpp b/src/third_party/boost-1.68.0/boost/test/tools/collection_comparison_op.hpp
deleted file mode 100644
index 864103fb4a1..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tools/collection_comparison_op.hpp
+++ /dev/null
@@ -1,449 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief Collection comparison with enhanced reporting
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TOOLS_COLLECTION_COMPARISON_OP_HPP_050815GER
-#define BOOST_TEST_TOOLS_COLLECTION_COMPARISON_OP_HPP_050815GER
-
-// Boost.Test
-#include <boost/test/tools/assertion.hpp>
-
-#include <boost/test/utils/is_forward_iterable.hpp>
-#include <boost/test/utils/is_cstring.hpp>
-
-// Boost
-#include <boost/mpl/bool.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/decay.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace test_tools {
-namespace assertion {
-
-// ************************************************************************** //
-// ************* selectors for specialized comparizon routines ************** //
-// ************************************************************************** //
-
-template<typename T>
-struct specialized_compare : public mpl::false_ {};
-
-template <typename T>
-struct is_c_array : public mpl::false_ {};
-
-template<typename T, std::size_t N>
-struct is_c_array<T [N]> : public mpl::true_ {};
-
-template<typename T, std::size_t N>
-struct is_c_array<T (&)[N]> : public mpl::true_ {};
-
-#define BOOST_TEST_SPECIALIZED_COLLECTION_COMPARE(Col) \
-namespace boost { namespace test_tools { namespace assertion { \
-template<> \
-struct specialized_compare<Col> : public mpl::true_ {}; \
-}}} \
-/**/
-
-// ************************************************************************** //
-// ************** lexicographic_compare ************** //
-// ************************************************************************** //
-
-namespace op {
-
-template <typename OP, bool can_be_equal, bool prefer_shorter,
- typename Lhs, typename Rhs>
-inline
-typename boost::enable_if_c<
- unit_test::is_forward_iterable<Lhs>::value && !unit_test::is_cstring<Lhs>::value
- && unit_test::is_forward_iterable<Rhs>::value && !unit_test::is_cstring<Rhs>::value,
- assertion_result>::type
-lexicographic_compare( Lhs const& lhs, Rhs const& rhs )
-{
- assertion_result ar( true );
-
- typedef unit_test::bt_iterator_traits<Lhs> t_Lhs_iterator;
- typedef unit_test::bt_iterator_traits<Rhs> t_Rhs_iterator;
-
- typename t_Lhs_iterator::const_iterator first1 = t_Lhs_iterator::begin(lhs);
- typename t_Rhs_iterator::const_iterator first2 = t_Rhs_iterator::begin(rhs);
- typename t_Lhs_iterator::const_iterator last1 = t_Lhs_iterator::end(lhs);
- typename t_Rhs_iterator::const_iterator last2 = t_Rhs_iterator::end(rhs);
- std::size_t pos = 0;
-
- for( ; (first1 != last1) && (first2 != last2); ++first1, ++first2, ++pos ) {
- assertion_result const& element_ar = OP::eval(*first1, *first2);
- if( !can_be_equal && element_ar )
- return ar; // a < b
-
- assertion_result const& reverse_ar = OP::eval(*first2, *first1);
- if( element_ar && !reverse_ar )
- return ar; // a<=b and !(b<=a) => a < b => return true
-
- if( element_ar || !reverse_ar )
- continue; // (a<=b and b<=a) or (!(a<b) and !(b<a)) => a == b => keep looking
-
- // !(a<=b) and b<=a => b < a => return false
- ar = false;
- ar.message() << "\nFailure at position " << pos << ": "
- << tt_detail::print_helper(*first1)
- << OP::revert()
- << tt_detail::print_helper(*first2)
- << ". " << element_ar.message();
- return ar;
- }
-
- if( first1 != last1 ) {
- if( prefer_shorter ) {
- ar = false;
- ar.message() << "\nFirst collection has extra trailing elements.";
- }
- }
- else if( first2 != last2 ) {
- if( !prefer_shorter ) {
- ar = false;
- ar.message() << "\nSecond collection has extra trailing elements.";
- }
- }
- else if( !can_be_equal ) {
- ar = false;
- ar.message() << "\nCollections appear to be equal.";
- }
-
- return ar;
-}
-
-template <typename OP, bool can_be_equal, bool prefer_shorter,
- typename Lhs, typename Rhs>
-inline
-typename boost::enable_if_c<
- (unit_test::is_cstring<Lhs>::value || unit_test::is_cstring<Rhs>::value),
- assertion_result>::type
-lexicographic_compare( Lhs const& lhs, Rhs const& rhs )
-{
- typedef typename unit_test::deduce_cstring<Lhs>::type lhs_char_type;
- typedef typename unit_test::deduce_cstring<Rhs>::type rhs_char_type;
-
- return lexicographic_compare<OP, can_be_equal, prefer_shorter>(
- lhs_char_type(lhs),
- rhs_char_type(rhs));
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** equality_compare ************** //
-// ************************************************************************** //
-
-template <typename OP, typename Lhs, typename Rhs>
-inline
-typename boost::enable_if_c<
- unit_test::is_forward_iterable<Lhs>::value && !unit_test::is_cstring<Lhs>::value
- && unit_test::is_forward_iterable<Rhs>::value && !unit_test::is_cstring<Rhs>::value,
- assertion_result>::type
-element_compare( Lhs const& lhs, Rhs const& rhs )
-{
- typedef unit_test::bt_iterator_traits<Lhs> t_Lhs_iterator;
- typedef unit_test::bt_iterator_traits<Rhs> t_Rhs_iterator;
-
- assertion_result ar( true );
-
- if( t_Lhs_iterator::size(lhs) != t_Rhs_iterator::size(rhs) ) {
- ar = false;
- ar.message() << "\nCollections size mismatch: " << t_Lhs_iterator::size(lhs) << " != " << t_Rhs_iterator::size(rhs);
- return ar;
- }
-
- typename t_Lhs_iterator::const_iterator left = t_Lhs_iterator::begin(lhs);
- typename t_Rhs_iterator::const_iterator right = t_Rhs_iterator::begin(rhs);
- std::size_t pos = 0;
-
- for( ; pos < t_Lhs_iterator::size(lhs); ++left, ++right, ++pos ) {
- assertion_result const element_ar = OP::eval( *left, *right );
- if( element_ar )
- continue;
-
- ar = false;
- ar.message() << "\nMismatch at position " << pos << ": "
- << tt_detail::print_helper(*left)
- << OP::revert()
- << tt_detail::print_helper(*right)
- << ". " << element_ar.message();
- }
-
- return ar;
-}
-
-// In case string comparison is branching here
-template <typename OP, typename Lhs, typename Rhs>
-inline
-typename boost::enable_if_c<
- (unit_test::is_cstring<Lhs>::value || unit_test::is_cstring<Rhs>::value),
- assertion_result>::type
-element_compare( Lhs const& lhs, Rhs const& rhs )
-{
- typedef typename unit_test::deduce_cstring<Lhs>::type lhs_char_type;
- typedef typename unit_test::deduce_cstring<Rhs>::type rhs_char_type;
-
- return element_compare<OP>(lhs_char_type(lhs),
- rhs_char_type(rhs));
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** non_equality_compare ************** //
-// ************************************************************************** //
-
-template <typename OP, typename Lhs, typename Rhs>
-inline assertion_result
-non_equality_compare( Lhs const& lhs, Rhs const& rhs )
-{
- typedef unit_test::bt_iterator_traits<Lhs> t_Lhs_iterator;
- typedef unit_test::bt_iterator_traits<Rhs> t_Rhs_iterator;
-
- assertion_result ar( true );
-
- if( t_Lhs_iterator::size(lhs) != t_Rhs_iterator::size(rhs) )
- return ar;
-
- typename t_Lhs_iterator::const_iterator left = t_Lhs_iterator::begin(lhs);
- typename t_Rhs_iterator::const_iterator right = t_Rhs_iterator::begin(rhs);
- typename t_Lhs_iterator::const_iterator end = t_Lhs_iterator::end(lhs);
-
- for( ; left != end; ++left, ++right ) {
- if( OP::eval( *left, *right ) )
- return ar;
- }
-
- ar = false;
- ar.message() << "\nCollections appear to be equal";
-
- return ar;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** cctraits ************** //
-// ************************************************************************** //
-// set of collection comparison traits per comparison OP
-
-template<typename OP>
-struct cctraits;
-
-template<typename Lhs, typename Rhs>
-struct cctraits<op::EQ<Lhs, Rhs> > {
- typedef specialized_compare<Lhs> is_specialized;
-};
-
-template<typename Lhs, typename Rhs>
-struct cctraits<op::NE<Lhs, Rhs> > {
- typedef specialized_compare<Lhs> is_specialized;
-};
-
-template<typename Lhs, typename Rhs>
-struct cctraits<op::LT<Lhs, Rhs> > {
- static const bool can_be_equal = false;
- static const bool prefer_short = true;
-
- typedef specialized_compare<Lhs> is_specialized;
-};
-
-template<typename Lhs, typename Rhs>
-struct cctraits<op::LE<Lhs, Rhs> > {
- static const bool can_be_equal = true;
- static const bool prefer_short = true;
-
- typedef specialized_compare<Lhs> is_specialized;
-};
-
-template<typename Lhs, typename Rhs>
-struct cctraits<op::GT<Lhs, Rhs> > {
- static const bool can_be_equal = false;
- static const bool prefer_short = false;
-
- typedef specialized_compare<Lhs> is_specialized;
-};
-
-template<typename Lhs, typename Rhs>
-struct cctraits<op::GE<Lhs, Rhs> > {
- static const bool can_be_equal = true;
- static const bool prefer_short = false;
-
- typedef specialized_compare<Lhs> is_specialized;
-};
-
-// ************************************************************************** //
-// ************** compare_collections ************** //
-// ************************************************************************** //
-// Overloaded set of functions dispatching to specific implementation of comparison
-
-template <typename Lhs, typename Rhs, typename L, typename R>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::EQ<L, R> >*, mpl::true_ )
-{
- return assertion::op::element_compare<op::EQ<L, R> >( lhs, rhs );
-}
-
-//____________________________________________________________________________//
-
-template <typename Lhs, typename Rhs, typename L, typename R>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::EQ<L, R> >*, mpl::false_ )
-{
- return lhs == rhs;
-}
-
-//____________________________________________________________________________//
-
-template <typename Lhs, typename Rhs, typename L, typename R>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::NE<L, R> >*, mpl::true_ )
-{
- return assertion::op::non_equality_compare<op::NE<L, R> >( lhs, rhs );
-}
-
-//____________________________________________________________________________//
-
-template <typename Lhs, typename Rhs, typename L, typename R>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::NE<L, R> >*, mpl::false_ )
-{
- return lhs != rhs;
-}
-
-//____________________________________________________________________________//
-
-template <typename OP, typename Lhs, typename Rhs>
-inline assertion_result
-lexicographic_compare( Lhs const& lhs, Rhs const& rhs )
-{
- return assertion::op::lexicographic_compare<OP, cctraits<OP>::can_be_equal, cctraits<OP>::prefer_short>( lhs, rhs );
-}
-
-//____________________________________________________________________________//
-
-template <typename Lhs, typename Rhs, typename OP>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<OP>*, mpl::true_ )
-{
- return lexicographic_compare<OP>( lhs, rhs );
-}
-
-//____________________________________________________________________________//
-
-template <typename Lhs, typename Rhs, typename L, typename R>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::LT<L, R> >*, mpl::false_ )
-{
- return lhs < rhs;
-}
-
-//____________________________________________________________________________//
-
-template <typename Lhs, typename Rhs, typename L, typename R>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::LE<L, R> >*, mpl::false_ )
-{
- return lhs <= rhs;
-}
-
-//____________________________________________________________________________//
-
-template <typename Lhs, typename Rhs, typename L, typename R>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::GT<L, R> >*, mpl::false_ )
-{
- return lhs > rhs;
-}
-
-//____________________________________________________________________________//
-
-template <typename Lhs, typename Rhs, typename L, typename R>
-inline assertion_result
-compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::GE<L, R> >*, mpl::false_ )
-{
- return lhs >= rhs;
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ********* specialization of comparison operators for collections ********* //
-// ************************************************************************** //
-
-#define DEFINE_COLLECTION_COMPARISON( oper, name, rev ) \
-template<typename Lhs,typename Rhs> \
-struct name<Lhs,Rhs,typename boost::enable_if_c< \
- unit_test::is_forward_iterable<Lhs>::value \
- && !unit_test::is_cstring_comparable<Lhs>::value \
- && unit_test::is_forward_iterable<Rhs>::value \
- && !unit_test::is_cstring_comparable<Rhs>::value>::type> { \
-public: \
- typedef assertion_result result_type; \
- typedef unit_test::bt_iterator_traits<Lhs> t_Lhs_iterator_helper; \
- typedef unit_test::bt_iterator_traits<Rhs> t_Rhs_iterator_helper; \
- \
- typedef name<Lhs, Rhs> OP; \
- \
- typedef typename \
- mpl::if_c< \
- mpl::or_< \
- typename is_c_array<Lhs>::type, \
- typename is_c_array<Rhs>::type \
- >::value, \
- mpl::true_, \
- typename \
- mpl::if_c<is_same<typename decay<Lhs>::type, \
- typename decay<Rhs>::type>::value, \
- typename cctraits<OP>::is_specialized, \
- mpl::false_>::type \
- >::type is_specialized; \
- \
- typedef name<typename t_Lhs_iterator_helper::value_type, \
- typename t_Rhs_iterator_helper::value_type \
- > elem_op; \
- \
- static assertion_result \
- eval( Lhs const& lhs, Rhs const& rhs) \
- { \
- return assertion::op::compare_collections( lhs, rhs, \
- (boost::type<elem_op>*)0, \
- is_specialized() ); \
- } \
- \
- template<typename PrevExprType> \
- static void \
- report( std::ostream&, \
- PrevExprType const&, \
- Rhs const& ) {} \
- \
- static char const* revert() \
- { return " " #rev " "; } \
- \
-}; \
-/**/
-
-BOOST_TEST_FOR_EACH_COMP_OP( DEFINE_COLLECTION_COMPARISON )
-#undef DEFINE_COLLECTION_COMPARISON
-
-//____________________________________________________________________________//
-
-} // namespace op
-} // namespace assertion
-} // namespace test_tools
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TOOLS_COLLECTION_COMPARISON_OP_HPP_050815GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/print_helper.hpp b/src/third_party/boost-1.68.0/boost/test/tools/detail/print_helper.hpp
deleted file mode 100644
index 2c6a3b5e801..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/print_helper.hpp
+++ /dev/null
@@ -1,246 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision: 74248 $
-//
-// Description : defines level of indiration facilitating workarounds for non printable types
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TOOLS_IMPL_COMMON_HPP_012705GER
-#define BOOST_TEST_TOOLS_IMPL_COMMON_HPP_012705GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/workaround.hpp>
-
-// Boost
-#include <boost/mpl/or.hpp>
-#include <boost/static_assert.hpp>
-#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/is_function.hpp>
-#include <boost/type_traits/is_abstract.hpp>
-#include <boost/type_traits/has_left_shift.hpp>
-
-#include <limits>
-
-#if !defined(BOOST_NO_CXX11_NULLPTR)
-#include <cstddef>
-#endif
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace test_tools {
-namespace tt_detail {
-
-// ************************************************************************** //
-// ************** boost_test_print_type ************** //
-// ************************************************************************** //
-
- namespace impl {
- template <class T>
- std::ostream& boost_test_print_type(std::ostream& ostr, T const& t) {
- BOOST_STATIC_ASSERT_MSG( (boost::has_left_shift<std::ostream,T>::value),
- "Type has to implement operator<< to be printable");
- ostr << t;
- return ostr;
- }
-
- struct boost_test_print_type_impl {
- template <class R>
- std::ostream& operator()(std::ostream& ostr, R const& r) const {
- return boost_test_print_type(ostr, r);
- }
- };
- }
-
- // To avoid ODR violations, see N4381
- template <class T> struct static_const { static const T value; };
- template <class T> const T static_const<T>::value = T();
-
- namespace {
- static const impl::boost_test_print_type_impl& boost_test_print_type =
- static_const<impl::boost_test_print_type_impl>::value;
- }
-
-
-// ************************************************************************** //
-// ************** print_log_value ************** //
-// ************************************************************************** //
-
-template<typename T>
-struct print_log_value {
- void operator()( std::ostream& ostr, T const& t )
- {
- typedef typename mpl::or_<is_array<T>,is_function<T>,is_abstract<T> >::type cant_use_nl;
-
- std::streamsize old_precision = set_precision( ostr, cant_use_nl() );
-
- //ostr << t;
- using boost::test_tools::tt_detail::boost_test_print_type;
- boost_test_print_type(ostr, t);
-
- if( old_precision != (std::streamsize)-1 )
- ostr.precision( old_precision );
- }
-
- std::streamsize set_precision( std::ostream& ostr, mpl::false_ )
- {
- if( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 2 )
- return ostr.precision( 2 + std::numeric_limits<T>::digits * 301/1000 );
- else if ( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 10 ) {
-#ifdef BOOST_NO_CXX11_NUMERIC_LIMITS
- // (was BOOST_NO_NUMERIC_LIMITS_LOWEST but now deprecated).
- // No support for std::numeric_limits<double>::max_digits10,
- // so guess that a couple of guard digits more than digits10 will display any difference.
- return ostr.precision( 2 + std::numeric_limits<T>::digits10 );
-#else
- // std::numeric_limits<double>::max_digits10; IS supported.
- // Any noisy or guard digits needed to display any difference are included in max_digits10.
- return ostr.precision( std::numeric_limits<T>::max_digits10 );
-#endif
- }
- // else if T is not specialized for std::numeric_limits<>,
- // then will just get the default precision of 6 digits.
- return (std::streamsize)-1;
- }
-
- std::streamsize set_precision( std::ostream&, mpl::true_ ) { return (std::streamsize)-1; }
-};
-
-//____________________________________________________________________________//
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-template<typename T, std::size_t N >
-struct print_log_value< T[N] > {
- void operator()( std::ostream& ostr, T const* t )
- {
- ostr << t;
- }
-};
-#endif
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<bool> {
- void operator()( std::ostream& ostr, bool t );
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<char> {
- void operator()( std::ostream& ostr, char t );
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<unsigned char> {
- void operator()( std::ostream& ostr, unsigned char t );
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<char const*> {
- void operator()( std::ostream& ostr, char const* t );
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct BOOST_TEST_DECL print_log_value<wchar_t const*> {
- void operator()( std::ostream& ostr, wchar_t const* t );
-};
-
-#if !defined(BOOST_NO_CXX11_NULLPTR)
-template<>
-struct print_log_value<std::nullptr_t> {
- // declaration and definition is here because of #12969 https://svn.boost.org/trac10/ticket/12969
- void operator()( std::ostream& ostr, std::nullptr_t /*t*/ ) {
- ostr << "nullptr";
- }
-};
-#endif
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** print_helper ************** //
-// ************************************************************************** //
-// Adds level of indirection to the output operation, allowing us to customize
-// it for types that do not support operator << directly or for any other reason
-
-template<typename T>
-struct print_helper_t {
- explicit print_helper_t( T const& t ) : m_t( t ) {}
-
- T const& m_t;
-};
-
-//____________________________________________________________________________//
-
-#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
-// Borland suffers premature pointer decay passing arrays by reference
-template<typename T, std::size_t N >
-struct print_helper_t< T[N] > {
- explicit print_helper_t( T const * t ) : m_t( t ) {}
-
- T const * m_t;
-};
-#endif
-
-//____________________________________________________________________________//
-
-template<typename T>
-inline print_helper_t<T>
-print_helper( T const& t )
-{
- return print_helper_t<T>( t );
-}
-
-//____________________________________________________________________________//
-
-template<typename T>
-inline std::ostream&
-operator<<( std::ostream& ostr, print_helper_t<T> const& ph )
-{
- print_log_value<T>()( ostr, ph.m_t );
-
- return ostr;
-}
-
-//____________________________________________________________________________//
-
-} // namespace tt_detail
-
-// ************************************************************************** //
-// ************** BOOST_TEST_DONT_PRINT_LOG_VALUE ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_DONT_PRINT_LOG_VALUE( the_type ) \
-namespace boost{ namespace test_tools{ namespace tt_detail{ \
-template<> \
-struct print_log_value<the_type > { \
- void operator()( std::ostream&, the_type const& ) {} \
-}; \
-}}} \
-/**/
-
-} // namespace test_tools
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TOOLS_IMPL_COMMON_HPP_012705GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/floating_point_comparison.hpp b/src/third_party/boost-1.68.0/boost/test/tools/floating_point_comparison.hpp
deleted file mode 100644
index d704a41092c..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tools/floating_point_comparison.hpp
+++ /dev/null
@@ -1,315 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief algorithms for comparing floating point values
-// ***************************************************************************
-
-#ifndef BOOST_TEST_FLOATING_POINT_COMPARISON_HPP_071894GER
-#define BOOST_TEST_FLOATING_POINT_COMPARISON_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/tools/assertion_result.hpp>
-
-// Boost
-#include <boost/limits.hpp> // for std::numeric_limits
-#include <boost/static_assert.hpp>
-#include <boost/assert.hpp>
-#include <boost/mpl/bool.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/conditional.hpp>
-#include <boost/utility/enable_if.hpp>
-
-// STL
-#include <iosfwd>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace math {
-namespace fpc {
-
-// ************************************************************************** //
-// ************** fpc::tolerance_based ************** //
-// ************************************************************************** //
-
-
-//! @internal
-//! Protects the instanciation of std::numeric_limits from non-supported types (eg. T=array)
-template <typename T, bool enabled>
-struct tolerance_based_delegate;
-
-template <typename T>
-struct tolerance_based_delegate<T, false> : mpl::false_ {};
-
-template <typename T>
-struct tolerance_based_delegate<T, true>
-: mpl::bool_<
- is_floating_point<T>::value ||
- (!std::numeric_limits<T>::is_integer && std::numeric_limits<T>::is_specialized && !std::numeric_limits<T>::is_exact)>
-{};
-
-
-/*!@brief Indicates if a type can be compared using a tolerance scheme
- *
- * This is a metafunction that should evaluate to @c mpl::true_ if the type
- * @c T can be compared using a tolerance based method, typically for floating point
- * types.
- *
- * This metafunction can be specialized further to declare user types that are
- * floating point (eg. boost.multiprecision).
- */
-template <typename T>
-struct tolerance_based : tolerance_based_delegate<T, !is_array<T>::value >::type {};
-
-// ************************************************************************** //
-// ************** fpc::strength ************** //
-// ************************************************************************** //
-
-//! Method for comparing floating point numbers
-enum strength {
- FPC_STRONG, //!< "Very close" - equation 2' in docs, the default
- FPC_WEAK //!< "Close enough" - equation 3' in docs.
-};
-
-
-// ************************************************************************** //
-// ************** tolerance presentation types ************** //
-// ************************************************************************** //
-
-template<typename FPT>
-struct percent_tolerance_t {
- explicit percent_tolerance_t( FPT v ) : m_value( v ) {}
-
- FPT m_value;
-};
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-inline std::ostream& operator<<( std::ostream& out, percent_tolerance_t<FPT> t )
-{
- return out << t.m_value;
-}
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-inline percent_tolerance_t<FPT>
-percent_tolerance( FPT v )
-{
- return percent_tolerance_t<FPT>( v );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** details ************** //
-// ************************************************************************** //
-
-namespace fpc_detail {
-
-// FPT is Floating-Point Type: float, double, long double or User-Defined.
-template<typename FPT>
-inline FPT
-fpt_abs( FPT fpv )
-{
- return fpv < static_cast<FPT>(0) ? -fpv : fpv;
-}
-
-//____________________________________________________________________________//
-
-template<typename FPT>
-struct fpt_specialized_limits
-{
- static FPT min_value() { return (std::numeric_limits<FPT>::min)(); }
- static FPT max_value() { return (std::numeric_limits<FPT>::max)(); }
-};
-
-template<typename FPT>
-struct fpt_non_specialized_limits
-{
- static FPT min_value() { return static_cast<FPT>(0); }
- static FPT max_value() { return static_cast<FPT>(1000000); } // for our purposes it doesn't really matter what value is returned here
-};
-
-template<typename FPT>
-struct fpt_limits : boost::conditional<std::numeric_limits<FPT>::is_specialized,
- fpt_specialized_limits<FPT>,
- fpt_non_specialized_limits<FPT>
- >::type
-{};
-
-//____________________________________________________________________________//
-
-// both f1 and f2 are unsigned here
-template<typename FPT>
-inline FPT
-safe_fpt_division( FPT f1, FPT f2 )
-{
- // Avoid overflow.
- if( (f2 < static_cast<FPT>(1)) && (f1 > f2*fpt_limits<FPT>::max_value()) )
- return fpt_limits<FPT>::max_value();
-
- // Avoid underflow.
- if( (f1 == static_cast<FPT>(0)) ||
- ((f2 > static_cast<FPT>(1)) && (f1 < f2*fpt_limits<FPT>::min_value())) )
- return static_cast<FPT>(0);
-
- return f1/f2;
-}
-
-//____________________________________________________________________________//
-
-template<typename FPT, typename ToleranceType>
-inline FPT
-fraction_tolerance( ToleranceType tolerance )
-{
- return static_cast<FPT>(tolerance);
-}
-
-//____________________________________________________________________________//
-
-template<typename FPT2, typename FPT>
-inline FPT2
-fraction_tolerance( percent_tolerance_t<FPT> tolerance )
-{
- return FPT2(tolerance.m_value)*FPT2(0.01);
-}
-
-//____________________________________________________________________________//
-
-} // namespace fpc_detail
-
-// ************************************************************************** //
-// ************** close_at_tolerance ************** //
-// ************************************************************************** //
-
-
-/*!@brief Predicate for comparing floating point numbers
- *
- * This predicate is used to compare floating point numbers. In addition the comparison produces maximum
- * related differnce, which can be used to generate detailed error message
- * The methods for comparing floating points are detailed in the documentation. The method is chosen
- * by the @ref boost::math::fpc::strength given at construction.
- */
-template<typename FPT>
-class close_at_tolerance {
-public:
- // Public typedefs
- typedef bool result_type;
-
- // Constructor
- template<typename ToleranceType>
- explicit close_at_tolerance( ToleranceType tolerance, fpc::strength fpc_strength = FPC_STRONG )
- : m_fraction_tolerance( fpc_detail::fraction_tolerance<FPT>( tolerance ) )
- , m_strength( fpc_strength )
- , m_tested_rel_diff( 0 )
- {
- BOOST_ASSERT_MSG( m_fraction_tolerance >= FPT(0), "tolerance must not be negative!" ); // no reason for tolerance to be negative
- }
-
- // Access methods
- //! Returns the tolerance
- FPT fraction_tolerance() const { return m_fraction_tolerance; }
-
- //! Returns the comparison method
- fpc::strength strength() const { return m_strength; }
-
- //! Returns the failing fraction
- FPT tested_rel_diff() const { return m_tested_rel_diff; }
-
- /*! Compares two floating point numbers a and b such that their "left" relative difference |a-b|/a and/or
- * "right" relative difference |a-b|/b does not exceed specified relative (fraction) tolerance.
- *
- * @param[in] left first floating point number to be compared
- * @param[in] right second floating point number to be compared
- *
- * What is reported by @c tested_rel_diff in case of failure depends on the comparison method:
- * - for @c FPC_STRONG: the max of the two fractions
- * - for @c FPC_WEAK: the min of the two fractions
- * The rationale behind is to report the tolerance to set in order to make a test pass.
- */
- bool operator()( FPT left, FPT right ) const
- {
- FPT diff = fpc_detail::fpt_abs<FPT>( left - right );
- FPT fraction_of_right = fpc_detail::safe_fpt_division( diff, fpc_detail::fpt_abs( right ) );
- FPT fraction_of_left = fpc_detail::safe_fpt_division( diff, fpc_detail::fpt_abs( left ) );
-
- FPT max_rel_diff = (std::max)( fraction_of_left, fraction_of_right );
- FPT min_rel_diff = (std::min)( fraction_of_left, fraction_of_right );
-
- m_tested_rel_diff = m_strength == FPC_STRONG ? max_rel_diff : min_rel_diff;
-
- return m_tested_rel_diff <= m_fraction_tolerance;
- }
-
-private:
- // Data members
- FPT m_fraction_tolerance;
- fpc::strength m_strength;
- mutable FPT m_tested_rel_diff;
-};
-
-// ************************************************************************** //
-// ************** small_with_tolerance ************** //
-// ************************************************************************** //
-
-
-/*!@brief Predicate for comparing floating point numbers against 0
- *
- * Serves the same purpose as boost::math::fpc::close_at_tolerance, but used when one
- * of the operand is null.
- */
-template<typename FPT>
-class small_with_tolerance {
-public:
- // Public typedefs
- typedef bool result_type;
-
- // Constructor
- explicit small_with_tolerance( FPT tolerance ) // <= absolute tolerance
- : m_tolerance( tolerance )
- {
- BOOST_ASSERT( m_tolerance >= FPT(0) ); // no reason for the tolerance to be negative
- }
-
- // Action method
- bool operator()( FPT fpv ) const
- {
- return fpc::fpc_detail::fpt_abs( fpv ) <= m_tolerance;
- }
-
-private:
- // Data members
- FPT m_tolerance;
-};
-
-// ************************************************************************** //
-// ************** is_small ************** //
-// ************************************************************************** //
-
-template<typename FPT>
-inline bool
-is_small( FPT fpv, FPT tolerance )
-{
- return small_with_tolerance<FPT>( tolerance )( fpv );
-}
-
-//____________________________________________________________________________//
-
-} // namespace fpc
-} // namespace math
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_FLOATING_POINT_COMAPARISON_HPP_071894GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/fpc_op.hpp b/src/third_party/boost-1.68.0/boost/test/tools/fpc_op.hpp
deleted file mode 100644
index b879d218f29..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tools/fpc_op.hpp
+++ /dev/null
@@ -1,210 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief Floating point comparison with enhanced reporting
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TOOLS_FPC_OP_HPP_050915GER
-#define BOOST_TEST_TOOLS_FPC_OP_HPP_050915GER
-
-// Boost.Test
-#include <boost/test/tools/assertion.hpp>
-
-#include <boost/test/tools/floating_point_comparison.hpp>
-#include <boost/test/tools/fpc_tolerance.hpp>
-
-// Boost
-#include <boost/type_traits/common_type.hpp>
-#include <boost/utility/enable_if.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace test_tools {
-namespace assertion {
-namespace op {
-
-// ************************************************************************** //
-// ************** fpctraits ************** //
-// ************************************************************************** //
-// set of floating point comparison traits per comparison OP
-
-template<typename OP>
-struct fpctraits {
- // indicate if we should perform the operation with a "logical OR"
- // with the "equality under tolerance".
- static const bool equality_logical_disjunction = true;
-};
-
-template <typename Lhs, typename Rhs>
-struct fpctraits<op::LT<Lhs,Rhs> > {
- static const bool equality_logical_disjunction = false;
-};
-
-template <typename Lhs, typename Rhs>
-struct fpctraits<op::GT<Lhs,Rhs> > {
- static const bool equality_logical_disjunction = false;
-};
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** set of overloads to select correct fpc algo ************** //
-// ************************************************************************** //
-// we really only care about EQ vs NE. All other comparisons use direct first
-// and then need EQ. For example a <= b (tolerance t) IFF a <= b OR a == b (tolerance t)
-
-template <typename FPT, typename Lhs, typename Rhs, typename OP>
-inline assertion_result
-compare_fpv( Lhs const& lhs, Rhs const& rhs, OP* cmp_operator)
-{
- bool result = cmp_operator->eval_direct(lhs, rhs);
- if(fpctraits<OP>::equality_logical_disjunction) {
- return result || compare_fpv<FPT>(lhs, rhs, (op::EQ<Lhs, Rhs>*)0);
- }
- return result && compare_fpv<FPT>(lhs, rhs, (op::NE<Lhs, Rhs>*)0);
-}
-
-//____________________________________________________________________________//
-
-template <typename FPT, typename Lhs, typename Rhs>
-inline assertion_result
-compare_fpv_near_zero( FPT const& fpv, op::EQ<Lhs,Rhs>* )
-{
- fpc::small_with_tolerance<FPT> P( fpc_tolerance<FPT>() );
-
- assertion_result ar( P( fpv ) );
- if( !ar )
- ar.message() << "Absolute value exceeds tolerance [|" << fpv << "| > "<< fpc_tolerance<FPT>() << ']';
-
- return ar;
-}
-
-//____________________________________________________________________________//
-
-template <typename FPT, typename Lhs, typename Rhs>
-inline assertion_result
-compare_fpv_near_zero( FPT const& fpv, op::NE<Lhs,Rhs>* )
-{
- fpc::small_with_tolerance<FPT> P( fpc_tolerance<FPT>() );
-
- assertion_result ar( !P( fpv ) );
- if( !ar )
- ar.message() << "Absolute value is within tolerance [|" << fpv << "| < "<< fpc_tolerance<FPT>() << ']';
- return ar;
-}
-
-//____________________________________________________________________________//
-
-template <typename FPT, typename Lhs, typename Rhs>
-inline assertion_result
-compare_fpv( Lhs const& lhs, Rhs const& rhs, op::EQ<Lhs,Rhs>* )
-{
- if( lhs == 0 ) {
- return compare_fpv_near_zero( rhs, (op::EQ<Lhs,Rhs>*)0 );
- }
- else if( rhs == 0) {
- return compare_fpv_near_zero( lhs, (op::EQ<Lhs,Rhs>*)0 );
- }
- else {
- fpc::close_at_tolerance<FPT> P( fpc_tolerance<FPT>(), fpc::FPC_STRONG );
-
- assertion_result ar( P( lhs, rhs ) );
- if( !ar )
- ar.message() << "Relative difference exceeds tolerance ["
- << P.tested_rel_diff() << " > " << P.fraction_tolerance() << ']';
- return ar;
- }
-}
-
-//____________________________________________________________________________//
-
-template <typename FPT, typename Lhs, typename Rhs>
-inline assertion_result
-compare_fpv( Lhs const& lhs, Rhs const& rhs, op::NE<Lhs,Rhs>* )
-{
- if( lhs == 0 ) {
- return compare_fpv_near_zero( rhs, (op::NE<Lhs,Rhs>*)0 );
- }
- else if( rhs == 0 ) {
- return compare_fpv_near_zero( lhs, (op::NE<Lhs,Rhs>*)0 );
- }
- else {
- fpc::close_at_tolerance<FPT> P( fpc_tolerance<FPT>(), fpc::FPC_WEAK );
-
- assertion_result ar( !P( lhs, rhs ) );
- if( !ar )
- ar.message() << "Relative difference is within tolerance ["
- << P.tested_rel_diff() << " < " << fpc_tolerance<FPT>() << ']';
-
- return ar;
- }
-}
-
-//____________________________________________________________________________//
-
-#define DEFINE_FPV_COMPARISON( oper, name, rev ) \
-template<typename Lhs,typename Rhs> \
-struct name<Lhs,Rhs,typename boost::enable_if_c< \
- (fpc::tolerance_based<Lhs>::value && \
- fpc::tolerance_based<Rhs>::value)>::type> { \
-public: \
- typedef typename common_type<Lhs,Rhs>::type FPT; \
- typedef name<Lhs,Rhs> OP; \
- \
- typedef assertion_result result_type; \
- \
- static bool \
- eval_direct( Lhs const& lhs, Rhs const& rhs ) \
- { \
- return lhs oper rhs; \
- } \
- \
- static assertion_result \
- eval( Lhs const& lhs, Rhs const& rhs ) \
- { \
- if( fpc_tolerance<FPT>() == FPT(0) ) \
- { \
- return eval_direct( lhs, rhs ); \
- } \
- \
- return compare_fpv<FPT>( lhs, rhs, (OP*)0 ); \
- } \
- \
- template<typename PrevExprType> \
- static void \
- report( std::ostream& ostr, \
- PrevExprType const& lhs, \
- Rhs const& rhs ) \
- { \
- lhs.report( ostr ); \
- ostr << revert() \
- << tt_detail::print_helper( rhs ); \
- } \
- \
- static char const* revert() \
- { return " " #rev " "; } \
-}; \
-/**/
-
-BOOST_TEST_FOR_EACH_COMP_OP( DEFINE_FPV_COMPARISON )
-#undef DEFINE_FPV_COMPARISON
-
-//____________________________________________________________________________//
-
-} // namespace op
-} // namespace assertion
-} // namespace test_tools
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TOOLS_FPC_OP_HPP_050915GER
-
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/auto_registration.hpp b/src/third_party/boost-1.68.0/boost/test/tree/auto_registration.hpp
deleted file mode 100644
index 98bc2924fd3..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tree/auto_registration.hpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision: 74640 $
-//
-// Description : defines auto_test_unit_registrar
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
-#define BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/tree/decorator.hpp>
-#include <boost/test/tree/test_unit.hpp>
-
-// STL
-#include <list>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace ut_detail {
-
-// ************************************************************************** //
-// ************** auto_test_unit_registrar ************** //
-// ************************************************************************** //
-
-struct BOOST_TEST_DECL auto_test_unit_registrar {
- // Constructors
- auto_test_unit_registrar( test_case* tc, decorator::collector& decorators, counter_t exp_fail = 0 );
- explicit auto_test_unit_registrar( const_string ts_name, const_string ts_file, std::size_t ts_line, decorator::collector& decorators );
- explicit auto_test_unit_registrar( test_unit_generator const& tc_gen, decorator::collector& decorators );
- explicit auto_test_unit_registrar( boost::shared_ptr<test_unit_generator> tc_gen, decorator::collector& decorators );
- explicit auto_test_unit_registrar( int );
-};
-
-} // namespace ut_detail
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
-
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/decorator.hpp b/src/third_party/boost-1.68.0/boost/test/tree/decorator.hpp
deleted file mode 100644
index f891a27765e..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tree/decorator.hpp
+++ /dev/null
@@ -1,279 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision: 62016 $
-//
-// Description : defines decorators to be using with auto registered test units
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TREE_DECORATOR_HPP_091911GER
-#define BOOST_TEST_TREE_DECORATOR_HPP_091911GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-
-#include <boost/test/tree/fixture.hpp>
-
-#include <boost/test/tools/assertion_result.hpp>
-
-#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
-#include <boost/test/utils/trivial_singleton.hpp>
-
-// Boost
-#include <boost/shared_ptr.hpp>
-#include <boost/function/function0.hpp>
-#include <boost/function/function1.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-// STL
-#include <vector>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-class test_unit;
-
-namespace decorator {
-
-// ************************************************************************** //
-// ************** decorator::collector ************** //
-// ************************************************************************** //
-
-class base;
-typedef boost::shared_ptr<base> base_ptr;
-
-class BOOST_TEST_DECL collector : public singleton<collector> {
-public:
- collector& operator*( base const& d );
-
- void store_in( test_unit& tu );
-
- void reset();
-
- std::vector<base_ptr> get_lazy_decorators() const;
-
-private:
- BOOST_TEST_SINGLETON_CONS( collector )
-
- // Data members
- std::vector<base_ptr> m_tu_decorators;
-};
-
-// ************************************************************************** //
-// ************** decorator::base ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL base {
-public:
- // composition interface
- collector& operator*() const;
-
- // application interface
- virtual void apply( test_unit& tu ) = 0;
-
- // deep cloning interface
- virtual base_ptr clone() const = 0;
-
-protected:
- virtual ~base() {}
-};
-
-// ************************************************************************** //
-// ************** decorator::label ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL label : public decorator::base {
-public:
- explicit label( const_string l ) : m_label( l ) {}
-
-private:
- // decorator::base interface
- virtual void apply( test_unit& tu );
- virtual base_ptr clone() const { return base_ptr(new label( m_label )); }
-
- // Data members
- const_string m_label;
-};
-
-// ************************************************************************** //
-// ************** decorator::expected_failures ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL expected_failures : public decorator::base {
-public:
- explicit expected_failures( counter_t ef ) : m_exp_fail( ef ) {}
-
-private:
- // decorator::base interface
- virtual void apply( test_unit& tu );
- virtual base_ptr clone() const { return base_ptr(new expected_failures( m_exp_fail )); }
-
- // Data members
- counter_t m_exp_fail;
-};
-
-// ************************************************************************** //
-// ************** decorator::timeout ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL timeout : public decorator::base {
-public:
- explicit timeout( unsigned t ) : m_timeout( t ) {}
-
-private:
- // decorator::base interface
- virtual void apply( test_unit& tu );
- virtual base_ptr clone() const { return base_ptr(new timeout( m_timeout )); }
-
- // Data members
- unsigned m_timeout;
-};
-
-// ************************************************************************** //
-// ************** decorator::description ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL description : public decorator::base {
-public:
- explicit description( const_string descr ) : m_description( descr ) {}
-
-private:
- // decorator::base interface
- virtual void apply( test_unit& tu );
- virtual base_ptr clone() const { return base_ptr(new description( m_description )); }
-
- // Data members
- const_string m_description;
-};
-
-// ************************************************************************** //
-// ************** decorator::depends_on ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL depends_on : public decorator::base {
-public:
- explicit depends_on( const_string dependency ) : m_dependency( dependency ) {}
-
-private:
- // decorator::base interface
- virtual void apply( test_unit& tu );
- virtual base_ptr clone() const { return base_ptr(new depends_on( m_dependency )); }
-
- // Data members
- const_string m_dependency;
-};
-
-// ************************************************************************** //
-// ************** decorator::enable_if/enabled/disabled ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL enable_if_impl : public decorator::base {
-protected:
- void apply_impl( test_unit& tu, bool condition );
-};
-
-template<bool condition>
-class enable_if : public enable_if_impl {
-private:
- // decorator::base interface
- virtual void apply( test_unit& tu ) { this->apply_impl( tu, condition ); }
- virtual base_ptr clone() const { return base_ptr(new enable_if<condition>()); }
-};
-
-typedef enable_if<true> enabled;
-typedef enable_if<false> disabled;
-
-// ************************************************************************** //
-// ************** decorator::fixture ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL fixture_t : public decorator::base {
-public:
- // Constructor
- explicit fixture_t( test_unit_fixture_ptr impl ) : m_impl( impl ) {}
-
-private:
- // decorator::base interface
- virtual void apply( test_unit& tu );
- virtual base_ptr clone() const { return base_ptr(new fixture_t( m_impl )); }
-
- // Data members
- test_unit_fixture_ptr m_impl;
-};
-
-//____________________________________________________________________________//
-
-template<typename F>
-inline fixture_t
-fixture()
-{
- return fixture_t( test_unit_fixture_ptr( new unit_test::class_based_fixture<F>() ) );
-}
-
-//____________________________________________________________________________//
-
-template<typename F, typename Arg>
-inline fixture_t
-fixture( Arg const& arg )
-{
- return fixture_t( test_unit_fixture_ptr( new unit_test::class_based_fixture<F,Arg>( arg ) ) );
-}
-
-//____________________________________________________________________________//
-
-inline fixture_t
-fixture( boost::function<void()> const& setup, boost::function<void()> const& teardown = boost::function<void()>() )
-{
- return fixture_t( test_unit_fixture_ptr( new unit_test::function_based_fixture( setup, teardown ) ) );
-}
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** decorator::depends_on ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL precondition : public decorator::base {
-public:
- typedef boost::function<test_tools::assertion_result (test_unit_id)> predicate_t;
-
- explicit precondition( predicate_t p ) : m_precondition( p ) {}
-
-private:
- // decorator::base interface
- virtual void apply( test_unit& tu );
- virtual base_ptr clone() const { return base_ptr(new precondition( m_precondition )); }
-
- // Data members
- predicate_t m_precondition;
-};
-
-} // namespace decorator
-
-using decorator::label;
-using decorator::expected_failures;
-using decorator::timeout;
-using decorator::description;
-using decorator::depends_on;
-using decorator::enable_if;
-using decorator::enabled;
-using decorator::disabled;
-using decorator::fixture;
-using decorator::precondition;
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TREE_DECORATOR_HPP_091911GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/test_case_template.hpp b/src/third_party/boost-1.68.0/boost/test/tree/test_case_template.hpp
deleted file mode 100644
index f588e12e9fc..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tree/test_case_template.hpp
+++ /dev/null
@@ -1,191 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-///@ file
-/// Defines template_test_case_gen
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
-#define BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-#include <boost/test/detail/workaround.hpp>
-
-#include <boost/test/utils/class_properties.hpp>
-
-#include <boost/test/tree/observer.hpp>
-
-
-// Boost
-#include <boost/shared_ptr.hpp>
-#include <boost/mpl/for_each.hpp>
-#include <boost/mpl/identity.hpp>
-#include <boost/type.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/function/function0.hpp>
-
-#if defined(BOOST_NO_TYPEID) || defined(BOOST_NO_RTTI)
-# include <boost/current_function.hpp>
-#else
-# include <boost/core/demangle.hpp>
-#endif
-
-// STL
-#include <string> // for std::string
-#include <list> // for std::list
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
- !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
- !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
- #include <tuple>
-#endif
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace ut_detail {
-
-// ************************************************************************** //
-// ************** test_case_template_invoker ************** //
-// ************************************************************************** //
-
-template<typename TestCaseTemplate,typename TestType>
-class test_case_template_invoker {
-public:
- void operator()() { TestCaseTemplate::run( (boost::type<TestType>*)0 ); }
-};
-
-// ************************************************************************** //
-// ************** generate_test_case_4_type ************** //
-// ************************************************************************** //
-
-template<typename Generator, typename TestCaseTemplate>
-struct generate_test_case_4_type {
- explicit generate_test_case_4_type( const_string tc_name, const_string tc_file, std::size_t tc_line, Generator& G )
- : m_test_case_name( tc_name )
- , m_test_case_file( tc_file )
- , m_test_case_line( tc_line )
- , m_holder( G )
- {}
-
- template<typename TestType>
- void operator()( mpl::identity<TestType> )
- {
- std::string full_name;
- assign_op( full_name, m_test_case_name, 0 );
- full_name += '<';
-#if !defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
- full_name += boost::core::demangle(typeid(TestType).name()); // same as execution_monitor.ipp
-#else
- full_name += BOOST_CURRENT_FUNCTION;
-#endif
- if( boost::is_const<TestType>::value )
- full_name += "_const";
- full_name += '>';
-
- m_holder.m_test_cases.push_back( new test_case( ut_detail::normalize_test_case_name( full_name ),
- m_test_case_file,
- m_test_case_line,
- test_case_template_invoker<TestCaseTemplate,TestType>() ) );
- }
-
-private:
- // Data members
- const_string m_test_case_name;
- const_string m_test_case_file;
- std::size_t m_test_case_line;
- Generator& m_holder;
-};
-
-// ************************************************************************** //
-// ************** test_case_template ************** //
-// ************************************************************************** //
-
-class template_test_case_gen_base : public test_unit_generator {
-public:
- virtual test_unit* next() const
- {
- if( m_test_cases.empty() )
- return 0;
-
- test_unit* res = m_test_cases.front();
- m_test_cases.pop_front();
-
- return res;
- }
-
- // Data members
- mutable std::list<test_unit*> m_test_cases;
-};
-
-template<typename TestCaseTemplate,typename TestTypesList>
-class template_test_case_gen : public template_test_case_gen_base {
-public:
- // Constructor
- template_test_case_gen( const_string tc_name, const_string tc_file, std::size_t tc_line )
- {
- typedef generate_test_case_4_type<template_test_case_gen<TestCaseTemplate,TestTypesList>,TestCaseTemplate> single_test_gen;
-
- mpl::for_each<TestTypesList,mpl::make_identity<mpl::_> >( single_test_gen( tc_name, tc_file, tc_line, *this ) );
- }
-};
-
-// Describing template test cases with tuples
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
- !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
- !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && \
- !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-
-template<typename TestCaseTemplate, typename... tuple_parameter_pack>
-class template_test_case_gen<TestCaseTemplate, std::tuple<tuple_parameter_pack...> > : public template_test_case_gen_base {
-
- template<int... Is>
- struct seq { };
-
- template<int N, int... Is>
- struct gen_seq : gen_seq<N - 1, N - 1, Is...> { };
-
- template<int... Is>
- struct gen_seq<0, Is...> : seq<Is...> { };
-
- template<typename tuple_t, typename F, int... Is>
- void for_each(F &f, seq<Is...>)
- {
- auto l = { (f(mpl::identity<typename std::tuple_element<Is, tuple_t>::type>()), 0)... };
- (void)l; // silence warning
- }
-
-public:
- // Constructor
- template_test_case_gen( const_string tc_name, const_string tc_file, std::size_t tc_line )
- {
- using tuple_t = std::tuple<tuple_parameter_pack...>;
- using this_type = template_test_case_gen<TestCaseTemplate, tuple_t >;
- using single_test_gen = generate_test_case_4_type<this_type, TestCaseTemplate>;
-
- single_test_gen op( tc_name, tc_file, tc_line, *this );
-
- this->for_each<tuple_t>(op, gen_seq<sizeof...(tuple_parameter_pack)>());
- }
-};
-
-#endif /* C++11 variadic, tuples and type alias */
-
-} // namespace ut_detail
-} // unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/test_unit.hpp b/src/third_party/boost-1.68.0/boost/test/tree/test_unit.hpp
deleted file mode 100644
index 1441bdc7dd1..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/tree/test_unit.hpp
+++ /dev/null
@@ -1,289 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// Defines @ref boost::unit_test::test_unit "test_unit", @ref boost::unit_test::test_case "test_case",
-/// @ref boost::unit_test::test_suite "test_suite" and @ref boost::unit_test::master_test_suite_t "master_test_suite_t"
-// ***************************************************************************
-
-#ifndef BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
-#define BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-
-#include <boost/test/tree/decorator.hpp>
-#include <boost/test/tree/fixture.hpp>
-
-#include <boost/test/tools/assertion_result.hpp>
-
-#include <boost/test/utils/class_properties.hpp>
-
-// Boost
-#include <boost/function/function0.hpp>
-#include <boost/function/function1.hpp>
-
-// STL
-#include <vector>
-#include <string>
-#include <map>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-namespace framework {
-class state;
-BOOST_TEST_DECL master_test_suite_t& master_test_suite();
-}
-
-// ************************************************************************** //
-// ************** test_unit ************** //
-// ************************************************************************** //
-
-typedef std::vector<test_unit_id> test_unit_id_list;
-
-class BOOST_TEST_DECL test_unit {
-public:
- enum { type = TUT_ANY };
- enum run_status { RS_DISABLED, RS_ENABLED, RS_INHERIT, RS_INVALID };
-
- typedef std::vector<test_unit_id> id_list;
- typedef std::vector<test_unit_fixture_ptr> fixture_list_t;
- typedef BOOST_READONLY_PROPERTY(test_unit_id,(framework::state)) id_t;
- typedef BOOST_READONLY_PROPERTY(test_unit_id,(test_suite)) parent_id_t;
- typedef BOOST_READONLY_PROPERTY(id_list,(test_unit)) id_list_t;
- typedef std::vector<decorator::base_ptr> decor_list_t;
- typedef BOOST_READONLY_PROPERTY(std::vector<std::string>,(test_unit)) label_list_t;
-
- typedef boost::function<test_tools::assertion_result (test_unit_id)> precondition_t;
- typedef BOOST_READONLY_PROPERTY(std::vector<precondition_t>,(test_unit)) precond_list_t;
-
- // preconditions management
- void depends_on( test_unit* tu );
- void add_precondition( precondition_t const& );
- test_tools::assertion_result check_preconditions() const;
-
- // labels management
- void add_label( const_string l );
- bool has_label( const_string l ) const;
-
- // helper access methods
- void increase_exp_fail( counter_t num );
- bool is_enabled() const { return p_run_status == RS_ENABLED; }
- std::string full_name() const;
-
- // Public r/o properties
- test_unit_type const p_type; ///< type for this test unit
- const_string const p_type_name; ///< "case"/"suite"/"module"
- const_string const p_file_name;
- std::size_t const p_line_num;
- id_t p_id; ///< unique id for this test unit
- parent_id_t p_parent_id; ///< parent test suite id
- label_list_t p_labels; ///< list of labels associated with this test unit
-
- id_list_t p_dependencies; ///< list of test units this one depends on
- precond_list_t p_preconditions; ///< user supplied preconditions for this test unit;
-
- // Public r/w properties
- readwrite_property<std::string> p_name; ///< name for this test unit
- readwrite_property<std::string> p_description; ///< description for this test unit
- readwrite_property<unsigned> p_timeout; ///< timeout for the test unit execution in seconds
- readwrite_property<counter_t> p_expected_failures; ///< number of expected failures in this test unit
-
- readwrite_property<run_status> p_default_status; ///< run status obtained by this unit during setup phase
- readwrite_property<run_status> p_run_status; ///< run status assigned to this unit before execution phase after applying all filters
-
- readwrite_property<counter_t> p_sibling_rank; ///< rank of this test unit amoung siblings of the same parent
-
- readwrite_property<decor_list_t> p_decorators; ///< automatically assigned decorators; execution is delayed till framework::finalize_setup_phase function
- readwrite_property<fixture_list_t> p_fixtures; ///< fixtures associated with this test unit
-
-protected:
- ~test_unit();
- // Constructor
- test_unit( const_string tu_name, const_string tc_file, std::size_t tc_line, test_unit_type t );
- // Master test suite constructor
- explicit test_unit( const_string module_name );
-
-private:
-};
-
-// ************************************************************************** //
-// ************** test_unit_generator ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL test_unit_generator {
-public:
- virtual test_unit* next() const = 0;
-
-protected:
- BOOST_TEST_PROTECTED_VIRTUAL ~test_unit_generator() {}
-};
-
-// ************************************************************************** //
-// ************** test_case ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL test_case : public test_unit {
-public:
- enum { type = TUT_CASE };
-
- // Constructor
- test_case( const_string tc_name, boost::function<void ()> const& test_func );
- test_case( const_string tc_name, const_string tc_file, std::size_t tc_line, boost::function<void ()> const& test_func );
-
- // Public property
- typedef BOOST_READONLY_PROPERTY(boost::function<void ()>,(test_case)) test_func;
-
- test_func p_test_func;
-
-private:
- friend class framework::state;
- ~test_case() {}
-};
-
-// ************************************************************************** //
-// ************** test_suite ************** //
-// ************************************************************************** //
-
-//! Class representing test suites
-class BOOST_TEST_DECL test_suite : public test_unit {
-public:
- enum { type = TUT_SUITE };
-
- // Constructor
- explicit test_suite( const_string ts_name, const_string ts_file, std::size_t ts_line );
-
- // test unit list management
-
- /*!@brief Adds a test unit to a test suite.
- *
- * It is possible to specify the timeout and the expected failures.
- */
- void add( test_unit* tu, counter_t expected_failures = 0, unsigned timeout = 0 );
-
- /// @overload
- void add( test_unit_generator const& gen, unsigned timeout = 0 );
-
- /// @overload
- void add( test_unit_generator const& gen, decorator::collector& decorators );
-
- /// @overload
- void add( boost::shared_ptr<test_unit_generator> gen_ptr, decorator::collector& decorators );
-
- //! Removes a test from the test suite.
- void remove( test_unit_id id );
-
- //! Generates all the delayed test_units from the generators
- void generate( );
-
-
- // access methods
- test_unit_id get( const_string tu_name ) const;
- std::size_t size() const { return m_children.size(); }
-
-protected:
- // Master test suite constructor
- explicit test_suite( const_string module_name );
-
- friend BOOST_TEST_DECL
- void traverse_test_tree( test_suite const&, test_tree_visitor&, bool );
- friend class framework::state;
- virtual ~test_suite() {}
-
- typedef std::multimap<counter_t,test_unit_id> children_per_rank;
- // Data members
-
- test_unit_id_list m_children;
- children_per_rank m_ranked_children; ///< maps child sibling rank to list of children with that rank
-
- std::vector< std::pair<boost::shared_ptr<test_unit_generator>, std::vector<decorator::base_ptr> > > m_generators; /// lazy evaluation
-};
-
-// ************************************************************************** //
-// ************** master_test_suite ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL master_test_suite_t : public test_suite {
-private:
- master_test_suite_t();
- master_test_suite_t(const master_test_suite_t&); // undefined
- master_test_suite_t& operator=(master_test_suite_t const &); // undefined
-
-public:
- // Data members
- int argc;
- char** argv;
-
- friend master_test_suite_t& boost::unit_test::framework::master_test_suite();
-};
-
-// ************************************************************************** //
-// ************** user_tc_method_invoker ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-BOOST_TEST_DECL std::string normalize_test_case_name( const_string tu_name );
-
-//____________________________________________________________________________//
-
-template<typename InstanceType,typename UserTestCase>
-struct user_tc_method_invoker {
- typedef void (UserTestCase::*TestMethod )();
-
- user_tc_method_invoker( shared_ptr<InstanceType> inst, TestMethod test_method )
- : m_inst( inst ), m_test_method( test_method ) {}
-
- void operator()() { ((*m_inst).*m_test_method)(); }
-
- shared_ptr<InstanceType> m_inst;
- TestMethod m_test_method;
-};
-
-} // namespace ut_detail
-
-// ************************************************************************** //
-// ************** make_test_case ************** //
-// ************************************************************************** //
-
-inline test_case*
-make_test_case( boost::function<void ()> const& test_func, const_string tc_name, const_string tc_file, std::size_t tc_line )
-{
- return new test_case( ut_detail::normalize_test_case_name( tc_name ), tc_file, tc_line, test_func );
-}
-
-//____________________________________________________________________________//
-
-template<typename UserTestCase, typename InstanceType>
-inline test_case*
-make_test_case( void (UserTestCase::* test_method )(),
- const_string tc_name,
- const_string tc_file,
- std::size_t tc_line,
- boost::shared_ptr<InstanceType> user_test_case )
-{
- return new test_case( ut_detail::normalize_test_case_name( tc_name ),
- tc_file,
- tc_line,
- ut_detail::user_tc_method_invoker<InstanceType,UserTestCase>( user_test_case, test_method ) );
-}
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
diff --git a/src/third_party/boost-1.68.0/boost/test/unit_test_log.hpp b/src/third_party/boost-1.68.0/boost/test/unit_test_log.hpp
deleted file mode 100644
index 6944ffa79a0..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/unit_test_log.hpp
+++ /dev/null
@@ -1,280 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// @brief defines singleton class unit_test_log and all manipulators.
-/// unit_test_log has output stream like interface. It's implementation is
-/// completely hidden with pimple idiom
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
-#define BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/tree/observer.hpp>
-
-#include <boost/test/detail/global_typedef.hpp>
-#include <boost/test/detail/log_level.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-
-#include <boost/test/utils/wrap_stringstream.hpp>
-#include <boost/test/utils/trivial_singleton.hpp>
-#include <boost/test/utils/lazy_ostream.hpp>
-
-// Boost
-
-// STL
-#include <iosfwd> // for std::ostream&
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** log manipulators ************** //
-// ************************************************************************** //
-
-namespace log {
-
-struct BOOST_TEST_DECL begin {
- begin( const_string fn, std::size_t ln )
- : m_file_name( fn )
- , m_line_num( ln )
- {}
-
- const_string m_file_name;
- std::size_t m_line_num;
-};
-
-struct end {};
-
-} // namespace log
-
-// ************************************************************************** //
-// ************** entry_value_collector ************** //
-// ************************************************************************** //
-
-namespace ut_detail {
-
-class BOOST_TEST_DECL entry_value_collector {
-public:
- // Constructors
- entry_value_collector() : m_last( true ) {}
- entry_value_collector( entry_value_collector const& rhs ) : m_last( true ) { rhs.m_last = false; }
- ~entry_value_collector();
-
- // collection interface
- entry_value_collector const& operator<<( lazy_ostream const& ) const;
- entry_value_collector const& operator<<( const_string ) const;
-
-private:
- // Data members
- mutable bool m_last;
-};
-
-} // namespace ut_detail
-
-// ************************************************************************** //
-// ************** unit_test_log ************** //
-// ************************************************************************** //
-
-/// @brief Manages the sets of loggers, their streams and log levels
-///
-/// The Boost.Test framework allows for having several formatters/loggers at the same time, each of which
-/// having their own log level and output stream.
-///
-/// This class serves the purpose of
-/// - exposing an interface to the test framework (as a boost::unit_test::test_observer)
-/// - exposing an interface to the testing tools
-/// - managing several loggers
-///
-/// @note Accesses to the functions exposed by this class are made through the singleton
-/// @c boost::unit_test::unit_test_log.
-///
-/// Users/developers willing to implement their own formatter need to:
-/// - implement a boost::unit_test::unit_test_log_formatter that will output the desired format
-/// - register the formatter during a eg. global fixture using the method @c set_formatter (though the framework singleton).
-///
-/// @warning this observer has a higher priority than the @ref boost::unit_test::results_collector_t. This means
-/// that the various @ref boost::unit_test::test_results associated to each test unit may not be available at the time
-/// the @c test_unit_start, @c test_unit_finish ... are called.
-///
-/// @see
-/// - boost::unit_test::test_observer
-/// - boost::unit_test::unit_test_log_formatter
-class BOOST_TEST_DECL unit_test_log_t : public test_observer, public singleton<unit_test_log_t> {
-public:
- // test_observer interface implementation
- virtual void test_start( counter_t test_cases_amount );
- virtual void test_finish();
- virtual void test_aborted();
-
- virtual void test_unit_start( test_unit const& );
- virtual void test_unit_finish( test_unit const&, unsigned long elapsed );
- virtual void test_unit_skipped( test_unit const&, const_string );
- virtual void test_unit_aborted( test_unit const& );
-
- virtual void exception_caught( execution_exception const& ex );
-
- virtual int priority() { return 2; }
-
- // log configuration methods
- //! Sets the stream for all loggers
- //!
- //! This will override the log sink/stream of all loggers, whether enabled or not.
- void set_stream( std::ostream& );
-
- //! Sets the stream for specific logger
- //!
- //! @note Has no effect if the specified format is not found
- //! @par Since Boost 1.62
- void set_stream( output_format, std::ostream& );
-
- //! Returns a pointer to the stream associated to specific logger
- //!
- //! @note Returns a null pointer if the format is not found
- //! @par Since Boost 1.67
- std::ostream* get_stream( output_format ) const;
-
-
- //! Sets the threshold level for all loggers/formatters.
- //!
- //! This will override the log level of all loggers, whether enabled or not.
- void set_threshold_level( log_level );
-
- //! Sets the threshold/log level of a specific format
- //!
- //! @note Has no effect if the specified format is not found
- //! @par Since Boost 1.62
- void set_threshold_level( output_format, log_level );
-
- //! Add a format to the set of loggers
- //!
- //! Adding a logger means that the specified logger is enabled. The log level is managed by the formatter itself
- //! and specifies what events are forwarded to the underlying formatter.
- //! @par Since Boost 1.62
- void add_format( output_format );
-
- //! Sets the format of the logger
- //!
- //! This will become the only active format of the logs.
- void set_format( output_format );
-
- //! Returns the logger instance for a specific format.
- //!
- //! @returns the logger/formatter instance, or @c (unit_test_log_formatter*)0 if the format is not found.
- //! @par Since Boost 1.62
- unit_test_log_formatter* get_formatter( output_format );
-
- //! Sets the logger instance
- //!
- //! The specified logger becomes the unique active one. The custom log formatter has the
- //! format @c OF_CUSTOM_LOGGER. If such a format exists already, its formatter gets replaced by the one
- //! given in argument.
- //!
- //! The log level and output stream of the new formatter are taken from the currently active logger. In case
- //! several loggers are active, the order of priority is CUSTOM, HRF, XML, and JUNIT.
- //! If (unit_test_log_formatter*)0 is given as argument, the custom logger (if any) is removed.
- //!
- //! @note The ownership of the pointer is transfered to the Boost.Test framework. This call is equivalent to
- //! - a call to @c add_formatter
- //! - a call to @c set_format(OF_CUSTOM_LOGGER)
- //! - a configuration of the newly added logger with a previously configured stream and log level.
- void set_formatter( unit_test_log_formatter* );
-
- //! Adds a custom log formatter to the set of formatters
- //!
- //! The specified logger is added with the format @c OF_CUSTOM_LOGGER, such that it can
- //! be futher selected or its stream/log level can be specified.
- //! If there is already a custom logger (with @c OF_CUSTOM_LOGGER), then
- //! the existing one gets replaced by the one given in argument.
- //! The provided logger is added with an enabled state.
- //! If (unit_test_log_formatter*)0 is given as argument, the custom logger (if any) is removed and
- //! no other action is performed.
- //!
- //! @note The ownership of the pointer is transfered to the Boost.Test framework.
- //! @par Since Boost 1.62
- void add_formatter( unit_test_log_formatter* the_formatter );
-
- // test progress logging
- void set_checkpoint( const_string file, std::size_t line_num, const_string msg = const_string() );
-
- // entry logging
- unit_test_log_t& operator<<( log::begin const& ); // begin entry
- unit_test_log_t& operator<<( log::end const& ); // end entry
- unit_test_log_t& operator<<( log_level ); // set entry level
- unit_test_log_t& operator<<( const_string ); // log entry value
- unit_test_log_t& operator<<( lazy_ostream const& ); // log entry value
-
- ut_detail::entry_value_collector operator()( log_level ); // initiate entry collection
-
-private:
- // Implementation helpers
- bool log_entry_start(output_format log_format);
- void log_entry_context( log_level l );
- void clear_entry_context();
-
- BOOST_TEST_SINGLETON_CONS( unit_test_log_t )
-}; // unit_test_log_t
-
-BOOST_TEST_SINGLETON_INST( unit_test_log )
-
-// helper macros
-#define BOOST_TEST_LOG_ENTRY( ll ) \
- (::boost::unit_test::unit_test_log \
- << ::boost::unit_test::log::begin( BOOST_TEST_L(__FILE__), __LINE__ ))(ll) \
-/**/
-
-} // namespace unit_test
-} // namespace boost
-
-// ************************************************************************** //
-// ************** Unit test log interface helpers ************** //
-// ************************************************************************** //
-
-// messages sent by the framework
-#define BOOST_TEST_FRAMEWORK_MESSAGE( M ) \
- (::boost::unit_test::unit_test_log \
- << ::boost::unit_test::log::begin( \
- "boost.test framework", \
- __LINE__ )) \
- ( ::boost::unit_test::log_messages ) \
- << BOOST_TEST_LAZY_MSG( M ) \
-/**/
-
-
-#define BOOST_TEST_MESSAGE( M ) \
- BOOST_TEST_LOG_ENTRY( ::boost::unit_test::log_messages ) \
- << BOOST_TEST_LAZY_MSG( M ) \
-/**/
-
-//____________________________________________________________________________//
-
-#define BOOST_TEST_PASSPOINT() \
- ::boost::unit_test::unit_test_log.set_checkpoint( \
- BOOST_TEST_L(__FILE__), \
- static_cast<std::size_t>(__LINE__) ) \
-/**/
-
-//____________________________________________________________________________//
-
-#define BOOST_TEST_CHECKPOINT( M ) \
- ::boost::unit_test::unit_test_log.set_checkpoint( \
- BOOST_TEST_L(__FILE__), \
- static_cast<std::size_t>(__LINE__), \
- (::boost::wrap_stringstream().ref() << M).str() ) \
-/**/
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
-
diff --git a/src/third_party/boost-1.68.0/boost/test/unit_test_monitor.hpp b/src/third_party/boost-1.68.0/boost/test/unit_test_monitor.hpp
deleted file mode 100644
index 4402b79e73a..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/unit_test_monitor.hpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// @brief defines specific version of execution monitor used to managed run unit of test cases
-///
-/// Translates execution exception into error level
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
-#define BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
-
-// Boost.Test
-#include <boost/test/execution_monitor.hpp>
-#include <boost/test/detail/fwd_decl.hpp>
-#include <boost/test/utils/trivial_singleton.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** unit_test_monitor ************** //
-// ************************************************************************** //
-
-class BOOST_TEST_DECL unit_test_monitor_t : public singleton<unit_test_monitor_t>, public execution_monitor {
-public:
- enum error_level {
- test_ok = 0,
- /// Indicates a failure to prepare the unit test (eg. fixture). Does not
- /// account for tests skipped because of parent tests failed/skipped.
- test_setup_failure = -1,
- unexpected_exception = -2,
- os_exception = -3,
- os_timeout = -4,
- fatal_error = -5 // includes both system and user
- };
-
- static bool is_critical_error( error_level e ) { return e <= fatal_error; }
-
- // monitor method
- error_level execute_and_translate( boost::function<void ()> const& func, unsigned timeout = 0 );
-
-private:
- BOOST_TEST_SINGLETON_CONS( unit_test_monitor_t )
-};
-
-BOOST_TEST_SINGLETON_INST( unit_test_monitor )
-
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
diff --git a/src/third_party/boost-1.68.0/boost/test/unit_test_suite.hpp b/src/third_party/boost-1.68.0/boost/test/unit_test_suite.hpp
deleted file mode 100644
index 13ff804b448..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/unit_test_suite.hpp
+++ /dev/null
@@ -1,403 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-/// @file
-/// @brief Defines Unit Test Framework public API
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
-#define BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
-
-// Boost.Test
-#include <boost/test/framework.hpp>
-#include <boost/test/tree/auto_registration.hpp>
-#include <boost/test/tree/test_case_template.hpp>
-#include <boost/test/tree/global_fixture.hpp>
-
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-
-#include <boost/test/detail/pp_variadic.hpp>
-
-
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** Non-auto (explicit) test case interface ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_CASE( test_function ) \
-boost::unit_test::make_test_case( boost::function<void ()>(test_function), \
- BOOST_TEST_STRINGIZE( test_function ), \
- __FILE__, __LINE__ )
-#define BOOST_CLASS_TEST_CASE( test_function, tc_instance ) \
-boost::unit_test::make_test_case( (test_function), \
- BOOST_TEST_STRINGIZE( test_function ), \
- __FILE__, __LINE__, tc_instance )
-
-// ************************************************************************** //
-// ************** BOOST_TEST_SUITE ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_SUITE( testsuite_name ) \
-( new boost::unit_test::test_suite( testsuite_name, __FILE__, __LINE__ ) )
-
-// ************************************************************************** //
-// ************** BOOST_AUTO_TEST_SUITE ************** //
-// ************************************************************************** //
-
-#define BOOST_AUTO_TEST_SUITE_WITH_DECOR( suite_name, decorators ) \
-namespace suite_name { \
-BOOST_AUTO_TU_REGISTRAR( suite_name )( \
- BOOST_STRINGIZE( suite_name ), \
- __FILE__, __LINE__, \
- decorators ); \
-/**/
-
-#define BOOST_AUTO_TEST_SUITE_NO_DECOR( suite_name ) \
- BOOST_AUTO_TEST_SUITE_WITH_DECOR( \
- suite_name, \
- boost::unit_test::decorator::collector::instance() ) \
-/**/
-
-#if BOOST_PP_VARIADICS
-#define BOOST_AUTO_TEST_SUITE( ... ) \
- BOOST_TEST_INVOKE_IF_N_ARGS( 1, \
- BOOST_AUTO_TEST_SUITE_NO_DECOR, \
- BOOST_AUTO_TEST_SUITE_WITH_DECOR, \
- __VA_ARGS__) \
-/**/
-
-#else /* BOOST_PP_VARIADICS */
-
-#define BOOST_AUTO_TEST_SUITE( suite_name ) \
- BOOST_AUTO_TEST_SUITE_NO_DECOR( suite_name ) \
-/**/
-
-
-#endif /* BOOST_PP_VARIADICS */
-
-// ************************************************************************** //
-// ************** BOOST_FIXTURE_TEST_SUITE ************** //
-// ************************************************************************** //
-
-#define BOOST_FIXTURE_TEST_SUITE_WITH_DECOR(suite_name, F, decorators) \
- BOOST_AUTO_TEST_SUITE_WITH_DECOR( suite_name, decorators ) \
-typedef F BOOST_AUTO_TEST_CASE_FIXTURE; \
-/**/
-
-#define BOOST_FIXTURE_TEST_SUITE_NO_DECOR( suite_name, F ) \
- BOOST_AUTO_TEST_SUITE_NO_DECOR( suite_name ) \
-typedef F BOOST_AUTO_TEST_CASE_FIXTURE; \
-/**/
-
-#if BOOST_PP_VARIADICS
-
-#define BOOST_FIXTURE_TEST_SUITE( ... ) \
- BOOST_TEST_INVOKE_IF_N_ARGS( 2, \
- BOOST_FIXTURE_TEST_SUITE_NO_DECOR, \
- BOOST_FIXTURE_TEST_SUITE_WITH_DECOR, \
- __VA_ARGS__) \
-/**/
-
-#else /* BOOST_PP_VARIADICS */
-
-#define BOOST_FIXTURE_TEST_SUITE( suite_name, F ) \
- BOOST_FIXTURE_TEST_SUITE_NO_DECOR( suite_name, F ) \
-/**/
-
-
-#endif /* BOOST_PP_VARIADICS */
-
-
-// ************************************************************************** //
-// ************** BOOST_AUTO_TEST_SUITE_END ************** //
-// ************************************************************************** //
-
-#define BOOST_AUTO_TEST_SUITE_END() \
-BOOST_AUTO_TU_REGISTRAR( end_suite )( 1 ); \
-} \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES ************** //
-// ************************************************************************** //
-
-/// @deprecated use decorator instead
-#define BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES( test_name, n ) \
-BOOST_TEST_DECORATOR( * boost::unit_test::expected_failures( n ) ) \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_FIXTURE_TEST_CASE ************** //
-// ************************************************************************** //
-
-#define BOOST_FIXTURE_TEST_CASE_WITH_DECOR( test_name, F, decorators ) \
-struct test_name : public F { void test_method(); }; \
- \
-static void BOOST_AUTO_TC_INVOKER( test_name )() \
-{ \
- BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture ctor"); \
- test_name t; \
- BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture setup"); \
- boost::unit_test::setup_conditional(t); \
- BOOST_TEST_CHECKPOINT('"' << #test_name << "\" test entry"); \
- t.test_method(); \
- BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture teardown"); \
- boost::unit_test::teardown_conditional(t); \
- BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture dtor"); \
-} \
- \
-struct BOOST_AUTO_TC_UNIQUE_ID( test_name ) {}; \
- \
-BOOST_AUTO_TU_REGISTRAR( test_name )( \
- boost::unit_test::make_test_case( \
- &BOOST_AUTO_TC_INVOKER( test_name ), \
- #test_name, __FILE__, __LINE__ ), \
- decorators ); \
- \
-void test_name::test_method() \
-/**/
-
-#define BOOST_FIXTURE_TEST_CASE_NO_DECOR( test_name, F ) \
-BOOST_FIXTURE_TEST_CASE_WITH_DECOR( test_name, F, \
- boost::unit_test::decorator::collector::instance() ) \
-/**/
-
-#if BOOST_PP_VARIADICS
-
-#define BOOST_FIXTURE_TEST_CASE( ... ) \
- BOOST_TEST_INVOKE_IF_N_ARGS( 2, \
- BOOST_FIXTURE_TEST_CASE_NO_DECOR, \
- BOOST_FIXTURE_TEST_CASE_WITH_DECOR, \
- __VA_ARGS__) \
-/**/
-
-#else /* BOOST_PP_VARIADICS */
-
-#define BOOST_FIXTURE_TEST_CASE( test_name, F ) \
- BOOST_FIXTURE_TEST_CASE_NO_DECOR(test_name, F) \
-/**/
-
-
-#endif /* BOOST_PP_VARIADICS */
-
-// ************************************************************************** //
-// ************** BOOST_AUTO_TEST_CASE ************** //
-// ************************************************************************** //
-
-#define BOOST_AUTO_TEST_CASE_NO_DECOR( test_name ) \
- BOOST_FIXTURE_TEST_CASE_NO_DECOR( test_name, \
- BOOST_AUTO_TEST_CASE_FIXTURE ) \
-/**/
-
-#define BOOST_AUTO_TEST_CASE_WITH_DECOR( test_name, decorators ) \
- BOOST_FIXTURE_TEST_CASE_WITH_DECOR( test_name, \
- BOOST_AUTO_TEST_CASE_FIXTURE, decorators ) \
-/**/
-
-#if BOOST_PP_VARIADICS
-
-#define BOOST_AUTO_TEST_CASE( ... ) \
- BOOST_TEST_INVOKE_IF_N_ARGS( 1, \
- BOOST_AUTO_TEST_CASE_NO_DECOR, \
- BOOST_AUTO_TEST_CASE_WITH_DECOR, \
- __VA_ARGS__) \
-/**/
-
-#else /* BOOST_PP_VARIADICS */
-
-#define BOOST_AUTO_TEST_CASE( test_name ) \
- BOOST_AUTO_TEST_CASE_NO_DECOR( test_name ) \
-/**/
-
-
-#endif /* BOOST_PP_VARIADICS */
-
-// ************************************************************************** //
-// ************** BOOST_FIXTURE_TEST_CASE_TEMPLATE ************** //
-// ************************************************************************** //
-
-#define BOOST_FIXTURE_TEST_CASE_TEMPLATE( test_name, type_name, TL, F ) \
-template<typename type_name> \
-struct test_name : public F \
-{ void test_method(); }; \
- \
-struct BOOST_AUTO_TC_INVOKER( test_name ) { \
- template<typename TestType> \
- static void run( boost::type<TestType>* = 0 ) \
- { \
- BOOST_TEST_CHECKPOINT('"' << #test_name <<"\" fixture entry."); \
- test_name<TestType> t; boost::unit_test::setup_conditional(t); \
- BOOST_TEST_CHECKPOINT('"' << #test_name << "\" entry."); \
- t.test_method(); \
- BOOST_TEST_CHECKPOINT('"' << #test_name << "\" exit."); \
- boost::unit_test::teardown_conditional(t); \
- } \
-}; \
- \
-BOOST_AUTO_TU_REGISTRAR( test_name )( \
- boost::unit_test::ut_detail::template_test_case_gen< \
- BOOST_AUTO_TC_INVOKER( test_name ),TL >( \
- BOOST_STRINGIZE( test_name ), __FILE__, __LINE__ ), \
- boost::unit_test::decorator::collector::instance() ); \
- \
-template<typename type_name> \
-void test_name<type_name>::test_method() \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_AUTO_TEST_CASE_TEMPLATE ************** //
-// ************************************************************************** //
-
-#define BOOST_AUTO_TEST_CASE_TEMPLATE( test_name, type_name, TL ) \
-BOOST_FIXTURE_TEST_CASE_TEMPLATE( test_name, type_name, TL, \
- BOOST_AUTO_TEST_CASE_FIXTURE ) \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_TEST_CASE_TEMPLATE ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_CASE_TEMPLATE( name, typelist ) \
- boost::unit_test::ut_detail::template_test_case_gen<name,typelist>( \
- BOOST_TEST_STRINGIZE( name ), __FILE__, __LINE__ ) \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_TEST_CASE_TEMPLATE_FUNCTION ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_CASE_TEMPLATE_FUNCTION( name, type_name ) \
-template<typename type_name> \
-void BOOST_JOIN( name, _impl )( boost::type<type_name>* ); \
- \
-struct name { \
- template<typename TestType> \
- static void run( boost::type<TestType>* frwrd = 0 ) \
- { \
- BOOST_JOIN( name, _impl )( frwrd ); \
- } \
-}; \
- \
-template<typename type_name> \
-void BOOST_JOIN( name, _impl )( boost::type<type_name>* ) \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_GLOBAL_FIXTURE ************** //
-// ************************************************************************** //
-
-#define BOOST_GLOBAL_FIXTURE( F ) \
-static boost::unit_test::ut_detail::global_configuration_impl<F> BOOST_JOIN( gf_, F ) \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_TEST_GLOBAL_CONFIGURATION ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_GLOBAL_CONFIGURATION( F ) \
-static boost::unit_test::ut_detail::global_configuration_impl<F> BOOST_JOIN( gf_, F ) \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_TEST_GLOBAL_FIXTURE ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_GLOBAL_FIXTURE( F ) \
-static boost::unit_test::ut_detail::global_fixture_impl<F> BOOST_JOIN( gf_, F ) \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_TEST_DECORATOR ************** //
-// ************************************************************************** //
-
-#define BOOST_TEST_DECORATOR( D ) \
-static boost::unit_test::decorator::collector const& \
-BOOST_TEST_APPEND_UNIQUE_ID(decorator_collector) = D; \
-/**/
-
-// ************************************************************************** //
-// ************** BOOST_AUTO_TEST_CASE_FIXTURE ************** //
-// ************************************************************************** //
-
-namespace boost { namespace unit_test { namespace ut_detail {
-
-struct nil_t {};
-
-} // namespace ut_detail
-} // unit_test
-} // namespace boost
-
-// Intentionally is in global namespace, so that FIXTURE_TEST_SUITE can reset it in user code.
-typedef ::boost::unit_test::ut_detail::nil_t BOOST_AUTO_TEST_CASE_FIXTURE;
-
-// ************************************************************************** //
-// ************** Auto registration facility helper macros ************** //
-// ************************************************************************** //
-
-// Facility for having a unique name based on __LINE__ and __COUNTER__ (later if available)
-#if defined(__COUNTER__)
- #define BOOST_TEST_INTERNAL_HAS_COUNTER
-#endif
-
-#if defined(BOOST_TEST_INTERNAL_HAS_COUNTER)
- #define BOOST_TEST_APPEND_UNIQUE_ID( name ) \
- BOOST_JOIN( BOOST_JOIN( name, __LINE__ ), __COUNTER__)
- /**/
-#else
- #define BOOST_TEST_APPEND_UNIQUE_ID( name ) \
- BOOST_JOIN( name, __LINE__ )
- /**/
-#endif
-/**/
-
-#define BOOST_AUTO_TU_REGISTRAR( test_name ) \
-static boost::unit_test::ut_detail::auto_test_unit_registrar \
-BOOST_TEST_APPEND_UNIQUE_ID( BOOST_JOIN( test_name, _registrar ) ) \
-/**/
-#define BOOST_AUTO_TC_INVOKER( test_name ) BOOST_JOIN( test_name, _invoker )
-#define BOOST_AUTO_TC_UNIQUE_ID( test_name ) BOOST_JOIN( test_name, _id )
-
-// ************************************************************************** //
-// ************** BOOST_TEST_MAIN ************** //
-// ************************************************************************** //
-
-#if defined(BOOST_TEST_MAIN)
-
-#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
-bool init_unit_test() {
-#else
-::boost::unit_test::test_suite*
-init_unit_test_suite( int, char* [] ) {
-#endif
-
-#ifdef BOOST_TEST_MODULE
- using namespace ::boost::unit_test;
- assign_op( framework::master_test_suite().p_name.value, BOOST_TEST_STRINGIZE( BOOST_TEST_MODULE ).trim( "\"" ), 0 );
-
-#endif
-
-#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
- return true;
-}
-#else
- return 0;
-}
-#endif
-
-#endif
-
-//____________________________________________________________________________//
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-
-#endif // BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
-
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/is_forward_iterable.hpp b/src/third_party/boost-1.68.0/boost/test/utils/is_forward_iterable.hpp
deleted file mode 100644
index 1c9108054b5..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/is_forward_iterable.hpp
+++ /dev/null
@@ -1,267 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//! @file
-//! Defines the is_forward_iterable collection type trait
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
-#define BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
-
-#if defined(BOOST_NO_CXX11_DECLTYPE) || \
- defined(BOOST_NO_CXX11_NULLPTR) || \
- defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES)
-
- // this feature works with VC2012 upd 5 while BOOST_NO_CXX11_TRAILING_RESULT_TYPES is defined
- #if !defined(BOOST_MSVC) || BOOST_MSVC_FULL_VER < 170061030 /* VC2012 upd 5 */
- #define BOOST_TEST_FWD_ITERABLE_CXX03
- #endif
-#endif
-
-#if defined(BOOST_TEST_FWD_ITERABLE_CXX03)
-// Boost
-#include <boost/mpl/bool.hpp>
-
-// STL
-#include <list>
-#include <vector>
-#include <map>
-#include <set>
-
-#else
-
-// Boost
-#include <boost/static_assert.hpp>
-#include <boost/utility/declval.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/test/utils/is_cstring.hpp>
-
-// STL
-#include <utility>
-#include <type_traits>
-
-#endif
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-template<typename T>
-struct is_forward_iterable;
-
-// ************************************************************************** //
-// ************** is_forward_iterable ************** //
-// ************************************************************************** //
-
-#if defined(BOOST_TEST_FWD_ITERABLE_CXX03) && !defined(BOOST_TEST_DOXYGEN_DOC__)
-template<typename T>
-struct is_forward_iterable : public mpl::false_ {};
-
-template<typename T>
-struct is_forward_iterable<T const> : public is_forward_iterable<T> {};
-
-template<typename T>
-struct is_forward_iterable<T&> : public is_forward_iterable<T> {};
-
-template<typename T, std::size_t N>
-struct is_forward_iterable< T [N] > : public mpl::true_ {};
-
-template<typename T, typename A>
-struct is_forward_iterable< std::vector<T, A> > : public mpl::true_ {};
-
-template<typename T, typename A>
-struct is_forward_iterable< std::list<T, A> > : public mpl::true_ {};
-
-template<typename K, typename V, typename C, typename A>
-struct is_forward_iterable< std::map<K, V, C, A> > : public mpl::true_ {};
-
-template<typename K, typename C, typename A>
-struct is_forward_iterable< std::set<K, C, A> > : public mpl::true_ {};
-
-// string is also forward iterable, even if sometimes we want to treat the
-// assertions differently.
-template<>
-struct is_forward_iterable< std::string > : public mpl::true_ {};
-
-#else
-
-namespace ut_detail {
-
-// SFINAE helper
-template<typename T>
-struct is_present : public mpl::true_ {};
-
-//____________________________________________________________________________//
-
-// some compiler do not implement properly decltype non expression involving members (eg. VS2013)
-// a workaround is to use -> decltype syntax.
-template <class T>
-struct has_member_size {
-private:
- struct nil_t {};
- template<typename U> static auto test( U* ) -> decltype(boost::declval<U>().size());
- template<typename> static nil_t test( ... );
-
-public:
- static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
-};
-
-//____________________________________________________________________________//
-
-template <class T>
-struct has_member_begin {
-private:
- struct nil_t {};
- template<typename U> static auto test( U* ) -> decltype(std::begin(boost::declval<U&>())); // does not work with boost::begin
- template<typename> static nil_t test( ... );
-public:
- static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
-};
-
-//____________________________________________________________________________//
-
-template <class T>
-struct has_member_end {
-private:
- struct nil_t {};
- template<typename U> static auto test( U* ) -> decltype(std::end(boost::declval<U&>())); // does not work with boost::end
- template<typename> static nil_t test( ... );
-public:
- static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
-};
-
-//____________________________________________________________________________//
-
-template <class T, class enabled = void>
-struct is_forward_iterable_impl : std::false_type {
-};
-
-template <class T>
-struct is_forward_iterable_impl<
- T,
- typename std::enable_if<
- has_member_begin<T>::value &&
- has_member_end<T>::value
- >::type
-> : std::true_type
-{};
-
-//____________________________________________________________________________//
-
-template <class T, class enabled = void>
-struct is_container_forward_iterable_impl : std::false_type {
-};
-
-template <class T>
-struct is_container_forward_iterable_impl<
- T,
- typename std::enable_if<
- is_present<typename T::const_iterator>::value &&
- is_present<typename T::value_type>::value &&
- has_member_size<T>::value &&
- is_forward_iterable_impl<T>::value
- >::type
-> : is_forward_iterable_impl<T>
-{};
-
-//____________________________________________________________________________//
-
-} // namespace ut_detail
-
-/*! Indicates that a specific type implements the forward iterable concept. */
-template<typename T>
-struct is_forward_iterable {
- typedef typename std::remove_reference<T>::type T_ref;
- typedef ut_detail::is_forward_iterable_impl<T_ref> is_fwd_it_t;
- typedef mpl::bool_<is_fwd_it_t::value> type;
- enum { value = is_fwd_it_t::value };
-};
-
-/*! Indicates that a specific type implements the forward iterable concept. */
-template<typename T>
-struct is_container_forward_iterable {
- typedef typename std::remove_reference<T>::type T_ref;
- typedef ut_detail::is_container_forward_iterable_impl<T_ref> is_fwd_it_t;
- typedef mpl::bool_<is_fwd_it_t::value> type;
- enum { value = is_fwd_it_t::value };
-};
-
-#endif /* defined(BOOST_TEST_FWD_ITERABLE_CXX03) */
-
-
-//! Helper structure for accessing the content of a container or an array
-template <typename T, bool is_forward_iterable = is_forward_iterable<T>::value >
-struct bt_iterator_traits;
-
-template <typename T>
-struct bt_iterator_traits< T, true >{
- BOOST_STATIC_ASSERT((is_forward_iterable<T>::value));
-
-#if defined(BOOST_TEST_FWD_ITERABLE_CXX03) || \
- (defined(BOOST_MSVC) && (BOOST_MSVC_FULL_VER <= 170061030))
- typedef typename T::const_iterator const_iterator;
- typedef typename std::iterator_traits<const_iterator>::value_type value_type;
-#else
- typedef decltype(boost::declval<
- typename boost::add_const<
- typename boost::remove_reference<T>::type
- >::type>().begin()) const_iterator;
-
- typedef typename std::iterator_traits<const_iterator>::value_type value_type;
-#endif /* BOOST_TEST_FWD_ITERABLE_CXX03 */
-
- static const_iterator begin(T const& container) {
- return container.begin();
- }
- static const_iterator end(T const& container) {
- return container.end();
- }
-
-#if defined(BOOST_TEST_FWD_ITERABLE_CXX03) || \
- (defined(BOOST_MSVC) && (BOOST_MSVC_FULL_VER <= 170061030))
- static std::size_t
- size(T const& container) {
- return container.size();
- }
-#else
- static std::size_t
- size(T const& container) {
- return size(container,
- std::integral_constant<bool, ut_detail::has_member_size<T>::value>());
- }
-private:
- static std::size_t
- size(T const& container, std::true_type) { return container.size(); }
-
- static std::size_t
- size(T const& container, std::false_type) { return std::distance(begin(container), end(container)); }
-#endif /* BOOST_TEST_FWD_ITERABLE_CXX03 */
-};
-
-template <typename T, std::size_t N>
-struct bt_iterator_traits< T [N], true > {
- typedef typename boost::add_const<T>::type T_const;
- typedef typename boost::add_pointer<T_const>::type const_iterator;
- typedef T value_type;
-
- static const_iterator begin(T_const (&array)[N]) {
- return &array[0];
- }
- static const_iterator end(T_const (&array)[N]) {
- return &array[N];
- }
- static std::size_t size(T_const (&)[N]) {
- return N;
- }
-};
-
-} // namespace unit_test
-} // namespace boost
-
-#endif // BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/argument_factory.hpp b/src/third_party/boost-1.68.0/boost/test/utils/runtime/argument_factory.hpp
deleted file mode 100644
index f3448f8cc4a..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/argument_factory.hpp
+++ /dev/null
@@ -1,242 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : argument factories for different kinds of parameters
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_RUNTIME_ARGUMENT_FACTORY_HPP
-#define BOOST_TEST_UTILS_RUNTIME_ARGUMENT_FACTORY_HPP
-
-// Boost.Test Runtime parameters
-#include <boost/test/utils/runtime/errors.hpp>
-#include <boost/test/utils/runtime/argument.hpp>
-
-// Boost.Test
-#include <boost/test/utils/basic_cstring/io.hpp>
-#include <boost/test/utils/basic_cstring/compare.hpp>
-#include <boost/test/utils/string_cast.hpp>
-
-// Boost
-#include <boost/function/function2.hpp>
-
-// STL
-#include <vector>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-namespace boost {
-namespace runtime {
-
-// ************************************************************************** //
-// ************** runtime::value_interpreter ************** //
-// ************************************************************************** //
-
-template<typename ValueType, bool is_enum>
-struct value_interpreter;
-
-//____________________________________________________________________________//
-
-template<typename ValueType>
-struct value_interpreter<ValueType, false> {
- template<typename Modifiers>
- explicit value_interpreter( Modifiers const& ) {}
-
- ValueType interpret( cstring param_name, cstring source ) const
- {
- ValueType res;
- if( !unit_test::utils::string_as<ValueType>( source, res ) )
- BOOST_TEST_I_THROW( format_error( param_name ) << source <<
- " can't be interpreted as value of parameter " << param_name << "." );
- return res;
- }
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct value_interpreter<std::string, false> {
- template<typename Modifiers>
- explicit value_interpreter( Modifiers const& ) {}
-
- std::string interpret( cstring, cstring source ) const
- {
- return std::string( source.begin(), source.size() );
- }
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct value_interpreter<cstring, false> {
- template<typename Modifiers>
- explicit value_interpreter( Modifiers const& ) {}
-
- cstring interpret( cstring, cstring source ) const
- {
- return source;
- }
-};
-
-//____________________________________________________________________________//
-
-template<>
-struct value_interpreter<bool, false> {
- template<typename Modifiers>
- explicit value_interpreter( Modifiers const& ) {}
-
- bool interpret( cstring param_name, cstring source ) const
- {
- static cstring const s_YES( "YES" );
- static cstring const s_Y( "Y" );
- static cstring const s_NO( "NO" );
- static cstring const s_N( "N" );
- static cstring const s_TRUE( "TRUE" );
- static cstring const s_FALSE( "FALSE" );
- static cstring const s_one( "1" );
- static cstring const s_zero( "0" );
-
- source.trim();
-
- if( source.is_empty() ||
- case_ins_eq( source, s_YES ) ||
- case_ins_eq( source, s_Y ) ||
- case_ins_eq( source, s_one ) ||
- case_ins_eq( source, s_TRUE ) )
- return true;
-
- if( case_ins_eq( source, s_NO ) ||
- case_ins_eq( source, s_N ) ||
- case_ins_eq( source, s_zero ) ||
- case_ins_eq( source, s_FALSE ) )
- return false;
-
- BOOST_TEST_I_THROW( format_error( param_name ) << source << " can't be interpreted as bool value." );
- }
-};
-
-//____________________________________________________________________________//
-
-template<typename EnumType>
-struct value_interpreter<EnumType, true> {
- template<typename Modifiers>
- explicit value_interpreter( Modifiers const& m )
-#if defined(BOOST_TEST_CLA_NEW_API)
- : m_name_to_value( m[enum_values<EnumType>::value] )
- {
- }
-#else
- {
- std::vector<std::pair<cstring,EnumType> > const& values = m[enum_values<EnumType>::value];
-
- m_name_to_value.insert( values.begin(), values.end() );
- }
-#endif
-
- EnumType interpret( cstring param_name, cstring source ) const
- {
- typename std::map<cstring,EnumType>::const_iterator found = m_name_to_value.find( source );
-
- BOOST_TEST_I_ASSRT( found != m_name_to_value.end(),
- format_error( param_name ) << source <<
- " is not a valid enumeration value name for parameter " << param_name << "." );
-
- return found->second;
- }
-
-private:
- // Data members
- std::map<cstring,EnumType> m_name_to_value;
-};
-
-//____________________________________________________________________________//
-
-// ************************************************************************** //
-// ************** runtime::argument_factory ************** //
-// ************************************************************************** //
-
-template<typename ValueType, bool is_enum, bool repeatable>
-class argument_factory;
-
-//____________________________________________________________________________//
-
-template<typename ValueType, bool is_enum>
-class argument_factory<ValueType, is_enum, false> {
-public:
- template<typename Modifiers>
- explicit argument_factory( Modifiers const& m )
- : m_interpreter( m )
- , m_optional_value( nfp::opt_get( m, optional_value, ValueType() ) )
- , m_default_value( nfp::opt_get( m, default_value, ValueType() ) )
- {
- }
-
- void produce_argument( cstring source, cstring param_name, arguments_store& store ) const
- {
- store.set( param_name, source.empty() ? m_optional_value : m_interpreter.interpret( param_name, source ) );
- }
-
- void produce_default( cstring param_name, arguments_store& store ) const
- {
- store.set( param_name, m_default_value );
- }
-
-private:
- // Data members
- typedef value_interpreter<ValueType, is_enum> interp_t;
- interp_t m_interpreter;
- ValueType m_optional_value;
- ValueType m_default_value;
-};
-
-//____________________________________________________________________________//
-
-template<typename ValueType, bool is_enum>
-class argument_factory<ValueType, is_enum, true> {
-public:
- template<typename Modifiers>
- explicit argument_factory( Modifiers const& m )
- : m_interpreter( m )
- {
- }
-
- void produce_argument( cstring source, cstring param_name, arguments_store& store ) const
- {
- ValueType value = m_interpreter.interpret( param_name, source );
-
- if( store.has( param_name ) ) {
- std::vector<ValueType>& values = store.get<std::vector<ValueType> >( param_name );
- values.push_back( value );
- }
- else {
- std::vector<ValueType> values( 1, value );
-
- store.set( param_name, values );
- }
-
- }
- void produce_default( cstring param_name, arguments_store& store ) const
- {
- store.set( param_name, std::vector<ValueType>() );
- }
-
-private:
- // Data members
- value_interpreter<ValueType, is_enum> m_interpreter;
-};
-
-//____________________________________________________________________________//
-
-} // namespace runtime
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_RUNTIME_ARGUMENT_FACTORY_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/cla/argv_traverser.hpp b/src/third_party/boost-1.68.0/boost/test/utils/runtime/cla/argv_traverser.hpp
deleted file mode 100644
index 10fb67bde4d..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/cla/argv_traverser.hpp
+++ /dev/null
@@ -1,105 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Use, modification, and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : defines facility to hide input traversing details
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_RUNTIME_CLA_ARGV_TRAVERSER_HPP
-#define BOOST_TEST_UTILS_RUNTIME_CLA_ARGV_TRAVERSER_HPP
-
-// Boost.Test Runtime parameters
-#include <boost/test/utils/runtime/fwd.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-namespace boost {
-namespace runtime {
-namespace cla {
-
-// ************************************************************************** //
-// ************** runtime::cla::argv_traverser ************** //
-// ************************************************************************** //
-
-class argv_traverser {
- typedef char const** argv_type;
-public:
- /// Constructs traverser based on argc/argv pair
- /// argv is taken "by reference" and later can be
- /// updated in remainder method
- argv_traverser( int argc, argv_type argv )
- : m_argc( argc )
- , m_curr_token( 0 )
- , m_token_size( 0 )
- , m_argv( argv )
- {
- // save program name
- save_token();
- }
-
- /// Returns new argc
- int remainder()
- {
- return m_argc;
- }
-
- /// Returns true, if we reached end on input
- bool eoi() const
- {
- return m_curr_token == m_argc;
- }
-
- /// Returns current token in the input
- cstring current_token()
- {
- if( eoi() )
- return cstring();
-
- return cstring( m_argv[m_curr_token], m_token_size );
- }
-
- /// Saves current token for remainder
- void save_token()
- {
- ++m_curr_token;
-
- if( !eoi() )
- m_token_size = ::strlen( m_argv[m_curr_token] );
- }
-
- /// Commit current token and iterate to next one
- void next_token()
- {
- if( !eoi() ) {
- for( std::size_t i = m_curr_token; i < m_argc-1; ++i )
- m_argv[i] = m_argv[i + 1];
-
- --m_argc;
-
- m_token_size = ::strlen( m_argv[m_curr_token] );
- }
- }
-
-private:
-
- // Data members
- std::size_t m_argc; // total number of arguments
- std::size_t m_curr_token; // current token index in argv
- std::size_t m_token_size; // current token size
- argv_type m_argv; // all arguments
-};
-
-} // namespace cla
-} // namespace runtime
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_RUNTIME_CLA_ARGV_TRAVERSER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/cla/parser.hpp b/src/third_party/boost-1.68.0/boost/test/utils/runtime/cla/parser.hpp
deleted file mode 100644
index de8943884b9..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/cla/parser.hpp
+++ /dev/null
@@ -1,625 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Use, modification, and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-//!@file
-//!@brief CLA parser
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_RUNTIME_CLA_PARSER_HPP
-#define BOOST_TEST_UTILS_RUNTIME_CLA_PARSER_HPP
-
-// Boost.Test Runtime parameters
-#include <boost/test/utils/runtime/argument.hpp>
-#include <boost/test/utils/runtime/modifier.hpp>
-#include <boost/test/utils/runtime/parameter.hpp>
-
-#include <boost/test/utils/runtime/cla/argv_traverser.hpp>
-
-// Boost.Test
-#include <boost/test/utils/foreach.hpp>
-#include <boost/test/utils/algorithm.hpp>
-#include <boost/test/detail/throw_exception.hpp>
-#include <boost/test/detail/global_typedef.hpp>
-
-#include <boost/algorithm/cxx11/all_of.hpp> // !! ?? unnecessary after cxx11
-
-// STL
-// !! ?? #include <unordered_set>
-#include <set>
-#include <iostream>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-namespace boost {
-namespace runtime {
-namespace cla {
-
-// ************************************************************************** //
-// ************** runtime::cla::parameter_trie ************** //
-// ************************************************************************** //
-
-namespace rt_cla_detail {
-
-struct parameter_trie;
-typedef shared_ptr<parameter_trie> parameter_trie_ptr;
-typedef std::map<char,parameter_trie_ptr> trie_per_char;
-typedef std::vector<boost::reference_wrapper<parameter_cla_id const> > param_cla_id_list;
-
-struct parameter_trie {
- parameter_trie() : m_has_final_candidate( false ) {}
-
- /// If subtrie corresponding to the char c exists returns it otherwise creates new
- parameter_trie_ptr make_subtrie( char c )
- {
- trie_per_char::const_iterator it = m_subtrie.find( c );
-
- if( it == m_subtrie.end() )
- it = m_subtrie.insert( std::make_pair( c, parameter_trie_ptr( new parameter_trie ) ) ).first;
-
- return it->second;
- }
-
- /// Creates series of sub-tries per characters in a string
- parameter_trie_ptr make_subtrie( cstring s )
- {
- parameter_trie_ptr res;
-
- BOOST_TEST_FOREACH( char, c, s )
- res = (res ? res->make_subtrie( c ) : make_subtrie( c ));
-
- return res;
- }
-
- /// Registers candidate parameter for this subtrie. If final, it needs to be unique
- void add_candidate_id( parameter_cla_id const& param_id, basic_param_ptr param_candidate, bool final )
- {
- BOOST_TEST_I_ASSRT( !m_has_final_candidate && (!final || m_id_candidates.empty()),
- conflicting_param() << "Parameter cla id " << param_id.m_tag << " conflicts with the "
- << "parameter cla id " << m_id_candidates.back().get().m_tag );
-
- m_has_final_candidate = final;
- m_id_candidates.push_back( ref(param_id) );
-
- if( m_id_candidates.size() == 1 )
- m_param_candidate = param_candidate;
- else
- m_param_candidate.reset();
- }
-
- /// Gets subtrie for specified char if present or nullptr otherwise
- parameter_trie_ptr get_subtrie( char c ) const
- {
- trie_per_char::const_iterator it = m_subtrie.find( c );
-
- return it != m_subtrie.end() ? it->second : parameter_trie_ptr();
- }
-
- // Data members
- trie_per_char m_subtrie;
- param_cla_id_list m_id_candidates;
- basic_param_ptr m_param_candidate;
- bool m_has_final_candidate;
-};
-
-// ************************************************************************** //
-// ************** runtime::cla::report_foreing_token ************** //
-// ************************************************************************** //
-
-static void
-report_foreing_token( cstring program_name, cstring token )
-{
- std::cerr << "Boost.Test WARNING: token \"" << token << "\" does not correspond to the Boost.Test argument \n"
- << " and should be placed after all Boost.Test arguments and the -- separator.\n"
- << " For example: " << program_name << " --random -- " << token << "\n";
-}
-
-} // namespace rt_cla_detail
-
-// ************************************************************************** //
-// ************** runtime::cla::parser ************** //
-// ************************************************************************** //
-
-class parser {
-public:
- /// Initializes a parser and builds internal trie representation used for
- /// parsing based on the supplied parameters
-#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
- template<typename Modifiers=nfp::no_params_type>
- parser( parameters_store const& parameters, Modifiers const& m = nfp::no_params )
-#else
- template<typename Modifiers>
- parser( parameters_store const& parameters, Modifiers const& m )
-#endif
- {
- nfp::opt_assign( m_end_of_param_indicator, m, end_of_params );
- nfp::opt_assign( m_negation_prefix, m, negation_prefix );
-
- BOOST_TEST_I_ASSRT( algorithm::all_of( m_end_of_param_indicator.begin(),
- m_end_of_param_indicator.end(),
- parameter_cla_id::valid_prefix_char ),
- invalid_cla_id() << "End of parameters indicator can only consist of prefix characters." );
-
- BOOST_TEST_I_ASSRT( algorithm::all_of( m_negation_prefix.begin(),
- m_negation_prefix.end(),
- parameter_cla_id::valid_name_char ),
- invalid_cla_id() << "Negation prefix can only consist of prefix characters." );
-
- build_trie( parameters );
- }
-
- // input processing method
- int
- parse( int argc, char** argv, runtime::arguments_store& res )
- {
- // save program name for help message
- m_program_name = argv[0];
- cstring path_sep( "\\/" );
-
- cstring::iterator it = unit_test::utils::find_last_of( m_program_name.begin(), m_program_name.end(),
- path_sep.begin(), path_sep.end() );
- if( it != m_program_name.end() )
- m_program_name.trim_left( it + 1 );
-
- // Set up the traverser
- argv_traverser tr( argc, (char const**)argv );
-
- // Loop till we reach end of input
- while( !tr.eoi() ) {
- cstring curr_token = tr.current_token();
-
- cstring prefix;
- cstring name;
- cstring value_separator;
- bool negative_form = false;
-
- // Perform format validations and split the argument into prefix, name and separator
- // False return value indicates end of params indicator is met
- if( !validate_token_format( curr_token, prefix, name, value_separator, negative_form ) ) {
- // get rid of "end of params" token
- tr.next_token();
- break;
- }
-
- // Locate trie corresponding to found prefix and skip it in the input
- trie_ptr curr_trie = m_param_trie[prefix];
-
- if( !curr_trie ) {
- // format_error() << "Unrecognized parameter prefix in the argument " << tr.current_token()
- rt_cla_detail::report_foreing_token( m_program_name, curr_token );
- tr.save_token();
- continue;
- }
-
- curr_token.trim_left( prefix.size() );
-
- // Locate parameter based on a name and skip it in the input
- locate_result locate_res = locate_parameter( curr_trie, name, curr_token );
- parameter_cla_id const& found_id = locate_res.first;
- basic_param_ptr found_param = locate_res.second;
-
- if( negative_form ) {
- BOOST_TEST_I_ASSRT( found_id.m_negatable,
- format_error( found_param->p_name )
- << "Parameter tag " << found_id.m_tag << " is not negatable." );
-
- curr_token.trim_left( m_negation_prefix.size() );
- }
-
- curr_token.trim_left( name.size() );
-
- bool should_go_to_next = true;
- cstring value;
-
-
- // Skip validations if parameter has optional value and we are at the end of token
- if( !value_separator.is_empty() || !found_param->p_has_optional_value ) {
-
- // we are given a separator or there is no optional value
-
- // Validate and skip value separator in the input
- BOOST_TEST_I_ASSRT( found_id.m_value_separator == value_separator,
- format_error( found_param->p_name )
- << "Invalid separator for the parameter "
- << found_param->p_name
- << " in the argument " << tr.current_token() );
-
- curr_token.trim_left( value_separator.size() );
-
- // Deduce value source
- value = curr_token;
- if( value.is_empty() ) {
- tr.next_token();
- value = tr.current_token();
- }
-
- BOOST_TEST_I_ASSRT( !value.is_empty(),
- format_error( found_param->p_name )
- << "Missing an argument value for the parameter "
- << found_param->p_name
- << " in the argument " << tr.current_token() );
- }
- else if( (value_separator.is_empty() && found_id.m_value_separator.empty()) ) {
- // Deduce value source
- value = curr_token;
- if( value.is_empty() ) {
- tr.next_token(); // tokenization broke the value, we check the next one
-
- if(!found_param->p_has_optional_value) {
- // there is no separator and there is no optional value
- // we look for the value on the next token
- // example "-t XXXX" (no default)
- // and we commit this value as being the passed value
- value = tr.current_token();
- }
- else {
- // there is no separator and the value is optional
- // we check the next token
- // example "-c" (defaults to true)
- // and commit this as the value if this is not a token
- cstring value_check = tr.current_token();
-
- cstring prefix_test, name_test, value_separator_test;
- bool negative_form_test;
- if( validate_token_format( value_check, prefix_test, name_test, value_separator_test, negative_form_test )
- && m_param_trie[prefix_test]) {
- // this is a token, we consume what we have
- should_go_to_next = false;
- }
- else {
- // this is a value, we commit it
- value = value_check;
- }
- }
- }
- }
-
- // Validate against argument duplication
- BOOST_TEST_I_ASSRT( !res.has( found_param->p_name ) || found_param->p_repeatable,
- duplicate_arg( found_param->p_name )
- << "Duplicate argument value for the parameter "
- << found_param->p_name
- << " in the argument " << tr.current_token() );
-
- // Produce argument value
- found_param->produce_argument( value, negative_form, res );
-
- if(should_go_to_next) {
- tr.next_token();
- }
- }
-
- // generate the remainder and return it's size
- return tr.remainder();
- }
-
- // help/usage/version
- void
- version( std::ostream& ostr )
- {
- ostr << "Boost.Test module ";
-
-#if defined(BOOST_TEST_MODULE)
- // we do not want to refer to the master test suite there
- ostr << '\'' << BOOST_TEST_STRINGIZE( BOOST_TEST_MODULE ).trim( "\"" ) << "' ";
-#endif
-
- ostr << "in executable '" << m_program_name << "'\n";
- ostr << "Compiled from Boost version "
- << BOOST_VERSION/100000 << "."
- << BOOST_VERSION/100 % 1000 << "."
- << BOOST_VERSION % 100 ;
- ostr << " with ";
-#if defined(BOOST_TEST_INCLUDED)
- ostr << "single header inclusion of";
-#elif defined(BOOST_TEST_DYN_LINK)
- ostr << "dynamic linking to";
-#else
- ostr << "static linking to";
-#endif
- ostr << " Boost.Test\n";
- ostr << "- Compiler: " << BOOST_COMPILER << '\n'
- << "- Platform: " << BOOST_PLATFORM << '\n'
- << "- STL : " << BOOST_STDLIB;
- ostr << std::endl;
- }
-
- void
- usage(std::ostream& ostr,
- cstring param_name = cstring(),
- bool use_color = true)
- {
- namespace utils = unit_test::utils;
- namespace ut_detail = unit_test::ut_detail;
-
- if( !param_name.is_empty() ) {
- basic_param_ptr param = locate_parameter( m_param_trie[help_prefix], param_name, "" ).second;
- param->usage( ostr, m_negation_prefix );
- }
- else {
- ostr << "\n The program '" << m_program_name << "' is a Boost.test module containing unit tests.";
-
- {
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::ORIGINAL );
- ostr << "\n\n Usage\n ";
- }
-
- {
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::GREEN );
- ostr << m_program_name << " [Boost.Test argument]... ";
- }
- if( !m_end_of_param_indicator.empty() ) {
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW );
- ostr << '[' << m_end_of_param_indicator << " [custom test module argument]...]";
- }
- }
-
- ostr << "\n\n Use\n ";
- {
-
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::GREEN );
- ostr << m_program_name << " --help";
- }
- ostr << "\n or ";
- {
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::GREEN );
- ostr << m_program_name << " --help=<parameter name>";
- }
- ostr << "\n for detailed help on Boost.Test parameters.\n";
- }
-
- void
- help(std::ostream& ostr,
- parameters_store const& parameters,
- cstring param_name,
- bool use_color = true)
- {
- namespace utils = unit_test::utils;
- namespace ut_detail = unit_test::ut_detail;
-
- if( !param_name.is_empty() ) {
- basic_param_ptr param = locate_parameter( m_param_trie[help_prefix], param_name, "" ).second;
- param->help( ostr, m_negation_prefix, use_color);
- return;
- }
-
- usage(ostr, cstring(), use_color);
-
- ostr << "\n\n";
- {
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::ORIGINAL );
- ostr << " Command line flags:\n";
- }
- runtime::commandline_pretty_print(
- ostr,
- " ",
- "The command line flags of Boost.Test are listed below. "
- "All parameters are optional. You can specify parameter value either "
- "as a command line argument or as a value of its corresponding environment "
- "variable. If a flag is specified as a command line argument and an environment variable "
- "at the same time, the command line takes precedence. "
- "The command line argument "
- "support name guessing, and works with shorter names as long as those are not ambiguous."
- );
-
- if( !m_end_of_param_indicator.empty() ) {
- ostr << "\n\n All the arguments after the '";
- {
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW );
- ostr << m_end_of_param_indicator;
- }
- ostr << "' are ignored by Boost.Test.";
- }
-
-
- {
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::ORIGINAL );
- ostr << "\n\n Environment variables:\n";
- }
- runtime::commandline_pretty_print(
- ostr,
- " ",
- "Every argument listed below may also be set by a corresponding environment"
- "variable. For an argument '--argument_x=<value>', the corresponding "
- "environment variable is 'BOOST_TEST_ARGUMENT_X=value"
- );
-
-
-
- ostr << "\n\n The following parameters are supported:\n";
-
- BOOST_TEST_FOREACH(
- parameters_store::storage_type::value_type const&,
- v,
- parameters.all() )
- {
- basic_param_ptr param = v.second;
- ostr << "\n";
- param->usage( ostr, m_negation_prefix, use_color);
- }
-
- }
-
-private:
- typedef rt_cla_detail::parameter_trie_ptr trie_ptr;
- typedef rt_cla_detail::trie_per_char trie_per_char;
- typedef std::map<cstring,trie_ptr> str_to_trie;
-
- void
- build_trie( parameters_store const& parameters )
- {
- // Iterate over all parameters
- BOOST_TEST_FOREACH( parameters_store::storage_type::value_type const&, v, parameters.all() ) {
- basic_param_ptr param = v.second;
-
- // Register all parameter's ids in trie.
- BOOST_TEST_FOREACH( parameter_cla_id const&, id, param->cla_ids() ) {
- // This is the trie corresponding to the prefix.
- trie_ptr next_trie = m_param_trie[id.m_prefix];
- if( !next_trie )
- next_trie = m_param_trie[id.m_prefix] = trie_ptr( new rt_cla_detail::parameter_trie );
-
- // Build the trie, by following name's characters
- // and register this parameter as candidate on each level
- for( size_t index = 0; index < id.m_tag.size(); ++index ) {
- next_trie = next_trie->make_subtrie( id.m_tag[index] );
-
- next_trie->add_candidate_id( id, param, index == (id.m_tag.size() - 1) );
- }
- }
- }
- }
-
- bool
- validate_token_format( cstring token, cstring& prefix, cstring& name, cstring& separator, bool& negative_form )
- {
- // Match prefix
- cstring::iterator it = token.begin();
- while( it != token.end() && parameter_cla_id::valid_prefix_char( *it ) )
- ++it;
-
- prefix.assign( token.begin(), it );
-
- if( prefix.empty() )
- return true;
-
- // Match name
- while( it != token.end() && parameter_cla_id::valid_name_char( *it ) )
- ++it;
-
- name.assign( prefix.end(), it );
-
- if( name.empty() ) {
- if( prefix == m_end_of_param_indicator )
- return false;
-
- BOOST_TEST_I_THROW( format_error() << "Invalid format for an actual argument " << token );
- }
-
- // Match value separator
- while( it != token.end() && parameter_cla_id::valid_separator_char( *it ) )
- ++it;
-
- separator.assign( name.end(), it );
-
- // Match negation prefix
- negative_form = !m_negation_prefix.empty() && ( name.substr( 0, m_negation_prefix.size() ) == m_negation_prefix );
- if( negative_form )
- name.trim_left( m_negation_prefix.size() );
-
- return true;
- }
-
- // C++03: cannot have references as types
- typedef std::pair<parameter_cla_id, basic_param_ptr> locate_result;
-
- locate_result
- locate_parameter( trie_ptr curr_trie, cstring name, cstring token )
- {
- std::vector<trie_ptr> typo_candidates;
- std::vector<trie_ptr> next_typo_candidates;
- trie_ptr next_trie;
-
- BOOST_TEST_FOREACH( char, c, name ) {
- if( curr_trie ) {
- // locate next subtrie corresponding to the char
- next_trie = curr_trie->get_subtrie( c );
-
- if( next_trie )
- curr_trie = next_trie;
- else {
- // Initiate search for typo candicates. We will account for 'wrong char' typo
- // 'missing char' typo and 'extra char' typo
- BOOST_TEST_FOREACH( trie_per_char::value_type const&, typo_cand, curr_trie->m_subtrie ) {
- // 'wrong char' typo
- typo_candidates.push_back( typo_cand.second );
-
- // 'missing char' typo
- if( (next_trie = typo_cand.second->get_subtrie( c )) )
- typo_candidates.push_back( next_trie );
- }
-
- // 'extra char' typo
- typo_candidates.push_back( curr_trie );
-
- curr_trie.reset();
- }
- }
- else {
- // go over existing typo candidates and see if they are still viable
- BOOST_TEST_FOREACH( trie_ptr, typo_cand, typo_candidates ) {
- trie_ptr next_typo_cand = typo_cand->get_subtrie( c );
-
- if( next_typo_cand )
- next_typo_candidates.push_back( next_typo_cand );
- }
-
- next_typo_candidates.swap( typo_candidates );
- next_typo_candidates.clear();
- }
- }
-
- if( !curr_trie ) {
- std::vector<cstring> typo_candidate_names;
- std::set<parameter_cla_id const*> unique_typo_candidate; // !! ?? unordered_set
- typo_candidate_names.reserve( typo_candidates.size() );
-// !! ?? unique_typo_candidate.reserve( typo_candidates.size() );
-
- BOOST_TEST_FOREACH( trie_ptr, trie_cand, typo_candidates ) {
- // avoid ambiguos candidate trie
- if( trie_cand->m_id_candidates.size() > 1 )
- continue;
-
- BOOST_TEST_FOREACH( parameter_cla_id const&, param_cand, trie_cand->m_id_candidates ) {
- if( !unique_typo_candidate.insert( &param_cand ).second )
- continue;
-
- typo_candidate_names.push_back( param_cand.m_tag );
- }
- }
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- BOOST_TEST_I_THROW( unrecognized_param( std::move(typo_candidate_names) )
- << "An unrecognized parameter in the argument "
- << token );
-#else
- BOOST_TEST_I_THROW( unrecognized_param( typo_candidate_names )
- << "An unrecognized parameter in the argument "
- << token );
-#endif
- }
-
- if( curr_trie->m_id_candidates.size() > 1 ) {
- std::vector<cstring> amb_names;
- BOOST_TEST_FOREACH( parameter_cla_id const&, param_id, curr_trie->m_id_candidates )
- amb_names.push_back( param_id.m_tag );
-
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- BOOST_TEST_I_THROW( ambiguous_param( std::move( amb_names ) )
- << "An ambiguous parameter name in the argument " << token );
-#else
- BOOST_TEST_I_THROW( ambiguous_param( amb_names )
- << "An ambiguous parameter name in the argument " << token );
-#endif
- }
-
- return locate_result( curr_trie->m_id_candidates.back().get(), curr_trie->m_param_candidate );
- }
-
- // Data members
- cstring m_program_name;
- std::string m_end_of_param_indicator;
- std::string m_negation_prefix;
- str_to_trie m_param_trie;
-};
-
-} // namespace cla
-} // namespace runtime
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_RUNTIME_CLA_PARSER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/errors.hpp b/src/third_party/boost-1.68.0/boost/test/utils/runtime/errors.hpp
deleted file mode 100644
index 5b263d21c50..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/errors.hpp
+++ /dev/null
@@ -1,195 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : defines runtime parameters setup error
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_RUNTIME_INIT_ERROR_HPP
-#define BOOST_TEST_UTILS_RUNTIME_INIT_ERROR_HPP
-
-// Boost.Test Runtime parameters
-#include <boost/test/utils/runtime/fwd.hpp>
-
-// Boost.Test
-#include <boost/test/utils/string_cast.hpp>
-
-// Boost.Test
-#include <boost/config.hpp>
-
-// STL
-#include <exception>
-#include <vector>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-namespace boost {
-namespace runtime {
-
-// ************************************************************************** //
-// ************** runtime::param_error ************** //
-// ************************************************************************** //
-
-class param_error : public std::exception {
-public:
- ~param_error() BOOST_NOEXCEPT_OR_NOTHROW {}
-
- virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
- {
- return msg.c_str();
- }
-
- cstring param_name;
- std::string msg;
-
-protected:
- explicit param_error( cstring param_name_ ) : param_name( param_name_) {}
-};
-
-//____________________________________________________________________________//
-
-class init_error : public param_error {
-protected:
- explicit init_error( cstring param_name ) : param_error( param_name ) {}
- ~init_error() BOOST_NOEXCEPT_OR_NOTHROW {}
-};
-
-class input_error : public param_error {
-protected:
- explicit input_error( cstring param_name ) : param_error( param_name ) {}
- ~input_error() BOOST_NOEXCEPT_OR_NOTHROW {}
-};
-
-//____________________________________________________________________________//
-
-template<typename Derived, typename Base>
-class specific_param_error : public Base {
-protected:
- explicit specific_param_error( cstring param_name ) : Base( param_name ) {}
- ~specific_param_error() BOOST_NOEXCEPT_OR_NOTHROW {}
-
-public:
-
-//____________________________________________________________________________//
-
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
- !defined(BOOST_NO_CXX11_REF_QUALIFIERS)
-
- Derived operator<<(char const* val) &&
- {
- this->msg.append( val );
-
- return static_cast<Derived&&>(*this);
- }
-
- //____________________________________________________________________________//
-
- template<typename T>
- Derived operator<<(T const& val) &&
- {
- this->msg.append( unit_test::utils::string_cast( val ) );
-
- return static_cast<Derived&&>(*this);
- }
-
- //____________________________________________________________________________//
-
-#else
-
- Derived const& operator<<(char const* val) const
- {
- const_cast<specific_param_error<Derived, Base>&>(*this).msg.append( val );
-
- return static_cast<Derived const&>(*this);
- }
-
- //____________________________________________________________________________//
-
- template<typename T>
- Derived const& operator<<(T const& val) const
- {
- const_cast<specific_param_error<Derived, Base>&>(*this).msg.append( unit_test::utils::string_cast( val ) );
-
- return static_cast<Derived const&>(*this);
- }
-
- //____________________________________________________________________________//
-
-#endif
-
-};
-
-
-
-// ************************************************************************** //
-// ************** specific exception types ************** //
-// ************************************************************************** //
-
-#define SPECIFIC_EX_TYPE( type, base ) \
-class type : public specific_param_error<type,base> { \
-public: \
- explicit type( cstring param_name = cstring() ) \
- : specific_param_error<type,base>( param_name ) \
- {} \
-} \
-/**/
-
-SPECIFIC_EX_TYPE( invalid_cla_id, init_error );
-SPECIFIC_EX_TYPE( duplicate_param, init_error );
-SPECIFIC_EX_TYPE( conflicting_param, init_error );
-SPECIFIC_EX_TYPE( unknown_param, init_error );
-SPECIFIC_EX_TYPE( access_to_missing_argument, init_error );
-SPECIFIC_EX_TYPE( arg_type_mismatch, init_error );
-SPECIFIC_EX_TYPE( invalid_param_spec, init_error );
-
-SPECIFIC_EX_TYPE( format_error, input_error );
-SPECIFIC_EX_TYPE( duplicate_arg, input_error );
-SPECIFIC_EX_TYPE( missing_req_arg, input_error );
-
-#undef SPECIFIC_EX_TYPE
-
-class ambiguous_param : public specific_param_error<ambiguous_param, input_error> {
-public:
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- explicit ambiguous_param( std::vector<cstring>&& amb_candidates )
- : specific_param_error<ambiguous_param,input_error>( "" )
- , m_amb_candidates( std::move( amb_candidates ) ) {}
-#else
- explicit ambiguous_param( std::vector<cstring> const& amb_candidates )
- : specific_param_error<ambiguous_param,input_error>( "" )
- , m_amb_candidates( amb_candidates ) {}
-#endif
- ~ambiguous_param() BOOST_NOEXCEPT_OR_NOTHROW {}
-
- std::vector<cstring> m_amb_candidates;
-};
-
-class unrecognized_param : public specific_param_error<unrecognized_param, input_error> {
-public:
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
- explicit unrecognized_param( std::vector<cstring>&& type_candidates )
- : specific_param_error<unrecognized_param,input_error>( "" )
- , m_typo_candidates( std::move( type_candidates ) ) {}
-#else
- explicit unrecognized_param( std::vector<cstring> const& type_candidates )
- : specific_param_error<unrecognized_param,input_error>( "" )
- , m_typo_candidates( type_candidates ) {}
-#endif
- ~unrecognized_param() BOOST_NOEXCEPT_OR_NOTHROW {}
-
- std::vector<cstring> m_typo_candidates;
-};
-
-} // namespace runtime
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_RUNTIME_INIT_ERROR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/modifier.hpp b/src/third_party/boost-1.68.0/boost/test/utils/runtime/modifier.hpp
deleted file mode 100644
index f4f5a42baa8..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/modifier.hpp
+++ /dev/null
@@ -1,106 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Use, modification, and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : parameter modifiers
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP
-#define BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP
-
-// Boost.Test Runtime parameters
-#include <boost/test/utils/runtime/fwd.hpp>
-
-// Boost.Test
-#include <boost/test/utils/named_params.hpp>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-
-// New CLA API available only for some C++11 compilers
-#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) \
- && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) \
- && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) \
- && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
-#define BOOST_TEST_CLA_NEW_API
-#endif
-
-namespace boost {
-namespace runtime {
-
-// ************************************************************************** //
-// ************** environment variable modifiers ************** //
-// ************************************************************************** //
-
-namespace {
-
-#ifdef BOOST_TEST_CLA_NEW_API
-auto const& description = unit_test::static_constant<nfp::typed_keyword<cstring,struct description_t>>::value;
-auto const& help = unit_test::static_constant<nfp::typed_keyword<cstring,struct help_t>>::value;
-auto const& env_var = unit_test::static_constant<nfp::typed_keyword<cstring,struct env_var_t>>::value;
-auto const& end_of_params = unit_test::static_constant<nfp::typed_keyword<cstring,struct end_of_params_t>>::value;
-auto const& negation_prefix = unit_test::static_constant<nfp::typed_keyword<cstring,struct neg_prefix_t>>::value;
-auto const& value_hint = unit_test::static_constant<nfp::typed_keyword<cstring,struct value_hint_t>>::value;
-auto const& optional_value = unit_test::static_constant<nfp::keyword<struct optional_value_t>>::value;
-auto const& default_value = unit_test::static_constant<nfp::keyword<struct default_value_t>>::value;
-auto const& callback = unit_test::static_constant<nfp::keyword<struct callback_t>>::value;
-
-template<typename EnumType>
-using enum_values = unit_test::static_constant<
- nfp::typed_keyword<std::initializer_list<std::pair<const cstring,EnumType>>, struct enum_values_t>
->;
-
-#else
-
-nfp::typed_keyword<cstring,struct description_t> description;
-nfp::typed_keyword<cstring,struct help_t> help;
-nfp::typed_keyword<cstring,struct env_var_t> env_var;
-nfp::typed_keyword<cstring,struct end_of_params_t> end_of_params;
-nfp::typed_keyword<cstring,struct neg_prefix_t> negation_prefix;
-nfp::typed_keyword<cstring,struct value_hint_t> value_hint;
-nfp::keyword<struct optional_value_t> optional_value;
-nfp::keyword<struct default_value_t> default_value;
-nfp::keyword<struct callback_t> callback;
-
-template<typename EnumType>
-struct enum_values_list {
- typedef std::pair<cstring,EnumType> ElemT;
- typedef std::vector<ElemT> ValuesT;
-
- enum_values_list const&
- operator()( cstring k, EnumType v ) const
- {
- const_cast<enum_values_list*>(this)->m_values.push_back( ElemT( k, v ) );
-
- return *this;
- }
-
- operator ValuesT const&() const { return m_values; }
-
-private:
- ValuesT m_values;
-};
-
-template<typename EnumType>
-struct enum_values : unit_test::static_constant<
- nfp::typed_keyword<enum_values_list<EnumType>, struct enum_values_t> >
-{
-};
-
-#endif
-
-} // local namespace
-
-} // namespace runtime
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/parameter.hpp b/src/third_party/boost-1.68.0/boost/test/utils/runtime/parameter.hpp
deleted file mode 100644
index 420b60264d5..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/parameter.hpp
+++ /dev/null
@@ -1,526 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : formal parameter definition
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_RUNTIME_PARAMETER_HPP
-#define BOOST_TEST_UTILS_RUNTIME_PARAMETER_HPP
-
-// Boost.Test Runtime parameters
-#include <boost/test/utils/runtime/fwd.hpp>
-#include <boost/test/utils/runtime/modifier.hpp>
-#include <boost/test/utils/runtime/argument.hpp>
-#include <boost/test/utils/runtime/argument_factory.hpp>
-
-// Boost.Test
-#include <boost/test/utils/class_properties.hpp>
-#include <boost/test/utils/foreach.hpp>
-#include <boost/test/utils/setcolor.hpp>
-
-// Boost
-#include <boost/function/function2.hpp>
-#include <boost/algorithm/cxx11/all_of.hpp>
-
-// STL
-#include <algorithm>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-namespace boost {
-namespace runtime {
-
-inline
-std::ostream& commandline_pretty_print(
- std::ostream& ostr,
- std::string const& prefix,
- std::string const& to_print) {
-
- const int split_at = 80;
-
- std::string::size_type current = 0;
-
- while(current < to_print.size()) {
-
- // discards spaces at the beginning
- std::string::size_type startpos = to_print.find_first_not_of(" \t\n", current);
- current += startpos - current;
-
- bool has_more_lines = (current + split_at) < to_print.size();
-
- if(has_more_lines) {
- std::string::size_type endpos = to_print.find_last_of(" \t\n", current + split_at);
- std::string sub(to_print.substr(current, endpos - current));
- ostr << prefix << sub;
- ostr << "\n";
- current += endpos - current;
- }
- else
- {
- ostr << prefix << to_print.substr(current, split_at);
- current += split_at;
- }
- }
- return ostr;
-}
-
-// ************************************************************************** //
-// ************** runtime::parameter_cla_id ************** //
-// ************************************************************************** //
-// set of attributes identifying the parameter in the command line
-
-struct parameter_cla_id {
- parameter_cla_id( cstring prefix, cstring tag, cstring value_separator, bool negatable )
- : m_prefix( prefix.begin(), prefix.size() )
- , m_tag( tag.begin(), tag.size() )
- , m_value_separator( value_separator.begin(), value_separator.size() )
- , m_negatable( negatable )
- {
-
- BOOST_TEST_I_ASSRT( algorithm::all_of( m_prefix.begin(), m_prefix.end(), valid_prefix_char ),
- invalid_cla_id() << "Parameter " << m_tag
- << " has invalid characters in prefix." );
-
- BOOST_TEST_I_ASSRT( algorithm::all_of( m_tag.begin(), m_tag.end(), valid_name_char ),
- invalid_cla_id() << "Parameter " << m_tag
- << " has invalid characters in name." );
-
- BOOST_TEST_I_ASSRT( algorithm::all_of( m_value_separator.begin(), m_value_separator.end(), valid_separator_char ),
- invalid_cla_id() << "Parameter " << m_tag
- << " has invalid characters in value separator." );
- }
-
- static bool valid_prefix_char( char c )
- {
- return c == '-' || c == '/' ;
- }
- static bool valid_separator_char( char c )
- {
- return c == '=' || c == ':' || c == ' ' || c == '\0';
- }
- static bool valid_name_char( char c )
- {
- return std::isalnum( c ) || c == '+' || c == '_' || c == '?';
- }
-
- std::string m_prefix;
- std::string m_tag;
- std::string m_value_separator;
- bool m_negatable;
-};
-
-typedef std::vector<parameter_cla_id> param_cla_ids;
-
-// ************************************************************************** //
-// ************** runtime::basic_param ************** //
-// ************************************************************************** //
-
-cstring const help_prefix("////");
-
-class basic_param {
- typedef function<void (cstring)> callback_type;
- typedef unit_test::readwrite_property<bool> bool_property;
-
-protected:
- /// Constructor with modifiers
- template<typename Modifiers>
- basic_param( cstring name, bool is_optional, bool is_repeatable, Modifiers const& m )
- : p_name( name.begin(), name.end() )
- , p_description( nfp::opt_get( m, description, std::string() ) )
- , p_help( nfp::opt_get( m, runtime::help, std::string() ) )
- , p_env_var( nfp::opt_get( m, env_var, std::string() ) )
- , p_value_hint( nfp::opt_get( m, value_hint, std::string() ) )
- , p_optional( is_optional )
- , p_repeatable( is_repeatable )
- , p_has_optional_value( m.has( optional_value ) )
- , p_has_default_value( m.has( default_value ) || is_repeatable )
- , p_callback( nfp::opt_get( m, callback, callback_type() ) )
- {
- add_cla_id( help_prefix, name, ":" );
- }
-
-public:
- virtual ~basic_param() {}
-
- // Pubic properties
- std::string const p_name;
- std::string const p_description;
- std::string const p_help;
- std::string const p_env_var;
- std::string const p_value_hint;
- bool const p_optional;
- bool const p_repeatable;
- bool_property p_has_optional_value;
- bool_property p_has_default_value;
- callback_type const p_callback;
-
- /// interface for cloning typed parameters
- virtual basic_param_ptr clone() const = 0;
-
- /// Access methods
- param_cla_ids const& cla_ids() const { return m_cla_ids; }
- void add_cla_id( cstring prefix, cstring tag, cstring value_separator )
- {
- add_cla_id_impl( prefix, tag, value_separator, false, true );
- }
-
- /// interface for producing argument values for this parameter
- virtual void produce_argument( cstring token, bool negative_form, arguments_store& store ) const = 0;
- virtual void produce_default( arguments_store& store ) const = 0;
-
- /// interfaces for help message reporting
- virtual void usage( std::ostream& ostr, cstring negation_prefix_, bool use_color = true )
- {
- namespace utils = unit_test::utils;
- namespace ut_detail = unit_test::ut_detail;
-
- //
- ostr << " ";
- {
-
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::GREEN );
- ostr << p_name;
- }
-
- ostr << '\n';
-
- if( !p_description.empty() ) {
- commandline_pretty_print(ostr, " ", p_description) << '\n';
- }
-
- BOOST_TEST_FOREACH( parameter_cla_id const&, id, cla_ids() ) {
- if( id.m_prefix == help_prefix )
- continue;
-
- ostr << " " << id.m_prefix;
-
- if( id.m_negatable )
- cla_name_help( ostr, id.m_tag, negation_prefix_, use_color );
- else
- cla_name_help( ostr, id.m_tag, "", use_color );
-
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW );
- bool optional_value_ = false;
-
- if( p_has_optional_value ) {
- optional_value_ = true;
- ostr << '[';
- }
-
-
- if( id.m_value_separator.empty() )
- ostr << ' ';
- else {
- ostr << id.m_value_separator;
- }
-
- value_help( ostr );
-
- if( optional_value_ )
- ostr << ']';
-
- ostr << '\n';
- }
- }
-
- virtual void help( std::ostream& ostr, cstring negation_prefix_, bool use_color = true )
- {
- usage( ostr, negation_prefix_, use_color );
-
- if( !p_help.empty() ) {
- ostr << '\n';
- commandline_pretty_print(ostr, " ", p_help);
- }
- }
-
-protected:
- void add_cla_id_impl( cstring prefix,
- cstring tag,
- cstring value_separator,
- bool negatable,
- bool validate_value_separator )
- {
- BOOST_TEST_I_ASSRT( !tag.is_empty(),
- invalid_cla_id() << "Parameter can't have an empty name." );
-
- BOOST_TEST_I_ASSRT( !prefix.is_empty(),
- invalid_cla_id() << "Parameter " << tag
- << " can't have an empty prefix." );
-
- BOOST_TEST_I_ASSRT( !value_separator.is_empty(),
- invalid_cla_id() << "Parameter " << tag
- << " can't have an empty value separator." );
-
- // We trim value separator from all the spaces, so token end will indicate separator
- value_separator.trim();
- BOOST_TEST_I_ASSRT( !validate_value_separator || !value_separator.is_empty() || !p_has_optional_value,
- invalid_cla_id() << "Parameter " << tag
- << " with optional value attribute can't use space as value separator." );
-
- m_cla_ids.push_back( parameter_cla_id( prefix, tag, value_separator, negatable ) );
- }
-
-private:
- /// interface for usage/help customization
- virtual void cla_name_help( std::ostream& ostr, cstring cla_tag, cstring /*negation_prefix_*/, bool /*use_color*/ = true) const
- {
- ostr << cla_tag;
- }
- virtual void value_help( std::ostream& ostr ) const
- {
- if( p_value_hint.empty() )
- ostr << "<value>";
- else
- ostr << p_value_hint;
- }
-
- // Data members
- param_cla_ids m_cla_ids;
-};
-
-// ************************************************************************** //
-// ************** runtime::parameter ************** //
-// ************************************************************************** //
-
-enum args_amount {
- OPTIONAL_PARAM, // 0-1
- REQUIRED_PARAM, // exactly 1
- REPEATABLE_PARAM // 0-N
-};
-
-//____________________________________________________________________________//
-
-template<typename ValueType, args_amount a = runtime::OPTIONAL_PARAM, bool is_enum = false>
-class parameter : public basic_param {
-public:
- /// Constructor with modifiers
-#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
- template<typename Modifiers=nfp::no_params_type>
- parameter( cstring name, Modifiers const& m = nfp::no_params )
-#else
- template<typename Modifiers>
- parameter( cstring name, Modifiers const& m )
-#endif
- : basic_param( name, a != runtime::REQUIRED_PARAM, a == runtime::REPEATABLE_PARAM, m )
- , m_arg_factory( m )
- {
- BOOST_TEST_I_ASSRT( !m.has( default_value ) || a == runtime::OPTIONAL_PARAM,
- invalid_param_spec() << "Parameter " << name
- << " is not optional and can't have default_value." );
-
- BOOST_TEST_I_ASSRT( !m.has( optional_value ) || !this->p_repeatable,
- invalid_param_spec() << "Parameter " << name
- << " is repeatable and can't have optional_value." );
- }
-
-private:
- virtual basic_param_ptr clone() const
- {
- return basic_param_ptr( new parameter( *this ) );
- }
- virtual void produce_argument( cstring token, bool , arguments_store& store ) const
- {
- m_arg_factory.produce_argument( token, this->p_name, store );
- }
- virtual void produce_default( arguments_store& store ) const
- {
- if( !this->p_has_default_value )
- return;
-
- m_arg_factory.produce_default( this->p_name, store );
- }
-
- // Data members
- typedef argument_factory<ValueType, is_enum, a == runtime::REPEATABLE_PARAM> factory_t;
- factory_t m_arg_factory;
-};
-
-//____________________________________________________________________________//
-
-class option : public basic_param {
-public:
- /// Constructor with modifiers
-#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
- template<typename Modifiers=nfp::no_params_type>
- option( cstring name, Modifiers const& m = nfp::no_params )
-#else
- template<typename Modifiers>
- option( cstring name, Modifiers const& m )
-#endif
- : basic_param( name, true, false, nfp::opt_append( nfp::opt_append( m, optional_value = true), default_value = false) )
- , m_arg_factory( nfp::opt_append( nfp::opt_append( m, optional_value = true), default_value = false) )
- {
- }
-
- void add_cla_id( cstring prefix, cstring tag, cstring value_separator, bool negatable = false )
- {
- add_cla_id_impl( prefix, tag, value_separator, negatable, false );
- }
-
-private:
- virtual basic_param_ptr clone() const
- {
- return basic_param_ptr( new option( *this ) );
- }
-
- virtual void produce_argument( cstring token, bool negative_form, arguments_store& store ) const
- {
- if( token.empty() )
- store.set( p_name, !negative_form );
- else {
- BOOST_TEST_I_ASSRT( !negative_form,
- format_error( p_name ) << "Can't set value to negative form of the argument." );
-
- m_arg_factory.produce_argument( token, p_name, store );
- }
- }
-
- virtual void produce_default( arguments_store& store ) const
- {
- m_arg_factory.produce_default( p_name, store );
- }
- virtual void cla_name_help( std::ostream& ostr, cstring cla_tag, cstring negation_prefix_, bool use_color = true ) const
- {
- namespace utils = unit_test::utils;
- namespace ut_detail = unit_test::ut_detail;
-
- if( !negation_prefix_.is_empty() ) {
- BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW );
- ostr << '[' << negation_prefix_ << ']';
- }
- ostr << cla_tag;
- }
- virtual void value_help( std::ostream& ostr ) const
- {
- if( p_value_hint.empty() )
- ostr << "<boolean value>";
- else
- ostr << p_value_hint;
- }
-
- // Data members
- typedef argument_factory<bool, false, false> factory_t;
- factory_t m_arg_factory;
-};
-
-//____________________________________________________________________________//
-
-template<typename EnumType, args_amount a = runtime::OPTIONAL_PARAM>
-class enum_parameter : public parameter<EnumType, a, true> {
- typedef parameter<EnumType, a, true> base;
-public:
- /// Constructor with modifiers
-#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
- template<typename Modifiers=nfp::no_params_type>
- enum_parameter( cstring name, Modifiers const& m = nfp::no_params )
-#else
- template<typename Modifiers>
- enum_parameter( cstring name, Modifiers const& m )
-#endif
- : base( name, m )
- {
-#ifdef BOOST_TEST_CLA_NEW_API
- auto const& values = m[enum_values<EnumType>::value];
- auto it = values.begin();
-#else
- std::vector<std::pair<cstring, EnumType> > const& values = m[enum_values<EnumType>::value];
- typename std::vector<std::pair<cstring, EnumType> >::const_iterator it = values.begin();
-#endif
- while( it != values.end() ) {
- m_valid_names.push_back( it->first );
- ++it;
- }
- }
-
-private:
- virtual basic_param_ptr clone() const
- {
- return basic_param_ptr( new enum_parameter( *this ) );
- }
-
- virtual void value_help( std::ostream& ostr ) const
- {
- if( this->p_value_hint.empty() ) {
- ostr << "<";
- bool first = true;
- BOOST_TEST_FOREACH( cstring, name, m_valid_names ) {
- if( first )
- first = false;
- else
- ostr << '|';
- ostr << name;
- }
- ostr << ">";
- }
- else
- ostr << this->p_value_hint;
- }
-
- // Data members
- std::vector<cstring> m_valid_names;
-};
-
-
-// ************************************************************************** //
-// ************** runtime::parameters_store ************** //
-// ************************************************************************** //
-
-class parameters_store {
- struct lg_compare {
- bool operator()( cstring lh, cstring rh ) const
- {
- return std::lexicographical_compare(lh.begin(), lh.end(),
- rh.begin(), rh.end());
- }
- };
-public:
-
- typedef std::map<cstring, basic_param_ptr, lg_compare> storage_type;
-
- /// Adds parameter into the persistent store
- void add( basic_param const& in )
- {
- basic_param_ptr p = in.clone();
-
- BOOST_TEST_I_ASSRT( m_parameters.insert( std::make_pair( cstring(p->p_name), p ) ).second,
- duplicate_param() << "Parameter " << p->p_name << " is duplicate." );
- }
-
- /// Returns true if there is no parameters registered
- bool is_empty() const { return m_parameters.empty(); }
- /// Returns map of all the registered parameter
- storage_type const& all() const { return m_parameters; }
- /// Returns true if parameter with psecified name is registered
- bool has( cstring name ) const
- {
- return m_parameters.find( name ) != m_parameters.end();
- }
- /// Returns map of all the registered parameter
- basic_param_ptr get( cstring name ) const
- {
- storage_type::const_iterator const& found = m_parameters.find( name );
- BOOST_TEST_I_ASSRT( found != m_parameters.end(),
- unknown_param() << "Parameter " << name << " is unknown." );
-
- return found->second;
- }
-
-private:
- // Data members
- storage_type m_parameters;
-};
-
-} // namespace runtime
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_RUNTIME_PARAMETER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/setcolor.hpp b/src/third_party/boost-1.68.0/boost/test/utils/setcolor.hpp
deleted file mode 100644
index 91b068ae6f0..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/setcolor.hpp
+++ /dev/null
@@ -1,315 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : contains definition for setcolor iostream manipulator
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_SETCOLOR_HPP
-#define BOOST_TEST_UTILS_SETCOLOR_HPP
-
-// Boost.Test
-#include <boost/test/detail/config.hpp>
-
-// STL
-#include <iostream>
-#include <cstdio>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-#ifdef _WIN32
- #include <windows.h>
-
- #if defined(__MINGW32__) && !defined(COMMON_LVB_UNDERSCORE)
- // mingw badly mimicking windows.h
- #define COMMON_LVB_UNDERSCORE 0x8000
- #endif
-#endif
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace utils {
-
-// ************************************************************************** //
-// ************** term_attr ************** //
-// ************************************************************************** //
-
-struct term_attr { enum _ {
- NORMAL = 0,
- BRIGHT = 1,
- DIM = 2,
- UNDERLINE = 4,
- BLINK = 5,
- REVERSE = 7,
- CROSSOUT = 9
-}; };
-
-// ************************************************************************** //
-// ************** term_color ************** //
-// ************************************************************************** //
-
-struct term_color { enum _ {
- BLACK = 0,
- RED = 1,
- GREEN = 2,
- YELLOW = 3,
- BLUE = 4,
- MAGENTA = 5,
- CYAN = 6,
- WHITE = 7,
- ORIGINAL = 9
-}; };
-
-// ************************************************************************** //
-// ************** setcolor ************** //
-// ************************************************************************** //
-
-#ifndef _WIN32
-class setcolor {
-public:
- // Constructor
- explicit setcolor( term_attr::_ attr = term_attr::NORMAL,
- term_color::_ fg = term_color::ORIGINAL,
- term_color::_ bg = term_color::ORIGINAL )
- {
- m_command_size = std::sprintf( m_control_command, "%c[%d;%d;%dm", 0x1B, attr, fg + 30, bg + 40 );
- }
-
- friend std::ostream&
- operator<<( std::ostream& os, setcolor const& sc )
- {
- if (&os == &std::cout || &os == &std::cerr) {
- return os.write( sc.m_control_command, sc.m_command_size );
- }
- return os;
- }
-
-private:
- // Data members
- char m_control_command[13];
- int m_command_size;
-};
-
-#else
-
-class setcolor {
-
-protected:
- void set_console_color(std::ostream& os, WORD *attributes = NULL) const {
- DWORD console_type;
- if (&os == &std::cout) {
- console_type = STD_OUTPUT_HANDLE;
- }
- else if (&os == &std::cerr) {
- console_type = STD_ERROR_HANDLE;
- }
- else {
- return;
- }
- HANDLE hConsole = GetStdHandle(console_type);
-
- if(hConsole == INVALID_HANDLE_VALUE || hConsole == NULL )
- return;
-
- if(attributes != NULL) {
- SetConsoleTextAttribute(hConsole, *attributes);
- return;
- }
-
- CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
- GetConsoleScreenBufferInfo(hConsole, &consoleInfo);
- //if(!has_written_console_ext) {
- saved_attributes = consoleInfo.wAttributes;
- //}
-
- WORD fg_attr = 0;
- switch(m_fg)
- {
- case term_color::WHITE:
- fg_attr = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
- break;
- case term_color::BLACK:
- fg_attr = 0;
- break;
- case term_color::RED:
- fg_attr = FOREGROUND_RED;
- break;
- case term_color::GREEN:
- fg_attr = FOREGROUND_GREEN;
- break;
- case term_color::CYAN:
- fg_attr = FOREGROUND_GREEN | FOREGROUND_BLUE;
- break;
- case term_color::MAGENTA:
- fg_attr = FOREGROUND_RED | FOREGROUND_BLUE;
- break;
- case term_color::BLUE:
- fg_attr = FOREGROUND_BLUE;
- break;
- case term_color::YELLOW:
- fg_attr = FOREGROUND_RED | FOREGROUND_GREEN;
- break;
- case term_color::ORIGINAL:
- default:
- fg_attr = saved_attributes & (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
- break;
- }
-
- WORD bg_attr = 0;
- switch(m_bg)
- {
- case term_color::BLACK:
- bg_attr = 0;
- break;
- case term_color::WHITE:
- bg_attr = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE;
- break;
- case term_color::RED:
- bg_attr = BACKGROUND_RED;
- break;
- case term_color::GREEN:
- bg_attr = BACKGROUND_GREEN;
- break;
- case term_color::BLUE:
- bg_attr = BACKGROUND_BLUE;
- break;
- case term_color::ORIGINAL:
- default:
- bg_attr = saved_attributes & (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE);
- break;
- }
-
- WORD text_attr = 0;
- switch(m_attr)
- {
- case term_attr::BRIGHT:
- text_attr = FOREGROUND_INTENSITY;
- break;
- case term_attr::UNDERLINE:
- text_attr = COMMON_LVB_UNDERSCORE;
- break;
- default:
- break;
- }
-
- SetConsoleTextAttribute(hConsole, fg_attr | bg_attr | text_attr);
-
- //has_written_console_ext = true;
- return;
- }
-
-public:
- // Constructor
- explicit setcolor(
- term_attr::_ attr = term_attr::NORMAL,
- term_color::_ fg = term_color::ORIGINAL,
- term_color::_ bg = term_color::ORIGINAL )
- : /*has_written_console_ext(false)
- , */m_attr(attr)
- , m_fg(fg)
- , m_bg(bg)
- {}
-
- friend std::ostream&
- operator<<( std::ostream& os, setcolor const& sc )
- {
- sc.set_console_color(os);
- return os;
- }
-
-private:
- term_attr::_ m_attr;
- term_color::_ m_fg;
- term_color::_ m_bg;
-
-protected:
- // Data members
- mutable WORD saved_attributes;
- //mutable bool has_written_console_ext;
-};
-
-#endif
-// ************************************************************************** //
-// ************** scope_setcolor ************** //
-// ************************************************************************** //
-
-#ifndef _WIN32
-
-struct scope_setcolor {
- scope_setcolor() : m_os( 0 ) {}
- explicit scope_setcolor( std::ostream& os,
- term_attr::_ attr = term_attr::NORMAL,
- term_color::_ fg = term_color::ORIGINAL,
- term_color::_ bg = term_color::ORIGINAL )
- : m_os( &os )
- {
- os << setcolor( attr, fg, bg );
- }
- ~scope_setcolor()
- {
- if( m_os )
- *m_os << setcolor();
- }
-private:
- scope_setcolor(const scope_setcolor& r);
- scope_setcolor& operator=(const scope_setcolor& r);
- // Data members
- std::ostream* m_os;
-};
-
-#else
-
-struct scope_setcolor : setcolor {
- scope_setcolor() : m_os( 0 ) {}
- explicit scope_setcolor(
- std::ostream& os,
- term_attr::_ attr = term_attr::NORMAL,
- term_color::_ fg = term_color::ORIGINAL,
- term_color::_ bg = term_color::ORIGINAL )
- :
- setcolor(attr, fg, bg),
- m_os( &os )
- {
- os << *this;
- }
-
- ~scope_setcolor()
- {
- if (m_os) {
- set_console_color(*m_os, &this->saved_attributes);
- }
- }
-private:
- scope_setcolor(const scope_setcolor& r);
- scope_setcolor& operator=(const scope_setcolor& r);
- // Data members
- std::ostream* m_os;
-};
-
-
-#endif
-
-#define BOOST_TEST_SCOPE_SETCOLOR( is_color_output, os, attr, color ) \
- utils::scope_setcolor const sc( \
- os, \
- is_color_output ? utils::attr : utils::term_attr::NORMAL, \
- is_color_output ? utils::color : utils::term_color::ORIGINAL);\
- ut_detail::ignore_unused_variable_warning( sc ) \
-/**/
-
-} // namespace utils
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_SETCOLOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/trivial_singleton.hpp b/src/third_party/boost-1.68.0/boost/test/utils/trivial_singleton.hpp
deleted file mode 100644
index ac612b63930..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/trivial_singleton.hpp
+++ /dev/null
@@ -1,79 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : simple helpers for creating cusom output manipulators
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_TRIVIAL_SIGNLETON_HPP
-#define BOOST_TEST_UTILS_TRIVIAL_SIGNLETON_HPP
-
-// Boost.Test
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-// Boost
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-
-// ************************************************************************** //
-// ************** singleton ************** //
-// ************************************************************************** //
-
-template<typename Derived>
-class singleton {
-public:
- static Derived& instance() { static Derived the_inst; return the_inst; }
-
- BOOST_DELETED_FUNCTION(singleton(singleton const&))
- BOOST_DELETED_FUNCTION(singleton& operator=(singleton const&))
-
-protected:
- BOOST_DEFAULTED_FUNCTION(singleton(), {})
- BOOST_DEFAULTED_FUNCTION(~singleton(), {})
-};
-
-//____________________________________________________________________________//
-
-#define BOOST_TEST_SINGLETON_CONS( type ) \
-friend class boost::unit_test::singleton<type>; \
-type() {} \
-/**/
-
-#if BOOST_WORKAROUND(__DECCXX_VER, BOOST_TESTED_AT(60590042))
-
-#define BOOST_TEST_SINGLETON_INST( inst ) \
-template class unit_test::singleton< BOOST_JOIN( inst, _t ) > ; \
-namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); }
-
-#elif defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ < 4
-#define BOOST_TEST_SINGLETON_INST( inst ) \
-static BOOST_JOIN( inst, _t)& inst = BOOST_JOIN (inst, _t)::instance();
-
-#else
-
-#define BOOST_TEST_SINGLETON_INST( inst ) \
-namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); }
-
-#endif
-
-//____________________________________________________________________________//
-
-} // namespace unit_test
-} // namespace boost
-
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_TRIVIAL_SIGNLETON_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/xml_printer.hpp b/src/third_party/boost-1.68.0/boost/test/utils/xml_printer.hpp
deleted file mode 100644
index ffaf8fcc057..00000000000
--- a/src/third_party/boost-1.68.0/boost/test/utils/xml_printer.hpp
+++ /dev/null
@@ -1,143 +0,0 @@
-// (C) Copyright Gennadiy Rozental 2001.
-// Distributed under the Boost Software License, Version 1.0.
-// (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/test for the library home page.
-//
-// File : $RCSfile$
-//
-// Version : $Revision$
-//
-// Description : common code used by any agent serving as OF_XML printer
-// ***************************************************************************
-
-#ifndef BOOST_TEST_UTILS_XML_PRINTER_HPP
-#define BOOST_TEST_UTILS_XML_PRINTER_HPP
-
-// Boost.Test
-#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
-#include <boost/test/utils/custom_manip.hpp>
-#include <boost/test/utils/foreach.hpp>
-#include <boost/test/utils/basic_cstring/io.hpp>
-
-// Boost
-#include <boost/config.hpp>
-
-// STL
-#include <iostream>
-
-#include <boost/test/detail/suppress_warnings.hpp>
-
-//____________________________________________________________________________//
-
-namespace boost {
-namespace unit_test {
-namespace utils {
-
-// ************************************************************************** //
-// ************** xml print helpers ************** //
-// ************************************************************************** //
-
-inline void
-print_escaped( std::ostream& where_to, const_string value )
-{
-#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
- static std::map<char,char const*> const char_type{{
- {'<' , "lt"},
- {'>' , "gt"},
- {'&' , "amp"},
- {'\'', "apos"},
- {'"' , "quot"}
- }};
-#else
- static std::map<char,char const*> char_type;
-
- if( char_type.empty() ) {
- char_type['<'] = "lt";
- char_type['>'] = "gt";
- char_type['&'] = "amp";
- char_type['\'']= "apos";
- char_type['"'] = "quot";
- }
-#endif
-
- BOOST_TEST_FOREACH( char, c, value ) {
- std::map<char,char const*>::const_iterator found_ref = char_type.find( c );
-
- if( found_ref != char_type.end() )
- where_to << '&' << found_ref->second << ';';
- else
- where_to << c;
- }
-}
-
-//____________________________________________________________________________//
-
-inline void
-print_escaped( std::ostream& where_to, std::string const& value )
-{
- print_escaped( where_to, const_string( value ) );
-}
-
-//____________________________________________________________________________//
-
-template<typename T>
-inline void
-print_escaped( std::ostream& where_to, T const& value )
-{
- where_to << value;
-}
-
-//____________________________________________________________________________//
-
-inline void
-print_escaped_cdata( std::ostream& where_to, const_string value )
-{
- static const_string cdata_end( "]]>" );
-
- const_string::size_type pos = value.find( cdata_end );
- if( pos == const_string::npos )
- where_to << value;
- else {
- where_to << value.substr( 0, pos+2 ) << cdata_end
- << BOOST_TEST_L( "<![CDATA[" ) << value.substr( pos+2 );
- }
-}
-
-//____________________________________________________________________________//
-
-typedef custom_manip<struct attr_value_t> attr_value;
-
-template<typename T>
-inline std::ostream&
-operator<<( custom_printer<attr_value> const& p, T const& value )
-{
- *p << "=\"";
- print_escaped( *p, value );
- *p << '"';
-
- return *p;
-}
-
-//____________________________________________________________________________//
-
-typedef custom_manip<struct cdata_t> cdata;
-
-inline std::ostream&
-operator<<( custom_printer<cdata> const& p, const_string value )
-{
- *p << BOOST_TEST_L( "<![CDATA[" );
- print_escaped_cdata( *p, value );
- return *p << BOOST_TEST_L( "]]>" );
-}
-
-//____________________________________________________________________________//
-
-} // namespace utils
-} // namespace unit_test
-} // namespace boost
-
-#include <boost/test/detail/enable_warnings.hpp>
-
-#endif // BOOST_TEST_UTILS_XML_PRINTER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/throw_exception.hpp b/src/third_party/boost-1.68.0/boost/throw_exception.hpp
deleted file mode 100644
index aa977dfc79e..00000000000
--- a/src/third_party/boost-1.68.0/boost/throw_exception.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef UUID_AA15E74A856F11E08B8D93F24824019B
-#define UUID_AA15E74A856F11E08B8D93F24824019B
-#if (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
-#pragma GCC system_header
-#endif
-#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
-#pragma warning(push,1)
-#endif
-
-// MS compatible compilers support #pragma once
-
-#if defined(_MSC_VER) && (_MSC_VER >= 1020)
-# pragma once
-#endif
-
-//
-// boost/throw_exception.hpp
-//
-// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
-// Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc.
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-//
-// http://www.boost.org/libs/utility/throw_exception.html
-//
-
-#include <boost/detail/workaround.hpp>
-#include <boost/config.hpp>
-#include <exception>
-
-#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )
-# define BOOST_EXCEPTION_DISABLE
-#endif
-
-#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 )
-# define BOOST_EXCEPTION_DISABLE
-#endif
-
-#if !defined( BOOST_EXCEPTION_DISABLE )
-# include <boost/exception/exception.hpp>
-#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION)
-# include <boost/current_function.hpp>
-# define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION
-#endif
-# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__)
-#else
-# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
-#endif
-
-namespace boost
-{
-#ifdef BOOST_NO_EXCEPTIONS
-
-void throw_exception( std::exception const & e ); // user defined
-
-#else
-
-inline void throw_exception_assert_compatibility( std::exception const & ) { }
-
-template<class E> BOOST_NORETURN inline void throw_exception( E const & e )
-{
- //All boost exceptions are required to derive from std::exception,
- //to ensure compatibility with BOOST_NO_EXCEPTIONS.
- throw_exception_assert_compatibility(e);
-
-#ifndef BOOST_EXCEPTION_DISABLE
- throw enable_current_exception(enable_error_info(e));
-#else
- throw e;
-#endif
-}
-
-#endif
-
-#if !defined( BOOST_EXCEPTION_DISABLE )
- namespace
- exception_detail
- {
- template <class E>
- BOOST_NORETURN
- void
- throw_exception_( E const & x, char const * current_function, char const * file, int line )
- {
- boost::throw_exception(
- set_info(
- set_info(
- set_info(
- enable_error_info(x),
- throw_function(current_function)),
- throw_file(file)),
- throw_line(line)));
- }
- }
-#endif
-} // namespace boost
-
-#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
-#pragma warning(pop)
-#endif
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/token_functions.hpp b/src/third_party/boost-1.68.0/boost/token_functions.hpp
deleted file mode 100644
index 30d69397230..00000000000
--- a/src/third_party/boost-1.68.0/boost/token_functions.hpp
+++ /dev/null
@@ -1,652 +0,0 @@
-// Boost token_functions.hpp ------------------------------------------------//
-
-// Copyright John R. Bandela 2001.
-
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/tokenizer/ for documentation.
-
-// Revision History:
-// 01 Oct 2004 Joaquin M Lopez Munoz
-// Workaround for a problem with string::assign in msvc-stlport
-// 06 Apr 2004 John Bandela
-// Fixed a bug involving using char_delimiter with a true input iterator
-// 28 Nov 2003 Robert Zeh and John Bandela
-// Converted into "fast" functions that avoid using += when
-// the supplied iterator isn't an input_iterator; based on
-// some work done at Archelon and a version that was checked into
-// the boost CVS for a short period of time.
-// 20 Feb 2002 John Maddock
-// Removed using namespace std declarations and added
-// workaround for BOOST_NO_STDC_NAMESPACE (the library
-// can be safely mixed with regex).
-// 06 Feb 2002 Jeremy Siek
-// Added char_separator.
-// 02 Feb 2002 Jeremy Siek
-// Removed tabs and a little cleanup.
-
-
-#ifndef BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_
-#define BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_
-
-#include <vector>
-#include <stdexcept>
-#include <string>
-#include <cctype>
-#include <algorithm> // for find_if
-#include <boost/config.hpp>
-#include <boost/assert.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/mpl/if.hpp>
-#include <boost/throw_exception.hpp>
-#if !defined(BOOST_NO_CWCTYPE)
-#include <cwctype>
-#endif
-
-//
-// the following must not be macros if we are to prefix them
-// with std:: (they shouldn't be macros anyway...)
-//
-#ifdef ispunct
-# undef ispunct
-#endif
-#ifdef iswpunct
-# undef iswpunct
-#endif
-#ifdef isspace
-# undef isspace
-#endif
-#ifdef iswspace
-# undef iswspace
-#endif
-//
-// fix namespace problems:
-//
-#ifdef BOOST_NO_STDC_NAMESPACE
-namespace std{
- using ::ispunct;
- using ::isspace;
-#if !defined(BOOST_NO_CWCTYPE)
- using ::iswpunct;
- using ::iswspace;
-#endif
-}
-#endif
-
-namespace boost{
- //===========================================================================
- // The escaped_list_separator class. Which is a model of TokenizerFunction
- // An escaped list is a super-set of what is commonly known as a comma
- // separated value (csv) list.It is separated into fields by a comma or
- // other character. If the delimiting character is inside quotes, then it is
- // counted as a regular character.To allow for embedded quotes in a field,
- // there can be escape sequences using the \ much like C.
- // The role of the comma, the quotation mark, and the escape
- // character (backslash \), can be assigned to other characters.
-
- struct escaped_list_error : public std::runtime_error{
- escaped_list_error(const std::string& what_arg):std::runtime_error(what_arg) { }
- };
-
-
-// The out of the box GCC 2.95 on cygwin does not have a char_traits class.
-// MSVC does not like the following typename
- template <class Char,
- class Traits = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
- class escaped_list_separator {
-
- private:
- typedef std::basic_string<Char,Traits> string_type;
- struct char_eq {
- Char e_;
- char_eq(Char e):e_(e) { }
- bool operator()(Char c) {
- return Traits::eq(e_,c);
- }
- };
- string_type escape_;
- string_type c_;
- string_type quote_;
- bool last_;
-
- bool is_escape(Char e) {
- char_eq f(e);
- return std::find_if(escape_.begin(),escape_.end(),f)!=escape_.end();
- }
- bool is_c(Char e) {
- char_eq f(e);
- return std::find_if(c_.begin(),c_.end(),f)!=c_.end();
- }
- bool is_quote(Char e) {
- char_eq f(e);
- return std::find_if(quote_.begin(),quote_.end(),f)!=quote_.end();
- }
- template <typename iterator, typename Token>
- void do_escape(iterator& next,iterator end,Token& tok) {
- if (++next == end)
- BOOST_THROW_EXCEPTION(escaped_list_error(std::string("cannot end with escape")));
- if (Traits::eq(*next,'n')) {
- tok+='\n';
- return;
- }
- else if (is_quote(*next)) {
- tok+=*next;
- return;
- }
- else if (is_c(*next)) {
- tok+=*next;
- return;
- }
- else if (is_escape(*next)) {
- tok+=*next;
- return;
- }
- else
- BOOST_THROW_EXCEPTION(escaped_list_error(std::string("unknown escape sequence")));
- }
-
- public:
-
- explicit escaped_list_separator(Char e = '\\',
- Char c = ',',Char q = '\"')
- : escape_(1,e), c_(1,c), quote_(1,q), last_(false) { }
-
- escaped_list_separator(string_type e, string_type c, string_type q)
- : escape_(e), c_(c), quote_(q), last_(false) { }
-
- void reset() {last_=false;}
-
- template <typename InputIterator, typename Token>
- bool operator()(InputIterator& next,InputIterator end,Token& tok) {
- bool bInQuote = false;
- tok = Token();
-
- if (next == end) {
- if (last_) {
- last_ = false;
- return true;
- }
- else
- return false;
- }
- last_ = false;
- for (;next != end;++next) {
- if (is_escape(*next)) {
- do_escape(next,end,tok);
- }
- else if (is_c(*next)) {
- if (!bInQuote) {
- // If we are not in quote, then we are done
- ++next;
- // The last character was a c, that means there is
- // 1 more blank field
- last_ = true;
- return true;
- }
- else tok+=*next;
- }
- else if (is_quote(*next)) {
- bInQuote=!bInQuote;
- }
- else {
- tok += *next;
- }
- }
- return true;
- }
- };
-
- //===========================================================================
- // The classes here are used by offset_separator and char_separator to implement
- // faster assigning of tokens using assign instead of +=
-
- namespace tokenizer_detail {
- //===========================================================================
- // Tokenizer was broken for wide character separators, at least on Windows, since
- // CRT functions isspace etc only expect values in [0, 0xFF]. Debug build asserts
- // if higher values are passed in. The traits extension class should take care of this.
- // Assuming that the conditional will always get optimized out in the function
- // implementations, argument types are not a problem since both forms of character classifiers
- // expect an int.
-
-#if !defined(BOOST_NO_CWCTYPE)
- template<typename traits, int N>
- struct traits_extension_details : public traits {
- typedef typename traits::char_type char_type;
- static bool isspace(char_type c)
- {
- return std::iswspace(c) != 0;
- }
- static bool ispunct(char_type c)
- {
- return std::iswpunct(c) != 0;
- }
- };
-
- template<typename traits>
- struct traits_extension_details<traits, 1> : public traits {
- typedef typename traits::char_type char_type;
- static bool isspace(char_type c)
- {
- return std::isspace(c) != 0;
- }
- static bool ispunct(char_type c)
- {
- return std::ispunct(c) != 0;
- }
- };
-#endif
-
-
- // In case there is no cwctype header, we implement the checks manually.
- // We make use of the fact that the tested categories should fit in ASCII.
- template<typename traits>
- struct traits_extension : public traits {
- typedef typename traits::char_type char_type;
- static bool isspace(char_type c)
- {
-#if !defined(BOOST_NO_CWCTYPE)
- return traits_extension_details<traits, sizeof(char_type)>::isspace(c);
-#else
- return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0;
-#endif
- }
-
- static bool ispunct(char_type c)
- {
-#if !defined(BOOST_NO_CWCTYPE)
- return traits_extension_details<traits, sizeof(char_type)>::ispunct(c);
-#else
- return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0;
-#endif
- }
- };
-
- // The assign_or_plus_equal struct contains functions that implement
- // assign, +=, and clearing based on the iterator type. The
- // generic case does nothing for plus_equal and clearing, while
- // passing through the call for assign.
- //
- // When an input iterator is being used, the situation is reversed.
- // The assign method does nothing, plus_equal invokes operator +=,
- // and the clearing method sets the supplied token to the default
- // token constructor's result.
- //
-
- template<class IteratorTag>
- struct assign_or_plus_equal {
- template<class Iterator, class Token>
- static void assign(Iterator b, Iterator e, Token &t) {
- t.assign(b, e);
- }
-
- template<class Token, class Value>
- static void plus_equal(Token &, const Value &) { }
-
- // If we are doing an assign, there is no need for the
- // the clear.
- //
- template<class Token>
- static void clear(Token &) { }
- };
-
- template <>
- struct assign_or_plus_equal<std::input_iterator_tag> {
- template<class Iterator, class Token>
- static void assign(Iterator , Iterator , Token &) { }
- template<class Token, class Value>
- static void plus_equal(Token &t, const Value &v) {
- t += v;
- }
- template<class Token>
- static void clear(Token &t) {
- t = Token();
- }
- };
-
-
- template<class Iterator>
- struct pointer_iterator_category{
- typedef std::random_access_iterator_tag type;
- };
-
-
- template<class Iterator>
- struct class_iterator_category{
- typedef typename Iterator::iterator_category type;
- };
-
-
-
- // This portably gets the iterator_tag without partial template specialization
- template<class Iterator>
- struct get_iterator_category{
- typedef typename mpl::if_<is_pointer<Iterator>,
- pointer_iterator_category<Iterator>,
- class_iterator_category<Iterator>
- >::type cat;
-
- typedef typename cat::type iterator_category;
- };
-
-
- } // namespace tokenizer_detail
-
-
- //===========================================================================
- // The offset_separator class, which is a model of TokenizerFunction.
- // Offset breaks a string into tokens based on a range of offsets
-
- class offset_separator {
- private:
-
- std::vector<int> offsets_;
- unsigned int current_offset_;
- bool wrap_offsets_;
- bool return_partial_last_;
-
- public:
- template <typename Iter>
- offset_separator(Iter begin, Iter end, bool wrap_offsets = true,
- bool return_partial_last = true)
- : offsets_(begin,end), current_offset_(0),
- wrap_offsets_(wrap_offsets),
- return_partial_last_(return_partial_last) { }
-
- offset_separator()
- : offsets_(1,1), current_offset_(),
- wrap_offsets_(true), return_partial_last_(true) { }
-
- void reset() {
- current_offset_ = 0;
- }
-
- template <typename InputIterator, typename Token>
- bool operator()(InputIterator& next, InputIterator end, Token& tok)
- {
- typedef tokenizer_detail::assign_or_plus_equal<
- BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category<
- InputIterator
- >::iterator_category
- > assigner;
-
- BOOST_ASSERT(!offsets_.empty());
-
- assigner::clear(tok);
- InputIterator start(next);
-
- if (next == end)
- return false;
-
- if (current_offset_ == offsets_.size())
- {
- if (wrap_offsets_)
- current_offset_=0;
- else
- return false;
- }
-
- int c = offsets_[current_offset_];
- int i = 0;
- for (; i < c; ++i) {
- if (next == end)break;
- assigner::plus_equal(tok,*next++);
- }
- assigner::assign(start,next,tok);
-
- if (!return_partial_last_)
- if (i < (c-1) )
- return false;
-
- ++current_offset_;
- return true;
- }
- };
-
-
- //===========================================================================
- // The char_separator class breaks a sequence of characters into
- // tokens based on the character delimiters (very much like bad old
- // strtok). A delimiter character can either be kept or dropped. A
- // kept delimiter shows up as an output token, whereas a dropped
- // delimiter does not.
-
- // This class replaces the char_delimiters_separator class. The
- // constructor for the char_delimiters_separator class was too
- // confusing and needed to be deprecated. However, because of the
- // default arguments to the constructor, adding the new constructor
- // would cause ambiguity, so instead I deprecated the whole class.
- // The implementation of the class was also simplified considerably.
-
- enum empty_token_policy { drop_empty_tokens, keep_empty_tokens };
-
- // The out of the box GCC 2.95 on cygwin does not have a char_traits class.
- template <typename Char,
- typename Tr = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
- class char_separator
- {
- typedef tokenizer_detail::traits_extension<Tr> Traits;
- typedef std::basic_string<Char,Tr> string_type;
- public:
- explicit
- char_separator(const Char* dropped_delims,
- const Char* kept_delims = 0,
- empty_token_policy empty_tokens = drop_empty_tokens)
- : m_dropped_delims(dropped_delims),
- m_use_ispunct(false),
- m_use_isspace(false),
- m_empty_tokens(empty_tokens),
- m_output_done(false)
- {
- // Borland workaround
- if (kept_delims)
- m_kept_delims = kept_delims;
- }
-
- // use ispunct() for kept delimiters and isspace for dropped.
- explicit
- char_separator()
- : m_use_ispunct(true),
- m_use_isspace(true),
- m_empty_tokens(drop_empty_tokens),
- m_output_done(false) { }
-
- void reset() { }
-
- template <typename InputIterator, typename Token>
- bool operator()(InputIterator& next, InputIterator end, Token& tok)
- {
- typedef tokenizer_detail::assign_or_plus_equal<
- BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category<
- InputIterator
- >::iterator_category
- > assigner;
-
- assigner::clear(tok);
-
- // skip past all dropped_delims
- if (m_empty_tokens == drop_empty_tokens)
- for (; next != end && is_dropped(*next); ++next)
- { }
-
- InputIterator start(next);
-
- if (m_empty_tokens == drop_empty_tokens) {
-
- if (next == end)
- return false;
-
-
- // if we are on a kept_delims move past it and stop
- if (is_kept(*next)) {
- assigner::plus_equal(tok,*next);
- ++next;
- } else
- // append all the non delim characters
- for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next)
- assigner::plus_equal(tok,*next);
- }
- else { // m_empty_tokens == keep_empty_tokens
-
- // Handle empty token at the end
- if (next == end)
- {
- if (m_output_done == false)
- {
- m_output_done = true;
- assigner::assign(start,next,tok);
- return true;
- }
- else
- return false;
- }
-
- if (is_kept(*next)) {
- if (m_output_done == false)
- m_output_done = true;
- else {
- assigner::plus_equal(tok,*next);
- ++next;
- m_output_done = false;
- }
- }
- else if (m_output_done == false && is_dropped(*next)) {
- m_output_done = true;
- }
- else {
- if (is_dropped(*next))
- start=++next;
- for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next)
- assigner::plus_equal(tok,*next);
- m_output_done = true;
- }
- }
- assigner::assign(start,next,tok);
- return true;
- }
-
- private:
- string_type m_kept_delims;
- string_type m_dropped_delims;
- bool m_use_ispunct;
- bool m_use_isspace;
- empty_token_policy m_empty_tokens;
- bool m_output_done;
-
- bool is_kept(Char E) const
- {
- if (m_kept_delims.length())
- return m_kept_delims.find(E) != string_type::npos;
- else if (m_use_ispunct) {
- return Traits::ispunct(E) != 0;
- } else
- return false;
- }
- bool is_dropped(Char E) const
- {
- if (m_dropped_delims.length())
- return m_dropped_delims.find(E) != string_type::npos;
- else if (m_use_isspace) {
- return Traits::isspace(E) != 0;
- } else
- return false;
- }
- };
-
- //===========================================================================
- // The following class is DEPRECATED, use class char_separators instead.
- //
- // The char_delimiters_separator class, which is a model of
- // TokenizerFunction. char_delimiters_separator breaks a string
- // into tokens based on character delimiters. There are 2 types of
- // delimiters. returnable delimiters can be returned as
- // tokens. These are often punctuation. nonreturnable delimiters
- // cannot be returned as tokens. These are often whitespace
-
- // The out of the box GCC 2.95 on cygwin does not have a char_traits class.
- template <class Char,
- class Tr = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
- class char_delimiters_separator {
- private:
-
- typedef tokenizer_detail::traits_extension<Tr> Traits;
- typedef std::basic_string<Char,Tr> string_type;
- string_type returnable_;
- string_type nonreturnable_;
- bool return_delims_;
- bool no_ispunct_;
- bool no_isspace_;
-
- bool is_ret(Char E)const
- {
- if (returnable_.length())
- return returnable_.find(E) != string_type::npos;
- else{
- if (no_ispunct_) {return false;}
- else{
- int r = Traits::ispunct(E);
- return r != 0;
- }
- }
- }
- bool is_nonret(Char E)const
- {
- if (nonreturnable_.length())
- return nonreturnable_.find(E) != string_type::npos;
- else{
- if (no_isspace_) {return false;}
- else{
- int r = Traits::isspace(E);
- return r != 0;
- }
- }
- }
-
- public:
- explicit char_delimiters_separator(bool return_delims = false,
- const Char* returnable = 0,
- const Char* nonreturnable = 0)
- : returnable_(returnable ? returnable : string_type().c_str()),
- nonreturnable_(nonreturnable ? nonreturnable:string_type().c_str()),
- return_delims_(return_delims), no_ispunct_(returnable!=0),
- no_isspace_(nonreturnable!=0) { }
-
- void reset() { }
-
- public:
-
- template <typename InputIterator, typename Token>
- bool operator()(InputIterator& next, InputIterator end,Token& tok) {
- tok = Token();
-
- // skip past all nonreturnable delims
- // skip past the returnable only if we are not returning delims
- for (;next!=end && ( is_nonret(*next) || (is_ret(*next)
- && !return_delims_ ) );++next) { }
-
- if (next == end) {
- return false;
- }
-
- // if we are to return delims and we are one a returnable one
- // move past it and stop
- if (is_ret(*next) && return_delims_) {
- tok+=*next;
- ++next;
- }
- else
- // append all the non delim characters
- for (;next!=end && !is_nonret(*next) && !is_ret(*next);++next)
- tok+=*next;
-
-
- return true;
- }
- };
-
-
-} //namespace boost
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_index/stl_type_index.hpp b/src/third_party/boost-1.68.0/boost/type_index/stl_type_index.hpp
deleted file mode 100644
index 0f7dae8cec2..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_index/stl_type_index.hpp
+++ /dev/null
@@ -1,275 +0,0 @@
-//
-// Copyright (c) Antony Polukhin, 2013-2018.
-//
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-
-#ifndef BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
-#define BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
-
-/// \file stl_type_index.hpp
-/// \brief Contains boost::typeindex::stl_type_index class.
-///
-/// boost::typeindex::stl_type_index class can be used as a drop-in replacement
-/// for std::type_index.
-///
-/// It is used in situations when RTTI is enabled or typeid() method is available.
-/// When typeid() is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro
-/// is defined boost::typeindex::ctti is usually used instead of boost::typeindex::stl_type_index.
-
-#include <boost/type_index/type_index_facade.hpp>
-
-// MSVC is capable of calling typeid(T) even when RTTI is off
-#if defined(BOOST_NO_RTTI) && !defined(BOOST_MSVC)
-#error "File boost/type_index/stl_type_index.ipp is not usable when typeid() is not available."
-#endif
-
-#include <typeinfo>
-#include <cstring> // std::strcmp, std::strlen, std::strstr
-#include <stdexcept>
-#include <boost/static_assert.hpp>
-#include <boost/throw_exception.hpp>
-#include <boost/core/demangle.hpp>
-#include <boost/type_traits/conditional.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-
-#include <boost/container_hash/hash.hpp>
-
-#if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
- || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
-# include <boost/type_traits/is_signed.hpp>
-# include <boost/type_traits/make_signed.hpp>
-# include <boost/type_traits/type_identity.hpp>
-#endif
-
-#ifdef BOOST_HAS_PRAGMA_ONCE
-# pragma once
-#endif
-
-namespace boost { namespace typeindex {
-
-/// \class stl_type_index
-/// This class is a wrapper around std::type_info, that workarounds issues and provides
-/// much more rich interface. \b For \b description \b of \b functions \b see type_index_facade.
-///
-/// This class requires typeid() to work. For cases when RTTI is disabled see ctti_type_index.
-class stl_type_index
- : public type_index_facade<
- stl_type_index,
- #ifdef BOOST_NO_STD_TYPEINFO
- type_info
- #else
- std::type_info
- #endif
- >
-{
-public:
-#ifdef BOOST_NO_STD_TYPEINFO
- typedef type_info type_info_t;
-#else
- typedef std::type_info type_info_t;
-#endif
-
-private:
- const type_info_t* data_;
-
-public:
- inline stl_type_index() BOOST_NOEXCEPT
- : data_(&typeid(void))
- {}
-
- inline stl_type_index(const type_info_t& data) BOOST_NOEXCEPT
- : data_(&data)
- {}
-
- inline const type_info_t& type_info() const BOOST_NOEXCEPT;
-
- inline const char* raw_name() const BOOST_NOEXCEPT;
- inline const char* name() const BOOST_NOEXCEPT;
- inline std::string pretty_name() const;
-
- inline std::size_t hash_code() const BOOST_NOEXCEPT;
- inline bool equal(const stl_type_index& rhs) const BOOST_NOEXCEPT;
- inline bool before(const stl_type_index& rhs) const BOOST_NOEXCEPT;
-
- template <class T>
- inline static stl_type_index type_id() BOOST_NOEXCEPT;
-
- template <class T>
- inline static stl_type_index type_id_with_cvr() BOOST_NOEXCEPT;
-
- template <class T>
- inline static stl_type_index type_id_runtime(const T& value) BOOST_NOEXCEPT;
-};
-
-inline const stl_type_index::type_info_t& stl_type_index::type_info() const BOOST_NOEXCEPT {
- return *data_;
-}
-
-
-inline const char* stl_type_index::raw_name() const BOOST_NOEXCEPT {
-#ifdef _MSC_VER
- return data_->raw_name();
-#else
- return data_->name();
-#endif
-}
-
-inline const char* stl_type_index::name() const BOOST_NOEXCEPT {
- return data_->name();
-}
-
-inline std::string stl_type_index::pretty_name() const {
- static const char cvr_saver_name[] = "boost::typeindex::detail::cvr_saver<";
- static BOOST_CONSTEXPR_OR_CONST std::string::size_type cvr_saver_name_len = sizeof(cvr_saver_name) - 1;
-
- // In case of MSVC demangle() is a no-op, and name() already returns demangled name.
- // In case of GCC and Clang (on non-Windows systems) name() returns mangled name and demangle() undecorates it.
- const boost::core::scoped_demangled_name demangled_name(data_->name());
-
- const char* begin = demangled_name.get();
- if (!begin) {
- boost::throw_exception(std::runtime_error("Type name demangling failed"));
- }
-
- const std::string::size_type len = std::strlen(begin);
- const char* end = begin + len;
-
- if (len > cvr_saver_name_len) {
- const char* b = std::strstr(begin, cvr_saver_name);
- if (b) {
- b += cvr_saver_name_len;
-
- // Trim leading spaces
- while (*b == ' ') { // the string is zero terminated, we won't exceed the buffer size
- ++ b;
- }
-
- // Skip the closing angle bracket
- const char* e = end - 1;
- while (e > b && *e != '>') {
- -- e;
- }
-
- // Trim trailing spaces
- while (e > b && *(e - 1) == ' ') {
- -- e;
- }
-
- if (b < e) {
- // Parsing seems to have succeeded, the type name is not empty
- begin = b;
- end = e;
- }
- }
- }
-
- return std::string(begin, end);
-}
-
-
-inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT {
-#if (defined(_MSC_VER) && _MSC_VER > 1600) \
- || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) \
- || (defined(__GNUC__) && __GNUC__ > 4 && __cplusplus >= 201103)
- return data_->hash_code();
-#else
- return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name()));
-#endif
-}
-
-
-/// @cond
-
-// for this compiler at least, cross-shared-library type_info
-// comparisons don't work, so we are using typeid(x).name() instead.
-# if (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))) \
- || defined(_AIX) \
- || (defined(__sgi) && defined(__host_mips)) \
- || (defined(__hpux) && defined(__HP_aCC)) \
- || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC))
-# define BOOST_CLASSINFO_COMPARE_BY_NAMES
-# endif
-
-/// @endcond
-
-inline bool stl_type_index::equal(const stl_type_index& rhs) const BOOST_NOEXCEPT {
-#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES
- return raw_name() == rhs.raw_name() || !std::strcmp(raw_name(), rhs.raw_name());
-#else
- return !!(*data_ == *rhs.data_);
-#endif
-}
-
-inline bool stl_type_index::before(const stl_type_index& rhs) const BOOST_NOEXCEPT {
-#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES
- return raw_name() != rhs.raw_name() && std::strcmp(raw_name(), rhs.raw_name()) < 0;
-#else
- return !!data_->before(*rhs.data_);
-#endif
-}
-
-#ifdef BOOST_CLASSINFO_COMPARE_BY_NAMES
-#undef BOOST_CLASSINFO_COMPARE_BY_NAMES
-#endif
-
-
-
-template <class T>
-inline stl_type_index stl_type_index::type_id() BOOST_NOEXCEPT {
- typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type no_ref_t;
- typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<no_ref_t>::type no_cvr_prefinal_t;
-
- # if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
- || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
-
- // Old EDG-based compilers seem to mistakenly distinguish 'integral' from 'signed integral'
- // in typeid() expressions. Full template specialization for 'integral' fixes that issue:
- typedef BOOST_DEDUCED_TYPENAME boost::conditional<
- boost::is_signed<no_cvr_prefinal_t>::value,
- boost::make_signed<no_cvr_prefinal_t>,
- boost::type_identity<no_cvr_prefinal_t>
- >::type no_cvr_prefinal_lazy_t;
-
- typedef BOOST_DEDUCED_TYPENAME no_cvr_prefinal_t::type no_cvr_t;
- #else
- typedef no_cvr_prefinal_t no_cvr_t;
- #endif
-
- return typeid(no_cvr_t);
-}
-
-namespace detail {
- template <class T> class cvr_saver{};
-}
-
-template <class T>
-inline stl_type_index stl_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
- typedef BOOST_DEDUCED_TYPENAME boost::conditional<
- boost::is_reference<T>::value || boost::is_const<T>::value || boost::is_volatile<T>::value,
- detail::cvr_saver<T>,
- T
- >::type type;
-
- return typeid(type);
-}
-
-
-template <class T>
-inline stl_type_index stl_type_index::type_id_runtime(const T& value) BOOST_NOEXCEPT {
-#ifdef BOOST_NO_RTTI
- return value.boost_type_index_type_id_runtime_();
-#else
- return typeid(value);
-#endif
-}
-
-}} // namespace boost::typeindex
-
-#endif // BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
diff --git a/src/third_party/boost-1.68.0/boost/type_traits.hpp b/src/third_party/boost-1.68.0/boost/type_traits.hpp
deleted file mode 100644
index 9f024b1028c..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits.hpp
+++ /dev/null
@@ -1,154 +0,0 @@
-// (C) Copyright John Maddock 2000.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-// See boost/type_traits/*.hpp for full copyright notices.
-
-#ifndef BOOST_TYPE_TRAITS_HPP
-#define BOOST_TYPE_TRAITS_HPP
-
-#include <boost/type_traits/add_const.hpp>
-#include <boost/type_traits/add_cv.hpp>
-#include <boost/type_traits/add_lvalue_reference.hpp>
-#include <boost/type_traits/add_pointer.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/add_rvalue_reference.hpp>
-#include <boost/type_traits/add_volatile.hpp>
-#include <boost/type_traits/aligned_storage.hpp>
-#include <boost/type_traits/alignment_of.hpp>
-#include <boost/type_traits/common_type.hpp>
-#include <boost/type_traits/conditional.hpp>
-#include <boost/type_traits/copy_cv.hpp>
-#include <boost/type_traits/decay.hpp>
-#include <boost/type_traits/declval.hpp>
-#include <boost/type_traits/extent.hpp>
-#include <boost/type_traits/floating_point_promotion.hpp>
-#include <boost/type_traits/function_traits.hpp>
-
-#include <boost/type_traits/has_bit_and.hpp>
-#include <boost/type_traits/has_bit_and_assign.hpp>
-#include <boost/type_traits/has_bit_or.hpp>
-#include <boost/type_traits/has_bit_or_assign.hpp>
-#include <boost/type_traits/has_bit_xor.hpp>
-#include <boost/type_traits/has_bit_xor_assign.hpp>
-#include <boost/type_traits/has_complement.hpp>
-#include <boost/type_traits/has_dereference.hpp>
-#include <boost/type_traits/has_divides.hpp>
-#include <boost/type_traits/has_divides_assign.hpp>
-#include <boost/type_traits/has_equal_to.hpp>
-#include <boost/type_traits/has_greater.hpp>
-#include <boost/type_traits/has_greater_equal.hpp>
-#include <boost/type_traits/has_left_shift.hpp>
-#include <boost/type_traits/has_left_shift_assign.hpp>
-#include <boost/type_traits/has_less.hpp>
-#include <boost/type_traits/has_less_equal.hpp>
-#include <boost/type_traits/has_logical_and.hpp>
-#include <boost/type_traits/has_logical_not.hpp>
-#include <boost/type_traits/has_logical_or.hpp>
-#include <boost/type_traits/has_minus.hpp>
-#include <boost/type_traits/has_minus_assign.hpp>
-#include <boost/type_traits/has_modulus.hpp>
-#include <boost/type_traits/has_modulus_assign.hpp>
-#include <boost/type_traits/has_multiplies.hpp>
-#include <boost/type_traits/has_multiplies_assign.hpp>
-#include <boost/type_traits/has_negate.hpp>
-#if !defined(__BORLANDC__) && !defined(__CUDACC__)
-#include <boost/type_traits/has_new_operator.hpp>
-#endif
-#include <boost/type_traits/has_not_equal_to.hpp>
-#include <boost/type_traits/has_nothrow_assign.hpp>
-#include <boost/type_traits/has_nothrow_constructor.hpp>
-#include <boost/type_traits/has_nothrow_copy.hpp>
-#include <boost/type_traits/has_nothrow_destructor.hpp>
-#include <boost/type_traits/has_plus.hpp>
-#include <boost/type_traits/has_plus_assign.hpp>
-#include <boost/type_traits/has_post_decrement.hpp>
-#include <boost/type_traits/has_post_increment.hpp>
-#include <boost/type_traits/has_pre_decrement.hpp>
-#include <boost/type_traits/has_pre_increment.hpp>
-#include <boost/type_traits/has_right_shift.hpp>
-#include <boost/type_traits/has_right_shift_assign.hpp>
-#include <boost/type_traits/has_trivial_assign.hpp>
-#include <boost/type_traits/has_trivial_constructor.hpp>
-#include <boost/type_traits/has_trivial_copy.hpp>
-#include <boost/type_traits/has_trivial_destructor.hpp>
-#include <boost/type_traits/has_trivial_move_assign.hpp>
-#include <boost/type_traits/has_trivial_move_constructor.hpp>
-#include <boost/type_traits/has_unary_minus.hpp>
-#include <boost/type_traits/has_unary_plus.hpp>
-#include <boost/type_traits/has_virtual_destructor.hpp>
-
-#include <boost/type_traits/integral_constant.hpp>
-
-#include <boost/type_traits/is_abstract.hpp>
-#include <boost/type_traits/is_arithmetic.hpp>
-#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/is_assignable.hpp>
-#include <boost/type_traits/is_base_and_derived.hpp>
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/type_traits/is_class.hpp>
-#include <boost/type_traits/is_complex.hpp>
-#include <boost/type_traits/is_compound.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_constructible.hpp>
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/type_traits/is_copy_assignable.hpp>
-#include <boost/type_traits/is_copy_constructible.hpp>
-#include <boost/type_traits/is_default_constructible.hpp>
-#include <boost/type_traits/is_destructible.hpp>
-#include <boost/type_traits/is_empty.hpp>
-#include <boost/type_traits/is_enum.hpp>
-#include <boost/type_traits/is_final.hpp>
-#include <boost/type_traits/is_float.hpp>
-#include <boost/type_traits/is_floating_point.hpp>
-#include <boost/type_traits/is_function.hpp>
-#include <boost/type_traits/is_fundamental.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_list_constructible.hpp>
-#include <boost/type_traits/is_lvalue_reference.hpp>
-#include <boost/type_traits/is_member_function_pointer.hpp>
-#include <boost/type_traits/is_member_object_pointer.hpp>
-#include <boost/type_traits/is_member_pointer.hpp>
-#include <boost/type_traits/is_nothrow_move_assignable.hpp>
-#include <boost/type_traits/is_nothrow_move_constructible.hpp>
-#include <boost/type_traits/is_nothrow_swappable.hpp>
-#include <boost/type_traits/is_object.hpp>
-#include <boost/type_traits/is_pod.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/type_traits/is_polymorphic.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/type_traits/is_rvalue_reference.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_scalar.hpp>
-#include <boost/type_traits/is_signed.hpp>
-#include <boost/type_traits/is_stateless.hpp>
-#include <boost/type_traits/is_union.hpp>
-#include <boost/type_traits/is_unsigned.hpp>
-#include <boost/type_traits/is_virtual_base_of.hpp>
-#include <boost/type_traits/is_void.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#include <boost/type_traits/make_signed.hpp>
-#include <boost/type_traits/make_unsigned.hpp>
-#include <boost/type_traits/make_void.hpp>
-#include <boost/type_traits/rank.hpp>
-#include <boost/type_traits/remove_all_extents.hpp>
-#include <boost/type_traits/remove_bounds.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/remove_cv_ref.hpp>
-#include <boost/type_traits/remove_extent.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-#include <boost/type_traits/remove_volatile.hpp>
-#include <boost/type_traits/type_identity.hpp>
-#include <boost/type_traits/type_with_alignment.hpp>
-
-#if !(defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238))
-#include <boost/type_traits/integral_promotion.hpp>
-#include <boost/type_traits/promote.hpp>
-#endif
-
-#endif // BOOST_TYPE_TRAITS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/config.hpp b/src/third_party/boost-1.68.0/boost/type_traits/detail/config.hpp
deleted file mode 100644
index 2113c438a5e..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/config.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_CONFIG_HPP_INCLUDED
-#define BOOST_TT_CONFIG_HPP_INCLUDED
-
-#ifndef BOOST_CONFIG_HPP
-#include <boost/config.hpp>
-#endif
-#include <boost/version.hpp>
-#include <boost/config/workaround.hpp>
-
-//
-// whenever we have a conversion function with ellipses
-// it needs to be declared __cdecl to suppress compiler
-// warnings from MS and Borland compilers (this *must*
-// appear before we include is_same.hpp below):
-#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
-# define BOOST_TT_DECL __cdecl
-#else
-# define BOOST_TT_DECL /**/
-#endif
-
-# if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \
- || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \
- || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \
- || defined(__ghs) \
- || BOOST_WORKAROUND(__HP_aCC, < 60700) \
- || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \
- || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \
- && defined(BOOST_NO_IS_ABSTRACT)
-
-# define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1
-
-#endif
-
-#ifndef BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION
-# define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1
-#endif
-
-//
-// define BOOST_TT_TEST_MS_FUNC_SIGS
-// when we want to test __stdcall etc function types with is_function etc
-// (Note, does not work with Borland, even though it does support __stdcall etc):
-//
-#if defined(_MSC_EXTENSIONS) && !defined(__BORLANDC__)
-# define BOOST_TT_TEST_MS_FUNC_SIGS
-#endif
-
-//
-// define BOOST_TT_NO_CV_FUNC_TEST
-// if tests for cv-qualified member functions don't
-// work in is_member_function_pointer
-//
-#if BOOST_WORKAROUND(__MWERKS__, < 0x3000) || BOOST_WORKAROUND(__IBMCPP__, <= 600)
-# define BOOST_TT_NO_CV_FUNC_TEST
-#endif
-
-//
-// Macros that have been deprecated, defined here for backwards compatibility:
-//
-#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x)
-#define BOOST_TT_BROKEN_COMPILER_SPEC(x)
-
-//
-// Can we implement "accurate" binary operator detection:
-//
-#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(BOOST_GCC, < 40900)
-# define BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
-#endif
-
-#if defined(__clang__) && (__clang_major__ == 3) && (__clang_minor__ < 2) && defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
-#undef BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
-#endif
-
-#endif // BOOST_TT_CONFIG_HPP_INCLUDED
-
-
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/has_postfix_operator.hpp b/src/third_party/boost-1.68.0/boost/type_traits/detail/has_postfix_operator.hpp
deleted file mode 100644
index ba0358fe402..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/has_postfix_operator.hpp
+++ /dev/null
@@ -1,195 +0,0 @@
-// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#include <boost/config.hpp>
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_fundamental.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_void.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-
-// avoid warnings
-#if defined(__GNUC__)
-# pragma GCC system_header
-#elif defined(BOOST_MSVC)
-# pragma warning ( push )
-# pragma warning ( disable : 4244 4913 4800)
-# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-# pragma warning ( disable : 6334)
-# endif
-#endif
-
-namespace boost {
-namespace detail {
-
-// This namespace ensures that argument-dependent name lookup does not mess things up.
-namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
-
-// 1. a function to have an instance of type T without requiring T to be default
-// constructible
-template <typename T> T &make();
-
-
-// 2. we provide our operator definition for types that do not have one already
-
-// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
-// found in the type's own namespace (our own operator is used) so that we have
-// a means to know that our operator was used
-struct no_operator { };
-
-// this class allows implicit conversions and makes the following operator
-// definition less-preferred than any other such operators that might be found
-// via argument-dependent name lookup
-struct any { template <class T> any(T const&); };
-
-// when operator BOOST_TT_TRAIT_OP is not available, this one is used
-no_operator operator BOOST_TT_TRAIT_OP (const any&, int);
-
-
-// 3. checks if the operator returns void or not
-// conditions: Lhs!=void
-
-// we first redefine "operator," so that we have no compilation error if
-// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
-// (lhs BOOST_TT_TRAIT_OP, returns_void_t()) to deduce if
-// operator BOOST_TT_TRAIT_OP returns void or not:
-// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns returns_void_t
-// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns int
-struct returns_void_t { };
-template <typename T> int operator,(const T&, returns_void_t);
-template <typename T> int operator,(const volatile T&, returns_void_t);
-
-// this intermediate trait has member value of type bool:
-// - value==true -> operator BOOST_TT_TRAIT_OP returns void
-// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
-template < typename Lhs >
-struct operator_returns_void {
- // overloads of function returns_void make the difference
- // yes_type and no_type have different size by construction
- static ::boost::type_traits::yes_type returns_void(returns_void_t);
- static ::boost::type_traits::no_type returns_void(int);
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP,returns_void_t())))));
-};
-
-
-// 4. checks if the return type is Ret or Ret==dont_care
-// conditions: Lhs!=void
-
-struct dont_care { };
-
-template < typename Lhs, typename Ret, bool Returns_void >
-struct operator_returns_Ret;
-
-template < typename Lhs >
-struct operator_returns_Ret < Lhs, dont_care, true > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Lhs >
-struct operator_returns_Ret < Lhs, dont_care, false > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Lhs >
-struct operator_returns_Ret < Lhs, void, true > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Lhs >
-struct operator_returns_Ret < Lhs, void, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template < typename Lhs, typename Ret >
-struct operator_returns_Ret < Lhs, Ret, true > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-// otherwise checks if it is convertible to Ret using the sizeof trick
-// based on overload resolution
-// condition: Ret!=void and Ret!=dont_care and the operator does not return void
-template < typename Lhs, typename Ret >
-struct operator_returns_Ret < Lhs, Ret, false > {
- static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
- static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
-
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() BOOST_TT_TRAIT_OP))==sizeof(::boost::type_traits::yes_type)));
-};
-
-
-// 5. checks for operator existence
-// condition: Lhs!=void
-
-// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
-// existing one;
-// this is done with redefinition of "operator," that returns no_operator or has_operator
-struct has_operator { };
-no_operator operator,(no_operator, has_operator);
-
-template < typename Lhs >
-struct operator_exists {
- static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists
- static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise
-
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make<Lhs>() BOOST_TT_TRAIT_OP),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
-};
-
-
-// 6. main trait: to avoid any compilation error, this class behaves
-// differently when operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the
-// standard.
-// Forbidden_if is a bool that is:
-// - true when the operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the standard
-// (would yield compilation error if used)
-// - false otherwise
-template < typename Lhs, typename Ret, bool Forbidden_if >
-struct trait_impl1;
-
-template < typename Lhs, typename Ret >
-struct trait_impl1 < Lhs, Ret, true > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template < typename Lhs, typename Ret >
-struct trait_impl1 < Lhs, Ret, false > {
- BOOST_STATIC_CONSTANT(bool,
- value = (operator_exists < Lhs >::value && operator_returns_Ret < Lhs, Ret, operator_returns_void < Lhs >::value >::value));
-};
-
-// specialization needs to be declared for the special void case
-template < typename Ret >
-struct trait_impl1 < void, Ret, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-// defines some typedef for convenience
-template < typename Lhs, typename Ret >
-struct trait_impl {
- typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
- typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
- typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
- BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
-};
-
-} // namespace impl
-} // namespace detail
-
-// this is the accessible definition of the trait to end user
-template <class Lhs, class Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care>
-struct BOOST_TT_TRAIT_NAME : public integral_constant<bool, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _impl)::trait_impl< Lhs, Ret >::value)>{};
-
-} // namespace boost
-
-#if defined(BOOST_MSVC)
-# pragma warning ( pop )
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/has_prefix_operator.hpp b/src/third_party/boost-1.68.0/boost/type_traits/detail/has_prefix_operator.hpp
deleted file mode 100644
index a246c60300b..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/has_prefix_operator.hpp
+++ /dev/null
@@ -1,208 +0,0 @@
-// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#include <boost/config.hpp>
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_fundamental.hpp>
-#include <boost/type_traits/is_integral.hpp>
-#include <boost/type_traits/is_pointer.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/is_void.hpp>
-#include <boost/type_traits/remove_cv.hpp>
-#include <boost/type_traits/remove_pointer.hpp>
-#include <boost/type_traits/remove_reference.hpp>
-
-// cannot include this header without getting warnings of the kind:
-// gcc:
-// warning: value computed is not used
-// warning: comparison between signed and unsigned integer expressions
-// msvc:
-// warning C4146: unary minus operator applied to unsigned type, result still unsigned
-// warning C4804: '-' : unsafe use of type 'bool' in operation
-// cannot find another implementation -> declared as system header to suppress these warnings.
-#if defined(__GNUC__)
-# pragma GCC system_header
-#elif defined(BOOST_MSVC)
-# pragma warning ( push )
-# pragma warning ( disable : 4146 4804 4913 4244 4800)
-# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-# pragma warning ( disable : 6334)
-# endif
-# if BOOST_WORKAROUND(_MSC_VER, >= 1913)
-# pragma warning ( disable : 4834)
-# endif
-#endif
-
-
-
-namespace boost {
-namespace detail {
-
-// This namespace ensures that argument-dependent name lookup does not mess things up.
-namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
-
-// 1. a function to have an instance of type T without requiring T to be default
-// constructible
-template <typename T> T &make();
-
-
-// 2. we provide our operator definition for types that do not have one already
-
-// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
-// found in the type's own namespace (our own operator is used) so that we have
-// a means to know that our operator was used
-struct no_operator { };
-
-// this class allows implicit conversions and makes the following operator
-// definition less-preferred than any other such operators that might be found
-// via argument-dependent name lookup
-struct any { template <class T> any(T const&); };
-
-// when operator BOOST_TT_TRAIT_OP is not available, this one is used
-no_operator operator BOOST_TT_TRAIT_OP (const any&);
-
-
-// 3. checks if the operator returns void or not
-// conditions: Rhs!=void
-
-// we first redefine "operator," so that we have no compilation error if
-// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
-// (BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
-// operator BOOST_TT_TRAIT_OP returns void or not:
-// - operator BOOST_TT_TRAIT_OP returns void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
-// - operator BOOST_TT_TRAIT_OP returns !=void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
-struct returns_void_t { };
-template <typename T> int operator,(const T&, returns_void_t);
-template <typename T> int operator,(const volatile T&, returns_void_t);
-
-// this intermediate trait has member value of type bool:
-// - value==true -> operator BOOST_TT_TRAIT_OP returns void
-// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
-template < typename Rhs >
-struct operator_returns_void {
- // overloads of function returns_void make the difference
- // yes_type and no_type have different size by construction
- static ::boost::type_traits::yes_type returns_void(returns_void_t);
- static ::boost::type_traits::no_type returns_void(int);
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
-};
-
-
-// 4. checks if the return type is Ret or Ret==dont_care
-// conditions: Rhs!=void
-
-struct dont_care { };
-
-template < typename Rhs, typename Ret, bool Returns_void >
-struct operator_returns_Ret;
-
-template < typename Rhs >
-struct operator_returns_Ret < Rhs, dont_care, true > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Rhs >
-struct operator_returns_Ret < Rhs, dont_care, false > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Rhs >
-struct operator_returns_Ret < Rhs, void, true > {
- BOOST_STATIC_CONSTANT(bool, value = true);
-};
-
-template < typename Rhs >
-struct operator_returns_Ret < Rhs, void, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template < typename Rhs, typename Ret >
-struct operator_returns_Ret < Rhs, Ret, true > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-// otherwise checks if it is convertible to Ret using the sizeof trick
-// based on overload resolution
-// condition: Ret!=void and Ret!=dont_care and the operator does not return void
-template < typename Rhs, typename Ret >
-struct operator_returns_Ret < Rhs, Ret, false > {
- static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
- static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
-
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
-};
-
-
-// 5. checks for operator existence
-// condition: Rhs!=void
-
-// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
-// existing one;
-// this is done with redefinition of "operator," that returns no_operator or has_operator
-struct has_operator { };
-no_operator operator,(no_operator, has_operator);
-
-template < typename Rhs >
-struct operator_exists {
- static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists
- static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise
-
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
-};
-
-
-// 6. main trait: to avoid any compilation error, this class behaves
-// differently when operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the
-// standard.
-// Forbidden_if is a bool that is:
-// - true when the operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the standard
-// (would yield compilation error if used)
-// - false otherwise
-template < typename Rhs, typename Ret, bool Forbidden_if >
-struct trait_impl1;
-
-template < typename Rhs, typename Ret >
-struct trait_impl1 < Rhs, Ret, true > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template < typename Rhs, typename Ret >
-struct trait_impl1 < Rhs, Ret, false > {
- BOOST_STATIC_CONSTANT(bool,
- value = (operator_exists < Rhs >::value && operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value));
-};
-
-// specialization needs to be declared for the special void case
-template < typename Ret >
-struct trait_impl1 < void, Ret, false > {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-// defines some typedef for convenience
-template < typename Rhs, typename Ret >
-struct trait_impl {
- typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
- typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
- typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Rhs_noref>::type >::type >::type Rhs_noptr;
- BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
-};
-
-} // namespace impl
-} // namespace detail
-
-// this is the accessible definition of the trait to end user
-template <class Rhs, class Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care>
-struct BOOST_TT_TRAIT_NAME : public integral_constant<bool, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _impl)::trait_impl < Rhs, Ret >::value)>{};
-
-} // namespace boost
-
-#if defined(BOOST_MSVC)
-# pragma warning ( pop )
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_likely_lambda.hpp b/src/third_party/boost-1.68.0/boost/type_traits/detail/is_likely_lambda.hpp
deleted file mode 100644
index 6da8acafce6..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_likely_lambda.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-/* Copyright 2017 Joaquin M Lopez Munoz.
- * Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- *
- * See http://www.boost.org/libs/poly_collection for library home page.
- */
-
-#ifndef BOOST_TT_DETAIL_IS_LIKELY_STATELESS_LAMBDA_HPP
-#define BOOST_TT_DETAIL_IS_LIKELY_STATELESS_LAMBDA_HPP
-
-#if defined(_MSC_VER)
-#pragma once
-#endif
-
-#include <boost/type_traits/detail/config.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-
-#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
-//
-// We don't need or use this, just define a dummy class:
-//
-namespace boost{ namespace type_traits_detail{
-
-template<typename T>
-struct is_likely_stateless_lambda : public false_type {};
-
-}}
-
-#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
-
-#include <boost/type_traits/is_convertible.hpp>
-#include <boost/core/enable_if.hpp>
-
-namespace boost{
-
-namespace type_traits_detail{
-
-/* Stateless lambda expressions have one (and only one) call operator and are
- * convertible to a function pointer with the same signature. Non-lambda types
- * could satisfy this too, hence the "likely" qualifier.
- */
-
-template<typename T>
-struct has_one_operator_call_helper
-{
- template<typename Q> static boost::true_type test(decltype(&Q::operator())*);
- template<typename> static boost::false_type test(...);
-
- using type=decltype(test<T>(nullptr));
-};
-
-template<typename T>
-using has_one_operator_call=typename has_one_operator_call_helper<T>::type;
-
-template<typename T>
-struct equivalent_function_pointer
-{
- template<typename Q,typename R,typename... Args>
- static auto helper(R (Q::*)(Args...)const)->R(*)(Args...);
- template<typename Q,typename R,typename... Args>
- static auto helper(R (Q::*)(Args...))->R(*)(Args...);
-
- using type=decltype(helper(&T::operator()));
-};
-
-template<typename T,typename=void>
-struct is_likely_stateless_lambda : false_type{};
-
-template<typename T>
-struct is_likely_stateless_lambda<
- T,
- typename boost::enable_if_c<has_one_operator_call<T>::value>::type> :
- boost::is_convertible<T, typename equivalent_function_pointer<T>::type
->{};
-
-} /* namespace type_traits_detail */
-
-} /* namespace boost */
-
-#else
- //
- // Can't implement this:
- //
-namespace boost {
- namespace type_traits_detail {
-
- template<typename T>
- struct is_likely_stateless_lambda : public boost::integral_constant<bool, false> {};
-}}
-
-#endif
-#endif
-
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_dereference.hpp b/src/third_party/boost-1.68.0/boost/type_traits/has_dereference.hpp
deleted file mode 100644
index 1e514cdf411..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_dereference.hpp
+++ /dev/null
@@ -1,31 +0,0 @@
-// (C) Copyright 2009-2011 Frederic Bron.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED
-#define BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED
-
-#define BOOST_TT_TRAIT_NAME has_dereference
-#define BOOST_TT_TRAIT_OP *
-#define BOOST_TT_FORBIDDEN_IF\
- /* void* or fundamental */\
- (\
- (\
- ::boost::is_pointer< Rhs_noref >::value && \
- ::boost::is_void< Rhs_noptr >::value\
- ) || \
- ::boost::is_fundamental< Rhs_nocv >::value\
- )
-
-
-#include <boost/type_traits/detail/has_prefix_operator.hpp>
-
-#undef BOOST_TT_TRAIT_NAME
-#undef BOOST_TT_TRAIT_OP
-#undef BOOST_TT_FORBIDDEN_IF
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_post_decrement.hpp b/src/third_party/boost-1.68.0/boost/type_traits/has_post_decrement.hpp
deleted file mode 100644
index e3f98fff1cb..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_post_decrement.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// (C) Copyright 2009-2011 Frederic Bron.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED
-#define BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED
-
-#include <boost/type_traits/is_array.hpp>
-
-#define BOOST_TT_TRAIT_NAME has_post_decrement
-#define BOOST_TT_TRAIT_OP --
-#define BOOST_TT_FORBIDDEN_IF\
- (\
- /* bool */\
- ::boost::is_same< bool, Lhs_nocv >::value || \
- /* void* */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_void< Lhs_noptr >::value\
- ) || \
- /* (fundamental or pointer) and const */\
- (\
- ( \
- ::boost::is_fundamental< Lhs_nocv >::value || \
- ::boost::is_pointer< Lhs_noref >::value\
- ) && \
- ::boost::is_const< Lhs_noref >::value\
- )||\
- /* Arrays */ \
- ::boost::is_array<Lhs_noref>::value\
- )
-
-
-#include <boost/type_traits/detail/has_postfix_operator.hpp>
-
-#undef BOOST_TT_TRAIT_NAME
-#undef BOOST_TT_TRAIT_OP
-#undef BOOST_TT_FORBIDDEN_IF
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_post_increment.hpp b/src/third_party/boost-1.68.0/boost/type_traits/has_post_increment.hpp
deleted file mode 100644
index 3861a2bbde2..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_post_increment.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// (C) Copyright 2009-2011 Frederic Bron.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
-#define BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
-
-#include <boost/type_traits/is_array.hpp>
-
-#define BOOST_TT_TRAIT_NAME has_post_increment
-#define BOOST_TT_TRAIT_OP ++
-#define BOOST_TT_FORBIDDEN_IF\
- (\
- /* bool */\
- ::boost::is_same< bool, Lhs_nocv >::value || \
- /* void* */\
- (\
- ::boost::is_pointer< Lhs_noref >::value && \
- ::boost::is_void< Lhs_noptr >::value\
- ) || \
- /* (fundamental or pointer) and const */\
- (\
- ( \
- ::boost::is_fundamental< Lhs_nocv >::value || \
- ::boost::is_pointer< Lhs_noref >::value\
- ) && \
- ::boost::is_const< Lhs_noref >::value\
- )||\
- /* Arrays */ \
- ::boost::is_array<Lhs_noref>::value\
- )
-
-
-#include <boost/type_traits/detail/has_postfix_operator.hpp>
-
-#undef BOOST_TT_TRAIT_NAME
-#undef BOOST_TT_TRAIT_OP
-#undef BOOST_TT_FORBIDDEN_IF
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_pre_decrement.hpp b/src/third_party/boost-1.68.0/boost/type_traits/has_pre_decrement.hpp
deleted file mode 100644
index 7ef078329b2..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_pre_decrement.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// (C) Copyright 2009-2011 Frederic Bron.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
-#define BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
-
-#include <boost/type_traits/is_array.hpp>
-
-#define BOOST_TT_TRAIT_NAME has_pre_decrement
-#define BOOST_TT_TRAIT_OP --
-#define BOOST_TT_FORBIDDEN_IF\
- (\
- /* bool */\
- ::boost::is_same< bool, Rhs_nocv >::value || \
- /* void* */\
- (\
- ::boost::is_pointer< Rhs_noref >::value && \
- ::boost::is_void< Rhs_noptr >::value\
- ) || \
- /* (fundamental or pointer) and const */\
- (\
- ( \
- ::boost::is_fundamental< Rhs_nocv >::value || \
- ::boost::is_pointer< Rhs_noref >::value\
- ) && \
- ::boost::is_const< Rhs_noref >::value\
- )||\
- /* Arrays */ \
- ::boost::is_array<Rhs_noref>::value\
- )
-
-
-#include <boost/type_traits/detail/has_prefix_operator.hpp>
-
-#undef BOOST_TT_TRAIT_NAME
-#undef BOOST_TT_TRAIT_OP
-#undef BOOST_TT_FORBIDDEN_IF
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_pre_increment.hpp b/src/third_party/boost-1.68.0/boost/type_traits/has_pre_increment.hpp
deleted file mode 100644
index c4c973487c8..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_pre_increment.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// (C) Copyright 2009-2011 Frederic Bron.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED
-#define BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED
-
-#include <boost/type_traits/is_array.hpp>
-
-#define BOOST_TT_TRAIT_NAME has_pre_increment
-#define BOOST_TT_TRAIT_OP ++
-#define BOOST_TT_FORBIDDEN_IF\
- (\
- /* bool */\
- ::boost::is_same< bool, Rhs_nocv >::value || \
- /* void* */\
- (\
- ::boost::is_pointer< Rhs_noref >::value && \
- ::boost::is_void< Rhs_noptr >::value\
- ) || \
- /* (fundamental or pointer) and const */\
- (\
- ( \
- ::boost::is_fundamental< Rhs_nocv >::value || \
- ::boost::is_pointer< Rhs_noref >::value\
- ) && \
- ::boost::is_const< Rhs_noref >::value\
- )||\
- /* Arrays */ \
- ::boost::is_array<Rhs_noref>::value\
- )
-
-
-#include <boost/type_traits/detail/has_prefix_operator.hpp>
-
-#undef BOOST_TT_TRAIT_NAME
-#undef BOOST_TT_TRAIT_OP
-#undef BOOST_TT_FORBIDDEN_IF
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_move_assign.hpp b/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_move_assign.hpp
deleted file mode 100644
index 6d954ab669d..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_move_assign.hpp
+++ /dev/null
@@ -1,73 +0,0 @@
-
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// (C) Copyright Eric Friedman 2002-2003.
-// (C) Copyright Antony Polukhin 2013.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
-#define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
-
-#include <cstddef> // size_t
-#include <boost/type_traits/intrinsics.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-
-#if !defined(BOOST_HAS_TRIVIAL_MOVE_ASSIGN) || defined(BOOST_MSVC) || defined(BOOST_INTEL)
-#include <boost/type_traits/is_pod.hpp>
-#include <boost/type_traits/is_const.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#ifdef BOOST_MSVC
-#include <boost/type_traits/is_reference.hpp>
-#endif
-#endif
-
-#if defined(__GNUC__) || defined(__clang)
-#include <boost/type_traits/is_assignable.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#endif
-
-#ifdef __SUNPRO_CC
-#include <boost/type_traits/is_assignable.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#if __cplusplus >= 201103
-#define SOLARIS_EXTRA_CHECK && is_assignable<typename remove_const<T>::type&, typename remove_const<T>::type&&>::value
-#endif
-#endif
-
-#ifndef SOLARIS_EXTRA_CHECK
-#define SOLARIS_EXTRA_CHECK
-#endif
-
-namespace boost{
-
-template <typename T>
-struct has_trivial_move_assign : public integral_constant<bool,
-#ifdef BOOST_HAS_TRIVIAL_MOVE_ASSIGN
- BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T)
-#else
- ::boost::is_pod<T>::value && !::boost::is_const<T>::value && !::boost::is_volatile<T>::value SOLARIS_EXTRA_CHECK
-#endif
- > {};
-
-template <> struct has_trivial_move_assign<void> : public false_type{};
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-template <> struct has_trivial_move_assign<void const> : public false_type{};
-template <> struct has_trivial_move_assign<void const volatile> : public false_type{};
-template <> struct has_trivial_move_assign<void volatile> : public false_type{};
-#endif
-template <class T> struct has_trivial_move_assign<T&> : public false_type{};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-template <class T> struct has_trivial_move_assign<T&&> : public false_type{};
-#endif
-// Array types are not assignable:
-template <class T, std::size_t N> struct has_trivial_move_assign<T[N]> : public false_type{};
-template <class T> struct has_trivial_move_assign<T[]> : public false_type{};
-
-} // namespace boost
-
-#undef SOLARIS_EXTRA_CHECK
-
-#endif // BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_move_constructor.hpp b/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_move_constructor.hpp
deleted file mode 100644
index 5784f4bbfff..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_move_constructor.hpp
+++ /dev/null
@@ -1,78 +0,0 @@
-
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// (C) Copyright Eric Friedman 2002-2003.
-// (C) Copyright Antony Polukhin 2013.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
-#define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
-
-#include <cstddef> // size_t
-#include <boost/type_traits/intrinsics.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-
-#ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR
-
-#if defined(BOOST_MSVC) || defined(BOOST_INTEL)
-#include <boost/type_traits/is_pod.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#endif
-
-#if defined(__GNUC__) || defined(__clang)
-#include <boost/type_traits/is_constructible.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-#endif
-
-
-namespace boost {
-
-template <typename T> struct has_trivial_move_constructor : public integral_constant<bool, BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)>{};
-
-#else
-
-#ifdef __SUNPRO_CC
-#include <boost/type_traits/is_constructible.hpp>
-#include <boost/type_traits/remove_const.hpp>
-#if __cplusplus >= 201103
-#define SOLARIS_EXTRA_CHECK && is_constructible<typename remove_const<T>::type, typename remove_const<T>::type&&>::value
-#endif
-#endif
-
-#ifndef SOLARIS_EXTRA_CHECK
-#define SOLARIS_EXTRA_CHECK
-#endif
-
-#include <boost/type_traits/is_pod.hpp>
-#include <boost/type_traits/is_volatile.hpp>
-
-namespace boost {
-
-template <typename T> struct has_trivial_move_constructor
- : public integral_constant<bool, ::boost::is_pod<T>::value && !::boost::is_volatile<T>::value SOLARIS_EXTRA_CHECK>{};
-
-#undef SOLARIS_EXTRA_CHECK
-
-#endif
-
-template <> struct has_trivial_move_constructor<void> : public false_type{};
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-template <> struct has_trivial_move_constructor<void const> : public false_type{};
-template <> struct has_trivial_move_constructor<void volatile> : public false_type{};
-template <> struct has_trivial_move_constructor<void const volatile> : public false_type{};
-#endif
-// What should we do with reference types??? The standard seems to suggest these are trivial, even if the thing they reference is not:
-template <class T> struct has_trivial_move_constructor<T&> : public true_type{};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-template <class T> struct has_trivial_move_constructor<T&&> : public true_type{};
-#endif
-// Arrays can not be explicitly copied:
-template <class T, std::size_t N> struct has_trivial_move_constructor<T[N]> : public false_type{};
-template <class T> struct has_trivial_move_constructor<T[]> : public false_type{};
-
-} // namespace boost
-
-#endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_copy_assignable.hpp b/src/third_party/boost-1.68.0/boost/type_traits/is_copy_assignable.hpp
deleted file mode 100644
index 76afdda5ddc..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_copy_assignable.hpp
+++ /dev/null
@@ -1,141 +0,0 @@
-// (C) Copyright Ion Gaztanaga 2014.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED
-#define BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/is_base_and_derived.hpp>
-#include <boost/noncopyable.hpp>
-
-#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \
- && !defined(BOOST_INTEL_CXX_VERSION) && \
- !(defined(BOOST_MSVC) && _MSC_VER == 1800)
-#define BOOST_TT_CXX11_IS_COPY_ASSIGNABLE
-#include <boost/type_traits/declval.hpp>
-#else
- //For compilers without decltype
- #include <boost/type_traits/is_const.hpp>
- #include <boost/type_traits/is_array.hpp>
- #include <boost/type_traits/add_reference.hpp>
- #include <boost/type_traits/remove_reference.hpp>
-#endif
-
-namespace boost {
-
-namespace detail{
-
-template <bool DerivedFromNoncopyable, class T>
-struct is_copy_assignable_impl2 {
-
-// Intel compiler has problems with SFINAE for copy constructors and deleted functions:
-//
-// error: function *function_name* cannot be referenced -- it is a deleted function
-// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval<T1&>()))* = 0);
-// ^
-//
-// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
-// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
-#if defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE)
- typedef boost::type_traits::yes_type yes_type;
- typedef boost::type_traits::no_type no_type;
-
- template <class U>
- static decltype(::boost::declval<U&>() = ::boost::declval<const U&>(), yes_type() ) test(int);
-
- template <class>
- static no_type test(...);
-
- static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
-
-#else
- static BOOST_DEDUCED_TYPENAME boost::add_reference<T>::type produce();
-
- template <class T1>
- static boost::type_traits::no_type test(T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0);
-
- static boost::type_traits::yes_type test(...);
- // If you see errors like this:
- //
- // `'T::operator=(const T&)' is private`
- // `boost/type_traits/is_copy_assignable.hpp:NN:M: error: within this context`
- //
- // then you are trying to call that macro for a structure defined like that:
- //
- // struct T {
- // ...
- // private:
- // T & operator=(const T &);
- // ...
- // };
- //
- // To fix that you must modify your structure:
- //
- // // C++03 and C++11 version
- // struct T: private boost::noncopyable {
- // ...
- // private:
- // T & operator=(const T &);
- // ...
- // };
- //
- // // C++11 version
- // struct T {
- // ...
- // private:
- // T& operator=(const T &) = delete;
- // ...
- // };
- BOOST_STATIC_CONSTANT(bool, value = (
- sizeof(test(produce())) == sizeof(boost::type_traits::yes_type)
- ));
- #endif
-};
-
-template <class T>
-struct is_copy_assignable_impl2<true, T> {
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-template <class T>
-struct is_copy_assignable_impl {
-
-#if !defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE)
- //For compilers without decltype, at least return false on const types, arrays
- //types derived from boost::noncopyable and types defined as BOOST_MOVEABLE_BUT_NOT_COPYABLE
- typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type unreferenced_t;
- BOOST_STATIC_CONSTANT(bool, value = (
- boost::detail::is_copy_assignable_impl2<
- boost::is_base_and_derived<boost::noncopyable, T>::value
- || boost::is_const<unreferenced_t>::value || boost::is_array<unreferenced_t>::value
- ,T
- >::value
- ));
- #else
- BOOST_STATIC_CONSTANT(bool, value = (
- boost::detail::is_copy_assignable_impl2<
- boost::is_base_and_derived<boost::noncopyable, T>::value,T
- >::value
- ));
- #endif
-};
-
-} // namespace detail
-
-template <class T> struct is_copy_assignable : public integral_constant<bool, ::boost::detail::is_copy_assignable_impl<T>::value>{};
-template <> struct is_copy_assignable<void> : public false_type{};
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-template <> struct is_copy_assignable<void const> : public false_type{};
-template <> struct is_copy_assignable<void const volatile> : public false_type{};
-template <> struct is_copy_assignable<void volatile> : public false_type{};
-#endif
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_copy_constructible.hpp b/src/third_party/boost-1.68.0/boost/type_traits/is_copy_constructible.hpp
deleted file mode 100644
index c68826431b0..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_copy_constructible.hpp
+++ /dev/null
@@ -1,187 +0,0 @@
-// (C) Copyright Antony Polukhin 2013.
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED
-#define BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40900)
-
-#include <boost/type_traits/is_constructible.hpp>
-
-#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1800)
-
-namespace boost {
-
-template <class T> struct is_copy_constructible : public boost::is_constructible<T, const T&>{};
-
-template <> struct is_copy_constructible<void> : public false_type{};
-template <> struct is_copy_constructible<void const> : public false_type{};
-template <> struct is_copy_constructible<void const volatile> : public false_type{};
-template <> struct is_copy_constructible<void volatile> : public false_type{};
-
-} // namespace boost
-
-#else
-//
-// Special version for VC12 which has a problem when a base class (such as non_copyable) has a deleted
-// copy constructor. In this case the compiler thinks there really is a copy-constructor and tries to
-// instantiate the deleted member. std::is_copy_constructible has the same issue (or at least returns
-// an incorrect value, which just defers the issue into the users code) as well. We can at least fix
-// boost::non_copyable as a base class as a special case:
-//
-#include <boost/type_traits/is_base_and_derived.hpp>
-#include <boost/noncopyable.hpp>
-
-namespace boost {
-
- namespace detail
- {
-
- template <class T, bool b> struct is_copy_constructible_imp : public boost::is_constructible<T, const T&>{};
- template <class T> struct is_copy_constructible_imp<T, true> : public false_type{};
-
- }
-
- template <class T> struct is_copy_constructible : public detail::is_copy_constructible_imp<T, is_base_and_derived<boost::noncopyable, T>::value>{};
-
- template <> struct is_copy_constructible<void> : public false_type{};
- template <> struct is_copy_constructible<void const> : public false_type{};
- template <> struct is_copy_constructible<void const volatile> : public false_type{};
- template <> struct is_copy_constructible<void volatile> : public false_type{};
-
-} // namespace boost
-
-#endif
-
-#else
-
-#include <boost/type_traits/detail/yes_no_type.hpp>
-#include <boost/type_traits/is_base_and_derived.hpp>
-#include <boost/type_traits/add_reference.hpp>
-#include <boost/type_traits/is_rvalue_reference.hpp>
-#include <boost/type_traits/declval.hpp>
-#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/declval.hpp>
-#include <boost/noncopyable.hpp>
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4181)
-#endif
-
-namespace boost {
-
- namespace detail{
-
- template <bool DerivedFromNoncopyable, class T>
- struct is_copy_constructible_impl2 {
-
- // Intel compiler has problems with SFINAE for copy constructors and deleted functions:
- //
- // error: function *function_name* cannot be referenced -- it is a deleted function
- // static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval<T1&>()))* = 0);
- // ^
- //
- // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
- // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
-#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) && !(defined(BOOST_MSVC) && _MSC_VER == 1800)
-
-#ifdef BOOST_NO_CXX11_DECLTYPE
- template <class T1>
- static boost::type_traits::yes_type test(const T1&, boost::mpl::int_<sizeof(T1(boost::declval<const T1&>()))>* = 0);
-#else
- template <class T1>
- static boost::type_traits::yes_type test(const T1&, decltype(T1(boost::declval<const T1&>()))* = 0);
-#endif
-
- static boost::type_traits::no_type test(...);
-#else
- template <class T1>
- static boost::type_traits::no_type test(const T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0);
- static boost::type_traits::yes_type test(...);
-#endif
-
- // If you see errors like this:
- //
- // `'T::T(const T&)' is private`
- // `boost/type_traits/is_copy_constructible.hpp:68:5: error: within this context`
- //
- // then you are trying to call that macro for a structure defined like that:
- //
- // struct T {
- // ...
- // private:
- // T(const T &);
- // ...
- // };
- //
- // To fix that you must modify your structure:
- //
- // // C++03 and C++11 version
- // struct T: private boost::noncopyable {
- // ...
- // private:
- // T(const T &);
- // ...
- // };
- //
- // // C++11 version
- // struct T {
- // ...
- // private:
- // T(const T &) = delete;
- // ...
- // };
- BOOST_STATIC_CONSTANT(bool, value = (
- sizeof(test(
- boost::declval<BOOST_DEDUCED_TYPENAME boost::add_reference<T const>::type>()
- )) == sizeof(boost::type_traits::yes_type)
- &&
- !boost::is_rvalue_reference<T>::value
- && !boost::is_array<T>::value
- ));
- };
-
- template <class T>
- struct is_copy_constructible_impl2<true, T> {
- BOOST_STATIC_CONSTANT(bool, value = false);
- };
-
- template <class T>
- struct is_copy_constructible_impl {
-
- BOOST_STATIC_CONSTANT(bool, value = (
- boost::detail::is_copy_constructible_impl2<
- boost::is_base_and_derived<boost::noncopyable, T>::value,
- T
- >::value
- ));
- };
-
- } // namespace detail
-
- template <class T> struct is_copy_constructible : public integral_constant<bool, ::boost::detail::is_copy_constructible_impl<T>::value>{};
- template <> struct is_copy_constructible<void> : public false_type{};
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
- template <> struct is_copy_constructible<void const> : public false_type{};
- template <> struct is_copy_constructible<void volatile> : public false_type{};
- template <> struct is_copy_constructible<void const volatile> : public false_type{};
-#endif
-
-} // namespace boost
-
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
-#endif
-
-#endif // BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_function.hpp b/src/third_party/boost-1.68.0/boost/type_traits/is_function.hpp
deleted file mode 100644
index f77c1f0469d..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_function.hpp
+++ /dev/null
@@ -1,102 +0,0 @@
-
-// Copyright 2000 John Maddock (john@johnmaddock.co.uk)
-// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
-//
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED
-#define BOOST_TT_IS_FUNCTION_HPP_INCLUDED
-
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/type_traits/detail/config.hpp>
-
-#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
-# include <boost/type_traits/detail/is_function_ptr_helper.hpp>
-#else
-# include <boost/type_traits/detail/is_function_ptr_tester.hpp>
-# include <boost/type_traits/detail/yes_no_type.hpp>
-#endif
-
-// is a type a function?
-// Please note that this implementation is unnecessarily complex:
-// we could just use !is_convertible<T*, const volatile void*>::value,
-// except that some compilers erroneously allow conversions from
-// function pointers to void*.
-
-namespace boost {
-
-#if !defined( __CODEGEARC__ )
-
-namespace detail {
-
-#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
-template<bool is_ref = true>
-struct is_function_chooser
-{
- template< typename T > struct result_
- : public false_type {};
-};
-
-template <>
-struct is_function_chooser<false>
-{
- template< typename T > struct result_
- : public ::boost::type_traits::is_function_ptr_helper<T*> {};
-};
-
-template <typename T>
-struct is_function_impl
- : public is_function_chooser< ::boost::is_reference<T>::value >
- ::BOOST_NESTED_TEMPLATE result_<T>
-{
-};
-
-#else
-
-template <typename T>
-struct is_function_impl
-{
-#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-#pragma warning(push)
-#pragma warning(disable:6334)
-#endif
- static T* t;
- BOOST_STATIC_CONSTANT(
- bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t))
- == sizeof(::boost::type_traits::yes_type)
- );
-#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-#pragma warning(pop)
-#endif
-};
-
-template <typename T>
-struct is_function_impl<T&> : public false_type
-{};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-template <typename T>
-struct is_function_impl<T&&> : public false_type
-{};
-#endif
-
-#endif
-
-} // namespace detail
-
-#endif // !defined( __CODEGEARC__ )
-
-#if defined( __CODEGEARC__ )
-template <class T> struct is_function : integral_constant<bool, __is_function(T)> {};
-#else
-template <class T> struct is_function : integral_constant<bool, ::boost::detail::is_function_impl<T>::value> {};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-template <class T> struct is_function<T&&> : public false_type {};
-#endif
-#endif
-} // namespace boost
-
-#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_member_function_pointer.hpp b/src/third_party/boost-1.68.0/boost/type_traits/is_member_function_pointer.hpp
deleted file mode 100644
index 223197f333e..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_member_function_pointer.hpp
+++ /dev/null
@@ -1,120 +0,0 @@
-
-// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
-// Hinnant & John Maddock 2000.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-
-#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
-#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
-
-#include <boost/type_traits/detail/config.hpp>
-#include <boost/detail/workaround.hpp>
-
-#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
- //
- // Note: we use the "workaround" version for MSVC because it works for
- // __stdcall etc function types, where as the partial specialisation
- // version does not do so.
- //
-# include <boost/type_traits/detail/is_mem_fun_pointer_impl.hpp>
-# include <boost/type_traits/remove_cv.hpp>
-# include <boost/type_traits/integral_constant.hpp>
-#else
-# include <boost/type_traits/is_reference.hpp>
-# include <boost/type_traits/is_array.hpp>
-# include <boost/type_traits/detail/yes_no_type.hpp>
-# include <boost/type_traits/detail/is_mem_fun_pointer_tester.hpp>
-#endif
-
-namespace boost {
-
-#if defined( __CODEGEARC__ )
-template <class T> struct is_member_function_pointer : public integral_constant<bool, __is_member_function_pointer( T )> {};
-#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
-
-template <class T> struct is_member_function_pointer
- : public ::boost::integral_constant<bool, ::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value>{};
-
-#else
-
-namespace detail {
-
-#ifndef __BORLANDC__
-
-template <bool>
-struct is_mem_fun_pointer_select
-{
- template <class T> struct result_ : public false_type{};
-};
-
-template <>
-struct is_mem_fun_pointer_select<false>
-{
- template <typename T> struct result_
- {
-#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-#pragma warning(push)
-#pragma warning(disable:6334)
-#endif
- static T* make_t;
- typedef result_<T> self_type;
-
- BOOST_STATIC_CONSTANT(
- bool, value = (
- 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t))
- ));
-#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
-#pragma warning(pop)
-#endif
- };
-};
-
-template <typename T>
-struct is_member_function_pointer_impl
- : public is_mem_fun_pointer_select<
- ::boost::is_reference<T>::value || ::boost::is_array<T>::value>::template result_<T>{};
-
-template <typename T>
-struct is_member_function_pointer_impl<T&> : public false_type{};
-
-#else // Borland C++
-
-template <typename T>
-struct is_member_function_pointer_impl
-{
- static T* m_t;
- BOOST_STATIC_CONSTANT(
- bool, value =
- (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) );
-};
-
-template <typename T>
-struct is_member_function_pointer_impl<T&>
-{
- BOOST_STATIC_CONSTANT(bool, value = false);
-};
-
-#endif
-
-template<> struct is_member_function_pointer_impl<void> : public false_type{};
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-template<> struct is_member_function_pointer_impl<void const> : public false_type{};
-template<> struct is_member_function_pointer_impl<void const volatile> : public false_type{};
-template<> struct is_member_function_pointer_impl<void volatile> : public false_type{};
-#endif
-
-} // namespace detail
-
-template <class T>
-struct is_member_function_pointer
- : public integral_constant<bool, ::boost::detail::is_member_function_pointer_impl<T>::value>{};
-
-#endif
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_move_assignable.hpp b/src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_move_assignable.hpp
deleted file mode 100644
index 5f63cb7be6b..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_move_assignable.hpp
+++ /dev/null
@@ -1,92 +0,0 @@
-
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// (C) Copyright Eric Friedman 2002-2003.
-// (C) Copyright Antony Polukhin 2013.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
-#define BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/type_traits/has_trivial_move_assign.hpp>
-#include <boost/type_traits/has_nothrow_assign.hpp>
-#include <boost/type_traits/is_array.hpp>
-#include <boost/type_traits/is_reference.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits/declval.hpp>
-#include <boost/type_traits/is_complete.hpp>
-#include <boost/static_assert.hpp>
-
-namespace boost {
-
-#ifdef BOOST_IS_NOTHROW_MOVE_ASSIGN
-
-template <class T>
-struct is_nothrow_move_assignable : public integral_constant<bool, BOOST_IS_NOTHROW_MOVE_ASSIGN(T)>
-{
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_assignable must be complete types");
-};
-template <class T> struct is_nothrow_move_assignable<T const> : public false_type{};
-template <class T> struct is_nothrow_move_assignable<T volatile> : public false_type{};
-template <class T> struct is_nothrow_move_assignable<T const volatile> : public false_type{};
-template <class T> struct is_nothrow_move_assignable<T&> : public false_type{};
-#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
-template <class T> struct is_nothrow_move_assignable<T&&> : public false_type{};
-#endif
-
-#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
-
-namespace detail{
-
-template <class T, class Enable = void>
-struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {};
-
-template <class T>
-struct false_or_cpp11_noexcept_move_assignable <
- T,
- typename ::boost::enable_if_c<sizeof(T) && BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>::type
- > : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>
-{};
-
-}
-
-template <class T>
-struct is_nothrow_move_assignable : public integral_constant<bool, ::boost::detail::false_or_cpp11_noexcept_move_assignable<T>::value>
-{
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_assignable must be complete types");
-};
-
-template <class T> struct is_nothrow_move_assignable<T const> : public ::boost::false_type {};
-template <class T> struct is_nothrow_move_assignable<T const volatile> : public ::boost::false_type{};
-template <class T> struct is_nothrow_move_assignable<T volatile> : public ::boost::false_type{};
-template <class T> struct is_nothrow_move_assignable<T&> : public ::boost::false_type{};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-template <class T> struct is_nothrow_move_assignable<T&&> : public ::boost::false_type{};
-#endif
-
-#else
-
-template <class T>
-struct is_nothrow_move_assignable : public integral_constant<bool,
- (::boost::has_trivial_move_assign<T>::value || ::boost::has_nothrow_assign<T>::value) && ! ::boost::is_array<T>::value>
-{
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_assignable must be complete types");
-};
-
-#endif
-
-
-template <> struct is_nothrow_move_assignable<void> : public false_type{};
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-template <> struct is_nothrow_move_assignable<void const> : public false_type{};
-template <> struct is_nothrow_move_assignable<void const volatile> : public false_type{};
-template <> struct is_nothrow_move_assignable<void volatile> : public false_type{};
-#endif
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_move_constructible.hpp b/src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_move_constructible.hpp
deleted file mode 100644
index 30b6a16ec84..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_move_constructible.hpp
+++ /dev/null
@@ -1,97 +0,0 @@
-
-// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
-// (C) Copyright Eric Friedman 2002-2003.
-// (C) Copyright Antony Polukhin 2013.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
-#define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
-
-#include <cstddef> // size_t
-#include <boost/config.hpp>
-#include <boost/type_traits/intrinsics.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/type_traits/is_complete.hpp>
-#include <boost/static_assert.hpp>
-
-#ifdef BOOST_IS_NOTHROW_MOVE_CONSTRUCT
-
-namespace boost {
-
-template <class T>
-struct is_nothrow_move_constructible : public integral_constant<bool, BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T)>
-{
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_constructible must be complete types");
-};
-
-template <class T> struct is_nothrow_move_constructible<volatile T> : public ::boost::false_type {};
-template <class T> struct is_nothrow_move_constructible<const volatile T> : public ::boost::false_type{};
-
-#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
-
-#include <boost/type_traits/declval.hpp>
-#include <boost/utility/enable_if.hpp>
-
-namespace boost{ namespace detail{
-
-template <class T, class Enable = void>
-struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {};
-
-template <class T>
-struct false_or_cpp11_noexcept_move_constructible <
- T,
- typename ::boost::enable_if_c<sizeof(T) && BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>::type
- > : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>
-{};
-
-}
-
-template <class T> struct is_nothrow_move_constructible
- : public integral_constant<bool, ::boost::detail::false_or_cpp11_noexcept_move_constructible<T>::value>
-{
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_constructible must be complete types");
-};
-
-template <class T> struct is_nothrow_move_constructible<volatile T> : public ::boost::false_type {};
-template <class T> struct is_nothrow_move_constructible<const volatile T> : public ::boost::false_type{};
-template <class T, std::size_t N> struct is_nothrow_move_constructible<T[N]> : public ::boost::false_type{};
-template <class T> struct is_nothrow_move_constructible<T[]> : public ::boost::false_type{};
-
-#else
-
-#include <boost/type_traits/has_trivial_move_constructor.hpp>
-#include <boost/type_traits/has_nothrow_copy.hpp>
-#include <boost/type_traits/is_array.hpp>
-
-namespace boost{
-
-template <class T>
-struct is_nothrow_move_constructible
- : public integral_constant<bool,
- (::boost::has_trivial_move_constructor<T>::value || ::boost::has_nothrow_copy<T>::value) && !::boost::is_array<T>::value>
-{
- BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_constructible must be complete types");
-};
-
-#endif
-
-template <> struct is_nothrow_move_constructible<void> : false_type{};
-#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
-template <> struct is_nothrow_move_constructible<void const> : false_type{};
-template <> struct is_nothrow_move_constructible<void volatile> : false_type{};
-template <> struct is_nothrow_move_constructible<void const volatile> : false_type{};
-#endif
-// References are always trivially constructible, even if the thing they reference is not:
-template <class T> struct is_nothrow_move_constructible<T&> : public ::boost::true_type{};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-template <class T> struct is_nothrow_move_constructible<T&&> : public ::boost::true_type{};
-#endif
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_rvalue_reference.hpp b/src/third_party/boost-1.68.0/boost/type_traits/is_rvalue_reference.hpp
deleted file mode 100644
index a48edb5140e..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_rvalue_reference.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-
-// (C) Copyright John Maddock 2010.
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED
-#define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED
-
-#include <boost/config.hpp>
-#include <boost/type_traits/integral_constant.hpp>
-
-namespace boost {
-
-template <class T> struct is_rvalue_reference : public false_type {};
-#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
-template <class T> struct is_rvalue_reference<T&&> : public true_type {};
-#endif
-
-} // namespace boost
-
-#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
-
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_virtual_base_of.hpp b/src/third_party/boost-1.68.0/boost/type_traits/is_virtual_base_of.hpp
deleted file mode 100644
index c3d7684ee79..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_virtual_base_of.hpp
+++ /dev/null
@@ -1,146 +0,0 @@
-// (C) Copyright Daniel Frey and Robert Ramey 2009.
-// (C) Copyright Balint Cserni 2017
-// Use, modification and distribution are subject to the Boost Software License,
-// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt).
-//
-// See http://www.boost.org/libs/type_traits for most recent version including documentation.
-
-#ifndef BOOST_TT_IS_VIRTUAL_BASE_OF_HPP_INCLUDED
-#define BOOST_TT_IS_VIRTUAL_BASE_OF_HPP_INCLUDED
-
-#include <boost/type_traits/is_base_of.hpp>
-#include <boost/type_traits/is_same.hpp>
-#include <boost/type_traits/make_void.hpp>
-#include <utility>
-
-namespace boost {
- namespace detail {
-
-
-#ifdef BOOST_MSVC
-#pragma warning( push )
-#pragma warning( disable : 4584 4250 4594)
-#elif defined(__GNUC__) && (__GNUC__ >= 4)
-#pragma GCC system_header
-#endif
-
-#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_CXX11_NULLPTR) && !BOOST_WORKAROUND(BOOST_GCC, < 40800)
-
- // Implementation based on the standard's rules of explicit type conversions.
- // A pointer to an object of *derived* class type may be explicitly converted to a pointer to an *unambiguous* *base* class type.
- // A pointer to an object of an *unambiguous* *non-virtual* *base* class type may be explicitly converted to a pointer of a *derived* class type.
- // Therefore Derived has a virtual base Base if and only if
- // (1) a Derived* can be converted to Base* (so the base class is unambiguous, which comes necessarily from virtual inheritance)
- // (2) a Base* cannot be converted to Derived* (so the base class is either ambiguous or virtual)
- // With both conditions true, Base must be a virtual base of Derived.
- // The "is_base_of" is only needed so the compiler can (but is not required to) error out if the types are incomplete.
- // This is in league with the the expected behaviour.
-
- template<class T, class U>
- constexpr bool is_virtual_base_impl(...) { return true; }
-
- // C-style casts have the power to ignore inheritance visibility while still act as a static_cast.
- // They can also fall back to the behaviour of reinterpret_cast, which allows is_virtual_base_of to work on non-class types too.
- // Note that because we are casting pointers there can be no user-defined operators to interfere.
- template<class T, class U,
- boost::void_t<decltype((U*)(std::declval<T*>()))>* =
- nullptr>
- constexpr bool is_virtual_base_impl(int) { return false; }
-
- } // namespace detail
-
- template<class T, class U>
- struct is_virtual_base_of : public
- boost::integral_constant<
- bool,
- boost::is_base_of<T, U>::value &&
- detail::is_virtual_base_impl<T, U>(0) &&
- !detail::is_virtual_base_impl<U, T>(0)
- > {};
-
-#else
-
- template<typename Base, typename Derived, typename tag>
- struct is_virtual_base_of_impl
- {
- BOOST_STATIC_CONSTANT(bool, value = false);
- };
-
- template<typename Base, typename Derived>
- struct is_virtual_base_of_impl<Base, Derived, true_type>
- {
- union max_align
- {
- unsigned u;
- unsigned long ul;
- void* v;
- double d;
- long double ld;
-#ifndef BOOST_NO_LONG_LONG
- long long ll;
-#endif
- };
-#ifdef __BORLANDC__
- struct boost_type_traits_internal_struct_X : public virtual Derived, public virtual Base
- {
- boost_type_traits_internal_struct_X();
- boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&);
- boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&);
- ~boost_type_traits_internal_struct_X()throw();
- max_align data[4];
- };
- struct boost_type_traits_internal_struct_Y : public virtual Derived
- {
- boost_type_traits_internal_struct_Y();
- boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&);
- boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&);
- ~boost_type_traits_internal_struct_Y()throw();
- max_align data[4];
- };
-#else
- struct boost_type_traits_internal_struct_X : public Derived, virtual Base
- {
- boost_type_traits_internal_struct_X();
- boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&);
- boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&);
- ~boost_type_traits_internal_struct_X()throw();
- max_align data[16];
- };
- struct boost_type_traits_internal_struct_Y : public Derived
- {
- boost_type_traits_internal_struct_Y();
- boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&);
- boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&);
- ~boost_type_traits_internal_struct_Y()throw();
- max_align data[16];
- };
-#endif
- BOOST_STATIC_CONSTANT(bool, value = (sizeof(boost_type_traits_internal_struct_X) == sizeof(boost_type_traits_internal_struct_Y)));
- };
-
- template<typename Base, typename Derived>
- struct is_virtual_base_of_impl2
- {
- typedef boost::integral_constant<bool, (boost::is_base_of<Base, Derived>::value && !boost::is_same<Base, Derived>::value)> tag_type;
- typedef is_virtual_base_of_impl<Base, Derived, tag_type> imp;
- BOOST_STATIC_CONSTANT(bool, value = imp::value);
- };
-
-#ifdef BOOST_MSVC
-#pragma warning( pop )
-#endif
-
-} // namespace detail
-
-template <class Base, class Derived> struct is_virtual_base_of : public integral_constant<bool, (::boost::detail::is_virtual_base_of_impl2<Base, Derived>::value)> {};
-
-#endif
-
-template <class Base, class Derived> struct is_virtual_base_of<Base&, Derived> : public false_type{};
-template <class Base, class Derived> struct is_virtual_base_of<Base, Derived&> : public false_type{};
-template <class Base, class Derived> struct is_virtual_base_of<Base&, Derived&> : public false_type{};
-
-} // namespace boost
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/make_void.hpp b/src/third_party/boost-1.68.0/boost/type_traits/make_void.hpp
deleted file mode 100644
index f48823b0595..00000000000
--- a/src/third_party/boost-1.68.0/boost/type_traits/make_void.hpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-Copyright 2017 Glen Joseph Fernandes
-<glenjofe -at- gmail.com>
-
-Distributed under the Boost Software License,
-Version 1.0. (See accompanying file LICENSE_1_0.txt
-or copy at http://www.boost.org/LICENSE_1_0.txt)
-*/
-
-#ifndef BOOST_TT_MAKE_VOID_HPP_INCLUDED
-#define BOOST_TT_MAKE_VOID_HPP_INCLUDED
-
-#include <boost/config.hpp>
-
-namespace boost {
-
-#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
-template<class...>
-struct make_void {
- typedef void type;
-};
-
-#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-template<class... Ts>
-using void_t = typename make_void<Ts...>::type;
-#endif
-
-#else /* BOOST_NO_CXX11_VARIADIC_TEMPLATES */
-
-template<class = void,
- class = void,
- class = void,
- class = void,
- class = void>
-struct make_void {
- typedef void type;
-};
-
-#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
-template<class A = void,
- class B = void,
- class C = void,
- class D = void,
- class E = void>
-using void_t = typename make_void<A, B, C, D, E>::type;
-#endif
-
-#endif
-
-} /* boost */
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/typeof/encode_decode.hpp b/src/third_party/boost-1.68.0/boost/typeof/encode_decode.hpp
deleted file mode 100644
index 5a13fd524a5..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/encode_decode.hpp
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (C) 2004 Arkadiy Vertleyb
-
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// boostinspect:nounnamed
-
-#ifndef BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
-#define BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
-
-#include <boost/mpl/deref.hpp>
-#include <boost/mpl/next.hpp>
-
-#ifndef BOOST_TYPEOF_SUPPRESS_UNNAMED_NAMESPACE
-
-# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace { namespace boost_typeof {
-# define BOOST_TYPEOF_END_ENCODE_NS }}
-# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost_typeof
-
-#else
-
-# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace boost { namespace type_of {
-# define BOOST_TYPEOF_END_ENCODE_NS }}
-# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost::type_of
-
-# define BOOST_TYPEOF_TEXT "unnamed namespace is off"
-# include <boost/typeof/message.hpp>
-
-#endif
-
-BOOST_TYPEOF_BEGIN_ENCODE_NS
-
-template<class V, class Type_Not_Registered_With_Typeof_System>
-struct encode_type_impl;
-
-template<class T, class Iter>
-struct decode_type_impl
-{
- typedef int type; // MSVC ETI workaround
-};
-
-template<class T>
-struct decode_nested_template_helper_impl;
-
-BOOST_TYPEOF_END_ENCODE_NS
-
-namespace boost { namespace type_of {
-
- template<class V, class T>
- struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T>
- {};
-
- template<class Iter>
- struct decode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::decode_type_impl<
- typename Iter::type,
- typename Iter::next
- >
- {};
-}}
-
-#endif//BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/encode_decode_params.hpp b/src/third_party/boost-1.68.0/boost/typeof/encode_decode_params.hpp
deleted file mode 100644
index 640bfdc2a65..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/encode_decode_params.hpp
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (C) 2005 Arkadiy Vertleyb
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
-#define BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-
-// Assumes iter0 contains initial iterator
-
-#define BOOST_TYPEOF_DECODE_PARAM(z, n, text) \
- typedef boost::type_of::decode_type<iter##n> decode##n; \
- typedef typename decode##n::type p##n; \
- typedef typename decode##n::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));
-
-#define BOOST_TYPEOF_DECODE_PARAMS(n)\
- BOOST_PP_REPEAT(n, BOOST_TYPEOF_DECODE_PARAM, ~)
-
-// The P0, P1, ... PN are encoded and added to V
-
-#define BOOST_TYPEOF_ENCODE_PARAMS_BEGIN(z, n, text)\
- typename boost::type_of::encode_type<
-
-#define BOOST_TYPEOF_ENCODE_PARAMS_END(z, n, text)\
- , BOOST_PP_CAT(P, n)>::type
-
-#define BOOST_TYPEOF_ENCODE_PARAMS(n, ID) \
- BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_BEGIN, ~) \
- typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type \
- BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_END, ~)
-
-#endif//BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/int_encoding.hpp b/src/third_party/boost-1.68.0/boost/typeof/int_encoding.hpp
deleted file mode 100644
index 482b7f6b189..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/int_encoding.hpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (C) 2004 Arkadiy Vertleyb
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_INT_ENCODING_HPP_INCLUDED
-#define BOOST_TYPEOF_INT_ENCODING_HPP_INCLUDED
-
-#include <boost/mpl/if.hpp>
-#include <boost/mpl/size_t.hpp>
-#include <boost/config.hpp>
-
-namespace boost { namespace type_of {
-
- template<class T> struct get_unsigned
- {
- typedef T type;
- };
- template<> struct get_unsigned<signed char>
- {
- typedef unsigned char type;
- };
- template<> struct get_unsigned<char>
- {
- typedef unsigned char type;
- };
- template<> struct get_unsigned<short>
- {
- typedef unsigned short type;
- };
- template<> struct get_unsigned<int>
- {
- typedef unsigned int type;
- };
- template<> struct get_unsigned<long>
- {
- typedef unsigned long type;
- };
-
- //////////////////////////
-
- template<std::size_t n, bool Overflow>
- struct pack
- {
- BOOST_STATIC_CONSTANT(std::size_t , value=((n + 1) * 2 + (Overflow ? 1 : 0)));
- };
-
- template<std::size_t m>
- struct unpack
- {
- BOOST_STATIC_CONSTANT(std::size_t, value = (m / 2) - 1);
- BOOST_STATIC_CONSTANT(std::size_t, overflow = (m % 2 == 1));
- };
-
- ////////////////////////////////
-
- template<class V, std::size_t n, bool overflow = (n >= 0x3fffffff)>
- struct encode_size_t : push_back<
- V,
- boost::mpl::size_t<pack<n, false>::value>
- >
- {};
-
- template<class V, std::size_t n>
- struct encode_size_t<V, n, true> : push_back<typename push_back<
- V,
- boost::mpl::size_t<pack<n % 0x3ffffffe, true>::value> >::type,
- boost::mpl::size_t<n / 0x3ffffffe>
- >
- {};
-
- template<class V, class T, T n>
- struct encode_integral : encode_size_t< V, (typename get_unsigned<T>::type)n,(((typename get_unsigned<T>::type)n)>=0x3fffffff) >
- {};
-
- template<class V, bool b>
- struct encode_integral<V, bool, b> : encode_size_t< V, b?1:0, false>
- {};
- ///////////////////////////
-
- template<std::size_t n, class Iter, bool overflow>
- struct decode_size_t;
-
- template<std::size_t n, class Iter>
- struct decode_size_t<n, Iter, false>
- {
- BOOST_STATIC_CONSTANT(std::size_t,value = n);
- typedef Iter iter;
- };
-
- template<std::size_t n, class Iter>
- struct decode_size_t<n, Iter, true>
- {
- BOOST_STATIC_CONSTANT(std::size_t,m = Iter::type::value);
-
- BOOST_STATIC_CONSTANT(std::size_t,value = (std::size_t)m * 0x3ffffffe + n);
- typedef typename Iter::next iter;
- };
-
- template<class T, class Iter>
- struct decode_integral
- {
- typedef decode_integral<T,Iter> self_t;
- BOOST_STATIC_CONSTANT(std::size_t,m = Iter::type::value);
-
- BOOST_STATIC_CONSTANT(std::size_t,n = unpack<m>::value);
-
- BOOST_STATIC_CONSTANT(std::size_t,overflow = unpack<m>::overflow);
-
- typedef typename Iter::next nextpos;
-
- static const T value = (T)(std::size_t)decode_size_t<n, nextpos, overflow>::value;
-
- typedef typename decode_size_t<self_t::n, nextpos, self_t::overflow>::iter iter;
- };
-
-}}//namespace
-
-#endif//BOOST_TYPEOF_INT_ENCODING_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/modifiers.hpp b/src/third_party/boost-1.68.0/boost/typeof/modifiers.hpp
deleted file mode 100644
index 630d0dc76f5..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/modifiers.hpp
+++ /dev/null
@@ -1,121 +0,0 @@
-// Copyright (C) 2004 Arkadiy Vertleyb
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
-#define BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
-
-#include <boost/typeof/encode_decode.hpp>
-#include <boost/preprocessor/facilities/identity.hpp>
-
-#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
-
-// modifiers
-
-#define BOOST_TYPEOF_modifier_support(ID, Fun)\
- template<class V, class T> struct encode_type_impl<V, Fun(T)>\
- {\
- typedef\
- typename boost::type_of::encode_type<\
- typename boost::type_of::push_back<\
- V\
- , boost::mpl::size_t<ID> >::type\
- , T>::type\
- type;\
- };\
- template<class Iter> struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
- {\
- typedef boost::type_of::decode_type<Iter> d1;\
- typedef Fun(typename d1::type) type;\
- typedef typename d1::iter iter;\
- }
-
-
-#define BOOST_TYPEOF_const_fun(T) const T
-#define BOOST_TYPEOF_volatile_fun(T) volatile T
-#define BOOST_TYPEOF_volatile_const_fun(T) volatile const T
-#define BOOST_TYPEOF_pointer_fun(T) T*
-#define BOOST_TYPEOF_reference_fun(T) T&
-
-#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
-//Borland incorrectly handles T const, T const volatile and T volatile.
-//It drops the decoration no matter what, so we need to try to handle T* const etc. without loosing the top modifier.
-#define BOOST_TYPEOF_const_pointer_fun(T) T const *
-#define BOOST_TYPEOF_const_reference_fun(T) T const &
-#define BOOST_TYPEOF_volatile_pointer_fun(T) T volatile*
-#define BOOST_TYPEOF_volatile_reference_fun(T) T volatile&
-#define BOOST_TYPEOF_volatile_const_pointer_fun(T) T volatile const *
-#define BOOST_TYPEOF_volatile_const_reference_fun(T) T volatile const &
-#endif
-
-BOOST_TYPEOF_BEGIN_ENCODE_NS
-
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_const_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_pointer_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_reference_fun);
-
-#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_pointer_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_reference_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_pointer_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_reference_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_const_pointer_fun);
-BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_const_reference_fun);
-#endif
-
-BOOST_TYPEOF_END_ENCODE_NS
-
-#undef BOOST_TYPEOF_modifier_support
-#undef BOOST_TYPEOF_const_fun
-#undef BOOST_TYPEOF_volatile_fun
-#undef BOOST_TYPEOF_volatile_const_fun
-#undef BOOST_TYPEOF_pointer_fun
-#undef BOOST_TYPEOF_reference_fun
-
-#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
-#undef BOOST_TYPEOF_const_pointer_fun
-#undef BOOST_TYPEOF_const_reference_fun
-#undef BOOST_TYPEOF_volatile_pointer_fun
-#undef BOOST_TYPEOF_volatile_reference_fun
-#undef BOOST_TYPEOF_volatile_const_pointer_fun
-#undef BOOST_TYPEOF_volatile_const_reference_fun
-#endif
-
-// arrays
-
-#define BOOST_TYPEOF_array_support(ID, Qualifier)\
- template<class V, class T, int N>\
- struct encode_type_impl<V, Qualifier() T[N]>\
- {\
- typedef\
- typename boost::type_of::encode_type<\
- typename boost::type_of::push_back<\
- typename boost::type_of::push_back<\
- V\
- , boost::mpl::size_t<ID> >::type\
- , boost::mpl::size_t<N> >::type\
- , T>::type\
- type;\
- };\
- template<class Iter>\
- struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
- {\
- enum{n = Iter::type::value};\
- typedef boost::type_of::decode_type<typename Iter::next> d;\
- typedef typename d::type Qualifier() type[n];\
- typedef typename d::iter iter;\
- }
-
-BOOST_TYPEOF_BEGIN_ENCODE_NS
-
-BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_EMPTY);
-BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(const));
-BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(volatile));
-BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(volatile const));
-BOOST_TYPEOF_END_ENCODE_NS
-
-#undef BOOST_TYPEOF_array_support
-
-#endif//BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/msvc/typeof_impl.hpp b/src/third_party/boost-1.68.0/boost/typeof/msvc/typeof_impl.hpp
deleted file mode 100644
index 3071efb7497..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/msvc/typeof_impl.hpp
+++ /dev/null
@@ -1,203 +0,0 @@
-
-// Copyright (C) 2005 Igor Chesnokov, mailto:ichesnokov@gmail.com (VC 6.5,VC 7.1 + counter code)
-// Copyright (C) 2005-2007 Peder Holt (VC 7.0 + framework)
-// Copyright (C) 2006 Steven Watanabe (VC 8.0)
-
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
-# define BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
-
-# include <boost/config.hpp>
-# include <boost/detail/workaround.hpp>
-# include <boost/mpl/int.hpp>
-# include <boost/type_traits/is_function.hpp>
-# include <boost/utility/enable_if.hpp>
-
-# include <typeinfo>
-
-namespace boost
-{
- namespace type_of
- {
-
- //Compile time constant code
-# if defined(_MSC_EXTENSIONS)
- template<int N> struct the_counter;
-
- template<typename T,int N = 5/*for similarity*/>
- struct encode_counter
- {
- __if_exists(the_counter<N + 256>)
- {
- BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 257>::count));
- }
- __if_not_exists(the_counter<N + 256>)
- {
- __if_exists(the_counter<N + 64>)
- {
- BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 65>::count));
- }
- __if_not_exists(the_counter<N + 64>)
- {
- __if_exists(the_counter<N + 16>)
- {
- BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 17>::count));
- }
- __if_not_exists(the_counter<N + 16>)
- {
- __if_exists(the_counter<N + 4>)
- {
- BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 5>::count));
- }
- __if_not_exists(the_counter<N + 4>)
- {
- __if_exists(the_counter<N>)
- {
- BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 1>::count));
- }
- __if_not_exists(the_counter<N>)
- {
- BOOST_STATIC_CONSTANT(unsigned,count=N);
- typedef the_counter<N> type;
- }
- }
- }
- }
- }
- };
-
-# define BOOST_TYPEOF_INDEX(T) (encode_counter<T>::count)
-# define BOOST_TYPEOF_NEXT_INDEX(next)
-# else
- template<int N> struct encode_counter : encode_counter<N - 1> {};
- template<> struct encode_counter<0> {};
-
- //Need to default to a larger value than 4, as due to MSVC's ETI errors. (sizeof(int)==4)
- char (*encode_index(...))[5];
-
-# define BOOST_TYPEOF_INDEX(T) (sizeof(*boost::type_of::encode_index((boost::type_of::encode_counter<1005>*)0)))
-# define BOOST_TYPEOF_NEXT_INDEX(next) friend char (*encode_index(encode_counter<next>*))[next];
-# endif
-
- //Typeof code
-
-# if BOOST_WORKAROUND(BOOST_MSVC,>=1400)
- struct msvc_extract_type_default_param {};
-
- template<typename ID, typename T = msvc_extract_type_default_param>
- struct msvc_extract_type;
-
- template<typename ID>
- struct msvc_extract_type<ID, msvc_extract_type_default_param> {
- template<bool>
- struct id2type_impl;
-
- typedef id2type_impl<true> id2type;
- };
-
- template<typename ID, typename T>
- struct msvc_extract_type : msvc_extract_type<ID,msvc_extract_type_default_param>
- {
- template<>
- struct id2type_impl<true> //VC8.0 specific bugfeature
- {
- typedef T type;
- };
- template<bool>
- struct id2type_impl;
-
- typedef id2type_impl<true> id2type;
- };
-
- template<typename T, typename ID>
- struct msvc_register_type : msvc_extract_type<ID, T>
- {
- };
-# else
- template<typename ID>
- struct msvc_extract_type
- {
- struct id2type;
- };
-
- template<typename T, typename ID>
- struct msvc_register_type : msvc_extract_type<ID>
- {
- typedef msvc_extract_type<ID> base_type;
- struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature
- {
- typedef T type;
- };
- };
-# endif
-
- template<int ID>
- struct msvc_typeid_wrapper {
- typedef typename msvc_extract_type<mpl::int_<ID> >::id2type id2type;
- typedef typename id2type::type type;
- };
- //Workaround for ETI-bug for VC6 and VC7
- template<>
- struct msvc_typeid_wrapper<1> {
- typedef msvc_typeid_wrapper<1> type;
- };
- //Workaround for ETI-bug for VC7.1
- template<>
- struct msvc_typeid_wrapper<4> {
- typedef msvc_typeid_wrapper<4> type;
- };
-
- //Tie it all together
- template<typename T>
- struct encode_type
- {
- //Get the next available compile time constants index
- BOOST_STATIC_CONSTANT(unsigned,value=BOOST_TYPEOF_INDEX(T));
- //Instantiate the template
- typedef typename msvc_register_type<T,mpl::int_<value> >::id2type type;
- //Set the next compile time constants index
- BOOST_STATIC_CONSTANT(unsigned,next=value+1);
- //Increment the compile time constant (only needed when extensions are not active
- BOOST_TYPEOF_NEXT_INDEX(next);
- };
-
- template<class T>
- struct sizer
- {
- typedef char(*type)[encode_type<T>::value];
- };
- template<typename T> typename disable_if<
- typename is_function<T>::type,
- typename sizer<T>::type>::type encode_start(T const&);
-
- template<typename T> typename enable_if<
- typename is_function<T>::type,
- typename sizer<T>::type>::type encode_start(T&);
- template<typename Organizer, typename T>
- msvc_register_type<T,Organizer> typeof_register_type(const T&,Organizer* =0);
-
-# define BOOST_TYPEOF(expr) \
- boost::type_of::msvc_typeid_wrapper<sizeof(*boost::type_of::encode_start(expr))>::type
-
-# define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr)
-
-# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
- struct name {\
- enum {_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(expr))};\
- typedef typename boost::type_of::msvc_extract_type<name>::id2type id2type;\
- typedef typename id2type::type type;\
- };
-
-# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
- struct name {\
- enum {_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(expr))};\
- typedef boost::type_of::msvc_extract_type<name>::id2type id2type;\
- typedef id2type::type type;\
- };
-
- }
-}
-
-#endif//BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/native.hpp b/src/third_party/boost-1.68.0/boost/typeof/native.hpp
deleted file mode 100644
index 8197e28669d..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/native.hpp
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (C) 2006 Arkadiy Vertleyb
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_NATIVE_HPP_INCLUDED
-#define BOOST_TYPEOF_NATIVE_HPP_INCLUDED
-
-#ifndef MSVC_TYPEOF_HACK
-
-#ifdef BOOST_NO_SFINAE
-
-namespace boost { namespace type_of {
-
- template<class T>
- T& ensure_obj(const T&);
-
-}}
-
-#else
-
-#include <boost/type_traits/is_function.hpp>
-#include <boost/utility/enable_if.hpp>
-
-namespace boost { namespace type_of {
-# ifdef BOOST_NO_SFINAE
- template<class T>
- T& ensure_obj(const T&);
-# else
- template<typename T>
- typename enable_if<is_function<T>, T&>::type
- ensure_obj(T&);
-
- template<typename T>
- typename disable_if<is_function<T>, T&>::type
- ensure_obj(const T&);
-# endif
-}}
-
-#endif//BOOST_NO_SFINAE
-
-#define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr))
-#define BOOST_TYPEOF_TPL BOOST_TYPEOF
-
-#define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
- struct name {\
- typedef BOOST_TYPEOF_TPL(expr) type;\
- };
-
-#define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
- struct name {\
- typedef BOOST_TYPEOF(expr) type;\
- };
-
-#endif//MSVC_TYPEOF_HACK
-
-#define BOOST_TYPEOF_REGISTER_TYPE(x)
-#define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
-
-#endif//BOOST_TYPEOF_NATIVE_HPP_INCLUDED
-
diff --git a/src/third_party/boost-1.68.0/boost/typeof/pointers_data_members.hpp b/src/third_party/boost-1.68.0/boost/typeof/pointers_data_members.hpp
deleted file mode 100644
index 2b47e97a976..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/pointers_data_members.hpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright (C) 2004 Arkadiy Vertleyb
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
-#define BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
-
-#include <boost/typeof/encode_decode_params.hpp>
-#include <boost/typeof/encode_decode.hpp>
-
-#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
-
-BOOST_TYPEOF_BEGIN_ENCODE_NS
-
-enum {PTR_DATA_MEM_ID = BOOST_TYPEOF_UNIQUE_ID()};
-
-template<class V, class P0, class P1>
-struct encode_type_impl<V, P0 P1::*>
-{
- typedef BOOST_TYPEOF_ENCODE_PARAMS(2, PTR_DATA_MEM_ID) type;
-};
-
-template<class Iter>
-struct decode_type_impl<boost::mpl::size_t<PTR_DATA_MEM_ID>, Iter>
-{
- typedef Iter iter0;
- BOOST_TYPEOF_DECODE_PARAMS(2)
-
- template<class T> struct workaround{
- typedef p0 T::* type;
- };
- typedef typename decode_type_impl<boost::mpl::size_t<PTR_DATA_MEM_ID>, Iter>::template workaround<p1>::type type;
- typedef iter2 iter;
-};
-
-BOOST_TYPEOF_END_ENCODE_NS
-
-#endif//BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/register_functions_iterate.hpp b/src/third_party/boost-1.68.0/boost/typeof/register_functions_iterate.hpp
deleted file mode 100644
index aaa43f39af1..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/register_functions_iterate.hpp
+++ /dev/null
@@ -1,135 +0,0 @@
-// Copyright (C) 2004 Arkadiy Vertleyb
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/typeof/encode_decode_params.hpp>
-
-#define n BOOST_PP_ITERATION()
-
-// function pointers
-
-template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
-struct encode_type_impl<V, R(*)(BOOST_PP_ENUM_PARAMS(n, P))>
-{
- typedef R BOOST_PP_CAT(P, n);
- typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_PTR_ID + n) type;
-};
-
-template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
-struct encode_type_impl<V, R(*)(BOOST_PP_ENUM_PARAMS(n, P) ...)>
-{
- typedef R BOOST_PP_CAT(P, n);
- typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_VAR_PTR_ID + n) type;
-};
-
-template<class Iter>
-struct decode_type_impl<boost::mpl::size_t<FUN_PTR_ID + n>, Iter>
-{
- typedef Iter iter0;
- BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
- typedef BOOST_PP_CAT(p, n)(*type)(BOOST_PP_ENUM_PARAMS(n, p));
- typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
-};
-
-template<class Iter>
-struct decode_type_impl<boost::mpl::size_t<FUN_VAR_PTR_ID + n>, Iter>
-{
- typedef Iter iter0;
- BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
- typedef BOOST_PP_CAT(p, n)(*type)(BOOST_PP_ENUM_PARAMS(n, p) ...);
- typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
-};
-
-#ifndef BOOST_TYPEOF_NO_FUNCTION_TYPES
-
- // function references
-
- template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
- struct encode_type_impl<V, R(&)(BOOST_PP_ENUM_PARAMS(n, P))>
- {
- typedef R BOOST_PP_CAT(P, n);
- typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_REF_ID + n) type;
- };
-
- template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
- struct encode_type_impl<V, R(&)(BOOST_PP_ENUM_PARAMS(n, P) ...)>
- {
- typedef R BOOST_PP_CAT(P, n);
- typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_VAR_REF_ID + n) type;
- };
-
- template<class Iter>
- struct decode_type_impl<boost::mpl::size_t<FUN_REF_ID + n>, Iter>
- {
- typedef Iter iter0;
- BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
- typedef BOOST_PP_CAT(p, n)(&type)(BOOST_PP_ENUM_PARAMS(n, p));
- typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
- };
-
- template<class Iter>
- struct decode_type_impl<boost::mpl::size_t<FUN_VAR_REF_ID + n>, Iter>
- {
- typedef Iter iter0;
- BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
- typedef BOOST_PP_CAT(p, n)(&type)(BOOST_PP_ENUM_PARAMS(n, p) ...);
- typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
- };
-
- // functions
-
- template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
- struct encode_type_impl<V, R(BOOST_PP_ENUM_PARAMS(n, P))>
- {
- typedef R BOOST_PP_CAT(P, n);
- typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_ID + n) type;
- };
-
- template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
- struct encode_type_impl<V, R(BOOST_PP_ENUM_PARAMS(n, P) ...)>
- {
- typedef R BOOST_PP_CAT(P, n);
- typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_VAR_ID + n) type;
- };
-
- template<class Iter>
- struct decode_type_impl<boost::mpl::size_t<FUN_ID + n>, Iter>
- {
- typedef Iter iter0;
- BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
- typedef BOOST_PP_CAT(p, n)(type)(BOOST_PP_ENUM_PARAMS(n, p));
- typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
- };
-
- template<class Iter>
- struct decode_type_impl<boost::mpl::size_t<FUN_VAR_ID + n>, Iter>
- {
- typedef Iter iter0;
- BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
- typedef BOOST_PP_CAT(p, n)(type)(BOOST_PP_ENUM_PARAMS(n, p) ...);
- typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
- };
-
-#endif//BOOST_TYPEOF_NO_FUNCTION_TYPES
-
-#ifndef BOOST_TYPEOF_NO_MEMBER_FUNCTION_TYPES
-// member functions
-
-#define BOOST_TYPEOF_qualifier
-#define BOOST_TYPEOF_id MEM_FUN_ID
-#include <boost/typeof/register_mem_functions.hpp>
-
-#define BOOST_TYPEOF_qualifier const
-#define BOOST_TYPEOF_id CONST_MEM_FUN_ID
-#include <boost/typeof/register_mem_functions.hpp>
-
-#define BOOST_TYPEOF_qualifier volatile
-#define BOOST_TYPEOF_id VOLATILE_MEM_FUN_ID
-#include <boost/typeof/register_mem_functions.hpp>
-
-#define BOOST_TYPEOF_qualifier volatile const
-#define BOOST_TYPEOF_id VOLATILE_CONST_MEM_FUN_ID
-#include <boost/typeof/register_mem_functions.hpp>
-
-#undef n
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/typeof/register_mem_functions.hpp b/src/third_party/boost-1.68.0/boost/typeof/register_mem_functions.hpp
deleted file mode 100644
index 9cf9720b798..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/register_mem_functions.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (C) 2004 Arkadiy Vertleyb
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/typeof/encode_decode_params.hpp>
-
-// member functions
-
-template<class V, class T, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
-struct encode_type_impl<V, R(T::*)(BOOST_PP_ENUM_PARAMS(n, P)) BOOST_TYPEOF_qualifier>
-{
- typedef R BOOST_PP_CAT(P, n);
- typedef T BOOST_PP_CAT(P, BOOST_PP_INC(n));
- typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_ADD(n, 2), BOOST_TYPEOF_id + n) type;
-};
-
-template<class Iter>
-struct decode_type_impl<boost::mpl::size_t<BOOST_TYPEOF_id + n>, Iter>
-{
- typedef Iter iter0;
- BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_ADD(n, 2))
- template<class T> struct workaround{
- typedef BOOST_PP_CAT(p, n)(T::*type)(BOOST_PP_ENUM_PARAMS(n, p)) BOOST_TYPEOF_qualifier;
- };
- typedef typename workaround<BOOST_PP_CAT(p, BOOST_PP_INC(n))>::type type;
- typedef BOOST_PP_CAT(iter, BOOST_PP_ADD(n, 2)) iter;
-};
-
-// undef parameters
-
-#undef BOOST_TYPEOF_id
-#undef BOOST_TYPEOF_qualifier
diff --git a/src/third_party/boost-1.68.0/boost/typeof/template_encoding.hpp b/src/third_party/boost-1.68.0/boost/typeof/template_encoding.hpp
deleted file mode 100644
index bae7e89cf9c..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/template_encoding.hpp
+++ /dev/null
@@ -1,160 +0,0 @@
-// Copyright (C) 2004 Arkadiy Vertleyb
-// Copyright (C) 2005 Peder Holt
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
-#define BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
-
-#include <boost/preprocessor/cat.hpp>
-#include <boost/preprocessor/repetition/enum_trailing.hpp>
-#include <boost/preprocessor/control/iif.hpp>
-#include <boost/preprocessor/detail/is_unary.hpp>
-#include <boost/preprocessor/repetition/repeat.hpp>
-#include <boost/preprocessor/tuple/eat.hpp>
-#include <boost/preprocessor/seq/transform.hpp>
-#include <boost/preprocessor/seq/for_each_i.hpp>
-#include <boost/preprocessor/seq/cat.hpp>
-
-#include <boost/typeof/encode_decode.hpp>
-#include <boost/typeof/int_encoding.hpp>
-
-#include <boost/typeof/type_template_param.hpp>
-#include <boost/typeof/integral_template_param.hpp>
-#include <boost/typeof/template_template_param.hpp>
-
-#ifdef __BORLANDC__
-#define BOOST_TYPEOF_QUALIFY(P) self_t::P
-#else
-#define BOOST_TYPEOF_QUALIFY(P) P
-#endif
-// The template parameter description, entered by the user,
-// is converted into a polymorphic "object"
-// that is used to generate the code responsible for
-// encoding/decoding the parameter, etc.
-
-// make sure to cat the sequence first, and only then add the prefix.
-#define BOOST_TYPEOF_MAKE_OBJ(elem) BOOST_PP_CAT(\
- BOOST_TYPEOF_MAKE_OBJ,\
- BOOST_PP_SEQ_CAT((_) BOOST_TYPEOF_TO_SEQ(elem))\
- )
-
-#define BOOST_TYPEOF_TO_SEQ(tokens) BOOST_TYPEOF_ ## tokens ## _BOOST_TYPEOF
-
-// BOOST_TYPEOF_REGISTER_TEMPLATE
-
-#define BOOST_TYPEOF_REGISTER_TEMPLATE_EXPLICIT_ID(Name, Params, Id)\
- BOOST_TYPEOF_REGISTER_TEMPLATE_IMPL(\
- Name,\
- BOOST_TYPEOF_MAKE_OBJS(BOOST_TYPEOF_TOSEQ(Params)),\
- BOOST_PP_SEQ_SIZE(BOOST_TYPEOF_TOSEQ(Params)),\
- Id)
-
-#define BOOST_TYPEOF_REGISTER_TEMPLATE(Name, Params)\
- BOOST_TYPEOF_REGISTER_TEMPLATE_EXPLICIT_ID(Name, Params, BOOST_TYPEOF_UNIQUE_ID())
-
-#define BOOST_TYPEOF_OBJECT_MAKER(s, data, elem)\
- BOOST_TYPEOF_MAKE_OBJ(elem)
-
-#define BOOST_TYPEOF_MAKE_OBJS(Params)\
- BOOST_PP_SEQ_TRANSFORM(BOOST_TYPEOF_OBJECT_MAKER, ~, Params)
-
-// As suggested by Paul Mensonides:
-
-#define BOOST_TYPEOF_TOSEQ(x)\
- BOOST_PP_IIF(\
- BOOST_PP_IS_UNARY(x),\
- x BOOST_PP_TUPLE_EAT(3), BOOST_PP_REPEAT\
- )(x, BOOST_TYPEOF_TOSEQ_2, ~)
-
-#define BOOST_TYPEOF_TOSEQ_2(z, n, _) (class)
-
-// BOOST_TYPEOF_VIRTUAL
-
-#define BOOST_TYPEOF_CAT_4(a, b, c, d) BOOST_TYPEOF_CAT_4_I(a, b, c, d)
-#define BOOST_TYPEOF_CAT_4_I(a, b, c, d) a ## b ## c ## d
-
-#define BOOST_TYPEOF_VIRTUAL(Fun, Obj)\
- BOOST_TYPEOF_CAT_4(BOOST_TYPEOF_, BOOST_PP_SEQ_HEAD(Obj), _, Fun)
-
-// BOOST_TYPEOF_SEQ_ENUM[_TRAILING][_1]
-// Two versions provided due to reentrancy issue
-
-#define BOOST_TYPEOF_SEQ_EXPAND_ELEMENT(z,n,seq)\
- BOOST_PP_SEQ_ELEM(0,seq) (z,n,BOOST_PP_SEQ_ELEM(n,BOOST_PP_SEQ_ELEM(1,seq)))
-
-#define BOOST_TYPEOF_SEQ_ENUM(seq,macro)\
- BOOST_PP_ENUM(BOOST_PP_SEQ_SIZE(seq),BOOST_TYPEOF_SEQ_EXPAND_ELEMENT,(macro)(seq))
-
-#define BOOST_TYPEOF_SEQ_ENUM_TRAILING(seq,macro)\
- BOOST_PP_ENUM_TRAILING(BOOST_PP_SEQ_SIZE(seq),BOOST_TYPEOF_SEQ_EXPAND_ELEMENT,(macro)(seq))
-
-#define BOOST_TYPEOF_SEQ_EXPAND_ELEMENT_1(z,n,seq)\
- BOOST_PP_SEQ_ELEM(0,seq) (z,n,BOOST_PP_SEQ_ELEM(n,BOOST_PP_SEQ_ELEM(1,seq)))
-
-#define BOOST_TYPEOF_SEQ_ENUM_1(seq,macro)\
- BOOST_PP_ENUM(BOOST_PP_SEQ_SIZE(seq),BOOST_TYPEOF_SEQ_EXPAND_ELEMENT_1,(macro)(seq))
-
-#define BOOST_TYPEOF_SEQ_ENUM_TRAILING_1(seq,macro)\
- BOOST_PP_ENUM_TRAILING(BOOST_PP_SEQ_SIZE(seq),BOOST_TYPEOF_SEQ_EXPAND_ELEMENT_1,(macro)(seq))
-
-//
-
-#define BOOST_TYPEOF_PLACEHOLDER(z, n, elem)\
- BOOST_TYPEOF_VIRTUAL(PLACEHOLDER, elem)(elem)
-
-#define BOOST_TYPEOF_PLACEHOLDER_TYPES(z, n, elem)\
- BOOST_TYPEOF_VIRTUAL(PLACEHOLDER_TYPES, elem)(elem, n)
-
-#define BOOST_TYPEOF_REGISTER_TEMPLATE_ENCODE_PARAM(r, data, n, elem)\
- BOOST_TYPEOF_VIRTUAL(ENCODE, elem)(elem, n)
-
-#define BOOST_TYPEOF_REGISTER_TEMPLATE_DECODE_PARAM(r, data, n, elem)\
- BOOST_TYPEOF_VIRTUAL(DECODE, elem)(elem, n)
-
-#define BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR(z, n, elem) \
- BOOST_TYPEOF_VIRTUAL(EXPANDTYPE, elem)(elem) BOOST_PP_CAT(P, n)
-
-#define BOOST_TYPEOF_REGISTER_DEFAULT_TEMPLATE_TYPE(Name,Params,ID)\
- Name< BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params), P) >
-
-//Since we are creating an internal decode struct, we need to use different template names, T instead of P.
-#define BOOST_TYPEOF_REGISTER_DECODER_TYPE_PARAM_PAIR(z,n,elem) \
- BOOST_TYPEOF_VIRTUAL(EXPANDTYPE, elem)(elem) BOOST_PP_CAT(T, n)
-
-//Default template param decoding
-
-#define BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TYPE(Name,Params)\
- typedef Name<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),BOOST_TYPEOF_QUALIFY(P))> type;
-
-//Branch the decoding
-#define BOOST_TYPEOF_TYPEDEF_DECODED_TYPE(Name,Params)\
- BOOST_PP_IF(BOOST_TYPEOF_HAS_TEMPLATES(Params),\
- BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TEMPLATE_TYPE,\
- BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TYPE)(Name,Params)
-
-#define BOOST_TYPEOF_REGISTER_TEMPLATE_IMPL(Name, Params, Size, ID)\
- BOOST_TYPEOF_BEGIN_ENCODE_NS\
- BOOST_TYPEOF_REGISTER_TEMPLATE_TEMPLATE_IMPL(Name, Params, ID)\
- template<class V\
- BOOST_TYPEOF_SEQ_ENUM_TRAILING(Params, BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR)\
- >\
- struct encode_type_impl<V, Name<BOOST_PP_ENUM_PARAMS(Size, P)> >\
- {\
- typedef typename boost::type_of::push_back<V, boost::mpl::size_t<ID> >::type V0;\
- BOOST_PP_SEQ_FOR_EACH_I(BOOST_TYPEOF_REGISTER_TEMPLATE_ENCODE_PARAM, ~, Params)\
- typedef BOOST_PP_CAT(V, Size) type;\
- };\
- template<class Iter>\
- struct decode_type_impl<boost::mpl::size_t<ID>, Iter>\
- {\
- typedef decode_type_impl<boost::mpl::size_t<ID>, Iter> self_t;\
- typedef boost::mpl::size_t<ID> self_id;\
- typedef Iter iter0;\
- BOOST_PP_SEQ_FOR_EACH_I(BOOST_TYPEOF_REGISTER_TEMPLATE_DECODE_PARAM, ~, Params)\
- BOOST_TYPEOF_TYPEDEF_DECODED_TYPE(Name, Params)\
- typedef BOOST_PP_CAT(iter, Size) iter;\
- };\
- BOOST_TYPEOF_END_ENCODE_NS
-
-#endif//BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/template_template_param.hpp b/src/third_party/boost-1.68.0/boost/typeof/template_template_param.hpp
deleted file mode 100644
index 4d641900520..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/template_template_param.hpp
+++ /dev/null
@@ -1,149 +0,0 @@
-// Copyright (C) 2005 Peder Holt
-// Copyright (C) 2005 Arkadiy Vertleyb
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
-#define BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
-
-#include <boost/preprocessor/logical/or.hpp>
-#include <boost/preprocessor/seq/fold_left.hpp>
-#include <boost/preprocessor/seq/enum.hpp>
-
-#define BOOST_TYPEOF_MAKE_OBJ_template(x) BOOST_TYPEOF_TEMPLATE_PARAM(x)
-#define BOOST_TYPEOF_TEMPLATE(X) template(X) BOOST_TYPEOF_EAT
-#define BOOST_TYPEOF_template(X) (template(X))
-
-#define BOOST_TYPEOF_TEMPLATE_PARAM(Params)\
- (TEMPLATE_PARAM)\
- (Params)
-
-#define BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(This)\
- BOOST_TYPEOF_TOSEQ(BOOST_PP_SEQ_ELEM(1, This))
-
-//Encode / decode this
-#define BOOST_TYPEOF_TEMPLATE_PARAM_ENCODE(This, n)\
- typedef typename boost::type_of::encode_template<BOOST_PP_CAT(V, n),\
- BOOST_PP_CAT(P, n)<BOOST_TYPEOF_SEQ_ENUM(BOOST_TYPEOF_MAKE_OBJS(BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(This)),BOOST_TYPEOF_PLACEHOLDER) >\
- >::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
-
-#define BOOST_TYPEOF_TEMPLATE_PARAM_DECODE(This, n)\
- typedef boost::type_of::decode_template< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
- typedef typename BOOST_PP_CAT(d, n)::type BOOST_PP_CAT(P, n);\
- typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter,BOOST_PP_INC(n));
-
-// template<class, unsigned int, ...> class
-#define BOOST_TYPEOF_TEMPLATE_PARAM_EXPANDTYPE(This) \
- template <BOOST_PP_SEQ_ENUM(BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(This)) > class
-
-#define BOOST_TYPEOF_TEMPLATE_PARAM_PLACEHOLDER(Param)\
- Nested_Template_Template_Arguments_Not_Supported
-
-//'template<class,int> class' is reduced to 'class'
-#define BOOST_TYPEOF_TEMPLATE_PARAM_DECLARATION_TYPE(Param) class
-
-// T3<int, (unsigned int)0, ...>
-#define BOOST_TYPEOF_TEMPLATE_PARAM_PLACEHOLDER_TYPES(Param, n)\
- BOOST_PP_CAT(T,n)<BOOST_TYPEOF_SEQ_ENUM_1(BOOST_TYPEOF_MAKE_OBJS(BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(Param)),BOOST_TYPEOF_PLACEHOLDER) >
-
-#define BOOST_TYPEOF_TEMPLATE_PARAM_ISTEMPLATE 1
-
-////////////////////////////
-// move to encode_decode?
-
-BOOST_TYPEOF_BEGIN_ENCODE_NS
-
-template<class V, class Type_Not_Registered_With_Typeof_System> struct encode_template_impl;
-template<class T, class Iter> struct decode_template_impl;
-
-BOOST_TYPEOF_END_ENCODE_NS
-
-namespace boost { namespace type_of {
-
- template<class V, class T> struct encode_template
- : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_template_impl<V, T>
- {};
-
- template<class Iter> struct decode_template
- : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::decode_template_impl<typename Iter::type, typename Iter::next>
- {};
-}}
-
-////////////////////////////
-// move to template_encoding.hpp?
-
-//Template template registration
-#define BOOST_TYPEOF_REGISTER_TYPE_FOR_TEMPLATE_TEMPLATE(Name,Params,ID)\
- template<class V\
- BOOST_TYPEOF_SEQ_ENUM_TRAILING(Params,BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR)\
- >\
- struct encode_template_impl<V,Name<\
- BOOST_PP_ENUM_PARAMS(\
- BOOST_PP_SEQ_SIZE(Params),\
- P)> >\
- : boost::type_of::push_back<V, boost::mpl::size_t<ID> >\
- {\
- };\
- template<class Iter> struct decode_template_impl<boost::mpl::size_t<ID>, Iter>\
- {\
- BOOST_PP_REPEAT(BOOST_PP_SEQ_SIZE(Params),BOOST_TYPEOF_TYPEDEF_INT_PN,_)\
- typedef Name<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_PLACEHOLDER) > type;\
- typedef Iter iter;\
- };
-
-#define BOOST_TYPEOF_TYPEDEF_INT_PN(z,n,Params) typedef int BOOST_PP_CAT(P,n);
-
-#ifdef __BORLANDC__
-#define BOOST_TYPEOF_DECODE_NESTED_TEMPLATE_HELPER_NAME BOOST_PP_CAT(\
- BOOST_PP_CAT(\
- BOOST_PP_CAT(\
- decode_nested_template_helper,\
- BOOST_TYPEOF_REGISTRATION_GROUP\
- ),0x10000\
- ),__LINE__\
- )
-#define BOOST_TYPEOF_REGISTER_DECODE_NESTED_TEMPLATE_HELPER_IMPL(Name,Params,ID)\
- struct BOOST_TYPEOF_DECODE_NESTED_TEMPLATE_HELPER_NAME {\
- template<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_REGISTER_DECLARE_DECODER_TYPE_PARAM_PAIR) >\
- struct decode_params;\
- template<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_REGISTER_DECODER_TYPE_PARAM_PAIR) >\
- struct decode_params<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_PLACEHOLDER_TYPES) >\
- {\
- typedef Name<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),T)> type;\
- };\
- };
-//Template template param decoding
-#define BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TEMPLATE_TYPE(Name,Params)\
- typedef typename BOOST_TYPEOF_DECODE_NESTED_TEMPLATE_HELPER_NAME::decode_params<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),P)>::type type;
-
-#else
-#define BOOST_TYPEOF_REGISTER_DECODE_NESTED_TEMPLATE_HELPER_IMPL(Name,Params,ID)
-
-//Template template param decoding
-#define BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TEMPLATE_TYPE(Name,Params)\
- template<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_REGISTER_DECLARE_DECODER_TYPE_PARAM_PAIR) >\
- struct decode_params;\
- template<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_REGISTER_DECODER_TYPE_PARAM_PAIR) >\
- struct decode_params<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_PLACEHOLDER_TYPES) >\
- {\
- typedef Name<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),T)> type;\
- };\
- typedef typename decode_params<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),P)>::type type;
-#endif
-#define BOOST_TYPEOF_REGISTER_DECLARE_DECODER_TYPE_PARAM_PAIR(z,n,elem) \
- BOOST_TYPEOF_VIRTUAL(DECLARATION_TYPE, elem)(elem) BOOST_PP_CAT(T, n)
-
-// BOOST_TYPEOF_HAS_TEMPLATES
-#define BOOST_TYPEOF_HAS_TEMPLATES(Params)\
- BOOST_PP_SEQ_FOLD_LEFT(BOOST_TYPEOF_HAS_TEMPLATES_OP, 0, Params)
-
-#define BOOST_TYPEOF_HAS_TEMPLATES_OP(s, state, elem)\
- BOOST_PP_OR(state, BOOST_TYPEOF_VIRTUAL(ISTEMPLATE, elem))
-
-//Define template template arguments
-#define BOOST_TYPEOF_REGISTER_TEMPLATE_TEMPLATE_IMPL(Name,Params,ID)\
- BOOST_PP_IF(BOOST_TYPEOF_HAS_TEMPLATES(Params),\
- BOOST_TYPEOF_REGISTER_DECODE_NESTED_TEMPLATE_HELPER_IMPL,\
- BOOST_TYPEOF_REGISTER_TYPE_FOR_TEMPLATE_TEMPLATE)(Name,Params,ID)
-
-#endif //BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/type_encoding.hpp b/src/third_party/boost-1.68.0/boost/typeof/type_encoding.hpp
deleted file mode 100644
index e0378c23350..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/type_encoding.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (C) 2004 Arkadiy Vertleyb
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
-#define BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
-
-#define BOOST_TYPEOF_REGISTER_TYPE_IMPL(T, Id) \
- \
- template<class V> struct encode_type_impl<V, T > \
- : boost::type_of::push_back<V, boost::mpl::size_t<Id> > \
- {}; \
- template<class Iter> struct decode_type_impl<boost::mpl::size_t<Id>, Iter> \
- { \
- typedef T type; \
- typedef Iter iter; \
- };
-
-#define BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, Id) \
- BOOST_TYPEOF_BEGIN_ENCODE_NS \
- BOOST_TYPEOF_REGISTER_TYPE_IMPL(Type, Id) \
- BOOST_TYPEOF_END_ENCODE_NS
-
-#define BOOST_TYPEOF_REGISTER_TYPE(Type) \
- BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, BOOST_TYPEOF_UNIQUE_ID())
-
-#endif//BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/typeof_impl.hpp b/src/third_party/boost-1.68.0/boost/typeof/typeof_impl.hpp
deleted file mode 100644
index d627b8505e1..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/typeof_impl.hpp
+++ /dev/null
@@ -1,186 +0,0 @@
-// Copyright (C) 2004, 2005 Arkadiy Vertleyb
-// Copyright (C) 2005 Peder Holt
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_TYPEOF_IMPL_HPP_INCLUDED
-#define BOOST_TYPEOF_TYPEOF_IMPL_HPP_INCLUDED
-
-#include <boost/mpl/size_t.hpp>
-#include <boost/preprocessor/repetition/enum.hpp>
-#include <boost/typeof/encode_decode.hpp>
-#include <boost/typeof/vector.hpp>
-#include <boost/type_traits/is_function.hpp>
-#include <boost/utility/enable_if.hpp>
-
-#define BOOST_TYPEOF_VECTOR(n) BOOST_PP_CAT(boost::type_of::vector, n)
-
-#define BOOST_TYPEOF_sizer_item(z, n, _)\
- char item ## n[V::item ## n ::value];
-
-namespace boost { namespace type_of {
- template<class V>
- struct sizer
- {
- // char item0[V::item0::value];
- // char item1[V::item1::value];
- // ...
-
- BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE, BOOST_TYPEOF_sizer_item, ~)
- };
-}}
-
-#undef BOOST_TYPEOF_sizer_item
-
-//
-namespace boost { namespace type_of {
-# ifdef BOOST_NO_SFINAE
- template<class V, class T>
- sizer<typename encode_type<V, T>::type> encode(const T&);
-# else
- template<class V, class T>
- typename enable_if<
- typename is_function<T>::type,
- sizer<typename encode_type<V, T>::type> >::type encode(T&);
-
- template<class V, class T>
- typename disable_if<
- typename is_function<T>::type,
- sizer<typename encode_type<V, T>::type> >::type encode(const T&);
-# endif
-}}
-//
-namespace boost { namespace type_of {
-
- template<class V>
- struct decode_begin
- {
- typedef typename decode_type<typename V::begin>::type type;
- };
-}}
-
-#define BOOST_TYPEOF_TYPEITEM(z, n, expr)\
- boost::mpl::size_t<sizeof(boost::type_of::encode<BOOST_TYPEOF_VECTOR(0)<> >(expr).item ## n)>
-
-#define BOOST_TYPEOF_ENCODED_VECTOR(Expr) \
- BOOST_TYPEOF_VECTOR(BOOST_TYPEOF_LIMIT_SIZE)< \
- BOOST_PP_ENUM(BOOST_TYPEOF_LIMIT_SIZE, BOOST_TYPEOF_TYPEITEM, Expr) \
- >
-
-#define BOOST_TYPEOF(Expr)\
- boost::type_of::decode_begin<BOOST_TYPEOF_ENCODED_VECTOR(Expr) >::type
-
-#define BOOST_TYPEOF_TPL typename BOOST_TYPEOF
-
-//offset_vector is used to delay the insertion of data into the vector in order to allow
-//encoding to be done in many steps
-namespace boost { namespace type_of {
- template<typename V,typename Offset>
- struct offset_vector {
- };
-
- template<class V,class Offset,class T>
- struct push_back<boost::type_of::offset_vector<V,Offset>,T> {
- typedef offset_vector<V,typename Offset::prior> type;
- };
-
- template<class V,class T>
- struct push_back<boost::type_of::offset_vector<V,mpl::size_t<0> >,T> {
- typedef typename push_back<V,T>::type type;
- };
-}}
-
-#define BOOST_TYPEOF_NESTED_TYPEITEM(z, n, expr)\
- BOOST_STATIC_CONSTANT(int,BOOST_PP_CAT(value,n) = sizeof(boost::type_of::encode<_typeof_start_vector>(expr).item ## n));\
- typedef boost::mpl::size_t<BOOST_PP_CAT(self_t::value,n)> BOOST_PP_CAT(item,n);
-
-#ifdef __DMC__
-#define BOOST_TYPEOF_NESTED_TYPEITEM_2(z,n,expr)\
- typedef typename _typeof_encode_fraction<iteration>::BOOST_PP_CAT(item,n) BOOST_PP_CAT(item,n);
-
-#define BOOST_TYPEOF_FRACTIONTYPE()\
- BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE,BOOST_TYPEOF_NESTED_TYPEITEM_2,_)\
- typedef _typeof_fraction_iter<Pos> fraction_type;
-#else
-#define BOOST_TYPEOF_FRACTIONTYPE()\
- typedef _typeof_encode_fraction<self_t::iteration> fraction_type;
-#endif
-
-#ifdef __BORLANDC__
-namespace boost { namespace type_of {
- template<typename Pos,typename Iter>
- struct generic_typeof_fraction_iter {
- typedef generic_typeof_fraction_iter<Pos,Iter> self_t;
- static const int pos=(Pos::value);
- static const int iteration=(pos/5);
- static const int where=pos%5;
- typedef typename Iter::template _apply_next<self_t::iteration>::type fraction_type;
- typedef generic_typeof_fraction_iter<typename Pos::next,Iter> next;
- typedef typename v_iter<fraction_type,mpl::int_<self_t::where> >::type type;
- };
-}}
-#define BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr) \
- template<int _Typeof_Iteration>\
- struct _typeof_encode_fraction {\
- typedef _typeof_encode_fraction<_Typeof_Iteration> self_t;\
- BOOST_STATIC_CONSTANT(int,_typeof_encode_offset = (_Typeof_Iteration*BOOST_TYPEOF_LIMIT_SIZE));\
- typedef boost::type_of::offset_vector<BOOST_TYPEOF_VECTOR(0)<>,boost::mpl::size_t<self_t::_typeof_encode_offset> > _typeof_start_vector;\
- BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE,BOOST_TYPEOF_NESTED_TYPEITEM,expr)\
- template<int Next>\
- struct _apply_next {\
- typedef _typeof_encode_fraction<Next> type;\
- };\
- };\
- template<typename Pos>\
- struct _typeof_fraction_iter {\
- typedef boost::type_of::generic_typeof_fraction_iter<Pos,_typeof_encode_fraction<0> > self_t;\
- typedef typename self_t::next next;\
- typedef typename self_t::type type;\
- };
-#else
-#define BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr) \
- template<int _Typeof_Iteration>\
- struct _typeof_encode_fraction {\
- typedef _typeof_encode_fraction<_Typeof_Iteration> self_t;\
- BOOST_STATIC_CONSTANT(int,_typeof_encode_offset = (_Typeof_Iteration*BOOST_TYPEOF_LIMIT_SIZE));\
- typedef boost::type_of::offset_vector<BOOST_TYPEOF_VECTOR(0)<>,boost::mpl::size_t<self_t::_typeof_encode_offset> > _typeof_start_vector;\
- BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE,BOOST_TYPEOF_NESTED_TYPEITEM,expr)\
- };\
- template<typename Pos>\
- struct _typeof_fraction_iter {\
- typedef _typeof_fraction_iter<Pos> self_t;\
- BOOST_STATIC_CONSTANT(int,pos=(Pos::value));\
- BOOST_STATIC_CONSTANT(int,iteration=(pos/BOOST_TYPEOF_LIMIT_SIZE));\
- BOOST_STATIC_CONSTANT(int,where=pos%BOOST_TYPEOF_LIMIT_SIZE);\
- BOOST_TYPEOF_FRACTIONTYPE()\
- typedef typename boost::type_of::v_iter<fraction_type,boost::mpl::int_<self_t::where> >::type type;\
- typedef _typeof_fraction_iter<typename Pos::next> next;\
- };
-#endif
-#ifdef __MWERKS__
-
-# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
-template<typename T>\
-struct BOOST_PP_CAT(_typeof_template_,name) {\
- BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
- typedef typename boost::type_of::decode_type<_typeof_fraction_iter<boost::mpl::size_t<0> > >::type type;\
-};\
-typedef BOOST_PP_CAT(_typeof_template_,name)<int> name;
-
-# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) BOOST_TYPEOF_NESTED_TYPEDEF(name,expr)
-
-#else
-# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
- struct name {\
- BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
- typedef typename boost::type_of::decode_type<_typeof_fraction_iter<boost::mpl::size_t<0> > >::type type;\
- };
-
-# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
- struct name {\
- BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
- typedef boost::type_of::decode_type<_typeof_fraction_iter<boost::mpl::size_t<0> > >::type type;\
- };
-#endif
-
-#endif//BOOST_TYPEOF_COMPLIANT_TYPEOF_IMPL_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/vector.hpp b/src/third_party/boost-1.68.0/boost/typeof/vector.hpp
deleted file mode 100644
index 7dc8d50f812..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/vector.hpp
+++ /dev/null
@@ -1,166 +0,0 @@
-// Copyright (C) 2005 Arkadiy Vertleyb
-// Copyright (C) 2005 Peder Holt
-//
-// Copyright (C) 2006 Tobias Schwinger
-//
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_TYPEOF_VECTOR_HPP_INCLUDED
-
-#include <boost/mpl/int.hpp>
-#include <boost/preprocessor/iteration/self.hpp>
-
-#ifndef BOOST_TYPEOF_LIMIT_SIZE
-# define BOOST_TYPEOF_LIMIT_SIZE 50
-#endif
-
-//
-// To recreate the preprocessed versions of this file preprocess and run
-//
-// $(BOOST_ROOT)/libs/typeof/tools/preprocess.pl
-//
-
-#if defined(BOOST_TYPEOF_PP_INCLUDE_EXTERNAL)
-
-# undef BOOST_TYPEOF_PP_INCLUDE_EXTERNAL
-
-#elif !defined(BOOST_TYPEOF_PREPROCESSING_MODE) && !BOOST_PP_IS_SELFISH
-
-# define BOOST_PP_INDIRECT_SELF <boost/typeof/vector.hpp>
-# if BOOST_TYPEOF_LIMIT_SIZE < 50
-# include BOOST_PP_INCLUDE_SELF()
-# elif BOOST_TYPEOF_LIMIT_SIZE < 100
-# include <boost/typeof/vector50.hpp>
-# define BOOST_TYPEOF_PP_START_SIZE 51
-# include BOOST_PP_INCLUDE_SELF()
-# elif BOOST_TYPEOF_LIMIT_SIZE < 150
-# include <boost/typeof/vector100.hpp>
-# define BOOST_TYPEOF_PP_START_SIZE 101
-# include BOOST_PP_INCLUDE_SELF()
-# elif BOOST_TYPEOF_LIMIT_SIZE < 200
-# include <boost/typeof/vector150.hpp>
-# define BOOST_TYPEOF_PP_START_SIZE 151
-# include BOOST_PP_INCLUDE_SELF()
-# elif BOOST_TYPEOF_LIMIT_SIZE <= 250
-# include <boost/typeof/vector200.hpp>
-# define BOOST_TYPEOF_PP_START_SIZE 201
-# include BOOST_PP_INCLUDE_SELF()
-# else
-# error "BOOST_TYPEOF_LIMIT_SIZE too high"
-# endif
-
-#else// defined(BOOST_TYPEOF_PREPROCESSING_MODE) || BOOST_PP_IS_SELFISH
-
-# ifndef BOOST_TYPEOF_PP_NEXT_SIZE
-# define BOOST_TYPEOF_PP_NEXT_SIZE BOOST_TYPEOF_LIMIT_SIZE
-# endif
-# ifndef BOOST_TYPEOF_PP_START_SIZE
-# define BOOST_TYPEOF_PP_START_SIZE 0
-# endif
-
-# if BOOST_TYPEOF_PP_START_SIZE <= BOOST_TYPEOF_LIMIT_SIZE
-
-# include <boost/preprocessor/enum_params.hpp>
-# include <boost/preprocessor/repeat.hpp>
-# include <boost/preprocessor/repeat_from_to.hpp>
-# include <boost/preprocessor/cat.hpp>
-# include <boost/preprocessor/inc.hpp>
-# include <boost/preprocessor/dec.hpp>
-# include <boost/preprocessor/comma_if.hpp>
-# include <boost/preprocessor/iteration/local.hpp>
-# include <boost/preprocessor/control/expr_iif.hpp>
-# include <boost/preprocessor/logical/not.hpp>
-
-// iterator
-
-# define BOOST_TYPEOF_spec_iter(n)\
- template<class V>\
- struct v_iter<V, mpl::int_<n> >\
- {\
- typedef typename V::item ## n type;\
- typedef v_iter<V, mpl::int_<n + 1> > next;\
- };
-
-namespace boost { namespace type_of {
-
- template<class V, class Increase_BOOST_TYPEOF_LIMIT_SIZE> struct v_iter; // not defined
-# define BOOST_PP_LOCAL_MACRO BOOST_TYPEOF_spec_iter
-# define BOOST_PP_LOCAL_LIMITS \
- (BOOST_PP_DEC(BOOST_TYPEOF_PP_START_SIZE), \
- BOOST_PP_DEC(BOOST_TYPEOF_LIMIT_SIZE))
-# include BOOST_PP_LOCAL_ITERATE()
-
-}}
-
-# undef BOOST_TYPEOF_spec_iter
-
-// vector
-
-# define BOOST_TYPEOF_typedef_item(z, n, _)\
- typedef P ## n item ## n;
-
-# define BOOST_TYPEOF_typedef_fake_item(z, n, _)\
- typedef mpl::int_<1> item ## n;
-
-# define BOOST_TYPEOF_define_vector(n)\
- template<BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IIF(BOOST_PP_NOT(n), class T = void)>\
- struct vector ## n\
- {\
- typedef v_iter<vector ## n<BOOST_PP_ENUM_PARAMS(n,P)>, boost::mpl::int_<0> > begin;\
- BOOST_PP_REPEAT(n, BOOST_TYPEOF_typedef_item, ~)\
- BOOST_PP_REPEAT_FROM_TO(n, BOOST_TYPEOF_PP_NEXT_SIZE, BOOST_TYPEOF_typedef_fake_item, ~)\
- };
-
-namespace boost { namespace type_of {
-
-# define BOOST_PP_LOCAL_MACRO BOOST_TYPEOF_define_vector
-# define BOOST_PP_LOCAL_LIMITS \
- (BOOST_TYPEOF_PP_START_SIZE,BOOST_TYPEOF_LIMIT_SIZE)
-# include BOOST_PP_LOCAL_ITERATE()
-
-}}
-
-# undef BOOST_TYPEOF_typedef_item
-# undef BOOST_TYPEOF_typedef_fake_item
-# undef BOOST_TYPEOF_define_vector
-
-// push_back
-
-# define BOOST_TYPEOF_spec_push_back(n)\
- template<BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_COMMA_IF(n) class T>\
- struct push_back<BOOST_PP_CAT(boost::type_of::vector, n)<BOOST_PP_ENUM_PARAMS(n, P)>, T>\
- {\
- typedef BOOST_PP_CAT(boost::type_of::vector, BOOST_PP_INC(n))<\
- BOOST_PP_ENUM_PARAMS(n, P) BOOST_PP_COMMA_IF(n) T\
- > type;\
- };
-
-namespace boost { namespace type_of {
-
-# if BOOST_TYPEOF_LIMIT_SIZE < 50
- template<class V, class T> struct push_back {
- typedef V type;
- };
-# endif
- //default behaviour is to let push_back ignore T, and return the input vector.
- //This is to let BOOST_TYPEOF_NESTED_TYPEDEF work properly with the default vector.
-# define BOOST_PP_LOCAL_MACRO BOOST_TYPEOF_spec_push_back
-# define BOOST_PP_LOCAL_LIMITS \
- (BOOST_PP_DEC(BOOST_TYPEOF_PP_START_SIZE), \
- BOOST_PP_DEC(BOOST_TYPEOF_LIMIT_SIZE))
-# include BOOST_PP_LOCAL_ITERATE()
-
-}}
-
-# undef BOOST_TYPEOF_spec_push_back
-
-# endif//BOOST_TYPEOF_PP_START_SIZE<=BOOST_TYPEOF_LIMIT_SIZE
-# undef BOOST_TYPEOF_PP_START_SIZE
-# undef BOOST_TYPEOF_PP_NEXT_SIZE
-
-#endif//BOOST_TYPEOF_PREPROCESSING_MODE || BOOST_PP_IS_SELFISH
-
-#define BOOST_TYPEOF_VECTOR_HPP_INCLUDED
-#endif//BOOST_TYPEOF_VECTOR_HPP_INCLUDED
-
diff --git a/src/third_party/boost-1.68.0/boost/typeof/vector50.hpp b/src/third_party/boost-1.68.0/boost/typeof/vector50.hpp
deleted file mode 100644
index d3beaff513b..00000000000
--- a/src/third_party/boost-1.68.0/boost/typeof/vector50.hpp
+++ /dev/null
@@ -1,171 +0,0 @@
-
-// Copyright (C) 2005 Arkadiy Vertleyb
-// Copyright (C) 2005 Peder Holt
-//
-// Use modification and distribution are subject to the boost Software License,
-// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
-
-// Preprocessed code, do not edit manually !
-
-
-namespace boost { namespace type_of {
- template<class V, class Increase_BOOST_TYPEOF_LIMIT_SIZE> struct v_iter;
- template<class V> struct v_iter<V, mpl::int_<0> > { typedef typename V::item0 type; typedef v_iter<V, mpl::int_<0 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<1> > { typedef typename V::item1 type; typedef v_iter<V, mpl::int_<1 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<2> > { typedef typename V::item2 type; typedef v_iter<V, mpl::int_<2 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<3> > { typedef typename V::item3 type; typedef v_iter<V, mpl::int_<3 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<4> > { typedef typename V::item4 type; typedef v_iter<V, mpl::int_<4 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<5> > { typedef typename V::item5 type; typedef v_iter<V, mpl::int_<5 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<6> > { typedef typename V::item6 type; typedef v_iter<V, mpl::int_<6 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<7> > { typedef typename V::item7 type; typedef v_iter<V, mpl::int_<7 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<8> > { typedef typename V::item8 type; typedef v_iter<V, mpl::int_<8 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<9> > { typedef typename V::item9 type; typedef v_iter<V, mpl::int_<9 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<10> > { typedef typename V::item10 type; typedef v_iter<V, mpl::int_<10 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<11> > { typedef typename V::item11 type; typedef v_iter<V, mpl::int_<11 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<12> > { typedef typename V::item12 type; typedef v_iter<V, mpl::int_<12 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<13> > { typedef typename V::item13 type; typedef v_iter<V, mpl::int_<13 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<14> > { typedef typename V::item14 type; typedef v_iter<V, mpl::int_<14 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<15> > { typedef typename V::item15 type; typedef v_iter<V, mpl::int_<15 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<16> > { typedef typename V::item16 type; typedef v_iter<V, mpl::int_<16 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<17> > { typedef typename V::item17 type; typedef v_iter<V, mpl::int_<17 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<18> > { typedef typename V::item18 type; typedef v_iter<V, mpl::int_<18 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<19> > { typedef typename V::item19 type; typedef v_iter<V, mpl::int_<19 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<20> > { typedef typename V::item20 type; typedef v_iter<V, mpl::int_<20 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<21> > { typedef typename V::item21 type; typedef v_iter<V, mpl::int_<21 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<22> > { typedef typename V::item22 type; typedef v_iter<V, mpl::int_<22 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<23> > { typedef typename V::item23 type; typedef v_iter<V, mpl::int_<23 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<24> > { typedef typename V::item24 type; typedef v_iter<V, mpl::int_<24 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<25> > { typedef typename V::item25 type; typedef v_iter<V, mpl::int_<25 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<26> > { typedef typename V::item26 type; typedef v_iter<V, mpl::int_<26 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<27> > { typedef typename V::item27 type; typedef v_iter<V, mpl::int_<27 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<28> > { typedef typename V::item28 type; typedef v_iter<V, mpl::int_<28 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<29> > { typedef typename V::item29 type; typedef v_iter<V, mpl::int_<29 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<30> > { typedef typename V::item30 type; typedef v_iter<V, mpl::int_<30 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<31> > { typedef typename V::item31 type; typedef v_iter<V, mpl::int_<31 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<32> > { typedef typename V::item32 type; typedef v_iter<V, mpl::int_<32 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<33> > { typedef typename V::item33 type; typedef v_iter<V, mpl::int_<33 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<34> > { typedef typename V::item34 type; typedef v_iter<V, mpl::int_<34 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<35> > { typedef typename V::item35 type; typedef v_iter<V, mpl::int_<35 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<36> > { typedef typename V::item36 type; typedef v_iter<V, mpl::int_<36 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<37> > { typedef typename V::item37 type; typedef v_iter<V, mpl::int_<37 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<38> > { typedef typename V::item38 type; typedef v_iter<V, mpl::int_<38 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<39> > { typedef typename V::item39 type; typedef v_iter<V, mpl::int_<39 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<40> > { typedef typename V::item40 type; typedef v_iter<V, mpl::int_<40 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<41> > { typedef typename V::item41 type; typedef v_iter<V, mpl::int_<41 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<42> > { typedef typename V::item42 type; typedef v_iter<V, mpl::int_<42 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<43> > { typedef typename V::item43 type; typedef v_iter<V, mpl::int_<43 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<44> > { typedef typename V::item44 type; typedef v_iter<V, mpl::int_<44 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<45> > { typedef typename V::item45 type; typedef v_iter<V, mpl::int_<45 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<46> > { typedef typename V::item46 type; typedef v_iter<V, mpl::int_<46 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<47> > { typedef typename V::item47 type; typedef v_iter<V, mpl::int_<47 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<48> > { typedef typename V::item48 type; typedef v_iter<V, mpl::int_<48 + 1> > next; };
- template<class V> struct v_iter<V, mpl::int_<49> > { typedef typename V::item49 type; typedef v_iter<V, mpl::int_<49 + 1> > next; };
-}}
-namespace boost { namespace type_of {
- template< class T = void> struct vector0 { typedef v_iter<vector0<>, boost::mpl::int_<0> > begin; typedef mpl::int_<1> item0; typedef mpl::int_<1> item1; typedef mpl::int_<1> item2; typedef mpl::int_<1> item3; typedef mpl::int_<1> item4; typedef mpl::int_<1> item5; typedef mpl::int_<1> item6; typedef mpl::int_<1> item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 > struct vector1 { typedef v_iter<vector1< P0>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef mpl::int_<1> item1; typedef mpl::int_<1> item2; typedef mpl::int_<1> item3; typedef mpl::int_<1> item4; typedef mpl::int_<1> item5; typedef mpl::int_<1> item6; typedef mpl::int_<1> item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 > struct vector2 { typedef v_iter<vector2< P0 , P1>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef mpl::int_<1> item2; typedef mpl::int_<1> item3; typedef mpl::int_<1> item4; typedef mpl::int_<1> item5; typedef mpl::int_<1> item6; typedef mpl::int_<1> item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 > struct vector3 { typedef v_iter<vector3< P0 , P1 , P2>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef mpl::int_<1> item3; typedef mpl::int_<1> item4; typedef mpl::int_<1> item5; typedef mpl::int_<1> item6; typedef mpl::int_<1> item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 > struct vector4 { typedef v_iter<vector4< P0 , P1 , P2 , P3>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef mpl::int_<1> item4; typedef mpl::int_<1> item5; typedef mpl::int_<1> item6; typedef mpl::int_<1> item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 > struct vector5 { typedef v_iter<vector5< P0 , P1 , P2 , P3 , P4>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef mpl::int_<1> item5; typedef mpl::int_<1> item6; typedef mpl::int_<1> item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 > struct vector6 { typedef v_iter<vector6< P0 , P1 , P2 , P3 , P4 , P5>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef mpl::int_<1> item6; typedef mpl::int_<1> item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 > struct vector7 { typedef v_iter<vector7< P0 , P1 , P2 , P3 , P4 , P5 , P6>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef mpl::int_<1> item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 > struct vector8 { typedef v_iter<vector8< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef mpl::int_<1> item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 > struct vector9 { typedef v_iter<vector9< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef mpl::int_<1> item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 > struct vector10 { typedef v_iter<vector10< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef mpl::int_<1> item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 > struct vector11 { typedef v_iter<vector11< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef mpl::int_<1> item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 > struct vector12 { typedef v_iter<vector12< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef mpl::int_<1> item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 > struct vector13 { typedef v_iter<vector13< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef mpl::int_<1> item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 > struct vector14 { typedef v_iter<vector14< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef mpl::int_<1> item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 > struct vector15 { typedef v_iter<vector15< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef mpl::int_<1> item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 > struct vector16 { typedef v_iter<vector16< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef mpl::int_<1> item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 > struct vector17 { typedef v_iter<vector17< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef mpl::int_<1> item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 > struct vector18 { typedef v_iter<vector18< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef mpl::int_<1> item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 > struct vector19 { typedef v_iter<vector19< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef mpl::int_<1> item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 > struct vector20 { typedef v_iter<vector20< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef mpl::int_<1> item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 > struct vector21 { typedef v_iter<vector21< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef mpl::int_<1> item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 > struct vector22 { typedef v_iter<vector22< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef mpl::int_<1> item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 > struct vector23 { typedef v_iter<vector23< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef mpl::int_<1> item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 > struct vector24 { typedef v_iter<vector24< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef mpl::int_<1> item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 > struct vector25 { typedef v_iter<vector25< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef mpl::int_<1> item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 > struct vector26 { typedef v_iter<vector26< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef mpl::int_<1> item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 > struct vector27 { typedef v_iter<vector27< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef mpl::int_<1> item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 > struct vector28 { typedef v_iter<vector28< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef mpl::int_<1> item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 > struct vector29 { typedef v_iter<vector29< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef mpl::int_<1> item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 > struct vector30 { typedef v_iter<vector30< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef mpl::int_<1> item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 > struct vector31 { typedef v_iter<vector31< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef mpl::int_<1> item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 > struct vector32 { typedef v_iter<vector32< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef mpl::int_<1> item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 > struct vector33 { typedef v_iter<vector33< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef mpl::int_<1> item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 > struct vector34 { typedef v_iter<vector34< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef mpl::int_<1> item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 > struct vector35 { typedef v_iter<vector35< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef mpl::int_<1> item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 > struct vector36 { typedef v_iter<vector36< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef mpl::int_<1> item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 > struct vector37 { typedef v_iter<vector37< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef mpl::int_<1> item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 > struct vector38 { typedef v_iter<vector38< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef mpl::int_<1> item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 > struct vector39 { typedef v_iter<vector39< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef mpl::int_<1> item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 > struct vector40 { typedef v_iter<vector40< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef mpl::int_<1> item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 > struct vector41 { typedef v_iter<vector41< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef mpl::int_<1> item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 > struct vector42 { typedef v_iter<vector42< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef mpl::int_<1> item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 > struct vector43 { typedef v_iter<vector43< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef mpl::int_<1> item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 > struct vector44 { typedef v_iter<vector44< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef mpl::int_<1> item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 > struct vector45 { typedef v_iter<vector45< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef mpl::int_<1> item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 > struct vector46 { typedef v_iter<vector46< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef mpl::int_<1> item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 > struct vector47 { typedef v_iter<vector47< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef P46 item46; typedef mpl::int_<1> item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 > struct vector48 { typedef v_iter<vector48< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef P46 item46; typedef P47 item47; typedef mpl::int_<1> item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 , class P48 > struct vector49 { typedef v_iter<vector49< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , P48>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef P46 item46; typedef P47 item47; typedef P48 item48; typedef mpl::int_<1> item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 , class P48 , class P49 > struct vector50 { typedef v_iter<vector50< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , P48 , P49>, boost::mpl::int_<0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef P46 item46; typedef P47 item47; typedef P48 item48; typedef P49 item49; typedef mpl::int_<1> item50; typedef mpl::int_<1> item51; typedef mpl::int_<1> item52; typedef mpl::int_<1> item53; typedef mpl::int_<1> item54; typedef mpl::int_<1> item55; typedef mpl::int_<1> item56; typedef mpl::int_<1> item57; typedef mpl::int_<1> item58; typedef mpl::int_<1> item59; typedef mpl::int_<1> item60; typedef mpl::int_<1> item61; typedef mpl::int_<1> item62; typedef mpl::int_<1> item63; typedef mpl::int_<1> item64; typedef mpl::int_<1> item65; typedef mpl::int_<1> item66; typedef mpl::int_<1> item67; typedef mpl::int_<1> item68; typedef mpl::int_<1> item69; typedef mpl::int_<1> item70; typedef mpl::int_<1> item71; typedef mpl::int_<1> item72; typedef mpl::int_<1> item73; typedef mpl::int_<1> item74; typedef mpl::int_<1> item75; typedef mpl::int_<1> item76; typedef mpl::int_<1> item77; typedef mpl::int_<1> item78; typedef mpl::int_<1> item79; typedef mpl::int_<1> item80; typedef mpl::int_<1> item81; typedef mpl::int_<1> item82; typedef mpl::int_<1> item83; typedef mpl::int_<1> item84; typedef mpl::int_<1> item85; typedef mpl::int_<1> item86; typedef mpl::int_<1> item87; typedef mpl::int_<1> item88; typedef mpl::int_<1> item89; typedef mpl::int_<1> item90; typedef mpl::int_<1> item91; typedef mpl::int_<1> item92; typedef mpl::int_<1> item93; typedef mpl::int_<1> item94; typedef mpl::int_<1> item95; typedef mpl::int_<1> item96; typedef mpl::int_<1> item97; typedef mpl::int_<1> item98; typedef mpl::int_<1> item99; };
-}}
-namespace boost { namespace type_of {
- template<class V, class T> struct push_back {
- typedef V type;
- };
- template< class T> struct push_back<boost::type_of::vector0<>, T> { typedef boost::type_of::vector1< T > type; };
- template< class P0 , class T> struct push_back<boost::type_of::vector1< P0>, T> { typedef boost::type_of::vector2< P0 , T > type; };
- template< class P0 , class P1 , class T> struct push_back<boost::type_of::vector2< P0 , P1>, T> { typedef boost::type_of::vector3< P0 , P1 , T > type; };
- template< class P0 , class P1 , class P2 , class T> struct push_back<boost::type_of::vector3< P0 , P1 , P2>, T> { typedef boost::type_of::vector4< P0 , P1 , P2 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class T> struct push_back<boost::type_of::vector4< P0 , P1 , P2 , P3>, T> { typedef boost::type_of::vector5< P0 , P1 , P2 , P3 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class T> struct push_back<boost::type_of::vector5< P0 , P1 , P2 , P3 , P4>, T> { typedef boost::type_of::vector6< P0 , P1 , P2 , P3 , P4 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class T> struct push_back<boost::type_of::vector6< P0 , P1 , P2 , P3 , P4 , P5>, T> { typedef boost::type_of::vector7< P0 , P1 , P2 , P3 , P4 , P5 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class T> struct push_back<boost::type_of::vector7< P0 , P1 , P2 , P3 , P4 , P5 , P6>, T> { typedef boost::type_of::vector8< P0 , P1 , P2 , P3 , P4 , P5 , P6 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class T> struct push_back<boost::type_of::vector8< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7>, T> { typedef boost::type_of::vector9< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class T> struct push_back<boost::type_of::vector9< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8>, T> { typedef boost::type_of::vector10< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class T> struct push_back<boost::type_of::vector10< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9>, T> { typedef boost::type_of::vector11< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class T> struct push_back<boost::type_of::vector11< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10>, T> { typedef boost::type_of::vector12< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class T> struct push_back<boost::type_of::vector12< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11>, T> { typedef boost::type_of::vector13< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class T> struct push_back<boost::type_of::vector13< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12>, T> { typedef boost::type_of::vector14< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class T> struct push_back<boost::type_of::vector14< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13>, T> { typedef boost::type_of::vector15< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class T> struct push_back<boost::type_of::vector15< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14>, T> { typedef boost::type_of::vector16< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class T> struct push_back<boost::type_of::vector16< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15>, T> { typedef boost::type_of::vector17< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class T> struct push_back<boost::type_of::vector17< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16>, T> { typedef boost::type_of::vector18< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class T> struct push_back<boost::type_of::vector18< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17>, T> { typedef boost::type_of::vector19< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class T> struct push_back<boost::type_of::vector19< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18>, T> { typedef boost::type_of::vector20< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class T> struct push_back<boost::type_of::vector20< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19>, T> { typedef boost::type_of::vector21< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class T> struct push_back<boost::type_of::vector21< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20>, T> { typedef boost::type_of::vector22< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class T> struct push_back<boost::type_of::vector22< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21>, T> { typedef boost::type_of::vector23< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class T> struct push_back<boost::type_of::vector23< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22>, T> { typedef boost::type_of::vector24< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class T> struct push_back<boost::type_of::vector24< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23>, T> { typedef boost::type_of::vector25< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class T> struct push_back<boost::type_of::vector25< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24>, T> { typedef boost::type_of::vector26< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class T> struct push_back<boost::type_of::vector26< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25>, T> { typedef boost::type_of::vector27< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class T> struct push_back<boost::type_of::vector27< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26>, T> { typedef boost::type_of::vector28< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class T> struct push_back<boost::type_of::vector28< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27>, T> { typedef boost::type_of::vector29< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class T> struct push_back<boost::type_of::vector29< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28>, T> { typedef boost::type_of::vector30< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class T> struct push_back<boost::type_of::vector30< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29>, T> { typedef boost::type_of::vector31< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class T> struct push_back<boost::type_of::vector31< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30>, T> { typedef boost::type_of::vector32< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class T> struct push_back<boost::type_of::vector32< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31>, T> { typedef boost::type_of::vector33< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class T> struct push_back<boost::type_of::vector33< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32>, T> { typedef boost::type_of::vector34< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class T> struct push_back<boost::type_of::vector34< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33>, T> { typedef boost::type_of::vector35< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class T> struct push_back<boost::type_of::vector35< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34>, T> { typedef boost::type_of::vector36< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class T> struct push_back<boost::type_of::vector36< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35>, T> { typedef boost::type_of::vector37< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class T> struct push_back<boost::type_of::vector37< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36>, T> { typedef boost::type_of::vector38< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class T> struct push_back<boost::type_of::vector38< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37>, T> { typedef boost::type_of::vector39< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class T> struct push_back<boost::type_of::vector39< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38>, T> { typedef boost::type_of::vector40< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class T> struct push_back<boost::type_of::vector40< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39>, T> { typedef boost::type_of::vector41< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class T> struct push_back<boost::type_of::vector41< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40>, T> { typedef boost::type_of::vector42< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class T> struct push_back<boost::type_of::vector42< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41>, T> { typedef boost::type_of::vector43< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class T> struct push_back<boost::type_of::vector43< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42>, T> { typedef boost::type_of::vector44< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class T> struct push_back<boost::type_of::vector44< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43>, T> { typedef boost::type_of::vector45< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class T> struct push_back<boost::type_of::vector45< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44>, T> { typedef boost::type_of::vector46< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class T> struct push_back<boost::type_of::vector46< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45>, T> { typedef boost::type_of::vector47< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class T> struct push_back<boost::type_of::vector47< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46>, T> { typedef boost::type_of::vector48< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 , class T> struct push_back<boost::type_of::vector48< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47>, T> { typedef boost::type_of::vector49< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , T > type; };
- template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 , class P48 , class T> struct push_back<boost::type_of::vector49< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , P48>, T> { typedef boost::type_of::vector50< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , P48 , T > type; };
-}}
diff --git a/src/third_party/boost-1.68.0/boost/utility/string_ref.hpp b/src/third_party/boost-1.68.0/boost/utility/string_ref.hpp
deleted file mode 100644
index d234e5444a4..00000000000
--- a/src/third_party/boost-1.68.0/boost/utility/string_ref.hpp
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- Copyright (c) Marshall Clow 2012-2015.
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
- For more information, see http://www.boost.org
-
- Based on the StringRef implementation in LLVM (http://llvm.org) and
- N3422 by Jeffrey Yasskin
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3442.html
-
-*/
-
-#ifndef BOOST_STRING_REF_HPP
-#define BOOST_STRING_REF_HPP
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/utility/string_ref_fwd.hpp>
-#include <boost/throw_exception.hpp>
-
-#include <cstddef>
-#include <stdexcept>
-#include <algorithm>
-#include <iterator>
-#include <string>
-#include <iosfwd>
-
-#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
-// GCC 4.6 cannot handle a defaulted function with noexcept specifier
-#define BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
-#endif
-
-namespace boost {
-
- namespace detail {
- // A helper functor because sometimes we don't have lambdas
- template <typename charT, typename traits>
- class string_ref_traits_eq {
- public:
- string_ref_traits_eq ( charT ch ) : ch_(ch) {}
- bool operator () ( charT val ) const { return traits::eq ( ch_, val ); }
- charT ch_;
- };
- }
-
- template<typename charT, typename traits>
- class basic_string_ref {
- public:
- // types
- typedef charT value_type;
- typedef const charT* pointer;
- typedef const charT& reference;
- typedef const charT& const_reference;
- typedef pointer const_iterator; // impl-defined
- typedef const_iterator iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef const_reverse_iterator reverse_iterator;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
- static BOOST_CONSTEXPR_OR_CONST size_type npos = size_type(-1);
-
- // construct/copy
- BOOST_CONSTEXPR basic_string_ref () BOOST_NOEXCEPT
- : ptr_(NULL), len_(0) {}
-
- // by defaulting these functions, basic_string_ref becomes
- // trivially copy/move constructible.
- BOOST_CONSTEXPR basic_string_ref (const basic_string_ref &rhs) BOOST_NOEXCEPT
-#ifndef BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
- = default;
-#else
- : ptr_(rhs.ptr_), len_(rhs.len_) {}
-#endif
-
- basic_string_ref& operator=(const basic_string_ref &rhs) BOOST_NOEXCEPT
-#ifndef BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
- = default;
-#else
- {
- ptr_ = rhs.ptr_;
- len_ = rhs.len_;
- return *this;
- }
-#endif
-
- basic_string_ref(const charT* str) BOOST_NOEXCEPT
- : ptr_(str), len_(traits::length(str)) {}
-
- template<typename Allocator>
- basic_string_ref(const std::basic_string<charT, traits, Allocator>& str)
- : ptr_(str.data()), len_(str.length()) {}
-
-// #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
-// // Constructing a string_ref from a temporary string is a bad idea
-// template<typename Allocator>
-// basic_string_ref( std::basic_string<charT, traits, Allocator>&&)
-// = delete;
-// #endif
-
- BOOST_CONSTEXPR basic_string_ref(const charT* str, size_type len) BOOST_NOEXCEPT
- : ptr_(str), len_(len) {}
-
-#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
- template<typename Allocator>
- explicit operator std::basic_string<charT, traits, Allocator>() const {
- return std::basic_string<charT, traits, Allocator> ( begin(), end());
- }
-#endif
-
- std::basic_string<charT, traits> to_string () const {
- return std::basic_string<charT, traits> ( begin(), end());
- }
-
- // iterators
- BOOST_CONSTEXPR const_iterator begin() const { return ptr_; }
- BOOST_CONSTEXPR const_iterator cbegin() const { return ptr_; }
- BOOST_CONSTEXPR const_iterator end() const { return ptr_ + len_; }
- BOOST_CONSTEXPR const_iterator cend() const { return ptr_ + len_; }
- const_reverse_iterator rbegin() const { return const_reverse_iterator (end()); }
- const_reverse_iterator crbegin() const { return const_reverse_iterator (end()); }
- const_reverse_iterator rend() const { return const_reverse_iterator (begin()); }
- const_reverse_iterator crend() const { return const_reverse_iterator (begin()); }
-
- // capacity
- BOOST_CONSTEXPR size_type size() const { return len_; }
- BOOST_CONSTEXPR size_type length() const { return len_; }
- BOOST_CONSTEXPR size_type max_size() const { return len_; }
- BOOST_CONSTEXPR bool empty() const { return len_ == 0; }
-
- // element access
- BOOST_CONSTEXPR const charT& operator[](size_type pos) const { return ptr_[pos]; }
-
- const charT& at(size_t pos) const {
- if ( pos >= len_ )
- BOOST_THROW_EXCEPTION( std::out_of_range ( "boost::string_ref::at" ) );
- return ptr_[pos];
- }
-
- BOOST_CONSTEXPR const charT& front() const { return ptr_[0]; }
- BOOST_CONSTEXPR const charT& back() const { return ptr_[len_-1]; }
- BOOST_CONSTEXPR const charT* data() const { return ptr_; }
-
- // modifiers
- void clear() { len_ = 0; }
- void remove_prefix(size_type n) {
- if ( n > len_ )
- n = len_;
- ptr_ += n;
- len_ -= n;
- }
-
- void remove_suffix(size_type n) {
- if ( n > len_ )
- n = len_;
- len_ -= n;
- }
-
-
- // basic_string_ref string operations
- basic_string_ref substr(size_type pos, size_type n=npos) const {
- if ( pos > size())
- BOOST_THROW_EXCEPTION( std::out_of_range ( "string_ref::substr" ) );
- return basic_string_ref(data() + pos, (std::min)(size() - pos, n));
- }
-
- int compare(basic_string_ref x) const {
- const int cmp = traits::compare ( ptr_, x.ptr_, (std::min)(len_, x.len_));
- return cmp != 0 ? cmp : ( len_ == x.len_ ? 0 : len_ < x.len_ ? -1 : 1 );
- }
-
- bool starts_with(charT c) const { return !empty() && traits::eq ( c, front()); }
- bool starts_with(basic_string_ref x) const {
- return len_ >= x.len_ && traits::compare ( ptr_, x.ptr_, x.len_ ) == 0;
- }
-
- bool ends_with(charT c) const { return !empty() && traits::eq ( c, back()); }
- bool ends_with(basic_string_ref x) const {
- return len_ >= x.len_ && traits::compare ( ptr_ + len_ - x.len_, x.ptr_, x.len_ ) == 0;
- }
-
- size_type find(basic_string_ref s) const {
- const_iterator iter = std::search ( this->cbegin (), this->cend (),
- s.cbegin (), s.cend (), traits::eq );
- return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
- }
-
- size_type find(charT c) const {
- const_iterator iter = std::find_if ( this->cbegin (), this->cend (),
- detail::string_ref_traits_eq<charT, traits> ( c ));
- return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
- }
-
- size_type rfind(basic_string_ref s) const {
- const_reverse_iterator iter = std::search ( this->crbegin (), this->crend (),
- s.crbegin (), s.crend (), traits::eq );
- return iter == this->crend () ? npos : (std::distance(iter, this->crend()) - s.size());
- }
-
- size_type rfind(charT c) const {
- const_reverse_iterator iter = std::find_if ( this->crbegin (), this->crend (),
- detail::string_ref_traits_eq<charT, traits> ( c ));
- return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
- }
-
- size_type find_first_of(charT c) const { return find (c); }
- size_type find_last_of (charT c) const { return rfind (c); }
-
- size_type find_first_of(basic_string_ref s) const {
- const_iterator iter = std::find_first_of
- ( this->cbegin (), this->cend (), s.cbegin (), s.cend (), traits::eq );
- return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
- }
-
- size_type find_last_of(basic_string_ref s) const {
- const_reverse_iterator iter = std::find_first_of
- ( this->crbegin (), this->crend (), s.cbegin (), s.cend (), traits::eq );
- return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
- }
-
- size_type find_first_not_of(basic_string_ref s) const {
- const_iterator iter = find_not_of ( this->cbegin (), this->cend (), s );
- return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
- }
-
- size_type find_first_not_of(charT c) const {
- for ( const_iterator iter = this->cbegin (); iter != this->cend (); ++iter )
- if ( !traits::eq ( c, *iter ))
- return std::distance ( this->cbegin (), iter );
- return npos;
- }
-
- size_type find_last_not_of(basic_string_ref s) const {
- const_reverse_iterator iter = find_not_of ( this->crbegin (), this->crend (), s );
- return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
- }
-
- size_type find_last_not_of(charT c) const {
- for ( const_reverse_iterator iter = this->crbegin (); iter != this->crend (); ++iter )
- if ( !traits::eq ( c, *iter ))
- return this->size() - 1 - std::distance(this->crbegin(), iter);
- return npos;
- }
-
- private:
-
- template <typename Iterator>
- Iterator find_not_of ( Iterator first, Iterator last, basic_string_ref s ) const {
- for ( ; first != last ; ++first )
- if ( 0 == traits::find ( s.ptr_, s.len_, *first ))
- return first;
- return last;
- }
-
-
-
- const charT *ptr_;
- std::size_t len_;
- };
-
-
-// Comparison operators
-// Equality
- template<typename charT, typename traits>
- inline bool operator==(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
- if ( x.size () != y.size ()) return false;
- return x.compare(y) == 0;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator==(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
- return x == basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator==(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) == y;
- }
-
- template<typename charT, typename traits>
- inline bool operator==(basic_string_ref<charT, traits> x, const charT * y) {
- return x == basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline bool operator==(const charT * x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) == y;
- }
-
-// Inequality
- template<typename charT, typename traits>
- inline bool operator!=(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
- if ( x.size () != y.size ()) return true;
- return x.compare(y) != 0;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator!=(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
- return x != basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator!=(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) != y;
- }
-
- template<typename charT, typename traits>
- inline bool operator!=(basic_string_ref<charT, traits> x, const charT * y) {
- return x != basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline bool operator!=(const charT * x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) != y;
- }
-
-// Less than
- template<typename charT, typename traits>
- inline bool operator<(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
- return x.compare(y) < 0;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator<(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
- return x < basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator<(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) < y;
- }
-
- template<typename charT, typename traits>
- inline bool operator<(basic_string_ref<charT, traits> x, const charT * y) {
- return x < basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline bool operator<(const charT * x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) < y;
- }
-
-// Greater than
- template<typename charT, typename traits>
- inline bool operator>(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
- return x.compare(y) > 0;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator>(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
- return x > basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator>(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) > y;
- }
-
- template<typename charT, typename traits>
- inline bool operator>(basic_string_ref<charT, traits> x, const charT * y) {
- return x > basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline bool operator>(const charT * x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) > y;
- }
-
-// Less than or equal to
- template<typename charT, typename traits>
- inline bool operator<=(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
- return x.compare(y) <= 0;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator<=(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
- return x <= basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator<=(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) <= y;
- }
-
- template<typename charT, typename traits>
- inline bool operator<=(basic_string_ref<charT, traits> x, const charT * y) {
- return x <= basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline bool operator<=(const charT * x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) <= y;
- }
-
-// Greater than or equal to
- template<typename charT, typename traits>
- inline bool operator>=(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
- return x.compare(y) >= 0;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator>=(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
- return x >= basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline bool operator>=(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) >= y;
- }
-
- template<typename charT, typename traits>
- inline bool operator>=(basic_string_ref<charT, traits> x, const charT * y) {
- return x >= basic_string_ref<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline bool operator>=(const charT * x, basic_string_ref<charT, traits> y) {
- return basic_string_ref<charT, traits>(x) >= y;
- }
-
- namespace detail {
-
- template<class charT, class traits>
- inline void sr_insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
- enum { chunk_size = 8 };
- charT fill_chars[chunk_size];
- std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
- for (; n >= chunk_size && os.good(); n -= chunk_size)
- os.write(fill_chars, static_cast< std::size_t >(chunk_size));
- if (n > 0 && os.good())
- os.write(fill_chars, n);
- }
-
- template<class charT, class traits>
- void sr_insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_ref<charT,traits>& str) {
- const std::size_t size = str.size();
- const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
- const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
- if (!align_left) {
- detail::sr_insert_fill_chars(os, alignment_size);
- if (os.good())
- os.write(str.data(), size);
- }
- else {
- os.write(str.data(), size);
- if (os.good())
- detail::sr_insert_fill_chars(os, alignment_size);
- }
- }
-
- } // namespace detail
-
- // Inserter
- template<class charT, class traits>
- inline std::basic_ostream<charT, traits>&
- operator<<(std::basic_ostream<charT, traits>& os, const basic_string_ref<charT,traits>& str) {
- if (os.good()) {
- const std::size_t size = str.size();
- const std::size_t w = static_cast< std::size_t >(os.width());
- if (w <= size)
- os.write(str.data(), size);
- else
- detail::sr_insert_aligned(os, str);
- os.width(0);
- }
- return os;
- }
-
-#if 0
- // numeric conversions
- //
- // These are short-term implementations.
- // In a production environment, I would rather avoid the copying.
- //
- inline int stoi (string_ref str, size_t* idx=0, int base=10) {
- return std::stoi ( std::string(str), idx, base );
- }
-
- inline long stol (string_ref str, size_t* idx=0, int base=10) {
- return std::stol ( std::string(str), idx, base );
- }
-
- inline unsigned long stoul (string_ref str, size_t* idx=0, int base=10) {
- return std::stoul ( std::string(str), idx, base );
- }
-
- inline long long stoll (string_ref str, size_t* idx=0, int base=10) {
- return std::stoll ( std::string(str), idx, base );
- }
-
- inline unsigned long long stoull (string_ref str, size_t* idx=0, int base=10) {
- return std::stoull ( std::string(str), idx, base );
- }
-
- inline float stof (string_ref str, size_t* idx=0) {
- return std::stof ( std::string(str), idx );
- }
-
- inline double stod (string_ref str, size_t* idx=0) {
- return std::stod ( std::string(str), idx );
- }
-
- inline long double stold (string_ref str, size_t* idx=0) {
- return std::stold ( std::string(str), idx );
- }
-
- inline int stoi (wstring_ref str, size_t* idx=0, int base=10) {
- return std::stoi ( std::wstring(str), idx, base );
- }
-
- inline long stol (wstring_ref str, size_t* idx=0, int base=10) {
- return std::stol ( std::wstring(str), idx, base );
- }
-
- inline unsigned long stoul (wstring_ref str, size_t* idx=0, int base=10) {
- return std::stoul ( std::wstring(str), idx, base );
- }
-
- inline long long stoll (wstring_ref str, size_t* idx=0, int base=10) {
- return std::stoll ( std::wstring(str), idx, base );
- }
-
- inline unsigned long long stoull (wstring_ref str, size_t* idx=0, int base=10) {
- return std::stoull ( std::wstring(str), idx, base );
- }
-
- inline float stof (wstring_ref str, size_t* idx=0) {
- return std::stof ( std::wstring(str), idx );
- }
-
- inline double stod (wstring_ref str, size_t* idx=0) {
- return std::stod ( std::wstring(str), idx );
- }
-
- inline long double stold (wstring_ref str, size_t* idx=0) {
- return std::stold ( std::wstring(str), idx );
- }
-#endif
-
-}
-
-#if 0
-namespace std {
- // Hashing
- template<> struct hash<boost::string_ref>;
- template<> struct hash<boost::u16string_ref>;
- template<> struct hash<boost::u32string_ref>;
- template<> struct hash<boost::wstring_ref>;
-}
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/utility/string_view.hpp b/src/third_party/boost-1.68.0/boost/utility/string_view.hpp
deleted file mode 100644
index 44efda97bfd..00000000000
--- a/src/third_party/boost-1.68.0/boost/utility/string_view.hpp
+++ /dev/null
@@ -1,705 +0,0 @@
-/*
- Copyright (c) Marshall Clow 2012-2015.
- Copyright (c) Beman Dawes 2015
-
- Distributed under the Boost Software License, Version 1.0. (See accompanying
- file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
- For more information, see http://www.boost.org
-
- Based on the StringRef implementation in LLVM (http://llvm.org) and
- N3422 by Jeffrey Yasskin
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3442.html
- Updated July 2015 to reflect the Library Fundamentals TS
- http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html
-*/
-
-#ifndef BOOST_STRING_VIEW_HPP
-#define BOOST_STRING_VIEW_HPP
-
-#include <boost/config.hpp>
-#include <boost/detail/workaround.hpp>
-#include <boost/utility/string_view_fwd.hpp>
-#include <boost/throw_exception.hpp>
-
-#include <cstddef>
-#include <stdexcept>
-#include <algorithm>
-#include <iterator>
-#include <string>
-#include <cstring>
-#include <iosfwd>
-
-#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
-// GCC 4.6 cannot handle a defaulted function with noexcept specifier
-#define BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
-#endif
-
-namespace boost {
-
- namespace detail {
- // A helper functor because sometimes we don't have lambdas
- template <typename charT, typename traits>
- class string_view_traits_eq {
- public:
- string_view_traits_eq ( charT ch ) : ch_(ch) {}
- bool operator()( charT val ) const { return traits::eq (ch_, val); }
- charT ch_;
- };
- }
-
- template<typename charT, typename traits> // traits defaulted in string_view_fwd.hpp
- class basic_string_view {
- public:
- // types
- typedef traits traits_type;
- typedef charT value_type;
- typedef charT* pointer;
- typedef const charT* const_pointer;
- typedef charT& reference;
- typedef const charT& const_reference;
- typedef const_pointer const_iterator; // impl-defined
- typedef const_iterator iterator;
- typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
- typedef const_reverse_iterator reverse_iterator;
- typedef std::size_t size_type;
- typedef std::ptrdiff_t difference_type;
- static BOOST_CONSTEXPR_OR_CONST size_type npos = size_type(-1);
-
- // construct/copy
- BOOST_CONSTEXPR basic_string_view() BOOST_NOEXCEPT
- : ptr_(NULL), len_(0) {}
-
- // by defaulting these functions, basic_string_ref becomes
- // trivially copy/move constructible.
- BOOST_CONSTEXPR basic_string_view(const basic_string_view &rhs) BOOST_NOEXCEPT
-#ifndef BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
- = default;
-#else
- : ptr_(rhs.ptr_), len_(rhs.len_) {}
-#endif
-
- basic_string_view& operator=(const basic_string_view &rhs) BOOST_NOEXCEPT
-#ifndef BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
- = default;
-#else
- {
- ptr_ = rhs.ptr_;
- len_ = rhs.len_;
- return *this;
- }
-#endif
-
- template<typename Allocator>
- basic_string_view(const std::basic_string<charT, traits, Allocator>& str) BOOST_NOEXCEPT
- : ptr_(str.data()), len_(str.length()) {}
-
-// #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
-// // Constructing a string_view from a temporary string is a bad idea
-// template<typename Allocator>
-// basic_string_view( std::basic_string<charT, traits, Allocator>&&)
-// = delete;
-// #endif
-
- BOOST_CONSTEXPR basic_string_view(const charT* str)
- : ptr_(str), len_(traits::length(str)) {}
-
- BOOST_CONSTEXPR basic_string_view(const charT* str, size_type len)
- : ptr_(str), len_(len) {}
-
- // iterators
- BOOST_CONSTEXPR const_iterator begin() const BOOST_NOEXCEPT { return ptr_; }
- BOOST_CONSTEXPR const_iterator cbegin() const BOOST_NOEXCEPT { return ptr_; }
- BOOST_CONSTEXPR const_iterator end() const BOOST_NOEXCEPT { return ptr_ + len_; }
- BOOST_CONSTEXPR const_iterator cend() const BOOST_NOEXCEPT { return ptr_ + len_; }
- const_reverse_iterator rbegin() const BOOST_NOEXCEPT { return const_reverse_iterator(end()); }
- const_reverse_iterator crbegin() const BOOST_NOEXCEPT { return const_reverse_iterator(end()); }
- const_reverse_iterator rend() const BOOST_NOEXCEPT { return const_reverse_iterator(begin()); }
- const_reverse_iterator crend() const BOOST_NOEXCEPT { return const_reverse_iterator(begin()); }
-
- // capacity
- BOOST_CONSTEXPR size_type size() const BOOST_NOEXCEPT { return len_; }
- BOOST_CONSTEXPR size_type length() const BOOST_NOEXCEPT { return len_; }
- BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT { return len_; }
- BOOST_CONSTEXPR bool empty() const BOOST_NOEXCEPT { return len_ == 0; }
-
- // element access
- BOOST_CONSTEXPR const_reference operator[](size_type pos) const BOOST_NOEXCEPT { return ptr_[pos]; }
-
- BOOST_CONSTEXPR const_reference at(size_t pos) const {
- return pos >= len_ ? BOOST_THROW_EXCEPTION(std::out_of_range("boost::string_view::at")), ptr_[0] : ptr_[pos];
- }
-
- BOOST_CONSTEXPR const_reference front() const { return ptr_[0]; }
- BOOST_CONSTEXPR const_reference back() const { return ptr_[len_-1]; }
- BOOST_CONSTEXPR const_pointer data() const BOOST_NOEXCEPT { return ptr_; }
-
- // modifiers
- void clear() BOOST_NOEXCEPT { len_ = 0; } // Boost extension
-
- BOOST_CXX14_CONSTEXPR void remove_prefix(size_type n) {
- if ( n > len_ )
- n = len_;
- ptr_ += n;
- len_ -= n;
- }
-
- BOOST_CXX14_CONSTEXPR void remove_suffix(size_type n) {
- if ( n > len_ )
- n = len_;
- len_ -= n;
- }
-
- BOOST_CXX14_CONSTEXPR void swap(basic_string_view& s) BOOST_NOEXCEPT {
- std::swap(ptr_, s.ptr_);
- std::swap(len_, s.len_);
- }
-
- // basic_string_view string operations
-#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
- template<typename Allocator>
- explicit operator std::basic_string<charT, traits, Allocator>() const {
- return std::basic_string<charT, traits, Allocator>(begin(), end());
- }
-#endif
-
-#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
- template<typename Allocator = std::allocator<charT> >
- std::basic_string<charT, traits, Allocator> to_string(const Allocator& a = Allocator()) const {
- return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
- }
-#else
- std::basic_string<charT, traits> to_string() const {
- return std::basic_string<charT, traits>(begin(), end());
- }
-
- template<typename Allocator>
- std::basic_string<charT, traits, Allocator> to_string(const Allocator& a) const {
- return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
- }
-#endif
-
- size_type copy(charT* s, size_type n, size_type pos=0) const {
- if (pos > size())
- BOOST_THROW_EXCEPTION(std::out_of_range("string_view::copy" ));
- size_type rlen = (std::min)(n, len_ - pos);
- traits_type::copy(s, data() + pos, rlen);
- return rlen;
- }
-
- BOOST_CXX14_CONSTEXPR basic_string_view substr(size_type pos, size_type n=npos) const {
- if ( pos > size())
- BOOST_THROW_EXCEPTION( std::out_of_range ( "string_view::substr" ) );
- return basic_string_view(data() + pos, (std::min)(size() - pos, n));
- }
-
- BOOST_CXX14_CONSTEXPR int compare(basic_string_view x) const BOOST_NOEXCEPT {
- const int cmp = traits::compare(ptr_, x.ptr_, (std::min)(len_, x.len_));
- return cmp != 0 ? cmp : (len_ == x.len_ ? 0 : len_ < x.len_ ? -1 : 1);
- }
-
- BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1, basic_string_view x)
- const BOOST_NOEXCEPT {
- return substr(pos1, n1).compare(x);
- }
-
- BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1,
- basic_string_view x, size_type pos2, size_type n2) const {
- return substr(pos1, n1).compare(x.substr(pos2, n2));
- }
-
- BOOST_CXX14_CONSTEXPR int compare(const charT* x) const {
- return compare(basic_string_view(x));
- }
-
- BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1, const charT* x) const {
- return substr(pos1, n1).compare(basic_string_view(x));
- }
-
- BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1,
- const charT* x, size_type n2) const {
- return substr(pos1, n1).compare(basic_string_view(x, n2));
- }
-
- // Searches
- BOOST_CONSTEXPR bool starts_with(charT c) const BOOST_NOEXCEPT { // Boost extension
- return !empty() && traits::eq(c, front());
- }
-
- BOOST_CONSTEXPR bool starts_with(basic_string_view x) const BOOST_NOEXCEPT { // Boost extension
- return len_ >= x.len_ && traits::compare(ptr_, x.ptr_, x.len_) == 0;
- }
-
- BOOST_CONSTEXPR bool ends_with(charT c) const BOOST_NOEXCEPT { // Boost extension
- return !empty() && traits::eq(c, back());
- }
-
- BOOST_CONSTEXPR bool ends_with(basic_string_view x) const BOOST_NOEXCEPT { // Boost extension
- return len_ >= x.len_ &&
- traits::compare(ptr_ + len_ - x.len_, x.ptr_, x.len_) == 0;
- }
-
- // find
- BOOST_CXX14_CONSTEXPR size_type find(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
- if (pos > size())
- return npos;
- if (s.empty())
- return pos;
- if (s.size() > size() - pos)
- return npos;
- const charT* cur = ptr_ + pos;
- const charT* last = cend() - s.size() + 1;
- for (; cur != last ; ++cur) {
- cur = traits::find(cur, last - cur, s[0]);
- if (!cur)
- return npos;
- if (traits::compare(cur, s.cbegin(), s.size()) == 0)
- return cur - ptr_;
- }
- return npos;
- }
- BOOST_CXX14_CONSTEXPR size_type find(charT c, size_type pos = 0) const BOOST_NOEXCEPT {
- if (pos > size())
- return npos;
- const charT* ret_ptr = traits::find(ptr_ + pos, len_ - pos, c);
- if (ret_ptr)
- return ret_ptr - ptr_;
- return npos;
- }
- BOOST_CXX14_CONSTEXPR size_type find(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
- { return find(basic_string_view(s, n), pos); }
- BOOST_CXX14_CONSTEXPR size_type find(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
- { return find(basic_string_view(s), pos); }
-
- // rfind
- BOOST_CXX14_CONSTEXPR size_type rfind(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
- if (len_ < s.len_)
- return npos;
- if (pos > len_ - s.len_)
- pos = len_ - s.len_;
- if (s.len_ == 0u) // an empty string is always found
- return pos;
- for (const charT* cur = ptr_ + pos; ; --cur) {
- if (traits::compare(cur, s.ptr_, s.len_) == 0)
- return cur - ptr_;
- if (cur == ptr_)
- return npos;
- };
- }
- BOOST_CXX14_CONSTEXPR size_type rfind(charT c, size_type pos = npos) const BOOST_NOEXCEPT
- { return rfind(basic_string_view(&c, 1), pos); }
- BOOST_CXX14_CONSTEXPR size_type rfind(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
- { return rfind(basic_string_view(s, n), pos); }
- BOOST_CXX14_CONSTEXPR size_type rfind(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
- { return rfind(basic_string_view(s), pos); }
-
- // find_first_of
- BOOST_CXX14_CONSTEXPR size_type find_first_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
- if (pos >= len_ || s.len_ == 0)
- return npos;
- const_iterator iter = std::find_first_of
- (this->cbegin () + pos, this->cend (), s.cbegin (), s.cend (), traits::eq);
- return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
- }
- BOOST_CXX14_CONSTEXPR size_type find_first_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
- { return find(c, pos); }
- BOOST_CXX14_CONSTEXPR size_type find_first_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
- { return find_first_of(basic_string_view(s, n), pos); }
- BOOST_CXX14_CONSTEXPR size_type find_first_of(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
- { return find_first_of(basic_string_view(s), pos); }
-
- // find_last_of
- BOOST_CXX14_CONSTEXPR size_type find_last_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
- if (s.len_ == 0u)
- return npos;
- if (pos >= len_)
- pos = 0;
- else
- pos = len_ - (pos+1);
- const_reverse_iterator iter = std::find_first_of
- ( this->crbegin () + pos, this->crend (), s.cbegin (), s.cend (), traits::eq );
- return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter);
- }
- BOOST_CXX14_CONSTEXPR size_type find_last_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
- { return find_last_of(basic_string_view(&c, 1), pos); }
- BOOST_CXX14_CONSTEXPR size_type find_last_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
- { return find_last_of(basic_string_view(s, n), pos); }
- BOOST_CXX14_CONSTEXPR size_type find_last_of(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
- { return find_last_of(basic_string_view(s), pos); }
-
- // find_first_not_of
- BOOST_CXX14_CONSTEXPR size_type find_first_not_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
- if (pos >= len_)
- return npos;
- if (s.len_ == 0)
- return pos;
- const_iterator iter = find_not_of ( this->cbegin () + pos, this->cend (), s );
- return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
- }
- BOOST_CXX14_CONSTEXPR size_type find_first_not_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
- { return find_first_not_of(basic_string_view(&c, 1), pos); }
- BOOST_CXX14_CONSTEXPR size_type find_first_not_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
- { return find_first_not_of(basic_string_view(s, n), pos); }
- BOOST_CXX14_CONSTEXPR size_type find_first_not_of(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
- { return find_first_not_of(basic_string_view(s), pos); }
-
- // find_last_not_of
- BOOST_CXX14_CONSTEXPR size_type find_last_not_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
- if (pos >= len_)
- pos = len_ - 1;
- if (s.len_ == 0u)
- return pos;
- pos = len_ - (pos+1);
- const_reverse_iterator iter = find_not_of ( this->crbegin () + pos, this->crend (), s );
- return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
- }
- BOOST_CXX14_CONSTEXPR size_type find_last_not_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
- { return find_last_not_of(basic_string_view(&c, 1), pos); }
- BOOST_CXX14_CONSTEXPR size_type find_last_not_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
- { return find_last_not_of(basic_string_view(s, n), pos); }
- BOOST_CXX14_CONSTEXPR size_type find_last_not_of(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
- { return find_last_not_of(basic_string_view(s), pos); }
-
- private:
- template <typename r_iter>
- size_type reverse_distance(r_iter first, r_iter last) const BOOST_NOEXCEPT {
- // Portability note here: std::distance is not NOEXCEPT, but calling it with a string_view::reverse_iterator will not throw.
- return len_ - 1 - std::distance ( first, last );
- }
-
- template <typename Iterator>
- Iterator find_not_of(Iterator first, Iterator last, basic_string_view s) const BOOST_NOEXCEPT {
- for (; first != last ; ++first)
- if ( 0 == traits::find(s.ptr_, s.len_, *first))
- return first;
- return last;
- }
-
- const charT *ptr_;
- std::size_t len_;
- };
-
-
-// Comparison operators
-// Equality
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator==(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- if (x.size () != y.size ()) return false;
- return x.compare(y) == 0;
- }
-
-// Inequality
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator!=(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- if ( x.size () != y.size ()) return true;
- return x.compare(y) != 0;
- }
-
-// Less than
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator<(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return x.compare(y) < 0;
- }
-
-// Greater than
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator>(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return x.compare(y) > 0;
- }
-
-// Less than or equal to
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator<=(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return x.compare(y) <= 0;
- }
-
-// Greater than or equal to
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator>=(basic_string_view<charT, traits> x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return x.compare(y) >= 0;
- }
-
-// "sufficient additional overloads of comparison functions"
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator==(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
- return x == basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator==(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) == y;
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator==(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
- return x == basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator==(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) == y;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator!=(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
- return x != basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator!=(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) != y;
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator!=(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
- return x != basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator!=(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) != y;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator<(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
- return x < basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator<(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) < y;
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator<(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
- return x < basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator<(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) < y;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator>(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
- return x > basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator>(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) > y;
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator>(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
- return x > basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator>(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) > y;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator<=(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
- return x <= basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator<=(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) <= y;
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator<=(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
- return x <= basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator<=(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) <= y;
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator>=(basic_string_view<charT, traits> x,
- const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
- return x >= basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits, typename Allocator>
- inline BOOST_CXX14_CONSTEXPR bool operator>=(const std::basic_string<charT, traits, Allocator> & x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) >= y;
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator>=(basic_string_view<charT, traits> x,
- const charT * y) BOOST_NOEXCEPT {
- return x >= basic_string_view<charT, traits>(y);
- }
-
- template<typename charT, typename traits>
- inline BOOST_CXX14_CONSTEXPR bool operator>=(const charT * x,
- basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
- return basic_string_view<charT, traits>(x) >= y;
- }
-
- namespace detail {
-
- template<class charT, class traits>
- inline void sv_insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
- enum { chunk_size = 8 };
- charT fill_chars[chunk_size];
- std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
- for (; n >= chunk_size && os.good(); n -= chunk_size)
- os.write(fill_chars, static_cast< std::size_t >(chunk_size));
- if (n > 0 && os.good())
- os.write(fill_chars, n);
- }
-
- template<class charT, class traits>
- void sv_insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_view<charT,traits>& str) {
- const std::size_t size = str.size();
- const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
- const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
- if (!align_left) {
- detail::sv_insert_fill_chars(os, alignment_size);
- if (os.good())
- os.write(str.data(), size);
- }
- else {
- os.write(str.data(), size);
- if (os.good())
- detail::sv_insert_fill_chars(os, alignment_size);
- }
- }
-
- } // namespace detail
-
- // Inserter
- template<class charT, class traits>
- inline std::basic_ostream<charT, traits>&
- operator<<(std::basic_ostream<charT, traits>& os,
- const basic_string_view<charT,traits>& str) {
- if (os.good()) {
- const std::size_t size = str.size();
- const std::size_t w = static_cast< std::size_t >(os.width());
- if (w <= size)
- os.write(str.data(), size);
- else
- detail::sv_insert_aligned(os, str);
- os.width(0);
- }
- return os;
- }
-
-#if 0
- // numeric conversions
- //
- // These are short-term implementations.
- // In a production environment, I would rather avoid the copying.
- //
- inline int stoi (string_view str, size_t* idx=0, int base=10) {
- return std::stoi ( std::string(str), idx, base );
- }
-
- inline long stol (string_view str, size_t* idx=0, int base=10) {
- return std::stol ( std::string(str), idx, base );
- }
-
- inline unsigned long stoul (string_view str, size_t* idx=0, int base=10) {
- return std::stoul ( std::string(str), idx, base );
- }
-
- inline long long stoll (string_view str, size_t* idx=0, int base=10) {
- return std::stoll ( std::string(str), idx, base );
- }
-
- inline unsigned long long stoull (string_view str, size_t* idx=0, int base=10) {
- return std::stoull ( std::string(str), idx, base );
- }
-
- inline float stof (string_view str, size_t* idx=0) {
- return std::stof ( std::string(str), idx );
- }
-
- inline double stod (string_view str, size_t* idx=0) {
- return std::stod ( std::string(str), idx );
- }
-
- inline long double stold (string_view str, size_t* idx=0) {
- return std::stold ( std::string(str), idx );
- }
-
- inline int stoi (wstring_view str, size_t* idx=0, int base=10) {
- return std::stoi ( std::wstring(str), idx, base );
- }
-
- inline long stol (wstring_view str, size_t* idx=0, int base=10) {
- return std::stol ( std::wstring(str), idx, base );
- }
-
- inline unsigned long stoul (wstring_view str, size_t* idx=0, int base=10) {
- return std::stoul ( std::wstring(str), idx, base );
- }
-
- inline long long stoll (wstring_view str, size_t* idx=0, int base=10) {
- return std::stoll ( std::wstring(str), idx, base );
- }
-
- inline unsigned long long stoull (wstring_view str, size_t* idx=0, int base=10) {
- return std::stoull ( std::wstring(str), idx, base );
- }
-
- inline float stof (wstring_view str, size_t* idx=0) {
- return std::stof ( std::wstring(str), idx );
- }
-
- inline double stod (wstring_view str, size_t* idx=0) {
- return std::stod ( std::wstring(str), idx );
- }
-
- inline long double stold (wstring_view str, size_t* idx=0) {
- return std::stold ( std::wstring(str), idx );
- }
-#endif
-
-}
-
-#if 0
-namespace std {
- // Hashing
- template<> struct hash<boost::string_view>;
- template<> struct hash<boost::u16string_view>;
- template<> struct hash<boost::u32string_view>;
- template<> struct hash<boost::wstring_view>;
-}
-#endif
-
-#endif
diff --git a/src/third_party/boost-1.68.0/boost/version.hpp b/src/third_party/boost-1.68.0/boost/version.hpp
deleted file mode 100644
index 967ff285484..00000000000
--- a/src/third_party/boost-1.68.0/boost/version.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-// Boost version.hpp configuration header file ------------------------------//
-
-// (C) Copyright John maddock 1999. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org/libs/config for documentation
-
-#ifndef BOOST_VERSION_HPP
-#define BOOST_VERSION_HPP
-
-//
-// Caution: this is the only Boost header that is guaranteed
-// to change with every Boost release. Including this header
-// will cause a recompile every time a new Boost version is
-// used.
-//
-// BOOST_VERSION % 100 is the patch level
-// BOOST_VERSION / 100 % 1000 is the minor version
-// BOOST_VERSION / 100000 is the major version
-
-#define BOOST_VERSION 106800
-
-//
-// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
-// but as a *string* in the form "x_y[_z]" where x is the major version
-// number, y is the minor version number, and z is the patch level if not 0.
-// This is used by <config/auto_link.hpp> to select which library version to link to.
-
-#define BOOST_LIB_VERSION "1_68"
-
-#endif
diff --git a/src/third_party/boost-1.68.0/libs/container/src/dlmalloc_2_8_6.c b/src/third_party/boost-1.68.0/libs/container/src/dlmalloc_2_8_6.c
deleted file mode 100644
index 649cfbc7054..00000000000
--- a/src/third_party/boost-1.68.0/libs/container/src/dlmalloc_2_8_6.c
+++ /dev/null
@@ -1,6280 +0,0 @@
-/*
- This is a version (aka dlmalloc) of malloc/free/realloc written by
- Doug Lea and released to the public domain, as explained at
- http://creativecommons.org/publicdomain/zero/1.0/ Send questions,
- comments, complaints, performance data, etc to dl@cs.oswego.edu
-
-* Version 2.8.6 Wed Aug 29 06:57:58 2012 Doug Lea
- Note: There may be an updated version of this malloc obtainable at
- ftp://gee.cs.oswego.edu/pub/misc/malloc.c
- Check before installing!
-
-* Quickstart
-
- This library is all in one file to simplify the most common usage:
- ftp it, compile it (-O3), and link it into another program. All of
- the compile-time options default to reasonable values for use on
- most platforms. You might later want to step through various
- compile-time and dynamic tuning options.
-
- For convenience, an include file for code using this malloc is at:
- ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.6.h
- You don't really need this .h file unless you call functions not
- defined in your system include files. The .h file contains only the
- excerpts from this file needed for using this malloc on ANSI C/C++
- systems, so long as you haven't changed compile-time options about
- naming and tuning parameters. If you do, then you can create your
- own malloc.h that does include all settings by cutting at the point
- indicated below. Note that you may already by default be using a C
- library containing a malloc that is based on some version of this
- malloc (for example in linux). You might still want to use the one
- in this file to customize settings or to avoid overheads associated
- with library versions.
-
-* Vital statistics:
-
- Supported pointer/size_t representation: 4 or 8 bytes
- size_t MUST be an unsigned type of the same width as
- pointers. (If you are using an ancient system that declares
- size_t as a signed type, or need it to be a different width
- than pointers, you can use a previous release of this malloc
- (e.g. 2.7.2) supporting these.)
-
- Alignment: 8 bytes (minimum)
- This suffices for nearly all current machines and C compilers.
- However, you can define MALLOC_ALIGNMENT to be wider than this
- if necessary (up to 128bytes), at the expense of using more space.
-
- Minimum overhead per allocated chunk: 4 or 8 bytes (if 4byte sizes)
- 8 or 16 bytes (if 8byte sizes)
- Each malloced chunk has a hidden word of overhead holding size
- and status information, and additional cross-check word
- if FOOTERS is defined.
-
- Minimum allocated size: 4-byte ptrs: 16 bytes (including overhead)
- 8-byte ptrs: 32 bytes (including overhead)
-
- Even a request for zero bytes (i.e., malloc(0)) returns a
- pointer to something of the minimum allocatable size.
- The maximum overhead wastage (i.e., number of extra bytes
- allocated than were requested in malloc) is less than or equal
- to the minimum size, except for requests >= mmap_threshold that
- are serviced via mmap(), where the worst case wastage is about
- 32 bytes plus the remainder from a system page (the minimal
- mmap unit); typically 4096 or 8192 bytes.
-
- Security: static-safe; optionally more or less
- The "security" of malloc refers to the ability of malicious
- code to accentuate the effects of errors (for example, freeing
- space that is not currently malloc'ed or overwriting past the
- ends of chunks) in code that calls malloc. This malloc
- guarantees not to modify any memory locations below the base of
- heap, i.e., static variables, even in the presence of usage
- errors. The routines additionally detect most improper frees
- and reallocs. All this holds as long as the static bookkeeping
- for malloc itself is not corrupted by some other means. This
- is only one aspect of security -- these checks do not, and
- cannot, detect all possible programming errors.
-
- If FOOTERS is defined nonzero, then each allocated chunk
- carries an additional check word to verify that it was malloced
- from its space. These check words are the same within each
- execution of a program using malloc, but differ across
- executions, so externally crafted fake chunks cannot be
- freed. This improves security by rejecting frees/reallocs that
- could corrupt heap memory, in addition to the checks preventing
- writes to statics that are always on. This may further improve
- security at the expense of time and space overhead. (Note that
- FOOTERS may also be worth using with MSPACES.)
-
- By default detected errors cause the program to abort (calling
- "abort()"). You can override this to instead proceed past
- errors by defining PROCEED_ON_ERROR. In this case, a bad free
- has no effect, and a malloc that encounters a bad address
- caused by user overwrites will ignore the bad address by
- dropping pointers and indices to all known memory. This may
- be appropriate for programs that should continue if at all
- possible in the face of programming errors, although they may
- run out of memory because dropped memory is never reclaimed.
-
- If you don't like either of these options, you can define
- CORRUPTION_ERROR_ACTION and USAGE_ERROR_ACTION to do anything
- else. And if if you are sure that your program using malloc has
- no errors or vulnerabilities, you can define INSECURE to 1,
- which might (or might not) provide a small performance improvement.
-
- It is also possible to limit the maximum total allocatable
- space, using malloc_set_footprint_limit. This is not
- designed as a security feature in itself (calls to set limits
- are not screened or privileged), but may be useful as one
- aspect of a secure implementation.
-
- Thread-safety: NOT thread-safe unless USE_LOCKS defined non-zero
- When USE_LOCKS is defined, each public call to malloc, free,
- etc is surrounded with a lock. By default, this uses a plain
- pthread mutex, win32 critical section, or a spin-lock if if
- available for the platform and not disabled by setting
- USE_SPIN_LOCKS=0. However, if USE_RECURSIVE_LOCKS is defined,
- recursive versions are used instead (which are not required for
- base functionality but may be needed in layered extensions).
- Using a global lock is not especially fast, and can be a major
- bottleneck. It is designed only to provide minimal protection
- in concurrent environments, and to provide a basis for
- extensions. If you are using malloc in a concurrent program,
- consider instead using nedmalloc
- (http://www.nedprod.com/programs/portable/nedmalloc/) or
- ptmalloc (See http://www.malloc.de), which are derived from
- versions of this malloc.
-
- System requirements: Any combination of MORECORE and/or MMAP/MUNMAP
- This malloc can use unix sbrk or any emulation (invoked using
- the CALL_MORECORE macro) and/or mmap/munmap or any emulation
- (invoked using CALL_MMAP/CALL_MUNMAP) to get and release system
- memory. On most unix systems, it tends to work best if both
- MORECORE and MMAP are enabled. On Win32, it uses emulations
- based on VirtualAlloc. It also uses common C library functions
- like memset.
-
- Compliance: I believe it is compliant with the Single Unix Specification
- (See http://www.unix.org). Also SVID/XPG, ANSI C, and probably
- others as well.
-
-* Overview of algorithms
-
- This is not the fastest, most space-conserving, most portable, or
- most tunable malloc ever written. However it is among the fastest
- while also being among the most space-conserving, portable and
- tunable. Consistent balance across these factors results in a good
- general-purpose allocator for malloc-intensive programs.
-
- In most ways, this malloc is a best-fit allocator. Generally, it
- chooses the best-fitting existing chunk for a request, with ties
- broken in approximately least-recently-used order. (This strategy
- normally maintains low fragmentation.) However, for requests less
- than 256bytes, it deviates from best-fit when there is not an
- exactly fitting available chunk by preferring to use space adjacent
- to that used for the previous small request, as well as by breaking
- ties in approximately most-recently-used order. (These enhance
- locality of series of small allocations.) And for very large requests
- (>= 256Kb by default), it relies on system memory mapping
- facilities, if supported. (This helps avoid carrying around and
- possibly fragmenting memory used only for large chunks.)
-
- All operations (except malloc_stats and mallinfo) have execution
- times that are bounded by a constant factor of the number of bits in
- a size_t, not counting any clearing in calloc or copying in realloc,
- or actions surrounding MORECORE and MMAP that have times
- proportional to the number of non-contiguous regions returned by
- system allocation routines, which is often just 1. In real-time
- applications, you can optionally suppress segment traversals using
- NO_SEGMENT_TRAVERSAL, which assures bounded execution even when
- system allocators return non-contiguous spaces, at the typical
- expense of carrying around more memory and increased fragmentation.
-
- The implementation is not very modular and seriously overuses
- macros. Perhaps someday all C compilers will do as good a job
- inlining modular code as can now be done by brute-force expansion,
- but now, enough of them seem not to.
-
- Some compilers issue a lot of warnings about code that is
- dead/unreachable only on some platforms, and also about intentional
- uses of negation on unsigned types. All known cases of each can be
- ignored.
-
- For a longer but out of date high-level description, see
- http://gee.cs.oswego.edu/dl/html/malloc.html
-
-* MSPACES
- If MSPACES is defined, then in addition to malloc, free, etc.,
- this file also defines mspace_malloc, mspace_free, etc. These
- are versions of malloc routines that take an "mspace" argument
- obtained using create_mspace, to control all internal bookkeeping.
- If ONLY_MSPACES is defined, only these versions are compiled.
- So if you would like to use this allocator for only some allocations,
- and your system malloc for others, you can compile with
- ONLY_MSPACES and then do something like...
- static mspace mymspace = create_mspace(0,0); // for example
- #define mymalloc(bytes) mspace_malloc(mymspace, bytes)
-
- (Note: If you only need one instance of an mspace, you can instead
- use "USE_DL_PREFIX" to relabel the global malloc.)
-
- You can similarly create thread-local allocators by storing
- mspaces as thread-locals. For example:
- static __thread mspace tlms = 0;
- void* tlmalloc(size_t bytes) {
- if (tlms == 0) tlms = create_mspace(0, 0);
- return mspace_malloc(tlms, bytes);
- }
- void tlfree(void* mem) { mspace_free(tlms, mem); }
-
- Unless FOOTERS is defined, each mspace is completely independent.
- You cannot allocate from one and free to another (although
- conformance is only weakly checked, so usage errors are not always
- caught). If FOOTERS is defined, then each chunk carries around a tag
- indicating its originating mspace, and frees are directed to their
- originating spaces. Normally, this requires use of locks.
-
- ------------------------- Compile-time options ---------------------------
-
-Be careful in setting #define values for numerical constants of type
-size_t. On some systems, literal values are not automatically extended
-to size_t precision unless they are explicitly casted. You can also
-use the symbolic values MAX_SIZE_T, SIZE_T_ONE, etc below.
-
-WIN32 default: defined if _WIN32 defined
- Defining WIN32 sets up defaults for MS environment and compilers.
- Otherwise defaults are for unix. Beware that there seem to be some
- cases where this malloc might not be a pure drop-in replacement for
- Win32 malloc: Random-looking failures from Win32 GDI API's (eg;
- SetDIBits()) may be due to bugs in some video driver implementations
- when pixel buffers are malloc()ed, and the region spans more than
- one VirtualAlloc()ed region. Because dlmalloc uses a small (64Kb)
- default granularity, pixel buffers may straddle virtual allocation
- regions more often than when using the Microsoft allocator. You can
- avoid this by using VirtualAlloc() and VirtualFree() for all pixel
- buffers rather than using malloc(). If this is not possible,
- recompile this malloc with a larger DEFAULT_GRANULARITY. Note:
- in cases where MSC and gcc (cygwin) are known to differ on WIN32,
- conditions use _MSC_VER to distinguish them.
-
-DLMALLOC_EXPORT default: extern
- Defines how public APIs are declared. If you want to export via a
- Windows DLL, you might define this as
- #define DLMALLOC_EXPORT extern __declspec(dllexport)
- If you want a POSIX ELF shared object, you might use
- #define DLMALLOC_EXPORT extern __attribute__((visibility("default")))
-
-MALLOC_ALIGNMENT default: (size_t)(2 * sizeof(void *))
- Controls the minimum alignment for malloc'ed chunks. It must be a
- power of two and at least 8, even on machines for which smaller
- alignments would suffice. It may be defined as larger than this
- though. Note however that code and data structures are optimized for
- the case of 8-byte alignment.
-
-MSPACES default: 0 (false)
- If true, compile in support for independent allocation spaces.
- This is only supported if HAVE_MMAP is true.
-
-ONLY_MSPACES default: 0 (false)
- If true, only compile in mspace versions, not regular versions.
-
-USE_LOCKS default: 0 (false)
- Causes each call to each public routine to be surrounded with
- pthread or WIN32 mutex lock/unlock. (If set true, this can be
- overridden on a per-mspace basis for mspace versions.) If set to a
- non-zero value other than 1, locks are used, but their
- implementation is left out, so lock functions must be supplied manually,
- as described below.
-
-USE_SPIN_LOCKS default: 1 iff USE_LOCKS and spin locks available
- If true, uses custom spin locks for locking. This is currently
- supported only gcc >= 4.1, older gccs on x86 platforms, and recent
- MS compilers. Otherwise, posix locks or win32 critical sections are
- used.
-
-USE_RECURSIVE_LOCKS default: not defined
- If defined nonzero, uses recursive (aka reentrant) locks, otherwise
- uses plain mutexes. This is not required for malloc proper, but may
- be needed for layered allocators such as nedmalloc.
-
-LOCK_AT_FORK default: not defined
- If defined nonzero, performs pthread_atfork upon initialization
- to initialize child lock while holding parent lock. The implementation
- assumes that pthread locks (not custom locks) are being used. In other
- cases, you may need to customize the implementation.
-
-FOOTERS default: 0
- If true, provide extra checking and dispatching by placing
- information in the footers of allocated chunks. This adds
- space and time overhead.
-
-INSECURE default: 0
- If true, omit checks for usage errors and heap space overwrites.
-
-USE_DL_PREFIX default: NOT defined
- Causes compiler to prefix all public routines with the string 'dl'.
- This can be useful when you only want to use this malloc in one part
- of a program, using your regular system malloc elsewhere.
-
-MALLOC_INSPECT_ALL default: NOT defined
- If defined, compiles malloc_inspect_all and mspace_inspect_all, that
- perform traversal of all heap space. Unless access to these
- functions is otherwise restricted, you probably do not want to
- include them in secure implementations.
-
-ABORT default: defined as abort()
- Defines how to abort on failed checks. On most systems, a failed
- check cannot die with an "assert" or even print an informative
- message, because the underlying print routines in turn call malloc,
- which will fail again. Generally, the best policy is to simply call
- abort(). It's not very useful to do more than this because many
- errors due to overwriting will show up as address faults (null, odd
- addresses etc) rather than malloc-triggered checks, so will also
- abort. Also, most compilers know that abort() does not return, so
- can better optimize code conditionally calling it.
-
-PROCEED_ON_ERROR default: defined as 0 (false)
- Controls whether detected bad addresses cause them to bypassed
- rather than aborting. If set, detected bad arguments to free and
- realloc are ignored. And all bookkeeping information is zeroed out
- upon a detected overwrite of freed heap space, thus losing the
- ability to ever return it from malloc again, but enabling the
- application to proceed. If PROCEED_ON_ERROR is defined, the
- static variable malloc_corruption_error_count is compiled in
- and can be examined to see if errors have occurred. This option
- generates slower code than the default abort policy.
-
-DEBUG default: NOT defined
- The DEBUG setting is mainly intended for people trying to modify
- this code or diagnose problems when porting to new platforms.
- However, it may also be able to better isolate user errors than just
- using runtime checks. The assertions in the check routines spell
- out in more detail the assumptions and invariants underlying the
- algorithms. The checking is fairly extensive, and will slow down
- execution noticeably. Calling malloc_stats or mallinfo with DEBUG
- set will attempt to check every non-mmapped allocated and free chunk
- in the course of computing the summaries.
-
-ABORT_ON_ASSERT_FAILURE default: defined as 1 (true)
- Debugging assertion failures can be nearly impossible if your
- version of the assert macro causes malloc to be called, which will
- lead to a cascade of further failures, blowing the runtime stack.
- ABORT_ON_ASSERT_FAILURE cause assertions failures to call abort(),
- which will usually make debugging easier.
-
-MALLOC_FAILURE_ACTION default: sets errno to ENOMEM, or no-op on win32
- The action to take before "return 0" when malloc fails to be able to
- return memory because there is none available.
-
-HAVE_MORECORE default: 1 (true) unless win32 or ONLY_MSPACES
- True if this system supports sbrk or an emulation of it.
-
-MORECORE default: sbrk
- The name of the sbrk-style system routine to call to obtain more
- memory. See below for guidance on writing custom MORECORE
- functions. The type of the argument to sbrk/MORECORE varies across
- systems. It cannot be size_t, because it supports negative
- arguments, so it is normally the signed type of the same width as
- size_t (sometimes declared as "intptr_t"). It doesn't much matter
- though. Internally, we only call it with arguments less than half
- the max value of a size_t, which should work across all reasonable
- possibilities, although sometimes generating compiler warnings.
-
-MORECORE_CONTIGUOUS default: 1 (true) if HAVE_MORECORE
- If true, take advantage of fact that consecutive calls to MORECORE
- with positive arguments always return contiguous increasing
- addresses. This is true of unix sbrk. It does not hurt too much to
- set it true anyway, since malloc copes with non-contiguities.
- Setting it false when definitely non-contiguous saves time
- and possibly wasted space it would take to discover this though.
-
-MORECORE_CANNOT_TRIM default: NOT defined
- True if MORECORE cannot release space back to the system when given
- negative arguments. This is generally necessary only if you are
- using a hand-crafted MORECORE function that cannot handle negative
- arguments.
-
-NO_SEGMENT_TRAVERSAL default: 0
- If non-zero, suppresses traversals of memory segments
- returned by either MORECORE or CALL_MMAP. This disables
- merging of segments that are contiguous, and selectively
- releasing them to the OS if unused, but bounds execution times.
-
-HAVE_MMAP default: 1 (true)
- True if this system supports mmap or an emulation of it. If so, and
- HAVE_MORECORE is not true, MMAP is used for all system
- allocation. If set and HAVE_MORECORE is true as well, MMAP is
- primarily used to directly allocate very large blocks. It is also
- used as a backup strategy in cases where MORECORE fails to provide
- space from system. Note: A single call to MUNMAP is assumed to be
- able to unmap memory that may have be allocated using multiple calls
- to MMAP, so long as they are adjacent.
-
-HAVE_MREMAP default: 1 on linux, else 0
- If true realloc() uses mremap() to re-allocate large blocks and
- extend or shrink allocation spaces.
-
-MMAP_CLEARS default: 1 except on WINCE.
- True if mmap clears memory so calloc doesn't need to. This is true
- for standard unix mmap using /dev/zero and on WIN32 except for WINCE.
-
-USE_BUILTIN_FFS default: 0 (i.e., not used)
- Causes malloc to use the builtin ffs() function to compute indices.
- Some compilers may recognize and intrinsify ffs to be faster than the
- supplied C version. Also, the case of x86 using gcc is special-cased
- to an asm instruction, so is already as fast as it can be, and so
- this setting has no effect. Similarly for Win32 under recent MS compilers.
- (On most x86s, the asm version is only slightly faster than the C version.)
-
-malloc_getpagesize default: derive from system includes, or 4096.
- The system page size. To the extent possible, this malloc manages
- memory from the system in page-size units. This may be (and
- usually is) a function rather than a constant. This is ignored
- if WIN32, where page size is determined using getSystemInfo during
- initialization.
-
-USE_DEV_RANDOM default: 0 (i.e., not used)
- Causes malloc to use /dev/random to initialize secure magic seed for
- stamping footers. Otherwise, the current time is used.
-
-NO_MALLINFO default: 0
- If defined, don't compile "mallinfo". This can be a simple way
- of dealing with mismatches between system declarations and
- those in this file.
-
-MALLINFO_FIELD_TYPE default: size_t
- The type of the fields in the mallinfo struct. This was originally
- defined as "int" in SVID etc, but is more usefully defined as
- size_t. The value is used only if HAVE_USR_INCLUDE_MALLOC_H is not set
-
-NO_MALLOC_STATS default: 0
- If defined, don't compile "malloc_stats". This avoids calls to
- fprintf and bringing in stdio dependencies you might not want.
-
-REALLOC_ZERO_BYTES_FREES default: not defined
- This should be set if a call to realloc with zero bytes should
- be the same as a call to free. Some people think it should. Otherwise,
- since this malloc returns a unique pointer for malloc(0), so does
- realloc(p, 0).
-
-LACKS_UNISTD_H, LACKS_FCNTL_H, LACKS_SYS_PARAM_H, LACKS_SYS_MMAN_H
-LACKS_STRINGS_H, LACKS_STRING_H, LACKS_SYS_TYPES_H, LACKS_ERRNO_H
-LACKS_STDLIB_H LACKS_SCHED_H LACKS_TIME_H default: NOT defined unless on WIN32
- Define these if your system does not have these header files.
- You might need to manually insert some of the declarations they provide.
-
-DEFAULT_GRANULARITY default: page size if MORECORE_CONTIGUOUS,
- system_info.dwAllocationGranularity in WIN32,
- otherwise 64K.
- Also settable using mallopt(M_GRANULARITY, x)
- The unit for allocating and deallocating memory from the system. On
- most systems with contiguous MORECORE, there is no reason to
- make this more than a page. However, systems with MMAP tend to
- either require or encourage larger granularities. You can increase
- this value to prevent system allocation functions to be called so
- often, especially if they are slow. The value must be at least one
- page and must be a power of two. Setting to 0 causes initialization
- to either page size or win32 region size. (Note: In previous
- versions of malloc, the equivalent of this option was called
- "TOP_PAD")
-
-DEFAULT_TRIM_THRESHOLD default: 2MB
- Also settable using mallopt(M_TRIM_THRESHOLD, x)
- The maximum amount of unused top-most memory to keep before
- releasing via malloc_trim in free(). Automatic trimming is mainly
- useful in long-lived programs using contiguous MORECORE. Because
- trimming via sbrk can be slow on some systems, and can sometimes be
- wasteful (in cases where programs immediately afterward allocate
- more large chunks) the value should be high enough so that your
- overall system performance would improve by releasing this much
- memory. As a rough guide, you might set to a value close to the
- average size of a process (program) running on your system.
- Releasing this much memory would allow such a process to run in
- memory. Generally, it is worth tuning trim thresholds when a
- program undergoes phases where several large chunks are allocated
- and released in ways that can reuse each other's storage, perhaps
- mixed with phases where there are no such chunks at all. The trim
- value must be greater than page size to have any useful effect. To
- disable trimming completely, you can set to MAX_SIZE_T. Note that the trick
- some people use of mallocing a huge space and then freeing it at
- program startup, in an attempt to reserve system memory, doesn't
- have the intended effect under automatic trimming, since that memory
- will immediately be returned to the system.
-
-DEFAULT_MMAP_THRESHOLD default: 256K
- Also settable using mallopt(M_MMAP_THRESHOLD, x)
- The request size threshold for using MMAP to directly service a
- request. Requests of at least this size that cannot be allocated
- using already-existing space will be serviced via mmap. (If enough
- normal freed space already exists it is used instead.) Using mmap
- segregates relatively large chunks of memory so that they can be
- individually obtained and released from the host system. A request
- serviced through mmap is never reused by any other request (at least
- not directly; the system may just so happen to remap successive
- requests to the same locations). Segregating space in this way has
- the benefits that: Mmapped space can always be individually released
- back to the system, which helps keep the system level memory demands
- of a long-lived program low. Also, mapped memory doesn't become
- `locked' between other chunks, as can happen with normally allocated
- chunks, which means that even trimming via malloc_trim would not
- release them. However, it has the disadvantage that the space
- cannot be reclaimed, consolidated, and then used to service later
- requests, as happens with normal chunks. The advantages of mmap
- nearly always outweigh disadvantages for "large" chunks, but the
- value of "large" may vary across systems. The default is an
- empirically derived value that works well in most systems. You can
- disable mmap by setting to MAX_SIZE_T.
-
-MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
- The number of consolidated frees between checks to release
- unused segments when freeing. When using non-contiguous segments,
- especially with multiple mspaces, checking only for topmost space
- doesn't always suffice to trigger trimming. To compensate for this,
- free() will, with a period of MAX_RELEASE_CHECK_RATE (or the
- current number of segments, if greater) try to release unused
- segments to the OS when freeing chunks that result in
- consolidation. The best value for this parameter is a compromise
- between slowing down frees with relatively costly checks that
- rarely trigger versus holding on to unused memory. To effectively
- disable, set to MAX_SIZE_T. This may lead to a very slight speed
- improvement at the expense of carrying around more memory.
-*/
-
-/* Version identifier to allow people to support multiple versions */
-#ifndef DLMALLOC_VERSION
-#define DLMALLOC_VERSION 20806
-#endif /* DLMALLOC_VERSION */
-
-#ifndef DLMALLOC_EXPORT
-#define DLMALLOC_EXPORT extern
-#endif
-
-#ifndef WIN32
-#ifdef _WIN32
-#define WIN32 1
-#endif /* _WIN32 */
-#ifdef _WIN32_WCE
-#define LACKS_FCNTL_H
-#define WIN32 1
-#endif /* _WIN32_WCE */
-#endif /* WIN32 */
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <tchar.h>
-#define HAVE_MMAP 1
-#define HAVE_MORECORE 0
-#define LACKS_UNISTD_H
-#define LACKS_SYS_PARAM_H
-#define LACKS_SYS_MMAN_H
-#define LACKS_STRING_H
-#define LACKS_STRINGS_H
-#define LACKS_SYS_TYPES_H
-#define LACKS_ERRNO_H
-#define LACKS_SCHED_H
-#ifndef MALLOC_FAILURE_ACTION
-#define MALLOC_FAILURE_ACTION
-#endif /* MALLOC_FAILURE_ACTION */
-#ifndef MMAP_CLEARS
-#ifdef _WIN32_WCE /* WINCE reportedly does not clear */
-#define MMAP_CLEARS 0
-#else
-#define MMAP_CLEARS 1
-#endif /* _WIN32_WCE */
-#endif /*MMAP_CLEARS */
-#endif /* WIN32 */
-
-#if defined(DARWIN) || defined(_DARWIN)
-/* Mac OSX docs advise not to use sbrk; it seems better to use mmap */
-#ifndef HAVE_MORECORE
-#define HAVE_MORECORE 0
-#define HAVE_MMAP 1
-/* OSX allocators provide 16 byte alignment */
-#ifndef MALLOC_ALIGNMENT
-#define MALLOC_ALIGNMENT ((size_t)16U)
-#endif
-#endif /* HAVE_MORECORE */
-#endif /* DARWIN */
-
-#ifndef LACKS_SYS_TYPES_H
-#include <sys/types.h> /* For size_t */
-#endif /* LACKS_SYS_TYPES_H */
-
-/* The maximum possible size_t value has all bits set */
-#define MAX_SIZE_T (~(size_t)0)
-
-#ifndef USE_LOCKS /* ensure true if spin or recursive locks set */
-#define USE_LOCKS ((defined(USE_SPIN_LOCKS) && USE_SPIN_LOCKS != 0) || \
- (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0))
-#endif /* USE_LOCKS */
-
-#if USE_LOCKS /* Spin locks for gcc >= 4.1, older gcc on x86, MSC >= 1310 */
-#if ((defined(__GNUC__) && \
- ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) || \
- defined(__i386__) || defined(__x86_64__))) || \
- (defined(_MSC_VER) && _MSC_VER>=1310))
-#ifndef USE_SPIN_LOCKS
-#define USE_SPIN_LOCKS 1
-#endif /* USE_SPIN_LOCKS */
-#elif USE_SPIN_LOCKS
-#error "USE_SPIN_LOCKS defined without implementation"
-#endif /* ... locks available... */
-#elif !defined(USE_SPIN_LOCKS)
-#define USE_SPIN_LOCKS 0
-#endif /* USE_LOCKS */
-
-#ifndef ONLY_MSPACES
-#define ONLY_MSPACES 0
-#endif /* ONLY_MSPACES */
-#ifndef MSPACES
-#if ONLY_MSPACES
-#define MSPACES 1
-#else /* ONLY_MSPACES */
-#define MSPACES 0
-#endif /* ONLY_MSPACES */
-#endif /* MSPACES */
-#ifndef MALLOC_ALIGNMENT
-#define MALLOC_ALIGNMENT ((size_t)(2 * sizeof(void *)))
-#endif /* MALLOC_ALIGNMENT */
-#ifndef FOOTERS
-#define FOOTERS 0
-#endif /* FOOTERS */
-#ifndef ABORT
-#define ABORT abort()
-#endif /* ABORT */
-#ifndef ABORT_ON_ASSERT_FAILURE
-#define ABORT_ON_ASSERT_FAILURE 1
-#endif /* ABORT_ON_ASSERT_FAILURE */
-#ifndef PROCEED_ON_ERROR
-#define PROCEED_ON_ERROR 0
-#endif /* PROCEED_ON_ERROR */
-
-#ifndef INSECURE
-#define INSECURE 0
-#endif /* INSECURE */
-#ifndef MALLOC_INSPECT_ALL
-#define MALLOC_INSPECT_ALL 0
-#endif /* MALLOC_INSPECT_ALL */
-#ifndef HAVE_MMAP
-#define HAVE_MMAP 1
-#endif /* HAVE_MMAP */
-#ifndef MMAP_CLEARS
-#define MMAP_CLEARS 1
-#endif /* MMAP_CLEARS */
-#ifndef HAVE_MREMAP
-#ifdef linux
-#define HAVE_MREMAP 1
-#define _GNU_SOURCE /* Turns on mremap() definition */
-#else /* linux */
-#define HAVE_MREMAP 0
-#endif /* linux */
-#endif /* HAVE_MREMAP */
-#ifndef MALLOC_FAILURE_ACTION
-#define MALLOC_FAILURE_ACTION errno = ENOMEM;
-#endif /* MALLOC_FAILURE_ACTION */
-#ifndef HAVE_MORECORE
-#if ONLY_MSPACES
-#define HAVE_MORECORE 0
-#else /* ONLY_MSPACES */
-#define HAVE_MORECORE 1
-#endif /* ONLY_MSPACES */
-#endif /* HAVE_MORECORE */
-#if !HAVE_MORECORE
-#define MORECORE_CONTIGUOUS 0
-#else /* !HAVE_MORECORE */
-#define MORECORE_DEFAULT sbrk
-#ifndef MORECORE_CONTIGUOUS
-#define MORECORE_CONTIGUOUS 1
-#endif /* MORECORE_CONTIGUOUS */
-#endif /* HAVE_MORECORE */
-#ifndef DEFAULT_GRANULARITY
-#if (MORECORE_CONTIGUOUS || defined(WIN32))
-#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */
-#else /* MORECORE_CONTIGUOUS */
-#define DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U)
-#endif /* MORECORE_CONTIGUOUS */
-#endif /* DEFAULT_GRANULARITY */
-#ifndef DEFAULT_TRIM_THRESHOLD
-#ifndef MORECORE_CANNOT_TRIM
-#define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U)
-#else /* MORECORE_CANNOT_TRIM */
-#define DEFAULT_TRIM_THRESHOLD MAX_SIZE_T
-#endif /* MORECORE_CANNOT_TRIM */
-#endif /* DEFAULT_TRIM_THRESHOLD */
-#ifndef DEFAULT_MMAP_THRESHOLD
-#if HAVE_MMAP
-#define DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U)
-#else /* HAVE_MMAP */
-#define DEFAULT_MMAP_THRESHOLD MAX_SIZE_T
-#endif /* HAVE_MMAP */
-#endif /* DEFAULT_MMAP_THRESHOLD */
-#ifndef MAX_RELEASE_CHECK_RATE
-#if HAVE_MMAP
-#define MAX_RELEASE_CHECK_RATE 4095
-#else
-#define MAX_RELEASE_CHECK_RATE MAX_SIZE_T
-#endif /* HAVE_MMAP */
-#endif /* MAX_RELEASE_CHECK_RATE */
-#ifndef USE_BUILTIN_FFS
-#define USE_BUILTIN_FFS 0
-#endif /* USE_BUILTIN_FFS */
-#ifndef USE_DEV_RANDOM
-#define USE_DEV_RANDOM 0
-#endif /* USE_DEV_RANDOM */
-#ifndef NO_MALLINFO
-#define NO_MALLINFO 0
-#endif /* NO_MALLINFO */
-#ifndef MALLINFO_FIELD_TYPE
-#define MALLINFO_FIELD_TYPE size_t
-#endif /* MALLINFO_FIELD_TYPE */
-#ifndef NO_MALLOC_STATS
-#define NO_MALLOC_STATS 0
-#endif /* NO_MALLOC_STATS */
-#ifndef NO_SEGMENT_TRAVERSAL
-#define NO_SEGMENT_TRAVERSAL 0
-#endif /* NO_SEGMENT_TRAVERSAL */
-
-/*
- mallopt tuning options. SVID/XPG defines four standard parameter
- numbers for mallopt, normally defined in malloc.h. None of these
- are used in this malloc, so setting them has no effect. But this
- malloc does support the following options.
-*/
-
-#define M_TRIM_THRESHOLD (-1)
-#define M_GRANULARITY (-2)
-#define M_MMAP_THRESHOLD (-3)
-
-/* ------------------------ Mallinfo declarations ------------------------ */
-
-#if !NO_MALLINFO
-/*
- This version of malloc supports the standard SVID/XPG mallinfo
- routine that returns a struct containing usage properties and
- statistics. It should work on any system that has a
- /usr/include/malloc.h defining struct mallinfo. The main
- declaration needed is the mallinfo struct that is returned (by-copy)
- by mallinfo(). The malloinfo struct contains a bunch of fields that
- are not even meaningful in this version of malloc. These fields are
- are instead filled by mallinfo() with other numbers that might be of
- interest.
-
- HAVE_USR_INCLUDE_MALLOC_H should be set if you have a
- /usr/include/malloc.h file that includes a declaration of struct
- mallinfo. If so, it is included; else a compliant version is
- declared below. These must be precisely the same for mallinfo() to
- work. The original SVID version of this struct, defined on most
- systems with mallinfo, declares all fields as ints. But some others
- define as unsigned long. If your system defines the fields using a
- type of different width than listed here, you MUST #include your
- system version and #define HAVE_USR_INCLUDE_MALLOC_H.
-*/
-
-/* #define HAVE_USR_INCLUDE_MALLOC_H */
-
-#ifdef HAVE_USR_INCLUDE_MALLOC_H
-#include "/usr/include/malloc.h"
-#else /* HAVE_USR_INCLUDE_MALLOC_H */
-#ifndef STRUCT_MALLINFO_DECLARED
-/* HP-UX (and others?) redefines mallinfo unless _STRUCT_MALLINFO is defined */
-#define _STRUCT_MALLINFO
-#define STRUCT_MALLINFO_DECLARED 1
-struct mallinfo {
- MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */
- MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */
- MALLINFO_FIELD_TYPE smblks; /* always 0 */
- MALLINFO_FIELD_TYPE hblks; /* always 0 */
- MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */
- MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */
- MALLINFO_FIELD_TYPE fsmblks; /* always 0 */
- MALLINFO_FIELD_TYPE uordblks; /* total allocated space */
- MALLINFO_FIELD_TYPE fordblks; /* total free space */
- MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */
-};
-#endif /* STRUCT_MALLINFO_DECLARED */
-#endif /* HAVE_USR_INCLUDE_MALLOC_H */
-#endif /* NO_MALLINFO */
-
-/*
- Try to persuade compilers to inline. The most critical functions for
- inlining are defined as macros, so these aren't used for them.
-*/
-
-#ifndef FORCEINLINE
- #if defined(__GNUC__)
-#define FORCEINLINE __inline __attribute__ ((always_inline))
- #elif defined(_MSC_VER)
- #define FORCEINLINE __forceinline
- #endif
-#endif
-#ifndef NOINLINE
- #if defined(__GNUC__)
- #define NOINLINE __attribute__ ((noinline))
- #elif defined(_MSC_VER)
- #define NOINLINE __declspec(noinline)
- #else
- #define NOINLINE
- #endif
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#ifndef FORCEINLINE
- #define FORCEINLINE inline
-#endif
-#endif /* __cplusplus */
-#ifndef FORCEINLINE
- #define FORCEINLINE
-#endif
-
-#if !ONLY_MSPACES
-
-/* ------------------- Declarations of public routines ------------------- */
-
-#ifndef USE_DL_PREFIX
-#define dlcalloc calloc
-#define dlfree free
-#define dlmalloc malloc
-#define dlmemalign memalign
-#define dlposix_memalign posix_memalign
-#define dlrealloc realloc
-#define dlrealloc_in_place realloc_in_place
-#define dlvalloc valloc
-#define dlpvalloc pvalloc
-#define dlmallinfo mallinfo
-#define dlmallopt mallopt
-#define dlmalloc_trim malloc_trim
-#define dlmalloc_stats malloc_stats
-#define dlmalloc_usable_size malloc_usable_size
-#define dlmalloc_footprint malloc_footprint
-#define dlmalloc_max_footprint malloc_max_footprint
-#define dlmalloc_footprint_limit malloc_footprint_limit
-#define dlmalloc_set_footprint_limit malloc_set_footprint_limit
-#define dlmalloc_inspect_all malloc_inspect_all
-#define dlindependent_calloc independent_calloc
-#define dlindependent_comalloc independent_comalloc
-#define dlbulk_free bulk_free
-#endif /* USE_DL_PREFIX */
-
-/*
- malloc(size_t n)
- Returns a pointer to a newly allocated chunk of at least n bytes, or
- null if no space is available, in which case errno is set to ENOMEM
- on ANSI C systems.
-
- If n is zero, malloc returns a minimum-sized chunk. (The minimum
- size is 16 bytes on most 32bit systems, and 32 bytes on 64bit
- systems.) Note that size_t is an unsigned type, so calls with
- arguments that would be negative if signed are interpreted as
- requests for huge amounts of space, which will often fail. The
- maximum supported value of n differs across systems, but is in all
- cases less than the maximum representable value of a size_t.
-*/
-DLMALLOC_EXPORT void* dlmalloc(size_t);
-
-/*
- free(void* p)
- Releases the chunk of memory pointed to by p, that had been previously
- allocated using malloc or a related routine such as realloc.
- It has no effect if p is null. If p was not malloced or already
- freed, free(p) will by default cause the current program to abort.
-*/
-DLMALLOC_EXPORT void dlfree(void*);
-
-/*
- calloc(size_t n_elements, size_t element_size);
- Returns a pointer to n_elements * element_size bytes, with all locations
- set to zero.
-*/
-DLMALLOC_EXPORT void* dlcalloc(size_t, size_t);
-
-/*
- realloc(void* p, size_t n)
- Returns a pointer to a chunk of size n that contains the same data
- as does chunk p up to the minimum of (n, p's size) bytes, or null
- if no space is available.
-
- The returned pointer may or may not be the same as p. The algorithm
- prefers extending p in most cases when possible, otherwise it
- employs the equivalent of a malloc-copy-free sequence.
-
- If p is null, realloc is equivalent to malloc.
-
- If space is not available, realloc returns null, errno is set (if on
- ANSI) and p is NOT freed.
-
- if n is for fewer bytes than already held by p, the newly unused
- space is lopped off and freed if possible. realloc with a size
- argument of zero (re)allocates a minimum-sized chunk.
-
- The old unix realloc convention of allowing the last-free'd chunk
- to be used as an argument to realloc is not supported.
-*/
-DLMALLOC_EXPORT void* dlrealloc(void*, size_t);
-
-/*
- realloc_in_place(void* p, size_t n)
- Resizes the space allocated for p to size n, only if this can be
- done without moving p (i.e., only if there is adjacent space
- available if n is greater than p's current allocated size, or n is
- less than or equal to p's size). This may be used instead of plain
- realloc if an alternative allocation strategy is needed upon failure
- to expand space; for example, reallocation of a buffer that must be
- memory-aligned or cleared. You can use realloc_in_place to trigger
- these alternatives only when needed.
-
- Returns p if successful; otherwise null.
-*/
-DLMALLOC_EXPORT void* dlrealloc_in_place(void*, size_t);
-
-/*
- memalign(size_t alignment, size_t n);
- Returns a pointer to a newly allocated chunk of n bytes, aligned
- in accord with the alignment argument.
-
- The alignment argument should be a power of two. If the argument is
- not a power of two, the nearest greater power is used.
- 8-byte alignment is guaranteed by normal malloc calls, so don't
- bother calling memalign with an argument of 8 or less.
-
- Overreliance on memalign is a sure way to fragment space.
-*/
-DLMALLOC_EXPORT void* dlmemalign(size_t, size_t);
-
-/*
- int posix_memalign(void** pp, size_t alignment, size_t n);
- Allocates a chunk of n bytes, aligned in accord with the alignment
- argument. Differs from memalign only in that it (1) assigns the
- allocated memory to *pp rather than returning it, (2) fails and
- returns EINVAL if the alignment is not a power of two (3) fails and
- returns ENOMEM if memory cannot be allocated.
-*/
-DLMALLOC_EXPORT int dlposix_memalign(void**, size_t, size_t);
-
-/*
- valloc(size_t n);
- Equivalent to memalign(pagesize, n), where pagesize is the page
- size of the system. If the pagesize is unknown, 4096 is used.
-*/
-DLMALLOC_EXPORT void* dlvalloc(size_t);
-
-/*
- mallopt(int parameter_number, int parameter_value)
- Sets tunable parameters The format is to provide a
- (parameter-number, parameter-value) pair. mallopt then sets the
- corresponding parameter to the argument value if it can (i.e., so
- long as the value is meaningful), and returns 1 if successful else
- 0. To workaround the fact that mallopt is specified to use int,
- not size_t parameters, the value -1 is specially treated as the
- maximum unsigned size_t value.
-
- SVID/XPG/ANSI defines four standard param numbers for mallopt,
- normally defined in malloc.h. None of these are use in this malloc,
- so setting them has no effect. But this malloc also supports other
- options in mallopt. See below for details. Briefly, supported
- parameters are as follows (listed defaults are for "typical"
- configurations).
-
- Symbol param # default allowed param values
- M_TRIM_THRESHOLD -1 2*1024*1024 any (-1 disables)
- M_GRANULARITY -2 page size any power of 2 >= page size
- M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support)
-*/
-DLMALLOC_EXPORT int dlmallopt(int, int);
-
-/*
- malloc_footprint();
- Returns the number of bytes obtained from the system. The total
- number of bytes allocated by malloc, realloc etc., is less than this
- value. Unlike mallinfo, this function returns only a precomputed
- result, so can be called frequently to monitor memory consumption.
- Even if locks are otherwise defined, this function does not use them,
- so results might not be up to date.
-*/
-DLMALLOC_EXPORT size_t dlmalloc_footprint(void);
-
-/*
- malloc_max_footprint();
- Returns the maximum number of bytes obtained from the system. This
- value will be greater than current footprint if deallocated space
- has been reclaimed by the system. The peak number of bytes allocated
- by malloc, realloc etc., is less than this value. Unlike mallinfo,
- this function returns only a precomputed result, so can be called
- frequently to monitor memory consumption. Even if locks are
- otherwise defined, this function does not use them, so results might
- not be up to date.
-*/
-DLMALLOC_EXPORT size_t dlmalloc_max_footprint(void);
-
-/*
- malloc_footprint_limit();
- Returns the number of bytes that the heap is allowed to obtain from
- the system, returning the last value returned by
- malloc_set_footprint_limit, or the maximum size_t value if
- never set. The returned value reflects a permission. There is no
- guarantee that this number of bytes can actually be obtained from
- the system.
-*/
-DLMALLOC_EXPORT size_t dlmalloc_footprint_limit();
-
-/*
- malloc_set_footprint_limit();
- Sets the maximum number of bytes to obtain from the system, causing
- failure returns from malloc and related functions upon attempts to
- exceed this value. The argument value may be subject to page
- rounding to an enforceable limit; this actual value is returned.
- Using an argument of the maximum possible size_t effectively
- disables checks. If the argument is less than or equal to the
- current malloc_footprint, then all future allocations that require
- additional system memory will fail. However, invocation cannot
- retroactively deallocate existing used memory.
-*/
-DLMALLOC_EXPORT size_t dlmalloc_set_footprint_limit(size_t bytes);
-
-#if MALLOC_INSPECT_ALL
-/*
- malloc_inspect_all(void(*handler)(void *start,
- void *end,
- size_t used_bytes,
- void* callback_arg),
- void* arg);
- Traverses the heap and calls the given handler for each managed
- region, skipping all bytes that are (or may be) used for bookkeeping
- purposes. Traversal does not include include chunks that have been
- directly memory mapped. Each reported region begins at the start
- address, and continues up to but not including the end address. The
- first used_bytes of the region contain allocated data. If
- used_bytes is zero, the region is unallocated. The handler is
- invoked with the given callback argument. If locks are defined, they
- are held during the entire traversal. It is a bad idea to invoke
- other malloc functions from within the handler.
-
- For example, to count the number of in-use chunks with size greater
- than 1000, you could write:
- static int count = 0;
- void count_chunks(void* start, void* end, size_t used, void* arg) {
- if (used >= 1000) ++count;
- }
- then:
- malloc_inspect_all(count_chunks, NULL);
-
- malloc_inspect_all is compiled only if MALLOC_INSPECT_ALL is defined.
-*/
-DLMALLOC_EXPORT void dlmalloc_inspect_all(void(*handler)(void*, void *, size_t, void*),
- void* arg);
-
-#endif /* MALLOC_INSPECT_ALL */
-
-#if !NO_MALLINFO
-/*
- mallinfo()
- Returns (by copy) a struct containing various summary statistics:
-
- arena: current total non-mmapped bytes allocated from system
- ordblks: the number of free chunks
- smblks: always zero.
- hblks: current number of mmapped regions
- hblkhd: total bytes held in mmapped regions
- usmblks: the maximum total allocated space. This will be greater
- than current total if trimming has occurred.
- fsmblks: always zero
- uordblks: current total allocated space (normal or mmapped)
- fordblks: total free space
- keepcost: the maximum number of bytes that could ideally be released
- back to system via malloc_trim. ("ideally" means that
- it ignores page restrictions etc.)
-
- Because these fields are ints, but internal bookkeeping may
- be kept as longs, the reported values may wrap around zero and
- thus be inaccurate.
-*/
-DLMALLOC_EXPORT struct mallinfo dlmallinfo(void);
-#endif /* NO_MALLINFO */
-
-/*
- independent_calloc(size_t n_elements, size_t element_size, void* chunks[]);
-
- independent_calloc is similar to calloc, but instead of returning a
- single cleared space, it returns an array of pointers to n_elements
- independent elements that can hold contents of size elem_size, each
- of which starts out cleared, and can be independently freed,
- realloc'ed etc. The elements are guaranteed to be adjacently
- allocated (this is not guaranteed to occur with multiple callocs or
- mallocs), which may also improve cache locality in some
- applications.
-
- The "chunks" argument is optional (i.e., may be null, which is
- probably the most typical usage). If it is null, the returned array
- is itself dynamically allocated and should also be freed when it is
- no longer needed. Otherwise, the chunks array must be of at least
- n_elements in length. It is filled in with the pointers to the
- chunks.
-
- In either case, independent_calloc returns this pointer array, or
- null if the allocation failed. If n_elements is zero and "chunks"
- is null, it returns a chunk representing an array with zero elements
- (which should be freed if not wanted).
-
- Each element must be freed when it is no longer needed. This can be
- done all at once using bulk_free.
-
- independent_calloc simplifies and speeds up implementations of many
- kinds of pools. It may also be useful when constructing large data
- structures that initially have a fixed number of fixed-sized nodes,
- but the number is not known at compile time, and some of the nodes
- may later need to be freed. For example:
-
- struct Node { int item; struct Node* next; };
-
- struct Node* build_list() {
- struct Node** pool;
- int n = read_number_of_nodes_needed();
- if (n <= 0) return 0;
- pool = (struct Node**)(independent_calloc(n, sizeof(struct Node), 0);
- if (pool == 0) die();
- // organize into a linked list...
- struct Node* first = pool[0];
- for (i = 0; i < n-1; ++i)
- pool[i]->next = pool[i+1];
- free(pool); // Can now free the array (or not, if it is needed later)
- return first;
- }
-*/
-DLMALLOC_EXPORT void** dlindependent_calloc(size_t, size_t, void**);
-
-/*
- independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]);
-
- independent_comalloc allocates, all at once, a set of n_elements
- chunks with sizes indicated in the "sizes" array. It returns
- an array of pointers to these elements, each of which can be
- independently freed, realloc'ed etc. The elements are guaranteed to
- be adjacently allocated (this is not guaranteed to occur with
- multiple callocs or mallocs), which may also improve cache locality
- in some applications.
-
- The "chunks" argument is optional (i.e., may be null). If it is null
- the returned array is itself dynamically allocated and should also
- be freed when it is no longer needed. Otherwise, the chunks array
- must be of at least n_elements in length. It is filled in with the
- pointers to the chunks.
-
- In either case, independent_comalloc returns this pointer array, or
- null if the allocation failed. If n_elements is zero and chunks is
- null, it returns a chunk representing an array with zero elements
- (which should be freed if not wanted).
-
- Each element must be freed when it is no longer needed. This can be
- done all at once using bulk_free.
-
- independent_comallac differs from independent_calloc in that each
- element may have a different size, and also that it does not
- automatically clear elements.
-
- independent_comalloc can be used to speed up allocation in cases
- where several structs or objects must always be allocated at the
- same time. For example:
-
- struct Head { ... }
- struct Foot { ... }
-
- void send_message(char* msg) {
- int msglen = strlen(msg);
- size_t sizes[3] = { sizeof(struct Head), msglen, sizeof(struct Foot) };
- void* chunks[3];
- if (independent_comalloc(3, sizes, chunks) == 0)
- die();
- struct Head* head = (struct Head*)(chunks[0]);
- char* body = (char*)(chunks[1]);
- struct Foot* foot = (struct Foot*)(chunks[2]);
- // ...
- }
-
- In general though, independent_comalloc is worth using only for
- larger values of n_elements. For small values, you probably won't
- detect enough difference from series of malloc calls to bother.
-
- Overuse of independent_comalloc can increase overall memory usage,
- since it cannot reuse existing noncontiguous small chunks that
- might be available for some of the elements.
-*/
-DLMALLOC_EXPORT void** dlindependent_comalloc(size_t, size_t*, void**);
-
-/*
- bulk_free(void* array[], size_t n_elements)
- Frees and clears (sets to null) each non-null pointer in the given
- array. This is likely to be faster than freeing them one-by-one.
- If footers are used, pointers that have been allocated in different
- mspaces are not freed or cleared, and the count of all such pointers
- is returned. For large arrays of pointers with poor locality, it
- may be worthwhile to sort this array before calling bulk_free.
-*/
-DLMALLOC_EXPORT size_t dlbulk_free(void**, size_t n_elements);
-
-/*
- pvalloc(size_t n);
- Equivalent to valloc(minimum-page-that-holds(n)), that is,
- round up n to nearest pagesize.
- */
-DLMALLOC_EXPORT void* dlpvalloc(size_t);
-
-/*
- malloc_trim(size_t pad);
-
- If possible, gives memory back to the system (via negative arguments
- to sbrk) if there is unused memory at the `high' end of the malloc
- pool or in unused MMAP segments. You can call this after freeing
- large blocks of memory to potentially reduce the system-level memory
- requirements of a program. However, it cannot guarantee to reduce
- memory. Under some allocation patterns, some large free blocks of
- memory will be locked between two used chunks, so they cannot be
- given back to the system.
-
- The `pad' argument to malloc_trim represents the amount of free
- trailing space to leave untrimmed. If this argument is zero, only
- the minimum amount of memory to maintain internal data structures
- will be left. Non-zero arguments can be supplied to maintain enough
- trailing space to service future expected allocations without having
- to re-obtain memory from the system.
-
- Malloc_trim returns 1 if it actually released any memory, else 0.
-*/
-DLMALLOC_EXPORT int dlmalloc_trim(size_t);
-
-/*
- malloc_stats();
- Prints on stderr the amount of space obtained from the system (both
- via sbrk and mmap), the maximum amount (which may be more than
- current if malloc_trim and/or munmap got called), and the current
- number of bytes allocated via malloc (or realloc, etc) but not yet
- freed. Note that this is the number of bytes allocated, not the
- number requested. It will be larger than the number requested
- because of alignment and bookkeeping overhead. Because it includes
- alignment wastage as being in use, this figure may be greater than
- zero even when no user-level chunks are allocated.
-
- The reported current and maximum system memory can be inaccurate if
- a program makes other calls to system memory allocation functions
- (normally sbrk) outside of malloc.
-
- malloc_stats prints only the most commonly interesting statistics.
- More information can be obtained by calling mallinfo.
-*/
-DLMALLOC_EXPORT void dlmalloc_stats(void);
-
-/*
- malloc_usable_size(void* p);
-
- Returns the number of bytes you can actually use in
- an allocated chunk, which may be more than you requested (although
- often not) due to alignment and minimum size constraints.
- You can use this many bytes without worrying about
- overwriting other allocated objects. This is not a particularly great
- programming practice. malloc_usable_size can be more useful in
- debugging and assertions, for example:
-
- p = malloc(n);
- assert(malloc_usable_size(p) >= 256);
-*/
-size_t dlmalloc_usable_size(void*);
-
-#endif /* ONLY_MSPACES */
-
-#if MSPACES
-
-/*
- mspace is an opaque type representing an independent
- region of space that supports mspace_malloc, etc.
-*/
-typedef void* mspace;
-
-/*
- create_mspace creates and returns a new independent space with the
- given initial capacity, or, if 0, the default granularity size. It
- returns null if there is no system memory available to create the
- space. If argument locked is non-zero, the space uses a separate
- lock to control access. The capacity of the space will grow
- dynamically as needed to service mspace_malloc requests. You can
- control the sizes of incremental increases of this space by
- compiling with a different DEFAULT_GRANULARITY or dynamically
- setting with mallopt(M_GRANULARITY, value).
-*/
-DLMALLOC_EXPORT mspace create_mspace(size_t capacity, int locked);
-
-/*
- destroy_mspace destroys the given space, and attempts to return all
- of its memory back to the system, returning the total number of
- bytes freed. After destruction, the results of access to all memory
- used by the space become undefined.
-*/
-DLMALLOC_EXPORT size_t destroy_mspace(mspace msp);
-
-/*
- create_mspace_with_base uses the memory supplied as the initial base
- of a new mspace. Part (less than 128*sizeof(size_t) bytes) of this
- space is used for bookkeeping, so the capacity must be at least this
- large. (Otherwise 0 is returned.) When this initial space is
- exhausted, additional memory will be obtained from the system.
- Destroying this space will deallocate all additionally allocated
- space (if possible) but not the initial base.
-*/
-DLMALLOC_EXPORT mspace create_mspace_with_base(void* base, size_t capacity, int locked);
-
-/*
- mspace_track_large_chunks controls whether requests for large chunks
- are allocated in their own untracked mmapped regions, separate from
- others in this mspace. By default large chunks are not tracked,
- which reduces fragmentation. However, such chunks are not
- necessarily released to the system upon destroy_mspace. Enabling
- tracking by setting to true may increase fragmentation, but avoids
- leakage when relying on destroy_mspace to release all memory
- allocated using this space. The function returns the previous
- setting.
-*/
-DLMALLOC_EXPORT int mspace_track_large_chunks(mspace msp, int enable);
-
-
-/*
- mspace_malloc behaves as malloc, but operates within
- the given space.
-*/
-DLMALLOC_EXPORT void* mspace_malloc(mspace msp, size_t bytes);
-
-/*
- mspace_free behaves as free, but operates within
- the given space.
-
- If compiled with FOOTERS==1, mspace_free is not actually needed.
- free may be called instead of mspace_free because freed chunks from
- any space are handled by their originating spaces.
-*/
-DLMALLOC_EXPORT void mspace_free(mspace msp, void* mem);
-
-/*
- mspace_realloc behaves as realloc, but operates within
- the given space.
-
- If compiled with FOOTERS==1, mspace_realloc is not actually
- needed. realloc may be called instead of mspace_realloc because
- realloced chunks from any space are handled by their originating
- spaces.
-*/
-DLMALLOC_EXPORT void* mspace_realloc(mspace msp, void* mem, size_t newsize);
-
-/*
- mspace_calloc behaves as calloc, but operates within
- the given space.
-*/
-DLMALLOC_EXPORT void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size);
-
-/*
- mspace_memalign behaves as memalign, but operates within
- the given space.
-*/
-DLMALLOC_EXPORT void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
-
-/*
- mspace_independent_calloc behaves as independent_calloc, but
- operates within the given space.
-*/
-DLMALLOC_EXPORT void** mspace_independent_calloc(mspace msp, size_t n_elements,
- size_t elem_size, void* chunks[]);
-
-/*
- mspace_independent_comalloc behaves as independent_comalloc, but
- operates within the given space.
-*/
-DLMALLOC_EXPORT void** mspace_independent_comalloc(mspace msp, size_t n_elements,
- size_t sizes[], void* chunks[]);
-
-/*
- mspace_footprint() returns the number of bytes obtained from the
- system for this space.
-*/
-DLMALLOC_EXPORT size_t mspace_footprint(mspace msp);
-
-/*
- mspace_max_footprint() returns the peak number of bytes obtained from the
- system for this space.
-*/
-DLMALLOC_EXPORT size_t mspace_max_footprint(mspace msp);
-
-
-#if !NO_MALLINFO
-/*
- mspace_mallinfo behaves as mallinfo, but reports properties of
- the given space.
-*/
-DLMALLOC_EXPORT struct mallinfo mspace_mallinfo(mspace msp);
-#endif /* NO_MALLINFO */
-
-/*
- malloc_usable_size(void* p) behaves the same as malloc_usable_size;
-*/
-DLMALLOC_EXPORT size_t mspace_usable_size(const void* mem);
-
-/*
- mspace_malloc_stats behaves as malloc_stats, but reports
- properties of the given space.
-*/
-DLMALLOC_EXPORT void mspace_malloc_stats(mspace msp);
-
-/*
- mspace_trim behaves as malloc_trim, but
- operates within the given space.
-*/
-DLMALLOC_EXPORT int mspace_trim(mspace msp, size_t pad);
-
-/*
- An alias for mallopt.
-*/
-DLMALLOC_EXPORT int mspace_mallopt(int, int);
-
-#endif /* MSPACES */
-
-#ifdef __cplusplus
-} /* end of extern "C" */
-#endif /* __cplusplus */
-
-/*
- ========================================================================
- To make a fully customizable malloc.h header file, cut everything
- above this line, put into file malloc.h, edit to suit, and #include it
- on the next line, as well as in programs that use this malloc.
- ========================================================================
-*/
-
-/* #include "malloc.h" */
-
-/*------------------------------ internal #includes ---------------------- */
-
-#ifdef _MSC_VER
-#pragma warning( disable : 4146 ) /* no "unsigned" warnings */
-#endif /* _MSC_VER */
-#if !NO_MALLOC_STATS
-#include <stdio.h> /* for printing in malloc_stats */
-#endif /* NO_MALLOC_STATS */
-#ifndef LACKS_ERRNO_H
-#include <errno.h> /* for MALLOC_FAILURE_ACTION */
-#endif /* LACKS_ERRNO_H */
-#ifdef DEBUG
-#if ABORT_ON_ASSERT_FAILURE
-#undef assert
-#define assert(x) if(!(x)) ABORT
-#else /* ABORT_ON_ASSERT_FAILURE */
-#include <assert.h>
-#endif /* ABORT_ON_ASSERT_FAILURE */
-#else /* DEBUG */
-#ifndef assert
-#define assert(x)
-#endif
-#define DEBUG 0
-#endif /* DEBUG */
-#if !defined(WIN32) && !defined(LACKS_TIME_H)
-#include <time.h> /* for magic initialization */
-#endif /* WIN32 */
-#ifndef LACKS_STDLIB_H
-#include <stdlib.h> /* for abort() */
-#endif /* LACKS_STDLIB_H */
-#ifndef LACKS_STRING_H
-#include <string.h> /* for memset etc */
-#endif /* LACKS_STRING_H */
-#if USE_BUILTIN_FFS
-#ifndef LACKS_STRINGS_H
-#include <strings.h> /* for ffs */
-#endif /* LACKS_STRINGS_H */
-#endif /* USE_BUILTIN_FFS */
-#if HAVE_MMAP
-#ifndef LACKS_SYS_MMAN_H
-/* On some versions of linux, mremap decl in mman.h needs __USE_GNU set */
-#if (defined(linux) && !defined(__USE_GNU))
-#define __USE_GNU 1
-#include <sys/mman.h> /* for mmap */
-#undef __USE_GNU
-#else
-#include <sys/mman.h> /* for mmap */
-#endif /* linux */
-#endif /* LACKS_SYS_MMAN_H */
-#ifndef LACKS_FCNTL_H
-#include <fcntl.h>
-#endif /* LACKS_FCNTL_H */
-#endif /* HAVE_MMAP */
-#ifndef LACKS_UNISTD_H
-#include <unistd.h> /* for sbrk, sysconf */
-#else /* LACKS_UNISTD_H */
-#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
-extern void* sbrk(ptrdiff_t);
-#endif /* FreeBSD etc */
-#endif /* LACKS_UNISTD_H */
-
-/* Declarations for locking */
-#if USE_LOCKS
-#ifndef WIN32
-#if defined (__SVR4) && defined (__sun) /* solaris */
-#include <thread.h>
-#elif !defined(LACKS_SCHED_H)
-#include <sched.h>
-#endif /* solaris or LACKS_SCHED_H */
-#if (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0) || !USE_SPIN_LOCKS
-#include <pthread.h>
-#endif /* USE_RECURSIVE_LOCKS ... */
-#elif defined(_MSC_VER)
-#ifndef _M_AMD64
-/* These are already defined on AMD64 builds */
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-LONG __cdecl _InterlockedCompareExchange(LONG volatile *Dest, LONG Exchange, LONG Comp);
-LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-#endif /* _M_AMD64 */
-#pragma intrinsic (_InterlockedCompareExchange)
-#pragma intrinsic (_InterlockedExchange)
-#define interlockedcompareexchange _InterlockedCompareExchange
-#define interlockedexchange _InterlockedExchange
-#elif defined(WIN32) && defined(__GNUC__)
-#define interlockedcompareexchange(a, b, c) __sync_val_compare_and_swap(a, c, b)
-#define interlockedexchange __sync_lock_test_and_set
-#endif /* Win32 */
-#else /* USE_LOCKS */
-#endif /* USE_LOCKS */
-
-#ifndef LOCK_AT_FORK
-#define LOCK_AT_FORK 0
-#endif
-
-/* Declarations for bit scanning on win32 */
-#if defined(_MSC_VER) && _MSC_VER>=1300
-#ifndef BitScanForward /* Try to avoid pulling in WinNT.h */
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-unsigned char _BitScanForward(unsigned long *index, unsigned long mask);
-unsigned char _BitScanReverse(unsigned long *index, unsigned long mask);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#define BitScanForward _BitScanForward
-#define BitScanReverse _BitScanReverse
-#pragma intrinsic(_BitScanForward)
-#pragma intrinsic(_BitScanReverse)
-#endif /* BitScanForward */
-#endif /* defined(_MSC_VER) && _MSC_VER>=1300 */
-
-#ifndef WIN32
-#ifndef malloc_getpagesize
-# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */
-# ifndef _SC_PAGE_SIZE
-# define _SC_PAGE_SIZE _SC_PAGESIZE
-# endif
-# endif
-# ifdef _SC_PAGE_SIZE
-# define malloc_getpagesize sysconf(_SC_PAGE_SIZE)
-# else
-# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE)
- extern size_t getpagesize();
-# define malloc_getpagesize getpagesize()
-# else
-# ifdef WIN32 /* use supplied emulation of getpagesize */
-# define malloc_getpagesize getpagesize()
-# else
-# ifndef LACKS_SYS_PARAM_H
-# include <sys/param.h>
-# endif
-# ifdef EXEC_PAGESIZE
-# define malloc_getpagesize EXEC_PAGESIZE
-# else
-# ifdef NBPG
-# ifndef CLSIZE
-# define malloc_getpagesize NBPG
-# else
-# define malloc_getpagesize (NBPG * CLSIZE)
-# endif
-# else
-# ifdef NBPC
-# define malloc_getpagesize NBPC
-# else
-# ifdef PAGESIZE
-# define malloc_getpagesize PAGESIZE
-# else /* just guess */
-# define malloc_getpagesize ((size_t)4096U)
-# endif
-# endif
-# endif
-# endif
-# endif
-# endif
-# endif
-#endif
-#endif
-
-/* ------------------- size_t and alignment properties -------------------- */
-
-/* The byte and bit size of a size_t */
-#define SIZE_T_SIZE (sizeof(size_t))
-#define SIZE_T_BITSIZE (sizeof(size_t) << 3)
-
-/* Some constants coerced to size_t */
-/* Annoying but necessary to avoid errors on some platforms */
-#define SIZE_T_ZERO ((size_t)0)
-#define SIZE_T_ONE ((size_t)1)
-#define SIZE_T_TWO ((size_t)2)
-#define SIZE_T_FOUR ((size_t)4)
-#define TWO_SIZE_T_SIZES (SIZE_T_SIZE<<1)
-#define FOUR_SIZE_T_SIZES (SIZE_T_SIZE<<2)
-#define SIX_SIZE_T_SIZES (FOUR_SIZE_T_SIZES+TWO_SIZE_T_SIZES)
-#define HALF_MAX_SIZE_T (MAX_SIZE_T / 2U)
-
-/* The bit mask value corresponding to MALLOC_ALIGNMENT */
-#define CHUNK_ALIGN_MASK (MALLOC_ALIGNMENT - SIZE_T_ONE)
-
-/* True if address a has acceptable alignment */
-#define is_aligned(A) (((size_t)((A)) & (CHUNK_ALIGN_MASK)) == 0)
-
-/* the number of bytes to offset an address to align it */
-#define align_offset(A)\
- ((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
- ((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
-
-/* -------------------------- MMAP preliminaries ------------------------- */
-
-/*
- If HAVE_MORECORE or HAVE_MMAP are false, we just define calls and
- checks to fail so compiler optimizer can delete code rather than
- using so many "#if"s.
-*/
-
-
-/* MORECORE and MMAP must return MFAIL on failure */
-#define MFAIL ((void*)(MAX_SIZE_T))
-#define CMFAIL ((char*)(MFAIL)) /* defined for convenience */
-
-#if HAVE_MMAP
-
-#ifndef WIN32
-#define MUNMAP_DEFAULT(a, s) munmap((a), (s))
-#define MMAP_PROT (PROT_READ|PROT_WRITE)
-#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
-#define MAP_ANONYMOUS MAP_ANON
-#endif /* MAP_ANON */
-#ifdef MAP_ANONYMOUS
-#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS)
-#define MMAP_DEFAULT(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0)
-#else /* MAP_ANONYMOUS */
-/*
- Nearly all versions of mmap support MAP_ANONYMOUS, so the following
- is unlikely to be needed, but is supplied just in case.
-*/
-#define MMAP_FLAGS (MAP_PRIVATE)
-static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */
-#define MMAP_DEFAULT(s) ((dev_zero_fd < 0) ? \
- (dev_zero_fd = open("/dev/zero", O_RDWR), \
- mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) : \
- mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0))
-#endif /* MAP_ANONYMOUS */
-
-#define DIRECT_MMAP_DEFAULT(s) MMAP_DEFAULT(s)
-
-#else /* WIN32 */
-
-/* Win32 MMAP via VirtualAlloc */
-static FORCEINLINE void* win32mmap(size_t size) {
- void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
- return (ptr != 0)? ptr: MFAIL;
-}
-
-/* For direct MMAP, use MEM_TOP_DOWN to minimize interference */
-static FORCEINLINE void* win32direct_mmap(size_t size) {
- void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN,
- PAGE_READWRITE);
- return (ptr != 0)? ptr: MFAIL;
-}
-
-/* This function supports releasing coalesed segments */
-static FORCEINLINE int win32munmap(void* ptr, size_t size) {
- MEMORY_BASIC_INFORMATION minfo;
- char* cptr = (char*)ptr;
- while (size) {
- if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0)
- return -1;
- if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr ||
- minfo.State != MEM_COMMIT || minfo.RegionSize > size)
- return -1;
- if (VirtualFree(cptr, 0, MEM_RELEASE) == 0)
- return -1;
- cptr += minfo.RegionSize;
- size -= minfo.RegionSize;
- }
- return 0;
-}
-
-#define MMAP_DEFAULT(s) win32mmap(s)
-#define MUNMAP_DEFAULT(a, s) win32munmap((a), (s))
-#define DIRECT_MMAP_DEFAULT(s) win32direct_mmap(s)
-#endif /* WIN32 */
-#endif /* HAVE_MMAP */
-
-#if HAVE_MREMAP
-#ifndef WIN32
-#define MREMAP_DEFAULT(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv))
-#endif /* WIN32 */
-#endif /* HAVE_MREMAP */
-
-/**
- * Define CALL_MORECORE
- */
-#if HAVE_MORECORE
- #ifdef MORECORE
- #define CALL_MORECORE(S) MORECORE(S)
- #else /* MORECORE */
- #define CALL_MORECORE(S) MORECORE_DEFAULT(S)
- #endif /* MORECORE */
-#else /* HAVE_MORECORE */
- #define CALL_MORECORE(S) MFAIL
-#endif /* HAVE_MORECORE */
-
-/**
- * Define CALL_MMAP/CALL_MUNMAP/CALL_DIRECT_MMAP
- */
-#if HAVE_MMAP
- #define USE_MMAP_BIT (SIZE_T_ONE)
-
- #ifdef MMAP
- #define CALL_MMAP(s) MMAP(s)
- #else /* MMAP */
- #define CALL_MMAP(s) MMAP_DEFAULT(s)
- #endif /* MMAP */
- #ifdef MUNMAP
- #define CALL_MUNMAP(a, s) MUNMAP((a), (s))
- #else /* MUNMAP */
- #define CALL_MUNMAP(a, s) MUNMAP_DEFAULT((a), (s))
- #endif /* MUNMAP */
- #ifdef DIRECT_MMAP
- #define CALL_DIRECT_MMAP(s) DIRECT_MMAP(s)
- #else /* DIRECT_MMAP */
- #define CALL_DIRECT_MMAP(s) DIRECT_MMAP_DEFAULT(s)
- #endif /* DIRECT_MMAP */
-#else /* HAVE_MMAP */
- #define USE_MMAP_BIT (SIZE_T_ZERO)
-
- #define MMAP(s) MFAIL
- #define MUNMAP(a, s) (-1)
- #define DIRECT_MMAP(s) MFAIL
- #define CALL_DIRECT_MMAP(s) DIRECT_MMAP(s)
- #define CALL_MMAP(s) MMAP(s)
- #define CALL_MUNMAP(a, s) MUNMAP((a), (s))
-#endif /* HAVE_MMAP */
-
-/**
- * Define CALL_MREMAP
- */
-#if HAVE_MMAP && HAVE_MREMAP
- #ifdef MREMAP
- #define CALL_MREMAP(addr, osz, nsz, mv) MREMAP((addr), (osz), (nsz), (mv))
- #else /* MREMAP */
- #define CALL_MREMAP(addr, osz, nsz, mv) MREMAP_DEFAULT((addr), (osz), (nsz), (mv))
- #endif /* MREMAP */
-#else /* HAVE_MMAP && HAVE_MREMAP */
- #define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
-#endif /* HAVE_MMAP && HAVE_MREMAP */
-
-/* mstate bit set if continguous morecore disabled or failed */
-#define USE_NONCONTIGUOUS_BIT (4U)
-
-/* segment bit set in create_mspace_with_base */
-#define EXTERN_BIT (8U)
-
-
-/* --------------------------- Lock preliminaries ------------------------ */
-
-/*
- When locks are defined, there is one global lock, plus
- one per-mspace lock.
-
- The global lock_ensures that mparams.magic and other unique
- mparams values are initialized only once. It also protects
- sequences of calls to MORECORE. In many cases sys_alloc requires
- two calls, that should not be interleaved with calls by other
- threads. This does not protect against direct calls to MORECORE
- by other threads not using this lock, so there is still code to
- cope the best we can on interference.
-
- Per-mspace locks surround calls to malloc, free, etc.
- By default, locks are simple non-reentrant mutexes.
-
- Because lock-protected regions generally have bounded times, it is
- OK to use the supplied simple spinlocks. Spinlocks are likely to
- improve performance for lightly contended applications, but worsen
- performance under heavy contention.
-
- If USE_LOCKS is > 1, the definitions of lock routines here are
- bypassed, in which case you will need to define the type MLOCK_T,
- and at least INITIAL_LOCK, DESTROY_LOCK, ACQUIRE_LOCK, RELEASE_LOCK
- and TRY_LOCK. You must also declare a
- static MLOCK_T malloc_global_mutex = { initialization values };.
-
-*/
-
-#if !USE_LOCKS
-#define USE_LOCK_BIT (0U)
-#define INITIAL_LOCK(l) (0)
-#define DESTROY_LOCK(l) (0)
-#define ACQUIRE_MALLOC_GLOBAL_LOCK()
-#define RELEASE_MALLOC_GLOBAL_LOCK()
-
-#else
-#if USE_LOCKS > 1
-/* ----------------------- User-defined locks ------------------------ */
-/* Define your own lock implementation here */
-/* #define INITIAL_LOCK(lk) ... */
-/* #define DESTROY_LOCK(lk) ... */
-/* #define ACQUIRE_LOCK(lk) ... */
-/* #define RELEASE_LOCK(lk) ... */
-/* #define TRY_LOCK(lk) ... */
-/* static MLOCK_T malloc_global_mutex = ... */
-
-#elif USE_SPIN_LOCKS
-
-/* First, define CAS_LOCK and CLEAR_LOCK on ints */
-/* Note CAS_LOCK defined to return 0 on success */
-
-#if defined(__GNUC__)&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
-#define CAS_LOCK(sl) __sync_lock_test_and_set(sl, 1)
-#define CLEAR_LOCK(sl) __sync_lock_release(sl)
-
-#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
-/* Custom spin locks for older gcc on x86 */
-static FORCEINLINE int x86_cas_lock(int *sl) {
- int ret;
- int val = 1;
- int cmp = 0;
- __asm__ __volatile__ ("lock; cmpxchgl %1, %2"
- : "=a" (ret)
- : "r" (val), "m" (*(sl)), "0"(cmp)
- : "memory", "cc");
- return ret;
-}
-
-static FORCEINLINE void x86_clear_lock(int* sl) {
- assert(*sl != 0);
- int prev = 0;
- int ret;
- __asm__ __volatile__ ("lock; xchgl %0, %1"
- : "=r" (ret)
- : "m" (*(sl)), "0"(prev)
- : "memory");
-}
-
-#define CAS_LOCK(sl) x86_cas_lock(sl)
-#define CLEAR_LOCK(sl) x86_clear_lock(sl)
-
-#else /* Win32 MSC */
-#define CAS_LOCK(sl) interlockedexchange(sl, (LONG)1)
-#define CLEAR_LOCK(sl) interlockedexchange (sl, (LONG)0)
-
-#endif /* ... gcc spins locks ... */
-
-/* How to yield for a spin lock */
-#define SPINS_PER_YIELD 63
-#if defined(_MSC_VER)
-#define SLEEP_EX_DURATION 50 /* delay for yield/sleep */
-#define SPIN_LOCK_YIELD SleepEx(SLEEP_EX_DURATION, FALSE)
-#elif defined (__SVR4) && defined (__sun) /* solaris */
-#define SPIN_LOCK_YIELD thr_yield();
-#elif !defined(LACKS_SCHED_H)
-#define SPIN_LOCK_YIELD sched_yield();
-#else
-#define SPIN_LOCK_YIELD
-#endif /* ... yield ... */
-
-#if !defined(USE_RECURSIVE_LOCKS) || USE_RECURSIVE_LOCKS == 0
-/* Plain spin locks use single word (embedded in malloc_states) */
-static int spin_acquire_lock(int *sl) {
- int spins = 0;
- while (*(volatile int *)sl != 0 || CAS_LOCK(sl)) {
- if ((++spins & SPINS_PER_YIELD) == 0) {
- SPIN_LOCK_YIELD;
- }
- }
- return 0;
-}
-
-#define MLOCK_T int
-#define TRY_LOCK(sl) !CAS_LOCK(sl)
-#define RELEASE_LOCK(sl) CLEAR_LOCK(sl)
-#define ACQUIRE_LOCK(sl) (CAS_LOCK(sl)? spin_acquire_lock(sl) : 0)
-#define INITIAL_LOCK(sl) (*sl = 0)
-#define DESTROY_LOCK(sl) (0)
-static MLOCK_T malloc_global_mutex = 0;
-
-#else /* USE_RECURSIVE_LOCKS */
-/* types for lock owners */
-#ifdef WIN32
-#define THREAD_ID_T DWORD
-#define CURRENT_THREAD GetCurrentThreadId()
-#define EQ_OWNER(X,Y) ((X) == (Y))
-#else
-/*
- Note: the following assume that pthread_t is a type that can be
- initialized to (casted) zero. If this is not the case, you will need to
- somehow redefine these or not use spin locks.
-*/
-#define THREAD_ID_T pthread_t
-#define CURRENT_THREAD pthread_self()
-#define EQ_OWNER(X,Y) pthread_equal(X, Y)
-#endif
-
-struct malloc_recursive_lock {
- int sl;
- unsigned int c;
- THREAD_ID_T threadid;
-};
-
-#define MLOCK_T struct malloc_recursive_lock
-static MLOCK_T malloc_global_mutex = { 0, 0, (THREAD_ID_T)0};
-
-static FORCEINLINE void recursive_release_lock(MLOCK_T *lk) {
- assert(lk->sl != 0);
- if (--lk->c == 0) {
- CLEAR_LOCK(&lk->sl);
- }
-}
-
-static FORCEINLINE int recursive_acquire_lock(MLOCK_T *lk) {
- THREAD_ID_T mythreadid = CURRENT_THREAD;
- int spins = 0;
- for (;;) {
- if (*((volatile int *)(&lk->sl)) == 0) {
- if (!CAS_LOCK(&lk->sl)) {
- lk->threadid = mythreadid;
- lk->c = 1;
- return 0;
- }
- }
- else if (EQ_OWNER(lk->threadid, mythreadid)) {
- ++lk->c;
- return 0;
- }
- if ((++spins & SPINS_PER_YIELD) == 0) {
- SPIN_LOCK_YIELD;
- }
- }
-}
-
-static FORCEINLINE int recursive_try_lock(MLOCK_T *lk) {
- THREAD_ID_T mythreadid = CURRENT_THREAD;
- if (*((volatile int *)(&lk->sl)) == 0) {
- if (!CAS_LOCK(&lk->sl)) {
- lk->threadid = mythreadid;
- lk->c = 1;
- return 1;
- }
- }
- else if (EQ_OWNER(lk->threadid, mythreadid)) {
- ++lk->c;
- return 1;
- }
- return 0;
-}
-
-#define RELEASE_LOCK(lk) recursive_release_lock(lk)
-#define TRY_LOCK(lk) recursive_try_lock(lk)
-#define ACQUIRE_LOCK(lk) recursive_acquire_lock(lk)
-#define INITIAL_LOCK(lk) ((lk)->threadid = (THREAD_ID_T)0, (lk)->sl = 0, (lk)->c = 0)
-#define DESTROY_LOCK(lk) (0)
-#endif /* USE_RECURSIVE_LOCKS */
-
-#elif defined(WIN32) /* Win32 critical sections */
-#define MLOCK_T CRITICAL_SECTION
-#define ACQUIRE_LOCK(lk) (EnterCriticalSection(lk), 0)
-#define RELEASE_LOCK(lk) LeaveCriticalSection(lk)
-#define TRY_LOCK(lk) TryEnterCriticalSection(lk)
-#define INITIAL_LOCK(lk) (!InitializeCriticalSectionAndSpinCount((lk), 0x80000000|4000))
-#define DESTROY_LOCK(lk) (DeleteCriticalSection(lk), 0)
-#define NEED_GLOBAL_LOCK_INIT
-
-static MLOCK_T malloc_global_mutex;
-static volatile LONG malloc_global_mutex_status;
-
-/* Use spin loop to initialize global lock */
-static void init_malloc_global_mutex() {
- for (;;) {
- long stat = malloc_global_mutex_status;
- if (stat > 0)
- return;
- /* transition to < 0 while initializing, then to > 0) */
- if (stat == 0 &&
- interlockedcompareexchange(&malloc_global_mutex_status, (LONG)-1, (LONG)0) == 0) {
- InitializeCriticalSection(&malloc_global_mutex);
- interlockedexchange(&malloc_global_mutex_status, (LONG)1);
- return;
- }
- SleepEx(0, FALSE);
- }
-}
-
-#else /* pthreads-based locks */
-#define MLOCK_T pthread_mutex_t
-#define ACQUIRE_LOCK(lk) pthread_mutex_lock(lk)
-#define RELEASE_LOCK(lk) pthread_mutex_unlock(lk)
-#define TRY_LOCK(lk) (!pthread_mutex_trylock(lk))
-#define INITIAL_LOCK(lk) pthread_init_lock(lk)
-#define DESTROY_LOCK(lk) pthread_mutex_destroy(lk)
-
-#if defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0 && defined(linux) && !defined(PTHREAD_MUTEX_RECURSIVE)
-/* Cope with old-style linux recursive lock initialization by adding */
-/* skipped internal declaration from pthread.h */
-extern int pthread_mutexattr_setkind_np __P ((pthread_mutexattr_t *__attr,
- int __kind));
-#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
-#define pthread_mutexattr_settype(x,y) pthread_mutexattr_setkind_np(x,y)
-#endif /* USE_RECURSIVE_LOCKS ... */
-
-static MLOCK_T malloc_global_mutex = PTHREAD_MUTEX_INITIALIZER;
-
-static int pthread_init_lock (MLOCK_T *lk) {
- pthread_mutexattr_t attr;
- if (pthread_mutexattr_init(&attr)) return 1;
-#if defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0
- if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) return 1;
-#endif
- if (pthread_mutex_init(lk, &attr)) return 1;
- if (pthread_mutexattr_destroy(&attr)) return 1;
- return 0;
-}
-
-#endif /* ... lock types ... */
-
-/* Common code for all lock types */
-#define USE_LOCK_BIT (2U)
-
-#ifndef ACQUIRE_MALLOC_GLOBAL_LOCK
-#define ACQUIRE_MALLOC_GLOBAL_LOCK() ACQUIRE_LOCK(&malloc_global_mutex);
-#endif
-
-#ifndef RELEASE_MALLOC_GLOBAL_LOCK
-#define RELEASE_MALLOC_GLOBAL_LOCK() RELEASE_LOCK(&malloc_global_mutex);
-#endif
-
-#endif /* USE_LOCKS */
-
-/* ----------------------- Chunk representations ------------------------ */
-
-/*
- (The following includes lightly edited explanations by Colin Plumb.)
-
- The malloc_chunk declaration below is misleading (but accurate and
- necessary). It declares a "view" into memory allowing access to
- necessary fields at known offsets from a given base.
-
- Chunks of memory are maintained using a `boundary tag' method as
- originally described by Knuth. (See the paper by Paul Wilson
- ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a survey of such
- techniques.) Sizes of free chunks are stored both in the front of
- each chunk and at the end. This makes consolidating fragmented
- chunks into bigger chunks fast. The head fields also hold bits
- representing whether chunks are free or in use.
-
- Here are some pictures to make it clearer. They are "exploded" to
- show that the state of a chunk can be thought of as extending from
- the high 31 bits of the head field of its header through the
- prev_foot and PINUSE_BIT bit of the following chunk header.
-
- A chunk that's in use looks like:
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk (if P = 0) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
- | Size of this chunk 1| +-+
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | |
- +- -+
- | |
- +- -+
- | :
- +- size - sizeof(size_t) available payload bytes -+
- : |
- chunk-> +- -+
- | |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|
- | Size of next chunk (may or may not be in use) | +-+
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- And if it's free, it looks like this:
-
- chunk-> +- -+
- | User payload (must be in use, or we would have merged!) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
- | Size of this chunk 0| +-+
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Next pointer |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Prev pointer |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | :
- +- size - sizeof(struct chunk) unused bytes -+
- : |
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of this chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|
- | Size of next chunk (must be in use, or we would have merged)| +-+
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | :
- +- User payload -+
- : |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- |0|
- +-+
- Note that since we always merge adjacent free chunks, the chunks
- adjacent to a free chunk must be in use.
-
- Given a pointer to a chunk (which can be derived trivially from the
- payload pointer) we can, in O(1) time, find out whether the adjacent
- chunks are free, and if so, unlink them from the lists that they
- are on and merge them with the current chunk.
-
- Chunks always begin on even word boundaries, so the mem portion
- (which is returned to the user) is also on an even word boundary, and
- thus at least double-word aligned.
-
- The P (PINUSE_BIT) bit, stored in the unused low-order bit of the
- chunk size (which is always a multiple of two words), is an in-use
- bit for the *previous* chunk. If that bit is *clear*, then the
- word before the current chunk size contains the previous chunk
- size, and can be used to find the front of the previous chunk.
- The very first chunk allocated always has this bit set, preventing
- access to non-existent (or non-owned) memory. If pinuse is set for
- any given chunk, then you CANNOT determine the size of the
- previous chunk, and might even get a memory addressing fault when
- trying to do so.
-
- The C (CINUSE_BIT) bit, stored in the unused second-lowest bit of
- the chunk size redundantly records whether the current chunk is
- inuse (unless the chunk is mmapped). This redundancy enables usage
- checks within free and realloc, and reduces indirection when freeing
- and consolidating chunks.
-
- Each freshly allocated chunk must have both cinuse and pinuse set.
- That is, each allocated chunk borders either a previously allocated
- and still in-use chunk, or the base of its memory arena. This is
- ensured by making all allocations from the `lowest' part of any
- found chunk. Further, no free chunk physically borders another one,
- so each free chunk is known to be preceded and followed by either
- inuse chunks or the ends of memory.
-
- Note that the `foot' of the current chunk is actually represented
- as the prev_foot of the NEXT chunk. This makes it easier to
- deal with alignments etc but can be very confusing when trying
- to extend or adapt this code.
-
- The exceptions to all this are
-
- 1. The special chunk `top' is the top-most available chunk (i.e.,
- the one bordering the end of available memory). It is treated
- specially. Top is never included in any bin, is used only if
- no other chunk is available, and is released back to the
- system if it is very large (see M_TRIM_THRESHOLD). In effect,
- the top chunk is treated as larger (and thus less well
- fitting) than any other available chunk. The top chunk
- doesn't update its trailing size field since there is no next
- contiguous chunk that would have to index off it. However,
- space is still allocated for it (TOP_FOOT_SIZE) to enable
- separation or merging when space is extended.
-
- 3. Chunks allocated via mmap, have both cinuse and pinuse bits
- cleared in their head fields. Because they are allocated
- one-by-one, each must carry its own prev_foot field, which is
- also used to hold the offset this chunk has within its mmapped
- region, which is needed to preserve alignment. Each mmapped
- chunk is trailed by the first two fields of a fake next-chunk
- for sake of usage checks.
-
-*/
-
-struct malloc_chunk {
- size_t prev_foot; /* Size of previous chunk (if free). */
- size_t head; /* Size and inuse bits. */
- struct malloc_chunk* fd; /* double links -- used only if free. */
- struct malloc_chunk* bk;
-};
-
-typedef struct malloc_chunk mchunk;
-typedef struct malloc_chunk* mchunkptr;
-typedef struct malloc_chunk* sbinptr; /* The type of bins of chunks */
-typedef unsigned int bindex_t; /* Described below */
-typedef unsigned int binmap_t; /* Described below */
-typedef unsigned int flag_t; /* The type of various bit flag sets */
-
-/* ------------------- Chunks sizes and alignments ----------------------- */
-
-#define MCHUNK_SIZE (sizeof(mchunk))
-
-#if FOOTERS
-#define CHUNK_OVERHEAD (TWO_SIZE_T_SIZES)
-#else /* FOOTERS */
-#define CHUNK_OVERHEAD (SIZE_T_SIZE)
-#endif /* FOOTERS */
-
-/* MMapped chunks need a second word of overhead ... */
-#define MMAP_CHUNK_OVERHEAD (TWO_SIZE_T_SIZES)
-/* ... and additional padding for fake next-chunk at foot */
-#define MMAP_FOOT_PAD (FOUR_SIZE_T_SIZES)
-
-/* The smallest size we can malloc is an aligned minimal chunk */
-#define MIN_CHUNK_SIZE\
- ((MCHUNK_SIZE + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK)
-
-/* conversion from malloc headers to user pointers, and back */
-#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
-#define mem2chunk(mem) ((mchunkptr)((char*)(mem) - TWO_SIZE_T_SIZES))
-/* chunk associated with aligned address A */
-#define align_as_chunk(A) (mchunkptr)((A) + align_offset(chunk2mem(A)))
-
-/* Bounds on request (not chunk) sizes. */
-#define MAX_REQUEST ((-MIN_CHUNK_SIZE) << 2)
-#define MIN_REQUEST (MIN_CHUNK_SIZE - CHUNK_OVERHEAD - SIZE_T_ONE)
-
-/* pad request bytes into a usable size */
-#define pad_request(req) \
- (((req) + CHUNK_OVERHEAD + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK)
-
-/* pad request, checking for minimum (but not maximum) */
-#define request2size(req) \
- (((req) < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(req))
-
-
-/* ------------------ Operations on head and foot fields ----------------- */
-
-/*
- The head field of a chunk is or'ed with PINUSE_BIT when previous
- adjacent chunk in use, and or'ed with CINUSE_BIT if this chunk is in
- use, unless mmapped, in which case both bits are cleared.
-
- FLAG4_BIT is not used by this malloc, but might be useful in extensions.
-*/
-
-#define PINUSE_BIT (SIZE_T_ONE)
-#define CINUSE_BIT (SIZE_T_TWO)
-#define FLAG4_BIT (SIZE_T_FOUR)
-#define INUSE_BITS (PINUSE_BIT|CINUSE_BIT)
-#define FLAG_BITS (PINUSE_BIT|CINUSE_BIT|FLAG4_BIT)
-
-/* Head value for fenceposts */
-#define FENCEPOST_HEAD (INUSE_BITS|SIZE_T_SIZE)
-
-/* extraction of fields from head words */
-#define cinuse(p) ((p)->head & CINUSE_BIT)
-#define pinuse(p) ((p)->head & PINUSE_BIT)
-#define flag4inuse(p) ((p)->head & FLAG4_BIT)
-#define is_inuse(p) (((p)->head & INUSE_BITS) != PINUSE_BIT)
-#define is_mmapped(p) (((p)->head & INUSE_BITS) == 0)
-
-#define chunksize(p) ((p)->head & ~(FLAG_BITS))
-
-#define clear_pinuse(p) ((p)->head &= ~PINUSE_BIT)
-#define set_flag4(p) ((p)->head |= FLAG4_BIT)
-#define clear_flag4(p) ((p)->head &= ~FLAG4_BIT)
-
-/* Treat space at ptr +/- offset as a chunk */
-#define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s)))
-#define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s)))
-
-/* Ptr to next or previous physical malloc_chunk. */
-#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~FLAG_BITS)))
-#define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) ))
-
-/* extract next chunk's pinuse bit */
-#define next_pinuse(p) ((next_chunk(p)->head) & PINUSE_BIT)
-
-/* Get/set size at footer */
-#define get_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot)
-#define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot = (s))
-
-/* Set size, pinuse bit, and foot */
-#define set_size_and_pinuse_of_free_chunk(p, s)\
- ((p)->head = (s|PINUSE_BIT), set_foot(p, s))
-
-/* Set size, pinuse bit, foot, and clear next pinuse */
-#define set_free_with_pinuse(p, s, n)\
- (clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s))
-
-/* Get the internal overhead associated with chunk p */
-#define overhead_for(p)\
- (is_mmapped(p)? MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD)
-
-/* Return true if malloced space is not necessarily cleared */
-#if MMAP_CLEARS
-#define calloc_must_clear(p) (!is_mmapped(p))
-#else /* MMAP_CLEARS */
-#define calloc_must_clear(p) (1)
-#endif /* MMAP_CLEARS */
-
-/* ---------------------- Overlaid data structures ----------------------- */
-
-/*
- When chunks are not in use, they are treated as nodes of either
- lists or trees.
-
- "Small" chunks are stored in circular doubly-linked lists, and look
- like this:
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `head:' | Size of chunk, in bytes |P|
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Forward pointer to next chunk in list |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Back pointer to previous chunk in list |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Unused space (may be 0 bytes long) .
- . .
- . |
-nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `foot:' | Size of chunk, in bytes |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- Larger chunks are kept in a form of bitwise digital trees (aka
- tries) keyed on chunksizes. Because malloc_tree_chunks are only for
- free chunks greater than 256 bytes, their size doesn't impose any
- constraints on user chunk sizes. Each node looks like:
-
- chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Size of previous chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `head:' | Size of chunk, in bytes |P|
- mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Forward pointer to next chunk of same size |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Back pointer to previous chunk of same size |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to left child (child[0]) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to right child (child[1]) |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Pointer to parent |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | bin index of this chunk |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- | Unused space .
- . |
-nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
- `foot:' | Size of chunk, in bytes |
- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
- Each tree holding treenodes is a tree of unique chunk sizes. Chunks
- of the same size are arranged in a circularly-linked list, with only
- the oldest chunk (the next to be used, in our FIFO ordering)
- actually in the tree. (Tree members are distinguished by a non-null
- parent pointer.) If a chunk with the same size an an existing node
- is inserted, it is linked off the existing node using pointers that
- work in the same way as fd/bk pointers of small chunks.
-
- Each tree contains a power of 2 sized range of chunk sizes (the
- smallest is 0x100 <= x < 0x180), which is is divided in half at each
- tree level, with the chunks in the smaller half of the range (0x100
- <= x < 0x140 for the top nose) in the left subtree and the larger
- half (0x140 <= x < 0x180) in the right subtree. This is, of course,
- done by inspecting individual bits.
-
- Using these rules, each node's left subtree contains all smaller
- sizes than its right subtree. However, the node at the root of each
- subtree has no particular ordering relationship to either. (The
- dividing line between the subtree sizes is based on trie relation.)
- If we remove the last chunk of a given size from the interior of the
- tree, we need to replace it with a leaf node. The tree ordering
- rules permit a node to be replaced by any leaf below it.
-
- The smallest chunk in a tree (a common operation in a best-fit
- allocator) can be found by walking a path to the leftmost leaf in
- the tree. Unlike a usual binary tree, where we follow left child
- pointers until we reach a null, here we follow the right child
- pointer any time the left one is null, until we reach a leaf with
- both child pointers null. The smallest chunk in the tree will be
- somewhere along that path.
-
- The worst case number of steps to add, find, or remove a node is
- bounded by the number of bits differentiating chunks within
- bins. Under current bin calculations, this ranges from 6 up to 21
- (for 32 bit sizes) or up to 53 (for 64 bit sizes). The typical case
- is of course much better.
-*/
-
-struct malloc_tree_chunk {
- /* The first four fields must be compatible with malloc_chunk */
- size_t prev_foot;
- size_t head;
- struct malloc_tree_chunk* fd;
- struct malloc_tree_chunk* bk;
-
- struct malloc_tree_chunk* child[2];
- struct malloc_tree_chunk* parent;
- bindex_t index;
-};
-
-typedef struct malloc_tree_chunk tchunk;
-typedef struct malloc_tree_chunk* tchunkptr;
-typedef struct malloc_tree_chunk* tbinptr; /* The type of bins of trees */
-
-/* A little helper macro for trees */
-#define leftmost_child(t) ((t)->child[0] != 0? (t)->child[0] : (t)->child[1])
-
-/* ----------------------------- Segments -------------------------------- */
-
-/*
- Each malloc space may include non-contiguous segments, held in a
- list headed by an embedded malloc_segment record representing the
- top-most space. Segments also include flags holding properties of
- the space. Large chunks that are directly allocated by mmap are not
- included in this list. They are instead independently created and
- destroyed without otherwise keeping track of them.
-
- Segment management mainly comes into play for spaces allocated by
- MMAP. Any call to MMAP might or might not return memory that is
- adjacent to an existing segment. MORECORE normally contiguously
- extends the current space, so this space is almost always adjacent,
- which is simpler and faster to deal with. (This is why MORECORE is
- used preferentially to MMAP when both are available -- see
- sys_alloc.) When allocating using MMAP, we don't use any of the
- hinting mechanisms (inconsistently) supported in various
- implementations of unix mmap, or distinguish reserving from
- committing memory. Instead, we just ask for space, and exploit
- contiguity when we get it. It is probably possible to do
- better than this on some systems, but no general scheme seems
- to be significantly better.
-
- Management entails a simpler variant of the consolidation scheme
- used for chunks to reduce fragmentation -- new adjacent memory is
- normally prepended or appended to an existing segment. However,
- there are limitations compared to chunk consolidation that mostly
- reflect the fact that segment processing is relatively infrequent
- (occurring only when getting memory from system) and that we
- don't expect to have huge numbers of segments:
-
- * Segments are not indexed, so traversal requires linear scans. (It
- would be possible to index these, but is not worth the extra
- overhead and complexity for most programs on most platforms.)
- * New segments are only appended to old ones when holding top-most
- memory; if they cannot be prepended to others, they are held in
- different segments.
-
- Except for the top-most segment of an mstate, each segment record
- is kept at the tail of its segment. Segments are added by pushing
- segment records onto the list headed by &mstate.seg for the
- containing mstate.
-
- Segment flags control allocation/merge/deallocation policies:
- * If EXTERN_BIT set, then we did not allocate this segment,
- and so should not try to deallocate or merge with others.
- (This currently holds only for the initial segment passed
- into create_mspace_with_base.)
- * If USE_MMAP_BIT set, the segment may be merged with
- other surrounding mmapped segments and trimmed/de-allocated
- using munmap.
- * If neither bit is set, then the segment was obtained using
- MORECORE so can be merged with surrounding MORECORE'd segments
- and deallocated/trimmed using MORECORE with negative arguments.
-*/
-
-struct malloc_segment {
- char* base; /* base address */
- size_t size; /* allocated size */
- struct malloc_segment* next; /* ptr to next segment */
- flag_t sflags; /* mmap and extern flag */
-};
-
-#define is_mmapped_segment(S) ((S)->sflags & USE_MMAP_BIT)
-#define is_extern_segment(S) ((S)->sflags & EXTERN_BIT)
-
-typedef struct malloc_segment msegment;
-typedef struct malloc_segment* msegmentptr;
-
-/* ---------------------------- malloc_state ----------------------------- */
-
-/*
- A malloc_state holds all of the bookkeeping for a space.
- The main fields are:
-
- Top
- The topmost chunk of the currently active segment. Its size is
- cached in topsize. The actual size of topmost space is
- topsize+TOP_FOOT_SIZE, which includes space reserved for adding
- fenceposts and segment records if necessary when getting more
- space from the system. The size at which to autotrim top is
- cached from mparams in trim_check, except that it is disabled if
- an autotrim fails.
-
- Designated victim (dv)
- This is the preferred chunk for servicing small requests that
- don't have exact fits. It is normally the chunk split off most
- recently to service another small request. Its size is cached in
- dvsize. The link fields of this chunk are not maintained since it
- is not kept in a bin.
-
- SmallBins
- An array of bin headers for free chunks. These bins hold chunks
- with sizes less than MIN_LARGE_SIZE bytes. Each bin contains
- chunks of all the same size, spaced 8 bytes apart. To simplify
- use in double-linked lists, each bin header acts as a malloc_chunk
- pointing to the real first node, if it exists (else pointing to
- itself). This avoids special-casing for headers. But to avoid
- waste, we allocate only the fd/bk pointers of bins, and then use
- repositioning tricks to treat these as the fields of a chunk.
-
- TreeBins
- Treebins are pointers to the roots of trees holding a range of
- sizes. There are 2 equally spaced treebins for each power of two
- from TREE_SHIFT to TREE_SHIFT+16. The last bin holds anything
- larger.
-
- Bin maps
- There is one bit map for small bins ("smallmap") and one for
- treebins ("treemap). Each bin sets its bit when non-empty, and
- clears the bit when empty. Bit operations are then used to avoid
- bin-by-bin searching -- nearly all "search" is done without ever
- looking at bins that won't be selected. The bit maps
- conservatively use 32 bits per map word, even if on 64bit system.
- For a good description of some of the bit-based techniques used
- here, see Henry S. Warren Jr's book "Hacker's Delight" (and
- supplement at http://hackersdelight.org/). Many of these are
- intended to reduce the branchiness of paths through malloc etc, as
- well as to reduce the number of memory locations read or written.
-
- Segments
- A list of segments headed by an embedded malloc_segment record
- representing the initial space.
-
- Address check support
- The least_addr field is the least address ever obtained from
- MORECORE or MMAP. Attempted frees and reallocs of any address less
- than this are trapped (unless INSECURE is defined).
-
- Magic tag
- A cross-check field that should always hold same value as mparams.magic.
-
- Max allowed footprint
- The maximum allowed bytes to allocate from system (zero means no limit)
-
- Flags
- Bits recording whether to use MMAP, locks, or contiguous MORECORE
-
- Statistics
- Each space keeps track of current and maximum system memory
- obtained via MORECORE or MMAP.
-
- Trim support
- Fields holding the amount of unused topmost memory that should trigger
- trimming, and a counter to force periodic scanning to release unused
- non-topmost segments.
-
- Locking
- If USE_LOCKS is defined, the "mutex" lock is acquired and released
- around every public call using this mspace.
-
- Extension support
- A void* pointer and a size_t field that can be used to help implement
- extensions to this malloc.
-*/
-
-/* Bin types, widths and sizes */
-#define NSMALLBINS (32U)
-#define NTREEBINS (32U)
-#define SMALLBIN_SHIFT (3U)
-#define SMALLBIN_WIDTH (SIZE_T_ONE << SMALLBIN_SHIFT)
-#define TREEBIN_SHIFT (8U)
-#define MIN_LARGE_SIZE (SIZE_T_ONE << TREEBIN_SHIFT)
-#define MAX_SMALL_SIZE (MIN_LARGE_SIZE - SIZE_T_ONE)
-#define MAX_SMALL_REQUEST (MAX_SMALL_SIZE - CHUNK_ALIGN_MASK - CHUNK_OVERHEAD)
-
-struct malloc_state {
- binmap_t smallmap;
- binmap_t treemap;
- size_t dvsize;
- size_t topsize;
- char* least_addr;
- mchunkptr dv;
- mchunkptr top;
- size_t trim_check;
- size_t release_checks;
- size_t magic;
- mchunkptr smallbins[(NSMALLBINS+1)*2];
- tbinptr treebins[NTREEBINS];
- size_t footprint;
- size_t max_footprint;
- size_t footprint_limit; /* zero means no limit */
- flag_t mflags;
-#if USE_LOCKS
- MLOCK_T mutex; /* locate lock among fields that rarely change */
-#endif /* USE_LOCKS */
- msegment seg;
- void* extp; /* Unused but available for extensions */
- size_t exts;
-};
-
-typedef struct malloc_state* mstate;
-
-/* ------------- Global malloc_state and malloc_params ------------------- */
-
-/*
- malloc_params holds global properties, including those that can be
- dynamically set using mallopt. There is a single instance, mparams,
- initialized in init_mparams. Note that the non-zeroness of "magic"
- also serves as an initialization flag.
-*/
-
-struct malloc_params {
- size_t magic;
- size_t page_size;
- size_t granularity;
- size_t mmap_threshold;
- size_t trim_threshold;
- flag_t default_mflags;
-};
-
-static struct malloc_params mparams;
-
-/* Ensure mparams initialized */
-#define ensure_initialization() (void)(mparams.magic != 0 || init_mparams())
-
-#if !ONLY_MSPACES
-
-/* The global malloc_state used for all non-"mspace" calls */
-static struct malloc_state _gm_;
-#define gm (&_gm_)
-#define is_global(M) ((M) == &_gm_)
-
-#endif /* !ONLY_MSPACES */
-
-#define is_initialized(M) ((M)->top != 0)
-
-/* -------------------------- system alloc setup ------------------------- */
-
-/* Operations on mflags */
-
-#define use_lock(M) ((M)->mflags & USE_LOCK_BIT)
-#define enable_lock(M) ((M)->mflags |= USE_LOCK_BIT)
-#if USE_LOCKS
-#define disable_lock(M) ((M)->mflags &= ~USE_LOCK_BIT)
-#else
-#define disable_lock(M)
-#endif
-
-#define use_mmap(M) ((M)->mflags & USE_MMAP_BIT)
-#define enable_mmap(M) ((M)->mflags |= USE_MMAP_BIT)
-#if HAVE_MMAP
-#define disable_mmap(M) ((M)->mflags &= ~USE_MMAP_BIT)
-#else
-#define disable_mmap(M)
-#endif
-
-#define use_noncontiguous(M) ((M)->mflags & USE_NONCONTIGUOUS_BIT)
-#define disable_contiguous(M) ((M)->mflags |= USE_NONCONTIGUOUS_BIT)
-
-#define set_lock(M,L)\
- ((M)->mflags = (L)?\
- ((M)->mflags | USE_LOCK_BIT) :\
- ((M)->mflags & ~USE_LOCK_BIT))
-
-/* page-align a size */
-#define page_align(S)\
- (((S) + (mparams.page_size - SIZE_T_ONE)) & ~(mparams.page_size - SIZE_T_ONE))
-
-/* granularity-align a size */
-#define granularity_align(S)\
- (((S) + (mparams.granularity - SIZE_T_ONE))\
- & ~(mparams.granularity - SIZE_T_ONE))
-
-
-/* For mmap, use granularity alignment on windows, else page-align */
-#ifdef WIN32
-#define mmap_align(S) granularity_align(S)
-#else
-#define mmap_align(S) page_align(S)
-#endif
-
-/* For sys_alloc, enough padding to ensure can malloc request on success */
-#define SYS_ALLOC_PADDING (TOP_FOOT_SIZE + MALLOC_ALIGNMENT)
-
-#define is_page_aligned(S)\
- (((size_t)(S) & (mparams.page_size - SIZE_T_ONE)) == 0)
-#define is_granularity_aligned(S)\
- (((size_t)(S) & (mparams.granularity - SIZE_T_ONE)) == 0)
-
-/* True if segment S holds address A */
-#define segment_holds(S, A)\
- ((char*)(A) >= S->base && (char*)(A) < S->base + S->size)
-
-/* Return segment holding given address */
-static msegmentptr segment_holding(mstate m, char* addr) {
- msegmentptr sp = &m->seg;
- for (;;) {
- if (addr >= sp->base && addr < sp->base + sp->size)
- return sp;
- if ((sp = sp->next) == 0)
- return 0;
- }
-}
-
-/* Return true if segment contains a segment link */
-static int has_segment_link(mstate m, msegmentptr ss) {
- msegmentptr sp = &m->seg;
- for (;;) {
- if ((char*)sp >= ss->base && (char*)sp < ss->base + ss->size)
- return 1;
- if ((sp = sp->next) == 0)
- return 0;
- }
-}
-
-#ifndef MORECORE_CANNOT_TRIM
-#define should_trim(M,s) ((s) > (M)->trim_check)
-#else /* MORECORE_CANNOT_TRIM */
-#define should_trim(M,s) (0)
-#endif /* MORECORE_CANNOT_TRIM */
-
-/*
- TOP_FOOT_SIZE is padding at the end of a segment, including space
- that may be needed to place segment records and fenceposts when new
- noncontiguous segments are added.
-*/
-#define TOP_FOOT_SIZE\
- (align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
-
-
-/* ------------------------------- Hooks -------------------------------- */
-
-/*
- PREACTION should be defined to return 0 on success, and nonzero on
- failure. If you are not using locking, you can redefine these to do
- anything you like.
-*/
-
-#if USE_LOCKS
-#define PREACTION(M) ((use_lock(M))? ACQUIRE_LOCK(&(M)->mutex) : 0)
-#define POSTACTION(M) { if (use_lock(M)) RELEASE_LOCK(&(M)->mutex); }
-#else /* USE_LOCKS */
-
-#ifndef PREACTION
-#define PREACTION(M) (0)
-#endif /* PREACTION */
-
-#ifndef POSTACTION
-#define POSTACTION(M)
-#endif /* POSTACTION */
-
-#endif /* USE_LOCKS */
-
-/*
- CORRUPTION_ERROR_ACTION is triggered upon detected bad addresses.
- USAGE_ERROR_ACTION is triggered on detected bad frees and
- reallocs. The argument p is an address that might have triggered the
- fault. It is ignored by the two predefined actions, but might be
- useful in custom actions that try to help diagnose errors.
-*/
-
-#if PROCEED_ON_ERROR
-
-/* A count of the number of corruption errors causing resets */
-int malloc_corruption_error_count;
-
-/* default corruption action */
-static void reset_on_error(mstate m);
-
-#define CORRUPTION_ERROR_ACTION(m) reset_on_error(m)
-#define USAGE_ERROR_ACTION(m, p)
-
-#else /* PROCEED_ON_ERROR */
-
-#ifndef CORRUPTION_ERROR_ACTION
-#define CORRUPTION_ERROR_ACTION(m) ABORT
-#endif /* CORRUPTION_ERROR_ACTION */
-
-#ifndef USAGE_ERROR_ACTION
-#define USAGE_ERROR_ACTION(m,p) ABORT
-#endif /* USAGE_ERROR_ACTION */
-
-#endif /* PROCEED_ON_ERROR */
-
-
-/* -------------------------- Debugging setup ---------------------------- */
-
-#if ! DEBUG
-
-#define check_free_chunk(M,P)
-#define check_inuse_chunk(M,P)
-#define check_malloced_chunk(M,P,N)
-#define check_mmapped_chunk(M,P)
-#define check_malloc_state(M)
-#define check_top_chunk(M,P)
-
-#else /* DEBUG */
-#define check_free_chunk(M,P) do_check_free_chunk(M,P)
-#define check_inuse_chunk(M,P) do_check_inuse_chunk(M,P)
-#define check_top_chunk(M,P) do_check_top_chunk(M,P)
-#define check_malloced_chunk(M,P,N) do_check_malloced_chunk(M,P,N)
-#define check_mmapped_chunk(M,P) do_check_mmapped_chunk(M,P)
-#define check_malloc_state(M) do_check_malloc_state(M)
-
-static void do_check_any_chunk(mstate m, mchunkptr p);
-static void do_check_top_chunk(mstate m, mchunkptr p);
-static void do_check_mmapped_chunk(mstate m, mchunkptr p);
-static void do_check_inuse_chunk(mstate m, mchunkptr p);
-static void do_check_free_chunk(mstate m, mchunkptr p);
-static void do_check_malloced_chunk(mstate m, void* mem, size_t s);
-static void do_check_tree(mstate m, tchunkptr t);
-static void do_check_treebin(mstate m, bindex_t i);
-static void do_check_smallbin(mstate m, bindex_t i);
-static void do_check_malloc_state(mstate m);
-static int bin_find(mstate m, mchunkptr x);
-static size_t traverse_and_check(mstate m);
-#endif /* DEBUG */
-
-/* ---------------------------- Indexing Bins ---------------------------- */
-
-#define is_small(s) (((s) >> SMALLBIN_SHIFT) < NSMALLBINS)
-#define small_index(s) (bindex_t)((s) >> SMALLBIN_SHIFT)
-#define small_index2size(i) ((i) << SMALLBIN_SHIFT)
-#define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE))
-
-/* addressing by index. See above about smallbin repositioning */
-#define smallbin_at(M, i) ((sbinptr)((char*)&((M)->smallbins[(i)<<1])))
-#define treebin_at(M,i) (&((M)->treebins[i]))
-
-/* assign tree index for size S to variable I. Use x86 asm if possible */
-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-#define compute_tree_index(S, I)\
-{\
- unsigned int X = S >> TREEBIN_SHIFT;\
- if (X == 0)\
- I = 0;\
- else if (X > 0xFFFF)\
- I = NTREEBINS-1;\
- else {\
- unsigned int K = (unsigned) sizeof(X)*__CHAR_BIT__ - 1 - (unsigned) __builtin_clz(X); \
- I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
- }\
-}
-
-#elif defined (__INTEL_COMPILER)
-#define compute_tree_index(S, I)\
-{\
- size_t X = S >> TREEBIN_SHIFT;\
- if (X == 0)\
- I = 0;\
- else if (X > 0xFFFF)\
- I = NTREEBINS-1;\
- else {\
- unsigned int K = _bit_scan_reverse (X); \
- I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
- }\
-}
-
-#elif defined(_MSC_VER) && _MSC_VER>=1300
-#define compute_tree_index(S, I)\
-{\
- size_t X = S >> TREEBIN_SHIFT;\
- if (X == 0)\
- I = 0;\
- else if (X > 0xFFFF)\
- I = NTREEBINS-1;\
- else {\
- unsigned int K;\
- _BitScanReverse((DWORD *) &K, (DWORD) X);\
- I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
- }\
-}
-
-#else /* GNUC */
-#define compute_tree_index(S, I)\
-{\
- size_t X = S >> TREEBIN_SHIFT;\
- if (X == 0)\
- I = 0;\
- else if (X > 0xFFFF)\
- I = NTREEBINS-1;\
- else {\
- unsigned int Y = (unsigned int)X;\
- unsigned int N = ((Y - 0x100) >> 16) & 8;\
- unsigned int K = (((Y <<= N) - 0x1000) >> 16) & 4;\
- N += K;\
- N += K = (((Y <<= K) - 0x4000) >> 16) & 2;\
- K = 14 - N + ((Y <<= K) >> 15);\
- I = (K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1));\
- }\
-}
-#endif /* GNUC */
-
-/* Bit representing maximum resolved size in a treebin at i */
-#define bit_for_tree_index(i) \
- (i == NTREEBINS-1)? (SIZE_T_BITSIZE-1) : (((i) >> 1) + TREEBIN_SHIFT - 2)
-
-/* Shift placing maximum resolved bit in a treebin at i as sign bit */
-#define leftshift_for_tree_index(i) \
- ((i == NTREEBINS-1)? 0 : \
- ((SIZE_T_BITSIZE-SIZE_T_ONE) - (((i) >> 1) + TREEBIN_SHIFT - 2)))
-
-/* The size of the smallest chunk held in bin with index i */
-#define minsize_for_tree_index(i) \
- ((SIZE_T_ONE << (((i) >> 1) + TREEBIN_SHIFT)) | \
- (((size_t)((i) & SIZE_T_ONE)) << (((i) >> 1) + TREEBIN_SHIFT - 1)))
-
-
-/* ------------------------ Operations on bin maps ----------------------- */
-
-/* bit corresponding to given index */
-#define idx2bit(i) ((binmap_t)(1) << (i))
-
-/* Mark/Clear bits with given index */
-#define mark_smallmap(M,i) ((M)->smallmap |= idx2bit(i))
-#define clear_smallmap(M,i) ((M)->smallmap &= ~idx2bit(i))
-#define smallmap_is_marked(M,i) ((M)->smallmap & idx2bit(i))
-
-#define mark_treemap(M,i) ((M)->treemap |= idx2bit(i))
-#define clear_treemap(M,i) ((M)->treemap &= ~idx2bit(i))
-#define treemap_is_marked(M,i) ((M)->treemap & idx2bit(i))
-
-/* isolate the least set bit of a bitmap */
-#define least_bit(x) ((x) & -(x))
-
-/* mask with all bits to left of least bit of x on */
-#define left_bits(x) ((x<<1) | -(x<<1))
-
-/* mask with all bits to left of or equal to least bit of x on */
-#define same_or_left_bits(x) ((x) | -(x))
-
-/* index corresponding to given bit. Use x86 asm if possible */
-
-#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
-#define compute_bit2idx(X, I)\
-{\
- unsigned int J;\
- J = __builtin_ctz(X); \
- I = (bindex_t)J;\
-}
-
-#elif defined (__INTEL_COMPILER)
-#define compute_bit2idx(X, I)\
-{\
- unsigned int J;\
- J = _bit_scan_forward (X); \
- I = (bindex_t)J;\
-}
-
-#elif defined(_MSC_VER) && _MSC_VER>=1300
-#define compute_bit2idx(X, I)\
-{\
- unsigned int J;\
- _BitScanForward((DWORD *) &J, X);\
- I = (bindex_t)J;\
-}
-
-#elif USE_BUILTIN_FFS
-#define compute_bit2idx(X, I) I = ffs(X)-1
-
-#else
-#define compute_bit2idx(X, I)\
-{\
- unsigned int Y = X - 1;\
- unsigned int K = Y >> (16-4) & 16;\
- unsigned int N = K; Y >>= K;\
- N += K = Y >> (8-3) & 8; Y >>= K;\
- N += K = Y >> (4-2) & 4; Y >>= K;\
- N += K = Y >> (2-1) & 2; Y >>= K;\
- N += K = Y >> (1-0) & 1; Y >>= K;\
- I = (bindex_t)(N + Y);\
-}
-#endif /* GNUC */
-
-
-/* ----------------------- Runtime Check Support ------------------------- */
-
-/*
- For security, the main invariant is that malloc/free/etc never
- writes to a static address other than malloc_state, unless static
- malloc_state itself has been corrupted, which cannot occur via
- malloc (because of these checks). In essence this means that we
- believe all pointers, sizes, maps etc held in malloc_state, but
- check all of those linked or offsetted from other embedded data
- structures. These checks are interspersed with main code in a way
- that tends to minimize their run-time cost.
-
- When FOOTERS is defined, in addition to range checking, we also
- verify footer fields of inuse chunks, which can be used guarantee
- that the mstate controlling malloc/free is intact. This is a
- streamlined version of the approach described by William Robertson
- et al in "Run-time Detection of Heap-based Overflows" LISA'03
- http://www.usenix.org/events/lisa03/tech/robertson.html The footer
- of an inuse chunk holds the xor of its mstate and a random seed,
- that is checked upon calls to free() and realloc(). This is
- (probabalistically) unguessable from outside the program, but can be
- computed by any code successfully malloc'ing any chunk, so does not
- itself provide protection against code that has already broken
- security through some other means. Unlike Robertson et al, we
- always dynamically check addresses of all offset chunks (previous,
- next, etc). This turns out to be cheaper than relying on hashes.
-*/
-
-#if !INSECURE
-/* Check if address a is at least as high as any from MORECORE or MMAP */
-#define ok_address(M, a) ((char*)(a) >= (M)->least_addr)
-/* Check if address of next chunk n is higher than base chunk p */
-#define ok_next(p, n) ((char*)(p) < (char*)(n))
-/* Check if p has inuse status */
-#define ok_inuse(p) is_inuse(p)
-/* Check if p has its pinuse bit on */
-#define ok_pinuse(p) pinuse(p)
-
-#else /* !INSECURE */
-#define ok_address(M, a) (1)
-#define ok_next(b, n) (1)
-#define ok_inuse(p) (1)
-#define ok_pinuse(p) (1)
-#endif /* !INSECURE */
-
-#if (FOOTERS && !INSECURE)
-/* Check if (alleged) mstate m has expected magic field */
-#define ok_magic(M) ((M)->magic == mparams.magic)
-#else /* (FOOTERS && !INSECURE) */
-#define ok_magic(M) (1)
-#endif /* (FOOTERS && !INSECURE) */
-
-/* In gcc, use __builtin_expect to minimize impact of checks */
-#if !INSECURE
-#if defined(__GNUC__) && __GNUC__ >= 3
-#define RTCHECK(e) __builtin_expect(e, 1)
-#else /* GNUC */
-#define RTCHECK(e) (e)
-#endif /* GNUC */
-#else /* !INSECURE */
-#define RTCHECK(e) (1)
-#endif /* !INSECURE */
-
-/* macros to set up inuse chunks with or without footers */
-
-#if !FOOTERS
-
-#define mark_inuse_foot(M,p,s)
-
-/* Macros for setting head/foot of non-mmapped chunks */
-
-/* Set cinuse bit and pinuse bit of next chunk */
-#define set_inuse(M,p,s)\
- ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
- ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
-
-/* Set cinuse and pinuse of this chunk and pinuse of next chunk */
-#define set_inuse_and_pinuse(M,p,s)\
- ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
- ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
-
-/* Set size, cinuse and pinuse bit of this chunk */
-#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\
- ((p)->head = (s|PINUSE_BIT|CINUSE_BIT))
-
-#else /* FOOTERS */
-
-/* Set foot of inuse chunk to be xor of mstate and seed */
-#define mark_inuse_foot(M,p,s)\
- (((mchunkptr)((char*)(p) + (s)))->prev_foot = ((size_t)(M) ^ mparams.magic))
-
-#define get_mstate_for(p)\
- ((mstate)(((mchunkptr)((char*)(p) +\
- (chunksize(p))))->prev_foot ^ mparams.magic))
-
-#define set_inuse(M,p,s)\
- ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
- (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT), \
- mark_inuse_foot(M,p,s))
-
-#define set_inuse_and_pinuse(M,p,s)\
- ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
- (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT),\
- mark_inuse_foot(M,p,s))
-
-#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\
- ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
- mark_inuse_foot(M, p, s))
-
-#endif /* !FOOTERS */
-
-/* ---------------------------- setting mparams -------------------------- */
-
-#if LOCK_AT_FORK
-static void pre_fork(void) { ACQUIRE_LOCK(&(gm)->mutex); }
-static void post_fork_parent(void) { RELEASE_LOCK(&(gm)->mutex); }
-static void post_fork_child(void) { INITIAL_LOCK(&(gm)->mutex); }
-#endif /* LOCK_AT_FORK */
-
-/* Initialize mparams */
-static int init_mparams(void) {
-#ifdef NEED_GLOBAL_LOCK_INIT
- if (malloc_global_mutex_status <= 0)
- init_malloc_global_mutex();
-#endif
-
- ACQUIRE_MALLOC_GLOBAL_LOCK();
- if (mparams.magic == 0) {
- size_t magic;
- size_t psize;
- size_t gsize;
-
-#ifndef WIN32
- psize = malloc_getpagesize;
- gsize = ((DEFAULT_GRANULARITY != 0)? DEFAULT_GRANULARITY : psize);
-#else /* WIN32 */
- {
- SYSTEM_INFO system_info;
- GetSystemInfo(&system_info);
- psize = system_info.dwPageSize;
- gsize = ((DEFAULT_GRANULARITY != 0)?
- DEFAULT_GRANULARITY : system_info.dwAllocationGranularity);
- }
-#endif /* WIN32 */
-
- /* Sanity-check configuration:
- size_t must be unsigned and as wide as pointer type.
- ints must be at least 4 bytes.
- alignment must be at least 8.
- Alignment, min chunk size, and page size must all be powers of 2.
- */
- if ((sizeof(size_t) != sizeof(char*)) ||
- (MAX_SIZE_T < MIN_CHUNK_SIZE) ||
- (sizeof(int) < 4) ||
- (MALLOC_ALIGNMENT < (size_t)8U) ||
- ((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-SIZE_T_ONE)) != 0) ||
- ((MCHUNK_SIZE & (MCHUNK_SIZE-SIZE_T_ONE)) != 0) ||
- ((gsize & (gsize-SIZE_T_ONE)) != 0) ||
- ((psize & (psize-SIZE_T_ONE)) != 0))
- ABORT;
- mparams.granularity = gsize;
- mparams.page_size = psize;
- mparams.mmap_threshold = DEFAULT_MMAP_THRESHOLD;
- mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD;
-#if MORECORE_CONTIGUOUS
- mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT;
-#else /* MORECORE_CONTIGUOUS */
- mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT;
-#endif /* MORECORE_CONTIGUOUS */
-
-#if !ONLY_MSPACES
- /* Set up lock for main malloc area */
- gm->mflags = mparams.default_mflags;
- (void)INITIAL_LOCK(&gm->mutex);
-#endif
-#if LOCK_AT_FORK
- pthread_atfork(&pre_fork, &post_fork_parent, &post_fork_child);
-#endif
-
- {
-#if USE_DEV_RANDOM
- int fd;
- unsigned char buf[sizeof(size_t)];
- /* Try to use /dev/urandom, else fall back on using time */
- if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 &&
- read(fd, buf, sizeof(buf)) == sizeof(buf)) {
- magic = *((size_t *) buf);
- close(fd);
- }
- else
-#endif /* USE_DEV_RANDOM */
-#ifdef WIN32
- magic = (size_t)(GetTickCount() ^ (size_t)0x55555555U);
-#elif defined(LACKS_TIME_H)
- magic = (size_t)&magic ^ (size_t)0x55555555U;
-#else
- magic = (size_t)(time(0) ^ (size_t)0x55555555U);
-#endif
- magic |= (size_t)8U; /* ensure nonzero */
- magic &= ~(size_t)7U; /* improve chances of fault for bad values */
- /* Until memory modes commonly available, use volatile-write */
- (*(volatile size_t *)(&(mparams.magic))) = magic;
- }
- }
-
- RELEASE_MALLOC_GLOBAL_LOCK();
- return 1;
-}
-
-/* support for mallopt */
-static int change_mparam(int param_number, int value) {
- size_t val;
- ensure_initialization();
- val = (value == -1)? MAX_SIZE_T : (size_t)value;
- switch(param_number) {
- case M_TRIM_THRESHOLD:
- mparams.trim_threshold = val;
- return 1;
- case M_GRANULARITY:
- if (val >= mparams.page_size && ((val & (val-1)) == 0)) {
- mparams.granularity = val;
- return 1;
- }
- else
- return 0;
- case M_MMAP_THRESHOLD:
- mparams.mmap_threshold = val;
- return 1;
- default:
- return 0;
- }
-}
-
-#if DEBUG
-/* ------------------------- Debugging Support --------------------------- */
-
-/* Check properties of any chunk, whether free, inuse, mmapped etc */
-static void do_check_any_chunk(mstate m, mchunkptr p) {
- assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
- assert(ok_address(m, p));
-}
-
-/* Check properties of top chunk */
-static void do_check_top_chunk(mstate m, mchunkptr p) {
- msegmentptr sp = segment_holding(m, (char*)p);
- size_t sz = p->head & ~INUSE_BITS; /* third-lowest bit can be set! */
- assert(sp != 0);
- assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
- assert(ok_address(m, p));
- assert(sz == m->topsize);
- assert(sz > 0);
- assert(sz == ((sp->base + sp->size) - (char*)p) - TOP_FOOT_SIZE);
- assert(pinuse(p));
- assert(!pinuse(chunk_plus_offset(p, sz)));
-}
-
-/* Check properties of (inuse) mmapped chunks */
-static void do_check_mmapped_chunk(mstate m, mchunkptr p) {
- size_t sz = chunksize(p);
- size_t len = (sz + (p->prev_foot) + MMAP_FOOT_PAD);
- assert(is_mmapped(p));
- assert(use_mmap(m));
- assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
- assert(ok_address(m, p));
- assert(!is_small(sz));
- assert((len & (mparams.page_size-SIZE_T_ONE)) == 0);
- assert(chunk_plus_offset(p, sz)->head == FENCEPOST_HEAD);
- assert(chunk_plus_offset(p, sz+SIZE_T_SIZE)->head == 0);
-}
-
-/* Check properties of inuse chunks */
-static void do_check_inuse_chunk(mstate m, mchunkptr p) {
- do_check_any_chunk(m, p);
- assert(is_inuse(p));
- assert(next_pinuse(p));
- /* If not pinuse and not mmapped, previous chunk has OK offset */
- assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p);
- if (is_mmapped(p))
- do_check_mmapped_chunk(m, p);
-}
-
-/* Check properties of free chunks */
-static void do_check_free_chunk(mstate m, mchunkptr p) {
- size_t sz = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, sz);
- do_check_any_chunk(m, p);
- assert(!is_inuse(p));
- assert(!next_pinuse(p));
- assert (!is_mmapped(p));
- if (p != m->dv && p != m->top) {
- if (sz >= MIN_CHUNK_SIZE) {
- assert((sz & CHUNK_ALIGN_MASK) == 0);
- assert(is_aligned(chunk2mem(p)));
- assert(next->prev_foot == sz);
- assert(pinuse(p));
- assert (next == m->top || is_inuse(next));
- assert(p->fd->bk == p);
- assert(p->bk->fd == p);
- }
- else /* markers are always of size SIZE_T_SIZE */
- assert(sz == SIZE_T_SIZE);
- }
-}
-
-/* Check properties of malloced chunks at the point they are malloced */
-static void do_check_malloced_chunk(mstate m, void* mem, size_t s) {
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
- size_t sz = p->head & ~INUSE_BITS;
- do_check_inuse_chunk(m, p);
- assert((sz & CHUNK_ALIGN_MASK) == 0);
- assert(sz >= MIN_CHUNK_SIZE);
- assert(sz >= s);
- /* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */
- assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE));
- }
-}
-
-/* Check a tree and its subtrees. */
-static void do_check_tree(mstate m, tchunkptr t) {
- tchunkptr head = 0;
- tchunkptr u = t;
- bindex_t tindex = t->index;
- size_t tsize = chunksize(t);
- bindex_t idx;
- compute_tree_index(tsize, idx);
- assert(tindex == idx);
- assert(tsize >= MIN_LARGE_SIZE);
- assert(tsize >= minsize_for_tree_index(idx));
- assert((idx == NTREEBINS-1) || (tsize < minsize_for_tree_index((idx+1))));
-
- do { /* traverse through chain of same-sized nodes */
- do_check_any_chunk(m, ((mchunkptr)u));
- assert(u->index == tindex);
- assert(chunksize(u) == tsize);
- assert(!is_inuse(u));
- assert(!next_pinuse(u));
- assert(u->fd->bk == u);
- assert(u->bk->fd == u);
- if (u->parent == 0) {
- assert(u->child[0] == 0);
- assert(u->child[1] == 0);
- }
- else {
- assert(head == 0); /* only one node on chain has parent */
- head = u;
- assert(u->parent != u);
- assert (u->parent->child[0] == u ||
- u->parent->child[1] == u ||
- *((tbinptr*)(u->parent)) == u);
- if (u->child[0] != 0) {
- assert(u->child[0]->parent == u);
- assert(u->child[0] != u);
- do_check_tree(m, u->child[0]);
- }
- if (u->child[1] != 0) {
- assert(u->child[1]->parent == u);
- assert(u->child[1] != u);
- do_check_tree(m, u->child[1]);
- }
- if (u->child[0] != 0 && u->child[1] != 0) {
- assert(chunksize(u->child[0]) < chunksize(u->child[1]));
- }
- }
- u = u->fd;
- } while (u != t);
- assert(head != 0);
-}
-
-/* Check all the chunks in a treebin. */
-static void do_check_treebin(mstate m, bindex_t i) {
- tbinptr* tb = treebin_at(m, i);
- tchunkptr t = *tb;
- int empty = (m->treemap & (1U << i)) == 0;
- if (t == 0)
- assert(empty);
- if (!empty)
- do_check_tree(m, t);
-}
-
-/* Check all the chunks in a smallbin. */
-static void do_check_smallbin(mstate m, bindex_t i) {
- sbinptr b = smallbin_at(m, i);
- mchunkptr p = b->bk;
- unsigned int empty = (m->smallmap & (1U << i)) == 0;
- if (p == b)
- assert(empty);
- if (!empty) {
- for (; p != b; p = p->bk) {
- size_t size = chunksize(p);
- mchunkptr q;
- /* each chunk claims to be free */
- do_check_free_chunk(m, p);
- /* chunk belongs in bin */
- assert(small_index(size) == i);
- assert(p->bk == b || chunksize(p->bk) == chunksize(p));
- /* chunk is followed by an inuse chunk */
- q = next_chunk(p);
- if (q->head != FENCEPOST_HEAD)
- do_check_inuse_chunk(m, q);
- }
- }
-}
-
-/* Find x in a bin. Used in other check functions. */
-static int bin_find(mstate m, mchunkptr x) {
- size_t size = chunksize(x);
- if (is_small(size)) {
- bindex_t sidx = small_index(size);
- sbinptr b = smallbin_at(m, sidx);
- if (smallmap_is_marked(m, sidx)) {
- mchunkptr p = b;
- do {
- if (p == x)
- return 1;
- } while ((p = p->fd) != b);
- }
- }
- else {
- bindex_t tidx;
- compute_tree_index(size, tidx);
- if (treemap_is_marked(m, tidx)) {
- tchunkptr t = *treebin_at(m, tidx);
- size_t sizebits = size << leftshift_for_tree_index(tidx);
- while (t != 0 && chunksize(t) != size) {
- t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
- sizebits <<= 1;
- }
- if (t != 0) {
- tchunkptr u = t;
- do {
- if (u == (tchunkptr)x)
- return 1;
- } while ((u = u->fd) != t);
- }
- }
- }
- return 0;
-}
-
-/* Traverse each chunk and check it; return total */
-static size_t traverse_and_check(mstate m) {
- size_t sum = 0;
- if (is_initialized(m)) {
- msegmentptr s = &m->seg;
- sum += m->topsize + TOP_FOOT_SIZE;
- while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- mchunkptr lastq = 0;
- assert(pinuse(q));
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- sum += chunksize(q);
- if (is_inuse(q)) {
- assert(!bin_find(m, q));
- do_check_inuse_chunk(m, q);
- }
- else {
- assert(q == m->dv || bin_find(m, q));
- assert(lastq == 0 || is_inuse(lastq)); /* Not 2 consecutive free */
- do_check_free_chunk(m, q);
- }
- lastq = q;
- q = next_chunk(q);
- }
- s = s->next;
- }
- }
- return sum;
-}
-
-
-/* Check all properties of malloc_state. */
-static void do_check_malloc_state(mstate m) {
- bindex_t i;
- size_t total;
- /* check bins */
- for (i = 0; i < NSMALLBINS; ++i)
- do_check_smallbin(m, i);
- for (i = 0; i < NTREEBINS; ++i)
- do_check_treebin(m, i);
-
- if (m->dvsize != 0) { /* check dv chunk */
- do_check_any_chunk(m, m->dv);
- assert(m->dvsize == chunksize(m->dv));
- assert(m->dvsize >= MIN_CHUNK_SIZE);
- assert(bin_find(m, m->dv) == 0);
- }
-
- if (m->top != 0) { /* check top chunk */
- do_check_top_chunk(m, m->top);
- /*assert(m->topsize == chunksize(m->top)); redundant */
- assert(m->topsize > 0);
- assert(bin_find(m, m->top) == 0);
- }
-
- total = traverse_and_check(m);
- assert(total <= m->footprint);
- assert(m->footprint <= m->max_footprint);
-}
-#endif /* DEBUG */
-
-/* ----------------------------- statistics ------------------------------ */
-
-#if !NO_MALLINFO
-static struct mallinfo internal_mallinfo(mstate m) {
- struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
- ensure_initialization();
- if (!PREACTION(m)) {
- check_malloc_state(m);
- if (is_initialized(m)) {
- size_t nfree = SIZE_T_ONE; /* top always free */
- size_t mfree = m->topsize + TOP_FOOT_SIZE;
- size_t sum = mfree;
- msegmentptr s = &m->seg;
- while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- size_t sz = chunksize(q);
- sum += sz;
- if (!is_inuse(q)) {
- mfree += sz;
- ++nfree;
- }
- q = next_chunk(q);
- }
- s = s->next;
- }
-
- nm.arena = sum;
- nm.ordblks = nfree;
- nm.hblkhd = m->footprint - sum;
- nm.usmblks = m->max_footprint;
- nm.uordblks = m->footprint - mfree;
- nm.fordblks = mfree;
- nm.keepcost = m->topsize;
- }
-
- POSTACTION(m);
- }
- return nm;
-}
-#endif /* !NO_MALLINFO */
-
-#if !NO_MALLOC_STATS
-static void internal_malloc_stats(mstate m) {
- ensure_initialization();
- if (!PREACTION(m)) {
- size_t maxfp = 0;
- size_t fp = 0;
- size_t used = 0;
- check_malloc_state(m);
- if (is_initialized(m)) {
- msegmentptr s = &m->seg;
- maxfp = m->max_footprint;
- fp = m->footprint;
- used = fp - (m->topsize + TOP_FOOT_SIZE);
-
- while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- if (!is_inuse(q))
- used -= chunksize(q);
- q = next_chunk(q);
- }
- s = s->next;
- }
- }
- POSTACTION(m); /* drop lock */
- fprintf(stderr, "max system bytes = %10lu\n", (unsigned long)(maxfp));
- fprintf(stderr, "system bytes = %10lu\n", (unsigned long)(fp));
- fprintf(stderr, "in use bytes = %10lu\n", (unsigned long)(used));
- }
-}
-#endif /* NO_MALLOC_STATS */
-
-/* ----------------------- Operations on smallbins ----------------------- */
-
-/*
- Various forms of linking and unlinking are defined as macros. Even
- the ones for trees, which are very long but have very short typical
- paths. This is ugly but reduces reliance on inlining support of
- compilers.
-*/
-
-/* Link a free chunk into a smallbin */
-#define insert_small_chunk(M, P, S) {\
- bindex_t I = small_index(S);\
- mchunkptr B = smallbin_at(M, I);\
- mchunkptr F = B;\
- assert(S >= MIN_CHUNK_SIZE);\
- if (!smallmap_is_marked(M, I))\
- mark_smallmap(M, I);\
- else if (RTCHECK(ok_address(M, B->fd)))\
- F = B->fd;\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- B->fd = P;\
- F->bk = P;\
- P->fd = F;\
- P->bk = B;\
-}
-
-/* Unlink a chunk from a smallbin */
-#define unlink_small_chunk(M, P, S) {\
- mchunkptr F = P->fd;\
- mchunkptr B = P->bk;\
- bindex_t I = small_index(S);\
- assert(P != B);\
- assert(P != F);\
- assert(chunksize(P) == small_index2size(I));\
- if (RTCHECK(F == smallbin_at(M,I) || (ok_address(M, F) && F->bk == P))) { \
- if (B == F) {\
- clear_smallmap(M, I);\
- }\
- else if (RTCHECK(B == smallbin_at(M,I) ||\
- (ok_address(M, B) && B->fd == P))) {\
- F->bk = B;\
- B->fd = F;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
-}
-
-/* Unlink the first chunk from a smallbin */
-#define unlink_first_small_chunk(M, B, P, I) {\
- mchunkptr F = P->fd;\
- assert(P != B);\
- assert(P != F);\
- assert(chunksize(P) == small_index2size(I));\
- if (B == F) {\
- clear_smallmap(M, I);\
- }\
- else if (RTCHECK(ok_address(M, F) && F->bk == P)) {\
- F->bk = B;\
- B->fd = F;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
-}
-
-/* Replace dv node, binning the old one */
-/* Used only when dvsize known to be small */
-#define replace_dv(M, P, S) {\
- size_t DVS = M->dvsize;\
- assert(is_small(DVS));\
- if (DVS != 0) {\
- mchunkptr DV = M->dv;\
- insert_small_chunk(M, DV, DVS);\
- }\
- M->dvsize = S;\
- M->dv = P;\
-}
-
-/* ------------------------- Operations on trees ------------------------- */
-
-/* Insert chunk into tree */
-#define insert_large_chunk(M, X, S) {\
- tbinptr* H;\
- bindex_t I;\
- compute_tree_index(S, I);\
- H = treebin_at(M, I);\
- X->index = I;\
- X->child[0] = X->child[1] = 0;\
- if (!treemap_is_marked(M, I)) {\
- mark_treemap(M, I);\
- *H = X;\
- X->parent = (tchunkptr)H;\
- X->fd = X->bk = X;\
- }\
- else {\
- tchunkptr T = *H;\
- size_t K = S << leftshift_for_tree_index(I);\
- for (;;) {\
- if (chunksize(T) != S) {\
- tchunkptr* C = &(T->child[(K >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]);\
- K <<= 1;\
- if (*C != 0)\
- T = *C;\
- else if (RTCHECK(ok_address(M, C))) {\
- *C = X;\
- X->parent = T;\
- X->fd = X->bk = X;\
- break;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- break;\
- }\
- }\
- else {\
- tchunkptr F = T->fd;\
- if (RTCHECK(ok_address(M, T) && ok_address(M, F))) {\
- T->fd = F->bk = X;\
- X->fd = F;\
- X->bk = T;\
- X->parent = 0;\
- break;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- break;\
- }\
- }\
- }\
- }\
-}
-
-/*
- Unlink steps:
-
- 1. If x is a chained node, unlink it from its same-sized fd/bk links
- and choose its bk node as its replacement.
- 2. If x was the last node of its size, but not a leaf node, it must
- be replaced with a leaf node (not merely one with an open left or
- right), to make sure that lefts and rights of descendents
- correspond properly to bit masks. We use the rightmost descendent
- of x. We could use any other leaf, but this is easy to locate and
- tends to counteract removal of leftmosts elsewhere, and so keeps
- paths shorter than minimally guaranteed. This doesn't loop much
- because on average a node in a tree is near the bottom.
- 3. If x is the base of a chain (i.e., has parent links) relink
- x's parent and children to x's replacement (or null if none).
-*/
-
-#define unlink_large_chunk(M, X) {\
- tchunkptr XP = X->parent;\
- tchunkptr R;\
- if (X->bk != X) {\
- tchunkptr F = X->fd;\
- R = X->bk;\
- if (RTCHECK(ok_address(M, F) && F->bk == X && R->fd == X)) {\
- F->bk = R;\
- R->fd = F;\
- }\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
- else {\
- tchunkptr* RP;\
- if (((R = *(RP = &(X->child[1]))) != 0) ||\
- ((R = *(RP = &(X->child[0]))) != 0)) {\
- tchunkptr* CP;\
- while ((*(CP = &(R->child[1])) != 0) ||\
- (*(CP = &(R->child[0])) != 0)) {\
- R = *(RP = CP);\
- }\
- if (RTCHECK(ok_address(M, RP)))\
- *RP = 0;\
- else {\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
- }\
- if (XP != 0) {\
- tbinptr* H = treebin_at(M, X->index);\
- if (X == *H) {\
- if ((*H = R) == 0) \
- clear_treemap(M, X->index);\
- }\
- else if (RTCHECK(ok_address(M, XP))) {\
- if (XP->child[0] == X) \
- XP->child[0] = R;\
- else \
- XP->child[1] = R;\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- if (R != 0) {\
- if (RTCHECK(ok_address(M, R))) {\
- tchunkptr C0, C1;\
- R->parent = XP;\
- if ((C0 = X->child[0]) != 0) {\
- if (RTCHECK(ok_address(M, C0))) {\
- R->child[0] = C0;\
- C0->parent = R;\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- if ((C1 = X->child[1]) != 0) {\
- if (RTCHECK(ok_address(M, C1))) {\
- R->child[1] = C1;\
- C1->parent = R;\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
- else\
- CORRUPTION_ERROR_ACTION(M);\
- }\
- }\
-}
-
-/* Relays to large vs small bin operations */
-
-#define insert_chunk(M, P, S)\
- if (is_small(S)) insert_small_chunk(M, P, S)\
- else { tchunkptr TP = (tchunkptr)(P); insert_large_chunk(M, TP, S); }
-
-#define unlink_chunk(M, P, S)\
- if (is_small(S)) unlink_small_chunk(M, P, S)\
- else { tchunkptr TP = (tchunkptr)(P); unlink_large_chunk(M, TP); }
-
-
-/* Relays to internal calls to malloc/free from realloc, memalign etc */
-
-#if ONLY_MSPACES
-#define internal_malloc(m, b) mspace_malloc(m, b)
-#define internal_free(m, mem) mspace_free(m,mem);
-#else /* ONLY_MSPACES */
-#if MSPACES
-#define internal_malloc(m, b)\
- ((m == gm)? dlmalloc(b) : mspace_malloc(m, b))
-#define internal_free(m, mem)\
- if (m == gm) dlfree(mem); else mspace_free(m,mem);
-#else /* MSPACES */
-#define internal_malloc(m, b) dlmalloc(b)
-#define internal_free(m, mem) dlfree(mem)
-#endif /* MSPACES */
-#endif /* ONLY_MSPACES */
-
-/* ----------------------- Direct-mmapping chunks ----------------------- */
-
-/*
- Directly mmapped chunks are set up with an offset to the start of
- the mmapped region stored in the prev_foot field of the chunk. This
- allows reconstruction of the required argument to MUNMAP when freed,
- and also allows adjustment of the returned chunk to meet alignment
- requirements (especially in memalign).
-*/
-
-/* Malloc using mmap */
-static void* mmap_alloc(mstate m, size_t nb) {
- size_t mmsize = mmap_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
- if (m->footprint_limit != 0) {
- size_t fp = m->footprint + mmsize;
- if (fp <= m->footprint || fp > m->footprint_limit)
- return 0;
- }
- if (mmsize > nb) { /* Check for wrap around 0 */
- char* mm = (char*)(CALL_DIRECT_MMAP(mmsize));
- if (mm != CMFAIL) {
- size_t offset = align_offset(chunk2mem(mm));
- size_t psize = mmsize - offset - MMAP_FOOT_PAD;
- mchunkptr p = (mchunkptr)(mm + offset);
- p->prev_foot = offset;
- p->head = psize;
- mark_inuse_foot(m, p, psize);
- chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD;
- chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0;
-
- if (m->least_addr == 0 || mm < m->least_addr)
- m->least_addr = mm;
- if ((m->footprint += mmsize) > m->max_footprint)
- m->max_footprint = m->footprint;
- assert(is_aligned(chunk2mem(p)));
- check_mmapped_chunk(m, p);
- return chunk2mem(p);
- }
- }
- return 0;
-}
-
-/* Realloc using mmap */
-static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb, int flags) {
- size_t oldsize = chunksize(oldp);
- (void)flags; /* placate people compiling -Wunused */
- if (is_small(nb)) /* Can't shrink mmap regions below small size */
- return 0;
- /* Keep old chunk if big enough but not too big */
- if (oldsize >= nb + SIZE_T_SIZE &&
- (oldsize - nb) <= (mparams.granularity << 1))
- return oldp;
- else {
- size_t offset = oldp->prev_foot;
- size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD;
- size_t newmmsize = mmap_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
- char* cp = (char*)CALL_MREMAP((char*)oldp - offset,
- oldmmsize, newmmsize, flags);
- if (cp != CMFAIL) {
- mchunkptr newp = (mchunkptr)(cp + offset);
- size_t psize = newmmsize - offset - MMAP_FOOT_PAD;
- newp->head = psize;
- mark_inuse_foot(m, newp, psize);
- chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD;
- chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0;
-
- if (cp < m->least_addr)
- m->least_addr = cp;
- if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint)
- m->max_footprint = m->footprint;
- check_mmapped_chunk(m, newp);
- return newp;
- }
- }
- return 0;
-}
-
-
-/* -------------------------- mspace management -------------------------- */
-
-/* Initialize top chunk and its size */
-static void init_top(mstate m, mchunkptr p, size_t psize) {
- /* Ensure alignment */
- size_t offset = align_offset(chunk2mem(p));
- p = (mchunkptr)((char*)p + offset);
- psize -= offset;
-
- m->top = p;
- m->topsize = psize;
- p->head = psize | PINUSE_BIT;
- /* set size of fake trailing chunk holding overhead space only once */
- chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
- m->trim_check = mparams.trim_threshold; /* reset on each update */
-}
-
-/* Initialize bins for a new mstate that is otherwise zeroed out */
-static void init_bins(mstate m) {
- /* Establish circular links for smallbins */
- bindex_t i;
- for (i = 0; i < NSMALLBINS; ++i) {
- sbinptr bin = smallbin_at(m,i);
- bin->fd = bin->bk = bin;
- }
-}
-
-#if PROCEED_ON_ERROR
-
-/* default corruption action */
-static void reset_on_error(mstate m) {
- int i;
- ++malloc_corruption_error_count;
- /* Reinitialize fields to forget about all memory */
- m->smallmap = m->treemap = 0;
- m->dvsize = m->topsize = 0;
- m->seg.base = 0;
- m->seg.size = 0;
- m->seg.next = 0;
- m->top = m->dv = 0;
- for (i = 0; i < NTREEBINS; ++i)
- *treebin_at(m, i) = 0;
- init_bins(m);
-}
-#endif /* PROCEED_ON_ERROR */
-
-/* Allocate chunk and prepend remainder with chunk in successor base. */
-static void* prepend_alloc(mstate m, char* newbase, char* oldbase,
- size_t nb) {
- mchunkptr p = align_as_chunk(newbase);
- mchunkptr oldfirst = align_as_chunk(oldbase);
- size_t psize = (char*)oldfirst - (char*)p;
- mchunkptr q = chunk_plus_offset(p, nb);
- size_t qsize = psize - nb;
- set_size_and_pinuse_of_inuse_chunk(m, p, nb);
-
- assert((char*)oldfirst > (char*)q);
- assert(pinuse(oldfirst));
- assert(qsize >= MIN_CHUNK_SIZE);
-
- /* consolidate remainder with first chunk of old base */
- if (oldfirst == m->top) {
- size_t tsize = m->topsize += qsize;
- m->top = q;
- q->head = tsize | PINUSE_BIT;
- check_top_chunk(m, q);
- }
- else if (oldfirst == m->dv) {
- size_t dsize = m->dvsize += qsize;
- m->dv = q;
- set_size_and_pinuse_of_free_chunk(q, dsize);
- }
- else {
- if (!is_inuse(oldfirst)) {
- size_t nsize = chunksize(oldfirst);
- unlink_chunk(m, oldfirst, nsize);
- oldfirst = chunk_plus_offset(oldfirst, nsize);
- qsize += nsize;
- }
- set_free_with_pinuse(q, qsize, oldfirst);
- insert_chunk(m, q, qsize);
- check_free_chunk(m, q);
- }
-
- check_malloced_chunk(m, chunk2mem(p), nb);
- return chunk2mem(p);
-}
-
-/* Add a segment to hold a new noncontiguous region */
-static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
- /* Determine locations and sizes of segment, fenceposts, old top */
- char* old_top = (char*)m->top;
- msegmentptr oldsp = segment_holding(m, old_top);
- char* old_end = oldsp->base + oldsp->size;
- size_t ssize = pad_request(sizeof(struct malloc_segment));
- char* rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
- size_t offset = align_offset(chunk2mem(rawsp));
- char* asp = rawsp + offset;
- char* csp = (asp < (old_top + MIN_CHUNK_SIZE))? old_top : asp;
- mchunkptr sp = (mchunkptr)csp;
- msegmentptr ss = (msegmentptr)(chunk2mem(sp));
- mchunkptr tnext = chunk_plus_offset(sp, ssize);
- mchunkptr p = tnext;
- int nfences = 0;
-
- /* reset top to new space */
- init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
-
- /* Set up segment record */
- assert(is_aligned(ss));
- set_size_and_pinuse_of_inuse_chunk(m, sp, ssize);
- *ss = m->seg; /* Push current record */
- m->seg.base = tbase;
- m->seg.size = tsize;
- m->seg.sflags = mmapped;
- m->seg.next = ss;
-
- /* Insert trailing fenceposts */
- for (;;) {
- mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE);
- p->head = FENCEPOST_HEAD;
- ++nfences;
- if ((char*)(&(nextp->head)) < old_end)
- p = nextp;
- else
- break;
- }
- assert(nfences >= 2);
-
- /* Insert the rest of old top into a bin as an ordinary free chunk */
- if (csp != old_top) {
- mchunkptr q = (mchunkptr)old_top;
- size_t psize = csp - old_top;
- mchunkptr tn = chunk_plus_offset(q, psize);
- set_free_with_pinuse(q, psize, tn);
- insert_chunk(m, q, psize);
- }
-
- check_top_chunk(m, m->top);
-}
-
-/* -------------------------- System allocation -------------------------- */
-
-/* Get memory from system using MORECORE or MMAP */
-static void* sys_alloc(mstate m, size_t nb) {
- char* tbase = CMFAIL;
- size_t tsize = 0;
- flag_t mmap_flag = 0;
- size_t asize; /* allocation size */
-
- ensure_initialization();
-
- /* Directly map large chunks, but only if already initialized */
- if (use_mmap(m) && nb >= mparams.mmap_threshold && m->topsize != 0) {
- void* mem = mmap_alloc(m, nb);
- if (mem != 0)
- return mem;
- }
-
- asize = granularity_align(nb + SYS_ALLOC_PADDING);
- if (asize <= nb)
- return 0; /* wraparound */
- if (m->footprint_limit != 0) {
- size_t fp = m->footprint + asize;
- if (fp <= m->footprint || fp > m->footprint_limit)
- return 0;
- }
-
- /*
- Try getting memory in any of three ways (in most-preferred to
- least-preferred order):
- 1. A call to MORECORE that can normally contiguously extend memory.
- (disabled if not MORECORE_CONTIGUOUS or not HAVE_MORECORE or
- or main space is mmapped or a previous contiguous call failed)
- 2. A call to MMAP new space (disabled if not HAVE_MMAP).
- Note that under the default settings, if MORECORE is unable to
- fulfill a request, and HAVE_MMAP is true, then mmap is
- used as a noncontiguous system allocator. This is a useful backup
- strategy for systems with holes in address spaces -- in this case
- sbrk cannot contiguously expand the heap, but mmap may be able to
- find space.
- 3. A call to MORECORE that cannot usually contiguously extend memory.
- (disabled if not HAVE_MORECORE)
-
- In all cases, we need to request enough bytes from system to ensure
- we can malloc nb bytes upon success, so pad with enough space for
- top_foot, plus alignment-pad to make sure we don't lose bytes if
- not on boundary, and round this up to a granularity unit.
- */
-
- if (MORECORE_CONTIGUOUS && !use_noncontiguous(m)) {
- char* br = CMFAIL;
- size_t ssize = asize; /* sbrk call size */
- msegmentptr ss = (m->top == 0)? 0 : segment_holding(m, (char*)m->top);
- ACQUIRE_MALLOC_GLOBAL_LOCK();
-
- if (ss == 0) { /* First time through or recovery */
- char* base = (char*)CALL_MORECORE(0);
- if (base != CMFAIL) {
- size_t fp;
- /* Adjust to end on a page boundary */
- if (!is_page_aligned(base))
- ssize += (page_align((size_t)base) - (size_t)base);
- fp = m->footprint + ssize; /* recheck limits */
- if (ssize > nb && ssize < HALF_MAX_SIZE_T &&
- (m->footprint_limit == 0 ||
- (fp > m->footprint && fp <= m->footprint_limit)) &&
- (br = (char*)(CALL_MORECORE(ssize))) == base) {
- tbase = base;
- tsize = ssize;
- }
- }
- }
- else {
- /* Subtract out existing available top space from MORECORE request. */
- ssize = granularity_align(nb - m->topsize + SYS_ALLOC_PADDING);
- /* Use mem here only if it did continuously extend old space */
- if (ssize < HALF_MAX_SIZE_T &&
- (br = (char*)(CALL_MORECORE(ssize))) == ss->base+ss->size) {
- tbase = br;
- tsize = ssize;
- }
- }
-
- if (tbase == CMFAIL) { /* Cope with partial failure */
- if (br != CMFAIL) { /* Try to use/extend the space we did get */
- if (ssize < HALF_MAX_SIZE_T &&
- ssize < nb + SYS_ALLOC_PADDING) {
- size_t esize = granularity_align(nb + SYS_ALLOC_PADDING - ssize);
- if (esize < HALF_MAX_SIZE_T) {
- char* end = (char*)CALL_MORECORE(esize);
- if (end != CMFAIL)
- ssize += esize;
- else { /* Can't use; try to release */
- (void) CALL_MORECORE(-ssize);
- br = CMFAIL;
- }
- }
- }
- }
- if (br != CMFAIL) { /* Use the space we did get */
- tbase = br;
- tsize = ssize;
- }
- else
- disable_contiguous(m); /* Don't try contiguous path in the future */
- }
-
- RELEASE_MALLOC_GLOBAL_LOCK();
- }
-
- if (HAVE_MMAP && tbase == CMFAIL) { /* Try MMAP */
- char* mp = (char*)(CALL_MMAP(asize));
- if (mp != CMFAIL) {
- tbase = mp;
- tsize = asize;
- mmap_flag = USE_MMAP_BIT;
- }
- }
-
- if (HAVE_MORECORE && tbase == CMFAIL) { /* Try noncontiguous MORECORE */
- if (asize < HALF_MAX_SIZE_T) {
- char* br = CMFAIL;
- char* end = CMFAIL;
- ACQUIRE_MALLOC_GLOBAL_LOCK();
- br = (char*)(CALL_MORECORE(asize));
- end = (char*)(CALL_MORECORE(0));
- RELEASE_MALLOC_GLOBAL_LOCK();
- if (br != CMFAIL && end != CMFAIL && br < end) {
- size_t ssize = end - br;
- if (ssize > nb + TOP_FOOT_SIZE) {
- tbase = br;
- tsize = ssize;
- }
- }
- }
- }
-
- if (tbase != CMFAIL) {
-
- if ((m->footprint += tsize) > m->max_footprint)
- m->max_footprint = m->footprint;
-
- if (!is_initialized(m)) { /* first-time initialization */
- if (m->least_addr == 0 || tbase < m->least_addr)
- m->least_addr = tbase;
- m->seg.base = tbase;
- m->seg.size = tsize;
- m->seg.sflags = mmap_flag;
- m->magic = mparams.magic;
- m->release_checks = MAX_RELEASE_CHECK_RATE;
- init_bins(m);
-#if !ONLY_MSPACES
- if (is_global(m))
- init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
- else
-#endif
- {
- /* Offset top by embedded malloc_state */
- mchunkptr mn = next_chunk(mem2chunk(m));
- init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
- }
- }
-
- else {
- /* Try to merge with an existing segment */
- msegmentptr sp = &m->seg;
- /* Only consider most recent segment if traversal suppressed */
- while (sp != 0 && tbase != sp->base + sp->size)
- sp = (NO_SEGMENT_TRAVERSAL) ? 0 : sp->next;
- if (sp != 0 &&
- !is_extern_segment(sp) &&
- (sp->sflags & USE_MMAP_BIT) == mmap_flag &&
- segment_holds(sp, m->top)) { /* append */
- sp->size += tsize;
- init_top(m, m->top, m->topsize + tsize);
- }
- else {
- if (tbase < m->least_addr)
- m->least_addr = tbase;
- sp = &m->seg;
- while (sp != 0 && sp->base != tbase + tsize)
- sp = (NO_SEGMENT_TRAVERSAL) ? 0 : sp->next;
- if (sp != 0 &&
- !is_extern_segment(sp) &&
- (sp->sflags & USE_MMAP_BIT) == mmap_flag) {
- char* oldbase = sp->base;
- sp->base = tbase;
- sp->size += tsize;
- return prepend_alloc(m, tbase, oldbase, nb);
- }
- else
- add_segment(m, tbase, tsize, mmap_flag);
- }
- }
-
- if (nb < m->topsize) { /* Allocate from new or extended top space */
- size_t rsize = m->topsize -= nb;
- mchunkptr p = m->top;
- mchunkptr r = m->top = chunk_plus_offset(p, nb);
- r->head = rsize | PINUSE_BIT;
- set_size_and_pinuse_of_inuse_chunk(m, p, nb);
- check_top_chunk(m, m->top);
- check_malloced_chunk(m, chunk2mem(p), nb);
- return chunk2mem(p);
- }
- }
-
- MALLOC_FAILURE_ACTION;
- return 0;
-}
-
-/* ----------------------- system deallocation -------------------------- */
-
-/* Unmap and unlink any mmapped segments that don't contain used chunks */
-static size_t release_unused_segments(mstate m) {
- size_t released = 0;
- int nsegs = 0;
- msegmentptr pred = &m->seg;
- msegmentptr sp = pred->next;
- while (sp != 0) {
- char* base = sp->base;
- size_t size = sp->size;
- msegmentptr next = sp->next;
- ++nsegs;
- if (is_mmapped_segment(sp) && !is_extern_segment(sp)) {
- mchunkptr p = align_as_chunk(base);
- size_t psize = chunksize(p);
- /* Can unmap if first chunk holds entire segment and not pinned */
- if (!is_inuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
- tchunkptr tp = (tchunkptr)p;
- assert(segment_holds(sp, (char*)sp));
- if (p == m->dv) {
- m->dv = 0;
- m->dvsize = 0;
- }
- else {
- unlink_large_chunk(m, tp);
- }
- if (CALL_MUNMAP(base, size) == 0) {
- released += size;
- m->footprint -= size;
- /* unlink obsoleted record */
- sp = pred;
- sp->next = next;
- }
- else { /* back out if cannot unmap */
- insert_large_chunk(m, tp, psize);
- }
- }
- }
- if (NO_SEGMENT_TRAVERSAL) /* scan only first segment */
- break;
- pred = sp;
- sp = next;
- }
- /* Reset check counter */
- m->release_checks = (((size_t) nsegs > (size_t) MAX_RELEASE_CHECK_RATE)?
- (size_t) nsegs : (size_t) MAX_RELEASE_CHECK_RATE);
- return released;
-}
-
-static int sys_trim(mstate m, size_t pad) {
- size_t released = 0;
- ensure_initialization();
- if (pad < MAX_REQUEST && is_initialized(m)) {
- pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
-
- if (m->topsize > pad) {
- /* Shrink top space in granularity-size units, keeping at least one */
- size_t unit = mparams.granularity;
- size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit -
- SIZE_T_ONE) * unit;
- msegmentptr sp = segment_holding(m, (char*)m->top);
-
- if (!is_extern_segment(sp)) {
- if (is_mmapped_segment(sp)) {
- if (HAVE_MMAP &&
- sp->size >= extra &&
- !has_segment_link(m, sp)) { /* can't shrink if pinned */
- size_t newsize = sp->size - extra;
- (void)newsize; /* placate people compiling -Wunused-variable */
- /* Prefer mremap, fall back to munmap */
- if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) ||
- (CALL_MUNMAP(sp->base + newsize, extra) == 0)) {
- released = extra;
- }
- }
- }
- else if (HAVE_MORECORE) {
- if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */
- extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit;
- ACQUIRE_MALLOC_GLOBAL_LOCK();
- {
- /* Make sure end of memory is where we last set it. */
- char* old_br = (char*)(CALL_MORECORE(0));
- if (old_br == sp->base + sp->size) {
- char* rel_br = (char*)(CALL_MORECORE(-extra));
- char* new_br = (char*)(CALL_MORECORE(0));
- if (rel_br != CMFAIL && new_br < old_br)
- released = old_br - new_br;
- }
- }
- RELEASE_MALLOC_GLOBAL_LOCK();
- }
- }
-
- if (released != 0) {
- sp->size -= released;
- m->footprint -= released;
- init_top(m, m->top, m->topsize - released);
- check_top_chunk(m, m->top);
- }
- }
-
- /* Unmap any unused mmapped segments */
- if (HAVE_MMAP)
- released += release_unused_segments(m);
-
- /* On failure, disable autotrim to avoid repeated failed future calls */
- if (released == 0 && m->topsize > m->trim_check)
- m->trim_check = MAX_SIZE_T;
- }
-
- return (released != 0)? 1 : 0;
-}
-
-/* Consolidate and bin a chunk. Differs from exported versions
- of free mainly in that the chunk need not be marked as inuse.
-*/
-static void dispose_chunk(mstate m, mchunkptr p, size_t psize) {
- mchunkptr next = chunk_plus_offset(p, psize);
- if (!pinuse(p)) {
- mchunkptr prev;
- size_t prevsize = p->prev_foot;
- if (is_mmapped(p)) {
- psize += prevsize + MMAP_FOOT_PAD;
- if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
- m->footprint -= psize;
- return;
- }
- prev = chunk_minus_offset(p, prevsize);
- psize += prevsize;
- p = prev;
- if (RTCHECK(ok_address(m, prev))) { /* consolidate backward */
- if (p != m->dv) {
- unlink_chunk(m, p, prevsize);
- }
- else if ((next->head & INUSE_BITS) == INUSE_BITS) {
- m->dvsize = psize;
- set_free_with_pinuse(p, psize, next);
- return;
- }
- }
- else {
- CORRUPTION_ERROR_ACTION(m);
- return;
- }
- }
- if (RTCHECK(ok_address(m, next))) {
- if (!cinuse(next)) { /* consolidate forward */
- if (next == m->top) {
- size_t tsize = m->topsize += psize;
- m->top = p;
- p->head = tsize | PINUSE_BIT;
- if (p == m->dv) {
- m->dv = 0;
- m->dvsize = 0;
- }
- return;
- }
- else if (next == m->dv) {
- size_t dsize = m->dvsize += psize;
- m->dv = p;
- set_size_and_pinuse_of_free_chunk(p, dsize);
- return;
- }
- else {
- size_t nsize = chunksize(next);
- psize += nsize;
- unlink_chunk(m, next, nsize);
- set_size_and_pinuse_of_free_chunk(p, psize);
- if (p == m->dv) {
- m->dvsize = psize;
- return;
- }
- }
- }
- else {
- set_free_with_pinuse(p, psize, next);
- }
- insert_chunk(m, p, psize);
- }
- else {
- CORRUPTION_ERROR_ACTION(m);
- }
-}
-
-/* ---------------------------- malloc --------------------------- */
-
-/* allocate a large request from the best fitting chunk in a treebin */
-static void* tmalloc_large(mstate m, size_t nb) {
- tchunkptr v = 0;
- size_t rsize = -nb; /* Unsigned negation */
- tchunkptr t;
- bindex_t idx;
- compute_tree_index(nb, idx);
- if ((t = *treebin_at(m, idx)) != 0) {
- /* Traverse tree for this bin looking for node with size == nb */
- size_t sizebits = nb << leftshift_for_tree_index(idx);
- tchunkptr rst = 0; /* The deepest untaken right subtree */
- for (;;) {
- tchunkptr rt;
- size_t trem = chunksize(t) - nb;
- if (trem < rsize) {
- v = t;
- if ((rsize = trem) == 0)
- break;
- }
- rt = t->child[1];
- t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
- if (rt != 0 && rt != t)
- rst = rt;
- if (t == 0) {
- t = rst; /* set t to least subtree holding sizes > nb */
- break;
- }
- sizebits <<= 1;
- }
- }
- if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */
- binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap;
- if (leftbits != 0) {
- bindex_t i;
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- t = *treebin_at(m, i);
- }
- }
-
- while (t != 0) { /* find smallest of tree or subtree */
- size_t trem = chunksize(t) - nb;
- if (trem < rsize) {
- rsize = trem;
- v = t;
- }
- t = leftmost_child(t);
- }
-
- /* If dv is a better fit, return 0 so malloc will use it */
- if (v != 0 && rsize < (size_t)(m->dvsize - nb)) {
- if (RTCHECK(ok_address(m, v))) { /* split */
- mchunkptr r = chunk_plus_offset(v, nb);
- assert(chunksize(v) == rsize + nb);
- if (RTCHECK(ok_next(v, r))) {
- unlink_large_chunk(m, v);
- if (rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(m, v, (rsize + nb));
- else {
- set_size_and_pinuse_of_inuse_chunk(m, v, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- insert_chunk(m, r, rsize);
- }
- return chunk2mem(v);
- }
- }
- CORRUPTION_ERROR_ACTION(m);
- }
- return 0;
-}
-
-/* allocate a small request from the best fitting chunk in a treebin */
-static void* tmalloc_small(mstate m, size_t nb) {
- tchunkptr t, v;
- size_t rsize;
- bindex_t i;
- binmap_t leastbit = least_bit(m->treemap);
- compute_bit2idx(leastbit, i);
- v = t = *treebin_at(m, i);
- rsize = chunksize(t) - nb;
-
- while ((t = leftmost_child(t)) != 0) {
- size_t trem = chunksize(t) - nb;
- if (trem < rsize) {
- rsize = trem;
- v = t;
- }
- }
-
- if (RTCHECK(ok_address(m, v))) {
- mchunkptr r = chunk_plus_offset(v, nb);
- assert(chunksize(v) == rsize + nb);
- if (RTCHECK(ok_next(v, r))) {
- unlink_large_chunk(m, v);
- if (rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(m, v, (rsize + nb));
- else {
- set_size_and_pinuse_of_inuse_chunk(m, v, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(m, r, rsize);
- }
- return chunk2mem(v);
- }
- }
-
- CORRUPTION_ERROR_ACTION(m);
- return 0;
-}
-
-#if !ONLY_MSPACES
-
-void* dlmalloc(size_t bytes) {
- /*
- Basic algorithm:
- If a small request (< 256 bytes minus per-chunk overhead):
- 1. If one exists, use a remainderless chunk in associated smallbin.
- (Remainderless means that there are too few excess bytes to
- represent as a chunk.)
- 2. If it is big enough, use the dv chunk, which is normally the
- chunk adjacent to the one used for the most recent small request.
- 3. If one exists, split the smallest available chunk in a bin,
- saving remainder in dv.
- 4. If it is big enough, use the top chunk.
- 5. If available, get memory from system and use it
- Otherwise, for a large request:
- 1. Find the smallest available binned chunk that fits, and use it
- if it is better fitting than dv chunk, splitting if necessary.
- 2. If better fitting than any binned chunk, use the dv chunk.
- 3. If it is big enough, use the top chunk.
- 4. If request size >= mmap threshold, try to directly mmap this chunk.
- 5. If available, get memory from system and use it
-
- The ugly goto's here ensure that postaction occurs along all paths.
- */
-
-#if USE_LOCKS
- ensure_initialization(); /* initialize in sys_alloc if not using locks */
-#endif
-
- if (!PREACTION(gm)) {
- void* mem;
- size_t nb;
- if (bytes <= MAX_SMALL_REQUEST) {
- bindex_t idx;
- binmap_t smallbits;
- nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
- idx = small_index(nb);
- smallbits = gm->smallmap >> idx;
-
- if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
- mchunkptr b, p;
- idx += ~smallbits & 1; /* Uses next bin if idx empty */
- b = smallbin_at(gm, idx);
- p = b->fd;
- assert(chunksize(p) == small_index2size(idx));
- unlink_first_small_chunk(gm, b, p, idx);
- set_inuse_and_pinuse(gm, p, small_index2size(idx));
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (nb > gm->dvsize) {
- if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
- mchunkptr b, p, r;
- size_t rsize;
- bindex_t i;
- binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- b = smallbin_at(gm, i);
- p = b->fd;
- assert(chunksize(p) == small_index2size(i));
- unlink_first_small_chunk(gm, b, p, i);
- rsize = small_index2size(i) - nb;
- /* Fit here cannot be remainderless if 4byte sizes */
- if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(gm, p, small_index2size(i));
- else {
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- r = chunk_plus_offset(p, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(gm, r, rsize);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (gm->treemap != 0 && (mem = tmalloc_small(gm, nb)) != 0) {
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
- }
- }
- else if (bytes >= MAX_REQUEST)
- nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
- else {
- nb = pad_request(bytes);
- if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) {
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
- }
-
- if (nb <= gm->dvsize) {
- size_t rsize = gm->dvsize - nb;
- mchunkptr p = gm->dv;
- if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
- mchunkptr r = gm->dv = chunk_plus_offset(p, nb);
- gm->dvsize = rsize;
- set_size_and_pinuse_of_free_chunk(r, rsize);
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- }
- else { /* exhaust dv */
- size_t dvs = gm->dvsize;
- gm->dvsize = 0;
- gm->dv = 0;
- set_inuse_and_pinuse(gm, p, dvs);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- else if (nb < gm->topsize) { /* Split top */
- size_t rsize = gm->topsize -= nb;
- mchunkptr p = gm->top;
- mchunkptr r = gm->top = chunk_plus_offset(p, nb);
- r->head = rsize | PINUSE_BIT;
- set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
- mem = chunk2mem(p);
- check_top_chunk(gm, gm->top);
- check_malloced_chunk(gm, mem, nb);
- goto postaction;
- }
-
- mem = sys_alloc(gm, nb);
-
- postaction:
- POSTACTION(gm);
- return mem;
- }
-
- return 0;
-}
-
-/* ---------------------------- free --------------------------- */
-
-void dlfree(void* mem) {
- /*
- Consolidate freed chunks with preceeding or succeeding bordering
- free chunks, if they exist, and then place in a bin. Intermixed
- with special cases for top, dv, mmapped chunks, and usage errors.
- */
-
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
-#if FOOTERS
- mstate fm = get_mstate_for(p);
- if (!ok_magic(fm)) {
- USAGE_ERROR_ACTION(fm, p);
- return;
- }
-#else /* FOOTERS */
-#define fm gm
-#endif /* FOOTERS */
- if (!PREACTION(fm)) {
- check_inuse_chunk(fm, p);
- if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) {
- size_t psize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, psize);
- if (!pinuse(p)) {
- size_t prevsize = p->prev_foot;
- if (is_mmapped(p)) {
- psize += prevsize + MMAP_FOOT_PAD;
- if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
- fm->footprint -= psize;
- goto postaction;
- }
- else {
- mchunkptr prev = chunk_minus_offset(p, prevsize);
- psize += prevsize;
- p = prev;
- if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
- if (p != fm->dv) {
- unlink_chunk(fm, p, prevsize);
- }
- else if ((next->head & INUSE_BITS) == INUSE_BITS) {
- fm->dvsize = psize;
- set_free_with_pinuse(p, psize, next);
- goto postaction;
- }
- }
- else
- goto erroraction;
- }
- }
-
- if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
- if (!cinuse(next)) { /* consolidate forward */
- if (next == fm->top) {
- size_t tsize = fm->topsize += psize;
- fm->top = p;
- p->head = tsize | PINUSE_BIT;
- if (p == fm->dv) {
- fm->dv = 0;
- fm->dvsize = 0;
- }
- if (should_trim(fm, tsize))
- sys_trim(fm, 0);
- goto postaction;
- }
- else if (next == fm->dv) {
- size_t dsize = fm->dvsize += psize;
- fm->dv = p;
- set_size_and_pinuse_of_free_chunk(p, dsize);
- goto postaction;
- }
- else {
- size_t nsize = chunksize(next);
- psize += nsize;
- unlink_chunk(fm, next, nsize);
- set_size_and_pinuse_of_free_chunk(p, psize);
- if (p == fm->dv) {
- fm->dvsize = psize;
- goto postaction;
- }
- }
- }
- else
- set_free_with_pinuse(p, psize, next);
-
- if (is_small(psize)) {
- insert_small_chunk(fm, p, psize);
- check_free_chunk(fm, p);
- }
- else {
- tchunkptr tp = (tchunkptr)p;
- insert_large_chunk(fm, tp, psize);
- check_free_chunk(fm, p);
- if (--fm->release_checks == 0)
- release_unused_segments(fm);
- }
- goto postaction;
- }
- }
- erroraction:
- USAGE_ERROR_ACTION(fm, p);
- postaction:
- POSTACTION(fm);
- }
- }
-#if !FOOTERS
-#undef fm
-#endif /* FOOTERS */
-}
-
-void* dlcalloc(size_t n_elements, size_t elem_size) {
- void* mem;
- size_t req = 0;
- if (n_elements != 0) {
- req = n_elements * elem_size;
- if (((n_elements | elem_size) & ~(size_t)0xffff) &&
- (req / n_elements != elem_size))
- req = MAX_SIZE_T; /* force downstream failure on overflow */
- }
- mem = dlmalloc(req);
- if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
- memset(mem, 0, req);
- return mem;
-}
-
-#endif /* !ONLY_MSPACES */
-
-/* ------------ Internal support for realloc, memalign, etc -------------- */
-
-/* Try to realloc; only in-place unless can_move true */
-static mchunkptr try_realloc_chunk(mstate m, mchunkptr p, size_t nb,
- int can_move) {
- mchunkptr newp = 0;
- size_t oldsize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, oldsize);
- if (RTCHECK(ok_address(m, p) && ok_inuse(p) &&
- ok_next(p, next) && ok_pinuse(next))) {
- if (is_mmapped(p)) {
- newp = mmap_resize(m, p, nb, can_move);
- }
- else if (oldsize >= nb) { /* already big enough */
- size_t rsize = oldsize - nb;
- if (rsize >= MIN_CHUNK_SIZE) { /* split off remainder */
- mchunkptr r = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- set_inuse(m, r, rsize);
- dispose_chunk(m, r, rsize);
- }
- newp = p;
- }
- else if (next == m->top) { /* extend into top */
- if (oldsize + m->topsize > nb) {
- size_t newsize = oldsize + m->topsize;
- size_t newtopsize = newsize - nb;
- mchunkptr newtop = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- newtop->head = newtopsize |PINUSE_BIT;
- m->top = newtop;
- m->topsize = newtopsize;
- newp = p;
- }
- }
- else if (next == m->dv) { /* extend into dv */
- size_t dvs = m->dvsize;
- if (oldsize + dvs >= nb) {
- size_t dsize = oldsize + dvs - nb;
- if (dsize >= MIN_CHUNK_SIZE) {
- mchunkptr r = chunk_plus_offset(p, nb);
- mchunkptr n = chunk_plus_offset(r, dsize);
- set_inuse(m, p, nb);
- set_size_and_pinuse_of_free_chunk(r, dsize);
- clear_pinuse(n);
- m->dvsize = dsize;
- m->dv = r;
- }
- else { /* exhaust dv */
- size_t newsize = oldsize + dvs;
- set_inuse(m, p, newsize);
- m->dvsize = 0;
- m->dv = 0;
- }
- newp = p;
- }
- }
- else if (!cinuse(next)) { /* extend into next free chunk */
- size_t nextsize = chunksize(next);
- if (oldsize + nextsize >= nb) {
- size_t rsize = oldsize + nextsize - nb;
- unlink_chunk(m, next, nextsize);
- if (rsize < MIN_CHUNK_SIZE) {
- size_t newsize = oldsize + nextsize;
- set_inuse(m, p, newsize);
- }
- else {
- mchunkptr r = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- set_inuse(m, r, rsize);
- dispose_chunk(m, r, rsize);
- }
- newp = p;
- }
- }
- }
- else {
- USAGE_ERROR_ACTION(m, chunk2mem(p));
- }
- return newp;
-}
-
-static void* internal_memalign(mstate m, size_t alignment, size_t bytes) {
- void* mem = 0;
- if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */
- alignment = MIN_CHUNK_SIZE;
- if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */
- size_t a = MALLOC_ALIGNMENT << 1;
- while (a < alignment) a <<= 1;
- alignment = a;
- }
- if (bytes >= MAX_REQUEST - alignment) {
- if (m != 0) { /* Test isn't needed but avoids compiler warning */
- MALLOC_FAILURE_ACTION;
- }
- }
- else {
- size_t nb = request2size(bytes);
- size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD;
- mem = internal_malloc(m, req);
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
- if (PREACTION(m))
- return 0;
- if ((((size_t)(mem)) & (alignment - 1)) != 0) { /* misaligned */
- /*
- Find an aligned spot inside chunk. Since we need to give
- back leading space in a chunk of at least MIN_CHUNK_SIZE, if
- the first calculation places us at a spot with less than
- MIN_CHUNK_SIZE leader, we can move to the next aligned spot.
- We've allocated enough total room so that this is always
- possible.
- */
- char* br = (char*)mem2chunk((size_t)(((size_t)((char*)mem + alignment -
- SIZE_T_ONE)) &
- -alignment));
- char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)?
- br : br+alignment;
- mchunkptr newp = (mchunkptr)pos;
- size_t leadsize = pos - (char*)(p);
- size_t newsize = chunksize(p) - leadsize;
-
- if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */
- newp->prev_foot = p->prev_foot + leadsize;
- newp->head = newsize;
- }
- else { /* Otherwise, give back leader, use the rest */
- set_inuse(m, newp, newsize);
- set_inuse(m, p, leadsize);
- dispose_chunk(m, p, leadsize);
- }
- p = newp;
- }
-
- /* Give back spare room at the end */
- if (!is_mmapped(p)) {
- size_t size = chunksize(p);
- if (size > nb + MIN_CHUNK_SIZE) {
- size_t remainder_size = size - nb;
- mchunkptr remainder = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- set_inuse(m, remainder, remainder_size);
- dispose_chunk(m, remainder, remainder_size);
- }
- }
-
- mem = chunk2mem(p);
- assert (chunksize(p) >= nb);
- assert(((size_t)mem & (alignment - 1)) == 0);
- check_inuse_chunk(m, p);
- POSTACTION(m);
- }
- }
- return mem;
-}
-
-/*
- Common support for independent_X routines, handling
- all of the combinations that can result.
- The opts arg has:
- bit 0 set if all elements are same size (using sizes[0])
- bit 1 set if elements should be zeroed
-*/
-static void** ialloc(mstate m,
- size_t n_elements,
- size_t* sizes,
- int opts,
- void* chunks[]) {
-
- size_t element_size; /* chunksize of each element, if all same */
- size_t contents_size; /* total size of elements */
- size_t array_size; /* request size of pointer array */
- void* mem; /* malloced aggregate space */
- mchunkptr p; /* corresponding chunk */
- size_t remainder_size; /* remaining bytes while splitting */
- void** marray; /* either "chunks" or malloced ptr array */
- mchunkptr array_chunk; /* chunk for malloced ptr array */
- flag_t was_enabled; /* to disable mmap */
- size_t size;
- size_t i;
-
- ensure_initialization();
- /* compute array length, if needed */
- if (chunks != 0) {
- if (n_elements == 0)
- return chunks; /* nothing to do */
- marray = chunks;
- array_size = 0;
- }
- else {
- /* if empty req, must still return chunk representing empty array */
- if (n_elements == 0)
- return (void**)internal_malloc(m, 0);
- marray = 0;
- array_size = request2size(n_elements * (sizeof(void*)));
- }
-
- /* compute total element size */
- if (opts & 0x1) { /* all-same-size */
- element_size = request2size(*sizes);
- contents_size = n_elements * element_size;
- }
- else { /* add up all the sizes */
- element_size = 0;
- contents_size = 0;
- for (i = 0; i != n_elements; ++i)
- contents_size += request2size(sizes[i]);
- }
-
- size = contents_size + array_size;
-
- /*
- Allocate the aggregate chunk. First disable direct-mmapping so
- malloc won't use it, since we would not be able to later
- free/realloc space internal to a segregated mmap region.
- */
- was_enabled = use_mmap(m);
- disable_mmap(m);
- mem = internal_malloc(m, size - CHUNK_OVERHEAD);
- if (was_enabled)
- enable_mmap(m);
- if (mem == 0)
- return 0;
-
- if (PREACTION(m)) return 0;
- p = mem2chunk(mem);
- remainder_size = chunksize(p);
-
- assert(!is_mmapped(p));
-
- if (opts & 0x2) { /* optionally clear the elements */
- memset((size_t*)mem, 0, remainder_size - SIZE_T_SIZE - array_size);
- }
-
- /* If not provided, allocate the pointer array as final part of chunk */
- if (marray == 0) {
- size_t array_chunk_size;
- array_chunk = chunk_plus_offset(p, contents_size);
- array_chunk_size = remainder_size - contents_size;
- marray = (void**) (chunk2mem(array_chunk));
- set_size_and_pinuse_of_inuse_chunk(m, array_chunk, array_chunk_size);
- remainder_size = contents_size;
- }
-
- /* split out elements */
- for (i = 0; ; ++i) {
- marray[i] = chunk2mem(p);
- if (i != n_elements-1) {
- if (element_size != 0)
- size = element_size;
- else
- size = request2size(sizes[i]);
- remainder_size -= size;
- set_size_and_pinuse_of_inuse_chunk(m, p, size);
- p = chunk_plus_offset(p, size);
- }
- else { /* the final element absorbs any overallocation slop */
- set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size);
- break;
- }
- }
-
-#if DEBUG
- if (marray != chunks) {
- /* final element must have exactly exhausted chunk */
- if (element_size != 0) {
- assert(remainder_size == element_size);
- }
- else {
- assert(remainder_size == request2size(sizes[i]));
- }
- check_inuse_chunk(m, mem2chunk(marray));
- }
- for (i = 0; i != n_elements; ++i)
- check_inuse_chunk(m, mem2chunk(marray[i]));
-
-#endif /* DEBUG */
-
- POSTACTION(m);
- return marray;
-}
-
-/* Try to free all pointers in the given array.
- Note: this could be made faster, by delaying consolidation,
- at the price of disabling some user integrity checks, We
- still optimize some consolidations by combining adjacent
- chunks before freeing, which will occur often if allocated
- with ialloc or the array is sorted.
-*/
-static size_t internal_bulk_free(mstate m, void* array[], size_t nelem) {
- size_t unfreed = 0;
- if (!PREACTION(m)) {
- void** a;
- void** fence = &(array[nelem]);
- for (a = array; a != fence; ++a) {
- void* mem = *a;
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
- size_t psize = chunksize(p);
-#if FOOTERS
- if (get_mstate_for(p) != m) {
- ++unfreed;
- continue;
- }
-#endif
- check_inuse_chunk(m, p);
- *a = 0;
- if (RTCHECK(ok_address(m, p) && ok_inuse(p))) {
- void ** b = a + 1; /* try to merge with next chunk */
- mchunkptr next = next_chunk(p);
- if (b != fence && *b == chunk2mem(next)) {
- size_t newsize = chunksize(next) + psize;
- set_inuse(m, p, newsize);
- *b = chunk2mem(p);
- }
- else
- dispose_chunk(m, p, psize);
- }
- else {
- CORRUPTION_ERROR_ACTION(m);
- break;
- }
- }
- }
- if (should_trim(m, m->topsize))
- sys_trim(m, 0);
- POSTACTION(m);
- }
- return unfreed;
-}
-
-/* Traversal */
-#if MALLOC_INSPECT_ALL
-static void internal_inspect_all(mstate m,
- void(*handler)(void *start,
- void *end,
- size_t used_bytes,
- void* callback_arg),
- void* arg) {
- if (is_initialized(m)) {
- mchunkptr top = m->top;
- msegmentptr s;
- for (s = &m->seg; s != 0; s = s->next) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) && q->head != FENCEPOST_HEAD) {
- mchunkptr next = next_chunk(q);
- size_t sz = chunksize(q);
- size_t used;
- void* start;
- if (is_inuse(q)) {
- used = sz - CHUNK_OVERHEAD; /* must not be mmapped */
- start = chunk2mem(q);
- }
- else {
- used = 0;
- if (is_small(sz)) { /* offset by possible bookkeeping */
- start = (void*)((char*)q + sizeof(struct malloc_chunk));
- }
- else {
- start = (void*)((char*)q + sizeof(struct malloc_tree_chunk));
- }
- }
- if (start < (void*)next) /* skip if all space is bookkeeping */
- handler(start, next, used, arg);
- if (q == top)
- break;
- q = next;
- }
- }
- }
-}
-#endif /* MALLOC_INSPECT_ALL */
-
-/* ------------------ Exported realloc, memalign, etc -------------------- */
-
-#if !ONLY_MSPACES
-
-void* dlrealloc(void* oldmem, size_t bytes) {
- void* mem = 0;
- if (oldmem == 0) {
- mem = dlmalloc(bytes);
- }
- else if (bytes >= MAX_REQUEST) {
- MALLOC_FAILURE_ACTION;
- }
-#ifdef REALLOC_ZERO_BYTES_FREES
- else if (bytes == 0) {
- dlfree(oldmem);
- }
-#endif /* REALLOC_ZERO_BYTES_FREES */
- else {
- size_t nb = request2size(bytes);
- mchunkptr oldp = mem2chunk(oldmem);
-#if ! FOOTERS
- mstate m = gm;
-#else /* FOOTERS */
- mstate m = get_mstate_for(oldp);
- if (!ok_magic(m)) {
- USAGE_ERROR_ACTION(m, oldmem);
- return 0;
- }
-#endif /* FOOTERS */
- if (!PREACTION(m)) {
- mchunkptr newp = try_realloc_chunk(m, oldp, nb, 1);
- POSTACTION(m);
- if (newp != 0) {
- check_inuse_chunk(m, newp);
- mem = chunk2mem(newp);
- }
- else {
- mem = internal_malloc(m, bytes);
- if (mem != 0) {
- size_t oc = chunksize(oldp) - overhead_for(oldp);
- memcpy(mem, oldmem, (oc < bytes)? oc : bytes);
- internal_free(m, oldmem);
- }
- }
- }
- }
- return mem;
-}
-
-void* dlrealloc_in_place(void* oldmem, size_t bytes) {
- void* mem = 0;
- if (oldmem != 0) {
- if (bytes >= MAX_REQUEST) {
- MALLOC_FAILURE_ACTION;
- }
- else {
- size_t nb = request2size(bytes);
- mchunkptr oldp = mem2chunk(oldmem);
-#if ! FOOTERS
- mstate m = gm;
-#else /* FOOTERS */
- mstate m = get_mstate_for(oldp);
- if (!ok_magic(m)) {
- USAGE_ERROR_ACTION(m, oldmem);
- return 0;
- }
-#endif /* FOOTERS */
- if (!PREACTION(m)) {
- mchunkptr newp = try_realloc_chunk(m, oldp, nb, 0);
- POSTACTION(m);
- if (newp == oldp) {
- check_inuse_chunk(m, newp);
- mem = oldmem;
- }
- }
- }
- }
- return mem;
-}
-
-void* dlmemalign(size_t alignment, size_t bytes) {
- if (alignment <= MALLOC_ALIGNMENT) {
- return dlmalloc(bytes);
- }
- return internal_memalign(gm, alignment, bytes);
-}
-
-int dlposix_memalign(void** pp, size_t alignment, size_t bytes) {
- void* mem = 0;
- if (alignment == MALLOC_ALIGNMENT)
- mem = dlmalloc(bytes);
- else {
- size_t d = alignment / sizeof(void*);
- size_t r = alignment % sizeof(void*);
- if (r != 0 || d == 0 || (d & (d-SIZE_T_ONE)) != 0)
- return EINVAL;
- else if (bytes <= MAX_REQUEST - alignment) {
- if (alignment < MIN_CHUNK_SIZE)
- alignment = MIN_CHUNK_SIZE;
- mem = internal_memalign(gm, alignment, bytes);
- }
- }
- if (mem == 0)
- return ENOMEM;
- else {
- *pp = mem;
- return 0;
- }
-}
-
-void* dlvalloc(size_t bytes) {
- size_t pagesz;
- ensure_initialization();
- pagesz = mparams.page_size;
- return dlmemalign(pagesz, bytes);
-}
-
-void* dlpvalloc(size_t bytes) {
- size_t pagesz;
- ensure_initialization();
- pagesz = mparams.page_size;
- return dlmemalign(pagesz, (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE));
-}
-
-void** dlindependent_calloc(size_t n_elements, size_t elem_size,
- void* chunks[]) {
- size_t sz = elem_size; /* serves as 1-element array */
- return ialloc(gm, n_elements, &sz, 3, chunks);
-}
-
-void** dlindependent_comalloc(size_t n_elements, size_t sizes[],
- void* chunks[]) {
- return ialloc(gm, n_elements, sizes, 0, chunks);
-}
-
-size_t dlbulk_free(void* array[], size_t nelem) {
- return internal_bulk_free(gm, array, nelem);
-}
-
-#if MALLOC_INSPECT_ALL
-void dlmalloc_inspect_all(void(*handler)(void *start,
- void *end,
- size_t used_bytes,
- void* callback_arg),
- void* arg) {
- ensure_initialization();
- if (!PREACTION(gm)) {
- internal_inspect_all(gm, handler, arg);
- POSTACTION(gm);
- }
-}
-#endif /* MALLOC_INSPECT_ALL */
-
-int dlmalloc_trim(size_t pad) {
- int result = 0;
- ensure_initialization();
- if (!PREACTION(gm)) {
- result = sys_trim(gm, pad);
- POSTACTION(gm);
- }
- return result;
-}
-
-size_t dlmalloc_footprint(void) {
- return gm->footprint;
-}
-
-size_t dlmalloc_max_footprint(void) {
- return gm->max_footprint;
-}
-
-size_t dlmalloc_footprint_limit(void) {
- size_t maf = gm->footprint_limit;
- return maf == 0 ? MAX_SIZE_T : maf;
-}
-
-size_t dlmalloc_set_footprint_limit(size_t bytes) {
- size_t result; /* invert sense of 0 */
- if (bytes == 0)
- result = granularity_align(1); /* Use minimal size */
- if (bytes == MAX_SIZE_T)
- result = 0; /* disable */
- else
- result = granularity_align(bytes);
- return gm->footprint_limit = result;
-}
-
-#if !NO_MALLINFO
-struct mallinfo dlmallinfo(void) {
- return internal_mallinfo(gm);
-}
-#endif /* NO_MALLINFO */
-
-#if !NO_MALLOC_STATS
-void dlmalloc_stats() {
- internal_malloc_stats(gm);
-}
-#endif /* NO_MALLOC_STATS */
-
-int dlmallopt(int param_number, int value) {
- return change_mparam(param_number, value);
-}
-
-size_t dlmalloc_usable_size(void* mem) {
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
- if (is_inuse(p))
- return chunksize(p) - overhead_for(p);
- }
- return 0;
-}
-
-#endif /* !ONLY_MSPACES */
-
-/* ----------------------------- user mspaces ---------------------------- */
-
-#if MSPACES
-
-static mstate init_user_mstate(char* tbase, size_t tsize) {
- size_t msize = pad_request(sizeof(struct malloc_state));
- mchunkptr mn;
- mchunkptr msp = align_as_chunk(tbase);
- mstate m = (mstate)(chunk2mem(msp));
- memset(m, 0, msize);
- (void)INITIAL_LOCK(&m->mutex);
- msp->head = (msize|INUSE_BITS);
- m->seg.base = m->least_addr = tbase;
- m->seg.size = m->footprint = m->max_footprint = tsize;
- m->magic = mparams.magic;
- m->release_checks = MAX_RELEASE_CHECK_RATE;
- m->mflags = mparams.default_mflags;
- m->extp = 0;
- m->exts = 0;
- disable_contiguous(m);
- init_bins(m);
- mn = next_chunk(mem2chunk(m));
- init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) - TOP_FOOT_SIZE);
- check_top_chunk(m, m->top);
- return m;
-}
-
-mspace create_mspace(size_t capacity, int locked) {
- mstate m = 0;
- size_t msize;
- ensure_initialization();
- msize = pad_request(sizeof(struct malloc_state));
- if (capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) {
- size_t rs = ((capacity == 0)? mparams.granularity :
- (capacity + TOP_FOOT_SIZE + msize));
- size_t tsize = granularity_align(rs);
- char* tbase = (char*)(CALL_MMAP(tsize));
- if (tbase != CMFAIL) {
- m = init_user_mstate(tbase, tsize);
- m->seg.sflags = USE_MMAP_BIT;
- set_lock(m, locked);
- }
- }
- return (mspace)m;
-}
-
-mspace create_mspace_with_base(void* base, size_t capacity, int locked) {
- mstate m = 0;
- size_t msize;
- ensure_initialization();
- msize = pad_request(sizeof(struct malloc_state));
- if (capacity > msize + TOP_FOOT_SIZE &&
- capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) {
- m = init_user_mstate((char*)base, capacity);
- m->seg.sflags = EXTERN_BIT;
- set_lock(m, locked);
- }
- return (mspace)m;
-}
-
-int mspace_track_large_chunks(mspace msp, int enable) {
- int ret = 0;
- mstate ms = (mstate)msp;
- if (!PREACTION(ms)) {
- if (!use_mmap(ms)) {
- ret = 1;
- }
- if (!enable) {
- enable_mmap(ms);
- } else {
- disable_mmap(ms);
- }
- POSTACTION(ms);
- }
- return ret;
-}
-
-size_t destroy_mspace(mspace msp) {
- size_t freed = 0;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- msegmentptr sp = &ms->seg;
- (void)DESTROY_LOCK(&ms->mutex); /* destroy before unmapped */
- while (sp != 0) {
- char* base = sp->base;
- size_t size = sp->size;
- flag_t flag = sp->sflags;
- (void)base; /* placate people compiling -Wunused-variable */
- sp = sp->next;
- if ((flag & USE_MMAP_BIT) && !(flag & EXTERN_BIT) &&
- CALL_MUNMAP(base, size) == 0)
- freed += size;
- }
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return freed;
-}
-
-/*
- mspace versions of routines are near-clones of the global
- versions. This is not so nice but better than the alternatives.
-*/
-
-void* mspace_malloc(mspace msp, size_t bytes) {
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- if (!PREACTION(ms)) {
- void* mem;
- size_t nb;
- if (bytes <= MAX_SMALL_REQUEST) {
- bindex_t idx;
- binmap_t smallbits;
- nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
- idx = small_index(nb);
- smallbits = ms->smallmap >> idx;
-
- if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
- mchunkptr b, p;
- idx += ~smallbits & 1; /* Uses next bin if idx empty */
- b = smallbin_at(ms, idx);
- p = b->fd;
- assert(chunksize(p) == small_index2size(idx));
- unlink_first_small_chunk(ms, b, p, idx);
- set_inuse_and_pinuse(ms, p, small_index2size(idx));
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (nb > ms->dvsize) {
- if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
- mchunkptr b, p, r;
- size_t rsize;
- bindex_t i;
- binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- b = smallbin_at(ms, i);
- p = b->fd;
- assert(chunksize(p) == small_index2size(i));
- unlink_first_small_chunk(ms, b, p, i);
- rsize = small_index2size(i) - nb;
- /* Fit here cannot be remainderless if 4byte sizes */
- if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(ms, p, small_index2size(i));
- else {
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- r = chunk_plus_offset(p, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(ms, r, rsize);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) {
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
- }
- }
- else if (bytes >= MAX_REQUEST)
- nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
- else {
- nb = pad_request(bytes);
- if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) {
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
- }
-
- if (nb <= ms->dvsize) {
- size_t rsize = ms->dvsize - nb;
- mchunkptr p = ms->dv;
- if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
- mchunkptr r = ms->dv = chunk_plus_offset(p, nb);
- ms->dvsize = rsize;
- set_size_and_pinuse_of_free_chunk(r, rsize);
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- }
- else { /* exhaust dv */
- size_t dvs = ms->dvsize;
- ms->dvsize = 0;
- ms->dv = 0;
- set_inuse_and_pinuse(ms, p, dvs);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (nb < ms->topsize) { /* Split top */
- size_t rsize = ms->topsize -= nb;
- mchunkptr p = ms->top;
- mchunkptr r = ms->top = chunk_plus_offset(p, nb);
- r->head = rsize | PINUSE_BIT;
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- mem = chunk2mem(p);
- check_top_chunk(ms, ms->top);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- mem = sys_alloc(ms, nb);
-
- postaction:
- POSTACTION(ms);
- return mem;
- }
-
- return 0;
-}
-
-void mspace_free(mspace msp, void* mem) {
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
-#if FOOTERS
- mstate fm = get_mstate_for(p);
- (void)msp; /* placate people compiling -Wunused */
-#else /* FOOTERS */
- mstate fm = (mstate)msp;
-#endif /* FOOTERS */
- if (!ok_magic(fm)) {
- USAGE_ERROR_ACTION(fm, p);
- return;
- }
- if (!PREACTION(fm)) {
- check_inuse_chunk(fm, p);
- if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) {
- size_t psize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, psize);
- if (!pinuse(p)) {
- size_t prevsize = p->prev_foot;
- if (is_mmapped(p)) {
- psize += prevsize + MMAP_FOOT_PAD;
- if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
- fm->footprint -= psize;
- goto postaction;
- }
- else {
- mchunkptr prev = chunk_minus_offset(p, prevsize);
- psize += prevsize;
- p = prev;
- if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
- if (p != fm->dv) {
- unlink_chunk(fm, p, prevsize);
- }
- else if ((next->head & INUSE_BITS) == INUSE_BITS) {
- fm->dvsize = psize;
- set_free_with_pinuse(p, psize, next);
- goto postaction;
- }
- }
- else
- goto erroraction;
- }
- }
-
- if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
- if (!cinuse(next)) { /* consolidate forward */
- if (next == fm->top) {
- size_t tsize = fm->topsize += psize;
- fm->top = p;
- p->head = tsize | PINUSE_BIT;
- if (p == fm->dv) {
- fm->dv = 0;
- fm->dvsize = 0;
- }
- if (should_trim(fm, tsize))
- sys_trim(fm, 0);
- goto postaction;
- }
- else if (next == fm->dv) {
- size_t dsize = fm->dvsize += psize;
- fm->dv = p;
- set_size_and_pinuse_of_free_chunk(p, dsize);
- goto postaction;
- }
- else {
- size_t nsize = chunksize(next);
- psize += nsize;
- unlink_chunk(fm, next, nsize);
- set_size_and_pinuse_of_free_chunk(p, psize);
- if (p == fm->dv) {
- fm->dvsize = psize;
- goto postaction;
- }
- }
- }
- else
- set_free_with_pinuse(p, psize, next);
-
- if (is_small(psize)) {
- insert_small_chunk(fm, p, psize);
- check_free_chunk(fm, p);
- }
- else {
- tchunkptr tp = (tchunkptr)p;
- insert_large_chunk(fm, tp, psize);
- check_free_chunk(fm, p);
- if (--fm->release_checks == 0)
- release_unused_segments(fm);
- }
- goto postaction;
- }
- }
- erroraction:
- USAGE_ERROR_ACTION(fm, p);
- postaction:
- POSTACTION(fm);
- }
- }
-}
-
-void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) {
- void* mem;
- size_t req = 0;
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- if (n_elements != 0) {
- req = n_elements * elem_size;
- if (((n_elements | elem_size) & ~(size_t)0xffff) &&
- (req / n_elements != elem_size))
- req = MAX_SIZE_T; /* force downstream failure on overflow */
- }
- mem = internal_malloc(ms, req);
- if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
- memset(mem, 0, req);
- return mem;
-}
-
-void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) {
- void* mem = 0;
- if (oldmem == 0) {
- mem = mspace_malloc(msp, bytes);
- }
- else if (bytes >= MAX_REQUEST) {
- MALLOC_FAILURE_ACTION;
- }
-#ifdef REALLOC_ZERO_BYTES_FREES
- else if (bytes == 0) {
- mspace_free(msp, oldmem);
- }
-#endif /* REALLOC_ZERO_BYTES_FREES */
- else {
- size_t nb = request2size(bytes);
- mchunkptr oldp = mem2chunk(oldmem);
-#if ! FOOTERS
- mstate m = (mstate)msp;
-#else /* FOOTERS */
- mstate m = get_mstate_for(oldp);
- if (!ok_magic(m)) {
- USAGE_ERROR_ACTION(m, oldmem);
- return 0;
- }
-#endif /* FOOTERS */
- if (!PREACTION(m)) {
- mchunkptr newp = try_realloc_chunk(m, oldp, nb, 1);
- POSTACTION(m);
- if (newp != 0) {
- check_inuse_chunk(m, newp);
- mem = chunk2mem(newp);
- }
- else {
- mem = mspace_malloc(m, bytes);
- if (mem != 0) {
- size_t oc = chunksize(oldp) - overhead_for(oldp);
- memcpy(mem, oldmem, (oc < bytes)? oc : bytes);
- mspace_free(m, oldmem);
- }
- }
- }
- }
- return mem;
-}
-
-void* mspace_realloc_in_place(mspace msp, void* oldmem, size_t bytes) {
- void* mem = 0;
- if (oldmem != 0) {
- if (bytes >= MAX_REQUEST) {
- MALLOC_FAILURE_ACTION;
- }
- else {
- size_t nb = request2size(bytes);
- mchunkptr oldp = mem2chunk(oldmem);
-#if ! FOOTERS
- mstate m = (mstate)msp;
-#else /* FOOTERS */
- mstate m = get_mstate_for(oldp);
- (void)msp; /* placate people compiling -Wunused */
- if (!ok_magic(m)) {
- USAGE_ERROR_ACTION(m, oldmem);
- return 0;
- }
-#endif /* FOOTERS */
- if (!PREACTION(m)) {
- mchunkptr newp = try_realloc_chunk(m, oldp, nb, 0);
- POSTACTION(m);
- if (newp == oldp) {
- check_inuse_chunk(m, newp);
- mem = oldmem;
- }
- }
- }
- }
- return mem;
-}
-
-void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) {
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- if (alignment <= MALLOC_ALIGNMENT)
- return mspace_malloc(msp, bytes);
- return internal_memalign(ms, alignment, bytes);
-}
-
-void** mspace_independent_calloc(mspace msp, size_t n_elements,
- size_t elem_size, void* chunks[]) {
- size_t sz = elem_size; /* serves as 1-element array */
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- return ialloc(ms, n_elements, &sz, 3, chunks);
-}
-
-void** mspace_independent_comalloc(mspace msp, size_t n_elements,
- size_t sizes[], void* chunks[]) {
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- return ialloc(ms, n_elements, sizes, 0, chunks);
-}
-
-size_t mspace_bulk_free(mspace msp, void* array[], size_t nelem) {
- return internal_bulk_free((mstate)msp, array, nelem);
-}
-
-#if MALLOC_INSPECT_ALL
-void mspace_inspect_all(mspace msp,
- void(*handler)(void *start,
- void *end,
- size_t used_bytes,
- void* callback_arg),
- void* arg) {
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- if (!PREACTION(ms)) {
- internal_inspect_all(ms, handler, arg);
- POSTACTION(ms);
- }
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
-}
-#endif /* MALLOC_INSPECT_ALL */
-
-int mspace_trim(mspace msp, size_t pad) {
- int result = 0;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- if (!PREACTION(ms)) {
- result = sys_trim(ms, pad);
- POSTACTION(ms);
- }
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return result;
-}
-
-#if !NO_MALLOC_STATS
-void mspace_malloc_stats(mspace msp) {
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- internal_malloc_stats(ms);
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
-}
-#endif /* NO_MALLOC_STATS */
-
-size_t mspace_footprint(mspace msp) {
- size_t result = 0;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- result = ms->footprint;
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return result;
-}
-
-size_t mspace_max_footprint(mspace msp) {
- size_t result = 0;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- result = ms->max_footprint;
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return result;
-}
-
-size_t mspace_footprint_limit(mspace msp) {
- size_t result = 0;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- size_t maf = ms->footprint_limit;
- result = (maf == 0) ? MAX_SIZE_T : maf;
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return result;
-}
-
-size_t mspace_set_footprint_limit(mspace msp, size_t bytes) {
- size_t result = 0;
- mstate ms = (mstate)msp;
- if (ok_magic(ms)) {
- if (bytes == 0)
- result = granularity_align(1); /* Use minimal size */
- if (bytes == MAX_SIZE_T)
- result = 0; /* disable */
- else
- result = granularity_align(bytes);
- ms->footprint_limit = result;
- }
- else {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return result;
-}
-
-#if !NO_MALLINFO
-struct mallinfo mspace_mallinfo(mspace msp) {
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- }
- return internal_mallinfo(ms);
-}
-#endif /* NO_MALLINFO */
-
-size_t mspace_usable_size(const void* mem) {
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
- if (is_inuse(p))
- return chunksize(p) - overhead_for(p);
- }
- return 0;
-}
-
-int mspace_mallopt(int param_number, int value) {
- return change_mparam(param_number, value);
-}
-
-#endif /* MSPACES */
-
-
-/* -------------------- Alternative MORECORE functions ------------------- */
-
-/*
- Guidelines for creating a custom version of MORECORE:
-
- * For best performance, MORECORE should allocate in multiples of pagesize.
- * MORECORE may allocate more memory than requested. (Or even less,
- but this will usually result in a malloc failure.)
- * MORECORE must not allocate memory when given argument zero, but
- instead return one past the end address of memory from previous
- nonzero call.
- * For best performance, consecutive calls to MORECORE with positive
- arguments should return increasing addresses, indicating that
- space has been contiguously extended.
- * Even though consecutive calls to MORECORE need not return contiguous
- addresses, it must be OK for malloc'ed chunks to span multiple
- regions in those cases where they do happen to be contiguous.
- * MORECORE need not handle negative arguments -- it may instead
- just return MFAIL when given negative arguments.
- Negative arguments are always multiples of pagesize. MORECORE
- must not misinterpret negative args as large positive unsigned
- args. You can suppress all such calls from even occurring by defining
- MORECORE_CANNOT_TRIM,
-
- As an example alternative MORECORE, here is a custom allocator
- kindly contributed for pre-OSX macOS. It uses virtually but not
- necessarily physically contiguous non-paged memory (locked in,
- present and won't get swapped out). You can use it by uncommenting
- this section, adding some #includes, and setting up the appropriate
- defines above:
-
- #define MORECORE osMoreCore
-
- There is also a shutdown routine that should somehow be called for
- cleanup upon program exit.
-
- #define MAX_POOL_ENTRIES 100
- #define MINIMUM_MORECORE_SIZE (64 * 1024U)
- static int next_os_pool;
- void *our_os_pools[MAX_POOL_ENTRIES];
-
- void *osMoreCore(int size)
- {
- void *ptr = 0;
- static void *sbrk_top = 0;
-
- if (size > 0)
- {
- if (size < MINIMUM_MORECORE_SIZE)
- size = MINIMUM_MORECORE_SIZE;
- if (CurrentExecutionLevel() == kTaskLevel)
- ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0);
- if (ptr == 0)
- {
- return (void *) MFAIL;
- }
- // save ptrs so they can be freed during cleanup
- our_os_pools[next_os_pool] = ptr;
- next_os_pool++;
- ptr = (void *) ((((size_t) ptr) + RM_PAGE_MASK) & ~RM_PAGE_MASK);
- sbrk_top = (char *) ptr + size;
- return ptr;
- }
- else if (size < 0)
- {
- // we don't currently support shrink behavior
- return (void *) MFAIL;
- }
- else
- {
- return sbrk_top;
- }
- }
-
- // cleanup any allocated memory pools
- // called as last thing before shutting down driver
-
- void osCleanupMem(void)
- {
- void **ptr;
-
- for (ptr = our_os_pools; ptr < &our_os_pools[MAX_POOL_ENTRIES]; ptr++)
- if (*ptr)
- {
- PoolDeallocate(*ptr);
- *ptr = 0;
- }
- }
-
-*/
-
-
-/* -----------------------------------------------------------------------
-History:
- v2.8.6 Wed Aug 29 06:57:58 2012 Doug Lea
- * fix bad comparison in dlposix_memalign
- * don't reuse adjusted asize in sys_alloc
- * add LOCK_AT_FORK -- thanks to Kirill Artamonov for the suggestion
- * reduce compiler warnings -- thanks to all who reported/suggested these
-
- v2.8.5 Sun May 22 10:26:02 2011 Doug Lea (dl at gee)
- * Always perform unlink checks unless INSECURE
- * Add posix_memalign.
- * Improve realloc to expand in more cases; expose realloc_in_place.
- Thanks to Peter Buhr for the suggestion.
- * Add footprint_limit, inspect_all, bulk_free. Thanks
- to Barry Hayes and others for the suggestions.
- * Internal refactorings to avoid calls while holding locks
- * Use non-reentrant locks by default. Thanks to Roland McGrath
- for the suggestion.
- * Small fixes to mspace_destroy, reset_on_error.
- * Various configuration extensions/changes. Thanks
- to all who contributed these.
-
- V2.8.4a Thu Apr 28 14:39:43 2011 (dl at gee.cs.oswego.edu)
- * Update Creative Commons URL
-
- V2.8.4 Wed May 27 09:56:23 2009 Doug Lea (dl at gee)
- * Use zeros instead of prev foot for is_mmapped
- * Add mspace_track_large_chunks; thanks to Jean Brouwers
- * Fix set_inuse in internal_realloc; thanks to Jean Brouwers
- * Fix insufficient sys_alloc padding when using 16byte alignment
- * Fix bad error check in mspace_footprint
- * Adaptations for ptmalloc; thanks to Wolfram Gloger.
- * Reentrant spin locks; thanks to Earl Chew and others
- * Win32 improvements; thanks to Niall Douglas and Earl Chew
- * Add NO_SEGMENT_TRAVERSAL and MAX_RELEASE_CHECK_RATE options
- * Extension hook in malloc_state
- * Various small adjustments to reduce warnings on some compilers
- * Various configuration extensions/changes for more platforms. Thanks
- to all who contributed these.
-
- V2.8.3 Thu Sep 22 11:16:32 2005 Doug Lea (dl at gee)
- * Add max_footprint functions
- * Ensure all appropriate literals are size_t
- * Fix conditional compilation problem for some #define settings
- * Avoid concatenating segments with the one provided
- in create_mspace_with_base
- * Rename some variables to avoid compiler shadowing warnings
- * Use explicit lock initialization.
- * Better handling of sbrk interference.
- * Simplify and fix segment insertion, trimming and mspace_destroy
- * Reinstate REALLOC_ZERO_BYTES_FREES option from 2.7.x
- * Thanks especially to Dennis Flanagan for help on these.
-
- V2.8.2 Sun Jun 12 16:01:10 2005 Doug Lea (dl at gee)
- * Fix memalign brace error.
-
- V2.8.1 Wed Jun 8 16:11:46 2005 Doug Lea (dl at gee)
- * Fix improper #endif nesting in C++
- * Add explicit casts needed for C++
-
- V2.8.0 Mon May 30 14:09:02 2005 Doug Lea (dl at gee)
- * Use trees for large bins
- * Support mspaces
- * Use segments to unify sbrk-based and mmap-based system allocation,
- removing need for emulation on most platforms without sbrk.
- * Default safety checks
- * Optional footer checks. Thanks to William Robertson for the idea.
- * Internal code refactoring
- * Incorporate suggestions and platform-specific changes.
- Thanks to Dennis Flanagan, Colin Plumb, Niall Douglas,
- Aaron Bachmann, Emery Berger, and others.
- * Speed up non-fastbin processing enough to remove fastbins.
- * Remove useless cfree() to avoid conflicts with other apps.
- * Remove internal memcpy, memset. Compilers handle builtins better.
- * Remove some options that no one ever used and rename others.
-
- V2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee)
- * Fix malloc_state bitmap array misdeclaration
-
- V2.7.1 Thu Jul 25 10:58:03 2002 Doug Lea (dl at gee)
- * Allow tuning of FIRST_SORTED_BIN_SIZE
- * Use PTR_UINT as type for all ptr->int casts. Thanks to John Belmonte.
- * Better detection and support for non-contiguousness of MORECORE.
- Thanks to Andreas Mueller, Conal Walsh, and Wolfram Gloger
- * Bypass most of malloc if no frees. Thanks To Emery Berger.
- * Fix freeing of old top non-contiguous chunk im sysmalloc.
- * Raised default trim and map thresholds to 256K.
- * Fix mmap-related #defines. Thanks to Lubos Lunak.
- * Fix copy macros; added LACKS_FCNTL_H. Thanks to Neal Walfield.
- * Branch-free bin calculation
- * Default trim and mmap thresholds now 256K.
-
- V2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee)
- * Introduce independent_comalloc and independent_calloc.
- Thanks to Michael Pachos for motivation and help.
- * Make optional .h file available
- * Allow > 2GB requests on 32bit systems.
- * new WIN32 sbrk, mmap, munmap, lock code from <Walter@GeNeSys-e.de>.
- Thanks also to Andreas Mueller <a.mueller at paradatec.de>,
- and Anonymous.
- * Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for
- helping test this.)
- * memalign: check alignment arg
- * realloc: don't try to shift chunks backwards, since this
- leads to more fragmentation in some programs and doesn't
- seem to help in any others.
- * Collect all cases in malloc requiring system memory into sysmalloc
- * Use mmap as backup to sbrk
- * Place all internal state in malloc_state
- * Introduce fastbins (although similar to 2.5.1)
- * Many minor tunings and cosmetic improvements
- * Introduce USE_PUBLIC_MALLOC_WRAPPERS, USE_MALLOC_LOCK
- * Introduce MALLOC_FAILURE_ACTION, MORECORE_CONTIGUOUS
- Thanks to Tony E. Bennett <tbennett@nvidia.com> and others.
- * Include errno.h to support default failure action.
-
- V2.6.6 Sun Dec 5 07:42:19 1999 Doug Lea (dl at gee)
- * return null for negative arguments
- * Added Several WIN32 cleanups from Martin C. Fong <mcfong at yahoo.com>
- * Add 'LACKS_SYS_PARAM_H' for those systems without 'sys/param.h'
- (e.g. WIN32 platforms)
- * Cleanup header file inclusion for WIN32 platforms
- * Cleanup code to avoid Microsoft Visual C++ compiler complaints
- * Add 'USE_DL_PREFIX' to quickly allow co-existence with existing
- memory allocation routines
- * Set 'malloc_getpagesize' for WIN32 platforms (needs more work)
- * Use 'assert' rather than 'ASSERT' in WIN32 code to conform to
- usage of 'assert' in non-WIN32 code
- * Improve WIN32 'sbrk()' emulation's 'findRegion()' routine to
- avoid infinite loop
- * Always call 'fREe()' rather than 'free()'
-
- V2.6.5 Wed Jun 17 15:57:31 1998 Doug Lea (dl at gee)
- * Fixed ordering problem with boundary-stamping
-
- V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee)
- * Added pvalloc, as recommended by H.J. Liu
- * Added 64bit pointer support mainly from Wolfram Gloger
- * Added anonymously donated WIN32 sbrk emulation
- * Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen
- * malloc_extend_top: fix mask error that caused wastage after
- foreign sbrks
- * Add linux mremap support code from HJ Liu
-
- V2.6.2 Tue Dec 5 06:52:55 1995 Doug Lea (dl at gee)
- * Integrated most documentation with the code.
- * Add support for mmap, with help from
- Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
- * Use last_remainder in more cases.
- * Pack bins using idea from colin@nyx10.cs.du.edu
- * Use ordered bins instead of best-fit threshhold
- * Eliminate block-local decls to simplify tracing and debugging.
- * Support another case of realloc via move into top
- * Fix error occuring when initial sbrk_base not word-aligned.
- * Rely on page size for units instead of SBRK_UNIT to
- avoid surprises about sbrk alignment conventions.
- * Add mallinfo, mallopt. Thanks to Raymond Nijssen
- (raymond@es.ele.tue.nl) for the suggestion.
- * Add `pad' argument to malloc_trim and top_pad mallopt parameter.
- * More precautions for cases where other routines call sbrk,
- courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
- * Added macros etc., allowing use in linux libc from
- H.J. Lu (hjl@gnu.ai.mit.edu)
- * Inverted this history list
-
- V2.6.1 Sat Dec 2 14:10:57 1995 Doug Lea (dl at gee)
- * Re-tuned and fixed to behave more nicely with V2.6.0 changes.
- * Removed all preallocation code since under current scheme
- the work required to undo bad preallocations exceeds
- the work saved in good cases for most test programs.
- * No longer use return list or unconsolidated bins since
- no scheme using them consistently outperforms those that don't
- given above changes.
- * Use best fit for very large chunks to prevent some worst-cases.
- * Added some support for debugging
-
- V2.6.0 Sat Nov 4 07:05:23 1995 Doug Lea (dl at gee)
- * Removed footers when chunks are in use. Thanks to
- Paul Wilson (wilson@cs.texas.edu) for the suggestion.
-
- V2.5.4 Wed Nov 1 07:54:51 1995 Doug Lea (dl at gee)
- * Added malloc_trim, with help from Wolfram Gloger
- (wmglo@Dent.MED.Uni-Muenchen.DE).
-
- V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g)
-
- V2.5.2 Tue Apr 5 16:20:40 1994 Doug Lea (dl at g)
- * realloc: try to expand in both directions
- * malloc: swap order of clean-bin strategy;
- * realloc: only conditionally expand backwards
- * Try not to scavenge used bins
- * Use bin counts as a guide to preallocation
- * Occasionally bin return list chunks in first scan
- * Add a few optimizations from colin@nyx10.cs.du.edu
-
- V2.5.1 Sat Aug 14 15:40:43 1993 Doug Lea (dl at g)
- * faster bin computation & slightly different binning
- * merged all consolidations to one part of malloc proper
- (eliminating old malloc_find_space & malloc_clean_bin)
- * Scan 2 returns chunks (not just 1)
- * Propagate failure in realloc if malloc returns 0
- * Add stuff to allow compilation on non-ANSI compilers
- from kpv@research.att.com
-
- V2.5 Sat Aug 7 07:41:59 1993 Doug Lea (dl at g.oswego.edu)
- * removed potential for odd address access in prev_chunk
- * removed dependency on getpagesize.h
- * misc cosmetics and a bit more internal documentation
- * anticosmetics: mangled names in macros to evade debugger strangeness
- * tested on sparc, hp-700, dec-mips, rs6000
- with gcc & native cc (hp, dec only) allowing
- Detlefs & Zorn comparison study (in SIGPLAN Notices.)
-
- Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu)
- * Based loosely on libg++-1.2X malloc. (It retains some of the overall
- structure of old version, but most details differ.)
-
-*/
diff --git a/src/third_party/boost-1.68.0/libs/container/src/dlmalloc_ext_2_8_6.c b/src/third_party/boost-1.68.0/libs/container/src/dlmalloc_ext_2_8_6.c
deleted file mode 100644
index 3328d729751..00000000000
--- a/src/third_party/boost-1.68.0/libs/container/src/dlmalloc_ext_2_8_6.c
+++ /dev/null
@@ -1,1459 +0,0 @@
-//////////////////////////////////////////////////////////////////////////////
-//
-// (C) Copyright Ion Gaztanaga 2007-2015. Distributed under the Boost
-// Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-//
-// See http://www.boost.org/libs/container for documentation.
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#include <boost/container/detail/alloc_lib.h>
-
-#include "errno.h" //dlmalloc bug EINVAL is used in posix_memalign without checking LACKS_ERRNO_H
-#include "limits.h" //CHAR_BIT
-#ifdef BOOST_CONTAINER_DLMALLOC_FOOTERS
-#define FOOTERS 1
-#endif
-#define USE_LOCKS 1
-#define MSPACES 1
-#define NO_MALLINFO 1
-#define NO_MALLOC_STATS 1
-
-
-#if !defined(NDEBUG)
- #if !defined(DEBUG)
- #define DEBUG 1
- #define DL_DEBUG_DEFINED
- #endif
-#endif
-
-#define USE_DL_PREFIX
-
-#ifdef __GNUC__
-#define FORCEINLINE inline
-#endif
-#include "dlmalloc_2_8_6.c"
-
-#ifdef _MSC_VER
-#pragma warning (push)
-#pragma warning (disable : 4127)
-#pragma warning (disable : 4267)
-#pragma warning (disable : 4127)
-#pragma warning (disable : 4702)
-#pragma warning (disable : 4390) /*empty controlled statement found; is this the intent?*/
-#pragma warning (disable : 4251 4231 4660) /*dll warnings*/
-#endif
-
-#define DL_SIZE_IMPL(p) (chunksize(mem2chunk(p)) - overhead_for(mem2chunk(p)))
-
-static size_t s_allocated_memory;
-
-///////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////
-//
-// SLIGHTLY MODIFIED DLMALLOC FUNCTIONS
-//
-///////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////
-
-//This function is equal to mspace_free
-//replacing PREACTION with 0 and POSTACTION with nothing
-static void mspace_free_lockless(mspace msp, void* mem)
-{
- if (mem != 0) {
- mchunkptr p = mem2chunk(mem);
-#if FOOTERS
- mstate fm = get_mstate_for(p);
- msp = msp; /* placate people compiling -Wunused */
-#else /* FOOTERS */
- mstate fm = (mstate)msp;
-#endif /* FOOTERS */
- if (!ok_magic(fm)) {
- USAGE_ERROR_ACTION(fm, p);
- return;
- }
- if (!0){//PREACTION(fm)) {
- check_inuse_chunk(fm, p);
- if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) {
- size_t psize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, psize);
- s_allocated_memory -= psize;
- if (!pinuse(p)) {
- size_t prevsize = p->prev_foot;
- if (is_mmapped(p)) {
- psize += prevsize + MMAP_FOOT_PAD;
- if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
- fm->footprint -= psize;
- goto postaction;
- }
- else {
- mchunkptr prev = chunk_minus_offset(p, prevsize);
- psize += prevsize;
- p = prev;
- if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
- if (p != fm->dv) {
- unlink_chunk(fm, p, prevsize);
- }
- else if ((next->head & INUSE_BITS) == INUSE_BITS) {
- fm->dvsize = psize;
- set_free_with_pinuse(p, psize, next);
- goto postaction;
- }
- }
- else
- goto erroraction;
- }
- }
-
- if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
- if (!cinuse(next)) { /* consolidate forward */
- if (next == fm->top) {
- size_t tsize = fm->topsize += psize;
- fm->top = p;
- p->head = tsize | PINUSE_BIT;
- if (p == fm->dv) {
- fm->dv = 0;
- fm->dvsize = 0;
- }
- if (should_trim(fm, tsize))
- sys_trim(fm, 0);
- goto postaction;
- }
- else if (next == fm->dv) {
- size_t dsize = fm->dvsize += psize;
- fm->dv = p;
- set_size_and_pinuse_of_free_chunk(p, dsize);
- goto postaction;
- }
- else {
- size_t nsize = chunksize(next);
- psize += nsize;
- unlink_chunk(fm, next, nsize);
- set_size_and_pinuse_of_free_chunk(p, psize);
- if (p == fm->dv) {
- fm->dvsize = psize;
- goto postaction;
- }
- }
- }
- else
- set_free_with_pinuse(p, psize, next);
-
- if (is_small(psize)) {
- insert_small_chunk(fm, p, psize);
- check_free_chunk(fm, p);
- }
- else {
- tchunkptr tp = (tchunkptr)p;
- insert_large_chunk(fm, tp, psize);
- check_free_chunk(fm, p);
- if (--fm->release_checks == 0)
- release_unused_segments(fm);
- }
- goto postaction;
- }
- }
- erroraction:
- USAGE_ERROR_ACTION(fm, p);
- postaction:
- ;//POSTACTION(fm);
- }
- }
-}
-
-//This function is equal to mspace_malloc
-//replacing PREACTION with 0 and POSTACTION with nothing
-void* mspace_malloc_lockless(mspace msp, size_t bytes)
-{
- mstate ms = (mstate)msp;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- if (!0){//PREACTION(ms)) {
- void* mem;
- size_t nb;
- if (bytes <= MAX_SMALL_REQUEST) {
- bindex_t idx;
- binmap_t smallbits;
- nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
- idx = small_index(nb);
- smallbits = ms->smallmap >> idx;
-
- if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
- mchunkptr b, p;
- idx += ~smallbits & 1; /* Uses next bin if idx empty */
- b = smallbin_at(ms, idx);
- p = b->fd;
- assert(chunksize(p) == small_index2size(idx));
- unlink_first_small_chunk(ms, b, p, idx);
- set_inuse_and_pinuse(ms, p, small_index2size(idx));
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (nb > ms->dvsize) {
- if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
- mchunkptr b, p, r;
- size_t rsize;
- bindex_t i;
- binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
- binmap_t leastbit = least_bit(leftbits);
- compute_bit2idx(leastbit, i);
- b = smallbin_at(ms, i);
- p = b->fd;
- assert(chunksize(p) == small_index2size(i));
- unlink_first_small_chunk(ms, b, p, i);
- rsize = small_index2size(i) - nb;
- /* Fit here cannot be remainderless if 4byte sizes */
- if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
- set_inuse_and_pinuse(ms, p, small_index2size(i));
- else {
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- r = chunk_plus_offset(p, nb);
- set_size_and_pinuse_of_free_chunk(r, rsize);
- replace_dv(ms, r, rsize);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) {
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
- }
- }
- else if (bytes >= MAX_REQUEST)
- nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
- else {
- nb = pad_request(bytes);
- if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) {
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
- }
-
- if (nb <= ms->dvsize) {
- size_t rsize = ms->dvsize - nb;
- mchunkptr p = ms->dv;
- if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
- mchunkptr r = ms->dv = chunk_plus_offset(p, nb);
- ms->dvsize = rsize;
- set_size_and_pinuse_of_free_chunk(r, rsize);
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- }
- else { /* exhaust dv */
- size_t dvs = ms->dvsize;
- ms->dvsize = 0;
- ms->dv = 0;
- set_inuse_and_pinuse(ms, p, dvs);
- }
- mem = chunk2mem(p);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- else if (nb < ms->topsize) { /* Split top */
- size_t rsize = ms->topsize -= nb;
- mchunkptr p = ms->top;
- mchunkptr r = ms->top = chunk_plus_offset(p, nb);
- r->head = rsize | PINUSE_BIT;
- set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
- mem = chunk2mem(p);
- check_top_chunk(ms, ms->top);
- check_malloced_chunk(ms, mem, nb);
- goto postaction;
- }
-
- mem = sys_alloc(ms, nb);
-
- postaction:
- ;//POSTACTION(ms);
- return mem;
- }
-
- return 0;
-}
-
-//This function is equal to try_realloc_chunk but handling
-//minimum and desired bytes
-static mchunkptr try_realloc_chunk_with_min(mstate m, mchunkptr p, size_t min_nb, size_t des_nb, int can_move)
-{
- mchunkptr newp = 0;
- size_t oldsize = chunksize(p);
- mchunkptr next = chunk_plus_offset(p, oldsize);
- if (RTCHECK(ok_address(m, p) && ok_inuse(p) &&
- ok_next(p, next) && ok_pinuse(next))) {
- if (is_mmapped(p)) {
- newp = mmap_resize(m, p, des_nb, can_move);
- if(!newp) //mmap does not return how many bytes we could reallocate, so go the minimum
- newp = mmap_resize(m, p, min_nb, can_move);
- }
- else if (oldsize >= min_nb) { /* already big enough */
- size_t nb = oldsize >= des_nb ? des_nb : oldsize;
- size_t rsize = oldsize - nb;
- if (rsize >= MIN_CHUNK_SIZE) { /* split off remainder */
- mchunkptr r = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- set_inuse(m, r, rsize);
- dispose_chunk(m, r, rsize);
- }
- newp = p;
- }
- else if (next == m->top) { /* extend into top */
- if (oldsize + m->topsize > min_nb) {
- size_t nb = (oldsize + m->topsize) > des_nb ? des_nb : (oldsize + m->topsize - MALLOC_ALIGNMENT);
- size_t newsize = oldsize + m->topsize;
- size_t newtopsize = newsize - nb;
- mchunkptr newtop = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- newtop->head = newtopsize |PINUSE_BIT;
- m->top = newtop;
- m->topsize = newtopsize;
- newp = p;
- }
- }
- else if (next == m->dv) { /* extend into dv */
- size_t dvs = m->dvsize;
- if (oldsize + dvs >= min_nb) {
- size_t nb = (oldsize + dvs) >= des_nb ? des_nb : (oldsize + dvs);
- size_t dsize = oldsize + dvs - nb;
- if (dsize >= MIN_CHUNK_SIZE) {
- mchunkptr r = chunk_plus_offset(p, nb);
- mchunkptr n = chunk_plus_offset(r, dsize);
- set_inuse(m, p, nb);
- set_size_and_pinuse_of_free_chunk(r, dsize);
- clear_pinuse(n);
- m->dvsize = dsize;
- m->dv = r;
- }
- else { /* exhaust dv */
- size_t newsize = oldsize + dvs;
- set_inuse(m, p, newsize);
- m->dvsize = 0;
- m->dv = 0;
- }
- newp = p;
- }
- }
- else if (!cinuse(next)) { /* extend into next free chunk */
- size_t nextsize = chunksize(next);
- if (oldsize + nextsize >= min_nb) {
- size_t nb = (oldsize + nextsize) >= des_nb ? des_nb : (oldsize + nextsize);
- size_t rsize = oldsize + nextsize - nb;
- unlink_chunk(m, next, nextsize);
- if (rsize < MIN_CHUNK_SIZE) {
- size_t newsize = oldsize + nextsize;
- set_inuse(m, p, newsize);
- }
- else {
- mchunkptr r = chunk_plus_offset(p, nb);
- set_inuse(m, p, nb);
- set_inuse(m, r, rsize);
- dispose_chunk(m, r, rsize);
- }
- newp = p;
- }
- }
- }
- else {
- USAGE_ERROR_ACTION(m, chunk2mem(p));
- }
- return newp;
-}
-
-#define BOOST_ALLOC_PLUS_MEMCHAIN_MEM_JUMP_NEXT(THISMEM, NEXTMEM) \
- *((void**)(THISMEM)) = *((void**)((NEXTMEM)))
-
-//This function is based on internal_bulk_free
-//replacing iteration over array[] with boost_cont_memchain.
-//Instead of returning the unallocated nodes, returns a chain of non-deallocated nodes.
-//After forward merging, backwards merging is also tried
-static void internal_multialloc_free(mstate m, boost_cont_memchain *pchain)
-{
-#if FOOTERS
- boost_cont_memchain ret_chain;
- BOOST_CONTAINER_MEMCHAIN_INIT(&ret_chain);
-#endif
- if (!PREACTION(m)) {
- boost_cont_memchain_it a_it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(pchain);
- while(!BOOST_CONTAINER_MEMCHAIN_IS_END_IT(pchain, a_it)) { /* Iterate though all memory holded by the chain */
- void* a_mem = BOOST_CONTAINER_MEMIT_ADDR(a_it);
- mchunkptr a_p = mem2chunk(a_mem);
- size_t psize = chunksize(a_p);
-#if FOOTERS
- if (get_mstate_for(a_p) != m) {
- BOOST_CONTAINER_MEMIT_NEXT(a_it);
- BOOST_CONTAINER_MEMCHAIN_PUSH_BACK(&ret_chain, a_mem);
- continue;
- }
-#endif
- check_inuse_chunk(m, a_p);
- if (RTCHECK(ok_address(m, a_p) && ok_inuse(a_p))) {
- while(1) { /* Internal loop to speed up forward and backward merging (avoids some redundant checks) */
- boost_cont_memchain_it b_it = a_it;
- BOOST_CONTAINER_MEMIT_NEXT(b_it);
- if(!BOOST_CONTAINER_MEMCHAIN_IS_END_IT(pchain, b_it)){
- void *b_mem = BOOST_CONTAINER_MEMIT_ADDR(b_it);
- mchunkptr b_p = mem2chunk(b_mem);
- if (b_p == next_chunk(a_p)) { /* b chunk is contiguous and next so b's size can be added to a */
- psize += chunksize(b_p);
- set_inuse(m, a_p, psize);
- BOOST_ALLOC_PLUS_MEMCHAIN_MEM_JUMP_NEXT(a_mem, b_mem);
- continue;
- }
- if(RTCHECK(ok_address(m, b_p) && ok_inuse(b_p))){
- /* b chunk is contiguous and previous so a's size can be added to b */
- if(a_p == next_chunk(b_p)) {
- psize += chunksize(b_p);
- set_inuse(m, b_p, psize);
- a_it = b_it;
- a_p = b_p;
- a_mem = b_mem;
- continue;
- }
- }
- }
- /* Normal deallocation starts again in the outer loop */
- a_it = b_it;
- s_allocated_memory -= psize;
- dispose_chunk(m, a_p, psize);
- break;
- }
- }
- else {
- CORRUPTION_ERROR_ACTION(m);
- break;
- }
- }
- if (should_trim(m, m->topsize))
- sys_trim(m, 0);
- POSTACTION(m);
- }
-#if FOOTERS
- {
- boost_cont_memchain_it last_pchain = BOOST_CONTAINER_MEMCHAIN_LAST_IT(pchain);
- BOOST_CONTAINER_MEMCHAIN_INIT(pchain);
- BOOST_CONTAINER_MEMCHAIN_INCORPORATE_AFTER
- (pchain
- , last_pchain
- , BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ret_chain)
- , BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ret_chain)
- , BOOST_CONTAINER_MEMCHAIN_SIZE(&ret_chain)
- );
- }
-#endif
-}
-
-///////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////
-//
-// NEW FUNCTIONS BASED ON DLMALLOC INTERNALS
-//
-///////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////
-
-#define GET_TRUNCATED_SIZE(ORIG_SIZE, ROUNDTO) ((ORIG_SIZE)/(ROUNDTO)*(ROUNDTO))
-#define GET_ROUNDED_SIZE(ORIG_SIZE, ROUNDTO) ((((ORIG_SIZE)-1)/(ROUNDTO)+1)*(ROUNDTO))
-#define GET_TRUNCATED_PO2_SIZE(ORIG_SIZE, ROUNDTO) ((ORIG_SIZE) & (~(ROUNDTO-1)))
-#define GET_ROUNDED_PO2_SIZE(ORIG_SIZE, ROUNDTO) (((ORIG_SIZE - 1) & (~(ROUNDTO-1))) + ROUNDTO)
-
-/* Greatest common divisor and least common multiple
- gcd is an algorithm that calculates the greatest common divisor of two
- integers, using Euclid's algorithm.
-
- Pre: A > 0 && B > 0
- Recommended: A > B*/
-#define CALCULATE_GCD(A, B, OUT)\
-{\
- size_t a = A;\
- size_t b = B;\
- do\
- {\
- size_t tmp = b;\
- b = a % b;\
- a = tmp;\
- } while (b != 0);\
-\
- OUT = a;\
-}
-
-/* lcm is an algorithm that calculates the least common multiple of two
- integers.
-
- Pre: A > 0 && B > 0
- Recommended: A > B*/
-#define CALCULATE_LCM(A, B, OUT)\
-{\
- CALCULATE_GCD(A, B, OUT);\
- OUT = (A / OUT)*B;\
-}
-
-static int calculate_lcm_and_needs_backwards_lcmed
- (size_t backwards_multiple, size_t received_size, size_t size_to_achieve,
- size_t *plcm, size_t *pneeds_backwards_lcmed)
-{
- /* Now calculate lcm */
- size_t max = backwards_multiple;
- size_t min = MALLOC_ALIGNMENT;
- size_t needs_backwards;
- size_t needs_backwards_lcmed;
- size_t lcm;
- size_t current_forward;
- /*Swap if necessary*/
- if(max < min){
- size_t tmp = min;
- min = max;
- max = tmp;
- }
- /*Check if it's power of two*/
- if((backwards_multiple & (backwards_multiple-1)) == 0){
- if(0 != (size_to_achieve & ((backwards_multiple-1)))){
- USAGE_ERROR_ACTION(m, oldp);
- return 0;
- }
-
- lcm = max;
- /*If we want to use minbytes data to get a buffer between maxbytes
- and minbytes if maxbytes can't be achieved, calculate the
- biggest of all possibilities*/
- current_forward = GET_TRUNCATED_PO2_SIZE(received_size, backwards_multiple);
- needs_backwards = size_to_achieve - current_forward;
- assert((needs_backwards % backwards_multiple) == 0);
- needs_backwards_lcmed = GET_ROUNDED_PO2_SIZE(needs_backwards, lcm);
- *plcm = lcm;
- *pneeds_backwards_lcmed = needs_backwards_lcmed;
- return 1;
- }
- /*Check if it's multiple of alignment*/
- else if((backwards_multiple & (MALLOC_ALIGNMENT - 1u)) == 0){
- lcm = backwards_multiple;
- current_forward = GET_TRUNCATED_SIZE(received_size, backwards_multiple);
- //No need to round needs_backwards because backwards_multiple == lcm
- needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
- assert((needs_backwards_lcmed & (MALLOC_ALIGNMENT - 1u)) == 0);
- *plcm = lcm;
- *pneeds_backwards_lcmed = needs_backwards_lcmed;
- return 1;
- }
- /*Check if it's multiple of the half of the alignmment*/
- else if((backwards_multiple & ((MALLOC_ALIGNMENT/2u) - 1u)) == 0){
- lcm = backwards_multiple*2u;
- current_forward = GET_TRUNCATED_SIZE(received_size, backwards_multiple);
- needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
- if(0 != (needs_backwards_lcmed & (MALLOC_ALIGNMENT-1)))
- //while(0 != (needs_backwards_lcmed & (MALLOC_ALIGNMENT-1)))
- needs_backwards_lcmed += backwards_multiple;
- assert((needs_backwards_lcmed % lcm) == 0);
- *plcm = lcm;
- *pneeds_backwards_lcmed = needs_backwards_lcmed;
- return 1;
- }
- /*Check if it's multiple of the quarter of the alignmment*/
- else if((backwards_multiple & ((MALLOC_ALIGNMENT/4u) - 1u)) == 0){
- size_t remainder;
- lcm = backwards_multiple*4u;
- current_forward = GET_TRUNCATED_SIZE(received_size, backwards_multiple);
- needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
- //while(0 != (needs_backwards_lcmed & (MALLOC_ALIGNMENT-1)))
- //needs_backwards_lcmed += backwards_multiple;
- if(0 != (remainder = ((needs_backwards_lcmed & (MALLOC_ALIGNMENT-1))>>(MALLOC_ALIGNMENT/8u)))){
- if(backwards_multiple & MALLOC_ALIGNMENT/2u){
- needs_backwards_lcmed += (remainder)*backwards_multiple;
- }
- else{
- needs_backwards_lcmed += (4-remainder)*backwards_multiple;
- }
- }
- assert((needs_backwards_lcmed % lcm) == 0);
- *plcm = lcm;
- *pneeds_backwards_lcmed = needs_backwards_lcmed;
- return 1;
- }
- else{
- CALCULATE_LCM(max, min, lcm);
- /*If we want to use minbytes data to get a buffer between maxbytes
- and minbytes if maxbytes can't be achieved, calculate the
- biggest of all possibilities*/
- current_forward = GET_TRUNCATED_SIZE(received_size, backwards_multiple);
- needs_backwards = size_to_achieve - current_forward;
- assert((needs_backwards % backwards_multiple) == 0);
- needs_backwards_lcmed = GET_ROUNDED_SIZE(needs_backwards, lcm);
- *plcm = lcm;
- *pneeds_backwards_lcmed = needs_backwards_lcmed;
- return 1;
- }
-}
-
-static void *internal_grow_both_sides
- (mstate m
- ,allocation_type command
- ,void *oldmem
- ,size_t minbytes
- ,size_t maxbytes
- ,size_t *received_size
- ,size_t backwards_multiple
- ,int only_preferred_backwards)
-{
- mchunkptr oldp = mem2chunk(oldmem);
- size_t oldsize = chunksize(oldp);
- *received_size = oldsize - overhead_for(oldp);
- if(minbytes <= *received_size)
- return oldmem;
-
- if (RTCHECK(ok_address(m, oldp) && ok_inuse(oldp))) {
- if(command & BOOST_CONTAINER_EXPAND_FWD){
- if(try_realloc_chunk_with_min(m, oldp, request2size(minbytes), request2size(maxbytes), 0)){
- check_inuse_chunk(m, oldp);
- *received_size = DL_SIZE_IMPL(oldmem);
- s_allocated_memory += chunksize(oldp) - oldsize;
- return oldmem;
- }
- }
- else{
- *received_size = DL_SIZE_IMPL(oldmem);
- if(*received_size >= maxbytes)
- return oldmem;
- }
-/*
- Should we check this?
- if(backwards_multiple &&
- (0 != (minbytes % backwards_multiple) &&
- 0 != (maxbytes % backwards_multiple)) ){
- USAGE_ERROR_ACTION(m, oldp);
- return 0;
- }
-*/
- /* We reach here only if forward expansion fails */
- if(!(command & BOOST_CONTAINER_EXPAND_BWD) || pinuse(oldp)){
- return 0;
- }
- {
- size_t prevsize = oldp->prev_foot;
- if ((prevsize & USE_MMAP_BIT) != 0){
- /*Return failure the previous chunk was mmapped.
- mremap does not allow expanding to a fixed address (MREMAP_MAYMOVE) without
- copying (MREMAP_MAYMOVE must be also set).*/
- return 0;
- }
- else {
- mchunkptr prev = chunk_minus_offset(oldp, prevsize);
- size_t dsize = oldsize + prevsize;
- size_t needs_backwards_lcmed;
- size_t lcm;
-
- /* Let's calculate the number of extra bytes of data before the current
- block's begin. The value is a multiple of backwards_multiple
- and the alignment*/
- if(!calculate_lcm_and_needs_backwards_lcmed
- ( backwards_multiple, *received_size
- , only_preferred_backwards ? maxbytes : minbytes
- , &lcm, &needs_backwards_lcmed)
- || !RTCHECK(ok_address(m, prev))){
- USAGE_ERROR_ACTION(m, oldp);
- return 0;
- }
- /* Check if previous block has enough size */
- else if(prevsize < needs_backwards_lcmed){
- /* preferred size? */
- return 0;
- }
- /* Now take all next space. This must succeed, as we've previously calculated the correct size */
- if(command & BOOST_CONTAINER_EXPAND_FWD){
- if(!try_realloc_chunk_with_min(m, oldp, request2size(*received_size), request2size(*received_size), 0)){
- assert(0);
- }
- check_inuse_chunk(m, oldp);
- *received_size = DL_SIZE_IMPL(oldmem);
- s_allocated_memory += chunksize(oldp) - oldsize;
- oldsize = chunksize(oldp);
- dsize = oldsize + prevsize;
- }
- /* We need a minimum size to split the previous one */
- if(prevsize >= (needs_backwards_lcmed + MIN_CHUNK_SIZE)){
- mchunkptr r = chunk_minus_offset(oldp, needs_backwards_lcmed);
- size_t rsize = oldsize + needs_backwards_lcmed;
- size_t newprevsize = dsize - rsize;
- int prev_was_dv = prev == m->dv;
-
- assert(newprevsize >= MIN_CHUNK_SIZE);
-
- if (prev_was_dv) {
- m->dvsize = newprevsize;
- }
- else{/* if ((next->head & INUSE_BITS) == INUSE_BITS) { */
- unlink_chunk(m, prev, prevsize);
- insert_chunk(m, prev, newprevsize);
- }
-
- set_size_and_pinuse_of_free_chunk(prev, newprevsize);
- clear_pinuse(r);
- set_inuse(m, r, rsize);
- check_malloced_chunk(m, chunk2mem(r), rsize);
- *received_size = chunksize(r) - overhead_for(r);
- s_allocated_memory += chunksize(r) - oldsize;
- return chunk2mem(r);
- }
- /* Check if there is no place to create a new block and
- the whole new block is multiple of the backwards expansion multiple */
- else if(prevsize >= needs_backwards_lcmed && !(prevsize % lcm)) {
- /* Just merge the whole previous block */
- /* prevsize is multiple of lcm (and backwards_multiple)*/
- *received_size += prevsize;
-
- if (prev != m->dv) {
- unlink_chunk(m, prev, prevsize);
- }
- else{
- m->dvsize = 0;
- m->dv = 0;
- }
- set_inuse(m, prev, dsize);
- check_malloced_chunk(m, chunk2mem(prev), dsize);
- s_allocated_memory += chunksize(prev) - oldsize;
- return chunk2mem(prev);
- }
- else{
- /* Previous block was big enough but there is no room
- to create an empty block and taking the whole block does
- not fulfill alignment requirements */
- return 0;
- }
- }
- }
- }
- else{
- USAGE_ERROR_ACTION(m, oldmem);
- return 0;
- }
- return 0;
-}
-
-/* This is similar to mmap_resize but:
- * Only to shrink
- * It takes min and max sizes
- * Takes additional 'do_commit' argument to obtain the final
- size before doing the real shrink operation.
-*/
-static int internal_mmap_shrink_in_place(mstate m, mchunkptr oldp, size_t nbmin, size_t nbmax, size_t *received_size, int do_commit)
-{
- size_t oldsize = chunksize(oldp);
- *received_size = oldsize;
- #if HAVE_MREMAP
- if (is_small(nbmax)) /* Can't shrink mmap regions below small size */
- return 0;
- {
- size_t effective_min = nbmin > MIN_LARGE_SIZE ? nbmin : MIN_LARGE_SIZE;
- /* Keep old chunk if big enough but not too big */
- if (oldsize >= effective_min + SIZE_T_SIZE &&
- (oldsize - effective_min) <= (mparams.granularity << 1))
- return 0;
- /* Now calculate new sizes */
- {
- size_t offset = oldp->prev_foot;
- size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD;
- size_t newmmsize = mmap_align(effective_min + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
- *received_size = newmmsize;
- if(!do_commit){
- const int flags = 0; /* placate people compiling -Wunused */
- char* cp = (char*)CALL_MREMAP((char*)oldp - offset,
- oldmmsize, newmmsize, flags);
- /*This must always succeed */
- if(!cp){
- USAGE_ERROR_ACTION(m, m);
- return 0;
- }
- {
- mchunkptr newp = (mchunkptr)(cp + offset);
- size_t psize = newmmsize - offset - MMAP_FOOT_PAD;
- newp->head = psize;
- mark_inuse_foot(m, newp, psize);
- chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD;
- chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0;
-
- if (cp < m->least_addr)
- m->least_addr = cp;
- if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint)
- m->max_footprint = m->footprint;
- check_mmapped_chunk(m, newp);
- }
- }
- }
- return 1;
- }
- #else //#if HAVE_MREMAP
- (void)m;
- (void)oldp;
- (void)nbmin;
- (void)nbmax;
- (void)received_size;
- (void)do_commit;
- return 0;
- #endif //#if HAVE_MREMAP
-}
-
-static int internal_shrink(mstate m, void* oldmem, size_t minbytes, size_t maxbytes, size_t *received_size, int do_commit)
-{
- *received_size = chunksize(mem2chunk(oldmem)) - overhead_for(mem2chunk(oldmem));
- if (minbytes >= MAX_REQUEST || maxbytes >= MAX_REQUEST) {
- MALLOC_FAILURE_ACTION;
- return 0;
- }
- else if(minbytes < MIN_REQUEST){
- minbytes = MIN_REQUEST;
- }
- if (minbytes > maxbytes) {
- return 0;
- }
-
- {
- mchunkptr oldp = mem2chunk(oldmem);
- size_t oldsize = chunksize(oldp);
- mchunkptr next = chunk_plus_offset(oldp, oldsize);
- void* extra = 0;
-
- /* Try to either shrink or extend into top. Else malloc-copy-free*/
- if (RTCHECK(ok_address(m, oldp) && ok_inuse(oldp) &&
- ok_next(oldp, next) && ok_pinuse(next))) {
- size_t nbmin = request2size(minbytes);
- size_t nbmax = request2size(maxbytes);
-
- if (nbmin > oldsize){
- /* Return error if old size is too small */
- }
- else if (is_mmapped(oldp)){
- return internal_mmap_shrink_in_place(m, oldp, nbmin, nbmax, received_size, do_commit);
- }
- else{ // nbmin <= oldsize /* already big enough*/
- size_t nb = nbmin;
- size_t rsize = oldsize - nb;
- if (rsize >= MIN_CHUNK_SIZE) {
- if(do_commit){
- mchunkptr remainder = chunk_plus_offset(oldp, nb);
- set_inuse(m, oldp, nb);
- set_inuse(m, remainder, rsize);
- extra = chunk2mem(remainder);
- }
- *received_size = nb - overhead_for(oldp);
- if(!do_commit)
- return 1;
- }
- }
- }
- else {
- USAGE_ERROR_ACTION(m, oldmem);
- return 0;
- }
-
- if (extra != 0 && do_commit) {
- mspace_free_lockless(m, extra);
- check_inuse_chunk(m, oldp);
- return 1;
- }
- else {
- return 0;
- }
- }
-}
-
-
-#define INTERNAL_MULTIALLOC_DEFAULT_CONTIGUOUS_MEM 4096
-
-#define SQRT_MAX_SIZE_T (((size_t)-1)>>(sizeof(size_t)*CHAR_BIT/2))
-
-static int internal_node_multialloc
- (mstate m, size_t n_elements, size_t element_size, size_t contiguous_elements, boost_cont_memchain *pchain) {
- void* mem; /* malloced aggregate space */
- mchunkptr p; /* corresponding chunk */
- size_t remainder_size; /* remaining bytes while splitting */
- flag_t was_enabled; /* to disable mmap */
- size_t elements_per_segment = 0;
- size_t element_req_size = request2size(element_size);
- boost_cont_memchain_it prev_last_it = BOOST_CONTAINER_MEMCHAIN_LAST_IT(pchain);
-
- /*Error if wrong element_size parameter */
- if( !element_size ||
- /*OR Error if n_elements less thatn contiguous_elements */
- ((contiguous_elements + 1) > (DL_MULTIALLOC_DEFAULT_CONTIGUOUS + 1) && n_elements < contiguous_elements) ||
- /* OR Error if integer overflow */
- (SQRT_MAX_SIZE_T < (element_req_size | contiguous_elements) &&
- (MAX_SIZE_T/element_req_size) < contiguous_elements)){
- return 0;
- }
- switch(contiguous_elements){
- case DL_MULTIALLOC_DEFAULT_CONTIGUOUS:
- {
- /* Default contiguous, just check that we can store at least one element */
- elements_per_segment = INTERNAL_MULTIALLOC_DEFAULT_CONTIGUOUS_MEM/element_req_size;
- elements_per_segment += (size_t)(!elements_per_segment);
- }
- break;
- case DL_MULTIALLOC_ALL_CONTIGUOUS:
- /* All elements should be allocated in a single call */
- elements_per_segment = n_elements;
- break;
- default:
- /* Allocate in chunks of "contiguous_elements" */
- elements_per_segment = contiguous_elements;
- }
-
- {
- size_t i;
- size_t next_i;
- /*
- Allocate the aggregate chunk. First disable direct-mmapping so
- malloc won't use it, since we would not be able to later
- free/realloc space internal to a segregated mmap region.
- */
- was_enabled = use_mmap(m);
- disable_mmap(m);
- for(i = 0; i != n_elements; i = next_i)
- {
- size_t accum_size;
- size_t n_elements_left = n_elements - i;
- next_i = i + ((n_elements_left < elements_per_segment) ? n_elements_left : elements_per_segment);
- accum_size = element_req_size*(next_i - i);
-
- mem = mspace_malloc_lockless(m, accum_size - CHUNK_OVERHEAD);
- if (mem == 0){
- BOOST_CONTAINER_MEMIT_NEXT(prev_last_it);
- while(i--){
- void *addr = BOOST_CONTAINER_MEMIT_ADDR(prev_last_it);
- BOOST_CONTAINER_MEMIT_NEXT(prev_last_it);
- mspace_free_lockless(m, addr);
- }
- if (was_enabled)
- enable_mmap(m);
- return 0;
- }
- p = mem2chunk(mem);
- remainder_size = chunksize(p);
- s_allocated_memory += remainder_size;
-
- assert(!is_mmapped(p));
- { /* split out elements */
- void *mem_orig = mem;
- boost_cont_memchain_it last_it = BOOST_CONTAINER_MEMCHAIN_LAST_IT(pchain);
- size_t num_elements = next_i-i;
-
- size_t num_loops = num_elements - 1;
- remainder_size -= element_req_size*num_loops;
- while(num_loops--){
- void **mem_prev = ((void**)mem);
- set_size_and_pinuse_of_inuse_chunk(m, p, element_req_size);
- p = chunk_plus_offset(p, element_req_size);
- mem = chunk2mem(p);
- *mem_prev = mem;
- }
- set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size);
- BOOST_CONTAINER_MEMCHAIN_INCORPORATE_AFTER(pchain, last_it, mem_orig, mem, num_elements);
- }
- }
- if (was_enabled)
- enable_mmap(m);
- }
- return 1;
-}
-
-static int internal_multialloc_arrays
- (mstate m, size_t n_elements, const size_t* sizes, size_t element_size, size_t contiguous_elements, boost_cont_memchain *pchain) {
- void* mem; /* malloced aggregate space */
- mchunkptr p; /* corresponding chunk */
- size_t remainder_size; /* remaining bytes while splitting */
- flag_t was_enabled; /* to disable mmap */
- size_t size;
- size_t boost_cont_multialloc_segmented_malloc_size;
- size_t max_size;
-
- /* Check overflow */
- if(!element_size){
- return 0;
- }
- max_size = MAX_REQUEST/element_size;
- /* Different sizes*/
- switch(contiguous_elements){
- case DL_MULTIALLOC_DEFAULT_CONTIGUOUS:
- /* Use default contiguous mem */
- boost_cont_multialloc_segmented_malloc_size = INTERNAL_MULTIALLOC_DEFAULT_CONTIGUOUS_MEM;
- break;
- case DL_MULTIALLOC_ALL_CONTIGUOUS:
- boost_cont_multialloc_segmented_malloc_size = MAX_REQUEST + CHUNK_OVERHEAD;
- break;
- default:
- if(max_size < contiguous_elements){
- return 0;
- }
- else{
- /* The suggested buffer is just the the element count by the size */
- boost_cont_multialloc_segmented_malloc_size = element_size*contiguous_elements;
- }
- }
-
- {
- size_t i;
- size_t next_i;
- /*
- Allocate the aggregate chunk. First disable direct-mmapping so
- malloc won't use it, since we would not be able to later
- free/realloc space internal to a segregated mmap region.
- */
- was_enabled = use_mmap(m);
- disable_mmap(m);
- for(i = 0, next_i = 0; i != n_elements; i = next_i)
- {
- int error = 0;
- size_t accum_size;
- for(accum_size = 0; next_i != n_elements; ++next_i){
- size_t cur_array_size = sizes[next_i];
- if(max_size < cur_array_size){
- error = 1;
- break;
- }
- else{
- size_t reqsize = request2size(cur_array_size*element_size);
- if(((boost_cont_multialloc_segmented_malloc_size - CHUNK_OVERHEAD) - accum_size) < reqsize){
- if(!accum_size){
- accum_size += reqsize;
- ++next_i;
- }
- break;
- }
- accum_size += reqsize;
- }
- }
-
- mem = error ? 0 : mspace_malloc_lockless(m, accum_size - CHUNK_OVERHEAD);
- if (mem == 0){
- boost_cont_memchain_it it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(pchain);
- while(i--){
- void *addr = BOOST_CONTAINER_MEMIT_ADDR(it);
- BOOST_CONTAINER_MEMIT_NEXT(it);
- mspace_free_lockless(m, addr);
- }
- if (was_enabled)
- enable_mmap(m);
- return 0;
- }
- p = mem2chunk(mem);
- remainder_size = chunksize(p);
- s_allocated_memory += remainder_size;
-
- assert(!is_mmapped(p));
-
- { /* split out elements */
- void *mem_orig = mem;
- boost_cont_memchain_it last_it = BOOST_CONTAINER_MEMCHAIN_LAST_IT(pchain);
- size_t num_elements = next_i-i;
-
- for(++i; i != next_i; ++i) {
- void **mem_prev = ((void**)mem);
- size = request2size(sizes[i]*element_size);
- remainder_size -= size;
- set_size_and_pinuse_of_inuse_chunk(m, p, size);
- p = chunk_plus_offset(p, size);
- mem = chunk2mem(p);
- *mem_prev = mem;
- }
- set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size);
- BOOST_CONTAINER_MEMCHAIN_INCORPORATE_AFTER(pchain, last_it, mem_orig, mem, num_elements);
- }
- }
- if (was_enabled)
- enable_mmap(m);
- }
- return 1;
-}
-
-int boost_cont_multialloc_arrays
- (size_t n_elements, const size_t *sizes, size_t element_size, size_t contiguous_elements, boost_cont_memchain *pchain)
-{
- int ret = 0;
- mstate ms = (mstate)gm;
- ensure_initialization();
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- }
- else if (!PREACTION(ms)) {
- ret = internal_multialloc_arrays(ms, n_elements, sizes, element_size, contiguous_elements, pchain);
- POSTACTION(ms);
- }
- return ret;
-}
-
-
-/*Doug Lea malloc extensions*/
-static boost_cont_malloc_stats_t get_malloc_stats(mstate m)
-{
- boost_cont_malloc_stats_t ret = { 0, 0, 0 };
- ensure_initialization();
- if (!PREACTION(m)) {
- size_t maxfp = 0;
- size_t fp = 0;
- size_t used = 0;
- check_malloc_state(m);
- if (is_initialized(m)) {
- msegmentptr s = &m->seg;
- maxfp = m->max_footprint;
- fp = m->footprint;
- used = fp - (m->topsize + TOP_FOOT_SIZE);
-
- while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- if (!cinuse(q))
- used -= chunksize(q);
- q = next_chunk(q);
- }
- s = s->next;
- }
- }
-
- ret.max_system_bytes = maxfp;
- ret.system_bytes = fp;
- ret.in_use_bytes = used;
- POSTACTION(m);
- }
- return ret;
-}
-
-size_t boost_cont_size(const void *p)
-{ return DL_SIZE_IMPL(p); }
-
-void* boost_cont_malloc(size_t bytes)
-{
- size_t received_bytes;
- ensure_initialization();
- return boost_cont_allocation_command
- (BOOST_CONTAINER_ALLOCATE_NEW, 1, bytes, bytes, &received_bytes, 0).first;
-}
-
-void boost_cont_free(void* mem)
-{
- mstate ms = (mstate)gm;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- }
- else if (!PREACTION(ms)) {
- mspace_free_lockless(ms, mem);
- POSTACTION(ms);
- }
-}
-
-void* boost_cont_memalign(size_t bytes, size_t alignment)
-{
- void *addr;
- ensure_initialization();
- addr = mspace_memalign(gm, alignment, bytes);
- if(addr){
- s_allocated_memory += chunksize(mem2chunk(addr));
- }
- return addr;
-}
-
-int boost_cont_multialloc_nodes
- (size_t n_elements, size_t elem_size, size_t contiguous_elements, boost_cont_memchain *pchain)
-{
- int ret = 0;
- mstate ms = (mstate)gm;
- ensure_initialization();
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- }
- else if (!PREACTION(ms)) {
- ret = internal_node_multialloc(ms, n_elements, elem_size, contiguous_elements, pchain);
- POSTACTION(ms);
- }
- return ret;
-}
-
-size_t boost_cont_footprint()
-{
- return ((mstate)gm)->footprint;
-}
-
-size_t boost_cont_allocated_memory()
-{
- size_t alloc_mem = 0;
- mstate m = (mstate)gm;
- ensure_initialization();
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- }
-
-
- if (!PREACTION(m)) {
- check_malloc_state(m);
- if (is_initialized(m)) {
- size_t nfree = SIZE_T_ONE; /* top always free */
- size_t mfree = m->topsize + TOP_FOOT_SIZE;
- size_t sum = mfree;
- msegmentptr s = &m->seg;
- while (s != 0) {
- mchunkptr q = align_as_chunk(s->base);
- while (segment_holds(s, q) &&
- q != m->top && q->head != FENCEPOST_HEAD) {
- size_t sz = chunksize(q);
- sum += sz;
- if (!is_inuse(q)) {
- mfree += sz;
- ++nfree;
- }
- q = next_chunk(q);
- }
- s = s->next;
- }
- {
- size_t uordblks = m->footprint - mfree;
- if(nfree)
- alloc_mem = (size_t)(uordblks - (nfree-1)*TOP_FOOT_SIZE);
- else
- alloc_mem = uordblks;
- }
- }
-
- POSTACTION(m);
- }
- return alloc_mem;
-}
-
-size_t boost_cont_chunksize(const void *p)
-{ return chunksize(mem2chunk(p)); }
-
-int boost_cont_all_deallocated()
-{ return !s_allocated_memory; }
-
-boost_cont_malloc_stats_t boost_cont_malloc_stats()
-{
- mstate ms = (mstate)gm;
- if (ok_magic(ms)) {
- return get_malloc_stats(ms);
- }
- else {
- boost_cont_malloc_stats_t r = { 0, 0, 0 };
- USAGE_ERROR_ACTION(ms,ms);
- return r;
- }
-}
-
-size_t boost_cont_in_use_memory()
-{ return s_allocated_memory; }
-
-int boost_cont_trim(size_t pad)
-{
- ensure_initialization();
- return dlmalloc_trim(pad);
-}
-
-int boost_cont_grow
- (void* oldmem, size_t minbytes, size_t maxbytes, size_t *received)
-{
- mstate ms = (mstate)gm;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
-
- if (!PREACTION(ms)) {
- mchunkptr p = mem2chunk(oldmem);
- size_t oldsize = chunksize(p);
- p = try_realloc_chunk_with_min(ms, p, request2size(minbytes), request2size(maxbytes), 0);
- POSTACTION(ms);
- if(p){
- check_inuse_chunk(ms, p);
- *received = DL_SIZE_IMPL(oldmem);
- s_allocated_memory += chunksize(p) - oldsize;
- }
- return 0 != p;
- }
- return 0;
-}
-
-int boost_cont_shrink
- (void* oldmem, size_t minbytes, size_t maxbytes, size_t *received, int do_commit)
-{
- mstate ms = (mstate)gm;
- if (!ok_magic(ms)) {
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
-
- if (!PREACTION(ms)) {
- int ret = internal_shrink(ms, oldmem, minbytes, maxbytes, received, do_commit);
- POSTACTION(ms);
- return 0 != ret;
- }
- return 0;
-}
-
-
-void* boost_cont_alloc
- (size_t minbytes, size_t preferred_bytes, size_t *received_bytes)
-{
- //ensure_initialization provided by boost_cont_allocation_command
- return boost_cont_allocation_command
- (BOOST_CONTAINER_ALLOCATE_NEW, 1, minbytes, preferred_bytes, received_bytes, 0).first;
-}
-
-void boost_cont_multidealloc(boost_cont_memchain *pchain)
-{
- mstate ms = (mstate)gm;
- if (!ok_magic(ms)) {
- (void)ms;
- USAGE_ERROR_ACTION(ms,ms);
- }
- internal_multialloc_free(ms, pchain);
-}
-
-int boost_cont_malloc_check()
-{
-#ifdef DEBUG
- mstate ms = (mstate)gm;
- ensure_initialization();
- if (!ok_magic(ms)) {
- (void)ms;
- USAGE_ERROR_ACTION(ms,ms);
- return 0;
- }
- check_malloc_state(ms);
- return 1;
-#else
- return 1;
-#endif
-}
-
-
-boost_cont_command_ret_t boost_cont_allocation_command
- (allocation_type command, size_t sizeof_object, size_t limit_size
- , size_t preferred_size, size_t *received_size, void *reuse_ptr)
-{
- boost_cont_command_ret_t ret = { 0, 0 };
- ensure_initialization();
- if(command & (BOOST_CONTAINER_SHRINK_IN_PLACE | BOOST_CONTAINER_TRY_SHRINK_IN_PLACE)){
- int success = boost_cont_shrink( reuse_ptr, preferred_size, limit_size
- , received_size, (command & BOOST_CONTAINER_SHRINK_IN_PLACE));
- ret.first = success ? reuse_ptr : 0;
- return ret;
- }
-
- *received_size = 0;
-
- if(limit_size > preferred_size)
- return ret;
-
- {
- mstate ms = (mstate)gm;
-
- /*Expand in place*/
- if (!PREACTION(ms)) {
- #if FOOTERS
- if(reuse_ptr){
- mstate m = get_mstate_for(mem2chunk(reuse_ptr));
- if (!ok_magic(m)) {
- USAGE_ERROR_ACTION(m, reuse_ptr);
- return ret;
- }
- }
- #endif
- if(reuse_ptr && (command & (BOOST_CONTAINER_EXPAND_FWD | BOOST_CONTAINER_EXPAND_BWD))){
- void *r = internal_grow_both_sides
- ( ms, command, reuse_ptr, limit_size
- , preferred_size, received_size, sizeof_object, 1);
- if(r){
- ret.first = r;
- ret.second = 1;
- goto postaction;
- }
- }
-
- if(command & BOOST_CONTAINER_ALLOCATE_NEW){
- void *addr = mspace_malloc_lockless(ms, preferred_size);
- if(!addr) addr = mspace_malloc_lockless(ms, limit_size);
- if(addr){
- s_allocated_memory += chunksize(mem2chunk(addr));
- *received_size = DL_SIZE_IMPL(addr);
- }
- ret.first = addr;
- ret.second = 0;
- if(addr){
- goto postaction;
- }
- }
-
- //Now try to expand both sides with min size
- if(reuse_ptr && (command & (BOOST_CONTAINER_EXPAND_FWD | BOOST_CONTAINER_EXPAND_BWD))){
- void *r = internal_grow_both_sides
- ( ms, command, reuse_ptr, limit_size
- , preferred_size, received_size, sizeof_object, 0);
- if(r){
- ret.first = r;
- ret.second = 1;
- goto postaction;
- }
- }
- postaction:
- POSTACTION(ms);
- }
- }
- return ret;
-}
-
-int boost_cont_mallopt(int param_number, int value)
-{
- return change_mparam(param_number, value);
-}
-
-void *boost_cont_sync_create()
-{
- void *p = boost_cont_malloc(sizeof(MLOCK_T));
- if(p){
- if(0 != INITIAL_LOCK((MLOCK_T*)p)){
- boost_cont_free(p);
- p = 0;
- }
- }
- return p;
-}
-
-void boost_cont_sync_destroy(void *sync)
-{
- if(sync){
- (void)DESTROY_LOCK((MLOCK_T*)sync);
- boost_cont_free(sync);
- }
-}
-
-int boost_cont_sync_lock(void *sync)
-{ return 0 == (ACQUIRE_LOCK((MLOCK_T*)sync)); }
-
-void boost_cont_sync_unlock(void *sync)
-{ RELEASE_LOCK((MLOCK_T*)sync); }
-
-int boost_cont_global_sync_lock()
-{
- int ret;
- ensure_initialization();
- ret = ACQUIRE_MALLOC_GLOBAL_LOCK();
- return 0 == ret;
-}
-
-void boost_cont_global_sync_unlock()
-{
- RELEASE_MALLOC_GLOBAL_LOCK()
-}
-
-//#ifdef DL_DEBUG_DEFINED
-// #undef DEBUG
-//#endif
-
-#ifdef _MSC_VER
-#pragma warning (pop)
-#endif
diff --git a/src/third_party/boost-1.68.0/libs/date_time/README.md b/src/third_party/boost-1.68.0/libs/date_time/README.md
deleted file mode 100644
index 6cdecf5bfe7..00000000000
--- a/src/third_party/boost-1.68.0/libs/date_time/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-DateTime, part of the collection of [Boost C++ Libraries](http://github.com/boostorg), makes programming with dates and times as simple and natural as programming with strings and integers.
-
-### License
-
-Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
-
-### Properties
-
-* C++03
-* Requires Linking
-
-### Build Status
-
-Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
-:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
-[`master`](https://github.com/boostorg/date_time/tree/master) | [![Build Status](https://travis-ci.org/boostorg/date_time.svg?branch=master)](https://travis-ci.org/boostorg/date_time) | [![Build status](https://ci.appveyor.com/api/projects/status/upf5c528fy09fudk?svg=true)](https://ci.appveyor.com/project/jeking3/date-time-1evbf) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/14908/badge.svg)](https://scan.coverity.com/projects/boostorg-date_time) | [![codecov](https://codecov.io/gh/boostorg/date_time/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/date_time/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/date_time.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/date_time.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/date_time.html)
-[`develop`](https://github.com/boostorg/date_time/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/date_time.svg?branch=develop)](https://travis-ci.org/boostorg/date_time) | [![Build status](https://ci.appveyor.com/api/projects/status/upf5c528fy09fudk/branch/develop?svg=true)](https://ci.appveyor.com/project/boostorg/date_time/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/14908/badge.svg)](https://scan.coverity.com/projects/boostorg-date_time) | [![codecov](https://codecov.io/gh/boostorg/date_time/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/date_time/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/date_time.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/date_time.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/date_time.html)
-
-### Directories
-
-| Name | Purpose |
-| --------- | ------------------------------ |
-| `build` | build script for link library |
-| `ci` | continuous integration scripts |
-| `data` | timezone database |
-| `doc` | documentation |
-| `example` | use case examples |
-| `include` | headers |
-| `src` | source code for link library |
-| `test` | unit tests |
-| `xmldoc` | additional documentation |
-
-### More information
-
-* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-date_time): Be sure to read the documentation first to see if it answers your question.
-* [Report bugs](https://github.com/boostorg/date_time/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
-* [Submit Pull Requests](https://github.com/boostorg/date_time/pulls) against the **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). Be sure to include tests proving your changes work properly.
-* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[date_time]` tag at the beginning of the subject line.
-
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/operations.cpp b/src/third_party/boost-1.68.0/libs/filesystem/src/operations.cpp
deleted file mode 100644
index e6c0d99a38c..00000000000
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/operations.cpp
+++ /dev/null
@@ -1,2399 +0,0 @@
-// operations.cpp --------------------------------------------------------------------//
-
-// Copyright 2002-2009, 2014 Beman Dawes
-// Copyright 2001 Dietmar Kuehl
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// See library home page at http://www.boost.org/libs/filesystem
-
-//--------------------------------------------------------------------------------------//
-
-// define 64-bit offset macros BEFORE including boost/config.hpp (see ticket #5355)
-#if defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ < 24
-// Android fully supports 64-bit file offsets only for API 24 and above.
-//
-// Trying to define _FILE_OFFSET_BITS=64 for APIs below 24
-// leads to compilation failure for one or another reason,
-// depending on target Android API level, Android NDK version,
-// used STL, order of include paths and more.
-// For more information, please see:
-// - https://github.com/boostorg/filesystem/issues/65
-// - https://github.com/boostorg/filesystem/pull/69
-//
-// Android NDK developers consider it the expected behavior.
-// See their official position here:
-// - https://github.com/android-ndk/ndk/issues/501#issuecomment-326447479
-// - https://android.googlesource.com/platform/bionic/+/a34817457feee026e8702a1d2dffe9e92b51d7d1/docs/32-bit-abi.md#32_bit-abi-bugs
-//
-// Thus we do not define _FILE_OFFSET_BITS in such case.
-#else
-// Defining _FILE_OFFSET_BITS=64 should kick in 64-bit off_t's
-// (and thus st_size) on 32-bit systems that provide the Large File
-// Support (LFS) interface, such as Linux, Solaris, and IRIX.
-//
-// At the time of this comment writing (March 2018), on most systems
-// _FILE_OFFSET_BITS=64 definition is harmless:
-// either the definition is supported and enables 64-bit off_t,
-// or the definition is not supported and is ignored, in which case
-// off_t does not change its default size for the target system
-// (which may be 32-bit or 64-bit already).
-// Thus it makes sense to have _FILE_OFFSET_BITS=64 defined by default,
-// instead of listing every system that supports the definition.
-// Those few systems, on which _FILE_OFFSET_BITS=64 is harmful,
-// for example this definition causes compilation failure on those systems,
-// should be exempt from defining _FILE_OFFSET_BITS by adding
-// an appropriate #elif block above with the appropriate comment.
-//
-// _FILE_OFFSET_BITS must be defined before any headers are included
-// to ensure that the definition is available to all included headers.
-// That is required at least on Solaris, and possibly on other
-// systems as well.
-#define _FILE_OFFSET_BITS 64
-#endif
-
-// define BOOST_FILESYSTEM_SOURCE so that <boost/filesystem/config.hpp> knows
-// the library is being built (possibly exporting rather than importing code)
-#define BOOST_FILESYSTEM_SOURCE
-
-#ifndef BOOST_SYSTEM_NO_DEPRECATED
-# define BOOST_SYSTEM_NO_DEPRECATED
-#endif
-
-#ifndef _POSIX_PTHREAD_SEMANTICS
-# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this
-#endif
-
-#include <boost/filesystem/operations.hpp>
-#include <boost/scoped_array.hpp>
-#include <boost/detail/workaround.hpp>
-#include <limits>
-#include <vector>
-#include <cstdlib> // for malloc, free
-#include <cstring>
-#include <cstdio> // for remove, rename
-#if defined(__QNXNTO__) // see ticket #5355
-# include <stdio.h>
-#endif
-#include <cerrno>
-
-#ifdef BOOST_FILEYSTEM_INCLUDE_IOSTREAM
-# include <iostream>
-#endif
-
-namespace fs = boost::filesystem;
-using boost::filesystem::path;
-using boost::filesystem::filesystem_error;
-using boost::filesystem::perms;
-using boost::system::error_code;
-using boost::system::error_category;
-using boost::system::system_category;
-using std::string;
-using std::wstring;
-
-# ifdef BOOST_POSIX_API
-
-# include <sys/types.h>
-# include <sys/stat.h>
-# if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__) \
- && !defined(__VXWORKS__)
-# include <sys/statvfs.h>
-# define BOOST_STATVFS statvfs
-# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
-# else
-# ifdef __OpenBSD__
-# include <sys/param.h>
-# elif defined(__ANDROID__)
-# include <sys/vfs.h>
-# endif
-# if !defined(__VXWORKS__)
-# include <sys/mount.h>
-# endif
-# define BOOST_STATVFS statfs
-# define BOOST_STATVFS_F_FRSIZE static_cast<boost::uintmax_t>(vfs.f_bsize)
-# endif
-# include <dirent.h>
-# include <unistd.h>
-# include <fcntl.h>
-# include <utime.h>
-# include "limits.h"
-
-# else // BOOST_WINDOW_API
-
-# if (defined(__MINGW32__) || defined(__CYGWIN__)) && !defined(WINVER)
- // Versions of MinGW or Cygwin that support Filesystem V3 support at least WINVER 0x501.
- // See MinGW's windef.h
-# define WINVER 0x501
-# endif
-# include <cwchar>
-# include <io.h>
-# include <windows.h>
-# include <winnt.h>
-# if !defined(_WIN32_WINNT)
-# define _WIN32_WINNT 0x0500
-# endif
-# if defined(__BORLANDC__) || defined(__MWERKS__)
-# if defined(__BORLANDC__)
- using std::time_t;
-# endif
-# include <utime.h>
-# else
-# include <sys/utime.h>
-# endif
-
-// REPARSE_DATA_BUFFER related definitions are found in ntifs.h, which is part of the
-// Windows Device Driver Kit. Since that's inconvenient, the definitions are provided
-// here. See http://msdn.microsoft.com/en-us/library/ms791514.aspx
-
-#if !defined(REPARSE_DATA_BUFFER_HEADER_SIZE) // mingw winnt.h does provide the defs
-
-#define SYMLINK_FLAG_RELATIVE 1
-
-typedef struct _REPARSE_DATA_BUFFER {
- ULONG ReparseTag;
- USHORT ReparseDataLength;
- USHORT Reserved;
- union {
- struct {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- ULONG Flags;
- WCHAR PathBuffer[1];
- /* Example of distinction between substitute and print names:
- mklink /d ldrive c:\
- SubstituteName: c:\\??\
- PrintName: c:\
- */
- } SymbolicLinkReparseBuffer;
- struct {
- USHORT SubstituteNameOffset;
- USHORT SubstituteNameLength;
- USHORT PrintNameOffset;
- USHORT PrintNameLength;
- WCHAR PathBuffer[1];
- } MountPointReparseBuffer;
- struct {
- UCHAR DataBuffer[1];
- } GenericReparseBuffer;
- };
-} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
-
-#define REPARSE_DATA_BUFFER_HEADER_SIZE \
- FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)
-
-#endif
-
-#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE
-#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 )
-#endif
-
-# ifndef FSCTL_GET_REPARSE_POINT
-# define FSCTL_GET_REPARSE_POINT 0x900a8
-# endif
-
-# ifndef IO_REPARSE_TAG_SYMLINK
-# define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
-# endif
-
-inline std::wstring wgetenv(const wchar_t* name)
-{
- // use vector since for C++03 basic_string is not required to be contiguous
- std::vector<wchar_t> buf(::GetEnvironmentVariableW(name, NULL, 0));
-
- // C++03 vector does not have data() so use &buf[0]
- return (buf.empty()
- || ::GetEnvironmentVariableW(name, &buf[0], static_cast<DWORD>(buf.size())) == 0)
- ? std::wstring() : std::wstring(&buf[0]);
-}
-
-# endif // BOOST_WINDOWS_API
-
-// BOOST_FILESYSTEM_STATUS_CACHE enables file_status cache in
-// dir_itr_increment. The config tests are placed here because some of the
-// macros being tested come from dirent.h.
-//
-// TODO: find out what macros indicate dirent::d_type present in more libraries
-# if defined(BOOST_WINDOWS_API)\
- || defined(_DIRENT_HAVE_D_TYPE)// defined by GNU C library if d_type present
-# define BOOST_FILESYSTEM_STATUS_CACHE
-# endif
-
-// POSIX/Windows macros ----------------------------------------------------//
-
-// Portions of the POSIX and Windows API's are very similar, except for name,
-// order of arguments, and meaning of zero/non-zero returns. The macros below
-// abstract away those differences. They follow Windows naming and order of
-// arguments, and return true to indicate no error occurred. [POSIX naming,
-// order of arguments, and meaning of return were followed initially, but
-// found to be less clear and cause more coding errors.]
-
-# if defined(BOOST_POSIX_API)
-
-typedef int err_t;
-
-// POSIX uses a 0 return to indicate success
-# define BOOST_ERRNO errno
-# define BOOST_SET_CURRENT_DIRECTORY(P)(::chdir(P)== 0)
-# define BOOST_CREATE_DIRECTORY(P)(::mkdir(P, S_IRWXU|S_IRWXG|S_IRWXO)== 0)
-# define BOOST_CREATE_HARD_LINK(F,T)(::link(T, F)== 0)
-# define BOOST_CREATE_SYMBOLIC_LINK(F,T,Flag)(::symlink(T, F)== 0)
-# define BOOST_REMOVE_DIRECTORY(P)(::rmdir(P)== 0)
-# define BOOST_DELETE_FILE(P)(::unlink(P)== 0)
-# define BOOST_COPY_DIRECTORY(F,T)(!(::stat(from.c_str(), &from_stat)!= 0\
- || ::mkdir(to.c_str(),from_stat.st_mode)!= 0))
-# define BOOST_COPY_FILE(F,T,FailIfExistsBool)copy_file_api(F, T, FailIfExistsBool)
-# define BOOST_MOVE_FILE(OLD,NEW)(::rename(OLD, NEW)== 0)
-# define BOOST_RESIZE_FILE(P,SZ)(::truncate(P, SZ)== 0)
-
-# define BOOST_ERROR_NOT_SUPPORTED ENOSYS
-# define BOOST_ERROR_ALREADY_EXISTS EEXIST
-
-# else // BOOST_WINDOWS_API
-
-typedef DWORD err_t;
-
-// Windows uses a non-0 return to indicate success
-# define BOOST_ERRNO ::GetLastError()
-# define BOOST_SET_CURRENT_DIRECTORY(P)(::SetCurrentDirectoryW(P)!= 0)
-# define BOOST_CREATE_DIRECTORY(P)(::CreateDirectoryW(P, 0)!= 0)
-# define BOOST_CREATE_HARD_LINK(F,T)(create_hard_link_api(F, T, 0)!= 0)
-# define BOOST_CREATE_SYMBOLIC_LINK(F,T,Flag)(create_symbolic_link_api(F, T, Flag)!= 0)
-# define BOOST_REMOVE_DIRECTORY(P)(::RemoveDirectoryW(P)!= 0)
-# define BOOST_DELETE_FILE(P)(::DeleteFileW(P)!= 0)
-# define BOOST_COPY_DIRECTORY(F,T)(::CreateDirectoryExW(F, T, 0)!= 0)
-# define BOOST_COPY_FILE(F,T,FailIfExistsBool)(::CopyFileW(F, T, FailIfExistsBool)!= 0)
-# define BOOST_MOVE_FILE(OLD,NEW)(::MoveFileExW(OLD, NEW, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED)!= 0)
-# define BOOST_RESIZE_FILE(P,SZ)(resize_file_api(P, SZ)!= 0)
-# define BOOST_READ_SYMLINK(P,T)
-
-# define BOOST_ERROR_ALREADY_EXISTS ERROR_ALREADY_EXISTS
-# define BOOST_ERROR_NOT_SUPPORTED ERROR_NOT_SUPPORTED
-
-# endif
-
-//--------------------------------------------------------------------------------------//
-// //
-// helpers (all operating systems) //
-// //
-//--------------------------------------------------------------------------------------//
-
-namespace
-{
-
- fs::file_type query_file_type(const path& p, error_code* ec);
-
- boost::filesystem::directory_iterator end_dir_itr;
-
- // error handling helpers ----------------------------------------------------------//
-
- bool error(err_t error_num, error_code* ec, const char* message);
- bool error(err_t error_num, const path& p, error_code* ec, const char* message);
- bool error(err_t error_num, const path& p1, const path& p2, error_code* ec,
- const char* message);
-
- const error_code ok;
-
- // error_num is value of errno on POSIX, error code (from ::GetLastError()) on Windows.
- // Interface changed 30 Jan 15 to have caller supply error_num as ::SetLastError()
- // values were apparently getting cleared before they could be retrieved by error().
-
- bool error(err_t error_num, error_code* ec, const char* message)
- {
- if (!error_num)
- {
- if (ec != 0) ec->clear();
- }
- else
- { // error
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(message,
- error_code(error_num, system_category())));
- else
- ec->assign(error_num, system_category());
- }
- return error_num != 0;
- }
-
- bool error(err_t error_num, const path& p, error_code* ec, const char* message)
- {
- if (!error_num)
- {
- if (ec != 0) ec->clear();
- }
- else
- { // error
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(message,
- p, error_code(error_num, system_category())));
- else
- ec->assign(error_num, system_category());
- }
- return error_num != 0;
- }
-
- bool error(err_t error_num, const path& p1, const path& p2, error_code* ec,
- const char* message)
- {
- if (!error_num)
- {
- if (ec != 0) ec->clear();
- }
- else
- { // error
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(message,
- p1, p2, error_code(error_num, system_category())));
- else
- ec->assign(error_num, system_category());
- }
- return error_num != 0;
- }
-
- // general helpers -----------------------------------------------------------------//
-
- bool is_empty_directory(const path& p, error_code* ec)
- {
- return (ec != 0 ? fs::directory_iterator(p, *ec) : fs::directory_iterator(p))
- == end_dir_itr;
- }
-
- bool not_found_error(int errval); // forward declaration
-
- // only called if directory exists
- bool remove_directory(const path& p) // true if succeeds or not found
- {
- return BOOST_REMOVE_DIRECTORY(p.c_str())
- || not_found_error(BOOST_ERRNO); // mitigate possible file system race. See #11166
- }
-
- // only called if file exists
- bool remove_file(const path& p) // true if succeeds or not found
- {
- return BOOST_DELETE_FILE(p.c_str())
- || not_found_error(BOOST_ERRNO); // mitigate possible file system race. See #11166
- }
-
- // called by remove and remove_all_aux
- bool remove_file_or_directory(const path& p, fs::file_type type, error_code* ec)
- // return true if file removed, false if not removed
- {
- if (type == fs::file_not_found)
- {
- if (ec != 0) ec->clear();
- return false;
- }
-
- if (type == fs::directory_file
-# ifdef BOOST_WINDOWS_API
- || type == fs::_detail_directory_symlink
-# endif
- )
- {
- if (error(!remove_directory(p) ? BOOST_ERRNO : 0, p, ec,
- "boost::filesystem::remove"))
- return false;
- }
- else
- {
- if (error(!remove_file(p) ? BOOST_ERRNO : 0, p, ec,
- "boost::filesystem::remove"))
- return false;
- }
- return true;
- }
-
- boost::uintmax_t remove_all_aux(const path& p, fs::file_type type,
- error_code* ec)
- {
- boost::uintmax_t count = 1;
- if (type == fs::directory_file) // but not a directory symlink
- {
- fs::directory_iterator itr;
- if (ec != 0)
- {
- itr = fs::directory_iterator(p, *ec);
- if (*ec)
- return count;
- }
- else
- itr = fs::directory_iterator(p);
- for (; itr != end_dir_itr; ++itr)
- {
- fs::file_type tmp_type = query_file_type(itr->path(), ec);
- if (ec != 0 && *ec)
- return count;
- count += remove_all_aux(itr->path(), tmp_type, ec);
- if (ec != 0 && *ec)
- return count;
- }
- }
- remove_file_or_directory(p, type, ec);
- return count;
- }
-
-#ifdef BOOST_POSIX_API
-
-//--------------------------------------------------------------------------------------//
-// //
-// POSIX-specific helpers //
-// //
-//--------------------------------------------------------------------------------------//
-
- const char dot = '.';
-
- bool not_found_error(int errval)
- {
- return errno == ENOENT || errno == ENOTDIR;
- }
-
- bool // true if ok
- copy_file_api(const std::string& from_p,
- const std::string& to_p, bool fail_if_exists)
- {
- const std::size_t buf_sz = 32768;
- boost::scoped_array<char> buf(new char [buf_sz]);
- int infile=-1, outfile=-1; // -1 means not open
-
- // bug fixed: code previously did a stat()on the from_file first, but that
- // introduced a gratuitous race condition; the stat()is now done after the open()
-
- if ((infile = ::open(from_p.c_str(), O_RDONLY))< 0)
- { return false; }
-
- struct stat from_stat;
- if (::stat(from_p.c_str(), &from_stat)!= 0)
- {
- ::close(infile);
- return false;
- }
-
- int oflag = O_CREAT | O_WRONLY | O_TRUNC;
- if (fail_if_exists)
- oflag |= O_EXCL;
- if ((outfile = ::open(to_p.c_str(), oflag, from_stat.st_mode))< 0)
- {
- int open_errno = errno;
- BOOST_ASSERT(infile >= 0);
- ::close(infile);
- errno = open_errno;
- return false;
- }
-
- ssize_t sz, sz_read=1, sz_write;
- while (sz_read > 0
- && (sz_read = ::read(infile, buf.get(), buf_sz)) > 0)
- {
- // Allow for partial writes - see Advanced Unix Programming (2nd Ed.),
- // Marc Rochkind, Addison-Wesley, 2004, page 94
- sz_write = 0;
- do
- {
- BOOST_ASSERT(sz_read - sz_write > 0); // #1
- // ticket 4438 claimed possible infinite loop if write returns 0. My analysis
- // is that POSIX specifies 0 return only if 3rd arg is 0, and that will never
- // happen due to loop entry and coninuation conditions. BOOST_ASSERT #1 above
- // and #2 below added to verify that analysis.
- if ((sz = ::write(outfile, buf.get() + sz_write,
- sz_read - sz_write)) < 0)
- {
- sz_read = sz; // cause read loop termination
- break; // and error reported after closes
- }
- BOOST_ASSERT(sz > 0); // #2
- sz_write += sz;
- } while (sz_write < sz_read);
- }
-
- if (::close(infile)< 0)
- sz_read = -1;
- if (::close(outfile)< 0)
- sz_read = -1;
-
- return sz_read >= 0;
- }
-
- inline fs::file_type query_file_type(const path& p, error_code* ec)
- {
- return fs::detail::symlink_status(p, ec).type();
- }
-
-# else
-
-//--------------------------------------------------------------------------------------//
-// //
-// Windows-specific helpers //
-// //
-//--------------------------------------------------------------------------------------//
-
- const std::size_t buf_size=128;
-
- const wchar_t dot = L'.';
-
- bool not_found_error(int errval)
- {
- return errval == ERROR_FILE_NOT_FOUND
- || errval == ERROR_PATH_NOT_FOUND
- || errval == ERROR_INVALID_NAME // "tools/jam/src/:sys:stat.h", "//foo"
- || errval == ERROR_INVALID_DRIVE // USB card reader with no card inserted
- || errval == ERROR_NOT_READY // CD/DVD drive with no disc inserted
- || errval == ERROR_INVALID_PARAMETER // ":sys:stat.h"
- || errval == ERROR_BAD_PATHNAME // "//nosuch" on Win64
- || errval == ERROR_BAD_NETPATH; // "//nosuch" on Win32
- }
-
- static bool equal_extension( wchar_t const* p, wchar_t const (&x1)[ 5 ], wchar_t const (&x2)[ 5 ] )
- {
- return
- (p[0] == x1[0] || p[0] == x2[0]) &&
- (p[1] == x1[1] || p[1] == x2[1]) &&
- (p[2] == x1[2] || p[2] == x2[2]) &&
- (p[3] == x1[3] || p[3] == x2[3]) &&
- p[4] == 0;
- }
-
- perms make_permissions(const path& p, DWORD attr)
- {
- perms prms = fs::owner_read | fs::group_read | fs::others_read;
- if ((attr & FILE_ATTRIBUTE_READONLY) == 0)
- prms |= fs::owner_write | fs::group_write | fs::others_write;
- path ext = p.extension();
- wchar_t const* q = ext.c_str();
- if (equal_extension(q, L".exe", L".EXE")
- || equal_extension(q, L".com", L".COM")
- || equal_extension(q, L".bat", L".BAT")
- || equal_extension(q, L".cmd", L".CMD"))
- prms |= fs::owner_exe | fs::group_exe | fs::others_exe;
- return prms;
- }
-
- // these constants come from inspecting some Microsoft sample code
- std::time_t to_time_t(const FILETIME & ft)
- {
- __int64 t = (static_cast<__int64>(ft.dwHighDateTime)<< 32)
- + ft.dwLowDateTime;
-# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // > VC++ 7.0
- t -= 116444736000000000LL;
-# else
- t -= 116444736000000000;
-# endif
- t /= 10000000;
- return static_cast<std::time_t>(t);
- }
-
- void to_FILETIME(std::time_t t, FILETIME & ft)
- {
- __int64 temp = t;
- temp *= 10000000;
-# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // > VC++ 7.0
- temp += 116444736000000000LL;
-# else
- temp += 116444736000000000;
-# endif
- ft.dwLowDateTime = static_cast<DWORD>(temp);
- ft.dwHighDateTime = static_cast<DWORD>(temp >> 32);
- }
-
- // Thanks to Jeremy Maitin-Shepard for much help and for permission to
- // base the equivalent()implementation on portions of his
- // file-equivalence-win32.cpp experimental code.
-
- struct handle_wrapper
- {
- HANDLE handle;
- handle_wrapper(HANDLE h)
- : handle(h){}
- ~handle_wrapper()
- {
- if (handle != INVALID_HANDLE_VALUE)
- ::CloseHandle(handle);
- }
- };
-
- HANDLE create_file_handle(const path& p, DWORD dwDesiredAccess,
- DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
- DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes,
- HANDLE hTemplateFile)
- {
- return ::CreateFileW(p.c_str(), dwDesiredAccess, dwShareMode,
- lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes,
- hTemplateFile);
- }
-
- bool is_reparse_point_a_symlink(const path& p)
- {
- handle_wrapper h(create_file_handle(p, FILE_READ_EA,
- FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL));
- if (h.handle == INVALID_HANDLE_VALUE)
- return false;
-
- boost::scoped_array<char> buf(new char [MAXIMUM_REPARSE_DATA_BUFFER_SIZE]);
-
- // Query the reparse data
- DWORD dwRetLen;
- BOOL result = ::DeviceIoControl(h.handle, FSCTL_GET_REPARSE_POINT, NULL, 0, buf.get(),
- MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &dwRetLen, NULL);
- if (!result) return false;
-
- return reinterpret_cast<const REPARSE_DATA_BUFFER*>(buf.get())->ReparseTag
- == IO_REPARSE_TAG_SYMLINK
- // Issue 9016 asked that NTFS directory junctions be recognized as directories.
- // That is equivalent to recognizing them as symlinks, and then the normal symlink
- // mechanism will take care of recognizing them as directories.
- //
- // Directory junctions are very similar to symlinks, but have some performance
- // and other advantages over symlinks. They can be created from the command line
- // with "mklink /j junction-name target-path".
- || reinterpret_cast<const REPARSE_DATA_BUFFER*>(buf.get())->ReparseTag
- == IO_REPARSE_TAG_MOUNT_POINT; // aka "directory junction" or "junction"
- }
-
- inline std::size_t get_full_path_name(
- const path& src, std::size_t len, wchar_t* buf, wchar_t** p)
- {
- return static_cast<std::size_t>(
- ::GetFullPathNameW(src.c_str(), static_cast<DWORD>(len), buf, p));
- }
-
- fs::file_status process_status_failure(const path& p, error_code* ec)
- {
- int errval(::GetLastError());
- if (ec != 0) // always report errval, even though some
- ec->assign(errval, system_category()); // errval values are not status_errors
-
- if (not_found_error(errval))
- {
- return fs::file_status(fs::file_not_found, fs::no_perms);
- }
- else if (errval == ERROR_SHARING_VIOLATION)
- {
- return fs::file_status(fs::type_unknown);
- }
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status",
- p, error_code(errval, system_category())));
- return fs::file_status(fs::status_error);
- }
-
- // differs from symlink_status() in that directory symlinks are reported as
- // _detail_directory_symlink, as required on Windows by remove() and its helpers.
- fs::file_type query_file_type(const path& p, error_code* ec)
- {
- DWORD attr(::GetFileAttributesW(p.c_str()));
- if (attr == 0xFFFFFFFF)
- {
- return process_status_failure(p, ec).type();
- }
-
- if (ec != 0) ec->clear();
-
- if (attr & FILE_ATTRIBUTE_REPARSE_POINT)
- {
- if (is_reparse_point_a_symlink(p))
- return (attr & FILE_ATTRIBUTE_DIRECTORY)
- ? fs::_detail_directory_symlink
- : fs::symlink_file;
- return fs::reparse_file;
- }
-
- return (attr & FILE_ATTRIBUTE_DIRECTORY)
- ? fs::directory_file
- : fs::regular_file;
- }
-
- BOOL resize_file_api(const wchar_t* p, boost::uintmax_t size)
- {
- handle_wrapper h(CreateFileW(p, GENERIC_WRITE, 0, 0, OPEN_EXISTING,
- FILE_ATTRIBUTE_NORMAL, 0));
- LARGE_INTEGER sz;
- sz.QuadPart = size;
- return h.handle != INVALID_HANDLE_VALUE
- && ::SetFilePointerEx(h.handle, sz, 0, FILE_BEGIN)
- && ::SetEndOfFile(h.handle);
- }
-
- // Windows kernel32.dll functions that may or may not be present
- // must be accessed through pointers
-
- typedef BOOL (WINAPI *PtrCreateHardLinkW)(
- /*__in*/ LPCWSTR lpFileName,
- /*__in*/ LPCWSTR lpExistingFileName,
- /*__reserved*/ LPSECURITY_ATTRIBUTES lpSecurityAttributes
- );
-
- PtrCreateHardLinkW create_hard_link_api = PtrCreateHardLinkW(
- ::GetProcAddress(
- ::GetModuleHandleW(L"kernel32.dll"), "CreateHardLinkW"));
-
- typedef BOOLEAN (WINAPI *PtrCreateSymbolicLinkW)(
- /*__in*/ LPCWSTR lpSymlinkFileName,
- /*__in*/ LPCWSTR lpTargetFileName,
- /*__in*/ DWORD dwFlags
- );
-
- PtrCreateSymbolicLinkW create_symbolic_link_api = PtrCreateSymbolicLinkW(
- ::GetProcAddress(
- ::GetModuleHandleW(L"kernel32.dll"), "CreateSymbolicLinkW"));
-
-#endif
-
-//#ifdef BOOST_WINDOWS_API
-//
-//
-// inline bool get_free_disk_space(const std::wstring& ph,
-// PULARGE_INTEGER avail, PULARGE_INTEGER total, PULARGE_INTEGER free)
-// { return ::GetDiskFreeSpaceExW(ph.c_str(), avail, total, free)!= 0; }
-//
-//#endif
-
-} // unnamed namespace
-
-//--------------------------------------------------------------------------------------//
-// //
-// operations functions declared in operations.hpp //
-// in alphabetic order //
-// //
-//--------------------------------------------------------------------------------------//
-
-namespace boost
-{
-namespace filesystem
-{
-
- BOOST_FILESYSTEM_DECL
- path absolute(const path& p, const path& base)
- {
-// if ( p.empty() || p.is_absolute() )
-// return p;
-// // recursively calling absolute is sub-optimal, but is simple
-// path abs_base(base.is_absolute() ? base : absolute(base));
-//# ifdef BOOST_WINDOWS_API
-// if (p.has_root_directory())
-// return abs_base.root_name() / p;
-// // !p.has_root_directory
-// if (p.has_root_name())
-// return p.root_name()
-// / abs_base.root_directory() / abs_base.relative_path() / p.relative_path();
-// // !p.has_root_name()
-//# endif
-// return abs_base / p;
-
- // recursively calling absolute is sub-optimal, but is sure and simple
- path abs_base(base.is_absolute() ? base : absolute(base));
-
- // store expensive to compute values that are needed multiple times
- path p_root_name (p.root_name());
- path base_root_name (abs_base.root_name());
- path p_root_directory (p.root_directory());
-
- if (p.empty())
- return abs_base;
-
- if (!p_root_name.empty()) // p.has_root_name()
- {
- if (p_root_directory.empty()) // !p.has_root_directory()
- return p_root_name / abs_base.root_directory()
- / abs_base.relative_path() / p.relative_path();
- // p is absolute, so fall through to return p at end of block
- }
-
- else if (!p_root_directory.empty()) // p.has_root_directory()
- {
-# ifdef BOOST_POSIX_API
- // POSIX can have root name it it is a network path
- if (base_root_name.empty()) // !abs_base.has_root_name()
- return p;
-# endif
- return base_root_name / p;
- }
-
- else
- {
- return abs_base / p;
- }
-
- return p; // p.is_absolute() is true
- }
-
-namespace detail
-{
- BOOST_FILESYSTEM_DECL bool possible_large_file_size_support()
- {
-# ifdef BOOST_POSIX_API
- struct stat lcl_stat;
- return sizeof(lcl_stat.st_size)> 4;
-# else
- return true;
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- path canonical(const path& p, const path& base, system::error_code* ec)
- {
- path source (p.is_absolute() ? p : absolute(p, base));
- path root(source.root_path());
- path result;
-
- system::error_code local_ec;
- file_status stat (status(source, local_ec));
-
- if (stat.type() == fs::file_not_found)
- {
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(
- "boost::filesystem::canonical", source,
- error_code(system::errc::no_such_file_or_directory, system::generic_category())));
- ec->assign(system::errc::no_such_file_or_directory, system::generic_category());
- return result;
- }
- else if (local_ec)
- {
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(
- "boost::filesystem::canonical", source, local_ec));
- *ec = local_ec;
- return result;
- }
-
- bool scan (true);
- while (scan)
- {
- scan = false;
- result.clear();
- for (path::iterator itr = source.begin(); itr != source.end(); ++itr)
- {
- if (*itr == dot_path())
- continue;
- if (*itr == dot_dot_path())
- {
- if (result != root)
- result.remove_filename();
- continue;
- }
-
- result /= *itr;
-
- bool is_sym (is_symlink(detail::symlink_status(result, ec)));
- if (ec && *ec)
- return path();
-
- if (is_sym)
- {
- path link(detail::read_symlink(result, ec));
- if (ec && *ec)
- return path();
- result.remove_filename();
-
- if (link.is_absolute())
- {
- for (++itr; itr != source.end(); ++itr)
- link /= *itr;
- source = link;
- }
- else // link is relative
- {
- path new_source(result);
- new_source /= link;
- for (++itr; itr != source.end(); ++itr)
- new_source /= *itr;
- source = new_source;
- }
- scan = true; // symlink causes scan to be restarted
- break;
- }
- }
- }
- if (ec != 0)
- ec->clear();
- BOOST_ASSERT_MSG(result.is_absolute(), "canonical() implementation error; please report");
- return result;
- }
-
- BOOST_FILESYSTEM_DECL
- void copy(const path& from, const path& to, system::error_code* ec)
- {
- file_status s(symlink_status(from, *ec));
- if (ec != 0 && *ec) return;
-
- if(is_symlink(s))
- {
- copy_symlink(from, to, *ec);
- }
- else if(is_directory(s))
- {
- copy_directory(from, to, *ec);
- }
- else if(is_regular_file(s))
- {
- copy_file(from, to, fs::copy_option::fail_if_exists, *ec);
- }
- else
- {
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::copy",
- from, to, error_code(BOOST_ERROR_NOT_SUPPORTED, system_category())));
- ec->assign(BOOST_ERROR_NOT_SUPPORTED, system_category());
- }
- }
-
- BOOST_FILESYSTEM_DECL
- void copy_directory(const path& from, const path& to, system::error_code* ec)
- {
-# ifdef BOOST_POSIX_API
- struct stat from_stat;
-# endif
- error(!BOOST_COPY_DIRECTORY(from.c_str(), to.c_str()) ? BOOST_ERRNO : 0,
- from, to, ec, "boost::filesystem::copy_directory");
- }
-
- BOOST_FILESYSTEM_DECL
- void copy_file(const path& from, const path& to, copy_option option, error_code* ec)
- {
- error(!BOOST_COPY_FILE(from.c_str(), to.c_str(),
- option == fail_if_exists) ? BOOST_ERRNO : 0,
- from, to, ec, "boost::filesystem::copy_file");
- }
-
- BOOST_FILESYSTEM_DECL
- void copy_symlink(const path& existing_symlink, const path& new_symlink,
- system::error_code* ec)
- {
-# if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
- error(BOOST_ERROR_NOT_SUPPORTED, new_symlink, existing_symlink, ec,
- "boost::filesystem::copy_symlink");
-
-# else // modern Windows or BOOST_POSIX_API
- path p(read_symlink(existing_symlink, ec));
- if (ec != 0 && *ec) return;
- create_symlink(p, new_symlink, ec);
-
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- bool create_directories(const path& p, system::error_code* ec)
- {
- if (p.empty())
- {
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(
- "boost::filesystem::create_directories", p,
- system::errc::make_error_code(system::errc::invalid_argument)));
- else
- ec->assign(system::errc::invalid_argument, system::generic_category());
- return false;
- }
-
- if (p.filename_is_dot() || p.filename_is_dot_dot())
- return create_directories(p.parent_path(), ec);
-
- error_code local_ec;
- file_status p_status = status(p, local_ec);
-
- if (p_status.type() == directory_file)
- {
- if (ec != 0)
- ec->clear();
- return false;
- }
-
- path parent = p.parent_path();
- BOOST_ASSERT_MSG(parent != p, "internal error: p == p.parent_path()");
- if (!parent.empty())
- {
- // determine if the parent exists
- file_status parent_status = status(parent, local_ec);
-
- // if the parent does not exist, create the parent
- if (parent_status.type() == file_not_found)
- {
- create_directories(parent, local_ec);
- if (local_ec)
- {
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(
- "boost::filesystem::create_directories", parent, local_ec));
- else
- *ec = local_ec;
- return false;
- }
- }
- }
-
- // create the directory
- return create_directory(p, ec);
- }
-
- BOOST_FILESYSTEM_DECL
- bool create_directory(const path& p, error_code* ec)
- {
- if (BOOST_CREATE_DIRECTORY(p.c_str()))
- {
- if (ec != 0)
- ec->clear();
- return true;
- }
-
- // attempt to create directory failed
- int errval(BOOST_ERRNO); // save reason for failure
- error_code dummy;
-
- if (is_directory(p, dummy))
- {
- if (ec != 0)
- ec->clear();
- return false;
- }
-
- // attempt to create directory failed && it doesn't already exist
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::create_directory",
- p, error_code(errval, system_category())));
- else
- ec->assign(errval, system_category());
-
- return false;
- }
-
- BOOST_FILESYSTEM_DECL
- void create_directory_symlink(const path& to, const path& from,
- system::error_code* ec)
- {
-# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
-
- error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec,
- "boost::filesystem::create_directory_symlink");
-# else
-
-# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0600
- // see if actually supported by Windows runtime dll
- if (error(!create_symbolic_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec,
- "boost::filesystem::create_directory_symlink"))
- return;
-# endif
-
- error(!BOOST_CREATE_SYMBOLIC_LINK(from.c_str(), to.c_str(),
- SYMBOLIC_LINK_FLAG_DIRECTORY) ? BOOST_ERRNO : 0,
- to, from, ec, "boost::filesystem::create_directory_symlink");
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- void create_hard_link(const path& to, const path& from, error_code* ec)
- {
-
-# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0500 // SDK earlier than Win 2K
-
- error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec,
- "boost::filesystem::create_hard_link");
-# else
-
-# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0500
- // see if actually supported by Windows runtime dll
- if (error(!create_hard_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec,
- "boost::filesystem::create_hard_link"))
- return;
-# endif
-
- error(!BOOST_CREATE_HARD_LINK(from.c_str(), to.c_str()) ? BOOST_ERRNO : 0, to, from, ec,
- "boost::filesystem::create_hard_link");
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- void create_symlink(const path& to, const path& from, error_code* ec)
- {
-# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
- error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec,
- "boost::filesystem::create_directory_symlink");
-# else
-
-# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0600
- // see if actually supported by Windows runtime dll
- if (error(!create_symbolic_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec,
- "boost::filesystem::create_symlink"))
- return;
-# endif
-
- error(!BOOST_CREATE_SYMBOLIC_LINK(from.c_str(), to.c_str(), 0) ? BOOST_ERRNO : 0,
- to, from, ec, "boost::filesystem::create_symlink");
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- path current_path(error_code* ec)
- {
-# ifdef BOOST_POSIX_API
- path cur;
- for (long path_max = 128;; path_max *=2)// loop 'til buffer large enough
- {
- boost::scoped_array<char>
- buf(new char[static_cast<std::size_t>(path_max)]);
- if (::getcwd(buf.get(), static_cast<std::size_t>(path_max))== 0)
- {
- if (error(errno != ERANGE ? errno : 0
- // bug in some versions of the Metrowerks C lib on the Mac: wrong errno set
-# if defined(__MSL__) && (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
- && errno != 0
-# endif
- , ec, "boost::filesystem::current_path"))
- {
- break;
- }
- }
- else
- {
- cur = buf.get();
- if (ec != 0) ec->clear();
- break;
- }
- }
- return cur;
-
-# else
- DWORD sz;
- if ((sz = ::GetCurrentDirectoryW(0, NULL)) == 0)sz = 1;
- boost::scoped_array<path::value_type> buf(new path::value_type[sz]);
- error(::GetCurrentDirectoryW(sz, buf.get()) == 0 ? BOOST_ERRNO : 0, ec,
- "boost::filesystem::current_path");
- return path(buf.get());
-# endif
- }
-
-
- BOOST_FILESYSTEM_DECL
- void current_path(const path& p, system::error_code* ec)
- {
- error(!BOOST_SET_CURRENT_DIRECTORY(p.c_str()) ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::current_path");
- }
-
- BOOST_FILESYSTEM_DECL
- bool equivalent(const path& p1, const path& p2, system::error_code* ec)
- {
-# ifdef BOOST_POSIX_API
- struct stat s2;
- int e2(::stat(p2.c_str(), &s2));
- struct stat s1;
- int e1(::stat(p1.c_str(), &s1));
-
- if (e1 != 0 || e2 != 0)
- {
- // if one is invalid and the other isn't then they aren't equivalent,
- // but if both are invalid then it is an error
- error (e1 != 0 && e2 != 0, p1, p2, ec, "boost::filesystem::equivalent");
- return false;
- }
-
- // both stats now known to be valid
- return s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino
- // According to the POSIX stat specs, "The st_ino and st_dev fields
- // taken together uniquely identify the file within the system."
- // Just to be sure, size and mod time are also checked.
- && s1.st_size == s2.st_size && s1.st_mtime == s2.st_mtime;
-
-# else // Windows
-
- // Note well: Physical location on external media is part of the
- // equivalence criteria. If there are no open handles, physical location
- // can change due to defragmentation or other relocations. Thus handles
- // must be held open until location information for both paths has
- // been retrieved.
-
- // p2 is done first, so any error reported is for p1
- handle_wrapper h2(
- create_file_handle(
- p2.c_str(),
- 0,
- FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
- 0,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- 0));
-
- handle_wrapper h1(
- create_file_handle(
- p1.c_str(),
- 0,
- FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
- 0,
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- 0));
-
- if (h1.handle == INVALID_HANDLE_VALUE
- || h2.handle == INVALID_HANDLE_VALUE)
- {
- // if one is invalid and the other isn't, then they aren't equivalent,
- // but if both are invalid then it is an error
- error((h1.handle == INVALID_HANDLE_VALUE
- && h2.handle == INVALID_HANDLE_VALUE) ? BOOST_ERROR_NOT_SUPPORTED : 0, p1, p2, ec,
- "boost::filesystem::equivalent");
- return false;
- }
-
- // at this point, both handles are known to be valid
-
- BY_HANDLE_FILE_INFORMATION info1, info2;
-
- if (error(!::GetFileInformationByHandle(h1.handle, &info1) ? BOOST_ERRNO : 0,
- p1, p2, ec, "boost::filesystem::equivalent"))
- return false;
-
- if (error(!::GetFileInformationByHandle(h2.handle, &info2) ? BOOST_ERRNO : 0,
- p1, p2, ec, "boost::filesystem::equivalent"))
- return false;
-
- // In theory, volume serial numbers are sufficient to distinguish between
- // devices, but in practice VSN's are sometimes duplicated, so last write
- // time and file size are also checked.
- return
- info1.dwVolumeSerialNumber == info2.dwVolumeSerialNumber
- && info1.nFileIndexHigh == info2.nFileIndexHigh
- && info1.nFileIndexLow == info2.nFileIndexLow
- && info1.nFileSizeHigh == info2.nFileSizeHigh
- && info1.nFileSizeLow == info2.nFileSizeLow
- && info1.ftLastWriteTime.dwLowDateTime
- == info2.ftLastWriteTime.dwLowDateTime
- && info1.ftLastWriteTime.dwHighDateTime
- == info2.ftLastWriteTime.dwHighDateTime;
-
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- boost::uintmax_t file_size(const path& p, error_code* ec)
- {
-# ifdef BOOST_POSIX_API
-
- struct stat path_stat;
- if (error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::file_size"))
- return static_cast<boost::uintmax_t>(-1);
- if (error(!S_ISREG(path_stat.st_mode) ? EPERM : 0,
- p, ec, "boost::filesystem::file_size"))
- return static_cast<boost::uintmax_t>(-1);
-
- return static_cast<boost::uintmax_t>(path_stat.st_size);
-
-# else // Windows
-
- // assume uintmax_t is 64-bits on all Windows compilers
-
- WIN32_FILE_ATTRIBUTE_DATA fad;
-
- if (error(::GetFileAttributesExW(p.c_str(), ::GetFileExInfoStandard, &fad)== 0
- ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::file_size"))
- return static_cast<boost::uintmax_t>(-1);
-
- if (error((fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)!= 0
- ? ERROR_NOT_SUPPORTED : 0, p, ec, "boost::filesystem::file_size"))
- return static_cast<boost::uintmax_t>(-1);
-
- return (static_cast<boost::uintmax_t>(fad.nFileSizeHigh)
- << (sizeof(fad.nFileSizeLow)*8)) + fad.nFileSizeLow;
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- boost::uintmax_t hard_link_count(const path& p, system::error_code* ec)
- {
-# ifdef BOOST_POSIX_API
-
- struct stat path_stat;
- return error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::hard_link_count")
- ? 0
- : static_cast<boost::uintmax_t>(path_stat.st_nlink);
-
-# else // Windows
-
- // Link count info is only available through GetFileInformationByHandle
- BY_HANDLE_FILE_INFORMATION info;
- handle_wrapper h(
- create_file_handle(p.c_str(), 0,
- FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
- OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0));
- return
- !error(h.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::hard_link_count")
- && !error(::GetFileInformationByHandle(h.handle, &info)== 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::hard_link_count")
- ? info.nNumberOfLinks
- : 0;
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- path initial_path(error_code* ec)
- {
- static path init_path;
- if (init_path.empty())
- init_path = current_path(ec);
- else if (ec != 0) ec->clear();
- return init_path;
- }
-
- BOOST_FILESYSTEM_DECL
- bool is_empty(const path& p, system::error_code* ec)
- {
-# ifdef BOOST_POSIX_API
-
- struct stat path_stat;
- if (error(::stat(p.c_str(), &path_stat)!= 0,
- p, ec, "boost::filesystem::is_empty"))
- return false;
- return S_ISDIR(path_stat.st_mode)
- ? is_empty_directory(p, ec)
- : path_stat.st_size == 0;
-# else
-
- WIN32_FILE_ATTRIBUTE_DATA fad;
- if (error(::GetFileAttributesExW(p.c_str(), ::GetFileExInfoStandard, &fad)== 0
- ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::is_empty"))
- return false;
-
- if (ec != 0) ec->clear();
- return
- (fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- ? is_empty_directory(p, ec)
- : (!fad.nFileSizeHigh && !fad.nFileSizeLow);
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- std::time_t last_write_time(const path& p, system::error_code* ec)
- {
-# ifdef BOOST_POSIX_API
-
- struct stat path_stat;
- if (error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::last_write_time"))
- return std::time_t(-1);
- return path_stat.st_mtime;
-
-# else
-
- handle_wrapper hw(
- create_file_handle(p.c_str(), 0,
- FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
- OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0));
-
- if (error(hw.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::last_write_time"))
- return std::time_t(-1);
-
- FILETIME lwt;
-
- if (error(::GetFileTime(hw.handle, 0, 0, &lwt)== 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::last_write_time"))
- return std::time_t(-1);
-
- return to_time_t(lwt);
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- void last_write_time(const path& p, const std::time_t new_time,
- system::error_code* ec)
- {
-# ifdef BOOST_POSIX_API
-
- struct stat path_stat;
- if (error(::stat(p.c_str(), &path_stat)!= 0,
- p, ec, "boost::filesystem::last_write_time"))
- return;
- ::utimbuf buf;
- buf.actime = path_stat.st_atime; // utime()updates access time too:-(
- buf.modtime = new_time;
- error(::utime(p.c_str(), &buf)!= 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::last_write_time");
-
-# else
-
- handle_wrapper hw(
- create_file_handle(p.c_str(), FILE_WRITE_ATTRIBUTES,
- FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
- OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0));
-
- if (error(hw.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::last_write_time"))
- return;
-
- FILETIME lwt;
- to_FILETIME(new_time, lwt);
-
- error(::SetFileTime(hw.handle, 0, 0, &lwt)== 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::last_write_time");
-# endif
- }
-
-# ifdef BOOST_POSIX_API
- const perms active_bits(all_all | set_uid_on_exe | set_gid_on_exe | sticky_bit);
- inline mode_t mode_cast(perms prms) { return prms & active_bits; }
-# endif
-
- BOOST_FILESYSTEM_DECL
- void permissions(const path& p, perms prms, system::error_code* ec)
- {
- BOOST_ASSERT_MSG(!((prms & add_perms) && (prms & remove_perms)),
- "add_perms and remove_perms are mutually exclusive");
-
- if ((prms & add_perms) && (prms & remove_perms)) // precondition failed
- return;
-
-# ifdef BOOST_POSIX_API
- error_code local_ec;
- file_status current_status((prms & symlink_perms)
- ? fs::symlink_status(p, local_ec)
- : fs::status(p, local_ec));
- if (local_ec)
- {
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(
- "boost::filesystem::permissions", p, local_ec));
- else
- *ec = local_ec;
- return;
- }
-
- if (prms & add_perms)
- prms |= current_status.permissions();
- else if (prms & remove_perms)
- prms = current_status.permissions() & ~prms;
-
- // OS X <10.10, iOS <8.0 and some other platforms don't support fchmodat().
- // Solaris (SunPro and gcc) only support fchmodat() on Solaris 11 and higher,
- // and a runtime check is too much trouble.
- // Linux does not support permissions on symbolic links and has no plans to
- // support them in the future. The chmod() code is thus more practical,
- // rather than always hitting ENOTSUP when sending in AT_SYMLINK_NO_FOLLOW.
- // - See the 3rd paragraph of
- // "Symbolic link ownership, permissions, and timestamps" at:
- // "http://man7.org/linux/man-pages/man7/symlink.7.html"
- // - See the fchmodat() Linux man page:
- // "http://man7.org/linux/man-pages/man2/fchmodat.2.html"
-# if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
- && !(defined(__SUNPRO_CC) || defined(__sun) || defined(sun)) \
- && !(defined(linux) || defined(__linux) || defined(__linux__)) \
- && !(defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \
- && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000) \
- && !(defined(__IPHONE_OS_VERSION_MIN_REQUIRED) \
- && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000)
- if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
- !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
-# else // fallback if fchmodat() not supported
- if (::chmod(p.c_str(), mode_cast(prms)))
-# endif
- {
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error(
- "boost::filesystem::permissions", p,
- error_code(errno, system::generic_category())));
- else
- ec->assign(errno, system::generic_category());
- }
-
-# else // Windows
-
- // if not going to alter FILE_ATTRIBUTE_READONLY, just return
- if (!(!((prms & (add_perms | remove_perms)))
- || (prms & (owner_write|group_write|others_write))))
- return;
-
- DWORD attr = ::GetFileAttributesW(p.c_str());
-
- if (error(attr == 0 ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::permissions"))
- return;
-
- if (prms & add_perms)
- attr &= ~FILE_ATTRIBUTE_READONLY;
- else if (prms & remove_perms)
- attr |= FILE_ATTRIBUTE_READONLY;
- else if (prms & (owner_write|group_write|others_write))
- attr &= ~FILE_ATTRIBUTE_READONLY;
- else
- attr |= FILE_ATTRIBUTE_READONLY;
-
- error(::SetFileAttributesW(p.c_str(), attr) == 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::permissions");
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- path read_symlink(const path& p, system::error_code* ec)
- {
- path symlink_path;
-
-# ifdef BOOST_POSIX_API
-
- for (std::size_t path_max = 64;; path_max *= 2)// loop 'til buffer large enough
- {
- boost::scoped_array<char> buf(new char[path_max]);
- ssize_t result;
- if ((result=::readlink(p.c_str(), buf.get(), path_max))== -1)
- {
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::read_symlink",
- p, error_code(errno, system_category())));
- else ec->assign(errno, system_category());
- break;
- }
- else
- {
- if(result != static_cast<ssize_t>(path_max))
- {
- symlink_path.assign(buf.get(), buf.get() + result);
- if (ec != 0) ec->clear();
- break;
- }
- }
- }
-
-# elif _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
- error(BOOST_ERROR_NOT_SUPPORTED, p, ec,
- "boost::filesystem::read_symlink");
-# else // Vista and Server 2008 SDK, or later
-
- union info_t
- {
- char buf[REPARSE_DATA_BUFFER_HEADER_SIZE+MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
- REPARSE_DATA_BUFFER rdb;
- } info;
-
- handle_wrapper h(
- create_file_handle(p.c_str(), GENERIC_READ, 0, 0, OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0));
-
- if (error(h.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::read_symlink"))
- return symlink_path;
-
- DWORD sz;
-
- if (!error(::DeviceIoControl(h.handle, FSCTL_GET_REPARSE_POINT,
- 0, 0, info.buf, sizeof(info), &sz, 0) == 0 ? BOOST_ERRNO : 0, p, ec,
- "boost::filesystem::read_symlink" ))
- symlink_path.assign(
- static_cast<wchar_t*>(info.rdb.SymbolicLinkReparseBuffer.PathBuffer)
- + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t),
- static_cast<wchar_t*>(info.rdb.SymbolicLinkReparseBuffer.PathBuffer)
- + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t)
- + info.rdb.SymbolicLinkReparseBuffer.PrintNameLength/sizeof(wchar_t));
-# endif
- return symlink_path;
- }
-
- BOOST_FILESYSTEM_DECL
- path relative(const path& p, const path& base, error_code* ec)
- {
- error_code tmp_ec;
- path wc_base(weakly_canonical(base, &tmp_ec));
- if (error(tmp_ec.value(), base, ec, "boost::filesystem::relative"))
- return path();
- path wc_p(weakly_canonical(p, &tmp_ec));
- if (error(tmp_ec.value(), base, ec, "boost::filesystem::relative"))
- return path();
- return wc_p.lexically_relative(wc_base);
- }
-
- BOOST_FILESYSTEM_DECL
- bool remove(const path& p, error_code* ec)
- {
- error_code tmp_ec;
- file_type type = query_file_type(p, &tmp_ec);
- if (error(type == status_error ? tmp_ec.value() : 0, p, ec,
- "boost::filesystem::remove"))
- return false;
-
- // Since POSIX remove() is specified to work with either files or directories, in a
- // perfect world it could just be called. But some important real-world operating
- // systems (Windows, Mac OS X, for example) don't implement the POSIX spec. So
- // remove_file_or_directory() is always called to keep it simple.
- return remove_file_or_directory(p, type, ec);
- }
-
- BOOST_FILESYSTEM_DECL
- boost::uintmax_t remove_all(const path& p, error_code* ec)
- {
- error_code tmp_ec;
- file_type type = query_file_type(p, &tmp_ec);
- if (error(type == status_error ? tmp_ec.value() : 0, p, ec,
- "boost::filesystem::remove_all"))
- return 0;
-
- return (type != status_error && type != file_not_found) // exists
- ? remove_all_aux(p, type, ec)
- : 0;
- }
-
- BOOST_FILESYSTEM_DECL
- void rename(const path& old_p, const path& new_p, error_code* ec)
- {
- error(!BOOST_MOVE_FILE(old_p.c_str(), new_p.c_str()) ? BOOST_ERRNO : 0, old_p, new_p,
- ec, "boost::filesystem::rename");
- }
-
- BOOST_FILESYSTEM_DECL
- void resize_file(const path& p, uintmax_t size, system::error_code* ec)
- {
-# if defined(BOOST_POSIX_API)
- if (BOOST_UNLIKELY(size > static_cast< uintmax_t >((std::numeric_limits< off_t >::max)()))) {
- error(system::errc::file_too_large, p, ec, "boost::filesystem::resize_file");
- return;
- }
-# endif
- error(!BOOST_RESIZE_FILE(p.c_str(), size) ? BOOST_ERRNO : 0, p, ec,
- "boost::filesystem::resize_file");
- }
-
- BOOST_FILESYSTEM_DECL
- space_info space(const path& p, error_code* ec)
- {
-# ifdef BOOST_POSIX_API
- struct BOOST_STATVFS vfs;
- space_info info;
- if (!error(::BOOST_STATVFS(p.c_str(), &vfs) ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::space"))
- {
- info.capacity
- = static_cast<boost::uintmax_t>(vfs.f_blocks)* BOOST_STATVFS_F_FRSIZE;
- info.free
- = static_cast<boost::uintmax_t>(vfs.f_bfree)* BOOST_STATVFS_F_FRSIZE;
- info.available
- = static_cast<boost::uintmax_t>(vfs.f_bavail)* BOOST_STATVFS_F_FRSIZE;
- }
-
-# else
- ULARGE_INTEGER avail, total, free;
- space_info info;
-
- if (!error(::GetDiskFreeSpaceExW(p.c_str(), &avail, &total, &free)== 0,
- p, ec, "boost::filesystem::space"))
- {
- info.capacity
- = (static_cast<boost::uintmax_t>(total.HighPart)<< 32)
- + total.LowPart;
- info.free
- = (static_cast<boost::uintmax_t>(free.HighPart)<< 32)
- + free.LowPart;
- info.available
- = (static_cast<boost::uintmax_t>(avail.HighPart)<< 32)
- + avail.LowPart;
- }
-
-# endif
-
- else
- {
- info.capacity = info.free = info.available = 0;
- }
- return info;
- }
-
- BOOST_FILESYSTEM_DECL
- file_status status(const path& p, error_code* ec)
- {
-# ifdef BOOST_POSIX_API
-
- struct stat path_stat;
- if (::stat(p.c_str(), &path_stat)!= 0)
- {
- if (ec != 0) // always report errno, even though some
- ec->assign(errno, system_category()); // errno values are not status_errors
-
- if (not_found_error(errno))
- {
- return fs::file_status(fs::file_not_found, fs::no_perms);
- }
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status",
- p, error_code(errno, system_category())));
- return fs::file_status(fs::status_error);
- }
- if (ec != 0) ec->clear();;
- if (S_ISDIR(path_stat.st_mode))
- return fs::file_status(fs::directory_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISREG(path_stat.st_mode))
- return fs::file_status(fs::regular_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISBLK(path_stat.st_mode))
- return fs::file_status(fs::block_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISCHR(path_stat.st_mode))
- return fs::file_status(fs::character_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISFIFO(path_stat.st_mode))
- return fs::file_status(fs::fifo_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISSOCK(path_stat.st_mode))
- return fs::file_status(fs::socket_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- return fs::file_status(fs::type_unknown);
-
-# else // Windows
-
- DWORD attr(::GetFileAttributesW(p.c_str()));
- if (attr == 0xFFFFFFFF)
- {
- return process_status_failure(p, ec);
- }
-
- // reparse point handling;
- // since GetFileAttributesW does not resolve symlinks, try to open a file
- // handle to discover if the file exists
- if (attr & FILE_ATTRIBUTE_REPARSE_POINT)
- {
- handle_wrapper h(
- create_file_handle(
- p.c_str(),
- 0, // dwDesiredAccess; attributes only
- FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
- 0, // lpSecurityAttributes
- OPEN_EXISTING,
- FILE_FLAG_BACKUP_SEMANTICS,
- 0)); // hTemplateFile
- if (h.handle == INVALID_HANDLE_VALUE)
- {
- return process_status_failure(p, ec);
- }
-
- if (!is_reparse_point_a_symlink(p))
- return file_status(reparse_file, make_permissions(p, attr));
- }
-
- if (ec != 0) ec->clear();
- return (attr & FILE_ATTRIBUTE_DIRECTORY)
- ? file_status(directory_file, make_permissions(p, attr))
- : file_status(regular_file, make_permissions(p, attr));
-
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- file_status symlink_status(const path& p, error_code* ec)
- {
-# ifdef BOOST_POSIX_API
-
- struct stat path_stat;
- if (::lstat(p.c_str(), &path_stat)!= 0)
- {
- if (ec != 0) // always report errno, even though some
- ec->assign(errno, system_category()); // errno values are not status_errors
-
- if (errno == ENOENT || errno == ENOTDIR) // these are not errors
- {
- return fs::file_status(fs::file_not_found, fs::no_perms);
- }
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status",
- p, error_code(errno, system_category())));
- return fs::file_status(fs::status_error);
- }
- if (ec != 0) ec->clear();
- if (S_ISREG(path_stat.st_mode))
- return fs::file_status(fs::regular_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISDIR(path_stat.st_mode))
- return fs::file_status(fs::directory_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISLNK(path_stat.st_mode))
- return fs::file_status(fs::symlink_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISBLK(path_stat.st_mode))
- return fs::file_status(fs::block_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISCHR(path_stat.st_mode))
- return fs::file_status(fs::character_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISFIFO(path_stat.st_mode))
- return fs::file_status(fs::fifo_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- if (S_ISSOCK(path_stat.st_mode))
- return fs::file_status(fs::socket_file,
- static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
- return fs::file_status(fs::type_unknown);
-
-# else // Windows
-
- DWORD attr(::GetFileAttributesW(p.c_str()));
- if (attr == 0xFFFFFFFF)
- {
- return process_status_failure(p, ec);
- }
-
- if (ec != 0) ec->clear();
-
- if (attr & FILE_ATTRIBUTE_REPARSE_POINT)
- return is_reparse_point_a_symlink(p)
- ? file_status(symlink_file, make_permissions(p, attr))
- : file_status(reparse_file, make_permissions(p, attr));
-
- return (attr & FILE_ATTRIBUTE_DIRECTORY)
- ? file_status(directory_file, make_permissions(p, attr))
- : file_status(regular_file, make_permissions(p, attr));
-
-# endif
- }
-
- // contributed by Jeff Flinn
- BOOST_FILESYSTEM_DECL
- path temp_directory_path(system::error_code* ec)
- {
-# ifdef BOOST_POSIX_API
- const char* val = 0;
-
- (val = std::getenv("TMPDIR" )) ||
- (val = std::getenv("TMP" )) ||
- (val = std::getenv("TEMP" )) ||
- (val = std::getenv("TEMPDIR"));
-
-# ifdef __ANDROID__
- const char* default_tmp = "/data/local/tmp";
-# else
- const char* default_tmp = "/tmp";
-# endif
- path p((val!=0) ? val : default_tmp);
-
- if (p.empty() || (ec&&!is_directory(p, *ec))||(!ec&&!is_directory(p)))
- {
- error(ENOTDIR, p, ec, "boost::filesystem::temp_directory_path");
- return p;
- }
-
- return p;
-
-# else // Windows
-
- const wchar_t* tmp_env = L"TMP";
- const wchar_t* temp_env = L"TEMP";
- const wchar_t* localappdata_env = L"LOCALAPPDATA";
- const wchar_t* userprofile_env = L"USERPROFILE";
- const wchar_t* env_list[]
- = {tmp_env, temp_env, localappdata_env, userprofile_env, 0};
-
- path p;
- for (int i = 0; env_list[i]; ++i)
- {
- std::wstring env = wgetenv(env_list[i]);
- if (!env.empty())
- {
- p = env;
- if (i >= 2)
- p /= L"Temp";
- error_code lcl_ec;
- if (exists(p, lcl_ec) && !lcl_ec && is_directory(p, lcl_ec) && !lcl_ec)
- break;
- p.clear();
- }
- }
-
- if (p.empty())
- {
- // use vector since in C++03 a string is not required to be contiguous
- std::vector<wchar_t> buf(::GetWindowsDirectoryW(NULL, 0));
-
- if (buf.empty()
- || ::GetWindowsDirectoryW(&buf[0], static_cast<UINT>(buf.size())) == 0)
- {
- error(::GetLastError(), ec, "boost::filesystem::temp_directory_path");
- return path();
- }
- p = &*buf.begin(); // do not depend on buf.size(); see ticket #10388
- p /= L"Temp";
- }
- return p;
-
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- path system_complete(const path& p, system::error_code* ec)
- {
-# ifdef BOOST_POSIX_API
- return (p.empty() || p.is_absolute())
- ? p : current_path()/ p;
-
-# else
- if (p.empty())
- {
- if (ec != 0) ec->clear();
- return p;
- }
- wchar_t buf[buf_size];
- wchar_t* pfn;
- std::size_t len = get_full_path_name(p, buf_size, buf, &pfn);
-
- if (error(len == 0 ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::system_complete"))
- return path();
-
- if (len < buf_size)// len does not include null termination character
- return path(&buf[0]);
-
- boost::scoped_array<wchar_t> big_buf(new wchar_t[len]);
-
- return error(get_full_path_name(p, len , big_buf.get(), &pfn)== 0 ? BOOST_ERRNO : 0,
- p, ec, "boost::filesystem::system_complete")
- ? path()
- : path(big_buf.get());
-# endif
- }
-
- BOOST_FILESYSTEM_DECL
- path weakly_canonical(const path& p, system::error_code* ec)
- {
- path head(p);
- path tail;
- system::error_code tmp_ec;
- path::iterator itr = p.end();
-
- for (; !head.empty(); --itr)
- {
- file_status head_status = status(head, tmp_ec);
- if (error(head_status.type() == fs::status_error,
- head, ec, "boost::filesystem::weakly_canonical"))
- return path();
- if (head_status.type() != fs::file_not_found)
- break;
- head.remove_filename();
- }
-
- bool tail_has_dots = false;
- for (; itr != p.end(); ++itr)
- {
- tail /= *itr;
- // for a later optimization, track if any dot or dot-dot elements are present
- if (itr->native().size() <= 2
- && itr->native()[0] == dot
- && (itr->native().size() == 1 || itr->native()[1] == dot))
- tail_has_dots = true;
- }
-
- if (head.empty())
- return p.lexically_normal();
- head = canonical(head, tmp_ec);
- if (error(tmp_ec.value(), head, ec, "boost::filesystem::weakly_canonical"))
- return path();
- return tail.empty()
- ? head
- : (tail_has_dots // optimization: only normalize if tail had dot or dot-dot element
- ? (head/tail).lexically_normal()
- : head/tail);
- }
-} // namespace detail
-
-//--------------------------------------------------------------------------------------//
-// //
-// directory_entry //
-// //
-//--------------------------------------------------------------------------------------//
-
- file_status
- directory_entry::m_get_status(system::error_code* ec) const
- {
- if (!status_known(m_status))
- {
- // optimization: if the symlink status is known, and it isn't a symlink,
- // then status and symlink_status are identical so just copy the
- // symlink status to the regular status.
- if (status_known(m_symlink_status)
- && !is_symlink(m_symlink_status))
- {
- m_status = m_symlink_status;
- if (ec != 0) ec->clear();
- }
- else m_status = detail::status(m_path, ec);
- }
- else if (ec != 0) ec->clear();
- return m_status;
- }
-
- file_status
- directory_entry::m_get_symlink_status(system::error_code* ec) const
- {
- if (!status_known(m_symlink_status))
- m_symlink_status = detail::symlink_status(m_path, ec);
- else if (ec != 0) ec->clear();
- return m_symlink_status;
- }
-
-// dispatch directory_entry supplied here rather than in
-// <boost/filesystem/path_traits.hpp>, thus avoiding header circularity.
-// test cases are in operations_unit_test.cpp
-
-namespace path_traits
-{
- void dispatch(const directory_entry & de,
-# ifdef BOOST_WINDOWS_API
- std::wstring& to,
-# else
- std::string& to,
-# endif
- const codecvt_type &)
- {
- to = de.path().native();
- }
-
- void dispatch(const directory_entry & de,
-# ifdef BOOST_WINDOWS_API
- std::wstring& to
-# else
- std::string& to
-# endif
- )
- {
- to = de.path().native();
- }
-} // namespace path_traits
-} // namespace filesystem
-} // namespace boost
-
-//--------------------------------------------------------------------------------------//
-// //
-// directory_iterator //
-// //
-//--------------------------------------------------------------------------------------//
-
-namespace
-{
-# ifdef BOOST_POSIX_API
-
- error_code path_max(std::size_t & result)
- // this code is based on Stevens and Rago, Advanced Programming in the
- // UNIX envirnment, 2nd Ed., ISBN 0-201-43307-9, page 49
- {
-# ifdef PATH_MAX
- static std::size_t max = PATH_MAX;
-# else
- static std::size_t max = 0;
-# endif
- if (max == 0)
- {
- errno = 0;
- long tmp = ::pathconf("/", _PC_NAME_MAX);
- if (tmp < 0)
- {
- if (errno == 0)// indeterminate
- max = 4096; // guess
- else return error_code(errno, system_category());
- }
- else max = static_cast<std::size_t>(tmp + 1); // relative root
- }
- result = max;
- return ok;
- }
-
-#if defined(__PGI) && defined(__USE_FILE_OFFSET64)
-#define dirent dirent64
-#endif
-
- error_code dir_itr_first(void *& handle, void *& buffer,
- const char* dir, string& target,
- fs::file_status &, fs::file_status &)
- {
- if ((handle = ::opendir(dir))== 0)
- return error_code(errno, system_category());
- target = string("."); // string was static but caused trouble
- // when iteration called from dtor, after
- // static had already been destroyed
- std::size_t path_size (0); // initialization quiets gcc warning (ticket #3509)
- error_code ec = path_max(path_size);
- if (ec)return ec;
- dirent de;
- buffer = std::malloc((sizeof(dirent) - sizeof(de.d_name))
- + path_size + 1); // + 1 for "/0"
- return ok;
- }
-
- // warning: the only dirent member updated is d_name
- inline int readdir_r_simulator(DIR * dirp, struct dirent * entry,
- struct dirent ** result)// *result set to 0 on end of directory
- {
-# if !defined(__CYGWIN__)\
- && defined(_POSIX_THREAD_SAFE_FUNCTIONS)\
- && defined(_SC_THREAD_SAFE_FUNCTIONS)\
- && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0)\
- && (!defined(__hpux) || defined(_REENTRANT)) \
- && (!defined(_AIX) || defined(__THREAD_SAFE))
-
- errno = 0;
-
- if (::sysconf(_SC_THREAD_SAFE_FUNCTIONS)>= 0)
- { return ::readdir_r(dirp, entry, result); }
-# endif
-
- errno = 0;
-
- struct dirent * p;
- *result = 0;
- if ((p = ::readdir(dirp))== 0)
- return errno;
- std::strcpy(entry->d_name, p->d_name);
- *result = entry;
- return 0;
- }
-
- error_code dir_itr_increment(void *& handle, void *& buffer,
- string& target, fs::file_status & sf, fs::file_status & symlink_sf)
- {
- BOOST_ASSERT(buffer != 0);
- dirent * entry(static_cast<dirent *>(buffer));
- dirent * result;
- int return_code;
- if ((return_code = readdir_r_simulator(static_cast<DIR*>(handle), entry, &result))!= 0)
- return error_code(errno, system_category());
- if (result == 0)
- return fs::detail::dir_itr_close(handle, buffer);
- target = entry->d_name;
-# ifdef BOOST_FILESYSTEM_STATUS_CACHE
- if (entry->d_type == DT_UNKNOWN) // filesystem does not supply d_type value
- {
- sf = symlink_sf = fs::file_status(fs::status_error);
- }
- else // filesystem supplies d_type value
- {
- if (entry->d_type == DT_DIR)
- sf = symlink_sf = fs::file_status(fs::directory_file);
- else if (entry->d_type == DT_REG)
- sf = symlink_sf = fs::file_status(fs::regular_file);
- else if (entry->d_type == DT_LNK)
- {
- sf = fs::file_status(fs::status_error);
- symlink_sf = fs::file_status(fs::symlink_file);
- }
- else sf = symlink_sf = fs::file_status(fs::status_error);
- }
-# else
- sf = symlink_sf = fs::file_status(fs::status_error);
-# endif
- return ok;
- }
-
-# else // BOOST_WINDOWS_API
-
- error_code dir_itr_first(void *& handle, const fs::path& dir,
- wstring& target, fs::file_status & sf, fs::file_status & symlink_sf)
- // Note: an empty root directory has no "." or ".." entries, so this
- // causes a ERROR_FILE_NOT_FOUND error which we do not considered an
- // error. It is treated as eof instead.
- {
- // use a form of search Sebastian Martel reports will work with Win98
- wstring dirpath(dir.wstring());
- dirpath += (dirpath.empty()
- || (dirpath[dirpath.size()-1] != L'\\'
- && dirpath[dirpath.size()-1] != L'/'
- && dirpath[dirpath.size()-1] != L':'))? L"\\*" : L"*";
-
- WIN32_FIND_DATAW data;
- if ((handle = ::FindFirstFileW(dirpath.c_str(), &data))
- == INVALID_HANDLE_VALUE)
- {
- handle = 0; // signal eof
- return error_code( (::GetLastError() == ERROR_FILE_NOT_FOUND
- // Windows Mobile returns ERROR_NO_MORE_FILES; see ticket #3551
- || ::GetLastError() == ERROR_NO_MORE_FILES)
- ? 0 : ::GetLastError(), system_category() );
- }
- target = data.cFileName;
- if (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
- // reparse points are complex, so don't try to handle them here; instead just mark
- // them as status_error which causes directory_entry caching to call status()
- // and symlink_status() which do handle reparse points fully
- {
- sf.type(fs::status_error);
- symlink_sf.type(fs::status_error);
- }
- else
- {
- if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- {
- sf.type(fs::directory_file);
- symlink_sf.type(fs::directory_file);
- }
- else
- {
- sf.type(fs::regular_file);
- symlink_sf.type(fs::regular_file);
- }
- sf.permissions(make_permissions(data.cFileName, data.dwFileAttributes));
- symlink_sf.permissions(sf.permissions());
- }
- return error_code();
- }
-
- error_code dir_itr_increment(void *& handle, wstring& target,
- fs::file_status & sf, fs::file_status & symlink_sf)
- {
- WIN32_FIND_DATAW data;
- if (::FindNextFileW(handle, &data)== 0)// fails
- {
- int error = ::GetLastError();
- fs::detail::dir_itr_close(handle);
- return error_code(error == ERROR_NO_MORE_FILES ? 0 : error, system_category());
- }
- target = data.cFileName;
- if (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
- // reparse points are complex, so don't try to handle them here; instead just mark
- // them as status_error which causes directory_entry caching to call status()
- // and symlink_status() which do handle reparse points fully
- {
- sf.type(fs::status_error);
- symlink_sf.type(fs::status_error);
- }
- else
- {
- if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- {
- sf.type(fs::directory_file);
- symlink_sf.type(fs::directory_file);
- }
- else
- {
- sf.type(fs::regular_file);
- symlink_sf.type(fs::regular_file);
- }
- sf.permissions(make_permissions(data.cFileName, data.dwFileAttributes));
- symlink_sf.permissions(sf.permissions());
- }
- return error_code();
- }
-#endif
-
- const error_code not_found_error_code (
-# ifdef BOOST_WINDOWS_API
- ERROR_PATH_NOT_FOUND
-# else
- ENOENT
-# endif
- , system_category());
-
-} // unnamed namespace
-
-namespace boost
-{
-namespace filesystem
-{
-
-namespace detail
-{
- // dir_itr_close is called both from the ~dir_itr_imp()destructor
- // and dir_itr_increment()
- BOOST_FILESYSTEM_DECL
- system::error_code dir_itr_close( // never throws
- void *& handle
-# if defined(BOOST_POSIX_API)
- , void *& buffer
-# endif
- )
- {
-# ifdef BOOST_POSIX_API
- std::free(buffer);
- buffer = 0;
- if (handle == 0)return ok;
- DIR * h(static_cast<DIR*>(handle));
- handle = 0;
- return error_code(::closedir(h)== 0 ? 0 : errno, system_category());
-
-# else
- if (handle != 0)
- {
- ::FindClose(handle);
- handle = 0;
- }
- return ok;
-
-# endif
- }
-
- void directory_iterator_construct(directory_iterator& it,
- const path& p, system::error_code* ec)
- {
- if (error(p.empty() ? not_found_error_code.value() : 0, p, ec,
- "boost::filesystem::directory_iterator::construct"))
- return;
-
- path::string_type filename;
- file_status file_stat, symlink_file_stat;
- error_code result = dir_itr_first(it.m_imp->handle,
-# if defined(BOOST_POSIX_API)
- it.m_imp->buffer,
-# endif
- p.c_str(), filename, file_stat, symlink_file_stat);
-
- if (result)
- {
- it.m_imp.reset();
- error(result.value(), p,
- ec, "boost::filesystem::directory_iterator::construct");
- return;
- }
-
- if (it.m_imp->handle == 0)
- it.m_imp.reset(); // eof, so make end iterator
- else // not eof
- {
- it.m_imp->dir_entry.assign(p / filename, file_stat, symlink_file_stat);
- if (filename[0] == dot // dot or dot-dot
- && (filename.size()== 1
- || (filename[1] == dot
- && filename.size()== 2)))
- { it.increment(*ec); }
- }
- }
-
- void directory_iterator_increment(directory_iterator& it,
- system::error_code* ec)
- {
- BOOST_ASSERT_MSG(it.m_imp.get(), "attempt to increment end iterator");
- BOOST_ASSERT_MSG(it.m_imp->handle != 0, "internal program error");
-
- path::string_type filename;
- file_status file_stat, symlink_file_stat;
- system::error_code temp_ec;
-
- for (;;)
- {
- temp_ec = dir_itr_increment(it.m_imp->handle,
-# if defined(BOOST_POSIX_API)
- it.m_imp->buffer,
-# endif
- filename, file_stat, symlink_file_stat);
-
- if (temp_ec) // happens if filesystem is corrupt, such as on a damaged optical disc
- {
- path error_path(it.m_imp->dir_entry.path().parent_path()); // fix ticket #5900
- it.m_imp.reset();
- if (ec == 0)
- BOOST_FILESYSTEM_THROW(
- filesystem_error("boost::filesystem::directory_iterator::operator++",
- error_path,
- error_code(BOOST_ERRNO, system_category())));
- ec->assign(BOOST_ERRNO, system_category());
- return;
- }
- else if (ec != 0) ec->clear();
-
- if (it.m_imp->handle == 0) // eof, make end
- {
- it.m_imp.reset();
- return;
- }
-
- if (!(filename[0] == dot // !(dot or dot-dot)
- && (filename.size()== 1
- || (filename[1] == dot
- && filename.size()== 2))))
- {
- it.m_imp->dir_entry.replace_filename(
- filename, file_stat, symlink_file_stat);
- return;
- }
- }
- }
-} // namespace detail
-} // namespace filesystem
-} // namespace boost
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/unique_path.cpp b/src/third_party/boost-1.68.0/libs/filesystem/src/unique_path.cpp
deleted file mode 100644
index 1b05c83944b..00000000000
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/unique_path.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-// filesystem unique_path.cpp --------------------------------------------------------//
-
-// Copyright Beman Dawes 2010
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Library home page: http://www.boost.org/libs/filesystem
-
-//--------------------------------------------------------------------------------------//
-
-// define BOOST_FILESYSTEM_SOURCE so that <boost/filesystem/config.hpp> knows
-// the library is being built (possibly exporting rather than importing code)
-#define BOOST_FILESYSTEM_SOURCE
-
-#ifndef BOOST_SYSTEM_NO_DEPRECATED
-# define BOOST_SYSTEM_NO_DEPRECATED
-#endif
-
-#include <boost/filesystem/operations.hpp>
-#include <cassert>
-
-# ifdef BOOST_POSIX_API
-# include <fcntl.h>
-# ifdef BOOST_HAS_UNISTD_H
-# include <unistd.h>
-# endif
-# else // BOOST_WINDOWS_API
-# include <windows.h>
-# include <wincrypt.h>
-# ifdef _MSC_VER
-# pragma comment(lib, "Advapi32.lib")
-# endif
-# endif
-
-namespace {
-
-void fail(int err, boost::system::error_code* ec)
-{
- if (ec == 0)
- BOOST_FILESYSTEM_THROW( boost::system::system_error(err,
- boost::system::system_category(),
- "boost::filesystem::unique_path"));
-
- ec->assign(err, boost::system::system_category());
- return;
-}
-
-#ifdef BOOST_WINDOWS_API
-
-int acquire_crypt_handle(HCRYPTPROV& handle)
-{
- if (::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
- return 0;
-
- int errval = ::GetLastError();
- if (errval != NTE_BAD_KEYSET)
- return errval;
-
- if (::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_NEWKEYSET | CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
- return 0;
-
- errval = ::GetLastError();
- // Another thread could have attempted to create the keyset at the same time.
- if (errval != NTE_EXISTS)
- return errval;
-
- if (::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
- return 0;
-
- return ::GetLastError();
-}
-
-#endif
-
-void system_crypt_random(void* buf, std::size_t len, boost::system::error_code* ec)
-{
-# ifdef BOOST_POSIX_API
-
- int file = open("/dev/urandom", O_RDONLY);
- if (file == -1)
- {
- file = open("/dev/random", O_RDONLY);
- if (file == -1)
- {
- fail(errno, ec);
- return;
- }
- }
-
- size_t bytes_read = 0;
- while (bytes_read < len)
- {
- ssize_t n = read(file, buf, len - bytes_read);
- if (n == -1)
- {
- close(file);
- fail(errno, ec);
- return;
- }
- bytes_read += n;
- buf = static_cast<char*>(buf) + n;
- }
-
- close(file);
-
-# else // BOOST_WINDOWS_API
-
- HCRYPTPROV handle;
- int errval = acquire_crypt_handle(handle);
-
- if (!errval)
- {
- BOOL gen_ok = ::CryptGenRandom(handle, len, static_cast<unsigned char*>(buf));
- if (!gen_ok)
- errval = ::GetLastError();
- ::CryptReleaseContext(handle, 0);
- }
-
- if (!errval) return;
-
- fail(errval, ec);
-# endif
-}
-
-} // unnamed namespace
-
-namespace boost { namespace filesystem { namespace detail {
-
-BOOST_FILESYSTEM_DECL
-path unique_path(const path& model, system::error_code* ec)
-{
- std::wstring s (model.wstring()); // std::string ng for MBCS encoded POSIX
- const wchar_t hex[] = L"0123456789abcdef";
- char ran[] = "123456789abcdef"; // init to avoid clang static analyzer message
- // see ticket #8954
- assert(sizeof(ran) == 16);
- const int max_nibbles = 2 * sizeof(ran); // 4-bits per nibble
-
- int nibbles_used = max_nibbles;
- for(std::wstring::size_type i=0; i < s.size(); ++i)
- {
- if (s[i] == L'%') // digit request
- {
- if (nibbles_used == max_nibbles)
- {
- system_crypt_random(ran, sizeof(ran), ec);
- if (ec != 0 && *ec)
- return "";
- nibbles_used = 0;
- }
- int c = ran[nibbles_used/2];
- c >>= 4 * (nibbles_used++ & 1); // if odd, shift right 1 nibble
- s[i] = hex[c & 0xf]; // convert to hex digit and replace
- }
- }
-
- if (ec != 0) ec->clear();
-
- return s;
-}
-
-}}}
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/windows_file_codecvt.cpp b/src/third_party/boost-1.68.0/libs/filesystem/src/windows_file_codecvt.cpp
deleted file mode 100644
index 998db602212..00000000000
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/windows_file_codecvt.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-// filesystem windows_file_codecvt.cpp -----------------------------------------//
-
-// Copyright Beman Dawes 2009
-
-// Distributed under the Boost Software License, Version 1.0.
-// See http://www.boost.org/LICENSE_1_0.txt
-
-// Library home page: http://www.boost.org/libs/filesystem
-
-//--------------------------------------------------------------------------------------//
-
-// define BOOST_FILESYSTEM_SOURCE so that <boost/system/config.hpp> knows
-// the library is being built (possibly exporting rather than importing code)
-#define BOOST_FILESYSTEM_SOURCE
-
-#ifndef BOOST_SYSTEM_NO_DEPRECATED
-# define BOOST_SYSTEM_NO_DEPRECATED
-#endif
-
-#include <boost/filesystem/config.hpp>
-#include <cwchar> // for mbstate_t
-
-#ifdef BOOST_WINDOWS_API
-
-#include "windows_file_codecvt.hpp"
-
-// Versions of MinGW prior to GCC 4.6 requires this
-#ifndef WINVER
-# define WINVER 0x0500
-#endif
-
-#include <windows.h>
-
- std::codecvt_base::result windows_file_codecvt::do_in(
- std::mbstate_t &,
- const char* from, const char* from_end, const char*& from_next,
- wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const
- {
- UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
-
- int count;
- if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from,
- from_end - from, to, to_end - to)) == 0)
- {
- return error; // conversion failed
- }
-
- from_next = from_end;
- to_next = to + count;
- *to_next = L'\0';
- return ok;
- }
-
- std::codecvt_base::result windows_file_codecvt::do_out(
- std::mbstate_t &,
- const wchar_t* from, const wchar_t* from_end, const wchar_t* & from_next,
- char* to, char* to_end, char* & to_next) const
- {
- UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
-
- int count;
- if ((count = ::WideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, from,
- from_end - from, to, to_end - to, 0, 0)) == 0)
- {
- return error; // conversion failed
- }
-
- from_next = from_end;
- to_next = to + count;
- *to_next = '\0';
- return ok;
- }
-
- # endif // BOOST_WINDOWS_API
-
diff --git a/src/third_party/boost-1.68.0/libs/function/Jamfile b/src/third_party/boost-1.68.0/libs/function/Jamfile
deleted file mode 100644
index 40ace45667b..00000000000
--- a/src/third_party/boost-1.68.0/libs/function/Jamfile
+++ /dev/null
@@ -1,11 +0,0 @@
-# Boost.Function Library Jamfile
-#
-# Copyright (c) 2018 James E. King III
-#
-# Use, modification, and distribution are subject to the
-# Boost Software License, Version 1.0. (See accompanying file
-# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-# please order by name to ease maintenance
-build-project example ;
-build-project test ;
diff --git a/src/third_party/boost-1.68.0/libs/function/README.md b/src/third_party/boost-1.68.0/libs/function/README.md
deleted file mode 100644
index b117eaed461..00000000000
--- a/src/third_party/boost-1.68.0/libs/function/README.md
+++ /dev/null
@@ -1,34 +0,0 @@
-Function, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), contains a family of class templates that are function object wrappers.
-
-### License
-
-Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
-
-### Properties
-
-* C++03
-* Header-Only
-
-### Build Status
-
-Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
-:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
-[`master`](https://github.com/boostorg/function/tree/master) | [![Build Status](https://travis-ci.org/boostorg/function.svg?branch=master)](https://travis-ci.org/boostorg/function) | [![Build status](https://ci.appveyor.com/api/projects/status/7tgx4ac44fikr87d/branch/master?svg=true)](https://ci.appveyor.com/project/jeking3/function-d036y/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/15843/badge.svg)](https://scan.coverity.com/projects/boostorg-function) | [![codecov](https://codecov.io/gh/boostorg/function/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/function/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/function.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/function.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/function.html)
-[`develop`](https://github.com/boostorg/function/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/function.svg?branch=develop)](https://travis-ci.org/boostorg/function) | [![Build status](https://ci.appveyor.com/api/projects/status/7tgx4ac44fikr87d/branch/develop?svg=true)](https://ci.appveyor.com/project/jeking3/function-d036y/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/15843/badge.svg)](https://scan.coverity.com/projects/boostorg-function) | [![codecov](https://codecov.io/gh/boostorg/function/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/function/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/function.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/function.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/function.html)
-
-### Directories
-
-| Name | Purpose |
-| ----------- | ------------------------------ |
-| `doc` | documentation |
-| `example` | examples |
-| `include` | headers |
-| `test` | unit tests |
-
-### More information
-
-* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-function)
-* [Report bugs](https://github.com/boostorg/function/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
-* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
-* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[function]` tag at the beginning of the subject line.
-
diff --git a/src/third_party/boost-1.68.0/libs/iostreams/src/bzip2.cpp b/src/third_party/boost-1.68.0/libs/iostreams/src/bzip2.cpp
deleted file mode 100644
index af80cd2f94b..00000000000
--- a/src/third_party/boost-1.68.0/libs/iostreams/src/bzip2.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// To configure Boost to work with libbz2, see the
-// installation instructions here:
-// http://boost.org/libs/iostreams/doc/index.html?path=7
-
-// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
-// knows that we are building the library (possibly exporting code), rather
-// than using it (possibly importing code).
-#define BOOST_IOSTREAMS_SOURCE
-
-#include <boost/throw_exception.hpp>
-#include <boost/iostreams/detail/config/dyn_link.hpp>
-#include <boost/iostreams/filter/bzip2.hpp>
-#include "bzlib.h" // Julian Seward's "bzip.h" header.
- // To configure Boost to work with libbz2, see the
- // installation instructions here:
- // http://boost.org/libs/iostreams/doc/index.html?path=7
-
-namespace boost { namespace iostreams {
-
-namespace bzip2 {
-
- // Status codes
-
-const int ok = BZ_OK;
-const int run_ok = BZ_RUN_OK;
-const int flush_ok = BZ_FLUSH_OK;
-const int finish_ok = BZ_FINISH_OK;
-const int stream_end = BZ_STREAM_END;
-const int sequence_error = BZ_SEQUENCE_ERROR;
-const int param_error = BZ_PARAM_ERROR;
-const int mem_error = BZ_MEM_ERROR;
-const int data_error = BZ_DATA_ERROR;
-const int data_error_magic = BZ_DATA_ERROR_MAGIC;
-const int io_error = BZ_IO_ERROR;
-const int unexpected_eof = BZ_UNEXPECTED_EOF;
-const int outbuff_full = BZ_OUTBUFF_FULL;
-const int config_error = BZ_CONFIG_ERROR;
-
- // Action codes
-
-const int finish = BZ_FINISH;
-const int run = BZ_RUN;
-
-} // End namespace bzip2.
-
-//------------------Implementation of bzip2_error-----------------------------//
-
-bzip2_error::bzip2_error(int error)
- : BOOST_IOSTREAMS_FAILURE("bzip2 error"), error_(error)
- { }
-
-void bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)
-{
- switch (error) {
- case BZ_OK:
- case BZ_RUN_OK:
- case BZ_FLUSH_OK:
- case BZ_FINISH_OK:
- case BZ_STREAM_END:
- return;
- case BZ_MEM_ERROR:
- boost::throw_exception(std::bad_alloc());
- default:
- boost::throw_exception(bzip2_error(error));
- }
-}
-
-//------------------Implementation of bzip2_base------------------------------//
-
-namespace detail {
-
-bzip2_base::bzip2_base(const bzip2_params& params)
- : params_(params), stream_(new bz_stream), ready_(false)
- { }
-
-bzip2_base::~bzip2_base() { delete static_cast<bz_stream*>(stream_); }
-
-void bzip2_base::before( const char*& src_begin, const char* src_end,
- char*& dest_begin, char* dest_end )
-{
- bz_stream* s = static_cast<bz_stream*>(stream_);
- s->next_in = const_cast<char*>(src_begin);
- s->avail_in = static_cast<unsigned>(src_end - src_begin);
- s->next_out = reinterpret_cast<char*>(dest_begin);
- s->avail_out= static_cast<unsigned>(dest_end - dest_begin);
-}
-
-void bzip2_base::after(const char*& src_begin, char*& dest_begin)
-{
- bz_stream* s = static_cast<bz_stream*>(stream_);
- src_begin = const_cast<char*>(s->next_in);
- dest_begin = s->next_out;
-}
-
-int bzip2_base::check_end(const char* src_begin, const char* dest_begin)
-{
- bz_stream* s = static_cast<bz_stream*>(stream_);
- if( src_begin == s->next_in &&
- s->avail_in == 0 &&
- dest_begin == s->next_out) {
- return bzip2::unexpected_eof;
- } else {
- return bzip2::ok;
- }
-}
-
-void bzip2_base::end(bool compress)
-{
- if(!ready_) return;
- ready_ = false;
- bz_stream* s = static_cast<bz_stream*>(stream_);
- bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
- compress ?
- BZ2_bzCompressEnd(s) :
- BZ2_bzDecompressEnd(s)
- );
-}
-
-int bzip2_base::compress(int action)
-{
- return BZ2_bzCompress(static_cast<bz_stream*>(stream_), action);
-}
-
-int bzip2_base::decompress()
-{
- return BZ2_bzDecompress(static_cast<bz_stream*>(stream_));
-}
-
-void bzip2_base::do_init
- ( bool compress,
- bzip2::alloc_func /* alloc */,
- bzip2::free_func /* free */,
- void* derived )
-{
- bz_stream* s = static_cast<bz_stream*>(stream_);
-
- // Current interface for customizing memory management
- // is non-conforming and has been disabled:
- // s->bzalloc = alloc;
- // s->bzfree = free;
- s->bzalloc = 0;
- s->bzfree = 0;
- s->opaque = derived;
- bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
- compress ?
- BZ2_bzCompressInit( s,
- params_.block_size,
- 0,
- params_.work_factor ) :
- BZ2_bzDecompressInit( s,
- 0,
- params_.small )
- );
- ready_ = true;
-}
-
-} // End namespace detail.
-
-//----------------------------------------------------------------------------//
-
-} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.68.0/libs/iostreams/src/lzma.cpp b/src/third_party/boost-1.68.0/libs/iostreams/src/lzma.cpp
deleted file mode 100644
index 5d7bb3cfbd9..00000000000
--- a/src/third_party/boost-1.68.0/libs/iostreams/src/lzma.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-// (C) Copyright Milan Svoboda 2008.
-// Originally developed under the fusecompress project.
-// Based on bzip2.cpp by:
-// (C) Copyright Jonathan Turkanis 2003.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
-// knows that we are building the library (possibly exporting code), rather
-// than using it (possibly importing code).
-#define BOOST_IOSTREAMS_SOURCE
-
-#include <lzma.h>
-
-#include <boost/throw_exception.hpp>
-#include <boost/iostreams/detail/config/dyn_link.hpp>
-#include <boost/iostreams/filter/lzma.hpp>
-
-namespace boost { namespace iostreams {
-
-namespace lzma {
-
- // Compression levels
-
-const uint32_t no_compression = 0;
-const uint32_t best_speed = 1;
-const uint32_t best_compression = 9;
-const uint32_t default_compression = 2;
-
- // Status codes
-
-const int okay = LZMA_OK;
-const int stream_end = LZMA_STREAM_END;
-const int unsupported_check = LZMA_UNSUPPORTED_CHECK;
-const int mem_error = LZMA_MEM_ERROR;
-const int options_error = LZMA_OPTIONS_ERROR;
-const int data_error = LZMA_DATA_ERROR;
-const int buf_error = LZMA_BUF_ERROR;
-const int prog_error = LZMA_PROG_ERROR;
-
- // Flush codes
-
-const int finish = LZMA_FINISH;
-const int full_flush = LZMA_FULL_FLUSH;
-const int sync_flush = LZMA_SYNC_FLUSH;
-const int run = LZMA_RUN;
-
- // Code for current OS
-
-} // End namespace lzma.
-
-//------------------Implementation of lzma_error------------------------------//
-
-lzma_error::lzma_error(int error)
- : BOOST_IOSTREAMS_FAILURE("lzma error"), error_(error)
- { }
-
-void lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)
-{
- switch (error) {
- case LZMA_OK:
- case LZMA_STREAM_END:
- return;
- case LZMA_MEM_ERROR:
- boost::throw_exception(std::bad_alloc());
- default:
- boost::throw_exception(lzma_error(error));
- }
-}
-
-//------------------Implementation of lzma_base-------------------------------//
-
-namespace detail {
-
-lzma_base::lzma_base()
- : stream_(new lzma_stream)
- { }
-
-lzma_base::~lzma_base() { delete static_cast<lzma_stream*>(stream_); }
-
-void lzma_base::before( const char*& src_begin, const char* src_end,
- char*& dest_begin, char* dest_end )
-{
- lzma_stream* s = static_cast<lzma_stream*>(stream_);
- s->next_in = reinterpret_cast<uint8_t*>(const_cast<char*>(src_begin));
- s->avail_in = static_cast<size_t>(src_end - src_begin);
- s->next_out = reinterpret_cast<uint8_t*>(dest_begin);
- s->avail_out= static_cast<size_t>(dest_end - dest_begin);
-}
-
-void lzma_base::after(const char*& src_begin, char*& dest_begin, bool)
-{
- lzma_stream* s = static_cast<lzma_stream*>(stream_);
- src_begin = const_cast<const char*>(reinterpret_cast<const char*>(s->next_in));
- dest_begin = reinterpret_cast<char*>(s->next_out);
-}
-
-int lzma_base::deflate(int action)
-{
- return lzma_code(static_cast<lzma_stream*>(stream_), static_cast<lzma_action>(action));
-}
-
-int lzma_base::inflate(int action)
-{
- return lzma_code(static_cast<lzma_stream*>(stream_), static_cast<lzma_action>(action));
-}
-
-void lzma_base::reset(bool compress, bool realloc)
-{
- lzma_stream* s = static_cast<lzma_stream*>(stream_);
- lzma_end(s);
- if (realloc)
- {
- memset(s, 0, sizeof(*s));
-
- lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
- compress ?
- lzma_easy_encoder(s, level, LZMA_CHECK_CRC32) :
- lzma_stream_decoder(s, 100 * 1024 * 1024, LZMA_CONCATENATED)
- );
- }
-}
-
-void lzma_base::do_init
- ( const lzma_params& p, bool compress,
- lzma::alloc_func, lzma::free_func,
- void* )
-{
- lzma_stream* s = static_cast<lzma_stream*>(stream_);
-
- memset(s, 0, sizeof(*s));
-
- level = p.level;
- lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
- compress ?
- lzma_easy_encoder(s, p.level, LZMA_CHECK_CRC32) :
- lzma_stream_decoder(s, 100 * 1024 * 1024, LZMA_CONCATENATED)
- );
-}
-
-} // End namespace detail.
-
-//----------------------------------------------------------------------------//
-
-} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.68.0/libs/iostreams/src/mapped_file.cpp b/src/third_party/boost-1.68.0/libs/iostreams/src/mapped_file.cpp
deleted file mode 100644
index 8073848cdb1..00000000000
--- a/src/third_party/boost-1.68.0/libs/iostreams/src/mapped_file.cpp
+++ /dev/null
@@ -1,496 +0,0 @@
-// (C) Copyright Craig Henderson 2002 'boost/memmap.hpp' from sandbox
-// (C) Copyright Jonathan Turkanis 2004.
-// (C) Copyright Jonathan Graehl 2004.
-// (C) Copyright Jorge Lodos 2008.
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
-// knows that we are building the library (possibly exporting code), rather
-// than using it (possibly importing code).
-#define BOOST_IOSTREAMS_SOURCE
-
-#include <cassert>
-#include <boost/iostreams/detail/config/rtl.hpp>
-#include <boost/iostreams/detail/config/windows_posix.hpp>
-#include <boost/iostreams/detail/file_handle.hpp>
-#include <boost/iostreams/detail/system_failure.hpp>
-#include <boost/iostreams/device/mapped_file.hpp>
-#include <boost/throw_exception.hpp>
-
-#ifdef BOOST_IOSTREAMS_WINDOWS
-# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
-# include <windows.h>
-#else
-# include <errno.h>
-# include <fcntl.h>
-# include <sys/mman.h> // mmap, munmap.
-# include <sys/stat.h>
-# include <sys/types.h> // struct stat.
-# include <unistd.h> // sysconf.
-#endif
-
-namespace boost { namespace iostreams {
-
-namespace detail {
-
-// Class containing the platform-sepecific implementation
-// Invariant: The members params_, data_, size_, handle_ (and mapped_handle_
-// on Windows) either
-// - all have default values (or INVALID_HANDLE_VALUE for
-// Windows handles), or
-// - all have values reflecting a successful mapping.
-// In the first case, error_ may be true, reflecting a recent unsuccessful
-// open or close attempt; in the second case, error_ is always false.
-class mapped_file_impl {
-public:
- typedef mapped_file_source::size_type size_type;
- typedef mapped_file_source::param_type param_type;
- typedef mapped_file_source::mapmode mapmode;
- BOOST_STATIC_CONSTANT(
- size_type, max_length = mapped_file_source::max_length);
- mapped_file_impl();
- ~mapped_file_impl();
- void open(param_type p);
- bool is_open() const { return data_ != 0; }
- void close();
- bool error() const { return error_; }
- mapmode flags() const { return params_.flags; }
- std::size_t size() const { return static_cast<std::size_t>(size_); }
- char* data() const { return data_; }
- void resize(stream_offset new_size);
- static int alignment();
-private:
- void open_file(param_type p);
- void try_map_file(param_type p);
- void map_file(param_type& p);
- bool unmap_file();
- void clear(bool error);
- void cleanup_and_throw(const char* msg);
- param_type params_;
- char* data_;
- stream_offset size_;
- file_handle handle_;
-#ifdef BOOST_IOSTREAMS_WINDOWS
- file_handle mapped_handle_;
-#endif
- bool error_;
-};
-
-mapped_file_impl::mapped_file_impl() { clear(false); }
-
-mapped_file_impl::~mapped_file_impl()
-{ try { close(); } catch (...) { } }
-
-void mapped_file_impl::open(param_type p)
-{
- if (is_open())
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("file already open"));
- p.normalize();
- open_file(p);
- map_file(p); // May modify p.hint
- params_ = p;
-}
-
-void mapped_file_impl::close()
-{
- if (data_ == 0)
- return;
- bool error = false;
- error = !unmap_file() || error;
- error =
- #ifdef BOOST_IOSTREAMS_WINDOWS
- !::CloseHandle(handle_)
- #else
- ::close(handle_) != 0
- #endif
- || error;
- clear(error);
- if (error)
- throw_system_failure("failed closing mapped file");
-}
-
-void mapped_file_impl::resize(stream_offset new_size)
-{
- if (!is_open())
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("file is closed"));
- if (flags() & mapped_file::priv)
- boost::throw_exception(
- BOOST_IOSTREAMS_FAILURE("can't resize private mapped file")
- );
- if (!(flags() & mapped_file::readwrite))
- boost::throw_exception(
- BOOST_IOSTREAMS_FAILURE("can't resize readonly mapped file")
- );
- if (params_.offset >= new_size)
- boost::throw_exception(
- BOOST_IOSTREAMS_FAILURE("can't resize below mapped offset")
- );
- if (!unmap_file())
- cleanup_and_throw("failed unmapping file");
-#ifdef BOOST_IOSTREAMS_WINDOWS
- stream_offset offset = ::SetFilePointer(handle_, 0, NULL, FILE_CURRENT);
- if (offset == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR)
- cleanup_and_throw("failed querying file pointer");
- LONG sizehigh = (new_size >> (sizeof(LONG) * 8));
- LONG sizelow = (new_size & 0xffffffff);
- DWORD result = ::SetFilePointer(handle_, sizelow, &sizehigh, FILE_BEGIN);
- if ((result == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR)
- || !::SetEndOfFile(handle_))
- cleanup_and_throw("failed resizing mapped file");
- sizehigh = (offset >> (sizeof(LONG) * 8));
- sizelow = (offset & 0xffffffff);
- ::SetFilePointer(handle_, sizelow, &sizehigh, FILE_BEGIN);
-#else
- if (BOOST_IOSTREAMS_FD_TRUNCATE(handle_, new_size) == -1)
- cleanup_and_throw("failed resizing mapped file");
-#endif
- size_ = new_size;
- param_type p(params_);
- map_file(p); // May modify p.hint
- params_ = p;
-}
-
-int mapped_file_impl::alignment()
-{
-#ifdef BOOST_IOSTREAMS_WINDOWS
- SYSTEM_INFO info;
- ::GetSystemInfo(&info);
- return static_cast<int>(info.dwAllocationGranularity);
-#else
- return static_cast<int>(sysconf(_SC_PAGESIZE));
-#endif
-}
-
-void mapped_file_impl::open_file(param_type p)
-{
- bool readonly = p.flags != mapped_file::readwrite;
-#ifdef BOOST_IOSTREAMS_WINDOWS
-
- // Open file
- DWORD dwDesiredAccess =
- readonly ?
- GENERIC_READ :
- (GENERIC_READ | GENERIC_WRITE);
- DWORD dwCreationDisposition = (p.new_file_size != 0 && !readonly) ?
- CREATE_ALWAYS :
- OPEN_EXISTING;
- DWORD dwFlagsandAttributes =
- readonly ?
- FILE_ATTRIBUTE_READONLY :
- FILE_ATTRIBUTE_TEMPORARY;
- handle_ = p.path.is_wide() ?
- ::CreateFileW(
- p.path.c_wstr(),
- dwDesiredAccess,
- FILE_SHARE_READ,
- NULL,
- dwCreationDisposition,
- dwFlagsandAttributes,
- NULL ) :
- ::CreateFileA(
- p.path.c_str(),
- dwDesiredAccess,
- FILE_SHARE_READ,
- NULL,
- dwCreationDisposition,
- dwFlagsandAttributes,
- NULL );
- if (handle_ == INVALID_HANDLE_VALUE)
- cleanup_and_throw("failed opening file");
-
- // Set file size
- if (p.new_file_size != 0 && !readonly) {
- LONG sizehigh = (p.new_file_size >> (sizeof(LONG) * 8));
- LONG sizelow = (p.new_file_size & 0xffffffff);
- DWORD result = ::SetFilePointer(handle_, sizelow, &sizehigh, FILE_BEGIN);
- if ((result == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR)
- || !::SetEndOfFile(handle_))
- cleanup_and_throw("failed setting file size");
- }
-
- // Determine file size. Dynamically locate GetFileSizeEx for compatibility
- // with old Platform SDK (thanks to Pavel Vozenilik).
- typedef BOOL (WINAPI *func)(HANDLE, PLARGE_INTEGER);
- HMODULE hmod = ::GetModuleHandleA("kernel32.dll");
- func get_size =
- reinterpret_cast<func>(::GetProcAddress(hmod, "GetFileSizeEx"));
- if (get_size) {
- LARGE_INTEGER info;
- if (get_size(handle_, &info)) {
- boost::intmax_t size =
- ( (static_cast<boost::intmax_t>(info.HighPart) << 32) |
- info.LowPart );
- size_ =
- static_cast<std::size_t>(
- p.length != max_length ?
- std::min<boost::intmax_t>(p.length, size) :
- size
- );
- } else {
- cleanup_and_throw("failed querying file size");
- return;
- }
- } else {
- DWORD hi;
- DWORD low;
- if ( (low = ::GetFileSize(handle_, &hi))
- !=
- INVALID_FILE_SIZE )
- {
- boost::intmax_t size =
- (static_cast<boost::intmax_t>(hi) << 32) | low;
- size_ =
- static_cast<std::size_t>(
- p.length != max_length ?
- std::min<boost::intmax_t>(p.length, size) :
- size
- );
- } else {
- cleanup_and_throw("failed querying file size");
- return;
- }
- }
-#else // #ifdef BOOST_IOSTREAMS_WINDOWS
-
- // Open file
- int flags = (readonly ? O_RDONLY : O_RDWR);
- if (p.new_file_size != 0 && !readonly)
- flags |= (O_CREAT | O_TRUNC);
- #ifdef _LARGEFILE64_SOURCE
- flags |= O_LARGEFILE;
- #endif
- errno = 0;
- handle_ = ::open(p.path.c_str(), flags, S_IRWXU);
- if (errno != 0)
- cleanup_and_throw("failed opening file");
-
- //--------------Set file size---------------------------------------------//
-
- if (p.new_file_size != 0 && !readonly)
- if (BOOST_IOSTREAMS_FD_TRUNCATE(handle_, p.new_file_size) == -1)
- cleanup_and_throw("failed setting file size");
-
- //--------------Determine file size---------------------------------------//
-
- bool success = true;
- if (p.length != max_length) {
- size_ = p.length;
- } else {
- struct BOOST_IOSTREAMS_FD_STAT info;
- success = ::BOOST_IOSTREAMS_FD_FSTAT(handle_, &info) != -1;
- size_ = info.st_size;
- }
- if (!success)
- cleanup_and_throw("failed querying file size");
-#endif // #ifdef BOOST_IOSTREAMS_WINDOWS
-}
-
-void mapped_file_impl::try_map_file(param_type p)
-{
- bool priv = p.flags == mapped_file::priv;
- bool readonly = p.flags == mapped_file::readonly;
-#ifdef BOOST_IOSTREAMS_WINDOWS
-
- // Create mapping
- DWORD protect = priv ?
- PAGE_WRITECOPY :
- readonly ?
- PAGE_READONLY :
- PAGE_READWRITE;
- mapped_handle_ =
- ::CreateFileMappingA(
- handle_,
- NULL,
- protect,
- 0,
- 0,
- NULL );
- if (mapped_handle_ == NULL)
- cleanup_and_throw("failed create mapping");
-
- // Access data
- DWORD access = priv ?
- FILE_MAP_COPY :
- readonly ?
- FILE_MAP_READ :
- FILE_MAP_WRITE;
- void* data =
- ::MapViewOfFileEx(
- mapped_handle_,
- access,
- (DWORD) (p.offset >> 32),
- (DWORD) (p.offset & 0xffffffff),
- (SIZE_T) (size_ != max_length ? size_ : 0),
- (LPVOID) p.hint );
- if (!data)
- cleanup_and_throw("failed mapping view");
-#else
- void* data =
- ::BOOST_IOSTREAMS_FD_MMAP(
- const_cast<char*>(p.hint),
- size_,
- readonly ? PROT_READ : (PROT_READ | PROT_WRITE),
- priv ? MAP_PRIVATE : MAP_SHARED,
- handle_,
- p.offset );
- if (data == MAP_FAILED)
- cleanup_and_throw("failed mapping file");
-#endif
- data_ = static_cast<char*>(data);
-}
-
-void mapped_file_impl::map_file(param_type& p)
-{
- try {
- try_map_file(p);
- } catch (const std::exception&) {
- if (p.hint) {
- p.hint = 0;
- try_map_file(p);
- } else {
- throw;
- }
- }
-}
-
-bool mapped_file_impl::unmap_file()
-{
-#ifdef BOOST_IOSTREAMS_WINDOWS
- bool error = false;
- error = !::UnmapViewOfFile(data_) || error;
- error = !::CloseHandle(mapped_handle_) || error;
- mapped_handle_ = NULL;
- return !error;
-#else
- return ::munmap(data_, size_) == 0;
-#endif
-}
-
-void mapped_file_impl::clear(bool error)
-{
- params_ = param_type();
- data_ = 0;
- size_ = 0;
-#ifdef BOOST_IOSTREAMS_WINDOWS
- handle_ = INVALID_HANDLE_VALUE;
- mapped_handle_ = NULL;
-#else
- handle_ = 0;
-#endif
- error_ = error;
-}
-
-// Called when an error is encountered during the execution of open_file or
-// map_file
-void mapped_file_impl::cleanup_and_throw(const char* msg)
-{
-#ifdef BOOST_IOSTREAMS_WINDOWS
- DWORD error = GetLastError();
- if (mapped_handle_ != NULL)
- ::CloseHandle(mapped_handle_);
- if (handle_ != INVALID_HANDLE_VALUE)
- ::CloseHandle(handle_);
- SetLastError(error);
-#else
- int error = errno;
- if (handle_ != 0)
- ::close(handle_);
- errno = error;
-#endif
- clear(true);
- boost::iostreams::detail::throw_system_failure(msg);
-}
-
-//------------------Implementation of mapped_file_params_base-----------------//
-
-void mapped_file_params_base::normalize()
-{
- if (mode && flags)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE(
- "at most one of 'mode' and 'flags' may be specified"
- ));
- if (flags) {
- switch (flags) {
- case mapped_file::readonly:
- case mapped_file::readwrite:
- case mapped_file::priv:
- break;
- default:
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags"));
- }
- } else {
- flags = (mode & BOOST_IOS::out) ?
- mapped_file::readwrite :
- mapped_file::readonly;
- mode = BOOST_IOS::openmode();
- }
- if (offset < 0)
- boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid offset"));
- if (new_file_size < 0)
- boost::throw_exception(
- BOOST_IOSTREAMS_FAILURE("invalid new file size")
- );
-}
-
-} // End namespace detail.
-
-//------------------Implementation of mapped_file_source----------------------//
-
-mapped_file_source::mapped_file_source()
- : pimpl_(new impl_type)
- { }
-
-mapped_file_source::mapped_file_source(const mapped_file_source& other)
- : pimpl_(other.pimpl_)
- { }
-
-bool mapped_file_source::is_open() const
-{ return pimpl_->is_open(); }
-
-void mapped_file_source::close() { pimpl_->close(); }
-
-// safe_bool is explicitly qualified below to please msvc 7.1
-mapped_file_source::operator mapped_file_source::safe_bool() const
-{ return pimpl_->error() ? &safe_bool_helper::x : 0; }
-
-bool mapped_file_source::operator!() const
-{ return pimpl_->error(); }
-
-mapped_file_source::mapmode mapped_file_source::flags() const
-{ return pimpl_->flags(); }
-
-mapped_file_source::size_type mapped_file_source::size() const
-{ return pimpl_->size(); }
-
-const char* mapped_file_source::data() const { return pimpl_->data(); }
-
-const char* mapped_file_source::begin() const { return data(); }
-
-const char* mapped_file_source::end() const { return data() + size(); }
-int mapped_file_source::alignment()
-{ return detail::mapped_file_impl::alignment(); }
-
-void mapped_file_source::init() { pimpl_.reset(new impl_type); }
-
-void mapped_file_source::open_impl(const param_type& p)
-{ pimpl_->open(p); }
-
-//------------------Implementation of mapped_file-----------------------------//
-
-mapped_file::mapped_file(const mapped_file& other)
- : delegate_(other.delegate_)
- { }
-
-void mapped_file::resize(stream_offset new_size)
-{ delegate_.pimpl_->resize(new_size); }
-
-//------------------Implementation of mapped_file_sink------------------------//
-
-mapped_file_sink::mapped_file_sink(const mapped_file_sink& other)
- : mapped_file(static_cast<const mapped_file&>(other))
- { }
-
-//----------------------------------------------------------------------------//
-
-} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.68.0/libs/iostreams/src/zlib.cpp b/src/third_party/boost-1.68.0/libs/iostreams/src/zlib.cpp
deleted file mode 100644
index 3dd7b1a89c4..00000000000
--- a/src/third_party/boost-1.68.0/libs/iostreams/src/zlib.cpp
+++ /dev/null
@@ -1,187 +0,0 @@
-// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
-// (C) Copyright 2003-2007 Jonathan Turkanis
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
-
-// See http://www.boost.org/libs/iostreams for documentation.
-
-// To configure Boost to work with zlib, see the
-// installation instructions here:
-// http://boost.org/libs/iostreams/doc/index.html?path=7
-
-// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
-// knows that we are building the library (possibly exporting code), rather
-// than using it (possibly importing code).
-#define BOOST_IOSTREAMS_SOURCE
-
-#include <boost/throw_exception.hpp>
-#include <boost/iostreams/detail/config/dyn_link.hpp>
-#include <boost/iostreams/filter/zlib.hpp>
-#include "zlib.h" // Jean-loup Gailly's and Mark Adler's "zlib.h" header.
- // To configure Boost to work with zlib, see the
- // installation instructions here:
- // http://boost.org/libs/iostreams/doc/index.html?path=7
-
-namespace boost { namespace iostreams {
-
-namespace zlib {
-
- // Compression levels
-
-const int no_compression = Z_NO_COMPRESSION;
-const int best_speed = Z_BEST_SPEED;
-const int best_compression = Z_BEST_COMPRESSION;
-const int default_compression = Z_DEFAULT_COMPRESSION;
-
- // Compression methods
-
-const int deflated = Z_DEFLATED;
-
- // Compression strategies
-
-const int default_strategy = Z_DEFAULT_STRATEGY;
-const int filtered = Z_FILTERED;
-const int huffman_only = Z_HUFFMAN_ONLY;
-
- // Status codes
-
-const int okay = Z_OK;
-const int stream_end = Z_STREAM_END;
-const int stream_error = Z_STREAM_ERROR;
-const int version_error = Z_VERSION_ERROR;
-const int data_error = Z_DATA_ERROR;
-const int mem_error = Z_MEM_ERROR;
-const int buf_error = Z_BUF_ERROR;
-
- // Flush codes
-
-const int finish = Z_FINISH;
-const int no_flush = Z_NO_FLUSH;
-const int sync_flush = Z_SYNC_FLUSH;
-
- // Code for current OS
-
-//const int os_code = OS_CODE;
-
-} // End namespace zlib.
-
-//------------------Implementation of zlib_error------------------------------//
-
-zlib_error::zlib_error(int error)
- : BOOST_IOSTREAMS_FAILURE("zlib error"), error_(error)
- { }
-
-void zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)
-{
- switch (error) {
- case Z_OK:
- case Z_STREAM_END:
- //case Z_BUF_ERROR:
- return;
- case Z_MEM_ERROR:
- boost::throw_exception(std::bad_alloc());
- default:
- boost::throw_exception(zlib_error(error));
- ;
- }
-}
-
-//------------------Implementation of zlib_base-------------------------------//
-
-namespace detail {
-
-zlib_base::zlib_base()
- : stream_(new z_stream), calculate_crc_(false), crc_(0), crc_imp_(0)
- { }
-
-zlib_base::~zlib_base() { delete static_cast<z_stream*>(stream_); }
-
-void zlib_base::before( const char*& src_begin, const char* src_end,
- char*& dest_begin, char* dest_end )
-{
- z_stream* s = static_cast<z_stream*>(stream_);
- s->next_in = reinterpret_cast<zlib::byte*>(const_cast<char*>(src_begin));
- s->avail_in = static_cast<zlib::uint>(src_end - src_begin);
- s->next_out = reinterpret_cast<zlib::byte*>(dest_begin);
- s->avail_out= static_cast<zlib::uint>(dest_end - dest_begin);
-}
-
-void zlib_base::after(const char*& src_begin, char*& dest_begin, bool compress)
-{
- z_stream* s = static_cast<z_stream*>(stream_);
- const char* next_in = reinterpret_cast<const char*>(s->next_in);
- char* next_out = reinterpret_cast<char*>(s->next_out);
- if (calculate_crc_) {
- const zlib::byte* buf = compress ?
- reinterpret_cast<const zlib::byte*>(src_begin) :
- reinterpret_cast<const zlib::byte*>(
- const_cast<const char*>(dest_begin)
- );
- zlib::uint length = compress ?
- static_cast<zlib::uint>(next_in - src_begin) :
- static_cast<zlib::uint>(next_out - dest_begin);
- crc_ = crc_imp_ = crc32(crc_imp_, buf, length);
- }
- total_in_ = s->total_in;
- total_out_ = s->total_out;
- src_begin = next_in;
- dest_begin = next_out;
-}
-
-int zlib_base::xdeflate(int flush)
-{
- return ::deflate(static_cast<z_stream*>(stream_), flush);
-}
-
-int zlib_base::xinflate(int flush)
-{
- return ::inflate(static_cast<z_stream*>(stream_), flush);
-}
-
-void zlib_base::reset(bool compress, bool realloc)
-{
- z_stream* s = static_cast<z_stream*>(stream_);
- // Undiagnosed bug:
- // deflateReset(), etc., return Z_DATA_ERROR
- //zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
- realloc ?
- (compress ? deflateReset(s) : inflateReset(s)) :
- (compress ? deflateEnd(s) : inflateEnd(s))
- ;
- //);
- crc_imp_ = 0;
-}
-
-void zlib_base::do_init
- ( const zlib_params& p, bool compress,
- zlib::xalloc_func /* alloc */, zlib::xfree_func /* free*/,
- void* derived )
-{
- calculate_crc_ = p.calculate_crc;
- z_stream* s = static_cast<z_stream*>(stream_);
-
- // Current interface for customizing memory management
- // is non-conforming and has been disabled:
- // s->zalloc = alloc;
- // s->zfree = free;
- s->zalloc = 0;
- s->zfree = 0;
- s->opaque = derived;
- int window_bits = p.noheader? -p.window_bits : p.window_bits;
- zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
- compress ?
- deflateInit2( s,
- p.level,
- p.method,
- window_bits,
- p.mem_level,
- p.strategy ) :
- inflateInit2(s, window_bits)
- );
-}
-
-} // End namespace detail.
-
-//----------------------------------------------------------------------------//
-
-} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/cregex.cpp b/src/third_party/boost-1.68.0/libs/regex/src/cregex.cpp
deleted file mode 100644
index 01efc3f3bef..00000000000
--- a/src/third_party/boost-1.68.0/libs/regex/src/cregex.cpp
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE: cregex.cpp
- * VERSION: see <boost/version.hpp>
- * DESCRIPTION: Implements high level class boost::RexEx
- */
-
-
-#define BOOST_REGEX_SOURCE
-
-#include <boost/regex.hpp>
-#include <boost/cregex.hpp>
-#if !defined(BOOST_NO_STD_STRING)
-#include <map>
-#include <list>
-#include <boost/regex/v4/fileiter.hpp>
-typedef boost::match_flag_type match_flag_type;
-#include <cstdio>
-
-#ifdef BOOST_MSVC
-#pragma warning(disable:4309)
-#endif
-#ifdef BOOST_INTEL
-#pragma warning(disable:981 383)
-#endif
-
-namespace boost{
-
-#ifdef __BORLANDC__
-#if __BORLANDC__ < 0x530
-//
-// we need to instantiate the vector classes we use
-// since declaring a reference to type doesn't seem to
-// do the job...
-std::vector<std::size_t> inst1;
-std::vector<std::string> inst2;
-#endif
-#endif
-
-namespace{
-
-template <class iterator>
-std::string to_string(iterator i, iterator j)
-{
- std::string s;
- while(i != j)
- {
- s.append(1, *i);
- ++i;
- }
- return s;
-}
-
-inline std::string to_string(const char* i, const char* j)
-{
- return std::string(i, j);
-}
-
-}
-namespace BOOST_REGEX_DETAIL_NS{
-
-class RegExData
-{
-public:
- enum type
- {
- type_pc,
- type_pf,
- type_copy
- };
- regex e;
- cmatch m;
-#ifndef BOOST_REGEX_NO_FILEITER
- match_results<mapfile::iterator> fm;
-#endif
- type t;
- const char* pbase;
-#ifndef BOOST_REGEX_NO_FILEITER
- mapfile::iterator fbase;
-#endif
- std::map<int, std::string, std::less<int> > strings;
- std::map<int, std::ptrdiff_t, std::less<int> > positions;
- void update();
- void clean();
- RegExData() : e(), m(),
-#ifndef BOOST_REGEX_NO_FILEITER
- fm(),
-#endif
- t(type_copy), pbase(0),
-#ifndef BOOST_REGEX_NO_FILEITER
- fbase(),
-#endif
- strings(), positions() {}
-};
-
-void RegExData::update()
-{
- strings.erase(strings.begin(), strings.end());
- positions.erase(positions.begin(), positions.end());
- if(t == type_pc)
- {
- for(unsigned int i = 0; i < m.size(); ++i)
- {
- if(m[i].matched) strings[i] = std::string(m[i].first, m[i].second);
- positions[i] = m[i].matched ? m[i].first - pbase : -1;
- }
- }
-#ifndef BOOST_REGEX_NO_FILEITER
- else
- {
- for(unsigned int i = 0; i < fm.size(); ++i)
- {
- if(fm[i].matched) strings[i] = to_string(fm[i].first, fm[i].second);
- positions[i] = fm[i].matched ? fm[i].first - fbase : -1;
- }
- }
-#endif
- t = type_copy;
-}
-
-void RegExData::clean()
-{
-#ifndef BOOST_REGEX_NO_FILEITER
- fbase = mapfile::iterator();
- fm = match_results<mapfile::iterator>();
-#endif
-}
-
-} // namespace
-
-RegEx::RegEx()
-{
- pdata = new BOOST_REGEX_DETAIL_NS::RegExData();
-}
-
-RegEx::RegEx(const RegEx& o)
-{
- pdata = new BOOST_REGEX_DETAIL_NS::RegExData(*(o.pdata));
-}
-
-RegEx::~RegEx()
-{
- delete pdata;
-}
-
-RegEx::RegEx(const char* c, bool icase)
-{
- pdata = new BOOST_REGEX_DETAIL_NS::RegExData();
- SetExpression(c, icase);
-}
-
-RegEx::RegEx(const std::string& s, bool icase)
-{
- pdata = new BOOST_REGEX_DETAIL_NS::RegExData();
- SetExpression(s.c_str(), icase);
-}
-
-RegEx& RegEx::operator=(const RegEx& o)
-{
- *pdata = *(o.pdata);
- return *this;
-}
-
-RegEx& RegEx::operator=(const char* p)
-{
- SetExpression(p, false);
- return *this;
-}
-
-unsigned int RegEx::SetExpression(const char* p, bool icase)
-{
- boost::uint_fast32_t f = icase ? regex::normal | regex::icase : regex::normal;
- return pdata->e.set_expression(p, f);
-}
-
-unsigned int RegEx::error_code()const
-{
- return pdata->e.error_code();
-}
-
-
-std::string RegEx::Expression()const
-{
- return pdata->e.expression();
-}
-
-//
-// now matching operators:
-//
-bool RegEx::Match(const char* p, match_flag_type flags)
-{
- pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
- pdata->pbase = p;
- const char* end = p;
- while(*end)++end;
-
- if(regex_match(p, end, pdata->m, pdata->e, flags))
- {
- pdata->update();
- return true;
- }
- return false;
-}
-
-bool RegEx::Search(const char* p, match_flag_type flags)
-{
- pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
- pdata->pbase = p;
- const char* end = p;
- while(*end)++end;
-
- if(regex_search(p, end, pdata->m, pdata->e, flags))
- {
- pdata->update();
- return true;
- }
- return false;
-}
-namespace BOOST_REGEX_DETAIL_NS{
-struct pred1
-{
- GrepCallback cb;
- RegEx* pe;
- pred1(GrepCallback c, RegEx* i) : cb(c), pe(i) {}
- bool operator()(const cmatch& m)
- {
- pe->pdata->m = m;
- return cb(*pe);
- }
-};
-}
-unsigned int RegEx::Grep(GrepCallback cb, const char* p, match_flag_type flags)
-{
- pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
- pdata->pbase = p;
- const char* end = p;
- while(*end)++end;
-
- unsigned int result = regex_grep(BOOST_REGEX_DETAIL_NS::pred1(cb, this), p, end, pdata->e, flags);
- if(result)
- pdata->update();
- return result;
-}
-namespace BOOST_REGEX_DETAIL_NS{
-struct pred2
-{
- std::vector<std::string>& v;
- RegEx* pe;
- pred2(std::vector<std::string>& o, RegEx* e) : v(o), pe(e) {}
- bool operator()(const cmatch& m)
- {
- pe->pdata->m = m;
- v.push_back(std::string(m[0].first, m[0].second));
- return true;
- }
-private:
- pred2& operator=(const pred2&);
-};
-}
-
-unsigned int RegEx::Grep(std::vector<std::string>& v, const char* p, match_flag_type flags)
-{
- pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
- pdata->pbase = p;
- const char* end = p;
- while(*end)++end;
-
- unsigned int result = regex_grep(BOOST_REGEX_DETAIL_NS::pred2(v, this), p, end, pdata->e, flags);
- if(result)
- pdata->update();
- return result;
-}
-namespace BOOST_REGEX_DETAIL_NS{
-struct pred3
-{
- std::vector<std::size_t>& v;
- const char* base;
- RegEx* pe;
- pred3(std::vector<std::size_t>& o, const char* pb, RegEx* p) : v(o), base(pb), pe(p) {}
- bool operator()(const cmatch& m)
- {
- pe->pdata->m = m;
- v.push_back(static_cast<std::size_t>(m[0].first - base));
- return true;
- }
-private:
- pred3& operator=(const pred3&);
-};
-}
-unsigned int RegEx::Grep(std::vector<std::size_t>& v, const char* p, match_flag_type flags)
-{
- pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
- pdata->pbase = p;
- const char* end = p;
- while(*end)++end;
-
- unsigned int result = regex_grep(BOOST_REGEX_DETAIL_NS::pred3(v, p, this), p, end, pdata->e, flags);
- if(result)
- pdata->update();
- return result;
-}
-#ifndef BOOST_REGEX_NO_FILEITER
-namespace BOOST_REGEX_DETAIL_NS{
-struct pred4
-{
- GrepFileCallback cb;
- RegEx* pe;
- const char* file;
- bool ok;
- pred4(GrepFileCallback c, RegEx* i, const char* f) : cb(c), pe(i), file(f), ok(true) {}
- bool operator()(const match_results<mapfile::iterator>& m)
- {
- pe->pdata->t = RegExData::type_pf;
- pe->pdata->fm = m;
- pe->pdata->update();
- ok = cb(file, *pe);
- return ok;
- }
-};
-}
-namespace{
-void BuildFileList(std::list<std::string>* pl, const char* files, bool recurse)
-{
- file_iterator start(files);
- file_iterator end;
- if(recurse)
- {
- // go through sub directories:
- char buf[MAX_PATH];
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(buf, MAX_PATH, start.root()));
- if(*buf == 0)
- {
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(buf, MAX_PATH, "."));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(buf, MAX_PATH, directory_iterator::separator()));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(buf, MAX_PATH, "*"));
- }
- else
- {
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(buf, MAX_PATH, directory_iterator::separator()));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(buf, MAX_PATH, "*"));
- }
- directory_iterator dstart(buf);
- directory_iterator dend;
-
- // now get the file mask bit of "files":
- const char* ptr = files;
- while(*ptr) ++ptr;
- while((ptr != files) && (*ptr != *directory_iterator::separator()) && (*ptr != '/'))--ptr;
- if(ptr != files) ++ptr;
-
- while(dstart != dend)
- {
- // Verify that sprintf will not overflow:
- if(std::strlen(dstart.path()) + std::strlen(directory_iterator::separator()) + std::strlen(ptr) >= MAX_PATH)
- {
- // Oops overflow, skip this item:
- ++dstart;
- continue;
- }
-#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
- int r = (::sprintf_s)(buf, sizeof(buf), "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
-#else
- int r = (std::sprintf)(buf, "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
-#endif
- if(r < 0)
- {
- // sprintf failed, skip this item:
- ++dstart;
- continue;
- }
- BuildFileList(pl, buf, recurse);
- ++dstart;
- }
- }
- while(start != end)
- {
- pl->push_back(*start);
- ++start;
- }
-}
-}
-
-unsigned int RegEx::GrepFiles(GrepFileCallback cb, const char* files, bool recurse, match_flag_type flags)
-{
- unsigned int result = 0;
- std::list<std::string> file_list;
- BuildFileList(&file_list, files, recurse);
- std::list<std::string>::iterator start, end;
- start = file_list.begin();
- end = file_list.end();
-
- while(start != end)
- {
- mapfile map((*start).c_str());
- pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pf;
- pdata->fbase = map.begin();
- BOOST_REGEX_DETAIL_NS::pred4 pred(cb, this, (*start).c_str());
- int r = regex_grep(pred, map.begin(), map.end(), pdata->e, flags);
- result += r;
- ++start;
- pdata->clean();
- if(pred.ok == false)
- return result;
- }
-
- return result;
-}
-
-
-unsigned int RegEx::FindFiles(FindFilesCallback cb, const char* files, bool recurse, match_flag_type flags)
-{
- unsigned int result = 0;
- std::list<std::string> file_list;
- BuildFileList(&file_list, files, recurse);
- std::list<std::string>::iterator start, end;
- start = file_list.begin();
- end = file_list.end();
-
- while(start != end)
- {
- mapfile map((*start).c_str());
- pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pf;
- pdata->fbase = map.begin();
-
- if(regex_search(map.begin(), map.end(), pdata->fm, pdata->e, flags))
- {
- ++result;
- if(false == cb((*start).c_str()))
- return result;
- }
- //pdata->update();
- ++start;
- //pdata->clean();
- }
-
- return result;
-}
-#endif
-
-#ifdef BOOST_REGEX_V3
-#define regex_replace regex_merge
-#endif
-
-std::string RegEx::Merge(const std::string& in, const std::string& fmt,
- bool copy, match_flag_type flags)
-{
- std::string result;
- BOOST_REGEX_DETAIL_NS::string_out_iterator<std::string> i(result);
- if(!copy) flags |= format_no_copy;
- regex_replace(i, in.begin(), in.end(), pdata->e, fmt.c_str(), flags);
- return result;
-}
-
-std::string RegEx::Merge(const char* in, const char* fmt,
- bool copy, match_flag_type flags)
-{
- std::string result;
- if(!copy) flags |= format_no_copy;
- BOOST_REGEX_DETAIL_NS::string_out_iterator<std::string> i(result);
- regex_replace(i, in, in + std::strlen(in), pdata->e, fmt, flags);
- return result;
-}
-
-std::size_t RegEx::Split(std::vector<std::string>& v,
- std::string& s,
- match_flag_type flags,
- unsigned max_count)
-{
- return regex_split(std::back_inserter(v), s, pdata->e, flags, max_count);
-}
-
-
-
-//
-// now operators for returning what matched in more detail:
-//
-std::size_t RegEx::Position(int i)const
-{
- switch(pdata->t)
- {
- case BOOST_REGEX_DETAIL_NS::RegExData::type_pc:
- return pdata->m[i].matched ? pdata->m[i].first - pdata->pbase : RegEx::npos;
-#ifndef BOOST_REGEX_NO_FILEITER
- case BOOST_REGEX_DETAIL_NS::RegExData::type_pf:
- return pdata->fm[i].matched ? pdata->fm[i].first - pdata->fbase : RegEx::npos;
-#endif
- case BOOST_REGEX_DETAIL_NS::RegExData::type_copy:
- {
- std::map<int, std::ptrdiff_t, std::less<int> >::iterator pos = pdata->positions.find(i);
- if(pos == pdata->positions.end())
- return RegEx::npos;
- return (*pos).second;
- }
- }
- return RegEx::npos;
-}
-
-std::size_t RegEx::Marks()const
-{
- return pdata->e.mark_count();
-}
-
-
-std::size_t RegEx::Length(int i)const
-{
- switch(pdata->t)
- {
- case BOOST_REGEX_DETAIL_NS::RegExData::type_pc:
- return pdata->m[i].matched ? pdata->m[i].second - pdata->m[i].first : RegEx::npos;
-#ifndef BOOST_REGEX_NO_FILEITER
- case BOOST_REGEX_DETAIL_NS::RegExData::type_pf:
- return pdata->fm[i].matched ? pdata->fm[i].second - pdata->fm[i].first : RegEx::npos;
-#endif
- case BOOST_REGEX_DETAIL_NS::RegExData::type_copy:
- {
- std::map<int, std::string, std::less<int> >::iterator pos = pdata->strings.find(i);
- if(pos == pdata->strings.end())
- return RegEx::npos;
- return (*pos).second.size();
- }
- }
- return RegEx::npos;
-}
-
-bool RegEx::Matched(int i)const
-{
- switch(pdata->t)
- {
- case BOOST_REGEX_DETAIL_NS::RegExData::type_pc:
- return pdata->m[i].matched;
-#ifndef BOOST_REGEX_NO_FILEITER
- case BOOST_REGEX_DETAIL_NS::RegExData::type_pf:
- return pdata->fm[i].matched;
-#endif
- case BOOST_REGEX_DETAIL_NS::RegExData::type_copy:
- {
- std::map<int, std::string, std::less<int> >::iterator pos = pdata->strings.find(i);
- if(pos == pdata->strings.end())
- return false;
- return true;
- }
- }
- return false;
-}
-
-
-std::string RegEx::What(int i)const
-{
- std::string result;
- switch(pdata->t)
- {
- case BOOST_REGEX_DETAIL_NS::RegExData::type_pc:
- if(pdata->m[i].matched)
- result.assign(pdata->m[i].first, pdata->m[i].second);
- break;
- case BOOST_REGEX_DETAIL_NS::RegExData::type_pf:
- if(pdata->m[i].matched)
- result.assign(to_string(pdata->m[i].first, pdata->m[i].second));
- break;
- case BOOST_REGEX_DETAIL_NS::RegExData::type_copy:
- {
- std::map<int, std::string, std::less<int> >::iterator pos = pdata->strings.find(i);
- if(pos != pdata->strings.end())
- result = (*pos).second;
- break;
- }
- }
- return result;
-}
-
-const std::size_t RegEx::npos = ~static_cast<std::size_t>(0);
-
-} // namespace boost
-
-#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) && (__BORLANDC__ <= 0x551) && !defined(_RWSTD_COMPILE_INSTANTIATE)
-//
-// this is an ugly hack to work around an ugly problem:
-// by default this file will produce unresolved externals during
-// linking unless _RWSTD_COMPILE_INSTANTIATE is defined (Borland bug).
-// However if _RWSTD_COMPILE_INSTANTIATE is defined then we get separate
-// copies of basic_string's static data in the RTL and this DLL, this messes
-// with basic_string's memory management and results in run-time crashes,
-// Oh sweet joy of Catch 22....
-//
-namespace std{
-template<> template<>
-basic_string<char>& BOOST_REGEX_DECL
-basic_string<char>::replace<const char*>(char* f1, char* f2, const char* i1, const char* i2)
-{
- unsigned insert_pos = f1 - begin();
- unsigned remove_len = f2 - f1;
- unsigned insert_len = i2 - i1;
- unsigned org_size = size();
- if(insert_len > remove_len)
- {
- append(insert_len-remove_len, ' ');
- std::copy_backward(begin() + insert_pos + remove_len, begin() + org_size, end());
- std::copy(i1, i2, begin() + insert_pos);
- }
- else
- {
- std::copy(begin() + insert_pos + remove_len, begin() + org_size, begin() + insert_pos + insert_len);
- std::copy(i1, i2, begin() + insert_pos);
- erase(size() + insert_len - remove_len);
- }
- return *this;
-}
-template<> template<>
-basic_string<wchar_t>& BOOST_REGEX_DECL
-basic_string<wchar_t>::replace<const wchar_t*>(wchar_t* f1, wchar_t* f2, const wchar_t* i1, const wchar_t* i2)
-{
- unsigned insert_pos = f1 - begin();
- unsigned remove_len = f2 - f1;
- unsigned insert_len = i2 - i1;
- unsigned org_size = size();
- if(insert_len > remove_len)
- {
- append(insert_len-remove_len, ' ');
- std::copy_backward(begin() + insert_pos + remove_len, begin() + org_size, end());
- std::copy(i1, i2, begin() + insert_pos);
- }
- else
- {
- std::copy(begin() + insert_pos + remove_len, begin() + org_size, begin() + insert_pos + insert_len);
- std::copy(i1, i2, begin() + insert_pos);
- erase(size() + insert_len - remove_len);
- }
- return *this;
-}
-} // namespace std
-#endif
-
-#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/fileiter.cpp b/src/third_party/boost-1.68.0/libs/regex/src/fileiter.cpp
deleted file mode 100644
index c48ed657c11..00000000000
--- a/src/third_party/boost-1.68.0/libs/regex/src/fileiter.cpp
+++ /dev/null
@@ -1,928 +0,0 @@
-/*
- *
- * Copyright (c) 1998-2002
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE: fileiter.cpp
- * VERSION: see <boost/version.hpp>
- * DESCRIPTION: Implements file io primitives + directory searching for class boost::RegEx.
- */
-
-
-#define BOOST_REGEX_SOURCE
-
-#include <boost/config.hpp>
-#include <climits>
-#include <stdexcept>
-#include <string>
-#include <boost/throw_exception.hpp>
-#include <boost/regex/v4/fileiter.hpp>
-#include <boost/regex/v4/regex_workaround.hpp>
-#include <boost/regex/pattern_except.hpp>
-
-#include <cstdio>
-#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{
- using ::sprintf;
- using ::fseek;
- using ::fread;
- using ::ftell;
- using ::fopen;
- using ::fclose;
- using ::FILE;
- using ::strcpy;
- using ::strcpy;
- using ::strcat;
- using ::strcmp;
- using ::strlen;
-}
-#endif
-
-
-#ifndef BOOST_REGEX_NO_FILEITER
-
-#if defined(__CYGWIN__) || defined(__CYGWIN32__)
-#include <sys/cygwin.h>
-#endif
-
-#ifdef BOOST_MSVC
-# pragma warning(disable: 4800)
-#endif
-
-namespace boost{
- namespace BOOST_REGEX_DETAIL_NS{
-// start with the operating system specific stuff:
-
-#if (defined(__BORLANDC__) || defined(BOOST_REGEX_FI_WIN32_DIR) || defined(BOOST_MSVC)) && !defined(BOOST_RE_NO_WIN32)
-
-// platform is DOS or Windows
-// directories are separated with '\\'
-// and names are insensitive of case
-
-BOOST_REGEX_DECL const char* _fi_sep = "\\";
-const char* _fi_sep_alt = "/";
-#define BOOST_REGEX_FI_TRANSLATE(c) std::tolower(c)
-
-#else
-
-// platform is not DOS or Windows
-// directories are separated with '/'
-// and names are sensitive of case
-
-BOOST_REGEX_DECL const char* _fi_sep = "/";
-const char* _fi_sep_alt = _fi_sep;
-#define BOOST_REGEX_FI_TRANSLATE(c) c
-
-#endif
-
-#ifdef BOOST_REGEX_FI_WIN32_MAP
-
-void mapfile::open(const char* file)
-{
-#if defined(BOOST_NO_ANSI_APIS)
- int filename_size = strlen(file);
- LPWSTR wide_file = (LPWSTR)_alloca( (filename_size + 1) * sizeof(WCHAR) );
- if(::MultiByteToWideChar(CP_ACP, 0, file, filename_size, wide_file, filename_size + 1) == 0)
- hfile = INVALID_HANDLE_VALUE;
- else
- hfile = CreateFileW(wide_file, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
-#elif defined(__CYGWIN__)||defined(__CYGWIN32__)
- char win32file[ MAX_PATH ];
- cygwin_conv_to_win32_path( file, win32file );
- hfile = CreateFileA(win32file, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
-#else
- hfile = CreateFileA(file, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
-#endif
- if(hfile != INVALID_HANDLE_VALUE)
- {
- hmap = CreateFileMapping(hfile, 0, PAGE_READONLY, 0, 0, 0);
- if((hmap == INVALID_HANDLE_VALUE) || (hmap == NULL))
- {
- CloseHandle(hfile);
- hmap = 0;
- hfile = 0;
- std::runtime_error err("Unable to create file mapping.");
- boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
- }
- _first = static_cast<const char*>(MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0));
- if(_first == 0)
- {
- CloseHandle(hmap);
- CloseHandle(hfile);
- hmap = 0;
- hfile = 0;
- std::runtime_error err("Unable to create file mapping.");
- }
- _last = _first + GetFileSize(hfile, 0);
- }
- else
- {
- hfile = 0;
-#ifndef BOOST_NO_EXCEPTIONS
- throw std::runtime_error("Unable to open file.");
-#else
- BOOST_REGEX_NOEH_ASSERT(hfile != INVALID_HANDLE_VALUE);
-#endif
- }
-}
-
-void mapfile::close()
-{
- if(hfile != INVALID_HANDLE_VALUE)
- {
- UnmapViewOfFile((void*)_first);
- CloseHandle(hmap);
- CloseHandle(hfile);
- hmap = hfile = 0;
- _first = _last = 0;
- }
-}
-
-#elif !defined(BOOST_RE_NO_STL)
-
-mapfile_iterator& mapfile_iterator::operator = (const mapfile_iterator& i)
-{
- if(file && node)
- file->unlock(node);
- file = i.file;
- node = i.node;
- offset = i.offset;
- if(file)
- file->lock(node);
- return *this;
-}
-
-mapfile_iterator& mapfile_iterator::operator++ ()
-{
- if((++offset == mapfile::buf_size) && file)
- {
- ++node;
- offset = 0;
- file->lock(node);
- file->unlock(node-1);
- }
- return *this;
-}
-
-mapfile_iterator mapfile_iterator::operator++ (int)
-{
- mapfile_iterator temp(*this);
- if((++offset == mapfile::buf_size) && file)
- {
- ++node;
- offset = 0;
- file->lock(node);
- file->unlock(node-1);
- }
- return temp;
-}
-
-mapfile_iterator& mapfile_iterator::operator-- ()
-{
- if((offset == 0) && file)
- {
- --node;
- offset = mapfile::buf_size - 1;
- file->lock(node);
- file->unlock(node + 1);
- }
- else
- --offset;
- return *this;
-}
-
-mapfile_iterator mapfile_iterator::operator-- (int)
-{
- mapfile_iterator temp(*this);
- if((offset == 0) && file)
- {
- --node;
- offset = mapfile::buf_size - 1;
- file->lock(node);
- file->unlock(node + 1);
- }
- else
- --offset;
- return temp;
-}
-
-mapfile_iterator operator + (const mapfile_iterator& i, long off)
-{
- mapfile_iterator temp(i);
- temp += off;
- return temp;
-}
-
-mapfile_iterator operator - (const mapfile_iterator& i, long off)
-{
- mapfile_iterator temp(i);
- temp -= off;
- return temp;
-}
-
-mapfile::iterator mapfile::begin()const
-{
- return mapfile_iterator(this, 0);
-}
-
-mapfile::iterator mapfile::end()const
-{
- return mapfile_iterator(this, _size);
-}
-
-void mapfile::lock(pointer* node)const
-{
- BOOST_ASSERT(node >= _first);
- BOOST_ASSERT(node <= _last);
- if(node < _last)
- {
- if(*node == 0)
- {
- if(condemed.empty())
- {
- *node = new char[sizeof(int) + buf_size];
- *(reinterpret_cast<int*>(*node)) = 1;
- }
- else
- {
- pointer* p = condemed.front();
- condemed.pop_front();
- *node = *p;
- *p = 0;
- *(reinterpret_cast<int*>(*node)) = 1;
- }
-
- std::size_t read_size = 0;
- int read_pos = std::fseek(hfile, (node - _first) * buf_size, SEEK_SET);
-
- if(0 == read_pos && node == _last - 1)
- read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile);
- else
- read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile);
- if((read_size == 0) || (std::ferror(hfile)))
- {
-#ifndef BOOST_NO_EXCEPTIONS
- unlock(node);
- throw std::runtime_error("Unable to read file.");
-#else
- BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0));
-#endif
- }
- }
- else
- {
- if(*reinterpret_cast<int*>(*node) == 0)
- {
- *reinterpret_cast<int*>(*node) = 1;
- condemed.remove(node);
- }
- else
- ++(*reinterpret_cast<int*>(*node));
- }
- }
-}
-
-void mapfile::unlock(pointer* node)const
-{
- BOOST_ASSERT(node >= _first);
- BOOST_ASSERT(node <= _last);
- if(node < _last)
- {
- if(--(*reinterpret_cast<int*>(*node)) == 0)
- {
- condemed.push_back(node);
- }
- }
-}
-
-long int get_file_length(std::FILE* hfile)
-{
- long int result;
- std::fseek(hfile, 0, SEEK_END);
- result = std::ftell(hfile);
- std::fseek(hfile, 0, SEEK_SET);
- return result;
-}
-
-
-void mapfile::open(const char* file)
-{
- hfile = std::fopen(file, "rb");
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- if(hfile != 0)
- {
- _size = get_file_length(hfile);
- long cnodes = (_size + buf_size - 1) / buf_size;
-
- // check that number of nodes is not too high:
- if(cnodes > (long)((INT_MAX) / sizeof(pointer*)))
- {
- std::fclose(hfile);
- hfile = 0;
- _size = 0;
- return;
- }
-
- _first = new pointer[(int)cnodes];
- _last = _first + cnodes;
- std::memset(_first, 0, cnodes*sizeof(pointer));
- }
- else
- {
- std::runtime_error err("Unable to open file.");
- }
-#ifndef BOOST_NO_EXCEPTIONS
- }catch(...)
- { close(); throw; }
-#endif
-}
-
-void mapfile::close()
-{
- if(hfile != 0)
- {
- pointer* p = _first;
- while(p != _last)
- {
- if(*p)
- delete[] *p;
- ++p;
- }
- delete[] _first;
- _size = 0;
- _first = _last = 0;
- std::fclose(hfile);
- hfile = 0;
- condemed.erase(condemed.begin(), condemed.end());
- }
-}
-
-
-#endif
-
-inline _fi_find_handle find_first_file(const char* wild, _fi_find_data& data)
-{
-#ifdef BOOST_NO_ANSI_APIS
- std::size_t wild_size = std::strlen(wild);
- LPWSTR wide_wild = (LPWSTR)_alloca( (wild_size + 1) * sizeof(WCHAR) );
- if (::MultiByteToWideChar(CP_ACP, 0, wild, wild_size, wide_wild, wild_size + 1) == 0)
- return _fi_invalid_handle;
-
- return FindFirstFileW(wide_wild, &data);
-#else
- return FindFirstFileA(wild, &data);
-#endif
-}
-
-inline bool find_next_file(_fi_find_handle hf, _fi_find_data& data)
-{
-#ifdef BOOST_NO_ANSI_APIS
- return FindNextFileW(hf, &data);
-#else
- return FindNextFileA(hf, &data);
-#endif
-}
-
-inline void copy_find_file_result_with_overflow_check(const _fi_find_data& data, char* path, size_t max_size)
-{
-#ifdef BOOST_NO_ANSI_APIS
- if (::WideCharToMultiByte(CP_ACP, 0, data.cFileName, -1, path, max_size, NULL, NULL) == 0)
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(1);
-#else
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(path, max_size, data.cFileName));
-#endif
-}
-
-inline bool is_not_current_or_parent_path_string(const _fi_find_data& data)
-{
-#ifdef BOOST_NO_ANSI_APIS
- return (std::wcscmp(data.cFileName, L".") && std::wcscmp(data.cFileName, L".."));
-#else
- return (std::strcmp(data.cFileName, ".") && std::strcmp(data.cFileName, ".."));
-#endif
-}
-
-
-file_iterator::file_iterator()
-{
- _root = _path = 0;
- ref = 0;
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- _root = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_root)
- _path = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_path)
- ptr = _path;
- *_path = 0;
- *_root = 0;
- ref = new file_iterator_ref();
- BOOST_REGEX_NOEH_ASSERT(ref)
- ref->hf = _fi_invalid_handle;
- ref->count = 1;
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- delete[] _root;
- delete[] _path;
- delete ref;
- throw;
- }
-#endif
-}
-
-file_iterator::file_iterator(const char* wild)
-{
- _root = _path = 0;
- ref = 0;
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- _root = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_root)
- _path = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_path)
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, wild));
- ptr = _root;
- while(*ptr)++ptr;
- while((ptr > _root) && (*ptr != *_fi_sep) && (*ptr != *_fi_sep_alt))--ptr;
- if((ptr == _root) && ( (*ptr== *_fi_sep) || (*ptr==*_fi_sep_alt) ) )
- {
- _root[1]='\0';
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, _root));
- }
- else
- {
- *ptr = 0;
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, _root));
- if(*_path == 0)
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, "."));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(_path, MAX_PATH, _fi_sep));
- }
- ptr = _path + std::strlen(_path);
-
- ref = new file_iterator_ref();
- BOOST_REGEX_NOEH_ASSERT(ref)
- ref->hf = find_first_file(wild, ref->_data);
- ref->count = 1;
-
- if(ref->hf == _fi_invalid_handle)
- {
- *_path = 0;
- ptr = _path;
- }
- else
- {
- copy_find_file_result_with_overflow_check(ref->_data, ptr, (MAX_PATH - (ptr - _path)));
- if(ref->_data.dwFileAttributes & _fi_dir)
- next();
- }
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- delete[] _root;
- delete[] _path;
- delete ref;
- throw;
- }
-#endif
-}
-
-file_iterator::file_iterator(const file_iterator& other)
-{
- _root = _path = 0;
- ref = 0;
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- _root = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_root)
- _path = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_path)
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, other._root));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, other._path));
- ptr = _path + (other.ptr - other._path);
- ref = other.ref;
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- delete[] _root;
- delete[] _path;
- throw;
- }
-#endif
- ++(ref->count);
-}
-
-file_iterator& file_iterator::operator=(const file_iterator& other)
-{
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, other._root));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, other._path));
- ptr = _path + (other.ptr - other._path);
- if(--(ref->count) == 0)
- {
- if(ref->hf != _fi_invalid_handle)
- FindClose(ref->hf);
- delete ref;
- }
- ref = other.ref;
- ++(ref->count);
- return *this;
-}
-
-
-file_iterator::~file_iterator()
-{
- delete[] _root;
- delete[] _path;
- if(--(ref->count) == 0)
- {
- if(ref->hf != _fi_invalid_handle)
- FindClose(ref->hf);
- delete ref;
- }
-}
-
-file_iterator file_iterator::operator++(int)
-{
- file_iterator temp(*this);
- next();
- return temp;
-}
-
-
-void file_iterator::next()
-{
- if(ref->hf != _fi_invalid_handle)
- {
- bool cont = true;
- while(cont)
- {
- cont = find_next_file(ref->hf, ref->_data);
- if(cont && ((ref->_data.dwFileAttributes & _fi_dir) == 0))
- break;
- }
- if(!cont)
- {
- // end of sequence
- FindClose(ref->hf);
- ref->hf = _fi_invalid_handle;
- *_path = 0;
- ptr = _path;
- }
- else
- copy_find_file_result_with_overflow_check(ref->_data, ptr, MAX_PATH - (ptr - _path));
- }
-}
-
-
-
-directory_iterator::directory_iterator()
-{
- _root = _path = 0;
- ref = 0;
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- _root = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_root)
- _path = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_path)
- ptr = _path;
- *_path = 0;
- *_root = 0;
- ref = new file_iterator_ref();
- BOOST_REGEX_NOEH_ASSERT(ref)
- ref->hf = _fi_invalid_handle;
- ref->count = 1;
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- delete[] _root;
- delete[] _path;
- delete ref;
- throw;
- }
-#endif
-}
-
-directory_iterator::directory_iterator(const char* wild)
-{
- _root = _path = 0;
- ref = 0;
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- _root = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_root)
- _path = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_path)
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, wild));
- ptr = _root;
- while(*ptr)++ptr;
- while((ptr > _root) && (*ptr != *_fi_sep) && (*ptr != *_fi_sep_alt))--ptr;
-
- if((ptr == _root) && ( (*ptr== *_fi_sep) || (*ptr==*_fi_sep_alt) ) )
- {
- _root[1]='\0';
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, _root));
- }
- else
- {
- *ptr = 0;
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, _root));
- if(*_path == 0)
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, "."));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(_path, MAX_PATH, _fi_sep));
- }
- ptr = _path + std::strlen(_path);
-
- ref = new file_iterator_ref();
- BOOST_REGEX_NOEH_ASSERT(ref)
- ref->count = 1;
- ref->hf = find_first_file(wild, ref->_data);
- if(ref->hf == _fi_invalid_handle)
- {
- *_path = 0;
- ptr = _path;
- }
- else
- {
- copy_find_file_result_with_overflow_check(ref->_data, ptr, MAX_PATH - (ptr - _path));
- if(((ref->_data.dwFileAttributes & _fi_dir) == 0) || (std::strcmp(ptr, ".") == 0) || (std::strcmp(ptr, "..") == 0))
- next();
- }
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- delete[] _root;
- delete[] _path;
- delete ref;
- throw;
- }
-#endif
-}
-
-directory_iterator::~directory_iterator()
-{
- delete[] _root;
- delete[] _path;
- if(--(ref->count) == 0)
- {
- if(ref->hf != _fi_invalid_handle)
- FindClose(ref->hf);
- delete ref;
- }
-}
-
-directory_iterator::directory_iterator(const directory_iterator& other)
-{
- _root = _path = 0;
- ref = 0;
-#ifndef BOOST_NO_EXCEPTIONS
- try{
-#endif
- _root = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_root)
- _path = new char[MAX_PATH];
- BOOST_REGEX_NOEH_ASSERT(_path)
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, other._root));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, other._path));
- ptr = _path + (other.ptr - other._path);
- ref = other.ref;
-#ifndef BOOST_NO_EXCEPTIONS
- }
- catch(...)
- {
- delete[] _root;
- delete[] _path;
- throw;
- }
-#endif
- ++(ref->count);
-}
-
-directory_iterator& directory_iterator::operator=(const directory_iterator& other)
-{
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, other._root));
- BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, other._path));
- ptr = _path + (other.ptr - other._path);
- if(--(ref->count) == 0)
- {
- if(ref->hf != _fi_invalid_handle)
- FindClose(ref->hf);
- delete ref;
- }
- ref = other.ref;
- ++(ref->count);
- return *this;
-}
-
-directory_iterator directory_iterator::operator++(int)
-{
- directory_iterator temp(*this);
- next();
- return temp;
-}
-
-void directory_iterator::next()
-{
- if(ref->hf != _fi_invalid_handle)
- {
- bool cont = true;
- while(cont)
- {
- cont = find_next_file(ref->hf, ref->_data);
- if(cont && (ref->_data.dwFileAttributes & _fi_dir))
- {
- if(is_not_current_or_parent_path_string(ref->_data))
- break;
- }
- }
- if(!cont)
- {
- // end of sequence
- FindClose(ref->hf);
- ref->hf = _fi_invalid_handle;
- *_path = 0;
- ptr = _path;
- }
- else
- copy_find_file_result_with_overflow_check(ref->_data, ptr, MAX_PATH - (ptr - _path));
- }
-}
-
-
-#ifdef BOOST_REGEX_FI_POSIX_DIR
-
-struct _fi_priv_data
-{
- char root[MAX_PATH];
- char* mask;
- DIR* d;
- _fi_priv_data(const char* p);
-};
-
-_fi_priv_data::_fi_priv_data(const char* p)
-{
- std::strcpy(root, p);
- mask = root;
- while(*mask) ++mask;
- while((mask > root) && (*mask != *_fi_sep) && (*mask != *_fi_sep_alt)) --mask;
- if(mask == root && ((*mask== *_fi_sep) || (*mask == *_fi_sep_alt)) )
- {
- root[1] = '\0';
- std::strcpy(root+2, p+1);
- mask = root+2;
- }
- else if(mask == root)
- {
- root[0] = '.';
- root[1] = '\0';
- std::strcpy(root+2, p);
- mask = root+2;
- }
- else
- {
- *mask = 0;
- ++mask;
- }
-}
-
-bool iswild(const char* mask, const char* name)
-{
- while(*mask && *name)
- {
- switch(*mask)
- {
- case '?':
- ++name;
- ++mask;
- continue;
- case '*':
- ++mask;
- if(*mask == 0)
- return true;
- while(*name)
- {
- if(iswild(mask, name))
- return true;
- ++name;
- }
- return false;
- case '.':
- if(0 == *name)
- {
- ++mask;
- continue;
- }
- // fall through:
- default:
- if(BOOST_REGEX_FI_TRANSLATE(*mask) != BOOST_REGEX_FI_TRANSLATE(*name))
- return false;
- ++mask;
- ++name;
- continue;
- }
- }
- if(*mask != *name)
- return false;
- return true;
-}
-
-unsigned _fi_attributes(const char* root, const char* name)
-{
- char buf[MAX_PATH];
- // verify that we can not overflow:
- if(std::strlen(root) + std::strlen(_fi_sep) + std::strlen(name) >= MAX_PATH)
- return 0;
- int r;
- if( ( (root[0] == *_fi_sep) || (root[0] == *_fi_sep_alt) ) && (root[1] == '\0') )
- r = (std::sprintf)(buf, "%s%s", root, name);
- else
- r = (std::sprintf)(buf, "%s%s%s", root, _fi_sep, name);
- if(r < 0)
- return 0; // sprintf failed
- DIR* d = opendir(buf);
- if(d)
- {
- closedir(d);
- return _fi_dir;
- }
- return 0;
-}
-
-_fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData)
-{
- _fi_find_handle dat = new _fi_priv_data(lpFileName);
-
- DIR* h = opendir(dat->root);
- dat->d = h;
- if(h != 0)
- {
- if(_fi_FindNextFile(dat, lpFindFileData))
- return dat;
- closedir(h);
- }
- delete dat;
- return 0;
-}
-
-bool _fi_FindNextFile(_fi_find_handle dat, _fi_find_data* lpFindFileData)
-{
- dirent* d;
- do
- {
- d = readdir(dat->d);
- } while(d && !iswild(dat->mask, d->d_name));
-
- if(d)
- {
- std::strcpy(lpFindFileData->cFileName, d->d_name);
- lpFindFileData->dwFileAttributes = _fi_attributes(dat->root, d->d_name);
- return true;
- }
- return false;
-}
-
-bool _fi_FindClose(_fi_find_handle dat)
-{
- closedir(dat->d);
- delete dat;
- return true;
-}
-
-#endif
-
-} // namespace BOOST_REGEX_DETAIL_NS
-} // namspace boost
-
-#endif // BOOST_REGEX_NO_FILEITER
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/icu.cpp b/src/third_party/boost-1.68.0/libs/regex/src/icu.cpp
deleted file mode 100644
index be6e5a1c41d..00000000000
--- a/src/third_party/boost-1.68.0/libs/regex/src/icu.cpp
+++ /dev/null
@@ -1,511 +0,0 @@
-/*
- *
- * Copyright (c) 2004
- * John Maddock
- *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
- * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
- *
- */
-
- /*
- * LOCATION: see http://www.boost.org for most recent version.
- * FILE icu.cpp
- * VERSION see <boost/version.hpp>
- * DESCRIPTION: Unicode regular expressions on top of the ICU Library.
- */
-#define BOOST_REGEX_SOURCE
-
-#include <boost/regex/config.hpp>
-#ifdef BOOST_HAS_ICU
-#define BOOST_REGEX_ICU_INSTANTIATE
-#include <boost/regex/icu.hpp>
-
-#ifdef BOOST_INTEL
-#pragma warning(disable:981 2259 383)
-#endif
-
-namespace boost{
-
-namespace BOOST_REGEX_DETAIL_NS{
-
-icu_regex_traits_implementation::string_type icu_regex_traits_implementation::do_transform(const char_type* p1, const char_type* p2, const U_NAMESPACE_QUALIFIER Collator* pcoll) const
-{
- // TODO make thread safe!!!! :
- typedef u32_to_u16_iterator<const char_type*, ::UChar> itt;
- itt i(p1), j(p2);
-#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
- std::vector< ::UChar> t(i, j);
-#else
- std::vector< ::UChar> t;
- while(i != j)
- t.push_back(*i++);
-#endif
- ::uint8_t result[100];
- ::int32_t len;
- if(t.size())
- len = pcoll->getSortKey(&*t.begin(), static_cast< ::int32_t>(t.size()), result, sizeof(result));
- else
- len = pcoll->getSortKey(static_cast<UChar const*>(0), static_cast< ::int32_t>(0), result, sizeof(result));
- if(std::size_t(len) > sizeof(result))
- {
- scoped_array< ::uint8_t> presult(new ::uint8_t[len+1]);
- if(t.size())
- len = pcoll->getSortKey(&*t.begin(), static_cast< ::int32_t>(t.size()), presult.get(), len+1);
- else
- len = pcoll->getSortKey(static_cast<UChar const*>(0), static_cast< ::int32_t>(0), presult.get(), len+1);
- if((0 == presult[len-1]) && (len > 1))
- --len;
-#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
- return string_type(presult.get(), presult.get()+len);
-#else
- string_type sresult;
- ::uint8_t const* ia = presult.get();
- ::uint8_t const* ib = presult.get()+len;
- while(ia != ib)
- sresult.push_back(*ia++);
- return sresult;
-#endif
- }
- if((0 == result[len-1]) && (len > 1))
- --len;
-#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
- return string_type(result, result+len);
-#else
- string_type sresult;
- ::uint8_t const* ia = result;
- ::uint8_t const* ib = result+len;
- while(ia != ib)
- sresult.push_back(*ia++);
- return sresult;
-#endif
-}
-
-}
-
-icu_regex_traits::size_type icu_regex_traits::length(const char_type* p)
-{
- size_type result = 0;
- while(*p)
- {
- ++p;
- ++result;
- }
- return result;
-}
-
-//
-// define our bitmasks:
-//
-const icu_regex_traits::char_class_type icu_regex_traits::mask_blank = icu_regex_traits::char_class_type(1) << offset_blank;
-const icu_regex_traits::char_class_type icu_regex_traits::mask_space = icu_regex_traits::char_class_type(1) << offset_space;
-const icu_regex_traits::char_class_type icu_regex_traits::mask_xdigit = icu_regex_traits::char_class_type(1) << offset_xdigit;
-const icu_regex_traits::char_class_type icu_regex_traits::mask_underscore = icu_regex_traits::char_class_type(1) << offset_underscore;
-const icu_regex_traits::char_class_type icu_regex_traits::mask_unicode = icu_regex_traits::char_class_type(1) << offset_unicode;
-const icu_regex_traits::char_class_type icu_regex_traits::mask_any = icu_regex_traits::char_class_type(1) << offset_any;
-const icu_regex_traits::char_class_type icu_regex_traits::mask_ascii = icu_regex_traits::char_class_type(1) << offset_ascii;
-const icu_regex_traits::char_class_type icu_regex_traits::mask_horizontal = icu_regex_traits::char_class_type(1) << offset_horizontal;
-const icu_regex_traits::char_class_type icu_regex_traits::mask_vertical = icu_regex_traits::char_class_type(1) << offset_vertical;
-
-icu_regex_traits::char_class_type icu_regex_traits::lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2)
-{
- static const ::UChar32 prop_name_table[] = {
- /* any */ 'a', 'n', 'y',
- /* ascii */ 'a', 's', 'c', 'i', 'i',
- /* assigned */ 'a', 's', 's', 'i', 'g', 'n', 'e', 'd',
- /* c* */ 'c', '*',
- /* cc */ 'c', 'c',
- /* cf */ 'c', 'f',
- /* closepunctuation */ 'c', 'l', 'o', 's', 'e', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
- /* cn */ 'c', 'n',
- /* co */ 'c', 'o',
- /* connectorpunctuation */ 'c', 'o', 'n', 'n', 'e', 'c', 't', 'o', 'r', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
- /* control */ 'c', 'o', 'n', 't', 'r', 'o', 'l',
- /* cs */ 'c', 's',
- /* currencysymbol */ 'c', 'u', 'r', 'r', 'e', 'n', 'c', 'y', 's', 'y', 'm', 'b', 'o', 'l',
- /* dashpunctuation */ 'd', 'a', 's', 'h', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
- /* decimaldigitnumber */ 'd', 'e', 'c', 'i', 'm', 'a', 'l', 'd', 'i', 'g', 'i', 't', 'n', 'u', 'm', 'b', 'e', 'r',
- /* enclosingmark */ 'e', 'n', 'c', 'l', 'o', 's', 'i', 'n', 'g', 'm', 'a', 'r', 'k',
- /* finalpunctuation */ 'f', 'i', 'n', 'a', 'l', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
- /* format */ 'f', 'o', 'r', 'm', 'a', 't',
- /* initialpunctuation */ 'i', 'n', 'i', 't', 'i', 'a', 'l', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
- /* l* */ 'l', '*',
- /* letter */ 'l', 'e', 't', 't', 'e', 'r',
- /* letternumber */ 'l', 'e', 't', 't', 'e', 'r', 'n', 'u', 'm', 'b', 'e', 'r',
- /* lineseparator */ 'l', 'i', 'n', 'e', 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r',
- /* ll */ 'l', 'l',
- /* lm */ 'l', 'm',
- /* lo */ 'l', 'o',
- /* lowercaseletter */ 'l', 'o', 'w', 'e', 'r', 'c', 'a', 's', 'e', 'l', 'e', 't', 't', 'e', 'r',
- /* lt */ 'l', 't',
- /* lu */ 'l', 'u',
- /* m* */ 'm', '*',
- /* mark */ 'm', 'a', 'r', 'k',
- /* mathsymbol */ 'm', 'a', 't', 'h', 's', 'y', 'm', 'b', 'o', 'l',
- /* mc */ 'm', 'c',
- /* me */ 'm', 'e',
- /* mn */ 'm', 'n',
- /* modifierletter */ 'm', 'o', 'd', 'i', 'f', 'i', 'e', 'r', 'l', 'e', 't', 't', 'e', 'r',
- /* modifiersymbol */ 'm', 'o', 'd', 'i', 'f', 'i', 'e', 'r', 's', 'y', 'm', 'b', 'o', 'l',
- /* n* */ 'n', '*',
- /* nd */ 'n', 'd',
- /* nl */ 'n', 'l',
- /* no */ 'n', 'o',
- /* nonspacingmark */ 'n', 'o', 'n', 's', 'p', 'a', 'c', 'i', 'n', 'g', 'm', 'a', 'r', 'k',
- /* notassigned */ 'n', 'o', 't', 'a', 's', 's', 'i', 'g', 'n', 'e', 'd',
- /* number */ 'n', 'u', 'm', 'b', 'e', 'r',
- /* openpunctuation */ 'o', 'p', 'e', 'n', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
- /* other */ 'o', 't', 'h', 'e', 'r',
- /* otherletter */ 'o', 't', 'h', 'e', 'r', 'l', 'e', 't', 't', 'e', 'r',
- /* othernumber */ 'o', 't', 'h', 'e', 'r', 'n', 'u', 'm', 'b', 'e', 'r',
- /* otherpunctuation */ 'o', 't', 'h', 'e', 'r', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
- /* othersymbol */ 'o', 't', 'h', 'e', 'r', 's', 'y', 'm', 'b', 'o', 'l',
- /* p* */ 'p', '*',
- /* paragraphseparator */ 'p', 'a', 'r', 'a', 'g', 'r', 'a', 'p', 'h', 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r',
- /* pc */ 'p', 'c',
- /* pd */ 'p', 'd',
- /* pe */ 'p', 'e',
- /* pf */ 'p', 'f',
- /* pi */ 'p', 'i',
- /* po */ 'p', 'o',
- /* privateuse */ 'p', 'r', 'i', 'v', 'a', 't', 'e', 'u', 's', 'e',
- /* ps */ 'p', 's',
- /* punctuation */ 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
- /* s* */ 's', '*',
- /* sc */ 's', 'c',
- /* separator */ 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r',
- /* sk */ 's', 'k',
- /* sm */ 's', 'm',
- /* so */ 's', 'o',
- /* spaceseparator */ 's', 'p', 'a', 'c', 'e', 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r',
- /* spacingcombiningmark */ 's', 'p', 'a', 'c', 'i', 'n', 'g', 'c', 'o', 'm', 'b', 'i', 'n', 'i', 'n', 'g', 'm', 'a', 'r', 'k',
- /* surrogate */ 's', 'u', 'r', 'r', 'o', 'g', 'a', 't', 'e',
- /* symbol */ 's', 'y', 'm', 'b', 'o', 'l',
- /* titlecase */ 't', 'i', 't', 'l', 'e', 'c', 'a', 's', 'e',
- /* titlecaseletter */ 't', 'i', 't', 'l', 'e', 'c', 'a', 's', 'e', 'l', 'e', 't', 't', 'e', 'r',
- /* uppercaseletter */ 'u', 'p', 'p', 'e', 'r', 'c', 'a', 's', 'e', 'l', 'e', 't', 't', 'e', 'r',
- /* z* */ 'z', '*',
- /* zl */ 'z', 'l',
- /* zp */ 'z', 'p',
- /* zs */ 'z', 's',
- };
-
- static const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32> range_data[] = {
- { prop_name_table+0, prop_name_table+3, }, // any
- { prop_name_table+3, prop_name_table+8, }, // ascii
- { prop_name_table+8, prop_name_table+16, }, // assigned
- { prop_name_table+16, prop_name_table+18, }, // c*
- { prop_name_table+18, prop_name_table+20, }, // cc
- { prop_name_table+20, prop_name_table+22, }, // cf
- { prop_name_table+22, prop_name_table+38, }, // closepunctuation
- { prop_name_table+38, prop_name_table+40, }, // cn
- { prop_name_table+40, prop_name_table+42, }, // co
- { prop_name_table+42, prop_name_table+62, }, // connectorpunctuation
- { prop_name_table+62, prop_name_table+69, }, // control
- { prop_name_table+69, prop_name_table+71, }, // cs
- { prop_name_table+71, prop_name_table+85, }, // currencysymbol
- { prop_name_table+85, prop_name_table+100, }, // dashpunctuation
- { prop_name_table+100, prop_name_table+118, }, // decimaldigitnumber
- { prop_name_table+118, prop_name_table+131, }, // enclosingmark
- { prop_name_table+131, prop_name_table+147, }, // finalpunctuation
- { prop_name_table+147, prop_name_table+153, }, // format
- { prop_name_table+153, prop_name_table+171, }, // initialpunctuation
- { prop_name_table+171, prop_name_table+173, }, // l*
- { prop_name_table+173, prop_name_table+179, }, // letter
- { prop_name_table+179, prop_name_table+191, }, // letternumber
- { prop_name_table+191, prop_name_table+204, }, // lineseparator
- { prop_name_table+204, prop_name_table+206, }, // ll
- { prop_name_table+206, prop_name_table+208, }, // lm
- { prop_name_table+208, prop_name_table+210, }, // lo
- { prop_name_table+210, prop_name_table+225, }, // lowercaseletter
- { prop_name_table+225, prop_name_table+227, }, // lt
- { prop_name_table+227, prop_name_table+229, }, // lu
- { prop_name_table+229, prop_name_table+231, }, // m*
- { prop_name_table+231, prop_name_table+235, }, // mark
- { prop_name_table+235, prop_name_table+245, }, // mathsymbol
- { prop_name_table+245, prop_name_table+247, }, // mc
- { prop_name_table+247, prop_name_table+249, }, // me
- { prop_name_table+249, prop_name_table+251, }, // mn
- { prop_name_table+251, prop_name_table+265, }, // modifierletter
- { prop_name_table+265, prop_name_table+279, }, // modifiersymbol
- { prop_name_table+279, prop_name_table+281, }, // n*
- { prop_name_table+281, prop_name_table+283, }, // nd
- { prop_name_table+283, prop_name_table+285, }, // nl
- { prop_name_table+285, prop_name_table+287, }, // no
- { prop_name_table+287, prop_name_table+301, }, // nonspacingmark
- { prop_name_table+301, prop_name_table+312, }, // notassigned
- { prop_name_table+312, prop_name_table+318, }, // number
- { prop_name_table+318, prop_name_table+333, }, // openpunctuation
- { prop_name_table+333, prop_name_table+338, }, // other
- { prop_name_table+338, prop_name_table+349, }, // otherletter
- { prop_name_table+349, prop_name_table+360, }, // othernumber
- { prop_name_table+360, prop_name_table+376, }, // otherpunctuation
- { prop_name_table+376, prop_name_table+387, }, // othersymbol
- { prop_name_table+387, prop_name_table+389, }, // p*
- { prop_name_table+389, prop_name_table+407, }, // paragraphseparator
- { prop_name_table+407, prop_name_table+409, }, // pc
- { prop_name_table+409, prop_name_table+411, }, // pd
- { prop_name_table+411, prop_name_table+413, }, // pe
- { prop_name_table+413, prop_name_table+415, }, // pf
- { prop_name_table+415, prop_name_table+417, }, // pi
- { prop_name_table+417, prop_name_table+419, }, // po
- { prop_name_table+419, prop_name_table+429, }, // privateuse
- { prop_name_table+429, prop_name_table+431, }, // ps
- { prop_name_table+431, prop_name_table+442, }, // punctuation
- { prop_name_table+442, prop_name_table+444, }, // s*
- { prop_name_table+444, prop_name_table+446, }, // sc
- { prop_name_table+446, prop_name_table+455, }, // separator
- { prop_name_table+455, prop_name_table+457, }, // sk
- { prop_name_table+457, prop_name_table+459, }, // sm
- { prop_name_table+459, prop_name_table+461, }, // so
- { prop_name_table+461, prop_name_table+475, }, // spaceseparator
- { prop_name_table+475, prop_name_table+495, }, // spacingcombiningmark
- { prop_name_table+495, prop_name_table+504, }, // surrogate
- { prop_name_table+504, prop_name_table+510, }, // symbol
- { prop_name_table+510, prop_name_table+519, }, // titlecase
- { prop_name_table+519, prop_name_table+534, }, // titlecaseletter
- { prop_name_table+534, prop_name_table+549, }, // uppercaseletter
- { prop_name_table+549, prop_name_table+551, }, // z*
- { prop_name_table+551, prop_name_table+553, }, // zl
- { prop_name_table+553, prop_name_table+555, }, // zp
- { prop_name_table+555, prop_name_table+557, }, // zs
- };
-
- static const icu_regex_traits::char_class_type icu_class_map[] = {
- icu_regex_traits::mask_any, // any
- icu_regex_traits::mask_ascii, // ascii
- (0x3FFFFFFFu) & ~(U_GC_CN_MASK), // assigned
- U_GC_C_MASK, // c*
- U_GC_CC_MASK, // cc
- U_GC_CF_MASK, // cf
- U_GC_PE_MASK, // closepunctuation
- U_GC_CN_MASK, // cn
- U_GC_CO_MASK, // co
- U_GC_PC_MASK, // connectorpunctuation
- U_GC_CC_MASK, // control
- U_GC_CS_MASK, // cs
- U_GC_SC_MASK, // currencysymbol
- U_GC_PD_MASK, // dashpunctuation
- U_GC_ND_MASK, // decimaldigitnumber
- U_GC_ME_MASK, // enclosingmark
- U_GC_PF_MASK, // finalpunctuation
- U_GC_CF_MASK, // format
- U_GC_PI_MASK, // initialpunctuation
- U_GC_L_MASK, // l*
- U_GC_L_MASK, // letter
- U_GC_NL_MASK, // letternumber
- U_GC_ZL_MASK, // lineseparator
- U_GC_LL_MASK, // ll
- U_GC_LM_MASK, // lm
- U_GC_LO_MASK, // lo
- U_GC_LL_MASK, // lowercaseletter
- U_GC_LT_MASK, // lt
- U_GC_LU_MASK, // lu
- U_GC_M_MASK, // m*
- U_GC_M_MASK, // mark
- U_GC_SM_MASK, // mathsymbol
- U_GC_MC_MASK, // mc
- U_GC_ME_MASK, // me
- U_GC_MN_MASK, // mn
- U_GC_LM_MASK, // modifierletter
- U_GC_SK_MASK, // modifiersymbol
- U_GC_N_MASK, // n*
- U_GC_ND_MASK, // nd
- U_GC_NL_MASK, // nl
- U_GC_NO_MASK, // no
- U_GC_MN_MASK, // nonspacingmark
- U_GC_CN_MASK, // notassigned
- U_GC_N_MASK, // number
- U_GC_PS_MASK, // openpunctuation
- U_GC_C_MASK, // other
- U_GC_LO_MASK, // otherletter
- U_GC_NO_MASK, // othernumber
- U_GC_PO_MASK, // otherpunctuation
- U_GC_SO_MASK, // othersymbol
- U_GC_P_MASK, // p*
- U_GC_ZP_MASK, // paragraphseparator
- U_GC_PC_MASK, // pc
- U_GC_PD_MASK, // pd
- U_GC_PE_MASK, // pe
- U_GC_PF_MASK, // pf
- U_GC_PI_MASK, // pi
- U_GC_PO_MASK, // po
- U_GC_CO_MASK, // privateuse
- U_GC_PS_MASK, // ps
- U_GC_P_MASK, // punctuation
- U_GC_S_MASK, // s*
- U_GC_SC_MASK, // sc
- U_GC_Z_MASK, // separator
- U_GC_SK_MASK, // sk
- U_GC_SM_MASK, // sm
- U_GC_SO_MASK, // so
- U_GC_ZS_MASK, // spaceseparator
- U_GC_MC_MASK, // spacingcombiningmark
- U_GC_CS_MASK, // surrogate
- U_GC_S_MASK, // symbol
- U_GC_LT_MASK, // titlecase
- U_GC_LT_MASK, // titlecaseletter
- U_GC_LU_MASK, // uppercaseletter
- U_GC_Z_MASK, // z*
- U_GC_ZL_MASK, // zl
- U_GC_ZP_MASK, // zp
- U_GC_ZS_MASK, // zs
- };
-
-
- static const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* ranges_begin = range_data;
- static const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* ranges_end = range_data + (sizeof(range_data)/sizeof(range_data[0]));
-
- BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32> t = { p1, p2, };
- const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* p = std::lower_bound(ranges_begin, ranges_end, t);
- if((p != ranges_end) && (t == *p))
- return icu_class_map[p - ranges_begin];
- return 0;
-}
-
-icu_regex_traits::char_class_type icu_regex_traits::lookup_classname(const char_type* p1, const char_type* p2) const
-{
- static const char_class_type masks[] =
- {
- 0,
- U_GC_L_MASK | U_GC_ND_MASK,
- U_GC_L_MASK,
- mask_blank,
- U_GC_CC_MASK | U_GC_CF_MASK | U_GC_ZL_MASK | U_GC_ZP_MASK,
- U_GC_ND_MASK,
- U_GC_ND_MASK,
- (0x3FFFFFFFu) & ~(U_GC_CC_MASK | U_GC_CF_MASK | U_GC_CS_MASK | U_GC_CN_MASK | U_GC_Z_MASK),
- mask_horizontal,
- U_GC_LL_MASK,
- U_GC_LL_MASK,
- ~(U_GC_C_MASK),
- U_GC_P_MASK,
- char_class_type(U_GC_Z_MASK) | mask_space,
- char_class_type(U_GC_Z_MASK) | mask_space,
- U_GC_LU_MASK,
- mask_unicode,
- U_GC_LU_MASK,
- mask_vertical,
- char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
- char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
- char_class_type(U_GC_ND_MASK) | mask_xdigit,
- };
-
- int idx = ::boost::BOOST_REGEX_DETAIL_NS::get_default_class_id(p1, p2);
- if(idx >= 0)
- return masks[idx+1];
- char_class_type result = lookup_icu_mask(p1, p2);
- if(result != 0)
- return result;
-
- if(idx < 0)
- {
- string_type s(p1, p2);
- string_type::size_type i = 0;
- while(i < s.size())
- {
- s[i] = static_cast<char>((::u_tolower)(s[i]));
- if(::u_isspace(s[i]) || (s[i] == '-') || (s[i] == '_'))
- s.erase(s.begin()+i, s.begin()+i+1);
- else
- {
- s[i] = static_cast<char>((::u_tolower)(s[i]));
- ++i;
- }
- }
- if(s.size())
- idx = ::boost::BOOST_REGEX_DETAIL_NS::get_default_class_id(&*s.begin(), &*s.begin() + s.size());
- if(idx >= 0)
- return masks[idx+1];
- if(s.size())
- result = lookup_icu_mask(&*s.begin(), &*s.begin() + s.size());
- if(result != 0)
- return result;
- }
- BOOST_ASSERT(std::size_t(idx+1) < sizeof(masks) / sizeof(masks[0]));
- return masks[idx+1];
-}
-
-icu_regex_traits::string_type icu_regex_traits::lookup_collatename(const char_type* p1, const char_type* p2) const
-{
- string_type result;
-#ifdef BOOST_NO_CXX98_BINDERS
- if(std::find_if(p1, p2, std::bind(std::greater< ::UChar32>(), std::placeholders::_1, 0x7f)) == p2)
-#else
- if(std::find_if(p1, p2, std::bind2nd(std::greater< ::UChar32>(), 0x7f)) == p2)
-#endif
- {
-#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
- std::string s(p1, p2);
-#else
- std::string s;
- const char_type* p3 = p1;
- while(p3 != p2)
- s.append(1, *p3++);
-#endif
- // Try Unicode name:
- UErrorCode err = U_ZERO_ERROR;
- UChar32 c = ::u_charFromName(U_UNICODE_CHAR_NAME, s.c_str(), &err);
- if(U_SUCCESS(err))
- {
- result.push_back(c);
- return result;
- }
- // Try Unicode-extended name:
- err = U_ZERO_ERROR;
- c = ::u_charFromName(U_EXTENDED_CHAR_NAME, s.c_str(), &err);
- if(U_SUCCESS(err))
- {
- result.push_back(c);
- return result;
- }
- // try POSIX name:
- s = ::boost::BOOST_REGEX_DETAIL_NS::lookup_default_collate_name(s);
-#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
- result.assign(s.begin(), s.end());
-#else
- result.clear();
- std::string::const_iterator si, sj;
- si = s.begin();
- sj = s.end();
- while(si != sj)
- result.push_back(*si++);
-#endif
- }
- if(result.empty() && (p2-p1 == 1))
- result.push_back(*p1);
- return result;
-}
-
-bool icu_regex_traits::isctype(char_type c, char_class_type f) const
-{
- // check for standard catagories first:
- char_class_type m = char_class_type(1u << u_charType(c));
- if((m & f) != 0)
- return true;
- // now check for special cases:
- if(((f & mask_blank) != 0) && u_isblank(c))
- return true;
- if(((f & mask_space) != 0) && u_isspace(c))
- return true;
- if(((f & mask_xdigit) != 0) && (u_digit(c, 16) >= 0))
- return true;
- if(((f & mask_unicode) != 0) && (c >= 0x100))
- return true;
- if(((f & mask_underscore) != 0) && (c == '_'))
- return true;
- if(((f & mask_any) != 0) && (c <= 0x10FFFF))
- return true;
- if(((f & mask_ascii) != 0) && (c <= 0x7F))
- return true;
- if(((f & mask_vertical) != 0) && (::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) || (c == static_cast<char_type>('\v')) || (m == U_GC_ZL_MASK) || (m == U_GC_ZP_MASK)))
- return true;
- if(((f & mask_horizontal) != 0) && !::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) && u_isspace(c) && (c != static_cast<char_type>('\v')))
- return true;
- return false;
-}
-
-}
-
-#endif // BOOST_HAS_ICU
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info.cpp b/src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info.cpp
deleted file mode 100644
index 364fe56d842..00000000000
--- a/src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info.cpp
+++ /dev/null
@@ -1,193 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// extended_type_info.cpp: implementation for portable version of type_info
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#if (defined _MSC_VER) && (_MSC_VER == 1200)
-# pragma warning (disable : 4786) // too long name, harmless warning
-#endif
-
-#include <algorithm>
-#include <set>
-#include <utility>
-#include <boost/assert.hpp>
-#include <cstddef> // NULL
-
-#include <cstring>
-#if defined(BOOST_NO_STDC_NAMESPACE)
-namespace std{ using ::strcmp; }
-#endif
-
-#include <boost/config.hpp> // msvc needs this to suppress warning
-
-#include <boost/core/no_exceptions_support.hpp>
-
-// it marks our code with proper attributes as being exported when
-// we're compiling it while marking it import when just the headers
-// is being included.
-#define BOOST_SERIALIZATION_SOURCE
-#include <boost/serialization/config.hpp>
-#include <boost/serialization/singleton.hpp>
-#include <boost/serialization/force_include.hpp>
-#include <boost/serialization/extended_type_info.hpp>
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-namespace boost {
-namespace serialization {
-namespace detail {
-
-struct key_compare
-{
- bool
- operator()(
- const extended_type_info * lhs,
- const extended_type_info * rhs
- ) const {
- // performance shortcut
- if(lhs == rhs)
- return false;
- const char * l = lhs->get_key();
- BOOST_ASSERT(NULL != l);
- const char * r = rhs->get_key();
- BOOST_ASSERT(NULL != r);
- // performance shortcut
- // shortcut to exploit string pooling
- if(l == r)
- return false;
- // for exported types, use the string key so that
- // multiple instances in different translation units
- // can be matched up
- return std::strcmp(l, r) < 0;
- }
-};
-
-typedef std::multiset<const extended_type_info *, key_compare> ktmap;
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-class extended_type_info_arg : public extended_type_info
-{
- virtual bool
- is_less_than(const extended_type_info & /*rhs*/) const {
- BOOST_ASSERT(false);
- return false;
- };
- virtual bool
- is_equal(const extended_type_info & /*rhs*/) const {
- BOOST_ASSERT(false);
- return false;
- };
- virtual const char * get_debug_info() const {
- return get_key();
- }
- virtual void * construct(unsigned int /*count*/, ...) const{
- BOOST_ASSERT(false);
- return NULL;
- }
- virtual void destroy(void const * const /*p*/) const {
- BOOST_ASSERT(false);
- }
-public:
- extended_type_info_arg(const char * key) :
- extended_type_info(0, key)
- {}
-
- ~extended_type_info_arg(){
- }
-};
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-} // namespace detail
-
-BOOST_SERIALIZATION_DECL void
-extended_type_info::key_register() const{
- if(NULL == get_key())
- return;
- singleton<detail::ktmap>::get_mutable_instance().insert(this);
-}
-
-BOOST_SERIALIZATION_DECL void
-extended_type_info::key_unregister() const{
- if(NULL == get_key())
- return;
- BOOST_ASSERT(! singleton<detail::ktmap>::is_destroyed());
- if(! singleton<detail::ktmap>::is_destroyed()){
- detail::ktmap & x = singleton<detail::ktmap>::get_mutable_instance();
- detail::ktmap::iterator start = x.lower_bound(this);
- detail::ktmap::iterator end = x.upper_bound(this);
- // remove entry in map which corresponds to this type
- for(;start != end; ++start){
- if(this == *start){
- x.erase(start);
- break;
- }
- }
- }
-}
-
-BOOST_SERIALIZATION_DECL const extended_type_info *
-extended_type_info::find(const char *key) {
- BOOST_ASSERT(NULL != key);
- const detail::ktmap & k = singleton<detail::ktmap>::get_const_instance();
- const detail::extended_type_info_arg eti_key(key);
- const detail::ktmap::const_iterator it = k.find(& eti_key);
- if(k.end() == it)
- return NULL;
- return *(it);
-}
-
-BOOST_SERIALIZATION_DECL
-extended_type_info::extended_type_info(
- const unsigned int type_info_key,
- const char * key
-) :
- m_type_info_key(type_info_key),
- m_key(key)
-{
-}
-
-BOOST_SERIALIZATION_DECL
-extended_type_info::~extended_type_info(){
-}
-
-BOOST_SERIALIZATION_DECL bool
-extended_type_info::operator<(const extended_type_info &rhs) const {
- // short cut for a common cases
- if(this == & rhs)
- return false;
- if(m_type_info_key == rhs.m_type_info_key){
- return is_less_than(rhs);
- }
- if(m_type_info_key < rhs.m_type_info_key)
- return true;
- return false;
-}
-
-BOOST_SERIALIZATION_DECL bool
-extended_type_info::operator==(const extended_type_info &rhs) const {
- // short cut for a common cases
- if(this == & rhs)
- return true;
- if(m_type_info_key != rhs.m_type_info_key){
- return false;
- }
- return is_equal(rhs);
-}
-
-} // namespace serialization
-} // namespace boost
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info_typeid.cpp b/src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info_typeid.cpp
deleted file mode 100644
index 7413d2e3a40..00000000000
--- a/src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info_typeid.cpp
+++ /dev/null
@@ -1,163 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// extended_type_info_typeid.cpp: specific implementation of type info
-// that is based on typeid
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#include <algorithm>
-#include <set>
-#include <boost/assert.hpp>
-#include <typeinfo>
-#include <cstddef> // NULL
-
-#include <boost/core/no_exceptions_support.hpp>
-
-// it marks our code with proper attributes as being exported when
-// we're compiling it while marking it import when just the headers
-// is being included.
-#define BOOST_SERIALIZATION_SOURCE
-#include <boost/serialization/config.hpp>
-#include <boost/serialization/singleton.hpp>
-#include <boost/serialization/extended_type_info_typeid.hpp>
-
-namespace boost {
-namespace serialization {
-namespace typeid_system {
-
-#define EXTENDED_TYPE_INFO_TYPE_KEY 1
-
-struct type_compare
-{
- bool
- operator()(
- const extended_type_info_typeid_0 * lhs,
- const extended_type_info_typeid_0 * rhs
- ) const {
- return lhs->is_less_than(*rhs);
- }
-};
-
-typedef std::multiset<
- const extended_type_info_typeid_0 *,
- type_compare
-> tkmap;
-
-BOOST_SERIALIZATION_DECL bool
-extended_type_info_typeid_0::is_less_than(
- const boost::serialization::extended_type_info & rhs
-) const {
- // shortcut for common case
- if(this == & rhs)
- return false;
- return 0 != m_ti->before(
- *(static_cast<const extended_type_info_typeid_0 &>(rhs).m_ti)
- );
-}
-
-BOOST_SERIALIZATION_DECL bool
-extended_type_info_typeid_0::is_equal(
- const boost::serialization::extended_type_info & rhs
-) const {
- return
- // note: std::type_info == operator returns an int !!!
- // the following permits conversion to bool without a warning.
- ! (
- * m_ti
- != *(static_cast<const extended_type_info_typeid_0 &>(rhs).m_ti)
- )
- ;
-}
-
-BOOST_SERIALIZATION_DECL
-extended_type_info_typeid_0::extended_type_info_typeid_0(
- const char * key
-) :
- extended_type_info(EXTENDED_TYPE_INFO_TYPE_KEY, key),
- m_ti(NULL)
-{}
-
-BOOST_SERIALIZATION_DECL
-extended_type_info_typeid_0::~extended_type_info_typeid_0()
-{}
-
-BOOST_SERIALIZATION_DECL void
-extended_type_info_typeid_0::type_register(const std::type_info & ti){
- m_ti = & ti;
- singleton<tkmap>::get_mutable_instance().insert(this);
-}
-
-BOOST_SERIALIZATION_DECL void
-extended_type_info_typeid_0::type_unregister()
-{
- if(NULL != m_ti){
- BOOST_ASSERT(! singleton<tkmap>::is_destroyed());
- if(! singleton<tkmap>::is_destroyed()){
- tkmap & x = singleton<tkmap>::get_mutable_instance();
-
- // remove all entries in map which corresponds to this type
- // make sure that we don't use any invalidated iterators
- for(;;){
- const tkmap::iterator & it = x.find(this);
- if(it == x.end())
- break;
- x.erase(it);
- };
- }
- }
- m_ti = NULL;
-}
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-// this derivation is used for creating search arguments
-class extended_type_info_typeid_arg :
- public extended_type_info_typeid_0
-{
- virtual void * construct(unsigned int /*count*/, ...) const{
- BOOST_ASSERT(false);
- return NULL;
- }
- virtual void destroy(void const * const /*p*/) const {
- BOOST_ASSERT(false);
- }
-public:
- extended_type_info_typeid_arg(const std::type_info & ti) :
- extended_type_info_typeid_0(NULL)
- {
- // note absense of self register and key as this is used only as
- // search argument given a type_info reference and is not to
- // be added to the map.
- m_ti = & ti;
- }
- ~extended_type_info_typeid_arg(){
- m_ti = NULL;
- }
-};
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-BOOST_SERIALIZATION_DECL const extended_type_info *
-extended_type_info_typeid_0::get_extended_type_info(
- const std::type_info & ti
-) const {
- typeid_system::extended_type_info_typeid_arg etia(ti);
- const tkmap & t = singleton<tkmap>::get_const_instance();
- const tkmap::const_iterator it = t.find(& etia);
- if(t.end() == it)
- return NULL;
- return *(it);
-}
-
-} // namespace detail
-} // namespace serialization
-} // namespace boost
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/void_cast.cpp b/src/third_party/boost-1.68.0/libs/serialization/src/void_cast.cpp
deleted file mode 100644
index 405130306c8..00000000000
--- a/src/third_party/boost-1.68.0/libs/serialization/src/void_cast.cpp
+++ /dev/null
@@ -1,379 +0,0 @@
-/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
-// void_cast.cpp: implementation of run-time casting of void pointers
-
-// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
-// Use, modification and distribution is subject to the Boost Software
-// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// <gennadiy.rozental@tfn.com>
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#if (defined _MSC_VER) && (_MSC_VER == 1200)
-# pragma warning (disable : 4786) // too long name, harmless warning
-#endif
-
-// STL
-#include <set>
-#include <functional>
-#include <algorithm>
-#include <cstddef> // NULL
-#ifdef BOOST_SERIALIZATION_LOG
-#include <iostream>
-#endif
-
-// BOOST
-#include <boost/config.hpp>
-#include <boost/assert.hpp>
-
-#define BOOST_SERIALIZATION_SOURCE
-#include <boost/serialization/config.hpp>
-// it marks our code with proper attributes as being exported when
-// we're compiling it while marking it import when just the headers
-// is being included.
-#include <boost/serialization/singleton.hpp>
-#include <boost/serialization/extended_type_info.hpp>
-#include <boost/serialization/void_cast.hpp>
-
-namespace boost {
-namespace serialization {
-namespace void_cast_detail {
-
-// note that void_casters are keyed on value of
-// member extended type info records - NOT their
-// addresses. This is necessary in order for the
-// void cast operations to work across dll and exe
-// module boundries.
-bool void_caster::operator<(const void_caster & rhs) const {
- // include short cut to save time and eliminate
- // problems when when base class aren't virtual
- if(m_derived != rhs.m_derived){
- if(*m_derived < *rhs.m_derived)
- return true;
- if(*rhs.m_derived < *m_derived)
- return false;
- }
- // m_derived == rhs.m_derived
- if(m_base != rhs.m_base)
- return *m_base < *rhs.m_base;
- else
- return false;
-}
-
-struct void_caster_compare {
- bool operator()(const void_caster * lhs, const void_caster * rhs) const {
- return *lhs < *rhs;
- }
-};
-
-typedef std::set<const void_caster *, void_caster_compare> set_type;
-typedef boost::serialization::singleton<set_type> void_caster_registry;
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-// implementation of shortcut void caster
-class void_caster_shortcut : public void_caster
-{
- bool m_includes_virtual_base;
-
- void const *
- vbc_upcast(
- void const * const t
- ) const;
- void const *
- vbc_downcast(
- void const * const t
- ) const;
- virtual void const *
- upcast(void const * const t) const{
- if(m_includes_virtual_base)
- return vbc_upcast(t);
- return static_cast<const char *> ( t ) - m_difference;
- }
- virtual void const *
- downcast(void const * const t) const{
- if(m_includes_virtual_base)
- return vbc_downcast(t);
- return static_cast<const char *> ( t ) + m_difference;
- }
- virtual bool is_shortcut() const {
- return true;
- }
- virtual bool has_virtual_base() const {
- return m_includes_virtual_base;
- }
-public:
- void_caster_shortcut(
- extended_type_info const * derived,
- extended_type_info const * base,
- std::ptrdiff_t difference,
- bool includes_virtual_base,
- void_caster const * const parent
- ) :
- void_caster(derived, base, difference, parent),
- m_includes_virtual_base(includes_virtual_base)
- {
- recursive_register(includes_virtual_base);
- }
- virtual ~void_caster_shortcut(){
- recursive_unregister();
- }
-};
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-void const *
-void_caster_shortcut::vbc_downcast(
- void const * const t
-) const {
- // try to find a chain that gives us what we want
- const void_cast_detail::set_type & s
- = void_cast_detail::void_caster_registry::get_const_instance();
- void_cast_detail::set_type::const_iterator it;
- for(it = s.begin(); it != s.end(); ++it){
- // if the current candidate casts to the desired target type
- if ((*it)->m_derived == m_derived){
- // and if it's not us
- if ((*it)->m_base != m_base){
- // try to cast from the candidate base to our base
- const void * t_new;
- t_new = void_downcast(*(*it)->m_base, *m_base, t);
- // if we were successful
- if(NULL != t_new){
- // recast to our derived
- const void_caster * vc = *it;
- return vc->downcast(t_new);
- }
- }
- }
- }
- return NULL;
-}
-
-void const *
-void_caster_shortcut::vbc_upcast(
- void const * const t
-) const {
- // try to find a chain that gives us what we want
- const void_cast_detail::set_type & s
- = void_cast_detail::void_caster_registry::get_const_instance();
- void_cast_detail::set_type::const_iterator it;
- for(it = s.begin(); it != s.end(); ++it){
- // if the current candidate casts from the desired base type
- if((*it)->m_base == m_base){
- // and if it's not us
- if ((*it)->m_derived != m_derived){
- // try to cast from the candidate derived to our our derived
- const void * t_new;
- t_new = void_upcast(*m_derived, *(*it)->m_derived, t);
- if(NULL != t_new)
- return (*it)->upcast(t_new);
- }
- }
- }
- return NULL;
-}
-
-#ifdef BOOST_MSVC
-# pragma warning(push)
-# pragma warning(disable : 4511 4512)
-#endif
-
-// just used as a search key
-class void_caster_argument : public void_caster
-{
- virtual void const *
- upcast(void const * const /*t*/) const {
- BOOST_ASSERT(false);
- return NULL;
- }
- virtual void const *
- downcast( void const * const /*t*/) const {
- BOOST_ASSERT(false);
- return NULL;
- }
- virtual bool has_virtual_base() const {
- BOOST_ASSERT(false);
- return false;
- }
-public:
- void_caster_argument(
- extended_type_info const * derived,
- extended_type_info const * base
- ) :
- void_caster(derived, base)
- {}
- virtual ~void_caster_argument(){};
-};
-
-#ifdef BOOST_MSVC
-# pragma warning(pop)
-#endif
-
-// implementation of void caster base class
-BOOST_SERIALIZATION_DECL void
-void_caster::recursive_register(bool includes_virtual_base) const {
- void_cast_detail::set_type & s
- = void_cast_detail::void_caster_registry::get_mutable_instance();
-
- #ifdef BOOST_SERIALIZATION_LOG
- std::clog << "recursive_register\n";
- std::clog << m_derived->get_debug_info();
- std::clog << "<-";
- std::clog << m_base->get_debug_info();
- std::clog << "\n";
- #endif
-
- std::pair<void_cast_detail::set_type::const_iterator, bool> result;
- // comment this out for now.
- result = s.insert(this);
- //assert(result.second);
-
- // generate all implied void_casts.
- void_cast_detail::set_type::const_iterator it;
- for(it = s.begin(); it != s.end(); ++it){
- if(* m_derived == * (*it)->m_base){
- const void_caster_argument vca(
- (*it)->m_derived,
- m_base
- );
- void_cast_detail::set_type::const_iterator i;
- i = s.find(& vca);
- if(i == s.end()){
- new void_caster_shortcut(
- (*it)->m_derived,
- m_base,
- m_difference + (*it)->m_difference,
- (*it)->has_virtual_base() || includes_virtual_base,
- this
- );
- }
- }
- if(* (*it)->m_derived == * m_base){
- const void_caster_argument vca(
- m_derived,
- (*it)->m_base
- );
- void_cast_detail::set_type::const_iterator i;
- i = s.find(& vca);
- if(i == s.end()){
- new void_caster_shortcut(
- m_derived,
- (*it)->m_base,
- m_difference + (*it)->m_difference,
- (*it)->has_virtual_base() || includes_virtual_base,
- this
- );
- }
- }
- }
-}
-
-BOOST_SERIALIZATION_DECL void
-void_caster::recursive_unregister() const {
- BOOST_ASSERT(! void_caster_registry::is_destroyed());
- if(void_caster_registry::is_destroyed())
- return;
-
- #ifdef BOOST_SERIALIZATION_LOG
- std::clog << "recursive_unregister\n";
- std::clog << m_derived->get_debug_info();
- std::clog << "<-";
- std::clog << m_base->get_debug_info();
- std::clog << "\n";
- #endif
-
- void_cast_detail::set_type & s
- = void_caster_registry::get_mutable_instance();
-
- // delete all shortcuts which use this primitive
- void_cast_detail::set_type::iterator it;
- for(it = s.begin(); it != s.end();){
- const void_caster * vc = *it;
- if(vc == this){
- s.erase(it++);
- }
- else
- if(vc->m_parent == this){
- s.erase(it);
- delete vc;
- it = s.begin();
- }
- else
- it++;
- }
-}
-
-} // namespace void_cast_detail
-
-BOOST_SYMBOL_VISIBLE void const *
-void_upcast(
- extended_type_info const & derived,
- extended_type_info const & base,
- void const * const t
-);
-
-// Given a void *, assume that it really points to an instance of one type
-// and alter it so that it would point to an instance of a related type.
-// Return the altered pointer. If there exists no sequence of casts that
-// can transform from_type to to_type, return a NULL.
-BOOST_SERIALIZATION_DECL void const *
-void_upcast(
- extended_type_info const & derived,
- extended_type_info const & base,
- void const * const t
-){
- // same types - trivial case
- if (derived == base)
- return t;
-
- // check to see if base/derived pair is found in the registry
- const void_cast_detail::set_type & s
- = void_cast_detail::void_caster_registry::get_const_instance();
- const void_cast_detail::void_caster_argument ca(& derived, & base);
-
- void_cast_detail::set_type::const_iterator it;
- it = s.find(& ca);
- if (s.end() != it)
- return (*it)->upcast(t);
-
- return NULL;
-}
-
-BOOST_SYMBOL_VISIBLE void const *
-void_downcast(
- extended_type_info const & derived,
- extended_type_info const & base,
- void const * const t
-);
-
-BOOST_SERIALIZATION_DECL void const *
-void_downcast(
- extended_type_info const & derived,
- extended_type_info const & base,
- void const * const t
-){
- // same types - trivial case
- if (derived == base)
- return t;
-
- // check to see if base/derived pair is found in the registry
- const void_cast_detail::set_type & s
- = void_cast_detail::void_caster_registry::get_const_instance();
- const void_cast_detail::void_caster_argument ca(& derived, & base);
-
- void_cast_detail::set_type::const_iterator it;
- it = s.find(&ca);
- if (s.end() != it)
- return(*it)->downcast(t);
-
- return NULL;
-}
-
-} // namespace serialization
-} // namespace boost
diff --git a/src/third_party/boost-1.68.0/libs/system/src/error_code.cpp b/src/third_party/boost-1.68.0/libs/system/src/error_code.cpp
deleted file mode 100644
index aa628ab304c..00000000000
--- a/src/third_party/boost-1.68.0/libs/system/src/error_code.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// error_code support implementation file ----------------------------------//
-
-// Copyright Beman Dawes 2002, 2006
-
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-// See library home page at http://www.boost.org/libs/system
-
-//----------------------------------------------------------------------------//
-
-// define BOOST_SYSTEM_SOURCE so that <boost/system/config.hpp> knows
-// the library is being built (possibly exporting rather than importing code)
-#define BOOST_SYSTEM_SOURCE
-
-#include <boost/system/error_code.hpp>
-
-#ifndef BOOST_ERROR_CODE_HEADER_ONLY
-#include <boost/system/detail/error_code.ipp>
-#endif
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/future.cpp b/src/third_party/boost-1.68.0/libs/thread/src/future.cpp
deleted file mode 100644
index 35b8853fa57..00000000000
--- a/src/third_party/boost-1.68.0/libs/thread/src/future.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-// (C) Copyright 2012 Vicente J. Botet Escriba
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/thread/detail/config.hpp>
-
-#ifdef BOOST_NO_EXCEPTIONS
-namespace boost
-{
- void shared_state_base::notify_deferred() {}
-}
-
-#else
-
-
-#include <boost/thread/futures/future_error_code.hpp>
-#include <string>
-
-namespace boost
-{
-
- namespace thread_detail
- {
-
- class future_error_category :
- public boost::system::error_category
- {
- public:
- virtual const char* name() const BOOST_NOEXCEPT;
- virtual std::string message(int ev) const;
- };
-
- const char*
- future_error_category::name() const BOOST_NOEXCEPT
- {
- return "future";
- }
-
- std::string
- future_error_category::message(int ev) const
- {
- switch (BOOST_SCOPED_ENUM_NATIVE(future_errc)(ev))
- {
- case future_errc::broken_promise:
- return std::string("The associated promise has been destructed prior "
- "to the associated state becoming ready.");
- case future_errc::future_already_retrieved:
- return std::string("The future has already been retrieved from "
- "the promise or packaged_task.");
- case future_errc::promise_already_satisfied:
- return std::string("The state of the promise has already been set.");
- case future_errc::no_state:
- return std::string("Operation not permitted on an object without "
- "an associated state.");
- }
- return std::string("unspecified future_errc value\n");
- }
- future_error_category future_error_category_var;
- }
-
- BOOST_THREAD_DECL
- const system::error_category&
- future_category() BOOST_NOEXCEPT
- {
- return thread_detail::future_error_category_var;
- }
-
-}
-#endif
-
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/pthread/thread.cpp b/src/third_party/boost-1.68.0/libs/thread/src/pthread/thread.cpp
deleted file mode 100644
index bb3d9a17256..00000000000
--- a/src/third_party/boost-1.68.0/libs/thread/src/pthread/thread.cpp
+++ /dev/null
@@ -1,796 +0,0 @@
-// Copyright (C) 2001-2003
-// William E. Kempf
-// Copyright (C) 2007-8 Anthony Williams
-// (C) Copyright 2011-2012 Vicente J. Botet Escriba
-//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
-// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/thread/detail/config.hpp>
-
-#include <boost/thread/thread_only.hpp>
-#if defined BOOST_THREAD_USES_DATETIME
-#include <boost/thread/xtime.hpp>
-#endif
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/locks.hpp>
-#include <boost/thread/once.hpp>
-#include <boost/thread/tss.hpp>
-#include <boost/thread/future.hpp>
-
-#ifdef __GLIBC__
-#include <sys/sysinfo.h>
-#elif defined(__APPLE__) || defined(__FreeBSD__)
-#include <sys/types.h>
-#include <sys/sysctl.h>
-#elif defined BOOST_HAS_UNISTD_H
-#include <unistd.h>
-#endif
-
-#if defined(__VXWORKS__)
-#include <vxCpuLib.h>
-#endif
-
-#include <boost/algorithm/string/split.hpp>
-#include <boost/algorithm/string/trim.hpp>
-#include <boost/lexical_cast.hpp>
-
-#include <fstream>
-#include <string>
-#include <set>
-#include <vector>
-#include <string.h> // memcmp.
-
-namespace boost
-{
- namespace detail
- {
- thread_data_base::~thread_data_base()
- {
- for (notify_list_t::iterator i = notify.begin(), e = notify.end();
- i != e; ++i)
- {
- i->second->unlock();
- i->first->notify_all();
- }
-//#ifndef BOOST_NO_EXCEPTIONS
- for (async_states_t::iterator i = async_states_.begin(), e = async_states_.end();
- i != e; ++i)
- {
- (*i)->notify_deferred();
- }
-//#endif
- }
-
- struct thread_exit_callback_node
- {
- boost::detail::thread_exit_function_base* func;
- thread_exit_callback_node* next;
-
- thread_exit_callback_node(boost::detail::thread_exit_function_base* func_,
- thread_exit_callback_node* next_):
- func(func_),next(next_)
- {}
- };
-
- namespace
- {
-#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
- boost::once_flag current_thread_tls_init_flag;
-#else
- boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT;
-#endif
- pthread_key_t current_thread_tls_key;
-
- extern "C"
- {
- static void tls_destructor(void* data)
- {
- //boost::detail::thread_data_base* thread_info=static_cast<boost::detail::thread_data_base*>(data);
- boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(data)->shared_from_this();
-
- if(thread_info)
- {
- while(!thread_info->tss_data.empty() || thread_info->thread_exit_callbacks)
- {
-
- while(thread_info->thread_exit_callbacks)
- {
- detail::thread_exit_callback_node* const current_node=thread_info->thread_exit_callbacks;
- thread_info->thread_exit_callbacks=current_node->next;
- if(current_node->func)
- {
- (*current_node->func)();
- delete current_node->func;
- }
- delete current_node;
- }
- while (!thread_info->tss_data.empty())
- {
- std::map<void const*,detail::tss_data_node>::iterator current
- = thread_info->tss_data.begin();
- if(current->second.func && (current->second.value!=0))
- {
- (*current->second.func)(current->second.value);
- }
- thread_info->tss_data.erase(current);
- }
- }
- thread_info->self.reset();
- }
- }
- }
-
-#if defined BOOST_THREAD_PATCH
- struct delete_current_thread_tls_key_on_dlclose_t
- {
- delete_current_thread_tls_key_on_dlclose_t()
- {
- }
- ~delete_current_thread_tls_key_on_dlclose_t()
- {
- const boost::once_flag uninitialized = BOOST_ONCE_INIT;
- if (memcmp(&current_thread_tls_init_flag, &uninitialized, sizeof(boost::once_flag)))
- {
- void* data = pthread_getspecific(current_thread_tls_key);
- if (data)
- tls_destructor(data);
- pthread_key_delete(current_thread_tls_key);
- }
- }
- };
- delete_current_thread_tls_key_on_dlclose_t delete_current_thread_tls_key_on_dlclose;
-#endif
- void create_current_thread_tls_key()
- {
- BOOST_VERIFY(!pthread_key_create(&current_thread_tls_key,&tls_destructor));
- }
- }
-
- boost::detail::thread_data_base* get_current_thread_data()
- {
- boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
- return (boost::detail::thread_data_base*)pthread_getspecific(current_thread_tls_key);
- }
-
- void set_current_thread_data(detail::thread_data_base* new_data)
- {
- boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
- BOOST_VERIFY(!pthread_setspecific(current_thread_tls_key,new_data));
- }
- }
-
- namespace
- {
- extern "C"
- {
- static void* thread_proxy(void* param)
- {
- //boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(param)->self;
- boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(param)->shared_from_this();
- thread_info->self.reset();
- detail::set_current_thread_data(thread_info.get());
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- BOOST_TRY
- {
-#endif
- thread_info->run();
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
-
- }
- BOOST_CATCH (thread_interrupted const&)
- {
- }
-// Removed as it stops the debugger identifying the cause of the exception
-// Unhandled exceptions still cause the application to terminate
-// BOOST_CATCH(...)
-// {
-// throw;
-//
-// std::terminate();
-// }
- BOOST_CATCH_END
-#endif
- detail::tls_destructor(thread_info.get());
- detail::set_current_thread_data(0);
- boost::lock_guard<boost::mutex> lock(thread_info->data_mutex);
- thread_info->done=true;
- thread_info->done_condition.notify_all();
-
- return 0;
- }
- }
- }
- namespace detail
- {
- struct externally_launched_thread:
- detail::thread_data_base
- {
- externally_launched_thread()
- {
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- interrupt_enabled=false;
-#endif
- }
- ~externally_launched_thread() {
- BOOST_ASSERT(notify.empty());
- notify.clear();
-//#ifndef BOOST_NO_EXCEPTIONS
- BOOST_ASSERT(async_states_.empty());
- async_states_.clear();
-//#endif
- }
- void run()
- {}
- void notify_all_at_thread_exit(condition_variable*, mutex*)
- {}
-
- private:
- externally_launched_thread(externally_launched_thread&);
- void operator=(externally_launched_thread&);
- };
-
- thread_data_base* make_external_thread_data()
- {
- thread_data_base* const me(detail::heap_new<externally_launched_thread>());
- me->self.reset(me);
- set_current_thread_data(me);
- return me;
- }
-
-
- thread_data_base* get_or_make_current_thread_data()
- {
- thread_data_base* current_thread_data(get_current_thread_data());
- if(!current_thread_data)
- {
- current_thread_data=make_external_thread_data();
- }
- return current_thread_data;
- }
-
- }
-
-
- thread::thread() BOOST_NOEXCEPT
- {}
-
- bool thread::start_thread_noexcept()
- {
- thread_info->self=thread_info;
- int const res = pthread_create(&thread_info->thread_handle, 0, &thread_proxy, thread_info.get());
- if (res != 0)
- {
- thread_info->self.reset();
- return false;
- }
- return true;
- }
-
- bool thread::start_thread_noexcept(const attributes& attr)
- {
- thread_info->self=thread_info;
- const attributes::native_handle_type* h = attr.native_handle();
- int res = pthread_create(&thread_info->thread_handle, h, &thread_proxy, thread_info.get());
- if (res != 0)
- {
- thread_info->self.reset();
- return false;
- }
- int detached_state;
- res = pthread_attr_getdetachstate(h, &detached_state);
- if (res != 0)
- {
- thread_info->self.reset();
- return false;
- }
- if (PTHREAD_CREATE_DETACHED==detached_state)
- {
- detail::thread_data_ptr local_thread_info;
- thread_info.swap(local_thread_info);
-
- if(local_thread_info)
- {
- //lock_guard<mutex> lock(local_thread_info->data_mutex);
- if(!local_thread_info->join_started)
- {
- //BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle));
- local_thread_info->join_started=true;
- local_thread_info->joined=true;
- }
- }
- }
- return true;
- }
-
-
-
- detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
- {
- return thread_info;
- }
-
- bool thread::join_noexcept()
- {
- detail::thread_data_ptr const local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- bool do_join=false;
-
- {
- unique_lock<mutex> lock(local_thread_info->data_mutex);
- while(!local_thread_info->done)
- {
- local_thread_info->done_condition.wait(lock);
- }
- do_join=!local_thread_info->join_started;
-
- if(do_join)
- {
- local_thread_info->join_started=true;
- }
- else
- {
- while(!local_thread_info->joined)
- {
- local_thread_info->done_condition.wait(lock);
- }
- }
- }
- if(do_join)
- {
- void* result=0;
- BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result));
- lock_guard<mutex> lock(local_thread_info->data_mutex);
- local_thread_info->joined=true;
- local_thread_info->done_condition.notify_all();
- }
-
- if(thread_info==local_thread_info)
- {
- thread_info.reset();
- }
- return true;
- }
- else
- {
- return false;
- }
- }
-
- bool thread::do_try_join_until_noexcept(detail::internal_platform_timepoint const &timeout, bool& res)
- {
- detail::thread_data_ptr const local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- bool do_join=false;
-
- {
- unique_lock<mutex> lock(local_thread_info->data_mutex);
- while(!local_thread_info->done)
- {
- if(!local_thread_info->done_condition.do_wait_until(lock,timeout)) break; // timeout occurred
- }
- if(!local_thread_info->done)
- {
- res=false;
- return true;
- }
- do_join=!local_thread_info->join_started;
-
- if(do_join)
- {
- local_thread_info->join_started=true;
- }
- else
- {
- while(!local_thread_info->joined)
- {
- local_thread_info->done_condition.wait(lock);
- }
- }
- }
- if(do_join)
- {
- void* result=0;
- BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result));
- lock_guard<mutex> lock(local_thread_info->data_mutex);
- local_thread_info->joined=true;
- local_thread_info->done_condition.notify_all();
- }
-
- if(thread_info==local_thread_info)
- {
- thread_info.reset();
- }
- res=true;
- return true;
- }
- else
- {
- return false;
- }
- }
-
- bool thread::joinable() const BOOST_NOEXCEPT
- {
- return (get_thread_info)()?true:false;
- }
-
-
- void thread::detach()
- {
- detail::thread_data_ptr local_thread_info;
- thread_info.swap(local_thread_info);
-
- if(local_thread_info)
- {
- lock_guard<mutex> lock(local_thread_info->data_mutex);
- if(!local_thread_info->join_started)
- {
- BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle));
- local_thread_info->join_started=true;
- local_thread_info->joined=true;
- }
- }
- }
-
- namespace this_thread
- {
- namespace no_interruption_point
- {
- namespace hidden
- {
- void BOOST_THREAD_DECL sleep_for_internal(const detail::platform_duration& ts)
- {
- if (ts > detail::platform_duration::zero())
- {
- // Use pthread_delay_np or nanosleep whenever possible here in the no_interruption_point
- // namespace because they do not provide an interruption point.
- # if defined(BOOST_HAS_PTHREAD_DELAY_NP)
- # if defined(__IBMCPP__) || defined(_AIX)
- BOOST_VERIFY(!pthread_delay_np(const_cast<timespec*>(&ts.getTs())));
- # else
- BOOST_VERIFY(!pthread_delay_np(&ts.getTs()));
- # endif
- # elif defined(BOOST_HAS_NANOSLEEP)
- nanosleep(&ts.getTs(), 0);
- # else
- // This should never be reached due to BOOST_THREAD_SLEEP_FOR_IS_STEADY
- # endif
- }
- }
- }
- }
-
- void yield() BOOST_NOEXCEPT
- {
-# if defined(BOOST_HAS_SCHED_YIELD)
- BOOST_VERIFY(!sched_yield());
-# elif defined(BOOST_HAS_PTHREAD_YIELD)
- BOOST_VERIFY(!pthread_yield());
-//# elif defined BOOST_THREAD_USES_DATETIME
-// xtime xt;
-// xtime_get(&xt, TIME_UTC_);
-// sleep(xt);
-// sleep_for(chrono::milliseconds(0));
-# else
- mutex mx;
- unique_lock<mutex> lock(mx);
- condition_variable cond;
- cond.do_wait_until(lock, detail::internal_platform_clock::now())
-# endif
- }
- }
- unsigned thread::hardware_concurrency() BOOST_NOEXCEPT
- {
-#if defined(PTW32_VERSION) || defined(__hpux)
- return pthread_num_processors_np();
-#elif defined(__APPLE__) || defined(__FreeBSD__)
- int count;
- size_t size=sizeof(count);
- return sysctlbyname("hw.ncpu",&count,&size,NULL,0)?0:count;
-#elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
- int const count=sysconf(_SC_NPROCESSORS_ONLN);
- return (count>0)?count:0;
-#elif defined(__VXWORKS__)
- cpuset_t set = ::vxCpuEnabledGet();
- #ifdef __DCC__
- int i;
- for( i = 0; set; ++i)
- {
- set &= set -1;
- }
- return(i);
- #else
- return (__builtin_popcount(set) );
- #endif
-#elif defined(__GLIBC__)
- return get_nprocs();
-#else
- return 0;
-#endif
- }
-
- unsigned thread::physical_concurrency() BOOST_NOEXCEPT
- {
-#ifdef __linux__
- try {
- using namespace std;
-
- ifstream proc_cpuinfo ("/proc/cpuinfo");
-
- const string physical_id("physical id"), core_id("core id");
-
- typedef std::pair<unsigned, unsigned> core_entry; // [physical ID, core id]
-
- std::set<core_entry> cores;
-
- core_entry current_core_entry;
-
- string line;
- while ( getline(proc_cpuinfo, line) ) {
- if (line.empty())
- continue;
-
- vector<string> key_val(2);
- boost::split(key_val, line, boost::is_any_of(":"));
-
- if (key_val.size() != 2)
- return hardware_concurrency();
-
- string key = key_val[0];
- string value = key_val[1];
- boost::trim(key);
- boost::trim(value);
-
- if (key == physical_id) {
- current_core_entry.first = boost::lexical_cast<unsigned>(value);
- continue;
- }
-
- if (key == core_id) {
- current_core_entry.second = boost::lexical_cast<unsigned>(value);
- cores.insert(current_core_entry);
- continue;
- }
- }
- // Fall back to hardware_concurrency() in case
- // /proc/cpuinfo is formatted differently than we expect.
- return cores.size() != 0 ? cores.size() : hardware_concurrency();
- } catch(...) {
- return hardware_concurrency();
- }
-#elif defined(__APPLE__)
- int count;
- size_t size=sizeof(count);
- return sysctlbyname("hw.physicalcpu",&count,&size,NULL,0)?0:count;
-#else
- return hardware_concurrency();
-#endif
- }
-
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- void thread::interrupt()
- {
- detail::thread_data_ptr const local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- lock_guard<mutex> lk(local_thread_info->data_mutex);
- local_thread_info->interrupt_requested=true;
- if(local_thread_info->current_cond)
- {
- boost::pthread::pthread_mutex_scoped_lock internal_lock(local_thread_info->cond_mutex);
- BOOST_VERIFY(!pthread_cond_broadcast(local_thread_info->current_cond));
- }
- }
- }
-
- bool thread::interruption_requested() const BOOST_NOEXCEPT
- {
- detail::thread_data_ptr const local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- lock_guard<mutex> lk(local_thread_info->data_mutex);
- return local_thread_info->interrupt_requested;
- }
- else
- {
- return false;
- }
- }
-#endif
-
- thread::native_handle_type thread::native_handle()
- {
- detail::thread_data_ptr const local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- lock_guard<mutex> lk(local_thread_info->data_mutex);
- return local_thread_info->thread_handle;
- }
- else
- {
- return pthread_t();
- }
- }
-
-
-
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- namespace this_thread
- {
- void interruption_point()
- {
-#ifndef BOOST_NO_EXCEPTIONS
- boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
- if(thread_info && thread_info->interrupt_enabled)
- {
- lock_guard<mutex> lg(thread_info->data_mutex);
- if(thread_info->interrupt_requested)
- {
- thread_info->interrupt_requested=false;
- throw thread_interrupted();
- }
- }
-#endif
- }
-
- bool interruption_enabled() BOOST_NOEXCEPT
- {
- boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
- return thread_info && thread_info->interrupt_enabled;
- }
-
- bool interruption_requested() BOOST_NOEXCEPT
- {
- boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
- if(!thread_info)
- {
- return false;
- }
- else
- {
- lock_guard<mutex> lg(thread_info->data_mutex);
- return thread_info->interrupt_requested;
- }
- }
-
- disable_interruption::disable_interruption() BOOST_NOEXCEPT:
- interruption_was_enabled(interruption_enabled())
- {
- if(interruption_was_enabled)
- {
- detail::get_current_thread_data()->interrupt_enabled=false;
- }
- }
-
- disable_interruption::~disable_interruption() BOOST_NOEXCEPT
- {
- if(detail::get_current_thread_data())
- {
- detail::get_current_thread_data()->interrupt_enabled=interruption_was_enabled;
- }
- }
-
- restore_interruption::restore_interruption(disable_interruption& d) BOOST_NOEXCEPT
- {
- if(d.interruption_was_enabled)
- {
- detail::get_current_thread_data()->interrupt_enabled=true;
- }
- }
-
- restore_interruption::~restore_interruption() BOOST_NOEXCEPT
- {
- if(detail::get_current_thread_data())
- {
- detail::get_current_thread_data()->interrupt_enabled=false;
- }
- }
- }
-#endif
-
- namespace detail
- {
- void add_thread_exit_function(thread_exit_function_base* func)
- {
- detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
- thread_exit_callback_node* const new_node=
- heap_new<thread_exit_callback_node>(func,current_thread_data->thread_exit_callbacks);
- current_thread_data->thread_exit_callbacks=new_node;
- }
-
- tss_data_node* find_tss_data(void const* key)
- {
- detail::thread_data_base* const current_thread_data(get_current_thread_data());
- if(current_thread_data)
- {
- std::map<void const*,tss_data_node>::iterator current_node=
- current_thread_data->tss_data.find(key);
- if(current_node!=current_thread_data->tss_data.end())
- {
- return &current_node->second;
- }
- }
- return 0;
- }
-
- void* get_tss_data(void const* key)
- {
- if(tss_data_node* const current_node=find_tss_data(key))
- {
- return current_node->value;
- }
- return 0;
- }
-
- void add_new_tss_node(void const* key,
- boost::shared_ptr<tss_cleanup_function> func,
- void* tss_data)
- {
- detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
- current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data)));
- }
-
- void erase_tss_node(void const* key)
- {
- detail::thread_data_base* const current_thread_data(get_current_thread_data());
- if(current_thread_data)
- {
- current_thread_data->tss_data.erase(key);
- }
- }
-
- void set_tss_data(void const* key,
- boost::shared_ptr<tss_cleanup_function> func,
- void* tss_data,bool cleanup_existing)
- {
- if(tss_data_node* const current_node=find_tss_data(key))
- {
- if(cleanup_existing && current_node->func && (current_node->value!=0))
- {
- (*current_node->func)(current_node->value);
- }
- if(func || (tss_data!=0))
- {
- current_node->func=func;
- current_node->value=tss_data;
- }
- else
- {
- erase_tss_node(key);
- }
- }
- else if(func || (tss_data!=0))
- {
- add_new_tss_node(key,func,tss_data);
- }
- }
- }
-
- BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
- {
- detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
- if(current_thread_data)
- {
- current_thread_data->notify_all_at_thread_exit(&cond, lk.release());
- }
- }
-
-//#ifndef BOOST_NO_EXCEPTIONS
-namespace detail {
-
- void BOOST_THREAD_DECL make_ready_at_thread_exit(shared_ptr<shared_state_base> as)
- {
- detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
- if(current_thread_data)
- {
- current_thread_data->make_ready_at_thread_exit(as);
- }
- }
-}
-//#endif
-
-
-}
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/tss_null.cpp b/src/third_party/boost-1.68.0/libs/thread/src/tss_null.cpp
deleted file mode 100644
index b5029f19969..00000000000
--- a/src/third_party/boost-1.68.0/libs/thread/src/tss_null.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-// (C) Copyright Michael Glassford 2004.
-// (C) Copyright 2007 Anthony Williams
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/thread/detail/config.hpp>
-
-#if defined(BOOST_HAS_WINTHREADS) && (defined(BOOST_THREAD_BUILD_LIB) || defined(BOOST_THREAD_TEST) || defined(UNDER_CE)) && (!defined(_MSC_VER) || defined(UNDER_CE))
-
-namespace boost
-{
- /*
- This file is a "null" implementation of tss cleanup; it's
- purpose is to to eliminate link errors in cases
- where it is known that tss cleanup is not needed.
- */
-
- void tss_cleanup_implemented(void)
- {
- /*
- This function's sole purpose is to cause a link error in cases where
- automatic tss cleanup is not implemented by Boost.Threads as a
- reminder that user code is responsible for calling the necessary
- functions at the appropriate times (and for implementing an a
- tss_cleanup_implemented() function to eliminate the linker's
- missing symbol error).
-
- If Boost.Threads later implements automatic tss cleanup in cases
- where it currently doesn't (which is the plan), the duplicate
- symbol error will warn the user that their custom solution is no
- longer needed and can be removed.
- */
- }
-
-}
-
-#endif //defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB) && !defined(_MSC_VER)
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/win32/thread.cpp b/src/third_party/boost-1.68.0/libs/thread/src/win32/thread.cpp
deleted file mode 100644
index 9a087f1ac0f..00000000000
--- a/src/third_party/boost-1.68.0/libs/thread/src/win32/thread.cpp
+++ /dev/null
@@ -1,977 +0,0 @@
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-// (C) Copyright 2007 Anthony Williams
-// (C) Copyright 2007 David Deakins
-// (C) Copyright 2011-2018 Vicente J. Botet Escriba
-
-//#define BOOST_THREAD_VERSION 3
-
-#include <boost/winapi/config.hpp>
-#include <boost/thread/thread_only.hpp>
-#include <boost/thread/once.hpp>
-#include <boost/thread/tss.hpp>
-#include <boost/thread/condition_variable.hpp>
-#include <boost/thread/detail/tss_hooks.hpp>
-#include <boost/thread/future.hpp>
-#include <boost/assert.hpp>
-#include <boost/cstdint.hpp>
-#if defined BOOST_THREAD_USES_DATETIME
-#include <boost/date_time/posix_time/conversion.hpp>
-#include <boost/thread/thread_time.hpp>
-#endif
-#include <boost/thread/csbl/memory/unique_ptr.hpp>
-#include <memory>
-#include <algorithm>
-#ifndef UNDER_CE
-#include <process.h>
-#endif
-#include <stdio.h>
-#include <windows.h>
-#include <boost/predef/platform.h>
-
-#if BOOST_PLAT_WINDOWS_RUNTIME
-#include <mutex>
-#include <atomic>
-#include <Activation.h>
-#include <wrl\client.h>
-#include <wrl\event.h>
-#include <wrl\wrappers\corewrappers.h>
-#include <wrl\ftm.h>
-#include <windows.system.threading.h>
-#pragma comment(lib, "runtimeobject.lib")
-#endif
-
-namespace boost
-{
- namespace detail
- {
- thread_data_base::~thread_data_base()
- {
- for (notify_list_t::iterator i = notify.begin(), e = notify.end();
- i != e; ++i)
- {
- i->second->unlock();
- i->first->notify_all();
- }
-//#ifndef BOOST_NO_EXCEPTIONS
- for (async_states_t::iterator i = async_states_.begin(), e = async_states_.end();
- i != e; ++i)
- {
- (*i)->notify_deferred();
- }
-//#endif
- }
- }
-
- namespace
- {
-#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
- boost::once_flag current_thread_tls_init_flag;
-#else
- boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT;
-#endif
-#if defined(UNDER_CE)
- // Windows CE does not define the TLS_OUT_OF_INDEXES constant.
-#define TLS_OUT_OF_INDEXES 0xFFFFFFFF
-#endif
-#if !BOOST_PLAT_WINDOWS_RUNTIME
- DWORD current_thread_tls_key=TLS_OUT_OF_INDEXES;
-#else
- __declspec(thread) boost::detail::thread_data_base* current_thread_data_base;
-#endif
-
- void create_current_thread_tls_key()
- {
- tss_cleanup_implemented(); // if anyone uses TSS, we need the cleanup linked in
-#if !BOOST_PLAT_WINDOWS_RUNTIME
- current_thread_tls_key=TlsAlloc();
- BOOST_ASSERT(current_thread_tls_key!=TLS_OUT_OF_INDEXES);
-#endif
- }
-
- void cleanup_tls_key()
- {
-#if !BOOST_PLAT_WINDOWS_RUNTIME
- if(current_thread_tls_key!=TLS_OUT_OF_INDEXES)
- {
- TlsFree(current_thread_tls_key);
- current_thread_tls_key=TLS_OUT_OF_INDEXES;
- }
-#endif
- }
-
- void set_current_thread_data(detail::thread_data_base* new_data)
- {
- boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
-#if BOOST_PLAT_WINDOWS_RUNTIME
- current_thread_data_base = new_data;
-#else
- if (current_thread_tls_key != TLS_OUT_OF_INDEXES)
- {
- BOOST_VERIFY(TlsSetValue(current_thread_tls_key, new_data));
- }
- else
- {
- BOOST_VERIFY(false);
- //boost::throw_exception(thread_resource_error());
- }
-#endif
- }
- }
-
- namespace detail
- {
- thread_data_base* get_current_thread_data()
- {
-#if BOOST_PLAT_WINDOWS_RUNTIME
- return current_thread_data_base;
-#else
- if (current_thread_tls_key == TLS_OUT_OF_INDEXES)
- {
- return 0;
- }
- return (detail::thread_data_base*)TlsGetValue(current_thread_tls_key);
-#endif
- }
- }
-
- namespace
- {
-#ifndef BOOST_HAS_THREADEX
-// Windows CE doesn't define _beginthreadex
-
- struct ThreadProxyData
- {
- typedef unsigned (__stdcall* func)(void*);
- func start_address_;
- void* arglist_;
- ThreadProxyData(func start_address,void* arglist) : start_address_(start_address), arglist_(arglist) {}
- };
-
- DWORD WINAPI ThreadProxy(LPVOID args)
- {
- boost::csbl::unique_ptr<ThreadProxyData> data(reinterpret_cast<ThreadProxyData*>(args));
- DWORD ret=data->start_address_(data->arglist_);
- return ret;
- }
-
- inline uintptr_t _beginthreadex(void* security, unsigned stack_size, unsigned (__stdcall* start_address)(void*),
- void* arglist, unsigned initflag, unsigned* thrdaddr)
- {
- DWORD threadID;
- ThreadProxyData* data = new ThreadProxyData(start_address,arglist);
- HANDLE hthread=CreateThread(static_cast<LPSECURITY_ATTRIBUTES>(security),stack_size,ThreadProxy,
- data,initflag,&threadID);
- if (hthread==0) {
- delete data;
- return 0;
- }
- *thrdaddr=threadID;
- return reinterpret_cast<uintptr_t const>(hthread);
- }
-
-#endif
-
- }
-
- namespace detail
- {
- struct thread_exit_callback_node
- {
- boost::detail::thread_exit_function_base* func;
- thread_exit_callback_node* next;
-
- thread_exit_callback_node(boost::detail::thread_exit_function_base* func_,
- thread_exit_callback_node* next_):
- func(func_),next(next_)
- {}
- };
-
- }
-
-#if BOOST_PLAT_WINDOWS_RUNTIME
- namespace detail
- {
- std::atomic_uint threadCount;
-
- bool win32::scoped_winrt_thread::start(thread_func address, void *parameter, unsigned int *thrdId)
- {
- Microsoft::WRL::ComPtr<ABI::Windows::System::Threading::IThreadPoolStatics> threadPoolFactory;
- HRESULT hr = ::Windows::Foundation::GetActivationFactory(
- Microsoft::WRL::Wrappers::HStringReference(RuntimeClass_Windows_System_Threading_ThreadPool).Get(),
- &threadPoolFactory);
- if (hr != S_OK)
- {
- return false;
- }
-
- // Create event for tracking work item completion.
- *thrdId = ++threadCount;
- handle completionHandle = CreateEventExW(NULL, NULL, 0, EVENT_ALL_ACCESS);
- if (!completionHandle)
- {
- return false;
- }
- m_completionHandle = completionHandle;
-
- // Create new work item.
- Microsoft::WRL::ComPtr<ABI::Windows::System::Threading::IWorkItemHandler> workItem =
- Microsoft::WRL::Callback<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, ABI::Windows::System::Threading::IWorkItemHandler, Microsoft::WRL::FtmBase>>
- ([address, parameter, completionHandle](ABI::Windows::Foundation::IAsyncAction *)
- {
- // Add a reference since we need to access the completionHandle after the thread_start_function.
- // This is to handle cases where detach() was called and run_thread_exit_callbacks() would end
- // up closing the handle.
- ::boost::detail::thread_data_base* const thread_info(reinterpret_cast<::boost::detail::thread_data_base*>(parameter));
- intrusive_ptr_add_ref(thread_info);
-
- __try
- {
- address(parameter);
- }
- __finally
- {
- SetEvent(completionHandle);
- intrusive_ptr_release(thread_info);
- }
- return S_OK;
- });
-
- // Schedule work item on the threadpool.
- Microsoft::WRL::ComPtr<ABI::Windows::Foundation::IAsyncAction> asyncAction;
- hr = threadPoolFactory->RunWithPriorityAndOptionsAsync(
- workItem.Get(),
- ABI::Windows::System::Threading::WorkItemPriority_Normal,
- ABI::Windows::System::Threading::WorkItemOptions_TimeSliced,
- &asyncAction);
- return hr == S_OK;
- }
- }
-#endif
-
- namespace
- {
- void run_thread_exit_callbacks()
- {
- detail::thread_data_ptr current_thread_data(detail::get_current_thread_data(),false);
- if(current_thread_data)
- {
- while(! current_thread_data->tss_data.empty() || current_thread_data->thread_exit_callbacks)
- {
- while(current_thread_data->thread_exit_callbacks)
- {
- detail::thread_exit_callback_node* const current_node=current_thread_data->thread_exit_callbacks;
- current_thread_data->thread_exit_callbacks=current_node->next;
- if(current_node->func)
- {
- (*current_node->func)();
- boost::detail::heap_delete(current_node->func);
- }
- boost::detail::heap_delete(current_node);
- }
- while (!current_thread_data->tss_data.empty())
- {
- std::map<void const*,detail::tss_data_node>::iterator current
- = current_thread_data->tss_data.begin();
- if(current->second.func && (current->second.value!=0))
- {
- (*current->second.func)(current->second.value);
- }
- current_thread_data->tss_data.erase(current);
- }
- }
- set_current_thread_data(0);
- }
- }
-
- unsigned __stdcall thread_start_function(void* param)
- {
- detail::thread_data_base* const thread_info(reinterpret_cast<detail::thread_data_base*>(param));
- set_current_thread_data(thread_info);
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- BOOST_TRY
- {
-#endif
- thread_info->run();
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- }
- BOOST_CATCH(thread_interrupted const&)
- {
- }
- // Unhandled exceptions still cause the application to terminate
- BOOST_CATCH_END
-#endif
- run_thread_exit_callbacks();
- return 0;
- }
- }
-
- thread::thread() BOOST_NOEXCEPT
- {}
-
- bool thread::start_thread_noexcept()
- {
-#if BOOST_PLAT_WINDOWS_RUNTIME
- intrusive_ptr_add_ref(thread_info.get());
- if (!thread_info->thread_handle.start(&thread_start_function, thread_info.get(), &thread_info->id))
- {
- intrusive_ptr_release(thread_info.get());
- return false;
- }
- return true;
-#else
- uintptr_t const new_thread=_beginthreadex(0,0,&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);
- if(!new_thread)
- {
- return false;
- }
- intrusive_ptr_add_ref(thread_info.get());
- thread_info->thread_handle=(detail::win32::handle)(new_thread);
- ResumeThread(thread_info->thread_handle);
- return true;
-#endif
- }
-
- bool thread::start_thread_noexcept(const attributes& attr)
- {
-#if BOOST_PLAT_WINDOWS_RUNTIME
- // Stack size isn't supported with Windows Runtime.
- attr;
- return start_thread_noexcept();
-#else
- uintptr_t const new_thread=_beginthreadex(0,static_cast<unsigned int>(attr.get_stack_size()),&thread_start_function,thread_info.get(),
- CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION, &thread_info->id);
- if(!new_thread)
- {
- return false;
- }
- intrusive_ptr_add_ref(thread_info.get());
- thread_info->thread_handle=(detail::win32::handle)(new_thread);
- ResumeThread(thread_info->thread_handle);
- return true;
-#endif
- }
-
- thread::thread(detail::thread_data_ptr data):
- thread_info(data)
- {}
-
- namespace
- {
- struct externally_launched_thread:
- detail::thread_data_base
- {
- externally_launched_thread()
- {
- ++count;
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- interruption_enabled=false;
-#endif
- }
- ~externally_launched_thread() {
- BOOST_ASSERT(notify.empty());
- notify.clear();
-//#ifndef BOOST_NO_EXCEPTIONS
- BOOST_ASSERT(async_states_.empty());
- async_states_.clear();
-//#endif
- }
-
- void run()
- {}
- void notify_all_at_thread_exit(condition_variable*, mutex*)
- {}
-
- private:
- externally_launched_thread(externally_launched_thread&);
- void operator=(externally_launched_thread&);
- };
-
- void make_external_thread_data()
- {
- externally_launched_thread* me=detail::heap_new<externally_launched_thread>();
- BOOST_TRY
- {
- set_current_thread_data(me);
- }
- BOOST_CATCH(...)
- {
- detail::heap_delete(me);
- BOOST_RETHROW
- }
- BOOST_CATCH_END
- }
-
- detail::thread_data_base* get_or_make_current_thread_data()
- {
- detail::thread_data_base* current_thread_data(detail::get_current_thread_data());
- if(!current_thread_data)
- {
- make_external_thread_data();
- current_thread_data=detail::get_current_thread_data();
- }
- return current_thread_data;
- }
- }
-
- thread::id thread::get_id() const BOOST_NOEXCEPT
- {
-#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
- detail::thread_data_ptr local_thread_info=(get_thread_info)();
- if(!local_thread_info)
- {
- return 0;
- }
- return local_thread_info->id;
-#else
- return thread::id((get_thread_info)());
-#endif
- }
-
- bool thread::joinable() const BOOST_NOEXCEPT
- {
- detail::thread_data_ptr local_thread_info = (get_thread_info)();
- if(!local_thread_info)
- {
- return false;
- }
- return true;
- }
- bool thread::join_noexcept()
- {
- detail::thread_data_ptr local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- this_thread::interruptible_wait(this->native_handle(), detail::internal_platform_timepoint::getMax());
- release_handle();
- return true;
- }
- else
- {
- return false;
- }
- }
-
- bool thread::do_try_join_until_noexcept(detail::internal_platform_timepoint const &timeout, bool& res)
- {
- detail::thread_data_ptr local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- if(!this_thread::interruptible_wait(this->native_handle(), timeout))
- {
- res=false;
- return true;
- }
- release_handle();
- res=true;
- return true;
- }
- else
- {
- return false;
- }
- }
-
- void thread::detach()
- {
- release_handle();
- }
-
- void thread::release_handle()
- {
- thread_info=0;
- }
-
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- void thread::interrupt()
- {
- detail::thread_data_ptr local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- local_thread_info->interrupt();
- }
- }
-
- bool thread::interruption_requested() const BOOST_NOEXCEPT
- {
- detail::thread_data_ptr local_thread_info=(get_thread_info)();
- return local_thread_info.get() && (winapi::WaitForSingleObjectEx(local_thread_info->interruption_handle,0,0)==0);
- }
-
-#endif
-
- unsigned thread::hardware_concurrency() BOOST_NOEXCEPT
- {
- detail::win32::system_info info;
- detail::win32::get_system_info(&info);
- return info.dwNumberOfProcessors;
- }
-
- unsigned thread::physical_concurrency() BOOST_NOEXCEPT
- {
- // a bit too strict: Windows XP with SP3 would be sufficient
-#if BOOST_PLAT_WINDOWS_RUNTIME \
- || ( BOOST_USE_WINAPI_VERSION <= BOOST_WINAPI_VERSION_WINXP ) \
- || ( ( defined(__MINGW32__) && !defined(__MINGW64__) ) && _WIN32_WINNT < 0x0600)
- return 0;
-#else
- unsigned cores = 0;
- DWORD size = 0;
-
- GetLogicalProcessorInformation(NULL, &size);
- if (ERROR_INSUFFICIENT_BUFFER != GetLastError())
- return 0;
-
- std::vector<SYSTEM_LOGICAL_PROCESSOR_INFORMATION> buffer(size);
- if (GetLogicalProcessorInformation(&buffer.front(), &size) == FALSE)
- return 0;
-
- const size_t Elements = size / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION);
-
- for (size_t i = 0; i < Elements; ++i) {
- if (buffer[i].Relationship == RelationProcessorCore)
- ++cores;
- }
- return cores;
-#endif
- }
-
- thread::native_handle_type thread::native_handle()
- {
- detail::thread_data_ptr local_thread_info=(get_thread_info)();
- if(!local_thread_info)
- {
- return detail::win32::invalid_handle_value;
- }
-#if BOOST_PLAT_WINDOWS_RUNTIME
- // There is no 'real' Win32 handle so we return a handle that at least can be waited on.
- return local_thread_info->thread_handle.waitable_handle();
-#else
- return (detail::win32::handle)local_thread_info->thread_handle;
-#endif
- }
-
- detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
- {
- return thread_info;
- }
-
- namespace this_thread
- {
-#ifndef UNDER_CE
-#if !BOOST_PLAT_WINDOWS_RUNTIME
- namespace detail_
- {
- typedef struct _REASON_CONTEXT {
- ULONG Version;
- DWORD Flags;
- union {
- LPWSTR SimpleReasonString;
- struct {
- HMODULE LocalizedReasonModule;
- ULONG LocalizedReasonId;
- ULONG ReasonStringCount;
- LPWSTR *ReasonStrings;
- } Detailed;
- } Reason;
- } REASON_CONTEXT, *PREASON_CONTEXT;
- typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG);
- static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay)
- {
- return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine, lpArgToCompletionRoutine, FALSE);
- }
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable: 6387) // MSVC sanitiser warns that GetModuleHandleA() might fail
-#endif
- static inline setwaitabletimerex_t SetWaitableTimerEx()
- {
- static setwaitabletimerex_t setwaitabletimerex_impl;
- if(setwaitabletimerex_impl)
- return setwaitabletimerex_impl;
- void (*addr)()=(void (*)()) GetProcAddress(
-#if !defined(BOOST_NO_ANSI_APIS)
- GetModuleHandleA("KERNEL32.DLL"),
-#else
- GetModuleHandleW(L"KERNEL32.DLL"),
-#endif
- "SetWaitableTimerEx");
- if(addr)
- setwaitabletimerex_impl=(setwaitabletimerex_t) addr;
- else
- setwaitabletimerex_impl=&SetWaitableTimerEx_emulation;
- return setwaitabletimerex_impl;
- }
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
- }
-#endif
-#endif
- bool interruptible_wait(detail::win32::handle handle_to_wait_for, detail::internal_platform_timepoint const &timeout)
- {
- detail::win32::handle handles[4]={0};
- unsigned handle_count=0;
- unsigned wait_handle_index=~0U;
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- unsigned interruption_index=~0U;
-#endif
- unsigned timeout_index=~0U;
- if(handle_to_wait_for!=detail::win32::invalid_handle_value)
- {
- wait_handle_index=handle_count;
- handles[handle_count++]=handle_to_wait_for;
- }
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- if(detail::get_current_thread_data() && detail::get_current_thread_data()->interruption_enabled)
- {
- interruption_index=handle_count;
- handles[handle_count++]=detail::get_current_thread_data()->interruption_handle;
- }
-#endif
- detail::win32::handle_manager timer_handle;
-
-#ifndef UNDER_CE
-#if !BOOST_PLAT_WINDOWS_RUNTIME
- // Preferentially use coalescing timers for better power consumption and timer accuracy
- if(timeout != detail::internal_platform_timepoint::getMax())
- {
- boost::intmax_t const time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
- timer_handle=CreateWaitableTimer(NULL,false,NULL);
- if(timer_handle!=0)
- {
- ULONG tolerable=32; // Empirical testing shows Windows ignores this when <= 26
- if(time_left_msec/20>tolerable) // 5%
- tolerable=static_cast<ULONG>(time_left_msec/20);
- LARGE_INTEGER due_time={{0,0}};
- if(time_left_msec>0)
- {
- due_time.QuadPart=-(time_left_msec*10000); // negative indicates relative time
- }
- bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,NULL,tolerable)!=0;
- if(set_time_succeeded)
- {
- timeout_index=handle_count;
- handles[handle_count++]=timer_handle;
- }
- }
- }
-#endif
-#endif
-
- bool const using_timer=timeout_index!=~0u;
- boost::intmax_t time_left_msec(INFINITE);
- if(!using_timer && timeout != detail::internal_platform_timepoint::getMax())
- {
- time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
- if(time_left_msec < 0)
- {
- time_left_msec = 0;
- }
- }
-
- do
- {
- if(handle_count)
- {
- unsigned long const notified_index=winapi::WaitForMultipleObjectsEx(handle_count,handles,false,static_cast<DWORD>(time_left_msec), 0);
- if(notified_index<handle_count)
- {
- if(notified_index==wait_handle_index)
- {
- return true;
- }
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- else if(notified_index==interruption_index)
- {
- winapi::ResetEvent(detail::get_current_thread_data()->interruption_handle);
- throw thread_interrupted();
- }
-#endif
- else if(notified_index==timeout_index)
- {
- return false;
- }
- }
- }
- else
- {
- detail::win32::sleep(static_cast<unsigned long>(time_left_msec));
- }
-
- if(!using_timer && timeout != detail::internal_platform_timepoint::getMax())
- {
- time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
- }
- }
- while(time_left_msec == INFINITE || time_left_msec > 0);
- return false;
- }
-
- namespace no_interruption_point
- {
- bool non_interruptible_wait(detail::win32::handle handle_to_wait_for, detail::internal_platform_timepoint const &timeout)
- {
- detail::win32::handle handles[3]={0};
- unsigned handle_count=0;
- unsigned wait_handle_index=~0U;
- unsigned timeout_index=~0U;
- if(handle_to_wait_for!=detail::win32::invalid_handle_value)
- {
- wait_handle_index=handle_count;
- handles[handle_count++]=handle_to_wait_for;
- }
- detail::win32::handle_manager timer_handle;
-
-#ifndef UNDER_CE
-#if !BOOST_PLAT_WINDOWS_RUNTIME
- // Preferentially use coalescing timers for better power consumption and timer accuracy
- if(timeout != detail::internal_platform_timepoint::getMax())
- {
- boost::intmax_t const time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
- timer_handle=CreateWaitableTimer(NULL,false,NULL);
- if(timer_handle!=0)
- {
- ULONG tolerable=32; // Empirical testing shows Windows ignores this when <= 26
- if(time_left_msec/20>tolerable) // 5%
- tolerable=static_cast<ULONG>(time_left_msec/20);
- LARGE_INTEGER due_time={{0,0}};
- if(time_left_msec>0)
- {
- due_time.QuadPart=-(time_left_msec*10000); // negative indicates relative time
- }
- bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,NULL,tolerable)!=0;
- if(set_time_succeeded)
- {
- timeout_index=handle_count;
- handles[handle_count++]=timer_handle;
- }
- }
- }
-#endif
-#endif
-
- bool const using_timer=timeout_index!=~0u;
- boost::intmax_t time_left_msec(INFINITE);
- if(!using_timer && timeout != detail::internal_platform_timepoint::getMax())
- {
- time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
- if(time_left_msec < 0)
- {
- time_left_msec = 0;
- }
- }
-
- do
- {
- if(handle_count)
- {
- unsigned long const notified_index=winapi::WaitForMultipleObjectsEx(handle_count,handles,false,static_cast<DWORD>(time_left_msec), 0);
- if(notified_index<handle_count)
- {
- if(notified_index==wait_handle_index)
- {
- return true;
- }
- else if(notified_index==timeout_index)
- {
- return false;
- }
- }
- }
- else
- {
- detail::win32::sleep(static_cast<unsigned long>(time_left_msec));
- }
-
- if(!using_timer && timeout != detail::internal_platform_timepoint::getMax())
- {
- time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
- }
- }
- while(time_left_msec == INFINITE || time_left_msec > 0);
- return false;
- }
- }
-
- thread::id get_id() BOOST_NOEXCEPT
- {
-#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
-#if BOOST_PLAT_WINDOWS_RUNTIME
- detail::thread_data_base* current_thread_data(detail::get_current_thread_data());
- if (current_thread_data)
- {
- return current_thread_data->id;
- }
-#endif
- return winapi::GetCurrentThreadId();
-#else
- return thread::id(get_or_make_current_thread_data());
-#endif
- }
-
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- void interruption_point()
- {
- if(interruption_enabled() && interruption_requested())
- {
- winapi::ResetEvent(detail::get_current_thread_data()->interruption_handle);
- throw thread_interrupted();
- }
- }
-
- bool interruption_enabled() BOOST_NOEXCEPT
- {
- return detail::get_current_thread_data() && detail::get_current_thread_data()->interruption_enabled;
- }
-
- bool interruption_requested() BOOST_NOEXCEPT
- {
- return detail::get_current_thread_data() && (winapi::WaitForSingleObjectEx(detail::get_current_thread_data()->interruption_handle,0,0)==0);
- }
-#endif
-
- void yield() BOOST_NOEXCEPT
- {
- detail::win32::sleep(0);
- }
-
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
- disable_interruption::disable_interruption() BOOST_NOEXCEPT:
- interruption_was_enabled(interruption_enabled())
- {
- if(interruption_was_enabled)
- {
- detail::get_current_thread_data()->interruption_enabled=false;
- }
- }
-
- disable_interruption::~disable_interruption() BOOST_NOEXCEPT
- {
- if(detail::get_current_thread_data())
- {
- detail::get_current_thread_data()->interruption_enabled=interruption_was_enabled;
- }
- }
-
- restore_interruption::restore_interruption(disable_interruption& d) BOOST_NOEXCEPT
- {
- if(d.interruption_was_enabled)
- {
- detail::get_current_thread_data()->interruption_enabled=true;
- }
- }
-
- restore_interruption::~restore_interruption() BOOST_NOEXCEPT
- {
- if(detail::get_current_thread_data())
- {
- detail::get_current_thread_data()->interruption_enabled=false;
- }
- }
-#endif
- }
-
- namespace detail
- {
- void add_thread_exit_function(thread_exit_function_base* func)
- {
- detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
- thread_exit_callback_node* const new_node=
- heap_new<thread_exit_callback_node>(
- func,current_thread_data->thread_exit_callbacks);
- current_thread_data->thread_exit_callbacks=new_node;
- }
-
- tss_data_node* find_tss_data(void const* key)
- {
- detail::thread_data_base* const current_thread_data(get_current_thread_data());
- if(current_thread_data)
- {
- std::map<void const*,tss_data_node>::iterator current_node=
- current_thread_data->tss_data.find(key);
- if(current_node!=current_thread_data->tss_data.end())
- {
- return &current_node->second;
- }
- }
- return NULL;
- }
-
- void* get_tss_data(void const* key)
- {
- if(tss_data_node* const current_node=find_tss_data(key))
- {
- return current_node->value;
- }
- return NULL;
- }
-
- void add_new_tss_node(void const* key,
- boost::shared_ptr<tss_cleanup_function> func,
- void* tss_data)
- {
- detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
- current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data)));
- }
-
- void erase_tss_node(void const* key)
- {
- detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
- current_thread_data->tss_data.erase(key);
- }
-
- void set_tss_data(void const* key,
- boost::shared_ptr<tss_cleanup_function> func,
- void* tss_data,bool cleanup_existing)
- {
- if(tss_data_node* const current_node=find_tss_data(key))
- {
- if(cleanup_existing && current_node->func && (current_node->value!=0))
- {
- (*current_node->func)(current_node->value);
- }
- if(func || (tss_data!=0))
- {
- current_node->func=func;
- current_node->value=tss_data;
- }
- else
- {
- erase_tss_node(key);
- }
- }
- else if(func || (tss_data!=0))
- {
- add_new_tss_node(key,func,tss_data);
- }
- }
- }
-
- BOOST_THREAD_DECL void __cdecl on_process_enter()
- {}
-
- BOOST_THREAD_DECL void __cdecl on_thread_enter()
- {}
-
- BOOST_THREAD_DECL void __cdecl on_process_exit()
- {
- boost::cleanup_tls_key();
- }
-
- BOOST_THREAD_DECL void __cdecl on_thread_exit()
- {
- boost::run_thread_exit_callbacks();
- }
-
- BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
- {
- detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
- if(current_thread_data)
- {
- current_thread_data->notify_all_at_thread_exit(&cond, lk.release());
- }
- }
-}
-
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/win32/thread_primitives.cpp b/src/third_party/boost-1.68.0/libs/thread/src/win32/thread_primitives.cpp
deleted file mode 100644
index f51f621508a..00000000000
--- a/src/third_party/boost-1.68.0/libs/thread/src/win32/thread_primitives.cpp
+++ /dev/null
@@ -1,140 +0,0 @@
-// thread_primitives.cpp
-//
-// (C) Copyright 2018 Andrey Semashev
-//
-// Distributed under the Boost Software License, Version 1.0. (See
-// accompanying file LICENSE_1_0.txt or copy at
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/winapi/config.hpp>
-#include <boost/winapi/dll.hpp>
-#include <boost/winapi/time.hpp>
-#include <boost/winapi/event.hpp>
-#include <boost/winapi/handles.hpp>
-#include <boost/winapi/thread_pool.hpp>
-#include <cstdlib>
-#include <boost/config.hpp>
-#include <boost/cstdint.hpp>
-#include <boost/memory_order.hpp>
-#include <boost/atomic/atomic.hpp>
-#include <boost/thread/win32/interlocked_read.hpp>
-#include <boost/thread/win32/thread_primitives.hpp>
-
-namespace boost {
-namespace detail {
-namespace win32 {
-
-#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
-
-// Directly use API from Vista and later
-BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64 = &::boost::winapi::GetTickCount64;
-
-#else // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
-
-namespace {
-
-enum init_state
-{
- uninitialized = 0,
- in_progress,
- initialized
-};
-
-struct get_tick_count64_state
-{
- boost::atomic< uint64_t > ticks;
- boost::atomic< init_state > init;
- boost::winapi::HANDLE_ wait_event;
- boost::winapi::HANDLE_ wait_handle;
-};
-
-// Zero-initialized initially
-BOOST_ALIGNMENT(64) static get_tick_count64_state g_state;
-
-//! Artifical implementation of GetTickCount64
-ticks_type WINAPI get_tick_count64()
-{
- uint64_t old_state = g_state.ticks.load(boost::memory_order_acquire);
-
- uint32_t new_ticks = boost::winapi::GetTickCount();
-
- uint32_t old_ticks = static_cast< uint32_t >(old_state & UINT64_C(0x00000000ffffffff));
- uint64_t new_state = ((old_state & UINT64_C(0xffffffff00000000)) + (static_cast< uint64_t >(new_ticks < old_ticks) << 32)) | static_cast< uint64_t >(new_ticks);
-
- g_state.ticks.store(new_state, boost::memory_order_release);
-
- return new_state;
-}
-
-//! The function is called periodically in the system thread pool to make sure g_state.ticks is timely updated
-void NTAPI refresh_get_tick_count64(boost::winapi::PVOID_, boost::winapi::BOOLEAN_)
-{
- get_tick_count64();
-}
-
-//! Cleanup function to stop get_tick_count64 refreshes
-void cleanup_get_tick_count64()
-{
- if (g_state.wait_handle)
- {
- boost::winapi::UnregisterWait(g_state.wait_handle);
- g_state.wait_handle = NULL;
- }
-
- if (g_state.wait_event)
- {
- boost::winapi::CloseHandle(g_state.wait_event);
- g_state.wait_event = NULL;
- }
-}
-
-ticks_type WINAPI get_tick_count_init()
-{
- boost::winapi::HMODULE_ hKernel32 = boost::winapi::GetModuleHandleW(L"kernel32.dll");
- if (hKernel32)
- {
- boost::detail::win32::detail::gettickcount64_t p =
- (boost::detail::win32::detail::gettickcount64_t)boost::winapi::get_proc_address(hKernel32, "GetTickCount64");
- if (p)
- {
- // Use native API
- boost::detail::interlocked_write_release((void**)&gettickcount64, (void*)p);
- return p();
- }
- }
-
- // No native API available. Use emulation with periodic refreshes to make sure the GetTickCount wrap arounds are properly counted.
- init_state old_init = uninitialized;
- if (g_state.init.compare_exchange_strong(old_init, in_progress, boost::memory_order_acq_rel, boost::memory_order_relaxed))
- {
- if (!g_state.wait_event)
- g_state.wait_event = boost::winapi::create_anonymous_event(NULL, false, false);
- if (g_state.wait_event)
- {
- boost::winapi::BOOL_ res = boost::winapi::RegisterWaitForSingleObject(&g_state.wait_handle, g_state.wait_event, &refresh_get_tick_count64, NULL, 0x7fffffff, boost::winapi::WT_EXECUTEINWAITTHREAD_);
- if (res)
- {
- std::atexit(&cleanup_get_tick_count64);
-
- boost::detail::interlocked_write_release((void**)&gettickcount64, (void*)&get_tick_count64);
- g_state.init.store(initialized, boost::memory_order_release);
- goto finish;
- }
- }
-
- g_state.init.store(uninitialized, boost::memory_order_release);
- }
-
-finish:
- return get_tick_count64();
-}
-
-} // namespace
-
-BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64 = &get_tick_count_init;
-
-#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
-
-} // namespace win32
-} // namespace detail
-} // namespace boost
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/win32/tss_dll.cpp b/src/third_party/boost-1.68.0/libs/thread/src/win32/tss_dll.cpp
deleted file mode 100644
index 75ea93a5aa3..00000000000
--- a/src/third_party/boost-1.68.0/libs/thread/src/win32/tss_dll.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-// (C) Copyright Michael Glassford 2004.
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/winapi/config.hpp>
-#include <boost/thread/detail/config.hpp>
-
-
-#if defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_DLL)
-
- #include <boost/thread/detail/tss_hooks.hpp>
-
- #include <windows.h>
-
- #if defined(__BORLANDC__)
- extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/)
- #elif defined(_WIN32_WCE)
- extern "C" BOOL WINAPI DllMain(HANDLE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/)
- #else
- extern "C" BOOL WINAPI DllMain(HINSTANCE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/)
- #endif
- {
- switch(dwReason)
- {
- case DLL_PROCESS_ATTACH:
- {
- boost::on_process_enter();
- boost::on_thread_enter();
- break;
- }
-
- case DLL_THREAD_ATTACH:
- {
- boost::on_thread_enter();
- break;
- }
-
- case DLL_THREAD_DETACH:
- {
- boost::on_thread_exit();
- break;
- }
-
- case DLL_PROCESS_DETACH:
- {
- boost::on_thread_exit();
- boost::on_process_exit();
- break;
- }
- }
-
- return TRUE;
- }
-
-namespace boost
-{
- void tss_cleanup_implemented()
- {
- /*
- This function's sole purpose is to cause a link error in cases where
- automatic tss cleanup is not implemented by Boost.Threads as a
- reminder that user code is responsible for calling the necessary
- functions at the appropriate times (and for implementing an a
- tss_cleanup_implemented() function to eliminate the linker's
- missing symbol error).
-
- If Boost.Threads later implements automatic tss cleanup in cases
- where it currently doesn't (which is the plan), the duplicate
- symbol error will warn the user that their custom solution is no
- longer needed and can be removed.
- */
- }
-}
-
-#else //defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_DLL)
-
-#ifdef _MSC_VER
-// Prevent LNK4221 warning with link=static
-namespace boost { namespace link_static_warning_inhibit {
- extern __declspec(dllexport) void foo() { }
-} }
-#endif
-
-#endif //defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_DLL)
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/win32/tss_pe.cpp b/src/third_party/boost-1.68.0/libs/thread/src/win32/tss_pe.cpp
deleted file mode 100644
index e4a0a3aaa38..00000000000
--- a/src/third_party/boost-1.68.0/libs/thread/src/win32/tss_pe.cpp
+++ /dev/null
@@ -1,337 +0,0 @@
-// $Id$
-// (C) Copyright Aaron W. LaFramboise, Roland Schwarz, Michael Glassford 2004.
-// (C) Copyright 2007 Roland Schwarz
-// (C) Copyright 2007 Anthony Williams
-// (C) Copyright 2007 David Deakins
-// Use, modification and distribution are subject to the
-// Boost Software License, Version 1.0. (See accompanying file
-// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/winapi/config.hpp>
-#include <boost/thread/detail/config.hpp>
-
-#if defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB)
-
-#if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__) || (__MINGW64_VERSION_MAJOR)
-
-#include <boost/thread/detail/tss_hooks.hpp>
-
-#include <windows.h>
-
-#include <cstdlib>
-
-namespace boost
-{
- void tss_cleanup_implemented() {}
-}
-
-namespace {
- void NTAPI on_tls_callback(void* , DWORD dwReason, PVOID )
- {
- switch (dwReason)
- {
- case DLL_THREAD_DETACH:
- {
- boost::on_thread_exit();
- break;
- }
- }
- }
-}
-
-#if defined(__MINGW64__) || (__MINGW64_VERSION_MAJOR) || (__MINGW32__) || (__MINGW32_MAJOR_VERSION >3) || \
- ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18))
-extern "C"
-{
- PIMAGE_TLS_CALLBACK __crt_xl_tls_callback__ __attribute__ ((section(".CRT$XLB"))) = on_tls_callback;
-}
-#else
-extern "C" {
-
- void (* after_ctors )() __attribute__((section(".ctors"))) = boost::on_process_enter;
- void (* before_dtors)() __attribute__((section(".dtors"))) = boost::on_thread_exit;
- void (* after_dtors )() __attribute__((section(".dtors.zzz"))) = boost::on_process_exit;
-
- ULONG __tls_index__ = 0;
- char __tls_end__ __attribute__((section(".tls$zzz"))) = 0;
- char __tls_start__ __attribute__((section(".tls"))) = 0;
-
-
- PIMAGE_TLS_CALLBACK __crt_xl_start__ __attribute__ ((section(".CRT$XLA"))) = 0;
- PIMAGE_TLS_CALLBACK __crt_xl_end__ __attribute__ ((section(".CRT$XLZ"))) = 0;
-}
-extern "C" const IMAGE_TLS_DIRECTORY32 _tls_used __attribute__ ((section(".rdata$T"))) =
-{
- (DWORD) &__tls_start__,
- (DWORD) &__tls_end__,
- (DWORD) &__tls_index__,
- (DWORD) (&__crt_xl_start__+1),
- (DWORD) 0,
- (DWORD) 0
-};
-#endif
-
-
-#elif defined(_MSC_VER) && !defined(UNDER_CE)
-
- #include <boost/thread/detail/tss_hooks.hpp>
-
- #include <stdlib.h>
-
- #include <windows.h>
-
-
-// _pRawDllMainOrig can be defined by including boost/thread/win32/mfc_thread_init.hpp
-// into your dll; it ensures that MFC-Dll-initialization will be done properly
-// The following code is adapted from the MFC-Dll-init code
-/*
- * _pRawDllMainOrig MUST be an extern const variable, which will be aliased to
- * _pDefaultRawDllMainOrig if no real user definition is present, thanks to the
- * alternatename directive.
- */
-
-// work at least with _MSC_VER 1500 (MSVC++ 9.0, VS 2008)
-#if (_MSC_VER >= 1500)
-
-extern "C" {
-extern BOOL (WINAPI * const _pRawDllMainOrig)(HINSTANCE, DWORD, LPVOID);
-extern BOOL (WINAPI * const _pDefaultRawDllMainOrig)(HINSTANCE, DWORD, LPVOID) = NULL;
-#if defined (_M_IX86)
-#pragma comment(linker, "/alternatename:__pRawDllMainOrig=__pDefaultRawDllMainOrig")
-#elif defined (_M_X64) || defined (_M_ARM)
-#pragma comment(linker, "/alternatename:_pRawDllMainOrig=_pDefaultRawDllMainOrig")
-#else /* defined (_M_X64) || defined (_M_ARM) */
-#error Unsupported platform
-#endif /* defined (_M_X64) || defined (_M_ARM) */
-}
-
-#endif
-
-
-
-
- //Definitions required by implementation
- #if (_MSC_VER < 1300) || ((_MSC_VER > 1900) && (_MSC_VER < 1910)) // 1300 == VC++ 7.0, 1900 == VC++ 14.0, 1910 == VC++ 2017
- typedef void ( __cdecl *_PVFV_ )();
- typedef void ( __cdecl *_PIFV_ )();
- #define INIRETSUCCESS_V
- #define INIRETSUCCESS_I
- #define PVAPI_V void __cdecl
- #define PVAPI_I void __cdecl
- #elif (_MSC_VER >= 1910)
- typedef void ( __cdecl *_PVFV_ )();
- typedef int ( __cdecl *_PIFV_ )();
- #define INIRETSUCCESS_V
- #define INIRETSUCCESS_I 0
- #define PVAPI_V void __cdecl
- #define PVAPI_I int __cdecl
- #else
- typedef int ( __cdecl *_PVFV_ )();
- typedef int ( __cdecl *_PIFV_ )();
- #define INIRETSUCCESS_V 0
- #define INIRETSUCCESS_I 0
- #define PVAPI_V int __cdecl
- #define PVAPI_I int __cdecl
- #endif
-
- typedef void (NTAPI* _TLSCB)(HINSTANCE, DWORD, PVOID);
-
- //Symbols for connection to the runtime environment
-
- extern "C"
- {
- extern DWORD _tls_used; //the tls directory (located in .rdata segment)
- extern _TLSCB __xl_a[], __xl_z[]; //tls initializers */
- }
-
- namespace
- {
- //Forward declarations
-
- static PVAPI_I on_tls_prepare();
- static PVAPI_V on_process_init();
- static PVAPI_V on_process_term();
- static void NTAPI on_tls_callback(HINSTANCE, DWORD, PVOID);
-
- //The .CRT$Xxx information is taken from Codeguru:
- //http://www.codeguru.com/Cpp/misc/misc/threadsprocesses/article.php/c6945__2/
-
-#if (_MSC_VER >= 1400)
-#pragma section(".CRT$XIU",long,read)
-#pragma section(".CRT$XCU",long,read)
-#pragma section(".CRT$XTU",long,read)
-#pragma section(".CRT$XLC",long,read)
- __declspec(allocate(".CRT$XLC")) _TLSCB __xl_ca=on_tls_callback;
- __declspec(allocate(".CRT$XIU"))_PIFV_ p_tls_prepare = on_tls_prepare;
- __declspec(allocate(".CRT$XCU"))_PVFV_ p_process_init = on_process_init;
- __declspec(allocate(".CRT$XTU"))_PVFV_ p_process_term = on_process_term;
-#else
- #if (_MSC_VER >= 1300) // 1300 == VC++ 7.0
- # pragma data_seg(push, old_seg)
- #endif
- //Callback to run tls glue code first.
- //I don't think it is necessary to run it
- //at .CRT$XIB level, since we are only
- //interested in thread detachement. But
- //this could be changed easily if required.
-
- #pragma data_seg(".CRT$XIU")
- static _PIFV_ p_tls_prepare = on_tls_prepare;
- #pragma data_seg()
-
- //Callback after all global ctors.
-
- #pragma data_seg(".CRT$XCU")
- static _PVFV_ p_process_init = on_process_init;
- #pragma data_seg()
-
- //Callback for tls notifications.
-
- #pragma data_seg(".CRT$XLB")
- _TLSCB p_thread_callback = on_tls_callback;
- #pragma data_seg()
- //Callback for termination.
-
- #pragma data_seg(".CRT$XTU")
- static _PVFV_ p_process_term = on_process_term;
- #pragma data_seg()
- #if (_MSC_VER >= 1300) // 1300 == VC++ 7.0
- # pragma data_seg(pop, old_seg)
- #endif
-#endif
-
-#ifdef BOOST_MSVC
-#pragma warning(push)
-#pragma warning(disable:4189)
-#endif
-
- PVAPI_I on_tls_prepare()
- {
- //The following line has an important side effect:
- //if the TLS directory is not already there, it will
- //be created by the linker. In other words, it forces a tls
- //directory to be generated by the linker even when static tls
- //(i.e. __declspec(thread)) is not used.
- //The volatile should prevent the optimizer
- //from removing the reference.
-
- DWORD volatile dw = _tls_used;
-
- #if (_MSC_VER < 1300) // 1300 == VC++ 7.0
- _TLSCB* pfbegin = __xl_a;
- _TLSCB* pfend = __xl_z;
- _TLSCB* pfdst = pfbegin;
- //pfdst = (_TLSCB*)_tls_used.AddressOfCallBacks;
-
- //The following loop will merge the address pointers
- //into a contiguous area, since the tlssup code seems
- //to require this (at least on MSVC 6)
-
- while (pfbegin < pfend)
- {
- if (*pfbegin != 0)
- {
- *pfdst = *pfbegin;
- ++pfdst;
- }
- ++pfbegin;
- }
-
- *pfdst = 0;
- #endif
-
- return INIRETSUCCESS_I;
- }
-#ifdef BOOST_MSVC
-#pragma warning(pop)
-#endif
-
- PVAPI_V on_process_init()
- {
- //Schedule on_thread_exit() to be called for the main
- //thread before destructors of global objects have been
- //called.
-
- //It will not be run when 'quick' exiting the
- //library; however, this is the standard behaviour
- //for destructors of global objects, so that
- //shouldn't be a problem.
-
- atexit(boost::on_thread_exit);
-
- //Call Boost process entry callback here
-
- boost::on_process_enter();
-
- return INIRETSUCCESS_V;
- }
-
- PVAPI_V on_process_term()
- {
- boost::on_process_exit();
- return INIRETSUCCESS_V;
- }
-
- void NTAPI on_tls_callback(HINSTANCE /*h*/, DWORD dwReason, PVOID /*pv*/)
- {
- switch (dwReason)
- {
- case DLL_THREAD_DETACH:
- boost::on_thread_exit();
- break;
- }
- }
-
-#if (_MSC_VER >= 1500)
- BOOL WINAPI dll_callback(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
-#else
- BOOL WINAPI dll_callback(HINSTANCE, DWORD dwReason, LPVOID)
-#endif
- {
- switch (dwReason)
- {
- case DLL_THREAD_DETACH:
- boost::on_thread_exit();
- break;
- case DLL_PROCESS_DETACH:
- boost::on_process_exit();
- break;
- }
-
-#if (_MSC_VER >= 1500)
- if( _pRawDllMainOrig )
- {
- return _pRawDllMainOrig(hInstance, dwReason, lpReserved);
- }
-#endif
- return true;
- }
- } //namespace
-
-extern "C"
-{
- extern BOOL (WINAPI * const _pRawDllMain)(HINSTANCE, DWORD, LPVOID)=&dll_callback;
-}
-namespace boost
-{
- void tss_cleanup_implemented()
- {
- /*
- This function's sole purpose is to cause a link error in cases where
- automatic tss cleanup is not implemented by Boost.Threads as a
- reminder that user code is responsible for calling the necessary
- functions at the appropriate times (and for implementing an a
- tss_cleanup_implemented() function to eliminate the linker's
- missing symbol error).
-
- If Boost.Threads later implements automatic tss cleanup in cases
- where it currently doesn't (which is the plan), the duplicate
- symbol error will warn the user that their custom solution is no
- longer needed and can be removed.
- */
- }
-}
-
-#endif //defined(_MSC_VER) && !defined(UNDER_CE)
-
-#endif //defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB)
diff --git a/src/third_party/boost-1.69.0/SConscript b/src/third_party/boost-1.69.0/SConscript
new file mode 100644
index 00000000000..0a5abb6dc4c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/SConscript
@@ -0,0 +1,53 @@
+# -*- mode: python; -*-
+
+Import("env")
+
+env = env.Clone()
+
+# GCC emits a warning on both v2 and v3 toolchains when compiling filesystem.
+# We should check if this is still needed when doing boost upgrades in the future.
+if env.ToolchainIs('GCC'):
+ env.AppendUnique(CXXFLAGS=['-Wno-overloaded-virtual'])
+
+env.Library('boost_system', ['libs/system/src/error_code.cpp'])
+
+env.Library('boost_filesystem', [
+ 'libs/filesystem/src/codecvt_error_category.cpp',
+ 'libs/filesystem/src/operations.cpp',
+ 'libs/filesystem/src/path.cpp',
+ 'libs/filesystem/src/path_traits.cpp',
+ 'libs/filesystem/src/portability.cpp',
+ 'libs/filesystem/src/unique_path.cpp',
+ 'libs/filesystem/src/utf8_codecvt_facet.cpp',
+ 'libs/filesystem/src/windows_file_codecvt.cpp',
+ ],
+ LIBDEPS=[
+ 'boost_system',
+ ])
+
+env.Library('boost_program_options', [
+ 'libs/program_options/src/cmdline.cpp',
+ 'libs/program_options/src/config_file.cpp',
+ 'libs/program_options/src/convert.cpp',
+ 'libs/program_options/src/options_description.cpp',
+ 'libs/program_options/src/parsers.cpp',
+ 'libs/program_options/src/positional_options.cpp',
+ 'libs/program_options/src/split.cpp',
+ 'libs/program_options/src/utf8_codecvt_facet.cpp',
+ 'libs/program_options/src/value_semantic.cpp',
+ 'libs/program_options/src/variables_map.cpp',
+ 'libs/program_options/src/winmain.cpp',
+ ],
+ # Because `::environ` is resolved in `/usr/lib/crt1.o` on FreeBSD, this library needs to be
+ # marked `incomplete` on FreeBSD.
+ LIBDEPS_TAGS=[] if not env.TargetOSIs('freebsd') else [
+ 'illegal_cyclic_or_unresolved_dependencies_whitelisted',
+ ])
+
+env.Library('boost_iostreams', [
+ 'libs/iostreams/src/file_descriptor.cpp',
+ 'libs/iostreams/src/mapped_file.cpp',
+ ],
+ LIBDEPS=[
+ 'boost_system',
+ ])
diff --git a/src/third_party/boost-1.68.0/boost.css b/src/third_party/boost-1.69.0/boost.css
index 986c4050fa9..986c4050fa9 100644
--- a/src/third_party/boost-1.68.0/boost.css
+++ b/src/third_party/boost-1.69.0/boost.css
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/algorithm.hpp b/src/third_party/boost-1.69.0/boost/algorithm/algorithm.hpp
index 2bbee1d2d43..2bbee1d2d43 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/algorithm.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/algorithm/apply_permutation.hpp b/src/third_party/boost-1.69.0/boost/algorithm/apply_permutation.hpp
new file mode 100644
index 00000000000..b9de0ded7bb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/algorithm/apply_permutation.hpp
@@ -0,0 +1,126 @@
+/*
+ Copyright (c) Alexander Zaitsev <zamazan4ik@gmail.com>, 2017
+
+ Distributed under the Boost Software License, Version 1.0. (See
+ accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+
+ See http://www.boost.org/ for latest version.
+
+
+ Based on https://blogs.msdn.microsoft.com/oldnewthing/20170104-00/?p=95115
+*/
+
+/// \file apply_permutation.hpp
+/// \brief Apply permutation to a sequence.
+/// \author Alexander Zaitsev
+
+#ifndef BOOST_ALGORITHM_APPLY_PERMUTATION_HPP
+#define BOOST_ALGORITHM_APPLY_PERMUTATION_HPP
+
+#include <algorithm>
+#include <type_traits>
+
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+
+namespace boost { namespace algorithm
+{
+
+/// \fn apply_permutation ( RandomAccessIterator1 item_begin, RandomAccessIterator1 item_end, RandomAccessIterator2 ind_begin )
+/// \brief Reorder item sequence with index sequence order
+///
+/// \param item_begin The start of the item sequence
+/// \param item_end One past the end of the item sequence
+/// \param ind_begin The start of the index sequence.
+///
+/// \note Item sequence size should be equal to index size. Otherwise behavior is undefined.
+/// Complexity: O(N).
+template<typename RandomAccessIterator1, typename RandomAccessIterator2>
+void
+apply_permutation(RandomAccessIterator1 item_begin, RandomAccessIterator1 item_end,
+ RandomAccessIterator2 ind_begin, RandomAccessIterator2 ind_end)
+{
+ typedef typename std::iterator_traits<RandomAccessIterator1>::difference_type Diff;
+ typedef typename std::iterator_traits<RandomAccessIterator2>::difference_type Index;
+ using std::swap;
+ Diff size = std::distance(item_begin, item_end);
+ for (Diff i = 0; i < size; i++)
+ {
+ Diff current = i;
+ while (i != ind_begin[current])
+ {
+ Index next = ind_begin[current];
+ swap(item_begin[current], item_begin[next]);
+ ind_begin[current] = current;
+ current = next;
+ }
+ ind_begin[current] = current;
+ }
+}
+
+/// \fn apply_reverse_permutation ( RandomAccessIterator1 item_begin, RandomAccessIterator1 item_end, RandomAccessIterator2 ind_begin )
+/// \brief Reorder item sequence with index sequence order
+///
+/// \param item_begin The start of the item sequence
+/// \param item_end One past the end of the item sequence
+/// \param ind_begin The start of the index sequence.
+///
+/// \note Item sequence size should be equal to index size. Otherwise behavior is undefined.
+/// Complexity: O(N).
+template<typename RandomAccessIterator1, typename RandomAccessIterator2>
+void
+apply_reverse_permutation(
+ RandomAccessIterator1 item_begin,
+ RandomAccessIterator1 item_end,
+ RandomAccessIterator2 ind_begin,
+ RandomAccessIterator2 ind_end)
+{
+ typedef typename std::iterator_traits<RandomAccessIterator2>::difference_type Diff;
+ using std::swap;
+ Diff length = std::distance(item_begin, item_end);
+ for (Diff i = 0; i < length; i++)
+ {
+ while (i != ind_begin[i])
+ {
+ Diff next = ind_begin[i];
+ swap(item_begin[i], item_begin[next]);
+ swap(ind_begin[i], ind_begin[next]);
+ }
+ }
+}
+
+/// \fn apply_permutation ( Range1 item_range, Range2 ind_range )
+/// \brief Reorder item sequence with index sequence order
+///
+/// \param item_range The item sequence
+/// \param ind_range The index sequence
+///
+/// \note Item sequence size should be equal to index size. Otherwise behavior is undefined.
+/// Complexity: O(N).
+template<typename Range1, typename Range2>
+void
+apply_permutation(Range1& item_range, Range2& ind_range)
+{
+ apply_permutation(boost::begin(item_range), boost::end(item_range),
+ boost::begin(ind_range), boost::end(ind_range));
+}
+
+/// \fn apply_reverse_permutation ( Range1 item_range, Range2 ind_range )
+/// \brief Reorder item sequence with index sequence order
+///
+/// \param item_range The item sequence
+/// \param ind_range The index sequence
+///
+/// \note Item sequence size should be equal to index size. Otherwise behavior is undefined.
+/// Complexity: O(N).
+template<typename Range1, typename Range2>
+void
+apply_reverse_permutation(Range1& item_range, Range2& ind_range)
+{
+ apply_reverse_permutation(boost::begin(item_range), boost::end(item_range),
+ boost::begin(ind_range), boost::end(ind_range));
+}
+
+}}
+#endif //BOOST_ALGORITHM_APPLY_PERMUTATION_HPP
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/clamp.hpp b/src/third_party/boost-1.69.0/boost/algorithm/clamp.hpp
index d027acdf269..d027acdf269 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/clamp.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/clamp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/all_of.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/all_of.hpp
index 527bbd50fae..527bbd50fae 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/all_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/all_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/any_of.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/any_of.hpp
index d9e2414139e..d9e2414139e 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/any_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/any_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/copy_if.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_if.hpp
index dc1fdeff3e7..dc1fdeff3e7 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/copy_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/copy_n.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_n.hpp
index e4bebd076d2..e4bebd076d2 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/copy_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/copy_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/find_if_not.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/find_if_not.hpp
index 6f5799a339b..6f5799a339b 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/find_if_not.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/find_if_not.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/iota.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/iota.hpp
index 6efc4d8dc90..6efc4d8dc90 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/iota.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/iota.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_partitioned.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_partitioned.hpp
index fb2c5a17a5c..fb2c5a17a5c 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_partitioned.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_partitioned.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_permutation.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_permutation.hpp
index 0098cd53fed..0098cd53fed 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_permutation.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_permutation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_sorted.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_sorted.hpp
index 27662116111..27662116111 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/is_sorted.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/is_sorted.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/none_of.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/none_of.hpp
index e537c267373..e537c267373 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/none_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/none_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/one_of.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/one_of.hpp
index 3b95180dcfb..3b95180dcfb 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/one_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/one_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/partition_copy.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_copy.hpp
index 635b1e7390e..635b1e7390e 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/partition_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/partition_point.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_point.hpp
index 2c2767ae5af..2c2767ae5af 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx11/partition_point.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx11/partition_point.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx14/equal.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx14/equal.hpp
index 526aae99658..526aae99658 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx14/equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx14/equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx14/is_permutation.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx14/is_permutation.hpp
index 639446bf373..639446bf373 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx14/is_permutation.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx14/is_permutation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx14/mismatch.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx14/mismatch.hpp
index 46017190d4f..46017190d4f 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx14/mismatch.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx14/mismatch.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/exclusive_scan.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/exclusive_scan.hpp
index e4ec112d299..e4ec112d299 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/exclusive_scan.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/exclusive_scan.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/for_each_n.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/for_each_n.hpp
index 71f6cde3c12..71f6cde3c12 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/for_each_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/for_each_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/inclusive_scan.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/inclusive_scan.hpp
index 5c60c39d20a..5c60c39d20a 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/inclusive_scan.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/inclusive_scan.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/reduce.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/reduce.hpp
index 55424b6e5e1..55424b6e5e1 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/reduce.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/reduce.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp
index dd3c9c834ed..dd3c9c834ed 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_exclusive_scan.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp
index 1d1197656f3..1d1197656f3 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_inclusive_scan.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_reduce.hpp b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_reduce.hpp
index 8696384760d..8696384760d 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/cxx17/transform_reduce.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/cxx17/transform_reduce.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/find_backward.hpp b/src/third_party/boost-1.69.0/boost/algorithm/find_backward.hpp
index 66901a1471f..66901a1471f 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/find_backward.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/find_backward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/find_not.hpp b/src/third_party/boost-1.69.0/boost/algorithm/find_not.hpp
index ef4df00b84b..ef4df00b84b 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/find_not.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/find_not.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/gather.hpp b/src/third_party/boost-1.69.0/boost/algorithm/gather.hpp
index 944bc94348d..944bc94348d 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/gather.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/gather.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/hex.hpp b/src/third_party/boost-1.69.0/boost/algorithm/hex.hpp
index b8335843a88..b8335843a88 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/hex.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/hex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/is_palindrome.hpp b/src/third_party/boost-1.69.0/boost/algorithm/is_palindrome.hpp
index 09881109a37..09881109a37 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/is_palindrome.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/is_palindrome.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/is_partitioned_until.hpp b/src/third_party/boost-1.69.0/boost/algorithm/is_partitioned_until.hpp
index 42683e1d8e5..42683e1d8e5 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/is_partitioned_until.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/is_partitioned_until.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/minmax.hpp b/src/third_party/boost-1.69.0/boost/algorithm/minmax.hpp
index 053a7d60ae0..053a7d60ae0 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/minmax.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/minmax.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/minmax_element.hpp b/src/third_party/boost-1.69.0/boost/algorithm/minmax_element.hpp
index 752f6cbdb16..752f6cbdb16 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/minmax_element.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/minmax_element.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/searching/boyer_moore.hpp b/src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore.hpp
index 192d4dec25b..192d4dec25b 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/searching/boyer_moore.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/searching/boyer_moore_horspool.hpp b/src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore_horspool.hpp
index aacb5cb833b..aacb5cb833b 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/searching/boyer_moore_horspool.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/searching/boyer_moore_horspool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/searching/detail/bm_traits.hpp b/src/third_party/boost-1.69.0/boost/algorithm/searching/detail/bm_traits.hpp
index 12143636be0..12143636be0 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/searching/detail/bm_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/searching/detail/bm_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/searching/detail/debugging.hpp b/src/third_party/boost-1.69.0/boost/algorithm/searching/detail/debugging.hpp
index 3996e0f503c..3996e0f503c 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/searching/detail/debugging.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/searching/detail/debugging.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/searching/knuth_morris_pratt.hpp b/src/third_party/boost-1.69.0/boost/algorithm/searching/knuth_morris_pratt.hpp
index 5b5b64a729a..5b5b64a729a 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/searching/knuth_morris_pratt.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/searching/knuth_morris_pratt.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/sort_subrange.hpp b/src/third_party/boost-1.69.0/boost/algorithm/sort_subrange.hpp
index 7fb2cb55d01..7fb2cb55d01 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/sort_subrange.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/sort_subrange.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string.hpp
index 07715173964..07715173964 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/case_conv.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/case_conv.hpp
index 683340b8ec8..683340b8ec8 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/case_conv.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/case_conv.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/classification.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/classification.hpp
index ca43602d472..ca43602d472 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/classification.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/classification.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/compare.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/compare.hpp
index 734303a9a99..734303a9a99 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/compare.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/compare.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/concept.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/concept.hpp
index 17e8349596b..17e8349596b 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/concept.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/concept.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/config.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/config.hpp
index 559750ac8aa..559750ac8aa 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/constants.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/constants.hpp
index 6ed70effcae..6ed70effcae 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/constants.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/constants.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/case_conv.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/case_conv.hpp
index 233912ca0f2..233912ca0f2 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/case_conv.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/case_conv.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/classification.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/classification.hpp
index 704d9d20ff4..704d9d20ff4 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/classification.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/classification.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format.hpp
index b39875024cf..b39875024cf 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format_all.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_all.hpp
index 52930c83ad8..52930c83ad8 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format_all.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_all.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format_store.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_store.hpp
index b9f4a88d912..b9f4a88d912 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_format_store.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_format_store.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_iterator.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_iterator.hpp
index 4f90a98fc02..4f90a98fc02 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/find_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/find_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/finder.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder.hpp
index a2a958212de..a2a958212de 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/finder.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/finder_regex.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder_regex.hpp
index 9cb01cfaf13..9cb01cfaf13 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/finder_regex.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/finder_regex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/formatter.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter.hpp
index c071822f2ac..c071822f2ac 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/formatter_regex.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter_regex.hpp
index 5f26407bed8..5f26407bed8 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/formatter_regex.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/formatter_regex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/predicate.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/predicate.hpp
index 5acf3cc6633..5acf3cc6633 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/predicate.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/predicate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/replace_storage.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/replace_storage.hpp
index db35e4c53be..db35e4c53be 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/replace_storage.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/replace_storage.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/sequence.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/sequence.hpp
index dc47409115f..dc47409115f 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/trim.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/trim.hpp
index 1233e49d301..1233e49d301 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/trim.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/trim.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/util.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/util.hpp
index 7844b6723cc..7844b6723cc 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/detail/util.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/detail/util.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/erase.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/erase.hpp
index 68837909783..68837909783 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/erase.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/erase.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/find.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/find.hpp
index f2c2926b509..f2c2926b509 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/find.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/find.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/find_format.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/find_format.hpp
index 0e84a4ee68a..0e84a4ee68a 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/find_format.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/find_format.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/find_iterator.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/find_iterator.hpp
index 5a52d92e41b..5a52d92e41b 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/find_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/find_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/finder.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/finder.hpp
index 61f6e4155bc..61f6e4155bc 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/finder.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/finder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/formatter.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/formatter.hpp
index de8681bc3f5..de8681bc3f5 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/iter_find.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/iter_find.hpp
index 10424abc749..10424abc749 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/iter_find.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/iter_find.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/join.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/join.hpp
index b871eb44f69..b871eb44f69 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/join.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/join.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/predicate.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/predicate.hpp
index 0879829b5a4..0879829b5a4 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/predicate.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/predicate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/predicate_facade.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/predicate_facade.hpp
index a9753fc2ae6..a9753fc2ae6 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/predicate_facade.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/predicate_facade.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/regex.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/regex.hpp
index a6c7c60ae8d..a6c7c60ae8d 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/regex.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/regex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/regex_find_format.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/regex_find_format.hpp
index 409afc2ba0c..409afc2ba0c 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/regex_find_format.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/regex_find_format.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/replace.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/replace.hpp
index 2adb031c59a..2adb031c59a 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/replace.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/replace.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/sequence_traits.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/sequence_traits.hpp
index be151f8d3d2..be151f8d3d2 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/sequence_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/sequence_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/split.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/split.hpp
index cae712c07fa..cae712c07fa 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/split.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/split.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/std/list_traits.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/std/list_traits.hpp
index a3cf7bb18c5..a3cf7bb18c5 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/std/list_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/std/list_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/std/rope_traits.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/std/rope_traits.hpp
index 637059a5504..637059a5504 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/std/rope_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/std/rope_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/std/slist_traits.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/std/slist_traits.hpp
index c30b93c73ad..c30b93c73ad 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/std/slist_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/std/slist_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/std/string_traits.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/std/string_traits.hpp
index c9408307d33..c9408307d33 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/std/string_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/std/string_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/std_containers_traits.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/std_containers_traits.hpp
index 3f02246fda5..3f02246fda5 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/std_containers_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/std_containers_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/trim.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/trim.hpp
index e740d57d933..e740d57d933 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/trim.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/trim.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/trim_all.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/trim_all.hpp
index a616f7f33ea..a616f7f33ea 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/trim_all.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/trim_all.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string/yes_no_type.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string/yes_no_type.hpp
index b76cc6c155c..b76cc6c155c 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string/yes_no_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string/yes_no_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/algorithm/string_regex.hpp b/src/third_party/boost-1.69.0/boost/algorithm/string_regex.hpp
index 791aa18481c..791aa18481c 100644
--- a/src/third_party/boost-1.68.0/boost/algorithm/string_regex.hpp
+++ b/src/third_party/boost-1.69.0/boost/algorithm/string_regex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align.hpp b/src/third_party/boost-1.69.0/boost/align.hpp
index 45fe36bbcc3..45fe36bbcc3 100644
--- a/src/third_party/boost-1.68.0/boost/align.hpp
+++ b/src/third_party/boost-1.69.0/boost/align.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/align.hpp b/src/third_party/boost-1.69.0/boost/align/align.hpp
index ee4371091cb..ee4371091cb 100644
--- a/src/third_party/boost-1.68.0/boost/align/align.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/align.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/align_down.hpp b/src/third_party/boost-1.69.0/boost/align/align_down.hpp
index 355844f8aa2..355844f8aa2 100644
--- a/src/third_party/boost-1.68.0/boost/align/align_down.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/align_down.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/align_up.hpp b/src/third_party/boost-1.69.0/boost/align/align_up.hpp
index 6401ea848a6..6401ea848a6 100644
--- a/src/third_party/boost-1.68.0/boost/align/align_up.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/align_up.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/aligned_alloc.hpp b/src/third_party/boost-1.69.0/boost/align/aligned_alloc.hpp
index 42128f1b24a..42128f1b24a 100644
--- a/src/third_party/boost-1.68.0/boost/align/aligned_alloc.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/aligned_alloc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/aligned_allocator.hpp b/src/third_party/boost-1.69.0/boost/align/aligned_allocator.hpp
new file mode 100644
index 00000000000..4ec6b50c2f3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/align/aligned_allocator.hpp
@@ -0,0 +1,155 @@
+/*
+Copyright 2014-2015 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License, Version 1.0.
+(http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP
+#define BOOST_ALIGN_ALIGNED_ALLOCATOR_HPP
+
+#include <boost/align/detail/addressof.hpp>
+#include <boost/align/detail/is_alignment_constant.hpp>
+#include <boost/align/detail/max_objects.hpp>
+#include <boost/align/detail/max_size.hpp>
+#include <boost/align/aligned_alloc.hpp>
+#include <boost/align/aligned_allocator_forward.hpp>
+#include <boost/align/alignment_of.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <new>
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#include <utility>
+#endif
+
+namespace boost {
+namespace alignment {
+
+template<class T, std::size_t Alignment>
+class aligned_allocator {
+ BOOST_STATIC_ASSERT(detail::is_alignment_constant<Alignment>::value);
+
+public:
+ typedef T value_type;
+ typedef T* pointer;
+ typedef const T* const_pointer;
+ typedef void* void_pointer;
+ typedef const void* const_void_pointer;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef T& reference;
+ typedef const T& const_reference;
+
+ template<class U>
+ struct rebind {
+ typedef aligned_allocator<U, Alignment> other;
+ };
+
+#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+ aligned_allocator() = default;
+#else
+ aligned_allocator() BOOST_NOEXCEPT { }
+#endif
+
+ template<class U>
+ aligned_allocator(const aligned_allocator<U, Alignment>&)
+ BOOST_NOEXCEPT { }
+
+ pointer address(reference value) const BOOST_NOEXCEPT {
+ return detail::addressof(value);
+ }
+
+ const_pointer address(const_reference value) const BOOST_NOEXCEPT {
+ return detail::addressof(value);
+ }
+
+ pointer allocate(size_type size, const_void_pointer = 0) {
+ enum {
+ m = detail::max_size<Alignment,
+ alignment_of<value_type>::value>::value
+ };
+ if (size == 0) {
+ return 0;
+ }
+ void* p = boost::alignment::aligned_alloc(m, sizeof(T) * size);
+ if (!p) {
+ boost::throw_exception(std::bad_alloc());
+ }
+ return static_cast<T*>(p);
+ }
+
+ void deallocate(pointer ptr, size_type) {
+ boost::alignment::aligned_free(ptr);
+ }
+
+ BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT {
+ return detail::max_objects<T>::value;
+ }
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template<class U, class... Args>
+ void construct(U* ptr, Args&&... args) {
+ ::new((void*)ptr) U(std::forward<Args>(args)...);
+ }
+#else
+ template<class U, class V>
+ void construct(U* ptr, V&& value) {
+ ::new((void*)ptr) U(std::forward<V>(value));
+ }
+#endif
+#else
+ template<class U, class V>
+ void construct(U* ptr, const V& value) {
+ ::new((void*)ptr) U(value);
+ }
+#endif
+
+ template<class U>
+ void construct(U* ptr) {
+ ::new((void*)ptr) U();
+ }
+
+ template<class U>
+ void destroy(U* ptr) {
+ (void)ptr;
+ ptr->~U();
+ }
+};
+
+template<std::size_t Alignment>
+class aligned_allocator<void, Alignment> {
+ BOOST_STATIC_ASSERT(detail::is_alignment_constant<Alignment>::value);
+
+public:
+ typedef void value_type;
+ typedef void* pointer;
+ typedef const void* const_pointer;
+
+ template<class U>
+ struct rebind {
+ typedef aligned_allocator<U, Alignment> other;
+ };
+};
+
+template<class T, class U, std::size_t Alignment>
+inline bool
+operator==(const aligned_allocator<T, Alignment>&,
+ const aligned_allocator<U, Alignment>&) BOOST_NOEXCEPT
+{
+ return true;
+}
+
+template<class T, class U, std::size_t Alignment>
+inline bool
+operator!=(const aligned_allocator<T, Alignment>&,
+ const aligned_allocator<U, Alignment>&) BOOST_NOEXCEPT
+{
+ return false;
+}
+
+} /* alignment */
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor.hpp b/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor.hpp
new file mode 100644
index 00000000000..912651687a9
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor.hpp
@@ -0,0 +1,174 @@
+/*
+Copyright 2014-2016 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License, Version 1.0.
+(http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP
+#define BOOST_ALIGN_ALIGNED_ALLOCATOR_ADAPTOR_HPP
+
+#include <boost/align/detail/is_alignment_constant.hpp>
+#include <boost/align/detail/max_align.hpp>
+#include <boost/align/detail/max_size.hpp>
+#include <boost/align/align.hpp>
+#include <boost/align/aligned_allocator_adaptor_forward.hpp>
+#include <boost/align/alignment_of.hpp>
+#include <boost/core/pointer_traits.hpp>
+#include <boost/static_assert.hpp>
+#include <new>
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+#include <memory>
+#endif
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#include <utility>
+#endif
+
+namespace boost {
+namespace alignment {
+
+template<class Allocator, std::size_t Alignment>
+class aligned_allocator_adaptor
+ : public Allocator {
+ BOOST_STATIC_ASSERT(detail::is_alignment_constant<Alignment>::value);
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+ typedef std::allocator_traits<Allocator> traits;
+ typedef typename traits::template rebind_alloc<char> char_alloc;
+ typedef typename traits::template rebind_traits<char> char_traits;
+ typedef typename char_traits::pointer char_ptr;
+#else
+ typedef typename Allocator::template rebind<char>::other char_alloc;
+ typedef typename char_alloc::pointer char_ptr;
+#endif
+
+public:
+ typedef typename Allocator::value_type value_type;
+ typedef value_type* pointer;
+ typedef const value_type* const_pointer;
+ typedef void* void_pointer;
+ typedef const void* const_void_pointer;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+private:
+ template<class U>
+ struct min_align {
+ enum {
+ value = detail::max_size<Alignment,
+ detail::max_align<U, char_ptr>::value>::value
+ };
+ };
+
+public:
+ template<class U>
+ struct rebind {
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+ typedef aligned_allocator_adaptor<typename traits::template
+ rebind_alloc<U>, Alignment> other;
+#else
+ typedef aligned_allocator_adaptor<typename Allocator::template
+ rebind<U>::other, Alignment> other;
+#endif
+ };
+
+#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+ aligned_allocator_adaptor() = default;
+#else
+ aligned_allocator_adaptor()
+ : Allocator() { }
+#endif
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<class A>
+ explicit aligned_allocator_adaptor(A&& alloc) BOOST_NOEXCEPT
+ : Allocator(std::forward<A>(alloc)) { }
+#else
+ template<class A>
+ explicit aligned_allocator_adaptor(const A& alloc) BOOST_NOEXCEPT
+ : Allocator(alloc) { }
+#endif
+
+ template<class U>
+ aligned_allocator_adaptor(const aligned_allocator_adaptor<U,
+ Alignment>& other) BOOST_NOEXCEPT
+ : Allocator(other.base()) { }
+
+ Allocator& base() BOOST_NOEXCEPT {
+ return static_cast<Allocator&>(*this);
+ }
+
+ const Allocator& base() const BOOST_NOEXCEPT {
+ return static_cast<const Allocator&>(*this);
+ }
+
+ pointer allocate(size_type size) {
+ enum {
+ m = min_align<value_type>::value
+ };
+ std::size_t s = size * sizeof(value_type);
+ std::size_t n = s + m - 1;
+ char_alloc a(base());
+ char_ptr p = a.allocate(sizeof p + n);
+ void* r = boost::to_address(p) + sizeof p;
+ (void)boost::alignment::align(m, s, r, n);
+ ::new(static_cast<void*>(static_cast<char_ptr*>(r) - 1)) char_ptr(p);
+ return static_cast<pointer>(r);
+ }
+
+ pointer allocate(size_type size, const_void_pointer hint) {
+ enum {
+ m = min_align<value_type>::value
+ };
+ std::size_t s = size * sizeof(value_type);
+ std::size_t n = s + m - 1;
+ char_ptr h = char_ptr();
+ if (hint) {
+ h = *(static_cast<const char_ptr*>(hint) - 1);
+ }
+ char_alloc a(base());
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+ char_ptr p = char_traits::allocate(a, sizeof p + n, h);
+#else
+ char_ptr p = a.allocate(sizeof p + n, h);
+#endif
+ void* r = boost::to_address(p) + sizeof p;
+ (void)boost::alignment::align(m, s, r, n);
+ ::new(static_cast<void*>(static_cast<char_ptr*>(r) - 1)) char_ptr(p);
+ return static_cast<pointer>(r);
+ }
+
+ void deallocate(pointer ptr, size_type size) {
+ enum {
+ m = min_align<value_type>::value
+ };
+ char_ptr* p = reinterpret_cast<char_ptr*>(ptr) - 1;
+ char_ptr r = *p;
+ p->~char_ptr();
+ char_alloc a(base());
+ a.deallocate(r, sizeof r + size * sizeof(value_type) + m - 1);
+ }
+};
+
+template<class A, class B, std::size_t Alignment>
+inline bool
+operator==(const aligned_allocator_adaptor<A, Alignment>& a,
+ const aligned_allocator_adaptor<B, Alignment>& b) BOOST_NOEXCEPT
+{
+ return a.base() == b.base();
+}
+
+template<class A, class B, std::size_t Alignment>
+inline bool
+operator!=(const aligned_allocator_adaptor<A, Alignment>& a,
+ const aligned_allocator_adaptor<B, Alignment>& b) BOOST_NOEXCEPT
+{
+ return !(a == b);
+}
+
+} /* alignment */
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/align/aligned_allocator_adaptor_forward.hpp b/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor_forward.hpp
index f762cd1c3ab..f762cd1c3ab 100644
--- a/src/third_party/boost-1.68.0/boost/align/aligned_allocator_adaptor_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/aligned_allocator_adaptor_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/aligned_allocator_forward.hpp b/src/third_party/boost-1.69.0/boost/align/aligned_allocator_forward.hpp
index 23add71aaac..23add71aaac 100644
--- a/src/third_party/boost-1.68.0/boost/align/aligned_allocator_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/aligned_allocator_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/aligned_delete.hpp b/src/third_party/boost-1.69.0/boost/align/aligned_delete.hpp
index 385bd557af9..385bd557af9 100644
--- a/src/third_party/boost-1.68.0/boost/align/aligned_delete.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/aligned_delete.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/aligned_delete_forward.hpp b/src/third_party/boost-1.69.0/boost/align/aligned_delete_forward.hpp
index d5b766d7f0a..d5b766d7f0a 100644
--- a/src/third_party/boost-1.68.0/boost/align/aligned_delete_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/aligned_delete_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/alignment_of.hpp b/src/third_party/boost-1.69.0/boost/align/alignment_of.hpp
index 488df0b9e0e..488df0b9e0e 100644
--- a/src/third_party/boost-1.68.0/boost/align/alignment_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/alignment_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/alignment_of_forward.hpp b/src/third_party/boost-1.69.0/boost/align/alignment_of_forward.hpp
index 31db15f23c6..31db15f23c6 100644
--- a/src/third_party/boost-1.68.0/boost/align/alignment_of_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/alignment_of_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/assume_aligned.hpp b/src/third_party/boost-1.69.0/boost/align/assume_aligned.hpp
index 22e5103654e..22e5103654e 100644
--- a/src/third_party/boost-1.68.0/boost/align/assume_aligned.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/assume_aligned.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/addressof.hpp b/src/third_party/boost-1.69.0/boost/align/detail/addressof.hpp
index a314830bed7..a314830bed7 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/addressof.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/addressof.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/align.hpp b/src/third_party/boost-1.69.0/boost/align/detail/align.hpp
index 905940ad77a..905940ad77a 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/align.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/align.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/align_cxx11.hpp b/src/third_party/boost-1.69.0/boost/align/detail/align_cxx11.hpp
index 637541ab408..637541ab408 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/align_cxx11.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/align_cxx11.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/align_down.hpp b/src/third_party/boost-1.69.0/boost/align/detail/align_down.hpp
index de3c80d06d3..de3c80d06d3 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/align_down.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/align_down.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/align_up.hpp b/src/third_party/boost-1.69.0/boost/align/detail/align_up.hpp
index ac11f8964fb..ac11f8964fb 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/align_up.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/align_up.hpp
diff --git a/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc.hpp b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc.hpp
new file mode 100644
index 00000000000..d27a5499090
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc.hpp
@@ -0,0 +1,52 @@
+/*
+Copyright 2014-2015 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License, Version 1.0.
+(http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP
+#define BOOST_ALIGN_DETAIL_ALIGNED_ALLOC_HPP
+
+#include <boost/align/detail/is_alignment.hpp>
+#include <boost/align/align.hpp>
+#include <boost/align/alignment_of.hpp>
+#include <boost/assert.hpp>
+#include <cstdlib>
+
+namespace boost {
+namespace alignment {
+
+inline void*
+aligned_alloc(std::size_t alignment, std::size_t size) BOOST_NOEXCEPT
+{
+ BOOST_ASSERT(detail::is_alignment(alignment));
+ enum {
+ N = alignment_of<void*>::value
+ };
+ if (alignment < N) {
+ alignment = N;
+ }
+ std::size_t n = size + alignment - N;
+ void* p = std::malloc(sizeof(void*) + n);
+ if (p) {
+ void* r = static_cast<char*>(p) + sizeof(void*);
+ (void)boost::alignment::align(alignment, size, r, n);
+ *(static_cast<void**>(r) - 1) = p;
+ p = r;
+ }
+ return p;
+}
+
+inline void
+aligned_free(void* ptr) BOOST_NOEXCEPT
+{
+ if (ptr) {
+ std::free(*(static_cast<void**>(ptr) - 1));
+ }
+}
+
+} /* alignment */
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_android.hpp b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_android.hpp
index 4119fbd9bce..4119fbd9bce 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_android.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_android.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_macos.hpp b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_macos.hpp
index 76366fa5c10..76366fa5c10 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_macos.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_macos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_msvc.hpp b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_msvc.hpp
index 45c57c99151..45c57c99151 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_msvc.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_msvc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_posix.hpp b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_posix.hpp
index 78fc842d205..78fc842d205 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_posix.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_posix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_sunos.hpp b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_sunos.hpp
index 0948b40e392..0948b40e392 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/aligned_alloc_sunos.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/aligned_alloc_sunos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of.hpp b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of.hpp
index b6fc3dcdcf7..b6fc3dcdcf7 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_clang.hpp b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_clang.hpp
index 95773e5ea31..95773e5ea31 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_clang.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_clang.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_codegear.hpp b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_codegear.hpp
index ea6f9042423..ea6f9042423 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_codegear.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_codegear.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_cxx11.hpp b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_cxx11.hpp
index 05c7429385c..05c7429385c 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_cxx11.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_cxx11.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_gcc.hpp b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_gcc.hpp
index 66a63a50b12..66a63a50b12 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_gcc.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_gcc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_msvc.hpp b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_msvc.hpp
index 440b840db45..440b840db45 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/alignment_of_msvc.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/alignment_of_msvc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned.hpp b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned.hpp
index d218d8c64ed..d218d8c64ed 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_clang.hpp b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_clang.hpp
index 4c7159fa28e..4c7159fa28e 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_clang.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_clang.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_gcc.hpp b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_gcc.hpp
index 117344447ae..117344447ae 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_gcc.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_gcc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_intel.hpp b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_intel.hpp
index 6792ce005ce..6792ce005ce 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_intel.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_intel.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_msvc.hpp b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_msvc.hpp
index 75ac7e12429..75ac7e12429 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/assume_aligned_msvc.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/assume_aligned_msvc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/element_type.hpp b/src/third_party/boost-1.69.0/boost/align/detail/element_type.hpp
index 5b2b732da0a..5b2b732da0a 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/element_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/element_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/integral_constant.hpp b/src/third_party/boost-1.69.0/boost/align/detail/integral_constant.hpp
index 860096783e9..860096783e9 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/integral_constant.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/integral_constant.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/is_aligned.hpp b/src/third_party/boost-1.69.0/boost/align/detail/is_aligned.hpp
index 61982c46856..61982c46856 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/is_aligned.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/is_aligned.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/is_alignment.hpp b/src/third_party/boost-1.69.0/boost/align/detail/is_alignment.hpp
index 542fbe46942..542fbe46942 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/is_alignment.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/is_alignment.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/is_alignment_constant.hpp b/src/third_party/boost-1.69.0/boost/align/detail/is_alignment_constant.hpp
index 0ded62857ee..0ded62857ee 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/is_alignment_constant.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/is_alignment_constant.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/max_align.hpp b/src/third_party/boost-1.69.0/boost/align/detail/max_align.hpp
index 9c09fec9c96..9c09fec9c96 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/max_align.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/max_align.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/max_objects.hpp b/src/third_party/boost-1.69.0/boost/align/detail/max_objects.hpp
index 9fdd30e1187..9fdd30e1187 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/max_objects.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/max_objects.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/max_size.hpp b/src/third_party/boost-1.69.0/boost/align/detail/max_size.hpp
index 22cefdbec55..22cefdbec55 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/max_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/max_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/detail/min_size.hpp b/src/third_party/boost-1.69.0/boost/align/detail/min_size.hpp
index 5b478fdaf06..5b478fdaf06 100644
--- a/src/third_party/boost-1.68.0/boost/align/detail/min_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/detail/min_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/align/is_aligned.hpp b/src/third_party/boost-1.69.0/boost/align/is_aligned.hpp
index c8266d0eae5..c8266d0eae5 100644
--- a/src/third_party/boost-1.68.0/boost/align/is_aligned.hpp
+++ b/src/third_party/boost-1.69.0/boost/align/is_aligned.hpp
diff --git a/src/third_party/boost-1.68.0/boost/aligned_storage.hpp b/src/third_party/boost-1.69.0/boost/aligned_storage.hpp
index f400fa9e753..f400fa9e753 100644
--- a/src/third_party/boost-1.68.0/boost/aligned_storage.hpp
+++ b/src/third_party/boost-1.69.0/boost/aligned_storage.hpp
diff --git a/src/third_party/boost-1.69.0/boost/any.hpp b/src/third_party/boost-1.69.0/boost/any.hpp
new file mode 100644
index 00000000000..8f409d7bfe5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/any.hpp
@@ -0,0 +1,337 @@
+// See http://www.boost.org/libs/any for Documentation.
+
+#ifndef BOOST_ANY_INCLUDED
+#define BOOST_ANY_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+// what: variant type boost::any
+// who: contributed by Kevlin Henney,
+// with features contributed and bugs found by
+// Antony Polukhin, Ed Brey, Mark Rodgers,
+// Peter Dimov, and James Curran
+// when: July 2001, April 2013 - May 2013
+
+#include <algorithm>
+
+#include <boost/config.hpp>
+#include <boost/type_index.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/core/addressof.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/conditional.hpp>
+
+namespace boost
+{
+ class any
+ {
+ public: // structors
+
+ any() BOOST_NOEXCEPT
+ : content(0)
+ {
+ }
+
+ template<typename ValueType>
+ any(const ValueType & value)
+ : content(new holder<
+ BOOST_DEDUCED_TYPENAME remove_cv<BOOST_DEDUCED_TYPENAME decay<const ValueType>::type>::type
+ >(value))
+ {
+ }
+
+ any(const any & other)
+ : content(other.content ? other.content->clone() : 0)
+ {
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ // Move constructor
+ any(any&& other) BOOST_NOEXCEPT
+ : content(other.content)
+ {
+ other.content = 0;
+ }
+
+ // Perfect forwarding of ValueType
+ template<typename ValueType>
+ any(ValueType&& value
+ , typename boost::disable_if<boost::is_same<any&, ValueType> >::type* = 0 // disable if value has type `any&`
+ , typename boost::disable_if<boost::is_const<ValueType> >::type* = 0) // disable if value has type `const ValueType&&`
+ : content(new holder< typename decay<ValueType>::type >(static_cast<ValueType&&>(value)))
+ {
+ }
+#endif
+
+ ~any() BOOST_NOEXCEPT
+ {
+ delete content;
+ }
+
+ public: // modifiers
+
+ any & swap(any & rhs) BOOST_NOEXCEPT
+ {
+ std::swap(content, rhs.content);
+ return *this;
+ }
+
+
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template<typename ValueType>
+ any & operator=(const ValueType & rhs)
+ {
+ any(rhs).swap(*this);
+ return *this;
+ }
+
+ any & operator=(any rhs)
+ {
+ any(rhs).swap(*this);
+ return *this;
+ }
+
+#else
+ any & operator=(const any& rhs)
+ {
+ any(rhs).swap(*this);
+ return *this;
+ }
+
+ // move assignment
+ any & operator=(any&& rhs) BOOST_NOEXCEPT
+ {
+ rhs.swap(*this);
+ any().swap(rhs);
+ return *this;
+ }
+
+ // Perfect forwarding of ValueType
+ template <class ValueType>
+ any & operator=(ValueType&& rhs)
+ {
+ any(static_cast<ValueType&&>(rhs)).swap(*this);
+ return *this;
+ }
+#endif
+
+ public: // queries
+
+ bool empty() const BOOST_NOEXCEPT
+ {
+ return !content;
+ }
+
+ void clear() BOOST_NOEXCEPT
+ {
+ any().swap(*this);
+ }
+
+ const boost::typeindex::type_info& type() const BOOST_NOEXCEPT
+ {
+ return content ? content->type() : boost::typeindex::type_id<void>().type_info();
+ }
+
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+ private: // types
+#else
+ public: // types (public so any_cast can be non-friend)
+#endif
+
+ class BOOST_SYMBOL_VISIBLE placeholder
+ {
+ public: // structors
+
+ virtual ~placeholder()
+ {
+ }
+
+ public: // queries
+
+ virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT = 0;
+
+ virtual placeholder * clone() const = 0;
+
+ };
+
+ template<typename ValueType>
+ class holder : public placeholder
+ {
+ public: // structors
+
+ holder(const ValueType & value)
+ : held(value)
+ {
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ holder(ValueType&& value)
+ : held(static_cast< ValueType&& >(value))
+ {
+ }
+#endif
+ public: // queries
+
+ virtual const boost::typeindex::type_info& type() const BOOST_NOEXCEPT
+ {
+ return boost::typeindex::type_id<ValueType>().type_info();
+ }
+
+ virtual placeholder * clone() const
+ {
+ return new holder(held);
+ }
+
+ public: // representation
+
+ ValueType held;
+
+ private: // intentionally left unimplemented
+ holder & operator=(const holder &);
+ };
+
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+
+ private: // representation
+
+ template<typename ValueType>
+ friend ValueType * any_cast(any *) BOOST_NOEXCEPT;
+
+ template<typename ValueType>
+ friend ValueType * unsafe_any_cast(any *) BOOST_NOEXCEPT;
+
+#else
+
+ public: // representation (public so any_cast can be non-friend)
+
+#endif
+
+ placeholder * content;
+
+ };
+
+ inline void swap(any & lhs, any & rhs) BOOST_NOEXCEPT
+ {
+ lhs.swap(rhs);
+ }
+
+ class BOOST_SYMBOL_VISIBLE bad_any_cast :
+#ifndef BOOST_NO_RTTI
+ public std::bad_cast
+#else
+ public std::exception
+#endif
+ {
+ public:
+ virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ return "boost::bad_any_cast: "
+ "failed conversion using boost::any_cast";
+ }
+ };
+
+ template<typename ValueType>
+ ValueType * any_cast(any * operand) BOOST_NOEXCEPT
+ {
+ return operand && operand->type() == boost::typeindex::type_id<ValueType>()
+ ? boost::addressof(
+ static_cast<any::holder<BOOST_DEDUCED_TYPENAME remove_cv<ValueType>::type> *>(operand->content)->held
+ )
+ : 0;
+ }
+
+ template<typename ValueType>
+ inline const ValueType * any_cast(const any * operand) BOOST_NOEXCEPT
+ {
+ return any_cast<ValueType>(const_cast<any *>(operand));
+ }
+
+ template<typename ValueType>
+ ValueType any_cast(any & operand)
+ {
+ typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
+
+
+ nonref * result = any_cast<nonref>(boost::addressof(operand));
+ if(!result)
+ boost::throw_exception(bad_any_cast());
+
+ // Attempt to avoid construction of a temporary object in cases when
+ // `ValueType` is not a reference. Example:
+ // `static_cast<std::string>(*result);`
+ // which is equal to `std::string(*result);`
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::is_reference<ValueType>::value,
+ ValueType,
+ BOOST_DEDUCED_TYPENAME boost::add_reference<ValueType>::type
+ >::type ref_type;
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4172) // "returning address of local variable or temporary" but *result is not local!
+#endif
+ return static_cast<ref_type>(*result);
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+ }
+
+ template<typename ValueType>
+ inline ValueType any_cast(const any & operand)
+ {
+ typedef BOOST_DEDUCED_TYPENAME remove_reference<ValueType>::type nonref;
+ return any_cast<const nonref &>(const_cast<any &>(operand));
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template<typename ValueType>
+ inline ValueType any_cast(any&& operand)
+ {
+ BOOST_STATIC_ASSERT_MSG(
+ boost::is_rvalue_reference<ValueType&&>::value /*true if ValueType is rvalue or just a value*/
+ || boost::is_const< typename boost::remove_reference<ValueType>::type >::value,
+ "boost::any_cast shall not be used for getting nonconst references to temporary objects"
+ );
+ return any_cast<ValueType>(operand);
+ }
+#endif
+
+
+ // Note: The "unsafe" versions of any_cast are not part of the
+ // public interface and may be removed at any time. They are
+ // required where we know what type is stored in the any and can't
+ // use typeid() comparison, e.g., when our types may travel across
+ // different shared libraries.
+ template<typename ValueType>
+ inline ValueType * unsafe_any_cast(any * operand) BOOST_NOEXCEPT
+ {
+ return boost::addressof(
+ static_cast<any::holder<ValueType> *>(operand->content)->held
+ );
+ }
+
+ template<typename ValueType>
+ inline const ValueType * unsafe_any_cast(const any * operand) BOOST_NOEXCEPT
+ {
+ return unsafe_any_cast<ValueType>(const_cast<any *>(operand));
+ }
+}
+
+// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/archive/archive_exception.hpp b/src/third_party/boost-1.69.0/boost/archive/archive_exception.hpp
index fabcdb5fa71..fabcdb5fa71 100644
--- a/src/third_party/boost-1.68.0/boost/archive/archive_exception.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/archive_exception.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_archive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_archive.hpp
index 9283974ff10..9283974ff10 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_archive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_archive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/basic_binary_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_binary_iarchive.hpp
new file mode 100644
index 00000000000..c85ead86c62
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_binary_iarchive.hpp
@@ -0,0 +1,216 @@
+#ifndef BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
+#define BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// basic_binary_iarchive.hpp
+//
+// archives stored as native binary - this should be the fastest way
+// to archive the state of a group of obects. It makes no attempt to
+// convert to any canonical form.
+
+// IN GENERAL, ARCHIVES CREATED WITH THIS CLASS WILL NOT BE READABLE
+// ON PLATFORM APART FROM THE ONE THEY ARE CREATED ON
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#include <boost/archive/basic_archive.hpp>
+#include <boost/archive/detail/common_iarchive.hpp>
+#include <boost/serialization/collection_size_type.hpp>
+#include <boost/serialization/string.hpp>
+#include <boost/serialization/item_version_type.hpp>
+#include <boost/integer_traits.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
+
+namespace boost {
+namespace archive {
+
+namespace detail {
+ template<class Archive> class interface_iarchive;
+} // namespace detail
+
+/////////////////////////////////////////////////////////////////////////
+// class basic_binary_iarchive - read serialized objects from a input binary stream
+template<class Archive>
+class BOOST_SYMBOL_VISIBLE basic_binary_iarchive :
+ public detail::common_iarchive<Archive>
+{
+#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+public:
+#else
+protected:
+ #if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
+ // for some inexplicable reason insertion of "class" generates compile erro
+ // on msvc 7.1
+ friend detail::interface_iarchive<Archive>;
+ #else
+ friend class detail::interface_iarchive<Archive>;
+ #endif
+#endif
+ // intermediate level to support override of operators
+ // fot templates in the absence of partial function
+ // template ordering. If we get here pass to base class
+ // note extra nonsense to sneak it pass the borland compiers
+ typedef detail::common_iarchive<Archive> detail_common_iarchive;
+ template<class T>
+ void load_override(T & t){
+ this->detail_common_iarchive::load_override(t);
+ }
+
+ // include these to trap a change in binary format which
+ // isn't specifically handled
+ // upto 32K classes
+ BOOST_STATIC_ASSERT(sizeof(class_id_type) == sizeof(int_least16_t));
+ BOOST_STATIC_ASSERT(sizeof(class_id_reference_type) == sizeof(int_least16_t));
+ // upto 2G objects
+ BOOST_STATIC_ASSERT(sizeof(object_id_type) == sizeof(uint_least32_t));
+ BOOST_STATIC_ASSERT(sizeof(object_reference_type) == sizeof(uint_least32_t));
+
+ // binary files don't include the optional information
+ void load_override(class_id_optional_type & /* t */){}
+
+ void load_override(tracking_type & t, int /*version*/){
+ library_version_type lvt = this->get_library_version();
+ if(boost::archive::library_version_type(6) < lvt){
+ int_least8_t x=0;
+ * this->This() >> x;
+ t = boost::archive::tracking_type(x);
+ }
+ else{
+ bool x=0;
+ * this->This() >> x;
+ t = boost::archive::tracking_type(x);
+ }
+ }
+ void load_override(class_id_type & t){
+ library_version_type lvt = this->get_library_version();
+ /*
+ * library versions:
+ * boost 1.39 -> 5
+ * boost 1.43 -> 7
+ * boost 1.47 -> 9
+ *
+ *
+ * 1) in boost 1.43 and inferior, class_id_type is always a 16bit value, with no check on the library version
+ * --> this means all archives with version v <= 7 are written with a 16bit class_id_type
+ * 2) in boost 1.44 this load_override has disappeared (and thus boost 1.44 is not backward compatible at all !!)
+ * 3) recent boosts reintroduced load_override with a test on the version :
+ * - v > 7 : this->detail_common_iarchive::load_override(t, version)
+ * - v > 6 : 16bit
+ * - other : 32bit
+ * --> which is obviously incorrect, see point 1
+ *
+ * the fix here decodes class_id_type on 16bit for all v <= 7, which seems to be the correct behaviour ...
+ */
+ if(boost::archive::library_version_type(7) < lvt){
+ this->detail_common_iarchive::load_override(t);
+ }
+ else{
+ int_least16_t x=0;
+ * this->This() >> x;
+ t = boost::archive::class_id_type(x);
+ }
+ }
+ void load_override(class_id_reference_type & t){
+ load_override(static_cast<class_id_type &>(t));
+ }
+
+ void load_override(version_type & t){
+ library_version_type lvt = this->get_library_version();
+ if(boost::archive::library_version_type(7) < lvt){
+ this->detail_common_iarchive::load_override(t);
+ }
+ else
+ if(boost::archive::library_version_type(6) < lvt){
+ uint_least8_t x=0;
+ * this->This() >> x;
+ t = boost::archive::version_type(x);
+ }
+ else
+ if(boost::archive::library_version_type(5) < lvt){
+ uint_least16_t x=0;
+ * this->This() >> x;
+ t = boost::archive::version_type(x);
+ }
+ else
+ if(boost::archive::library_version_type(2) < lvt){
+ // upto 255 versions
+ unsigned char x=0;
+ * this->This() >> x;
+ t = version_type(x);
+ }
+ else{
+ unsigned int x=0;
+ * this->This() >> x;
+ t = boost::archive::version_type(x);
+ }
+ }
+
+ void load_override(boost::serialization::item_version_type & t){
+ library_version_type lvt = this->get_library_version();
+// if(boost::archive::library_version_type(7) < lvt){
+ if(boost::archive::library_version_type(6) < lvt){
+ this->detail_common_iarchive::load_override(t);
+ }
+ else
+ if(boost::archive::library_version_type(6) < lvt){
+ uint_least16_t x=0;
+ * this->This() >> x;
+ t = boost::serialization::item_version_type(x);
+ }
+ else{
+ unsigned int x=0;
+ * this->This() >> x;
+ t = boost::serialization::item_version_type(x);
+ }
+ }
+
+ void load_override(serialization::collection_size_type & t){
+ if(boost::archive::library_version_type(5) < this->get_library_version()){
+ this->detail_common_iarchive::load_override(t);
+ }
+ else{
+ unsigned int x=0;
+ * this->This() >> x;
+ t = serialization::collection_size_type(x);
+ }
+ }
+
+ BOOST_ARCHIVE_OR_WARCHIVE_DECL void
+ load_override(class_name_type & t);
+ BOOST_ARCHIVE_OR_WARCHIVE_DECL void
+ init();
+
+ basic_binary_iarchive(unsigned int flags) :
+ detail::common_iarchive<Archive>(flags)
+ {}
+};
+
+} // namespace archive
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+
+#endif // BOOST_ARCHIVE_BASIC_BINARY_IARCHIVE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_binary_iprimitive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_binary_iprimitive.hpp
index 665d3e81e1f..665d3e81e1f 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_binary_iprimitive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_binary_iprimitive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_binary_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_binary_oarchive.hpp
index f05f2f86d55..f05f2f86d55 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_binary_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_binary_oarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_binary_oprimitive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_binary_oprimitive.hpp
index 6dc770c60e8..6dc770c60e8 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_binary_oprimitive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_binary_oprimitive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_streambuf_locale_saver.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_streambuf_locale_saver.hpp
index 5cd4b36f081..5cd4b36f081 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_streambuf_locale_saver.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_streambuf_locale_saver.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_text_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_text_iarchive.hpp
index 48a646cc1f7..48a646cc1f7 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_text_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_text_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_text_iprimitive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_text_iprimitive.hpp
index bf936b55546..bf936b55546 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_text_iprimitive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_text_iprimitive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_text_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_text_oarchive.hpp
index 6f7f8fb167d..6f7f8fb167d 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_text_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_text_oarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_text_oprimitive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_text_oprimitive.hpp
index 45f09358ece..45f09358ece 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_text_oprimitive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_text_oprimitive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_xml_archive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_xml_archive.hpp
index bef368b973b..bef368b973b 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_xml_archive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_xml_archive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_xml_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_xml_iarchive.hpp
index e9f7482f744..e9f7482f744 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_xml_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_xml_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/basic_xml_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/basic_xml_oarchive.hpp
index 107fca4ec65..107fca4ec65 100644
--- a/src/third_party/boost-1.68.0/boost/archive/basic_xml_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/basic_xml_oarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/binary_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/binary_iarchive.hpp
index 785ce7610b1..785ce7610b1 100644
--- a/src/third_party/boost-1.68.0/boost/archive/binary_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/binary_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/binary_iarchive_impl.hpp b/src/third_party/boost-1.69.0/boost/archive/binary_iarchive_impl.hpp
index b4747c98ece..b4747c98ece 100644
--- a/src/third_party/boost-1.68.0/boost/archive/binary_iarchive_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/binary_iarchive_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/binary_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/binary_oarchive.hpp
index e8313fd7c95..e8313fd7c95 100644
--- a/src/third_party/boost-1.68.0/boost/archive/binary_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/binary_oarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/binary_oarchive_impl.hpp b/src/third_party/boost-1.69.0/boost/archive/binary_oarchive_impl.hpp
index 6b4d018a564..6b4d018a564 100644
--- a/src/third_party/boost-1.68.0/boost/archive/binary_oarchive_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/binary_oarchive_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/binary_wiarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/binary_wiarchive.hpp
index 775d8f82726..775d8f82726 100644
--- a/src/third_party/boost-1.68.0/boost/archive/binary_wiarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/binary_wiarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/binary_woarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/binary_woarchive.hpp
index a8817d6f8b4..a8817d6f8b4 100644
--- a/src/third_party/boost-1.68.0/boost/archive/binary_woarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/binary_woarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/codecvt_null.hpp b/src/third_party/boost-1.69.0/boost/archive/codecvt_null.hpp
index 3b39c8edef1..3b39c8edef1 100644
--- a/src/third_party/boost-1.68.0/boost/archive/codecvt_null.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/codecvt_null.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/abi_prefix.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/abi_prefix.hpp
index debf79e9f0b..debf79e9f0b 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/abi_prefix.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/abi_prefix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/abi_suffix.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/abi_suffix.hpp
index 4e054d66214..4e054d66214 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/abi_suffix.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/abi_suffix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/archive_serializer_map.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/archive_serializer_map.hpp
index 5432bfc73e7..5432bfc73e7 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/archive_serializer_map.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/archive_serializer_map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/auto_link_archive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/auto_link_archive.hpp
index 79b0e490d65..79b0e490d65 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/auto_link_archive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/auto_link_archive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/auto_link_warchive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/auto_link_warchive.hpp
index 683d191c20d..683d191c20d 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/auto_link_warchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/auto_link_warchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/basic_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/basic_iarchive.hpp
index 1f5a8bf63bf..1f5a8bf63bf 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/basic_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/basic_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/basic_iserializer.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/basic_iserializer.hpp
index 0d66674c349..0d66674c349 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/basic_iserializer.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/basic_iserializer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/basic_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/basic_oarchive.hpp
index c379108d584..c379108d584 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/basic_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/basic_oarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/basic_oserializer.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/basic_oserializer.hpp
index 94247e90056..94247e90056 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/basic_oserializer.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/basic_oserializer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/basic_pointer_iserializer.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_iserializer.hpp
index 1fc4b14d6e9..1fc4b14d6e9 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/basic_pointer_iserializer.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_iserializer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/basic_pointer_oserializer.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_oserializer.hpp
index 1a5d9549eab..1a5d9549eab 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/basic_pointer_oserializer.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/basic_pointer_oserializer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/basic_serializer.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer.hpp
index f9c4203f862..f9c4203f862 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/basic_serializer.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/basic_serializer_map.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer_map.hpp
index 79341803367..79341803367 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/basic_serializer_map.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/basic_serializer_map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/check.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/check.hpp
index 10034e7d101..10034e7d101 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/check.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/check.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/common_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/common_iarchive.hpp
index 4176a8a5ef1..4176a8a5ef1 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/common_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/common_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/common_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/common_oarchive.hpp
index f7428637e42..f7428637e42 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/common_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/common_oarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/decl.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/decl.hpp
index 4f731cded37..4f731cded37 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/decl.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/decl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/helper_collection.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/helper_collection.hpp
index edb4125e308..edb4125e308 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/helper_collection.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/helper_collection.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/interface_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/interface_iarchive.hpp
index 4a99e28b59f..4a99e28b59f 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/interface_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/interface_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/interface_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/interface_oarchive.hpp
index 359463ed9d8..359463ed9d8 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/interface_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/interface_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/iserializer.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/iserializer.hpp
new file mode 100644
index 00000000000..98cd6a17f2d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/iserializer.hpp
@@ -0,0 +1,630 @@
+#ifndef BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP
+#define BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#pragma inline_depth(511)
+#pragma inline_recursion(on)
+#endif
+
+#if defined(__MWERKS__)
+#pragma inline_depth(511)
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// iserializer.hpp: interface for serialization system.
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <new> // for placement new
+#include <cstddef> // size_t, NULL
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std{
+ using ::size_t;
+} // namespace std
+#endif
+
+#include <boost/static_assert.hpp>
+
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/mpl/greater_equal.hpp>
+#include <boost/mpl/equal_to.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+
+#ifndef BOOST_SERIALIZATION_DEFAULT_TYPE_INFO
+ #include <boost/serialization/extended_type_info_typeid.hpp>
+#endif
+#include <boost/serialization/throw_exception.hpp>
+#include <boost/serialization/smart_cast.hpp>
+#include <boost/serialization/static_warning.hpp>
+
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_enum.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_extent.hpp>
+#include <boost/type_traits/is_polymorphic.hpp>
+
+#include <boost/serialization/assume_abstract.hpp>
+
+#if !defined(BOOST_MSVC) && \
+ (BOOST_WORKAROUND(__IBMCPP__, < 1210) || \
+ defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x590))
+ #define DONT_USE_HAS_NEW_OPERATOR 1
+#else
+ #define DONT_USE_HAS_NEW_OPERATOR 0
+#endif
+
+#if ! DONT_USE_HAS_NEW_OPERATOR
+#include <boost/type_traits/has_new_operator.hpp>
+#endif
+
+#include <boost/serialization/serialization.hpp>
+#include <boost/serialization/version.hpp>
+#include <boost/serialization/level.hpp>
+#include <boost/serialization/tracking.hpp>
+#include <boost/serialization/type_info_implementation.hpp>
+#include <boost/serialization/nvp.hpp>
+#include <boost/serialization/void_cast.hpp>
+#include <boost/serialization/collection_size_type.hpp>
+#include <boost/serialization/singleton.hpp>
+#include <boost/serialization/wrapper.hpp>
+#include <boost/serialization/array_wrapper.hpp>
+
+// the following is need only for dynamic cast of polymorphic pointers
+#include <boost/archive/archive_exception.hpp>
+#include <boost/archive/detail/basic_iarchive.hpp>
+#include <boost/archive/detail/basic_iserializer.hpp>
+#include <boost/archive/detail/basic_pointer_iserializer.hpp>
+#include <boost/archive/detail/archive_serializer_map.hpp>
+#include <boost/archive/detail/check.hpp>
+
+#include <boost/core/addressof.hpp>
+
+namespace boost {
+
+namespace serialization {
+ class extended_type_info;
+} // namespace serialization
+
+namespace archive {
+
+// an accessor to permit friend access to archives. Needed because
+// some compilers don't handle friend templates completely
+class load_access {
+public:
+ template<class Archive, class T>
+ static void load_primitive(Archive &ar, T &t){
+ ar.load(t);
+ }
+};
+
+namespace detail {
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+template<class Archive, class T>
+class iserializer : public basic_iserializer
+{
+private:
+ virtual void destroy(/*const*/ void *address) const {
+ boost::serialization::access::destroy(static_cast<T *>(address));
+ }
+public:
+ explicit iserializer() :
+ basic_iserializer(
+ boost::serialization::singleton<
+ typename
+ boost::serialization::type_info_implementation< T >::type
+ >::get_const_instance()
+ )
+ {}
+ virtual BOOST_DLLEXPORT void load_object_data(
+ basic_iarchive & ar,
+ void *x,
+ const unsigned int file_version
+ ) const BOOST_USED;
+ virtual bool class_info() const {
+ return boost::serialization::implementation_level< T >::value
+ >= boost::serialization::object_class_info;
+ }
+ virtual bool tracking(const unsigned int /* flags */) const {
+ return boost::serialization::tracking_level< T >::value
+ == boost::serialization::track_always
+ || ( boost::serialization::tracking_level< T >::value
+ == boost::serialization::track_selectively
+ && serialized_as_pointer());
+ }
+ virtual version_type version() const {
+ return version_type(::boost::serialization::version< T >::value);
+ }
+ virtual bool is_polymorphic() const {
+ return boost::is_polymorphic< T >::value;
+ }
+ virtual ~iserializer(){};
+};
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+template<class Archive, class T>
+BOOST_DLLEXPORT void iserializer<Archive, T>::load_object_data(
+ basic_iarchive & ar,
+ void *x,
+ const unsigned int file_version
+) const {
+ // note: we now comment this out. Before we permited archive
+ // version # to be very large. Now we don't. To permit
+ // readers of these old archives, we have to suppress this
+ // code. Perhaps in the future we might re-enable it but
+ // permit its suppression with a runtime switch.
+ #if 0
+ // trap case where the program cannot handle the current version
+ if(file_version > static_cast<const unsigned int>(version()))
+ boost::serialization::throw_exception(
+ archive::archive_exception(
+ boost::archive::archive_exception::unsupported_class_version,
+ get_debug_info()
+ )
+ );
+ #endif
+ // make sure call is routed through the higest interface that might
+ // be specialized by the user.
+ boost::serialization::serialize_adl(
+ boost::serialization::smart_cast_reference<Archive &>(ar),
+ * static_cast<T *>(x),
+ file_version
+ );
+}
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+// the purpose of this code is to allocate memory for an object
+// without requiring the constructor to be called. Presumably
+// the allocated object will be subsequently initialized with
+// "placement new".
+// note: we have the boost type trait has_new_operator but we
+// have no corresponding has_delete_operator. So we presume
+// that the former being true would imply that the a delete
+// operator is also defined for the class T.
+
+template<class T>
+struct heap_allocation {
+ // boost::has_new_operator< T > doesn't work on these compilers
+ #if DONT_USE_HAS_NEW_OPERATOR
+ // This doesn't handle operator new overload for class T
+ static T * invoke_new(){
+ return static_cast<T *>(operator new(sizeof(T)));
+ }
+ static void invoke_delete(T *t){
+ (operator delete(t));
+ }
+ #else
+ // note: we presume that a true value for has_new_operator
+ // implies the existence of a class specific delete operator as well
+ // as a class specific new operator.
+ struct has_new_operator {
+ static T * invoke_new() {
+ return static_cast<T *>((T::operator new)(sizeof(T)));
+ }
+ static void invoke_delete(T * t) {
+ // if compilation fails here, the likely cause that the class
+ // T has a class specific new operator but no class specific
+ // delete operator which matches the following signature.
+ // note that this solution addresses the issue that two
+ // possible signatures. But it doesn't address the possibility
+ // that the class might have class specific new with NO
+ // class specific delete at all. Patches (compatible with
+ // C++03) welcome!
+ (operator delete)(t);
+ }
+ };
+ struct doesnt_have_new_operator {
+ static T* invoke_new() {
+ return static_cast<T *>(operator new(sizeof(T)));
+ }
+ static void invoke_delete(T * t) {
+ // Note: I'm reliance upon automatic conversion from T * to void * here
+ (operator delete)(t);
+ }
+ };
+ static T * invoke_new() {
+ typedef typename
+ mpl::eval_if<
+ boost::has_new_operator< T >,
+ mpl::identity<has_new_operator >,
+ mpl::identity<doesnt_have_new_operator >
+ >::type typex;
+ return typex::invoke_new();
+ }
+ static void invoke_delete(T *t) {
+ typedef typename
+ mpl::eval_if<
+ boost::has_new_operator< T >,
+ mpl::identity<has_new_operator >,
+ mpl::identity<doesnt_have_new_operator >
+ >::type typex;
+ typex::invoke_delete(t);
+ }
+ #endif
+ explicit heap_allocation(){
+ m_p = invoke_new();
+ }
+ ~heap_allocation(){
+ if (0 != m_p)
+ invoke_delete(m_p);
+ }
+ T* get() const {
+ return m_p;
+ }
+
+ T* release() {
+ T* p = m_p;
+ m_p = 0;
+ return p;
+ }
+private:
+ T* m_p;
+};
+
+template<class Archive, class T>
+class pointer_iserializer :
+ public basic_pointer_iserializer
+{
+private:
+ virtual void * heap_allocation() const {
+ detail::heap_allocation<T> h;
+ T * t = h.get();
+ h.release();
+ return t;
+ }
+ virtual const basic_iserializer & get_basic_serializer() const {
+ return boost::serialization::singleton<
+ iserializer<Archive, T>
+ >::get_const_instance();
+ }
+ BOOST_DLLEXPORT virtual void load_object_ptr(
+ basic_iarchive & ar,
+ void * x,
+ const unsigned int file_version
+ ) const BOOST_USED;
+public:
+ // this should alway be a singleton so make the constructor protected
+ pointer_iserializer();
+ ~pointer_iserializer();
+};
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+// note: BOOST_DLLEXPORT is so that code for polymorphic class
+// serialized only through base class won't get optimized out
+template<class Archive, class T>
+BOOST_DLLEXPORT void pointer_iserializer<Archive, T>::load_object_ptr(
+ basic_iarchive & ar,
+ void * t,
+ const unsigned int file_version
+) const
+{
+ Archive & ar_impl =
+ boost::serialization::smart_cast_reference<Archive &>(ar);
+
+ // note that the above will throw std::bad_alloc if the allocation
+ // fails so we don't have to address this contingency here.
+
+ // catch exception during load_construct_data so that we don't
+ // automatically delete the t which is most likely not fully
+ // constructed
+ BOOST_TRY {
+ // this addresses an obscure situation that occurs when
+ // load_constructor de-serializes something through a pointer.
+ ar.next_object_pointer(t);
+ boost::serialization::load_construct_data_adl<Archive, T>(
+ ar_impl,
+ static_cast<T *>(t),
+ file_version
+ );
+ }
+ BOOST_CATCH(...){
+ // if we get here the load_construct failed. The heap_allocation
+ // will be automatically deleted so we don't have to do anything
+ // special here.
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+
+ ar_impl >> boost::serialization::make_nvp(NULL, * static_cast<T *>(t));
+}
+
+template<class Archive, class T>
+pointer_iserializer<Archive, T>::pointer_iserializer() :
+ basic_pointer_iserializer(
+ boost::serialization::singleton<
+ typename
+ boost::serialization::type_info_implementation< T >::type
+ >::get_const_instance()
+ )
+{
+ boost::serialization::singleton<
+ iserializer<Archive, T>
+ >::get_mutable_instance().set_bpis(this);
+ archive_serializer_map<Archive>::insert(this);
+}
+
+template<class Archive, class T>
+pointer_iserializer<Archive, T>::~pointer_iserializer(){
+ archive_serializer_map<Archive>::erase(this);
+}
+
+template<class Archive>
+struct load_non_pointer_type {
+ // note this bounces the call right back to the archive
+ // with no runtime overhead
+ struct load_primitive {
+ template<class T>
+ static void invoke(Archive & ar, T & t){
+ load_access::load_primitive(ar, t);
+ }
+ };
+ // note this bounces the call right back to the archive
+ // with no runtime overhead
+ struct load_only {
+ template<class T>
+ static void invoke(Archive & ar, const T & t){
+ // short cut to user's serializer
+ // make sure call is routed through the higest interface that might
+ // be specialized by the user.
+ boost::serialization::serialize_adl(
+ ar,
+ const_cast<T &>(t),
+ boost::serialization::version< T >::value
+ );
+ }
+ };
+
+ // note this save class information including version
+ // and serialization level to the archive
+ struct load_standard {
+ template<class T>
+ static void invoke(Archive &ar, const T & t){
+ void * x = boost::addressof(const_cast<T &>(t));
+ ar.load_object(
+ x,
+ boost::serialization::singleton<
+ iserializer<Archive, T>
+ >::get_const_instance()
+ );
+ }
+ };
+
+ struct load_conditional {
+ template<class T>
+ static void invoke(Archive &ar, T &t){
+ //if(0 == (ar.get_flags() & no_tracking))
+ load_standard::invoke(ar, t);
+ //else
+ // load_only::invoke(ar, t);
+ }
+ };
+
+ template<class T>
+ static void invoke(Archive & ar, T &t){
+ typedef typename mpl::eval_if<
+ // if its primitive
+ mpl::equal_to<
+ boost::serialization::implementation_level< T >,
+ mpl::int_<boost::serialization::primitive_type>
+ >,
+ mpl::identity<load_primitive>,
+ // else
+ typename mpl::eval_if<
+ // class info / version
+ mpl::greater_equal<
+ boost::serialization::implementation_level< T >,
+ mpl::int_<boost::serialization::object_class_info>
+ >,
+ // do standard load
+ mpl::identity<load_standard>,
+ // else
+ typename mpl::eval_if<
+ // no tracking
+ mpl::equal_to<
+ boost::serialization::tracking_level< T >,
+ mpl::int_<boost::serialization::track_never>
+ >,
+ // do a fast load
+ mpl::identity<load_only>,
+ // else
+ // do a fast load only tracking is turned off
+ mpl::identity<load_conditional>
+ > > >::type typex;
+ check_object_versioning< T >();
+ check_object_level< T >();
+ typex::invoke(ar, t);
+ }
+};
+
+template<class Archive>
+struct load_pointer_type {
+ struct abstract
+ {
+ template<class T>
+ static const basic_pointer_iserializer * register_type(Archive & /* ar */){
+ // it has? to be polymorphic
+ BOOST_STATIC_ASSERT(boost::is_polymorphic< T >::value);
+ return static_cast<basic_pointer_iserializer *>(NULL);
+ }
+ };
+
+ struct non_abstract
+ {
+ template<class T>
+ static const basic_pointer_iserializer * register_type(Archive & ar){
+ return ar.register_type(static_cast<T *>(NULL));
+ }
+ };
+
+ template<class T>
+ static const basic_pointer_iserializer * register_type(Archive &ar, const T* const /*t*/){
+ // there should never be any need to load an abstract polymorphic
+ // class pointer. Inhibiting code generation for this
+ // permits abstract base classes to be used - note: exception
+ // virtual serialize functions used for plug-ins
+ typedef typename
+ mpl::eval_if<
+ boost::serialization::is_abstract<const T>,
+ boost::mpl::identity<abstract>,
+ boost::mpl::identity<non_abstract>
+ >::type typex;
+ return typex::template register_type< T >(ar);
+ }
+
+ template<class T>
+ static T * pointer_tweak(
+ const boost::serialization::extended_type_info & eti,
+ void const * const t,
+ const T &
+ ) {
+ // tweak the pointer back to the base class
+ void * upcast = const_cast<void *>(
+ boost::serialization::void_upcast(
+ eti,
+ boost::serialization::singleton<
+ typename
+ boost::serialization::type_info_implementation< T >::type
+ >::get_const_instance(),
+ t
+ )
+ );
+ if(NULL == upcast)
+ boost::serialization::throw_exception(
+ archive_exception(archive_exception::unregistered_class)
+ );
+ return static_cast<T *>(upcast);
+ }
+
+ template<class T>
+ static void check_load(T * const /* t */){
+ check_pointer_level< T >();
+ check_pointer_tracking< T >();
+ }
+
+ static const basic_pointer_iserializer *
+ find(const boost::serialization::extended_type_info & type){
+ return static_cast<const basic_pointer_iserializer *>(
+ archive_serializer_map<Archive>::find(type)
+ );
+ }
+
+ template<class Tptr>
+ static void invoke(Archive & ar, Tptr & t){
+ check_load(t);
+ const basic_pointer_iserializer * bpis_ptr = register_type(ar, t);
+ const basic_pointer_iserializer * newbpis_ptr = ar.load_pointer(
+ // note major hack here !!!
+ // I tried every way to convert Tptr &t (where Tptr might
+ // include const) to void * &. This is the only way
+ // I could make it work. RR
+ (void * & )t,
+ bpis_ptr,
+ find
+ );
+ // if the pointer isn't that of the base class
+ if(newbpis_ptr != bpis_ptr){
+ t = pointer_tweak(newbpis_ptr->get_eti(), t, *t);
+ }
+ }
+};
+
+template<class Archive>
+struct load_enum_type {
+ template<class T>
+ static void invoke(Archive &ar, T &t){
+ // convert integers to correct enum to load
+ int i;
+ ar >> boost::serialization::make_nvp(NULL, i);
+ t = static_cast< T >(i);
+ }
+};
+
+template<class Archive>
+struct load_array_type {
+ template<class T>
+ static void invoke(Archive &ar, T &t){
+ typedef typename remove_extent< T >::type value_type;
+
+ // convert integers to correct enum to load
+ // determine number of elements in the array. Consider the
+ // fact that some machines will align elements on boundries
+ // other than characters.
+ std::size_t current_count = sizeof(t) / (
+ static_cast<char *>(static_cast<void *>(&t[1]))
+ - static_cast<char *>(static_cast<void *>(&t[0]))
+ );
+ boost::serialization::collection_size_type count;
+ ar >> BOOST_SERIALIZATION_NVP(count);
+ if(static_cast<std::size_t>(count) > current_count)
+ boost::serialization::throw_exception(
+ archive::archive_exception(
+ boost::archive::archive_exception::array_size_too_short
+ )
+ );
+ // explict template arguments to pass intel C++ compiler
+ ar >> serialization::make_array<
+ value_type,
+ boost::serialization::collection_size_type
+ >(
+ static_cast<value_type *>(&t[0]),
+ count
+ );
+ }
+};
+
+} // detail
+
+template<class Archive, class T>
+inline void load(Archive & ar, T &t){
+ // if this assertion trips. It means we're trying to load a
+ // const object with a compiler that doesn't have correct
+ // function template ordering. On other compilers, this is
+ // handled below.
+ detail::check_const_loading< T >();
+ typedef
+ typename mpl::eval_if<is_pointer< T >,
+ mpl::identity<detail::load_pointer_type<Archive> >
+ ,//else
+ typename mpl::eval_if<is_array< T >,
+ mpl::identity<detail::load_array_type<Archive> >
+ ,//else
+ typename mpl::eval_if<is_enum< T >,
+ mpl::identity<detail::load_enum_type<Archive> >
+ ,//else
+ mpl::identity<detail::load_non_pointer_type<Archive> >
+ >
+ >
+ >::type typex;
+ typex::invoke(ar, t);
+}
+
+} // namespace archive
+} // namespace boost
+
+#endif // BOOST_ARCHIVE_DETAIL_ISERIALIZER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/oserializer.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/oserializer.hpp
index 612e1f2cb16..612e1f2cb16 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/oserializer.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/oserializer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_iarchive_route.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_iarchive_route.hpp
new file mode 100644
index 00000000000..105685ebbd8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_iarchive_route.hpp
@@ -0,0 +1,218 @@
+#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP
+#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_ROUTE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_iarchive_route.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <string>
+#include <ostream>
+#include <cstddef>
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std{
+ using ::size_t;
+} // namespace std
+#endif
+
+#include <boost/cstdint.hpp>
+#include <boost/integer_traits.hpp>
+#include <boost/archive/polymorphic_iarchive.hpp>
+#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
+
+namespace boost {
+namespace serialization {
+ class extended_type_info;
+} // namespace serialization
+namespace archive {
+namespace detail{
+
+class basic_iserializer;
+class basic_pointer_iserializer;
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+template<class ArchiveImplementation>
+class polymorphic_iarchive_route :
+ public polymorphic_iarchive,
+ // note: gcc dynamic cross cast fails if the the derivation below is
+ // not public. I think this is a mistake.
+ public /*protected*/ ArchiveImplementation
+{
+private:
+ // these are used by the serialization library.
+ virtual void load_object(
+ void *t,
+ const basic_iserializer & bis
+ ){
+ ArchiveImplementation::load_object(t, bis);
+ }
+ virtual const basic_pointer_iserializer * load_pointer(
+ void * & t,
+ const basic_pointer_iserializer * bpis_ptr,
+ const basic_pointer_iserializer * (*finder)(
+ const boost::serialization::extended_type_info & type
+ )
+ ){
+ return ArchiveImplementation::load_pointer(t, bpis_ptr, finder);
+ }
+ virtual void set_library_version(library_version_type archive_library_version){
+ ArchiveImplementation::set_library_version(archive_library_version);
+ }
+ virtual library_version_type get_library_version() const{
+ return ArchiveImplementation::get_library_version();
+ }
+ virtual unsigned int get_flags() const {
+ return ArchiveImplementation::get_flags();
+ }
+ virtual void delete_created_pointers(){
+ ArchiveImplementation::delete_created_pointers();
+ }
+ virtual void reset_object_address(
+ const void * new_address,
+ const void * old_address
+ ){
+ ArchiveImplementation::reset_object_address(new_address, old_address);
+ }
+ virtual void load_binary(void * t, std::size_t size){
+ ArchiveImplementation::load_binary(t, size);
+ }
+ // primitive types the only ones permitted by polymorphic archives
+ virtual void load(bool & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(char & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(signed char & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(unsigned char & t){
+ ArchiveImplementation::load(t);
+ }
+ #ifndef BOOST_NO_CWCHAR
+ #ifndef BOOST_NO_INTRINSIC_WCHAR_T
+ virtual void load(wchar_t & t){
+ ArchiveImplementation::load(t);
+ }
+ #endif
+ #endif
+ virtual void load(short & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(unsigned short & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(int & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(unsigned int & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(long & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(unsigned long & t){
+ ArchiveImplementation::load(t);
+ }
+ #if defined(BOOST_HAS_LONG_LONG)
+ virtual void load(boost::long_long_type & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(boost::ulong_long_type & t){
+ ArchiveImplementation::load(t);
+ }
+ #elif defined(BOOST_HAS_MS_INT64)
+ virtual void load(__int64 & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(unsigned __int64 & t){
+ ArchiveImplementation::load(t);
+ }
+ #endif
+ virtual void load(float & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(double & t){
+ ArchiveImplementation::load(t);
+ }
+ virtual void load(std::string & t){
+ ArchiveImplementation::load(t);
+ }
+ #ifndef BOOST_NO_STD_WSTRING
+ virtual void load(std::wstring & t){
+ ArchiveImplementation::load(t);
+ }
+ #endif
+ // used for xml and other tagged formats default does nothing
+ virtual void load_start(const char * name){
+ ArchiveImplementation::load_start(name);
+ }
+ virtual void load_end(const char * name){
+ ArchiveImplementation::load_end(name);
+ }
+ virtual void register_basic_serializer(const basic_iserializer & bis){
+ ArchiveImplementation::register_basic_serializer(bis);
+ }
+ virtual helper_collection &
+ get_helper_collection(){
+ return ArchiveImplementation::get_helper_collection();
+ }
+public:
+ // this can't be inheriteded because they appear in mulitple
+ // parents
+ typedef mpl::bool_<true> is_loading;
+ typedef mpl::bool_<false> is_saving;
+ // the >> operator
+ template<class T>
+ polymorphic_iarchive & operator>>(T & t){
+ return polymorphic_iarchive::operator>>(t);
+ }
+ // the & operator
+ template<class T>
+ polymorphic_iarchive & operator&(T & t){
+ return polymorphic_iarchive::operator&(t);
+ }
+ // register type function
+ template<class T>
+ const basic_pointer_iserializer *
+ register_type(T * t = NULL){
+ return ArchiveImplementation::register_type(t);
+ }
+ // all current archives take a stream as constructor argument
+ template <class _Elem, class _Tr>
+ polymorphic_iarchive_route(
+ std::basic_istream<_Elem, _Tr> & is,
+ unsigned int flags = 0
+ ) :
+ ArchiveImplementation(is, flags)
+ {}
+ virtual ~polymorphic_iarchive_route(){};
+};
+
+} // namespace detail
+} // namespace archive
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+
+#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_IARCHIVE_DISPATCH_HPP
diff --git a/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_oarchive_route.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_oarchive_route.hpp
new file mode 100644
index 00000000000..b23fd6bf39d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/polymorphic_oarchive_route.hpp
@@ -0,0 +1,209 @@
+#ifndef BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP
+#define BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_ROUTE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_oarchive_route.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <string>
+#include <ostream>
+#include <cstddef> // size_t
+
+#include <boost/config.hpp>
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std{
+ using ::size_t;
+} // namespace std
+#endif
+
+#include <boost/cstdint.hpp>
+#include <boost/integer_traits.hpp>
+#include <boost/archive/polymorphic_oarchive.hpp>
+#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
+
+namespace boost {
+namespace serialization {
+ class extended_type_info;
+} // namespace serialization
+namespace archive {
+namespace detail{
+
+class basic_oserializer;
+class basic_pointer_oserializer;
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+template<class ArchiveImplementation>
+class polymorphic_oarchive_route :
+ public polymorphic_oarchive,
+ // note: gcc dynamic cross cast fails if the the derivation below is
+ // not public. I think this is a mistake.
+ public /*protected*/ ArchiveImplementation
+{
+private:
+ // these are used by the serialization library.
+ virtual void save_object(
+ const void *x,
+ const detail::basic_oserializer & bos
+ ){
+ ArchiveImplementation::save_object(x, bos);
+ }
+ virtual void save_pointer(
+ const void * t,
+ const detail::basic_pointer_oserializer * bpos_ptr
+ ){
+ ArchiveImplementation::save_pointer(t, bpos_ptr);
+ }
+ virtual void save_null_pointer(){
+ ArchiveImplementation::save_null_pointer();
+ }
+ // primitive types the only ones permitted by polymorphic archives
+ virtual void save(const bool t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const char t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const signed char t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const unsigned char t){
+ ArchiveImplementation::save(t);
+ }
+ #ifndef BOOST_NO_CWCHAR
+ #ifndef BOOST_NO_INTRINSIC_WCHAR_T
+ virtual void save(const wchar_t t){
+ ArchiveImplementation::save(t);
+ }
+ #endif
+ #endif
+ virtual void save(const short t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const unsigned short t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const int t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const unsigned int t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const long t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const unsigned long t){
+ ArchiveImplementation::save(t);
+ }
+ #if defined(BOOST_HAS_LONG_LONG)
+ virtual void save(const boost::long_long_type t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const boost::ulong_long_type t){
+ ArchiveImplementation::save(t);
+ }
+ #elif defined(BOOST_HAS_MS_INT64)
+ virtual void save(const boost::int64_t t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const boost::uint64_t t){
+ ArchiveImplementation::save(t);
+ }
+ #endif
+ virtual void save(const float t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const double t){
+ ArchiveImplementation::save(t);
+ }
+ virtual void save(const std::string & t){
+ ArchiveImplementation::save(t);
+ }
+ #ifndef BOOST_NO_STD_WSTRING
+ virtual void save(const std::wstring & t){
+ ArchiveImplementation::save(t);
+ }
+ #endif
+ virtual library_version_type get_library_version() const{
+ return ArchiveImplementation::get_library_version();
+ }
+ virtual unsigned int get_flags() const {
+ return ArchiveImplementation::get_flags();
+ }
+ virtual void save_binary(const void * t, std::size_t size){
+ ArchiveImplementation::save_binary(t, size);
+ }
+ // used for xml and other tagged formats default does nothing
+ virtual void save_start(const char * name){
+ ArchiveImplementation::save_start(name);
+ }
+ virtual void save_end(const char * name){
+ ArchiveImplementation::save_end(name);
+ }
+ virtual void end_preamble(){
+ ArchiveImplementation::end_preamble();
+ }
+ virtual void register_basic_serializer(const detail::basic_oserializer & bos){
+ ArchiveImplementation::register_basic_serializer(bos);
+ }
+ virtual helper_collection &
+ get_helper_collection(){
+ return ArchiveImplementation::get_helper_collection();
+ }
+public:
+ // this can't be inheriteded because they appear in mulitple
+ // parents
+ typedef mpl::bool_<false> is_loading;
+ typedef mpl::bool_<true> is_saving;
+ // the << operator
+ template<class T>
+ polymorphic_oarchive & operator<<(T & t){
+ return polymorphic_oarchive::operator<<(t);
+ }
+ // the & operator
+ template<class T>
+ polymorphic_oarchive & operator&(T & t){
+ return polymorphic_oarchive::operator&(t);
+ }
+ // register type function
+ template<class T>
+ const basic_pointer_oserializer *
+ register_type(T * t = NULL){
+ return ArchiveImplementation::register_type(t);
+ }
+ // all current archives take a stream as constructor argument
+ template <class _Elem, class _Tr>
+ polymorphic_oarchive_route(
+ std::basic_ostream<_Elem, _Tr> & os,
+ unsigned int flags = 0
+ ) :
+ ArchiveImplementation(os, flags)
+ {}
+ virtual ~polymorphic_oarchive_route(){};
+};
+
+} // namespace detail
+} // namespace archive
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+
+#endif // BOOST_ARCHIVE_DETAIL_POLYMORPHIC_OARCHIVE_DISPATCH_HPP
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/register_archive.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/register_archive.hpp
index 5ffecc702ce..5ffecc702ce 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/register_archive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/register_archive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/detail/utf8_codecvt_facet.hpp b/src/third_party/boost-1.69.0/boost/archive/detail/utf8_codecvt_facet.hpp
index 00b2b4193d3..00b2b4193d3 100644
--- a/src/third_party/boost-1.68.0/boost/archive/detail/utf8_codecvt_facet.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/detail/utf8_codecvt_facet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/dinkumware.hpp b/src/third_party/boost-1.69.0/boost/archive/dinkumware.hpp
index 90ba6271cdd..90ba6271cdd 100644
--- a/src/third_party/boost-1.68.0/boost/archive/dinkumware.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/dinkumware.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/archive_serializer_map.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/archive_serializer_map.ipp
new file mode 100644
index 00000000000..98e058ddeca
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/archive_serializer_map.ipp
@@ -0,0 +1,75 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// archive_serializer_map.ipp:
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+//////////////////////////////////////////////////////////////////////
+// implementation of basic_text_iprimitive overrides for the combination
+// of template parameters used to implement a text_iprimitive
+
+#include <boost/config.hpp>
+#include <boost/archive/detail/archive_serializer_map.hpp>
+#include <boost/archive/detail/basic_serializer_map.hpp>
+#include <boost/serialization/singleton.hpp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+namespace extra_detail { // anon
+ template<class Archive>
+ class map : public basic_serializer_map
+ {};
+}
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+template<class Archive>
+BOOST_ARCHIVE_OR_WARCHIVE_DECL bool
+archive_serializer_map<Archive>::insert(const basic_serializer * bs){
+ return boost::serialization::singleton<
+ extra_detail::map<Archive>
+ >::get_mutable_instance().insert(bs);
+}
+
+template<class Archive>
+BOOST_ARCHIVE_OR_WARCHIVE_DECL void
+archive_serializer_map<Archive>::erase(const basic_serializer * bs){
+ // note: previously this conditional was a runtime assertion with
+ // BOOST_ASSERT. We've changed it because we've discovered that at
+ // least one platform is not guaranteed to destroy singletons in
+ // reverse order of distruction.
+ if(boost::serialization::singleton<
+ extra_detail::map<Archive>
+ >::is_destroyed())
+ return;
+ boost::serialization::singleton<
+ extra_detail::map<Archive>
+ >::get_mutable_instance().erase(bs);
+}
+
+template<class Archive>
+BOOST_ARCHIVE_OR_WARCHIVE_DECL const basic_serializer *
+archive_serializer_map<Archive>::find(
+ const boost::serialization::extended_type_info & eti
+) {
+ return boost::serialization::singleton<
+ extra_detail::map<Archive>
+ >::get_const_instance().find(eti);
+}
+
+} // namespace detail
+} // namespace archive
+} // namespace boost
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_iarchive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iarchive.ipp
index d5619ab6cf3..d5619ab6cf3 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_iarchive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iarchive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_iprimitive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iprimitive.ipp
index e2d051080e7..e2d051080e7 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_iprimitive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_iprimitive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_oarchive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oarchive.ipp
index d5a019d32bc..d5a019d32bc 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_oarchive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oarchive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_oprimitive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oprimitive.ipp
index 7b042173a48..7b042173a48 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_binary_oprimitive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_binary_oprimitive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_text_iarchive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iarchive.ipp
index 9ec8c6588c8..9ec8c6588c8 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_text_iarchive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iarchive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_text_iprimitive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iprimitive.ipp
index 4e44728068d..4e44728068d 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_text_iprimitive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_iprimitive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_text_oarchive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oarchive.ipp
index 44bc1401fd6..44bc1401fd6 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_text_oarchive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oarchive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_text_oprimitive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oprimitive.ipp
index 6030fd44c57..6030fd44c57 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_text_oprimitive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_text_oprimitive.ipp
diff --git a/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_grammar.hpp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_grammar.hpp
new file mode 100644
index 00000000000..cc88d4fd829
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_grammar.hpp
@@ -0,0 +1,173 @@
+#ifndef BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
+#define BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// basic_xml_grammar.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+// this module is derived from simplexml.cpp - an example shipped as part of
+// the spirit parser. This example contains the following notice:
+/*=============================================================================
+ simplexml.cpp
+
+ Spirit V1.3
+ URL: http://spirit.sourceforge.net/
+
+ Copyright (c) 2001, Daniel C. Nuffer
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the copyright holder be held liable for
+ any damages arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute
+ it freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must
+ not claim that you wrote the original software. If you use this
+ software in a product, an acknowledgment in the product documentation
+ would be appreciated but is not required.
+
+ 2. Altered source versions must be plainly marked as such, and must
+ not be misrepresented as being the original software.
+
+ 3. This notice may not be removed or altered from any source
+ distribution.
+=============================================================================*/
+#include <string>
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#include <boost/spirit/include/classic_rule.hpp>
+#include <boost/spirit/include/classic_chset.hpp>
+
+#include <boost/archive/basic_archive.hpp>
+#include <boost/serialization/tracking.hpp>
+#include <boost/serialization/version.hpp>
+
+namespace boost {
+namespace archive {
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// XML grammar parsing
+
+template<class CharType>
+class BOOST_SYMBOL_VISIBLE basic_xml_grammar {
+public:
+ // The following is not necessary according to DR45, but at least
+ // one compiler (Compaq C++ 6.5 in strict_ansi mode) chokes otherwise.
+ struct return_values;
+ friend struct return_values;
+
+private:
+ typedef typename std::basic_istream<CharType> IStream;
+ typedef typename std::basic_string<CharType> StringType;
+ typedef typename boost::spirit::classic::chset<CharType> chset_t;
+ typedef typename boost::spirit::classic::chlit<CharType> chlit_t;
+ typedef typename boost::spirit::classic::scanner<
+ typename std::basic_string<CharType>::iterator
+ > scanner_t;
+ typedef typename boost::spirit::classic::rule<scanner_t> rule_t;
+ // Start grammar definition
+ rule_t
+ Reference,
+ Eq,
+ STag,
+ ETag,
+ LetterOrUnderscoreOrColon,
+ AttValue,
+ CharRef1,
+ CharRef2,
+ CharRef,
+ AmpRef,
+ LTRef,
+ GTRef,
+ AposRef,
+ QuoteRef,
+ CharData,
+ CharDataChars,
+ content,
+ AmpName,
+ LTName,
+ GTName,
+ ClassNameChar,
+ ClassName,
+ Name,
+ XMLDecl,
+ XMLDeclChars,
+ DocTypeDecl,
+ DocTypeDeclChars,
+ ClassIDAttribute,
+ ObjectIDAttribute,
+ ClassNameAttribute,
+ TrackingAttribute,
+ VersionAttribute,
+ UnusedAttribute,
+ Attribute,
+ SignatureAttribute,
+ SerializationWrapper,
+ NameHead,
+ NameTail,
+ AttributeList,
+ S;
+
+ // XML Character classes
+ chset_t
+ BaseChar,
+ Ideographic,
+ Char,
+ Letter,
+ Digit,
+ CombiningChar,
+ Extender,
+ Sch,
+ NameChar;
+
+ void init_chset();
+
+ bool my_parse(
+ IStream & is,
+ const rule_t &rule_,
+ const CharType delimiter = L'>'
+ ) const ;
+public:
+ struct return_values {
+ StringType object_name;
+ StringType contents;
+ //class_id_type class_id;
+ int_least16_t class_id;
+ //object_id_type object_id;
+ uint_least32_t object_id;
+ //version_type version;
+ unsigned int version;
+ tracking_type tracking_level;
+ StringType class_name;
+ return_values() :
+ version(0),
+ tracking_level(false)
+ {}
+ } rv;
+ bool parse_start_tag(IStream & is) /*const*/;
+ bool parse_end_tag(IStream & is) const;
+ bool parse_string(IStream & is, StringType & s) /*const*/;
+ void init(IStream & is);
+ bool windup(IStream & is);
+ basic_xml_grammar();
+};
+
+} // namespace archive
+} // namespace boost
+
+#endif // BOOST_ARCHIVE_BASIC_XML_GRAMMAR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_iarchive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_iarchive.ipp
index 625458b9eb5..625458b9eb5 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_iarchive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_iarchive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_oarchive.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_oarchive.ipp
index 3184413f382..3184413f382 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/basic_xml_oarchive.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/basic_xml_oarchive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/text_iarchive_impl.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/text_iarchive_impl.ipp
index ae4e2750ce8..ae4e2750ce8 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/text_iarchive_impl.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/text_iarchive_impl.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/text_oarchive_impl.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/text_oarchive_impl.ipp
index 37d8664a98c..37d8664a98c 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/text_oarchive_impl.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/text_oarchive_impl.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/text_wiarchive_impl.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/text_wiarchive_impl.ipp
index e85625ac326..e85625ac326 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/text_wiarchive_impl.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/text_wiarchive_impl.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/text_woarchive_impl.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/text_woarchive_impl.ipp
index 2b6d427cd3a..2b6d427cd3a 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/text_woarchive_impl.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/text_woarchive_impl.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/xml_iarchive_impl.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/xml_iarchive_impl.ipp
index efc32e01632..efc32e01632 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/xml_iarchive_impl.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/xml_iarchive_impl.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/xml_oarchive_impl.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/xml_oarchive_impl.ipp
index 5ebd454e722..5ebd454e722 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/xml_oarchive_impl.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/xml_oarchive_impl.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/xml_wiarchive_impl.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/xml_wiarchive_impl.ipp
index f572b76220e..f572b76220e 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/xml_wiarchive_impl.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/xml_wiarchive_impl.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/impl/xml_woarchive_impl.ipp b/src/third_party/boost-1.69.0/boost/archive/impl/xml_woarchive_impl.ipp
index 630898b86a0..630898b86a0 100644
--- a/src/third_party/boost-1.68.0/boost/archive/impl/xml_woarchive_impl.ipp
+++ b/src/third_party/boost-1.69.0/boost/archive/impl/xml_woarchive_impl.ipp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/base64_from_binary.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/base64_from_binary.hpp
index ee849944397..ee849944397 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/base64_from_binary.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/base64_from_binary.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/binary_from_base64.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/binary_from_base64.hpp
index 89b8f889da3..89b8f889da3 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/binary_from_base64.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/binary_from_base64.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/dataflow_exception.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/dataflow_exception.hpp
index e3e18605b38..e3e18605b38 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/dataflow_exception.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/dataflow_exception.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/escape.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/escape.hpp
index 103b31e0fef..103b31e0fef 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/escape.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/escape.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/insert_linebreaks.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/insert_linebreaks.hpp
index 2504b030db1..2504b030db1 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/insert_linebreaks.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/insert_linebreaks.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/istream_iterator.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/istream_iterator.hpp
index a187f605e69..a187f605e69 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/istream_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/istream_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/mb_from_wchar.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/mb_from_wchar.hpp
index eb30480cc03..eb30480cc03 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/mb_from_wchar.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/mb_from_wchar.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/ostream_iterator.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/ostream_iterator.hpp
index 49a9b99034b..49a9b99034b 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/ostream_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/ostream_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/remove_whitespace.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/remove_whitespace.hpp
index c3580ab258a..c3580ab258a 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/remove_whitespace.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/remove_whitespace.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/transform_width.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/transform_width.hpp
index 09c050a9274..09c050a9274 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/transform_width.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/transform_width.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/unescape.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/unescape.hpp
index abf62406088..abf62406088 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/unescape.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/unescape.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/wchar_from_mb.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/wchar_from_mb.hpp
index 2af8f6401f2..2af8f6401f2 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/wchar_from_mb.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/wchar_from_mb.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/xml_escape.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/xml_escape.hpp
index c838a73b864..c838a73b864 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/xml_escape.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/xml_escape.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/iterators/xml_unescape.hpp b/src/third_party/boost-1.69.0/boost/archive/iterators/xml_unescape.hpp
index 9d3c3af9966..9d3c3af9966 100644
--- a/src/third_party/boost-1.68.0/boost/archive/iterators/xml_unescape.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/iterators/xml_unescape.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_iarchive.hpp
new file mode 100644
index 00000000000..20559bd8fbb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_iarchive.hpp
@@ -0,0 +1,54 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_binary_iarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#include <boost/archive/binary_iarchive.hpp>
+#include <boost/archive/detail/polymorphic_iarchive_route.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_binary_iarchive :
+ public detail::polymorphic_iarchive_route<binary_iarchive>
+{
+public:
+ polymorphic_binary_iarchive(std::istream & is, unsigned int flags = 0) :
+ detail::polymorphic_iarchive_route<binary_iarchive>(is, flags)
+ {}
+ ~polymorphic_binary_iarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_binary_iarchive
+)
+
+#endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_IARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_oarchive.hpp
new file mode 100644
index 00000000000..96febd7a58a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_binary_oarchive.hpp
@@ -0,0 +1,45 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_binary_oarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#include <boost/archive/binary_oarchive.hpp>
+#include <boost/archive/detail/polymorphic_oarchive_route.hpp>
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_binary_oarchive :
+ public detail::polymorphic_oarchive_route<binary_oarchive>
+{
+public:
+ polymorphic_binary_oarchive(std::ostream & os, unsigned int flags = 0) :
+ detail::polymorphic_oarchive_route<binary_oarchive>(os, flags)
+ {}
+ ~polymorphic_binary_oarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_binary_oarchive
+)
+
+#endif // BOOST_ARCHIVE_POLYMORPHIC_BINARY_OARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/archive/polymorphic_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_iarchive.hpp
index d3c59a9f0f4..d3c59a9f0f4 100644
--- a/src/third_party/boost-1.68.0/boost/archive/polymorphic_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/polymorphic_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_oarchive.hpp
index edac4edb1e8..edac4edb1e8 100644
--- a/src/third_party/boost-1.68.0/boost/archive/polymorphic_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_oarchive.hpp
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_iarchive.hpp
new file mode 100644
index 00000000000..3e59bfe6bdd
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_iarchive.hpp
@@ -0,0 +1,54 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_text_iarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#include <boost/archive/text_iarchive.hpp>
+#include <boost/archive/detail/polymorphic_iarchive_route.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_text_iarchive :
+ public detail::polymorphic_iarchive_route<text_iarchive>
+{
+public:
+ polymorphic_text_iarchive(std::istream & is, unsigned int flags = 0) :
+ detail::polymorphic_iarchive_route<text_iarchive>(is, flags)
+ {}
+ ~polymorphic_text_iarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_text_iarchive
+)
+
+#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_IARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_oarchive.hpp
new file mode 100644
index 00000000000..233d37c7b54
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_oarchive.hpp
@@ -0,0 +1,45 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_text_oarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#include <boost/archive/text_oarchive.hpp>
+#include <boost/archive/detail/polymorphic_oarchive_route.hpp>
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_text_oarchive :
+ public detail::polymorphic_oarchive_route<text_oarchive>
+{
+public:
+ polymorphic_text_oarchive(std::ostream & os, unsigned int flags = 0) :
+ detail::polymorphic_oarchive_route<text_oarchive>(os, flags)
+ {}
+ ~polymorphic_text_oarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_text_oarchive
+)
+
+#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_OARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_wiarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_wiarchive.hpp
new file mode 100644
index 00000000000..96afe0eba61
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_wiarchive.hpp
@@ -0,0 +1,59 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_text_wiarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_STD_WSTREAMBUF
+#error "wide char i/o not supported on this platform"
+#else
+
+#include <boost/archive/text_wiarchive.hpp>
+#include <boost/archive/detail/polymorphic_iarchive_route.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_text_wiarchive :
+ public detail::polymorphic_iarchive_route<text_wiarchive>
+{
+public:
+ polymorphic_text_wiarchive(std::wistream & is, unsigned int flags = 0) :
+ detail::polymorphic_iarchive_route<text_wiarchive>(is, flags)
+ {}
+ ~polymorphic_text_wiarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_text_wiarchive
+)
+
+#endif // BOOST_NO_STD_WSTREAMBUF
+#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WIARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_woarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_woarchive.hpp
new file mode 100644
index 00000000000..fa0a3aec3c8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_text_woarchive.hpp
@@ -0,0 +1,50 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_text_oarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_STD_WSTREAMBUF
+#error "wide char i/o not supported on this platform"
+#else
+
+#include <boost/archive/text_woarchive.hpp>
+#include <boost/archive/detail/polymorphic_oarchive_route.hpp>
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_text_woarchive :
+ public detail::polymorphic_oarchive_route<text_woarchive>
+{
+public:
+ polymorphic_text_woarchive(std::wostream & os, unsigned int flags = 0) :
+ detail::polymorphic_oarchive_route<text_woarchive>(os, flags)
+ {}
+ ~polymorphic_text_woarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_text_woarchive
+)
+
+#endif // BOOST_NO_STD_WSTREAMBUF
+#endif // BOOST_ARCHIVE_POLYMORPHIC_TEXT_WOARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_iarchive.hpp
new file mode 100644
index 00000000000..0b17b5516e9
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_iarchive.hpp
@@ -0,0 +1,54 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_xml_iarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#include <boost/archive/xml_iarchive.hpp>
+#include <boost/archive/detail/polymorphic_iarchive_route.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_xml_iarchive :
+ public detail::polymorphic_iarchive_route<xml_iarchive>
+{
+public:
+ polymorphic_xml_iarchive(std::istream & is, unsigned int flags = 0) :
+ detail::polymorphic_iarchive_route<xml_iarchive>(is, flags)
+ {}
+ ~polymorphic_xml_iarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_xml_iarchive
+)
+
+#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_IARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_oarchive.hpp
new file mode 100644
index 00000000000..a9fc82427e8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_oarchive.hpp
@@ -0,0 +1,44 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_xml_oarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#include <boost/archive/xml_oarchive.hpp>
+#include <boost/archive/detail/polymorphic_oarchive_route.hpp>
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_xml_oarchive :
+ public detail::polymorphic_oarchive_route<xml_oarchive>
+{
+public:
+ polymorphic_xml_oarchive(std::ostream & os, unsigned int flags = 0) :
+ detail::polymorphic_oarchive_route<xml_oarchive>(os, flags)
+ {}
+ ~polymorphic_xml_oarchive(){}
+};
+} // namespace archive
+} // namespace boost
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_xml_oarchive
+)
+
+#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_OARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_wiarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_wiarchive.hpp
new file mode 100644
index 00000000000..688ff4d0c0c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_wiarchive.hpp
@@ -0,0 +1,50 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_xml_wiarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_STD_WSTREAMBUF
+#error "wide char i/o not supported on this platform"
+#else
+
+#include <boost/archive/xml_wiarchive.hpp>
+#include <boost/archive/detail/polymorphic_iarchive_route.hpp>
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_xml_wiarchive :
+ public detail::polymorphic_iarchive_route<xml_wiarchive>
+{
+public:
+ polymorphic_xml_wiarchive(std::wistream & is, unsigned int flags = 0) :
+ detail::polymorphic_iarchive_route<xml_wiarchive>(is, flags)
+ {}
+ ~polymorphic_xml_wiarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_xml_wiarchive
+)
+
+#endif // BOOST_NO_STD_WSTREAMBUF
+#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WIARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_woarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_woarchive.hpp
new file mode 100644
index 00000000000..2606010d81c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/archive/polymorphic_xml_woarchive.hpp
@@ -0,0 +1,50 @@
+#ifndef BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP
+#define BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_xml_woarchive.hpp
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <boost/config.hpp>
+#ifdef BOOST_NO_STD_WSTREAMBUF
+#error "wide char i/o not supported on this platform"
+#else
+
+#include <boost/archive/xml_woarchive.hpp>
+#include <boost/archive/detail/polymorphic_oarchive_route.hpp>
+
+namespace boost {
+namespace archive {
+
+class BOOST_SYMBOL_VISIBLE polymorphic_xml_woarchive :
+ public detail::polymorphic_oarchive_route<xml_woarchive>
+{
+public:
+ polymorphic_xml_woarchive(std::wostream & os, unsigned int flags = 0) :
+ detail::polymorphic_oarchive_route<xml_woarchive>(os, flags)
+ {}
+ ~polymorphic_xml_woarchive(){}
+};
+
+} // namespace archive
+} // namespace boost
+
+// required by export
+BOOST_SERIALIZATION_REGISTER_ARCHIVE(
+ boost::archive::polymorphic_xml_woarchive
+)
+
+#endif // BOOST_NO_STD_WSTREAMBUF
+#endif // BOOST_ARCHIVE_POLYMORPHIC_XML_WOARCHIVE_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/archive/text_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/text_iarchive.hpp
index d9d60adf0b8..d9d60adf0b8 100644
--- a/src/third_party/boost-1.68.0/boost/archive/text_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/text_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/text_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/text_oarchive.hpp
index e4c6d4666a3..e4c6d4666a3 100644
--- a/src/third_party/boost-1.68.0/boost/archive/text_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/text_oarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/text_wiarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/text_wiarchive.hpp
index 3adf068a51a..3adf068a51a 100644
--- a/src/third_party/boost-1.68.0/boost/archive/text_wiarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/text_wiarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/text_woarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/text_woarchive.hpp
index beba62f7058..beba62f7058 100644
--- a/src/third_party/boost-1.68.0/boost/archive/text_woarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/text_woarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/wcslen.hpp b/src/third_party/boost-1.69.0/boost/archive/wcslen.hpp
index 0b60004f095..0b60004f095 100644
--- a/src/third_party/boost-1.68.0/boost/archive/wcslen.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/wcslen.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/xml_archive_exception.hpp b/src/third_party/boost-1.69.0/boost/archive/xml_archive_exception.hpp
index 82c53ef5d3e..82c53ef5d3e 100644
--- a/src/third_party/boost-1.68.0/boost/archive/xml_archive_exception.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/xml_archive_exception.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/xml_iarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/xml_iarchive.hpp
index abd2f9fc4e3..abd2f9fc4e3 100644
--- a/src/third_party/boost-1.68.0/boost/archive/xml_iarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/xml_iarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/xml_oarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/xml_oarchive.hpp
index d0fa8b21f26..d0fa8b21f26 100644
--- a/src/third_party/boost-1.68.0/boost/archive/xml_oarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/xml_oarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/xml_wiarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/xml_wiarchive.hpp
index 2ca3e5595ec..2ca3e5595ec 100644
--- a/src/third_party/boost-1.68.0/boost/archive/xml_wiarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/xml_wiarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/archive/xml_woarchive.hpp b/src/third_party/boost-1.69.0/boost/archive/xml_woarchive.hpp
index e6ac50de44b..e6ac50de44b 100644
--- a/src/third_party/boost-1.68.0/boost/archive/xml_woarchive.hpp
+++ b/src/third_party/boost-1.69.0/boost/archive/xml_woarchive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/array.hpp b/src/third_party/boost-1.69.0/boost/array.hpp
index 210c0721254..210c0721254 100644
--- a/src/third_party/boost-1.68.0/boost/array.hpp
+++ b/src/third_party/boost-1.69.0/boost/array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio.hpp b/src/third_party/boost-1.69.0/boost/asio.hpp
index 53841de1fcb..53841de1fcb 100644
--- a/src/third_party/boost-1.68.0/boost/asio.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/associated_allocator.hpp b/src/third_party/boost-1.69.0/boost/asio/associated_allocator.hpp
index bcf1eca3aea..bcf1eca3aea 100644
--- a/src/third_party/boost-1.68.0/boost/asio/associated_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/associated_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/associated_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/associated_executor.hpp
index c31800f3946..c31800f3946 100644
--- a/src/third_party/boost-1.68.0/boost/asio/associated_executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/associated_executor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/async_result.hpp b/src/third_party/boost-1.69.0/boost/asio/async_result.hpp
index a2aafce1344..a2aafce1344 100644
--- a/src/third_party/boost-1.68.0/boost/asio/async_result.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/async_result.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_datagram_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_datagram_socket.hpp
index b512b75ddeb..b512b75ddeb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_datagram_socket.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_datagram_socket.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_deadline_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_deadline_timer.hpp
index 56a265bfbc7..56a265bfbc7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_deadline_timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_deadline_timer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_io_object.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_io_object.hpp
index c0c2c714eb3..c0c2c714eb3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_io_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_io_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_raw_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_raw_socket.hpp
index b24d0796597..b24d0796597 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_raw_socket.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_raw_socket.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_seq_packet_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_seq_packet_socket.hpp
index cc98656df34..cc98656df34 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_seq_packet_socket.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_seq_packet_socket.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_serial_port.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_serial_port.hpp
index 2f6c8cf8878..2f6c8cf8878 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_serial_port.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_serial_port.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_signal_set.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_signal_set.hpp
index 8ca5dfa1d9e..8ca5dfa1d9e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_signal_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_signal_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_socket.hpp
index ed22cd2b799..ed22cd2b799 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_socket.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_socket.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_socket_acceptor.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_socket_acceptor.hpp
index 8afdfd30091..8afdfd30091 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_socket_acceptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_socket_acceptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_socket_iostream.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_socket_iostream.hpp
index 7a7cab9c93a..7a7cab9c93a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_socket_iostream.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_socket_iostream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_socket_streambuf.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_socket_streambuf.hpp
index 0a2bbe56a65..0a2bbe56a65 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_socket_streambuf.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_socket_streambuf.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_stream_socket.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_stream_socket.hpp
index 9732c3c3031..9732c3c3031 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_stream_socket.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_stream_socket.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_streambuf.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_streambuf.hpp
index e6f8f33f6bd..e6f8f33f6bd 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_streambuf.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_streambuf.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_streambuf_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_streambuf_fwd.hpp
index f2ef522d9b7..f2ef522d9b7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_streambuf_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_streambuf_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/basic_waitable_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/basic_waitable_timer.hpp
index 6dc4bded98b..6dc4bded98b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/basic_waitable_timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/basic_waitable_timer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/bind_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/bind_executor.hpp
index c4086b6135c..c4086b6135c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/bind_executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/bind_executor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/buffer.hpp b/src/third_party/boost-1.69.0/boost/asio/buffer.hpp
new file mode 100644
index 00000000000..29352f64815
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/buffer.hpp
@@ -0,0 +1,2173 @@
+//
+// buffer.hpp
+// ~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_BUFFER_HPP
+#define BOOST_ASIO_BUFFER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <cstddef>
+#include <cstring>
+#include <limits>
+#include <stdexcept>
+#include <string>
+#include <vector>
+#include <boost/asio/detail/array_fwd.hpp>
+#include <boost/asio/detail/string_view.hpp>
+#include <boost/asio/detail/throw_exception.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+
+#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1700)
+# if defined(_HAS_ITERATOR_DEBUGGING) && (_HAS_ITERATOR_DEBUGGING != 0)
+# if !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
+# define BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+# endif // !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
+# endif // defined(_HAS_ITERATOR_DEBUGGING)
+#endif // defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC >= 1700)
+
+#if defined(__GNUC__)
+# if defined(_GLIBCXX_DEBUG)
+# if !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
+# define BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+# endif // !defined(BOOST_ASIO_DISABLE_BUFFER_DEBUGGING)
+# endif // defined(_GLIBCXX_DEBUG)
+#endif // defined(__GNUC__)
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+# include <boost/asio/detail/functional.hpp>
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+
+#if defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
+# include <boost/detail/workaround.hpp>
+# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582)) \
+ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
+# define BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND
+# endif // BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x582))
+ // || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
+#endif // defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
+
+#if defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
+# include <boost/asio/detail/type_traits.hpp>
+#endif // defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+class mutable_buffer;
+class const_buffer;
+
+/// Holds a buffer that can be modified.
+/**
+ * The mutable_buffer class provides a safe representation of a buffer that can
+ * be modified. It does not own the underlying data, and so is cheap to copy or
+ * assign.
+ *
+ * @par Accessing Buffer Contents
+ *
+ * The contents of a buffer may be accessed using the @c data() and @c size()
+ * member functions:
+ *
+ * @code boost::asio::mutable_buffer b1 = ...;
+ * std::size_t s1 = b1.size();
+ * unsigned char* p1 = static_cast<unsigned char*>(b1.data());
+ * @endcode
+ *
+ * The @c data() member function permits violations of type safety, so uses of
+ * it in application code should be carefully considered.
+ */
+class mutable_buffer
+{
+public:
+ /// Construct an empty buffer.
+ mutable_buffer() BOOST_ASIO_NOEXCEPT
+ : data_(0),
+ size_(0)
+ {
+ }
+
+ /// Construct a buffer to represent a given memory range.
+ mutable_buffer(void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
+ : data_(data),
+ size_(size)
+ {
+ }
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ mutable_buffer(void* data, std::size_t size,
+ boost::asio::detail::function<void()> debug_check)
+ : data_(data),
+ size_(size),
+ debug_check_(debug_check)
+ {
+ }
+
+ const boost::asio::detail::function<void()>& get_debug_check() const
+ {
+ return debug_check_;
+ }
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+
+ /// Get a pointer to the beginning of the memory range.
+ void* data() const BOOST_ASIO_NOEXCEPT
+ {
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ if (size_ && debug_check_)
+ debug_check_();
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ return data_;
+ }
+
+ /// Get the size of the memory range.
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+ return size_;
+ }
+
+ /// Move the start of the buffer by the specified number of bytes.
+ mutable_buffer& operator+=(std::size_t n) BOOST_ASIO_NOEXCEPT
+ {
+ std::size_t offset = n < size_ ? n : size_;
+ data_ = static_cast<char*>(data_) + offset;
+ size_ -= offset;
+ return *this;
+ }
+
+private:
+ void* data_;
+ std::size_t size_;
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ boost::asio::detail::function<void()> debug_check_;
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+};
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// (Deprecated: Use mutable_buffer.) Adapts a single modifiable buffer so that
+/// it meets the requirements of the MutableBufferSequence concept.
+class mutable_buffers_1
+ : public mutable_buffer
+{
+public:
+ /// The type for each element in the list of buffers.
+ typedef mutable_buffer value_type;
+
+ /// A random-access iterator type that may be used to read elements.
+ typedef const mutable_buffer* const_iterator;
+
+ /// Construct to represent a given memory range.
+ mutable_buffers_1(void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
+ : mutable_buffer(data, size)
+ {
+ }
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ mutable_buffers_1(void* data, std::size_t size,
+ boost::asio::detail::function<void()> debug_check)
+ : mutable_buffer(data, size, debug_check)
+ {
+ }
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+
+ /// Construct to represent a single modifiable buffer.
+ explicit mutable_buffers_1(const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
+ : mutable_buffer(b)
+ {
+ }
+
+ /// Get a random-access iterator to the first element.
+ const_iterator begin() const BOOST_ASIO_NOEXCEPT
+ {
+ return this;
+ }
+
+ /// Get a random-access iterator for one past the last element.
+ const_iterator end() const BOOST_ASIO_NOEXCEPT
+ {
+ return begin() + 1;
+ }
+};
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// Holds a buffer that cannot be modified.
+/**
+ * The const_buffer class provides a safe representation of a buffer that cannot
+ * be modified. It does not own the underlying data, and so is cheap to copy or
+ * assign.
+ *
+ * @par Accessing Buffer Contents
+ *
+ * The contents of a buffer may be accessed using the @c data() and @c size()
+ * member functions:
+ *
+ * @code boost::asio::const_buffer b1 = ...;
+ * std::size_t s1 = b1.size();
+ * const unsigned char* p1 = static_cast<const unsigned char*>(b1.data());
+ * @endcode
+ *
+ * The @c data() member function permits violations of type safety, so uses of
+ * it in application code should be carefully considered.
+ */
+class const_buffer
+{
+public:
+ /// Construct an empty buffer.
+ const_buffer() BOOST_ASIO_NOEXCEPT
+ : data_(0),
+ size_(0)
+ {
+ }
+
+ /// Construct a buffer to represent a given memory range.
+ const_buffer(const void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
+ : data_(data),
+ size_(size)
+ {
+ }
+
+ /// Construct a non-modifiable buffer from a modifiable one.
+ const_buffer(const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
+ : data_(b.data()),
+ size_(b.size())
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , debug_check_(b.get_debug_check())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ {
+ }
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ const_buffer(const void* data, std::size_t size,
+ boost::asio::detail::function<void()> debug_check)
+ : data_(data),
+ size_(size),
+ debug_check_(debug_check)
+ {
+ }
+
+ const boost::asio::detail::function<void()>& get_debug_check() const
+ {
+ return debug_check_;
+ }
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+
+ /// Get a pointer to the beginning of the memory range.
+ const void* data() const BOOST_ASIO_NOEXCEPT
+ {
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ if (size_ && debug_check_)
+ debug_check_();
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ return data_;
+ }
+
+ /// Get the size of the memory range.
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+ return size_;
+ }
+
+ /// Move the start of the buffer by the specified number of bytes.
+ const_buffer& operator+=(std::size_t n) BOOST_ASIO_NOEXCEPT
+ {
+ std::size_t offset = n < size_ ? n : size_;
+ data_ = static_cast<const char*>(data_) + offset;
+ size_ -= offset;
+ return *this;
+ }
+
+private:
+ const void* data_;
+ std::size_t size_;
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ boost::asio::detail::function<void()> debug_check_;
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+};
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// (Deprecated: Use const_buffer.) Adapts a single non-modifiable buffer so
+/// that it meets the requirements of the ConstBufferSequence concept.
+class const_buffers_1
+ : public const_buffer
+{
+public:
+ /// The type for each element in the list of buffers.
+ typedef const_buffer value_type;
+
+ /// A random-access iterator type that may be used to read elements.
+ typedef const const_buffer* const_iterator;
+
+ /// Construct to represent a given memory range.
+ const_buffers_1(const void* data, std::size_t size) BOOST_ASIO_NOEXCEPT
+ : const_buffer(data, size)
+ {
+ }
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ const_buffers_1(const void* data, std::size_t size,
+ boost::asio::detail::function<void()> debug_check)
+ : const_buffer(data, size, debug_check)
+ {
+ }
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+
+ /// Construct to represent a single non-modifiable buffer.
+ explicit const_buffers_1(const const_buffer& b) BOOST_ASIO_NOEXCEPT
+ : const_buffer(b)
+ {
+ }
+
+ /// Get a random-access iterator to the first element.
+ const_iterator begin() const BOOST_ASIO_NOEXCEPT
+ {
+ return this;
+ }
+
+ /// Get a random-access iterator for one past the last element.
+ const_iterator end() const BOOST_ASIO_NOEXCEPT
+ {
+ return begin() + 1;
+ }
+};
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// (Deprecated: Use the socket/descriptor wait() and async_wait() member
+/// functions.) An implementation of both the ConstBufferSequence and
+/// MutableBufferSequence concepts to represent a null buffer sequence.
+class null_buffers
+{
+public:
+ /// The type for each element in the list of buffers.
+ typedef mutable_buffer value_type;
+
+ /// A random-access iterator type that may be used to read elements.
+ typedef const mutable_buffer* const_iterator;
+
+ /// Get a random-access iterator to the first element.
+ const_iterator begin() const BOOST_ASIO_NOEXCEPT
+ {
+ return &buf_;
+ }
+
+ /// Get a random-access iterator for one past the last element.
+ const_iterator end() const BOOST_ASIO_NOEXCEPT
+ {
+ return &buf_;
+ }
+
+private:
+ mutable_buffer buf_;
+};
+
+/** @defgroup buffer_sequence_begin boost::asio::buffer_sequence_begin
+ *
+ * @brief The boost::asio::buffer_sequence_begin function returns an iterator
+ * pointing to the first element in a buffer sequence.
+ */
+/*@{*/
+
+/// Get an iterator to the first element in a buffer sequence.
+inline const mutable_buffer* buffer_sequence_begin(const mutable_buffer& b)
+{
+ return &b;
+}
+
+/// Get an iterator to the first element in a buffer sequence.
+inline const const_buffer* buffer_sequence_begin(const const_buffer& b)
+{
+ return &b;
+}
+
+#if defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+/// Get an iterator to the first element in a buffer sequence.
+template <typename C>
+inline auto buffer_sequence_begin(C& c) -> decltype(c.begin())
+{
+ return c.begin();
+}
+
+/// Get an iterator to the first element in a buffer sequence.
+template <typename C>
+inline auto buffer_sequence_begin(const C& c) -> decltype(c.begin())
+{
+ return c.begin();
+}
+
+#else // defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+template <typename C>
+inline typename C::iterator buffer_sequence_begin(C& c)
+{
+ return c.begin();
+}
+
+template <typename C>
+inline typename C::const_iterator buffer_sequence_begin(const C& c)
+{
+ return c.begin();
+}
+
+#endif // defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+/*@}*/
+
+/** @defgroup buffer_sequence_end boost::asio::buffer_sequence_end
+ *
+ * @brief The boost::asio::buffer_sequence_end function returns an iterator
+ * pointing to one past the end element in a buffer sequence.
+ */
+/*@{*/
+
+/// Get an iterator to one past the end element in a buffer sequence.
+inline const mutable_buffer* buffer_sequence_end(const mutable_buffer& b)
+{
+ return &b + 1;
+}
+
+/// Get an iterator to one past the end element in a buffer sequence.
+inline const const_buffer* buffer_sequence_end(const const_buffer& b)
+{
+ return &b + 1;
+}
+
+#if defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+/// Get an iterator to one past the end element in a buffer sequence.
+template <typename C>
+inline auto buffer_sequence_end(C& c) -> decltype(c.end())
+{
+ return c.end();
+}
+
+/// Get an iterator to one past the end element in a buffer sequence.
+template <typename C>
+inline auto buffer_sequence_end(const C& c) -> decltype(c.end())
+{
+ return c.end();
+}
+
+#else // defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+template <typename C>
+inline typename C::iterator buffer_sequence_end(C& c)
+{
+ return c.end();
+}
+
+template <typename C>
+inline typename C::const_iterator buffer_sequence_end(const C& c)
+{
+ return c.end();
+}
+
+#endif // defined(BOOST_ASIO_HAS_DECLTYPE) || defined(GENERATING_DOCUMENTATION)
+
+/*@}*/
+
+namespace detail {
+
+// Tag types used to select appropriately optimised overloads.
+struct one_buffer {};
+struct multiple_buffers {};
+
+// Helper trait to detect single buffers.
+template <typename BufferSequence>
+struct buffer_sequence_cardinality :
+ conditional<
+ is_same<BufferSequence, mutable_buffer>::value
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ || is_same<BufferSequence, mutable_buffers_1>::value
+ || is_same<BufferSequence, const_buffers_1>::value
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+ || is_same<BufferSequence, const_buffer>::value,
+ one_buffer, multiple_buffers>::type {};
+
+template <typename Iterator>
+inline std::size_t buffer_size(one_buffer,
+ Iterator begin, Iterator) BOOST_ASIO_NOEXCEPT
+{
+ return const_buffer(*begin).size();
+}
+
+template <typename Iterator>
+inline std::size_t buffer_size(multiple_buffers,
+ Iterator begin, Iterator end) BOOST_ASIO_NOEXCEPT
+{
+ std::size_t total_buffer_size = 0;
+
+ Iterator iter = begin;
+ for (; iter != end; ++iter)
+ {
+ const_buffer b(*iter);
+ total_buffer_size += b.size();
+ }
+
+ return total_buffer_size;
+}
+
+} // namespace detail
+
+/// Get the total number of bytes in a buffer sequence.
+/**
+ * The @c buffer_size function determines the total size of all buffers in the
+ * buffer sequence, as if computed as follows:
+ *
+ * @code size_t total_size = 0;
+ * auto i = boost::asio::buffer_sequence_begin(buffers);
+ * auto end = boost::asio::buffer_sequence_end(buffers);
+ * for (; i != end; ++i)
+ * {
+ * const_buffer b(*i);
+ * total_size += b.size();
+ * }
+ * return total_size; @endcode
+ *
+ * The @c BufferSequence template parameter may meet either of the @c
+ * ConstBufferSequence or @c MutableBufferSequence type requirements.
+ */
+template <typename BufferSequence>
+inline std::size_t buffer_size(const BufferSequence& b) BOOST_ASIO_NOEXCEPT
+{
+ return detail::buffer_size(
+ detail::buffer_sequence_cardinality<BufferSequence>(),
+ boost::asio::buffer_sequence_begin(b),
+ boost::asio::buffer_sequence_end(b));
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/** @defgroup buffer_cast boost::asio::buffer_cast
+ *
+ * @brief (Deprecated: Use the @c data() member function.) The
+ * boost::asio::buffer_cast function is used to obtain a pointer to the
+ * underlying memory region associated with a buffer.
+ *
+ * @par Examples:
+ *
+ * To access the memory of a non-modifiable buffer, use:
+ * @code boost::asio::const_buffer b1 = ...;
+ * const unsigned char* p1 = boost::asio::buffer_cast<const unsigned char*>(b1);
+ * @endcode
+ *
+ * To access the memory of a modifiable buffer, use:
+ * @code boost::asio::mutable_buffer b2 = ...;
+ * unsigned char* p2 = boost::asio::buffer_cast<unsigned char*>(b2);
+ * @endcode
+ *
+ * The boost::asio::buffer_cast function permits violations of type safety, so
+ * uses of it in application code should be carefully considered.
+ */
+/*@{*/
+
+/// Cast a non-modifiable buffer to a specified pointer to POD type.
+template <typename PointerToPodType>
+inline PointerToPodType buffer_cast(const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
+{
+ return static_cast<PointerToPodType>(b.data());
+}
+
+/// Cast a non-modifiable buffer to a specified pointer to POD type.
+template <typename PointerToPodType>
+inline PointerToPodType buffer_cast(const const_buffer& b) BOOST_ASIO_NOEXCEPT
+{
+ return static_cast<PointerToPodType>(b.data());
+}
+
+/*@}*/
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// Create a new modifiable buffer that is offset from the start of another.
+/**
+ * @relates mutable_buffer
+ */
+inline mutable_buffer operator+(const mutable_buffer& b,
+ std::size_t n) BOOST_ASIO_NOEXCEPT
+{
+ std::size_t offset = n < b.size() ? n : b.size();
+ char* new_data = static_cast<char*>(b.data()) + offset;
+ std::size_t new_size = b.size() - offset;
+ return mutable_buffer(new_data, new_size
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , b.get_debug_check()
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new modifiable buffer that is offset from the start of another.
+/**
+ * @relates mutable_buffer
+ */
+inline mutable_buffer operator+(std::size_t n,
+ const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
+{
+ return b + n;
+}
+
+/// Create a new non-modifiable buffer that is offset from the start of another.
+/**
+ * @relates const_buffer
+ */
+inline const_buffer operator+(const const_buffer& b,
+ std::size_t n) BOOST_ASIO_NOEXCEPT
+{
+ std::size_t offset = n < b.size() ? n : b.size();
+ const char* new_data = static_cast<const char*>(b.data()) + offset;
+ std::size_t new_size = b.size() - offset;
+ return const_buffer(new_data, new_size
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , b.get_debug_check()
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new non-modifiable buffer that is offset from the start of another.
+/**
+ * @relates const_buffer
+ */
+inline const_buffer operator+(std::size_t n,
+ const const_buffer& b) BOOST_ASIO_NOEXCEPT
+{
+ return b + n;
+}
+
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+namespace detail {
+
+template <typename Iterator>
+class buffer_debug_check
+{
+public:
+ buffer_debug_check(Iterator iter)
+ : iter_(iter)
+ {
+ }
+
+ ~buffer_debug_check()
+ {
+#if defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC == 1400)
+ // MSVC 8's string iterator checking may crash in a std::string::iterator
+ // object's destructor when the iterator points to an already-destroyed
+ // std::string object, unless the iterator is cleared first.
+ iter_ = Iterator();
+#endif // defined(BOOST_ASIO_MSVC) && (BOOST_ASIO_MSVC == 1400)
+ }
+
+ void operator()()
+ {
+ (void)*iter_;
+ }
+
+private:
+ Iterator iter_;
+};
+
+} // namespace detail
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+
+/** @defgroup buffer boost::asio::buffer
+ *
+ * @brief The boost::asio::buffer function is used to create a buffer object to
+ * represent raw memory, an array of POD elements, a vector of POD elements,
+ * or a std::string.
+ *
+ * A buffer object represents a contiguous region of memory as a 2-tuple
+ * consisting of a pointer and size in bytes. A tuple of the form <tt>{void*,
+ * size_t}</tt> specifies a mutable (modifiable) region of memory. Similarly, a
+ * tuple of the form <tt>{const void*, size_t}</tt> specifies a const
+ * (non-modifiable) region of memory. These two forms correspond to the classes
+ * mutable_buffer and const_buffer, respectively. To mirror C++'s conversion
+ * rules, a mutable_buffer is implicitly convertible to a const_buffer, and the
+ * opposite conversion is not permitted.
+ *
+ * The simplest use case involves reading or writing a single buffer of a
+ * specified size:
+ *
+ * @code sock.send(boost::asio::buffer(data, size)); @endcode
+ *
+ * In the above example, the return value of boost::asio::buffer meets the
+ * requirements of the ConstBufferSequence concept so that it may be directly
+ * passed to the socket's write function. A buffer created for modifiable
+ * memory also meets the requirements of the MutableBufferSequence concept.
+ *
+ * An individual buffer may be created from a builtin array, std::vector,
+ * std::array or boost::array of POD elements. This helps prevent buffer
+ * overruns by automatically determining the size of the buffer:
+ *
+ * @code char d1[128];
+ * size_t bytes_transferred = sock.receive(boost::asio::buffer(d1));
+ *
+ * std::vector<char> d2(128);
+ * bytes_transferred = sock.receive(boost::asio::buffer(d2));
+ *
+ * std::array<char, 128> d3;
+ * bytes_transferred = sock.receive(boost::asio::buffer(d3));
+ *
+ * boost::array<char, 128> d4;
+ * bytes_transferred = sock.receive(boost::asio::buffer(d4)); @endcode
+ *
+ * In all three cases above, the buffers created are exactly 128 bytes long.
+ * Note that a vector is @e never automatically resized when creating or using
+ * a buffer. The buffer size is determined using the vector's <tt>size()</tt>
+ * member function, and not its capacity.
+ *
+ * @par Accessing Buffer Contents
+ *
+ * The contents of a buffer may be accessed using the @c data() and @c size()
+ * member functions:
+ *
+ * @code boost::asio::mutable_buffer b1 = ...;
+ * std::size_t s1 = b1.size();
+ * unsigned char* p1 = static_cast<unsigned char*>(b1.data());
+ *
+ * boost::asio::const_buffer b2 = ...;
+ * std::size_t s2 = b2.size();
+ * const void* p2 = b2.data(); @endcode
+ *
+ * The @c data() member function permits violations of type safety, so
+ * uses of it in application code should be carefully considered.
+ *
+ * For convenience, a @ref buffer_size function is provided that works with
+ * both buffers and buffer sequences (that is, types meeting the
+ * ConstBufferSequence or MutableBufferSequence type requirements). In this
+ * case, the function returns the total size of all buffers in the sequence.
+ *
+ * @par Buffer Copying
+ *
+ * The @ref buffer_copy function may be used to copy raw bytes between
+ * individual buffers and buffer sequences.
+*
+ * In particular, when used with the @ref buffer_size function, the @ref
+ * buffer_copy function can be used to linearise a sequence of buffers. For
+ * example:
+ *
+ * @code vector<const_buffer> buffers = ...;
+ *
+ * vector<unsigned char> data(boost::asio::buffer_size(buffers));
+ * boost::asio::buffer_copy(boost::asio::buffer(data), buffers); @endcode
+ *
+ * Note that @ref buffer_copy is implemented in terms of @c memcpy, and
+ * consequently it cannot be used to copy between overlapping memory regions.
+ *
+ * @par Buffer Invalidation
+ *
+ * A buffer object does not have any ownership of the memory it refers to. It
+ * is the responsibility of the application to ensure the memory region remains
+ * valid until it is no longer required for an I/O operation. When the memory
+ * is no longer available, the buffer is said to have been invalidated.
+ *
+ * For the boost::asio::buffer overloads that accept an argument of type
+ * std::vector, the buffer objects returned are invalidated by any vector
+ * operation that also invalidates all references, pointers and iterators
+ * referring to the elements in the sequence (C++ Std, 23.2.4)
+ *
+ * For the boost::asio::buffer overloads that accept an argument of type
+ * std::basic_string, the buffer objects returned are invalidated according to
+ * the rules defined for invalidation of references, pointers and iterators
+ * referring to elements of the sequence (C++ Std, 21.3).
+ *
+ * @par Buffer Arithmetic
+ *
+ * Buffer objects may be manipulated using simple arithmetic in a safe way
+ * which helps prevent buffer overruns. Consider an array initialised as
+ * follows:
+ *
+ * @code boost::array<char, 6> a = { 'a', 'b', 'c', 'd', 'e' }; @endcode
+ *
+ * A buffer object @c b1 created using:
+ *
+ * @code b1 = boost::asio::buffer(a); @endcode
+ *
+ * represents the entire array, <tt>{ 'a', 'b', 'c', 'd', 'e' }</tt>. An
+ * optional second argument to the boost::asio::buffer function may be used to
+ * limit the size, in bytes, of the buffer:
+ *
+ * @code b2 = boost::asio::buffer(a, 3); @endcode
+ *
+ * such that @c b2 represents the data <tt>{ 'a', 'b', 'c' }</tt>. Even if the
+ * size argument exceeds the actual size of the array, the size of the buffer
+ * object created will be limited to the array size.
+ *
+ * An offset may be applied to an existing buffer to create a new one:
+ *
+ * @code b3 = b1 + 2; @endcode
+ *
+ * where @c b3 will set to represent <tt>{ 'c', 'd', 'e' }</tt>. If the offset
+ * exceeds the size of the existing buffer, the newly created buffer will be
+ * empty.
+ *
+ * Both an offset and size may be specified to create a buffer that corresponds
+ * to a specific range of bytes within an existing buffer:
+ *
+ * @code b4 = boost::asio::buffer(b1 + 1, 3); @endcode
+ *
+ * so that @c b4 will refer to the bytes <tt>{ 'b', 'c', 'd' }</tt>.
+ *
+ * @par Buffers and Scatter-Gather I/O
+ *
+ * To read or write using multiple buffers (i.e. scatter-gather I/O), multiple
+ * buffer objects may be assigned into a container that supports the
+ * MutableBufferSequence (for read) or ConstBufferSequence (for write) concepts:
+ *
+ * @code
+ * char d1[128];
+ * std::vector<char> d2(128);
+ * boost::array<char, 128> d3;
+ *
+ * boost::array<mutable_buffer, 3> bufs1 = {
+ * boost::asio::buffer(d1),
+ * boost::asio::buffer(d2),
+ * boost::asio::buffer(d3) };
+ * bytes_transferred = sock.receive(bufs1);
+ *
+ * std::vector<const_buffer> bufs2;
+ * bufs2.push_back(boost::asio::buffer(d1));
+ * bufs2.push_back(boost::asio::buffer(d2));
+ * bufs2.push_back(boost::asio::buffer(d3));
+ * bytes_transferred = sock.send(bufs2); @endcode
+ */
+/*@{*/
+
+#if defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+# define BOOST_ASIO_MUTABLE_BUFFER mutable_buffer
+# define BOOST_ASIO_CONST_BUFFER const_buffer
+#else // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+# define BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_1
+# define BOOST_ASIO_CONST_BUFFER const_buffers_1
+#endif // defined(BOOST_ASIO_NO_DEPRECATED) || defined(GENERATING_DOCUMENTATION)
+
+/// Create a new modifiable buffer from an existing buffer.
+/**
+ * @returns <tt>mutable_buffer(b)</tt>.
+ */
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(
+ const mutable_buffer& b) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(b);
+}
+
+/// Create a new modifiable buffer from an existing buffer.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * b.data(),
+ * min(b.size(), max_size_in_bytes)); @endcode
+ */
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(const mutable_buffer& b,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(
+ mutable_buffer(b.data(),
+ b.size() < max_size_in_bytes
+ ? b.size() : max_size_in_bytes
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , b.get_debug_check()
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ ));
+}
+
+/// Create a new non-modifiable buffer from an existing buffer.
+/**
+ * @returns <tt>const_buffer(b)</tt>.
+ */
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ const const_buffer& b) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(b);
+}
+
+/// Create a new non-modifiable buffer from an existing buffer.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * b.data(),
+ * min(b.size(), max_size_in_bytes)); @endcode
+ */
+inline BOOST_ASIO_CONST_BUFFER buffer(const const_buffer& b,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(b.data(),
+ b.size() < max_size_in_bytes
+ ? b.size() : max_size_in_bytes
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , b.get_debug_check()
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new modifiable buffer that represents the given memory range.
+/**
+ * @returns <tt>mutable_buffer(data, size_in_bytes)</tt>.
+ */
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(void* data,
+ std::size_t size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data, size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer that represents the given memory range.
+/**
+ * @returns <tt>const_buffer(data, size_in_bytes)</tt>.
+ */
+inline BOOST_ASIO_CONST_BUFFER buffer(const void* data,
+ std::size_t size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data, size_in_bytes);
+}
+
+/// Create a new modifiable buffer that represents the given POD array.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * static_cast<void*>(data),
+ * N * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N]) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data, N * sizeof(PodType));
+}
+
+/// Create a new modifiable buffer that represents the given POD array.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * static_cast<void*>(data),
+ * min(N * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(PodType (&data)[N],
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data,
+ N * sizeof(PodType) < max_size_in_bytes
+ ? N * sizeof(PodType) : max_size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * static_cast<const void*>(data),
+ * N * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ const PodType (&data)[N]) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data, N * sizeof(PodType));
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * static_cast<const void*>(data),
+ * min(N * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(const PodType (&data)[N],
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data,
+ N * sizeof(PodType) < max_size_in_bytes
+ ? N * sizeof(PodType) : max_size_in_bytes);
+}
+
+#if defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
+
+// Borland C++ and Sun Studio think the overloads:
+//
+// unspecified buffer(boost::array<PodType, N>& array ...);
+//
+// and
+//
+// unspecified buffer(boost::array<const PodType, N>& array ...);
+//
+// are ambiguous. This will be worked around by using a buffer_types traits
+// class that contains typedefs for the appropriate buffer and container
+// classes, based on whether PodType is const or non-const.
+
+namespace detail {
+
+template <bool IsConst>
+struct buffer_types_base;
+
+template <>
+struct buffer_types_base<false>
+{
+ typedef mutable_buffer buffer_type;
+ typedef BOOST_ASIO_MUTABLE_BUFFER container_type;
+};
+
+template <>
+struct buffer_types_base<true>
+{
+ typedef const_buffer buffer_type;
+ typedef BOOST_ASIO_CONST_BUFFER container_type;
+};
+
+template <typename PodType>
+struct buffer_types
+ : public buffer_types_base<is_const<PodType>::value>
+{
+};
+
+} // namespace detail
+
+template <typename PodType, std::size_t N>
+inline typename detail::buffer_types<PodType>::container_type
+buffer(boost::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
+{
+ typedef typename boost::asio::detail::buffer_types<PodType>::buffer_type
+ buffer_type;
+ typedef typename boost::asio::detail::buffer_types<PodType>::container_type
+ container_type;
+ return container_type(
+ buffer_type(data.c_array(), data.size() * sizeof(PodType)));
+}
+
+template <typename PodType, std::size_t N>
+inline typename detail::buffer_types<PodType>::container_type
+buffer(boost::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ typedef typename boost::asio::detail::buffer_types<PodType>::buffer_type
+ buffer_type;
+ typedef typename boost::asio::detail::buffer_types<PodType>::container_type
+ container_type;
+ return container_type(
+ buffer_type(data.c_array(),
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes));
+}
+
+#else // defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
+
+/// Create a new modifiable buffer that represents the given POD array.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(
+ boost::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(
+ data.c_array(), data.size() * sizeof(PodType));
+}
+
+/// Create a new modifiable buffer that represents the given POD array.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(boost::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data.c_array(),
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ boost::array<const PodType, N>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(boost::array<const PodType, N>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(),
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes);
+}
+
+#endif // defined(BOOST_ASIO_ENABLE_ARRAY_BUFFER_WORKAROUND)
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ const boost::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(const boost::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(),
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes);
+}
+
+#if defined(BOOST_ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
+
+/// Create a new modifiable buffer that represents the given POD array.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(
+ std::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data.data(), data.size() * sizeof(PodType));
+}
+
+/// Create a new modifiable buffer that represents the given POD array.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(std::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data.data(),
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ std::array<const PodType, N>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(std::array<const PodType, N>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(),
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes);
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * data.size() * sizeof(PodType)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ const std::array<PodType, N>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(PodType));
+}
+
+/// Create a new non-modifiable buffer that represents the given POD array.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ */
+template <typename PodType, std::size_t N>
+inline BOOST_ASIO_CONST_BUFFER buffer(const std::array<PodType, N>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(),
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes);
+}
+
+#endif // defined(BOOST_ASIO_HAS_STD_ARRAY) || defined(GENERATING_DOCUMENTATION)
+
+/// Create a new modifiable buffer that represents the given POD vector.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.size() ? &data[0] : 0,
+ * data.size() * sizeof(PodType)); @endcode
+ *
+ * @note The buffer is invalidated by any vector operation that would also
+ * invalidate iterators.
+ */
+template <typename PodType, typename Allocator>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(
+ std::vector<PodType, Allocator>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(
+ data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename std::vector<PodType, Allocator>::iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new modifiable buffer that represents the given POD vector.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ *
+ * @note The buffer is invalidated by any vector operation that would also
+ * invalidate iterators.
+ */
+template <typename PodType, typename Allocator>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(std::vector<PodType, Allocator>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename std::vector<PodType, Allocator>::iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new non-modifiable buffer that represents the given POD vector.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * data.size() * sizeof(PodType)); @endcode
+ *
+ * @note The buffer is invalidated by any vector operation that would also
+ * invalidate iterators.
+ */
+template <typename PodType, typename Allocator>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ const std::vector<PodType, Allocator>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(
+ data.size() ? &data[0] : 0, data.size() * sizeof(PodType)
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename std::vector<PodType, Allocator>::const_iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new non-modifiable buffer that represents the given POD vector.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(data.size() * sizeof(PodType), max_size_in_bytes)); @endcode
+ *
+ * @note The buffer is invalidated by any vector operation that would also
+ * invalidate iterators.
+ */
+template <typename PodType, typename Allocator>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ const std::vector<PodType, Allocator>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
+ data.size() * sizeof(PodType) < max_size_in_bytes
+ ? data.size() * sizeof(PodType) : max_size_in_bytes
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename std::vector<PodType, Allocator>::const_iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new modifiable buffer that represents the given string.
+/**
+ * @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
+ * data.size() * sizeof(Elem))</tt>.
+ *
+ * @note The buffer is invalidated by any non-const operation called on the
+ * given string object.
+ */
+template <typename Elem, typename Traits, typename Allocator>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(
+ std::basic_string<Elem, Traits, Allocator>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
+ data.size() * sizeof(Elem)
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename std::basic_string<Elem, Traits, Allocator>::iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new modifiable buffer that represents the given string.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
+ *
+ * @note The buffer is invalidated by any non-const operation called on the
+ * given string object.
+ */
+template <typename Elem, typename Traits, typename Allocator>
+inline BOOST_ASIO_MUTABLE_BUFFER buffer(
+ std::basic_string<Elem, Traits, Allocator>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_MUTABLE_BUFFER(data.size() ? &data[0] : 0,
+ data.size() * sizeof(Elem) < max_size_in_bytes
+ ? data.size() * sizeof(Elem) : max_size_in_bytes
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename std::basic_string<Elem, Traits, Allocator>::iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new non-modifiable buffer that represents the given string.
+/**
+ * @returns <tt>const_buffer(data.data(), data.size() * sizeof(Elem))</tt>.
+ *
+ * @note The buffer is invalidated by any non-const operation called on the
+ * given string object.
+ */
+template <typename Elem, typename Traits, typename Allocator>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ const std::basic_string<Elem, Traits, Allocator>& data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(), data.size() * sizeof(Elem)
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename std::basic_string<Elem, Traits, Allocator>::const_iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new non-modifiable buffer that represents the given string.
+/**
+ * @returns A const_buffer value equivalent to:
+ * @code const_buffer(
+ * data.data(),
+ * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
+ *
+ * @note The buffer is invalidated by any non-const operation called on the
+ * given string object.
+ */
+template <typename Elem, typename Traits, typename Allocator>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ const std::basic_string<Elem, Traits, Allocator>& data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.data(),
+ data.size() * sizeof(Elem) < max_size_in_bytes
+ ? data.size() * sizeof(Elem) : max_size_in_bytes
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename std::basic_string<Elem, Traits, Allocator>::const_iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+#if defined(BOOST_ASIO_HAS_STRING_VIEW) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Create a new modifiable buffer that represents the given string_view.
+/**
+ * @returns <tt>mutable_buffer(data.size() ? &data[0] : 0,
+ * data.size() * sizeof(Elem))</tt>.
+ */
+template <typename Elem, typename Traits>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ basic_string_view<Elem, Traits> data) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
+ data.size() * sizeof(Elem)
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename basic_string_view<Elem, Traits>::iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+/// Create a new non-modifiable buffer that represents the given string.
+/**
+ * @returns A mutable_buffer value equivalent to:
+ * @code mutable_buffer(
+ * data.size() ? &data[0] : 0,
+ * min(data.size() * sizeof(Elem), max_size_in_bytes)); @endcode
+ */
+template <typename Elem, typename Traits>
+inline BOOST_ASIO_CONST_BUFFER buffer(
+ basic_string_view<Elem, Traits> data,
+ std::size_t max_size_in_bytes) BOOST_ASIO_NOEXCEPT
+{
+ return BOOST_ASIO_CONST_BUFFER(data.size() ? &data[0] : 0,
+ data.size() * sizeof(Elem) < max_size_in_bytes
+ ? data.size() * sizeof(Elem) : max_size_in_bytes
+#if defined(BOOST_ASIO_ENABLE_BUFFER_DEBUGGING)
+ , detail::buffer_debug_check<
+ typename basic_string_view<Elem, Traits>::iterator
+ >(data.begin())
+#endif // BOOST_ASIO_ENABLE_BUFFER_DEBUGGING
+ );
+}
+
+#endif // defined(BOOST_ASIO_HAS_STRING_VIEW)
+ // || defined(GENERATING_DOCUMENTATION)
+
+/*@}*/
+
+/// Adapt a basic_string to the DynamicBuffer requirements.
+/**
+ * Requires that <tt>sizeof(Elem) == 1</tt>.
+ */
+template <typename Elem, typename Traits, typename Allocator>
+class dynamic_string_buffer
+{
+public:
+ /// The type used to represent the input sequence as a list of buffers.
+ typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
+
+ /// The type used to represent the output sequence as a list of buffers.
+ typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
+
+ /// Construct a dynamic buffer from a string.
+ /**
+ * @param s The string to be used as backing storage for the dynamic buffer.
+ * Any existing data in the string is treated as the dynamic buffer's input
+ * sequence. The object stores a reference to the string and the user is
+ * responsible for ensuring that the string object remains valid until the
+ * dynamic_string_buffer object is destroyed.
+ *
+ * @param maximum_size Specifies a maximum size for the buffer, in bytes.
+ */
+ explicit dynamic_string_buffer(std::basic_string<Elem, Traits, Allocator>& s,
+ std::size_t maximum_size =
+ (std::numeric_limits<std::size_t>::max)()) BOOST_ASIO_NOEXCEPT
+ : string_(s),
+ size_(string_.size()),
+ max_size_(maximum_size)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move construct a dynamic buffer.
+ dynamic_string_buffer(dynamic_string_buffer&& other) BOOST_ASIO_NOEXCEPT
+ : string_(other.string_),
+ size_(other.size_),
+ max_size_(other.max_size_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Get the size of the input sequence.
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+ return size_;
+ }
+
+ /// Get the maximum size of the dynamic buffer.
+ /**
+ * @returns The allowed maximum of the sum of the sizes of the input sequence
+ * and output sequence.
+ */
+ std::size_t max_size() const BOOST_ASIO_NOEXCEPT
+ {
+ return max_size_;
+ }
+
+ /// Get the current capacity of the dynamic buffer.
+ /**
+ * @returns The current total capacity of the buffer, i.e. for both the input
+ * sequence and output sequence.
+ */
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
+ {
+ return string_.capacity();
+ }
+
+ /// Get a list of buffers that represents the input sequence.
+ /**
+ * @returns An object of type @c const_buffers_type that satisfies
+ * ConstBufferSequence requirements, representing the basic_string memory in
+ * input sequence.
+ *
+ * @note The returned object is invalidated by any @c dynamic_string_buffer
+ * or @c basic_string member function that modifies the input sequence or
+ * output sequence.
+ */
+ const_buffers_type data() const BOOST_ASIO_NOEXCEPT
+ {
+ return const_buffers_type(boost::asio::buffer(string_, size_));
+ }
+
+ /// Get a list of buffers that represents the output sequence, with the given
+ /// size.
+ /**
+ * Ensures that the output sequence can accommodate @c n bytes, resizing the
+ * basic_string object as necessary.
+ *
+ * @returns An object of type @c mutable_buffers_type that satisfies
+ * MutableBufferSequence requirements, representing basic_string memory
+ * at the start of the output sequence of size @c n.
+ *
+ * @throws std::length_error If <tt>size() + n > max_size()</tt>.
+ *
+ * @note The returned object is invalidated by any @c dynamic_string_buffer
+ * or @c basic_string member function that modifies the input sequence or
+ * output sequence.
+ */
+ mutable_buffers_type prepare(std::size_t n)
+ {
+ if (size () > max_size() || max_size() - size() < n)
+ {
+ std::length_error ex("dynamic_string_buffer too long");
+ boost::asio::detail::throw_exception(ex);
+ }
+
+ string_.resize(size_ + n);
+
+ return boost::asio::buffer(boost::asio::buffer(string_) + size_, n);
+ }
+
+ /// Move bytes from the output sequence to the input sequence.
+ /**
+ * @param n The number of bytes to append from the start of the output
+ * sequence to the end of the input sequence. The remainder of the output
+ * sequence is discarded.
+ *
+ * Requires a preceding call <tt>prepare(x)</tt> where <tt>x >= n</tt>, and
+ * no intervening operations that modify the input or output sequence.
+ *
+ * @note If @c n is greater than the size of the output sequence, the entire
+ * output sequence is moved to the input sequence and no error is issued.
+ */
+ void commit(std::size_t n)
+ {
+ size_ += (std::min)(n, string_.size() - size_);
+ string_.resize(size_);
+ }
+
+ /// Remove characters from the input sequence.
+ /**
+ * Removes @c n characters from the beginning of the input sequence.
+ *
+ * @note If @c n is greater than the size of the input sequence, the entire
+ * input sequence is consumed and no error is issued.
+ */
+ void consume(std::size_t n)
+ {
+ std::size_t consume_length = (std::min)(n, size_);
+ string_.erase(0, consume_length);
+ size_ -= consume_length;
+ }
+
+private:
+ std::basic_string<Elem, Traits, Allocator>& string_;
+ std::size_t size_;
+ const std::size_t max_size_;
+};
+
+/// Adapt a vector to the DynamicBuffer requirements.
+/**
+ * Requires that <tt>sizeof(Elem) == 1</tt>.
+ */
+template <typename Elem, typename Allocator>
+class dynamic_vector_buffer
+{
+public:
+ /// The type used to represent the input sequence as a list of buffers.
+ typedef BOOST_ASIO_CONST_BUFFER const_buffers_type;
+
+ /// The type used to represent the output sequence as a list of buffers.
+ typedef BOOST_ASIO_MUTABLE_BUFFER mutable_buffers_type;
+
+ /// Construct a dynamic buffer from a string.
+ /**
+ * @param v The vector to be used as backing storage for the dynamic buffer.
+ * Any existing data in the vector is treated as the dynamic buffer's input
+ * sequence. The object stores a reference to the vector and the user is
+ * responsible for ensuring that the vector object remains valid until the
+ * dynamic_vector_buffer object is destroyed.
+ *
+ * @param maximum_size Specifies a maximum size for the buffer, in bytes.
+ */
+ explicit dynamic_vector_buffer(std::vector<Elem, Allocator>& v,
+ std::size_t maximum_size =
+ (std::numeric_limits<std::size_t>::max)()) BOOST_ASIO_NOEXCEPT
+ : vector_(v),
+ size_(vector_.size()),
+ max_size_(maximum_size)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move construct a dynamic buffer.
+ dynamic_vector_buffer(dynamic_vector_buffer&& other) BOOST_ASIO_NOEXCEPT
+ : vector_(other.vector_),
+ size_(other.size_),
+ max_size_(other.max_size_)
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Get the size of the input sequence.
+ std::size_t size() const BOOST_ASIO_NOEXCEPT
+ {
+ return size_;
+ }
+
+ /// Get the maximum size of the dynamic buffer.
+ /**
+ * @returns The allowed maximum of the sum of the sizes of the input sequence
+ * and output sequence.
+ */
+ std::size_t max_size() const BOOST_ASIO_NOEXCEPT
+ {
+ return max_size_;
+ }
+
+ /// Get the current capacity of the dynamic buffer.
+ /**
+ * @returns The current total capacity of the buffer, i.e. for both the input
+ * sequence and output sequence.
+ */
+ std::size_t capacity() const BOOST_ASIO_NOEXCEPT
+ {
+ return vector_.capacity();
+ }
+
+ /// Get a list of buffers that represents the input sequence.
+ /**
+ * @returns An object of type @c const_buffers_type that satisfies
+ * ConstBufferSequence requirements, representing the basic_string memory in
+ * input sequence.
+ *
+ * @note The returned object is invalidated by any @c dynamic_vector_buffer
+ * or @c basic_string member function that modifies the input sequence or
+ * output sequence.
+ */
+ const_buffers_type data() const BOOST_ASIO_NOEXCEPT
+ {
+ return const_buffers_type(boost::asio::buffer(vector_, size_));
+ }
+
+ /// Get a list of buffers that represents the output sequence, with the given
+ /// size.
+ /**
+ * Ensures that the output sequence can accommodate @c n bytes, resizing the
+ * basic_string object as necessary.
+ *
+ * @returns An object of type @c mutable_buffers_type that satisfies
+ * MutableBufferSequence requirements, representing basic_string memory
+ * at the start of the output sequence of size @c n.
+ *
+ * @throws std::length_error If <tt>size() + n > max_size()</tt>.
+ *
+ * @note The returned object is invalidated by any @c dynamic_vector_buffer
+ * or @c basic_string member function that modifies the input sequence or
+ * output sequence.
+ */
+ mutable_buffers_type prepare(std::size_t n)
+ {
+ if (size () > max_size() || max_size() - size() < n)
+ {
+ std::length_error ex("dynamic_vector_buffer too long");
+ boost::asio::detail::throw_exception(ex);
+ }
+
+ vector_.resize(size_ + n);
+
+ return boost::asio::buffer(boost::asio::buffer(vector_) + size_, n);
+ }
+
+ /// Move bytes from the output sequence to the input sequence.
+ /**
+ * @param n The number of bytes to append from the start of the output
+ * sequence to the end of the input sequence. The remainder of the output
+ * sequence is discarded.
+ *
+ * Requires a preceding call <tt>prepare(x)</tt> where <tt>x >= n</tt>, and
+ * no intervening operations that modify the input or output sequence.
+ *
+ * @note If @c n is greater than the size of the output sequence, the entire
+ * output sequence is moved to the input sequence and no error is issued.
+ */
+ void commit(std::size_t n)
+ {
+ size_ += (std::min)(n, vector_.size() - size_);
+ vector_.resize(size_);
+ }
+
+ /// Remove characters from the input sequence.
+ /**
+ * Removes @c n characters from the beginning of the input sequence.
+ *
+ * @note If @c n is greater than the size of the input sequence, the entire
+ * input sequence is consumed and no error is issued.
+ */
+ void consume(std::size_t n)
+ {
+ std::size_t consume_length = (std::min)(n, size_);
+ vector_.erase(vector_.begin(), vector_.begin() + consume_length);
+ size_ -= consume_length;
+ }
+
+private:
+ std::vector<Elem, Allocator>& vector_;
+ std::size_t size_;
+ const std::size_t max_size_;
+};
+
+/** @defgroup dynamic_buffer boost::asio::dynamic_buffer
+ *
+ * @brief The boost::asio::dynamic_buffer function is used to create a
+ * dynamically resized buffer from a @c std::basic_string or @c std::vector.
+ */
+/*@{*/
+
+/// Create a new dynamic buffer that represents the given string.
+/**
+ * @returns <tt>dynamic_string_buffer<Elem, Traits, Allocator>(data)</tt>.
+ */
+template <typename Elem, typename Traits, typename Allocator>
+inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
+ std::basic_string<Elem, Traits, Allocator>& data) BOOST_ASIO_NOEXCEPT
+{
+ return dynamic_string_buffer<Elem, Traits, Allocator>(data);
+}
+
+/// Create a new dynamic buffer that represents the given string.
+/**
+ * @returns <tt>dynamic_string_buffer<Elem, Traits, Allocator>(data,
+ * max_size)</tt>.
+ */
+template <typename Elem, typename Traits, typename Allocator>
+inline dynamic_string_buffer<Elem, Traits, Allocator> dynamic_buffer(
+ std::basic_string<Elem, Traits, Allocator>& data,
+ std::size_t max_size) BOOST_ASIO_NOEXCEPT
+{
+ return dynamic_string_buffer<Elem, Traits, Allocator>(data, max_size);
+}
+
+/// Create a new dynamic buffer that represents the given vector.
+/**
+ * @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data)</tt>.
+ */
+template <typename Elem, typename Allocator>
+inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
+ std::vector<Elem, Allocator>& data) BOOST_ASIO_NOEXCEPT
+{
+ return dynamic_vector_buffer<Elem, Allocator>(data);
+}
+
+/// Create a new dynamic buffer that represents the given vector.
+/**
+ * @returns <tt>dynamic_vector_buffer<Elem, Allocator>(data, max_size)</tt>.
+ */
+template <typename Elem, typename Allocator>
+inline dynamic_vector_buffer<Elem, Allocator> dynamic_buffer(
+ std::vector<Elem, Allocator>& data,
+ std::size_t max_size) BOOST_ASIO_NOEXCEPT
+{
+ return dynamic_vector_buffer<Elem, Allocator>(data, max_size);
+}
+
+/*@}*/
+
+/** @defgroup buffer_copy boost::asio::buffer_copy
+ *
+ * @brief The boost::asio::buffer_copy function is used to copy bytes from a
+ * source buffer (or buffer sequence) to a target buffer (or buffer sequence).
+ *
+ * The @c buffer_copy function is available in two forms:
+ *
+ * @li A 2-argument form: @c buffer_copy(target, source)
+ *
+ * @li A 3-argument form: @c buffer_copy(target, source, max_bytes_to_copy)
+ *
+ * Both forms return the number of bytes actually copied. The number of bytes
+ * copied is the lesser of:
+ *
+ * @li @c buffer_size(target)
+ *
+ * @li @c buffer_size(source)
+ *
+ * @li @c If specified, @c max_bytes_to_copy.
+ *
+ * This prevents buffer overflow, regardless of the buffer sizes used in the
+ * copy operation.
+ *
+ * Note that @ref buffer_copy is implemented in terms of @c memcpy, and
+ * consequently it cannot be used to copy between overlapping memory regions.
+ */
+/*@{*/
+
+namespace detail {
+
+inline std::size_t buffer_copy_1(const mutable_buffer& target,
+ const const_buffer& source)
+{
+ using namespace std; // For memcpy.
+ std::size_t target_size = target.size();
+ std::size_t source_size = source.size();
+ std::size_t n = target_size < source_size ? target_size : source_size;
+ if (n > 0)
+ memcpy(target.data(), source.data(), n);
+ return n;
+}
+
+template <typename TargetIterator, typename SourceIterator>
+inline std::size_t buffer_copy(one_buffer, one_buffer,
+ TargetIterator target_begin, TargetIterator,
+ SourceIterator source_begin, SourceIterator) BOOST_ASIO_NOEXCEPT
+{
+ return (buffer_copy_1)(*target_begin, *source_begin);
+}
+
+template <typename TargetIterator, typename SourceIterator>
+inline std::size_t buffer_copy(one_buffer, one_buffer,
+ TargetIterator target_begin, TargetIterator,
+ SourceIterator source_begin, SourceIterator,
+ std::size_t max_bytes_to_copy) BOOST_ASIO_NOEXCEPT
+{
+ return (buffer_copy_1)(*target_begin,
+ boost::asio::buffer(*source_begin, max_bytes_to_copy));
+}
+
+template <typename TargetIterator, typename SourceIterator>
+std::size_t buffer_copy(one_buffer, multiple_buffers,
+ TargetIterator target_begin, TargetIterator,
+ SourceIterator source_begin, SourceIterator source_end,
+ std::size_t max_bytes_to_copy
+ = (std::numeric_limits<std::size_t>::max)()) BOOST_ASIO_NOEXCEPT
+{
+ std::size_t total_bytes_copied = 0;
+ SourceIterator source_iter = source_begin;
+
+ for (mutable_buffer target_buffer(
+ boost::asio::buffer(*target_begin, max_bytes_to_copy));
+ target_buffer.size() && source_iter != source_end; ++source_iter)
+ {
+ const_buffer source_buffer(*source_iter);
+ std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
+ total_bytes_copied += bytes_copied;
+ target_buffer += bytes_copied;
+ }
+
+ return total_bytes_copied;
+}
+
+template <typename TargetIterator, typename SourceIterator>
+std::size_t buffer_copy(multiple_buffers, one_buffer,
+ TargetIterator target_begin, TargetIterator target_end,
+ SourceIterator source_begin, SourceIterator,
+ std::size_t max_bytes_to_copy
+ = (std::numeric_limits<std::size_t>::max)()) BOOST_ASIO_NOEXCEPT
+{
+ std::size_t total_bytes_copied = 0;
+ TargetIterator target_iter = target_begin;
+
+ for (const_buffer source_buffer(
+ boost::asio::buffer(*source_begin, max_bytes_to_copy));
+ source_buffer.size() && target_iter != target_end; ++target_iter)
+ {
+ mutable_buffer target_buffer(*target_iter);
+ std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
+ total_bytes_copied += bytes_copied;
+ source_buffer += bytes_copied;
+ }
+
+ return total_bytes_copied;
+}
+
+template <typename TargetIterator, typename SourceIterator>
+std::size_t buffer_copy(multiple_buffers, multiple_buffers,
+ TargetIterator target_begin, TargetIterator target_end,
+ SourceIterator source_begin, SourceIterator source_end) BOOST_ASIO_NOEXCEPT
+{
+ std::size_t total_bytes_copied = 0;
+
+ TargetIterator target_iter = target_begin;
+ std::size_t target_buffer_offset = 0;
+
+ SourceIterator source_iter = source_begin;
+ std::size_t source_buffer_offset = 0;
+
+ while (target_iter != target_end && source_iter != source_end)
+ {
+ mutable_buffer target_buffer =
+ mutable_buffer(*target_iter) + target_buffer_offset;
+
+ const_buffer source_buffer =
+ const_buffer(*source_iter) + source_buffer_offset;
+
+ std::size_t bytes_copied = (buffer_copy_1)(target_buffer, source_buffer);
+ total_bytes_copied += bytes_copied;
+
+ if (bytes_copied == target_buffer.size())
+ {
+ ++target_iter;
+ target_buffer_offset = 0;
+ }
+ else
+ target_buffer_offset += bytes_copied;
+
+ if (bytes_copied == source_buffer.size())
+ {
+ ++source_iter;
+ source_buffer_offset = 0;
+ }
+ else
+ source_buffer_offset += bytes_copied;
+ }
+
+ return total_bytes_copied;
+}
+
+template <typename TargetIterator, typename SourceIterator>
+std::size_t buffer_copy(multiple_buffers, multiple_buffers,
+ TargetIterator target_begin, TargetIterator target_end,
+ SourceIterator source_begin, SourceIterator source_end,
+ std::size_t max_bytes_to_copy) BOOST_ASIO_NOEXCEPT
+{
+ std::size_t total_bytes_copied = 0;
+
+ TargetIterator target_iter = target_begin;
+ std::size_t target_buffer_offset = 0;
+
+ SourceIterator source_iter = source_begin;
+ std::size_t source_buffer_offset = 0;
+
+ while (total_bytes_copied != max_bytes_to_copy
+ && target_iter != target_end && source_iter != source_end)
+ {
+ mutable_buffer target_buffer =
+ mutable_buffer(*target_iter) + target_buffer_offset;
+
+ const_buffer source_buffer =
+ const_buffer(*source_iter) + source_buffer_offset;
+
+ std::size_t bytes_copied = (buffer_copy_1)(
+ target_buffer, boost::asio::buffer(source_buffer,
+ max_bytes_to_copy - total_bytes_copied));
+ total_bytes_copied += bytes_copied;
+
+ if (bytes_copied == target_buffer.size())
+ {
+ ++target_iter;
+ target_buffer_offset = 0;
+ }
+ else
+ target_buffer_offset += bytes_copied;
+
+ if (bytes_copied == source_buffer.size())
+ {
+ ++source_iter;
+ source_buffer_offset = 0;
+ }
+ else
+ source_buffer_offset += bytes_copied;
+ }
+
+ return total_bytes_copied;
+}
+
+} // namespace detail
+
+/// Copies bytes from a source buffer sequence to a target buffer sequence.
+/**
+ * @param target A modifiable buffer sequence representing the memory regions to
+ * which the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer sequence representing the memory
+ * regions from which the bytes will be copied.
+ *
+ * @returns The number of bytes copied.
+ *
+ * @note The number of bytes copied is the lesser of:
+ *
+ * @li @c buffer_size(target)
+ *
+ * @li @c buffer_size(source)
+ *
+ * This function is implemented in terms of @c memcpy, and consequently it
+ * cannot be used to copy between overlapping memory regions.
+ */
+template <typename MutableBufferSequence, typename ConstBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const ConstBufferSequence& source) BOOST_ASIO_NOEXCEPT
+{
+ return detail::buffer_copy(
+ detail::buffer_sequence_cardinality<MutableBufferSequence>(),
+ detail::buffer_sequence_cardinality<ConstBufferSequence>(),
+ boost::asio::buffer_sequence_begin(target),
+ boost::asio::buffer_sequence_end(target),
+ boost::asio::buffer_sequence_begin(source),
+ boost::asio::buffer_sequence_end(source));
+}
+
+/// Copies a limited number of bytes from a source buffer sequence to a target
+/// buffer sequence.
+/**
+ * @param target A modifiable buffer sequence representing the memory regions to
+ * which the bytes will be copied.
+ *
+ * @param source A non-modifiable buffer sequence representing the memory
+ * regions from which the bytes will be copied.
+ *
+ * @param max_bytes_to_copy The maximum number of bytes to be copied.
+ *
+ * @returns The number of bytes copied.
+ *
+ * @note The number of bytes copied is the lesser of:
+ *
+ * @li @c buffer_size(target)
+ *
+ * @li @c buffer_size(source)
+ *
+ * @li @c max_bytes_to_copy
+ *
+ * This function is implemented in terms of @c memcpy, and consequently it
+ * cannot be used to copy between overlapping memory regions.
+ */
+template <typename MutableBufferSequence, typename ConstBufferSequence>
+inline std::size_t buffer_copy(const MutableBufferSequence& target,
+ const ConstBufferSequence& source,
+ std::size_t max_bytes_to_copy) BOOST_ASIO_NOEXCEPT
+{
+ return detail::buffer_copy(
+ detail::buffer_sequence_cardinality<MutableBufferSequence>(),
+ detail::buffer_sequence_cardinality<ConstBufferSequence>(),
+ boost::asio::buffer_sequence_begin(target),
+ boost::asio::buffer_sequence_end(target),
+ boost::asio::buffer_sequence_begin(source),
+ boost::asio::buffer_sequence_end(source), max_bytes_to_copy);
+}
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+#include <boost/asio/detail/is_buffer_sequence.hpp>
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// Trait to determine whether a type satisfies the MutableBufferSequence
+/// requirements.
+template <typename T>
+struct is_mutable_buffer_sequence
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : boost::asio::detail::is_buffer_sequence<T, mutable_buffer>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+/// Trait to determine whether a type satisfies the ConstBufferSequence
+/// requirements.
+template <typename T>
+struct is_const_buffer_sequence
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : boost::asio::detail::is_buffer_sequence<T, const_buffer>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+/// Trait to determine whether a type satisfies the DynamicBuffer requirements.
+template <typename T>
+struct is_dynamic_buffer
+#if defined(GENERATING_DOCUMENTATION)
+ : integral_constant<bool, automatically_determined>
+#else // defined(GENERATING_DOCUMENTATION)
+ : boost::asio::detail::is_dynamic_buffer<T>
+#endif // defined(GENERATING_DOCUMENTATION)
+{
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_BUFFER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/buffered_read_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream.hpp
index 28df23908d2..28df23908d2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/buffered_read_stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/buffered_read_stream_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream_fwd.hpp
index d6b0ad14be4..d6b0ad14be4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/buffered_read_stream_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/buffered_read_stream_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/buffered_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_stream.hpp
index ada06e1d9cc..ada06e1d9cc 100644
--- a/src/third_party/boost-1.68.0/boost/asio/buffered_stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/buffered_stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/buffered_stream_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_stream_fwd.hpp
index a477f2be65e..a477f2be65e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/buffered_stream_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/buffered_stream_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/buffered_write_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream.hpp
index 3eacd5f1509..3eacd5f1509 100644
--- a/src/third_party/boost-1.68.0/boost/asio/buffered_write_stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/buffered_write_stream_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream_fwd.hpp
index 68ab9a4d31b..68ab9a4d31b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/buffered_write_stream_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/buffered_write_stream_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/buffers_iterator.hpp b/src/third_party/boost-1.69.0/boost/asio/buffers_iterator.hpp
index 9de385128f6..9de385128f6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/buffers_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/buffers_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/completion_condition.hpp b/src/third_party/boost-1.69.0/boost/asio/completion_condition.hpp
index c49517ba4f4..c49517ba4f4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/completion_condition.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/completion_condition.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/connect.hpp b/src/third_party/boost-1.69.0/boost/asio/connect.hpp
new file mode 100644
index 00000000000..03296885dd3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/connect.hpp
@@ -0,0 +1,1062 @@
+//
+// connect.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_CONNECT_HPP
+#define BOOST_ASIO_CONNECT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/basic_socket.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ char (&has_iterator_helper(...))[2];
+
+ template <typename T>
+ char has_iterator_helper(T*, typename T::iterator* = 0);
+
+ template <typename T>
+ struct has_iterator_typedef
+ {
+ enum { value = (sizeof((has_iterator_helper)((T*)(0))) == 1) };
+ };
+} // namespace detail
+
+/// Type trait used to determine whether a type is an endpoint sequence that can
+/// be used with with @c connect and @c async_connect.
+template <typename T>
+struct is_endpoint_sequence
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// The value member is true if the type may be used as an endpoint sequence.
+ static const bool value;
+#else
+ enum
+ {
+ value = detail::has_iterator_typedef<T>::value
+ };
+#endif
+};
+
+/**
+ * @defgroup connect boost::asio::connect
+ *
+ * @brief The @c connect function is a composed operation that establishes a
+ * socket connection by trying each endpoint in a sequence.
+ */
+/*@{*/
+
+/// Establishes a socket connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param endpoints A sequence of endpoints.
+ *
+ * @returns The successfully connected endpoint.
+ *
+ * @throws boost::system::system_error Thrown on failure. If the sequence is
+ * empty, the associated @c error_code is boost::asio::error::not_found.
+ * Otherwise, contains the error from the last connection attempt.
+ *
+ * @par Example
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(io_context);
+ * boost::asio::connect(s, r.resolve(q)); @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename EndpointSequence>
+typename Protocol::endpoint connect(
+ basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ const EndpointSequence& endpoints,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type* = 0);
+
+/// Establishes a socket connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param endpoints A sequence of endpoints.
+ *
+ * @param ec Set to indicate what error occurred, if any. If the sequence is
+ * empty, set to boost::asio::error::not_found. Otherwise, contains the error
+ * from the last connection attempt.
+ *
+ * @returns On success, the successfully connected endpoint. Otherwise, a
+ * default-constructed endpoint.
+ *
+ * @par Example
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(io_context);
+ * boost::system::error_code ec;
+ * boost::asio::connect(s, r.resolve(q), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * } @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename EndpointSequence>
+typename Protocol::endpoint connect(
+ basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ const EndpointSequence& endpoints, boost::system::error_code& ec,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+/// (Deprecated: Use range overload.) Establishes a socket connection by trying
+/// each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @returns On success, an iterator denoting the successfully connected
+ * endpoint. Otherwise, the end iterator.
+ *
+ * @throws boost::system::system_error Thrown on failure. If the sequence is
+ * empty, the associated @c error_code is boost::asio::error::not_found.
+ * Otherwise, contains the error from the last connection attempt.
+ *
+ * @note This overload assumes that a default constructed object of type @c
+ * Iterator represents the end of the sequence. This is a valid assumption for
+ * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s, Iterator begin,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+
+/// (Deprecated: Use range overload.) Establishes a socket connection by trying
+/// each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param ec Set to indicate what error occurred, if any. If the sequence is
+ * empty, set to boost::asio::error::not_found. Otherwise, contains the error
+ * from the last connection attempt.
+ *
+ * @returns On success, an iterator denoting the successfully connected
+ * endpoint. Otherwise, the end iterator.
+ *
+ * @note This overload assumes that a default constructed object of type @c
+ * Iterator represents the end of the sequence. This is a valid assumption for
+ * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ Iterator begin, boost::system::error_code& ec,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// Establishes a socket connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param end An iterator pointing to the end of a sequence of endpoints.
+ *
+ * @returns An iterator denoting the successfully connected endpoint.
+ *
+ * @throws boost::system::system_error Thrown on failure. If the sequence is
+ * empty, the associated @c error_code is boost::asio::error::not_found.
+ * Otherwise, contains the error from the last connection attempt.
+ *
+ * @par Example
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::resolver::results_type e = r.resolve(q);
+ * tcp::socket s(io_context);
+ * boost::asio::connect(s, e.begin(), e.end()); @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ Iterator begin, Iterator end);
+
+/// Establishes a socket connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param end An iterator pointing to the end of a sequence of endpoints.
+ *
+ * @param ec Set to indicate what error occurred, if any. If the sequence is
+ * empty, set to boost::asio::error::not_found. Otherwise, contains the error
+ * from the last connection attempt.
+ *
+ * @returns On success, an iterator denoting the successfully connected
+ * endpoint. Otherwise, the end iterator.
+ *
+ * @par Example
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::resolver::results_type e = r.resolve(q);
+ * tcp::socket s(io_context);
+ * boost::system::error_code ec;
+ * boost::asio::connect(s, e.begin(), e.end(), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * } @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator>
+Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ Iterator begin, Iterator end, boost::system::error_code& ec);
+
+/// Establishes a socket connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param endpoints A sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @returns The successfully connected endpoint.
+ *
+ * @throws boost::system::system_error Thrown on failure. If the sequence is
+ * empty, the associated @c error_code is boost::asio::error::not_found.
+ * Otherwise, contains the error from the last connection attempt.
+ *
+ * @par Example
+ * The following connect condition function object can be used to output
+ * information about the individual connection attempts:
+ * @code struct my_connect_condition
+ * {
+ * bool operator()(
+ * const boost::system::error_code& ec,
+ * const::tcp::endpoint& next)
+ * {
+ * if (ec) std::cout << "Error: " << ec.message() << std::endl;
+ * std::cout << "Trying: " << next << std::endl;
+ * return true;
+ * }
+ * }; @endcode
+ * It would be used with the boost::asio::connect function as follows:
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(io_context);
+ * tcp::endpoint e = boost::asio::connect(s,
+ * r.resolve(q), my_connect_condition());
+ * std::cout << "Connected to: " << e << std::endl; @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename EndpointSequence, typename ConnectCondition>
+typename Protocol::endpoint connect(
+ basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ const EndpointSequence& endpoints, ConnectCondition connect_condition,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type* = 0);
+
+/// Establishes a socket connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param endpoints A sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @param ec Set to indicate what error occurred, if any. If the sequence is
+ * empty, set to boost::asio::error::not_found. Otherwise, contains the error
+ * from the last connection attempt.
+ *
+ * @returns On success, the successfully connected endpoint. Otherwise, a
+ * default-constructed endpoint.
+ *
+ * @par Example
+ * The following connect condition function object can be used to output
+ * information about the individual connection attempts:
+ * @code struct my_connect_condition
+ * {
+ * bool operator()(
+ * const boost::system::error_code& ec,
+ * const::tcp::endpoint& next)
+ * {
+ * if (ec) std::cout << "Error: " << ec.message() << std::endl;
+ * std::cout << "Trying: " << next << std::endl;
+ * return true;
+ * }
+ * }; @endcode
+ * It would be used with the boost::asio::connect function as follows:
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(io_context);
+ * boost::system::error_code ec;
+ * tcp::endpoint e = boost::asio::connect(s,
+ * r.resolve(q), my_connect_condition(), ec);
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * else
+ * {
+ * std::cout << "Connected to: " << e << std::endl;
+ * } @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename EndpointSequence, typename ConnectCondition>
+typename Protocol::endpoint connect(
+ basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ const EndpointSequence& endpoints, ConnectCondition connect_condition,
+ boost::system::error_code& ec,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+/// (Deprecated: Use range overload.) Establishes a socket connection by trying
+/// each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @returns On success, an iterator denoting the successfully connected
+ * endpoint. Otherwise, the end iterator.
+ *
+ * @throws boost::system::system_error Thrown on failure. If the sequence is
+ * empty, the associated @c error_code is boost::asio::error::not_found.
+ * Otherwise, contains the error from the last connection attempt.
+ *
+ * @note This overload assumes that a default constructed object of type @c
+ * Iterator represents the end of the sequence. This is a valid assumption for
+ * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ Iterator begin, ConnectCondition connect_condition,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+
+/// (Deprecated: Use range overload.) Establishes a socket connection by trying
+/// each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @param ec Set to indicate what error occurred, if any. If the sequence is
+ * empty, set to boost::asio::error::not_found. Otherwise, contains the error
+ * from the last connection attempt.
+ *
+ * @returns On success, an iterator denoting the successfully connected
+ * endpoint. Otherwise, the end iterator.
+ *
+ * @note This overload assumes that a default constructed object of type @c
+ * Iterator represents the end of the sequence. This is a valid assumption for
+ * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s, Iterator begin,
+ ConnectCondition connect_condition, boost::system::error_code& ec,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// Establishes a socket connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param end An iterator pointing to the end of a sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @returns An iterator denoting the successfully connected endpoint.
+ *
+ * @throws boost::system::system_error Thrown on failure. If the sequence is
+ * empty, the associated @c error_code is boost::asio::error::not_found.
+ * Otherwise, contains the error from the last connection attempt.
+ *
+ * @par Example
+ * The following connect condition function object can be used to output
+ * information about the individual connection attempts:
+ * @code struct my_connect_condition
+ * {
+ * bool operator()(
+ * const boost::system::error_code& ec,
+ * const::tcp::endpoint& next)
+ * {
+ * if (ec) std::cout << "Error: " << ec.message() << std::endl;
+ * std::cout << "Trying: " << next << std::endl;
+ * return true;
+ * }
+ * }; @endcode
+ * It would be used with the boost::asio::connect function as follows:
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::resolver::results_type e = r.resolve(q);
+ * tcp::socket s(io_context);
+ * tcp::resolver::results_type::iterator i = boost::asio::connect(
+ * s, e.begin(), e.end(), my_connect_condition());
+ * std::cout << "Connected to: " << i->endpoint() << std::endl; @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s, Iterator begin,
+ Iterator end, ConnectCondition connect_condition);
+
+/// Establishes a socket connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c connect member
+ * function, once for each endpoint in the sequence, until a connection is
+ * successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param end An iterator pointing to the end of a sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @param ec Set to indicate what error occurred, if any. If the sequence is
+ * empty, set to boost::asio::error::not_found. Otherwise, contains the error
+ * from the last connection attempt.
+ *
+ * @returns On success, an iterator denoting the successfully connected
+ * endpoint. Otherwise, the end iterator.
+ *
+ * @par Example
+ * The following connect condition function object can be used to output
+ * information about the individual connection attempts:
+ * @code struct my_connect_condition
+ * {
+ * bool operator()(
+ * const boost::system::error_code& ec,
+ * const::tcp::endpoint& next)
+ * {
+ * if (ec) std::cout << "Error: " << ec.message() << std::endl;
+ * std::cout << "Trying: " << next << std::endl;
+ * return true;
+ * }
+ * }; @endcode
+ * It would be used with the boost::asio::connect function as follows:
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::resolver::results_type e = r.resolve(q);
+ * tcp::socket s(io_context);
+ * boost::system::error_code ec;
+ * tcp::resolver::results_type::iterator i = boost::asio::connect(
+ * s, e.begin(), e.end(), my_connect_condition());
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * else
+ * {
+ * std::cout << "Connected to: " << i->endpoint() << std::endl;
+ * } @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename Iterator, typename ConnectCondition>
+Iterator connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ Iterator begin, Iterator end, ConnectCondition connect_condition,
+ boost::system::error_code& ec);
+
+/*@}*/
+
+/**
+ * @defgroup async_connect boost::asio::async_connect
+ *
+ * @brief The @c async_connect function is a composed asynchronous operation
+ * that establishes a socket connection by trying each endpoint in a sequence.
+ */
+/*@{*/
+
+/// Asynchronously establishes a socket connection by trying each endpoint in a
+/// sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c async_connect
+ * member function, once for each endpoint in the sequence, until a connection
+ * is successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param endpoints A sequence of endpoints.
+ *
+ * @param handler The handler to be called when the connect operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * // Result of operation. if the sequence is empty, set to
+ * // boost::asio::error::not_found. Otherwise, contains the
+ * // error from the last connection attempt.
+ * const boost::system::error_code& error,
+ *
+ * // On success, the successfully connected endpoint.
+ * // Otherwise, a default-constructed endpoint.
+ * const typename Protocol::endpoint& endpoint
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(io_context);
+ *
+ * // ...
+ *
+ * r.async_resolve(q, resolve_handler);
+ *
+ * // ...
+ *
+ * void resolve_handler(
+ * const boost::system::error_code& ec,
+ * tcp::resolver::results_type results)
+ * {
+ * if (!ec)
+ * {
+ * boost::asio::async_connect(s, results, connect_handler);
+ * }
+ * }
+ *
+ * // ...
+ *
+ * void connect_handler(
+ * const boost::system::error_code& ec,
+ * const tcp::endpoint& endpoint)
+ * {
+ * // ...
+ * } @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename EndpointSequence, typename RangeConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
+ void (boost::system::error_code, typename Protocol::endpoint))
+async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ const EndpointSequence& endpoints,
+ BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+/// (Deprecated: Use range overload.) Asynchronously establishes a socket
+/// connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c async_connect
+ * member function, once for each endpoint in the sequence, until a connection
+ * is successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param handler The handler to be called when the connect operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * // Result of operation. if the sequence is empty, set to
+ * // boost::asio::error::not_found. Otherwise, contains the
+ * // error from the last connection attempt.
+ * const boost::system::error_code& error,
+ *
+ * // On success, an iterator denoting the successfully
+ * // connected endpoint. Otherwise, the end iterator.
+ * Iterator iterator
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note This overload assumes that a default constructed object of type @c
+ * Iterator represents the end of the sequence. This is a valid assumption for
+ * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename Iterator, typename IteratorConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ Iterator begin, BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// Asynchronously establishes a socket connection by trying each endpoint in a
+/// sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c async_connect
+ * member function, once for each endpoint in the sequence, until a connection
+ * is successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param end An iterator pointing to the end of a sequence of endpoints.
+ *
+ * @param handler The handler to be called when the connect operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * // Result of operation. if the sequence is empty, set to
+ * // boost::asio::error::not_found. Otherwise, contains the
+ * // error from the last connection attempt.
+ * const boost::system::error_code& error,
+ *
+ * // On success, an iterator denoting the successfully
+ * // connected endpoint. Otherwise, the end iterator.
+ * Iterator iterator
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * @code std::vector<tcp::endpoint> endpoints = ...;
+ * tcp::socket s(io_context);
+ * boost::asio::async_connect(s,
+ * endpoints.begin(), endpoints.end(),
+ * connect_handler);
+ *
+ * // ...
+ *
+ * void connect_handler(
+ * const boost::system::error_code& ec,
+ * std::vector<tcp::endpoint>::iterator i)
+ * {
+ * // ...
+ * } @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM,
+ typename Iterator, typename IteratorConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ Iterator begin, Iterator end,
+ BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler);
+
+/// Asynchronously establishes a socket connection by trying each endpoint in a
+/// sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c async_connect
+ * member function, once for each endpoint in the sequence, until a connection
+ * is successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param endpoints A sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @param handler The handler to be called when the connect operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * // Result of operation. if the sequence is empty, set to
+ * // boost::asio::error::not_found. Otherwise, contains the
+ * // error from the last connection attempt.
+ * const boost::system::error_code& error,
+ *
+ * // On success, an iterator denoting the successfully
+ * // connected endpoint. Otherwise, the end iterator.
+ * Iterator iterator
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * The following connect condition function object can be used to output
+ * information about the individual connection attempts:
+ * @code struct my_connect_condition
+ * {
+ * bool operator()(
+ * const boost::system::error_code& ec,
+ * const::tcp::endpoint& next)
+ * {
+ * if (ec) std::cout << "Error: " << ec.message() << std::endl;
+ * std::cout << "Trying: " << next << std::endl;
+ * return true;
+ * }
+ * }; @endcode
+ * It would be used with the boost::asio::connect function as follows:
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(io_context);
+ *
+ * // ...
+ *
+ * r.async_resolve(q, resolve_handler);
+ *
+ * // ...
+ *
+ * void resolve_handler(
+ * const boost::system::error_code& ec,
+ * tcp::resolver::results_type results)
+ * {
+ * if (!ec)
+ * {
+ * boost::asio::async_connect(s, results,
+ * my_connect_condition(),
+ * connect_handler);
+ * }
+ * }
+ *
+ * // ...
+ *
+ * void connect_handler(
+ * const boost::system::error_code& ec,
+ * const tcp::endpoint& endpoint)
+ * {
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * else
+ * {
+ * std::cout << "Connected to: " << endpoint << std::endl;
+ * }
+ * } @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename EndpointSequence,
+ typename ConnectCondition, typename RangeConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(RangeConnectHandler,
+ void (boost::system::error_code, typename Protocol::endpoint))
+async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ const EndpointSequence& endpoints, ConnectCondition connect_condition,
+ BOOST_ASIO_MOVE_ARG(RangeConnectHandler) handler,
+ typename enable_if<is_endpoint_sequence<
+ EndpointSequence>::value>::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+/// (Deprecated: Use range overload.) Asynchronously establishes a socket
+/// connection by trying each endpoint in a sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c async_connect
+ * member function, once for each endpoint in the sequence, until a connection
+ * is successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @param handler The handler to be called when the connect operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * // Result of operation. if the sequence is empty, set to
+ * // boost::asio::error::not_found. Otherwise, contains the
+ * // error from the last connection attempt.
+ * const boost::system::error_code& error,
+ *
+ * // On success, an iterator denoting the successfully
+ * // connected endpoint. Otherwise, the end iterator.
+ * Iterator iterator
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note This overload assumes that a default constructed object of type @c
+ * Iterator represents the end of the sequence. This is a valid assumption for
+ * iterator types such as @c boost::asio::ip::tcp::resolver::iterator.
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s, Iterator begin,
+ ConnectCondition connect_condition,
+ BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler,
+ typename enable_if<!is_endpoint_sequence<Iterator>::value>::type* = 0);
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+/// Asynchronously establishes a socket connection by trying each endpoint in a
+/// sequence.
+/**
+ * This function attempts to connect a socket to one of a sequence of
+ * endpoints. It does this by repeated calls to the socket's @c async_connect
+ * member function, once for each endpoint in the sequence, until a connection
+ * is successfully established.
+ *
+ * @param s The socket to be connected. If the socket is already open, it will
+ * be closed.
+ *
+ * @param begin An iterator pointing to the start of a sequence of endpoints.
+ *
+ * @param end An iterator pointing to the end of a sequence of endpoints.
+ *
+ * @param connect_condition A function object that is called prior to each
+ * connection attempt. The signature of the function object must be:
+ * @code bool connect_condition(
+ * const boost::system::error_code& ec,
+ * const typename Protocol::endpoint& next); @endcode
+ * The @c ec parameter contains the result from the most recent connect
+ * operation. Before the first connection attempt, @c ec is always set to
+ * indicate success. The @c next parameter is the next endpoint to be tried.
+ * The function object should return true if the next endpoint should be tried,
+ * and false if it should be skipped.
+ *
+ * @param handler The handler to be called when the connect operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * // Result of operation. if the sequence is empty, set to
+ * // boost::asio::error::not_found. Otherwise, contains the
+ * // error from the last connection attempt.
+ * const boost::system::error_code& error,
+ *
+ * // On success, an iterator denoting the successfully
+ * // connected endpoint. Otherwise, the end iterator.
+ * Iterator iterator
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * The following connect condition function object can be used to output
+ * information about the individual connection attempts:
+ * @code struct my_connect_condition
+ * {
+ * bool operator()(
+ * const boost::system::error_code& ec,
+ * const::tcp::endpoint& next)
+ * {
+ * if (ec) std::cout << "Error: " << ec.message() << std::endl;
+ * std::cout << "Trying: " << next << std::endl;
+ * return true;
+ * }
+ * }; @endcode
+ * It would be used with the boost::asio::connect function as follows:
+ * @code tcp::resolver r(io_context);
+ * tcp::resolver::query q("host", "service");
+ * tcp::socket s(io_context);
+ *
+ * // ...
+ *
+ * r.async_resolve(q, resolve_handler);
+ *
+ * // ...
+ *
+ * void resolve_handler(
+ * const boost::system::error_code& ec,
+ * tcp::resolver::iterator i)
+ * {
+ * if (!ec)
+ * {
+ * tcp::resolver::iterator end;
+ * boost::asio::async_connect(s, i, end,
+ * my_connect_condition(),
+ * connect_handler);
+ * }
+ * }
+ *
+ * // ...
+ *
+ * void connect_handler(
+ * const boost::system::error_code& ec,
+ * tcp::resolver::iterator i)
+ * {
+ * if (ec)
+ * {
+ * // An error occurred.
+ * }
+ * else
+ * {
+ * std::cout << "Connected to: " << i->endpoint() << std::endl;
+ * }
+ * } @endcode
+ */
+template <typename Protocol BOOST_ASIO_SVC_TPARAM, typename Iterator,
+ typename ConnectCondition, typename IteratorConnectHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(IteratorConnectHandler,
+ void (boost::system::error_code, Iterator))
+async_connect(basic_socket<Protocol BOOST_ASIO_SVC_TARG>& s,
+ Iterator begin, Iterator end, ConnectCondition connect_condition,
+ BOOST_ASIO_MOVE_ARG(IteratorConnectHandler) handler);
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/connect.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/asio/coroutine.hpp b/src/third_party/boost-1.69.0/boost/asio/coroutine.hpp
index b195b12ed83..b195b12ed83 100644
--- a/src/third_party/boost-1.68.0/boost/asio/coroutine.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/coroutine.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/datagram_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/datagram_socket_service.hpp
index 816433ba783..816433ba783 100644
--- a/src/third_party/boost-1.68.0/boost/asio/datagram_socket_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/datagram_socket_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/deadline_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/deadline_timer.hpp
index 3a020e8b9a7..3a020e8b9a7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/deadline_timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/deadline_timer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/deadline_timer_service.hpp b/src/third_party/boost-1.69.0/boost/asio/deadline_timer_service.hpp
index 036378f93bd..036378f93bd 100644
--- a/src/third_party/boost-1.68.0/boost/asio/deadline_timer_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/deadline_timer_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/defer.hpp b/src/third_party/boost-1.69.0/boost/asio/defer.hpp
index 2eaf2d01c66..2eaf2d01c66 100644
--- a/src/third_party/boost-1.68.0/boost/asio/defer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/defer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/array.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/array.hpp
index 238118e3a66..238118e3a66 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/array.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/array_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/array_fwd.hpp
index 82f357785d8..82f357785d8 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/array_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/array_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/assert.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/assert.hpp
index fe306ce6140..fe306ce6140 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/assert.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/assert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/atomic_count.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/atomic_count.hpp
index 78cd0fb3332..78cd0fb3332 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/atomic_count.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/atomic_count.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/base_from_completion_cond.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/base_from_completion_cond.hpp
index 88f167f3f40..88f167f3f40 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/base_from_completion_cond.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/base_from_completion_cond.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/bind_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/bind_handler.hpp
index 39f1b29bcd1..39f1b29bcd1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/bind_handler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/bind_handler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/buffer_resize_guard.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/buffer_resize_guard.hpp
index ad07f72c04e..ad07f72c04e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/buffer_resize_guard.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/buffer_resize_guard.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/buffer_sequence_adapter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/buffer_sequence_adapter.hpp
index 5ba55d266d1..5ba55d266d1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/buffer_sequence_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/buffer_sequence_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/buffered_stream_storage.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/buffered_stream_storage.hpp
index 3b9ca404c46..3b9ca404c46 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/buffered_stream_storage.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/buffered_stream_storage.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/call_stack.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/call_stack.hpp
index 34f4de607f5..34f4de607f5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/call_stack.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/call_stack.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/chrono.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/chrono.hpp
index 044f12c6c33..044f12c6c33 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/chrono.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/chrono.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/chrono_time_traits.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/chrono_time_traits.hpp
index 256389acaf1..256389acaf1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/chrono_time_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/chrono_time_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/completion_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/completion_handler.hpp
index e856a86f5ab..e856a86f5ab 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/completion_handler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/completion_handler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/concurrency_hint.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/concurrency_hint.hpp
index c11b7f6109a..c11b7f6109a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/concurrency_hint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/concurrency_hint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/conditionally_enabled_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_event.hpp
index 9319c87538f..9319c87538f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/conditionally_enabled_event.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_event.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/conditionally_enabled_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_mutex.hpp
index ab4ef48afc4..ab4ef48afc4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/conditionally_enabled_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/conditionally_enabled_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/config.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/config.hpp
new file mode 100644
index 00000000000..2453425315d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/config.hpp
@@ -0,0 +1,1454 @@
+//
+// detail/config.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_DETAIL_CONFIG_HPP
+#define BOOST_ASIO_DETAIL_CONFIG_HPP
+
+#if defined(BOOST_ASIO_STANDALONE)
+# define BOOST_ASIO_DISABLE_BOOST_ARRAY 1
+# define BOOST_ASIO_DISABLE_BOOST_ASSERT 1
+# define BOOST_ASIO_DISABLE_BOOST_BIND 1
+# define BOOST_ASIO_DISABLE_BOOST_CHRONO 1
+# define BOOST_ASIO_DISABLE_BOOST_DATE_TIME 1
+# define BOOST_ASIO_DISABLE_BOOST_LIMITS 1
+# define BOOST_ASIO_DISABLE_BOOST_REGEX 1
+# define BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT 1
+# define BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION 1
+# define BOOST_ASIO_DISABLE_BOOST_WORKAROUND 1
+#else // defined(BOOST_ASIO_STANDALONE)
+# include <boost/config.hpp>
+# include <boost/version.hpp>
+# define BOOST_ASIO_HAS_BOOST_CONFIG 1
+#endif // defined(BOOST_ASIO_STANDALONE)
+
+// Default to a header-only implementation. The user must specifically request
+// separate compilation by defining either BOOST_ASIO_SEPARATE_COMPILATION or
+// BOOST_ASIO_DYN_LINK (as a DLL/shared library implies separate compilation).
+#if !defined(BOOST_ASIO_HEADER_ONLY)
+# if !defined(BOOST_ASIO_SEPARATE_COMPILATION)
+# if !defined(BOOST_ASIO_DYN_LINK)
+# define BOOST_ASIO_HEADER_ONLY 1
+# endif // !defined(BOOST_ASIO_DYN_LINK)
+# endif // !defined(BOOST_ASIO_SEPARATE_COMPILATION)
+#endif // !defined(BOOST_ASIO_HEADER_ONLY)
+
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# define BOOST_ASIO_DECL inline
+#else // defined(BOOST_ASIO_HEADER_ONLY)
+# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
+// We need to import/export our code only if the user has specifically asked
+// for it by defining BOOST_ASIO_DYN_LINK.
+# if defined(BOOST_ASIO_DYN_LINK)
+// Export if this is our own source, otherwise import.
+# if defined(BOOST_ASIO_SOURCE)
+# define BOOST_ASIO_DECL __declspec(dllexport)
+# else // defined(BOOST_ASIO_SOURCE)
+# define BOOST_ASIO_DECL __declspec(dllimport)
+# endif // defined(BOOST_ASIO_SOURCE)
+# endif // defined(BOOST_ASIO_DYN_LINK)
+# endif // defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CODEGEARC__)
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+// If BOOST_ASIO_DECL isn't defined yet define it now.
+#if !defined(BOOST_ASIO_DECL)
+# define BOOST_ASIO_DECL
+#endif // !defined(BOOST_ASIO_DECL)
+
+// Microsoft Visual C++ detection.
+#if !defined(BOOST_ASIO_MSVC)
+# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
+# define BOOST_ASIO_MSVC BOOST_MSVC
+# elif defined(_MSC_VER) && (defined(__INTELLISENSE__) \
+ || (!defined(__MWERKS__) && !defined(__EDG_VERSION__)))
+# define BOOST_ASIO_MSVC _MSC_VER
+# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_MSVC)
+#endif // !defined(BOOST_ASIO_MSVC)
+
+// Clang / libc++ detection.
+#if defined(__clang__)
+# if (__cplusplus >= 201103)
+# if __has_include(<__config>)
+# include <__config>
+# if defined(_LIBCPP_VERSION)
+# define BOOST_ASIO_HAS_CLANG_LIBCXX 1
+# endif // defined(_LIBCPP_VERSION)
+# endif // __has_include(<__config>)
+# endif // (__cplusplus >= 201103)
+#endif // defined(__clang__)
+
+// Android platform detection.
+#if defined(__ANDROID__)
+# include <android/api-level.h>
+#endif // defined(__ANDROID__)
+
+// Support move construction and assignment on compilers known to allow it.
+#if !defined(BOOST_ASIO_HAS_MOVE)
+# if !defined(BOOST_ASIO_DISABLE_MOVE)
+# if defined(__clang__)
+# if __has_feature(__cxx_rvalue_references__)
+# define BOOST_ASIO_HAS_MOVE 1
+# endif // __has_feature(__cxx_rvalue_references__)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_MOVE 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_MOVE 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# if defined(__INTEL_CXX11_MODE__)
+# if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
+# define BOOST_ASIO_HAS_MOVE 1
+# endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500)
+# if defined(__ICL) && (__ICL >= 1500)
+# define BOOST_ASIO_HAS_MOVE 1
+# endif // defined(__ICL) && (__ICL >= 1500)
+# endif // defined(__INTEL_CXX11_MODE__)
+# endif // !defined(BOOST_ASIO_DISABLE_MOVE)
+#endif // !defined(BOOST_ASIO_HAS_MOVE)
+
+// If BOOST_ASIO_MOVE_CAST isn't defined, and move support is available, define
+// BOOST_ASIO_MOVE_ARG and BOOST_ASIO_MOVE_CAST to take advantage of rvalue
+// references and perfect forwarding.
+#if defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST)
+# define BOOST_ASIO_MOVE_ARG(type) type&&
+# define BOOST_ASIO_MOVE_ARG2(type1, type2) type1, type2&&
+# define BOOST_ASIO_MOVE_CAST(type) static_cast<type&&>
+# define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<type1, type2&&>
+#endif // defined(BOOST_ASIO_HAS_MOVE) && !defined(BOOST_ASIO_MOVE_CAST)
+
+// If BOOST_ASIO_MOVE_CAST still isn't defined, default to a C++03-compatible
+// implementation. Note that older g++ and MSVC versions don't like it when you
+// pass a non-member function through a const reference, so for most compilers
+// we'll play it safe and stick with the old approach of passing the handler by
+// value.
+#if !defined(BOOST_ASIO_MOVE_CAST)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
+# define BOOST_ASIO_MOVE_ARG(type) const type&
+# else // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
+# define BOOST_ASIO_MOVE_ARG(type) type
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)) || (__GNUC__ > 4)
+# elif defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1400)
+# define BOOST_ASIO_MOVE_ARG(type) const type&
+# else // (_MSC_VER >= 1400)
+# define BOOST_ASIO_MOVE_ARG(type) type
+# endif // (_MSC_VER >= 1400)
+# else
+# define BOOST_ASIO_MOVE_ARG(type) type
+# endif
+# define BOOST_ASIO_MOVE_CAST(type) static_cast<const type&>
+# define BOOST_ASIO_MOVE_CAST2(type1, type2) static_cast<const type1, type2&>
+#endif // !defined(BOOST_ASIO_MOVE_CAST)
+
+// Support variadic templates on compilers known to allow it.
+#if !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+# if !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
+# if defined(__clang__)
+# if __has_feature(__cxx_variadic_templates__)
+# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
+# endif // __has_feature(__cxx_variadic_templates__)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1900)
+# define BOOST_ASIO_HAS_VARIADIC_TEMPLATES 1
+# endif // (_MSC_VER >= 1900)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_VARIADIC_TEMPLATES)
+#endif // !defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+// Support deleted functions on compilers known to allow it.
+#if !defined(BOOST_ASIO_DELETED)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_DELETED = delete
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(__clang__)
+# if __has_feature(__cxx_deleted_functions__)
+# define BOOST_ASIO_DELETED = delete
+# endif // __has_feature(__cxx_deleted_functions__)
+# endif // defined(__clang__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1900)
+# define BOOST_ASIO_DELETED = delete
+# endif // (_MSC_VER >= 1900)
+# endif // defined(BOOST_ASIO_MSVC)
+# if !defined(BOOST_ASIO_DELETED)
+# define BOOST_ASIO_DELETED
+# endif // !defined(BOOST_ASIO_DELETED)
+#endif // !defined(BOOST_ASIO_DELETED)
+
+// Support constexpr on compilers known to allow it.
+#if !defined(BOOST_ASIO_HAS_CONSTEXPR)
+# if !defined(BOOST_ASIO_DISABLE_CONSTEXPR)
+# if defined(__clang__)
+# if __has_feature(__cxx_constexpr__)
+# define BOOST_ASIO_HAS_CONSTEXPR 1
+# endif // __has_feature(__cxx_constexr__)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_CONSTEXPR 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1900)
+# define BOOST_ASIO_HAS_CONSTEXPR 1
+# endif // (_MSC_VER >= 1900)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_CONSTEXPR)
+#endif // !defined(BOOST_ASIO_HAS_CONSTEXPR)
+#if !defined(BOOST_ASIO_CONSTEXPR)
+# if defined(BOOST_ASIO_HAS_CONSTEXPR)
+# define BOOST_ASIO_CONSTEXPR constexpr
+# else // defined(BOOST_ASIO_HAS_CONSTEXPR)
+# define BOOST_ASIO_CONSTEXPR
+# endif // defined(BOOST_ASIO_HAS_CONSTEXPR)
+#endif // !defined(BOOST_ASIO_CONSTEXPR)
+
+// Support noexcept on compilers known to allow it.
+#if !defined(BOOST_ASIO_NOEXCEPT)
+# if !defined(BOOST_ASIO_DISABLE_NOEXCEPT)
+# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && (BOOST_VERSION >= 105300)
+# define BOOST_ASIO_NOEXCEPT BOOST_NOEXCEPT
+# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW BOOST_NOEXCEPT_OR_NOTHROW
+# elif defined(__clang__)
+# if __has_feature(__cxx_noexcept__)
+# define BOOST_ASIO_NOEXCEPT noexcept(true)
+# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
+# endif // __has_feature(__cxx_noexcept__)
+# elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_NOEXCEPT noexcept(true)
+# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# elif defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1900)
+# define BOOST_ASIO_NOEXCEPT noexcept(true)
+# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW noexcept(true)
+# endif // (_MSC_VER >= 1900)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_NOEXCEPT)
+# if !defined(BOOST_ASIO_NOEXCEPT)
+# define BOOST_ASIO_NOEXCEPT
+# endif // !defined(BOOST_ASIO_NOEXCEPT)
+# if !defined(BOOST_ASIO_NOEXCEPT_OR_NOTHROW)
+# define BOOST_ASIO_NOEXCEPT_OR_NOTHROW throw()
+# endif // !defined(BOOST_ASIO_NOEXCEPT_OR_NOTHROW)
+#endif // !defined(BOOST_ASIO_NOEXCEPT)
+
+// Support automatic type deduction on compilers known to support it.
+#if !defined(BOOST_ASIO_HAS_DECLTYPE)
+# if !defined(BOOST_ASIO_DISABLE_DECLTYPE)
+# if defined(__clang__)
+# if __has_feature(__cxx_decltype__)
+# define BOOST_ASIO_HAS_DECLTYPE 1
+# endif // __has_feature(__cxx_decltype__)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_DECLTYPE 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_DECLTYPE 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_DECLTYPE)
+#endif // !defined(BOOST_ASIO_HAS_DECLTYPE)
+
+// Support alias templates on compilers known to allow it.
+#if !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
+# if !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES)
+# if defined(__clang__)
+# if __has_feature(__cxx_alias_templates__)
+# define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1
+# endif // __has_feature(__cxx_alias_templates__)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1900)
+# define BOOST_ASIO_HAS_ALIAS_TEMPLATES 1
+# endif // (_MSC_VER >= 1900)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_ALIAS_TEMPLATES)
+#endif // !defined(BOOST_ASIO_HAS_ALIAS_TEMPLATES)
+
+// Standard library support for system errors.
+# if !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<system_error>)
+# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
+# endif // __has_include(<system_error>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_SYSTEM_ERROR 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_SYSTEM_ERROR)
+
+// Compliant C++11 compilers put noexcept specifiers on error_category members.
+#if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
+# if (BOOST_VERSION >= 105300)
+# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT BOOST_NOEXCEPT
+# elif defined(__clang__)
+# if __has_feature(__cxx_noexcept__)
+# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
+# endif // __has_feature(__cxx_noexcept__)
+# elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# elif defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1900)
+# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT noexcept(true)
+# endif // (_MSC_VER >= 1900)
+# endif // defined(BOOST_ASIO_MSVC)
+# if !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
+# define BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT
+# endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
+#endif // !defined(BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT)
+
+// Standard library support for arrays.
+#if !defined(BOOST_ASIO_HAS_STD_ARRAY)
+# if !defined(BOOST_ASIO_DISABLE_STD_ARRAY)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_ARRAY 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<array>)
+# define BOOST_ASIO_HAS_STD_ARRAY 1
+# endif // __has_include(<array>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_ARRAY 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1600)
+# define BOOST_ASIO_HAS_STD_ARRAY 1
+# endif // (_MSC_VER >= 1600)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_ARRAY)
+#endif // !defined(BOOST_ASIO_HAS_STD_ARRAY)
+
+// Standard library support for shared_ptr and weak_ptr.
+#if !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
+# if !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
+# elif (__cplusplus >= 201103)
+# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1600)
+# define BOOST_ASIO_HAS_STD_SHARED_PTR 1
+# endif // (_MSC_VER >= 1600)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_SHARED_PTR)
+#endif // !defined(BOOST_ASIO_HAS_STD_SHARED_PTR)
+
+// Standard library support for allocator_arg_t.
+#if !defined(BOOST_ASIO_HAS_STD_ALLOCATOR_ARG)
+# if !defined(BOOST_ASIO_DISABLE_STD_ALLOCATOR_ARG)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
+# elif (__cplusplus >= 201103)
+# define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1600)
+# define BOOST_ASIO_HAS_STD_ALLOCATOR_ARG 1
+# endif // (_MSC_VER >= 1600)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_ALLOCATOR_ARG)
+#endif // !defined(BOOST_ASIO_HAS_STD_ALLOCATOR_ARG)
+
+// Standard library support for atomic operations.
+#if !defined(BOOST_ASIO_HAS_STD_ATOMIC)
+# if !defined(BOOST_ASIO_DISABLE_STD_ATOMIC)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_ATOMIC 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<atomic>)
+# define BOOST_ASIO_HAS_STD_ATOMIC 1
+# endif // __has_include(<atomic>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_ATOMIC 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_ATOMIC 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_ATOMIC)
+#endif // !defined(BOOST_ASIO_HAS_STD_ATOMIC)
+
+// Standard library support for chrono. Some standard libraries (such as the
+// libstdc++ shipped with gcc 4.6) provide monotonic_clock as per early C++0x
+// drafts, rather than the eventually standardised name of steady_clock.
+#if !defined(BOOST_ASIO_HAS_STD_CHRONO)
+# if !defined(BOOST_ASIO_DISABLE_STD_CHRONO)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_CHRONO 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<chrono>)
+# define BOOST_ASIO_HAS_STD_CHRONO 1
+# endif // __has_include(<chrono>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_CHRONO 1
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
+# define BOOST_ASIO_HAS_STD_CHRONO_MONOTONIC_CLOCK 1
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ == 6))
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_CHRONO 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_CHRONO)
+#endif // !defined(BOOST_ASIO_HAS_STD_CHRONO)
+
+// Boost support for chrono.
+#if !defined(BOOST_ASIO_HAS_BOOST_CHRONO)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO)
+# if (BOOST_VERSION >= 104700)
+# define BOOST_ASIO_HAS_BOOST_CHRONO 1
+# endif // (BOOST_VERSION >= 104700)
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_CHRONO)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_CHRONO)
+
+// Some form of chrono library is available.
+#if !defined(BOOST_ASIO_HAS_CHRONO)
+# if defined(BOOST_ASIO_HAS_STD_CHRONO) \
+ || defined(BOOST_ASIO_HAS_BOOST_CHRONO)
+# define BOOST_ASIO_HAS_CHRONO 1
+# endif // defined(BOOST_ASIO_HAS_STD_CHRONO)
+ // || defined(BOOST_ASIO_HAS_BOOST_CHRONO)
+#endif // !defined(BOOST_ASIO_HAS_CHRONO)
+
+// Boost support for the DateTime library.
+#if !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME)
+# define BOOST_ASIO_HAS_BOOST_DATE_TIME 1
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_DATE_TIME)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_DATE_TIME)
+
+// Standard library support for addressof.
+#if !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
+# if !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
+# elif (__cplusplus >= 201103)
+# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_ADDRESSOF 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_ADDRESSOF)
+#endif // !defined(BOOST_ASIO_HAS_STD_ADDRESSOF)
+
+// Standard library support for the function class.
+#if !defined(BOOST_ASIO_HAS_STD_FUNCTION)
+# if !defined(BOOST_ASIO_DISABLE_STD_FUNCTION)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_FUNCTION 1
+# elif (__cplusplus >= 201103)
+# define BOOST_ASIO_HAS_STD_FUNCTION 1
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_FUNCTION 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_FUNCTION 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_FUNCTION)
+#endif // !defined(BOOST_ASIO_HAS_STD_FUNCTION)
+
+// Standard library support for type traits.
+#if !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
+# if !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<type_traits>)
+# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
+# endif // __has_include(<type_traits>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_TYPE_TRAITS 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_TYPE_TRAITS)
+#endif // !defined(BOOST_ASIO_HAS_STD_TYPE_TRAITS)
+
+// Standard library support for the nullptr_t type.
+#if !defined(BOOST_ASIO_HAS_NULLPTR)
+# if !defined(BOOST_ASIO_DISABLE_NULLPTR)
+# if defined(__clang__)
+# if __has_feature(__cxx_nullptr__)
+# define BOOST_ASIO_HAS_NULLPTR 1
+# endif // __has_feature(__cxx_rvalue_references__)
+# elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_NULLPTR 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_NULLPTR 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_NULLPTR)
+#endif // !defined(BOOST_ASIO_HAS_NULLPTR)
+
+// Standard library support for the C++11 allocator additions.
+#if !defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
+# if !defined(BOOST_ASIO_DISABLE_CXX11_ALLOCATORS)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
+# elif (__cplusplus >= 201103)
+# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
+# endif // (__cplusplus >= 201103)
+# elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1800)
+# define BOOST_ASIO_HAS_CXX11_ALLOCATORS 1
+# endif // (_MSC_VER >= 1800)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_CXX11_ALLOCATORS)
+#endif // !defined(BOOST_ASIO_HAS_CXX11_ALLOCATORS)
+
+// Standard library support for the cstdint header.
+#if !defined(BOOST_ASIO_HAS_CSTDINT)
+# if !defined(BOOST_ASIO_DISABLE_CSTDINT)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_CSTDINT 1
+# elif (__cplusplus >= 201103)
+# define BOOST_ASIO_HAS_CSTDINT 1
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_CSTDINT 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 5)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_CSTDINT 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_CSTDINT)
+#endif // !defined(BOOST_ASIO_HAS_CSTDINT)
+
+// Standard library support for the thread class.
+#if !defined(BOOST_ASIO_HAS_STD_THREAD)
+# if !defined(BOOST_ASIO_DISABLE_STD_THREAD)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_THREAD 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<thread>)
+# define BOOST_ASIO_HAS_STD_THREAD 1
+# endif // __has_include(<thread>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_THREAD 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_THREAD 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_THREAD)
+#endif // !defined(BOOST_ASIO_HAS_STD_THREAD)
+
+// Standard library support for the mutex and condition variable classes.
+#if !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+# if !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<mutex>)
+# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
+# endif // __has_include(<mutex>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_MUTEX_AND_CONDVAR)
+#endif // !defined(BOOST_ASIO_HAS_STD_MUTEX_AND_CONDVAR)
+
+// Standard library support for the call_once function.
+#if !defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
+# if !defined(BOOST_ASIO_DISABLE_STD_CALL_ONCE)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_CALL_ONCE 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<mutex>)
+# define BOOST_ASIO_HAS_STD_CALL_ONCE 1
+# endif // __has_include(<mutex>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_CALL_ONCE 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_CALL_ONCE 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_CALL_ONCE)
+#endif // !defined(BOOST_ASIO_HAS_STD_CALL_ONCE)
+
+// Standard library support for futures.
+#if !defined(BOOST_ASIO_HAS_STD_FUTURE)
+# if !defined(BOOST_ASIO_DISABLE_STD_FUTURE)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_FUTURE 1
+# elif (__cplusplus >= 201103)
+# if __has_include(<future>)
+# define BOOST_ASIO_HAS_STD_FUTURE 1
+# endif // __has_include(<mutex>)
+# endif // (__cplusplus >= 201103)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_FUTURE 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 7)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_FUTURE 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_FUTURE)
+#endif // !defined(BOOST_ASIO_HAS_STD_FUTURE)
+
+// Standard library support for std::string_view.
+#if !defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
+# if !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# if (__cplusplus >= 201402)
+# if __has_include(<string_view>)
+# define BOOST_ASIO_HAS_STD_STRING_VIEW 1
+# endif // __has_include(<string_view>)
+# endif // (__cplusplus >= 201402)
+# else // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# if (__cplusplus >= 201703)
+# if __has_include(<string_view>)
+# define BOOST_ASIO_HAS_STD_STRING_VIEW 1
+# endif // __has_include(<string_view>)
+# endif // (__cplusplus >= 201703)
+# endif // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# elif defined(__GNUC__)
+# if (__GNUC__ >= 7)
+# if (__cplusplus >= 201703)
+# define BOOST_ASIO_HAS_STD_STRING_VIEW 1
+# endif // (__cplusplus >= 201703)
+# endif // (__GNUC__ >= 7)
+# elif defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
+# define BOOST_ASIO_HAS_STD_STRING_VIEW 1
+# endif // (_MSC_VER >= 1910 && _MSVC_LANG >= 201703)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_STRING_VIEW)
+#endif // !defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
+
+// Standard library support for std::experimental::string_view.
+#if !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# if !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
+# if defined(__clang__)
+# if defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# if (_LIBCPP_VERSION < 7000)
+# if (__cplusplus >= 201402)
+# if __has_include(<experimental/string_view>)
+# define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+# endif // __has_include(<experimental/string_view>)
+# endif // (__cplusplus >= 201402)
+# endif // (_LIBCPP_VERSION < 7000)
+# else // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# if (__cplusplus >= 201402)
+# if __has_include(<experimental/string_view>)
+# define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+# endif // __has_include(<experimental/string_view>)
+# endif // (__cplusplus >= 201402)
+# endif // // defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# endif // defined(__clang__)
+# if defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+# if (__cplusplus >= 201402)
+# define BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW 1
+# endif // (__cplusplus >= 201402)
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 9)) || (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_EXPERIMENTAL_STRING_VIEW)
+#endif // !defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+
+// Standard library has a string_view that we can use.
+#if !defined(BOOST_ASIO_HAS_STRING_VIEW)
+# if !defined(BOOST_ASIO_DISABLE_STRING_VIEW)
+# if defined(BOOST_ASIO_HAS_STD_STRING_VIEW)
+# define BOOST_ASIO_HAS_STRING_VIEW 1
+# elif defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# define BOOST_ASIO_HAS_STRING_VIEW 1
+# endif // defined(BOOST_ASIO_HAS_STD_EXPERIMENTAL_STRING_VIEW)
+# endif // !defined(BOOST_ASIO_DISABLE_STRING_VIEW)
+#endif // !defined(BOOST_ASIO_HAS_STRING_VIEW)
+
+// Standard library support for iostream move construction and assignment.
+#if !defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE)
+# if !defined(BOOST_ASIO_DISABLE_STD_IOSTREAM_MOVE)
+# if defined(__GNUC__)
+# if (__GNUC__ > 4)
+# if defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_ASIO_HAS_STD_IOSTREAM_MOVE 1
+# endif // defined(__GXX_EXPERIMENTAL_CXX0X__)
+# endif // (__GNUC__ > 4)
+# endif // defined(__GNUC__)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_STD_IOSTREAM_MOVE 1
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_IOSTREAM_MOVE)
+#endif // !defined(BOOST_ASIO_HAS_STD_IOSTREAM_MOVE)
+
+// Standard library has invoke_result (which supersedes result_of).
+#if !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
+# if !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
+# define BOOST_ASIO_HAS_STD_INVOKE_RESULT 1
+# endif // (_MSC_VER >= 1911 && _MSVC_LANG >= 201703)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_STD_INVOKE_RESULT)
+#endif // !defined(BOOST_ASIO_HAS_STD_INVOKE_RESULT)
+
+// Windows App target. Windows but with a limited API.
+#if !defined(BOOST_ASIO_WINDOWS_APP)
+# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
+# include <winapifamily.h>
+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
+ && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+# define BOOST_ASIO_WINDOWS_APP 1
+# endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+ // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+# endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0603)
+#endif // !defined(BOOST_ASIO_WINDOWS_APP)
+
+// Legacy WinRT target. Windows App is preferred.
+#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# if !defined(BOOST_ASIO_WINDOWS_APP)
+# if defined(__cplusplus_winrt)
+# include <winapifamily.h>
+# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) \
+ && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+# define BOOST_ASIO_WINDOWS_RUNTIME 1
+# endif // WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
+ // && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+# endif // defined(__cplusplus_winrt)
+# endif // !defined(BOOST_ASIO_WINDOWS_APP)
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+// Windows target. Excludes WinRT but includes Windows App targets.
+#if !defined(BOOST_ASIO_WINDOWS)
+# if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS)
+# define BOOST_ASIO_WINDOWS 1
+# elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
+# define BOOST_ASIO_WINDOWS 1
+# elif defined(BOOST_ASIO_WINDOWS_APP)
+# define BOOST_ASIO_WINDOWS 1
+# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_WINDOWS)
+# endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+#endif // !defined(BOOST_ASIO_WINDOWS)
+
+// Windows: target OS version.
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
+# if defined(_MSC_VER) || defined(__BORLANDC__)
+# pragma message( \
+ "Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately. For example:\n"\
+ "- add -D_WIN32_WINNT=0x0501 to the compiler command line; or\n"\
+ "- add _WIN32_WINNT=0x0501 to your project's Preprocessor Definitions.\n"\
+ "Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).")
+# else // defined(_MSC_VER) || defined(__BORLANDC__)
+# warning Please define _WIN32_WINNT or _WIN32_WINDOWS appropriately.
+# warning For example, add -D_WIN32_WINNT=0x0501 to the compiler command line.
+# warning Assuming _WIN32_WINNT=0x0501 (i.e. Windows XP target).
+# endif // defined(_MSC_VER) || defined(__BORLANDC__)
+# define _WIN32_WINNT 0x0501
+# endif // !defined(_WIN32_WINNT) && !defined(_WIN32_WINDOWS)
+# if defined(_MSC_VER)
+# if defined(_WIN32) && !defined(WIN32)
+# if !defined(_WINSOCK2API_)
+# define WIN32 // Needed for correct types in winsock2.h
+# else // !defined(_WINSOCK2API_)
+# error Please define the macro WIN32 in your compiler options
+# endif // !defined(_WINSOCK2API_)
+# endif // defined(_WIN32) && !defined(WIN32)
+# endif // defined(_MSC_VER)
+# if defined(__BORLANDC__)
+# if defined(__WIN32__) && !defined(WIN32)
+# if !defined(_WINSOCK2API_)
+# define WIN32 // Needed for correct types in winsock2.h
+# else // !defined(_WINSOCK2API_)
+# error Please define the macro WIN32 in your compiler options
+# endif // !defined(_WINSOCK2API_)
+# endif // defined(__WIN32__) && !defined(WIN32)
+# endif // defined(__BORLANDC__)
+# if defined(__CYGWIN__)
+# if !defined(__USE_W32_SOCKETS)
+# error You must add -D__USE_W32_SOCKETS to your compiler options.
+# endif // !defined(__USE_W32_SOCKETS)
+# endif // defined(__CYGWIN__)
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+// Windows: minimise header inclusion.
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
+# if !defined(WIN32_LEAN_AND_MEAN)
+# define WIN32_LEAN_AND_MEAN
+# endif // !defined(WIN32_LEAN_AND_MEAN)
+# endif // !defined(BOOST_ASIO_NO_WIN32_LEAN_AND_MEAN)
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+// Windows: suppress definition of "min" and "max" macros.
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if !defined(BOOST_ASIO_NO_NOMINMAX)
+# if !defined(NOMINMAX)
+# define NOMINMAX 1
+# endif // !defined(NOMINMAX)
+# endif // !defined(BOOST_ASIO_NO_NOMINMAX)
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+// Windows: IO Completion Ports.
+#if !defined(BOOST_ASIO_HAS_IOCP)
+# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
+# if !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
+# if !defined(BOOST_ASIO_DISABLE_IOCP)
+# define BOOST_ASIO_HAS_IOCP 1
+# endif // !defined(BOOST_ASIO_DISABLE_IOCP)
+# endif // !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
+# endif // defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0400)
+# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+#endif // !defined(BOOST_ASIO_HAS_IOCP)
+
+// On POSIX (and POSIX-like) platforms we need to include unistd.h in order to
+// get access to the various platform feature macros, e.g. to be able to test
+// for threads support.
+#if !defined(BOOST_ASIO_HAS_UNISTD_H)
+# if !defined(BOOST_ASIO_HAS_BOOST_CONFIG)
+# if defined(unix) \
+ || defined(__unix) \
+ || defined(_XOPEN_SOURCE) \
+ || defined(_POSIX_SOURCE) \
+ || (defined(__MACH__) && defined(__APPLE__)) \
+ || defined(__FreeBSD__) \
+ || defined(__NetBSD__) \
+ || defined(__OpenBSD__) \
+ || defined(__linux__)
+# define BOOST_ASIO_HAS_UNISTD_H 1
+# endif
+# endif // !defined(BOOST_ASIO_HAS_BOOST_CONFIG)
+#endif // !defined(BOOST_ASIO_HAS_UNISTD_H)
+#if defined(BOOST_ASIO_HAS_UNISTD_H)
+# include <unistd.h>
+#endif // defined(BOOST_ASIO_HAS_UNISTD_H)
+
+// Linux: epoll, eventfd and timerfd.
+#if defined(__linux__)
+# include <linux/version.h>
+# if !defined(BOOST_ASIO_HAS_EPOLL)
+# if !defined(BOOST_ASIO_DISABLE_EPOLL)
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45)
+# define BOOST_ASIO_HAS_EPOLL 1
+# endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,45)
+# endif // !defined(BOOST_ASIO_DISABLE_EPOLL)
+# endif // !defined(BOOST_ASIO_HAS_EPOLL)
+# if !defined(BOOST_ASIO_HAS_EVENTFD)
+# if !defined(BOOST_ASIO_DISABLE_EVENTFD)
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+# define BOOST_ASIO_HAS_EVENTFD 1
+# endif // LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
+# endif // !defined(BOOST_ASIO_DISABLE_EVENTFD)
+# endif // !defined(BOOST_ASIO_HAS_EVENTFD)
+# if !defined(BOOST_ASIO_HAS_TIMERFD)
+# if defined(BOOST_ASIO_HAS_EPOLL)
+# if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
+# define BOOST_ASIO_HAS_TIMERFD 1
+# endif // (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 8)
+# endif // defined(BOOST_ASIO_HAS_EPOLL)
+# endif // !defined(BOOST_ASIO_HAS_TIMERFD)
+#endif // defined(__linux__)
+
+// Mac OS X, FreeBSD, NetBSD, OpenBSD: kqueue.
+#if (defined(__MACH__) && defined(__APPLE__)) \
+ || defined(__FreeBSD__) \
+ || defined(__NetBSD__) \
+ || defined(__OpenBSD__)
+# if !defined(BOOST_ASIO_HAS_KQUEUE)
+# if !defined(BOOST_ASIO_DISABLE_KQUEUE)
+# define BOOST_ASIO_HAS_KQUEUE 1
+# endif // !defined(BOOST_ASIO_DISABLE_KQUEUE)
+# endif // !defined(BOOST_ASIO_HAS_KQUEUE)
+#endif // (defined(__MACH__) && defined(__APPLE__))
+ // || defined(__FreeBSD__)
+ // || defined(__NetBSD__)
+ // || defined(__OpenBSD__)
+
+// Solaris: /dev/poll.
+#if defined(__sun)
+# if !defined(BOOST_ASIO_HAS_DEV_POLL)
+# if !defined(BOOST_ASIO_DISABLE_DEV_POLL)
+# define BOOST_ASIO_HAS_DEV_POLL 1
+# endif // !defined(BOOST_ASIO_DISABLE_DEV_POLL)
+# endif // !defined(BOOST_ASIO_HAS_DEV_POLL)
+#endif // defined(__sun)
+
+// Serial ports.
+#if !defined(BOOST_ASIO_HAS_SERIAL_PORT)
+# if defined(BOOST_ASIO_HAS_IOCP) \
+ || !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+# if !defined(__SYMBIAN32__)
+# if !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
+# define BOOST_ASIO_HAS_SERIAL_PORT 1
+# endif // !defined(BOOST_ASIO_DISABLE_SERIAL_PORT)
+# endif // !defined(__SYMBIAN32__)
+# endif // defined(BOOST_ASIO_HAS_IOCP)
+ // || !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+#endif // !defined(BOOST_ASIO_HAS_SERIAL_PORT)
+
+// Windows: stream handles.
+#if !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
+# if !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE)
+# if defined(BOOST_ASIO_HAS_IOCP)
+# define BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE 1
+# endif // defined(BOOST_ASIO_HAS_IOCP)
+# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_STREAM_HANDLE)
+#endif // !defined(BOOST_ASIO_HAS_WINDOWS_STREAM_HANDLE)
+
+// Windows: random access handles.
+#if !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+# if !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE)
+# if defined(BOOST_ASIO_HAS_IOCP)
+# define BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE 1
+# endif // defined(BOOST_ASIO_HAS_IOCP)
+# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_RANDOM_ACCESS_HANDLE)
+#endif // !defined(BOOST_ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE)
+
+// Windows: object handles.
+#if !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+# if !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
+# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
+# define BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE 1
+# endif // !defined(UNDER_CE) && !defined(BOOST_ASIO_WINDOWS_APP)
+# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OBJECT_HANDLE)
+#endif // !defined(BOOST_ASIO_HAS_WINDOWS_OBJECT_HANDLE)
+
+// Windows: OVERLAPPED wrapper.
+#if !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
+# if !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR)
+# if defined(BOOST_ASIO_HAS_IOCP)
+# define BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR 1
+# endif // defined(BOOST_ASIO_HAS_IOCP)
+# endif // !defined(BOOST_ASIO_DISABLE_WINDOWS_OVERLAPPED_PTR)
+#endif // !defined(BOOST_ASIO_HAS_WINDOWS_OVERLAPPED_PTR)
+
+// POSIX: stream-oriented file descriptors.
+#if !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+# if !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
+# if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+# define BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR 1
+# endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+# endif // !defined(BOOST_ASIO_DISABLE_POSIX_STREAM_DESCRIPTOR)
+#endif // !defined(BOOST_ASIO_HAS_POSIX_STREAM_DESCRIPTOR)
+
+// UNIX domain sockets.
+#if !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+# if !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
+# if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+# define BOOST_ASIO_HAS_LOCAL_SOCKETS 1
+# endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+# endif // !defined(BOOST_ASIO_DISABLE_LOCAL_SOCKETS)
+#endif // !defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
+
+// Can use sigaction() instead of signal().
+#if !defined(BOOST_ASIO_HAS_SIGACTION)
+# if !defined(BOOST_ASIO_DISABLE_SIGACTION)
+# if !defined(BOOST_ASIO_WINDOWS) \
+ && !defined(BOOST_ASIO_WINDOWS_RUNTIME) \
+ && !defined(__CYGWIN__)
+# define BOOST_ASIO_HAS_SIGACTION 1
+# endif // !defined(BOOST_ASIO_WINDOWS)
+ // && !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // && !defined(__CYGWIN__)
+# endif // !defined(BOOST_ASIO_DISABLE_SIGACTION)
+#endif // !defined(BOOST_ASIO_HAS_SIGACTION)
+
+// Can use signal().
+#if !defined(BOOST_ASIO_HAS_SIGNAL)
+# if !defined(BOOST_ASIO_DISABLE_SIGNAL)
+# if !defined(UNDER_CE)
+# define BOOST_ASIO_HAS_SIGNAL 1
+# endif // !defined(UNDER_CE)
+# endif // !defined(BOOST_ASIO_DISABLE_SIGNAL)
+#endif // !defined(BOOST_ASIO_HAS_SIGNAL)
+
+// Can use getaddrinfo() and getnameinfo().
+#if !defined(BOOST_ASIO_HAS_GETADDRINFO)
+# if !defined(BOOST_ASIO_DISABLE_GETADDRINFO)
+# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# elif defined(UNDER_CE)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# endif // defined(UNDER_CE)
+# elif defined(__MACH__) && defined(__APPLE__)
+# if defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+# if (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# endif // (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1050)
+# else // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# endif // defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
+# else // defined(__MACH__) && defined(__APPLE__)
+# define BOOST_ASIO_HAS_GETADDRINFO 1
+# endif // defined(__MACH__) && defined(__APPLE__)
+# endif // !defined(BOOST_ASIO_DISABLE_GETADDRINFO)
+#endif // !defined(BOOST_ASIO_HAS_GETADDRINFO)
+
+// Whether standard iostreams are disabled.
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_IOSTREAM)
+# define BOOST_ASIO_NO_IOSTREAM 1
+# endif // !defined(BOOST_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+
+// Whether exception handling is disabled.
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_ASIO_NO_EXCEPTIONS 1
+# endif // !defined(BOOST_NO_EXCEPTIONS)
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+
+// Whether the typeid operator is supported.
+#if !defined(BOOST_ASIO_NO_TYPEID)
+# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_NO_TYPEID)
+# define BOOST_ASIO_NO_TYPEID 1
+# endif // !defined(BOOST_NO_TYPEID)
+#endif // !defined(BOOST_ASIO_NO_TYPEID)
+
+// Threads.
+#if !defined(BOOST_ASIO_HAS_THREADS)
+# if !defined(BOOST_ASIO_DISABLE_THREADS)
+# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS)
+# define BOOST_ASIO_HAS_THREADS 1
+# elif defined(__GNUC__) && !defined(__MINGW32__) \
+ && !defined(linux) && !defined(__linux) && !defined(__linux__)
+# define BOOST_ASIO_HAS_THREADS 1
+# elif defined(_MT) || defined(__MT__)
+# define BOOST_ASIO_HAS_THREADS 1
+# elif defined(_REENTRANT)
+# define BOOST_ASIO_HAS_THREADS 1
+# elif defined(__APPLE__)
+# define BOOST_ASIO_HAS_THREADS 1
+# elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
+# define BOOST_ASIO_HAS_THREADS 1
+# elif defined(_PTHREADS)
+# define BOOST_ASIO_HAS_THREADS 1
+# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_THREADS)
+# endif // !defined(BOOST_ASIO_DISABLE_THREADS)
+#endif // !defined(BOOST_ASIO_HAS_THREADS)
+
+// POSIX threads.
+#if !defined(BOOST_ASIO_HAS_PTHREADS)
+# if defined(BOOST_ASIO_HAS_THREADS)
+# if defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
+# define BOOST_ASIO_HAS_PTHREADS 1
+# elif defined(_POSIX_THREADS) && (_POSIX_THREADS + 0 >= 0)
+# define BOOST_ASIO_HAS_PTHREADS 1
+# endif // defined(BOOST_ASIO_HAS_BOOST_CONFIG) && defined(BOOST_HAS_PTHREADS)
+# endif // defined(BOOST_ASIO_HAS_THREADS)
+#endif // !defined(BOOST_ASIO_HAS_PTHREADS)
+
+// Helper to prevent macro expansion.
+#define BOOST_ASIO_PREVENT_MACRO_SUBSTITUTION
+
+// Helper to define in-class constants.
+#if !defined(BOOST_ASIO_STATIC_CONSTANT)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
+# define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
+ BOOST_STATIC_CONSTANT(type, assignment)
+# else // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
+# define BOOST_ASIO_STATIC_CONSTANT(type, assignment) \
+ static const type assignment
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_STATIC_CONSTANT)
+#endif // !defined(BOOST_ASIO_STATIC_CONSTANT)
+
+// Boost array library.
+#if !defined(BOOST_ASIO_HAS_BOOST_ARRAY)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY)
+# define BOOST_ASIO_HAS_BOOST_ARRAY 1
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_ARRAY)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_ARRAY)
+
+// Boost assert macro.
+#if !defined(BOOST_ASIO_HAS_BOOST_ASSERT)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT)
+# define BOOST_ASIO_HAS_BOOST_ASSERT 1
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_ASSERT)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_ASSERT)
+
+// Boost limits header.
+#if !defined(BOOST_ASIO_HAS_BOOST_LIMITS)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS)
+# define BOOST_ASIO_HAS_BOOST_LIMITS 1
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_LIMITS)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_LIMITS)
+
+// Boost throw_exception function.
+#if !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION)
+# define BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION 1
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_THROW_EXCEPTION)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_THROW_EXCEPTION)
+
+// Boost regex library.
+#if !defined(BOOST_ASIO_HAS_BOOST_REGEX)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_REGEX)
+# define BOOST_ASIO_HAS_BOOST_REGEX 1
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_REGEX)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+// Boost bind function.
+#if !defined(BOOST_ASIO_HAS_BOOST_BIND)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_BIND)
+# define BOOST_ASIO_HAS_BOOST_BIND 1
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_BIND)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_BIND)
+
+// Boost's BOOST_WORKAROUND macro.
+#if !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
+# if !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND)
+# define BOOST_ASIO_HAS_BOOST_WORKAROUND 1
+# endif // !defined(BOOST_ASIO_DISABLE_BOOST_WORKAROUND)
+#endif // !defined(BOOST_ASIO_HAS_BOOST_WORKAROUND)
+
+// Microsoft Visual C++'s secure C runtime library.
+#if !defined(BOOST_ASIO_HAS_SECURE_RTL)
+# if !defined(BOOST_ASIO_DISABLE_SECURE_RTL)
+# if defined(BOOST_ASIO_MSVC) \
+ && (BOOST_ASIO_MSVC >= 1400) \
+ && !defined(UNDER_CE)
+# define BOOST_ASIO_HAS_SECURE_RTL 1
+# endif // defined(BOOST_ASIO_MSVC)
+ // && (BOOST_ASIO_MSVC >= 1400)
+ // && !defined(UNDER_CE)
+# endif // !defined(BOOST_ASIO_DISABLE_SECURE_RTL)
+#endif // !defined(BOOST_ASIO_HAS_SECURE_RTL)
+
+// Handler hooking. Disabled for ancient Borland C++ and gcc compilers.
+#if !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
+# if !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS)
+# if defined(__GNUC__)
+# if (__GNUC__ >= 3)
+# define BOOST_ASIO_HAS_HANDLER_HOOKS 1
+# endif // (__GNUC__ >= 3)
+# elif !defined(__BORLANDC__)
+# define BOOST_ASIO_HAS_HANDLER_HOOKS 1
+# endif // !defined(__BORLANDC__)
+# endif // !defined(BOOST_ASIO_DISABLE_HANDLER_HOOKS)
+#endif // !defined(BOOST_ASIO_HAS_HANDLER_HOOKS)
+
+// Support for the __thread keyword extension.
+#if !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
+# if defined(__linux__)
+# if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+# if ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
+# if !defined(__INTEL_COMPILER) && !defined(__ICL) \
+ && !(defined(__clang__) && defined(__ANDROID__))
+# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
+# define BOOST_ASIO_THREAD_KEYWORD __thread
+# elif defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100)
+# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
+# endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1100)
+ // && !(defined(__clang__) && defined(__ANDROID__))
+# endif // ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)
+# endif // defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+# endif // defined(__linux__)
+# if defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# if (_MSC_VER >= 1700)
+# define BOOST_ASIO_HAS_THREAD_KEYWORD_EXTENSION 1
+# define BOOST_ASIO_THREAD_KEYWORD __declspec(thread)
+# endif // (_MSC_VER >= 1700)
+# endif // defined(BOOST_ASIO_MSVC) && defined(BOOST_ASIO_WINDOWS_RUNTIME)
+#endif // !defined(BOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION)
+#if !defined(BOOST_ASIO_THREAD_KEYWORD)
+# define BOOST_ASIO_THREAD_KEYWORD __thread
+#endif // !defined(BOOST_ASIO_THREAD_KEYWORD)
+
+// Support for POSIX ssize_t typedef.
+#if !defined(BOOST_ASIO_DISABLE_SSIZE_T)
+# if defined(__linux__) \
+ || (defined(__MACH__) && defined(__APPLE__))
+# define BOOST_ASIO_HAS_SSIZE_T 1
+# endif // defined(__linux__)
+ // || (defined(__MACH__) && defined(__APPLE__))
+#endif // !defined(BOOST_ASIO_DISABLE_SSIZE_T)
+
+// Helper macros to manage the transition away from the old services-based API.
+#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+# define BOOST_ASIO_SVC_TPARAM , typename Service
+# define BOOST_ASIO_SVC_TPARAM_DEF1(d1) , typename Service d1
+# define BOOST_ASIO_SVC_TPARAM_DEF2(d1, d2) , typename Service d1, d2
+# define BOOST_ASIO_SVC_TARG , Service
+# define BOOST_ASIO_SVC_T Service
+# define BOOST_ASIO_SVC_TPARAM1 , typename Service1
+# define BOOST_ASIO_SVC_TPARAM1_DEF1(d1) , typename Service1 d1
+# define BOOST_ASIO_SVC_TPARAM1_DEF2(d1, d2) , typename Service1 d1, d2
+# define BOOST_ASIO_SVC_TARG1 , Service1
+# define BOOST_ASIO_SVC_T1 Service1
+# define BOOST_ASIO_SVC_ACCESS public
+#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+# define BOOST_ASIO_SVC_TPARAM
+# define BOOST_ASIO_SVC_TPARAM_DEF1(d1)
+# define BOOST_ASIO_SVC_TPARAM_DEF2(d1, d2)
+# define BOOST_ASIO_SVC_TARG
+// BOOST_ASIO_SVC_T is defined at each point of use.
+# define BOOST_ASIO_SVC_TPARAM1
+# define BOOST_ASIO_SVC_TPARAM1_DEF1(d1)
+# define BOOST_ASIO_SVC_TPARAM1_DEF2(d1, d2)
+# define BOOST_ASIO_SVC_TARG1
+// BOOST_ASIO_SVC_T1 is defined at each point of use.
+# define BOOST_ASIO_SVC_ACCESS protected
+#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+
+// Helper macros to manage transition away from error_code return values.
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+# define BOOST_ASIO_SYNC_OP_VOID void
+# define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return
+#else // defined(BOOST_ASIO_NO_DEPRECATED)
+# define BOOST_ASIO_SYNC_OP_VOID boost::system::error_code
+# define BOOST_ASIO_SYNC_OP_VOID_RETURN(e) return e
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
+
+// Newer gcc, clang need special treatment to suppress unused typedef warnings.
+#if defined(__clang__)
+# if defined(__apple_build_version__)
+# if (__clang_major__ >= 7)
+# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
+# endif // (__clang_major__ >= 7)
+# elif ((__clang_major__ == 3) && (__clang_minor__ >= 6)) \
+ || (__clang_major__ > 3)
+# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
+# endif // ((__clang_major__ == 3) && (__clang_minor__ >= 6))
+ // || (__clang_major__ > 3)
+#elif defined(__GNUC__)
+# if ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
+# define BOOST_ASIO_UNUSED_TYPEDEF __attribute__((__unused__))
+# endif // ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 8)) || (__GNUC__ > 4)
+#endif // defined(__GNUC__)
+#if !defined(BOOST_ASIO_UNUSED_TYPEDEF)
+# define BOOST_ASIO_UNUSED_TYPEDEF
+#endif // !defined(BOOST_ASIO_UNUSED_TYPEDEF)
+
+// Some versions of gcc generate spurious warnings about unused variables.
+#if defined(__GNUC__)
+# if (__GNUC__ >= 4)
+# define BOOST_ASIO_UNUSED_VARIABLE __attribute__((__unused__))
+# endif // (__GNUC__ >= 4)
+#endif // defined(__GNUC__)
+#if !defined(BOOST_ASIO_UNUSED_VARIABLE)
+# define BOOST_ASIO_UNUSED_VARIABLE
+#endif // !defined(BOOST_ASIO_UNUSED_VARIABLE)
+
+// Support co_await on compilers known to allow it.
+#if !defined(BOOST_ASIO_HAS_CO_AWAIT)
+# if !defined(BOOST_ASIO_DISABLE_CO_AWAIT)
+# if defined(BOOST_ASIO_MSVC)
+# if (_MSC_FULL_VER >= 190023506)
+# if defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
+# define BOOST_ASIO_HAS_CO_AWAIT 1
+# endif // defined(_RESUMABLE_FUNCTIONS_SUPPORTED)
+# endif // (_MSC_FULL_VER >= 190023506)
+# endif // defined(BOOST_ASIO_MSVC)
+# endif // !defined(BOOST_ASIO_DISABLE_CO_AWAIT)
+# if defined(__clang__)
+# if (__cpp_coroutines >= 201703)
+# if __has_include(<experimental/coroutine>)
+# define BOOST_ASIO_HAS_CO_AWAIT 1
+# endif // __has_include(<experimental/coroutine>)
+# endif // (__cpp_coroutines >= 201703)
+# endif // defined(__clang__)
+#endif // !defined(BOOST_ASIO_HAS_CO_AWAIT)
+
+#endif // BOOST_ASIO_DETAIL_CONFIG_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/consuming_buffers.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/consuming_buffers.hpp
index 38eb00576c3..38eb00576c3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/consuming_buffers.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/consuming_buffers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/cstddef.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/cstddef.hpp
index 665ff3b3a34..665ff3b3a34 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/cstddef.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/cstddef.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/cstdint.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/cstdint.hpp
index 24e203aa6da..24e203aa6da 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/cstdint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/cstdint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/date_time_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/date_time_fwd.hpp
index b6c49c75d11..b6c49c75d11 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/date_time_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/date_time_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/deadline_timer_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/deadline_timer_service.hpp
index ff162493d8b..ff162493d8b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/deadline_timer_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/deadline_timer_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/dependent_type.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/dependent_type.hpp
index 43f87dae7fb..43f87dae7fb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/dependent_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/dependent_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/descriptor_ops.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_ops.hpp
index bfa6ce99fa5..bfa6ce99fa5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/descriptor_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/descriptor_read_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_read_op.hpp
index 328e2191c02..328e2191c02 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/descriptor_read_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_read_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/descriptor_write_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_write_op.hpp
index 80ddf37d37d..80ddf37d37d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/descriptor_write_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/descriptor_write_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/dev_poll_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/dev_poll_reactor.hpp
index cb15a9671b1..cb15a9671b1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/dev_poll_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/dev_poll_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/epoll_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/epoll_reactor.hpp
index 31a7b3dff35..31a7b3dff35 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/epoll_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/epoll_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/event.hpp
index 8cb097cb244..8cb097cb244 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/event.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/event.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/eventfd_select_interrupter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/eventfd_select_interrupter.hpp
index 4871c971ed4..4871c971ed4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/eventfd_select_interrupter.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/eventfd_select_interrupter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/executor_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/executor_op.hpp
index 1c8671abc85..1c8671abc85 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/executor_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/executor_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/fd_set_adapter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/fd_set_adapter.hpp
index 26ba12665e0..26ba12665e0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/fd_set_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/fd_set_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/fenced_block.hpp
index e80ed4073cc..e80ed4073cc 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/functional.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/functional.hpp
index 23218bb5df0..23218bb5df0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/functional.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/functional.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/future.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/future.hpp
new file mode 100644
index 00000000000..38cc7c1e837
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/future.hpp
@@ -0,0 +1,33 @@
+//
+// detail/future.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_DETAIL_FUTURE_HPP
+#define BOOST_ASIO_DETAIL_FUTURE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#if defined(BOOST_ASIO_HAS_STD_FUTURE)
+# include <future>
+// Even though the future header is available, libstdc++ may not implement the
+// std::future class itself. However, we need to have already included the
+// future header to reliably test for _GLIBCXX_HAS_GTHREADS.
+# if defined(__GNUC__) && !defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# if defined(_GLIBCXX_HAS_GTHREADS)
+# define BOOST_ASIO_HAS_STD_FUTURE_CLASS 1
+# endif // defined(_GLIBCXX_HAS_GTHREADS)
+# else // defined(__GNUC__) && !defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+# define BOOST_ASIO_HAS_STD_FUTURE_CLASS 1
+# endif // defined(__GNUC__) && !defined(BOOST_ASIO_HAS_CLANG_LIBCXX)
+#endif // defined(BOOST_ASIO_HAS_STD_FUTURE)
+
+#endif // BOOST_ASIO_DETAIL_FUTURE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/gcc_arm_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/gcc_arm_fenced_block.hpp
index 3a5a1dfacf9..3a5a1dfacf9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/gcc_arm_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/gcc_arm_fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/gcc_hppa_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/gcc_hppa_fenced_block.hpp
index bc0bc8afb49..bc0bc8afb49 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/gcc_hppa_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/gcc_hppa_fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/gcc_sync_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/gcc_sync_fenced_block.hpp
index e464738ee0e..e464738ee0e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/gcc_sync_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/gcc_sync_fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/gcc_x86_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/gcc_x86_fenced_block.hpp
index f66289fe967..f66289fe967 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/gcc_x86_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/gcc_x86_fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/global.hpp
index 967890408ff..967890408ff 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/global.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/global.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/handler_alloc_helpers.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_alloc_helpers.hpp
index 6e720513936..6e720513936 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/handler_alloc_helpers.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/handler_alloc_helpers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/handler_cont_helpers.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_cont_helpers.hpp
index 700505d5794..700505d5794 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/handler_cont_helpers.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/handler_cont_helpers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/handler_invoke_helpers.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_invoke_helpers.hpp
index 8ced5f617ca..8ced5f617ca 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/handler_invoke_helpers.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/handler_invoke_helpers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/handler_tracking.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_tracking.hpp
index 0839e09159b..0839e09159b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/handler_tracking.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/handler_tracking.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/handler_type_requirements.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_type_requirements.hpp
index 3a83c8d1546..3a83c8d1546 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/handler_type_requirements.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/handler_type_requirements.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/handler_work.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/handler_work.hpp
index dbd1bb911ab..dbd1bb911ab 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/handler_work.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/handler_work.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/hash_map.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/hash_map.hpp
index 6a13620e922..6a13620e922 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/hash_map.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/hash_map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp
index 26708ced33f..26708ced33f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/buffer_sequence_adapter.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/descriptor_ops.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/descriptor_ops.ipp
index 1bb68be1c01..1bb68be1c01 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/descriptor_ops.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/descriptor_ops.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/dev_poll_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.hpp
index 797937bad89..797937bad89 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/dev_poll_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/dev_poll_reactor.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.ipp
index 5cc73ca9c17..5cc73ca9c17 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/dev_poll_reactor.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/dev_poll_reactor.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/epoll_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.hpp
index 101b1d6eadb..101b1d6eadb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/epoll_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/epoll_reactor.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.ipp
index 1e9babcc144..1e9babcc144 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/epoll_reactor.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/epoll_reactor.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp
index 88040094424..88040094424 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/eventfd_select_interrupter.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/handler_tracking.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/handler_tracking.ipp
index b3abbb513a4..b3abbb513a4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/handler_tracking.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/handler_tracking.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/kqueue_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.hpp
index 4d79ba5d7ca..4d79ba5d7ca 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/kqueue_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/kqueue_reactor.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.ipp
index 9069ae44424..9069ae44424 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/kqueue_reactor.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/kqueue_reactor.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/null_event.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/null_event.ipp
index 19bab80b33e..19bab80b33e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/null_event.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/null_event.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/pipe_select_interrupter.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/pipe_select_interrupter.ipp
index bfff076747f..bfff076747f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/pipe_select_interrupter.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/pipe_select_interrupter.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_event.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_event.ipp
index 6f096bc08e4..6f096bc08e4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_event.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_event.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_mutex.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_mutex.ipp
index 57564714a14..57564714a14 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_mutex.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_mutex.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_thread.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_thread.ipp
index c2ee8efef72..c2ee8efef72 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_thread.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_thread.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_tss_ptr.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_tss_ptr.ipp
index a40f3f81a62..a40f3f81a62 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/posix_tss_ptr.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/posix_tss_ptr.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_descriptor_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_descriptor_service.ipp
index 735239c597e..735239c597e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_descriptor_service.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_descriptor_service.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_serial_port_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_serial_port_service.ipp
index c1ff4618308..c1ff4618308 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_serial_port_service.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_serial_port_service.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_socket_service_base.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_socket_service_base.ipp
index 6fdf437c1d0..6fdf437c1d0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/reactive_socket_service_base.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/reactive_socket_service_base.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/resolver_service_base.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/resolver_service_base.ipp
index 144e2a17534..144e2a17534 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/resolver_service_base.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/resolver_service_base.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/scheduler.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/scheduler.ipp
index 9dae6836cea..9dae6836cea 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/scheduler.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/scheduler.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/select_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.hpp
index 0fbaeb9ced2..0fbaeb9ced2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/select_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/select_reactor.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.ipp
index 4f1f5a83032..4f1f5a83032 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/select_reactor.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/select_reactor.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/service_registry.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.hpp
index c50614410e7..c50614410e7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/service_registry.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/service_registry.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.ipp
index abdcd6a01a4..abdcd6a01a4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/service_registry.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/service_registry.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/signal_set_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/signal_set_service.ipp
index abd83b480cd..abd83b480cd 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/signal_set_service.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/signal_set_service.ipp
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/impl/socket_ops.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/socket_ops.ipp
new file mode 100644
index 00000000000..bb60df0a8ec
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/socket_ops.ipp
@@ -0,0 +1,3573 @@
+//
+// detail/impl/socket_ops.ipp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_DETAIL_SOCKET_OPS_IPP
+#define BOOST_ASIO_DETAIL_SOCKET_OPS_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#include <cctype>
+#include <cstdio>
+#include <cstdlib>
+#include <cstring>
+#include <cerrno>
+#include <new>
+#include <boost/asio/detail/assert.hpp>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/error.hpp>
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <codecvt>
+# include <locale>
+# include <string>
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__) \
+ || defined(__MACH__) && defined(__APPLE__)
+# if defined(BOOST_ASIO_HAS_PTHREADS)
+# include <pthread.h>
+# endif // defined(BOOST_ASIO_HAS_PTHREADS)
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // || defined(__MACH__) && defined(__APPLE__)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+namespace socket_ops {
+
+#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+struct msghdr { int msg_namelen; };
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+#if defined(__hpux)
+// HP-UX doesn't declare these functions extern "C", so they are declared again
+// here to avoid linker errors about undefined symbols.
+extern "C" char* if_indextoname(unsigned int, char*);
+extern "C" unsigned int if_nametoindex(const char*);
+#endif // defined(__hpux)
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+inline void clear_last_error()
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ WSASetLastError(0);
+#else
+ errno = 0;
+#endif
+}
+
+#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+template <typename ReturnType>
+inline ReturnType error_wrapper(ReturnType return_value,
+ boost::system::error_code& ec)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ec = boost::system::error_code(WSAGetLastError(),
+ boost::asio::error::get_system_category());
+#else
+ ec = boost::system::error_code(errno,
+ boost::asio::error::get_system_category());
+#endif
+ return return_value;
+}
+
+template <typename SockLenType>
+inline socket_type call_accept(SockLenType msghdr::*,
+ socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+{
+ SockLenType tmp_addrlen = addrlen ? (SockLenType)*addrlen : 0;
+ socket_type result = ::accept(s, addr, addrlen ? &tmp_addrlen : 0);
+ if (addrlen)
+ *addrlen = (std::size_t)tmp_addrlen;
+ return result;
+}
+
+socket_type accept(socket_type s, socket_addr_type* addr,
+ std::size_t* addrlen, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return invalid_socket;
+ }
+
+ clear_last_error();
+
+ socket_type new_s = error_wrapper(call_accept(
+ &msghdr::msg_namelen, s, addr, addrlen), ec);
+ if (new_s == invalid_socket)
+ return new_s;
+
+#if defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
+ int optval = 1;
+ int result = error_wrapper(::setsockopt(new_s,
+ SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)), ec);
+ if (result != 0)
+ {
+ ::close(new_s);
+ return invalid_socket;
+ }
+#endif
+
+ ec = boost::system::error_code();
+ return new_s;
+}
+
+socket_type sync_accept(socket_type s, state_type state,
+ socket_addr_type* addr, std::size_t* addrlen, boost::system::error_code& ec)
+{
+ // Accept a socket.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ socket_type new_socket = socket_ops::accept(s, addr, addrlen, ec);
+
+ // Check if operation succeeded.
+ if (new_socket != invalid_socket)
+ return new_socket;
+
+ // Operation failed.
+ if (ec == boost::asio::error::would_block
+ || ec == boost::asio::error::try_again)
+ {
+ if (state & user_set_non_blocking)
+ return invalid_socket;
+ // Fall through to retry operation.
+ }
+ else if (ec == boost::asio::error::connection_aborted)
+ {
+ if (state & enable_connection_aborted)
+ return invalid_socket;
+ // Fall through to retry operation.
+ }
+#if defined(EPROTO)
+ else if (ec.value() == EPROTO)
+ {
+ if (state & enable_connection_aborted)
+ return invalid_socket;
+ // Fall through to retry operation.
+ }
+#endif // defined(EPROTO)
+ else
+ return invalid_socket;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_read(s, 0, -1, ec) < 0)
+ return invalid_socket;
+ }
+}
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+
+void complete_iocp_accept(socket_type s,
+ void* output_buffer, DWORD address_length,
+ socket_addr_type* addr, std::size_t* addrlen,
+ socket_type new_socket, boost::system::error_code& ec)
+{
+ // Map non-portable errors to their portable counterparts.
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = boost::asio::error::connection_aborted;
+
+ if (!ec)
+ {
+ // Get the address of the peer.
+ if (addr && addrlen)
+ {
+ LPSOCKADDR local_addr = 0;
+ int local_addr_length = 0;
+ LPSOCKADDR remote_addr = 0;
+ int remote_addr_length = 0;
+ GetAcceptExSockaddrs(output_buffer, 0, address_length,
+ address_length, &local_addr, &local_addr_length,
+ &remote_addr, &remote_addr_length);
+ if (static_cast<std::size_t>(remote_addr_length) > *addrlen)
+ {
+ ec = boost::asio::error::invalid_argument;
+ }
+ else
+ {
+ using namespace std; // For memcpy.
+ memcpy(addr, remote_addr, remote_addr_length);
+ *addrlen = static_cast<std::size_t>(remote_addr_length);
+ }
+ }
+
+ // Need to set the SO_UPDATE_ACCEPT_CONTEXT option so that getsockname
+ // and getpeername will work on the accepted socket.
+ SOCKET update_ctx_param = s;
+ socket_ops::state_type state = 0;
+ socket_ops::setsockopt(new_socket, state,
+ SOL_SOCKET, SO_UPDATE_ACCEPT_CONTEXT,
+ &update_ctx_param, sizeof(SOCKET), ec);
+ }
+}
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+bool non_blocking_accept(socket_type s,
+ state_type state, socket_addr_type* addr, std::size_t* addrlen,
+ boost::system::error_code& ec, socket_type& new_socket)
+{
+ for (;;)
+ {
+ // Accept the waiting connection.
+ new_socket = socket_ops::accept(s, addr, addrlen, ec);
+
+ // Check if operation succeeded.
+ if (new_socket != invalid_socket)
+ return true;
+
+ // Retry operation if interrupted by signal.
+ if (ec == boost::asio::error::interrupted)
+ continue;
+
+ // Operation failed.
+ if (ec == boost::asio::error::would_block
+ || ec == boost::asio::error::try_again)
+ {
+ // Fall through to retry operation.
+ }
+ else if (ec == boost::asio::error::connection_aborted)
+ {
+ if (state & enable_connection_aborted)
+ return true;
+ // Fall through to retry operation.
+ }
+#if defined(EPROTO)
+ else if (ec.value() == EPROTO)
+ {
+ if (state & enable_connection_aborted)
+ return true;
+ // Fall through to retry operation.
+ }
+#endif // defined(EPROTO)
+ else
+ return true;
+
+ return false;
+ }
+}
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+template <typename SockLenType>
+inline int call_bind(SockLenType msghdr::*,
+ socket_type s, const socket_addr_type* addr, std::size_t addrlen)
+{
+ return ::bind(s, addr, (SockLenType)addrlen);
+}
+
+int bind(socket_type s, const socket_addr_type* addr,
+ std::size_t addrlen, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+ clear_last_error();
+ int result = error_wrapper(call_bind(
+ &msghdr::msg_namelen, s, addr, addrlen), ec);
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+int close(socket_type s, state_type& state,
+ bool destruction, boost::system::error_code& ec)
+{
+ int result = 0;
+ if (s != invalid_socket)
+ {
+ // We don't want the destructor to block, so set the socket to linger in
+ // the background. If the user doesn't like this behaviour then they need
+ // to explicitly close the socket.
+ if (destruction && (state & user_set_linger))
+ {
+ ::linger opt;
+ opt.l_onoff = 0;
+ opt.l_linger = 0;
+ boost::system::error_code ignored_ec;
+ socket_ops::setsockopt(s, state, SOL_SOCKET,
+ SO_LINGER, &opt, sizeof(opt), ignored_ec);
+ }
+
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ result = error_wrapper(::closesocket(s), ec);
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ result = error_wrapper(::close(s), ec);
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+ if (result != 0
+ && (ec == boost::asio::error::would_block
+ || ec == boost::asio::error::try_again))
+ {
+ // According to UNIX Network Programming Vol. 1, it is possible for
+ // close() to fail with EWOULDBLOCK under certain circumstances. What
+ // isn't clear is the state of the descriptor after this error. The one
+ // current OS where this behaviour is seen, Windows, says that the socket
+ // remains open. Therefore we'll put the descriptor back into blocking
+ // mode and have another attempt at closing it.
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ioctl_arg_type arg = 0;
+ ::ioctlsocket(s, FIONBIO, &arg);
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if defined(__SYMBIAN32__)
+ int flags = ::fcntl(s, F_GETFL, 0);
+ if (flags >= 0)
+ ::fcntl(s, F_SETFL, flags & ~O_NONBLOCK);
+# else // defined(__SYMBIAN32__)
+ ioctl_arg_type arg = 0;
+ ::ioctl(s, FIONBIO, &arg);
+# endif // defined(__SYMBIAN32__)
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ state &= ~non_blocking;
+
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ result = error_wrapper(::closesocket(s), ec);
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ result = error_wrapper(::close(s), ec);
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ }
+ }
+
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+bool set_user_non_blocking(socket_type s,
+ state_type& state, bool value, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return false;
+ }
+
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ioctl_arg_type arg = (value ? 1 : 0);
+ int result = error_wrapper(::ioctlsocket(s, FIONBIO, &arg), ec);
+#elif defined(__SYMBIAN32__)
+ int result = error_wrapper(::fcntl(s, F_GETFL, 0), ec);
+ if (result >= 0)
+ {
+ clear_last_error();
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ result = error_wrapper(::fcntl(s, F_SETFL, flag), ec);
+ }
+#else
+ ioctl_arg_type arg = (value ? 1 : 0);
+ int result = error_wrapper(::ioctl(s, FIONBIO, &arg), ec);
+#endif
+
+ if (result >= 0)
+ {
+ ec = boost::system::error_code();
+ if (value)
+ state |= user_set_non_blocking;
+ else
+ {
+ // Clearing the user-set non-blocking mode always overrides any
+ // internally-set non-blocking flag. Any subsequent asynchronous
+ // operations will need to re-enable non-blocking I/O.
+ state &= ~(user_set_non_blocking | internal_non_blocking);
+ }
+ return true;
+ }
+
+ return false;
+}
+
+bool set_internal_non_blocking(socket_type s,
+ state_type& state, bool value, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return false;
+ }
+
+ if (!value && (state & user_set_non_blocking))
+ {
+ // It does not make sense to clear the internal non-blocking flag if the
+ // user still wants non-blocking behaviour. Return an error and let the
+ // caller figure out whether to update the user-set non-blocking flag.
+ ec = boost::asio::error::invalid_argument;
+ return false;
+ }
+
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ ioctl_arg_type arg = (value ? 1 : 0);
+ int result = error_wrapper(::ioctlsocket(s, FIONBIO, &arg), ec);
+#elif defined(__SYMBIAN32__)
+ int result = error_wrapper(::fcntl(s, F_GETFL, 0), ec);
+ if (result >= 0)
+ {
+ clear_last_error();
+ int flag = (value ? (result | O_NONBLOCK) : (result & ~O_NONBLOCK));
+ result = error_wrapper(::fcntl(s, F_SETFL, flag), ec);
+ }
+#else
+ ioctl_arg_type arg = (value ? 1 : 0);
+ int result = error_wrapper(::ioctl(s, FIONBIO, &arg), ec);
+#endif
+
+ if (result >= 0)
+ {
+ ec = boost::system::error_code();
+ if (value)
+ state |= internal_non_blocking;
+ else
+ state &= ~internal_non_blocking;
+ return true;
+ }
+
+ return false;
+}
+
+int shutdown(socket_type s, int what, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+ clear_last_error();
+ int result = error_wrapper(::shutdown(s, what), ec);
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+template <typename SockLenType>
+inline int call_connect(SockLenType msghdr::*,
+ socket_type s, const socket_addr_type* addr, std::size_t addrlen)
+{
+ return ::connect(s, addr, (SockLenType)addrlen);
+}
+
+int connect(socket_type s, const socket_addr_type* addr,
+ std::size_t addrlen, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+ clear_last_error();
+ int result = error_wrapper(call_connect(
+ &msghdr::msg_namelen, s, addr, addrlen), ec);
+ if (result == 0)
+ ec = boost::system::error_code();
+#if defined(__linux__)
+ else if (ec == boost::asio::error::try_again)
+ ec = boost::asio::error::no_buffer_space;
+#endif // defined(__linux__)
+ return result;
+}
+
+void sync_connect(socket_type s, const socket_addr_type* addr,
+ std::size_t addrlen, boost::system::error_code& ec)
+{
+ // Perform the connect operation.
+ socket_ops::connect(s, addr, addrlen, ec);
+ if (ec != boost::asio::error::in_progress
+ && ec != boost::asio::error::would_block)
+ {
+ // The connect operation finished immediately.
+ return;
+ }
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_connect(s, -1, ec) < 0)
+ return;
+
+ // Get the error code from the connect operation.
+ int connect_error = 0;
+ size_t connect_error_len = sizeof(connect_error);
+ if (socket_ops::getsockopt(s, 0, SOL_SOCKET, SO_ERROR,
+ &connect_error, &connect_error_len, ec) == socket_error_retval)
+ return;
+
+ // Return the result of the connect operation.
+ ec = boost::system::error_code(connect_error,
+ boost::asio::error::get_system_category());
+}
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+
+void complete_iocp_connect(socket_type s, boost::system::error_code& ec)
+{
+ // Map non-portable errors to their portable counterparts.
+ switch (ec.value())
+ {
+ case ERROR_CONNECTION_REFUSED:
+ ec = boost::asio::error::connection_refused;
+ break;
+ case ERROR_NETWORK_UNREACHABLE:
+ ec = boost::asio::error::network_unreachable;
+ break;
+ case ERROR_HOST_UNREACHABLE:
+ ec = boost::asio::error::host_unreachable;
+ break;
+ case ERROR_SEM_TIMEOUT:
+ ec = boost::asio::error::timed_out;
+ break;
+ default:
+ break;
+ }
+
+ if (!ec)
+ {
+ // Need to set the SO_UPDATE_CONNECT_CONTEXT option so that getsockname
+ // and getpeername will work on the connected socket.
+ socket_ops::state_type state = 0;
+ const int so_update_connect_context = 0x7010;
+ socket_ops::setsockopt(s, state, SOL_SOCKET,
+ so_update_connect_context, 0, 0, ec);
+ }
+}
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+bool non_blocking_connect(socket_type s, boost::system::error_code& ec)
+{
+ // Check if the connect operation has finished. This is required since we may
+ // get spurious readiness notifications from the reactor.
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(__SYMBIAN32__)
+ fd_set write_fds;
+ FD_ZERO(&write_fds);
+ FD_SET(s, &write_fds);
+ fd_set except_fds;
+ FD_ZERO(&except_fds);
+ FD_SET(s, &except_fds);
+ timeval zero_timeout;
+ zero_timeout.tv_sec = 0;
+ zero_timeout.tv_usec = 0;
+ int ready = ::select(s + 1, 0, &write_fds, &except_fds, &zero_timeout);
+#else // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ pollfd fds;
+ fds.fd = s;
+ fds.events = POLLOUT;
+ fds.revents = 0;
+ int ready = ::poll(&fds, 1, 0);
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ if (ready == 0)
+ {
+ // The asynchronous connect operation is still in progress.
+ return false;
+ }
+
+ // Get the error code from the connect operation.
+ int connect_error = 0;
+ size_t connect_error_len = sizeof(connect_error);
+ if (socket_ops::getsockopt(s, 0, SOL_SOCKET, SO_ERROR,
+ &connect_error, &connect_error_len, ec) == 0)
+ {
+ if (connect_error)
+ {
+ ec = boost::system::error_code(connect_error,
+ boost::asio::error::get_system_category());
+ }
+ else
+ ec = boost::system::error_code();
+ }
+
+ return true;
+}
+
+int socketpair(int af, int type, int protocol,
+ socket_type sv[2], boost::system::error_code& ec)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ (void)(af);
+ (void)(type);
+ (void)(protocol);
+ (void)(sv);
+ ec = boost::asio::error::operation_not_supported;
+ return socket_error_retval;
+#else
+ clear_last_error();
+ int result = error_wrapper(::socketpair(af, type, protocol, sv), ec);
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+#endif
+}
+
+bool sockatmark(socket_type s, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return false;
+ }
+
+#if defined(SIOCATMARK)
+ ioctl_arg_type value = 0;
+# if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ int result = error_wrapper(::ioctlsocket(s, SIOCATMARK, &value), ec);
+# else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ int result = error_wrapper(::ioctl(s, SIOCATMARK, &value), ec);
+# endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ if (result == 0)
+ ec = boost::system::error_code();
+# if defined(ENOTTY)
+ if (ec.value() == ENOTTY)
+ ec = boost::asio::error::not_socket;
+# endif // defined(ENOTTY)
+#else // defined(SIOCATMARK)
+ int value = error_wrapper(::sockatmark(s), ec);
+ if (value != -1)
+ ec = boost::system::error_code();
+#endif // defined(SIOCATMARK)
+
+ return ec ? false : value != 0;
+}
+
+size_t available(socket_type s, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ ioctl_arg_type value = 0;
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ int result = error_wrapper(::ioctlsocket(s, FIONREAD, &value), ec);
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ int result = error_wrapper(::ioctl(s, FIONREAD, &value), ec);
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ if (result == 0)
+ ec = boost::system::error_code();
+#if defined(ENOTTY)
+ if (ec.value() == ENOTTY)
+ ec = boost::asio::error::not_socket;
+#endif // defined(ENOTTY)
+
+ return ec ? static_cast<size_t>(0) : static_cast<size_t>(value);
+}
+
+int listen(socket_type s, int backlog, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+ clear_last_error();
+ int result = error_wrapper(::listen(s, backlog), ec);
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+inline void init_buf_iov_base(void*& base, void* addr)
+{
+ base = addr;
+}
+
+template <typename T>
+inline void init_buf_iov_base(T& base, void* addr)
+{
+ base = static_cast<T>(addr);
+}
+
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+typedef WSABUF buf;
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+typedef iovec buf;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+void init_buf(buf& b, void* data, size_t size)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ b.buf = static_cast<char*>(data);
+ b.len = static_cast<u_long>(size);
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ init_buf_iov_base(b.iov_base, data);
+ b.iov_len = size;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+void init_buf(buf& b, const void* data, size_t size)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ b.buf = static_cast<char*>(const_cast<void*>(data));
+ b.len = static_cast<u_long>(size);
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ init_buf_iov_base(b.iov_base, const_cast<void*>(data));
+ b.iov_len = size;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+inline void init_msghdr_msg_name(void*& name, socket_addr_type* addr)
+{
+ name = addr;
+}
+
+inline void init_msghdr_msg_name(void*& name, const socket_addr_type* addr)
+{
+ name = const_cast<socket_addr_type*>(addr);
+}
+
+template <typename T>
+inline void init_msghdr_msg_name(T& name, socket_addr_type* addr)
+{
+ name = reinterpret_cast<T>(addr);
+}
+
+template <typename T>
+inline void init_msghdr_msg_name(T& name, const socket_addr_type* addr)
+{
+ name = reinterpret_cast<T>(const_cast<socket_addr_type*>(addr));
+}
+
+signed_size_type recv(socket_type s, buf* bufs, size_t count,
+ int flags, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Receive some data.
+ DWORD recv_buf_count = static_cast<DWORD>(count);
+ DWORD bytes_transferred = 0;
+ DWORD recv_flags = flags;
+ int result = error_wrapper(::WSARecv(s, bufs,
+ recv_buf_count, &bytes_transferred, &recv_flags, 0, 0), ec);
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = boost::asio::error::connection_reset;
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ ec = boost::asio::error::connection_refused;
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ ec.assign(0, ec.category());
+ if (result != 0)
+ return socket_error_retval;
+ ec = boost::system::error_code();
+ return bytes_transferred;
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ msghdr msg = msghdr();
+ msg.msg_iov = bufs;
+ msg.msg_iovlen = static_cast<int>(count);
+ signed_size_type result = error_wrapper(::recvmsg(s, &msg, flags), ec);
+ if (result >= 0)
+ ec = boost::system::error_code();
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+size_t sync_recv(socket_type s, state_type state, buf* bufs,
+ size_t count, int flags, bool all_empty, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to read 0 bytes on a stream is a no-op.
+ if (all_empty && (state & stream_oriented))
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::recv(s, bufs, count, flags, ec);
+
+ // Check if operation succeeded.
+ if (bytes > 0)
+ return bytes;
+
+ // Check for EOF.
+ if ((state & stream_oriented) && bytes == 0)
+ {
+ ec = boost::asio::error::eof;
+ return 0;
+ }
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != boost::asio::error::would_block
+ && ec != boost::asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_read(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+
+void complete_iocp_recv(state_type state,
+ const weak_cancel_token_type& cancel_token, bool all_empty,
+ boost::system::error_code& ec, size_t bytes_transferred)
+{
+ // Map non-portable errors to their portable counterparts.
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ {
+ if (cancel_token.expired())
+ ec = boost::asio::error::operation_aborted;
+ else
+ ec = boost::asio::error::connection_reset;
+ }
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ {
+ ec = boost::asio::error::connection_refused;
+ }
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ {
+ ec.assign(0, ec.category());
+ }
+
+ // Check for connection closed.
+ else if (!ec && bytes_transferred == 0
+ && (state & stream_oriented) != 0
+ && !all_empty)
+ {
+ ec = boost::asio::error::eof;
+ }
+}
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+bool non_blocking_recv(socket_type s,
+ buf* bufs, size_t count, int flags, bool is_stream,
+ boost::system::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = socket_ops::recv(s, bufs, count, flags, ec);
+
+ // Check for end of stream.
+ if (is_stream && bytes == 0)
+ {
+ ec = boost::asio::error::eof;
+ return true;
+ }
+
+ // Retry operation if interrupted by signal.
+ if (ec == boost::asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == boost::asio::error::would_block
+ || ec == boost::asio::error::try_again)
+ return false;
+
+ // Operation is complete.
+ if (bytes >= 0)
+ {
+ ec = boost::system::error_code();
+ bytes_transferred = bytes;
+ }
+ else
+ bytes_transferred = 0;
+
+ return true;
+ }
+}
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+signed_size_type recvfrom(socket_type s, buf* bufs, size_t count,
+ int flags, socket_addr_type* addr, std::size_t* addrlen,
+ boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Receive some data.
+ DWORD recv_buf_count = static_cast<DWORD>(count);
+ DWORD bytes_transferred = 0;
+ DWORD recv_flags = flags;
+ int tmp_addrlen = (int)*addrlen;
+ int result = error_wrapper(::WSARecvFrom(s, bufs, recv_buf_count,
+ &bytes_transferred, &recv_flags, addr, &tmp_addrlen, 0, 0), ec);
+ *addrlen = (std::size_t)tmp_addrlen;
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = boost::asio::error::connection_reset;
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ ec = boost::asio::error::connection_refused;
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ ec.assign(0, ec.category());
+ if (result != 0)
+ return socket_error_retval;
+ ec = boost::system::error_code();
+ return bytes_transferred;
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ msghdr msg = msghdr();
+ init_msghdr_msg_name(msg.msg_name, addr);
+ msg.msg_namelen = static_cast<int>(*addrlen);
+ msg.msg_iov = bufs;
+ msg.msg_iovlen = static_cast<int>(count);
+ signed_size_type result = error_wrapper(::recvmsg(s, &msg, flags), ec);
+ *addrlen = msg.msg_namelen;
+ if (result >= 0)
+ ec = boost::system::error_code();
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+size_t sync_recvfrom(socket_type s, state_type state, buf* bufs,
+ size_t count, int flags, socket_addr_type* addr,
+ std::size_t* addrlen, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::recvfrom(
+ s, bufs, count, flags, addr, addrlen, ec);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != boost::asio::error::would_block
+ && ec != boost::asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_read(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+
+void complete_iocp_recvfrom(
+ const weak_cancel_token_type& cancel_token,
+ boost::system::error_code& ec)
+{
+ // Map non-portable errors to their portable counterparts.
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ {
+ if (cancel_token.expired())
+ ec = boost::asio::error::operation_aborted;
+ else
+ ec = boost::asio::error::connection_reset;
+ }
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ {
+ ec = boost::asio::error::connection_refused;
+ }
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ {
+ ec.assign(0, ec.category());
+ }
+}
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+bool non_blocking_recvfrom(socket_type s,
+ buf* bufs, size_t count, int flags,
+ socket_addr_type* addr, std::size_t* addrlen,
+ boost::system::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = socket_ops::recvfrom(
+ s, bufs, count, flags, addr, addrlen, ec);
+
+ // Retry operation if interrupted by signal.
+ if (ec == boost::asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == boost::asio::error::would_block
+ || ec == boost::asio::error::try_again)
+ return false;
+
+ // Operation is complete.
+ if (bytes >= 0)
+ {
+ ec = boost::system::error_code();
+ bytes_transferred = bytes;
+ }
+ else
+ bytes_transferred = 0;
+
+ return true;
+ }
+}
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+signed_size_type recvmsg(socket_type s, buf* bufs, size_t count,
+ int in_flags, int& out_flags, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ out_flags = 0;
+ return socket_ops::recv(s, bufs, count, in_flags, ec);
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ msghdr msg = msghdr();
+ msg.msg_iov = bufs;
+ msg.msg_iovlen = static_cast<int>(count);
+ signed_size_type result = error_wrapper(::recvmsg(s, &msg, in_flags), ec);
+ if (result >= 0)
+ {
+ ec = boost::system::error_code();
+ out_flags = msg.msg_flags;
+ }
+ else
+ out_flags = 0;
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+size_t sync_recvmsg(socket_type s, state_type state,
+ buf* bufs, size_t count, int in_flags, int& out_flags,
+ boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::recvmsg(
+ s, bufs, count, in_flags, out_flags, ec);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != boost::asio::error::would_block
+ && ec != boost::asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_read(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+
+void complete_iocp_recvmsg(
+ const weak_cancel_token_type& cancel_token,
+ boost::system::error_code& ec)
+{
+ // Map non-portable errors to their portable counterparts.
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ {
+ if (cancel_token.expired())
+ ec = boost::asio::error::operation_aborted;
+ else
+ ec = boost::asio::error::connection_reset;
+ }
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ {
+ ec = boost::asio::error::connection_refused;
+ }
+ else if (ec.value() == WSAEMSGSIZE || ec.value() == ERROR_MORE_DATA)
+ {
+ ec.assign(0, ec.category());
+ }
+}
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+bool non_blocking_recvmsg(socket_type s,
+ buf* bufs, size_t count, int in_flags, int& out_flags,
+ boost::system::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Read some data.
+ signed_size_type bytes = socket_ops::recvmsg(
+ s, bufs, count, in_flags, out_flags, ec);
+
+ // Retry operation if interrupted by signal.
+ if (ec == boost::asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == boost::asio::error::would_block
+ || ec == boost::asio::error::try_again)
+ return false;
+
+ // Operation is complete.
+ if (bytes >= 0)
+ {
+ ec = boost::system::error_code();
+ bytes_transferred = bytes;
+ }
+ else
+ bytes_transferred = 0;
+
+ return true;
+ }
+}
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+signed_size_type send(socket_type s, const buf* bufs, size_t count,
+ int flags, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Send the data.
+ DWORD send_buf_count = static_cast<DWORD>(count);
+ DWORD bytes_transferred = 0;
+ DWORD send_flags = flags;
+ int result = error_wrapper(::WSASend(s, const_cast<buf*>(bufs),
+ send_buf_count, &bytes_transferred, send_flags, 0, 0), ec);
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = boost::asio::error::connection_reset;
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ ec = boost::asio::error::connection_refused;
+ if (result != 0)
+ return socket_error_retval;
+ ec = boost::system::error_code();
+ return bytes_transferred;
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ msghdr msg = msghdr();
+ msg.msg_iov = const_cast<buf*>(bufs);
+ msg.msg_iovlen = static_cast<int>(count);
+#if defined(__linux__)
+ flags |= MSG_NOSIGNAL;
+#endif // defined(__linux__)
+ signed_size_type result = error_wrapper(::sendmsg(s, &msg, flags), ec);
+ if (result >= 0)
+ ec = boost::system::error_code();
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+size_t sync_send(socket_type s, state_type state, const buf* bufs,
+ size_t count, int flags, bool all_empty, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // A request to write 0 bytes to a stream is a no-op.
+ if (all_empty && (state & stream_oriented))
+ {
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ // Read some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::send(s, bufs, count, flags, ec);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != boost::asio::error::would_block
+ && ec != boost::asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_write(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+
+void complete_iocp_send(
+ const weak_cancel_token_type& cancel_token,
+ boost::system::error_code& ec)
+{
+ // Map non-portable errors to their portable counterparts.
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ {
+ if (cancel_token.expired())
+ ec = boost::asio::error::operation_aborted;
+ else
+ ec = boost::asio::error::connection_reset;
+ }
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ {
+ ec = boost::asio::error::connection_refused;
+ }
+}
+
+#else // defined(BOOST_ASIO_HAS_IOCP)
+
+bool non_blocking_send(socket_type s,
+ const buf* bufs, size_t count, int flags,
+ boost::system::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = socket_ops::send(s, bufs, count, flags, ec);
+
+ // Retry operation if interrupted by signal.
+ if (ec == boost::asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == boost::asio::error::would_block
+ || ec == boost::asio::error::try_again)
+ return false;
+
+ // Operation is complete.
+ if (bytes >= 0)
+ {
+ ec = boost::system::error_code();
+ bytes_transferred = bytes;
+ }
+ else
+ bytes_transferred = 0;
+
+ return true;
+ }
+}
+
+#endif // defined(BOOST_ASIO_HAS_IOCP)
+
+signed_size_type sendto(socket_type s, const buf* bufs, size_t count,
+ int flags, const socket_addr_type* addr, std::size_t addrlen,
+ boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ // Send the data.
+ DWORD send_buf_count = static_cast<DWORD>(count);
+ DWORD bytes_transferred = 0;
+ int result = error_wrapper(::WSASendTo(s, const_cast<buf*>(bufs),
+ send_buf_count, &bytes_transferred, flags, addr,
+ static_cast<int>(addrlen), 0, 0), ec);
+ if (ec.value() == ERROR_NETNAME_DELETED)
+ ec = boost::asio::error::connection_reset;
+ else if (ec.value() == ERROR_PORT_UNREACHABLE)
+ ec = boost::asio::error::connection_refused;
+ if (result != 0)
+ return socket_error_retval;
+ ec = boost::system::error_code();
+ return bytes_transferred;
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ msghdr msg = msghdr();
+ init_msghdr_msg_name(msg.msg_name, addr);
+ msg.msg_namelen = static_cast<int>(addrlen);
+ msg.msg_iov = const_cast<buf*>(bufs);
+ msg.msg_iovlen = static_cast<int>(count);
+#if defined(__linux__)
+ flags |= MSG_NOSIGNAL;
+#endif // defined(__linux__)
+ signed_size_type result = error_wrapper(::sendmsg(s, &msg, flags), ec);
+ if (result >= 0)
+ ec = boost::system::error_code();
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+size_t sync_sendto(socket_type s, state_type state, const buf* bufs,
+ size_t count, int flags, const socket_addr_type* addr,
+ std::size_t addrlen, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return 0;
+ }
+
+ // Write some data.
+ for (;;)
+ {
+ // Try to complete the operation without blocking.
+ signed_size_type bytes = socket_ops::sendto(
+ s, bufs, count, flags, addr, addrlen, ec);
+
+ // Check if operation succeeded.
+ if (bytes >= 0)
+ return bytes;
+
+ // Operation failed.
+ if ((state & user_set_non_blocking)
+ || (ec != boost::asio::error::would_block
+ && ec != boost::asio::error::try_again))
+ return 0;
+
+ // Wait for socket to become ready.
+ if (socket_ops::poll_write(s, 0, -1, ec) < 0)
+ return 0;
+ }
+}
+
+#if !defined(BOOST_ASIO_HAS_IOCP)
+
+bool non_blocking_sendto(socket_type s,
+ const buf* bufs, size_t count, int flags,
+ const socket_addr_type* addr, std::size_t addrlen,
+ boost::system::error_code& ec, size_t& bytes_transferred)
+{
+ for (;;)
+ {
+ // Write some data.
+ signed_size_type bytes = socket_ops::sendto(
+ s, bufs, count, flags, addr, addrlen, ec);
+
+ // Retry operation if interrupted by signal.
+ if (ec == boost::asio::error::interrupted)
+ continue;
+
+ // Check if we need to run the operation again.
+ if (ec == boost::asio::error::would_block
+ || ec == boost::asio::error::try_again)
+ return false;
+
+ // Operation is complete.
+ if (bytes >= 0)
+ {
+ ec = boost::system::error_code();
+ bytes_transferred = bytes;
+ }
+ else
+ bytes_transferred = 0;
+
+ return true;
+ }
+}
+
+#endif // !defined(BOOST_ASIO_HAS_IOCP)
+
+socket_type socket(int af, int type, int protocol,
+ boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ socket_type s = error_wrapper(::WSASocketW(af, type, protocol, 0, 0,
+ WSA_FLAG_OVERLAPPED), ec);
+ if (s == invalid_socket)
+ return s;
+
+ if (af == BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ // Try to enable the POSIX default behaviour of having IPV6_V6ONLY set to
+ // false. This will only succeed on Windows Vista and later versions of
+ // Windows, where a dual-stack IPv4/v6 implementation is available.
+ DWORD optval = 0;
+ ::setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY,
+ reinterpret_cast<const char*>(&optval), sizeof(optval));
+ }
+
+ ec = boost::system::error_code();
+
+ return s;
+#elif defined(__MACH__) && defined(__APPLE__) || defined(__FreeBSD__)
+ socket_type s = error_wrapper(::socket(af, type, protocol), ec);
+ if (s == invalid_socket)
+ return s;
+
+ int optval = 1;
+ int result = error_wrapper(::setsockopt(s,
+ SOL_SOCKET, SO_NOSIGPIPE, &optval, sizeof(optval)), ec);
+ if (result != 0)
+ {
+ ::close(s);
+ return invalid_socket;
+ }
+
+ return s;
+#else
+ int s = error_wrapper(::socket(af, type, protocol), ec);
+ if (s >= 0)
+ ec = boost::system::error_code();
+ return s;
+#endif
+}
+
+template <typename SockLenType>
+inline int call_setsockopt(SockLenType msghdr::*,
+ socket_type s, int level, int optname,
+ const void* optval, std::size_t optlen)
+{
+ return ::setsockopt(s, level, optname,
+ (const char*)optval, (SockLenType)optlen);
+}
+
+int setsockopt(socket_type s, state_type& state, int level, int optname,
+ const void* optval, std::size_t optlen, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+ if (level == custom_socket_option_level && optname == always_fail_option)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return socket_error_retval;
+ }
+
+ if (level == custom_socket_option_level
+ && optname == enable_connection_aborted_option)
+ {
+ if (optlen != sizeof(int))
+ {
+ ec = boost::asio::error::invalid_argument;
+ return socket_error_retval;
+ }
+
+ if (*static_cast<const int*>(optval))
+ state |= enable_connection_aborted;
+ else
+ state &= ~enable_connection_aborted;
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ if (level == SOL_SOCKET && optname == SO_LINGER)
+ state |= user_set_linger;
+
+#if defined(__BORLANDC__)
+ // Mysteriously, using the getsockopt and setsockopt functions directly with
+ // Borland C++ results in incorrect values being set and read. The bug can be
+ // worked around by using function addresses resolved with GetProcAddress.
+ if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
+ {
+ typedef int (WSAAPI *sso_t)(SOCKET, int, int, const char*, int);
+ if (sso_t sso = (sso_t)::GetProcAddress(winsock_module, "setsockopt"))
+ {
+ clear_last_error();
+ return error_wrapper(sso(s, level, optname,
+ reinterpret_cast<const char*>(optval),
+ static_cast<int>(optlen)), ec);
+ }
+ }
+ ec = boost::asio::error::fault;
+ return socket_error_retval;
+#else // defined(__BORLANDC__)
+ clear_last_error();
+ int result = error_wrapper(call_setsockopt(&msghdr::msg_namelen,
+ s, level, optname, optval, optlen), ec);
+ if (result == 0)
+ {
+ ec = boost::system::error_code();
+
+#if defined(__MACH__) && defined(__APPLE__) \
+ || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ // To implement portable behaviour for SO_REUSEADDR with UDP sockets we
+ // need to also set SO_REUSEPORT on BSD-based platforms.
+ if ((state & datagram_oriented)
+ && level == SOL_SOCKET && optname == SO_REUSEADDR)
+ {
+ call_setsockopt(&msghdr::msg_namelen, s,
+ SOL_SOCKET, SO_REUSEPORT, optval, optlen);
+ }
+#endif
+ }
+
+ return result;
+#endif // defined(__BORLANDC__)
+}
+
+template <typename SockLenType>
+inline int call_getsockopt(SockLenType msghdr::*,
+ socket_type s, int level, int optname,
+ void* optval, std::size_t* optlen)
+{
+ SockLenType tmp_optlen = (SockLenType)*optlen;
+ int result = ::getsockopt(s, level, optname, (char*)optval, &tmp_optlen);
+ *optlen = (std::size_t)tmp_optlen;
+ return result;
+}
+
+int getsockopt(socket_type s, state_type state, int level, int optname,
+ void* optval, size_t* optlen, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+ if (level == custom_socket_option_level && optname == always_fail_option)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return socket_error_retval;
+ }
+
+ if (level == custom_socket_option_level
+ && optname == enable_connection_aborted_option)
+ {
+ if (*optlen != sizeof(int))
+ {
+ ec = boost::asio::error::invalid_argument;
+ return socket_error_retval;
+ }
+
+ *static_cast<int*>(optval) = (state & enable_connection_aborted) ? 1 : 0;
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+#if defined(__BORLANDC__)
+ // Mysteriously, using the getsockopt and setsockopt functions directly with
+ // Borland C++ results in incorrect values being set and read. The bug can be
+ // worked around by using function addresses resolved with GetProcAddress.
+ if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
+ {
+ typedef int (WSAAPI *gso_t)(SOCKET, int, int, char*, int*);
+ if (gso_t gso = (gso_t)::GetProcAddress(winsock_module, "getsockopt"))
+ {
+ clear_last_error();
+ int tmp_optlen = static_cast<int>(*optlen);
+ int result = error_wrapper(gso(s, level, optname,
+ reinterpret_cast<char*>(optval), &tmp_optlen), ec);
+ *optlen = static_cast<size_t>(tmp_optlen);
+ if (result != 0 && level == IPPROTO_IPV6 && optname == IPV6_V6ONLY
+ && ec.value() == WSAENOPROTOOPT && *optlen == sizeof(DWORD))
+ {
+ // Dual-stack IPv4/v6 sockets, and the IPV6_V6ONLY socket option, are
+ // only supported on Windows Vista and later. To simplify program logic
+ // we will fake success of getting this option and specify that the
+ // value is non-zero (i.e. true). This corresponds to the behavior of
+ // IPv6 sockets on Windows platforms pre-Vista.
+ *static_cast<DWORD*>(optval) = 1;
+ ec = boost::system::error_code();
+ }
+ return result;
+ }
+ }
+ ec = boost::asio::error::fault;
+ return socket_error_retval;
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ clear_last_error();
+ int result = error_wrapper(call_getsockopt(&msghdr::msg_namelen,
+ s, level, optname, optval, optlen), ec);
+ if (result != 0 && level == IPPROTO_IPV6 && optname == IPV6_V6ONLY
+ && ec.value() == WSAENOPROTOOPT && *optlen == sizeof(DWORD))
+ {
+ // Dual-stack IPv4/v6 sockets, and the IPV6_V6ONLY socket option, are only
+ // supported on Windows Vista and later. To simplify program logic we will
+ // fake success of getting this option and specify that the value is
+ // non-zero (i.e. true). This corresponds to the behavior of IPv6 sockets
+ // on Windows platforms pre-Vista.
+ *static_cast<DWORD*>(optval) = 1;
+ ec = boost::system::error_code();
+ }
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ clear_last_error();
+ int result = error_wrapper(call_getsockopt(&msghdr::msg_namelen,
+ s, level, optname, optval, optlen), ec);
+#if defined(__linux__)
+ if (result == 0 && level == SOL_SOCKET && *optlen == sizeof(int)
+ && (optname == SO_SNDBUF || optname == SO_RCVBUF))
+ {
+ // On Linux, setting SO_SNDBUF or SO_RCVBUF to N actually causes the kernel
+ // to set the buffer size to N*2. Linux puts additional stuff into the
+ // buffers so that only about half is actually available to the application.
+ // The retrieved value is divided by 2 here to make it appear as though the
+ // correct value has been set.
+ *static_cast<int*>(optval) /= 2;
+ }
+#endif // defined(__linux__)
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+template <typename SockLenType>
+inline int call_getpeername(SockLenType msghdr::*,
+ socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+{
+ SockLenType tmp_addrlen = (SockLenType)*addrlen;
+ int result = ::getpeername(s, addr, &tmp_addrlen);
+ *addrlen = (std::size_t)tmp_addrlen;
+ return result;
+}
+
+int getpeername(socket_type s, socket_addr_type* addr,
+ std::size_t* addrlen, bool cached, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+#if defined(BOOST_ASIO_WINDOWS) && !defined(BOOST_ASIO_WINDOWS_APP) \
+ || defined(__CYGWIN__)
+ if (cached)
+ {
+ // Check if socket is still connected.
+ DWORD connect_time = 0;
+ size_t connect_time_len = sizeof(connect_time);
+ if (socket_ops::getsockopt(s, 0, SOL_SOCKET, SO_CONNECT_TIME,
+ &connect_time, &connect_time_len, ec) == socket_error_retval)
+ {
+ return socket_error_retval;
+ }
+ if (connect_time == 0xFFFFFFFF)
+ {
+ ec = boost::asio::error::not_connected;
+ return socket_error_retval;
+ }
+
+ // The cached value is still valid.
+ ec = boost::system::error_code();
+ return 0;
+ }
+#else // defined(BOOST_ASIO_WINDOWS) && !defined(BOOST_ASIO_WINDOWS_APP)
+ // || defined(__CYGWIN__)
+ (void)cached;
+#endif // defined(BOOST_ASIO_WINDOWS) && !defined(BOOST_ASIO_WINDOWS_APP)
+ // || defined(__CYGWIN__)
+
+ clear_last_error();
+ int result = error_wrapper(call_getpeername(
+ &msghdr::msg_namelen, s, addr, addrlen), ec);
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+template <typename SockLenType>
+inline int call_getsockname(SockLenType msghdr::*,
+ socket_type s, socket_addr_type* addr, std::size_t* addrlen)
+{
+ SockLenType tmp_addrlen = (SockLenType)*addrlen;
+ int result = ::getsockname(s, addr, &tmp_addrlen);
+ *addrlen = (std::size_t)tmp_addrlen;
+ return result;
+}
+
+int getsockname(socket_type s, socket_addr_type* addr,
+ std::size_t* addrlen, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+ clear_last_error();
+ int result = error_wrapper(call_getsockname(
+ &msghdr::msg_namelen, s, addr, addrlen), ec);
+ if (result == 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+int ioctl(socket_type s, state_type& state, int cmd,
+ ioctl_arg_type* arg, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ int result = error_wrapper(::ioctlsocket(s, cmd, arg), ec);
+#elif defined(__MACH__) && defined(__APPLE__) \
+ || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
+ int result = error_wrapper(::ioctl(s,
+ static_cast<unsigned int>(cmd), arg), ec);
+#else
+ int result = error_wrapper(::ioctl(s, cmd, arg), ec);
+#endif
+ if (result >= 0)
+ {
+ ec = boost::system::error_code();
+
+ // When updating the non-blocking mode we always perform the ioctl syscall,
+ // even if the flags would otherwise indicate that the socket is already in
+ // the correct state. This ensures that the underlying socket is put into
+ // the state that has been requested by the user. If the ioctl syscall was
+ // successful then we need to update the flags to match.
+ if (cmd == static_cast<int>(FIONBIO))
+ {
+ if (*arg)
+ {
+ state |= user_set_non_blocking;
+ }
+ else
+ {
+ // Clearing the non-blocking mode always overrides any internally-set
+ // non-blocking flag. Any subsequent asynchronous operations will need
+ // to re-enable non-blocking I/O.
+ state &= ~(user_set_non_blocking | internal_non_blocking);
+ }
+ }
+ }
+
+ return result;
+}
+
+int select(int nfds, fd_set* readfds, fd_set* writefds,
+ fd_set* exceptfds, timeval* timeout, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ if (!readfds && !writefds && !exceptfds && timeout)
+ {
+ DWORD milliseconds = timeout->tv_sec * 1000 + timeout->tv_usec / 1000;
+ if (milliseconds == 0)
+ milliseconds = 1; // Force context switch.
+ ::Sleep(milliseconds);
+ ec = boost::system::error_code();
+ return 0;
+ }
+
+ // The select() call allows timeout values measured in microseconds, but the
+ // system clock (as wrapped by boost::posix_time::microsec_clock) typically
+ // has a resolution of 10 milliseconds. This can lead to a spinning select
+ // reactor, meaning increased CPU usage, when waiting for the earliest
+ // scheduled timeout if it's less than 10 milliseconds away. To avoid a tight
+ // spin we'll use a minimum timeout of 1 millisecond.
+ if (timeout && timeout->tv_sec == 0
+ && timeout->tv_usec > 0 && timeout->tv_usec < 1000)
+ timeout->tv_usec = 1000;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+
+#if defined(__hpux) && defined(__SELECT)
+ timespec ts;
+ ts.tv_sec = timeout ? timeout->tv_sec : 0;
+ ts.tv_nsec = timeout ? timeout->tv_usec * 1000 : 0;
+ return error_wrapper(::pselect(nfds, readfds,
+ writefds, exceptfds, timeout ? &ts : 0, 0), ec);
+#else
+ int result = error_wrapper(::select(nfds, readfds,
+ writefds, exceptfds, timeout), ec);
+ if (result >= 0)
+ ec = boost::system::error_code();
+ return result;
+#endif
+}
+
+int poll_read(socket_type s, state_type state,
+ int msec, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(__SYMBIAN32__)
+ fd_set fds;
+ FD_ZERO(&fds);
+ FD_SET(s, &fds);
+ timeval timeout_obj;
+ timeval* timeout;
+ if (state & user_set_non_blocking)
+ {
+ timeout_obj.tv_sec = 0;
+ timeout_obj.tv_usec = 0;
+ timeout = &timeout_obj;
+ }
+ else if (msec >= 0)
+ {
+ timeout_obj.tv_sec = msec / 1000;
+ timeout_obj.tv_usec = (msec % 1000) * 1000;
+ timeout = &timeout_obj;
+ }
+ else
+ timeout = 0;
+ clear_last_error();
+ int result = error_wrapper(::select(s + 1, &fds, 0, 0, timeout), ec);
+#else // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ pollfd fds;
+ fds.fd = s;
+ fds.events = POLLIN;
+ fds.revents = 0;
+ int timeout = (state & user_set_non_blocking) ? 0 : msec;
+ clear_last_error();
+ int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ if (result == 0)
+ ec = (state & user_set_non_blocking)
+ ? boost::asio::error::would_block : boost::system::error_code();
+ else if (result > 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+int poll_write(socket_type s, state_type state,
+ int msec, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(__SYMBIAN32__)
+ fd_set fds;
+ FD_ZERO(&fds);
+ FD_SET(s, &fds);
+ timeval timeout_obj;
+ timeval* timeout;
+ if (state & user_set_non_blocking)
+ {
+ timeout_obj.tv_sec = 0;
+ timeout_obj.tv_usec = 0;
+ timeout = &timeout_obj;
+ }
+ else if (msec >= 0)
+ {
+ timeout_obj.tv_sec = msec / 1000;
+ timeout_obj.tv_usec = (msec % 1000) * 1000;
+ timeout = &timeout_obj;
+ }
+ else
+ timeout = 0;
+ clear_last_error();
+ int result = error_wrapper(::select(s + 1, 0, &fds, 0, timeout), ec);
+#else // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ pollfd fds;
+ fds.fd = s;
+ fds.events = POLLOUT;
+ fds.revents = 0;
+ int timeout = (state & user_set_non_blocking) ? 0 : msec;
+ clear_last_error();
+ int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ if (result == 0)
+ ec = (state & user_set_non_blocking)
+ ? boost::asio::error::would_block : boost::system::error_code();
+ else if (result > 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+int poll_error(socket_type s, state_type state,
+ int msec, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(__SYMBIAN32__)
+ fd_set fds;
+ FD_ZERO(&fds);
+ FD_SET(s, &fds);
+ timeval timeout_obj;
+ timeval* timeout;
+ if (state & user_set_non_blocking)
+ {
+ timeout_obj.tv_sec = 0;
+ timeout_obj.tv_usec = 0;
+ timeout = &timeout_obj;
+ }
+ else if (msec >= 0)
+ {
+ timeout_obj.tv_sec = msec / 1000;
+ timeout_obj.tv_usec = (msec % 1000) * 1000;
+ timeout = &timeout_obj;
+ }
+ else
+ timeout = 0;
+ clear_last_error();
+ int result = error_wrapper(::select(s + 1, 0, 0, &fds, timeout), ec);
+#else // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ pollfd fds;
+ fds.fd = s;
+ fds.events = POLLPRI | POLLERR | POLLHUP;
+ fds.revents = 0;
+ int timeout = (state & user_set_non_blocking) ? 0 : msec;
+ clear_last_error();
+ int result = error_wrapper(::poll(&fds, 1, timeout), ec);
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ if (result == 0)
+ ec = (state & user_set_non_blocking)
+ ? boost::asio::error::would_block : boost::system::error_code();
+ else if (result > 0)
+ ec = boost::system::error_code();
+ return result;
+}
+
+int poll_connect(socket_type s, int msec, boost::system::error_code& ec)
+{
+ if (s == invalid_socket)
+ {
+ ec = boost::asio::error::bad_descriptor;
+ return socket_error_retval;
+ }
+
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(__SYMBIAN32__)
+ fd_set write_fds;
+ FD_ZERO(&write_fds);
+ FD_SET(s, &write_fds);
+ fd_set except_fds;
+ FD_ZERO(&except_fds);
+ FD_SET(s, &except_fds);
+ timeval timeout_obj;
+ timeval* timeout;
+ if (msec >= 0)
+ {
+ timeout_obj.tv_sec = msec / 1000;
+ timeout_obj.tv_usec = (msec % 1000) * 1000;
+ timeout = &timeout_obj;
+ }
+ else
+ timeout = 0;
+ clear_last_error();
+ int result = error_wrapper(::select(
+ s + 1, 0, &write_fds, &except_fds, timeout), ec);
+ if (result >= 0)
+ ec = boost::system::error_code();
+ return result;
+#else // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+ pollfd fds;
+ fds.fd = s;
+ fds.events = POLLOUT;
+ fds.revents = 0;
+ clear_last_error();
+ int result = error_wrapper(::poll(&fds, 1, msec), ec);
+ if (result >= 0)
+ ec = boost::system::error_code();
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS)
+ // || defined(__CYGWIN__)
+ // || defined(__SYMBIAN32__)
+}
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+const char* inet_ntop(int af, const void* src, char* dest, size_t length,
+ unsigned long scope_id, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ using namespace std; // For sprintf.
+ const unsigned char* bytes = static_cast<const unsigned char*>(src);
+ if (af == BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ sprintf_s(dest, length, "%u.%u.%u.%u",
+ bytes[0], bytes[1], bytes[2], bytes[3]);
+ return dest;
+ }
+ else if (af == BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ size_t n = 0, b = 0, z = 0;
+ while (n < length && b < 16)
+ {
+ if (bytes[b] == 0 && bytes[b + 1] == 0 && z == 0)
+ {
+ do b += 2; while (b < 16 && bytes[b] == 0 && bytes[b + 1] == 0);
+ n += sprintf_s(dest + n, length - n, ":%s", b < 16 ? "" : ":"), ++z;
+ }
+ else
+ {
+ n += sprintf_s(dest + n, length - n, "%s%x", b ? ":" : "",
+ (static_cast<u_long_type>(bytes[b]) << 8) | bytes[b + 1]);
+ b += 2;
+ }
+ }
+ if (scope_id)
+ n += sprintf_s(dest + n, length - n, "%%%lu", scope_id);
+ return dest;
+ }
+ else
+ {
+ ec = boost::asio::error::address_family_not_supported;
+ return 0;
+ }
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ using namespace std; // For memcpy.
+
+ if (af != BOOST_ASIO_OS_DEF(AF_INET) && af != BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ ec = boost::asio::error::address_family_not_supported;
+ return 0;
+ }
+
+ union
+ {
+ socket_addr_type base;
+ sockaddr_storage_type storage;
+ sockaddr_in4_type v4;
+ sockaddr_in6_type v6;
+ } address;
+ DWORD address_length;
+ if (af == BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ address_length = sizeof(sockaddr_in4_type);
+ address.v4.sin_family = BOOST_ASIO_OS_DEF(AF_INET);
+ address.v4.sin_port = 0;
+ memcpy(&address.v4.sin_addr, src, sizeof(in4_addr_type));
+ }
+ else // AF_INET6
+ {
+ address_length = sizeof(sockaddr_in6_type);
+ address.v6.sin6_family = BOOST_ASIO_OS_DEF(AF_INET6);
+ address.v6.sin6_port = 0;
+ address.v6.sin6_flowinfo = 0;
+ address.v6.sin6_scope_id = scope_id;
+ memcpy(&address.v6.sin6_addr, src, sizeof(in6_addr_type));
+ }
+
+ DWORD string_length = static_cast<DWORD>(length);
+#if defined(BOOST_NO_ANSI_APIS) || (defined(_MSC_VER) && (_MSC_VER >= 1800))
+ LPWSTR string_buffer = (LPWSTR)_alloca(length * sizeof(WCHAR));
+ int result = error_wrapper(::WSAAddressToStringW(&address.base,
+ address_length, 0, string_buffer, &string_length), ec);
+ ::WideCharToMultiByte(CP_ACP, 0, string_buffer, -1,
+ dest, static_cast<int>(length), 0, 0);
+#else
+ int result = error_wrapper(::WSAAddressToStringA(
+ &address.base, address_length, 0, dest, &string_length), ec);
+#endif
+
+ // Windows may set error code on success.
+ if (result != socket_error_retval)
+ ec = boost::system::error_code();
+
+ // Windows may not set an error code on failure.
+ else if (result == socket_error_retval && !ec)
+ ec = boost::asio::error::invalid_argument;
+
+ return result == socket_error_retval ? 0 : dest;
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ const char* result = error_wrapper(::inet_ntop(
+ af, src, dest, static_cast<int>(length)), ec);
+ if (result == 0 && !ec)
+ ec = boost::asio::error::invalid_argument;
+ if (result != 0 && af == BOOST_ASIO_OS_DEF(AF_INET6) && scope_id != 0)
+ {
+ using namespace std; // For strcat and sprintf.
+ char if_name[(IF_NAMESIZE > 21 ? IF_NAMESIZE : 21) + 1] = "%";
+ const in6_addr_type* ipv6_address = static_cast<const in6_addr_type*>(src);
+ bool is_link_local = ((ipv6_address->s6_addr[0] == 0xfe)
+ && ((ipv6_address->s6_addr[1] & 0xc0) == 0x80));
+ bool is_multicast_link_local = ((ipv6_address->s6_addr[0] == 0xff)
+ && ((ipv6_address->s6_addr[1] & 0x0f) == 0x02));
+ if ((!is_link_local && !is_multicast_link_local)
+ || if_indextoname(static_cast<unsigned>(scope_id), if_name + 1) == 0)
+ sprintf(if_name + 1, "%lu", scope_id);
+ strcat(dest, if_name);
+ }
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+int inet_pton(int af, const char* src, void* dest,
+ unsigned long* scope_id, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ using namespace std; // For sscanf.
+ unsigned char* bytes = static_cast<unsigned char*>(dest);
+ if (af == BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ unsigned int b0, b1, b2, b3;
+ if (sscanf_s(src, "%u.%u.%u.%u", &b0, &b1, &b2, &b3) != 4)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+ if (b0 > 255 || b1 > 255 || b2 > 255 || b3 > 255)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+ bytes[0] = static_cast<unsigned char>(b0);
+ bytes[1] = static_cast<unsigned char>(b1);
+ bytes[2] = static_cast<unsigned char>(b2);
+ bytes[3] = static_cast<unsigned char>(b3);
+ ec = boost::system::error_code();
+ return 1;
+ }
+ else if (af == BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ unsigned char* bytes = static_cast<unsigned char*>(dest);
+ std::memset(bytes, 0, 16);
+ unsigned char back_bytes[16] = { 0 };
+ int num_front_bytes = 0, num_back_bytes = 0;
+ const char* p = src;
+
+ enum { fword, fcolon, bword, scope, done } state = fword;
+ unsigned long current_word = 0;
+ while (state != done)
+ {
+ if (current_word > 0xFFFF)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+
+ switch (state)
+ {
+ case fword:
+ if (*p >= '0' && *p <= '9')
+ current_word = current_word * 16 + *p++ - '0';
+ else if (*p >= 'a' && *p <= 'f')
+ current_word = current_word * 16 + *p++ - 'a' + 10;
+ else if (*p >= 'A' && *p <= 'F')
+ current_word = current_word * 16 + *p++ - 'A' + 10;
+ else
+ {
+ if (num_front_bytes == 16)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+
+ bytes[num_front_bytes++] = (current_word >> 8) & 0xFF;
+ bytes[num_front_bytes++] = current_word & 0xFF;
+ current_word = 0;
+
+ if (*p == ':')
+ state = fcolon, ++p;
+ else if (*p == '%')
+ state = scope, ++p;
+ else if (*p == 0)
+ state = done;
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+ }
+ break;
+
+ case fcolon:
+ if (*p == ':')
+ state = bword, ++p;
+ else
+ state = fword;
+ break;
+
+ case bword:
+ if (*p >= '0' && *p <= '9')
+ current_word = current_word * 16 + *p++ - '0';
+ else if (*p >= 'a' && *p <= 'f')
+ current_word = current_word * 16 + *p++ - 'a' + 10;
+ else if (*p >= 'A' && *p <= 'F')
+ current_word = current_word * 16 + *p++ - 'A' + 10;
+ else
+ {
+ if (num_front_bytes + num_back_bytes == 16)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+
+ back_bytes[num_back_bytes++] = (current_word >> 8) & 0xFF;
+ back_bytes[num_back_bytes++] = current_word & 0xFF;
+ current_word = 0;
+
+ if (*p == ':')
+ state = bword, ++p;
+ else if (*p == '%')
+ state = scope, ++p;
+ else if (*p == 0)
+ state = done;
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+ }
+ break;
+
+ case scope:
+ if (*p >= '0' && *p <= '9')
+ current_word = current_word * 10 + *p++ - '0';
+ else if (*p == 0)
+ *scope_id = current_word, state = done;
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ return -1;
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ for (int i = 0; i < num_back_bytes; ++i)
+ bytes[16 - num_back_bytes + i] = back_bytes[i];
+
+ ec = boost::system::error_code();
+ return 1;
+ }
+ else
+ {
+ ec = boost::asio::error::address_family_not_supported;
+ return -1;
+ }
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ using namespace std; // For memcpy and strcmp.
+
+ if (af != BOOST_ASIO_OS_DEF(AF_INET) && af != BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ ec = boost::asio::error::address_family_not_supported;
+ return -1;
+ }
+
+ union
+ {
+ socket_addr_type base;
+ sockaddr_storage_type storage;
+ sockaddr_in4_type v4;
+ sockaddr_in6_type v6;
+ } address;
+ int address_length = sizeof(sockaddr_storage_type);
+#if defined(BOOST_NO_ANSI_APIS) || (defined(_MSC_VER) && (_MSC_VER >= 1800))
+ int num_wide_chars = static_cast<int>(strlen(src)) + 1;
+ LPWSTR wide_buffer = (LPWSTR)_alloca(num_wide_chars * sizeof(WCHAR));
+ ::MultiByteToWideChar(CP_ACP, 0, src, -1, wide_buffer, num_wide_chars);
+ int result = error_wrapper(::WSAStringToAddressW(
+ wide_buffer, af, 0, &address.base, &address_length), ec);
+#else
+ int result = error_wrapper(::WSAStringToAddressA(
+ const_cast<char*>(src), af, 0, &address.base, &address_length), ec);
+#endif
+
+ if (af == BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ if (result != socket_error_retval)
+ {
+ memcpy(dest, &address.v4.sin_addr, sizeof(in4_addr_type));
+ ec = boost::system::error_code();
+ }
+ else if (strcmp(src, "255.255.255.255") == 0)
+ {
+ static_cast<in4_addr_type*>(dest)->s_addr = INADDR_NONE;
+ ec = boost::system::error_code();
+ }
+ }
+ else // AF_INET6
+ {
+ if (result != socket_error_retval)
+ {
+ memcpy(dest, &address.v6.sin6_addr, sizeof(in6_addr_type));
+ if (scope_id)
+ *scope_id = address.v6.sin6_scope_id;
+ ec = boost::system::error_code();
+ }
+ }
+
+ // Windows may not set an error code on failure.
+ if (result == socket_error_retval && !ec)
+ ec = boost::asio::error::invalid_argument;
+
+ if (result != socket_error_retval)
+ ec = boost::system::error_code();
+
+ return result == socket_error_retval ? -1 : 1;
+#else // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ using namespace std; // For strchr, memcpy and atoi.
+
+ // On some platforms, inet_pton fails if an address string contains a scope
+ // id. Detect and remove the scope id before passing the string to inet_pton.
+ const bool is_v6 = (af == BOOST_ASIO_OS_DEF(AF_INET6));
+ const char* if_name = is_v6 ? strchr(src, '%') : 0;
+ char src_buf[max_addr_v6_str_len + 1];
+ const char* src_ptr = src;
+ if (if_name != 0)
+ {
+ if (if_name - src > max_addr_v6_str_len)
+ {
+ ec = boost::asio::error::invalid_argument;
+ return 0;
+ }
+ memcpy(src_buf, src, if_name - src);
+ src_buf[if_name - src] = 0;
+ src_ptr = src_buf;
+ }
+
+ int result = error_wrapper(::inet_pton(af, src_ptr, dest), ec);
+ if (result <= 0 && !ec)
+ ec = boost::asio::error::invalid_argument;
+ if (result > 0 && is_v6 && scope_id)
+ {
+ using namespace std; // For strchr and atoi.
+ *scope_id = 0;
+ if (if_name != 0)
+ {
+ in6_addr_type* ipv6_address = static_cast<in6_addr_type*>(dest);
+ bool is_link_local = ((ipv6_address->s6_addr[0] == 0xfe)
+ && ((ipv6_address->s6_addr[1] & 0xc0) == 0x80));
+ bool is_multicast_link_local = ((ipv6_address->s6_addr[0] == 0xff)
+ && ((ipv6_address->s6_addr[1] & 0x0f) == 0x02));
+ if (is_link_local || is_multicast_link_local)
+ *scope_id = if_nametoindex(if_name + 1);
+ if (*scope_id == 0)
+ *scope_id = atoi(if_name + 1);
+ }
+ }
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+}
+
+int gethostname(char* name, int namelen, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ try
+ {
+ using namespace Windows::Foundation::Collections;
+ using namespace Windows::Networking;
+ using namespace Windows::Networking::Connectivity;
+ IVectorView<HostName^>^ hostnames = NetworkInformation::GetHostNames();
+ for (unsigned i = 0; i < hostnames->Size; ++i)
+ {
+ HostName^ hostname = hostnames->GetAt(i);
+ if (hostname->Type == HostNameType::DomainName)
+ {
+ std::wstring_convert<std::codecvt_utf8<wchar_t>> converter;
+ std::string raw_name = converter.to_bytes(hostname->RawName->Data());
+ if (namelen > 0 && raw_name.size() < static_cast<std::size_t>(namelen))
+ {
+ strcpy_s(name, namelen, raw_name.c_str());
+ return 0;
+ }
+ }
+ }
+ return -1;
+ }
+ catch (Platform::Exception^ e)
+ {
+ ec = boost::system::error_code(e->HResult,
+ boost::system::system_category());
+ return -1;
+ }
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ int result = error_wrapper(::gethostname(name, namelen), ec);
+# if defined(BOOST_ASIO_WINDOWS)
+ if (result == 0)
+ ec = boost::system::error_code();
+# endif // defined(BOOST_ASIO_WINDOWS)
+ return result;
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+}
+
+#if !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#if !defined(BOOST_ASIO_HAS_GETADDRINFO)
+
+// The following functions are only needed for emulation of getaddrinfo and
+// getnameinfo.
+
+inline boost::system::error_code translate_netdb_error(int error)
+{
+ switch (error)
+ {
+ case 0:
+ return boost::system::error_code();
+ case HOST_NOT_FOUND:
+ return boost::asio::error::host_not_found;
+ case TRY_AGAIN:
+ return boost::asio::error::host_not_found_try_again;
+ case NO_RECOVERY:
+ return boost::asio::error::no_recovery;
+ case NO_DATA:
+ return boost::asio::error::no_data;
+ default:
+ BOOST_ASIO_ASSERT(false);
+ return boost::asio::error::invalid_argument;
+ }
+}
+
+inline hostent* gethostbyaddr(const char* addr, int length, int af,
+ hostent* result, char* buffer, int buflength, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ (void)(buffer);
+ (void)(buflength);
+ hostent* retval = error_wrapper(::gethostbyaddr(addr, length, af), ec);
+ if (!retval)
+ return 0;
+ ec = boost::system::error_code();
+ *result = *retval;
+ return retval;
+#elif defined(__sun) || defined(__QNX__)
+ int error = 0;
+ hostent* retval = error_wrapper(::gethostbyaddr_r(addr, length, af, result,
+ buffer, buflength, &error), ec);
+ if (error)
+ ec = translate_netdb_error(error);
+ return retval;
+#elif defined(__MACH__) && defined(__APPLE__)
+ (void)(buffer);
+ (void)(buflength);
+ int error = 0;
+ hostent* retval = error_wrapper(::getipnodebyaddr(
+ addr, length, af, &error), ec);
+ if (error)
+ ec = translate_netdb_error(error);
+ if (!retval)
+ return 0;
+ *result = *retval;
+ return retval;
+#else
+ hostent* retval = 0;
+ int error = 0;
+ error_wrapper(::gethostbyaddr_r(addr, length, af, result, buffer,
+ buflength, &retval, &error), ec);
+ if (error)
+ ec = translate_netdb_error(error);
+ return retval;
+#endif
+}
+
+inline hostent* gethostbyname(const char* name, int af, struct hostent* result,
+ char* buffer, int buflength, int ai_flags, boost::system::error_code& ec)
+{
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ (void)(buffer);
+ (void)(buflength);
+ (void)(ai_flags);
+ if (af != BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ ec = boost::asio::error::address_family_not_supported;
+ return 0;
+ }
+ hostent* retval = error_wrapper(::gethostbyname(name), ec);
+ if (!retval)
+ return 0;
+ ec = boost::system::error_code();
+ *result = *retval;
+ return result;
+#elif defined(__sun) || defined(__QNX__)
+ (void)(ai_flags);
+ if (af != BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ ec = boost::asio::error::address_family_not_supported;
+ return 0;
+ }
+ int error = 0;
+ hostent* retval = error_wrapper(::gethostbyname_r(name, result, buffer,
+ buflength, &error), ec);
+ if (error)
+ ec = translate_netdb_error(error);
+ return retval;
+#elif defined(__MACH__) && defined(__APPLE__)
+ (void)(buffer);
+ (void)(buflength);
+ int error = 0;
+ hostent* retval = error_wrapper(::getipnodebyname(
+ name, af, ai_flags, &error), ec);
+ if (error)
+ ec = translate_netdb_error(error);
+ if (!retval)
+ return 0;
+ *result = *retval;
+ return retval;
+#else
+ (void)(ai_flags);
+ if (af != BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ ec = boost::asio::error::address_family_not_supported;
+ return 0;
+ }
+ hostent* retval = 0;
+ int error = 0;
+ error_wrapper(::gethostbyname_r(name, result,
+ buffer, buflength, &retval, &error), ec);
+ if (error)
+ ec = translate_netdb_error(error);
+ return retval;
+#endif
+}
+
+inline void freehostent(hostent* h)
+{
+#if defined(__MACH__) && defined(__APPLE__)
+ if (h)
+ ::freehostent(h);
+#else
+ (void)(h);
+#endif
+}
+
+// Emulation of getaddrinfo based on implementation in:
+// Stevens, W. R., UNIX Network Programming Vol. 1, 2nd Ed., Prentice-Hall 1998.
+
+struct gai_search
+{
+ const char* host;
+ int family;
+};
+
+inline int gai_nsearch(const char* host,
+ const addrinfo_type* hints, gai_search (&search)[2])
+{
+ int search_count = 0;
+ if (host == 0 || host[0] == '\0')
+ {
+ if (hints->ai_flags & AI_PASSIVE)
+ {
+ // No host and AI_PASSIVE implies wildcard bind.
+ switch (hints->ai_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ search[search_count].host = "0.0.0.0";
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
+ ++search_count;
+ break;
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ search[search_count].host = "0::0";
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
+ ++search_count;
+ break;
+ case BOOST_ASIO_OS_DEF(AF_UNSPEC):
+ search[search_count].host = "0::0";
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
+ ++search_count;
+ search[search_count].host = "0.0.0.0";
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
+ ++search_count;
+ break;
+ default:
+ break;
+ }
+ }
+ else
+ {
+ // No host and not AI_PASSIVE means connect to local host.
+ switch (hints->ai_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ search[search_count].host = "localhost";
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
+ ++search_count;
+ break;
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ search[search_count].host = "localhost";
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
+ ++search_count;
+ break;
+ case BOOST_ASIO_OS_DEF(AF_UNSPEC):
+ search[search_count].host = "localhost";
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
+ ++search_count;
+ search[search_count].host = "localhost";
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
+ ++search_count;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ else
+ {
+ // Host is specified.
+ switch (hints->ai_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ search[search_count].host = host;
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
+ ++search_count;
+ break;
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ search[search_count].host = host;
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
+ ++search_count;
+ break;
+ case BOOST_ASIO_OS_DEF(AF_UNSPEC):
+ search[search_count].host = host;
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET6);
+ ++search_count;
+ search[search_count].host = host;
+ search[search_count].family = BOOST_ASIO_OS_DEF(AF_INET);
+ ++search_count;
+ break;
+ default:
+ break;
+ }
+ }
+ return search_count;
+}
+
+template <typename T>
+inline T* gai_alloc(std::size_t size = sizeof(T))
+{
+ using namespace std;
+ T* p = static_cast<T*>(::operator new(size, std::nothrow));
+ if (p)
+ memset(p, 0, size);
+ return p;
+}
+
+inline void gai_free(void* p)
+{
+ ::operator delete(p);
+}
+
+inline void gai_strcpy(char* target, const char* source, std::size_t max_size)
+{
+ using namespace std;
+#if defined(BOOST_ASIO_HAS_SECURE_RTL)
+ strcpy_s(target, max_size, source);
+#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ *target = 0;
+ if (max_size > 0)
+ strncat(target, source, max_size - 1);
+#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+}
+
+enum { gai_clone_flag = 1 << 30 };
+
+inline int gai_aistruct(addrinfo_type*** next, const addrinfo_type* hints,
+ const void* addr, int family)
+{
+ using namespace std;
+
+ addrinfo_type* ai = gai_alloc<addrinfo_type>();
+ if (ai == 0)
+ return EAI_MEMORY;
+
+ ai->ai_next = 0;
+ **next = ai;
+ *next = &ai->ai_next;
+
+ ai->ai_canonname = 0;
+ ai->ai_socktype = hints->ai_socktype;
+ if (ai->ai_socktype == 0)
+ ai->ai_flags |= gai_clone_flag;
+ ai->ai_protocol = hints->ai_protocol;
+ ai->ai_family = family;
+
+ switch (ai->ai_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ {
+ sockaddr_in4_type* sinptr = gai_alloc<sockaddr_in4_type>();
+ if (sinptr == 0)
+ return EAI_MEMORY;
+ sinptr->sin_family = BOOST_ASIO_OS_DEF(AF_INET);
+ memcpy(&sinptr->sin_addr, addr, sizeof(in4_addr_type));
+ ai->ai_addr = reinterpret_cast<sockaddr*>(sinptr);
+ ai->ai_addrlen = sizeof(sockaddr_in4_type);
+ break;
+ }
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ {
+ sockaddr_in6_type* sin6ptr = gai_alloc<sockaddr_in6_type>();
+ if (sin6ptr == 0)
+ return EAI_MEMORY;
+ sin6ptr->sin6_family = BOOST_ASIO_OS_DEF(AF_INET6);
+ memcpy(&sin6ptr->sin6_addr, addr, sizeof(in6_addr_type));
+ ai->ai_addr = reinterpret_cast<sockaddr*>(sin6ptr);
+ ai->ai_addrlen = sizeof(sockaddr_in6_type);
+ break;
+ }
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+inline addrinfo_type* gai_clone(addrinfo_type* ai)
+{
+ using namespace std;
+
+ addrinfo_type* new_ai = gai_alloc<addrinfo_type>();
+ if (new_ai == 0)
+ return new_ai;
+
+ new_ai->ai_next = ai->ai_next;
+ ai->ai_next = new_ai;
+
+ new_ai->ai_flags = 0;
+ new_ai->ai_family = ai->ai_family;
+ new_ai->ai_socktype = ai->ai_socktype;
+ new_ai->ai_protocol = ai->ai_protocol;
+ new_ai->ai_canonname = 0;
+ new_ai->ai_addrlen = ai->ai_addrlen;
+ new_ai->ai_addr = gai_alloc<sockaddr>(ai->ai_addrlen);
+ memcpy(new_ai->ai_addr, ai->ai_addr, ai->ai_addrlen);
+
+ return new_ai;
+}
+
+inline int gai_port(addrinfo_type* aihead, int port, int socktype)
+{
+ int num_found = 0;
+
+ for (addrinfo_type* ai = aihead; ai; ai = ai->ai_next)
+ {
+ if (ai->ai_flags & gai_clone_flag)
+ {
+ if (ai->ai_socktype != 0)
+ {
+ ai = gai_clone(ai);
+ if (ai == 0)
+ return -1;
+ // ai now points to newly cloned entry.
+ }
+ }
+ else if (ai->ai_socktype != socktype)
+ {
+ // Ignore if mismatch on socket type.
+ continue;
+ }
+
+ ai->ai_socktype = socktype;
+
+ switch (ai->ai_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ {
+ sockaddr_in4_type* sinptr =
+ reinterpret_cast<sockaddr_in4_type*>(ai->ai_addr);
+ sinptr->sin_port = port;
+ ++num_found;
+ break;
+ }
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ {
+ sockaddr_in6_type* sin6ptr =
+ reinterpret_cast<sockaddr_in6_type*>(ai->ai_addr);
+ sin6ptr->sin6_port = port;
+ ++num_found;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+
+ return num_found;
+}
+
+inline int gai_serv(addrinfo_type* aihead,
+ const addrinfo_type* hints, const char* serv)
+{
+ using namespace std;
+
+ int num_found = 0;
+
+ if (
+#if defined(AI_NUMERICSERV)
+ (hints->ai_flags & AI_NUMERICSERV) ||
+#endif
+ isdigit(static_cast<unsigned char>(serv[0])))
+ {
+ int port = htons(atoi(serv));
+ if (hints->ai_socktype)
+ {
+ // Caller specifies socket type.
+ int rc = gai_port(aihead, port, hints->ai_socktype);
+ if (rc < 0)
+ return EAI_MEMORY;
+ num_found += rc;
+ }
+ else
+ {
+ // Caller does not specify socket type.
+ int rc = gai_port(aihead, port, SOCK_STREAM);
+ if (rc < 0)
+ return EAI_MEMORY;
+ num_found += rc;
+ rc = gai_port(aihead, port, SOCK_DGRAM);
+ if (rc < 0)
+ return EAI_MEMORY;
+ num_found += rc;
+ }
+ }
+ else
+ {
+ // Try service name with TCP first, then UDP.
+ if (hints->ai_socktype == 0 || hints->ai_socktype == SOCK_STREAM)
+ {
+ servent* sptr = getservbyname(serv, "tcp");
+ if (sptr != 0)
+ {
+ int rc = gai_port(aihead, sptr->s_port, SOCK_STREAM);
+ if (rc < 0)
+ return EAI_MEMORY;
+ num_found += rc;
+ }
+ }
+ if (hints->ai_socktype == 0 || hints->ai_socktype == SOCK_DGRAM)
+ {
+ servent* sptr = getservbyname(serv, "udp");
+ if (sptr != 0)
+ {
+ int rc = gai_port(aihead, sptr->s_port, SOCK_DGRAM);
+ if (rc < 0)
+ return EAI_MEMORY;
+ num_found += rc;
+ }
+ }
+ }
+
+ if (num_found == 0)
+ {
+ if (hints->ai_socktype == 0)
+ {
+ // All calls to getservbyname() failed.
+ return EAI_NONAME;
+ }
+ else
+ {
+ // Service not supported for socket type.
+ return EAI_SERVICE;
+ }
+ }
+
+ return 0;
+}
+
+inline int gai_echeck(const char* host, const char* service,
+ int flags, int family, int socktype, int protocol)
+{
+ (void)(flags);
+ (void)(protocol);
+
+ // Host or service must be specified.
+ if (host == 0 || host[0] == '\0')
+ if (service == 0 || service[0] == '\0')
+ return EAI_NONAME;
+
+ // Check combination of family and socket type.
+ switch (family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_UNSPEC):
+ break;
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ if (service != 0 && service[0] != '\0')
+ if (socktype != 0 && socktype != SOCK_STREAM && socktype != SOCK_DGRAM)
+ return EAI_SOCKTYPE;
+ break;
+ default:
+ return EAI_FAMILY;
+ }
+
+ return 0;
+}
+
+inline void freeaddrinfo_emulation(addrinfo_type* aihead)
+{
+ addrinfo_type* ai = aihead;
+ while (ai)
+ {
+ gai_free(ai->ai_addr);
+ gai_free(ai->ai_canonname);
+ addrinfo_type* ainext = ai->ai_next;
+ gai_free(ai);
+ ai = ainext;
+ }
+}
+
+inline int getaddrinfo_emulation(const char* host, const char* service,
+ const addrinfo_type* hintsp, addrinfo_type** result)
+{
+ // Set up linked list of addrinfo structures.
+ addrinfo_type* aihead = 0;
+ addrinfo_type** ainext = &aihead;
+ char* canon = 0;
+
+ // Supply default hints if not specified by caller.
+ addrinfo_type hints = addrinfo_type();
+ hints.ai_family = BOOST_ASIO_OS_DEF(AF_UNSPEC);
+ if (hintsp)
+ hints = *hintsp;
+
+ // If the resolution is not specifically for AF_INET6, remove the AI_V4MAPPED
+ // and AI_ALL flags.
+#if defined(AI_V4MAPPED)
+ if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_INET6))
+ hints.ai_flags &= ~AI_V4MAPPED;
+#endif
+#if defined(AI_ALL)
+ if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_INET6))
+ hints.ai_flags &= ~AI_ALL;
+#endif
+
+ // Basic error checking.
+ int rc = gai_echeck(host, service, hints.ai_flags, hints.ai_family,
+ hints.ai_socktype, hints.ai_protocol);
+ if (rc != 0)
+ {
+ freeaddrinfo_emulation(aihead);
+ return rc;
+ }
+
+ gai_search search[2];
+ int search_count = gai_nsearch(host, &hints, search);
+ for (gai_search* sptr = search; sptr < search + search_count; ++sptr)
+ {
+ // Check for IPv4 dotted decimal string.
+ in4_addr_type inaddr;
+ boost::system::error_code ec;
+ if (socket_ops::inet_pton(BOOST_ASIO_OS_DEF(AF_INET),
+ sptr->host, &inaddr, 0, ec) == 1)
+ {
+ if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_UNSPEC)
+ && hints.ai_family != BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ freeaddrinfo_emulation(aihead);
+ gai_free(canon);
+ return EAI_FAMILY;
+ }
+ if (sptr->family == BOOST_ASIO_OS_DEF(AF_INET))
+ {
+ rc = gai_aistruct(&ainext, &hints, &inaddr, BOOST_ASIO_OS_DEF(AF_INET));
+ if (rc != 0)
+ {
+ freeaddrinfo_emulation(aihead);
+ gai_free(canon);
+ return rc;
+ }
+ }
+ continue;
+ }
+
+ // Check for IPv6 hex string.
+ in6_addr_type in6addr;
+ if (socket_ops::inet_pton(BOOST_ASIO_OS_DEF(AF_INET6),
+ sptr->host, &in6addr, 0, ec) == 1)
+ {
+ if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_UNSPEC)
+ && hints.ai_family != BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ freeaddrinfo_emulation(aihead);
+ gai_free(canon);
+ return EAI_FAMILY;
+ }
+ if (sptr->family == BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ rc = gai_aistruct(&ainext, &hints, &in6addr,
+ BOOST_ASIO_OS_DEF(AF_INET6));
+ if (rc != 0)
+ {
+ freeaddrinfo_emulation(aihead);
+ gai_free(canon);
+ return rc;
+ }
+ }
+ continue;
+ }
+
+ // Look up hostname.
+ hostent hent;
+ char hbuf[8192] = "";
+ hostent* hptr = socket_ops::gethostbyname(sptr->host,
+ sptr->family, &hent, hbuf, sizeof(hbuf), hints.ai_flags, ec);
+ if (hptr == 0)
+ {
+ if (search_count == 2)
+ {
+ // Failure is OK if there are multiple searches.
+ continue;
+ }
+ freeaddrinfo_emulation(aihead);
+ gai_free(canon);
+ if (ec == boost::asio::error::host_not_found)
+ return EAI_NONAME;
+ if (ec == boost::asio::error::host_not_found_try_again)
+ return EAI_AGAIN;
+ if (ec == boost::asio::error::no_recovery)
+ return EAI_FAIL;
+ if (ec == boost::asio::error::no_data)
+ return EAI_NONAME;
+ return EAI_NONAME;
+ }
+
+ // Check for address family mismatch if one was specified.
+ if (hints.ai_family != BOOST_ASIO_OS_DEF(AF_UNSPEC)
+ && hints.ai_family != hptr->h_addrtype)
+ {
+ freeaddrinfo_emulation(aihead);
+ gai_free(canon);
+ socket_ops::freehostent(hptr);
+ return EAI_FAMILY;
+ }
+
+ // Save canonical name first time.
+ if (host != 0 && host[0] != '\0' && hptr->h_name && hptr->h_name[0]
+ && (hints.ai_flags & AI_CANONNAME) && canon == 0)
+ {
+ std::size_t canon_len = strlen(hptr->h_name) + 1;
+ canon = gai_alloc<char>(canon_len);
+ if (canon == 0)
+ {
+ freeaddrinfo_emulation(aihead);
+ socket_ops::freehostent(hptr);
+ return EAI_MEMORY;
+ }
+ gai_strcpy(canon, hptr->h_name, canon_len);
+ }
+
+ // Create an addrinfo structure for each returned address.
+ for (char** ap = hptr->h_addr_list; *ap; ++ap)
+ {
+ rc = gai_aistruct(&ainext, &hints, *ap, hptr->h_addrtype);
+ if (rc != 0)
+ {
+ freeaddrinfo_emulation(aihead);
+ gai_free(canon);
+ socket_ops::freehostent(hptr);
+ return EAI_FAMILY;
+ }
+ }
+
+ socket_ops::freehostent(hptr);
+ }
+
+ // Check if we found anything.
+ if (aihead == 0)
+ {
+ gai_free(canon);
+ return EAI_NONAME;
+ }
+
+ // Return canonical name in first entry.
+ if (host != 0 && host[0] != '\0' && (hints.ai_flags & AI_CANONNAME))
+ {
+ if (canon)
+ {
+ aihead->ai_canonname = canon;
+ canon = 0;
+ }
+ else
+ {
+ std::size_t canonname_len = strlen(search[0].host) + 1;
+ aihead->ai_canonname = gai_alloc<char>(canonname_len);
+ if (aihead->ai_canonname == 0)
+ {
+ freeaddrinfo_emulation(aihead);
+ return EAI_MEMORY;
+ }
+ gai_strcpy(aihead->ai_canonname, search[0].host, canonname_len);
+ }
+ }
+ gai_free(canon);
+
+ // Process the service name.
+ if (service != 0 && service[0] != '\0')
+ {
+ rc = gai_serv(aihead, &hints, service);
+ if (rc != 0)
+ {
+ freeaddrinfo_emulation(aihead);
+ return rc;
+ }
+ }
+
+ // Return result to caller.
+ *result = aihead;
+ return 0;
+}
+
+inline boost::system::error_code getnameinfo_emulation(
+ const socket_addr_type* sa, std::size_t salen, char* host,
+ std::size_t hostlen, char* serv, std::size_t servlen, int flags,
+ boost::system::error_code& ec)
+{
+ using namespace std;
+
+ const char* addr;
+ size_t addr_len;
+ unsigned short port;
+ switch (sa->sa_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ if (salen != sizeof(sockaddr_in4_type))
+ {
+ return ec = boost::asio::error::invalid_argument;
+ }
+ addr = reinterpret_cast<const char*>(
+ &reinterpret_cast<const sockaddr_in4_type*>(sa)->sin_addr);
+ addr_len = sizeof(in4_addr_type);
+ port = reinterpret_cast<const sockaddr_in4_type*>(sa)->sin_port;
+ break;
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ if (salen != sizeof(sockaddr_in6_type))
+ {
+ return ec = boost::asio::error::invalid_argument;
+ }
+ addr = reinterpret_cast<const char*>(
+ &reinterpret_cast<const sockaddr_in6_type*>(sa)->sin6_addr);
+ addr_len = sizeof(in6_addr_type);
+ port = reinterpret_cast<const sockaddr_in6_type*>(sa)->sin6_port;
+ break;
+ default:
+ return ec = boost::asio::error::address_family_not_supported;
+ }
+
+ if (host && hostlen > 0)
+ {
+ if (flags & NI_NUMERICHOST)
+ {
+ if (socket_ops::inet_ntop(sa->sa_family, addr, host, hostlen, 0, ec) == 0)
+ {
+ return ec;
+ }
+ }
+ else
+ {
+ hostent hent;
+ char hbuf[8192] = "";
+ hostent* hptr = socket_ops::gethostbyaddr(addr,
+ static_cast<int>(addr_len), sa->sa_family,
+ &hent, hbuf, sizeof(hbuf), ec);
+ if (hptr && hptr->h_name && hptr->h_name[0] != '\0')
+ {
+ if (flags & NI_NOFQDN)
+ {
+ char* dot = strchr(hptr->h_name, '.');
+ if (dot)
+ {
+ *dot = 0;
+ }
+ }
+ gai_strcpy(host, hptr->h_name, hostlen);
+ socket_ops::freehostent(hptr);
+ }
+ else
+ {
+ socket_ops::freehostent(hptr);
+ if (flags & NI_NAMEREQD)
+ {
+ return ec = boost::asio::error::host_not_found;
+ }
+ if (socket_ops::inet_ntop(sa->sa_family,
+ addr, host, hostlen, 0, ec) == 0)
+ {
+ return ec;
+ }
+ }
+ }
+ }
+
+ if (serv && servlen > 0)
+ {
+ if (flags & NI_NUMERICSERV)
+ {
+ if (servlen < 6)
+ {
+ return ec = boost::asio::error::no_buffer_space;
+ }
+#if defined(BOOST_ASIO_HAS_SECURE_RTL)
+ sprintf_s(serv, servlen, "%u", ntohs(port));
+#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ sprintf(serv, "%u", ntohs(port));
+#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ }
+ else
+ {
+#if defined(BOOST_ASIO_HAS_PTHREADS)
+ static ::pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
+ ::pthread_mutex_lock(&mutex);
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+ servent* sptr = ::getservbyport(port, (flags & NI_DGRAM) ? "udp" : 0);
+ if (sptr && sptr->s_name && sptr->s_name[0] != '\0')
+ {
+ gai_strcpy(serv, sptr->s_name, servlen);
+ }
+ else
+ {
+ if (servlen < 6)
+ {
+ return ec = boost::asio::error::no_buffer_space;
+ }
+#if defined(BOOST_ASIO_HAS_SECURE_RTL)
+ sprintf_s(serv, servlen, "%u", ntohs(port));
+#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ sprintf(serv, "%u", ntohs(port));
+#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ }
+#if defined(BOOST_ASIO_HAS_PTHREADS)
+ ::pthread_mutex_unlock(&mutex);
+#endif // defined(BOOST_ASIO_HAS_PTHREADS)
+ }
+ }
+
+ ec = boost::system::error_code();
+ return ec;
+}
+
+#endif // !defined(BOOST_ASIO_HAS_GETADDRINFO)
+
+inline boost::system::error_code translate_addrinfo_error(int error)
+{
+ switch (error)
+ {
+ case 0:
+ return boost::system::error_code();
+ case EAI_AGAIN:
+ return boost::asio::error::host_not_found_try_again;
+ case EAI_BADFLAGS:
+ return boost::asio::error::invalid_argument;
+ case EAI_FAIL:
+ return boost::asio::error::no_recovery;
+ case EAI_FAMILY:
+ return boost::asio::error::address_family_not_supported;
+ case EAI_MEMORY:
+ return boost::asio::error::no_memory;
+ case EAI_NONAME:
+#if defined(EAI_ADDRFAMILY)
+ case EAI_ADDRFAMILY:
+#endif
+#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
+ case EAI_NODATA:
+#endif
+ return boost::asio::error::host_not_found;
+ case EAI_SERVICE:
+ return boost::asio::error::service_not_found;
+ case EAI_SOCKTYPE:
+ return boost::asio::error::socket_type_not_supported;
+ default: // Possibly the non-portable EAI_SYSTEM.
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+ return boost::system::error_code(
+ WSAGetLastError(), boost::asio::error::get_system_category());
+#else
+ return boost::system::error_code(
+ errno, boost::asio::error::get_system_category());
+#endif
+ }
+}
+
+boost::system::error_code getaddrinfo(const char* host,
+ const char* service, const addrinfo_type& hints,
+ addrinfo_type** result, boost::system::error_code& ec)
+{
+ host = (host && *host) ? host : 0;
+ service = (service && *service) ? service : 0;
+ clear_last_error();
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if defined(BOOST_ASIO_HAS_GETADDRINFO)
+ // Building for Windows XP, Windows Server 2003, or later.
+ int error = ::getaddrinfo(host, service, &hints, result);
+ return ec = translate_addrinfo_error(error);
+# else
+ // Building for Windows 2000 or earlier.
+ typedef int (WSAAPI *gai_t)(const char*,
+ const char*, const addrinfo_type*, addrinfo_type**);
+ if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
+ {
+ if (gai_t gai = (gai_t)::GetProcAddress(winsock_module, "getaddrinfo"))
+ {
+ int error = gai(host, service, &hints, result);
+ return ec = translate_addrinfo_error(error);
+ }
+ }
+ int error = getaddrinfo_emulation(host, service, &hints, result);
+ return ec = translate_addrinfo_error(error);
+# endif
+#elif !defined(BOOST_ASIO_HAS_GETADDRINFO)
+ int error = getaddrinfo_emulation(host, service, &hints, result);
+ return ec = translate_addrinfo_error(error);
+#else
+ int error = ::getaddrinfo(host, service, &hints, result);
+#if defined(__MACH__) && defined(__APPLE__)
+ using namespace std; // For isdigit and atoi.
+ if (error == 0 && service && isdigit(static_cast<unsigned char>(service[0])))
+ {
+ u_short_type port = host_to_network_short(atoi(service));
+ for (addrinfo_type* ai = *result; ai; ai = ai->ai_next)
+ {
+ switch (ai->ai_family)
+ {
+ case BOOST_ASIO_OS_DEF(AF_INET):
+ {
+ sockaddr_in4_type* sinptr =
+ reinterpret_cast<sockaddr_in4_type*>(ai->ai_addr);
+ if (sinptr->sin_port == 0)
+ sinptr->sin_port = port;
+ break;
+ }
+ case BOOST_ASIO_OS_DEF(AF_INET6):
+ {
+ sockaddr_in6_type* sin6ptr =
+ reinterpret_cast<sockaddr_in6_type*>(ai->ai_addr);
+ if (sin6ptr->sin6_port == 0)
+ sin6ptr->sin6_port = port;
+ break;
+ }
+ default:
+ break;
+ }
+ }
+ }
+#endif
+ return ec = translate_addrinfo_error(error);
+#endif
+}
+
+boost::system::error_code background_getaddrinfo(
+ const weak_cancel_token_type& cancel_token, const char* host,
+ const char* service, const addrinfo_type& hints,
+ addrinfo_type** result, boost::system::error_code& ec)
+{
+ if (cancel_token.expired())
+ ec = boost::asio::error::operation_aborted;
+ else
+ socket_ops::getaddrinfo(host, service, hints, result, ec);
+ return ec;
+}
+
+void freeaddrinfo(addrinfo_type* ai)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if defined(BOOST_ASIO_HAS_GETADDRINFO)
+ // Building for Windows XP, Windows Server 2003, or later.
+ ::freeaddrinfo(ai);
+# else
+ // Building for Windows 2000 or earlier.
+ typedef int (WSAAPI *fai_t)(addrinfo_type*);
+ if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
+ {
+ if (fai_t fai = (fai_t)::GetProcAddress(winsock_module, "freeaddrinfo"))
+ {
+ fai(ai);
+ return;
+ }
+ }
+ freeaddrinfo_emulation(ai);
+# endif
+#elif !defined(BOOST_ASIO_HAS_GETADDRINFO)
+ freeaddrinfo_emulation(ai);
+#else
+ ::freeaddrinfo(ai);
+#endif
+}
+
+boost::system::error_code getnameinfo(const socket_addr_type* addr,
+ std::size_t addrlen, char* host, std::size_t hostlen,
+ char* serv, std::size_t servlen, int flags, boost::system::error_code& ec)
+{
+#if defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
+# if defined(BOOST_ASIO_HAS_GETADDRINFO)
+ // Building for Windows XP, Windows Server 2003, or later.
+ clear_last_error();
+ int error = ::getnameinfo(addr, static_cast<socklen_t>(addrlen),
+ host, static_cast<DWORD>(hostlen),
+ serv, static_cast<DWORD>(servlen), flags);
+ return ec = translate_addrinfo_error(error);
+# else
+ // Building for Windows 2000 or earlier.
+ typedef int (WSAAPI *gni_t)(const socket_addr_type*,
+ int, char*, DWORD, char*, DWORD, int);
+ if (HMODULE winsock_module = ::GetModuleHandleA("ws2_32"))
+ {
+ if (gni_t gni = (gni_t)::GetProcAddress(winsock_module, "getnameinfo"))
+ {
+ clear_last_error();
+ int error = gni(addr, static_cast<int>(addrlen),
+ host, static_cast<DWORD>(hostlen),
+ serv, static_cast<DWORD>(servlen), flags);
+ return ec = translate_addrinfo_error(error);
+ }
+ }
+ clear_last_error();
+ return getnameinfo_emulation(addr, addrlen,
+ host, hostlen, serv, servlen, flags, ec);
+# endif
+#elif !defined(BOOST_ASIO_HAS_GETADDRINFO)
+ using namespace std; // For memcpy.
+ sockaddr_storage_type tmp_addr;
+ memcpy(&tmp_addr, addr, addrlen);
+ addr = reinterpret_cast<socket_addr_type*>(&tmp_addr);
+ clear_last_error();
+ return getnameinfo_emulation(addr, addrlen,
+ host, hostlen, serv, servlen, flags, ec);
+#else
+ clear_last_error();
+ int error = ::getnameinfo(addr, addrlen, host, hostlen, serv, servlen, flags);
+ return ec = translate_addrinfo_error(error);
+#endif
+}
+
+boost::system::error_code sync_getnameinfo(
+ const socket_addr_type* addr, std::size_t addrlen,
+ char* host, std::size_t hostlen, char* serv,
+ std::size_t servlen, int sock_type, boost::system::error_code& ec)
+{
+ // First try resolving with the service name. If that fails try resolving
+ // but allow the service to be returned as a number.
+ int flags = (sock_type == SOCK_DGRAM) ? NI_DGRAM : 0;
+ socket_ops::getnameinfo(addr, addrlen, host,
+ hostlen, serv, servlen, flags, ec);
+ if (ec)
+ {
+ socket_ops::getnameinfo(addr, addrlen, host, hostlen,
+ serv, servlen, flags | NI_NUMERICSERV, ec);
+ }
+
+ return ec;
+}
+
+boost::system::error_code background_getnameinfo(
+ const weak_cancel_token_type& cancel_token,
+ const socket_addr_type* addr, std::size_t addrlen,
+ char* host, std::size_t hostlen, char* serv,
+ std::size_t servlen, int sock_type, boost::system::error_code& ec)
+{
+ if (cancel_token.expired())
+ {
+ ec = boost::asio::error::operation_aborted;
+ }
+ else
+ {
+ // First try resolving with the service name. If that fails try resolving
+ // but allow the service to be returned as a number.
+ int flags = (sock_type == SOCK_DGRAM) ? NI_DGRAM : 0;
+ socket_ops::getnameinfo(addr, addrlen, host,
+ hostlen, serv, servlen, flags, ec);
+ if (ec)
+ {
+ socket_ops::getnameinfo(addr, addrlen, host, hostlen,
+ serv, servlen, flags | NI_NUMERICSERV, ec);
+ }
+ }
+
+ return ec;
+}
+
+#endif // !defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+u_long_type network_to_host_long(u_long_type value)
+{
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ unsigned char* value_p = reinterpret_cast<unsigned char*>(&value);
+ u_long_type result = (static_cast<u_long_type>(value_p[0]) << 24)
+ | (static_cast<u_long_type>(value_p[1]) << 16)
+ | (static_cast<u_long_type>(value_p[2]) << 8)
+ | static_cast<u_long_type>(value_p[3]);
+ return result;
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ return ntohl(value);
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+}
+
+u_long_type host_to_network_long(u_long_type value)
+{
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ u_long_type result;
+ unsigned char* result_p = reinterpret_cast<unsigned char*>(&result);
+ result_p[0] = static_cast<unsigned char>((value >> 24) & 0xFF);
+ result_p[1] = static_cast<unsigned char>((value >> 16) & 0xFF);
+ result_p[2] = static_cast<unsigned char>((value >> 8) & 0xFF);
+ result_p[3] = static_cast<unsigned char>(value & 0xFF);
+ return result;
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ return htonl(value);
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+}
+
+u_short_type network_to_host_short(u_short_type value)
+{
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ unsigned char* value_p = reinterpret_cast<unsigned char*>(&value);
+ u_short_type result = (static_cast<u_short_type>(value_p[0]) << 8)
+ | static_cast<u_short_type>(value_p[1]);
+ return result;
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ return ntohs(value);
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+}
+
+u_short_type host_to_network_short(u_short_type value)
+{
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ u_short_type result;
+ unsigned char* result_p = reinterpret_cast<unsigned char*>(&result);
+ result_p[0] = static_cast<unsigned char>((value >> 8) & 0xFF);
+ result_p[1] = static_cast<unsigned char>(value & 0xFF);
+ return result;
+#else // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ return htons(value);
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+}
+
+} // namespace socket_ops
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_SOCKET_OPS_IPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/socket_select_interrupter.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/socket_select_interrupter.ipp
index 3d9e5289d3c..3d9e5289d3c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/socket_select_interrupter.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/socket_select_interrupter.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_executor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.hpp
index 6452b949f41..6452b949f41 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_executor_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_executor_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.ipp
index aed4d3cf6a5..aed4d3cf6a5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_executor_service.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_executor_service.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.hpp
index d47708bb98b..d47708bb98b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.ipp
index 9926f9abf38..9926f9abf38 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/strand_service.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/strand_service.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/throw_error.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/throw_error.ipp
index ffcacf47ae8..ffcacf47ae8 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/throw_error.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/throw_error.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/timer_queue_ptime.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_ptime.ipp
index 8a6d5af8155..8a6d5af8155 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/timer_queue_ptime.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_ptime.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/timer_queue_set.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_set.ipp
index 71f83216aa7..71f83216aa7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/timer_queue_set.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/timer_queue_set.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_event.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_event.ipp
index 3e7dfdcf212..3e7dfdcf212 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_event.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_event.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_handle_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_handle_service.ipp
index 0cd7dd17193..0cd7dd17193 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_handle_service.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_handle_service.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_io_context.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.hpp
index 771c1f3c3ae..771c1f3c3ae 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_io_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_io_context.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.ipp
index 87637f0b5c5..87637f0b5c5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_io_context.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_io_context.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
index 7dbf9353ee0..7dbf9353ee0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_serial_port_service.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
index 3b7e7066f59..3b7e7066f59 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_iocp_socket_service_base.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_mutex.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_mutex.ipp
index 12922263f20..12922263f20 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_mutex.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_mutex.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_object_handle_service.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_object_handle_service.ipp
index db56f722f2f..db56f722f2f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_object_handle_service.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_object_handle_service.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_static_mutex.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_static_mutex.ipp
index 10e8622e37c..10e8622e37c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_static_mutex.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_static_mutex.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_thread.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_thread.ipp
index 710c9b9f9b7..710c9b9f9b7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_thread.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_thread.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_tss_ptr.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_tss_ptr.ipp
index 755d020703c..755d020703c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/win_tss_ptr.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/win_tss_ptr.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
index e6254aed930..e6254aed930 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_ssocket_service_base.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp
index a475f66640b..a475f66640b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp
index c8b77349cdb..c8b77349cdb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winrt_timer_scheduler.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/impl/winsock_init.ipp b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winsock_init.ipp
index 5d31a03b068..5d31a03b068 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/impl/winsock_init.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/impl/winsock_init.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/io_control.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/io_control.hpp
index 112b0ad7510..112b0ad7510 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/io_control.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/io_control.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/is_buffer_sequence.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/is_buffer_sequence.hpp
new file mode 100644
index 00000000000..a3fb9931d26
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/is_buffer_sequence.hpp
@@ -0,0 +1,265 @@
+//
+// detail/is_buffer_sequence.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_DETAIL_IS_BUFFER_SEQUENCE_HPP
+#define BOOST_ASIO_DETAIL_IS_BUFFER_SEQUENCE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+class mutable_buffer;
+class const_buffer;
+
+namespace detail {
+
+struct buffer_sequence_memfns_base
+{
+ void begin();
+ void end();
+ void size();
+ void max_size();
+ void capacity();
+ void data();
+ void prepare();
+ void commit();
+ void consume();
+};
+
+template <typename T>
+struct buffer_sequence_memfns_derived
+ : T, buffer_sequence_memfns_base
+{
+};
+
+template <typename T, T>
+struct buffer_sequence_memfns_check
+{
+};
+
+template <typename>
+char (&buffer_sequence_begin_helper(...))[2];
+
+#if defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename T>
+char buffer_sequence_begin_helper(T* t,
+ typename enable_if<!is_same<
+ decltype(boost::asio::buffer_sequence_begin(*t)),
+ void>::value>::type*);
+
+#else // defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename T>
+char buffer_sequence_begin_helper(T* t,
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::begin>*);
+
+#endif // defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename>
+char (&buffer_sequence_end_helper(...))[2];
+
+#if defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename T>
+char buffer_sequence_end_helper(T* t,
+ typename enable_if<!is_same<
+ decltype(boost::asio::buffer_sequence_end(*t)),
+ void>::value>::type*);
+
+#else // defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename T>
+char buffer_sequence_end_helper(T* t,
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::end>*);
+
+#endif // defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename>
+char (&size_memfn_helper(...))[2];
+
+template <typename T>
+char size_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::size>*);
+
+template <typename>
+char (&max_size_memfn_helper(...))[2];
+
+template <typename T>
+char max_size_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::max_size>*);
+
+template <typename>
+char (&capacity_memfn_helper(...))[2];
+
+template <typename T>
+char capacity_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::capacity>*);
+
+template <typename>
+char (&data_memfn_helper(...))[2];
+
+template <typename T>
+char data_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::data>*);
+
+template <typename>
+char (&prepare_memfn_helper(...))[2];
+
+template <typename T>
+char prepare_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::prepare>*);
+
+template <typename>
+char (&commit_memfn_helper(...))[2];
+
+template <typename T>
+char commit_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::commit>*);
+
+template <typename>
+char (&consume_memfn_helper(...))[2];
+
+template <typename T>
+char consume_memfn_helper(
+ buffer_sequence_memfns_check<
+ void (buffer_sequence_memfns_base::*)(),
+ &buffer_sequence_memfns_derived<T>::consume>*);
+
+template <typename, typename>
+char (&buffer_sequence_element_type_helper(...))[2];
+
+#if defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename T, typename Buffer>
+char buffer_sequence_element_type_helper(T* t,
+ typename enable_if<is_convertible<
+ decltype(*boost::asio::buffer_sequence_begin(*t)),
+ Buffer>::value>::type*);
+
+#else // defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename T, typename Buffer>
+char buffer_sequence_element_type_helper(
+ typename T::const_iterator*,
+ typename enable_if<is_convertible<
+ typename T::value_type, Buffer>::value>::type*);
+
+#endif // defined(BOOST_ASIO_HAS_DECLTYPE)
+
+template <typename>
+char (&const_buffers_type_typedef_helper(...))[2];
+
+template <typename T>
+char const_buffers_type_typedef_helper(
+ typename T::const_buffers_type*);
+
+template <typename>
+char (&mutable_buffers_type_typedef_helper(...))[2];
+
+template <typename T>
+char mutable_buffers_type_typedef_helper(
+ typename T::mutable_buffers_type*);
+
+template <typename T, typename Buffer>
+struct is_buffer_sequence_class
+ : integral_constant<bool,
+ sizeof(buffer_sequence_begin_helper<T>(0)) != 1 &&
+ sizeof(buffer_sequence_end_helper<T>(0)) != 1 &&
+ sizeof(buffer_sequence_element_type_helper<T, Buffer>(0, 0)) == 1>
+{
+};
+
+template <typename T, typename Buffer>
+struct is_buffer_sequence
+ : conditional<is_class<T>::value,
+ is_buffer_sequence_class<T, Buffer>,
+ false_type>::type
+{
+};
+
+template <>
+struct is_buffer_sequence<mutable_buffer, mutable_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<mutable_buffer, const_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<const_buffer, const_buffer>
+ : true_type
+{
+};
+
+template <>
+struct is_buffer_sequence<const_buffer, mutable_buffer>
+ : false_type
+{
+};
+
+template <typename T>
+struct is_dynamic_buffer_class
+ : integral_constant<bool,
+ sizeof(size_memfn_helper<T>(0)) != 1 &&
+ sizeof(max_size_memfn_helper<T>(0)) != 1 &&
+ sizeof(capacity_memfn_helper<T>(0)) != 1 &&
+ sizeof(data_memfn_helper<T>(0)) != 1 &&
+ sizeof(consume_memfn_helper<T>(0)) != 1 &&
+ sizeof(prepare_memfn_helper<T>(0)) != 1 &&
+ sizeof(commit_memfn_helper<T>(0)) != 1 &&
+ sizeof(const_buffers_type_typedef_helper<T>(0)) == 1 &&
+ sizeof(mutable_buffers_type_typedef_helper<T>(0)) == 1>
+{
+};
+
+template <typename T>
+struct is_dynamic_buffer
+ : conditional<is_class<T>::value,
+ is_dynamic_buffer_class<T>,
+ false_type>::type
+{
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_IS_BUFFER_SEQUENCE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/is_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/is_executor.hpp
index bc52ee87ce0..bc52ee87ce0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/is_executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/is_executor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/keyword_tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/keyword_tss_ptr.hpp
index 8451b175102..8451b175102 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/keyword_tss_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/keyword_tss_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/kqueue_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/kqueue_reactor.hpp
index 31d79ca6a41..31d79ca6a41 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/kqueue_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/kqueue_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/limits.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/limits.hpp
index 036c5999b8d..036c5999b8d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/limits.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/limits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/local_free_on_block_exit.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/local_free_on_block_exit.hpp
index 0f1a84108cf..0f1a84108cf 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/local_free_on_block_exit.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/local_free_on_block_exit.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/macos_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/macos_fenced_block.hpp
index 20196a78f6a..20196a78f6a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/macos_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/macos_fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/memory.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/memory.hpp
index 21a68e456f3..21a68e456f3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/memory.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/memory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/mutex.hpp
index 9fe4ad333ec..9fe4ad333ec 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/noncopyable.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/noncopyable.hpp
index 36b30c074df..36b30c074df 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/noncopyable.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/noncopyable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_event.hpp
index 8394028e414..8394028e414 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_event.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_event.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_fenced_block.hpp
index f9f59af3a9a..f9f59af3a9a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_global.hpp
index 3a4d5168891..3a4d5168891 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_global.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_global.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_mutex.hpp
index 90b92fe77b6..90b92fe77b6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_reactor.hpp
index 028f0f35354..028f0f35354 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_signal_blocker.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_signal_blocker.hpp
index b2285c1f451..b2285c1f451 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_signal_blocker.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_signal_blocker.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_socket_service.hpp
index 2c5b784125f..2c5b784125f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_socket_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_socket_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_static_mutex.hpp
index 7e2c0b522c3..7e2c0b522c3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_static_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_static_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_thread.hpp
index 56ad8bf8069..56ad8bf8069 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/null_tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/null_tss_ptr.hpp
index 06d5a4d5228..06d5a4d5228 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/null_tss_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/null_tss_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/object_pool.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/object_pool.hpp
index 7e454a7138c..7e454a7138c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/object_pool.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/object_pool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/old_win_sdk_compat.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/old_win_sdk_compat.hpp
index f1b63cba0ec..f1b63cba0ec 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/old_win_sdk_compat.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/old_win_sdk_compat.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/op_queue.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/op_queue.hpp
index 935e45920f1..935e45920f1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/op_queue.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/op_queue.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/operation.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/operation.hpp
index 13220231ab3..13220231ab3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/operation.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/operation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/pipe_select_interrupter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/pipe_select_interrupter.hpp
index 696d5657294..696d5657294 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/pipe_select_interrupter.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/pipe_select_interrupter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/pop_options.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/pop_options.hpp
index 10450eacb5f..10450eacb5f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/pop_options.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/pop_options.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/posix_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_event.hpp
index 98529eaf264..98529eaf264 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/posix_event.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/posix_event.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/posix_fd_set_adapter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_fd_set_adapter.hpp
index f68f2aa1c46..f68f2aa1c46 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/posix_fd_set_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/posix_fd_set_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/posix_global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_global.hpp
index c2c2996f88d..c2c2996f88d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/posix_global.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/posix_global.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/posix_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_mutex.hpp
index 5e1d42c530b..5e1d42c530b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/posix_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/posix_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/posix_signal_blocker.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_signal_blocker.hpp
index ea5758fb2c4..ea5758fb2c4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/posix_signal_blocker.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/posix_signal_blocker.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/posix_static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_static_mutex.hpp
index cbf7013c2df..cbf7013c2df 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/posix_static_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/posix_static_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/posix_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_thread.hpp
index b2821f5356a..b2821f5356a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/posix_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/posix_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/posix_tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/posix_tss_ptr.hpp
index 93d06744a7e..93d06744a7e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/posix_tss_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/posix_tss_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/push_options.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/push_options.hpp
index 4927df93a24..4927df93a24 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/push_options.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/push_options.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_descriptor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_descriptor_service.hpp
index ac50a8ccb94..ac50a8ccb94 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_descriptor_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_descriptor_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_null_buffers_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_null_buffers_op.hpp
index dca3a3285f1..dca3a3285f1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_null_buffers_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_null_buffers_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_serial_port_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_serial_port_service.hpp
index 42ff500d2cf..42ff500d2cf 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_serial_port_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_serial_port_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_accept_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_accept_op.hpp
index 292f3bdf25f..292f3bdf25f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_accept_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_accept_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_connect_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_connect_op.hpp
index bbb5020501c..bbb5020501c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_connect_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_connect_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recv_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recv_op.hpp
index 0f124627bd2..0f124627bd2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recv_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recv_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp
index b96a01327a0..b96a01327a0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvfrom_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp
index 6ae324947c5..6ae324947c5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_recvmsg_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_send_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_send_op.hpp
index 11f3ad80af6..11f3ad80af6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_send_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_send_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_sendto_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_sendto_op.hpp
index a73934bfc19..a73934bfc19 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_sendto_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_sendto_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service.hpp
index 89940d9af0e..89940d9af0e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_service_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service_base.hpp
index 9d3d54cc110..9d3d54cc110 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_socket_service_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_socket_service_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_wait_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_wait_op.hpp
index ee325024822..ee325024822 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactive_wait_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactive_wait_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactor.hpp
index f1e5d95864f..f1e5d95864f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactor_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_fwd.hpp
index b222b134e6a..b222b134e6a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactor_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactor_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op.hpp
index beb443eb695..beb443eb695 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactor_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/reactor_op_queue.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op_queue.hpp
index fec0dd7d37f..fec0dd7d37f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/reactor_op_queue.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/reactor_op_queue.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/recycling_allocator.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/recycling_allocator.hpp
index adab0a7a61b..adab0a7a61b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/recycling_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/recycling_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/regex_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/regex_fwd.hpp
index 4d35a68ab94..4d35a68ab94 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/regex_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/regex_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/resolve_endpoint_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_endpoint_op.hpp
index 970544c7832..970544c7832 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/resolve_endpoint_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_endpoint_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/resolve_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_op.hpp
index fd72994fc59..fd72994fc59 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/resolve_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/resolve_query_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_query_op.hpp
index 91bdd796544..91bdd796544 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/resolve_query_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/resolve_query_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/resolver_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service.hpp
index 85c9c2a0a7d..85c9c2a0a7d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/resolver_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/resolver_service_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service_base.hpp
index 40adca655a7..40adca655a7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/resolver_service_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/resolver_service_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/scheduler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler.hpp
index 835e4c92376..835e4c92376 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/scheduler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/scheduler_operation.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_operation.hpp
index 633a8c594fb..633a8c594fb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/scheduler_operation.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_operation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/scheduler_thread_info.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_thread_info.hpp
index 5f18381d50e..5f18381d50e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/scheduler_thread_info.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/scheduler_thread_info.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/scoped_lock.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scoped_lock.hpp
index 005585c7003..005585c7003 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/scoped_lock.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/scoped_lock.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/scoped_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/scoped_ptr.hpp
index 12ad834919c..12ad834919c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/scoped_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/scoped_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/select_interrupter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/select_interrupter.hpp
index d837634e89e..d837634e89e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/select_interrupter.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/select_interrupter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/select_reactor.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/select_reactor.hpp
index dfb5e969438..dfb5e969438 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/select_reactor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/select_reactor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/service_registry.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/service_registry.hpp
index 894fdb1b75d..894fdb1b75d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/service_registry.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/service_registry.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/signal_blocker.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_blocker.hpp
index 875f188f484..875f188f484 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/signal_blocker.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/signal_blocker.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/signal_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_handler.hpp
index 2045db2188f..2045db2188f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/signal_handler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/signal_handler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/signal_init.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_init.hpp
index 1889de689ba..1889de689ba 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/signal_init.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/signal_init.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/signal_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_op.hpp
index 74cc68290dc..74cc68290dc 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/signal_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/signal_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/signal_set_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/signal_set_service.hpp
index 17ae44ea378..17ae44ea378 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/signal_set_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/signal_set_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/socket_holder.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_holder.hpp
index b229f66b1b2..b229f66b1b2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/socket_holder.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/socket_holder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/socket_ops.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_ops.hpp
index 8f5fa0b3cad..8f5fa0b3cad 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/socket_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/socket_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/socket_option.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_option.hpp
index bd940142cad..bd940142cad 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/socket_option.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/socket_option.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/socket_select_interrupter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_select_interrupter.hpp
index dc7e30d69bd..dc7e30d69bd 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/socket_select_interrupter.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/socket_select_interrupter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/socket_types.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/socket_types.hpp
index 11ed5518384..11ed5518384 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/socket_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/socket_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/solaris_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/solaris_fenced_block.hpp
index 3b605daf399..3b605daf399 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/solaris_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/solaris_fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/static_mutex.hpp
index 1bc5c2c8134..1bc5c2c8134 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/static_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/static_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/std_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_event.hpp
index d32bff422e2..d32bff422e2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/std_event.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/std_event.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/std_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_fenced_block.hpp
index 3993199145c..3993199145c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/std_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/std_fenced_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/std_global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_global.hpp
index f9df646bc65..f9df646bc65 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/std_global.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/std_global.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/std_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_mutex.hpp
index 463735b92af..463735b92af 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/std_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/std_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/std_static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_static_mutex.hpp
index 16104bcfa6d..16104bcfa6d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/std_static_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/std_static_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/std_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/std_thread.hpp
index af507ed32fb..af507ed32fb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/std_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/std_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/strand_executor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/strand_executor_service.hpp
index c3e68408dc2..c3e68408dc2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/strand_executor_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/strand_executor_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/strand_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/strand_service.hpp
index f036264b95b..f036264b95b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/strand_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/strand_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/string_view.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/string_view.hpp
index f74d730c0b7..f74d730c0b7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/string_view.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/string_view.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/thread.hpp
index 41810c64774..41810c64774 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/thread_context.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/thread_context.hpp
index b4a2435f0fc..b4a2435f0fc 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/thread_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/thread_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/thread_group.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/thread_group.hpp
index c9c194142ff..c9c194142ff 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/thread_group.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/thread_group.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/thread_info_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/thread_info_base.hpp
index 16bb1787f34..16bb1787f34 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/thread_info_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/thread_info_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/throw_error.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/throw_error.hpp
index c1775b25362..c1775b25362 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/throw_error.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/throw_error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/throw_exception.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/throw_exception.hpp
index 8690fa6f638..8690fa6f638 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/throw_exception.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/throw_exception.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue.hpp
new file mode 100644
index 00000000000..3b2bcff7744
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue.hpp
@@ -0,0 +1,362 @@
+//
+// detail/timer_queue.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_DETAIL_TIMER_QUEUE_HPP
+#define BOOST_ASIO_DETAIL_TIMER_QUEUE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <cstddef>
+#include <vector>
+#include <boost/asio/detail/cstdint.hpp>
+#include <boost/asio/detail/date_time_fwd.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/op_queue.hpp>
+#include <boost/asio/detail/timer_queue_base.hpp>
+#include <boost/asio/detail/wait_op.hpp>
+#include <boost/asio/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Time_Traits>
+class timer_queue
+ : public timer_queue_base
+{
+public:
+ // The time type.
+ typedef typename Time_Traits::time_type time_type;
+
+ // The duration type.
+ typedef typename Time_Traits::duration_type duration_type;
+
+ // Per-timer data.
+ class per_timer_data
+ {
+ public:
+ per_timer_data() :
+ heap_index_((std::numeric_limits<std::size_t>::max)()),
+ next_(0), prev_(0)
+ {
+ }
+
+ private:
+ friend class timer_queue;
+
+ // The operations waiting on the timer.
+ op_queue<wait_op> op_queue_;
+
+ // The index of the timer in the heap.
+ std::size_t heap_index_;
+
+ // Pointers to adjacent timers in a linked list.
+ per_timer_data* next_;
+ per_timer_data* prev_;
+ };
+
+ // Constructor.
+ timer_queue()
+ : timers_(),
+ heap_()
+ {
+ }
+
+ // Add a new timer to the queue. Returns true if this is the timer that is
+ // earliest in the queue, in which case the reactor's event demultiplexing
+ // function call may need to be interrupted and restarted.
+ bool enqueue_timer(const time_type& time, per_timer_data& timer, wait_op* op)
+ {
+ // Enqueue the timer object.
+ if (timer.prev_ == 0 && &timer != timers_)
+ {
+ if (this->is_positive_infinity(time))
+ {
+ // No heap entry is required for timers that never expire.
+ timer.heap_index_ = (std::numeric_limits<std::size_t>::max)();
+ }
+ else
+ {
+ // Put the new timer at the correct position in the heap. This is done
+ // first since push_back() can throw due to allocation failure.
+ timer.heap_index_ = heap_.size();
+ heap_entry entry = { time, &timer };
+ heap_.push_back(entry);
+ up_heap(heap_.size() - 1);
+ }
+
+ // Insert the new timer into the linked list of active timers.
+ timer.next_ = timers_;
+ timer.prev_ = 0;
+ if (timers_)
+ timers_->prev_ = &timer;
+ timers_ = &timer;
+ }
+
+ // Enqueue the individual timer operation.
+ timer.op_queue_.push(op);
+
+ // Interrupt reactor only if newly added timer is first to expire.
+ return timer.heap_index_ == 0 && timer.op_queue_.front() == op;
+ }
+
+ // Whether there are no timers in the queue.
+ virtual bool empty() const
+ {
+ return timers_ == 0;
+ }
+
+ // Get the time for the timer that is earliest in the queue.
+ virtual long wait_duration_msec(long max_duration) const
+ {
+ if (heap_.empty())
+ return max_duration;
+
+ return this->to_msec(
+ Time_Traits::to_posix_duration(
+ Time_Traits::subtract(heap_[0].time_, Time_Traits::now())),
+ max_duration);
+ }
+
+ // Get the time for the timer that is earliest in the queue.
+ virtual long wait_duration_usec(long max_duration) const
+ {
+ if (heap_.empty())
+ return max_duration;
+
+ return this->to_usec(
+ Time_Traits::to_posix_duration(
+ Time_Traits::subtract(heap_[0].time_, Time_Traits::now())),
+ max_duration);
+ }
+
+ // Dequeue all timers not later than the current time.
+ virtual void get_ready_timers(op_queue<operation>& ops)
+ {
+ if (!heap_.empty())
+ {
+ const time_type now = Time_Traits::now();
+ while (!heap_.empty() && !Time_Traits::less_than(now, heap_[0].time_))
+ {
+ per_timer_data* timer = heap_[0].timer_;
+ ops.push(timer->op_queue_);
+ remove_timer(*timer);
+ }
+ }
+ }
+
+ // Dequeue all timers.
+ virtual void get_all_timers(op_queue<operation>& ops)
+ {
+ while (timers_)
+ {
+ per_timer_data* timer = timers_;
+ timers_ = timers_->next_;
+ ops.push(timer->op_queue_);
+ timer->next_ = 0;
+ timer->prev_ = 0;
+ }
+
+ heap_.clear();
+ }
+
+ // Cancel and dequeue operations for the given timer.
+ std::size_t cancel_timer(per_timer_data& timer, op_queue<operation>& ops,
+ std::size_t max_cancelled = (std::numeric_limits<std::size_t>::max)())
+ {
+ std::size_t num_cancelled = 0;
+ if (timer.prev_ != 0 || &timer == timers_)
+ {
+ while (wait_op* op = (num_cancelled != max_cancelled)
+ ? timer.op_queue_.front() : 0)
+ {
+ op->ec_ = boost::asio::error::operation_aborted;
+ timer.op_queue_.pop();
+ ops.push(op);
+ ++num_cancelled;
+ }
+ if (timer.op_queue_.empty())
+ remove_timer(timer);
+ }
+ return num_cancelled;
+ }
+
+ // Move operations from one timer to another, empty timer.
+ void move_timer(per_timer_data& target, per_timer_data& source)
+ {
+ target.op_queue_.push(source.op_queue_);
+
+ target.heap_index_ = source.heap_index_;
+ source.heap_index_ = (std::numeric_limits<std::size_t>::max)();
+
+ if (target.heap_index_ < heap_.size())
+ heap_[target.heap_index_].timer_ = &target;
+
+ if (timers_ == &source)
+ timers_ = &target;
+ if (source.prev_)
+ source.prev_->next_ = &target;
+ if (source.next_)
+ source.next_->prev_= &target;
+ target.next_ = source.next_;
+ target.prev_ = source.prev_;
+ source.next_ = 0;
+ source.prev_ = 0;
+ }
+
+private:
+ // Move the item at the given index up the heap to its correct position.
+ void up_heap(std::size_t index)
+ {
+ while (index > 0)
+ {
+ std::size_t parent = (index - 1) / 2;
+ if (!Time_Traits::less_than(heap_[index].time_, heap_[parent].time_))
+ break;
+ swap_heap(index, parent);
+ index = parent;
+ }
+ }
+
+ // Move the item at the given index down the heap to its correct position.
+ void down_heap(std::size_t index)
+ {
+ std::size_t child = index * 2 + 1;
+ while (child < heap_.size())
+ {
+ std::size_t min_child = (child + 1 == heap_.size()
+ || Time_Traits::less_than(
+ heap_[child].time_, heap_[child + 1].time_))
+ ? child : child + 1;
+ if (Time_Traits::less_than(heap_[index].time_, heap_[min_child].time_))
+ break;
+ swap_heap(index, min_child);
+ index = min_child;
+ child = index * 2 + 1;
+ }
+ }
+
+ // Swap two entries in the heap.
+ void swap_heap(std::size_t index1, std::size_t index2)
+ {
+ heap_entry tmp = heap_[index1];
+ heap_[index1] = heap_[index2];
+ heap_[index2] = tmp;
+ heap_[index1].timer_->heap_index_ = index1;
+ heap_[index2].timer_->heap_index_ = index2;
+ }
+
+ // Remove a timer from the heap and list of timers.
+ void remove_timer(per_timer_data& timer)
+ {
+ // Remove the timer from the heap.
+ std::size_t index = timer.heap_index_;
+ if (!heap_.empty() && index < heap_.size())
+ {
+ if (index == heap_.size() - 1)
+ {
+ timer.heap_index_ = (std::numeric_limits<std::size_t>::max)();
+ heap_.pop_back();
+ }
+ else
+ {
+ swap_heap(index, heap_.size() - 1);
+ timer.heap_index_ = (std::numeric_limits<std::size_t>::max)();
+ heap_.pop_back();
+ if (index > 0 && Time_Traits::less_than(
+ heap_[index].time_, heap_[(index - 1) / 2].time_))
+ up_heap(index);
+ else
+ down_heap(index);
+ }
+ }
+
+ // Remove the timer from the linked list of active timers.
+ if (timers_ == &timer)
+ timers_ = timer.next_;
+ if (timer.prev_)
+ timer.prev_->next_ = timer.next_;
+ if (timer.next_)
+ timer.next_->prev_= timer.prev_;
+ timer.next_ = 0;
+ timer.prev_ = 0;
+ }
+
+ // Determine if the specified absolute time is positive infinity.
+ template <typename Time_Type>
+ static bool is_positive_infinity(const Time_Type&)
+ {
+ return false;
+ }
+
+ // Determine if the specified absolute time is positive infinity.
+ template <typename T, typename TimeSystem>
+ static bool is_positive_infinity(
+ const boost::date_time::base_time<T, TimeSystem>& time)
+ {
+ return time.is_pos_infinity();
+ }
+
+ // Helper function to convert a duration into milliseconds.
+ template <typename Duration>
+ long to_msec(const Duration& d, long max_duration) const
+ {
+ if (d.ticks() <= 0)
+ return 0;
+ int64_t msec = d.total_milliseconds();
+ if (msec == 0)
+ return 1;
+ if (msec > max_duration)
+ return max_duration;
+ return static_cast<long>(msec);
+ }
+
+ // Helper function to convert a duration into microseconds.
+ template <typename Duration>
+ long to_usec(const Duration& d, long max_duration) const
+ {
+ if (d.ticks() <= 0)
+ return 0;
+ int64_t usec = d.total_microseconds();
+ if (usec == 0)
+ return 1;
+ if (usec > max_duration)
+ return max_duration;
+ return static_cast<long>(usec);
+ }
+
+ // The head of a linked list of all active timers.
+ per_timer_data* timers_;
+
+ struct heap_entry
+ {
+ // The time when the timer should fire.
+ time_type time_;
+
+ // The associated timer with enqueued operations.
+ per_timer_data* timer_;
+ };
+
+ // The heap of timers, with the earliest timer at the front.
+ std::vector<heap_entry> heap_;
+};
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_TIMER_QUEUE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_base.hpp
index f3a14238aa6..f3a14238aa6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_ptime.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_ptime.hpp
index cc053bff9da..cc053bff9da 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_ptime.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_ptime.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_set.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_set.hpp
index 2bed122fc2f..2bed122fc2f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/timer_queue_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/timer_queue_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/timer_scheduler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler.hpp
index dc6e8d890c6..dc6e8d890c6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/timer_scheduler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/timer_scheduler_fwd.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler_fwd.hpp
index c3656c66a03..c3656c66a03 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/timer_scheduler_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/timer_scheduler_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/tss_ptr.hpp
index 7850718a3c8..7850718a3c8 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/tss_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/tss_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/type_traits.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/type_traits.hpp
index a0d4cb49027..a0d4cb49027 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/type_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/type_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/variadic_templates.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/variadic_templates.hpp
index c358feec189..c358feec189 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/variadic_templates.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/variadic_templates.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/wait_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/wait_handler.hpp
index a9341244f80..a9341244f80 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/wait_handler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/wait_handler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/wait_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/wait_op.hpp
index 3a95a375801..3a95a375801 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/wait_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/wait_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_event.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_event.hpp
index 67edbcfb896..67edbcfb896 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_event.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_event.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_fd_set_adapter.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_fd_set_adapter.hpp
index bdddb32a9d1..bdddb32a9d1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_fd_set_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_fd_set_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_fenced_block.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_fenced_block.hpp
index c595eaa00f7..c595eaa00f7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_fenced_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_fenced_block.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/detail/win_global.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_global.hpp
new file mode 100644
index 00000000000..11204dec6d2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_global.hpp
@@ -0,0 +1,76 @@
+//
+// detail/win_global.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_DETAIL_WIN_GLOBAL_HPP
+#define BOOST_ASIO_DETAIL_WIN_GLOBAL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/static_mutex.hpp>
+#include <boost/asio/detail/tss_ptr.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename T>
+struct win_global_impl
+{
+ // Destructor automatically cleans up the global.
+ ~win_global_impl()
+ {
+ delete ptr_;
+ }
+
+ static win_global_impl instance_;
+ static static_mutex mutex_;
+ static T* ptr_;
+ static tss_ptr<T> tss_ptr_;
+};
+
+template <typename T>
+win_global_impl<T> win_global_impl<T>::instance_ = { 0 };
+
+template <typename T>
+static_mutex win_global_impl<T>::mutex_ = BOOST_ASIO_STATIC_MUTEX_INIT;
+
+template <typename T>
+T* win_global_impl<T>::ptr_ = 0;
+
+template <typename T>
+tss_ptr<T> win_global_impl<T>::tss_ptr_;
+
+template <typename T>
+T& win_global()
+{
+ if (static_cast<T*>(win_global_impl<T>::tss_ptr_) == 0)
+ {
+ win_global_impl<T>::mutex_.init();
+ static_mutex::scoped_lock lock(win_global_impl<T>::mutex_);
+ if (win_global_impl<T>::ptr_ == 0)
+ win_global_impl<T>::ptr_ = new T;
+ win_global_impl<T>::tss_ptr_ = win_global_impl<T>::ptr_;
+ }
+
+ return *win_global_impl<T>::tss_ptr_;
+}
+
+} // namespace detail
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_DETAIL_WIN_GLOBAL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_read_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_read_op.hpp
index 842ed80b736..842ed80b736 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_read_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_read_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_service.hpp
index 4d5aadeef56..4d5aadeef56 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_write_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_write_op.hpp
index 582b3f2b82d..582b3f2b82d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_handle_write_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_handle_write_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_io_context.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_io_context.hpp
index 1ccdf35f657..1ccdf35f657 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_io_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_io_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_null_buffers_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_null_buffers_op.hpp
index 106bedeba07..106bedeba07 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_null_buffers_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_null_buffers_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_operation.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_operation.hpp
index 11111f31501..11111f31501 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_operation.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_operation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_overlapped_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_op.hpp
index 18f0d631731..18f0d631731 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_overlapped_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp
index 6cff7ae1d4a..6cff7ae1d4a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_overlapped_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_serial_port_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_serial_port_service.hpp
index 3da25372952..3da25372952 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_serial_port_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_serial_port_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_accept_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_accept_op.hpp
index 8e1b7fc93ad..8e1b7fc93ad 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_accept_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_accept_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_connect_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_connect_op.hpp
index 916d22ee49e..916d22ee49e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_connect_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_connect_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recv_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recv_op.hpp
index b052ec236e2..b052ec236e2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recv_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recv_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
index a7338c88775..a7338c88775 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvfrom_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
index 4a8313225d3..4a8313225d3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_recvmsg_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_send_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_send_op.hpp
index 7dc9ab3175a..7dc9ab3175a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_send_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_send_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service.hpp
index d71c6ee0466..d71c6ee0466 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_service_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service_base.hpp
index dd2bf9f6a99..dd2bf9f6a99 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_socket_service_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_socket_service_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_thread_info.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_thread_info.hpp
index 53f853e1041..53f853e1041 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_thread_info.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_thread_info.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_wait_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_wait_op.hpp
index b067da3e3d7..b067da3e3d7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_iocp_wait_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_iocp_wait_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_mutex.hpp
index 45d87c63bb1..45d87c63bb1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_object_handle_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_object_handle_service.hpp
index 03fb6348887..03fb6348887 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_object_handle_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_object_handle_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_static_mutex.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_static_mutex.hpp
index 78d3a2eb7f9..78d3a2eb7f9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_static_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_static_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_thread.hpp
index 377c3e3f937..377c3e3f937 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/win_tss_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/win_tss_ptr.hpp
index e1761c2e271..e1761c2e271 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/win_tss_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/win_tss_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winapp_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winapp_thread.hpp
index 775f663d842..775f663d842 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winapp_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winapp_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/wince_thread.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/wince_thread.hpp
index 77ec7c82658..77ec7c82658 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/wince_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/wince_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_async_manager.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_manager.hpp
index 57d6a1c218e..57d6a1c218e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_async_manager.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_manager.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_async_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_op.hpp
index c3203ff88aa..c3203ff88aa 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_async_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_async_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_resolve_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolve_op.hpp
index 80f102f4c81..80f102f4c81 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_resolve_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolve_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_resolver_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolver_service.hpp
index 463dbde11fd..463dbde11fd 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_resolver_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_resolver_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_connect_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_connect_op.hpp
index 9926da97d97..9926da97d97 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_connect_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_connect_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_recv_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_recv_op.hpp
index 0701208da47..0701208da47 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_recv_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_recv_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_send_op.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_send_op.hpp
index 4e62056c4f4..4e62056c4f4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_socket_send_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_socket_send_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_ssocket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service.hpp
index c874f2520d4..c874f2520d4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_ssocket_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_ssocket_service_base.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service_base.hpp
index dcb5aa1c40a..dcb5aa1c40a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_ssocket_service_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_ssocket_service_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_timer_scheduler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_timer_scheduler.hpp
index 8f61ad843e5..8f61ad843e5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_timer_scheduler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_timer_scheduler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_utils.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_utils.hpp
index 765edeecb8e..765edeecb8e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winrt_utils.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winrt_utils.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/winsock_init.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/winsock_init.hpp
index abf59cd1bfc..abf59cd1bfc 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/winsock_init.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/winsock_init.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/work_dispatcher.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/work_dispatcher.hpp
index 3167f244fd9..3167f244fd9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/work_dispatcher.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/work_dispatcher.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/detail/wrapped_handler.hpp b/src/third_party/boost-1.69.0/boost/asio/detail/wrapped_handler.hpp
index 8e23d1db9e5..8e23d1db9e5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/detail/wrapped_handler.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/detail/wrapped_handler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/dispatch.hpp b/src/third_party/boost-1.69.0/boost/asio/dispatch.hpp
index 4136eda64fb..4136eda64fb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/dispatch.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/dispatch.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/error.hpp b/src/third_party/boost-1.69.0/boost/asio/error.hpp
index 53810b287a7..53810b287a7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/error.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/execution_context.hpp b/src/third_party/boost-1.69.0/boost/asio/execution_context.hpp
index 4ebb607a1a6..4ebb607a1a6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/execution_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/execution_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/executor.hpp b/src/third_party/boost-1.69.0/boost/asio/executor.hpp
index 43a5a2c1059..43a5a2c1059 100644
--- a/src/third_party/boost-1.68.0/boost/asio/executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/executor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/executor_work_guard.hpp b/src/third_party/boost-1.69.0/boost/asio/executor_work_guard.hpp
index a9303462eb0..a9303462eb0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/executor_work_guard.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/executor_work_guard.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/experimental.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental.hpp
index 0ca0a9658fa..0ca0a9658fa 100644
--- a/src/third_party/boost-1.68.0/boost/asio/experimental.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/experimental.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/experimental/co_spawn.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/co_spawn.hpp
index c900da11f0a..c900da11f0a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/experimental/co_spawn.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/experimental/co_spawn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/experimental/detached.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/detached.hpp
index c3e7adafac4..c3e7adafac4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/experimental/detached.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/experimental/detached.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/experimental/impl/co_spawn.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/co_spawn.hpp
index 51ffb4eeb1f..51ffb4eeb1f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/experimental/impl/co_spawn.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/co_spawn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/experimental/impl/detached.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/detached.hpp
index c3baf20299e..c3baf20299e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/experimental/impl/detached.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/detached.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/experimental/impl/redirect_error.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/redirect_error.hpp
index 00ffcc7848b..00ffcc7848b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/experimental/impl/redirect_error.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/experimental/impl/redirect_error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/experimental/redirect_error.hpp b/src/third_party/boost-1.69.0/boost/asio/experimental/redirect_error.hpp
index a1388545214..a1388545214 100644
--- a/src/third_party/boost-1.68.0/boost/asio/experimental/redirect_error.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/experimental/redirect_error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/generic/basic_endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/basic_endpoint.hpp
index fc1c0ba2900..fc1c0ba2900 100644
--- a/src/third_party/boost-1.68.0/boost/asio/generic/basic_endpoint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/generic/basic_endpoint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/generic/datagram_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/datagram_protocol.hpp
index e9ef54f5303..e9ef54f5303 100644
--- a/src/third_party/boost-1.68.0/boost/asio/generic/datagram_protocol.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/generic/datagram_protocol.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/generic/detail/endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/detail/endpoint.hpp
index c338d78da2f..c338d78da2f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/generic/detail/endpoint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/generic/detail/endpoint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/generic/detail/impl/endpoint.ipp b/src/third_party/boost-1.69.0/boost/asio/generic/detail/impl/endpoint.ipp
index 97db811f2e7..97db811f2e7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/generic/detail/impl/endpoint.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/generic/detail/impl/endpoint.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/generic/raw_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/raw_protocol.hpp
index dca84e73f7c..dca84e73f7c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/generic/raw_protocol.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/generic/raw_protocol.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/generic/seq_packet_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/seq_packet_protocol.hpp
index e54f23e6d97..e54f23e6d97 100644
--- a/src/third_party/boost-1.68.0/boost/asio/generic/seq_packet_protocol.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/generic/seq_packet_protocol.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/generic/stream_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/generic/stream_protocol.hpp
index 599f095dd03..599f095dd03 100644
--- a/src/third_party/boost-1.68.0/boost/asio/generic/stream_protocol.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/generic/stream_protocol.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/handler_alloc_hook.hpp b/src/third_party/boost-1.69.0/boost/asio/handler_alloc_hook.hpp
index c9636b53ad0..c9636b53ad0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/handler_alloc_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/handler_alloc_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/handler_continuation_hook.hpp b/src/third_party/boost-1.69.0/boost/asio/handler_continuation_hook.hpp
index 4f446b0953f..4f446b0953f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/handler_continuation_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/handler_continuation_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/handler_invoke_hook.hpp b/src/third_party/boost-1.69.0/boost/asio/handler_invoke_hook.hpp
index a853bdfaddb..a853bdfaddb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/handler_invoke_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/handler_invoke_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/handler_type.hpp b/src/third_party/boost-1.69.0/boost/asio/handler_type.hpp
index 0c431893384..0c431893384 100644
--- a/src/third_party/boost-1.68.0/boost/asio/handler_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/handler_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/high_resolution_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/high_resolution_timer.hpp
index f7383b7cc9a..f7383b7cc9a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/high_resolution_timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/high_resolution_timer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/buffered_read_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/buffered_read_stream.hpp
index 2e1c55842b7..2e1c55842b7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/buffered_read_stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/buffered_read_stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/buffered_write_stream.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/buffered_write_stream.hpp
index c5ebf7537b9..c5ebf7537b9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/buffered_write_stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/buffered_write_stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/connect.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/connect.hpp
index 497f25884c6..497f25884c6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/connect.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/connect.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/defer.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/defer.hpp
index 7cc86da45cc..7cc86da45cc 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/defer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/defer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/dispatch.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/dispatch.hpp
index 8bdce85180b..8bdce85180b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/dispatch.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/dispatch.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/error.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/error.ipp
index 49a10462bdf..49a10462bdf 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/error.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/error.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/execution_context.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.hpp
index eadf36b145c..eadf36b145c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/execution_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/execution_context.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.ipp
index 219a66113db..219a66113db 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/execution_context.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/execution_context.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/executor.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/executor.hpp
index 106763b042a..106763b042a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/executor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/executor.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/executor.ipp
index 86114d93f12..86114d93f12 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/executor.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/executor.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/handler_alloc_hook.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/handler_alloc_hook.ipp
index 2b04ec104ed..2b04ec104ed 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/handler_alloc_hook.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/handler_alloc_hook.ipp
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/io_context.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/io_context.hpp
new file mode 100644
index 00000000000..37f8ace42a6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/io_context.hpp
@@ -0,0 +1,347 @@
+//
+// impl/io_context.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_IMPL_IO_CONTEXT_HPP
+#define BOOST_ASIO_IMPL_IO_CONTEXT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/completion_handler.hpp>
+#include <boost/asio/detail/executor_op.hpp>
+#include <boost/asio/detail/fenced_block.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/recycling_allocator.hpp>
+#include <boost/asio/detail/service_registry.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+template <typename Service>
+inline Service& use_service(io_context& ioc)
+{
+ // Check that Service meets the necessary type requirements.
+ (void)static_cast<execution_context::service*>(static_cast<Service*>(0));
+ (void)static_cast<const execution_context::id*>(&Service::id);
+
+ return ioc.service_registry_->template use_service<Service>(ioc);
+}
+
+template <>
+inline detail::io_context_impl& use_service<detail::io_context_impl>(
+ io_context& ioc)
+{
+ return ioc.impl_;
+}
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if defined(BOOST_ASIO_HAS_IOCP)
+# include <boost/asio/detail/win_iocp_io_context.hpp>
+#else
+# include <boost/asio/detail/scheduler.hpp>
+#endif
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+inline io_context::executor_type
+io_context::get_executor() BOOST_ASIO_NOEXCEPT
+{
+ return executor_type(*this);
+}
+
+#if defined(BOOST_ASIO_HAS_CHRONO)
+
+template <typename Rep, typename Period>
+std::size_t io_context::run_for(
+ const chrono::duration<Rep, Period>& rel_time)
+{
+ return this->run_until(chrono::steady_clock::now() + rel_time);
+}
+
+template <typename Clock, typename Duration>
+std::size_t io_context::run_until(
+ const chrono::time_point<Clock, Duration>& abs_time)
+{
+ std::size_t n = 0;
+ while (this->run_one_until(abs_time))
+ if (n != (std::numeric_limits<std::size_t>::max)())
+ ++n;
+ return n;
+}
+
+template <typename Rep, typename Period>
+std::size_t io_context::run_one_for(
+ const chrono::duration<Rep, Period>& rel_time)
+{
+ return this->run_one_until(chrono::steady_clock::now() + rel_time);
+}
+
+template <typename Clock, typename Duration>
+std::size_t io_context::run_one_until(
+ const chrono::time_point<Clock, Duration>& abs_time)
+{
+ typename Clock::time_point now = Clock::now();
+ while (now < abs_time)
+ {
+ typename Clock::duration rel_time = abs_time - now;
+ if (rel_time > chrono::seconds(1))
+ rel_time = chrono::seconds(1);
+
+ boost::system::error_code ec;
+ std::size_t s = impl_.wait_one(
+ static_cast<long>(chrono::duration_cast<
+ chrono::microseconds>(rel_time).count()), ec);
+ boost::asio::detail::throw_error(ec);
+
+ if (s || impl_.stopped())
+ return s;
+
+ now = Clock::now();
+ }
+
+ return 0;
+}
+
+#endif // defined(BOOST_ASIO_HAS_CHRONO)
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+inline void io_context::reset()
+{
+ restart();
+}
+
+template <typename LegacyCompletionHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+io_context::dispatch(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+{
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a LegacyCompletionHandler.
+ BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
+ LegacyCompletionHandler, handler) type_check;
+
+ async_completion<LegacyCompletionHandler, void ()> init(handler);
+
+ if (impl_.can_dispatch())
+ {
+ detail::fenced_block b(detail::fenced_block::full);
+ boost_asio_handler_invoke_helpers::invoke(
+ init.completion_handler, init.completion_handler);
+ }
+ else
+ {
+ // Allocate and construct an operation to wrap the handler.
+ typedef detail::completion_handler<
+ typename handler_type<LegacyCompletionHandler, void ()>::type> op;
+ typename op::ptr p = { detail::addressof(init.completion_handler),
+ op::ptr::allocate(init.completion_handler), 0 };
+ p.p = new (p.v) op(init.completion_handler);
+
+ BOOST_ASIO_HANDLER_CREATION((*this, *p.p,
+ "io_context", this, 0, "dispatch"));
+
+ impl_.do_dispatch(p.p);
+ p.v = p.p = 0;
+ }
+
+ return init.result.get();
+}
+
+template <typename LegacyCompletionHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(LegacyCompletionHandler, void ())
+io_context::post(BOOST_ASIO_MOVE_ARG(LegacyCompletionHandler) handler)
+{
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a LegacyCompletionHandler.
+ BOOST_ASIO_LEGACY_COMPLETION_HANDLER_CHECK(
+ LegacyCompletionHandler, handler) type_check;
+
+ async_completion<LegacyCompletionHandler, void ()> init(handler);
+
+ bool is_continuation =
+ boost_asio_handler_cont_helpers::is_continuation(init.completion_handler);
+
+ // Allocate and construct an operation to wrap the handler.
+ typedef detail::completion_handler<
+ typename handler_type<LegacyCompletionHandler, void ()>::type> op;
+ typename op::ptr p = { detail::addressof(init.completion_handler),
+ op::ptr::allocate(init.completion_handler), 0 };
+ p.p = new (p.v) op(init.completion_handler);
+
+ BOOST_ASIO_HANDLER_CREATION((*this, *p.p,
+ "io_context", this, 0, "post"));
+
+ impl_.post_immediate_completion(p.p, is_continuation);
+ p.v = p.p = 0;
+
+ return init.result.get();
+}
+
+template <typename Handler>
+#if defined(GENERATING_DOCUMENTATION)
+unspecified
+#else
+inline detail::wrapped_handler<io_context&, Handler>
+#endif
+io_context::wrap(Handler handler)
+{
+ return detail::wrapped_handler<io_context&, Handler>(*this, handler);
+}
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+inline io_context&
+io_context::executor_type::context() const BOOST_ASIO_NOEXCEPT
+{
+ return io_context_;
+}
+
+inline void
+io_context::executor_type::on_work_started() const BOOST_ASIO_NOEXCEPT
+{
+ io_context_.impl_.work_started();
+}
+
+inline void
+io_context::executor_type::on_work_finished() const BOOST_ASIO_NOEXCEPT
+{
+ io_context_.impl_.work_finished();
+}
+
+template <typename Function, typename Allocator>
+void io_context::executor_type::dispatch(
+ BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+{
+ typedef typename decay<Function>::type function_type;
+
+ // Invoke immediately if we are already inside the thread pool.
+ if (io_context_.impl_.can_dispatch())
+ {
+ // Make a local, non-const copy of the function.
+ function_type tmp(BOOST_ASIO_MOVE_CAST(Function)(f));
+
+ detail::fenced_block b(detail::fenced_block::full);
+ boost_asio_handler_invoke_helpers::invoke(tmp, tmp);
+ return;
+ }
+
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_op<function_type, Allocator, detail::operation> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(f), a);
+
+ BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p,
+ "io_context", &this->context(), 0, "dispatch"));
+
+ io_context_.impl_.post_immediate_completion(p.p, false);
+ p.v = p.p = 0;
+}
+
+template <typename Function, typename Allocator>
+void io_context::executor_type::post(
+ BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+{
+ typedef typename decay<Function>::type function_type;
+
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_op<function_type, Allocator, detail::operation> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(f), a);
+
+ BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p,
+ "io_context", &this->context(), 0, "post"));
+
+ io_context_.impl_.post_immediate_completion(p.p, false);
+ p.v = p.p = 0;
+}
+
+template <typename Function, typename Allocator>
+void io_context::executor_type::defer(
+ BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const
+{
+ typedef typename decay<Function>::type function_type;
+
+ // Allocate and construct an operation to wrap the function.
+ typedef detail::executor_op<function_type, Allocator, detail::operation> op;
+ typename op::ptr p = { detail::addressof(a), op::ptr::allocate(a), 0 };
+ p.p = new (p.v) op(BOOST_ASIO_MOVE_CAST(Function)(f), a);
+
+ BOOST_ASIO_HANDLER_CREATION((this->context(), *p.p,
+ "io_context", &this->context(), 0, "defer"));
+
+ io_context_.impl_.post_immediate_completion(p.p, true);
+ p.v = p.p = 0;
+}
+
+inline bool
+io_context::executor_type::running_in_this_thread() const BOOST_ASIO_NOEXCEPT
+{
+ return io_context_.impl_.can_dispatch();
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+inline io_context::work::work(boost::asio::io_context& io_context)
+ : io_context_impl_(io_context.impl_)
+{
+ io_context_impl_.work_started();
+}
+
+inline io_context::work::work(const work& other)
+ : io_context_impl_(other.io_context_impl_)
+{
+ io_context_impl_.work_started();
+}
+
+inline io_context::work::~work()
+{
+ io_context_impl_.work_finished();
+}
+
+inline boost::asio::io_context& io_context::work::get_io_context()
+{
+ return static_cast<boost::asio::io_context&>(io_context_impl_.context());
+}
+
+inline boost::asio::io_context& io_context::work::get_io_service()
+{
+ return static_cast<boost::asio::io_context&>(io_context_impl_.context());
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+inline boost::asio::io_context& io_context::service::get_io_context()
+{
+ return static_cast<boost::asio::io_context&>(context());
+}
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+inline boost::asio::io_context& io_context::service::get_io_service()
+{
+ return static_cast<boost::asio::io_context&>(context());
+}
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_IO_CONTEXT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/io_context.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/io_context.ipp
index 96a7de7415c..96a7de7415c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/io_context.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/io_context.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/post.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/post.hpp
index d318f890ff2..d318f890ff2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/post.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/post.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/read.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/read.hpp
index 9fbddc964e9..9fbddc964e9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/read.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/read.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/read_at.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/read_at.hpp
index e3c31c543e2..e3c31c543e2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/read_at.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/read_at.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/read_until.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/read_until.hpp
new file mode 100644
index 00000000000..8bc959557a1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/read_until.hpp
@@ -0,0 +1,1504 @@
+//
+// impl/read_until.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_IMPL_READ_UNTIL_HPP
+#define BOOST_ASIO_IMPL_READ_UNTIL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <algorithm>
+#include <string>
+#include <vector>
+#include <utility>
+#include <boost/asio/associated_allocator.hpp>
+#include <boost/asio/associated_executor.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/buffers_iterator.hpp>
+#include <boost/asio/detail/bind_handler.hpp>
+#include <boost/asio/detail/handler_alloc_helpers.hpp>
+#include <boost/asio/detail/handler_cont_helpers.hpp>
+#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/limits.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+template <typename SyncReadStream, typename DynamicBuffer>
+inline std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ char delim, boost::system::error_code& ec)
+{
+ typename decay<DynamicBuffer>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers = b.data();
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ iterator iter = std::find(start_pos, end, delim);
+ if (iter != end)
+ {
+ // Found a match. We're done.
+ ec = boost::system::error_code();
+ return iter - begin + 1;
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ search_position = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
+ b.commit(s.read_some(b.prepare(bytes_to_read), ec));
+ if (ec)
+ return 0;
+ }
+}
+
+template <typename SyncReadStream, typename DynamicBuffer>
+inline std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), delim, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+namespace detail
+{
+ // Algorithm that finds a subsequence of equal values in a sequence. Returns
+ // (iterator,true) if a full match was found, in which case the iterator
+ // points to the beginning of the match. Returns (iterator,false) if a
+ // partial match was found at the end of the first sequence, in which case
+ // the iterator points to the beginning of the partial match. Returns
+ // (last1,false) if no full or partial match was found.
+ template <typename Iterator1, typename Iterator2>
+ std::pair<Iterator1, bool> partial_search(
+ Iterator1 first1, Iterator1 last1, Iterator2 first2, Iterator2 last2)
+ {
+ for (Iterator1 iter1 = first1; iter1 != last1; ++iter1)
+ {
+ Iterator1 test_iter1 = iter1;
+ Iterator2 test_iter2 = first2;
+ for (;; ++test_iter1, ++test_iter2)
+ {
+ if (test_iter2 == last2)
+ return std::make_pair(iter1, true);
+ if (test_iter1 == last1)
+ {
+ if (test_iter2 != first2)
+ return std::make_pair(iter1, false);
+ else
+ break;
+ }
+ if (*test_iter1 != *test_iter2)
+ break;
+ }
+ }
+ return std::make_pair(last1, false);
+ }
+} // namespace detail
+
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec)
+{
+ typename decay<DynamicBuffer>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers = b.data();
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = detail::partial_search(
+ start_pos, end, delim.begin(), delim.end());
+ if (result.first != end)
+ {
+ if (result.second)
+ {
+ // Full match. We're done.
+ ec = boost::system::error_code();
+ return result.first - begin + delim.length();
+ }
+ else
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ search_position = result.first - begin;
+ }
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ search_position = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
+ b.commit(s.read_some(b.prepare(bytes_to_read), ec));
+ if (ec)
+ return 0;
+ }
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename SyncReadStream, typename DynamicBuffer>
+inline std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ const boost::regex& expr)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers), expr, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ const boost::regex& expr, boost::system::error_code& ec)
+{
+ typename decay<DynamicBuffer>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers = b.data();
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ boost::match_results<iterator,
+ typename std::vector<boost::sub_match<iterator> >::allocator_type>
+ match_results;
+ if (regex_search(start_pos, end, match_results, expr,
+ boost::match_default | boost::match_partial))
+ {
+ if (match_results[0].matched)
+ {
+ // Full match. We're done.
+ ec = boost::system::error_code();
+ return match_results[0].second - begin;
+ }
+ else
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ search_position = match_results[0].first - begin;
+ }
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ search_position = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
+ b.commit(s.read_some(b.prepare(bytes_to_read), ec));
+ if (ec)
+ return 0;
+ }
+}
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename SyncReadStream,
+ typename DynamicBuffer, typename MatchCondition>
+inline std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ MatchCondition match_condition,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+{
+ boost::system::error_code ec;
+ std::size_t bytes_transferred = read_until(s,
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ match_condition, ec);
+ boost::asio::detail::throw_error(ec, "read_until");
+ return bytes_transferred;
+}
+
+template <typename SyncReadStream,
+ typename DynamicBuffer, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+{
+ typename decay<DynamicBuffer>::type b(
+ BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers));
+
+ std::size_t search_position = 0;
+ for (;;)
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer::const_buffers_type buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers = b.data();
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = match_condition(start_pos, end);
+ if (result.second)
+ {
+ // Full match. We're done.
+ ec = boost::system::error_code();
+ return result.first - begin;
+ }
+ else if (result.first != end)
+ {
+ // Partial match. Next search needs to start from beginning of match.
+ search_position = result.first - begin;
+ }
+ else
+ {
+ // No match. Next search can start with the new data.
+ search_position = end - begin;
+ }
+
+ // Check if buffer is full.
+ if (b.size() == b.max_size())
+ {
+ ec = error::not_found;
+ return 0;
+ }
+
+ // Need more data.
+ std::size_t bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512, b.capacity() - b.size()),
+ std::min<std::size_t>(65536, b.max_size() - b.size()));
+ b.commit(s.read_some(b.prepare(bytes_to_read), ec));
+ if (ec)
+ return 0;
+ }
+}
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename SyncReadStream, typename Allocator>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, char delim)
+{
+ return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
+}
+
+template <typename SyncReadStream, typename Allocator>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, char delim,
+ boost::system::error_code& ec)
+{
+ return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
+}
+
+template <typename SyncReadStream, typename Allocator>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_STRING_VIEW_PARAM delim)
+{
+ return read_until(s, basic_streambuf_ref<Allocator>(b), delim);
+}
+
+template <typename SyncReadStream, typename Allocator>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec)
+{
+ return read_until(s, basic_streambuf_ref<Allocator>(b), delim, ec);
+}
+
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename SyncReadStream, typename Allocator>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr)
+{
+ return read_until(s, basic_streambuf_ref<Allocator>(b), expr);
+}
+
+template <typename SyncReadStream, typename Allocator>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
+ boost::system::error_code& ec)
+{
+ return read_until(s, basic_streambuf_ref<Allocator>(b), expr, ec);
+}
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename SyncReadStream, typename Allocator, typename MatchCondition>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+{
+ return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition);
+}
+
+template <typename SyncReadStream, typename Allocator, typename MatchCondition>
+inline std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+{
+ return read_until(s, basic_streambuf_ref<Allocator>(b), match_condition, ec);
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+namespace detail
+{
+ template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ class read_until_delim_op
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_delim_op(AsyncReadStream& stream,
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
+ char delim, ReadHandler& handler)
+ : stream_(stream),
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ delim_(delim),
+ start_(0),
+ search_position_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_until_delim_op(const read_until_delim_op& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_delim_op(read_until_delim_op&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
+ std::size_t bytes_to_read;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers = buffers_.data();
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position_;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ iterator iter = std::find(start_pos, end, delim_);
+ if (iter != end)
+ {
+ // Found a match. We're done.
+ search_position_ = iter - begin + 1;
+ bytes_to_read = 0;
+ }
+
+ // No match yet. Check if buffer is full.
+ else if (buffers_.size() == buffers_.max_size())
+ {
+ search_position_ = not_found;
+ bytes_to_read = 0;
+ }
+
+ // Need to read some more data.
+ else
+ {
+ // Next search can start with the new data.
+ search_position_ = end - begin;
+ bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(65536,
+ buffers_.max_size() - buffers_.size()));
+ }
+ }
+
+ // Check if we're done.
+ if (!start && bytes_to_read == 0)
+ break;
+
+ // Start a new asynchronous read operation to obtain more data.
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ BOOST_ASIO_MOVE_CAST(read_until_delim_op)(*this));
+ return; default:
+ buffers_.commit(bytes_transferred);
+ if (ec || bytes_transferred == 0)
+ break;
+ }
+
+ const boost::system::error_code result_ec =
+ (search_position_ == not_found)
+ ? error::not_found : ec;
+
+ const std::size_t result_n =
+ (ec || search_position_ == not_found)
+ ? 0 : search_position_;
+
+ handler_(result_ec, result_n);
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer buffers_;
+ char delim_;
+ int start_;
+ std::size_t search_position_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_delim_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ReadHandler.
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ async_completion<ReadHandler,
+ void (boost::system::error_code, std::size_t)> init(handler);
+
+ detail::read_until_delim_op<AsyncReadStream,
+ typename decay<DynamicBuffer>::type,
+ BOOST_ASIO_HANDLER_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))>(
+ s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ delim, init.completion_handler)(boost::system::error_code(), 0, 1);
+
+ return init.result.get();
+}
+
+namespace detail
+{
+ template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ class read_until_delim_string_op
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_delim_string_op(AsyncReadStream& stream,
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
+ const std::string& delim, ReadHandler& handler)
+ : stream_(stream),
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ delim_(delim),
+ start_(0),
+ search_position_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_until_delim_string_op(const read_until_delim_string_op& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ delim_(other.delim_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_delim_string_op(read_until_delim_string_op&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ delim_(BOOST_ASIO_MOVE_CAST(std::string)(other.delim_)),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
+ std::size_t bytes_to_read;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers = buffers_.data();
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position_;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = detail::partial_search(
+ start_pos, end, delim_.begin(), delim_.end());
+ if (result.first != end && result.second)
+ {
+ // Full match. We're done.
+ search_position_ = result.first - begin + delim_.length();
+ bytes_to_read = 0;
+ }
+
+ // No match yet. Check if buffer is full.
+ else if (buffers_.size() == buffers_.max_size())
+ {
+ search_position_ = not_found;
+ bytes_to_read = 0;
+ }
+
+ // Need to read some more data.
+ else
+ {
+ if (result.first != end)
+ {
+ // Partial match. Next search needs to start from beginning of
+ // match.
+ search_position_ = result.first - begin;
+ }
+ else
+ {
+ // Next search can start with the new data.
+ search_position_ = end - begin;
+ }
+
+ bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(65536,
+ buffers_.max_size() - buffers_.size()));
+ }
+ }
+
+ // Check if we're done.
+ if (!start && bytes_to_read == 0)
+ break;
+
+ // Start a new asynchronous read operation to obtain more data.
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ BOOST_ASIO_MOVE_CAST(read_until_delim_string_op)(*this));
+ return; default:
+ buffers_.commit(bytes_transferred);
+ if (ec || bytes_transferred == 0)
+ break;
+ }
+
+ const boost::system::error_code result_ec =
+ (search_position_ == not_found)
+ ? error::not_found : ec;
+
+ const std::size_t result_n =
+ (ec || search_position_ == not_found)
+ ? 0 : search_position_;
+
+ handler_(result_ec, result_n);
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer buffers_;
+ std::string delim_;
+ int start_;
+ std::size_t search_position_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_delim_string_op<AsyncReadStream,
+ DynamicBuffer, ReadHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ReadHandler.
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ async_completion<ReadHandler,
+ void (boost::system::error_code, std::size_t)> init(handler);
+
+ detail::read_until_delim_string_op<AsyncReadStream,
+ typename decay<DynamicBuffer>::type,
+ BOOST_ASIO_HANDLER_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))>(
+ s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ static_cast<std::string>(delim),
+ init.completion_handler)(boost::system::error_code(), 0, 1);
+
+ return init.result.get();
+}
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer,
+ typename RegEx, typename ReadHandler>
+ class read_until_expr_op
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_expr_op(AsyncReadStream& stream,
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
+ const boost::regex& expr, ReadHandler& handler)
+ : stream_(stream),
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ expr_(expr),
+ start_(0),
+ search_position_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_until_expr_op(const read_until_expr_op& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ expr_(other.expr_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_expr_op(read_until_expr_op&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ expr_(other.expr_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
+ std::size_t bytes_to_read;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers = buffers_.data();
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position_;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ boost::match_results<iterator,
+ typename std::vector<boost::sub_match<iterator> >::allocator_type>
+ match_results;
+ bool match = regex_search(start_pos, end, match_results, expr_,
+ boost::match_default | boost::match_partial);
+ if (match && match_results[0].matched)
+ {
+ // Full match. We're done.
+ search_position_ = match_results[0].second - begin;
+ bytes_to_read = 0;
+ }
+
+ // No match yet. Check if buffer is full.
+ else if (buffers_.size() == buffers_.max_size())
+ {
+ search_position_ = not_found;
+ bytes_to_read = 0;
+ }
+
+ // Need to read some more data.
+ else
+ {
+ if (match)
+ {
+ // Partial match. Next search needs to start from beginning of
+ // match.
+ search_position_ = match_results[0].first - begin;
+ }
+ else
+ {
+ // Next search can start with the new data.
+ search_position_ = end - begin;
+ }
+
+ bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(65536,
+ buffers_.max_size() - buffers_.size()));
+ }
+ }
+
+ // Check if we're done.
+ if (!start && bytes_to_read == 0)
+ break;
+
+ // Start a new asynchronous read operation to obtain more data.
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ BOOST_ASIO_MOVE_CAST(read_until_expr_op)(*this));
+ return; default:
+ buffers_.commit(bytes_transferred);
+ if (ec || bytes_transferred == 0)
+ break;
+ }
+
+ const boost::system::error_code result_ec =
+ (search_position_ == not_found)
+ ? error::not_found : ec;
+
+ const std::size_t result_n =
+ (ec || search_position_ == not_found)
+ ? 0 : search_position_;
+
+ handler_(result_ec, result_n);
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer buffers_;
+ RegEx expr_;
+ int start_;
+ std::size_t search_position_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer,
+ typename RegEx, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer,
+ typename RegEx, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer,
+ typename RegEx, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer, typename RegEx, typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer, typename RegEx, typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename RegEx, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename RegEx, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_expr_op<AsyncReadStream,
+ DynamicBuffer, RegEx, ReadHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ const boost::regex& expr,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ReadHandler.
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ async_completion<ReadHandler,
+ void (boost::system::error_code, std::size_t)> init(handler);
+
+ detail::read_until_expr_op<AsyncReadStream,
+ typename decay<DynamicBuffer>::type,
+ boost::regex, BOOST_ASIO_HANDLER_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))>(
+ s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ expr, init.completion_handler)(boost::system::error_code(), 0, 1);
+
+ return init.result.get();
+}
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+namespace detail
+{
+ template <typename AsyncReadStream, typename DynamicBuffer,
+ typename MatchCondition, typename ReadHandler>
+ class read_until_match_op
+ {
+ public:
+ template <typename BufferSequence>
+ read_until_match_op(AsyncReadStream& stream,
+ BOOST_ASIO_MOVE_ARG(BufferSequence) buffers,
+ MatchCondition match_condition, ReadHandler& handler)
+ : stream_(stream),
+ buffers_(BOOST_ASIO_MOVE_CAST(BufferSequence)(buffers)),
+ match_condition_(match_condition),
+ start_(0),
+ search_position_(0),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(handler))
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+ read_until_match_op(const read_until_match_op& other)
+ : stream_(other.stream_),
+ buffers_(other.buffers_),
+ match_condition_(other.match_condition_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ handler_(other.handler_)
+ {
+ }
+
+ read_until_match_op(read_until_match_op&& other)
+ : stream_(other.stream_),
+ buffers_(BOOST_ASIO_MOVE_CAST(DynamicBuffer)(other.buffers_)),
+ match_condition_(other.match_condition_),
+ start_(other.start_),
+ search_position_(other.search_position_),
+ handler_(BOOST_ASIO_MOVE_CAST(ReadHandler)(other.handler_))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+ void operator()(const boost::system::error_code& ec,
+ std::size_t bytes_transferred, int start = 0)
+ {
+ const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
+ std::size_t bytes_to_read;
+ switch (start_ = start)
+ {
+ case 1:
+ for (;;)
+ {
+ {
+ // Determine the range of the data to be searched.
+ typedef typename DynamicBuffer::const_buffers_type
+ buffers_type;
+ typedef buffers_iterator<buffers_type> iterator;
+ buffers_type data_buffers = buffers_.data();
+ iterator begin = iterator::begin(data_buffers);
+ iterator start_pos = begin + search_position_;
+ iterator end = iterator::end(data_buffers);
+
+ // Look for a match.
+ std::pair<iterator, bool> result = match_condition_(start_pos, end);
+ if (result.second)
+ {
+ // Full match. We're done.
+ search_position_ = result.first - begin;
+ bytes_to_read = 0;
+ }
+
+ // No match yet. Check if buffer is full.
+ else if (buffers_.size() == buffers_.max_size())
+ {
+ search_position_ = not_found;
+ bytes_to_read = 0;
+ }
+
+ // Need to read some more data.
+ else
+ {
+ if (result.first != end)
+ {
+ // Partial match. Next search needs to start from beginning of
+ // match.
+ search_position_ = result.first - begin;
+ }
+ else
+ {
+ // Next search can start with the new data.
+ search_position_ = end - begin;
+ }
+
+ bytes_to_read = std::min<std::size_t>(
+ std::max<std::size_t>(512,
+ buffers_.capacity() - buffers_.size()),
+ std::min<std::size_t>(65536,
+ buffers_.max_size() - buffers_.size()));
+ }
+ }
+
+ // Check if we're done.
+ if (!start && bytes_to_read == 0)
+ break;
+
+ // Start a new asynchronous read operation to obtain more data.
+ stream_.async_read_some(buffers_.prepare(bytes_to_read),
+ BOOST_ASIO_MOVE_CAST(read_until_match_op)(*this));
+ return; default:
+ buffers_.commit(bytes_transferred);
+ if (ec || bytes_transferred == 0)
+ break;
+ }
+
+ const boost::system::error_code result_ec =
+ (search_position_ == not_found)
+ ? error::not_found : ec;
+
+ const std::size_t result_n =
+ (ec || search_position_ == not_found)
+ ? 0 : search_position_;
+
+ handler_(result_ec, result_n);
+ }
+ }
+
+ //private:
+ AsyncReadStream& stream_;
+ DynamicBuffer buffers_;
+ MatchCondition match_condition_;
+ int start_;
+ std::size_t search_position_;
+ ReadHandler handler_;
+ };
+
+ template <typename AsyncReadStream, typename DynamicBuffer,
+ typename MatchCondition, typename ReadHandler>
+ inline void* asio_handler_allocate(std::size_t size,
+ read_until_match_op<AsyncReadStream, DynamicBuffer,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ return boost_asio_handler_alloc_helpers::allocate(
+ size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer,
+ typename MatchCondition, typename ReadHandler>
+ inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ read_until_match_op<AsyncReadStream, DynamicBuffer,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_alloc_helpers::deallocate(
+ pointer, size, this_handler->handler_);
+ }
+
+ template <typename AsyncReadStream, typename DynamicBuffer,
+ typename MatchCondition, typename ReadHandler>
+ inline bool asio_handler_is_continuation(
+ read_until_match_op<AsyncReadStream, DynamicBuffer,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ return this_handler->start_ == 0 ? true
+ : boost_asio_handler_cont_helpers::is_continuation(
+ this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer, typename MatchCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(Function& function,
+ read_until_match_op<AsyncReadStream, DynamicBuffer,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+
+ template <typename Function, typename AsyncReadStream,
+ typename DynamicBuffer, typename MatchCondition,
+ typename ReadHandler>
+ inline void asio_handler_invoke(const Function& function,
+ read_until_match_op<AsyncReadStream, DynamicBuffer,
+ MatchCondition, ReadHandler>* this_handler)
+ {
+ boost_asio_handler_invoke_helpers::invoke(
+ function, this_handler->handler_);
+ }
+} // namespace detail
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename MatchCondition, typename ReadHandler, typename Allocator>
+struct associated_allocator<
+ detail::read_until_match_op<AsyncReadStream,
+ DynamicBuffer, MatchCondition, ReadHandler>,
+ Allocator>
+{
+ typedef typename associated_allocator<ReadHandler, Allocator>::type type;
+
+ static type get(
+ const detail::read_until_match_op<AsyncReadStream,
+ DynamicBuffer, MatchCondition, ReadHandler>& h,
+ const Allocator& a = Allocator()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_allocator<ReadHandler, Allocator>::get(h.handler_, a);
+ }
+};
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename MatchCondition, typename ReadHandler, typename Executor>
+struct associated_executor<
+ detail::read_until_match_op<AsyncReadStream,
+ DynamicBuffer, MatchCondition, ReadHandler>,
+ Executor>
+{
+ typedef typename associated_executor<ReadHandler, Executor>::type type;
+
+ static type get(
+ const detail::read_until_match_op<AsyncReadStream,
+ DynamicBuffer, MatchCondition, ReadHandler>& h,
+ const Executor& ex = Executor()) BOOST_ASIO_NOEXCEPT
+ {
+ return associated_executor<ReadHandler, Executor>::get(h.handler_, ex);
+ }
+};
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename MatchCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+{
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ReadHandler.
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ async_completion<ReadHandler,
+ void (boost::system::error_code, std::size_t)> init(handler);
+
+ detail::read_until_match_op<AsyncReadStream,
+ typename decay<DynamicBuffer>::type,
+ MatchCondition, BOOST_ASIO_HANDLER_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))>(
+ s, BOOST_ASIO_MOVE_CAST(DynamicBuffer)(buffers),
+ match_condition, init.completion_handler)(
+ boost::system::error_code(), 0, 1);
+
+ return init.result.get();
+}
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ return async_read_until(s, basic_streambuf_ref<Allocator>(b),
+ delim, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+}
+
+template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ return async_read_until(s, basic_streambuf_ref<Allocator>(b),
+ delim, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+}
+
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+{
+ return async_read_until(s, basic_streambuf_ref<Allocator>(b),
+ expr, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+}
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+
+template <typename AsyncReadStream, typename Allocator,
+ typename MatchCondition, typename ReadHandler>
+inline BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type*)
+{
+ return async_read_until(s, basic_streambuf_ref<Allocator>(b),
+ match_condition, BOOST_ASIO_MOVE_CAST(ReadHandler)(handler));
+}
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_READ_UNTIL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/serial_port_base.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.hpp
index 7f2dfe88df6..7f2dfe88df6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/serial_port_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/serial_port_base.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.ipp
index 9954f77d2e9..9954f77d2e9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/serial_port_base.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/serial_port_base.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/spawn.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/spawn.hpp
index c2da5ce09ab..c2da5ce09ab 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/spawn.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/spawn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/src.cpp b/src/third_party/boost-1.69.0/boost/asio/impl/src.cpp
index 3823acfaf37..3823acfaf37 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/src.cpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/src.cpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/src.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/src.hpp
index b891a453fee..b891a453fee 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/src.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/src.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/system_context.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/system_context.hpp
index dab5d4d0852..dab5d4d0852 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/system_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/system_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/system_context.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/system_context.ipp
index e56632c8160..e56632c8160 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/system_context.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/system_context.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/system_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/system_executor.hpp
index c59e780d3f8..c59e780d3f8 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/system_executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/system_executor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/thread_pool.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.hpp
index ed8d768cd00..ed8d768cd00 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/thread_pool.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/thread_pool.ipp b/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.ipp
index e0952eb657e..e0952eb657e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/thread_pool.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/thread_pool.ipp
diff --git a/src/third_party/boost-1.69.0/boost/asio/impl/use_future.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/use_future.hpp
new file mode 100644
index 00000000000..fd75a7c8e88
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/use_future.hpp
@@ -0,0 +1,939 @@
+//
+// impl/use_future.hpp
+// ~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_IMPL_USE_FUTURE_HPP
+#define BOOST_ASIO_IMPL_USE_FUTURE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <tuple>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/memory.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/asio/packaged_task.hpp>
+#include <boost/system/system_error.hpp>
+#include <boost/asio/system_executor.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename T, typename F, typename... Args>
+inline void promise_invoke_and_set(std::promise<T>& p,
+ F& f, BOOST_ASIO_MOVE_ARG(Args)... args)
+{
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ {
+ p.set_value(f(BOOST_ASIO_MOVE_CAST(Args)(args)...));
+ }
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ catch (...)
+ {
+ p.set_exception(std::current_exception());
+ }
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+}
+
+template <typename F, typename... Args>
+inline void promise_invoke_and_set(std::promise<void>& p,
+ F& f, BOOST_ASIO_MOVE_ARG(Args)... args)
+{
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ {
+ f(BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ p.set_value();
+ }
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ catch (...)
+ {
+ p.set_exception(std::current_exception());
+ }
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+}
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename T, typename F>
+inline void promise_invoke_and_set(std::promise<T>& p, F& f)
+{
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ {
+ p.set_value(f());
+ }
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ catch (...)
+ {
+ p.set_exception(std::current_exception());
+ }
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+}
+
+template <typename F, typename Args>
+inline void promise_invoke_and_set(std::promise<void>& p, F& f)
+{
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ {
+ f();
+ p.set_value();
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ }
+ catch (...)
+ {
+ p.set_exception(std::current_exception());
+ }
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+}
+
+#if defined(BOOST_ASIO_NO_EXCEPTIONS)
+
+#define BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
+ template <typename T, typename F, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ inline void promise_invoke_and_set(std::promise<T>& p, \
+ F& f, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ p.set_value(f(BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
+ } \
+ \
+ template <typename F, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ inline void promise_invoke_and_set(std::promise<void>& p, \
+ F& f, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ f(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ p.set_value(); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF)
+#undef BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF
+
+#else // defined(BOOST_ASIO_NO_EXCEPTIONS)
+
+#define BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF(n) \
+ template <typename T, typename F, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ inline void promise_invoke_and_set(std::promise<T>& p, \
+ F& f, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ try \
+ { \
+ p.set_value(f(BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
+ } \
+ catch (...) \
+ { \
+ p.set_exception(std::current_exception()); \
+ } \
+ } \
+ \
+ template <typename F, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ inline void promise_invoke_and_set(std::promise<void>& p, \
+ F& f, BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ { \
+ try \
+ { \
+ f(BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ p.set_value(); \
+ } \
+ catch (...) \
+ { \
+ p.set_exception(std::current_exception()); \
+ } \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF)
+#undef BOOST_ASIO_PRIVATE_PROMISE_INVOKE_DEF
+
+#endif // defined(BOOST_ASIO_NO_EXCEPTIONS)
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+// A function object adapter to invoke a nullary function object and capture
+// any exception thrown into a promise.
+template <typename T, typename F>
+class promise_invoker
+{
+public:
+ promise_invoker(const shared_ptr<std::promise<T> >& p,
+ BOOST_ASIO_MOVE_ARG(F) f)
+ : p_(p), f_(BOOST_ASIO_MOVE_CAST(F)(f))
+ {
+ }
+
+ void operator()()
+ {
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ try
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ {
+ f_();
+ }
+#if !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ catch (...)
+ {
+ p_->set_exception(std::current_exception());
+ }
+#endif // !defined(BOOST_ASIO_NO_EXCEPTIONS)
+ }
+
+private:
+ shared_ptr<std::promise<T> > p_;
+ typename decay<F>::type f_;
+};
+
+// An executor that adapts the system_executor to capture any exeption thrown
+// by a submitted function object and save it into a promise.
+template <typename T>
+class promise_executor
+{
+public:
+ explicit promise_executor(const shared_ptr<std::promise<T> >& p)
+ : p_(p)
+ {
+ }
+
+ execution_context& context() const BOOST_ASIO_NOEXCEPT
+ {
+ return system_executor().context();
+ }
+
+ void on_work_started() const BOOST_ASIO_NOEXCEPT {}
+ void on_work_finished() const BOOST_ASIO_NOEXCEPT {}
+
+ template <typename F, typename A>
+ void dispatch(BOOST_ASIO_MOVE_ARG(F) f, const A&) const
+ {
+ promise_invoker<T, F>(p_, BOOST_ASIO_MOVE_CAST(F)(f))();
+ }
+
+ template <typename F, typename A>
+ void post(BOOST_ASIO_MOVE_ARG(F) f, const A& a) const
+ {
+ system_executor().post(
+ promise_invoker<T, F>(p_, BOOST_ASIO_MOVE_CAST(F)(f)), a);
+ }
+
+ template <typename F, typename A>
+ void defer(BOOST_ASIO_MOVE_ARG(F) f, const A& a) const
+ {
+ system_executor().defer(
+ promise_invoker<T, F>(p_, BOOST_ASIO_MOVE_CAST(F)(f)), a);
+ }
+
+ friend bool operator==(const promise_executor& a,
+ const promise_executor& b) BOOST_ASIO_NOEXCEPT
+ {
+ return a.p_ == b.p_;
+ }
+
+ friend bool operator!=(const promise_executor& a,
+ const promise_executor& b) BOOST_ASIO_NOEXCEPT
+ {
+ return a.p_ != b.p_;
+ }
+
+private:
+ shared_ptr<std::promise<T> > p_;
+};
+
+// The base class for all completion handlers that create promises.
+template <typename T>
+class promise_creator
+{
+public:
+ typedef promise_executor<T> executor_type;
+
+ executor_type get_executor() const BOOST_ASIO_NOEXCEPT
+ {
+ return executor_type(p_);
+ }
+
+ typedef std::future<T> future_type;
+
+ future_type get_future()
+ {
+ return p_->get_future();
+ }
+
+protected:
+ template <typename Allocator>
+ void create_promise(const Allocator& a)
+ {
+ BOOST_ASIO_REBIND_ALLOC(Allocator, char) b(a);
+ p_ = std::allocate_shared<std::promise<T>>(b, std::allocator_arg, b);
+ }
+
+ shared_ptr<std::promise<T> > p_;
+};
+
+// For completion signature void().
+class promise_handler_0
+ : public promise_creator<void>
+{
+public:
+ void operator()()
+ {
+ this->p_->set_value();
+ }
+};
+
+// For completion signature void(error_code).
+class promise_handler_ec_0
+ : public promise_creator<void>
+{
+public:
+ void operator()(const boost::system::error_code& ec)
+ {
+ if (ec)
+ {
+ this->p_->set_exception(
+ std::make_exception_ptr(
+ boost::system::system_error(ec)));
+ }
+ else
+ {
+ this->p_->set_value();
+ }
+ }
+};
+
+// For completion signature void(exception_ptr).
+class promise_handler_ex_0
+ : public promise_creator<void>
+{
+public:
+ void operator()(const std::exception_ptr& ex)
+ {
+ if (ex)
+ {
+ this->p_->set_exception(ex);
+ }
+ else
+ {
+ this->p_->set_value();
+ }
+ }
+};
+
+// For completion signature void(T).
+template <typename T>
+class promise_handler_1
+ : public promise_creator<T>
+{
+public:
+ template <typename Arg>
+ void operator()(BOOST_ASIO_MOVE_ARG(Arg) arg)
+ {
+ this->p_->set_value(BOOST_ASIO_MOVE_CAST(Arg)(arg));
+ }
+};
+
+// For completion signature void(error_code, T).
+template <typename T>
+class promise_handler_ec_1
+ : public promise_creator<T>
+{
+public:
+ template <typename Arg>
+ void operator()(const boost::system::error_code& ec,
+ BOOST_ASIO_MOVE_ARG(Arg) arg)
+ {
+ if (ec)
+ {
+ this->p_->set_exception(
+ std::make_exception_ptr(
+ boost::system::system_error(ec)));
+ }
+ else
+ this->p_->set_value(BOOST_ASIO_MOVE_CAST(Arg)(arg));
+ }
+};
+
+// For completion signature void(exception_ptr, T).
+template <typename T>
+class promise_handler_ex_1
+ : public promise_creator<T>
+{
+public:
+ template <typename Arg>
+ void operator()(const std::exception_ptr& ex,
+ BOOST_ASIO_MOVE_ARG(Arg) arg)
+ {
+ if (ex)
+ this->p_->set_exception(ex);
+ else
+ this->p_->set_value(BOOST_ASIO_MOVE_CAST(Arg)(arg));
+ }
+};
+
+// For completion signature void(T1, ..., Tn);
+template <typename T>
+class promise_handler_n
+ : public promise_creator<T>
+{
+public:
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename... Args>
+ void operator()(BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ this->p_->set_value(
+ std::forward_as_tuple(
+ BOOST_ASIO_MOVE_CAST(Args)(args)...));
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#define BOOST_ASIO_PRIVATE_CALL_OP_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void operator()(BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ {\
+ this->p_->set_value( \
+ std::forward_as_tuple( \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CALL_OP_DEF)
+#undef BOOST_ASIO_PRIVATE_CALL_OP_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+};
+
+// For completion signature void(error_code, T1, ..., Tn);
+template <typename T>
+class promise_handler_ec_n
+ : public promise_creator<T>
+{
+public:
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename... Args>
+ void operator()(const boost::system::error_code& ec,
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ if (ec)
+ {
+ this->p_->set_exception(
+ std::make_exception_ptr(
+ boost::system::system_error(ec)));
+ }
+ else
+ {
+ this->p_->set_value(
+ std::forward_as_tuple(
+ BOOST_ASIO_MOVE_CAST(Args)(args)...));
+ }
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#define BOOST_ASIO_PRIVATE_CALL_OP_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void operator()(const boost::system::error_code& ec, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ {\
+ if (ec) \
+ { \
+ this->p_->set_exception( \
+ std::make_exception_ptr( \
+ boost::system::system_error(ec))); \
+ } \
+ else \
+ { \
+ this->p_->set_value( \
+ std::forward_as_tuple( \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
+ } \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CALL_OP_DEF)
+#undef BOOST_ASIO_PRIVATE_CALL_OP_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+};
+
+// For completion signature void(exception_ptr, T1, ..., Tn);
+template <typename T>
+class promise_handler_ex_n
+ : public promise_creator<T>
+{
+public:
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename... Args>
+ void operator()(const std::exception_ptr& ex,
+ BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ if (ex)
+ this->p_->set_exception(ex);
+ else
+ {
+ this->p_->set_value(
+ std::forward_as_tuple(
+ BOOST_ASIO_MOVE_CAST(Args)(args)...));
+ }
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#define BOOST_ASIO_PRIVATE_CALL_OP_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void operator()(const std::exception_ptr& ex, \
+ BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ {\
+ if (ex) \
+ this->p_->set_exception(ex); \
+ else \
+ { \
+ this->p_->set_value( \
+ std::forward_as_tuple( \
+ BOOST_ASIO_VARIADIC_MOVE_ARGS(n))); \
+ } \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CALL_OP_DEF)
+#undef BOOST_ASIO_PRIVATE_CALL_OP_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+};
+
+// Helper template to choose the appropriate concrete promise handler
+// implementation based on the supplied completion signature.
+template <typename> class promise_handler_selector;
+
+template <>
+class promise_handler_selector<void()>
+ : public promise_handler_0 {};
+
+template <>
+class promise_handler_selector<void(boost::system::error_code)>
+ : public promise_handler_ec_0 {};
+
+template <>
+class promise_handler_selector<void(std::exception_ptr)>
+ : public promise_handler_ex_0 {};
+
+template <typename Arg>
+class promise_handler_selector<void(Arg)>
+ : public promise_handler_1<Arg> {};
+
+template <typename Arg>
+class promise_handler_selector<void(boost::system::error_code, Arg)>
+ : public promise_handler_ec_1<Arg> {};
+
+template <typename Arg>
+class promise_handler_selector<void(std::exception_ptr, Arg)>
+ : public promise_handler_ex_1<Arg> {};
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename... Arg>
+class promise_handler_selector<void(Arg...)>
+ : public promise_handler_n<std::tuple<Arg...> > {};
+
+template <typename... Arg>
+class promise_handler_selector<void(boost::system::error_code, Arg...)>
+ : public promise_handler_ec_n<std::tuple<Arg...> > {};
+
+template <typename... Arg>
+class promise_handler_selector<void(std::exception_ptr, Arg...)>
+ : public promise_handler_ex_n<std::tuple<Arg...> > {};
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#define BOOST_ASIO_PRIVATE_PROMISE_SELECTOR_DEF(n) \
+ template <typename Arg, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ class promise_handler_selector< \
+ void(Arg, BOOST_ASIO_VARIADIC_TARGS(n))> \
+ : public promise_handler_n< \
+ std::tuple<Arg, BOOST_ASIO_VARIADIC_TARGS(n)> > {}; \
+ \
+ template <typename Arg, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ class promise_handler_selector< \
+ void(boost::system::error_code, Arg, BOOST_ASIO_VARIADIC_TARGS(n))> \
+ : public promise_handler_ec_n< \
+ std::tuple<Arg, BOOST_ASIO_VARIADIC_TARGS(n)> > {}; \
+ \
+ template <typename Arg, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ class promise_handler_selector< \
+ void(std::exception_ptr, Arg, BOOST_ASIO_VARIADIC_TARGS(n))> \
+ : public promise_handler_ex_n< \
+ std::tuple<Arg, BOOST_ASIO_VARIADIC_TARGS(n)> > {}; \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_PROMISE_SELECTOR_DEF)
+#undef BOOST_ASIO_PRIVATE_PROMISE_SELECTOR_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+// Completion handlers produced from the use_future completion token, when not
+// using use_future::operator().
+template <typename Signature, typename Allocator>
+class promise_handler
+ : public promise_handler_selector<Signature>
+{
+public:
+ typedef Allocator allocator_type;
+ typedef void result_type;
+
+ promise_handler(use_future_t<Allocator> u)
+ : allocator_(u.get_allocator())
+ {
+ this->create_promise(allocator_);
+ }
+
+ allocator_type get_allocator() const BOOST_ASIO_NOEXCEPT
+ {
+ return allocator_;
+ }
+
+private:
+ Allocator allocator_;
+};
+
+template <typename Function, typename Signature, typename Allocator>
+inline void asio_handler_invoke(Function& f,
+ promise_handler<Signature, Allocator>* h)
+{
+ typename promise_handler<Signature, Allocator>::executor_type
+ ex(h->get_executor());
+ ex.dispatch(BOOST_ASIO_MOVE_CAST(Function)(f), std::allocator<void>());
+}
+
+template <typename Function, typename Signature, typename Allocator>
+inline void asio_handler_invoke(const Function& f,
+ promise_handler<Signature, Allocator>* h)
+{
+ typename promise_handler<Signature, Allocator>::executor_type
+ ex(h->get_executor());
+ ex.dispatch(f, std::allocator<void>());
+}
+
+// Helper base class for async_result specialisation.
+template <typename Signature, typename Allocator>
+class promise_async_result
+{
+public:
+ typedef promise_handler<Signature, Allocator> completion_handler_type;
+ typedef typename completion_handler_type::future_type return_type;
+
+ explicit promise_async_result(completion_handler_type& h)
+ : future_(h.get_future())
+ {
+ }
+
+ return_type get()
+ {
+ return BOOST_ASIO_MOVE_CAST(return_type)(future_);
+ }
+
+private:
+ return_type future_;
+};
+
+// Return value from use_future::operator().
+template <typename Function, typename Allocator>
+class packaged_token
+{
+public:
+ packaged_token(Function f, const Allocator& a)
+ : function_(BOOST_ASIO_MOVE_CAST(Function)(f)),
+ allocator_(a)
+ {
+ }
+
+//private:
+ Function function_;
+ Allocator allocator_;
+};
+
+// Completion handlers produced from the use_future completion token, when
+// using use_future::operator().
+template <typename Function, typename Allocator, typename Result>
+class packaged_handler
+ : public promise_creator<Result>
+{
+public:
+ typedef Allocator allocator_type;
+ typedef void result_type;
+
+ packaged_handler(packaged_token<Function, Allocator> t)
+ : function_(BOOST_ASIO_MOVE_CAST(Function)(t.function_)),
+ allocator_(t.allocator_)
+ {
+ this->create_promise(allocator_);
+ }
+
+ allocator_type get_allocator() const BOOST_ASIO_NOEXCEPT
+ {
+ return allocator_;
+ }
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ template <typename... Args>
+ void operator()(BOOST_ASIO_MOVE_ARG(Args)... args)
+ {
+ (promise_invoke_and_set)(*this->p_,
+ function_, BOOST_ASIO_MOVE_CAST(Args)(args)...);
+ }
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+ void operator()()
+ {
+ (promise_invoke_and_set)(*this->p_, function_);
+ }
+
+#define BOOST_ASIO_PRIVATE_CALL_OP_DEF(n) \
+ template <BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ void operator()(BOOST_ASIO_VARIADIC_MOVE_PARAMS(n)) \
+ {\
+ (promise_invoke_and_set)(*this->p_, \
+ function_, BOOST_ASIO_VARIADIC_MOVE_ARGS(n)); \
+ } \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_CALL_OP_DEF)
+#undef BOOST_ASIO_PRIVATE_CALL_OP_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+private:
+ Function function_;
+ Allocator allocator_;
+};
+
+template <typename Function,
+ typename Function1, typename Allocator, typename Result>
+inline void asio_handler_invoke(Function& f,
+ packaged_handler<Function1, Allocator, Result>* h)
+{
+ typename packaged_handler<Function1, Allocator, Result>::executor_type
+ ex(h->get_executor());
+ ex.dispatch(BOOST_ASIO_MOVE_CAST(Function)(f), std::allocator<void>());
+}
+
+template <typename Function,
+ typename Function1, typename Allocator, typename Result>
+inline void asio_handler_invoke(const Function& f,
+ packaged_handler<Function1, Allocator, Result>* h)
+{
+ typename packaged_handler<Function1, Allocator, Result>::executor_type
+ ex(h->get_executor());
+ ex.dispatch(f, std::allocator<void>());
+}
+
+// Helper base class for async_result specialisation.
+template <typename Function, typename Allocator, typename Result>
+class packaged_async_result
+{
+public:
+ typedef packaged_handler<Function, Allocator, Result> completion_handler_type;
+ typedef typename completion_handler_type::future_type return_type;
+
+ explicit packaged_async_result(completion_handler_type& h)
+ : future_(h.get_future())
+ {
+ }
+
+ return_type get()
+ {
+ return BOOST_ASIO_MOVE_CAST(return_type)(future_);
+ }
+
+private:
+ return_type future_;
+};
+
+} // namespace detail
+
+template <typename Allocator> template <typename Function>
+inline detail::packaged_token<typename decay<Function>::type, Allocator>
+use_future_t<Allocator>::operator()(BOOST_ASIO_MOVE_ARG(Function) f) const
+{
+ return detail::packaged_token<typename decay<Function>::type, Allocator>(
+ BOOST_ASIO_MOVE_CAST(Function)(f), allocator_);
+}
+
+#if !defined(GENERATING_DOCUMENTATION)
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename Allocator, typename Result, typename... Args>
+class async_result<use_future_t<Allocator>, Result(Args...)>
+ : public detail::promise_async_result<
+ void(typename decay<Args>::type...), Allocator>
+{
+public:
+ explicit async_result(
+ typename detail::promise_async_result<void(typename decay<Args>::type...),
+ Allocator>::completion_handler_type& h)
+ : detail::promise_async_result<
+ void(typename decay<Args>::type...), Allocator>(h)
+ {
+ }
+};
+
+template <typename Function, typename Allocator,
+ typename Result, typename... Args>
+class async_result<detail::packaged_token<Function, Allocator>, Result(Args...)>
+ : public detail::packaged_async_result<Function, Allocator,
+ typename result_of<Function(Args...)>::type>
+{
+public:
+ explicit async_result(
+ typename detail::packaged_async_result<Function, Allocator,
+ typename result_of<Function(Args...)>::type>::completion_handler_type& h)
+ : detail::packaged_async_result<Function, Allocator,
+ typename result_of<Function(Args...)>::type>(h)
+ {
+ }
+};
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+template <typename Allocator, typename Result>
+class async_result<use_future_t<Allocator>, Result()>
+ : public detail::promise_async_result<void(), Allocator>
+{
+public:
+ explicit async_result(
+ typename detail::promise_async_result<
+ void(), Allocator>::completion_handler_type& h)
+ : detail::promise_async_result<void(), Allocator>(h)
+ {
+ }
+};
+
+template <typename Function, typename Allocator, typename Result>
+class async_result<detail::packaged_token<Function, Allocator>, Result()>
+ : public detail::packaged_async_result<Function, Allocator,
+ typename result_of<Function()>::type>
+{
+public:
+ explicit async_result(
+ typename detail::packaged_async_result<Function, Allocator,
+ typename result_of<Function()>::type>::completion_handler_type& h)
+ : detail::packaged_async_result<Function, Allocator,
+ typename result_of<Function()>::type>(h)
+ {
+ }
+};
+
+#define BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
+ template <typename Allocator, \
+ typename Result, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ class async_result<use_future_t<Allocator>, \
+ Result(BOOST_ASIO_VARIADIC_TARGS(n))> \
+ : public detail::promise_async_result< \
+ void(BOOST_ASIO_VARIADIC_DECAY(n)), Allocator> \
+ { \
+ public: \
+ explicit async_result( \
+ typename detail::promise_async_result< \
+ void(BOOST_ASIO_VARIADIC_DECAY(n)), \
+ Allocator>::completion_handler_type& h) \
+ : detail::promise_async_result< \
+ void(BOOST_ASIO_VARIADIC_DECAY(n)), Allocator>(h) \
+ { \
+ } \
+ }; \
+ \
+ template <typename Function, typename Allocator, \
+ typename Result, BOOST_ASIO_VARIADIC_TPARAMS(n)> \
+ class async_result<detail::packaged_token<Function, Allocator>, \
+ Result(BOOST_ASIO_VARIADIC_TARGS(n))> \
+ : public detail::packaged_async_result<Function, Allocator, \
+ typename result_of<Function(BOOST_ASIO_VARIADIC_TARGS(n))>::type> \
+ { \
+ public: \
+ explicit async_result( \
+ typename detail::packaged_async_result<Function, Allocator, \
+ typename result_of<Function(BOOST_ASIO_VARIADIC_TARGS(n))>::type \
+ >::completion_handler_type& h) \
+ : detail::packaged_async_result<Function, Allocator, \
+ typename result_of<Function(BOOST_ASIO_VARIADIC_TARGS(n))>::type>(h) \
+ { \
+ } \
+ }; \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF)
+#undef BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+
+template <typename Allocator, typename Signature>
+struct handler_type<use_future_t<Allocator>, Signature>
+{
+ typedef typename async_result<use_future_t<Allocator>,
+ Signature>::completion_handler_type type;
+};
+
+template <typename Signature, typename Allocator>
+class async_result<detail::promise_handler<Signature, Allocator> >
+ : public detail::promise_async_result<Signature, Allocator>
+{
+public:
+ typedef typename detail::promise_async_result<
+ Signature, Allocator>::return_type type;
+
+ explicit async_result(
+ typename detail::promise_async_result<
+ Signature, Allocator>::completion_handler_type& h)
+ : detail::promise_async_result<Signature, Allocator>(h)
+ {
+ }
+};
+
+template <typename Function, typename Allocator, typename Signature>
+struct handler_type<detail::packaged_token<Function, Allocator>, Signature>
+{
+ typedef typename async_result<detail::packaged_token<Function, Allocator>,
+ Signature>::completion_handler_type type;
+};
+
+template <typename Function, typename Allocator, typename Result>
+class async_result<detail::packaged_handler<Function, Allocator, Result> >
+ : public detail::packaged_async_result<Function, Allocator, Result>
+{
+public:
+ typedef typename detail::packaged_async_result<
+ Function, Allocator, Result>::return_type type;
+
+ explicit async_result(
+ typename detail::packaged_async_result<
+ Function, Allocator, Result>::completion_handler_type& h)
+ : detail::packaged_async_result<Function, Allocator, Result>(h)
+ {
+ }
+};
+
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IMPL_USE_FUTURE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/write.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/write.hpp
index 0be48b89f4b..0be48b89f4b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/write.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/write.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/impl/write_at.hpp b/src/third_party/boost-1.69.0/boost/asio/impl/write_at.hpp
index 6b597d2085a..6b597d2085a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/impl/write_at.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/impl/write_at.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/io_context.hpp b/src/third_party/boost-1.69.0/boost/asio/io_context.hpp
index 51377467ea8..51377467ea8 100644
--- a/src/third_party/boost-1.68.0/boost/asio/io_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/io_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/io_context_strand.hpp b/src/third_party/boost-1.69.0/boost/asio/io_context_strand.hpp
index 144e308a21d..144e308a21d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/io_context_strand.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/io_context_strand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/io_service.hpp b/src/third_party/boost-1.69.0/boost/asio/io_service.hpp
index 76af8e0cbdb..76af8e0cbdb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/io_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/io_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/io_service_strand.hpp b/src/third_party/boost-1.69.0/boost/asio/io_service_strand.hpp
index bb38c276c66..bb38c276c66 100644
--- a/src/third_party/boost-1.68.0/boost/asio/io_service_strand.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/io_service_strand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/address.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address.hpp
index 9b0cbdd3ee3..9b0cbdd3ee3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/address.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/address.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/address_v4.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4.hpp
index 68d724085d6..68d724085d6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/address_v4.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/address_v4_iterator.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_iterator.hpp
index 3574cda1e91..3574cda1e91 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/address_v4_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/address_v4_range.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_range.hpp
index 261ead22ac9..261ead22ac9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/address_v4_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/address_v4_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/address_v6.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6.hpp
index 8c4ac0a7322..8c4ac0a7322 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/address_v6.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/address_v6_iterator.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_iterator.hpp
index 887b09f79af..887b09f79af 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/address_v6_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/address_v6_range.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_range.hpp
index 0a095cd80b4..0a095cd80b4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/address_v6_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/address_v6_range.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/bad_address_cast.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/bad_address_cast.hpp
new file mode 100644
index 00000000000..fce9f053b1f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/bad_address_cast.hpp
@@ -0,0 +1,55 @@
+//
+// ip/bad_address_cast.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_IP_BAD_ADDRESS_CAST_HPP
+#define BOOST_ASIO_IP_BAD_ADDRESS_CAST_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <typeinfo>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Thrown to indicate a failed address conversion.
+class bad_address_cast :
+#if defined(BOOST_ASIO_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
+ public std::exception
+#else
+ public std::bad_cast
+#endif
+{
+public:
+ /// Default constructor.
+ bad_address_cast() {}
+
+ /// Destructor.
+ virtual ~bad_address_cast() BOOST_ASIO_NOEXCEPT_OR_NOTHROW {}
+
+ /// Get the message associated with the exception.
+ virtual const char* what() const BOOST_ASIO_NOEXCEPT_OR_NOTHROW
+ {
+ return "bad address cast";
+ }
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_ADDRESS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/basic_endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_endpoint.hpp
index bad4114f0be..bad4114f0be 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/basic_endpoint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/basic_endpoint.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver.hpp
new file mode 100644
index 00000000000..4979d104cf8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver.hpp
@@ -0,0 +1,1022 @@
+//
+// ip/basic_resolver.hpp
+// ~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_IP_BASIC_RESOLVER_HPP
+#define BOOST_ASIO_IP_BASIC_RESOLVER_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <string>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/basic_io_object.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/string_view.hpp>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/io_context.hpp>
+#include <boost/asio/ip/basic_resolver_iterator.hpp>
+#include <boost/asio/ip/basic_resolver_query.hpp>
+#include <boost/asio/ip/basic_resolver_results.hpp>
+#include <boost/asio/ip/resolver_base.hpp>
+
+#if defined(BOOST_ASIO_HAS_MOVE)
+# include <utility>
+#endif // defined(BOOST_ASIO_HAS_MOVE)
+
+#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+# include <boost/asio/ip/resolver_service.hpp>
+#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <boost/asio/detail/winrt_resolver_service.hpp>
+# define BOOST_ASIO_SVC_T \
+ boost::asio::detail::winrt_resolver_service<InternetProtocol>
+# else
+# include <boost/asio/detail/resolver_service.hpp>
+# define BOOST_ASIO_SVC_T \
+ boost::asio::detail::resolver_service<InternetProtocol>
+# endif
+#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// Provides endpoint resolution functionality.
+/**
+ * The basic_resolver class template provides the ability to resolve a query
+ * to a list of endpoints.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename InternetProtocol
+ BOOST_ASIO_SVC_TPARAM_DEF1(= resolver_service<InternetProtocol>)>
+class basic_resolver
+ : BOOST_ASIO_SVC_ACCESS basic_io_object<BOOST_ASIO_SVC_T>,
+ public resolver_base
+{
+public:
+ /// The type of the executor associated with the object.
+ typedef io_context::executor_type executor_type;
+
+ /// The protocol type.
+ typedef InternetProtocol protocol_type;
+
+ /// The endpoint type.
+ typedef typename InternetProtocol::endpoint endpoint_type;
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated.) The query type.
+ typedef basic_resolver_query<InternetProtocol> query;
+
+ /// (Deprecated.) The iterator type.
+ typedef basic_resolver_iterator<InternetProtocol> iterator;
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// The results type.
+ typedef basic_resolver_results<InternetProtocol> results_type;
+
+ /// Constructor.
+ /**
+ * This constructor creates a basic_resolver.
+ *
+ * @param io_context The io_context object that the resolver will use to
+ * dispatch handlers for any asynchronous operations performed on the
+ * resolver.
+ */
+ explicit basic_resolver(boost::asio::io_context& io_context)
+ : basic_io_object<BOOST_ASIO_SVC_T>(io_context)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-construct a basic_resolver from another.
+ /**
+ * This constructor moves a resolver from one object to another.
+ *
+ * @param other The other basic_resolver object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_resolver(io_context&) constructor.
+ */
+ basic_resolver(basic_resolver&& other)
+ : basic_io_object<BOOST_ASIO_SVC_T>(std::move(other))
+ {
+ }
+
+ /// Move-assign a basic_resolver from another.
+ /**
+ * This assignment operator moves a resolver from one object to another.
+ * Cancels any outstanding asynchronous operations associated with the target
+ * object.
+ *
+ * @param other The other basic_resolver object from which the move will
+ * occur.
+ *
+ * @note Following the move, the moved-from object is in the same state as if
+ * constructed using the @c basic_resolver(io_context&) constructor.
+ */
+ basic_resolver& operator=(basic_resolver&& other)
+ {
+ basic_io_object<BOOST_ASIO_SVC_T>::operator=(std::move(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destroys the resolver.
+ /**
+ * This function destroys the resolver, cancelling any outstanding
+ * asynchronous wait operations associated with the resolver as if by calling
+ * @c cancel.
+ */
+ ~basic_resolver()
+ {
+ }
+
+#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ // These functions are provided by basic_io_object<>.
+#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use get_executor().) Get the io_context associated with the
+ /// object.
+ /**
+ * This function may be used to obtain the io_context object that the I/O
+ * object uses to dispatch handlers for asynchronous operations.
+ *
+ * @return A reference to the io_context object that the I/O object will use
+ * to dispatch handlers. Ownership is not transferred to the caller.
+ */
+ boost::asio::io_context& get_io_context()
+ {
+ return basic_io_object<BOOST_ASIO_SVC_T>::get_io_context();
+ }
+
+ /// (Deprecated: Use get_executor().) Get the io_context associated with the
+ /// object.
+ /**
+ * This function may be used to obtain the io_context object that the I/O
+ * object uses to dispatch handlers for asynchronous operations.
+ *
+ * @return A reference to the io_context object that the I/O object will use
+ * to dispatch handlers. Ownership is not transferred to the caller.
+ */
+ boost::asio::io_context& get_io_service()
+ {
+ return basic_io_object<BOOST_ASIO_SVC_T>::get_io_service();
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Get the executor associated with the object.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return basic_io_object<BOOST_ASIO_SVC_T>::get_executor();
+ }
+#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+
+ /// Cancel any asynchronous operations that are waiting on the resolver.
+ /**
+ * This function forces the completion of any pending asynchronous
+ * operations on the host resolver. The handler for each cancelled operation
+ * will be invoked with the boost::asio::error::operation_aborted error code.
+ */
+ void cancel()
+ {
+ return this->get_service().cancel(this->get_implementation());
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use overload with separate host and service parameters.)
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve a query into a list of endpoint entries.
+ *
+ * @param q A query object that determines what endpoints will be returned.
+ *
+ * @returns A range object representing the list of endpoint entries. A
+ * successful call to this function is guaranteed to return a non-empty
+ * range.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ results_type resolve(const query& q)
+ {
+ boost::system::error_code ec;
+ results_type r = this->get_service().resolve(
+ this->get_implementation(), q, ec);
+ boost::asio::detail::throw_error(ec, "resolve");
+ return r;
+ }
+
+ /// (Deprecated: Use overload with separate host and service parameters.)
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve a query into a list of endpoint entries.
+ *
+ * @param q A query object that determines what endpoints will be returned.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns A range object representing the list of endpoint entries. An
+ * empty range is returned if an error occurs. A successful call to this
+ * function is guaranteed to return a non-empty range.
+ */
+ results_type resolve(const query& q, boost::system::error_code& ec)
+ {
+ return this->get_service().resolve(this->get_implementation(), q, ec);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @returns A range object representing the list of endpoint entries. A
+ * successful call to this function is guaranteed to return a non-empty
+ * range.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ results_type resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
+ BOOST_ASIO_STRING_VIEW_PARAM service)
+ {
+ return resolve(host, service, resolver_base::flags());
+ }
+
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns A range object representing the list of endpoint entries. An
+ * empty range is returned if an error occurs. A successful call to this
+ * function is guaranteed to return a non-empty range.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ results_type resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
+ BOOST_ASIO_STRING_VIEW_PARAM service, boost::system::error_code& ec)
+ {
+ return resolve(host, service, resolver_base::flags(), ec);
+ }
+
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param resolve_flags A set of flags that determine how name resolution
+ * should be performed. The default flags are suitable for communication with
+ * remote hosts.
+ *
+ * @returns A range object representing the list of endpoint entries. A
+ * successful call to this function is guaranteed to return a non-empty
+ * range.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ results_type resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
+ BOOST_ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags)
+ {
+ boost::system::error_code ec;
+ basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
+ static_cast<std::string>(service), resolve_flags);
+ results_type r = this->get_service().resolve(
+ this->get_implementation(), q, ec);
+ boost::asio::detail::throw_error(ec, "resolve");
+ return r;
+ }
+
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param resolve_flags A set of flags that determine how name resolution
+ * should be performed. The default flags are suitable for communication with
+ * remote hosts.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns A range object representing the list of endpoint entries. An
+ * empty range is returned if an error occurs. A successful call to this
+ * function is guaranteed to return a non-empty range.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ results_type resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
+ BOOST_ASIO_STRING_VIEW_PARAM service, resolver_base::flags resolve_flags,
+ boost::system::error_code& ec)
+ {
+ basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
+ static_cast<std::string>(service), resolve_flags);
+ return this->get_service().resolve(this->get_implementation(), q, ec);
+ }
+
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param protocol A protocol object, normally representing either the IPv4 or
+ * IPv6 version of an internet protocol.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @returns A range object representing the list of endpoint entries. A
+ * successful call to this function is guaranteed to return a non-empty
+ * range.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ results_type resolve(const protocol_type& protocol,
+ BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service)
+ {
+ return resolve(protocol, host, service, resolver_base::flags());
+ }
+
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param protocol A protocol object, normally representing either the IPv4 or
+ * IPv6 version of an internet protocol.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns A range object representing the list of endpoint entries. An
+ * empty range is returned if an error occurs. A successful call to this
+ * function is guaranteed to return a non-empty range.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ results_type resolve(const protocol_type& protocol,
+ BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
+ boost::system::error_code& ec)
+ {
+ return resolve(protocol, host, service, resolver_base::flags(), ec);
+ }
+
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param protocol A protocol object, normally representing either the IPv4 or
+ * IPv6 version of an internet protocol.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param resolve_flags A set of flags that determine how name resolution
+ * should be performed. The default flags are suitable for communication with
+ * remote hosts.
+ *
+ * @returns A range object representing the list of endpoint entries. A
+ * successful call to this function is guaranteed to return a non-empty
+ * range.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ results_type resolve(const protocol_type& protocol,
+ BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
+ resolver_base::flags resolve_flags)
+ {
+ boost::system::error_code ec;
+ basic_resolver_query<protocol_type> q(
+ protocol, static_cast<std::string>(host),
+ static_cast<std::string>(service), resolve_flags);
+ results_type r = this->get_service().resolve(
+ this->get_implementation(), q, ec);
+ boost::asio::detail::throw_error(ec, "resolve");
+ return r;
+ }
+
+ /// Perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param protocol A protocol object, normally representing either the IPv4 or
+ * IPv6 version of an internet protocol.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param resolve_flags A set of flags that determine how name resolution
+ * should be performed. The default flags are suitable for communication with
+ * remote hosts.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns A range object representing the list of endpoint entries. An
+ * empty range is returned if an error occurs. A successful call to this
+ * function is guaranteed to return a non-empty range.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ results_type resolve(const protocol_type& protocol,
+ BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
+ resolver_base::flags resolve_flags, boost::system::error_code& ec)
+ {
+ basic_resolver_query<protocol_type> q(
+ protocol, static_cast<std::string>(host),
+ static_cast<std::string>(service), resolve_flags);
+ return this->get_service().resolve(this->get_implementation(), q, ec);
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use overload with separate host and service parameters.)
+ /// Asynchronously perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to asynchronously resolve a query into a list of
+ * endpoint entries.
+ *
+ * @param q A query object that determines what endpoints will be returned.
+ *
+ * @param handler The handler to be called when the resolve operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * resolver::results_type results // Resolved endpoints as a range.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * A successful resolve operation is guaranteed to pass a non-empty range to
+ * the handler.
+ */
+ template <typename ResolveHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
+ void (boost::system::error_code, results_type))
+ async_resolve(const query& q,
+ BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ResolveHandler.
+ BOOST_ASIO_RESOLVE_HANDLER_CHECK(
+ ResolveHandler, handler, results_type) type_check;
+
+#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ return this->get_service().async_resolve(this->get_implementation(), q,
+ BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
+#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ boost::asio::async_completion<ResolveHandler,
+ void (boost::system::error_code, results_type)> init(handler);
+
+ this->get_service().async_resolve(
+ this->get_implementation(), q, init.completion_handler);
+
+ return init.result.get();
+#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Asynchronously perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param handler The handler to be called when the resolve operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * resolver::results_type results // Resolved endpoints as a range.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * A successful resolve operation is guaranteed to pass a non-empty range to
+ * the handler.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ template <typename ResolveHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
+ void (boost::system::error_code, results_type))
+ async_resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
+ BOOST_ASIO_STRING_VIEW_PARAM service,
+ BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
+ {
+ return async_resolve(host, service, resolver_base::flags(),
+ BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
+ }
+
+ /// Asynchronously perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param resolve_flags A set of flags that determine how name resolution
+ * should be performed. The default flags are suitable for communication with
+ * remote hosts.
+ *
+ * @param handler The handler to be called when the resolve operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * resolver::results_type results // Resolved endpoints as a range.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * A successful resolve operation is guaranteed to pass a non-empty range to
+ * the handler.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ template <typename ResolveHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
+ void (boost::system::error_code, results_type))
+ async_resolve(BOOST_ASIO_STRING_VIEW_PARAM host,
+ BOOST_ASIO_STRING_VIEW_PARAM service,
+ resolver_base::flags resolve_flags,
+ BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ResolveHandler.
+ BOOST_ASIO_RESOLVE_HANDLER_CHECK(
+ ResolveHandler, handler, results_type) type_check;
+
+ basic_resolver_query<protocol_type> q(static_cast<std::string>(host),
+ static_cast<std::string>(service), resolve_flags);
+
+#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ return this->get_service().async_resolve(this->get_implementation(), q,
+ BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
+#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ boost::asio::async_completion<ResolveHandler,
+ void (boost::system::error_code, results_type)> init(handler);
+
+ this->get_service().async_resolve(
+ this->get_implementation(), q, init.completion_handler);
+
+ return init.result.get();
+#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ }
+
+ /// Asynchronously perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param protocol A protocol object, normally representing either the IPv4 or
+ * IPv6 version of an internet protocol.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param handler The handler to be called when the resolve operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * resolver::results_type results // Resolved endpoints as a range.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * A successful resolve operation is guaranteed to pass a non-empty range to
+ * the handler.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ template <typename ResolveHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
+ void (boost::system::error_code, results_type))
+ async_resolve(const protocol_type& protocol,
+ BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
+ BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
+ {
+ return async_resolve(protocol, host, service, resolver_base::flags(),
+ BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
+ }
+
+ /// Asynchronously perform forward resolution of a query to a list of entries.
+ /**
+ * This function is used to resolve host and service names into a list of
+ * endpoint entries.
+ *
+ * @param protocol A protocol object, normally representing either the IPv4 or
+ * IPv6 version of an internet protocol.
+ *
+ * @param host A string identifying a location. May be a descriptive name or
+ * a numeric address string. If an empty string and the passive flag has been
+ * specified, the resolved endpoints are suitable for local service binding.
+ * If an empty string and passive is not specified, the resolved endpoints
+ * will use the loopback address.
+ *
+ * @param service A string identifying the requested service. This may be a
+ * descriptive name or a numeric string corresponding to a port number. May
+ * be an empty string, in which case all resolved endpoints will have a port
+ * number of 0.
+ *
+ * @param resolve_flags A set of flags that determine how name resolution
+ * should be performed. The default flags are suitable for communication with
+ * remote hosts.
+ *
+ * @param handler The handler to be called when the resolve operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * resolver::results_type results // Resolved endpoints as a range.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * A successful resolve operation is guaranteed to pass a non-empty range to
+ * the handler.
+ *
+ * @note On POSIX systems, host names may be locally defined in the file
+ * <tt>/etc/hosts</tt>. On Windows, host names may be defined in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\hosts</tt>. Remote host name
+ * resolution is performed using DNS. Operating systems may use additional
+ * locations when resolving host names (such as NETBIOS names on Windows).
+ *
+ * On POSIX systems, service names are typically defined in the file
+ * <tt>/etc/services</tt>. On Windows, service names may be found in the file
+ * <tt>c:\\windows\\system32\\drivers\\etc\\services</tt>. Operating systems
+ * may use additional locations when resolving service names.
+ */
+ template <typename ResolveHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
+ void (boost::system::error_code, results_type))
+ async_resolve(const protocol_type& protocol,
+ BOOST_ASIO_STRING_VIEW_PARAM host, BOOST_ASIO_STRING_VIEW_PARAM service,
+ resolver_base::flags resolve_flags,
+ BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ResolveHandler.
+ BOOST_ASIO_RESOLVE_HANDLER_CHECK(
+ ResolveHandler, handler, results_type) type_check;
+
+ basic_resolver_query<protocol_type> q(
+ protocol, static_cast<std::string>(host),
+ static_cast<std::string>(service), resolve_flags);
+
+#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ return this->get_service().async_resolve(this->get_implementation(), q,
+ BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
+#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ boost::asio::async_completion<ResolveHandler,
+ void (boost::system::error_code, results_type)> init(handler);
+
+ this->get_service().async_resolve(
+ this->get_implementation(), q, init.completion_handler);
+
+ return init.result.get();
+#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ }
+
+ /// Perform reverse resolution of an endpoint to a list of entries.
+ /**
+ * This function is used to resolve an endpoint into a list of endpoint
+ * entries.
+ *
+ * @param e An endpoint object that determines what endpoints will be
+ * returned.
+ *
+ * @returns A range object representing the list of endpoint entries. A
+ * successful call to this function is guaranteed to return a non-empty
+ * range.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ results_type resolve(const endpoint_type& e)
+ {
+ boost::system::error_code ec;
+ results_type i = this->get_service().resolve(
+ this->get_implementation(), e, ec);
+ boost::asio::detail::throw_error(ec, "resolve");
+ return i;
+ }
+
+ /// Perform reverse resolution of an endpoint to a list of entries.
+ /**
+ * This function is used to resolve an endpoint into a list of endpoint
+ * entries.
+ *
+ * @param e An endpoint object that determines what endpoints will be
+ * returned.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns A range object representing the list of endpoint entries. An
+ * empty range is returned if an error occurs. A successful call to this
+ * function is guaranteed to return a non-empty range.
+ */
+ results_type resolve(const endpoint_type& e, boost::system::error_code& ec)
+ {
+ return this->get_service().resolve(this->get_implementation(), e, ec);
+ }
+
+ /// Asynchronously perform reverse resolution of an endpoint to a list of
+ /// entries.
+ /**
+ * This function is used to asynchronously resolve an endpoint into a list of
+ * endpoint entries.
+ *
+ * @param e An endpoint object that determines what endpoints will be
+ * returned.
+ *
+ * @param handler The handler to be called when the resolve operation
+ * completes. Copies will be made of the handler as required. The function
+ * signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * resolver::results_type results // Resolved endpoints as a range.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation
+ * of the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * A successful resolve operation is guaranteed to pass a non-empty range to
+ * the handler.
+ */
+ template <typename ResolveHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ResolveHandler,
+ void (boost::system::error_code, results_type))
+ async_resolve(const endpoint_type& e,
+ BOOST_ASIO_MOVE_ARG(ResolveHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ResolveHandler.
+ BOOST_ASIO_RESOLVE_HANDLER_CHECK(
+ ResolveHandler, handler, results_type) type_check;
+
+#if defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ return this->get_service().async_resolve(this->get_implementation(), e,
+ BOOST_ASIO_MOVE_CAST(ResolveHandler)(handler));
+#else // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ boost::asio::async_completion<ResolveHandler,
+ void (boost::system::error_code, results_type)> init(handler);
+
+ this->get_service().async_resolve(
+ this->get_implementation(), e, init.completion_handler);
+
+ return init.result.get();
+#endif // defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+ }
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#if !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+# undef BOOST_ASIO_SVC_T
+#endif // !defined(BOOST_ASIO_ENABLE_OLD_SERVICES)
+
+#endif // BOOST_ASIO_IP_BASIC_RESOLVER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_entry.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_entry.hpp
index efaf976577b..efaf976577b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_entry.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_entry.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_iterator.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_iterator.hpp
index dd93b84149a..dd93b84149a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_query.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_query.hpp
index cbbae25ae70..cbbae25ae70 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/basic_resolver_query.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_query.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_results.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_results.hpp
new file mode 100644
index 00000000000..f553930cfc5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/basic_resolver_results.hpp
@@ -0,0 +1,313 @@
+//
+// ip/basic_resolver_results.hpp
+// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_IP_BASIC_RESOLVER_RESULTS_HPP
+#define BOOST_ASIO_IP_BASIC_RESOLVER_RESULTS_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <cstddef>
+#include <cstring>
+#include <boost/asio/detail/socket_ops.hpp>
+#include <boost/asio/detail/socket_types.hpp>
+#include <boost/asio/ip/basic_resolver_iterator.hpp>
+
+#if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# include <boost/asio/detail/winrt_utils.hpp>
+#endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ip {
+
+/// A range of entries produced by a resolver.
+/**
+ * The boost::asio::ip::basic_resolver_results class template is used to define
+ * a range over the results returned by a resolver.
+ *
+ * The iterator's value_type, obtained when a results iterator is dereferenced,
+ * is: @code const basic_resolver_entry<InternetProtocol> @endcode
+ *
+ * @note For backward compatibility, basic_resolver_results is derived from
+ * basic_resolver_iterator. This derivation is deprecated.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe.
+ */
+template <typename InternetProtocol>
+class basic_resolver_results
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ : public basic_resolver_iterator<InternetProtocol>
+#else // !defined(BOOST_ASIO_NO_DEPRECATED)
+ : private basic_resolver_iterator<InternetProtocol>
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+{
+public:
+ /// The protocol type associated with the results.
+ typedef InternetProtocol protocol_type;
+
+ /// The endpoint type associated with the results.
+ typedef typename protocol_type::endpoint endpoint_type;
+
+ /// The type of a value in the results range.
+ typedef basic_resolver_entry<protocol_type> value_type;
+
+ /// The type of a const reference to a value in the range.
+ typedef const value_type& const_reference;
+
+ /// The type of a non-const reference to a value in the range.
+ typedef value_type& reference;
+
+ /// The type of an iterator into the range.
+ typedef basic_resolver_iterator<protocol_type> const_iterator;
+
+ /// The type of an iterator into the range.
+ typedef const_iterator iterator;
+
+ /// Type used to represent the distance between two iterators in the range.
+ typedef std::ptrdiff_t difference_type;
+
+ /// Type used to represent a count of the elements in the range.
+ typedef std::size_t size_type;
+
+ /// Default constructor creates an empty range.
+ basic_resolver_results()
+ {
+ }
+
+ /// Copy constructor.
+ basic_resolver_results(const basic_resolver_results& other)
+ : basic_resolver_iterator<InternetProtocol>(other)
+ {
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move constructor.
+ basic_resolver_results(basic_resolver_results&& other)
+ : basic_resolver_iterator<InternetProtocol>(
+ BOOST_ASIO_MOVE_CAST(basic_resolver_results)(other))
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Assignment operator.
+ basic_resolver_results& operator=(const basic_resolver_results& other)
+ {
+ basic_resolver_iterator<InternetProtocol>::operator=(other);
+ return *this;
+ }
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Move-assignment operator.
+ basic_resolver_results& operator=(basic_resolver_results&& other)
+ {
+ basic_resolver_iterator<InternetProtocol>::operator=(
+ BOOST_ASIO_MOVE_CAST(basic_resolver_results)(other));
+ return *this;
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+#if !defined(GENERATING_DOCUMENTATION)
+ // Create results from an addrinfo list returned by getaddrinfo.
+ static basic_resolver_results create(
+ boost::asio::detail::addrinfo_type* address_info,
+ const std::string& host_name, const std::string& service_name)
+ {
+ basic_resolver_results results;
+ if (!address_info)
+ return results;
+
+ std::string actual_host_name = host_name;
+ if (address_info->ai_canonname)
+ actual_host_name = address_info->ai_canonname;
+
+ results.values_.reset(new values_type);
+
+ while (address_info)
+ {
+ if (address_info->ai_family == BOOST_ASIO_OS_DEF(AF_INET)
+ || address_info->ai_family == BOOST_ASIO_OS_DEF(AF_INET6))
+ {
+ using namespace std; // For memcpy.
+ typename InternetProtocol::endpoint endpoint;
+ endpoint.resize(static_cast<std::size_t>(address_info->ai_addrlen));
+ memcpy(endpoint.data(), address_info->ai_addr,
+ address_info->ai_addrlen);
+ results.values_->push_back(
+ basic_resolver_entry<InternetProtocol>(endpoint,
+ actual_host_name, service_name));
+ }
+ address_info = address_info->ai_next;
+ }
+
+ return results;
+ }
+
+ // Create results from an endpoint, host name and service name.
+ static basic_resolver_results create(const endpoint_type& endpoint,
+ const std::string& host_name, const std::string& service_name)
+ {
+ basic_resolver_results results;
+ results.values_.reset(new values_type);
+ results.values_->push_back(
+ basic_resolver_entry<InternetProtocol>(
+ endpoint, host_name, service_name));
+ return results;
+ }
+
+ // Create results from a sequence of endpoints, host and service name.
+ template <typename EndpointIterator>
+ static basic_resolver_results create(
+ EndpointIterator begin, EndpointIterator end,
+ const std::string& host_name, const std::string& service_name)
+ {
+ basic_resolver_results results;
+ if (begin != end)
+ {
+ results.values_.reset(new values_type);
+ for (EndpointIterator ep_iter = begin; ep_iter != end; ++ep_iter)
+ {
+ results.values_->push_back(
+ basic_resolver_entry<InternetProtocol>(
+ *ep_iter, host_name, service_name));
+ }
+ }
+ return results;
+ }
+
+# if defined(BOOST_ASIO_WINDOWS_RUNTIME)
+ // Create results from a Windows Runtime list of EndpointPair objects.
+ static basic_resolver_results create(
+ Windows::Foundation::Collections::IVectorView<
+ Windows::Networking::EndpointPair^>^ endpoints,
+ const boost::asio::detail::addrinfo_type& hints,
+ const std::string& host_name, const std::string& service_name)
+ {
+ basic_resolver_results results;
+ if (endpoints->Size)
+ {
+ results.values_.reset(new values_type);
+ for (unsigned int i = 0; i < endpoints->Size; ++i)
+ {
+ auto pair = endpoints->GetAt(i);
+
+ if (hints.ai_family == BOOST_ASIO_OS_DEF(AF_INET)
+ && pair->RemoteHostName->Type
+ != Windows::Networking::HostNameType::Ipv4)
+ continue;
+
+ if (hints.ai_family == BOOST_ASIO_OS_DEF(AF_INET6)
+ && pair->RemoteHostName->Type
+ != Windows::Networking::HostNameType::Ipv6)
+ continue;
+
+ results.values_->push_back(
+ basic_resolver_entry<InternetProtocol>(
+ typename InternetProtocol::endpoint(
+ ip::make_address(
+ boost::asio::detail::winrt_utils::string(
+ pair->RemoteHostName->CanonicalName)),
+ boost::asio::detail::winrt_utils::integer(
+ pair->RemoteServiceName)),
+ host_name, service_name));
+ }
+ }
+ return results;
+ }
+# endif // defined(BOOST_ASIO_WINDOWS_RUNTIME)
+#endif // !defined(GENERATING_DOCUMENTATION)
+
+ /// Get the number of entries in the results range.
+ size_type size() const BOOST_ASIO_NOEXCEPT
+ {
+ return this->values_ ? this->values_->size() : 0;
+ }
+
+ /// Get the maximum number of entries permitted in a results range.
+ size_type max_size() const BOOST_ASIO_NOEXCEPT
+ {
+ return this->values_ ? this->values_->max_size() : values_type().max_size();
+ }
+
+ /// Determine whether the results range is empty.
+ bool empty() const BOOST_ASIO_NOEXCEPT
+ {
+ return this->values_ ? this->values_->empty() : true;
+ }
+
+ /// Obtain a begin iterator for the results range.
+ const_iterator begin() const
+ {
+ basic_resolver_results tmp(*this);
+ tmp.index_ = 0;
+ return BOOST_ASIO_MOVE_CAST(basic_resolver_results)(tmp);
+ }
+
+ /// Obtain an end iterator for the results range.
+ const_iterator end() const
+ {
+ return const_iterator();
+ }
+
+ /// Obtain a begin iterator for the results range.
+ const_iterator cbegin() const
+ {
+ return begin();
+ }
+
+ /// Obtain an end iterator for the results range.
+ const_iterator cend() const
+ {
+ return end();
+ }
+
+ /// Swap the results range with another.
+ void swap(basic_resolver_results& that) BOOST_ASIO_NOEXCEPT
+ {
+ if (this != &that)
+ {
+ this->values_.swap(that.values_);
+ std::size_t index = this->index_;
+ this->index_ = that.index_;
+ that.index_ = index;
+ }
+ }
+
+ /// Test two iterators for equality.
+ friend bool operator==(const basic_resolver_results& a,
+ const basic_resolver_results& b)
+ {
+ return a.equal(b);
+ }
+
+ /// Test two iterators for inequality.
+ friend bool operator!=(const basic_resolver_results& a,
+ const basic_resolver_results& b)
+ {
+ return !a.equal(b);
+ }
+
+private:
+ typedef std::vector<basic_resolver_entry<InternetProtocol> > values_type;
+};
+
+} // namespace ip
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_IP_BASIC_RESOLVER_RESULTS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/detail/endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/detail/endpoint.hpp
index a6f04abed93..a6f04abed93 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/detail/endpoint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/detail/endpoint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/detail/impl/endpoint.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/detail/impl/endpoint.ipp
index 49f5af116f3..49f5af116f3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/detail/impl/endpoint.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/detail/impl/endpoint.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/detail/socket_option.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/detail/socket_option.hpp
index ec3ca7e9706..ec3ca7e9706 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/detail/socket_option.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/detail/socket_option.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/host_name.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/host_name.hpp
index c1e4e0cf8bb..c1e4e0cf8bb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/host_name.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/host_name.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/icmp.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/icmp.hpp
index 4b9d6420483..4b9d6420483 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/icmp.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/icmp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.hpp
index cf5afb4fcf9..cf5afb4fcf9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.ipp
index 9afa566a35d..9afa566a35d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v4.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.hpp
index 838dc613e21..838dc613e21 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v4.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v4.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.ipp
index 7693deaf402..7693deaf402 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v4.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v4.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v6.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.hpp
index f989b6a7026..f989b6a7026 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v6.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v6.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.ipp
index 4eea4bc5a05..4eea4bc5a05 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/address_v6.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/address_v6.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/basic_endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/basic_endpoint.hpp
index 23655bf9409..23655bf9409 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/basic_endpoint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/basic_endpoint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/host_name.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/host_name.ipp
index 17b8395a76d..17b8395a76d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/host_name.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/host_name.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v4.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.hpp
index 3ca4e746bd5..3ca4e746bd5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v4.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v4.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.ipp
index 62f742c6697..62f742c6697 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v4.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v4.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v6.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.hpp
index 1b13879ea3c..1b13879ea3c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v6.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v6.ipp b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.ipp
index 426bc33b397..426bc33b397 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/impl/network_v6.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/impl/network_v6.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/multicast.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/multicast.hpp
index d46692c2683..d46692c2683 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/multicast.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/multicast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/network_v4.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/network_v4.hpp
index 24e67b83713..24e67b83713 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/network_v4.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/network_v4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/network_v6.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/network_v6.hpp
index 5fe96743df0..5fe96743df0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/network_v6.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/network_v6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/resolver_base.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_base.hpp
index 06cbcd02202..06cbcd02202 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/resolver_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/resolver_query_base.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_query_base.hpp
index 1e287c6225b..1e287c6225b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/resolver_query_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_query_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/resolver_service.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_service.hpp
index 3e1fd38a70c..3e1fd38a70c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/resolver_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/resolver_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/tcp.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/tcp.hpp
index dce1c8ee6a3..dce1c8ee6a3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/tcp.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/tcp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/udp.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/udp.hpp
index 9f07a55e7e9..9f07a55e7e9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/udp.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/udp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/unicast.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/unicast.hpp
index 793c5f7eb45..793c5f7eb45 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/unicast.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/unicast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ip/v6_only.hpp b/src/third_party/boost-1.69.0/boost/asio/ip/v6_only.hpp
index c2f34acc110..c2f34acc110 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ip/v6_only.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ip/v6_only.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/is_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/is_executor.hpp
index 85704752413..85704752413 100644
--- a/src/third_party/boost-1.68.0/boost/asio/is_executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/is_executor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/is_read_buffered.hpp b/src/third_party/boost-1.69.0/boost/asio/is_read_buffered.hpp
index 4839bc53a76..4839bc53a76 100644
--- a/src/third_party/boost-1.68.0/boost/asio/is_read_buffered.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/is_read_buffered.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/is_write_buffered.hpp b/src/third_party/boost-1.69.0/boost/asio/is_write_buffered.hpp
index f18e981ba82..f18e981ba82 100644
--- a/src/third_party/boost-1.68.0/boost/asio/is_write_buffered.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/is_write_buffered.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/local/basic_endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/local/basic_endpoint.hpp
index 248c4a809e1..248c4a809e1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/local/basic_endpoint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/local/basic_endpoint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/local/connect_pair.hpp b/src/third_party/boost-1.69.0/boost/asio/local/connect_pair.hpp
index 10a3f6d2b1a..10a3f6d2b1a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/local/connect_pair.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/local/connect_pair.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/local/datagram_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/local/datagram_protocol.hpp
index c6643230137..c6643230137 100644
--- a/src/third_party/boost-1.68.0/boost/asio/local/datagram_protocol.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/local/datagram_protocol.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/local/detail/endpoint.hpp b/src/third_party/boost-1.69.0/boost/asio/local/detail/endpoint.hpp
index 52d6246ae9d..52d6246ae9d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/local/detail/endpoint.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/local/detail/endpoint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/local/detail/impl/endpoint.ipp b/src/third_party/boost-1.69.0/boost/asio/local/detail/impl/endpoint.ipp
index 3d6a800414b..3d6a800414b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/local/detail/impl/endpoint.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/local/detail/impl/endpoint.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/local/stream_protocol.hpp b/src/third_party/boost-1.69.0/boost/asio/local/stream_protocol.hpp
index 65fdbf1a904..65fdbf1a904 100644
--- a/src/third_party/boost-1.68.0/boost/asio/local/stream_protocol.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/local/stream_protocol.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/packaged_task.hpp b/src/third_party/boost-1.69.0/boost/asio/packaged_task.hpp
new file mode 100644
index 00000000000..4928a1cc7a8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/packaged_task.hpp
@@ -0,0 +1,128 @@
+//
+// packaged_task.hpp
+// ~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_PACKAGED_TASK_HPP
+#define BOOST_ASIO_PACKAGED_TASK_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/future.hpp>
+
+#if defined(BOOST_ASIO_HAS_STD_FUTURE_CLASS) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/detail/variadic_templates.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+#if defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Partial specialisation of @c async_result for @c std::packaged_task.
+template <typename Result, typename... Args, typename Signature>
+class async_result<std::packaged_task<Result(Args...)>, Signature>
+{
+public:
+ /// The packaged task is the concrete completion handler type.
+ typedef std::packaged_task<Result(Args...)> completion_handler_type;
+
+ /// The return type of the initiating function is the future obtained from
+ /// the packaged task.
+ typedef std::future<Result> return_type;
+
+ /// The constructor extracts the future from the packaged task.
+ explicit async_result(completion_handler_type& h)
+ : future_(h.get_future())
+ {
+ }
+
+ /// Returns the packaged task's future.
+ return_type get()
+ {
+ return std::move(future_);
+ }
+
+private:
+ return_type future_;
+};
+
+#else // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ // || defined(GENERATING_DOCUMENTATION)
+
+template <typename Result, typename Signature>
+struct async_result<std::packaged_task<Result()>, Signature>
+{
+ typedef std::packaged_task<Result()> completion_handler_type;
+ typedef std::future<Result> return_type;
+
+ explicit async_result(completion_handler_type& h)
+ : future_(h.get_future())
+ {
+ }
+
+ return_type get()
+ {
+ return std::move(future_);
+ }
+
+private:
+ return_type future_;
+};
+
+#define BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF(n) \
+ template <typename Result, \
+ BOOST_ASIO_VARIADIC_TPARAMS(n), typename Signature> \
+ class async_result< \
+ std::packaged_task<Result(BOOST_ASIO_VARIADIC_TARGS(n))>, Signature> \
+ { \
+ public: \
+ typedef std::packaged_task< \
+ Result(BOOST_ASIO_VARIADIC_TARGS(n))> \
+ completion_handler_type; \
+ \
+ typedef std::future<Result> return_type; \
+ \
+ explicit async_result(completion_handler_type& h) \
+ : future_(h.get_future()) \
+ { \
+ } \
+ \
+ return_type get() \
+ { \
+ return std::move(future_); \
+ } \
+ \
+ private: \
+ return_type future_; \
+ }; \
+ /**/
+ BOOST_ASIO_VARIADIC_GENERATE(BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF)
+#undef BOOST_ASIO_PRIVATE_ASYNC_RESULT_DEF
+
+#endif // defined(BOOST_ASIO_HAS_VARIADIC_TEMPLATES)
+ // || defined(GENERATING_DOCUMENTATION)
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_STD_FUTURE_CLASS)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_PACKAGED_TASK_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/placeholders.hpp b/src/third_party/boost-1.69.0/boost/asio/placeholders.hpp
index 50e399ed28d..50e399ed28d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/placeholders.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/placeholders.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/posix/basic_descriptor.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/basic_descriptor.hpp
index faf5b6def20..faf5b6def20 100644
--- a/src/third_party/boost-1.68.0/boost/asio/posix/basic_descriptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/posix/basic_descriptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/posix/basic_stream_descriptor.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/basic_stream_descriptor.hpp
index d840703a953..d840703a953 100644
--- a/src/third_party/boost-1.68.0/boost/asio/posix/basic_stream_descriptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/posix/basic_stream_descriptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/posix/descriptor.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/descriptor.hpp
index be672ff11c7..be672ff11c7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/posix/descriptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/posix/descriptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/posix/descriptor_base.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/descriptor_base.hpp
index 6722f04ef75..6722f04ef75 100644
--- a/src/third_party/boost-1.68.0/boost/asio/posix/descriptor_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/posix/descriptor_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/posix/stream_descriptor.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor.hpp
index af8cbe92c06..af8cbe92c06 100644
--- a/src/third_party/boost-1.68.0/boost/asio/posix/stream_descriptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/posix/stream_descriptor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor_service.hpp
index b91000ba29a..b91000ba29a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/posix/stream_descriptor_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/posix/stream_descriptor_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/post.hpp b/src/third_party/boost-1.69.0/boost/asio/post.hpp
index 667613ec54e..667613ec54e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/post.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/post.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/raw_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/raw_socket_service.hpp
index 63ebf5cb300..63ebf5cb300 100644
--- a/src/third_party/boost-1.68.0/boost/asio/raw_socket_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/raw_socket_service.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/read.hpp b/src/third_party/boost-1.69.0/boost/asio/read.hpp
new file mode 100644
index 00000000000..efa373c3cfa
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/read.hpp
@@ -0,0 +1,949 @@
+//
+// read.hpp
+// ~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_READ_HPP
+#define BOOST_ASIO_READ_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <cstddef>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+# include <boost/asio/basic_streambuf_fwd.hpp>
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/**
+ * @defgroup read boost::asio::read
+ *
+ * @brief The @c read function is a composed operation that reads a certain
+ * amount of data from a stream before returning.
+ */
+/*@{*/
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * stream.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::read(s, boost::asio::buffer(data, size)); @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read(
+ * s, buffers,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncReadStream, typename MutableBufferSequence>
+std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type* = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * stream.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::read(s, boost::asio::buffer(data, size), ec); @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read(
+ * s, buffers,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncReadStream, typename MutableBufferSequence>
+std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type* = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * stream.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's read_some function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::read(s, boost::asio::buffer(data, size),
+ * boost::asio::transfer_at_least(32)); @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename SyncReadStream, typename MutableBufferSequence,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type* = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * stream.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's read_some function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncReadStream, typename MutableBufferSequence,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type* = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read(
+ * s, buffers,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffer is full (that is, it has reached maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read(
+ * s, buffers,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's read_some function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+template <typename SyncReadStream, typename DynamicBuffer,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's read_some function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncReadStream, typename DynamicBuffer,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffer is full (that is, it has reached maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b The basic_streambuf object into which the data will be read.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read(
+ * s, b,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncReadStream, typename Allocator>
+std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffer is full (that is, it has reached maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b The basic_streambuf object into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read(
+ * s, b,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncReadStream, typename Allocator>
+std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
+ boost::system::error_code& ec);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffer is full (that is, it has reached maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b The basic_streambuf object into which the data will be read.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's read_some function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+template <typename SyncReadStream, typename Allocator,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition);
+
+/// Attempt to read a certain amount of data from a stream before returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * stream. The call will block until one of the following conditions is true:
+ *
+ * @li The supplied buffer is full (that is, it has reached maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b The basic_streambuf object into which the data will be read.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's read_some function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncReadStream, typename Allocator,
+ typename CompletionCondition>
+std::size_t read(SyncReadStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, boost::system::error_code& ec);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+/**
+ * @defgroup async_read boost::asio::async_read
+ *
+ * @brief The @c async_read function is a composed asynchronous operation that
+ * reads a certain amount of data from a stream before completion.
+ */
+/*@{*/
+
+/// Start an asynchronous operation to read a certain amount of data from a
+/// stream.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions is
+ * true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other read operations (such
+ * as async_read, the stream's async_read_some function, or any other composed
+ * operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * stream. Although the buffers object may be copied as necessary, ownership of
+ * the underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes copied into the
+ * // buffers. If an error occurred,
+ * // this will be the number of
+ * // bytes successfully transferred
+ * // prior to the error.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * boost::asio::async_read(s, boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::async_read(
+ * s, buffers,
+ * boost::asio::transfer_all(),
+ * handler); @endcode
+ */
+template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type* = 0);
+
+/// Start an asynchronous operation to read a certain amount of data from a
+/// stream.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions is
+ * true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * stream. Although the buffers object may be copied as necessary, ownership of
+ * the underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's async_read_some function.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes copied into the
+ * // buffers. If an error occurred,
+ * // this will be the number of
+ * // bytes successfully transferred
+ * // prior to the error.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::async_read(s,
+ * boost::asio::buffer(data, size),
+ * boost::asio::transfer_at_least(32),
+ * handler); @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename AsyncReadStream, typename MutableBufferSequence,
+ typename CompletionCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_mutable_buffer_sequence<MutableBufferSequence>::value
+ >::type* = 0);
+
+/// Start an asynchronous operation to read a certain amount of data from a
+/// stream.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions is
+ * true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other read operations (such
+ * as async_read, the stream's async_read_some function, or any other composed
+ * operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes copied into the
+ * // buffers. If an error occurred,
+ * // this will be the number of
+ * // bytes successfully transferred
+ * // prior to the error.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::async_read(
+ * s, buffers,
+ * boost::asio::transfer_all(),
+ * handler); @endcode
+ */
+template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+/// Start an asynchronous operation to read a certain amount of data from a
+/// stream.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions is
+ * true:
+ *
+ * @li The specified dynamic buffer sequence is full (that is, it has reached
+ * maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other read operations (such
+ * as async_read, the stream's async_read_some function, or any other composed
+ * operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's async_read_some function.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes copied into the
+ * // buffers. If an error occurred,
+ * // this will be the number of
+ * // bytes successfully transferred
+ * // prior to the error.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename CompletionCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Start an asynchronous operation to read a certain amount of data from a
+/// stream.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions is
+ * true:
+ *
+ * @li The supplied buffer is full (that is, it has reached maximum size).
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other read operations (such
+ * as async_read, the stream's async_read_some function, or any other composed
+ * operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param b A basic_streambuf object into which the data will be read. Ownership
+ * of the streambuf is retained by the caller, which must guarantee that it
+ * remains valid until the handler is called.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes copied into the
+ * // buffers. If an error occurred,
+ * // this will be the number of
+ * // bytes successfully transferred
+ * // prior to the error.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::async_read(
+ * s, b,
+ * boost::asio::transfer_all(),
+ * handler); @endcode
+ */
+template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+/// Start an asynchronous operation to read a certain amount of data from a
+/// stream.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions is
+ * true:
+ *
+ * @li The supplied buffer is full (that is, it has reached maximum size).
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other read operations (such
+ * as async_read, the stream's async_read_some function, or any other composed
+ * operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param b A basic_streambuf object into which the data will be read. Ownership
+ * of the streambuf is retained by the caller, which must guarantee that it
+ * remains valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_read_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the stream's async_read_some function.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes copied into the
+ * // buffers. If an error occurred,
+ * // this will be the number of
+ * // bytes successfully transferred
+ * // prior to the error.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncReadStream, typename Allocator,
+ typename CompletionCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read(AsyncReadStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/read.hpp>
+
+#endif // BOOST_ASIO_READ_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/read_at.hpp b/src/third_party/boost-1.69.0/boost/asio/read_at.hpp
new file mode 100644
index 00000000000..ec6780382b4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/read_at.hpp
@@ -0,0 +1,673 @@
+//
+// read_at.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_READ_AT_HPP
+#define BOOST_ASIO_READ_AT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <cstddef>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/cstdint.hpp>
+#include <boost/asio/error.hpp>
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+# include <boost/asio/basic_streambuf_fwd.hpp>
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/**
+ * @defgroup read_at boost::asio::read_at
+ *
+ * @brief The @c read_at function is a composed operation that reads a certain
+ * amount of data at the specified offset before returning.
+ */
+/*@{*/
+
+/// Attempt to read a certain amount of data at the specified offset before
+/// returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * random access device at the specified offset. The call will block until one
+ * of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the SyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * device.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::read_at(d, 42, boost::asio::buffer(data, size)); @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read_at(
+ * d, 42, buffers,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers);
+
+/// Attempt to read a certain amount of data at the specified offset before
+/// returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * random access device at the specified offset. The call will block until one
+ * of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the SyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * device.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::read_at(d, 42,
+ * boost::asio::buffer(data, size), ec); @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read_at(
+ * d, 42, buffers,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ boost::system::error_code& ec);
+
+/// Attempt to read a certain amount of data at the specified offset before
+/// returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * random access device at the specified offset. The call will block until one
+ * of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the SyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * device.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the device's read_some_at function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::read_at(d, 42, boost::asio::buffer(data, size),
+ * boost::asio::transfer_at_least(32)); @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename CompletionCondition>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition);
+
+/// Attempt to read a certain amount of data at the specified offset before
+/// returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * random access device at the specified offset. The call will block until one
+ * of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the SyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * device.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the device's read_some_at function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename CompletionCondition>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Attempt to read a certain amount of data at the specified offset before
+/// returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * random access device at the specified offset. The call will block until one
+ * of the following conditions is true:
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the SyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param b The basic_streambuf object into which the data will be read.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read_at(
+ * d, 42, b,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncRandomAccessReadDevice, typename Allocator>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b);
+
+/// Attempt to read a certain amount of data at the specified offset before
+/// returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * random access device at the specified offset. The call will block until one
+ * of the following conditions is true:
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the SyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param b The basic_streambuf object into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::read_at(
+ * d, 42, b,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncRandomAccessReadDevice, typename Allocator>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
+ boost::system::error_code& ec);
+
+/// Attempt to read a certain amount of data at the specified offset before
+/// returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * random access device at the specified offset. The call will block until one
+ * of the following conditions is true:
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the SyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param b The basic_streambuf object into which the data will be read.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the device's read_some_at function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+template <typename SyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition);
+
+/// Attempt to read a certain amount of data at the specified offset before
+/// returning.
+/**
+ * This function is used to read a certain number of bytes of data from a
+ * random access device at the specified offset. The call will block until one
+ * of the following conditions is true:
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the SyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param b The basic_streambuf object into which the data will be read.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest read_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the device's read_some_at function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition>
+std::size_t read_at(SyncRandomAccessReadDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, boost::system::error_code& ec);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+/**
+ * @defgroup async_read_at boost::asio::async_read_at
+ *
+ * @brief The @c async_read_at function is a composed asynchronous operation
+ * that reads a certain amount of data at the specified offset.
+ */
+/*@{*/
+
+/// Start an asynchronous operation to read a certain amount of data at the
+/// specified offset.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a random access device at the specified offset. The function call
+ * always returns immediately. The asynchronous operation will continue until
+ * one of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * async_read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the AsyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * device. Although the buffers object may be copied as necessary, ownership of
+ * the underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code
+ * boost::asio::async_read_at(d, 42, boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::async_read_at(
+ * d, 42, buffers,
+ * boost::asio::transfer_all(),
+ * handler); @endcode
+ */
+template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
+ const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+/// Start an asynchronous operation to read a certain amount of data at the
+/// specified offset.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a random access device at the specified offset. The function call
+ * always returns immediately. The asynchronous operation will continue until
+ * one of the following conditions is true:
+ *
+ * @li The supplied buffers are full. That is, the bytes transferred is equal to
+ * the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the AsyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param buffers One or more buffers into which the data will be read. The sum
+ * of the buffer sizes indicates the maximum number of bytes to read from the
+ * device. Although the buffers object may be copied as necessary, ownership of
+ * the underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_read_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the device's async_read_some_at function.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * To read into a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::async_read_at(d, 42,
+ * boost::asio::buffer(data, size),
+ * boost::asio::transfer_at_least(32),
+ * handler); @endcode
+ * See the @ref buffer documentation for information on reading into multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename AsyncRandomAccessReadDevice, typename MutableBufferSequence,
+ typename CompletionCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, const MutableBufferSequence& buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Start an asynchronous operation to read a certain amount of data at the
+/// specified offset.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a random access device at the specified offset. The function call
+ * always returns immediately. The asynchronous operation will continue until
+ * one of the following conditions is true:
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * async_read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the AsyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param b A basic_streambuf object into which the data will be read. Ownership
+ * of the streambuf is retained by the caller, which must guarantee that it
+ * remains valid until the handler is called.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::async_read_at(
+ * d, 42, b,
+ * boost::asio::transfer_all(),
+ * handler); @endcode
+ */
+template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d, uint64_t offset,
+ basic_streambuf<Allocator>& b, BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+/// Start an asynchronous operation to read a certain amount of data at the
+/// specified offset.
+/**
+ * This function is used to asynchronously read a certain number of bytes of
+ * data from a random access device at the specified offset. The function call
+ * always returns immediately. The asynchronous operation will continue until
+ * one of the following conditions is true:
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * async_read_some_at function.
+ *
+ * @param d The device from which the data is to be read. The type must support
+ * the AsyncRandomAccessReadDevice concept.
+ *
+ * @param offset The offset at which the data will be read.
+ *
+ * @param b A basic_streambuf object into which the data will be read. Ownership
+ * of the streambuf is retained by the caller, which must guarantee that it
+ * remains valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the read operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_read_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the read operation is complete. A non-zero
+ * return value indicates the maximum number of bytes to be read on the next
+ * call to the device's async_read_some_at function.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes copied into the buffers. If an error
+ * // occurred, this will be the number of bytes successfully
+ * // transferred prior to the error.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncRandomAccessReadDevice, typename Allocator,
+ typename CompletionCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_at(AsyncRandomAccessReadDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/read_at.hpp>
+
+#endif // BOOST_ASIO_READ_AT_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/read_until.hpp b/src/third_party/boost-1.69.0/boost/asio/read_until.hpp
new file mode 100644
index 00000000000..f9c1f51323b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/read_until.hpp
@@ -0,0 +1,1828 @@
+//
+// read_until.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_READ_UNTIL_HPP
+#define BOOST_ASIO_READ_UNTIL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <cstddef>
+#include <string>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/regex_fwd.hpp>
+#include <boost/asio/detail/string_view.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/error.hpp>
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+# include <boost/asio/basic_streambuf_fwd.hpp>
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+namespace detail
+{
+ char (&has_result_type_helper(...))[2];
+
+ template <typename T>
+ char has_result_type_helper(T*, typename T::result_type* = 0);
+
+ template <typename T>
+ struct has_result_type
+ {
+ enum { value = (sizeof((has_result_type_helper)((T*)(0))) == 1) };
+ };
+} // namespace detail
+
+/// Type trait used to determine whether a type can be used as a match condition
+/// function with read_until and async_read_until.
+template <typename T>
+struct is_match_condition
+{
+#if defined(GENERATING_DOCUMENTATION)
+ /// The value member is true if the type may be used as a match condition.
+ static const bool value;
+#else
+ enum
+ {
+ value = boost::asio::is_function<
+ typename boost::asio::remove_pointer<T>::type>::value
+ || detail::has_result_type<T>::value
+ };
+#endif
+};
+
+/**
+ * @defgroup read_until boost::asio::read_until
+ *
+ * @brief The @c read_until function is a composed operation that reads data
+ * into a dynamic buffer sequence, or into a streambuf, until it contains a
+ * delimiter, matches a regular expression, or a function object indicates a
+ * match.
+ */
+/*@{*/
+
+/// Read data into a dynamic buffer sequence until it contains a specified
+/// delimiter.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains the specified
+ * delimiter. The call will block until one of the following conditions is
+ * true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains the delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param delim The delimiter character.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the delimiter.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond the delimiter. An application will
+ * typically leave that data in the dynamic buffer sequence for a subsequent
+ * read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a @c std::string until a newline is encountered:
+ * @code std::string data;
+ * std::string n = boost::asio::read_until(s,
+ * boost::asio::dynamic_buffer(data), '\n');
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n); @endcode
+ * After the @c read_until operation completes successfully, the string @c data
+ * contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the buffer @c b as
+ * follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers, char delim);
+
+/// Read data into a dynamic buffer sequence until it contains a specified
+/// delimiter.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains the specified
+ * delimiter. The call will block until one of the following conditions is
+ * true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains the delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param delim The delimiter character.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the delimiter. Returns 0 if an error occurred.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond the delimiter. An application will
+ * typically leave that data in the dynamic buffer sequence for a subsequent
+ * read_until operation to examine.
+ */
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ char delim, boost::system::error_code& ec);
+
+/// Read data into a dynamic buffer sequence until it contains a specified
+/// delimiter.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains the specified
+ * delimiter. The call will block until one of the following conditions is
+ * true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains the delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param delim The delimiter string.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the delimiter.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond the delimiter. An application will
+ * typically leave that data in the dynamic buffer sequence for a subsequent
+ * read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a @c std::string until a CR-LF sequence is encountered:
+ * @code std::string data;
+ * std::string n = boost::asio::read_until(s,
+ * boost::asio::dynamic_buffer(data), "\r\n");
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n); @endcode
+ * After the @c read_until operation completes successfully, the string @c data
+ * contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the buffer @c b as
+ * follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim);
+
+/// Read data into a dynamic buffer sequence until it contains a specified
+/// delimiter.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains the specified
+ * delimiter. The call will block until one of the following conditions is
+ * true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains the delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ *
+ * @param delim The delimiter string.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the delimiter. Returns 0 if an error occurred.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond the delimiter. An application will
+ * typically leave that data in the dynamic buffer sequence for a subsequent
+ * read_until operation to examine.
+ */
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ boost::system::error_code& ec);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Read data into a dynamic buffer sequence until some part of the data it
+/// contains matches a regular expression.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains some data
+ * that matches a regular expression. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li A substring of the dynamic buffer sequence's get area matches the
+ * regular expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains data that matches the regular expression, the function returns
+ * immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers A dynamic buffer sequence into which the data will be read.
+ *
+ * @param expr The regular expression.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the substring that matches the regular expression.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond that which matched the regular
+ * expression. An application will typically leave that data in the dynamic
+ * buffer sequence for a subsequent read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a @c std::string until a CR-LF sequence is encountered:
+ * @code std::string data;
+ * std::string n = boost::asio::read_until(s,
+ * boost::asio::dynamic_buffer(data), boost::regex("\r\n"));
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n); @endcode
+ * After the @c read_until operation completes successfully, the string @c data
+ * contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the buffer @c b as
+ * follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ const boost::regex& expr);
+
+/// Read data into a dynamic buffer sequence until some part of the data it
+/// contains matches a regular expression.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until the dynamic buffer sequence's get area contains some data
+ * that matches a regular expression. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li A substring of the dynamic buffer sequence's get area matches the
+ * regular expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the dynamic buffer sequence's get area already
+ * contains data that matches the regular expression, the function returns
+ * immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers A dynamic buffer sequence into which the data will be read.
+ *
+ * @param expr The regular expression.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area up to
+ * and including the substring that matches the regular expression. Returns 0
+ * if an error occurred.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond that which matched the regular
+ * expression. An application will typically leave that data in the dynamic
+ * buffer sequence for a subsequent read_until operation to examine.
+ */
+template <typename SyncReadStream, typename DynamicBuffer>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ const boost::regex& expr, boost::system::error_code& ec);
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+ // || defined(GENERATING_DOCUMENTATION)
+
+/// Read data into a dynamic buffer sequence until a function object indicates a
+/// match.
+
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until a user-defined match condition function object, when applied
+ * to the data contained in the dynamic buffer sequence, indicates a successful
+ * match. The call will block until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the match condition function object already indicates
+ * a match, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers A dynamic buffer sequence into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @returns The number of bytes in the dynamic_buffer's get area that
+ * have been fully consumed by the match function.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond that which matched the function object.
+ * An application will typically leave that data in the dynamic buffer sequence
+ * for a subsequent read_until operation to examine.
+
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ *
+ * @par Examples
+ * To read data into a dynamic buffer sequence until whitespace is encountered:
+ * @code typedef boost::asio::buffers_iterator<
+ * boost::asio::const_buffers_1> iterator;
+ *
+ * std::pair<iterator, bool>
+ * match_whitespace(iterator begin, iterator end)
+ * {
+ * iterator i = begin;
+ * while (i != end)
+ * if (std::isspace(*i++))
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ * ...
+ * std::string data;
+ * boost::asio::read_until(s, data, match_whitespace);
+ * @endcode
+ *
+ * To read data into a @c std::string until a matching character is found:
+ * @code class match_char
+ * {
+ * public:
+ * explicit match_char(char c) : c_(c) {}
+ *
+ * template <typename Iterator>
+ * std::pair<Iterator, bool> operator()(
+ * Iterator begin, Iterator end) const
+ * {
+ * Iterator i = begin;
+ * while (i != end)
+ * if (c_ == *i++)
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ *
+ * private:
+ * char c_;
+ * };
+ *
+ * namespace asio {
+ * template <> struct is_match_condition<match_char>
+ * : public boost::true_type {};
+ * } // namespace asio
+ * ...
+ * std::string data;
+ * boost::asio::read_until(s, data, match_char('a'));
+ * @endcode
+ */
+template <typename SyncReadStream,
+ typename DynamicBuffer, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ MatchCondition match_condition,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+
+/// Read data into a dynamic buffer sequence until a function object indicates a
+/// match.
+/**
+ * This function is used to read data into the specified dynamic buffer
+ * sequence until a user-defined match condition function object, when applied
+ * to the data contained in the dynamic buffer sequence, indicates a successful
+ * match. The call will block until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the match condition function object already indicates
+ * a match, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param buffers A dynamic buffer sequence into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<DynamicBuffer::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the dynamic buffer sequence's get area that
+ * have been fully consumed by the match function. Returns 0 if an error
+ * occurred.
+ *
+ * @note After a successful read_until operation, the dynamic buffer sequence
+ * may contain additional data beyond that which matched the function object.
+ * An application will typically leave that data in the dynamic buffer sequence
+ * for a subsequent read_until operation to examine.
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ */
+template <typename SyncReadStream,
+ typename DynamicBuffer, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Read data into a streambuf until it contains a specified delimiter.
+/**
+ * This function is used to read data into the specified streambuf until the
+ * streambuf's get area contains the specified delimiter. The call will block
+ * until one of the following conditions is true:
+ *
+ * @li The get area of the streambuf contains the specified delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the streambuf's get area already contains the
+ * delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param delim The delimiter character.
+ *
+ * @returns The number of bytes in the streambuf's get area up to and including
+ * the delimiter.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the streambuf may contain
+ * additional data beyond the delimiter. An application will typically leave
+ * that data in the streambuf for a subsequent read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a streambuf until a newline is encountered:
+ * @code boost::asio::streambuf b;
+ * boost::asio::read_until(s, b, '\n');
+ * std::istream is(&b);
+ * std::string line;
+ * std::getline(is, line); @endcode
+ * After the @c read_until operation completes successfully, the buffer @c b
+ * contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
+ * The call to @c std::getline then extracts the data up to and including the
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c' } @endcode
+ * The remaining data is left in the buffer @c b as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename Allocator>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, char delim);
+
+/// Read data into a streambuf until it contains a specified delimiter.
+/**
+ * This function is used to read data into the specified streambuf until the
+ * streambuf's get area contains the specified delimiter. The call will block
+ * until one of the following conditions is true:
+ *
+ * @li The get area of the streambuf contains the specified delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the streambuf's get area already contains the
+ * delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param delim The delimiter character.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the streambuf's get area up to and including
+ * the delimiter. Returns 0 if an error occurred.
+ *
+ * @note After a successful read_until operation, the streambuf may contain
+ * additional data beyond the delimiter. An application will typically leave
+ * that data in the streambuf for a subsequent read_until operation to examine.
+ */
+template <typename SyncReadStream, typename Allocator>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, char delim,
+ boost::system::error_code& ec);
+
+/// Read data into a streambuf until it contains a specified delimiter.
+/**
+ * This function is used to read data into the specified streambuf until the
+ * streambuf's get area contains the specified delimiter. The call will block
+ * until one of the following conditions is true:
+ *
+ * @li The get area of the streambuf contains the specified delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the streambuf's get area already contains the
+ * delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param delim The delimiter string.
+ *
+ * @returns The number of bytes in the streambuf's get area up to and including
+ * the delimiter.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the streambuf may contain
+ * additional data beyond the delimiter. An application will typically leave
+ * that data in the streambuf for a subsequent read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a streambuf until a newline is encountered:
+ * @code boost::asio::streambuf b;
+ * boost::asio::read_until(s, b, "\r\n");
+ * std::istream is(&b);
+ * std::string line;
+ * std::getline(is, line); @endcode
+ * After the @c read_until operation completes successfully, the buffer @c b
+ * contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c std::getline then extracts the data up to and including the
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r' } @endcode
+ * The remaining data is left in the buffer @c b as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename Allocator>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_STRING_VIEW_PARAM delim);
+
+/// Read data into a streambuf until it contains a specified delimiter.
+/**
+ * This function is used to read data into the specified streambuf until the
+ * streambuf's get area contains the specified delimiter. The call will block
+ * until one of the following conditions is true:
+ *
+ * @li The get area of the streambuf contains the specified delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the streambuf's get area already contains the
+ * delimiter, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param delim The delimiter string.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the streambuf's get area up to and including
+ * the delimiter. Returns 0 if an error occurred.
+ *
+ * @note After a successful read_until operation, the streambuf may contain
+ * additional data beyond the delimiter. An application will typically leave
+ * that data in the streambuf for a subsequent read_until operation to examine.
+ */
+template <typename SyncReadStream, typename Allocator>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_STRING_VIEW_PARAM delim, boost::system::error_code& ec);
+
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Read data into a streambuf until some part of the data it contains matches
+/// a regular expression.
+/**
+ * This function is used to read data into the specified streambuf until the
+ * streambuf's get area contains some data that matches a regular expression.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li A substring of the streambuf's get area matches the regular expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the streambuf's get area already contains data that
+ * matches the regular expression, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param expr The regular expression.
+ *
+ * @returns The number of bytes in the streambuf's get area up to and including
+ * the substring that matches the regular expression.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the streambuf may contain
+ * additional data beyond that which matched the regular expression. An
+ * application will typically leave that data in the streambuf for a subsequent
+ * read_until operation to examine.
+ *
+ * @par Example
+ * To read data into a streambuf until a CR-LF sequence is encountered:
+ * @code boost::asio::streambuf b;
+ * boost::asio::read_until(s, b, boost::regex("\r\n"));
+ * std::istream is(&b);
+ * std::string line;
+ * std::getline(is, line); @endcode
+ * After the @c read_until operation completes successfully, the buffer @c b
+ * contains the data which matched the regular expression:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c std::getline then extracts the data up to and including the
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r' } @endcode
+ * The remaining data is left in the buffer @c b as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c read_until operation.
+ */
+template <typename SyncReadStream, typename Allocator>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr);
+
+/// Read data into a streambuf until some part of the data it contains matches
+/// a regular expression.
+/**
+ * This function is used to read data into the specified streambuf until the
+ * streambuf's get area contains some data that matches a regular expression.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li A substring of the streambuf's get area matches the regular expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the streambuf's get area already contains data that
+ * matches the regular expression, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param expr The regular expression.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the streambuf's get area up to and including
+ * the substring that matches the regular expression. Returns 0 if an error
+ * occurred.
+ *
+ * @note After a successful read_until operation, the streambuf may contain
+ * additional data beyond that which matched the regular expression. An
+ * application will typically leave that data in the streambuf for a subsequent
+ * read_until operation to examine.
+ */
+template <typename SyncReadStream, typename Allocator>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
+ boost::system::error_code& ec);
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+ // || defined(GENERATING_DOCUMENTATION)
+
+/// Read data into a streambuf until a function object indicates a match.
+/**
+ * This function is used to read data into the specified streambuf until a
+ * user-defined match condition function object, when applied to the data
+ * contained in the streambuf, indicates a successful match. The call will
+ * block until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the match condition function object already indicates
+ * a match, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @returns The number of bytes in the streambuf's get area that have been fully
+ * consumed by the match function.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note After a successful read_until operation, the streambuf may contain
+ * additional data beyond that which matched the function object. An application
+ * will typically leave that data in the streambuf for a subsequent read_until
+ * operation to examine.
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ *
+ * @par Examples
+ * To read data into a streambuf until whitespace is encountered:
+ * @code typedef boost::asio::buffers_iterator<
+ * boost::asio::streambuf::const_buffers_type> iterator;
+ *
+ * std::pair<iterator, bool>
+ * match_whitespace(iterator begin, iterator end)
+ * {
+ * iterator i = begin;
+ * while (i != end)
+ * if (std::isspace(*i++))
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ * ...
+ * boost::asio::streambuf b;
+ * boost::asio::read_until(s, b, match_whitespace);
+ * @endcode
+ *
+ * To read data into a streambuf until a matching character is found:
+ * @code class match_char
+ * {
+ * public:
+ * explicit match_char(char c) : c_(c) {}
+ *
+ * template <typename Iterator>
+ * std::pair<Iterator, bool> operator()(
+ * Iterator begin, Iterator end) const
+ * {
+ * Iterator i = begin;
+ * while (i != end)
+ * if (c_ == *i++)
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ *
+ * private:
+ * char c_;
+ * };
+ *
+ * namespace asio {
+ * template <> struct is_match_condition<match_char>
+ * : public boost::true_type {};
+ * } // namespace asio
+ * ...
+ * boost::asio::streambuf b;
+ * boost::asio::read_until(s, b, match_char('a'));
+ * @endcode
+ */
+template <typename SyncReadStream, typename Allocator, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, MatchCondition match_condition,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+
+/// Read data into a streambuf until a function object indicates a match.
+/**
+ * This function is used to read data into the specified streambuf until a
+ * user-defined match condition function object, when applied to the data
+ * contained in the streambuf, indicates a successful match. The call will
+ * block until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * read_some function. If the match condition function object already indicates
+ * a match, the function returns immediately.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the SyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes in the streambuf's get area that have been fully
+ * consumed by the match function. Returns 0 if an error occurred.
+ *
+ * @note After a successful read_until operation, the streambuf may contain
+ * additional data beyond that which matched the function object. An application
+ * will typically leave that data in the streambuf for a subsequent read_until
+ * operation to examine.
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ */
+template <typename SyncReadStream, typename Allocator, typename MatchCondition>
+std::size_t read_until(SyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, boost::system::error_code& ec,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+/**
+ * @defgroup async_read_until boost::asio::async_read_until
+ *
+ * @brief The @c async_read_until function is a composed asynchronous operation
+ * that reads data into a dynamic buffer sequence, or into a streambuf, until
+ * it contains a delimiter, matches a regular expression, or a function object
+ * indicates a match.
+ */
+/*@{*/
+
+/// Start an asynchronous operation to read data into a dynamic buffer sequence
+/// until it contains a specified delimiter.
+/**
+ * This function is used to asynchronously read data into the specified dynamic
+ * buffer sequence until the dynamic buffer sequence's get area contains the
+ * specified delimiter. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the dynamic buffer sequence's get area already contains the delimiter, this
+ * asynchronous operation completes immediately. The program must ensure that
+ * the stream performs no other read operations (such as async_read,
+ * async_read_until, the stream's async_read_some function, or any other
+ * composed operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param delim The delimiter character.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the dynamic buffer sequence's
+ * // get area up to and including the delimiter.
+ * // 0 if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note After a successful async_read_until operation, the dynamic buffer
+ * sequence may contain additional data beyond the delimiter. An application
+ * will typically leave that data in the dynamic buffer sequence for a
+ * subsequent async_read_until operation to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a @c std::string until a newline is
+ * encountered:
+ * @code std::string data;
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n);
+ * ...
+ * }
+ * }
+ * ...
+ * boost::asio::async_read_until(s, data, '\n', handler); @endcode
+ * After the @c async_read_until operation completes successfully, the buffer
+ * @c data contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the buffer @c data
+ * as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ */
+template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+/// Start an asynchronous operation to read data into a dynamic buffer sequence
+/// until it contains a specified delimiter.
+/**
+ * This function is used to asynchronously read data into the specified dynamic
+ * buffer sequence until the dynamic buffer sequence's get area contains the
+ * specified delimiter. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li The get area of the dynamic buffer sequence contains the specified
+ * delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the dynamic buffer sequence's get area already contains the delimiter, this
+ * asynchronous operation completes immediately. The program must ensure that
+ * the stream performs no other read operations (such as async_read,
+ * async_read_until, the stream's async_read_some function, or any other
+ * composed operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param delim The delimiter string.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the dynamic buffer sequence's
+ * // get area up to and including the delimiter.
+ * // 0 if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note After a successful async_read_until operation, the dynamic buffer
+ * sequence may contain additional data beyond the delimiter. An application
+ * will typically leave that data in the dynamic buffer sequence for a
+ * subsequent async_read_until operation to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a @c std::string until a CR-LF sequence is
+ * encountered:
+ * @code std::string data;
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n);
+ * ...
+ * }
+ * }
+ * ...
+ * boost::asio::async_read_until(s, data, "\r\n", handler); @endcode
+ * After the @c async_read_until operation completes successfully, the string
+ * @c data contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the
+ * delimiter, so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the string @c data
+ * as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ */
+template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Start an asynchronous operation to read data into a dynamic buffer sequence
+/// until some part of its data matches a regular expression.
+/**
+ * This function is used to asynchronously read data into the specified dynamic
+ * buffer sequence until the dynamic buffer sequence's get area contains some
+ * data that matches a regular expression. The function call always returns
+ * immediately. The asynchronous operation will continue until one of the
+ * following conditions is true:
+ *
+ * @li A substring of the dynamic buffer sequence's get area matches the regular
+ * expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the dynamic buffer sequence's get area already contains data that matches
+ * the regular expression, this asynchronous operation completes immediately.
+ * The program must ensure that the stream performs no other read operations
+ * (such as async_read, async_read_until, the stream's async_read_some
+ * function, or any other composed operations that perform reads) until this
+ * operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param expr The regular expression.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the dynamic buffer
+ * // sequence's get area up to and including the
+ * // substring that matches the regular expression.
+ * // 0 if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note After a successful async_read_until operation, the dynamic buffer
+ * sequence may contain additional data beyond that which matched the regular
+ * expression. An application will typically leave that data in the dynamic
+ * buffer sequence for a subsequent async_read_until operation to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a @c std::string until a CR-LF sequence is
+ * encountered:
+ * @code std::string data;
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::string line = data.substr(0, n);
+ * data.erase(0, n);
+ * ...
+ * }
+ * }
+ * ...
+ * boost::asio::async_read_until(s, data,
+ * boost::regex("\r\n"), handler); @endcode
+ * After the @c async_read_until operation completes successfully, the string
+ * @c data contains the data which matched the regular expression:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c substr then extracts the data up to and including the match,
+ * so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n' } @endcode
+ * After the call to @c erase, the remaining data is left in the string @c data
+ * as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ */
+template <typename AsyncReadStream,
+ typename DynamicBuffer, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ const boost::regex& expr,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+ // || defined(GENERATING_DOCUMENTATION)
+
+/// Start an asynchronous operation to read data into a dynamic buffer sequence
+/// until a function object indicates a match.
+/**
+ * This function is used to asynchronously read data into the specified dynamic
+ * buffer sequence until a user-defined match condition function object, when
+ * applied to the data contained in the dynamic buffer sequence, indicates a
+ * successful match. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the match condition function object already indicates a match, this
+ * asynchronous operation completes immediately. The program must ensure that
+ * the stream performs no other read operations (such as async_read,
+ * async_read_until, the stream's async_read_some function, or any other
+ * composed operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param buffers The dynamic buffer sequence into which the data will be read.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<typename DynamicBuffer::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the dynamic buffer sequence's
+ * // get area that have been fully consumed by the match
+ * // function. O if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note After a successful async_read_until operation, the dynamic buffer
+ * sequence may contain additional data beyond that which matched the function
+ * object. An application will typically leave that data in the dynamic buffer
+ * sequence for a subsequent async_read_until operation to examine.
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ *
+ * @par Examples
+ * To asynchronously read data into a @c std::string until whitespace is
+ * encountered:
+ * @code typedef boost::asio::buffers_iterator<
+ * boost::asio::const_buffers_1> iterator;
+ *
+ * std::pair<iterator, bool>
+ * match_whitespace(iterator begin, iterator end)
+ * {
+ * iterator i = begin;
+ * while (i != end)
+ * if (std::isspace(*i++))
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size);
+ * ...
+ * std::string data;
+ * boost::asio::async_read_until(s, data, match_whitespace, handler);
+ * @endcode
+ *
+ * To asynchronously read data into a @c std::string until a matching character
+ * is found:
+ * @code class match_char
+ * {
+ * public:
+ * explicit match_char(char c) : c_(c) {}
+ *
+ * template <typename Iterator>
+ * std::pair<Iterator, bool> operator()(
+ * Iterator begin, Iterator end) const
+ * {
+ * Iterator i = begin;
+ * while (i != end)
+ * if (c_ == *i++)
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ *
+ * private:
+ * char c_;
+ * };
+ *
+ * namespace asio {
+ * template <> struct is_match_condition<match_char>
+ * : public boost::true_type {};
+ * } // namespace asio
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size);
+ * ...
+ * std::string data;
+ * boost::asio::async_read_until(s, data, match_char('a'), handler);
+ * @endcode
+ */
+template <typename AsyncReadStream, typename DynamicBuffer,
+ typename MatchCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Start an asynchronous operation to read data into a streambuf until it
+/// contains a specified delimiter.
+/**
+ * This function is used to asynchronously read data into the specified
+ * streambuf until the streambuf's get area contains the specified delimiter.
+ * The function call always returns immediately. The asynchronous operation
+ * will continue until one of the following conditions is true:
+ *
+ * @li The get area of the streambuf contains the specified delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the streambuf's get area already contains the delimiter, this asynchronous
+ * operation completes immediately. The program must ensure that the stream
+ * performs no other read operations (such as async_read, async_read_until, the
+ * stream's async_read_some function, or any other composed operations that
+ * perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read. Ownership of
+ * the streambuf is retained by the caller, which must guarantee that it remains
+ * valid until the handler is called.
+ *
+ * @param delim The delimiter character.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the streambuf's get
+ * // area up to and including the delimiter.
+ * // 0 if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note After a successful async_read_until operation, the streambuf may
+ * contain additional data beyond the delimiter. An application will typically
+ * leave that data in the streambuf for a subsequent async_read_until operation
+ * to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a streambuf until a newline is encountered:
+ * @code boost::asio::streambuf b;
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::istream is(&b);
+ * std::string line;
+ * std::getline(is, line);
+ * ...
+ * }
+ * }
+ * ...
+ * boost::asio::async_read_until(s, b, '\n', handler); @endcode
+ * After the @c async_read_until operation completes successfully, the buffer
+ * @c b contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\n', 'd', 'e', ... } @endcode
+ * The call to @c std::getline then extracts the data up to and including the
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c' } @endcode
+ * The remaining data is left in the buffer @c b as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ */
+template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ char delim, BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+/// Start an asynchronous operation to read data into a streambuf until it
+/// contains a specified delimiter.
+/**
+ * This function is used to asynchronously read data into the specified
+ * streambuf until the streambuf's get area contains the specified delimiter.
+ * The function call always returns immediately. The asynchronous operation
+ * will continue until one of the following conditions is true:
+ *
+ * @li The get area of the streambuf contains the specified delimiter.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the streambuf's get area already contains the delimiter, this asynchronous
+ * operation completes immediately. The program must ensure that the stream
+ * performs no other read operations (such as async_read, async_read_until, the
+ * stream's async_read_some function, or any other composed operations that
+ * perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read. Ownership of
+ * the streambuf is retained by the caller, which must guarantee that it remains
+ * valid until the handler is called.
+ *
+ * @param delim The delimiter string.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the streambuf's get
+ * // area up to and including the delimiter.
+ * // 0 if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note After a successful async_read_until operation, the streambuf may
+ * contain additional data beyond the delimiter. An application will typically
+ * leave that data in the streambuf for a subsequent async_read_until operation
+ * to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a streambuf until a newline is encountered:
+ * @code boost::asio::streambuf b;
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::istream is(&b);
+ * std::string line;
+ * std::getline(is, line);
+ * ...
+ * }
+ * }
+ * ...
+ * boost::asio::async_read_until(s, b, "\r\n", handler); @endcode
+ * After the @c async_read_until operation completes successfully, the buffer
+ * @c b contains the delimiter:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c std::getline then extracts the data up to and including the
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r' } @endcode
+ * The remaining data is left in the buffer @c b as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ */
+template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ BOOST_ASIO_STRING_VIEW_PARAM delim,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+#if defined(BOOST_ASIO_HAS_BOOST_REGEX) \
+ || defined(GENERATING_DOCUMENTATION)
+
+/// Start an asynchronous operation to read data into a streambuf until some
+/// part of its data matches a regular expression.
+/**
+ * This function is used to asynchronously read data into the specified
+ * streambuf until the streambuf's get area contains some data that matches a
+ * regular expression. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li A substring of the streambuf's get area matches the regular expression.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the streambuf's get area already contains data that matches the regular
+ * expression, this asynchronous operation completes immediately. The program
+ * must ensure that the stream performs no other read operations (such as
+ * async_read, async_read_until, the stream's async_read_some function, or any
+ * other composed operations that perform reads) until this operation
+ * completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read. Ownership of
+ * the streambuf is retained by the caller, which must guarantee that it remains
+ * valid until the handler is called.
+ *
+ * @param expr The regular expression.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the streambuf's get
+ * // area up to and including the substring
+ * // that matches the regular. expression.
+ * // 0 if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note After a successful async_read_until operation, the streambuf may
+ * contain additional data beyond that which matched the regular expression. An
+ * application will typically leave that data in the streambuf for a subsequent
+ * async_read_until operation to examine.
+ *
+ * @par Example
+ * To asynchronously read data into a streambuf until a CR-LF sequence is
+ * encountered:
+ * @code boost::asio::streambuf b;
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size)
+ * {
+ * if (!e)
+ * {
+ * std::istream is(&b);
+ * std::string line;
+ * std::getline(is, line);
+ * ...
+ * }
+ * }
+ * ...
+ * boost::asio::async_read_until(s, b, boost::regex("\r\n"), handler); @endcode
+ * After the @c async_read_until operation completes successfully, the buffer
+ * @c b contains the data which matched the regular expression:
+ * @code { 'a', 'b', ..., 'c', '\r', '\n', 'd', 'e', ... } @endcode
+ * The call to @c std::getline then extracts the data up to and including the
+ * newline (which is discarded), so that the string @c line contains:
+ * @code { 'a', 'b', ..., 'c', '\r' } @endcode
+ * The remaining data is left in the buffer @c b as follows:
+ * @code { 'd', 'e', ... } @endcode
+ * This data may be the start of a new line, to be extracted by a subsequent
+ * @c async_read_until operation.
+ */
+template <typename AsyncReadStream, typename Allocator, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b, const boost::regex& expr,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler);
+
+#endif // defined(BOOST_ASIO_HAS_BOOST_REGEX)
+ // || defined(GENERATING_DOCUMENTATION)
+
+/// Start an asynchronous operation to read data into a streambuf until a
+/// function object indicates a match.
+/**
+ * This function is used to asynchronously read data into the specified
+ * streambuf until a user-defined match condition function object, when applied
+ * to the data contained in the streambuf, indicates a successful match. The
+ * function call always returns immediately. The asynchronous operation will
+ * continue until one of the following conditions is true:
+ *
+ * @li The match condition function object returns a std::pair where the second
+ * element evaluates to true.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_read_some function, and is known as a <em>composed operation</em>. If
+ * the match condition function object already indicates a match, this
+ * asynchronous operation completes immediately. The program must ensure that
+ * the stream performs no other read operations (such as async_read,
+ * async_read_until, the stream's async_read_some function, or any other
+ * composed operations that perform reads) until this operation completes.
+ *
+ * @param s The stream from which the data is to be read. The type must support
+ * the AsyncReadStream concept.
+ *
+ * @param b A streambuf object into which the data will be read.
+ *
+ * @param match_condition The function object to be called to determine whether
+ * a match exists. The signature of the function object must be:
+ * @code pair<iterator, bool> match_condition(iterator begin, iterator end);
+ * @endcode
+ * where @c iterator represents the type:
+ * @code buffers_iterator<basic_streambuf<Allocator>::const_buffers_type>
+ * @endcode
+ * The iterator parameters @c begin and @c end define the range of bytes to be
+ * scanned to determine whether there is a match. The @c first member of the
+ * return value is an iterator marking one-past-the-end of the bytes that have
+ * been consumed by the match function. This iterator is used to calculate the
+ * @c begin parameter for any subsequent invocation of the match condition. The
+ * @c second member of the return value is true if a match has been found, false
+ * otherwise.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // The number of bytes in the streambuf's get
+ * // area that have been fully consumed by the
+ * // match function. O if an error occurred.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @note After a successful async_read_until operation, the streambuf may
+ * contain additional data beyond that which matched the function object. An
+ * application will typically leave that data in the streambuf for a subsequent
+ * async_read_until operation to examine.
+ *
+ * @note The default implementation of the @c is_match_condition type trait
+ * evaluates to true for function pointers and function objects with a
+ * @c result_type typedef. It must be specialised for other user-defined
+ * function objects.
+ *
+ * @par Examples
+ * To asynchronously read data into a streambuf until whitespace is encountered:
+ * @code typedef boost::asio::buffers_iterator<
+ * boost::asio::streambuf::const_buffers_type> iterator;
+ *
+ * std::pair<iterator, bool>
+ * match_whitespace(iterator begin, iterator end)
+ * {
+ * iterator i = begin;
+ * while (i != end)
+ * if (std::isspace(*i++))
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size);
+ * ...
+ * boost::asio::streambuf b;
+ * boost::asio::async_read_until(s, b, match_whitespace, handler);
+ * @endcode
+ *
+ * To asynchronously read data into a streambuf until a matching character is
+ * found:
+ * @code class match_char
+ * {
+ * public:
+ * explicit match_char(char c) : c_(c) {}
+ *
+ * template <typename Iterator>
+ * std::pair<Iterator, bool> operator()(
+ * Iterator begin, Iterator end) const
+ * {
+ * Iterator i = begin;
+ * while (i != end)
+ * if (c_ == *i++)
+ * return std::make_pair(i, true);
+ * return std::make_pair(i, false);
+ * }
+ *
+ * private:
+ * char c_;
+ * };
+ *
+ * namespace asio {
+ * template <> struct is_match_condition<match_char>
+ * : public boost::true_type {};
+ * } // namespace asio
+ * ...
+ * void handler(const boost::system::error_code& e, std::size_t size);
+ * ...
+ * boost::asio::streambuf b;
+ * boost::asio::async_read_until(s, b, match_char('a'), handler);
+ * @endcode
+ */
+template <typename AsyncReadStream, typename Allocator,
+ typename MatchCondition, typename ReadHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+async_read_until(AsyncReadStream& s,
+ boost::asio::basic_streambuf<Allocator>& b,
+ MatchCondition match_condition, BOOST_ASIO_MOVE_ARG(ReadHandler) handler,
+ typename enable_if<is_match_condition<MatchCondition>::value>::type* = 0);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/read_until.hpp>
+
+#endif // BOOST_ASIO_READ_UNTIL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/seq_packet_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/seq_packet_socket_service.hpp
index d6445782b3c..d6445782b3c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/seq_packet_socket_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/seq_packet_socket_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/serial_port.hpp b/src/third_party/boost-1.69.0/boost/asio/serial_port.hpp
index f2185b80379..f2185b80379 100644
--- a/src/third_party/boost-1.68.0/boost/asio/serial_port.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/serial_port.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/serial_port_base.hpp b/src/third_party/boost-1.69.0/boost/asio/serial_port_base.hpp
index 3b8c4951f3e..3b8c4951f3e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/serial_port_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/serial_port_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/serial_port_service.hpp b/src/third_party/boost-1.69.0/boost/asio/serial_port_service.hpp
index 935f92fffa1..935f92fffa1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/serial_port_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/serial_port_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/signal_set.hpp b/src/third_party/boost-1.69.0/boost/asio/signal_set.hpp
index 0ddb996a584..0ddb996a584 100644
--- a/src/third_party/boost-1.68.0/boost/asio/signal_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/signal_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/signal_set_service.hpp b/src/third_party/boost-1.69.0/boost/asio/signal_set_service.hpp
index 743611620d7..743611620d7 100644
--- a/src/third_party/boost-1.68.0/boost/asio/signal_set_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/signal_set_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/socket_acceptor_service.hpp b/src/third_party/boost-1.69.0/boost/asio/socket_acceptor_service.hpp
index ed5c084401f..ed5c084401f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/socket_acceptor_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/socket_acceptor_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/socket_base.hpp b/src/third_party/boost-1.69.0/boost/asio/socket_base.hpp
index ee8aa6b2621..ee8aa6b2621 100644
--- a/src/third_party/boost-1.68.0/boost/asio/socket_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/socket_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/spawn.hpp b/src/third_party/boost-1.69.0/boost/asio/spawn.hpp
index b39cb901439..b39cb901439 100644
--- a/src/third_party/boost-1.68.0/boost/asio/spawn.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/spawn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl.hpp
index 35138880aea..35138880aea 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/context.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/context.hpp
index 3d0cbfbfbc1..3d0cbfbfbc1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/context.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/context_base.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/context_base.hpp
new file mode 100644
index 00000000000..625ccc7b5b3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/context_base.hpp
@@ -0,0 +1,211 @@
+//
+// ssl/context_base.hpp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_SSL_CONTEXT_BASE_HPP
+#define BOOST_ASIO_SSL_CONTEXT_BASE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <boost/asio/ssl/detail/openssl_types.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+/// The context_base class is used as a base for the basic_context class
+/// template so that we have a common place to define various enums.
+class context_base
+{
+public:
+ /// Different methods supported by a context.
+ enum method
+ {
+ /// Generic SSL version 2.
+ sslv2,
+
+ /// SSL version 2 client.
+ sslv2_client,
+
+ /// SSL version 2 server.
+ sslv2_server,
+
+ /// Generic SSL version 3.
+ sslv3,
+
+ /// SSL version 3 client.
+ sslv3_client,
+
+ /// SSL version 3 server.
+ sslv3_server,
+
+ /// Generic TLS version 1.
+ tlsv1,
+
+ /// TLS version 1 client.
+ tlsv1_client,
+
+ /// TLS version 1 server.
+ tlsv1_server,
+
+ /// Generic SSL/TLS.
+ sslv23,
+
+ /// SSL/TLS client.
+ sslv23_client,
+
+ /// SSL/TLS server.
+ sslv23_server,
+
+ /// Generic TLS version 1.1.
+ tlsv11,
+
+ /// TLS version 1.1 client.
+ tlsv11_client,
+
+ /// TLS version 1.1 server.
+ tlsv11_server,
+
+ /// Generic TLS version 1.2.
+ tlsv12,
+
+ /// TLS version 1.2 client.
+ tlsv12_client,
+
+ /// TLS version 1.2 server.
+ tlsv12_server,
+
+ /// Generic TLS version 1.3.
+ tlsv13,
+
+ /// TLS version 1.3 client.
+ tlsv13_client,
+
+ /// TLS version 1.3 server.
+ tlsv13_server,
+
+ /// Generic TLS.
+ tls,
+
+ /// TLS client.
+ tls_client,
+
+ /// TLS server.
+ tls_server
+ };
+
+ /// Bitmask type for SSL options.
+ typedef long options;
+
+#if defined(GENERATING_DOCUMENTATION)
+ /// Implement various bug workarounds.
+ static const long default_workarounds = implementation_defined;
+
+ /// Always create a new key when using tmp_dh parameters.
+ static const long single_dh_use = implementation_defined;
+
+ /// Disable SSL v2.
+ static const long no_sslv2 = implementation_defined;
+
+ /// Disable SSL v3.
+ static const long no_sslv3 = implementation_defined;
+
+ /// Disable TLS v1.
+ static const long no_tlsv1 = implementation_defined;
+
+ /// Disable TLS v1.1.
+ static const long no_tlsv1_1 = implementation_defined;
+
+ /// Disable TLS v1.2.
+ static const long no_tlsv1_2 = implementation_defined;
+
+ /// Disable TLS v1.3.
+ static const long no_tlsv1_3 = implementation_defined;
+
+ /// Disable compression. Compression is disabled by default.
+ static const long no_compression = implementation_defined;
+#else
+ BOOST_ASIO_STATIC_CONSTANT(long, default_workarounds = SSL_OP_ALL);
+ BOOST_ASIO_STATIC_CONSTANT(long, single_dh_use = SSL_OP_SINGLE_DH_USE);
+ BOOST_ASIO_STATIC_CONSTANT(long, no_sslv2 = SSL_OP_NO_SSLv2);
+ BOOST_ASIO_STATIC_CONSTANT(long, no_sslv3 = SSL_OP_NO_SSLv3);
+ BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1 = SSL_OP_NO_TLSv1);
+# if defined(SSL_OP_NO_TLSv1_1)
+ BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_1 = SSL_OP_NO_TLSv1_1);
+# else // defined(SSL_OP_NO_TLSv1_1)
+ BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_1 = 0x10000000L);
+# endif // defined(SSL_OP_NO_TLSv1_1)
+# if defined(SSL_OP_NO_TLSv1_2)
+ BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_2 = SSL_OP_NO_TLSv1_2);
+# else // defined(SSL_OP_NO_TLSv1_2)
+ BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_2 = 0x08000000L);
+# endif // defined(SSL_OP_NO_TLSv1_2)
+# if defined(SSL_OP_NO_TLSv1_3)
+ BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_3 = SSL_OP_NO_TLSv1_3);
+# else // defined(SSL_OP_NO_TLSv1_3)
+ BOOST_ASIO_STATIC_CONSTANT(long, no_tlsv1_3 = 0x20000000L);
+# endif // defined(SSL_OP_NO_TLSv1_3)
+# if defined(SSL_OP_NO_COMPRESSION)
+ BOOST_ASIO_STATIC_CONSTANT(long, no_compression = SSL_OP_NO_COMPRESSION);
+# else // defined(SSL_OP_NO_COMPRESSION)
+ BOOST_ASIO_STATIC_CONSTANT(long, no_compression = 0x20000L);
+# endif // defined(SSL_OP_NO_COMPRESSION)
+#endif
+
+ /// File format types.
+ enum file_format
+ {
+ /// ASN.1 file.
+ asn1,
+
+ /// PEM file.
+ pem
+ };
+
+#if !defined(GENERATING_DOCUMENTATION)
+ // The following types and constants are preserved for backward compatibility.
+ // New programs should use the equivalents of the same names that are defined
+ // in the boost::asio::ssl namespace.
+ typedef int verify_mode;
+ BOOST_ASIO_STATIC_CONSTANT(int, verify_none = SSL_VERIFY_NONE);
+ BOOST_ASIO_STATIC_CONSTANT(int, verify_peer = SSL_VERIFY_PEER);
+ BOOST_ASIO_STATIC_CONSTANT(int,
+ verify_fail_if_no_peer_cert = SSL_VERIFY_FAIL_IF_NO_PEER_CERT);
+ BOOST_ASIO_STATIC_CONSTANT(int, verify_client_once = SSL_VERIFY_CLIENT_ONCE);
+#endif
+
+ /// Purpose of PEM password.
+ enum password_purpose
+ {
+ /// The password is needed for reading/decryption.
+ for_reading,
+
+ /// The password is needed for writing/encryption.
+ for_writing
+ };
+
+protected:
+ /// Protected destructor to prevent deletion through this type.
+ ~context_base()
+ {
+ }
+};
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_CONTEXT_BASE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/buffered_handshake_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/buffered_handshake_op.hpp
index a8963ec5908..a8963ec5908 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/buffered_handshake_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/buffered_handshake_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/engine.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/engine.hpp
index 01717e789ec..01717e789ec 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/engine.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/engine.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/handshake_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/handshake_op.hpp
index edb112eee23..edb112eee23 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/handshake_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/handshake_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/impl/engine.ipp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/engine.ipp
index 9142a5df3a3..9142a5df3a3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/impl/engine.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/engine.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/impl/openssl_init.ipp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/openssl_init.ipp
index 1608138e9de..1608138e9de 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/impl/openssl_init.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/impl/openssl_init.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/io.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/io.hpp
index 604148c795e..604148c795e 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/io.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/openssl_init.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_init.hpp
index 05b1ea4a338..05b1ea4a338 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/openssl_init.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_init.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/openssl_types.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_types.hpp
index c955ac60131..c955ac60131 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/openssl_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/openssl_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/password_callback.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/password_callback.hpp
index 2a442f34d2f..2a442f34d2f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/password_callback.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/password_callback.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/read_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/read_op.hpp
index 31929c9474a..31929c9474a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/read_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/read_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/shutdown_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/shutdown_op.hpp
index e98430621ea..e98430621ea 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/shutdown_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/shutdown_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/stream_core.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/stream_core.hpp
index fc0a6ffffc0..fc0a6ffffc0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/stream_core.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/stream_core.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/verify_callback.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/verify_callback.hpp
index 1e96b2554b3..1e96b2554b3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/verify_callback.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/verify_callback.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/write_op.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/write_op.hpp
index 17ab95d67e1..17ab95d67e1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/detail/write_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/detail/write_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/error.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/error.hpp
index 4a68d717034..4a68d717034 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/error.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/context.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.hpp
index 8f016830f94..8f016830f94 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.ipp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.ipp
new file mode 100644
index 00000000000..b331dea45d2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/context.ipp
@@ -0,0 +1,1206 @@
+//
+// ssl/impl/context.ipp
+// ~~~~~~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2005 Voipster / Indrek dot Juhani at voipster dot com
+// Copyright (c) 2005-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_SSL_IMPL_CONTEXT_IPP
+#define BOOST_ASIO_SSL_IMPL_CONTEXT_IPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#include <cstring>
+#include <boost/asio/detail/throw_error.hpp>
+#include <boost/asio/error.hpp>
+#include <boost/asio/ssl/context.hpp>
+#include <boost/asio/ssl/error.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+struct context::bio_cleanup
+{
+ BIO* p;
+ ~bio_cleanup() { if (p) ::BIO_free(p); }
+};
+
+struct context::x509_cleanup
+{
+ X509* p;
+ ~x509_cleanup() { if (p) ::X509_free(p); }
+};
+
+struct context::evp_pkey_cleanup
+{
+ EVP_PKEY* p;
+ ~evp_pkey_cleanup() { if (p) ::EVP_PKEY_free(p); }
+};
+
+struct context::rsa_cleanup
+{
+ RSA* p;
+ ~rsa_cleanup() { if (p) ::RSA_free(p); }
+};
+
+struct context::dh_cleanup
+{
+ DH* p;
+ ~dh_cleanup() { if (p) ::DH_free(p); }
+};
+
+context::context(context::method m)
+ : handle_(0)
+{
+ ::ERR_clear_error();
+
+ switch (m)
+ {
+ // SSL v2.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
+ case context::sslv2:
+ case context::sslv2_client:
+ case context::sslv2_server:
+ boost::asio::detail::throw_error(
+ boost::asio::error::invalid_argument, "context");
+ break;
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
+ case context::sslv2:
+ handle_ = ::SSL_CTX_new(::SSLv2_method());
+ break;
+ case context::sslv2_client:
+ handle_ = ::SSL_CTX_new(::SSLv2_client_method());
+ break;
+ case context::sslv2_server:
+ handle_ = ::SSL_CTX_new(::SSLv2_server_method());
+ break;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L) || defined(OPENSSL_NO_SSL2)
+
+ // SSL v3.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::sslv3:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
+ }
+ break;
+ case context::sslv3_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
+ }
+ break;
+ case context::sslv3_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, SSL3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, SSL3_VERSION);
+ }
+ break;
+#elif defined(OPENSSL_NO_SSL3)
+ case context::sslv3:
+ case context::sslv3_client:
+ case context::sslv3_server:
+ boost::asio::detail::throw_error(
+ boost::asio::error::invalid_argument, "context");
+ break;
+#else // defined(OPENSSL_NO_SSL3)
+ case context::sslv3:
+ handle_ = ::SSL_CTX_new(::SSLv3_method());
+ break;
+ case context::sslv3_client:
+ handle_ = ::SSL_CTX_new(::SSLv3_client_method());
+ break;
+ case context::sslv3_server:
+ handle_ = ::SSL_CTX_new(::SSLv3_server_method());
+ break;
+#endif // defined(OPENSSL_NO_SSL3)
+
+ // TLS v1.0.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv1:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
+ }
+ break;
+ case context::tlsv1_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
+ }
+ break;
+ case context::tlsv1_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_VERSION);
+ }
+ break;
+#elif defined(SSL_TXT_TLSV1)
+ case context::tlsv1:
+ handle_ = ::SSL_CTX_new(::TLSv1_method());
+ break;
+ case context::tlsv1_client:
+ handle_ = ::SSL_CTX_new(::TLSv1_client_method());
+ break;
+ case context::tlsv1_server:
+ handle_ = ::SSL_CTX_new(::TLSv1_server_method());
+ break;
+#else // defined(SSL_TXT_TLSV1)
+ case context::tlsv1:
+ case context::tlsv1_client:
+ case context::tlsv1_server:
+ boost::asio::detail::throw_error(
+ boost::asio::error::invalid_argument, "context");
+ break;
+#endif // defined(SSL_TXT_TLSV1)
+
+ // TLS v1.1.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv11:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
+ }
+ break;
+ case context::tlsv11_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
+ }
+ break;
+ case context::tlsv11_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_1_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_1_VERSION);
+ }
+ break;
+#elif defined(SSL_TXT_TLSV1_1)
+ case context::tlsv11:
+ handle_ = ::SSL_CTX_new(::TLSv1_1_method());
+ break;
+ case context::tlsv11_client:
+ handle_ = ::SSL_CTX_new(::TLSv1_1_client_method());
+ break;
+ case context::tlsv11_server:
+ handle_ = ::SSL_CTX_new(::TLSv1_1_server_method());
+ break;
+#else // defined(SSL_TXT_TLSV1_1)
+ case context::tlsv11:
+ case context::tlsv11_client:
+ case context::tlsv11_server:
+ boost::asio::detail::throw_error(
+ boost::asio::error::invalid_argument, "context");
+ break;
+#endif // defined(SSL_TXT_TLSV1_1)
+
+ // TLS v1.2.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv12:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
+ }
+ break;
+ case context::tlsv12_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
+ }
+ break;
+ case context::tlsv12_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_2_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_2_VERSION);
+ }
+ break;
+#elif defined(SSL_TXT_TLSV1_2)
+ case context::tlsv12:
+ handle_ = ::SSL_CTX_new(::TLSv1_2_method());
+ break;
+ case context::tlsv12_client:
+ handle_ = ::SSL_CTX_new(::TLSv1_2_client_method());
+ break;
+ case context::tlsv12_server:
+ handle_ = ::SSL_CTX_new(::TLSv1_2_server_method());
+ break;
+#else // defined(SSL_TXT_TLSV1_2)
+ case context::tlsv12:
+ case context::tlsv12_client:
+ case context::tlsv12_server:
+ boost::asio::detail::throw_error(
+ boost::asio::error::invalid_argument, "context");
+ break;
+#endif // defined(SSL_TXT_TLSV1_2)
+
+ // TLS v1.3.
+#if (OPENSSL_VERSION_NUMBER >= 0x10101000L) \
+ && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv13:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_3_VERSION);
+ }
+ break;
+ case context::tlsv13_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_3_VERSION);
+ }
+ break;
+ case context::tlsv13_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ {
+ SSL_CTX_set_min_proto_version(handle_, TLS1_3_VERSION);
+ SSL_CTX_set_max_proto_version(handle_, TLS1_3_VERSION);
+ }
+ break;
+#else // (OPENSSL_VERSION_NUMBER >= 0x10101000L)
+ // && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tlsv13:
+ case context::tlsv13_client:
+ case context::tlsv13_server:
+ boost::asio::detail::throw_error(
+ boost::asio::error::invalid_argument, "context");
+ break;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10101000L)
+ // && !defined(LIBRESSL_VERSION_NUMBER)
+
+ // Any supported SSL/TLS version.
+ case context::sslv23:
+ handle_ = ::SSL_CTX_new(::SSLv23_method());
+ break;
+ case context::sslv23_client:
+ handle_ = ::SSL_CTX_new(::SSLv23_client_method());
+ break;
+ case context::sslv23_server:
+ handle_ = ::SSL_CTX_new(::SSLv23_server_method());
+ break;
+
+ // Any supported TLS version.
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ case context::tls:
+ handle_ = ::SSL_CTX_new(::TLS_method());
+ if (handle_)
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ break;
+ case context::tls_client:
+ handle_ = ::SSL_CTX_new(::TLS_client_method());
+ if (handle_)
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ break;
+ case context::tls_server:
+ handle_ = ::SSL_CTX_new(::TLS_server_method());
+ if (handle_)
+ SSL_CTX_set_min_proto_version(handle_, TLS1_VERSION);
+ break;
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ case context::tls:
+ handle_ = ::SSL_CTX_new(::SSLv23_method());
+ if (handle_)
+ SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
+ break;
+ case context::tls_client:
+ handle_ = ::SSL_CTX_new(::SSLv23_client_method());
+ if (handle_)
+ SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
+ break;
+ case context::tls_server:
+ handle_ = ::SSL_CTX_new(::SSLv23_server_method());
+ if (handle_)
+ SSL_CTX_set_options(handle_, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
+ break;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
+ default:
+ handle_ = ::SSL_CTX_new(0);
+ break;
+ }
+
+ if (handle_ == 0)
+ {
+ boost::system::error_code ec(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ boost::asio::detail::throw_error(ec, "context");
+ }
+
+ set_options(no_compression);
+}
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+context::context(context&& other)
+{
+ handle_ = other.handle_;
+ other.handle_ = 0;
+}
+
+context& context::operator=(context&& other)
+{
+ context tmp(BOOST_ASIO_MOVE_CAST(context)(*this));
+ handle_ = other.handle_;
+ other.handle_ = 0;
+ return *this;
+}
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+context::~context()
+{
+ if (handle_)
+ {
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ if (cb_userdata)
+ {
+ detail::password_callback_base* callback =
+ static_cast<detail::password_callback_base*>(
+ cb_userdata);
+ delete callback;
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ ::SSL_CTX_set_default_passwd_cb_userdata(handle_, 0);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ handle_->default_passwd_callback_userdata = 0;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ }
+
+ if (SSL_CTX_get_app_data(handle_))
+ {
+ detail::verify_callback_base* callback =
+ static_cast<detail::verify_callback_base*>(
+ SSL_CTX_get_app_data(handle_));
+ delete callback;
+ SSL_CTX_set_app_data(handle_, 0);
+ }
+
+ ::SSL_CTX_free(handle_);
+ }
+}
+
+context::native_handle_type context::native_handle()
+{
+ return handle_;
+}
+
+void context::clear_options(context::options o)
+{
+ boost::system::error_code ec;
+ clear_options(o, ec);
+ boost::asio::detail::throw_error(ec, "clear_options");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::clear_options(
+ context::options o, boost::system::error_code& ec)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x009080DFL) \
+ && (OPENSSL_VERSION_NUMBER != 0x00909000L)
+# if !defined(SSL_OP_NO_COMPRESSION)
+ if ((o & context::no_compression) != 0)
+ {
+# if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ handle_->comp_methods = SSL_COMP_get_compression_methods();
+# endif // (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ o ^= context::no_compression;
+ }
+# endif // !defined(SSL_OP_NO_COMPRESSION)
+
+ ::SSL_CTX_clear_options(handle_, o);
+
+ ec = boost::system::error_code();
+#else // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
+ // && (OPENSSL_VERSION_NUMBER != 0x00909000L)
+ (void)o;
+ ec = boost::asio::error::operation_not_supported;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x009080DFL)
+ // && (OPENSSL_VERSION_NUMBER != 0x00909000L)
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::set_options(context::options o)
+{
+ boost::system::error_code ec;
+ set_options(o, ec);
+ boost::asio::detail::throw_error(ec, "set_options");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::set_options(
+ context::options o, boost::system::error_code& ec)
+{
+#if !defined(SSL_OP_NO_COMPRESSION)
+ if ((o & context::no_compression) != 0)
+ {
+#if (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ handle_->comp_methods =
+ boost::asio::ssl::detail::openssl_init<>::get_null_compression_methods();
+#endif // (OPENSSL_VERSION_NUMBER >= 0x00908000L)
+ o ^= context::no_compression;
+ }
+#endif // !defined(SSL_OP_NO_COMPRESSION)
+
+ ::SSL_CTX_set_options(handle_, o);
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::set_verify_mode(verify_mode v)
+{
+ boost::system::error_code ec;
+ set_verify_mode(v, ec);
+ boost::asio::detail::throw_error(ec, "set_verify_mode");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::set_verify_mode(
+ verify_mode v, boost::system::error_code& ec)
+{
+ ::SSL_CTX_set_verify(handle_, v, ::SSL_CTX_get_verify_callback(handle_));
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::set_verify_depth(int depth)
+{
+ boost::system::error_code ec;
+ set_verify_depth(depth, ec);
+ boost::asio::detail::throw_error(ec, "set_verify_depth");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::set_verify_depth(
+ int depth, boost::system::error_code& ec)
+{
+ ::SSL_CTX_set_verify_depth(handle_, depth);
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::load_verify_file(const std::string& filename)
+{
+ boost::system::error_code ec;
+ load_verify_file(filename, ec);
+ boost::asio::detail::throw_error(ec, "load_verify_file");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::load_verify_file(
+ const std::string& filename, boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ if (::SSL_CTX_load_verify_locations(handle_, filename.c_str(), 0) != 1)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::add_certificate_authority(const const_buffer& ca)
+{
+ boost::system::error_code ec;
+ add_certificate_authority(ca, ec);
+ boost::asio::detail::throw_error(ec, "add_certificate_authority");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::add_certificate_authority(
+ const const_buffer& ca, boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ bio_cleanup bio = { make_buffer_bio(ca) };
+ if (bio.p)
+ {
+ if (X509_STORE* store = ::SSL_CTX_get_cert_store(handle_))
+ {
+ for (;;)
+ {
+ x509_cleanup cert = { ::PEM_read_bio_X509(bio.p, 0, 0, 0) };
+ if (!cert.p)
+ break;
+
+ if (::X509_STORE_add_cert(store, cert.p) != 1)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+ }
+ }
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::set_default_verify_paths()
+{
+ boost::system::error_code ec;
+ set_default_verify_paths(ec);
+ boost::asio::detail::throw_error(ec, "set_default_verify_paths");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::set_default_verify_paths(
+ boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ if (::SSL_CTX_set_default_verify_paths(handle_) != 1)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::add_verify_path(const std::string& path)
+{
+ boost::system::error_code ec;
+ add_verify_path(path, ec);
+ boost::asio::detail::throw_error(ec, "add_verify_path");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::add_verify_path(
+ const std::string& path, boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ if (::SSL_CTX_load_verify_locations(handle_, 0, path.c_str()) != 1)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_certificate(
+ const const_buffer& certificate, file_format format)
+{
+ boost::system::error_code ec;
+ use_certificate(certificate, format, ec);
+ boost::asio::detail::throw_error(ec, "use_certificate");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_certificate(
+ const const_buffer& certificate, file_format format,
+ boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ if (format == context_base::asn1)
+ {
+ if (::SSL_CTX_use_certificate_ASN1(handle_,
+ static_cast<int>(certificate.size()),
+ static_cast<const unsigned char*>(certificate.data())) == 1)
+ {
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+ else if (format == context_base::pem)
+ {
+ bio_cleanup bio = { make_buffer_bio(certificate) };
+ if (bio.p)
+ {
+ x509_cleanup cert = { ::PEM_read_bio_X509(bio.p, 0, 0, 0) };
+ if (cert.p)
+ {
+ if (::SSL_CTX_use_certificate(handle_, cert.p) == 1)
+ {
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+ }
+ }
+ else
+ {
+ ec = boost::asio::error::invalid_argument;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_certificate_file(
+ const std::string& filename, file_format format)
+{
+ boost::system::error_code ec;
+ use_certificate_file(filename, format, ec);
+ boost::asio::detail::throw_error(ec, "use_certificate_file");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_certificate_file(
+ const std::string& filename, file_format format,
+ boost::system::error_code& ec)
+{
+ int file_type;
+ switch (format)
+ {
+ case context_base::asn1:
+ file_type = SSL_FILETYPE_ASN1;
+ break;
+ case context_base::pem:
+ file_type = SSL_FILETYPE_PEM;
+ break;
+ default:
+ {
+ ec = boost::asio::error::invalid_argument;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ ::ERR_clear_error();
+
+ if (::SSL_CTX_use_certificate_file(handle_, filename.c_str(), file_type) != 1)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_certificate_chain(const const_buffer& chain)
+{
+ boost::system::error_code ec;
+ use_certificate_chain(chain, ec);
+ boost::asio::detail::throw_error(ec, "use_certificate_chain");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain(
+ const const_buffer& chain, boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ bio_cleanup bio = { make_buffer_bio(chain) };
+ if (bio.p)
+ {
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = handle_->default_passwd_callback;
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ x509_cleanup cert = {
+ ::PEM_read_bio_X509_AUX(bio.p, 0,
+ callback,
+ cb_userdata) };
+ if (!cert.p)
+ {
+ ec = boost::system::error_code(ERR_R_PEM_LIB,
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ int result = ::SSL_CTX_use_certificate(handle_, cert.p);
+ if (result == 0 || ::ERR_peek_error() != 0)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ ::SSL_CTX_clear_chain_certs(handle_);
+#else
+ if (handle_->extra_certs)
+ {
+ ::sk_X509_pop_free(handle_->extra_certs, X509_free);
+ handle_->extra_certs = 0;
+ }
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L)
+
+ while (X509* cacert = ::PEM_read_bio_X509(bio.p, 0,
+ callback,
+ cb_userdata))
+ {
+ if (!::SSL_CTX_add_extra_chain_cert(handle_, cacert))
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ result = ::ERR_peek_last_error();
+ if ((ERR_GET_LIB(result) == ERR_LIB_PEM)
+ && (ERR_GET_REASON(result) == PEM_R_NO_START_LINE))
+ {
+ ::ERR_clear_error();
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_certificate_chain_file(const std::string& filename)
+{
+ boost::system::error_code ec;
+ use_certificate_chain_file(filename, ec);
+ boost::asio::detail::throw_error(ec, "use_certificate_chain_file");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_certificate_chain_file(
+ const std::string& filename, boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ if (::SSL_CTX_use_certificate_chain_file(handle_, filename.c_str()) != 1)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_private_key(
+ const const_buffer& private_key, context::file_format format)
+{
+ boost::system::error_code ec;
+ use_private_key(private_key, format, ec);
+ boost::asio::detail::throw_error(ec, "use_private_key");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_private_key(
+ const const_buffer& private_key, context::file_format format,
+ boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = handle_->default_passwd_callback;
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
+ bio_cleanup bio = { make_buffer_bio(private_key) };
+ if (bio.p)
+ {
+ evp_pkey_cleanup evp_private_key = { 0 };
+ switch (format)
+ {
+ case context_base::asn1:
+ evp_private_key.p = ::d2i_PrivateKey_bio(bio.p, 0);
+ break;
+ case context_base::pem:
+ evp_private_key.p = ::PEM_read_bio_PrivateKey(
+ bio.p, 0, callback,
+ cb_userdata);
+ break;
+ default:
+ {
+ ec = boost::asio::error::invalid_argument;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ if (evp_private_key.p)
+ {
+ if (::SSL_CTX_use_PrivateKey(handle_, evp_private_key.p) == 1)
+ {
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+ }
+
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_private_key_file(
+ const std::string& filename, context::file_format format)
+{
+ boost::system::error_code ec;
+ use_private_key_file(filename, format, ec);
+ boost::asio::detail::throw_error(ec, "use_private_key_file");
+}
+
+void context::use_rsa_private_key(
+ const const_buffer& private_key, context::file_format format)
+{
+ boost::system::error_code ec;
+ use_rsa_private_key(private_key, format, ec);
+ boost::asio::detail::throw_error(ec, "use_rsa_private_key");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_rsa_private_key(
+ const const_buffer& private_key, context::file_format format,
+ boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ pem_password_cb* callback = ::SSL_CTX_get_default_passwd_cb(handle_);
+ void* cb_userdata = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ pem_password_cb* callback = handle_->default_passwd_callback;
+ void* cb_userdata = handle_->default_passwd_callback_userdata;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
+ bio_cleanup bio = { make_buffer_bio(private_key) };
+ if (bio.p)
+ {
+ rsa_cleanup rsa_private_key = { 0 };
+ switch (format)
+ {
+ case context_base::asn1:
+ rsa_private_key.p = ::d2i_RSAPrivateKey_bio(bio.p, 0);
+ break;
+ case context_base::pem:
+ rsa_private_key.p = ::PEM_read_bio_RSAPrivateKey(
+ bio.p, 0, callback,
+ cb_userdata);
+ break;
+ default:
+ {
+ ec = boost::asio::error::invalid_argument;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ if (rsa_private_key.p)
+ {
+ if (::SSL_CTX_use_RSAPrivateKey(handle_, rsa_private_key.p) == 1)
+ {
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+ }
+
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_private_key_file(
+ const std::string& filename, context::file_format format,
+ boost::system::error_code& ec)
+{
+ int file_type;
+ switch (format)
+ {
+ case context_base::asn1:
+ file_type = SSL_FILETYPE_ASN1;
+ break;
+ case context_base::pem:
+ file_type = SSL_FILETYPE_PEM;
+ break;
+ default:
+ {
+ ec = boost::asio::error::invalid_argument;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ ::ERR_clear_error();
+
+ if (::SSL_CTX_use_PrivateKey_file(handle_, filename.c_str(), file_type) != 1)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_rsa_private_key_file(
+ const std::string& filename, context::file_format format)
+{
+ boost::system::error_code ec;
+ use_rsa_private_key_file(filename, format, ec);
+ boost::asio::detail::throw_error(ec, "use_rsa_private_key_file");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_rsa_private_key_file(
+ const std::string& filename, context::file_format format,
+ boost::system::error_code& ec)
+{
+ int file_type;
+ switch (format)
+ {
+ case context_base::asn1:
+ file_type = SSL_FILETYPE_ASN1;
+ break;
+ case context_base::pem:
+ file_type = SSL_FILETYPE_PEM;
+ break;
+ default:
+ {
+ ec = boost::asio::error::invalid_argument;
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ ::ERR_clear_error();
+
+ if (::SSL_CTX_use_RSAPrivateKey_file(
+ handle_, filename.c_str(), file_type) != 1)
+ {
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_tmp_dh(const const_buffer& dh)
+{
+ boost::system::error_code ec;
+ use_tmp_dh(dh, ec);
+ boost::asio::detail::throw_error(ec, "use_tmp_dh");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_tmp_dh(
+ const const_buffer& dh, boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ bio_cleanup bio = { make_buffer_bio(dh) };
+ if (bio.p)
+ {
+ return do_use_tmp_dh(bio.p, ec);
+ }
+
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+void context::use_tmp_dh_file(const std::string& filename)
+{
+ boost::system::error_code ec;
+ use_tmp_dh_file(filename, ec);
+ boost::asio::detail::throw_error(ec, "use_tmp_dh_file");
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::use_tmp_dh_file(
+ const std::string& filename, boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ bio_cleanup bio = { ::BIO_new_file(filename.c_str(), "r") };
+ if (bio.p)
+ {
+ return do_use_tmp_dh(bio.p, ec);
+ }
+
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::do_use_tmp_dh(
+ BIO* bio, boost::system::error_code& ec)
+{
+ ::ERR_clear_error();
+
+ dh_cleanup dh = { ::PEM_read_bio_DHparams(bio, 0, 0, 0) };
+ if (dh.p)
+ {
+ if (::SSL_CTX_set_tmp_dh(handle_, dh.p) == 1)
+ {
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+ }
+
+ ec = boost::system::error_code(
+ static_cast<int>(::ERR_get_error()),
+ boost::asio::error::get_ssl_category());
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::do_set_verify_callback(
+ detail::verify_callback_base* callback, boost::system::error_code& ec)
+{
+ if (SSL_CTX_get_app_data(handle_))
+ {
+ delete static_cast<detail::verify_callback_base*>(
+ SSL_CTX_get_app_data(handle_));
+ }
+
+ SSL_CTX_set_app_data(handle_, callback);
+
+ ::SSL_CTX_set_verify(handle_,
+ ::SSL_CTX_get_verify_mode(handle_),
+ &context::verify_callback_function);
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+int context::verify_callback_function(int preverified, X509_STORE_CTX* ctx)
+{
+ if (ctx)
+ {
+ if (SSL* ssl = static_cast<SSL*>(
+ ::X509_STORE_CTX_get_ex_data(
+ ctx, ::SSL_get_ex_data_X509_STORE_CTX_idx())))
+ {
+ if (SSL_CTX* handle = ::SSL_get_SSL_CTX(ssl))
+ {
+ if (SSL_CTX_get_app_data(handle))
+ {
+ detail::verify_callback_base* callback =
+ static_cast<detail::verify_callback_base*>(
+ SSL_CTX_get_app_data(handle));
+
+ verify_context verify_ctx(ctx);
+ return callback->call(preverified != 0, verify_ctx) ? 1 : 0;
+ }
+ }
+ }
+ }
+
+ return 0;
+}
+
+BOOST_ASIO_SYNC_OP_VOID context::do_set_password_callback(
+ detail::password_callback_base* callback, boost::system::error_code& ec)
+{
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
+ void* old_callback = ::SSL_CTX_get_default_passwd_cb_userdata(handle_);
+ ::SSL_CTX_set_default_passwd_cb_userdata(handle_, callback);
+#else // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+ void* old_callback = handle_->default_passwd_callback_userdata;
+ handle_->default_passwd_callback_userdata = callback;
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L)
+
+ if (old_callback)
+ delete static_cast<detail::password_callback_base*>(
+ old_callback);
+
+ SSL_CTX_set_default_passwd_cb(handle_, &context::password_callback_function);
+
+ ec = boost::system::error_code();
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+}
+
+int context::password_callback_function(
+ char* buf, int size, int purpose, void* data)
+{
+ using namespace std; // For strncat and strlen.
+
+ if (data)
+ {
+ detail::password_callback_base* callback =
+ static_cast<detail::password_callback_base*>(data);
+
+ std::string passwd = callback->call(static_cast<std::size_t>(size),
+ purpose ? context_base::for_writing : context_base::for_reading);
+
+#if defined(BOOST_ASIO_HAS_SECURE_RTL)
+ strcpy_s(buf, size, passwd.c_str());
+#else // defined(BOOST_ASIO_HAS_SECURE_RTL)
+ *buf = '\0';
+ if (size > 0)
+ strncat(buf, passwd.c_str(), size - 1);
+#endif // defined(BOOST_ASIO_HAS_SECURE_RTL)
+
+ return static_cast<int>(strlen(buf));
+ }
+
+ return 0;
+}
+
+BIO* context::make_buffer_bio(const const_buffer& b)
+{
+ return ::BIO_new_mem_buf(
+ const_cast<void*>(b.data()),
+ static_cast<int>(b.size()));
+}
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_IMPL_CONTEXT_IPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/error.ipp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/error.ipp
index a3596197650..a3596197650 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/error.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/error.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/rfc2818_verification.ipp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/rfc2818_verification.ipp
index 63ce663bdcc..63ce663bdcc 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/rfc2818_verification.ipp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/rfc2818_verification.ipp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/src.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/src.hpp
index 2e8859ea2bc..2e8859ea2bc 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/impl/src.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/impl/src.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/rfc2818_verification.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/rfc2818_verification.hpp
index 047688b0077..047688b0077 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/rfc2818_verification.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/rfc2818_verification.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/ssl/stream.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/stream.hpp
new file mode 100644
index 00000000000..1acaceea457
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/stream.hpp
@@ -0,0 +1,764 @@
+//
+// ssl/stream.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_SSL_STREAM_HPP
+#define BOOST_ASIO_SSL_STREAM_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/buffer_sequence_adapter.hpp>
+#include <boost/asio/detail/handler_type_requirements.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/type_traits.hpp>
+#include <boost/asio/ssl/context.hpp>
+#include <boost/asio/ssl/detail/buffered_handshake_op.hpp>
+#include <boost/asio/ssl/detail/handshake_op.hpp>
+#include <boost/asio/ssl/detail/io.hpp>
+#include <boost/asio/ssl/detail/read_op.hpp>
+#include <boost/asio/ssl/detail/shutdown_op.hpp>
+#include <boost/asio/ssl/detail/stream_core.hpp>
+#include <boost/asio/ssl/detail/write_op.hpp>
+#include <boost/asio/ssl/stream_base.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace ssl {
+
+/// Provides stream-oriented functionality using SSL.
+/**
+ * The stream class template provides asynchronous and blocking stream-oriented
+ * functionality using SSL.
+ *
+ * @par Thread Safety
+ * @e Distinct @e objects: Safe.@n
+ * @e Shared @e objects: Unsafe. The application must also ensure that all
+ * asynchronous operations are performed within the same implicit or explicit
+ * strand.
+ *
+ * @par Example
+ * To use the SSL stream template with an ip::tcp::socket, you would write:
+ * @code
+ * boost::asio::io_context io_context;
+ * boost::asio::ssl::context ctx(boost::asio::ssl::context::sslv23);
+ * boost::asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
+ * @endcode
+ *
+ * @par Concepts:
+ * AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
+ */
+template <typename Stream>
+class stream :
+ public stream_base,
+ private noncopyable
+{
+public:
+ /// The native handle type of the SSL stream.
+ typedef SSL* native_handle_type;
+
+ /// Structure for use with deprecated impl_type.
+ struct impl_struct
+ {
+ SSL* ssl;
+ };
+
+ /// The type of the next layer.
+ typedef typename remove_reference<Stream>::type next_layer_type;
+
+ /// The type of the lowest layer.
+ typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
+
+ /// The type of the executor associated with the object.
+ typedef typename lowest_layer_type::executor_type executor_type;
+
+#if defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ /// Construct a stream.
+ /**
+ * This constructor creates a stream and initialises the underlying stream
+ * object.
+ *
+ * @param arg The argument to be passed to initialise the underlying stream.
+ *
+ * @param ctx The SSL context to be used for the stream.
+ */
+ template <typename Arg>
+ stream(Arg&& arg, context& ctx)
+ : next_layer_(BOOST_ASIO_MOVE_CAST(Arg)(arg)),
+ core_(ctx.native_handle(),
+ next_layer_.lowest_layer().get_executor().context())
+ {
+ }
+#else // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+ template <typename Arg>
+ stream(Arg& arg, context& ctx)
+ : next_layer_(arg),
+ core_(ctx.native_handle(),
+ next_layer_.lowest_layer().get_executor().context())
+ {
+ }
+#endif // defined(BOOST_ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION)
+
+ /// Destructor.
+ /**
+ * @note A @c stream object must not be destroyed while there are pending
+ * asynchronous operations associated with it.
+ */
+ ~stream()
+ {
+ }
+
+ /// Get the executor associated with the object.
+ /**
+ * This function may be used to obtain the executor object that the stream
+ * uses to dispatch handlers for asynchronous operations.
+ *
+ * @return A copy of the executor that stream will use to dispatch handlers.
+ */
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT
+ {
+ return next_layer_.lowest_layer().get_executor();
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use get_executor().) Get the io_context associated with the
+ /// object.
+ boost::asio::io_context& get_io_context()
+ {
+ return next_layer_.lowest_layer().get_io_context();
+ }
+
+ /// (Deprecated: Use get_executor().) Get the io_context associated with the
+ /// object.
+ boost::asio::io_context& get_io_service()
+ {
+ return next_layer_.lowest_layer().get_io_service();
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Get the underlying implementation in the native type.
+ /**
+ * This function may be used to obtain the underlying implementation of the
+ * context. This is intended to allow access to context functionality that is
+ * not otherwise provided.
+ *
+ * @par Example
+ * The native_handle() function returns a pointer of type @c SSL* that is
+ * suitable for passing to functions such as @c SSL_get_verify_result and
+ * @c SSL_get_peer_certificate:
+ * @code
+ * boost::asio::ssl::stream<asio:ip::tcp::socket> sock(io_context, ctx);
+ *
+ * // ... establish connection and perform handshake ...
+ *
+ * if (X509* cert = SSL_get_peer_certificate(sock.native_handle()))
+ * {
+ * if (SSL_get_verify_result(sock.native_handle()) == X509_V_OK)
+ * {
+ * // ...
+ * }
+ * }
+ * @endcode
+ */
+ native_handle_type native_handle()
+ {
+ return core_.engine_.native_handle();
+ }
+
+ /// Get a reference to the next layer.
+ /**
+ * This function returns a reference to the next layer in a stack of stream
+ * layers.
+ *
+ * @return A reference to the next layer in the stack of stream layers.
+ * Ownership is not transferred to the caller.
+ */
+ const next_layer_type& next_layer() const
+ {
+ return next_layer_;
+ }
+
+ /// Get a reference to the next layer.
+ /**
+ * This function returns a reference to the next layer in a stack of stream
+ * layers.
+ *
+ * @return A reference to the next layer in the stack of stream layers.
+ * Ownership is not transferred to the caller.
+ */
+ next_layer_type& next_layer()
+ {
+ return next_layer_;
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * stream layers.
+ *
+ * @return A reference to the lowest layer in the stack of stream layers.
+ * Ownership is not transferred to the caller.
+ */
+ lowest_layer_type& lowest_layer()
+ {
+ return next_layer_.lowest_layer();
+ }
+
+ /// Get a reference to the lowest layer.
+ /**
+ * This function returns a reference to the lowest layer in a stack of
+ * stream layers.
+ *
+ * @return A reference to the lowest layer in the stack of stream layers.
+ * Ownership is not transferred to the caller.
+ */
+ const lowest_layer_type& lowest_layer() const
+ {
+ return next_layer_.lowest_layer();
+ }
+
+ /// Set the peer verification mode.
+ /**
+ * This function may be used to configure the peer verification mode used by
+ * the stream. The new mode will override the mode inherited from the context.
+ *
+ * @param v A bitmask of peer verification modes. See @ref verify_mode for
+ * available values.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_set_verify.
+ */
+ void set_verify_mode(verify_mode v)
+ {
+ boost::system::error_code ec;
+ set_verify_mode(v, ec);
+ boost::asio::detail::throw_error(ec, "set_verify_mode");
+ }
+
+ /// Set the peer verification mode.
+ /**
+ * This function may be used to configure the peer verification mode used by
+ * the stream. The new mode will override the mode inherited from the context.
+ *
+ * @param v A bitmask of peer verification modes. See @ref verify_mode for
+ * available values.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_set_verify.
+ */
+ BOOST_ASIO_SYNC_OP_VOID set_verify_mode(
+ verify_mode v, boost::system::error_code& ec)
+ {
+ core_.engine_.set_verify_mode(v, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Set the peer verification depth.
+ /**
+ * This function may be used to configure the maximum verification depth
+ * allowed by the stream.
+ *
+ * @param depth Maximum depth for the certificate chain verification that
+ * shall be allowed.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_set_verify_depth.
+ */
+ void set_verify_depth(int depth)
+ {
+ boost::system::error_code ec;
+ set_verify_depth(depth, ec);
+ boost::asio::detail::throw_error(ec, "set_verify_depth");
+ }
+
+ /// Set the peer verification depth.
+ /**
+ * This function may be used to configure the maximum verification depth
+ * allowed by the stream.
+ *
+ * @param depth Maximum depth for the certificate chain verification that
+ * shall be allowed.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_set_verify_depth.
+ */
+ BOOST_ASIO_SYNC_OP_VOID set_verify_depth(
+ int depth, boost::system::error_code& ec)
+ {
+ core_.engine_.set_verify_depth(depth, ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Set the callback used to verify peer certificates.
+ /**
+ * This function is used to specify a callback function that will be called
+ * by the implementation when it needs to verify a peer certificate.
+ *
+ * @param callback The function object to be used for verifying a certificate.
+ * The function signature of the handler must be:
+ * @code bool verify_callback(
+ * bool preverified, // True if the certificate passed pre-verification.
+ * verify_context& ctx // The peer certificate and other context.
+ * ); @endcode
+ * The return value of the callback is true if the certificate has passed
+ * verification, false otherwise.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note Calls @c SSL_set_verify.
+ */
+ template <typename VerifyCallback>
+ void set_verify_callback(VerifyCallback callback)
+ {
+ boost::system::error_code ec;
+ this->set_verify_callback(callback, ec);
+ boost::asio::detail::throw_error(ec, "set_verify_callback");
+ }
+
+ /// Set the callback used to verify peer certificates.
+ /**
+ * This function is used to specify a callback function that will be called
+ * by the implementation when it needs to verify a peer certificate.
+ *
+ * @param callback The function object to be used for verifying a certificate.
+ * The function signature of the handler must be:
+ * @code bool verify_callback(
+ * bool preverified, // True if the certificate passed pre-verification.
+ * verify_context& ctx // The peer certificate and other context.
+ * ); @endcode
+ * The return value of the callback is true if the certificate has passed
+ * verification, false otherwise.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @note Calls @c SSL_set_verify.
+ */
+ template <typename VerifyCallback>
+ BOOST_ASIO_SYNC_OP_VOID set_verify_callback(VerifyCallback callback,
+ boost::system::error_code& ec)
+ {
+ core_.engine_.set_verify_callback(
+ new detail::verify_callback<VerifyCallback>(callback), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Perform SSL handshaking.
+ /**
+ * This function is used to perform SSL handshaking on the stream. The
+ * function call will block until handshaking is complete or an error occurs.
+ *
+ * @param type The type of handshaking to be performed, i.e. as a client or as
+ * a server.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void handshake(handshake_type type)
+ {
+ boost::system::error_code ec;
+ handshake(type, ec);
+ boost::asio::detail::throw_error(ec, "handshake");
+ }
+
+ /// Perform SSL handshaking.
+ /**
+ * This function is used to perform SSL handshaking on the stream. The
+ * function call will block until handshaking is complete or an error occurs.
+ *
+ * @param type The type of handshaking to be performed, i.e. as a client or as
+ * a server.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID handshake(handshake_type type,
+ boost::system::error_code& ec)
+ {
+ detail::io(next_layer_, core_, detail::handshake_op(type), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Perform SSL handshaking.
+ /**
+ * This function is used to perform SSL handshaking on the stream. The
+ * function call will block until handshaking is complete or an error occurs.
+ *
+ * @param type The type of handshaking to be performed, i.e. as a client or as
+ * a server.
+ *
+ * @param buffers The buffered data to be reused for the handshake.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ template <typename ConstBufferSequence>
+ void handshake(handshake_type type, const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ handshake(type, buffers, ec);
+ boost::asio::detail::throw_error(ec, "handshake");
+ }
+
+ /// Perform SSL handshaking.
+ /**
+ * This function is used to perform SSL handshaking on the stream. The
+ * function call will block until handshaking is complete or an error occurs.
+ *
+ * @param type The type of handshaking to be performed, i.e. as a client or as
+ * a server.
+ *
+ * @param buffers The buffered data to be reused for the handshake.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ template <typename ConstBufferSequence>
+ BOOST_ASIO_SYNC_OP_VOID handshake(handshake_type type,
+ const ConstBufferSequence& buffers, boost::system::error_code& ec)
+ {
+ detail::io(next_layer_, core_,
+ detail::buffered_handshake_op<ConstBufferSequence>(type, buffers), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Start an asynchronous SSL handshake.
+ /**
+ * This function is used to asynchronously perform an SSL handshake on the
+ * stream. This function call always returns immediately.
+ *
+ * @param type The type of handshaking to be performed, i.e. as a client or as
+ * a server.
+ *
+ * @param handler The handler to be called when the handshake operation
+ * completes. Copies will be made of the handler as required. The equivalent
+ * function signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error // Result of operation.
+ * ); @endcode
+ */
+ template <typename HandshakeHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(HandshakeHandler,
+ void (boost::system::error_code))
+ async_handshake(handshake_type type,
+ BOOST_ASIO_MOVE_ARG(HandshakeHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a HandshakeHandler.
+ BOOST_ASIO_HANDSHAKE_HANDLER_CHECK(HandshakeHandler, handler) type_check;
+
+ boost::asio::async_completion<HandshakeHandler,
+ void (boost::system::error_code)> init(handler);
+
+ detail::async_io(next_layer_, core_,
+ detail::handshake_op(type), init.completion_handler);
+
+ return init.result.get();
+ }
+
+ /// Start an asynchronous SSL handshake.
+ /**
+ * This function is used to asynchronously perform an SSL handshake on the
+ * stream. This function call always returns immediately.
+ *
+ * @param type The type of handshaking to be performed, i.e. as a client or as
+ * a server.
+ *
+ * @param buffers The buffered data to be reused for the handshake. Although
+ * the buffers object may be copied as necessary, ownership of the underlying
+ * buffers is retained by the caller, which must guarantee that they remain
+ * valid until the handler is called.
+ *
+ * @param handler The handler to be called when the handshake operation
+ * completes. Copies will be made of the handler as required. The equivalent
+ * function signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Amount of buffers used in handshake.
+ * ); @endcode
+ */
+ template <typename ConstBufferSequence, typename BufferedHandshakeHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(BufferedHandshakeHandler,
+ void (boost::system::error_code, std::size_t))
+ async_handshake(handshake_type type, const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(BufferedHandshakeHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a BufferedHandshakeHandler.
+ BOOST_ASIO_BUFFERED_HANDSHAKE_HANDLER_CHECK(
+ BufferedHandshakeHandler, handler) type_check;
+
+ boost::asio::async_completion<BufferedHandshakeHandler,
+ void (boost::system::error_code, std::size_t)> init(handler);
+
+ detail::async_io(next_layer_, core_,
+ detail::buffered_handshake_op<ConstBufferSequence>(type, buffers),
+ init.completion_handler);
+
+ return init.result.get();
+ }
+
+ /// Shut down SSL on the stream.
+ /**
+ * This function is used to shut down SSL on the stream. The function call
+ * will block until SSL has been shut down or an error occurs.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+ void shutdown()
+ {
+ boost::system::error_code ec;
+ shutdown(ec);
+ boost::asio::detail::throw_error(ec, "shutdown");
+ }
+
+ /// Shut down SSL on the stream.
+ /**
+ * This function is used to shut down SSL on the stream. The function call
+ * will block until SSL has been shut down or an error occurs.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ */
+ BOOST_ASIO_SYNC_OP_VOID shutdown(boost::system::error_code& ec)
+ {
+ detail::io(next_layer_, core_, detail::shutdown_op(), ec);
+ BOOST_ASIO_SYNC_OP_VOID_RETURN(ec);
+ }
+
+ /// Asynchronously shut down SSL on the stream.
+ /**
+ * This function is used to asynchronously shut down SSL on the stream. This
+ * function call always returns immediately.
+ *
+ * @param handler The handler to be called when the handshake operation
+ * completes. Copies will be made of the handler as required. The equivalent
+ * function signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error // Result of operation.
+ * ); @endcode
+ */
+ template <typename ShutdownHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ShutdownHandler,
+ void (boost::system::error_code))
+ async_shutdown(BOOST_ASIO_MOVE_ARG(ShutdownHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ShutdownHandler.
+ BOOST_ASIO_SHUTDOWN_HANDLER_CHECK(ShutdownHandler, handler) type_check;
+
+ boost::asio::async_completion<ShutdownHandler,
+ void (boost::system::error_code)> init(handler);
+
+ detail::async_io(next_layer_, core_, detail::shutdown_op(),
+ init.completion_handler);
+
+ return init.result.get();
+ }
+
+ /// Write some data to the stream.
+ /**
+ * This function is used to write data on the stream. The function call will
+ * block until one or more bytes of data has been written successfully, or
+ * until an error occurs.
+ *
+ * @param buffers The data to be written.
+ *
+ * @returns The number of bytes written.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that all
+ * data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t n = write_some(buffers, ec);
+ boost::asio::detail::throw_error(ec, "write_some");
+ return n;
+ }
+
+ /// Write some data to the stream.
+ /**
+ * This function is used to write data on the stream. The function call will
+ * block until one or more bytes of data has been written successfully, or
+ * until an error occurs.
+ *
+ * @param buffers The data to be written to the stream.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. Returns 0 if an error occurred.
+ *
+ * @note The write_some operation may not transmit all of the data to the
+ * peer. Consider using the @ref write function if you need to ensure that all
+ * data is written before the blocking operation completes.
+ */
+ template <typename ConstBufferSequence>
+ std::size_t write_some(const ConstBufferSequence& buffers,
+ boost::system::error_code& ec)
+ {
+ return detail::io(next_layer_, core_,
+ detail::write_op<ConstBufferSequence>(buffers), ec);
+ }
+
+ /// Start an asynchronous write.
+ /**
+ * This function is used to asynchronously write one or more bytes of data to
+ * the stream. The function call always returns immediately.
+ *
+ * @param buffers The data to be written to the stream. Although the buffers
+ * object may be copied as necessary, ownership of the underlying buffers is
+ * retained by the caller, which must guarantee that they remain valid until
+ * the handler is called.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The equivalent function
+ * signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes written.
+ * ); @endcode
+ *
+ * @note The async_write_some operation may not transmit all of the data to
+ * the peer. Consider using the @ref async_write function if you need to
+ * ensure that all data is written before the asynchronous operation
+ * completes.
+ */
+ template <typename ConstBufferSequence, typename WriteHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+ async_write_some(const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a WriteHandler.
+ BOOST_ASIO_WRITE_HANDLER_CHECK(WriteHandler, handler) type_check;
+
+ boost::asio::async_completion<WriteHandler,
+ void (boost::system::error_code, std::size_t)> init(handler);
+
+ detail::async_io(next_layer_, core_,
+ detail::write_op<ConstBufferSequence>(buffers),
+ init.completion_handler);
+
+ return init.result.get();
+ }
+
+ /// Read some data from the stream.
+ /**
+ * This function is used to read data from the stream. The function call will
+ * block until one or more bytes of data has been read successfully, or until
+ * an error occurs.
+ *
+ * @param buffers The buffers into which the data will be read.
+ *
+ * @returns The number of bytes read.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that the
+ * requested amount of data is read before the blocking operation completes.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers)
+ {
+ boost::system::error_code ec;
+ std::size_t n = read_some(buffers, ec);
+ boost::asio::detail::throw_error(ec, "read_some");
+ return n;
+ }
+
+ /// Read some data from the stream.
+ /**
+ * This function is used to read data from the stream. The function call will
+ * block until one or more bytes of data has been read successfully, or until
+ * an error occurs.
+ *
+ * @param buffers The buffers into which the data will be read.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes read. Returns 0 if an error occurred.
+ *
+ * @note The read_some operation may not read all of the requested number of
+ * bytes. Consider using the @ref read function if you need to ensure that the
+ * requested amount of data is read before the blocking operation completes.
+ */
+ template <typename MutableBufferSequence>
+ std::size_t read_some(const MutableBufferSequence& buffers,
+ boost::system::error_code& ec)
+ {
+ return detail::io(next_layer_, core_,
+ detail::read_op<MutableBufferSequence>(buffers), ec);
+ }
+
+ /// Start an asynchronous read.
+ /**
+ * This function is used to asynchronously read one or more bytes of data from
+ * the stream. The function call always returns immediately.
+ *
+ * @param buffers The buffers into which the data will be read. Although the
+ * buffers object may be copied as necessary, ownership of the underlying
+ * buffers is retained by the caller, which must guarantee that they remain
+ * valid until the handler is called.
+ *
+ * @param handler The handler to be called when the read operation completes.
+ * Copies will be made of the handler as required. The equivalent function
+ * signature of the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ * std::size_t bytes_transferred // Number of bytes read.
+ * ); @endcode
+ *
+ * @note The async_read_some operation may not read all of the requested
+ * number of bytes. Consider using the @ref async_read function if you need to
+ * ensure that the requested amount of data is read before the asynchronous
+ * operation completes.
+ */
+ template <typename MutableBufferSequence, typename ReadHandler>
+ BOOST_ASIO_INITFN_RESULT_TYPE(ReadHandler,
+ void (boost::system::error_code, std::size_t))
+ async_read_some(const MutableBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
+ {
+ // If you get an error on the following line it means that your handler does
+ // not meet the documented type requirements for a ReadHandler.
+ BOOST_ASIO_READ_HANDLER_CHECK(ReadHandler, handler) type_check;
+
+ boost::asio::async_completion<ReadHandler,
+ void (boost::system::error_code, std::size_t)> init(handler);
+
+ detail::async_io(next_layer_, core_,
+ detail::read_op<MutableBufferSequence>(buffers),
+ init.completion_handler);
+
+ return init.result.get();
+ }
+
+private:
+ Stream next_layer_;
+ detail::stream_core core_;
+};
+
+} // namespace ssl
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#endif // BOOST_ASIO_SSL_STREAM_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/stream_base.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/stream_base.hpp
index 58472148949..58472148949 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/stream_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/stream_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/verify_context.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/verify_context.hpp
index c5fdaf4adb2..c5fdaf4adb2 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/verify_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/verify_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ssl/verify_mode.hpp b/src/third_party/boost-1.69.0/boost/asio/ssl/verify_mode.hpp
index 9ae60504422..9ae60504422 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ssl/verify_mode.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ssl/verify_mode.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/steady_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/steady_timer.hpp
index ab30b9c8fde..ab30b9c8fde 100644
--- a/src/third_party/boost-1.68.0/boost/asio/steady_timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/steady_timer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/strand.hpp b/src/third_party/boost-1.69.0/boost/asio/strand.hpp
index b82e988fe45..b82e988fe45 100644
--- a/src/third_party/boost-1.68.0/boost/asio/strand.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/strand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/stream_socket_service.hpp b/src/third_party/boost-1.69.0/boost/asio/stream_socket_service.hpp
index 04159ea66f9..04159ea66f9 100644
--- a/src/third_party/boost-1.68.0/boost/asio/stream_socket_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/stream_socket_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/streambuf.hpp b/src/third_party/boost-1.69.0/boost/asio/streambuf.hpp
index 737a631151a..737a631151a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/streambuf.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/streambuf.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/system_context.hpp b/src/third_party/boost-1.69.0/boost/asio/system_context.hpp
index 22f6b19426d..22f6b19426d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/system_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/system_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/system_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/system_executor.hpp
index d6f5b7def85..d6f5b7def85 100644
--- a/src/third_party/boost-1.68.0/boost/asio/system_executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/system_executor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/system_timer.hpp b/src/third_party/boost-1.69.0/boost/asio/system_timer.hpp
index c2ff9947b90..c2ff9947b90 100644
--- a/src/third_party/boost-1.68.0/boost/asio/system_timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/system_timer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/thread_pool.hpp b/src/third_party/boost-1.69.0/boost/asio/thread_pool.hpp
new file mode 100644
index 00000000000..ac5f00d0916
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/thread_pool.hpp
@@ -0,0 +1,234 @@
+//
+// thread_pool.hpp
+// ~~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_THREAD_POOL_HPP
+#define BOOST_ASIO_THREAD_POOL_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/noncopyable.hpp>
+#include <boost/asio/detail/scheduler.hpp>
+#include <boost/asio/detail/thread_group.hpp>
+#include <boost/asio/execution_context.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/// A simple fixed-size thread pool.
+/**
+ * The thread pool class is an execution context where functions are permitted
+ * to run on one of a fixed number of threads.
+ *
+ * @par Submitting tasks to the pool
+ *
+ * To submit functions to the thread_pool, use the @ref boost::asio::dispatch,
+ * @ref boost::asio::post or @ref boost::asio::defer free functions.
+ *
+ * For example:
+ *
+ * @code void my_task()
+ * {
+ * ...
+ * }
+ *
+ * ...
+ *
+ * // Launch the pool with four threads.
+ * boost::asio::thread_pool pool(4);
+ *
+ * // Submit a function to the pool.
+ * boost::asio::post(pool, my_task);
+ *
+ * // Submit a lambda object to the pool.
+ * boost::asio::post(pool,
+ * []()
+ * {
+ * ...
+ * });
+ *
+ * // Wait for all tasks in the pool to complete.
+ * pool.join(); @endcode
+ */
+class thread_pool
+ : public execution_context
+{
+public:
+ class executor_type;
+
+ /// Constructs a pool with an automatically determined number of threads.
+ BOOST_ASIO_DECL thread_pool();
+
+ /// Constructs a pool with a specified number of threads.
+ BOOST_ASIO_DECL thread_pool(std::size_t num_threads);
+
+ /// Destructor.
+ /**
+ * Automatically stops and joins the pool, if not explicitly done beforehand.
+ */
+ BOOST_ASIO_DECL ~thread_pool();
+
+ /// Obtains the executor associated with the pool.
+ executor_type get_executor() BOOST_ASIO_NOEXCEPT;
+
+ /// Stops the threads.
+ /**
+ * This function stops the threads as soon as possible. As a result of calling
+ * @c stop(), pending function objects may be never be invoked.
+ */
+ BOOST_ASIO_DECL void stop();
+
+ /// Joins the threads.
+ /**
+ * This function blocks until the threads in the pool have completed. If @c
+ * stop() is not called prior to @c join(), the @c join() call will wait
+ * until the pool has no more outstanding work.
+ */
+ BOOST_ASIO_DECL void join();
+
+private:
+ friend class executor_type;
+ struct thread_function;
+
+ // The underlying scheduler.
+ detail::scheduler& scheduler_;
+
+ // The threads in the pool.
+ detail::thread_group threads_;
+};
+
+/// Executor used to submit functions to a thread pool.
+class thread_pool::executor_type
+{
+public:
+ /// Obtain the underlying execution context.
+ thread_pool& context() const BOOST_ASIO_NOEXCEPT;
+
+ /// Inform the thread pool that it has some outstanding work to do.
+ /**
+ * This function is used to inform the thread pool that some work has begun.
+ * This ensures that the thread pool's join() function will not return while
+ * the work is underway.
+ */
+ void on_work_started() const BOOST_ASIO_NOEXCEPT;
+
+ /// Inform the thread pool that some work is no longer outstanding.
+ /**
+ * This function is used to inform the thread pool that some work has
+ * finished. Once the count of unfinished work reaches zero, the thread
+ * pool's join() function is permitted to exit.
+ */
+ void on_work_finished() const BOOST_ASIO_NOEXCEPT;
+
+ /// Request the thread pool to invoke the given function object.
+ /**
+ * This function is used to ask the thread pool to execute the given function
+ * object. If the current thread belongs to the pool, @c dispatch() executes
+ * the function before returning. Otherwise, the function will be scheduled
+ * to run on the thread pool.
+ *
+ * @param f The function object to be called. The executor will make
+ * a copy of the handler object as required. The function signature of the
+ * function object must be: @code void function(); @endcode
+ *
+ * @param a An allocator that may be used by the executor to allocate the
+ * internal storage needed for function invocation.
+ */
+ template <typename Function, typename Allocator>
+ void dispatch(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+
+ /// Request the thread pool to invoke the given function object.
+ /**
+ * This function is used to ask the thread pool to execute the given function
+ * object. The function object will never be executed inside @c post().
+ * Instead, it will be scheduled to run on the thread pool.
+ *
+ * @param f The function object to be called. The executor will make
+ * a copy of the handler object as required. The function signature of the
+ * function object must be: @code void function(); @endcode
+ *
+ * @param a An allocator that may be used by the executor to allocate the
+ * internal storage needed for function invocation.
+ */
+ template <typename Function, typename Allocator>
+ void post(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+
+ /// Request the thread pool to invoke the given function object.
+ /**
+ * This function is used to ask the thread pool to execute the given function
+ * object. The function object will never be executed inside @c defer().
+ * Instead, it will be scheduled to run on the thread pool.
+ *
+ * If the current thread belongs to the thread pool, @c defer() will delay
+ * scheduling the function object until the current thread returns control to
+ * the pool.
+ *
+ * @param f The function object to be called. The executor will make
+ * a copy of the handler object as required. The function signature of the
+ * function object must be: @code void function(); @endcode
+ *
+ * @param a An allocator that may be used by the executor to allocate the
+ * internal storage needed for function invocation.
+ */
+ template <typename Function, typename Allocator>
+ void defer(BOOST_ASIO_MOVE_ARG(Function) f, const Allocator& a) const;
+
+ /// Determine whether the thread pool is running in the current thread.
+ /**
+ * @return @c true if the current thread belongs to the pool. Otherwise
+ * returns @c false.
+ */
+ bool running_in_this_thread() const BOOST_ASIO_NOEXCEPT;
+
+ /// Compare two executors for equality.
+ /**
+ * Two executors are equal if they refer to the same underlying thread pool.
+ */
+ friend bool operator==(const executor_type& a,
+ const executor_type& b) BOOST_ASIO_NOEXCEPT
+ {
+ return &a.pool_ == &b.pool_;
+ }
+
+ /// Compare two executors for inequality.
+ /**
+ * Two executors are equal if they refer to the same underlying thread pool.
+ */
+ friend bool operator!=(const executor_type& a,
+ const executor_type& b) BOOST_ASIO_NOEXCEPT
+ {
+ return &a.pool_ != &b.pool_;
+ }
+
+private:
+ friend class thread_pool;
+
+ // Constructor.
+ explicit executor_type(thread_pool& p) : pool_(p) {}
+
+ // The underlying thread pool.
+ thread_pool& pool_;
+};
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/thread_pool.hpp>
+#if defined(BOOST_ASIO_HEADER_ONLY)
+# include <boost/asio/impl/thread_pool.ipp>
+#endif // defined(BOOST_ASIO_HEADER_ONLY)
+
+#endif // BOOST_ASIO_THREAD_POOL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/time_traits.hpp b/src/third_party/boost-1.69.0/boost/asio/time_traits.hpp
index d11ea0050f1..d11ea0050f1 100644
--- a/src/third_party/boost-1.68.0/boost/asio/time_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/time_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ts/buffer.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/buffer.hpp
index 2774935f1b0..2774935f1b0 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ts/buffer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ts/buffer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ts/executor.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/executor.hpp
index df52817a352..df52817a352 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ts/executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ts/executor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ts/internet.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/internet.hpp
index 7448015734b..7448015734b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ts/internet.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ts/internet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ts/io_context.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/io_context.hpp
index aea646cc4a6..aea646cc4a6 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ts/io_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ts/io_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ts/net.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/net.hpp
index dbac252849d..dbac252849d 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ts/net.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ts/net.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ts/netfwd.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/netfwd.hpp
index 10800baea4c..10800baea4c 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ts/netfwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ts/netfwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ts/socket.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/socket.hpp
index 01e68553329..01e68553329 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ts/socket.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ts/socket.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/ts/timer.hpp b/src/third_party/boost-1.69.0/boost/asio/ts/timer.hpp
index adc6bf99c4b..adc6bf99c4b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/ts/timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/ts/timer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/unyield.hpp b/src/third_party/boost-1.69.0/boost/asio/unyield.hpp
index de3ed0275e4..de3ed0275e4 100644
--- a/src/third_party/boost-1.68.0/boost/asio/unyield.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/unyield.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/use_future.hpp b/src/third_party/boost-1.69.0/boost/asio/use_future.hpp
new file mode 100644
index 00000000000..01fb2760f37
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/use_future.hpp
@@ -0,0 +1,162 @@
+//
+// use_future.hpp
+// ~~~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_USE_FUTURE_HPP
+#define BOOST_ASIO_USE_FUTURE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <boost/asio/detail/future.hpp>
+
+#if defined(BOOST_ASIO_HAS_STD_FUTURE_CLASS) \
+ || defined(GENERATING_DOCUMENTATION)
+
+#include <memory>
+#include <boost/asio/detail/type_traits.hpp>
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+namespace detail {
+
+template <typename Function, typename Allocator>
+class packaged_token;
+
+template <typename Function, typename Allocator, typename Result>
+class packaged_handler;
+
+} // namespace detail
+
+/// Class used to specify that an asynchronous operation should return a future.
+/**
+ * The use_future_t class is used to indicate that an asynchronous operation
+ * should return a std::future object. A use_future_t object may be passed as a
+ * handler to an asynchronous operation, typically using the special value @c
+ * boost::asio::use_future. For example:
+ *
+ * @code std::future<std::size_t> my_future
+ * = my_socket.async_read_some(my_buffer, boost::asio::use_future); @endcode
+ *
+ * The initiating function (async_read_some in the above example) returns a
+ * future that will receive the result of the operation. If the operation
+ * completes with an error_code indicating failure, it is converted into a
+ * system_error and passed back to the caller via the future.
+ */
+template <typename Allocator = std::allocator<void> >
+class use_future_t
+{
+public:
+ /// The allocator type. The allocator is used when constructing the
+ /// @c std::promise object for a given asynchronous operation.
+ typedef Allocator allocator_type;
+
+ /// Construct using default-constructed allocator.
+ BOOST_ASIO_CONSTEXPR use_future_t()
+ {
+ }
+
+ /// Construct using specified allocator.
+ explicit use_future_t(const Allocator& allocator)
+ : allocator_(allocator)
+ {
+ }
+
+#if !defined(BOOST_ASIO_NO_DEPRECATED)
+ /// (Deprecated: Use rebind().) Specify an alternate allocator.
+ template <typename OtherAllocator>
+ use_future_t<OtherAllocator> operator[](const OtherAllocator& allocator) const
+ {
+ return use_future_t<OtherAllocator>(allocator);
+ }
+#endif // !defined(BOOST_ASIO_NO_DEPRECATED)
+
+ /// Specify an alternate allocator.
+ template <typename OtherAllocator>
+ use_future_t<OtherAllocator> rebind(const OtherAllocator& allocator) const
+ {
+ return use_future_t<OtherAllocator>(allocator);
+ }
+
+ /// Obtain allocator.
+ allocator_type get_allocator() const
+ {
+ return allocator_;
+ }
+
+ /// Wrap a function object in a packaged task.
+ /**
+ * The @c package function is used to adapt a function object as a packaged
+ * task. When this adapter is passed as a completion token to an asynchronous
+ * operation, the result of the function object is retuned via a std::future.
+ *
+ * @par Example
+ *
+ * @code std::future<std::size_t> fut =
+ * my_socket.async_read_some(buffer,
+ * use_future([](boost::system::error_code ec, std::size_t n)
+ * {
+ * return ec ? 0 : n;
+ * }));
+ * ...
+ * std::size_t n = fut.get(); @endcode
+ */
+ template <typename Function>
+#if defined(GENERATING_DOCUMENTATION)
+ unspecified
+#else // defined(GENERATING_DOCUMENTATION)
+ detail::packaged_token<typename decay<Function>::type, Allocator>
+#endif // defined(GENERATING_DOCUMENTATION)
+ operator()(BOOST_ASIO_MOVE_ARG(Function) f) const;
+
+private:
+ // Helper type to ensure that use_future can be constexpr default-constructed
+ // even when std::allocator<void> can't be.
+ struct std_allocator_void
+ {
+ BOOST_ASIO_CONSTEXPR std_allocator_void()
+ {
+ }
+
+ operator std::allocator<void>() const
+ {
+ return std::allocator<void>();
+ }
+ };
+
+ typename conditional<
+ is_same<std::allocator<void>, Allocator>::value,
+ std_allocator_void, Allocator>::type allocator_;
+};
+
+/// A special value, similar to std::nothrow.
+/**
+ * See the documentation for boost::asio::use_future_t for a usage example.
+ */
+#if defined(BOOST_ASIO_HAS_CONSTEXPR) || defined(GENERATING_DOCUMENTATION)
+constexpr use_future_t<> use_future;
+#elif defined(BOOST_ASIO_MSVC)
+__declspec(selectany) use_future_t<> use_future;
+#endif
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/use_future.hpp>
+
+#endif // defined(BOOST_ASIO_HAS_STD_FUTURE_CLASS)
+ // || defined(GENERATING_DOCUMENTATION)
+
+#endif // BOOST_ASIO_USE_FUTURE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/uses_executor.hpp b/src/third_party/boost-1.69.0/boost/asio/uses_executor.hpp
index 6398816fabb..6398816fabb 100644
--- a/src/third_party/boost-1.68.0/boost/asio/uses_executor.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/uses_executor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/version.hpp b/src/third_party/boost-1.69.0/boost/asio/version.hpp
new file mode 100644
index 00000000000..bedf15bd0cb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/version.hpp
@@ -0,0 +1,23 @@
+//
+// version.hpp
+// ~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_VERSION_HPP
+#define BOOST_ASIO_VERSION_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+// BOOST_ASIO_VERSION % 100 is the sub-minor version
+// BOOST_ASIO_VERSION / 100 % 1000 is the minor version
+// BOOST_ASIO_VERSION / 100000 is the major version
+#define BOOST_ASIO_VERSION 101202 // 1.12.2
+
+#endif // BOOST_ASIO_VERSION_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/wait_traits.hpp b/src/third_party/boost-1.69.0/boost/asio/wait_traits.hpp
index 9f5be813a7a..9f5be813a7a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/wait_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/wait_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/waitable_timer_service.hpp b/src/third_party/boost-1.69.0/boost/asio/waitable_timer_service.hpp
index 164aae90c67..164aae90c67 100644
--- a/src/third_party/boost-1.68.0/boost/asio/waitable_timer_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/waitable_timer_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/basic_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/basic_handle.hpp
index ce7d0e8fa00..ce7d0e8fa00 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/basic_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/basic_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/basic_object_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/basic_object_handle.hpp
index b4a2565e23b..b4a2565e23b 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/basic_object_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/basic_object_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/basic_random_access_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/basic_random_access_handle.hpp
index 53765e17663..53765e17663 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/basic_random_access_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/basic_random_access_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/basic_stream_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/basic_stream_handle.hpp
index 80639879837..80639879837 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/basic_stream_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/basic_stream_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/object_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/object_handle.hpp
index 45eb23f4d80..45eb23f4d80 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/object_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/object_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/object_handle_service.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/object_handle_service.hpp
index 6ff8197990f..6ff8197990f 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/object_handle_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/object_handle_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/overlapped_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_handle.hpp
index 16dcbedbb65..16dcbedbb65 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/overlapped_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/overlapped_ptr.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_ptr.hpp
index 8c95ce45f9a..8c95ce45f9a 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/overlapped_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/overlapped_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/random_access_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle.hpp
index 4ff62d39dfa..4ff62d39dfa 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/random_access_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/random_access_handle_service.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle_service.hpp
index 0ec0773acb5..0ec0773acb5 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/random_access_handle_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/random_access_handle_service.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/stream_handle.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle.hpp
index a8962b6b123..a8962b6b123 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/stream_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/asio/windows/stream_handle_service.hpp b/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle_service.hpp
index d3d47d22361..d3d47d22361 100644
--- a/src/third_party/boost-1.68.0/boost/asio/windows/stream_handle_service.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/windows/stream_handle_service.hpp
diff --git a/src/third_party/boost-1.69.0/boost/asio/write.hpp b/src/third_party/boost-1.69.0/boost/asio/write.hpp
new file mode 100644
index 00000000000..e3f4d09cb7a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/write.hpp
@@ -0,0 +1,930 @@
+//
+// write.hpp
+// ~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_WRITE_HPP
+#define BOOST_ASIO_WRITE_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <cstddef>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/buffer.hpp>
+#include <boost/asio/error.hpp>
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+# include <boost/asio/basic_streambuf_fwd.hpp>
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/**
+ * @defgroup write boost::asio::write
+ *
+ * @brief The @c write function is a composed operation that writes a certain
+ * amount of data to a stream before returning.
+ */
+/*@{*/
+
+/// Write all of the supplied data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers One or more buffers containing the data to be written. The sum
+ * of the buffer sizes indicates the maximum number of bytes to write to the
+ * stream.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::write(s, boost::asio::buffer(data, size)); @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write(
+ * s, buffers,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncWriteStream, typename ConstBufferSequence>
+std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type* = 0);
+
+/// Write all of the supplied data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers One or more buffers containing the data to be written. The sum
+ * of the buffer sizes indicates the maximum number of bytes to write to the
+ * stream.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::write(s, boost::asio::buffer(data, size), ec); @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write(
+ * s, buffers,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncWriteStream, typename ConstBufferSequence>
+std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type* = 0);
+
+/// Write a certain amount of data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers One or more buffers containing the data to be written. The sum
+ * of the buffer sizes indicates the maximum number of bytes to write to the
+ * stream.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's write_some function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::write(s, boost::asio::buffer(data, size),
+ * boost::asio::transfer_at_least(32)); @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename SyncWriteStream, typename ConstBufferSequence,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type* = 0);
+
+/// Write a certain amount of data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers One or more buffers containing the data to be written. The sum
+ * of the buffer sizes indicates the maximum number of bytes to write to the
+ * stream.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's write_some function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncWriteStream, typename ConstBufferSequence,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type* = 0);
+
+/// Write all of the supplied data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Successfully written data is automatically consumed from the buffers.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write(
+ * s, buffers,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncWriteStream, typename DynamicBuffer>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+/// Write all of the supplied data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Successfully written data is automatically consumed from the buffers.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write(
+ * s, buffers,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncWriteStream, typename DynamicBuffer>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+/// Write a certain amount of data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Successfully written data is automatically consumed from the buffers.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's write_some function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+template <typename SyncWriteStream, typename DynamicBuffer,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ CompletionCondition completion_condition,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+/// Write a certain amount of data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Successfully written data is automatically consumed from the buffers.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's write_some function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncWriteStream, typename DynamicBuffer,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Write all of the supplied data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param b The basic_streambuf object from which data will be written.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write(
+ * s, b,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncWriteStream, typename Allocator>
+std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b);
+
+/// Write all of the supplied data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param b The basic_streambuf object from which data will be written.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write(
+ * s, b,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncWriteStream, typename Allocator>
+std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
+ boost::system::error_code& ec);
+
+/// Write a certain amount of data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param b The basic_streambuf object from which data will be written.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's write_some function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+template <typename SyncWriteStream, typename Allocator,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition);
+
+/// Write a certain amount of data to a stream before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a stream.
+ * The call will block until one of the following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * write_some function.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the SyncWriteStream concept.
+ *
+ * @param b The basic_streambuf object from which data will be written.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's write_some function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncWriteStream, typename Allocator,
+ typename CompletionCondition>
+std::size_t write(SyncWriteStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition, boost::system::error_code& ec);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+/**
+ * @defgroup async_write boost::asio::async_write
+ *
+ * @brief The @c async_write function is a composed asynchronous operation that
+ * writes a certain amount of data to a stream before completion.
+ */
+/*@{*/
+
+/// Start an asynchronous operation to write all of the supplied data to a
+/// stream.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_write_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other write operations (such
+ * as async_write, the stream's async_write_some function, or any other composed
+ * operations that perform writes) until this operation completes.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the AsyncWriteStream concept.
+ *
+ * @param buffers One or more buffers containing the data to be written.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of
+ * the handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes written from the
+ * // buffers. If an error occurred,
+ * // this will be less than the sum
+ * // of the buffer sizes.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * boost::asio::async_write(s, boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type* = 0);
+
+/// Start an asynchronous operation to write a certain amount of data to a
+/// stream.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_write_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other write operations (such
+ * as async_write, the stream's async_write_some function, or any other composed
+ * operations that perform writes) until this operation completes.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the AsyncWriteStream concept.
+ *
+ * @param buffers One or more buffers containing the data to be written.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's async_write_some function.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes written from the
+ * // buffers. If an error occurred,
+ * // this will be less than the sum
+ * // of the buffer sizes.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::async_write(s,
+ * boost::asio::buffer(data, size),
+ * boost::asio::transfer_at_least(32),
+ * handler); @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename AsyncWriteStream, typename ConstBufferSequence,
+ typename CompletionCondition, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_const_buffer_sequence<ConstBufferSequence>::value
+ >::type* = 0);
+
+/// Start an asynchronous operation to write all of the supplied data to a
+/// stream.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_write_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other write operations (such
+ * as async_write, the stream's async_write_some function, or any other composed
+ * operations that perform writes) until this operation completes.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the AsyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called. Successfully written
+ * data is automatically consumed from the buffers.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes written from the
+ * // buffers. If an error occurred,
+ * // this will be less than the sum
+ * // of the buffer sizes.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncWriteStream,
+ typename DynamicBuffer, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+/// Start an asynchronous operation to write a certain amount of data to a
+/// stream.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li All of the data in the supplied dynamic buffer sequence has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_write_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other write operations (such
+ * as async_write, the stream's async_write_some function, or any other composed
+ * operations that perform writes) until this operation completes.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the AsyncWriteStream concept.
+ *
+ * @param buffers The dynamic buffer sequence from which data will be written.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called. Successfully written
+ * data is automatically consumed from the buffers.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's async_write_some function.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes written from the
+ * // buffers. If an error occurred,
+ * // this will be less than the sum
+ * // of the buffer sizes.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncWriteStream, typename DynamicBuffer,
+ typename CompletionCondition, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s,
+ BOOST_ASIO_MOVE_ARG(DynamicBuffer) buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ typename enable_if<
+ is_dynamic_buffer<typename decay<DynamicBuffer>::type>::value
+ >::type* = 0);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Start an asynchronous operation to write all of the supplied data to a
+/// stream.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_write_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other write operations (such
+ * as async_write, the stream's async_write_some function, or any other composed
+ * operations that perform writes) until this operation completes.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the AsyncWriteStream concept.
+ *
+ * @param b A basic_streambuf object from which data will be written. Ownership
+ * of the streambuf is retained by the caller, which must guarantee that it
+ * remains valid until the handler is called.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes written from the
+ * // buffers. If an error occurred,
+ * // this will be less than the sum
+ * // of the buffer sizes.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
+
+/// Start an asynchronous operation to write a certain amount of data to a
+/// stream.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a stream. The function call always returns immediately. The
+ * asynchronous operation will continue until one of the following conditions
+ * is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the stream's
+ * async_write_some function, and is known as a <em>composed operation</em>. The
+ * program must ensure that the stream performs no other write operations (such
+ * as async_write, the stream's async_write_some function, or any other composed
+ * operations that perform writes) until this operation completes.
+ *
+ * @param s The stream to which the data is to be written. The type must support
+ * the AsyncWriteStream concept.
+ *
+ * @param b A basic_streambuf object from which data will be written. Ownership
+ * of the streambuf is retained by the caller, which must guarantee that it
+ * remains valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_write_some operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the stream's async_write_some function.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * const boost::system::error_code& error, // Result of operation.
+ *
+ * std::size_t bytes_transferred // Number of bytes written from the
+ * // buffers. If an error occurred,
+ * // this will be less than the sum
+ * // of the buffer sizes.
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncWriteStream, typename Allocator,
+ typename CompletionCondition, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/write.hpp>
+
+#endif // BOOST_ASIO_WRITE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/asio/write_at.hpp b/src/third_party/boost-1.69.0/boost/asio/write_at.hpp
new file mode 100644
index 00000000000..6330214bd3e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/asio/write_at.hpp
@@ -0,0 +1,681 @@
+//
+// write_at.hpp
+// ~~~~~~~~~~~~
+//
+// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_ASIO_WRITE_AT_HPP
+#define BOOST_ASIO_WRITE_AT_HPP
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# pragma once
+#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
+
+#include <boost/asio/detail/config.hpp>
+#include <cstddef>
+#include <boost/asio/async_result.hpp>
+#include <boost/asio/detail/cstdint.hpp>
+#include <boost/asio/error.hpp>
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+# include <boost/asio/basic_streambuf_fwd.hpp>
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+#include <boost/asio/detail/push_options.hpp>
+
+namespace boost {
+namespace asio {
+
+/**
+ * @defgroup write_at boost::asio::write_at
+ *
+ * @brief The @c write_at function is a composed operation that writes a
+ * certain amount of data at a specified offset before returning.
+ */
+/*@{*/
+
+/// Write all of the supplied data at the specified offset before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a random
+ * access device at a specified offset. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * write_some_at function.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the SyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more buffers containing the data to be written. The sum
+ * of the buffer sizes indicates the maximum number of bytes to write to the
+ * device.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::write_at(d, 42, boost::asio::buffer(data, size)); @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write_at(
+ * d, offset, buffers,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
+std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers);
+
+/// Write all of the supplied data at the specified offset before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a random
+ * access device at a specified offset. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * write_some_at function.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the SyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more buffers containing the data to be written. The sum
+ * of the buffer sizes indicates the maximum number of bytes to write to the
+ * device.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::write_at(d, 42,
+ * boost::asio::buffer(data, size), ec); @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write_at(
+ * d, offset, buffers,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence>
+std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ boost::system::error_code& ec);
+
+/// Write a certain amount of data at a specified offset before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a random
+ * access device at a specified offset. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * write_some_at function.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the SyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more buffers containing the data to be written. The sum
+ * of the buffer sizes indicates the maximum number of bytes to write to the
+ * device.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the device's write_some_at function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::write_at(d, 42, boost::asio::buffer(data, size),
+ * boost::asio::transfer_at_least(32)); @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename CompletionCondition>
+std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition);
+
+/// Write a certain amount of data at a specified offset before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a random
+ * access device at a specified offset. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * write_some_at function.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the SyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more buffers containing the data to be written. The sum
+ * of the buffer sizes indicates the maximum number of bytes to write to the
+ * device.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the device's write_some_at function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename CompletionCondition>
+std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition, boost::system::error_code& ec);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Write all of the supplied data at the specified offset before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a random
+ * access device at a specified offset. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * write_some_at function.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the SyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param b The basic_streambuf object from which data will be written.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write_at(
+ * d, 42, b,
+ * boost::asio::transfer_all()); @endcode
+ */
+template <typename SyncRandomAccessWriteDevice, typename Allocator>
+std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b);
+
+/// Write all of the supplied data at the specified offset before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a random
+ * access device at a specified offset. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * write_some_at function.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the SyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param b The basic_streambuf object from which data will be written.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @note This overload is equivalent to calling:
+ * @code boost::asio::write_at(
+ * d, 42, b,
+ * boost::asio::transfer_all(), ec); @endcode
+ */
+template <typename SyncRandomAccessWriteDevice, typename Allocator>
+std::size_t write_at(SyncRandomAccessWriteDevice& d,
+ uint64_t offset, basic_streambuf<Allocator>& b,
+ boost::system::error_code& ec);
+
+/// Write a certain amount of data at a specified offset before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a random
+ * access device at a specified offset. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * write_some_at function.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the SyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param b The basic_streambuf object from which data will be written.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the device's write_some_at function.
+ *
+ * @returns The number of bytes transferred.
+ *
+ * @throws boost::system::system_error Thrown on failure.
+ */
+template <typename SyncRandomAccessWriteDevice, typename Allocator,
+ typename CompletionCondition>
+std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
+ basic_streambuf<Allocator>& b, CompletionCondition completion_condition);
+
+/// Write a certain amount of data at a specified offset before returning.
+/**
+ * This function is used to write a certain number of bytes of data to a random
+ * access device at a specified offset. The call will block until one of the
+ * following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * write_some_at function.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the SyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param b The basic_streambuf object from which data will be written.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest write_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the device's write_some_at function.
+ *
+ * @param ec Set to indicate what error occurred, if any.
+ *
+ * @returns The number of bytes written. If an error occurs, returns the total
+ * number of bytes successfully transferred prior to the error.
+ */
+template <typename SyncRandomAccessWriteDevice, typename Allocator,
+ typename CompletionCondition>
+std::size_t write_at(SyncRandomAccessWriteDevice& d, uint64_t offset,
+ basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
+ boost::system::error_code& ec);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+/**
+ * @defgroup async_write_at boost::asio::async_write_at
+ *
+ * @brief The @c async_write_at function is a composed asynchronous operation
+ * that writes a certain amount of data at the specified offset before
+ * completion.
+ */
+/*@{*/
+
+/// Start an asynchronous operation to write all of the supplied data at the
+/// specified offset.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a random access device at a specified offset. The function call
+ * always returns immediately. The asynchronous operation will continue until
+ * one of the following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * async_write_some_at function, and is known as a <em>composed operation</em>.
+ * The program must ensure that the device performs no <em>overlapping</em>
+ * write operations (such as async_write_at, the device's async_write_some_at
+ * function, or any other composed operations that perform writes) until this
+ * operation completes. Operations are overlapping if the regions defined by
+ * their offsets, and the numbers of bytes to write, intersect.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the AsyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more buffers containing the data to be written.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of
+ * the handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code
+ * boost::asio::async_write_at(d, 42, boost::asio::buffer(data, size), handler);
+ * @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
+ const ConstBufferSequence& buffers,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
+
+/// Start an asynchronous operation to write a certain amount of data at the
+/// specified offset.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a random access device at a specified offset. The function call
+ * always returns immediately. The asynchronous operation will continue until
+ * one of the following conditions is true:
+ *
+ * @li All of the data in the supplied buffers has been written. That is, the
+ * bytes transferred is equal to the sum of the buffer sizes.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * async_write_some_at function, and is known as a <em>composed operation</em>.
+ * The program must ensure that the device performs no <em>overlapping</em>
+ * write operations (such as async_write_at, the device's async_write_some_at
+ * function, or any other composed operations that perform writes) until this
+ * operation completes. Operations are overlapping if the regions defined by
+ * their offsets, and the numbers of bytes to write, intersect.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the AsyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param buffers One or more buffers containing the data to be written.
+ * Although the buffers object may be copied as necessary, ownership of the
+ * underlying memory blocks is retained by the caller, which must guarantee
+ * that they remain valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_write_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the device's async_write_some_at function.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ *
+ * @par Example
+ * To write a single data buffer use the @ref buffer function as follows:
+ * @code boost::asio::async_write_at(d, 42,
+ * boost::asio::buffer(data, size),
+ * boost::asio::transfer_at_least(32),
+ * handler); @endcode
+ * See the @ref buffer documentation for information on writing multiple
+ * buffers in one go, and how to use it with arrays, boost::array or
+ * std::vector.
+ */
+template <typename AsyncRandomAccessWriteDevice, typename ConstBufferSequence,
+ typename CompletionCondition, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write_at(AsyncRandomAccessWriteDevice& d,
+ uint64_t offset, const ConstBufferSequence& buffers,
+ CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
+
+#if !defined(BOOST_ASIO_NO_EXTENSIONS)
+#if !defined(BOOST_ASIO_NO_IOSTREAM)
+
+/// Start an asynchronous operation to write all of the supplied data at the
+/// specified offset.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a random access device at a specified offset. The function call
+ * always returns immediately. The asynchronous operation will continue until
+ * one of the following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li An error occurred.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * async_write_some_at function, and is known as a <em>composed operation</em>.
+ * The program must ensure that the device performs no <em>overlapping</em>
+ * write operations (such as async_write_at, the device's async_write_some_at
+ * function, or any other composed operations that perform writes) until this
+ * operation completes. Operations are overlapping if the regions defined by
+ * their offsets, and the numbers of bytes to write, intersect.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the AsyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param b A basic_streambuf object from which data will be written. Ownership
+ * of the streambuf is retained by the caller, which must guarantee that it
+ * remains valid until the handler is called.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncRandomAccessWriteDevice, typename Allocator,
+ typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
+ basic_streambuf<Allocator>& b, BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
+
+/// Start an asynchronous operation to write a certain amount of data at the
+/// specified offset.
+/**
+ * This function is used to asynchronously write a certain number of bytes of
+ * data to a random access device at a specified offset. The function call
+ * always returns immediately. The asynchronous operation will continue until
+ * one of the following conditions is true:
+ *
+ * @li All of the data in the supplied basic_streambuf has been written.
+ *
+ * @li The completion_condition function object returns 0.
+ *
+ * This operation is implemented in terms of zero or more calls to the device's
+ * async_write_some_at function, and is known as a <em>composed operation</em>.
+ * The program must ensure that the device performs no <em>overlapping</em>
+ * write operations (such as async_write_at, the device's async_write_some_at
+ * function, or any other composed operations that perform writes) until this
+ * operation completes. Operations are overlapping if the regions defined by
+ * their offsets, and the numbers of bytes to write, intersect.
+ *
+ * @param d The device to which the data is to be written. The type must support
+ * the AsyncRandomAccessWriteDevice concept.
+ *
+ * @param offset The offset at which the data will be written.
+ *
+ * @param b A basic_streambuf object from which data will be written. Ownership
+ * of the streambuf is retained by the caller, which must guarantee that it
+ * remains valid until the handler is called.
+ *
+ * @param completion_condition The function object to be called to determine
+ * whether the write operation is complete. The signature of the function object
+ * must be:
+ * @code std::size_t completion_condition(
+ * // Result of latest async_write_some_at operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes transferred so far.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * A return value of 0 indicates that the write operation is complete. A
+ * non-zero return value indicates the maximum number of bytes to be written on
+ * the next call to the device's async_write_some_at function.
+ *
+ * @param handler The handler to be called when the write operation completes.
+ * Copies will be made of the handler as required. The function signature of the
+ * handler must be:
+ * @code void handler(
+ * // Result of operation.
+ * const boost::system::error_code& error,
+ *
+ * // Number of bytes written from the buffers. If an error
+ * // occurred, this will be less than the sum of the buffer sizes.
+ * std::size_t bytes_transferred
+ * ); @endcode
+ * Regardless of whether the asynchronous operation completes immediately or
+ * not, the handler will not be invoked from within this function. Invocation of
+ * the handler will be performed in a manner equivalent to using
+ * boost::asio::io_context::post().
+ */
+template <typename AsyncRandomAccessWriteDevice, typename Allocator,
+ typename CompletionCondition, typename WriteHandler>
+BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ void (boost::system::error_code, std::size_t))
+async_write_at(AsyncRandomAccessWriteDevice& d, uint64_t offset,
+ basic_streambuf<Allocator>& b, CompletionCondition completion_condition,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
+
+#endif // !defined(BOOST_ASIO_NO_IOSTREAM)
+#endif // !defined(BOOST_ASIO_NO_EXTENSIONS)
+
+/*@}*/
+
+} // namespace asio
+} // namespace boost
+
+#include <boost/asio/detail/pop_options.hpp>
+
+#include <boost/asio/impl/write_at.hpp>
+
+#endif // BOOST_ASIO_WRITE_AT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/asio/yield.hpp b/src/third_party/boost-1.69.0/boost/asio/yield.hpp
index 5ed7f9ae4f3..5ed7f9ae4f3 100644
--- a/src/third_party/boost-1.68.0/boost/asio/yield.hpp
+++ b/src/third_party/boost-1.69.0/boost/asio/yield.hpp
diff --git a/src/third_party/boost-1.68.0/boost/assert.hpp b/src/third_party/boost-1.69.0/boost/assert.hpp
index 9650d7a2908..9650d7a2908 100644
--- a/src/third_party/boost-1.68.0/boost/assert.hpp
+++ b/src/third_party/boost-1.69.0/boost/assert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/assign/assignment_exception.hpp b/src/third_party/boost-1.69.0/boost/assign/assignment_exception.hpp
new file mode 100644
index 00000000000..5a52fcd421a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/assign/assignment_exception.hpp
@@ -0,0 +1,44 @@
+// Boost.Assign library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/assign/
+//
+
+
+#ifndef BOOST_ASSIGN_ASSIGNMENT_EXCEPTION_HPP
+#define BOOST_ASSIGN_ASSIGNMENT_EXCEPTION_HPP
+
+#include <boost/config.hpp>
+#include <exception>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost
+{
+ namespace assign
+ {
+ class assignment_exception : public std::exception
+ {
+ public:
+ assignment_exception( const char* _what )
+ : what_( _what )
+ { }
+
+ virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ return what_;
+ }
+
+ private:
+ const char* what_;
+ };
+ }
+}
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/assign/list_of.hpp b/src/third_party/boost-1.69.0/boost/assign/list_of.hpp
new file mode 100644
index 00000000000..b9ef968ddd4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/assign/list_of.hpp
@@ -0,0 +1,847 @@
+// Boost.Assign library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/assign/
+//
+
+
+#ifndef BOOST_ASSIGN_LIST_OF_HPP
+#define BOOST_ASSIGN_LIST_OF_HPP
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/assign/assignment_exception.hpp>
+#include <boost/range/iterator_range.hpp>
+#include <boost/config.hpp>
+#include <boost/tuple/tuple.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/move/utility.hpp>
+#include <deque>
+#include <cstddef>
+#include <utility>
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#include <array>
+#endif
+#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif
+
+// some gcc < 4.7 do not support all of the variadic features required for boost::assign
+#if !(defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || BOOST_WORKAROUND(BOOST_GCC, < 40700) \
+ || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
+# define BOOST_ASSIGN_USE_VARIADIC_TEMPLATES
+#endif
+
+#if !defined(BOOST_ASSIGN_USE_VARIADIC_TEMPLATES)
+
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/iteration/local.hpp>
+
+#endif
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+// BCB requires full type definition for is_array<> to work correctly.
+#include <boost/array.hpp>
+#endif
+
+namespace boost
+{
+
+// this here is necessary to avoid compiler error in <boost/array.hpp>
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ template< class T, std::size_t sz >
+ class array;
+#endif
+
+namespace assign_detail
+{
+ /////////////////////////////////////////////////////////////////////////
+ // Part 0: common conversion code
+ /////////////////////////////////////////////////////////////////////////
+
+ template< class T >
+ struct assign_decay
+ {
+ //
+ // Add constness to array parameters
+ // to support string literals properly
+ //
+ typedef BOOST_DEDUCED_TYPENAME mpl::eval_if<
+ ::boost::is_array<T>,
+ ::boost::decay<const T>,
+ ::boost::decay<T> >::type type;
+ };
+
+ template< class T, std::size_t sz >
+ type_traits::yes_type assign_is_array( const array<T,sz>* );
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+ template< class T, std::size_t sz >
+ type_traits::yes_type assign_is_array( const std::array<T, sz>* );
+#endif
+ type_traits::no_type assign_is_array( ... );
+ template< class T, class U >
+ type_traits::yes_type assign_is_pair( const std::pair<T,U>* );
+ type_traits::no_type assign_is_pair( ... );
+
+
+
+ struct array_type_tag
+ {
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ private:
+ char dummy_; // BCB would by default use 8 bytes
+ #endif
+ };
+ struct adapter_type_tag
+ {
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ private:
+ char dummy_; // BCB would by default use 8 bytes
+ #endif
+ };
+ struct pair_type_tag
+ {
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ private:
+ char dummy_; // BCB would by default use 8 bytes
+ #endif
+ };
+ struct default_type_tag
+ {
+ #if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ private:
+ char dummy_; // BCB would by default use 8 bytes
+ #endif
+ };
+
+#ifndef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+ template< class C >
+ struct is_initializer_list : boost::false_type {};
+
+ template< class E >
+ struct is_initializer_list< std::initializer_list<E> > : boost::true_type {};
+#endif
+
+ template< class DerivedTAssign, class Iterator >
+ class converter
+ {
+ public: // Range operations
+ typedef Iterator iterator;
+ typedef Iterator const_iterator;
+
+ iterator begin() const
+ {
+ return static_cast<const DerivedTAssign*>(this)->begin();
+ }
+
+ iterator end() const
+ {
+ return static_cast<const DerivedTAssign*>(this)->end();
+ }
+
+ public:
+
+ template< class Container >
+ Container convert_to_container() const
+ {
+ static Container* c = 0;
+ BOOST_STATIC_CONSTANT( bool, is_array_flag = sizeof( assign_detail::assign_is_array( c ) )
+ == sizeof( type_traits::yes_type ) );
+
+ typedef BOOST_DEDUCED_TYPENAME mpl::if_c< is_array_flag,
+ array_type_tag,
+ default_type_tag >::type tag_type;
+
+ return convert<Container>( c, tag_type() );
+ }
+
+ private:
+
+ template< class Container >
+ Container convert( const Container*, default_type_tag ) const
+ {
+
+#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
+// old Dinkumware doesn't support iterator type as template
+ Container result;
+ iterator it = begin(),
+ e = end();
+ while( it != e )
+ {
+ result.insert( result.end(), *it );
+ ++it;
+ }
+ return result;
+#else
+ return Container( begin(), end() );
+#endif
+ }
+
+ template< class Array >
+ Array convert( const Array*, array_type_tag ) const
+ {
+ typedef BOOST_DEDUCED_TYPENAME Array::value_type value_type;
+
+#if BOOST_WORKAROUND(BOOST_INTEL, <= 910 ) || BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5100 )
+ BOOST_DEDUCED_TYPENAME remove_const<Array>::type ar;
+#else
+ Array ar;
+#endif
+ const std::size_t sz = ar.size();
+ if( sz < static_cast<const DerivedTAssign*>(this)->size() )
+ BOOST_THROW_EXCEPTION( assign::assignment_exception( "array initialized with too many elements" ) );
+ std::size_t n = 0;
+ iterator i = begin(),
+ e = end();
+ for( ; i != e; ++i, ++n )
+ ar[n] = *i;
+ for( ; n < sz; ++n )
+ ar[n] = value_type();
+ return ar;
+ }
+
+ template< class Adapter >
+ Adapter convert_to_adapter( const Adapter* = 0 ) const
+ {
+ Adapter a;
+ iterator i = begin(),
+ e = end();
+ for( ; i != e; ++i )
+ a.push( *i );
+ return a;
+ }
+
+ private:
+ struct adapter_converter;
+ friend struct adapter_converter;
+
+ struct adapter_converter
+ {
+ const converter& gl;
+ adapter_converter( const converter& this_ ) : gl( this_ )
+ {}
+
+ adapter_converter( const adapter_converter& r )
+ : gl( r.gl )
+ { }
+
+ template< class Adapter >
+ operator Adapter() const
+ {
+ return gl.convert_to_adapter<Adapter>();
+ }
+ };
+
+ public:
+ template< class Container >
+ Container to_container( Container& c ) const
+ {
+ return convert( &c, default_type_tag() );
+ }
+
+ adapter_converter to_adapter() const
+ {
+ return adapter_converter( *this );
+ }
+
+ template< class Adapter >
+ Adapter to_adapter( Adapter& a ) const
+ {
+ return this->convert_to_adapter( &a );
+ }
+
+ template< class Array >
+ Array to_array( Array& a ) const
+ {
+ return convert( &a, array_type_tag() );
+ }
+ };
+
+ template< class T, class I, class Range >
+ inline bool operator==( const converter<T,I>& l, const Range& r )
+ {
+ return ::boost::iterator_range_detail::equal( l, r );
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator==( const Range& l, const converter<T,I>& r )
+ {
+ return r == l;
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator!=( const converter<T,I>& l, const Range& r )
+ {
+ return !( l == r );
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator!=( const Range& l, const converter<T,I>& r )
+ {
+ return !( l == r );
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator<( const converter<T,I>& l, const Range& r )
+ {
+ return ::boost::iterator_range_detail::less_than( l, r );
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator<( const Range& l, const converter<T,I>& r )
+ {
+ return ::boost::iterator_range_detail::less_than( l, r );
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator>( const converter<T,I>& l, const Range& r )
+ {
+ return r < l;
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator>( const Range& l, const converter<T,I>& r )
+ {
+ return r < l;
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator<=( const converter<T,I>& l, const Range& r )
+ {
+ return !( l > r );
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator<=( const Range& l, const converter<T,I>& r )
+ {
+ return !( l > r );
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator>=( const converter<T,I>& l, const Range& r )
+ {
+ return !( l < r );
+ }
+
+ template< class T, class I, class Range >
+ inline bool operator>=( const Range& l, const converter<T,I>& r )
+ {
+ return !( l < r );
+ }
+
+ template< class T, class I, class Elem, class Traits >
+ inline std::basic_ostream<Elem,Traits>&
+ operator<<( std::basic_ostream<Elem, Traits>& Os,
+ const converter<T,I>& r )
+ {
+ return Os << ::boost::make_iterator_range( r.begin(), r.end() );
+ }
+
+ /////////////////////////////////////////////////////////////////////////
+ // Part 1: flexible, but inefficient interface
+ /////////////////////////////////////////////////////////////////////////
+
+ template< class T >
+ class generic_list :
+ public converter< generic_list< BOOST_DEDUCED_TYPENAME assign_decay<T>::type >,
+ BOOST_DEDUCED_TYPENAME std::deque<BOOST_DEDUCED_TYPENAME
+ assign_decay<T>::type>::iterator >
+ {
+ typedef BOOST_DEDUCED_TYPENAME assign_decay<T>::type Ty;
+ typedef std::deque<Ty> impl_type;
+ mutable impl_type values_;
+
+ public:
+ typedef BOOST_DEDUCED_TYPENAME impl_type::iterator iterator;
+ typedef iterator const_iterator;
+ typedef BOOST_DEDUCED_TYPENAME impl_type::value_type value_type;
+ typedef BOOST_DEDUCED_TYPENAME impl_type::size_type size_type;
+ typedef BOOST_DEDUCED_TYPENAME impl_type::difference_type difference_type;
+
+ public:
+ iterator begin() const { return values_.begin(); }
+ iterator end() const { return values_.end(); }
+ bool empty() const { return values_.empty(); }
+ size_type size() const { return values_.size(); }
+
+ private:
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ void push_back( value_type r ) { values_.push_back( r ); }
+#else
+ void push_back( const value_type& r ) { values_.push_back( r ); }
+ void push_back( value_type&& r ) { values_.push_back( boost::move( r ) ); }
+#endif
+ public:
+ generic_list& operator,( const Ty& u )
+ {
+ this->push_back( u );
+ return *this;
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+ generic_list& operator,( Ty&& u )
+ {
+ this->push_back( boost::move(u) );
+ return *this;
+ }
+#endif
+ generic_list& operator()( const Ty& u )
+ {
+ this->push_back( u );
+ return *this;
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+ generic_list& operator()(Ty&& u)
+ {
+ this->push_back( boost::move(u) );
+ return *this;
+ }
+#endif
+
+ generic_list& operator()()
+ {
+ this->push_back( Ty() );
+ return *this;
+ }
+
+#if !defined(BOOST_ASSIGN_USE_VARIADIC_TEMPLATES)
+
+#ifndef BOOST_ASSIGN_MAX_PARAMS // use user's value
+#define BOOST_ASSIGN_MAX_PARAMS 5
+#endif
+#define BOOST_ASSIGN_MAX_PARAMETERS (BOOST_ASSIGN_MAX_PARAMS - 1)
+#define BOOST_ASSIGN_PARAMS1(n) BOOST_PP_ENUM_PARAMS(n, class U)
+#define BOOST_ASSIGN_PARAMS2(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, const& u)
+#define BOOST_ASSIGN_PARAMS3(n) BOOST_PP_ENUM_PARAMS(n, u)
+#define BOOST_ASSIGN_PARAMS4(n) BOOST_PP_ENUM_PARAMS(n, U)
+#define BOOST_ASSIGN_PARAMS2_NO_REF(n) BOOST_PP_ENUM_BINARY_PARAMS(n, U, u)
+
+#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
+#define BOOST_PP_LOCAL_MACRO(n) \
+ template< class U, BOOST_ASSIGN_PARAMS1(n) > \
+ generic_list& operator()(U const& u, BOOST_ASSIGN_PARAMS2(n) ) \
+ { \
+ this->push_back( Ty(u, BOOST_ASSIGN_PARAMS3(n))); \
+ return *this; \
+ } \
+ /**/
+
+#include BOOST_PP_LOCAL_ITERATE()
+
+#else
+ template< class U0, class U1, class... Us >
+ generic_list& operator()(U0&& u0, U1&& u1, Us&&... us)
+ {
+ this->push_back(Ty(boost::forward<U0>(u0), boost::forward<U1>(u1), boost::forward<Us>(us)...));
+ return *this;
+ }
+#endif
+
+ template< class U >
+ generic_list& repeat( std::size_t sz, U u )
+ {
+ std::size_t i = 0;
+ while( i++ != sz )
+ this->push_back( u );
+ return *this;
+ }
+
+ template< class Nullary_function >
+ generic_list& repeat_fun( std::size_t sz, Nullary_function fun )
+ {
+ std::size_t i = 0;
+ while( i++ != sz )
+ this->push_back( fun() );
+ return *this;
+ }
+
+ template< class SinglePassIterator >
+ generic_list& range( SinglePassIterator first,
+ SinglePassIterator last )
+ {
+ for( ; first != last; ++first )
+ this->push_back( *first );
+ return *this;
+ }
+
+ template< class SinglePassRange >
+ generic_list& range( const SinglePassRange& r )
+ {
+ return range( boost::begin(r), boost::end(r) );
+ }
+#if !defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+ template< class Container,
+ class = decltype(Container(
+ boost::declval<BOOST_DEDUCED_TYPENAME std::deque<BOOST_DEDUCED_TYPENAME assign_decay<T>::type>::iterator>(),
+ boost::declval<BOOST_DEDUCED_TYPENAME std::deque<BOOST_DEDUCED_TYPENAME assign_decay<T>::type>::iterator>()
+ ))
+ >
+ operator Container() const
+ {
+ return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
+ }
+
+ template< class Container,
+ class = typename boost::enable_if< boost::is_same< boost::type_traits::yes_type, decltype(assign_is_array((Container*)0))> >::type,
+ class = void
+ >
+ operator Container() const
+ {
+ return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
+ }
+#elif !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+ template< class Container
+# if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ , class = typename boost::disable_if< is_initializer_list<Container> >::type
+# endif
+ , class = typename Container::iterator
+ >
+ operator Container() const
+ {
+ return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
+ }
+#else
+ template< class Container >
+ operator Container() const
+ {
+ return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
+ }
+#endif
+ };
+
+ /////////////////////////////////////////////////////////////////////////
+ // Part 2: efficient, but inconvenient interface
+ /////////////////////////////////////////////////////////////////////////
+
+ template< class T >
+ struct assign_reference
+ {
+ assign_reference() : ref_(0)
+ { /* intentionally empty */ }
+
+ assign_reference( T& r ) : ref_(&r)
+ { }
+
+ void operator=( T& r )
+ {
+ ref_ = &r;
+ }
+
+ operator T&() const
+ {
+ return *ref_;
+ }
+
+ void swap( assign_reference& r )
+ {
+ std::swap( *ref_, *r.ref_ );
+ }
+
+ T& get_ref() const
+ {
+ return *ref_;
+ }
+
+ private:
+ T* ref_;
+
+ };
+
+ template< class T >
+ inline bool operator<( const assign_reference<T>& l,
+ const assign_reference<T>& r )
+ {
+ return l.get_ref() < r.get_ref();
+ }
+
+ template< class T >
+ inline bool operator>( const assign_reference<T>& l,
+ const assign_reference<T>& r )
+ {
+ return l.get_ref() > r.get_ref();
+ }
+
+ template< class T >
+ inline void swap( assign_reference<T>& l,
+ assign_reference<T>& r )
+ {
+ l.swap( r );
+ }
+
+
+
+ template< class T, int N >
+ struct static_generic_list :
+ public converter< static_generic_list<T,N>, assign_reference<T>* >
+ {
+ private:
+ typedef T internal_value_type;
+
+ public:
+ typedef assign_reference<internal_value_type> value_type;
+ typedef value_type* iterator;
+ typedef value_type* const_iterator;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+
+ static_generic_list( T& r ) :
+ current_(1)
+ {
+ refs_[0] = r;
+ }
+
+ static_generic_list& operator()( T& r )
+ {
+ insert( r );
+ return *this;
+ }
+
+ iterator begin() const
+ {
+ return &refs_[0];
+ }
+
+ iterator end() const
+ {
+ return &refs_[current_];
+ }
+
+ size_type size() const
+ {
+ return static_cast<size_type>( current_ );
+ }
+
+ bool empty() const
+ {
+ return false;
+ }
+
+ template< class ForwardIterator >
+ static_generic_list& range( ForwardIterator first,
+ ForwardIterator last )
+ {
+ for( ; first != last; ++first )
+ this->insert( *first );
+ return *this;
+ }
+
+ template< class ForwardRange >
+ static_generic_list& range( ForwardRange& r )
+ {
+ return range( boost::begin(r), boost::end(r) );
+ }
+
+ template< class ForwardRange >
+ static_generic_list& range( const ForwardRange& r )
+ {
+ return range( boost::begin(r), boost::end(r) );
+ }
+
+#if !defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+ template< class Container,
+ class = decltype(Container(boost::declval<assign_reference<T>*>(), boost::declval<assign_reference<T>*>()))
+ >
+ operator Container() const
+ {
+ return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
+ }
+
+ template< class Container,
+ class = typename boost::enable_if< boost::is_same< boost::type_traits::yes_type, decltype(assign_is_array((Container*)0))> >::type,
+ class = void
+ >
+ operator Container() const
+ {
+ return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
+ }
+#elif !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+ template< class Container
+# if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ , class = typename boost::disable_if< is_initializer_list<Container> >::type
+# endif
+ , class = typename Container::iterator
+ >
+ operator Container() const
+ {
+ return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
+ }
+#else
+ template< class Container >
+ operator Container() const
+ {
+ return this-> BOOST_NESTED_TEMPLATE convert_to_container<Container>();
+ }
+#endif
+
+ private:
+ void insert( T& r )
+ {
+ refs_[current_] = r;
+ ++current_;
+ }
+
+ static_generic_list();
+
+ mutable assign_reference<internal_value_type> refs_[N];
+ int current_;
+ };
+
+} // namespace 'assign_detail'
+
+namespace assign
+{
+ template< class T >
+ inline assign_detail::generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type>
+ list_of()
+ {
+ assign_detail::generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type> gl;
+ gl();
+ return gl;
+ }
+
+#if !defined(BOOST_ASSIGN_USE_VARIADIC_TEMPLATES)
+
+ template< class T >
+ inline assign_detail::generic_list<T>
+ list_of( const T& t )
+ {
+ return assign_detail::generic_list<T>()( t );
+ }
+
+#else
+
+ template< class T >
+ inline assign_detail::generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type>
+ list_of(T&& t)
+ {
+ assign_detail::generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type> gl;
+ gl(boost::forward<T>(t));
+ return gl;
+ }
+
+#endif
+
+ template< int N, class T >
+ inline assign_detail::static_generic_list< BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>
+ ref_list_of( T& t )
+ {
+ return assign_detail::static_generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>( t );
+ }
+
+ template< int N, class T >
+ inline assign_detail::static_generic_list<const BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>
+ cref_list_of( const T& t )
+ {
+ return assign_detail::static_generic_list<const BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type,N>( t );
+ }
+
+#if !defined(BOOST_ASSIGN_USE_VARIADIC_TEMPLATES)
+
+#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
+#define BOOST_PP_LOCAL_MACRO(n) \
+ template< class T, class U, BOOST_ASSIGN_PARAMS1(n) > \
+ inline assign_detail::generic_list<T> \
+ list_of(U const& u, BOOST_ASSIGN_PARAMS2(n) ) \
+ { \
+ return assign_detail::generic_list<T>()(u, BOOST_ASSIGN_PARAMS3(n)); \
+ } \
+ /**/
+
+#include BOOST_PP_LOCAL_ITERATE()
+
+#define BOOST_PP_LOCAL_LIMITS (1, BOOST_ASSIGN_MAX_PARAMETERS)
+#define BOOST_PP_LOCAL_MACRO(n) \
+ template< class U, BOOST_ASSIGN_PARAMS1(n) > \
+ inline assign_detail::generic_list< tuple<U, BOOST_ASSIGN_PARAMS4(n)> > \
+ tuple_list_of(U u, BOOST_ASSIGN_PARAMS2_NO_REF(n) ) \
+ { \
+ return assign_detail::generic_list< tuple<U, BOOST_ASSIGN_PARAMS4(n)> >()( tuple<U,BOOST_ASSIGN_PARAMS4(n)>( u, BOOST_ASSIGN_PARAMS3(n) )); \
+ } \
+ /**/
+
+#include BOOST_PP_LOCAL_ITERATE()
+
+#else
+ template< class T, class U, class... Us >
+ inline assign_detail::generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type>
+ list_of(U&& u, Us&&... us)
+ {
+ assign_detail::generic_list<BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type> gl;
+ gl(boost::forward<U>(u), boost::forward<Us>(us)...);
+ return gl;
+ }
+
+
+ template< class U, class... Us >
+ inline assign_detail::generic_list< tuple<U, Us...> >
+ tuple_list_of(U u, Us... us)
+ {
+ assign_detail::generic_list< tuple<U, Us...> > gl;
+ gl(tuple<U, Us...>(u, us...));
+ return gl;
+ }
+#endif
+
+ template< class Key, class T >
+ inline assign_detail::generic_list< std::pair
+ <
+ BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<Key>::type,
+ BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type
+ > >
+ map_list_of( const Key& k, const T& t )
+ {
+ typedef BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<Key>::type k_type;
+ typedef BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<T>::type t_type;
+ return assign_detail::generic_list< std::pair<k_type,t_type> >()( k, t );
+ }
+
+ template< class F, class S >
+ inline assign_detail::generic_list< std::pair
+ <
+ BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<F>::type,
+ BOOST_DEDUCED_TYPENAME assign_detail::assign_decay<S>::type
+ > >
+ pair_list_of( const F& f, const S& s )
+ {
+ return map_list_of( f, s );
+ }
+
+
+} // namespace 'assign'
+} // namespace 'boost'
+
+
+#if !defined(BOOST_ASSIGN_USE_VARIADIC_TEMPLATES)
+
+#undef BOOST_ASSIGN_PARAMS1
+#undef BOOST_ASSIGN_PARAMS2
+#undef BOOST_ASSIGN_PARAMS3
+#undef BOOST_ASSIGN_PARAMS4
+#undef BOOST_ASSIGN_PARAMS2_NO_REF
+#undef BOOST_ASSIGN_MAX_PARAMETERS
+
+#endif
+
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/atomic.hpp b/src/third_party/boost-1.69.0/boost/atomic.hpp
index cc28b1ab5e2..cc28b1ab5e2 100644
--- a/src/third_party/boost-1.68.0/boost/atomic.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/atomic.hpp b/src/third_party/boost-1.69.0/boost/atomic/atomic.hpp
index 5a8058829cb..5a8058829cb 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/atomic.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/atomic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/atomic_flag.hpp b/src/third_party/boost-1.69.0/boost/atomic/atomic_flag.hpp
index ac296bcc8e0..ac296bcc8e0 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/atomic_flag.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/atomic_flag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/capabilities.hpp b/src/third_party/boost-1.69.0/boost/atomic/capabilities.hpp
index 5c7434d9bd0..5c7434d9bd0 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/capabilities.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/capabilities.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/addressof.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/addressof.hpp
index 38e876e317e..38e876e317e 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/addressof.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/addressof.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/atomic_flag.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/atomic_flag.hpp
index 6f5fc8acc36..6f5fc8acc36 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/atomic_flag.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/atomic_flag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/atomic_template.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/atomic_template.hpp
index fb0a8f58f0e..fb0a8f58f0e 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/atomic_template.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/atomic_template.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/bitwise_cast.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_cast.hpp
index 10d165e7c55..10d165e7c55 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/bitwise_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/bitwise_fp_cast.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_fp_cast.hpp
index a74b20b9720..a74b20b9720 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/bitwise_fp_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/bitwise_fp_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_alpha.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_alpha.hpp
index 861432f58a6..861432f58a6 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_alpha.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_alpha.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_arm.hpp
index a26ea56ee51..a26ea56ee51 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_atomic.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_atomic.hpp
index 3b518cf49c0..3b518cf49c0 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_atomic.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_atomic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_ppc.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_ppc.hpp
index 3e20fdee45a..3e20fdee45a 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_ppc.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_ppc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_sparc.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sparc.hpp
index 5806684926a..5806684926a 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_sparc.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sparc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_sync.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sync.hpp
index ffbe605a1a7..ffbe605a1a7 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_sync.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_sync.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_x86.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_x86.hpp
index 70c64628afd..70c64628afd 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_gcc_x86.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_gcc_x86.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_linux_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_linux_arm.hpp
index abe6fb81af7..abe6fb81af7 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_linux_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_linux_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_msvc_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_arm.hpp
index 6b3c61fb3ee..6b3c61fb3ee 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_msvc_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_msvc_x86.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_x86.hpp
index 2ee4c921113..2ee4c921113 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_msvc_x86.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_msvc_x86.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_windows.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_windows.hpp
index 1cc0ded8333..1cc0ded8333 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/caps_windows.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/caps_windows.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/config.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/config.hpp
index d2a6afd203c..d2a6afd203c 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_operations.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations.hpp
index 854d8c9bee6..854d8c9bee6 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_operations.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_operations_fwd.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations_fwd.hpp
index 79bca9d2cd2..79bca9d2cd2 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_operations_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_operations_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_ops_emulated.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_emulated.hpp
index e04b2f50fb4..e04b2f50fb4 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_ops_emulated.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_emulated.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_ops_generic.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_generic.hpp
index 34902c472ca..34902c472ca 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_fp_ops_generic.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_fp_ops_generic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_operations.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations.hpp
index c04f55cd834..c04f55cd834 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_operations.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_operations_fwd.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations_fwd.hpp
index 399a8233515..399a8233515 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_operations_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_operations_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_emulated.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_emulated.hpp
index c0e4832944d..c0e4832944d 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_emulated.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_emulated.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_arm.hpp
index e84f1771dac..e84f1771dac 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp
index dc4bbdbf744..dc4bbdbf744 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_ppc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_x86.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_x86.hpp
index ee2cd02a88d..ee2cd02a88d 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_gcc_x86.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_gcc_x86.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_generic.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_generic.hpp
index 43842628a27..43842628a27 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_generic.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_generic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_msvc_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_arm.hpp
index b8eb5bcb316..b8eb5bcb316 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_msvc_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_msvc_x86.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_x86.hpp
index 17451a83d61..17451a83d61 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/extra_ops_msvc_x86.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/extra_ops_msvc_x86.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/float_sizes.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/float_sizes.hpp
index 4c3a346f15e..4c3a346f15e 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/float_sizes.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/float_sizes.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/fp_operations.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations.hpp
index 69cb0d19a2e..69cb0d19a2e 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/fp_operations.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/fp_operations_fwd.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations_fwd.hpp
index 8696de31cf6..8696de31cf6 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/fp_operations_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/fp_operations_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/fp_ops_emulated.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_emulated.hpp
index a87f1814b34..a87f1814b34 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/fp_ops_emulated.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_emulated.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/fp_ops_generic.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_generic.hpp
index b83e85a3593..b83e85a3593 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/fp_ops_generic.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/fp_ops_generic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_arm.hpp
index 6d0c3386227..6d0c3386227 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp
index 2ec1e327a7f..2ec1e327a7f 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_ppc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_x86.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_x86.hpp
index 91a1aee3aae..91a1aee3aae 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/hwcaps_gcc_x86.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/hwcaps_gcc_x86.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/int_sizes.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/int_sizes.hpp
index 2a9757c1472..2a9757c1472 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/int_sizes.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/int_sizes.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/integral_extend.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/integral_extend.hpp
index dea48ac6fe4..dea48ac6fe4 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/integral_extend.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/integral_extend.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/interlocked.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/interlocked.hpp
index 774354fb7f2..774354fb7f2 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/interlocked.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/interlocked.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/link.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/link.hpp
index 4f522acbcf9..4f522acbcf9 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/link.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/link.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/lockpool.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/lockpool.hpp
index 4e249aa048c..4e249aa048c 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/lockpool.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/lockpool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/operations.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/operations.hpp
index d81399a8e3f..d81399a8e3f 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/operations.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/operations.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/operations_fwd.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/operations_fwd.hpp
index efd49707477..efd49707477 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/operations_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/operations_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/operations_lockfree.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/operations_lockfree.hpp
index 62b45836b5f..62b45836b5f 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/operations_lockfree.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/operations_lockfree.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_cas_based.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_cas_based.hpp
index e2e18aa3847..e2e18aa3847 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_cas_based.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_cas_based.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_emulated.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_emulated.hpp
index f30fbdab9f7..f30fbdab9f7 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_emulated.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_emulated.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_extending_cas_based.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_extending_cas_based.hpp
index 5f197cea48c..5f197cea48c 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_extending_cas_based.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_extending_cas_based.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_alpha.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_alpha.hpp
index 85b13429827..85b13429827 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_alpha.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_alpha.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm.hpp
index b32159536fb..b32159536fb 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_arm_common.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm_common.hpp
index 73c04ffe157..73c04ffe157 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_arm_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_arm_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_atomic.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_atomic.hpp
index ce40e3b2b9d..ce40e3b2b9d 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_atomic.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_atomic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_ppc.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc.hpp
index a826736d17f..a826736d17f 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_ppc.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_ppc_common.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc_common.hpp
index e5c9303bf74..e5c9303bf74 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_ppc_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_ppc_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_sparc.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sparc.hpp
index 19b9b1fa872..19b9b1fa872 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_sparc.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sparc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_sync.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sync.hpp
index 1597de852a6..1597de852a6 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_sync.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_sync.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_x86.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86.hpp
index 007d4eeeebc..007d4eeeebc 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_x86.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp
index 4206bb39efc..4206bb39efc 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_gcc_x86_dcas.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_linux_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_linux_arm.hpp
index 16af1732cf7..16af1732cf7 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_linux_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_linux_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_arm.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_arm.hpp
index 608c6fddf86..608c6fddf86 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_common.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_common.hpp
index 53628f36004..53628f36004 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_x86.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_x86.hpp
index 70b0ea994b1..70b0ea994b1 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_msvc_x86.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_msvc_x86.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_windows.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_windows.hpp
index d4ce6d95e71..d4ce6d95e71 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/ops_windows.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/ops_windows.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/pause.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/pause.hpp
index 37aa5ca84ec..37aa5ca84ec 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/pause.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/pause.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/platform.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/platform.hpp
index df4cc305ac1..df4cc305ac1 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/platform.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/platform.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/storage_type.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/storage_type.hpp
index 5d824d3a27e..5d824d3a27e 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/storage_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/storage_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/string_ops.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/string_ops.hpp
index ce145b98f23..ce145b98f23 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/string_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/string_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/conditional.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/conditional.hpp
index 6b9e896729b..6b9e896729b 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/conditional.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/conditional.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/integral_constant.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/integral_constant.hpp
index eac86491e05..eac86491e05 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/integral_constant.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/integral_constant.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_floating_point.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_floating_point.hpp
index c425112b8b5..c425112b8b5 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_floating_point.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_floating_point.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_function.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_function.hpp
index e7205356e45..e7205356e45 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_function.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_function.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_iec559.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_iec559.hpp
index 299c4f0f4f8..299c4f0f4f8 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_iec559.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_iec559.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_integral.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_integral.hpp
index ef3e2e347ef..ef3e2e347ef 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_integral.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_integral.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_signed.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_signed.hpp
index 2dc1df72678..2dc1df72678 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_signed.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_signed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp
index 5f88b88e428..5f88b88e428 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/is_trivially_default_constructible.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/make_signed.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_signed.hpp
index 82f61b33c07..82f61b33c07 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/make_signed.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_signed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/make_unsigned.hpp b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_unsigned.hpp
index 573a161694b..573a161694b 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/detail/type_traits/make_unsigned.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/detail/type_traits/make_unsigned.hpp
diff --git a/src/third_party/boost-1.68.0/boost/atomic/fences.hpp b/src/third_party/boost-1.69.0/boost/atomic/fences.hpp
index 31e30405780..31e30405780 100644
--- a/src/third_party/boost-1.68.0/boost/atomic/fences.hpp
+++ b/src/third_party/boost-1.69.0/boost/atomic/fences.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind.hpp b/src/third_party/boost-1.69.0/boost/bind.hpp
index 450120c7a7a..450120c7a7a 100644
--- a/src/third_party/boost-1.68.0/boost/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/apply.hpp b/src/third_party/boost-1.69.0/boost/bind/apply.hpp
index 6a43a89ac85..6a43a89ac85 100644
--- a/src/third_party/boost-1.68.0/boost/bind/apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/arg.hpp b/src/third_party/boost-1.69.0/boost/bind/arg.hpp
index cb52e6689f7..cb52e6689f7 100644
--- a/src/third_party/boost-1.68.0/boost/bind/arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/bind.hpp b/src/third_party/boost-1.69.0/boost/bind/bind.hpp
index 4cedc5e9a4e..4cedc5e9a4e 100644
--- a/src/third_party/boost-1.68.0/boost/bind/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/bind_cc.hpp b/src/third_party/boost-1.69.0/boost/bind/bind_cc.hpp
index 278aa9a2a84..278aa9a2a84 100644
--- a/src/third_party/boost-1.68.0/boost/bind/bind_cc.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/bind_cc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/bind_mf2_cc.hpp b/src/third_party/boost-1.69.0/boost/bind/bind_mf2_cc.hpp
index 66476bc19d1..66476bc19d1 100644
--- a/src/third_party/boost-1.68.0/boost/bind/bind_mf2_cc.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/bind_mf2_cc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/bind_mf_cc.hpp b/src/third_party/boost-1.69.0/boost/bind/bind_mf_cc.hpp
index bbfd3719b64..bbfd3719b64 100644
--- a/src/third_party/boost-1.68.0/boost/bind/bind_mf_cc.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/bind_mf_cc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/bind_template.hpp b/src/third_party/boost-1.69.0/boost/bind/bind_template.hpp
index 411d20c74e9..411d20c74e9 100644
--- a/src/third_party/boost-1.68.0/boost/bind/bind_template.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/bind_template.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/make_adaptable.hpp b/src/third_party/boost-1.69.0/boost/bind/make_adaptable.hpp
index b9f083e307d..b9f083e307d 100644
--- a/src/third_party/boost-1.68.0/boost/bind/make_adaptable.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/make_adaptable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/mem_fn.hpp b/src/third_party/boost-1.69.0/boost/bind/mem_fn.hpp
index 956e7d88853..956e7d88853 100644
--- a/src/third_party/boost-1.68.0/boost/bind/mem_fn.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/mem_fn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/mem_fn_cc.hpp b/src/third_party/boost-1.69.0/boost/bind/mem_fn_cc.hpp
index 8b6ea0ba13d..8b6ea0ba13d 100644
--- a/src/third_party/boost-1.68.0/boost/bind/mem_fn_cc.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/mem_fn_cc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/mem_fn_template.hpp b/src/third_party/boost-1.69.0/boost/bind/mem_fn_template.hpp
index b26d585dbc8..b26d585dbc8 100644
--- a/src/third_party/boost-1.68.0/boost/bind/mem_fn_template.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/mem_fn_template.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/mem_fn_vw.hpp b/src/third_party/boost-1.69.0/boost/bind/mem_fn_vw.hpp
index f3fc58db04e..f3fc58db04e 100644
--- a/src/third_party/boost-1.68.0/boost/bind/mem_fn_vw.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/mem_fn_vw.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/placeholders.hpp b/src/third_party/boost-1.69.0/boost/bind/placeholders.hpp
index b819ef4c46d..b819ef4c46d 100644
--- a/src/third_party/boost-1.68.0/boost/bind/placeholders.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/placeholders.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/protect.hpp b/src/third_party/boost-1.69.0/boost/bind/protect.hpp
index 749e158c349..749e158c349 100644
--- a/src/third_party/boost-1.68.0/boost/bind/protect.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/protect.hpp
diff --git a/src/third_party/boost-1.68.0/boost/bind/storage.hpp b/src/third_party/boost-1.69.0/boost/bind/storage.hpp
index be490b0f593..be490b0f593 100644
--- a/src/third_party/boost-1.68.0/boost/bind/storage.hpp
+++ b/src/third_party/boost-1.69.0/boost/bind/storage.hpp
diff --git a/src/third_party/boost-1.68.0/boost/call_traits.hpp b/src/third_party/boost-1.69.0/boost/call_traits.hpp
index 2c1328e94d7..2c1328e94d7 100644
--- a/src/third_party/boost-1.68.0/boost/call_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/call_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/cerrno.hpp b/src/third_party/boost-1.69.0/boost/cerrno.hpp
index 57278f5ceed..57278f5ceed 100644
--- a/src/third_party/boost-1.68.0/boost/cerrno.hpp
+++ b/src/third_party/boost-1.69.0/boost/cerrno.hpp
diff --git a/src/third_party/boost-1.68.0/boost/checked_delete.hpp b/src/third_party/boost-1.69.0/boost/checked_delete.hpp
index fb71c789c8d..fb71c789c8d 100644
--- a/src/third_party/boost-1.68.0/boost/checked_delete.hpp
+++ b/src/third_party/boost-1.69.0/boost/checked_delete.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono.hpp b/src/third_party/boost-1.69.0/boost/chrono.hpp
index a3a35229030..a3a35229030 100644
--- a/src/third_party/boost-1.68.0/boost/chrono.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/ceil.hpp b/src/third_party/boost-1.69.0/boost/chrono/ceil.hpp
index 7fbf9ddc29f..7fbf9ddc29f 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/ceil.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/ceil.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/chrono.hpp b/src/third_party/boost-1.69.0/boost/chrono/chrono.hpp
index ebc29d8d472..ebc29d8d472 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/chrono.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/chrono.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/chrono_io.hpp b/src/third_party/boost-1.69.0/boost/chrono/chrono_io.hpp
index ebd18a3dab6..ebd18a3dab6 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/chrono_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/chrono_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/clock_string.hpp b/src/third_party/boost-1.69.0/boost/chrono/clock_string.hpp
index af025f27e03..af025f27e03 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/clock_string.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/clock_string.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/config.hpp b/src/third_party/boost-1.69.0/boost/chrono/config.hpp
index 1045ba3a796..1045ba3a796 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/chrono.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/chrono.hpp
index 3bad546d4c3..3bad546d4c3 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/chrono.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/chrono.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/chrono.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/chrono.hpp
new file mode 100644
index 00000000000..9bf6c2bb12a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/chrono.hpp
@@ -0,0 +1,242 @@
+// mac/chrono.cpp --------------------------------------------------------------//
+
+// Copyright Beman Dawes 2008
+// Copyright 2009-2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+//----------------------------------------------------------------------------//
+// Mac //
+//----------------------------------------------------------------------------//
+
+#include <sys/time.h> //for gettimeofday and timeval
+#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
+#include <boost/assert.hpp>
+
+namespace boost
+{
+namespace chrono
+{
+
+// system_clock
+
+// gettimeofday is the most precise "system time" available on this platform.
+// It returns the number of microseconds since New Years 1970 in a struct called timeval
+// which has a field for seconds and a field for microseconds.
+// Fill in the timeval and then convert that to the time_point
+system_clock::time_point
+system_clock::now() BOOST_NOEXCEPT
+{
+ timeval tv;
+ gettimeofday(&tv, 0);
+ return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+system_clock::time_point
+system_clock::now(system::error_code & ec)
+{
+ timeval tv;
+ gettimeofday(&tv, 0);
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(seconds(tv.tv_sec) + microseconds(tv.tv_usec));
+}
+#endif
+// Take advantage of the fact that on this platform time_t is nothing but
+// an integral count of seconds since New Years 1970 (same epoch as timeval).
+// Just get the duration out of the time_point and truncate it to seconds.
+time_t
+system_clock::to_time_t(const time_point& t) BOOST_NOEXCEPT
+{
+ return time_t(duration_cast<seconds>(t.time_since_epoch()).count());
+}
+
+// Just turn the time_t into a count of seconds and construct a time_point with it.
+system_clock::time_point
+system_clock::from_time_t(time_t t) BOOST_NOEXCEPT
+{
+ return system_clock::time_point(seconds(t));
+}
+
+namespace chrono_detail
+{
+
+// steady_clock
+
+// Note, in this implementation steady_clock and high_resolution_clock
+// are the same clock. They are both based on mach_absolute_time().
+// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
+// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
+// are run time constants supplied by the OS. This clock has no relationship
+// to the Gregorian calendar. It's main use is as a high resolution timer.
+
+// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize
+// for that case as an optimization.
+BOOST_CHRONO_STATIC
+steady_clock::rep
+steady_simplified()
+{
+ return mach_absolute_time();
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+BOOST_CHRONO_STATIC
+steady_clock::rep
+steady_simplified_ec(system::error_code & ec)
+{
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return mach_absolute_time();
+}
+#endif
+
+BOOST_CHRONO_STATIC
+double
+compute_steady_factor(kern_return_t& err)
+{
+ mach_timebase_info_data_t MachInfo;
+ err = mach_timebase_info(&MachInfo);
+ if ( err != 0 ) {
+ return 0;
+ }
+ return static_cast<double>(MachInfo.numer) / MachInfo.denom;
+}
+
+BOOST_CHRONO_STATIC
+steady_clock::rep
+steady_full()
+{
+ kern_return_t err;
+ const double factor = chrono_detail::compute_steady_factor(err);
+ if (err != 0)
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+BOOST_CHRONO_STATIC
+steady_clock::rep
+steady_full_ec(system::error_code & ec)
+{
+ kern_return_t err;
+ const double factor = chrono_detail::compute_steady_factor(err);
+ if (err != 0)
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ err,
+ ::boost::system::system_category(),
+ "chrono::steady_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return steady_clock::rep();
+ }
+ }
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return static_cast<steady_clock::rep>(mach_absolute_time() * factor);
+}
+#endif
+
+typedef steady_clock::rep (*FP)();
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+typedef steady_clock::rep (*FP_ec)(system::error_code &);
+#endif
+
+BOOST_CHRONO_STATIC
+FP
+init_steady_clock(kern_return_t & err)
+{
+ mach_timebase_info_data_t MachInfo;
+ err = mach_timebase_info(&MachInfo);
+ if ( err != 0 )
+ {
+ return 0;
+ }
+
+ if (MachInfo.numer == MachInfo.denom)
+ {
+ return &chrono_detail::steady_simplified;
+ }
+ return &chrono_detail::steady_full;
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+BOOST_CHRONO_STATIC
+FP_ec
+init_steady_clock_ec(kern_return_t & err)
+{
+ mach_timebase_info_data_t MachInfo;
+ err = mach_timebase_info(&MachInfo);
+ if ( err != 0 )
+ {
+ return 0;
+ }
+
+ if (MachInfo.numer == MachInfo.denom)
+ {
+ return &chrono_detail::steady_simplified_ec;
+ }
+ return &chrono_detail::steady_full_ec;
+}
+#endif
+}
+
+steady_clock::time_point
+steady_clock::now() BOOST_NOEXCEPT
+{
+ kern_return_t err;
+ chrono_detail::FP fp = chrono_detail::init_steady_clock(err);
+ if ( err != 0 )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ return time_point(duration(fp()));
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+steady_clock::time_point
+steady_clock::now(system::error_code & ec)
+{
+ kern_return_t err;
+ chrono_detail::FP_ec fp = chrono_detail::init_steady_clock_ec(err);
+ if ( err != 0 )
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ err,
+ ::boost::system::system_category(),
+ "chrono::steady_clock" ));
+ }
+ else
+ {
+ ec.assign( err, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(duration(fp(ec)));
+}
+#endif
+} // namespace chrono
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp
new file mode 100644
index 00000000000..29fe86ccfc8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/process_cpu_clocks.hpp
@@ -0,0 +1,356 @@
+// boost process_cpu_clocks.cpp -----------------------------------------------------------//
+
+// Copyright Beman Dawes 1994, 2006, 2008
+// Copyright Vicente J. Botet Escriba 2009
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+//--------------------------------------------------------------------------------------//
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <boost/assert.hpp>
+
+#include <sys/time.h> //for gettimeofday and timeval
+#include <sys/times.h> //for times
+# include <unistd.h>
+
+namespace boost
+{
+ namespace chrono
+ {
+ namespace chrono_detail
+ {
+
+ inline long tick_factor() // multiplier to convert ticks
+ // to nanoseconds; -1 if unknown
+ {
+ long factor = 0;
+ if (!factor)
+ {
+ if ((factor = ::sysconf(_SC_CLK_TCK)) <= 0)
+ factor = -1;
+ else
+ {
+ BOOST_ASSERT(factor <= 1000000000l); // doesn't handle large ticks
+ factor = 1000000000l / factor; // compute factor
+ if (!factor)
+ factor = -1;
+ }
+ }
+ return factor;
+ }
+ }
+
+
+ process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
+ {
+#if 1
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == clock_t(-1)) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ return time_point(nanoseconds(c * factor));
+ } else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ }
+ return time_point();
+#else
+ clock_t c = ::clock();
+ if (c == clock_t(-1)) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ return time_point(nanoseconds(c * factor));
+ } else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ }
+ return time_point();
+#endif
+ }
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ process_real_cpu_clock::time_point process_real_cpu_clock::now(system::error_code & ec)
+ {
+
+#if 1
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == clock_t(-1)) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(nanoseconds(c * factor));
+ } else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ }
+ }
+#else
+ clock_t c = ::clock();
+ if (c == clock_t(-1)) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(nanoseconds(c * factor));
+ } else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_real_cpu_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ }
+ }
+#endif
+
+ }
+#endif
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ process_user_cpu_clock::time_point process_user_cpu_clock::now(system::error_code & ec)
+ {
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == clock_t(-1)) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_user_cpu_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime) * factor));
+ } else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_user_cpu_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ }
+ }
+ }
+#endif
+
+ process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
+ {
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == clock_t(-1)) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ return time_point(nanoseconds((tm.tms_utime + tm.tms_cutime)
+ * factor));
+ } else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ }
+ return time_point();
+ }
+ process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
+ {
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == clock_t(-1)) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime)
+ * factor));
+ } else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ }
+ return time_point();
+ }
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ process_system_cpu_clock::time_point process_system_cpu_clock::now(system::error_code & ec)
+ {
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == clock_t(-1)) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_system_cpu_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(nanoseconds((tm.tms_stime + tm.tms_cstime) * factor));
+ } else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_system_cpu_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ }
+ }
+ }
+#endif
+
+ process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
+ {
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == clock_t(-1)) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ time_point::rep
+ r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime
+ + tm.tms_cstime) * factor);
+ return time_point(duration(r));
+ } else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ }
+ return time_point();
+ }
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ process_cpu_clock::time_point process_cpu_clock::now(system::error_code & ec)
+ {
+
+ tms tm;
+ clock_t c = ::times(&tm);
+ if (c == clock_t(-1)) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ } else
+ {
+ long factor = chrono_detail::tick_factor();
+ if (factor != -1)
+ {
+ time_point::rep
+ r(c * factor, (tm.tms_utime + tm.tms_cutime) * factor, (tm.tms_stime
+ + tm.tms_cstime) * factor);
+ return time_point(duration(r));
+ } else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(system::system_error(errno, ::boost::system::system_category(), "chrono::process_clock"));
+ } else
+ {
+ ec.assign(errno, ::boost::system::system_category());
+ return time_point();
+ }
+ }
+ }
+
+ }
+#endif
+
+ }
+}
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/thread_clock.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/thread_clock.hpp
new file mode 100644
index 00000000000..74b820ace69
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/mac/thread_clock.hpp
@@ -0,0 +1,92 @@
+// boost thread_clock.cpp -----------------------------------------------------------//
+
+// Copyright Beman Dawes 1994, 2006, 2008
+// Copyright Vicente J. Botet Escriba 2009-2011
+// Copyright Christopher Brown 2013
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+//--------------------------------------------------------------------------------------//
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/thread_clock.hpp>
+#include <cassert>
+#include <boost/assert.hpp>
+
+# include <pthread.h>
+# include <mach/thread_act.h>
+
+namespace boost { namespace chrono {
+
+ thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT
+ {
+ // get the thread port (borrowing pthread's reference)
+ mach_port_t port = pthread_mach_thread_np(pthread_self());
+
+ // get the thread info
+ thread_basic_info_data_t info;
+ mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
+ if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ return time_point();
+ }
+
+ // convert to nanoseconds
+ duration user = duration(
+ static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000
+ + static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000);
+
+ duration system = duration(
+ static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
+ + static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
+
+ return time_point( user + system );
+ }
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ thread_clock::time_point thread_clock::now( system::error_code & ec )
+ {
+ // get the thread port (borrowing pthread's reference)
+ mach_port_t port = pthread_mach_thread_np(pthread_self());
+
+ // get the thread info
+ thread_basic_info_data_t info;
+ mach_msg_type_number_t count = THREAD_BASIC_INFO_COUNT;
+ if ( thread_info(port, THREAD_BASIC_INFO, (thread_info_t)&info, &count) != KERN_SUCCESS )
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ EINVAL,
+ ::boost::system::system_category(),
+ "chrono::thread_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+
+ // convert to nanoseconds
+ duration user = duration(
+ static_cast<thread_clock::rep>( info.user_time.seconds ) * 1000000000
+ + static_cast<thread_clock::rep>(info.user_time.microseconds ) * 1000);
+
+ duration system = duration(
+ static_cast<thread_clock::rep>( info.system_time.seconds ) * 1000000000
+ + static_cast<thread_clock::rep>( info.system_time.microseconds ) * 1000);
+
+ return time_point( user + system );
+ }
+#endif
+} }
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/chrono.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/chrono.hpp
new file mode 100644
index 00000000000..a9e4e63037d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/chrono.hpp
@@ -0,0 +1,121 @@
+// posix/chrono.cpp --------------------------------------------------------------//
+
+// Copyright Beman Dawes 2008
+// Copyright Vicente J. Botet Escriba 2009
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+//----------------------------------------------------------------------------//
+// POSIX //
+//----------------------------------------------------------------------------//
+
+#include <time.h> // for clock_gettime
+#include <boost/assert.hpp>
+
+namespace boost
+{
+namespace chrono
+{
+
+ system_clock::time_point system_clock::now() BOOST_NOEXCEPT
+ {
+ timespec ts;
+ if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+
+ return time_point(duration(
+ static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+ }
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ system_clock::time_point system_clock::now(system::error_code & ec)
+ {
+ timespec ts;
+ if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::system_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(duration(
+ static_cast<system_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+ }
+#endif
+
+ std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
+ {
+ return static_cast<std::time_t>( t.time_since_epoch().count() / 1000000000 );
+ }
+
+ system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
+ {
+ return time_point(duration(static_cast<system_clock::rep>(t) * 1000000000));
+ }
+
+#ifdef BOOST_CHRONO_HAS_CLOCK_STEADY
+
+ steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
+ {
+ timespec ts;
+ if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+
+ return time_point(duration(
+ static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+ }
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ steady_clock::time_point steady_clock::now(system::error_code & ec)
+ {
+ timespec ts;
+ if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::steady_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(duration(
+ static_cast<steady_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+ }
+#endif
+#endif
+
+} // namespace chrono
+} // namespace boost
+
+
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp
new file mode 100644
index 00000000000..f9a9e1293c8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/process_cpu_clocks.hpp
@@ -0,0 +1,354 @@
+// boost process_cpu_clocks.cpp -----------------------------------------------------------//
+
+// Copyright Beman Dawes 1994, 2006, 2008
+// Copyright Vicente J. Botet Escriba 2009
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+//--------------------------------------------------------------------------------------//
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <boost/assert.hpp>
+
+#include <sys/times.h>
+#include <unistd.h>
+#include <time.h> // for clock_gettime
+
+
+namespace boost { namespace chrono {
+namespace chrono_detail
+{
+ inline nanoseconds::rep tick_factor() // multiplier to convert ticks
+ // to nanoseconds; -1 if unknown
+ {
+ long factor = 0;
+ if ( !factor )
+ {
+ if ( (factor = ::sysconf( _SC_CLK_TCK )) <= 0 )
+ factor = -1;
+ else
+ {
+ BOOST_ASSERT( factor <= 1000000000l ); // doesn't handle large ticks
+ factor = 1000000000l / factor; // compute factor
+ if ( !factor ) factor = -1;
+ }
+ }
+ return factor;
+ }
+}
+
+process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
+{
+ tms tm;
+ clock_t c = ::times( &tm );
+ if ( c == clock_t(-1) ) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ else
+ {
+ if ( chrono_detail::tick_factor() != -1 )
+ {
+ return time_point(
+ nanoseconds(c*chrono_detail::tick_factor()));
+ }
+ else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ }
+ return time_point();
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+process_real_cpu_clock::time_point process_real_cpu_clock::now(
+ system::error_code & ec)
+{
+
+ tms tm;
+ clock_t c = ::times( &tm );
+ if ( c == clock_t(-1) ) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_real_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ else
+ {
+ if ( chrono_detail::tick_factor() != -1 )
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(
+ nanoseconds(c*chrono_detail::tick_factor()));
+ }
+ else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_real_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ }
+}
+#endif
+
+process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
+{
+ tms tm;
+ clock_t c = ::times( &tm );
+ if ( c == clock_t(-1) ) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ else
+ {
+ if ( chrono_detail::tick_factor() != -1 )
+ {
+ return time_point(
+ nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor()));
+ }
+ else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ }
+ return time_point();
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+process_user_cpu_clock::time_point process_user_cpu_clock::now(
+ system::error_code & ec)
+{
+ tms tm;
+ clock_t c = ::times( &tm );
+ if ( c == clock_t(-1) ) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_user_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ else
+ {
+ if ( chrono_detail::tick_factor() != -1 )
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(
+ nanoseconds((tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor()));
+ }
+ else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_user_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ }
+}
+#endif
+
+process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
+{
+ tms tm;
+ clock_t c = ::times( &tm );
+ if ( c == clock_t(-1) ) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ return time_point();
+ }
+ else
+ {
+ if ( chrono_detail::tick_factor() != -1 )
+ {
+ return time_point(
+ nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()));
+ }
+ else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ return time_point();
+ }
+ }
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+process_system_cpu_clock::time_point process_system_cpu_clock::now(
+ system::error_code & ec)
+{
+ tms tm;
+ clock_t c = ::times( &tm );
+ if ( c == clock_t(-1) ) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_system_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ else
+ {
+ if ( chrono_detail::tick_factor() != -1 )
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(
+ nanoseconds((tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor()));
+ }
+ else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_system_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ }
+}
+#endif
+
+process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
+{
+ tms tm;
+ clock_t c = ::times( &tm );
+ if ( c == clock_t(-1) ) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ else
+ {
+ nanoseconds::rep factor = chrono_detail::tick_factor();
+ if ( factor != -1 )
+ {
+ time_point::rep r(
+ c*factor,
+ (tm.tms_utime + tm.tms_cutime)*factor,
+ (tm.tms_stime + tm.tms_cstime)*factor);
+ return time_point(duration(r));
+ }
+ else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ }
+ return time_point();
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+process_cpu_clock::time_point process_cpu_clock::now(
+ system::error_code & ec )
+{
+ tms tm;
+ clock_t c = ::times( &tm );
+ if ( c == clock_t(-1) ) // error
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ else
+ {
+ if ( chrono_detail::tick_factor() != -1 )
+ {
+ time_point::rep r(
+ c*chrono_detail::tick_factor(),
+ (tm.tms_utime + tm.tms_cutime)*chrono_detail::tick_factor(),
+ (tm.tms_stime + tm.tms_cstime)*chrono_detail::tick_factor());
+ return time_point(duration(r));
+ }
+ else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ }
+
+}
+#endif
+
+} }
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/thread_clock.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/thread_clock.hpp
new file mode 100644
index 00000000000..a2a2d9cf65d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/posix/thread_clock.hpp
@@ -0,0 +1,92 @@
+// boost thread_clock.cpp -----------------------------------------------------------//
+
+// Copyright Beman Dawes 1994, 2006, 2008
+// Copyright Vicente J. Botet Escriba 2009-2011
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+//--------------------------------------------------------------------------------------//
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/thread_clock.hpp>
+#include <cassert>
+#include <boost/assert.hpp>
+
+#if !defined(__VXWORKS__)
+# include <sys/times.h>
+#endif
+# include <pthread.h>
+# include <unistd.h>
+
+namespace boost { namespace chrono {
+
+ thread_clock::time_point thread_clock::now( ) BOOST_NOEXCEPT
+ {
+ struct timespec ts;
+#if defined CLOCK_THREAD_CPUTIME_ID
+ // get the timespec associated to the thread clock
+ if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) )
+#else
+ // get the current thread
+ pthread_t pth=pthread_self();
+ // get the clock_id associated to the current thread
+ clockid_t clock_id;
+ pthread_getcpuclockid(pth, &clock_id);
+ // get the timespec associated to the thread clock
+ if ( ::clock_gettime( clock_id, &ts ) )
+#endif
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+
+ // transform to nanoseconds
+ return time_point(duration(
+ static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+
+ }
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ thread_clock::time_point thread_clock::now( system::error_code & ec )
+ {
+ struct timespec ts;
+#if defined CLOCK_THREAD_CPUTIME_ID
+ // get the timespec associated to the thread clock
+ if ( ::clock_gettime( CLOCK_THREAD_CPUTIME_ID, &ts ) )
+#else
+ // get the current thread
+ pthread_t pth=pthread_self();
+ // get the clock_id associated to the current thread
+ clockid_t clock_id;
+ pthread_getcpuclockid(pth, &clock_id);
+ // get the timespec associated to the thread clock
+ if ( ::clock_gettime( clock_id, &ts ) )
+#endif
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::thread_clock" ));
+ }
+ else
+ {
+ ec.assign( errno, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ // transform to nanoseconds
+ return time_point(duration(
+ static_cast<thread_clock::rep>( ts.tv_sec ) * 1000000000 + ts.tv_nsec));
+
+ }
+#endif
+} }
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp
index fad60361a3b..fad60361a3b 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/process_cpu_clocks.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/thread_clock.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/thread_clock.hpp
index e4f8317ec67..e4f8317ec67 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/inlined/thread_clock.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/thread_clock.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/chrono.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/chrono.hpp
new file mode 100644
index 00000000000..570dc02a15b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/chrono.hpp
@@ -0,0 +1,150 @@
+// win/chrono.cpp --------------------------------------------------------------//
+
+// Copyright Beman Dawes 2008
+// Copyright 2009-2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+//----------------------------------------------------------------------------//
+// Windows //
+//----------------------------------------------------------------------------//
+#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
+#define BOOST_CHRONO_DETAIL_INLINED_WIN_CHRONO_HPP
+
+#include <boost/winapi/time.hpp>
+#include <boost/winapi/timers.hpp>
+#include <boost/winapi/get_last_error.hpp>
+#include <boost/assert.hpp>
+
+namespace boost
+{
+namespace chrono
+{
+namespace chrono_detail
+{
+
+ BOOST_CHRONO_INLINE double get_nanosecs_per_tic() BOOST_NOEXCEPT
+ {
+ boost::winapi::LARGE_INTEGER_ freq;
+ if ( !boost::winapi::QueryPerformanceFrequency( &freq ) )
+ return 0.0L;
+ return double(1000000000.0L / freq.QuadPart);
+ }
+
+}
+
+ steady_clock::time_point steady_clock::now() BOOST_NOEXCEPT
+ {
+ double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
+
+ boost::winapi::LARGE_INTEGER_ pcount;
+ if ( nanosecs_per_tic <= 0.0L )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - get_nanosecs_per_tic Internal Error");
+ return steady_clock::time_point();
+ }
+ unsigned times=0;
+ while ( ! boost::winapi::QueryPerformanceCounter( &pcount ) )
+ {
+ if ( ++times > 3 )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - QueryPerformanceCounter Internal Error");
+ return steady_clock::time_point();
+ }
+ }
+
+ return steady_clock::time_point(steady_clock::duration(
+ static_cast<steady_clock::rep>((nanosecs_per_tic) * pcount.QuadPart)));
+ }
+
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ steady_clock::time_point steady_clock::now( system::error_code & ec )
+ {
+ double nanosecs_per_tic = chrono_detail::get_nanosecs_per_tic();
+
+ boost::winapi::LARGE_INTEGER_ pcount;
+ if ( (nanosecs_per_tic <= 0.0L)
+ || (!boost::winapi::QueryPerformanceCounter( &pcount )) )
+ {
+ boost::winapi::DWORD_ cause =
+ ((nanosecs_per_tic <= 0.0L)
+ ? ERROR_NOT_SUPPORTED
+ : boost::winapi::GetLastError());
+ if (::boost::chrono::is_throws(ec)) {
+ boost::throw_exception(
+ system::system_error(
+ cause,
+ ::boost::system::system_category(),
+ "chrono::steady_clock" ));
+ }
+ else
+ {
+ ec.assign( cause, ::boost::system::system_category() );
+ return steady_clock::time_point(duration(0));
+ }
+ }
+
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(duration(
+ static_cast<steady_clock::rep>(nanosecs_per_tic * pcount.QuadPart)));
+ }
+#endif
+
+ BOOST_CHRONO_INLINE
+ system_clock::time_point system_clock::now() BOOST_NOEXCEPT
+ {
+ boost::winapi::FILETIME_ ft;
+ boost::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
+ return system_clock::time_point(
+ system_clock::duration(
+ ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
+ - 116444736000000000LL
+ //- (134775LL*864000000000LL)
+ )
+ );
+ }
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+ BOOST_CHRONO_INLINE
+ system_clock::time_point system_clock::now( system::error_code & ec )
+ {
+ boost::winapi::FILETIME_ ft;
+ boost::winapi::GetSystemTimeAsFileTime( &ft ); // never fails
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return system_clock::time_point(
+ system_clock::duration(
+ ((static_cast<__int64>( ft.dwHighDateTime ) << 32) | ft.dwLowDateTime)
+ - 116444736000000000LL
+ //- (134775LL*864000000000LL)
+ ));
+ }
+#endif
+
+ BOOST_CHRONO_INLINE
+ std::time_t system_clock::to_time_t(const system_clock::time_point& t) BOOST_NOEXCEPT
+ {
+ __int64 temp = t.time_since_epoch().count();
+ temp /= 10000000;
+ return static_cast<std::time_t>( temp );
+ }
+
+ BOOST_CHRONO_INLINE
+ system_clock::time_point system_clock::from_time_t(std::time_t t) BOOST_NOEXCEPT
+ {
+ __int64 temp = t;
+ temp *= 10000000;
+ return time_point(duration(temp));
+ }
+
+} // namespace chrono
+} // namespace boost
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
new file mode 100644
index 00000000000..a3a838a5cee
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/process_cpu_clocks.hpp
@@ -0,0 +1,281 @@
+// boost process_timer.cpp -----------------------------------------------------------//
+
+// Copyright Beman Dawes 1994, 2006, 2008
+// Copyright 2009-2010 Vicente J. Botet Escriba
+// Copyright (c) Microsoft Corporation 2014
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+//--------------------------------------------------------------------------------------//
+#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP
+#define BOOST_CHRONO_DETAIL_INLINED_WIN_PROCESS_CLOCK_HPP
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/process_cpu_clocks.hpp>
+#include <cassert>
+#include <time.h>
+#include <boost/assert.hpp>
+
+#include <boost/detail/winapi/get_last_error.hpp>
+#include <boost/detail/winapi/get_current_process.hpp>
+#if BOOST_PLAT_WINDOWS_DESKTOP
+#include <boost/detail/winapi/get_process_times.hpp>
+#endif
+
+namespace boost
+{
+namespace chrono
+{
+
+process_real_cpu_clock::time_point process_real_cpu_clock::now() BOOST_NOEXCEPT
+{
+ clock_t c = ::clock();
+ if ( c == clock_t(-1) ) // error
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC> >::type R;
+ return time_point(
+ duration(static_cast<rep>(c)*R::num/R::den)
+ );
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+process_real_cpu_clock::time_point process_real_cpu_clock::now(
+ system::error_code & ec)
+{
+ clock_t c = ::clock();
+ if ( c == clock_t(-1) ) // error
+ {
+ boost::throw_exception(
+ system::system_error(
+ errno,
+ ::boost::system::system_category(),
+ "chrono::process_real_cpu_clock" ));
+ }
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ typedef ratio_divide<giga, ratio<CLOCKS_PER_SEC> >::type R;
+ return time_point(
+ duration(static_cast<rep>(c)*R::num/R::den)
+ );
+}
+#endif
+
+#if BOOST_PLAT_WINDOWS_DESKTOP
+process_user_cpu_clock::time_point process_user_cpu_clock::now() BOOST_NOEXCEPT
+{
+
+ // note that Windows uses 100 nanosecond ticks for FILETIME
+ boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
+
+ if ( boost::detail::winapi::GetProcessTimes(
+ boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
+ &system_time, &user_time ) )
+ {
+ return time_point(duration(
+ ((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
+ | user_time.dwLowDateTime) * 100
+ ));
+ }
+ else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ return time_point();
+ }
+
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+process_user_cpu_clock::time_point process_user_cpu_clock::now(
+ system::error_code & ec)
+{
+
+ // note that Windows uses 100 nanosecond ticks for FILETIME
+ boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
+
+ if ( boost::detail::winapi::GetProcessTimes(
+ boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
+ &system_time, &user_time ) )
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(duration(
+ ((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
+ | user_time.dwLowDateTime) * 100
+ ));
+ }
+ else
+ {
+ boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ cause,
+ ::boost::system::system_category(),
+ "chrono::process_user_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( cause, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+
+}
+#endif
+
+process_system_cpu_clock::time_point process_system_cpu_clock::now() BOOST_NOEXCEPT
+{
+
+ // note that Windows uses 100 nanosecond ticks for FILETIME
+ boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
+
+ if ( boost::detail::winapi::GetProcessTimes(
+ boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
+ &system_time, &user_time ) )
+ {
+ return time_point(duration(
+ ((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
+ | system_time.dwLowDateTime) * 100
+ ));
+ }
+ else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ return time_point();
+ }
+
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+process_system_cpu_clock::time_point process_system_cpu_clock::now(
+ system::error_code & ec)
+{
+
+ // note that Windows uses 100 nanosecond ticks for FILETIME
+ boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
+
+ if ( boost::detail::winapi::GetProcessTimes(
+ boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
+ &system_time, &user_time ) )
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(duration(
+ ((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
+ | system_time.dwLowDateTime) * 100
+ ));
+ }
+ else
+ {
+ boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ cause,
+ ::boost::system::system_category(),
+ "chrono::process_system_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( cause, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+
+}
+#endif
+
+process_cpu_clock::time_point process_cpu_clock::now() BOOST_NOEXCEPT
+{
+
+ // note that Windows uses 100 nanosecond ticks for FILETIME
+ boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
+
+ if ( boost::detail::winapi::GetProcessTimes(
+ boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
+ &system_time, &user_time ) )
+ {
+ time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count()
+ ,
+ ((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
+ | user_time.dwLowDateTime
+ ) * 100,
+ ((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
+ | system_time.dwLowDateTime
+ ) * 100
+ );
+ return time_point(duration(r));
+ }
+ else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ return time_point();
+ }
+
+}
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+process_cpu_clock::time_point process_cpu_clock::now(
+ system::error_code & ec )
+{
+
+ // note that Windows uses 100 nanosecond ticks for FILETIME
+ boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
+
+ if ( boost::detail::winapi::GetProcessTimes(
+ boost::detail::winapi::GetCurrentProcess(), &creation, &exit,
+ &system_time, &user_time ) )
+ {
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ time_point::rep r(process_real_cpu_clock::now().time_since_epoch().count()
+ ,
+ ((static_cast<process_user_cpu_clock::rep>(user_time.dwHighDateTime) << 32)
+ | user_time.dwLowDateTime
+ ) * 100,
+ ((static_cast<process_system_cpu_clock::rep>(system_time.dwHighDateTime) << 32)
+ | system_time.dwLowDateTime
+ ) * 100
+ );
+ return time_point(duration(r));
+ }
+ else
+ {
+ boost::detail::winapi::DWORD_ cause = boost::detail::winapi::GetLastError();
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ cause,
+ ::boost::system::system_category(),
+ "chrono::process_cpu_clock" ));
+ }
+ else
+ {
+ ec.assign( cause, ::boost::system::system_category() );
+ return time_point();
+ }
+ }
+
+}
+#endif
+#endif
+} // namespace chrono
+} // namespace boost
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/thread_clock.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/thread_clock.hpp
new file mode 100644
index 00000000000..776e5b4cd0c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/inlined/win/thread_clock.hpp
@@ -0,0 +1,103 @@
+// boost thread_clock.cpp -----------------------------------------------------------//
+
+// Copyright 2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/chrono for documentation.
+
+//--------------------------------------------------------------------------------------//
+#ifndef BOOST_CHRONO_DETAIL_INLINED_WIN_THREAD_CLOCK_HPP
+#define BOOST_CHRONO_DETAIL_INLINED_WIN_THREAD_CLOCK_HPP
+
+#include <boost/chrono/config.hpp>
+#include <boost/chrono/thread_clock.hpp>
+#include <cassert>
+#include <boost/assert.hpp>
+
+#include <boost/detail/winapi/get_last_error.hpp>
+#include <boost/detail/winapi/get_current_thread.hpp>
+#include <boost/detail/winapi/get_thread_times.hpp>
+
+namespace boost
+{
+namespace chrono
+{
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+thread_clock::time_point thread_clock::now( system::error_code & ec )
+{
+ // note that Windows uses 100 nanosecond ticks for FILETIME
+ boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
+
+ if ( boost::detail::winapi::GetThreadTimes(
+ boost::detail::winapi::GetCurrentThread (), &creation, &exit,
+ &system_time, &user_time ) )
+ {
+ duration user = duration(
+ ((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
+ | user_time.dwLowDateTime) * 100 );
+
+ duration system = duration(
+ ((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
+ | system_time.dwLowDateTime) * 100 );
+
+ if (!::boost::chrono::is_throws(ec))
+ {
+ ec.clear();
+ }
+ return time_point(system+user);
+
+ }
+ else
+ {
+ if (::boost::chrono::is_throws(ec))
+ {
+ boost::throw_exception(
+ system::system_error(
+ boost::detail::winapi::GetLastError(),
+ ::boost::system::system_category(),
+ "chrono::thread_clock" ));
+ }
+ else
+ {
+ ec.assign( boost::detail::winapi::GetLastError(), ::boost::system::system_category() );
+ return thread_clock::time_point(duration(0));
+ }
+ }
+}
+#endif
+
+thread_clock::time_point thread_clock::now() BOOST_NOEXCEPT
+{
+
+ // note that Windows uses 100 nanosecond ticks for FILETIME
+ boost::detail::winapi::FILETIME_ creation, exit, user_time, system_time;
+
+ if ( boost::detail::winapi::GetThreadTimes(
+ boost::detail::winapi::GetCurrentThread (), &creation, &exit,
+ &system_time, &user_time ) )
+ {
+ duration user = duration(
+ ((static_cast<duration::rep>(user_time.dwHighDateTime) << 32)
+ | user_time.dwLowDateTime) * 100 );
+
+ duration system = duration(
+ ((static_cast<duration::rep>(system_time.dwHighDateTime) << 32)
+ | system_time.dwLowDateTime) * 100 );
+
+ return time_point(system+user);
+ }
+ else
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ return time_point();
+ }
+
+}
+
+} // namespace chrono
+} // namespace boost
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/is_evenly_divisible_by.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/is_evenly_divisible_by.hpp
index 960a208a750..960a208a750 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/is_evenly_divisible_by.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/is_evenly_divisible_by.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp
index 94936c8baf3..94936c8baf3 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/no_warning/signed_unsigned_cmp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/scan_keyword.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/scan_keyword.hpp
index aa4e2e87b9d..aa4e2e87b9d 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/scan_keyword.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/scan_keyword.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/detail/static_assert.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/static_assert.hpp
index 86151947547..86151947547 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/detail/static_assert.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/static_assert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/detail/system.hpp b/src/third_party/boost-1.69.0/boost/chrono/detail/system.hpp
new file mode 100644
index 00000000000..3d82006a0b4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/detail/system.hpp
@@ -0,0 +1,20 @@
+// Copyright 2009-2010 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+#ifndef BOOST_CHRONO_DETAIL_SYSTEM_HPP
+#define BOOST_CHRONO_DETAIL_SYSTEM_HPP
+
+#if !defined BOOST_CHRONO_DONT_PROVIDE_HYBRID_ERROR_HANDLING
+
+#include <boost/system/error_code.hpp>
+
+namespace boost {
+namespace chrono {
+ inline bool is_throws(system::error_code & ec) { return (&ec==&boost::throws()); }
+}
+}
+
+#endif
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/chrono/duration.hpp b/src/third_party/boost-1.69.0/boost/chrono/duration.hpp
index 0a09674f1a8..0a09674f1a8 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/duration.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/duration.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/floor.hpp b/src/third_party/boost-1.69.0/boost/chrono/floor.hpp
index eb85fa7446c..eb85fa7446c 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/floor.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/floor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/include.hpp b/src/third_party/boost-1.69.0/boost/chrono/include.hpp
index b58f76bef81..b58f76bef81 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/include.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/include.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/duration_get.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/duration_get.hpp
index 081f071084b..081f071084b 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/duration_get.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/duration_get.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/duration_io.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/duration_io.hpp
index f3aca6adfd4..f3aca6adfd4 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/duration_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/duration_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/duration_put.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/duration_put.hpp
index 623eae1bf6b..623eae1bf6b 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/duration_put.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/duration_put.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/duration_style.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/duration_style.hpp
index 65b76a902ca..65b76a902ca 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/duration_style.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/duration_style.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/duration_units.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/duration_units.hpp
index 84faa819a91..84faa819a91 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/duration_units.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/duration_units.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/ios_base_state.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/ios_base_state.hpp
index 1393e2e699f..1393e2e699f 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/ios_base_state.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/ios_base_state.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/time_point_get.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/time_point_get.hpp
index 44c641e6da4..44c641e6da4 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/time_point_get.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/time_point_get.hpp
diff --git a/src/third_party/boost-1.69.0/boost/chrono/io/time_point_io.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/time_point_io.hpp
new file mode 100644
index 00000000000..d0f854cfbbe
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/time_point_io.hpp
@@ -0,0 +1,1249 @@
+// (C) Copyright Howard Hinnant
+// (C) Copyright 2010-2011 Vicente J. Botet Escriba
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+
+//===-------------------------- locale ------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// This code was adapted by Vicente from Howard Hinnant's experimental work
+// on chrono i/o to Boost and some functions from libc++/locale to emulate the missing time_get::get()
+
+#ifndef BOOST_CHRONO_IO_TIME_POINT_IO_HPP
+#define BOOST_CHRONO_IO_TIME_POINT_IO_HPP
+
+#include <boost/chrono/io/time_point_put.hpp>
+#include <boost/chrono/io/time_point_get.hpp>
+#include <boost/chrono/io/duration_io.hpp>
+#include <boost/chrono/io/ios_base_state.hpp>
+#include <boost/chrono/io/utility/manip_base.hpp>
+#include <boost/chrono/time_point.hpp>
+#include <boost/chrono/clock_string.hpp>
+#include <boost/chrono/round.hpp>
+#include <boost/chrono/detail/scan_keyword.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+#include <cstring>
+#include <locale>
+#include <ctime>
+
+#if ( defined BOOST_WINDOWS && ! defined(__CYGWIN__) ) \
+ || (defined(sun) || defined(__sun)) \
+ || (defined __IBMCPP__) \
+ || defined __ANDROID__ \
+ || defined __QNXNTO__ \
+ || (defined(_AIX) && defined __GNUC__)
+#define BOOST_CHRONO_INTERNAL_TIMEGM
+#endif
+
+#if (defined BOOST_WINDOWS && ! defined(__CYGWIN__)) \
+ || ( (defined(sun) || defined(__sun)) && defined __GNUC__) \
+ || (defined __IBMCPP__) \
+ || defined __ANDROID__ \
+ || (defined(_AIX) && defined __GNUC__)
+#define BOOST_CHRONO_INTERNAL_GMTIME
+#endif
+
+#define BOOST_CHRONO_USES_INTERNAL_TIME_GET
+
+namespace boost
+{
+ namespace chrono
+ {
+ typedef double fractional_seconds;
+ namespace detail
+ {
+
+
+ template <class CharT, class InputIterator = std::istreambuf_iterator<CharT> >
+ struct time_get
+ {
+ std::time_get<CharT> const &that_;
+ time_get(std::time_get<CharT> const& that) : that_(that) {}
+
+ typedef std::time_get<CharT> facet;
+ typedef typename facet::iter_type iter_type;
+ typedef typename facet::char_type char_type;
+ typedef std::basic_string<char_type> string_type;
+
+ static int
+ get_up_to_n_digits(
+ InputIterator& b, InputIterator e,
+ std::ios_base::iostate& err,
+ const std::ctype<CharT>& ct,
+ int n)
+ {
+ // Precondition: n >= 1
+ if (b == e)
+ {
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
+ return 0;
+ }
+ // get first digit
+ CharT c = *b;
+ if (!ct.is(std::ctype_base::digit, c))
+ {
+ err |= std::ios_base::failbit;
+ return 0;
+ }
+ int r = ct.narrow(c, 0) - '0';
+ for (++b, --n; b != e && n > 0; ++b, --n)
+ {
+ // get next digit
+ c = *b;
+ if (!ct.is(std::ctype_base::digit, c))
+ return r;
+ r = r * 10 + ct.narrow(c, 0) - '0';
+ }
+ if (b == e)
+ err |= std::ios_base::eofbit;
+ return r;
+ }
+
+
+ void get_day(
+ int& d,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 31)
+ d = t;
+ else
+ err |= std::ios_base::failbit;
+ }
+
+ void get_month(
+ int& m,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 12)
+ m = --t;
+ else
+ err |= std::ios_base::failbit;
+ }
+
+
+ void get_year4(int& y,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 4);
+ if (!(err & std::ios_base::failbit))
+ y = t - 1900;
+ }
+
+ void
+ get_hour(int& h,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
+ if (!(err & std::ios_base::failbit) && t <= 23)
+ h = t;
+ else
+ err |= std::ios_base::failbit;
+ }
+
+ void
+ get_minute(int& m,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
+ if (!(err & std::ios_base::failbit) && t <= 59)
+ m = t;
+ else
+ err |= std::ios_base::failbit;
+ }
+
+ void get_second(int& s,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
+ if (!(err & std::ios_base::failbit) && t <= 60)
+ s = t;
+ else
+ err |= std::ios_base::failbit;
+ }
+
+ void get_white_space(iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ for (; b != e && ct.is(std::ctype_base::space, *b); ++b)
+ ;
+ if (b == e)
+ err |= std::ios_base::eofbit;
+ }
+
+ void get_12_hour(int& h,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 2);
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 12)
+ h = t;
+ else
+ err |= std::ios_base::failbit;
+ }
+
+ void get_percent(iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ if (b == e)
+ {
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
+ return;
+ }
+ if (ct.narrow(*b, 0) != '%')
+ err |= std::ios_base::failbit;
+ else if(++b == e)
+ err |= std::ios_base::eofbit;
+ }
+
+ void get_day_year_num(int& d,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 3);
+ if (!(err & std::ios_base::failbit) && 1 <= t && t <= 366)
+ d = --t;
+ else
+ err |= std::ios_base::failbit;
+ }
+
+ void
+ get_weekday(int& w,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ int t = get_up_to_n_digits(b, e, err, ct, 1);
+ if (!(err & std::ios_base::failbit) && t <= 6)
+ w = t;
+ else
+ err |= std::ios_base::failbit;
+ }
+#if 0
+
+ void
+ get_am_pm(int& h,
+ iter_type& b, iter_type e,
+ std::ios_base::iostate& err,
+ const std::ctype<char_type>& ct) const
+ {
+ const string_type* ap = am_pm();
+ if (ap[0].size() + ap[1].size() == 0)
+ {
+ err |= ios_base::failbit;
+ return;
+ }
+ ptrdiff_t i = detail::scan_keyword(b, e, ap, ap+2, ct, err, false) - ap;
+ if (i == 0 && h == 12)
+ h = 0;
+ else if (i == 1 && h < 12)
+ h += 12;
+ }
+
+#endif
+
+ InputIterator get(
+ iter_type b, iter_type e,
+ std::ios_base& iob,
+ std::ios_base::iostate& err,
+ std::tm* tm,
+ char fmt, char) const
+ {
+ err = std::ios_base::goodbit;
+ const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(iob.getloc());
+
+ switch (fmt)
+ {
+ case 'a':
+ case 'A':
+ {
+ std::tm tm2;
+ std::memset(&tm2, 0, sizeof(std::tm));
+ that_.get_weekday(b, e, iob, err, &tm2);
+ //tm->tm_wday = tm2.tm_wday;
+ }
+ break;
+ case 'b':
+ case 'B':
+ case 'h':
+ {
+ std::tm tm2;
+ std::memset(&tm2, 0, sizeof(std::tm));
+ that_.get_monthname(b, e, iob, err, &tm2);
+ //tm->tm_mon = tm2.tm_mon;
+ }
+ break;
+// case 'c':
+// {
+// const string_type& fm = c();
+// b = get(b, e, iob, err, tm, fm.data(), fm.data() + fm.size());
+// }
+// break;
+ case 'd':
+ case 'e':
+ get_day(tm->tm_mday, b, e, err, ct);
+ break;
+ case 'D':
+ {
+ const char_type fm[] = {'%', 'm', '/', '%', 'd', '/', '%', 'y'};
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
+ }
+ break;
+ case 'F':
+ {
+ const char_type fm[] = {'%', 'Y', '-', '%', 'm', '-', '%', 'd'};
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
+ }
+ break;
+ case 'H':
+ get_hour(tm->tm_hour, b, e, err, ct);
+ break;
+ case 'I':
+ get_12_hour(tm->tm_hour, b, e, err, ct);
+ break;
+ case 'j':
+ get_day_year_num(tm->tm_yday, b, e, err, ct);
+ break;
+ case 'm':
+ get_month(tm->tm_mon, b, e, err, ct);
+ break;
+ case 'M':
+ get_minute(tm->tm_min, b, e, err, ct);
+ break;
+ case 'n':
+ case 't':
+ get_white_space(b, e, err, ct);
+ break;
+// case 'p':
+// get_am_pm(tm->tm_hour, b, e, err, ct);
+// break;
+ case 'r':
+ {
+ const char_type fm[] = {'%', 'I', ':', '%', 'M', ':', '%', 'S', ' ', '%', 'p'};
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
+ }
+ break;
+ case 'R':
+ {
+ const char_type fm[] = {'%', 'H', ':', '%', 'M'};
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
+ }
+ break;
+ case 'S':
+ get_second(tm->tm_sec, b, e, err, ct);
+ break;
+ case 'T':
+ {
+ const char_type fm[] = {'%', 'H', ':', '%', 'M', ':', '%', 'S'};
+ b = get(b, e, iob, err, tm, fm, fm + sizeof(fm)/sizeof(fm[0]));
+ }
+ break;
+ case 'w':
+ {
+ get_weekday(tm->tm_wday, b, e, err, ct);
+ }
+ break;
+ case 'x':
+ return that_.get_date(b, e, iob, err, tm);
+// case 'X':
+// return that_.get_time(b, e, iob, err, tm);
+// {
+// const string_type& fm = X();
+// b = that_.get(b, e, iob, err, tm, fm.data(), fm.data() + fm.size());
+// }
+// break;
+// case 'y':
+// get_year(tm->tm_year, b, e, err, ct);
+ break;
+ case 'Y':
+ get_year4(tm->tm_year, b, e, err, ct);
+ break;
+ case '%':
+ get_percent(b, e, err, ct);
+ break;
+ default:
+ err |= std::ios_base::failbit;
+ }
+ return b;
+ }
+
+
+ InputIterator get(
+ iter_type b, iter_type e,
+ std::ios_base& iob,
+ std::ios_base::iostate& err, std::tm* tm,
+ const char_type* fmtb, const char_type* fmte) const
+ {
+ const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(iob.getloc());
+ err = std::ios_base::goodbit;
+ while (fmtb != fmte && err == std::ios_base::goodbit)
+ {
+ if (b == e)
+ {
+ err = std::ios_base::failbit;
+ break;
+ }
+ if (ct.narrow(*fmtb, 0) == '%')
+ {
+ if (++fmtb == fmte)
+ {
+ err = std::ios_base::failbit;
+ break;
+ }
+ char cmd = ct.narrow(*fmtb, 0);
+ char opt = '\0';
+ if (cmd == 'E' || cmd == '0')
+ {
+ if (++fmtb == fmte)
+ {
+ err = std::ios_base::failbit;
+ break;
+ }
+ opt = cmd;
+ cmd = ct.narrow(*fmtb, 0);
+ }
+ b = get(b, e, iob, err, tm, cmd, opt);
+ ++fmtb;
+ }
+ else if (ct.is(std::ctype_base::space, *fmtb))
+ {
+ for (++fmtb; fmtb != fmte && ct.is(std::ctype_base::space, *fmtb); ++fmtb)
+ ;
+ for ( ; b != e && ct.is(std::ctype_base::space, *b); ++b)
+ ;
+ }
+ else if (ct.toupper(*b) == ct.toupper(*fmtb))
+ {
+ ++b;
+ ++fmtb;
+ }
+ else
+ err = std::ios_base::failbit;
+ }
+ if (b == e)
+ err |= std::ios_base::eofbit;
+ return b;
+ }
+
+ };
+
+
+ template <class CharT>
+ class time_manip: public manip<time_manip<CharT> >
+ {
+ std::basic_string<CharT> fmt_;
+ timezone tz_;
+ public:
+
+ time_manip(timezone tz, std::basic_string<CharT> fmt)
+ // todo move semantics
+ :
+ fmt_(fmt), tz_(tz)
+ {
+ }
+
+ /**
+ * Change the timezone and time format ios state;
+ */
+ void operator()(std::ios_base &ios) const
+ {
+ set_time_fmt<CharT> (ios, fmt_);
+ set_timezone(ios, tz_);
+ }
+ };
+
+ class time_man: public manip<time_man>
+ {
+ timezone tz_;
+ public:
+
+ time_man(timezone tz)
+ // todo move semantics
+ :
+ tz_(tz)
+ {
+ }
+
+ /**
+ * Change the timezone and time format ios state;
+ */
+ void operator()(std::ios_base &ios) const
+ {
+ //set_time_fmt<typename out_stream::char_type>(ios, "");
+ set_timezone(ios, tz_);
+ }
+ };
+
+ }
+
+ template <class CharT>
+ inline detail::time_manip<CharT> time_fmt(timezone tz, const CharT* fmt)
+ {
+ return detail::time_manip<CharT>(tz, fmt);
+ }
+
+ template <class CharT>
+ inline detail::time_manip<CharT> time_fmt(timezone tz, std::basic_string<CharT> fmt)
+ {
+ // todo move semantics
+ return detail::time_manip<CharT>(tz, fmt);
+ }
+
+ inline detail::time_man time_fmt(timezone f)
+ {
+ return detail::time_man(f);
+ }
+
+ /**
+ * time_fmt_io_saver i/o saver.
+ *
+ * See Boost.IO i/o state savers for a motivating compression.
+ */
+ template <typename CharT = char, typename Traits = std::char_traits<CharT> >
+ struct time_fmt_io_saver
+ {
+
+ //! the type of the state to restore
+ //typedef std::basic_ostream<CharT, Traits> state_type;
+ typedef std::ios_base state_type;
+
+ //! the type of aspect to save
+ typedef std::basic_string<CharT, Traits> aspect_type;
+
+ /**
+ * Explicit construction from an i/o stream.
+ *
+ * Store a reference to the i/o stream and the value of the associated @c time format .
+ */
+ explicit time_fmt_io_saver(state_type &s) :
+ s_save_(s), a_save_(get_time_fmt<CharT>(s_save_))
+ {
+ }
+
+ /**
+ * Construction from an i/o stream and a @c time format to restore.
+ *
+ * Stores a reference to the i/o stream and the value @c new_value to restore given as parameter.
+ */
+ time_fmt_io_saver(state_type &s, aspect_type new_value) :
+ s_save_(s), a_save_(get_time_fmt<CharT>(s_save_))
+ {
+ set_time_fmt(s_save_, new_value);
+ }
+
+ /**
+ * Destructor.
+ *
+ * Restores the i/o stream with the format to be restored.
+ */
+ ~time_fmt_io_saver()
+ {
+ this->restore();
+ }
+
+ /**
+ * Restores the i/o stream with the time format to be restored.
+ */
+ void restore()
+ {
+ set_time_fmt(s_save_, a_save_);
+ }
+ private:
+ state_type& s_save_;
+ aspect_type a_save_;
+ };
+
+ /**
+ * timezone_io_saver i/o saver.
+ *
+ * See Boost.IO i/o state savers for a motivating compression.
+ */
+ struct timezone_io_saver
+ {
+
+ //! the type of the state to restore
+ typedef std::ios_base state_type;
+ //! the type of aspect to save
+ typedef timezone aspect_type;
+
+ /**
+ * Explicit construction from an i/o stream.
+ *
+ * Store a reference to the i/o stream and the value of the associated @c timezone.
+ */
+ explicit timezone_io_saver(state_type &s) :
+ s_save_(s), a_save_(get_timezone(s_save_))
+ {
+ }
+
+ /**
+ * Construction from an i/o stream and a @c timezone to restore.
+ *
+ * Stores a reference to the i/o stream and the value @c new_value to restore given as parameter.
+ */
+ timezone_io_saver(state_type &s, aspect_type new_value) :
+ s_save_(s), a_save_(get_timezone(s_save_))
+ {
+ set_timezone(s_save_, new_value);
+ }
+
+ /**
+ * Destructor.
+ *
+ * Restores the i/o stream with the format to be restored.
+ */
+ ~timezone_io_saver()
+ {
+ this->restore();
+ }
+
+ /**
+ * Restores the i/o stream with the timezone to be restored.
+ */
+ void restore()
+ {
+ set_timezone(s_save_, a_save_);
+ }
+ private:
+ timezone_io_saver& operator=(timezone_io_saver const& rhs) ;
+
+ state_type& s_save_;
+ aspect_type a_save_;
+ };
+
+ /**
+ *
+ * @param os
+ * @param tp
+ * @Effects Behaves as a formatted output function. After constructing a @c sentry object, if the @ sentry
+ * converts to true, calls to @c facet.put(os,os,os.fill(),tp) where @c facet is the @c time_point_put<CharT>
+ * facet associated to @c os or a new created instance of the default @c time_point_put<CharT> facet.
+ * @return @c os.
+ */
+ template <class CharT, class Traits, class Clock, class Duration>
+ std::basic_ostream<CharT, Traits>&
+ operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<Clock, Duration>& tp)
+ {
+
+ bool failed = false;
+ BOOST_TRY
+ {
+ std::ios_base::iostate err = std::ios_base::goodbit;
+ BOOST_TRY
+ {
+ typename std::basic_ostream<CharT, Traits>::sentry opfx(os);
+ if (bool(opfx))
+ {
+ if (!std::has_facet<time_point_put<CharT> >(os.getloc()))
+ {
+ if (time_point_put<CharT> ().put(os, os, os.fill(), tp) .failed())
+ {
+ err = std::ios_base::badbit;
+ }
+ }
+ else
+ {
+ if (std::use_facet<time_point_put<CharT> >(os.getloc()) .put(os, os, os.fill(), tp).failed())
+ {
+ err = std::ios_base::badbit;
+ }
+ }
+ os.width(0);
+ }
+ }
+ BOOST_CATCH (...)
+ {
+ bool flag = false;
+ BOOST_TRY
+ {
+ os.setstate(std::ios_base::failbit);
+ }
+ BOOST_CATCH (std::ios_base::failure )
+ {
+ flag = true;
+ }
+ BOOST_CATCH_END
+ if (flag) throw;
+ }
+ BOOST_CATCH_END
+ if (err) os.setstate(err);
+ return os;
+ }
+ BOOST_CATCH (...)
+ {
+ failed = true;
+ }
+ BOOST_CATCH_END
+ if (failed) os.setstate(std::ios_base::failbit | std::ios_base::badbit);
+ return os;
+ }
+
+ template <class CharT, class Traits, class Clock, class Duration>
+ std::basic_istream<CharT, Traits>&
+ operator>>(std::basic_istream<CharT, Traits>& is, time_point<Clock, Duration>& tp)
+ {
+ std::ios_base::iostate err = std::ios_base::goodbit;
+
+ BOOST_TRY
+ {
+ typename std::basic_istream<CharT, Traits>::sentry ipfx(is);
+ if (bool(ipfx))
+ {
+ if (!std::has_facet<time_point_get<CharT> >(is.getloc()))
+ {
+ time_point_get<CharT> ().get(is, std::istreambuf_iterator<CharT, Traits>(), is, err, tp);
+ }
+ else
+ {
+ std::use_facet<time_point_get<CharT> >(is.getloc()).get(is, std::istreambuf_iterator<CharT, Traits>(), is,
+ err, tp);
+ }
+ }
+ }
+ BOOST_CATCH (...)
+ {
+ bool flag = false;
+ BOOST_TRY
+ {
+ is.setstate(std::ios_base::failbit);
+ }
+ BOOST_CATCH (std::ios_base::failure )
+ {
+ flag = true;
+ }
+ BOOST_CATCH_END
+ if (flag) throw;
+ }
+ BOOST_CATCH_END
+ if (err) is.setstate(err);
+ return is;
+ }
+
+
+ namespace detail
+ {
+
+//#if defined BOOST_CHRONO_INTERNAL_TIMEGM
+
+ inline int32_t is_leap(int32_t year)
+ {
+ if(year % 400 == 0)
+ return 1;
+ if(year % 100 == 0)
+ return 0;
+ if(year % 4 == 0)
+ return 1;
+ return 0;
+ }
+ inline int32_t days_from_0(int32_t year)
+ {
+ year--;
+ return 365 * year + (year / 400) - (year/100) + (year / 4);
+ }
+ inline int32_t days_from_1970(int32_t year)
+ {
+ static const int32_t days_from_0_to_1970 = days_from_0(1970);
+ return days_from_0(year) - days_from_0_to_1970;
+ }
+ inline int32_t days_from_1jan(int32_t year,int32_t month,int32_t day)
+ {
+ static const int32_t days[2][12] =
+ {
+ { 0,31,59,90,120,151,181,212,243,273,304,334},
+ { 0,31,60,91,121,152,182,213,244,274,305,335}
+ };
+
+ return days[is_leap(year)][month-1] + day - 1;
+ }
+
+ inline time_t internal_timegm(std::tm const *t)
+ {
+ int year = t->tm_year + 1900;
+ int month = t->tm_mon;
+ if(month > 11)
+ {
+ year += month/12;
+ month %= 12;
+ }
+ else if(month < 0)
+ {
+ int years_diff = (-month + 11)/12;
+ year -= years_diff;
+ month+=12 * years_diff;
+ }
+ month++;
+ int day = t->tm_mday;
+ int day_of_year = days_from_1jan(year,month,day);
+ int days_since_epoch = days_from_1970(year) + day_of_year ;
+
+ time_t seconds_in_day = 3600 * 24;
+ time_t result = seconds_in_day * days_since_epoch + 3600 * t->tm_hour + 60 * t->tm_min + t->tm_sec;
+
+ return result;
+ }
+//#endif
+
+ /**
+ * from_ymd could be made more efficient by using a table
+ * day_count_table indexed by the y%400.
+ * This table could contain the day_count
+ * by*365 + by/4 - by/100 + by/400
+ *
+ * from_ymd = (by/400)*days_by_400_years+day_count_table[by%400] +
+ * days_in_year_before[is_leap_table[by%400]][m-1] + d;
+ */
+ inline unsigned days_before_years(int32_t y)
+ {
+ return y * 365 + y / 4 - y / 100 + y / 400;
+ }
+
+ // Returns year/month/day triple in civil calendar
+ // Preconditions: z is number of days since 1970-01-01 and is in the range:
+ // [numeric_limits<Int>::min(), numeric_limits<Int>::max()-719468].
+ template <class Int>
+ //constexpr
+ void
+ inline civil_from_days(Int z, Int& y, unsigned& m, unsigned& d) BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT_MSG(std::numeric_limits<unsigned>::digits >= 18,
+ "This algorithm has not been ported to a 16 bit unsigned integer");
+ BOOST_STATIC_ASSERT_MSG(std::numeric_limits<Int>::digits >= 20,
+ "This algorithm has not been ported to a 16 bit signed integer");
+ z += 719468;
+ const Int era = (z >= 0 ? z : z - 146096) / 146097;
+ const unsigned doe = static_cast<unsigned>(z - era * 146097); // [0, 146096]
+ const unsigned yoe = (doe - doe/1460 + doe/36524 - doe/146096) / 365; // [0, 399]
+ y = static_cast<Int>(yoe) + era * 400;
+ const unsigned doy = doe - (365*yoe + yoe/4 - yoe/100); // [0, 365]
+ const unsigned mp = (5*doy + 2)/153; // [0, 11]
+ d = doy - (153*mp+2)/5 + 1; // [1, 31]
+ m = mp + (mp < 10 ? 3 : -9); // [1, 12]
+ y += (m <= 2);
+ --m;
+ }
+ inline std::tm * internal_gmtime(std::time_t const* t, std::tm *tm)
+ {
+ if (t==0) return 0;
+ if (tm==0) return 0;
+
+#if 0
+ static const unsigned char
+ day_of_year_month[2][366] =
+ {
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12 },
+
+ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12
+
+ } };
+
+ static const int32_t days_in_year_before[2][13] =
+ {
+ { -1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364 },
+ { -1, 30, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 }
+ };
+#endif
+
+ const time_t seconds_in_day = 3600 * 24;
+ int32_t days_since_epoch = static_cast<int32_t>(*t / seconds_in_day);
+ int32_t hms = static_cast<int32_t>(*t - seconds_in_day*days_since_epoch);
+ if (hms < 0) {
+ days_since_epoch-=1;
+ hms = seconds_in_day+hms;
+ }
+
+#if 0
+ int32_t x = days_since_epoch;
+ int32_t y = static_cast<int32_t> (static_cast<long long> (x + 2) * 400
+ / 146097);
+ const int32_t ym1 = y - 1;
+ int32_t doy = x - days_before_years(y);
+ const int32_t doy1 = x - days_before_years(ym1);
+ const int32_t N = std::numeric_limits<int>::digits - 1;
+ const int32_t mask1 = doy >> N; // arithmetic rshift - not portable - but nearly universal
+ const int32_t mask0 = ~mask1;
+ doy = (doy & mask0) | (doy1 & mask1);
+ y = (y & mask0) | (ym1 & mask1);
+ //y -= 32767 + 2;
+ y += 70;
+ tm->tm_year=y;
+ const int32_t leap = is_leap(y);
+ tm->tm_mon = day_of_year_month[leap][doy]-1;
+ tm->tm_mday = doy - days_in_year_before[leap][tm->tm_mon] ;
+#else
+ int32_t y;
+ unsigned m, d;
+ civil_from_days(days_since_epoch, y, m, d);
+ tm->tm_year=y-1900; tm->tm_mon=m; tm->tm_mday=d;
+#endif
+
+ tm->tm_hour = hms / 3600;
+ const int ms = hms % 3600;
+ tm->tm_min = ms / 60;
+ tm->tm_sec = ms % 60;
+
+ tm->tm_isdst = -1;
+ (void)mktime(tm);
+ return tm;
+ }
+
+ } // detail
+#ifndef BOOST_CHRONO_NO_UTC_TIMEPOINT
+
+#if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
+
+ template <class CharT, class Traits, class Duration>
+ std::basic_ostream<CharT, Traits>&
+ operator<<(std::basic_ostream<CharT, Traits>& os, const time_point<system_clock, Duration>& tp)
+ {
+ typename std::basic_ostream<CharT, Traits>::sentry ok(os);
+ if (bool(ok))
+ {
+ bool failed = false;
+ BOOST_TRY
+ {
+ const CharT* pb = 0; //nullptr;
+ const CharT* pe = pb;
+ std::basic_string<CharT> fmt = get_time_fmt<CharT> (os);
+ pb = fmt.data();
+ pe = pb + fmt.size();
+
+ timezone tz = get_timezone(os);
+ std::locale loc = os.getloc();
+ time_t t = system_clock::to_time_t(time_point_cast<system_clock::duration>(tp));
+ std::tm tm;
+ std::memset(&tm, 0, sizeof(std::tm));
+ if (tz == timezone::local)
+ {
+#if defined BOOST_WINDOWS && ! defined(__CYGWIN__)
+#if BOOST_MSVC < 1400 // localtime_s doesn't exist in vc7.1
+ std::tm *tmp = 0;
+ if ((tmp=localtime(&t)) == 0)
+ failed = true;
+ else
+ tm =*tmp;
+# else
+ if (localtime_s(&tm, &t) != 0) failed = true;
+# endif
+#else
+ if (localtime_r(&t, &tm) == 0) failed = true;
+#endif
+ }
+ else
+ {
+#if defined BOOST_CHRONO_INTERNAL_GMTIME
+ if (detail::internal_gmtime(&t, &tm) == 0) failed = true;
+
+#elif defined BOOST_WINDOWS && ! defined(__CYGWIN__)
+ std::tm *tmp = 0;
+ if((tmp = gmtime(&t)) == 0)
+ failed = true;
+ else
+ tm = *tmp;
+#else
+ if (gmtime_r(&t, &tm) == 0) failed = true;
+ tm.tm_isdst = -1;
+ (void)mktime(&tm);
+
+#endif
+
+ }
+ if (!failed)
+ {
+ const std::time_put<CharT>& tpf = std::use_facet<std::time_put<CharT> >(loc);
+ if (pb == pe)
+ {
+ CharT pattern[] =
+ { '%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', '%', 'H', ':', '%', 'M', ':' };
+ pb = pattern;
+ pe = pb + sizeof (pattern) / sizeof(CharT);
+ failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
+ if (!failed)
+ {
+ duration<fractional_seconds> d = tp - system_clock::from_time_t(t) + seconds(tm.tm_sec);
+ if (d.count() < 10) os << CharT('0');
+ //if (! os.good()) {
+ // throw "exception";
+ //}
+ std::ios::fmtflags flgs = os.flags();
+ os.setf(std::ios::fixed, std::ios::floatfield);
+ //if (! os.good()) {
+ //throw "exception";
+ //}
+ os.precision(9);
+ os << d.count();
+ //if (! os.good()) {
+ //throw "exception";
+ //}
+ os.flags(flgs);
+ if (tz == timezone::local)
+ {
+ CharT sub_pattern[] =
+ { ' ', '%', 'z' };
+ pb = sub_pattern;
+ pe = pb + +sizeof (sub_pattern) / sizeof(CharT);
+ failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
+ }
+ else
+ {
+ CharT sub_pattern[] =
+ { ' ', '+', '0', '0', '0', '0', 0 };
+ os << sub_pattern;
+ }
+ }
+ }
+ else
+ {
+ failed = tpf.put(os, os, os.fill(), &tm, pb, pe).failed();
+ }
+ }
+ }
+ BOOST_CATCH (...)
+ {
+ failed = true;
+ }
+ BOOST_CATCH_END
+ if (failed)
+ {
+ os.setstate(std::ios_base::failbit | std::ios_base::badbit);
+ }
+ }
+ return os;
+ }
+#endif
+
+ namespace detail
+ {
+
+ template <class CharT, class InputIterator>
+ minutes extract_z(InputIterator& b, InputIterator e, std::ios_base::iostate& err, const std::ctype<CharT>& ct)
+ {
+ int min = 0;
+ if (b != e)
+ {
+ char cn = ct.narrow(*b, 0);
+ if (cn != '+' && cn != '-')
+ {
+ err |= std::ios_base::failbit;
+ return minutes(0);
+ }
+ int sn = cn == '-' ? -1 : 1;
+ int hr = 0;
+ for (int i = 0; i < 2; ++i)
+ {
+ if (++b == e)
+ {
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
+ return minutes(0);
+ }
+ cn = ct.narrow(*b, 0);
+ if (! ('0' <= cn && cn <= '9'))
+ {
+ err |= std::ios_base::failbit;
+ return minutes(0);
+ }
+ hr = hr * 10 + cn - '0';
+ }
+ for (int i = 0; i < 2; ++i)
+ {
+ if (++b == e)
+ {
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
+ return minutes(0);
+ }
+ cn = ct.narrow(*b, 0);
+ if (! ('0' <= cn && cn <= '9'))
+ {
+ err |= std::ios_base::failbit;
+ return minutes(0);
+ }
+ min = min * 10 + cn - '0';
+ }
+ if (++b == e) {
+ err |= std::ios_base::eofbit;
+ }
+ min += hr * 60;
+ min *= sn;
+ }
+ else
+ {
+ err |= std::ios_base::eofbit | std::ios_base::failbit;
+ }
+ return minutes(min);
+ }
+
+ } // detail
+
+#if defined BOOST_CHRONO_PROVIDES_DATE_IO_FOR_SYSTEM_CLOCK_TIME_POINT
+
+ template <class CharT, class Traits, class Duration>
+ std::basic_istream<CharT, Traits>&
+ operator>>(std::basic_istream<CharT, Traits>& is, time_point<system_clock, Duration>& tp)
+ {
+ typename std::basic_istream<CharT, Traits>::sentry ok(is);
+ if (bool(ok))
+ {
+ std::ios_base::iostate err = std::ios_base::goodbit;
+ BOOST_TRY
+ {
+ const CharT* pb = 0; //nullptr;
+ const CharT* pe = pb;
+ std::basic_string<CharT> fmt = get_time_fmt<CharT> (is);
+ pb = fmt.data();
+ pe = pb + fmt.size();
+
+ timezone tz = get_timezone(is);
+ std::locale loc = is.getloc();
+ const std::time_get<CharT>& tg = std::use_facet<std::time_get<CharT> >(loc);
+ const std::ctype<CharT>& ct = std::use_facet<std::ctype<CharT> >(loc);
+ tm tm; // {0}
+ std::memset(&tm, 0, sizeof(std::tm));
+
+ typedef std::istreambuf_iterator<CharT, Traits> It;
+ if (pb == pe)
+ {
+ CharT pattern[] =
+ { '%', 'Y', '-', '%', 'm', '-', '%', 'd', ' ', '%', 'H', ':', '%', 'M', ':' };
+ pb = pattern;
+ pe = pb + sizeof (pattern) / sizeof(CharT);
+
+#if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
+ const detail::time_get<CharT>& dtg(tg);
+ dtg.get(is, 0, is, err, &tm, pb, pe);
+#else
+ tg.get(is, 0, is, err, &tm, pb, pe);
+#endif
+ if (err & std::ios_base::failbit) goto exit;
+ fractional_seconds sec;
+ CharT c = CharT();
+ std::ios::fmtflags flgs = is.flags();
+ is.setf(std::ios::fixed, std::ios::floatfield);
+ is.precision(9);
+ is >> sec;
+ is.flags(flgs);
+ if (is.fail())
+ {
+ err |= std::ios_base::failbit;
+ goto exit;
+ }
+ It i(is);
+ It eof;
+ c = *i;
+ if (++i == eof || c != ' ')
+ {
+ err |= std::ios_base::failbit;
+ goto exit;
+ }
+ minutes min = detail::extract_z(i, eof, err, ct);
+
+ if (err & std::ios_base::failbit) goto exit;
+ time_t t;
+
+#if defined BOOST_CHRONO_INTERNAL_TIMEGM
+ t = detail::internal_timegm(&tm);
+#else
+ t = timegm(&tm);
+#endif
+ tp = time_point_cast<Duration>(
+ system_clock::from_time_t(t) - min + round<system_clock::duration> (duration<fractional_seconds> (sec))
+ );
+ }
+ else
+ {
+ const CharT z[2] =
+ { '%', 'z' };
+ const CharT* fz = std::search(pb, pe, z, z + 2);
+#if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
+ const detail::time_get<CharT>& dtg(tg);
+ dtg.get(is, 0, is, err, &tm, pb, fz);
+#else
+ tg.get(is, 0, is, err, &tm, pb, fz);
+#endif
+ minutes minu(0);
+ if (fz != pe)
+ {
+ if (err != std::ios_base::goodbit)
+ {
+ err |= std::ios_base::failbit;
+ goto exit;
+ }
+ It i(is);
+ It eof;
+ minu = detail::extract_z(i, eof, err, ct);
+ if (err & std::ios_base::failbit) goto exit;
+ if (fz + 2 != pe)
+ {
+ if (err != std::ios_base::goodbit)
+ {
+ err |= std::ios_base::failbit;
+ goto exit;
+ }
+#if defined BOOST_CHRONO_USES_INTERNAL_TIME_GET
+ const detail::time_get<CharT>& dtg(tg);
+ dtg.get(is, 0, is, err, &tm, fz + 2, pe);
+#else
+ tg.get(is, 0, is, err, &tm, fz + 2, pe);
+#endif
+ if (err & std::ios_base::failbit) goto exit;
+ }
+ }
+ tm.tm_isdst = -1;
+ time_t t;
+ if (tz == timezone::utc || fz != pe)
+ {
+#if defined BOOST_CHRONO_INTERNAL_TIMEGM
+ t = detail::internal_timegm(&tm);
+#else
+ t = timegm(&tm);
+#endif
+ }
+ else
+ {
+ t = mktime(&tm);
+ }
+ tp = time_point_cast<Duration>(
+ system_clock::from_time_t(t) - minu
+ );
+ }
+ }
+ BOOST_CATCH (...)
+ {
+ err |= std::ios_base::badbit | std::ios_base::failbit;
+ }
+ BOOST_CATCH_END
+ exit: is.setstate(err);
+ }
+ return is;
+ }
+
+#endif
+#endif //UTC
+ } // chrono
+
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/time_point_put.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/time_point_put.hpp
index 9c8c7cadd01..9c8c7cadd01 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/time_point_put.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/time_point_put.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/time_point_units.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/time_point_units.hpp
index 6a4999a5e5c..6a4999a5e5c 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/time_point_units.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/time_point_units.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/timezone.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/timezone.hpp
index 67975da96fb..67975da96fb 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/timezone.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/timezone.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/utility/ios_base_state_ptr.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/utility/ios_base_state_ptr.hpp
index 15c8ac4d66e..15c8ac4d66e 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/utility/ios_base_state_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/utility/ios_base_state_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/utility/manip_base.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/utility/manip_base.hpp
index f4a5f562c44..f4a5f562c44 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/utility/manip_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/utility/manip_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io/utility/to_string.hpp b/src/third_party/boost-1.69.0/boost/chrono/io/utility/to_string.hpp
index 4717ba6ad37..4717ba6ad37 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io/utility/to_string.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io/utility/to_string.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/io_v1/chrono_io.hpp b/src/third_party/boost-1.69.0/boost/chrono/io_v1/chrono_io.hpp
index afcc9ed7c93..afcc9ed7c93 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/io_v1/chrono_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/io_v1/chrono_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/process_cpu_clocks.hpp b/src/third_party/boost-1.69.0/boost/chrono/process_cpu_clocks.hpp
index 93d3c94ac80..93d3c94ac80 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/process_cpu_clocks.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/process_cpu_clocks.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/round.hpp b/src/third_party/boost-1.69.0/boost/chrono/round.hpp
index 09741fcf098..09741fcf098 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/round.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/round.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/system_clocks.hpp b/src/third_party/boost-1.69.0/boost/chrono/system_clocks.hpp
index 5ba6a3b0e9c..5ba6a3b0e9c 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/system_clocks.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/system_clocks.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/thread_clock.hpp b/src/third_party/boost-1.69.0/boost/chrono/thread_clock.hpp
index 207697b4cc8..207697b4cc8 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/thread_clock.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/thread_clock.hpp
diff --git a/src/third_party/boost-1.68.0/boost/chrono/time_point.hpp b/src/third_party/boost-1.69.0/boost/chrono/time_point.hpp
index fc230955d93..fc230955d93 100644
--- a/src/third_party/boost-1.68.0/boost/chrono/time_point.hpp
+++ b/src/third_party/boost-1.69.0/boost/chrono/time_point.hpp
diff --git a/src/third_party/boost-1.68.0/boost/compressed_pair.hpp b/src/third_party/boost-1.69.0/boost/compressed_pair.hpp
index a7be0f2ba2e..a7be0f2ba2e 100644
--- a/src/third_party/boost-1.68.0/boost/compressed_pair.hpp
+++ b/src/third_party/boost-1.69.0/boost/compressed_pair.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/assert.hpp b/src/third_party/boost-1.69.0/boost/concept/assert.hpp
new file mode 100644
index 00000000000..36c3b03f330
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/concept/assert.hpp
@@ -0,0 +1,45 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_ASSERT_DWA2006430_HPP
+# define BOOST_CONCEPT_ASSERT_DWA2006430_HPP
+
+# include <boost/config.hpp>
+# include <boost/config/workaround.hpp>
+
+// The old protocol used a constraints() member function in concept
+// checking classes. If the compiler supports SFINAE, we can detect
+// that function and seamlessly support the old concept checking
+// classes. In this release, backward compatibility with the old
+// concept checking classes is enabled by default, where available.
+// The old protocol is deprecated, though, and backward compatibility
+// will no longer be the default in the next release.
+
+# if !defined(BOOST_NO_OLD_CONCEPT_SUPPORT) \
+ && !defined(BOOST_NO_SFINAE) \
+ \
+ && !(BOOST_WORKAROUND(__GNUC__, == 3) && BOOST_WORKAROUND(__GNUC_MINOR__, < 4))
+
+// Note: gcc-2.96 through 3.3.x have some SFINAE, but no ability to
+// check for the presence of particularmember functions.
+
+# define BOOST_OLD_CONCEPT_SUPPORT
+
+# endif
+
+# ifdef BOOST_MSVC
+# include <boost/concept/detail/msvc.hpp>
+# elif BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+# include <boost/concept/detail/borland.hpp>
+# else
+# include <boost/concept/detail/general.hpp>
+# endif
+
+ // Usage, in class or function context:
+ //
+ // BOOST_CONCEPT_ASSERT((UnaryFunctionConcept<F,bool,int>));
+ //
+# define BOOST_CONCEPT_ASSERT(ModelInParens) \
+ BOOST_CONCEPT_ASSERT_FN(void(*)ModelInParens)
+
+#endif // BOOST_CONCEPT_ASSERT_DWA2006430_HPP
diff --git a/src/third_party/boost-1.68.0/boost/concept/detail/backward_compatibility.hpp b/src/third_party/boost-1.69.0/boost/concept/detail/backward_compatibility.hpp
index 66d573ef4bb..66d573ef4bb 100644
--- a/src/third_party/boost-1.68.0/boost/concept/detail/backward_compatibility.hpp
+++ b/src/third_party/boost-1.69.0/boost/concept/detail/backward_compatibility.hpp
diff --git a/src/third_party/boost-1.68.0/boost/concept/detail/borland.hpp b/src/third_party/boost-1.69.0/boost/concept/detail/borland.hpp
index 300d5d40503..300d5d40503 100644
--- a/src/third_party/boost-1.68.0/boost/concept/detail/borland.hpp
+++ b/src/third_party/boost-1.69.0/boost/concept/detail/borland.hpp
diff --git a/src/third_party/boost-1.68.0/boost/concept/detail/concept_def.hpp b/src/third_party/boost-1.69.0/boost/concept/detail/concept_def.hpp
index 750561ee301..750561ee301 100644
--- a/src/third_party/boost-1.68.0/boost/concept/detail/concept_def.hpp
+++ b/src/third_party/boost-1.69.0/boost/concept/detail/concept_def.hpp
diff --git a/src/third_party/boost-1.68.0/boost/concept/detail/concept_undef.hpp b/src/third_party/boost-1.69.0/boost/concept/detail/concept_undef.hpp
index 713db89123b..713db89123b 100644
--- a/src/third_party/boost-1.68.0/boost/concept/detail/concept_undef.hpp
+++ b/src/third_party/boost-1.69.0/boost/concept/detail/concept_undef.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/general.hpp b/src/third_party/boost-1.69.0/boost/concept/detail/general.hpp
new file mode 100644
index 00000000000..eeb08750f1c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/concept/detail/general.hpp
@@ -0,0 +1,77 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
+
+# include <boost/config.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+# include <boost/concept/detail/has_constraints.hpp>
+# include <boost/type_traits/conditional.hpp>
+# endif
+
+// This implementation works on Comeau and GCC, all the way back to
+// 2.95
+namespace boost { namespace concepts {
+
+template <class ModelFn>
+struct requirement_;
+
+namespace detail
+{
+ template <void(*)()> struct instantiate {};
+}
+
+template <class Model>
+struct requirement
+{
+ static void failed() { ((Model*)0)->~Model(); }
+};
+
+struct failed {};
+
+template <class Model>
+struct requirement<failed ************ Model::************>
+{
+ static void failed() { ((Model*)0)->~Model(); }
+};
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+
+template <class Model>
+struct constraint
+{
+ static void failed() { ((Model*)0)->constraints(); }
+};
+
+template <class Model>
+struct requirement_<void(*)(Model)>
+ : boost::conditional<
+ concepts::not_satisfied<Model>::value
+ , constraint<Model>
+ , requirement<failed ************ Model::************>
+ >::type
+{};
+
+# else
+
+// For GCC-2.x, these can't have exactly the same name
+template <class Model>
+struct requirement_<void(*)(Model)>
+ : requirement<failed ************ Model::************>
+{};
+
+# endif
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+ typedef ::boost::concepts::detail::instantiate< \
+ &::boost::concepts::requirement_<ModelFnPtr>::failed> \
+ BOOST_PP_CAT(boost_concept_check,__LINE__) \
+ BOOST_ATTRIBUTE_UNUSED
+
+}}
+
+#endif // BOOST_CONCEPT_DETAIL_GENERAL_DWA2006429_HPP
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/has_constraints.hpp b/src/third_party/boost-1.69.0/boost/concept/detail/has_constraints.hpp
new file mode 100644
index 00000000000..dc2c20714e5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/concept/detail/has_constraints.hpp
@@ -0,0 +1,50 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
+# define BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
+
+# include <boost/type_traits/integral_constant.hpp>
+# include <boost/config/workaround.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+
+namespace boost { namespace concepts {
+
+namespace detail
+{
+
+// Here we implement the metafunction that detects whether a
+// constraints metafunction exists
+ typedef char yes;
+ typedef char (&no)[2];
+
+ template <class Model, void (Model::*)()>
+ struct wrap_constraints {};
+
+#if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580) || defined(__CUDACC__)
+ // Work around the following bogus error in Sun Studio 11, by
+ // turning off the has_constraints function entirely:
+ // Error: complex expression not allowed in dependent template
+ // argument expression
+ inline no has_constraints_(...);
+#else
+ template <class Model>
+ inline yes has_constraints_(Model*, wrap_constraints<Model,&Model::constraints>* = 0);
+ inline no has_constraints_(...);
+#endif
+}
+
+// This would be called "detail::has_constraints," but it has a strong
+// tendency to show up in error messages.
+template <class Model>
+struct not_satisfied
+{
+ BOOST_STATIC_CONSTANT(
+ bool
+ , value = sizeof( detail::has_constraints_((Model*)0) ) == sizeof(detail::yes) );
+ typedef boost::integral_constant<bool, value> type;
+};
+
+}} // namespace boost::concepts::detail
+
+#endif // BOOST_CONCEPT_DETAIL_HAS_CONSTRAINTS_DWA2006429_HPP
diff --git a/src/third_party/boost-1.69.0/boost/concept/detail/msvc.hpp b/src/third_party/boost-1.69.0/boost/concept/detail/msvc.hpp
new file mode 100644
index 00000000000..933ac02a52d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/concept/detail/msvc.hpp
@@ -0,0 +1,123 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
+# define BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
+
+# include <boost/preprocessor/cat.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+# include <boost/config.hpp>
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+# include <boost/concept/detail/has_constraints.hpp>
+# include <boost/type_traits/conditional.hpp>
+# endif
+
+# ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4100)
+# endif
+
+namespace boost { namespace concepts {
+
+
+template <class Model>
+struct check
+{
+ virtual void failed(Model* x)
+ {
+ x->~Model();
+ }
+};
+
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+struct failed {};
+template <class Model>
+struct check<failed ************ Model::************>
+{
+ virtual void failed(Model* x)
+ {
+ x->~Model();
+ }
+};
+# endif
+
+# ifdef BOOST_OLD_CONCEPT_SUPPORT
+
+namespace detail
+{
+ // No need for a virtual function here, since evaluating
+ // not_satisfied below will have already instantiated the
+ // constraints() member.
+ struct constraint {};
+}
+
+template <class Model>
+struct require
+ : boost::conditional<
+ not_satisfied<Model>::value
+ , detail::constraint
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+ , check<Model>
+# else
+ , check<failed ************ Model::************>
+# endif
+ >::type
+{};
+
+# else
+
+template <class Model>
+struct require
+# ifndef BOOST_NO_PARTIAL_SPECIALIZATION
+ : check<Model>
+# else
+ : check<failed ************ Model::************>
+# endif
+{};
+
+# endif
+
+# if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+
+//
+// The iterator library sees some really strange errors unless we
+// do things this way.
+//
+template <class Model>
+struct require<void(*)(Model)>
+{
+ virtual void failed(Model*)
+ {
+ require<Model>();
+ }
+};
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+enum \
+{ \
+ BOOST_PP_CAT(boost_concept_check,__LINE__) = \
+ sizeof(::boost::concepts::require<ModelFnPtr>) \
+}
+
+# else // Not vc-7.1
+
+template <class Model>
+require<Model>
+require_(void(*)(Model));
+
+# define BOOST_CONCEPT_ASSERT_FN( ModelFnPtr ) \
+enum \
+{ \
+ BOOST_PP_CAT(boost_concept_check,__LINE__) = \
+ sizeof(::boost::concepts::require_((ModelFnPtr)0)) \
+}
+
+# endif
+}}
+
+# ifdef BOOST_MSVC
+# pragma warning(pop)
+# endif
+
+#endif // BOOST_CONCEPT_CHECK_MSVC_DWA2006429_HPP
diff --git a/src/third_party/boost-1.68.0/boost/concept/requires.hpp b/src/third_party/boost-1.69.0/boost/concept/requires.hpp
index 365ce10045f..365ce10045f 100644
--- a/src/third_party/boost-1.68.0/boost/concept/requires.hpp
+++ b/src/third_party/boost-1.69.0/boost/concept/requires.hpp
diff --git a/src/third_party/boost-1.69.0/boost/concept/usage.hpp b/src/third_party/boost-1.69.0/boost/concept/usage.hpp
new file mode 100644
index 00000000000..373de63a9d5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/concept/usage.hpp
@@ -0,0 +1,36 @@
+// Copyright David Abrahams 2006. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef BOOST_CONCEPT_USAGE_DWA2006919_HPP
+# define BOOST_CONCEPT_USAGE_DWA2006919_HPP
+
+# include <boost/concept/assert.hpp>
+# include <boost/config/workaround.hpp>
+# include <boost/concept/detail/backward_compatibility.hpp>
+
+namespace boost { namespace concepts {
+
+template <class Model>
+struct usage_requirements
+{
+ ~usage_requirements() { ((Model*)0)->~Model(); }
+};
+
+# if BOOST_WORKAROUND(__GNUC__, <= 3)
+
+# define BOOST_CONCEPT_USAGE(model) \
+ model(); /* at least 2.96 and 3.4.3 both need this :( */ \
+ BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
+ ~model()
+
+# else
+
+# define BOOST_CONCEPT_USAGE(model) \
+ BOOST_CONCEPT_ASSERT((boost::concepts::usage_requirements<model>)); \
+ ~model()
+
+# endif
+
+}} // namespace boost::concepts
+
+#endif // BOOST_CONCEPT_USAGE_DWA2006919_HPP
diff --git a/src/third_party/boost-1.69.0/boost/concept_archetype.hpp b/src/third_party/boost-1.69.0/boost/concept_archetype.hpp
new file mode 100644
index 00000000000..a9d1808f301
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/concept_archetype.hpp
@@ -0,0 +1,670 @@
+//
+// (C) Copyright Jeremy Siek 2000.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Revision History:
+//
+// 17 July 2001: Added const to some member functions. (Jeremy Siek)
+// 05 May 2001: Removed static dummy_cons object. (Jeremy Siek)
+
+// See http://www.boost.org/libs/concept_check for documentation.
+
+#ifndef BOOST_CONCEPT_ARCHETYPES_HPP
+#define BOOST_CONCEPT_ARCHETYPES_HPP
+
+#include <boost/config.hpp>
+#include <boost/config/workaround.hpp>
+#include <functional>
+#include <iterator> // iterator tags
+#include <cstddef> // std::ptrdiff_t
+
+namespace boost {
+
+ //===========================================================================
+ // Basic Archetype Classes
+
+ namespace detail {
+ class dummy_constructor { };
+ }
+
+ // A type that models no concept. The template parameter
+ // is only there so that null_archetype types can be created
+ // that have different type.
+ template <class T = int>
+ class null_archetype {
+ private:
+ null_archetype() { }
+ null_archetype(const null_archetype&) { }
+ null_archetype& operator=(const null_archetype&) { return *this; }
+ public:
+ null_archetype(detail::dummy_constructor) { }
+#ifndef __MWERKS__
+ template <class TT>
+ friend void dummy_friend(); // just to avoid warnings
+#endif
+ };
+
+ // This is a helper class that provides a way to get a reference to
+ // an object. The get() function will never be called at run-time
+ // (nothing in this file will) so this seemingly very bad function
+ // is really quite innocent. The name of this class needs to be
+ // changed.
+ template <class T>
+ class static_object
+ {
+ public:
+ static T& get()
+ {
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ return *reinterpret_cast<T*>(0);
+#else
+ static char d[sizeof(T)];
+ return *reinterpret_cast<T*>(d);
+#endif
+ }
+ };
+
+ template <class Base = null_archetype<> >
+ class default_constructible_archetype : public Base {
+ public:
+ default_constructible_archetype()
+ : Base(static_object<detail::dummy_constructor>::get()) { }
+ default_constructible_archetype(detail::dummy_constructor x) : Base(x) { }
+ };
+
+ template <class Base = null_archetype<> >
+ class assignable_archetype : public Base {
+ assignable_archetype() { }
+ assignable_archetype(const assignable_archetype&) { }
+ public:
+ assignable_archetype& operator=(const assignable_archetype&) {
+ return *this;
+ }
+ assignable_archetype(detail::dummy_constructor x) : Base(x) { }
+ };
+
+ template <class Base = null_archetype<> >
+ class copy_constructible_archetype : public Base {
+ public:
+ copy_constructible_archetype()
+ : Base(static_object<detail::dummy_constructor>::get()) { }
+ copy_constructible_archetype(const copy_constructible_archetype&)
+ : Base(static_object<detail::dummy_constructor>::get()) { }
+ copy_constructible_archetype(detail::dummy_constructor x) : Base(x) { }
+ };
+
+ template <class Base = null_archetype<> >
+ class sgi_assignable_archetype : public Base {
+ public:
+ sgi_assignable_archetype(const sgi_assignable_archetype&)
+ : Base(static_object<detail::dummy_constructor>::get()) { }
+ sgi_assignable_archetype& operator=(const sgi_assignable_archetype&) {
+ return *this;
+ }
+ sgi_assignable_archetype(const detail::dummy_constructor& x) : Base(x) { }
+ };
+
+ struct default_archetype_base {
+ default_archetype_base(detail::dummy_constructor) { }
+ };
+
+ // Careful, don't use same type for T and Base. That results in the
+ // conversion operator being invalid. Since T is often
+ // null_archetype, can't use null_archetype for Base.
+ template <class T, class Base = default_archetype_base>
+ class convertible_to_archetype : public Base {
+ private:
+ convertible_to_archetype() { }
+ convertible_to_archetype(const convertible_to_archetype& ) { }
+ convertible_to_archetype& operator=(const convertible_to_archetype&)
+ { return *this; }
+ public:
+ convertible_to_archetype(detail::dummy_constructor x) : Base(x) { }
+ operator const T&() const { return static_object<T>::get(); }
+ };
+
+ template <class T, class Base = default_archetype_base>
+ class convertible_from_archetype : public Base {
+ private:
+ convertible_from_archetype() { }
+ convertible_from_archetype(const convertible_from_archetype& ) { }
+ convertible_from_archetype& operator=(const convertible_from_archetype&)
+ { return *this; }
+ public:
+ convertible_from_archetype(detail::dummy_constructor x) : Base(x) { }
+ convertible_from_archetype(const T&) { }
+ convertible_from_archetype& operator=(const T&)
+ { return *this; }
+ };
+
+ class boolean_archetype {
+ public:
+ boolean_archetype(const boolean_archetype&) { }
+ operator bool() const { return true; }
+ boolean_archetype(detail::dummy_constructor) { }
+ private:
+ boolean_archetype() { }
+ boolean_archetype& operator=(const boolean_archetype&) { return *this; }
+ };
+
+ template <class Base = null_archetype<> >
+ class equality_comparable_archetype : public Base {
+ public:
+ equality_comparable_archetype(detail::dummy_constructor x) : Base(x) { }
+ };
+ template <class Base>
+ boolean_archetype
+ operator==(const equality_comparable_archetype<Base>&,
+ const equality_comparable_archetype<Base>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+ template <class Base>
+ boolean_archetype
+ operator!=(const equality_comparable_archetype<Base>&,
+ const equality_comparable_archetype<Base>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+
+
+ template <class Base = null_archetype<> >
+ class equality_comparable2_first_archetype : public Base {
+ public:
+ equality_comparable2_first_archetype(detail::dummy_constructor x)
+ : Base(x) { }
+ };
+ template <class Base = null_archetype<> >
+ class equality_comparable2_second_archetype : public Base {
+ public:
+ equality_comparable2_second_archetype(detail::dummy_constructor x)
+ : Base(x) { }
+ };
+ template <class Base1, class Base2>
+ boolean_archetype
+ operator==(const equality_comparable2_first_archetype<Base1>&,
+ const equality_comparable2_second_archetype<Base2>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+ template <class Base1, class Base2>
+ boolean_archetype
+ operator!=(const equality_comparable2_first_archetype<Base1>&,
+ const equality_comparable2_second_archetype<Base2>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+
+
+ template <class Base = null_archetype<> >
+ class less_than_comparable_archetype : public Base {
+ public:
+ less_than_comparable_archetype(detail::dummy_constructor x) : Base(x) { }
+ };
+ template <class Base>
+ boolean_archetype
+ operator<(const less_than_comparable_archetype<Base>&,
+ const less_than_comparable_archetype<Base>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+
+
+
+ template <class Base = null_archetype<> >
+ class comparable_archetype : public Base {
+ public:
+ comparable_archetype(detail::dummy_constructor x) : Base(x) { }
+ };
+ template <class Base>
+ boolean_archetype
+ operator<(const comparable_archetype<Base>&,
+ const comparable_archetype<Base>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+ template <class Base>
+ boolean_archetype
+ operator<=(const comparable_archetype<Base>&,
+ const comparable_archetype<Base>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+ template <class Base>
+ boolean_archetype
+ operator>(const comparable_archetype<Base>&,
+ const comparable_archetype<Base>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+ template <class Base>
+ boolean_archetype
+ operator>=(const comparable_archetype<Base>&,
+ const comparable_archetype<Base>&)
+ {
+ return boolean_archetype(static_object<detail::dummy_constructor>::get());
+ }
+
+
+ // The purpose of the optags is so that one can specify
+ // exactly which types the operator< is defined between.
+ // This is useful for allowing the operations:
+ //
+ // A a; B b;
+ // a < b
+ // b < a
+ //
+ // without also allowing the combinations:
+ //
+ // a < a
+ // b < b
+ //
+ struct optag1 { };
+ struct optag2 { };
+ struct optag3 { };
+
+#define BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(OP, NAME) \
+ template <class Base = null_archetype<>, class Tag = optag1 > \
+ class NAME##_first_archetype : public Base { \
+ public: \
+ NAME##_first_archetype(detail::dummy_constructor x) : Base(x) { } \
+ }; \
+ \
+ template <class Base = null_archetype<>, class Tag = optag1 > \
+ class NAME##_second_archetype : public Base { \
+ public: \
+ NAME##_second_archetype(detail::dummy_constructor x) : Base(x) { } \
+ }; \
+ \
+ template <class BaseFirst, class BaseSecond, class Tag> \
+ boolean_archetype \
+ operator OP (const NAME##_first_archetype<BaseFirst, Tag>&, \
+ const NAME##_second_archetype<BaseSecond, Tag>&) \
+ { \
+ return boolean_archetype(static_object<detail::dummy_constructor>::get()); \
+ }
+
+ BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(==, equal_op)
+ BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(!=, not_equal_op)
+ BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(<, less_than_op)
+ BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(<=, less_equal_op)
+ BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(>, greater_than_op)
+ BOOST_DEFINE_BINARY_PREDICATE_ARCHETYPE(>=, greater_equal_op)
+
+#define BOOST_DEFINE_OPERATOR_ARCHETYPE(OP, NAME) \
+ template <class Base = null_archetype<> > \
+ class NAME##_archetype : public Base { \
+ public: \
+ NAME##_archetype(detail::dummy_constructor x) : Base(x) { } \
+ NAME##_archetype(const NAME##_archetype&) \
+ : Base(static_object<detail::dummy_constructor>::get()) { } \
+ NAME##_archetype& operator=(const NAME##_archetype&) { return *this; } \
+ }; \
+ template <class Base> \
+ NAME##_archetype<Base> \
+ operator OP (const NAME##_archetype<Base>&,\
+ const NAME##_archetype<Base>&) \
+ { \
+ return \
+ NAME##_archetype<Base>(static_object<detail::dummy_constructor>::get()); \
+ }
+
+ BOOST_DEFINE_OPERATOR_ARCHETYPE(+, addable)
+ BOOST_DEFINE_OPERATOR_ARCHETYPE(-, subtractable)
+ BOOST_DEFINE_OPERATOR_ARCHETYPE(*, multipliable)
+ BOOST_DEFINE_OPERATOR_ARCHETYPE(/, dividable)
+ BOOST_DEFINE_OPERATOR_ARCHETYPE(%, modable)
+
+ // As is, these are useless because of the return type.
+ // Need to invent a better way...
+#define BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(OP, NAME) \
+ template <class Return, class Base = null_archetype<> > \
+ class NAME##_first_archetype : public Base { \
+ public: \
+ NAME##_first_archetype(detail::dummy_constructor x) : Base(x) { } \
+ }; \
+ \
+ template <class Return, class Base = null_archetype<> > \
+ class NAME##_second_archetype : public Base { \
+ public: \
+ NAME##_second_archetype(detail::dummy_constructor x) : Base(x) { } \
+ }; \
+ \
+ template <class Return, class BaseFirst, class BaseSecond> \
+ Return \
+ operator OP (const NAME##_first_archetype<Return, BaseFirst>&, \
+ const NAME##_second_archetype<Return, BaseSecond>&) \
+ { \
+ return Return(static_object<detail::dummy_constructor>::get()); \
+ }
+
+ BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(+, plus_op)
+ BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(*, time_op)
+ BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(/, divide_op)
+ BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(-, subtract_op)
+ BOOST_DEFINE_BINARY_OPERATOR_ARCHETYPE(%, mod_op)
+
+ //===========================================================================
+ // Function Object Archetype Classes
+
+ template <class Return>
+ class generator_archetype {
+ public:
+ const Return& operator()() {
+ return static_object<Return>::get();
+ }
+ };
+
+ class void_generator_archetype {
+ public:
+ void operator()() { }
+ };
+
+ template <class Arg, class Return>
+ class unary_function_archetype {
+ private:
+ unary_function_archetype() { }
+ public:
+ unary_function_archetype(detail::dummy_constructor) { }
+ const Return& operator()(const Arg&) const {
+ return static_object<Return>::get();
+ }
+ };
+
+ template <class Arg1, class Arg2, class Return>
+ class binary_function_archetype {
+ private:
+ binary_function_archetype() { }
+ public:
+ binary_function_archetype(detail::dummy_constructor) { }
+ const Return& operator()(const Arg1&, const Arg2&) const {
+ return static_object<Return>::get();
+ }
+ };
+
+ template <class Arg>
+ class unary_predicate_archetype {
+ typedef boolean_archetype Return;
+ unary_predicate_archetype() { }
+ public:
+ unary_predicate_archetype(detail::dummy_constructor) { }
+ const Return& operator()(const Arg&) const {
+ return static_object<Return>::get();
+ }
+ };
+
+ template <class Arg1, class Arg2, class Base = null_archetype<> >
+ class binary_predicate_archetype {
+ typedef boolean_archetype Return;
+ binary_predicate_archetype() { }
+ public:
+ binary_predicate_archetype(detail::dummy_constructor) { }
+ const Return& operator()(const Arg1&, const Arg2&) const {
+ return static_object<Return>::get();
+ }
+ };
+
+ //===========================================================================
+ // Iterator Archetype Classes
+
+ template <class T, int I = 0>
+ class input_iterator_archetype
+ {
+ private:
+ typedef input_iterator_archetype self;
+ public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef T value_type;
+ struct reference {
+ operator const value_type&() const { return static_object<T>::get(); }
+ };
+ typedef const T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return reference(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ };
+
+ template <class T>
+ class input_iterator_archetype_no_proxy
+ {
+ private:
+ typedef input_iterator_archetype_no_proxy self;
+ public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef const T& reference;
+ typedef const T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return static_object<T>::get(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ };
+
+ template <class T>
+ struct output_proxy {
+ output_proxy& operator=(const T&) { return *this; }
+ };
+
+ template <class T>
+ class output_iterator_archetype
+ {
+ public:
+ typedef output_iterator_archetype self;
+ public:
+ typedef std::output_iterator_tag iterator_category;
+ typedef output_proxy<T> value_type;
+ typedef output_proxy<T> reference;
+ typedef void pointer;
+ typedef void difference_type;
+ output_iterator_archetype(detail::dummy_constructor) { }
+ output_iterator_archetype(const self&) { }
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return output_proxy<T>(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ private:
+ output_iterator_archetype() { }
+ };
+
+ template <class T>
+ class input_output_iterator_archetype
+ {
+ private:
+ typedef input_output_iterator_archetype self;
+ struct in_out_tag : public std::input_iterator_tag, public std::output_iterator_tag { };
+ public:
+ typedef in_out_tag iterator_category;
+ typedef T value_type;
+ struct reference {
+ reference& operator=(const T&) { return *this; }
+ operator value_type() { return static_object<T>::get(); }
+ };
+ typedef const T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ input_output_iterator_archetype() { }
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return reference(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ };
+
+ template <class T>
+ class forward_iterator_archetype
+ {
+ public:
+ typedef forward_iterator_archetype self;
+ public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef const T& reference;
+ typedef T const* pointer;
+ typedef std::ptrdiff_t difference_type;
+ forward_iterator_archetype() { }
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return static_object<T>::get(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ };
+
+ template <class T>
+ class mutable_forward_iterator_archetype
+ {
+ public:
+ typedef mutable_forward_iterator_archetype self;
+ public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef T& reference;
+ typedef T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ mutable_forward_iterator_archetype() { }
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return static_object<T>::get(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ };
+
+ template <class T>
+ class bidirectional_iterator_archetype
+ {
+ public:
+ typedef bidirectional_iterator_archetype self;
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef const T& reference;
+ typedef T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ bidirectional_iterator_archetype() { }
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return static_object<T>::get(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ self& operator--() { return *this; }
+ self operator--(int) { return *this; }
+ };
+
+ template <class T>
+ class mutable_bidirectional_iterator_archetype
+ {
+ public:
+ typedef mutable_bidirectional_iterator_archetype self;
+ public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef T& reference;
+ typedef T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ mutable_bidirectional_iterator_archetype() { }
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return static_object<T>::get(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ self& operator--() { return *this; }
+ self operator--(int) { return *this; }
+ };
+
+ template <class T>
+ class random_access_iterator_archetype
+ {
+ public:
+ typedef random_access_iterator_archetype self;
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef const T& reference;
+ typedef T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ random_access_iterator_archetype() { }
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return static_object<T>::get(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ self& operator--() { return *this; }
+ self operator--(int) { return *this; }
+ reference operator[](difference_type) const
+ { return static_object<T>::get(); }
+ self& operator+=(difference_type) { return *this; }
+ self& operator-=(difference_type) { return *this; }
+ difference_type operator-(const self&) const
+ { return difference_type(); }
+ self operator+(difference_type) const { return *this; }
+ self operator-(difference_type) const { return *this; }
+ bool operator<(const self&) const { return true; }
+ bool operator<=(const self&) const { return true; }
+ bool operator>(const self&) const { return true; }
+ bool operator>=(const self&) const { return true; }
+ };
+ template <class T>
+ random_access_iterator_archetype<T>
+ operator+(typename random_access_iterator_archetype<T>::difference_type,
+ const random_access_iterator_archetype<T>& x)
+ { return x; }
+
+
+ template <class T>
+ class mutable_random_access_iterator_archetype
+ {
+ public:
+ typedef mutable_random_access_iterator_archetype self;
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef T& reference;
+ typedef T* pointer;
+ typedef std::ptrdiff_t difference_type;
+ mutable_random_access_iterator_archetype() { }
+ self& operator=(const self&) { return *this; }
+ bool operator==(const self&) const { return true; }
+ bool operator!=(const self&) const { return true; }
+ reference operator*() const { return static_object<T>::get(); }
+ self& operator++() { return *this; }
+ self operator++(int) { return *this; }
+ self& operator--() { return *this; }
+ self operator--(int) { return *this; }
+ reference operator[](difference_type) const
+ { return static_object<T>::get(); }
+ self& operator+=(difference_type) { return *this; }
+ self& operator-=(difference_type) { return *this; }
+ difference_type operator-(const self&) const
+ { return difference_type(); }
+ self operator+(difference_type) const { return *this; }
+ self operator-(difference_type) const { return *this; }
+ bool operator<(const self&) const { return true; }
+ bool operator<=(const self&) const { return true; }
+ bool operator>(const self&) const { return true; }
+ bool operator>=(const self&) const { return true; }
+ };
+ template <class T>
+ mutable_random_access_iterator_archetype<T>
+ operator+
+ (typename mutable_random_access_iterator_archetype<T>::difference_type,
+ const mutable_random_access_iterator_archetype<T>& x)
+ { return x; }
+
+} // namespace boost
+
+#endif // BOOST_CONCEPT_ARCHETYPES_H
diff --git a/src/third_party/boost-1.69.0/boost/concept_check.hpp b/src/third_party/boost-1.69.0/boost/concept_check.hpp
new file mode 100644
index 00000000000..abbadb76be4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/concept_check.hpp
@@ -0,0 +1,1082 @@
+//
+// (C) Copyright Jeremy Siek 2000.
+// Copyright 2002 The Trustees of Indiana University.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Revision History:
+// 05 May 2001: Workarounds for HP aCC from Thomas Matelich. (Jeremy Siek)
+// 02 April 2001: Removed limits header altogether. (Jeremy Siek)
+// 01 April 2001: Modified to use new <boost/limits.hpp> header. (JMaddock)
+//
+
+// See http://www.boost.org/libs/concept_check for documentation.
+
+#ifndef BOOST_CONCEPT_CHECKS_HPP
+# define BOOST_CONCEPT_CHECKS_HPP
+
+# include <boost/concept/assert.hpp>
+
+# include <iterator>
+# include <boost/type_traits/conversion_traits.hpp>
+# include <utility>
+# include <boost/type_traits/is_same.hpp>
+# include <boost/type_traits/is_void.hpp>
+# include <boost/static_assert.hpp>
+# include <boost/type_traits/integral_constant.hpp>
+# include <boost/config/workaround.hpp>
+
+# include <boost/concept/usage.hpp>
+# include <boost/concept/detail/concept_def.hpp>
+
+#if (defined _MSC_VER)
+# pragma warning( push )
+# pragma warning( disable : 4510 ) // default constructor could not be generated
+# pragma warning( disable : 4610 ) // object 'class' can never be instantiated - user-defined constructor required
+#endif
+
+namespace boost
+{
+
+ //
+ // Backward compatibility
+ //
+
+ template <class Model>
+ inline void function_requires(Model* = 0)
+ {
+ BOOST_CONCEPT_ASSERT((Model));
+ }
+ template <class T> inline void ignore_unused_variable_warning(T const&) {}
+
+# define BOOST_CLASS_REQUIRE(type_var, ns, concept) \
+ BOOST_CONCEPT_ASSERT((ns::concept<type_var>))
+
+# define BOOST_CLASS_REQUIRE2(type_var1, type_var2, ns, concept) \
+ BOOST_CONCEPT_ASSERT((ns::concept<type_var1,type_var2>))
+
+# define BOOST_CLASS_REQUIRE3(tv1, tv2, tv3, ns, concept) \
+ BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3>))
+
+# define BOOST_CLASS_REQUIRE4(tv1, tv2, tv3, tv4, ns, concept) \
+ BOOST_CONCEPT_ASSERT((ns::concept<tv1,tv2,tv3,tv4>))
+
+
+ //
+ // Begin concept definitions
+ //
+ BOOST_concept(Integer, (T))
+ {
+ BOOST_CONCEPT_USAGE(Integer)
+ {
+ x.error_type_must_be_an_integer_type();
+ }
+ private:
+ T x;
+ };
+
+ template <> struct Integer<char> {};
+ template <> struct Integer<signed char> {};
+ template <> struct Integer<unsigned char> {};
+ template <> struct Integer<short> {};
+ template <> struct Integer<unsigned short> {};
+ template <> struct Integer<int> {};
+ template <> struct Integer<unsigned int> {};
+ template <> struct Integer<long> {};
+ template <> struct Integer<unsigned long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+ template <> struct Integer< ::boost::long_long_type> {};
+ template <> struct Integer< ::boost::ulong_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+ template <> struct Integer<__int64> {};
+ template <> struct Integer<unsigned __int64> {};
+# endif
+
+ BOOST_concept(SignedInteger,(T)) {
+ BOOST_CONCEPT_USAGE(SignedInteger) {
+ x.error_type_must_be_a_signed_integer_type();
+ }
+ private:
+ T x;
+ };
+ template <> struct SignedInteger<signed char> { };
+ template <> struct SignedInteger<short> {};
+ template <> struct SignedInteger<int> {};
+ template <> struct SignedInteger<long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+ template <> struct SignedInteger< ::boost::long_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+ template <> struct SignedInteger<__int64> {};
+# endif
+
+ BOOST_concept(UnsignedInteger,(T)) {
+ BOOST_CONCEPT_USAGE(UnsignedInteger) {
+ x.error_type_must_be_an_unsigned_integer_type();
+ }
+ private:
+ T x;
+ };
+
+ template <> struct UnsignedInteger<unsigned char> {};
+ template <> struct UnsignedInteger<unsigned short> {};
+ template <> struct UnsignedInteger<unsigned int> {};
+ template <> struct UnsignedInteger<unsigned long> {};
+# if defined(BOOST_HAS_LONG_LONG)
+ template <> struct UnsignedInteger< ::boost::ulong_long_type> {};
+# elif defined(BOOST_HAS_MS_INT64)
+ template <> struct UnsignedInteger<unsigned __int64> {};
+# endif
+
+ //===========================================================================
+ // Basic Concepts
+
+ BOOST_concept(DefaultConstructible,(TT))
+ {
+ BOOST_CONCEPT_USAGE(DefaultConstructible) {
+ TT a; // require default constructor
+ ignore_unused_variable_warning(a);
+ }
+ };
+
+ BOOST_concept(Assignable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(Assignable) {
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+ a = b; // require assignment operator
+#endif
+ const_constraints(b);
+ }
+ private:
+ void const_constraints(const TT& x) {
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+ a = x; // const required for argument to assignment
+#else
+ ignore_unused_variable_warning(x);
+#endif
+ }
+ private:
+ TT a;
+ TT b;
+ };
+
+
+ BOOST_concept(CopyConstructible,(TT))
+ {
+ BOOST_CONCEPT_USAGE(CopyConstructible) {
+ TT a(b); // require copy constructor
+ TT* ptr = &a; // require address of operator
+ const_constraints(a);
+ ignore_unused_variable_warning(ptr);
+ }
+ private:
+ void const_constraints(const TT& a) {
+ TT c(a); // require const copy constructor
+ const TT* ptr = &a; // require const address of operator
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(ptr);
+ }
+ TT b;
+ };
+
+ // The SGI STL version of Assignable requires copy constructor and operator=
+ BOOST_concept(SGIAssignable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(SGIAssignable) {
+ TT c(a);
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+ a = b; // require assignment operator
+#endif
+ const_constraints(b);
+ ignore_unused_variable_warning(c);
+ }
+ private:
+ void const_constraints(const TT& x) {
+ TT c(x);
+#if !defined(_ITERATOR_) // back_insert_iterator broken for VC++ STL
+ a = x; // const required for argument to assignment
+#endif
+ ignore_unused_variable_warning(c);
+ }
+ TT a;
+ TT b;
+ };
+
+ BOOST_concept(Convertible,(X)(Y))
+ {
+ BOOST_CONCEPT_USAGE(Convertible) {
+ Y y = x;
+ ignore_unused_variable_warning(y);
+ }
+ private:
+ X x;
+ };
+
+ // The C++ standard requirements for many concepts talk about return
+ // types that must be "convertible to bool". The problem with this
+ // requirement is that it leaves the door open for evil proxies that
+ // define things like operator|| with strange return types. Two
+ // possible solutions are:
+ // 1) require the return type to be exactly bool
+ // 2) stay with convertible to bool, and also
+ // specify stuff about all the logical operators.
+ // For now we just test for convertible to bool.
+ template <class TT>
+ void require_boolean_expr(const TT& t) {
+ bool x = t;
+ ignore_unused_variable_warning(x);
+ }
+
+ BOOST_concept(EqualityComparable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(EqualityComparable) {
+ require_boolean_expr(a == b);
+ require_boolean_expr(a != b);
+ }
+ private:
+ TT a, b;
+ };
+
+ BOOST_concept(LessThanComparable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(LessThanComparable) {
+ require_boolean_expr(a < b);
+ }
+ private:
+ TT a, b;
+ };
+
+ // This is equivalent to SGI STL's LessThanComparable.
+ BOOST_concept(Comparable,(TT))
+ {
+ BOOST_CONCEPT_USAGE(Comparable) {
+ require_boolean_expr(a < b);
+ require_boolean_expr(a > b);
+ require_boolean_expr(a <= b);
+ require_boolean_expr(a >= b);
+ }
+ private:
+ TT a, b;
+ };
+
+#define BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(OP,NAME) \
+ BOOST_concept(NAME, (First)(Second)) \
+ { \
+ BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \
+ private: \
+ bool constraints_() { return a OP b; } \
+ First a; \
+ Second b; \
+ }
+
+#define BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(OP,NAME) \
+ BOOST_concept(NAME, (Ret)(First)(Second)) \
+ { \
+ BOOST_CONCEPT_USAGE(NAME) { (void)constraints_(); } \
+ private: \
+ Ret constraints_() { return a OP b; } \
+ First a; \
+ Second b; \
+ }
+
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, EqualOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, NotEqualOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, LessThanOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, LessEqualOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, GreaterThanOp);
+ BOOST_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, GreaterEqualOp);
+
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, PlusOp);
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, TimesOp);
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, DivideOp);
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, SubtractOp);
+ BOOST_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, ModOp);
+
+ //===========================================================================
+ // Function Object Concepts
+
+ BOOST_concept(Generator,(Func)(Return))
+ {
+ BOOST_CONCEPT_USAGE(Generator) { test(is_void<Return>()); }
+
+ private:
+ void test(boost::false_type)
+ {
+ // Do we really want a reference here?
+ const Return& r = f();
+ ignore_unused_variable_warning(r);
+ }
+
+ void test(boost::true_type)
+ {
+ f();
+ }
+
+ Func f;
+ };
+
+ BOOST_concept(UnaryFunction,(Func)(Return)(Arg))
+ {
+ BOOST_CONCEPT_USAGE(UnaryFunction) { test(is_void<Return>()); }
+
+ private:
+ void test(boost::false_type)
+ {
+ f(arg); // "priming the pump" this way keeps msvc6 happy (ICE)
+ Return r = f(arg);
+ ignore_unused_variable_warning(r);
+ }
+
+ void test(boost::true_type)
+ {
+ f(arg);
+ }
+
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor to make gcc happy.
+ // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type.
+ // (warning: non-static reference "const double& boost::UnaryFunction<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ UnaryFunction();
+#endif
+
+ Func f;
+ Arg arg;
+ };
+
+ BOOST_concept(BinaryFunction,(Func)(Return)(First)(Second))
+ {
+ BOOST_CONCEPT_USAGE(BinaryFunction) { test(is_void<Return>()); }
+ private:
+ void test(boost::false_type)
+ {
+ f(first,second);
+ Return r = f(first, second); // require operator()
+ (void)r;
+ }
+
+ void test(boost::true_type)
+ {
+ f(first,second);
+ }
+
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor to make gcc happy.
+ // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type.
+ // (warning: non-static reference "const double& boost::BinaryFunction<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ BinaryFunction();
+#endif
+
+ Func f;
+ First first;
+ Second second;
+ };
+
+ BOOST_concept(UnaryPredicate,(Func)(Arg))
+ {
+ BOOST_CONCEPT_USAGE(UnaryPredicate) {
+ require_boolean_expr(f(arg)); // require operator() returning bool
+ }
+ private:
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor to make gcc happy.
+ // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type.
+ // (warning: non-static reference "const double& boost::UnaryPredicate<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ UnaryPredicate();
+#endif
+
+ Func f;
+ Arg arg;
+ };
+
+ BOOST_concept(BinaryPredicate,(Func)(First)(Second))
+ {
+ BOOST_CONCEPT_USAGE(BinaryPredicate) {
+ require_boolean_expr(f(a, b)); // require operator() returning bool
+ }
+ private:
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor to make gcc happy.
+ // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type.
+ // (warning: non-static reference "const double& boost::BinaryPredicate<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ BinaryPredicate();
+#endif
+ Func f;
+ First a;
+ Second b;
+ };
+
+ // use this when functor is used inside a container class like std::set
+ BOOST_concept(Const_BinaryPredicate,(Func)(First)(Second))
+ : BinaryPredicate<Func, First, Second>
+ {
+ BOOST_CONCEPT_USAGE(Const_BinaryPredicate) {
+ const_constraints(f);
+ }
+ private:
+ void const_constraints(const Func& fun) {
+ // operator() must be a const member function
+ require_boolean_expr(fun(a, b));
+ }
+#if (BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(4) \
+ && BOOST_WORKAROUND(__GNUC__, > 3)))
+ // Declare a dummy constructor to make gcc happy.
+ // It seems the compiler can not generate a sensible constructor when this is instantiated with a reference type.
+ // (warning: non-static reference "const double& boost::Const_BinaryPredicate<YourClassHere>::arg"
+ // in class without a constructor [-Wuninitialized])
+ Const_BinaryPredicate();
+#endif
+
+ Func f;
+ First a;
+ Second b;
+ };
+
+ BOOST_concept(AdaptableGenerator,(Func)(Return))
+ : Generator<Func, typename Func::result_type>
+ {
+ typedef typename Func::result_type result_type;
+
+ BOOST_CONCEPT_USAGE(AdaptableGenerator)
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+ }
+ };
+
+ BOOST_concept(AdaptableUnaryFunction,(Func)(Return)(Arg))
+ : UnaryFunction<Func, typename Func::result_type, typename Func::argument_type>
+ {
+ typedef typename Func::argument_type argument_type;
+ typedef typename Func::result_type result_type;
+
+ ~AdaptableUnaryFunction()
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+ BOOST_CONCEPT_ASSERT((Convertible<Arg, argument_type>));
+ }
+ };
+
+ BOOST_concept(AdaptableBinaryFunction,(Func)(Return)(First)(Second))
+ : BinaryFunction<
+ Func
+ , typename Func::result_type
+ , typename Func::first_argument_type
+ , typename Func::second_argument_type
+ >
+ {
+ typedef typename Func::first_argument_type first_argument_type;
+ typedef typename Func::second_argument_type second_argument_type;
+ typedef typename Func::result_type result_type;
+
+ ~AdaptableBinaryFunction()
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<result_type, Return>));
+ BOOST_CONCEPT_ASSERT((Convertible<First, first_argument_type>));
+ BOOST_CONCEPT_ASSERT((Convertible<Second, second_argument_type>));
+ }
+ };
+
+ BOOST_concept(AdaptablePredicate,(Func)(Arg))
+ : UnaryPredicate<Func, Arg>
+ , AdaptableUnaryFunction<Func, bool, Arg>
+ {
+ };
+
+ BOOST_concept(AdaptableBinaryPredicate,(Func)(First)(Second))
+ : BinaryPredicate<Func, First, Second>
+ , AdaptableBinaryFunction<Func, bool, First, Second>
+ {
+ };
+
+ //===========================================================================
+ // Iterator Concepts
+
+ BOOST_concept(InputIterator,(TT))
+ : Assignable<TT>
+ , EqualityComparable<TT>
+ {
+ typedef typename std::iterator_traits<TT>::value_type value_type;
+ typedef typename std::iterator_traits<TT>::difference_type difference_type;
+ typedef typename std::iterator_traits<TT>::reference reference;
+ typedef typename std::iterator_traits<TT>::pointer pointer;
+ typedef typename std::iterator_traits<TT>::iterator_category iterator_category;
+
+ BOOST_CONCEPT_USAGE(InputIterator)
+ {
+ BOOST_CONCEPT_ASSERT((SignedInteger<difference_type>));
+ BOOST_CONCEPT_ASSERT((Convertible<iterator_category, std::input_iterator_tag>));
+
+ TT j(i);
+ (void)*i; // require dereference operator
+ ++j; // require preincrement operator
+ i++; // require postincrement operator
+ }
+ private:
+ TT i;
+ };
+
+ BOOST_concept(OutputIterator,(TT)(ValueT))
+ : Assignable<TT>
+ {
+ BOOST_CONCEPT_USAGE(OutputIterator) {
+
+ ++i; // require preincrement operator
+ i++; // require postincrement operator
+ *i++ = t; // require postincrement and assignment
+ }
+ private:
+ TT i, j;
+ ValueT t;
+ };
+
+ BOOST_concept(ForwardIterator,(TT))
+ : InputIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(ForwardIterator)
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<
+ BOOST_DEDUCED_TYPENAME ForwardIterator::iterator_category
+ , std::forward_iterator_tag
+ >));
+
+ typename InputIterator<TT>::reference r = *i;
+ ignore_unused_variable_warning(r);
+ }
+
+ private:
+ TT i;
+ };
+
+ BOOST_concept(Mutable_ForwardIterator,(TT))
+ : ForwardIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(Mutable_ForwardIterator) {
+ *i++ = *j; // require postincrement and assignment
+ }
+ private:
+ TT i, j;
+ };
+
+ BOOST_concept(BidirectionalIterator,(TT))
+ : ForwardIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(BidirectionalIterator)
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<
+ BOOST_DEDUCED_TYPENAME BidirectionalIterator::iterator_category
+ , std::bidirectional_iterator_tag
+ >));
+
+ --i; // require predecrement operator
+ i--; // require postdecrement operator
+ }
+ private:
+ TT i;
+ };
+
+ BOOST_concept(Mutable_BidirectionalIterator,(TT))
+ : BidirectionalIterator<TT>
+ , Mutable_ForwardIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(Mutable_BidirectionalIterator)
+ {
+ *i-- = *j; // require postdecrement and assignment
+ }
+ private:
+ TT i, j;
+ };
+
+ BOOST_concept(RandomAccessIterator,(TT))
+ : BidirectionalIterator<TT>
+ , Comparable<TT>
+ {
+ BOOST_CONCEPT_USAGE(RandomAccessIterator)
+ {
+ BOOST_CONCEPT_ASSERT((Convertible<
+ BOOST_DEDUCED_TYPENAME BidirectionalIterator<TT>::iterator_category
+ , std::random_access_iterator_tag
+ >));
+
+ i += n; // require assignment addition operator
+ i = i + n; i = n + i; // require addition with difference type
+ i -= n; // require assignment subtraction operator
+ i = i - n; // require subtraction with difference type
+ n = i - j; // require difference operator
+ (void)i[n]; // require element access operator
+ }
+
+ private:
+ TT a, b;
+ TT i, j;
+ typename std::iterator_traits<TT>::difference_type n;
+ };
+
+ BOOST_concept(Mutable_RandomAccessIterator,(TT))
+ : RandomAccessIterator<TT>
+ , Mutable_BidirectionalIterator<TT>
+ {
+ BOOST_CONCEPT_USAGE(Mutable_RandomAccessIterator)
+ {
+ i[n] = *i; // require element access and assignment
+ }
+ private:
+ TT i;
+ typename std::iterator_traits<TT>::difference_type n;
+ };
+
+ //===========================================================================
+ // Container s
+
+ BOOST_concept(Container,(C))
+ : Assignable<C>
+ {
+ typedef typename C::value_type value_type;
+ typedef typename C::difference_type difference_type;
+ typedef typename C::size_type size_type;
+ typedef typename C::const_reference const_reference;
+ typedef typename C::const_pointer const_pointer;
+ typedef typename C::const_iterator const_iterator;
+
+ BOOST_CONCEPT_USAGE(Container)
+ {
+ BOOST_CONCEPT_ASSERT((InputIterator<const_iterator>));
+ const_constraints(c);
+ }
+
+ private:
+ void const_constraints(const C& cc) {
+ i = cc.begin();
+ i = cc.end();
+ n = cc.size();
+ n = cc.max_size();
+ b = cc.empty();
+ }
+ C c;
+ bool b;
+ const_iterator i;
+ size_type n;
+ };
+
+ BOOST_concept(Mutable_Container,(C))
+ : Container<C>
+ {
+ typedef typename C::reference reference;
+ typedef typename C::iterator iterator;
+ typedef typename C::pointer pointer;
+
+ BOOST_CONCEPT_USAGE(Mutable_Container)
+ {
+ BOOST_CONCEPT_ASSERT((
+ Assignable<typename Mutable_Container::value_type>));
+
+ BOOST_CONCEPT_ASSERT((InputIterator<iterator>));
+
+ i = c.begin();
+ i = c.end();
+ c.swap(c2);
+ }
+
+ private:
+ iterator i;
+ C c, c2;
+ };
+
+ BOOST_concept(ForwardContainer,(C))
+ : Container<C>
+ {
+ BOOST_CONCEPT_USAGE(ForwardContainer)
+ {
+ BOOST_CONCEPT_ASSERT((
+ ForwardIterator<
+ typename ForwardContainer::const_iterator
+ >));
+ }
+ };
+
+ BOOST_concept(Mutable_ForwardContainer,(C))
+ : ForwardContainer<C>
+ , Mutable_Container<C>
+ {
+ BOOST_CONCEPT_USAGE(Mutable_ForwardContainer)
+ {
+ BOOST_CONCEPT_ASSERT((
+ Mutable_ForwardIterator<
+ typename Mutable_ForwardContainer::iterator
+ >));
+ }
+ };
+
+ BOOST_concept(ReversibleContainer,(C))
+ : ForwardContainer<C>
+ {
+ typedef typename
+ C::const_reverse_iterator
+ const_reverse_iterator;
+
+ BOOST_CONCEPT_USAGE(ReversibleContainer)
+ {
+ BOOST_CONCEPT_ASSERT((
+ BidirectionalIterator<
+ typename ReversibleContainer::const_iterator>));
+
+ BOOST_CONCEPT_ASSERT((BidirectionalIterator<const_reverse_iterator>));
+
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const C& cc)
+ {
+ const_reverse_iterator _i = cc.rbegin();
+ _i = cc.rend();
+ }
+ C c;
+ };
+
+ BOOST_concept(Mutable_ReversibleContainer,(C))
+ : Mutable_ForwardContainer<C>
+ , ReversibleContainer<C>
+ {
+ typedef typename C::reverse_iterator reverse_iterator;
+
+ BOOST_CONCEPT_USAGE(Mutable_ReversibleContainer)
+ {
+ typedef typename Mutable_ForwardContainer<C>::iterator iterator;
+ BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<iterator>));
+ BOOST_CONCEPT_ASSERT((Mutable_BidirectionalIterator<reverse_iterator>));
+
+ reverse_iterator i = c.rbegin();
+ i = c.rend();
+ }
+ private:
+ C c;
+ };
+
+ BOOST_concept(RandomAccessContainer,(C))
+ : ReversibleContainer<C>
+ {
+ typedef typename C::size_type size_type;
+ typedef typename C::const_reference const_reference;
+
+ BOOST_CONCEPT_USAGE(RandomAccessContainer)
+ {
+ BOOST_CONCEPT_ASSERT((
+ RandomAccessIterator<
+ typename RandomAccessContainer::const_iterator
+ >));
+
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const C& cc)
+ {
+ const_reference r = cc[n];
+ ignore_unused_variable_warning(r);
+ }
+
+ C c;
+ size_type n;
+ };
+
+ BOOST_concept(Mutable_RandomAccessContainer,(C))
+ : Mutable_ReversibleContainer<C>
+ , RandomAccessContainer<C>
+ {
+ private:
+ typedef Mutable_RandomAccessContainer self;
+ public:
+ BOOST_CONCEPT_USAGE(Mutable_RandomAccessContainer)
+ {
+ BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::iterator>));
+ BOOST_CONCEPT_ASSERT((Mutable_RandomAccessIterator<typename self::reverse_iterator>));
+
+ typename self::reference r = c[i];
+ ignore_unused_variable_warning(r);
+ }
+
+ private:
+ typename Mutable_ReversibleContainer<C>::size_type i;
+ C c;
+ };
+
+ // A Sequence is inherently mutable
+ BOOST_concept(Sequence,(S))
+ : Mutable_ForwardContainer<S>
+ // Matt Austern's book puts DefaultConstructible here, the C++
+ // standard places it in Container --JGS
+ // ... so why aren't we following the standard? --DWA
+ , DefaultConstructible<S>
+ {
+ BOOST_CONCEPT_USAGE(Sequence)
+ {
+ S
+ c(n, t),
+ c2(first, last);
+
+ c.insert(p, t);
+ c.insert(p, n, t);
+ c.insert(p, first, last);
+
+ c.erase(p);
+ c.erase(p, q);
+
+ typename Sequence::reference r = c.front();
+
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(c2);
+ ignore_unused_variable_warning(r);
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const S& c) {
+ typename Sequence::const_reference r = c.front();
+ ignore_unused_variable_warning(r);
+ }
+
+ typename S::value_type t;
+ typename S::size_type n;
+ typename S::value_type* first, *last;
+ typename S::iterator p, q;
+ };
+
+ BOOST_concept(FrontInsertionSequence,(S))
+ : Sequence<S>
+ {
+ BOOST_CONCEPT_USAGE(FrontInsertionSequence)
+ {
+ c.push_front(t);
+ c.pop_front();
+ }
+ private:
+ S c;
+ typename S::value_type t;
+ };
+
+ BOOST_concept(BackInsertionSequence,(S))
+ : Sequence<S>
+ {
+ BOOST_CONCEPT_USAGE(BackInsertionSequence)
+ {
+ c.push_back(t);
+ c.pop_back();
+ typename BackInsertionSequence::reference r = c.back();
+ ignore_unused_variable_warning(r);
+ const_constraints(c);
+ }
+ private:
+ void const_constraints(const S& cc) {
+ typename BackInsertionSequence::const_reference
+ r = cc.back();
+ ignore_unused_variable_warning(r);
+ }
+ S c;
+ typename S::value_type t;
+ };
+
+ BOOST_concept(AssociativeContainer,(C))
+ : ForwardContainer<C>
+ , DefaultConstructible<C>
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::key_compare key_compare;
+ typedef typename C::value_compare value_compare;
+ typedef typename C::iterator iterator;
+
+ BOOST_CONCEPT_USAGE(AssociativeContainer)
+ {
+ i = c.find(k);
+ r = c.equal_range(k);
+ c.erase(k);
+ c.erase(i);
+ c.erase(r.first, r.second);
+ const_constraints(c);
+ BOOST_CONCEPT_ASSERT((BinaryPredicate<key_compare,key_type,key_type>));
+
+ typedef typename AssociativeContainer::value_type value_type_;
+ BOOST_CONCEPT_ASSERT((BinaryPredicate<value_compare,value_type_,value_type_>));
+ }
+
+ // Redundant with the base concept, but it helps below.
+ typedef typename C::const_iterator const_iterator;
+ private:
+ void const_constraints(const C& cc)
+ {
+ ci = cc.find(k);
+ n = cc.count(k);
+ cr = cc.equal_range(k);
+ }
+
+ C c;
+ iterator i;
+ std::pair<iterator,iterator> r;
+ const_iterator ci;
+ std::pair<const_iterator,const_iterator> cr;
+ typename C::key_type k;
+ typename C::size_type n;
+ };
+
+ BOOST_concept(UniqueAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(UniqueAssociativeContainer)
+ {
+ C c(first, last);
+
+ pos_flag = c.insert(t);
+ c.insert(first, last);
+
+ ignore_unused_variable_warning(c);
+ }
+ private:
+ std::pair<typename C::iterator, bool> pos_flag;
+ typename C::value_type t;
+ typename C::value_type* first, *last;
+ };
+
+ BOOST_concept(MultipleAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(MultipleAssociativeContainer)
+ {
+ C c(first, last);
+
+ pos = c.insert(t);
+ c.insert(first, last);
+
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(pos);
+ }
+ private:
+ typename C::iterator pos;
+ typename C::value_type t;
+ typename C::value_type* first, *last;
+ };
+
+ BOOST_concept(SimpleAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(SimpleAssociativeContainer)
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::value_type value_type;
+ BOOST_STATIC_ASSERT((boost::is_same<key_type,value_type>::value));
+ }
+ };
+
+ BOOST_concept(PairAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(PairAssociativeContainer)
+ {
+ typedef typename C::key_type key_type;
+ typedef typename C::value_type value_type;
+ typedef typename C::mapped_type mapped_type;
+ typedef std::pair<const key_type, mapped_type> required_value_type;
+ BOOST_STATIC_ASSERT((boost::is_same<value_type,required_value_type>::value));
+ }
+ };
+
+ BOOST_concept(SortedAssociativeContainer,(C))
+ : AssociativeContainer<C>
+ , ReversibleContainer<C>
+ {
+ BOOST_CONCEPT_USAGE(SortedAssociativeContainer)
+ {
+ C
+ c(kc),
+ c2(first, last),
+ c3(first, last, kc);
+
+ p = c.upper_bound(k);
+ p = c.lower_bound(k);
+ r = c.equal_range(k);
+
+ c.insert(p, t);
+
+ ignore_unused_variable_warning(c);
+ ignore_unused_variable_warning(c2);
+ ignore_unused_variable_warning(c3);
+ const_constraints(c);
+ }
+
+ void const_constraints(const C& c)
+ {
+ kc = c.key_comp();
+ vc = c.value_comp();
+
+ cp = c.upper_bound(k);
+ cp = c.lower_bound(k);
+ cr = c.equal_range(k);
+ }
+
+ private:
+ typename C::key_compare kc;
+ typename C::value_compare vc;
+ typename C::value_type t;
+ typename C::key_type k;
+ typedef typename C::iterator iterator;
+ typedef typename C::const_iterator const_iterator;
+
+ typedef SortedAssociativeContainer self;
+ iterator p;
+ const_iterator cp;
+ std::pair<typename self::iterator,typename self::iterator> r;
+ std::pair<typename self::const_iterator,typename self::const_iterator> cr;
+ typename C::value_type* first, *last;
+ };
+
+ // HashedAssociativeContainer
+
+ BOOST_concept(Collection,(C))
+ {
+ BOOST_CONCEPT_USAGE(Collection)
+ {
+ boost::function_requires<boost::InputIteratorConcept<iterator> >();
+ boost::function_requires<boost::InputIteratorConcept<const_iterator> >();
+ boost::function_requires<boost::CopyConstructibleConcept<value_type> >();
+ const_constraints(c);
+ i = c.begin();
+ i = c.end();
+ c.swap(c);
+ }
+
+ void const_constraints(const C& cc) {
+ ci = cc.begin();
+ ci = cc.end();
+ n = cc.size();
+ b = cc.empty();
+ }
+
+ private:
+ typedef typename C::value_type value_type;
+ typedef typename C::iterator iterator;
+ typedef typename C::const_iterator const_iterator;
+ typedef typename C::reference reference;
+ typedef typename C::const_reference const_reference;
+ // typedef typename C::pointer pointer;
+ typedef typename C::difference_type difference_type;
+ typedef typename C::size_type size_type;
+
+ C c;
+ bool b;
+ iterator i;
+ const_iterator ci;
+ size_type n;
+ };
+} // namespace boost
+
+#if (defined _MSC_VER)
+# pragma warning( pop )
+#endif
+
+# include <boost/concept/detail/concept_undef.hpp>
+
+#endif // BOOST_CONCEPT_CHECKS_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/config.hpp b/src/third_party/boost-1.69.0/boost/config.hpp
index f00a9805790..f00a9805790 100644
--- a/src/third_party/boost-1.68.0/boost/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/abi/borland_prefix.hpp b/src/third_party/boost-1.69.0/boost/config/abi/borland_prefix.hpp
index 3a0e5ae2d77..3a0e5ae2d77 100644
--- a/src/third_party/boost-1.68.0/boost/config/abi/borland_prefix.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/abi/borland_prefix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/abi/borland_suffix.hpp b/src/third_party/boost-1.69.0/boost/config/abi/borland_suffix.hpp
index 940535f3819..940535f3819 100644
--- a/src/third_party/boost-1.68.0/boost/config/abi/borland_suffix.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/abi/borland_suffix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/abi/msvc_prefix.hpp b/src/third_party/boost-1.69.0/boost/config/abi/msvc_prefix.hpp
index 97f06cdc0c2..97f06cdc0c2 100644
--- a/src/third_party/boost-1.68.0/boost/config/abi/msvc_prefix.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/abi/msvc_prefix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/abi/msvc_suffix.hpp b/src/third_party/boost-1.69.0/boost/config/abi/msvc_suffix.hpp
index a64d783eb0f..a64d783eb0f 100644
--- a/src/third_party/boost-1.68.0/boost/config/abi/msvc_suffix.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/abi/msvc_suffix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/abi_prefix.hpp b/src/third_party/boost-1.69.0/boost/config/abi_prefix.hpp
index 3b1347492ca..3b1347492ca 100644
--- a/src/third_party/boost-1.68.0/boost/config/abi_prefix.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/abi_prefix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/abi_suffix.hpp b/src/third_party/boost-1.69.0/boost/config/abi_suffix.hpp
index 939161662ae..939161662ae 100644
--- a/src/third_party/boost-1.68.0/boost/config/abi_suffix.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/abi_suffix.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/auto_link.hpp b/src/third_party/boost-1.69.0/boost/config/auto_link.hpp
new file mode 100644
index 00000000000..f34353b53d2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/auto_link.hpp
@@ -0,0 +1,474 @@
+// (C) Copyright John Maddock 2003.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE auto_link.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Automatic library inclusion for Borland/Microsoft compilers.
+ */
+
+/*************************************************************************
+
+USAGE:
+~~~~~~
+
+Before including this header you must define one or more of define the following macros:
+
+BOOST_LIB_NAME: Required: A string containing the basename of the library,
+ for example boost_regex.
+BOOST_LIB_TOOLSET: Optional: the base name of the toolset.
+BOOST_DYN_LINK: Optional: when set link to dll rather than static library.
+BOOST_LIB_DIAGNOSTIC: Optional: when set the header will print out the name
+ of the library selected (useful for debugging).
+BOOST_AUTO_LINK_NOMANGLE: Specifies that we should link to BOOST_LIB_NAME.lib,
+ rather than a mangled-name version.
+BOOST_AUTO_LINK_TAGGED: Specifies that we link to libraries built with the --layout=tagged option.
+ This is essentially the same as the default name-mangled version, but without
+ the compiler name and version, or the Boost version. Just the build options.
+BOOST_AUTO_LINK_SYSTEM: Specifies that we link to libraries built with the --layout=system option.
+ This is essentially the same as the non-name-mangled version, but with
+ the prefix to differentiate static and dll builds
+
+These macros will be undef'ed at the end of the header, further this header
+has no include guards - so be sure to include it only once from your library!
+
+Algorithm:
+~~~~~~~~~~
+
+Libraries for Borland and Microsoft compilers are automatically
+selected here, the name of the lib is selected according to the following
+formula:
+
+BOOST_LIB_PREFIX
+ + BOOST_LIB_NAME
+ + "_"
+ + BOOST_LIB_TOOLSET
+ + BOOST_LIB_THREAD_OPT
+ + BOOST_LIB_RT_OPT
+ + BOOST_LIB_ARCH_AND_MODEL_OPT
+ "-"
+ + BOOST_LIB_VERSION
+
+These are defined as:
+
+BOOST_LIB_PREFIX: "lib" for static libraries otherwise "".
+
+BOOST_LIB_NAME: The base name of the lib ( for example boost_regex).
+
+BOOST_LIB_TOOLSET: The compiler toolset name (vc6, vc7, bcb5 etc).
+
+BOOST_LIB_THREAD_OPT: "-mt" for multithread builds, otherwise nothing.
+
+BOOST_LIB_RT_OPT: A suffix that indicates the runtime library used,
+ contains one or more of the following letters after
+ a hyphen:
+
+ s static runtime (dynamic if not present).
+ g debug/diagnostic runtime (release if not present).
+ y Python debug/diagnostic runtime (release if not present).
+ d debug build (release if not present).
+ p STLport build.
+ n STLport build without its IOStreams.
+
+BOOST_LIB_ARCH_AND_MODEL_OPT: The architecture and address model
+ (-x32 or -x64 for x86/32 and x86/64 respectively)
+
+BOOST_LIB_VERSION: The Boost version, in the form x_y, for Boost version x.y.
+
+
+***************************************************************************/
+
+#ifdef __cplusplus
+# ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+# endif
+#elif defined(_MSC_VER) && !defined(__MWERKS__) && !defined(__EDG_VERSION__)
+//
+// C language compatability (no, honestly)
+//
+# define BOOST_MSVC _MSC_VER
+# define BOOST_STRINGIZE(X) BOOST_DO_STRINGIZE(X)
+# define BOOST_DO_STRINGIZE(X) #X
+#endif
+//
+// Only include what follows for known and supported compilers:
+//
+#if defined(BOOST_MSVC) \
+ || defined(__BORLANDC__) \
+ || (defined(__MWERKS__) && defined(_WIN32) && (__MWERKS__ >= 0x3000)) \
+ || (defined(__ICL) && defined(_MSC_EXTENSIONS) && (_MSC_VER >= 1200))
+
+#ifndef BOOST_VERSION_HPP
+# include <boost/version.hpp>
+#endif
+
+#ifndef BOOST_LIB_NAME
+# error "Macro BOOST_LIB_NAME not set (internal error)"
+#endif
+
+//
+// error check:
+//
+#if defined(__MSVC_RUNTIME_CHECKS) && !defined(_DEBUG)
+# pragma message("Using the /RTC option without specifying a debug runtime will lead to linker errors")
+# pragma message("Hint: go to the code generation options and switch to one of the debugging runtimes")
+# error "Incompatible build options"
+#endif
+//
+// select toolset if not defined already:
+//
+#ifndef BOOST_LIB_TOOLSET
+# if defined(BOOST_MSVC) && (BOOST_MSVC < 1200)
+ // Note: no compilers before 1200 are supported
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1300)
+
+# ifdef UNDER_CE
+ // eVC4:
+# define BOOST_LIB_TOOLSET "evc4"
+# else
+ // vc6:
+# define BOOST_LIB_TOOLSET "vc6"
+# endif
+
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1310)
+
+ // vc7:
+# define BOOST_LIB_TOOLSET "vc7"
+
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1400)
+
+ // vc71:
+# define BOOST_LIB_TOOLSET "vc71"
+
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1500)
+
+ // vc80:
+# define BOOST_LIB_TOOLSET "vc80"
+
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
+
+ // vc90:
+# define BOOST_LIB_TOOLSET "vc90"
+
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1700)
+
+ // vc10:
+# define BOOST_LIB_TOOLSET "vc100"
+
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1800)
+
+ // vc11:
+# define BOOST_LIB_TOOLSET "vc110"
+
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1900)
+
+ // vc12:
+# define BOOST_LIB_TOOLSET "vc120"
+
+# elif defined(BOOST_MSVC) && (BOOST_MSVC < 1910)
+
+ // vc14:
+# define BOOST_LIB_TOOLSET "vc140"
+
+# elif defined(BOOST_MSVC)
+
+ // vc14.1:
+# define BOOST_LIB_TOOLSET "vc141"
+
+# elif defined(__BORLANDC__)
+
+ // CBuilder 6:
+# define BOOST_LIB_TOOLSET "bcb"
+
+# elif defined(__ICL)
+
+ // Intel C++, no version number:
+# define BOOST_LIB_TOOLSET "iw"
+
+# elif defined(__MWERKS__) && (__MWERKS__ <= 0x31FF )
+
+ // Metrowerks CodeWarrior 8.x
+# define BOOST_LIB_TOOLSET "cw8"
+
+# elif defined(__MWERKS__) && (__MWERKS__ <= 0x32FF )
+
+ // Metrowerks CodeWarrior 9.x
+# define BOOST_LIB_TOOLSET "cw9"
+
+# endif
+#endif // BOOST_LIB_TOOLSET
+
+//
+// select thread opt:
+//
+#if defined(_MT) || defined(__MT__)
+# define BOOST_LIB_THREAD_OPT "-mt"
+#else
+# define BOOST_LIB_THREAD_OPT
+#endif
+
+#if defined(_MSC_VER) || defined(__MWERKS__)
+
+# ifdef _DLL
+
+# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
+
+# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-gydp"
+# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+# define BOOST_LIB_RT_OPT "-gdp"
+# elif defined(_DEBUG)\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-gydp"
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+# error "Build options aren't compatible with pre-built libraries"
+# elif defined(_DEBUG)
+# define BOOST_LIB_RT_OPT "-gdp"
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+# error "Build options aren't compatible with pre-built libraries"
+# else
+# define BOOST_LIB_RT_OPT "-p"
+# endif
+
+# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+
+# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-gydpn"
+# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+# define BOOST_LIB_RT_OPT "-gdpn"
+# elif defined(_DEBUG)\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-gydpn"
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+# error "Build options aren't compatible with pre-built libraries"
+# elif defined(_DEBUG)
+# define BOOST_LIB_RT_OPT "-gdpn"
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+# error "Build options aren't compatible with pre-built libraries"
+# else
+# define BOOST_LIB_RT_OPT "-pn"
+# endif
+
+# else
+
+# if defined(_DEBUG) && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-gyd"
+# elif defined(_DEBUG)
+# define BOOST_LIB_RT_OPT "-gd"
+# else
+# define BOOST_LIB_RT_OPT
+# endif
+
+# endif
+
+# else
+
+# if (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)) && (defined(_STLP_OWN_IOSTREAMS) || defined(__STL_OWN_IOSTREAMS))
+
+# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-sgydp"
+# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+# define BOOST_LIB_RT_OPT "-sgdp"
+# elif defined(_DEBUG)\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-sgydp"
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+# error "Build options aren't compatible with pre-built libraries"
+# elif defined(_DEBUG)
+# define BOOST_LIB_RT_OPT "-sgdp"
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+# error "Build options aren't compatible with pre-built libraries"
+# else
+# define BOOST_LIB_RT_OPT "-sp"
+# endif
+
+# elif defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
+
+# if defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-sgydpn"
+# elif defined(_DEBUG) && (defined(__STL_DEBUG) || defined(_STLP_DEBUG))
+# define BOOST_LIB_RT_OPT "-sgdpn"
+# elif defined(_DEBUG)\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-sgydpn"
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+# error "Build options aren't compatible with pre-built libraries"
+# elif defined(_DEBUG)
+# define BOOST_LIB_RT_OPT "-sgdpn"
+# pragma message("warning: STLport debug versions are built with /D_STLP_DEBUG=1")
+# error "Build options aren't compatible with pre-built libraries"
+# else
+# define BOOST_LIB_RT_OPT "-spn"
+# endif
+
+# else
+
+# if defined(_DEBUG)\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-sgyd"
+# elif defined(_DEBUG)
+# define BOOST_LIB_RT_OPT "-sgd"
+# else
+# define BOOST_LIB_RT_OPT "-s"
+# endif
+
+# endif
+
+# endif
+
+#elif defined(__BORLANDC__)
+
+//
+// figure out whether we want the debug builds or not:
+//
+#if __BORLANDC__ > 0x561
+#pragma defineonoption BOOST_BORLAND_DEBUG -v
+#endif
+//
+// sanity check:
+//
+#if defined(__STL_DEBUG) || defined(_STLP_DEBUG)
+#error "Pre-built versions of the Boost libraries are not provided in STLport-debug form"
+#endif
+
+# ifdef _RTLDLL
+
+# if defined(BOOST_BORLAND_DEBUG)\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-yd"
+# elif defined(BOOST_BORLAND_DEBUG)
+# define BOOST_LIB_RT_OPT "-d"
+# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT -y
+# else
+# define BOOST_LIB_RT_OPT
+# endif
+
+# else
+
+# if defined(BOOST_BORLAND_DEBUG)\
+ && defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-syd"
+# elif defined(BOOST_BORLAND_DEBUG)
+# define BOOST_LIB_RT_OPT "-sd"
+# elif defined(BOOST_DEBUG_PYTHON) && defined(BOOST_LINKING_PYTHON)
+# define BOOST_LIB_RT_OPT "-sy"
+# else
+# define BOOST_LIB_RT_OPT "-s"
+# endif
+
+# endif
+
+#endif
+
+//
+// BOOST_LIB_ARCH_AND_MODEL_OPT
+//
+
+#if defined( _M_IX86 )
+# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x32"
+#elif defined( _M_X64 )
+# define BOOST_LIB_ARCH_AND_MODEL_OPT "-x64"
+#elif defined( _M_ARM )
+# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a32"
+#elif defined( _M_ARM64 )
+# define BOOST_LIB_ARCH_AND_MODEL_OPT "-a64"
+#endif
+
+//
+// select linkage opt:
+//
+#if (defined(_DLL) || defined(_RTLDLL)) && defined(BOOST_DYN_LINK)
+# define BOOST_LIB_PREFIX
+#elif defined(BOOST_DYN_LINK)
+# error "Mixing a dll boost library with a static runtime is a really bad idea..."
+#else
+# define BOOST_LIB_PREFIX "lib"
+#endif
+
+//
+// now include the lib:
+//
+#if defined(BOOST_LIB_NAME) \
+ && defined(BOOST_LIB_PREFIX) \
+ && defined(BOOST_LIB_TOOLSET) \
+ && defined(BOOST_LIB_THREAD_OPT) \
+ && defined(BOOST_LIB_RT_OPT) \
+ && defined(BOOST_LIB_ARCH_AND_MODEL_OPT) \
+ && defined(BOOST_LIB_VERSION)
+
+#ifdef BOOST_AUTO_LINK_TAGGED
+# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
+# ifdef BOOST_LIB_DIAGNOSTIC
+# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT ".lib")
+# endif
+#elif defined(BOOST_AUTO_LINK_SYSTEM)
+# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
+# ifdef BOOST_LIB_DIAGNOSTIC
+# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
+# endif
+#elif defined(BOOST_AUTO_LINK_NOMANGLE)
+# pragma comment(lib, BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
+# ifdef BOOST_LIB_DIAGNOSTIC
+# pragma message ("Linking to lib file: " BOOST_STRINGIZE(BOOST_LIB_NAME) ".lib")
+# endif
+#elif defined(BOOST_LIB_BUILDID)
+# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib")
+# ifdef BOOST_LIB_DIAGNOSTIC
+# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION "-" BOOST_STRINGIZE(BOOST_LIB_BUILDID) ".lib")
+# endif
+#else
+# pragma comment(lib, BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib")
+# ifdef BOOST_LIB_DIAGNOSTIC
+# pragma message ("Linking to lib file: " BOOST_LIB_PREFIX BOOST_STRINGIZE(BOOST_LIB_NAME) "-" BOOST_LIB_TOOLSET BOOST_LIB_THREAD_OPT BOOST_LIB_RT_OPT BOOST_LIB_ARCH_AND_MODEL_OPT "-" BOOST_LIB_VERSION ".lib")
+# endif
+#endif
+
+#else
+# error "some required macros where not defined (internal logic error)."
+#endif
+
+
+#endif // _MSC_VER || __BORLANDC__
+
+//
+// finally undef any macros we may have set:
+//
+#ifdef BOOST_LIB_PREFIX
+# undef BOOST_LIB_PREFIX
+#endif
+#if defined(BOOST_LIB_NAME)
+# undef BOOST_LIB_NAME
+#endif
+// Don't undef this one: it can be set by the user and should be the
+// same for all libraries:
+//#if defined(BOOST_LIB_TOOLSET)
+//# undef BOOST_LIB_TOOLSET
+//#endif
+#if defined(BOOST_LIB_THREAD_OPT)
+# undef BOOST_LIB_THREAD_OPT
+#endif
+#if defined(BOOST_LIB_RT_OPT)
+# undef BOOST_LIB_RT_OPT
+#endif
+#if defined(BOOST_LIB_ARCH_AND_MODEL_OPT)
+# undef BOOST_LIB_ARCH_AND_MODEL_OPT
+#endif
+#if defined(BOOST_LIB_LINK_OPT)
+# undef BOOST_LIB_LINK_OPT
+#endif
+#if defined(BOOST_LIB_DEBUG_OPT)
+# undef BOOST_LIB_DEBUG_OPT
+#endif
+#if defined(BOOST_DYN_LINK)
+# undef BOOST_DYN_LINK
+#endif
+
+
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/borland.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/borland.hpp
new file mode 100644
index 00000000000..beec94621f3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/borland.hpp
@@ -0,0 +1,335 @@
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright David Abrahams 2002 - 2003.
+// (C) Copyright Aleksey Gurtovoy 2002.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Borland C++ compiler setup:
+
+//
+// versions check:
+// we don't support Borland prior to version 5.4:
+#if __BORLANDC__ < 0x540
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+
+// last known compiler version:
+#if (__BORLANDC__ > 0x613)
+//# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+//# else
+//# pragma message( "boost: Unknown compiler version - please run the configure tests and report the results")
+//# endif
+#elif (__BORLANDC__ == 0x600)
+# error "CBuilderX preview compiler is no longer supported"
+#endif
+
+//
+// Support macros to help with standard library detection
+#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)
+# define BOOST_BCB_WITH_ROGUE_WAVE
+#elif __BORLANDC__ < 0x570
+# define BOOST_BCB_WITH_STLPORT
+#else
+# define BOOST_BCB_WITH_DINKUMWARE
+#endif
+
+//
+// Version 5.0 and below:
+# if __BORLANDC__ <= 0x0550
+// Borland C++Builder 4 and 5:
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+# if __BORLANDC__ == 0x0550
+// Borland C++Builder 5, command-line compiler 5.5:
+# define BOOST_NO_OPERATORS_IN_NAMESPACE
+# endif
+// Variadic macros do not exist for C++ Builder versions 5 and below
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+# endif
+
+// Version 5.51 and below:
+#if (__BORLANDC__ <= 0x551)
+# define BOOST_NO_CV_SPECIALIZATIONS
+# define BOOST_NO_CV_VOID_SPECIALIZATIONS
+# define BOOST_NO_DEDUCED_TYPENAME
+// workaround for missing WCHAR_MAX/WCHAR_MIN:
+#ifdef __cplusplus
+#include <climits>
+#include <cwchar>
+#else
+#include <limits.h>
+#include <wchar.h>
+#endif // __cplusplus
+#ifndef WCHAR_MAX
+# define WCHAR_MAX 0xffff
+#endif
+#ifndef WCHAR_MIN
+# define WCHAR_MIN 0
+#endif
+#endif
+
+// Borland C++ Builder 6 and below:
+#if (__BORLANDC__ <= 0x564)
+
+# if defined(NDEBUG) && defined(__cplusplus)
+ // fix broken <cstring> so that Boost.test works:
+# include <cstring>
+# undef strcmp
+# endif
+ // fix broken errno declaration:
+# include <errno.h>
+# ifndef errno
+# define errno errno
+# endif
+
+#endif
+
+//
+// new bug in 5.61:
+#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
+ // this seems to be needed by the command line compiler, but not the IDE:
+# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
+#endif
+
+// Borland C++ Builder 2006 Update 2 and below:
+#if (__BORLANDC__ <= 0x582)
+# define BOOST_NO_SFINAE
+# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
+# define BOOST_NO_TEMPLATE_TEMPLATES
+
+# define BOOST_NO_PRIVATE_IN_AGGREGATE
+
+# ifdef _WIN32
+# define BOOST_NO_SWPRINTF
+# elif defined(linux) || defined(__linux__) || defined(__linux)
+ // we should really be able to do without this
+ // but the wcs* functions aren't imported into std::
+# define BOOST_NO_STDC_NAMESPACE
+ // _CPPUNWIND doesn't get automatically set for some reason:
+# pragma defineonoption BOOST_CPPUNWIND -x
+# endif
+#endif
+
+#if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info
+ // we shouldn't really need this - but too many things choke
+ // without it, this needs more investigation:
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# define BOOST_NO_IS_ABSTRACT
+# define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
+# define BOOST_NO_USING_TEMPLATE
+# define BOOST_SP_NO_SP_CONVERTIBLE
+
+// Temporary workaround
+#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+#endif
+
+// Borland C++ Builder 2008 and below:
+# define BOOST_NO_INTEGRAL_INT64_T
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
+# define BOOST_NO_NESTED_FRIENDSHIP
+# define BOOST_NO_TYPENAME_WITH_CTOR
+#if (__BORLANDC__ < 0x600)
+# define BOOST_ILLEGAL_CV_REFERENCES
+#endif
+
+//
+// Positive Feature detection
+//
+// Borland C++ Builder 2008 and below:
+#if (__BORLANDC__ >= 0x599)
+# pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
+#endif
+//
+// C++0x Macros:
+//
+#if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610)
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+# define BOOST_NO_CXX11_DECLTYPE
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+# define BOOST_NO_CXX11_STATIC_ASSERT
+#else
+# define BOOST_HAS_ALIGNOF
+# define BOOST_HAS_CHAR16_T
+# define BOOST_HAS_CHAR32_T
+# define BOOST_HAS_DECLTYPE
+# define BOOST_HAS_EXPLICIT_CONVERSION_OPS
+# define BOOST_HAS_REF_QUALIFIER
+# define BOOST_HAS_RVALUE_REFS
+# define BOOST_HAS_STATIC_ASSERT
+#endif
+
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DEFAULTED_MOVES
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS // UTF-8 still not supported
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#define BOOST_NO_CXX11_ALIGNAS
+#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#define BOOST_NO_CXX11_INLINE_NAMESPACES
+#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+#endif
+#if (__cplusplus < 201304) // There's no SD6 check for this....
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#endif
+#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#endif
+#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#endif
+#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#endif
+#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+#endif
+
+#if __BORLANDC__ >= 0x590
+# define BOOST_HAS_TR1_HASH
+
+# define BOOST_HAS_MACRO_USE_FACET
+#endif
+
+//
+// Post 0x561 we have long long and stdint.h:
+#if __BORLANDC__ >= 0x561
+# ifndef __NO_LONG_LONG
+# define BOOST_HAS_LONG_LONG
+# else
+# define BOOST_NO_LONG_LONG
+# endif
+ // On non-Win32 platforms let the platform config figure this out:
+# ifdef _WIN32
+# define BOOST_HAS_STDINT_H
+# endif
+#endif
+
+// Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is
+// defined, then we have 0x560 or greater with the Rogue Wave implementation
+// which presumably has the std::DBL_MAX bug.
+#if defined( BOOST_BCB_WITH_ROGUE_WAVE )
+// <climits> is partly broken, some macros define symbols that are really in
+// namespace std, so you end up having to use illegal constructs like
+// std::DBL_MAX, as a fix we'll just include float.h and have done with:
+#include <float.h>
+#endif
+//
+// __int64:
+//
+#if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
+# define BOOST_HAS_MS_INT64
+#endif
+//
+// check for exception handling support:
+//
+#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+#endif
+//
+// all versions have a <dirent.h>:
+//
+#ifndef __STRICT_ANSI__
+# define BOOST_HAS_DIRENT_H
+#endif
+//
+// all versions support __declspec:
+//
+#if defined(__STRICT_ANSI__)
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
+# define BOOST_SYMBOL_EXPORT
+#endif
+//
+// ABI fixing headers:
+//
+#if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet
+#ifndef BOOST_ABI_PREFIX
+# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
+#endif
+#ifndef BOOST_ABI_SUFFIX
+# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
+#endif
+#endif
+//
+// Disable Win32 support in ANSI mode:
+//
+#if __BORLANDC__ < 0x600
+# pragma defineonoption BOOST_DISABLE_WIN32 -A
+#elif defined(__STRICT_ANSI__)
+# define BOOST_DISABLE_WIN32
+#endif
+//
+// MSVC compatibility mode does some nasty things:
+// TODO: look up if this doesn't apply to the whole 12xx range
+//
+#if defined(_MSC_VER) && (_MSC_VER <= 1200)
+# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+# define BOOST_NO_VOID_RETURNS
+#endif
+
+// Borland did not implement value-initialization completely, as I reported
+// in 2007, Borland Report 51854, "Value-initialization: POD struct should be
+// zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
+// (Niels Dekker, LKEB, April 2010)
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+
+#define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/clang.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/clang.hpp
new file mode 100644
index 00000000000..3a59ff58781
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/clang.hpp
@@ -0,0 +1,340 @@
+// (C) Copyright Douglas Gregor 2010
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Clang compiler setup.
+
+#define BOOST_HAS_PRAGMA_ONCE
+
+// Detecting `-fms-extension` compiler flag assuming that _MSC_VER defined when that flag is used.
+#if defined (_MSC_VER) && (__clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__ >= 4))
+# define BOOST_HAS_PRAGMA_DETECT_MISMATCH
+#endif
+
+// When compiling with clang before __has_extension was defined,
+// even if one writes 'defined(__has_extension) && __has_extension(xxx)',
+// clang reports a compiler error. So the only workaround found is:
+
+#ifndef __has_extension
+#define __has_extension __has_feature
+#endif
+
+#ifndef __has_attribute
+#define __has_attribute(x) 0
+#endif
+
+#ifndef __has_cpp_attribute
+#define __has_cpp_attribute(x) 0
+#endif
+
+#if !__has_feature(cxx_exceptions) && !defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+#endif
+
+#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_RTTI)
+# define BOOST_NO_RTTI
+#endif
+
+#if !__has_feature(cxx_rtti) && !defined(BOOST_NO_TYPEID)
+# define BOOST_NO_TYPEID
+#endif
+
+#if !__has_feature(cxx_thread_local)
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
+#ifdef __is_identifier
+#if !__is_identifier(__int64) && !defined(__GNUC__)
+# define BOOST_HAS_MS_INT64
+#endif
+#endif
+
+#if __has_include(<stdint.h>)
+# define BOOST_HAS_STDINT_H
+#endif
+
+
+#define BOOST_HAS_NRVO
+
+// Branch prediction hints
+#if !defined (__c2__) && defined(__has_builtin)
+#if __has_builtin(__builtin_expect)
+#define BOOST_LIKELY(x) __builtin_expect(x, 1)
+#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
+#endif
+#endif
+
+// Clang supports "long long" in all compilation modes.
+#define BOOST_HAS_LONG_LONG
+
+//
+// We disable this if the compiler is really nvcc with C++03 as it
+// doesn't actually support __int128 as of CUDA_VERSION=7500
+// even though it defines __SIZEOF_INT128__.
+// See https://svn.boost.org/trac/boost/ticket/10418
+// https://svn.boost.org/trac/boost/ticket/11852
+// Only re-enable this for nvcc if you're absolutely sure
+// of the circumstances under which it's supported.
+// Similarly __SIZEOF_INT128__ is defined when targetting msvc
+// compatibility even though the required support functions are absent.
+//
+#if defined(__CUDACC__)
+# if defined(BOOST_GCC_CXX11)
+# define BOOST_NVCC_CXX11
+# else
+# define BOOST_NVCC_CXX03
+# endif
+#endif
+
+#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03) && !defined(_MSC_VER)
+# define BOOST_HAS_INT128
+#endif
+
+
+//
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support
+//
+#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
+# define BOOST_HAS_DECLSPEC
+# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
+# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
+#else
+# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
+# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
+# define BOOST_SYMBOL_IMPORT
+#endif
+
+//
+// The BOOST_FALLTHROUGH macro can be used to annotate implicit fall-through
+// between switch labels.
+//
+#if __cplusplus >= 201103L && defined(__has_warning)
+# if __has_feature(cxx_attributes) && __has_warning("-Wimplicit-fallthrough")
+# define BOOST_FALLTHROUGH [[clang::fallthrough]]
+# endif
+#endif
+
+#if !__has_feature(cxx_auto_type)
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#endif
+
+//
+// Currently clang on Windows using VC++ RTL does not support C++11's char16_t or char32_t
+//
+#if (defined(_MSC_VER) && (_MSC_VER < 1900)) || !(defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L)
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(__GNUC__)
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_LOG1P
+#endif
+
+#if !__has_feature(cxx_constexpr)
+# define BOOST_NO_CXX11_CONSTEXPR
+#endif
+
+#if !__has_feature(cxx_decltype)
+# define BOOST_NO_CXX11_DECLTYPE
+#endif
+
+#if !__has_feature(cxx_decltype_incomplete_return_types)
+# define BOOST_NO_CXX11_DECLTYPE_N3276
+#endif
+
+#if !__has_feature(cxx_defaulted_functions)
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#endif
+
+#if !__has_feature(cxx_deleted_functions)
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#endif
+
+#if !__has_feature(cxx_explicit_conversions)
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#endif
+
+#if !__has_feature(cxx_default_function_template_args)
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+
+#if !__has_feature(cxx_generalized_initializers)
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#endif
+
+#if !__has_feature(cxx_lambdas)
+# define BOOST_NO_CXX11_LAMBDAS
+#endif
+
+#if !__has_feature(cxx_local_type_template_args)
+# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#endif
+
+#if !__has_feature(cxx_noexcept)
+# define BOOST_NO_CXX11_NOEXCEPT
+#endif
+
+#if !__has_feature(cxx_nullptr)
+# define BOOST_NO_CXX11_NULLPTR
+#endif
+
+#if !__has_feature(cxx_range_for)
+# define BOOST_NO_CXX11_RANGE_BASED_FOR
+#endif
+
+#if !__has_feature(cxx_raw_string_literals)
+# define BOOST_NO_CXX11_RAW_LITERALS
+#endif
+
+#if !__has_feature(cxx_reference_qualified_functions)
+# define BOOST_NO_CXX11_REF_QUALIFIERS
+#endif
+
+#if !__has_feature(cxx_generalized_initializers)
+# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+
+#if !__has_feature(cxx_rvalue_references)
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif
+
+#if !__has_feature(cxx_strong_enums)
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif
+
+#if !__has_feature(cxx_static_assert)
+# define BOOST_NO_CXX11_STATIC_ASSERT
+#endif
+
+#if !__has_feature(cxx_alias_templates)
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#endif
+
+#if !__has_feature(cxx_unicode_literals)
+# define BOOST_NO_CXX11_UNICODE_LITERALS
+#endif
+
+#if !__has_feature(cxx_variadic_templates)
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+
+#if !__has_feature(cxx_user_literals)
+# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#endif
+
+#if !__has_feature(cxx_alignas)
+# define BOOST_NO_CXX11_ALIGNAS
+#endif
+
+#if !__has_feature(cxx_trailing_return)
+# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#endif
+
+#if !__has_feature(cxx_inline_namespaces)
+# define BOOST_NO_CXX11_INLINE_NAMESPACES
+#endif
+
+#if !__has_feature(cxx_override_control)
+# define BOOST_NO_CXX11_FINAL
+#endif
+
+#if !(__has_feature(__cxx_binary_literals__) || __has_extension(__cxx_binary_literals__))
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+
+#if !__has_feature(__cxx_decltype_auto__)
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+#endif
+
+#if !__has_feature(__cxx_aggregate_nsdmi__)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+
+#if !__has_feature(__cxx_init_captures__)
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#endif
+
+#if !__has_feature(__cxx_generic_lambdas__)
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#endif
+
+// clang < 3.5 has a defect with dependent type, like following.
+//
+// template <class T>
+// constexpr typename enable_if<pred<T> >::type foo(T &)
+// { } // error: no return statement in constexpr function
+//
+// This issue also affects C++11 mode, but C++11 constexpr requires return stmt.
+// Therefore we don't care such case.
+//
+// Note that we can't check Clang version directly as the numbering system changes depending who's
+// creating the Clang release (see https://github.com/boostorg/config/pull/39#issuecomment-59927873)
+// so instead verify that we have a feature that was introduced at the same time as working C++14
+// constexpr (generic lambda's in this case):
+//
+#if !__has_feature(__cxx_generic_lambdas__) || !__has_feature(__cxx_relaxed_constexpr__)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+
+#if !__has_feature(__cxx_return_type_deduction__)
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#endif
+
+#if !__has_feature(__cxx_variable_templates__)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+
+#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+#endif
+
+// Clang 3.9+ in c++1z
+#if !__has_cpp_attribute(fallthrough) || __cplusplus < 201406L
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
+#if __cplusplus < 201103L
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#endif
+
+#if __cplusplus < 201400
+// All versions with __cplusplus above this value seem to support this:
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#endif
+//
+// __builtin_unreachable:
+#if defined(__has_builtin) && __has_builtin(__builtin_unreachable)
+#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
+#endif
+
+#if (__clang_major__ == 3) && (__clang_minor__ == 0)
+// Apparently a clang bug:
+# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
+#endif
+
+// Clang has supported the 'unused' attribute since the first release.
+#define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
+
+// Type aliasing hint.
+#if __has_attribute(__may_alias__)
+# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
+#endif
+
+#ifndef BOOST_COMPILER
+# define BOOST_COMPILER "Clang version " __clang_version__
+#endif
+
+// Macro used to identify the Clang compiler.
+#define BOOST_CLANG 1
+
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/codegear.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/codegear.hpp
new file mode 100644
index 00000000000..52531d2f08c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/codegear.hpp
@@ -0,0 +1,239 @@
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright David Abrahams 2002 - 2003.
+// (C) Copyright Aleksey Gurtovoy 2002.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// CodeGear C++ compiler setup:
+
+#if !defined( BOOST_WITH_CODEGEAR_WARNINGS )
+// these warnings occur frequently in optimized template code
+# pragma warn -8004 // var assigned value, but never used
+# pragma warn -8008 // condition always true/false
+# pragma warn -8066 // dead code can never execute
+# pragma warn -8104 // static members with ctors not threadsafe
+# pragma warn -8105 // reference member in class without ctors
+#endif
+//
+// versions check:
+// last known and checked version is 0x621
+#if (__CODEGEARC__ > 0x621)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# else
+# pragma message( "boost: Unknown compiler version - please run the configure tests and report the results")
+# endif
+#endif
+
+// CodeGear C++ Builder 2009
+#if (__CODEGEARC__ <= 0x613)
+# define BOOST_NO_INTEGRAL_INT64_T
+# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
+# define BOOST_NO_PRIVATE_IN_AGGREGATE
+# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
+ // we shouldn't really need this - but too many things choke
+ // without it, this needs more investigation:
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# define BOOST_SP_NO_SP_CONVERTIBLE
+#endif
+
+// CodeGear C++ Builder 2010
+#if (__CODEGEARC__ <= 0x621)
+# define BOOST_NO_TYPENAME_WITH_CTOR // Cannot use typename keyword when making temporaries of a dependant type
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+# define BOOST_NO_NESTED_FRIENDSHIP // TC1 gives nested classes access rights as any other member
+# define BOOST_NO_USING_TEMPLATE
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+// Temporary hack, until specific MPL preprocessed headers are generated
+# define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
+
+// CodeGear has not yet completely implemented value-initialization, for
+// example for array types, as I reported in 2010: Embarcadero Report 83751,
+// "Value-initialization: arrays should have each element value-initialized",
+// http://qc.embarcadero.com/wc/qcmain.aspx?d=83751
+// Last checked version: Embarcadero C++ 6.21
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
+// (Niels Dekker, LKEB, April 2010)
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+
+# if defined(NDEBUG) && defined(__cplusplus)
+ // fix broken <cstring> so that Boost.test works:
+# include <cstring>
+# undef strcmp
+# endif
+ // fix broken errno declaration:
+# include <errno.h>
+# ifndef errno
+# define errno errno
+# endif
+
+#endif
+
+// Reportedly, #pragma once is supported since C++ Builder 2010
+#if (__CODEGEARC__ >= 0x620)
+# define BOOST_HAS_PRAGMA_ONCE
+#endif
+
+//
+// C++0x macros:
+//
+#if (__CODEGEARC__ <= 0x620)
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#else
+#define BOOST_HAS_STATIC_ASSERT
+#endif
+#define BOOST_HAS_CHAR16_T
+#define BOOST_HAS_CHAR32_T
+#define BOOST_HAS_LONG_LONG
+// #define BOOST_HAS_ALIGNOF
+#define BOOST_HAS_DECLTYPE
+#define BOOST_HAS_EXPLICIT_CONVERSION_OPS
+// #define BOOST_HAS_RVALUE_REFS
+#define BOOST_HAS_SCOPED_ENUM
+// #define BOOST_HAS_STATIC_ASSERT
+#define BOOST_HAS_STD_TYPE_TRAITS
+
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#define BOOST_NO_CXX11_ALIGNAS
+#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#define BOOST_NO_CXX11_INLINE_NAMESPACES
+#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+#endif
+#if (__cplusplus < 201304) // There's no SD6 check for this....
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#endif
+#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#endif
+#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#endif
+#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#endif
+#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
+#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+#endif
+
+//
+// TR1 macros:
+//
+#define BOOST_HAS_TR1_HASH
+#define BOOST_HAS_TR1_TYPE_TRAITS
+#define BOOST_HAS_TR1_UNORDERED_MAP
+#define BOOST_HAS_TR1_UNORDERED_SET
+
+#define BOOST_HAS_MACRO_USE_FACET
+
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+
+// On non-Win32 platforms let the platform config figure this out:
+#ifdef _WIN32
+# define BOOST_HAS_STDINT_H
+#endif
+
+//
+// __int64:
+//
+#if !defined(__STRICT_ANSI__)
+# define BOOST_HAS_MS_INT64
+#endif
+//
+// check for exception handling support:
+//
+#if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+#endif
+//
+// all versions have a <dirent.h>:
+//
+#if !defined(__STRICT_ANSI__)
+# define BOOST_HAS_DIRENT_H
+#endif
+//
+// all versions support __declspec:
+//
+#if defined(__STRICT_ANSI__)
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
+# define BOOST_SYMBOL_EXPORT
+#endif
+//
+// ABI fixing headers:
+//
+#ifndef BOOST_ABI_PREFIX
+# define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
+#endif
+#ifndef BOOST_ABI_SUFFIX
+# define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
+#endif
+//
+// Disable Win32 support in ANSI mode:
+//
+# pragma defineonoption BOOST_DISABLE_WIN32 -A
+//
+// MSVC compatibility mode does some nasty things:
+// TODO: look up if this doesn't apply to the whole 12xx range
+//
+#if defined(_MSC_VER) && (_MSC_VER <= 1200)
+# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+# define BOOST_NO_VOID_RETURNS
+#endif
+
+#define BOOST_COMPILER "CodeGear C++ version " BOOST_STRINGIZE(__CODEGEARC__)
+
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/comeau.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/comeau.hpp
new file mode 100644
index 00000000000..ca80fac37a2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/comeau.hpp
@@ -0,0 +1,59 @@
+// (C) Copyright John Maddock 2001.
+// (C) Copyright Douglas Gregor 2001.
+// (C) Copyright Peter Dimov 2001.
+// (C) Copyright Aleksey Gurtovoy 2003.
+// (C) Copyright Beman Dawes 2003.
+// (C) Copyright Jens Maurer 2003.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Comeau C++ compiler setup:
+
+#include <boost/config/compiler/common_edg.hpp>
+
+#if (__COMO_VERSION__ <= 4245)
+
+# if defined(_MSC_VER) && _MSC_VER <= 1300
+# if _MSC_VER > 100
+ // only set this in non-strict mode:
+# define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
+# endif
+# endif
+
+// Void returns don't work when emulating VC 6 (Peter Dimov)
+// TODO: look up if this doesn't apply to the whole 12xx range
+# if defined(_MSC_VER) && (_MSC_VER < 1300)
+# define BOOST_NO_VOID_RETURNS
+# endif
+
+#endif // version 4245
+
+//
+// enable __int64 support in VC emulation mode
+//
+# if defined(_MSC_VER) && (_MSC_VER >= 1200)
+# define BOOST_HAS_MS_INT64
+# endif
+
+#define BOOST_COMPILER "Comeau compiler version " BOOST_STRINGIZE(__COMO_VERSION__)
+
+//
+// versions check:
+// we don't know Comeau prior to version 4245:
+#if __COMO_VERSION__ < 4245
+# error "Compiler not configured - please reconfigure"
+#endif
+//
+// last known and checked version is 4245:
+#if (__COMO_VERSION__ > 4245)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
+
+
+
+
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/common_edg.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/common_edg.hpp
index 88aba9ac8f4..88aba9ac8f4 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/common_edg.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/common_edg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/compaq_cxx.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/compaq_cxx.hpp
index 4d6b8ab3ac7..4d6b8ab3ac7 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/compaq_cxx.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/compaq_cxx.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/cray.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/cray.hpp
index 412ef9efa5a..412ef9efa5a 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/cray.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/cray.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/diab.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/diab.hpp
index 943db83fd6e..943db83fd6e 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/diab.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/diab.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/digitalmars.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/digitalmars.hpp
new file mode 100644
index 00000000000..1466373191a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/digitalmars.hpp
@@ -0,0 +1,140 @@
+// Copyright (C) Christof Meerwald 2003
+// Copyright (C) Dan Watkins 2003
+//
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Digital Mars C++ compiler setup:
+#define BOOST_COMPILER __DMC_VERSION_STRING__
+
+#define BOOST_HAS_LONG_LONG
+#define BOOST_HAS_PRAGMA_ONCE
+
+#if !defined(BOOST_STRICT_CONFIG)
+#define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#define BOOST_NO_OPERATORS_IN_NAMESPACE
+#define BOOST_NO_UNREACHABLE_RETURN_DETECTION
+#define BOOST_NO_SFINAE
+#define BOOST_NO_USING_TEMPLATE
+#define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+#endif
+
+//
+// has macros:
+#define BOOST_HAS_DIRENT_H
+#define BOOST_HAS_STDINT_H
+#define BOOST_HAS_WINTHREADS
+
+#if (__DMC__ >= 0x847)
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_LOG1P
+#endif
+
+//
+// Is this really the best way to detect whether the std lib is in namespace std?
+//
+#ifdef __cplusplus
+#include <cstddef>
+#endif
+#if !defined(__STL_IMPORT_VENDOR_CSTD) && !defined(_STLP_IMPORT_VENDOR_CSTD)
+# define BOOST_NO_STDC_NAMESPACE
+#endif
+
+
+// check for exception handling support:
+#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+#endif
+
+//
+// C++0x features
+//
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#define BOOST_NO_CXX11_ALIGNAS
+#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#define BOOST_NO_CXX11_INLINE_NAMESPACES
+#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+#endif
+#if (__cplusplus < 201304) // There's no SD6 check for this....
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#endif
+#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#endif
+#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#endif
+#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#endif
+#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+#endif
+
+#if (__DMC__ <= 0x840)
+#error "Compiler not supported or configured - please reconfigure"
+#endif
+//
+// last known and checked version is ...:
+#if (__DMC__ > 0x848)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/gcc.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/gcc.hpp
new file mode 100644
index 00000000000..594c44f5728
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/gcc.hpp
@@ -0,0 +1,359 @@
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Darin Adler 2001 - 2002.
+// (C) Copyright Jens Maurer 2001 - 2002.
+// (C) Copyright Beman Dawes 2001 - 2003.
+// (C) Copyright Douglas Gregor 2002.
+// (C) Copyright David Abrahams 2002 - 2003.
+// (C) Copyright Synge Todo 2003.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// GNU C++ compiler setup.
+
+//
+// Define BOOST_GCC so we know this is "real" GCC and not some pretender:
+//
+#define BOOST_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#if !defined(__CUDACC__)
+#define BOOST_GCC BOOST_GCC_VERSION
+#endif
+
+#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
+# define BOOST_GCC_CXX11
+#endif
+
+#if __GNUC__ == 3
+# if defined (__PATHSCALE__)
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+# define BOOST_NO_IS_ABSTRACT
+# endif
+
+# if __GNUC_MINOR__ < 4
+# define BOOST_NO_IS_ABSTRACT
+# endif
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#endif
+#if __GNUC__ < 4
+//
+// All problems to gcc-3.x and earlier here:
+//
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+# ifdef __OPEN64__
+# define BOOST_NO_IS_ABSTRACT
+# endif
+#endif
+
+// GCC prior to 3.4 had #pragma once too but it didn't work well with filesystem links
+#if BOOST_GCC_VERSION >= 30400
+#define BOOST_HAS_PRAGMA_ONCE
+#endif
+
+#if BOOST_GCC_VERSION < 40400
+// Previous versions of GCC did not completely implement value-initialization:
+// GCC Bug 30111, "Value-initialization of POD base class doesn't initialize
+// members", reported by Jonathan Wakely in 2006,
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30111 (fixed for GCC 4.4)
+// GCC Bug 33916, "Default constructor fails to initialize array members",
+// reported by Michael Elizabeth Chastain in 2007,
+// http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33916 (fixed for GCC 4.2.4)
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#endif
+
+#if !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+#endif
+
+
+//
+// Threading support: Turn this on unconditionally here (except for
+// those platforms where we can know for sure). It will get turned off again
+// later if no threading API is detected.
+//
+#if !defined(__MINGW32__) && !defined(linux) && !defined(__linux) && !defined(__linux__)
+# define BOOST_HAS_THREADS
+#endif
+
+//
+// gcc has "long long"
+// Except on Darwin with standard compliance enabled (-pedantic)
+// Apple gcc helpfully defines this macro we can query
+//
+#if !defined(__DARWIN_NO_LONG_LONG)
+# define BOOST_HAS_LONG_LONG
+#endif
+
+//
+// gcc implements the named return value optimization since version 3.1
+//
+#define BOOST_HAS_NRVO
+
+// Branch prediction hints
+#define BOOST_LIKELY(x) __builtin_expect(x, 1)
+#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
+
+//
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support
+//
+#if __GNUC__ >= 4
+# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
+ // All Win32 development environments, including 64-bit Windows and MinGW, define
+ // _WIN32 or one of its variant spellings. Note that Cygwin is a POSIX environment,
+ // so does not define _WIN32 or its variants, but still supports dllexport/dllimport.
+# define BOOST_HAS_DECLSPEC
+# define BOOST_SYMBOL_EXPORT __attribute__((__dllexport__))
+# define BOOST_SYMBOL_IMPORT __attribute__((__dllimport__))
+# else
+# define BOOST_SYMBOL_EXPORT __attribute__((__visibility__("default")))
+# define BOOST_SYMBOL_IMPORT
+# endif
+# define BOOST_SYMBOL_VISIBLE __attribute__((__visibility__("default")))
+#else
+// config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined
+# define BOOST_SYMBOL_EXPORT
+#endif
+
+//
+// RTTI and typeinfo detection is possible post gcc-4.3:
+//
+#if BOOST_GCC_VERSION > 40300
+# ifndef __GXX_RTTI
+# ifndef BOOST_NO_TYPEID
+# define BOOST_NO_TYPEID
+# endif
+# ifndef BOOST_NO_RTTI
+# define BOOST_NO_RTTI
+# endif
+# endif
+#endif
+
+//
+// Recent GCC versions have __int128 when in 64-bit mode.
+//
+// We disable this if the compiler is really nvcc with C++03 as it
+// doesn't actually support __int128 as of CUDA_VERSION=7500
+// even though it defines __SIZEOF_INT128__.
+// See https://svn.boost.org/trac/boost/ticket/8048
+// https://svn.boost.org/trac/boost/ticket/11852
+// Only re-enable this for nvcc if you're absolutely sure
+// of the circumstances under which it's supported:
+//
+#if defined(__CUDACC__)
+# if defined(BOOST_GCC_CXX11)
+# define BOOST_NVCC_CXX11
+# else
+# define BOOST_NVCC_CXX03
+# endif
+#endif
+
+#if defined(__SIZEOF_INT128__) && !defined(BOOST_NVCC_CXX03)
+# define BOOST_HAS_INT128
+#endif
+//
+// Recent GCC versions have a __float128 native type, we need to
+// include a std lib header to detect this - not ideal, but we'll
+// be including <cstddef> later anyway when we select the std lib.
+//
+// Nevertheless, as of CUDA 7.5, using __float128 with the host
+// compiler in pre-C++11 mode is still not supported.
+// See https://svn.boost.org/trac/boost/ticket/11852
+//
+#ifdef __cplusplus
+#include <cstddef>
+#else
+#include <stddef.h>
+#endif
+#if defined(_GLIBCXX_USE_FLOAT128) && !defined(__STRICT_ANSI__) && !defined(BOOST_NVCC_CXX03)
+# define BOOST_HAS_FLOAT128
+#endif
+
+// C++0x features in 4.3.n and later
+//
+#if (BOOST_GCC_VERSION >= 40300) && defined(BOOST_GCC_CXX11)
+// C++0x features are only enabled when -std=c++0x or -std=gnu++0x are
+// passed on the command line, which in turn defines
+// __GXX_EXPERIMENTAL_CXX0X__.
+# define BOOST_HAS_DECLTYPE
+# define BOOST_HAS_RVALUE_REFS
+# define BOOST_HAS_STATIC_ASSERT
+# define BOOST_HAS_VARIADIC_TMPL
+#else
+# define BOOST_NO_CXX11_DECLTYPE
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_STATIC_ASSERT
+#endif
+
+// C++0x features in 4.4.n and later
+//
+#if (BOOST_GCC_VERSION < 40400) || !defined(BOOST_GCC_CXX11)
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+# define BOOST_NO_CXX11_INLINE_NAMESPACES
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+
+#if BOOST_GCC_VERSION < 40500
+# define BOOST_NO_SFINAE_EXPR
+#endif
+
+// GCC 4.5 forbids declaration of defaulted functions in private or protected sections
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ == 5) || !defined(BOOST_GCC_CXX11)
+# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
+#endif
+
+// C++0x features in 4.5.0 and later
+//
+#if (BOOST_GCC_VERSION < 40500) || !defined(BOOST_GCC_CXX11)
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_LAMBDAS
+# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+# define BOOST_NO_CXX11_RAW_LITERALS
+# define BOOST_NO_CXX11_UNICODE_LITERALS
+#endif
+
+// C++0x features in 4.5.1 and later
+//
+#if (BOOST_GCC_VERSION < 40501) || !defined(BOOST_GCC_CXX11)
+// scoped enums have a serious bug in 4.4.0, so define BOOST_NO_CXX11_SCOPED_ENUMS before 4.5.1
+// See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38064
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif
+
+// C++0x features in 4.6.n and later
+//
+#if (BOOST_GCC_VERSION < 40600) || !defined(BOOST_GCC_CXX11)
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DEFAULTED_MOVES
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+
+// C++0x features in 4.7.n and later
+//
+#if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11)
+# define BOOST_NO_CXX11_FINAL
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
+# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
+#endif
+
+// C++0x features in 4.8.n and later
+//
+#if (BOOST_GCC_VERSION < 40800) || !defined(BOOST_GCC_CXX11)
+# define BOOST_NO_CXX11_ALIGNAS
+# define BOOST_NO_CXX11_THREAD_LOCAL
+# define BOOST_NO_CXX11_SFINAE_EXPR
+#endif
+
+// C++0x features in 4.8.1 and later
+//
+#if (BOOST_GCC_VERSION < 40801) || !defined(BOOST_GCC_CXX11)
+# define BOOST_NO_CXX11_DECLTYPE_N3276
+# define BOOST_NO_CXX11_REF_QUALIFIERS
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+
+// C++14 features in 4.9.0 and later
+//
+#if (BOOST_GCC_VERSION < 40900) || (__cplusplus < 201300)
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+# if !((BOOST_GCC_VERSION >= 40801) && (BOOST_GCC_VERSION < 40900) && defined(BOOST_GCC_CXX11))
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+# endif
+#endif
+
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if (BOOST_GCC_VERSION < 50200) || !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+#endif
+
+#if __GNUC__ >= 7
+# define BOOST_FALLTHROUGH __attribute__((fallthrough))
+#endif
+
+#ifdef __MINGW32__
+// Currently (June 2017) thread_local is broken on mingw for all current compiler releases, see
+// https://sourceforge.net/p/mingw-w64/bugs/527/
+// Not setting this causes program termination on thread exit.
+#define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
+//
+// Unused attribute:
+#if __GNUC__ >= 4
+# define BOOST_ATTRIBUTE_UNUSED __attribute__((__unused__))
+#endif
+
+// Type aliasing hint. Supported since gcc 3.3.
+#define BOOST_MAY_ALIAS __attribute__((__may_alias__))
+
+//
+// __builtin_unreachable:
+#if BOOST_GCC_VERSION >= 40800
+#define BOOST_UNREACHABLE_RETURN(x) __builtin_unreachable();
+#endif
+
+#ifndef BOOST_COMPILER
+# define BOOST_COMPILER "GNU C++ version " __VERSION__
+#endif
+
+// ConceptGCC compiler:
+// http://www.generic-programming.org/software/ConceptGCC/
+#ifdef __GXX_CONCEPTS__
+# define BOOST_HAS_CONCEPTS
+# define BOOST_COMPILER "ConceptGCC version " __VERSION__
+#endif
+
+// versions check:
+// we don't know gcc prior to version 3.30:
+#if (BOOST_GCC_VERSION< 30300)
+# error "Compiler not configured - please reconfigure"
+#endif
+//
+// last known and checked version is 8.1:
+#if (BOOST_GCC_VERSION > 80100)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "Boost.Config is older than your compiler - please check for an updated Boost release."
+# else
+// we don't emit warnings here anymore since there are no defect macros defined for
+// gcc post 3.4, so any failures are gcc regressions...
+//# warning "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/gcc_xml.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/gcc_xml.hpp
index bdba4ed092b..bdba4ed092b 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/gcc_xml.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/gcc_xml.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/greenhills.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/greenhills.hpp
new file mode 100644
index 00000000000..39112c2c1cf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/greenhills.hpp
@@ -0,0 +1,28 @@
+// (C) Copyright John Maddock 2001.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Greenhills C++ compiler setup:
+
+#define BOOST_COMPILER "Greenhills C++ version " BOOST_STRINGIZE(__ghs)
+
+#include <boost/config/compiler/common_edg.hpp>
+
+//
+// versions check:
+// we don't support Greenhills prior to version 0:
+#if __ghs < 0
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+//
+// last known and checked version is 0:
+#if (__ghs > 0)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
+
+
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/hp_acc.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/hp_acc.hpp
new file mode 100644
index 00000000000..49d676fa2b2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/hp_acc.hpp
@@ -0,0 +1,147 @@
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Jens Maurer 2001 - 2003.
+// (C) Copyright Aleksey Gurtovoy 2002.
+// (C) Copyright David Abrahams 2002 - 2003.
+// (C) Copyright Toon Knapen 2003.
+// (C) Copyright Boris Gubenko 2006 - 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// HP aCC C++ compiler setup:
+
+#if defined(__EDG__)
+#include <boost/config/compiler/common_edg.hpp>
+#endif
+
+#if (__HP_aCC <= 33100)
+# define BOOST_NO_INTEGRAL_INT64_T
+# define BOOST_NO_OPERATORS_IN_NAMESPACE
+# if !defined(_NAMESPACE_STD)
+# define BOOST_NO_STD_LOCALE
+# define BOOST_NO_STRINGSTREAM
+# endif
+#endif
+
+#if (__HP_aCC <= 33300)
+// member templates are sufficiently broken that we disable them for now
+# define BOOST_NO_MEMBER_TEMPLATES
+# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
+# define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
+#endif
+
+#if (__HP_aCC <= 38000)
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#endif
+
+#if (__HP_aCC > 50000) && (__HP_aCC < 60000)
+# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
+# define BOOST_NO_TEMPLATE_TEMPLATES
+# define BOOST_NO_SWPRINTF
+# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
+# define BOOST_NO_IS_ABSTRACT
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#endif
+
+// optional features rather than defects:
+#if (__HP_aCC >= 33900)
+# define BOOST_HAS_LONG_LONG
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
+#endif
+
+#if (__HP_aCC >= 50000 ) && (__HP_aCC <= 53800 ) || (__HP_aCC < 31300 )
+# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
+#endif
+
+// This macro should not be defined when compiling in strict ansi
+// mode, but, currently, we don't have the ability to determine
+// what standard mode we are compiling with. Some future version
+// of aCC6 compiler will provide predefined macros reflecting the
+// compilation options, including the standard mode.
+#if (__HP_aCC >= 60000) || ((__HP_aCC > 38000) && defined(__hpxstd98))
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#endif
+
+#define BOOST_COMPILER "HP aCC version " BOOST_STRINGIZE(__HP_aCC)
+
+//
+// versions check:
+// we don't support HP aCC prior to version 33000:
+#if __HP_aCC < 33000
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+
+//
+// Extended checks for supporting aCC on PA-RISC
+#if __HP_aCC > 30000 && __HP_aCC < 50000
+# if __HP_aCC < 38000
+ // versions prior to version A.03.80 not supported
+# error "Compiler version not supported - version A.03.80 or higher is required"
+# elif !defined(__hpxstd98)
+ // must compile using the option +hpxstd98 with version A.03.80 and above
+# error "Compiler option '+hpxstd98' is required for proper support"
+# endif //PA-RISC
+#endif
+
+//
+// C++0x features
+//
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
+//
+#if !defined(__EDG__)
+
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#define BOOST_NO_CXX11_ALIGNAS
+#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#define BOOST_NO_CXX11_INLINE_NAMESPACES
+#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_THREAD_LOCAL
+
+/*
+ See https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443331 and
+ https://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1443436
+*/
+
+#if (__HP_aCC < 62500) || !defined(HP_CXX0x_SOURCE)
+ #define BOOST_NO_CXX11_VARIADIC_MACROS
+#endif
+
+#endif
+
+//
+// last known and checked version for HP-UX/ia64 is 61300
+// last known and checked version for PA-RISC is 38000
+#if ((__HP_aCC > 61300) || ((__HP_aCC > 38000) && defined(__hpxstd98)))
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/intel.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/intel.hpp
new file mode 100644
index 00000000000..f56807dbbcb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/intel.hpp
@@ -0,0 +1,569 @@
+// (C) Copyright John Maddock 2001-8.
+// (C) Copyright Peter Dimov 2001.
+// (C) Copyright Jens Maurer 2001.
+// (C) Copyright David Abrahams 2002 - 2003.
+// (C) Copyright Aleksey Gurtovoy 2002 - 2003.
+// (C) Copyright Guillaume Melquiond 2002 - 2003.
+// (C) Copyright Beman Dawes 2003.
+// (C) Copyright Martin Wille 2003.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Intel compiler setup:
+
+#if defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__))
+
+#ifdef _MSC_VER
+
+#include <boost/config/compiler/visualc.hpp>
+
+#undef BOOST_MSVC
+#undef BOOST_MSVC_FULL_VER
+
+#if (__INTEL_COMPILER >= 1500) && (_MSC_VER >= 1900)
+//
+// These appear to be supported, even though VC++ may not support them:
+//
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_LOG1P
+#undef BOOST_NO_CXX14_BINARY_LITERALS
+// This one may be a little risky to enable??
+#undef BOOST_NO_SFINAE_EXPR
+
+#endif
+
+#if (__INTEL_COMPILER <= 1600) && !defined(BOOST_NO_CXX14_VARIABLE_TEMPLATES)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+#else // defined(_MSC_VER)
+
+#include <boost/config/compiler/gcc.hpp>
+
+#undef BOOST_GCC_VERSION
+#undef BOOST_GCC_CXX11
+#undef BOOST_GCC
+#undef BOOST_FALLTHROUGH
+
+// Broken in all versions up to 17 (newer versions not tested)
+#if (__INTEL_COMPILER <= 1700) && !defined(BOOST_NO_CXX14_CONSTEXPR)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+
+#if (__INTEL_COMPILER >= 1800) && (__cplusplus >= 201703)
+# define BOOST_FALLTHROUGH [[fallthrough]]
+#endif
+
+#endif // defined(_MSC_VER)
+
+#undef BOOST_COMPILER
+
+#if defined(__INTEL_COMPILER)
+#if __INTEL_COMPILER == 9999
+# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1.
+#else
+# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
+#endif
+#elif defined(__ICL)
+# define BOOST_INTEL_CXX_VERSION __ICL
+#elif defined(__ICC)
+# define BOOST_INTEL_CXX_VERSION __ICC
+#elif defined(__ECC)
+# define BOOST_INTEL_CXX_VERSION __ECC
+#endif
+
+// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
+#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_INTEL_STDCXX0X
+#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+# define BOOST_INTEL_STDCXX0X
+#endif
+
+#ifdef __GNUC__
+# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#endif
+
+#if !defined(BOOST_COMPILER)
+# if defined(BOOST_INTEL_STDCXX0X)
+# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
+# else
+# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
+# endif
+#endif
+
+#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
+
+#if defined(_WIN32) || defined(_WIN64)
+# define BOOST_INTEL_WIN BOOST_INTEL
+#else
+# define BOOST_INTEL_LINUX BOOST_INTEL
+#endif
+
+#else // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__))
+
+#include <boost/config/compiler/common_edg.hpp>
+
+#if defined(__INTEL_COMPILER)
+#if __INTEL_COMPILER == 9999
+# define BOOST_INTEL_CXX_VERSION 1200 // Intel bug in 12.1.
+#else
+# define BOOST_INTEL_CXX_VERSION __INTEL_COMPILER
+#endif
+#elif defined(__ICL)
+# define BOOST_INTEL_CXX_VERSION __ICL
+#elif defined(__ICC)
+# define BOOST_INTEL_CXX_VERSION __ICC
+#elif defined(__ECC)
+# define BOOST_INTEL_CXX_VERSION __ECC
+#endif
+
+// Flags determined by comparing output of 'icpc -dM -E' with and without '-std=c++0x'
+#if (!(defined(_WIN32) || defined(_WIN64)) && defined(__STDC_HOSTED__) && (__STDC_HOSTED__ && (BOOST_INTEL_CXX_VERSION <= 1200))) || defined(__GXX_EXPERIMENTAL_CPP0X__) || defined(__GXX_EXPERIMENTAL_CXX0X__)
+# define BOOST_INTEL_STDCXX0X
+#endif
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+# define BOOST_INTEL_STDCXX0X
+#endif
+
+#ifdef __GNUC__
+# define BOOST_INTEL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#endif
+
+#if !defined(BOOST_COMPILER)
+# if defined(BOOST_INTEL_STDCXX0X)
+# define BOOST_COMPILER "Intel C++ C++0x mode version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
+# else
+# define BOOST_COMPILER "Intel C++ version " BOOST_STRINGIZE(BOOST_INTEL_CXX_VERSION)
+# endif
+#endif
+
+#define BOOST_INTEL BOOST_INTEL_CXX_VERSION
+
+#if defined(_WIN32) || defined(_WIN64)
+# define BOOST_INTEL_WIN BOOST_INTEL
+#else
+# define BOOST_INTEL_LINUX BOOST_INTEL
+#endif
+
+#if (BOOST_INTEL_CXX_VERSION <= 600)
+
+# if defined(_MSC_VER) && (_MSC_VER <= 1300) // added check for <= VC 7 (Peter Dimov)
+
+// Boost libraries assume strong standard conformance unless otherwise
+// indicated by a config macro. As configured by Intel, the EDG front-end
+// requires certain compiler options be set to achieve that strong conformance.
+// Particularly /Qoption,c,--arg_dep_lookup (reported by Kirk Klobe & Thomas Witt)
+// and /Zc:wchar_t,forScope. See boost-root/tools/build/intel-win32-tools.jam for
+// details as they apply to particular versions of the compiler. When the
+// compiler does not predefine a macro indicating if an option has been set,
+// this config file simply assumes the option has been set.
+// Thus BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP will not be defined, even if
+// the compiler option is not enabled.
+
+# define BOOST_NO_SWPRINTF
+# endif
+
+// Void returns, 64 bit integrals don't work when emulating VC 6 (Peter Dimov)
+
+# if defined(_MSC_VER) && (_MSC_VER <= 1200)
+# define BOOST_NO_VOID_RETURNS
+# define BOOST_NO_INTEGRAL_INT64_T
+# endif
+
+#endif
+
+#if (BOOST_INTEL_CXX_VERSION <= 710) && defined(_WIN32)
+# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
+#endif
+
+// See http://aspn.activestate.com/ASPN/Mail/Message/boost/1614864
+#if BOOST_INTEL_CXX_VERSION < 600
+# define BOOST_NO_INTRINSIC_WCHAR_T
+#else
+// We should test the macro _WCHAR_T_DEFINED to check if the compiler
+// supports wchar_t natively. *BUT* there is a problem here: the standard
+// headers define this macro if they typedef wchar_t. Anyway, we're lucky
+// because they define it without a value, while Intel C++ defines it
+// to 1. So we can check its value to see if the macro was defined natively
+// or not.
+// Under UNIX, the situation is exactly the same, but the macro _WCHAR_T
+// is used instead.
+# if ((_WCHAR_T_DEFINED + 0) == 0) && ((_WCHAR_T + 0) == 0)
+# define BOOST_NO_INTRINSIC_WCHAR_T
+# endif
+#endif
+
+#if defined(__GNUC__) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
+//
+// Figure out when Intel is emulating this gcc bug
+// (All Intel versions prior to 9.0.26, and versions
+// later than that if they are set up to emulate gcc 3.2
+// or earlier):
+//
+# if ((__GNUC__ == 3) && (__GNUC_MINOR__ <= 2)) || (BOOST_INTEL < 900) || (__INTEL_COMPILER_BUILD_DATE < 20050912)
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+# endif
+#endif
+#if (defined(__GNUC__) && (__GNUC__ < 4)) || (defined(_WIN32) && (BOOST_INTEL_CXX_VERSION <= 1200)) || (BOOST_INTEL_CXX_VERSION <= 1200)
+// GCC or VC emulation:
+#define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#endif
+//
+// Verify that we have actually got BOOST_NO_INTRINSIC_WCHAR_T
+// set correctly, if we don't do this now, we will get errors later
+// in type_traits code among other things, getting this correct
+// for the Intel compiler is actually remarkably fragile and tricky:
+//
+#ifdef __cplusplus
+#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
+#include <cwchar>
+template< typename T > struct assert_no_intrinsic_wchar_t;
+template<> struct assert_no_intrinsic_wchar_t<wchar_t> { typedef void type; };
+// if you see an error here then you need to unset BOOST_NO_INTRINSIC_WCHAR_T
+// where it is defined above:
+typedef assert_no_intrinsic_wchar_t<unsigned short>::type assert_no_intrinsic_wchar_t_;
+#else
+template< typename T > struct assert_intrinsic_wchar_t;
+template<> struct assert_intrinsic_wchar_t<wchar_t> {};
+// if you see an error here then define BOOST_NO_INTRINSIC_WCHAR_T on the command line:
+template<> struct assert_intrinsic_wchar_t<unsigned short> {};
+#endif
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER+0 >= 1000)
+# if _MSC_VER >= 1200
+# define BOOST_HAS_MS_INT64
+# endif
+# define BOOST_NO_SWPRINTF
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#elif defined(_WIN32)
+# define BOOST_DISABLE_WIN32
+#endif
+
+// I checked version 6.0 build 020312Z, it implements the NRVO.
+// Correct this as you find out which version of the compiler
+// implemented the NRVO first. (Daniel Frey)
+#if (BOOST_INTEL_CXX_VERSION >= 600)
+# define BOOST_HAS_NRVO
+#endif
+
+// Branch prediction hints
+// I'm not sure 8.0 was the first version to support these builtins,
+// update the condition if the version is not accurate. (Andrey Semashev)
+#if defined(__GNUC__) && BOOST_INTEL_CXX_VERSION >= 800
+#define BOOST_LIKELY(x) __builtin_expect(x, 1)
+#define BOOST_UNLIKELY(x) __builtin_expect(x, 0)
+#endif
+
+// RTTI
+// __RTTI is the EDG macro
+// __INTEL_RTTI__ is the Intel macro
+// __GXX_RTTI is the g++ macro
+// _CPPRTTI is the MSVC++ macro
+#if !defined(__RTTI) && !defined(__INTEL_RTTI__) && !defined(__GXX_RTTI) && !defined(_CPPRTTI)
+
+#if !defined(BOOST_NO_RTTI)
+# define BOOST_NO_RTTI
+#endif
+
+// in MS mode, static typeid works even when RTTI is off
+#if !defined(_MSC_VER) && !defined(BOOST_NO_TYPEID)
+# define BOOST_NO_TYPEID
+#endif
+
+#endif
+
+//
+// versions check:
+// we don't support Intel prior to version 6.0:
+#if BOOST_INTEL_CXX_VERSION < 600
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+
+// Intel on MacOS requires
+#if defined(__APPLE__) && defined(__INTEL_COMPILER)
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#endif
+
+// Intel on Altix Itanium
+#if defined(__itanium__) && defined(__INTEL_COMPILER)
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+#endif
+
+//
+// An attempt to value-initialize a pointer-to-member may trigger an
+// internal error on Intel <= 11.1 (last checked version), as was
+// reported by John Maddock, Intel support issue 589832, May 2010.
+// Moreover, according to test results from Huang-Vista-x86_32_intel,
+// intel-vc9-win-11.1 may leave a non-POD array uninitialized, in some
+// cases when it should be value-initialized.
+// (Niels Dekker, LKEB, May 2010)
+// Apparently Intel 12.1 (compiler version number 9999 !!) has the same issue (compiler regression).
+#if defined(__INTEL_COMPILER)
+# if (__INTEL_COMPILER <= 1110) || (__INTEL_COMPILER == 9999) || (defined(_WIN32) && (__INTEL_COMPILER < 1600))
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+# endif
+#endif
+
+//
+// Dynamic shared object (DSO) and dynamic-link library (DLL) support
+//
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+# define BOOST_SYMBOL_EXPORT __attribute__((visibility("default")))
+# define BOOST_SYMBOL_IMPORT
+# define BOOST_SYMBOL_VISIBLE __attribute__((visibility("default")))
+#endif
+
+// Type aliasing hint
+#if defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1300)
+# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
+#endif
+
+//
+// C++0x features
+// For each feature we need to check both the Intel compiler version,
+// and the version of MSVC or GCC that we are emulating.
+// See http://software.intel.com/en-us/articles/c0x-features-supported-by-intel-c-compiler/
+// for a list of which features were implemented in which Intel releases.
+//
+#if defined(BOOST_INTEL_STDCXX0X)
+// BOOST_NO_CXX11_CONSTEXPR:
+#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && !defined(_MSC_VER)
+// Available in earlier Intel versions, but fail our tests:
+# undef BOOST_NO_CXX11_CONSTEXPR
+#endif
+// BOOST_NO_CXX11_NULLPTR:
+#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
+# undef BOOST_NO_CXX11_NULLPTR
+#endif
+// BOOST_NO_CXX11_TEMPLATE_ALIASES
+#if (BOOST_INTEL_CXX_VERSION >= 1210) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+# undef BOOST_NO_CXX11_TEMPLATE_ALIASES
+#endif
+
+// BOOST_NO_CXX11_DECLTYPE
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
+# undef BOOST_NO_CXX11_DECLTYPE
+#endif
+
+// BOOST_NO_CXX11_DECLTYPE_N3276
+#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+# undef BOOST_NO_CXX11_DECLTYPE_N3276
+#endif
+
+// BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+# undef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+
+// BOOST_NO_CXX11_RVALUE_REFERENCES
+#if (BOOST_INTEL_CXX_VERSION >= 1300) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
+// This is available from earlier Intel versions, but breaks Filesystem and other libraries:
+# undef BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif
+
+// BOOST_NO_CXX11_STATIC_ASSERT
+#if (BOOST_INTEL_CXX_VERSION >= 1110) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40300)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
+# undef BOOST_NO_CXX11_STATIC_ASSERT
+#endif
+
+// BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+# undef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+
+// BOOST_NO_CXX11_VARIADIC_MACROS
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40200)) && (!defined(_MSC_VER) || (_MSC_VER >= 1400))
+# undef BOOST_NO_CXX11_VARIADIC_MACROS
+#endif
+
+// BOOST_NO_CXX11_AUTO_DECLARATIONS
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
+# undef BOOST_NO_CXX11_AUTO_DECLARATIONS
+#endif
+
+// BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
+# undef BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#endif
+
+// BOOST_NO_CXX11_CHAR16_T
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
+# undef BOOST_NO_CXX11_CHAR16_T
+#endif
+
+// BOOST_NO_CXX11_CHAR32_T
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
+# undef BOOST_NO_CXX11_CHAR32_T
+#endif
+
+// BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+# undef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#endif
+
+// BOOST_NO_CXX11_DELETED_FUNCTIONS
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+# undef BOOST_NO_CXX11_DELETED_FUNCTIONS
+#endif
+
+// BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
+# undef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#endif
+
+// BOOST_NO_CXX11_SCOPED_ENUMS
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40501)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
+// This is available but broken in earlier Intel releases.
+# undef BOOST_NO_CXX11_SCOPED_ENUMS
+#endif
+
+// BOOST_NO_SFINAE_EXPR
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
+# undef BOOST_NO_SFINAE_EXPR
+#endif
+
+// BOOST_NO_CXX11_SFINAE_EXPR
+#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && !defined(_MSC_VER)
+# undef BOOST_NO_CXX11_SFINAE_EXPR
+#endif
+
+// BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+// This is available in earlier Intel releases, but breaks Multiprecision:
+# undef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#endif
+
+// BOOST_NO_CXX11_LAMBDAS
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 1600))
+# undef BOOST_NO_CXX11_LAMBDAS
+#endif
+
+// BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500))
+# undef BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#endif
+
+// BOOST_NO_CXX11_RANGE_BASED_FOR
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
+# undef BOOST_NO_CXX11_RANGE_BASED_FOR
+#endif
+
+// BOOST_NO_CXX11_RAW_LITERALS
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+# undef BOOST_NO_CXX11_RAW_LITERALS
+#endif
+
+// BOOST_NO_CXX11_UNICODE_LITERALS
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40500)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
+# undef BOOST_NO_CXX11_UNICODE_LITERALS
+#endif
+
+// BOOST_NO_CXX11_NOEXCEPT
+#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
+// Available in earlier Intel release, but generates errors when used with
+// conditional exception specifications, for example in multiprecision:
+# undef BOOST_NO_CXX11_NOEXCEPT
+#endif
+
+// BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40600)) && (!defined(_MSC_VER) || (_MSC_VER >= 9999))
+# undef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+
+// BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730))
+# undef BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#endif
+
+// BOOST_NO_CXX11_ALIGNAS
+#if (BOOST_INTEL_CXX_VERSION >= 1500) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730))
+# undef BOOST_NO_CXX11_ALIGNAS
+#endif
+
+// BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#if (BOOST_INTEL_CXX_VERSION >= 1200) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 180020827))
+# undef BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#endif
+
+// BOOST_NO_CXX11_INLINE_NAMESPACES
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40400)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730))
+# undef BOOST_NO_CXX11_INLINE_NAMESPACES
+#endif
+
+// BOOST_NO_CXX11_REF_QUALIFIERS
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40800)) && (!defined(_MSC_VER) || (_MSC_FULL_VER >= 190021730))
+# undef BOOST_NO_CXX11_REF_QUALIFIERS
+#endif
+
+// BOOST_NO_CXX11_FINAL
+#if (BOOST_INTEL_CXX_VERSION >= 1400) && (!defined(BOOST_INTEL_GCC_VERSION) || (BOOST_INTEL_GCC_VERSION >= 40700)) && (!defined(_MSC_VER) || (_MSC_VER >= 1700))
+# undef BOOST_NO_CXX11_FINAL
+#endif
+
+#endif // defined(BOOST_INTEL_STDCXX0X)
+
+//
+// Broken in all versions up to 15:
+#define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
+
+#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION <= 1310)
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#endif
+
+#if defined(BOOST_INTEL_STDCXX0X) && (BOOST_INTEL_CXX_VERSION == 1400)
+// A regression in Intel's compiler means that <tuple> seems to be broken in this release as well as <future> :
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_TUPLE
+#endif
+
+#if (BOOST_INTEL_CXX_VERSION < 1200)
+//
+// fenv.h appears not to work with Intel prior to 12.0:
+//
+# define BOOST_NO_FENV_H
+#endif
+
+// Intel 13.10 fails to access defaulted functions of a base class declared in private or protected sections,
+// producing the following errors:
+// error #453: protected function "..." (declared at ...") is not accessible through a "..." pointer or object
+#if (BOOST_INTEL_CXX_VERSION <= 1310)
+# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
+#endif
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1600)
+# define BOOST_HAS_STDINT_H
+#endif
+
+#if defined(__CUDACC__)
+# if defined(BOOST_GCC_CXX11)
+# define BOOST_NVCC_CXX11
+# else
+# define BOOST_NVCC_CXX03
+# endif
+#endif
+
+#if defined(__LP64__) && defined(__GNUC__) && (BOOST_INTEL_CXX_VERSION >= 1310) && !defined(BOOST_NVCC_CXX03)
+# define BOOST_HAS_INT128
+#endif
+
+#endif // defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 1500) && (defined(_MSC_VER) || defined(__GNUC__))
+//
+// last known and checked version:
+#if (BOOST_INTEL_CXX_VERSION > 1700)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "Boost.Config is older than your compiler - please check for an updated Boost release."
+# elif defined(_MSC_VER)
+//
+// We don't emit this warning any more, since we have so few
+// defect macros set anyway (just the one).
+//
+//# pragma message("boost: Unknown compiler version - please run the configure tests and report the results")
+# endif
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/kai.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/kai.hpp
new file mode 100644
index 00000000000..0b22ec1d6c5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/kai.hpp
@@ -0,0 +1,33 @@
+// (C) Copyright John Maddock 2001.
+// (C) Copyright David Abrahams 2002.
+// (C) Copyright Aleksey Gurtovoy 2002.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Kai C++ compiler setup:
+
+#include <boost/config/compiler/common_edg.hpp>
+
+# if (__KCC_VERSION <= 4001) || !defined(BOOST_STRICT_CONFIG)
+ // at least on Sun, the contents of <cwchar> is not in namespace std
+# define BOOST_NO_STDC_NAMESPACE
+# endif
+
+// see also common_edg.hpp which needs a special check for __KCC
+# if !defined(_EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+# endif
+
+//
+// last known and checked version is 4001:
+#if (__KCC_VERSION > 4001)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/metrowerks.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/metrowerks.hpp
new file mode 100644
index 00000000000..0e18e1809e7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/metrowerks.hpp
@@ -0,0 +1,195 @@
+// (C) Copyright John Maddock 2001.
+// (C) Copyright Darin Adler 2001.
+// (C) Copyright Peter Dimov 2001.
+// (C) Copyright David Abrahams 2001 - 2002.
+// (C) Copyright Beman Dawes 2001 - 2003.
+// (C) Copyright Stefan Slapeta 2004.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Metrowerks C++ compiler setup:
+
+// locale support is disabled when linking with the dynamic runtime
+# ifdef _MSL_NO_LOCALE
+# define BOOST_NO_STD_LOCALE
+# endif
+
+# if __MWERKS__ <= 0x2301 // 5.3
+# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+# define BOOST_NO_POINTER_TO_MEMBER_CONST
+# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
+# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
+# endif
+
+# if __MWERKS__ <= 0x2401 // 6.2
+//# define BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+# endif
+
+# if(__MWERKS__ <= 0x2407) // 7.x
+# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
+# define BOOST_NO_UNREACHABLE_RETURN_DETECTION
+# endif
+
+# if(__MWERKS__ <= 0x3003) // 8.x
+# define BOOST_NO_SFINAE
+# endif
+
+// the "|| !defined(BOOST_STRICT_CONFIG)" part should apply to the last
+// tested version *only*:
+# if(__MWERKS__ <= 0x3207) || !defined(BOOST_STRICT_CONFIG) // 9.6
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+# define BOOST_NO_IS_ABSTRACT
+# endif
+
+#if !__option(wchar_type)
+# define BOOST_NO_INTRINSIC_WCHAR_T
+#endif
+
+#if !__option(exceptions) && !defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+#endif
+
+#if (__INTEL__ && _WIN32) || (__POWERPC__ && macintosh)
+# if __MWERKS__ == 0x3000
+# define BOOST_COMPILER_VERSION 8.0
+# elif __MWERKS__ == 0x3001
+# define BOOST_COMPILER_VERSION 8.1
+# elif __MWERKS__ == 0x3002
+# define BOOST_COMPILER_VERSION 8.2
+# elif __MWERKS__ == 0x3003
+# define BOOST_COMPILER_VERSION 8.3
+# elif __MWERKS__ == 0x3200
+# define BOOST_COMPILER_VERSION 9.0
+# elif __MWERKS__ == 0x3201
+# define BOOST_COMPILER_VERSION 9.1
+# elif __MWERKS__ == 0x3202
+# define BOOST_COMPILER_VERSION 9.2
+# elif __MWERKS__ == 0x3204
+# define BOOST_COMPILER_VERSION 9.3
+# elif __MWERKS__ == 0x3205
+# define BOOST_COMPILER_VERSION 9.4
+# elif __MWERKS__ == 0x3206
+# define BOOST_COMPILER_VERSION 9.5
+# elif __MWERKS__ == 0x3207
+# define BOOST_COMPILER_VERSION 9.6
+# else
+# define BOOST_COMPILER_VERSION __MWERKS__
+# endif
+#else
+# define BOOST_COMPILER_VERSION __MWERKS__
+#endif
+
+//
+// C++0x features
+//
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
+//
+#if __MWERKS__ > 0x3206 && __option(rvalue_refs)
+# define BOOST_HAS_RVALUE_REFS
+#else
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_SCOPED_ENUMS
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#define BOOST_NO_CXX11_ALIGNAS
+#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#define BOOST_NO_CXX11_INLINE_NAMESPACES
+#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+#endif
+#if (__cplusplus < 201304) // There's no SD6 check for this....
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#endif
+#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#endif
+#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#endif
+#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#endif
+#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+#endif
+
+#define BOOST_COMPILER "Metrowerks CodeWarrior C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
+
+//
+// versions check:
+// we don't support Metrowerks prior to version 5.3:
+#if __MWERKS__ < 0x2301
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+//
+// last known and checked version:
+#if (__MWERKS__ > 0x3205)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
+
+
+
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/mpw.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/mpw.hpp
new file mode 100644
index 00000000000..05c066efbc5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/mpw.hpp
@@ -0,0 +1,137 @@
+// (C) Copyright John Maddock 2001 - 2002.
+// (C) Copyright Aleksey Gurtovoy 2002.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// MPW C++ compilers setup:
+
+# if defined(__SC__)
+# define BOOST_COMPILER "MPW SCpp version " BOOST_STRINGIZE(__SC__)
+# elif defined(__MRC__)
+# define BOOST_COMPILER "MPW MrCpp version " BOOST_STRINGIZE(__MRC__)
+# else
+# error "Using MPW compiler configuration by mistake. Please update."
+# endif
+
+//
+// MPW 8.90:
+//
+#if (MPW_CPLUS <= 0x890) || !defined(BOOST_STRICT_CONFIG)
+# define BOOST_NO_CV_SPECIALIZATIONS
+# define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
+# define BOOST_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
+# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+# define BOOST_NO_INTRINSIC_WCHAR_T
+# define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
+# define BOOST_NO_USING_TEMPLATE
+
+# define BOOST_NO_CWCHAR
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+
+# define BOOST_NO_STD_ALLOCATOR /* actually a bug with const reference overloading */
+
+#endif
+
+//
+// C++0x features
+//
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
+//
+#define BOOST_NO_CXX11_AUTO_DECLARATIONS
+#define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#define BOOST_NO_CXX11_CHAR16_T
+#define BOOST_NO_CXX11_CHAR32_T
+#define BOOST_NO_CXX11_CONSTEXPR
+#define BOOST_NO_CXX11_DECLTYPE
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_NO_CXX11_SCOPED_ENUMS
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#define BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#define BOOST_NO_CXX11_VARIADIC_MACROS
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#define BOOST_NO_CXX11_ALIGNAS
+#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#define BOOST_NO_CXX11_INLINE_NAMESPACES
+#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+#endif
+#if (__cplusplus < 201304) // There's no SD6 check for this....
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#endif
+#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#endif
+#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#endif
+#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#endif
+#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+#endif
+
+//
+// versions check:
+// we don't support MPW prior to version 8.9:
+#if MPW_CPLUS < 0x890
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+//
+// last known and checked version is 0x890:
+#if (MPW_CPLUS > 0x890)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
+
+
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/nvcc.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/nvcc.hpp
index ed035fcf73e..ed035fcf73e 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/nvcc.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/nvcc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/pathscale.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/pathscale.hpp
index 1318d275ade..1318d275ade 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/pathscale.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/pathscale.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/pgi.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/pgi.hpp
index 4e909d8a17e..4e909d8a17e 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/pgi.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/pgi.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/sgi_mipspro.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/sgi_mipspro.hpp
index 54433c99789..54433c99789 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/sgi_mipspro.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/sgi_mipspro.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/sunpro_cc.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/sunpro_cc.hpp
index 41b7bcade6e..41b7bcade6e 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/sunpro_cc.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/sunpro_cc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/vacpp.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/vacpp.hpp
new file mode 100644
index 00000000000..8e264499681
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/vacpp.hpp
@@ -0,0 +1,183 @@
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Toon Knapen 2001 - 2003.
+// (C) Copyright Lie-Quan Lee 2001.
+// (C) Copyright Markus Schoepflin 2002 - 2003.
+// (C) Copyright Beman Dawes 2002 - 2003.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// Visual Age (IBM) C++ compiler setup:
+
+#if __IBMCPP__ <= 501
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+# define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
+#endif
+
+#if (__IBMCPP__ <= 502)
+// Actually the compiler supports inclass member initialization but it
+// requires a definition for the class member and it doesn't recognize
+// it as an integral constant expression when used as a template argument.
+# define BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+# define BOOST_NO_INTEGRAL_INT64_T
+# define BOOST_NO_MEMBER_TEMPLATE_KEYWORD
+#endif
+
+#if (__IBMCPP__ <= 600) || !defined(BOOST_STRICT_CONFIG)
+# define BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS
+#endif
+
+#if (__IBMCPP__ <= 1110)
+// XL C++ V11.1 and earlier versions may not always value-initialize
+// a temporary object T(), when T is a non-POD aggregate class type.
+// Michael Wong (IBM Canada Ltd) has confirmed this issue and gave it
+// high priority. -- Niels Dekker (LKEB), May 2010.
+# define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+#endif
+
+//
+// On AIX thread support seems to be indicated by _THREAD_SAFE:
+//
+#ifdef _THREAD_SAFE
+# define BOOST_HAS_THREADS
+#endif
+
+#define BOOST_COMPILER "IBM Visual Age version " BOOST_STRINGIZE(__IBMCPP__)
+
+//
+// versions check:
+// we don't support Visual age prior to version 5:
+#if __IBMCPP__ < 500
+#error "Compiler not supported or configured - please reconfigure"
+#endif
+//
+// last known and checked version is 1210:
+#if (__IBMCPP__ > 1210)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown compiler version - please run the configure tests and report the results"
+# endif
+#endif
+
+// Some versions of the compiler have issues with default arguments on partial specializations
+#if __IBMCPP__ <= 1010
+#define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+#endif
+
+// Type aliasing hint. Supported since XL C++ 13.1
+#if (__IBMCPP__ >= 1310)
+# define BOOST_MAY_ALIAS __attribute__((__may_alias__))
+#endif
+
+//
+// C++0x features
+//
+// See boost\config\suffix.hpp for BOOST_NO_LONG_LONG
+//
+#if ! __IBMCPP_AUTO_TYPEDEDUCTION
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+#endif
+#if ! __IBMCPP_UTF_LITERAL__
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+#endif
+#if ! __IBMCPP_CONSTEXPR
+# define BOOST_NO_CXX11_CONSTEXPR
+#endif
+#if ! __IBMCPP_DECLTYPE
+# define BOOST_NO_CXX11_DECLTYPE
+#else
+# define BOOST_HAS_DECLTYPE
+#endif
+#define BOOST_NO_CXX11_DECLTYPE_N3276
+#define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+#define BOOST_NO_CXX11_DELETED_FUNCTIONS
+#if ! __IBMCPP_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#endif
+#if ! __IBMCPP_EXTERN_TEMPLATE
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
+#endif
+#if ! __IBMCPP_VARIADIC_TEMPLATES
+// not enabled separately at this time
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+#define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_NO_CXX11_LAMBDAS
+#define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#define BOOST_NO_CXX11_NOEXCEPT
+#define BOOST_NO_CXX11_NULLPTR
+#define BOOST_NO_CXX11_RANGE_BASED_FOR
+#define BOOST_NO_CXX11_RAW_LITERALS
+#define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+#if ! __IBMCPP_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif
+#if ! __IBMCPP_SCOPED_ENUM
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif
+#define BOOST_NO_SFINAE_EXPR
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+#if ! __IBMCPP_STATIC_ASSERT
+# define BOOST_NO_CXX11_STATIC_ASSERT
+#endif
+#define BOOST_NO_CXX11_TEMPLATE_ALIASES
+#define BOOST_NO_CXX11_UNICODE_LITERALS
+#if ! __IBMCPP_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+#endif
+#if ! __C99_MACRO_WITH_VA_ARGS
+# define BOOST_NO_CXX11_VARIADIC_MACROS
+#endif
+#define BOOST_NO_CXX11_ALIGNAS
+#define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+#define BOOST_NO_CXX11_INLINE_NAMESPACES
+#define BOOST_NO_CXX11_REF_QUALIFIERS
+#define BOOST_NO_CXX11_FINAL
+#define BOOST_NO_CXX11_THREAD_LOCAL
+
+// C++ 14:
+#if !defined(__cpp_aggregate_nsdmi) || (__cpp_aggregate_nsdmi < 201304)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+#if !defined(__cpp_binary_literals) || (__cpp_binary_literals < 201304)
+# define BOOST_NO_CXX14_BINARY_LITERALS
+#endif
+#if !defined(__cpp_constexpr) || (__cpp_constexpr < 201304)
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+#if !defined(__cpp_decltype_auto) || (__cpp_decltype_auto < 201304)
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+#endif
+#if (__cplusplus < 201304) // There's no SD6 check for this....
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+#endif
+#if !defined(__cpp_generic_lambdas) || (__cpp_generic_lambdas < 201304)
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+#endif
+#if !defined(__cpp_init_captures) || (__cpp_init_captures < 201304)
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+#endif
+#if !defined(__cpp_return_type_deduction) || (__cpp_return_type_deduction < 201304)
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+#endif
+#if !defined(__cpp_variable_templates) || (__cpp_variable_templates < 201304)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+#endif
+
+// C++17
+#if !defined(__cpp_structured_bindings) || (__cpp_structured_bindings < 201606)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+#endif
+#if !defined(__cpp_inline_variables) || (__cpp_inline_variables < 201606)
+# define BOOST_NO_CXX17_INLINE_VARIABLES
+#endif
+#if !defined(__cpp_fold_expressions) || (__cpp_fold_expressions < 201603)
+# define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+#if !defined(__cpp_if_constexpr) || (__cpp_if_constexpr < 201606)
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/config/compiler/visualc.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/visualc.hpp
new file mode 100644
index 00000000000..29642473cd1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/visualc.hpp
@@ -0,0 +1,359 @@
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Darin Adler 2001 - 2002.
+// (C) Copyright Peter Dimov 2001.
+// (C) Copyright Aleksey Gurtovoy 2002.
+// (C) Copyright David Abrahams 2002 - 2003.
+// (C) Copyright Beman Dawes 2002 - 2003.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+//
+// Microsoft Visual C++ compiler setup:
+//
+// We need to be careful with the checks in this file, as contrary
+// to popular belief there are versions with _MSC_VER with the final
+// digit non-zero (mainly the MIPS cross compiler).
+//
+// So we either test _MSC_VER >= XXXX or else _MSC_VER < XXXX.
+// No other comparisons (==, >, or <=) are safe.
+//
+
+#define BOOST_MSVC _MSC_VER
+
+//
+// Helper macro BOOST_MSVC_FULL_VER for use in Boost code:
+//
+#if _MSC_FULL_VER > 100000000
+# define BOOST_MSVC_FULL_VER _MSC_FULL_VER
+#else
+# define BOOST_MSVC_FULL_VER (_MSC_FULL_VER * 10)
+#endif
+
+// Attempt to suppress VC6 warnings about the length of decorated names (obsolete):
+#pragma warning( disable : 4503 ) // warning: decorated name length exceeded
+
+#define BOOST_HAS_PRAGMA_ONCE
+
+//
+// versions check:
+// we don't support Visual C++ prior to version 7.1:
+#if _MSC_VER < 1310
+# error "Compiler not supported or configured - please reconfigure"
+#endif
+
+#if _MSC_FULL_VER < 180020827
+# define BOOST_NO_FENV_H
+#endif
+
+#if _MSC_VER < 1400
+// although a conforming signature for swprint exists in VC7.1
+// it appears not to actually work:
+# define BOOST_NO_SWPRINTF
+// Our extern template tests also fail for this compiler:
+# define BOOST_NO_CXX11_EXTERN_TEMPLATE
+// Variadic macros do not exist for VC7.1 and lower
+# define BOOST_NO_CXX11_VARIADIC_MACROS
+# define BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#endif
+
+#if _MSC_VER < 1500 // 140X == VC++ 8.0
+# define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+#endif
+
+#if _MSC_VER < 1600 // 150X == VC++ 9.0
+ // A bug in VC9:
+# define BOOST_NO_ADL_BARRIER
+#endif
+
+
+#ifndef _NATIVE_WCHAR_T_DEFINED
+# define BOOST_NO_INTRINSIC_WCHAR_T
+#endif
+
+//
+// check for exception handling support:
+#if !defined(_CPPUNWIND) && !defined(BOOST_NO_EXCEPTIONS)
+# define BOOST_NO_EXCEPTIONS
+#endif
+
+//
+// __int64 support:
+//
+#define BOOST_HAS_MS_INT64
+#if defined(_MSC_EXTENSIONS) || (_MSC_VER >= 1400)
+# define BOOST_HAS_LONG_LONG
+#else
+# define BOOST_NO_LONG_LONG
+#endif
+#if (_MSC_VER >= 1400) && !defined(_DEBUG)
+# define BOOST_HAS_NRVO
+#endif
+#if _MSC_VER >= 1600 // 160X == VC++ 10.0
+# define BOOST_HAS_PRAGMA_DETECT_MISMATCH
+#endif
+//
+// disable Win32 API's if compiler extensions are
+// turned off:
+//
+#if !defined(_MSC_EXTENSIONS) && !defined(BOOST_DISABLE_WIN32)
+# define BOOST_DISABLE_WIN32
+#endif
+#if !defined(_CPPRTTI) && !defined(BOOST_NO_RTTI)
+# define BOOST_NO_RTTI
+#endif
+
+//
+// TR1 features:
+//
+#if (_MSC_VER >= 1700) && defined(_HAS_CXX17) && (_HAS_CXX17 > 0)
+// # define BOOST_HAS_TR1_HASH // don't know if this is true yet.
+// # define BOOST_HAS_TR1_TYPE_TRAITS // don't know if this is true yet.
+# define BOOST_HAS_TR1_UNORDERED_MAP
+# define BOOST_HAS_TR1_UNORDERED_SET
+#endif
+
+//
+// C++0x features
+//
+// See above for BOOST_NO_LONG_LONG
+
+// C++ features supported by VC++ 10 (aka 2010)
+//
+#if _MSC_VER < 1600
+# define BOOST_NO_CXX11_AUTO_DECLARATIONS
+# define BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS
+# define BOOST_NO_CXX11_LAMBDAS
+# define BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_NO_CXX11_STATIC_ASSERT
+# define BOOST_NO_CXX11_NULLPTR
+# define BOOST_NO_CXX11_DECLTYPE
+#endif // _MSC_VER < 1600
+
+#if _MSC_VER >= 1600
+# define BOOST_HAS_STDINT_H
+#endif
+
+// C++11 features supported by VC++ 11 (aka 2012)
+//
+#if _MSC_VER < 1700
+# define BOOST_NO_CXX11_FINAL
+# define BOOST_NO_CXX11_RANGE_BASED_FOR
+# define BOOST_NO_CXX11_SCOPED_ENUMS
+#endif // _MSC_VER < 1700
+
+// C++11 features supported by VC++ 12 (aka 2013).
+//
+#if _MSC_FULL_VER < 180020827
+# define BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+# define BOOST_NO_CXX11_DELETED_FUNCTIONS
+# define BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# define BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+# define BOOST_NO_CXX11_RAW_LITERALS
+# define BOOST_NO_CXX11_TEMPLATE_ALIASES
+# define BOOST_NO_CXX11_TRAILING_RESULT_TYPES
+# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
+# define BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+# define BOOST_NO_CXX11_DECLTYPE_N3276
+#endif
+
+#if _MSC_FULL_VER >= 180020827
+#define BOOST_HAS_EXPM1
+#define BOOST_HAS_LOG1P
+#endif
+
+// C++11 features supported by VC++ 14 (aka 2015)
+//
+#if (_MSC_FULL_VER < 190023026)
+# define BOOST_NO_CXX11_NOEXCEPT
+# define BOOST_NO_CXX11_DEFAULTED_MOVES
+# define BOOST_NO_CXX11_REF_QUALIFIERS
+# define BOOST_NO_CXX11_USER_DEFINED_LITERALS
+# define BOOST_NO_CXX11_ALIGNAS
+# define BOOST_NO_CXX11_INLINE_NAMESPACES
+# define BOOST_NO_CXX11_CHAR16_T
+# define BOOST_NO_CXX11_CHAR32_T
+# define BOOST_NO_CXX11_UNICODE_LITERALS
+# define BOOST_NO_CXX14_DECLTYPE_AUTO
+# define BOOST_NO_CXX14_INITIALIZED_LAMBDA_CAPTURES
+# define BOOST_NO_CXX14_RETURN_TYPE_DEDUCTION
+# define BOOST_NO_CXX14_BINARY_LITERALS
+# define BOOST_NO_CXX14_GENERIC_LAMBDAS
+# define BOOST_NO_CXX14_DIGIT_SEPARATORS
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+// C++11 features supported by VC++ 14 update 3 (aka 2015)
+//
+#if (_MSC_FULL_VER < 190024210)
+# define BOOST_NO_CXX14_VARIABLE_TEMPLATES
+# define BOOST_NO_SFINAE_EXPR
+# define BOOST_NO_CXX11_CONSTEXPR
+#endif
+
+// C++14 features supported by VC++ 14.1 (Visual Studio 2017)
+//
+#if (_MSC_VER < 1910)
+# define BOOST_NO_CXX14_AGGREGATE_NSDMI
+#endif
+
+// C++17 features supported by VC++ 14.1 (Visual Studio 2017) Update 3
+//
+#if (_MSC_VER < 1911) || (_MSVC_LANG < 201703)
+# define BOOST_NO_CXX17_STRUCTURED_BINDINGS
+# define BOOST_NO_CXX17_IF_CONSTEXPR
+# define BOOST_NO_CXX17_HDR_OPTIONAL
+# define BOOST_NO_CXX17_HDR_STRING_VIEW
+#endif
+
+// MSVC including version 14 has not yet completely
+// implemented value-initialization, as is reported:
+// "VC++ does not value-initialize members of derived classes without
+// user-declared constructor", reported in 2009 by Sylvester Hesp:
+// https://connect.microsoft.com/VisualStudio/feedback/details/484295
+// "Presence of copy constructor breaks member class initialization",
+// reported in 2009 by Alex Vakulenko:
+// https://connect.microsoft.com/VisualStudio/feedback/details/499606
+// "Value-initialization in new-expression", reported in 2005 by
+// Pavel Kuznetsov (MetaCommunications Engineering):
+// https://connect.microsoft.com/VisualStudio/feedback/details/100744
+// Reported again by John Maddock in 2015 for VC14:
+// https://connect.microsoft.com/VisualStudio/feedback/details/1582233/c-subobjects-still-not-value-initialized-correctly
+// See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues
+// (Niels Dekker, LKEB, May 2010)
+// Still present in VC15.5, Dec 2017.
+#define BOOST_NO_COMPLETE_VALUE_INITIALIZATION
+//
+// C++ 11:
+//
+// This is supported with /permissive- for 15.5 onwards, unfortunately we appear to have no way to tell
+// if this is in effect or not, in any case nothing in Boost is currently using this, so we'll just go
+// on defining it for now:
+//
+# define BOOST_NO_TWO_PHASE_NAME_LOOKUP
+
+#if (_MSC_VER < 1912) || (_MSVC_LANG < 201402)
+// Supported from msvc-15.5 onwards:
+#define BOOST_NO_CXX11_SFINAE_EXPR
+#endif
+#if (_MSC_VER < 1915) || (_MSVC_LANG < 201402)
+// C++ 14:
+// Still gives internal compiler error for msvc-15.5:
+# define BOOST_NO_CXX14_CONSTEXPR
+#endif
+// C++ 17:
+#if (_MSC_VER < 1912) || (_MSVC_LANG < 201703)
+#define BOOST_NO_CXX17_INLINE_VARIABLES
+#define BOOST_NO_CXX17_FOLD_EXPRESSIONS
+#endif
+
+//
+// Things that don't work in clr mode:
+//
+#ifdef _M_CEE
+#ifndef BOOST_NO_CXX11_THREAD_LOCAL
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+#ifndef BOOST_NO_SFINAE_EXPR
+# define BOOST_NO_SFINAE_EXPR
+#endif
+#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
+# define BOOST_NO_CXX11_REF_QUALIFIERS
+#endif
+#endif
+#ifdef _M_CEE_PURE
+#ifndef BOOST_NO_CXX11_CONSTEXPR
+# define BOOST_NO_CXX11_CONSTEXPR
+#endif
+#endif
+
+//
+// prefix and suffix headers:
+//
+#ifndef BOOST_ABI_PREFIX
+# define BOOST_ABI_PREFIX "boost/config/abi/msvc_prefix.hpp"
+#endif
+#ifndef BOOST_ABI_SUFFIX
+# define BOOST_ABI_SUFFIX "boost/config/abi/msvc_suffix.hpp"
+#endif
+
+#ifndef BOOST_COMPILER
+// TODO:
+// these things are mostly bogus. 1200 means version 12.0 of the compiler. The
+// artificial versions assigned to them only refer to the versions of some IDE
+// these compilers have been shipped with, and even that is not all of it. Some
+// were shipped with freely downloadable SDKs, others as crosscompilers in eVC.
+// IOW, you can't use these 'versions' in any sensible way. Sorry.
+# if defined(UNDER_CE)
+# if _MSC_VER < 1400
+ // Note: I'm not aware of any CE compiler with version 13xx
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown EVC++ compiler version - please run the configure tests and report the results"
+# else
+# pragma message("boost: Unknown EVC++ compiler version - please run the configure tests and report the results")
+# endif
+# elif _MSC_VER < 1500
+# define BOOST_COMPILER_VERSION evc8
+# elif _MSC_VER < 1600
+# define BOOST_COMPILER_VERSION evc9
+# elif _MSC_VER < 1700
+# define BOOST_COMPILER_VERSION evc10
+# elif _MSC_VER < 1800
+# define BOOST_COMPILER_VERSION evc11
+# elif _MSC_VER < 1900
+# define BOOST_COMPILER_VERSION evc12
+# elif _MSC_VER < 2000
+# define BOOST_COMPILER_VERSION evc14
+# else
+# if defined(BOOST_ASSERT_CONFIG)
+# error "boost: Unknown EVC++ compiler version - please run the configure tests and report the results"
+# else
+# pragma message("boost: Unknown EVC++ compiler version - please run the configure tests and report the results")
+# endif
+# endif
+# else
+# if _MSC_VER < 1200
+ // Note: Versions up to 7.0 aren't supported.
+# define BOOST_COMPILER_VERSION 5.0
+# elif _MSC_VER < 1300
+# define BOOST_COMPILER_VERSION 6.0
+# elif _MSC_VER < 1310
+# define BOOST_COMPILER_VERSION 7.0
+# elif _MSC_VER < 1400
+# define BOOST_COMPILER_VERSION 7.1
+# elif _MSC_VER < 1500
+# define BOOST_COMPILER_VERSION 8.0
+# elif _MSC_VER < 1600
+# define BOOST_COMPILER_VERSION 9.0
+# elif _MSC_VER < 1700
+# define BOOST_COMPILER_VERSION 10.0
+# elif _MSC_VER < 1800
+# define BOOST_COMPILER_VERSION 11.0
+# elif _MSC_VER < 1900
+# define BOOST_COMPILER_VERSION 12.0
+# elif _MSC_VER < 1910
+# define BOOST_COMPILER_VERSION 14.0
+# elif _MSC_VER < 1920
+# define BOOST_COMPILER_VERSION 14.1
+# else
+# define BOOST_COMPILER_VERSION _MSC_VER
+# endif
+# endif
+
+# define BOOST_COMPILER "Microsoft Visual C++ version " BOOST_STRINGIZE(BOOST_COMPILER_VERSION)
+#endif
+
+#include <boost/config/pragma_message.hpp>
+
+//
+// last known and checked version is 19.12.25830.2 (VC++ 2017.3):
+#if (_MSC_VER > 1912)
+# if defined(BOOST_ASSERT_CONFIG)
+# error "Boost.Config is older than your current compiler version."
+# elif !defined(BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE)
+ //
+ // Disabled as of March 2018 - the pace of VS releases is hard to keep up with
+ // and in any case, we have relatively few defect macros defined now.
+ // BOOST_PRAGMA_MESSAGE("Info: Boost.Config is older than your compiler version - probably nothing bad will happen - but you may wish to look for an updated Boost version. Define BOOST_CONFIG_SUPPRESS_OUTDATED_MESSAGE to suppress this message.")
+# endif
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/xlcpp.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/xlcpp.hpp
index ee7aa1253ad..ee7aa1253ad 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/xlcpp.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/xlcpp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/compiler/xlcpp_zos.hpp b/src/third_party/boost-1.69.0/boost/config/compiler/xlcpp_zos.hpp
index eb1bf2e9923..eb1bf2e9923 100644
--- a/src/third_party/boost-1.68.0/boost/config/compiler/xlcpp_zos.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/compiler/xlcpp_zos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/detail/posix_features.hpp b/src/third_party/boost-1.69.0/boost/config/detail/posix_features.hpp
index d12954797f9..d12954797f9 100644
--- a/src/third_party/boost-1.68.0/boost/config/detail/posix_features.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/detail/posix_features.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/detail/select_compiler_config.hpp b/src/third_party/boost-1.69.0/boost/config/detail/select_compiler_config.hpp
new file mode 100644
index 00000000000..8970dffb4f3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/detail/select_compiler_config.hpp
@@ -0,0 +1,157 @@
+// Boost compiler configuration selection header file
+
+// (C) Copyright John Maddock 2001 - 2003.
+// (C) Copyright Martin Wille 2003.
+// (C) Copyright Guillaume Melquiond 2003.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/ for most recent version.
+
+// locate which compiler we are using and define
+// BOOST_COMPILER_CONFIG as needed:
+
+#if defined __CUDACC__
+// NVIDIA CUDA C++ compiler for GPU
+# include "boost/config/compiler/nvcc.hpp"
+
+#endif
+
+#if defined(__GCCXML__)
+// GCC-XML emulates other compilers, it has to appear first here!
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
+
+#elif defined(_CRAYC)
+// EDG based Cray compiler:
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
+
+#elif defined __COMO__
+// Comeau C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
+
+#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
+// PathScale EKOPath compiler (has to come before clang and gcc)
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
+
+#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
+// Intel
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
+
+#elif defined __clang__ && !defined(__ibmxl__)
+// Clang C++ emulates GCC, so it has to appear early.
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
+
+#elif defined __DMC__
+// Digital Mars C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
+
+#elif defined __DCC__
+// Wind River Diab C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/diab.hpp"
+
+#elif defined(__PGI)
+// Portland Group Inc.
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
+
+# elif defined(__GNUC__) && !defined(__ibmxl__)
+// GNU C++:
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
+
+#elif defined __KCC
+// Kai C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
+
+#elif defined __sgi
+// SGI MIPSpro C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
+
+#elif defined __DECCXX
+// Compaq Tru64 Unix cxx
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
+
+#elif defined __ghs
+// Greenhills C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
+
+#elif defined __CODEGEARC__
+// CodeGear - must be checked for before Borland
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
+
+#elif defined __BORLANDC__
+// Borland
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
+
+#elif defined __MWERKS__
+// Metrowerks CodeWarrior
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
+
+#elif defined __SUNPRO_CC
+// Sun Workshop Compiler C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
+
+#elif defined __HP_aCC
+// HP aCC
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
+
+#elif defined(__MRC__) || defined(__SC__)
+// MPW MrCpp or SCpp
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
+
+#elif defined(__IBMCPP__) && defined(__COMPILER_VER__) && defined(__MVS__)
+// IBM z/OS XL C/C++
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp_zos.hpp"
+
+#elif defined(__ibmxl__)
+// IBM XL C/C++ for Linux (Little Endian)
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp"
+
+#elif defined(__IBMCPP__)
+// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian)
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
+
+#elif defined _MSC_VER
+// Microsoft Visual C++
+//
+// Must remain the last #elif since some other vendors (Metrowerks, for
+// example) also #define _MSC_VER
+# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
+
+#elif defined (BOOST_ASSERT_CONFIG)
+// this must come last - generate an error if we don't
+// recognise the compiler:
+# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
+
+#endif
+
+#if 0
+//
+// This section allows dependency scanners to find all the headers we *might* include:
+//
+#include <boost/config/compiler/gcc_xml.hpp>
+#include <boost/config/compiler/cray.hpp>
+#include <boost/config/compiler/comeau.hpp>
+#include <boost/config/compiler/pathscale.hpp>
+#include <boost/config/compiler/intel.hpp>
+#include <boost/config/compiler/clang.hpp>
+#include <boost/config/compiler/digitalmars.hpp>
+#include <boost/config/compiler/gcc.hpp>
+#include <boost/config/compiler/kai.hpp>
+#include <boost/config/compiler/sgi_mipspro.hpp>
+#include <boost/config/compiler/compaq_cxx.hpp>
+#include <boost/config/compiler/greenhills.hpp>
+#include <boost/config/compiler/codegear.hpp>
+#include <boost/config/compiler/borland.hpp>
+#include <boost/config/compiler/metrowerks.hpp>
+#include <boost/config/compiler/sunpro_cc.hpp>
+#include <boost/config/compiler/hp_acc.hpp>
+#include <boost/config/compiler/mpw.hpp>
+#include <boost/config/compiler/xlcpp_zos.hpp>
+#include <boost/config/compiler/xlcpp.hpp>
+#include <boost/config/compiler/vacpp.hpp>
+#include <boost/config/compiler/pgi.hpp>
+#include <boost/config/compiler/visualc.hpp>
+
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/config/detail/select_platform_config.hpp b/src/third_party/boost-1.69.0/boost/config/detail/select_platform_config.hpp
index b36eca57a24..b36eca57a24 100644
--- a/src/third_party/boost-1.68.0/boost/config/detail/select_platform_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/detail/select_platform_config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/detail/select_stdlib_config.hpp b/src/third_party/boost-1.69.0/boost/config/detail/select_stdlib_config.hpp
index 8db778c86ba..8db778c86ba 100644
--- a/src/third_party/boost-1.68.0/boost/config/detail/select_stdlib_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/detail/select_stdlib_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/detail/suffix.hpp b/src/third_party/boost-1.69.0/boost/config/detail/suffix.hpp
new file mode 100644
index 00000000000..cee9647b6bf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/detail/suffix.hpp
@@ -0,0 +1,1049 @@
+// Boost config.hpp configuration header file ------------------------------//
+// boostinspect:ndprecated_macros -- tell the inspect tool to ignore this file
+
+// Copyright (c) 2001-2003 John Maddock
+// Copyright (c) 2001 Darin Adler
+// Copyright (c) 2001 Peter Dimov
+// Copyright (c) 2002 Bill Kempf
+// Copyright (c) 2002 Jens Maurer
+// Copyright (c) 2002-2003 David Abrahams
+// Copyright (c) 2003 Gennaro Prota
+// Copyright (c) 2003 Eric Friedman
+// Copyright (c) 2010 Eric Jourdanneau, Joel Falcou
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/ for most recent version.
+
+// Boost config.hpp policy and rationale documentation has been moved to
+// http://www.boost.org/libs/config/
+//
+// This file is intended to be stable, and relatively unchanging.
+// It should contain boilerplate code only - no compiler specific
+// code unless it is unavoidable - no changes unless unavoidable.
+
+#ifndef BOOST_CONFIG_SUFFIX_HPP
+#define BOOST_CONFIG_SUFFIX_HPP
+
+#if defined(__GNUC__) && (__GNUC__ >= 4)
+//
+// Some GCC-4.x versions issue warnings even when __extension__ is used,
+// so use this as a workaround:
+//
+#pragma GCC system_header
+#endif
+
+//
+// ensure that visibility macros are always defined, thus symplifying use
+//
+#ifndef BOOST_SYMBOL_EXPORT
+# define BOOST_SYMBOL_EXPORT
+#endif
+#ifndef BOOST_SYMBOL_IMPORT
+# define BOOST_SYMBOL_IMPORT
+#endif
+#ifndef BOOST_SYMBOL_VISIBLE
+# define BOOST_SYMBOL_VISIBLE
+#endif
+
+//
+// look for long long by looking for the appropriate macros in <limits.h>.
+// Note that we use limits.h rather than climits for maximal portability,
+// remember that since these just declare a bunch of macros, there should be
+// no namespace issues from this.
+//
+#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG) \
+ && !defined(BOOST_MSVC) && !defined(__BORLANDC__)
+# include <limits.h>
+# if (defined(ULLONG_MAX) || defined(ULONG_LONG_MAX) || defined(ULONGLONG_MAX))
+# define BOOST_HAS_LONG_LONG
+# else
+# define BOOST_NO_LONG_LONG
+# endif
+#endif
+
+// GCC 3.x will clean up all of those nasty macro definitions that
+// BOOST_NO_CTYPE_FUNCTIONS is intended to help work around, so undefine
+// it under GCC 3.x.
+#if defined(__GNUC__) && (__GNUC__ >= 3) && defined(BOOST_NO_CTYPE_FUNCTIONS)
+# undef BOOST_NO_CTYPE_FUNCTIONS
+#endif
+
+//
+// Assume any extensions are in namespace std:: unless stated otherwise:
+//
+# ifndef BOOST_STD_EXTENSION_NAMESPACE
+# define BOOST_STD_EXTENSION_NAMESPACE std
+# endif
+
+//
+// If cv-qualified specializations are not allowed, then neither are cv-void ones:
+//
+# if defined(BOOST_NO_CV_SPECIALIZATIONS) \
+ && !defined(BOOST_NO_CV_VOID_SPECIALIZATIONS)
+# define BOOST_NO_CV_VOID_SPECIALIZATIONS
+# endif
+
+//
+// If there is no numeric_limits template, then it can't have any compile time
+// constants either!
+//
+# if defined(BOOST_NO_LIMITS) \
+ && !defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS)
+# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
+# endif
+
+//
+// if there is no long long then there is no specialisation
+// for numeric_limits<long long> either:
+//
+#if !defined(BOOST_HAS_LONG_LONG) && !defined(BOOST_NO_LONG_LONG_NUMERIC_LIMITS)
+# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
+#endif
+
+//
+// if there is no __int64 then there is no specialisation
+// for numeric_limits<__int64> either:
+//
+#if !defined(BOOST_HAS_MS_INT64) && !defined(BOOST_NO_MS_INT64_NUMERIC_LIMITS)
+# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
+#endif
+
+//
+// if member templates are supported then so is the
+// VC6 subset of member templates:
+//
+# if !defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES)
+# define BOOST_MSVC6_MEMBER_TEMPLATES
+# endif
+
+//
+// Without partial specialization, can't test for partial specialisation bugs:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_BCB_PARTIAL_SPECIALIZATION_BUG)
+# define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
+# endif
+
+//
+// Without partial specialization, we can't have array-type partial specialisations:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS)
+# define BOOST_NO_ARRAY_TYPE_SPECIALIZATIONS
+# endif
+
+//
+// Without partial specialization, std::iterator_traits can't work:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
+# define BOOST_NO_STD_ITERATOR_TRAITS
+# endif
+
+//
+// Without partial specialization, partial
+// specialization with default args won't work either:
+//
+# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
+ && !defined(BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS)
+# define BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+# endif
+
+//
+// Without member template support, we can't have template constructors
+// in the standard library either:
+//
+# if defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
+ && !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)
+# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+# endif
+
+//
+// Without member template support, we can't have a conforming
+// std::allocator template either:
+//
+# if defined(BOOST_NO_MEMBER_TEMPLATES) \
+ && !defined(BOOST_MSVC6_MEMBER_TEMPLATES) \
+ && !defined(BOOST_NO_STD_ALLOCATOR)
+# define BOOST_NO_STD_ALLOCATOR
+# endif
+
+//
+// without ADL support then using declarations will break ADL as well:
+//
+#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) && !defined(BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL)
+# define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
+#endif
+
+//
+// Without typeid support we have no dynamic RTTI either:
+//
+#if defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
+# define BOOST_NO_RTTI
+#endif
+
+//
+// If we have a standard allocator, then we have a partial one as well:
+//
+#if !defined(BOOST_NO_STD_ALLOCATOR)
+# define BOOST_HAS_PARTIAL_STD_ALLOCATOR
+#endif
+
+//
+// We can't have a working std::use_facet if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_USE_FACET)
+# define BOOST_NO_STD_USE_FACET
+# endif
+
+//
+// We can't have a std::messages facet if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_MESSAGES)
+# define BOOST_NO_STD_MESSAGES
+# endif
+
+//
+// We can't have a working std::wstreambuf if there is no std::locale:
+//
+# if defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_NO_STD_WSTREAMBUF)
+# define BOOST_NO_STD_WSTREAMBUF
+# endif
+
+//
+// We can't have a <cwctype> if there is no <cwchar>:
+//
+# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_CWCTYPE)
+# define BOOST_NO_CWCTYPE
+# endif
+
+//
+// We can't have a swprintf if there is no <cwchar>:
+//
+# if defined(BOOST_NO_CWCHAR) && !defined(BOOST_NO_SWPRINTF)
+# define BOOST_NO_SWPRINTF
+# endif
+
+//
+// If Win32 support is turned off, then we must turn off
+// threading support also, unless there is some other
+// thread API enabled:
+//
+#if defined(BOOST_DISABLE_WIN32) && defined(_WIN32) \
+ && !defined(BOOST_DISABLE_THREADS) && !defined(BOOST_HAS_PTHREADS)
+# define BOOST_DISABLE_THREADS
+#endif
+
+//
+// Turn on threading support if the compiler thinks that it's in
+// multithreaded mode. We put this here because there are only a
+// limited number of macros that identify this (if there's any missing
+// from here then add to the appropriate compiler section):
+//
+#if (defined(__MT__) || defined(_MT) || defined(_REENTRANT) \
+ || defined(_PTHREADS) || defined(__APPLE__) || defined(__DragonFly__)) \
+ && !defined(BOOST_HAS_THREADS)
+# define BOOST_HAS_THREADS
+#endif
+
+//
+// Turn threading support off if BOOST_DISABLE_THREADS is defined:
+//
+#if defined(BOOST_DISABLE_THREADS) && defined(BOOST_HAS_THREADS)
+# undef BOOST_HAS_THREADS
+#endif
+
+//
+// Turn threading support off if we don't recognise the threading API:
+//
+#if defined(BOOST_HAS_THREADS) && !defined(BOOST_HAS_PTHREADS)\
+ && !defined(BOOST_HAS_WINTHREADS) && !defined(BOOST_HAS_BETHREADS)\
+ && !defined(BOOST_HAS_MPTASKS)
+# undef BOOST_HAS_THREADS
+#endif
+
+//
+// Turn threading detail macros off if we don't (want to) use threading
+//
+#ifndef BOOST_HAS_THREADS
+# undef BOOST_HAS_PTHREADS
+# undef BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE
+# undef BOOST_HAS_PTHREAD_YIELD
+# undef BOOST_HAS_PTHREAD_DELAY_NP
+# undef BOOST_HAS_WINTHREADS
+# undef BOOST_HAS_BETHREADS
+# undef BOOST_HAS_MPTASKS
+#endif
+
+//
+// If the compiler claims to be C99 conformant, then it had better
+// have a <stdint.h>:
+//
+# if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901)
+# define BOOST_HAS_STDINT_H
+# ifndef BOOST_HAS_LOG1P
+# define BOOST_HAS_LOG1P
+# endif
+# ifndef BOOST_HAS_EXPM1
+# define BOOST_HAS_EXPM1
+# endif
+# endif
+
+//
+// Define BOOST_NO_SLIST and BOOST_NO_HASH if required.
+// Note that this is for backwards compatibility only.
+//
+# if !defined(BOOST_HAS_SLIST) && !defined(BOOST_NO_SLIST)
+# define BOOST_NO_SLIST
+# endif
+
+# if !defined(BOOST_HAS_HASH) && !defined(BOOST_NO_HASH)
+# define BOOST_NO_HASH
+# endif
+
+//
+// Set BOOST_SLIST_HEADER if not set already:
+//
+#if defined(BOOST_HAS_SLIST) && !defined(BOOST_SLIST_HEADER)
+# define BOOST_SLIST_HEADER <slist>
+#endif
+
+//
+// Set BOOST_HASH_SET_HEADER if not set already:
+//
+#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_SET_HEADER)
+# define BOOST_HASH_SET_HEADER <hash_set>
+#endif
+
+//
+// Set BOOST_HASH_MAP_HEADER if not set already:
+//
+#if defined(BOOST_HAS_HASH) && !defined(BOOST_HASH_MAP_HEADER)
+# define BOOST_HASH_MAP_HEADER <hash_map>
+#endif
+
+// BOOST_HAS_ABI_HEADERS
+// This macro gets set if we have headers that fix the ABI,
+// and prevent ODR violations when linking to external libraries:
+#if defined(BOOST_ABI_PREFIX) && defined(BOOST_ABI_SUFFIX) && !defined(BOOST_HAS_ABI_HEADERS)
+# define BOOST_HAS_ABI_HEADERS
+#endif
+
+#if defined(BOOST_HAS_ABI_HEADERS) && defined(BOOST_DISABLE_ABI_HEADERS)
+# undef BOOST_HAS_ABI_HEADERS
+#endif
+
+// BOOST_NO_STDC_NAMESPACE workaround --------------------------------------//
+// Because std::size_t usage is so common, even in boost headers which do not
+// otherwise use the C library, the <cstddef> workaround is included here so
+// that ugly workaround code need not appear in many other boost headers.
+// NOTE WELL: This is a workaround for non-conforming compilers; <cstddef>
+// must still be #included in the usual places so that <cstddef> inclusion
+// works as expected with standard conforming compilers. The resulting
+// double inclusion of <cstddef> is harmless.
+
+# if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
+# include <cstddef>
+ namespace std { using ::ptrdiff_t; using ::size_t; }
+# endif
+
+// Workaround for the unfortunate min/max macros defined by some platform headers
+
+#define BOOST_PREVENT_MACRO_SUBSTITUTION
+
+#ifndef BOOST_USING_STD_MIN
+# define BOOST_USING_STD_MIN() using std::min
+#endif
+
+#ifndef BOOST_USING_STD_MAX
+# define BOOST_USING_STD_MAX() using std::max
+#endif
+
+// BOOST_NO_STD_MIN_MAX workaround -----------------------------------------//
+
+# if defined(BOOST_NO_STD_MIN_MAX) && defined(__cplusplus)
+
+namespace std {
+ template <class _Tp>
+ inline const _Tp& min BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
+ return __b < __a ? __b : __a;
+ }
+ template <class _Tp>
+ inline const _Tp& max BOOST_PREVENT_MACRO_SUBSTITUTION (const _Tp& __a, const _Tp& __b) {
+ return __a < __b ? __b : __a;
+ }
+}
+
+# endif
+
+// BOOST_STATIC_CONSTANT workaround --------------------------------------- //
+// On compilers which don't allow in-class initialization of static integral
+// constant members, we must use enums as a workaround if we want the constants
+// to be available at compile-time. This macro gives us a convenient way to
+// declare such constants.
+
+# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+# define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment }
+# else
+# define BOOST_STATIC_CONSTANT(type, assignment) static const type assignment
+# endif
+
+// BOOST_USE_FACET / HAS_FACET workaround ----------------------------------//
+// When the standard library does not have a conforming std::use_facet there
+// are various workarounds available, but they differ from library to library.
+// The same problem occurs with has_facet.
+// These macros provide a consistent way to access a locale's facets.
+// Usage:
+// replace
+// std::use_facet<Type>(loc);
+// with
+// BOOST_USE_FACET(Type, loc);
+// Note do not add a std:: prefix to the front of BOOST_USE_FACET!
+// Use for BOOST_HAS_FACET is analogous.
+
+#if defined(BOOST_NO_STD_USE_FACET)
+# ifdef BOOST_HAS_TWO_ARG_USE_FACET
+# define BOOST_USE_FACET(Type, loc) std::use_facet(loc, static_cast<Type*>(0))
+# define BOOST_HAS_FACET(Type, loc) std::has_facet(loc, static_cast<Type*>(0))
+# elif defined(BOOST_HAS_MACRO_USE_FACET)
+# define BOOST_USE_FACET(Type, loc) std::_USE(loc, Type)
+# define BOOST_HAS_FACET(Type, loc) std::_HAS(loc, Type)
+# elif defined(BOOST_HAS_STLP_USE_FACET)
+# define BOOST_USE_FACET(Type, loc) (*std::_Use_facet<Type >(loc))
+# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
+# endif
+#else
+# define BOOST_USE_FACET(Type, loc) std::use_facet< Type >(loc)
+# define BOOST_HAS_FACET(Type, loc) std::has_facet< Type >(loc)
+#endif
+
+// BOOST_NESTED_TEMPLATE workaround ------------------------------------------//
+// Member templates are supported by some compilers even though they can't use
+// the A::template member<U> syntax, as a workaround replace:
+//
+// typedef typename A::template rebind<U> binder;
+//
+// with:
+//
+// typedef typename A::BOOST_NESTED_TEMPLATE rebind<U> binder;
+
+#ifndef BOOST_NO_MEMBER_TEMPLATE_KEYWORD
+# define BOOST_NESTED_TEMPLATE template
+#else
+# define BOOST_NESTED_TEMPLATE
+#endif
+
+// BOOST_UNREACHABLE_RETURN(x) workaround -------------------------------------//
+// Normally evaluates to nothing, unless BOOST_NO_UNREACHABLE_RETURN_DETECTION
+// is defined, in which case it evaluates to return x; Use when you have a return
+// statement that can never be reached.
+
+#ifndef BOOST_UNREACHABLE_RETURN
+# ifdef BOOST_NO_UNREACHABLE_RETURN_DETECTION
+# define BOOST_UNREACHABLE_RETURN(x) return x;
+# else
+# define BOOST_UNREACHABLE_RETURN(x)
+# endif
+#endif
+
+// BOOST_DEDUCED_TYPENAME workaround ------------------------------------------//
+//
+// Some compilers don't support the use of `typename' for dependent
+// types in deduced contexts, e.g.
+//
+// template <class T> void f(T, typename T::type);
+// ^^^^^^^^
+// Replace these declarations with:
+//
+// template <class T> void f(T, BOOST_DEDUCED_TYPENAME T::type);
+
+#ifndef BOOST_NO_DEDUCED_TYPENAME
+# define BOOST_DEDUCED_TYPENAME typename
+#else
+# define BOOST_DEDUCED_TYPENAME
+#endif
+
+#ifndef BOOST_NO_TYPENAME_WITH_CTOR
+# define BOOST_CTOR_TYPENAME typename
+#else
+# define BOOST_CTOR_TYPENAME
+#endif
+
+// long long workaround ------------------------------------------//
+// On gcc (and maybe other compilers?) long long is alway supported
+// but it's use may generate either warnings (with -ansi), or errors
+// (with -pedantic -ansi) unless it's use is prefixed by __extension__
+//
+#if defined(BOOST_HAS_LONG_LONG) && defined(__cplusplus)
+namespace boost{
+# ifdef __GNUC__
+ __extension__ typedef long long long_long_type;
+ __extension__ typedef unsigned long long ulong_long_type;
+# else
+ typedef long long long_long_type;
+ typedef unsigned long long ulong_long_type;
+# endif
+}
+#endif
+// same again for __int128:
+#if defined(BOOST_HAS_INT128) && defined(__cplusplus)
+namespace boost{
+# ifdef __GNUC__
+ __extension__ typedef __int128 int128_type;
+ __extension__ typedef unsigned __int128 uint128_type;
+# else
+ typedef __int128 int128_type;
+ typedef unsigned __int128 uint128_type;
+# endif
+}
+#endif
+// same again for __float128:
+#if defined(BOOST_HAS_FLOAT128) && defined(__cplusplus)
+namespace boost {
+# ifdef __GNUC__
+ __extension__ typedef __float128 float128_type;
+# else
+ typedef __float128 float128_type;
+# endif
+}
+#endif
+
+// BOOST_[APPEND_]EXPLICIT_TEMPLATE_[NON_]TYPE macros --------------------------//
+
+// These macros are obsolete. Port away and remove.
+
+# define BOOST_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(t)
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(t)
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE(t, v)
+# define BOOST_APPEND_EXPLICIT_TEMPLATE_NON_TYPE_SPEC(t, v)
+
+// When BOOST_NO_STD_TYPEINFO is defined, we can just import
+// the global definition into std namespace:
+#if defined(BOOST_NO_STD_TYPEINFO) && defined(__cplusplus)
+#include <typeinfo>
+namespace std{ using ::type_info; }
+#endif
+
+// ---------------------------------------------------------------------------//
+
+// Helper macro BOOST_STRINGIZE:
+// Helper macro BOOST_JOIN:
+
+#include <boost/config/helper_macros.hpp>
+
+//
+// Set some default values for compiler/library/platform names.
+// These are for debugging config setup only:
+//
+# ifndef BOOST_COMPILER
+# define BOOST_COMPILER "Unknown ISO C++ Compiler"
+# endif
+# ifndef BOOST_STDLIB
+# define BOOST_STDLIB "Unknown ISO standard library"
+# endif
+# ifndef BOOST_PLATFORM
+# if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) \
+ || defined(_POSIX_SOURCE)
+# define BOOST_PLATFORM "Generic Unix"
+# else
+# define BOOST_PLATFORM "Unknown"
+# endif
+# endif
+
+//
+// Set some default values GPU support
+//
+# ifndef BOOST_GPU_ENABLED
+# define BOOST_GPU_ENABLED
+# endif
+
+// BOOST_RESTRICT ---------------------------------------------//
+// Macro to use in place of 'restrict' keyword variants
+#if !defined(BOOST_RESTRICT)
+# if defined(_MSC_VER)
+# define BOOST_RESTRICT __restrict
+# if !defined(BOOST_NO_RESTRICT_REFERENCES) && (_MSC_FULL_VER < 190023026)
+# define BOOST_NO_RESTRICT_REFERENCES
+# endif
+# elif defined(__GNUC__) && __GNUC__ > 3
+ // Clang also defines __GNUC__ (as 4)
+# define BOOST_RESTRICT __restrict__
+# else
+# define BOOST_RESTRICT
+# if !defined(BOOST_NO_RESTRICT_REFERENCES)
+# define BOOST_NO_RESTRICT_REFERENCES
+# endif
+# endif
+#endif
+
+// BOOST_MAY_ALIAS -----------------------------------------------//
+// The macro expands to an attribute to mark a type that is allowed to alias other types.
+// The macro is defined in the compiler-specific headers.
+#if !defined(BOOST_MAY_ALIAS)
+# define BOOST_NO_MAY_ALIAS
+# define BOOST_MAY_ALIAS
+#endif
+
+// BOOST_FORCEINLINE ---------------------------------------------//
+// Macro to use in place of 'inline' to force a function to be inline
+#if !defined(BOOST_FORCEINLINE)
+# if defined(_MSC_VER)
+# define BOOST_FORCEINLINE __forceinline
+# elif defined(__GNUC__) && __GNUC__ > 3
+ // Clang also defines __GNUC__ (as 4)
+# define BOOST_FORCEINLINE inline __attribute__ ((__always_inline__))
+# else
+# define BOOST_FORCEINLINE inline
+# endif
+#endif
+
+// BOOST_NOINLINE ---------------------------------------------//
+// Macro to use in place of 'inline' to prevent a function to be inlined
+#if !defined(BOOST_NOINLINE)
+# if defined(_MSC_VER)
+# define BOOST_NOINLINE __declspec(noinline)
+# elif defined(__GNUC__) && __GNUC__ > 3
+ // Clang also defines __GNUC__ (as 4)
+# if defined(__CUDACC__)
+ // nvcc doesn't always parse __noinline__,
+ // see: https://svn.boost.org/trac/boost/ticket/9392
+# define BOOST_NOINLINE __attribute__ ((noinline))
+# else
+# define BOOST_NOINLINE __attribute__ ((__noinline__))
+# endif
+# else
+# define BOOST_NOINLINE
+# endif
+#endif
+
+// BOOST_NORETURN ---------------------------------------------//
+// Macro to use before a function declaration/definition to designate
+// the function as not returning normally (i.e. with a return statement
+// or by leaving the function scope, if the function return type is void).
+#if !defined(BOOST_NORETURN)
+# if defined(_MSC_VER)
+# define BOOST_NORETURN __declspec(noreturn)
+# elif defined(__GNUC__)
+# define BOOST_NORETURN __attribute__ ((__noreturn__))
+# elif defined(__has_attribute) && defined(__SUNPRO_CC) && (__SUNPRO_CC > 0x5130)
+# if __has_attribute(noreturn)
+# define BOOST_NORETURN [[noreturn]]
+# endif
+# elif defined(__has_cpp_attribute)
+# if __has_cpp_attribute(noreturn)
+# define BOOST_NORETURN [[noreturn]]
+# endif
+# endif
+#endif
+
+#if !defined(BOOST_NORETURN)
+# define BOOST_NO_NORETURN
+# define BOOST_NORETURN
+#endif
+
+// Branch prediction hints
+// These macros are intended to wrap conditional expressions that yield true or false
+//
+// if (BOOST_LIKELY(var == 10))
+// {
+// // the most probable code here
+// }
+//
+#if !defined(BOOST_LIKELY)
+# define BOOST_LIKELY(x) x
+#endif
+#if !defined(BOOST_UNLIKELY)
+# define BOOST_UNLIKELY(x) x
+#endif
+
+// Type and data alignment specification
+//
+#if !defined(BOOST_ALIGNMENT)
+# if !defined(BOOST_NO_CXX11_ALIGNAS)
+# define BOOST_ALIGNMENT(x) alignas(x)
+# elif defined(_MSC_VER)
+# define BOOST_ALIGNMENT(x) __declspec(align(x))
+# elif defined(__GNUC__)
+# define BOOST_ALIGNMENT(x) __attribute__ ((__aligned__(x)))
+# else
+# define BOOST_NO_ALIGNMENT
+# define BOOST_ALIGNMENT(x)
+# endif
+#endif
+
+// Lack of non-public defaulted functions is implied by the lack of any defaulted functions
+#if !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS) && defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+# define BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS
+#endif
+
+// Lack of defaulted moves is implied by the lack of either rvalue references or any defaulted functions
+#if !defined(BOOST_NO_CXX11_DEFAULTED_MOVES) && (defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES))
+# define BOOST_NO_CXX11_DEFAULTED_MOVES
+#endif
+
+// Defaulted and deleted function declaration helpers
+// These macros are intended to be inside a class definition.
+// BOOST_DEFAULTED_FUNCTION accepts the function declaration and its
+// body, which will be used if the compiler doesn't support defaulted functions.
+// BOOST_DELETED_FUNCTION only accepts the function declaration. It
+// will expand to a private function declaration, if the compiler doesn't support
+// deleted functions. Because of this it is recommended to use BOOST_DELETED_FUNCTION
+// in the end of the class definition.
+//
+// class my_class
+// {
+// public:
+// // Default-constructible
+// BOOST_DEFAULTED_FUNCTION(my_class(), {})
+// // Copying prohibited
+// BOOST_DELETED_FUNCTION(my_class(my_class const&))
+// BOOST_DELETED_FUNCTION(my_class& operator= (my_class const&))
+// };
+//
+#if !(defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS))
+# define BOOST_DEFAULTED_FUNCTION(fun, body) fun = default;
+#else
+# define BOOST_DEFAULTED_FUNCTION(fun, body) fun body
+#endif
+
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+# define BOOST_DELETED_FUNCTION(fun) fun = delete;
+#else
+# define BOOST_DELETED_FUNCTION(fun) private: fun;
+#endif
+
+//
+// Set BOOST_NO_DECLTYPE_N3276 when BOOST_NO_DECLTYPE is defined
+//
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_DECLTYPE_N3276)
+#define BOOST_NO_CXX11_DECLTYPE_N3276 BOOST_NO_CXX11_DECLTYPE
+#endif
+
+// -------------------- Deprecated macros for 1.50 ---------------------------
+// These will go away in a future release
+
+// Use BOOST_NO_CXX11_HDR_UNORDERED_SET or BOOST_NO_CXX11_HDR_UNORDERED_MAP
+// instead of BOOST_NO_STD_UNORDERED
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) || defined (BOOST_NO_CXX11_HDR_UNORDERED_SET)
+# ifndef BOOST_NO_CXX11_STD_UNORDERED
+# define BOOST_NO_CXX11_STD_UNORDERED
+# endif
+#endif
+
+// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST instead of BOOST_NO_INITIALIZER_LISTS
+#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_INITIALIZER_LISTS)
+# define BOOST_NO_INITIALIZER_LISTS
+#endif
+
+// Use BOOST_NO_CXX11_HDR_ARRAY instead of BOOST_NO_0X_HDR_ARRAY
+#if defined(BOOST_NO_CXX11_HDR_ARRAY) && !defined(BOOST_NO_0X_HDR_ARRAY)
+# define BOOST_NO_0X_HDR_ARRAY
+#endif
+// Use BOOST_NO_CXX11_HDR_CHRONO instead of BOOST_NO_0X_HDR_CHRONO
+#if defined(BOOST_NO_CXX11_HDR_CHRONO) && !defined(BOOST_NO_0X_HDR_CHRONO)
+# define BOOST_NO_0X_HDR_CHRONO
+#endif
+// Use BOOST_NO_CXX11_HDR_CODECVT instead of BOOST_NO_0X_HDR_CODECVT
+#if defined(BOOST_NO_CXX11_HDR_CODECVT) && !defined(BOOST_NO_0X_HDR_CODECVT)
+# define BOOST_NO_0X_HDR_CODECVT
+#endif
+// Use BOOST_NO_CXX11_HDR_CONDITION_VARIABLE instead of BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#if defined(BOOST_NO_CXX11_HDR_CONDITION_VARIABLE) && !defined(BOOST_NO_0X_HDR_CONDITION_VARIABLE)
+# define BOOST_NO_0X_HDR_CONDITION_VARIABLE
+#endif
+// Use BOOST_NO_CXX11_HDR_FORWARD_LIST instead of BOOST_NO_0X_HDR_FORWARD_LIST
+#if defined(BOOST_NO_CXX11_HDR_FORWARD_LIST) && !defined(BOOST_NO_0X_HDR_FORWARD_LIST)
+# define BOOST_NO_0X_HDR_FORWARD_LIST
+#endif
+// Use BOOST_NO_CXX11_HDR_FUTURE instead of BOOST_NO_0X_HDR_FUTURE
+#if defined(BOOST_NO_CXX11_HDR_FUTURE) && !defined(BOOST_NO_0X_HDR_FUTURE)
+# define BOOST_NO_0X_HDR_FUTURE
+#endif
+
+// Use BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+// instead of BOOST_NO_0X_HDR_INITIALIZER_LIST or BOOST_NO_INITIALIZER_LISTS
+#ifdef BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# ifndef BOOST_NO_0X_HDR_INITIALIZER_LIST
+# define BOOST_NO_0X_HDR_INITIALIZER_LIST
+# endif
+# ifndef BOOST_NO_INITIALIZER_LISTS
+# define BOOST_NO_INITIALIZER_LISTS
+# endif
+#endif
+
+// Use BOOST_NO_CXX11_HDR_MUTEX instead of BOOST_NO_0X_HDR_MUTEX
+#if defined(BOOST_NO_CXX11_HDR_MUTEX) && !defined(BOOST_NO_0X_HDR_MUTEX)
+# define BOOST_NO_0X_HDR_MUTEX
+#endif
+// Use BOOST_NO_CXX11_HDR_RANDOM instead of BOOST_NO_0X_HDR_RANDOM
+#if defined(BOOST_NO_CXX11_HDR_RANDOM) && !defined(BOOST_NO_0X_HDR_RANDOM)
+# define BOOST_NO_0X_HDR_RANDOM
+#endif
+// Use BOOST_NO_CXX11_HDR_RATIO instead of BOOST_NO_0X_HDR_RATIO
+#if defined(BOOST_NO_CXX11_HDR_RATIO) && !defined(BOOST_NO_0X_HDR_RATIO)
+# define BOOST_NO_0X_HDR_RATIO
+#endif
+// Use BOOST_NO_CXX11_HDR_REGEX instead of BOOST_NO_0X_HDR_REGEX
+#if defined(BOOST_NO_CXX11_HDR_REGEX) && !defined(BOOST_NO_0X_HDR_REGEX)
+# define BOOST_NO_0X_HDR_REGEX
+#endif
+// Use BOOST_NO_CXX11_HDR_SYSTEM_ERROR instead of BOOST_NO_0X_HDR_SYSTEM_ERROR
+#if defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR) && !defined(BOOST_NO_0X_HDR_SYSTEM_ERROR)
+# define BOOST_NO_0X_HDR_SYSTEM_ERROR
+#endif
+// Use BOOST_NO_CXX11_HDR_THREAD instead of BOOST_NO_0X_HDR_THREAD
+#if defined(BOOST_NO_CXX11_HDR_THREAD) && !defined(BOOST_NO_0X_HDR_THREAD)
+# define BOOST_NO_0X_HDR_THREAD
+#endif
+// Use BOOST_NO_CXX11_HDR_TUPLE instead of BOOST_NO_0X_HDR_TUPLE
+#if defined(BOOST_NO_CXX11_HDR_TUPLE) && !defined(BOOST_NO_0X_HDR_TUPLE)
+# define BOOST_NO_0X_HDR_TUPLE
+#endif
+// Use BOOST_NO_CXX11_HDR_TYPE_TRAITS instead of BOOST_NO_0X_HDR_TYPE_TRAITS
+#if defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_0X_HDR_TYPE_TRAITS)
+# define BOOST_NO_0X_HDR_TYPE_TRAITS
+#endif
+// Use BOOST_NO_CXX11_HDR_TYPEINDEX instead of BOOST_NO_0X_HDR_TYPEINDEX
+#if defined(BOOST_NO_CXX11_HDR_TYPEINDEX) && !defined(BOOST_NO_0X_HDR_TYPEINDEX)
+# define BOOST_NO_0X_HDR_TYPEINDEX
+#endif
+// Use BOOST_NO_CXX11_HDR_UNORDERED_MAP instead of BOOST_NO_0X_HDR_UNORDERED_MAP
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_MAP) && !defined(BOOST_NO_0X_HDR_UNORDERED_MAP)
+# define BOOST_NO_0X_HDR_UNORDERED_MAP
+#endif
+// Use BOOST_NO_CXX11_HDR_UNORDERED_SET instead of BOOST_NO_0X_HDR_UNORDERED_SET
+#if defined(BOOST_NO_CXX11_HDR_UNORDERED_SET) && !defined(BOOST_NO_0X_HDR_UNORDERED_SET)
+# define BOOST_NO_0X_HDR_UNORDERED_SET
+#endif
+
+// ------------------ End of deprecated macros for 1.50 ---------------------------
+
+// -------------------- Deprecated macros for 1.51 ---------------------------
+// These will go away in a future release
+
+// Use BOOST_NO_CXX11_AUTO_DECLARATIONS instead of BOOST_NO_AUTO_DECLARATIONS
+#if defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && !defined(BOOST_NO_AUTO_DECLARATIONS)
+# define BOOST_NO_AUTO_DECLARATIONS
+#endif
+// Use BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS instead of BOOST_NO_AUTO_MULTIDECLARATIONS
+#if defined(BOOST_NO_CXX11_AUTO_MULTIDECLARATIONS) && !defined(BOOST_NO_AUTO_MULTIDECLARATIONS)
+# define BOOST_NO_AUTO_MULTIDECLARATIONS
+#endif
+// Use BOOST_NO_CXX11_CHAR16_T instead of BOOST_NO_CHAR16_T
+#if defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CHAR16_T)
+# define BOOST_NO_CHAR16_T
+#endif
+// Use BOOST_NO_CXX11_CHAR32_T instead of BOOST_NO_CHAR32_T
+#if defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CHAR32_T)
+# define BOOST_NO_CHAR32_T
+#endif
+// Use BOOST_NO_CXX11_TEMPLATE_ALIASES instead of BOOST_NO_TEMPLATE_ALIASES
+#if defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !defined(BOOST_NO_TEMPLATE_ALIASES)
+# define BOOST_NO_TEMPLATE_ALIASES
+#endif
+// Use BOOST_NO_CXX11_CONSTEXPR instead of BOOST_NO_CONSTEXPR
+#if defined(BOOST_NO_CXX11_CONSTEXPR) && !defined(BOOST_NO_CONSTEXPR)
+# define BOOST_NO_CONSTEXPR
+#endif
+// Use BOOST_NO_CXX11_DECLTYPE_N3276 instead of BOOST_NO_DECLTYPE_N3276
+#if defined(BOOST_NO_CXX11_DECLTYPE_N3276) && !defined(BOOST_NO_DECLTYPE_N3276)
+# define BOOST_NO_DECLTYPE_N3276
+#endif
+// Use BOOST_NO_CXX11_DECLTYPE instead of BOOST_NO_DECLTYPE
+#if defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_DECLTYPE)
+# define BOOST_NO_DECLTYPE
+#endif
+// Use BOOST_NO_CXX11_DEFAULTED_FUNCTIONS instead of BOOST_NO_DEFAULTED_FUNCTIONS
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_DEFAULTED_FUNCTIONS)
+# define BOOST_NO_DEFAULTED_FUNCTIONS
+#endif
+// Use BOOST_NO_CXX11_DELETED_FUNCTIONS instead of BOOST_NO_DELETED_FUNCTIONS
+#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_DELETED_FUNCTIONS)
+# define BOOST_NO_DELETED_FUNCTIONS
+#endif
+// Use BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS instead of BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+# define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS
+#endif
+// Use BOOST_NO_CXX11_EXTERN_TEMPLATE instead of BOOST_NO_EXTERN_TEMPLATE
+#if defined(BOOST_NO_CXX11_EXTERN_TEMPLATE) && !defined(BOOST_NO_EXTERN_TEMPLATE)
+# define BOOST_NO_EXTERN_TEMPLATE
+#endif
+// Use BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS instead of BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#if defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS)
+# define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS
+#endif
+// Use BOOST_NO_CXX11_LAMBDAS instead of BOOST_NO_LAMBDAS
+#if defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_LAMBDAS)
+# define BOOST_NO_LAMBDAS
+#endif
+// Use BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS instead of BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#if defined(BOOST_NO_CXX11_LOCAL_CLASS_TEMPLATE_PARAMETERS) && !defined(BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS)
+# define BOOST_NO_LOCAL_CLASS_TEMPLATE_PARAMETERS
+#endif
+// Use BOOST_NO_CXX11_NOEXCEPT instead of BOOST_NO_NOEXCEPT
+#if defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_NOEXCEPT)
+# define BOOST_NO_NOEXCEPT
+#endif
+// Use BOOST_NO_CXX11_NULLPTR instead of BOOST_NO_NULLPTR
+#if defined(BOOST_NO_CXX11_NULLPTR) && !defined(BOOST_NO_NULLPTR)
+# define BOOST_NO_NULLPTR
+#endif
+// Use BOOST_NO_CXX11_RAW_LITERALS instead of BOOST_NO_RAW_LITERALS
+#if defined(BOOST_NO_CXX11_RAW_LITERALS) && !defined(BOOST_NO_RAW_LITERALS)
+# define BOOST_NO_RAW_LITERALS
+#endif
+// Use BOOST_NO_CXX11_RVALUE_REFERENCES instead of BOOST_NO_RVALUE_REFERENCES
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_RVALUE_REFERENCES)
+# define BOOST_NO_RVALUE_REFERENCES
+#endif
+// Use BOOST_NO_CXX11_SCOPED_ENUMS instead of BOOST_NO_SCOPED_ENUMS
+#if defined(BOOST_NO_CXX11_SCOPED_ENUMS) && !defined(BOOST_NO_SCOPED_ENUMS)
+# define BOOST_NO_SCOPED_ENUMS
+#endif
+// Use BOOST_NO_CXX11_STATIC_ASSERT instead of BOOST_NO_STATIC_ASSERT
+#if defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_NO_STATIC_ASSERT)
+# define BOOST_NO_STATIC_ASSERT
+#endif
+// Use BOOST_NO_CXX11_STD_UNORDERED instead of BOOST_NO_STD_UNORDERED
+#if defined(BOOST_NO_CXX11_STD_UNORDERED) && !defined(BOOST_NO_STD_UNORDERED)
+# define BOOST_NO_STD_UNORDERED
+#endif
+// Use BOOST_NO_CXX11_UNICODE_LITERALS instead of BOOST_NO_UNICODE_LITERALS
+#if defined(BOOST_NO_CXX11_UNICODE_LITERALS) && !defined(BOOST_NO_UNICODE_LITERALS)
+# define BOOST_NO_UNICODE_LITERALS
+#endif
+// Use BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX instead of BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#if defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX) && !defined(BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX)
+# define BOOST_NO_UNIFIED_INITIALIZATION_SYNTAX
+#endif
+// Use BOOST_NO_CXX11_VARIADIC_TEMPLATES instead of BOOST_NO_VARIADIC_TEMPLATES
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_VARIADIC_TEMPLATES)
+# define BOOST_NO_VARIADIC_TEMPLATES
+#endif
+// Use BOOST_NO_CXX11_VARIADIC_MACROS instead of BOOST_NO_VARIADIC_MACROS
+#if defined(BOOST_NO_CXX11_VARIADIC_MACROS) && !defined(BOOST_NO_VARIADIC_MACROS)
+# define BOOST_NO_VARIADIC_MACROS
+#endif
+// Use BOOST_NO_CXX11_NUMERIC_LIMITS instead of BOOST_NO_NUMERIC_LIMITS_LOWEST
+#if defined(BOOST_NO_CXX11_NUMERIC_LIMITS) && !defined(BOOST_NO_NUMERIC_LIMITS_LOWEST)
+# define BOOST_NO_NUMERIC_LIMITS_LOWEST
+#endif
+// ------------------ End of deprecated macros for 1.51 ---------------------------
+
+
+
+//
+// Helper macros BOOST_NOEXCEPT, BOOST_NOEXCEPT_IF, BOOST_NOEXCEPT_EXPR
+// These aid the transition to C++11 while still supporting C++03 compilers
+//
+#ifdef BOOST_NO_CXX11_NOEXCEPT
+# define BOOST_NOEXCEPT
+# define BOOST_NOEXCEPT_OR_NOTHROW throw()
+# define BOOST_NOEXCEPT_IF(Predicate)
+# define BOOST_NOEXCEPT_EXPR(Expression) false
+#else
+# define BOOST_NOEXCEPT noexcept
+# define BOOST_NOEXCEPT_OR_NOTHROW noexcept
+# define BOOST_NOEXCEPT_IF(Predicate) noexcept((Predicate))
+# define BOOST_NOEXCEPT_EXPR(Expression) noexcept((Expression))
+#endif
+//
+// Helper macro BOOST_FALLTHROUGH
+// Fallback definition of BOOST_FALLTHROUGH macro used to mark intended
+// fall-through between case labels in a switch statement. We use a definition
+// that requires a semicolon after it to avoid at least one type of misuse even
+// on unsupported compilers.
+//
+#ifndef BOOST_FALLTHROUGH
+# define BOOST_FALLTHROUGH ((void)0)
+#endif
+
+//
+// constexpr workarounds
+//
+#if defined(BOOST_NO_CXX11_CONSTEXPR)
+#define BOOST_CONSTEXPR
+#define BOOST_CONSTEXPR_OR_CONST const
+#else
+#define BOOST_CONSTEXPR constexpr
+#define BOOST_CONSTEXPR_OR_CONST constexpr
+#endif
+#if defined(BOOST_NO_CXX14_CONSTEXPR)
+#define BOOST_CXX14_CONSTEXPR
+#else
+#define BOOST_CXX14_CONSTEXPR constexpr
+#endif
+
+//
+// Unused variable/typedef workarounds:
+//
+#ifndef BOOST_ATTRIBUTE_UNUSED
+# define BOOST_ATTRIBUTE_UNUSED
+#endif
+
+#define BOOST_STATIC_CONSTEXPR static BOOST_CONSTEXPR_OR_CONST
+
+//
+// Set BOOST_HAS_STATIC_ASSERT when BOOST_NO_CXX11_STATIC_ASSERT is not defined
+//
+#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) && !defined(BOOST_HAS_STATIC_ASSERT)
+# define BOOST_HAS_STATIC_ASSERT
+#endif
+
+//
+// Set BOOST_HAS_RVALUE_REFS when BOOST_NO_CXX11_RVALUE_REFERENCES is not defined
+//
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_HAS_RVALUE_REFS)
+#define BOOST_HAS_RVALUE_REFS
+#endif
+
+//
+// Set BOOST_HAS_VARIADIC_TMPL when BOOST_NO_CXX11_VARIADIC_TEMPLATES is not defined
+//
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_HAS_VARIADIC_TMPL)
+#define BOOST_HAS_VARIADIC_TMPL
+#endif
+//
+// Set BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS when
+// BOOST_NO_CXX11_VARIADIC_TEMPLATES is set:
+//
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS)
+# define BOOST_NO_CXX11_FIXED_LENGTH_VARIADIC_TEMPLATE_EXPANSION_PACKS
+#endif
+
+// This is a catch all case for obsolete compilers / std libs:
+#if !defined(__has_include)
+# define BOOST_NO_CXX17_HDR_OPTIONAL
+# define BOOST_NO_CXX17_HDR_STRING_VIEW
+#else
+#if !__has_include(<optional>)
+# define BOOST_NO_CXX17_HDR_OPTIONAL
+#endif
+#if !__has_include(<string_view>)
+# define BOOST_NO_CXX17_HDR_STRING_VIEW
+#endif
+#endif
+
+//
+// Finish off with checks for macros that are depricated / no longer supported,
+// if any of these are set then it's very likely that much of Boost will no
+// longer work. So stop with a #error for now, but give the user a chance
+// to continue at their own risk if they really want to:
+//
+#if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_CONFIG_ALLOW_DEPRECATED)
+# error "You are using a compiler which lacks features which are now a minimum requirement in order to use Boost, define BOOST_CONFIG_ALLOW_DEPRECATED if you want to continue at your own risk!!!"
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/config/header_deprecated.hpp b/src/third_party/boost-1.69.0/boost/config/header_deprecated.hpp
index 864554f2a26..864554f2a26 100644
--- a/src/third_party/boost-1.68.0/boost/config/header_deprecated.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/header_deprecated.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/helper_macros.hpp b/src/third_party/boost-1.69.0/boost/config/helper_macros.hpp
index 3e79526df65..3e79526df65 100644
--- a/src/third_party/boost-1.68.0/boost/config/helper_macros.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/helper_macros.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/no_tr1/cmath.hpp b/src/third_party/boost-1.69.0/boost/config/no_tr1/cmath.hpp
index d8268d842a7..d8268d842a7 100644
--- a/src/third_party/boost-1.68.0/boost/config/no_tr1/cmath.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/no_tr1/cmath.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/no_tr1/complex.hpp b/src/third_party/boost-1.69.0/boost/config/no_tr1/complex.hpp
index ca200922b3c..ca200922b3c 100644
--- a/src/third_party/boost-1.68.0/boost/config/no_tr1/complex.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/no_tr1/complex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/no_tr1/functional.hpp b/src/third_party/boost-1.69.0/boost/config/no_tr1/functional.hpp
index e395efc1977..e395efc1977 100644
--- a/src/third_party/boost-1.68.0/boost/config/no_tr1/functional.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/no_tr1/functional.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/no_tr1/memory.hpp b/src/third_party/boost-1.69.0/boost/config/no_tr1/memory.hpp
index 2b5d2080272..2b5d2080272 100644
--- a/src/third_party/boost-1.68.0/boost/config/no_tr1/memory.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/no_tr1/memory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/no_tr1/utility.hpp b/src/third_party/boost-1.69.0/boost/config/no_tr1/utility.hpp
index dea8f115bce..dea8f115bce 100644
--- a/src/third_party/boost-1.68.0/boost/config/no_tr1/utility.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/no_tr1/utility.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/aix.hpp b/src/third_party/boost-1.69.0/boost/config/platform/aix.hpp
index a48e2320618..a48e2320618 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/aix.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/aix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/amigaos.hpp b/src/third_party/boost-1.69.0/boost/config/platform/amigaos.hpp
index 34bcf4128b7..34bcf4128b7 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/amigaos.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/amigaos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/beos.hpp b/src/third_party/boost-1.69.0/boost/config/platform/beos.hpp
index 6158c1c20be..6158c1c20be 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/beos.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/beos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/bsd.hpp b/src/third_party/boost-1.69.0/boost/config/platform/bsd.hpp
index 79e74a080a8..79e74a080a8 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/bsd.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/bsd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/cloudabi.hpp b/src/third_party/boost-1.69.0/boost/config/platform/cloudabi.hpp
index bed7b6318dc..bed7b6318dc 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/cloudabi.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/cloudabi.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/cray.hpp b/src/third_party/boost-1.69.0/boost/config/platform/cray.hpp
index 103e9c06204..103e9c06204 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/cray.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/cray.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/cygwin.hpp b/src/third_party/boost-1.69.0/boost/config/platform/cygwin.hpp
index 6dd7e57cfd1..6dd7e57cfd1 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/cygwin.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/cygwin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/haiku.hpp b/src/third_party/boost-1.69.0/boost/config/platform/haiku.hpp
index 04244c5677f..04244c5677f 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/haiku.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/haiku.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/hpux.hpp b/src/third_party/boost-1.69.0/boost/config/platform/hpux.hpp
index 222622e7ee5..222622e7ee5 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/hpux.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/hpux.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/irix.hpp b/src/third_party/boost-1.69.0/boost/config/platform/irix.hpp
index 0acb651552e..0acb651552e 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/irix.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/irix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/linux.hpp b/src/third_party/boost-1.69.0/boost/config/platform/linux.hpp
index c4eef8f80cb..c4eef8f80cb 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/linux.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/linux.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/macos.hpp b/src/third_party/boost-1.69.0/boost/config/platform/macos.hpp
index ed7dc15f282..ed7dc15f282 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/macos.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/macos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/qnxnto.hpp b/src/third_party/boost-1.69.0/boost/config/platform/qnxnto.hpp
index d0298cb4ecb..d0298cb4ecb 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/qnxnto.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/qnxnto.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/solaris.hpp b/src/third_party/boost-1.69.0/boost/config/platform/solaris.hpp
index 51ffe67f331..51ffe67f331 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/solaris.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/solaris.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/symbian.hpp b/src/third_party/boost-1.69.0/boost/config/platform/symbian.hpp
index f814d00b5b7..f814d00b5b7 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/symbian.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/symbian.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/vms.hpp b/src/third_party/boost-1.69.0/boost/config/platform/vms.hpp
index f70efcfb8ef..f70efcfb8ef 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/vms.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/vms.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/vxworks.hpp b/src/third_party/boost-1.69.0/boost/config/platform/vxworks.hpp
index a91e4ab439d..a91e4ab439d 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/vxworks.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/vxworks.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/win32.hpp b/src/third_party/boost-1.69.0/boost/config/platform/win32.hpp
index 450158fbaab..450158fbaab 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/win32.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/win32.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/platform/zos.hpp b/src/third_party/boost-1.69.0/boost/config/platform/zos.hpp
index fa77999edc7..fa77999edc7 100644
--- a/src/third_party/boost-1.68.0/boost/config/platform/zos.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/platform/zos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/pragma_message.hpp b/src/third_party/boost-1.69.0/boost/config/pragma_message.hpp
index b2c5ff2e868..b2c5ff2e868 100644
--- a/src/third_party/boost-1.68.0/boost/config/pragma_message.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/pragma_message.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/requires_threads.hpp b/src/third_party/boost-1.69.0/boost/config/requires_threads.hpp
index cfaff23027c..cfaff23027c 100644
--- a/src/third_party/boost-1.68.0/boost/config/requires_threads.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/requires_threads.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/dinkumware.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/dinkumware.hpp
index e829f08e511..e829f08e511 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/dinkumware.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/dinkumware.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/libcomo.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/libcomo.hpp
index 75ac2bb76a2..75ac2bb76a2 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/libcomo.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/libcomo.hpp
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/libcpp.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/libcpp.hpp
new file mode 100644
index 00000000000..ffe2f2a0f59
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/libcpp.hpp
@@ -0,0 +1,143 @@
+// (C) Copyright Christopher Jefferson 2011.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// config for libc++
+// Might need more in here later.
+
+#if !defined(_LIBCPP_VERSION)
+# include <ciso646>
+# if !defined(_LIBCPP_VERSION)
+# error "This is not libc++!"
+# endif
+#endif
+
+#define BOOST_STDLIB "libc++ version " BOOST_STRINGIZE(_LIBCPP_VERSION)
+
+#define BOOST_HAS_THREADS
+
+#ifdef _LIBCPP_HAS_NO_VARIADICS
+# define BOOST_NO_CXX11_HDR_TUPLE
+#endif
+
+// BOOST_NO_CXX11_ALLOCATOR should imply no support for the C++11
+// allocator model. The C++11 allocator model requires a conforming
+// std::allocator_traits which is only possible with C++11 template
+// aliases since members rebind_alloc and rebind_traits require it.
+#if defined(_LIBCPP_HAS_NO_TEMPLATE_ALIASES)
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
+#endif
+
+#if __cplusplus < 201103
+//
+// These two appear to be somewhat useable in C++03 mode, there may be others...
+//
+//# define BOOST_NO_CXX11_HDR_ARRAY
+//# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RANDOM
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_REGEX
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
+# define BOOST_NO_CXX11_SMART_PTR
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
+# define BOOST_NO_CXX11_STD_ALIGN
+# define BOOST_NO_CXX11_ADDRESSOF
+# define BOOST_NO_CXX11_HDR_ATOMIC
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_FUTURE
+#elif _LIBCPP_VERSION < 3700
+//
+// These appear to be unusable/incomplete so far:
+//
+# define BOOST_NO_CXX11_HDR_ATOMIC
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_FUTURE
+#endif
+
+
+#if _LIBCPP_VERSION < 3700
+// libc++ uses a non-standard messages_base
+#define BOOST_NO_STD_MESSAGES
+#endif
+
+// C++14 features
+#if (_LIBCPP_VERSION < 3700) || (__cplusplus <= 201402L)
+# define BOOST_NO_CXX14_STD_EXCHANGE
+#endif
+
+// C++17 features
+#if (_LIBCPP_VERSION < 4000) || (__cplusplus <= 201402L)
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_HDR_OPTIONAL
+# define BOOST_NO_CXX17_HDR_STRING_VIEW
+#endif
+#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR)
+# define BOOST_NO_AUTO_PTR
+#endif
+#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_RANDOM_SHUFFLE)
+# define BOOST_NO_CXX98_RANDOM_SHUFFLE
+#endif
+#if (_LIBCPP_VERSION > 4000) && (__cplusplus > 201402L) && !defined(_LIBCPP_ENABLE_CXX17_REMOVED_BINDERS)
+# define BOOST_NO_CXX98_BINDERS
+#endif
+
+#define BOOST_NO_CXX17_ITERATOR_TRAITS
+#define BOOST_NO_CXX17_STD_INVOKE // Invoke support is incomplete (no invoke_result)
+
+#if (_LIBCPP_VERSION <= 1101) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
+// This is a bit of a sledgehammer, because really it's just libc++abi that has no
+// support for thread_local, leading to linker errors such as
+// "undefined reference to `__cxa_thread_atexit'". It is fixed in the
+// most recent releases of libc++abi though...
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
+#if defined(__linux__) && (_LIBCPP_VERSION < 6000) && !defined(BOOST_NO_CXX11_THREAD_LOCAL)
+// After libc++-dev is installed on Trusty, clang++-libc++ almost works,
+// except uses of `thread_local` fail with undefined reference to
+// `__cxa_thread_atexit`.
+//
+// clang's libc++abi provides an implementation by deferring to the glibc
+// implementation, which may or may not be available (it is not on Trusty).
+// clang 4's libc++abi will provide an implementation if one is not in glibc
+// though, so thread local support should work with clang 4 and above as long
+// as libc++abi is linked in.
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+
+#if defined(__has_include)
+#if !__has_include(<shared_mutex>)
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#elif __cplusplus <= 201103
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#endif
+#elif __cplusplus < 201402
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#endif
+
+#if !defined(BOOST_NO_CXX14_HDR_SHARED_MUTEX) && (_LIBCPP_VERSION < 5000)
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#endif
+
+// --- end ---
diff --git a/src/third_party/boost-1.69.0/boost/config/stdlib/libstdcpp3.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/libstdcpp3.hpp
new file mode 100644
index 00000000000..38209ddd453
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/libstdcpp3.hpp
@@ -0,0 +1,349 @@
+// (C) Copyright John Maddock 2001.
+// (C) Copyright Jens Maurer 2001.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for most recent version.
+
+// config for libstdc++ v3
+// not much to go in here:
+
+#define BOOST_GNU_STDLIB 1
+
+#ifdef __GLIBCXX__
+#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCXX__)
+#else
+#define BOOST_STDLIB "GNU libstdc++ version " BOOST_STRINGIZE(__GLIBCPP__)
+#endif
+
+#if !defined(_GLIBCPP_USE_WCHAR_T) && !defined(_GLIBCXX_USE_WCHAR_T)
+# define BOOST_NO_CWCHAR
+# define BOOST_NO_CWCTYPE
+# define BOOST_NO_STD_WSTRING
+# define BOOST_NO_STD_WSTREAMBUF
+#endif
+
+#if defined(__osf__) && !defined(_REENTRANT) \
+ && ( defined(_GLIBCXX_HAVE_GTHR_DEFAULT) || defined(_GLIBCPP_HAVE_GTHR_DEFAULT) )
+// GCC 3 on Tru64 forces the definition of _REENTRANT when any std lib header
+// file is included, therefore for consistency we define it here as well.
+# define _REENTRANT
+#endif
+
+#ifdef __GLIBCXX__ // gcc 3.4 and greater:
+# if defined(_GLIBCXX_HAVE_GTHR_DEFAULT) \
+ || defined(_GLIBCXX__PTHREADS) \
+ || defined(_GLIBCXX_HAS_GTHREADS) \
+ || defined(_WIN32) \
+ || defined(_AIX) \
+ || defined(__HAIKU__)
+ //
+ // If the std lib has thread support turned on, then turn it on in Boost
+ // as well. We do this because some gcc-3.4 std lib headers define _REENTANT
+ // while others do not...
+ //
+# define BOOST_HAS_THREADS
+# else
+# define BOOST_DISABLE_THREADS
+# endif
+#elif defined(__GLIBCPP__) \
+ && !defined(_GLIBCPP_HAVE_GTHR_DEFAULT) \
+ && !defined(_GLIBCPP__PTHREADS)
+ // disable thread support if the std lib was built single threaded:
+# define BOOST_DISABLE_THREADS
+#endif
+
+#if (defined(linux) || defined(__linux) || defined(__linux__)) && defined(__arm__) && defined(_GLIBCPP_HAVE_GTHR_DEFAULT)
+// linux on arm apparently doesn't define _REENTRANT
+// so just turn on threading support whenever the std lib is thread safe:
+# define BOOST_HAS_THREADS
+#endif
+
+#if !defined(_GLIBCPP_USE_LONG_LONG) \
+ && !defined(_GLIBCXX_USE_LONG_LONG)\
+ && defined(BOOST_HAS_LONG_LONG)
+// May have been set by compiler/*.hpp, but "long long" without library
+// support is useless.
+# undef BOOST_HAS_LONG_LONG
+#endif
+
+// Apple doesn't seem to reliably defined a *unix* macro
+#if !defined(CYGWIN) && ( defined(__unix__) \
+ || defined(__unix) \
+ || defined(unix) \
+ || defined(__APPLE__) \
+ || defined(__APPLE) \
+ || defined(APPLE))
+# include <unistd.h>
+#endif
+
+#ifndef __VXWORKS__ // VxWorks uses Dinkum, not GNU STL with GCC
+#if defined(__GLIBCXX__) || (defined(__GLIBCPP__) && __GLIBCPP__>=20020514) // GCC >= 3.1.0
+# define BOOST_STD_EXTENSION_NAMESPACE __gnu_cxx
+# define BOOST_HAS_SLIST
+# define BOOST_HAS_HASH
+# define BOOST_SLIST_HEADER <ext/slist>
+# if !defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3)
+# define BOOST_HASH_SET_HEADER <ext/hash_set>
+# define BOOST_HASH_MAP_HEADER <ext/hash_map>
+# else
+# define BOOST_HASH_SET_HEADER <backward/hash_set>
+# define BOOST_HASH_MAP_HEADER <backward/hash_map>
+# endif
+#endif
+#endif
+
+//
+// Decide whether we have C++11 support turned on:
+//
+#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103)
+# define BOOST_LIBSTDCXX11
+#endif
+
+//
+// Decide which version of libstdc++ we have, normally
+// libstdc++ C++0x support is detected via __GNUC__, __GNUC_MINOR__, and possibly
+// __GNUC_PATCHLEVEL__ at the suggestion of Jonathan Wakely, one of the libstdc++
+// developers. He also commented:
+//
+// "I'm not sure how useful __GLIBCXX__ is for your purposes, for instance in
+// GCC 4.2.4 it is set to 20080519 but in GCC 4.3.0 it is set to 20080305.
+// Although 4.3.0 was released earlier than 4.2.4, it has better C++0x support
+// than any release in the 4.2 series."
+//
+// Another resource for understanding libstdc++ features is:
+// http://gcc.gnu.org/onlinedocs/libstdc++/manual/status.html#manual.intro.status.standard.200x
+//
+// However, using the GCC version number fails when the compiler is clang since this
+// only ever claims to emulate GCC-4.2, see https://svn.boost.org/trac/boost/ticket/7473
+// for a long discussion on this issue. What we can do though is use clang's __has_include
+// to detect the presence of a C++11 header that was introduced with a specific GCC release.
+// We still have to be careful though as many such headers were buggy and/or incomplete when
+// first introduced, so we only check for headers that were fully featured from day 1, and then
+// use that to infer the underlying GCC version:
+//
+#ifdef __clang__
+
+#if __has_include(<experimental/memory_resource>)
+# define BOOST_LIBSTDCXX_VERSION 60100
+#elif __has_include(<experimental/any>)
+# define BOOST_LIBSTDCXX_VERSION 50100
+#elif __has_include(<shared_mutex>)
+# define BOOST_LIBSTDCXX_VERSION 40900
+#elif __has_include(<ext/cmath>)
+# define BOOST_LIBSTDCXX_VERSION 40800
+#elif __has_include(<scoped_allocator>)
+# define BOOST_LIBSTDCXX_VERSION 40700
+#elif __has_include(<typeindex>)
+# define BOOST_LIBSTDCXX_VERSION 40600
+#elif __has_include(<future>)
+# define BOOST_LIBSTDCXX_VERSION 40500
+#elif __has_include(<ratio>)
+# define BOOST_LIBSTDCXX_VERSION 40400
+#elif __has_include(<array>)
+# define BOOST_LIBSTDCXX_VERSION 40300
+#endif
+
+#if (BOOST_LIBSTDCXX_VERSION < 50100)
+// libstdc++ does not define this function as it's deprecated in C++11, but clang still looks for it,
+// defining it here is a terrible cludge, but should get things working:
+extern "C" char *gets (char *__s);
+#endif
+//
+// clang is unable to parse some GCC headers, add those workarounds here:
+//
+#if BOOST_LIBSTDCXX_VERSION < 50000
+# define BOOST_NO_CXX11_HDR_REGEX
+#endif
+//
+// GCC 4.7.x has no __cxa_thread_atexit which
+// thread_local objects require for cleanup:
+//
+#if BOOST_LIBSTDCXX_VERSION < 40800
+# define BOOST_NO_CXX11_THREAD_LOCAL
+#endif
+//
+// Early clang versions can handle <chrono>, not exactly sure which versions
+// but certainly up to clang-3.8 and gcc-4.6:
+//
+#if (__clang_major__ < 5)
+# if BOOST_LIBSTDCXX_VERSION < 40800
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_CHRONO
+# endif
+#endif
+
+//
+// GCC 4.8 and 9 add working versions of <atomic> and <regex> respectively.
+// However, we have no test for these as the headers were present but broken
+// in early GCC versions.
+//
+#endif
+
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC >= 0x5130) && (__cplusplus >= 201103L)
+//
+// Oracle Solaris compiler uses it's own verison of libstdc++ but doesn't
+// set __GNUC__
+//
+#if __SUNPRO_CC >= 0x5140
+#define BOOST_LIBSTDCXX_VERSION 50100
+#else
+#define BOOST_LIBSTDCXX_VERSION 40800
+#endif
+#endif
+
+#if !defined(BOOST_LIBSTDCXX_VERSION)
+# define BOOST_LIBSTDCXX_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+#endif
+
+// std::auto_ptr isn't provided with _GLIBCXX_DEPRECATED=0 (GCC 4.5 and earlier)
+// or _GLIBCXX_USE_DEPRECATED=0 (GCC 4.6 and later).
+#if defined(BOOST_LIBSTDCXX11)
+# if BOOST_LIBSTDCXX_VERSION < 40600
+# if !_GLIBCXX_DEPRECATED
+# define BOOST_NO_AUTO_PTR
+# endif
+# elif !_GLIBCXX_USE_DEPRECATED
+# define BOOST_NO_AUTO_PTR
+# endif
+#endif
+
+// C++0x headers in GCC 4.3.0 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 40300) || !defined(BOOST_LIBSTDCXX11)
+# define BOOST_NO_CXX11_HDR_ARRAY
+# define BOOST_NO_CXX11_HDR_TUPLE
+# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
+# define BOOST_NO_CXX11_HDR_UNORDERED_SET
+# define BOOST_NO_CXX11_HDR_FUNCTIONAL
+#endif
+
+// C++0x headers in GCC 4.4.0 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 40400) || !defined(BOOST_LIBSTDCXX11)
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_FORWARD_LIST
+# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+# define BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_RATIO
+# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
+# define BOOST_NO_CXX11_SMART_PTR
+#else
+# define BOOST_HAS_TR1_COMPLEX_INVERSE_TRIG
+# define BOOST_HAS_TR1_COMPLEX_OVERLOADS
+#endif
+
+// C++0x features in GCC 4.5.0 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 40500) || !defined(BOOST_LIBSTDCXX11)
+# define BOOST_NO_CXX11_NUMERIC_LIMITS
+# define BOOST_NO_CXX11_HDR_FUTURE
+# define BOOST_NO_CXX11_HDR_RANDOM
+#endif
+
+// C++0x features in GCC 4.6.0 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 40600) || !defined(BOOST_LIBSTDCXX11)
+# define BOOST_NO_CXX11_HDR_TYPEINDEX
+# define BOOST_NO_CXX11_ADDRESSOF
+# define BOOST_NO_CXX17_ITERATOR_TRAITS
+#endif
+
+// C++0x features in GCC 4.7.0 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 40700) || !defined(BOOST_LIBSTDCXX11)
+// Note that although <chrono> existed prior to 4.7, "steady_clock" is spelled "monotonic_clock"
+// so 4.7.0 is the first truly conforming one.
+# define BOOST_NO_CXX11_HDR_CHRONO
+# define BOOST_NO_CXX11_ALLOCATOR
+# define BOOST_NO_CXX11_POINTER_TRAITS
+#endif
+// C++0x features in GCC 4.8.0 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 40800) || !defined(BOOST_LIBSTDCXX11)
+// Note that although <atomic> existed prior to gcc 4.8 it was largely unimplemented for many types:
+# define BOOST_NO_CXX11_HDR_ATOMIC
+# define BOOST_NO_CXX11_HDR_THREAD
+#endif
+// C++0x features in GCC 4.9.0 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11)
+// Although <regex> is present and compilable against, the actual implementation is not functional
+// even for the simplest patterns such as "\d" or "[0-9]". This is the case at least in gcc up to 4.8, inclusively.
+# define BOOST_NO_CXX11_HDR_REGEX
+#endif
+#if (BOOST_LIBSTDCXX_VERSION < 40900) || (__cplusplus <= 201103)
+# define BOOST_NO_CXX14_STD_EXCHANGE
+#endif
+
+#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7)))
+// As of clang-3.6, libstdc++ header <atomic> throws up errors with clang:
+# define BOOST_NO_CXX11_HDR_ATOMIC
+#endif
+//
+// C++0x features in GCC 5.1 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 50100) || !defined(BOOST_LIBSTDCXX11)
+# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
+# define BOOST_NO_CXX11_HDR_CODECVT
+# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
+# define BOOST_NO_CXX11_STD_ALIGN
+#endif
+
+//
+// C++17 features in GCC 7.1 and later
+//
+#if (BOOST_LIBSTDCXX_VERSION < 70100) || (__cplusplus <= 201402L)
+# define BOOST_NO_CXX17_STD_INVOKE
+# define BOOST_NO_CXX17_STD_APPLY
+# define BOOST_NO_CXX17_HDR_OPTIONAL
+# define BOOST_NO_CXX17_HDR_STRING_VIEW
+#endif
+
+#if defined(__has_include)
+#if !__has_include(<shared_mutex>)
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#elif __cplusplus <= 201103
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#endif
+#elif __cplusplus < 201402 || (BOOST_LIBSTDCXX_VERSION < 40900) || !defined(BOOST_LIBSTDCXX11)
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+#endif
+
+//
+// Headers not present on Solaris with the Oracle compiler:
+#if defined(__SUNPRO_CC) && (__SUNPRO_CC < 0x5140)
+#define BOOST_NO_CXX11_HDR_FUTURE
+#define BOOST_NO_CXX11_HDR_FORWARD_LIST
+#define BOOST_NO_CXX11_HDR_ATOMIC
+// shared_ptr is present, but is not convertible to bool
+// which causes all kinds of problems especially in Boost.Thread
+// but probably elsewhere as well.
+#define BOOST_NO_CXX11_SMART_PTR
+#endif
+
+#if (!defined(_GLIBCXX_HAS_GTHREADS) || !defined(_GLIBCXX_USE_C99_STDINT_TR1))
+ // Headers not always available:
+# ifndef BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
+# endif
+# ifndef BOOST_NO_CXX11_HDR_MUTEX
+# define BOOST_NO_CXX11_HDR_MUTEX
+# endif
+# ifndef BOOST_NO_CXX11_HDR_THREAD
+# define BOOST_NO_CXX11_HDR_THREAD
+# endif
+# ifndef BOOST_NO_CXX14_HDR_SHARED_MUTEX
+# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
+# endif
+#endif
+
+#if (!defined(_GTHREAD_USE_MUTEX_TIMEDLOCK) || (_GTHREAD_USE_MUTEX_TIMEDLOCK == 0)) && !defined(BOOST_NO_CXX11_HDR_MUTEX)
+// Timed mutexes are not always available:
+# define BOOST_NO_CXX11_HDR_MUTEX
+#endif
+
+// --- end ---
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/modena.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/modena.hpp
index 81919e01801..81919e01801 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/modena.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/modena.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/msl.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/msl.hpp
index 0e2e2afee8b..0e2e2afee8b 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/msl.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/msl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/roguewave.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/roguewave.hpp
index df6021551a3..df6021551a3 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/roguewave.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/roguewave.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/sgi.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/sgi.hpp
index 0c8ab2e4c10..0c8ab2e4c10 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/sgi.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/sgi.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/stlport.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/stlport.hpp
index 2e304e2b945..2e304e2b945 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/stlport.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/stlport.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/vacpp.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/vacpp.hpp
index c4e1fb1847e..c4e1fb1847e 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/vacpp.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/vacpp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/stdlib/xlcpp_zos.hpp b/src/third_party/boost-1.69.0/boost/config/stdlib/xlcpp_zos.hpp
index 4d5beb18552..4d5beb18552 100644
--- a/src/third_party/boost-1.68.0/boost/config/stdlib/xlcpp_zos.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/stdlib/xlcpp_zos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/user.hpp b/src/third_party/boost-1.69.0/boost/config/user.hpp
index 28e7476afd3..28e7476afd3 100644
--- a/src/third_party/boost-1.68.0/boost/config/user.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/user.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/warning_disable.hpp b/src/third_party/boost-1.69.0/boost/config/warning_disable.hpp
index fea8e829f14..fea8e829f14 100644
--- a/src/third_party/boost-1.68.0/boost/config/warning_disable.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/warning_disable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/config/workaround.hpp b/src/third_party/boost-1.69.0/boost/config/workaround.hpp
index fca8f3ab7e5..fca8f3ab7e5 100644
--- a/src/third_party/boost-1.68.0/boost/config/workaround.hpp
+++ b/src/third_party/boost-1.69.0/boost/config/workaround.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/adaptive_pool.hpp b/src/third_party/boost-1.69.0/boost/container/adaptive_pool.hpp
index d1d77bcade9..d1d77bcade9 100644
--- a/src/third_party/boost-1.68.0/boost/container/adaptive_pool.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/adaptive_pool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/allocator.hpp b/src/third_party/boost-1.69.0/boost/container/allocator.hpp
new file mode 100644
index 00000000000..2a21afff409
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/allocator.hpp
@@ -0,0 +1,369 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_ALLOCATOR_HPP
+#define BOOST_CONTAINER_ALLOCATOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/detail/version_type.hpp>
+#include <boost/container/throw_exception.hpp>
+#include <boost/container/detail/dlmalloc.hpp>
+#include <boost/container/detail/multiallocation_chain.hpp>
+#include <boost/static_assert.hpp>
+#include <cstddef>
+#include <cassert>
+
+//!\file
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+template<unsigned Version, unsigned int AllocationDisableMask>
+class allocator<void, Version, AllocationDisableMask>
+{
+ typedef allocator<void, Version, AllocationDisableMask> self_t;
+ public:
+ typedef void value_type;
+ typedef void * pointer;
+ typedef const void* const_pointer;
+ typedef int & reference;
+ typedef const int & const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef boost::container::dtl::
+ version_type<self_t, Version> version;
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef boost::container::dtl::
+ basic_multiallocation_chain<void*> multiallocation_chain;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //!Obtains an allocator that allocates
+ //!objects of type T2
+ template<class T2>
+ struct rebind
+ {
+ typedef allocator< T2
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ , Version, AllocationDisableMask
+ #endif
+ > other;
+ };
+
+ //!Default constructor
+ //!Never throws
+ allocator()
+ {}
+
+ //!Constructor from other allocator.
+ //!Never throws
+ allocator(const allocator &)
+ {}
+
+ //!Constructor from related allocator.
+ //!Never throws
+ template<class T2>
+ allocator(const allocator<T2, Version, AllocationDisableMask> &)
+ {}
+};
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! This class is an extended STL-compatible that offers advanced allocation mechanism
+//!(in-place expansion, shrinking, burst-allocation...)
+//!
+//! This allocator is a wrapper around a modified DLmalloc.
+//! If Version is 1, the allocator is a STL conforming allocator. If Version is 2,
+//! the allocator offers advanced expand in place and burst allocation capabilities.
+//!
+//! AllocationDisableMask works only if Version is 2 and it can be an inclusive OR
+//! of allocation types the user wants to disable.
+template< class T
+ , unsigned Version BOOST_CONTAINER_DOCONLY(=2)
+ , unsigned int AllocationDisableMask BOOST_CONTAINER_DOCONLY(=0)>
+class allocator
+{
+ typedef unsigned int allocation_type;
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+
+ //Self type
+ typedef allocator<T, Version, AllocationDisableMask> self_t;
+
+ //Not assignable from related allocator
+ template<class T2, unsigned int Version2, unsigned int AllocationDisableMask2>
+ allocator& operator=(const allocator<T2, Version2, AllocationDisableMask2>&);
+
+ static const unsigned int ForbiddenMask =
+ BOOST_CONTAINER_ALLOCATE_NEW | BOOST_CONTAINER_EXPAND_BWD | BOOST_CONTAINER_EXPAND_FWD ;
+
+ //The mask can't disable all the allocation types
+ BOOST_STATIC_ASSERT(( (AllocationDisableMask & ForbiddenMask) != ForbiddenMask ));
+
+ //The mask is only valid for version 2 allocators
+ BOOST_STATIC_ASSERT(( Version != 1 || (AllocationDisableMask == 0) ));
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ typedef T value_type;
+ typedef T * pointer;
+ typedef const T * const_pointer;
+ typedef T & reference;
+ typedef const T & const_reference;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+
+ typedef boost::container::dtl::
+ version_type<self_t, Version> version;
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef boost::container::dtl::
+ basic_multiallocation_chain<void*> void_multiallocation_chain;
+
+ typedef boost::container::dtl::
+ transform_multiallocation_chain
+ <void_multiallocation_chain, T> multiallocation_chain;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //!Obtains an allocator that allocates
+ //!objects of type T2
+ template<class T2>
+ struct rebind
+ {
+ typedef allocator<T2, Version, AllocationDisableMask> other;
+ };
+
+ //!Default constructor
+ //!Never throws
+ allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ //!Constructor from other allocator.
+ //!Never throws
+ allocator(const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ //!Constructor from related allocator.
+ //!Never throws
+ template<class T2>
+ allocator(const allocator<T2
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ , Version, AllocationDisableMask
+ #endif
+ > &) BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ //!Allocates memory for an array of count elements.
+ //!Throws std::bad_alloc if there is no enough memory
+ //!If Version is 2, this allocated memory can only be deallocated
+ //!with deallocate() or (for Version == 2) deallocate_many()
+ pointer allocate(size_type count, const void * hint= 0)
+ {
+ (void)hint;
+ if(count > this->max_size())
+ boost::container::throw_bad_alloc();
+ void *ret = dlmalloc_malloc(count*sizeof(T));
+ if(!ret)
+ boost::container::throw_bad_alloc();
+ return static_cast<pointer>(ret);
+ }
+
+ //!Deallocates previously allocated memory.
+ //!Never throws
+ void deallocate(pointer ptr, size_type) BOOST_NOEXCEPT_OR_NOTHROW
+ { dlmalloc_free(ptr); }
+
+ //!Returns the maximum number of elements that could be allocated.
+ //!Never throws
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return size_type(-1)/sizeof(T); }
+
+ //!Swaps two allocators, does nothing
+ //!because this allocator is stateless
+ friend void swap(self_t &, self_t &) BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ //!An allocator always compares to true, as memory allocated with one
+ //!instance can be deallocated by another instance
+ friend bool operator==(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
+ { return true; }
+
+ //!An allocator always compares to false, as memory allocated with one
+ //!instance can be deallocated by another instance
+ friend bool operator!=(const allocator &, const allocator &) BOOST_NOEXCEPT_OR_NOTHROW
+ { return false; }
+
+ //!An advanced function that offers in-place expansion shrink to fit and new allocation
+ //!capabilities. Memory allocated with this function can only be deallocated with deallocate()
+ //!or deallocate_many().
+ //!This function is available only with Version == 2
+ pointer allocation_command(allocation_type command,
+ size_type limit_size,
+ size_type &prefer_in_recvd_out_size,
+ pointer &reuse)
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ const allocation_type mask(AllocationDisableMask);
+ command &= ~mask;
+ pointer ret = this->priv_allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse);
+ if(!ret && !(command & BOOST_CONTAINER_NOTHROW_ALLOCATION))
+ boost::container::throw_bad_alloc();
+ return ret;
+ }
+
+ //!Returns maximum the number of objects the previously allocated memory
+ //!pointed by p can hold.
+ //!Memory must not have been allocated with
+ //!allocate_one or allocate_individual.
+ //!This function is available only with Version == 2
+ size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ return dlmalloc_size(p);
+ }
+
+ //!Allocates just one object. Memory allocated with this function
+ //!must be deallocated only with deallocate_one().
+ //!Throws bad_alloc if there is no enough memory
+ //!This function is available only with Version == 2
+ pointer allocate_one()
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ return this->allocate(1);
+ }
+
+ //!Allocates many elements of size == 1.
+ //!Elements must be individually deallocated with deallocate_one()
+ //!This function is available only with Version == 2
+ void allocate_individual(std::size_t num_elements, multiallocation_chain &chain)
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ this->allocate_many(1, num_elements, chain);
+ }
+
+ //!Deallocates memory previously allocated with allocate_one().
+ //!You should never use deallocate_one to deallocate memory allocated
+ //!with other functions different from allocate_one() or allocate_individual.
+ //Never throws
+ void deallocate_one(pointer p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ return this->deallocate(p, 1);
+ }
+
+ //!Deallocates memory allocated with allocate_one() or allocate_individual().
+ //!This function is available only with Version == 2
+ void deallocate_individual(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ return this->deallocate_many(chain);
+ }
+
+ //!Allocates many elements of size elem_size.
+ //!Elements must be individually deallocated with deallocate()
+ //!This function is available only with Version == 2
+ void allocate_many(size_type elem_size, std::size_t n_elements, multiallocation_chain &chain)
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ dlmalloc_memchain ch;
+ BOOST_CONTAINER_MEMCHAIN_INIT(&ch);
+ if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){
+ boost::container::throw_bad_alloc();
+ }
+ chain.incorporate_after(chain.before_begin()
+ ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch)
+ ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
+ ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );
+/*
+ if(!dlmalloc_multialloc_nodes(n_elements, elem_size*sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast<dlmalloc_memchain *>(&chain))){
+ boost::container::throw_bad_alloc();
+ }*/
+ }
+
+ //!Allocates n_elements elements, each one of size elem_sizes[i]
+ //!Elements must be individually deallocated with deallocate()
+ //!This function is available only with Version == 2
+ void allocate_many(const size_type *elem_sizes, size_type n_elements, multiallocation_chain &chain)
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ dlmalloc_memchain ch;
+ BOOST_CONTAINER_MEMCHAIN_INIT(&ch);
+ if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, &ch)){
+ boost::container::throw_bad_alloc();
+ }
+ chain.incorporate_after(chain.before_begin()
+ ,(T*)BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ch)
+ ,(T*)BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ch)
+ ,BOOST_CONTAINER_MEMCHAIN_SIZE(&ch) );
+ /*
+ if(!dlmalloc_multialloc_arrays(n_elements, elem_sizes, sizeof(T), DL_MULTIALLOC_DEFAULT_CONTIGUOUS, reinterpret_cast<dlmalloc_memchain *>(&chain))){
+ boost::container::throw_bad_alloc();
+ }*/
+ }
+
+ //!Deallocates several elements allocated by
+ //!allocate_many(), allocate(), or allocation_command().
+ //!This function is available only with Version == 2
+ void deallocate_many(multiallocation_chain &chain) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_STATIC_ASSERT(( Version > 1 ));
+ dlmalloc_memchain ch;
+ void *beg(&*chain.begin()), *last(&*chain.last());
+ size_t size(chain.size());
+ BOOST_CONTAINER_MEMCHAIN_INIT_FROM(&ch, beg, last, size);
+ dlmalloc_multidealloc(&ch);
+ //dlmalloc_multidealloc(reinterpret_cast<dlmalloc_memchain *>(&chain));
+ }
+
+ private:
+
+ pointer priv_allocation_command
+ (allocation_type command, std::size_t limit_size
+ ,size_type &prefer_in_recvd_out_size
+ ,pointer &reuse_ptr)
+ {
+ std::size_t const preferred_size = prefer_in_recvd_out_size;
+ dlmalloc_command_ret_t ret = {0 , 0};
+ if((limit_size > this->max_size()) | (preferred_size > this->max_size())){
+ return pointer();
+ }
+ std::size_t l_size = limit_size*sizeof(T);
+ std::size_t p_size = preferred_size*sizeof(T);
+ std::size_t r_size;
+ {
+ void* reuse_ptr_void = reuse_ptr;
+ ret = dlmalloc_allocation_command(command, sizeof(T), l_size, p_size, &r_size, reuse_ptr_void);
+ reuse_ptr = ret.second ? static_cast<T*>(reuse_ptr_void) : 0;
+ }
+ prefer_in_recvd_out_size = r_size/sizeof(T);
+ return (pointer)ret.first;
+ }
+};
+
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_ALLOCATOR_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/container/allocator_traits.hpp b/src/third_party/boost-1.69.0/boost/container/allocator_traits.hpp
new file mode 100644
index 00000000000..bb5a2d31b77
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/allocator_traits.hpp
@@ -0,0 +1,477 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Pablo Halpern 2009. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2011-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
+#define BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/type_traits.hpp> //is_empty
+#include <boost/container/detail/placement_new.hpp>
+#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
+#include <boost/container/detail/std_fwd.hpp>
+#endif
+// intrusive
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+// move
+#include <boost/move/utility_core.hpp>
+// move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+// other boost
+#include <boost/static_assert.hpp>
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME allocate
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 2
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 2
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME destroy
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME construct
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 9
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+template<class Allocator>
+class small_vector_allocator;
+
+namespace allocator_traits_detail {
+
+BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_max_size, max_size)
+BOOST_INTRUSIVE_HAS_STATIC_MEMBER_FUNC_SIGNATURE(has_select_on_container_copy_construction, select_on_container_copy_construction)
+
+} //namespace allocator_traits_detail {
+
+namespace dtl {
+
+//workaround needed for C++03 compilers with no construct()
+//supporting rvalue references
+template<class Allocator>
+struct is_std_allocator
+{ static const bool value = false; };
+
+template<class T>
+struct is_std_allocator< std::allocator<T> >
+{ static const bool value = true; };
+
+template<class T>
+struct is_std_allocator< small_vector_allocator< std::allocator<T> > >
+{ static const bool value = true; };
+
+template<class Allocator>
+struct is_not_std_allocator
+{ static const bool value = !is_std_allocator<Allocator>::value; };
+
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(pointer)
+BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_pointer)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(reference)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(const_reference)
+BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(void_pointer)
+BOOST_INTRUSIVE_INSTANTIATE_EVAL_DEFAULT_TYPE_TMPLT(const_void_pointer)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(size_type)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_copy_assignment)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_move_assignment)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(propagate_on_container_swap)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_always_equal)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(difference_type)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(is_partially_propagable)
+
+} //namespace dtl {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! The class template allocator_traits supplies a uniform interface to all allocator types.
+//! This class is a C++03-compatible implementation of std::allocator_traits
+template <typename Allocator>
+struct allocator_traits
+{
+ //allocator_type
+ typedef Allocator allocator_type;
+ //value_type
+ typedef typename allocator_type::value_type value_type;
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! Allocator::pointer if such a type exists; otherwise, value_type*
+ //!
+ typedef unspecified pointer;
+ //! Allocator::const_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const
+ //!
+ typedef see_documentation const_pointer;
+ //! Non-standard extension
+ //! Allocator::reference if such a type exists; otherwise, value_type&
+ typedef see_documentation reference;
+ //! Non-standard extension
+ //! Allocator::const_reference if such a type exists ; otherwise, const value_type&
+ typedef see_documentation const_reference;
+ //! Allocator::void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<void>.
+ //!
+ typedef see_documentation void_pointer;
+ //! Allocator::const_void_pointer if such a type exists ; otherwise, pointer_traits<pointer>::rebind<const
+ //!
+ typedef see_documentation const_void_pointer;
+ //! Allocator::difference_type if such a type exists ; otherwise, pointer_traits<pointer>::difference_type.
+ //!
+ typedef see_documentation difference_type;
+ //! Allocator::size_type if such a type exists ; otherwise, make_unsigned<difference_type>::type
+ //!
+ typedef see_documentation size_type;
+ //! Allocator::propagate_on_container_copy_assignment if such a type exists, otherwise a type
+ //! with an internal constant static boolean member <code>value</code> == false.
+ typedef see_documentation propagate_on_container_copy_assignment;
+ //! Allocator::propagate_on_container_move_assignment if such a type exists, otherwise a type
+ //! with an internal constant static boolean member <code>value</code> == false.
+ typedef see_documentation propagate_on_container_move_assignment;
+ //! Allocator::propagate_on_container_swap if such a type exists, otherwise a type
+ //! with an internal constant static boolean member <code>value</code> == false.
+ typedef see_documentation propagate_on_container_swap;
+ //! Allocator::is_always_equal if such a type exists, otherwise a type
+ //! with an internal constant static boolean member <code>value</code> == is_empty<Allocator>::value
+ typedef see_documentation is_always_equal;
+ //! Allocator::is_partially_propagable if such a type exists, otherwise a type
+ //! with an internal constant static boolean member <code>value</code> == false
+ //! <b>Note</b>: Non-standard extension used to implement `small_vector_allocator`.
+ typedef see_documentation is_partially_propagable;
+ //! Defines an allocator: Allocator::rebind<T>::other if such a type exists; otherwise, Allocator<T, Args>
+ //! if Allocator is a class template instantiation of the form Allocator<U, Args>, where Args is zero or
+ //! more type arguments ; otherwise, the instantiation of rebind_alloc is ill-formed.
+ //!
+ //! In C++03 compilers <code>rebind_alloc</code> is a struct derived from an allocator
+ //! deduced by previously detailed rules.
+ template <class T> using rebind_alloc = see_documentation;
+
+ //! In C++03 compilers <code>rebind_traits</code> is a struct derived from
+ //! <code>allocator_traits<OtherAlloc></code>, where <code>OtherAlloc</code> is
+ //! the allocator deduced by rules explained in <code>rebind_alloc</code>.
+ template <class T> using rebind_traits = allocator_traits<rebind_alloc<T> >;
+
+ //! Non-standard extension: Portable allocator rebind for C++03 and C++11 compilers.
+ //! <code>type</code> is an allocator related to Allocator deduced deduced by rules explained in <code>rebind_alloc</code>.
+ template <class T>
+ struct portable_rebind_alloc
+ { typedef see_documentation type; };
+ #else
+ //pointer
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ pointer, value_type*)
+ pointer;
+ //const_pointer
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
+ const_pointer, typename boost::intrusive::pointer_traits<pointer>::template
+ rebind_pointer<const value_type>)
+ const_pointer;
+ //reference
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ reference, typename dtl::unvoid_ref<value_type>::type)
+ reference;
+ //const_reference
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ const_reference, typename dtl::unvoid_ref<const value_type>::type)
+ const_reference;
+ //void_pointer
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
+ void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
+ rebind_pointer<void>)
+ void_pointer;
+ //const_void_pointer
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_EVAL_DEFAULT(boost::container::dtl::, Allocator,
+ const_void_pointer, typename boost::intrusive::pointer_traits<pointer>::template
+ rebind_pointer<const void>)
+ const_void_pointer;
+ //difference_type
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ difference_type, std::ptrdiff_t)
+ difference_type;
+ //size_type
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ size_type, std::size_t)
+ size_type;
+ //propagate_on_container_copy_assignment
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ propagate_on_container_copy_assignment, dtl::false_type)
+ propagate_on_container_copy_assignment;
+ //propagate_on_container_move_assignment
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ propagate_on_container_move_assignment, dtl::false_type)
+ propagate_on_container_move_assignment;
+ //propagate_on_container_swap
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ propagate_on_container_swap, dtl::false_type)
+ propagate_on_container_swap;
+ //is_always_equal
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ is_always_equal, dtl::is_empty<Allocator>)
+ is_always_equal;
+ //is_partially_propagable
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT(boost::container::dtl::, Allocator,
+ is_partially_propagable, dtl::false_type)
+ is_partially_propagable;
+
+ //rebind_alloc & rebind_traits
+ #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+ //C++11
+ template <typename T> using rebind_alloc = typename boost::intrusive::pointer_rebind<Allocator, T>::type;
+ template <typename T> using rebind_traits = allocator_traits< rebind_alloc<T> >;
+ #else // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+ //Some workaround for C++03 or C++11 compilers with no template aliases
+ template <typename T>
+ struct rebind_alloc : boost::intrusive::pointer_rebind<Allocator,T>::type
+ {
+ typedef typename boost::intrusive::pointer_rebind<Allocator,T>::type Base;
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <typename... Args>
+ rebind_alloc(BOOST_FWD_REF(Args)... args) : Base(boost::forward<Args>(args)...) {}
+ #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ #define BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
+ explicit rebind_alloc(BOOST_MOVE_UREF##N) : Base(BOOST_MOVE_FWD##N){}\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC)
+ #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_REBIND_ALLOC
+ #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ };
+
+ template <typename T>
+ struct rebind_traits
+ : allocator_traits<typename boost::intrusive::pointer_rebind<Allocator, T>::type>
+ {};
+ #endif // #if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+ //portable_rebind_alloc
+ template <class T>
+ struct portable_rebind_alloc
+ { typedef typename boost::intrusive::pointer_rebind<Allocator, T>::type type; };
+ #endif //BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //! <b>Returns</b>: <code>a.allocate(n)</code>
+ //!
+ BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n)
+ { return a.allocate(n); }
+
+ //! <b>Returns</b>: <code>a.deallocate(p, n)</code>
+ //!
+ //! <b>Throws</b>: Nothing
+ BOOST_CONTAINER_FORCEINLINE static void deallocate(Allocator &a, pointer p, size_type n)
+ { a.deallocate(p, n); }
+
+ //! <b>Effects</b>: calls <code>a.allocate(n, p)</code> if that call is well-formed;
+ //! otherwise, invokes <code>a.allocate(n)</code>
+ BOOST_CONTAINER_FORCEINLINE static pointer allocate(Allocator &a, size_type n, const_void_pointer p)
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_allocate
+ <Allocator, const size_type, const const_void_pointer>::value;
+ dtl::bool_<value> flag;
+ return allocator_traits::priv_allocate(flag, a, n, p);
+ }
+
+ //! <b>Effects</b>: calls <code>a.destroy(p)</code> if that call is well-formed;
+ //! otherwise, invokes <code>p->~T()</code>.
+ template<class T>
+ BOOST_CONTAINER_FORCEINLINE static void destroy(Allocator &a, T*p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ typedef T* destroy_pointer;
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_destroy
+ <Allocator, const destroy_pointer>::value;
+ dtl::bool_<value> flag;
+ allocator_traits::priv_destroy(flag, a, p);
+ }
+
+ //! <b>Returns</b>: <code>a.max_size()</code> if that expression is well-formed; otherwise,
+ //! <code>numeric_limits<size_type>::max()</code>.
+ BOOST_CONTAINER_FORCEINLINE static size_type max_size(const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ const bool value = allocator_traits_detail::has_max_size<Allocator, size_type (Allocator::*)() const>::value;
+ dtl::bool_<value> flag;
+ return allocator_traits::priv_max_size(flag, a);
+ }
+
+ //! <b>Returns</b>: <code>a.select_on_container_copy_construction()</code> if that expression is well-formed;
+ //! otherwise, a.
+ BOOST_CONTAINER_FORCEINLINE static BOOST_CONTAINER_DOC1ST(Allocator,
+ typename dtl::if_c
+ < allocator_traits_detail::has_select_on_container_copy_construction<Allocator BOOST_MOVE_I Allocator (Allocator::*)() const>::value
+ BOOST_MOVE_I Allocator BOOST_MOVE_I const Allocator & >::type)
+ select_on_container_copy_construction(const Allocator &a)
+ {
+ const bool value = allocator_traits_detail::has_select_on_container_copy_construction
+ <Allocator, Allocator (Allocator::*)() const>::value;
+ dtl::bool_<value> flag;
+ return allocator_traits::priv_select_on_container_copy_construction(flag, a);
+ }
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: calls <code>a.construct(p, std::forward<Args>(args)...)</code> if that call is well-formed;
+ //! otherwise, invokes <code>`placement new` (static_cast<void*>(p)) T(std::forward<Args>(args)...)</code>
+ template <class T, class ...Args>
+ BOOST_CONTAINER_FORCEINLINE static void construct(Allocator & a, T* p, BOOST_FWD_REF(Args)... args)
+ {
+ static const bool value = ::boost::move_detail::and_
+ < dtl::is_not_std_allocator<Allocator>
+ , boost::container::dtl::has_member_function_callable_with_construct
+ < Allocator, T*, Args... >
+ >::value;
+ dtl::bool_<value> flag;
+ allocator_traits::priv_construct(flag, a, p, ::boost::forward<Args>(args)...);
+ }
+ #endif
+
+ //! <b>Returns</b>: <code>a.storage_is_unpropagable(p)</code> if is_partially_propagable::value is true; otherwise,
+ //! <code>false</code>.
+ BOOST_CONTAINER_FORCEINLINE static bool storage_is_unpropagable(const Allocator &a, pointer p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ dtl::bool_<is_partially_propagable::value> flag;
+ return allocator_traits::priv_storage_is_unpropagable(flag, a, p);
+ }
+
+ //! <b>Returns</b>: <code>true</code> if <code>is_always_equal::value == true</code>, otherwise,
+ //! <code>a == b</code>.
+ BOOST_CONTAINER_FORCEINLINE static bool equal(const Allocator &a, const Allocator &b) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ dtl::bool_<is_always_equal::value> flag;
+ return allocator_traits::priv_equal(flag, a, b);
+ }
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ private:
+ BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::true_type, Allocator &a, size_type n, const_void_pointer p)
+ { return a.allocate(n, p); }
+
+ BOOST_CONTAINER_FORCEINLINE static pointer priv_allocate(dtl::false_type, Allocator &a, size_type n, const_void_pointer)
+ { return a.allocate(n); }
+
+ template<class T>
+ BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::true_type, Allocator &a, T* p) BOOST_NOEXCEPT_OR_NOTHROW
+ { a.destroy(p); }
+
+ template<class T>
+ BOOST_CONTAINER_FORCEINLINE static void priv_destroy(dtl::false_type, Allocator &, T* p) BOOST_NOEXCEPT_OR_NOTHROW
+ { p->~T(); (void)p; }
+
+ BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::true_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
+ { return a.max_size(); }
+
+ BOOST_CONTAINER_FORCEINLINE static size_type priv_max_size(dtl::false_type, const Allocator &) BOOST_NOEXCEPT_OR_NOTHROW
+ { return size_type(-1)/sizeof(value_type); }
+
+ BOOST_CONTAINER_FORCEINLINE static Allocator priv_select_on_container_copy_construction(dtl::true_type, const Allocator &a)
+ { return a.select_on_container_copy_construction(); }
+
+ BOOST_CONTAINER_FORCEINLINE static const Allocator &priv_select_on_container_copy_construction(dtl::false_type, const Allocator &a) BOOST_NOEXCEPT_OR_NOTHROW
+ { return a; }
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template<class T, class ...Args>
+ BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p, BOOST_FWD_REF(Args) ...args)
+ { a.construct( p, ::boost::forward<Args>(args)...); }
+
+ template<class T, class ...Args>
+ BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, BOOST_FWD_REF(Args) ...args)
+ { ::new((void*)p, boost_container_new_t()) T(::boost::forward<Args>(args)...); }
+ #else // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ public:
+
+ #define BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL(N) \
+ template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+ BOOST_CONTAINER_FORCEINLINE static void construct(Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ static const bool value = ::boost::move_detail::and_ \
+ < dtl::is_not_std_allocator<Allocator> \
+ , boost::container::dtl::has_member_function_callable_with_construct \
+ < Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_FWD_T##N > \
+ >::value; \
+ dtl::bool_<value> flag;\
+ (priv_construct)(flag, a, p BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL)
+ #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_CONSTRUCT_IMPL
+
+ private:
+ /////////////////////////////////
+ // priv_construct
+ /////////////////////////////////
+ #define BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL(N) \
+ template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+ BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::true_type, Allocator &a, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { a.construct( p BOOST_MOVE_I##N BOOST_MOVE_FWD##N ); }\
+ \
+ template<class T BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+ BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { ::new((void*)p, boost_container_new_t()) T(BOOST_MOVE_FWD##N); }\
+ //
+ BOOST_MOVE_ITERATE_0TO8(BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL)
+ #undef BOOST_CONTAINER_ALLOCATOR_TRAITS_PRIV_CONSTRUCT_IMPL
+
+ #endif // #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template<class T>
+ BOOST_CONTAINER_FORCEINLINE static void priv_construct(dtl::false_type, Allocator &, T *p, const ::boost::container::default_init_t&)
+ { ::new((void*)p, boost_container_new_t()) T; }
+
+ BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::true_type, const Allocator &a, pointer p)
+ { return a.storage_is_unpropagable(p); }
+
+ BOOST_CONTAINER_FORCEINLINE static bool priv_storage_is_unpropagable(dtl::false_type, const Allocator &, pointer)
+ { return false; }
+
+ BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::true_type, const Allocator &, const Allocator &)
+ { return true; }
+
+ BOOST_CONTAINER_FORCEINLINE static bool priv_equal(dtl::false_type, const Allocator &a, const Allocator &b)
+ { return a == b; }
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+};
+
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // ! defined(BOOST_CONTAINER_ALLOCATOR_ALLOCATOR_TRAITS_HPP)
diff --git a/src/third_party/boost-1.68.0/boost/container/container_fwd.hpp b/src/third_party/boost-1.69.0/boost/container/container_fwd.hpp
index e4fe6f85c37..e4fe6f85c37 100644
--- a/src/third_party/boost-1.68.0/boost/container/container_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/container_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/deque.hpp b/src/third_party/boost-1.69.0/boost/container/deque.hpp
new file mode 100644
index 00000000000..35cea2fd935
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/deque.hpp
@@ -0,0 +1,2270 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_DEQUE_HPP
+#define BOOST_CONTAINER_DEQUE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+// container
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+#include <boost/container/throw_exception.hpp>
+// container/detail
+#include <boost/container/detail/advanced_insert_int.hpp>
+#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
+#include <boost/container/detail/alloc_helpers.hpp>
+#include <boost/container/detail/copy_move_algo.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/container/detail/min_max.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/container/detail/type_traits.hpp>
+// move
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/iterator.hpp>
+#include <boost/move/traits.hpp>
+#include <boost/move/utility_core.hpp>
+// move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/detail/move_helpers.hpp>
+// other
+#include <boost/assert.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+// std
+#include <cstddef>
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class T, class Allocator>
+class deque;
+
+template <class T>
+struct deque_value_traits
+{
+ typedef T value_type;
+ static const bool trivial_dctr = dtl::is_trivially_destructible<value_type>::value;
+ static const bool trivial_dctr_after_move = ::boost::has_trivial_destructor_after_move<value_type>::value;
+};
+
+// Note: this function is simply a kludge to work around several compilers'
+// bugs in handling constant expressions.
+template<class T>
+struct deque_buf_size
+{
+ static const std::size_t min_size = 512u;
+ static const std::size_t sizeof_t = sizeof(T);
+ static const std::size_t value = sizeof_t < min_size ? (min_size/sizeof_t) : std::size_t(1);
+};
+
+namespace dtl {
+
+// Class invariants:
+// For any nonsingular iterator i:
+// i.node is the address of an element in the map array. The
+// contents of i.node is a pointer to the beginning of a node.
+// i.first == //(i.node)
+// i.last == i.first + node_size
+// i.cur is a pointer in the range [i.first, i.last). NOTE:
+// the implication of this is that i.cur is always a dereferenceable
+// pointer, even if i is a past-the-end iterator.
+// Start and Finish are always nonsingular iterators. NOTE: this means
+// that an empty deque must have one node, and that a deque
+// with N elements, where N is the buffer size, must have two nodes.
+// For every node other than start.node and finish.node, every element
+// in the node is an initialized object. If start.node == finish.node,
+// then [start.cur, finish.cur) are initialized objects, and
+// the elements outside that range are uninitialized storage. Otherwise,
+// [start.cur, start.last) and [finish.first, finish.cur) are initialized
+// objects, and [start.first, start.cur) and [finish.cur, finish.last)
+// are uninitialized storage.
+// [map, map + map_size) is a valid, non-empty range.
+// [start.node, finish.node] is a valid range contained within
+// [map, map + map_size).
+// A pointer in the range [map, map + map_size) points to an allocated node
+// if and only if the pointer is in the range [start.node, finish.node].
+template<class Pointer, bool IsConst>
+class deque_iterator
+{
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef typename boost::intrusive::pointer_traits<Pointer>::element_type value_type;
+ typedef typename boost::intrusive::pointer_traits<Pointer>::difference_type difference_type;
+ typedef typename if_c
+ < IsConst
+ , typename boost::intrusive::pointer_traits<Pointer>::template
+ rebind_pointer<const value_type>::type
+ , Pointer
+ >::type pointer;
+ typedef typename if_c
+ < IsConst
+ , const value_type&
+ , value_type&
+ >::type reference;
+
+ static std::size_t s_buffer_size()
+ { return deque_buf_size<value_type>::value; }
+
+ typedef Pointer val_alloc_ptr;
+ typedef typename boost::intrusive::pointer_traits<Pointer>::
+ template rebind_pointer<Pointer>::type index_pointer;
+
+ Pointer m_cur;
+ Pointer m_first;
+ Pointer m_last;
+ index_pointer m_node;
+
+ public:
+
+ Pointer get_cur() const { return m_cur; }
+ Pointer get_first() const { return m_first; }
+ Pointer get_last() const { return m_last; }
+ index_pointer get_node() const { return m_node; }
+
+ deque_iterator(val_alloc_ptr x, index_pointer y) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_cur(x), m_first(*y), m_last(*y + s_buffer_size()), m_node(y)
+ {}
+
+ deque_iterator() BOOST_NOEXCEPT_OR_NOTHROW
+ : m_cur(), m_first(), m_last(), m_node() //Value initialization to achieve "null iterators" (N3644)
+ {}
+
+ deque_iterator(deque_iterator<Pointer, false> const& x) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_cur(x.get_cur()), m_first(x.get_first()), m_last(x.get_last()), m_node(x.get_node())
+ {}
+
+ deque_iterator(Pointer cur, Pointer first, Pointer last, index_pointer node) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_cur(cur), m_first(first), m_last(last), m_node(node)
+ {}
+
+ deque_iterator<Pointer, false> unconst() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ return deque_iterator<Pointer, false>(this->get_cur(), this->get_first(), this->get_last(), this->get_node());
+ }
+
+ reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this->m_cur; }
+
+ pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->m_cur; }
+
+ difference_type operator-(const deque_iterator& x) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if(!this->m_cur && !x.m_cur){
+ return 0;
+ }
+ return difference_type(this->s_buffer_size()) * (this->m_node - x.m_node - 1) +
+ (this->m_cur - this->m_first) + (x.m_last - x.m_cur);
+ }
+
+ deque_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ ++this->m_cur;
+ if (this->m_cur == this->m_last) {
+ this->priv_set_node(this->m_node + 1);
+ this->m_cur = this->m_first;
+ }
+ return *this;
+ }
+
+ deque_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ deque_iterator tmp(*this);
+ ++*this;
+ return tmp;
+ }
+
+ deque_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if (this->m_cur == this->m_first) {
+ this->priv_set_node(this->m_node - 1);
+ this->m_cur = this->m_last;
+ }
+ --this->m_cur;
+ return *this;
+ }
+
+ deque_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ deque_iterator tmp(*this);
+ --*this;
+ return tmp;
+ }
+
+ deque_iterator& operator+=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ difference_type offset = n + (this->m_cur - this->m_first);
+ if (offset >= 0 && offset < difference_type(this->s_buffer_size()))
+ this->m_cur += n;
+ else {
+ difference_type node_offset =
+ offset > 0 ? offset / difference_type(this->s_buffer_size())
+ : -difference_type((-offset - 1) / this->s_buffer_size()) - 1;
+ this->priv_set_node(this->m_node + node_offset);
+ this->m_cur = this->m_first +
+ (offset - node_offset * difference_type(this->s_buffer_size()));
+ }
+ return *this;
+ }
+
+ deque_iterator operator+(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ { deque_iterator tmp(*this); return tmp += n; }
+
+ deque_iterator& operator-=(difference_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this += -n; }
+
+ deque_iterator operator-(difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ { deque_iterator tmp(*this); return tmp -= n; }
+
+ reference operator[](difference_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return *(*this + n); }
+
+ friend bool operator==(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_cur == r.m_cur; }
+
+ friend bool operator!=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_cur != r.m_cur; }
+
+ friend bool operator<(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return (l.m_node == r.m_node) ? (l.m_cur < r.m_cur) : (l.m_node < r.m_node); }
+
+ friend bool operator>(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return r < l; }
+
+ friend bool operator<=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return !(r < l); }
+
+ friend bool operator>=(const deque_iterator& l, const deque_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return !(l < r); }
+
+ void priv_set_node(index_pointer new_node) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ this->m_node = new_node;
+ this->m_first = *new_node;
+ this->m_last = this->m_first + this->s_buffer_size();
+ }
+
+ friend deque_iterator operator+(difference_type n, deque_iterator x) BOOST_NOEXCEPT_OR_NOTHROW
+ { return x += n; }
+};
+
+} //namespace dtl {
+
+// Deque base class. It has two purposes. First, its constructor
+// and destructor allocate (but don't initialize) storage. This makes
+// exception safety easier.
+template <class Allocator>
+class deque_base
+{
+ BOOST_COPYABLE_AND_MOVABLE(deque_base)
+ public:
+ typedef allocator_traits<Allocator> val_alloc_traits_type;
+ typedef typename val_alloc_traits_type::value_type val_alloc_val;
+ typedef typename val_alloc_traits_type::pointer val_alloc_ptr;
+ typedef typename val_alloc_traits_type::const_pointer val_alloc_cptr;
+ typedef typename val_alloc_traits_type::reference val_alloc_ref;
+ typedef typename val_alloc_traits_type::const_reference val_alloc_cref;
+ typedef typename val_alloc_traits_type::difference_type val_alloc_diff;
+ typedef typename val_alloc_traits_type::size_type val_alloc_size;
+ typedef typename val_alloc_traits_type::template
+ portable_rebind_alloc<val_alloc_ptr>::type ptr_alloc_t;
+ typedef allocator_traits<ptr_alloc_t> ptr_alloc_traits_type;
+ typedef typename ptr_alloc_traits_type::value_type ptr_alloc_val;
+ typedef typename ptr_alloc_traits_type::pointer ptr_alloc_ptr;
+ typedef typename ptr_alloc_traits_type::const_pointer ptr_alloc_cptr;
+ typedef typename ptr_alloc_traits_type::reference ptr_alloc_ref;
+ typedef typename ptr_alloc_traits_type::const_reference ptr_alloc_cref;
+ typedef Allocator allocator_type;
+ typedef allocator_type stored_allocator_type;
+ typedef val_alloc_size size_type;
+
+ protected:
+
+ typedef deque_value_traits<val_alloc_val> traits_t;
+ typedef ptr_alloc_t map_allocator_type;
+
+ static size_type s_buffer_size() BOOST_NOEXCEPT_OR_NOTHROW
+ { return deque_buf_size<val_alloc_val>::value; }
+
+ val_alloc_ptr priv_allocate_node()
+ { return this->alloc().allocate(s_buffer_size()); }
+
+ void priv_deallocate_node(val_alloc_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->alloc().deallocate(p, s_buffer_size()); }
+
+ ptr_alloc_ptr priv_allocate_map(size_type n)
+ { return this->ptr_alloc().allocate(n); }
+
+ void priv_deallocate_map(ptr_alloc_ptr p, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->ptr_alloc().deallocate(p, n); }
+
+ typedef dtl::deque_iterator<val_alloc_ptr, false> iterator;
+ typedef dtl::deque_iterator<val_alloc_ptr, true > const_iterator;
+
+ deque_base(size_type num_elements, const allocator_type& a)
+ : members_(a)
+ { this->priv_initialize_map(num_elements); }
+
+ explicit deque_base(const allocator_type& a)
+ : members_(a)
+ {}
+
+ deque_base()
+ : members_()
+ {}
+
+ explicit deque_base(BOOST_RV_REF(deque_base) x)
+ : members_( boost::move(x.ptr_alloc())
+ , boost::move(x.alloc()) )
+ {}
+
+ ~deque_base()
+ {
+ if (this->members_.m_map) {
+ this->priv_destroy_nodes(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1);
+ this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size);
+ }
+ }
+
+ private:
+ deque_base(const deque_base&);
+
+ protected:
+
+ void swap_members(deque_base &x) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ ::boost::adl_move_swap(this->members_.m_start, x.members_.m_start);
+ ::boost::adl_move_swap(this->members_.m_finish, x.members_.m_finish);
+ ::boost::adl_move_swap(this->members_.m_map, x.members_.m_map);
+ ::boost::adl_move_swap(this->members_.m_map_size, x.members_.m_map_size);
+ }
+
+ void priv_initialize_map(size_type num_elements)
+ {
+// if(num_elements){
+ size_type num_nodes = num_elements / s_buffer_size() + 1;
+
+ this->members_.m_map_size = dtl::max_value((size_type) InitialMapSize, num_nodes + 2);
+ this->members_.m_map = this->priv_allocate_map(this->members_.m_map_size);
+
+ ptr_alloc_ptr nstart = this->members_.m_map + (this->members_.m_map_size - num_nodes) / 2;
+ ptr_alloc_ptr nfinish = nstart + num_nodes;
+
+ BOOST_TRY {
+ this->priv_create_nodes(nstart, nfinish);
+ }
+ BOOST_CATCH(...){
+ this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size);
+ this->members_.m_map = 0;
+ this->members_.m_map_size = 0;
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+
+ this->members_.m_start.priv_set_node(nstart);
+ this->members_.m_finish.priv_set_node(nfinish - 1);
+ this->members_.m_start.m_cur = this->members_.m_start.m_first;
+ this->members_.m_finish.m_cur = this->members_.m_finish.m_first +
+ num_elements % s_buffer_size();
+// }
+ }
+
+ void priv_create_nodes(ptr_alloc_ptr nstart, ptr_alloc_ptr nfinish)
+ {
+ ptr_alloc_ptr cur = nstart;
+ BOOST_TRY {
+ for (; cur < nfinish; ++cur)
+ *cur = this->priv_allocate_node();
+ }
+ BOOST_CATCH(...){
+ this->priv_destroy_nodes(nstart, cur);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ void priv_destroy_nodes(ptr_alloc_ptr nstart, ptr_alloc_ptr nfinish) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ for (ptr_alloc_ptr n = nstart; n < nfinish; ++n)
+ this->priv_deallocate_node(*n);
+ }
+
+ void priv_clear_map() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if (this->members_.m_map) {
+ this->priv_destroy_nodes(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1);
+ this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size);
+ this->members_.m_map = 0;
+ this->members_.m_map_size = 0;
+ this->members_.m_start = iterator();
+ this->members_.m_finish = this->members_.m_start;
+ }
+ }
+
+ enum { InitialMapSize = 8 };
+
+ protected:
+ struct members_holder
+ : public ptr_alloc_t
+ , public allocator_type
+ {
+ members_holder()
+ : map_allocator_type(), allocator_type()
+ , m_map(0), m_map_size(0)
+ , m_start(), m_finish(m_start)
+ {}
+
+ explicit members_holder(const allocator_type &a)
+ : map_allocator_type(a), allocator_type(a)
+ , m_map(0), m_map_size(0)
+ , m_start(), m_finish(m_start)
+ {}
+
+ template<class ValAllocConvertible, class PtrAllocConvertible>
+ members_holder(BOOST_FWD_REF(PtrAllocConvertible) pa, BOOST_FWD_REF(ValAllocConvertible) va)
+ : map_allocator_type(boost::forward<PtrAllocConvertible>(pa))
+ , allocator_type (boost::forward<ValAllocConvertible>(va))
+ , m_map(0), m_map_size(0)
+ , m_start(), m_finish(m_start)
+ {}
+
+ ptr_alloc_ptr m_map;
+ val_alloc_size m_map_size;
+ iterator m_start;
+ iterator m_finish;
+ } members_;
+
+ ptr_alloc_t &ptr_alloc() BOOST_NOEXCEPT_OR_NOTHROW
+ { return members_; }
+
+ const ptr_alloc_t &ptr_alloc() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return members_; }
+
+ allocator_type &alloc() BOOST_NOEXCEPT_OR_NOTHROW
+ { return members_; }
+
+ const allocator_type &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return members_; }
+};
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+//! A double-ended queue is a sequence that supports random access to elements, constant time insertion
+//! and removal of elements at the end of the sequence, and linear time insertion and removal of elements in the middle.
+//!
+//! \tparam T The type of object that is stored in the deque
+//! \tparam Allocator The allocator used for all internal memory management
+template <class T, class Allocator = new_allocator<T> >
+#else
+template <class T, class Allocator>
+#endif
+class deque : protected deque_base<Allocator>
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ typedef deque_base<Allocator> Base;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+
+ typedef T value_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(typename Base::iterator) iterator;
+ typedef BOOST_CONTAINER_IMPDEF(typename Base::const_iterator) const_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ private: // Internal typedefs
+ BOOST_COPYABLE_AND_MOVABLE(deque)
+ typedef typename Base::ptr_alloc_ptr index_pointer;
+ static size_type s_buffer_size()
+ { return Base::s_buffer_size(); }
+ typedef allocator_traits<Allocator> allocator_traits_type;
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructors a deque.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ deque() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : Base()
+ {}
+
+ //! <b>Effects</b>: Constructs a deque taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ explicit deque(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
+ : Base(a)
+ {}
+
+ //! <b>Effects</b>: Constructs a deque
+ //! and inserts n value initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's value initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit deque(size_type n)
+ : Base(n, allocator_type())
+ {
+ dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
+ proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
+ //deque_base will deallocate in case of exception...
+ }
+
+ //! <b>Effects</b>: Constructs a deque
+ //! and inserts n default initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default initialization or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ deque(size_type n, default_init_t)
+ : Base(n, allocator_type())
+ {
+ dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
+ proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
+ //deque_base will deallocate in case of exception...
+ }
+
+ //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
+ //! and inserts n value initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's value initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit deque(size_type n, const allocator_type &a)
+ : Base(n, a)
+ {
+ dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
+ proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
+ //deque_base will deallocate in case of exception...
+ }
+
+ //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
+ //! and inserts n default initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default initialization or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ deque(size_type n, default_init_t, const allocator_type &a)
+ : Base(n, a)
+ {
+ dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
+ proxy.uninitialized_copy_n_and_update(this->alloc(), this->begin(), n);
+ //deque_base will deallocate in case of exception...
+ }
+
+ //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ deque(size_type n, const value_type& value)
+ : Base(n, allocator_type())
+ { this->priv_fill_initialize(value); }
+
+ //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ deque(size_type n, const value_type& value, const allocator_type& a)
+ : Base(n, a)
+ { this->priv_fill_initialize(value); }
+
+ //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
+ //! and inserts a copy of the range [first, last) in the deque.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced InIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [first, last).
+ template <class InIt>
+ deque(InIt first, InIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_convertible
+ <InIt, size_type>::type * = 0
+ #endif
+ )
+ : Base(allocator_type())
+ {
+ this->priv_range_initialize(first, last);
+ }
+
+ //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
+ //! and inserts a copy of the range [first, last) in the deque.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced InIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [first, last).
+ template <class InIt>
+ deque(InIt first, InIt last, const allocator_type& a
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_convertible
+ <InIt, size_type>::type * = 0
+ #endif
+ )
+ : Base(a)
+ {
+ this->priv_range_initialize(first, last);
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs a deque that will use a copy of allocator a
+ //! and inserts a copy of the range [il.begin(), il.end()) in the deque.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
+ deque(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
+ : Base(a)
+ {
+ this->priv_range_initialize(il.begin(), il.end());
+ }
+#endif
+
+ //! <b>Effects</b>: Copy constructs a deque.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ deque(const deque& x)
+ : Base(allocator_traits_type::select_on_container_copy_construction(x.alloc()))
+ {
+ if(x.size()){
+ this->priv_initialize_map(x.size());
+ boost::container::uninitialized_copy_alloc
+ (this->alloc(), x.begin(), x.end(), this->members_.m_start);
+ }
+ }
+
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ deque(BOOST_RV_REF(deque) x) BOOST_NOEXCEPT_OR_NOTHROW
+ : Base(BOOST_MOVE_BASE(Base, x))
+ { this->swap_members(x); }
+
+ //! <b>Effects</b>: Copy constructs a vector using the specified allocator.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocation
+ //! throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ deque(const deque& x, const allocator_type &a)
+ : Base(a)
+ {
+ if(x.size()){
+ this->priv_initialize_map(x.size());
+ boost::container::uninitialized_copy_alloc
+ (this->alloc(), x.begin(), x.end(), this->members_.m_start);
+ }
+ }
+
+ //! <b>Effects</b>: Move constructor using the specified allocator.
+ //! Moves x's resources to *this if a == allocator_type().
+ //! Otherwise copies values from x to *this.
+ //!
+ //! <b>Throws</b>: If allocation or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
+ deque(BOOST_RV_REF(deque) x, const allocator_type &a)
+ : Base(a)
+ {
+ if(x.alloc() == a){
+ this->swap_members(x);
+ }
+ else{
+ if(x.size()){
+ this->priv_initialize_map(x.size());
+ boost::container::uninitialized_copy_alloc
+ ( this->alloc(), boost::make_move_iterator(x.begin())
+ , boost::make_move_iterator(x.end()), this->members_.m_start);
+ }
+ }
+ }
+
+ //! <b>Effects</b>: Destroys the deque. All stored values are destroyed
+ //! and used memory is deallocated.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements.
+ ~deque() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ this->priv_destroy_range(this->members_.m_start, this->members_.m_finish);
+ }
+
+ //! <b>Effects</b>: Makes *this contain the same elements as x.
+ //!
+ //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
+ //! of each of x's elements.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in x.
+ deque& operator= (BOOST_COPY_ASSIGN_REF(deque) x)
+ {
+ if (&x != this){
+ allocator_type &this_alloc = this->alloc();
+ const allocator_type &x_alloc = x.alloc();
+ dtl::bool_<allocator_traits_type::
+ propagate_on_container_copy_assignment::value> flag;
+ if(flag && this_alloc != x_alloc){
+ this->clear();
+ this->shrink_to_fit();
+ }
+ dtl::assign_alloc(this->alloc(), x.alloc(), flag);
+ dtl::assign_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
+ this->assign(x.cbegin(), x.cend());
+ }
+ return *this;
+ }
+
+ //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ deque& operator= (BOOST_RV_REF(deque) x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ BOOST_ASSERT(this != &x);
+ allocator_type &this_alloc = this->alloc();
+ allocator_type &x_alloc = x.alloc();
+ const bool propagate_alloc = allocator_traits_type::
+ propagate_on_container_move_assignment::value;
+ dtl::bool_<propagate_alloc> flag;
+ const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
+ //Resources can be transferred if both allocators are
+ //going to be equal after this function (either propagated or already equal)
+ if(propagate_alloc || allocators_equal){
+ //Destroy objects but retain memory in case x reuses it in the future
+ this->clear();
+ //Move allocator if needed
+ dtl::move_alloc(this_alloc, x_alloc, flag);
+ dtl::move_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
+ //Nothrow swap
+ this->swap_members(x);
+ }
+ //Else do a one by one move
+ else{
+ this->assign( boost::make_move_iterator(x.begin())
+ , boost::make_move_iterator(x.end()));
+ }
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Makes *this contain the same elements as il.
+ //!
+ //! <b>Postcondition</b>: this->size() == il.size(). *this contains a copy
+ //! of each of x's elements.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in il.
+ deque& operator=(std::initializer_list<value_type> il)
+ {
+ this->assign(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ //! <b>Effects</b>: Assigns the n copies of val to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ void assign(size_type n, const T& val)
+ {
+ typedef constant_iterator<value_type, difference_type> c_it;
+ this->assign(c_it(val, n), c_it());
+ }
+
+ //! <b>Effects</b>: Assigns the the range [first, last) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing InIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ template <class InIt>
+ void assign(InIt first, InIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<InIt, size_type>
+ , dtl::is_not_input_iterator<InIt>
+ >::type * = 0
+ #endif
+ )
+ {
+ iterator cur = this->begin();
+ for ( ; first != last && cur != end(); ++cur, ++first){
+ *cur = *first;
+ }
+ if (first == last){
+ this->erase(cur, this->cend());
+ }
+ else{
+ this->insert(this->cend(), first, last);
+ }
+ }
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class FwdIt>
+ void assign(FwdIt first, FwdIt last
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<FwdIt, size_type>
+ , dtl::is_input_iterator<FwdIt>
+ >::type * = 0
+ )
+ {
+ const size_type len = boost::container::iterator_distance(first, last);
+ if (len > size()) {
+ FwdIt mid = first;
+ boost::container::iterator_advance(mid, this->size());
+ boost::container::copy(first, mid, begin());
+ this->insert(this->cend(), mid, last);
+ }
+ else{
+ this->erase(boost::container::copy(first, last, this->begin()), cend());
+ }
+ }
+ #endif
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to il.size().
+ void assign(std::initializer_list<value_type> il)
+ { this->assign(il.begin(), il.end()); }
+#endif
+
+ //! <b>Effects</b>: Returns a copy of the internal allocator.
+ //!
+ //! <b>Throws</b>: If allocator's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return Base::alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return Base::alloc(); }
+
+ //////////////////////////////////////////////
+ //
+ // iterators
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ { return Base::alloc(); }
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->members_.m_start; }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->members_.m_start; }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->members_.m_finish; }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->members_.m_finish; }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(this->members_.m_finish); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->members_.m_finish); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(this->members_.m_start); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->members_.m_start); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->members_.m_start; }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->members_.m_finish; }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->members_.m_finish); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->members_.m_start); }
+
+ //////////////////////////////////////////////
+ //
+ // capacity
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns true if the deque contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->members_.m_finish == this->members_.m_start; }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->members_.m_finish - this->members_.m_start; }
+
+ //! <b>Effects</b>: Returns the largest possible size of the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return allocator_traits_type::max_size(this->alloc()); }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are value initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type new_size)
+ {
+ const size_type len = size();
+ if (new_size < len)
+ this->priv_erase_last_n(len - new_size);
+ else{
+ const size_type n = new_size - this->size();
+ dtl::insert_value_initialized_n_proxy<Allocator, iterator> proxy;
+ priv_insert_back_aux_impl(n, proxy);
+ }
+ }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are default initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ void resize(size_type new_size, default_init_t)
+ {
+ const size_type len = size();
+ if (new_size < len)
+ this->priv_erase_last_n(len - new_size);
+ else{
+ const size_type n = new_size - this->size();
+ dtl::insert_default_initialized_n_proxy<Allocator, iterator> proxy;
+ priv_insert_back_aux_impl(n, proxy);
+ }
+ }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are copy constructed from x.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type new_size, const value_type& x)
+ {
+ const size_type len = size();
+ if (new_size < len)
+ this->erase(this->members_.m_start + new_size, this->members_.m_finish);
+ else
+ this->insert(this->members_.m_finish, new_size - len, x);
+ }
+
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ //! with previous allocations. The size of the deque is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ void shrink_to_fit()
+ {
+ //This deque implementation already
+ //deallocates excess nodes when erasing
+ //so there is nothing to do except for
+ //empty deque
+ if(this->empty()){
+ this->priv_clear_map();
+ }
+ }
+
+ //////////////////////////////////////////////
+ //
+ // element access
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the first
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference front() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->members_.m_start;
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->members_.m_start;
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the last
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *(end()-1);
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the last
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *(cend()-1);
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() > n);
+ return this->members_.m_start[difference_type(n)];
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() > n);
+ return this->members_.m_start[difference_type(n)];
+ }
+
+ //! <b>Requires</b>: size() >= n.
+ //!
+ //! <b>Effects</b>: Returns an iterator to the nth element
+ //! from the beginning of the container. Returns end()
+ //! if n == size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() >= n);
+ return iterator(this->begin()+n);
+ }
+
+ //! <b>Requires</b>: size() >= n.
+ //!
+ //! <b>Effects</b>: Returns a const_iterator to the nth element
+ //! from the beginning of the container. Returns end()
+ //! if n == size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() >= n);
+ return const_iterator(this->cbegin()+n);
+ }
+
+ //! <b>Requires</b>: begin() <= p <= end().
+ //!
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ //Range checked priv_index_of
+ return this->priv_index_of(p);
+ }
+
+ //! <b>Requires</b>: begin() <= p <= end().
+ //!
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ //Range checked priv_index_of
+ return this->priv_index_of(p);
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: std::range_error if n >= size()
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference at(size_type n)
+ {
+ this->priv_throw_if_out_of_range(n);
+ return (*this)[n];
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: std::range_error if n >= size()
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference at(size_type n) const
+ {
+ this->priv_throw_if_out_of_range(n);
+ return (*this)[n];
+ }
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the beginning of the deque.
+ //!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time
+ template <class... Args>
+ reference emplace_front(BOOST_FWD_REF(Args)... args)
+ {
+ if(this->priv_push_front_simple_available()){
+ reference r = *this->priv_push_front_simple_pos();
+ allocator_traits_type::construct
+ ( this->alloc()
+ , this->priv_push_front_simple_pos()
+ , boost::forward<Args>(args)...);
+ this->priv_push_front_simple_commit();
+ return r;
+ }
+ else{
+ typedef dtl::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
+ return *this->priv_insert_front_aux_impl(1, type(boost::forward<Args>(args)...));
+ }
+ }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the end of the deque.
+ //!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time
+ template <class... Args>
+ reference emplace_back(BOOST_FWD_REF(Args)... args)
+ {
+ if(this->priv_push_back_simple_available()){
+ reference r = *this->priv_push_back_simple_pos();
+ allocator_traits_type::construct
+ ( this->alloc()
+ , this->priv_push_back_simple_pos()
+ , boost::forward<Args>(args)...);
+ this->priv_push_back_simple_commit();
+ return r;
+ }
+ else{
+ typedef dtl::insert_nonmovable_emplace_proxy<Allocator, iterator, Args...> type;
+ return *this->priv_insert_back_aux_impl(1, type(boost::forward<Args>(args)...));
+ }
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... before p
+ //!
+ //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: If p is end(), amortized constant time
+ //! Linear time otherwise.
+ template <class... Args>
+ iterator emplace(const_iterator p, BOOST_FWD_REF(Args)... args)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ if(p == this->cbegin()){
+ this->emplace_front(boost::forward<Args>(args)...);
+ return this->begin();
+ }
+ else if(p == this->cend()){
+ this->emplace_back(boost::forward<Args>(args)...);
+ return (this->end()-1);
+ }
+ else{
+ typedef dtl::insert_emplace_proxy<Allocator, iterator, Args...> type;
+ return this->priv_insert_aux_impl(p, 1, type(boost::forward<Args>(args)...));
+ }
+ }
+
+ #else //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_DEQUE_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
+ reference emplace_front(BOOST_MOVE_UREF##N)\
+ {\
+ if(priv_push_front_simple_available()){\
+ reference r = *this->priv_push_front_simple_pos();\
+ allocator_traits_type::construct\
+ ( this->alloc(), this->priv_push_front_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ priv_push_front_simple_commit();\
+ return r;\
+ }\
+ else{\
+ typedef dtl::insert_nonmovable_emplace_proxy##N\
+ <Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
+ return *priv_insert_front_aux_impl(1, type(BOOST_MOVE_FWD##N));\
+ }\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
+ reference emplace_back(BOOST_MOVE_UREF##N)\
+ {\
+ if(priv_push_back_simple_available()){\
+ reference r = *this->priv_push_back_simple_pos();\
+ allocator_traits_type::construct\
+ ( this->alloc(), this->priv_push_back_simple_pos() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ priv_push_back_simple_commit();\
+ return r;\
+ }\
+ else{\
+ typedef dtl::insert_nonmovable_emplace_proxy##N\
+ <Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
+ return *priv_insert_back_aux_impl(1, type(BOOST_MOVE_FWD##N));\
+ }\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N\
+ iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ BOOST_ASSERT(this->priv_in_range_or_end(p));\
+ if(p == this->cbegin()){\
+ this->emplace_front(BOOST_MOVE_FWD##N);\
+ return this->begin();\
+ }\
+ else if(p == cend()){\
+ this->emplace_back(BOOST_MOVE_FWD##N);\
+ return (--this->end());\
+ }\
+ else{\
+ typedef dtl::insert_emplace_proxy_arg##N\
+ <Allocator, iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
+ return this->priv_insert_aux_impl(p, 1, type(BOOST_MOVE_FWD##N));\
+ }\
+ }
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_DEQUE_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_DEQUE_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x at the front of the deque.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_front(const T &x);
+
+ //! <b>Effects</b>: Constructs a new element in the front of the deque
+ //! and moves the resources of x to this new element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_front(T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x at the end of the deque.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_back(const T &x);
+
+ //! <b>Effects</b>: Constructs a new element in the end of the deque
+ //! and moves the resources of x to this new element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_back(T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of x before p.
+ //!
+ //! <b>Returns</b>: an iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: If p is end(), amortized constant time
+ //! Linear time otherwise.
+ iterator insert(const_iterator p, const T &x);
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a new element before p with x's resources.
+ //!
+ //! <b>Returns</b>: an iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: If p is end(), amortized constant time
+ //! Linear time otherwise.
+ iterator insert(const_iterator p, T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: pos must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert n copies of x before pos.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or pos if n is 0.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ iterator insert(const_iterator pos, size_type n, const value_type& x)
+ {
+ //Range check of p is done by insert()
+ typedef constant_iterator<value_type, difference_type> c_it;
+ return this->insert(pos, c_it(x, n), c_it());
+ }
+
+ //! <b>Requires</b>: pos must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or pos if first == last.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced InIt throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to distance [first, last).
+ template <class InIt>
+ iterator insert(const_iterator pos, InIt first, InIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<InIt, size_type>
+ , dtl::is_not_input_iterator<InIt>
+ >::type * = 0
+ #endif
+ )
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));
+ size_type n = 0;
+ iterator it(pos.unconst());
+ for(;first != last; ++first, ++n){
+ it = this->emplace(it, *first);
+ ++it;
+ }
+ it -= n;
+ return it;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Requires</b>: pos must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before pos.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or pos if il.begin() == il.end().
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced std::initializer_list throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to distance [il.begin(), il.end()).
+ iterator insert(const_iterator pos, std::initializer_list<value_type> il)
+ {
+ //Range check os pos is done in insert()
+ return insert(pos, il.begin(), il.end());
+ }
+#endif
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class FwdIt>
+ iterator insert(const_iterator p, FwdIt first, FwdIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<FwdIt, size_type>
+ , dtl::is_input_iterator<FwdIt>
+ >::type * = 0
+ #endif
+ )
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ dtl::insert_range_proxy<Allocator, FwdIt, iterator> proxy(first);
+ return priv_insert_aux_impl(p, boost::container::iterator_distance(first, last), proxy);
+ }
+ #endif
+
+ //! <b>Effects</b>: Removes the first element from the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ void pop_front() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ if (this->members_.m_start.m_cur != this->members_.m_start.m_last - 1) {
+ allocator_traits_type::destroy
+ ( this->alloc()
+ , boost::movelib::to_raw_pointer(this->members_.m_start.m_cur)
+ );
+ ++this->members_.m_start.m_cur;
+ }
+ else
+ this->priv_pop_front_aux();
+ }
+
+ //! <b>Effects</b>: Removes the last element from the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ if (this->members_.m_finish.m_cur != this->members_.m_finish.m_first) {
+ --this->members_.m_finish.m_cur;
+ allocator_traits_type::destroy
+ ( this->alloc()
+ , boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur)
+ );
+ }
+ else
+ this->priv_pop_back_aux();
+ }
+
+ //! <b>Effects</b>: Erases the element at p.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements between pos and the
+ //! last element (if pos is near the end) or the first element
+ //! if(pos is near the beginning).
+ //! Constant if pos is the first or the last element.
+ iterator erase(const_iterator pos) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->priv_in_range(pos));
+ iterator next = pos.unconst();
+ ++next;
+ size_type index = pos - this->members_.m_start;
+ if (index < (this->size()/2)) {
+ boost::container::move_backward(this->begin(), pos.unconst(), next);
+ pop_front();
+ }
+ else {
+ boost::container::move(next, this->end(), pos.unconst());
+ pop_back();
+ }
+ return this->members_.m_start + index;
+ }
+
+ //! <b>Effects</b>: Erases the elements pointed by [first, last).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the distance between first and
+ //! last plus the elements between pos and the
+ //! last element (if pos is near the end) or the first element
+ //! if(pos is near the beginning).
+ iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(first == last ||
+ (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last)));
+ if (first == this->members_.m_start && last == this->members_.m_finish) {
+ this->clear();
+ return this->members_.m_finish;
+ }
+ else {
+ const size_type n = static_cast<size_type>(last - first);
+ const size_type elems_before = static_cast<size_type>(first - this->members_.m_start);
+ if (elems_before < (this->size() - n) - elems_before) {
+ boost::container::move_backward(begin(), first.unconst(), last.unconst());
+ iterator new_start = this->members_.m_start + n;
+ this->priv_destroy_range(this->members_.m_start, new_start);
+ this->priv_destroy_nodes(this->members_.m_start.m_node, new_start.m_node);
+ this->members_.m_start = new_start;
+ }
+ else {
+ boost::container::move(last.unconst(), end(), first.unconst());
+ iterator new_finish = this->members_.m_finish - n;
+ this->priv_destroy_range(new_finish, this->members_.m_finish);
+ this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1);
+ this->members_.m_finish = new_finish;
+ }
+ return this->members_.m_start + elems_before;
+ }
+ }
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ void swap(deque &x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ this->swap_members(x);
+ dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
+ dtl::swap_alloc(this->alloc(), x.alloc(), flag);
+ dtl::swap_alloc(this->ptr_alloc(), x.ptr_alloc(), flag);
+ }
+
+ //! <b>Effects</b>: Erases all the elements of the deque.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the deque.
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ for (index_pointer node = this->members_.m_start.m_node + 1;
+ node < this->members_.m_finish.m_node;
+ ++node) {
+ this->priv_destroy_range(*node, *node + this->s_buffer_size());
+ this->priv_deallocate_node(*node);
+ }
+
+ if (this->members_.m_start.m_node != this->members_.m_finish.m_node) {
+ this->priv_destroy_range(this->members_.m_start.m_cur, this->members_.m_start.m_last);
+ this->priv_destroy_range(this->members_.m_finish.m_first, this->members_.m_finish.m_cur);
+ this->priv_deallocate_node(this->members_.m_finish.m_first);
+ }
+ else
+ this->priv_destroy_range(this->members_.m_start.m_cur, this->members_.m_finish.m_cur);
+
+ this->members_.m_finish = this->members_.m_start;
+ }
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const deque& x, const deque& y)
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const deque& x, const deque& y)
+ { return !(x == y); }
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const deque& x, const deque& y)
+ { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const deque& x, const deque& y)
+ { return y < x; }
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const deque& x, const deque& y)
+ { return !(y < x); }
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const deque& x, const deque& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(deque& x, deque& y)
+ { x.swap(y); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+
+ size_type priv_index_of(const_iterator p) const
+ {
+ BOOST_ASSERT(this->cbegin() <= p);
+ BOOST_ASSERT(p <= this->cend());
+ return static_cast<size_type>(p - this->cbegin());
+ }
+
+ void priv_erase_last_n(size_type n)
+ {
+ if(n == this->size()) {
+ this->clear();
+ }
+ else {
+ iterator new_finish = this->members_.m_finish - n;
+ this->priv_destroy_range(new_finish, this->members_.m_finish);
+ this->priv_destroy_nodes(new_finish.m_node + 1, this->members_.m_finish.m_node + 1);
+ this->members_.m_finish = new_finish;
+ }
+ }
+
+ void priv_throw_if_out_of_range(size_type n) const
+ {
+ if (n >= this->size())
+ throw_out_of_range("deque::at out of range");
+ }
+
+ bool priv_in_range(const_iterator pos) const
+ {
+ return (this->begin() <= pos) && (pos < this->end());
+ }
+
+ bool priv_in_range_or_end(const_iterator pos) const
+ {
+ return (this->begin() <= pos) && (pos <= this->end());
+ }
+
+ template <class U>
+ iterator priv_insert(const_iterator p, BOOST_FWD_REF(U) x)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ if (p == cbegin()){
+ this->push_front(::boost::forward<U>(x));
+ return begin();
+ }
+ else if (p == cend()){
+ this->push_back(::boost::forward<U>(x));
+ return --end();
+ }
+ else {
+ return priv_insert_aux_impl
+ ( p, (size_type)1
+ , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
+ }
+ }
+
+ template <class U>
+ void priv_push_front(BOOST_FWD_REF(U) x)
+ {
+ if(this->priv_push_front_simple_available()){
+ allocator_traits_type::construct
+ ( this->alloc(), this->priv_push_front_simple_pos(), ::boost::forward<U>(x));
+ this->priv_push_front_simple_commit();
+ }
+ else{
+ priv_insert_aux_impl
+ ( this->cbegin(), (size_type)1
+ , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
+ }
+ }
+
+ template <class U>
+ void priv_push_back(BOOST_FWD_REF(U) x)
+ {
+ if(this->priv_push_back_simple_available()){
+ allocator_traits_type::construct
+ ( this->alloc(), this->priv_push_back_simple_pos(), ::boost::forward<U>(x));
+ this->priv_push_back_simple_commit();
+ }
+ else{
+ priv_insert_aux_impl
+ ( this->cend(), (size_type)1
+ , dtl::get_insert_value_proxy<iterator, Allocator>(::boost::forward<U>(x)));
+ }
+ }
+
+ bool priv_push_back_simple_available() const
+ {
+ return this->members_.m_map &&
+ (this->members_.m_finish.m_cur != (this->members_.m_finish.m_last - 1));
+ }
+
+ T *priv_push_back_simple_pos() const
+ {
+ return boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur);
+ }
+
+ void priv_push_back_simple_commit()
+ {
+ ++this->members_.m_finish.m_cur;
+ }
+
+ bool priv_push_front_simple_available() const
+ {
+ return this->members_.m_map &&
+ (this->members_.m_start.m_cur != this->members_.m_start.m_first);
+ }
+
+ T *priv_push_front_simple_pos() const
+ { return boost::movelib::to_raw_pointer(this->members_.m_start.m_cur) - 1; }
+
+ void priv_push_front_simple_commit()
+ { --this->members_.m_start.m_cur; }
+
+ void priv_destroy_range(iterator p, iterator p2)
+ {
+ if(!Base::traits_t::trivial_dctr){
+ for(;p != p2; ++p){
+ allocator_traits_type::destroy(this->alloc(), boost::movelib::iterator_to_raw_pointer(p));
+ }
+ }
+ }
+
+ void priv_destroy_range(pointer p, pointer p2)
+ {
+ if(!Base::traits_t::trivial_dctr){
+ for(;p != p2; ++p){
+ allocator_traits_type::destroy(this->alloc(), boost::movelib::iterator_to_raw_pointer(p));
+ }
+ }
+ }
+
+ template<class InsertProxy>
+ iterator priv_insert_aux_impl(const_iterator p, size_type n, InsertProxy proxy)
+ {
+ iterator pos(p.unconst());
+ const size_type pos_n = p - this->cbegin();
+ if(!this->members_.m_map){
+ this->priv_initialize_map(0);
+ pos = this->begin();
+ }
+
+ const size_type elemsbefore = static_cast<size_type>(pos - this->members_.m_start);
+ const size_type length = this->size();
+ if (elemsbefore < length / 2) {
+ const iterator new_start = this->priv_reserve_elements_at_front(n);
+ const iterator old_start = this->members_.m_start;
+ if(!elemsbefore){
+ proxy.uninitialized_copy_n_and_update(this->alloc(), new_start, n);
+ this->members_.m_start = new_start;
+ }
+ else{
+ pos = this->members_.m_start + elemsbefore;
+ if (elemsbefore >= n) {
+ const iterator start_n = this->members_.m_start + n;
+ ::boost::container::uninitialized_move_alloc
+ (this->alloc(), this->members_.m_start, start_n, new_start);
+ this->members_.m_start = new_start;
+ boost::container::move(start_n, pos, old_start);
+ proxy.copy_n_and_update(this->alloc(), pos - n, n);
+ }
+ else {
+ const size_type mid_count = n - elemsbefore;
+ const iterator mid_start = old_start - mid_count;
+ proxy.uninitialized_copy_n_and_update(this->alloc(), mid_start, mid_count);
+ this->members_.m_start = mid_start;
+ ::boost::container::uninitialized_move_alloc
+ (this->alloc(), old_start, pos, new_start);
+ this->members_.m_start = new_start;
+ proxy.copy_n_and_update(this->alloc(), old_start, elemsbefore);
+ }
+ }
+ }
+ else {
+ const iterator new_finish = this->priv_reserve_elements_at_back(n);
+ const iterator old_finish = this->members_.m_finish;
+ const size_type elemsafter = length - elemsbefore;
+ if(!elemsafter){
+ proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, n);
+ this->members_.m_finish = new_finish;
+ }
+ else{
+ pos = old_finish - elemsafter;
+ if (elemsafter >= n) {
+ iterator finish_n = old_finish - difference_type(n);
+ ::boost::container::uninitialized_move_alloc
+ (this->alloc(), finish_n, old_finish, old_finish);
+ this->members_.m_finish = new_finish;
+ boost::container::move_backward(pos, finish_n, old_finish);
+ proxy.copy_n_and_update(this->alloc(), pos, n);
+ }
+ else {
+ const size_type raw_gap = n - elemsafter;
+ ::boost::container::uninitialized_move_alloc
+ (this->alloc(), pos, old_finish, old_finish + raw_gap);
+ BOOST_TRY{
+ proxy.copy_n_and_update(this->alloc(), pos, elemsafter);
+ proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, raw_gap);
+ }
+ BOOST_CATCH(...){
+ this->priv_destroy_range(old_finish, old_finish + elemsafter);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ this->members_.m_finish = new_finish;
+ }
+ }
+ }
+ return this->begin() + pos_n;
+ }
+
+ template <class InsertProxy>
+ iterator priv_insert_back_aux_impl(size_type n, InsertProxy proxy)
+ {
+ if(!this->members_.m_map){
+ this->priv_initialize_map(0);
+ }
+
+ iterator new_finish = this->priv_reserve_elements_at_back(n);
+ iterator old_finish = this->members_.m_finish;
+ proxy.uninitialized_copy_n_and_update(this->alloc(), old_finish, n);
+ this->members_.m_finish = new_finish;
+ return iterator(this->members_.m_finish - n);
+ }
+
+ template <class InsertProxy>
+ iterator priv_insert_front_aux_impl(size_type n, InsertProxy proxy)
+ {
+ if(!this->members_.m_map){
+ this->priv_initialize_map(0);
+ }
+
+ iterator new_start = this->priv_reserve_elements_at_front(n);
+ proxy.uninitialized_copy_n_and_update(this->alloc(), new_start, n);
+ this->members_.m_start = new_start;
+ return new_start;
+ }
+
+ iterator priv_fill_insert(const_iterator pos, size_type n, const value_type& x)
+ {
+ typedef constant_iterator<value_type, difference_type> c_it;
+ return this->insert(pos, c_it(x, n), c_it());
+ }
+
+ // Precondition: this->members_.m_start and this->members_.m_finish have already been initialized,
+ // but none of the deque's elements have yet been constructed.
+ void priv_fill_initialize(const value_type& value)
+ {
+ index_pointer cur = this->members_.m_start.m_node;
+ BOOST_TRY {
+ for ( ; cur < this->members_.m_finish.m_node; ++cur){
+ boost::container::uninitialized_fill_alloc
+ (this->alloc(), *cur, *cur + this->s_buffer_size(), value);
+ }
+ boost::container::uninitialized_fill_alloc
+ (this->alloc(), this->members_.m_finish.m_first, this->members_.m_finish.m_cur, value);
+ }
+ BOOST_CATCH(...){
+ this->priv_destroy_range(this->members_.m_start, iterator(*cur, cur));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template <class InIt>
+ void priv_range_initialize(InIt first, InIt last, typename iterator_enable_if_tag<InIt, std::input_iterator_tag>::type* =0)
+ {
+ this->priv_initialize_map(0);
+ BOOST_TRY {
+ for ( ; first != last; ++first)
+ this->emplace_back(*first);
+ }
+ BOOST_CATCH(...){
+ this->clear();
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template <class FwdIt>
+ void priv_range_initialize(FwdIt first, FwdIt last, typename iterator_disable_if_tag<FwdIt, std::input_iterator_tag>::type* =0)
+ {
+ size_type n = 0;
+ n = boost::container::iterator_distance(first, last);
+ this->priv_initialize_map(n);
+
+ index_pointer cur_node = this->members_.m_start.m_node;
+ BOOST_TRY {
+ for (; cur_node < this->members_.m_finish.m_node; ++cur_node) {
+ FwdIt mid = first;
+ boost::container::iterator_advance(mid, this->s_buffer_size());
+ ::boost::container::uninitialized_copy_alloc(this->alloc(), first, mid, *cur_node);
+ first = mid;
+ }
+ ::boost::container::uninitialized_copy_alloc(this->alloc(), first, last, this->members_.m_finish.m_first);
+ }
+ BOOST_CATCH(...){
+ this->priv_destroy_range(this->members_.m_start, iterator(*cur_node, cur_node));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ // Called only if this->members_.m_finish.m_cur == this->members_.m_finish.m_first.
+ void priv_pop_back_aux() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ this->priv_deallocate_node(this->members_.m_finish.m_first);
+ this->members_.m_finish.priv_set_node(this->members_.m_finish.m_node - 1);
+ this->members_.m_finish.m_cur = this->members_.m_finish.m_last - 1;
+ allocator_traits_type::destroy
+ ( this->alloc()
+ , boost::movelib::to_raw_pointer(this->members_.m_finish.m_cur)
+ );
+ }
+
+ // Called only if this->members_.m_start.m_cur == this->members_.m_start.m_last - 1. Note that
+ // if the deque has at least one element (a precondition for this member
+ // function), and if this->members_.m_start.m_cur == this->members_.m_start.m_last, then the deque
+ // must have at least two nodes.
+ void priv_pop_front_aux() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ allocator_traits_type::destroy
+ ( this->alloc()
+ , boost::movelib::to_raw_pointer(this->members_.m_start.m_cur)
+ );
+ this->priv_deallocate_node(this->members_.m_start.m_first);
+ this->members_.m_start.priv_set_node(this->members_.m_start.m_node + 1);
+ this->members_.m_start.m_cur = this->members_.m_start.m_first;
+ }
+
+ iterator priv_reserve_elements_at_front(size_type n)
+ {
+ size_type vacancies = this->members_.m_start.m_cur - this->members_.m_start.m_first;
+ if (n > vacancies){
+ size_type new_elems = n-vacancies;
+ size_type new_nodes = (new_elems + this->s_buffer_size() - 1) /
+ this->s_buffer_size();
+ size_type s = (size_type)(this->members_.m_start.m_node - this->members_.m_map);
+ if (new_nodes > s){
+ this->priv_reallocate_map(new_nodes, true);
+ }
+ size_type i = 1;
+ BOOST_TRY {
+ for (; i <= new_nodes; ++i)
+ *(this->members_.m_start.m_node - i) = this->priv_allocate_node();
+ }
+ BOOST_CATCH(...) {
+ for (size_type j = 1; j < i; ++j)
+ this->priv_deallocate_node(*(this->members_.m_start.m_node - j));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ return this->members_.m_start - difference_type(n);
+ }
+
+ iterator priv_reserve_elements_at_back(size_type n)
+ {
+ size_type vacancies = (this->members_.m_finish.m_last - this->members_.m_finish.m_cur) - 1;
+ if (n > vacancies){
+ size_type new_elems = n - vacancies;
+ size_type new_nodes = (new_elems + this->s_buffer_size() - 1)/s_buffer_size();
+ size_type s = (size_type)(this->members_.m_map_size - (this->members_.m_finish.m_node - this->members_.m_map));
+ if (new_nodes + 1 > s){
+ this->priv_reallocate_map(new_nodes, false);
+ }
+ size_type i = 1;
+ BOOST_TRY {
+ for (; i <= new_nodes; ++i)
+ *(this->members_.m_finish.m_node + i) = this->priv_allocate_node();
+ }
+ BOOST_CATCH(...) {
+ for (size_type j = 1; j < i; ++j)
+ this->priv_deallocate_node(*(this->members_.m_finish.m_node + j));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ return this->members_.m_finish + difference_type(n);
+ }
+
+ void priv_reallocate_map(size_type nodes_to_add, bool add_at_front)
+ {
+ size_type old_num_nodes = this->members_.m_finish.m_node - this->members_.m_start.m_node + 1;
+ size_type new_num_nodes = old_num_nodes + nodes_to_add;
+
+ index_pointer new_nstart;
+ if (this->members_.m_map_size > 2 * new_num_nodes) {
+ new_nstart = this->members_.m_map + (this->members_.m_map_size - new_num_nodes) / 2
+ + (add_at_front ? nodes_to_add : 0);
+ if (new_nstart < this->members_.m_start.m_node)
+ boost::container::move(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart);
+ else
+ boost::container::move_backward
+ (this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart + old_num_nodes);
+ }
+ else {
+ size_type new_map_size =
+ this->members_.m_map_size + dtl::max_value(this->members_.m_map_size, nodes_to_add) + 2;
+
+ index_pointer new_map = this->priv_allocate_map(new_map_size);
+ new_nstart = new_map + (new_map_size - new_num_nodes) / 2
+ + (add_at_front ? nodes_to_add : 0);
+ boost::container::move(this->members_.m_start.m_node, this->members_.m_finish.m_node + 1, new_nstart);
+ this->priv_deallocate_map(this->members_.m_map, this->members_.m_map_size);
+
+ this->members_.m_map = new_map;
+ this->members_.m_map_size = new_map_size;
+ }
+
+ this->members_.m_start.priv_set_node(new_nstart);
+ this->members_.m_finish.priv_set_node(new_nstart + old_num_nodes - 1);
+ }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+template <typename InputIterator>
+deque(InputIterator, InputIterator) -> deque<typename iterator_traits<InputIterator>::value_type>;
+template <typename InputIterator, typename Allocator>
+deque(InputIterator, InputIterator, Allocator const&) -> deque<typename iterator_traits<InputIterator>::value_type, Allocator>;
+#endif
+
+}}
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace boost {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class T, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::deque<T, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
+};
+
+}
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // #ifndef BOOST_CONTAINER_DEQUE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/adaptive_node_pool.hpp b/src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool.hpp
index d14e865d85b..d14e865d85b 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/adaptive_node_pool.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool_impl.hpp b/src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool_impl.hpp
new file mode 100644
index 00000000000..b2070921d97
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/adaptive_node_pool_impl.hpp
@@ -0,0 +1,1259 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP
+#define BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/throw_exception.hpp>
+// container/detail
+#include <boost/container/detail/pool_common.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
+#include <boost/container/detail/math_functions.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/container/detail/type_traits.hpp>
+// intrusive
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/set.hpp>
+#include <boost/intrusive/list.hpp>
+#include <boost/intrusive/slist.hpp>
+// other
+#include <boost/assert.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+#include <cstddef>
+
+namespace boost {
+namespace container {
+
+namespace adaptive_pool_flag {
+
+static const unsigned int none = 0u;
+static const unsigned int align_only = 1u << 0u;
+static const unsigned int size_ordered = 1u << 1u;
+static const unsigned int address_ordered = 1u << 2u;
+
+} //namespace adaptive_pool_flag{
+
+namespace dtl {
+
+template<class size_type>
+struct hdr_offset_holder_t
+{
+ hdr_offset_holder_t(size_type offset = 0)
+ : hdr_offset(offset)
+ {}
+ size_type hdr_offset;
+};
+
+template<class SizeType, unsigned int Flags>
+struct less_func;
+
+template<class SizeType>
+struct less_func<SizeType, adaptive_pool_flag::none>
+{
+ static bool less(SizeType, SizeType, const void *, const void *)
+ { return true; }
+};
+
+template<class SizeType>
+struct less_func<SizeType, adaptive_pool_flag::size_ordered>
+{
+ static bool less(SizeType ls, SizeType rs, const void *, const void *)
+ { return ls < rs; }
+};
+
+template<class SizeType>
+struct less_func<SizeType, adaptive_pool_flag::address_ordered>
+{
+ static bool less(SizeType, SizeType, const void *la, const void *ra)
+ { return la < ra; }
+};
+
+template<class SizeType>
+struct less_func<SizeType, adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered>
+{
+ static bool less(SizeType ls, SizeType rs, const void *la, const void *ra)
+ { return (ls < rs) || ((ls == rs) && (la < ra)); }
+};
+
+template<class VoidPointer, class SizeType, unsigned OrderFlags>
+struct block_container_traits
+{
+ typedef typename bi::make_set_base_hook
+ < bi::void_pointer<VoidPointer>
+ , bi::optimize_size<true>
+ , bi::link_mode<bi::normal_link> >::type hook_t;
+
+ template<class T>
+ struct container
+ {
+ typedef typename bi::make_multiset
+ <T, bi::base_hook<hook_t>, bi::size_type<SizeType> >::type type;
+ };
+
+ template<class Container>
+ static void reinsert_was_used(Container &container, typename Container::reference v, bool)
+ {
+ typedef typename Container::const_iterator const_block_iterator;
+ typedef typename Container::iterator block_iterator;
+ typedef typename Container::value_compare value_compare;
+
+ const block_iterator this_block(Container::s_iterator_to(v));
+ const const_block_iterator cendit(container.cend());
+ block_iterator next_block(this_block);
+
+ if(++next_block != cendit && value_compare()(*next_block, v)){
+ const_block_iterator next2_block(next_block);
+ //Test if v should be swapped with next (optimization)
+ if(++next2_block == cendit || !value_compare()(*next2_block, v)){
+ v.swap_nodes(*next_block);
+ BOOST_ASSERT(++next_block == this_block);
+ }
+ else{
+ container.erase(this_block);
+ container.insert(v);
+ }
+ }
+ }
+
+ template<class Container>
+ static void insert_was_empty(Container &container, typename Container::value_type &v, bool)
+ {
+ container.insert(v);
+ }
+
+ template<class Container>
+ static void erase_first(Container &container)
+ {
+ container.erase(container.cbegin());
+ }
+
+ template<class Container>
+ static void erase_last(Container &container)
+ {
+ container.erase(--container.cend());
+ }
+};
+
+template<class VoidPointer, class SizeType>
+struct block_container_traits<VoidPointer, SizeType, 0u>
+{
+ typedef typename bi::make_list_base_hook
+ < bi::void_pointer<VoidPointer>
+ , bi::link_mode<bi::normal_link> >::type hook_t;
+
+ template<class T>
+ struct container
+ {
+ typedef typename bi::make_list
+ <T, bi::base_hook<hook_t>, bi::size_type<SizeType>, bi::constant_time_size<false> >::type type;
+ };
+
+ template<class Container>
+ static void reinsert_was_used(Container &container, typename Container::value_type &v, bool is_full)
+ {
+ if(is_full){
+ container.erase(Container::s_iterator_to(v));
+ container.push_back(v);
+ }
+ }
+
+ template<class Container>
+ static void insert_was_empty(Container &container, typename Container::value_type &v, bool is_full)
+ {
+ if(is_full){
+ container.push_back(v);
+ }
+ else{
+ container.push_front(v);
+ }
+ }
+
+ template<class Container>
+ static void erase_first(Container &container)
+ {
+ container.pop_front();
+ }
+
+ template<class Container>
+ static void erase_last(Container &container)
+ {
+ container.pop_back();
+ }
+};
+
+/////////////////////////////
+//
+// adaptive_pool_types
+//
+/////////////////////////////
+template<class MultiallocationChain, class VoidPointer, class SizeType, unsigned int Flags>
+struct adaptive_pool_types
+{
+ typedef VoidPointer void_pointer;
+ static const unsigned ordered = (Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered));
+ typedef block_container_traits<VoidPointer, SizeType, ordered> block_container_traits_t;
+ typedef typename block_container_traits_t::hook_t hook_t;
+ typedef hdr_offset_holder_t<SizeType> hdr_offset_holder;
+ static const unsigned int order_flags = Flags & (adaptive_pool_flag::size_ordered | adaptive_pool_flag::address_ordered);
+ typedef MultiallocationChain free_nodes_t;
+
+ struct block_info_t
+ : public hdr_offset_holder,
+ public hook_t
+ {
+ //An intrusive list of free node from this block
+ free_nodes_t free_nodes;
+ friend bool operator <(const block_info_t &l, const block_info_t &r)
+ {
+ return less_func<SizeType, order_flags>::
+ less(l.free_nodes.size(), r.free_nodes.size(), &l , &r);
+ }
+
+ friend bool operator ==(const block_info_t &l, const block_info_t &r)
+ { return &l == &r; }
+ };
+ typedef typename block_container_traits_t:: template container<block_info_t>::type block_container_t;
+};
+
+
+/////////////////////////////////////////////
+//
+// candidate_power_of_2_ct
+//
+/////////////////////////////////////////////
+template< std::size_t alignment
+ , std::size_t real_node_size
+ , std::size_t payload_per_allocation
+ , std::size_t min_elements_per_block
+ , std::size_t hdr_size
+ , std::size_t hdr_offset_size
+ , std::size_t overhead_percent>
+struct candidate_power_of_2_ct_helper
+{
+ static const std::size_t hdr_subblock_elements_alone = (alignment - hdr_size - payload_per_allocation)/real_node_size;
+ static const std::size_t hdr_subblock_elements_first = (alignment - hdr_size - payload_per_allocation)/real_node_size;
+ static const std::size_t elements_per_b_subblock_mid = (alignment - hdr_offset_size)/real_node_size;
+ static const std::size_t elements_per_b_subblock_end = (alignment - hdr_offset_size - payload_per_allocation)/real_node_size;
+ static const std::size_t num_b_subblock =
+ hdr_subblock_elements_alone >= min_elements_per_block
+ ? 0
+ : ( ((hdr_subblock_elements_first + elements_per_b_subblock_end) >= min_elements_per_block)
+ ? 1
+ : 2 + (min_elements_per_block - hdr_subblock_elements_first - elements_per_b_subblock_end - 1)/elements_per_b_subblock_mid
+ )
+ ;
+
+ static const std::size_t num_b_subblock_mid = (num_b_subblock > 1) ? (num_b_subblock - 1) : 0;
+
+ static const std::size_t total_nodes = (num_b_subblock == 0)
+ ? hdr_subblock_elements_alone
+ : ( (num_b_subblock == 1)
+ ? (hdr_subblock_elements_first + elements_per_b_subblock_end)
+ : (hdr_subblock_elements_first + num_b_subblock_mid*elements_per_b_subblock_mid + elements_per_b_subblock_end)
+ )
+ ;
+ static const std::size_t total_data = total_nodes*real_node_size;
+ static const std::size_t total_size = alignment*(num_b_subblock+1);
+ static const bool overhead_satisfied = (total_size - total_data)*100/total_size < overhead_percent;
+};
+
+template< std::size_t initial_alignment
+ , std::size_t real_node_size
+ , std::size_t payload_per_allocation
+ , std::size_t min_elements_per_block
+ , std::size_t hdr_size
+ , std::size_t hdr_offset_size
+ , std::size_t overhead_percent
+ , bool Loop = true>
+struct candidate_power_of_2_ct
+{
+ typedef candidate_power_of_2_ct_helper
+ < initial_alignment
+ , real_node_size
+ , payload_per_allocation
+ , min_elements_per_block
+ , hdr_size
+ , hdr_offset_size
+ , overhead_percent> helper_t;
+
+ static const std::size_t candidate_power_of_2 = initial_alignment << std::size_t(!helper_t::overhead_satisfied);
+
+ typedef typename candidate_power_of_2_ct
+ < candidate_power_of_2
+ , real_node_size
+ , payload_per_allocation
+ , min_elements_per_block
+ , hdr_size
+ , hdr_offset_size
+ , overhead_percent
+ , !helper_t::overhead_satisfied
+ >::type type;
+
+ static const std::size_t alignment = type::alignment;
+ static const std::size_t num_subblocks = type::num_subblocks;
+ static const std::size_t real_num_node = type::real_num_node;
+};
+
+template< std::size_t initial_alignment
+ , std::size_t real_node_size
+ , std::size_t payload_per_allocation
+ , std::size_t min_elements_per_block
+ , std::size_t hdr_size
+ , std::size_t hdr_offset_size
+ , std::size_t overhead_percent
+ >
+struct candidate_power_of_2_ct
+ < initial_alignment
+ , real_node_size
+ , payload_per_allocation
+ , min_elements_per_block
+ , hdr_size
+ , hdr_offset_size
+ , overhead_percent
+ , false>
+{
+ typedef candidate_power_of_2_ct
+ < initial_alignment
+ , real_node_size
+ , payload_per_allocation
+ , min_elements_per_block
+ , hdr_size
+ , hdr_offset_size
+ , overhead_percent
+ , false> type;
+
+ typedef candidate_power_of_2_ct_helper
+ < initial_alignment
+ , real_node_size
+ , payload_per_allocation
+ , min_elements_per_block
+ , hdr_size
+ , hdr_offset_size
+ , overhead_percent> helper_t;
+
+ static const std::size_t alignment = initial_alignment;
+ static const std::size_t num_subblocks = helper_t::num_b_subblock+1;
+ static const std::size_t real_num_node = helper_t::total_nodes;
+};
+
+/////////////////////////////////////////////
+//
+// candidate_power_of_2_rt
+//
+/////////////////////////////////////////////
+inline void candidate_power_of_2_rt ( std::size_t initial_alignment
+ , std::size_t real_node_size
+ , std::size_t payload_per_allocation
+ , std::size_t min_elements_per_block
+ , std::size_t hdr_size
+ , std::size_t hdr_offset_size
+ , std::size_t overhead_percent
+ , std::size_t &alignment
+ , std::size_t &num_subblocks
+ , std::size_t &real_num_node)
+{
+ bool overhead_satisfied = false;
+ std::size_t num_b_subblock = 0;
+ std::size_t total_nodes = 0;
+
+ while(!overhead_satisfied)
+ {
+ std::size_t hdr_subblock_elements_alone = (initial_alignment - hdr_size - payload_per_allocation)/real_node_size;
+ std::size_t hdr_subblock_elements_first = (initial_alignment - hdr_size - payload_per_allocation)/real_node_size;
+ std::size_t elements_per_b_subblock_mid = (initial_alignment - hdr_offset_size)/real_node_size;
+ std::size_t elements_per_b_subblock_end = (initial_alignment - hdr_offset_size - payload_per_allocation)/real_node_size;
+
+ num_b_subblock =
+ hdr_subblock_elements_alone >= min_elements_per_block
+ ? 0
+ : ( ((hdr_subblock_elements_first + elements_per_b_subblock_end) >= min_elements_per_block)
+ ? 1
+ : 2 + (min_elements_per_block - hdr_subblock_elements_first - elements_per_b_subblock_end - 1)/elements_per_b_subblock_mid
+ )
+ ;
+
+ std::size_t num_b_subblock_mid = (num_b_subblock > 1) ? (num_b_subblock - 1) : 0;
+
+ total_nodes = (num_b_subblock == 0)
+ ? hdr_subblock_elements_alone
+ : ( (num_b_subblock == 1)
+ ? (hdr_subblock_elements_first + elements_per_b_subblock_end)
+ : (hdr_subblock_elements_first + num_b_subblock_mid*elements_per_b_subblock_mid + elements_per_b_subblock_end)
+ )
+ ;
+ std::size_t total_data = total_nodes*real_node_size;
+ std::size_t total_size = initial_alignment*(num_b_subblock+1);
+ overhead_satisfied = (total_size - total_data)*100/total_size < overhead_percent;
+ initial_alignment = initial_alignment << std::size_t(!overhead_satisfied);
+ }
+ alignment = initial_alignment;
+ num_subblocks = num_b_subblock+1;
+ real_num_node = total_nodes;
+}
+
+/////////////////////////////////////////////
+//
+// private_adaptive_node_pool_impl_common
+//
+/////////////////////////////////////////////
+template< class SegmentManagerBase, unsigned int Flags>
+class private_adaptive_node_pool_impl_common
+{
+ public:
+ //!Segment manager typedef
+ typedef SegmentManagerBase segment_manager_base_type;
+ typedef typename SegmentManagerBase::multiallocation_chain multiallocation_chain;
+ typedef typename SegmentManagerBase::size_type size_type;
+ //Flags
+ //align_only
+ static const bool AlignOnly = (Flags & adaptive_pool_flag::align_only) != 0;
+ typedef bool_<AlignOnly> IsAlignOnly;
+ typedef true_ AlignOnlyTrue;
+ typedef false_ AlignOnlyFalse;
+
+ typedef typename SegmentManagerBase::void_pointer void_pointer;
+ static const typename SegmentManagerBase::
+ size_type PayloadPerAllocation = SegmentManagerBase::PayloadPerAllocation;
+
+ typedef typename boost::intrusive::pointer_traits
+ <void_pointer>::template rebind_pointer<segment_manager_base_type>::type segment_mngr_base_ptr_t;
+
+ protected:
+ typedef adaptive_pool_types
+ <multiallocation_chain, void_pointer, size_type, Flags> adaptive_pool_types_t;
+ typedef typename adaptive_pool_types_t::free_nodes_t free_nodes_t;
+ typedef typename adaptive_pool_types_t::block_info_t block_info_t;
+ typedef typename adaptive_pool_types_t::block_container_t block_container_t;
+ typedef typename adaptive_pool_types_t::block_container_traits_t block_container_traits_t;
+ typedef typename block_container_t::iterator block_iterator;
+ typedef typename block_container_t::const_iterator const_block_iterator;
+ typedef typename adaptive_pool_types_t::hdr_offset_holder hdr_offset_holder;
+ typedef private_adaptive_node_pool_impl_common this_type;
+
+ static const size_type MaxAlign = alignment_of<void_pointer>::value;
+ static const size_type HdrSize = ((sizeof(block_info_t)-1)/MaxAlign+1)*MaxAlign;
+ static const size_type HdrOffsetSize = ((sizeof(hdr_offset_holder)-1)/MaxAlign+1)*MaxAlign;
+
+ segment_mngr_base_ptr_t mp_segment_mngr_base; //Segment manager
+ block_container_t m_block_container; //Intrusive block list
+ size_type m_totally_free_blocks; //Free blocks
+
+ class block_destroyer;
+ friend class block_destroyer;
+
+ class block_destroyer
+ {
+ public:
+ block_destroyer(const this_type *impl, multiallocation_chain &chain, const size_type num_subblocks, const size_type real_block_alignment, const size_type real_num_node)
+ : mp_impl(impl), m_chain(chain), m_num_subblocks(num_subblocks), m_real_block_alignment(real_block_alignment), m_real_num_node(real_num_node)
+ {}
+
+ void operator()(typename block_container_t::pointer to_deallocate)
+ { return this->do_destroy(to_deallocate, IsAlignOnly()); }
+
+ private:
+ void do_destroy(typename block_container_t::pointer to_deallocate, AlignOnlyTrue)
+ {
+ BOOST_ASSERT(to_deallocate->free_nodes.size() == m_real_num_node);
+ m_chain.push_back(to_deallocate);
+ }
+
+ void do_destroy(typename block_container_t::pointer to_deallocate, AlignOnlyFalse)
+ {
+ BOOST_ASSERT(to_deallocate->free_nodes.size() == m_real_num_node);
+ BOOST_ASSERT(0 == to_deallocate->hdr_offset);
+ hdr_offset_holder *hdr_off_holder =
+ mp_impl->priv_first_subblock_from_block(boost::movelib::to_raw_pointer(to_deallocate), m_num_subblocks, m_real_block_alignment);
+ m_chain.push_back(hdr_off_holder);
+ }
+
+ const this_type *mp_impl;
+ multiallocation_chain &m_chain;
+ const size_type m_num_subblocks;
+ const size_type m_real_block_alignment;
+ const size_type m_real_num_node;
+ };
+
+ //This macro will activate invariant checking. Slow, but helpful for debugging the code.
+ //#define BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
+ void priv_invariants(const size_type real_num_node, const size_type num_subblocks, const size_type real_block_alignment) const
+ {
+ (void)real_num_node; (void)num_subblocks; (void)real_block_alignment;
+ #ifdef BOOST_CONTAINER_ADAPTIVE_NODE_POOL_CHECK_INVARIANTS
+ //Check that the total totally free blocks are correct
+ BOOST_ASSERT(m_block_container.size() >= m_totally_free_blocks);
+
+ const const_block_iterator itend(m_block_container.cend());
+ const const_block_iterator itbeg(m_block_container.cbegin());
+
+ { //Try to do checks in a single iteration
+ const_block_iterator it(itbeg);
+ size_type total_free_nodes = 0;
+ size_type total_free_blocks = 0u;
+ for(; it != itend; ++it){
+ if(it != itbeg){
+ //Check order invariant
+ const_block_iterator prev(it);
+ --prev;
+ BOOST_ASSERT(!(m_block_container.key_comp()(*it, *prev)));
+ (void)prev; (void)it;
+ }
+
+ //free_nodes invariant
+ const size_type free_nodes = it->free_nodes.size();
+ BOOST_ASSERT(free_nodes <= real_num_node);
+ BOOST_ASSERT(free_nodes != 0);
+
+ //Acummulate total_free_nodes and total_free_blocks
+ total_free_nodes += free_nodes;
+ total_free_blocks += it->free_nodes.size() == real_num_node;
+
+ if (!AlignOnly) {
+ //Check that header offsets are correct
+ hdr_offset_holder *hdr_off_holder = this->priv_first_subblock_from_block(const_cast<block_info_t *>(&*it), num_subblocks, real_block_alignment);
+ for (size_type i = 0, max = num_subblocks; i < max; ++i) {
+ const size_type offset = reinterpret_cast<char*>(const_cast<block_info_t *>(&*it)) - reinterpret_cast<char*>(hdr_off_holder);
+ (void)offset;
+ BOOST_ASSERT(hdr_off_holder->hdr_offset == offset);
+ BOOST_ASSERT(0 == (reinterpret_cast<std::size_t>(hdr_off_holder) & (real_block_alignment - 1)));
+ BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (real_block_alignment - 1)));
+ hdr_off_holder = reinterpret_cast<hdr_offset_holder *>(reinterpret_cast<char*>(hdr_off_holder) + real_block_alignment);
+ }
+ }
+ }
+ BOOST_ASSERT(total_free_blocks == m_totally_free_blocks);
+ BOOST_ASSERT(total_free_nodes >= m_totally_free_blocks*real_num_node);
+ }
+ #endif
+ }
+
+ void priv_deallocate_free_blocks( const size_type max_free_blocks, const size_type real_num_node
+ , const size_type num_subblocks, const size_type real_block_alignment)
+ { //Trampoline function to ease inlining
+ if(m_totally_free_blocks > max_free_blocks){
+ this->priv_deallocate_free_blocks_impl(max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
+ }
+ }
+
+ hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block, const size_type num_subblocks, const size_type real_block_alignment) const
+ { return this->priv_first_subblock_from_block(block, num_subblocks, real_block_alignment, IsAlignOnly()); }
+
+ hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block, const size_type num_subblocks, const size_type real_block_alignment, AlignOnlyFalse) const
+ {
+ hdr_offset_holder *const hdr_off_holder = reinterpret_cast<hdr_offset_holder*>
+ (reinterpret_cast<char*>(block) - (num_subblocks-1)*real_block_alignment);
+ BOOST_ASSERT(hdr_off_holder->hdr_offset == size_type(reinterpret_cast<char*>(block) - reinterpret_cast<char*>(hdr_off_holder)));
+ BOOST_ASSERT(0 == ((std::size_t)hdr_off_holder & (real_block_alignment - 1)));
+ BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (real_block_alignment - 1)));
+ return hdr_off_holder;
+ }
+
+ hdr_offset_holder *priv_first_subblock_from_block(block_info_t *block, const size_type num_subblocks, const size_type real_block_alignment, AlignOnlyTrue) const
+ {
+ (void)num_subblocks; (void)real_block_alignment;
+ return reinterpret_cast<hdr_offset_holder*>(block);
+ }
+
+ void priv_deallocate_free_blocks_impl( const size_type max_free_blocks, const size_type real_num_node
+ , const size_type num_subblocks, const size_type real_block_alignment)
+ {
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ //Now check if we've reached the free nodes limit
+ //and check if we have free blocks. If so, deallocate as much
+ //as we can to stay below the limit
+ multiallocation_chain chain;
+ {
+ if(Flags & adaptive_pool_flag::size_ordered){
+ const_block_iterator it = m_block_container.cend();
+ --it;
+ size_type totally_free_blocks = m_totally_free_blocks;
+
+ for( ; totally_free_blocks > max_free_blocks; --totally_free_blocks){
+ BOOST_ASSERT(it->free_nodes.size() == real_num_node);
+ void *addr = priv_first_subblock_from_block(const_cast<block_info_t*>(&*it), num_subblocks, real_block_alignment);
+ --it;
+ block_container_traits_t::erase_last(m_block_container);
+ chain.push_front(void_pointer(addr));
+ }
+ }
+ else{
+ const_block_iterator it = m_block_container.cend();
+ size_type totally_free_blocks = m_totally_free_blocks;
+
+ while(totally_free_blocks > max_free_blocks){
+ --it;
+ if(it->free_nodes.size() == real_num_node){
+ void *addr = priv_first_subblock_from_block(const_cast<block_info_t*>(&*it), num_subblocks, real_block_alignment);
+ it = m_block_container.erase(it);
+ chain.push_front(void_pointer(addr));
+ --totally_free_blocks;
+ }
+ }
+ }
+ BOOST_ASSERT((m_totally_free_blocks - max_free_blocks) == chain.size());
+ m_totally_free_blocks = max_free_blocks;
+ }
+ this->mp_segment_mngr_base->deallocate_many(chain);
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ }
+
+ void priv_fill_chain_remaining_to_block
+ ( multiallocation_chain &chain, size_type target_elem_in_chain, block_info_t &c_info
+ , char *mem_address, size_type max_node_in_mem
+ , const size_type real_node_size)
+ {
+ BOOST_ASSERT(chain.size() <= target_elem_in_chain);
+
+ //First add all possible nodes to the chain
+ const size_type left = target_elem_in_chain - chain.size();
+ const size_type add_to_chain = (max_node_in_mem < left) ? max_node_in_mem : left;
+ char *free_mem_address = static_cast<char *>(boost::movelib::to_raw_pointer
+ (chain.incorporate_after(chain.last(), void_pointer(mem_address), real_node_size, add_to_chain)));
+ //Now store remaining nodes in the free list
+ if(const size_type free = max_node_in_mem - add_to_chain){
+ free_nodes_t & free_nodes = c_info.free_nodes;
+ free_nodes.incorporate_after(free_nodes.last(), void_pointer(free_mem_address), real_node_size, free);
+ }
+ }
+
+ //!Allocates a several blocks of nodes. Can throw
+ void priv_append_from_new_blocks( size_type min_elements, multiallocation_chain &chain
+ , const size_type max_free_blocks
+ , const size_type real_block_alignment, const size_type real_node_size
+ , const size_type real_num_node, const size_type num_subblocks
+ , AlignOnlyTrue)
+ {
+ (void)num_subblocks;
+ BOOST_ASSERT(m_block_container.empty());
+ BOOST_ASSERT(min_elements > 0);
+ const size_type n = (min_elements - 1)/real_num_node + 1;
+ const size_type real_block_size = real_block_alignment - PayloadPerAllocation;
+ const size_type target_elem_in_chain = chain.size() + min_elements;
+ for(size_type i = 0; i != n; ++i){
+ //We allocate a new NodeBlock and put it the last
+ //element of the tree
+ char *mem_address = static_cast<char*>
+ (mp_segment_mngr_base->allocate_aligned(real_block_size, real_block_alignment));
+ if(!mem_address){
+ //In case of error, free memory deallocating all nodes (the new ones allocated
+ //in this function plus previously stored nodes in chain).
+ this->priv_deallocate_nodes(chain, max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
+ throw_bad_alloc();
+ }
+ block_info_t &c_info = *new(mem_address)block_info_t();
+ mem_address += HdrSize;
+ this->priv_fill_chain_remaining_to_block(chain, target_elem_in_chain, c_info, mem_address, real_num_node, real_node_size);
+ const size_type free_nodes = c_info.free_nodes.size();
+ if(free_nodes){
+ const bool is_full = free_nodes == real_num_node;
+ BOOST_ASSERT(free_nodes < real_num_node);
+ m_totally_free_blocks += static_cast<size_type>(is_full);
+ block_container_traits_t::insert_was_empty(m_block_container, c_info, is_full);
+ }
+ }
+ }
+
+ void priv_append_from_new_blocks( size_type min_elements, multiallocation_chain &chain
+ , const size_type max_free_blocks
+ , const size_type real_block_alignment, const size_type real_node_size
+ , const size_type real_num_node, const size_type num_subblocks
+ , AlignOnlyFalse)
+ {
+ BOOST_ASSERT(m_block_container.empty());
+ BOOST_ASSERT(min_elements > 0);
+ const size_type n = (min_elements - 1)/real_num_node + 1;
+ const size_type real_block_size = real_block_alignment*num_subblocks - PayloadPerAllocation;
+ const size_type elements_per_subblock_mid = (real_block_alignment - HdrOffsetSize)/real_node_size;
+ const size_type elements_per_subblock_end = (real_block_alignment - HdrOffsetSize - PayloadPerAllocation) / real_node_size;
+ const size_type hdr_subblock_elements = (real_block_alignment - HdrSize - PayloadPerAllocation)/real_node_size;
+ const size_type target_elem_in_chain = chain.size() + min_elements;
+
+ for(size_type i = 0; i != n; ++i){
+ //We allocate a new NodeBlock and put it the last
+ //element of the tree
+ char *mem_address = static_cast<char*>
+ (mp_segment_mngr_base->allocate_aligned(real_block_size, real_block_alignment));
+ if(!mem_address){
+ //In case of error, free memory deallocating all nodes (the new ones allocated
+ //in this function plus previously stored nodes in chain).
+ this->priv_deallocate_nodes(chain, max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
+ throw_bad_alloc();
+ }
+ //First initialize header information on the last subblock
+ char *hdr_addr = mem_address + real_block_alignment*(num_subblocks-1);
+ block_info_t &c_info = *new(hdr_addr)block_info_t();
+ //Some structural checks
+ BOOST_ASSERT(static_cast<void*>(&static_cast<hdr_offset_holder&>(c_info).hdr_offset) ==
+ static_cast<void*>(&c_info)); (void)c_info;
+ for( size_type subblock = 0, maxsubblock = num_subblocks - 1
+ ; subblock < maxsubblock
+ ; ++subblock, mem_address += real_block_alignment){
+ //Initialize header offset mark
+ new(mem_address) hdr_offset_holder(size_type(hdr_addr - mem_address));
+ const size_type elements_per_subblock = (subblock != (maxsubblock - 1)) ? elements_per_subblock_mid : elements_per_subblock_end;
+ this->priv_fill_chain_remaining_to_block
+ (chain, target_elem_in_chain, c_info, mem_address + HdrOffsetSize, elements_per_subblock, real_node_size);
+ }
+ this->priv_fill_chain_remaining_to_block
+ (chain, target_elem_in_chain, c_info, hdr_addr + HdrSize, hdr_subblock_elements, real_node_size);
+ m_totally_free_blocks += static_cast<size_type>(c_info.free_nodes.size() == real_num_node);
+ if (c_info.free_nodes.size())
+ m_block_container.push_front(c_info);
+ }
+ }
+
+ //!Allocates array of count elements. Can throw
+ void *priv_allocate_node( const size_type max_free_blocks, const size_type real_block_alignment, const size_type real_node_size
+ , const size_type real_num_node, const size_type num_subblocks)
+ {
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ //If there are no free nodes we allocate a new block
+ if(!m_block_container.empty()){
+ //We take the first free node the multiset can't be empty
+ free_nodes_t &free_nodes = m_block_container.begin()->free_nodes;
+ BOOST_ASSERT(!free_nodes.empty());
+ const size_type free_nodes_count = free_nodes.size();
+ void *first_node = boost::movelib::to_raw_pointer(free_nodes.pop_front());
+ if(free_nodes.empty()){
+ block_container_traits_t::erase_first(m_block_container);
+ }
+ m_totally_free_blocks -= static_cast<size_type>(free_nodes_count == real_num_node);
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ return first_node;
+ }
+ else{
+ multiallocation_chain chain;
+ this->priv_append_from_new_blocks
+ (1, chain, max_free_blocks, real_block_alignment, real_node_size, real_num_node, num_subblocks, IsAlignOnly());
+ void *node = boost::movelib::to_raw_pointer(chain.pop_front());
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ return node;
+ }
+ }
+
+ void priv_allocate_nodes( const size_type n, multiallocation_chain &chain
+ , const size_type max_free_blocks, const size_type real_block_alignment, const size_type real_node_size
+ , const size_type real_num_node, const size_type num_subblocks)
+ {
+ size_type i = 0;
+ BOOST_TRY{
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ while(i != n){
+ //If there are no free nodes we allocate all needed blocks
+ if (m_block_container.empty()){
+ this->priv_append_from_new_blocks
+ (n - i, chain, max_free_blocks, real_block_alignment, real_node_size, real_num_node, num_subblocks, IsAlignOnly());
+ BOOST_ASSERT(m_block_container.empty() || (++m_block_container.cbegin() == m_block_container.cend()));
+ BOOST_ASSERT(chain.size() == n);
+ break;
+ }
+ free_nodes_t &free_nodes = m_block_container.begin()->free_nodes;
+ const size_type free_nodes_count_before = free_nodes.size();
+ m_totally_free_blocks -= static_cast<size_type>(free_nodes_count_before == real_num_node);
+ const size_type num_left = n-i;
+ const size_type num_elems = (num_left < free_nodes_count_before) ? num_left : free_nodes_count_before;
+ typedef typename free_nodes_t::iterator free_nodes_iterator;
+
+ if(num_left < free_nodes_count_before){
+ const free_nodes_iterator it_bbeg(free_nodes.before_begin());
+ free_nodes_iterator it_bend(it_bbeg);
+ for(size_type j = 0; j != num_elems; ++j){
+ ++it_bend;
+ }
+ free_nodes_iterator it_end = it_bend; ++it_end;
+ free_nodes_iterator it_beg = it_bbeg; ++it_beg;
+ free_nodes.erase_after(it_bbeg, it_end, num_elems);
+ chain.incorporate_after(chain.last(), &*it_beg, &*it_bend, num_elems);
+ //chain.splice_after(chain.last(), free_nodes, it_bbeg, it_bend, num_elems);
+ BOOST_ASSERT(!free_nodes.empty());
+ }
+ else{
+ const free_nodes_iterator it_beg(free_nodes.begin()), it_bend(free_nodes.last());
+ free_nodes.clear();
+ chain.incorporate_after(chain.last(), &*it_beg, &*it_bend, num_elems);
+ block_container_traits_t::erase_first(m_block_container);
+ }
+ i += num_elems;
+ }
+ }
+ BOOST_CATCH(...){
+ this->priv_deallocate_nodes(chain, max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ }
+
+ //!Deallocates an array pointed by ptr. Never throws
+ void priv_deallocate_node( void *pElem
+ , const size_type max_free_blocks, const size_type real_num_node
+ , const size_type num_subblocks, const size_type real_block_alignment)
+ {
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ block_info_t &block_info = *this->priv_block_from_node(pElem, real_block_alignment);
+ const size_type prev_free_nodes = block_info.free_nodes.size();
+ BOOST_ASSERT(block_info.free_nodes.size() < real_num_node);
+
+ //We put the node at the beginning of the free node list
+ block_info.free_nodes.push_back(void_pointer(pElem));
+
+ //The loop reinserts all blocks except the last one
+ this->priv_reinsert_block(block_info, prev_free_nodes == 0, real_num_node);
+ this->priv_deallocate_free_blocks(max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ }
+
+ void priv_deallocate_nodes( multiallocation_chain &nodes
+ , const size_type max_free_blocks, const size_type real_num_node
+ , const size_type num_subblocks, const size_type real_block_alignment)
+ {
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ //To take advantage of node locality, wait until two
+ //nodes belong to different blocks. Only then reinsert
+ //the block of the first node in the block tree.
+ //Cache of the previous block
+ block_info_t *prev_block_info = 0;
+
+ //If block was empty before this call, it's not already
+ //inserted in the block tree.
+ bool prev_block_was_empty = false;
+ typedef typename free_nodes_t::iterator free_nodes_iterator;
+ {
+ const free_nodes_iterator itbb(nodes.before_begin()), ite(nodes.end());
+ free_nodes_iterator itf(nodes.begin()), itbf(itbb);
+ size_type splice_node_count = size_type(-1);
+ while(itf != ite){
+ void *pElem = boost::movelib::to_raw_pointer(boost::movelib::iterator_to_raw_pointer(itf));
+ block_info_t &block_info = *this->priv_block_from_node(pElem, real_block_alignment);
+ BOOST_ASSERT(block_info.free_nodes.size() < real_num_node);
+ ++splice_node_count;
+
+ //If block change is detected calculate the cached block position in the tree
+ if(&block_info != prev_block_info){
+ if(prev_block_info){ //Make sure we skip the initial "dummy" cache
+ free_nodes_iterator it(itbb); ++it;
+ nodes.erase_after(itbb, itf, splice_node_count);
+ prev_block_info->free_nodes.incorporate_after(prev_block_info->free_nodes.last(), &*it, &*itbf, splice_node_count);
+ this->priv_reinsert_block(*prev_block_info, prev_block_was_empty, real_num_node);
+ splice_node_count = 0;
+ }
+ //Update cache with new data
+ prev_block_was_empty = block_info.free_nodes.empty();
+ prev_block_info = &block_info;
+ }
+ itbf = itf;
+ ++itf;
+ }
+ }
+ if(prev_block_info){
+ //The loop reinserts all blocks except the last one
+ const free_nodes_iterator itfirst(nodes.begin()), itlast(nodes.last());
+ const size_type splice_node_count = nodes.size();
+ nodes.clear();
+ prev_block_info->free_nodes.incorporate_after(prev_block_info->free_nodes.last(), &*itfirst, &*itlast, splice_node_count);
+ this->priv_reinsert_block(*prev_block_info, prev_block_was_empty, real_num_node);
+ this->priv_deallocate_free_blocks(max_free_blocks, real_num_node, num_subblocks, real_block_alignment);
+ }
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ }
+
+ void priv_reinsert_block(block_info_t &prev_block_info, const bool prev_block_was_empty, const size_type real_num_node)
+ {
+ //Cache the free nodes from the block
+ const size_type this_block_free_nodes = prev_block_info.free_nodes.size();
+ const bool is_full = this_block_free_nodes == real_num_node;
+
+ //Update free block count
+ m_totally_free_blocks += static_cast<size_type>(is_full);
+ if(prev_block_was_empty){
+ block_container_traits_t::insert_was_empty(m_block_container, prev_block_info, is_full);
+ }
+ else{
+ block_container_traits_t::reinsert_was_used(m_block_container, prev_block_info, is_full);
+ }
+ }
+
+ block_info_t *priv_block_from_node(void *node, const size_type real_block_alignment, AlignOnlyFalse) const
+ {
+ hdr_offset_holder *hdr_off_holder =
+ reinterpret_cast<hdr_offset_holder*>((std::size_t)node & size_type(~(real_block_alignment - 1)));
+ BOOST_ASSERT(0 == ((std::size_t)hdr_off_holder & (real_block_alignment - 1)));
+ BOOST_ASSERT(0 == (hdr_off_holder->hdr_offset & (real_block_alignment - 1)));
+ block_info_t *block = reinterpret_cast<block_info_t *>
+ (reinterpret_cast<char*>(hdr_off_holder) + hdr_off_holder->hdr_offset);
+ BOOST_ASSERT(block->hdr_offset == 0);
+ return block;
+ }
+
+ block_info_t *priv_block_from_node(void *node, const size_type real_block_alignment, AlignOnlyTrue) const
+ {
+ return (block_info_t *)((std::size_t)node & std::size_t(~(real_block_alignment - 1)));
+ }
+
+ block_info_t *priv_block_from_node(void *node, const size_type real_block_alignment) const
+ { return this->priv_block_from_node(node, real_block_alignment, IsAlignOnly()); }
+
+ //!Deallocates all used memory. Never throws
+ void priv_clear(const size_type num_subblocks, const size_type real_block_alignment, const size_type real_num_node)
+ {
+ #ifndef NDEBUG
+ block_iterator it = m_block_container.begin();
+ block_iterator itend = m_block_container.end();
+ size_type n_free_nodes = 0;
+ for(; it != itend; ++it){
+ //Check for memory leak
+ BOOST_ASSERT(it->free_nodes.size() == real_num_node);
+ ++n_free_nodes;
+ }
+ BOOST_ASSERT(n_free_nodes == m_totally_free_blocks);
+ #endif
+ //Check for memory leaks
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ multiallocation_chain chain;
+ m_block_container.clear_and_dispose(block_destroyer(this, chain, num_subblocks, real_block_alignment, real_num_node));
+ this->mp_segment_mngr_base->deallocate_many(chain);
+ m_totally_free_blocks = 0;
+ this->priv_invariants(real_num_node, num_subblocks, real_block_alignment);
+ }
+
+ public:
+ private_adaptive_node_pool_impl_common(segment_manager_base_type *segment_mngr_base)
+ //General purpose allocator
+ : mp_segment_mngr_base(segment_mngr_base)
+ , m_block_container()
+ , m_totally_free_blocks(0)
+ {}
+
+ size_type num_free_nodes()
+ {
+ typedef typename block_container_t::const_iterator citerator;
+ size_type count = 0;
+ citerator it (m_block_container.begin()), itend(m_block_container.end());
+ for(; it != itend; ++it){
+ count += it->free_nodes.size();
+ }
+ return count;
+ }
+
+ void swap(private_adaptive_node_pool_impl_common &other)
+ {
+ std::swap(mp_segment_mngr_base, other.mp_segment_mngr_base);
+ std::swap(m_totally_free_blocks, other.m_totally_free_blocks);
+ m_block_container.swap(other.m_block_container);
+ }
+
+ //!Returns the segment manager. Never throws
+ segment_manager_base_type* get_segment_manager_base()const
+ { return boost::movelib::to_raw_pointer(mp_segment_mngr_base); }
+};
+
+template< class SizeType
+ , std::size_t HdrSize
+ , std::size_t PayloadPerAllocation
+ , std::size_t RealNodeSize
+ , std::size_t NodesPerBlock
+ , std::size_t HdrOffsetSize
+ , std::size_t OverheadPercent
+ , bool AlignOnly>
+struct calculate_alignment_ct
+{
+ static const std::size_t alignment = upper_power_of_2_ct<SizeType, HdrSize + RealNodeSize*NodesPerBlock>::value;
+ static const std::size_t num_subblocks = 0;
+ static const std::size_t real_num_node = (alignment - PayloadPerAllocation - HdrSize)/RealNodeSize;
+};
+
+template< class SizeType
+ , std::size_t HdrSize
+ , std::size_t PayloadPerAllocation
+ , std::size_t RealNodeSize
+ , std::size_t NodesPerBlock
+ , std::size_t HdrOffsetSize
+ , std::size_t OverheadPercent>
+struct calculate_alignment_ct
+ < SizeType
+ , HdrSize
+ , PayloadPerAllocation
+ , RealNodeSize
+ , NodesPerBlock
+ , HdrOffsetSize
+ , OverheadPercent
+ , false>
+{
+ typedef typename candidate_power_of_2_ct
+ < upper_power_of_2_ct<SizeType, HdrSize + PayloadPerAllocation + RealNodeSize>::value
+ , RealNodeSize
+ , PayloadPerAllocation
+ , NodesPerBlock
+ , HdrSize
+ , HdrOffsetSize
+ , OverheadPercent
+ >::type type;
+
+ static const std::size_t alignment = type::alignment;
+ static const std::size_t num_subblocks = type::num_subblocks;
+ static const std::size_t real_num_node = type::real_num_node;
+};
+
+
+/////////////////////////////////////////////
+//
+// private_adaptive_node_pool_impl_ct
+//
+/////////////////////////////////////////////
+template< class SegmentManagerBase
+ , std::size_t MaxFreeBlocks
+ , std::size_t NodeSize
+ , std::size_t NodesPerBlock
+ , std::size_t OverheadPercent
+ , unsigned int Flags>
+class private_adaptive_node_pool_impl_ct
+ : public private_adaptive_node_pool_impl_common<SegmentManagerBase, Flags>
+{
+ typedef private_adaptive_node_pool_impl_common<SegmentManagerBase, Flags> base_t;
+
+ //Non-copyable
+ private_adaptive_node_pool_impl_ct();
+ private_adaptive_node_pool_impl_ct(const private_adaptive_node_pool_impl_ct &);
+ private_adaptive_node_pool_impl_ct &operator=(const private_adaptive_node_pool_impl_ct &);
+
+ public:
+ typedef typename base_t::void_pointer void_pointer;
+ typedef typename base_t::size_type size_type;
+ typedef typename base_t::multiallocation_chain multiallocation_chain;
+ typedef typename base_t::segment_manager_base_type segment_manager_base_type;
+
+ static const typename base_t::size_type PayloadPerAllocation = base_t::PayloadPerAllocation;
+
+ //align_only
+ static const bool AlignOnly = base_t::AlignOnly;
+
+ private:
+ static const size_type MaxAlign = base_t::MaxAlign;
+ static const size_type HdrSize = base_t::HdrSize;
+ static const size_type HdrOffsetSize = base_t::HdrOffsetSize;
+
+ static const size_type RealNodeSize = lcm_ct<NodeSize, alignment_of<void_pointer>::value>::value;
+
+ typedef calculate_alignment_ct
+ < size_type, HdrSize, PayloadPerAllocation
+ , RealNodeSize, NodesPerBlock, HdrOffsetSize, OverheadPercent, AlignOnly> data_t;
+
+ //Round the size to a power of two value.
+ //This is the total memory size (including payload) that we want to
+ //allocate from the general-purpose allocator
+ static const size_type NumSubBlocks = data_t::num_subblocks;
+ static const size_type RealNumNode = data_t::real_num_node;
+ static const size_type RealBlockAlignment = data_t::alignment;
+
+ public:
+
+ //!Constructor from a segment manager. Never throws
+ private_adaptive_node_pool_impl_ct(typename base_t::segment_manager_base_type *segment_mngr_base)
+ //General purpose allocator
+ : base_t(segment_mngr_base)
+ {}
+
+ //!Destructor. Deallocates all allocated blocks. Never throws
+ ~private_adaptive_node_pool_impl_ct()
+ { this->priv_clear(NumSubBlocks, data_t::alignment, RealNumNode); }
+
+ size_type get_real_num_node() const
+ { return RealNumNode; }
+
+ //!Allocates array of count elements. Can throw
+ void *allocate_node()
+ {
+ return this->priv_allocate_node
+ (MaxFreeBlocks, data_t::alignment, RealNodeSize, RealNumNode, NumSubBlocks);
+ }
+
+ //!Allocates n nodes.
+ //!Can throw
+ void allocate_nodes(const size_type n, multiallocation_chain &chain)
+ {
+ this->priv_allocate_nodes
+ (n, chain, MaxFreeBlocks, data_t::alignment, RealNodeSize, RealNumNode, NumSubBlocks);
+ }
+
+ //!Deallocates an array pointed by ptr. Never throws
+ void deallocate_node(void *pElem)
+ {
+ this->priv_deallocate_node(pElem, MaxFreeBlocks, RealNumNode, NumSubBlocks, RealBlockAlignment);
+ }
+
+ //!Deallocates a linked list of nodes. Never throws
+ void deallocate_nodes(multiallocation_chain &nodes)
+ {
+ this->priv_deallocate_nodes(nodes, MaxFreeBlocks, RealNumNode, NumSubBlocks, data_t::alignment);
+ }
+
+ void deallocate_free_blocks()
+ { this->priv_deallocate_free_blocks(0, RealNumNode, NumSubBlocks, data_t::alignment); }
+
+ //Deprecated, use deallocate_free_blocks
+ void deallocate_free_chunks()
+ { this->priv_deallocate_free_blocks(0, RealNumNode, NumSubBlocks, data_t::alignment); }
+};
+
+/////////////////////////////////////////////
+//
+// private_adaptive_node_pool_impl_rt
+//
+/////////////////////////////////////////////
+template<class SizeType>
+struct private_adaptive_node_pool_impl_rt_data
+{
+ typedef SizeType size_type;
+
+ private_adaptive_node_pool_impl_rt_data(size_type max_free_blocks, size_type real_node_size)
+ : m_max_free_blocks(max_free_blocks), m_real_node_size(real_node_size)
+ , m_real_block_alignment(), m_num_subblocks(), m_real_num_node()
+ {}
+
+ const size_type m_max_free_blocks;
+ const size_type m_real_node_size;
+ //Round the size to a power of two value.
+ //This is the total memory size (including payload) that we want to
+ //allocate from the general-purpose allocator
+ size_type m_real_block_alignment;
+ size_type m_num_subblocks;
+ //This is the real number of nodes per block
+ size_type m_real_num_node;
+};
+
+
+template<class SegmentManagerBase, unsigned int Flags>
+class private_adaptive_node_pool_impl_rt
+ : private private_adaptive_node_pool_impl_rt_data<typename SegmentManagerBase::size_type>
+ , public private_adaptive_node_pool_impl_common<SegmentManagerBase, Flags>
+{
+ typedef private_adaptive_node_pool_impl_common<SegmentManagerBase, Flags> impl_t;
+ typedef private_adaptive_node_pool_impl_rt_data<typename SegmentManagerBase::size_type> data_t;
+
+ //Non-copyable
+ private_adaptive_node_pool_impl_rt();
+ private_adaptive_node_pool_impl_rt(const private_adaptive_node_pool_impl_rt &);
+ private_adaptive_node_pool_impl_rt &operator=(const private_adaptive_node_pool_impl_rt &);
+
+ protected:
+
+ typedef typename impl_t::void_pointer void_pointer;
+ typedef typename impl_t::size_type size_type;
+ typedef typename impl_t::multiallocation_chain multiallocation_chain;
+
+ static const typename impl_t::size_type PayloadPerAllocation = impl_t::PayloadPerAllocation;
+
+ //Flags
+ //align_only
+ static const bool AlignOnly = impl_t::AlignOnly;
+
+ static const size_type HdrSize = impl_t::HdrSize;
+ static const size_type HdrOffsetSize = impl_t::HdrOffsetSize;
+
+ public:
+
+ //!Segment manager typedef
+ typedef SegmentManagerBase segment_manager_base_type;
+
+ //!Constructor from a segment manager. Never throws
+ private_adaptive_node_pool_impl_rt
+ ( segment_manager_base_type *segment_mngr_base
+ , size_type node_size
+ , size_type nodes_per_block
+ , size_type max_free_blocks
+ , unsigned char overhead_percent
+ )
+ : data_t(max_free_blocks, lcm(node_size, size_type(alignment_of<void_pointer>::value)))
+ , impl_t(segment_mngr_base)
+ {
+ if(AlignOnly){
+ this->m_real_block_alignment = upper_power_of_2(HdrSize + this->m_real_node_size*nodes_per_block);
+ this->m_real_num_node = (this->m_real_block_alignment - PayloadPerAllocation - HdrSize)/this->m_real_node_size;
+ }
+ else{
+ candidate_power_of_2_rt ( upper_power_of_2(HdrSize + PayloadPerAllocation + this->m_real_node_size)
+ , this->m_real_node_size
+ , PayloadPerAllocation
+ , nodes_per_block
+ , HdrSize
+ , HdrOffsetSize
+ , overhead_percent
+ , this->m_real_block_alignment
+ , this->m_num_subblocks
+ , this->m_real_num_node);
+ }
+ }
+
+ //!Destructor. Deallocates all allocated blocks. Never throws
+ ~private_adaptive_node_pool_impl_rt()
+ { this->priv_clear(this->m_num_subblocks, this->m_real_block_alignment, this->m_real_num_node); }
+
+ size_type get_real_num_node() const
+ { return this->m_real_num_node; }
+
+ //!Allocates array of count elements. Can throw
+ void *allocate_node()
+ {
+ return this->priv_allocate_node
+ (this->m_max_free_blocks, this->m_real_block_alignment, this->m_real_node_size, this->m_real_num_node, this->m_num_subblocks);
+ }
+
+ //!Allocates n nodes.
+ //!Can throw
+ void allocate_nodes(const size_type n, multiallocation_chain &chain)
+ {
+
+ this->priv_allocate_nodes
+ (n, chain, this->m_max_free_blocks, this->m_real_block_alignment, this->m_real_node_size, this->m_real_num_node, this->m_num_subblocks);
+ }
+
+ //!Deallocates an array pointed by ptr. Never throws
+ void deallocate_node(void *pElem)
+ {
+ this->priv_deallocate_node(pElem, this->m_max_free_blocks, this->m_real_num_node, this->m_num_subblocks, this->m_real_block_alignment);
+ }
+
+ //!Deallocates a linked list of nodes. Never throws
+ void deallocate_nodes(multiallocation_chain &nodes)
+ {
+ this->priv_deallocate_nodes(nodes, this->m_max_free_blocks, this->m_real_num_node, this->m_num_subblocks, this->m_real_block_alignment);
+ }
+
+ void deallocate_free_blocks()
+ { this->priv_deallocate_free_blocks(0, this->m_real_num_node, this->m_num_subblocks, this->m_real_block_alignment); }
+
+ //Deprecated, use deallocate_free_blocks
+ void deallocate_free_chunks()
+ { this->priv_deallocate_free_blocks(0, this->m_real_num_node, this->m_num_subblocks, this->m_real_block_alignment); }
+};
+
+} //namespace dtl {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_ADAPTIVE_NODE_POOL_IMPL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/addressof.hpp b/src/third_party/boost-1.69.0/boost/container/detail/addressof.hpp
index b3b8a4dd6fa..b3b8a4dd6fa 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/addressof.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/addressof.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/advanced_insert_int.hpp b/src/third_party/boost-1.69.0/boost/container/detail/advanced_insert_int.hpp
new file mode 100644
index 00000000000..17ceb013fd0
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/advanced_insert_int.hpp
@@ -0,0 +1,495 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2008-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP
+#define BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/allocator_traits.hpp>
+// container/detail
+#include <boost/container/detail/copy_move_algo.hpp>
+#include <boost/container/detail/destroyers.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+// move
+#include <boost/move/utility_core.hpp>
+// other
+#include <boost/assert.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+
+namespace boost { namespace container { namespace dtl {
+
+template<class Allocator, class FwdIt, class Iterator>
+struct move_insert_range_proxy
+{
+ typedef typename allocator_traits<Allocator>::size_type size_type;
+ typedef typename allocator_traits<Allocator>::value_type value_type;
+
+ explicit move_insert_range_proxy(FwdIt first)
+ : first_(first)
+ {}
+
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)
+ {
+ this->first_ = ::boost::container::uninitialized_move_alloc_n_source
+ (a, this->first_, n, p);
+ }
+
+ void copy_n_and_update(Allocator &, Iterator p, size_type n)
+ {
+ this->first_ = ::boost::container::move_n_source(this->first_, n, p);
+ }
+
+ FwdIt first_;
+};
+
+
+template<class Allocator, class FwdIt, class Iterator>
+struct insert_range_proxy
+{
+ typedef typename allocator_traits<Allocator>::size_type size_type;
+ typedef typename allocator_traits<Allocator>::value_type value_type;
+
+ explicit insert_range_proxy(FwdIt first)
+ : first_(first)
+ {}
+
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)
+ {
+ this->first_ = ::boost::container::uninitialized_copy_alloc_n_source(a, this->first_, n, p);
+ }
+
+ void copy_n_and_update(Allocator &, Iterator p, size_type n)
+ {
+ this->first_ = ::boost::container::copy_n_source(this->first_, n, p);
+ }
+
+ FwdIt first_;
+};
+
+
+template<class Allocator, class Iterator>
+struct insert_n_copies_proxy
+{
+ typedef typename allocator_traits<Allocator>::size_type size_type;
+ typedef typename allocator_traits<Allocator>::value_type value_type;
+
+ explicit insert_n_copies_proxy(const value_type &v)
+ : v_(v)
+ {}
+
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
+ { boost::container::uninitialized_fill_alloc_n(a, v_, n, p); }
+
+ void copy_n_and_update(Allocator &, Iterator p, size_type n) const
+ {
+ for (; 0 < n; --n, ++p){
+ *p = v_;
+ }
+ }
+
+ const value_type &v_;
+};
+
+template<class Allocator, class Iterator>
+struct insert_value_initialized_n_proxy
+{
+ typedef ::boost::container::allocator_traits<Allocator> alloc_traits;
+ typedef typename allocator_traits<Allocator>::size_type size_type;
+ typedef typename allocator_traits<Allocator>::value_type value_type;
+
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
+ { boost::container::uninitialized_value_init_alloc_n(a, n, p); }
+
+ void copy_n_and_update(Allocator &a, Iterator p, size_type n) const
+ {
+ for (; 0 < n; --n, ++p){
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
+ value_type *vp = reinterpret_cast<value_type *>(v.data);
+ alloc_traits::construct(a, vp);
+ value_destructor<Allocator> on_exit(a, *vp); (void)on_exit;
+ *p = ::boost::move(*vp);
+ }
+ }
+};
+
+template<class Allocator, class Iterator>
+struct insert_default_initialized_n_proxy
+{
+ typedef ::boost::container::allocator_traits<Allocator> alloc_traits;
+ typedef typename allocator_traits<Allocator>::size_type size_type;
+ typedef typename allocator_traits<Allocator>::value_type value_type;
+
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
+ { boost::container::uninitialized_default_init_alloc_n(a, n, p); }
+
+ void copy_n_and_update(Allocator &a, Iterator p, size_type n) const
+ {
+ if(!is_pod<value_type>::value){
+ for (; 0 < n; --n, ++p){
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
+ value_type *vp = reinterpret_cast<value_type *>(v.data);
+ alloc_traits::construct(a, vp, default_init);
+ value_destructor<Allocator> on_exit(a, *vp); (void)on_exit;
+ *p = ::boost::move(*vp);
+ }
+ }
+ }
+};
+
+template<class Allocator, class Iterator>
+struct insert_copy_proxy
+{
+ typedef boost::container::allocator_traits<Allocator> alloc_traits;
+ typedef typename alloc_traits::size_type size_type;
+ typedef typename alloc_traits::value_type value_type;
+
+ explicit insert_copy_proxy(const value_type &v)
+ : v_(v)
+ {}
+
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
+ {
+ BOOST_ASSERT(n == 1); (void)n;
+ alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), v_);
+ }
+
+ void copy_n_and_update(Allocator &, Iterator p, size_type n) const
+ {
+ BOOST_ASSERT(n == 1); (void)n;
+ *p = v_;
+ }
+
+ const value_type &v_;
+};
+
+
+template<class Allocator, class Iterator>
+struct insert_move_proxy
+{
+ typedef boost::container::allocator_traits<Allocator> alloc_traits;
+ typedef typename alloc_traits::size_type size_type;
+ typedef typename alloc_traits::value_type value_type;
+
+ explicit insert_move_proxy(value_type &v)
+ : v_(v)
+ {}
+
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n) const
+ {
+ BOOST_ASSERT(n == 1); (void)n;
+ alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::move(v_) );
+ }
+
+ void copy_n_and_update(Allocator &, Iterator p, size_type n) const
+ {
+ BOOST_ASSERT(n == 1); (void)n;
+ *p = ::boost::move(v_);
+ }
+
+ value_type &v_;
+};
+
+template<class It, class Allocator>
+insert_move_proxy<Allocator, It> get_insert_value_proxy(BOOST_RV_REF(typename boost::container::iterator_traits<It>::value_type) v)
+{
+ return insert_move_proxy<Allocator, It>(v);
+}
+
+template<class It, class Allocator>
+insert_copy_proxy<Allocator, It> get_insert_value_proxy(const typename boost::container::iterator_traits<It>::value_type &v)
+{
+ return insert_copy_proxy<Allocator, It>(v);
+}
+
+}}} //namespace boost { namespace container { namespace dtl {
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+#include <boost/container/detail/variadic_templates_tools.hpp>
+#include <boost/move/utility_core.hpp>
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+template<class Allocator, class Iterator, class ...Args>
+struct insert_nonmovable_emplace_proxy
+{
+ typedef boost::container::allocator_traits<Allocator> alloc_traits;
+ typedef typename alloc_traits::size_type size_type;
+ typedef typename alloc_traits::value_type value_type;
+
+ typedef typename build_number_seq<sizeof...(Args)>::type index_tuple_t;
+
+ explicit insert_nonmovable_emplace_proxy(BOOST_FWD_REF(Args)... args)
+ : args_(args...)
+ {}
+
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)
+ { this->priv_uninitialized_copy_some_and_update(a, index_tuple_t(), p, n); }
+
+ private:
+ template<std::size_t ...IdxPack>
+ void priv_uninitialized_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, size_type n)
+ {
+ BOOST_ASSERT(n == 1); (void)n;
+ alloc_traits::construct( a, boost::movelib::iterator_to_raw_pointer(p), ::boost::forward<Args>(get<IdxPack>(this->args_))... );
+ }
+
+ protected:
+ tuple<Args&...> args_;
+};
+
+template<class Allocator, class Iterator, class ...Args>
+struct insert_emplace_proxy
+ : public insert_nonmovable_emplace_proxy<Allocator, Iterator, Args...>
+{
+ typedef insert_nonmovable_emplace_proxy<Allocator, Iterator, Args...> base_t;
+ typedef boost::container::allocator_traits<Allocator> alloc_traits;
+ typedef typename base_t::value_type value_type;
+ typedef typename base_t::size_type size_type;
+ typedef typename base_t::index_tuple_t index_tuple_t;
+
+ explicit insert_emplace_proxy(BOOST_FWD_REF(Args)... args)
+ : base_t(::boost::forward<Args>(args)...)
+ {}
+
+ void copy_n_and_update(Allocator &a, Iterator p, size_type n)
+ { this->priv_copy_some_and_update(a, index_tuple_t(), p, n); }
+
+ private:
+
+ template<std::size_t ...IdxPack>
+ void priv_copy_some_and_update(Allocator &a, const index_tuple<IdxPack...>&, Iterator p, size_type n)
+ {
+ BOOST_ASSERT(n ==1); (void)n;
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
+ value_type *vp = reinterpret_cast<value_type *>(v.data);
+ alloc_traits::construct(a, vp,
+ ::boost::forward<Args>(get<IdxPack>(this->args_))...);
+ BOOST_TRY{
+ *p = ::boost::move(*vp);
+ }
+ BOOST_CATCH(...){
+ alloc_traits::destroy(a, vp);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ alloc_traits::destroy(a, vp);
+ }
+};
+
+//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type>
+ : public insert_move_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy(typename boost::container::allocator_traits<Allocator>::value_type &&v)
+ : insert_move_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+//We use "add_const" here as adding "const" only confuses MSVC12(and maybe later) provoking
+//compiler error C2752 ("more than one partial specialization matches").
+//Any problem is solvable with an extra layer of indirection? ;-)
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy<Allocator, Iterator
+ , typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
+ >
+ : public insert_copy_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
+ : insert_copy_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type &>
+ : public insert_copy_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
+ : insert_copy_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy<Allocator, Iterator
+ , typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
+ >
+ : public insert_copy_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy(const typename boost::container::allocator_traits<Allocator>::value_type &v)
+ : insert_copy_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+}}} //namespace boost { namespace container { namespace dtl {
+
+#else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+#include <boost/container/detail/value_init.hpp>
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+#define BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE(N) \
+template< class Allocator, class Iterator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+struct insert_nonmovable_emplace_proxy##N\
+{\
+ typedef boost::container::allocator_traits<Allocator> alloc_traits;\
+ typedef typename alloc_traits::size_type size_type;\
+ typedef typename alloc_traits::value_type value_type;\
+ \
+ explicit insert_nonmovable_emplace_proxy##N(BOOST_MOVE_UREF##N)\
+ BOOST_MOVE_COLON##N BOOST_MOVE_FWD_INIT##N {}\
+ \
+ void uninitialized_copy_n_and_update(Allocator &a, Iterator p, size_type n)\
+ {\
+ BOOST_ASSERT(n == 1); (void)n;\
+ alloc_traits::construct(a, boost::movelib::iterator_to_raw_pointer(p) BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
+ }\
+ \
+ void copy_n_and_update(Allocator &, Iterator, size_type)\
+ { BOOST_ASSERT(false); }\
+ \
+ protected:\
+ BOOST_MOVE_MREF##N\
+};\
+\
+template< class Allocator, class Iterator BOOST_MOVE_I##N BOOST_MOVE_CLASS##N >\
+struct insert_emplace_proxy_arg##N\
+ : insert_nonmovable_emplace_proxy##N< Allocator, Iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N >\
+{\
+ typedef insert_nonmovable_emplace_proxy##N\
+ < Allocator, Iterator BOOST_MOVE_I##N BOOST_MOVE_TARG##N > base_t;\
+ typedef typename base_t::value_type value_type;\
+ typedef typename base_t::size_type size_type;\
+ typedef boost::container::allocator_traits<Allocator> alloc_traits;\
+ \
+ explicit insert_emplace_proxy_arg##N(BOOST_MOVE_UREF##N)\
+ : base_t(BOOST_MOVE_FWD##N){}\
+ \
+ void copy_n_and_update(Allocator &a, Iterator p, size_type n)\
+ {\
+ BOOST_ASSERT(n == 1); (void)n;\
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
+ BOOST_ASSERT((((size_type)(&v)) % alignment_of<value_type>::value) == 0);\
+ value_type *vp = reinterpret_cast<value_type *>(v.data);\
+ alloc_traits::construct(a, vp BOOST_MOVE_I##N BOOST_MOVE_MFWD##N);\
+ BOOST_TRY{\
+ *p = ::boost::move(*vp);\
+ }\
+ BOOST_CATCH(...){\
+ alloc_traits::destroy(a, vp);\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+ alloc_traits::destroy(a, vp);\
+ }\
+};\
+//
+BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE)
+#undef BOOST_CONTAINER_ADVANCED_INSERT_INT_CODE
+
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy_arg1<Allocator, Iterator, ::boost::rv<typename boost::container::allocator_traits<Allocator>::value_type> >
+ : public insert_move_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &v)
+ : insert_move_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type>
+ : public insert_copy_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
+ : insert_copy_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+#else //e.g. MSVC10 & MSVC11
+
+//Specializations to avoid an unneeded temporary when emplacing from a single argument o type value_type
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type>
+ : public insert_move_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy_arg1(typename boost::container::allocator_traits<Allocator>::value_type &&v)
+ : insert_move_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+//We use "add_const" here as adding "const" only confuses MSVC10&11 provoking
+//compiler error C2752 ("more than one partial specialization matches").
+//Any problem is solvable with an extra layer of indirection? ;-)
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy_arg1<Allocator, Iterator
+ , typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type
+ >
+ : public insert_copy_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
+ : insert_copy_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy_arg1<Allocator, Iterator, typename boost::container::allocator_traits<Allocator>::value_type &>
+ : public insert_copy_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
+ : insert_copy_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+template<class Allocator, class Iterator>
+struct insert_emplace_proxy_arg1<Allocator, Iterator
+ , typename boost::container::dtl::add_const<typename boost::container::allocator_traits<Allocator>::value_type>::type &
+ >
+ : public insert_copy_proxy<Allocator, Iterator>
+{
+ explicit insert_emplace_proxy_arg1(const typename boost::container::allocator_traits<Allocator>::value_type &v)
+ : insert_copy_proxy<Allocator, Iterator>(v)
+ {}
+};
+
+#endif
+
+}}} //namespace boost { namespace container { namespace dtl {
+
+#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_ADVANCED_INSERT_INT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/algorithm.hpp b/src/third_party/boost-1.69.0/boost/container/detail/algorithm.hpp
index 11844220e1c..11844220e1c 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/algorithm.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/algorithm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/alloc_helpers.hpp b/src/third_party/boost-1.69.0/boost/container/detail/alloc_helpers.hpp
index 57c59e46c1b..57c59e46c1b 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/alloc_helpers.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/alloc_helpers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/alloc_lib.h b/src/third_party/boost-1.69.0/boost/container/detail/alloc_lib.h
index 950ff722a52..950ff722a52 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/alloc_lib.h
+++ b/src/third_party/boost-1.69.0/boost/container/detail/alloc_lib.h
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/allocation_type.hpp b/src/third_party/boost-1.69.0/boost/container/detail/allocation_type.hpp
index 1e8aa673108..1e8aa673108 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/allocation_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/allocation_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/allocator_version_traits.hpp b/src/third_party/boost-1.69.0/boost/container/detail/allocator_version_traits.hpp
new file mode 100644
index 00000000000..d037e0e3924
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/allocator_version_traits.hpp
@@ -0,0 +1,163 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2012-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP
+#define BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+#include <boost/container/allocator_traits.hpp> //allocator_traits
+#include <boost/container/throw_exception.hpp>
+#include <boost/container/detail/multiallocation_chain.hpp> //multiallocation_chain
+#include <boost/container/detail/version_type.hpp> //version_type
+#include <boost/container/detail/allocation_type.hpp> //allocation_type
+#include <boost/container/detail/mpl.hpp> //integral_constant
+#include <boost/intrusive/pointer_traits.hpp> //pointer_traits
+#include <boost/core/no_exceptions_support.hpp> //BOOST_TRY
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+template<class Allocator, unsigned Version = boost::container::dtl::version<Allocator>::value>
+struct allocator_version_traits
+{
+ typedef ::boost::container::dtl::integral_constant
+ <unsigned, Version> alloc_version;
+
+ typedef typename Allocator::multiallocation_chain multiallocation_chain;
+
+ typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
+
+ //Node allocation interface
+ static pointer allocate_one(Allocator &a)
+ { return a.allocate_one(); }
+
+ static void deallocate_one(Allocator &a, const pointer &p)
+ { a.deallocate_one(p); }
+
+ static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m)
+ { return a.allocate_individual(n, m); }
+
+ static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
+ { a.deallocate_individual(holder); }
+
+ static pointer allocation_command(Allocator &a, allocation_type command,
+ size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
+ { return a.allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); }
+};
+
+template<class Allocator>
+struct allocator_version_traits<Allocator, 1>
+{
+ typedef ::boost::container::dtl::integral_constant
+ <unsigned, 1> alloc_version;
+
+ typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
+
+ typedef typename boost::intrusive::pointer_traits<pointer>::
+ template rebind_pointer<void>::type void_ptr;
+ typedef dtl::basic_multiallocation_chain
+ <void_ptr> multialloc_cached_counted;
+ typedef boost::container::dtl::
+ transform_multiallocation_chain
+ < multialloc_cached_counted, value_type> multiallocation_chain;
+
+ //Node allocation interface
+ static pointer allocate_one(Allocator &a)
+ { return a.allocate(1); }
+
+ static void deallocate_one(Allocator &a, const pointer &p)
+ { a.deallocate(p, 1); }
+
+ static void deallocate_individual(Allocator &a, multiallocation_chain &holder)
+ {
+ size_type n = holder.size();
+ typename multiallocation_chain::iterator it = holder.begin();
+ while(n){
+ --n;
+ pointer p = boost::intrusive::pointer_traits<pointer>::pointer_to(*it);
+ ++it;
+ a.deallocate(p, 1);
+ }
+ }
+
+ struct allocate_individual_rollback
+ {
+ allocate_individual_rollback(Allocator &a, multiallocation_chain &chain)
+ : mr_a(a), mp_chain(&chain)
+ {}
+
+ ~allocate_individual_rollback()
+ {
+ if(mp_chain)
+ allocator_version_traits::deallocate_individual(mr_a, *mp_chain);
+ }
+
+ void release()
+ {
+ mp_chain = 0;
+ }
+
+ Allocator &mr_a;
+ multiallocation_chain * mp_chain;
+ };
+
+ static void allocate_individual(Allocator &a, size_type n, multiallocation_chain &m)
+ {
+ allocate_individual_rollback rollback(a, m);
+ while(n--){
+ m.push_front(a.allocate(1));
+ }
+ rollback.release();
+ }
+
+ static pointer allocation_command(Allocator &a, allocation_type command,
+ size_type, size_type &prefer_in_recvd_out_size, pointer &reuse)
+ {
+ pointer ret = pointer();
+ if(BOOST_UNLIKELY(!(command & allocate_new) && !(command & nothrow_allocation))){
+ throw_logic_error("version 1 allocator without allocate_new flag");
+ }
+ else{
+ BOOST_TRY{
+ ret = a.allocate(prefer_in_recvd_out_size);
+ }
+ BOOST_CATCH(...){
+ if(!(command & nothrow_allocation)){
+ BOOST_RETHROW
+ }
+ }
+ BOOST_CATCH_END
+ reuse = pointer();
+ }
+ return ret;
+ }
+};
+
+} //namespace dtl {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // ! defined(BOOST_CONTAINER_DETAIL_ALLOCATOR_VERSION_TRAITS_HPP)
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/auto_link.hpp b/src/third_party/boost-1.69.0/boost/container/detail/auto_link.hpp
index 264b1ba1120..264b1ba1120 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/auto_link.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/auto_link.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/block_list.hpp b/src/third_party/boost-1.69.0/boost/container/detail/block_list.hpp
index 1a6057cb4a7..1a6057cb4a7 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/block_list.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/block_list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/block_slist.hpp b/src/third_party/boost-1.69.0/boost/container/detail/block_slist.hpp
index 278e6414a74..278e6414a74 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/block_slist.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/block_slist.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/compare_functors.hpp b/src/third_party/boost-1.69.0/boost/container/detail/compare_functors.hpp
new file mode 100644
index 00000000000..2c8dc6a1fe5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/compare_functors.hpp
@@ -0,0 +1,130 @@
+///////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+///////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP
+#define BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+
+namespace boost {
+namespace container {
+
+template<class Allocator>
+class equal_to_value
+{
+ typedef typename Allocator::value_type value_type;
+ const value_type &t_;
+
+ public:
+ explicit equal_to_value(const value_type &t)
+ : t_(t)
+ {}
+
+ bool operator()(const value_type &t)const
+ { return t_ == t; }
+};
+
+template<class Node, class Pred, class Ret = bool>
+struct value_to_node_compare
+ : Pred
+{
+ typedef Pred predicate_type;
+ typedef Node node_type;
+
+ value_to_node_compare()
+ : Pred()
+ {}
+
+ explicit value_to_node_compare(Pred pred)
+ : Pred(pred)
+ {}
+
+ Ret operator()(const Node &a, const Node &b) const
+ { return static_cast<const Pred&>(*this)(a.get_data(), b.get_data()); }
+
+ Ret operator()(const Node &a) const
+ { return static_cast<const Pred&>(*this)(a.get_data()); }
+
+ Ret operator()(const Node &a, const Node &b)
+ { return static_cast<Pred&>(*this)(a.get_data(), b.get_data()); }
+
+ Ret operator()(const Node &a)
+ { return static_cast<Pred&>(*this)(a.get_data()); }
+
+ predicate_type & predicate() { return static_cast<predicate_type&>(*this); }
+ const predicate_type & predicate() const { return static_cast<predicate_type&>(*this); }
+};
+
+template<class KeyPred, class KeyOfValue, class Node, class Ret = bool>
+struct key_node_pred
+ : public boost::intrusive::detail::ebo_functor_holder<KeyPred>
+{
+ BOOST_CONTAINER_FORCEINLINE explicit key_node_pred(const KeyPred &comp)
+ : base_t(comp)
+ {}
+
+ typedef boost::intrusive::detail::ebo_functor_holder<KeyPred> base_t;
+ typedef KeyPred key_predicate;
+ typedef KeyOfValue key_of_value;
+ typedef typename KeyOfValue::type key_type;
+
+
+ BOOST_CONTAINER_FORCEINLINE static const key_type &key_from(const Node &n)
+ {
+ return key_of_value()(n.get_data());
+ }
+
+ template <class T>
+ BOOST_CONTAINER_FORCEINLINE static const T &
+ key_from(const T &t)
+ { return t; }
+
+ BOOST_CONTAINER_FORCEINLINE const key_predicate &key_pred() const
+ { return static_cast<const key_predicate &>(*this); }
+
+ BOOST_CONTAINER_FORCEINLINE key_predicate &key_pred()
+ { return static_cast<key_predicate &>(*this); }
+
+ BOOST_CONTAINER_FORCEINLINE Ret operator()(const key_type &key) const
+ { return this->key_pred()(key); }
+
+ template<class U>
+ BOOST_CONTAINER_FORCEINLINE Ret operator()(const U &nonkey) const
+ { return this->key_pred()(this->key_from(nonkey)); }
+
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
+ { return this->key_pred()(key1, key2); }
+
+ template<class U>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
+ { return this->key_pred()(key1, this->key_from(nonkey2)); }
+
+ template<class U>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
+ { return this->key_pred()(this->key_from(nonkey1), key2); }
+
+ template<class U, class V>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
+ { return this->key_pred()(this->key_from(nonkey1), this->key_from(nonkey2)); }
+};
+
+
+} //namespace container {
+} //namespace boost {
+
+#endif //BOOST_CONTAINER_DETAIL_COMPARE_FUNCTORS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/config_begin.hpp b/src/third_party/boost-1.69.0/boost/container/detail/config_begin.hpp
index 4df9e35d8bc..4df9e35d8bc 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/config_begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/config_begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/config_end.hpp b/src/third_party/boost-1.69.0/boost/container/detail/config_end.hpp
index f93c8f6f79b..f93c8f6f79b 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/config_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/config_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/construct_in_place.hpp b/src/third_party/boost-1.69.0/boost/container/detail/construct_in_place.hpp
index b131f06a862..b131f06a862 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/construct_in_place.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/construct_in_place.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/container_or_allocator_rebind.hpp b/src/third_party/boost-1.69.0/boost/container/detail/container_or_allocator_rebind.hpp
index d74df6c966a..d74df6c966a 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/container_or_allocator_rebind.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/container_or_allocator_rebind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/container_rebind.hpp b/src/third_party/boost-1.69.0/boost/container/detail/container_rebind.hpp
index 0ebb4789e40..0ebb4789e40 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/container_rebind.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/container_rebind.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/copy_move_algo.hpp b/src/third_party/boost-1.69.0/boost/container/detail/copy_move_algo.hpp
new file mode 100644
index 00000000000..29d47ccbda5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/copy_move_algo.hpp
@@ -0,0 +1,1169 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
+#define BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+// container
+#include <boost/container/allocator_traits.hpp>
+// container/detail
+#include <boost/container/detail/iterator.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/construct_in_place.hpp>
+
+// move
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/iterator.hpp>
+#include <boost/move/utility_core.hpp>
+// other
+#include <boost/core/no_exceptions_support.hpp>
+// std
+#include <cstring> //for memmove/memcpy
+
+#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
+#pragma GCC diagnostic push
+//pair memcpy optimizations rightfully detected by GCC
+# if defined(BOOST_GCC) && (BOOST_GCC >= 80000)
+# pragma GCC diagnostic ignored "-Wclass-memaccess"
+# endif
+//GCC 8 seems a bit confused about array access error with static_vector
+//when out of bound exceptions are being thrown.
+# if defined(BOOST_GCC) && (BOOST_GCC >= 80000) && (BOOST_GCC < 80200)
+# pragma GCC diagnostic ignored "-Wstringop-overflow"
+# endif
+# pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+template<class I>
+struct are_elements_contiguous
+{
+ static const bool value = false;
+};
+
+/////////////////////////
+// raw pointers
+/////////////////////////
+
+template<class T>
+struct are_elements_contiguous<T*>
+{
+ static const bool value = true;
+};
+
+/////////////////////////
+// move iterators
+/////////////////////////
+
+template<class It>
+struct are_elements_contiguous< ::boost::move_iterator<It> >
+ : are_elements_contiguous<It>
+{};
+
+} //namespace dtl {
+
+/////////////////////////
+// predeclarations
+/////////////////////////
+
+template <class Pointer, bool IsConst>
+class vec_iterator;
+
+} //namespace container {
+
+namespace interprocess {
+
+template <class PointedType, class DifferenceType, class OffsetType, std::size_t OffsetAlignment>
+class offset_ptr;
+
+} //namespace interprocess {
+
+namespace container {
+
+namespace dtl {
+
+/////////////////////////
+//vector_[const_]iterator
+/////////////////////////
+
+template <class Pointer, bool IsConst>
+struct are_elements_contiguous<boost::container::vec_iterator<Pointer, IsConst> >
+{
+ static const bool value = true;
+};
+
+/////////////////////////
+// offset_ptr
+/////////////////////////
+
+template <class PointedType, class DifferenceType, class OffsetType, std::size_t OffsetAlignment>
+struct are_elements_contiguous< ::boost::interprocess::offset_ptr<PointedType, DifferenceType, OffsetType, OffsetAlignment> >
+{
+ static const bool value = true;
+};
+
+template <typename I, typename O>
+struct are_contiguous_and_same
+ : boost::move_detail::and_
+ < are_elements_contiguous<I>
+ , are_elements_contiguous<O>
+ , is_same< typename remove_const< typename ::boost::container::iterator_traits<I>::value_type >::type
+ , typename ::boost::container::iterator_traits<O>::value_type
+ >
+ >
+{};
+
+template <typename I, typename O>
+struct is_memtransfer_copy_assignable
+ : boost::move_detail::and_
+ < are_contiguous_and_same<I, O>
+ , dtl::is_trivially_copy_assignable< typename ::boost::container::iterator_traits<I>::value_type >
+ >
+{};
+
+template <typename I, typename O>
+struct is_memtransfer_copy_constructible
+ : boost::move_detail::and_
+ < are_contiguous_and_same<I, O>
+ , dtl::is_trivially_copy_constructible< typename ::boost::container::iterator_traits<I>::value_type >
+ >
+{};
+
+template <typename I, typename O, typename R>
+struct enable_if_memtransfer_copy_constructible
+ : enable_if<dtl::is_memtransfer_copy_constructible<I, O>, R>
+{};
+
+template <typename I, typename O, typename R>
+struct disable_if_memtransfer_copy_constructible
+ : disable_if<dtl::is_memtransfer_copy_constructible<I, O>, R>
+{};
+
+template <typename I, typename O, typename R>
+struct enable_if_memtransfer_copy_assignable
+ : enable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
+{};
+
+template <typename I, typename O, typename R>
+struct disable_if_memtransfer_copy_assignable
+ : disable_if<dtl::is_memtransfer_copy_assignable<I, O>, R>
+{};
+
+template
+ <typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline F memmove(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{
+ typedef typename boost::container::iterator_traits<I>::value_type value_type;
+ value_type *const dest_raw = boost::movelib::iterator_to_raw_pointer(r);
+ const value_type *const beg_raw = boost::movelib::iterator_to_raw_pointer(f);
+ const value_type *const end_raw = boost::movelib::iterator_to_raw_pointer(l);
+ if(BOOST_LIKELY(beg_raw != end_raw)){
+ BOOST_ASSERT(beg_raw != 0);
+ const typename boost::container::iterator_traits<I>::difference_type n = end_raw - beg_raw;
+ std::memmove(dest_raw, beg_raw, sizeof(value_type)*n);
+ boost::container::iterator_advance(r, n);
+ }
+ return r;
+}
+
+template
+ <typename I, // I models InputIterator
+ typename U, // U models unsigned integral constant
+ typename F> // F models ForwardIterator
+F memmove_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{
+ typedef typename boost::container::iterator_traits<I>::value_type value_type;
+ if(BOOST_LIKELY(n)){
+ std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
+ boost::container::iterator_advance(r, n);
+ }
+
+ return r;
+}
+
+template
+ <typename I, // I models InputIterator
+ typename U, // U models unsigned integral constant
+ typename F> // F models ForwardIterator
+I memmove_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{
+ if(BOOST_LIKELY(n)){
+ typedef typename boost::container::iterator_traits<I>::value_type value_type;
+ std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
+ boost::container::iterator_advance(f, n);
+ }
+ return f;
+}
+
+template
+ <typename I, // I models InputIterator
+ typename U, // U models unsigned integral constant
+ typename F> // F models ForwardIterator
+I memmove_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
+{
+ typedef typename boost::container::iterator_traits<I>::value_type value_type;
+ if(BOOST_LIKELY(n)){
+ std::memmove(boost::movelib::iterator_to_raw_pointer(r), boost::movelib::iterator_to_raw_pointer(f), sizeof(value_type)*n);
+ boost::container::iterator_advance(f, n);
+ boost::container::iterator_advance(r, n);
+ }
+ return f;
+}
+
+template <typename O>
+struct is_memzero_initializable
+{
+ typedef typename ::boost::container::iterator_traits<O>::value_type value_type;
+ static const bool value = are_elements_contiguous<O>::value &&
+ ( dtl::is_integral<value_type>::value || dtl::is_enum<value_type>::value
+ #if defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
+ || dtl::is_pointer<value_type>::value
+ #endif
+ #if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO)
+ || dtl::is_floating_point<value_type>::value
+ #endif
+ #if defined(BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO) && defined(BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL)
+ || dtl::is_pod<value_type>::value
+ #endif
+ );
+};
+
+template <typename O, typename R>
+struct enable_if_memzero_initializable
+ : enable_if_c<dtl::is_memzero_initializable<O>::value, R>
+{};
+
+template <typename O, typename R>
+struct disable_if_memzero_initializable
+ : enable_if_c<!dtl::is_memzero_initializable<O>::value, R>
+{};
+
+template <typename I, typename R>
+struct enable_if_trivially_destructible
+ : enable_if_c < dtl::is_trivially_destructible
+ <typename boost::container::iterator_traits<I>::value_type>::value
+ , R>
+{};
+
+template <typename I, typename R>
+struct disable_if_trivially_destructible
+ : enable_if_c <!dtl::is_trivially_destructible
+ <typename boost::container::iterator_traits<I>::value_type>::value
+ , R>
+{};
+
+} //namespace dtl {
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_move_alloc
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+//! <b>Effects</b>:
+//! \code
+//! for (; f != l; ++r, ++f)
+//! allocator_traits::construct(a, &*r, boost::move(*f));
+//! \endcode
+//!
+//! <b>Returns</b>: r
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
+ uninitialized_move_alloc(Allocator &a, I f, I l, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (f != l) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
+ ++f; ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
+ uninitialized_move_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove(f, l, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_move_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; n--; ++r, ++f)
+//! allocator_traits::construct(a, &*r, boost::move(*f));
+//! \endcode
+//!
+//! <b>Returns</b>: r
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
+ uninitialized_move_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (n--) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
+ ++f; ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
+ uninitialized_move_alloc_n(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_move_alloc_n_source
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; n--; ++r, ++f)
+//! allocator_traits::construct(a, &*r, boost::move(*f));
+//! \endcode
+//!
+//! <b>Returns</b>: f (after incremented)
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
+ uninitialized_move_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (n--) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), boost::move(*f));
+ ++f; ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return f;
+}
+
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, I>::type
+ uninitialized_move_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n_source(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_copy_alloc
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; f != l; ++r, ++f)
+//! allocator_traits::construct(a, &*r, *f);
+//! \endcode
+//!
+//! <b>Returns</b>: r
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
+ uninitialized_copy_alloc(Allocator &a, I f, I l, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (f != l) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f);
+ ++f; ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
+ uninitialized_copy_alloc(Allocator &, I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove(f, l, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_copy_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; n--; ++r, ++f)
+//! allocator_traits::construct(a, &*r, *f);
+//! \endcode
+//!
+//! <b>Returns</b>: r
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, F>::type
+ uninitialized_copy_alloc_n(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (n--) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), *f);
+ ++f; ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, F>::type
+ uninitialized_copy_alloc_n(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_copy_alloc_n_source
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; n--; ++r, ++f)
+//! allocator_traits::construct(a, &*r, *f);
+//! \endcode
+//!
+//! <b>Returns</b>: f (after incremented)
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_constructible<I, F, I>::type
+ uninitialized_copy_alloc_n_source(Allocator &a, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (n--) {
+ boost::container::construct_in_place(a, boost::movelib::iterator_to_raw_pointer(r), f);
+ ++f; ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return f;
+}
+
+template
+ <typename Allocator,
+ typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_constructible<I, F, I>::type
+ uninitialized_copy_alloc_n_source(Allocator &, I f, typename boost::container::allocator_traits<Allocator>::size_type n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n_source(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_value_init_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; n--; ++r, ++f)
+//! allocator_traits::construct(a, &*r);
+//! \endcode
+//!
+//! <b>Returns</b>: r
+template
+ <typename Allocator,
+ typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memzero_initializable<F, F>::type
+ uninitialized_value_init_alloc_n(Allocator &a, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (n--) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r));
+ ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+template
+ <typename Allocator,
+ typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memzero_initializable<F, F>::type
+ uninitialized_value_init_alloc_n(Allocator &, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
+{
+ typedef typename boost::container::iterator_traits<F>::value_type value_type;
+ std::memset((void*)boost::movelib::iterator_to_raw_pointer(r), 0, sizeof(value_type)*n);
+ boost::container::iterator_advance(r, n);
+ return r;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_default_init_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; n--; ++r, ++f)
+//! allocator_traits::construct(a, &*r);
+//! \endcode
+//!
+//! <b>Returns</b>: r
+template
+ <typename Allocator,
+ typename F> // F models ForwardIterator
+inline F uninitialized_default_init_alloc_n(Allocator &a, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (n--) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), default_init);
+ ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_fill_alloc
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; f != l; ++r, ++f)
+//! allocator_traits::construct(a, &*r, *f);
+//! \endcode
+//!
+//! <b>Returns</b>: r
+template
+ <typename Allocator,
+ typename F, // F models ForwardIterator
+ typename T>
+inline void uninitialized_fill_alloc(Allocator &a, F f, F l, const T &t)
+{
+ F back = f;
+ BOOST_TRY{
+ while (f != l) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(f), t);
+ ++f;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != l; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_fill_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; n--; ++r, ++f)
+//! allocator_traits::construct(a, &*r, v);
+//! \endcode
+//!
+//! <b>Returns</b>: r
+template
+ <typename Allocator,
+ typename T,
+ typename F> // F models ForwardIterator
+inline F uninitialized_fill_alloc_n(Allocator &a, const T &v, typename boost::container::allocator_traits<Allocator>::size_type n, F r)
+{
+ F back = r;
+ BOOST_TRY{
+ while (n--) {
+ allocator_traits<Allocator>::construct(a, boost::movelib::iterator_to_raw_pointer(r), v);
+ ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(back));
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// copy
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
+ copy(I f, I l, F r)
+{
+ while (f != l) {
+ *r = *f;
+ ++f; ++r;
+ }
+ return r;
+}
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
+ copy(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove(f, l, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// copy_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I, // I models InputIterator
+typename U, // U models unsigned integral constant
+typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
+ copy_n(I f, U n, F r)
+{
+ while (n) {
+ --n;
+ *r = *f;
+ ++f; ++r;
+ }
+ return r;
+}
+
+template
+<typename I, // I models InputIterator
+typename U, // U models unsigned integral constant
+typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
+ copy_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// copy_n_source
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I, // I models InputIterator
+typename U, // U models unsigned integral constant
+typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
+ copy_n_source(I f, U n, F r)
+{
+ while (n--) {
+ boost::container::assign_in_place(r, f);
+ ++f; ++r;
+ }
+ return f;
+}
+
+template
+<typename I, // I models InputIterator
+typename U, // U models unsigned integral constant
+typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
+ copy_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n_source(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// copy_n_source_dest
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I, // I models InputIterator
+typename U, // U models unsigned integral constant
+typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
+ copy_n_source_dest(I f, U n, F &r)
+{
+ while (n--) {
+ *r = *f;
+ ++f; ++r;
+ }
+ return f;
+}
+
+template
+<typename I, // I models InputIterator
+typename U, // U models unsigned integral constant
+typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
+ copy_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n_source_dest(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
+ move(I f, I l, F r)
+{
+ while (f != l) {
+ *r = ::boost::move(*f);
+ ++f; ++r;
+ }
+ return r;
+}
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
+ move(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove(f, l, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// move_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I, // I models InputIterator
+typename U, // U models unsigned integral constant
+typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
+ move_n(I f, U n, F r)
+{
+ while (n--) {
+ *r = ::boost::move(*f);
+ ++f; ++r;
+ }
+ return r;
+}
+
+template
+<typename I, // I models InputIterator
+typename U, // U models unsigned integral constant
+typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
+ move_n(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n(f, n, r); }
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// move_backward
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I, // I models BidirectionalIterator
+typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, F>::type
+ move_backward(I f, I l, F r)
+{
+ while (f != l) {
+ --l; --r;
+ *r = ::boost::move(*l);
+ }
+ return r;
+}
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, F>::type
+ move_backward(I f, I l, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{
+ typedef typename boost::container::iterator_traits<I>::value_type value_type;
+ const typename boost::container::iterator_traits<I>::difference_type n = boost::container::iterator_distance(f, l);
+ r -= n;
+ std::memmove((boost::movelib::iterator_to_raw_pointer)(r), (boost::movelib::iterator_to_raw_pointer)(f), sizeof(value_type)*n);
+ return r;
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// move_n_source_dest
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I // I models InputIterator
+,typename U // U models unsigned integral constant
+,typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
+ move_n_source_dest(I f, U n, F &r)
+{
+ while (n--) {
+ *r = ::boost::move(*f);
+ ++f; ++r;
+ }
+ return f;
+}
+
+template
+<typename I // I models InputIterator
+,typename U // U models unsigned integral constant
+,typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
+ move_n_source_dest(I f, U n, F &r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n_source_dest(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// move_n_source
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+<typename I // I models InputIterator
+,typename U // U models unsigned integral constant
+,typename F> // F models ForwardIterator
+inline typename dtl::disable_if_memtransfer_copy_assignable<I, F, I>::type
+ move_n_source(I f, U n, F r)
+{
+ while (n--) {
+ *r = ::boost::move(*f);
+ ++f; ++r;
+ }
+ return f;
+}
+
+template
+<typename I // I models InputIterator
+,typename U // U models unsigned integral constant
+,typename F> // F models ForwardIterator
+inline typename dtl::enable_if_memtransfer_copy_assignable<I, F, I>::type
+ move_n_source(I f, U n, F r) BOOST_NOEXCEPT_OR_NOTHROW
+{ return dtl::memmove_n_source(f, n, r); }
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// destroy_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+ <typename Allocator
+ ,typename I // I models InputIterator
+ ,typename U> // U models unsigned integral constant
+inline typename dtl::disable_if_trivially_destructible<I, void>::type
+ destroy_alloc_n(Allocator &a, I f, U n)
+{
+ while(n){
+ --n;
+ allocator_traits<Allocator>::destroy(a, boost::movelib::iterator_to_raw_pointer(f));
+ ++f;
+ }
+}
+
+template
+ <typename Allocator
+ ,typename I // I models InputIterator
+ ,typename U> // U models unsigned integral constant
+inline typename dtl::enable_if_trivially_destructible<I, void>::type
+ destroy_alloc_n(Allocator &, I, U)
+{}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// deep_swap_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+ <std::size_t MaxTmpBytes
+ ,typename Allocator
+ ,typename F // F models ForwardIterator
+ ,typename G // G models ForwardIterator
+ >
+inline typename dtl::disable_if_memtransfer_copy_assignable<F, G, void>::type
+ deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
+ , G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
+{
+ typename allocator_traits<Allocator>::size_type n = 0;
+ for (; n != n_i ; ++short_range_f, ++large_range_f, ++n){
+ boost::adl_move_swap(*short_range_f, *large_range_f);
+ }
+ boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw
+ boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i);
+}
+
+static const std::size_t DeepSwapAllocNMaxStorage = std::size_t(1) << std::size_t(11); //2K bytes
+
+template
+ <std::size_t MaxTmpBytes
+ ,typename Allocator
+ ,typename F // F models ForwardIterator
+ ,typename G // G models ForwardIterator
+ >
+inline typename dtl::enable_if_c
+ < dtl::is_memtransfer_copy_assignable<F, G>::value && (MaxTmpBytes <= DeepSwapAllocNMaxStorage) && false
+ , void>::type
+ deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
+ , G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
+{
+ typedef typename allocator_traits<Allocator>::value_type value_type;
+ typedef typename dtl::aligned_storage
+ <MaxTmpBytes, dtl::alignment_of<value_type>::value>::type storage_type;
+ storage_type storage;
+
+ const std::size_t n_i_bytes = sizeof(value_type)*n_i;
+ void *const large_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f));
+ void *const short_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f));
+ void *const stora_ptr = static_cast<void*>(boost::movelib::iterator_to_raw_pointer(storage.data));
+ std::memcpy(stora_ptr, large_ptr, n_i_bytes);
+ std::memcpy(large_ptr, short_ptr, n_i_bytes);
+ std::memcpy(short_ptr, stora_ptr, n_i_bytes);
+ boost::container::iterator_advance(large_range_f, n_i);
+ boost::container::iterator_advance(short_range_f, n_i);
+ boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw
+ boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i);
+}
+
+template
+ <std::size_t MaxTmpBytes
+ ,typename Allocator
+ ,typename F // F models ForwardIterator
+ ,typename G // G models ForwardIterator
+ >
+inline typename dtl::enable_if_c
+ < dtl::is_memtransfer_copy_assignable<F, G>::value && true//(MaxTmpBytes > DeepSwapAllocNMaxStorage)
+ , void>::type
+ deep_swap_alloc_n( Allocator &a, F short_range_f, typename allocator_traits<Allocator>::size_type n_i
+ , G large_range_f, typename allocator_traits<Allocator>::size_type n_j)
+{
+ typedef typename allocator_traits<Allocator>::value_type value_type;
+ typedef typename dtl::aligned_storage
+ <DeepSwapAllocNMaxStorage, dtl::alignment_of<value_type>::value>::type storage_type;
+ storage_type storage;
+ const std::size_t sizeof_storage = sizeof(storage);
+
+ std::size_t n_i_bytes = sizeof(value_type)*n_i;
+ char *large_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(large_range_f)));
+ char *short_ptr = static_cast<char*>(static_cast<void*>(boost::movelib::iterator_to_raw_pointer(short_range_f)));
+ char *stora_ptr = static_cast<char*>(static_cast<void*>(storage.data));
+
+ std::size_t szt_times = n_i_bytes/sizeof_storage;
+ const std::size_t szt_rem = n_i_bytes%sizeof_storage;
+
+ //Loop unrolling using Duff's device, as it seems it helps on some architectures
+ const std::size_t Unroll = 4;
+ std::size_t n = (szt_times + (Unroll-1))/Unroll;
+ const std::size_t branch_number = (!szt_times)*Unroll + (szt_times % Unroll);
+ switch(branch_number){
+ case 4:
+ break;
+ case 0: do{
+ std::memcpy(stora_ptr, large_ptr, sizeof_storage);
+ std::memcpy(large_ptr, short_ptr, sizeof_storage);
+ std::memcpy(short_ptr, stora_ptr, sizeof_storage);
+ large_ptr += sizeof_storage;
+ short_ptr += sizeof_storage;
+ BOOST_FALLTHROUGH;
+ case 3:
+ std::memcpy(stora_ptr, large_ptr, sizeof_storage);
+ std::memcpy(large_ptr, short_ptr, sizeof_storage);
+ std::memcpy(short_ptr, stora_ptr, sizeof_storage);
+ large_ptr += sizeof_storage;
+ short_ptr += sizeof_storage;
+ BOOST_FALLTHROUGH;
+ case 2:
+ std::memcpy(stora_ptr, large_ptr, sizeof_storage);
+ std::memcpy(large_ptr, short_ptr, sizeof_storage);
+ std::memcpy(short_ptr, stora_ptr, sizeof_storage);
+ large_ptr += sizeof_storage;
+ short_ptr += sizeof_storage;
+ BOOST_FALLTHROUGH;
+ case 1:
+ std::memcpy(stora_ptr, large_ptr, sizeof_storage);
+ std::memcpy(large_ptr, short_ptr, sizeof_storage);
+ std::memcpy(short_ptr, stora_ptr, sizeof_storage);
+ large_ptr += sizeof_storage;
+ short_ptr += sizeof_storage;
+ } while(--n);
+ }
+ std::memcpy(stora_ptr, large_ptr, szt_rem);
+ std::memcpy(large_ptr, short_ptr, szt_rem);
+ std::memcpy(short_ptr, stora_ptr, szt_rem);
+ boost::container::iterator_advance(large_range_f, n_i);
+ boost::container::iterator_advance(short_range_f, n_i);
+ boost::container::uninitialized_move_alloc_n(a, large_range_f, n_j - n_i, short_range_f); // may throw
+ boost::container::destroy_alloc_n(a, large_range_f, n_j - n_i);
+}
+
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// copy_assign_range_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+ <typename Allocator
+ ,typename I // F models InputIterator
+ ,typename O // G models OutputIterator
+ >
+void copy_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_traits<Allocator>::size_type n_i
+ , O out_start, typename allocator_traits<Allocator>::size_type n_o )
+{
+ if (n_o < n_i){
+ inp_start = boost::container::copy_n_source_dest(inp_start, n_o, out_start); // may throw
+ boost::container::uninitialized_copy_alloc_n(a, inp_start, n_i - n_o, out_start);// may throw
+ }
+ else{
+ out_start = boost::container::copy_n(inp_start, n_i, out_start); // may throw
+ boost::container::destroy_alloc_n(a, out_start, n_o - n_i);
+ }
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// move_assign_range_alloc_n
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template
+ <typename Allocator
+ ,typename I // F models InputIterator
+ ,typename O // G models OutputIterator
+ >
+void move_assign_range_alloc_n( Allocator &a, I inp_start, typename allocator_traits<Allocator>::size_type n_i
+ , O out_start, typename allocator_traits<Allocator>::size_type n_o )
+{
+ if (n_o < n_i){
+ inp_start = boost::container::move_n_source_dest(inp_start, n_o, out_start); // may throw
+ boost::container::uninitialized_move_alloc_n(a, inp_start, n_i - n_o, out_start); // may throw
+ }
+ else{
+ out_start = boost::container::move_n(inp_start, n_i, out_start); // may throw
+ boost::container::destroy_alloc_n(a, out_start, n_o - n_i);
+ }
+}
+
+} //namespace container {
+} //namespace boost {
+
+//#pragma GCC diagnostic ignored "-Wclass-memaccess"
+#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
+#pragma GCC diagnostic pop
+#endif
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_COPY_MOVE_ALGO_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/destroyers.hpp b/src/third_party/boost-1.69.0/boost/container/detail/destroyers.hpp
index 9b0be44e66b..9b0be44e66b 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/destroyers.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/destroyers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/dispatch_uses_allocator.hpp b/src/third_party/boost-1.69.0/boost/container/detail/dispatch_uses_allocator.hpp
index 0b8cfea66c1..0b8cfea66c1 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/dispatch_uses_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/dispatch_uses_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/dlmalloc.hpp b/src/third_party/boost-1.69.0/boost/container/detail/dlmalloc.hpp
index 15086c399fa..15086c399fa 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/dlmalloc.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/dlmalloc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/flat_tree.hpp b/src/third_party/boost-1.69.0/boost/container/detail/flat_tree.hpp
new file mode 100644
index 00000000000..e131cf1f55e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/flat_tree.hpp
@@ -0,0 +1,1630 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_FLAT_TREE_HPP
+#define BOOST_CONTAINER_FLAT_TREE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+#include <boost/container/container_fwd.hpp>
+
+#include <boost/move/utility_core.hpp>
+
+#include <boost/container/detail/pair.hpp>
+#include <boost/container/vector.hpp>
+#include <boost/container/allocator_traits.hpp>
+
+#include <boost/container/detail/value_init.hpp>
+#include <boost/container/detail/destroyers.hpp>
+#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
+#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/is_sorted.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/is_contiguous_container.hpp>
+#include <boost/container/detail/is_container.hpp>
+
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+
+#include <boost/move/make_unique.hpp>
+#include <boost/move/iterator.hpp>
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/algo/adaptive_sort.hpp>
+#include <boost/move/algo/detail/pdqsort.hpp>
+
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//merge_unique
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME merge_unique
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 3
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 3
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+//merge_equal
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME merge
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 3
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 3
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+//index_of
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME index_of
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+//nth
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME nth
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+//reserve
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME reserve
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 1
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 1
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+//capacity
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_FUNCNAME capacity
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_BEG namespace boost { namespace container { namespace dtl {
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_NS_END }}}
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MIN 0
+#define BOOST_INTRUSIVE_HAS_MEMBER_FUNCTION_CALLABLE_WITH_MAX 0
+#include <boost/intrusive/detail/has_member_function_callable_with.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+///////////////////////////////////////
+//
+// Helper functions to merge elements
+//
+///////////////////////////////////////
+
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(stored_allocator_type)
+
+///////////////////////////////////////
+//
+// flat_tree_container_inplace_merge
+//
+///////////////////////////////////////
+template<class SequenceContainer, class Compare>
+void flat_tree_container_inplace_merge //is_contiguous_container == true
+ (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp , dtl::true_)
+{
+ typedef typename SequenceContainer::value_type value_type;
+ value_type *const braw = boost::movelib::iterator_to_raw_pointer(dest.begin());
+ value_type *const iraw = boost::movelib::iterator_to_raw_pointer(it);
+ value_type *const eraw = boost::movelib::iterator_to_raw_pointer(dest.end());
+ boost::movelib::adaptive_merge(braw, iraw, eraw, comp, eraw, dest.capacity()- dest.size());
+}
+
+template<class SequenceContainer, class Compare>
+void flat_tree_container_inplace_merge //is_contiguous_container == false
+ (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp, dtl::false_)
+{
+ boost::movelib::adaptive_merge(dest.begin(), it, dest.end(), comp);
+}
+
+///////////////////////////////////////
+//
+// flat_tree_container_inplace_sort_ending
+//
+///////////////////////////////////////
+template<class SequenceContainer, class Compare>
+void flat_tree_container_inplace_sort_ending //is_contiguous_container == true
+ (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp, dtl::true_)
+{
+ typedef typename SequenceContainer::value_type value_type;
+ value_type *const iraw = boost::movelib::iterator_to_raw_pointer(it);
+ value_type *const eraw = boost::movelib::iterator_to_raw_pointer(dest.end());
+ boost::movelib::adaptive_sort(iraw, eraw, comp, eraw, dest.capacity()- dest.size());
+}
+
+template<class SequenceContainer, class Compare>
+void flat_tree_container_inplace_sort_ending //is_contiguous_container == false
+ (SequenceContainer& dest, typename SequenceContainer::iterator it, Compare comp , dtl::false_)
+{
+ boost::movelib::adaptive_sort(it, dest.end(), comp);
+}
+
+///////////////////////////////////////
+//
+// flat_tree_merge
+//
+///////////////////////////////////////
+template<class SequenceContainer, class Iterator, class Compare>
+BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal
+ (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::true_)
+{
+ dest.merge(first, last, comp);
+}
+
+template<class SequenceContainer, class Iterator, class Compare>
+BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_equal //has_merge_unique == false
+ (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::false_)
+{
+ typedef typename SequenceContainer::iterator iterator;
+ iterator const it = dest.insert( dest.end(), first, last );
+ dtl::bool_<is_contiguous_container<SequenceContainer>::value> contiguous_tag;
+ (flat_tree_container_inplace_merge)(dest, it, comp, contiguous_tag);
+}
+
+///////////////////////////////////////
+//
+// flat_tree_merge_unique
+//
+///////////////////////////////////////
+template<class SequenceContainer, class Iterator, class Compare>
+BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == true
+ (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::true_)
+{
+ dest.merge_unique(first, last, comp);
+}
+
+template<class SequenceContainer, class Iterator, class Compare>
+BOOST_CONTAINER_FORCEINLINE void flat_tree_merge_unique //has_merge_unique == false
+ (SequenceContainer& dest, Iterator first, Iterator last, Compare comp, dtl::false_)
+{
+ typedef typename SequenceContainer::iterator iterator;
+ typedef typename SequenceContainer::size_type size_type;
+
+ size_type const old_sz = dest.size();
+ iterator const first_new = dest.insert(dest.cend(), first, last );
+ iterator e = boost::movelib::inplace_set_difference(first_new, dest.end(), dest.begin(), first_new, comp);
+ dest.erase(e, dest.end());
+ dtl::bool_<is_contiguous_container<SequenceContainer>::value> contiguous_tag;
+ (flat_tree_container_inplace_merge)(dest, dest.begin()+old_sz, comp, contiguous_tag);
+}
+
+///////////////////////////////////////
+//
+// flat_tree_index_of
+//
+///////////////////////////////////////
+template<class SequenceContainer, class Iterator>
+BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
+ flat_tree_index_of // has_index_of == true
+ (SequenceContainer& cont, Iterator p, dtl::true_)
+{
+ return cont.index_of(p);
+}
+
+template<class SequenceContainer, class Iterator>
+BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
+ flat_tree_index_of // has_index_of == false
+ (SequenceContainer& cont, Iterator p, dtl::false_)
+{
+ typedef typename SequenceContainer::size_type size_type;
+ return static_cast<size_type>(p - cont.begin());
+}
+
+///////////////////////////////////////
+//
+// flat_tree_nth
+//
+///////////////////////////////////////
+template<class Iterator, class SequenceContainer>
+BOOST_CONTAINER_FORCEINLINE Iterator
+ flat_tree_nth // has_nth == true
+ (SequenceContainer& cont, typename SequenceContainer::size_type n, dtl::true_)
+{
+ return cont.nth(n);
+}
+
+template<class Iterator, class SequenceContainer>
+BOOST_CONTAINER_FORCEINLINE Iterator
+ flat_tree_nth // has_nth == false
+ (SequenceContainer& cont, typename SequenceContainer::size_type n, dtl::false_)
+{
+ return cont.begin()+ n;
+}
+
+///////////////////////////////////////
+//
+// flat_tree_get_stored_allocator
+//
+///////////////////////////////////////
+template<class SequenceContainer>
+BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::stored_allocator_type &
+ flat_tree_get_stored_allocator // has_get_stored_allocator == true
+ (SequenceContainer& cont, dtl::true_)
+{
+ return cont.get_stored_allocator();
+}
+
+template<class SequenceContainer>
+BOOST_CONTAINER_FORCEINLINE const typename SequenceContainer::stored_allocator_type &
+ flat_tree_get_stored_allocator // has_get_stored_allocator == true
+ (const SequenceContainer& cont, dtl::true_)
+{
+ return cont.get_stored_allocator();
+}
+
+template<class SequenceContainer>
+BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::allocator_type
+ flat_tree_get_stored_allocator // has_get_stored_allocator == false
+ (SequenceContainer& cont, dtl::false_)
+{
+ return cont.get_allocator();
+}
+
+///////////////////////////////////////
+//
+// flat_tree_adopt_sequence_equal
+//
+///////////////////////////////////////
+template<class SequenceContainer, class Compare>
+void flat_tree_sort_contiguous_to_adopt // is_contiguous_container == true
+ (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp)
+{
+ if(tseq.capacity() >= (seq.capacity() - seq.size())) {
+ tseq.clear();
+ boost::movelib::adaptive_sort
+ (boost::movelib::iterator_to_raw_pointer(seq.begin())
+ , boost::movelib::iterator_to_raw_pointer(seq.end())
+ , comp
+ , boost::movelib::iterator_to_raw_pointer(tseq.begin())
+ , tseq.capacity());
+ }
+ else{
+ boost::movelib::adaptive_sort
+ (boost::movelib::iterator_to_raw_pointer(seq.begin())
+ , boost::movelib::iterator_to_raw_pointer(seq.end())
+ , comp
+ , boost::movelib::iterator_to_raw_pointer(seq.end())
+ , seq.capacity() - seq.size());
+ }
+}
+
+template<class SequenceContainer, class Compare>
+void flat_tree_adopt_sequence_equal // is_contiguous_container == true
+ (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::true_)
+{
+ flat_tree_sort_contiguous_to_adopt(tseq, boost::move(seq), comp);
+ tseq = boost::move(seq);
+}
+
+template<class SequenceContainer, class Compare>
+void flat_tree_adopt_sequence_equal // is_contiguous_container == false
+ (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::false_)
+{
+ boost::movelib::adaptive_sort(seq.begin(), seq.end(), comp);
+ tseq = boost::move(seq);
+}
+
+///////////////////////////////////////
+//
+// flat_tree_adopt_sequence_unique
+//
+///////////////////////////////////////
+template<class SequenceContainer, class Compare>
+void flat_tree_adopt_sequence_unique// is_contiguous_container == true
+ (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::true_)
+{
+ boost::movelib::pdqsort
+ ( boost::movelib::iterator_to_raw_pointer(seq.begin())
+ , boost::movelib::iterator_to_raw_pointer(seq.end())
+ , comp);
+ seq.erase(boost::movelib::unique
+ (seq.begin(), seq.end(), boost::movelib::negate<Compare>(comp)), seq.cend());
+ tseq = boost::move(seq);
+}
+
+template<class SequenceContainer, class Compare>
+void flat_tree_adopt_sequence_unique// is_contiguous_container == false
+ (SequenceContainer &tseq, BOOST_RV_REF(SequenceContainer) seq, Compare comp, dtl::false_)
+{
+ boost::movelib::pdqsort(seq.begin(), seq.end(), comp);
+ seq.erase(boost::movelib::unique
+ (seq.begin(), seq.end(), boost::movelib::negate<Compare>(comp)), seq.cend());
+ tseq = boost::move(seq);
+}
+
+///////////////////////////////////////
+//
+// flat_tree_reserve
+//
+///////////////////////////////////////
+template<class SequenceContainer>
+BOOST_CONTAINER_FORCEINLINE void // has_reserve == true
+ flat_tree_reserve(SequenceContainer &tseq, typename SequenceContainer::size_type cap, dtl::true_)
+{
+ tseq.reserve(cap);
+}
+
+template<class SequenceContainer>
+BOOST_CONTAINER_FORCEINLINE void // has_reserve == false
+ flat_tree_reserve(SequenceContainer &, typename SequenceContainer::size_type, dtl::false_)
+{
+}
+
+///////////////////////////////////////
+//
+// flat_tree_capacity
+//
+///////////////////////////////////////
+template<class SequenceContainer> // has_capacity == true
+BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
+ flat_tree_capacity(const SequenceContainer &tseq, dtl::true_)
+{
+ return tseq.capacity();
+}
+
+template<class SequenceContainer> // has_capacity == false
+BOOST_CONTAINER_FORCEINLINE typename SequenceContainer::size_type
+ flat_tree_capacity(const SequenceContainer &tseq, dtl::false_)
+{
+ return tseq.size();
+}
+
+///////////////////////////////////////
+//
+// flat_tree_value_compare
+//
+///////////////////////////////////////
+
+template<class Compare, class Value, class KeyOfValue>
+class flat_tree_value_compare
+ : private Compare
+{
+ typedef Value first_argument_type;
+ typedef Value second_argument_type;
+ typedef bool return_type;
+ public:
+ flat_tree_value_compare()
+ : Compare()
+ {}
+
+ flat_tree_value_compare(const Compare &pred)
+ : Compare(pred)
+ {}
+
+ bool operator()(const Value& lhs, const Value& rhs) const
+ {
+ KeyOfValue key_extract;
+ return Compare::operator()(key_extract(lhs), key_extract(rhs));
+ }
+
+ const Compare &get_comp() const
+ { return *this; }
+
+ Compare &get_comp()
+ { return *this; }
+};
+
+///////////////////////////////////////
+//
+// select_container_type
+//
+///////////////////////////////////////
+template < class Value, class AllocatorOrContainer
+ , bool = boost::container::dtl::is_container<AllocatorOrContainer>::value >
+struct select_container_type
+{
+ typedef AllocatorOrContainer type;
+};
+
+template <class Value, class AllocatorOrContainer>
+struct select_container_type<Value, AllocatorOrContainer, false>
+{
+ typedef boost::container::vector<Value, AllocatorOrContainer> type;
+};
+
+
+///////////////////////////////////////
+//
+// flat_tree
+//
+///////////////////////////////////////
+template <class Value, class KeyOfValue,
+ class Compare, class AllocatorOrContainer>
+class flat_tree
+{
+ public:
+ typedef typename select_container_type<Value, AllocatorOrContainer>::type container_type;
+ typedef container_type sequence_type; //For backwards compatibility
+
+ private:
+ typedef typename container_type::allocator_type allocator_t;
+ typedef allocator_traits<allocator_t> allocator_traits_type;
+
+ public:
+ typedef flat_tree_value_compare<Compare, Value, KeyOfValue> value_compare;
+
+ private:
+
+ struct Data
+ //Inherit from value_compare to do EBO
+ : public value_compare
+ {
+ BOOST_COPYABLE_AND_MOVABLE(Data)
+
+ public:
+ Data()
+ : value_compare(), m_seq()
+ {}
+
+ explicit Data(const allocator_t &alloc)
+ : value_compare(), m_seq(alloc)
+ {}
+
+ explicit Data(const Compare &comp)
+ : value_compare(comp), m_seq()
+ {}
+
+ Data(const Compare &comp, const allocator_t &alloc)
+ : value_compare(comp), m_seq(alloc)
+ {}
+
+ explicit Data(const Data &d)
+ : value_compare(static_cast<const value_compare&>(d)), m_seq(d.m_seq)
+ {}
+
+ Data(BOOST_RV_REF(Data) d)
+ : value_compare(boost::move(static_cast<value_compare&>(d))), m_seq(boost::move(d.m_seq))
+ {}
+
+ Data(const Data &d, const allocator_t &a)
+ : value_compare(static_cast<const value_compare&>(d)), m_seq(d.m_seq, a)
+ {}
+
+ Data(BOOST_RV_REF(Data) d, const allocator_t &a)
+ : value_compare(boost::move(static_cast<value_compare&>(d))), m_seq(boost::move(d.m_seq), a)
+ {}
+
+ Data& operator=(BOOST_COPY_ASSIGN_REF(Data) d)
+ {
+ this->value_compare::operator=(d);
+ m_seq = d.m_seq;
+ return *this;
+ }
+
+ Data& operator=(BOOST_RV_REF(Data) d)
+ {
+ this->value_compare::operator=(boost::move(static_cast<value_compare &>(d)));
+ m_seq = boost::move(d.m_seq);
+ return *this;
+ }
+
+ void swap(Data &d)
+ {
+ value_compare& mycomp = *this, & othercomp = d;
+ boost::adl_move_swap(mycomp, othercomp);
+ this->m_seq.swap(d.m_seq);
+ }
+
+ container_type m_seq;
+ };
+
+ Data m_data;
+ BOOST_COPYABLE_AND_MOVABLE(flat_tree)
+
+ public:
+
+ typedef typename container_type::value_type value_type;
+ typedef typename container_type::pointer pointer;
+ typedef typename container_type::const_pointer const_pointer;
+ typedef typename container_type::reference reference;
+ typedef typename container_type::const_reference const_reference;
+ typedef typename KeyOfValue::type key_type;
+ typedef Compare key_compare;
+ typedef typename container_type::allocator_type allocator_type;
+ typedef typename container_type::size_type size_type;
+ typedef typename container_type::difference_type difference_type;
+ typedef typename container_type::iterator iterator;
+ typedef typename container_type::const_iterator const_iterator;
+ typedef typename container_type::reverse_iterator reverse_iterator;
+ typedef typename container_type::const_reverse_iterator const_reverse_iterator;
+
+ //!Standard extension
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ (boost::container::dtl::, container_type
+ ,stored_allocator_type, allocator_type) stored_allocator_type;
+
+ static const bool has_stored_allocator_type =
+ BOOST_INTRUSIVE_HAS_TYPE(boost::container::dtl::, container_type, stored_allocator_type);
+
+ private:
+ typedef allocator_traits<stored_allocator_type> stored_allocator_traits;
+
+ public:
+ typedef typename dtl::if_c
+ <has_stored_allocator_type, const stored_allocator_type &, allocator_type>::type get_stored_allocator_const_return_t;
+
+ typedef typename dtl::if_c
+ <has_stored_allocator_type, stored_allocator_type &, allocator_type>::type get_stored_allocator_noconst_return_t;
+
+ BOOST_CONTAINER_FORCEINLINE flat_tree()
+ : m_data()
+ { }
+
+ BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const Compare& comp)
+ : m_data(comp)
+ { }
+
+ BOOST_CONTAINER_FORCEINLINE explicit flat_tree(const allocator_type& a)
+ : m_data(a)
+ { }
+
+ BOOST_CONTAINER_FORCEINLINE flat_tree(const Compare& comp, const allocator_type& a)
+ : m_data(comp, a)
+ { }
+
+ BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x)
+ : m_data(x.m_data)
+ { }
+
+ BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : m_data(boost::move(x.m_data))
+ { }
+
+ BOOST_CONTAINER_FORCEINLINE flat_tree(const flat_tree& x, const allocator_type &a)
+ : m_data(x.m_data, a)
+ { }
+
+ BOOST_CONTAINER_FORCEINLINE flat_tree(BOOST_RV_REF(flat_tree) x, const allocator_type &a)
+ : m_data(boost::move(x.m_data), a)
+ { }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( ordered_range_t, InputIterator first, InputIterator last)
+ : m_data()
+ {
+ this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
+ BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : m_data(comp)
+ {
+ this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
+ BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : m_data(comp, a)
+ {
+ this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
+ BOOST_ASSERT((is_sorted)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last)
+ : m_data()
+ {
+ this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
+ BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : m_data(comp)
+ {
+ this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
+ BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : m_data(comp, a)
+ {
+ this->m_data.m_seq.insert(this->m_data.m_seq.end(), first, last);
+ BOOST_ASSERT((is_sorted_and_unique)(this->m_data.m_seq.cbegin(), this->m_data.m_seq.cend(), this->priv_value_comp()));
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( bool unique_insertion, InputIterator first, InputIterator last)
+ : m_data()
+ {
+ this->priv_range_insertion_construct(unique_insertion, first, last);
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( bool unique_insertion, InputIterator first, InputIterator last
+ , const Compare& comp)
+ : m_data(comp)
+ {
+ this->priv_range_insertion_construct(unique_insertion, first, last);
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( bool unique_insertion, InputIterator first, InputIterator last
+ , const allocator_type& a)
+ : m_data(a)
+ {
+ this->priv_range_insertion_construct(unique_insertion, first, last);
+ }
+
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_tree( bool unique_insertion, InputIterator first, InputIterator last
+ , const Compare& comp, const allocator_type& a)
+ : m_data(comp, a)
+ {
+ this->priv_range_insertion_construct(unique_insertion, first, last);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE ~flat_tree()
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_COPY_ASSIGN_REF(flat_tree) x)
+ { m_data = x.m_data; return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE flat_tree& operator=(BOOST_RV_REF(flat_tree) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { m_data = boost::move(x.m_data); return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE const value_compare &priv_value_comp() const
+ { return static_cast<const value_compare &>(this->m_data); }
+
+ BOOST_CONTAINER_FORCEINLINE value_compare &priv_value_comp()
+ { return static_cast<value_compare &>(this->m_data); }
+
+ BOOST_CONTAINER_FORCEINLINE const key_compare &priv_key_comp() const
+ { return this->priv_value_comp().get_comp(); }
+
+ BOOST_CONTAINER_FORCEINLINE key_compare &priv_key_comp()
+ { return this->priv_value_comp().get_comp(); }
+
+ struct insert_commit_data
+ {
+ const_iterator position;
+ };
+
+ public:
+ // accessors:
+ BOOST_CONTAINER_FORCEINLINE Compare key_comp() const
+ { return this->m_data.get_comp(); }
+
+ BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
+ { return this->m_data; }
+
+ BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
+ { return this->m_data.m_seq.get_allocator(); }
+
+ BOOST_CONTAINER_FORCEINLINE get_stored_allocator_const_return_t get_stored_allocator() const
+ {
+ return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_<has_stored_allocator_type>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE get_stored_allocator_noconst_return_t get_stored_allocator()
+ {
+ return flat_tree_get_stored_allocator(this->m_data.m_seq, dtl::bool_<has_stored_allocator_type>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE iterator begin()
+ { return this->m_data.m_seq.begin(); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator begin() const
+ { return this->cbegin(); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const
+ { return this->m_data.m_seq.begin(); }
+
+ BOOST_CONTAINER_FORCEINLINE iterator end()
+ { return this->m_data.m_seq.end(); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator end() const
+ { return this->cend(); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator cend() const
+ { return this->m_data.m_seq.end(); }
+
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin()
+ { return reverse_iterator(this->end()); }
+
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const
+ { return this->crbegin(); }
+
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const
+ { return const_reverse_iterator(this->cend()); }
+
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rend()
+ { return reverse_iterator(this->begin()); }
+
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const
+ { return this->crend(); }
+
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const
+ { return const_reverse_iterator(this->cbegin()); }
+
+ BOOST_CONTAINER_FORCEINLINE bool empty() const
+ { return this->m_data.m_seq.empty(); }
+
+ BOOST_CONTAINER_FORCEINLINE size_type size() const
+ { return this->m_data.m_seq.size(); }
+
+ BOOST_CONTAINER_FORCEINLINE size_type max_size() const
+ { return this->m_data.m_seq.max_size(); }
+
+ BOOST_CONTAINER_FORCEINLINE void swap(flat_tree& other)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value )
+ { this->m_data.swap(other.m_data); }
+
+ public:
+ // insert/erase
+ std::pair<iterator,bool> insert_unique(const value_type& val)
+ {
+ std::pair<iterator,bool> ret;
+ insert_commit_data data;
+ ret.second = this->priv_insert_unique_prepare(KeyOfValue()(val), data);
+ ret.first = ret.second ? this->priv_insert_commit(data, val)
+ : this->begin() + (data.position - this->cbegin());
+ //: iterator(vector_iterator_get_ptr(data.position));
+ return ret;
+ }
+
+ std::pair<iterator,bool> insert_unique(BOOST_RV_REF(value_type) val)
+ {
+ std::pair<iterator,bool> ret;
+ insert_commit_data data;
+ ret.second = this->priv_insert_unique_prepare(KeyOfValue()(val), data);
+ ret.first = ret.second ? this->priv_insert_commit(data, boost::move(val))
+ : this->begin() + (data.position - this->cbegin());
+ //: iterator(vector_iterator_get_ptr(data.position));
+ return ret;
+ }
+
+ iterator insert_equal(const value_type& val)
+ {
+ iterator i = this->upper_bound(KeyOfValue()(val));
+ i = this->m_data.m_seq.insert(i, val);
+ return i;
+ }
+
+ iterator insert_equal(BOOST_RV_REF(value_type) mval)
+ {
+ iterator i = this->upper_bound(KeyOfValue()(mval));
+ i = this->m_data.m_seq.insert(i, boost::move(mval));
+ return i;
+ }
+
+ iterator insert_unique(const_iterator hint, const value_type& val)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(hint));
+ insert_commit_data data;
+ return this->priv_insert_unique_prepare(hint, KeyOfValue()(val), data)
+ ? this->priv_insert_commit(data, val)
+ : this->begin() + (data.position - this->cbegin());
+ //: iterator(vector_iterator_get_ptr(data.position));
+ }
+
+ iterator insert_unique(const_iterator hint, BOOST_RV_REF(value_type) val)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(hint));
+ insert_commit_data data;
+ return this->priv_insert_unique_prepare(hint, KeyOfValue()(val), data)
+ ? this->priv_insert_commit(data, boost::move(val))
+ : this->begin() + (data.position - this->cbegin());
+ //: iterator(vector_iterator_get_ptr(data.position));
+ }
+
+ iterator insert_equal(const_iterator hint, const value_type& val)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(hint));
+ insert_commit_data data;
+ this->priv_insert_equal_prepare(hint, val, data);
+ return this->priv_insert_commit(data, val);
+ }
+
+ iterator insert_equal(const_iterator hint, BOOST_RV_REF(value_type) mval)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(hint));
+ insert_commit_data data;
+ this->priv_insert_equal_prepare(hint, mval, data);
+ return this->priv_insert_commit(data, boost::move(mval));
+ }
+
+ template <class InIt>
+ void insert_unique(InIt first, InIt last)
+ {
+ dtl::bool_<is_contiguous_container<container_type>::value> contiguous_tag;
+ container_type &seq = this->m_data.m_seq;
+ value_compare &val_cmp = this->priv_value_comp();
+
+ //Step 1: put new elements in the back
+ typename container_type::iterator const it = seq.insert(seq.cend(), first, last);
+
+ //Step 2: sort them
+ boost::movelib::pdqsort(it, seq.end(), val_cmp);
+
+ //Step 3: only left unique values from the back not already present in the original range
+ typename container_type::iterator const e = boost::movelib::inplace_set_unique_difference
+ (it, seq.end(), seq.begin(), it, val_cmp);
+ seq.erase(e, seq.cend());
+
+ //Step 4: merge both ranges
+ (flat_tree_container_inplace_merge)(seq, it, this->priv_value_comp(), contiguous_tag);
+ }
+
+ template <class InIt>
+ void insert_equal(InIt first, InIt last)
+ {
+ dtl::bool_<is_contiguous_container<container_type>::value> contiguous_tag;
+ container_type &seq = this->m_data.m_seq;
+ typename container_type::iterator const it = seq.insert(seq.cend(), first, last);
+ (flat_tree_container_inplace_sort_ending)(seq, it, this->priv_value_comp(), contiguous_tag);
+ (flat_tree_container_inplace_merge) (seq, it, this->priv_value_comp(), contiguous_tag);
+ }
+
+ //Ordered
+
+ template <class InIt>
+ void insert_equal(ordered_range_t, InIt first, InIt last)
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_merge_unique<container_type, InIt, InIt, value_compare>::value;
+ (flat_tree_merge_equal)(this->m_data.m_seq, first, last, this->priv_value_comp(), dtl::bool_<value>());
+ }
+
+ template <class InIt>
+ void insert_unique(ordered_unique_range_t, InIt first, InIt last)
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_merge_unique<container_type, InIt, InIt, value_compare>::value;
+ (flat_tree_merge_unique)(this->m_data.m_seq, first, last, this->priv_value_comp(), dtl::bool_<value>());
+ }
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template <class... Args>
+ std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
+ {
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
+ value_type *pval = reinterpret_cast<value_type *>(v.data);
+ get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
+ stored_allocator_traits::construct(a, pval, ::boost::forward<Args>(args)... );
+ value_destructor<stored_allocator_type, value_type> d(a, *pval);
+ return this->insert_unique(::boost::move(*pval));
+ }
+
+ template <class... Args>
+ iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args)
+ {
+ //hint checked in insert_unique
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
+ value_type *pval = reinterpret_cast<value_type *>(v.data);
+ get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
+ stored_allocator_traits::construct(a, pval, ::boost::forward<Args>(args)... );
+ value_destructor<stored_allocator_type, value_type> d(a, *pval);
+ return this->insert_unique(hint, ::boost::move(*pval));
+ }
+
+ template <class... Args>
+ iterator emplace_equal(BOOST_FWD_REF(Args)... args)
+ {
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
+ value_type *pval = reinterpret_cast<value_type *>(v.data);
+ get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
+ stored_allocator_traits::construct(a, pval, ::boost::forward<Args>(args)... );
+ value_destructor<stored_allocator_type, value_type> d(a, *pval);
+ return this->insert_equal(::boost::move(*pval));
+ }
+
+ template <class... Args>
+ iterator emplace_hint_equal(const_iterator hint, BOOST_FWD_REF(Args)... args)
+ {
+ //hint checked in insert_equal
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;
+ value_type *pval = reinterpret_cast<value_type *>(v.data);
+ get_stored_allocator_noconst_return_t a = this->get_stored_allocator();
+ stored_allocator_traits::construct(a, pval, ::boost::forward<Args>(args)... );
+ value_destructor<stored_allocator_type, value_type> d(a, *pval);
+ return this->insert_equal(hint, ::boost::move(*pval));
+ }
+
+ template <class KeyType, class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace
+ (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args)
+ {
+ std::pair<iterator,bool> ret;
+ insert_commit_data data;
+ const key_type & k = key;
+ ret.second = hint == const_iterator()
+ ? this->priv_insert_unique_prepare(k, data)
+ : this->priv_insert_unique_prepare(hint, k, data);
+
+ if(!ret.second){
+ ret.first = this->nth(data.position - this->cbegin());
+ }
+ else{
+ typedef typename emplace_functor_type<try_emplace_t, KeyType, Args...>::type func_t;
+ typedef emplace_iterator<value_type, func_t, difference_type> it_t;
+ func_t func(try_emplace_t(), ::boost::forward<KeyType>(key), ::boost::forward<Args>(args)...);
+ ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t());
+ }
+ return ret;
+ }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ std::pair<iterator, bool> emplace_unique(BOOST_MOVE_UREF##N)\
+ {\
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
+ value_type *pval = reinterpret_cast<value_type *>(v.data);\
+ get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
+ stored_allocator_traits::construct(a, pval BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ value_destructor<stored_allocator_type, value_type> d(a, *pval);\
+ return this->insert_unique(::boost::move(*pval));\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace_hint_unique(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
+ value_type *pval = reinterpret_cast<value_type *>(v.data);\
+ get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
+ stored_allocator_traits::construct(a, pval BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ value_destructor<stored_allocator_type, value_type> d(a, *pval);\
+ return this->insert_unique(hint, ::boost::move(*pval));\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace_equal(BOOST_MOVE_UREF##N)\
+ {\
+ typename aligned_storage<sizeof(value_type), alignment_of<value_type>::value>::type v;\
+ value_type *pval = reinterpret_cast<value_type *>(v.data);\
+ get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
+ stored_allocator_traits::construct(a, pval BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ value_destructor<stored_allocator_type, value_type> d(a, *pval);\
+ return this->insert_equal(::boost::move(*pval));\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace_hint_equal(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ typename aligned_storage <sizeof(value_type), alignment_of<value_type>::value>::type v;\
+ value_type *pval = reinterpret_cast<value_type *>(v.data);\
+ get_stored_allocator_noconst_return_t a = this->get_stored_allocator();\
+ stored_allocator_traits::construct(a, pval BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ value_destructor<stored_allocator_type, value_type> d(a, *pval);\
+ return this->insert_equal(hint, ::boost::move(*pval));\
+ }\
+ template <class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool>\
+ try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ std::pair<iterator,bool> ret;\
+ insert_commit_data data;\
+ const key_type & k = key;\
+ ret.second = hint == const_iterator()\
+ ? this->priv_insert_unique_prepare(k, data)\
+ : this->priv_insert_unique_prepare(hint, k, data);\
+ \
+ if(!ret.second){\
+ ret.first = this->nth(data.position - this->cbegin());\
+ }\
+ else{\
+ typedef typename emplace_functor_type<try_emplace_t, KeyType BOOST_MOVE_I##N BOOST_MOVE_TARG##N>::type func_t;\
+ typedef emplace_iterator<value_type, func_t, difference_type> it_t;\
+ func_t func(try_emplace_t(), ::boost::forward<KeyType>(key) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t());\
+ }\
+ return ret;\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO7(BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_FLAT_TREE_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template<class KeyType, class M>
+ std::pair<iterator, bool> insert_or_assign(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(M) obj)
+ {
+ const key_type& k = key;
+ std::pair<iterator,bool> ret;
+ insert_commit_data data;
+ ret.second = hint == const_iterator()
+ ? this->priv_insert_unique_prepare(k, data)
+ : this->priv_insert_unique_prepare(hint, k, data);
+ if(!ret.second){
+ ret.first = this->nth(data.position - this->cbegin());
+ ret.first->second = boost::forward<M>(obj);
+ }
+ else{
+ typedef typename emplace_functor_type<KeyType, M>::type func_t;
+ typedef emplace_iterator<value_type, func_t, difference_type> it_t;
+ func_t func(boost::forward<KeyType>(key), boost::forward<M>(obj));
+ ret.first = this->m_data.m_seq.insert(data.position, it_t(func), it_t());
+ }
+ return ret;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator position)
+ { return this->m_data.m_seq.erase(position); }
+
+ size_type erase(const key_type& k)
+ {
+ std::pair<iterator,iterator > itp = this->equal_range(k);
+ size_type ret = static_cast<size_type>(itp.second-itp.first);
+ if (ret){
+ this->m_data.m_seq.erase(itp.first, itp.second);
+ }
+ return ret;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
+ { return this->m_data.m_seq.erase(first, last); }
+
+ BOOST_CONTAINER_FORCEINLINE void clear()
+ { this->m_data.m_seq.clear(); }
+
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ // with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
+ { this->m_data.m_seq.shrink_to_fit(); }
+
+ BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_nth<container_type, size_type>::value;
+ return flat_tree_nth<iterator>(this->m_data.m_seq, n, dtl::bool_<value>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_nth<container_type, size_type>::value;
+ return flat_tree_nth<const_iterator>(this->m_data.m_seq, n, dtl::bool_<value>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_index_of<container_type, iterator>::value;
+ return flat_tree_index_of(this->m_data.m_seq, p, dtl::bool_<value>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_index_of<container_type, const_iterator>::value;
+ return flat_tree_index_of(this->m_data.m_seq, p, dtl::bool_<value>());
+ }
+
+ // set operations:
+ iterator find(const key_type& k)
+ {
+ iterator i = this->lower_bound(k);
+ iterator end_it = this->end();
+ if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){
+ i = end_it;
+ }
+ return i;
+ }
+
+ const_iterator find(const key_type& k) const
+ {
+ const_iterator i = this->lower_bound(k);
+
+ const_iterator end_it = this->cend();
+ if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){
+ i = end_it;
+ }
+ return i;
+ }
+
+ template<class K>
+ typename dtl::enable_if_transparent<key_compare, K, iterator>::type
+ find(const K& k)
+ {
+ iterator i = this->lower_bound(k);
+ iterator end_it = this->end();
+ if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){
+ i = end_it;
+ }
+ return i;
+ }
+
+ template<class K>
+ typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
+ find(const K& k) const
+ {
+ const_iterator i = this->lower_bound(k);
+
+ const_iterator end_it = this->cend();
+ if (i != end_it && this->m_data.get_comp()(k, KeyOfValue()(*i))){
+ i = end_it;
+ }
+ return i;
+ }
+
+ size_type count(const key_type& k) const
+ {
+ std::pair<const_iterator, const_iterator> p = this->equal_range(k);
+ size_type n = p.second - p.first;
+ return n;
+ }
+
+ template<class K>
+ typename dtl::enable_if_transparent<key_compare, K, size_type>::type
+ count(const K& k) const
+ {
+ std::pair<const_iterator, const_iterator> p = this->equal_range(k);
+ size_type n = p.second - p.first;
+ return n;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE bool contains(const key_type& x) const
+ { return this->find(x) != this->cend(); }
+
+ template<typename K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, bool>::type
+ contains(const K& x) const
+ { return this->find(x) != this->cend(); }
+
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge_unique(flat_tree<Value, KeyOfValue, C2, AllocatorOrContainer>& source)
+ {
+ this->insert( boost::make_move_iterator(source.begin())
+ , boost::make_move_iterator(source.end()));
+ }
+
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge_equal(flat_tree<Value, KeyOfValue, C2, AllocatorOrContainer>& source)
+ {
+ this->insert( boost::make_move_iterator(source.begin())
+ , boost::make_move_iterator(source.end()));
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void merge_unique(flat_tree& source)
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_merge_unique<container_type, iterator, iterator, value_compare>::value;
+ (flat_tree_merge_unique)
+ ( this->m_data.m_seq
+ , boost::make_move_iterator(source.m_data.m_seq.begin())
+ , boost::make_move_iterator(source.m_data.m_seq.end())
+ , this->priv_value_comp()
+ , dtl::bool_<value>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void merge_equal(flat_tree& source)
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_merge<container_type, iterator, iterator, value_compare>::value;
+ (flat_tree_merge_equal)
+ ( this->m_data.m_seq
+ , boost::make_move_iterator(source.m_data.m_seq.begin())
+ , boost::make_move_iterator(source.m_data.m_seq.end())
+ , this->priv_value_comp()
+ , dtl::bool_<value>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
+ { return this->priv_lower_bound(this->begin(), this->end(), k); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
+ { return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
+
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, iterator>::type
+ lower_bound(const K& k)
+ { return this->priv_lower_bound(this->begin(), this->end(), k); }
+
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
+ lower_bound(const K& k) const
+ { return this->priv_lower_bound(this->cbegin(), this->cend(), k); }
+
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
+ { return this->priv_upper_bound(this->begin(), this->end(), k); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
+ { return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
+
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K,iterator>::type
+ upper_bound(const K& k)
+ { return this->priv_upper_bound(this->begin(), this->end(), k); }
+
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K,const_iterator>::type
+ upper_bound(const K& k) const
+ { return this->priv_upper_bound(this->cbegin(), this->cend(), k); }
+
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& k)
+ { return this->priv_equal_range(this->begin(), this->end(), k); }
+
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
+ { return this->priv_equal_range(this->cbegin(), this->cend(), k); }
+
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K,std::pair<iterator,iterator> >::type
+ equal_range(const K& k)
+ { return this->priv_equal_range(this->begin(), this->end(), k); }
+
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K,std::pair<const_iterator,const_iterator> >::type
+ equal_range(const K& k) const
+ { return this->priv_equal_range(this->cbegin(), this->cend(), k); }
+
+
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, iterator> lower_bound_range(const key_type& k)
+ { return this->priv_lower_bound_range(this->begin(), this->end(), k); }
+
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
+ { return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
+
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K,std::pair<iterator,iterator> >::type
+ lower_bound_range(const K& k)
+ { return this->priv_lower_bound_range(this->begin(), this->end(), k); }
+
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K,std::pair<const_iterator,const_iterator> >::type
+ lower_bound_range(const K& k) const
+ { return this->priv_lower_bound_range(this->cbegin(), this->cend(), k); }
+
+ BOOST_CONTAINER_FORCEINLINE size_type capacity() const
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_capacity<container_type>::value;
+ return (flat_tree_capacity)(this->m_data.m_seq, dtl::bool_<value>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt)
+ {
+ const bool value = boost::container::dtl::
+ has_member_function_callable_with_reserve<container_type, size_type>::value;
+ (flat_tree_reserve)(this->m_data.m_seq, cnt, dtl::bool_<value>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE container_type extract_sequence()
+ {
+ return boost::move(m_data.m_seq);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE container_type &get_sequence_ref()
+ {
+ return m_data.m_seq;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence_equal(BOOST_RV_REF(container_type) seq)
+ {
+ (flat_tree_adopt_sequence_equal)( m_data.m_seq, boost::move(seq), this->priv_value_comp()
+ , dtl::bool_<is_contiguous_container<container_type>::value>());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence_unique(BOOST_RV_REF(container_type) seq)
+ {
+ (flat_tree_adopt_sequence_unique)(m_data.m_seq, boost::move(seq), this->priv_value_comp()
+ , dtl::bool_<is_contiguous_container<container_type>::value>());
+ }
+
+ void adopt_sequence_equal(ordered_range_t, BOOST_RV_REF(container_type) seq)
+ {
+ BOOST_ASSERT((is_sorted)(seq.cbegin(), seq.cend(), this->priv_value_comp()));
+ m_data.m_seq = boost::move(seq);
+ }
+
+ void adopt_sequence_unique(ordered_unique_range_t, BOOST_RV_REF(container_type) seq)
+ {
+ BOOST_ASSERT((is_sorted_and_unique)(seq.cbegin(), seq.cend(), this->priv_value_comp()));
+ m_data.m_seq = boost::move(seq);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_tree& x, const flat_tree& y)
+ {
+ return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_tree& x, const flat_tree& y)
+ {
+ return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_tree& x, const flat_tree& y)
+ { return !(x == y); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_tree& x, const flat_tree& y)
+ { return y < x; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_tree& x, const flat_tree& y)
+ { return !(y < x); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_tree& x, const flat_tree& y)
+ { return !(x < y); }
+
+ BOOST_CONTAINER_FORCEINLINE friend void swap(flat_tree& x, flat_tree& y)
+ { x.swap(y); }
+
+ private:
+
+ template <class InputIterator>
+ void priv_range_insertion_construct( bool unique_insertion, InputIterator first, InputIterator last)
+ {
+ //Use cend() as hint to achieve linear time for
+ //ordered ranges as required by the standard
+ //for the constructor
+ //Call end() every iteration as reallocation might have invalidated iterators
+ if(unique_insertion){
+ this->insert_unique(first, last);
+ }
+ else{
+ this->insert_equal (first, last);
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
+ {
+ return (this->begin() <= pos) && (pos <= this->end());
+ }
+
+ // insert/erase
+ void priv_insert_equal_prepare
+ (const_iterator pos, const value_type& val, insert_commit_data &data)
+ {
+ // N1780
+ // To insert val at pos:
+ // if pos == end || val <= *pos
+ // if pos == begin || val >= *(pos-1)
+ // insert val before pos
+ // else
+ // insert val before upper_bound(val)
+ // else
+ // insert val before lower_bound(val)
+ const value_compare &val_cmp = this->m_data;
+
+ if(pos == this->cend() || !val_cmp(*pos, val)){
+ if (pos == this->cbegin() || !val_cmp(val, pos[-1])){
+ data.position = pos;
+ }
+ else{
+ data.position =
+ this->priv_upper_bound(this->cbegin(), pos, KeyOfValue()(val));
+ }
+ }
+ else{
+ data.position =
+ this->priv_lower_bound(pos, this->cend(), KeyOfValue()(val));
+ }
+ }
+
+ bool priv_insert_unique_prepare
+ (const_iterator b, const_iterator e, const key_type& k, insert_commit_data &commit_data)
+ {
+ const key_compare &key_cmp = this->priv_key_comp();
+ commit_data.position = this->priv_lower_bound(b, e, k);
+ return commit_data.position == e || key_cmp(k, KeyOfValue()(*commit_data.position));
+ }
+
+ BOOST_CONTAINER_FORCEINLINE bool priv_insert_unique_prepare
+ (const key_type& k, insert_commit_data &commit_data)
+ { return this->priv_insert_unique_prepare(this->cbegin(), this->cend(), k, commit_data); }
+
+ bool priv_insert_unique_prepare
+ (const_iterator pos, const key_type& k, insert_commit_data &commit_data)
+ {
+ //N1780. Props to Howard Hinnant!
+ //To insert k at pos:
+ //if pos == end || k <= *pos
+ // if pos == begin || k >= *(pos-1)
+ // insert k before pos
+ // else
+ // insert k before upper_bound(k)
+ //else if pos+1 == end || k <= *(pos+1)
+ // insert k after pos
+ //else
+ // insert k before lower_bound(k)
+ const key_compare &key_cmp = this->priv_key_comp();
+ const const_iterator cend_it = this->cend();
+ if(pos == cend_it || key_cmp(k, KeyOfValue()(*pos))){ //Check if k should go before end
+ const const_iterator cbeg = this->cbegin();
+ commit_data.position = pos;
+ if(pos == cbeg){ //If container is empty then insert it in the beginning
+ return true;
+ }
+ const_iterator prev(pos);
+ --prev;
+ if(key_cmp(KeyOfValue()(*prev), k)){ //If previous element was less, then it should go between prev and pos
+ return true;
+ }
+ else if(!key_cmp(k, KeyOfValue()(*prev))){ //If previous was equal then insertion should fail
+ commit_data.position = prev;
+ return false;
+ }
+ else{ //Previous was bigger so insertion hint was pointless, dispatch to hintless insertion
+ //but reduce the search between beg and prev as prev is bigger than k
+ return this->priv_insert_unique_prepare(cbeg, prev, k, commit_data);
+ }
+ }
+ else{
+ //The hint is before the insertion position, so insert it
+ //in the remaining range [pos, end)
+ return this->priv_insert_unique_prepare(pos, cend_it, k, commit_data);
+ }
+ }
+
+ template<class Convertible>
+ BOOST_CONTAINER_FORCEINLINE iterator priv_insert_commit
+ (insert_commit_data &commit_data, BOOST_FWD_REF(Convertible) convertible)
+ {
+ return this->m_data.m_seq.insert
+ ( commit_data.position
+ , boost::forward<Convertible>(convertible));
+ }
+
+ template <class RanIt, class K>
+ RanIt priv_lower_bound(RanIt first, const RanIt last,
+ const K & key) const
+ {
+ const Compare &key_cmp = this->m_data.get_comp();
+ KeyOfValue key_extract;
+ size_type len = static_cast<size_type>(last - first);
+ RanIt middle;
+
+ while (len) {
+ size_type step = len >> 1;
+ middle = first;
+ middle += step;
+
+ if (key_cmp(key_extract(*middle), key)) {
+ first = ++middle;
+ len -= step + 1;
+ }
+ else{
+ len = step;
+ }
+ }
+ return first;
+ }
+
+ template <class RanIt, class K>
+ RanIt priv_upper_bound
+ (RanIt first, const RanIt last,const K & key) const
+ {
+ const Compare &key_cmp = this->m_data.get_comp();
+ KeyOfValue key_extract;
+ size_type len = static_cast<size_type>(last - first);
+ RanIt middle;
+
+ while (len) {
+ size_type step = len >> 1;
+ middle = first;
+ middle += step;
+
+ if (key_cmp(key, key_extract(*middle))) {
+ len = step;
+ }
+ else{
+ first = ++middle;
+ len -= step + 1;
+ }
+ }
+ return first;
+ }
+
+ template <class RanIt, class K>
+ std::pair<RanIt, RanIt>
+ priv_equal_range(RanIt first, RanIt last, const K& key) const
+ {
+ const Compare &key_cmp = this->m_data.get_comp();
+ KeyOfValue key_extract;
+ size_type len = static_cast<size_type>(last - first);
+ RanIt middle;
+
+ while (len) {
+ size_type step = len >> 1;
+ middle = first;
+ middle += step;
+
+ if (key_cmp(key_extract(*middle), key)){
+ first = ++middle;
+ len -= step + 1;
+ }
+ else if (key_cmp(key, key_extract(*middle))){
+ len = step;
+ }
+ else {
+ //Middle is equal to key
+ last = first;
+ last += len;
+ RanIt const first_ret = this->priv_lower_bound(first, middle, key);
+ return std::pair<RanIt, RanIt>
+ ( first_ret, this->priv_upper_bound(++middle, last, key));
+ }
+ }
+ return std::pair<RanIt, RanIt>(first, first);
+ }
+
+ template<class RanIt, class K>
+ std::pair<RanIt, RanIt> priv_lower_bound_range(RanIt first, RanIt last, const K& k) const
+ {
+ const Compare &key_cmp = this->m_data.get_comp();
+ KeyOfValue key_extract;
+ RanIt lb(this->priv_lower_bound(first, last, k)), ub(lb);
+ if(lb != last && static_cast<difference_type>(!key_cmp(k, key_extract(*lb)))){
+ ++ub;
+ }
+ return std::pair<RanIt, RanIt>(lb, ub);
+ }
+};
+
+} //namespace dtl {
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class T, class KeyOfValue,
+class Compare, class AllocatorOrContainer>
+struct has_trivial_destructor_after_move<boost::container::dtl::flat_tree<T, KeyOfValue, Compare, AllocatorOrContainer> >
+{
+ typedef typename boost::container::dtl::select_container_type<T, AllocatorOrContainer>::type container_type;
+ typedef typename container_type::allocator_type allocator_t;
+ typedef typename ::boost::container::allocator_traits<allocator_t>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<allocator_t>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
+};
+
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_FLAT_TREE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/function_detector.hpp b/src/third_party/boost-1.69.0/boost/container/detail/function_detector.hpp
index 00caced5ba5..00caced5ba5 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/function_detector.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/function_detector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/is_container.hpp b/src/third_party/boost-1.69.0/boost/container/detail/is_container.hpp
index feab702e9e3..feab702e9e3 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/is_container.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/is_container.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/is_contiguous_container.hpp b/src/third_party/boost-1.69.0/boost/container/detail/is_contiguous_container.hpp
index 528aeee133a..528aeee133a 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/is_contiguous_container.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/is_contiguous_container.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/is_sorted.hpp b/src/third_party/boost-1.69.0/boost/container/detail/is_sorted.hpp
index 315bab54d7b..315bab54d7b 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/is_sorted.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/is_sorted.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/iterator.hpp b/src/third_party/boost-1.69.0/boost/container/detail/iterator.hpp
new file mode 100644
index 00000000000..800cef3d92f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/iterator.hpp
@@ -0,0 +1,86 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2014-2014.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_DETAIL_ITERATOR_HPP
+#define BOOST_CONTAINER_DETAIL_ITERATOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/iterator.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/container/detail/mpl.hpp>
+
+namespace boost {
+namespace container {
+
+using ::boost::intrusive::iterator_traits;
+using ::boost::intrusive::iterator_distance;
+using ::boost::intrusive::iterator_advance;
+using ::boost::intrusive::iterator;
+using ::boost::intrusive::iterator_enable_if_tag;
+using ::boost::intrusive::iterator_disable_if_tag;
+using ::boost::intrusive::iterator_arrow_result;
+
+template <class Container>
+class back_emplacer
+{
+ private:
+ Container& container;
+
+ public:
+ typedef std::output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ back_emplacer(Container& x)
+ : container(x)
+ {}
+
+ template<class U>
+ back_emplacer& operator=(BOOST_FWD_REF(U) value)
+ {
+ container.emplace_back(boost::forward<U>(value));
+ return *this;
+ }
+ back_emplacer& operator*() { return *this; }
+ back_emplacer& operator++() { return *this; }
+ back_emplacer& operator++(int){ return *this; }
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template<class InputIterator>
+using it_based_non_const_first_type_t = typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type;
+
+template<class InputIterator>
+using it_based_const_first_type_t = const typename dtl::remove_const<typename iterator_traits<InputIterator>::value_type::first_type>::type;
+
+template<class InputIterator>
+using it_based_second_type_t = typename iterator_traits<InputIterator>::value_type::second_type;
+
+template<class InputIterator>
+using it_based_value_type_t = typename iterator_traits<InputIterator>::value_type;
+
+#endif
+
+} //namespace container {
+} //namespace boost {
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_ITERATORS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/iterator_to_raw_pointer.hpp b/src/third_party/boost-1.69.0/boost/container/detail/iterator_to_raw_pointer.hpp
index 49f1d43babc..49f1d43babc 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/iterator_to_raw_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/iterator_to_raw_pointer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/iterators.hpp b/src/third_party/boost-1.69.0/boost/container/detail/iterators.hpp
index 7ccdac911c9..7ccdac911c9 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/iterators.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/iterators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/math_functions.hpp b/src/third_party/boost-1.69.0/boost/container/detail/math_functions.hpp
index 8d350a141f1..8d350a141f1 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/math_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/math_functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/min_max.hpp b/src/third_party/boost-1.69.0/boost/container/detail/min_max.hpp
index 35cf06617d1..35cf06617d1 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/min_max.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/min_max.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/minimal_char_traits_header.hpp b/src/third_party/boost-1.69.0/boost/container/detail/minimal_char_traits_header.hpp
index a92a31a2b41..a92a31a2b41 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/minimal_char_traits_header.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/minimal_char_traits_header.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/mpl.hpp b/src/third_party/boost-1.69.0/boost/container/detail/mpl.hpp
new file mode 100644
index 00000000000..4706c58022b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/mpl.hpp
@@ -0,0 +1,144 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
+#define BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+#include <boost/move/detail/type_traits.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+
+#include <cstddef>
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+using boost::move_detail::integral_constant;
+using boost::move_detail::true_type;
+using boost::move_detail::false_type;
+using boost::move_detail::enable_if_c;
+using boost::move_detail::enable_if;
+using boost::move_detail::enable_if_convertible;
+using boost::move_detail::disable_if_c;
+using boost::move_detail::disable_if;
+using boost::move_detail::disable_if_convertible;
+using boost::move_detail::is_convertible;
+using boost::move_detail::if_c;
+using boost::move_detail::if_;
+using boost::move_detail::identity;
+using boost::move_detail::bool_;
+using boost::move_detail::true_;
+using boost::move_detail::false_;
+using boost::move_detail::yes_type;
+using boost::move_detail::no_type;
+using boost::move_detail::bool_;
+using boost::move_detail::true_;
+using boost::move_detail::false_;
+using boost::move_detail::unvoid_ref;
+using boost::move_detail::and_;
+using boost::move_detail::or_;
+using boost::move_detail::not_;
+using boost::move_detail::enable_if_and;
+using boost::move_detail::disable_if_and;
+using boost::move_detail::enable_if_or;
+using boost::move_detail::disable_if_or;
+using boost::move_detail::remove_const;
+
+template <class FirstType>
+struct select1st
+{
+ typedef FirstType type;
+
+ template<class T>
+ const type& operator()(const T& x) const
+ { return x.first; }
+
+ template<class T>
+ type& operator()(T& x)
+ { return const_cast<type&>(x.first); }
+};
+
+
+template<typename T>
+struct void_t { typedef void type; };
+
+template <class T, class=void>
+struct is_transparent_base
+{
+ static const bool value = false;
+};
+
+template <class T>
+struct is_transparent_base<T, typename void_t<typename T::is_transparent>::type>
+{
+ static const bool value = true;
+};
+
+template <class T>
+struct is_transparent
+ : is_transparent_base<T>
+{};
+
+template <typename C, class /*Dummy*/, typename R>
+struct enable_if_transparent
+ : boost::move_detail::enable_if_c<dtl::is_transparent<C>::value, R>
+{};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+// void_t (void_t for C++11)
+template<typename...> using variadic_void_t = void;
+
+// Trait to detect Allocator-like types.
+template<typename Allocator, typename = void>
+struct is_allocator
+{
+ static const bool value = false;
+};
+
+template <typename T>
+T&& ctad_declval();
+
+template<typename Allocator>
+struct is_allocator < Allocator,
+ variadic_void_t< typename Allocator::value_type
+ , decltype(ctad_declval<Allocator&>().allocate(size_t{})) >>
+{
+ static const bool value = true;
+};
+
+template<class T>
+using require_allocator_t = typename enable_if_c<is_allocator<T>::value, T>::type;
+
+template<class T>
+using require_nonallocator_t = typename enable_if_c<!is_allocator<T>::value, T>::type;
+
+#endif
+
+} //namespace dtl {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_MPL_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/multiallocation_chain.hpp b/src/third_party/boost-1.69.0/boost/container/detail/multiallocation_chain.hpp
new file mode 100644
index 00000000000..c7d94f42a21
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/multiallocation_chain.hpp
@@ -0,0 +1,303 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP
+#define BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+// container
+#include <boost/container/container_fwd.hpp>
+// container/detail
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/container/detail/transform_iterator.hpp>
+#include <boost/container/detail/type_traits.hpp>
+// intrusive
+#include <boost/intrusive/slist.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+// move
+#include <boost/move/utility_core.hpp>
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+template<class VoidPointer>
+class basic_multiallocation_chain
+{
+ private:
+ typedef bi::slist_base_hook<bi::void_pointer<VoidPointer>
+ ,bi::link_mode<bi::normal_link>
+ > node;
+
+ typedef typename boost::intrusive::pointer_traits
+ <VoidPointer>::template rebind_pointer<char>::type char_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<char_ptr>::difference_type difference_type;
+
+ typedef bi::slist< node
+ , bi::linear<true>
+ , bi::cache_last<true>
+ , bi::size_type<typename boost::container::dtl::make_unsigned<difference_type>::type>
+ > slist_impl_t;
+ slist_impl_t slist_impl_;
+
+ typedef typename boost::intrusive::pointer_traits
+ <VoidPointer>::template rebind_pointer<node>::type node_ptr;
+ typedef typename boost::intrusive::
+ pointer_traits<node_ptr> node_ptr_traits;
+
+ static node & to_node(const VoidPointer &p)
+ { return *static_cast<node*>(static_cast<void*>(boost::movelib::to_raw_pointer(p))); }
+
+ static VoidPointer from_node(node &n)
+ { return node_ptr_traits::pointer_to(n); }
+
+ static node_ptr to_node_ptr(const VoidPointer &p)
+ { return node_ptr_traits::static_cast_from(p); }
+
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(basic_multiallocation_chain)
+
+ public:
+
+ typedef VoidPointer void_pointer;
+ typedef typename slist_impl_t::iterator iterator;
+ typedef typename slist_impl_t::size_type size_type;
+
+ basic_multiallocation_chain()
+ : slist_impl_()
+ {}
+
+ basic_multiallocation_chain(const void_pointer &b, const void_pointer &before_e, size_type n)
+ : slist_impl_(to_node_ptr(b), to_node_ptr(before_e), n)
+ {}
+
+ basic_multiallocation_chain(BOOST_RV_REF(basic_multiallocation_chain) other)
+ : slist_impl_(::boost::move(other.slist_impl_))
+ {}
+
+ basic_multiallocation_chain& operator=(BOOST_RV_REF(basic_multiallocation_chain) other)
+ {
+ slist_impl_ = ::boost::move(other.slist_impl_);
+ return *this;
+ }
+
+ bool empty() const
+ { return slist_impl_.empty(); }
+
+ size_type size() const
+ { return slist_impl_.size(); }
+
+ iterator before_begin()
+ { return slist_impl_.before_begin(); }
+
+ iterator begin()
+ { return slist_impl_.begin(); }
+
+ iterator end()
+ { return slist_impl_.end(); }
+
+ iterator last()
+ { return slist_impl_.last(); }
+
+ void clear()
+ { slist_impl_.clear(); }
+
+ iterator insert_after(iterator it, void_pointer m)
+ { return slist_impl_.insert_after(it, to_node(m)); }
+
+ void push_front(const void_pointer &m)
+ { return slist_impl_.push_front(to_node(m)); }
+
+ void push_back(const void_pointer &m)
+ { return slist_impl_.push_back(to_node(m)); }
+
+ void_pointer pop_front()
+ {
+ node & n = slist_impl_.front();
+ void_pointer ret = from_node(n);
+ slist_impl_.pop_front();
+ return ret;
+ }
+
+ void splice_after(iterator after_this, basic_multiallocation_chain &x, iterator before_b, iterator before_e, size_type n)
+ { slist_impl_.splice_after(after_this, x.slist_impl_, before_b, before_e, n); }
+
+ void splice_after(iterator after_this, basic_multiallocation_chain &x)
+ { slist_impl_.splice_after(after_this, x.slist_impl_); }
+
+ void erase_after(iterator before_b, iterator e, size_type n)
+ { slist_impl_.erase_after(before_b, e, n); }
+
+ void_pointer incorporate_after(iterator after_this, const void_pointer &b, size_type unit_bytes, size_type num_units)
+ {
+ typedef typename boost::intrusive::pointer_traits<char_ptr> char_pointer_traits;
+ char_ptr elem = char_pointer_traits::static_cast_from(b);
+ if(num_units){
+ char_ptr prev_elem = elem;
+ elem += unit_bytes;
+ for(size_type i = 0; i != num_units-1; ++i, elem += unit_bytes){
+ ::new (boost::movelib::to_raw_pointer(prev_elem)) void_pointer(elem);
+ prev_elem = elem;
+ }
+ slist_impl_.incorporate_after(after_this, to_node_ptr(b), to_node_ptr(prev_elem), num_units);
+ }
+ return elem;
+ }
+
+ void incorporate_after(iterator after_this, void_pointer b, void_pointer before_e, size_type n)
+ { slist_impl_.incorporate_after(after_this, to_node_ptr(b), to_node_ptr(before_e), n); }
+
+ void swap(basic_multiallocation_chain &x)
+ { slist_impl_.swap(x.slist_impl_); }
+
+ static iterator iterator_to(const void_pointer &p)
+ { return slist_impl_t::s_iterator_to(to_node(p)); }
+
+ std::pair<void_pointer, void_pointer> extract_data()
+ {
+ if(BOOST_LIKELY(!slist_impl_.empty())){
+ std::pair<void_pointer, void_pointer> ret
+ (slist_impl_.begin().operator->()
+ ,slist_impl_.last().operator->());
+ slist_impl_.clear();
+ return ret;
+ }
+ else {
+ return std::pair<void_pointer, void_pointer>();
+ }
+ }
+};
+
+template<class T>
+struct cast_functor
+{
+ typedef typename dtl::add_reference<T>::type result_type;
+ template<class U>
+ result_type operator()(U &ptr) const
+ { return *static_cast<T*>(static_cast<void*>(&ptr)); }
+};
+
+template<class MultiallocationChain, class T>
+class transform_multiallocation_chain
+ : public MultiallocationChain
+{
+ private:
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(transform_multiallocation_chain)
+ //transform_multiallocation_chain(const transform_multiallocation_chain &);
+ //transform_multiallocation_chain & operator=(const transform_multiallocation_chain &);
+
+ typedef typename MultiallocationChain::void_pointer void_pointer;
+ typedef typename boost::intrusive::pointer_traits
+ <void_pointer> void_pointer_traits;
+ typedef typename void_pointer_traits::template
+ rebind_pointer<T>::type pointer;
+ typedef typename boost::intrusive::pointer_traits
+ <pointer> pointer_traits;
+
+ static pointer cast(const void_pointer &p)
+ { return pointer_traits::static_cast_from(p); }
+
+ public:
+ typedef transform_iterator
+ < typename MultiallocationChain::iterator
+ , dtl::cast_functor <T> > iterator;
+ typedef typename MultiallocationChain::size_type size_type;
+
+ transform_multiallocation_chain()
+ : MultiallocationChain()
+ {}
+
+ transform_multiallocation_chain(BOOST_RV_REF(transform_multiallocation_chain) other)
+ : MultiallocationChain(::boost::move(static_cast<MultiallocationChain&>(other)))
+ {}
+
+ transform_multiallocation_chain(BOOST_RV_REF(MultiallocationChain) other)
+ : MultiallocationChain(::boost::move(static_cast<MultiallocationChain&>(other)))
+ {}
+
+ transform_multiallocation_chain& operator=(BOOST_RV_REF(transform_multiallocation_chain) other)
+ {
+ return static_cast<MultiallocationChain&>
+ (this->MultiallocationChain::operator=(::boost::move(static_cast<MultiallocationChain&>(other))));
+ }
+
+ void push_front(const pointer &mem)
+ { this->MultiallocationChain::push_front(mem); }
+
+ void push_back(const pointer &mem)
+ { return this->MultiallocationChain::push_back(mem); }
+
+ void swap(transform_multiallocation_chain &other_chain)
+ { this->MultiallocationChain::swap(other_chain); }
+
+ void splice_after(iterator after_this, transform_multiallocation_chain &x, iterator before_b, iterator before_e, size_type n)
+ { this->MultiallocationChain::splice_after(after_this.base(), x, before_b.base(), before_e.base(), n); }
+
+ void incorporate_after(iterator after_this, pointer b, pointer before_e, size_type n)
+ { this->MultiallocationChain::incorporate_after(after_this.base(), b, before_e, n); }
+
+ pointer pop_front()
+ { return cast(this->MultiallocationChain::pop_front()); }
+
+ bool empty() const
+ { return this->MultiallocationChain::empty(); }
+
+ iterator before_begin()
+ { return iterator(this->MultiallocationChain::before_begin()); }
+
+ iterator begin()
+ { return iterator(this->MultiallocationChain::begin()); }
+
+ iterator last()
+ { return iterator(this->MultiallocationChain::last()); }
+
+ iterator end()
+ { return iterator(this->MultiallocationChain::end()); }
+
+ size_type size() const
+ { return this->MultiallocationChain::size(); }
+
+ void clear()
+ { this->MultiallocationChain::clear(); }
+
+ iterator insert_after(iterator it, pointer m)
+ { return iterator(this->MultiallocationChain::insert_after(it.base(), m)); }
+
+ static iterator iterator_to(const pointer &p)
+ { return iterator(MultiallocationChain::iterator_to(p)); }
+
+ std::pair<pointer, pointer> extract_data()
+ {
+ std::pair<void_pointer, void_pointer> data(this->MultiallocationChain::extract_data());
+ return std::pair<pointer, pointer>(cast(data.first), cast(data.second));
+ }
+/*
+ MultiallocationChain &extract_multiallocation_chain()
+ { return holder_; }*/
+};
+
+}}}
+
+// namespace dtl {
+// namespace container {
+// namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_DETAIL_MULTIALLOCATION_CHAIN_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/mutex.hpp b/src/third_party/boost-1.69.0/boost/container/detail/mutex.hpp
index 56e72a81d05..56e72a81d05 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/next_capacity.hpp b/src/third_party/boost-1.69.0/boost/container/detail/next_capacity.hpp
index 7e6554ded06..7e6554ded06 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/next_capacity.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/next_capacity.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/node_alloc_holder.hpp b/src/third_party/boost-1.69.0/boost/container/detail/node_alloc_holder.hpp
new file mode 100644
index 00000000000..a103e63c9a6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/node_alloc_holder.hpp
@@ -0,0 +1,471 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_
+#define BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/allocator_traits.hpp>
+// container/detail
+#include <boost/container/detail/addressof.hpp>
+#include <boost/container/detail/alloc_helpers.hpp>
+#include <boost/container/detail/allocator_version_traits.hpp>
+#include <boost/container/detail/construct_in_place.hpp>
+#include <boost/container/detail/destroyers.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/placement_new.hpp>
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/version_type.hpp>
+// intrusive
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/options.hpp>
+// move
+#include <boost/move/utility_core.hpp>
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+// other
+#include <boost/core/no_exceptions_support.hpp>
+
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(key_compare)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(key_equal)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(hasher)
+BOOST_INTRUSIVE_INSTANTIATE_DEFAULT_TYPE_TMPLT(predicate_type)
+
+template<class Allocator, class ICont>
+struct node_alloc_holder
+ : public allocator_traits<Allocator>::template
+ portable_rebind_alloc<typename ICont::value_type>::type //NodeAlloc
+{
+ //If the intrusive container is an associative container, obtain the predicate, which will
+ //be of type node_compare<>. If not an associative container val_compare will be a "nat" type.
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ ( boost::container::dtl::
+ , ICont, key_compare, dtl::nat) intrusive_val_compare;
+ //In that case obtain the value predicate from the node predicate via predicate_type
+ //if intrusive_val_compare is node_compare<>, nat otherwise
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ ( boost::container::dtl::
+ , intrusive_val_compare
+ , predicate_type, dtl::nat) val_compare;
+
+ //If the intrusive container is a hash container, obtain the predicate, which will
+ //be of type node_compare<>. If not an associative container val_equal will be a "nat" type.
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ (boost::container::dtl::
+ , ICont, key_equal, dtl::nat2) intrusive_val_equal;
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ (boost::container::dtl::
+ , ICont, hasher, dtl::nat3) intrusive_val_hasher;
+ //In that case obtain the value predicate from the node predicate via predicate_type
+ //if intrusive_val_compare is node_compare<>, nat otherwise
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ (boost::container::dtl::
+ , intrusive_val_equal
+ , predicate_type, dtl::nat2) val_equal;
+ typedef BOOST_INTRUSIVE_OBTAIN_TYPE_WITH_DEFAULT
+ (boost::container::dtl::
+ , intrusive_val_hasher
+ , predicate_type, dtl::nat3) val_hasher;
+
+ typedef allocator_traits<Allocator> allocator_traits_type;
+ typedef typename allocator_traits_type::value_type val_type;
+ typedef ICont intrusive_container;
+ typedef typename ICont::value_type Node;
+ typedef typename allocator_traits_type::template
+ portable_rebind_alloc<Node>::type NodeAlloc;
+ typedef allocator_traits<NodeAlloc> node_allocator_traits_type;
+ typedef dtl::allocator_version_traits<NodeAlloc> node_allocator_version_traits_type;
+ typedef Allocator ValAlloc;
+ typedef typename node_allocator_traits_type::pointer NodePtr;
+ typedef dtl::scoped_deallocator<NodeAlloc> Deallocator;
+ typedef typename node_allocator_traits_type::size_type size_type;
+ typedef typename node_allocator_traits_type::difference_type difference_type;
+ typedef dtl::integral_constant<unsigned,
+ boost::container::dtl::
+ version<NodeAlloc>::value> alloc_version;
+ typedef typename ICont::iterator icont_iterator;
+ typedef typename ICont::const_iterator icont_citerator;
+ typedef allocator_destroyer<NodeAlloc> Destroyer;
+ typedef allocator_traits<NodeAlloc> NodeAllocTraits;
+ typedef allocator_version_traits<NodeAlloc> AllocVersionTraits;
+
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(node_alloc_holder)
+
+ public:
+
+ //Constructors for sequence containers
+ node_alloc_holder()
+ {}
+
+ explicit node_alloc_holder(const ValAlloc &a)
+ : NodeAlloc(a)
+ {}
+
+ //Constructors for associative containers
+ node_alloc_holder(const val_compare &c, const ValAlloc &a)
+ : NodeAlloc(a), m_icont(typename ICont::key_compare(c))
+ {}
+
+ node_alloc_holder(const val_hasher &hf, const val_equal &eql, const ValAlloc &a)
+ : NodeAlloc(a)
+ , m_icont(typename ICont::bucket_traits()
+ , typename ICont::hasher(hf)
+ , typename ICont::key_equal(eql))
+ {}
+
+ node_alloc_holder(const val_hasher &hf, const ValAlloc &a)
+ : NodeAlloc(a)
+ , m_icont(typename ICont::bucket_traits()
+ , typename ICont::hasher(hf)
+ , typename ICont::key_equal())
+ {}
+
+ node_alloc_holder(const val_hasher &hf)
+ : m_icont(typename ICont::bucket_traits()
+ , typename ICont::hasher(hf)
+ , typename ICont::key_equal())
+ {}
+
+ explicit node_alloc_holder(const node_alloc_holder &x)
+ : NodeAlloc(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()))
+ {}
+
+ node_alloc_holder(const node_alloc_holder &x, const val_compare &c)
+ : NodeAlloc(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()))
+ , m_icont(typename ICont::key_compare(c))
+ {}
+
+ node_alloc_holder(const node_alloc_holder &x, const val_hasher &hf, const val_equal &eql)
+ : NodeAlloc(NodeAllocTraits::select_on_container_copy_construction(x.node_alloc()))
+ , m_icont( typename ICont::bucket_traits()
+ , typename ICont::hasher(hf)
+ , typename ICont::key_equal(eql))
+ {}
+
+ node_alloc_holder(const val_hasher &hf, const val_equal &eql)
+ : m_icont(typename ICont::bucket_traits()
+ , typename ICont::hasher(hf)
+ , typename ICont::key_equal(eql))
+ {}
+
+ explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x)
+ : NodeAlloc(boost::move(x.node_alloc()))
+ { this->icont().swap(x.icont()); }
+
+ explicit node_alloc_holder(const val_compare &c)
+ : m_icont(typename ICont::key_compare(c))
+ {}
+
+ //helpers for move assignments
+ explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x, const val_compare &c)
+ : NodeAlloc(boost::move(x.node_alloc())), m_icont(typename ICont::key_compare(c))
+ { this->icont().swap(x.icont()); }
+
+ explicit node_alloc_holder(BOOST_RV_REF(node_alloc_holder) x, const val_hasher &hf, const val_equal &eql)
+ : NodeAlloc(boost::move(x.node_alloc()))
+ , m_icont( typename ICont::bucket_traits()
+ , typename ICont::hasher(hf)
+ , typename ICont::key_equal(eql))
+ { this->icont().swap(x.icont()); }
+
+ void copy_assign_alloc(const node_alloc_holder &x)
+ {
+ dtl::bool_<allocator_traits_type::propagate_on_container_copy_assignment::value> flag;
+ dtl::assign_alloc( static_cast<NodeAlloc &>(*this)
+ , static_cast<const NodeAlloc &>(x), flag);
+ }
+
+ void move_assign_alloc( node_alloc_holder &x)
+ {
+ dtl::bool_<allocator_traits_type::propagate_on_container_move_assignment::value> flag;
+ dtl::move_alloc( static_cast<NodeAlloc &>(*this)
+ , static_cast<NodeAlloc &>(x), flag);
+ }
+
+ ~node_alloc_holder()
+ { this->clear(alloc_version()); }
+
+ size_type max_size() const
+ { return allocator_traits_type::max_size(this->node_alloc()); }
+
+ NodePtr allocate_one()
+ { return AllocVersionTraits::allocate_one(this->node_alloc()); }
+
+ void deallocate_one(const NodePtr &p)
+ { AllocVersionTraits::deallocate_one(this->node_alloc(), p); }
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template<class ...Args>
+ NodePtr create_node(Args &&...args)
+ {
+ NodePtr p = this->allocate_one();
+ BOOST_TRY{
+ ::new(boost::movelib::iterator_to_raw_pointer(p), boost_container_new_t()) Node;
+ allocator_traits<NodeAlloc>::construct
+ (this->node_alloc()
+ , p->get_real_data_ptr(), boost::forward<Args>(args)...);
+ }
+ BOOST_CATCH(...) {
+ p->destroy_header();
+ this->node_alloc().deallocate(p, 1);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ return (p);
+ }
+
+ #else //defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ NodePtr create_node(BOOST_MOVE_UREF##N)\
+ {\
+ NodePtr p = this->allocate_one();\
+ BOOST_TRY{\
+ ::new(boost::movelib::iterator_to_raw_pointer(p), boost_container_new_t()) Node;\
+ allocator_traits<NodeAlloc>::construct\
+ ( this->node_alloc()\
+ , p->get_real_data_ptr()\
+ BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ }\
+ BOOST_CATCH(...) {\
+ p->destroy_header();\
+ this->node_alloc().deallocate(p, 1);\
+ BOOST_RETHROW\
+ }\
+ BOOST_CATCH_END\
+ return (p);\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL)
+ #undef BOOST_CONTAINER_NODE_ALLOC_HOLDER_CONSTRUCT_IMPL
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template<class It>
+ NodePtr create_node_from_it(const It &it)
+ {
+ NodePtr p = this->allocate_one();
+ BOOST_TRY{
+ ::new(boost::movelib::iterator_to_raw_pointer(p), boost_container_new_t()) Node;
+ ::boost::container::construct_in_place(this->node_alloc(), p->get_real_data_ptr(), it);
+ }
+ BOOST_CATCH(...) {
+ p->destroy_header();
+ this->node_alloc().deallocate(p, 1);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ return (p);
+ }
+
+ template<class KeyConvertible>
+ NodePtr create_node_from_key(BOOST_FWD_REF(KeyConvertible) key)
+ {
+ NodePtr p = this->allocate_one();
+ BOOST_TRY{
+ ::new(boost::movelib::iterator_to_raw_pointer(p), boost_container_new_t()) Node;
+ NodeAlloc &na = this->node_alloc();
+ node_allocator_traits_type::construct
+ (na, dtl::addressof(p->get_real_data().first), boost::forward<KeyConvertible>(key));
+ BOOST_TRY{
+ node_allocator_traits_type::construct(na, dtl::addressof(p->get_real_data().second));
+ }
+ BOOST_CATCH(...){
+ node_allocator_traits_type::destroy(na, dtl::addressof(p->get_real_data().first));
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+ BOOST_CATCH(...) {
+ p->destroy_header();
+ this->node_alloc().deallocate(p, 1);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ return (p);
+ }
+
+ void destroy_node(const NodePtr &nodep)
+ {
+ allocator_traits<NodeAlloc>::destroy(this->node_alloc(), boost::movelib::to_raw_pointer(nodep));
+ this->deallocate_one(nodep);
+ }
+
+ void swap(node_alloc_holder &x)
+ {
+ this->icont().swap(x.icont());
+ dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
+ dtl::swap_alloc(this->node_alloc(), x.node_alloc(), flag);
+ }
+
+ template<class FwdIterator, class Inserter>
+ void allocate_many_and_construct
+ (FwdIterator beg, difference_type n, Inserter inserter)
+ {
+ if(n){
+ typedef typename node_allocator_version_traits_type::multiallocation_chain multiallocation_chain_t;
+
+ //Try to allocate memory in a single block
+ typedef typename multiallocation_chain_t::iterator multialloc_iterator_t;
+ multiallocation_chain_t chain;
+ NodeAlloc &nalloc = this->node_alloc();
+ node_allocator_version_traits_type::allocate_individual(nalloc, n, chain);
+ multialloc_iterator_t itbeg = chain.begin();
+ multialloc_iterator_t itlast = chain.last();
+ chain.clear();
+
+ Node *p = 0;
+ BOOST_TRY{
+ Deallocator node_deallocator(NodePtr(), nalloc);
+ dtl::scoped_destructor<NodeAlloc> sdestructor(nalloc, 0);
+ while(n){
+ --n;
+ p = boost::movelib::iterator_to_raw_pointer(itbeg);
+ ++itbeg; //Increment iterator before overwriting pointed memory
+ //This does not throw
+ p = ::new(p, boost_container_new_t()) Node;
+ node_deallocator.set(p);
+ //This can throw
+ boost::container::construct_in_place(nalloc, p->get_real_data_ptr(), beg);
+ sdestructor.set(p);
+ ++beg;
+ //This can throw in some containers (predicate might throw).
+ //(sdestructor will destruct the node and node_deallocator will deallocate it in case of exception)
+ inserter(*p);
+ sdestructor.set(0);
+ }
+ sdestructor.release();
+ node_deallocator.release();
+ }
+ BOOST_CATCH(...){
+ p->destroy_header();
+ chain.incorporate_after(chain.last(), &*itbeg, &*itlast, n);
+ node_allocator_version_traits_type::deallocate_individual(this->node_alloc(), chain);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ }
+
+ void clear(version_1)
+ { this->icont().clear_and_dispose(Destroyer(this->node_alloc())); }
+
+ void clear(version_2)
+ {
+ typename NodeAlloc::multiallocation_chain chain;
+ allocator_destroyer_and_chain_builder<NodeAlloc> builder(this->node_alloc(), chain);
+ this->icont().clear_and_dispose(builder);
+ //BOOST_STATIC_ASSERT((::boost::has_move_emulation_enabled<typename NodeAlloc::multiallocation_chain>::value == true));
+ if(!chain.empty())
+ this->node_alloc().deallocate_individual(chain);
+ }
+
+ icont_iterator erase_range(const icont_iterator &first, const icont_iterator &last, version_1)
+ { return this->icont().erase_and_dispose(first, last, Destroyer(this->node_alloc())); }
+
+ icont_iterator erase_range(const icont_iterator &first, const icont_iterator &last, version_2)
+ {
+ typedef typename NodeAlloc::multiallocation_chain multiallocation_chain;
+ NodeAlloc & nalloc = this->node_alloc();
+ multiallocation_chain chain;
+ allocator_destroyer_and_chain_builder<NodeAlloc> chain_builder(nalloc, chain);
+ icont_iterator ret_it = this->icont().erase_and_dispose(first, last, chain_builder);
+ nalloc.deallocate_individual(chain);
+ return ret_it;
+ }
+
+ template<class Key, class Comparator>
+ size_type erase_key(const Key& k, const Comparator &comp, version_1)
+ { return this->icont().erase_and_dispose(k, comp, Destroyer(this->node_alloc())); }
+
+ template<class Key, class Comparator>
+ size_type erase_key(const Key& k, const Comparator &comp, version_2)
+ {
+ allocator_multialloc_chain_node_deallocator<NodeAlloc> chain_holder(this->node_alloc());
+ return this->icont().erase_and_dispose(k, comp, chain_holder.get_chain_builder());
+ }
+
+ protected:
+ struct cloner
+ {
+ explicit cloner(node_alloc_holder &holder)
+ : m_holder(holder)
+ {}
+
+ NodePtr operator()(const Node &other) const
+ { return m_holder.create_node(other.get_real_data()); }
+
+ node_alloc_holder &m_holder;
+ };
+
+ struct move_cloner
+ {
+ move_cloner(node_alloc_holder &holder)
+ : m_holder(holder)
+ {}
+
+ NodePtr operator()(Node &other)
+ { //Use get_real_data() instead of get_real_data to allow moving const key in [multi]map
+ return m_holder.create_node(::boost::move(other.get_real_data()));
+ }
+
+ node_alloc_holder &m_holder;
+ };
+
+ ICont &non_const_icont() const
+ { return const_cast<ICont&>(this->m_icont); }
+
+ NodeAlloc &node_alloc()
+ { return static_cast<NodeAlloc &>(*this); }
+
+ const NodeAlloc &node_alloc() const
+ { return static_cast<const NodeAlloc &>(*this); }
+
+ public:
+ ICont &icont()
+ { return this->m_icont; }
+
+ const ICont &icont() const
+ { return this->m_icont; }
+
+ private:
+ //The intrusive container
+ ICont m_icont;
+};
+
+} //namespace dtl {
+} //namespace container {
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_DETAIL_NODE_ALLOC_HPP_
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/node_pool.hpp b/src/third_party/boost-1.69.0/boost/container/detail/node_pool.hpp
index e43956b643f..e43956b643f 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/node_pool.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/node_pool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/node_pool_impl.hpp b/src/third_party/boost-1.69.0/boost/container/detail/node_pool_impl.hpp
index 97f555bc752..97f555bc752 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/node_pool_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/node_pool_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/pair.hpp b/src/third_party/boost-1.69.0/boost/container/detail/pair.hpp
index 9cca9f6ba83..9cca9f6ba83 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/pair.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/pair.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/pair_key_mapped_of_value.hpp b/src/third_party/boost-1.69.0/boost/container/detail/pair_key_mapped_of_value.hpp
index 6112b87826c..6112b87826c 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/pair_key_mapped_of_value.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/pair_key_mapped_of_value.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/placement_new.hpp b/src/third_party/boost-1.69.0/boost/container/detail/placement_new.hpp
index c50981f6858..c50981f6858 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/placement_new.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/placement_new.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/pool_common.hpp b/src/third_party/boost-1.69.0/boost/container/detail/pool_common.hpp
index f42c1dd4d24..f42c1dd4d24 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/pool_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/pool_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/pool_common_alloc.hpp b/src/third_party/boost-1.69.0/boost/container/detail/pool_common_alloc.hpp
index bfb82f5561b..bfb82f5561b 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/pool_common_alloc.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/pool_common_alloc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/pool_resource.hpp b/src/third_party/boost-1.69.0/boost/container/detail/pool_resource.hpp
index e5f59f51869..e5f59f51869 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/pool_resource.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/pool_resource.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/singleton.hpp b/src/third_party/boost-1.69.0/boost/container/detail/singleton.hpp
index 7601c3ca8c0..7601c3ca8c0 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/singleton.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/singleton.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/std_fwd.hpp b/src/third_party/boost-1.69.0/boost/container/detail/std_fwd.hpp
new file mode 100644
index 00000000000..a25c411e800
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/std_fwd.hpp
@@ -0,0 +1,59 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2014-2014. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
+#define BOOST_CONTAINER_DETAIL_STD_FWD_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+// Standard predeclarations
+//////////////////////////////////////////////////////////////////////////////
+
+#include <boost/move/detail/std_ns_begin.hpp>
+BOOST_MOVE_STD_NS_BEG
+
+template<class T>
+class allocator;
+
+template<class T>
+struct less;
+
+template<class T>
+struct equal_to;
+
+template<class T1, class T2>
+struct pair;
+
+template<class T>
+struct char_traits;
+
+struct input_iterator_tag;
+struct forward_iterator_tag;
+struct bidirectional_iterator_tag;
+struct random_access_iterator_tag;
+
+template<class Container>
+class insert_iterator;
+
+struct allocator_arg_t;
+
+struct piecewise_construct_t;
+
+BOOST_MOVE_STD_NS_END
+#include <boost/move/detail/std_ns_end.hpp>
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_STD_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/thread_mutex.hpp b/src/third_party/boost-1.69.0/boost/container/detail/thread_mutex.hpp
new file mode 100644
index 00000000000..66d64b9c5e7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/thread_mutex.hpp
@@ -0,0 +1,181 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2018-2018. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//
+// This code is partially based on the lightweight mutex implemented
+// by Boost.SmartPtr:
+//
+// Copyright (c) 2002, 2003 Peter Dimov
+// Copyright (c) Microsoft Corporation 2014
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#ifndef BOOST_CONTAINER_DETAIL_THREAD_MUTEX_HPP
+#define BOOST_CONTAINER_DETAIL_THREAD_MUTEX_HPP
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+#if defined(BOOST_HAS_PTHREADS)
+
+#include <pthread.h>
+#include <boost/assert.hpp>
+
+namespace boost{
+namespace container {
+namespace dtl {
+
+class thread_mutex
+{
+ public:
+ thread_mutex()
+ {
+ BOOST_VERIFY(pthread_mutex_init(&m_mut, 0) == 0);
+ }
+
+ ~thread_mutex()
+ {
+ BOOST_VERIFY(pthread_mutex_destroy(&m_mut) == 0);
+ }
+
+ void lock()
+ {
+ BOOST_VERIFY(pthread_mutex_lock( &m_mut) == 0);
+ }
+
+ void unlock()
+ {
+ BOOST_VERIFY(pthread_mutex_unlock(&m_mut) == 0);
+ }
+
+ private:
+ thread_mutex(thread_mutex const &);
+ thread_mutex & operator=(thread_mutex const &);
+
+ pthread_mutex_t m_mut;
+};
+
+} // namespace dtl {
+} // namespace container {
+} // namespace boost {
+
+#else //!BOOST_HAS_PTHREADS (Windows implementation)
+
+#ifdef BOOST_USE_WINDOWS_H
+
+#include <windows.h>
+
+namespace boost{
+namespace container {
+namespace dtl {
+
+typedef ::CRITICAL_SECTION win_critical_section;
+
+} // namespace dtl {
+} // namespace container {
+} // namespace boost {
+
+#else //! BOOST_USE_WINDOWS_H
+
+struct _RTL_CRITICAL_SECTION_DEBUG;
+struct _RTL_CRITICAL_SECTION;
+
+namespace boost{
+namespace container {
+namespace dtl {
+
+#ifdef BOOST_PLAT_WINDOWS_UWP
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSectionEx(::_RTL_CRITICAL_SECTION *, unsigned long, unsigned long);
+#else
+extern "C" __declspec(dllimport) void __stdcall InitializeCriticalSection(::_RTL_CRITICAL_SECTION *);
+#endif
+extern "C" __declspec(dllimport) void __stdcall EnterCriticalSection(::_RTL_CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall LeaveCriticalSection(::_RTL_CRITICAL_SECTION *);
+extern "C" __declspec(dllimport) void __stdcall DeleteCriticalSection(::_RTL_CRITICAL_SECTION *);
+
+struct win_critical_section
+{
+ struct _RTL_CRITICAL_SECTION_DEBUG * DebugInfo;
+ long LockCount;
+ long RecursionCount;
+ void * OwningThread;
+ void * LockSemaphore;
+ #if defined(_WIN64)
+ unsigned __int64 SpinCount;
+ #else
+ unsigned long SpinCount;
+ #endif
+};
+
+} // namespace dtl {
+} // namespace container {
+} // namespace boost {
+
+#endif //BOOST_USE_WINDOWS_H
+
+namespace boost{
+namespace container {
+namespace dtl {
+
+class thread_mutex
+{
+ public:
+ thread_mutex()
+ {
+ #ifdef BOOST_PLAT_WINDOWS_UWP
+ InitializeCriticalSectionEx(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect), 4000, 0);
+ #else
+ InitializeCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect));
+ #endif
+ }
+
+ void lock()
+ {
+ EnterCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect));
+ }
+
+ void unlock()
+ {
+ LeaveCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect));
+ }
+
+ ~thread_mutex()
+ {
+ DeleteCriticalSection(reinterpret_cast< ::_RTL_CRITICAL_SECTION* >(&m_crit_sect));
+ }
+
+ private:
+ thread_mutex(thread_mutex const &);
+ thread_mutex & operator=(thread_mutex const &);
+
+ win_critical_section m_crit_sect;
+};
+
+} // namespace dtl {
+} // namespace container {
+} // namespace boost {
+
+#endif //BOOST_HAS_PTHREADS
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // #ifndef BOOST_CONTAINER_DETAIL_THREAD_MUTEX_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/transform_iterator.hpp b/src/third_party/boost-1.69.0/boost/container/detail/transform_iterator.hpp
index ce81813ebbc..ce81813ebbc 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/transform_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/transform_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/tree.hpp b/src/third_party/boost-1.69.0/boost/container/detail/tree.hpp
new file mode 100644
index 00000000000..498fc739687
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/tree.hpp
@@ -0,0 +1,1496 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_TREE_HPP
+#define BOOST_CONTAINER_TREE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+// container
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/options.hpp>
+#include <boost/container/node_handle.hpp>
+
+// container/detail
+#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
+#include <boost/container/detail/compare_functors.hpp>
+#include <boost/container/detail/destroyers.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/container/detail/node_alloc_holder.hpp>
+#include <boost/container/detail/pair.hpp>
+#include <boost/container/detail/type_traits.hpp>
+// intrusive
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/rbtree.hpp>
+#include <boost/intrusive/avltree.hpp>
+#include <boost/intrusive/splaytree.hpp>
+#include <boost/intrusive/sgtree.hpp>
+// intrusive/detail
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+#include <boost/intrusive/detail/tree_value_compare.hpp> //tree_value_compare
+// move
+#include <boost/move/utility_core.hpp>
+// move/detail
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/detail/move_helpers.hpp>
+// other
+#include <boost/core/no_exceptions_support.hpp>
+
+
+
+#include <boost/container/detail/std_fwd.hpp>
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+using boost::intrusive::tree_value_compare;
+
+template<class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
+struct intrusive_tree_hook;
+
+template<class VoidPointer, bool OptimizeSize>
+struct intrusive_tree_hook<VoidPointer, boost::container::red_black_tree, OptimizeSize>
+{
+ typedef typename dtl::bi::make_set_base_hook
+ < dtl::bi::void_pointer<VoidPointer>
+ , dtl::bi::link_mode<dtl::bi::normal_link>
+ , dtl::bi::optimize_size<OptimizeSize>
+ >::type type;
+};
+
+template<class VoidPointer, bool OptimizeSize>
+struct intrusive_tree_hook<VoidPointer, boost::container::avl_tree, OptimizeSize>
+{
+ typedef typename dtl::bi::make_avl_set_base_hook
+ < dtl::bi::void_pointer<VoidPointer>
+ , dtl::bi::link_mode<dtl::bi::normal_link>
+ , dtl::bi::optimize_size<OptimizeSize>
+ >::type type;
+};
+
+template<class VoidPointer, bool OptimizeSize>
+struct intrusive_tree_hook<VoidPointer, boost::container::scapegoat_tree, OptimizeSize>
+{
+ typedef typename dtl::bi::make_bs_set_base_hook
+ < dtl::bi::void_pointer<VoidPointer>
+ , dtl::bi::link_mode<dtl::bi::normal_link>
+ >::type type;
+};
+
+template<class VoidPointer, bool OptimizeSize>
+struct intrusive_tree_hook<VoidPointer, boost::container::splay_tree, OptimizeSize>
+{
+ typedef typename dtl::bi::make_bs_set_base_hook
+ < dtl::bi::void_pointer<VoidPointer>
+ , dtl::bi::link_mode<dtl::bi::normal_link>
+ >::type type;
+};
+
+//This trait is used to type-pun std::pair because in C++03
+//compilers std::pair is useless for C++11 features
+template<class T>
+struct tree_internal_data_type
+{
+ typedef T type;
+};
+
+template<class T1, class T2>
+struct tree_internal_data_type< std::pair<T1, T2> >
+{
+ typedef pair<typename boost::move_detail::remove_const<T1>::type, T2> type;
+};
+
+//The node to be store in the tree
+template <class T, class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
+struct tree_node
+ : public intrusive_tree_hook<VoidPointer, tree_type_value, OptimizeSize>::type
+{
+ public:
+ typedef typename intrusive_tree_hook
+ <VoidPointer, tree_type_value, OptimizeSize>::type hook_type;
+ typedef T value_type;
+ typedef typename tree_internal_data_type<T>::type internal_type;
+
+ typedef tree_node< T, VoidPointer
+ , tree_type_value, OptimizeSize> node_t;
+
+ typedef typename boost::container::dtl::aligned_storage
+ <sizeof(T), boost::container::dtl::alignment_of<T>::value>::type storage_t;
+ storage_t m_storage;
+
+ #if defined(BOOST_GCC) && (BOOST_GCC >= 40600) && (BOOST_GCC < 80000)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+ #define BOOST_CONTAINER_DISABLE_ALIASING_WARNING
+ # endif
+
+ BOOST_CONTAINER_FORCEINLINE T &get_data()
+ { return *reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const T &get_data() const
+ { return *reinterpret_cast<const T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE T *get_data_ptr()
+ { return reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const T *get_data_ptr() const
+ { return reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE internal_type &get_real_data()
+ { return *reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const internal_type &get_real_data() const
+ { return *reinterpret_cast<const internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE internal_type *get_real_data_ptr()
+ { return reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const internal_type *get_real_data_ptr() const
+ { return reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE ~tree_node()
+ { reinterpret_cast<internal_type*>(this->m_storage.data)->~internal_type(); }
+
+ #if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING)
+ #pragma GCC diagnostic pop
+ #undef BOOST_CONTAINER_DISABLE_ALIASING_WARNING
+ # endif
+
+ BOOST_CONTAINER_FORCEINLINE void destroy_header()
+ { static_cast<hook_type*>(this)->~hook_type(); }
+
+ template<class T1, class T2>
+ BOOST_CONTAINER_FORCEINLINE void do_assign(const std::pair<const T1, T2> &p)
+ {
+ const_cast<T1&>(this->get_real_data().first) = p.first;
+ this->get_real_data().second = p.second;
+ }
+
+ template<class T1, class T2>
+ BOOST_CONTAINER_FORCEINLINE void do_assign(const pair<const T1, T2> &p)
+ {
+ const_cast<T1&>(this->get_real_data().first) = p.first;
+ this->get_real_data().second = p.second;
+ }
+
+ template<class V>
+ BOOST_CONTAINER_FORCEINLINE void do_assign(const V &v)
+ { this->get_real_data() = v; }
+
+ template<class T1, class T2>
+ BOOST_CONTAINER_FORCEINLINE void do_move_assign(std::pair<const T1, T2> &p)
+ {
+ const_cast<T1&>(this->get_real_data().first) = ::boost::move(p.first);
+ this->get_real_data().second = ::boost::move(p.second);
+ }
+
+ template<class T1, class T2>
+ BOOST_CONTAINER_FORCEINLINE void do_move_assign(pair<const T1, T2> &p)
+ {
+ const_cast<T1&>(this->get_real_data().first) = ::boost::move(p.first);
+ this->get_real_data().second = ::boost::move(p.second);
+ }
+
+ template<class V>
+ BOOST_CONTAINER_FORCEINLINE void do_move_assign(V &v)
+ { this->get_real_data() = ::boost::move(v); }
+};
+
+template <class T, class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
+struct iiterator_node_value_type< tree_node<T, VoidPointer, tree_type_value, OptimizeSize> > {
+ typedef T type;
+};
+
+template<class Node, class Icont>
+class insert_equal_end_hint_functor
+{
+ Icont &icont_;
+
+ public:
+ BOOST_CONTAINER_FORCEINLINE insert_equal_end_hint_functor(Icont &icont)
+ : icont_(icont)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE void operator()(Node &n)
+ { this->icont_.insert_equal(this->icont_.cend(), n); }
+};
+
+template<class Node, class Icont>
+class push_back_functor
+{
+ Icont &icont_;
+
+ public:
+ BOOST_CONTAINER_FORCEINLINE push_back_functor(Icont &icont)
+ : icont_(icont)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE void operator()(Node &n)
+ { this->icont_.push_back(n); }
+};
+
+}//namespace dtl {
+
+namespace dtl {
+
+template< class NodeType, class NodeCompareType
+ , class SizeType, class HookType
+ , boost::container::tree_type_enum tree_type_value>
+struct intrusive_tree_dispatch;
+
+template<class NodeType, class NodeCompareType, class SizeType, class HookType>
+struct intrusive_tree_dispatch
+ <NodeType, NodeCompareType, SizeType, HookType, boost::container::red_black_tree>
+{
+ typedef typename dtl::bi::make_rbtree
+ <NodeType
+ ,dtl::bi::compare<NodeCompareType>
+ ,dtl::bi::base_hook<HookType>
+ ,dtl::bi::constant_time_size<true>
+ ,dtl::bi::size_type<SizeType>
+ >::type type;
+};
+
+template<class NodeType, class NodeCompareType, class SizeType, class HookType>
+struct intrusive_tree_dispatch
+ <NodeType, NodeCompareType, SizeType, HookType, boost::container::avl_tree>
+{
+ typedef typename dtl::bi::make_avltree
+ <NodeType
+ ,dtl::bi::compare<NodeCompareType>
+ ,dtl::bi::base_hook<HookType>
+ ,dtl::bi::constant_time_size<true>
+ ,dtl::bi::size_type<SizeType>
+ >::type type;
+};
+
+template<class NodeType, class NodeCompareType, class SizeType, class HookType>
+struct intrusive_tree_dispatch
+ <NodeType, NodeCompareType, SizeType, HookType, boost::container::scapegoat_tree>
+{
+ typedef typename dtl::bi::make_sgtree
+ <NodeType
+ ,dtl::bi::compare<NodeCompareType>
+ ,dtl::bi::base_hook<HookType>
+ ,dtl::bi::floating_point<true>
+ ,dtl::bi::size_type<SizeType>
+ >::type type;
+};
+
+template<class NodeType, class NodeCompareType, class SizeType, class HookType>
+struct intrusive_tree_dispatch
+ <NodeType, NodeCompareType, SizeType, HookType, boost::container::splay_tree>
+{
+ typedef typename dtl::bi::make_splaytree
+ <NodeType
+ ,dtl::bi::compare<NodeCompareType>
+ ,dtl::bi::base_hook<HookType>
+ ,dtl::bi::constant_time_size<true>
+ ,dtl::bi::size_type<SizeType>
+ >::type type;
+};
+
+template<class Allocator, class ValueCompare, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
+struct intrusive_tree_type
+{
+ private:
+ typedef typename boost::container::
+ allocator_traits<Allocator>::value_type value_type;
+ typedef typename boost::container::
+ allocator_traits<Allocator>::void_pointer void_pointer;
+ typedef typename boost::container::
+ allocator_traits<Allocator>::size_type size_type;
+ typedef typename dtl::tree_node
+ < value_type, void_pointer
+ , tree_type_value, OptimizeSize> node_t;
+ typedef value_to_node_compare
+ <node_t, ValueCompare> node_compare_type;
+ //Deducing the hook type from node_t (e.g. node_t::hook_type) would
+ //provoke an early instantiation of node_t that could ruin recursive
+ //tree definitions, so retype the complete type to avoid any problem.
+ typedef typename intrusive_tree_hook
+ <void_pointer, tree_type_value
+ , OptimizeSize>::type hook_type;
+ public:
+ typedef typename intrusive_tree_dispatch
+ < node_t, node_compare_type
+ , size_type, hook_type
+ , tree_type_value>::type type;
+};
+
+//Trait to detect manually rebalanceable tree types
+template<boost::container::tree_type_enum tree_type_value>
+struct is_manually_balanceable
+{ static const bool value = true; };
+
+template<> struct is_manually_balanceable<red_black_tree>
+{ static const bool value = false; };
+
+template<> struct is_manually_balanceable<avl_tree>
+{ static const bool value = false; };
+
+//Proxy traits to implement different operations depending on the
+//is_manually_balanceable<>::value
+template< boost::container::tree_type_enum tree_type_value
+ , bool IsManuallyRebalanceable = is_manually_balanceable<tree_type_value>::value>
+struct intrusive_tree_proxy
+{
+ template<class Icont>
+ BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &) {}
+};
+
+template<boost::container::tree_type_enum tree_type_value>
+struct intrusive_tree_proxy<tree_type_value, true>
+{
+ template<class Icont>
+ BOOST_CONTAINER_FORCEINLINE static void rebalance(Icont &c)
+ { c.rebalance(); }
+};
+
+} //namespace dtl {
+
+namespace dtl {
+
+//This functor will be used with Intrusive clone functions to obtain
+//already allocated nodes from a intrusive container instead of
+//allocating new ones. When the intrusive container runs out of nodes
+//the node holder is used instead.
+template<class AllocHolder, bool DoMove>
+class RecyclingCloner
+{
+ typedef typename AllocHolder::intrusive_container intrusive_container;
+ typedef typename AllocHolder::Node node_t;
+ typedef typename AllocHolder::NodePtr node_ptr_type;
+
+ public:
+ RecyclingCloner(AllocHolder &holder, intrusive_container &itree)
+ : m_holder(holder), m_icont(itree)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type &p, const node_t &other, bool_<true>)
+ { p->do_move_assign(const_cast<node_t &>(other).get_real_data()); }
+
+ BOOST_CONTAINER_FORCEINLINE static void do_assign(node_ptr_type &p, const node_t &other, bool_<false>)
+ { p->do_assign(other.get_real_data()); }
+
+ node_ptr_type operator()(const node_t &other) const
+ {
+ if(node_ptr_type p = m_icont.unlink_leftmost_without_rebalance()){
+ //First recycle a node (this can't throw)
+ BOOST_TRY{
+ //This can throw
+ this->do_assign(p, other, bool_<DoMove>());
+ return p;
+ }
+ BOOST_CATCH(...){
+ //If there is an exception destroy the whole source
+ m_holder.destroy_node(p);
+ while((p = m_icont.unlink_leftmost_without_rebalance())){
+ m_holder.destroy_node(p);
+ }
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ else{
+ return m_holder.create_node(other.get_real_data());
+ }
+ }
+
+ AllocHolder &m_holder;
+ intrusive_container &m_icont;
+};
+
+
+template<class KeyCompare, class KeyOfValue>
+struct key_node_compare
+ : public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
+{
+ BOOST_CONTAINER_FORCEINLINE explicit key_node_compare(const KeyCompare &comp)
+ : base_t(comp)
+ {}
+
+ typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
+ typedef KeyCompare key_compare;
+ typedef KeyOfValue key_of_value;
+ typedef typename KeyOfValue::type key_type;
+
+
+ template <class T, class VoidPointer, boost::container::tree_type_enum tree_type_value, bool OptimizeSize>
+ BOOST_CONTAINER_FORCEINLINE static const key_type &
+ key_from(const tree_node<T, VoidPointer, tree_type_value, OptimizeSize> &n)
+ {
+ return key_of_value()(n.get_data());
+ }
+
+ template <class T>
+ BOOST_CONTAINER_FORCEINLINE static const T &
+ key_from(const T &t)
+ {
+ return t;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE const key_compare &key_comp() const
+ { return static_cast<const key_compare &>(*this); }
+
+ BOOST_CONTAINER_FORCEINLINE key_compare &key_comp()
+ { return static_cast<key_compare &>(*this); }
+
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const key_type &key2) const
+ { return this->key_comp()(key1, key2); }
+
+ template<class U>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const key_type &key1, const U &nonkey2) const
+ { return this->key_comp()(key1, this->key_from(nonkey2)); }
+
+ template<class U>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const key_type &key2) const
+ { return this->key_comp()(this->key_from(nonkey1), key2); }
+
+ template<class U, class V>
+ BOOST_CONTAINER_FORCEINLINE bool operator()(const U &nonkey1, const V &nonkey2) const
+ { return this->key_comp()(this->key_from(nonkey1), this->key_from(nonkey2)); }
+};
+
+template<class Options>
+struct get_tree_opt
+{
+ typedef Options type;
+};
+
+template<>
+struct get_tree_opt<void>
+{
+ typedef tree_assoc_defaults type;
+};
+
+template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
+class tree
+ : public dtl::node_alloc_holder
+ < Allocator
+ , typename dtl::intrusive_tree_type
+ < Allocator, tree_value_compare
+ <typename allocator_traits<Allocator>::pointer, Compare, KeyOfValue>
+ , get_tree_opt<Options>::type::tree_type
+ , get_tree_opt<Options>::type::optimize_size
+ >::type
+ >
+{
+ typedef tree_value_compare
+ < typename allocator_traits<Allocator>::pointer
+ , Compare, KeyOfValue> ValComp;
+ typedef typename get_tree_opt<Options>::type options_type;
+ typedef typename dtl::intrusive_tree_type
+ < Allocator, ValComp
+ , options_type::tree_type
+ , options_type::optimize_size
+ >::type Icont;
+ typedef dtl::node_alloc_holder
+ <Allocator, Icont> AllocHolder;
+ typedef typename AllocHolder::NodePtr NodePtr;
+ typedef tree < T, KeyOfValue
+ , Compare, Allocator, Options> ThisType;
+ typedef typename AllocHolder::NodeAlloc NodeAlloc;
+ typedef boost::container::
+ allocator_traits<NodeAlloc> allocator_traits_type;
+ typedef typename AllocHolder::ValAlloc ValAlloc;
+ typedef typename AllocHolder::Node Node;
+ typedef typename Icont::iterator iiterator;
+ typedef typename Icont::const_iterator iconst_iterator;
+ typedef dtl::allocator_destroyer<NodeAlloc> Destroyer;
+ typedef typename AllocHolder::alloc_version alloc_version;
+ typedef intrusive_tree_proxy<options_type::tree_type> intrusive_tree_proxy_t;
+
+ BOOST_COPYABLE_AND_MOVABLE(tree)
+
+ public:
+
+ typedef typename KeyOfValue::type key_type;
+ typedef T value_type;
+ typedef Allocator allocator_type;
+ typedef Compare key_compare;
+ typedef ValComp value_compare;
+ typedef typename boost::container::
+ allocator_traits<Allocator>::pointer pointer;
+ typedef typename boost::container::
+ allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename boost::container::
+ allocator_traits<Allocator>::reference reference;
+ typedef typename boost::container::
+ allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename boost::container::
+ allocator_traits<Allocator>::size_type size_type;
+ typedef typename boost::container::
+ allocator_traits<Allocator>::difference_type difference_type;
+ typedef dtl::iterator_from_iiterator
+ <iiterator, false> iterator;
+ typedef dtl::iterator_from_iiterator
+ <iiterator, true > const_iterator;
+ typedef boost::container::reverse_iterator
+ <iterator> reverse_iterator;
+ typedef boost::container::reverse_iterator
+ <const_iterator> const_reverse_iterator;
+ typedef node_handle
+ < NodeAlloc, void> node_type;
+ typedef insert_return_type_base
+ <iterator, node_type> insert_return_type;
+
+ typedef NodeAlloc stored_allocator_type;
+
+ private:
+
+ typedef key_node_compare<key_compare, KeyOfValue> KeyNodeCompare;
+
+ public:
+
+ BOOST_CONTAINER_FORCEINLINE tree()
+ : AllocHolder()
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp)
+ : AllocHolder(ValComp(comp))
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE explicit tree(const key_compare& comp, const allocator_type& a)
+ : AllocHolder(ValComp(comp), a)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE explicit tree(const allocator_type& a)
+ : AllocHolder(a)
+ {}
+
+ template <class InputIterator>
+ tree(bool unique_insertion, InputIterator first, InputIterator last)
+ : AllocHolder(value_compare(key_compare()))
+ {
+ this->tree_construct(unique_insertion, first, last);
+ //AllocHolder clears in case of exception
+ }
+
+ template <class InputIterator>
+ tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp)
+ : AllocHolder(value_compare(comp))
+ {
+ this->tree_construct(unique_insertion, first, last);
+ //AllocHolder clears in case of exception
+ }
+
+ template <class InputIterator>
+ tree(bool unique_insertion, InputIterator first, InputIterator last, const key_compare& comp, const allocator_type& a)
+ : AllocHolder(value_compare(comp), a)
+ {
+ this->tree_construct(unique_insertion, first, last);
+ //AllocHolder clears in case of exception
+ }
+
+ //construct with ordered range
+ template <class InputIterator>
+ tree( ordered_range_t, InputIterator first, InputIterator last)
+ : AllocHolder(value_compare(key_compare()))
+ {
+ this->tree_construct(ordered_range_t(), first, last);
+ }
+
+ template <class InputIterator>
+ tree( ordered_range_t, InputIterator first, InputIterator last, const key_compare& comp)
+ : AllocHolder(value_compare(comp))
+ {
+ this->tree_construct(ordered_range_t(), first, last);
+ }
+
+ template <class InputIterator>
+ tree( ordered_range_t, InputIterator first, InputIterator last
+ , const key_compare& comp, const allocator_type& a)
+ : AllocHolder(value_compare(comp), a)
+ {
+ this->tree_construct(ordered_range_t(), first, last);
+ }
+
+ private:
+
+ template <class InputIterator>
+ void tree_construct(bool unique_insertion, InputIterator first, InputIterator last)
+ {
+ //Use cend() as hint to achieve linear time for
+ //ordered ranges as required by the standard
+ //for the constructor
+ if(unique_insertion){
+ const const_iterator end_it(this->cend());
+ for ( ; first != last; ++first){
+ this->insert_unique_convertible(end_it, *first);
+ }
+ }
+ else{
+ this->tree_construct_non_unique(first, last);
+ }
+ }
+
+ template <class InputIterator>
+ void tree_construct_non_unique(InputIterator first, InputIterator last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::enable_if_or
+ < void
+ , dtl::is_same<alloc_version, version_1>
+ , dtl::is_input_iterator<InputIterator>
+ >::type * = 0
+ #endif
+ )
+ {
+ //Use cend() as hint to achieve linear time for
+ //ordered ranges as required by the standard
+ //for the constructor
+ const const_iterator end_it(this->cend());
+ for ( ; first != last; ++first){
+ this->insert_equal_convertible(end_it, *first);
+ }
+ }
+
+ template <class InputIterator>
+ void tree_construct_non_unique(InputIterator first, InputIterator last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_same<alloc_version, version_1>
+ , dtl::is_input_iterator<InputIterator>
+ >::type * = 0
+ #endif
+ )
+ {
+ //Optimized allocation and construction
+ this->allocate_many_and_construct
+ ( first, boost::container::iterator_distance(first, last)
+ , insert_equal_end_hint_functor<Node, Icont>(this->icont()));
+ }
+
+ template <class InputIterator>
+ void tree_construct( ordered_range_t, InputIterator first, InputIterator last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_same<alloc_version, version_1>
+ , dtl::is_input_iterator<InputIterator>
+ >::type * = 0
+ #endif
+ )
+ {
+ //Optimized allocation and construction
+ this->allocate_many_and_construct
+ ( first, boost::container::iterator_distance(first, last)
+ , dtl::push_back_functor<Node, Icont>(this->icont()));
+ //AllocHolder clears in case of exception
+ }
+
+ template <class InputIterator>
+ void tree_construct( ordered_range_t, InputIterator first, InputIterator last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::enable_if_or
+ < void
+ , dtl::is_same<alloc_version, version_1>
+ , dtl::is_input_iterator<InputIterator>
+ >::type * = 0
+ #endif
+ )
+ {
+ for ( ; first != last; ++first){
+ this->push_back_impl(*first);
+ }
+ }
+
+ public:
+
+ BOOST_CONTAINER_FORCEINLINE tree(const tree& x)
+ : AllocHolder(x, x.value_comp())
+ {
+ this->icont().clone_from
+ (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc()));
+ }
+
+ BOOST_CONTAINER_FORCEINLINE tree(BOOST_RV_REF(tree) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x), x.value_comp())
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE tree(const tree& x, const allocator_type &a)
+ : AllocHolder(x.value_comp(), a)
+ {
+ this->icont().clone_from
+ (x.icont(), typename AllocHolder::cloner(*this), Destroyer(this->node_alloc()));
+ //AllocHolder clears in case of exception
+ }
+
+ tree(BOOST_RV_REF(tree) x, const allocator_type &a)
+ : AllocHolder(x.value_comp(), a)
+ {
+ if(this->node_alloc() == x.node_alloc()){
+ this->icont().swap(x.icont());
+ }
+ else{
+ this->icont().clone_from
+ (boost::move(x.icont()), typename AllocHolder::move_cloner(*this), Destroyer(this->node_alloc()));
+ }
+ //AllocHolder clears in case of exception
+ }
+
+ BOOST_CONTAINER_FORCEINLINE ~tree()
+ {} //AllocHolder clears the tree
+
+ tree& operator=(BOOST_COPY_ASSIGN_REF(tree) x)
+ {
+ if (&x != this){
+ NodeAlloc &this_alloc = this->get_stored_allocator();
+ const NodeAlloc &x_alloc = x.get_stored_allocator();
+ dtl::bool_<allocator_traits<NodeAlloc>::
+ propagate_on_container_copy_assignment::value> flag;
+ if(flag && this_alloc != x_alloc){
+ this->clear();
+ }
+ this->AllocHolder::copy_assign_alloc(x);
+ //Transfer all the nodes to a temporary tree
+ //If anything goes wrong, all the nodes will be destroyed
+ //automatically
+ Icont other_tree(::boost::move(this->icont()));
+
+ //Now recreate the source tree reusing nodes stored by other_tree
+ this->icont().clone_from
+ (x.icont()
+ , RecyclingCloner<AllocHolder, false>(*this, other_tree)
+ , Destroyer(this->node_alloc()));
+
+ //If there are remaining nodes, destroy them
+ NodePtr p;
+ while((p = other_tree.unlink_leftmost_without_rebalance())){
+ AllocHolder::destroy_node(p);
+ }
+ }
+ return *this;
+ }
+
+ tree& operator=(BOOST_RV_REF(tree) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ {
+ BOOST_ASSERT(this != &x);
+ NodeAlloc &this_alloc = this->node_alloc();
+ NodeAlloc &x_alloc = x.node_alloc();
+ const bool propagate_alloc = allocator_traits<NodeAlloc>::
+ propagate_on_container_move_assignment::value;
+ const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
+ //Resources can be transferred if both allocators are
+ //going to be equal after this function (either propagated or already equal)
+ if(propagate_alloc || allocators_equal){
+ //Destroy
+ this->clear();
+ //Move allocator if needed
+ this->AllocHolder::move_assign_alloc(x);
+ //Obtain resources
+ this->icont() = boost::move(x.icont());
+ }
+ //Else do a one by one move
+ else{
+ //Transfer all the nodes to a temporary tree
+ //If anything goes wrong, all the nodes will be destroyed
+ //automatically
+ Icont other_tree(::boost::move(this->icont()));
+
+ //Now recreate the source tree reusing nodes stored by other_tree
+ this->icont().clone_from
+ (::boost::move(x.icont())
+ , RecyclingCloner<AllocHolder, true>(*this, other_tree)
+ , Destroyer(this->node_alloc()));
+
+ //If there are remaining nodes, destroy them
+ NodePtr p;
+ while((p = other_tree.unlink_leftmost_without_rebalance())){
+ AllocHolder::destroy_node(p);
+ }
+ }
+ return *this;
+ }
+
+ public:
+ // accessors:
+ BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
+ { return this->icont().value_comp().predicate(); }
+
+ BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
+ { return this->icont().value_comp().predicate().key_comp(); }
+
+ BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const
+ { return allocator_type(this->node_alloc()); }
+
+ BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const
+ { return this->node_alloc(); }
+
+ BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator()
+ { return this->node_alloc(); }
+
+ BOOST_CONTAINER_FORCEINLINE iterator begin()
+ { return iterator(this->icont().begin()); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator begin() const
+ { return this->cbegin(); }
+
+ BOOST_CONTAINER_FORCEINLINE iterator end()
+ { return iterator(this->icont().end()); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator end() const
+ { return this->cend(); }
+
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin()
+ { return reverse_iterator(end()); }
+
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const
+ { return this->crbegin(); }
+
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rend()
+ { return reverse_iterator(begin()); }
+
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const
+ { return this->crend(); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const
+ { return const_iterator(this->non_const_icont().begin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator cend() const
+ { return const_iterator(this->non_const_icont().end()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const
+ { return const_reverse_iterator(cend()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const
+ { return const_reverse_iterator(cbegin()); }
+
+ BOOST_CONTAINER_FORCEINLINE bool empty() const
+ { return !this->size(); }
+
+ BOOST_CONTAINER_FORCEINLINE size_type size() const
+ { return this->icont().size(); }
+
+ BOOST_CONTAINER_FORCEINLINE size_type max_size() const
+ { return AllocHolder::max_size(); }
+
+ BOOST_CONTAINER_FORCEINLINE void swap(ThisType& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value )
+ { AllocHolder::swap(x); }
+
+ public:
+
+ typedef typename Icont::insert_commit_data insert_commit_data;
+
+ // insert/erase
+ std::pair<iterator,bool> insert_unique_check
+ (const key_type& key, insert_commit_data &data)
+ {
+ std::pair<iiterator, bool> ret =
+ this->icont().insert_unique_check(key, KeyNodeCompare(key_comp()), data);
+ return std::pair<iterator, bool>(iterator(ret.first), ret.second);
+ }
+
+ std::pair<iterator,bool> insert_unique_check
+ (const_iterator hint, const key_type& key, insert_commit_data &data)
+ {
+ BOOST_ASSERT((priv_is_linked)(hint));
+ std::pair<iiterator, bool> ret =
+ this->icont().insert_unique_check(hint.get(), key, KeyNodeCompare(key_comp()), data);
+ return std::pair<iterator, bool>(iterator(ret.first), ret.second);
+ }
+
+ template<class MovableConvertible>
+ iterator insert_unique_commit
+ (BOOST_FWD_REF(MovableConvertible) v, insert_commit_data &data)
+ {
+ NodePtr tmp = AllocHolder::create_node(boost::forward<MovableConvertible>(v));
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
+ iterator ret(this->icont().insert_unique_commit(*tmp, data));
+ destroy_deallocator.release();
+ return ret;
+ }
+
+ template<class MovableConvertible>
+ std::pair<iterator,bool> insert_unique(BOOST_FWD_REF(MovableConvertible) v)
+ {
+ insert_commit_data data;
+ std::pair<iterator,bool> ret =
+ this->insert_unique_check(KeyOfValue()(v), data);
+ if(ret.second){
+ ret.first = this->insert_unique_commit(boost::forward<MovableConvertible>(v), data);
+ }
+ return ret;
+ }
+
+ private:
+
+ template<class KeyConvertible, class M>
+ iiterator priv_insert_or_assign_commit
+ (BOOST_FWD_REF(KeyConvertible) key, BOOST_FWD_REF(M) obj, insert_commit_data &data)
+ {
+ NodePtr tmp = AllocHolder::create_node(boost::forward<KeyConvertible>(key), boost::forward<M>(obj));
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
+ iiterator ret(this->icont().insert_unique_commit(*tmp, data));
+ destroy_deallocator.release();
+ return ret;
+ }
+
+ bool priv_is_linked(const_iterator const position) const
+ {
+ iiterator const cur(position.get());
+ return cur == this->icont().end() ||
+ cur == this->icont().root() ||
+ iiterator(cur).go_parent().go_left() == cur ||
+ iiterator(cur).go_parent().go_right() == cur;
+ }
+
+ template<class MovableConvertible>
+ void push_back_impl(BOOST_FWD_REF(MovableConvertible) v)
+ {
+ NodePtr tmp(AllocHolder::create_node(boost::forward<MovableConvertible>(v)));
+ //push_back has no-throw guarantee so avoid any deallocator/destroyer
+ this->icont().push_back(*tmp);
+ }
+
+ std::pair<iterator, bool> emplace_unique_impl(NodePtr p)
+ {
+ value_type &v = p->get_data();
+ insert_commit_data data;
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(p, this->node_alloc());
+ std::pair<iterator,bool> ret =
+ this->insert_unique_check(KeyOfValue()(v), data);
+ if(!ret.second){
+ return ret;
+ }
+ //No throw insertion part, release rollback
+ destroy_deallocator.release();
+ return std::pair<iterator,bool>
+ ( iterator(this->icont().insert_unique_commit(*p, data))
+ , true );
+ }
+
+ iterator emplace_unique_hint_impl(const_iterator hint, NodePtr p)
+ {
+ BOOST_ASSERT((priv_is_linked)(hint));
+ value_type &v = p->get_data();
+ insert_commit_data data;
+ std::pair<iterator,bool> ret =
+ this->insert_unique_check(hint, KeyOfValue()(v), data);
+ if(!ret.second){
+ Destroyer(this->node_alloc())(p);
+ return ret.first;
+ }
+ return iterator(this->icont().insert_unique_commit(*p, data));
+ }
+
+ public:
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> emplace_unique(BOOST_FWD_REF(Args)... args)
+ { return this->emplace_unique_impl(AllocHolder::create_node(boost::forward<Args>(args)...)); }
+
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint_unique(const_iterator hint, BOOST_FWD_REF(Args)... args)
+ { return this->emplace_unique_hint_impl(hint, AllocHolder::create_node(boost::forward<Args>(args)...)); }
+
+ template <class... Args>
+ iterator emplace_equal(BOOST_FWD_REF(Args)... args)
+ {
+ NodePtr tmp(AllocHolder::create_node(boost::forward<Args>(args)...));
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
+ iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));
+ destroy_deallocator.release();
+ return ret;
+ }
+
+ template <class... Args>
+ iterator emplace_hint_equal(const_iterator hint, BOOST_FWD_REF(Args)... args)
+ {
+ BOOST_ASSERT((priv_is_linked)(hint));
+ NodePtr tmp(AllocHolder::create_node(boost::forward<Args>(args)...));
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
+ iterator ret(this->icont().insert_equal(hint.get(), *tmp));
+ destroy_deallocator.release();
+ return ret;
+ }
+
+ template <class KeyType, class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace
+ (const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(Args)... args)
+ {
+ insert_commit_data data;
+ const key_type & k = key; //Support emulated rvalue references
+ std::pair<iiterator, bool> ret =
+ hint == const_iterator() ? this->icont().insert_unique_check( k, KeyNodeCompare(key_comp()), data)
+ : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);
+ if(ret.second){
+ ret.first = this->icont().insert_unique_commit
+ (*AllocHolder::create_node(try_emplace_t(), boost::forward<KeyType>(key), boost::forward<Args>(args)...), data);
+ }
+ return std::pair<iterator, bool>(iterator(ret.first), ret.second);
+ }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_TREE_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ std::pair<iterator, bool> emplace_unique(BOOST_MOVE_UREF##N)\
+ { return this->emplace_unique_impl(AllocHolder::create_node(BOOST_MOVE_FWD##N)); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace_hint_unique(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->emplace_unique_hint_impl(hint, AllocHolder::create_node(BOOST_MOVE_FWD##N)); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace_equal(BOOST_MOVE_UREF##N)\
+ {\
+ NodePtr tmp(AllocHolder::create_node(BOOST_MOVE_FWD##N));\
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());\
+ iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));\
+ destroy_deallocator.release();\
+ return ret;\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace_hint_equal(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ BOOST_ASSERT((priv_is_linked)(hint));\
+ NodePtr tmp(AllocHolder::create_node(BOOST_MOVE_FWD##N));\
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());\
+ iterator ret(this->icont().insert_equal(hint.get(), *tmp));\
+ destroy_deallocator.release();\
+ return ret;\
+ }\
+ \
+ template <class KeyType BOOST_MOVE_I##N BOOST_MOVE_CLASS##N>\
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool>\
+ try_emplace(const_iterator hint, BOOST_FWD_REF(KeyType) key BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ insert_commit_data data;\
+ const key_type & k = key;\
+ std::pair<iiterator, bool> ret =\
+ hint == const_iterator() ? this->icont().insert_unique_check( k, KeyNodeCompare(key_comp()), data)\
+ : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);\
+ if(ret.second){\
+ ret.first = this->icont().insert_unique_commit\
+ (*AllocHolder::create_node(try_emplace_t(), boost::forward<KeyType>(key) BOOST_MOVE_I##N BOOST_MOVE_FWD##N), data);\
+ }\
+ return std::pair<iterator, bool>(iterator(ret.first), ret.second);\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_TREE_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_TREE_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template<class MovableConvertible>
+ iterator insert_unique_convertible(const_iterator hint, BOOST_FWD_REF(MovableConvertible) v)
+ {
+ BOOST_ASSERT((priv_is_linked)(hint));
+ insert_commit_data data;
+ std::pair<iterator,bool> ret =
+ this->insert_unique_check(hint, KeyOfValue()(v), data);
+ if(!ret.second)
+ return ret.first;
+ return this->insert_unique_commit(boost::forward<MovableConvertible>(v), data);
+ }
+
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_unique, value_type, iterator, this->insert_unique_convertible, const_iterator, const_iterator)
+
+ template <class InputIterator>
+ void insert_unique(InputIterator first, InputIterator last)
+ {
+ for( ; first != last; ++first)
+ this->insert_unique(*first);
+ }
+
+ iterator insert_equal(const value_type& v)
+ {
+ NodePtr tmp(AllocHolder::create_node(v));
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
+ iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));
+ destroy_deallocator.release();
+ return ret;
+ }
+
+ template<class MovableConvertible>
+ iterator insert_equal(BOOST_FWD_REF(MovableConvertible) v)
+ {
+ NodePtr tmp(AllocHolder::create_node(boost::forward<MovableConvertible>(v)));
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
+ iterator ret(this->icont().insert_equal(this->icont().end(), *tmp));
+ destroy_deallocator.release();
+ return ret;
+ }
+
+ template<class MovableConvertible>
+ iterator insert_equal_convertible(const_iterator hint, BOOST_FWD_REF(MovableConvertible) v)
+ {
+ BOOST_ASSERT((priv_is_linked)(hint));
+ NodePtr tmp(AllocHolder::create_node(boost::forward<MovableConvertible>(v)));
+ scoped_destroy_deallocator<NodeAlloc> destroy_deallocator(tmp, this->node_alloc());
+ iterator ret(this->icont().insert_equal(hint.get(), *tmp));
+ destroy_deallocator.release();
+ return ret;
+ }
+
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_equal, value_type, iterator, this->insert_equal_convertible, const_iterator, const_iterator)
+
+ template <class InputIterator>
+ void insert_equal(InputIterator first, InputIterator last)
+ {
+ for( ; first != last; ++first)
+ this->insert_equal(*first);
+ }
+
+ template<class KeyType, class M>
+ std::pair<iterator, bool> insert_or_assign(const_iterator hint, BOOST_FWD_REF(KeyType) key, BOOST_FWD_REF(M) obj)
+ {
+ insert_commit_data data;
+ const key_type & k = key; //Support emulated rvalue references
+ std::pair<iiterator, bool> ret =
+ hint == const_iterator() ? this->icont().insert_unique_check(k, KeyNodeCompare(key_comp()), data)
+ : this->icont().insert_unique_check(hint.get(), k, KeyNodeCompare(key_comp()), data);
+ if(ret.second){
+ ret.first = this->priv_insert_or_assign_commit(boost::forward<KeyType>(key), boost::forward<M>(obj), data);
+ }
+ else{
+ ret.first->get_data().second = boost::forward<M>(obj);
+ }
+ return std::pair<iterator, bool>(iterator(ret.first), ret.second);
+ }
+
+ iterator erase(const_iterator position)
+ {
+ BOOST_ASSERT(position != this->cend() && (priv_is_linked)(position));
+ return iterator(this->icont().erase_and_dispose(position.get(), Destroyer(this->node_alloc())));
+ }
+
+ BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& k)
+ { return AllocHolder::erase_key(k, KeyNodeCompare(key_comp()), alloc_version()); }
+
+ iterator erase(const_iterator first, const_iterator last)
+ {
+ BOOST_ASSERT(first == last || (first != this->cend() && (priv_is_linked)(first)));
+ BOOST_ASSERT(first == last || (priv_is_linked)(last));
+ return iterator(AllocHolder::erase_range(first.get(), last.get(), alloc_version()));
+ }
+
+ node_type extract(const key_type& k)
+ {
+ iterator const it = this->find(k);
+ if(this->end() != it){
+ return this->extract(it);
+ }
+ return node_type();
+ }
+
+ node_type extract(const_iterator position)
+ {
+ BOOST_ASSERT(position != this->cend() && (priv_is_linked)(position));
+ iiterator const iit(position.get());
+ this->icont().erase(iit);
+ return node_type(iit.operator->(), this->node_alloc());
+ }
+
+ insert_return_type insert_unique_node(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ return this->insert_unique_node(this->end(), boost::move(nh));
+ }
+
+ insert_return_type insert_unique_node(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ insert_return_type irt; //inserted == false, node.empty()
+ if(!nh.empty()){
+ insert_commit_data data;
+ std::pair<iterator,bool> ret =
+ this->insert_unique_check(hint, KeyOfValue()(nh.value()), data);
+ if(ret.second){
+ irt.inserted = true;
+ irt.position = iterator(this->icont().insert_unique_commit(*nh.get(), data));
+ nh.release();
+ }
+ else{
+ irt.position = ret.first;
+ irt.node = boost::move(nh);
+ }
+ }
+ else{
+ irt.position = this->end();
+ }
+ return BOOST_MOVE_RET(insert_return_type, irt);
+ }
+
+ iterator insert_equal_node(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ if(nh.empty()){
+ return this->end();
+ }
+ else{
+ NodePtr const p(nh.release());
+ return iterator(this->icont().insert_equal(*p));
+ }
+ }
+
+ iterator insert_equal_node(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ if(nh.empty()){
+ return this->end();
+ }
+ else{
+ NodePtr const p(nh.release());
+ return iterator(this->icont().insert_equal(hint.get(), *p));
+ }
+ }
+
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge_unique(tree<T, KeyOfValue, C2, Allocator, Options>& source)
+ { return this->icont().merge_unique(source.icont()); }
+
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge_equal(tree<T, KeyOfValue, C2, Allocator, Options>& source)
+ { return this->icont().merge_equal(source.icont()); }
+ BOOST_CONTAINER_FORCEINLINE void clear()
+ { AllocHolder::clear(alloc_version()); }
+
+ // search operations. Const and non-const overloads even if no iterator is returned
+ // so splay implementations can to their rebalancing when searching in non-const versions
+ BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& k)
+ { return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& k) const
+ { return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, iterator>::type
+ find(const K& k)
+ { return iterator(this->icont().find(k, KeyNodeCompare(key_comp()))); }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
+ find(const K& k) const
+ { return const_iterator(this->non_const_icont().find(k, KeyNodeCompare(key_comp()))); }
+
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& k) const
+ { return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, size_type>::type
+ count(const K& k) const
+ { return size_type(this->icont().count(k, KeyNodeCompare(key_comp()))); }
+
+ BOOST_CONTAINER_FORCEINLINE bool contains(const key_type& x) const
+ { return this->find(x) != this->cend(); }
+
+ template<typename K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, bool>::type
+ contains(const K& x) const
+ { return this->find(x) != this->cend(); }
+
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& k)
+ { return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& k) const
+ { return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, iterator>::type
+ lower_bound(const K& k)
+ { return iterator(this->icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
+ lower_bound(const K& k) const
+ { return const_iterator(this->non_const_icont().lower_bound(k, KeyNodeCompare(key_comp()))); }
+
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& k)
+ { return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
+
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& k) const
+ { return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, iterator>::type
+ upper_bound(const K& k)
+ { return iterator(this->icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, const_iterator>::type
+ upper_bound(const K& k) const
+ { return const_iterator(this->non_const_icont().upper_bound(k, KeyNodeCompare(key_comp()))); }
+
+ std::pair<iterator,iterator> equal_range(const key_type& k)
+ {
+ std::pair<iiterator, iiterator> ret =
+ this->icont().equal_range(k, KeyNodeCompare(key_comp()));
+ return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
+ }
+
+ std::pair<const_iterator, const_iterator> equal_range(const key_type& k) const
+ {
+ std::pair<iiterator, iiterator> ret =
+ this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp()));
+ return std::pair<const_iterator,const_iterator>
+ (const_iterator(ret.first), const_iterator(ret.second));
+ }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
+ equal_range(const K& k)
+ {
+ std::pair<iiterator, iiterator> ret =
+ this->icont().equal_range(k, KeyNodeCompare(key_comp()));
+ return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
+ }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
+ equal_range(const K& k) const
+ {
+ std::pair<iiterator, iiterator> ret =
+ this->non_const_icont().equal_range(k, KeyNodeCompare(key_comp()));
+ return std::pair<const_iterator,const_iterator>
+ (const_iterator(ret.first), const_iterator(ret.second));
+ }
+
+ std::pair<iterator,iterator> lower_bound_range(const key_type& k)
+ {
+ std::pair<iiterator, iiterator> ret =
+ this->icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
+ return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
+ }
+
+ std::pair<const_iterator, const_iterator> lower_bound_range(const key_type& k) const
+ {
+ std::pair<iiterator, iiterator> ret =
+ this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
+ return std::pair<const_iterator,const_iterator>
+ (const_iterator(ret.first), const_iterator(ret.second));
+ }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, std::pair<iterator,iterator> >::type
+ lower_bound_range(const K& k)
+ {
+ std::pair<iiterator, iiterator> ret =
+ this->icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
+ return std::pair<iterator,iterator>(iterator(ret.first), iterator(ret.second));
+ }
+
+ template <class K>
+ BOOST_CONTAINER_FORCEINLINE
+ typename dtl::enable_if_transparent<key_compare, K, std::pair<const_iterator, const_iterator> >::type
+ lower_bound_range(const K& k) const
+ {
+ std::pair<iiterator, iiterator> ret =
+ this->non_const_icont().lower_bound_range(k, KeyNodeCompare(key_comp()));
+ return std::pair<const_iterator,const_iterator>
+ (const_iterator(ret.first), const_iterator(ret.second));
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void rebalance()
+ { intrusive_tree_proxy_t::rebalance(this->icont()); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const tree& x, const tree& y)
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<(const tree& x, const tree& y)
+ { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const tree& x, const tree& y)
+ { return !(x == y); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const tree& x, const tree& y)
+ { return y < x; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const tree& x, const tree& y)
+ { return !(y < x); }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const tree& x, const tree& y)
+ { return !(x < y); }
+
+ BOOST_CONTAINER_FORCEINLINE friend void swap(tree& x, tree& y)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value )
+ { x.swap(y); }
+};
+
+} //namespace dtl {
+} //namespace container {
+
+template <class T>
+struct has_trivial_destructor_after_move;
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class T, class KeyOfValue, class Compare, class Allocator, class Options>
+struct has_trivial_destructor_after_move
+ <
+ ::boost::container::dtl::tree
+ <T, KeyOfValue, Compare, Allocator, Options>
+ >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+} //namespace boost {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_TREE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/type_traits.hpp b/src/third_party/boost-1.69.0/boost/container/detail/type_traits.hpp
new file mode 100644
index 00000000000..5e901540e75
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/type_traits.hpp
@@ -0,0 +1,72 @@
+//////////////////////////////////////////////////////////////////////////////
+// (C) Copyright John Maddock 2000.
+// (C) Copyright Ion Gaztanaga 2005-2015.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+// The alignment and Type traits implementation comes from
+// John Maddock's TypeTraits library.
+//
+// Some other tricks come from Howard Hinnant's papers and StackOverflow replies
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
+#define BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/type_traits.hpp>
+
+namespace boost {
+namespace container {
+namespace dtl {
+
+using ::boost::move_detail::enable_if;
+using ::boost::move_detail::enable_if_and;
+using ::boost::move_detail::is_same;
+using ::boost::move_detail::is_different;
+using ::boost::move_detail::is_pointer;
+using ::boost::move_detail::add_reference;
+using ::boost::move_detail::add_const;
+using ::boost::move_detail::add_const_reference;
+using ::boost::move_detail::remove_const;
+using ::boost::move_detail::remove_reference;
+using ::boost::move_detail::make_unsigned;
+using ::boost::move_detail::is_floating_point;
+using ::boost::move_detail::is_integral;
+using ::boost::move_detail::is_enum;
+using ::boost::move_detail::is_pod;
+using ::boost::move_detail::is_empty;
+using ::boost::move_detail::is_trivially_destructible;
+using ::boost::move_detail::is_trivially_default_constructible;
+using ::boost::move_detail::is_trivially_copy_constructible;
+using ::boost::move_detail::is_trivially_move_constructible;
+using ::boost::move_detail::is_trivially_copy_assignable;
+using ::boost::move_detail::is_trivially_move_assignable;
+using ::boost::move_detail::is_nothrow_default_constructible;
+using ::boost::move_detail::is_nothrow_copy_constructible;
+using ::boost::move_detail::is_nothrow_move_constructible;
+using ::boost::move_detail::is_nothrow_copy_assignable;
+using ::boost::move_detail::is_nothrow_move_assignable;
+using ::boost::move_detail::is_nothrow_swappable;
+using ::boost::move_detail::alignment_of;
+using ::boost::move_detail::aligned_storage;
+using ::boost::move_detail::nat;
+using ::boost::move_detail::nat2;
+using ::boost::move_detail::nat3;
+using ::boost::move_detail::max_align_t;
+
+} //namespace dtl {
+} //namespace container {
+} //namespace boost {
+
+#endif //#ifndef BOOST_CONTAINER_CONTAINER_DETAIL_TYPE_TRAITS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/value_functors.hpp b/src/third_party/boost-1.69.0/boost/container/detail/value_functors.hpp
index a2c494c5e76..a2c494c5e76 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/value_functors.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/value_functors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/value_init.hpp b/src/third_party/boost-1.69.0/boost/container/detail/value_init.hpp
index 35b0aa11d3f..35b0aa11d3f 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/value_init.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/value_init.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/variadic_templates_tools.hpp b/src/third_party/boost-1.69.0/boost/container/detail/variadic_templates_tools.hpp
index 4f16fb04536..4f16fb04536 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/variadic_templates_tools.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/variadic_templates_tools.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/detail/version_type.hpp b/src/third_party/boost-1.69.0/boost/container/detail/version_type.hpp
index c2531ccc311..c2531ccc311 100644
--- a/src/third_party/boost-1.68.0/boost/container/detail/version_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/detail/version_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/detail/workaround.hpp b/src/third_party/boost-1.69.0/boost/container/detail/workaround.hpp
new file mode 100644
index 00000000000..4e49c0a04c0
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/detail/workaround.hpp
@@ -0,0 +1,129 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
+#define BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)\
+ && !defined(BOOST_INTERPROCESS_DISABLE_VARIADIC_TMPL)
+ #define BOOST_CONTAINER_PERFECT_FORWARDING
+#endif
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && defined(__GXX_EXPERIMENTAL_CXX0X__)\
+ && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ < 40700)
+ #define BOOST_CONTAINER_UNIMPLEMENTED_PACK_EXPANSION_TO_FIXED_LIST
+#endif
+
+#if defined(BOOST_GCC_VERSION)
+# if (BOOST_GCC_VERSION < 40700) || !defined(BOOST_GCC_CXX11)
+# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
+# endif
+#elif defined(BOOST_MSVC)
+# if _MSC_FULL_VER < 180020827
+# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
+# endif
+#elif defined(BOOST_CLANG)
+# if !__has_feature(cxx_delegating_constructors)
+# define BOOST_CONTAINER_NO_CXX11_DELEGATING_CONSTRUCTORS
+# endif
+#endif
+
+#if defined(BOOST_MSVC) && (_MSC_VER < 1400)
+ #define BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_TUPLE) || (defined(BOOST_MSVC) && (BOOST_MSVC == 1700 || BOOST_MSVC == 1600))
+#define BOOST_CONTAINER_PAIR_TEST_HAS_HEADER_TUPLE
+#endif
+
+//Macros for documentation purposes. For code, expands to the argument
+#define BOOST_CONTAINER_IMPDEF(TYPE) TYPE
+#define BOOST_CONTAINER_SEEDOC(TYPE) TYPE
+
+//Macros for memset optimization. In most platforms
+//memsetting pointers and floatings is safe and faster.
+//
+//If your platform does not offer these guarantees
+//define these to value zero.
+#ifndef BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_NOT_ZERO
+#define BOOST_CONTAINER_MEMZEROED_FLOATING_POINT_IS_ZERO 1
+#endif
+
+#ifndef BOOST_CONTAINER_MEMZEROED_POINTER_IS_NOT_NULL
+#define BOOST_CONTAINER_MEMZEROED_POINTER_IS_NULL
+#endif
+
+#define BOOST_CONTAINER_DOC1ST(TYPE1, TYPE2) TYPE2
+#define BOOST_CONTAINER_I ,
+#define BOOST_CONTAINER_DOCIGN(T) T
+#define BOOST_CONTAINER_DOCONLY(T)
+
+/*
+ we need to import/export our code only if the user has specifically
+ asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
+ libraries to be dynamically linked, or BOOST_CONTAINER_DYN_LINK
+ if they want just this one to be dynamically liked:
+*/
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_CONTAINER_DYN_LINK)
+
+ /* export if this is our own source, otherwise import: */
+ #ifdef BOOST_CONTAINER_SOURCE
+ # define BOOST_CONTAINER_DECL BOOST_SYMBOL_EXPORT
+ #else
+ # define BOOST_CONTAINER_DECL BOOST_SYMBOL_IMPORT
+
+ #endif /* BOOST_CONTAINER_SOURCE */
+#else
+ #define BOOST_CONTAINER_DECL
+#endif /* DYN_LINK */
+
+//#define BOOST_CONTAINER_DISABLE_FORCEINLINE
+
+#if defined(BOOST_CONTAINER_DISABLE_FORCEINLINE)
+ #define BOOST_CONTAINER_FORCEINLINE inline
+#elif defined(BOOST_CONTAINER_FORCEINLINE_IS_BOOST_FORCELINE)
+ #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE
+#elif defined(BOOST_MSVC) && defined(_DEBUG)
+ //"__forceinline" and MSVC seems to have some bugs in debug mode
+ #define BOOST_CONTAINER_FORCEINLINE inline
+#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
+ //Older GCCs have problems with forceinline
+ #define BOOST_CONTAINER_FORCEINLINE inline
+#else
+ #define BOOST_CONTAINER_FORCEINLINE BOOST_FORCEINLINE
+#endif
+
+#if !defined(__has_feature)
+#define BOOST_CONTAINER_HAS_FEATURE(feature) 0
+#else
+#define BOOST_CONTAINER_HAS_FEATURE(feature) __has_feature(feature)
+#endif
+
+//Detect address sanitizer
+#if defined(__SANITIZE_ADDRESS__) || BOOST_CONTAINER_HAS_FEATURE(address_sanitizer)
+#define BOOST_CONTAINER_ASAN
+#endif
+
+
+#if (__cplusplus >= 201703L)
+//CTAD supported
+#else
+#define BOOST_CONTAINER_NO_CXX17_CTAD
+#endif
+
+#endif //#ifndef BOOST_CONTAINER_DETAIL_WORKAROUND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/flat_map.hpp b/src/third_party/boost-1.69.0/boost/container/flat_map.hpp
new file mode 100644
index 00000000000..736af1c0bf2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/flat_map.hpp
@@ -0,0 +1,2976 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_FLAT_MAP_HPP
+#define BOOST_CONTAINER_FLAT_MAP_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+// container
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+#include <boost/container/throw_exception.hpp>
+// container/detail
+#include <boost/container/detail/flat_tree.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/algorithm.hpp> //equal()
+#include <boost/container/detail/container_or_allocator_rebind.hpp>
+// move
+#include <boost/move/utility_core.hpp>
+#include <boost/move/traits.hpp>
+// move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/detail/move_helpers.hpp>
+// intrusive
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
+//others
+#include <boost/core/no_exceptions_support.hpp>
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+template <class Key, class T, class Compare, class AllocatorOrContainer>
+class flat_multimap;
+
+namespace dtl{
+
+template<class D, class S>
+BOOST_CONTAINER_FORCEINLINE static D &force(S &s)
+{ return *reinterpret_cast<D*>(&s); }
+
+template<class D, class S>
+BOOST_CONTAINER_FORCEINLINE static D force_copy(const S &s)
+{
+ const D *const vp = reinterpret_cast<const D *>(&s);
+ D ret_val(*vp);
+ return ret_val;
+}
+
+} //namespace dtl{
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A flat_map is a kind of associative container that supports unique keys (contains at
+//! most one of each key value) and provides for fast retrieval of values of another
+//! type T based on the keys.
+//!
+//! A flat_map satisfies all of the requirements of a container, a reversible
+//! container and an associative container. A flat_map also provides
+//! most operations described for unique keys. For a
+//! flat_map<Key,T> the key_type is Key and the value_type is std::pair<Key,T>
+//! (unlike std::map<Key, T> which value_type is std::pair<<b>const</b> Key, T>).
+//!
+//! flat_map is similar to std::map but it's implemented by as an ordered sequence container.
+//! The underlying sequence container is by default <i>vector</i> but it can also work
+//! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
+//!
+//! Using vector-like sequence containers means that inserting a new element into a flat_map might invalidate
+//! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
+//! container that offers stable pointers and references). Similarly, erasing an element might invalidate
+//! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
+//!
+//! This container provides random-access iterators.
+//!
+//! \tparam Key is the key_type of the map
+//! \tparam Value is the <code>mapped_type</code>
+//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
+//! \tparam AllocatorOrContainer is either:
+//! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
+//! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
+//! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
+//! sequence container with random-access iterators..
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class Key, class T, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator< std::pair< Key, T> > >
+#else
+template <class Key, class T, class Compare, class AllocatorOrContainer>
+#endif
+class flat_map
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(flat_map)
+ //This is the tree that we should store if pair was movable
+ typedef dtl::flat_tree<
+ std::pair<Key, T>,
+ dtl::select1st<Key>,
+ Compare,
+ AllocatorOrContainer> tree_t;
+
+ //This is the real tree stored here. It's based on a movable pair
+ typedef dtl::flat_tree<
+ dtl::pair<Key, T>,
+ dtl::select1st<Key>,
+ Compare,
+ typename dtl::container_or_allocator_rebind<AllocatorOrContainer, dtl::pair<Key, T> >::type
+ > impl_tree_t;
+ impl_tree_t m_flat_tree; // flat tree representing flat_map
+
+ typedef typename impl_tree_t::value_type impl_value_type;
+ typedef typename impl_tree_t::const_iterator impl_const_iterator;
+ typedef typename impl_tree_t::iterator impl_iterator;
+ typedef typename impl_tree_t::allocator_type impl_allocator_type;
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ typedef std::initializer_list<impl_value_type> impl_initializer_list;
+ #endif
+
+ typedef dtl::flat_tree_value_compare
+ < Compare
+ , dtl::select1st<Key>
+ , std::pair<Key, T> > value_compare_t;
+ typedef typename tree_t::iterator iterator_t;
+ typedef typename tree_t::const_iterator const_iterator_t;
+ typedef typename tree_t::reverse_iterator reverse_iterator_t;
+ typedef typename tree_t::const_reverse_iterator const_reverse_iterator_t;
+
+ public:
+ typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
+ typedef typename impl_tree_t::sequence_type impl_sequence_type;
+
+ BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree()
+ { return m_flat_tree; }
+
+ BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const
+ { return m_flat_tree; }
+
+ private:
+ typedef typename tree_t::get_stored_allocator_const_return_t get_stored_allocator_const_return_t;
+ typedef typename tree_t::get_stored_allocator_noconst_return_t get_stored_allocator_noconst_return_t;
+ typedef typename impl_tree_t::get_stored_allocator_const_return_t impl_get_stored_allocator_const_return_t;
+ typedef typename impl_tree_t::get_stored_allocator_noconst_return_t impl_get_stored_allocator_noconst_return_t;
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef Key key_type;
+ typedef T mapped_type;
+ typedef Compare key_compare;
+ typedef std::pair<Key, T> value_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
+ typedef typename sequence_type::allocator_type allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
+ typedef typename sequence_type::pointer pointer;
+ typedef typename sequence_type::const_pointer const_pointer;
+ typedef typename sequence_type::reference reference;
+ typedef typename sequence_type::const_reference const_reference;
+ typedef typename sequence_type::size_type size_type;
+ typedef typename sequence_type::difference_type difference_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
+
+ typedef typename sequence_type::iterator iterator;
+ typedef typename sequence_type::const_iterator const_iterator;
+ typedef typename sequence_type::reverse_iterator reverse_iterator;
+ typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
+
+ //AllocatorOrContainer::value_type must be std::pair<Key, T>
+ BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, typename allocator_type::value_type>::value));
+
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructs an empty flat_map.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE flat_map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
+ dtl::is_nothrow_default_constructible<Compare>::value)
+ : m_flat_tree()
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit flat_map(const allocator_type& a)
+ : m_flat_tree(dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified
+ //! comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit flat_map(const Compare& comp)
+ : m_flat_tree(comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified
+ //! comparison object and allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE flat_map(const Compare& comp, const allocator_type& a)
+ : m_flat_tree(comp, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map and
+ //! and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last)
+ : m_flat_tree(true, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const allocator_type& a)
+ : m_flat_tree(true, first, last, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp)
+ : m_flat_tree(true, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : m_flat_tree(true, first, last, comp, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map
+ //! and inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_map(ordered_unique_range_t, InputIterator first, InputIterator last)
+ : m_flat_tree(ordered_range, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : m_flat_tree(ordered_range, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! allocator, and inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : m_flat_tree(ordered_range, first, last, comp, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified allocator and
+ //! inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_map(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a)
+ : m_flat_tree(ordered_range, first, last, Compare(), a)
+ {}
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs an empty flat_map and
+ //! inserts elements from the range [il.begin() ,il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il)
+ : m_flat_tree( true
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified
+ //! allocator, and inserts elements from the range [il.begin() ,il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const allocator_type& a)
+ : m_flat_tree( true
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end()
+ , dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! inserts elements from the range [il.begin() ,il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const Compare& comp)
+ : m_flat_tree(true
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end()
+ , comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! allocator, and inserts elements from the range [il.begin() ,il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ BOOST_CONTAINER_FORCEINLINE flat_map(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : m_flat_tree(true
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end()
+ , comp
+ , dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using and
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il)
+ : m_flat_tree(ordered_unique_range
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
+ : m_flat_tree(ordered_unique_range
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end()
+ , comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : m_flat_tree( ordered_unique_range
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end()
+ , comp
+ , dtl::force<const impl_allocator_type>(a))
+ {}
+#endif
+
+ //! <b>Effects</b>: Copy constructs a flat_map.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x)
+ : m_flat_tree(x.m_flat_tree)
+ {}
+
+ //! <b>Effects</b>: Move constructs a flat_map.
+ //! Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : m_flat_tree(boost::move(x.m_flat_tree))
+ {}
+
+ //! <b>Effects</b>: Copy constructs a flat_map using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE flat_map(const flat_map& x, const allocator_type &a)
+ : m_flat_tree(x.m_flat_tree, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Move constructs a flat_map using the specified allocator.
+ //! Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant if x.get_allocator() == a, linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE flat_map(BOOST_RV_REF(flat_map) x, const allocator_type &a)
+ : m_flat_tree(boost::move(x.m_flat_tree), dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Makes *this a copy of x.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_COPY_ASSIGN_REF(flat_map) x)
+ { m_flat_tree = x.m_flat_tree; return *this; }
+
+ //! <b>Effects</b>: Move constructs a flat_map.
+ //! Constructs *this using x's resources.
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE flat_map& operator=(BOOST_RV_REF(flat_map) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { m_flat_tree = boost::move(x.m_flat_tree); return *this; }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assign elements from il to *this
+ flat_map& operator=(std::initializer_list<value_type> il)
+ {
+ this->clear();
+ this->insert(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ //! <b>Effects</b>: Returns a copy of the allocator that
+ //! was passed to the object's constructor.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE get_stored_allocator_noconst_return_t get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ impl_get_stored_allocator_noconst_return_t r = m_flat_tree.get_stored_allocator();
+ return dtl::force<stored_allocator_type>(r);
+ }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE get_stored_allocator_const_return_t get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ impl_get_stored_allocator_const_return_t r = m_flat_tree.get_stored_allocator();
+ return dtl::force<const stored_allocator_type>(r);
+ }
+
+ //////////////////////////////////////////////
+ //
+ // iterators
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<iterator>(m_flat_tree.begin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_iterator>(m_flat_tree.begin()); }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<iterator>(m_flat_tree.end()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_iterator>(m_flat_tree.end()); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<reverse_iterator>(m_flat_tree.rend()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_iterator>(m_flat_tree.cbegin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_iterator>(m_flat_tree.cend()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
+
+ //////////////////////////////////////////////
+ //
+ // capacity
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns true if the container contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.empty(); }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.size(); }
+
+ //! <b>Effects</b>: Returns the largest possible size of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.max_size(); }
+
+ //! <b>Effects</b>: Number of elements for which memory has been allocated.
+ //! capacity() is always greater than or equal to size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.capacity(); }
+
+ //! <b>Effects</b>: If n is less than or equal to capacity(), or the
+ //! underlying container has no `reserve` member, this call has no
+ //! effect. Otherwise, it is a request for allocation of additional memory.
+ //! If the request is successful, then capacity() is greater than or equal to
+ //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
+ //!
+ //! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Note</b>: If capacity() is less than "cnt", iterators and references to
+ //! to values might be invalidated.
+ BOOST_CONTAINER_FORCEINLINE void reserve(size_type cnt)
+ { m_flat_tree.reserve(cnt); }
+
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ // with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
+ { m_flat_tree.shrink_to_fit(); }
+
+ //////////////////////////////////////////////
+ //
+ // element access
+ //
+ //////////////////////////////////////////////
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! Effects: If there is no key equivalent to x in the flat_map, inserts
+ //! value_type(x, T()) into the flat_map.
+ //!
+ //! Returns: A reference to the mapped_type corresponding to x in *this.
+ //!
+ //! Complexity: Logarithmic.
+ mapped_type &operator[](const key_type& k);
+
+ //! Effects: If there is no key equivalent to x in the flat_map, inserts
+ //! value_type(move(x), T()) into the flat_map (the key is move-constructed)
+ //!
+ //! Returns: A reference to the mapped_type corresponding to x in *this.
+ //!
+ //! Complexity: Logarithmic.
+ mapped_type &operator[](key_type &&k) ;
+ #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
+ //in compilers like GCC 3.4, we can't catch temporaries
+ BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
+ BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript)
+ #endif
+
+ //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, forward<M>(obj)).
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! Returns: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! Complexity: Logarithmic in the size of the container.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
+ {
+ return dtl::force_copy< std::pair<iterator, bool> >
+ (this->m_flat_tree.insert_or_assign
+ ( impl_const_iterator(), k, ::boost::forward<M>(obj))
+ );
+ }
+
+ //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, move(obj)).
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! Returns: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! Complexity: Logarithmic in the size of the container.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
+ {
+ return dtl::force_copy< std::pair<iterator, bool> >
+ (this->m_flat_tree.insert_or_assign
+ ( impl_const_iterator(), ::boost::move(k), ::boost::forward<M>(obj))
+ );
+ }
+
+ //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
+ //! to the container as close as possible to the position just before hint.
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! Returns: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! Complexity: Logarithmic in the size of the container in general, but amortized constant if
+ //! the new element is inserted just before hint.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
+ {
+ return dtl::force_copy< std::pair<iterator, bool> >
+ (this->m_flat_tree.insert_or_assign
+ ( dtl::force_copy<impl_const_iterator>(hint)
+ , k, ::boost::forward<M>(obj))
+ );
+ }
+
+ //! Effects: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, move(obj)) and the new element
+ //! to the container as close as possible to the position just before hint.
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! Returns: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! Complexity: Logarithmic in the size of the container in general, but amortized constant if
+ //! the new element is inserted just before hint.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
+ {
+ return dtl::force_copy< std::pair<iterator, bool> >
+ (this->m_flat_tree.insert_or_assign
+ ( dtl::force_copy<impl_const_iterator>(hint)
+ , ::boost::move(k), ::boost::forward<M>(obj))
+ );
+ }
+
+ //! @copydoc ::boost::container::flat_set::nth(size_type)
+ BOOST_CONTAINER_FORCEINLINE iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
+
+ //! @copydoc ::boost::container::flat_set::nth(size_type) const
+ BOOST_CONTAINER_FORCEINLINE const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
+
+ //! @copydoc ::boost::container::flat_set::index_of(iterator)
+ BOOST_CONTAINER_FORCEINLINE size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.index_of(dtl::force_copy<impl_iterator>(p)); }
+
+ //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
+ BOOST_CONTAINER_FORCEINLINE size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.index_of(dtl::force_copy<impl_const_iterator>(p)); }
+
+ //! Returns: A reference to the element whose key is equivalent to x.
+ //!
+ //! Throws: An exception object of type out_of_range if no such element is present.
+ //!
+ //! Complexity: logarithmic.
+ T& at(const key_type& k)
+ {
+ iterator i = this->find(k);
+ if(i == this->end()){
+ throw_out_of_range("flat_map::at key not found");
+ }
+ return i->second;
+ }
+
+ //! Returns: A reference to the element whose key is equivalent to x.
+ //!
+ //! Throws: An exception object of type out_of_range if no such element is present.
+ //!
+ //! Complexity: logarithmic.
+ const T& at(const key_type& k) const
+ {
+ const_iterator i = this->find(k);
+ if(i == this->end()){
+ throw_out_of_range("flat_map::at key not found");
+ }
+ return i->second;
+ }
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object x of type T constructed with
+ //! std::forward<Args>(args)... if and only if there is no element in the container
+ //! with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
+ { return dtl::force_copy< std::pair<iterator, bool> >(m_flat_tree.emplace_unique(boost::forward<Args>(args)...)); }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the container if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
+ {
+ return dtl::force_copy<iterator>
+ (m_flat_tree.emplace_hint_unique( dtl::force_copy<impl_const_iterator>(hint)
+ , boost::forward<Args>(args)...));
+ }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
+ //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args)
+ {
+ return dtl::force_copy< std::pair<iterator, bool> >(
+ m_flat_tree.try_emplace(impl_const_iterator(), k, boost::forward<Args>(args)...));
+ }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args)
+ {
+ return dtl::force_copy<iterator>(m_flat_tree.try_emplace
+ (dtl::force_copy<impl_const_iterator>(hint), k, boost::forward<Args>(args)...).first);
+ }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
+ //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
+ {
+ return dtl::force_copy< std::pair<iterator, bool> >
+ (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k), boost::forward<Args>(args)...));
+ }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
+ {
+ return dtl::force_copy<iterator>
+ (m_flat_tree.try_emplace(dtl::force_copy
+ <impl_const_iterator>(hint), boost::move(k), boost::forward<Args>(args)...).first);
+ }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
+ {\
+ return dtl::force_copy< std::pair<iterator, bool> >\
+ (m_flat_tree.emplace_unique(BOOST_MOVE_FWD##N));\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_unique\
+ (dtl::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
+ }\
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ return dtl::force_copy< std::pair<iterator, bool> >\
+ (m_flat_tree.try_emplace(impl_const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return dtl::force_copy<iterator>(m_flat_tree.try_emplace\
+ (dtl::force_copy<impl_const_iterator>(hint), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ return dtl::force_copy< std::pair<iterator, bool> >\
+ (m_flat_tree.try_emplace(impl_const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return dtl::force_copy<iterator>(m_flat_tree.try_emplace\
+ (dtl::force_copy<impl_const_iterator>(hint), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first); }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_FLAT_MAP_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ //! <b>Effects</b>: Inserts x if and only if there is no element in the container
+ //! with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const value_type& x)
+ { return dtl::force_copy<std::pair<iterator,bool> >(
+ m_flat_tree.insert_unique(dtl::force<const impl_value_type>(x))); }
+
+ //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
+ //! only if there is no element in the container with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
+ { return dtl::force_copy<std::pair<iterator,bool> >(
+ m_flat_tree.insert_unique(boost::move(dtl::force<impl_value_type>(x)))); }
+
+ //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
+ //! only if there is no element in the container with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
+ {
+ return dtl::force_copy<std::pair<iterator,bool> >
+ (m_flat_tree.insert_unique(boost::move(x)));
+ }
+
+ //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
+ {
+ return dtl::force_copy<iterator>(
+ m_flat_tree.insert_unique( dtl::force_copy<impl_const_iterator>(p)
+ , dtl::force<const impl_value_type>(x)));
+ }
+
+ //! <b>Effects</b>: Inserts an element move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
+ {
+ return dtl::force_copy<iterator>
+ (m_flat_tree.insert_unique( dtl::force_copy<impl_const_iterator>(p)
+ , boost::move(dtl::force<impl_value_type>(x))));
+ }
+
+ //! <b>Effects</b>: Inserts an element move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
+ {
+ return dtl::force_copy<iterator>(
+ m_flat_tree.insert_unique(dtl::force_copy<impl_const_iterator>(p), boost::move(x)));
+ }
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) if and only
+ //! if there is no element with key equivalent to the key of that element.
+ //!
+ //! <b>Complexity</b>: N log(size()+N).
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
+ { m_flat_tree.insert_unique(first, last); }
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) if and only
+ //! if there is no element with key equivalent to the key of that element. This
+ //! function is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
+ { m_flat_tree.insert_unique(ordered_unique_range, first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
+ //! if there is no element with key equivalent to the key of that element.
+ //!
+ //! <b>Complexity</b>: N log(N).
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
+ {
+ m_flat_tree.insert_unique( dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end());
+ }
+
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
+ //! if there is no element with key equivalent to the key of that element. This
+ //! function is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
+ {
+ m_flat_tree.insert_unique(ordered_unique_range
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end());
+ }
+#endif
+
+ //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
+ //!
+ //! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
+ //! the comparison object of *this. If there is an element in a with key equivalent to the
+ //! key of an element from source, then that element is not extracted from source.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_map<Key, T, C2, AllocatorOrContainer>& source)
+ { m_flat_tree.merge_unique(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_map<Key, T, C2, AllocatorOrContainer>&>(source)); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, AllocatorOrContainer>& source)
+ { m_flat_tree.merge_unique(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_multimap<Key, T, C2, AllocatorOrContainer>&>(source)); }
+
+ //! <b>Effects</b>: Erases the element pointed to by p.
+ //!
+ //! <b>Returns</b>: Returns an iterator pointing to the element immediately
+ //! following q prior to the element being erased. If no such element exists,
+ //! returns end().
+ //!
+ //! <b>Complexity</b>: Linear to the elements with keys bigger than p
+ //!
+ //! <b>Note</b>: Invalidates elements with keys
+ //! not less than the erased element.
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p)
+ {
+ return dtl::force_copy<iterator>
+ (m_flat_tree.erase(dtl::force_copy<impl_const_iterator>(p)));
+ }
+
+ //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
+ //!
+ //! <b>Returns</b>: Returns the number of erased elements.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus erasure time
+ //! linear to the elements with bigger keys.
+ BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x)
+ { return m_flat_tree.erase(x); }
+
+ //! <b>Effects</b>: Erases all the elements in the range [first, last).
+ //!
+ //! <b>Returns</b>: Returns last.
+ //!
+ //! <b>Complexity</b>: size()*N where N is the distance from first to last.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus erasure time
+ //! linear to the elements with bigger keys.
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
+ {
+ return dtl::force_copy<iterator>(
+ m_flat_tree.erase( dtl::force_copy<impl_const_iterator>(first)
+ , dtl::force_copy<impl_const_iterator>(last)));
+ }
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE void swap(flat_map& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value )
+ { m_flat_tree.swap(x.m_flat_tree); }
+
+ //! <b>Effects</b>: erase(a.begin(),a.end()).
+ //!
+ //! <b>Postcondition</b>: size() == 0.
+ //!
+ //! <b>Complexity</b>: linear in size().
+ BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
+ { m_flat_tree.clear(); }
+
+ //////////////////////////////////////////////
+ //
+ // observers
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns the comparison object out
+ //! of which a was constructed.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
+ { return dtl::force_copy<key_compare>(m_flat_tree.key_comp()); }
+
+ //! <b>Effects</b>: Returns an object of value_compare constructed out
+ //! of the comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
+ { return value_compare(dtl::force_copy<key_compare>(m_flat_tree.key_comp())); }
+
+ //////////////////////////////////////////////
+ //
+ // map operations
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
+
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE iterator find(const K& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE const_iterator find(const K& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
+
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
+ { return static_cast<size_type>(m_flat_tree.find(x) != m_flat_tree.end()); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
+ { return static_cast<size_type>(m_flat_tree.find(x) != m_flat_tree.end()); }
+
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ bool contains(const key_type& x) const
+ { return m_flat_tree.find(x) != m_flat_tree.end(); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ template<typename K>
+ bool contains(const K& x) const
+ { return m_flat_tree.find(x) != m_flat_tree.end(); }
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const K& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const K& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const K& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const K& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
+ { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.lower_bound_range(x)); }
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
+ { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.lower_bound_range(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const K& x)
+ { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.lower_bound_range(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const K& x) const
+ { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.lower_bound_range(x)); }
+
+ //! <b>Effects</b>: Extracts the internal sequence container.
+ //!
+ //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
+ //!
+ //! <b>Postcondition</b>: this->empty()
+ //!
+ //! <b>Throws</b>: If secuence_type's move constructor throws
+ BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
+ {
+ return boost::move(dtl::force<sequence_type>(m_flat_tree.get_sequence_ref()));
+ }
+
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
+ //! one passed externally using the move assignment. Erases non-unique elements.
+ //!
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
+ //!
+ //! <b>Throws</b>: If the comparison or the move constructor throws
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
+ { this->m_flat_tree.adopt_sequence_unique(boost::move(dtl::force<impl_sequence_type>(seq))); }
+
+ //! <b>Requires</b>: seq shall be ordered according to this->compare()
+ //! and shall contain unique elements.
+ //!
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
+ //! one passed externally using the move assignment.
+ //!
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
+ //!
+ //! <b>Throws</b>: If the move assignment throws
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq)
+ { this->m_flat_tree.adopt_sequence_unique(ordered_unique_range_t(), boost::move(dtl::force<impl_sequence_type>(seq))); }
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_map& x, const flat_map& y)
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_map& x, const flat_map& y)
+ { return !(x == y); }
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_map& x, const flat_map& y)
+ { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_map& x, const flat_map& y)
+ { return y < x; }
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_map& x, const flat_map& y)
+ { return !(y < x); }
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_map& x, const flat_map& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE friend void swap(flat_map& x, flat_map& y)
+ { x.swap(y); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ mapped_type &priv_subscript(const key_type& k)
+ {
+ iterator i = lower_bound(k);
+ // i->first is greater than or equivalent to k.
+ if (i == end() || key_comp()(k, (*i).first)){
+ dtl::value_init<mapped_type> m;
+ i = insert(i, impl_value_type(k, ::boost::move(m.m_t)));
+ }
+ return (*i).second;
+ }
+ mapped_type &priv_subscript(BOOST_RV_REF(key_type) mk)
+ {
+ key_type &k = mk;
+ iterator i = lower_bound(k);
+ // i->first is greater than or equivalent to k.
+ if (i == end() || key_comp()(k, (*i).first)){
+ dtl::value_init<mapped_type> m;
+ i = insert(i, impl_value_type(boost::move(k), ::boost::move(m.m_t)));
+ }
+ return (*i).second;
+ }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+flat_map(InputIterator, InputIterator) ->
+ flat_map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+ flat_map(InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ flat_map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_non_const_first_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<std::pair<it_based_non_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+flat_map(InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ flat_map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+template <typename InputIterator>
+flat_map(ordered_unique_range_t, InputIterator, InputIterator) ->
+ flat_map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+flat_map(ordered_unique_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ flat_map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_non_const_first_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<std::pair<it_based_non_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+flat_map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ flat_map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class Key, class T, class Compare, class AllocatorOrContainer>
+struct has_trivial_destructor_after_move<boost::container::flat_map<Key, T, Compare, AllocatorOrContainer> >
+{
+ typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A flat_multimap is a kind of associative container that supports equivalent keys
+//! (possibly containing multiple copies of the same key value) and provides for
+//! fast retrieval of values of another type T based on the keys.
+//!
+//! A flat_multimap satisfies all of the requirements of a container and of a reversible
+//! container and of an associative container. For a
+//! flat_multimap<Key,T> the key_type is Key and the value_type is std::pair<Key,T>
+//! (unlike std::multimap<Key, T> which value_type is std::pair<<b>const</b> Key, T>).
+//!
+//! flat_multimap is similar to std::multimap but it's implemented by as an ordered sequence container.
+//! The underlying sequence container is by default <i>vector</i> but it can also work
+//! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
+//!
+//! Using vector-like sequence containers means that inserting a new element into a flat_multimap might invalidate
+//! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
+//! container that offers stable pointers and references). Similarly, erasing an element might invalidate
+//! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
+//!
+//! This container provides random-access iterators.
+//!
+//! \tparam Key is the key_type of the map
+//! \tparam Value is the <code>mapped_type</code>
+//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
+//! \tparam AllocatorOrContainer is either:
+//! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
+//! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
+//! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
+//! sequence container with random-access iterators.
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class Key, class T, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator< std::pair< Key, T> > >
+#else
+template <class Key, class T, class Compare, class AllocatorOrContainer>
+#endif
+class flat_multimap
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(flat_multimap)
+ typedef dtl::flat_tree<
+ std::pair<Key, T>,
+ dtl::select1st<Key>,
+ Compare,
+ AllocatorOrContainer> tree_t;
+ //This is the real tree stored here. It's based on a movable pair
+ typedef dtl::flat_tree<
+ dtl::pair<Key, T>,
+ dtl::select1st<Key>,
+ Compare,
+ typename dtl::container_or_allocator_rebind<AllocatorOrContainer, dtl::pair<Key, T> >::type
+ > impl_tree_t;
+ impl_tree_t m_flat_tree; // flat tree representing flat_map
+
+ typedef typename impl_tree_t::value_type impl_value_type;
+ typedef typename impl_tree_t::const_iterator impl_const_iterator;
+ typedef typename impl_tree_t::iterator impl_iterator;
+ typedef typename impl_tree_t::allocator_type impl_allocator_type;
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ typedef std::initializer_list<impl_value_type> impl_initializer_list;
+ #endif
+
+ typedef dtl::flat_tree_value_compare
+ < Compare
+ , dtl::select1st<Key>
+ , std::pair<Key, T> > value_compare_t;
+ typedef typename tree_t::iterator iterator_t;
+ typedef typename tree_t::const_iterator const_iterator_t;
+ typedef typename tree_t::reverse_iterator reverse_iterator_t;
+ typedef typename tree_t::const_reverse_iterator const_reverse_iterator_t;
+
+ public:
+ typedef typename impl_tree_t::stored_allocator_type impl_stored_allocator_type;
+ typedef typename impl_tree_t::sequence_type impl_sequence_type;
+
+ BOOST_CONTAINER_FORCEINLINE impl_tree_t &tree()
+ { return m_flat_tree; }
+
+ BOOST_CONTAINER_FORCEINLINE const impl_tree_t &tree() const
+ { return m_flat_tree; }
+
+ private:
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef Key key_type;
+ typedef T mapped_type;
+ typedef Compare key_compare;
+ typedef std::pair<Key, T> value_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
+ typedef typename sequence_type::allocator_type allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
+ typedef typename sequence_type::pointer pointer;
+ typedef typename sequence_type::const_pointer const_pointer;
+ typedef typename sequence_type::reference reference;
+ typedef typename sequence_type::const_reference const_reference;
+ typedef typename sequence_type::size_type size_type;
+ typedef typename sequence_type::difference_type difference_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
+
+ typedef typename sequence_type::iterator iterator;
+ typedef typename sequence_type::const_iterator const_iterator;
+ typedef typename sequence_type::reverse_iterator reverse_iterator;
+ typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(impl_value_type) movable_value_type;
+
+ //AllocatorOrContainer::value_type must be std::pair<Key, T>
+ BOOST_STATIC_ASSERT((dtl::is_same<std::pair<Key, T>, typename AllocatorOrContainer::value_type>::value));
+
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructs an empty flat_map.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE flat_multimap()
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
+ dtl::is_nothrow_default_constructible<Compare>::value)
+ : m_flat_tree()
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const allocator_type& a)
+ : m_flat_tree(dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison
+ //! object .
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit flat_multimap(const Compare& comp)
+ : m_flat_tree(comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison
+ //! object and allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(const Compare& comp, const allocator_type& a)
+ : m_flat_tree(comp, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap
+ //! and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(InputIterator first, InputIterator last)
+ : m_flat_tree(false, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(InputIterator first, InputIterator last, const allocator_type& a)
+ : m_flat_tree(false, first, last, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object
+ //! and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(InputIterator first, InputIterator last, const Compare& comp)
+ : m_flat_tree(false, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object
+ //! and allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : m_flat_tree(false, first, last, comp, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap
+ //! and inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(ordered_range_t, InputIterator first, InputIterator last)
+ : m_flat_tree(ordered_range, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
+ //! inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : m_flat_tree(ordered_range, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
+ //! allocator, and inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : m_flat_tree(ordered_range, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
+ //! inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a)
+ : m_flat_tree(ordered_range, first, last, Compare(), a)
+ {}
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs an empty flat_map and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(std::initializer_list<value_type> il)
+ : m_flat_tree( false
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(std::initializer_list<value_type> il, const allocator_type& a)
+ : m_flat_tree(false
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end()
+ , dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(std::initializer_list<value_type> il, const Compare& comp)
+ : m_flat_tree(false
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_map using the specified comparison object and
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : m_flat_tree( false
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end()
+ , comp, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap and
+ //! inserts elements from the ordered range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(ordered_range_t, std::initializer_list<value_type> il)
+ : m_flat_tree( ordered_range
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
+ //! inserts elements from the ordered range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
+ : m_flat_tree( ordered_range
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multimap using the specified comparison object and
+ //! allocator, and inserts elements from the ordered range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : m_flat_tree( ordered_range
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end()
+ , comp, dtl::force<const impl_allocator_type>(a))
+ {}
+#endif
+
+ //! <b>Effects</b>: Copy constructs a flat_multimap.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(const flat_multimap& x)
+ : m_flat_tree(x.m_flat_tree)
+ {}
+
+ //! <b>Effects</b>: Move constructs a flat_multimap. Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(BOOST_RV_REF(flat_multimap) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : m_flat_tree(boost::move(x.m_flat_tree))
+ {}
+
+ //! <b>Effects</b>: Copy constructs a flat_multimap using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(const flat_multimap& x, const allocator_type &a)
+ : m_flat_tree(x.m_flat_tree, dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Move constructs a flat_multimap using the specified allocator.
+ //! Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap(BOOST_RV_REF(flat_multimap) x, const allocator_type &a)
+ : m_flat_tree(boost::move(x.m_flat_tree), dtl::force<const impl_allocator_type>(a))
+ {}
+
+ //! <b>Effects</b>: Makes *this a copy of x.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap& operator=(BOOST_COPY_ASSIGN_REF(flat_multimap) x)
+ { m_flat_tree = x.m_flat_tree; return *this; }
+
+ //! <b>Effects</b>: this->swap(x.get()).
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap& operator=(BOOST_RV_REF(flat_multimap) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { m_flat_tree = boost::move(x.m_flat_tree); return *this; }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assign content of il to *this
+ //!
+ //! <b>Complexity</b>: Linear in il.size().
+ BOOST_CONTAINER_FORCEINLINE
+ flat_multimap& operator=(std::initializer_list<value_type> il)
+ {
+ this->clear();
+ this->insert(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ //! <b>Effects</b>: Returns a copy of the allocator that
+ //! was passed to the object's constructor.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<allocator_type>(m_flat_tree.get_allocator()); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force<stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force<const stored_allocator_type>(m_flat_tree.get_stored_allocator()); }
+
+ //////////////////////////////////////////////
+ //
+ // iterators
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<iterator>(m_flat_tree.begin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_iterator>(m_flat_tree.begin()); }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<iterator>(m_flat_tree.end()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_iterator>(m_flat_tree.end()); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<reverse_iterator>(m_flat_tree.rbegin()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rbegin()); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<reverse_iterator>(m_flat_tree.rend()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.rend()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_iterator>(m_flat_tree.cbegin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_iterator>(m_flat_tree.cend()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crbegin()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<const_reverse_iterator>(m_flat_tree.crend()); }
+
+ //////////////////////////////////////////////
+ //
+ // capacity
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns true if the container contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.empty(); }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.size(); }
+
+ //! <b>Effects</b>: Returns the largest possible size of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.max_size(); }
+
+ //! <b>Effects</b>: Number of elements for which memory has been allocated.
+ //! capacity() is always greater than or equal to size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.capacity(); }
+
+ //! <b>Effects</b>: If n is less than or equal to capacity(), or the
+ //! underlying container has no `reserve` member, this call has no
+ //! effect. Otherwise, it is a request for allocation of additional memory.
+ //! If the request is successful, then capacity() is greater than or equal to
+ //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
+ //!
+ //! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Note</b>: If capacity() is less than "cnt", iterators and references to
+ //! to values might be invalidated.
+ BOOST_CONTAINER_FORCEINLINE
+ void reserve(size_type cnt)
+ { m_flat_tree.reserve(cnt); }
+
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ // with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ BOOST_CONTAINER_FORCEINLINE
+ void shrink_to_fit()
+ { m_flat_tree.shrink_to_fit(); }
+
+ //! @copydoc ::boost::container::flat_set::nth(size_type)
+ BOOST_CONTAINER_FORCEINLINE
+ iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
+
+ //! @copydoc ::boost::container::flat_set::nth(size_type) const
+ BOOST_CONTAINER_FORCEINLINE
+ const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return dtl::force_copy<iterator>(m_flat_tree.nth(n)); }
+
+ //! @copydoc ::boost::container::flat_set::index_of(iterator)
+ BOOST_CONTAINER_FORCEINLINE
+ size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.index_of(dtl::force_copy<impl_iterator>(p)); }
+
+ //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
+ BOOST_CONTAINER_FORCEINLINE
+ size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_flat_tree.index_of(dtl::force_copy<impl_const_iterator>(p)); }
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... and returns the iterator pointing to the
+ //! newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE
+ iterator emplace(BOOST_FWD_REF(Args)... args)
+ { return dtl::force_copy<iterator>(m_flat_tree.emplace_equal(boost::forward<Args>(args)...)); }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant time if the value
+ //! is to be inserted before p) plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE
+ iterator emplace_hint(const_iterator hint, BOOST_FWD_REF(Args)... args)
+ {
+ return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_equal
+ (dtl::force_copy<impl_const_iterator>(hint), boost::forward<Args>(args)...));
+ }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
+ { return dtl::force_copy<iterator>(m_flat_tree.emplace_equal(BOOST_MOVE_FWD##N)); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ return dtl::force_copy<iterator>(m_flat_tree.emplace_hint_equal\
+ (dtl::force_copy<impl_const_iterator>(hint) BOOST_MOVE_I##N BOOST_MOVE_FWD##N));\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_FLAT_MULTIMAP_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ //! <b>Effects</b>: Inserts x and returns the iterator pointing to the
+ //! newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x)
+ {
+ return dtl::force_copy<iterator>(
+ m_flat_tree.insert_equal(dtl::force<const impl_value_type>(x)));
+ }
+
+ //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
+ //! the iterator pointing to the newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(value_type) x)
+ { return dtl::force_copy<iterator>(m_flat_tree.insert_equal(boost::move(x))); }
+
+ //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
+ //! the iterator pointing to the newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(impl_value_type) x)
+ { return dtl::force_copy<iterator>(m_flat_tree.insert_equal(boost::move(x))); }
+
+ //! <b>Effects</b>: Inserts a copy of x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant time if the value
+ //! is to be inserted before p) plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
+ {
+ return dtl::force_copy<iterator>
+ (m_flat_tree.insert_equal( dtl::force_copy<impl_const_iterator>(p)
+ , dtl::force<const impl_value_type>(x)));
+ }
+
+ //! <b>Effects</b>: Inserts a value move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant time if the value
+ //! is to be inserted before p) plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
+ {
+ return dtl::force_copy<iterator>
+ (m_flat_tree.insert_equal(dtl::force_copy<impl_const_iterator>(p)
+ , boost::move(x)));
+ }
+
+ //! <b>Effects</b>: Inserts a value move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant time if the value
+ //! is to be inserted before p) plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(impl_value_type) x)
+ {
+ return dtl::force_copy<iterator>(
+ m_flat_tree.insert_equal(dtl::force_copy<impl_const_iterator>(p), boost::move(x)));
+ }
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) .
+ //!
+ //! <b>Complexity</b>: N log(N).
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
+ { m_flat_tree.insert_equal(first, last); }
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) if and only
+ //! if there is no element with key equivalent to the key of that element. This
+ //! function is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last)
+ { m_flat_tree.insert_equal(ordered_range, first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) .
+ //!
+ //! <b>Complexity</b>: N log(N).
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
+ {
+ m_flat_tree.insert_equal( dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end());
+ }
+
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
+ //! if there is no element with key equivalent to the key of that element. This
+ //! function is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list<value_type> il)
+ {
+ m_flat_tree.insert_equal( ordered_range
+ , dtl::force<impl_initializer_list>(il).begin()
+ , dtl::force<impl_initializer_list>(il).end());
+ }
+#endif
+
+ //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
+ //!
+ //! <b>Effects</b>: Extracts each element in source and insert it into a using
+ //! the comparison object of *this.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multimap<Key, T, C2, AllocatorOrContainer>& source)
+ { m_flat_tree.merge_equal(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multimap<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_multimap<Key, T, C2, AllocatorOrContainer>&>(source)); }
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_map<Key, T, C2, AllocatorOrContainer>& source)
+ { m_flat_tree.merge_equal(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_map<Key, T, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_map<Key, T, C2, AllocatorOrContainer>&>(source)); }
+
+ //! <b>Effects</b>: Erases the element pointed to by p.
+ //!
+ //! <b>Returns</b>: Returns an iterator pointing to the element immediately
+ //! following q prior to the element being erased. If no such element exists,
+ //! returns end().
+ //!
+ //! <b>Complexity</b>: Linear to the elements with keys bigger than p
+ //!
+ //! <b>Note</b>: Invalidates elements with keys
+ //! not less than the erased element.
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator p)
+ {
+ return dtl::force_copy<iterator>(
+ m_flat_tree.erase(dtl::force_copy<impl_const_iterator>(p)));
+ }
+
+ //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
+ //!
+ //! <b>Returns</b>: Returns the number of erased elements.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus erasure time
+ //! linear to the elements with bigger keys.
+ BOOST_CONTAINER_FORCEINLINE size_type erase(const key_type& x)
+ { return m_flat_tree.erase(x); }
+
+ //! <b>Effects</b>: Erases all the elements in the range [first, last).
+ //!
+ //! <b>Returns</b>: Returns last.
+ //!
+ //! <b>Complexity</b>: size()*N where N is the distance from first to last.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus erasure time
+ //! linear to the elements with bigger keys.
+ BOOST_CONTAINER_FORCEINLINE iterator erase(const_iterator first, const_iterator last)
+ {
+ return dtl::force_copy<iterator>
+ (m_flat_tree.erase( dtl::force_copy<impl_const_iterator>(first)
+ , dtl::force_copy<impl_const_iterator>(last)));
+ }
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE void swap(flat_multimap& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value )
+ { m_flat_tree.swap(x.m_flat_tree); }
+
+ //! <b>Effects</b>: erase(a.begin(),a.end()).
+ //!
+ //! <b>Postcondition</b>: size() == 0.
+ //!
+ //! <b>Complexity</b>: linear in size().
+ BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
+ { m_flat_tree.clear(); }
+
+ //////////////////////////////////////////////
+ //
+ // observers
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns the comparison object out
+ //! of which a was constructed.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE key_compare key_comp() const
+ { return dtl::force_copy<key_compare>(m_flat_tree.key_comp()); }
+
+ //! <b>Effects</b>: Returns an object of value_compare constructed out
+ //! of the comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE value_compare value_comp() const
+ { return value_compare(dtl::force_copy<key_compare>(m_flat_tree.key_comp())); }
+
+ //////////////////////////////////////////////
+ //
+ // map operations
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE iterator find(const key_type& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
+
+ //! <b>Returns</b>: An const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE const_iterator find(const key_type& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE iterator find(const K& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.find(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE const_iterator find(const K& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.find(x)); }
+
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
+ { return m_flat_tree.count(x); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
+ { return m_flat_tree.count(x); }
+
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ bool contains(const key_type& x) const
+ { return m_flat_tree.find(x) != m_flat_tree.end(); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ template<typename K>
+ bool contains(const K& x) const
+ { return m_flat_tree.find(x) != m_flat_tree.end(); }
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const key_type& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const key_type& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE iterator lower_bound(const K& x)
+ { return dtl::force_copy<iterator>(m_flat_tree.lower_bound(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE const_iterator lower_bound(const K& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.lower_bound(x)); }
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const key_type& x)
+ {return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key
+ //! not less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const key_type& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE iterator upper_bound(const K& x)
+ {return dtl::force_copy<iterator>(m_flat_tree.upper_bound(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key
+ //! not less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE const_iterator upper_bound(const K& x) const
+ { return dtl::force_copy<const_iterator>(m_flat_tree.upper_bound(x)); }
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
+ { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
+ { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const K& x)
+ { return dtl::force_copy<std::pair<iterator,iterator> >(m_flat_tree.equal_range(x)); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<class K>
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const K& x) const
+ { return dtl::force_copy<std::pair<const_iterator,const_iterator> >(m_flat_tree.equal_range(x)); }
+
+ //! <b>Effects</b>: Extracts the internal sequence container.
+ //!
+ //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
+ //!
+ //! <b>Postcondition</b>: this->empty()
+ //!
+ //! <b>Throws</b>: If secuence_type's move constructor throws
+ BOOST_CONTAINER_FORCEINLINE sequence_type extract_sequence()
+ {
+ return boost::move(dtl::force<sequence_type>(m_flat_tree.get_sequence_ref()));
+ }
+
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
+ //! one passed externally using the move assignment.
+ //!
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
+ //!
+ //! <b>Throws</b>: If the comparison or the move constructor throws
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
+ { this->m_flat_tree.adopt_sequence_equal(boost::move(dtl::force<impl_sequence_type>(seq))); }
+
+ //! <b>Requires</b>: seq shall be ordered according to this->compare().
+ //!
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
+ //! one passed externally using the move assignment.
+ //!
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
+ //!
+ //! <b>Throws</b>: If the move assignment throws
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq)
+ { this->m_flat_tree.adopt_sequence_equal(ordered_range_t(), boost::move(dtl::force<impl_sequence_type>(seq))); }
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const flat_multimap& x, const flat_multimap& y)
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const flat_multimap& x, const flat_multimap& y)
+ { return !(x == y); }
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<(const flat_multimap& x, const flat_multimap& y)
+ { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const flat_multimap& x, const flat_multimap& y)
+ { return y < x; }
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const flat_multimap& x, const flat_multimap& y)
+ { return !(y < x); }
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const flat_multimap& x, const flat_multimap& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE friend void swap(flat_multimap& x, flat_multimap& y)
+ { x.swap(y); }
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+flat_multimap(InputIterator, InputIterator) ->
+ flat_multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+flat_multimap(InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ flat_multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_non_const_first_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<std::pair<it_based_non_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+flat_multimap(InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ flat_multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+template <typename InputIterator>
+flat_multimap(ordered_range_t, InputIterator, InputIterator) ->
+ flat_multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+flat_multimap(ordered_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ flat_multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_non_const_first_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<std::pair<it_based_non_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+flat_multimap(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ flat_multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+#endif
+
+}}
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace boost {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class Key, class T, class Compare, class AllocatorOrContainer>
+struct has_trivial_destructor_after_move< boost::container::flat_multimap<Key, T, Compare, AllocatorOrContainer> >
+{
+ typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+} //namespace boost {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_FLAT_MAP_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/flat_set.hpp b/src/third_party/boost-1.69.0/boost/container/flat_set.hpp
new file mode 100644
index 00000000000..080beb5fae3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/flat_set.hpp
@@ -0,0 +1,1943 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_FLAT_SET_HPP
+#define BOOST_CONTAINER_FLAT_SET_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+// container/detail
+#include <boost/container/detail/flat_tree.hpp>
+#include <boost/container/detail/mpl.hpp>
+// move
+#include <boost/move/traits.hpp>
+#include <boost/move/utility_core.hpp>
+// move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/detail/move_helpers.hpp>
+// intrusive/detail
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
+// std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+namespace container {
+
+#if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+template <class Key, class Compare, class AllocatorOrContainer>
+class flat_multiset;
+#endif
+
+//! flat_set is a Sorted Associative Container that stores objects of type Key.
+//! It is also a Unique Associative Container, meaning that no two elements are the same.
+//!
+//! flat_set is similar to std::set but it's implemented by as an ordered sequence container.
+//! The underlying sequence container is by default <i>vector</i> but it can also work
+//! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
+//!
+//! Using vector-like sequence containers means that inserting a new element into a flat_set might invalidate
+//! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
+//! container that offers stable pointers and references). Similarly, erasing an element might invalidate
+//! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
+//!
+//! This container provides random-access iterators.
+//!
+//! \tparam Key is the type to be inserted in the set, which is also the key_type
+//! \tparam Compare is the comparison functor used to order keys
+//! \tparam AllocatorOrContainer is either:
+//! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
+//! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
+//! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
+//! sequence container with random-access iterators.
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class Key, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator<Key> >
+#else
+template <class Key, class Compare, class AllocatorOrContainer>
+#endif
+class flat_set
+ ///@cond
+ : public dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer>
+ ///@endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(flat_set)
+ typedef dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer> tree_t;
+
+ public:
+ tree_t &tree()
+ { return *this; }
+
+ const tree_t &tree() const
+ { return *this; }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef Key key_type;
+ typedef Compare key_compare;
+ typedef Key value_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
+ typedef typename sequence_type::allocator_type allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
+ typedef typename sequence_type::pointer pointer;
+ typedef typename sequence_type::const_pointer const_pointer;
+ typedef typename sequence_type::reference reference;
+ typedef typename sequence_type::const_reference const_reference;
+ typedef typename sequence_type::size_type size_type;
+ typedef typename sequence_type::difference_type difference_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
+
+ typedef typename sequence_type::iterator iterator;
+ typedef typename sequence_type::const_iterator const_iterator;
+ typedef typename sequence_type::reverse_iterator reverse_iterator;
+ typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructs an empty container.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
+ dtl::is_nothrow_default_constructible<Compare>::value)
+ : tree_t()
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified
+ //! comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ explicit flat_set(const Compare& comp)
+ : tree_t(comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ explicit flat_set(const allocator_type& a)
+ : tree_t(a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified
+ //! comparison object and allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(const Compare& comp, const allocator_type& a)
+ : tree_t(comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container and
+ //! inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! comp and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(InputIterator first, InputIterator last)
+ : tree_t(true, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! comp and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(InputIterator first, InputIterator last, const allocator_type& a)
+ : tree_t(true, first, last, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! comp and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(InputIterator first, InputIterator last, const Compare& comp)
+ : tree_t(true, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! comp and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : tree_t(true, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(ordered_unique_range_t, InputIterator first, InputIterator last)
+ : tree_t(ordered_unique_range, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : tree_t(ordered_unique_range, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : tree_t(ordered_unique_range, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified allocator and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE
+ flat_set(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a)
+ : tree_t(ordered_unique_range, first, last, Compare(), a)
+ {}
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs an empty container and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! comp and otherwise N logN, where N is il.begin() - il.end().
+ BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il)
+ : tree_t(true, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! comp and otherwise N logN, where N is il.begin() - il.end().
+ BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const allocator_type& a)
+ : tree_t(true, il.begin(), il.end(), a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! comp and otherwise N logN, where N is il.begin() - il.end().
+ BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const Compare& comp)
+ : tree_t(true, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! comp and otherwise N logN, where N is il.begin() - il.end().
+ BOOST_CONTAINER_FORCEINLINE flat_set(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : tree_t(true, il.begin(), il.end(), comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il)
+ : tree_t(ordered_unique_range, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
+ : tree_t(ordered_unique_range, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_set(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : tree_t(ordered_unique_range, il.begin(), il.end(), comp, a)
+ {}
+#endif
+
+ //! <b>Effects</b>: Copy constructs the container.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x)
+ : tree_t(static_cast<const tree_t&>(x))
+ {}
+
+ //! <b>Effects</b>: Move constructs thecontainer. Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : tree_t(BOOST_MOVE_BASE(tree_t, x))
+ {}
+
+ //! <b>Effects</b>: Copy constructs a container using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE flat_set(const flat_set& x, const allocator_type &a)
+ : tree_t(static_cast<const tree_t&>(x), a)
+ {}
+
+ //! <b>Effects</b>: Move constructs a container using the specified allocator.
+ //! Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise
+ BOOST_CONTAINER_FORCEINLINE flat_set(BOOST_RV_REF(flat_set) x, const allocator_type &a)
+ : tree_t(BOOST_MOVE_BASE(tree_t, x), a)
+ {}
+
+ //! <b>Effects</b>: Makes *this a copy of x.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_COPY_ASSIGN_REF(flat_set) x)
+ { return static_cast<flat_set&>(this->tree_t::operator=(static_cast<const tree_t&>(x))); }
+
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE flat_set& operator=(BOOST_RV_REF(flat_set) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { return static_cast<flat_set&>(this->tree_t::operator=(BOOST_MOVE_BASE(tree_t, x))); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Copy all elements from il to *this.
+ //!
+ //! <b>Complexity</b>: Linear in il.size().
+ flat_set& operator=(std::initializer_list<value_type> il)
+ {
+ this->clear();
+ this->insert(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+ //! <b>Effects</b>: Returns a copy of the allocator that
+ //! was passed to the object's constructor.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns an iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns true if the container contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns the largest possible size of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Number of elements for which memory has been allocated.
+ //! capacity() is always greater than or equal to size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: If n is less than or equal to capacity(), or the
+ //! underlying container has no `reserve` member, this call has no
+ //! effect. Otherwise, it is a request for allocation of additional memory.
+ //! If the request is successful, then capacity() is greater than or equal to
+ //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
+ //!
+ //! <b>Throws</b>: If memory allocation allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Note</b>: If capacity() is less than "cnt", iterators and references to
+ //! to values might be invalidated.
+ void reserve(size_type cnt);
+
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ // with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or Key's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ void shrink_to_fit();
+
+ #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object x of type Key constructed with
+ //! std::forward<Args>(args)... if and only if there is no element in the container
+ //! with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
+ { return this->tree_t::emplace_unique(boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type Key constructed with
+ //! std::forward<Args>(args)... in the container if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
+ { return this->tree_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
+ { return this->tree_t::emplace_unique(BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->tree_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_FLAT_SET_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts x if and only if there is no element in the container
+ //! with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ std::pair<iterator, bool> insert(const value_type &x);
+
+ //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
+ //! only if there is no element in the container with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ std::pair<iterator, bool> insert(value_type &&x);
+ #else
+ private:
+ typedef std::pair<iterator, bool> insert_return_pair;
+ public:
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, insert_return_pair, this->priv_insert)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ iterator insert(const_iterator p, const value_type &x);
+
+ //! <b>Effects</b>: Inserts an element move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ iterator insert(const_iterator p, value_type &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) if and only
+ //! if there is no element with key equivalent to the key of that element.
+ //!
+ //! <b>Complexity</b>: N log(N).
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
+ { this->tree_t::insert_unique(first, last); }
+
+ //! <b>Requires</b>: first, last are not iterators into *this and
+ //! must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) .This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, InputIterator first, InputIterator last)
+ { this->tree_t::insert_unique(ordered_unique_range, first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
+ //! if there is no element with key equivalent to the key of that element.
+ //!
+ //! <b>Complexity</b>: N log(N).
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
+ { this->tree_t::insert_unique(il.begin(), il.end()); }
+
+ //! <b>Requires</b>: Range [il.begin(), il.end()) must be ordered according to the predicate
+ //! and must be unique values.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) .This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_unique_range_t, std::initializer_list<value_type> il)
+ { this->tree_t::insert_unique(ordered_unique_range, il.begin(), il.end()); }
+#endif
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, AllocatorOrContainer>& source)
+ { this->tree_t::merge_unique(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_set::merge(flat_set<Key, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_set<Key, C2, AllocatorOrContainer>&>(source)); }
+
+ //! @copydoc ::boost::container::flat_map::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, AllocatorOrContainer>& source)
+ { this->tree_t::merge_unique(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_set::merge(flat_multiset<Key, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_multiset<Key, C2, AllocatorOrContainer>&>(source)); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Erases the element pointed to by p.
+ //!
+ //! <b>Returns</b>: Returns an iterator pointing to the element immediately
+ //! following q prior to the element being erased. If no such element exists,
+ //! returns end().
+ //!
+ //! <b>Complexity</b>: Linear to the elements with keys bigger than p
+ //!
+ //! <b>Note</b>: Invalidates elements with keys
+ //! not less than the erased element.
+ iterator erase(const_iterator p);
+
+ //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
+ //!
+ //! <b>Returns</b>: Returns the number of erased elements.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus erasure time
+ //! linear to the elements with bigger keys.
+ size_type erase(const key_type& x);
+
+ //! <b>Effects</b>: Erases all the elements in the range [first, last).
+ //!
+ //! <b>Returns</b>: Returns last.
+ //!
+ //! <b>Complexity</b>: size()*N where N is the distance from first to last.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus erasure time
+ //! linear to the elements with bigger keys.
+ iterator erase(const_iterator first, const_iterator last);
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ void swap(flat_set& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value );
+
+ //! <b>Effects</b>: erase(a.begin(),a.end()).
+ //!
+ //! <b>Postcondition</b>: size() == 0.
+ //!
+ //! <b>Complexity</b>: linear in size().
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns the comparison object out
+ //! of which a was constructed.
+ //!
+ //! <b>Complexity</b>: Constant.
+ key_compare key_comp() const;
+
+ //! <b>Effects</b>: Returns an object of value_compare constructed out
+ //! of the comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ value_compare value_comp() const;
+
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ iterator find(const key_type& x);
+
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ const_iterator find(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<typename K>
+ iterator find(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<typename K>
+ const_iterator find(const K& x) const;
+
+ //! <b>Requires</b>: size() >= n.
+ //!
+ //! <b>Effects</b>: Returns an iterator to the nth element
+ //! from the beginning of the container. Returns end()
+ //! if n == size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Requires</b>: size() >= n.
+ //!
+ //! <b>Effects</b>: Returns a const_iterator to the nth element
+ //! from the beginning of the container. Returns end()
+ //! if n == size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Requires</b>: begin() <= p <= end().
+ //!
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Requires</b>: begin() <= p <= end().
+ //!
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
+ { return static_cast<size_type>(this->tree_t::find(x) != this->tree_t::cend()); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ template<typename K>
+ BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
+ { return static_cast<size_type>(this->tree_t::find(x) != this->tree_t::cend()); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ bool contains(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ template<typename K>
+ bool contains(const K& x) const;
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator lower_bound(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ const_iterator lower_bound(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ iterator lower_bound(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ const_iterator lower_bound(const K& x) const;
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator upper_bound(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ const_iterator upper_bound(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ iterator upper_bound(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ const_iterator upper_bound(const K& x) const;
+
+ #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
+ { return this->tree_t::lower_bound_range(x); }
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
+ { return this->tree_t::lower_bound_range(x); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ std::pair<iterator,iterator> equal_range(const K& x)
+ { return this->tree_t::lower_bound_range(x); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ std::pair<const_iterator,const_iterator> equal_range(const K& x) const
+ { return this->tree_t::lower_bound_range(x); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const flat_set& x, const flat_set& y);
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const flat_set& x, const flat_set& y);
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const flat_set& x, const flat_set& y);
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const flat_set& x, const flat_set& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const flat_set& x, const flat_set& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const flat_set& x, const flat_set& y);
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(flat_set& x, flat_set& y);
+
+ //! <b>Effects</b>: Extracts the internal sequence container.
+ //!
+ //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
+ //!
+ //! <b>Postcondition</b>: this->empty()
+ //!
+ //! <b>Throws</b>: If secuence_type's move constructor throws
+ sequence_type extract_sequence();
+
+ #endif //#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
+ //! one passed externally using the move assignment. Erases non-unique elements.
+ //!
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
+ //!
+ //! <b>Throws</b>: If the comparison or the move constructor throws
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
+ { this->tree_t::adopt_sequence_unique(boost::move(seq)); }
+
+ //! <b>Requires</b>: seq shall be ordered according to this->compare()
+ //! and shall contain unique elements.
+ //!
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
+ //! one passed externally using the move assignment.
+ //!
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
+ //!
+ //! <b>Throws</b>: If the move assignment throws
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_unique_range_t, BOOST_RV_REF(sequence_type) seq)
+ { this->tree_t::adopt_sequence_unique(ordered_unique_range_t(), boost::move(seq)); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ template<class KeyType>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> priv_insert(BOOST_FWD_REF(KeyType) x)
+ { return this->tree_t::insert_unique(::boost::forward<KeyType>(x)); }
+
+ template<class KeyType>
+ BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
+ { return this->tree_t::insert_unique(p, ::boost::forward<KeyType>(x)); }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+flat_set(InputIterator, InputIterator) ->
+ flat_set< it_based_value_type_t<InputIterator> >;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+ flat_set(InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ flat_set< it_based_value_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_value_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<it_based_value_type_t<InputIterator>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+flat_set(InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ flat_set< it_based_value_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+template <typename InputIterator>
+flat_set(ordered_unique_range_t, InputIterator, InputIterator) ->
+ flat_set< it_based_value_type_t<InputIterator>>;
+
+
+template < typename InputIterator, typename AllocatorOrCompare>
+ flat_set(ordered_unique_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ flat_set< it_based_value_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_value_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<it_based_value_type_t<InputIterator>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+flat_set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ flat_set< it_based_value_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class Key, class Compare, class AllocatorOrContainer>
+struct has_trivial_destructor_after_move<boost::container::flat_set<Key, Compare, AllocatorOrContainer> >
+{
+ typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! flat_multiset is a Sorted Associative Container that stores objects of type Key and
+//! can store multiple copies of the same key value.
+//!
+//! flat_multiset is similar to std::multiset but it's implemented by as an ordered sequence container.
+//! The underlying sequence container is by default <i>vector</i> but it can also work
+//! user-provided vector-like SequenceContainers (like <i>static_vector</i> or <i>small_vector</i>).
+//!
+//! Using vector-like sequence containers means that inserting a new element into a flat_multiset might invalidate
+//! previous iterators and references (unless that sequence container is <i>stable_vector</i> or a similar
+//! container that offers stable pointers and references). Similarly, erasing an element might invalidate
+//! iterators and references pointing to elements that come after (their keys are bigger) the erased element.
+//!
+//! This container provides random-access iterators.
+//!
+//! \tparam Key is the type to be inserted in the multiset, which is also the key_type
+//! \tparam Compare is the comparison functor used to order keys
+//! \tparam AllocatorOrContainer is either:
+//! - The allocator to allocate <code>value_type</code>s (e.g. <i>allocator< std::pair<Key, T> > </i>).
+//! (in this case <i>sequence_type</i> will be vector<value_type, AllocatorOrContainer>)
+//! - The SequenceContainer to be used as the underlying <i>sequence_type</i>. It must be a vector-like
+//! sequence container with random-access iterators.
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class Key, class Compare = std::less<Key>, class AllocatorOrContainer = new_allocator<Key> >
+#else
+template <class Key, class Compare, class AllocatorOrContainer>
+#endif
+class flat_multiset
+ ///@cond
+ : public dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer>
+ ///@endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(flat_multiset)
+ typedef dtl::flat_tree<Key, dtl::identity<Key>, Compare, AllocatorOrContainer> tree_t;
+
+ public:
+ tree_t &tree()
+ { return *this; }
+
+ const tree_t &tree() const
+ { return *this; }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef Key key_type;
+ typedef Compare key_compare;
+ typedef Key value_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::sequence_type) sequence_type;
+ typedef typename sequence_type::allocator_type allocator_type;
+ typedef ::boost::container::allocator_traits<allocator_type> allocator_traits_type;
+ typedef typename sequence_type::pointer pointer;
+ typedef typename sequence_type::const_pointer const_pointer;
+ typedef typename sequence_type::reference reference;
+ typedef typename sequence_type::const_reference const_reference;
+ typedef typename sequence_type::size_type size_type;
+ typedef typename sequence_type::difference_type difference_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::stored_allocator_type) stored_allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(tree_t::value_compare) value_compare;
+
+ typedef typename sequence_type::iterator iterator;
+ typedef typename sequence_type::const_iterator const_iterator;
+ typedef typename sequence_type::reverse_iterator reverse_iterator;
+ typedef typename sequence_type::const_reverse_iterator const_reverse_iterator;
+
+ //! @copydoc ::boost::container::flat_set::flat_set()
+ BOOST_CONTAINER_FORCEINLINE flat_multiset() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<AllocatorOrContainer>::value &&
+ dtl::is_nothrow_default_constructible<Compare>::value)
+ : tree_t()
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(const Compare&)
+ BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const Compare& comp)
+ : tree_t(comp)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE explicit flat_multiset(const allocator_type& a)
+ : tree_t(a)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(const Compare&, const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(const Compare& comp, const allocator_type& a)
+ : tree_t(comp, a)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last)
+ : tree_t(false, first, last)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const allocator_type&)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const allocator_type& a)
+ : tree_t(false, first, last, a)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp)
+ : tree_t(false, first, last, comp)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(InputIterator, InputIterator, const Compare& comp, const allocator_type&)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : tree_t(false, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multiset and
+ //! inserts elements from the ordered range [first ,last ). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last)
+ : tree_t(ordered_range, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multiset using the specified comparison object and
+ //! inserts elements from the ordered range [first ,last ). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : tree_t(ordered_range, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multiset using the specified comparison object and
+ //! allocator, and inserts elements from the ordered range [first, last ). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : tree_t(ordered_range, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty flat_multiset using the specified allocator and
+ //! inserts elements from the ordered range [first ,last ). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a)
+ : tree_t(ordered_range, first, last, Compare(), a)
+ {}
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il)
+ : tree_t(false, il.begin(), il.end())
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const allocator_type& a)
+ : tree_t(false, il.begin(), il.end(), a)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const Compare& comp)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const Compare& comp)
+ : tree_t(false, il.begin(), il.end(), comp)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(std::initializer_list<value_type>, const Compare& comp, const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : tree_t(false, il.begin(), il.end(), comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty containerand
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il)
+ : tree_t(ordered_range, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
+ : tree_t(ordered_range, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty container using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : tree_t(ordered_range, il.begin(), il.end(), comp, a)
+ {}
+#endif
+
+ //! @copydoc ::boost::container::flat_set::flat_set(const flat_set &)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x)
+ : tree_t(static_cast<const tree_t&>(x))
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(flat_set &&)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : tree_t(boost::move(static_cast<tree_t&>(x)))
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(const flat_set &, const allocator_type &)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(const flat_multiset& x, const allocator_type &a)
+ : tree_t(static_cast<const tree_t&>(x), a)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::flat_set(flat_set &&, const allocator_type &)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset(BOOST_RV_REF(flat_multiset) x, const allocator_type &a)
+ : tree_t(BOOST_MOVE_BASE(tree_t, x), a)
+ {}
+
+ //! @copydoc ::boost::container::flat_set::operator=(const flat_set &)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_COPY_ASSIGN_REF(flat_multiset) x)
+ { return static_cast<flat_multiset&>(this->tree_t::operator=(static_cast<const tree_t&>(x))); }
+
+ //! @copydoc ::boost::container::flat_set::operator=(flat_set &&)
+ BOOST_CONTAINER_FORCEINLINE flat_multiset& operator=(BOOST_RV_REF(flat_multiset) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { return static_cast<flat_multiset&>(this->tree_t::operator=(BOOST_MOVE_BASE(tree_t, x))); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! @copydoc ::boost::container::flat_set::operator=(std::initializer_list<value_type>)
+ flat_multiset& operator=(std::initializer_list<value_type> il)
+ {
+ this->clear();
+ this->insert(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! @copydoc ::boost::container::flat_set::get_allocator()
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::get_stored_allocator()
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::get_stored_allocator() const
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::begin()
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::begin() const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::container::flat_set::cbegin() const
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::end()
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::end() const
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::cend() const
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::rbegin()
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::rbegin() const
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::crbegin() const
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::rend()
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::rend() const
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::crend() const
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::empty() const
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::size() const
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::max_size() const
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::capacity() const
+ size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::reserve(size_type)
+ void reserve(size_type cnt);
+
+ //! @copydoc ::boost::container::flat_set::shrink_to_fit()
+ void shrink_to_fit();
+
+ #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type Key constructed with
+ //! std::forward<Args>(args)... and returns the iterator pointing to the
+ //! newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
+ { return this->tree_t::emplace_equal(boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type Key constructed with
+ //! std::forward<Args>(args)... in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
+ { return this->tree_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
+ { return this->tree_t::emplace_equal(BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->tree_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_FLAT_MULTISET_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts x and returns the iterator pointing to the
+ //! newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ iterator insert(const value_type &x);
+
+ //! <b>Effects</b>: Inserts a new value_type move constructed from x
+ //! and returns the iterator pointing to the newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time plus linear insertion
+ //! to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ iterator insert(value_type &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, iterator, this->priv_insert)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ iterator insert(const_iterator p, const value_type &x);
+
+ //! <b>Effects</b>: Inserts a new value move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic search time (constant if x is inserted
+ //! right before p) plus insertion linear to the elements with bigger keys than x.
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ iterator insert(const_iterator p, value_type &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) .
+ //!
+ //! <b>Complexity</b>: N log(N).
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
+ { this->tree_t::insert_equal(first, last); }
+
+ //! <b>Requires</b>: first, last are not iterators into *this and
+ //! must be ordered according to the predicate.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) .This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, InputIterator first, InputIterator last)
+ { this->tree_t::insert_equal(ordered_range, first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: N log(N).
+ //!
+ //! <b>Note</b>: If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
+ { this->tree_t::insert_equal(il.begin(), il.end()); }
+
+ //! <b>Requires</b>: Range [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: Non-standard extension. If an element is inserted it might invalidate elements.
+ BOOST_CONTAINER_FORCEINLINE void insert(ordered_range_t, std::initializer_list<value_type> il)
+ { this->tree_t::insert_equal(ordered_range, il.begin(), il.end()); }
+#endif
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_multimap<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_multiset<Key, C2, AllocatorOrContainer>& source)
+ { this->tree_t::merge_equal(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_multiset::merge(flat_multiset<Key, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_multiset<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_multiset<Key, C2, AllocatorOrContainer>&>(source)); }
+
+ //! @copydoc ::boost::container::flat_multimap::merge(flat_map<Key, T, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(flat_set<Key, C2, AllocatorOrContainer>& source)
+ { this->tree_t::merge_equal(source.tree()); }
+
+ //! @copydoc ::boost::container::flat_multiset::merge(flat_set<Key, C2, AllocatorOrContainer>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG flat_set<Key, C2, AllocatorOrContainer> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<flat_set<Key, C2, AllocatorOrContainer>&>(source)); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! @copydoc ::boost::container::flat_set::erase(const_iterator)
+ iterator erase(const_iterator p);
+
+ //! @copydoc ::boost::container::flat_set::erase(const key_type&)
+ size_type erase(const key_type& x);
+
+ //! @copydoc ::boost::container::flat_set::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator first, const_iterator last);
+
+ //! @copydoc ::boost::container::flat_set::swap
+ void swap(flat_multiset& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value );
+
+ //! @copydoc ::boost::container::flat_set::clear
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::key_comp
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::container::flat_set::value_comp
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::container::flat_set::find(const key_type& )
+ iterator find(const key_type& x);
+
+ //! @copydoc ::boost::container::flat_set::find(const key_type& ) const
+ const_iterator find(const key_type& x) const;
+
+ //! @copydoc ::boost::container::flat_set::nth(size_type)
+ iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::nth(size_type) const
+ const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::index_of(iterator)
+ size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::index_of(const_iterator) const
+ size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::flat_set::count(const key_type& ) const
+ size_type count(const key_type& x) const;
+
+ //! @copydoc ::boost::container::flat_set::contains(const key_type& ) const
+ bool contains(const key_type& x) const;
+
+ //! @copydoc ::boost::container::flat_set::contains(const K& ) const
+ template<typename K>
+ bool contains(const K& x) const;
+
+ //! @copydoc ::boost::container::flat_set::lower_bound(const key_type& )
+ iterator lower_bound(const key_type& x);
+
+ //! @copydoc ::boost::container::flat_set::lower_bound(const key_type& ) const
+ const_iterator lower_bound(const key_type& x) const;
+
+ //! @copydoc ::boost::container::flat_set::upper_bound(const key_type& )
+ iterator upper_bound(const key_type& x);
+
+ //! @copydoc ::boost::container::flat_set::upper_bound(const key_type& ) const
+ const_iterator upper_bound(const key_type& x) const;
+
+ //! @copydoc ::boost::container::flat_set::equal_range(const key_type& ) const
+ std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const;
+
+ //! @copydoc ::boost::container::flat_set::equal_range(const key_type& )
+ std::pair<iterator,iterator> equal_range(const key_type& x);
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const flat_multiset& x, const flat_multiset& y);
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const flat_multiset& x, const flat_multiset& y);
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const flat_multiset& x, const flat_multiset& y);
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const flat_multiset& x, const flat_multiset& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const flat_multiset& x, const flat_multiset& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const flat_multiset& x, const flat_multiset& y);
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(flat_multiset& x, flat_multiset& y);
+
+ //! <b>Effects</b>: Extracts the internal sequence container.
+ //!
+ //! <b>Complexity</b>: Same as the move constructor of sequence_type, usually constant.
+ //!
+ //! <b>Postcondition</b>: this->empty()
+ //!
+ //! <b>Throws</b>: If secuence_type's move constructor throws
+ sequence_type extract_sequence();
+
+ #endif //#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
+ //! one passed externally using the move assignment.
+ //!
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(NlogN) with N = seq.size()
+ //!
+ //! <b>Throws</b>: If the comparison or the move constructor throws
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(BOOST_RV_REF(sequence_type) seq)
+ { this->tree_t::adopt_sequence_equal(boost::move(seq)); }
+
+ //! <b>Requires</b>: seq shall be ordered according to this->compare()
+ //!
+ //! <b>Effects</b>: Discards the internally hold sequence container and adopts the
+ //! one passed externally using the move assignment.
+ //!
+ //! <b>Complexity</b>: Assuming O(1) move assignment, O(1)
+ //!
+ //! <b>Throws</b>: If the move assignment throws
+ BOOST_CONTAINER_FORCEINLINE void adopt_sequence(ordered_range_t, BOOST_RV_REF(sequence_type) seq)
+ { this->tree_t::adopt_sequence_equal(ordered_range_t(), boost::move(seq)); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ template <class KeyType>
+ BOOST_CONTAINER_FORCEINLINE iterator priv_insert(BOOST_FWD_REF(KeyType) x)
+ { return this->tree_t::insert_equal(::boost::forward<KeyType>(x)); }
+
+ template <class KeyType>
+ BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
+ { return this->tree_t::insert_equal(p, ::boost::forward<KeyType>(x)); }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+flat_multiset(InputIterator, InputIterator) ->
+ flat_multiset< it_based_value_type_t<InputIterator> >;
+
+
+template < typename InputIterator, typename AllocatorOrCompare>
+flat_multiset(InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ flat_multiset < it_based_value_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_value_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<it_based_value_type_t<InputIterator>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+flat_multiset(InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ flat_multiset< it_based_value_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+template <typename InputIterator>
+flat_multiset(ordered_range_t, InputIterator, InputIterator) ->
+ flat_multiset< it_based_value_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+flat_multiset(ordered_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ flat_multiset < it_based_value_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_value_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<it_based_value_type_t<InputIterator>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+flat_multiset(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ flat_multiset< it_based_value_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class Key, class Compare, class AllocatorOrContainer>
+struct has_trivial_destructor_after_move<boost::container::flat_multiset<Key, Compare, AllocatorOrContainer> >
+{
+ typedef typename ::boost::container::allocator_traits<AllocatorOrContainer>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<AllocatorOrContainer>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+}}
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_FLAT_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/list.hpp b/src/third_party/boost-1.69.0/boost/container/list.hpp
new file mode 100644
index 00000000000..4be33fc111a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/list.hpp
@@ -0,0 +1,1533 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_LIST_HPP
+#define BOOST_CONTAINER_LIST_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+#include <boost/container/throw_exception.hpp>
+// container/detail
+#include <boost/container/detail/algorithm.hpp>
+#include <boost/container/detail/compare_functors.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/node_alloc_holder.hpp>
+#include <boost/container/detail/version_type.hpp>
+#include <boost/container/detail/value_functors.hpp>
+// move
+#include <boost/move/utility_core.hpp>
+#include <boost/move/iterator.hpp>
+#include <boost/move/traits.hpp>
+// move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+# include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/detail/move_helpers.hpp>
+
+// intrusive
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/list.hpp>
+// other
+#include <boost/assert.hpp>
+// std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+namespace dtl {
+
+template<class VoidPointer>
+struct list_hook
+{
+ typedef typename dtl::bi::make_list_base_hook
+ <dtl::bi::void_pointer<VoidPointer>, dtl::bi::link_mode<dtl::bi::normal_link> >::type type;
+};
+
+template <class T, class VoidPointer>
+struct list_node
+ : public list_hook<VoidPointer>::type
+{
+ public:
+ typedef T value_type;
+ typedef T internal_type;
+ typedef typename list_hook<VoidPointer>::type hook_type;
+
+ typedef typename aligned_storage<sizeof(T), alignment_of<T>::value>::type storage_t;
+ storage_t m_storage;
+
+ #if defined(BOOST_GCC) && (BOOST_GCC >= 40600) && (BOOST_GCC < 80000)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+ #define BOOST_CONTAINER_DISABLE_ALIASING_WARNING
+ # endif
+
+ BOOST_CONTAINER_FORCEINLINE T &get_data()
+ { return *reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const T &get_data() const
+ { return *reinterpret_cast<const T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE T *get_data_ptr()
+ { return reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const T *get_data_ptr() const
+ { return reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE internal_type &get_real_data()
+ { return *reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const internal_type &get_real_data() const
+ { return *reinterpret_cast<const internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE internal_type *get_real_data_ptr()
+ { return reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const internal_type *get_real_data_ptr() const
+ { return reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE ~list_node()
+ { reinterpret_cast<T*>(this->m_storage.data)->~T(); }
+
+ #if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING)
+ #pragma GCC diagnostic pop
+ #undef BOOST_CONTAINER_DISABLE_ALIASING_WARNING
+ # endif
+
+ BOOST_CONTAINER_FORCEINLINE void destroy_header()
+ { static_cast<hook_type*>(this)->~hook_type(); }
+};
+
+template <class T, class VoidPointer>
+struct iiterator_node_value_type< list_node<T,VoidPointer> > {
+ typedef T type;
+};
+
+template<class Allocator>
+struct intrusive_list_type
+{
+ typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef typename allocator_traits_type::value_type value_type;
+ typedef typename boost::intrusive::pointer_traits
+ <typename allocator_traits_type::pointer>::template
+ rebind_pointer<void>::type
+ void_pointer;
+ typedef typename dtl::list_node
+ <value_type, void_pointer> node_type;
+ typedef typename dtl::bi::make_list
+ < node_type
+ , dtl::bi::base_hook<typename list_hook<void_pointer>::type>
+ , dtl::bi::constant_time_size<true>
+ , dtl::bi::size_type
+ <typename allocator_traits_type::size_type>
+ >::type container_type;
+ typedef container_type type ;
+};
+
+} //namespace dtl {
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A list is a doubly linked list. That is, it is a Sequence that supports both
+//! forward and backward traversal, and (amortized) constant time insertion and
+//! removal of elements at the beginning or the end, or in the middle. Lists have
+//! the important property that insertion and splicing do not invalidate iterators
+//! to list elements, and that even removal invalidates only the iterators that point
+//! to the elements that are removed. The ordering of iterators may be changed
+//! (that is, list<T>::iterator might have a different predecessor or successor
+//! after a list operation than it did before), but the iterators themselves will
+//! not be invalidated or made to point to different elements unless that invalidation
+//! or mutation is explicit.
+//!
+//! \tparam T The type of object that is stored in the list
+//! \tparam Allocator The allocator used for all internal memory management
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class T, class Allocator = new_allocator<T> >
+#else
+template <class T, class Allocator>
+#endif
+class list
+ : protected dtl::node_alloc_holder
+ <Allocator, typename dtl::intrusive_list_type<Allocator>::type>
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef typename
+ dtl::intrusive_list_type<Allocator>::type Icont;
+ typedef dtl::node_alloc_holder<Allocator, Icont> AllocHolder;
+ typedef typename AllocHolder::NodePtr NodePtr;
+ typedef typename AllocHolder::NodeAlloc NodeAlloc;
+ typedef typename AllocHolder::ValAlloc ValAlloc;
+ typedef typename AllocHolder::Node Node;
+ typedef dtl::allocator_destroyer<NodeAlloc> Destroyer;
+ typedef typename AllocHolder::alloc_version alloc_version;
+ typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef boost::container::equal_to_value<Allocator> equal_to_value_type;
+
+ BOOST_COPYABLE_AND_MOVABLE(list)
+
+ typedef dtl::iterator_from_iiterator<typename Icont::iterator, false> iterator_impl;
+ typedef dtl::iterator_from_iiterator<typename Icont::iterator, true> const_iterator_impl;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+
+ typedef T value_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(NodeAlloc) stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
+ typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
+
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructs a list.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ list() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : AllocHolder()
+ {}
+
+ //! <b>Effects</b>: Constructs a list taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ explicit list(const allocator_type &a) BOOST_NOEXCEPT_OR_NOTHROW
+ : AllocHolder(a)
+ {}
+
+ //! <b>Effects</b>: Constructs a list
+ //! and inserts n value-initialized value_types.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit list(size_type n)
+ : AllocHolder(Allocator())
+ { this->resize(n); }
+
+ //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ list(size_type n, const allocator_type &a)
+ : AllocHolder(a)
+ { this->resize(n); }
+
+ //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ list(size_type n, const T& value, const Allocator& a = Allocator())
+ : AllocHolder(a)
+ { this->insert(this->cbegin(), n, value); }
+
+ //! <b>Effects</b>: Copy constructs a list.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ list(const list& x)
+ : AllocHolder(x)
+ { this->insert(this->cbegin(), x.begin(), x.end()); }
+
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ list(BOOST_RV_REF(list) x) BOOST_NOEXCEPT_OR_NOTHROW
+ : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x))
+ {}
+
+ //! <b>Effects</b>: Copy constructs a list using the specified allocator.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ list(const list& x, const allocator_type &a)
+ : AllocHolder(a)
+ { this->insert(this->cbegin(), x.begin(), x.end()); }
+
+ //! <b>Effects</b>: Move constructor sing the specified allocator.
+ //! Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocation or value_type's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
+ list(BOOST_RV_REF(list) x, const allocator_type &a)
+ : AllocHolder(a)
+ {
+ if(this->node_alloc() == x.node_alloc()){
+ this->icont().swap(x.icont());
+ }
+ else{
+ this->insert(this->cbegin(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end()));
+ }
+ }
+
+ //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
+ //! and inserts a copy of the range [first, last) in the list.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced InIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [first, last).
+ template <class InpIt>
+ list(InpIt first, InpIt last, const Allocator &a = Allocator())
+ : AllocHolder(a)
+ { this->insert(this->cbegin(), first, last); }
+
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
+ //! and inserts a copy of the range [il.begin(), il.end()) in the list.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced
+ //! std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
+ list(std::initializer_list<value_type> il, const Allocator &a = Allocator())
+ : AllocHolder(a)
+ { this->insert(this->cbegin(), il.begin(), il.end()); }
+#endif
+
+ //! <b>Effects</b>: Destroys the list. All stored values are destroyed
+ //! and used memory is deallocated.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements.
+ ~list() BOOST_NOEXCEPT_OR_NOTHROW
+ {} //AllocHolder clears the list
+
+ //! <b>Effects</b>: Makes *this contain the same elements as x.
+ //!
+ //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
+ //! of each of x's elements.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in x.
+ list& operator=(BOOST_COPY_ASSIGN_REF(list) x)
+ {
+ if (&x != this){
+ NodeAlloc &this_alloc = this->node_alloc();
+ const NodeAlloc &x_alloc = x.node_alloc();
+ dtl::bool_<allocator_traits_type::
+ propagate_on_container_copy_assignment::value> flag;
+ if(flag && this_alloc != x_alloc){
+ this->clear();
+ }
+ this->AllocHolder::copy_assign_alloc(x);
+ this->assign(x.begin(), x.end());
+ }
+ return *this;
+ }
+
+ //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
+ //!
+ //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
+ //! before the function.
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ list& operator=(BOOST_RV_REF(list) x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ BOOST_ASSERT(this != &x);
+ NodeAlloc &this_alloc = this->node_alloc();
+ NodeAlloc &x_alloc = x.node_alloc();
+ const bool propagate_alloc = allocator_traits_type::
+ propagate_on_container_move_assignment::value;
+ const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
+ //Resources can be transferred if both allocators are
+ //going to be equal after this function (either propagated or already equal)
+ if(propagate_alloc || allocators_equal){
+ //Destroy
+ this->clear();
+ //Move allocator if needed
+ this->AllocHolder::move_assign_alloc(x);
+ //Obtain resources
+ this->icont() = boost::move(x.icont());
+ }
+ //Else do a one by one move
+ else{
+ this->assign( boost::make_move_iterator(x.begin())
+ , boost::make_move_iterator(x.end()));
+ }
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Makes *this contain the same elements as il.
+ //!
+ //! <b>Postcondition</b>: this->size() == il.size(). *this contains a copy
+ //! of each of x's elements.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in x.
+ list& operator=(std::initializer_list<value_type> il)
+ {
+ assign(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ //! <b>Effects</b>: Assigns the n copies of val to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ void assign(size_type n, const T& val)
+ {
+ typedef constant_iterator<value_type, difference_type> cvalue_iterator;
+ return this->assign(cvalue_iterator(val, n), cvalue_iterator());
+ }
+
+ //! <b>Effects</b>: Assigns the range [first, last) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing InpIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ template <class InpIt>
+ void assign(InpIt first, InpIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_convertible<InpIt, size_type>::type * = 0
+ #endif
+ )
+ {
+ iterator first1 = this->begin();
+ const iterator last1 = this->end();
+ for ( ; first1 != last1 && first != last; ++first1, ++first)
+ *first1 = *first;
+ if (first == last)
+ this->erase(first1, last1);
+ else{
+ this->insert(last1, first, last);
+ }
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assigns the range [il.begin(), il.end()) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ void assign(std::initializer_list<value_type> il)
+ { assign(il.begin(), il.end()); }
+#endif
+
+ //! <b>Effects</b>: Returns a copy of the internal allocator.
+ //!
+ //! <b>Throws</b>: If allocator's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return allocator_type(this->node_alloc()); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->node_alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->node_alloc(); }
+
+ //////////////////////////////////////////////
+ //
+ // iterators
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->icont().begin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->cbegin(); }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->icont().end()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->cend(); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(end()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->crbegin(); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(begin()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->crend(); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_iterator(this->non_const_icont().begin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_iterator(this->non_const_icont().end()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->cend()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->cbegin()); }
+
+ //////////////////////////////////////////////
+ //
+ // capacity
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns true if the list contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return !this->size(); }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->icont().size(); }
+
+ //! <b>Effects</b>: Returns the largest possible size of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return AllocHolder::max_size(); }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are value initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type new_size)
+ {
+ if(!priv_try_shrink(new_size)){
+ typedef value_init_construct_iterator<value_type, difference_type> value_init_iterator;
+ this->insert(this->cend(), value_init_iterator(new_size - this->size()), value_init_iterator());
+ }
+ }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are copy constructed from x.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type new_size, const T& x)
+ {
+ if(!priv_try_shrink(new_size)){
+ this->insert(this->cend(), new_size - this->size(), x);
+ }
+ }
+
+ //////////////////////////////////////////////
+ //
+ // element access
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference front() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->begin();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->begin();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *(--this->end());
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *(--this->end());
+ }
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the end of the list.
+ //!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant
+ template <class... Args>
+ reference emplace_back(BOOST_FWD_REF(Args)... args)
+ { return *this->emplace(this->cend(), boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the beginning of the list.
+ //!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant
+ template <class... Args>
+ reference emplace_front(BOOST_FWD_REF(Args)... args)
+ { return *this->emplace(this->cbegin(), boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... before p.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant
+ template <class... Args>
+ iterator emplace(const_iterator position, BOOST_FWD_REF(Args)... args)
+ {
+ BOOST_ASSERT((priv_is_linked)(position));
+ NodePtr pnode(AllocHolder::create_node(boost::forward<Args>(args)...));
+ return iterator(this->icont().insert(position.get(), *pnode));
+ }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_LIST_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ reference emplace_back(BOOST_MOVE_UREF##N)\
+ { return *this->emplace(this->cend() BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ reference emplace_front(BOOST_MOVE_UREF##N)\
+ { return *this->emplace(this->cbegin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace(const_iterator position BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ BOOST_ASSERT(position == this->cend() || (--(++position) == position) );\
+ NodePtr pnode (AllocHolder::create_node(BOOST_MOVE_FWD##N));\
+ return iterator(this->icont().insert(position.get(), *pnode));\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_LIST_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_LIST_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x at the beginning of the list.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_front(const T &x);
+
+ //! <b>Effects</b>: Constructs a new element in the beginning of the list
+ //! and moves the resources of x to this new element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_front(T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x at the end of the list.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_back(const T &x);
+
+ //! <b>Effects</b>: Constructs a new element in the end of the list
+ //! and moves the resources of x to this new element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_back(T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of x before p.
+ //!
+ //! <b>Returns</b>: an iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ iterator insert(const_iterator p, const T &x);
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a new element before p with x's resources.
+ //!
+ //! <b>Returns</b>: an iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ iterator insert(const_iterator p, T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts n copies of x before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ iterator insert(const_iterator position, size_type n, const T& x)
+ {
+ //range check is done by insert
+ typedef constant_iterator<value_type, difference_type> cvalue_iterator;
+ return this->insert(position, cvalue_iterator(x, n), cvalue_iterator());
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [first, last) range before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced InpIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to distance [first, last).
+ template <class InpIt>
+ iterator insert(const_iterator p, InpIt first, InpIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::enable_if_c
+ < !dtl::is_convertible<InpIt, size_type>::value
+ && (dtl::is_input_iterator<InpIt>::value
+ || dtl::is_same<alloc_version, version_1>::value
+ )
+ >::type * = 0
+ #endif
+ )
+ {
+ BOOST_ASSERT((priv_is_linked)(p));
+ const typename Icont::iterator ipos(p.get());
+ iterator ret_it(ipos);
+ if(first != last){
+ ret_it = iterator(this->icont().insert(ipos, *this->create_node_from_it(first)));
+ ++first;
+ }
+ for (; first != last; ++first){
+ this->icont().insert(ipos, *this->create_node_from_it(first));
+ }
+ return ret_it;
+ }
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class FwdIt>
+ iterator insert(const_iterator position, FwdIt first, FwdIt last
+ , typename dtl::enable_if_c
+ < !dtl::is_convertible<FwdIt, size_type>::value
+ && !(dtl::is_input_iterator<FwdIt>::value
+ || dtl::is_same<alloc_version, version_1>::value
+ )
+ >::type * = 0
+ )
+ {
+ BOOST_ASSERT((priv_is_linked)(position));
+ //Optimized allocation and construction
+ insertion_functor func(this->icont(), position.get());
+ iterator before_p(position.get());
+ --before_p;
+ this->allocate_many_and_construct(first, boost::container::iterator_distance(first, last), func);
+ return ++before_p;
+ }
+ #endif
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if if.begin() == il.end().
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to distance [il.begin(), il.end()).
+ iterator insert(const_iterator p, std::initializer_list<value_type> il)
+ {
+ //position range check is done by insert()
+ return insert(p, il.begin(), il.end());
+ }
+#endif
+
+ //! <b>Effects</b>: Removes the first element from the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void pop_front() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ this->erase(this->cbegin());
+ }
+
+ //! <b>Effects</b>: Removes the last element from the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ const_iterator tmp = this->cend();
+ this->erase(--tmp);
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Erases the element at p.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(p != this->cend() && (priv_is_linked)(p));
+ return iterator(this->icont().erase_and_dispose(p.get(), Destroyer(this->node_alloc())));
+ }
+
+ //! <b>Requires</b>: first and last must be valid iterator to elements in *this.
+ //!
+ //! <b>Effects</b>: Erases the elements pointed by [first, last).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the distance between first and last.
+ iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(first == last || (first != this->cend() && (priv_is_linked)(first)));
+ BOOST_ASSERT(first == last || (priv_is_linked)(last));
+ return iterator(AllocHolder::erase_range(first.get(), last.get(), alloc_version()));
+ }
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ void swap(list& x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value ||
+ allocator_traits_type::is_always_equal::value ||
+ this->get_stored_allocator() == x.get_stored_allocator());
+ AllocHolder::swap(x);
+ }
+
+ //! <b>Effects</b>: Erases all the elements of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the list.
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW
+ { AllocHolder::clear(alloc_version()); }
+
+ //////////////////////////////////////////////
+ //
+ // slist operations
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by the list. x != *this. this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
+ //! the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
+ //! this list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, list& x) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT((priv_is_linked)(p));
+ BOOST_ASSERT(this != &x);
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().splice(p.get(), x.icont());
+ }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by the list. x != *this. this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
+ //! the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
+ //! this list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, BOOST_RV_REF(list) x) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ //Checks done in splice
+ this->splice(p, static_cast<list&>(x));
+ }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. i must point to an element contained in list x.
+ //! this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //! If p == i or p == ++i, this function is a null operation.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, list &x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT((priv_is_linked)(p));
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().splice(p.get(), x.icont(), i.get());
+ }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. i must point to an element contained in list x.
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //! If p == i or p == ++i, this function is a null operation.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this != &x);
+ //Additional checks done in splice()
+ this->splice(p, static_cast<list&>(x), i);
+ }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. first and last must point to elements contained in list x.
+ //! this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements transferred.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, list &x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT((priv_is_linked)(p));
+ BOOST_ASSERT(first == last || (first != x.cend() && x.priv_is_linked(first)));
+ BOOST_ASSERT(first == last || x.priv_is_linked(last));
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().splice(p.get(), x.icont(), first.get(), last.get());
+ }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. first and last must point to elements contained in list x.
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements transferred.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this != &x);
+ //Additional checks done in splice()
+ this->splice(p, static_cast<list&>(x), first, last);
+ }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. first and last must point to elements contained in list x.
+ //! n == distance(first, last). this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ void splice(const_iterator p, list &x, const_iterator first, const_iterator last, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().splice(p.get(), x.icont(), first.get(), last.get(), n);
+ }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. first and last must point to elements contained in list x.
+ //! n == distance(first, last). this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ void splice(const_iterator p, BOOST_RV_REF(list) x, const_iterator first, const_iterator last, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice(p, static_cast<list&>(x), first, last, n); }
+
+ //! <b>Effects</b>: Removes all the elements that compare equal to value.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ void remove(const T& value)
+ { this->remove_if(equal_to_value_type(value)); }
+
+ //! <b>Effects</b>: Removes all the elements for which a specified
+ //! predicate is satisfied.
+ //!
+ //! <b>Throws</b>: If pred throws.
+ //!
+ //! <b>Complexity</b>: Linear time. It performs exactly size() calls to the predicate.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template <class Pred>
+ void remove_if(Pred pred)
+ {
+ typedef value_to_node_compare<Node, Pred> value_to_node_compare_type;
+ this->icont().remove_and_dispose_if(value_to_node_compare_type(pred), Destroyer(this->node_alloc()));
+ }
+
+ //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
+ //! elements that are equal from the list.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Complexity</b>: Linear time (size()-1 comparisons equality comparisons).
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ void unique()
+ { this->unique(value_equal_t()); }
+
+ //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
+ //! elements that satisfy some binary predicate from the list.
+ //!
+ //! <b>Throws</b>: If pred throws.
+ //!
+ //! <b>Complexity</b>: Linear time (size()-1 comparisons calls to pred()).
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template <class BinaryPredicate>
+ void unique(BinaryPredicate binary_pred)
+ {
+ typedef value_to_node_compare<Node, BinaryPredicate> value_to_node_compare_type;
+ this->icont().unique_and_dispose(value_to_node_compare_type(binary_pred), Destroyer(this->node_alloc()));
+ }
+
+ //! <b>Requires</b>: The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this according to std::less<value_type>. The merge is stable;
+ //! that is, if an element from *this is equivalent to one from x, then the element
+ //! from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ void merge(list &x)
+ { this->merge(x, value_less_t()); }
+
+ //! <b>Requires</b>: The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this according to std::less<value_type>. The merge is stable;
+ //! that is, if an element from *this is equivalent to one from x, then the element
+ //! from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ void merge(BOOST_RV_REF(list) x)
+ { this->merge(static_cast<list&>(x)); }
+
+ //! <b>Requires</b>: p must be a comparison function that induces a strict weak
+ //! ordering and both *this and x must be sorted according to that ordering
+ //! The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this. The merge is stable; that is, if an element from *this is
+ //! equivalent to one from x, then the element from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If comp throws.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ //!
+ //! <b>Note</b>: Iterators and references to *this are not invalidated.
+ template <class StrictWeakOrdering>
+ void merge(list &x, const StrictWeakOrdering &comp)
+ {
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ typedef value_to_node_compare<Node, StrictWeakOrdering> value_to_node_compare_type;
+ this->icont().merge(x.icont(), value_to_node_compare_type(comp));
+ }
+
+ //! <b>Requires</b>: p must be a comparison function that induces a strict weak
+ //! ordering and both *this and x must be sorted according to that ordering
+ //! The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this. The merge is stable; that is, if an element from *this is
+ //! equivalent to one from x, then the element from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If comp throws.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ //!
+ //! <b>Note</b>: Iterators and references to *this are not invalidated.
+ template <class StrictWeakOrdering>
+ void merge(BOOST_RV_REF(list) x, StrictWeakOrdering comp)
+ { this->merge(static_cast<list&>(x), comp); }
+
+ //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
+ //! The sort is stable, that is, the relative order of equivalent elements is preserved.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Notes</b>: Iterators and references are not invalidated.
+ //!
+ //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
+ //! is the list's size.
+ void sort()
+ { this->sort(value_less_t()); }
+
+ //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
+ //! The sort is stable, that is, the relative order of equivalent elements is preserved.
+ //!
+ //! <b>Throws</b>: If comp throws.
+ //!
+ //! <b>Notes</b>: Iterators and references are not invalidated.
+ //!
+ //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
+ //! is the list's size.
+ template <class StrictWeakOrdering>
+ void sort(StrictWeakOrdering comp)
+ {
+ // nothing if the list has length 0 or 1.
+ if (this->size() < 2)
+ return;
+ typedef value_to_node_compare<Node, StrictWeakOrdering> value_to_node_compare_type;
+ this->icont().sort(value_to_node_compare_type(comp));
+ }
+
+ //! <b>Effects</b>: Reverses the order of elements in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: This function is linear time.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated
+ void reverse() BOOST_NOEXCEPT_OR_NOTHROW
+ { this->icont().reverse(); }
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const list& x, const list& y)
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const list& x, const list& y)
+ { return !(x == y); }
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const list& x, const list& y)
+ { return boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const list& x, const list& y)
+ { return y < x; }
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const list& x, const list& y)
+ { return !(y < x); }
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const list& x, const list& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(list& x, list& y)
+ { x.swap(y); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+
+ static bool priv_is_linked(const_iterator const position)
+ {
+ const_iterator cur(position);
+ //This list is circular including end nodes
+ return (--(++cur)) == position && (++(--cur)) == position;
+ }
+
+ bool priv_try_shrink(size_type new_size)
+ {
+ const size_type len = this->size();
+ if(len > new_size){
+ const const_iterator iend = this->cend();
+ size_type to_erase = len - new_size;
+ const_iterator ifirst;
+ if(to_erase < len/2u){
+ ifirst = iend;
+ while(to_erase--){
+ --ifirst;
+ }
+ }
+ else{
+ ifirst = this->cbegin();
+ size_type to_skip = len - to_erase;
+ while(to_skip--){
+ ++ifirst;
+ }
+ }
+ this->erase(ifirst, iend);
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+
+ iterator priv_insert(const_iterator p, const T &x)
+ {
+ BOOST_ASSERT((priv_is_linked)(p));
+ NodePtr tmp = AllocHolder::create_node(x);
+ return iterator(this->icont().insert(p.get(), *tmp));
+ }
+
+ iterator priv_insert(const_iterator p, BOOST_RV_REF(T) x)
+ {
+ BOOST_ASSERT((priv_is_linked)(p));
+ NodePtr tmp = AllocHolder::create_node(boost::move(x));
+ return iterator(this->icont().insert(p.get(), *tmp));
+ }
+
+ void priv_push_back (const T &x)
+ { this->insert(this->cend(), x); }
+
+ void priv_push_back (BOOST_RV_REF(T) x)
+ { this->insert(this->cend(), boost::move(x)); }
+
+ void priv_push_front (const T &x)
+ { this->insert(this->cbegin(), x); }
+
+ void priv_push_front (BOOST_RV_REF(T) x)
+ { this->insert(this->cbegin(), boost::move(x)); }
+
+ class insertion_functor;
+ friend class insertion_functor;
+
+ class insertion_functor
+ {
+ Icont &icont_;
+ typedef typename Icont::const_iterator iconst_iterator;
+ const iconst_iterator pos_;
+
+ public:
+ insertion_functor(Icont &icont, typename Icont::const_iterator pos)
+ : icont_(icont), pos_(pos)
+ {}
+
+ void operator()(Node &n)
+ {
+ this->icont_.insert(pos_, n);
+ }
+ };
+
+ typedef value_less<value_type> value_less_t;
+ typedef value_equal<value_type> value_equal_t;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+template <typename InputIterator>
+list(InputIterator, InputIterator) ->
+ list<typename iterator_traits<InputIterator>::value_type>;
+
+template <typename InputIterator, typename Allocator>
+list(InputIterator, InputIterator, Allocator const&) ->
+ list<typename iterator_traits<InputIterator>::value_type, Allocator>;
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class T, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::list<T, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+}}
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_LIST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/map.hpp b/src/third_party/boost-1.69.0/boost/container/map.hpp
new file mode 100644
index 00000000000..8592c2cb831
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/map.hpp
@@ -0,0 +1,2314 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_CONTAINER_MAP_HPP
+#define BOOST_CONTAINER_MAP_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+#include <boost/container/throw_exception.hpp>
+// container/detail
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/tree.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/value_init.hpp>
+#include <boost/container/detail/pair.hpp>
+#include <boost/container/detail/pair_key_mapped_of_value.hpp>
+
+// move
+#include <boost/move/traits.hpp>
+#include <boost/move/utility_core.hpp>
+// move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/detail/move_helpers.hpp>
+// intrusive/detail
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
+// other
+#include <boost/static_assert.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+// std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+namespace container {
+
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A map is a kind of associative container that supports unique keys (contains at
+//! most one of each key value) and provides for fast retrieval of values of another
+//! type T based on the keys. The map class supports bidirectional iterators.
+//!
+//! A map satisfies all of the requirements of a container and of a reversible
+//! container and of an associative container. The <code>value_type</code> stored
+//! by this container is the value_type is std::pair<const Key, T>.
+//!
+//! \tparam Key is the key_type of the map
+//! \tparam T is the <code>mapped_type</code>
+//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
+//! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
+//! (e.g. <i>allocator< std::pair<const Key, T> > </i>).
+//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
+template < class Key, class T, class Compare = std::less<Key>
+ , class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults >
+#else
+template <class Key, class T, class Compare, class Allocator, class Options>
+#endif
+class map
+ ///@cond
+ : public dtl::tree
+ < std::pair<const Key, T>
+ , dtl::select1st<Key>
+ , Compare, Allocator, Options>
+ ///@endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(map)
+
+ typedef dtl::select1st<Key> select_1st_t;
+ typedef std::pair<const Key, T> value_type_impl;
+ typedef dtl::tree
+ <value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
+ typedef dtl::pair <Key, T> movable_value_type_impl;
+ typedef typename base_t::value_compare value_compare_impl;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+
+ typedef Key key_type;
+ typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef T mapped_type;
+ typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
+ typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare;
+ typedef Compare key_compare;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
+ typedef std::pair<key_type, mapped_type> nonconst_value_type;
+ typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
+ typedef BOOST_CONTAINER_IMPDEF(node_handle<
+ typename base_t::stored_allocator_type
+ BOOST_MOVE_I pair_key_mapped_of_value
+ <key_type BOOST_MOVE_I mapped_type> >) node_type;
+ typedef BOOST_CONTAINER_IMPDEF
+ (insert_return_type_base<iterator BOOST_MOVE_I node_type>) insert_return_type;
+
+ //allocator_type::value_type type must be std::pair<CONST Key, T>
+ BOOST_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
+
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructs an empty map.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE
+ map() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
+ dtl::is_nothrow_default_constructible<Compare>::value)
+ : base_t()
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object
+ //! and allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE map(const Compare& comp, const allocator_type& a)
+ : base_t(comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit map(const Compare& comp)
+ : base_t(comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit map(const allocator_type& a)
+ : base_t(a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map and
+ //! inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last)
+ : base_t(true, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const allocator_type& a)
+ : base_t(true, first, last, Compare(), a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
+ //! inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp)
+ : base_t(true, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE map(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : base_t(true, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last)
+ : base_t(ordered_range, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : base_t(ordered_range, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, InputIterator first, InputIterator last
+ , const Compare& comp, const allocator_type& a)
+ : base_t(ordered_range, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified allocator object and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a)
+ : base_t(ordered_range, first, last, Compare(), a)
+ {}
+
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs an empty map and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted according
+ //! to the predicate and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il)
+ : base_t(true, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const Compare& comp)
+ : base_t(true, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const allocator_type& a)
+ : base_t(true, il.begin(), il.end(), Compare(), a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE map(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : base_t(true, il.begin(), il.end(), comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map and inserts elements from the ordered unique range [il.begin(), il.end()).
+ //! This function is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list<value_type> il)
+ : base_t(ordered_range, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object,
+ //! and inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE map(ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
+ : base_t(ordered_range, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE map( ordered_unique_range_t, std::initializer_list<value_type> il
+ , const Compare& comp, const allocator_type& a)
+ : base_t(ordered_range, il.begin(), il.end(), comp, a)
+ {}
+
+#endif
+
+ //! <b>Effects</b>: Copy constructs a map.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE map(const map& x)
+ : base_t(static_cast<const base_t&>(x))
+ {}
+
+ //! <b>Effects</b>: Move constructs a map. Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : base_t(BOOST_MOVE_BASE(base_t, x))
+ {}
+
+ //! <b>Effects</b>: Copy constructs a map using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE map(const map& x, const allocator_type &a)
+ : base_t(static_cast<const base_t&>(x), a)
+ {}
+
+ //! <b>Effects</b>: Move constructs a map using the specified allocator.
+ //! Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant if x == x.get_allocator(), linear otherwise.
+ //!
+ //! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE map(BOOST_RV_REF(map) x, const allocator_type &a)
+ : base_t(BOOST_MOVE_BASE(base_t, x), a)
+ {}
+
+ //! <b>Effects</b>: Makes *this a copy of x.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_COPY_ASSIGN_REF(map) x)
+ { return static_cast<map&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
+
+ //! <b>Effects</b>: this->swap(x.get()).
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE map& operator=(BOOST_RV_REF(map) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { return static_cast<map&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assign content of il to *this.
+ //!
+ BOOST_CONTAINER_FORCEINLINE map& operator=(std::initializer_list<value_type> il)
+ {
+ this->clear();
+ insert(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Returns a copy of the allocator that
+ //! was passed to the object's constructor.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const;
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns an iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns true if the container contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns the largest possible size of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: If there is no key equivalent to x in the map, inserts
+ //! value_type(x, T()) into the map.
+ //!
+ //! <b>Returns</b>: A reference to the mapped_type corresponding to x in *this.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ mapped_type& operator[](const key_type &k);
+
+ //! <b>Effects</b>: If there is no key equivalent to x in the map, inserts
+ //! value_type(boost::move(x), T()) into the map (the key is move-constructed)
+ //!
+ //! <b>Returns</b>: A reference to the mapped_type corresponding to x in *this.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ mapped_type& operator[](key_type &&k);
+ #elif defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
+ //in compilers like GCC 3.4, we can't catch temporaries
+ BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](const key_type &k) { return this->priv_subscript(k); }
+ BOOST_CONTAINER_FORCEINLINE mapped_type& operator[](BOOST_RV_REF(key_type) k) { return this->priv_subscript(::boost::move(k)); }
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH( operator[] , key_type, mapped_type&, this->priv_subscript)
+ #endif
+
+ //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, forward<M>(obj)).
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! <b>Complexity</b>: Logarithmic in the size of the container.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(const key_type& k, BOOST_FWD_REF(M) obj)
+ { return this->base_t::insert_or_assign(const_iterator(), k, ::boost::forward<M>(obj)); }
+
+ //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, move(obj)).
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! <b>Complexity</b>: Logarithmic in the size of the container.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> insert_or_assign(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
+ { return this->base_t::insert_or_assign(const_iterator(), ::boost::move(k), ::boost::forward<M>(obj)); }
+
+ //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, forward<M>(obj)) and the new element
+ //! to the container as close as possible to the position just before hint.
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
+ //! the new element is inserted just before hint.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, const key_type& k, BOOST_FWD_REF(M) obj)
+ { return this->base_t::insert_or_assign(hint, k, ::boost::forward<M>(obj)); }
+
+ //! <b>Effects</b>: If a key equivalent to k already exists in the container, assigns forward<M>(obj)
+ //! to the mapped_type corresponding to the key k. If the key does not exist, inserts the new value
+ //! as if by insert, constructing it from value_type(k, move(obj)) and the new element
+ //! to the container as close as possible to the position just before hint.
+ //!
+ //! No iterators or references are invalidated. If the insertion is successful, pointers and references
+ //! to the element obtained while it is held in the node handle are invalidated, and pointers and
+ //! references obtained to that element before it was extracted become valid.
+ //!
+ //! <b>Returns</b>: The bool component is true if the insertion took place and false if the assignment
+ //! took place. The iterator component is pointing at the element that was inserted or updated.
+ //!
+ //! <b>Complexity</b>: Logarithmic in the size of the container in general, but amortized constant if
+ //! the new element is inserted just before hint.
+ template <class M>
+ BOOST_CONTAINER_FORCEINLINE iterator insert_or_assign(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(M) obj)
+ { return this->base_t::insert_or_assign(hint, ::boost::move(k), ::boost::forward<M>(obj)); }
+
+ //! <b>Returns</b>: A reference to the element whose key is equivalent to x.
+ //! Throws: An exception object of type out_of_range if no such element is present.
+ //! <b>Complexity</b>: logarithmic.
+ T& at(const key_type& k)
+ {
+ iterator i = this->find(k);
+ if(i == this->end()){
+ throw_out_of_range("map::at key not found");
+ }
+ return i->second;
+ }
+
+ //! <b>Returns</b>: A reference to the element whose key is equivalent to x.
+ //! Throws: An exception object of type out_of_range if no such element is present.
+ //! <b>Complexity</b>: logarithmic.
+ const T& at(const key_type& k) const
+ {
+ const_iterator i = this->find(k);
+ if(i == this->end()){
+ throw_out_of_range("map::at key not found");
+ }
+ return i->second;
+ }
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Inserts x if and only if there is no element in the container
+ //! with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const value_type& x)
+ { return this->base_t::insert_unique(x); }
+
+ //! <b>Effects</b>: Inserts a new value_type created from the pair if and only if
+ //! there is no element in the container with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(const nonconst_value_type& x)
+ { return this->try_emplace(x.first, x.second); }
+
+ //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
+ //! only if there is no element in the container with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(nonconst_value_type) x)
+ { return this->try_emplace(boost::move(x.first), boost::move(x.second)); }
+
+ //! <b>Effects</b>: Inserts a new value_type move constructed from the pair if and
+ //! only if there is no element in the container with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(movable_value_type) x)
+ { return this->try_emplace(boost::move(x.first), boost::move(x.second)); }
+
+ //! <b>Effects</b>: Move constructs a new value from x if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> insert(BOOST_RV_REF(value_type) x)
+ { return this->base_t::insert_unique(boost::move(x)); }
+
+ //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
+ { return this->base_t::insert_unique(p, x); }
+
+ //! <b>Effects</b>: Move constructs a new value from x if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
+ { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
+
+ //! <b>Effects</b>: Move constructs a new value from x if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
+ { return this->try_emplace(p, boost::move(x.first), boost::move(x.second)); }
+
+ //! <b>Effects</b>: Inserts a copy of x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ iterator insert(const_iterator p, const nonconst_value_type& x)
+ { return this->try_emplace(p, x.first, x.second); }
+
+ //! <b>Effects</b>: Inserts an element move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(value_type) x)
+ { return this->base_t::insert_unique(p, boost::move(x)); }
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) if and only
+ //! if there is no element with key equivalent to the key of that element.
+ //!
+ //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
+ { this->base_t::insert_unique(first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end()) if and only
+ //! if there is no element with key equivalent to the key of that element.
+ //!
+ //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
+ { this->base_t::insert_unique(il.begin(), il.end()); }
+#endif
+
+ //! <b>Requires</b>: nh is empty or this->get_allocator() == nh.get_allocator().
+ //!
+ //! <b>Effects</b>: If nh is empty, has no effect. Otherwise, inserts the element owned
+ //! by nh if and only if there is no element in the container with a key equivalent to nh.key().
+ //!
+ //! <b>Returns</b>: If nh is empty, insert_return_type.inserted is false, insert_return_type.position
+ //! is end(), and insert_return_type.node is empty. Otherwise if the insertion took place,
+ //! insert_return_type.inserted is true, insert_return_type.position points to the inserted element,
+ //! and insert_return_type.node is empty; if the insertion failed, insert_return_type.inserted is
+ //! false, insert_return_type.node has the previous value of nh, and insert_return_type.position
+ //! points to an element with a key equivalent to nh.key().
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ typename base_t::node_type n(boost::move(nh));
+ typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(boost::move(n)));
+ return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node));
+ }
+
+ //! <b>Effects</b>: Same as `insert(node_type && nh)` but the element is inserted as close as possible
+ //! to the position just prior to "hint".
+ //!
+ //! <b>Complexity</b>: logarithmic in general, but amortized constant if the element is inserted
+ //! right before "hint".
+ insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ typename base_t::node_type n(boost::move(nh));
+ typename base_t::insert_return_type base_ret(this->base_t::insert_unique_node(hint, boost::move(n)));
+ return insert_return_type (base_ret.inserted, base_ret.position, boost::move(base_ret.node));
+ }
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object x of type T constructed with
+ //! std::forward<Args>(args)... in the container if and only if there is
+ //! no element in the container with an equivalent key.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
+ { return this->base_t::emplace_unique(boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the container if and only if there is
+ //! no element in the container with an equivalent key.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
+ //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::try_emplace(const_iterator(), k, boost::forward<Args>(args)...); }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(k), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(k),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::try_emplace(hint, k, boost::forward<Args>(args)...).first; }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only if the
+ //! insertion took place. The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::try_emplace(const_iterator(), boost::move(k), boost::forward<Args>(args)...); }
+
+ //! <b>Requires</b>: value_type shall be EmplaceConstructible into map from piecewise_construct,
+ //! forward_as_tuple(move(k)), forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Effects</b>: If the map already contains an element whose key is equivalent to k, there is no effect. Otherwise
+ //! inserts an object of type value_type constructed with piecewise_construct, forward_as_tuple(move(k)),
+ //! forward_as_tuple(forward<Args>(args)...).
+ //!
+ //! <b>Returns</b>: The returned iterator points to the map element whose key is equivalent to k.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if value
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::try_emplace(hint, boost::move(k), boost::forward<Args>(args)...).first; }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_MAP_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
+ { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(const key_type& k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::try_emplace(const_iterator(), k BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, const key_type &k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::try_emplace(hint, k BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> try_emplace(BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::try_emplace(const_iterator(), boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator try_emplace(const_iterator hint, BOOST_RV_REF(key_type) k BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::try_emplace(hint, boost::move(k) BOOST_MOVE_I##N BOOST_MOVE_FWD##N).first; }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MAP_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_MAP_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Erases the element pointed to by p.
+ //!
+ //! <b>Returns</b>: Returns an iterator pointing to the element immediately
+ //! following q prior to the element being erased. If no such element exists,
+ //! returns end().
+ //!
+ //! <b>Complexity</b>: Amortized constant time
+ iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
+ //!
+ //! <b>Returns</b>: Returns the number of erased elements.
+ //!
+ //! <b>Complexity</b>: log(size()) + count(k)
+ size_type erase(const key_type& x) BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Erases all the elements in the range [first, last).
+ //!
+ //! <b>Returns</b>: Returns last.
+ //!
+ //! <b>Complexity</b>: log(size())+N where N is the distance from first to last.
+ iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW;
+
+ #endif
+
+ //! <b>Effects</b>: Removes the first element in the container with key equivalent to k.
+ //!
+ //! <b>Returns</b>: A node_type owning the element if found, otherwise an empty node_type.
+ //!
+ //! <b>Complexity</b>: log(a.size()).
+ node_type extract(const key_type& k)
+ {
+ typename base_t::node_type base_nh(this->base_t::extract(k));
+ node_type nh(boost::move(base_nh));
+ return BOOST_MOVE_RET(node_type, nh);
+ }
+
+ //! <b>Effects</b>: Removes the element pointed to by "position".
+ //!
+ //! <b>Returns</b>: A node_type owning the element, otherwise an empty node_type.
+ //!
+ //! <b>Complexity</b>: Amortized constant.
+ node_type extract(const_iterator position)
+ {
+ typename base_t::node_type base_nh(this->base_t::extract(position));
+ node_type nh(boost::move(base_nh));
+ return BOOST_MOVE_RET(node_type, nh);
+ }
+
+ //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
+ //!
+ //! <b>Effects</b>: Attempts to extract each element in source and insert it into a using
+ //! the comparison object of *this. If there is an element in a with key equivalent to the
+ //! key of an element from source, then that element is not extracted from source.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
+ {
+ typedef dtl::tree
+ <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
+ this->merge_unique(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
+
+ //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
+ {
+ typedef dtl::tree
+ <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
+ this->base_t::merge_unique(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ void swap(map& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value )
+
+ //! <b>Effects</b>: erase(a.begin(),a.end()).
+ //!
+ //! <b>Postcondition</b>: size() == 0.
+ //!
+ //! <b>Complexity</b>: linear in size().
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! <b>Effects</b>: Returns the comparison object out
+ //! of which a was constructed.
+ //!
+ //! <b>Complexity</b>: Constant.
+ key_compare key_comp() const;
+
+ //! <b>Effects</b>: Returns an object of value_compare constructed out
+ //! of the comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ value_compare value_comp() const;
+
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ iterator find(const key_type& x);
+
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ const_iterator find(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<typename K>
+ iterator find(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<typename K>
+ const_iterator find(const K& x) const;
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
+ { return static_cast<size_type>(this->find(x) != this->cend()); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ template<typename K>
+ BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
+ { return static_cast<size_type>(this->find(x) != this->cend()); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ bool contains(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ template<typename K>
+ bool contains(const K& x) const;
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator lower_bound(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ const_iterator lower_bound(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ iterator lower_bound(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ const_iterator lower_bound(const K& x) const;
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator upper_bound(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ const_iterator upper_bound(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ iterator upper_bound(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ const_iterator upper_bound(const K& x) const;
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ std::pair<iterator,iterator> equal_range(const key_type& x);
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ std::pair<iterator,iterator> equal_range(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ std::pair<const_iterator,const_iterator> equal_range(const K& x) const;
+
+ //! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
+ //!
+ //! <b>Complexity</b>: Linear
+ void rebalance();
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const map& x, const map& y);
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const map& x, const map& y);
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const map& x, const map& y);
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const map& x, const map& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const map& x, const map& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const map& x, const map& y);
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(map& x, map& y);
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ template<class KeyConvertible>
+ BOOST_CONTAINER_FORCEINLINE mapped_type& priv_subscript(BOOST_FWD_REF(KeyConvertible) k)
+ {
+ return this->try_emplace(boost::forward<KeyConvertible>(k)).first->second;
+ }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+map(InputIterator, InputIterator) ->
+ map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+ map(InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_non_const_first_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<std::pair<it_based_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+map(InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+template <typename InputIterator>
+map(ordered_unique_range_t, InputIterator, InputIterator) ->
+ map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+map(ordered_unique_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_non_const_first_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<std::pair<it_based_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+map(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ map< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+#endif
+
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class Key, class T, class Compare, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::map<Key, T, Compare, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A multimap is a kind of associative container that supports equivalent keys
+//! (possibly containing multiple copies of the same key value) and provides for
+//! fast retrieval of values of another type T based on the keys. The multimap class
+//! supports bidirectional iterators.
+//!
+//! A multimap satisfies all of the requirements of a container and of a reversible
+//! container and of an associative container. The <code>value_type</code> stored
+//! by this container is the value_type is std::pair<const Key, T>.
+//!
+//! \tparam Key is the key_type of the map
+//! \tparam Value is the <code>mapped_type</code>
+//! \tparam Compare is the ordering function for Keys (e.g. <i>std::less<Key></i>).
+//! \tparam Allocator is the allocator to allocate the <code>value_type</code>s
+//! (e.g. <i>allocator< std::pair<const Key, T> > </i>).
+//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
+template < class Key, class T, class Compare = std::less<Key>
+ , class Allocator = new_allocator< std::pair< const Key, T> >, class Options = tree_assoc_defaults>
+#else
+template <class Key, class T, class Compare, class Allocator, class Options>
+#endif
+class multimap
+ ///@cond
+ : public dtl::tree
+ < std::pair<const Key, T>
+ , dtl::select1st<Key>
+ , Compare, Allocator, Options>
+ ///@endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(multimap)
+
+ typedef dtl::select1st<Key> select_1st_t;
+ typedef std::pair<const Key, T> value_type_impl;
+ typedef dtl::tree
+ <value_type_impl, select_1st_t, Compare, Allocator, Options> base_t;
+ typedef dtl::pair <Key, T> movable_value_type_impl;
+ typedef typename base_t::value_compare value_compare_impl;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+
+ typedef Key key_type;
+ typedef T mapped_type;
+ typedef typename boost::container::allocator_traits<Allocator>::value_type value_type;
+ typedef typename boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(value_compare_impl) value_compare;
+ typedef Compare key_compare;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
+ typedef std::pair<key_type, mapped_type> nonconst_value_type;
+ typedef BOOST_CONTAINER_IMPDEF(movable_value_type_impl) movable_value_type;
+ typedef BOOST_CONTAINER_IMPDEF(node_handle<
+ typename base_t::stored_allocator_type
+ BOOST_MOVE_I pair_key_mapped_of_value
+ <key_type BOOST_MOVE_I mapped_type> >) node_type;
+
+ //allocator_type::value_type type must be std::pair<CONST Key, T>
+ BOOST_STATIC_ASSERT((dtl::is_same<typename allocator_type::value_type, std::pair<const Key, T> >::value));
+
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructs an empty multimap.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE multimap()
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
+ dtl::is_nothrow_default_constructible<Compare>::value)
+ : base_t()
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified allocator
+ //! object and allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit multimap(const allocator_type& a)
+ : base_t(a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified comparison.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit multimap(const Compare& comp)
+ : base_t(comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified comparison and allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE multimap(const Compare& comp, const allocator_type& a)
+ : base_t(comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap and
+ //! inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last)
+ : base_t(false, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const allocator_type& a)
+ : base_t(false, first, last, Compare(), a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
+ //! inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last, const Compare& comp)
+ : base_t(false, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object
+ //! and allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multimap(InputIterator first, InputIterator last,
+ const Compare& comp, const allocator_type& a)
+ : base_t(false, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap and
+ //! inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last)
+ : base_t(ordered_range, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
+ //! inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : base_t(ordered_range, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
+ //! allocator, and inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const Compare& comp,
+ const allocator_type& a)
+ : base_t(ordered_range, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified allocator and
+ //! inserts elements from the ordered range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, InputIterator first, InputIterator last, const allocator_type& a)
+ : base_t(ordered_range, first, last, Compare(), a)
+ {}
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs an empty multimap and
+ //! and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il)
+ : base_t(false, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const allocator_type& a)
+ : base_t(false, il.begin(), il.end(), Compare(), a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const Compare& comp)
+ : base_t(false, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multimap using the specified comparison object and
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.first() - il.end().
+ BOOST_CONTAINER_FORCEINLINE multimap(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : base_t(false, il.begin(), il.end(), comp, a)
+ {}
+
+
+ //! <b>Effects</b>: Constructs an empty map and
+ //! inserts elements from the ordered range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il)
+ : base_t(ordered_range, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map using the specified comparison object and
+ //! inserts elements from the ordered range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
+ : base_t(ordered_range, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty map and
+ //! inserts elements from the ordered range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE multimap(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : base_t(ordered_range, il.begin(), il.end(), comp, a)
+ {}
+
+#endif
+
+ //! <b>Effects</b>: Copy constructs a multimap.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x)
+ : base_t(static_cast<const base_t&>(x))
+ {}
+
+ //! <b>Effects</b>: Move constructs a multimap. Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : base_t(BOOST_MOVE_BASE(base_t, x))
+ {}
+
+ //! <b>Effects</b>: Copy constructs a multimap.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE multimap(const multimap& x, const allocator_type &a)
+ : base_t(static_cast<const base_t&>(x), a)
+ {}
+
+ //! <b>Effects</b>: Move constructs a multimap using the specified allocator.
+ //! Constructs *this using x's resources.
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
+ //!
+ //! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE multimap(BOOST_RV_REF(multimap) x, const allocator_type &a)
+ : base_t(BOOST_MOVE_BASE(base_t, x), a)
+ {}
+
+ //! <b>Effects</b>: Makes *this a copy of x.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_COPY_ASSIGN_REF(multimap) x)
+ { return static_cast<multimap&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
+
+ //! <b>Effects</b>: this->swap(x.get()).
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE multimap& operator=(BOOST_RV_REF(multimap) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { return static_cast<multimap&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assign content of il to *this.
+ //!
+ BOOST_CONTAINER_FORCEINLINE multimap& operator=(std::initializer_list<value_type> il)
+ {
+ this->clear();
+ insert(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! @copydoc ::boost::container::set::get_allocator()
+ allocator_type get_allocator() const;
+
+ //! @copydoc ::boost::container::set::get_stored_allocator()
+ stored_allocator_type &get_stored_allocator();
+
+ //! @copydoc ::boost::container::set::get_stored_allocator() const
+ const stored_allocator_type &get_stored_allocator() const;
+
+ //! @copydoc ::boost::container::set::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::container::set::begin() const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::container::set::cbegin() const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::container::set::end()
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::end() const
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::cend() const
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::rbegin()
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::rbegin() const
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::crbegin() const
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::rend()
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::rend() const
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::crend() const
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::empty() const
+ bool empty() const;
+
+ //! @copydoc ::boost::container::set::size() const
+ size_type size() const;
+
+ //! @copydoc ::boost::container::set::max_size() const
+ size_type max_size() const;
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
+ { return this->base_t::emplace_equal(boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
+ { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_MULTIMAP_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ //! <b>Effects</b>: Inserts x and returns the iterator pointing to the
+ //! newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const value_type& x)
+ { return this->base_t::insert_equal(x); }
+
+ //! <b>Effects</b>: Inserts a new value constructed from x and returns
+ //! the iterator pointing to the newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const nonconst_value_type& x)
+ { return this->base_t::emplace_equal(x); }
+
+ //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
+ //! the iterator pointing to the newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF(nonconst_value_type) x)
+ { return this->base_t::emplace_equal(boost::move(x)); }
+
+ //! <b>Effects</b>: Inserts a new value move-constructed from x and returns
+ //! the iterator pointing to the newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ iterator insert(BOOST_RV_REF(movable_value_type) x)
+ { return this->base_t::emplace_equal(boost::move(x)); }
+
+ //! <b>Effects</b>: Inserts a copy of x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const value_type& x)
+ { return this->base_t::insert_equal(p, x); }
+
+ //! <b>Effects</b>: Inserts a new value constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, const nonconst_value_type& x)
+ { return this->base_t::emplace_hint_equal(p, x); }
+
+ //! <b>Effects</b>: Inserts a new value move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(nonconst_value_type) x)
+ { return this->base_t::emplace_hint_equal(p, boost::move(x)); }
+
+ //! <b>Effects</b>: Inserts a new value move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator p, BOOST_RV_REF(movable_value_type) x)
+ { return this->base_t::emplace_hint_equal(p, boost::move(x)); }
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) .
+ //!
+ //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
+ { this->base_t::insert_equal(first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: inserts each element from the range [il.begin(), il.end().
+ //!
+ //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
+ { this->base_t::insert_equal(il.begin(), il.end()); }
+#endif
+
+ //! <b>Requires</b>: nh is empty or this->get_allocator() == nh.get_allocator().
+ //!
+ //! <b>Effects/Returns</b>: If nh is empty, has no effect and returns end(). Otherwise, inserts
+ //! the element owned by nh and returns an iterator pointing to the newly inserted element.
+ //! If a range containing elements with keys equivalent to nh.key() exists,
+ //! the element is inserted at the end of that range. nh is always emptied.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ typename base_t::node_type n(boost::move(nh));
+ return this->base_t::insert_equal_node(boost::move(n));
+ }
+
+ //! <b>Effects</b>: Same as `insert(node_type && nh)` but the element is inserted as close as possible
+ //! to the position just prior to "hint".
+ //!
+ //! <b>Complexity</b>: logarithmic in general, but amortized constant if the element is inserted
+ //! right before "hint".
+ iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ {
+ typename base_t::node_type n(boost::move(nh));
+ return this->base_t::insert_equal_node(hint, boost::move(n));
+ }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! @copydoc ::boost::container::set::erase(const_iterator)
+ iterator erase(const_iterator p);
+
+ //! @copydoc ::boost::container::set::erase(const key_type&)
+ size_type erase(const key_type& x);
+
+ //! @copydoc ::boost::container::set::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator first, const_iterator last);
+ #endif
+
+ //! @copydoc ::boost::container::map::extract(const key_type&)
+ node_type extract(const key_type& k)
+ {
+ typename base_t::node_type base_nh(this->base_t::extract(k));
+ return node_type(boost::move(base_nh));
+ }
+
+ //! @copydoc ::boost::container::map::extract(const_iterator)
+ node_type extract(const_iterator position)
+ {
+ typename base_t::node_type base_nh(this->base_t::extract(position));
+ return node_type (boost::move(base_nh));
+ }
+
+ //! <b>Requires</b>: this->get_allocator() == source.get_allocator().
+ //!
+ //! <b>Effects</b>: Extracts each element in source and insert it into a using
+ //! the comparison object of *this.
+ //!
+ //! <b>Postcondition</b>: Pointers and references to the transferred elements of source refer
+ //! to those same elements but as members of *this. Iterators referring to the transferred
+ //! elements will continue to refer to their elements, but they now behave as iterators into *this,
+ //! not into source.
+ //!
+ //! <b>Throws</b>: Nothing unless the comparison object throws.
+ //!
+ //! <b>Complexity</b>: N log(a.size() + N) (N has the value source.size())
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(multimap<Key, T, C2, Allocator, Options>& source)
+ {
+ typedef dtl::tree
+ <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
+ this->base_t::merge_equal(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multimap<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<multimap<Key, T, C2, Allocator, Options>&>(source)); }
+
+ //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(map<Key, T, C2, Allocator, Options>& source)
+ {
+ typedef dtl::tree
+ <value_type_impl, select_1st_t, C2, Allocator, Options> base2_t;
+ this->base_t::merge_equal(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG map<Key, T, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<map<Key, T, C2, Allocator, Options>&>(source)); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::container::set::swap
+ void swap(multiset& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value );
+
+ //! @copydoc ::boost::container::set::clear
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::key_comp
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::container::set::value_comp
+ value_compare value_comp() const;
+
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ iterator find(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ const_iterator find(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<typename K>
+ iterator find(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<typename K>
+ const_iterator find(const K& x) const;
+
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ size_type count(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ template<typename K>
+ size_type count(const K& x) const;
+
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ bool contains(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ template<typename K>
+ bool contains(const K& x) const;
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator lower_bound(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ const_iterator lower_bound(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ iterator lower_bound(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ const_iterator lower_bound(const K& x) const;
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator upper_bound(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ const_iterator upper_bound(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ iterator upper_bound(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ const_iterator upper_bound(const K& x) const;
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ std::pair<iterator,iterator> equal_range(const key_type& x);
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ std::pair<const_iterator,const_iterator> equal_range(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ std::pair<iterator,iterator> equal_range(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ std::pair<const_iterator,const_iterator> equal_range(const K& x) const;
+
+ //! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
+ //!
+ //! <b>Complexity</b>: Linear
+ void rebalance();
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const multimap& x, const multimap& y);
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const multimap& x, const multimap& y);
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const multimap& x, const multimap& y);
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const multimap& x, const multimap& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const multimap& x, const multimap& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const multimap& x, const multimap& y);
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(multimap& x, multimap& y);
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+multimap(InputIterator, InputIterator) ->
+ multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+multimap(InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_non_const_first_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<std::pair<it_based_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+multimap(InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+template <typename InputIterator>
+multimap(ordered_range_t, InputIterator, InputIterator) ->
+ multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+multimap(ordered_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_const_first_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<std::pair<it_based_const_first_type_t<InputIterator>, it_based_second_type_t<InputIterator>>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+multimap(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ multimap< it_based_non_const_first_type_t<InputIterator>
+ , it_based_second_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class Key, class T, class Compare, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::multimap<Key, T, Compare, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+}}
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_MAP_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/container/new_allocator.hpp b/src/third_party/boost-1.69.0/boost/container/new_allocator.hpp
index 51065efa73a..51065efa73a 100644
--- a/src/third_party/boost-1.68.0/boost/container/new_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/new_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/node_allocator.hpp b/src/third_party/boost-1.69.0/boost/container/node_allocator.hpp
index b5c20a65d12..b5c20a65d12 100644
--- a/src/third_party/boost-1.68.0/boost/container/node_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/node_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/node_handle.hpp b/src/third_party/boost-1.69.0/boost/container/node_handle.hpp
index ef1d71f355d..ef1d71f355d 100644
--- a/src/third_party/boost-1.68.0/boost/container/node_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/node_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/options.hpp b/src/third_party/boost-1.69.0/boost/container/options.hpp
index 2ac7783e463..2ac7783e463 100644
--- a/src/third_party/boost-1.68.0/boost/container/options.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/options.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/deque.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/deque.hpp
index acb7da3d0de..acb7da3d0de 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/deque.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/deque.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/flat_map.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/flat_map.hpp
index 76c697bac43..76c697bac43 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/flat_map.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/flat_map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/flat_set.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/flat_set.hpp
index f072c951391..f072c951391 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/flat_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/flat_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/global_resource.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/global_resource.hpp
index 219309b072d..219309b072d 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/global_resource.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/global_resource.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/list.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/list.hpp
index f3676a3d171..f3676a3d171 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/map.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/map.hpp
index 71821606aeb..71821606aeb 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/map.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/memory_resource.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/memory_resource.hpp
index 72338a75590..72338a75590 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/memory_resource.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/memory_resource.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/monotonic_buffer_resource.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/monotonic_buffer_resource.hpp
index 5a176a3d848..5a176a3d848 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/monotonic_buffer_resource.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/monotonic_buffer_resource.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/polymorphic_allocator.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/polymorphic_allocator.hpp
index 8c046532131..8c046532131 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/polymorphic_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/polymorphic_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/pool_options.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/pool_options.hpp
index e9f72896b18..e9f72896b18 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/pool_options.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/pool_options.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/pmr/resource_adaptor.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/resource_adaptor.hpp
new file mode 100644
index 00000000000..33406267aa1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/resource_adaptor.hpp
@@ -0,0 +1,193 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_PMR_RESOURCE_ADAPTOR_HPP
+#define BOOST_CONTAINER_PMR_RESOURCE_ADAPTOR_HPP
+
+#if defined (_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/container/pmr/memory_resource.hpp>
+#include <boost/container/allocator_traits.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/move/utility_core.hpp>
+
+namespace boost {
+namespace container {
+namespace pmr {
+
+//! An instance of resource_adaptor<Allocator> is an adaptor that wraps a memory_resource interface
+//! around Allocator. In order that resource_adaptor<X<T>> and resource_adaptor<X<U>> are the same
+//! type for any allocator template X and types T and U, resource_adaptor<Allocator> is rendered as
+//! an alias to this class template such that Allocator is rebound to a char value type in every
+//! specialization of the class template. The requirements on this class template are defined below.
+//! In addition to the Allocator requirements, the parameter to resource_adaptor shall meet
+//! the following additional requirements:
+//!
+//! - `typename allocator_traits<Allocator>:: pointer` shall be identical to
+//! `typename allocator_traits<Allocator>:: value_type*`.
+//!
+//! - `typename allocator_traits<Allocator>:: const_pointer` shall be identical to
+//! `typename allocator_traits<Allocator>:: value_type const*`.
+//!
+//! - `typename allocator_traits<Allocator>:: void_pointer` shall be identical to `void*`.
+//!
+//! - `typename allocator_traits<Allocator>:: const_void_pointer` shall be identical to `void const*`.
+template <class Allocator>
+class resource_adaptor_imp
+ : public memory_resource
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ , private ::boost::intrusive::detail::ebo_functor_holder<Allocator>
+ #endif
+{
+ #ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+ Allocator m_alloc;
+ #else
+ BOOST_COPYABLE_AND_MOVABLE(resource_adaptor_imp)
+ typedef ::boost::intrusive::detail::ebo_functor_holder<Allocator> ebo_alloc_t;
+ void static_assert_if_not_char_allocator() const
+ {
+ //This class can only be used with allocators type char
+ BOOST_STATIC_ASSERT((dtl::is_same<typename Allocator::value_type, char>::value));
+ }
+ #endif
+
+ public:
+ typedef Allocator allocator_type;
+
+ //! <b>Effects</b>: Default constructs
+ //! m_alloc.
+ resource_adaptor_imp()
+ { this->static_assert_if_not_char_allocator(); }
+
+ //! <b>Effects</b>: Copy constructs
+ //! m_alloc.
+ resource_adaptor_imp(const resource_adaptor_imp &other)
+ : ebo_alloc_t(other.ebo_alloc_t::get())
+ {}
+
+ //! <b>Effects</b>: Move constructs
+ //! m_alloc.
+ resource_adaptor_imp(BOOST_RV_REF(resource_adaptor_imp) other)
+ : ebo_alloc_t(::boost::move(other.get()))
+ {}
+
+ //! <b>Effects</b>: Initializes m_alloc with
+ //! a2.
+ explicit resource_adaptor_imp(const Allocator& a2)
+ : ebo_alloc_t(a2)
+ { this->static_assert_if_not_char_allocator(); }
+
+ //! <b>Effects</b>: Initializes m_alloc with
+ //! a2.
+ explicit resource_adaptor_imp(BOOST_RV_REF(Allocator) a2)
+ : ebo_alloc_t(::boost::move(a2))
+ { this->static_assert_if_not_char_allocator(); }
+
+ //! <b>Effects</b>: Copy assigns
+ //! m_alloc.
+ resource_adaptor_imp& operator=(BOOST_COPY_ASSIGN_REF(resource_adaptor_imp) other)
+ { this->ebo_alloc_t::get() = other.ebo_alloc_t::get(); return *this; }
+
+ //! <b>Effects</b>: Move assigns
+ //! m_alloc.
+ resource_adaptor_imp& operator=(BOOST_RV_REF(resource_adaptor_imp) other)
+ { this->ebo_alloc_t::get() = ::boost::move(other.ebo_alloc_t::get()); return *this; }
+
+ //! <b>Effects</b>: Returns m_alloc.
+ allocator_type &get_allocator()
+ { return this->ebo_alloc_t::get(); }
+
+ //! <b>Effects</b>: Returns m_alloc.
+ const allocator_type &get_allocator() const
+ { return this->ebo_alloc_t::get(); }
+
+ protected:
+ //! <b>Returns</b>: Allocated memory obtained by calling m_alloc.allocate. The size and alignment
+ //! of the allocated memory shall meet the requirements for a class derived from memory_resource.
+ virtual void* do_allocate(size_t bytes, size_t alignment)
+ { (void)alignment; return this->ebo_alloc_t::get().allocate(bytes); }
+
+ //! <b>Requires</b>: p was previously allocated using A.allocate, where A == m_alloc, and not
+ //! subsequently deallocated.
+ //!
+ //! <b>Effects</b>: Returns memory to the allocator using m_alloc.deallocate().
+ virtual void do_deallocate(void* p, size_t bytes, size_t alignment)
+ { (void)alignment; this->ebo_alloc_t::get().deallocate((char*)p, bytes); }
+
+ //! Let p be dynamic_cast<const resource_adaptor_imp*>(&other).
+ //!
+ //! <b>Returns</b>: false if p is null, otherwise the value of m_alloc == p->m_alloc.
+ virtual bool do_is_equal(const memory_resource& other) const BOOST_NOEXCEPT
+ {
+ const resource_adaptor_imp* p = dynamic_cast<const resource_adaptor_imp*>(&other);
+ return p && p->ebo_alloc_t::get() == this->ebo_alloc_t::get();
+ }
+};
+
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+//! `resource_adaptor<Allocator>` is rendered as an alias to resource_adaptor_imp class template
+//! such that Allocator is rebound to a char value type.
+template <class Allocator>
+using resource_adaptor = resource_adaptor_imp
+ <typename allocator_traits<Allocator>::template rebind_alloc<char> >;
+
+#else
+
+template <class Allocator>
+class resource_adaptor
+ : public resource_adaptor_imp
+ <typename allocator_traits<Allocator>::template portable_rebind_alloc<char>::type>
+{
+ typedef resource_adaptor_imp
+ <typename allocator_traits<Allocator>::template portable_rebind_alloc<char>::type> base_t;
+
+ BOOST_COPYABLE_AND_MOVABLE(resource_adaptor)
+
+ public:
+ resource_adaptor()
+ : base_t()
+ {}
+
+ resource_adaptor(const resource_adaptor &other)
+ : base_t(other)
+ {}
+
+ resource_adaptor(BOOST_RV_REF(resource_adaptor) other)
+ : base_t(BOOST_MOVE_BASE(base_t, other))
+ {}
+
+ explicit resource_adaptor(const Allocator& a2)
+ : base_t(a2)
+ {}
+
+ explicit resource_adaptor(BOOST_RV_REF(Allocator) a2)
+ : base_t(::boost::move(a2))
+ {}
+
+ resource_adaptor& operator=(BOOST_COPY_ASSIGN_REF(resource_adaptor) other)
+ { return static_cast<resource_adaptor&>(this->base_t::operator=(other)); }
+
+ resource_adaptor& operator=(BOOST_RV_REF(resource_adaptor) other)
+ { return static_cast<resource_adaptor&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, other))); }
+
+ //get_allocator and protected functions are properly inherited
+};
+
+#endif
+
+} //namespace pmr {
+} //namespace container {
+} //namespace boost {
+
+#endif //BOOST_CONTAINER_PMR_RESOURCE_ADAPTOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/set.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/set.hpp
index 320169667f6..320169667f6 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/set.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/slist.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/slist.hpp
index c90fd7d6cd3..c90fd7d6cd3 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/slist.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/slist.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/small_vector.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/small_vector.hpp
index 6eef149728e..6eef149728e 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/small_vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/small_vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/stable_vector.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/stable_vector.hpp
index d11c426fc40..d11c426fc40 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/stable_vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/stable_vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/string.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/string.hpp
index c1eba672963..c1eba672963 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/string.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/string.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/synchronized_pool_resource.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/synchronized_pool_resource.hpp
index 516e6d2db09..516e6d2db09 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/synchronized_pool_resource.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/synchronized_pool_resource.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/unsynchronized_pool_resource.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/unsynchronized_pool_resource.hpp
index 21d30b1ebce..21d30b1ebce 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/unsynchronized_pool_resource.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/unsynchronized_pool_resource.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/pmr/vector.hpp b/src/third_party/boost-1.69.0/boost/container/pmr/vector.hpp
index 2bd9c157e0e..2bd9c157e0e 100644
--- a/src/third_party/boost-1.68.0/boost/container/pmr/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/pmr/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/scoped_allocator.hpp b/src/third_party/boost-1.69.0/boost/container/scoped_allocator.hpp
index 6cd69fe430c..6cd69fe430c 100644
--- a/src/third_party/boost-1.68.0/boost/container/scoped_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/scoped_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/scoped_allocator_fwd.hpp b/src/third_party/boost-1.69.0/boost/container/scoped_allocator_fwd.hpp
index cddf7fad156..cddf7fad156 100644
--- a/src/third_party/boost-1.68.0/boost/container/scoped_allocator_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/scoped_allocator_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/set.hpp b/src/third_party/boost-1.69.0/boost/container/set.hpp
new file mode 100644
index 00000000000..8f9f58d67c6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/set.hpp
@@ -0,0 +1,1710 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_SET_HPP
+#define BOOST_CONTAINER_SET_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+// container
+#include <boost/container/container_fwd.hpp>
+// container/detail
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/tree.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+// intrusive/detail
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//less, equal
+// move
+#include <boost/move/traits.hpp>
+#include <boost/move/utility_core.hpp>
+// move/detail
+#include <boost/move/detail/move_helpers.hpp>
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+// std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+namespace container {
+
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A set is a kind of associative container that supports unique keys (contains at
+//! most one of each key value) and provides for fast retrieval of the keys themselves.
+//! Class set supports bidirectional iterators.
+//!
+//! A set satisfies all of the requirements of a container and of a reversible container
+//! , and of an associative container. A set also provides most operations described in
+//! for unique keys.
+//!
+//! \tparam Key is the type to be inserted in the set, which is also the key_type
+//! \tparam Compare is the comparison functor used to order keys
+//! \tparam Allocator is the allocator to be used to allocate memory for this container
+//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
+template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class Options = void>
+#else
+template <class Key, class Compare, class Allocator, class Options>
+#endif
+class set
+ ///@cond
+ : public dtl::tree
+ < Key, dtl::identity<Key>, Compare, Allocator, Options>
+ ///@endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(set)
+ typedef dtl::tree
+ < Key, dtl::identity<Key>, Compare, Allocator, Options> base_t;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef Key key_type;
+ typedef Key value_type;
+ typedef Compare key_compare;
+ typedef Compare value_compare;
+ typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::node_type) node_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::insert_return_type) insert_return_type;
+
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructs an empty set.
+ //!
+ //! <b>Complexity</b>: Constant.
+
+ BOOST_CONTAINER_FORCEINLINE set()
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
+ dtl::is_nothrow_default_constructible<Compare>::value)
+ : base_t()
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified allocator object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit set(const allocator_type& a)
+ : base_t(a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE explicit set(const Compare& comp)
+ : base_t(comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object
+ //! and allocator.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE set(const Compare& comp, const allocator_type& a)
+ : base_t(comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using and
+ //! inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last)
+ : base_t(true, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const allocator_type& a)
+ : base_t(true, first, last, key_compare(), a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
+ //! inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp)
+ : base_t(true, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
+ //! allocator, and inserts elements from the range [first ,last ).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [first ,last ) is already sorted using
+ //! the predicate and otherwise N logN, where N is last - first.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE set(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : base_t(true, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last)
+ : base_t(ordered_range, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last, const Compare& comp )
+ : base_t(ordered_range, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, InputIterator first, InputIterator last
+ , const Compare& comp, const allocator_type& a)
+ : base_t(ordered_range, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified allocator and
+ //! inserts elements from the ordered unique range [first ,last). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE set(ordered_unique_range_t, InputIterator first, InputIterator last, const allocator_type& a)
+ : base_t(ordered_range, first, last, Compare(), a)
+ {}
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs an empty set and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.begin() - il.end().
+ BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il)
+ : base_t(true, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.begin() - il.end().
+ BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const allocator_type& a)
+ : base_t(true, il.begin(), il.end(), Compare(), a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
+ //! inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.begin() - il.end().
+ BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const Compare& comp )
+ : base_t(true, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
+ //! allocator, and inserts elements from the range [il.begin(), il.end()).
+ //!
+ //! <b>Complexity</b>: Linear in N if the range [il.begin(), il.end()) is already sorted using
+ //! the predicate and otherwise N logN, where N is il.begin() - il.end().
+ BOOST_CONTAINER_FORCEINLINE set(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : base_t(true, il.begin(), il.end(), comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set and
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il)
+ : base_t(ordered_range, il.begin(), il.end())
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
+ //! inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp)
+ : base_t(ordered_range, il.begin(), il.end(), comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty set using the specified comparison object and
+ //! allocator, and inserts elements from the ordered unique range [il.begin(), il.end()). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [il.begin(), il.end()) must be ordered according to the predicate and must be
+ //! unique values.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE set( ordered_unique_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : base_t(ordered_range, il.begin(), il.end(), comp, a)
+ {}
+#endif
+
+ //! <b>Effects</b>: Copy constructs a set.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE set(const set& x)
+ : base_t(static_cast<const base_t&>(x))
+ {}
+
+ //! <b>Effects</b>: Move constructs a set. Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Postcondition</b>: x is emptied.
+ BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : base_t(BOOST_MOVE_BASE(base_t, x))
+ {}
+
+ //! <b>Effects</b>: Copy constructs a set using the specified allocator.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE set(const set& x, const allocator_type &a)
+ : base_t(static_cast<const base_t&>(x), a)
+ {}
+
+ //! <b>Effects</b>: Move constructs a set using the specified allocator.
+ //! Constructs *this using x's resources.
+ //!
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE set(BOOST_RV_REF(set) x, const allocator_type &a)
+ : base_t(BOOST_MOVE_BASE(base_t, x), a)
+ {}
+
+ //! <b>Effects</b>: Makes *this a copy of x.
+ //!
+ //! <b>Complexity</b>: Linear in x.size().
+ BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_COPY_ASSIGN_REF(set) x)
+ { return static_cast<set&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
+
+ //! <b>Effects</b>: this->swap(x.get()).
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE set& operator=(BOOST_RV_REF(set) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { return static_cast<set&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Copy all elements from il to *this.
+ //!
+ //! <b>Complexity</b>: Linear in il.size().
+ set& operator=(std::initializer_list<value_type> il)
+ {
+ this->clear();
+ insert(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Returns a copy of the allocator that
+ //! was passed to the object's constructor.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const;
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ stored_allocator_type &get_stored_allocator();
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const stored_allocator_type &get_stored_allocator() const;
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant
+ iterator begin();
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const;
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const;
+
+ //! <b>Effects</b>: Returns an iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end();
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const;
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const;
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rbegin();
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rbegin() const;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crbegin() const;
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rend();
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rend() const;
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crend() const;
+
+ //! <b>Effects</b>: Returns true if the container contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ bool empty() const;
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type size() const;
+
+ //! <b>Effects</b>: Returns the largest possible size of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type max_size() const;
+ #endif // #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object x of type Key constructed with
+ //! std::forward<Args>(args)... if and only if there is
+ //! no element in the container with equivalent value.
+ //! and returns the iterator pointing to the
+ //! newly inserted element.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! Key's in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_FWD_REF(Args)... args)
+ { return this->base_t::emplace_unique(boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type Key constructed with
+ //! std::forward<Args>(args)... if and only if there is
+ //! no element in the container with equivalent value.
+ //! p is a hint pointing to where the insert
+ //! should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::emplace_hint_unique(p, boost::forward<Args>(args)...); }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_SET_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,bool> emplace(BOOST_MOVE_UREF##N)\
+ { return this->base_t::emplace_unique(BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::emplace_hint_unique(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SET_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_SET_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts x if and only if there is no element in the container
+ //! with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ std::pair<iterator, bool> insert(const value_type &x);
+
+ //! <b>Effects</b>: Move constructs a new value from x if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //!
+ //! <b>Returns</b>: The bool component of the returned pair is true if and only
+ //! if the insertion takes place, and the iterator component of the pair
+ //! points to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ std::pair<iterator, bool> insert(value_type &&x);
+ #else
+ private:
+ typedef std::pair<iterator, bool> insert_return_pair;
+ public:
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, insert_return_pair, this->priv_insert)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x in the container if and only if there is
+ //! no element in the container with key equivalent to the key of x.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ iterator insert(const_iterator p, const value_type &x);
+
+ //! <b>Effects</b>: Inserts an element move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ iterator insert(const_iterator p, value_type &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) if and only
+ //! if there is no element with key equivalent to the key of that element.
+ //!
+ //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
+ { this->base_t::insert_unique(first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: inserts each element from the range [il.begin(),il.end()) if and only
+ //! if there is no element with key equivalent to the key of that element.
+ //!
+ //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from il.begin() to il.end())
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
+ { this->base_t::insert_unique(il.begin(), il.end()); }
+#endif
+
+ //! @copydoc ::boost::container::map::insert(node_type&&)
+ BOOST_CONTAINER_FORCEINLINE insert_return_type insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ { return this->base_t::insert_unique_node(boost::move(nh)); }
+
+ //! @copydoc ::boost::container::map::insert(const_iterator, node_type&&)
+ BOOST_CONTAINER_FORCEINLINE insert_return_type insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ { return this->base_t::insert_unique_node(hint, boost::move(nh)); }
+
+ //! @copydoc ::boost::container::map::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(set<Key, C2, Allocator, Options>& source)
+ {
+ typedef dtl::tree
+ <Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
+ this->base_t::merge_unique(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::set::merge(set<Key, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<set<Key, C2, Allocator, Options>&>(source)); }
+
+ //! @copydoc ::boost::container::map::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(multiset<Key, C2, Allocator, Options>& source)
+ {
+ typedef dtl::tree
+ <Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
+ this->base_t::merge_unique(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::set::merge(multiset<Key, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<multiset<Key, C2, Allocator, Options>&>(source)); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Erases the element pointed to by p.
+ //!
+ //! <b>Returns</b>: Returns an iterator pointing to the element immediately
+ //! following q prior to the element being erased. If no such element exists,
+ //! returns end().
+ //!
+ //! <b>Complexity</b>: Amortized constant time
+ iterator erase(const_iterator p);
+
+ //! <b>Effects</b>: Erases all elements in the container with key equivalent to x.
+ //!
+ //! <b>Returns</b>: Returns the number of erased elements.
+ //!
+ //! <b>Complexity</b>: log(size()) + count(k)
+ size_type erase(const key_type& x);
+
+ //! <b>Effects</b>: Erases all the elements in the range [first, last).
+ //!
+ //! <b>Returns</b>: Returns last.
+ //!
+ //! <b>Complexity</b>: log(size())+N where N is the distance from first to last.
+ iterator erase(const_iterator first, const_iterator last);
+
+ //! @copydoc ::boost::container::map::extract(const_iterator)
+ node_type extract(const_iterator p);
+
+ //! @copydoc ::boost::container::map::extract(const key_type&)
+ node_type extract(const key_type& x);
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ void swap(set& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value );
+
+ //! <b>Effects</b>: erase(a.begin(),a.end()).
+ //!
+ //! <b>Postcondition</b>: size() == 0.
+ //!
+ //! <b>Complexity</b>: linear in size().
+ void clear();
+
+ //! <b>Effects</b>: Returns the comparison object out
+ //! of which a was constructed.
+ //!
+ //! <b>Complexity</b>: Constant.
+ key_compare key_comp() const;
+
+ //! <b>Effects</b>: Returns an object of value_compare constructed out
+ //! of the comparison object.
+ //!
+ //! <b>Complexity</b>: Constant.
+ value_compare value_comp() const;
+
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ iterator find(const key_type& x);
+
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ const_iterator find(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<typename K>
+ iterator find(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const_iterator pointing to an element with the key
+ //! equivalent to x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template<typename K>
+ const_iterator find(const K& x) const;
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ BOOST_CONTAINER_FORCEINLINE size_type count(const key_type& x) const
+ { return static_cast<size_type>(this->base_t::find(x) != this->base_t::cend()); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: The number of elements with key equivalent to x.
+ //!
+ //! <b>Complexity</b>: log(size())+count(k)
+ template<typename K>
+ BOOST_CONTAINER_FORCEINLINE size_type count(const K& x) const
+ { return static_cast<size_type>(this->find(x) != this->cend()); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ bool contains(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: Returns true if there is an element with key
+ //! equivalent to key in the container, otherwise false.
+ //!
+ //! <b>Complexity</b>: log(size()).
+ template<typename K>
+ bool contains(const K& x) const;
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator lower_bound(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ const_iterator lower_bound(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ iterator lower_bound(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than k, or a.end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ const_iterator lower_bound(const K& x) const;
+
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ iterator upper_bound(const key_type& x);
+
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ const_iterator upper_bound(const key_type& x) const;
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the first element with key not less
+ //! than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ iterator upper_bound(const K& x);
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Returns</b>: A const iterator pointing to the first element with key not
+ //! less than x, or end() if such an element is not found.
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ const_iterator upper_bound(const K& x) const;
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type& x)
+ { return this->base_t::lower_bound_range(x); }
+
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const
+ { return this->base_t::lower_bound_range(x); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator,iterator> equal_range(const K& x)
+ { return this->base_t::lower_bound_range(x); }
+
+ //! <b>Requires</b>: This overload is available only if
+ //! key_compare::is_transparent exists.
+ //!
+ //! <b>Effects</b>: Equivalent to std::make_pair(this->lower_bound(k), this->upper_bound(k)).
+ //!
+ //! <b>Complexity</b>: Logarithmic
+ template<typename K>
+ BOOST_CONTAINER_FORCEINLINE std::pair<const_iterator,const_iterator> equal_range(const K& x) const
+ { return this->base_t::lower_bound_range(x); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Rebalances the tree. It's a no-op for Red-Black and AVL trees.
+ //!
+ //! <b>Complexity</b>: Linear
+ void rebalance();
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const set& x, const set& y);
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const set& x, const set& y);
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const set& x, const set& y);
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const set& x, const set& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const set& x, const set& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const set& x, const set& y);
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(set& x, set& y);
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ template <class KeyType>
+ BOOST_CONTAINER_FORCEINLINE std::pair<iterator, bool> priv_insert(BOOST_FWD_REF(KeyType) x)
+ { return this->base_t::insert_unique(::boost::forward<KeyType>(x)); }
+
+ template <class KeyType>
+ BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
+ { return this->base_t::insert_unique(p, ::boost::forward<KeyType>(x)); }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+set(InputIterator, InputIterator) ->
+ set< it_based_value_type_t<InputIterator> >;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+ set(InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ set< it_based_value_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_value_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<it_based_value_type_t<InputIterator>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+set(InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ set< it_based_value_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+template <typename InputIterator>
+set(ordered_unique_range_t, InputIterator, InputIterator) ->
+ set< it_based_value_type_t<InputIterator>>;
+
+
+template < typename InputIterator, typename AllocatorOrCompare>
+ set(ordered_unique_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ set< it_based_value_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_value_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<it_based_value_type_t<InputIterator>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+set(ordered_unique_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ set< it_based_value_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class Key, class Compare, class Options, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::set<Key, Compare, Allocator, Options> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A multiset is a kind of associative container that supports equivalent keys
+//! (possibly contains multiple copies of the same key value) and provides for
+//! fast retrieval of the keys themselves. Class multiset supports bidirectional iterators.
+//!
+//! A multiset satisfies all of the requirements of a container and of a reversible
+//! container, and of an associative container). multiset also provides most operations
+//! described for duplicate keys.
+//!
+//! \tparam Key is the type to be inserted in the set, which is also the key_type
+//! \tparam Compare is the comparison functor used to order keys
+//! \tparam Allocator is the allocator to be used to allocate memory for this container
+//! \tparam Options is an packed option type generated using using boost::container::tree_assoc_options.
+template <class Key, class Compare = std::less<Key>, class Allocator = new_allocator<Key>, class Options = tree_assoc_defaults >
+#else
+template <class Key, class Compare, class Allocator, class Options>
+#endif
+class multiset
+ /// @cond
+ : public dtl::tree
+ <Key,dtl::identity<Key>, Compare, Allocator, Options>
+ /// @endcond
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(multiset)
+ typedef dtl::tree
+ <Key,dtl::identity<Key>, Compare, Allocator, Options> base_t;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef Key key_type;
+ typedef Key value_type;
+ typedef Compare key_compare;
+ typedef Compare value_compare;
+ typedef ::boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::stored_allocator_type) stored_allocator_type;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::iterator) iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_iterator) const_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::reverse_iterator) reverse_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::const_reverse_iterator) const_reverse_iterator;
+ typedef typename BOOST_CONTAINER_IMPDEF(base_t::node_type) node_type;
+
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! @copydoc ::boost::container::set::set()
+ BOOST_CONTAINER_FORCEINLINE multiset()
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value &&
+ dtl::is_nothrow_default_constructible<Compare>::value)
+ : base_t()
+ {}
+
+ //! @copydoc ::boost::container::set::set(const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE explicit multiset(const allocator_type& a)
+ : base_t(a)
+ {}
+
+ //! @copydoc ::boost::container::set::set(const Compare&)
+ BOOST_CONTAINER_FORCEINLINE explicit multiset(const Compare& comp)
+ : base_t(comp)
+ {}
+
+ //! @copydoc ::boost::container::set::set(const Compare&, const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE multiset(const Compare& comp, const allocator_type& a)
+ : base_t(comp, a)
+ {}
+
+ //! @copydoc ::boost::container::set::set(InputIterator, InputIterator)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last)
+ : base_t(false, first, last)
+ {}
+
+ //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const allocator_type&)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const allocator_type& a)
+ : base_t(false, first, last, key_compare(), a)
+ {}
+
+ //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp)
+ : base_t(false, first, last, comp)
+ {}
+
+ //! @copydoc ::boost::container::set::set(InputIterator, InputIterator, const Compare&, const allocator_type&)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multiset(InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : base_t(false, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multiset and
+ //! and inserts elements from the ordered range [first ,last ). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last )
+ : base_t(ordered_range, first, last)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multiset using the specified comparison object and
+ //! inserts elements from the ordered range [first ,last ). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp)
+ : base_t(ordered_range, first, last, comp)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multiset using the specified comparison object and
+ //! allocator, and inserts elements from the ordered range [first ,last ). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multiset( ordered_range_t, InputIterator first, InputIterator last, const Compare& comp, const allocator_type& a)
+ : base_t(ordered_range, first, last, comp, a)
+ {}
+
+ //! <b>Effects</b>: Constructs an empty multiset using the specified allocator and
+ //! inserts elements from the ordered range [first ,last ). This function
+ //! is more efficient than the normal range creation for ordered ranges.
+ //!
+ //! <b>Requires</b>: [first ,last) must be ordered according to the predicate.
+ //!
+ //! <b>Complexity</b>: Linear in N.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, InputIterator first, InputIterator last, const allocator_type &a)
+ : base_t(ordered_range, first, last, Compare(), a)
+ {}
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>)
+ BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il)
+ : base_t(false, il.begin(), il.end())
+ {}
+
+ //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const allocator_type& a)
+ : base_t(false, il.begin(), il.end(), Compare(), a)
+ {}
+
+ //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const Compare&)
+ BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const Compare& comp)
+ : base_t(false, il.begin(), il.end(), comp)
+ {}
+
+ //! @copydoc ::boost::container::set::set(std::initializer_list<value_type>, const Compare&, const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE multiset(std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : base_t(false, il.begin(), il.end(), comp, a)
+ {}
+
+ //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>)
+ BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il)
+ : base_t(ordered_range, il.begin(), il.end())
+ {}
+
+ //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare&)
+ BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp)
+ : base_t(ordered_range, il.begin(), il.end(), comp)
+ {}
+
+ //! @copydoc ::boost::container::set::set(ordered_unique_range_t, std::initializer_list<value_type>, const Compare&, const allocator_type&)
+ BOOST_CONTAINER_FORCEINLINE multiset(ordered_range_t, std::initializer_list<value_type> il, const Compare& comp, const allocator_type& a)
+ : base_t(ordered_range, il.begin(), il.end(), comp, a)
+ {}
+#endif
+
+ //! @copydoc ::boost::container::set::set(const set &)
+ BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x)
+ : base_t(static_cast<const base_t&>(x))
+ {}
+
+ //! @copydoc ::boost::container::set::set(set &&)
+ BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<Compare>::value)
+ : base_t(BOOST_MOVE_BASE(base_t, x))
+ {}
+
+ //! @copydoc ::boost::container::set::set(const set &, const allocator_type &)
+ BOOST_CONTAINER_FORCEINLINE multiset(const multiset& x, const allocator_type &a)
+ : base_t(static_cast<const base_t&>(x), a)
+ {}
+
+ //! @copydoc ::boost::container::set::set(set &&, const allocator_type &)
+ BOOST_CONTAINER_FORCEINLINE multiset(BOOST_RV_REF(multiset) x, const allocator_type &a)
+ : base_t(BOOST_MOVE_BASE(base_t, x), a)
+ {}
+
+ //! @copydoc ::boost::container::set::operator=(const set &)
+ BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_COPY_ASSIGN_REF(multiset) x)
+ { return static_cast<multiset&>(this->base_t::operator=(static_cast<const base_t&>(x))); }
+
+ //! @copydoc ::boost::container::set::operator=(set &&)
+ BOOST_CONTAINER_FORCEINLINE multiset& operator=(BOOST_RV_REF(multiset) x)
+ BOOST_NOEXCEPT_IF( (allocator_traits_type::propagate_on_container_move_assignment::value ||
+ allocator_traits_type::is_always_equal::value) &&
+ boost::container::dtl::is_nothrow_move_assignable<Compare>::value)
+ { return static_cast<multiset&>(this->base_t::operator=(BOOST_MOVE_BASE(base_t, x))); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! @copydoc ::boost::container::set::operator=(std::initializer_list<value_type>)
+ multiset& operator=(std::initializer_list<value_type> il)
+ {
+ this->clear();
+ insert(il.begin(), il.end());
+ return *this;
+ }
+#endif
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! @copydoc ::boost::container::set::get_allocator()
+ allocator_type get_allocator() const;
+
+ //! @copydoc ::boost::container::set::get_stored_allocator()
+ stored_allocator_type &get_stored_allocator();
+
+ //! @copydoc ::boost::container::set::get_stored_allocator() const
+ const stored_allocator_type &get_stored_allocator() const;
+
+ //! @copydoc ::boost::container::set::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::container::set::begin() const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::container::set::cbegin() const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::container::set::end()
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::end() const
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::cend() const
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::rbegin()
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::rbegin() const
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::crbegin() const
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::rend()
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::rend() const
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::crend() const
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::empty() const
+ bool empty() const;
+
+ //! @copydoc ::boost::container::set::size() const
+ size_type size() const;
+
+ //! @copydoc ::boost::container::set::max_size() const
+ size_type max_size() const;
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type Key constructed with
+ //! std::forward<Args>(args)... and returns the iterator pointing to the
+ //! newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_FWD_REF(Args)... args)
+ { return this->base_t::emplace_equal(boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type Key constructed with
+ //! std::forward<Args>(args)...
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ template <class... Args>
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator p, BOOST_FWD_REF(Args)... args)
+ { return this->base_t::emplace_hint_equal(p, boost::forward<Args>(args)...); }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_MULTISET_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace(BOOST_MOVE_UREF##N)\
+ { return this->base_t::emplace_equal(BOOST_MOVE_FWD##N); }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE iterator emplace_hint(const_iterator hint BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ { return this->base_t::emplace_hint_equal(hint BOOST_MOVE_I##N BOOST_MOVE_FWD##N); }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_MULTISET_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_MULTISET_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts x and returns the iterator pointing to the
+ //! newly inserted element.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ iterator insert(const value_type &x);
+
+ //! <b>Effects</b>: Inserts a copy of x in the container.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ iterator insert(value_type &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(insert, value_type, iterator, this->priv_insert)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ iterator insert(const_iterator p, const value_type &x);
+
+ //! <b>Effects</b>: Inserts a value move constructed from x in the container.
+ //! p is a hint pointing to where the insert should start to search.
+ //!
+ //! <b>Returns</b>: An iterator pointing to the element with key equivalent
+ //! to the key of x.
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but amortized constant if t
+ //! is inserted right before p.
+ iterator insert(const_iterator p, value_type &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, value_type, iterator, this->priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: first, last are not iterators into *this.
+ //!
+ //! <b>Effects</b>: inserts each element from the range [first,last) .
+ //!
+ //! <b>Complexity</b>: At most N log(size()+N) (N is the distance from first to last)
+ template <class InputIterator>
+ BOOST_CONTAINER_FORCEINLINE void insert(InputIterator first, InputIterator last)
+ { this->base_t::insert_equal(first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! @copydoc ::boost::container::set::insert(std::initializer_list<value_type>)
+ BOOST_CONTAINER_FORCEINLINE void insert(std::initializer_list<value_type> il)
+ { this->base_t::insert_equal(il.begin(), il.end()); }
+#endif
+
+ //! @copydoc ::boost::container::multimap::insert(node_type&&)
+ BOOST_CONTAINER_FORCEINLINE iterator insert(BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ { return this->base_t::insert_equal_node(boost::move(nh)); }
+
+ //! @copydoc ::boost::container::multimap::insert(const_iterator, node_type&&)
+ BOOST_CONTAINER_FORCEINLINE iterator insert(const_iterator hint, BOOST_RV_REF_BEG_IF_CXX11 node_type BOOST_RV_REF_END_IF_CXX11 nh)
+ { return this->base_t::insert_equal_node(hint, boost::move(nh)); }
+
+ //! @copydoc ::boost::container::multimap::merge(multimap<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(multiset<Key, C2, Allocator, Options>& source)
+ {
+ typedef dtl::tree
+ <Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
+ this->base_t::merge_equal(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::multiset::merge(multiset<Key, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG multiset<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<multiset<Key, C2, Allocator, Options>&>(source)); }
+
+ //! @copydoc ::boost::container::multimap::merge(map<Key, T, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(set<Key, C2, Allocator, Options>& source)
+ {
+ typedef dtl::tree
+ <Key, dtl::identity<Key>, C2, Allocator, Options> base2_t;
+ this->base_t::merge_equal(static_cast<base2_t&>(source));
+ }
+
+ //! @copydoc ::boost::container::multiset::merge(set<Key, C2, Allocator, Options>&)
+ template<class C2>
+ BOOST_CONTAINER_FORCEINLINE void merge(BOOST_RV_REF_BEG set<Key, C2, Allocator, Options> BOOST_RV_REF_END source)
+ { return this->merge(static_cast<set<Key, C2, Allocator, Options>&>(source)); }
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! @copydoc ::boost::container::set::erase(const_iterator)
+ iterator erase(const_iterator p);
+
+ //! @copydoc ::boost::container::set::erase(const key_type&)
+ size_type erase(const key_type& x);
+
+ //! @copydoc ::boost::container::set::erase(const_iterator,const_iterator)
+ iterator erase(const_iterator first, const_iterator last);
+
+ //! @copydoc ::boost::container::multimap::extract(const_iterator)
+ node_type extract(const_iterator p);
+
+ //! @copydoc ::boost::container::multimap::extract(const key_type&)
+ node_type extract(const key_type& x);
+
+ //! @copydoc ::boost::container::set::swap
+ void swap(multiset& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::is_always_equal::value
+ && boost::container::dtl::is_nothrow_swappable<Compare>::value );
+
+ //! @copydoc ::boost::container::set::clear
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @copydoc ::boost::container::set::key_comp
+ key_compare key_comp() const;
+
+ //! @copydoc ::boost::container::set::value_comp
+ value_compare value_comp() const;
+
+ //! @copydoc ::boost::container::set::find(const key_type& )
+ iterator find(const key_type& x);
+
+ //! @copydoc ::boost::container::set::find(const key_type& ) const
+ const_iterator find(const key_type& x) const;
+
+ //! @copydoc ::boost::container::set::find(const K& )
+ template<typename K>
+ iterator find(const K& x);
+
+ //! @copydoc ::boost::container::set::find(const K& )
+ template<typename K>
+ const_iterator find(const K& x) const;
+
+ //! @copydoc ::boost::container::set::count(const key_type& ) const
+ size_type count(const key_type& x) const;
+
+ //! @copydoc ::boost::container::set::count(const K& ) const
+ template<typename K>
+ size_type count(const K& x) const;
+
+ //! @copydoc ::boost::container::set::contains(const key_type& ) const
+ bool contains(const key_type& x) const;
+
+ //! @copydoc ::boost::container::set::contains(const K& ) const
+ template<typename K>
+ bool contains(const K& x) const;
+
+ //! @copydoc ::boost::container::set::lower_bound(const key_type& )
+ iterator lower_bound(const key_type& x);
+
+ //! @copydoc ::boost::container::set::lower_bound(const key_type& ) const
+ const_iterator lower_bound(const key_type& x) const;
+
+ //! @copydoc ::boost::container::set::lower_bound(const K& )
+ template<typename K>
+ iterator lower_bound(const K& x);
+
+ //! @copydoc ::boost::container::set::lower_bound(const K& ) const
+ template<typename K>
+ const_iterator lower_bound(const K& x) const;
+
+ //! @copydoc ::boost::container::set::upper_bound(const key_type& )
+ iterator upper_bound(const key_type& x);
+
+ //! @copydoc ::boost::container::set::upper_bound(const key_type& ) const
+ const_iterator upper_bound(const key_type& x) const;
+
+ //! @copydoc ::boost::container::set::upper_bound(const K& )
+ template<typename K>
+ iterator upper_bound(const K& x);
+
+ //! @copydoc ::boost::container::set::upper_bound(const K& ) const
+ template<typename K>
+ const_iterator upper_bound(const K& x) const;
+
+ //! @copydoc ::boost::container::set::equal_range(const key_type& ) const
+ std::pair<const_iterator, const_iterator> equal_range(const key_type& x) const;
+
+ //! @copydoc ::boost::container::set::equal_range(const key_type& )
+ std::pair<iterator,iterator> equal_range(const key_type& x);
+
+ //! @copydoc ::boost::container::set::equal_range(const K& ) const
+ template<typename K>
+ std::pair<const_iterator, const_iterator> equal_range(const K& x) const;
+
+ //! @copydoc ::boost::container::set::equal_range(const K& )
+ template<typename K>
+ std::pair<iterator,iterator> equal_range(const K& x);
+
+ //! @copydoc ::boost::container::set::rebalance()
+ void rebalance();
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const multiset& x, const multiset& y);
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const multiset& x, const multiset& y);
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const multiset& x, const multiset& y);
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const multiset& x, const multiset& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const multiset& x, const multiset& y);
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const multiset& x, const multiset& y);
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(multiset& x, multiset& y);
+
+ #endif //#if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ template <class KeyType>
+ BOOST_CONTAINER_FORCEINLINE iterator priv_insert(BOOST_FWD_REF(KeyType) x)
+ { return this->base_t::insert_equal(::boost::forward<KeyType>(x)); }
+
+ template <class KeyType>
+ BOOST_CONTAINER_FORCEINLINE iterator priv_insert(const_iterator p, BOOST_FWD_REF(KeyType) x)
+ { return this->base_t::insert_equal(p, ::boost::forward<KeyType>(x)); }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+multiset(InputIterator, InputIterator) ->
+ multiset< it_based_value_type_t<InputIterator> >;
+
+
+template < typename InputIterator, typename AllocatorOrCompare>
+multiset(InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ multiset < it_based_value_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_value_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<it_based_value_type_t<InputIterator>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+multiset(InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ multiset< it_based_value_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+template <typename InputIterator>
+multiset(ordered_range_t, InputIterator, InputIterator) ->
+ multiset< it_based_value_type_t<InputIterator>>;
+
+template < typename InputIterator, typename AllocatorOrCompare>
+multiset(ordered_range_t, InputIterator, InputIterator, AllocatorOrCompare const&) ->
+ multiset < it_based_value_type_t<InputIterator>
+ , typename dtl::if_c< // Compare
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , std::less<it_based_value_type_t<InputIterator>>
+ , AllocatorOrCompare
+ >::type
+ , typename dtl::if_c< // Allocator
+ dtl::is_allocator<AllocatorOrCompare>::value
+ , AllocatorOrCompare
+ , new_allocator<it_based_value_type_t<InputIterator>>
+ >::type
+ >;
+
+template < typename InputIterator, typename Compare, typename Allocator
+ , typename = dtl::require_nonallocator_t<Compare>
+ , typename = dtl::require_allocator_t<Allocator>>
+multiset(ordered_range_t, InputIterator, InputIterator, Compare const&, Allocator const&) ->
+ multiset< it_based_value_type_t<InputIterator>
+ , Compare
+ , Allocator>;
+
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class Key, class Compare, class Allocator, class Options>
+struct has_trivial_destructor_after_move<boost::container::multiset<Key, Compare, Allocator, Options> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value &&
+ ::boost::has_trivial_destructor_after_move<Compare>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+}}
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/slist.hpp b/src/third_party/boost-1.69.0/boost/container/slist.hpp
new file mode 100644
index 00000000000..6310f580959
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/slist.hpp
@@ -0,0 +1,1750 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2004-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_SLIST_HPP
+#define BOOST_CONTAINER_SLIST_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+#include <boost/container/throw_exception.hpp>
+// container/detail
+#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
+#include <boost/container/detail/compare_functors.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/node_alloc_holder.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/value_functors.hpp>
+// intrusive
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/slist.hpp>
+// move
+#include <boost/move/iterator.hpp>
+#include <boost/move/traits.hpp>
+#include <boost/move/utility_core.hpp>
+// move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/detail/move_helpers.hpp>
+// other
+#include <boost/core/no_exceptions_support.hpp>
+// std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+template <class T, class Allocator>
+class slist;
+
+namespace dtl {
+
+template<class VoidPointer>
+struct slist_hook
+{
+ typedef typename dtl::bi::make_slist_base_hook
+ <dtl::bi::void_pointer<VoidPointer>, dtl::bi::link_mode<dtl::bi::normal_link> >::type type;
+};
+
+
+template <class T, class VoidPointer>
+struct slist_node
+ : public slist_hook<VoidPointer>::type
+{
+ public:
+ typedef T value_type;
+ typedef T internal_type;
+ typedef typename slist_hook<VoidPointer>::type hook_type;
+
+ typedef typename aligned_storage<sizeof(T), alignment_of<T>::value>::type storage_t;
+ storage_t m_storage;
+
+ #if defined(BOOST_GCC) && (BOOST_GCC >= 40600) && (BOOST_GCC < 80000)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+ #define BOOST_CONTAINER_DISABLE_ALIASING_WARNING
+ # endif
+
+ BOOST_CONTAINER_FORCEINLINE T &get_data()
+ { return *reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const T &get_data() const
+ { return *reinterpret_cast<const T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE T *get_data_ptr()
+ { return reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const T *get_data_ptr() const
+ { return reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE internal_type &get_real_data()
+ { return *reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const internal_type &get_real_data() const
+ { return *reinterpret_cast<const internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE internal_type *get_real_data_ptr()
+ { return reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const internal_type *get_real_data_ptr() const
+ { return reinterpret_cast<internal_type*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE ~slist_node()
+ { reinterpret_cast<T*>(this->m_storage.data)->~T(); }
+
+ #if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING)
+ #pragma GCC diagnostic pop
+ #undef BOOST_CONTAINER_DISABLE_ALIASING_WARNING
+ # endif
+
+ BOOST_CONTAINER_FORCEINLINE void destroy_header()
+ { static_cast<hook_type*>(this)->~hook_type(); }
+};
+
+
+template <class T, class VoidPointer>
+struct iiterator_node_value_type< slist_node<T,VoidPointer> > {
+ typedef T type;
+};
+
+template<class Allocator>
+struct intrusive_slist_type
+{
+ typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef typename allocator_traits_type::value_type value_type;
+ typedef typename boost::intrusive::pointer_traits
+ <typename allocator_traits_type::pointer>::template
+ rebind_pointer<void>::type
+ void_pointer;
+ typedef typename dtl::slist_node
+ <value_type, void_pointer> node_type;
+
+ typedef typename dtl::bi::make_slist
+ <node_type
+ ,dtl::bi::base_hook<typename slist_hook<void_pointer>::type>
+ ,dtl::bi::constant_time_size<true>
+ , dtl::bi::size_type
+ <typename allocator_traits_type::size_type>
+ >::type container_type;
+ typedef container_type type ;
+};
+
+} //namespace dtl {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! An slist is a singly linked list: a list where each element is linked to the next
+//! element, but not to the previous element. That is, it is a Sequence that
+//! supports forward but not backward traversal, and (amortized) constant time
+//! insertion and removal of elements. Slists, like lists, have the important
+//! property that insertion and splicing do not invalidate iterators to list elements,
+//! and that even removal invalidates only the iterators that point to the elements
+//! that are removed. The ordering of iterators may be changed (that is,
+//! slist<T>::iterator might have a different predecessor or successor after a list
+//! operation than it did before), but the iterators themselves will not be invalidated
+//! or made to point to different elements unless that invalidation or mutation is explicit.
+//!
+//! The main difference between slist and list is that list's iterators are bidirectional
+//! iterators, while slist's iterators are forward iterators. This means that slist is
+//! less versatile than list; frequently, however, bidirectional iterators are
+//! unnecessary. You should usually use slist unless you actually need the extra
+//! functionality of list, because singly linked lists are smaller and faster than double
+//! linked lists.
+//!
+//! Important performance note: like every other Sequence, slist defines the member
+//! functions insert and erase. Using these member functions carelessly, however, can
+//! result in disastrously slow programs. The problem is that insert's first argument is
+//! an iterator p, and that it inserts the new element(s) before p. This means that
+//! insert must find the iterator just before p; this is a constant-time operation
+//! for list, since list has bidirectional iterators, but for slist it must find that
+//! iterator by traversing the list from the beginning up to p. In other words:
+//! insert and erase are slow operations anywhere but near the beginning of the slist.
+//!
+//! Slist provides the member functions insert_after and erase_after, which are constant
+//! time operations: you should always use insert_after and erase_after whenever
+//! possible. If you find that insert_after and erase_after aren't adequate for your
+//! needs, and that you often need to use insert and erase in the middle of the list,
+//! then you should probably use list instead of slist.
+//!
+//! \tparam T The type of object that is stored in the list
+//! \tparam Allocator The allocator used for all internal memory management
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class T, class Allocator = new_allocator<T> >
+#else
+template <class T, class Allocator>
+#endif
+class slist
+ : protected dtl::node_alloc_holder
+ <Allocator, typename dtl::intrusive_slist_type<Allocator>::type>
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef typename
+ dtl::intrusive_slist_type<Allocator>::type Icont;
+ typedef dtl::node_alloc_holder<Allocator, Icont> AllocHolder;
+ typedef typename AllocHolder::NodePtr NodePtr;
+ typedef typename AllocHolder::NodeAlloc NodeAlloc;
+ typedef typename AllocHolder::ValAlloc ValAlloc;
+ typedef typename AllocHolder::Node Node;
+ typedef dtl::allocator_destroyer<NodeAlloc> Destroyer;
+ typedef typename AllocHolder::alloc_version alloc_version;
+ typedef boost::container::
+ allocator_traits<Allocator> allocator_traits_type;
+ typedef boost::container::equal_to_value<Allocator> equal_to_value_type;
+
+ BOOST_COPYABLE_AND_MOVABLE(slist)
+ typedef dtl::iterator_from_iiterator<typename Icont::iterator, false> iterator_impl;
+ typedef dtl::iterator_from_iiterator<typename Icont::iterator, true > const_iterator_impl;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+
+ typedef T value_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(NodeAlloc) stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
+ typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
+
+ public:
+
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Constructs a list taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: If allocator_type's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ slist() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : AllocHolder()
+ {}
+
+ //! <b>Effects</b>: Constructs a list taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ explicit slist(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
+ : AllocHolder(a)
+ {}
+
+ //! <b>Effects</b>: Constructs a list
+ //! and inserts n value-initialized value_types.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit slist(size_type n)
+ : AllocHolder(allocator_type())
+ { this->resize(n); }
+
+ //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ slist(size_type n, const allocator_type &a)
+ : AllocHolder(a)
+ { this->resize(n); }
+
+ //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit slist(size_type n, const value_type& x, const allocator_type& a = allocator_type())
+ : AllocHolder(a)
+ { this->insert_after(this->cbefore_begin(), n, x); }
+
+ //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
+ //! and inserts a copy of the range [first, last) in the list.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced InIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [first, last).
+ template <class InpIt>
+ slist(InpIt first, InpIt last, const allocator_type& a = allocator_type())
+ : AllocHolder(a)
+ { this->insert_after(this->cbefore_begin(), first, last); }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs a list that will use a copy of allocator a
+ //! and inserts a copy of the range [il.begin(), il.end()) in the list.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
+ slist(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
+ : AllocHolder(a)
+ { this->insert_after(this->cbefore_begin(), il.begin(), il.end()); }
+#endif
+
+ //! <b>Effects</b>: Copy constructs a list.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ slist(const slist& x)
+ : AllocHolder(x)
+ { this->insert_after(this->cbefore_begin(), x.begin(), x.end()); }
+
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ slist(BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW
+ : AllocHolder(BOOST_MOVE_BASE(AllocHolder, x))
+ {}
+
+ //! <b>Effects</b>: Copy constructs a list using the specified allocator.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ slist(const slist& x, const allocator_type &a)
+ : AllocHolder(a)
+ { this->insert_after(this->cbefore_begin(), x.begin(), x.end()); }
+
+ //! <b>Effects</b>: Move constructor using the specified allocator.
+ //! Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocation or value_type's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
+ slist(BOOST_RV_REF(slist) x, const allocator_type &a)
+ : AllocHolder(a)
+ {
+ if(this->node_alloc() == x.node_alloc()){
+ this->icont().swap(x.icont());
+ }
+ else{
+ this->insert_after(this->cbefore_begin(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end()));
+ }
+ }
+
+ //! <b>Effects</b>: Destroys the list. All stored values are destroyed
+ //! and used memory is deallocated.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements.
+ ~slist() BOOST_NOEXCEPT_OR_NOTHROW
+ {} //AllocHolder clears the slist
+
+ //! <b>Effects</b>: Makes *this contain the same elements as x.
+ //!
+ //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
+ //! of each of x's elements.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in x.
+ slist& operator= (BOOST_COPY_ASSIGN_REF(slist) x)
+ {
+ if (&x != this){
+ NodeAlloc &this_alloc = this->node_alloc();
+ const NodeAlloc &x_alloc = x.node_alloc();
+ dtl::bool_<allocator_traits_type::
+ propagate_on_container_copy_assignment::value> flag;
+ if(flag && this_alloc != x_alloc){
+ this->clear();
+ }
+ this->AllocHolder::copy_assign_alloc(x);
+ this->assign(x.begin(), x.end());
+ }
+ return *this;
+ }
+
+ //! <b>Effects</b>: Makes *this contain the same elements as x.
+ //!
+ //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
+ //! of each of x's elements.
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ slist& operator=(BOOST_RV_REF(slist) x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ BOOST_ASSERT(this != &x);
+ NodeAlloc &this_alloc = this->node_alloc();
+ NodeAlloc &x_alloc = x.node_alloc();
+ const bool propagate_alloc = allocator_traits_type::
+ propagate_on_container_move_assignment::value;
+ const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
+ //Resources can be transferred if both allocators are
+ //going to be equal after this function (either propagated or already equal)
+ if(propagate_alloc || allocators_equal){
+ //Destroy
+ this->clear();
+ //Move allocator if needed
+ this->AllocHolder::move_assign_alloc(x);
+ //Obtain resources
+ this->icont() = boost::move(x.icont());
+ }
+ //Else do a one by one move
+ else{
+ this->assign( boost::make_move_iterator(x.begin())
+ , boost::make_move_iterator(x.end()));
+ }
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Makes *this contain the same elements as in il.
+ //!
+ //! <b>Postcondition</b>: this->size() == il.size(). *this contains a copy
+ //! of each of il's elements.
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ slist& operator=(std::initializer_list<value_type> il)
+ {
+ assign(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ //! <b>Effects</b>: Assigns the n copies of val to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ void assign(size_type n, const T& val)
+ {
+ typedef constant_iterator<value_type, difference_type> cvalue_iterator;
+ return this->assign(cvalue_iterator(val, n), cvalue_iterator());
+ }
+
+ //! <b>Effects</b>: Assigns the range [first, last) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing InpIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ template <class InpIt>
+ void assign(InpIt first, InpIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_convertible<InpIt, size_type>::type * = 0
+ #endif
+ )
+ {
+ iterator end_n(this->end());
+ iterator prev(this->before_begin());
+ iterator node(this->begin());
+ while (node != end_n && first != last){
+ *node = *first;
+ prev = node;
+ ++node;
+ ++first;
+ }
+ if (first != last)
+ this->insert_after(prev, first, last);
+ else
+ this->erase_after(prev, end_n);
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assigns the range [il.begin(), il.end()) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to range [il.begin(), il.end()).
+
+ void assign(std::initializer_list<value_type> il)
+ {
+ assign(il.begin(), il.end());
+ }
+#endif
+ //! <b>Effects</b>: Returns a copy of the internal allocator.
+ //!
+ //! <b>Throws</b>: If allocator's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return allocator_type(this->node_alloc()); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->node_alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->node_alloc(); }
+
+ //////////////////////////////////////////////
+ //
+ // iterators
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns a non-dereferenceable iterator that,
+ //! when incremented, yields begin(). This iterator may be used
+ //! as the argument to insert_after, erase_after, etc.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator before_begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(end()); }
+
+ //! <b>Effects</b>: Returns a non-dereferenceable const_iterator
+ //! that, when incremented, yields begin(). This iterator may be used
+ //! as the argument to insert_after, erase_after, etc.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator before_begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->cbefore_begin(); }
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->icont().begin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->cbegin(); }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->icont().end()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->cend(); }
+
+ //! <b>Effects</b>: Returns a non-dereferenceable const_iterator
+ //! that, when incremented, yields begin(). This iterator may be used
+ //! as the argument to insert_after, erase_after, etc.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbefore_begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_iterator(end()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_iterator(this->non_const_icont().begin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_iterator(this->non_const_icont().end()); }
+
+ //! <b>Returns</b>: The iterator to the element before i in the sequence.
+ //! Returns the end-iterator, if either i is the begin-iterator or the
+ //! sequence is empty.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements before i.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ iterator previous(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->icont().previous(p.get())); }
+
+ //! <b>Returns</b>: The const_iterator to the element before i in the sequence.
+ //! Returns the end-const_iterator, if either i is the begin-const_iterator or
+ //! the sequence is empty.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements before i.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const_iterator previous(const_iterator p)
+ { return const_iterator(this->icont().previous(p.get())); }
+
+ //////////////////////////////////////////////
+ //
+ // capacity
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns true if the list contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ bool empty() const
+ { return !this->size(); }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type size() const
+ { return this->icont().size(); }
+
+ //! <b>Effects</b>: Returns the largest possible size of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type max_size() const
+ { return AllocHolder::max_size(); }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are value initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type new_size)
+ {
+ const_iterator last_pos;
+ if(!priv_try_shrink(new_size, last_pos)){
+ typedef value_init_construct_iterator<value_type, difference_type> value_init_iterator;
+ this->insert_after(last_pos, value_init_iterator(new_size - this->size()), value_init_iterator());
+ }
+ }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are copy constructed from x.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type new_size, const T& x)
+ {
+ const_iterator last_pos;
+ if(!priv_try_shrink(new_size, last_pos)){
+ this->insert_after(last_pos, new_size, x);
+ }
+ }
+
+ //////////////////////////////////////////////
+ //
+ // element access
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference front()
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->begin();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference front() const
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->begin();
+ }
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the front of the list
+ //!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ template <class... Args>
+ reference emplace_front(BOOST_FWD_REF(Args)... args)
+ { return *this->emplace_after(this->cbefore_begin(), boost::forward<Args>(args)...); }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... after prev
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant
+ template <class... Args>
+ iterator emplace_after(const_iterator prev, BOOST_FWD_REF(Args)... args)
+ {
+ NodePtr pnode(AllocHolder::create_node(boost::forward<Args>(args)...));
+ return iterator(this->icont().insert_after(prev.get(), *pnode));
+ }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_SLIST_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ reference emplace_front(BOOST_MOVE_UREF##N)\
+ { return *this->emplace_after(this->cbefore_begin() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);}\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace_after(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ NodePtr pnode (AllocHolder::create_node(BOOST_MOVE_FWD##N));\
+ return iterator(this->icont().insert_after(p.get(), *pnode));\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SLIST_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_SLIST_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x at the beginning of the list.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_front(const T &x);
+
+ //! <b>Effects</b>: Constructs a new element in the beginning of the list
+ //! and moves the resources of x to this new element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_front(T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(push_front, T, void, priv_push_front)
+ #endif
+
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts a copy of the value after prev_p.
+ //!
+ //! <b>Returns</b>: An iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references of
+ //! previous values.
+ iterator insert_after(const_iterator prev_p, const T &x);
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts a move constructed copy object from the value after the
+ //! element pointed by prev_p.
+ //!
+ //! <b>Returns</b>: An iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references of
+ //! previous values.
+ iterator insert_after(const_iterator prev_p, T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert_after, T, iterator, priv_insert_after, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts n copies of x after prev_p.
+ //!
+ //! <b>Returns</b>: an iterator to the last inserted element or prev_p if n is 0.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references of
+ //! previous values.
+ iterator insert_after(const_iterator prev_p, size_type n, const value_type& x)
+ {
+ typedef constant_iterator<value_type, difference_type> cvalue_iterator;
+ return this->insert_after(prev_p, cvalue_iterator(x, n), cvalue_iterator());
+ }
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts the range pointed by [first, last) after prev_p.
+ //!
+ //! <b>Returns</b>: an iterator to the last inserted element or prev_p if first == last.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced InpIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements inserted.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references of
+ //! previous values.
+ template <class InpIt>
+ iterator insert_after(const_iterator prev_p, InpIt first, InpIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::enable_if_c
+ < !dtl::is_convertible<InpIt, size_type>::value
+ && (dtl::is_input_iterator<InpIt>::value
+ || dtl::is_same<alloc_version, version_1>::value
+ )
+ >::type * = 0
+ #endif
+ )
+ {
+ iterator ret_it(prev_p.get());
+ for (; first != last; ++first){
+ ret_it = iterator(this->icont().insert_after(ret_it.get(), *this->create_node_from_it(first)));
+ }
+ return ret_it;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Requires</b>: prev_p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts the range pointed by [il.begin(), il.end()) after prev_p.
+ //!
+ //! <b>Returns</b>: an iterator to the last inserted element or prev_p if il.begin() == il.end().
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements inserted.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references of
+ //! previous values.
+ iterator insert_after(const_iterator prev_p, std::initializer_list<value_type> il)
+ {
+ return insert_after(prev_p, il.begin(), il.end());
+ }
+#endif
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class FwdIt>
+ iterator insert_after(const_iterator prev, FwdIt first, FwdIt last
+ , typename dtl::enable_if_c
+ < !dtl::is_convertible<FwdIt, size_type>::value
+ && !(dtl::is_input_iterator<FwdIt>::value
+ || dtl::is_same<alloc_version, version_1>::value
+ )
+ >::type * = 0
+ )
+ {
+ //Optimized allocation and construction
+ insertion_functor func(this->icont(), prev.get());
+ this->allocate_many_and_construct(first, boost::container::iterator_distance(first, last), func);
+ return iterator(func.inserted_first());
+ }
+ #endif
+
+ //! <b>Effects</b>: Removes the first element from the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void pop_front()
+ {
+ BOOST_ASSERT(!this->empty());
+ this->icont().pop_front_and_dispose(Destroyer(this->node_alloc()));
+ }
+
+ //! <b>Effects</b>: Erases the element after the element pointed by prev_p
+ //! of the list.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not invalidate iterators or references to non erased elements.
+ iterator erase_after(const_iterator prev_p)
+ {
+ return iterator(this->icont().erase_after_and_dispose(prev_p.get(), Destroyer(this->node_alloc())));
+ }
+
+ //! <b>Effects</b>: Erases the range (before_first, last) from
+ //! the list.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of erased elements.
+ //!
+ //! <b>Note</b>: Does not invalidate iterators or references to non erased elements.
+ iterator erase_after(const_iterator before_first, const_iterator last)
+ {
+ return iterator(this->icont().erase_after_and_dispose(before_first.get(), last.get(), Destroyer(this->node_alloc())));
+ }
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements on *this and x.
+ void swap(slist& x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value ||
+ allocator_traits_type::is_always_equal::value ||
+ this->get_stored_allocator() == x.get_stored_allocator());
+ AllocHolder::swap(x);
+ }
+
+ //! <b>Effects</b>: Erases all the elements of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the list.
+ void clear()
+ { this->icont().clear_and_dispose(Destroyer(this->node_alloc())); }
+
+ //////////////////////////////////////////////
+ //
+ // slist operations
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by the list. x != *this
+ //!
+ //! <b>Effects</b>: Transfers all the elements of list x to this list, after the
+ //! the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: std::runtime_error if this' allocator and x's allocator
+ //! are not equal.
+ //!
+ //! <b>Complexity</b>: Linear to the elements in x.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
+ //! this list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_p, slist& x) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this != &x);
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().splice_after(prev_p.get(), x.icont());
+ }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by the list. x != *this
+ //!
+ //! <b>Effects</b>: Transfers all the elements of list x to this list, after the
+ //! the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: std::runtime_error if this' allocator and x's allocator
+ //! are not equal.
+ //!
+ //! <b>Complexity</b>: Linear to the elements in x.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
+ //! this list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice_after(prev_p, static_cast<slist&>(x)); }
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of this.
+ //! i must point to an element contained in list x.
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
+ //! after the element pointed by prev_p.
+ //! If prev_p == prev or prev_p == ++prev, this function is a null operation.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_p, slist& x, const_iterator prev) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().splice_after(prev_p.get(), x.icont(), prev.get());
+ }
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of this.
+ //! i must point to an element contained in list x.
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
+ //! after the element pointed by prev_p.
+ //! If prev_p == prev or prev_p == ++prev, this function is a null operation.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x, const_iterator prev) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice_after(prev_p, static_cast<slist&>(x), prev); }
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of this.
+ //! before_first and before_last must be valid iterators of x.
+ //! prev_p must not be contained in [before_first, before_last) range.
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
+ //! from list x to this list, after the element pointed by prev_p.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear to the number of transferred elements.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_p, slist& x,
+ const_iterator before_first, const_iterator before_last) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().splice_after
+ (prev_p.get(), x.icont(), before_first.get(), before_last.get());
+ }
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of this.
+ //! before_first and before_last must be valid iterators of x.
+ //! prev_p must not be contained in [before_first, before_last) range.
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
+ //! from list x to this list, after the element pointed by prev_p.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear to the number of transferred elements.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x,
+ const_iterator before_first, const_iterator before_last) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice_after(prev_p, static_cast<slist&>(x), before_first, before_last); }
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of this.
+ //! before_first and before_last must be valid iterators of x.
+ //! prev_p must not be contained in [before_first, before_last) range.
+ //! n == distance(before_first, before_last).
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
+ //! from list x to this list, after the element pointed by prev_p.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_p, slist& x,
+ const_iterator before_first, const_iterator before_last,
+ size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().splice_after
+ (prev_p.get(), x.icont(), before_first.get(), before_last.get(), n);
+ }
+
+ //! <b>Requires</b>: prev_p must be a valid iterator of this.
+ //! before_first and before_last must be valid iterators of x.
+ //! prev_p must not be contained in [before_first, before_last) range.
+ //! n == distance(before_first, before_last).
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the range [before_first + 1, before_last + 1)
+ //! from list x to this list, after the element pointed by prev_p.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_p, BOOST_RV_REF(slist) x,
+ const_iterator before_first, const_iterator before_last,
+ size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice_after(prev_p, static_cast<slist&>(x), before_first, before_last, n); }
+
+ //! <b>Effects</b>: Removes all the elements that compare equal to value.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ void remove(const T& value)
+ { this->remove_if(equal_to_value_type(value)); }
+
+ //! <b>Effects</b>: Removes all the elements for which a specified
+ //! predicate is satisfied.
+ //!
+ //! <b>Throws</b>: If pred throws.
+ //!
+ //! <b>Complexity</b>: Linear time. It performs exactly size() calls to the predicate.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template <class Pred>
+ void remove_if(Pred pred)
+ {
+ typedef value_to_node_compare<Node, Pred> value_to_node_compare_type;
+ this->icont().remove_and_dispose_if(value_to_node_compare_type(pred), Destroyer(this->node_alloc()));
+ }
+
+ //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
+ //! elements that are equal from the list.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Complexity</b>: Linear time (size()-1 comparisons equality comparisons).
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ void unique()
+ { this->unique(value_equal_t()); }
+
+ //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
+ //! elements that satisfy some binary predicate from the list.
+ //!
+ //! <b>Throws</b>: If pred throws.
+ //!
+ //! <b>Complexity</b>: Linear time (size()-1 comparisons calls to pred()).
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template <class Pred>
+ void unique(Pred pred)
+ {
+ typedef value_to_node_compare<Node, Pred> value_to_node_compare_type;
+ this->icont().unique_and_dispose(value_to_node_compare_type(pred), Destroyer(this->node_alloc()));
+ }
+
+ //! <b>Requires</b>: The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this according to std::less<value_type>. The merge is stable;
+ //! that is, if an element from *this is equivalent to one from x, then the element
+ //! from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ void merge(slist & x)
+ { this->merge(x, value_less_t()); }
+
+ //! <b>Requires</b>: The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this according to std::less<value_type>. The merge is stable;
+ //! that is, if an element from *this is equivalent to one from x, then the element
+ //! from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ void merge(BOOST_RV_REF(slist) x)
+ { this->merge(static_cast<slist&>(x)); }
+
+ //! <b>Requires</b>: p must be a comparison function that induces a strict weak
+ //! ordering and both *this and x must be sorted according to that ordering
+ //! The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this. The merge is stable; that is, if an element from *this is
+ //! equivalent to one from x, then the element from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If comp throws.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ //!
+ //! <b>Note</b>: Iterators and references to *this are not invalidated.
+ template <class StrictWeakOrdering>
+ void merge(slist& x, StrictWeakOrdering comp)
+ {
+ typedef value_to_node_compare<Node, StrictWeakOrdering> value_to_node_compare_type;
+ BOOST_ASSERT(this->node_alloc() == x.node_alloc());
+ this->icont().merge(x.icont(), value_to_node_compare_type(comp));
+ }
+
+ //! <b>Requires</b>: p must be a comparison function that induces a strict weak
+ //! ordering and both *this and x must be sorted according to that ordering
+ //! The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this. The merge is stable; that is, if an element from *this is
+ //! equivalent to one from x, then the element from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If comp throws.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ //!
+ //! <b>Note</b>: Iterators and references to *this are not invalidated.
+ template <class StrictWeakOrdering>
+ void merge(BOOST_RV_REF(slist) x, StrictWeakOrdering comp)
+ { this->merge(static_cast<slist&>(x), comp); }
+
+ //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
+ //! The sort is stable, that is, the relative order of equivalent elements is preserved.
+ //!
+ //! <b>Throws</b>: If comparison throws.
+ //!
+ //! <b>Notes</b>: Iterators and references are not invalidated.
+ //!
+ //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
+ //! is the list's size.
+ void sort()
+ { this->sort(value_less_t()); }
+
+ //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
+ //! The sort is stable, that is, the relative order of equivalent elements is preserved.
+ //!
+ //! <b>Throws</b>: If comp throws.
+ //!
+ //! <b>Notes</b>: Iterators and references are not invalidated.
+ //!
+ //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
+ //! is the list's size.
+ template <class StrictWeakOrdering>
+ void sort(StrictWeakOrdering comp)
+ {
+ typedef value_to_node_compare<Node, StrictWeakOrdering> value_to_node_compare_type;
+ // nothing if the slist has length 0 or 1.
+ if (this->size() < 2)
+ return;
+ this->icont().sort(value_to_node_compare_type(comp));
+ }
+
+ //! <b>Effects</b>: Reverses the order of elements in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: This function is linear time.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated
+ void reverse() BOOST_NOEXCEPT_OR_NOTHROW
+ { this->icont().reverse(); }
+
+ //////////////////////////////////////////////
+ //
+ // list compatibility interface
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... before p
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the elements before p
+ template <class... Args>
+ iterator emplace(const_iterator p, BOOST_FWD_REF(Args)... args)
+ { return this->emplace_after(this->previous(p), boost::forward<Args>(args)...); }
+
+ #else
+
+ #define BOOST_CONTAINER_SLIST_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ return this->emplace_after(this->previous(p) BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SLIST_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_SLIST_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of x before p.
+ //!
+ //! <b>Returns</b>: an iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the elements before p.
+ iterator insert(const_iterator p, const T &x);
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a new element before p with x's resources.
+ //!
+ //! <b>Returns</b>: an iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Linear to the elements before p.
+ iterator insert(const_iterator prev_p, T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts n copies of x before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if n == 0.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n plus linear to the elements before p.
+ iterator insert(const_iterator p, size_type n, const value_type& x)
+ {
+ const_iterator prev(this->previous(p));
+ this->insert_after(prev, n, x);
+ return ++iterator(prev.get());
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [first, last) range before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced InpIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to distance [first, last) plus
+ //! linear to the elements before p.
+ template <class InIter>
+ iterator insert(const_iterator p, InIter first, InIter last)
+ {
+ const_iterator prev(this->previous(p));
+ this->insert_after(prev, first, last);
+ return ++iterator(prev.get());
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if il.begin() == il.end().
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced std::initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()) plus
+ //! linear to the elements before p.
+ iterator insert(const_iterator p, std::initializer_list<value_type> il)
+ {
+ return insert(p, il.begin(), il.end());
+ }
+#endif
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Erases the element at p.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements before p.
+ iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->erase_after(previous(p))); }
+
+ //! <b>Requires</b>: first and last must be valid iterator to elements in *this.
+ //!
+ //! <b>Effects</b>: Erases the elements pointed by [first, last).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the distance between first and last plus
+ //! linear to the elements before first.
+ iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->erase_after(previous(first), last)); }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by the list. x != *this. this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
+ //! the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear in distance(begin(), p), and linear in x.size().
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
+ //! this list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, slist& x) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice_after(this->previous(p), x); }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by the list. x != *this. this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
+ //! the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear in distance(begin(), p), and linear in x.size().
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of
+ //! this list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, BOOST_RV_REF(slist) x) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice(p, static_cast<slist&>(x)); }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. i must point to an element contained in list x.
+ //! this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //! If p == i or p == ++i, this function is a null operation.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear in distance(begin(), p), and in distance(x.begin(), i).
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, slist& x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice_after(this->previous(p), x, x.previous(i)); }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. i must point to an element contained in list x.
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Effects</b>: Transfers the value pointed by i, from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //! If p == i or p == ++i, this function is a null operation.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear in distance(begin(), p), and in distance(x.begin(), i).
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, BOOST_RV_REF(slist) x, const_iterator i) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice(p, static_cast<slist&>(x), i); }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. first and last must point to elements contained in list x.
+ //!
+ //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //! this' allocator and x's allocator shall compare equal.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear in distance(begin(), p), in distance(x.begin(), first),
+ //! and in distance(first, last).
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, slist& x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice_after(this->previous(p), x, x.previous(first), x.previous(last)); }
+
+ //! <b>Requires</b>: p must point to an element contained
+ //! by this list. first and last must point to elements contained in list x.
+ //! this' allocator and x's allocator shall compare equal
+ //!
+ //! <b>Effects</b>: Transfers the range pointed by first and last from list x to this list,
+ //! before the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear in distance(begin(), p), in distance(x.begin(), first),
+ //! and in distance(first, last).
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator p, BOOST_RV_REF(slist) x, const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ { this->splice(p, static_cast<slist&>(x), first, last); }
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const slist& x, const slist& y)
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const slist& x, const slist& y)
+ { return !(x == y); }
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const slist& x, const slist& y)
+ { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const slist& x, const slist& y)
+ { return y < x; }
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const slist& x, const slist& y)
+ { return !(y < x); }
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const slist& x, const slist& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(slist& x, slist& y)
+ { x.swap(y); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+
+ void priv_push_front (const T &x)
+ { this->insert_after(this->cbefore_begin(), x); }
+
+ void priv_push_front (BOOST_RV_REF(T) x)
+ { this->insert_after(this->cbefore_begin(), ::boost::move(x)); }
+
+ bool priv_try_shrink(size_type new_size, const_iterator &last_pos)
+ {
+ typename Icont::iterator end_n(this->icont().end()), cur(this->icont().before_begin()), cur_next;
+ while (++(cur_next = cur) != end_n && new_size > 0){
+ --new_size;
+ cur = cur_next;
+ }
+ last_pos = const_iterator(cur);
+ if (cur_next != end_n){
+ this->erase_after(last_pos, const_iterator(end_n));
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+
+ template<class U>
+ iterator priv_insert(const_iterator p, BOOST_FWD_REF(U) x)
+ { return this->insert_after(previous(p), ::boost::forward<U>(x)); }
+
+ template<class U>
+ iterator priv_insert_after(const_iterator prev_p, BOOST_FWD_REF(U) x)
+ { return iterator(this->icont().insert_after(prev_p.get(), *this->create_node(::boost::forward<U>(x)))); }
+
+ class insertion_functor;
+ friend class insertion_functor;
+
+ class insertion_functor
+ {
+ Icont &icont_;
+ typedef typename Icont::iterator iiterator;
+ typedef typename Icont::const_iterator iconst_iterator;
+ const iconst_iterator prev_;
+ iiterator ret_;
+
+ public:
+ insertion_functor(Icont &icont, typename Icont::const_iterator prev)
+ : icont_(icont), prev_(prev), ret_(prev.unconst())
+ {}
+
+ void operator()(Node &n)
+ {
+ ret_ = this->icont_.insert_after(prev_, n);
+ }
+
+ iiterator inserted_first() const
+ { return ret_; }
+ };
+
+ //Functors for member algorithm defaults
+ typedef value_less<value_type> value_less_t;
+ typedef value_equal<value_type> value_equal_t;
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InpIt>
+slist(InpIt, InpIt) ->
+ slist<typename iterator_traits<InpIt>::value_type>;
+
+template <typename InpIt, typename Allocator>
+slist(InpIt, InpIt, Allocator const&) ->
+ slist<typename iterator_traits<InpIt>::value_type, Allocator>;
+
+#endif
+
+}}
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace boost {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class T, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::slist<T, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
+};
+
+namespace container {
+
+}} //namespace boost{ namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+// Specialization of insert_iterator so that insertions will be constant
+// time rather than linear time.
+
+#include <boost/move/detail/std_ns_begin.hpp>
+BOOST_CONTAINER_DOC1ST(namespace std {, BOOST_MOVE_STD_NS_BEG)
+
+//! A specialization of insert_iterator
+//! that works with slist
+template <class T, class Allocator>
+class insert_iterator<boost::container::slist<T, Allocator> >
+{
+ private:
+ typedef boost::container::slist<T, Allocator> Container;
+ Container* container;
+ typename Container::iterator iter;
+
+ public:
+ typedef Container container_type;
+ typedef output_iterator_tag iterator_category;
+ typedef void value_type;
+ typedef void difference_type;
+ typedef void pointer;
+ typedef void reference;
+
+ insert_iterator(Container& x,
+ typename Container::iterator i,
+ bool is_previous = false)
+ : container(&x), iter(is_previous ? i : x.previous(i)){ }
+
+ insert_iterator<Container>&
+ operator=(const typename Container::value_type& value)
+ {
+ iter = container->insert_after(iter, value);
+ return *this;
+ }
+ insert_iterator<Container>& operator*(){ return *this; }
+ insert_iterator<Container>& operator++(){ return *this; }
+ insert_iterator<Container>& operator++(int){ return *this; }
+};
+
+BOOST_CONTAINER_DOC1ST( }, BOOST_MOVE_STD_NS_END)
+#include <boost/move/detail/std_ns_end.hpp>
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_SLIST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/small_vector.hpp b/src/third_party/boost-1.69.0/boost/container/small_vector.hpp
new file mode 100644
index 00000000000..c0edac84dc4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/small_vector.hpp
@@ -0,0 +1,668 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_CONTAINER_SMALL_VECTOR_HPP
+#define BOOST_CONTAINER_CONTAINER_SMALL_VECTOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/vector.hpp>
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+// container/detail
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/version_type.hpp>
+
+//move
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/iterator.hpp>
+
+//move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+
+//std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list> //for std::initializer_list
+#endif
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+template <class T, class Allocator = new_allocator<T> >
+class small_vector_base;
+
+#endif
+
+//! A non-standard allocator used to implement `small_vector`.
+//! Users should never use it directly. It is described here
+//! for documentation purposes.
+//!
+//! This allocator inherits from a standard-conforming allocator
+//! and forwards member functions to the standard allocator except
+//! when internal storage is being used as memory source.
+//!
+//! This allocator is a "partially_propagable" allocator and
+//! defines `is_partially_propagable` as true_type.
+//!
+//! A partially propagable allocator means that not all storage
+//! allocatod by an instance of `small_vector_allocator` can be
+//! deallocated by another instance of this type, even if both
+//! instances compare equal or an instance is propagated to another
+//! one using the copy/move constructor or assignment. The storage that
+//! can never be propagated is identified by `storage_is_unpropagable(p)`.
+//!
+//! `boost::container::vector` supports partially propagable allocators
+//! fallbacking to deep copy/swap/move operations when internal storage
+//! is being used to store vector elements.
+//!
+//! `small_vector_allocator` assumes that will be instantiated as
+//! `boost::container::vector< T, small_vector_allocator<Allocator> >`
+//! and internal storage can be obtained downcasting that vector
+//! to `small_vector_base<T>`.
+template<class Allocator>
+class small_vector_allocator
+ : public Allocator
+{
+ typedef unsigned int allocation_type;
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+
+ BOOST_COPYABLE_AND_MOVABLE(small_vector_allocator)
+
+ BOOST_CONTAINER_FORCEINLINE const Allocator &as_base() const
+ { return static_cast<const Allocator&>(*this); }
+
+ BOOST_CONTAINER_FORCEINLINE Allocator &as_base()
+ { return static_cast<Allocator&>(*this); }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef allocator_traits<Allocator> allocator_traits_type;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ typedef typename allocator_traits<Allocator>::value_type value_type;
+ typedef typename allocator_traits<Allocator>::pointer pointer;
+ typedef typename allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename allocator_traits<Allocator>::reference reference;
+ typedef typename allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename allocator_traits<Allocator>::size_type size_type;
+ typedef typename allocator_traits<Allocator>::difference_type difference_type;
+ typedef typename allocator_traits<Allocator>::void_pointer void_pointer;
+ typedef typename allocator_traits<Allocator>::const_void_pointer const_void_pointer;
+
+ typedef typename allocator_traits<Allocator>::propagate_on_container_copy_assignment propagate_on_container_copy_assignment;
+ typedef typename allocator_traits<Allocator>::propagate_on_container_move_assignment propagate_on_container_move_assignment;
+ typedef typename allocator_traits<Allocator>::propagate_on_container_swap propagate_on_container_swap;
+ //! An integral constant with member `value == false`
+ typedef BOOST_CONTAINER_IMPDEF(dtl::bool_<false>) is_always_equal;
+ //! An integral constant with member `value == true`
+ typedef BOOST_CONTAINER_IMPDEF(dtl::bool_<true>) is_partially_propagable;
+
+ BOOST_CONTAINER_DOCIGN(typedef dtl::version_type<small_vector_allocator BOOST_CONTAINER_I 1> version;)
+
+ //!Obtains an small_vector_allocator that allocates
+ //!objects of type T2
+ template<class T2>
+ struct rebind
+ {
+ typedef typename allocator_traits<Allocator>::template rebind_alloc<T2>::type other;
+ };
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //!Constructor from arbitrary arguments
+ template<class ...Args>
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector_allocator(BOOST_FWD_REF(Args) ...args)
+ : Allocator(::boost::forward<Args>(args)...)
+ {}
+ #else
+ #define BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector_allocator(BOOST_MOVE_UREF##N)\
+ : Allocator(BOOST_MOVE_FWD##N)\
+ {}\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE)
+ #undef BOOST_CONTAINER_SMALL_VECTOR_ALLOCATOR_CTOR_CODE
+ #endif
+
+ //!Constructor from other small_vector_allocator.
+ //!Never throws
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator
+ (const small_vector_allocator &other) BOOST_NOEXCEPT_OR_NOTHROW
+ : Allocator(other.as_base())
+ {}
+
+ //!Move constructor from small_vector_allocator.
+ //!Never throws
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator
+ (BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW
+ : Allocator(::boost::move(other.as_base()))
+ {}
+
+ //!Constructor from related small_vector_allocator.
+ //!Never throws
+ template<class OtherAllocator>
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator
+ (const small_vector_allocator<OtherAllocator> &other) BOOST_NOEXCEPT_OR_NOTHROW
+ : Allocator(other.as_base())
+ {}
+
+ //!Move constructor from related small_vector_allocator.
+ //!Never throws
+ template<class OtherAllocator>
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator
+ (BOOST_RV_REF(small_vector_allocator<OtherAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
+ : Allocator(::boost::move(other.as_base()))
+ {}
+
+ //!Assignment from other small_vector_allocator.
+ //!Never throws
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
+ operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW
+ { return static_cast<small_vector_allocator&>(this->Allocator::operator=(other.as_base())); }
+
+ //!Move constructor from other small_vector_allocator.
+ //!Never throws
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
+ operator=(BOOST_RV_REF(small_vector_allocator) other) BOOST_NOEXCEPT_OR_NOTHROW
+ { return static_cast<small_vector_allocator&>(this->Allocator::operator=(::boost::move(other.as_base()))); }
+
+ //!Assignment from related small_vector_allocator.
+ //!Never throws
+ template<class OtherAllocator>
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
+ operator=(BOOST_COPY_ASSIGN_REF(small_vector_allocator<OtherAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
+ { return static_cast<small_vector_allocator&>(this->Allocator::operator=(other.as_base())); }
+
+ //!Move assignment from related small_vector_allocator.
+ //!Never throws
+ template<class OtherAllocator>
+ BOOST_CONTAINER_FORCEINLINE small_vector_allocator &
+ operator=(BOOST_RV_REF(small_vector_allocator<OtherAllocator>) other) BOOST_NOEXCEPT_OR_NOTHROW
+ { return static_cast<small_vector_allocator&>(this->Allocator::operator=(::boost::move(other.as_base()))); }
+
+ //!Allocates storage from the standard-conforming allocator
+ BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type count, const_void_pointer hint = const_void_pointer())
+ { return allocator_traits_type::allocate(this->as_base(), count, hint); }
+
+ //!Deallocates previously allocated memory.
+ //!Never throws
+ void deallocate(pointer ptr, size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if(!this->is_internal_storage(ptr))
+ allocator_traits_type::deallocate(this->as_base(), ptr, n);
+ }
+
+ //!Returns the maximum number of elements that could be allocated.
+ //!Never throws
+ BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return allocator_traits_type::max_size(this->as_base()); }
+
+ small_vector_allocator select_on_container_copy_construction() const
+ { return small_vector_allocator(allocator_traits_type::select_on_container_copy_construction(this->as_base())); }
+
+ bool storage_is_unpropagable(pointer p) const
+ { return this->is_internal_storage(p) || allocator_traits_type::storage_is_unpropagable(this->as_base(), p); }
+
+ //!Swaps two allocators, does nothing
+ //!because this small_vector_allocator is stateless
+ BOOST_CONTAINER_FORCEINLINE friend void swap(small_vector_allocator &l, small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW
+ { boost::adl_move_swap(l.as_base(), r.as_base()); }
+
+ //!An small_vector_allocator always compares to true, as memory allocated with one
+ //!instance can be deallocated by another instance (except for unpropagable storage)
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return allocator_traits_type::equal(l.as_base(), r.as_base()); }
+
+ //!An small_vector_allocator always compares to false, as memory allocated with one
+ //!instance can be deallocated by another instance
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const small_vector_allocator &l, const small_vector_allocator &r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return !(l == r); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ /*
+ //!An advanced function that offers in-place expansion shrink to fit and new allocation
+ //!capabilities. Memory allocated with this function can only be deallocated with deallocate()
+ //!or deallocate_many().
+ //!This function is available only with Version == 2
+ pointer allocation_command(allocation_type command,
+ size_type limit_size,
+ size_type &prefer_in_recvd_out_size,
+ pointer &reuse)
+ { return allocator_traits_type::allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse); }
+
+ //!Returns maximum the number of objects the previously allocated memory
+ //!pointed by p can hold.
+ //!Memory must not have been allocated with
+ //!allocate_one or allocate_individual.
+ //!This function is available only with Version == 2
+ size_type size(pointer p) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return allocator_traits_type::size(p); }
+ */
+ private:
+ /*
+ //!Allocates just one object. Memory allocated with this function
+ //!must be deallocated only with deallocate_one().
+ //!Throws bad_alloc if there is no enough memory
+ //!This function is available only with Version == 2
+ using Allocator::allocate_one;
+ using Allocator::allocate_individual;
+ using Allocator::deallocate_one;
+ using Allocator::deallocate_individual;
+ using Allocator::allocate_many;
+ using Allocator::deallocate_many;*/
+
+ BOOST_CONTAINER_FORCEINLINE bool is_internal_storage(const_pointer p) const
+ { return this->internal_storage() == p; }
+
+ BOOST_CONTAINER_FORCEINLINE
+ const_pointer internal_storage() const
+ {
+ typedef typename Allocator::value_type value_type;
+ typedef typename allocator_traits_type::size_type size_type;
+ typedef vector_alloc_holder< small_vector_allocator<Allocator>, size_type > vector_alloc_holder_t;
+ typedef vector<value_type, small_vector_allocator<Allocator> > vector_base;
+ typedef small_vector_base<value_type, Allocator> derived_type;
+ //
+ const vector_alloc_holder_t &v_holder = static_cast<const vector_alloc_holder_t &>(*this);
+ const vector_base &v_base = reinterpret_cast<const vector_base &>(v_holder);
+ const derived_type &d_base = static_cast<const derived_type &>(v_base);
+ return d_base.internal_storage();
+ }
+
+ BOOST_CONTAINER_FORCEINLINE
+ pointer internal_storage()
+ {
+ typedef typename Allocator::value_type value_type;
+ typedef typename allocator_traits_type::size_type size_type;
+ typedef vector_alloc_holder< small_vector_allocator<Allocator>, size_type > vector_alloc_holder_t;
+ typedef vector<value_type, small_vector_allocator<Allocator> > vector_base;
+ typedef small_vector_base<value_type, Allocator> derived_type;
+ //
+ vector_alloc_holder_t &v_holder = static_cast<vector_alloc_holder_t &>(*this);
+ vector_base &v_base = reinterpret_cast<vector_base &>(v_holder);
+ derived_type &d_base = static_cast<derived_type &>(v_base);
+ return d_base.internal_storage();
+ }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+//! This class consists of common code from all small_vector<T, N> types that don't depend on the
+//! "N" template parameter. This class is non-copyable and non-destructible, so this class typically
+//! used as reference argument to functions that read or write small vectors. Since `small_vector<T, N>`
+//! derives from `small_vector_base<T>`, the conversion to `small_vector_base` is implicit
+//! <pre>
+//!
+//! //Clients can pass any small_vector<Foo, N>.
+//! void read_any_small_vector_of_foo(const small_vector_base<Foo> &in_parameter);
+//!
+//! void modify_any_small_vector_of_foo(small_vector_base<Foo> &in_out_parameter);
+//!
+//! void some_function()
+//! {
+//!
+//! small_vector<Foo, 8> myvector;
+//!
+//! read_any_small_vector_of_foo(myvector); // Reads myvector
+//!
+//! modify_any_small_vector_of_foo(myvector); // Modifies myvector
+//!
+//! }
+//! </pre>
+//!
+//! All `boost::container:vector` member functions are inherited. See `vector` documentation for details.
+//!
+template <class T, class SecondaryAllocator>
+class small_vector_base
+ : public vector<T, small_vector_allocator<SecondaryAllocator> >
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ public:
+ //Make it public as it will be inherited by small_vector and container
+ //must have this public member
+ typedef typename allocator_traits<SecondaryAllocator>::pointer pointer;
+ typedef typename allocator_traits<SecondaryAllocator>::const_pointer const_pointer;
+ typedef typename allocator_traits<SecondaryAllocator>::void_pointer void_pointer;
+ typedef typename allocator_traits<SecondaryAllocator>::const_void_pointer const_void_pointer;
+
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(small_vector_base)
+
+ friend class small_vector_allocator<SecondaryAllocator>;
+
+ BOOST_CONTAINER_FORCEINLINE
+ const_pointer internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ typedef typename boost::intrusive::pointer_traits<const_pointer>::template
+ rebind_pointer<const unsigned char>::type const_char_pointer;
+ const_void_pointer void_p = boost::intrusive::pointer_traits<const_char_pointer>::
+ pointer_to(*m_storage_start.data);
+ return boost::intrusive::pointer_traits<const_pointer>::static_cast_from(void_p);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE
+ pointer internal_storage() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ typedef typename boost::intrusive::pointer_traits<pointer>::template
+ rebind_pointer<unsigned char>::type char_pointer;
+ void_pointer void_p = boost::intrusive::pointer_traits<char_pointer>::
+ pointer_to(*m_storage_start.data);
+ return boost::intrusive::pointer_traits<pointer>::static_cast_from(void_p);
+ }
+
+ typedef vector<T, small_vector_allocator<SecondaryAllocator> > base_type;
+ base_type &as_base() { return static_cast<base_type&>(*this); }
+ const base_type &as_base() const { return static_cast<const base_type&>(*this); }
+
+ public:
+ typedef typename dtl::aligned_storage
+ <sizeof(T), dtl::alignment_of<T>::value>::type storage_type;
+ typedef small_vector_allocator<SecondaryAllocator> allocator_type;
+
+ protected:
+
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t initial_capacity)
+ : base_type(initial_capacity_t(), this->internal_storage(), initial_capacity)
+ {}
+
+ template<class AllocFwd>
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector_base(initial_capacity_t, std::size_t capacity, BOOST_FWD_REF(AllocFwd) a)
+ : base_type(initial_capacity_t(), this->internal_storage(), capacity, ::boost::forward<AllocFwd>(a))
+ {}
+
+ //~small_vector_base(){}
+
+ private:
+ //The only member
+ storage_type m_storage_start;
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ BOOST_CONTAINER_FORCEINLINE small_vector_base& operator=(BOOST_COPY_ASSIGN_REF(small_vector_base) other)
+ { return static_cast<small_vector_base&>(this->base_type::operator=(static_cast<base_type const&>(other))); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector_base& operator=(BOOST_RV_REF(small_vector_base) other)
+ { return static_cast<small_vector_base&>(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); }
+
+ BOOST_CONTAINER_FORCEINLINE void swap(small_vector_base &other)
+ { return this->base_type::swap(other); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ protected:
+ void move_construct_impl(base_type &x, const allocator_type &a)
+ {
+ if(base_type::is_propagable_from(x.get_stored_allocator(), x.data(), a, true)){
+ this->steal_resources(x);
+ }
+ else{
+ this->assign( boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.begin()))
+ , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.end ()))
+ );
+ }
+ }
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+/////////////////////////////////////////////////////
+//
+// small_vector_storage_calculator
+//
+/////////////////////////////////////////////////////
+template<std::size_t Needed, std::size_t Hdr, std::size_t SSize, bool NeedsZero = (0u == Needed || Needed <= Hdr)>
+struct small_vector_storage_calculator_helper
+{
+ static const std::size_t value = (Needed - Hdr - 1u)/SSize + 1u;
+};
+
+template<std::size_t Needed, std::size_t Hdr, std::size_t SSize>
+struct small_vector_storage_calculator_helper<Needed, Hdr, SSize, true>
+{
+ static const std::size_t value = 0u;
+};
+
+template<class Storage, class Allocator, class T, std::size_t N>
+struct small_vector_storage_calculator
+{
+ typedef small_vector_base<T, Allocator> svh_type;
+ typedef vector<T, small_vector_allocator<Allocator> > svhb_type;
+ static const std::size_t s_align = dtl::alignment_of<Storage>::value;
+ static const std::size_t s_size = sizeof(Storage);
+ static const std::size_t svh_sizeof = sizeof(svh_type);
+ static const std::size_t svhb_sizeof = sizeof(svhb_type);
+ static const std::size_t s_start = ((svhb_sizeof-1)/s_align+1)*s_align;
+ static const std::size_t header_bytes = svh_sizeof-s_start;
+ static const std::size_t needed_bytes = sizeof(T)*N;
+ static const std::size_t needed_extra_storages =
+ small_vector_storage_calculator_helper<needed_bytes, header_bytes, s_size>::value;
+};
+
+/////////////////////////////////////////////////////
+//
+// small_vector_storage_definer
+//
+/////////////////////////////////////////////////////
+template<class Storage, std::size_t N>
+struct small_vector_storage
+{
+ Storage m_rest_of_storage[N];
+};
+
+template<class Storage>
+struct small_vector_storage<Storage, 0>
+{};
+
+template<class Allocator, std::size_t N>
+struct small_vector_storage_definer
+{
+ typedef typename Allocator::value_type value_type;
+ typedef typename small_vector_base<value_type, Allocator>::storage_type storage_type;
+ static const std::size_t needed_extra_storages =
+ small_vector_storage_calculator<storage_type, Allocator, value_type, N>::needed_extra_storages;
+ typedef small_vector_storage<storage_type, needed_extra_storages> type;
+};
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! small_vector is a vector-like container optimized for the case when it contains few elements.
+//! It contains some preallocated elements in-place, which can avoid the use of dynamic storage allocation
+//! when the actual number of elements is below that preallocated threshold.
+//!
+//! `small_vector<T, N, Allocator>` is convertible to `small_vector_base<T, Allocator>` that is independent
+//! from the preallocated element capacity, so client code does not need to be templated on that N argument.
+//!
+//! All `boost::container::vector` member functions are inherited. See `vector` documentation for details.
+//!
+//! \tparam T The type of object that is stored in the small_vector
+//! \tparam N The number of preallocated elements stored inside small_vector. It shall be less than Allocator::max_size();
+//! \tparam Allocator The allocator used for memory management when the number of elements exceeds N.
+template <class T, std::size_t N, class Allocator BOOST_CONTAINER_DOCONLY(= new_allocator<T>) >
+class small_vector : public small_vector_base<T, Allocator>
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ , private small_vector_storage_definer<Allocator, N>::type
+ #endif
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef small_vector_base<T, Allocator> base_type;
+ typedef typename small_vector_storage_definer<Allocator, N>::type remaining_storage_holder;
+
+ BOOST_COPYABLE_AND_MOVABLE(small_vector)
+
+ typedef allocator_traits<typename base_type::allocator_type> allocator_traits_type;
+
+ public:
+ typedef small_vector_storage_calculator< typename small_vector_base<T, Allocator>
+ ::storage_type, Allocator, T, N> storage_test;
+
+ static const std::size_t needed_extra_storages = storage_test::needed_extra_storages;
+ static const std::size_t needed_bytes = storage_test::needed_bytes;
+ static const std::size_t header_bytes = storage_test::header_bytes;
+ static const std::size_t s_start = storage_test::s_start;
+
+ typedef typename base_type::allocator_type allocator_type;
+ typedef typename base_type::size_type size_type;
+ typedef typename base_type::value_type value_type;
+
+ BOOST_CONTAINER_FORCEINLINE static std::size_t internal_capacity()
+ { return (sizeof(small_vector) - storage_test::s_start)/sizeof(T); }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //! @brief The capacity/max size of the container
+ static const size_type static_capacity = N;
+
+ public:
+ BOOST_CONTAINER_FORCEINLINE small_vector()
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : base_type(initial_capacity_t(), internal_capacity())
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector(const allocator_type &a)
+ : base_type(initial_capacity_t(), internal_capacity(), a)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector(size_type n)
+ : base_type(initial_capacity_t(), internal_capacity())
+ { this->resize(n); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const allocator_type &a)
+ : base_type(initial_capacity_t(), internal_capacity(), a)
+ { this->resize(n); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t)
+ : base_type(initial_capacity_t(), internal_capacity())
+ { this->resize(n, default_init_t()); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, default_init_t, const allocator_type &a)
+ : base_type(initial_capacity_t(), internal_capacity(), a)
+ { this->resize(n, default_init_t()); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v)
+ : base_type(initial_capacity_t(), internal_capacity())
+ { this->resize(n, v); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(size_type n, const value_type &v, const allocator_type &a)
+ : base_type(initial_capacity_t(), internal_capacity(), a)
+ { this->resize(n, v); }
+
+ template <class InIt>
+ BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last
+ BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
+ < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
+ BOOST_MOVE_I dtl::nat >::type * = 0)
+ )
+ : base_type(initial_capacity_t(), internal_capacity())
+ { this->assign(first, last); }
+
+ template <class InIt>
+ BOOST_CONTAINER_FORCEINLINE small_vector(InIt first, InIt last, const allocator_type& a
+ BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
+ < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
+ BOOST_MOVE_I dtl::nat >::type * = 0)
+ )
+ : base_type(initial_capacity_t(), internal_capacity(), a)
+ { this->assign(first, last); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(const small_vector &other)
+ : base_type( initial_capacity_t(), internal_capacity()
+ , allocator_traits_type::select_on_container_copy_construction(other.get_stored_allocator()))
+ { this->assign(other.cbegin(), other.cend()); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(const small_vector &other, const allocator_type &a)
+ : base_type(initial_capacity_t(), internal_capacity(), a)
+ { this->assign(other.cbegin(), other.cend()); }
+
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector(const base_type &other)
+ : base_type( initial_capacity_t(), internal_capacity()
+ , allocator_traits_type::select_on_container_copy_construction(other.get_stored_allocator()))
+ { this->assign(other.cbegin(), other.cend()); }
+
+ BOOST_CONTAINER_FORCEINLINE explicit small_vector(BOOST_RV_REF(base_type) other)
+ : base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
+ { this->move_construct_impl(other, other.get_stored_allocator()); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable<value_type>::value)
+ : base_type(initial_capacity_t(), internal_capacity(), ::boost::move(other.get_stored_allocator()))
+ { this->move_construct_impl(other, other.get_stored_allocator()); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector(BOOST_RV_REF(small_vector) other, const allocator_type &a)
+ : base_type(initial_capacity_t(), internal_capacity(), a)
+ { this->move_construct_impl(other, a); }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ BOOST_CONTAINER_FORCEINLINE small_vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
+ : base_type(initial_capacity_t(), internal_capacity(), a)
+ {
+ this->assign(il.begin(), il.end());
+ }
+ #endif
+
+ BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_COPY_ASSIGN_REF(small_vector) other)
+ { return static_cast<small_vector&>(this->base_type::operator=(static_cast<base_type const&>(other))); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(small_vector) other)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable<value_type>::value
+ && (allocator_traits_type::propagate_on_container_move_assignment::value
+ || allocator_traits_type::is_always_equal::value))
+ { return static_cast<small_vector&>(this->base_type::operator=(BOOST_MOVE_BASE(base_type, other))); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector& operator=(const base_type &other)
+ { return static_cast<small_vector&>(this->base_type::operator=(other)); }
+
+ BOOST_CONTAINER_FORCEINLINE small_vector& operator=(BOOST_RV_REF(base_type) other)
+ { return static_cast<small_vector&>(this->base_type::operator=(boost::move(other))); }
+
+ BOOST_CONTAINER_FORCEINLINE void swap(small_vector &other)
+ { return this->base_type::swap(other); }
+};
+
+}}
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+/*
+namespace boost {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class T, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
+};
+
+}
+*/
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // #ifndef BOOST_CONTAINER_CONTAINER_SMALL_VECTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/stable_vector.hpp b/src/third_party/boost-1.69.0/boost/container/stable_vector.hpp
new file mode 100644
index 00000000000..1f55c435adb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/stable_vector.hpp
@@ -0,0 +1,2181 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2008-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+// Stable vector.
+//
+// Copyright 2008 Joaquin M Lopez Munoz.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_STABLE_VECTOR_HPP
+#define BOOST_CONTAINER_STABLE_VECTOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+#include <boost/container/throw_exception.hpp>
+// container/detail
+#include <boost/container/detail/addressof.hpp>
+#include <boost/container/detail/algorithm.hpp> //algo_equal(), algo_lexicographical_compare
+#include <boost/container/detail/alloc_helpers.hpp>
+#include <boost/container/detail/allocator_version_traits.hpp>
+#include <boost/container/detail/construct_in_place.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/container/detail/placement_new.hpp>
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/container/detail/type_traits.hpp>
+// intrusive
+#include <boost/intrusive/pointer_traits.hpp>
+// intrusive/detail
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //pair
+// move
+#include <boost/move/utility_core.hpp>
+#include <boost/move/iterator.hpp>
+#include <boost/move/adl_move_swap.hpp>
+// move/detail
+#include <boost/move/detail/move_helpers.hpp>
+// other
+#include <boost/assert.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+// std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ #include <boost/container/vector.hpp>
+ //#define STABLE_VECTOR_ENABLE_INVARIANT_CHECKING
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace stable_vector_detail{
+
+template <class C>
+class clear_on_destroy
+{
+ public:
+ clear_on_destroy(C &c)
+ : c_(c), do_clear_(true)
+ {}
+
+ void release()
+ { do_clear_ = false; }
+
+ ~clear_on_destroy()
+ {
+ if(do_clear_){
+ c_.clear();
+ c_.priv_clear_pool();
+ }
+ }
+
+ private:
+ clear_on_destroy(const clear_on_destroy &);
+ clear_on_destroy &operator=(const clear_on_destroy &);
+ C &c_;
+ bool do_clear_;
+};
+
+template<typename Pointer>
+struct node;
+
+template<class VoidPtr>
+struct node_base
+{
+ private:
+ typedef typename boost::intrusive::
+ pointer_traits<VoidPtr> void_ptr_traits;
+ typedef typename void_ptr_traits::
+ template rebind_pointer
+ <node_base>::type node_base_ptr;
+
+ public:
+ typedef typename void_ptr_traits::
+ template rebind_pointer
+ <node_base_ptr>::type node_base_ptr_ptr;
+
+ public:
+ explicit node_base(const node_base_ptr_ptr &n)
+ : up(n)
+ {}
+
+ node_base()
+ : up()
+ {}
+
+ node_base_ptr_ptr up;
+};
+
+
+template<typename Pointer>
+struct node
+ : public node_base
+ <typename ::boost::intrusive::pointer_traits<Pointer>::template
+ rebind_pointer<void>::type
+ >
+{
+ public:
+ typedef typename ::boost::intrusive::pointer_traits<Pointer>::element_type T;
+ typedef node_base
+ <typename ::boost::intrusive::pointer_traits<Pointer>::template
+ rebind_pointer<void>::type
+ > hook_type;
+
+ typedef typename boost::container::dtl::aligned_storage
+ <sizeof(T), boost::container::dtl::alignment_of<T>::value>::type storage_t;
+ storage_t m_storage;
+
+ BOOST_CONTAINER_FORCEINLINE explicit node(const typename hook_type::node_base_ptr_ptr &n)
+ : hook_type(n)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE node()
+ {}
+
+ #if defined(BOOST_GCC) && (BOOST_GCC >= 40600) && (BOOST_GCC < 80000)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wstrict-aliasing"
+ #define BOOST_CONTAINER_DISABLE_ALIASING_WARNING
+ # endif
+
+ BOOST_CONTAINER_FORCEINLINE T &get_data()
+ { return *reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const T &get_data() const
+ { return *reinterpret_cast<const T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE T *get_data_ptr()
+ { return reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE const T *get_data_ptr() const
+ { return reinterpret_cast<T*>(this->m_storage.data); }
+
+ BOOST_CONTAINER_FORCEINLINE ~node()
+ { reinterpret_cast<T*>(this->m_storage.data)->~T(); }
+
+ #if defined(BOOST_CONTAINER_DISABLE_ALIASING_WARNING)
+ #pragma GCC diagnostic pop
+ #undef BOOST_CONTAINER_DISABLE_ALIASING_WARNING
+ # endif
+
+ BOOST_CONTAINER_FORCEINLINE void destroy_header()
+ { static_cast<hook_type*>(this)->~hook_type(); }
+};
+
+template<class VoidPtr, class VoidAllocator>
+struct index_traits
+{
+ typedef boost::intrusive::
+ pointer_traits
+ <VoidPtr> void_ptr_traits;
+ typedef stable_vector_detail::
+ node_base<VoidPtr> node_base_type;
+ typedef typename void_ptr_traits::template
+ rebind_pointer<node_base_type>::type node_base_ptr;
+ typedef typename void_ptr_traits::template
+ rebind_pointer<node_base_ptr>::type node_base_ptr_ptr;
+ typedef boost::intrusive::
+ pointer_traits<node_base_ptr> node_base_ptr_traits;
+ typedef boost::intrusive::
+ pointer_traits<node_base_ptr_ptr> node_base_ptr_ptr_traits;
+ typedef typename allocator_traits<VoidAllocator>::
+ template portable_rebind_alloc
+ <node_base_ptr>::type node_base_ptr_allocator;
+ typedef ::boost::container::vector
+ <node_base_ptr, node_base_ptr_allocator> index_type;
+ typedef typename index_type::iterator index_iterator;
+ typedef typename index_type::const_iterator const_index_iterator;
+ typedef typename index_type::size_type size_type;
+
+ static const size_type ExtraPointers = 3;
+ //Stable vector stores metadata at the end of the index (node_base_ptr vector) with additional 3 pointers:
+ // back() is this->index.back() - ExtraPointers;
+ // end node index is *(this->index.end() - 3)
+ // Node cache first is *(this->index.end() - 2);
+ // Node cache last is this->index.back();
+
+ static node_base_ptr_ptr ptr_to_node_base_ptr(node_base_ptr &n)
+ { return node_base_ptr_ptr_traits::pointer_to(n); }
+
+ static void fix_up_pointers(index_iterator first, index_iterator last)
+ {
+ while(first != last){
+ typedef typename index_type::reference node_base_ptr_ref;
+ node_base_ptr_ref nbp = *first;
+ nbp->up = index_traits::ptr_to_node_base_ptr(nbp);
+ ++first;
+ }
+ }
+
+ static index_iterator get_fix_up_end(index_type &index)
+ { return index.end() - (ExtraPointers - 1); }
+
+ static void fix_up_pointers_from(index_type & index, index_iterator first)
+ { index_traits::fix_up_pointers(first, index_traits::get_fix_up_end(index)); }
+
+ static void readjust_end_node(index_type &index, node_base_type &end_node)
+ {
+ if(!index.empty()){
+ index_iterator end_node_it(index_traits::get_fix_up_end(index));
+ node_base_ptr &end_node_idx_ref = *(--end_node_it);
+ end_node_idx_ref = node_base_ptr_traits::pointer_to(end_node);
+ end_node.up = node_base_ptr_ptr_traits::pointer_to(end_node_idx_ref);
+ }
+ else{
+ end_node.up = node_base_ptr_ptr();
+ }
+ }
+
+ static void initialize_end_node(index_type &index, node_base_type &end_node, const size_type index_capacity_if_empty)
+ {
+ if(index.empty()){
+ index.reserve(index_capacity_if_empty + ExtraPointers);
+ index.resize(ExtraPointers);
+ node_base_ptr &end_node_ref = *index.data();
+ end_node_ref = node_base_ptr_traits::pointer_to(end_node);
+ end_node.up = index_traits::ptr_to_node_base_ptr(end_node_ref);
+ }
+ }
+
+ #ifdef STABLE_VECTOR_ENABLE_INVARIANT_CHECKING
+ static bool invariants(index_type &index)
+ {
+ for( index_iterator it = index.begin()
+ , it_end = index_traits::get_fix_up_end(index)
+ ; it != it_end
+ ; ++it){
+ if((*it)->up != index_traits::ptr_to_node_base_ptr(*it)){
+ return false;
+ }
+ }
+ return true;
+ }
+ #endif //STABLE_VECTOR_ENABLE_INVARIANT_CHECKING
+};
+
+} //namespace stable_vector_detail
+
+template<typename Pointer, bool IsConst>
+class stable_vector_iterator
+{
+ typedef boost::intrusive::pointer_traits<Pointer> non_const_ptr_traits;
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef typename non_const_ptr_traits::element_type value_type;
+ typedef typename non_const_ptr_traits::difference_type difference_type;
+ typedef typename ::boost::container::dtl::if_c
+ < IsConst
+ , typename non_const_ptr_traits::template
+ rebind_pointer<const value_type>::type
+ , Pointer
+ >::type pointer;
+ typedef boost::intrusive::pointer_traits<pointer> ptr_traits;
+ typedef typename ptr_traits::reference reference;
+
+ private:
+ typedef typename non_const_ptr_traits::template
+ rebind_pointer<void>::type void_ptr;
+ typedef stable_vector_detail::node<Pointer> node_type;
+ typedef stable_vector_detail::node_base<void_ptr> node_base_type;
+ typedef typename non_const_ptr_traits::template
+ rebind_pointer<node_type>::type node_ptr;
+ typedef boost::intrusive::
+ pointer_traits<node_ptr> node_ptr_traits;
+ typedef typename non_const_ptr_traits::template
+ rebind_pointer<node_base_type>::type node_base_ptr;
+ typedef typename non_const_ptr_traits::template
+ rebind_pointer<node_base_ptr>::type node_base_ptr_ptr;
+
+ node_base_ptr m_pn;
+
+ public:
+
+ explicit stable_vector_iterator(node_base_ptr p) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_pn(p)
+ {}
+
+ stable_vector_iterator() BOOST_NOEXCEPT_OR_NOTHROW
+ : m_pn() //Value initialization to achieve "null iterators" (N3644)
+ {}
+
+ stable_vector_iterator(stable_vector_iterator<Pointer, false> const& other) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_pn(other.node_pointer())
+ {}
+
+ node_ptr node_pointer() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return node_ptr_traits::static_cast_from(m_pn); }
+
+ public:
+ //Pointer like operators
+ reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return node_pointer()->get_data(); }
+
+ pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return ptr_traits::pointer_to(this->operator*()); }
+
+ //Increment / Decrement
+ stable_vector_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ node_base_ptr_ptr p(this->m_pn->up);
+ this->m_pn = *(++p);
+ return *this;
+ }
+
+ stable_vector_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
+ { stable_vector_iterator tmp(*this); ++*this; return stable_vector_iterator(tmp); }
+
+ stable_vector_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ node_base_ptr_ptr p(this->m_pn->up);
+ this->m_pn = *(--p);
+ return *this;
+ }
+
+ stable_vector_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
+ { stable_vector_iterator tmp(*this); --*this; return stable_vector_iterator(tmp); }
+
+ reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return node_ptr_traits::static_cast_from(this->m_pn->up[off])->get_data(); }
+
+ stable_vector_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if(off) this->m_pn = this->m_pn->up[off];
+ return *this;
+ }
+
+ friend stable_vector_iterator operator+(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ stable_vector_iterator tmp(left);
+ tmp += off;
+ return tmp;
+ }
+
+ friend stable_vector_iterator operator+(difference_type off, const stable_vector_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ stable_vector_iterator tmp(right);
+ tmp += off;
+ return tmp;
+ }
+
+ stable_vector_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ { *this += -off; return *this; }
+
+ friend stable_vector_iterator operator-(const stable_vector_iterator &left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ stable_vector_iterator tmp(left);
+ tmp -= off;
+ return tmp;
+ }
+
+ friend difference_type operator-(const stable_vector_iterator &left, const stable_vector_iterator &right) BOOST_NOEXCEPT_OR_NOTHROW
+ { return left.m_pn->up - right.m_pn->up; }
+
+ //Comparison operators
+ friend bool operator== (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_pn == r.m_pn; }
+
+ friend bool operator!= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_pn != r.m_pn; }
+
+ friend bool operator< (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_pn->up < r.m_pn->up; }
+
+ friend bool operator<= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_pn->up <= r.m_pn->up; }
+
+ friend bool operator> (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_pn->up > r.m_pn->up; }
+
+ friend bool operator>= (const stable_vector_iterator& l, const stable_vector_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_pn->up >= r.m_pn->up; }
+};
+
+ #if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING)
+
+ #define STABLE_VECTOR_CHECK_INVARIANT \
+ invariant_checker BOOST_JOIN(check_invariant_,__LINE__)(*this); \
+ BOOST_JOIN(check_invariant_,__LINE__).touch();
+
+ #else //STABLE_VECTOR_ENABLE_INVARIANT_CHECKING
+
+ #define STABLE_VECTOR_CHECK_INVARIANT
+
+ #endif //#if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING)
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! Originally developed by Joaquin M. Lopez Munoz, stable_vector is a std::vector
+//! drop-in replacement implemented as a node container, offering iterator and reference
+//! stability.
+//!
+//! Here are the details taken from the author's blog
+//! (<a href="http://bannalia.blogspot.com/2008/09/introducing-stablevector.html" >
+//! Introducing stable_vector</a>):
+//!
+//! We present stable_vector, a fully STL-compliant stable container that provides
+//! most of the features of std::vector except element contiguity.
+//!
+//! General properties: stable_vector satisfies all the requirements of a container,
+//! a reversible container and a sequence and provides all the optional operations
+//! present in std::vector. Like std::vector, iterators are random access.
+//! stable_vector does not provide element contiguity; in exchange for this absence,
+//! the container is stable, i.e. references and iterators to an element of a stable_vector
+//! remain valid as long as the element is not erased, and an iterator that has been
+//! assigned the return value of end() always remain valid until the destruction of
+//! the associated stable_vector.
+//!
+//! Operation complexity: The big-O complexities of stable_vector operations match
+//! exactly those of std::vector. In general, insertion/deletion is constant time at
+//! the end of the sequence and linear elsewhere. Unlike std::vector, stable_vector
+//! does not internally perform any value_type destruction, copy or assignment
+//! operations other than those exactly corresponding to the insertion of new
+//! elements or deletion of stored elements, which can sometimes compensate in terms
+//! of performance for the extra burden of doing more pointer manipulation and an
+//! additional allocation per element.
+//!
+//! Exception safety: As stable_vector does not internally copy elements around, some
+//! operations provide stronger exception safety guarantees than in std::vector.
+//!
+//! \tparam T The type of object that is stored in the stable_vector
+//! \tparam Allocator The allocator used for all internal memory management
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class T, class Allocator = new_allocator<T> >
+#else
+template <class T, class Allocator>
+#endif
+class stable_vector
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef allocator_traits<Allocator> allocator_traits_type;
+ typedef boost::intrusive::
+ pointer_traits
+ <typename allocator_traits_type::pointer> ptr_traits;
+ typedef typename ptr_traits::
+ template rebind_pointer<void>::type void_ptr;
+ typedef typename allocator_traits_type::
+ template portable_rebind_alloc
+ <void>::type void_allocator_type;
+ typedef stable_vector_detail::index_traits
+ <void_ptr, void_allocator_type> index_traits_type;
+ typedef typename index_traits_type::node_base_type node_base_type;
+ typedef typename index_traits_type::node_base_ptr node_base_ptr;
+ typedef typename index_traits_type::
+ node_base_ptr_ptr node_base_ptr_ptr;
+ typedef typename index_traits_type::
+ node_base_ptr_traits node_base_ptr_traits;
+ typedef typename index_traits_type::
+ node_base_ptr_ptr_traits node_base_ptr_ptr_traits;
+ typedef typename index_traits_type::index_type index_type;
+ typedef typename index_traits_type::index_iterator index_iterator;
+ typedef typename index_traits_type::
+ const_index_iterator const_index_iterator;
+ typedef stable_vector_detail::node
+ <typename ptr_traits::pointer> node_type;
+ typedef typename ptr_traits::template
+ rebind_pointer<node_type>::type node_ptr;
+ typedef boost::intrusive::
+ pointer_traits<node_ptr> node_ptr_traits;
+ typedef typename ptr_traits::template
+ rebind_pointer<const node_type>::type const_node_ptr;
+ typedef boost::intrusive::
+ pointer_traits<const_node_ptr> const_node_ptr_traits;
+ typedef typename node_ptr_traits::reference node_reference;
+ typedef typename const_node_ptr_traits::reference const_node_reference;
+
+ typedef ::boost::container::dtl::integral_constant
+ <unsigned, boost::container::dtl::
+ version<Allocator>::value> alloc_version;
+ typedef typename allocator_traits_type::
+ template portable_rebind_alloc
+ <node_type>::type node_allocator_type;
+
+ typedef ::boost::container::dtl::
+ allocator_version_traits<node_allocator_type> allocator_version_traits_t;
+ typedef typename allocator_version_traits_t::multiallocation_chain multiallocation_chain;
+
+ node_ptr allocate_one()
+ { return allocator_version_traits_t::allocate_one(this->priv_node_alloc()); }
+
+ void deallocate_one(const node_ptr &p)
+ { allocator_version_traits_t::deallocate_one(this->priv_node_alloc(), p); }
+
+ void allocate_individual(typename allocator_traits_type::size_type n, multiallocation_chain &m)
+ { allocator_version_traits_t::allocate_individual(this->priv_node_alloc(), n, m); }
+
+ void deallocate_individual(multiallocation_chain &holder)
+ { allocator_version_traits_t::deallocate_individual(this->priv_node_alloc(), holder); }
+
+ friend class stable_vector_detail::clear_on_destroy<stable_vector>;
+ typedef stable_vector_iterator
+ < typename allocator_traits<Allocator>::pointer
+ , false> iterator_impl;
+ typedef stable_vector_iterator
+ < typename allocator_traits<Allocator>::pointer
+ , true> const_iterator_impl;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ public:
+
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef T value_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef node_allocator_type stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
+ typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(stable_vector)
+ static const size_type ExtraPointers = index_traits_type::ExtraPointers;
+
+ class insert_rollback;
+ friend class insert_rollback;
+
+ class push_back_rollback;
+ friend class push_back_rollback;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Default constructs a stable_vector.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ stable_vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : internal_data(), index()
+ {
+ STABLE_VECTOR_CHECK_INVARIANT;
+ }
+
+ //! <b>Effects</b>: Constructs a stable_vector taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ explicit stable_vector(const allocator_type& al) BOOST_NOEXCEPT_OR_NOTHROW
+ : internal_data(al), index(al)
+ {
+ STABLE_VECTOR_CHECK_INVARIANT;
+ }
+
+ //! <b>Effects</b>: Constructs a stable_vector
+ //! and inserts n value initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit stable_vector(size_type n)
+ : internal_data(), index()
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->resize(n);
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+
+ //! <b>Effects</b>: Constructs a stable_vector
+ //! and inserts n default initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ stable_vector(size_type n, default_init_t)
+ : internal_data(), index()
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->resize(n, default_init);
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+
+ //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
+ //! and inserts n value initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit stable_vector(size_type n, const allocator_type &a)
+ : internal_data(), index(a)
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->resize(n);
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+
+ //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
+ //! and inserts n default initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ stable_vector(size_type n, default_init_t, const allocator_type &a)
+ : internal_data(), index(a)
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->resize(n, default_init);
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+
+ //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's default or copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ stable_vector(size_type n, const T& t, const allocator_type& al = allocator_type())
+ : internal_data(al), index(al)
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->insert(this->cend(), n, t);
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+
+ //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
+ //! and inserts a copy of the range [first, last) in the stable_vector.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced InIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [first, last).
+ template <class InputIterator>
+ stable_vector(InputIterator first,InputIterator last, const allocator_type& al = allocator_type())
+ : internal_data(al), index(al)
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->insert(this->cend(), first, last);
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+
+ //! <b>Effects</b>: Copy constructs a stable_vector.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ stable_vector(const stable_vector& x)
+ : internal_data(allocator_traits<node_allocator_type>::
+ select_on_container_copy_construction(x.priv_node_alloc()))
+ , index(allocator_traits<allocator_type>::
+ select_on_container_copy_construction(x.index.get_stored_allocator()))
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->insert(this->cend(), x.begin(), x.end());
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs a stable_vector that will use a copy of allocator a
+ //! and inserts a copy of the range [il.begin(), il.last()) in the stable_vector
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor
+ //! throws or T's constructor taking a dereferenced initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
+ stable_vector(std::initializer_list<value_type> il, const allocator_type& l = allocator_type())
+ : internal_data(l), index(l)
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ insert(cend(), il.begin(), il.end());
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+#endif
+
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ stable_vector(BOOST_RV_REF(stable_vector) x) BOOST_NOEXCEPT_OR_NOTHROW
+ : internal_data(boost::move(x.priv_node_alloc())), index(boost::move(x.index))
+ {
+ this->priv_swap_members(x);
+ }
+
+ //! <b>Effects</b>: Copy constructs a stable_vector using the specified allocator.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ stable_vector(const stable_vector& x, const allocator_type &a)
+ : internal_data(a), index(a)
+ {
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->insert(this->cend(), x.begin(), x.end());
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+
+ //! <b>Effects</b>: Move constructor using the specified allocator.
+ //! Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise
+ stable_vector(BOOST_RV_REF(stable_vector) x, const allocator_type &a)
+ : internal_data(a), index(a)
+ {
+ if(this->priv_node_alloc() == x.priv_node_alloc()){
+ this->index.swap(x.index);
+ this->priv_swap_members(x);
+ }
+ else{
+ stable_vector_detail::clear_on_destroy<stable_vector> cod(*this);
+ this->insert(this->cend(), boost::make_move_iterator(x.begin()), boost::make_move_iterator(x.end()));
+ STABLE_VECTOR_CHECK_INVARIANT;
+ cod.release();
+ }
+ }
+
+ //! <b>Effects</b>: Destroys the stable_vector. All stored values are destroyed
+ //! and used memory is deallocated.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements.
+ ~stable_vector()
+ {
+ this->clear();
+ this->priv_clear_pool();
+ }
+
+ //! <b>Effects</b>: Makes *this contain the same elements as x.
+ //!
+ //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
+ //! of each of x's elements.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in x.
+ stable_vector& operator=(BOOST_COPY_ASSIGN_REF(stable_vector) x)
+ {
+ STABLE_VECTOR_CHECK_INVARIANT;
+ if (&x != this){
+ node_allocator_type &this_alloc = this->priv_node_alloc();
+ const node_allocator_type &x_alloc = x.priv_node_alloc();
+ dtl::bool_<allocator_traits_type::
+ propagate_on_container_copy_assignment::value> flag;
+ if(flag && this_alloc != x_alloc){
+ this->clear();
+ this->shrink_to_fit();
+ }
+ dtl::assign_alloc(this->priv_node_alloc(), x.priv_node_alloc(), flag);
+ dtl::assign_alloc(this->index.get_stored_allocator(), x.index.get_stored_allocator(), flag);
+ this->assign(x.begin(), x.end());
+ }
+ return *this;
+ }
+
+ //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
+ //!
+ //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
+ //! before the function.
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or T's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ stable_vector& operator=(BOOST_RV_REF(stable_vector) x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ //for move constructor, no aliasing (&x != this) is assumed.
+ BOOST_ASSERT(this != &x);
+ node_allocator_type &this_alloc = this->priv_node_alloc();
+ node_allocator_type &x_alloc = x.priv_node_alloc();
+ const bool propagate_alloc = allocator_traits_type::
+ propagate_on_container_move_assignment::value;
+ dtl::bool_<propagate_alloc> flag;
+ const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
+ //Resources can be transferred if both allocators are
+ //going to be equal after this function (either propagated or already equal)
+ if(propagate_alloc || allocators_equal){
+ STABLE_VECTOR_CHECK_INVARIANT
+ //Destroy objects but retain memory in case x reuses it in the future
+ this->clear();
+ //Move allocator if needed
+ dtl::move_alloc(this_alloc, x_alloc, flag);
+ //Take resources
+ this->index.swap(x.index);
+ this->priv_swap_members(x);
+ }
+ //Else do a one by one move
+ else{
+ this->assign( boost::make_move_iterator(x.begin())
+ , boost::make_move_iterator(x.end()));
+ }
+ return *this;
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Make *this container contains elements from il.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
+ stable_vector& operator=(std::initializer_list<value_type> il)
+ {
+ STABLE_VECTOR_CHECK_INVARIANT;
+ assign(il.begin(), il.end());
+ return *this;
+ }
+#endif
+
+ //! <b>Effects</b>: Assigns the n copies of val to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ void assign(size_type n, const T& t)
+ {
+ typedef constant_iterator<value_type, difference_type> cvalue_iterator;
+ this->assign(cvalue_iterator(t, n), cvalue_iterator());
+ }
+
+ //! <b>Effects</b>: Assigns the the range [first, last) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing InpIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ template<typename InputIterator>
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ typename dtl::disable_if_convertible<InputIterator, size_type>::type
+ #else
+ void
+ #endif
+ assign(InputIterator first,InputIterator last)
+ {
+ STABLE_VECTOR_CHECK_INVARIANT;
+ iterator first1 = this->begin();
+ iterator last1 = this->end();
+ for ( ; first1 != last1 && first != last; ++first1, ++first)
+ *first1 = *first;
+ if (first == last){
+ this->erase(first1, last1);
+ }
+ else{
+ this->insert(last1, first, last);
+ }
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing initializer_list iterator throws.
+ //!
+ void assign(std::initializer_list<value_type> il)
+ {
+ STABLE_VECTOR_CHECK_INVARIANT;
+ assign(il.begin(), il.end());
+ }
+#endif
+
+ //! <b>Effects</b>: Returns a copy of the internal allocator.
+ //!
+ //! <b>Throws</b>: If allocator's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const
+ { return this->priv_node_alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_node_alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_node_alloc(); }
+
+ //////////////////////////////////////////////
+ //
+ // iterators
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return (this->index.empty()) ? this->end(): iterator(node_ptr_traits::static_cast_from(this->index.front())); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return (this->index.empty()) ? this->cend() : const_iterator(node_ptr_traits::static_cast_from(this->index.front())) ; }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->priv_get_end_node()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_iterator(this->priv_get_end_node()); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(this->end()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->end()); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(this->begin()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->begin()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->begin(); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->end(); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->rbegin(); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crend()const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->rend(); }
+
+ //////////////////////////////////////////////
+ //
+ // capacity
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns true if the stable_vector contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->index.size() <= ExtraPointers; }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ const size_type index_size = this->index.size();
+ return (index_size - ExtraPointers) & (size_type(0u) -size_type(index_size != 0));
+ }
+
+ //! <b>Effects</b>: Returns the largest possible size of the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->index.max_size() - ExtraPointers; }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are value initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's value initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type n)
+ {
+ typedef value_init_construct_iterator<value_type, difference_type> value_init_iterator;
+ STABLE_VECTOR_CHECK_INVARIANT;
+ if(n > this->size())
+ this->insert(this->cend(), value_init_iterator(n - this->size()), value_init_iterator());
+ else if(n < this->size())
+ this->erase(this->cbegin() + n, this->cend());
+ }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are default initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's default initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ void resize(size_type n, default_init_t)
+ {
+ typedef default_init_construct_iterator<value_type, difference_type> default_init_iterator;
+ STABLE_VECTOR_CHECK_INVARIANT;
+ if(n > this->size())
+ this->insert(this->cend(), default_init_iterator(n - this->size()), default_init_iterator());
+ else if(n < this->size())
+ this->erase(this->cbegin() + n, this->cend());
+ }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are copy constructed from x.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type n, const T& t)
+ {
+ STABLE_VECTOR_CHECK_INVARIANT;
+ if(n > this->size())
+ this->insert(this->cend(), n - this->size(), t);
+ else if(n < this->size())
+ this->erase(this->cbegin() + n, this->cend());
+ }
+
+ //! <b>Effects</b>: Number of elements for which memory has been allocated.
+ //! capacity() is always greater than or equal to size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ const size_type index_size = this->index.size();
+ BOOST_ASSERT(!index_size || index_size >= ExtraPointers);
+ const size_type node_extra_capacity = this->internal_data.pool_size;
+ //Pool count must be less than index capacity, as index is a vector
+ BOOST_ASSERT(node_extra_capacity <= (this->index.capacity()- index_size));
+ const size_type index_offset =
+ (node_extra_capacity - ExtraPointers) & (size_type(0u) - size_type(index_size != 0));
+ return index_size + index_offset;
+ }
+
+ //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
+ //! effect. Otherwise, it is a request for allocation of additional memory.
+ //! If the request is successful, then capacity() is greater than or equal to
+ //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
+ //!
+ //! <b>Throws</b>: If memory allocation allocation throws.
+ void reserve(size_type n)
+ {
+ STABLE_VECTOR_CHECK_INVARIANT;
+ if(n > this->max_size()){
+ throw_length_error("stable_vector::reserve max_size() exceeded");
+ }
+
+ size_type sz = this->size();
+ size_type old_capacity = this->capacity();
+ if(n > old_capacity){
+ index_traits_type::initialize_end_node(this->index, this->internal_data.end_node, n);
+ const void * old_ptr = &index[0];
+ this->index.reserve(n + ExtraPointers);
+ bool realloced = &index[0] != old_ptr;
+ //Fix the pointers for the newly allocated buffer
+ if(realloced){
+ index_traits_type::fix_up_pointers_from(this->index, this->index.begin());
+ }
+ //Now fill pool if data is not enough
+ if((n - sz) > this->internal_data.pool_size){
+ this->priv_increase_pool((n - sz) - this->internal_data.pool_size);
+ }
+ }
+ }
+
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ //! with previous allocations. The size of the stable_vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ void shrink_to_fit()
+ {
+ if(this->capacity()){
+ //First empty allocated node pool
+ this->priv_clear_pool();
+ //If empty completely destroy the index, let's recover default-constructed state
+ if(this->empty()){
+ this->index.clear();
+ this->index.shrink_to_fit();
+ this->internal_data.end_node.up = node_base_ptr_ptr();
+ }
+ //Otherwise, try to shrink-to-fit the index and readjust pointers if necessary
+ else{
+ const void* old_ptr = &index[0];
+ this->index.shrink_to_fit();
+ bool realloced = &index[0] != old_ptr;
+ //Fix the pointers for the newly allocated buffer
+ if(realloced){
+ index_traits_type::fix_up_pointers_from(this->index, this->index.begin());
+ }
+ }
+ }
+ }
+
+ //////////////////////////////////////////////
+ //
+ // element access
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the first
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference front() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return static_cast<node_reference>(*this->index.front()).get_data();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the first
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return static_cast<const_node_reference>(*this->index.front()).get_data();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the last
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return static_cast<node_reference>(*this->index[this->size()-1u]).get_data();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the last
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return static_cast<const_node_reference>(*this->index[this->size()-1u]).get_data();
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() > n);
+ return static_cast<node_reference>(*this->index[n]).get_data();
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() > n);
+ return static_cast<const_node_reference>(*this->index[n]).get_data();
+ }
+
+ //! <b>Requires</b>: size() >= n.
+ //!
+ //! <b>Effects</b>: Returns an iterator to the nth element
+ //! from the beginning of the container. Returns end()
+ //! if n == size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() >= n);
+ return (this->index.empty()) ? this->end() : iterator(node_ptr_traits::static_cast_from(this->index[n]));
+ }
+
+ //! <b>Requires</b>: size() >= n.
+ //!
+ //! <b>Effects</b>: Returns a const_iterator to the nth element
+ //! from the beginning of the container. Returns end()
+ //! if n == size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() >= n);
+ return (this->index.empty()) ? this->cend() : iterator(node_ptr_traits::static_cast_from(this->index[n]));
+ }
+
+ //! <b>Requires</b>: begin() <= p <= end().
+ //!
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_index_of(p.node_pointer()); }
+
+ //! <b>Requires</b>: begin() <= p <= end().
+ //!
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_index_of(p.node_pointer()); }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: std::range_error if n >= size()
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference at(size_type n)
+ {
+ if(n >= this->size()){
+ throw_out_of_range("vector::at invalid subscript");
+ }
+ return operator[](n);
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: std::range_error if n >= size()
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference at(size_type n)const
+ {
+ if(n >= this->size()){
+ throw_out_of_range("vector::at invalid subscript");
+ }
+ return operator[](n);
+ }
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the end of the stable_vector.
+ //!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ template<class ...Args>
+ reference emplace_back(Args &&...args)
+ {
+ typedef emplace_functor<Args...> EmplaceFunctor;
+ typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;
+ EmplaceFunctor &&ef = EmplaceFunctor(boost::forward<Args>(args)...);
+ return *this->insert(this->cend(), EmplaceIterator(ef), EmplaceIterator());
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... before p
+ //!
+ //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: If p is end(), amortized constant time
+ //! Linear time otherwise.
+ template<class ...Args>
+ iterator emplace(const_iterator p, Args && ...args)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ size_type pos_n = p - cbegin();
+ typedef emplace_functor<Args...> EmplaceFunctor;
+ typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;
+ EmplaceFunctor &&ef = EmplaceFunctor(boost::forward<Args>(args)...);
+ this->insert(p, EmplaceIterator(ef), EmplaceIterator());
+ return iterator(this->begin() + pos_n);
+ }
+
+ #else
+
+ #define BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ reference emplace_back(BOOST_MOVE_UREF##N)\
+ {\
+ typedef emplace_functor##N\
+ BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N EmplaceFunctor;\
+ typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;\
+ EmplaceFunctor ef BOOST_MOVE_LP##N BOOST_MOVE_FWD##N BOOST_MOVE_RP##N;\
+ return *this->insert(this->cend() , EmplaceIterator(ef), EmplaceIterator());\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace(const_iterator p BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ BOOST_ASSERT(this->priv_in_range_or_end(p));\
+ typedef emplace_functor##N\
+ BOOST_MOVE_LT##N BOOST_MOVE_TARG##N BOOST_MOVE_GT##N EmplaceFunctor;\
+ typedef emplace_iterator<value_type, EmplaceFunctor, difference_type> EmplaceIterator;\
+ EmplaceFunctor ef BOOST_MOVE_LP##N BOOST_MOVE_FWD##N BOOST_MOVE_RP##N;\
+ const size_type pos_n = p - this->cbegin();\
+ this->insert(p, EmplaceIterator(ef), EmplaceIterator());\
+ return this->begin() += pos_n;\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_STABLE_VECTOR_EMPLACE_CODE
+
+ #endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x at the end of the stable_vector.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_back(const T &x);
+
+ //! <b>Effects</b>: Constructs a new element in the end of the stable_vector
+ //! and moves the resources of x to this new element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_back(T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of x before p.
+ //!
+ //! <b>Returns</b>: An iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or x's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: If p is end(), amortized constant time
+ //! Linear time otherwise.
+ iterator insert(const_iterator p, const T &x);
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a new element before p with x's resources.
+ //!
+ //! <b>Returns</b>: an iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: If p is end(), amortized constant time
+ //! Linear time otherwise.
+ iterator insert(const_iterator p, T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert n copies of x before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ iterator insert(const_iterator p, size_type n, const T& t)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ STABLE_VECTOR_CHECK_INVARIANT;
+ typedef constant_iterator<value_type, difference_type> cvalue_iterator;
+ return this->insert(p, cvalue_iterator(t, n), cvalue_iterator());
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
+ //!
+ //! <b>Complexity</b>: Linear to distance [il.begin(), il.end()).
+ iterator insert(const_iterator p, std::initializer_list<value_type> il)
+ {
+ //Position checks done by insert()
+ STABLE_VECTOR_CHECK_INVARIANT;
+ return insert(p, il.begin(), il.end());
+ }
+#endif
+
+ //! <b>Requires</b>: pos must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [first, last) range before p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced InpIt throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to distance [first, last).
+ template <class InputIterator>
+ iterator insert(const_iterator p, InputIterator first, InputIterator last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //Put this as argument instead of the return type as old GCC's like 3.4
+ //detect this and the next disable_if_or as overloads
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<InputIterator, size_type>
+ , dtl::is_not_input_iterator<InputIterator>
+ >::type* = 0
+ #endif
+ )
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ STABLE_VECTOR_CHECK_INVARIANT;
+ const size_type pos_n = p - this->cbegin();
+ for(; first != last; ++first){
+ this->emplace(p, *first);
+ }
+ return this->begin() + pos_n;
+ }
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class FwdIt>
+ typename dtl::disable_if_or
+ < iterator
+ , dtl::is_convertible<FwdIt, size_type>
+ , dtl::is_input_iterator<FwdIt>
+ >::type
+ insert(const_iterator p, FwdIt first, FwdIt last)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ const size_type num_new = static_cast<size_type>(boost::container::iterator_distance(first, last));
+ const size_type idx = static_cast<size_type>(p - this->cbegin());
+ if(num_new){
+ //Fills the node pool and inserts num_new null pointers in idx.
+ //If a new buffer was needed fixes up pointers up to idx so
+ //past-new nodes are not aligned until the end of this function
+ //or in a rollback in case of exception
+ index_iterator it_past_newly_constructed(this->priv_insert_forward_non_templated(idx, num_new));
+ const index_iterator it_past_new(it_past_newly_constructed + num_new);
+ {
+ //Prepare rollback
+ insert_rollback rollback(*this, it_past_newly_constructed, it_past_new);
+ while(first != last){
+ const node_ptr n = this->priv_get_from_pool();
+ BOOST_ASSERT(!!n);
+ //Put it in the index so rollback can return it in pool if construct_in_place throws
+ *it_past_newly_constructed = n;
+ //Constructs and fixes up pointers This can throw
+ this->priv_build_node_from_it(n, it_past_newly_constructed, first);
+ ++first;
+ ++it_past_newly_constructed;
+ }
+ //rollback.~insert_rollback() called in case of exception
+ }
+ //Fix up pointers for past-new nodes (new nodes were fixed during construction) and
+ //nodes before insertion p in priv_insert_forward_non_templated(...)
+ index_traits_type::fix_up_pointers_from(this->index, it_past_newly_constructed);
+ }
+ return this->begin() + idx;
+ }
+ #endif
+
+ //! <b>Effects</b>: Removes the last element from the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ this->erase(--this->cend());
+ }
+
+ //! <b>Effects</b>: Erases the element at p.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements between p and the
+ //! last element. Constant if p is the last element.
+ iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->priv_in_range(p));
+ STABLE_VECTOR_CHECK_INVARIANT;
+ const size_type d = p - this->cbegin();
+ index_iterator it = this->index.begin() + d;
+ this->priv_delete_node(p.node_pointer());
+ it = this->index.erase(it);
+ index_traits_type::fix_up_pointers_from(this->index, it);
+ return iterator(node_ptr_traits::static_cast_from(*it));
+ }
+
+ //! <b>Effects</b>: Erases the elements pointed by [first, last).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the distance between first and last
+ //! plus linear to the elements between p and the last element.
+ iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(first == last ||
+ (first < last && this->priv_in_range(first) && this->priv_in_range_or_end(last)));
+ STABLE_VECTOR_CHECK_INVARIANT;
+ const const_iterator cbeg(this->cbegin());
+ const size_type d1 = static_cast<size_type>(first - cbeg),
+ d2 = static_cast<size_type>(last - cbeg);
+ size_type d_dif = d2 - d1;
+ if(d_dif){
+ multiallocation_chain holder;
+ const index_iterator it1(this->index.begin() + d1);
+ const index_iterator it2(it1 + d_dif);
+ index_iterator it(it1);
+ while(d_dif--){
+ node_base_ptr &nb = *it;
+ ++it;
+ node_type &n = *node_ptr_traits::static_cast_from(nb);
+ this->priv_destroy_node(n);
+ holder.push_back(node_ptr_traits::pointer_to(n));
+ }
+ this->priv_put_in_pool(holder);
+ const index_iterator e = this->index.erase(it1, it2);
+ index_traits_type::fix_up_pointers_from(this->index, e);
+ }
+ return iterator(last.node_pointer());
+ }
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ void swap(stable_vector & x)
+ BOOST_NOEXCEPT_IF( allocator_traits_type::propagate_on_container_swap::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ BOOST_ASSERT(allocator_traits_type::propagate_on_container_swap::value ||
+ allocator_traits_type::is_always_equal::value ||
+ this->get_stored_allocator() == x.get_stored_allocator());
+ STABLE_VECTOR_CHECK_INVARIANT;
+ dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
+ dtl::swap_alloc(this->priv_node_alloc(), x.priv_node_alloc(), flag);
+ //vector's allocator is swapped here
+ this->index.swap(x.index);
+ this->priv_swap_members(x);
+ }
+
+ //! <b>Effects</b>: Erases all the elements of the stable_vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the stable_vector.
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW
+ { this->erase(this->cbegin(),this->cend()); }
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator==(const stable_vector& x, const stable_vector& y)
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator!=(const stable_vector& x, const stable_vector& y)
+ { return !(x == y); }
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const stable_vector& x, const stable_vector& y)
+ { return ::boost::container::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>(const stable_vector& x, const stable_vector& y)
+ { return y < x; }
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<=(const stable_vector& x, const stable_vector& y)
+ { return !(y < x); }
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator>=(const stable_vector& x, const stable_vector& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ friend void swap(stable_vector& x, stable_vector& y)
+ { x.swap(y); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+
+ bool priv_in_range(const_iterator pos) const
+ {
+ return (this->begin() <= pos) && (pos < this->end());
+ }
+
+ bool priv_in_range_or_end(const_iterator pos) const
+ {
+ return (this->begin() <= pos) && (pos <= this->end());
+ }
+
+ size_type priv_index_of(node_ptr p) const
+ {
+ //Check range
+ BOOST_ASSERT(this->index.empty() || (this->index.data() <= p->up));
+ BOOST_ASSERT(this->index.empty() || p->up <= (this->index.data() + this->index.size()));
+ return this->index.empty() ? 0 : p->up - this->index.data();
+ }
+
+ class insert_rollback
+ {
+ public:
+
+ insert_rollback(stable_vector &sv, index_iterator &it_past_constructed, const index_iterator &it_past_new)
+ : m_sv(sv), m_it_past_constructed(it_past_constructed), m_it_past_new(it_past_new)
+ {}
+
+ ~insert_rollback()
+ {
+ if(m_it_past_constructed != m_it_past_new){
+ m_sv.priv_put_in_pool(node_ptr_traits::static_cast_from(*m_it_past_constructed));
+ index_iterator e = m_sv.index.erase(m_it_past_constructed, m_it_past_new);
+ index_traits_type::fix_up_pointers_from(m_sv.index, e);
+ }
+ }
+
+ private:
+ stable_vector &m_sv;
+ index_iterator &m_it_past_constructed;
+ const index_iterator &m_it_past_new;
+ };
+
+ class push_back_rollback
+ {
+ public:
+ push_back_rollback(stable_vector &sv, const node_ptr &p)
+ : m_sv(sv), m_p(p)
+ {}
+
+ ~push_back_rollback()
+ {
+ if(m_p){
+ m_sv.priv_put_in_pool(m_p);
+ }
+ }
+
+ void release()
+ { m_p = node_ptr(); }
+
+ private:
+ stable_vector &m_sv;
+ node_ptr m_p;
+ };
+
+ index_iterator priv_insert_forward_non_templated(size_type idx, size_type num_new)
+ {
+ index_traits_type::initialize_end_node(this->index, this->internal_data.end_node, num_new);
+
+ //Now try to fill the pool with new data
+ if(this->internal_data.pool_size < num_new){
+ this->priv_increase_pool(num_new - this->internal_data.pool_size);
+ }
+
+ //Now try to make room in the vector
+ const node_base_ptr_ptr old_buffer = this->index.data();
+ this->index.insert(this->index.begin() + idx, num_new, node_ptr());
+ bool new_buffer = this->index.data() != old_buffer;
+
+ //Fix the pointers for the newly allocated buffer
+ const index_iterator index_beg = this->index.begin();
+ if(new_buffer){
+ index_traits_type::fix_up_pointers(index_beg, index_beg + idx);
+ }
+ return index_beg + idx;
+ }
+
+ bool priv_capacity_bigger_than_size() const
+ {
+ return this->index.capacity() > this->index.size() &&
+ this->internal_data.pool_size > 0;
+ }
+
+ template <class U>
+ void priv_push_back(BOOST_MOVE_CATCH_FWD(U) x)
+ {
+ if(BOOST_LIKELY(this->priv_capacity_bigger_than_size())){
+ //Enough memory in the pool and in the index
+ const node_ptr p = this->priv_get_from_pool();
+ BOOST_ASSERT(!!p);
+ {
+ push_back_rollback rollback(*this, p);
+ //This might throw
+ this->priv_build_node_from_convertible(p, ::boost::forward<U>(x));
+ rollback.release();
+ }
+ //This can't throw as there is room for a new elements in the index
+ index_iterator new_index = this->index.insert(this->index.end() - ExtraPointers, p);
+ index_traits_type::fix_up_pointers_from(this->index, new_index);
+ }
+ else{
+ this->insert(this->cend(), ::boost::forward<U>(x));
+ }
+ }
+
+ iterator priv_insert(const_iterator p, const value_type &t)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ typedef constant_iterator<value_type, difference_type> cvalue_iterator;
+ return this->insert(p, cvalue_iterator(t, 1), cvalue_iterator());
+ }
+
+ iterator priv_insert(const_iterator p, BOOST_RV_REF(T) x)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ typedef repeat_iterator<T, difference_type> repeat_it;
+ typedef boost::move_iterator<repeat_it> repeat_move_it;
+ //Just call more general insert(p, size, value) and return iterator
+ return this->insert(p, repeat_move_it(repeat_it(x, 1)), repeat_move_it(repeat_it()));
+ }
+
+ void priv_clear_pool()
+ {
+ if(!this->index.empty() && this->index.back()){
+ node_base_ptr &pool_first_ref = *(this->index.end() - 2);
+ node_base_ptr &pool_last_ref = this->index.back();
+
+ multiallocation_chain holder;
+ holder.incorporate_after( holder.before_begin()
+ , node_ptr_traits::static_cast_from(pool_first_ref)
+ , node_ptr_traits::static_cast_from(pool_last_ref)
+ , internal_data.pool_size);
+ this->deallocate_individual(holder);
+ pool_first_ref = pool_last_ref = 0;
+ this->internal_data.pool_size = 0;
+ }
+ }
+
+ void priv_increase_pool(size_type n)
+ {
+ node_base_ptr &pool_first_ref = *(this->index.end() - 2);
+ node_base_ptr &pool_last_ref = this->index.back();
+ multiallocation_chain holder;
+ holder.incorporate_after( holder.before_begin()
+ , node_ptr_traits::static_cast_from(pool_first_ref)
+ , node_ptr_traits::static_cast_from(pool_last_ref)
+ , internal_data.pool_size);
+ multiallocation_chain m;
+ this->allocate_individual(n, m);
+ holder.splice_after(holder.before_begin(), m, m.before_begin(), m.last(), n);
+ this->internal_data.pool_size += n;
+ std::pair<node_ptr, node_ptr> data(holder.extract_data());
+ pool_first_ref = data.first;
+ pool_last_ref = data.second;
+ }
+
+ void priv_put_in_pool(const node_ptr &p)
+ {
+ node_base_ptr &pool_first_ref = *(this->index.end()-2);
+ node_base_ptr &pool_last_ref = this->index.back();
+ multiallocation_chain holder;
+ holder.incorporate_after( holder.before_begin()
+ , node_ptr_traits::static_cast_from(pool_first_ref)
+ , node_ptr_traits::static_cast_from(pool_last_ref)
+ , internal_data.pool_size);
+ holder.push_front(p);
+ ++this->internal_data.pool_size;
+ std::pair<node_ptr, node_ptr> ret(holder.extract_data());
+ pool_first_ref = ret.first;
+ pool_last_ref = ret.second;
+ }
+
+ void priv_put_in_pool(multiallocation_chain &ch)
+ {
+ node_base_ptr &pool_first_ref = *(this->index.end()-(ExtraPointers-1));
+ node_base_ptr &pool_last_ref = this->index.back();
+ ch.incorporate_after( ch.before_begin()
+ , node_ptr_traits::static_cast_from(pool_first_ref)
+ , node_ptr_traits::static_cast_from(pool_last_ref)
+ , internal_data.pool_size);
+ this->internal_data.pool_size = ch.size();
+ const std::pair<node_ptr, node_ptr> ret(ch.extract_data());
+ pool_first_ref = ret.first;
+ pool_last_ref = ret.second;
+ }
+
+ node_ptr priv_get_from_pool()
+ {
+ //Precondition: index is not empty
+ BOOST_ASSERT(!this->index.empty());
+ node_base_ptr &pool_first_ref = *(this->index.end() - (ExtraPointers-1));
+ node_base_ptr &pool_last_ref = this->index.back();
+ multiallocation_chain holder;
+ holder.incorporate_after( holder.before_begin()
+ , node_ptr_traits::static_cast_from(pool_first_ref)
+ , node_ptr_traits::static_cast_from(pool_last_ref)
+ , internal_data.pool_size);
+ node_ptr ret = holder.pop_front();
+ --this->internal_data.pool_size;
+ if(!internal_data.pool_size){
+ pool_first_ref = pool_last_ref = node_ptr();
+ }
+ else{
+ const std::pair<node_ptr, node_ptr> data(holder.extract_data());
+ pool_first_ref = data.first;
+ pool_last_ref = data.second;
+ }
+ return ret;
+ }
+
+ node_base_ptr priv_get_end_node() const
+ { return node_base_ptr_traits::pointer_to(const_cast<node_base_type&>(this->internal_data.end_node)); }
+
+ void priv_destroy_node(const node_type &n)
+ {
+ allocator_traits<node_allocator_type>::
+ destroy(this->priv_node_alloc(), &n);
+ }
+
+ void priv_delete_node(const node_ptr &n)
+ {
+ this->priv_destroy_node(*n);
+ this->priv_put_in_pool(n);
+ }
+
+ template<class Iterator>
+ void priv_build_node_from_it(const node_ptr &p, const index_iterator &up_index, const Iterator &it)
+ {
+ node_type *praw = ::new(boost::movelib::iterator_to_raw_pointer(p), boost_container_new_t())
+ node_type(index_traits_type::ptr_to_node_base_ptr(*up_index));
+ BOOST_TRY{
+ //This can throw
+ boost::container::construct_in_place
+ ( this->priv_node_alloc()
+ , praw->get_data_ptr()
+ , it);
+ }
+ BOOST_CATCH(...) {
+ praw->destroy_header();
+ this->priv_node_alloc().deallocate(p, 1);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template<class ValueConvertible>
+ void priv_build_node_from_convertible(const node_ptr &p, BOOST_FWD_REF(ValueConvertible) value_convertible)
+ {
+ node_type *praw = ::new(boost::movelib::iterator_to_raw_pointer(p), boost_container_new_t()) node_type;
+ BOOST_TRY{
+ //This can throw
+ boost::container::allocator_traits<node_allocator_type>::construct
+ ( this->priv_node_alloc()
+ , p->get_data_ptr()
+ , ::boost::forward<ValueConvertible>(value_convertible));
+ }
+ BOOST_CATCH(...) {
+ praw->destroy_header();
+ this->priv_node_alloc().deallocate(p, 1);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ void priv_swap_members(stable_vector &x)
+ {
+ boost::adl_move_swap(this->internal_data.pool_size, x.internal_data.pool_size);
+ index_traits_type::readjust_end_node(this->index, this->internal_data.end_node);
+ index_traits_type::readjust_end_node(x.index, x.internal_data.end_node);
+ }
+
+ #if defined(STABLE_VECTOR_ENABLE_INVARIANT_CHECKING)
+ bool priv_invariant()const
+ {
+ index_type & index_ref = const_cast<index_type&>(this->index);
+
+ const size_type index_size = this->index.size();
+ if(!index_size)
+ return !this->capacity() && !this->size();
+
+ if(index_size < ExtraPointers)
+ return false;
+
+ const size_type bucket_extra_capacity = this->index.capacity()- index_size;
+ const size_type node_extra_capacity = this->internal_data.pool_size;
+ if(bucket_extra_capacity < node_extra_capacity){
+ return false;
+ }
+
+ if(this->priv_get_end_node() != *(index.end() - ExtraPointers)){
+ return false;
+ }
+
+ if(!index_traits_type::invariants(index_ref)){
+ return false;
+ }
+
+ size_type n = this->capacity() - this->size();
+ node_base_ptr &pool_first_ref = *(index_ref.end() - (ExtraPointers-1));
+ node_base_ptr &pool_last_ref = index_ref.back();
+ multiallocation_chain holder;
+ holder.incorporate_after( holder.before_begin()
+ , node_ptr_traits::static_cast_from(pool_first_ref)
+ , node_ptr_traits::static_cast_from(pool_last_ref)
+ , internal_data.pool_size);
+ typename multiallocation_chain::iterator beg(holder.begin()), end(holder.end());
+ size_type num_pool = 0;
+ while(beg != end){
+ ++num_pool;
+ ++beg;
+ }
+ return n >= num_pool && num_pool == internal_data.pool_size;
+ }
+
+ class invariant_checker
+ {
+ invariant_checker(const invariant_checker &);
+ invariant_checker & operator=(const invariant_checker &);
+ const stable_vector* p;
+
+ public:
+ invariant_checker(const stable_vector& v):p(&v){}
+ ~invariant_checker(){BOOST_ASSERT(p->priv_invariant());}
+ void touch(){}
+ };
+ #endif
+
+ class ebo_holder
+ : public node_allocator_type
+ {
+ private:
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(ebo_holder)
+
+ public:
+ template<class AllocatorRLValue>
+ explicit ebo_holder(BOOST_FWD_REF(AllocatorRLValue) a)
+ : node_allocator_type(boost::forward<AllocatorRLValue>(a))
+ , pool_size(0)
+ , end_node()
+ {}
+
+ ebo_holder()
+ : node_allocator_type()
+ , pool_size(0)
+ , end_node()
+ {}
+
+ size_type pool_size;
+ node_base_type end_node;
+ } internal_data;
+
+ node_allocator_type &priv_node_alloc() { return internal_data; }
+ const node_allocator_type &priv_node_alloc() const { return internal_data; }
+
+ index_type index;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+stable_vector(InputIterator, InputIterator) ->
+ stable_vector<typename iterator_traits<InputIterator>::value_type>;
+
+template <typename InputIterator, typename Allocator>
+stable_vector(InputIterator, InputIterator, Allocator const&) ->
+ stable_vector<typename iterator_traits<InputIterator>::value_type, Allocator>;
+
+#endif
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#undef STABLE_VECTOR_CHECK_INVARIANT
+
+} //namespace container {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class T, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::stable_vector<T, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
+};
+
+namespace container {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+}} //namespace boost{ namespace container {
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif //BOOST_CONTAINER_STABLE_VECTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/static_vector.hpp b/src/third_party/boost-1.69.0/boost/container/static_vector.hpp
new file mode 100644
index 00000000000..059640e9372
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/static_vector.hpp
@@ -0,0 +1,1243 @@
+// Boost.Container static_vector
+//
+// Copyright (c) 2012-2013 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2013 Andrew Hundt.
+// Copyright (c) 2013-2014 Ion Gaztanaga
+//
+// Use, modification and distribution is subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_CONTAINER_STATIC_VECTOR_HPP
+#define BOOST_CONTAINER_STATIC_VECTOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/vector.hpp>
+
+#include <cstddef>
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list>
+#endif
+
+namespace boost { namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace dtl {
+
+template<class T, std::size_t N>
+class static_storage_allocator
+{
+ public:
+ typedef T value_type;
+
+ BOOST_CONTAINER_FORCEINLINE static_storage_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE static_storage_allocator(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE static_storage_allocator & operator=(const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE T* internal_storage() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_cast<T*>(static_cast<const T*>(static_cast<const void*>(storage.data))); }
+
+ BOOST_CONTAINER_FORCEINLINE T* internal_storage() BOOST_NOEXCEPT_OR_NOTHROW
+ { return static_cast<T*>(static_cast<void*>(storage.data)); }
+
+ static const std::size_t internal_capacity = N;
+
+ std::size_t max_size() const
+ { return N; }
+
+ typedef boost::container::dtl::version_type<static_storage_allocator, 0> version;
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
+ { return false; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const static_storage_allocator &, const static_storage_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
+ { return true; }
+
+ private:
+ typename aligned_storage<sizeof(T)*N, alignment_of<T>::value>::type storage;
+};
+
+} //namespace dtl {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//!
+//!@brief A variable-size array container with fixed capacity.
+//!
+//!static_vector is a sequence container like boost::container::vector with contiguous storage that can
+//!change in size, along with the static allocation, low overhead, and fixed capacity of boost::array.
+//!
+//!A static_vector is a sequence that supports random access to elements, constant time insertion and
+//!removal of elements at the end, and linear time insertion and removal of elements at the beginning or
+//!in the middle. The number of elements in a static_vector may vary dynamically up to a fixed capacity
+//!because elements are stored within the object itself similarly to an array. However, objects are
+//!initialized as they are inserted into static_vector unlike C arrays or std::array which must construct
+//!all elements on instantiation. The behavior of static_vector enables the use of statically allocated
+//!elements in cases with complex object lifetime requirements that would otherwise not be trivially
+//!possible.
+//!
+//!@par Error Handling
+//! Insertion beyond the capacity result in throwing std::bad_alloc() if exceptions are enabled or
+//! calling throw_bad_alloc() if not enabled.
+//!
+//! std::out_of_range is thrown if out of bounds access is performed in <code>at()</code> if exceptions are
+//! enabled, throw_out_of_range() if not enabled.
+//!
+//!@tparam Value The type of element that will be stored.
+//!@tparam Capacity The maximum number of elements static_vector can store, fixed at compile time.
+template <typename Value, std::size_t Capacity>
+class static_vector
+ : public vector<Value, dtl::static_storage_allocator<Value, Capacity> >
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ typedef vector<Value, dtl::static_storage_allocator<Value, Capacity> > base_t;
+
+ BOOST_COPYABLE_AND_MOVABLE(static_vector)
+
+ template<class U, std::size_t OtherCapacity>
+ friend class static_vector;
+
+ public:
+ typedef dtl::static_storage_allocator<Value, Capacity> allocator_type;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+public:
+ //! @brief The type of elements stored in the container.
+ typedef typename base_t::value_type value_type;
+ //! @brief The unsigned integral type used by the container.
+ typedef typename base_t::size_type size_type;
+ //! @brief The pointers difference type.
+ typedef typename base_t::difference_type difference_type;
+ //! @brief The pointer type.
+ typedef typename base_t::pointer pointer;
+ //! @brief The const pointer type.
+ typedef typename base_t::const_pointer const_pointer;
+ //! @brief The value reference type.
+ typedef typename base_t::reference reference;
+ //! @brief The value const reference type.
+ typedef typename base_t::const_reference const_reference;
+ //! @brief The iterator type.
+ typedef typename base_t::iterator iterator;
+ //! @brief The const iterator type.
+ typedef typename base_t::const_iterator const_iterator;
+ //! @brief The reverse iterator type.
+ typedef typename base_t::reverse_iterator reverse_iterator;
+ //! @brief The const reverse iterator.
+ typedef typename base_t::const_reverse_iterator const_reverse_iterator;
+
+ //! @brief The capacity/max size of the container
+ static const size_type static_capacity = Capacity;
+
+ //! @brief Constructs an empty static_vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ BOOST_CONTAINER_FORCEINLINE static_vector() BOOST_NOEXCEPT_OR_NOTHROW
+ : base_t()
+ {}
+
+ //! @pre <tt>count <= capacity()</tt>
+ //!
+ //! @brief Constructs a static_vector containing count value initialized values.
+ //!
+ //! @param count The number of values which will be contained in the container.
+ //!
+ //! @par Throws
+ //! If Value's value initialization throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ BOOST_CONTAINER_FORCEINLINE explicit static_vector(size_type count)
+ : base_t(count)
+ {}
+
+ //! @pre <tt>count <= capacity()</tt>
+ //!
+ //! @brief Constructs a static_vector containing count default initialized values.
+ //!
+ //! @param count The number of values which will be contained in the container.
+ //!
+ //! @par Throws
+ //! If Value's default initialization throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ //!
+ //! @par Note
+ //! Non-standard extension
+ BOOST_CONTAINER_FORCEINLINE static_vector(size_type count, default_init_t)
+ : base_t(count, default_init_t())
+ {}
+
+ //! @pre <tt>count <= capacity()</tt>
+ //!
+ //! @brief Constructs a static_vector containing count copies of value.
+ //!
+ //! @param count The number of copies of a values that will be contained in the container.
+ //! @param value The value which will be used to copy construct values.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ BOOST_CONTAINER_FORCEINLINE static_vector(size_type count, value_type const& value)
+ : base_t(count, value)
+ {}
+
+ //! @pre
+ //! @li <tt>distance(first, last) <= capacity()</tt>
+ //! @li Iterator must meet the \c ForwardTraversalIterator concept.
+ //!
+ //! @brief Constructs a static_vector containing copy of a range <tt>[first, last)</tt>.
+ //!
+ //! @param first The iterator to the first element in range.
+ //! @param last The iterator to the one after the last element in range.
+ //!
+ //! @par Throws
+ //! If Value's constructor taking a dereferenced Iterator throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ template <typename Iterator>
+ BOOST_CONTAINER_FORCEINLINE static_vector(Iterator first, Iterator last)
+ : base_t(first, last)
+ {}
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! @pre
+ //! @li <tt>distance(il.begin(), il.end()) <= capacity()</tt>
+ //!
+ //! @brief Constructs a static_vector containing copy of a range <tt>[il.begin(), il.end())</tt>.
+ //!
+ //! @param il std::initializer_list with values to initialize vector.
+ //!
+ //! @par Throws
+ //! If Value's constructor taking a dereferenced std::initializer_list throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ BOOST_CONTAINER_FORCEINLINE static_vector(std::initializer_list<value_type> il)
+ : base_t(il)
+ {}
+#endif
+
+ //! @brief Constructs a copy of other static_vector.
+ //!
+ //! @param other The static_vector which content will be copied to this one.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other)
+ : base_t(other)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE static_vector(static_vector const& other, const allocator_type &)
+ : base_t(other)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other, const allocator_type &)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<value_type>::value)
+ : base_t(BOOST_MOVE_BASE(base_t, other))
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE explicit static_vector(const allocator_type &)
+ : base_t()
+ {}
+
+ //! @pre <tt>other.size() <= capacity()</tt>.
+ //!
+ //! @brief Constructs a copy of other static_vector.
+ //!
+ //! @param other The static_vector which content will be copied to this one.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ template <std::size_t C>
+ BOOST_CONTAINER_FORCEINLINE static_vector(static_vector<value_type, C> const& other)
+ : base_t(other)
+ {}
+
+ //! @brief Move constructor. Moves Values stored in the other static_vector to this one.
+ //!
+ //! @param other The static_vector which content will be moved to this one.
+ //!
+ //! @par Throws
+ //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor throws.
+ //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF(static_vector) other)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_constructible<value_type>::value)
+ : base_t(BOOST_MOVE_BASE(base_t, other))
+ {}
+
+ //! @pre <tt>other.size() <= capacity()</tt>
+ //!
+ //! @brief Move constructor. Moves Values stored in the other static_vector to this one.
+ //!
+ //! @param other The static_vector which content will be moved to this one.
+ //!
+ //! @par Throws
+ //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor throws.
+ //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ template <std::size_t C>
+ BOOST_CONTAINER_FORCEINLINE static_vector(BOOST_RV_REF_BEG static_vector<value_type, C> BOOST_RV_REF_END other)
+ : base_t(BOOST_MOVE_BASE(typename static_vector<value_type BOOST_MOVE_I C>::base_t, other))
+ {}
+
+ //! @brief Copy assigns Values stored in the other static_vector to this one.
+ //!
+ //! @param other The static_vector which content will be copied to this one.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor or copy assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_COPY_ASSIGN_REF(static_vector) other)
+ {
+ return static_cast<static_vector&>(base_t::operator=(static_cast<base_t const&>(other)));
+ }
+
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! @brief Copy assigns Values stored in std::initializer_list to *this.
+ //!
+ //! @param il The std::initializer_list which content will be copied to this one.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor or copy assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ BOOST_CONTAINER_FORCEINLINE static_vector & operator=(std::initializer_list<value_type> il)
+ { return static_cast<static_vector&>(base_t::operator=(il)); }
+#endif
+
+ //! @pre <tt>other.size() <= capacity()</tt>
+ //!
+ //! @brief Copy assigns Values stored in the other static_vector to this one.
+ //!
+ //! @param other The static_vector which content will be copied to this one.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor or copy assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ template <std::size_t C>
+ BOOST_CONTAINER_FORCEINLINE static_vector & operator=(static_vector<value_type, C> const& other)
+ {
+ return static_cast<static_vector&>(base_t::operator=
+ (static_cast<typename static_vector<value_type, C>::base_t const&>(other)));
+ }
+
+ //! @brief Move assignment. Moves Values stored in the other static_vector to this one.
+ //!
+ //! @param other The static_vector which content will be moved to this one.
+ //!
+ //! @par Throws
+ //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws.
+ //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF(static_vector) other)
+ BOOST_NOEXCEPT_IF(boost::container::dtl::is_nothrow_move_assignable<value_type>::value)
+ {
+ return static_cast<static_vector&>(base_t::operator=(BOOST_MOVE_BASE(base_t, other)));
+ }
+
+ //! @pre <tt>other.size() <= capacity()</tt>
+ //!
+ //! @brief Move assignment. Moves Values stored in the other static_vector to this one.
+ //!
+ //! @param other The static_vector which content will be moved to this one.
+ //!
+ //! @par Throws
+ //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws.
+ //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ template <std::size_t C>
+ BOOST_CONTAINER_FORCEINLINE static_vector & operator=(BOOST_RV_REF_BEG static_vector<value_type, C> BOOST_RV_REF_END other)
+ {
+ return static_cast<static_vector&>(base_t::operator=
+ (BOOST_MOVE_BASE(typename static_vector<value_type BOOST_MOVE_I C>::base_t, other)));
+ }
+
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //! @brief Destructor. Destroys Values stored in this container.
+ //!
+ //! @par Throws
+ //! Nothing
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ ~static_vector();
+
+ //! @brief Swaps contents of the other static_vector and this one.
+ //!
+ //! @param other The static_vector which content will be swapped with this one's content.
+ //!
+ //! @par Throws
+ //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws,
+ //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws,
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ void swap(static_vector & other);
+
+ //! @pre <tt>other.size() <= capacity() && size() <= other.capacity()</tt>
+ //!
+ //! @brief Swaps contents of the other static_vector and this one.
+ //!
+ //! @param other The static_vector which content will be swapped with this one's content.
+ //!
+ //! @par Throws
+ //! @li If \c has_nothrow_move<Value>::value is \c true and Value's move constructor or move assignment throws,
+ //! @li If \c has_nothrow_move<Value>::value is \c false and Value's copy constructor or copy assignment throws,
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ template <std::size_t C>
+ void swap(static_vector<value_type, C> & other);
+
+ //! @pre <tt>count <= capacity()</tt>
+ //!
+ //! @brief Inserts or erases elements at the end such that
+ //! the size becomes count. New elements are value initialized.
+ //!
+ //! @param count The number of elements which will be stored in the container.
+ //!
+ //! @par Throws
+ //! If Value's value initialization throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ void resize(size_type count);
+
+ //! @pre <tt>count <= capacity()</tt>
+ //!
+ //! @brief Inserts or erases elements at the end such that
+ //! the size becomes count. New elements are default initialized.
+ //!
+ //! @param count The number of elements which will be stored in the container.
+ //!
+ //! @par Throws
+ //! If Value's default initialization throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ //!
+ //! @par Note
+ //! Non-standard extension
+ void resize(size_type count, default_init_t);
+
+ //! @pre <tt>count <= capacity()</tt>
+ //!
+ //! @brief Inserts or erases elements at the end such that
+ //! the size becomes count. New elements are copy constructed from value.
+ //!
+ //! @param count The number of elements which will be stored in the container.
+ //! @param value The value used to copy construct the new element.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ void resize(size_type count, value_type const& value);
+
+ //! @pre <tt>count <= capacity()</tt>
+ //!
+ //! @brief This call has no effect because the Capacity of this container is constant.
+ //!
+ //! @param count The number of elements which the container should be able to contain.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ void reserve(size_type count) BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @pre <tt>size() < capacity()</tt>
+ //!
+ //! @brief Adds a copy of value at the end.
+ //!
+ //! @param value The value used to copy construct the new element.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor throws.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ void push_back(value_type const& value);
+
+ //! @pre <tt>size() < capacity()</tt>
+ //!
+ //! @brief Moves value to the end.
+ //!
+ //! @param value The value to move construct the new element.
+ //!
+ //! @par Throws
+ //! If Value's move constructor throws.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ void push_back(BOOST_RV_REF(value_type) value);
+
+ //! @pre <tt>!empty()</tt>
+ //!
+ //! @brief Destroys last value and decreases the size.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ void pop_back();
+
+ //! @pre
+ //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
+ //! @li <tt>size() < capacity()</tt>
+ //!
+ //! @brief Inserts a copy of element at p.
+ //!
+ //! @param p The position at which the new value will be inserted.
+ //! @param value The value used to copy construct the new element.
+ //!
+ //! @par Throws
+ //! @li If Value's copy constructor or copy assignment throws
+ //! @li If Value's move constructor or move assignment throws.
+ //!
+ //! @par Complexity
+ //! Constant or linear.
+ iterator insert(const_iterator p, value_type const& value);
+
+ //! @pre
+ //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
+ //! @li <tt>size() < capacity()</tt>
+ //!
+ //! @brief Inserts a move-constructed element at p.
+ //!
+ //! @param p The position at which the new value will be inserted.
+ //! @param value The value used to move construct the new element.
+ //!
+ //! @par Throws
+ //! If Value's move constructor or move assignment throws.
+ //!
+ //! @par Complexity
+ //! Constant or linear.
+ iterator insert(const_iterator p, BOOST_RV_REF(value_type) value);
+
+ //! @pre
+ //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
+ //! @li <tt>size() + count <= capacity()</tt>
+ //!
+ //! @brief Inserts a count copies of value at p.
+ //!
+ //! @param p The position at which new elements will be inserted.
+ //! @param count The number of new elements which will be inserted.
+ //! @param value The value used to copy construct new elements.
+ //!
+ //! @par Throws
+ //! @li If Value's copy constructor or copy assignment throws.
+ //! @li If Value's move constructor or move assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ iterator insert(const_iterator p, size_type count, value_type const& value);
+
+ //! @pre
+ //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
+ //! @li <tt>distance(first, last) <= capacity()</tt>
+ //! @li \c Iterator must meet the \c ForwardTraversalIterator concept.
+ //!
+ //! @brief Inserts a copy of a range <tt>[first, last)</tt> at p.
+ //!
+ //! @param p The position at which new elements will be inserted.
+ //! @param first The iterator to the first element of a range used to construct new elements.
+ //! @param last The iterator to the one after the last element of a range used to construct new elements.
+ //!
+ //! @par Throws
+ //! @li If Value's constructor and assignment taking a dereferenced \c Iterator.
+ //! @li If Value's move constructor or move assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ template <typename Iterator>
+ iterator insert(const_iterator p, Iterator first, Iterator last);
+
+ //! @pre
+ //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>.
+ //! @li <tt>distance(il.begin(), il.end()) <= capacity()</tt>
+ //!
+ //! @brief Inserts a copy of a range <tt>[il.begin(), il.end())</tt> at p.
+ //!
+ //! @param p The position at which new elements will be inserted.
+ //! @param il The std::initializer_list which contains elements that will be inserted.
+ //!
+ //! @par Throws
+ //! @li If Value's constructor and assignment taking a dereferenced std::initializer_list iterator.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ iterator insert(const_iterator p, std::initializer_list<value_type> il);
+
+ //! @pre \c p must be a valid iterator of \c *this in range <tt>[begin(), end())</tt>
+ //!
+ //! @brief Erases Value from p.
+ //!
+ //! @param p The position of the element which will be erased from the container.
+ //!
+ //! @par Throws
+ //! If Value's move assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ iterator erase(const_iterator p);
+
+ //! @pre
+ //! @li \c first and \c last must define a valid range
+ //! @li iterators must be in range <tt>[begin(), end()]</tt>
+ //!
+ //! @brief Erases Values from a range <tt>[first, last)</tt>.
+ //!
+ //! @param first The position of the first element of a range which will be erased from the container.
+ //! @param last The position of the one after the last element of a range which will be erased from the container.
+ //!
+ //! @par Throws
+ //! If Value's move assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ iterator erase(const_iterator first, const_iterator last);
+
+ //! @pre <tt>distance(first, last) <= capacity()</tt>
+ //!
+ //! @brief Assigns a range <tt>[first, last)</tt> of Values to this container.
+ //!
+ //! @param first The iterator to the first element of a range used to construct new content of this container.
+ //! @param last The iterator to the one after the last element of a range used to construct new content of this container.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor or copy assignment throws,
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ template <typename Iterator>
+ void assign(Iterator first, Iterator last);
+
+ //! @pre <tt>distance(il.begin(), il.end()) <= capacity()</tt>
+ //!
+ //! @brief Assigns a range <tt>[il.begin(), il.end())</tt> of Values to this container.
+ //!
+ //! @param il std::initializer_list with values used to construct new content of this container.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor or copy assignment throws,
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ void assign(std::initializer_list<value_type> il);
+
+ //! @pre <tt>count <= capacity()</tt>
+ //!
+ //! @brief Assigns a count copies of value to this container.
+ //!
+ //! @param count The new number of elements which will be container in the container.
+ //! @param value The value which will be used to copy construct the new content.
+ //!
+ //! @par Throws
+ //! If Value's copy constructor or copy assignment throws.
+ //!
+ //! @par Complexity
+ //! Linear O(N).
+ void assign(size_type count, value_type const& value);
+
+ //! @pre <tt>size() < capacity()</tt>
+ //!
+ //! @brief Inserts a Value constructed with
+ //! \c std::forward<Args>(args)... in the end of the container.
+ //!
+ //! @return A reference to the created object.
+ //!
+ //! @param args The arguments of the constructor of the new element which will be created at the end of the container.
+ //!
+ //! @par Throws
+ //! If in-place constructor throws or Value's move constructor throws.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ template<class ...Args>
+ reference emplace_back(Args &&...args);
+
+ //! @pre
+ //! @li \c p must be a valid iterator of \c *this in range <tt>[begin(), end()]</tt>
+ //! @li <tt>size() < capacity()</tt>
+ //!
+ //! @brief Inserts a Value constructed with
+ //! \c std::forward<Args>(args)... before p
+ //!
+ //! @param p The position at which new elements will be inserted.
+ //! @param args The arguments of the constructor of the new element.
+ //!
+ //! @par Throws
+ //! If in-place constructor throws or if Value's move constructor or move assignment throws.
+ //!
+ //! @par Complexity
+ //! Constant or linear.
+ template<class ...Args>
+ iterator emplace(const_iterator p, Args &&...args);
+
+ //! @brief Removes all elements from the container.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @pre <tt>i < size()</tt>
+ //!
+ //! @brief Returns reference to the i-th element.
+ //!
+ //! @param i The element's index.
+ //!
+ //! @return reference to the i-th element
+ //! from the beginning of the container.
+ //!
+ //! @par Throws
+ //! \c std::out_of_range exception by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ reference at(size_type i);
+
+ //! @pre <tt>i < size()</tt>
+ //!
+ //! @brief Returns const reference to the i-th element.
+ //!
+ //! @param i The element's index.
+ //!
+ //! @return const reference to the i-th element
+ //! from the beginning of the container.
+ //!
+ //! @par Throws
+ //! \c std::out_of_range exception by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_reference at(size_type i) const;
+
+ //! @pre <tt>i < size()</tt>
+ //!
+ //! @brief Returns reference to the i-th element.
+ //!
+ //! @param i The element's index.
+ //!
+ //! @return reference to the i-th element
+ //! from the beginning of the container.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ reference operator[](size_type i);
+
+ //! @pre <tt>i < size()</tt>
+ //!
+ //! @brief Returns const reference to the i-th element.
+ //!
+ //! @param i The element's index.
+ //!
+ //! @return const reference to the i-th element
+ //! from the beginning of the container.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_reference operator[](size_type i) const;
+
+ //! @pre <tt>i =< size()</tt>
+ //!
+ //! @brief Returns a iterator to the i-th element.
+ //!
+ //! @param i The element's index.
+ //!
+ //! @return a iterator to the i-th element.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ iterator nth(size_type i);
+
+ //! @pre <tt>i =< size()</tt>
+ //!
+ //! @brief Returns a const_iterator to the i-th element.
+ //!
+ //! @param i The element's index.
+ //!
+ //! @return a const_iterator to the i-th element.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_iterator nth(size_type i) const;
+
+ //! @pre <tt>begin() <= p <= end()</tt>
+ //!
+ //! @brief Returns the index of the element pointed by p.
+ //!
+ //! @param p An iterator to the element.
+ //!
+ //! @return The index of the element pointed by p.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ size_type index_of(iterator p);
+
+ //! @pre <tt>begin() <= p <= end()</tt>
+ //!
+ //! @brief Returns the index of the element pointed by p.
+ //!
+ //! @param p A const_iterator to the element.
+ //!
+ //! @return a const_iterator to the i-th element.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ size_type index_of(const_iterator p) const;
+
+ //! @pre \c !empty()
+ //!
+ //! @brief Returns reference to the first element.
+ //!
+ //! @return reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ reference front();
+
+ //! @pre \c !empty()
+ //!
+ //! @brief Returns const reference to the first element.
+ //!
+ //! @return const reference to the first element
+ //! from the beginning of the container.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_reference front() const;
+
+ //! @pre \c !empty()
+ //!
+ //! @brief Returns reference to the last element.
+ //!
+ //! @return reference to the last element
+ //! from the beginning of the container.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ reference back();
+
+ //! @pre \c !empty()
+ //!
+ //! @brief Returns const reference to the first element.
+ //!
+ //! @return const reference to the last element
+ //! from the beginning of the container.
+ //!
+ //! @par Throws
+ //! Nothing by default.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_reference back() const;
+
+ //! @brief Pointer such that <tt>[data(), data() + size())</tt> is a valid range.
+ //! For a non-empty vector <tt>data() == &front()</tt>.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ Value * data() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Const pointer such that <tt>[data(), data() + size())</tt> is a valid range.
+ //! For a non-empty vector <tt>data() == &front()</tt>.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const Value * data() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns iterator to the first element.
+ //!
+ //! @return iterator to the first element contained in the vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns const iterator to the first element.
+ //!
+ //! @return const_iterator to the first element contained in the vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns const iterator to the first element.
+ //!
+ //! @return const_iterator to the first element contained in the vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns iterator to the one after the last element.
+ //!
+ //! @return iterator pointing to the one after the last element contained in the vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns const iterator to the one after the last element.
+ //!
+ //! @return const_iterator pointing to the one after the last element contained in the vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns const iterator to the one after the last element.
+ //!
+ //! @return const_iterator pointing to the one after the last element contained in the vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns reverse iterator to the first element of the reversed container.
+ //!
+ //! @return reverse_iterator pointing to the beginning
+ //! of the reversed static_vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns const reverse iterator to the first element of the reversed container.
+ //!
+ //! @return const_reverse_iterator pointing to the beginning
+ //! of the reversed static_vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns const reverse iterator to the first element of the reversed container.
+ //!
+ //! @return const_reverse_iterator pointing to the beginning
+ //! of the reversed static_vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns reverse iterator to the one after the last element of the reversed container.
+ //!
+ //! @return reverse_iterator pointing to the one after the last element
+ //! of the reversed static_vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns const reverse iterator to the one after the last element of the reversed container.
+ //!
+ //! @return const_reverse_iterator pointing to the one after the last element
+ //! of the reversed static_vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns const reverse iterator to the one after the last element of the reversed container.
+ //!
+ //! @return const_reverse_iterator pointing to the one after the last element
+ //! of the reversed static_vector.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns container's capacity.
+ //!
+ //! @return container's capacity.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ static size_type capacity() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns container's capacity.
+ //!
+ //! @return container's capacity.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ static size_type max_size() BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Returns the number of stored elements.
+ //!
+ //! @return Number of elements contained in the container.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ //! @brief Queries if the container contains elements.
+ //!
+ //! @return true if the number of elements contained in the
+ //! container is equal to 0.
+ //!
+ //! @par Throws
+ //! Nothing.
+ //!
+ //! @par Complexity
+ //! Constant O(1).
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW;
+#else
+
+ BOOST_CONTAINER_FORCEINLINE friend void swap(static_vector &x, static_vector &y)
+ {
+ x.swap(y);
+ }
+
+#endif // BOOST_CONTAINER_DOXYGEN_INVOKED
+
+};
+
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! @brief Checks if contents of two static_vectors are equal.
+//!
+//! @ingroup static_vector_non_member
+//!
+//! @param x The first static_vector.
+//! @param y The second static_vector.
+//!
+//! @return \c true if containers have the same size and elements in both containers are equal.
+//!
+//! @par Complexity
+//! Linear O(N).
+template<typename V, std::size_t C1, std::size_t C2>
+bool operator== (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
+
+//! @brief Checks if contents of two static_vectors are not equal.
+//!
+//! @ingroup static_vector_non_member
+//!
+//! @param x The first static_vector.
+//! @param y The second static_vector.
+//!
+//! @return \c true if containers have different size or elements in both containers are not equal.
+//!
+//! @par Complexity
+//! Linear O(N).
+template<typename V, std::size_t C1, std::size_t C2>
+bool operator!= (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
+
+//! @brief Lexicographically compares static_vectors.
+//!
+//! @ingroup static_vector_non_member
+//!
+//! @param x The first static_vector.
+//! @param y The second static_vector.
+//!
+//! @return \c true if x compares lexicographically less than y.
+//!
+//! @par Complexity
+//! Linear O(N).
+template<typename V, std::size_t C1, std::size_t C2>
+bool operator< (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
+
+//! @brief Lexicographically compares static_vectors.
+//!
+//! @ingroup static_vector_non_member
+//!
+//! @param x The first static_vector.
+//! @param y The second static_vector.
+//!
+//! @return \c true if y compares lexicographically less than x.
+//!
+//! @par Complexity
+//! Linear O(N).
+template<typename V, std::size_t C1, std::size_t C2>
+bool operator> (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
+
+//! @brief Lexicographically compares static_vectors.
+//!
+//! @ingroup static_vector_non_member
+//!
+//! @param x The first static_vector.
+//! @param y The second static_vector.
+//!
+//! @return \c true if y don't compare lexicographically less than x.
+//!
+//! @par Complexity
+//! Linear O(N).
+template<typename V, std::size_t C1, std::size_t C2>
+bool operator<= (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
+
+//! @brief Lexicographically compares static_vectors.
+//!
+//! @ingroup static_vector_non_member
+//!
+//! @param x The first static_vector.
+//! @param y The second static_vector.
+//!
+//! @return \c true if x don't compare lexicographically less than y.
+//!
+//! @par Complexity
+//! Linear O(N).
+template<typename V, std::size_t C1, std::size_t C2>
+bool operator>= (static_vector<V, C1> const& x, static_vector<V, C2> const& y);
+
+//! @brief Swaps contents of two static_vectors.
+//!
+//! This function calls static_vector::swap().
+//!
+//! @ingroup static_vector_non_member
+//!
+//! @param x The first static_vector.
+//! @param y The second static_vector.
+//!
+//! @par Complexity
+//! Linear O(N).
+template<typename V, std::size_t C1, std::size_t C2>
+inline void swap(static_vector<V, C1> & x, static_vector<V, C2> & y);
+
+#else
+
+template<typename V, std::size_t C1, std::size_t C2>
+inline void swap(static_vector<V, C1> & x, static_vector<V, C2> & y
+ , typename dtl::enable_if_c< C1 != C2>::type * = 0)
+{
+ x.swap(y);
+}
+
+#endif // BOOST_CONTAINER_DOXYGEN_INVOKED
+
+}} // namespace boost::container
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_STATIC_VECTOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/container/string.hpp b/src/third_party/boost-1.69.0/boost/container/string.hpp
new file mode 100644
index 00000000000..ca51cfdd73f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/string.hpp
@@ -0,0 +1,3504 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_STRING_HPP
+#define BOOST_CONTAINER_STRING_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+#include <boost/container/container_fwd.hpp>
+// container
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+#include <boost/container/throw_exception.hpp>
+// container/detail
+#include <boost/container/detail/alloc_helpers.hpp>
+#include <boost/container/detail/allocator_version_traits.hpp>
+#include <boost/container/detail/allocation_type.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/container/detail/min_max.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/next_capacity.hpp>
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/container/detail/version_type.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/minimal_char_traits_header.hpp>
+#include <boost/container/detail/algorithm.hpp>
+
+#include <boost/intrusive/pointer_traits.hpp>
+
+#include <boost/move/utility_core.hpp>
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/traits.hpp>
+
+#include <boost/static_assert.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+#include <boost/functional/hash.hpp>
+
+#include <algorithm>
+#include <iosfwd>
+#include <istream>
+#include <ostream>
+#include <ios>
+#include <locale>
+#include <cstddef>
+#include <climits>
+
+//std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list> //for std::initializer_list
+#endif
+
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+namespace dtl {
+// ------------------------------------------------------------
+// Class basic_string_base.
+
+// basic_string_base is a helper class that makes it it easier to write
+// an exception-safe version of basic_string. The constructor allocates,
+// but does not initialize, a block of memory. The destructor
+// deallocates, but does not destroy elements within, a block of
+// memory. The destructor assumes that the memory either is the internal buffer,
+// or else points to a block of memory that was allocated using string_base's
+// allocator and whose size is this->m_storage.
+template <class Allocator>
+class basic_string_base
+{
+ basic_string_base & operator=(const basic_string_base &);
+ basic_string_base(const basic_string_base &);
+
+ typedef allocator_traits<Allocator> allocator_traits_type;
+ public:
+ typedef Allocator allocator_type;
+ typedef allocator_type stored_allocator_type;
+ typedef typename allocator_traits_type::pointer pointer;
+ typedef typename allocator_traits_type::value_type value_type;
+ typedef typename allocator_traits_type::size_type size_type;
+ typedef ::boost::intrusive::pointer_traits<pointer> pointer_traits;
+
+ basic_string_base()
+ : members_()
+ {}
+
+ explicit basic_string_base(const allocator_type& a)
+ : members_(a)
+ {}
+
+ explicit basic_string_base(BOOST_RV_REF(allocator_type) a)
+ : members_(boost::move(a))
+ {}
+
+ basic_string_base(const allocator_type& a, size_type n)
+ : members_(a)
+ {
+ this->allocate_initial_block(n);
+ }
+
+ explicit basic_string_base(size_type n)
+ : members_()
+ {
+ this->allocate_initial_block(n);
+ }
+
+ ~basic_string_base()
+ {
+ if(!this->is_short()){
+ this->deallocate(this->priv_long_addr(), this->priv_long_storage());
+ }
+ }
+
+ private:
+
+ //This is the structure controlling a long string
+ struct long_t
+ {
+ size_type is_short : 1;
+ size_type length : (sizeof(size_type)*CHAR_BIT - 1);
+ size_type storage;
+ pointer start;
+
+ long_t()
+ : is_short(0)
+ {}
+
+ long_t(size_type len, size_type stor, pointer ptr)
+ : is_short(0), length(len), storage(stor), start(ptr)
+ {}
+
+ long_t(const long_t &other)
+ {
+ this->is_short = false;
+ length = other.length;
+ storage = other.storage;
+ start = other.start;
+ }
+
+ long_t &operator= (const long_t &other)
+ {
+ length = other.length;
+ storage = other.storage;
+ start = other.start;
+ return *this;
+ }
+ };
+
+ //This type is the first part of the structure controlling a short string
+ //The "data" member stores
+ struct short_header
+ {
+ unsigned char is_short : 1;
+ unsigned char length : (CHAR_BIT - 1);
+ };
+
+ //This type has the same alignment and size as long_t but it's POD
+ //so, unlike long_t, it can be placed in a union
+
+ typedef typename dtl::aligned_storage
+ <sizeof(long_t), dtl::alignment_of<long_t>::value>::type long_raw_t;
+
+ protected:
+ static const size_type MinInternalBufferChars = 8;
+ static const size_type AlignmentOfValueType =
+ alignment_of<value_type>::value;
+ static const size_type ShortDataOffset = ((sizeof(short_header)-1)/AlignmentOfValueType+1)*AlignmentOfValueType;
+ static const size_type ZeroCostInternalBufferChars =
+ (sizeof(long_t) - ShortDataOffset)/sizeof(value_type);
+ static const size_type UnalignedFinalInternalBufferChars =
+ (ZeroCostInternalBufferChars > MinInternalBufferChars) ?
+ ZeroCostInternalBufferChars : MinInternalBufferChars;
+
+ struct short_t
+ {
+ short_header h;
+ value_type data[UnalignedFinalInternalBufferChars];
+ };
+
+ union repr_t_size_t
+ {
+ long_raw_t r;
+ short_t s;
+ };
+
+ union repr_t
+ {
+ long_raw_t r_aligner;
+ short_t s_aligner;
+ unsigned char data[sizeof(repr_t_size_t)];
+ };
+
+ struct members_holder
+ : public Allocator
+ {
+ void init()
+ {
+ short_t &s = *::new(this->m_repr.data) short_t;
+ s.h.is_short = 1;
+ s.h.length = 0;
+ }
+
+ members_holder()
+ : Allocator()
+ { this->init(); }
+
+ template<class AllocatorConvertible>
+ explicit members_holder(BOOST_FWD_REF(AllocatorConvertible) a)
+ : Allocator(boost::forward<AllocatorConvertible>(a))
+ { this->init(); }
+
+ const short_t *pshort_repr() const
+ { return reinterpret_cast<const short_t*>(m_repr.data); }
+
+ const long_t *plong_repr() const
+ { return reinterpret_cast<const long_t*>(m_repr.data); }
+
+ short_t *pshort_repr()
+ { return reinterpret_cast<short_t*>(m_repr.data); }
+
+ long_t *plong_repr()
+ { return reinterpret_cast<long_t*>(m_repr.data); }
+
+ repr_t m_repr;
+ } members_;
+
+ const Allocator &alloc() const
+ { return members_; }
+
+ Allocator &alloc()
+ { return members_; }
+
+ static const size_type InternalBufferChars = (sizeof(repr_t) - ShortDataOffset)/sizeof(value_type);
+
+ private:
+
+ static const size_type MinAllocation = InternalBufferChars*2;
+
+ protected:
+ bool is_short() const
+ {
+ //Access and copy (to avoid UB) the first byte of the union to know if the
+ //active representation is short or long
+ short_header hdr;
+ BOOST_STATIC_ASSERT((sizeof(short_header) == 1));
+ *(unsigned char*)&hdr = *(unsigned char*)&this->members_.m_repr;
+ return hdr.is_short != 0;
+ }
+
+ short_t *construct_short()
+ {
+ short_t *ps = ::new(this->members_.m_repr.data) short_t;
+ ps->h.is_short = 1;
+ return ps;
+ }
+
+ void destroy_short()
+ {
+ BOOST_ASSERT(this->is_short());
+ this->members_.pshort_repr()->~short_t();
+ }
+
+ short_t *assure_short()
+ {
+ if (!this->is_short()){
+ this->destroy_long();
+ return construct_short();
+ }
+ return this->members_.pshort_repr();
+ }
+
+ long_t *construct_long()
+ {
+ long_t *pl = ::new(this->members_.m_repr.data) long_t;
+ //is_short flag is written in the constructor
+ return pl;
+ }
+
+ void destroy_long()
+ {
+ BOOST_ASSERT(!this->is_short());
+ this->members_.plong_repr()->~long_t();
+ }
+
+ long_t *assure_long()
+ {
+ if (this->is_short()){
+ this->destroy_short();
+ return this->construct_long();
+ }
+ return this->members_.plong_repr();
+ }
+
+
+ protected:
+
+ typedef dtl::integral_constant<unsigned,
+ boost::container::dtl::version<Allocator>::value> alloc_version;
+
+ pointer allocation_command(allocation_type command,
+ size_type limit_size,
+ size_type &prefer_in_recvd_out_size,
+ pointer &reuse)
+ {
+ if(this->is_short() && (command & (expand_fwd | expand_bwd)) ){
+ reuse = 0;
+ command &= ~(expand_fwd | expand_bwd);
+ }
+ return dtl::allocator_version_traits<Allocator>::allocation_command
+ (this->alloc(), command, limit_size, prefer_in_recvd_out_size, reuse);
+ }
+
+ size_type next_capacity(size_type additional_objects) const
+ {
+ return growth_factor_100()
+ ( this->priv_storage(), additional_objects, allocator_traits_type::max_size(this->alloc()));
+ }
+
+ void deallocate(pointer p, size_type n)
+ {
+ if (p && (n > InternalBufferChars))
+ this->alloc().deallocate(p, n);
+ }
+
+ void construct(pointer p, const value_type &value = value_type())
+ {
+ allocator_traits_type::construct
+ ( this->alloc()
+ , boost::movelib::to_raw_pointer(p)
+ , value
+ );
+ }
+
+ void destroy(pointer p, size_type n)
+ {
+ value_type *raw_p = boost::movelib::to_raw_pointer(p);
+ for(; n--; ++raw_p){
+ allocator_traits_type::destroy( this->alloc(), raw_p);
+ }
+ }
+
+ void destroy(pointer p)
+ {
+ allocator_traits_type::destroy
+ ( this->alloc()
+ , boost::movelib::to_raw_pointer(p)
+ );
+ }
+
+ void allocate_initial_block(size_type n)
+ {
+ if (n <= this->max_size()) {
+ if(n > InternalBufferChars){
+ size_type new_cap = this->next_capacity(n);
+ pointer reuse = 0;
+ pointer p = this->allocation_command(allocate_new, n, new_cap, reuse);
+ BOOST_ASSERT(this->is_short());
+ this->construct_long();
+ this->priv_long_addr(p);
+ this->priv_long_size(0);
+ this->priv_storage(new_cap);
+ }
+ }
+ else{
+ throw_length_error("basic_string::allocate_initial_block max_size() exceeded");
+ }
+ }
+
+ void deallocate_block()
+ { this->deallocate(this->priv_addr(), this->priv_storage()); }
+
+ size_type max_size() const
+ { return allocator_traits_type::max_size(this->alloc()) - 1; }
+
+ protected:
+ size_type priv_capacity() const
+ { return this->priv_storage() - 1; }
+
+ pointer priv_short_addr() const
+ { return pointer_traits::pointer_to(const_cast<value_type&>(this->members_.pshort_repr()->data[0])); }
+
+ //GCC seems a bit confused about uninitialized accesses
+ #if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+ #endif
+
+ pointer priv_long_addr() const
+ { return this->members_.plong_repr()->start; }
+
+ pointer priv_addr() const
+ {
+ return this->is_short()
+ ? priv_short_addr()
+ : priv_long_addr()
+ ;
+ }
+
+ pointer priv_end_addr() const
+ {
+ return this->is_short()
+ ? this->priv_short_addr() + this->priv_short_size()
+ : this->priv_long_addr() + this->priv_long_size()
+ ;
+ }
+
+ void priv_long_addr(pointer addr)
+ { this->members_.plong_repr()->start = addr; }
+
+ size_type priv_storage() const
+ { return this->is_short() ? priv_short_storage() : priv_long_storage(); }
+
+ size_type priv_short_storage() const
+ { return InternalBufferChars; }
+
+ size_type priv_long_storage() const
+ { return this->members_.plong_repr()->storage; }
+
+ void priv_storage(size_type storage)
+ {
+ if(!this->is_short())
+ this->priv_long_storage(storage);
+ }
+
+ void priv_long_storage(size_type storage)
+ {
+ this->members_.plong_repr()->storage = storage;
+ }
+
+ size_type priv_size() const
+ { return this->is_short() ? this->priv_short_size() : this->priv_long_size(); }
+
+ size_type priv_short_size() const
+ { return this->members_.pshort_repr()->h.length; }
+
+ size_type priv_long_size() const
+ { return this->members_.plong_repr()->length; }
+
+ void priv_size(size_type sz)
+ {
+ if(this->is_short())
+ this->priv_short_size(sz);
+ else
+ this->priv_long_size(sz);
+ }
+
+ void priv_short_size(size_type sz)
+ { this->members_.pshort_repr()->h.length = (unsigned char)sz; }
+
+ void priv_long_size(size_type sz)
+ { this->members_.plong_repr()->length = sz; }
+
+ #if defined(BOOST_GCC) && (BOOST_GCC >= 40700)
+ #pragma GCC diagnostic pop
+ #endif
+
+ void swap_data(basic_string_base& other)
+ {
+ if(this->is_short()){
+ if(other.is_short()){
+ repr_t tmp(this->members_.m_repr);
+ this->members_.m_repr = other.members_.m_repr;
+ other.members_.m_repr = tmp;
+ }
+ else{
+ short_t short_backup(*this->members_.pshort_repr());
+ this->members_.pshort_repr()->~short_t();
+ ::new(this->members_.plong_repr()) long_t(*other.members_.plong_repr());
+ other.members_.plong_repr()->~long_t();
+ ::new(other.members_.pshort_repr()) short_t(short_backup);
+ }
+ }
+ else{
+ if(other.is_short()){
+ short_t short_backup(*other.members_.pshort_repr());
+ other.members_.pshort_repr()->~short_t();
+ ::new(other.members_.plong_repr()) long_t(*this->members_.plong_repr());
+ this->members_.plong_repr()->~long_t();
+ ::new(this->members_.pshort_repr()) short_t(short_backup);
+ }
+ else{
+ boost::adl_move_swap(*this->members_.plong_repr(), *other.members_.plong_repr());
+ }
+ }
+ }
+};
+
+} //namespace dtl {
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! The basic_string class represents a Sequence of characters. It contains all the
+//! usual operations of a Sequence, and, additionally, it contains standard string
+//! operations such as search and concatenation.
+//!
+//! The basic_string class is parameterized by character type, and by that type's
+//! Character Traits.
+//!
+//! This class has performance characteristics very much like vector<>, meaning,
+//! for example, that it does not perform reference-count or copy-on-write, and that
+//! concatenation of two strings is an O(N) operation.
+//!
+//! Some of basic_string's member functions use an unusual method of specifying positions
+//! and ranges. In addition to the conventional method using iterators, many of
+//! basic_string's member functions use a single value pos of type size_type to represent a
+//! position (in which case the position is begin() + pos, and many of basic_string's
+//! member functions use two values, pos and n, to represent a range. In that case pos is
+//! the beginning of the range and n is its size. That is, the range is
+//! [begin() + pos, begin() + pos + n).
+//!
+//! Note that the C++ standard does not specify the complexity of basic_string operations.
+//! In this implementation, basic_string has performance characteristics very similar to
+//! those of vector: access to a single character is O(1), while copy and concatenation
+//! are O(N).
+//!
+//! In this implementation, begin(),
+//! end(), rbegin(), rend(), operator[], c_str(), and data() do not invalidate iterators.
+//! In this implementation, iterators are only invalidated by member functions that
+//! explicitly change the string's contents.
+//!
+//! \tparam CharT The type of character it contains.
+//! \tparam Traits The Character Traits type, which encapsulates basic character operations
+//! \tparam Allocator The allocator, used for internal memory management.
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+template <class CharT, class Traits = std::char_traits<CharT>, class Allocator = new_allocator<CharT> >
+#else
+template <class CharT, class Traits, class Allocator>
+#endif
+class basic_string
+ : private dtl::basic_string_base<Allocator>
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ typedef allocator_traits<Allocator> allocator_traits_type;
+ BOOST_COPYABLE_AND_MOVABLE(basic_string)
+ typedef dtl::basic_string_base<Allocator> base_t;
+ static const typename base_t::size_type InternalBufferChars = base_t::InternalBufferChars;
+
+ protected:
+ // Allocator helper class to use a char_traits as a function object.
+
+ template <class Tr>
+ struct Eq_traits
+ {
+ //Compatibility with std::binary_function
+ typedef typename Tr::char_type first_argument_type;
+ typedef typename Tr::char_type second_argument_type;
+ typedef bool result_type;
+
+ bool operator()(const first_argument_type& x, const second_argument_type& y) const
+ { return Tr::eq(x, y); }
+ };
+
+ template <class Tr>
+ struct Not_within_traits
+ {
+ typedef typename Tr::char_type argument_type;
+ typedef bool result_type;
+
+ typedef const typename Tr::char_type* Pointer;
+ const Pointer m_first;
+ const Pointer m_last;
+
+ Not_within_traits(Pointer f, Pointer l)
+ : m_first(f), m_last(l) {}
+
+ bool operator()(const typename Tr::char_type& x) const
+ {
+ return boost::container::find_if(m_first, m_last,
+ boost::container::bind1st(Eq_traits<Tr>(), x)) == m_last;
+ }
+ };
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+ typedef Traits traits_type;
+ typedef CharT value_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(allocator_type) stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(pointer) iterator;
+ typedef BOOST_CONTAINER_IMPDEF(const_pointer) const_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
+ static const size_type npos = size_type(-1);
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ typedef constant_iterator<CharT, difference_type> cvalue_iterator;
+ typedef typename base_t::alloc_version alloc_version;
+ typedef ::boost::intrusive::pointer_traits<pointer> pointer_traits;
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public: // Constructor, destructor, assignment.
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ struct reserve_t {};
+
+ basic_string(reserve_t, size_type n,
+ const allocator_type& a = allocator_type())
+ //Select allocator as in copy constructor as reserve_t-based constructors
+ //are two step copies optimized for capacity
+ : base_t( allocator_traits_type::select_on_container_copy_construction(a)
+ , n + 1)
+ { this->priv_terminate_string(); }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Default constructs a basic_string.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor throws.
+ basic_string() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : base_t()
+ { this->priv_terminate_string(); }
+
+
+ //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: Nothing
+ explicit basic_string(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
+ : base_t(a)
+ { this->priv_terminate_string(); }
+
+ //! <b>Effects</b>: Copy constructs a basic_string.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor or allocation throws.
+ basic_string(const basic_string& s)
+ : base_t(allocator_traits_type::select_on_container_copy_construction(s.alloc()))
+ {
+ this->priv_terminate_string();
+ this->assign(s.begin(), s.end());
+ }
+
+ //! <b>Effects</b>: Same as basic_string(sv.data(), sv.size(), a).
+ //!
+ //! <b>Throws</b>: If allocator_type's default constructor or allocation throws.
+ template<template <class, class> class BasicStringView>
+ explicit basic_string(BasicStringView<CharT, Traits> sv, const Allocator& a = Allocator())
+ : base_t(allocator_traits_type::select_on_container_copy_construction(a))
+ {
+ this->priv_terminate_string();
+ this->assign(sv);
+ }
+
+ //! <b>Effects</b>: Move constructor. Moves s's resources to *this.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ basic_string(BOOST_RV_REF(basic_string) s) BOOST_NOEXCEPT_OR_NOTHROW
+ : base_t(boost::move(s.alloc()))
+ {
+ if(s.alloc() == this->alloc()){
+ this->swap_data(s);
+ }
+ else{
+ this->assign(s.begin(), s.end());
+ }
+ }
+
+ //! <b>Effects</b>: Copy constructs a basic_string using the specified allocator.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocation throws.
+ basic_string(const basic_string& s, const allocator_type &a)
+ : base_t(a)
+ {
+ this->priv_terminate_string();
+ this->assign(s.begin(), s.end());
+ }
+
+ //! <b>Effects</b>: Move constructor using the specified allocator.
+ //! Moves s's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocation throws.
+ //!
+ //! <b>Complexity</b>: Constant if a == s.get_allocator(), linear otherwise.
+ basic_string(BOOST_RV_REF(basic_string) s, const allocator_type &a)
+ : base_t(a)
+ {
+ this->priv_terminate_string();
+ if(a == this->alloc()){
+ this->swap_data(s);
+ }
+ else{
+ this->assign(s.begin(), s.end());
+ }
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
+ //! and is initialized by a specific number of characters of the s string.
+ basic_string(const basic_string& s, size_type pos, size_type n = npos)
+ : base_t()
+ {
+ this->priv_terminate_string();
+ if (pos > s.size())
+ throw_out_of_range("basic_string::basic_string out of range position");
+ else
+ this->assign
+ (s.begin() + pos, s.begin() + pos + dtl::min_value(n, s.size() - pos));
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
+ //! and is initialized by a specific number of characters of the s string.
+ basic_string(const basic_string& s, size_type pos, size_type n, const allocator_type& a)
+ : base_t(a)
+ {
+ this->priv_terminate_string();
+ if (pos > s.size())
+ throw_out_of_range("basic_string::basic_string out of range position");
+ else
+ this->assign
+ (s.begin() + pos, s.begin() + pos + dtl::min_value(n, s.size() - pos));
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string taking a default-constructed allocator,
+ //! and is initialized by a specific number of characters of the s c-string.
+ basic_string(const CharT* s, size_type n)
+ : base_t()
+ {
+ this->priv_terminate_string();
+ this->assign(s, s + n);
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
+ //! and is initialized by a specific number of characters of the s c-string.
+ basic_string(const CharT* s, size_type n, const allocator_type& a)
+ : base_t(a)
+ {
+ this->priv_terminate_string();
+ this->assign(s, s + n);
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
+ //! and is initialized by the null-terminated s c-string.
+ basic_string(const CharT* s)
+ : base_t()
+ {
+ this->priv_terminate_string();
+ this->assign(s, s + Traits::length(s));
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
+ //! and is initialized by the null-terminated s c-string.
+ basic_string(const CharT* s, const allocator_type& a)
+ : base_t(a)
+ {
+ this->priv_terminate_string();
+ this->assign(s, s + Traits::length(s));
+ }
+
+
+ //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
+ //! and is initialized by n copies of c.
+ basic_string(size_type n, CharT c)
+ : base_t()
+ {
+ this->priv_terminate_string();
+ this->assign(n, c);
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
+ //! and is initialized by n copies of c.
+ basic_string(size_type n, CharT c, const allocator_type& a)
+ : base_t(a)
+ {
+ this->priv_terminate_string();
+ this->assign(n, c);
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
+ //! and is initialized by n default-initialized characters.
+ basic_string(size_type n, default_init_t)
+ : base_t(n + 1)
+ {
+ this->priv_size(n);
+ this->priv_terminate_string();
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
+ //! and is initialized by n default-initialized characters.
+ basic_string(size_type n, default_init_t, const allocator_type& a)
+ : base_t(a, n + 1)
+ {
+ this->priv_size(n);
+ this->priv_terminate_string();
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string with a default-constructed allocator,
+ //! and a range of iterators.
+ template <class InputIterator>
+ basic_string(InputIterator f, InputIterator l)
+ : base_t()
+ {
+ this->priv_terminate_string();
+ this->assign(f, l);
+ }
+
+ //! <b>Effects</b>: Constructs a basic_string taking the allocator as parameter,
+ //! and a range of iterators.
+ template <class InputIterator>
+ basic_string(InputIterator f, InputIterator l, const allocator_type& a)
+ : base_t(a)
+ {
+ this->priv_terminate_string();
+ this->assign(f, l);
+ }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Same as basic_string(il.begin(), il.end(), a).
+ //!
+ basic_string(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
+ : base_t(a)
+ {
+ this->priv_terminate_string();
+ this->assign(il.begin(), il.end());
+ }
+ #endif
+
+ //! <b>Effects</b>: Destroys the basic_string. All used memory is deallocated.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ ~basic_string() BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ //! <b>Effects</b>: Copy constructs a string.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ basic_string& operator=(BOOST_COPY_ASSIGN_REF(basic_string) x)
+ {
+ if (&x != this){
+ allocator_type &this_alloc = this->alloc();
+ const allocator_type &x_alloc = x.alloc();
+ dtl::bool_<allocator_traits_type::
+ propagate_on_container_copy_assignment::value> flag;
+ if(flag && this_alloc != x_alloc){
+ if(!this->is_short()){
+ this->deallocate_block();
+ this->assure_short();
+ Traits::assign(*this->priv_addr(), CharT(0));
+ this->priv_short_size(0);
+ }
+ }
+ dtl::assign_alloc(this->alloc(), x.alloc(), flag);
+ this->assign(x.begin(), x.end());
+ }
+ return *this;
+ }
+
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and allocation throws
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ basic_string& operator=(BOOST_RV_REF(basic_string) x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ //for move constructor, no aliasing (&x != this) is assumed.
+ BOOST_ASSERT(this != &x);
+ allocator_type &this_alloc = this->alloc();
+ allocator_type &x_alloc = x.alloc();
+ const bool propagate_alloc = allocator_traits_type::
+ propagate_on_container_move_assignment::value;
+ dtl::bool_<propagate_alloc> flag;
+ const bool allocators_equal = this_alloc == x_alloc; (void)allocators_equal;
+ //Resources can be transferred if both allocators are
+ //going to be equal after this function (either propagated or already equal)
+ if(propagate_alloc || allocators_equal){
+ //Destroy objects but retain memory in case x reuses it in the future
+ this->clear();
+ //Move allocator if needed
+ dtl::move_alloc(this_alloc, x_alloc, flag);
+ //Nothrow swap
+ this->swap_data(x);
+ }
+ //Else do a one by one move
+ else{
+ this->assign( x.begin(), x.end());
+ }
+ return *this;
+ }
+
+ //! <b>Effects</b>: Assignment from a null-terminated c-string.
+ //!
+ basic_string& operator=(const CharT* s)
+ { return this->assign(s, s + Traits::length(s)); }
+
+ //! <b>Effects</b>: Returns *this = basic_string(1, c).
+ //!
+ basic_string& operator=(CharT c)
+ { return this->assign(static_cast<size_type>(1), c); }
+
+ //! <b>Effects</b>: Equivalent to return assign(sv).
+ //!
+ template<template <class, class> class BasicStringView>
+ basic_string& operator=(BasicStringView<CharT, Traits> sv)
+ { return this->assign(sv.data(), sv.size()); }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Returns *this = basic_string(il);
+ //!
+ basic_string& operator=(std::initializer_list<CharT> il)
+ {
+ return this->assign(il.begin(), il.end());
+ }
+ #endif
+
+ //! <b>Effects</b>: Returns a copy of the internal allocator.
+ //!
+ //! <b>Throws</b>: If allocator's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->alloc(); }
+
+ //////////////////////////////////////////////
+ //
+ // iterators
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_addr(); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_addr(); }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_end_addr(); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_end_addr(); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(this->priv_end_addr()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->crbegin(); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(this->priv_addr()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->crend(); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_addr(); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_end_addr(); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->priv_end_addr()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->priv_addr()); }
+
+ //////////////////////////////////////////////
+ //
+ // capacity
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns true if the vector contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return !this->priv_size(); }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_size(); }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type length() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->size(); }
+
+ //! <b>Effects</b>: Returns the largest possible size of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return base_t::max_size(); }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are copy constructed from x.
+ //!
+ //! <b>Throws</b>: If memory allocation throws
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type n, CharT c)
+ {
+ if (n <= this->size())
+ this->erase(this->begin() + n, this->end());
+ else
+ this->append(n - this->size(), c);
+ }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are value initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type n)
+ { resize(n, CharT()); }
+
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are uninitialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ void resize(size_type n, default_init_t)
+ {
+ if (n <= this->size())
+ this->erase(this->begin() + n, this->end());
+ else{
+ this->priv_reserve(n, false);
+ this->priv_size(n);
+ this->priv_terminate_string();
+ }
+ }
+
+ //! <b>Effects</b>: Number of elements for which memory has been allocated.
+ //! capacity() is always greater than or equal to size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_capacity(); }
+
+ //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
+ //! effect. Otherwise, it is a request for allocation of additional memory.
+ //! If the request is successful, then capacity() is greater than or equal to
+ //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
+ //!
+ //! <b>Throws</b>: If memory allocation allocation throws
+ void reserve(size_type res_arg)
+ { this->priv_reserve(res_arg); }
+
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ //! with previous allocations. The size of the string is unchanged
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ void shrink_to_fit()
+ {
+ //Check if shrinking is possible
+ if(this->priv_storage() > InternalBufferChars){
+ //Check if we should pass from dynamically allocated buffer
+ //to the internal storage
+ if(this->priv_size() < InternalBufferChars){
+ //Dynamically allocated buffer attributes
+ pointer long_addr = this->priv_long_addr();
+ size_type long_storage = this->priv_long_storage();
+ size_type long_size = this->priv_long_size();
+ //Shrink from allocated buffer to the internal one, including trailing null
+ Traits::copy( boost::movelib::to_raw_pointer(this->priv_short_addr())
+ , boost::movelib::to_raw_pointer(long_addr)
+ , long_size+1);
+ BOOST_ASSERT(!this->is_short());
+ this->destroy_long();
+ this->construct_short();
+ this->alloc().deallocate(long_addr, long_storage);
+ }
+ else{
+ //Shrinking in dynamic buffer
+ this->priv_shrink_to_fit_dynamic_buffer(alloc_version());
+ }
+ }
+ }
+
+ //////////////////////////////////////////////
+ //
+ // element access
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the first
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference front() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->priv_addr();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the first
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->priv_addr();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the last
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *(this->priv_addr() + (this->size() - 1u) );
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the last
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *(this->priv_addr() + (this->size() - 1u) );
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() > n);
+ return *(this->priv_addr() + n);
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->size() > n);
+ return *(this->priv_addr() + n);
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: std::range_error if n >= size()
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference at(size_type n)
+ {
+ if (n >= this->size())
+ throw_out_of_range("basic_string::at invalid subscript");
+ return *(this->priv_addr() + n);
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: std::range_error if n >= size()
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference at(size_type n) const {
+ if (n >= this->size())
+ throw_out_of_range("basic_string::at invalid subscript");
+ return *(this->priv_addr() + n);
+ }
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Calls append(str.data, str.size()).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& operator+=(const basic_string& s)
+ { return this->append(s); }
+
+ //! <b>Effects</b>: Same as `return append(sv)`.
+ //!
+ template<template<class, class> class BasicStringView>
+ basic_string& operator+=(BasicStringView<CharT, Traits> sv)
+ {
+ return this->append(sv);
+ }
+
+ //! <b>Effects</b>: Calls append(s).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& operator+=(const CharT* s)
+ { return this->append(s); }
+
+ //! <b>Effects</b>: Calls append(1, c).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& operator+=(CharT c)
+ { this->push_back(c); return *this; }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Returns append(il)
+ //!
+ basic_string& operator+=(std::initializer_list<CharT> il)
+ {
+ return this->append(il);
+ }
+ #endif
+
+ //! <b>Effects</b>: Calls append(str.data(), str.size()).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& append(const basic_string& s)
+ { return this->append(s.begin(), s.end()); }
+
+ //! <b>Effects</b>: Same as return append(sv.data(), sv.size()).
+ //!
+ template<template<class, class> class BasicStringView>
+ basic_string& append(BasicStringView<CharT, Traits> sv)
+ { return this->append(sv.data(), sv.size()); }
+
+ //! <b>Requires</b>: pos <= str.size()
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to append
+ //! as the smaller of n and str.size() - pos and calls append(str.data() + pos, rlen).
+ //!
+ //! <b>Throws</b>: If memory allocation throws and out_of_range if pos > str.size()
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& append(const basic_string& s, size_type pos, size_type n = npos)
+ {
+ if (pos > s.size())
+ throw_out_of_range("basic_string::append out of range position");
+ return this->append(s.begin() + pos,
+ s.begin() + pos + dtl::min_value(n, s.size() - pos));
+ }
+
+ //! <b>Requires</b>: s points to an array of at least n elements of CharT.
+ //!
+ //! <b>Effects</b>: The function replaces the string controlled by *this with
+ //! a string of length size() + n whose irst size() elements are a copy of the
+ //! original string controlled by *this and whose remaining
+ //! elements are a copy of the initial n elements of s.
+ //!
+ //! <b>Throws</b>: If memory allocation throws length_error if size() + n > max_size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& append(const CharT* s, size_type n)
+ { return this->append(s, s + n); }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Effects</b>: Calls append(s, traits::length(s)).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& append(const CharT* s)
+ { return this->append(s, s + Traits::length(s)); }
+
+ //! <b>Effects</b>: Equivalent to append(basic_string(n, c)).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& append(size_type n, CharT c)
+ { return this->append(cvalue_iterator(c, n), cvalue_iterator()); }
+
+ //! <b>Requires</b>: [first,last) is a valid range.
+ //!
+ //! <b>Effects</b>: Equivalent to append(basic_string(first, last)).
+ //!
+ //! <b>Returns</b>: *this
+ template <class InputIter>
+ basic_string& append(InputIter first, InputIter last)
+ { this->insert(this->end(), first, last); return *this; }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Returns append(il.begin(), il.size()).
+ //!
+ basic_string& append(std::initializer_list<CharT> il)
+ {
+ return this->append(il.begin(), il.size());
+ }
+ #endif
+
+ //! <b>Effects</b>: Equivalent to append(static_cast<size_type>(1), c).
+ //!
+ void push_back(CharT c)
+ {
+ const size_type old_size = this->priv_size();
+ if (old_size < this->capacity()){
+ const pointer addr = this->priv_addr();
+ this->priv_construct_null(addr + old_size + 1);
+ Traits::assign(addr[old_size], c);
+ this->priv_size(old_size+1);
+ }
+ else{
+ //No enough memory, insert a new object at the end
+ this->append(size_type(1), c);
+ }
+ }
+
+ //! <b>Effects</b>: Equivalent to assign(str, 0, npos).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& assign(const basic_string& s)
+ { return this->operator=(s); }
+
+ //! <b>Effects</b>: Equivalent to return assign(sv.data(), sv.size()).
+ //!
+ //! <b>Returns</b>: *this
+ template<template <class, class> class BasicStringView>
+ basic_string& assign(BasicStringView<CharT, Traits> sv)
+ { return this->operator=(sv); }
+
+ //! <b>Effects</b>: The function replaces the string controlled by *this
+ //! with a string of length str.size() whose elements are a copy of the string
+ //! controlled by str. Leaves str in a valid but unspecified state.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& assign(BOOST_RV_REF(basic_string) ms) BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->swap_data(ms), *this; }
+
+ //! <b>Requires</b>: pos <= str.size()
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to assign as
+ //! the smaller of n and str.size() - pos and calls assign(str.data() + pos rlen).
+ //!
+ //! <b>Throws</b>: If memory allocation throws or out_of_range if pos > str.size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& assign(const basic_string& s, size_type pos, size_type n)
+ {
+ if (pos > s.size())
+ throw_out_of_range("basic_string::assign out of range position");
+ return this->assign(s.begin() + pos,
+ s.begin() + pos + dtl::min_value(n, s.size() - pos));
+ }
+
+ //! <b>Requires</b>: s points to an array of at least n elements of CharT.
+ //!
+ //! <b>Effects</b>: Replaces the string controlled by *this with a string of
+ //! length n whose elements are a copy of those pointed to by s.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or length_error if n > max_size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& assign(const CharT* s, size_type n)
+ { return this->assign(s, s + n); }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Effects</b>: Calls assign(s, traits::length(s)).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& assign(const CharT* s)
+ { return this->assign(s, s + Traits::length(s)); }
+
+ //! <b>Effects</b>: Equivalent to assign(basic_string(n, c)).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& assign(size_type n, CharT c)
+ { return this->assign(cvalue_iterator(c, n), cvalue_iterator()); }
+
+ //! <b>Effects</b>: Equivalent to assign(basic_string(first, last)).
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& assign(const CharT* first, const CharT* last)
+ {
+ size_type n = static_cast<size_type>(last - first);
+ this->reserve(n);
+ CharT* ptr = boost::movelib::to_raw_pointer(this->priv_addr());
+ Traits::copy(ptr, first, n);
+ this->priv_construct_null(ptr + n);
+ this->priv_size(n);
+ return *this;
+ }
+
+ //! <b>Effects</b>: Equivalent to assign(basic_string(first, last)).
+ //!
+ //! <b>Returns</b>: *this
+ template <class InputIter>
+ basic_string& assign(InputIter first, InputIter last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_convertible<InputIter, size_type>::type * = 0
+ #endif
+ )
+ {
+ size_type cur = 0;
+ const pointer addr = this->priv_addr();
+ CharT *ptr = boost::movelib::to_raw_pointer(addr);
+ const size_type old_size = this->priv_size();
+ while (first != last && cur != old_size) {
+ Traits::assign(*ptr, *first);
+ ++first;
+ ++cur;
+ ++ptr;
+ }
+ if (first == last)
+ this->erase(addr + cur, addr + old_size);
+ else
+ this->append(first, last);
+ return *this;
+ }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Returns assign(il.begin(), il.size()).
+ //!
+ basic_string& assign(std::initializer_list<CharT> il)
+ {
+ return this->assign(il.begin(), il.size());
+ }
+ #endif
+
+ //! <b>Requires</b>: pos <= size().
+ //!
+ //! <b>Effects</b>: Calls insert(pos, str.data(), str.size()).
+ //!
+ //! <b>Throws</b>: If memory allocation throws or out_of_range if pos > size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& insert(size_type pos, const basic_string& s)
+ {
+ const size_type sz = this->size();
+ if (pos > sz)
+ throw_out_of_range("basic_string::insert out of range position");
+ if (sz > this->max_size() - s.size())
+ throw_length_error("basic_string::insert max_size() exceeded");
+ this->insert(this->priv_addr() + pos, s.begin(), s.end());
+ return *this;
+ }
+
+ //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size()
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to insert as
+ //! the smaller of n and str.size() - pos2 and calls insert(pos1, str.data() + pos2, rlen).
+ //!
+ //! <b>Throws</b>: If memory allocation throws or out_of_range if pos1 > size() or pos2 > str.size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& insert(size_type pos1, const basic_string& s, size_type pos2, size_type n = npos)
+ {
+ const size_type sz = this->size();
+ const size_type str_size = s.size();
+ if (pos1 > sz || pos2 > str_size)
+ throw_out_of_range("basic_string::insert out of range position");
+ size_type len = dtl::min_value(n, str_size - pos2);
+ if (sz > this->max_size() - len)
+ throw_length_error("basic_string::insert max_size() exceeded");
+ const CharT *beg_ptr = boost::movelib::to_raw_pointer(s.begin()) + pos2;
+ const CharT *end_ptr = beg_ptr + len;
+ this->insert(this->priv_addr() + pos1, beg_ptr, end_ptr);
+ return *this;
+ }
+
+ //! <b>Requires</b>: s points to an array of at least n elements of CharT and pos <= size().
+ //!
+ //! <b>Effects</b>: Replaces the string controlled by *this with a string of length size() + n
+ //! whose first pos elements are a copy of the initial elements of the original string
+ //! controlled by *this and whose next n elements are a copy of the elements in s and whose
+ //! remaining elements are a copy of the remaining elements of the original string controlled by *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, out_of_range if pos > size() or
+ //! length_error if size() + n > max_size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& insert(size_type pos, const CharT* s, size_type n)
+ {
+ if (pos > this->size())
+ throw_out_of_range("basic_string::insert out of range position");
+ if (this->size() > this->max_size() - n)
+ throw_length_error("basic_string::insert max_size() exceeded");
+ this->insert(this->priv_addr() + pos, s, s + n);
+ return *this;
+ }
+
+ //! <b>Requires</b>: pos <= size() and s points to an array of at least traits::length(s) + 1 elements of CharT
+ //!
+ //! <b>Effects</b>: Calls insert(pos, s, traits::length(s)).
+ //!
+ //! <b>Throws</b>: If memory allocation throws, out_of_range if pos > size()
+ //! length_error if size() > max_size() - Traits::length(s)
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& insert(size_type pos, const CharT* s)
+ {
+ if (pos > this->size())
+ throw_out_of_range("basic_string::insert out of range position");
+ size_type len = Traits::length(s);
+ if (this->size() > this->max_size() - len)
+ throw_length_error("basic_string::insert max_size() exceeded");
+ this->insert(this->priv_addr() + pos, s, s + len);
+ return *this;
+ }
+
+ //! <b>Effects</b>: Equivalent to insert(pos, basic_string(n, c)).
+ //!
+ //! <b>Throws</b>: If memory allocation throws, out_of_range if pos > size()
+ //! length_error if size() > max_size() - n
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& insert(size_type pos, size_type n, CharT c)
+ {
+ if (pos > this->size())
+ throw_out_of_range("basic_string::insert out of range position");
+ if (this->size() > this->max_size() - n)
+ throw_length_error("basic_string::insert max_size() exceeded");
+ this->insert(const_iterator(this->priv_addr() + pos), n, c);
+ return *this;
+ }
+
+ //! <b>Effects</b>: Same as `return insert(pos, sv.data(), sv.size())`.
+ //!
+ template<template<class, class> class BasicStringView>
+ basic_string& insert(size_type pos, BasicStringView<CharT, Traits> sv)
+ { return this->insert(pos, sv.data(), sv.size()); }
+
+ //! <b>Requires</b>: p is a valid iterator on *this.
+ //!
+ //! <b>Effects</b>: inserts a copy of c before the character referred to by p.
+ //!
+ //! <b>Returns</b>: An iterator which refers to the copy of the inserted character.
+ iterator insert(const_iterator p, CharT c)
+ {
+ size_type new_offset = p - this->priv_addr();
+ this->insert(p, cvalue_iterator(c, 1), cvalue_iterator());
+ return this->priv_addr() + new_offset;
+ }
+
+ //! <b>Requires</b>: p is a valid iterator on *this.
+ //!
+ //! <b>Effects</b>: Inserts n copies of c before the character referred to by p.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
+ iterator insert(const_iterator p, size_type n, CharT c)
+ { return this->insert(p, cvalue_iterator(c, n), cvalue_iterator()); }
+
+ //! <b>Requires</b>: p is a valid iterator on *this. [first,last) is a valid range.
+ //!
+ //! <b>Effects</b>: Equivalent to insert(p - begin(), basic_string(first, last)).
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if first == last.
+ template <class InputIter>
+ iterator insert(const_iterator p, InputIter first, InputIter last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<InputIter, size_type>
+ , dtl::is_not_input_iterator<InputIter>
+ >::type * = 0
+ #endif
+ )
+ {
+ const size_type n_pos = p - this->cbegin();
+ for ( ; first != last; ++first, ++p) {
+ p = this->insert(p, *first);
+ }
+ return this->begin() + n_pos;
+ }
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class ForwardIter>
+ iterator insert(const_iterator p, ForwardIter first, ForwardIter last
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<ForwardIter, size_type>
+ , dtl::is_input_iterator<ForwardIter>
+ >::type * = 0
+ )
+ {
+ const size_type n_pos = p - this->cbegin();
+ if (first != last) {
+ const size_type n = boost::container::iterator_distance(first, last);
+ const size_type old_size = this->priv_size();
+ const size_type remaining = this->capacity() - old_size;
+ const pointer old_start = this->priv_addr();
+ bool enough_capacity = false;
+ size_type new_cap = 0;
+
+ //Check if we have enough capacity
+ pointer hint = pointer();
+ pointer allocation_ret = pointer();
+ if (remaining >= n){
+ enough_capacity = true;
+ }
+ else {
+ //Otherwise expand current buffer or allocate new storage
+ new_cap = this->next_capacity(n);
+ hint = old_start;
+ allocation_ret = this->allocation_command
+ (allocate_new | expand_fwd | expand_bwd, old_size + n + 1, new_cap, hint);
+
+ //Check forward expansion
+ if(old_start == allocation_ret){
+ enough_capacity = true;
+ this->priv_storage(new_cap);
+ }
+ }
+
+ //Reuse same buffer
+ if(enough_capacity){
+ const size_type elems_after = old_size - (p - old_start);
+ const size_type old_length = old_size;
+ if (elems_after >= n) {
+ const pointer pointer_past_last = old_start + old_size + 1;
+ priv_uninitialized_copy(old_start + (old_size - n + 1),
+ pointer_past_last, pointer_past_last);
+
+ this->priv_size(old_size+n);
+ Traits::move(const_cast<CharT*>(boost::movelib::to_raw_pointer(p + n)),
+ boost::movelib::to_raw_pointer(p),
+ (elems_after - n) + 1);
+ this->priv_copy(first, last, const_cast<CharT*>(boost::movelib::to_raw_pointer(p)));
+ }
+ else {
+ ForwardIter mid = first;
+ boost::container::iterator_advance(mid, elems_after + 1);
+
+ priv_uninitialized_copy(mid, last, old_start + old_size + 1);
+ const size_type newer_size = old_size + (n - elems_after);
+ this->priv_size(newer_size);
+ priv_uninitialized_copy
+ (p, const_iterator(old_start + old_length + 1),
+ old_start + newer_size);
+ this->priv_size(newer_size + elems_after);
+ this->priv_copy(first, mid, const_cast<CharT*>(boost::movelib::to_raw_pointer(p)));
+ }
+ }
+ else{
+ pointer new_start = allocation_ret;
+ if(!hint){
+ //Copy data to new buffer
+ size_type new_length = 0;
+ //This can't throw, since characters are POD
+ new_length += priv_uninitialized_copy
+ (const_iterator(old_start), p, new_start);
+ new_length += priv_uninitialized_copy
+ (first, last, new_start + new_length);
+ new_length += priv_uninitialized_copy
+ (p, const_iterator(old_start + old_size),
+ new_start + new_length);
+ this->priv_construct_null(new_start + new_length);
+
+ this->deallocate_block();
+ this->assure_long();
+ this->priv_long_addr(new_start);
+ this->priv_long_size(new_length);
+ this->priv_long_storage(new_cap);
+ }
+ else{
+ //value_type is POD, so backwards expansion is much easier
+ //than with vector<T>
+ value_type * const oldbuf = boost::movelib::to_raw_pointer(old_start);
+ value_type * const newbuf = boost::movelib::to_raw_pointer(new_start);
+ const value_type *const pos = boost::movelib::to_raw_pointer(p);
+ const size_type before = pos - oldbuf;
+
+ //First move old data
+ Traits::move(newbuf, oldbuf, before);
+ Traits::move(newbuf + before + n, pos, old_size - before);
+ //Now initialize the new data
+ priv_uninitialized_copy(first, last, new_start + before);
+ this->priv_construct_null(new_start + (old_size + n));
+ this->assure_long();
+ this->priv_long_addr(new_start);
+ this->priv_long_size(old_size + n);
+ this->priv_long_storage(new_cap);
+ }
+ }
+ }
+ return this->begin() + n_pos;
+ }
+ #endif
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: As if by insert(p, il.begin(), il.end()).
+ //!
+ //! <b>Returns</b>: An iterator which refers to the copy of the first inserted
+ //! character, or p if i1 is empty.
+ iterator insert(const_iterator p, std::initializer_list<CharT> il)
+ {
+ return this->insert(p, il.begin(), il.end());
+ }
+ #endif
+
+ //! <b>Effects</b>: Removes the last element from the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ iterator p = this->end();
+ this->erase(--p);
+ }
+
+ //! <b>Requires</b>: pos <= size()
+ //!
+ //! <b>Effects</b>: Determines the effective length xlen of the string to be removed as the smaller of n and size() - pos.
+ //! The function then replaces the string controlled by *this with a string of length size() - xlen
+ //! whose first pos elements are a copy of the initial elements of the original string controlled by *this,
+ //! and whose remaining elements are a copy of the elements of the original string controlled by *this
+ //! beginning at position pos + xlen.
+ //!
+ //! <b>Throws</b>: out_of_range if pos > size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& erase(size_type pos = 0, size_type n = npos)
+ {
+ if (pos > this->size())
+ throw_out_of_range("basic_string::erase out of range position");
+ const pointer addr = this->priv_addr();
+ erase(addr + pos, addr + pos + dtl::min_value(n, this->size() - pos));
+ return *this;
+ }
+
+ //! <b>Effects</b>: Removes the character referred to by p.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: An iterator which points to the element immediately following p prior to the element being
+ //! erased. If no such element exists, end() is returned.
+ iterator erase(const_iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ // The move includes the terminating null.
+ CharT * const ptr = const_cast<CharT*>(boost::movelib::to_raw_pointer(p));
+ const size_type old_size = this->priv_size();
+ Traits::move(ptr,
+ boost::movelib::to_raw_pointer(p + 1),
+ old_size - (p - this->priv_addr()));
+ this->priv_size(old_size-1);
+ return iterator(ptr);
+ }
+
+ //! <b>Requires</b>: first and last are valid iterators on *this, defining a range [first,last).
+ //!
+ //! <b>Effects</b>: Removes the characters in the range [first,last).
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: An iterator which points to the element pointed to by last prior to
+ //! the other elements being erased. If no such element exists, end() is returned.
+ iterator erase(const_iterator first, const_iterator last) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ CharT * f = const_cast<CharT*>(boost::movelib::to_raw_pointer(first));
+ if (first != last) { // The move includes the terminating null.
+ const size_type num_erased = last - first;
+ const size_type old_size = this->priv_size();
+ Traits::move(f,
+ boost::movelib::to_raw_pointer(last),
+ (old_size + 1)-(last - this->priv_addr()));
+ const size_type new_length = old_size - num_erased;
+ this->priv_size(new_length);
+ }
+ return iterator(f);
+ }
+
+ //! <b>Effects</b>: Erases all the elements of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the vector.
+ void clear() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if (!this->empty()) {
+ Traits::assign(*this->priv_addr(), CharT(0));
+ this->priv_size(0);
+ }
+ }
+
+ //! <b>Requires</b>: pos1 <= size().
+ //!
+ //! <b>Effects</b>: Calls replace(pos1, n1, str.data(), str.size()).
+ //!
+ //! <b>Throws</b>: if memory allocation throws or out_of_range if pos1 > size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(size_type pos1, size_type n1, const basic_string& str)
+ {
+ if (pos1 > this->size())
+ throw_out_of_range("basic_string::replace out of range position");
+ const size_type len = dtl::min_value(n1, this->size() - pos1);
+ if (this->size() - len >= this->max_size() - str.size())
+ throw_length_error("basic_string::replace max_size() exceeded");
+ const pointer addr = this->priv_addr();
+ return this->replace( const_iterator(addr + pos1)
+ , const_iterator(addr + pos1 + len)
+ , str.begin(), str.end());
+ }
+
+ //! <b>Effects</b>: Calls `return replace(pos1, n1, sv.data(), sv.size());`.
+ //!
+ template<template<class, class> class BasicStringView>
+ basic_string& replace(size_type pos1, size_type n1, BasicStringView<CharT, Traits> sv)
+ {
+ return this->replace(pos1, n1, sv.data(), sv.size());
+ }
+
+ //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size().
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to be
+ //! inserted as the smaller of n2 and str.size() - pos2 and calls
+ //! replace(pos1, n1, str.data() + pos2, rlen).
+ //!
+ //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or pos2 > str.size().
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(size_type pos1, size_type n1,
+ const basic_string& str, size_type pos2, size_type n2 = npos)
+ {
+ if (pos2 > str.size())
+ throw_out_of_range("basic_string::replace out of range position");
+ return this->replace(pos1, n1, str.data()+pos2, dtl::min_value(n2, str.size() - pos2));
+ }
+
+ //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > sv.size().
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to be inserted as the
+ //! smaller of n2 and sv.size() - pos2 and calls `replace(pos1, n1, sv.data() + pos2, rlen)`.
+ //!
+ //! <b>Returns</b>: *this.
+ template<template<class, class> class BasicStringView>
+ basic_string& replace(size_type pos1, size_type n1, BasicStringView<CharT, Traits> sv,
+ size_type pos2, size_type n2 = npos)
+ {
+ if (pos2 > sv.size())
+ throw_out_of_range("basic_string::replace out of range position");
+ return this->replace(pos1, n1, sv.data()+pos2, dtl::min_value(n2, sv.size() - pos2));
+ }
+
+ //! <b>Requires</b>: pos1 <= size() and s points to an array of at least n2 elements of CharT.
+ //!
+ //! <b>Effects</b>: Determines the effective length xlen of the string to be removed as the
+ //! smaller of n1 and size() - pos1. If size() - xlen >= max_size() - n2 throws length_error.
+ //! Otherwise, the function replaces the string controlled by *this with a string of
+ //! length size() - xlen + n2 whose first pos1 elements are a copy of the initial elements
+ //! of the original string controlled by *this, whose next n2 elements are a copy of the
+ //! initial n2 elements of s, and whose remaining elements are a copy of the elements of
+ //! the original string controlled by *this beginning at position pos + xlen.
+ //!
+ //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or length_error
+ //! if the length of the resulting string would exceed max_size()
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(size_type pos1, size_type n1, const CharT* s, size_type n2)
+ {
+ if (pos1 > this->size())
+ throw_out_of_range("basic_string::replace out of range position");
+ const size_type len = dtl::min_value(n1, this->size() - pos1);
+ const size_type max_size = this->max_size();
+ if (n2 > max_size || (this->size() - len) >= (max_size - n2))
+ throw_length_error("basic_string::replace max_size() exceeded");
+ const pointer addr = this->priv_addr() + pos1;
+ return this->replace(addr, addr + len, s, s + n2);
+ }
+
+ //! <b>Requires</b>: pos1 <= size() and s points to an array of at least n2 elements of CharT.
+ //!
+ //! <b>Effects</b>: Determines the effective length xlen of the string to be removed as the smaller
+ //! of n1 and size() - pos1. If size() - xlen >= max_size() - n2 throws length_error. Otherwise,
+ //! the function replaces the string controlled by *this with a string of length size() - xlen + n2
+ //! whose first pos1 elements are a copy of the initial elements of the original string controlled
+ //! by *this, whose next n2 elements are a copy of the initial n2 elements of s, and whose
+ //! remaining elements are a copy of the elements of the original string controlled by *this
+ //! beginning at position pos + xlen.
+ //!
+ //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or length_error
+ //! if the length of the resulting string would exceed max_size()
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(size_type pos, size_type n1, const CharT* s)
+ {
+ return this->replace(pos, n1, s, Traits::length(s));
+ }
+
+ //! <b>Requires</b>: pos1 <= size().
+ //!
+ //! <b>Effects</b>: Equivalent to replace(pos1, n1, basic_string(n2, c)).
+ //!
+ //! <b>Throws</b>: if memory allocation throws, out_of_range if pos1 > size() or length_error
+ //! if the length of the resulting string would exceed max_size()
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(size_type pos1, size_type n1, size_type n2, CharT c)
+ {
+ if (pos1 > this->size())
+ throw_out_of_range("basic_string::replace out of range position");
+ const size_type len = dtl::min_value(n1, this->size() - pos1);
+ if (n2 > this->max_size() || this->size() - len >= this->max_size() - n2)
+ throw_length_error("basic_string::replace max_size() exceeded");
+ const pointer addr = this->priv_addr();
+ return this->replace(addr + pos1, addr + pos1 + len, n2, c);
+ }
+
+ //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges.
+ //!
+ //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, str).
+ //!
+ //! <b>Throws</b>: if memory allocation throws
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(const_iterator i1, const_iterator i2, const basic_string& str)
+ { return this->replace(i1, i2, str.data(), str.data()+str.size()); }
+
+ //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges and
+ //! s points to an array of at least n elements
+ //!
+ //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, s, n).
+ //!
+ //! <b>Throws</b>: if memory allocation throws
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s, size_type n)
+ { return this->replace(i1, i2, s, s + n); }
+
+ //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges and s points to an
+ //! array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, s, traits::length(s)).
+ //!
+ //! <b>Throws</b>: if memory allocation throws
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(const_iterator i1, const_iterator i2, const CharT* s)
+ { return this->replace(i1, i2, s, s + Traits::length(s)); }
+
+ //! <b>Requires</b>: [begin(),i1) and [i1,i2) are valid ranges.
+ //!
+ //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, basic_string(n, c)).
+ //!
+ //! <b>Throws</b>: if memory allocation throws
+ //!
+ //! <b>Returns</b>: *this
+ basic_string& replace(const_iterator i1, const_iterator i2, size_type n, CharT c)
+ {
+ const size_type len = static_cast<size_type>(i2 - i1);
+ if (len >= n) {
+ Traits::assign(const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)), n, c);
+ erase(i1 + n, i2);
+ }
+ else {
+ Traits::assign(const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)), len, c);
+ insert(i2, n - len, c);
+ }
+ return *this;
+ }
+
+ //! <b>Requires</b>: [begin(),i1), [i1,i2) and [j1,j2) are valid ranges.
+ //!
+ //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, basic_string(j1, j2)).
+ //!
+ //! <b>Throws</b>: if memory allocation throws
+ //!
+ //! <b>Returns</b>: *this
+ template <class InputIter>
+ basic_string& replace(const_iterator i1, const_iterator i2, InputIter j1, InputIter j2
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<InputIter, size_type>
+ , dtl::is_input_iterator<InputIter>
+ >::type * = 0
+ #endif
+ )
+ {
+ for ( ; i1 != i2 && j1 != j2; ++i1, ++j1){
+ Traits::assign(*const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)), *j1);
+ }
+
+ if (j1 == j2)
+ this->erase(i1, i2);
+ else
+ this->insert(i2, j1, j2);
+ return *this;
+ }
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class ForwardIter>
+ basic_string& replace(const_iterator i1, const_iterator i2, ForwardIter j1, ForwardIter j2
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<ForwardIter, size_type>
+ , dtl::is_not_input_iterator<ForwardIter>
+ >::type * = 0
+ )
+ {
+ difference_type n = boost::container::iterator_distance(j1, j2);
+ const difference_type len = i2 - i1;
+ if (len >= n) {
+ this->priv_copy(j1, j2, const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)));
+ this->erase(i1 + n, i2);
+ }
+ else {
+ ForwardIter m = j1;
+ boost::container::iterator_advance(m, len);
+ this->priv_copy(j1, m, const_cast<CharT*>(boost::movelib::to_raw_pointer(i1)));
+ this->insert(i2, m, j2);
+ }
+ return *this;
+ }
+ #endif
+
+ //! <b>Requires</b>: [begin(), i1) and [i1, i2) are valid ranges.
+ //!
+ //! <b>Effects</b>: Calls `replace(i1 - begin(), i2 - i1, sv).`.
+ //!
+ //! <b>Returns</b>: *this.
+ template<template <class, class> class BasicStringView>
+ basic_string& replace(const_iterator i1, const_iterator i2, BasicStringView<CharT, Traits> sv)
+ {
+ return this->replace( static_cast<size_type>(i1 - this->cbegin())
+ , static_cast<size_type>(i2 - i1), sv);
+ }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Requires</b>: [begin(), i1) and [i1, i2) are valid ranges.
+ //!
+ //! <b>Effects</b>: Calls replace(i1 - begin(), i2 - i1, il.begin(), il.size()).
+ //!
+ //! <b>Returns</b>: *this.
+ basic_string& replace(const_iterator i1, const_iterator i2, std::initializer_list<CharT> il)
+ {
+ return this->replace( static_cast<size_type>(i1 - this->cbegin())
+ , static_cast<size_type>(i2 - i1)
+ , il.begin(), il.size());
+ }
+ #endif
+
+ //! <b>Requires</b>: pos <= size()
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to copy as the
+ //! smaller of n and size() - pos. s shall designate an array of at least rlen elements.
+ //! The function then replaces the string designated by s with a string of length rlen
+ //! whose elements are a copy of the string controlled by *this beginning at position pos.
+ //! The function does not append a null object to the string designated by s.
+ //!
+ //! <b>Throws</b>: if memory allocation throws, out_of_range if pos > size().
+ //!
+ //! <b>Returns</b>: rlen
+ size_type copy(CharT* s, size_type n, size_type pos = 0) const
+ {
+ if (pos > this->size())
+ throw_out_of_range("basic_string::copy out of range position");
+ const size_type len = dtl::min_value(n, this->size() - pos);
+ Traits::copy(s, boost::movelib::to_raw_pointer(this->priv_addr() + pos), len);
+ return len;
+ }
+
+ //! <b>Effects</b>: *this contains the same sequence of characters that was in s,
+ //! s contains the same sequence of characters that was in *this.
+ //!
+ //! <b>Throws</b>: Nothing
+ void swap(basic_string& x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_swap::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ this->base_t::swap_data(x);
+ dtl::bool_<allocator_traits_type::propagate_on_container_swap::value> flag;
+ dtl::swap_alloc(this->alloc(), x.alloc(), flag);
+ }
+
+ //////////////////////////////////////////////
+ //
+ // data access
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: The program shall not alter any of the values stored in the character array.
+ //!
+ //! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
+ //!
+ //! <b>Complexity</b>: constant time.
+ const CharT* c_str() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return boost::movelib::to_raw_pointer(this->priv_addr()); }
+
+ //! <b>Requires</b>: The program shall not alter any of the values stored in the character array.
+ //!
+ //! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
+ //!
+ //! <b>Complexity</b>: constant time.
+ const CharT* data() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return boost::movelib::to_raw_pointer(this->priv_addr()); }
+
+ //! <b>Returns</b>: A pointer p such that p + i == &operator[](i) for each i in [0,size()].
+ //!
+ //! <b>Complexity</b>: constant time.
+ CharT* data() BOOST_NOEXCEPT_OR_NOTHROW
+ { return boost::movelib::to_raw_pointer(this->priv_addr()); }
+
+ #ifndef BOOST_CONTAINER_TEMPLATED_CONVERSION_OPERATOR_BROKEN
+ //! <b>Returns</b>: a string_view to the characters in the string.
+ //!
+ //! <b>Complexity</b>: constant time.
+ template<template <class, class> class BasicStringView>
+ operator BasicStringView<CharT, Traits>() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->to_view< BasicStringView<CharT, Traits> >(); }
+ #endif
+
+ //! <b>Returns</b>: a string_view to the characters in the string.
+ //!
+ //! <b>Complexity</b>: constant time.
+ //!
+ //! <b>Note</b>: This function is available to write portable code for compilers
+ //! that don't support templated conversion operators.
+ template<class BasicStringView>
+ BasicStringView to_view() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return BasicStringView(this->data(), this->size()); }
+
+ //////////////////////////////////////////////
+ //
+ // string operations
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both
+ //! of the following conditions hold:
+ //! 1) pos <= xpos and xpos + str.size() <= size();
+ //! 2) traits::eq(at(xpos+I), str.at(I)) for all elements I of the string controlled by str.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ size_type find(const basic_string& s, size_type pos = 0) const
+ { return find(s.c_str(), pos, s.size()); }
+
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both
+ //! of the following conditions hold:
+ //! 1) pos <= xpos and xpos + sv.size() <= size();
+ //! 2) traits::eq(at(xpos+I), sv.at(I)) for all elements I of the string controlled by sv.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ template<template <class, class> class BasicStringView>
+ size_type find(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
+ { return find(sv.data(), pos, sv.size()); }
+
+ //! <b>Requires</b>: s points to an array of at least n elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find(basic_string<CharT,traits,Allocator>(s,n),pos).
+ size_type find(const CharT* s, size_type pos, size_type n) const
+ {
+ if (pos + n > this->size())
+ return npos;
+ else {
+ const pointer addr = this->priv_addr();
+ pointer finish = addr + this->priv_size();
+ const const_iterator result =
+ boost::container::search(boost::movelib::to_raw_pointer(addr + pos),
+ boost::movelib::to_raw_pointer(finish),
+ s, s + n, Eq_traits<Traits>());
+ return result != finish ? result - begin() : npos;
+ }
+ }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find(basic_string(s), pos).
+ size_type find(const CharT* s, size_type pos = 0) const
+ { return this->find(s, pos, Traits::length(s)); }
+
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find(basic_string<CharT,traits,Allocator>(1,c), pos).
+ size_type find(CharT c, size_type pos = 0) const
+ {
+ const size_type sz = this->size();
+ if (pos >= sz)
+ return npos;
+ else {
+ const pointer addr = this->priv_addr();
+ pointer finish = addr + sz;
+ const const_iterator result =
+ boost::container::find_if(addr + pos, finish,
+ boost::container::bind2nd(Eq_traits<Traits>(), c));
+ return result != finish ? result - begin() : npos;
+ }
+ }
+
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such
+ //! that both of the following conditions obtain:
+ //! a) xpos <= pos and xpos + str.size() <= size();
+ //! b) traits::eq(at(xpos+I), str.at(I)) for all elements I of the string controlled by str.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ size_type rfind(const basic_string& str, size_type pos = npos) const
+ { return rfind(str.c_str(), pos, str.size()); }
+
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such
+ //! that both of the following conditions obtain:
+ //! a) xpos <= pos and xpos + sv.size() <= size();
+ //! b) traits::eq(at(xpos+I), sv.at(I)) for all elements I of the string controlled by sv.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ template<template <class, class> class BasicStringView>
+ size_type rfind(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
+ { return rfind(sv.data(), pos, sv.size()); }
+
+ //! <b>Requires</b>: s points to an array of at least n elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: rfind(basic_string(s, n), pos).
+ size_type rfind(const CharT* s, size_type pos, size_type n) const
+ {
+ const size_type len = this->size();
+
+ if (n > len)
+ return npos;
+ else if (n == 0)
+ return dtl::min_value(len, pos);
+ else {
+ const const_iterator last = begin() + dtl::min_value(len - n, pos) + n;
+ const const_iterator result = find_end(begin(), last,
+ s, s + n,
+ Eq_traits<Traits>());
+ return result != last ? result - begin() : npos;
+ }
+ }
+
+ //! <b>Requires</b>: pos <= size() and s points to an array of at least
+ //! traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: rfind(basic_string(s), pos).
+ size_type rfind(const CharT* s, size_type pos = npos) const
+ { return rfind(s, pos, Traits::length(s)); }
+
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: rfind(basic_string<CharT,traits,Allocator>(1,c),pos).
+ size_type rfind(CharT c, size_type pos = npos) const
+ {
+ const size_type len = this->size();
+
+ if (len < 1)
+ return npos;
+ else {
+ const const_iterator last = begin() + dtl::min_value(len - 1, pos) + 1;
+ const_reverse_iterator rresult =
+ boost::container::find_if(const_reverse_iterator(last), rend(),
+ boost::container::bind2nd(Eq_traits<Traits>(), c));
+ return rresult != rend() ? (rresult.base() - 1) - begin() : npos;
+ }
+ }
+
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both of the
+ //! following conditions obtain: a) pos <= xpos and xpos < size();
+ //! b) traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ size_type find_first_of(const basic_string& str, size_type pos = 0) const
+ { return this->find_first_of(str.c_str(), pos, str.size()); }
+
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that both of the
+ //! following conditions obtain: a) pos <= xpos and xpos < size();
+ //! b) traits::eq(at(xpos), sv.at(I)) for some element I of the string controlled by sv.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ template<template <class, class> class BasicStringView>
+ size_type find_first_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
+ { return this->find_first_of(sv.data(), pos, sv.size()); }
+
+ //! <b>Requires</b>: s points to an array of at least n elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_first_of(basic_string(s, n), pos).
+ size_type find_first_of(const CharT* s, size_type pos, size_type n) const
+ {
+ const size_type sz = this->size();
+ if (pos >= sz)
+ return npos;
+ else {
+ const pointer addr = this->priv_addr();
+ pointer finish = addr + sz;
+ const_iterator result = boost::container::find_first_of
+ (addr + pos, finish, s, s + n, Eq_traits<Traits>());
+ return result != finish ? result - this->begin() : npos;
+ }
+ }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_first_of(basic_string(s), pos).
+ size_type find_first_of(const CharT* s, size_type pos = 0) const
+ { return this->find_first_of(s, pos, Traits::length(s)); }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_first_of(basic_string<CharT,traits,Allocator>(1,c), pos).
+ size_type find_first_of(CharT c, size_type pos = 0) const
+ { return this->find(c, pos); }
+
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such that both of
+ //! the following conditions obtain: a) xpos <= pos and xpos < size(); b)
+ //! traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ size_type find_last_of(const basic_string& str, size_type pos = npos) const
+ { return this->find_last_of(str.c_str(), pos, str.size()); }
+
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such that both of
+ //! the following conditions obtain: a) xpos <= pos and xpos < size(); b)
+ //! traits::eq(at(xpos), str.at(I)) for some element I of the string controlled by str.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ template<template <class, class> class BasicStringView>
+ size_type find_last_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
+ { return this->find_last_of(sv.data(), pos, sv.size()); }
+
+ //! <b>Requires</b>: s points to an array of at least n elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_last_of(basic_string(s, n), pos).
+ size_type find_last_of(const CharT* s, size_type pos, size_type n) const
+ {
+ const size_type len = this->size();
+
+ if (len < 1)
+ return npos;
+ else {
+ const pointer addr = this->priv_addr();
+ const const_iterator last = addr + dtl::min_value(len - 1, pos) + 1;
+ const const_reverse_iterator rresult =
+ boost::container::find_first_of(const_reverse_iterator(last), rend(),
+ s, s + n, Eq_traits<Traits>());
+ return rresult != rend() ? (rresult.base() - 1) - addr : npos;
+ }
+ }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_last_of(basic_string<CharT,traits,Allocator>(1,c),pos).
+ size_type find_last_of(const CharT* s, size_type pos = npos) const
+ { return find_last_of(s, pos, Traits::length(s)); }
+
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_last_of(basic_string(s), pos).
+ size_type find_last_of(CharT c, size_type pos = npos) const
+ { return rfind(c, pos); }
+
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that
+ //! both of the following conditions obtain:
+ //! a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), str.at(I)) for no
+ //! element I of the string controlled by str.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ size_type find_first_not_of(const basic_string& str, size_type pos = 0) const
+ { return find_first_not_of(str.c_str(), pos, str.size()); }
+
+ //! <b>Effects</b>: Determines the lowest position xpos, if possible, such that
+ //! both of the following conditions obtain:
+ //! a) pos <= xpos and xpos < size(); b) traits::eq(at(xpos), sv.at(I)) for no
+ //! element I of the string controlled by sv.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ template<template <class, class> class BasicStringView>
+ size_type find_first_not_of(BasicStringView<CharT, Traits> sv, size_type pos = 0) const
+ { return find_first_not_of(sv.data(), pos, sv.size()); }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_first_not_of(basic_string(s, n), pos).
+ size_type find_first_not_of(const CharT* s, size_type pos, size_type n) const
+ {
+ if (pos > this->size())
+ return npos;
+ else {
+ const pointer addr = this->priv_addr();
+ const pointer finish = addr + this->priv_size();
+ const const_iterator result = boost::container::find_if
+ (addr + pos, finish, Not_within_traits<Traits>(s, s + n));
+ return result != finish ? result - addr : npos;
+ }
+ }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_first_not_of(basic_string(s), pos).
+ size_type find_first_not_of(const CharT* s, size_type pos = 0) const
+ { return find_first_not_of(s, pos, Traits::length(s)); }
+
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_first_not_of(basic_string(1, c), pos).
+ size_type find_first_not_of(CharT c, size_type pos = 0) const
+ {
+ if (pos > this->size())
+ return npos;
+ else {
+ const pointer addr = this->priv_addr();
+ const pointer finish = addr + this->priv_size();
+ const const_iterator result
+ = boost::container::find_if(addr + pos, finish,
+ boost::container::not1(boost::container::bind2nd(Eq_traits<Traits>(), c)));
+ return result != finish ? result - begin() : npos;
+ }
+ }
+
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such that
+ //! both of the following conditions obtain: a) xpos <= pos and xpos < size();
+ //! b) traits::eq(at(xpos), str.at(I)) for no element I of the string controlled by str.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ size_type find_last_not_of(const basic_string& str, size_type pos = npos) const
+ { return find_last_not_of(str.c_str(), pos, str.size()); }
+
+ //! <b>Effects</b>: Determines the highest position xpos, if possible, such that
+ //! both of the following conditions obtain: a) xpos <= pos and xpos < size();
+ //! b) traits::eq(at(xpos), sv.at(I)) for no element I of the string controlled by sv.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: xpos if the function can determine such a value for xpos. Otherwise, returns npos.
+ template<template <class, class> class BasicStringView>
+ size_type find_last_not_of(BasicStringView<CharT, Traits> sv, size_type pos = npos) const
+ { return find_last_not_of(sv.data(), pos, sv.size()); }
+
+ //! <b>Requires</b>: s points to an array of at least n elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_last_not_of(basic_string(s, n), pos).
+ size_type find_last_not_of(const CharT* s, size_type pos, size_type n) const
+ {
+ const size_type len = this->size();
+
+ if (len < 1)
+ return npos;
+ else {
+ const const_iterator last = begin() + dtl::min_value(len - 1, pos) + 1;
+ const const_reverse_iterator rresult =
+ boost::container::find_if(const_reverse_iterator(last), rend(),
+ Not_within_traits<Traits>(s, s + n));
+ return rresult != rend() ? (rresult.base() - 1) - begin() : npos;
+ }
+ }
+
+ //! <b>Requires</b>: s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_last_not_of(basic_string(s), pos).
+ size_type find_last_not_of(const CharT* s, size_type pos = npos) const
+ { return find_last_not_of(s, pos, Traits::length(s)); }
+
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: find_last_not_of(basic_string(1, c), pos).
+ size_type find_last_not_of(CharT c, size_type pos = npos) const
+ {
+ const size_type len = this->size();
+
+ if (len < 1)
+ return npos;
+ else {
+ const const_iterator last = begin() + dtl::min_value(len - 1, pos) + 1;
+ const const_reverse_iterator rresult =
+ boost::container::find_if(const_reverse_iterator(last), rend(),
+ boost::container::not1(boost::container::bind2nd(Eq_traits<Traits>(), c)));
+ return rresult != rend() ? (rresult.base() - 1) - begin() : npos;
+ }
+ }
+
+ //! <b>Requires</b>: Requires: pos <= size()
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
+ //! the smaller of n and size() - pos.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or out_of_range if pos > size().
+ //!
+ //! <b>Returns</b>: basic_string<CharT,traits,Allocator>(data()+pos,rlen).
+ basic_string substr(size_type pos = 0, size_type n = npos) const
+ {
+ if (pos > this->size())
+ throw_out_of_range("basic_string::substr out of range position");
+ const pointer addr = this->priv_addr();
+ return basic_string(addr + pos,
+ addr + pos + dtl::min_value(n, size() - pos), this->alloc());
+ }
+
+ //! <b>Effects</b>: Determines the effective length rlen of the string to compare as
+ //! the smaller of size() and str.size(). The function then compares the two strings by
+ //! calling traits::compare(data(), str.data(), rlen).
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: The nonzero result if the result of the comparison is nonzero.
+ //! Otherwise, returns a value < 0 if size() < str.size(), a 0 value if size() == str.size(),
+ //! and value > 0 if size() > str.size()
+ int compare(const basic_string& str) const
+ {
+ const pointer addr = this->priv_addr();
+ const pointer str_addr = str.priv_addr();
+ return s_compare(addr, addr + this->priv_size(), str_addr, str_addr + str.priv_size());
+ }
+
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: compare(basic_string(sv)).
+ template<template <class, class> class BasicStringView>
+ int compare(BasicStringView<CharT,Traits> sv) const
+ {
+ const pointer addr = this->priv_addr();
+ return s_compare(addr, addr + this->priv_size(), sv.data(), sv.data() + sv.size());
+ }
+
+ //! <b>Requires</b>: pos1 <= size()
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to compare as
+ //! the smaller of (this->size() - pos1), n1 and str.size(). The function then compares the two strings by
+ //! calling traits::compare(data()+pos1, str.data(), rlen).
+ //!
+ //! <b>Throws</b>: out_of_range if pos1 > size()
+ //!
+ //! <b>Returns</b>:basic_string(*this,pos1,n1).compare(str).
+ int compare(size_type pos1, size_type n1, const basic_string& str) const
+ {
+ if (pos1 > this->size())
+ throw_out_of_range("basic_string::compare out of range position");
+ const pointer addr = this->priv_addr();
+ const pointer str_addr = str.priv_addr();
+ return s_compare(addr + pos1,
+ addr + pos1 + dtl::min_value(n1, this->size() - pos1),
+ str_addr, str_addr + str.priv_size());
+ }
+
+ //! <b>Requires</b>: pos1 <= size()
+ //!
+ //! <b>Throws</b>: out_of_range if pos1 > size()
+ //!
+ //! <b>Returns</b>:basic_string(*this,pos1,n1).compare(sv).
+ template<template <class, class> class BasicStringView>
+ int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv) const
+ {
+ if (pos1 > this->size())
+ throw_out_of_range("basic_string::compare out of range position");
+ const pointer addr = this->priv_addr() + pos1;
+ const CharT* str_addr = sv.data();
+ return s_compare(addr, addr + dtl::min_value(n1, this->size() - pos1),
+ str_addr, str_addr + sv.size());
+ }
+
+ //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size()
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
+ //! the smaller of
+ //!
+ //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > str.size()
+ //!
+ //! <b>Returns</b>: basic_string(*this, pos1, n1).compare(basic_string(str, pos2, n2)).
+ int compare(size_type pos1, size_type n1, const basic_string& str, size_type pos2, size_type n2 = npos) const
+ {
+ if (pos1 > this->size() || pos2 > str.size())
+ throw_out_of_range("basic_string::compare out of range position");
+ const pointer addr = this->priv_addr() + pos1;
+ const pointer str_addr = str.priv_addr() + pos2;
+ return s_compare(addr, addr + dtl::min_value(n1, this->size() - pos1),
+ str_addr, str_addr + dtl::min_value(n2, str.size() - pos2));
+ }
+
+ //! <b>Requires</b>: pos1 <= size() and pos2 <= str.size()
+ //!
+ //! <b>Effects</b>: Determines the effective length rlen of the string to copy as
+ //! the smaller of
+ //!
+ //! <b>Throws</b>: out_of_range if pos1 > size() or pos2 > sv.size()
+ //!
+ //! <b>Returns</b>: basic_string(*this, pos1, n1).compare(BasicStringView<CharT, Traits>(sv, pos2, n2)).
+ template<template <class, class> class BasicStringView>
+ int compare(size_type pos1, size_type n1, BasicStringView<CharT,Traits> sv, size_type pos2, size_type n2) const
+ {
+ if (pos1 > this->size() || pos2 > sv.size())
+ throw_out_of_range("basic_string::compare out of range position");
+ const pointer addr = this->priv_addr() + pos1;
+ const CharT * str_addr = sv.data() + pos2;
+ return s_compare(addr, addr + dtl::min_value(n1, this->size() - pos1),
+ str_addr, str_addr + dtl::min_value(n2, sv.size() - pos2));
+ }
+
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Returns</b>: compare(basic_string(s)).
+ int compare(const CharT* s) const
+ {
+ const pointer addr = this->priv_addr();
+ return s_compare(addr, addr + this->priv_size(), s, s + Traits::length(s));
+ }
+
+ //! <b>Requires</b>: pos1 > size() and s points to an array of at least n2 elements of CharT.
+ //!
+ //! <b>Throws</b>: out_of_range if pos1 > size()
+ //!
+ //! <b>Returns</b>: basic_string(*this, pos, n1).compare(basic_string(s, n2)).
+ int compare(size_type pos1, size_type n1, const CharT* s, size_type n2) const
+ {
+ if (pos1 > this->size())
+ throw_out_of_range("basic_string::compare out of range position");
+ const pointer addr = this->priv_addr();
+ return s_compare( addr + pos1,
+ addr + pos1 + dtl::min_value(n1, this->size() - pos1),
+ s, s + n2);
+ }
+
+ //! <b>Requires</b>: pos1 > size() and s points to an array of at least traits::length(s) + 1 elements of CharT.
+ //!
+ //! <b>Throws</b>: out_of_range if pos1 > size()
+ //!
+ //! <b>Returns</b>: basic_string(*this, pos, n1).compare(basic_string(s, n2)).
+ int compare(size_type pos1, size_type n1, const CharT* s) const
+ { return this->compare(pos1, n1, s, Traits::length(s)); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ void priv_reserve(size_type res_arg, const bool null_terminate = true)
+ {
+ if (res_arg > this->max_size()){
+ throw_length_error("basic_string::reserve max_size() exceeded");
+ }
+
+ if (this->capacity() < res_arg){
+ size_type n = dtl::max_value(res_arg, this->size()) + 1;
+ size_type new_cap = this->next_capacity(n);
+ pointer reuse = 0;
+ pointer new_start = this->allocation_command(allocate_new, n, new_cap, reuse);
+ size_type new_length = 0;
+
+ const pointer addr = this->priv_addr();
+ new_length += priv_uninitialized_copy
+ (addr, addr + this->priv_size(), new_start);
+ if(null_terminate){
+ this->priv_construct_null(new_start + new_length);
+ }
+ this->deallocate_block();
+ this->assure_long();
+ this->priv_long_addr(new_start);
+ this->priv_long_size(new_length);
+ this->priv_storage(new_cap);
+ }
+ }
+
+ template<class It1, class It2>
+ static int s_compare(It1 f1, It1 l1, It2 f2, It2 l2)
+ {
+ const difference_type n1 = l1 - f1;
+ const difference_type n2 = l2 - f2;
+ const int cmp = Traits::compare(boost::movelib::to_raw_pointer(f1),
+ boost::movelib::to_raw_pointer(f2),
+ dtl::min_value(n1, n2));
+ return cmp != 0 ? cmp : (n1 < n2 ? -1 : (n1 > n2 ? 1 : 0));
+ }
+
+ template<class AllocVersion>
+ void priv_shrink_to_fit_dynamic_buffer
+ ( AllocVersion
+ , typename dtl::enable_if<dtl::is_same<AllocVersion, version_1> >::type* = 0)
+ {
+ //Allocate a new buffer.
+ size_type real_cap = 0;
+ const pointer long_addr = this->priv_long_addr();
+ const size_type long_size = this->priv_long_size();
+ const size_type long_storage = this->priv_long_storage();
+ //We can make this nothrow as chars are always NoThrowCopyables
+ BOOST_TRY{
+ pointer reuse = 0;
+ real_cap = long_size+1;
+ const pointer ret = this->allocation_command(allocate_new, long_size+1, real_cap, reuse);
+ //Copy and update
+ Traits::copy( boost::movelib::to_raw_pointer(ret)
+ , boost::movelib::to_raw_pointer(this->priv_long_addr())
+ , long_size+1);
+ this->priv_long_addr(ret);
+ this->priv_storage(real_cap);
+ //And release old buffer
+ this->alloc().deallocate(long_addr, long_storage);
+ }
+ BOOST_CATCH(...){
+ return;
+ }
+ BOOST_CATCH_END
+ }
+
+ template<class AllocVersion>
+ void priv_shrink_to_fit_dynamic_buffer
+ ( AllocVersion
+ , typename dtl::enable_if<dtl::is_same<AllocVersion, version_2> >::type* = 0)
+ {
+ size_type received_size = this->priv_long_size()+1;
+ pointer hint = this->priv_long_addr();
+ if(this->alloc().allocation_command
+ ( shrink_in_place | nothrow_allocation, this->priv_long_storage(), received_size, hint)){
+ this->priv_storage(received_size);
+ }
+ }
+
+ void priv_construct_null(pointer p)
+ { this->construct(p, CharT(0)); }
+
+ // Helper functions used by constructors. It is a severe error for
+ // any of them to be called anywhere except from within constructors.
+ void priv_terminate_string()
+ { this->priv_construct_null(this->priv_end_addr()); }
+
+ template<class FwdIt, class Count> inline
+ void priv_uninitialized_fill_n(FwdIt first, Count count, const CharT val)
+ {
+ //Save initial position
+ FwdIt init = first;
+
+ BOOST_TRY{
+ //Construct objects
+ for (; count--; ++first){
+ this->construct(first, val);
+ }
+ }
+ BOOST_CATCH(...){
+ //Call destructors
+ for (; init != first; ++init){
+ this->destroy(init);
+ }
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template<class InpIt, class FwdIt> inline
+ size_type priv_uninitialized_copy(InpIt first, InpIt last, FwdIt dest)
+ {
+ //Save initial destination position
+ FwdIt dest_init = dest;
+ size_type constructed = 0;
+
+ BOOST_TRY{
+ //Try to build objects
+ for (; first != last; ++dest, ++first, ++constructed){
+ this->construct(dest, *first);
+ }
+ }
+ BOOST_CATCH(...){
+ //Call destructors
+ for (; constructed--; ++dest_init){
+ this->destroy(dest_init);
+ }
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ return (constructed);
+ }
+
+ template <class InputIterator, class OutIterator>
+ void priv_copy(InputIterator first, InputIterator last, OutIterator result)
+ {
+ for ( ; first != last; ++first, ++result)
+ Traits::assign(*result, *first);
+ }
+
+ void priv_copy(const CharT* first, const CharT* last, CharT* result)
+ { Traits::copy(result, first, last - first); }
+
+ template <class Integer>
+ basic_string& priv_replace_dispatch(const_iterator first, const_iterator last,
+ Integer n, Integer x,
+ dtl::true_)
+ { return this->replace(first, last, (size_type) n, (CharT) x); }
+
+ template <class InputIter>
+ basic_string& priv_replace_dispatch(const_iterator first, const_iterator last,
+ InputIter f, InputIter l,
+ dtl::false_)
+ {
+ typedef typename boost::container::iterator_traits<InputIter>::iterator_category Category;
+ return this->priv_replace(first, last, f, l, Category());
+ }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+basic_string(InputIterator, InputIterator) ->
+ basic_string<typename iterator_traits<InputIterator>::value_type>;
+
+template <typename InputIterator, typename Allocator>
+basic_string(InputIterator, InputIterator, Allocator const&) ->
+ basic_string<typename iterator_traits<InputIterator>::value_type, Allocator>;
+
+#endif
+
+#ifdef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//!Typedef for a basic_string of
+//!narrow characters
+typedef basic_string
+ <char
+ ,std::char_traits<char>
+ ,new_allocator<char> >
+string;
+
+//!Typedef for a basic_string of
+//!narrow characters
+typedef basic_string
+ <wchar_t
+ ,std::char_traits<wchar_t>
+ ,new_allocator<wchar_t> >
+wstring;
+
+#else
+
+template <class CharT, class Traits, class Allocator>
+const typename basic_string<CharT,Traits,Allocator>::size_type
+ basic_string<CharT,Traits,Allocator>::npos;
+
+template<class S>
+struct is_string
+{
+ static const bool value = false;
+};
+
+template<class C, class T, class A>
+struct is_string< basic_string<C, T, A> >
+{
+ static const bool value = true;
+};
+
+#endif
+
+// ------------------------------------------------------------
+// Non-member functions.
+
+// Operator+
+
+template <class CharT, class Traits, class Allocator> inline
+ basic_string<CharT,Traits,Allocator>
+ operator+(const basic_string<CharT,Traits,Allocator>& x
+ ,const basic_string<CharT,Traits,Allocator>& y)
+{
+ typedef basic_string<CharT,Traits,Allocator> str_t;
+ typedef typename str_t::reserve_t reserve_t;
+ reserve_t reserve;
+ str_t result(reserve, x.size() + y.size(), x.get_stored_allocator());
+ result.append(x);
+ result.append(y);
+ return result;
+}
+
+template <class CharT, class Traits, class Allocator> inline
+ basic_string<CharT, Traits, Allocator> operator+
+ ( BOOST_RV_REF_BEG basic_string<CharT, Traits, Allocator> BOOST_RV_REF_END x
+ , BOOST_RV_REF_BEG basic_string<CharT, Traits, Allocator> BOOST_RV_REF_END y)
+{
+ x += y;
+ return boost::move(x);
+}
+
+template <class CharT, class Traits, class Allocator> inline
+ basic_string<CharT, Traits, Allocator> operator+
+ ( BOOST_RV_REF_BEG basic_string<CharT, Traits, Allocator> BOOST_RV_REF_END x
+ , const basic_string<CharT,Traits,Allocator>& y)
+{
+ x += y;
+ return boost::move(x);
+}
+
+template <class CharT, class Traits, class Allocator> inline
+ basic_string<CharT, Traits, Allocator> operator+
+ (const basic_string<CharT,Traits,Allocator>& x
+ ,BOOST_RV_REF_BEG basic_string<CharT, Traits, Allocator> BOOST_RV_REF_END y)
+{
+ y.insert(y.begin(), x.begin(), x.end());
+ return boost::move(y);
+}
+
+template <class CharT, class Traits, class Allocator> inline
+ basic_string<CharT, Traits, Allocator> operator+
+ (const CharT* s, basic_string<CharT, Traits, Allocator> y)
+{
+ y.insert(y.begin(), s, s + Traits::length(s));
+ return y;
+}
+
+template <class CharT, class Traits, class Allocator> inline
+ basic_string<CharT,Traits,Allocator> operator+
+ (basic_string<CharT,Traits,Allocator> x, const CharT* s)
+{
+ x += s;
+ return x;
+}
+
+template <class CharT, class Traits, class Allocator> inline
+ basic_string<CharT,Traits,Allocator> operator+
+ (CharT c, basic_string<CharT,Traits,Allocator> y)
+{
+ y.insert(y.begin(), c);
+ return y;
+}
+
+template <class CharT, class Traits, class Allocator> inline
+ basic_string<CharT,Traits,Allocator> operator+
+ (basic_string<CharT,Traits,Allocator> x, const CharT c)
+{
+ x += c;
+ return x;
+}
+
+// Operator== and operator!=
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator==(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
+{
+ return x.size() == y.size() &&
+ Traits::compare(x.data(), y.data(), x.size()) == 0;
+}
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator==(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
+{
+ typename basic_string<CharT,Traits,Allocator>::size_type n = Traits::length(s);
+ return n == y.size() && Traits::compare(s, y.data(), n) == 0;
+}
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator==(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
+{
+ typename basic_string<CharT,Traits,Allocator>::size_type n = Traits::length(s);
+ return x.size() == n && Traits::compare(x.data(), s, n) == 0;
+}
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+ operator==( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
+{
+ return x.size() == y.size() &&
+ Traits::compare(x.data(), y.data(), x.size()) == 0;
+}
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+ operator==( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
+{
+ return x.size() == y.size() &&
+ Traits::compare(x.data(), y.data(), x.size()) == 0;
+}
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator!=(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
+ { return !(x == y); }
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator!=(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
+ { return !(s == y); }
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator!=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
+ { return !(x == s); }
+
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator!=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
+ { return !(x == y); }
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator!=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
+ { return !(x == y); }
+
+// Operator< (and also >, <=, and >=).
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator<(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
+{
+ return x.compare(y) < 0;
+}
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator<(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
+{
+ return y.compare(s) > 0;
+}
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator<(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
+{
+ return x.compare(s) < 0;
+}
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator<( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
+ { return y.compare(x) > 0; }
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator<( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
+ { return x.compare(y) < 0; }
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator>(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y) {
+ return y < x;
+}
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator>(const CharT* s, const basic_string<CharT,Traits,Allocator>& y) {
+ return y < s;
+}
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator>(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
+{
+ return s < x;
+}
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator>( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
+ { return y < x; }
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator>( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
+ { return y < x; }
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator<=(const basic_string<CharT,Traits,Allocator>& x, const basic_string<CharT,Traits,Allocator>& y)
+{
+ return !(y < x);
+}
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator<=(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
+ { return !(y < s); }
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator<=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
+ { return !(s < x); }
+
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator<=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
+ { return !(y < x); }
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator<=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
+ { return !(y < x); }
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator>=(const basic_string<CharT,Traits,Allocator>& x,
+ const basic_string<CharT,Traits,Allocator>& y)
+ { return !(x < y); }
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator>=(const CharT* s, const basic_string<CharT,Traits,Allocator>& y)
+ { return !(s < y); }
+
+template <class CharT, class Traits, class Allocator>
+inline bool
+operator>=(const basic_string<CharT,Traits,Allocator>& x, const CharT* s)
+ { return !(x < s); }
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator>=( BasicStringView<CharT,Traits> x, const basic_string<CharT,Traits,Allocator>& y)
+ { return !(x < y); }
+
+template <class CharT, class Traits, class Allocator, template <class, class> class BasicStringView>
+inline
+ BOOST_CONTAINER_DOC1ST( bool,
+ typename dtl::disable_if
+ <is_string< BasicStringView<CharT BOOST_MOVE_I Traits> > BOOST_MOVE_I bool >::type)
+operator>=( const basic_string<CharT,Traits,Allocator>& x, BasicStringView<CharT,Traits> y)
+ { return !(x < y); }
+
+// Swap.
+template <class CharT, class Traits, class Allocator>
+inline void swap(basic_string<CharT,Traits,Allocator>& x, basic_string<CharT,Traits,Allocator>& y)
+{ x.swap(y); }
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+// I/O.
+namespace dtl {
+
+template <class CharT, class Traits>
+inline bool
+string_fill(std::basic_ostream<CharT, Traits>& os,
+ std::basic_streambuf<CharT, Traits>* buf,
+ std::size_t n)
+{
+ CharT f = os.fill();
+ std::size_t i;
+ bool ok = true;
+
+ for (i = 0; i < n; i++)
+ ok = ok && !Traits::eq_int_type(buf->sputc(f), Traits::eof());
+ return ok;
+}
+
+} //namespace dtl {
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+template <class CharT, class Traits, class Allocator>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os, const basic_string<CharT,Traits,Allocator>& s)
+{
+ typename std::basic_ostream<CharT, Traits>::sentry sentry(os);
+ bool ok = false;
+
+ if (sentry) {
+ ok = true;
+ typename basic_string<CharT,Traits,Allocator>::size_type n = s.size();
+ typename basic_string<CharT,Traits,Allocator>::size_type pad_len = 0;
+ const bool left = (os.flags() & std::ios::left) != 0;
+ const std::size_t w = os.width(0);
+ std::basic_streambuf<CharT, Traits>* buf = os.rdbuf();
+
+ if (w != 0 && n < w)
+ pad_len = w - n;
+
+ if (!left)
+ ok = dtl::string_fill(os, buf, pad_len);
+
+ ok = ok &&
+ buf->sputn(s.data(), std::streamsize(n)) == std::streamsize(n);
+
+ if (left)
+ ok = ok && dtl::string_fill(os, buf, pad_len);
+ }
+
+ if (!ok)
+ os.setstate(std::ios_base::failbit);
+
+ return os;
+}
+
+
+template <class CharT, class Traits, class Allocator>
+std::basic_istream<CharT, Traits>&
+operator>>(std::basic_istream<CharT, Traits>& is, basic_string<CharT,Traits,Allocator>& s)
+{
+ typename std::basic_istream<CharT, Traits>::sentry sentry(is);
+
+ if (sentry) {
+ std::basic_streambuf<CharT, Traits>* buf = is.rdbuf();
+ const std::ctype<CharT>& ctype = std::use_facet<std::ctype<CharT> >(is.getloc());
+
+ s.clear();
+ std::size_t n = is.width(0);
+ if (n == 0)
+ n = static_cast<std::size_t>(-1);
+ else
+ s.reserve(n);
+
+ while (n-- > 0) {
+ typename Traits::int_type c1 = buf->sbumpc();
+
+ if (Traits::eq_int_type(c1, Traits::eof())) {
+ is.setstate(std::ios_base::eofbit);
+ break;
+ }
+ else {
+ CharT c = Traits::to_char_type(c1);
+
+ if (ctype.is(std::ctype<CharT>::space, c)) {
+ if (Traits::eq_int_type(buf->sputbackc(c), Traits::eof()))
+ is.setstate(std::ios_base::failbit);
+ break;
+ }
+ else
+ s.push_back(c);
+ }
+ }
+
+ // If we have read no characters, then set failbit.
+ if (s.size() == 0)
+ is.setstate(std::ios_base::failbit);
+ }
+ else
+ is.setstate(std::ios_base::failbit);
+
+ return is;
+}
+
+template <class CharT, class Traits, class Allocator>
+std::basic_istream<CharT, Traits>&
+getline(std::istream& is, basic_string<CharT,Traits,Allocator>& s,CharT delim)
+{
+ typename basic_string<CharT,Traits,Allocator>::size_type nread = 0;
+ typename std::basic_istream<CharT, Traits>::sentry sentry(is, true);
+ if (sentry) {
+ std::basic_streambuf<CharT, Traits>* buf = is.rdbuf();
+ s.clear();
+
+ while (nread < s.max_size()) {
+ int c1 = buf->sbumpc();
+ if (Traits::eq_int_type(c1, Traits::eof())) {
+ is.setstate(std::ios_base::eofbit);
+ break;
+ }
+ else {
+ ++nread;
+ CharT c = Traits::to_char_type(c1);
+ if (!Traits::eq(c, delim))
+ s.push_back(c);
+ else
+ break; // Character is extracted but not appended.
+ }
+ }
+ }
+ if (nread == 0 || nread >= s.max_size())
+ is.setstate(std::ios_base::failbit);
+
+ return is;
+}
+
+template <class CharT, class Traits, class Allocator>
+inline std::basic_istream<CharT, Traits>&
+getline(std::basic_istream<CharT, Traits>& is, basic_string<CharT,Traits,Allocator>& s)
+{
+ return getline(is, s, '\n');
+}
+
+template <class Ch, class Allocator>
+inline std::size_t hash_value(basic_string<Ch, std::char_traits<Ch>, Allocator> const& v)
+{
+ return hash_range(v.begin(), v.end());
+}
+
+}}
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace boost {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class C, class T, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::basic_string<C, T, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
+};
+
+}
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // BOOST_CONTAINER_STRING_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container/throw_exception.hpp b/src/third_party/boost-1.69.0/boost/container/throw_exception.hpp
index 1b6eec11794..1b6eec11794 100644
--- a/src/third_party/boost-1.68.0/boost/container/throw_exception.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/throw_exception.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/uses_allocator.hpp b/src/third_party/boost-1.69.0/boost/container/uses_allocator.hpp
index e0e3518081a..e0e3518081a 100644
--- a/src/third_party/boost-1.68.0/boost/container/uses_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/uses_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container/uses_allocator_fwd.hpp b/src/third_party/boost-1.69.0/boost/container/uses_allocator_fwd.hpp
index 42a5b904f00..42a5b904f00 100644
--- a/src/third_party/boost-1.68.0/boost/container/uses_allocator_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/container/uses_allocator_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/container/vector.hpp b/src/third_party/boost-1.69.0/boost/container/vector.hpp
new file mode 100644
index 00000000000..b3ff8ed821f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/container/vector.hpp
@@ -0,0 +1,3401 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_CONTAINER_CONTAINER_VECTOR_HPP
+#define BOOST_CONTAINER_CONTAINER_VECTOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/container/detail/config_begin.hpp>
+#include <boost/container/detail/workaround.hpp>
+
+// container
+#include <boost/container/container_fwd.hpp>
+#include <boost/container/allocator_traits.hpp>
+#include <boost/container/new_allocator.hpp> //new_allocator
+#include <boost/container/throw_exception.hpp>
+#include <boost/container/options.hpp>
+// container detail
+#include <boost/container/detail/advanced_insert_int.hpp>
+#include <boost/container/detail/algorithm.hpp> //equal()
+#include <boost/container/detail/alloc_helpers.hpp>
+#include <boost/container/detail/allocation_type.hpp>
+#include <boost/container/detail/copy_move_algo.hpp>
+#include <boost/container/detail/destroyers.hpp>
+#include <boost/container/detail/iterator.hpp>
+#include <boost/container/detail/iterators.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
+#include <boost/container/detail/mpl.hpp>
+#include <boost/container/detail/next_capacity.hpp>
+#include <boost/container/detail/value_functors.hpp>
+#include <boost/move/detail/to_raw_pointer.hpp>
+#include <boost/container/detail/type_traits.hpp>
+#include <boost/container/detail/version_type.hpp>
+// intrusive
+#include <boost/intrusive/pointer_traits.hpp>
+// move
+#include <boost/move/adl_move_swap.hpp>
+#include <boost/move/iterator.hpp>
+#include <boost/move/traits.hpp>
+#include <boost/move/utility_core.hpp>
+// move/detail
+#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#include <boost/move/detail/fwd_macros.hpp>
+#endif
+#include <boost/move/detail/move_helpers.hpp>
+// move/algo
+#include <boost/move/algo/adaptive_merge.hpp>
+#include <boost/move/algo/unique.hpp>
+#include <boost/move/algo/predicate.hpp>
+#include <boost/move/algo/detail/set_difference.hpp>
+// other
+#include <boost/core/no_exceptions_support.hpp>
+#include <boost/assert.hpp>
+#include <boost/cstdint.hpp>
+
+//std
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+#include <initializer_list> //for std::initializer_list
+#endif
+
+namespace boost {
+namespace container {
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+
+template <class Pointer, bool IsConst>
+class vec_iterator
+{
+ public:
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef typename boost::intrusive::pointer_traits<Pointer>::element_type value_type;
+ typedef typename boost::intrusive::pointer_traits<Pointer>::difference_type difference_type;
+ typedef typename dtl::if_c
+ < IsConst
+ , typename boost::intrusive::pointer_traits<Pointer>::template
+ rebind_pointer<const value_type>::type
+ , Pointer
+ >::type pointer;
+ typedef typename boost::intrusive::pointer_traits<pointer> ptr_traits;
+ typedef typename ptr_traits::reference reference;
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ Pointer m_ptr;
+
+ public:
+ BOOST_CONTAINER_FORCEINLINE const Pointer &get_ptr() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE Pointer &get_ptr() BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE explicit vec_iterator(Pointer ptr) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_ptr(ptr)
+ {}
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+
+ //Constructors
+ BOOST_CONTAINER_FORCEINLINE vec_iterator() BOOST_NOEXCEPT_OR_NOTHROW
+ : m_ptr() //Value initialization to achieve "null iterators" (N3644)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE vec_iterator(vec_iterator<Pointer, false> const& other) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_ptr(other.get_ptr())
+ {}
+
+ //Pointer like operators
+ BOOST_CONTAINER_FORCEINLINE reference operator*() const BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(!!m_ptr); return *m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE reference operator[](difference_type off) const BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(!!m_ptr); return m_ptr[off]; }
+
+ //Increment / Decrement
+ BOOST_CONTAINER_FORCEINLINE vec_iterator& operator++() BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(!!m_ptr); ++m_ptr; return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE vec_iterator operator++(int) BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(!!m_ptr); return vec_iterator(m_ptr++); }
+
+ BOOST_CONTAINER_FORCEINLINE vec_iterator& operator--() BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(!!m_ptr); --m_ptr; return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE vec_iterator operator--(int) BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(!!m_ptr); return vec_iterator(m_ptr--); }
+
+ //Arithmetic
+ BOOST_CONTAINER_FORCEINLINE vec_iterator& operator+=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(m_ptr || !off); m_ptr += off; return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE vec_iterator& operator-=(difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(m_ptr || !off); m_ptr -= off; return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator+(const vec_iterator &x, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(x.m_ptr || !off); return vec_iterator(x.m_ptr+off); }
+
+ BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator+(difference_type off, vec_iterator right) BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(right.m_ptr || !off); right.m_ptr += off; return right; }
+
+ BOOST_CONTAINER_FORCEINLINE friend vec_iterator operator-(vec_iterator left, difference_type off) BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT(left.m_ptr || !off); left.m_ptr -= off; return left; }
+
+ BOOST_CONTAINER_FORCEINLINE friend difference_type operator-(const vec_iterator &left, const vec_iterator& right) BOOST_NOEXCEPT_OR_NOTHROW
+ { return left.m_ptr - right.m_ptr; }
+
+ //Comparison operators
+ BOOST_CONTAINER_FORCEINLINE friend bool operator== (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_ptr == r.m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_ptr != r.m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator< (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_ptr < r.m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_ptr <= r.m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator> (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_ptr > r.m_ptr; }
+
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>= (const vec_iterator& l, const vec_iterator& r) BOOST_NOEXCEPT_OR_NOTHROW
+ { return l.m_ptr >= r.m_ptr; }
+};
+
+template<class BiDirPosConstIt, class BiDirValueIt>
+struct vector_insert_ordered_cursor
+{
+ typedef typename iterator_traits<BiDirPosConstIt>::value_type size_type;
+ typedef typename iterator_traits<BiDirValueIt>::reference reference;
+
+ BOOST_CONTAINER_FORCEINLINE vector_insert_ordered_cursor(BiDirPosConstIt posit, BiDirValueIt valueit)
+ : last_position_it(posit), last_value_it(valueit)
+ {}
+
+ void operator --()
+ {
+ --last_value_it;
+ --last_position_it;
+ while(this->get_pos() == size_type(-1)){
+ --last_value_it;
+ --last_position_it;
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE size_type get_pos() const
+ { return *last_position_it; }
+
+ BOOST_CONTAINER_FORCEINLINE reference get_val()
+ { return *last_value_it; }
+
+ BiDirPosConstIt last_position_it;
+ BiDirValueIt last_value_it;
+};
+
+struct initial_capacity_t{};
+
+template<class Pointer, bool IsConst>
+BOOST_CONTAINER_FORCEINLINE const Pointer &vector_iterator_get_ptr(const vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
+{ return it.get_ptr(); }
+
+template<class Pointer, bool IsConst>
+BOOST_CONTAINER_FORCEINLINE Pointer &get_ptr(vec_iterator<Pointer, IsConst> &it) BOOST_NOEXCEPT_OR_NOTHROW
+{ return it.get_ptr(); }
+
+struct vector_uninitialized_size_t {};
+static const vector_uninitialized_size_t vector_uninitialized_size = vector_uninitialized_size_t();
+
+template <class T>
+struct vector_value_traits_base
+{
+ static const bool trivial_dctr = dtl::is_trivially_destructible<T>::value;
+ static const bool trivial_dctr_after_move = has_trivial_destructor_after_move<T>::value;
+ static const bool trivial_copy = dtl::is_trivially_copy_constructible<T>::value;
+ static const bool nothrow_copy = dtl::is_nothrow_copy_constructible<T>::value || trivial_copy;
+ static const bool trivial_assign = dtl::is_trivially_copy_assignable<T>::value;
+ static const bool nothrow_assign = dtl::is_nothrow_copy_assignable<T>::value || trivial_assign;
+};
+
+
+template <class Allocator>
+struct vector_value_traits
+ : public vector_value_traits_base<typename Allocator::value_type>
+{
+ typedef vector_value_traits_base<typename Allocator::value_type> base_t;
+ //This is the anti-exception array destructor
+ //to deallocate values already constructed
+ typedef typename dtl::if_c
+ <base_t::trivial_dctr
+ ,dtl::null_scoped_destructor_n<Allocator>
+ ,dtl::scoped_destructor_n<Allocator>
+ >::type ArrayDestructor;
+ //This is the anti-exception array deallocator
+ typedef dtl::scoped_array_deallocator<Allocator> ArrayDeallocator;
+};
+
+//!This struct deallocates and allocated memory
+template < class Allocator
+ , class StoredSizeType
+ , class AllocatorVersion = typename dtl::version<Allocator>::type
+ >
+struct vector_alloc_holder
+ : public Allocator
+{
+ private:
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(vector_alloc_holder)
+
+ public:
+ typedef Allocator allocator_type;
+ typedef StoredSizeType stored_size_type;
+ typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef typename allocator_traits_type::pointer pointer;
+ typedef typename allocator_traits_type::size_type size_type;
+ typedef typename allocator_traits_type::value_type value_type;
+
+ static bool is_propagable_from(const allocator_type &from_alloc, pointer p, const allocator_type &to_alloc, bool const propagate_allocator)
+ {
+ (void)propagate_allocator; (void)p; (void)to_alloc; (void)from_alloc;
+ const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
+ !allocator_traits_type::storage_is_unpropagable(from_alloc, p);
+ return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(from_alloc, to_alloc));
+ }
+
+ static bool are_swap_propagable(const allocator_type &l_a, pointer l_p, const allocator_type &r_a, pointer r_p, bool const propagate_allocator)
+ {
+ (void)propagate_allocator; (void)l_p; (void)r_p; (void)l_a; (void)r_a;
+ const bool all_storage_propagable = !allocator_traits_type::is_partially_propagable::value ||
+ !(allocator_traits_type::storage_is_unpropagable(l_a, l_p) || allocator_traits_type::storage_is_unpropagable(r_a, r_p));
+ return all_storage_propagable && (propagate_allocator || allocator_traits_type::equal(l_a, r_a));
+ }
+
+ //Constructor, does not throw
+ vector_alloc_holder()
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : Allocator(), m_start(), m_size(), m_capacity()
+ {}
+
+ //Constructor, does not throw
+ template<class AllocConvertible>
+ explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
+ : Allocator(boost::forward<AllocConvertible>(a)), m_start(), m_size(), m_capacity()
+ {}
+
+ //Constructor, does not throw
+ template<class AllocConvertible>
+ vector_alloc_holder(vector_uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
+ : Allocator(boost::forward<AllocConvertible>(a))
+ , m_start()
+ //Size is initialized here so vector should only call uninitialized_xxx after this
+ , m_size(static_cast<stored_size_type>(initial_size))
+ , m_capacity()
+ {
+ if(initial_size){
+ pointer reuse = pointer();
+ size_type final_cap = initial_size;
+ m_start = this->allocation_command(allocate_new, initial_size, final_cap, reuse);
+ m_capacity = static_cast<stored_size_type>(final_cap);
+ }
+ }
+
+ //Constructor, does not throw
+ vector_alloc_holder(vector_uninitialized_size_t, size_type initial_size)
+ : Allocator()
+ , m_start()
+ //Size is initialized here so vector should only call uninitialized_xxx after this
+ , m_size(static_cast<stored_size_type>(initial_size))
+ , m_capacity()
+ {
+ if(initial_size){
+ pointer reuse = pointer();
+ size_type final_cap = initial_size;
+ m_start = this->allocation_command(allocate_new, initial_size, final_cap, reuse);
+ m_capacity = static_cast<stored_size_type>(final_cap);
+ }
+ }
+
+ vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder) BOOST_NOEXCEPT_OR_NOTHROW
+ : Allocator(BOOST_MOVE_BASE(Allocator, holder))
+ , m_start(holder.m_start)
+ , m_size(holder.m_size)
+ , m_capacity(holder.m_capacity)
+ {
+ holder.m_start = pointer();
+ holder.m_size = holder.m_capacity = 0;
+ }
+
+ vector_alloc_holder(initial_capacity_t, pointer p, size_type capacity, BOOST_RV_REF(vector_alloc_holder) holder)
+ : Allocator(BOOST_MOVE_BASE(Allocator, holder))
+ , m_start(p)
+ , m_size(holder.m_size)
+ , m_capacity(static_cast<stored_size_type>(capacity))
+ {
+ allocator_type &this_alloc = this->alloc();
+ allocator_type &x_alloc = holder.alloc();
+ if(this->is_propagable_from(x_alloc, holder.start(), this_alloc, true)){
+ if(this->m_capacity){
+ this->deallocate(this->m_start, this->m_capacity);
+ }
+ m_start = holder.m_start;
+ m_capacity = holder.m_capacity;
+ holder.m_start = pointer();
+ holder.m_capacity = holder.m_size = 0;
+ }
+ else if(this->m_capacity < holder.m_size){
+ size_type const n = holder.m_size;
+ pointer reuse = pointer();
+ size_type final_cap = n;
+ m_start = this->allocation_command(allocate_new, n, final_cap, reuse);
+ m_capacity = static_cast<stored_size_type>(final_cap);
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += n != 0;
+ #endif
+ }
+ }
+
+ vector_alloc_holder(initial_capacity_t, pointer p, size_type n)
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : Allocator()
+ , m_start(p)
+ , m_size()
+ //n is guaranteed to fit into stored_size_type
+ , m_capacity(static_cast<stored_size_type>(n))
+ {}
+
+ template<class AllocFwd>
+ vector_alloc_holder(initial_capacity_t, pointer p, size_type n, BOOST_FWD_REF(AllocFwd) a)
+ : Allocator(::boost::forward<AllocFwd>(a))
+ , m_start(p)
+ , m_size()
+ , m_capacity(n)
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE ~vector_alloc_holder() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if(this->m_capacity){
+ this->deallocate(this->m_start, this->m_capacity);
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE pointer allocation_command(boost::container::allocation_type command,
+ size_type limit_size, size_type &prefer_in_recvd_out_size, pointer &reuse)
+ {
+ typedef typename dtl::version<Allocator>::type alloc_version;
+ return this->priv_allocation_command(alloc_version(), command, limit_size, prefer_in_recvd_out_size, reuse);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE pointer allocate(size_type n)
+ {
+ const size_type max_alloc = allocator_traits_type::max_size(this->alloc());
+ const size_type max = max_alloc <= stored_size_type(-1) ? max_alloc : stored_size_type(-1);
+ if ( max < n )
+ boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
+
+ return allocator_traits_type::allocate(this->alloc(), n);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void deallocate(const pointer &p, size_type n)
+ {
+ allocator_traits_type::deallocate(this->alloc(), p, n);
+ }
+
+ bool try_expand_fwd(size_type at_least)
+ {
+ //There is not enough memory, try to expand the old one
+ const size_type new_cap = this->capacity() + at_least;
+ size_type real_cap = new_cap;
+ pointer reuse = this->start();
+ bool const success = !!this->allocation_command(expand_fwd, new_cap, real_cap, reuse);
+ //Check for forward expansion
+ if(success){
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_expand_fwd;
+ #endif
+ this->capacity(real_cap);
+ }
+ return success;
+ }
+
+ template<class GrowthFactorType>
+ size_type next_capacity(size_type additional_objects) const
+ {
+ BOOST_ASSERT(additional_objects > size_type(this->m_capacity - this->m_size));
+ size_type max = allocator_traits_type::max_size(this->alloc());
+ (clamp_by_stored_size_type)(max, stored_size_type());
+ const size_type remaining_cap = max - size_type(this->m_capacity);
+ const size_type min_additional_cap = additional_objects - size_type(this->m_capacity - this->m_size);
+
+ if ( remaining_cap < min_additional_cap )
+ boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
+
+ return GrowthFactorType()( size_type(this->m_capacity), min_additional_cap, max);
+ }
+
+ pointer m_start;
+ stored_size_type m_size;
+ stored_size_type m_capacity;
+
+ void swap_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ boost::adl_move_swap(this->m_start, x.m_start);
+ boost::adl_move_swap(this->m_size, x.m_size);
+ boost::adl_move_swap(this->m_capacity, x.m_capacity);
+ }
+
+ void steal_resources(vector_alloc_holder &x) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ this->m_start = x.m_start;
+ this->m_size = x.m_size;
+ this->m_capacity = x.m_capacity;
+ x.m_start = pointer();
+ x.m_size = x.m_capacity = 0;
+ }
+
+ BOOST_CONTAINER_FORCEINLINE Allocator &alloc() BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE const Allocator &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE const pointer &start() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_start; }
+ BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_capacity; }
+ BOOST_CONTAINER_FORCEINLINE void start(const pointer &p) BOOST_NOEXCEPT_OR_NOTHROW
+ { m_start = p; }
+ BOOST_CONTAINER_FORCEINLINE void capacity(const size_type &c) BOOST_NOEXCEPT_OR_NOTHROW
+ { BOOST_ASSERT( c <= stored_size_type(-1)); m_capacity = c; }
+
+ private:
+ void priv_first_allocation(size_type cap)
+ {
+ if(cap){
+ pointer reuse = pointer();
+ m_start = this->allocation_command(allocate_new, cap, cap, reuse);
+ m_capacity = cap;
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_alloc;
+ #endif
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE static void clamp_by_stored_size_type(size_type &, size_type)
+ {}
+
+ template<class SomeStoredSizeType>
+ BOOST_CONTAINER_FORCEINLINE static void clamp_by_stored_size_type(size_type &s, SomeStoredSizeType)
+ {
+ if (s >= SomeStoredSizeType(-1) )
+ s = SomeStoredSizeType(-1);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE pointer priv_allocation_command(version_1, boost::container::allocation_type command,
+ size_type limit_size,
+ size_type &prefer_in_recvd_out_size,
+ pointer &reuse)
+ {
+ (void)command;
+ BOOST_ASSERT( (command & allocate_new));
+ BOOST_ASSERT(!(command & nothrow_allocation));
+ //First detect overflow on smaller stored_size_types
+ if (limit_size > stored_size_type(-1)){
+ boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
+ }
+ (clamp_by_stored_size_type)(prefer_in_recvd_out_size, stored_size_type());
+ pointer const p = this->allocate(prefer_in_recvd_out_size);
+ reuse = pointer();
+ return p;
+ }
+
+ pointer priv_allocation_command(version_2, boost::container::allocation_type command,
+ size_type limit_size,
+ size_type &prefer_in_recvd_out_size,
+ pointer &reuse)
+ {
+ //First detect overflow on smaller stored_size_types
+ if (limit_size > stored_size_type(-1)){
+ boost::container::throw_length_error("get_next_capacity, allocator's max size reached");
+ }
+ (clamp_by_stored_size_type)(prefer_in_recvd_out_size, stored_size_type());
+ //Allocate memory
+ pointer p = this->alloc().allocation_command(command, limit_size, prefer_in_recvd_out_size, reuse);
+ //If after allocation prefer_in_recvd_out_size is not representable by stored_size_type, truncate it.
+ (clamp_by_stored_size_type)(prefer_in_recvd_out_size, stored_size_type());
+ return p;
+ }
+};
+
+//!This struct deallocates and allocated memory
+template <class Allocator, class StoredSizeType>
+struct vector_alloc_holder<Allocator, StoredSizeType, version_0>
+ : public Allocator
+{
+ private:
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(vector_alloc_holder)
+
+ public:
+ typedef boost::container::allocator_traits<Allocator> allocator_traits_type;
+ typedef typename allocator_traits_type::pointer pointer;
+ typedef typename allocator_traits_type::size_type size_type;
+ typedef typename allocator_traits_type::value_type value_type;
+ typedef StoredSizeType stored_size_type;
+
+ template <class OtherAllocator, class OtherStoredSizeType, class OtherAllocatorVersion>
+ friend struct vector_alloc_holder;
+
+ //Constructor, does not throw
+ vector_alloc_holder()
+ BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : Allocator(), m_size()
+ {}
+
+ //Constructor, does not throw
+ template<class AllocConvertible>
+ explicit vector_alloc_holder(BOOST_FWD_REF(AllocConvertible) a) BOOST_NOEXCEPT_OR_NOTHROW
+ : Allocator(boost::forward<AllocConvertible>(a)), m_size()
+ {}
+
+ //Constructor, does not throw
+ template<class AllocConvertible>
+ vector_alloc_holder(vector_uninitialized_size_t, BOOST_FWD_REF(AllocConvertible) a, size_type initial_size)
+ : Allocator(boost::forward<AllocConvertible>(a))
+ , m_size(initial_size) //Size is initialized here...
+ {
+ //... and capacity here, so vector, must call uninitialized_xxx in the derived constructor
+ this->priv_first_allocation(initial_size);
+ }
+
+ //Constructor, does not throw
+ vector_alloc_holder(vector_uninitialized_size_t, size_type initial_size)
+ : Allocator()
+ , m_size(initial_size) //Size is initialized here...
+ {
+ //... and capacity here, so vector, must call uninitialized_xxx in the derived constructor
+ this->priv_first_allocation(initial_size);
+ }
+
+ vector_alloc_holder(BOOST_RV_REF(vector_alloc_holder) holder)
+ : Allocator(BOOST_MOVE_BASE(Allocator, holder))
+ , m_size(holder.m_size) //Size is initialized here so vector should only call uninitialized_xxx after this
+ {
+ ::boost::container::uninitialized_move_alloc_n
+ (this->alloc(), boost::movelib::to_raw_pointer(holder.start()), m_size, boost::movelib::to_raw_pointer(this->start()));
+ }
+
+ template<class OtherAllocator, class OtherStoredSizeType, class OtherAllocatorVersion>
+ vector_alloc_holder(BOOST_RV_REF_BEG vector_alloc_holder<OtherAllocator, OtherStoredSizeType, OtherAllocatorVersion> BOOST_RV_REF_END holder)
+ : Allocator()
+ , m_size(holder.m_size) //Initialize it to m_size as first_allocation can only succeed or abort
+ {
+ //Different allocator type so we must check we have enough storage
+ const size_type n = holder.m_size;
+ this->priv_first_allocation(n);
+ ::boost::container::uninitialized_move_alloc_n
+ (this->alloc(), boost::movelib::to_raw_pointer(holder.start()), n, boost::movelib::to_raw_pointer(this->start()));
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void priv_first_allocation(size_type cap)
+ {
+ if(cap > Allocator::internal_capacity){
+ throw_bad_alloc();
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void deep_swap(vector_alloc_holder &x)
+ {
+ this->priv_deep_swap(x);
+ }
+
+ template<class OtherAllocator, class OtherStoredSizeType, class OtherAllocatorVersion>
+ void deep_swap(vector_alloc_holder<OtherAllocator, OtherStoredSizeType, OtherAllocatorVersion> &x)
+ {
+ if(this->m_size > OtherAllocator::internal_capacity || x.m_size > Allocator::internal_capacity){
+ throw_bad_alloc();
+ }
+ this->priv_deep_swap(x);
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void swap_resources(vector_alloc_holder &) BOOST_NOEXCEPT_OR_NOTHROW
+ { //Containers with version 0 allocators can't be moved without moving elements one by one
+ throw_bad_alloc();
+ }
+
+
+ BOOST_CONTAINER_FORCEINLINE void steal_resources(vector_alloc_holder &)
+ { //Containers with version 0 allocators can't be moved without moving elements one by one
+ throw_bad_alloc();
+ }
+
+ BOOST_CONTAINER_FORCEINLINE Allocator &alloc() BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE const Allocator &alloc() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return *this; }
+
+ BOOST_CONTAINER_FORCEINLINE bool try_expand_fwd(size_type at_least)
+ { return !at_least; }
+
+ BOOST_CONTAINER_FORCEINLINE pointer start() const BOOST_NOEXCEPT_OR_NOTHROW { return Allocator::internal_storage(); }
+ BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW { return Allocator::internal_capacity; }
+ stored_size_type m_size;
+
+ private:
+
+ template<class OtherAllocator, class OtherStoredSizeType, class OtherAllocatorVersion>
+ void priv_deep_swap(vector_alloc_holder<OtherAllocator, OtherStoredSizeType, OtherAllocatorVersion> &x)
+ {
+ const size_type MaxTmpStorage = sizeof(value_type)*Allocator::internal_capacity;
+ value_type *const first_this = boost::movelib::to_raw_pointer(this->start());
+ value_type *const first_x = boost::movelib::to_raw_pointer(x.start());
+
+ if(this->m_size < x.m_size){
+ boost::container::deep_swap_alloc_n<MaxTmpStorage>(this->alloc(), first_this, this->m_size, first_x, x.m_size);
+ }
+ else{
+ boost::container::deep_swap_alloc_n<MaxTmpStorage>(this->alloc(), first_x, x.m_size, first_this, this->m_size);
+ }
+ boost::adl_move_swap(this->m_size, x.m_size);
+ }
+};
+
+struct growth_factor_60;
+
+template<class T, class Default>
+struct default_if_void
+{
+ typedef T type;
+};
+
+template<class Default>
+struct default_if_void<void, Default>
+{
+ typedef Default type;
+};
+
+template<class Options, class AllocatorSizeType>
+struct get_vector_opt
+{
+ typedef vector_opt< typename default_if_void<typename Options::growth_factor_type, growth_factor_60>::type
+ , typename default_if_void<typename Options::stored_size_type, AllocatorSizeType>::type
+ > type;
+};
+
+template<class AllocatorSizeType>
+struct get_vector_opt<void, AllocatorSizeType>
+{
+ typedef vector_opt<growth_factor_60, AllocatorSizeType> type;
+};
+
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+//! A vector is a sequence that supports random access to elements, constant
+//! time insertion and removal of elements at the end, and linear time insertion
+//! and removal of elements at the beginning or in the middle. The number of
+//! elements in a vector may vary dynamically; memory management is automatic.
+//!
+//! \tparam T The type of object that is stored in the vector
+//! \tparam Allocator The allocator used for all internal memory management
+//! \tparam Options A type produced from \c boost::container::vector_options.
+template <class T, class Allocator BOOST_CONTAINER_DOCONLY(= new_allocator<T>), class Options BOOST_CONTAINER_DOCONLY(= void) >
+class vector
+{
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ typedef typename boost::container::allocator_traits<Allocator>::size_type alloc_size_type;
+ typedef typename get_vector_opt<Options, alloc_size_type>::type options_type;
+ typedef typename options_type::growth_factor_type growth_factor_type;
+ typedef typename options_type::stored_size_type stored_size_type;
+ typedef value_less<T> value_less_t;
+
+ //If provided the stored_size option must specify a type that is equal or a type that is smaller.
+ BOOST_STATIC_ASSERT( (sizeof(stored_size_type) < sizeof(alloc_size_type) ||
+ dtl::is_same<stored_size_type, alloc_size_type>::value) );
+
+ typedef typename dtl::version<Allocator>::type alloc_version;
+ typedef boost::container::vector_alloc_holder<Allocator, stored_size_type> alloc_holder_t;
+ alloc_holder_t m_holder;
+ typedef allocator_traits<Allocator> allocator_traits_type;
+ template <class U, class UAllocator, class UOptions>
+ friend class vector;
+
+ typedef typename allocator_traits_type::pointer pointer_impl;
+ typedef vec_iterator<pointer_impl, false> iterator_impl;
+ typedef vec_iterator<pointer_impl, true > const_iterator_impl;
+
+ protected:
+ static bool is_propagable_from(const Allocator &from_alloc, pointer_impl p, const Allocator &to_alloc, bool const propagate_allocator)
+ { return alloc_holder_t::is_propagable_from(from_alloc, p, to_alloc, propagate_allocator); }
+
+ static bool are_swap_propagable( const Allocator &l_a, pointer_impl l_p
+ , const Allocator &r_a, pointer_impl r_p, bool const propagate_allocator)
+ { return alloc_holder_t::are_swap_propagable(l_a, l_p, r_a, r_p, propagate_allocator); }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ public:
+ //////////////////////////////////////////////
+ //
+ // types
+ //
+ //////////////////////////////////////////////
+
+ typedef T value_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_pointer const_pointer;
+ typedef typename ::boost::container::allocator_traits<Allocator>::reference reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::const_reference const_reference;
+ typedef typename ::boost::container::allocator_traits<Allocator>::size_type size_type;
+ typedef typename ::boost::container::allocator_traits<Allocator>::difference_type difference_type;
+ typedef Allocator allocator_type;
+ typedef Allocator stored_allocator_type;
+ typedef BOOST_CONTAINER_IMPDEF(iterator_impl) iterator;
+ typedef BOOST_CONTAINER_IMPDEF(const_iterator_impl) const_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<iterator>) reverse_iterator;
+ typedef BOOST_CONTAINER_IMPDEF(boost::container::reverse_iterator<const_iterator>) const_reverse_iterator;
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ private:
+ BOOST_COPYABLE_AND_MOVABLE(vector)
+ typedef vector_value_traits<Allocator> value_traits;
+ typedef constant_iterator<T, difference_type> cvalue_iterator;
+
+ protected:
+
+ BOOST_CONTAINER_FORCEINLINE void steal_resources(vector &x)
+ { return this->m_holder.steal_resources(x.m_holder); }
+
+ template<class AllocFwd>
+ BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type capacity, BOOST_FWD_REF(AllocFwd) a)
+ : m_holder(initial_capacity_t(), initial_memory, capacity, ::boost::forward<AllocFwd>(a))
+ {}
+
+ BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type capacity)
+ : m_holder(initial_capacity_t(), initial_memory, capacity)
+ {}
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ public:
+ //////////////////////////////////////////////
+ //
+ // construct/copy/destroy
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Constructs a vector taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ vector() BOOST_NOEXCEPT_IF(dtl::is_nothrow_default_constructible<Allocator>::value)
+ : m_holder()
+ {}
+
+ //! <b>Effects</b>: Constructs a vector taking the allocator as parameter.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ explicit vector(const allocator_type& a) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_holder(a)
+ {}
+
+ //! <b>Effects</b>: Constructs a vector and inserts n value initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's allocation
+ //! throws or T's value initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit vector(size_type n)
+ : m_holder(vector_uninitialized_size, n)
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += n != 0;
+ #endif
+ boost::container::uninitialized_value_init_alloc_n
+ (this->m_holder.alloc(), n, this->priv_raw_begin());
+ }
+
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
+ //! and inserts n value initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's allocation
+ //! throws or T's value initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ explicit vector(size_type n, const allocator_type &a)
+ : m_holder(vector_uninitialized_size, a, n)
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += n != 0;
+ #endif
+ boost::container::uninitialized_value_init_alloc_n
+ (this->m_holder.alloc(), n, this->priv_raw_begin());
+ }
+
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
+ //! and inserts n default initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's allocation
+ //! throws or T's default initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ vector(size_type n, default_init_t)
+ : m_holder(vector_uninitialized_size, n)
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += n != 0;
+ #endif
+ boost::container::uninitialized_default_init_alloc_n
+ (this->m_holder.alloc(), n, this->priv_raw_begin());
+ }
+
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
+ //! and inserts n default initialized values.
+ //!
+ //! <b>Throws</b>: If allocator_type's allocation
+ //! throws or T's default initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ vector(size_type n, default_init_t, const allocator_type &a)
+ : m_holder(vector_uninitialized_size, a, n)
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += n != 0;
+ #endif
+ boost::container::uninitialized_default_init_alloc_n
+ (this->m_holder.alloc(), n, this->priv_raw_begin());
+ }
+
+ //! <b>Effects</b>: Constructs a vector
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocator_type's allocation
+ //! throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ vector(size_type n, const T& value)
+ : m_holder(vector_uninitialized_size, n)
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += n != 0;
+ #endif
+ boost::container::uninitialized_fill_alloc_n
+ (this->m_holder.alloc(), value, n, this->priv_raw_begin());
+ }
+
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
+ //! and inserts n copies of value.
+ //!
+ //! <b>Throws</b>: If allocation
+ //! throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ vector(size_type n, const T& value, const allocator_type& a)
+ : m_holder(vector_uninitialized_size, a, n)
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += n != 0;
+ #endif
+ boost::container::uninitialized_fill_alloc_n
+ (this->m_holder.alloc(), value, n, this->priv_raw_begin());
+ }
+
+ //! <b>Effects</b>: Constructs a vector
+ //! and inserts a copy of the range [first, last) in the vector.
+ //!
+ //! <b>Throws</b>: If allocator_type's allocation
+ //! throws or T's constructor taking a dereferenced InIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [first, last).
+// template <class InIt>
+// vector(InIt first, InIt last
+// BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
+// < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
+// BOOST_MOVE_I dtl::nat >::type * = 0)
+// ) -> vector<typename iterator_traits<InIt>::value_type, new_allocator<typename iterator_traits<InIt>::value_type>>;
+ template <class InIt>
+ vector(InIt first, InIt last
+ BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
+ < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
+ BOOST_MOVE_I dtl::nat >::type * = 0)
+ )
+ : m_holder()
+ { this->assign(first, last); }
+
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
+ //! and inserts a copy of the range [first, last) in the vector.
+ //!
+ //! <b>Throws</b>: If allocator_type's allocation
+ //! throws or T's constructor taking a dereferenced InIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [first, last).
+// template <class InIt>
+// vector(InIt first, InIt last, const allocator_type& a
+// BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
+// < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
+// BOOST_MOVE_I dtl::nat >::type * = 0)
+// ) -> vector<typename iterator_traits<InIt>::value_type, new_allocator<typename iterator_traits<InIt>::value_type>>;
+ template <class InIt>
+ vector(InIt first, InIt last, const allocator_type& a
+ BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_c
+ < dtl::is_convertible<InIt BOOST_MOVE_I size_type>::value
+ BOOST_MOVE_I dtl::nat >::type * = 0)
+ )
+ : m_holder(a)
+ { this->assign(first, last); }
+
+ //! <b>Effects</b>: Copy constructs a vector.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocator_type's allocation
+ //! throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ vector(const vector &x)
+ : m_holder( vector_uninitialized_size
+ , allocator_traits_type::select_on_container_copy_construction(x.m_holder.alloc())
+ , x.size())
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += x.size() != 0;
+ #endif
+ ::boost::container::uninitialized_copy_alloc_n
+ ( this->m_holder.alloc(), x.priv_raw_begin()
+ , x.size(), this->priv_raw_begin());
+ }
+
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ vector(BOOST_RV_REF(vector) x) BOOST_NOEXCEPT_OR_NOTHROW
+ : m_holder(boost::move(x.m_holder))
+ { BOOST_STATIC_ASSERT((!allocator_traits_type::is_partially_propagable::value)); }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Constructs a vector that will use a copy of allocator a
+ //! and inserts a copy of the range [il.begin(), il.last()) in the vector
+ //!
+ //! <b>Throws</b>: If T's constructor taking a dereferenced initializer_list iterator throws.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
+ vector(std::initializer_list<value_type> il, const allocator_type& a = allocator_type())
+ : m_holder(a)
+ {
+ this->assign(il.begin(), il.end());
+ }
+ #endif
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Move constructor. Moves x's resources to *this.
+ //!
+ //! <b>Throws</b>: If T's move constructor or allocation throws
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: Non-standard extension to support static_vector
+ template<class OtherAllocator>
+ vector(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
+ , typename dtl::enable_if_c
+ < dtl::is_version<OtherAllocator, 0>::value>::type * = 0
+ )
+ : m_holder(boost::move(x.m_holder))
+ {}
+
+ #endif //!defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Copy constructs a vector using the specified allocator.
+ //!
+ //! <b>Postcondition</b>: x == *this.
+ //!
+ //! <b>Throws</b>: If allocation
+ //! throws or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the elements x contains.
+ vector(const vector &x, const allocator_type &a)
+ : m_holder(vector_uninitialized_size, a, x.size())
+ {
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += x.size() != 0;
+ #endif
+ ::boost::container::uninitialized_copy_alloc_n_source
+ ( this->m_holder.alloc(), x.priv_raw_begin()
+ , x.size(), this->priv_raw_begin());
+ }
+
+ //! <b>Effects</b>: Move constructor using the specified allocator.
+ //! Moves x's resources to *this if a == allocator_type().
+ //! Otherwise copies values from x to *this.
+ //!
+ //! <b>Throws</b>: If allocation or T's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant if a == x.get_allocator(), linear otherwise.
+ vector(BOOST_RV_REF(vector) x, const allocator_type &a)
+ : m_holder( vector_uninitialized_size, a
+ , is_propagable_from(x.get_stored_allocator(), x.m_holder.start(), a, true) ? 0 : x.size()
+ )
+ {
+ if(is_propagable_from(x.get_stored_allocator(), x.m_holder.start(), a, true)){
+ this->m_holder.steal_resources(x.m_holder);
+ }
+ else{
+ const size_type n = x.size();
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ this->num_alloc += n != 0;
+ #endif
+ ::boost::container::uninitialized_move_alloc_n_source
+ ( this->m_holder.alloc(), x.priv_raw_begin()
+ , n, this->priv_raw_begin());
+ }
+ }
+
+ //! <b>Effects</b>: Destroys the vector. All stored values are destroyed
+ //! and used memory is deallocated.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements.
+ ~vector() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ boost::container::destroy_alloc_n
+ (this->get_stored_allocator(), this->priv_raw_begin(), this->m_holder.m_size);
+ //vector_alloc_holder deallocates the data
+ }
+
+ //! <b>Effects</b>: Makes *this contain the same elements as x.
+ //!
+ //! <b>Postcondition</b>: this->size() == x.size(). *this contains a copy
+ //! of each of x's elements.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment throws.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in x.
+ BOOST_CONTAINER_FORCEINLINE vector& operator=(BOOST_COPY_ASSIGN_REF(vector) x)
+ {
+ if (&x != this){
+ this->priv_copy_assign(x);
+ }
+ return *this;
+ }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Make *this container contains elements from il.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
+ BOOST_CONTAINER_FORCEINLINE vector& operator=(std::initializer_list<value_type> il)
+ {
+ this->assign(il.begin(), il.end());
+ return *this;
+ }
+ #endif
+
+ //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
+ //!
+ //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
+ //! before the function.
+ //!
+ //! <b>Throws</b>: If allocator_traits_type::propagate_on_container_move_assignment
+ //! is false and (allocation throws or value_type's move constructor throws)
+ //!
+ //! <b>Complexity</b>: Constant if allocator_traits_type::
+ //! propagate_on_container_move_assignment is true or
+ //! this->get>allocator() == x.get_allocator(). Linear otherwise.
+ BOOST_CONTAINER_FORCEINLINE vector& operator=(BOOST_RV_REF(vector) x)
+ BOOST_NOEXCEPT_IF(allocator_traits_type::propagate_on_container_move_assignment::value
+ || allocator_traits_type::is_always_equal::value)
+ {
+ this->priv_move_assign(boost::move(x));
+ return *this;
+ }
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Move assignment. All x's values are transferred to *this.
+ //!
+ //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
+ //! before the function.
+ //!
+ //! <b>Throws</b>: If move constructor/assignment of T throws or allocation throws
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: Non-standard extension to support static_vector
+ template<class OtherAllocator>
+ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
+ < vector&
+ , dtl::is_version<OtherAllocator, 0>
+ , dtl::is_different<OtherAllocator, allocator_type>
+ >::type
+ operator=(BOOST_RV_REF_BEG vector<value_type, OtherAllocator> BOOST_RV_REF_END x)
+ {
+ this->priv_move_assign(boost::move(x));
+ return *this;
+ }
+
+ //! <b>Effects</b>: Copy assignment. All x's values are copied to *this.
+ //!
+ //! <b>Postcondition</b>: x.empty(). *this contains a the elements x had
+ //! before the function.
+ //!
+ //! <b>Throws</b>: If move constructor/assignment of T throws or allocation throws
+ //!
+ //! <b>Complexity</b>: Linear.
+ //!
+ //! <b>Note</b>: Non-standard extension to support static_vector
+ template<class OtherAllocator>
+ BOOST_CONTAINER_FORCEINLINE typename dtl::enable_if_and
+ < vector&
+ , dtl::is_version<OtherAllocator, 0>
+ , dtl::is_different<OtherAllocator, allocator_type>
+ >::type
+ operator=(const vector<value_type, OtherAllocator> &x)
+ {
+ this->priv_copy_assign(x);
+ return *this;
+ }
+
+ #endif
+
+ //! <b>Effects</b>: Assigns the the range [first, last) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment or
+ //! T's constructor/assignment from dereferencing InpIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ template <class InIt>
+ void assign(InIt first, InIt last
+ //Input iterators or version 0 allocator
+ BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_or
+ < void
+ BOOST_MOVE_I dtl::is_convertible<InIt BOOST_MOVE_I size_type>
+ BOOST_MOVE_I dtl::and_
+ < dtl::is_different<alloc_version BOOST_MOVE_I version_0>
+ BOOST_MOVE_I dtl::is_not_input_iterator<InIt>
+ >
+ >::type * = 0)
+ )
+ {
+ //Overwrite all elements we can from [first, last)
+ iterator cur = this->begin();
+ const iterator end_it = this->end();
+ for ( ; first != last && cur != end_it; ++cur, ++first){
+ *cur = *first;
+ }
+
+ if (first == last){
+ //There are no more elements in the sequence, erase remaining
+ T* const end_pos = this->priv_raw_end();
+ const size_type n = static_cast<size_type>(end_pos - boost::movelib::iterator_to_raw_pointer(cur));
+ this->priv_destroy_last_n(n);
+ }
+ else{
+ //There are more elements in the range, insert the remaining ones
+ this->insert(this->cend(), first, last);
+ }
+ }
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Effects</b>: Assigns the the range [il.begin(), il.end()) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's constructor from dereferencing iniializer_list iterator throws.
+ //!
+ BOOST_CONTAINER_FORCEINLINE void assign(std::initializer_list<T> il)
+ {
+ this->assign(il.begin(), il.end());
+ }
+ #endif
+
+ //! <b>Effects</b>: Assigns the the range [first, last) to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment or
+ //! T's constructor/assignment from dereferencing InpIt throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ template <class FwdIt>
+ void assign(FwdIt first, FwdIt last
+ //Forward iterators and version > 0 allocator
+ BOOST_CONTAINER_DOCIGN(BOOST_MOVE_I typename dtl::disable_if_or
+ < void
+ BOOST_MOVE_I dtl::is_same<alloc_version BOOST_MOVE_I version_0>
+ BOOST_MOVE_I dtl::is_convertible<FwdIt BOOST_MOVE_I size_type>
+ BOOST_MOVE_I dtl::is_input_iterator<FwdIt>
+ >::type * = 0)
+ )
+ {
+ //For Fwd iterators the standard only requires EmplaceConstructible and assignable from *first
+ //so we can't do any backwards allocation
+ const size_type input_sz = static_cast<size_type>(boost::container::iterator_distance(first, last));
+ const size_type old_capacity = this->capacity();
+ if(input_sz > old_capacity){ //If input range is too big, we need to reallocate
+ size_type real_cap = 0;
+ pointer reuse(this->m_holder.start());
+ pointer const ret(this->m_holder.allocation_command(allocate_new|expand_fwd, input_sz, real_cap = input_sz, reuse));
+ if(!reuse){ //New allocation, just emplace new values
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_alloc;
+ #endif
+ pointer const old_p = this->m_holder.start();
+ if(old_p){
+ this->priv_destroy_all();
+ this->m_holder.deallocate(old_p, old_capacity);
+ }
+ this->m_holder.start(ret);
+ this->m_holder.capacity(real_cap);
+ this->m_holder.m_size = 0;
+ this->priv_uninitialized_construct_at_end(first, last);
+ return;
+ }
+ else{
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_expand_fwd;
+ #endif
+ this->m_holder.capacity(real_cap);
+ //Forward expansion, use assignment + back deletion/construction that comes later
+ }
+ }
+
+ boost::container::copy_assign_range_alloc_n(this->m_holder.alloc(), first, input_sz, this->priv_raw_begin(), this->size());
+ this->m_holder.m_size = input_sz;
+ }
+
+ //! <b>Effects</b>: Assigns the n copies of val to *this.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy/move constructor/assignment throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ BOOST_CONTAINER_FORCEINLINE void assign(size_type n, const value_type& val)
+ { this->assign(cvalue_iterator(val, n), cvalue_iterator()); }
+
+ //! <b>Effects</b>: Returns a copy of the internal allocator.
+ //!
+ //! <b>Throws</b>: If allocator's copy constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant.
+ allocator_type get_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->m_holder.alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE stored_allocator_type &get_stored_allocator() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->m_holder.alloc(); }
+
+ //! <b>Effects</b>: Returns a reference to the internal allocator.
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ BOOST_CONTAINER_FORCEINLINE const stored_allocator_type &get_stored_allocator() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->m_holder.alloc(); }
+
+ //////////////////////////////////////////////
+ //
+ // iterators
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE iterator begin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return iterator(this->m_holder.start()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator begin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_iterator(this->m_holder.start()); }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE iterator end() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ pointer const bg = this->m_holder.start();
+ size_type const sz = this->m_holder.m_size;
+ return iterator(BOOST_LIKELY(sz) ? bg + sz : bg); //Avoid UB on null-pointer arithmetic
+ }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator end() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->cend(); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the beginning
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rbegin() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(this->end()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->crbegin(); }
+
+ //! <b>Effects</b>: Returns a reverse_iterator pointing to the end
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE reverse_iterator rend() BOOST_NOEXCEPT_OR_NOTHROW
+ { return reverse_iterator(this->begin()); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator rend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->crend(); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator cbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_iterator(this->m_holder.start()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_iterator cend() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ pointer const bg = this->m_holder.start();
+ size_type const sz = this->m_holder.m_size;
+ return const_iterator(BOOST_LIKELY(sz) ? bg + sz : bg); //Avoid UB on null-pointer arithmetic
+ }
+ //{ return const_iterator(this->m_holder.start() + this->m_holder.m_size); }
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the beginning
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crbegin() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->end());}
+
+ //! <b>Effects</b>: Returns a const_reverse_iterator pointing to the end
+ //! of the reversed vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE const_reverse_iterator crend() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return const_reverse_iterator(this->begin()); }
+
+ //////////////////////////////////////////////
+ //
+ // capacity
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Effects</b>: Returns true if the vector contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE bool empty() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return !this->m_holder.m_size; }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE size_type size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->m_holder.m_size; }
+
+ //! <b>Effects</b>: Returns the largest possible size of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return allocator_traits_type::max_size(this->m_holder.alloc()); }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are value initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy/move or value initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type new_size)
+ { this->priv_resize(new_size, value_init); }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are default initialized.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy/move or default initialization throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ void resize(size_type new_size, default_init_t)
+ { this->priv_resize(new_size, default_init); }
+
+ //! <b>Effects</b>: Inserts or erases elements at the end such that
+ //! the size becomes n. New elements are copy constructed from x.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy/move constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to the difference between size() and new_size.
+ void resize(size_type new_size, const T& x)
+ { this->priv_resize(new_size, x); }
+
+ //! <b>Effects</b>: Number of elements for which memory has been allocated.
+ //! capacity() is always greater than or equal to size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE size_type capacity() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->m_holder.capacity(); }
+
+ //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
+ //! effect. Otherwise, it is a request for allocation of additional memory.
+ //! If the request is successful, then capacity() is greater than or equal to
+ //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
+ //!
+ //! <b>Throws</b>: If memory allocation allocation throws or T's copy/move constructor throws.
+ BOOST_CONTAINER_FORCEINLINE void reserve(size_type new_cap)
+ {
+ if (this->capacity() < new_cap){
+ this->priv_reserve_no_capacity(new_cap, alloc_version());
+ }
+ }
+
+ //! <b>Effects</b>: Tries to deallocate the excess of memory created
+ //! with previous allocations. The size of the vector is unchanged
+ //!
+ //! <b>Throws</b>: If memory allocation throws, or T's copy/move constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ BOOST_CONTAINER_FORCEINLINE void shrink_to_fit()
+ { this->priv_shrink_to_fit(alloc_version()); }
+
+ //////////////////////////////////////////////
+ //
+ // element access
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the first
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference front() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->m_holder.start();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the first
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference front() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return *this->m_holder.start();
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a reference to the last
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return this->m_holder.start()[this->m_holder.m_size - 1];
+ }
+
+ //! <b>Requires</b>: !empty()
+ //!
+ //! <b>Effects</b>: Returns a const reference to the last
+ //! element of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference back() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ return this->m_holder.start()[this->m_holder.m_size - 1];
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference operator[](size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->m_holder.m_size > n);
+ return this->m_holder.start()[n];
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference operator[](size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->m_holder.m_size > n);
+ return this->m_holder.start()[n];
+ }
+
+ //! <b>Requires</b>: size() >= n.
+ //!
+ //! <b>Effects</b>: Returns an iterator to the nth element
+ //! from the beginning of the container. Returns end()
+ //! if n == size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ iterator nth(size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->m_holder.m_size >= n);
+ return iterator(this->m_holder.start()+n);
+ }
+
+ //! <b>Requires</b>: size() >= n.
+ //!
+ //! <b>Effects</b>: Returns a const_iterator to the nth element
+ //! from the beginning of the container. Returns end()
+ //! if n == size().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ const_iterator nth(size_type n) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(this->m_holder.m_size >= n);
+ return const_iterator(this->m_holder.start()+n);
+ }
+
+ //! <b>Requires</b>: begin() <= p <= end().
+ //!
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ size_type index_of(iterator p) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ //Range check assert done in priv_index_of
+ return this->priv_index_of(vector_iterator_get_ptr(p));
+ }
+
+ //! <b>Requires</b>: begin() <= p <= end().
+ //!
+ //! <b>Effects</b>: Returns the index of the element pointed by p
+ //! and size() if p == end().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Non-standard extension
+ size_type index_of(const_iterator p) const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ //Range check assert done in priv_index_of
+ return this->priv_index_of(vector_iterator_get_ptr(p));
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: std::range_error if n >= size()
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference at(size_type n)
+ {
+ this->priv_throw_if_out_of_range(n);
+ return this->m_holder.start()[n];
+ }
+
+ //! <b>Requires</b>: size() > n.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the nth element
+ //! from the beginning of the container.
+ //!
+ //! <b>Throws</b>: std::range_error if n >= size()
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference at(size_type n) const
+ {
+ this->priv_throw_if_out_of_range(n);
+ return this->m_holder.start()[n];
+ }
+
+ //////////////////////////////////////////////
+ //
+ // data access
+ //
+ //////////////////////////////////////////////
+
+ //! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
+ //! For a non-empty vector, data() == &front().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ T* data() BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_raw_begin(); }
+
+ //! <b>Returns</b>: A pointer such that [data(),data() + size()) is a valid range.
+ //! For a non-empty vector, data() == &front().
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const T * data() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return this->priv_raw_begin(); }
+
+ //////////////////////////////////////////////
+ //
+ // modifiers
+ //
+ //////////////////////////////////////////////
+
+ #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the end of the vector.
+ //!
+ //! <b>Returns</b>: A reference to the created object.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
+ //! T's copy/move constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ template<class ...Args>
+ BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_FWD_REF(Args)...args)
+ {
+ if (BOOST_LIKELY(this->room_enough())){
+ //There is more memory, just construct a new object at the end
+ T* const p = this->priv_raw_end();
+ allocator_traits_type::construct(this->m_holder.alloc(), p, ::boost::forward<Args>(args)...);
+ ++this->m_holder.m_size;
+ return *p;
+ }
+ else{
+ typedef dtl::insert_emplace_proxy<Allocator, T*, Args...> type;
+ return *this->priv_forward_range_insert_no_capacity
+ (this->back_ptr(), 1, type(::boost::forward<Args>(args)...), alloc_version());
+ }
+ }
+
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... in the end of the vector.
+ //!
+ //! <b>Throws</b>: If the in-place constructor throws.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ template<class ...Args>
+ BOOST_CONTAINER_FORCEINLINE bool stable_emplace_back(BOOST_FWD_REF(Args)...args)
+ {
+ const bool is_room_enough = this->room_enough() || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(1u));
+ if (BOOST_LIKELY(is_room_enough)){
+ //There is more memory, just construct a new object at the end
+ allocator_traits_type::construct(this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<Args>(args)...);
+ ++this->m_holder.m_size;
+ }
+ return is_room_enough;
+ }
+
+ //! <b>Requires</b>: position must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Inserts an object of type T constructed with
+ //! std::forward<Args>(args)... before position
+ //!
+ //! <b>Throws</b>: If memory allocation throws or the in-place constructor throws or
+ //! T's copy/move constructor/assignment throws.
+ //!
+ //! <b>Complexity</b>: If position is end(), amortized constant time
+ //! Linear time otherwise.
+ template<class ...Args>
+ iterator emplace(const_iterator position, BOOST_FWD_REF(Args) ...args)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(position));
+ //Just call more general insert(pos, size, value) and return iterator
+ typedef dtl::insert_emplace_proxy<Allocator, T*, Args...> type;
+ return this->priv_forward_range_insert( vector_iterator_get_ptr(position), 1
+ , type(::boost::forward<Args>(args)...));
+ }
+
+ #else // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ #define BOOST_CONTAINER_VECTOR_EMPLACE_CODE(N) \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE reference emplace_back(BOOST_MOVE_UREF##N)\
+ {\
+ if (BOOST_LIKELY(this->room_enough())){\
+ T* const p = this->priv_raw_end();\
+ allocator_traits_type::construct (this->m_holder.alloc()\
+ , this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ ++this->m_holder.m_size;\
+ return *p;\
+ }\
+ else{\
+ typedef dtl::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
+ return *this->priv_forward_range_insert_no_capacity\
+ ( this->back_ptr(), 1, type(BOOST_MOVE_FWD##N), alloc_version());\
+ }\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ BOOST_CONTAINER_FORCEINLINE bool stable_emplace_back(BOOST_MOVE_UREF##N)\
+ {\
+ const bool is_room_enough = this->room_enough() || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(1u));\
+ if (BOOST_LIKELY(is_room_enough)){\
+ allocator_traits_type::construct (this->m_holder.alloc()\
+ , this->priv_raw_end() BOOST_MOVE_I##N BOOST_MOVE_FWD##N);\
+ ++this->m_holder.m_size;\
+ }\
+ return is_room_enough;\
+ }\
+ \
+ BOOST_MOVE_TMPL_LT##N BOOST_MOVE_CLASS##N BOOST_MOVE_GT##N \
+ iterator emplace(const_iterator pos BOOST_MOVE_I##N BOOST_MOVE_UREF##N)\
+ {\
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));\
+ typedef dtl::insert_emplace_proxy_arg##N<Allocator, T* BOOST_MOVE_I##N BOOST_MOVE_TARG##N> type;\
+ return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), 1, type(BOOST_MOVE_FWD##N));\
+ }\
+ //
+ BOOST_MOVE_ITERATE_0TO9(BOOST_CONTAINER_VECTOR_EMPLACE_CODE)
+ #undef BOOST_CONTAINER_VECTOR_EMPLACE_CODE
+
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Inserts a copy of x at the end of the vector.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy/move constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_back(const T &x);
+
+ //! <b>Effects</b>: Constructs a new element in the end of the vector
+ //! and moves the resources of x to this new element.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or
+ //! T's copy/move constructor throws.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ void push_back(T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH(push_back, T, void, priv_push_back)
+ #endif
+
+ #if defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ //! <b>Requires</b>: position must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of x before position.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor/assignment throws.
+ //!
+ //! <b>Complexity</b>: If position is end(), amortized constant time
+ //! Linear time otherwise.
+ iterator insert(const_iterator position, const T &x);
+
+ //! <b>Requires</b>: position must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a new element before position with x's resources.
+ //!
+ //! <b>Throws</b>: If memory allocation throws.
+ //!
+ //! <b>Complexity</b>: If position is end(), amortized constant time
+ //! Linear time otherwise.
+ iterator insert(const_iterator position, T &&x);
+ #else
+ BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(insert, T, iterator, priv_insert, const_iterator, const_iterator)
+ #endif
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert n copies of x before pos.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or p if n is 0.
+ //!
+ //! <b>Throws</b>: If memory allocation throws or T's copy/move constructor throws.
+ //!
+ //! <b>Complexity</b>: Linear to n.
+ iterator insert(const_iterator p, size_type n, const T& x)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ dtl::insert_n_copies_proxy<Allocator, T*> proxy(x);
+ return this->priv_forward_range_insert(vector_iterator_get_ptr(p), n, proxy);
+ }
+
+ //! <b>Requires</b>: p must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or pos if first == last.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced InpIt throws or T's copy/move constructor/assignment throws.
+ //!
+ //! <b>Complexity</b>: Linear to boost::container::iterator_distance [first, last).
+ template <class InIt>
+ iterator insert(const_iterator pos, InIt first, InIt last
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<InIt, size_type>
+ , dtl::is_not_input_iterator<InIt>
+ >::type * = 0
+ #endif
+ )
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));
+ const size_type n_pos = pos - this->cbegin();
+ iterator it(vector_iterator_get_ptr(pos));
+ for(;first != last; ++first){
+ it = this->emplace(it, *first);
+ ++it;
+ }
+ return iterator(this->m_holder.start() + n_pos);
+ }
+
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class FwdIt>
+ iterator insert(const_iterator pos, FwdIt first, FwdIt last
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_convertible<FwdIt, size_type>
+ , dtl::is_input_iterator<FwdIt>
+ >::type * = 0
+ )
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));
+ dtl::insert_range_proxy<Allocator, FwdIt, T*> proxy(first);
+ return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), boost::container::iterator_distance(first, last), proxy);
+ }
+ #endif
+
+ //! <b>Requires</b>: p must be a valid iterator of *this. num, must
+ //! be equal to boost::container::iterator_distance(first, last)
+ //!
+ //! <b>Effects</b>: Insert a copy of the [first, last) range before pos.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or pos if first == last.
+ //!
+ //! <b>Throws</b>: If memory allocation throws, T's constructor from a
+ //! dereferenced InpIt throws or T's copy/move constructor/assignment throws.
+ //!
+ //! <b>Complexity</b>: Linear to boost::container::iterator_distance [first, last).
+ //!
+ //! <b>Note</b>: This function avoids a linear operation to calculate boost::container::iterator_distance[first, last)
+ //! for forward and bidirectional iterators, and a one by one insertion for input iterators. This is a
+ //! a non-standard extension.
+ #if !defined(BOOST_CONTAINER_DOXYGEN_INVOKED)
+ template <class InIt>
+ iterator insert(const_iterator pos, size_type num, InIt first, InIt last)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(pos));
+ BOOST_ASSERT(dtl::is_input_iterator<InIt>::value ||
+ num == static_cast<size_type>(boost::container::iterator_distance(first, last)));
+ (void)last;
+ dtl::insert_range_proxy<Allocator, InIt, T*> proxy(first);
+ return this->priv_forward_range_insert(vector_iterator_get_ptr(pos), num, proxy);
+ }
+ #endif
+
+ #if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
+ //! <b>Requires</b>: position must be a valid iterator of *this.
+ //!
+ //! <b>Effects</b>: Insert a copy of the [il.begin(), il.end()) range before position.
+ //!
+ //! <b>Returns</b>: an iterator to the first inserted element or position if first == last.
+ //!
+ //! <b>Complexity</b>: Linear to the range [il.begin(), il.end()).
+ iterator insert(const_iterator position, std::initializer_list<value_type> il)
+ {
+ //Assertion done in insert()
+ return this->insert(position, il.begin(), il.end());
+ }
+ #endif
+
+ //! <b>Effects</b>: Removes the last element from the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ void pop_back() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(!this->empty());
+ //Destroy last element
+ this->priv_destroy_last();
+ }
+
+ //! <b>Effects</b>: Erases the element at position pos.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements between pos and the
+ //! last element. Constant if pos is the last element.
+ iterator erase(const_iterator position)
+ {
+ BOOST_ASSERT(this->priv_in_range(position));
+ const pointer p = vector_iterator_get_ptr(position);
+ T *const pos_ptr = boost::movelib::to_raw_pointer(p);
+ T *const beg_ptr = this->priv_raw_begin();
+ T *const new_end_ptr = ::boost::container::move(pos_ptr + 1, beg_ptr + this->m_holder.m_size, pos_ptr);
+ //Move elements forward and destroy last
+ this->priv_destroy_last(pos_ptr != new_end_ptr);
+ return iterator(p);
+ }
+
+ //! <b>Effects</b>: Erases the elements pointed by [first, last).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the distance between first and last
+ //! plus linear to the elements between pos and the last element.
+ iterator erase(const_iterator first, const_iterator last)
+ {
+ if (first != last){
+ BOOST_ASSERT(this->priv_in_range(first));
+ BOOST_ASSERT(this->priv_in_range_or_end(last));
+ BOOST_ASSERT(first < last);
+ T* const old_end_ptr = this->priv_raw_end();
+ T* const first_ptr = boost::movelib::to_raw_pointer(vector_iterator_get_ptr(first));
+ T* const last_ptr = boost::movelib::to_raw_pointer(vector_iterator_get_ptr(last));
+ T* const ptr = boost::movelib::to_raw_pointer(boost::container::move(last_ptr, old_end_ptr, first_ptr));
+ this->priv_destroy_last_n(old_end_ptr - ptr);
+ }
+ return iterator(vector_iterator_get_ptr(first));
+ }
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE void swap(vector& x)
+ BOOST_NOEXCEPT_IF( ((allocator_traits_type::propagate_on_container_swap::value
+ || allocator_traits_type::is_always_equal::value) &&
+ !dtl::is_version<Allocator, 0>::value))
+ {
+ this->priv_swap(x, dtl::bool_<dtl::is_version<Allocator, 0>::value>());
+ }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Swaps the contents of *this and x.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear
+ //!
+ //! <b>Note</b>: Non-standard extension to support static_vector
+ template<class OtherAllocator>
+ BOOST_CONTAINER_FORCEINLINE void swap(vector<T, OtherAllocator> & x
+ , typename dtl::enable_if_and
+ < void
+ , dtl::is_version<OtherAllocator, 0>
+ , dtl::is_different<OtherAllocator, allocator_type>
+ >::type * = 0
+ )
+ { this->m_holder.deep_swap(x.m_holder); }
+
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+ //! <b>Effects</b>: Erases all the elements of the vector.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE void clear() BOOST_NOEXCEPT_OR_NOTHROW
+ { this->priv_destroy_all(); }
+
+ //! <b>Effects</b>: Returns true if x and y are equal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator==(const vector& x, const vector& y)
+ { return x.size() == y.size() && ::boost::container::algo_equal(x.begin(), x.end(), y.begin()); }
+
+ //! <b>Effects</b>: Returns true if x and y are unequal
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator!=(const vector& x, const vector& y)
+ { return !(x == y); }
+
+ //! <b>Effects</b>: Returns true if x is less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ friend bool operator<(const vector& x, const vector& y)
+ {
+ const_iterator first1(x.cbegin()), first2(y.cbegin());
+ const const_iterator last1(x.cend()), last2(y.cend());
+ for ( ; (first1 != last1) && (first2 != last2); ++first1, ++first2 ) {
+ if (*first1 < *first2) return true;
+ if (*first2 < *first1) return false;
+ }
+ return (first1 == last1) && (first2 != last2);
+ }
+
+ //! <b>Effects</b>: Returns true if x is greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>(const vector& x, const vector& y)
+ { return y < x; }
+
+ //! <b>Effects</b>: Returns true if x is equal or less than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator<=(const vector& x, const vector& y)
+ { return !(y < x); }
+
+ //! <b>Effects</b>: Returns true if x is equal or greater than y
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the container.
+ BOOST_CONTAINER_FORCEINLINE friend bool operator>=(const vector& x, const vector& y)
+ { return !(x < y); }
+
+ //! <b>Effects</b>: x.swap(y)
+ //!
+ //! <b>Complexity</b>: Constant.
+ BOOST_CONTAINER_FORCEINLINE friend void swap(vector& x, vector& y)
+ { x.swap(y); }
+
+ #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+ //! <b>Effects</b>: If n is less than or equal to capacity(), this call has no
+ //! effect. Otherwise, it is a request for allocation of additional memory
+ //! (memory expansion) that will not invalidate iterators.
+ //! If the request is successful, then capacity() is greater than or equal to
+ //! n; otherwise, capacity() is unchanged. In either case, size() is unchanged.
+ //!
+ //! <b>Throws</b>: If memory allocation allocation throws or T's copy/move constructor throws.
+ //!
+ //! <b>Note</b>: Non-standard extension.
+ bool stable_reserve(size_type new_cap)
+ {
+ const size_type cp = this->capacity();
+ return cp >= new_cap || (alloc_version::value == 2 && this->m_holder.try_expand_fwd(new_cap - cp));
+ }
+
+ //Absolutely experimental. This function might change, disappear or simply crash!
+ template<class BiDirPosConstIt, class BiDirValueIt>
+ BOOST_CONTAINER_FORCEINLINE void insert_ordered_at(const size_type element_count, BiDirPosConstIt last_position_it, BiDirValueIt last_value_it)
+ {
+ typedef vector_insert_ordered_cursor<BiDirPosConstIt, BiDirValueIt> inserter_t;
+ return this->priv_insert_ordered_at(element_count, inserter_t(last_position_it, last_value_it));
+ }
+
+ template<class InputIt>
+ BOOST_CONTAINER_FORCEINLINE void merge(InputIt first, InputIt last)
+ { this->merge(first, last, value_less_t()); }
+
+ template<class InputIt, class Compare>
+ BOOST_CONTAINER_FORCEINLINE void merge(InputIt first, InputIt last, Compare comp)
+ {
+ size_type const s = this->size();
+ size_type const c = this->capacity();
+ size_type n = 0;
+ size_type const free_cap = c - s;
+ //If not input iterator and new elements don't fit in the remaining capacity, merge in new buffer
+ if(!dtl::is_input_iterator<InputIt>::value &&
+ free_cap < (n = static_cast<size_type>(boost::container::iterator_distance(first, last)))){
+ this->priv_merge_in_new_buffer(first, n, comp, alloc_version());
+ }
+ else{
+ this->insert(this->cend(), first, last);
+ T *const raw_beg = this->priv_raw_begin();
+ T *const raw_end = this->priv_raw_end();
+ T *const raw_pos = raw_beg + s;
+ boost::movelib::adaptive_merge(raw_beg, raw_pos, raw_end, comp, raw_end, free_cap - n);
+ }
+ }
+
+ template<class InputIt>
+ BOOST_CONTAINER_FORCEINLINE void merge_unique(InputIt first, InputIt last)
+ { this->merge_unique(first, last, value_less_t()); }
+
+ template<class InputIt, class Compare>
+ BOOST_CONTAINER_FORCEINLINE void merge_unique(InputIt first, InputIt last, Compare comp)
+ {
+ size_type const old_size = this->size();
+ this->priv_set_difference_back(first, last, comp);
+ T *const raw_beg = this->priv_raw_begin();
+ T *const raw_end = this->priv_raw_end();
+ T *raw_pos = raw_beg + old_size;
+ boost::movelib::adaptive_merge(raw_beg, raw_pos, raw_end, comp, raw_end, this->capacity() - this->size());
+ }
+
+ private:
+ template<class PositionValue>
+ void priv_insert_ordered_at(const size_type element_count, PositionValue position_value)
+ {
+ const size_type old_size_pos = this->size();
+ this->reserve(old_size_pos + element_count);
+ T* const begin_ptr = this->priv_raw_begin();
+ size_type insertions_left = element_count;
+ size_type prev_pos = old_size_pos;
+ size_type old_hole_size = element_count;
+
+ //Exception rollback. If any copy throws before the hole is filled, values
+ //already inserted/copied at the end of the buffer will be destroyed.
+ typename value_traits::ArrayDestructor past_hole_values_destroyer
+ (begin_ptr + old_size_pos + element_count, this->m_holder.alloc(), size_type(0u));
+ //Loop for each insertion backwards, first moving the elements after the insertion point,
+ //then inserting the element.
+ while(insertions_left){
+ --position_value;
+ size_type const pos = position_value.get_pos();
+ BOOST_ASSERT(pos != size_type(-1) && pos <= old_size_pos && pos <= prev_pos);
+ //If needed shift the range after the insertion point and the previous insertion point.
+ //Function will take care if the shift crosses the size() boundary, using copy/move
+ //or uninitialized copy/move if necessary.
+ size_type new_hole_size = (pos != prev_pos)
+ ? priv_insert_ordered_at_shift_range(pos, prev_pos, this->size(), insertions_left)
+ : old_hole_size
+ ;
+ if(new_hole_size){
+ //The hole was reduced by priv_insert_ordered_at_shift_range so expand exception rollback range backwards
+ past_hole_values_destroyer.increment_size_backwards(prev_pos - pos);
+ //Insert the new value in the hole
+ allocator_traits_type::construct(this->m_holder.alloc(), begin_ptr + pos + insertions_left - 1, position_value.get_val());
+ if(--new_hole_size){
+ //The hole was reduced by the new insertion by one
+ past_hole_values_destroyer.increment_size_backwards(size_type(1u));
+ }
+ else{
+ //Hole was just filled, disable exception rollback and change vector size
+ past_hole_values_destroyer.release();
+ this->m_holder.m_size += element_count;
+ }
+ }
+ else{
+ if(old_hole_size){
+ //Hole was just filled by priv_insert_ordered_at_shift_range, disable exception rollback and change vector size
+ past_hole_values_destroyer.release();
+ this->m_holder.m_size += element_count;
+ }
+ //Insert the new value in the already constructed range
+ begin_ptr[pos + insertions_left - 1] = position_value.get_val();
+ }
+ --insertions_left;
+ old_hole_size = new_hole_size;
+ prev_pos = pos;
+ }
+ }
+
+ template<class InputIt, class Compare>
+ void priv_set_difference_back(InputIt first1, InputIt last1, Compare comp)
+ {
+ T * old_first2 = this->priv_raw_begin();
+ T * first2 = old_first2;
+ T * last2 = this->priv_raw_end();
+
+ while (first1 != last1) {
+ if (first2 == last2){
+ this->insert(this->cend(), first1, last1);
+ return;
+ }
+
+ if (comp(*first1, *first2)) {
+ this->emplace_back(*first1);
+ T * const raw_begin = this->priv_raw_begin();
+ if(old_first2 != raw_begin)
+ {
+ //Reallocation happened, update range
+ first2 = raw_begin + (first2 - old_first2);
+ last2 = raw_begin + (last2 - old_first2);
+ old_first2 = raw_begin;
+ }
+ ++first1;
+ }
+ else {
+ if (!comp(*first2, *first1)) {
+ ++first1;
+ }
+ ++first2;
+ }
+ }
+ }
+
+ template<class FwdIt, class Compare>
+ BOOST_CONTAINER_FORCEINLINE void priv_merge_in_new_buffer(FwdIt, size_type, Compare, version_0)
+ {
+ throw_bad_alloc();
+ }
+
+ template<class FwdIt, class Compare, class Version>
+ void priv_merge_in_new_buffer(FwdIt first, size_type n, Compare comp, Version)
+ {
+ size_type const new_size = this->size() + n;
+ size_type new_cap = new_size;
+ pointer p = pointer();
+ pointer const new_storage = this->m_holder.allocation_command(allocate_new, new_size, new_cap, p);
+
+ BOOST_ASSERT((new_cap >= this->size() ) && (new_cap - this->size()) >= n);
+ allocator_type &a = this->m_holder.alloc();
+ typename value_traits::ArrayDeallocator new_buffer_deallocator(new_storage, a, new_cap);
+ typename value_traits::ArrayDestructor new_values_destroyer(new_storage, a, 0u);
+ T* pbeg = this->priv_raw_begin();
+ size_type const old_size = this->size();
+ T* const pend = pbeg + old_size;
+ T* d_first = boost::movelib::to_raw_pointer(new_storage);
+ size_type added = n;
+ //Merge in new buffer loop
+ while(1){
+ if(!n) {
+ ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), pbeg, pend, d_first);
+ break;
+ }
+ else if(pbeg == pend) {
+ ::boost::container::uninitialized_move_alloc_n(this->m_holder.alloc(), first, n, d_first);
+ break;
+ }
+ //maintain stability moving external values only if they are strictly less
+ else if(comp(*first, *pbeg)) {
+ allocator_traits_type::construct( this->m_holder.alloc(), d_first, *first );
+ new_values_destroyer.increment_size(1u);
+ ++first;
+ --n;
+ ++d_first;
+ }
+ else{
+ allocator_traits_type::construct( this->m_holder.alloc(), d_first, boost::move(*pbeg) );
+ new_values_destroyer.increment_size(1u);
+ ++pbeg;
+ ++d_first;
+ }
+ }
+
+ //Nothrow operations
+ pointer const old_p = this->m_holder.start();
+ size_type const old_cap = this->m_holder.capacity();
+ boost::container::destroy_alloc_n(a, boost::movelib::to_raw_pointer(old_p), old_size);
+ this->m_holder.deallocate(old_p, old_cap);
+ this->m_holder.m_size = old_size + added;
+ this->m_holder.start(new_storage);
+ this->m_holder.capacity(new_cap);
+ new_buffer_deallocator.release();
+ new_values_destroyer.release();
+ }
+
+ BOOST_CONTAINER_FORCEINLINE bool room_enough() const
+ { return this->m_holder.m_size < this->m_holder.capacity(); }
+
+ BOOST_CONTAINER_FORCEINLINE pointer back_ptr() const
+ { return this->m_holder.start() + this->m_holder.m_size; }
+
+ size_type priv_index_of(pointer p) const
+ {
+ BOOST_ASSERT(this->m_holder.start() <= p);
+ BOOST_ASSERT(p <= (this->m_holder.start()+this->size()));
+ return static_cast<size_type>(p - this->m_holder.start());
+ }
+
+ template<class OtherAllocator>
+ void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
+ , typename dtl::enable_if_c
+ < dtl::is_version<OtherAllocator, 0>::value >::type * = 0)
+ {
+ if(!dtl::is_same<OtherAllocator, allocator_type>::value &&
+ this->capacity() < x.size()){
+ throw_bad_alloc();
+ }
+ T* const this_start = this->priv_raw_begin();
+ T* const other_start = x.priv_raw_begin();
+ const size_type this_sz = m_holder.m_size;
+ const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
+ boost::container::move_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
+ this->m_holder.m_size = other_sz;
+ }
+
+ template<class OtherAllocator>
+ void priv_move_assign(BOOST_RV_REF_BEG vector<T, OtherAllocator> BOOST_RV_REF_END x
+ , typename dtl::disable_if_or
+ < void
+ , dtl::is_version<OtherAllocator, 0>
+ , dtl::is_different<OtherAllocator, allocator_type>
+ >::type * = 0)
+ {
+ //for move assignment, no aliasing (&x != this) is assumed.
+ //x.size() == 0 is allowed for buggy std libraries.
+ BOOST_ASSERT(this != &x || x.size() == 0);
+ allocator_type &this_alloc = this->m_holder.alloc();
+ allocator_type &x_alloc = x.m_holder.alloc();
+ const bool propagate_alloc = allocator_traits_type::propagate_on_container_move_assignment::value;
+
+ const bool is_propagable_from_x = is_propagable_from(x_alloc, x.m_holder.start(), this_alloc, propagate_alloc);
+
+ //Resources can be transferred if both allocators are
+ //going to be equal after this function (either propagated or already equal)
+ if(is_propagable_from_x){
+ this->clear();
+ if(BOOST_LIKELY(!!this->m_holder.m_start))
+ this->m_holder.deallocate(this->m_holder.m_start, this->m_holder.m_capacity);
+ this->m_holder.steal_resources(x.m_holder);
+ }
+ //Else do a one by one move
+ else{
+ this->assign( boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.begin()))
+ , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(x.end() ))
+ );
+ }
+ //Move allocator if needed
+ dtl::move_alloc(this_alloc, x_alloc, dtl::bool_<propagate_alloc>());
+ }
+
+ template<class OtherAllocator>
+ void priv_copy_assign(const vector<T, OtherAllocator> &x
+ , typename dtl::enable_if_c
+ < dtl::is_version<OtherAllocator, 0>::value >::type * = 0)
+ {
+ if(!dtl::is_same<OtherAllocator, allocator_type>::value &&
+ this->capacity() < x.size()){
+ throw_bad_alloc();
+ }
+ T* const this_start = this->priv_raw_begin();
+ T* const other_start = x.priv_raw_begin();
+ const size_type this_sz = m_holder.m_size;
+ const size_type other_sz = static_cast<size_type>(x.m_holder.m_size);
+ boost::container::copy_assign_range_alloc_n(this->m_holder.alloc(), other_start, other_sz, this_start, this_sz);
+ this->m_holder.m_size = other_sz;
+ }
+
+ template<class OtherAllocator>
+ typename dtl::disable_if_or
+ < void
+ , dtl::is_version<OtherAllocator, 0>
+ , dtl::is_different<OtherAllocator, allocator_type>
+ >::type
+ priv_copy_assign(const vector<T, OtherAllocator> &x)
+ {
+ allocator_type &this_alloc = this->m_holder.alloc();
+ const allocator_type &x_alloc = x.m_holder.alloc();
+ dtl::bool_<allocator_traits_type::
+ propagate_on_container_copy_assignment::value> flag;
+ if(flag && this_alloc != x_alloc){
+ this->clear();
+ this->shrink_to_fit();
+ }
+ dtl::assign_alloc(this_alloc, x_alloc, flag);
+ this->assign( x.priv_raw_begin(), x.priv_raw_end() );
+ }
+
+ template<class Vector> //Template it to avoid it in explicit instantiations
+ void priv_swap(Vector &x, dtl::true_type) //version_0
+ { this->m_holder.deep_swap(x.m_holder); }
+
+ template<class Vector> //Template it to avoid it in explicit instantiations
+ void priv_swap(Vector &x, dtl::false_type) //version_N
+ {
+ const bool propagate_alloc = allocator_traits_type::propagate_on_container_swap::value;
+ if(are_swap_propagable( this->get_stored_allocator(), this->m_holder.start()
+ , x.get_stored_allocator(), x.m_holder.start(), propagate_alloc)){
+ //Just swap internals
+ this->m_holder.swap_resources(x.m_holder);
+ }
+ else{
+ if (BOOST_UNLIKELY(&x == this))
+ return;
+
+ //Else swap element by element...
+ bool const t_smaller = this->size() < x.size();
+ vector &sml = t_smaller ? *this : x;
+ vector &big = t_smaller ? x : *this;
+
+ size_type const common_elements = sml.size();
+ for(size_type i = 0; i != common_elements; ++i){
+ boost::adl_move_swap(sml[i], big[i]);
+ }
+ //... and move-insert the remaining range
+ sml.insert( sml.cend()
+ , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(big.nth(common_elements)))
+ , boost::make_move_iterator(boost::movelib::iterator_to_raw_pointer(big.end()))
+ );
+ //Destroy remaining elements
+ big.erase(big.nth(common_elements), big.cend());
+ }
+ //And now swap the allocator
+ dtl::swap_alloc(this->m_holder.alloc(), x.m_holder.alloc(), dtl::bool_<propagate_alloc>());
+ }
+
+ void priv_reserve_no_capacity(size_type, version_0)
+ { throw_bad_alloc(); }
+
+ dtl::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*> priv_dummy_empty_proxy()
+ {
+ return dtl::insert_range_proxy<Allocator, boost::move_iterator<T*>, T*>
+ (::boost::make_move_iterator((T *)0));
+ }
+
+ void priv_reserve_no_capacity(size_type new_cap, version_1)
+ {
+ //There is not enough memory, allocate a new buffer
+ //Pass the hint so that allocators can take advantage of this.
+ pointer const p = this->m_holder.allocate(new_cap);
+ //We will reuse insert code, so create a dummy input iterator
+ this->priv_forward_range_insert_new_allocation
+ ( boost::movelib::to_raw_pointer(p), new_cap, this->priv_raw_end(), 0, this->priv_dummy_empty_proxy());
+ }
+
+ void priv_reserve_no_capacity(size_type new_cap, version_2)
+ {
+ //There is not enough memory, allocate a new
+ //buffer or expand the old one.
+ bool same_buffer_start;
+ size_type real_cap = 0;
+ pointer reuse(this->m_holder.start());
+ pointer const ret(this->m_holder.allocation_command(allocate_new | expand_fwd | expand_bwd, new_cap, real_cap = new_cap, reuse));
+
+ //Check for forward expansion
+ same_buffer_start = reuse && this->m_holder.start() == ret;
+ if(same_buffer_start){
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_expand_fwd;
+ #endif
+ this->m_holder.capacity(real_cap);
+ }
+ else{ //If there is no forward expansion, move objects, we will reuse insertion code
+ T * const new_mem = boost::movelib::to_raw_pointer(ret);
+ T * const ins_pos = this->priv_raw_end();
+ if(reuse){ //Backwards (and possibly forward) expansion
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_expand_bwd;
+ #endif
+ this->priv_forward_range_insert_expand_backwards
+ ( new_mem , real_cap, ins_pos, 0, this->priv_dummy_empty_proxy());
+ }
+ else{ //New buffer
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_alloc;
+ #endif
+ this->priv_forward_range_insert_new_allocation
+ ( new_mem, real_cap, ins_pos, 0, this->priv_dummy_empty_proxy());
+ }
+ }
+ }
+
+ void priv_destroy_last(const bool moved = false) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ (void)moved;
+ const bool skip_destructor = value_traits::trivial_dctr || (value_traits::trivial_dctr_after_move && moved);
+ if(!skip_destructor){
+ value_type* const p = this->priv_raw_end() - 1;
+ allocator_traits_type::destroy(this->get_stored_allocator(), p);
+ }
+ --this->m_holder.m_size;
+ }
+
+ void priv_destroy_last_n(const size_type n) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ BOOST_ASSERT(n <= this->m_holder.m_size);
+ if(!value_traits::trivial_dctr){
+ T* const destroy_pos = this->priv_raw_begin() + (this->m_holder.m_size-n);
+ boost::container::destroy_alloc_n(this->get_stored_allocator(), destroy_pos, n);
+ }
+ this->m_holder.m_size -= n;
+ }
+
+ template<class InpIt>
+ void priv_uninitialized_construct_at_end(InpIt first, InpIt last)
+ {
+ T* const old_end_pos = this->priv_raw_end();
+ T* const new_end_pos = boost::container::uninitialized_copy_alloc(this->m_holder.alloc(), first, last, old_end_pos);
+ this->m_holder.m_size += new_end_pos - old_end_pos;
+ }
+
+ void priv_destroy_all() BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ boost::container::destroy_alloc_n
+ (this->get_stored_allocator(), this->priv_raw_begin(), this->m_holder.m_size);
+ this->m_holder.m_size = 0;
+ }
+
+ template<class U>
+ iterator priv_insert(const const_iterator &p, BOOST_FWD_REF(U) x)
+ {
+ BOOST_ASSERT(this->priv_in_range_or_end(p));
+ return this->priv_forward_range_insert
+ ( vector_iterator_get_ptr(p), 1, dtl::get_insert_value_proxy<T*, Allocator>(::boost::forward<U>(x)));
+ }
+
+ dtl::insert_copy_proxy<Allocator, T*> priv_single_insert_proxy(const T &x)
+ { return dtl::insert_copy_proxy<Allocator, T*> (x); }
+
+ dtl::insert_move_proxy<Allocator, T*> priv_single_insert_proxy(BOOST_RV_REF(T) x)
+ { return dtl::insert_move_proxy<Allocator, T*> (x); }
+
+ template <class U>
+ void priv_push_back(BOOST_FWD_REF(U) u)
+ {
+ if (BOOST_LIKELY(this->room_enough())){
+ //There is more memory, just construct a new object at the end
+ allocator_traits_type::construct
+ ( this->m_holder.alloc(), this->priv_raw_end(), ::boost::forward<U>(u) );
+ ++this->m_holder.m_size;
+ }
+ else{
+ this->priv_forward_range_insert_no_capacity
+ ( this->back_ptr(), 1
+ , this->priv_single_insert_proxy(::boost::forward<U>(u)), alloc_version());
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_n_copies_proxy<Allocator, T*> priv_resize_proxy(const T &x)
+ { return dtl::insert_n_copies_proxy<Allocator, T*>(x); }
+
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_default_initialized_n_proxy<Allocator, T*> priv_resize_proxy(default_init_t)
+ { return dtl::insert_default_initialized_n_proxy<Allocator, T*>(); }
+
+ BOOST_CONTAINER_FORCEINLINE dtl::insert_value_initialized_n_proxy<Allocator, T*> priv_resize_proxy(value_init_t)
+ { return dtl::insert_value_initialized_n_proxy<Allocator, T*>(); }
+
+ template <class U>
+ void priv_resize(size_type new_size, const U& u)
+ {
+ const size_type sz = this->size();
+ if (new_size < sz){
+ //Destroy last elements
+ this->priv_destroy_last_n(sz - new_size);
+ }
+ else{
+ const size_type n = new_size - this->size();
+ this->priv_forward_range_insert_at_end(n, this->priv_resize_proxy(u), alloc_version());
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE void priv_shrink_to_fit(version_0) BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ void priv_shrink_to_fit(version_1)
+ {
+ const size_type cp = this->m_holder.capacity();
+ if(cp){
+ const size_type sz = this->size();
+ if(!sz){
+ if(BOOST_LIKELY(!!this->m_holder.m_start))
+ this->m_holder.deallocate(this->m_holder.m_start, cp);
+ this->m_holder.m_start = pointer();
+ this->m_holder.m_capacity = 0;
+ }
+ else if(sz < cp){
+ //Allocate a new buffer.
+ //Pass the hint so that allocators can take advantage of this.
+ pointer const p = this->m_holder.allocate(sz);
+
+ //We will reuse insert code, so create a dummy input iterator
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_alloc;
+ #endif
+ this->priv_forward_range_insert_new_allocation
+ ( boost::movelib::to_raw_pointer(p), sz
+ , this->priv_raw_begin(), 0, this->priv_dummy_empty_proxy());
+ }
+ }
+ }
+
+ void priv_shrink_to_fit(version_2) BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ const size_type cp = this->m_holder.capacity();
+ if(cp){
+ const size_type sz = this->size();
+ if(!sz){
+ if(BOOST_LIKELY(!!this->m_holder.m_start))
+ this->m_holder.deallocate(this->m_holder.m_start, cp);
+ this->m_holder.m_start = pointer();
+ this->m_holder.m_capacity = 0;
+ }
+ else{
+ size_type received_size = sz;
+ pointer reuse(this->m_holder.start());
+ if(this->m_holder.allocation_command
+ (shrink_in_place | nothrow_allocation, cp, received_size, reuse)){
+ this->m_holder.capacity(received_size);
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_shrink;
+ #endif
+ }
+ }
+ }
+ }
+
+ template <class InsertionProxy>
+ iterator priv_forward_range_insert_no_capacity
+ (const pointer &pos, const size_type, const InsertionProxy , version_0)
+ {
+ throw_bad_alloc();
+ return iterator(pos);
+ }
+
+ template <class InsertionProxy>
+ iterator priv_forward_range_insert_no_capacity
+ (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_1)
+ {
+ //Check if we have enough memory or try to expand current memory
+ const size_type n_pos = pos - this->m_holder.start();
+ T *const raw_pos = boost::movelib::to_raw_pointer(pos);
+
+ const size_type new_cap = this->m_holder.template next_capacity<growth_factor_type>(n);
+ //Pass the hint so that allocators can take advantage of this.
+ T * const new_buf = boost::movelib::to_raw_pointer(this->m_holder.allocate(new_cap));
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_alloc;
+ #endif
+ this->priv_forward_range_insert_new_allocation
+ ( new_buf, new_cap, raw_pos, n, insert_range_proxy);
+ return iterator(this->m_holder.start() + n_pos);
+ }
+
+ template <class InsertionProxy>
+ iterator priv_forward_range_insert_no_capacity
+ (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy, version_2)
+ {
+ //Check if we have enough memory or try to expand current memory
+ T *const raw_pos = boost::movelib::to_raw_pointer(pos);
+ const size_type n_pos = raw_pos - this->priv_raw_begin();
+
+ //There is not enough memory, allocate a new
+ //buffer or expand the old one.
+ size_type real_cap = this->m_holder.template next_capacity<growth_factor_type>(n);
+ pointer reuse(this->m_holder.start());
+ pointer const ret (this->m_holder.allocation_command
+ (allocate_new | expand_fwd | expand_bwd, this->m_holder.m_size + n, real_cap, reuse));
+
+ //Buffer reallocated
+ if(reuse){
+ //Forward expansion, delay insertion
+ if(this->m_holder.start() == ret){
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_expand_fwd;
+ #endif
+ this->m_holder.capacity(real_cap);
+ //Expand forward
+ this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
+ }
+ //Backwards (and possibly forward) expansion
+ else{
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_expand_bwd;
+ #endif
+ this->priv_forward_range_insert_expand_backwards
+ (boost::movelib::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
+ }
+ }
+ //New buffer
+ else{
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ ++this->num_alloc;
+ #endif
+ this->priv_forward_range_insert_new_allocation
+ ( boost::movelib::to_raw_pointer(ret), real_cap, raw_pos, n, insert_range_proxy);
+ }
+
+ return iterator(this->m_holder.start() + n_pos);
+ }
+
+ template <class InsertionProxy>
+ iterator priv_forward_range_insert
+ (const pointer &pos, const size_type n, const InsertionProxy insert_range_proxy)
+ {
+ BOOST_ASSERT(this->m_holder.capacity() >= this->m_holder.m_size);
+ //Check if we have enough memory or try to expand current memory
+ const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
+
+ bool same_buffer_start = n <= remaining;
+ if (!same_buffer_start){
+ return priv_forward_range_insert_no_capacity(pos, n, insert_range_proxy, alloc_version());
+ }
+ else{
+ //Expand forward
+ T *const raw_pos = boost::movelib::to_raw_pointer(pos);
+ const size_type n_pos = raw_pos - this->priv_raw_begin();
+ this->priv_forward_range_insert_expand_forward(raw_pos, n, insert_range_proxy);
+ return iterator(this->m_holder.start() + n_pos);
+ }
+ }
+
+ template <class InsertionProxy>
+ iterator priv_forward_range_insert_at_end
+ (const size_type n, const InsertionProxy insert_range_proxy, version_0)
+ {
+ //Check if we have enough memory or try to expand current memory
+ const size_type remaining = this->m_holder.capacity() - this->m_holder.m_size;
+
+ if (n > remaining){
+ //This will trigger an error
+ throw_bad_alloc();
+ }
+ this->priv_forward_range_insert_at_end_expand_forward(n, insert_range_proxy);
+ return this->end();
+ }
+
+ template <class InsertionProxy, class AllocVersion>
+ BOOST_CONTAINER_FORCEINLINE iterator priv_forward_range_insert_at_end
+ (const size_type n, const InsertionProxy insert_range_proxy, AllocVersion)
+ {
+ return this->priv_forward_range_insert(this->back_ptr(), n, insert_range_proxy);
+ }
+
+ //Takes the range pointed by [first_pos, last_pos) and shifts it to the right
+ //by 'shift_count'. 'limit_pos' marks the end of constructed elements.
+ //
+ //Precondition: first_pos <= last_pos <= limit_pos
+ //
+ //The shift operation might cross limit_pos so elements to moved beyond limit_pos
+ //are uninitialized_moved with an allocator. Other elements are moved.
+ //
+ //The shift operation might left uninitialized elements after limit_pos
+ //and the number of uninitialized elements is returned by the function.
+ //
+ //Old situation:
+ // first_pos last_pos old_limit
+ // | | |
+ // ____________V_______V__________________V_____________
+ //| prefix | range | suffix |raw_mem ~
+ //|____________|_______|__________________|_____________~
+ //
+ //New situation in Case A (hole_size == 0):
+ // range is moved through move assignments
+ //
+ // first_pos last_pos limit_pos
+ // | | |
+ // ____________V_______V__________________V_____________
+ //| prefix' | | | range |suffix'|raw_mem ~
+ //|________________+______|___^___|_______|_____________~
+ // | |
+ // |_>_>_>_>_>^
+ //
+ //
+ //New situation in Case B (hole_size >= 0):
+ // range is moved through uninitialized moves
+ //
+ // first_pos last_pos limit_pos
+ // | | |
+ // ____________V_______V__________________V________________
+ //| prefix' | | | [hole] | range |
+ //|_______________________________________|________|___^___|
+ // | |
+ // |_>_>_>_>_>_>_>_>_>_>_>_>_>_>_>_>_>_^
+ //
+ //New situation in Case C (hole_size == 0):
+ // range is moved through move assignments and uninitialized moves
+ //
+ // first_pos last_pos limit_pos
+ // | | |
+ // ____________V_______V__________________V___
+ //| prefix' | | | range |
+ //|___________________________________|___^___|
+ // | |
+ // |_>_>_>_>_>_>_>_>_>_>_>^
+ size_type priv_insert_ordered_at_shift_range
+ (size_type first_pos, size_type last_pos, size_type limit_pos, size_type shift_count)
+ {
+ BOOST_ASSERT(first_pos <= last_pos);
+ BOOST_ASSERT(last_pos <= limit_pos);
+ //
+ T* const begin_ptr = this->priv_raw_begin();
+ T* const first_ptr = begin_ptr + first_pos;
+ T* const last_ptr = begin_ptr + last_pos;
+
+ size_type hole_size = 0;
+ //Case A:
+ if((last_pos + shift_count) <= limit_pos){
+ //All move assigned
+ boost::container::move_backward(first_ptr, last_ptr, last_ptr + shift_count);
+ }
+ //Case B:
+ else if((first_pos + shift_count) >= limit_pos){
+ //All uninitialized_moved
+ ::boost::container::uninitialized_move_alloc
+ (this->m_holder.alloc(), first_ptr, last_ptr, first_ptr + shift_count);
+ hole_size = first_pos + shift_count - limit_pos;
+ }
+ //Case C:
+ else{
+ //Some uninitialized_moved
+ T* const limit_ptr = begin_ptr + limit_pos;
+ T* const boundary_ptr = limit_ptr - shift_count;
+ ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), boundary_ptr, last_ptr, limit_ptr);
+ //The rest is move assigned
+ boost::container::move_backward(first_ptr, boundary_ptr, limit_ptr);
+ }
+ return hole_size;
+ }
+
+ private:
+ BOOST_CONTAINER_FORCEINLINE T *priv_raw_begin() const
+ { return boost::movelib::to_raw_pointer(m_holder.start()); }
+
+ BOOST_CONTAINER_FORCEINLINE T* priv_raw_end() const
+ { return this->priv_raw_begin() + this->m_holder.m_size; }
+
+ template <class InsertionProxy>
+ void priv_forward_range_insert_at_end_expand_forward(const size_type n, InsertionProxy insert_range_proxy)
+ {
+ T* const old_finish = this->priv_raw_end();
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
+ this->m_holder.m_size += n;
+ }
+
+ template <class InsertionProxy>
+ void priv_forward_range_insert_expand_forward(T* const pos, const size_type n, InsertionProxy insert_range_proxy)
+ {
+ //n can't be 0, because there is nothing to do in that case
+ if(BOOST_UNLIKELY(!n)) return;
+ //There is enough memory
+ T* const old_finish = this->priv_raw_end();
+ const size_type elems_after = old_finish - pos;
+
+ if (!elems_after){
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
+ this->m_holder.m_size += n;
+ }
+ else if (elems_after >= n){
+ //New elements can be just copied.
+ //Move to uninitialized memory last objects
+ ::boost::container::uninitialized_move_alloc
+ (this->m_holder.alloc(), old_finish - n, old_finish, old_finish);
+ this->m_holder.m_size += n;
+ //Copy previous to last objects to the initialized end
+ boost::container::move_backward(pos, old_finish - n, old_finish);
+ //Insert new objects in the pos
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, n);
+ }
+ else {
+ //The new elements don't fit in the [pos, end()) range.
+
+ //Copy old [pos, end()) elements to the uninitialized memory (a gap is created)
+ ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), pos, old_finish, pos + n);
+ BOOST_TRY{
+ //Copy first new elements in pos (gap is still there)
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, elems_after);
+ //Copy to the beginning of the unallocated zone the last new elements (the gap is closed).
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n - elems_after);
+ this->m_holder.m_size += n;
+ }
+ BOOST_CATCH(...){
+ boost::container::destroy_alloc_n(this->get_stored_allocator(), pos + n, elems_after);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ }
+
+ template <class InsertionProxy>
+ void priv_forward_range_insert_new_allocation
+ (T* const new_start, size_type new_cap, T* const pos, const size_type n, InsertionProxy insert_range_proxy)
+ {
+ //n can be zero, if we want to reallocate!
+ T *new_finish = new_start;
+ T *old_finish;
+ //Anti-exception rollbacks
+ typename value_traits::ArrayDeallocator new_buffer_deallocator(new_start, this->m_holder.alloc(), new_cap);
+ typename value_traits::ArrayDestructor new_values_destroyer(new_start, this->m_holder.alloc(), 0u);
+
+ //Initialize with [begin(), pos) old buffer
+ //the start of the new buffer
+ T * const old_buffer = this->priv_raw_begin();
+ if(old_buffer){
+ new_finish = ::boost::container::uninitialized_move_alloc
+ (this->m_holder.alloc(), this->priv_raw_begin(), pos, old_finish = new_finish);
+ new_values_destroyer.increment_size(new_finish - old_finish);
+ }
+ //Initialize new objects, starting from previous point
+ old_finish = new_finish;
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, n);
+ new_finish += n;
+ new_values_destroyer.increment_size(new_finish - old_finish);
+ //Initialize from the rest of the old buffer,
+ //starting from previous point
+ if(old_buffer){
+ new_finish = ::boost::container::uninitialized_move_alloc
+ (this->m_holder.alloc(), pos, old_buffer + this->m_holder.m_size, new_finish);
+ //Destroy and deallocate old elements
+ //If there is allocated memory, destroy and deallocate
+ if(!value_traits::trivial_dctr_after_move)
+ boost::container::destroy_alloc_n(this->get_stored_allocator(), old_buffer, this->m_holder.m_size);
+ this->m_holder.deallocate(this->m_holder.start(), this->m_holder.capacity());
+ }
+ this->m_holder.start(new_start);
+ this->m_holder.m_size = size_type(new_finish - new_start);
+ this->m_holder.capacity(new_cap);
+ //All construction successful, disable rollbacks
+ new_values_destroyer.release();
+ new_buffer_deallocator.release();
+ }
+
+ template <class InsertionProxy>
+ void priv_forward_range_insert_expand_backwards
+ (T* const new_start, const size_type new_capacity,
+ T* const pos, const size_type n, InsertionProxy insert_range_proxy)
+ {
+ //n can be zero to just expand capacity
+ //Backup old data
+ T* const old_start = this->priv_raw_begin();
+ const size_type old_size = this->m_holder.m_size;
+ T* const old_finish = old_start + old_size;
+
+ //We can have 8 possibilities:
+ const size_type elemsbefore = static_cast<size_type>(pos - old_start);
+ const size_type s_before = static_cast<size_type>(old_start - new_start);
+ const size_type before_plus_new = elemsbefore + n;
+
+ //Update the vector buffer information to a safe state
+ this->m_holder.start(new_start);
+ this->m_holder.capacity(new_capacity);
+ this->m_holder.m_size = 0;
+
+ //If anything goes wrong, this object will destroy
+ //all the old objects to fulfill previous vector state
+ typename value_traits::ArrayDestructor old_values_destroyer(old_start, this->m_holder.alloc(), old_size);
+ //Check if s_before is big enough to hold the beginning of old data + new data
+ if(s_before >= before_plus_new){
+ //Copy first old values before pos, after that the new objects
+ T *const new_elem_pos =
+ ::boost::container::uninitialized_move_alloc(this->m_holder.alloc(), old_start, pos, new_start);
+ this->m_holder.m_size = elemsbefore;
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), new_elem_pos, n);
+ this->m_holder.m_size = before_plus_new;
+ const size_type new_size = old_size + n;
+ //Check if s_before is so big that even copying the old data + new data
+ //there is a gap between the new data and the old data
+ if(s_before >= new_size){
+ //Old situation:
+ // _________________________________________________________
+ //| raw_mem | old_begin | old_end |
+ //| __________________________________|___________|_________|
+ //
+ //New situation:
+ // _________________________________________________________
+ //| old_begin | new | old_end | raw_mem |
+ //|___________|__________|_________|________________________|
+ //
+ //Now initialize the rest of memory with the last old values
+ if(before_plus_new != new_size){ //Special case to avoid operations in back insertion
+ ::boost::container::uninitialized_move_alloc
+ (this->m_holder.alloc(), pos, old_finish, new_start + before_plus_new);
+ //All new elements correctly constructed, avoid new element destruction
+ this->m_holder.m_size = new_size;
+ }
+ //Old values destroyed automatically with "old_values_destroyer"
+ //when "old_values_destroyer" goes out of scope unless the have trivial
+ //destructor after move.
+ if(value_traits::trivial_dctr_after_move)
+ old_values_destroyer.release();
+ }
+ //s_before is so big that divides old_end
+ else{
+ //Old situation:
+ // __________________________________________________
+ //| raw_mem | old_begin | old_end |
+ //| ___________________________|___________|_________|
+ //
+ //New situation:
+ // __________________________________________________
+ //| old_begin | new | old_end | raw_mem |
+ //|___________|__________|_________|_________________|
+ //
+ //Now initialize the rest of memory with the last old values
+ //All new elements correctly constructed, avoid new element destruction
+ const size_type raw_gap = s_before - before_plus_new;
+ if(!value_traits::trivial_dctr){
+ //Now initialize the rest of s_before memory with the
+ //first of elements after new values
+ ::boost::container::uninitialized_move_alloc_n
+ (this->m_holder.alloc(), pos, raw_gap, new_start + before_plus_new);
+ //Now we have a contiguous buffer so program trailing element destruction
+ //and update size to the final size.
+ old_values_destroyer.shrink_forward(new_size-s_before);
+ this->m_holder.m_size = new_size;
+ //Now move remaining last objects in the old buffer begin
+ T * const remaining_pos = pos + raw_gap;
+ if(remaining_pos != old_start){ //Make sure data has to be moved
+ ::boost::container::move(remaining_pos, old_finish, old_start);
+ }
+ //Once moved, avoid calling the destructors if trivial after move
+ if(value_traits::trivial_dctr_after_move){
+ old_values_destroyer.release();
+ }
+ }
+ else{ //If trivial destructor, we can uninitialized copy + copy in a single uninitialized copy
+ ::boost::container::uninitialized_move_alloc_n
+ (this->m_holder.alloc(), pos, static_cast<size_type>(old_finish - pos), new_start + before_plus_new);
+ this->m_holder.m_size = new_size;
+ old_values_destroyer.release();
+ }
+ }
+ }
+ else{
+ //Check if we have to do the insertion in two phases
+ //since maybe s_before is not big enough and
+ //the buffer was expanded both sides
+ //
+ //Old situation:
+ // _________________________________________________
+ //| raw_mem | old_begin + old_end | raw_mem |
+ //|_________|_____________________|_________________|
+ //
+ //New situation with do_after:
+ // _________________________________________________
+ //| old_begin + new + old_end | raw_mem |
+ //|___________________________________|_____________|
+ //
+ //New without do_after:
+ // _________________________________________________
+ //| old_begin + new + old_end | raw_mem |
+ //|____________________________|____________________|
+ //
+ const bool do_after = n > s_before;
+
+ //Now we can have two situations: the raw_mem of the
+ //beginning divides the old_begin, or the new elements:
+ if (s_before <= elemsbefore) {
+ //The raw memory divides the old_begin group:
+ //
+ //If we need two phase construction (do_after)
+ //new group is divided in new = new_beg + new_end groups
+ //In this phase only new_beg will be inserted
+ //
+ //Old situation:
+ // _________________________________________________
+ //| raw_mem | old_begin | old_end | raw_mem |
+ //|_________|___________|_________|_________________|
+ //
+ //New situation with do_after(1):
+ //This is not definitive situation, the second phase
+ //will include
+ // _________________________________________________
+ //| old_begin | new_beg | old_end | raw_mem |
+ //|___________|_________|_________|_________________|
+ //
+ //New situation without do_after:
+ // _________________________________________________
+ //| old_begin | new | old_end | raw_mem |
+ //|___________|_____|_________|_____________________|
+ //
+ //Copy the first part of old_begin to raw_mem
+ ::boost::container::uninitialized_move_alloc_n
+ (this->m_holder.alloc(), old_start, s_before, new_start);
+ //The buffer is all constructed until old_end,
+ //so program trailing destruction and assign final size
+ //if !do_after, s_before+n otherwise.
+ size_type new_1st_range;
+ if(do_after){
+ new_1st_range = s_before;
+ //release destroyer and update size
+ old_values_destroyer.release();
+ }
+ else{
+ new_1st_range = n;
+ if(value_traits::trivial_dctr_after_move)
+ old_values_destroyer.release();
+ else{
+ old_values_destroyer.shrink_forward(old_size - (s_before - n));
+ }
+ }
+ this->m_holder.m_size = old_size + new_1st_range;
+ //Now copy the second part of old_begin overwriting itself
+ T *const next = ::boost::container::move(old_start + s_before, pos, old_start);
+ //Now copy the new_beg elements
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), next, new_1st_range);
+
+ //If there is no after work and the last old part needs to be moved to front, do it
+ if(!do_after && (n != s_before)){
+ //Now displace old_end elements
+ ::boost::container::move(pos, old_finish, next + new_1st_range);
+ }
+ }
+ else {
+ //If we have to expand both sides,
+ //we will play if the first new values so
+ //calculate the upper bound of new values
+
+ //The raw memory divides the new elements
+ //
+ //If we need two phase construction (do_after)
+ //new group is divided in new = new_beg + new_end groups
+ //In this phase only new_beg will be inserted
+ //
+ //Old situation:
+ // _______________________________________________________
+ //| raw_mem | old_begin | old_end | raw_mem |
+ //|_______________|___________|_________|_________________|
+ //
+ //New situation with do_after():
+ // ____________________________________________________
+ //| old_begin | new_beg | old_end | raw_mem |
+ //|___________|_______________|_________|______________|
+ //
+ //New situation without do_after:
+ // ______________________________________________________
+ //| old_begin | new | old_end | raw_mem |
+ //|___________|_____|_________|__________________________|
+ //
+ //First copy whole old_begin and part of new to raw_mem
+ T * const new_pos = ::boost::container::uninitialized_move_alloc
+ (this->m_holder.alloc(), old_start, pos, new_start);
+ this->m_holder.m_size = elemsbefore;
+ const size_type mid_n = s_before - elemsbefore;
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), new_pos, mid_n);
+ //The buffer is all constructed until old_end,
+ //release destroyer
+ this->m_holder.m_size = old_size + s_before;
+ old_values_destroyer.release();
+
+ if(do_after){
+ //Copy new_beg part
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), old_start, elemsbefore);
+ }
+ else{
+ //Copy all new elements
+ const size_type rest_new = n - mid_n;
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), old_start, rest_new);
+ T* const move_start = old_start + rest_new;
+ //Displace old_end, but make sure data has to be moved
+ T* const move_end = move_start != pos ? ::boost::container::move(pos, old_finish, move_start)
+ : old_finish;
+ //Destroy remaining moved elements from old_end except if they
+ //have trivial destructor after being moved
+ size_type n_destroy = s_before - n;
+ if(!value_traits::trivial_dctr_after_move)
+ boost::container::destroy_alloc_n(this->get_stored_allocator(), move_end, n_destroy);
+ this->m_holder.m_size -= n_destroy;
+ }
+ }
+
+ //This is only executed if two phase construction is needed
+ if(do_after){
+ //The raw memory divides the new elements
+ //
+ //Old situation:
+ // ______________________________________________________
+ //| raw_mem | old_begin | old_end | raw_mem |
+ //|______________|___________|____________|______________|
+ //
+ //New situation with do_after(1):
+ // _______________________________________________________
+ //| old_begin + new_beg | new_end |old_end | raw_mem |
+ //|__________________________|_________|________|_________|
+ //
+ //New situation with do_after(2):
+ // ______________________________________________________
+ //| old_begin + new | old_end |raw |
+ //|_______________________________________|_________|____|
+ //
+ const size_type n_after = n - s_before;
+ const size_type elemsafter = old_size - elemsbefore;
+
+ //We can have two situations:
+ if (elemsafter >= n_after){
+ //The raw_mem from end will divide displaced old_end
+ //
+ //Old situation:
+ // ______________________________________________________
+ //| raw_mem | old_begin | old_end | raw_mem |
+ //|______________|___________|____________|______________|
+ //
+ //New situation with do_after(1):
+ // _______________________________________________________
+ //| old_begin + new_beg | new_end |old_end | raw_mem |
+ //|__________________________|_________|________|_________|
+ //
+ //First copy the part of old_end raw_mem
+ T* finish_n = old_finish - n_after;
+ ::boost::container::uninitialized_move_alloc
+ (this->m_holder.alloc(), finish_n, old_finish, old_finish);
+ this->m_holder.m_size += n_after;
+ //Displace the rest of old_end to the new position
+ boost::container::move_backward(pos, finish_n, old_finish);
+ //Now overwrite with new_end
+ //The new_end part is [first + (n - n_after), last)
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, n_after);
+ }
+ else {
+ //The raw_mem from end will divide new_end part
+ //
+ //Old situation:
+ // _____________________________________________________________
+ //| raw_mem | old_begin | old_end | raw_mem |
+ //|______________|___________|____________|_____________________|
+ //
+ //New situation with do_after(2):
+ // _____________________________________________________________
+ //| old_begin + new_beg | new_end |old_end | raw_mem |
+ //|__________________________|_______________|________|_________|
+ //
+
+ const size_type mid_last_dist = n_after - elemsafter;
+ //First initialize data in raw memory
+
+ //Copy to the old_end part to the uninitialized zone leaving a gap.
+ ::boost::container::uninitialized_move_alloc
+ (this->m_holder.alloc(), pos, old_finish, old_finish + mid_last_dist);
+
+ typename value_traits::ArrayDestructor old_end_destroyer
+ (old_finish + mid_last_dist, this->m_holder.alloc(), old_finish - pos);
+
+ //Copy the first part to the already constructed old_end zone
+ insert_range_proxy.copy_n_and_update(this->m_holder.alloc(), pos, elemsafter);
+ //Copy the rest to the uninitialized zone filling the gap
+ insert_range_proxy.uninitialized_copy_n_and_update(this->m_holder.alloc(), old_finish, mid_last_dist);
+ this->m_holder.m_size += n_after;
+ old_end_destroyer.release();
+ }
+ }
+ }
+ }
+
+ void priv_throw_if_out_of_range(size_type n) const
+ {
+ //If n is out of range, throw an out_of_range exception
+ if (n >= this->size()){
+ throw_out_of_range("vector::at out of range");
+ }
+ }
+
+ BOOST_CONTAINER_FORCEINLINE bool priv_in_range(const_iterator pos) const
+ {
+ return (this->begin() <= pos) && (pos < this->end());
+ }
+
+ BOOST_CONTAINER_FORCEINLINE bool priv_in_range_or_end(const_iterator pos) const
+ {
+ return (this->begin() <= pos) && (pos <= this->end());
+ }
+
+ #ifdef BOOST_CONTAINER_VECTOR_ALLOC_STATS
+ public:
+ unsigned int num_expand_fwd;
+ unsigned int num_expand_bwd;
+ unsigned int num_shrink;
+ unsigned int num_alloc;
+ void reset_alloc_stats()
+ { num_expand_fwd = num_expand_bwd = num_alloc = 0, num_shrink = 0; }
+ #endif
+ #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+};
+
+#ifndef BOOST_CONTAINER_NO_CXX17_CTAD
+
+template <typename InputIterator>
+vector(InputIterator, InputIterator) ->
+ vector<typename iterator_traits<InputIterator>::value_type>;
+
+template <typename InputIterator, typename Allocator>
+vector(InputIterator, InputIterator, Allocator const&) ->
+ vector<typename iterator_traits<InputIterator>::value_type, Allocator>;
+
+#endif
+
+
+}} //namespace boost::container
+
+#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+namespace boost {
+
+//!has_trivial_destructor_after_move<> == true_type
+//!specialization for optimizations
+template <class T, class Allocator>
+struct has_trivial_destructor_after_move<boost::container::vector<T, Allocator> >
+{
+ typedef typename ::boost::container::allocator_traits<Allocator>::pointer pointer;
+ static const bool value = ::boost::has_trivial_destructor_after_move<Allocator>::value &&
+ ::boost::has_trivial_destructor_after_move<pointer>::value;
+};
+
+}
+
+#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED
+
+#include <boost/container/detail/config_end.hpp>
+
+#endif // #ifndef BOOST_CONTAINER_CONTAINER_VECTOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/container_hash/detail/float_functions.hpp b/src/third_party/boost-1.69.0/boost/container_hash/detail/float_functions.hpp
index f3db52f9cc5..f3db52f9cc5 100644
--- a/src/third_party/boost-1.68.0/boost/container_hash/detail/float_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/container_hash/detail/float_functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container_hash/detail/hash_float.hpp b/src/third_party/boost-1.69.0/boost/container_hash/detail/hash_float.hpp
index f7634285087..f7634285087 100644
--- a/src/third_party/boost-1.68.0/boost/container_hash/detail/hash_float.hpp
+++ b/src/third_party/boost-1.69.0/boost/container_hash/detail/hash_float.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container_hash/detail/limits.hpp b/src/third_party/boost-1.69.0/boost/container_hash/detail/limits.hpp
index 4a971a6ac2d..4a971a6ac2d 100644
--- a/src/third_party/boost-1.68.0/boost/container_hash/detail/limits.hpp
+++ b/src/third_party/boost-1.69.0/boost/container_hash/detail/limits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container_hash/extensions.hpp b/src/third_party/boost-1.69.0/boost/container_hash/extensions.hpp
index 4eebb4bc93c..4eebb4bc93c 100644
--- a/src/third_party/boost-1.68.0/boost/container_hash/extensions.hpp
+++ b/src/third_party/boost-1.69.0/boost/container_hash/extensions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container_hash/hash.hpp b/src/third_party/boost-1.69.0/boost/container_hash/hash.hpp
index 76de7939eb0..76de7939eb0 100644
--- a/src/third_party/boost-1.68.0/boost/container_hash/hash.hpp
+++ b/src/third_party/boost-1.69.0/boost/container_hash/hash.hpp
diff --git a/src/third_party/boost-1.68.0/boost/container_hash/hash_fwd.hpp b/src/third_party/boost-1.69.0/boost/container_hash/hash_fwd.hpp
index a87c182d39c..a87c182d39c 100644
--- a/src/third_party/boost-1.68.0/boost/container_hash/hash_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/container_hash/hash_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/context/detail/config.hpp b/src/third_party/boost-1.69.0/boost/context/detail/config.hpp
index 15d03574b18..15d03574b18 100644
--- a/src/third_party/boost-1.68.0/boost/context/detail/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/context/detail/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/context/detail/fcontext.hpp b/src/third_party/boost-1.69.0/boost/context/detail/fcontext.hpp
index 00cb24d9415..00cb24d9415 100644
--- a/src/third_party/boost-1.68.0/boost/context/detail/fcontext.hpp
+++ b/src/third_party/boost-1.69.0/boost/context/detail/fcontext.hpp
diff --git a/src/third_party/boost-1.68.0/boost/core/addressof.hpp b/src/third_party/boost-1.69.0/boost/core/addressof.hpp
index f7eab06ba75..f7eab06ba75 100644
--- a/src/third_party/boost-1.68.0/boost/core/addressof.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/addressof.hpp
diff --git a/src/third_party/boost-1.68.0/boost/core/checked_delete.hpp b/src/third_party/boost-1.69.0/boost/core/checked_delete.hpp
index b086e03e88a..b086e03e88a 100644
--- a/src/third_party/boost-1.68.0/boost/core/checked_delete.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/checked_delete.hpp
diff --git a/src/third_party/boost-1.68.0/boost/core/demangle.hpp b/src/third_party/boost-1.69.0/boost/core/demangle.hpp
index dc714d806cb..dc714d806cb 100644
--- a/src/third_party/boost-1.68.0/boost/core/demangle.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/demangle.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/empty_value.hpp b/src/third_party/boost-1.69.0/boost/core/empty_value.hpp
new file mode 100644
index 00000000000..9265f05d3a7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/core/empty_value.hpp
@@ -0,0 +1,136 @@
+/*
+Copyright 2018 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License, Version 1.0.
+(http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BOOST_CORE_EMPTY_VALUE_HPP
+#define BOOST_CORE_EMPTY_VALUE_HPP
+
+#include <boost/config.hpp>
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#include <utility>
+#endif
+
+#if defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 40700)
+#define BOOST_DETAIL_EMPTY_VALUE_BASE
+#elif defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1800)
+#define BOOST_DETAIL_EMPTY_VALUE_BASE
+#elif defined(BOOST_MSVC) && (BOOST_MSVC >= 1800)
+#define BOOST_DETAIL_EMPTY_VALUE_BASE
+#elif defined(BOOST_CLANG) && !defined(__CUDACC__)
+#if __has_feature(is_empty) && __has_feature(is_final)
+#define BOOST_DETAIL_EMPTY_VALUE_BASE
+#endif
+#endif
+
+namespace boost {
+
+template<class T>
+struct use_empty_value_base {
+ enum {
+#if defined(BOOST_DETAIL_EMPTY_VALUE_BASE)
+ value = __is_empty(T) && !__is_final(T)
+#else
+ value = false
+#endif
+ };
+};
+
+struct empty_init_t { };
+
+namespace empty_ {
+
+template<class T, unsigned N = 0,
+ bool E = boost::use_empty_value_base<T>::value>
+class empty_value {
+public:
+ typedef T type;
+
+#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+ empty_value() = default;
+#else
+ empty_value() { }
+#endif
+
+ empty_value(boost::empty_init_t)
+ : value_() { }
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template<class... Args>
+ explicit empty_value(boost::empty_init_t, Args&&... args)
+ : value_(std::forward<Args>(args)...) { }
+#else
+ template<class U>
+ empty_value(boost::empty_init_t, U&& value)
+ : value_(std::forward<U>(value)) { }
+#endif
+#else
+ template<class U>
+ empty_value(boost::empty_init_t, const U& value)
+ : value_(value) { }
+#endif
+
+ const T& get() const BOOST_NOEXCEPT {
+ return value_;
+ }
+
+ T& get() BOOST_NOEXCEPT {
+ return value_;
+ }
+
+private:
+ T value_;
+};
+
+#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
+template<class T, unsigned N>
+class empty_value<T, N, true>
+ : T {
+public:
+ typedef T type;
+
+#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS)
+ empty_value() = default;
+#else
+ empty_value() { }
+#endif
+
+ empty_value(boost::empty_init_t)
+ : T() { }
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template<class... Args>
+ explicit empty_value(boost::empty_init_t, Args&&... args)
+ : T(std::forward<Args>(args)...) { }
+#else
+ template<class U>
+ empty_value(boost::empty_init_t, U&& value)
+ : T(std::forward<U>(value)) { }
+#endif
+#else
+ template<class U>
+ empty_value(boost::empty_init_t, const U& value)
+ : T(value) { }
+#endif
+
+ const T& get() const BOOST_NOEXCEPT {
+ return *this;
+ }
+
+ T& get() BOOST_NOEXCEPT {
+ return *this;
+ }
+};
+#endif
+
+} /* empty_ */
+
+using empty_::empty_value;
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/core/enable_if.hpp b/src/third_party/boost-1.69.0/boost/core/enable_if.hpp
index 5dcef1e0354..5dcef1e0354 100644
--- a/src/third_party/boost-1.68.0/boost/core/enable_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/enable_if.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/explicit_operator_bool.hpp b/src/third_party/boost-1.69.0/boost/core/explicit_operator_bool.hpp
new file mode 100644
index 00000000000..d689f114d32
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/core/explicit_operator_bool.hpp
@@ -0,0 +1,163 @@
+/*
+ * Copyright Andrey Semashev 2007 - 2013.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ */
+
+/*!
+ * \file explicit_operator_bool.hpp
+ * \author Andrey Semashev
+ * \date 08.03.2009
+ *
+ * This header defines a compatibility macro that implements an unspecified
+ * \c bool operator idiom, which is superseded with explicit conversion operators in
+ * C++11.
+ */
+
+#ifndef BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
+#define BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
+
+#include <boost/config.hpp>
+#include <boost/config/workaround.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+
+/*!
+ * \brief The macro defines an explicit operator of conversion to \c bool
+ *
+ * The macro should be used inside the definition of a class that has to
+ * support the conversion. The class should also implement <tt>operator!</tt>,
+ * in terms of which the conversion operator will be implemented.
+ */
+#define BOOST_EXPLICIT_OPERATOR_BOOL()\
+ BOOST_FORCEINLINE explicit operator bool () const\
+ {\
+ return !this->operator! ();\
+ }
+
+/*!
+ * \brief The macro defines a noexcept explicit operator of conversion to \c bool
+ *
+ * The macro should be used inside the definition of a class that has to
+ * support the conversion. The class should also implement <tt>operator!</tt>,
+ * in terms of which the conversion operator will be implemented.
+ */
+#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
+ BOOST_FORCEINLINE explicit operator bool () const BOOST_NOEXCEPT\
+ {\
+ return !this->operator! ();\
+ }
+
+#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
+
+/*!
+ * \brief The macro defines a constexpr explicit operator of conversion to \c bool
+ *
+ * The macro should be used inside the definition of a class that has to
+ * support the conversion. The class should also implement <tt>operator!</tt>,
+ * in terms of which the conversion operator will be implemented.
+ */
+#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
+ BOOST_FORCEINLINE BOOST_CONSTEXPR explicit operator bool () const BOOST_NOEXCEPT\
+ {\
+ return !this->operator! ();\
+ }
+
+#else
+
+#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL() BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
+
+#endif
+
+#else // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+
+#if (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
+// Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
+#define BOOST_NO_UNSPECIFIED_BOOL
+#endif // (defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530)) && !defined(BOOST_NO_COMPILER_CONFIG)
+
+#if !defined(BOOST_NO_UNSPECIFIED_BOOL)
+
+namespace boost {
+
+namespace detail {
+
+#if !defined(_MSC_VER) && !defined(__IBMCPP__)
+
+ struct unspecified_bool
+ {
+ // NOTE TO THE USER: If you see this in error messages then you tried
+ // to apply an unsupported operator on the object that supports
+ // explicit conversion to bool.
+ struct OPERATORS_NOT_ALLOWED;
+ static void true_value(OPERATORS_NOT_ALLOWED*) {}
+ };
+ typedef void (*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*);
+
+#else
+
+ // MSVC and VACPP are too eager to convert pointer to function to void* even though they shouldn't
+ struct unspecified_bool
+ {
+ // NOTE TO THE USER: If you see this in error messages then you tried
+ // to apply an unsupported operator on the object that supports
+ // explicit conversion to bool.
+ struct OPERATORS_NOT_ALLOWED;
+ void true_value(OPERATORS_NOT_ALLOWED*) {}
+ };
+ typedef void (unspecified_bool::*unspecified_bool_type)(unspecified_bool::OPERATORS_NOT_ALLOWED*);
+
+#endif
+
+} // namespace detail
+
+} // namespace boost
+
+#define BOOST_EXPLICIT_OPERATOR_BOOL()\
+ BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const\
+ {\
+ return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
+ }
+
+#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
+ BOOST_FORCEINLINE operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
+ {\
+ return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
+ }
+
+#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
+ BOOST_FORCEINLINE BOOST_CONSTEXPR operator boost::detail::unspecified_bool_type () const BOOST_NOEXCEPT\
+ {\
+ return (!this->operator! () ? &boost::detail::unspecified_bool::true_value : (boost::detail::unspecified_bool_type)0);\
+ }
+
+#else // !defined(BOOST_NO_UNSPECIFIED_BOOL)
+
+#define BOOST_EXPLICIT_OPERATOR_BOOL()\
+ BOOST_FORCEINLINE operator bool () const\
+ {\
+ return !this->operator! ();\
+ }
+
+#define BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()\
+ BOOST_FORCEINLINE operator bool () const BOOST_NOEXCEPT\
+ {\
+ return !this->operator! ();\
+ }
+
+#define BOOST_CONSTEXPR_EXPLICIT_OPERATOR_BOOL()\
+ BOOST_FORCEINLINE BOOST_CONSTEXPR operator bool () const BOOST_NOEXCEPT\
+ {\
+ return !this->operator! ();\
+ }
+
+#endif // !defined(BOOST_NO_UNSPECIFIED_BOOL)
+
+#endif // !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+
+#endif // BOOST_CORE_EXPLICIT_OPERATOR_BOOL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/ignore_unused.hpp b/src/third_party/boost-1.69.0/boost/core/ignore_unused.hpp
index 994e5f64763..994e5f64763 100644
--- a/src/third_party/boost-1.68.0/boost/core/ignore_unused.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/ignore_unused.hpp
diff --git a/src/third_party/boost-1.68.0/boost/core/is_same.hpp b/src/third_party/boost-1.69.0/boost/core/is_same.hpp
index f373c654d5e..f373c654d5e 100644
--- a/src/third_party/boost-1.68.0/boost/core/is_same.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/is_same.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/lightweight_test.hpp b/src/third_party/boost-1.69.0/boost/core/lightweight_test.hpp
new file mode 100644
index 00000000000..45736cb733d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/core/lightweight_test.hpp
@@ -0,0 +1,436 @@
+#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP
+#define BOOST_CORE_LIGHTWEIGHT_TEST_HPP
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+//
+// boost/core/lightweight_test.hpp - lightweight test library
+//
+// Copyright (c) 2002, 2009, 2014 Peter Dimov
+// Copyright (2) Beman Dawes 2010, 2011
+// Copyright (3) Ion Gaztanaga 2013
+//
+// Copyright 2018 Glen Joseph Fernandes
+// (glenjofe@gmail.com)
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+
+#include <boost/core/no_exceptions_support.hpp>
+#include <boost/current_function.hpp>
+#include <iostream>
+#include <iterator>
+#include <cstdlib>
+#include <cstring>
+#include <cstddef>
+
+// IDE's like Visual Studio perform better if output goes to std::cout or
+// some other stream, so allow user to configure output stream:
+#ifndef BOOST_LIGHTWEIGHT_TEST_OSTREAM
+# define BOOST_LIGHTWEIGHT_TEST_OSTREAM std::cerr
+#endif
+
+namespace boost
+{
+
+namespace detail
+{
+
+class test_result {
+public:
+ test_result()
+ : report_(false)
+ , errors_(0) {
+#if defined(_MSC_VER) && (_MSC_VER > 1310)
+ ::_set_abort_behavior(0, _WRITE_ABORT_MSG | _CALL_REPORTFAULT);
+#endif
+ }
+
+ ~test_result() {
+ if (!report_) {
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM << "main() should return report_errors()" << std::endl;
+ std::abort();
+ }
+ }
+
+ int& errors() {
+ return errors_;
+ }
+
+ void done() {
+ report_ = true;
+ }
+
+private:
+ bool report_;
+ int errors_;
+};
+
+inline test_result& test_results()
+{
+ static test_result instance;
+ return instance;
+}
+
+inline int& test_errors()
+{
+ return test_results().errors();
+}
+
+inline void test_failed_impl(char const * expr, char const * file, int line, char const * function)
+{
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << file << "(" << line << "): test '" << expr << "' failed in function '"
+ << function << "'" << std::endl;
+ ++test_results().errors();
+}
+
+inline void error_impl(char const * msg, char const * file, int line, char const * function)
+{
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << file << "(" << line << "): " << msg << " in function '"
+ << function << "'" << std::endl;
+ ++test_results().errors();
+}
+
+inline void throw_failed_impl(char const * excep, char const * file, int line, char const * function)
+{
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << file << "(" << line << "): Exception '" << excep << "' not thrown in function '"
+ << function << "'" << std::endl;
+ ++test_results().errors();
+}
+
+// In the comparisons below, it is possible that T and U are signed and unsigned integer types, which generates warnings in some compilers.
+// A cleaner fix would require common_type trait or some meta-programming, which would introduce a dependency on Boost.TypeTraits. To avoid
+// the dependency we just disable the warnings.
+#if defined(_MSC_VER)
+# pragma warning(push)
+# pragma warning(disable: 4389)
+#elif defined(__clang__) && defined(__has_warning)
+# if __has_warning("-Wsign-compare")
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wsign-compare"
+# endif
+#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wsign-compare"
+#endif
+
+// specialize test output for char pointers to avoid printing as cstring
+template <class T> inline const T& test_output_impl(const T& v) { return v; }
+inline const void* test_output_impl(const char* v) { return v; }
+inline const void* test_output_impl(const unsigned char* v) { return v; }
+inline const void* test_output_impl(const signed char* v) { return v; }
+inline const void* test_output_impl(char* v) { return v; }
+inline const void* test_output_impl(unsigned char* v) { return v; }
+inline const void* test_output_impl(signed char* v) { return v; }
+template<class T> inline const void* test_output_impl(T volatile* v) { return const_cast<T*>(v); }
+
+#if !defined( BOOST_NO_CXX11_NULLPTR )
+inline const void* test_output_impl(std::nullptr_t) { return nullptr; }
+#endif
+
+struct lw_test_eq {
+ template <typename T, typename U>
+ bool operator()(const T& t, const U& u) const { return t == u; }
+ static const char* op() { return "=="; }
+};
+
+struct lw_test_ne {
+ template <typename T, typename U>
+ bool operator()(const T& t, const U& u) const { return t != u; }
+ static const char* op() { return "!="; }
+};
+
+struct lw_test_lt {
+ template <typename T, typename U>
+ bool operator()(const T& t, const U& u) const { return t < u; }
+ static const char* op() { return "<"; }
+};
+
+struct lw_test_le {
+ template <typename T, typename U>
+ bool operator()(const T& t, const U& u) const { return t <= u; }
+ static const char* op() { return "<="; }
+};
+
+struct lw_test_gt {
+ template <typename T, typename U>
+ bool operator()(const T& t, const U& u) const { return t > u; }
+ static const char* op() { return ">"; }
+};
+
+struct lw_test_ge {
+ template <typename T, typename U>
+ bool operator()(const T& t, const U& u) const { return t >= u; }
+ static const char* op() { return ">="; }
+};
+
+template<class BinaryPredicate, class T, class U>
+inline void test_with_impl(BinaryPredicate pred, char const * expr1, char const * expr2,
+ char const * file, int line, char const * function,
+ T const & t, U const & u)
+{
+ if( pred(t, u) )
+ {
+ test_results();
+ }
+ else
+ {
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << file << "(" << line << "): test '" << expr1 << " " << pred.op() << " " << expr2
+ << "' ('" << test_output_impl(t) << "' " << pred.op() << " '" << test_output_impl(u)
+ << "') failed in function '" << function << "'" << std::endl;
+ ++test_results().errors();
+ }
+}
+
+inline void test_cstr_eq_impl( char const * expr1, char const * expr2,
+ char const * file, int line, char const * function, char const * const t, char const * const u )
+{
+ if( std::strcmp(t, u) == 0 )
+ {
+ test_results();
+ }
+ else
+ {
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << file << "(" << line << "): test '" << expr1 << " == " << expr2 << "' ('" << t
+ << "' == '" << u << "') failed in function '" << function << "'" << std::endl;
+ ++test_results().errors();
+ }
+}
+
+inline void test_cstr_ne_impl( char const * expr1, char const * expr2,
+ char const * file, int line, char const * function, char const * const t, char const * const u )
+{
+ if( std::strcmp(t, u) != 0 )
+ {
+ test_results();
+ }
+ else
+ {
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << file << "(" << line << "): test '" << expr1 << " != " << expr2 << "' ('" << t
+ << "' != '" << u << "') failed in function '" << function << "'" << std::endl;
+ ++test_results().errors();
+ }
+}
+
+template<class FormattedOutputFunction, class InputIterator1, class InputIterator2>
+void test_all_eq_impl(FormattedOutputFunction& output,
+ char const * file, int line, char const * function,
+ InputIterator1 first_begin, InputIterator1 first_end,
+ InputIterator2 second_begin, InputIterator2 second_end)
+{
+ InputIterator1 first_it = first_begin;
+ InputIterator2 second_it = second_begin;
+ typename std::iterator_traits<InputIterator1>::difference_type first_index = 0;
+ typename std::iterator_traits<InputIterator2>::difference_type second_index = 0;
+ std::size_t error_count = 0;
+ const std::size_t max_count = 8;
+ do
+ {
+ while ((first_it != first_end) && (second_it != second_end) && (*first_it == *second_it))
+ {
+ ++first_it;
+ ++second_it;
+ ++first_index;
+ ++second_index;
+ }
+ if ((first_it == first_end) || (second_it == second_end))
+ {
+ break; // do-while
+ }
+ if (error_count == 0)
+ {
+ output << file << "(" << line << "): Container contents differ in function '" << function << "':";
+ }
+ else if (error_count >= max_count)
+ {
+ output << " ...";
+ break;
+ }
+ output << " [" << first_index << "] '" << test_output_impl(*first_it) << "' != '" << test_output_impl(*second_it) << "'";
+ ++first_it;
+ ++second_it;
+ ++first_index;
+ ++second_index;
+ ++error_count;
+ } while (first_it != first_end);
+
+ first_index += std::distance(first_it, first_end);
+ second_index += std::distance(second_it, second_end);
+ if (first_index != second_index)
+ {
+ if (error_count == 0)
+ {
+ output << file << "(" << line << "): Container sizes differ in function '" << function << "': size(" << first_index << ") != size(" << second_index << ")";
+ }
+ else
+ {
+ output << " [*] size(" << first_index << ") != size(" << second_index << ")";
+ }
+ ++error_count;
+ }
+
+ if (error_count == 0)
+ {
+ test_results();
+ }
+ else
+ {
+ output << std::endl;
+ ++test_results().errors();
+ }
+}
+
+template<class FormattedOutputFunction, class InputIterator1, class InputIterator2, typename BinaryPredicate>
+void test_all_with_impl(FormattedOutputFunction& output,
+ char const * file, int line, char const * function,
+ InputIterator1 first_begin, InputIterator1 first_end,
+ InputIterator2 second_begin, InputIterator2 second_end,
+ BinaryPredicate predicate)
+{
+ InputIterator1 first_it = first_begin;
+ InputIterator2 second_it = second_begin;
+ typename std::iterator_traits<InputIterator1>::difference_type first_index = 0;
+ typename std::iterator_traits<InputIterator2>::difference_type second_index = 0;
+ std::size_t error_count = 0;
+ const std::size_t max_count = 8;
+ do
+ {
+ while ((first_it != first_end) && (second_it != second_end) && predicate(*first_it, *second_it))
+ {
+ ++first_it;
+ ++second_it;
+ ++first_index;
+ ++second_index;
+ }
+ if ((first_it == first_end) || (second_it == second_end))
+ {
+ break; // do-while
+ }
+ if (error_count == 0)
+ {
+ output << file << "(" << line << "): Container contents differ in function '" << function << "':";
+ }
+ else if (error_count >= max_count)
+ {
+ output << " ...";
+ break;
+ }
+ output << " [" << first_index << "]";
+ ++first_it;
+ ++second_it;
+ ++first_index;
+ ++second_index;
+ ++error_count;
+ } while (first_it != first_end);
+
+ first_index += std::distance(first_it, first_end);
+ second_index += std::distance(second_it, second_end);
+ if (first_index != second_index)
+ {
+ if (error_count == 0)
+ {
+ output << file << "(" << line << "): Container sizes differ in function '" << function << "': size(" << first_index << ") != size(" << second_index << ")";
+ }
+ else
+ {
+ output << " [*] size(" << first_index << ") != size(" << second_index << ")";
+ }
+ ++error_count;
+ }
+
+ if (error_count == 0)
+ {
+ test_results();
+ }
+ else
+ {
+ output << std::endl;
+ ++test_results().errors();
+ }
+}
+
+#if defined(_MSC_VER)
+# pragma warning(pop)
+#elif defined(__clang__) && defined(__has_warning)
+# if __has_warning("-Wsign-compare")
+# pragma clang diagnostic pop
+# endif
+#elif defined(__GNUC__) && !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 406
+# pragma GCC diagnostic pop
+#endif
+
+} // namespace detail
+
+inline int report_errors()
+{
+ boost::detail::test_result& result = boost::detail::test_results();
+ result.done();
+
+ int errors = result.errors();
+ if( errors == 0 )
+ {
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << "No errors detected." << std::endl;
+ return 0;
+ }
+ else
+ {
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << errors << " error" << (errors == 1? "": "s") << " detected." << std::endl;
+ return 1;
+ }
+}
+
+} // namespace boost
+
+#define BOOST_TEST(expr) ((expr)? (void)::boost::detail::test_results(): ::boost::detail::test_failed_impl(#expr, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION))
+#define BOOST_TEST_NOT(expr) BOOST_TEST(!(expr))
+
+#define BOOST_ERROR(msg) ( ::boost::detail::error_impl(msg, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
+
+#define BOOST_TEST_EQ(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_eq(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
+#define BOOST_TEST_NE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_ne(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
+
+#define BOOST_TEST_LT(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_lt(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
+#define BOOST_TEST_LE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_le(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
+#define BOOST_TEST_GT(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_gt(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
+#define BOOST_TEST_GE(expr1,expr2) ( ::boost::detail::test_with_impl(::boost::detail::lw_test_ge(), #expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
+
+#define BOOST_TEST_CSTR_EQ(expr1,expr2) ( ::boost::detail::test_cstr_eq_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
+#define BOOST_TEST_CSTR_NE(expr1,expr2) ( ::boost::detail::test_cstr_ne_impl(#expr1, #expr2, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, expr1, expr2) )
+
+#define BOOST_TEST_ALL_EQ(begin1, end1, begin2, end2) ( ::boost::detail::test_all_eq_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2) )
+#define BOOST_TEST_ALL_WITH(begin1, end1, begin2, end2, predicate) ( ::boost::detail::test_all_with_impl(BOOST_LIGHTWEIGHT_TEST_OSTREAM, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION, begin1, end1, begin2, end2, predicate) )
+
+#ifndef BOOST_NO_EXCEPTIONS
+ #define BOOST_TEST_THROWS( EXPR, EXCEP ) \
+ try { \
+ EXPR; \
+ ::boost::detail::throw_failed_impl \
+ (#EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
+ } \
+ catch(EXCEP const&) { \
+ ::boost::detail::test_results(); \
+ } \
+ catch(...) { \
+ ::boost::detail::throw_failed_impl \
+ (#EXCEP, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION); \
+ } \
+ //
+#else
+ #define BOOST_TEST_THROWS( EXPR, EXCEP )
+#endif
+
+#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_HPP
diff --git a/src/third_party/boost-1.69.0/boost/core/lightweight_test_trait.hpp b/src/third_party/boost-1.69.0/boost/core/lightweight_test_trait.hpp
new file mode 100644
index 00000000000..13aa3f0335e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/core/lightweight_test_trait.hpp
@@ -0,0 +1,56 @@
+#ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
+#define BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+// boost/core/lightweight_test_trait.hpp
+//
+// BOOST_TEST_TRAIT_TRUE, BOOST_TEST_TRAIT_FALSE
+//
+// Copyright 2014 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/core/lightweight_test.hpp>
+#include <boost/core/typeinfo.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+template< class T > inline void test_trait_impl( char const * trait, void (*)( T ),
+ bool expected, char const * file, int line, char const * function )
+{
+ if( T::value == expected )
+ {
+ test_results();
+ }
+ else
+ {
+ BOOST_LIGHTWEIGHT_TEST_OSTREAM
+ << file << "(" << line << "): predicate '" << trait << "' ["
+ << boost::core::demangled_name( BOOST_CORE_TYPEID(T) ) << "]"
+ << " test failed in function '" << function
+ << "' (should have been " << ( expected? "true": "false" ) << ")"
+ << std::endl;
+
+ ++test_results().errors();
+ }
+}
+
+} // namespace detail
+
+} // namespace boost
+
+#define BOOST_TEST_TRAIT_TRUE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, true, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
+#define BOOST_TEST_TRAIT_FALSE(type) ( ::boost::detail::test_trait_impl(#type, (void(*)type)0, false, __FILE__, __LINE__, BOOST_CURRENT_FUNCTION) )
+
+#endif // #ifndef BOOST_CORE_LIGHTWEIGHT_TEST_TRAIT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/no_exceptions_support.hpp b/src/third_party/boost-1.69.0/boost/core/no_exceptions_support.hpp
index e2453d084ba..e2453d084ba 100644
--- a/src/third_party/boost-1.68.0/boost/core/no_exceptions_support.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/no_exceptions_support.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/noncopyable.hpp b/src/third_party/boost-1.69.0/boost/core/noncopyable.hpp
new file mode 100644
index 00000000000..4a4f8baba5d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/core/noncopyable.hpp
@@ -0,0 +1,63 @@
+// Boost noncopyable.hpp header file --------------------------------------//
+
+// (C) Copyright Beman Dawes 1999-2003. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/utility for documentation.
+
+#ifndef BOOST_CORE_NONCOPYABLE_HPP
+#define BOOST_CORE_NONCOPYABLE_HPP
+
+#include <boost/config.hpp>
+
+namespace boost {
+
+// Private copy constructor and copy assignment ensure classes derived from
+// class noncopyable cannot be copied.
+
+// Contributed by Dave Abrahams
+
+namespace noncopyable_ // protection from unintended ADL
+{
+#ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+#define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+
+// noncopyable derives from base_token to enable Type Traits to detect
+// whether a type derives from noncopyable without needing the definition
+// of noncopyable itself.
+//
+// The definition of base_token is macro-guarded so that Type Trais can
+// define it locally without including this header, to avoid a dependency
+// on Core.
+
+ struct base_token {};
+
+#endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+
+ class noncopyable: base_token
+ {
+ protected:
+#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
+ BOOST_CONSTEXPR noncopyable() = default;
+ ~noncopyable() = default;
+#else
+ noncopyable() {}
+ ~noncopyable() {}
+#endif
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+ noncopyable( const noncopyable& ) = delete;
+ noncopyable& operator=( const noncopyable& ) = delete;
+#else
+ private: // emphasize the following members are private
+ noncopyable( const noncopyable& );
+ noncopyable& operator=( const noncopyable& );
+#endif
+ };
+}
+
+typedef noncopyable_::noncopyable noncopyable;
+
+} // namespace boost
+
+#endif // BOOST_CORE_NONCOPYABLE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/pointer_traits.hpp b/src/third_party/boost-1.69.0/boost/core/pointer_traits.hpp
index e0ebfb0769d..e0ebfb0769d 100644
--- a/src/third_party/boost-1.68.0/boost/core/pointer_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/pointer_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/ref.hpp b/src/third_party/boost-1.69.0/boost/core/ref.hpp
new file mode 100644
index 00000000000..77ef2b60862
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/core/ref.hpp
@@ -0,0 +1,302 @@
+#ifndef BOOST_CORE_REF_HPP
+#define BOOST_CORE_REF_HPP
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+#include <boost/config/workaround.hpp>
+#include <boost/core/addressof.hpp>
+
+//
+// ref.hpp - ref/cref, useful helper functions
+//
+// Copyright (C) 1999, 2000 Jaakko Jarvi (jaakko.jarvi@cs.utu.fi)
+// Copyright (C) 2001, 2002 Peter Dimov
+// Copyright (C) 2002 David Abrahams
+//
+// Copyright (C) 2014 Glen Joseph Fernandes
+// (glenjofe@gmail.com)
+//
+// Copyright (C) 2014 Agustin Berge
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/core/doc/html/core/ref.html for documentation.
+//
+
+/**
+ @file
+*/
+
+/**
+ Boost namespace.
+*/
+namespace boost
+{
+
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
+
+ struct ref_workaround_tag {};
+
+#endif
+
+// reference_wrapper
+
+/**
+ @brief Contains a reference to an object of type `T`.
+
+ `reference_wrapper` is primarily used to "feed" references to
+ function templates (algorithms) that take their parameter by
+ value. It provides an implicit conversion to `T&`, which
+ usually allows the function templates to work on references
+ unmodified.
+*/
+template<class T> class reference_wrapper
+{
+public:
+ /**
+ Type `T`.
+ */
+ typedef T type;
+
+ /**
+ Constructs a `reference_wrapper` object that stores a
+ reference to `t`.
+
+ @remark Does not throw.
+ */
+ BOOST_FORCEINLINE explicit reference_wrapper(T& t): t_(boost::addressof(t)) {}
+
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
+
+ BOOST_FORCEINLINE explicit reference_wrapper( T & t, ref_workaround_tag ): t_( boost::addressof( t ) ) {}
+
+#endif
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ /**
+ @remark Construction from a temporary object is disabled.
+ */
+ BOOST_DELETED_FUNCTION(reference_wrapper(T&& t))
+public:
+#endif
+
+ /**
+ @return The stored reference.
+ @remark Does not throw.
+ */
+ BOOST_FORCEINLINE operator T& () const { return *t_; }
+
+ /**
+ @return The stored reference.
+ @remark Does not throw.
+ */
+ BOOST_FORCEINLINE T& get() const { return *t_; }
+
+ /**
+ @return A pointer to the object referenced by the stored
+ reference.
+ @remark Does not throw.
+ */
+ BOOST_FORCEINLINE T* get_pointer() const { return t_; }
+
+private:
+
+ T* t_;
+};
+
+// ref
+
+/**
+ @cond
+*/
+#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) )
+# define BOOST_REF_CONST
+#else
+# define BOOST_REF_CONST const
+#endif
+/**
+ @endcond
+*/
+
+/**
+ @return `reference_wrapper<T>(t)`
+ @remark Does not throw.
+*/
+template<class T> BOOST_FORCEINLINE reference_wrapper<T> BOOST_REF_CONST ref( T & t )
+{
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1600 )
+
+ return reference_wrapper<T>( t, ref_workaround_tag() );
+
+#else
+
+ return reference_wrapper<T>( t );
+
+#endif
+}
+
+// cref
+
+/**
+ @return `reference_wrapper<T const>(t)`
+ @remark Does not throw.
+*/
+template<class T> BOOST_FORCEINLINE reference_wrapper<T const> BOOST_REF_CONST cref( T const & t )
+{
+ return reference_wrapper<T const>(t);
+}
+
+#undef BOOST_REF_CONST
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+/**
+ @cond
+*/
+#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+# define BOOST_REF_DELETE
+#else
+# define BOOST_REF_DELETE = delete
+#endif
+/**
+ @endcond
+*/
+
+/**
+ @remark Construction from a temporary object is disabled.
+*/
+template<class T> void ref(T const&&) BOOST_REF_DELETE;
+
+/**
+ @remark Construction from a temporary object is disabled.
+*/
+template<class T> void cref(T const&&) BOOST_REF_DELETE;
+
+#undef BOOST_REF_DELETE
+
+#endif
+
+// is_reference_wrapper
+
+/**
+ @brief Determine if a type `T` is an instantiation of
+ `reference_wrapper`.
+
+ The value static constant will be true if the type `T` is a
+ specialization of `reference_wrapper`.
+*/
+template<typename T> struct is_reference_wrapper
+{
+ BOOST_STATIC_CONSTANT( bool, value = false );
+};
+
+/**
+ @cond
+*/
+template<typename T> struct is_reference_wrapper< reference_wrapper<T> >
+{
+ BOOST_STATIC_CONSTANT( bool, value = true );
+};
+
+#if !defined(BOOST_NO_CV_SPECIALIZATIONS)
+
+template<typename T> struct is_reference_wrapper< reference_wrapper<T> const >
+{
+ BOOST_STATIC_CONSTANT( bool, value = true );
+};
+
+template<typename T> struct is_reference_wrapper< reference_wrapper<T> volatile >
+{
+ BOOST_STATIC_CONSTANT( bool, value = true );
+};
+
+template<typename T> struct is_reference_wrapper< reference_wrapper<T> const volatile >
+{
+ BOOST_STATIC_CONSTANT( bool, value = true );
+};
+
+#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS)
+
+/**
+ @endcond
+*/
+
+
+// unwrap_reference
+
+/**
+ @brief Find the type in a `reference_wrapper`.
+
+ The `typedef` type is `T::type` if `T` is a
+ `reference_wrapper`, `T` otherwise.
+*/
+template<typename T> struct unwrap_reference
+{
+ typedef T type;
+};
+
+/**
+ @cond
+*/
+template<typename T> struct unwrap_reference< reference_wrapper<T> >
+{
+ typedef T type;
+};
+
+#if !defined(BOOST_NO_CV_SPECIALIZATIONS)
+
+template<typename T> struct unwrap_reference< reference_wrapper<T> const >
+{
+ typedef T type;
+};
+
+template<typename T> struct unwrap_reference< reference_wrapper<T> volatile >
+{
+ typedef T type;
+};
+
+template<typename T> struct unwrap_reference< reference_wrapper<T> const volatile >
+{
+ typedef T type;
+};
+
+#endif // !defined(BOOST_NO_CV_SPECIALIZATIONS)
+
+/**
+ @endcond
+*/
+
+// unwrap_ref
+
+/**
+ @return `unwrap_reference<T>::type&(t)`
+ @remark Does not throw.
+*/
+template<class T> BOOST_FORCEINLINE typename unwrap_reference<T>::type& unwrap_ref( T & t )
+{
+ return t;
+}
+
+// get_pointer
+
+/**
+ @cond
+*/
+template<class T> BOOST_FORCEINLINE T* get_pointer( reference_wrapper<T> const & r )
+{
+ return r.get_pointer();
+}
+/**
+ @endcond
+*/
+
+} // namespace boost
+
+#endif // #ifndef BOOST_CORE_REF_HPP
diff --git a/src/third_party/boost-1.68.0/boost/core/scoped_enum.hpp b/src/third_party/boost-1.69.0/boost/core/scoped_enum.hpp
index 56dd0ede439..56dd0ede439 100644
--- a/src/third_party/boost-1.68.0/boost/core/scoped_enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/core/scoped_enum.hpp
diff --git a/src/third_party/boost-1.69.0/boost/core/swap.hpp b/src/third_party/boost-1.69.0/boost/core/swap.hpp
new file mode 100644
index 00000000000..eff6b978df4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/core/swap.hpp
@@ -0,0 +1,67 @@
+// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// For more information, see http://www.boost.org
+
+
+#ifndef BOOST_CORE_SWAP_HPP
+#define BOOST_CORE_SWAP_HPP
+
+// Note: the implementation of this utility contains various workarounds:
+// - swap_impl is put outside the boost namespace, to avoid infinite
+// recursion (causing stack overflow) when swapping objects of a primitive
+// type.
+// - swap_impl has a using-directive, rather than a using-declaration,
+// because some compilers (including MSVC 7.1, Borland 5.9.3, and
+// Intel 8.1) don't do argument-dependent lookup when it has a
+// using-declaration instead.
+// - boost::swap has two template arguments, instead of one, to
+// avoid ambiguity when swapping objects of a Boost type that does
+// not have its own boost::swap overload.
+
+#include <boost/core/enable_if.hpp>
+#include <boost/config.hpp>
+#include <utility> //for std::swap (C++11)
+#include <algorithm> //for std::swap (C++98)
+#include <cstddef> //for std::size_t
+
+namespace boost_swap_impl
+{
+ // we can't use type_traits here
+
+ template<class T> struct is_const { enum _vt { value = 0 }; };
+ template<class T> struct is_const<T const> { enum _vt { value = 1 }; };
+
+ template<class T>
+ BOOST_GPU_ENABLED
+ void swap_impl(T& left, T& right)
+ {
+ using namespace std;//use std::swap if argument dependent lookup fails
+ swap(left,right);
+ }
+
+ template<class T, std::size_t N>
+ BOOST_GPU_ENABLED
+ void swap_impl(T (& left)[N], T (& right)[N])
+ {
+ for (std::size_t i = 0; i < N; ++i)
+ {
+ ::boost_swap_impl::swap_impl(left[i], right[i]);
+ }
+ }
+}
+
+namespace boost
+{
+ template<class T1, class T2>
+ BOOST_GPU_ENABLED
+ typename enable_if_c< !boost_swap_impl::is_const<T1>::value && !boost_swap_impl::is_const<T2>::value >::type
+ swap(T1& left, T2& right)
+ {
+ ::boost_swap_impl::swap_impl(left, right);
+ }
+}
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/core/typeinfo.hpp b/src/third_party/boost-1.69.0/boost/core/typeinfo.hpp
new file mode 100644
index 00000000000..a272596a82c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/core/typeinfo.hpp
@@ -0,0 +1,167 @@
+#ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED
+#define BOOST_CORE_TYPEINFO_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// core::typeinfo, BOOST_CORE_TYPEID
+//
+// Copyright 2007, 2014 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/config.hpp>
+
+#if defined( BOOST_NO_TYPEID )
+
+#include <boost/current_function.hpp>
+#include <functional>
+#include <cstring>
+
+namespace boost
+{
+
+namespace core
+{
+
+class typeinfo
+{
+private:
+
+ typeinfo( typeinfo const& );
+ typeinfo& operator=( typeinfo const& );
+
+ char const * name_;
+ void (*lib_id_)();
+
+public:
+
+ typeinfo( char const * name, void (*lib_id)() ): name_( name ), lib_id_( lib_id )
+ {
+ }
+
+ bool operator==( typeinfo const& rhs ) const
+ {
+#if ( defined(_WIN32) || defined(__CYGWIN__) ) && defined(__GNUC__) && !defined(BOOST_DISABLE_CURRENT_FUNCTION)
+
+ return lib_id_ == rhs.lib_id_? this == &rhs: std::strcmp( name_, rhs.name_ ) == 0;
+
+#else
+
+ return this == &rhs;
+
+#endif
+ }
+
+ bool operator!=( typeinfo const& rhs ) const
+ {
+ return !( *this == rhs );
+ }
+
+ bool before( typeinfo const& rhs ) const
+ {
+#if ( defined(_WIN32) || defined(__CYGWIN__) ) && defined(__GNUC__) && !defined(BOOST_DISABLE_CURRENT_FUNCTION)
+
+ return lib_id_ == rhs.lib_id_? std::less< typeinfo const* >()( this, &rhs ): std::strcmp( name_, rhs.name_ ) < 0;
+
+#else
+
+ return std::less< typeinfo const* >()( this, &rhs );
+
+#endif
+ }
+
+ char const* name() const
+ {
+ return name_;
+ }
+};
+
+inline char const * demangled_name( core::typeinfo const & ti )
+{
+ return ti.name();
+}
+
+} // namespace core
+
+namespace detail
+{
+
+template<class T> struct BOOST_SYMBOL_VISIBLE core_typeid_
+{
+ static boost::core::typeinfo ti_;
+
+ static char const * name()
+ {
+ return BOOST_CURRENT_FUNCTION;
+ }
+};
+
+BOOST_SYMBOL_VISIBLE inline void core_typeid_lib_id()
+{
+}
+
+template<class T> boost::core::typeinfo core_typeid_< T >::ti_( core_typeid_< T >::name(), &core_typeid_lib_id );
+
+template<class T> struct core_typeid_< T & >: core_typeid_< T >
+{
+};
+
+template<class T> struct core_typeid_< T const >: core_typeid_< T >
+{
+};
+
+template<class T> struct core_typeid_< T volatile >: core_typeid_< T >
+{
+};
+
+template<class T> struct core_typeid_< T const volatile >: core_typeid_< T >
+{
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#define BOOST_CORE_TYPEID(T) (boost::detail::core_typeid_<T>::ti_)
+
+#else
+
+#include <boost/core/demangle.hpp>
+#include <typeinfo>
+
+namespace boost
+{
+
+namespace core
+{
+
+#if defined( BOOST_NO_STD_TYPEINFO )
+
+typedef ::type_info typeinfo;
+
+#else
+
+typedef std::type_info typeinfo;
+
+#endif
+
+inline std::string demangled_name( core::typeinfo const & ti )
+{
+ return core::demangle( ti.name() );
+}
+
+} // namespace core
+
+} // namespace boost
+
+#define BOOST_CORE_TYPEID(T) typeid(T)
+
+#endif
+
+#endif // #ifndef BOOST_CORE_TYPEINFO_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/all.hpp b/src/third_party/boost-1.69.0/boost/coroutine/all.hpp
index 42f63a0a731..42f63a0a731 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/all.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/all.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/asymmetric_coroutine.hpp b/src/third_party/boost-1.69.0/boost/coroutine/asymmetric_coroutine.hpp
index 7a0ddf277f8..7a0ddf277f8 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/asymmetric_coroutine.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/asymmetric_coroutine.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/attributes.hpp b/src/third_party/boost-1.69.0/boost/coroutine/attributes.hpp
index ca712ee68d0..ca712ee68d0 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/attributes.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/attributes.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/coroutine.hpp b/src/third_party/boost-1.69.0/boost/coroutine/coroutine.hpp
index 076ffd26eaa..076ffd26eaa 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/coroutine.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/coroutine.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/config.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/config.hpp
index 12632bbf7b5..12632bbf7b5 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/coroutine_context.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/coroutine_context.hpp
index 2d2b60ace26..2d2b60ace26 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/coroutine_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/coroutine_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/data.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/data.hpp
index 7c008fe831b..7c008fe831b 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/data.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/data.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/flags.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/flags.hpp
index 2078b62362a..2078b62362a 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/flags.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/flags.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/parameters.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/parameters.hpp
index 8bad3910a9d..8bad3910a9d 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/parameters.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/parameters.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/preallocated.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/preallocated.hpp
index 1658561ac8a..1658561ac8a 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/preallocated.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/preallocated.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_impl.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_impl.hpp
index e35b7894e2e..e35b7894e2e 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_object.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_object.hpp
index 36918489def..36918489def 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp
index 313de3c2dd0..313de3c2dd0 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/pull_coroutine_synthesized.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_impl.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_impl.hpp
index 21c1df469ea..21c1df469ea 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_object.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_object.hpp
index c3115ebe114..c3115ebe114 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_synthesized.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_synthesized.hpp
index c10a468b9ba..c10a468b9ba 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/push_coroutine_synthesized.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/push_coroutine_synthesized.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/setup.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/setup.hpp
index 35f601a7793..35f601a7793 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/setup.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/setup.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_call.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_call.hpp
index 3a9e4e6f9f3..3a9e4e6f9f3 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_call.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_call.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp
index b4066d8f78b..b4066d8f78b 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_object.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_object.hpp
index a19cd922322..a19cd922322 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp
index 296676b6f98..296676b6f98 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/symmetric_coroutine_yield.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline.hpp
index eb0c6c23783..eb0c6c23783 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline_pull.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_pull.hpp
index 1daa76db3b0..1daa76db3b0 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline_pull.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_pull.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline_push.hpp b/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_push.hpp
index 80f90d05183..80f90d05183 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/detail/trampoline_push.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/detail/trampoline_push.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/exceptions.hpp b/src/third_party/boost-1.69.0/boost/coroutine/exceptions.hpp
index 5dbd55f106a..5dbd55f106a 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/exceptions.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/exceptions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/flags.hpp b/src/third_party/boost-1.69.0/boost/coroutine/flags.hpp
index 81940f30e5a..81940f30e5a 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/flags.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/flags.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/posix/protected_stack_allocator.hpp b/src/third_party/boost-1.69.0/boost/coroutine/posix/protected_stack_allocator.hpp
index 649248b57da..649248b57da 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/posix/protected_stack_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/posix/protected_stack_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/posix/segmented_stack_allocator.hpp b/src/third_party/boost-1.69.0/boost/coroutine/posix/segmented_stack_allocator.hpp
index 49cee28cd24..49cee28cd24 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/posix/segmented_stack_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/posix/segmented_stack_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/protected_stack_allocator.hpp b/src/third_party/boost-1.69.0/boost/coroutine/protected_stack_allocator.hpp
index 268786fec41..268786fec41 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/protected_stack_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/protected_stack_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/segmented_stack_allocator.hpp b/src/third_party/boost-1.69.0/boost/coroutine/segmented_stack_allocator.hpp
index f9525a1a5ee..f9525a1a5ee 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/segmented_stack_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/segmented_stack_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/stack_allocator.hpp b/src/third_party/boost-1.69.0/boost/coroutine/stack_allocator.hpp
index 662533efe7b..662533efe7b 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/stack_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/stack_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/stack_context.hpp b/src/third_party/boost-1.69.0/boost/coroutine/stack_context.hpp
index 433056f7a14..433056f7a14 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/stack_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/stack_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/stack_traits.hpp b/src/third_party/boost-1.69.0/boost/coroutine/stack_traits.hpp
index 0e8f25182d8..0e8f25182d8 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/stack_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/stack_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/standard_stack_allocator.hpp b/src/third_party/boost-1.69.0/boost/coroutine/standard_stack_allocator.hpp
index b946fffc4a7..b946fffc4a7 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/standard_stack_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/standard_stack_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/symmetric_coroutine.hpp b/src/third_party/boost-1.69.0/boost/coroutine/symmetric_coroutine.hpp
index cf11136f709..cf11136f709 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/symmetric_coroutine.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/symmetric_coroutine.hpp
diff --git a/src/third_party/boost-1.68.0/boost/coroutine/windows/protected_stack_allocator.hpp b/src/third_party/boost-1.69.0/boost/coroutine/windows/protected_stack_allocator.hpp
index 29e19babb7e..29e19babb7e 100644
--- a/src/third_party/boost-1.68.0/boost/coroutine/windows/protected_stack_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/coroutine/windows/protected_stack_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/cregex.hpp b/src/third_party/boost-1.69.0/boost/cregex.hpp
index b7a918eb8ed..b7a918eb8ed 100644
--- a/src/third_party/boost-1.68.0/boost/cregex.hpp
+++ b/src/third_party/boost-1.69.0/boost/cregex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/cstdint.hpp b/src/third_party/boost-1.69.0/boost/cstdint.hpp
index c8474c4623a..c8474c4623a 100644
--- a/src/third_party/boost-1.68.0/boost/cstdint.hpp
+++ b/src/third_party/boost-1.69.0/boost/cstdint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/cstdlib.hpp b/src/third_party/boost-1.69.0/boost/cstdlib.hpp
index 63221463542..63221463542 100644
--- a/src/third_party/boost-1.68.0/boost/cstdlib.hpp
+++ b/src/third_party/boost-1.69.0/boost/cstdlib.hpp
diff --git a/src/third_party/boost-1.68.0/boost/current_function.hpp b/src/third_party/boost-1.69.0/boost/current_function.hpp
index 86955cb041b..86955cb041b 100644
--- a/src/third_party/boost-1.68.0/boost/current_function.hpp
+++ b/src/third_party/boost-1.69.0/boost/current_function.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time.hpp b/src/third_party/boost-1.69.0/boost/date_time.hpp
index 51628cd3288..51628cd3288 100644
--- a/src/third_party/boost-1.68.0/boost/date_time.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/adjust_functors.hpp b/src/third_party/boost-1.69.0/boost/date_time/adjust_functors.hpp
index ec2a707659b..ec2a707659b 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/adjust_functors.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/adjust_functors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/c_local_time_adjustor.hpp b/src/third_party/boost-1.69.0/boost/date_time/c_local_time_adjustor.hpp
index 9170aa6687b..9170aa6687b 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/c_local_time_adjustor.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/c_local_time_adjustor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/c_time.hpp b/src/third_party/boost-1.69.0/boost/date_time/c_time.hpp
index 0b07a1b283b..0b07a1b283b 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/c_time.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/c_time.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/compiler_config.hpp b/src/third_party/boost-1.69.0/boost/date_time/compiler_config.hpp
new file mode 100644
index 00000000000..5dfb863f141
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/date_time/compiler_config.hpp
@@ -0,0 +1,174 @@
+#ifndef DATE_TIME_COMPILER_CONFIG_HPP___
+#define DATE_TIME_COMPILER_CONFIG_HPP___
+
+/* Copyright (c) 2002-2004 CrystalClear Software, Inc.
+ * Subject to the Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+ * Author: Jeff Garland, Bart Garst
+ * $Date$
+ */
+
+#include <cstdlib>
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+// With boost release 1.33, date_time will be using a different,
+// more flexible, IO system. This new system is not compatible with
+// old compilers. The original date_time IO system remains for those
+// compilers. They must define this macro to use the legacy IO.
+// (defined(__BORLANDC__) && (__BORLANDC__ <= 0x0581) ) ) &&
+ #if( BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) \
+ || BOOST_WORKAROUND( __GNUC__, < 3) \
+ || (BOOST_WORKAROUND( _MSC_VER, <= 1300) ) \
+ ) \
+ && !defined(USE_DATE_TIME_PRE_1_33_FACET_IO)
+# define USE_DATE_TIME_PRE_1_33_FACET_IO
+#endif
+
+
+// This file performs some local compiler configurations
+
+#include <boost/date_time/locale_config.hpp> //set up locale configurations
+
+//Set up a configuration parameter for platforms that have
+//GetTimeOfDay
+#if defined(BOOST_HAS_GETTIMEOFDAY) || defined(BOOST_HAS_FTIME)
+#define BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK
+#endif
+
+// To Force no default constructors for date & ptime, un-comment following
+//#define DATE_TIME_NO_DEFAULT_CONSTRUCTOR
+
+// Include extensions to date_duration - comment out to remove this feature
+#define BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
+// these extensions are known to cause problems with gcc295
+#if defined(__GNUC__) && (__GNUC__ < 3)
+#undef BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
+#endif
+
+#if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) || BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) )
+#define BOOST_DATE_TIME_NO_MEMBER_INIT
+#endif
+
+// include these types before we try to re-define them
+#include <boost/cstdint.hpp>
+
+//Define INT64_C for compilers that don't have it
+#if (!defined(INT64_C))
+#define INT64_C(value) int64_t(value)
+#endif
+
+
+/* Workaround for Borland iterator error. Error was "Cannot convert 'istream *' to 'wistream *' in function istream_iterator<>::istream_iterator() */
+#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_RW_LIB)
+#define BOOST_DATE_TIME_NO_WISTREAM_ITERATOR
+#endif
+
+
+// Borland v5.64 does not have the following in std namespace; v5.5.1 does
+#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_STLPORT)
+#include <locale>
+namespace std {
+ using stlport::tolower;
+ using stlport::ctype;
+ using stlport::use_facet;
+}
+#endif
+
+// workaround for errors associated with output for date classes
+// modifications and input streaming for time classes.
+// Compilers affected are:
+// gcc295, msvc (neither with STLPort), any borland
+//
+#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \
+ (defined(_MSC_VER) && (_MSC_VER < 1300)) ) && \
+ !defined(_STLP_OWN_IOSTREAMS) ) || \
+ BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) )
+#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
+#endif
+
+// The macro marks up places where compiler complains for missing return statement or
+// uninitialized variables after calling to boost::throw_exception.
+// BOOST_UNREACHABLE_RETURN doesn't work since even compilers that support
+// unreachable statements detection emit such warnings.
+#if defined(_MSC_VER)
+// Use special MSVC extension to markup unreachable code
+# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) __assume(false)
+#elif !defined(BOOST_NO_UNREACHABLE_RETURN_DETECTION)
+// Call to a non-returning function should suppress the warning
+# if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std {
+ using ::abort;
+}
+# endif // defined(BOOST_NO_STDC_NAMESPACE)
+# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) std::abort()
+#else
+// For other poor compilers the specified expression is compiled. Usually, this would be a return statement.
+# define BOOST_DATE_TIME_UNREACHABLE_EXPRESSION(x) x
+#endif
+
+/* The following handles the definition of the necessary macros
+ * for dll building on Win32 platforms.
+ *
+ * For code that will be placed in the date_time .dll,
+ * it must be properly prefixed with BOOST_DATE_TIME_DECL.
+ * The corresponding .cpp file must have BOOST_DATE_TIME_SOURCE
+ * defined before including its header. For examples see:
+ * greg_month.hpp & greg_month.cpp
+ *
+ */
+
+// we need to import/export our code only if the user has specifically
+// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
+// libraries to be dynamically linked, or BOOST_DATE_TIME_DYN_LINK
+// if they want just this one to be dynamically liked:
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
+ // export if this is our own source, otherwise import:
+# ifdef BOOST_DATE_TIME_SOURCE
+# define BOOST_DATE_TIME_DECL BOOST_SYMBOL_EXPORT
+# else
+# define BOOST_DATE_TIME_DECL BOOST_SYMBOL_IMPORT
+# endif // BOOST_DATE_TIME_SOURCE
+#endif // DYN_LINK
+//
+// if BOOST_WHATEVER_DECL isn't defined yet define it now:
+#ifndef BOOST_DATE_TIME_DECL
+# define BOOST_DATE_TIME_DECL
+#endif
+
+//
+// Automatically link to the correct build variant where possible.
+//
+#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_DATE_TIME_NO_LIB) && !defined(BOOST_DATE_TIME_SOURCE)
+//
+// Set the name of our library, this will get undef'ed by auto_link.hpp
+// once it's done with it:
+//
+#define BOOST_LIB_NAME boost_date_time
+//
+// If we're importing code from a dll, then tell auto_link.hpp about it:
+//
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_DATE_TIME_DYN_LINK)
+# define BOOST_DYN_LINK
+#endif
+//
+// And include the header that does the work:
+//
+#include <boost/config/auto_link.hpp>
+#endif // auto-linking disabled
+
+#if defined(BOOST_HAS_THREADS)
+# if defined(_MSC_VER) || defined(__MWERKS__) || defined(__MINGW32__) || defined(__BORLANDC__)
+ //no reentrant posix functions (eg: localtime_r)
+# elif (!defined(__hpux) || (defined(__hpux) && defined(_REENTRANT)))
+# define BOOST_DATE_TIME_HAS_REENTRANT_STD_FUNCTIONS
+# endif
+#endif
+
+#if defined(BOOST_NO_CXX11_NULLPTR)
+# define BOOST_DATE_TIME_NULLPTR 0
+#else
+# define BOOST_DATE_TIME_NULLPTR nullptr
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/date_time/constrained_value.hpp b/src/third_party/boost-1.69.0/boost/date_time/constrained_value.hpp
index b1122d76d84..b1122d76d84 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/constrained_value.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/constrained_value.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date.hpp b/src/third_party/boost-1.69.0/boost/date_time/date.hpp
index 18333fd3ffe..18333fd3ffe 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_clock_device.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_clock_device.hpp
index 2145d65fd54..2145d65fd54 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_clock_device.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_clock_device.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_defs.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_defs.hpp
index 6c80db3a83d..6c80db3a83d 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_defs.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_defs.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_duration.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_duration.hpp
index 82c75b42a0b..82c75b42a0b 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_duration.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_duration.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_duration_types.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_duration_types.hpp
index 7271d0191ae..7271d0191ae 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_duration_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_duration_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_facet.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_facet.hpp
index df7d53b6c9d..df7d53b6c9d 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_facet.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_facet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_format_simple.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_format_simple.hpp
index 452990379b2..452990379b2 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_format_simple.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_format_simple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_formatting.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_formatting.hpp
index c1b69a8c798..c1b69a8c798 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_formatting.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_formatting.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_formatting_limited.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_formatting_limited.hpp
index 7c5c1735a34..7c5c1735a34 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_formatting_limited.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_formatting_limited.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_formatting_locales.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_formatting_locales.hpp
index a1daad33ae7..a1daad33ae7 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_formatting_locales.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_formatting_locales.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_generator_formatter.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_generator_formatter.hpp
index 42c396b2c03..42c396b2c03 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_generator_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_generator_formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_generator_parser.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_generator_parser.hpp
index f4d7b27a79e..f4d7b27a79e 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_generator_parser.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_generator_parser.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_generators.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_generators.hpp
index 274ce1f06ab..274ce1f06ab 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_generators.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_generators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_iterator.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_iterator.hpp
index 3526ba18b48..3526ba18b48 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_names_put.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_names_put.hpp
index 20da2d2ed07..20da2d2ed07 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_names_put.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_names_put.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/date_parsing.hpp b/src/third_party/boost-1.69.0/boost/date_time/date_parsing.hpp
index 33c53660273..33c53660273 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/date_parsing.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/date_parsing.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/dst_rules.hpp b/src/third_party/boost-1.69.0/boost/date_time/dst_rules.hpp
index 73a98996d81..73a98996d81 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/dst_rules.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/dst_rules.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/dst_transition_generators.hpp b/src/third_party/boost-1.69.0/boost/date_time/dst_transition_generators.hpp
index 16c1fd63610..16c1fd63610 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/dst_transition_generators.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/dst_transition_generators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/filetime_functions.hpp b/src/third_party/boost-1.69.0/boost/date_time/filetime_functions.hpp
index f5ef7bfb5e5..f5ef7bfb5e5 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/filetime_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/filetime_functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/format_date_parser.hpp b/src/third_party/boost-1.69.0/boost/date_time/format_date_parser.hpp
index 0602e90f3f3..0602e90f3f3 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/format_date_parser.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/format_date_parser.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/conversion.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/conversion.hpp
index c844c4e34b1..c844c4e34b1 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/conversion.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/conversion.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/formatters.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters.hpp
index d486ef0f4c6..d486ef0f4c6 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/formatters.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/formatters_limited.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters_limited.hpp
index 755f5aa68bb..755f5aa68bb 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/formatters_limited.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/formatters_limited.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_calendar.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_calendar.hpp
index 16e47c1df4e..16e47c1df4e 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_calendar.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_calendar.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_date.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_date.hpp
index 4f56bedf1af..4f56bedf1af 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_date.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_date.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_day.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day.hpp
index 014abfbda08..014abfbda08 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_day.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_day_of_year.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day_of_year.hpp
index 3f753e1d6a1..3f753e1d6a1 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_day_of_year.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_day_of_year.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_duration.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration.hpp
index 3b1a4978186..3b1a4978186 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_duration.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_duration_types.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration_types.hpp
index e6611e680c8..e6611e680c8 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_duration_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_duration_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_facet.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_facet.hpp
index 5352df1398a..5352df1398a 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_facet.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_facet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_month.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_month.hpp
index be0f93e13b4..be0f93e13b4 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_month.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_month.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_serialize.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_serialize.hpp
index 6740a0c50f8..6740a0c50f8 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_serialize.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_serialize.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_weekday.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_weekday.hpp
index 815051ede48..815051ede48 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_weekday.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_weekday.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_year.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_year.hpp
index a278bdaa037..a278bdaa037 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_year.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_year.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_ymd.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_ymd.hpp
index 503666c31d8..503666c31d8 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/greg_ymd.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/greg_ymd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian.hpp
index 47d545eccd2..47d545eccd2 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian_io.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_io.hpp
index 49e5d41ed80..49e5d41ed80 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian_types.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_types.hpp
index d50e9cc7d78..d50e9cc7d78 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/gregorian_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/gregorian_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian/parsers.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian/parsers.hpp
index afc6537c3bf..afc6537c3bf 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian/parsers.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian/parsers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian_calendar.hpp b/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.hpp
index 0478592941e..0478592941e 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian_calendar.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/gregorian_calendar.ipp b/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.ipp
index 7b43ea85126..7b43ea85126 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/gregorian_calendar.ipp
+++ b/src/third_party/boost-1.69.0/boost/date_time/gregorian_calendar.ipp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/int_adapter.hpp b/src/third_party/boost-1.69.0/boost/date_time/int_adapter.hpp
index 6ee7712fab2..6ee7712fab2 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/int_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/int_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/iso_format.hpp b/src/third_party/boost-1.69.0/boost/date_time/iso_format.hpp
index 2e7942d8ba6..2e7942d8ba6 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/iso_format.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/iso_format.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/conversion.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/conversion.hpp
index aa0b72c6c4e..aa0b72c6c4e 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/conversion.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/conversion.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/custom_time_zone.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/custom_time_zone.hpp
index f82d87a7d7c..f82d87a7d7c 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/custom_time_zone.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/custom_time_zone.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/date_duration_operators.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/date_duration_operators.hpp
index e0f170fd7c9..e0f170fd7c9 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/date_duration_operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/date_duration_operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/dst_transition_day_rules.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/dst_transition_day_rules.hpp
index f372e44a45a..f372e44a45a 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/dst_transition_day_rules.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/dst_transition_day_rules.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/local_date_time.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/local_date_time.hpp
index e88a231b542..e88a231b542 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/local_date_time.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/local_date_time.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/local_time.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time.hpp
index 880989b6e7a..880989b6e7a 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/local_time.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/local_time_io.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_io.hpp
index c32b81e407d..c32b81e407d 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/local_time_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/local_time_types.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_types.hpp
index df2d08cb496..df2d08cb496 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/local_time_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/local_time_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/posix_time_zone.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/posix_time_zone.hpp
index 9c2c04ba416..9c2c04ba416 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/posix_time_zone.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/posix_time_zone.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time/tz_database.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time/tz_database.hpp
index 0c6fbbf9ea8..0c6fbbf9ea8 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time/tz_database.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time/tz_database.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_time_adjustor.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_time_adjustor.hpp
index 64134f3b285..64134f3b285 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_time_adjustor.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_time_adjustor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/local_timezone_defs.hpp b/src/third_party/boost-1.69.0/boost/date_time/local_timezone_defs.hpp
index 5564a110808..5564a110808 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/local_timezone_defs.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/local_timezone_defs.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/locale_config.hpp b/src/third_party/boost-1.69.0/boost/date_time/locale_config.hpp
index 26a928f7bcd..26a928f7bcd 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/locale_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/locale_config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/microsec_time_clock.hpp b/src/third_party/boost-1.69.0/boost/date_time/microsec_time_clock.hpp
index 42a918b53a6..42a918b53a6 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/microsec_time_clock.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/microsec_time_clock.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/parse_format_base.hpp b/src/third_party/boost-1.69.0/boost/date_time/parse_format_base.hpp
index d4b2f5975bf..d4b2f5975bf 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/parse_format_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/parse_format_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/period.hpp b/src/third_party/boost-1.69.0/boost/date_time/period.hpp
index 13011af2715..13011af2715 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/period.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/period.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/period_formatter.hpp b/src/third_party/boost-1.69.0/boost/date_time/period_formatter.hpp
index 96106128341..96106128341 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/period_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/period_formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/period_parser.hpp b/src/third_party/boost-1.69.0/boost/date_time/period_parser.hpp
index 83742348971..83742348971 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/period_parser.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/period_parser.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/conversion.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/conversion.hpp
index cdff4b76fd1..cdff4b76fd1 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/conversion.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/conversion.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/date_duration_operators.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/date_duration_operators.hpp
index f3c61d7a954..f3c61d7a954 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/date_duration_operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/date_duration_operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time.hpp
index aecf8a818d7..aecf8a818d7 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_config.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_config.hpp
index 996afcae595..996afcae595 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_duration.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_duration.hpp
new file mode 100644
index 00000000000..c69236faeb2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_duration.hpp
@@ -0,0 +1,91 @@
+#ifndef POSIX_TIME_DURATION_HPP___
+#define POSIX_TIME_DURATION_HPP___
+
+/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
+ * Use, modification and distribution is subject to the
+ * Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+ * Author: Jeff Garland
+ * $Date$
+ */
+
+#include <boost/core/enable_if.hpp>
+#include <boost/date_time/compiler_config.hpp>
+#include <boost/date_time/posix_time/posix_time_config.hpp>
+#include <boost/numeric/conversion/cast.hpp>
+#include <boost/type_traits/is_integral.hpp>
+
+namespace boost {
+namespace posix_time {
+
+ //! Allows expression of durations as an hour count
+ //! The argument must be an integral type
+ /*! \ingroup time_basics
+ */
+ class BOOST_SYMBOL_VISIBLE hours : public time_duration
+ {
+ public:
+ template <typename T>
+ explicit hours(T const& h,
+ typename boost::enable_if<boost::is_integral<T>, void>::type* = BOOST_DATE_TIME_NULLPTR) :
+ time_duration(numeric_cast<hour_type>(h), 0, 0)
+ {}
+ };
+
+ //! Allows expression of durations as a minute count
+ //! The argument must be an integral type
+ /*! \ingroup time_basics
+ */
+ class BOOST_SYMBOL_VISIBLE minutes : public time_duration
+ {
+ public:
+ template <typename T>
+ explicit minutes(T const& m,
+ typename boost::enable_if<boost::is_integral<T>, void>::type* = BOOST_DATE_TIME_NULLPTR) :
+ time_duration(0, numeric_cast<min_type>(m),0)
+ {}
+ };
+
+ //! Allows expression of durations as a seconds count
+ //! The argument must be an integral type
+ /*! \ingroup time_basics
+ */
+ class BOOST_SYMBOL_VISIBLE seconds : public time_duration
+ {
+ public:
+ template <typename T>
+ explicit seconds(T const& s,
+ typename boost::enable_if<boost::is_integral<T>, void>::type* = BOOST_DATE_TIME_NULLPTR) :
+ time_duration(0,0, numeric_cast<sec_type>(s))
+ {}
+ };
+
+
+ //! Allows expression of durations as milli seconds
+ /*! \ingroup time_basics
+ */
+ typedef date_time::subsecond_duration<time_duration,1000> millisec;
+ typedef date_time::subsecond_duration<time_duration,1000> milliseconds;
+
+ //! Allows expression of durations as micro seconds
+ /*! \ingroup time_basics
+ */
+ typedef date_time::subsecond_duration<time_duration,1000000> microsec;
+ typedef date_time::subsecond_duration<time_duration,1000000> microseconds;
+
+ //This is probably not needed anymore...
+#if defined(BOOST_DATE_TIME_HAS_NANOSECONDS)
+
+ //! Allows expression of durations as nano seconds
+ /*! \ingroup time_basics
+ */
+ typedef date_time::subsecond_duration<time_duration,1000000000> nanosec;
+ typedef date_time::subsecond_duration<time_duration,1000000000> nanoseconds;
+
+#endif
+
+} }//namespace posix_time
+
+
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_io.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_io.hpp
index 90b02a69197..90b02a69197 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_legacy_io.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_legacy_io.hpp
index b31fb987233..b31fb987233 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_legacy_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_legacy_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_system.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_system.hpp
index 84c21ca00f8..84c21ca00f8 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_system.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_system.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_types.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_types.hpp
index f2488f8bed6..f2488f8bed6 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/posix_time_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/posix_time_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/ptime.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/ptime.hpp
index c97edf9cfbf..c97edf9cfbf 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/ptime.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/ptime.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_formatters.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters.hpp
index ce195682287..ce195682287 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_formatters.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_formatters_limited.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters_limited.hpp
index c74fcfa0b03..c74fcfa0b03 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_formatters_limited.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_formatters_limited.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_parsers.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_parsers.hpp
index 24f20704aa1..24f20704aa1 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_parsers.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_parsers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_period.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_period.hpp
index 7c6095b8965..7c6095b8965 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_period.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_period.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_serialize.hpp b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_serialize.hpp
index 71f60b3741e..71f60b3741e 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/posix_time/time_serialize.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/posix_time/time_serialize.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/special_defs.hpp b/src/third_party/boost-1.69.0/boost/date_time/special_defs.hpp
index 5a757be1031..5a757be1031 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/special_defs.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/special_defs.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/special_values_formatter.hpp b/src/third_party/boost-1.69.0/boost/date_time/special_values_formatter.hpp
index c8653c1f485..c8653c1f485 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/special_values_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/special_values_formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/special_values_parser.hpp b/src/third_party/boost-1.69.0/boost/date_time/special_values_parser.hpp
index 43748c74cd4..43748c74cd4 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/special_values_parser.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/special_values_parser.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/string_convert.hpp b/src/third_party/boost-1.69.0/boost/date_time/string_convert.hpp
index 30be3567a52..30be3567a52 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/string_convert.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/string_convert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/string_parse_tree.hpp b/src/third_party/boost-1.69.0/boost/date_time/string_parse_tree.hpp
index a241e8553c0..a241e8553c0 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/string_parse_tree.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/string_parse_tree.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/strings_from_facet.hpp b/src/third_party/boost-1.69.0/boost/date_time/strings_from_facet.hpp
index 800919a0b52..800919a0b52 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/strings_from_facet.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/strings_from_facet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time.hpp b/src/third_party/boost-1.69.0/boost/date_time/time.hpp
index 632f10d7f28..632f10d7f28 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_clock.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_clock.hpp
index a64a5b81b93..a64a5b81b93 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_clock.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_clock.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_defs.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_defs.hpp
index 852207e6857..852207e6857 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_defs.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_defs.hpp
diff --git a/src/third_party/boost-1.69.0/boost/date_time/time_duration.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_duration.hpp
new file mode 100644
index 00000000000..6337c3da1a5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_duration.hpp
@@ -0,0 +1,298 @@
+#ifndef DATE_TIME_TIME_DURATION_HPP___
+#define DATE_TIME_TIME_DURATION_HPP___
+
+/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
+ * Use, modification and distribution is subject to the
+ * Boost Software License, Version 1.0. (See accompanying
+ * file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
+ * Author: Jeff Garland, Bart Garst
+ * $Date$
+ */
+
+#include <boost/core/enable_if.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/date_time/compiler_config.hpp>
+#include <boost/date_time/special_defs.hpp>
+#include <boost/date_time/time_defs.hpp>
+#include <boost/operators.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_integral.hpp>
+
+namespace boost {
+namespace date_time {
+
+
+ //! Represents some amount of elapsed time measure to a given resolution
+ /*! This class represents a standard set of capabilities for all
+ counted time durations. Time duration implementations should derive
+ from this class passing their type as the first template parameter.
+ This design allows the subclass duration types to provide custom
+ construction policies or other custom features not provided here.
+
+ @param T The subclass type
+ @param rep_type The time resolution traits for this duration type.
+ */
+ template<class T, typename rep_type>
+ class BOOST_SYMBOL_VISIBLE time_duration : private
+ boost::less_than_comparable<T
+ , boost::equality_comparable<T
+ > >
+ /* dividable, addable, and subtractable operator templates
+ * won't work with this class (MSVC++ 6.0). return type
+ * from '+=' is different than expected return type
+ * from '+'. multipliable probably wont work
+ * either (haven't tried) */
+ {
+ public:
+ // A tag for type categorization. Can be used to detect Boost.DateTime duration types in generic code.
+ typedef void _is_boost_date_time_duration;
+ typedef T duration_type; //the subclass
+ typedef rep_type traits_type;
+ typedef typename rep_type::day_type day_type;
+ typedef typename rep_type::hour_type hour_type;
+ typedef typename rep_type::min_type min_type;
+ typedef typename rep_type::sec_type sec_type;
+ typedef typename rep_type::fractional_seconds_type fractional_seconds_type;
+ typedef typename rep_type::tick_type tick_type;
+ typedef typename rep_type::impl_type impl_type;
+
+ time_duration() : ticks_(0) {}
+ time_duration(hour_type hours_in,
+ min_type minutes_in,
+ sec_type seconds_in=0,
+ fractional_seconds_type frac_sec_in = 0) :
+ ticks_(rep_type::to_tick_count(hours_in,minutes_in,seconds_in,frac_sec_in))
+ {}
+ // copy constructor required for dividable<>
+ //! Construct from another time_duration (Copy constructor)
+ time_duration(const time_duration<T, rep_type>& other)
+ : ticks_(other.ticks_)
+ {}
+ //! Construct from special_values
+ time_duration(special_values sv) : ticks_(impl_type::from_special(sv))
+ {}
+ //! Returns smallest representable duration
+ static duration_type unit()
+ {
+ return duration_type(0,0,0,1);
+ }
+ //! Return the number of ticks in a second
+ static tick_type ticks_per_second()
+ {
+ return rep_type::res_adjust();
+ }
+ //! Provide the resolution of this duration type
+ static time_resolutions resolution()
+ {
+ return rep_type::resolution();
+ }
+ //! Returns number of hours in the duration
+ hour_type hours() const
+ {
+ return static_cast<hour_type>(ticks() / (3600*ticks_per_second()));
+ }
+ //! Returns normalized number of minutes
+ min_type minutes() const
+ {
+ return static_cast<min_type>((ticks() / (60*ticks_per_second())) % 60);
+ }
+ //! Returns normalized number of seconds (0..60)
+ sec_type seconds() const
+ {
+ return static_cast<sec_type>((ticks()/ticks_per_second()) % 60);
+ }
+ //! Returns total number of seconds truncating any fractional seconds
+ sec_type total_seconds() const
+ {
+ return static_cast<sec_type>(ticks() / ticks_per_second());
+ }
+ //! Returns total number of milliseconds truncating any fractional seconds
+ tick_type total_milliseconds() const
+ {
+ if (ticks_per_second() < 1000) {
+ return ticks() * (static_cast<tick_type>(1000) / ticks_per_second());
+ }
+ return ticks() / (ticks_per_second() / static_cast<tick_type>(1000)) ;
+ }
+ //! Returns total number of nanoseconds truncating any sub millisecond values
+ tick_type total_nanoseconds() const
+ {
+ if (ticks_per_second() < 1000000000) {
+ return ticks() * (static_cast<tick_type>(1000000000) / ticks_per_second());
+ }
+ return ticks() / (ticks_per_second() / static_cast<tick_type>(1000000000)) ;
+ }
+ //! Returns total number of microseconds truncating any sub microsecond values
+ tick_type total_microseconds() const
+ {
+ if (ticks_per_second() < 1000000) {
+ return ticks() * (static_cast<tick_type>(1000000) / ticks_per_second());
+ }
+ return ticks() / (ticks_per_second() / static_cast<tick_type>(1000000)) ;
+ }
+ //! Returns count of fractional seconds at given resolution
+ fractional_seconds_type fractional_seconds() const
+ {
+ return (ticks() % ticks_per_second());
+ }
+ //! Returns number of possible digits in fractional seconds
+ static unsigned short num_fractional_digits()
+ {
+ return rep_type::num_fractional_digits();
+ }
+ duration_type invert_sign() const
+ {
+ return duration_type(ticks_ * (-1));
+ }
+ bool is_negative() const
+ {
+ return ticks_ < 0;
+ }
+ bool operator<(const time_duration& rhs) const
+ {
+ return ticks_ < rhs.ticks_;
+ }
+ bool operator==(const time_duration& rhs) const
+ {
+ return ticks_ == rhs.ticks_;
+ }
+ //! unary- Allows for time_duration td = -td1
+ duration_type operator-()const
+ {
+ return duration_type(ticks_ * (-1));
+ }
+ duration_type operator-(const duration_type& d) const
+ {
+ return duration_type(ticks_ - d.ticks_);
+ }
+ duration_type operator+(const duration_type& d) const
+ {
+ return duration_type(ticks_ + d.ticks_);
+ }
+ duration_type operator/(int divisor) const
+ {
+ return duration_type(ticks_ / divisor);
+ }
+ duration_type operator-=(const duration_type& d)
+ {
+ ticks_ = ticks_ - d.ticks_;
+ return duration_type(ticks_);
+ }
+ duration_type operator+=(const duration_type& d)
+ {
+ ticks_ = ticks_ + d.ticks_;
+ return duration_type(ticks_);
+ }
+ //! Division operations on a duration with an integer.
+ duration_type operator/=(int divisor)
+ {
+ ticks_ = ticks_ / divisor;
+ return duration_type(ticks_);
+ }
+ //! Multiplication operations an a duration with an integer
+ duration_type operator*(int rhs) const
+ {
+ return duration_type(ticks_ * rhs);
+ }
+ duration_type operator*=(int divisor)
+ {
+ ticks_ = ticks_ * divisor;
+ return duration_type(ticks_);
+ }
+ tick_type ticks() const
+ {
+ return traits_type::as_number(ticks_);
+ }
+
+ //! Is ticks_ a special value?
+ bool is_special()const
+ {
+ if(traits_type::is_adapted())
+ {
+ return ticks_.is_special();
+ }
+ else{
+ return false;
+ }
+ }
+ //! Is duration pos-infinity
+ bool is_pos_infinity()const
+ {
+ if(traits_type::is_adapted())
+ {
+ return ticks_.is_pos_infinity();
+ }
+ else{
+ return false;
+ }
+ }
+ //! Is duration neg-infinity
+ bool is_neg_infinity()const
+ {
+ if(traits_type::is_adapted())
+ {
+ return ticks_.is_neg_infinity();
+ }
+ else{
+ return false;
+ }
+ }
+ //! Is duration not-a-date-time
+ bool is_not_a_date_time()const
+ {
+ if(traits_type::is_adapted())
+ {
+ return ticks_.is_nan();
+ }
+ else{
+ return false;
+ }
+ }
+
+ //! Used for special_values output
+ impl_type get_rep()const
+ {
+ return ticks_;
+ }
+
+ protected:
+ explicit time_duration(impl_type in) : ticks_(in) {}
+ impl_type ticks_;
+ };
+
+
+
+ //! Template for instantiating derived adjusting durations
+ /* These templates are designed to work with multiples of
+ * 10 for frac_of_second and resolution adjustment
+ */
+ template<class base_duration, boost::int64_t frac_of_second>
+ class BOOST_SYMBOL_VISIBLE subsecond_duration : public base_duration
+ {
+ public:
+ typedef typename base_duration::impl_type impl_type;
+ typedef typename base_duration::traits_type traits_type;
+
+ private:
+ // To avoid integer overflow we precompute the duration resolution conversion coefficient (ticket #3471)
+ BOOST_STATIC_ASSERT_MSG((traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second % frac_of_second : frac_of_second % traits_type::ticks_per_second) == 0,\
+ "The base duration resolution must be a multiple of the subsecond duration resolution");
+ BOOST_STATIC_CONSTANT(boost::int64_t, adjustment_ratio = (traits_type::ticks_per_second >= frac_of_second ? traits_type::ticks_per_second / frac_of_second : frac_of_second / traits_type::ticks_per_second));
+
+ public:
+ // The argument (ss) must be an integral type
+ template <typename T>
+ explicit subsecond_duration(T const& ss,
+ typename boost::enable_if<boost::is_integral<T>, void>::type* = BOOST_DATE_TIME_NULLPTR) :
+ base_duration(impl_type(traits_type::ticks_per_second >= frac_of_second ? ss * adjustment_ratio : ss / adjustment_ratio))
+ {
+ }
+ };
+
+} } //namespace date_time
+
+
+
+
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_facet.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_facet.hpp
index 1e07093ffcf..1e07093ffcf 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_facet.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_facet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_formatting_streams.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_formatting_streams.hpp
index f69f87a348b..f69f87a348b 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_formatting_streams.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_formatting_streams.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_iterator.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_iterator.hpp
index 64439363d7e..64439363d7e 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_parsing.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_parsing.hpp
index 5fa7e8d2c58..5fa7e8d2c58 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_parsing.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_parsing.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_resolution_traits.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_resolution_traits.hpp
index b622488005f..b622488005f 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_resolution_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_resolution_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_system_counted.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_system_counted.hpp
index af27aad36e5..af27aad36e5 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_system_counted.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_system_counted.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_system_split.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_system_split.hpp
index 8e1efbe4ca8..8e1efbe4ca8 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_system_split.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_system_split.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_zone_base.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_zone_base.hpp
index a7884290735..a7884290735 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_zone_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_zone_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/time_zone_names.hpp b/src/third_party/boost-1.69.0/boost/date_time/time_zone_names.hpp
index 405e7e0a708..405e7e0a708 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/time_zone_names.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/time_zone_names.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/tz_db_base.hpp b/src/third_party/boost-1.69.0/boost/date_time/tz_db_base.hpp
index 5bf5b8af827..5bf5b8af827 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/tz_db_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/tz_db_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/wrapping_int.hpp b/src/third_party/boost-1.69.0/boost/date_time/wrapping_int.hpp
index 6f869d30234..6f869d30234 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/wrapping_int.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/wrapping_int.hpp
diff --git a/src/third_party/boost-1.68.0/boost/date_time/year_month_day.hpp b/src/third_party/boost-1.69.0/boost/date_time/year_month_day.hpp
index 6355ab27118..6355ab27118 100644
--- a/src/third_party/boost-1.68.0/boost/date_time/year_month_day.hpp
+++ b/src/third_party/boost-1.69.0/boost/date_time/year_month_day.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/allocator_utilities.hpp b/src/third_party/boost-1.69.0/boost/detail/allocator_utilities.hpp
new file mode 100644
index 00000000000..b9778a92e77
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/allocator_utilities.hpp
@@ -0,0 +1,193 @@
+/* Copyright 2003-2013 Joaquin M Lopez Munoz.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * See Boost website at http://www.boost.org/
+ */
+
+#ifndef BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP
+#define BOOST_DETAIL_ALLOCATOR_UTILITIES_HPP
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/detail/workaround.hpp>
+#include <boost/detail/select_type.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <cstddef>
+#include <memory>
+#include <new>
+
+namespace boost{
+
+namespace detail{
+
+/* Allocator adaption layer. Some stdlibs provide allocators without rebind
+ * and template ctors. These facilities are simulated with the external
+ * template class rebind_to and the aid of partial_std_allocator_wrapper.
+ */
+
+namespace allocator{
+
+/* partial_std_allocator_wrapper inherits the functionality of a std
+ * allocator while providing a templatized ctor and other bits missing
+ * in some stdlib implementation or another.
+ */
+
+template<typename Type>
+class partial_std_allocator_wrapper:public std::allocator<Type>
+{
+public:
+ /* Oddly enough, STLport does not define std::allocator<void>::value_type
+ * when configured to work without partial template specialization.
+ * No harm in supplying the definition here unconditionally.
+ */
+
+ typedef Type value_type;
+
+ partial_std_allocator_wrapper(){};
+
+ template<typename Other>
+ partial_std_allocator_wrapper(const partial_std_allocator_wrapper<Other>&){}
+
+ partial_std_allocator_wrapper(const std::allocator<Type>& x):
+ std::allocator<Type>(x)
+ {
+ };
+
+#if defined(BOOST_DINKUMWARE_STDLIB)
+ /* Dinkumware guys didn't provide a means to call allocate() without
+ * supplying a hint, in disagreement with the standard.
+ */
+
+ Type* allocate(std::size_t n,const void* hint=0)
+ {
+ std::allocator<Type>& a=*this;
+ return a.allocate(n,hint);
+ }
+#endif
+
+};
+
+/* Detects whether a given allocator belongs to a defective stdlib not
+ * having the required member templates.
+ * Note that it does not suffice to check the Boost.Config stdlib
+ * macros, as the user might have passed a custom, compliant allocator.
+ * The checks also considers partial_std_allocator_wrapper to be
+ * a standard defective allocator.
+ */
+
+#if defined(BOOST_NO_STD_ALLOCATOR)&&\
+ (defined(BOOST_HAS_PARTIAL_STD_ALLOCATOR)||defined(BOOST_DINKUMWARE_STDLIB))
+
+template<typename Allocator>
+struct is_partial_std_allocator
+{
+ BOOST_STATIC_CONSTANT(bool,
+ value=
+ (is_same<
+ std::allocator<BOOST_DEDUCED_TYPENAME Allocator::value_type>,
+ Allocator
+ >::value)||
+ (is_same<
+ partial_std_allocator_wrapper<
+ BOOST_DEDUCED_TYPENAME Allocator::value_type>,
+ Allocator
+ >::value));
+};
+
+#else
+
+template<typename Allocator>
+struct is_partial_std_allocator
+{
+ BOOST_STATIC_CONSTANT(bool,value=false);
+};
+
+#endif
+
+/* rebind operations for defective std allocators */
+
+template<typename Allocator,typename Type>
+struct partial_std_allocator_rebind_to
+{
+ typedef partial_std_allocator_wrapper<Type> type;
+};
+
+/* rebind operation in all other cases */
+
+template<typename Allocator>
+struct rebinder
+{
+ template<typename Type>
+ struct result
+ {
+#ifdef BOOST_NO_CXX11_ALLOCATOR
+ typedef typename Allocator::BOOST_NESTED_TEMPLATE
+ rebind<Type>::other other;
+#else
+ typedef typename std::allocator_traits<Allocator>::BOOST_NESTED_TEMPLATE
+ rebind_alloc<Type> other;
+#endif
+ };
+};
+
+template<typename Allocator,typename Type>
+struct compliant_allocator_rebind_to
+{
+ typedef typename rebinder<Allocator>::
+ BOOST_NESTED_TEMPLATE result<Type>::other type;
+};
+
+/* rebind front-end */
+
+template<typename Allocator,typename Type>
+struct rebind_to:
+ boost::detail::if_true<
+ is_partial_std_allocator<Allocator>::value
+ >::template then<
+ partial_std_allocator_rebind_to<Allocator,Type>,
+ compliant_allocator_rebind_to<Allocator,Type>
+ >::type
+{
+};
+
+/* allocator-independent versions of construct and destroy */
+
+template<typename Type>
+void construct(void* p,const Type& t)
+{
+ new (p) Type(t);
+}
+
+#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
+/* MSVC++ issues spurious warnings about unreferencend formal parameters
+ * in destroy<Type> when Type is a class with trivial dtor.
+ */
+
+#pragma warning(push)
+#pragma warning(disable:4100)
+#endif
+
+template<typename Type>
+void destroy(const Type* p)
+{
+
+#if BOOST_WORKAROUND(__SUNPRO_CC,BOOST_TESTED_AT(0x590))
+ const_cast<Type*>(p)->~Type();
+#else
+ p->~Type();
+#endif
+
+}
+
+#if BOOST_WORKAROUND(BOOST_MSVC,BOOST_TESTED_AT(1500))
+#pragma warning(pop)
+#endif
+
+} /* namespace boost::detail::allocator */
+
+} /* namespace boost::detail */
+
+} /* namespace boost */
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/detail/atomic_count.hpp b/src/third_party/boost-1.69.0/boost/detail/atomic_count.hpp
index 5411c7ae990..5411c7ae990 100644
--- a/src/third_party/boost-1.68.0/boost/detail/atomic_count.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/atomic_count.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/basic_pointerbuf.hpp b/src/third_party/boost-1.69.0/boost/detail/basic_pointerbuf.hpp
index 85618f92abe..85618f92abe 100644
--- a/src/third_party/boost-1.68.0/boost/detail/basic_pointerbuf.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/basic_pointerbuf.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/bitmask.hpp b/src/third_party/boost-1.69.0/boost/detail/bitmask.hpp
index 63d4fac0c26..63d4fac0c26 100644
--- a/src/third_party/boost-1.68.0/boost/detail/bitmask.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/bitmask.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/call_traits.hpp b/src/third_party/boost-1.69.0/boost/detail/call_traits.hpp
index 36dea0003a8..36dea0003a8 100644
--- a/src/third_party/boost-1.68.0/boost/detail/call_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/call_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/compressed_pair.hpp b/src/third_party/boost-1.69.0/boost/detail/compressed_pair.hpp
new file mode 100644
index 00000000000..b090a727dee
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/compressed_pair.hpp
@@ -0,0 +1,452 @@
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/utility for most recent version including documentation.
+
+// compressed_pair: pair that "compresses" empty members
+// (see libs/utility/doc/html/compressed_pair.html)
+//
+// JM changes 25 Jan 2004:
+// For the case where T1 == T2 and both are empty, then first() and second()
+// should return different objects.
+// JM changes 25 Jan 2000:
+// Removed default arguments from compressed_pair_switch to get
+// C++ Builder 4 to accept them
+// rewriten swap to get gcc and C++ builder to compile.
+// added partial specialisations for case T1 == T2 to avoid duplicate constructor defs.
+
+#ifndef BOOST_DETAIL_COMPRESSED_PAIR_HPP
+#define BOOST_DETAIL_COMPRESSED_PAIR_HPP
+
+#include <algorithm>
+
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_empty.hpp>
+#include <boost/type_traits/is_final.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/call_traits.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4512)
+#endif
+namespace boost
+{
+
+template <class T1, class T2>
+class compressed_pair;
+
+
+// compressed_pair
+
+namespace details
+{
+ template<class T, bool E = boost::is_final<T>::value>
+ struct compressed_pair_empty
+ : ::boost::false_type { };
+
+ template<class T>
+ struct compressed_pair_empty<T, false>
+ : ::boost::is_empty<T> { };
+
+ // JM altered 26 Jan 2000:
+ template <class T1, class T2, bool IsSame, bool FirstEmpty, bool SecondEmpty>
+ struct compressed_pair_switch;
+
+ template <class T1, class T2>
+ struct compressed_pair_switch<T1, T2, false, false, false>
+ {static const int value = 0;};
+
+ template <class T1, class T2>
+ struct compressed_pair_switch<T1, T2, false, true, true>
+ {static const int value = 3;};
+
+ template <class T1, class T2>
+ struct compressed_pair_switch<T1, T2, false, true, false>
+ {static const int value = 1;};
+
+ template <class T1, class T2>
+ struct compressed_pair_switch<T1, T2, false, false, true>
+ {static const int value = 2;};
+
+ template <class T1, class T2>
+ struct compressed_pair_switch<T1, T2, true, true, true>
+ {static const int value = 4;};
+
+ template <class T1, class T2>
+ struct compressed_pair_switch<T1, T2, true, false, false>
+ {static const int value = 5;};
+
+ template <class T1, class T2, int Version> class compressed_pair_imp;
+
+#ifdef __GNUC__
+ // workaround for GCC (JM):
+ using std::swap;
+#endif
+ //
+ // can't call unqualified swap from within classname::swap
+ // as Koenig lookup rules will find only the classname::swap
+ // member function not the global declaration, so use cp_swap
+ // as a forwarding function (JM):
+ template <typename T>
+ inline void cp_swap(T& t1, T& t2)
+ {
+#ifndef __GNUC__
+ using std::swap;
+#endif
+ swap(t1, t2);
+ }
+
+ // 0 derive from neither
+
+ template <class T1, class T2>
+ class compressed_pair_imp<T1, T2, 0>
+ {
+ public:
+ typedef T1 first_type;
+ typedef T2 second_type;
+ typedef typename call_traits<first_type>::param_type first_param_type;
+ typedef typename call_traits<second_type>::param_type second_param_type;
+ typedef typename call_traits<first_type>::reference first_reference;
+ typedef typename call_traits<second_type>::reference second_reference;
+ typedef typename call_traits<first_type>::const_reference first_const_reference;
+ typedef typename call_traits<second_type>::const_reference second_const_reference;
+
+ compressed_pair_imp() {}
+
+ compressed_pair_imp(first_param_type x, second_param_type y)
+ : first_(x), second_(y) {}
+
+ compressed_pair_imp(first_param_type x)
+ : first_(x) {}
+
+ compressed_pair_imp(second_param_type y)
+ : second_(y) {}
+
+ first_reference first() {return first_;}
+ first_const_reference first() const {return first_;}
+
+ second_reference second() {return second_;}
+ second_const_reference second() const {return second_;}
+
+ void swap(::boost::compressed_pair<T1, T2>& y)
+ {
+ cp_swap(first_, y.first());
+ cp_swap(second_, y.second());
+ }
+ private:
+ first_type first_;
+ second_type second_;
+ };
+
+ // 1 derive from T1
+
+ template <class T1, class T2>
+ class compressed_pair_imp<T1, T2, 1>
+ : protected ::boost::remove_cv<T1>::type
+ {
+ public:
+ typedef T1 first_type;
+ typedef T2 second_type;
+ typedef typename call_traits<first_type>::param_type first_param_type;
+ typedef typename call_traits<second_type>::param_type second_param_type;
+ typedef typename call_traits<first_type>::reference first_reference;
+ typedef typename call_traits<second_type>::reference second_reference;
+ typedef typename call_traits<first_type>::const_reference first_const_reference;
+ typedef typename call_traits<second_type>::const_reference second_const_reference;
+
+ compressed_pair_imp() {}
+
+ compressed_pair_imp(first_param_type x, second_param_type y)
+ : first_type(x), second_(y) {}
+
+ compressed_pair_imp(first_param_type x)
+ : first_type(x) {}
+
+ compressed_pair_imp(second_param_type y)
+ : second_(y) {}
+
+ first_reference first() {return *this;}
+ first_const_reference first() const {return *this;}
+
+ second_reference second() {return second_;}
+ second_const_reference second() const {return second_;}
+
+ void swap(::boost::compressed_pair<T1,T2>& y)
+ {
+ // no need to swap empty base class:
+ cp_swap(second_, y.second());
+ }
+ private:
+ second_type second_;
+ };
+
+ // 2 derive from T2
+
+ template <class T1, class T2>
+ class compressed_pair_imp<T1, T2, 2>
+ : protected ::boost::remove_cv<T2>::type
+ {
+ public:
+ typedef T1 first_type;
+ typedef T2 second_type;
+ typedef typename call_traits<first_type>::param_type first_param_type;
+ typedef typename call_traits<second_type>::param_type second_param_type;
+ typedef typename call_traits<first_type>::reference first_reference;
+ typedef typename call_traits<second_type>::reference second_reference;
+ typedef typename call_traits<first_type>::const_reference first_const_reference;
+ typedef typename call_traits<second_type>::const_reference second_const_reference;
+
+ compressed_pair_imp() {}
+
+ compressed_pair_imp(first_param_type x, second_param_type y)
+ : second_type(y), first_(x) {}
+
+ compressed_pair_imp(first_param_type x)
+ : first_(x) {}
+
+ compressed_pair_imp(second_param_type y)
+ : second_type(y) {}
+
+ first_reference first() {return first_;}
+ first_const_reference first() const {return first_;}
+
+ second_reference second() {return *this;}
+ second_const_reference second() const {return *this;}
+
+ void swap(::boost::compressed_pair<T1,T2>& y)
+ {
+ // no need to swap empty base class:
+ cp_swap(first_, y.first());
+ }
+
+ private:
+ first_type first_;
+ };
+
+ // 3 derive from T1 and T2
+
+ template <class T1, class T2>
+ class compressed_pair_imp<T1, T2, 3>
+ : protected ::boost::remove_cv<T1>::type,
+ protected ::boost::remove_cv<T2>::type
+ {
+ public:
+ typedef T1 first_type;
+ typedef T2 second_type;
+ typedef typename call_traits<first_type>::param_type first_param_type;
+ typedef typename call_traits<second_type>::param_type second_param_type;
+ typedef typename call_traits<first_type>::reference first_reference;
+ typedef typename call_traits<second_type>::reference second_reference;
+ typedef typename call_traits<first_type>::const_reference first_const_reference;
+ typedef typename call_traits<second_type>::const_reference second_const_reference;
+
+ compressed_pair_imp() {}
+
+ compressed_pair_imp(first_param_type x, second_param_type y)
+ : first_type(x), second_type(y) {}
+
+ compressed_pair_imp(first_param_type x)
+ : first_type(x) {}
+
+ compressed_pair_imp(second_param_type y)
+ : second_type(y) {}
+
+ first_reference first() {return *this;}
+ first_const_reference first() const {return *this;}
+
+ second_reference second() {return *this;}
+ second_const_reference second() const {return *this;}
+ //
+ // no need to swap empty bases:
+ void swap(::boost::compressed_pair<T1,T2>&) {}
+ };
+
+ // JM
+ // 4 T1 == T2, T1 and T2 both empty
+ // Originally this did not store an instance of T2 at all
+ // but that led to problems beause it meant &x.first() == &x.second()
+ // which is not true for any other kind of pair, so now we store an instance
+ // of T2 just in case the user is relying on first() and second() returning
+ // different objects (albeit both empty).
+ template <class T1, class T2>
+ class compressed_pair_imp<T1, T2, 4>
+ : protected ::boost::remove_cv<T1>::type
+ {
+ public:
+ typedef T1 first_type;
+ typedef T2 second_type;
+ typedef typename call_traits<first_type>::param_type first_param_type;
+ typedef typename call_traits<second_type>::param_type second_param_type;
+ typedef typename call_traits<first_type>::reference first_reference;
+ typedef typename call_traits<second_type>::reference second_reference;
+ typedef typename call_traits<first_type>::const_reference first_const_reference;
+ typedef typename call_traits<second_type>::const_reference second_const_reference;
+
+ compressed_pair_imp() {}
+
+ compressed_pair_imp(first_param_type x, second_param_type y)
+ : first_type(x), m_second(y) {}
+
+ compressed_pair_imp(first_param_type x)
+ : first_type(x), m_second(x) {}
+
+ first_reference first() {return *this;}
+ first_const_reference first() const {return *this;}
+
+ second_reference second() {return m_second;}
+ second_const_reference second() const {return m_second;}
+
+ void swap(::boost::compressed_pair<T1,T2>&) {}
+ private:
+ T2 m_second;
+ };
+
+ // 5 T1 == T2 and are not empty: //JM
+
+ template <class T1, class T2>
+ class compressed_pair_imp<T1, T2, 5>
+ {
+ public:
+ typedef T1 first_type;
+ typedef T2 second_type;
+ typedef typename call_traits<first_type>::param_type first_param_type;
+ typedef typename call_traits<second_type>::param_type second_param_type;
+ typedef typename call_traits<first_type>::reference first_reference;
+ typedef typename call_traits<second_type>::reference second_reference;
+ typedef typename call_traits<first_type>::const_reference first_const_reference;
+ typedef typename call_traits<second_type>::const_reference second_const_reference;
+
+ compressed_pair_imp() {}
+
+ compressed_pair_imp(first_param_type x, second_param_type y)
+ : first_(x), second_(y) {}
+
+ compressed_pair_imp(first_param_type x)
+ : first_(x), second_(x) {}
+
+ first_reference first() {return first_;}
+ first_const_reference first() const {return first_;}
+
+ second_reference second() {return second_;}
+ second_const_reference second() const {return second_;}
+
+ void swap(::boost::compressed_pair<T1, T2>& y)
+ {
+ cp_swap(first_, y.first());
+ cp_swap(second_, y.second());
+ }
+ private:
+ first_type first_;
+ second_type second_;
+ };
+
+} // details
+
+template <class T1, class T2>
+class compressed_pair
+ : private ::boost::details::compressed_pair_imp<T1, T2,
+ ::boost::details::compressed_pair_switch<
+ T1,
+ T2,
+ ::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
+ ::boost::details::compressed_pair_empty<T1>::value,
+ ::boost::details::compressed_pair_empty<T2>::value>::value>
+{
+private:
+ typedef details::compressed_pair_imp<T1, T2,
+ ::boost::details::compressed_pair_switch<
+ T1,
+ T2,
+ ::boost::is_same<typename remove_cv<T1>::type, typename remove_cv<T2>::type>::value,
+ ::boost::details::compressed_pair_empty<T1>::value,
+ ::boost::details::compressed_pair_empty<T2>::value>::value> base;
+public:
+ typedef T1 first_type;
+ typedef T2 second_type;
+ typedef typename call_traits<first_type>::param_type first_param_type;
+ typedef typename call_traits<second_type>::param_type second_param_type;
+ typedef typename call_traits<first_type>::reference first_reference;
+ typedef typename call_traits<second_type>::reference second_reference;
+ typedef typename call_traits<first_type>::const_reference first_const_reference;
+ typedef typename call_traits<second_type>::const_reference second_const_reference;
+
+ compressed_pair() : base() {}
+ compressed_pair(first_param_type x, second_param_type y) : base(x, y) {}
+ explicit compressed_pair(first_param_type x) : base(x) {}
+ explicit compressed_pair(second_param_type y) : base(y) {}
+
+ first_reference first() {return base::first();}
+ first_const_reference first() const {return base::first();}
+
+ second_reference second() {return base::second();}
+ second_const_reference second() const {return base::second();}
+
+ void swap(compressed_pair& y) { base::swap(y); }
+};
+
+// JM
+// Partial specialisation for case where T1 == T2:
+//
+template <class T>
+class compressed_pair<T, T>
+ : private details::compressed_pair_imp<T, T,
+ ::boost::details::compressed_pair_switch<
+ T,
+ T,
+ ::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
+ ::boost::details::compressed_pair_empty<T>::value,
+ ::boost::details::compressed_pair_empty<T>::value>::value>
+{
+private:
+ typedef details::compressed_pair_imp<T, T,
+ ::boost::details::compressed_pair_switch<
+ T,
+ T,
+ ::boost::is_same<typename remove_cv<T>::type, typename remove_cv<T>::type>::value,
+ ::boost::details::compressed_pair_empty<T>::value,
+ ::boost::details::compressed_pair_empty<T>::value>::value> base;
+public:
+ typedef T first_type;
+ typedef T second_type;
+ typedef typename call_traits<first_type>::param_type first_param_type;
+ typedef typename call_traits<second_type>::param_type second_param_type;
+ typedef typename call_traits<first_type>::reference first_reference;
+ typedef typename call_traits<second_type>::reference second_reference;
+ typedef typename call_traits<first_type>::const_reference first_const_reference;
+ typedef typename call_traits<second_type>::const_reference second_const_reference;
+
+ compressed_pair() : base() {}
+ compressed_pair(first_param_type x, second_param_type y) : base(x, y) {}
+#if !(defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x530))
+ explicit
+#endif
+ compressed_pair(first_param_type x) : base(x) {}
+
+ first_reference first() {return base::first();}
+ first_const_reference first() const {return base::first();}
+
+ second_reference second() {return base::second();}
+ second_const_reference second() const {return base::second();}
+
+ void swap(::boost::compressed_pair<T,T>& y) { base::swap(y); }
+};
+
+template <class T1, class T2>
+inline
+void
+swap(compressed_pair<T1, T2>& x, compressed_pair<T1, T2>& y)
+{
+ x.swap(y);
+}
+
+} // boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#endif // BOOST_DETAIL_COMPRESSED_PAIR_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/detail/container_fwd.hpp b/src/third_party/boost-1.69.0/boost/detail/container_fwd.hpp
index 04ce972738e..04ce972738e 100644
--- a/src/third_party/boost-1.68.0/boost/detail/container_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/container_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/endian.hpp b/src/third_party/boost-1.69.0/boost/detail/endian.hpp
index f576c26b89a..f576c26b89a 100644
--- a/src/third_party/boost-1.68.0/boost/detail/endian.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/endian.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/fenv.hpp b/src/third_party/boost-1.69.0/boost/detail/fenv.hpp
index b268f5c1ccd..b268f5c1ccd 100644
--- a/src/third_party/boost-1.68.0/boost/detail/fenv.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/fenv.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/indirect_traits.hpp b/src/third_party/boost-1.69.0/boost/detail/indirect_traits.hpp
new file mode 100644
index 00000000000..94e9b34dc2f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/indirect_traits.hpp
@@ -0,0 +1,195 @@
+// Copyright David Abrahams 2002.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef INDIRECT_TRAITS_DWA2002131_HPP
+# define INDIRECT_TRAITS_DWA2002131_HPP
+# include <boost/type_traits/integral_constant.hpp>
+# include <boost/type_traits/is_function.hpp>
+# include <boost/type_traits/is_reference.hpp>
+# include <boost/type_traits/is_pointer.hpp>
+# include <boost/type_traits/is_class.hpp>
+# include <boost/type_traits/is_const.hpp>
+# include <boost/type_traits/is_volatile.hpp>
+# include <boost/type_traits/is_member_function_pointer.hpp>
+# include <boost/type_traits/is_member_pointer.hpp>
+# include <boost/type_traits/remove_cv.hpp>
+# include <boost/type_traits/remove_reference.hpp>
+# include <boost/type_traits/remove_pointer.hpp>
+
+# include <boost/detail/workaround.hpp>
+# include <boost/detail/select_type.hpp>
+
+
+namespace boost { namespace detail {
+
+namespace indirect_traits {
+
+template <class T>
+struct is_reference_to_const : boost::false_type
+{
+};
+
+template <class T>
+struct is_reference_to_const<T const&> : boost::true_type
+{
+};
+
+# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
+template<class T>
+struct is_reference_to_const<T const volatile&> : boost::true_type
+{
+};
+# endif
+
+template <class T>
+struct is_reference_to_function : boost::false_type
+{
+};
+
+template <class T>
+struct is_reference_to_function<T&> : is_function<T>
+{
+};
+
+template <class T>
+struct is_pointer_to_function : boost::false_type
+{
+};
+
+// There's no such thing as a pointer-to-cv-function, so we don't need
+// specializations for those
+template <class T>
+struct is_pointer_to_function<T*> : is_function<T>
+{
+};
+
+template <class T>
+struct is_reference_to_member_function_pointer_impl : boost::false_type
+{
+};
+
+template <class T>
+struct is_reference_to_member_function_pointer_impl<T&>
+ : is_member_function_pointer<typename remove_cv<T>::type>
+{
+};
+
+
+template <class T>
+struct is_reference_to_member_function_pointer
+ : is_reference_to_member_function_pointer_impl<T>
+{
+};
+
+template <class T>
+struct is_reference_to_function_pointer_aux
+ : boost::integral_constant<bool,
+ is_reference<T>::value &&
+ is_pointer_to_function<
+ typename remove_cv<
+ typename remove_reference<T>::type
+ >::type
+ >::value
+ >
+{
+ // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those
+};
+
+template <class T>
+struct is_reference_to_function_pointer
+ : boost::detail::if_true<
+ is_reference_to_function<T>::value
+ >::template then<
+ boost::false_type
+ , is_reference_to_function_pointer_aux<T>
+ >::type
+{
+};
+
+template <class T>
+struct is_reference_to_non_const
+ : boost::integral_constant<bool,
+ is_reference<T>::value &&
+ !is_reference_to_const<T>::value
+ >
+{
+};
+
+template <class T>
+struct is_reference_to_volatile : boost::false_type
+{
+};
+
+template <class T>
+struct is_reference_to_volatile<T volatile&> : boost::true_type
+{
+};
+
+# if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround
+template <class T>
+struct is_reference_to_volatile<T const volatile&> : boost::true_type
+{
+};
+# endif
+
+
+template <class T>
+struct is_reference_to_pointer : boost::false_type
+{
+};
+
+template <class T>
+struct is_reference_to_pointer<T*&> : boost::true_type
+{
+};
+
+template <class T>
+struct is_reference_to_pointer<T* const&> : boost::true_type
+{
+};
+
+template <class T>
+struct is_reference_to_pointer<T* volatile&> : boost::true_type
+{
+};
+
+template <class T>
+struct is_reference_to_pointer<T* const volatile&> : boost::true_type
+{
+};
+
+template <class T>
+struct is_reference_to_class
+ : boost::integral_constant<bool,
+ is_reference<T>::value &&
+ is_class<
+ typename remove_cv<
+ typename remove_reference<T>::type
+ >::type
+ >::value
+ >
+{
+};
+
+template <class T>
+struct is_pointer_to_class
+ : boost::integral_constant<bool,
+ is_pointer<T>::value &&
+ is_class<
+ typename remove_cv<
+ typename remove_pointer<T>::type
+ >::type
+ >::value
+ >
+{
+};
+
+
+}
+
+using namespace indirect_traits;
+
+}} // namespace boost::python::detail
+
+#endif // INDIRECT_TRAITS_DWA2002131_HPP
diff --git a/src/third_party/boost-1.69.0/boost/detail/interlocked.hpp b/src/third_party/boost-1.69.0/boost/detail/interlocked.hpp
new file mode 100644
index 00000000000..b746cccff18
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/interlocked.hpp
@@ -0,0 +1,220 @@
+#ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
+#define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
+
+//
+// boost/detail/interlocked.hpp
+//
+// Copyright 2005 Peter Dimov
+// Copyright 2018 Andrey Semashev
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+#pragma once
+#endif
+
+// BOOST_INTERLOCKED_HAS_INTRIN_H
+
+// VC9 has intrin.h, but it collides with <utility>
+#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
+
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
+#elif defined( __MINGW64_VERSION_MAJOR )
+
+// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+#elif defined( __CYGWIN__ ) && defined( __LP64__ )
+
+// We have to use intrin.h on Cygwin 64
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+// Intel C++ on Windows on VC10+ stdlib
+#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
+
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+// clang-cl on Windows on VC10+ stdlib
+#elif defined( __clang__ ) && defined( _MSC_VER ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
+
+# define BOOST_INTERLOCKED_HAS_INTRIN_H
+
+#endif
+
+#if defined( BOOST_USE_WINDOWS_H )
+
+# include <windows.h>
+
+# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement
+# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
+# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange
+# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer
+
+#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_INTERLOCKED_HAS_INTRIN_H )
+
+#include <intrin.h>
+
+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+# if defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64)
+
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
+
+# else
+
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
+
+# endif
+
+#elif defined(_WIN32_WCE)
+
+#if _WIN32_WCE >= 0x600
+
+extern "C" long __cdecl _InterlockedIncrement( long volatile * );
+extern "C" long __cdecl _InterlockedDecrement( long volatile * );
+extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
+
+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#else // _WIN32_WCE >= 0x600
+
+// under Windows CE we still have old-style Interlocked* functions
+
+extern "C" long __cdecl InterlockedIncrement( long * );
+extern "C" long __cdecl InterlockedDecrement( long * );
+extern "C" long __cdecl InterlockedCompareExchange( long *, long, long );
+extern "C" long __cdecl InterlockedExchange( long *, long );
+extern "C" long __cdecl InterlockedExchangeAdd( long *, long );
+
+# define BOOST_INTERLOCKED_INCREMENT InterlockedIncrement
+# define BOOST_INTERLOCKED_DECREMENT InterlockedDecrement
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
+# define BOOST_INTERLOCKED_EXCHANGE InterlockedExchange
+# define BOOST_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
+
+#endif // _WIN32_WCE >= 0x600
+
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)(dest),(long)(exchange),(long)(compare)))
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long*)(dest),(long)(exchange)))
+
+#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
+
+# if defined( __CLRCALL_PURE_OR_CDECL )
+# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __CLRCALL_PURE_OR_CDECL
+# else
+# define BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL __cdecl
+# endif
+
+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
+extern "C" long BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
+
+# undef BOOST_INTERLOCKED_CLRCALL_PURE_OR_CDECL
+
+# if defined( BOOST_MSVC ) && BOOST_MSVC >= 1310
+# pragma intrinsic( _InterlockedIncrement )
+# pragma intrinsic( _InterlockedDecrement )
+# pragma intrinsic( _InterlockedCompareExchange )
+# pragma intrinsic( _InterlockedExchange )
+# pragma intrinsic( _InterlockedExchangeAdd )
+# endif
+
+# if defined(_M_IA64) || defined(_M_AMD64)
+
+extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
+extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* );
+
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
+
+# else
+
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
+
+# endif
+
+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
+
+#define BOOST_INTERLOCKED_IMPORT __declspec(dllimport)
+
+namespace boost
+{
+
+namespace detail
+{
+
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long );
+
+# if defined(_M_IA64) || defined(_M_AMD64)
+extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
+extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
+# endif
+
+} // namespace detail
+
+} // namespace boost
+
+# define BOOST_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement
+# define BOOST_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange
+# define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
+# define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
+
+# if defined(_M_IA64) || defined(_M_AMD64)
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::InterlockedExchangePointer
+# else
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
+ ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
+# endif
+
+#else
+
+# error "Interlocked intrinsics not available"
+
+#endif
+
+#endif // #ifndef BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/detail/is_incrementable.hpp b/src/third_party/boost-1.69.0/boost/detail/is_incrementable.hpp
new file mode 100644
index 00000000000..fa70cf2ed79
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/is_incrementable.hpp
@@ -0,0 +1,121 @@
+// Copyright David Abrahams 2004. Use, modification and distribution is
+// subject to the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+#ifndef IS_INCREMENTABLE_DWA200415_HPP
+# define IS_INCREMENTABLE_DWA200415_HPP
+
+# include <boost/type_traits/integral_constant.hpp>
+# include <boost/type_traits/remove_cv.hpp>
+# include <boost/detail/workaround.hpp>
+
+namespace boost { namespace detail {
+
+// is_incrementable<T> metafunction
+//
+// Requires: Given x of type T&, if the expression ++x is well-formed
+// it must have complete type; otherwise, it must neither be ambiguous
+// nor violate access.
+
+// This namespace ensures that ADL doesn't mess things up.
+namespace is_incrementable_
+{
+ // a type returned from operator++ when no increment is found in the
+ // type's own namespace
+ struct tag {};
+
+ // any soaks up implicit conversions and makes the following
+ // operator++ less-preferred than any other such operator that
+ // might be found via ADL.
+ struct any { template <class T> any(T const&); };
+
+ // This is a last-resort operator++ for when none other is found
+# if BOOST_WORKAROUND(__GNUC__, == 4) && __GNUC_MINOR__ == 0 && __GNUC_PATCHLEVEL__ == 2
+
+}
+
+namespace is_incrementable_2
+{
+ is_incrementable_::tag operator++(is_incrementable_::any const&);
+ is_incrementable_::tag operator++(is_incrementable_::any const&,int);
+}
+using namespace is_incrementable_2;
+
+namespace is_incrementable_
+{
+
+# else
+
+ tag operator++(any const&);
+ tag operator++(any const&,int);
+
+# endif
+
+# if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
+# define BOOST_comma(a,b) (a)
+# else
+ // In case an operator++ is found that returns void, we'll use ++x,0
+ tag operator,(tag,int);
+# define BOOST_comma(a,b) (a,b)
+# endif
+
+# if defined(BOOST_MSVC)
+# pragma warning(push)
+# pragma warning(disable:4913) // Warning about operator,
+# endif
+
+ // two check overloads help us identify which operator++ was picked
+ char (& check_(tag) )[2];
+
+ template <class T>
+ char check_(T const&);
+
+
+ template <class T>
+ struct impl
+ {
+ static typename boost::remove_cv<T>::type& x;
+
+ BOOST_STATIC_CONSTANT(
+ bool
+ , value = sizeof(is_incrementable_::check_(BOOST_comma(++x,0))) == 1
+ );
+ };
+
+ template <class T>
+ struct postfix_impl
+ {
+ static typename boost::remove_cv<T>::type& x;
+
+ BOOST_STATIC_CONSTANT(
+ bool
+ , value = sizeof(is_incrementable_::check_(BOOST_comma(x++,0))) == 1
+ );
+ };
+
+# if defined(BOOST_MSVC)
+# pragma warning(pop)
+# endif
+
+}
+
+# undef BOOST_comma
+
+template<typename T>
+struct is_incrementable :
+ public boost::integral_constant<bool, boost::detail::is_incrementable_::impl<T>::value>
+{
+};
+
+template<typename T>
+struct is_postfix_incrementable :
+ public boost::integral_constant<bool, boost::detail::is_incrementable_::postfix_impl<T>::value>
+{
+};
+
+} // namespace detail
+
+} // namespace boost
+
+# include <boost/type_traits/detail/bool_trait_undef.hpp>
+
+#endif // IS_INCREMENTABLE_DWA200415_HPP
diff --git a/src/third_party/boost-1.68.0/boost/detail/iterator.hpp b/src/third_party/boost-1.69.0/boost/detail/iterator.hpp
index 2498ef448ff..2498ef448ff 100644
--- a/src/third_party/boost-1.68.0/boost/detail/iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/lcast_precision.hpp b/src/third_party/boost-1.69.0/boost/detail/lcast_precision.hpp
new file mode 100644
index 00000000000..84bf1222b1f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/lcast_precision.hpp
@@ -0,0 +1,185 @@
+// Copyright Alexander Nasonov & Paul A. Bristow 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
+#define BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
+
+#include <climits>
+#include <ios>
+#include <limits>
+
+#include <boost/config.hpp>
+#include <boost/integer_traits.hpp>
+
+#ifndef BOOST_NO_IS_ABSTRACT
+// Fix for SF:1358600 - lexical_cast & pure virtual functions & VC 8 STL
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/is_abstract.hpp>
+#endif
+
+#if defined(BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS) || \
+ (defined(BOOST_MSVC) && (BOOST_MSVC<1310))
+
+#define BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+#endif
+
+#ifdef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+#include <boost/assert.hpp>
+#else
+#include <boost/static_assert.hpp>
+#endif
+
+namespace boost { namespace detail {
+
+class lcast_abstract_stub {};
+
+#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+// Calculate an argument to pass to std::ios_base::precision from
+// lexical_cast. See alternative implementation for broken standard
+// libraries in lcast_get_precision below. Keep them in sync, please.
+template<class T>
+struct lcast_precision
+{
+#ifdef BOOST_NO_IS_ABSTRACT
+ typedef std::numeric_limits<T> limits; // No fix for SF:1358600.
+#else
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::is_abstract<T>::value
+ , std::numeric_limits<lcast_abstract_stub>
+ , std::numeric_limits<T>
+ >::type limits;
+#endif
+
+ BOOST_STATIC_CONSTANT(bool, use_default_precision =
+ !limits::is_specialized || limits::is_exact
+ );
+
+ BOOST_STATIC_CONSTANT(bool, is_specialized_bin =
+ !use_default_precision &&
+ limits::radix == 2 && limits::digits > 0
+ );
+
+ BOOST_STATIC_CONSTANT(bool, is_specialized_dec =
+ !use_default_precision &&
+ limits::radix == 10 && limits::digits10 > 0
+ );
+
+ BOOST_STATIC_CONSTANT(std::streamsize, streamsize_max =
+ boost::integer_traits<std::streamsize>::const_max
+ );
+
+ BOOST_STATIC_CONSTANT(unsigned int, precision_dec = limits::digits10 + 1U);
+
+ BOOST_STATIC_ASSERT(!is_specialized_dec ||
+ precision_dec <= streamsize_max + 0UL
+ );
+
+ BOOST_STATIC_CONSTANT(unsigned long, precision_bin =
+ 2UL + limits::digits * 30103UL / 100000UL
+ );
+
+ BOOST_STATIC_ASSERT(!is_specialized_bin ||
+ (limits::digits + 0UL < ULONG_MAX / 30103UL &&
+ precision_bin > limits::digits10 + 0UL &&
+ precision_bin <= streamsize_max + 0UL)
+ );
+
+ BOOST_STATIC_CONSTANT(std::streamsize, value =
+ is_specialized_bin ? precision_bin
+ : is_specialized_dec ? precision_dec : 6
+ );
+};
+#endif
+
+template<class T>
+inline std::streamsize lcast_get_precision(T* = 0)
+{
+#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+ return lcast_precision<T>::value;
+#else // Follow lcast_precision algorithm at run-time:
+
+#ifdef BOOST_NO_IS_ABSTRACT
+ typedef std::numeric_limits<T> limits; // No fix for SF:1358600.
+#else
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::is_abstract<T>::value
+ , std::numeric_limits<lcast_abstract_stub>
+ , std::numeric_limits<T>
+ >::type limits;
+#endif
+
+ bool const use_default_precision =
+ !limits::is_specialized || limits::is_exact;
+
+ if(!use_default_precision)
+ { // Includes all built-in floating-point types, float, double ...
+ // and UDT types for which digits (significand bits) is defined (not zero)
+
+ bool const is_specialized_bin =
+ limits::radix == 2 && limits::digits > 0;
+ bool const is_specialized_dec =
+ limits::radix == 10 && limits::digits10 > 0;
+ std::streamsize const streamsize_max =
+ (boost::integer_traits<std::streamsize>::max)();
+ (void)streamsize_max;
+
+ if(is_specialized_bin)
+ { // Floating-point types with
+ // limits::digits defined by the specialization.
+
+ unsigned long const digits = limits::digits;
+ unsigned long const precision = 2UL + digits * 30103UL / 100000UL;
+ // unsigned long is selected because it is at least 32-bits
+ // and thus ULONG_MAX / 30103UL is big enough for all types.
+ BOOST_ASSERT(
+ digits < ULONG_MAX / 30103UL &&
+ precision > limits::digits10 + 0UL &&
+ precision <= streamsize_max + 0UL
+ );
+ return precision;
+ }
+ else if(is_specialized_dec)
+ { // Decimal Floating-point type, most likely a User Defined Type
+ // rather than a real floating-point hardware type.
+ unsigned int const precision = limits::digits10 + 1U;
+ BOOST_ASSERT(precision <= streamsize_max + 0UL);
+ return precision;
+ }
+ }
+
+ // Integral type (for which precision has no effect)
+ // or type T for which limits is NOT specialized,
+ // so assume stream precision remains the default 6 decimal digits.
+ // Warning: if your User-defined Floating-point type T is NOT specialized,
+ // then you may lose accuracy by only using 6 decimal digits.
+ // To avoid this, you need to specialize T with either
+ // radix == 2 and digits == the number of significand bits,
+ // OR
+ // radix = 10 and digits10 == the number of decimal digits.
+
+ return 6;
+#endif
+}
+
+template<class T>
+inline void lcast_set_precision(std::ios_base& stream, T*)
+{
+ stream.precision(lcast_get_precision<T>());
+}
+
+template<class Source, class Target>
+inline void lcast_set_precision(std::ios_base& stream, Source*, Target*)
+{
+ std::streamsize const s = lcast_get_precision(static_cast<Source*>(0));
+ std::streamsize const t = lcast_get_precision(static_cast<Target*>(0));
+ stream.precision(s > t ? s : t);
+}
+
+}}
+
+#endif // BOOST_DETAIL_LCAST_PRECISION_HPP_INCLUDED
+
diff --git a/src/third_party/boost-1.68.0/boost/detail/lightweight_main.hpp b/src/third_party/boost-1.69.0/boost/detail/lightweight_main.hpp
index 17053097806..17053097806 100644
--- a/src/third_party/boost-1.68.0/boost/detail/lightweight_main.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/lightweight_main.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/lightweight_mutex.hpp b/src/third_party/boost-1.69.0/boost/detail/lightweight_mutex.hpp
index b7a7f6dd4ed..b7a7f6dd4ed 100644
--- a/src/third_party/boost-1.68.0/boost/detail/lightweight_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/lightweight_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/lightweight_test.hpp b/src/third_party/boost-1.69.0/boost/detail/lightweight_test.hpp
index 9fece8ab7ea..9fece8ab7ea 100644
--- a/src/third_party/boost-1.68.0/boost/detail/lightweight_test.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/lightweight_test.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/lightweight_test_report.hpp b/src/third_party/boost-1.69.0/boost/detail/lightweight_test_report.hpp
index 1511ba9d149..1511ba9d149 100644
--- a/src/third_party/boost-1.68.0/boost/detail/lightweight_test_report.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/lightweight_test_report.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/lightweight_thread.hpp b/src/third_party/boost-1.69.0/boost/detail/lightweight_thread.hpp
index c2930d591ae..c2930d591ae 100644
--- a/src/third_party/boost-1.68.0/boost/detail/lightweight_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/lightweight_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/no_exceptions_support.hpp b/src/third_party/boost-1.69.0/boost/detail/no_exceptions_support.hpp
index 7d17454a732..7d17454a732 100644
--- a/src/third_party/boost-1.68.0/boost/detail/no_exceptions_support.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/no_exceptions_support.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/numeric_traits.hpp b/src/third_party/boost-1.69.0/boost/detail/numeric_traits.hpp
new file mode 100644
index 00000000000..a62affb347c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/numeric_traits.hpp
@@ -0,0 +1,160 @@
+// (C) Copyright David Abrahams 2001, Howard Hinnant 2001.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// Template class numeric_traits<Number> --
+//
+// Supplies:
+//
+// typedef difference_type -- a type used to represent the difference
+// between any two values of Number.
+//
+// Support:
+// 1. Not all specializations are supplied
+//
+// 2. Use of specializations that are not supplied will cause a
+// compile-time error
+//
+// 3. Users are free to specialize numeric_traits for any type.
+//
+// 4. Right now, specializations are only supplied for integer types.
+//
+// 5. On implementations which do not supply compile-time constants in
+// std::numeric_limits<>, only specializations for built-in integer types
+// are supplied.
+//
+// 6. Handling of numbers whose range of representation is at least as
+// great as boost::intmax_t can cause some differences to be
+// unrepresentable in difference_type:
+//
+// Number difference_type
+// ------ ---------------
+// signed Number
+// unsigned intmax_t
+//
+// template <class Number> typename numeric_traits<Number>::difference_type
+// numeric_distance(Number x, Number y)
+// computes (y - x), attempting to avoid overflows.
+//
+
+// See http://www.boost.org for most recent version including documentation.
+
+// Revision History
+// 11 Feb 2001 - Use BOOST_STATIC_CONSTANT (David Abrahams)
+// 11 Feb 2001 - Rolled back ineffective Borland-specific code
+// (David Abrahams)
+// 10 Feb 2001 - Rolled in supposed Borland fixes from John Maddock, but
+// not seeing any improvement yet (David Abrahams)
+// 06 Feb 2001 - Factored if_true out into boost/detail/select_type.hpp
+// (David Abrahams)
+// 23 Jan 2001 - Fixed logic of difference_type selection, which was
+// completely wack. In the process, added digit_traits<>
+// to compute the number of digits in intmax_t even when
+// not supplied by numeric_limits<>. (David Abrahams)
+// 21 Jan 2001 - Created (David Abrahams)
+
+#ifndef BOOST_NUMERIC_TRAITS_HPP_DWA20001901
+#define BOOST_NUMERIC_TRAITS_HPP_DWA20001901
+
+#include <cstddef>
+#include <boost/config.hpp>
+#include <boost/limits.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/conditional.hpp>
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#endif
+
+namespace boost { namespace detail {
+
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ // digit_traits - compute the number of digits in a built-in integer
+ // type. Needed for implementations on which numeric_limits is not specialized
+ // for some integer types, like __int128 in libstdc++ (gcc).
+ template <class T, bool IsSpecialized = std::numeric_limits<T>::is_specialized>
+ struct digit_traits
+ {
+ BOOST_STATIC_CONSTANT(int, digits = std::numeric_limits<T>::digits);
+ };
+
+ // numeric_limits is not specialized; compute digits from sizeof(T)
+ template <class T>
+ struct digit_traits<T, false>
+ {
+ BOOST_STATIC_CONSTANT(int, digits = (
+ sizeof(T) * std::numeric_limits<unsigned char>::digits
+ - (boost::is_signed<T>::value ? 1 : 0))
+ );
+ };
+#endif
+
+ // Template class integer_traits<Integer> -- traits of various integer types
+ // This should probably be rolled into boost::integer_traits one day, but I
+ // need it to work without <limits>
+ template <class Integer>
+ struct integer_traits
+ {
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ private:
+ typedef Integer integer_type;
+ typedef std::numeric_limits<integer_type> x;
+ public:
+ typedef typename boost::conditional<
+ (int(x::is_signed)
+ && (!int(x::is_bounded)
+ // digits is the number of no-sign bits
+ || (int(x::digits) + 1 >= digit_traits<boost::intmax_t>::digits))),
+ Integer,
+
+ typename boost::conditional<
+ (int(x::digits) + 1 < digit_traits<signed int>::digits),
+ signed int,
+
+ typename boost::conditional<
+ (int(x::digits) + 1 < digit_traits<signed long>::digits),
+ signed long,
+ boost::intmax_t
+ >::type
+ >::type
+ >::type difference_type;
+#else
+ BOOST_STATIC_ASSERT(boost::is_integral<Integer>::value);
+
+ typedef typename boost::conditional<
+ (sizeof(Integer) >= sizeof(intmax_t)),
+
+ boost::conditional<
+ (boost::is_signed<Integer>::value),
+ Integer,
+ boost::intmax_t
+ >,
+
+ boost::conditional<
+ (sizeof(Integer) < sizeof(std::ptrdiff_t)),
+ std::ptrdiff_t,
+ boost::intmax_t
+ >
+ >::type::type difference_type;
+#endif
+ };
+
+ // Right now, only supports integers, but should be expanded.
+ template <class Number>
+ struct numeric_traits
+ {
+ typedef typename integer_traits<Number>::difference_type difference_type;
+ };
+
+ template <class Number>
+ inline BOOST_CONSTEXPR typename numeric_traits<Number>::difference_type numeric_distance(Number x, Number y)
+ {
+ typedef typename numeric_traits<Number>::difference_type difference_type;
+ return difference_type(y) - difference_type(x);
+ }
+}}
+
+#endif // BOOST_NUMERIC_TRAITS_HPP_DWA20001901
diff --git a/src/third_party/boost-1.68.0/boost/detail/quick_allocator.hpp b/src/third_party/boost-1.69.0/boost/detail/quick_allocator.hpp
index d54b3a792d7..d54b3a792d7 100644
--- a/src/third_party/boost-1.68.0/boost/detail/quick_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/quick_allocator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/reference_content.hpp b/src/third_party/boost-1.69.0/boost/detail/reference_content.hpp
new file mode 100644
index 00000000000..c93ea6fdd01
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/reference_content.hpp
@@ -0,0 +1,120 @@
+//-----------------------------------------------------------------------------
+// boost detail/reference_content.hpp header file
+// See http://www.boost.org for updates, documentation, and revision history.
+//-----------------------------------------------------------------------------
+//
+// Copyright (c) 2003
+// Eric Friedman
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_DETAIL_REFERENCE_CONTENT_HPP
+#define BOOST_DETAIL_REFERENCE_CONTENT_HPP
+
+#include "boost/config.hpp"
+
+# include "boost/type_traits/integral_constant.hpp"
+# include "boost/type_traits/has_nothrow_copy.hpp"
+
+namespace boost {
+
+namespace detail {
+
+struct void_type {};
+
+///////////////////////////////////////////////////////////////////////////////
+// (detail) class template reference_content
+//
+// Non-Assignable wrapper for references.
+//
+template <typename RefT>
+class reference_content
+{
+private: // representation
+
+ RefT content_;
+
+public: // structors
+
+ ~reference_content()
+ {
+ }
+
+ reference_content(RefT r)
+ : content_( r )
+ {
+ }
+
+ reference_content(const reference_content& operand)
+ : content_( operand.content_ )
+ {
+ }
+
+private: // non-Assignable
+
+ reference_content& operator=(const reference_content&);
+
+public: // queries
+
+ RefT get() const
+ {
+ return content_;
+ }
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+// (detail) metafunction make_reference_content
+//
+// Wraps with reference_content if specified type is reference.
+//
+
+template <typename T = void_type> struct make_reference_content;
+
+
+template <typename T>
+struct make_reference_content
+{
+ typedef T type;
+};
+
+template <typename T>
+struct make_reference_content< T& >
+{
+ typedef reference_content<T&> type;
+};
+
+
+template <>
+struct make_reference_content< void_type >
+{
+ template <typename T>
+ struct apply
+ : make_reference_content<T>
+ {
+ };
+
+ typedef void_type type;
+};
+
+} // namespace detail
+
+///////////////////////////////////////////////////////////////////////////////
+// reference_content<T&> type traits specializations
+//
+
+
+template <typename T>
+struct has_nothrow_copy<
+ ::boost::detail::reference_content< T& >
+ >
+ : boost::true_type
+{
+};
+
+
+} // namespace boost
+
+#endif // BOOST_DETAIL_REFERENCE_CONTENT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/detail/scoped_enum_emulation.hpp b/src/third_party/boost-1.69.0/boost/detail/scoped_enum_emulation.hpp
index 1c7bc23c1c3..1c7bc23c1c3 100644
--- a/src/third_party/boost-1.68.0/boost/detail/scoped_enum_emulation.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/scoped_enum_emulation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/select_type.hpp b/src/third_party/boost-1.69.0/boost/detail/select_type.hpp
index c13946f3384..c13946f3384 100644
--- a/src/third_party/boost-1.68.0/boost/detail/select_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/select_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/sp_typeinfo.hpp b/src/third_party/boost-1.69.0/boost/detail/sp_typeinfo.hpp
index 4e4de55b05c..4e4de55b05c 100644
--- a/src/third_party/boost-1.68.0/boost/detail/sp_typeinfo.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/sp_typeinfo.hpp
diff --git a/src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.hpp b/src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.hpp
new file mode 100644
index 00000000000..ad714c09e8e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.hpp
@@ -0,0 +1,219 @@
+// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
+// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
+// Distributed under the Boost Software License, Version 1.0. (See accompany-
+// ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UTF8_CODECVT_FACET_HPP
+#define BOOST_UTF8_CODECVT_FACET_HPP
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// utf8_codecvt_facet.hpp
+
+// This header defines class utf8_codecvt_facet, derived from
+// std::codecvt<wchar_t, char>, which can be used to convert utf8 data in
+// files into wchar_t strings in the application.
+//
+// The header is NOT STANDALONE, and is not to be included by the USER.
+// There are at least two libraries which want to use this functionality, and
+// we want to avoid code duplication. It would be possible to create utf8
+// library, but:
+// - this requires review process first
+// - in the case, when linking the a library which uses utf8
+// (say 'program_options'), user should also link to the utf8 library.
+// This seems inconvenient, and asking a user to link to an unrevieved
+// library is strange.
+// Until the above points are fixed, a library which wants to use utf8 must:
+// - include this header in one of it's headers or sources
+// - include the corresponding boost/detail/utf8_codecvt_facet.ipp file in one
+// of its sources
+// - before including either file, the library must define
+// - BOOST_UTF8_BEGIN_NAMESPACE to the namespace declaration that must be used
+// - BOOST_UTF8_END_NAMESPACE to the code to close the previous namespace
+// declaration.
+// - BOOST_UTF8_DECL -- to the code which must be used for all 'exportable'
+// symbols.
+//
+// For example, program_options library might contain:
+// #define BOOST_UTF8_BEGIN_NAMESPACE <backslash character>
+// namespace boost { namespace program_options {
+// #define BOOST_UTF8_END_NAMESPACE }}
+// #define BOOST_UTF8_DECL BOOST_PROGRAM_OPTIONS_DECL
+// #include <boost/detail/utf8_codecvt_facet.ipp>
+//
+// Essentially, each library will have its own copy of utf8 code, in
+// different namespaces.
+
+// Note:(Robert Ramey). I have made the following alterations in the original
+// code.
+// a) Rendered utf8_codecvt<wchar_t, char> with using templates
+// b) Move longer functions outside class definition to prevent inlining
+// and make code smaller
+// c) added on a derived class to permit translation to/from current
+// locale to utf8
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+// archives stored as text - note these ar templated on the basic
+// stream templates to accommodate wide (and other?) kind of characters
+//
+// note the fact that on libraries without wide characters, ostream is
+// is not a specialization of basic_ostream which in fact is not defined
+// in such cases. So we can't use basic_ostream<OStream::char_type> but rather
+// use two template parameters
+//
+// utf8_codecvt_facet
+// This is an implementation of a std::codecvt facet for translating
+// from UTF-8 externally to UCS-4. Note that this is not tied to
+// any specific types in order to allow customization on platforms
+// where wchar_t is not big enough.
+//
+// NOTES: The current implementation jumps through some unpleasant hoops in
+// order to deal with signed character types. As a std::codecvt_base::result,
+// it is necessary for the ExternType to be convertible to unsigned char.
+// I chose not to tie the extern_type explicitly to char. But if any combination
+// of types other than <wchar_t,char_t> is used, then std::codecvt must be
+// specialized on those types for this to work.
+
+#include <locale>
+#include <cwchar> // for mbstate_t
+#include <cstddef> // for std::size_t
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std {
+ using ::mbstate_t;
+ using ::size_t;
+}
+#endif
+
+// maximum lenght of a multibyte string
+#define MB_LENGTH_MAX 8
+
+BOOST_UTF8_BEGIN_NAMESPACE
+
+//----------------------------------------------------------------------------//
+// //
+// utf8_codecvt_facet //
+// //
+// See utf8_codecvt_facet.ipp for the implementation. //
+//----------------------------------------------------------------------------//
+
+#ifndef BOOST_UTF8_DECL
+#define BOOST_UTF8_DECL
+#endif
+
+struct BOOST_UTF8_DECL utf8_codecvt_facet :
+ public std::codecvt<wchar_t, char, std::mbstate_t>
+{
+public:
+ explicit utf8_codecvt_facet(std::size_t no_locale_manage=0);
+ virtual ~utf8_codecvt_facet();
+protected:
+ virtual std::codecvt_base::result do_in(
+ std::mbstate_t& state,
+ const char * from,
+ const char * from_end,
+ const char * & from_next,
+ wchar_t * to,
+ wchar_t * to_end,
+ wchar_t*& to_next
+ ) const;
+
+ virtual std::codecvt_base::result do_out(
+ std::mbstate_t & state,
+ const wchar_t * from,
+ const wchar_t * from_end,
+ const wchar_t* & from_next,
+ char * to,
+ char * to_end,
+ char * & to_next
+ ) const;
+
+ bool invalid_continuing_octet(unsigned char octet_1) const {
+ return (octet_1 < 0x80|| 0xbf< octet_1);
+ }
+
+ bool invalid_leading_octet(unsigned char octet_1) const {
+ return (0x7f < octet_1 && octet_1 < 0xc0) ||
+ (octet_1 > 0xfd);
+ }
+
+ // continuing octets = octets except for the leading octet
+ static unsigned int get_cont_octet_count(unsigned char lead_octet) {
+ return get_octet_count(lead_octet) - 1;
+ }
+
+ static unsigned int get_octet_count(unsigned char lead_octet);
+
+ // How many "continuing octets" will be needed for this word
+ // == total octets - 1.
+ int get_cont_octet_out_count(wchar_t word) const ;
+
+ virtual bool do_always_noconv() const BOOST_NOEXCEPT_OR_NOTHROW {
+ return false;
+ }
+
+ // UTF-8 isn't really stateful since we rewind on partial conversions
+ virtual std::codecvt_base::result do_unshift(
+ std::mbstate_t&,
+ char * from,
+ char * /*to*/,
+ char * & next
+ ) const {
+ next = from;
+ return ok;
+ }
+
+ virtual int do_encoding() const BOOST_NOEXCEPT_OR_NOTHROW {
+ const int variable_byte_external_encoding=0;
+ return variable_byte_external_encoding;
+ }
+
+ // How many char objects can I process to get <= max_limit
+ // wchar_t objects?
+ virtual int do_length(
+ std::mbstate_t &,
+ const char * from,
+ const char * from_end,
+ std::size_t max_limit
+ ) const
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
+ throw()
+#endif
+ ;
+
+ // Nonstandard override
+ virtual int do_length(
+ const std::mbstate_t & s,
+ const char * from,
+ const char * from_end,
+ std::size_t max_limit
+ ) const
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
+ throw()
+#endif
+ {
+ return do_length(
+ const_cast<std::mbstate_t &>(s),
+ from,
+ from_end,
+ max_limit
+ );
+ }
+
+ // Largest possible value do_length(state,from,from_end,1) could return.
+ virtual int do_max_length() const BOOST_NOEXCEPT_OR_NOTHROW {
+ return 6; // largest UTF-8 encoding of a UCS-4 character
+ }
+};
+
+BOOST_UTF8_END_NAMESPACE
+
+#endif // BOOST_UTF8_CODECVT_FACET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.ipp b/src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.ipp
new file mode 100644
index 00000000000..24eb61aa2d9
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/detail/utf8_codecvt_facet.ipp
@@ -0,0 +1,292 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// utf8_codecvt_facet.ipp
+
+// Copyright (c) 2001 Ronald Garcia, Indiana University (garcia@osl.iu.edu)
+// Andrew Lumsdaine, Indiana University (lums@osl.iu.edu).
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// Please see the comments in <boost/detail/utf8_codecvt_facet.hpp> to
+// learn how this file should be used.
+
+#include <boost/detail/utf8_codecvt_facet.hpp>
+
+#include <cstdlib> // for multi-byte converson routines
+#include <cassert>
+
+#include <boost/limits.hpp>
+#include <boost/config.hpp>
+
+// If we don't have wstring, then Unicode support
+// is not available anyway, so we don't need to even
+// compiler this file. This also fixes the problem
+// with mingw, which can compile this file, but will
+// generate link error when building DLL.
+#ifndef BOOST_NO_STD_WSTRING
+
+BOOST_UTF8_BEGIN_NAMESPACE
+
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// implementation for wchar_t
+
+utf8_codecvt_facet::utf8_codecvt_facet(
+ std::size_t no_locale_manage
+) :
+ std::codecvt<wchar_t, char, std::mbstate_t>(no_locale_manage)
+{}
+
+utf8_codecvt_facet::~utf8_codecvt_facet()
+{}
+
+// Translate incoming UTF-8 into UCS-4
+std::codecvt_base::result utf8_codecvt_facet::do_in(
+ std::mbstate_t& /*state*/,
+ const char * from,
+ const char * from_end,
+ const char * & from_next,
+ wchar_t * to,
+ wchar_t * to_end,
+ wchar_t * & to_next
+) const {
+ // Basic algorithm: The first octet determines how many
+ // octets total make up the UCS-4 character. The remaining
+ // "continuing octets" all begin with "10". To convert, subtract
+ // the amount that specifies the number of octets from the first
+ // octet. Subtract 0x80 (1000 0000) from each continuing octet,
+ // then mash the whole lot together. Note that each continuing
+ // octet only uses 6 bits as unique values, so only shift by
+ // multiples of 6 to combine.
+ while (from != from_end && to != to_end) {
+
+ // Error checking on the first octet
+ if (invalid_leading_octet(*from)){
+ from_next = from;
+ to_next = to;
+ return std::codecvt_base::error;
+ }
+
+ // The first octet is adjusted by a value dependent upon
+ // the number of "continuing octets" encoding the character
+ const int cont_octet_count = get_cont_octet_count(*from);
+ const wchar_t octet1_modifier_table[] = {
+ 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc
+ };
+
+ // The unsigned char conversion is necessary in case char is
+ // signed (I learned this the hard way)
+ wchar_t ucs_result =
+ (unsigned char)(*from++) - octet1_modifier_table[cont_octet_count];
+
+ // Invariants :
+ // 1) At the start of the loop, 'i' continuing characters have been
+ // processed
+ // 2) *from points to the next continuing character to be processed.
+ int i = 0;
+ while(i != cont_octet_count && from != from_end) {
+
+ // Error checking on continuing characters
+ if (invalid_continuing_octet(*from)) {
+ from_next = from;
+ to_next = to;
+ return std::codecvt_base::error;
+ }
+
+ ucs_result *= (1 << 6);
+
+ // each continuing character has an extra (10xxxxxx)b attached to
+ // it that must be removed.
+ ucs_result += (unsigned char)(*from++) - 0x80;
+ ++i;
+ }
+
+ // If the buffer ends with an incomplete unicode character...
+ if (from == from_end && i != cont_octet_count) {
+ // rewind "from" to before the current character translation
+ from_next = from - (i+1);
+ to_next = to;
+ return std::codecvt_base::partial;
+ }
+ *to++ = ucs_result;
+ }
+ from_next = from;
+ to_next = to;
+
+ // Were we done converting or did we run out of destination space?
+ if(from == from_end) return std::codecvt_base::ok;
+ else return std::codecvt_base::partial;
+}
+
+std::codecvt_base::result utf8_codecvt_facet::do_out(
+ std::mbstate_t& /*state*/,
+ const wchar_t * from,
+ const wchar_t * from_end,
+ const wchar_t * & from_next,
+ char * to,
+ char * to_end,
+ char * & to_next
+) const
+{
+ // RG - consider merging this table with the other one
+ const wchar_t octet1_modifier_table[] = {
+ 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc
+ };
+
+ wchar_t max_wchar = (std::numeric_limits<wchar_t>::max)();
+ while (from != from_end && to != to_end) {
+
+ // Check for invalid UCS-4 character
+ if (*from > max_wchar) {
+ from_next = from;
+ to_next = to;
+ return std::codecvt_base::error;
+ }
+
+ int cont_octet_count = get_cont_octet_out_count(*from);
+
+ // RG - comment this formula better
+ int shift_exponent = (cont_octet_count) * 6;
+
+ // Process the first character
+ *to++ = static_cast<char>(octet1_modifier_table[cont_octet_count] +
+ (unsigned char)(*from / (1 << shift_exponent)));
+
+ // Process the continuation characters
+ // Invariants: At the start of the loop:
+ // 1) 'i' continuing octets have been generated
+ // 2) '*to' points to the next location to place an octet
+ // 3) shift_exponent is 6 more than needed for the next octet
+ int i = 0;
+ while (i != cont_octet_count && to != to_end) {
+ shift_exponent -= 6;
+ *to++ = static_cast<char>(0x80 + ((*from / (1 << shift_exponent)) % (1 << 6)));
+ ++i;
+ }
+ // If we filled up the out buffer before encoding the character
+ if(to == to_end && i != cont_octet_count) {
+ from_next = from;
+ to_next = to - (i+1);
+ return std::codecvt_base::partial;
+ }
+ ++from;
+ }
+ from_next = from;
+ to_next = to;
+ // Were we done or did we run out of destination space
+ if(from == from_end) return std::codecvt_base::ok;
+ else return std::codecvt_base::partial;
+}
+
+// How many char objects can I process to get <= max_limit
+// wchar_t objects?
+int utf8_codecvt_facet::do_length(
+ std::mbstate_t &,
+ const char * from,
+ const char * from_end,
+ std::size_t max_limit
+) const
+#if BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600))
+ throw()
+#endif
+{
+ // RG - this code is confusing! I need a better way to express it.
+ // and test cases.
+
+ // Invariants:
+ // 1) last_octet_count has the size of the last measured character
+ // 2) char_count holds the number of characters shown to fit
+ // within the bounds so far (no greater than max_limit)
+ // 3) from_next points to the octet 'last_octet_count' before the
+ // last measured character.
+ int last_octet_count=0;
+ std::size_t char_count = 0;
+ const char* from_next = from;
+ // Use "<" because the buffer may represent incomplete characters
+ while (from_next+last_octet_count <= from_end && char_count <= max_limit) {
+ from_next += last_octet_count;
+ last_octet_count = (get_octet_count(*from_next));
+ ++char_count;
+ }
+ return static_cast<int>(from_next-from);
+}
+
+unsigned int utf8_codecvt_facet::get_octet_count(
+ unsigned char lead_octet
+){
+ // if the 0-bit (MSB) is 0, then 1 character
+ if (lead_octet <= 0x7f) return 1;
+
+ // Otherwise the count number of consecutive 1 bits starting at MSB
+// assert(0xc0 <= lead_octet && lead_octet <= 0xfd);
+
+ if (0xc0 <= lead_octet && lead_octet <= 0xdf) return 2;
+ else if (0xe0 <= lead_octet && lead_octet <= 0xef) return 3;
+ else if (0xf0 <= lead_octet && lead_octet <= 0xf7) return 4;
+ else if (0xf8 <= lead_octet && lead_octet <= 0xfb) return 5;
+ else return 6;
+}
+
+namespace detail {
+
+template<std::size_t s>
+int get_cont_octet_out_count_impl(wchar_t word){
+ if (word < 0x80) {
+ return 0;
+ }
+ if (word < 0x800) {
+ return 1;
+ }
+ return 2;
+}
+
+template<>
+int get_cont_octet_out_count_impl<4>(wchar_t word){
+ if (word < 0x80) {
+ return 0;
+ }
+ if (word < 0x800) {
+ return 1;
+ }
+
+ // Note that the following code will generate warnings on some platforms
+ // where wchar_t is defined as UCS2. The warnings are superfluous as the
+ // specialization is never instantitiated with such compilers, but this
+ // can cause problems if warnings are being treated as errors, so we guard
+ // against that. Including <boost/detail/utf8_codecvt_facet.hpp> as we do
+ // should be enough to get WCHAR_MAX defined.
+#if !defined(WCHAR_MAX)
+# error WCHAR_MAX not defined!
+#endif
+ // cope with VC++ 7.1 or earlier having invalid WCHAR_MAX
+#if defined(_MSC_VER) && _MSC_VER <= 1310 // 7.1 or earlier
+ return 2;
+#elif WCHAR_MAX > 0x10000
+
+ if (word < 0x10000) {
+ return 2;
+ }
+ if (word < 0x200000) {
+ return 3;
+ }
+ if (word < 0x4000000) {
+ return 4;
+ }
+ return 5;
+
+#else
+ return 2;
+#endif
+}
+
+} // namespace detail
+
+// How many "continuing octets" will be needed for this word
+// == total octets - 1.
+int utf8_codecvt_facet::get_cont_octet_out_count(
+ wchar_t word
+) const {
+ return detail::get_cont_octet_out_count_impl<sizeof(wchar_t)>(word);
+}
+BOOST_UTF8_END_NAMESPACE
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/detail/winapi/detail/deprecated_namespace.hpp b/src/third_party/boost-1.69.0/boost/detail/winapi/detail/deprecated_namespace.hpp
index 40c9152704b..40c9152704b 100644
--- a/src/third_party/boost-1.68.0/boost/detail/winapi/detail/deprecated_namespace.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/winapi/detail/deprecated_namespace.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/winapi/get_current_process.hpp b/src/third_party/boost-1.69.0/boost/detail/winapi/get_current_process.hpp
index b6a79150281..b6a79150281 100644
--- a/src/third_party/boost-1.68.0/boost/detail/winapi/get_current_process.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/winapi/get_current_process.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/winapi/get_current_thread.hpp b/src/third_party/boost-1.69.0/boost/detail/winapi/get_current_thread.hpp
index f9a27c3e6ec..f9a27c3e6ec 100644
--- a/src/third_party/boost-1.68.0/boost/detail/winapi/get_current_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/winapi/get_current_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/winapi/get_last_error.hpp b/src/third_party/boost-1.69.0/boost/detail/winapi/get_last_error.hpp
index f76a008e080..f76a008e080 100644
--- a/src/third_party/boost-1.68.0/boost/detail/winapi/get_last_error.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/winapi/get_last_error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/winapi/get_process_times.hpp b/src/third_party/boost-1.69.0/boost/detail/winapi/get_process_times.hpp
index 6babb3919d8..6babb3919d8 100644
--- a/src/third_party/boost-1.68.0/boost/detail/winapi/get_process_times.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/winapi/get_process_times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/winapi/get_thread_times.hpp b/src/third_party/boost-1.69.0/boost/detail/winapi/get_thread_times.hpp
index 96f1fac8f37..96f1fac8f37 100644
--- a/src/third_party/boost-1.68.0/boost/detail/winapi/get_thread_times.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/winapi/get_thread_times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/winapi/time.hpp b/src/third_party/boost-1.69.0/boost/detail/winapi/time.hpp
index a6d728a5a03..a6d728a5a03 100644
--- a/src/third_party/boost-1.68.0/boost/detail/winapi/time.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/winapi/time.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/winapi/timers.hpp b/src/third_party/boost-1.69.0/boost/detail/winapi/timers.hpp
index 4b874e249d1..4b874e249d1 100644
--- a/src/third_party/boost-1.68.0/boost/detail/winapi/timers.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/winapi/timers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/detail/workaround.hpp b/src/third_party/boost-1.69.0/boost/detail/workaround.hpp
index fb961158804..fb961158804 100644
--- a/src/third_party/boost-1.68.0/boost/detail/workaround.hpp
+++ b/src/third_party/boost-1.69.0/boost/detail/workaround.hpp
diff --git a/src/third_party/boost-1.68.0/boost/dynamic_bitset.hpp b/src/third_party/boost-1.69.0/boost/dynamic_bitset.hpp
index 29e103862eb..29e103862eb 100644
--- a/src/third_party/boost-1.68.0/boost/dynamic_bitset.hpp
+++ b/src/third_party/boost-1.69.0/boost/dynamic_bitset.hpp
diff --git a/src/third_party/boost-1.68.0/boost/dynamic_bitset/config.hpp b/src/third_party/boost-1.69.0/boost/dynamic_bitset/config.hpp
index 1e6d9f7e471..1e6d9f7e471 100644
--- a/src/third_party/boost-1.68.0/boost/dynamic_bitset/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/dynamic_bitset/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp b/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp
new file mode 100644
index 00000000000..599994662c2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/dynamic_bitset.hpp
@@ -0,0 +1,293 @@
+// -----------------------------------------------------------
+//
+// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
+// Copyright (c) 2003-2006, 2008 Gennaro Prota
+// Copyright (c) 2014 Glen Joseph Fernandes
+// (glenjofe@gmail.com)
+// Copyright (c) 2018 Evgeny Shulgin
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// -----------------------------------------------------------
+
+#ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP
+#define BOOST_DETAIL_DYNAMIC_BITSET_HPP
+
+#include <memory>
+#include <cstddef>
+#include "boost/config.hpp"
+#include "boost/detail/workaround.hpp"
+
+#if ((defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+#include <intrin.h>
+#endif
+
+namespace boost {
+
+ namespace detail {
+ namespace dynamic_bitset_impl {
+
+ // Gives (read-)access to the object representation
+ // of an object of type T (3.9p4). CANNOT be used
+ // on a base sub-object
+ //
+ template <typename T>
+ inline const unsigned char * object_representation (T* p)
+ {
+ return static_cast<const unsigned char *>(static_cast<const void *>(p));
+ }
+
+ template<typename T, int amount, int width /* = default */>
+ struct shifter
+ {
+ static void left_shift(T & v) {
+ amount >= width ? (v = 0)
+ : (v >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(amount));
+ }
+ };
+
+ // ------- count function implementation --------------
+
+ typedef unsigned char byte_type;
+
+ // These two entities
+ //
+ // enum mode { access_by_bytes, access_by_blocks };
+ // template <mode> struct mode_to_type {};
+ //
+ // were removed, since the regression logs (as of 24 Aug 2008)
+ // showed that several compilers had troubles with recognizing
+ //
+ // const mode m = access_by_bytes
+ //
+ // as a constant expression
+ //
+ // * So, we'll use bool, instead of enum *.
+ //
+ template <bool value>
+ struct value_to_type
+ {
+ value_to_type() {}
+ };
+ const bool access_by_bytes = true;
+ const bool access_by_blocks = false;
+
+
+ // the table: wrapped in a class template, so
+ // that it is only instantiated if/when needed
+ //
+ template <bool dummy_name = true>
+ struct count_table { static const byte_type table[]; };
+
+ template <>
+ struct count_table<false> { /* no table */ };
+
+
+ const unsigned int table_width = 8;
+ template <bool b>
+ const byte_type count_table<b>::table[] =
+ {
+ // Automatically generated by GPTableGen.exe v.1.0
+ //
+ 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7,
+ 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
+ };
+
+
+ // overload for access by bytes
+ //
+
+ template <typename Iterator>
+ inline std::size_t do_count(Iterator first, std::size_t length,
+ int /*dummy param*/,
+ value_to_type<access_by_bytes>* )
+ {
+ std::size_t num = 0;
+ if (length)
+ {
+ const byte_type * p = object_representation(&*first);
+ length *= sizeof(*first);
+
+ do {
+ num += count_table<>::table[*p];
+ ++p;
+ --length;
+
+ } while (length);
+ }
+
+ return num;
+ }
+
+
+ // Some platforms have fast popcount operation, that allow us to implement
+ // counting bits much more efficiently
+ //
+ template <typename ValueType>
+ BOOST_FORCEINLINE std::size_t popcount(ValueType value) BOOST_NOEXCEPT
+ {
+ std::size_t num = 0;
+ while (value) {
+ num += count_table<>::table[value & ((1u<<table_width) - 1)];
+ value >>= table_width;
+ }
+ return num;
+ }
+
+#if ((defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+ template <>
+ BOOST_FORCEINLINE std::size_t popcount<unsigned short>(unsigned short value) BOOST_NOEXCEPT
+ {
+ return static_cast<std::size_t>(__popcnt16(value));
+ }
+
+ template <>
+ BOOST_FORCEINLINE std::size_t popcount<unsigned int>(unsigned int value) BOOST_NOEXCEPT
+ {
+ return static_cast<std::size_t>(__popcnt(value));
+ }
+
+#ifdef _M_X64
+ template <>
+ BOOST_FORCEINLINE std::size_t popcount<unsigned __int64>(unsigned __int64 value) BOOST_NOEXCEPT
+ {
+ return static_cast<std::size_t>(__popcnt64(value));
+ }
+#endif
+
+#elif defined(BOOST_GCC) || defined(__clang__) || (defined(BOOST_INTEL) && defined(__GNUC__))
+ template <>
+ BOOST_FORCEINLINE std::size_t popcount<unsigned int>(unsigned int value) BOOST_NOEXCEPT
+ {
+ return __builtin_popcount(value);
+ }
+
+ template <>
+ BOOST_FORCEINLINE std::size_t popcount<unsigned long>(unsigned long value) BOOST_NOEXCEPT
+ {
+ return __builtin_popcountl(value);
+ }
+
+ template <>
+ BOOST_FORCEINLINE std::size_t popcount<boost::ulong_long_type>(boost::ulong_long_type value) BOOST_NOEXCEPT
+ {
+ return __builtin_popcountll(value);
+ }
+#endif
+
+ // overload for access by blocks
+ //
+ template <typename Iterator, typename ValueType>
+ inline std::size_t do_count(Iterator first, std::size_t length, ValueType,
+ value_to_type<access_by_blocks>*)
+ {
+ std::size_t num = 0;
+ while (length){
+ num += popcount<ValueType>(*first);
+ ++first;
+ --length;
+ }
+
+ return num;
+ }
+
+ // -------------------------------------------------------
+
+
+ // Some library implementations simply return a dummy
+ // value such as
+ //
+ // size_type(-1) / sizeof(T)
+ //
+ // from vector<>::max_size. This tries to get more
+ // meaningful info.
+ //
+ template <typename T>
+ inline typename T::size_type vector_max_size_workaround(const T & v)
+ BOOST_NOEXCEPT
+ {
+ typedef typename T::allocator_type allocator_type;
+
+ const allocator_type& alloc = v.get_allocator();
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+ typedef std::allocator_traits<allocator_type> allocator_traits;
+
+ const typename allocator_traits::size_type alloc_max =
+ allocator_traits::max_size(alloc);
+#else
+ const typename allocator_type::size_type alloc_max = alloc.max_size();
+#endif
+
+ const typename T::size_type container_max = v.max_size();
+
+ return alloc_max < container_max ? alloc_max : container_max;
+ }
+
+ // for static_asserts
+ template <typename T>
+ struct allowed_block_type {
+ enum { value = T(-1) > 0 }; // ensure T has no sign
+ };
+
+ template <>
+ struct allowed_block_type<bool> {
+ enum { value = false };
+ };
+
+
+ template <typename T>
+ struct is_numeric {
+ enum { value = false };
+ };
+
+# define BOOST_dynamic_bitset_is_numeric(x) \
+ template<> \
+ struct is_numeric< x > { \
+ enum { value = true }; \
+ } /**/
+
+ BOOST_dynamic_bitset_is_numeric(bool);
+ BOOST_dynamic_bitset_is_numeric(char);
+
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+ BOOST_dynamic_bitset_is_numeric(wchar_t);
+#endif
+
+ BOOST_dynamic_bitset_is_numeric(signed char);
+ BOOST_dynamic_bitset_is_numeric(short int);
+ BOOST_dynamic_bitset_is_numeric(int);
+ BOOST_dynamic_bitset_is_numeric(long int);
+
+ BOOST_dynamic_bitset_is_numeric(unsigned char);
+ BOOST_dynamic_bitset_is_numeric(unsigned short);
+ BOOST_dynamic_bitset_is_numeric(unsigned int);
+ BOOST_dynamic_bitset_is_numeric(unsigned long);
+
+#if defined(BOOST_HAS_LONG_LONG)
+ BOOST_dynamic_bitset_is_numeric(::boost::long_long_type);
+ BOOST_dynamic_bitset_is_numeric(::boost::ulong_long_type);
+#endif
+
+ // intentionally omitted
+ //BOOST_dynamic_bitset_is_numeric(float);
+ //BOOST_dynamic_bitset_is_numeric(double);
+ //BOOST_dynamic_bitset_is_numeric(long double);
+
+#undef BOOST_dynamic_bitset_is_numeric
+
+ } // dynamic_bitset_impl
+ } // namespace detail
+
+} // namespace boost
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/lowest_bit.hpp b/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/lowest_bit.hpp
new file mode 100644
index 00000000000..42f6fb6174f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/dynamic_bitset/detail/lowest_bit.hpp
@@ -0,0 +1,39 @@
+// -----------------------------------------------------------
+// lowest_bit.hpp
+//
+// Position of the lowest bit 'on'
+//
+// Copyright (c) 2003-2004, 2008 Gennaro Prota
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// -----------------------------------------------------------
+
+#ifndef BOOST_LOWEST_BIT_HPP_GP_20030301
+#define BOOST_LOWEST_BIT_HPP_GP_20030301
+
+#include "boost/integer/integer_log2.hpp"
+#include "boost/assert.hpp"
+
+namespace boost {
+namespace detail {
+
+ template <typename T>
+ int lowest_bit(T x) {
+
+ BOOST_ASSERT(x >= 1); // PRE
+
+ // clear all bits on except the rightmost one,
+ // then calculate the logarithm base 2
+ //
+ return boost::integer_log2<T>( x - ( x & (x-1) ) );
+
+ }
+
+}
+}
+
+
+#endif // include guard
diff --git a/src/third_party/boost-1.69.0/boost/dynamic_bitset/dynamic_bitset.hpp b/src/third_party/boost-1.69.0/boost/dynamic_bitset/dynamic_bitset.hpp
new file mode 100644
index 00000000000..a128a698455
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/dynamic_bitset/dynamic_bitset.hpp
@@ -0,0 +1,2113 @@
+// -----------------------------------------------------------
+//
+// Copyright (c) 2001-2002 Chuck Allison and Jeremy Siek
+// Copyright (c) 2003-2006, 2008 Gennaro Prota
+// Copyright (c) 2014 Ahmed Charles
+//
+// Copyright (c) 2014 Glen Joseph Fernandes
+// (glenjofe@gmail.com)
+//
+// Copyright (c) 2014 Riccardo Marcangelo
+// Copyright (c) 2018 Evgeny Shulgin
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// -----------------------------------------------------------
+
+#ifndef BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP
+#define BOOST_DYNAMIC_BITSET_DYNAMIC_BITSET_HPP
+
+#include <assert.h>
+#include <string>
+#include <stdexcept>
+#include <algorithm>
+#include <vector>
+#include <climits> // for CHAR_BIT
+
+#include "boost/dynamic_bitset/config.hpp"
+
+#ifndef BOOST_NO_STD_LOCALE
+# include <locale>
+#endif
+
+#if defined(BOOST_OLD_IOSTREAMS)
+# include <iostream.h>
+# include <ctype.h> // for isspace
+#else
+# include <istream>
+# include <ostream>
+#endif
+
+#include "boost/dynamic_bitset_fwd.hpp"
+#include "boost/dynamic_bitset/detail/dynamic_bitset.hpp"
+#include "boost/dynamic_bitset/detail/lowest_bit.hpp"
+#include "boost/detail/iterator.hpp" // used to implement append(Iter, Iter)
+#include "boost/move/move.hpp"
+#include "boost/limits.hpp"
+#include "boost/static_assert.hpp"
+#include "boost/utility/addressof.hpp"
+#include "boost/detail/no_exceptions_support.hpp"
+#include "boost/throw_exception.hpp"
+
+
+namespace boost {
+
+template <typename Block, typename Allocator>
+class dynamic_bitset
+{
+ // Portability note: member function templates are defined inside
+ // this class definition to avoid problems with VC++. Similarly,
+ // with the member functions of nested classes.
+ //
+ // [October 2008: the note above is mostly historical; new versions
+ // of VC++ are likely able to digest a more drinking form of the
+ // code; but changing it now is probably not worth the risks...]
+
+ BOOST_STATIC_ASSERT((bool)detail::dynamic_bitset_impl::allowed_block_type<Block>::value);
+ typedef std::vector<Block, Allocator> buffer_type;
+
+public:
+ typedef Block block_type;
+ typedef Allocator allocator_type;
+ typedef std::size_t size_type;
+ typedef typename buffer_type::size_type block_width_type;
+
+ BOOST_STATIC_CONSTANT(block_width_type, bits_per_block = (std::numeric_limits<Block>::digits));
+ BOOST_STATIC_CONSTANT(size_type, npos = static_cast<size_type>(-1));
+
+
+public:
+
+ // A proxy class to simulate lvalues of bit type.
+ //
+ class reference
+ {
+ friend class dynamic_bitset<Block, Allocator>;
+
+
+ // the one and only non-copy ctor
+ reference(block_type & b, block_width_type pos)
+ :m_block(b),
+ m_mask( (assert(pos < bits_per_block),
+ block_type(1) << pos )
+ )
+ { }
+
+ void operator&(); // left undefined
+
+ public:
+
+ // copy constructor: compiler generated
+
+ operator bool() const { return (m_block & m_mask) != 0; }
+ bool operator~() const { return (m_block & m_mask) == 0; }
+
+ reference& flip() { do_flip(); return *this; }
+
+ reference& operator=(bool x) { do_assign(x); return *this; } // for b[i] = x
+ reference& operator=(const reference& rhs) { do_assign(rhs); return *this; } // for b[i] = b[j]
+
+ reference& operator|=(bool x) { if (x) do_set(); return *this; }
+ reference& operator&=(bool x) { if (!x) do_reset(); return *this; }
+ reference& operator^=(bool x) { if (x) do_flip(); return *this; }
+ reference& operator-=(bool x) { if (x) do_reset(); return *this; }
+
+ private:
+ block_type & m_block;
+ const block_type m_mask;
+
+ void do_set() { m_block |= m_mask; }
+ void do_reset() { m_block &= ~m_mask; }
+ void do_flip() { m_block ^= m_mask; }
+ void do_assign(bool x) { x? do_set() : do_reset(); }
+ };
+
+ typedef bool const_reference;
+
+ // constructors, etc.
+ explicit
+ dynamic_bitset(const Allocator& alloc = Allocator());
+
+ explicit
+ dynamic_bitset(size_type num_bits, unsigned long value = 0,
+ const Allocator& alloc = Allocator());
+
+
+ // WARNING: you should avoid using this constructor.
+ //
+ // A conversion from string is, in most cases, formatting,
+ // and should be performed by using operator>>.
+ //
+ // NOTE:
+ // Leave the parentheses around std::basic_string<CharT, Traits, Alloc>::npos.
+ // g++ 3.2 requires them and probably the standard will - see core issue 325
+ // NOTE 2:
+ // split into two constructors because of bugs in MSVC 6.0sp5 with STLport
+
+ template <typename CharT, typename Traits, typename Alloc>
+ dynamic_bitset(const std::basic_string<CharT, Traits, Alloc>& s,
+ typename std::basic_string<CharT, Traits, Alloc>::size_type pos,
+ typename std::basic_string<CharT, Traits, Alloc>::size_type n,
+ size_type num_bits = npos,
+ const Allocator& alloc = Allocator())
+
+ :m_bits(alloc),
+ m_num_bits(0)
+ {
+ init_from_string(s, pos, n, num_bits);
+ }
+
+ template <typename CharT, typename Traits, typename Alloc>
+ explicit
+ dynamic_bitset(const std::basic_string<CharT, Traits, Alloc>& s,
+ typename std::basic_string<CharT, Traits, Alloc>::size_type pos = 0)
+
+ :m_bits(Allocator()),
+ m_num_bits(0)
+ {
+ init_from_string(s, pos, (std::basic_string<CharT, Traits, Alloc>::npos),
+ npos);
+ }
+
+ // The first bit in *first is the least significant bit, and the
+ // last bit in the block just before *last is the most significant bit.
+ template <typename BlockInputIterator>
+ dynamic_bitset(BlockInputIterator first, BlockInputIterator last,
+ const Allocator& alloc = Allocator())
+
+ :m_bits(alloc),
+ m_num_bits(0)
+ {
+ using boost::detail::dynamic_bitset_impl::value_to_type;
+ using boost::detail::dynamic_bitset_impl::is_numeric;
+
+ const value_to_type<
+ is_numeric<BlockInputIterator>::value> selector;
+
+ dispatch_init(first, last, selector);
+ }
+
+ template <typename T>
+ void dispatch_init(T num_bits, unsigned long value,
+ detail::dynamic_bitset_impl::value_to_type<true>)
+ {
+ init_from_unsigned_long(static_cast<size_type>(num_bits), value);
+ }
+
+ template <typename T>
+ void dispatch_init(T first, T last,
+ detail::dynamic_bitset_impl::value_to_type<false>)
+ {
+ init_from_block_range(first, last);
+ }
+
+ template <typename BlockIter>
+ void init_from_block_range(BlockIter first, BlockIter last)
+ {
+ assert(m_bits.size() == 0);
+ m_bits.insert(m_bits.end(), first, last);
+ m_num_bits = m_bits.size() * bits_per_block;
+ }
+
+ // copy constructor
+ dynamic_bitset(const dynamic_bitset& b);
+
+ ~dynamic_bitset();
+
+ void swap(dynamic_bitset& b);
+ dynamic_bitset& operator=(const dynamic_bitset& b);
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ dynamic_bitset(dynamic_bitset&& src);
+ dynamic_bitset& operator=(dynamic_bitset&& src);
+#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
+
+ allocator_type get_allocator() const;
+
+ // size changing operations
+ void resize(size_type num_bits, bool value = false);
+ void clear();
+ void push_back(bool bit);
+ void pop_back();
+ void append(Block block);
+
+ template <typename BlockInputIterator>
+ void m_append(BlockInputIterator first, BlockInputIterator last, std::input_iterator_tag)
+ {
+ std::vector<Block, Allocator> v(first, last);
+ m_append(v.begin(), v.end(), std::random_access_iterator_tag());
+ }
+ template <typename BlockInputIterator>
+ void m_append(BlockInputIterator first, BlockInputIterator last, std::forward_iterator_tag)
+ {
+ assert(first != last);
+ block_width_type r = count_extra_bits();
+ std::size_t d = boost::detail::distance(first, last);
+ m_bits.reserve(num_blocks() + d);
+ if (r == 0) {
+ for( ; first != last; ++first)
+ m_bits.push_back(*first); // could use vector<>::insert()
+ }
+ else {
+ m_highest_block() |= (*first << r);
+ do {
+ Block b = *first >> (bits_per_block - r);
+ ++first;
+ m_bits.push_back(b | (first==last? 0 : *first << r));
+ } while (first != last);
+ }
+ m_num_bits += bits_per_block * d;
+ }
+ template <typename BlockInputIterator>
+ void append(BlockInputIterator first, BlockInputIterator last) // strong guarantee
+ {
+ if (first != last) {
+ typename detail::iterator_traits<BlockInputIterator>::iterator_category cat;
+ m_append(first, last, cat);
+ }
+ }
+
+
+ // bitset operations
+ dynamic_bitset& operator&=(const dynamic_bitset& b);
+ dynamic_bitset& operator|=(const dynamic_bitset& b);
+ dynamic_bitset& operator^=(const dynamic_bitset& b);
+ dynamic_bitset& operator-=(const dynamic_bitset& b);
+ dynamic_bitset& operator<<=(size_type n);
+ dynamic_bitset& operator>>=(size_type n);
+ dynamic_bitset operator<<(size_type n) const;
+ dynamic_bitset operator>>(size_type n) const;
+
+ // basic bit operations
+ dynamic_bitset& set(size_type n, size_type len, bool val /* = true */); // default would make it ambiguous
+ dynamic_bitset& set(size_type n, bool val = true);
+ dynamic_bitset& set();
+ dynamic_bitset& reset(size_type n, size_type len);
+ dynamic_bitset& reset(size_type n);
+ dynamic_bitset& reset();
+ dynamic_bitset& flip(size_type n, size_type len);
+ dynamic_bitset& flip(size_type n);
+ dynamic_bitset& flip();
+ bool test(size_type n) const;
+ bool test_set(size_type n, bool val = true);
+ bool all() const;
+ bool any() const;
+ bool none() const;
+ dynamic_bitset operator~() const;
+ size_type count() const BOOST_NOEXCEPT;
+
+ // subscript
+ reference operator[](size_type pos) {
+ return reference(m_bits[block_index(pos)], bit_index(pos));
+ }
+ bool operator[](size_type pos) const { return test(pos); }
+
+ unsigned long to_ulong() const;
+
+ size_type size() const BOOST_NOEXCEPT;
+ size_type num_blocks() const BOOST_NOEXCEPT;
+ size_type max_size() const BOOST_NOEXCEPT;
+ bool empty() const BOOST_NOEXCEPT;
+ size_type capacity() const BOOST_NOEXCEPT;
+ void reserve(size_type num_bits);
+ void shrink_to_fit();
+
+ bool is_subset_of(const dynamic_bitset& a) const;
+ bool is_proper_subset_of(const dynamic_bitset& a) const;
+ bool intersects(const dynamic_bitset & a) const;
+
+ // lookup
+ size_type find_first() const;
+ size_type find_next(size_type pos) const;
+
+
+#if !defined BOOST_DYNAMIC_BITSET_DONT_USE_FRIENDS
+ // lexicographical comparison
+ template <typename B, typename A>
+ friend bool operator==(const dynamic_bitset<B, A>& a,
+ const dynamic_bitset<B, A>& b);
+
+ template <typename B, typename A>
+ friend bool operator<(const dynamic_bitset<B, A>& a,
+ const dynamic_bitset<B, A>& b);
+
+ template <typename B, typename A>
+ friend bool oplessthan(const dynamic_bitset<B, A>& a,
+ const dynamic_bitset<B, A>& b);
+
+
+ template <typename B, typename A, typename BlockOutputIterator>
+ friend void to_block_range(const dynamic_bitset<B, A>& b,
+ BlockOutputIterator result);
+
+ template <typename BlockIterator, typename B, typename A>
+ friend void from_block_range(BlockIterator first, BlockIterator last,
+ dynamic_bitset<B, A>& result);
+
+
+ template <typename CharT, typename Traits, typename B, typename A>
+ friend std::basic_istream<CharT, Traits>& operator>>(std::basic_istream<CharT, Traits>& is,
+ dynamic_bitset<B, A>& b);
+
+ template <typename B, typename A, typename stringT>
+ friend void to_string_helper(const dynamic_bitset<B, A> & b, stringT & s, bool dump_all);
+
+
+#endif
+
+public:
+ // forward declaration for optional zero-copy serialization support
+ class serialize_impl;
+ friend class serialize_impl;
+
+private:
+ BOOST_STATIC_CONSTANT(block_width_type, ulong_width = std::numeric_limits<unsigned long>::digits);
+
+ dynamic_bitset& range_operation(size_type pos, size_type len,
+ Block (*partial_block_operation)(Block, size_type, size_type),
+ Block (*full_block_operation)(Block));
+ void m_zero_unused_bits();
+ bool m_check_invariants() const;
+
+ size_type m_do_find_from(size_type first_block) const;
+
+ block_width_type count_extra_bits() const BOOST_NOEXCEPT { return bit_index(size()); }
+ static size_type block_index(size_type pos) BOOST_NOEXCEPT { return pos / bits_per_block; }
+ static block_width_type bit_index(size_type pos) BOOST_NOEXCEPT { return static_cast<block_width_type>(pos % bits_per_block); }
+ static Block bit_mask(size_type pos) BOOST_NOEXCEPT { return Block(1) << bit_index(pos); }
+ static Block bit_mask(size_type first, size_type last) BOOST_NOEXCEPT
+ {
+ Block res = (last == bits_per_block - 1)
+ ? static_cast<Block>(~0)
+ : ((Block(1) << (last + 1)) - 1);
+ res ^= (Block(1) << first) - 1;
+ return res;
+ }
+ static Block set_block_bits(Block block, size_type first,
+ size_type last, bool val) BOOST_NOEXCEPT
+ {
+ if (val)
+ return block | bit_mask(first, last);
+ else
+ return block & static_cast<Block>(~bit_mask(first, last));
+ }
+
+ // Functions for operations on ranges
+ inline static Block set_block_partial(Block block, size_type first,
+ size_type last) BOOST_NOEXCEPT
+ {
+ return set_block_bits(block, first, last, true);
+ }
+ inline static Block set_block_full(Block) BOOST_NOEXCEPT
+ {
+ return static_cast<Block>(~0);
+ }
+ inline static Block reset_block_partial(Block block, size_type first,
+ size_type last) BOOST_NOEXCEPT
+ {
+ return set_block_bits(block, first, last, false);
+ }
+ inline static Block reset_block_full(Block) BOOST_NOEXCEPT
+ {
+ return 0;
+ }
+ inline static Block flip_block_partial(Block block, size_type first,
+ size_type last) BOOST_NOEXCEPT
+ {
+ return block ^ bit_mask(first, last);
+ }
+ inline static Block flip_block_full(Block block) BOOST_NOEXCEPT
+ {
+ return ~block;
+ }
+
+ template <typename CharT, typename Traits, typename Alloc>
+ void init_from_string(const std::basic_string<CharT, Traits, Alloc>& s,
+ typename std::basic_string<CharT, Traits, Alloc>::size_type pos,
+ typename std::basic_string<CharT, Traits, Alloc>::size_type n,
+ size_type num_bits)
+ {
+ assert(pos <= s.size());
+
+ typedef typename std::basic_string<CharT, Traits, Alloc> StrT;
+ typedef typename StrT::traits_type Tr;
+
+ const typename StrT::size_type rlen = (std::min)(n, s.size() - pos);
+ const size_type sz = ( num_bits != npos? num_bits : rlen);
+ m_bits.resize(calc_num_blocks(sz));
+ m_num_bits = sz;
+
+
+ BOOST_DYNAMIC_BITSET_CTYPE_FACET(CharT, fac, std::locale());
+ const CharT one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
+
+ const size_type m = num_bits < rlen ? num_bits : rlen;
+ typename StrT::size_type i = 0;
+ for( ; i < m; ++i) {
+
+ const CharT c = s[(pos + m - 1) - i];
+
+ assert( Tr::eq(c, one)
+ || Tr::eq(c, BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0')) );
+
+ if (Tr::eq(c, one))
+ set(i);
+
+ }
+
+ }
+
+ void init_from_unsigned_long(size_type num_bits,
+ unsigned long value/*,
+ const Allocator& alloc*/)
+ {
+
+ assert(m_bits.size() == 0);
+
+ m_bits.resize(calc_num_blocks(num_bits));
+ m_num_bits = num_bits;
+
+ typedef unsigned long num_type;
+ typedef boost::detail::dynamic_bitset_impl
+ ::shifter<num_type, bits_per_block, ulong_width> shifter;
+
+ //if (num_bits == 0)
+ // return;
+
+ // zero out all bits at pos >= num_bits, if any;
+ // note that: num_bits == 0 implies value == 0
+ if (num_bits < static_cast<size_type>(ulong_width)) {
+ const num_type mask = (num_type(1) << num_bits) - 1;
+ value &= mask;
+ }
+
+ typename buffer_type::iterator it = m_bits.begin();
+ for( ; value; shifter::left_shift(value), ++it) {
+ *it = static_cast<block_type>(value);
+ }
+
+ }
+
+
+
+BOOST_DYNAMIC_BITSET_PRIVATE:
+
+ bool m_unchecked_test(size_type pos) const;
+ static size_type calc_num_blocks(size_type num_bits);
+
+ Block& m_highest_block();
+ const Block& m_highest_block() const;
+
+ buffer_type m_bits;
+ size_type m_num_bits;
+
+
+ class bit_appender;
+ friend class bit_appender;
+ class bit_appender {
+ // helper for stream >>
+ // Supplies to the lack of an efficient append at the less
+ // significant end: bits are actually appended "at left" but
+ // rearranged in the destructor. From the perspective of
+ // client code everything works *as if* dynamic_bitset<> had
+ // an append_at_right() function (eventually throwing the same
+ // exceptions as push_back) except that the function is in fact
+ // called bit_appender::do_append().
+ //
+ dynamic_bitset & bs;
+ size_type n;
+ Block mask;
+ Block * current;
+
+ // not implemented
+ bit_appender(const bit_appender &);
+ bit_appender & operator=(const bit_appender &);
+
+ public:
+ bit_appender(dynamic_bitset & r) : bs(r), n(0), mask(0), current(0) {}
+ ~bit_appender() {
+ // reverse the order of blocks, shift
+ // if needed, and then resize
+ //
+ std::reverse(bs.m_bits.begin(), bs.m_bits.end());
+ const block_width_type offs = bit_index(n);
+ if (offs)
+ bs >>= (bits_per_block - offs);
+ bs.resize(n); // doesn't enlarge, so can't throw
+ assert(bs.m_check_invariants());
+ }
+ inline void do_append(bool value) {
+
+ if (mask == 0) {
+ bs.append(Block(0));
+ current = &bs.m_highest_block();
+ mask = Block(1) << (bits_per_block - 1);
+ }
+
+ if(value)
+ *current |= mask;
+
+ mask /= 2;
+ ++n;
+ }
+ size_type get_count() const { return n; }
+ };
+
+};
+
+#if !defined BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+
+template <typename Block, typename Allocator>
+const typename dynamic_bitset<Block, Allocator>::block_width_type
+dynamic_bitset<Block, Allocator>::bits_per_block;
+
+template <typename Block, typename Allocator>
+const typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::npos;
+
+template <typename Block, typename Allocator>
+const typename dynamic_bitset<Block, Allocator>::block_width_type
+dynamic_bitset<Block, Allocator>::ulong_width;
+
+#endif
+
+// Global Functions:
+
+// comparison
+template <typename Block, typename Allocator>
+bool operator!=(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b);
+
+template <typename Block, typename Allocator>
+bool operator<=(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b);
+
+template <typename Block, typename Allocator>
+bool operator>(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b);
+
+template <typename Block, typename Allocator>
+bool operator>=(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b);
+
+// stream operators
+#ifdef BOOST_OLD_IOSTREAMS
+template <typename Block, typename Allocator>
+std::ostream& operator<<(std::ostream& os,
+ const dynamic_bitset<Block, Allocator>& b);
+
+template <typename Block, typename Allocator>
+std::istream& operator>>(std::istream& is, dynamic_bitset<Block,Allocator>& b);
+#else
+template <typename CharT, typename Traits, typename Block, typename Allocator>
+std::basic_ostream<CharT, Traits>&
+operator<<(std::basic_ostream<CharT, Traits>& os,
+ const dynamic_bitset<Block, Allocator>& b);
+
+template <typename CharT, typename Traits, typename Block, typename Allocator>
+std::basic_istream<CharT, Traits>&
+operator>>(std::basic_istream<CharT, Traits>& is,
+ dynamic_bitset<Block, Allocator>& b);
+#endif
+
+// bitset operations
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+operator&(const dynamic_bitset<Block, Allocator>& b1,
+ const dynamic_bitset<Block, Allocator>& b2);
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+operator|(const dynamic_bitset<Block, Allocator>& b1,
+ const dynamic_bitset<Block, Allocator>& b2);
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+operator^(const dynamic_bitset<Block, Allocator>& b1,
+ const dynamic_bitset<Block, Allocator>& b2);
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+operator-(const dynamic_bitset<Block, Allocator>& b1,
+ const dynamic_bitset<Block, Allocator>& b2);
+
+// namespace scope swap
+template<typename Block, typename Allocator>
+void swap(dynamic_bitset<Block, Allocator>& b1,
+ dynamic_bitset<Block, Allocator>& b2);
+
+
+template <typename Block, typename Allocator, typename stringT>
+void
+to_string(const dynamic_bitset<Block, Allocator>& b, stringT & s);
+
+template <typename Block, typename Allocator, typename BlockOutputIterator>
+void
+to_block_range(const dynamic_bitset<Block, Allocator>& b,
+ BlockOutputIterator result);
+
+
+template <typename BlockIterator, typename B, typename A>
+inline void
+from_block_range(BlockIterator first, BlockIterator last,
+ dynamic_bitset<B, A>& result)
+{
+ // PRE: distance(first, last) <= numblocks()
+ std::copy (first, last, result.m_bits.begin());
+}
+
+//=============================================================================
+// dynamic_bitset implementation
+
+
+//-----------------------------------------------------------------------------
+// constructors, etc.
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>::dynamic_bitset(const Allocator& alloc)
+ : m_bits(alloc), m_num_bits(0)
+{
+
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>::
+dynamic_bitset(size_type num_bits, unsigned long value, const Allocator& alloc)
+ : m_bits(alloc),
+ m_num_bits(0)
+{
+ init_from_unsigned_long(num_bits, value);
+}
+
+// copy constructor
+template <typename Block, typename Allocator>
+inline dynamic_bitset<Block, Allocator>::
+dynamic_bitset(const dynamic_bitset& b)
+ : m_bits(b.m_bits), m_num_bits(b.m_num_bits)
+{
+
+}
+
+template <typename Block, typename Allocator>
+inline dynamic_bitset<Block, Allocator>::
+~dynamic_bitset()
+{
+ assert(m_check_invariants());
+}
+
+template <typename Block, typename Allocator>
+inline void dynamic_bitset<Block, Allocator>::
+swap(dynamic_bitset<Block, Allocator>& b) // no throw
+{
+ std::swap(m_bits, b.m_bits);
+ std::swap(m_num_bits, b.m_num_bits);
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>& dynamic_bitset<Block, Allocator>::
+operator=(const dynamic_bitset<Block, Allocator>& b)
+{
+ m_bits = b.m_bits;
+ m_num_bits = b.m_num_bits;
+ return *this;
+}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template <typename Block, typename Allocator>
+inline dynamic_bitset<Block, Allocator>::
+dynamic_bitset(dynamic_bitset<Block, Allocator>&& b)
+ : m_bits(boost::move(b.m_bits)), m_num_bits(boost::move(b.m_num_bits))
+{
+ // Required so that assert(m_check_invariants()); works.
+ assert((b.m_bits = buffer_type()).empty());
+ b.m_num_bits = 0;
+}
+
+template <typename Block, typename Allocator>
+inline dynamic_bitset<Block, Allocator>& dynamic_bitset<Block, Allocator>::
+operator=(dynamic_bitset<Block, Allocator>&& b)
+{
+ if (boost::addressof(b) == this) { return *this; }
+
+ m_bits = boost::move(b.m_bits);
+ m_num_bits = boost::move(b.m_num_bits);
+ // Required so that assert(m_check_invariants()); works.
+ assert((b.m_bits = buffer_type()).empty());
+ b.m_num_bits = 0;
+ return *this;
+}
+
+#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template <typename Block, typename Allocator>
+inline typename dynamic_bitset<Block, Allocator>::allocator_type
+dynamic_bitset<Block, Allocator>::get_allocator() const
+{
+ return m_bits.get_allocator();
+}
+
+//-----------------------------------------------------------------------------
+// size changing operations
+
+template <typename Block, typename Allocator>
+void dynamic_bitset<Block, Allocator>::
+resize(size_type num_bits, bool value) // strong guarantee
+{
+
+ const size_type old_num_blocks = num_blocks();
+ const size_type required_blocks = calc_num_blocks(num_bits);
+
+ const block_type v = value? ~Block(0) : Block(0);
+
+ if (required_blocks != old_num_blocks) {
+ m_bits.resize(required_blocks, v); // s.g. (copy)
+ }
+
+
+ // At this point:
+ //
+ // - if the buffer was shrunk, we have nothing more to do,
+ // except a call to m_zero_unused_bits()
+ //
+ // - if it was enlarged, all the (used) bits in the new blocks have
+ // the correct value, but we have not yet touched those bits, if
+ // any, that were 'unused bits' before enlarging: if value == true,
+ // they must be set.
+
+ if (value && (num_bits > m_num_bits)) {
+
+ const block_width_type extra_bits = count_extra_bits();
+ if (extra_bits) {
+ assert(old_num_blocks >= 1 && old_num_blocks <= m_bits.size());
+
+ // Set them.
+ m_bits[old_num_blocks - 1] |= (v << extra_bits);
+ }
+
+ }
+
+ m_num_bits = num_bits;
+ m_zero_unused_bits();
+
+}
+
+template <typename Block, typename Allocator>
+void dynamic_bitset<Block, Allocator>::
+clear() // no throw
+{
+ m_bits.clear();
+ m_num_bits = 0;
+}
+
+
+template <typename Block, typename Allocator>
+void dynamic_bitset<Block, Allocator>::
+push_back(bool bit)
+{
+ const size_type sz = size();
+ resize(sz + 1);
+ set(sz, bit);
+}
+
+template <typename Block, typename Allocator>
+void dynamic_bitset<Block, Allocator>::
+pop_back()
+{
+ const size_type old_num_blocks = num_blocks();
+ const size_type required_blocks = calc_num_blocks(m_num_bits - 1);
+
+ if (required_blocks != old_num_blocks) {
+ m_bits.pop_back();
+ }
+
+ --m_num_bits;
+ m_zero_unused_bits();
+}
+
+
+template <typename Block, typename Allocator>
+void dynamic_bitset<Block, Allocator>::
+append(Block value) // strong guarantee
+{
+ const block_width_type r = count_extra_bits();
+
+ if (r == 0) {
+ // the buffer is empty, or all blocks are filled
+ m_bits.push_back(value);
+ }
+ else {
+ m_bits.push_back(value >> (bits_per_block - r));
+ m_bits[m_bits.size() - 2] |= (value << r); // m_bits.size() >= 2
+ }
+
+ m_num_bits += bits_per_block;
+ assert(m_check_invariants());
+
+}
+
+
+//-----------------------------------------------------------------------------
+// bitset operations
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::operator&=(const dynamic_bitset& rhs)
+{
+ assert(size() == rhs.size());
+ for (size_type i = 0; i < num_blocks(); ++i)
+ m_bits[i] &= rhs.m_bits[i];
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::operator|=(const dynamic_bitset& rhs)
+{
+ assert(size() == rhs.size());
+ for (size_type i = 0; i < num_blocks(); ++i)
+ m_bits[i] |= rhs.m_bits[i];
+ //m_zero_unused_bits();
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::operator^=(const dynamic_bitset& rhs)
+{
+ assert(size() == rhs.size());
+ for (size_type i = 0; i < this->num_blocks(); ++i)
+ m_bits[i] ^= rhs.m_bits[i];
+ //m_zero_unused_bits();
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::operator-=(const dynamic_bitset& rhs)
+{
+ assert(size() == rhs.size());
+ for (size_type i = 0; i < num_blocks(); ++i)
+ m_bits[i] &= ~rhs.m_bits[i];
+ //m_zero_unused_bits();
+ return *this;
+}
+
+//
+// NOTE:
+// Note that the 'if (r != 0)' is crucial to avoid undefined
+// behavior when the left hand operand of >> isn't promoted to a
+// wider type (because rs would be too large).
+//
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::operator<<=(size_type n)
+{
+ if (n >= m_num_bits)
+ return reset();
+ //else
+ if (n > 0) {
+
+ size_type const last = num_blocks() - 1; // num_blocks() is >= 1
+ size_type const div = n / bits_per_block; // div is <= last
+ block_width_type const r = bit_index(n);
+ block_type * const b = &m_bits[0];
+
+ if (r != 0) {
+
+ block_width_type const rs = bits_per_block - r;
+
+ for (size_type i = last-div; i>0; --i) {
+ b[i+div] = (b[i] << r) | (b[i-1] >> rs);
+ }
+ b[div] = b[0] << r;
+
+ }
+ else {
+ for (size_type i = last-div; i>0; --i) {
+ b[i+div] = b[i];
+ }
+ b[div] = b[0];
+ }
+
+ // zero out div blocks at the less significant end
+ std::fill_n(m_bits.begin(), div, static_cast<block_type>(0));
+
+ // zero out any 1 bit that flowed into the unused part
+ m_zero_unused_bits(); // thanks to Lester Gong
+
+ }
+
+ return *this;
+
+
+}
+
+
+//
+// NOTE:
+// see the comments to operator <<=
+//
+template <typename B, typename A>
+dynamic_bitset<B, A> & dynamic_bitset<B, A>::operator>>=(size_type n) {
+ if (n >= m_num_bits) {
+ return reset();
+ }
+ //else
+ if (n>0) {
+
+ size_type const last = num_blocks() - 1; // num_blocks() is >= 1
+ size_type const div = n / bits_per_block; // div is <= last
+ block_width_type const r = bit_index(n);
+ block_type * const b = &m_bits[0];
+
+
+ if (r != 0) {
+
+ block_width_type const ls = bits_per_block - r;
+
+ for (size_type i = div; i < last; ++i) {
+ b[i-div] = (b[i] >> r) | (b[i+1] << ls);
+ }
+ // r bits go to zero
+ b[last-div] = b[last] >> r;
+ }
+
+ else {
+ for (size_type i = div; i <= last; ++i) {
+ b[i-div] = b[i];
+ }
+ // note the '<=': the last iteration 'absorbs'
+ // b[last-div] = b[last] >> 0;
+ }
+
+
+
+ // div blocks are zero filled at the most significant end
+ std::fill_n(m_bits.begin() + (num_blocks()-div), div, static_cast<block_type>(0));
+ }
+
+ return *this;
+}
+
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+dynamic_bitset<Block, Allocator>::operator<<(size_type n) const
+{
+ dynamic_bitset r(*this);
+ return r <<= n;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+dynamic_bitset<Block, Allocator>::operator>>(size_type n) const
+{
+ dynamic_bitset r(*this);
+ return r >>= n;
+}
+
+
+//-----------------------------------------------------------------------------
+// basic bit operations
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::set(size_type pos,
+ size_type len, bool val)
+{
+ if (val)
+ return range_operation(pos, len, set_block_partial, set_block_full);
+ else
+ return range_operation(pos, len, reset_block_partial, reset_block_full);
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::set(size_type pos, bool val)
+{
+ assert(pos < m_num_bits);
+
+ if (val)
+ m_bits[block_index(pos)] |= bit_mask(pos);
+ else
+ reset(pos);
+
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::set()
+{
+ std::fill(m_bits.begin(), m_bits.end(), static_cast<Block>(~0));
+ m_zero_unused_bits();
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+inline dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::reset(size_type pos, size_type len)
+{
+ return range_operation(pos, len, reset_block_partial, reset_block_full);
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::reset(size_type pos)
+{
+ assert(pos < m_num_bits);
+#if defined __MWERKS__ && BOOST_WORKAROUND(__MWERKS__, <= 0x3003) // 8.x
+ // CodeWarrior 8 generates incorrect code when the &=~ is compiled,
+ // use the |^ variation instead.. <grafik>
+ m_bits[block_index(pos)] |= bit_mask(pos);
+ m_bits[block_index(pos)] ^= bit_mask(pos);
+#else
+ m_bits[block_index(pos)] &= ~bit_mask(pos);
+#endif
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::reset()
+{
+ std::fill(m_bits.begin(), m_bits.end(), Block(0));
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::flip(size_type pos, size_type len)
+{
+ return range_operation(pos, len, flip_block_partial, flip_block_full);
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::flip(size_type pos)
+{
+ assert(pos < m_num_bits);
+ m_bits[block_index(pos)] ^= bit_mask(pos);
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>&
+dynamic_bitset<Block, Allocator>::flip()
+{
+ for (size_type i = 0; i < num_blocks(); ++i)
+ m_bits[i] = ~m_bits[i];
+ m_zero_unused_bits();
+ return *this;
+}
+
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::m_unchecked_test(size_type pos) const
+{
+ return (m_bits[block_index(pos)] & bit_mask(pos)) != 0;
+}
+
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::test(size_type pos) const
+{
+ assert(pos < m_num_bits);
+ return m_unchecked_test(pos);
+}
+
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::test_set(size_type pos, bool val)
+{
+ bool const b = test(pos);
+ if (b != val) {
+ set(pos, val);
+ }
+ return b;
+}
+
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::all() const
+{
+ if (empty()) {
+ return true;
+ }
+
+ const block_width_type extra_bits = count_extra_bits();
+ block_type const all_ones = static_cast<Block>(~0);
+
+ if (extra_bits == 0) {
+ for (size_type i = 0, e = num_blocks(); i < e; ++i) {
+ if (m_bits[i] != all_ones) {
+ return false;
+ }
+ }
+ } else {
+ for (size_type i = 0, e = num_blocks() - 1; i < e; ++i) {
+ if (m_bits[i] != all_ones) {
+ return false;
+ }
+ }
+ const block_type mask = (block_type(1) << extra_bits) - 1;
+ if (m_highest_block() != mask) {
+ return false;
+ }
+ }
+ return true;
+}
+
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::any() const
+{
+ for (size_type i = 0; i < num_blocks(); ++i)
+ if (m_bits[i])
+ return true;
+ return false;
+}
+
+template <typename Block, typename Allocator>
+inline bool dynamic_bitset<Block, Allocator>::none() const
+{
+ return !any();
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+dynamic_bitset<Block, Allocator>::operator~() const
+{
+ dynamic_bitset b(*this);
+ b.flip();
+ return b;
+}
+
+template <typename Block, typename Allocator>
+typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::count() const BOOST_NOEXCEPT
+{
+ using detail::dynamic_bitset_impl::table_width;
+ using detail::dynamic_bitset_impl::access_by_bytes;
+ using detail::dynamic_bitset_impl::access_by_blocks;
+ using detail::dynamic_bitset_impl::value_to_type;
+
+#if BOOST_WORKAROUND(__GNUC__, == 4) && (__GNUC_MINOR__ == 3) && (__GNUC_PATCHLEVEL__ == 3)
+ // NOTE: Explicit qualification of "bits_per_block"
+ // breaks compilation on gcc 4.3.3
+ enum { no_padding = bits_per_block == CHAR_BIT * sizeof(Block) };
+#else
+ // NOTE: Explicitly qualifying "bits_per_block" to workaround
+ // regressions of gcc 3.4.x
+ enum { no_padding =
+ dynamic_bitset<Block, Allocator>::bits_per_block
+ == CHAR_BIT * sizeof(Block) };
+#endif
+
+ enum { enough_table_width = table_width >= CHAR_BIT };
+
+#if ((defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+ // Windows popcount is effective starting from the unsigned short type
+ enum { uneffective_popcount = sizeof(Block) < sizeof(unsigned short) };
+#elif defined(BOOST_GCC) || defined(__clang__) || (defined(BOOST_INTEL) && defined(__GNUC__))
+ // GCC popcount is effective starting from the unsigned int type
+ enum { uneffective_popcount = sizeof(Block) < sizeof(unsigned int) };
+#else
+ enum { uneffective_popcount = true };
+#endif
+
+ enum { mode = (no_padding && enough_table_width && uneffective_popcount)
+ ? access_by_bytes
+ : access_by_blocks };
+
+ return do_count(m_bits.begin(), num_blocks(), Block(0),
+ static_cast<value_to_type<(bool)mode> *>(0));
+}
+
+
+//-----------------------------------------------------------------------------
+// conversions
+
+
+template <typename B, typename A, typename stringT>
+void to_string_helper(const dynamic_bitset<B, A> & b, stringT & s,
+ bool dump_all)
+{
+ typedef typename stringT::traits_type Tr;
+ typedef typename stringT::value_type Ch;
+
+ BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, std::locale());
+ const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
+ const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
+
+ // Note that this function may access (when
+ // dump_all == true) bits beyond position size() - 1
+
+ typedef typename dynamic_bitset<B, A>::size_type size_type;
+
+ const size_type len = dump_all?
+ dynamic_bitset<B, A>::bits_per_block * b.num_blocks():
+ b.size();
+ s.assign (len, zero);
+
+ for (size_type i = 0; i < len; ++i) {
+ if (b.m_unchecked_test(i))
+ Tr::assign(s[len - 1 - i], one);
+
+ }
+
+}
+
+
+// A comment similar to the one about the constructor from
+// basic_string can be done here. Thanks to James Kanze for
+// making me (Gennaro) realize this important separation of
+// concerns issue, as well as many things about i18n.
+//
+template <typename Block, typename Allocator, typename stringT>
+inline void
+to_string(const dynamic_bitset<Block, Allocator>& b, stringT& s)
+{
+ to_string_helper(b, s, false);
+}
+
+
+// Differently from to_string this function dumps out
+// every bit of the internal representation (may be
+// useful for debugging purposes)
+//
+template <typename B, typename A, typename stringT>
+inline void
+dump_to_string(const dynamic_bitset<B, A>& b, stringT& s)
+{
+ to_string_helper(b, s, true /* =dump_all*/);
+}
+
+template <typename Block, typename Allocator, typename BlockOutputIterator>
+inline void
+to_block_range(const dynamic_bitset<Block, Allocator>& b,
+ BlockOutputIterator result)
+{
+ // note how this copies *all* bits, including the
+ // unused ones in the last block (which are zero)
+ std::copy(b.m_bits.begin(), b.m_bits.end(), result);
+}
+
+template <typename Block, typename Allocator>
+unsigned long dynamic_bitset<Block, Allocator>::
+to_ulong() const
+{
+
+ if (m_num_bits == 0)
+ return 0; // convention
+
+ // Check for overflows. This may be a performance burden on very
+ // large bitsets but is required by the specification, sorry
+ if (find_next(ulong_width - 1) != npos)
+ BOOST_THROW_EXCEPTION(std::overflow_error("boost::dynamic_bitset::to_ulong overflow"));
+
+
+ // Ok, from now on we can be sure there's no "on" bit
+ // beyond the "allowed" positions
+ typedef unsigned long result_type;
+
+ const size_type maximum_size =
+ (std::min)(m_num_bits, static_cast<size_type>(ulong_width));
+
+ const size_type last_block = block_index( maximum_size - 1 );
+
+ assert((last_block * bits_per_block) < static_cast<size_type>(ulong_width));
+
+ result_type result = 0;
+ for (size_type i = 0; i <= last_block; ++i) {
+ const size_type offset = i * bits_per_block;
+ result |= (static_cast<result_type>(m_bits[i]) << offset);
+ }
+
+ return result;
+}
+
+template <typename Block, typename Allocator>
+inline typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::size() const BOOST_NOEXCEPT
+{
+ return m_num_bits;
+}
+
+template <typename Block, typename Allocator>
+inline typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::num_blocks() const BOOST_NOEXCEPT
+{
+ return m_bits.size();
+}
+
+template <typename Block, typename Allocator>
+inline typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::max_size() const BOOST_NOEXCEPT
+{
+ // Semantics of vector<>::max_size() aren't very clear
+ // (see lib issue 197) and many library implementations
+ // simply return dummy values, _unrelated_ to the underlying
+ // allocator.
+ //
+ // Given these problems, I was tempted to not provide this
+ // function at all but the user could need it if he provides
+ // his own allocator.
+ //
+
+ const size_type m = detail::dynamic_bitset_impl::
+ vector_max_size_workaround(m_bits);
+
+ return m <= (size_type(-1)/bits_per_block) ?
+ m * bits_per_block :
+ size_type(-1);
+}
+
+template <typename Block, typename Allocator>
+inline bool dynamic_bitset<Block, Allocator>::empty() const BOOST_NOEXCEPT
+{
+ return size() == 0;
+}
+
+template <typename Block, typename Allocator>
+inline typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::capacity() const BOOST_NOEXCEPT
+{
+ return m_bits.capacity() * bits_per_block;
+}
+
+template <typename Block, typename Allocator>
+inline void dynamic_bitset<Block, Allocator>::reserve(size_type num_bits)
+{
+ m_bits.reserve(calc_num_blocks(num_bits));
+}
+
+template <typename Block, typename Allocator>
+void dynamic_bitset<Block, Allocator>::shrink_to_fit()
+{
+ if (m_bits.size() < m_bits.capacity()) {
+ buffer_type(m_bits).swap(m_bits);
+ }
+}
+
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::
+is_subset_of(const dynamic_bitset<Block, Allocator>& a) const
+{
+ assert(size() == a.size());
+ for (size_type i = 0; i < num_blocks(); ++i)
+ if (m_bits[i] & ~a.m_bits[i])
+ return false;
+ return true;
+}
+
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::
+is_proper_subset_of(const dynamic_bitset<Block, Allocator>& a) const
+{
+ assert(size() == a.size());
+ assert(num_blocks() == a.num_blocks());
+
+ bool proper = false;
+ for (size_type i = 0; i < num_blocks(); ++i) {
+ const Block & bt = m_bits[i];
+ const Block & ba = a.m_bits[i];
+
+ if (bt & ~ba)
+ return false; // not a subset at all
+ if (ba & ~bt)
+ proper = true;
+ }
+ return proper;
+}
+
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::intersects(const dynamic_bitset & b) const
+{
+ size_type common_blocks = num_blocks() < b.num_blocks()
+ ? num_blocks() : b.num_blocks();
+
+ for(size_type i = 0; i < common_blocks; ++i) {
+ if(m_bits[i] & b.m_bits[i])
+ return true;
+ }
+ return false;
+}
+
+// --------------------------------
+// lookup
+
+// look for the first bit "on", starting
+// from the block with index first_block
+//
+template <typename Block, typename Allocator>
+typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::m_do_find_from(size_type first_block) const
+{
+ size_type i = first_block;
+
+ // skip null blocks
+ while (i < num_blocks() && m_bits[i] == 0)
+ ++i;
+
+ if (i >= num_blocks())
+ return npos; // not found
+
+ return i * bits_per_block + static_cast<size_type>(detail::lowest_bit(m_bits[i]));
+}
+
+
+template <typename Block, typename Allocator>
+typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::find_first() const
+{
+ return m_do_find_from(0);
+}
+
+
+template <typename Block, typename Allocator>
+typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::find_next(size_type pos) const
+{
+
+ const size_type sz = size();
+ if (pos >= (sz-1) || sz == 0)
+ return npos;
+
+ ++pos;
+
+ const size_type blk = block_index(pos);
+ const block_width_type ind = bit_index(pos);
+
+ // shift bits upto one immediately after current
+ const Block fore = m_bits[blk] >> ind;
+
+ return fore?
+ pos + static_cast<size_type>(detail::lowest_bit(fore))
+ :
+ m_do_find_from(blk + 1);
+
+}
+
+
+
+//-----------------------------------------------------------------------------
+// comparison
+
+template <typename Block, typename Allocator>
+bool operator==(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b)
+{
+ return (a.m_num_bits == b.m_num_bits)
+ && (a.m_bits == b.m_bits);
+}
+
+template <typename Block, typename Allocator>
+inline bool operator!=(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b)
+{
+ return !(a == b);
+}
+
+template <typename Block, typename Allocator>
+bool operator<(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b)
+{
+// assert(a.size() == b.size());
+
+ typedef BOOST_DEDUCED_TYPENAME dynamic_bitset<Block, Allocator>::size_type size_type;
+
+ size_type asize(a.size());
+ size_type bsize(b.size());
+
+ if (!bsize)
+ {
+ return false;
+ }
+ else if (!asize)
+ {
+ return true;
+ }
+ else if (asize == bsize)
+ {
+ for (size_type ii = a.num_blocks(); ii > 0; --ii)
+ {
+ size_type i = ii-1;
+ if (a.m_bits[i] < b.m_bits[i])
+ return true;
+ else if (a.m_bits[i] > b.m_bits[i])
+ return false;
+ }
+ return false;
+ }
+ else
+ {
+
+ size_type leqsize(std::min BOOST_PREVENT_MACRO_SUBSTITUTION(asize,bsize));
+
+ for (size_type ii = 0; ii < leqsize; ++ii,--asize,--bsize)
+ {
+ size_type i = asize-1;
+ size_type j = bsize-1;
+ if (a[i] < b[j])
+ return true;
+ else if (a[i] > b[j])
+ return false;
+ }
+ return (a.size() < b.size());
+ }
+}
+
+template <typename Block, typename Allocator>
+bool oplessthan(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b)
+{
+// assert(a.size() == b.size());
+
+ typedef BOOST_DEDUCED_TYPENAME dynamic_bitset<Block, Allocator>::size_type size_type;
+
+ size_type asize(a.num_blocks());
+ size_type bsize(b.num_blocks());
+ assert(asize == 3);
+ assert(bsize == 4);
+
+ if (!bsize)
+ {
+ return false;
+ }
+ else if (!asize)
+ {
+ return true;
+ }
+ else
+ {
+
+ size_type leqsize(std::min BOOST_PREVENT_MACRO_SUBSTITUTION(asize,bsize));
+ assert(leqsize == 3);
+
+ //if (a.size() == 0)
+ // return false;
+
+ // Since we are storing the most significant bit
+ // at pos == size() - 1, we need to do the comparisons in reverse.
+ //
+ for (size_type ii = 0; ii < leqsize; ++ii,--asize,--bsize)
+ {
+ size_type i = asize-1;
+ size_type j = bsize-1;
+ if (a.m_bits[i] < b.m_bits[j])
+ return true;
+ else if (a.m_bits[i] > b.m_bits[j])
+ return false;
+ }
+ return (a.num_blocks() < b.num_blocks());
+ }
+}
+
+template <typename Block, typename Allocator>
+inline bool operator<=(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b)
+{
+ return !(a > b);
+}
+
+template <typename Block, typename Allocator>
+inline bool operator>(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b)
+{
+ return b < a;
+}
+
+template <typename Block, typename Allocator>
+inline bool operator>=(const dynamic_bitset<Block, Allocator>& a,
+ const dynamic_bitset<Block, Allocator>& b)
+{
+ return !(a < b);
+}
+
+//-----------------------------------------------------------------------------
+// stream operations
+
+#ifdef BOOST_OLD_IOSTREAMS
+template < typename Block, typename Alloc>
+std::ostream&
+operator<<(std::ostream& os, const dynamic_bitset<Block, Alloc>& b)
+{
+ // NOTE: since this is aimed at "classic" iostreams, exception
+ // masks on the stream are not supported. The library that
+ // ships with gcc 2.95 has an exceptions() member function but
+ // nothing is actually implemented; not even the class ios::failure.
+
+ using namespace std;
+
+ const ios::iostate ok = ios::goodbit;
+ ios::iostate err = ok;
+
+ if (os.opfx()) {
+
+ //try
+ typedef typename dynamic_bitset<Block, Alloc>::size_type bitsetsize_type;
+
+ const bitsetsize_type sz = b.size();
+ std::streambuf * buf = os.rdbuf();
+ size_t npad = os.width() <= 0 // careful: os.width() is signed (and can be < 0)
+ || (bitsetsize_type) os.width() <= sz? 0 : os.width() - sz;
+
+ const char fill_char = os.fill();
+ const ios::fmtflags adjustfield = os.flags() & ios::adjustfield;
+
+ // if needed fill at left; pad is decresed along the way
+ if (adjustfield != ios::left) {
+ for (; 0 < npad; --npad)
+ if (fill_char != buf->sputc(fill_char)) {
+ err |= ios::failbit;
+ break;
+ }
+ }
+
+ if (err == ok) {
+ // output the bitset
+ for (bitsetsize_type i = b.size(); 0 < i; --i) {
+ const char dig = b.test(i-1)? '1' : '0';
+ if (EOF == buf->sputc(dig)) {
+ err |= ios::failbit;
+ break;
+ }
+ }
+ }
+
+ if (err == ok) {
+ // if needed fill at right
+ for (; 0 < npad; --npad) {
+ if (fill_char != buf->sputc(fill_char)) {
+ err |= ios::failbit;
+ break;
+ }
+ }
+ }
+
+ os.osfx();
+ os.width(0);
+
+ } // if opfx
+
+ if(err != ok)
+ os.setstate(err); // assume this does NOT throw
+ return os;
+
+}
+#else
+
+template <typename Ch, typename Tr, typename Block, typename Alloc>
+std::basic_ostream<Ch, Tr>&
+operator<<(std::basic_ostream<Ch, Tr>& os,
+ const dynamic_bitset<Block, Alloc>& b)
+{
+
+ using namespace std;
+
+ const ios_base::iostate ok = ios_base::goodbit;
+ ios_base::iostate err = ok;
+
+ typename basic_ostream<Ch, Tr>::sentry cerberos(os);
+ if (cerberos) {
+
+ BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, os.getloc());
+ const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
+ const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
+
+ BOOST_TRY {
+
+ typedef typename dynamic_bitset<Block, Alloc>::size_type bitset_size_type;
+ typedef basic_streambuf<Ch, Tr> buffer_type;
+
+ buffer_type * buf = os.rdbuf();
+ // careful: os.width() is signed (and can be < 0)
+ const bitset_size_type width = (os.width() <= 0) ? 0 : static_cast<bitset_size_type>(os.width());
+ streamsize npad = (width <= b.size()) ? 0 : width - b.size();
+
+ const Ch fill_char = os.fill();
+ const ios_base::fmtflags adjustfield = os.flags() & ios_base::adjustfield;
+
+ // if needed fill at left; pad is decreased along the way
+ if (adjustfield != ios_base::left) {
+ for (; 0 < npad; --npad)
+ if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) {
+ err |= ios_base::failbit;
+ break;
+ }
+ }
+
+ if (err == ok) {
+ // output the bitset
+ for (bitset_size_type i = b.size(); 0 < i; --i) {
+ typename buffer_type::int_type
+ ret = buf->sputc(b.test(i-1)? one : zero);
+ if (Tr::eq_int_type(Tr::eof(), ret)) {
+ err |= ios_base::failbit;
+ break;
+ }
+ }
+ }
+
+ if (err == ok) {
+ // if needed fill at right
+ for (; 0 < npad; --npad) {
+ if (Tr::eq_int_type(Tr::eof(), buf->sputc(fill_char))) {
+ err |= ios_base::failbit;
+ break;
+ }
+ }
+ }
+
+
+ os.width(0);
+
+ } BOOST_CATCH (...) { // see std 27.6.1.1/4
+ bool rethrow = false;
+ BOOST_TRY { os.setstate(ios_base::failbit); } BOOST_CATCH (...) { rethrow = true; } BOOST_CATCH_END
+
+ if (rethrow)
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ if(err != ok)
+ os.setstate(err); // may throw exception
+ return os;
+
+}
+#endif
+
+
+#ifdef BOOST_OLD_IOSTREAMS
+
+ // A sentry-like class that calls isfx in its destructor.
+ // "Necessary" because bit_appender::do_append may throw.
+ class pseudo_sentry {
+ std::istream & m_r;
+ const bool m_ok;
+ public:
+ explicit pseudo_sentry(std::istream & r) : m_r(r), m_ok(r.ipfx(0)) { }
+ ~pseudo_sentry() { m_r.isfx(); }
+ operator bool() const { return m_ok; }
+ };
+
+template <typename Block, typename Alloc>
+std::istream&
+operator>>(std::istream& is, dynamic_bitset<Block, Alloc>& b)
+{
+
+// Extractor for classic IO streams (libstdc++ < 3.0)
+// ----------------------------------------------------//
+// It's assumed that the stream buffer functions, and
+// the stream's setstate() _cannot_ throw.
+
+
+ typedef dynamic_bitset<Block, Alloc> bitset_type;
+ typedef typename bitset_type::size_type size_type;
+
+ std::ios::iostate err = std::ios::goodbit;
+ pseudo_sentry cerberos(is); // skips whitespaces
+ if(cerberos) {
+
+ b.clear();
+
+ const std::streamsize w = is.width();
+ const size_type limit = w > 0 && static_cast<size_type>(w) < b.max_size()
+ ? static_cast<size_type>(w) : b.max_size();
+ typename bitset_type::bit_appender appender(b);
+ std::streambuf * buf = is.rdbuf();
+ for(int c = buf->sgetc(); appender.get_count() < limit; c = buf->snextc() ) {
+
+ if (c == EOF) {
+ err |= std::ios::eofbit;
+ break;
+ }
+ else if (char(c) != '0' && char(c) != '1')
+ break; // non digit character
+
+ else {
+ BOOST_TRY {
+ appender.do_append(char(c) == '1');
+ }
+ BOOST_CATCH(...) {
+ is.setstate(std::ios::failbit); // assume this can't throw
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+ } // for
+ }
+
+ is.width(0);
+ if (b.size() == 0)
+ err |= std::ios::failbit;
+ if (err != std::ios::goodbit)
+ is.setstate (err); // may throw
+
+ return is;
+}
+
+#else // BOOST_OLD_IOSTREAMS
+
+template <typename Ch, typename Tr, typename Block, typename Alloc>
+std::basic_istream<Ch, Tr>&
+operator>>(std::basic_istream<Ch, Tr>& is, dynamic_bitset<Block, Alloc>& b)
+{
+
+ using namespace std;
+
+ typedef dynamic_bitset<Block, Alloc> bitset_type;
+ typedef typename bitset_type::size_type size_type;
+
+ const streamsize w = is.width();
+ const size_type limit = 0 < w && static_cast<size_type>(w) < b.max_size()?
+ static_cast<size_type>(w) : b.max_size();
+
+ ios_base::iostate err = ios_base::goodbit;
+ typename basic_istream<Ch, Tr>::sentry cerberos(is); // skips whitespaces
+ if(cerberos) {
+
+ // in accordance with prop. resol. of lib DR 303 [last checked 4 Feb 2004]
+ BOOST_DYNAMIC_BITSET_CTYPE_FACET(Ch, fac, is.getloc());
+ const Ch zero = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '0');
+ const Ch one = BOOST_DYNAMIC_BITSET_WIDEN_CHAR(fac, '1');
+
+ b.clear();
+ BOOST_TRY {
+ typename bitset_type::bit_appender appender(b);
+ basic_streambuf <Ch, Tr> * buf = is.rdbuf();
+ typename Tr::int_type c = buf->sgetc();
+ for( ; appender.get_count() < limit; c = buf->snextc() ) {
+
+ if (Tr::eq_int_type(Tr::eof(), c)) {
+ err |= ios_base::eofbit;
+ break;
+ }
+ else {
+ const Ch to_c = Tr::to_char_type(c);
+ const bool is_one = Tr::eq(to_c, one);
+
+ if (!is_one && !Tr::eq(to_c, zero))
+ break; // non digit character
+
+ appender.do_append(is_one);
+
+ }
+
+ } // for
+ }
+ BOOST_CATCH (...) {
+ // catches from stream buf, or from vector:
+ //
+ // bits_stored bits have been extracted and stored, and
+ // either no further character is extractable or we can't
+ // append to the underlying vector (out of memory)
+
+ bool rethrow = false; // see std 27.6.1.1/4
+ BOOST_TRY { is.setstate(ios_base::badbit); }
+ BOOST_CATCH(...) { rethrow = true; }
+ BOOST_CATCH_END
+
+ if (rethrow)
+ BOOST_RETHROW;
+
+ }
+ BOOST_CATCH_END
+ }
+
+ is.width(0);
+ if (b.size() == 0 /*|| !cerberos*/)
+ err |= ios_base::failbit;
+ if (err != ios_base::goodbit)
+ is.setstate (err); // may throw
+
+ return is;
+
+}
+
+
+#endif
+
+
+//-----------------------------------------------------------------------------
+// bitset operations
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+operator&(const dynamic_bitset<Block, Allocator>& x,
+ const dynamic_bitset<Block, Allocator>& y)
+{
+ dynamic_bitset<Block, Allocator> b(x);
+ return b &= y;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+operator|(const dynamic_bitset<Block, Allocator>& x,
+ const dynamic_bitset<Block, Allocator>& y)
+{
+ dynamic_bitset<Block, Allocator> b(x);
+ return b |= y;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+operator^(const dynamic_bitset<Block, Allocator>& x,
+ const dynamic_bitset<Block, Allocator>& y)
+{
+ dynamic_bitset<Block, Allocator> b(x);
+ return b ^= y;
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>
+operator-(const dynamic_bitset<Block, Allocator>& x,
+ const dynamic_bitset<Block, Allocator>& y)
+{
+ dynamic_bitset<Block, Allocator> b(x);
+ return b -= y;
+}
+
+//-----------------------------------------------------------------------------
+// namespace scope swap
+
+template<typename Block, typename Allocator>
+inline void
+swap(dynamic_bitset<Block, Allocator>& left,
+ dynamic_bitset<Block, Allocator>& right) // no throw
+{
+ left.swap(right);
+}
+
+
+//-----------------------------------------------------------------------------
+// private (on conforming compilers) member functions
+
+
+template <typename Block, typename Allocator>
+inline typename dynamic_bitset<Block, Allocator>::size_type
+dynamic_bitset<Block, Allocator>::calc_num_blocks(size_type num_bits)
+{
+ return num_bits / bits_per_block
+ + static_cast<size_type>( num_bits % bits_per_block != 0 );
+}
+
+// gives a reference to the highest block
+//
+template <typename Block, typename Allocator>
+inline Block& dynamic_bitset<Block, Allocator>::m_highest_block()
+{
+ return const_cast<Block &>
+ (static_cast<const dynamic_bitset *>(this)->m_highest_block());
+}
+
+// gives a const-reference to the highest block
+//
+template <typename Block, typename Allocator>
+inline const Block& dynamic_bitset<Block, Allocator>::m_highest_block() const
+{
+ assert(size() > 0 && num_blocks() > 0);
+ return m_bits.back();
+}
+
+template <typename Block, typename Allocator>
+dynamic_bitset<Block, Allocator>& dynamic_bitset<Block, Allocator>::range_operation(
+ size_type pos, size_type len,
+ Block (*partial_block_operation)(Block, size_type, size_type),
+ Block (*full_block_operation)(Block))
+{
+ assert(pos + len <= m_num_bits);
+
+ // Do nothing in case of zero length
+ if (!len)
+ return *this;
+
+ // Use an additional asserts in order to detect size_type overflow
+ // For example: pos = 10, len = size_type_limit - 2, pos + len = 7
+ // In case of overflow, 'pos + len' is always smaller than 'len'
+ assert(pos + len >= len);
+
+ // Start and end blocks of the [pos; pos + len - 1] sequence
+ const size_type first_block = block_index(pos);
+ const size_type last_block = block_index(pos + len - 1);
+
+ const size_type first_bit_index = bit_index(pos);
+ const size_type last_bit_index = bit_index(pos + len - 1);
+
+ if (first_block == last_block) {
+ // Filling only a sub-block of a block
+ m_bits[first_block] = partial_block_operation(m_bits[first_block],
+ first_bit_index, last_bit_index);
+ } else {
+ // Check if the corner blocks won't be fully filled with 'val'
+ const size_type first_block_shift = bit_index(pos) ? 1 : 0;
+ const size_type last_block_shift = (bit_index(pos + len - 1)
+ == bits_per_block - 1) ? 0 : 1;
+
+ // Blocks that will be filled with ~0 or 0 at once
+ const size_type first_full_block = first_block + first_block_shift;
+ const size_type last_full_block = last_block - last_block_shift;
+
+ for (size_type i = first_full_block; i <= last_full_block; ++i) {
+ m_bits[i] = full_block_operation(m_bits[i]);
+ }
+
+ // Fill the first block from the 'first' bit index to the end
+ if (first_block_shift) {
+ m_bits[first_block] = partial_block_operation(m_bits[first_block],
+ first_bit_index, bits_per_block - 1);
+ }
+
+ // Fill the last block from the start to the 'last' bit index
+ if (last_block_shift) {
+ m_bits[last_block] = partial_block_operation(m_bits[last_block],
+ 0, last_bit_index);
+ }
+ }
+
+ return *this;
+}
+
+// If size() is not a multiple of bits_per_block
+// then not all the bits in the last block are used.
+// This function resets the unused bits (convenient
+// for the implementation of many member functions)
+//
+template <typename Block, typename Allocator>
+inline void dynamic_bitset<Block, Allocator>::m_zero_unused_bits()
+{
+ assert (num_blocks() == calc_num_blocks(m_num_bits));
+
+ // if != 0 this is the number of bits used in the last block
+ const block_width_type extra_bits = count_extra_bits();
+
+ if (extra_bits != 0)
+ m_highest_block() &= (Block(1) << extra_bits) - 1;
+}
+
+// check class invariants
+template <typename Block, typename Allocator>
+bool dynamic_bitset<Block, Allocator>::m_check_invariants() const
+{
+ const block_width_type extra_bits = count_extra_bits();
+ if (extra_bits > 0) {
+ const block_type mask = block_type(~0) << extra_bits;
+ if ((m_highest_block() & mask) != 0)
+ return false;
+ }
+ if (m_bits.size() > m_bits.capacity() || num_blocks() != calc_num_blocks(size()))
+ return false;
+
+ return true;
+
+}
+
+
+} // namespace boost
+
+
+#undef BOOST_BITSET_CHAR
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.68.0/boost/dynamic_bitset_fwd.hpp b/src/third_party/boost-1.69.0/boost/dynamic_bitset_fwd.hpp
index 7bb6e89743d..7bb6e89743d 100644
--- a/src/third_party/boost-1.68.0/boost/dynamic_bitset_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/dynamic_bitset_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/enable_shared_from_this.hpp b/src/third_party/boost-1.69.0/boost/enable_shared_from_this.hpp
index 18b938d5d00..18b938d5d00 100644
--- a/src/third_party/boost-1.68.0/boost/enable_shared_from_this.hpp
+++ b/src/third_party/boost-1.69.0/boost/enable_shared_from_this.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/current_exception_cast.hpp b/src/third_party/boost-1.69.0/boost/exception/current_exception_cast.hpp
index 5d81f00b00b..5d81f00b00b 100644
--- a/src/third_party/boost-1.68.0/boost/exception/current_exception_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/current_exception_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/detail/clone_current_exception.hpp b/src/third_party/boost-1.69.0/boost/exception/detail/clone_current_exception.hpp
index 6fc1374737e..6fc1374737e 100644
--- a/src/third_party/boost-1.68.0/boost/exception/detail/clone_current_exception.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/detail/clone_current_exception.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/detail/error_info_impl.hpp b/src/third_party/boost-1.69.0/boost/exception/detail/error_info_impl.hpp
index 6c48d61ab35..6c48d61ab35 100644
--- a/src/third_party/boost-1.68.0/boost/exception/detail/error_info_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/detail/error_info_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/detail/exception_ptr.hpp b/src/third_party/boost-1.69.0/boost/exception/detail/exception_ptr.hpp
index 8e19f0d9df3..8e19f0d9df3 100644
--- a/src/third_party/boost-1.68.0/boost/exception/detail/exception_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/detail/exception_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/detail/is_output_streamable.hpp b/src/third_party/boost-1.69.0/boost/exception/detail/is_output_streamable.hpp
index 10e5c5163ee..10e5c5163ee 100644
--- a/src/third_party/boost-1.68.0/boost/exception/detail/is_output_streamable.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/detail/is_output_streamable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/detail/object_hex_dump.hpp b/src/third_party/boost-1.69.0/boost/exception/detail/object_hex_dump.hpp
index 267bf0bf3e1..267bf0bf3e1 100644
--- a/src/third_party/boost-1.68.0/boost/exception/detail/object_hex_dump.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/detail/object_hex_dump.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/detail/shared_ptr.hpp b/src/third_party/boost-1.69.0/boost/exception/detail/shared_ptr.hpp
index 51febe8c8fb..51febe8c8fb 100644
--- a/src/third_party/boost-1.68.0/boost/exception/detail/shared_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/detail/shared_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/detail/type_info.hpp b/src/third_party/boost-1.69.0/boost/exception/detail/type_info.hpp
index 739ac5748e2..739ac5748e2 100644
--- a/src/third_party/boost-1.68.0/boost/exception/detail/type_info.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/detail/type_info.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/diagnostic_information.hpp b/src/third_party/boost-1.69.0/boost/exception/diagnostic_information.hpp
index 48f06a0fb98..48f06a0fb98 100644
--- a/src/third_party/boost-1.68.0/boost/exception/diagnostic_information.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/diagnostic_information.hpp
diff --git a/src/third_party/boost-1.69.0/boost/exception/exception.hpp b/src/third_party/boost-1.69.0/boost/exception/exception.hpp
new file mode 100644
index 00000000000..d5c22c4ca23
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/exception/exception.hpp
@@ -0,0 +1,525 @@
+//Copyright (c) 2006-2009 Emil Dotchevski and Reverge Studios, Inc.
+
+//Distributed under the Boost Software License, Version 1.0. (See accompanying
+//file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef UUID_274DA366004E11DCB1DDFE2E56D89593
+#define UUID_274DA366004E11DCB1DDFE2E56D89593
+
+#include <boost/config.hpp>
+
+#ifdef BOOST_EXCEPTION_MINI_BOOST
+#include <memory>
+namespace boost { namespace exception_detail { using std::shared_ptr; } }
+#else
+namespace boost { template <class T> class shared_ptr; }
+namespace boost { namespace exception_detail { using boost::shared_ptr; } }
+#endif
+
+#if defined(__GNUC__) && (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+namespace
+boost
+ {
+ namespace
+ exception_detail
+ {
+ template <class T>
+ class
+ refcount_ptr
+ {
+ public:
+
+ refcount_ptr():
+ px_(0)
+ {
+ }
+
+ ~refcount_ptr()
+ {
+ release();
+ }
+
+ refcount_ptr( refcount_ptr const & x ):
+ px_(x.px_)
+ {
+ add_ref();
+ }
+
+ refcount_ptr &
+ operator=( refcount_ptr const & x )
+ {
+ adopt(x.px_);
+ return *this;
+ }
+
+ void
+ adopt( T * px )
+ {
+ release();
+ px_=px;
+ add_ref();
+ }
+
+ T *
+ get() const
+ {
+ return px_;
+ }
+
+ private:
+
+ T * px_;
+
+ void
+ add_ref()
+ {
+ if( px_ )
+ px_->add_ref();
+ }
+
+ void
+ release()
+ {
+ if( px_ && px_->release() )
+ px_=0;
+ }
+ };
+ }
+
+ ////////////////////////////////////////////////////////////////////////
+
+ template <class Tag,class T>
+ class error_info;
+
+ typedef error_info<struct throw_function_,char const *> throw_function;
+ typedef error_info<struct throw_file_,char const *> throw_file;
+ typedef error_info<struct throw_line_,int> throw_line;
+
+ template <>
+ class
+ error_info<throw_function_,char const *>
+ {
+ public:
+ typedef char const * value_type;
+ value_type v_;
+ explicit
+ error_info( value_type v ):
+ v_(v)
+ {
+ }
+ };
+
+ template <>
+ class
+ error_info<throw_file_,char const *>
+ {
+ public:
+ typedef char const * value_type;
+ value_type v_;
+ explicit
+ error_info( value_type v ):
+ v_(v)
+ {
+ }
+ };
+
+ template <>
+ class
+ error_info<throw_line_,int>
+ {
+ public:
+ typedef int value_type;
+ value_type v_;
+ explicit
+ error_info( value_type v ):
+ v_(v)
+ {
+ }
+ };
+
+ class
+ BOOST_SYMBOL_VISIBLE
+ exception;
+
+ namespace
+ exception_detail
+ {
+ class error_info_base;
+ struct type_info_;
+
+ struct
+ error_info_container
+ {
+ virtual char const * diagnostic_information( char const * ) const = 0;
+ virtual shared_ptr<error_info_base> get( type_info_ const & ) const = 0;
+ virtual void set( shared_ptr<error_info_base> const &, type_info_ const & ) = 0;
+ virtual void add_ref() const = 0;
+ virtual bool release() const = 0;
+ virtual refcount_ptr<exception_detail::error_info_container> clone() const = 0;
+
+ protected:
+
+ ~error_info_container() throw()
+ {
+ }
+ };
+
+ template <class>
+ struct get_info;
+
+ template <>
+ struct get_info<throw_function>;
+
+ template <>
+ struct get_info<throw_file>;
+
+ template <>
+ struct get_info<throw_line>;
+
+ template <class>
+ struct set_info_rv;
+
+ template <>
+ struct set_info_rv<throw_function>;
+
+ template <>
+ struct set_info_rv<throw_file>;
+
+ template <>
+ struct set_info_rv<throw_line>;
+
+ char const * get_diagnostic_information( exception const &, char const * );
+
+ void copy_boost_exception( exception *, exception const * );
+
+ template <class E,class Tag,class T>
+ E const & set_info( E const &, error_info<Tag,T> const & );
+
+ template <class E>
+ E const & set_info( E const &, throw_function const & );
+
+ template <class E>
+ E const & set_info( E const &, throw_file const & );
+
+ template <class E>
+ E const & set_info( E const &, throw_line const & );
+ }
+
+ class
+ BOOST_SYMBOL_VISIBLE
+ exception
+ {
+ //<N3757>
+ public:
+ template <class Tag> void set( typename Tag::type const & );
+ template <class Tag> typename Tag::type const * get() const;
+ //</N3757>
+
+ protected:
+
+ exception():
+ throw_function_(0),
+ throw_file_(0),
+ throw_line_(-1)
+ {
+ }
+
+#ifdef __HP_aCC
+ //On HP aCC, this protected copy constructor prevents throwing boost::exception.
+ //On all other platforms, the same effect is achieved by the pure virtual destructor.
+ exception( exception const & x ) throw():
+ data_(x.data_),
+ throw_function_(x.throw_function_),
+ throw_file_(x.throw_file_),
+ throw_line_(x.throw_line_)
+ {
+ }
+#endif
+
+ virtual ~exception() throw()
+#ifndef __HP_aCC
+ = 0 //Workaround for HP aCC, =0 incorrectly leads to link errors.
+#endif
+ ;
+
+#if (defined(__MWERKS__) && __MWERKS__<=0x3207) || (defined(_MSC_VER) && _MSC_VER<=1310)
+ public:
+#else
+ private:
+
+ template <class E>
+ friend E const & exception_detail::set_info( E const &, throw_function const & );
+
+ template <class E>
+ friend E const & exception_detail::set_info( E const &, throw_file const & );
+
+ template <class E>
+ friend E const & exception_detail::set_info( E const &, throw_line const & );
+
+ template <class E,class Tag,class T>
+ friend E const & exception_detail::set_info( E const &, error_info<Tag,T> const & );
+
+ friend char const * exception_detail::get_diagnostic_information( exception const &, char const * );
+
+ template <class>
+ friend struct exception_detail::get_info;
+ friend struct exception_detail::get_info<throw_function>;
+ friend struct exception_detail::get_info<throw_file>;
+ friend struct exception_detail::get_info<throw_line>;
+ template <class>
+ friend struct exception_detail::set_info_rv;
+ friend struct exception_detail::set_info_rv<throw_function>;
+ friend struct exception_detail::set_info_rv<throw_file>;
+ friend struct exception_detail::set_info_rv<throw_line>;
+ friend void exception_detail::copy_boost_exception( exception *, exception const * );
+#endif
+ mutable exception_detail::refcount_ptr<exception_detail::error_info_container> data_;
+ mutable char const * throw_function_;
+ mutable char const * throw_file_;
+ mutable int throw_line_;
+ };
+
+ inline
+ exception::
+ ~exception() throw()
+ {
+ }
+
+ namespace
+ exception_detail
+ {
+ template <class E>
+ E const &
+ set_info( E const & x, throw_function const & y )
+ {
+ x.throw_function_=y.v_;
+ return x;
+ }
+
+ template <class E>
+ E const &
+ set_info( E const & x, throw_file const & y )
+ {
+ x.throw_file_=y.v_;
+ return x;
+ }
+
+ template <class E>
+ E const &
+ set_info( E const & x, throw_line const & y )
+ {
+ x.throw_line_=y.v_;
+ return x;
+ }
+ }
+
+ ////////////////////////////////////////////////////////////////////////
+
+ namespace
+ exception_detail
+ {
+ template <class T>
+ struct
+ BOOST_SYMBOL_VISIBLE
+ error_info_injector:
+ public T,
+ public exception
+ {
+ explicit
+ error_info_injector( T const & x ):
+ T(x)
+ {
+ }
+
+ ~error_info_injector() throw()
+ {
+ }
+ };
+
+ struct large_size { char c[256]; };
+ large_size dispatch_boost_exception( exception const * );
+
+ struct small_size { };
+ small_size dispatch_boost_exception( void const * );
+
+ template <class,int>
+ struct enable_error_info_helper;
+
+ template <class T>
+ struct
+ enable_error_info_helper<T,sizeof(large_size)>
+ {
+ typedef T type;
+ };
+
+ template <class T>
+ struct
+ enable_error_info_helper<T,sizeof(small_size)>
+ {
+ typedef error_info_injector<T> type;
+ };
+
+ template <class T>
+ struct
+ enable_error_info_return_type
+ {
+ typedef typename enable_error_info_helper<T,sizeof(exception_detail::dispatch_boost_exception(static_cast<T *>(0)))>::type type;
+ };
+ }
+
+ template <class T>
+ inline
+ typename
+ exception_detail::enable_error_info_return_type<T>::type
+ enable_error_info( T const & x )
+ {
+ typedef typename exception_detail::enable_error_info_return_type<T>::type rt;
+ return rt(x);
+ }
+
+ ////////////////////////////////////////////////////////////////////////
+
+ namespace
+ exception_detail
+ {
+ class
+ BOOST_SYMBOL_VISIBLE
+ clone_base
+ {
+ public:
+
+ virtual clone_base const * clone() const = 0;
+ virtual void rethrow() const = 0;
+
+ virtual
+ ~clone_base() throw()
+ {
+ }
+ };
+
+ inline
+ void
+ copy_boost_exception( exception * a, exception const * b )
+ {
+ refcount_ptr<error_info_container> data;
+ if( error_info_container * d=b->data_.get() )
+ data = d->clone();
+ a->throw_file_ = b->throw_file_;
+ a->throw_line_ = b->throw_line_;
+ a->throw_function_ = b->throw_function_;
+ a->data_ = data;
+ }
+
+ inline
+ void
+ copy_boost_exception( void *, void const * )
+ {
+ }
+
+ template <class T>
+ class
+ BOOST_SYMBOL_VISIBLE
+ clone_impl:
+ public T,
+ public virtual clone_base
+ {
+ struct clone_tag { };
+ clone_impl( clone_impl const & x, clone_tag ):
+ T(x)
+ {
+ copy_boost_exception(this,&x);
+ }
+
+ public:
+
+ explicit
+ clone_impl( T const & x ):
+ T(x)
+ {
+ copy_boost_exception(this,&x);
+ }
+
+ ~clone_impl() throw()
+ {
+ }
+
+ private:
+
+ clone_base const *
+ clone() const
+ {
+ return new clone_impl(*this,clone_tag());
+ }
+
+ void
+ rethrow() const
+ {
+ throw*this;
+ }
+ };
+ }
+
+ template <class T>
+ inline
+ exception_detail::clone_impl<T>
+ enable_current_exception( T const & x )
+ {
+ return exception_detail::clone_impl<T>(x);
+ }
+
+ template <class T>
+ struct
+ BOOST_SYMBOL_VISIBLE
+ wrapexcept:
+ public exception_detail::clone_impl<typename exception_detail::enable_error_info_return_type<T>::type>
+ {
+ typedef exception_detail::clone_impl<typename exception_detail::enable_error_info_return_type<T>::type> base_type;
+ public:
+ explicit
+ wrapexcept( typename exception_detail::enable_error_info_return_type<T>::type const & x ):
+ base_type( x )
+ {
+ }
+
+ ~wrapexcept() throw()
+ {
+ }
+ };
+
+ namespace
+ exception_detail
+ {
+ template <class T>
+ struct
+ remove_error_info_injector
+ {
+ typedef T type;
+ };
+
+ template <class T>
+ struct
+ remove_error_info_injector< error_info_injector<T> >
+ {
+ typedef T type;
+ };
+
+ template <class T>
+ inline
+ wrapexcept<typename remove_error_info_injector<T>::type>
+ enable_both( T const & x )
+ {
+ return wrapexcept<typename remove_error_info_injector<T>::type>( enable_error_info( x ) );
+ }
+ }
+ }
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/exception/get_error_info.hpp b/src/third_party/boost-1.69.0/boost/exception/get_error_info.hpp
index 831717df596..831717df596 100644
--- a/src/third_party/boost-1.68.0/boost/exception/get_error_info.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/get_error_info.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/info.hpp b/src/third_party/boost-1.69.0/boost/exception/info.hpp
index f7ac50ecfcd..f7ac50ecfcd 100644
--- a/src/third_party/boost-1.68.0/boost/exception/info.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/info.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/to_string.hpp b/src/third_party/boost-1.69.0/boost/exception/to_string.hpp
index 51425b10d16..51425b10d16 100644
--- a/src/third_party/boost-1.68.0/boost/exception/to_string.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/to_string.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception/to_string_stub.hpp b/src/third_party/boost-1.69.0/boost/exception/to_string_stub.hpp
index 8ff5e47fd63..8ff5e47fd63 100644
--- a/src/third_party/boost-1.68.0/boost/exception/to_string_stub.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception/to_string_stub.hpp
diff --git a/src/third_party/boost-1.68.0/boost/exception_ptr.hpp b/src/third_party/boost-1.69.0/boost/exception_ptr.hpp
index d48cce9dc69..d48cce9dc69 100644
--- a/src/third_party/boost-1.68.0/boost/exception_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/exception_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem.hpp b/src/third_party/boost-1.69.0/boost/filesystem.hpp
index 0122634d363..0122634d363 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/config.hpp b/src/third_party/boost-1.69.0/boost/filesystem/config.hpp
index 815976959a3..815976959a3 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/convenience.hpp b/src/third_party/boost-1.69.0/boost/filesystem/convenience.hpp
index f0bd9869092..f0bd9869092 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/convenience.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/convenience.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/detail/macro_value.hpp b/src/third_party/boost-1.69.0/boost/filesystem/detail/macro_value.hpp
index 2c4a16a628e..2c4a16a628e 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/detail/macro_value.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/detail/macro_value.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/detail/utf8_codecvt_facet.hpp b/src/third_party/boost-1.69.0/boost/filesystem/detail/utf8_codecvt_facet.hpp
index 3b78fb1b663..3b78fb1b663 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/detail/utf8_codecvt_facet.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/detail/utf8_codecvt_facet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/exception.hpp b/src/third_party/boost-1.69.0/boost/filesystem/exception.hpp
index 985cd8f715f..985cd8f715f 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/exception.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/exception.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/fstream.hpp b/src/third_party/boost-1.69.0/boost/filesystem/fstream.hpp
index 07272388763..07272388763 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/fstream.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/fstream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/filesystem/operations.hpp b/src/third_party/boost-1.69.0/boost/filesystem/operations.hpp
new file mode 100644
index 00000000000..640d288882b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/filesystem/operations.hpp
@@ -0,0 +1,1376 @@
+// boost/filesystem/operations.hpp ---------------------------------------------------//
+
+// Copyright Beman Dawes 2002-2009
+// Copyright Jan Langer 2002
+// Copyright Dietmar Kuehl 2001
+// Copyright Vladimir Prus 2002
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// Library home page: http://www.boost.org/libs/filesystem
+
+//--------------------------------------------------------------------------------------//
+
+#ifndef BOOST_FILESYSTEM3_OPERATIONS_HPP
+#define BOOST_FILESYSTEM3_OPERATIONS_HPP
+
+#include <boost/config.hpp>
+
+# if defined( BOOST_NO_STD_WSTRING )
+# error Configuration not supported: Boost.Filesystem V3 and later requires std::wstring support
+# endif
+
+#include <boost/filesystem/config.hpp>
+#include <boost/filesystem/path.hpp>
+
+#include <boost/detail/scoped_enum_emulation.hpp>
+#include <boost/detail/bitmask.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/system/system_error.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#include <string>
+#include <utility> // for pair
+#include <ctime>
+#include <vector>
+#include <stack>
+
+#ifdef BOOST_WINDOWS_API
+# include <fstream>
+#endif
+
+#include <boost/config/abi_prefix.hpp> // must be the last #include
+
+//--------------------------------------------------------------------------------------//
+
+namespace boost
+{
+ namespace filesystem
+ {
+
+ //--------------------------------------------------------------------------------------//
+ // //
+ // class filesystem_error //
+ // //
+ //--------------------------------------------------------------------------------------//
+
+ class BOOST_SYMBOL_VISIBLE filesystem_error : public system::system_error
+ {
+ // see http://www.boost.org/more/error_handling.html for design rationale
+
+ // all functions are inline to avoid issues with crossing dll boundaries
+
+ // functions previously throw() are now BOOST_NOEXCEPT_OR_NOTHROW
+ // functions previously without throw() are now BOOST_NOEXCEPT
+
+ public:
+ // compiler generates copy constructor and copy assignment
+
+ filesystem_error(
+ const std::string & what_arg, system::error_code ec) BOOST_NOEXCEPT
+ : system::system_error(ec, what_arg)
+ {
+ try
+ {
+ m_imp_ptr.reset(new m_imp);
+ }
+ catch (...) { m_imp_ptr.reset(); }
+ }
+
+ filesystem_error(
+ const std::string & what_arg, const path& path1_arg,
+ system::error_code ec) BOOST_NOEXCEPT
+ : system::system_error(ec, what_arg)
+ {
+ try
+ {
+ m_imp_ptr.reset(new m_imp);
+ m_imp_ptr->m_path1 = path1_arg;
+ }
+ catch (...) { m_imp_ptr.reset(); }
+ }
+
+ filesystem_error(
+ const std::string & what_arg, const path& path1_arg,
+ const path& path2_arg, system::error_code ec) BOOST_NOEXCEPT
+ : system::system_error(ec, what_arg)
+ {
+ try
+ {
+ m_imp_ptr.reset(new m_imp);
+ m_imp_ptr->m_path1 = path1_arg;
+ m_imp_ptr->m_path2 = path2_arg;
+ }
+ catch (...) { m_imp_ptr.reset(); }
+ }
+
+ ~filesystem_error() BOOST_NOEXCEPT_OR_NOTHROW{}
+
+ const path& path1() const BOOST_NOEXCEPT
+ {
+ static const path empty_path;
+ return m_imp_ptr.get() ? m_imp_ptr->m_path1 : empty_path;
+ }
+ const path& path2() const BOOST_NOEXCEPT
+ {
+ static const path empty_path;
+ return m_imp_ptr.get() ? m_imp_ptr->m_path2 : empty_path;
+ }
+
+ const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ if (!m_imp_ptr.get())
+ return system::system_error::what();
+
+ try
+ {
+ if (m_imp_ptr->m_what.empty())
+ {
+ m_imp_ptr->m_what = system::system_error::what();
+ if (!m_imp_ptr->m_path1.empty())
+ {
+ m_imp_ptr->m_what += ": \"";
+ m_imp_ptr->m_what += m_imp_ptr->m_path1.string();
+ m_imp_ptr->m_what += "\"";
+ }
+ if (!m_imp_ptr->m_path2.empty())
+ {
+ m_imp_ptr->m_what += ", \"";
+ m_imp_ptr->m_what += m_imp_ptr->m_path2.string();
+ m_imp_ptr->m_what += "\"";
+ }
+ }
+ return m_imp_ptr->m_what.c_str();
+ }
+ catch (...)
+ {
+ return system::system_error::what();
+ }
+ }
+
+ private:
+ struct m_imp
+ {
+ path m_path1; // may be empty()
+ path m_path2; // may be empty()
+ std::string m_what; // not built until needed
+ };
+ boost::shared_ptr<m_imp> m_imp_ptr;
+ };
+
+//--------------------------------------------------------------------------------------//
+// file_type //
+//--------------------------------------------------------------------------------------//
+
+ enum file_type
+ {
+ status_error,
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ status_unknown = status_error,
+# endif
+ file_not_found,
+ regular_file,
+ directory_file,
+ // the following may not apply to some operating systems or file systems
+ symlink_file,
+ block_file,
+ character_file,
+ fifo_file,
+ socket_file,
+ reparse_file, // Windows: FILE_ATTRIBUTE_REPARSE_POINT that is not a symlink
+ type_unknown, // file does exist, but isn't one of the above types or
+ // we don't have strong enough permission to find its type
+
+ _detail_directory_symlink // internal use only; never exposed to users
+ };
+
+//--------------------------------------------------------------------------------------//
+// perms //
+//--------------------------------------------------------------------------------------//
+
+ enum perms
+ {
+ no_perms = 0, // file_not_found is no_perms rather than perms_not_known
+
+ // POSIX equivalent macros given in comments.
+ // Values are from POSIX and are given in octal per the POSIX standard.
+
+ // permission bits
+
+ owner_read = 0400, // S_IRUSR, Read permission, owner
+ owner_write = 0200, // S_IWUSR, Write permission, owner
+ owner_exe = 0100, // S_IXUSR, Execute/search permission, owner
+ owner_all = 0700, // S_IRWXU, Read, write, execute/search by owner
+
+ group_read = 040, // S_IRGRP, Read permission, group
+ group_write = 020, // S_IWGRP, Write permission, group
+ group_exe = 010, // S_IXGRP, Execute/search permission, group
+ group_all = 070, // S_IRWXG, Read, write, execute/search by group
+
+ others_read = 04, // S_IROTH, Read permission, others
+ others_write = 02, // S_IWOTH, Write permission, others
+ others_exe = 01, // S_IXOTH, Execute/search permission, others
+ others_all = 07, // S_IRWXO, Read, write, execute/search by others
+
+ all_all = 0777, // owner_all|group_all|others_all
+
+ // other POSIX bits
+
+ set_uid_on_exe = 04000, // S_ISUID, Set-user-ID on execution
+ set_gid_on_exe = 02000, // S_ISGID, Set-group-ID on execution
+ sticky_bit = 01000, // S_ISVTX,
+ // (POSIX XSI) On directories, restricted deletion flag
+ // (V7) 'sticky bit': save swapped text even after use
+ // (SunOS) On non-directories: don't cache this file
+ // (SVID-v4.2) On directories: restricted deletion flag
+ // Also see http://en.wikipedia.org/wiki/Sticky_bit
+
+ perms_mask = 07777, // all_all|set_uid_on_exe|set_gid_on_exe|sticky_bit
+
+ perms_not_known = 0xFFFF, // present when directory_entry cache not loaded
+
+ // options for permissions() function
+
+ add_perms = 0x1000, // adds the given permission bits to the current bits
+ remove_perms = 0x2000, // removes the given permission bits from the current bits;
+ // choose add_perms or remove_perms, not both; if neither add_perms
+ // nor remove_perms is given, replace the current bits with
+ // the given bits.
+
+ symlink_perms = 0x4000, // on POSIX, don't resolve symlinks; implied on Windows
+
+ // BOOST_BITMASK op~ casts to int32_least_t, producing invalid enum values
+ _detail_extend_perms_32_1 = 0x7fffffff,
+ _detail_extend_perms_32_2 = -0x7fffffff-1
+ };
+
+ BOOST_BITMASK(perms)
+
+//--------------------------------------------------------------------------------------//
+// file_status //
+//--------------------------------------------------------------------------------------//
+
+ class BOOST_FILESYSTEM_DECL file_status
+ {
+ public:
+ file_status() BOOST_NOEXCEPT
+ : m_value(status_error), m_perms(perms_not_known) {}
+ explicit file_status(file_type v) BOOST_NOEXCEPT
+ : m_value(v), m_perms(perms_not_known) {}
+ file_status(file_type v, perms prms) BOOST_NOEXCEPT
+ : m_value(v), m_perms(prms) {}
+
+ // As of October 2015 the interaction between noexcept and =default is so troublesome
+ // for VC++, GCC, and probably other compilers, that =default is not used with noexcept
+ // functions. GCC is not even consistent for the same release on different platforms.
+
+ file_status(const file_status& rhs) BOOST_NOEXCEPT
+ : m_value(rhs.m_value), m_perms(rhs.m_perms) {}
+ file_status& operator=(const file_status& rhs) BOOST_NOEXCEPT
+ {
+ m_value = rhs.m_value;
+ m_perms = rhs.m_perms;
+ return *this;
+ }
+
+# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ file_status(file_status&& rhs) BOOST_NOEXCEPT
+ {
+ m_value = std::move(rhs.m_value);
+ m_perms = std::move(rhs.m_perms);
+ }
+ file_status& operator=(file_status&& rhs) BOOST_NOEXCEPT
+ {
+ m_value = std::move(rhs.m_value);
+ m_perms = std::move(rhs.m_perms);
+ return *this;
+ }
+# endif
+
+
+ // observers
+ file_type type() const BOOST_NOEXCEPT { return m_value; }
+ perms permissions() const BOOST_NOEXCEPT { return m_perms; }
+
+ // modifiers
+ void type(file_type v) BOOST_NOEXCEPT { m_value = v; }
+ void permissions(perms prms) BOOST_NOEXCEPT { m_perms = prms; }
+
+ bool operator==(const file_status& rhs) const BOOST_NOEXCEPT
+ { return type() == rhs.type() &&
+ permissions() == rhs.permissions(); }
+ bool operator!=(const file_status& rhs) const BOOST_NOEXCEPT
+ { return !(*this == rhs); }
+
+ private:
+ file_type m_value;
+ enum perms m_perms;
+ };
+
+ inline bool type_present(file_status f) BOOST_NOEXCEPT
+ { return f.type() != status_error; }
+ inline bool permissions_present(file_status f) BOOST_NOEXCEPT
+ {return f.permissions() != perms_not_known;}
+ inline bool status_known(file_status f) BOOST_NOEXCEPT
+ { return type_present(f) && permissions_present(f); }
+ inline bool exists(file_status f) BOOST_NOEXCEPT
+ { return f.type() != status_error
+ && f.type() != file_not_found; }
+ inline bool is_regular_file(file_status f) BOOST_NOEXCEPT
+ { return f.type() == regular_file; }
+ inline bool is_directory(file_status f) BOOST_NOEXCEPT
+ { return f.type() == directory_file; }
+ inline bool is_symlink(file_status f) BOOST_NOEXCEPT
+ { return f.type() == symlink_file; }
+ inline bool is_other(file_status f) BOOST_NOEXCEPT
+ { return exists(f) && !is_regular_file(f)
+ && !is_directory(f) && !is_symlink(f); }
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ inline bool is_regular(file_status f) BOOST_NOEXCEPT { return f.type() == regular_file; }
+# endif
+
+ struct space_info
+ {
+ // all values are byte counts
+ boost::uintmax_t capacity;
+ boost::uintmax_t free; // <= capacity
+ boost::uintmax_t available; // <= free
+ };
+
+ BOOST_SCOPED_ENUM_START(copy_option)
+ {none=0, fail_if_exists = none, overwrite_if_exists};
+ BOOST_SCOPED_ENUM_END
+
+//--------------------------------------------------------------------------------------//
+// implementation details //
+//--------------------------------------------------------------------------------------//
+
+ namespace detail
+ {
+ // We cannot pass a BOOST_SCOPED_ENUM to a compled function because it will result
+ // in an undefined reference if the library is compled with -std=c++0x but the use
+ // is compiled in C++03 mode, or visa versa. See tickets 6124, 6779, 10038.
+ enum copy_option {none=0, fail_if_exists = none, overwrite_if_exists};
+
+ BOOST_FILESYSTEM_DECL
+ file_status status(const path&p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ file_status symlink_status(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ bool is_empty(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path initial_path(system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path canonical(const path& p, const path& base, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void copy(const path& from, const path& to, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void copy_directory(const path& from, const path& to, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void copy_file(const path& from, const path& to, // See ticket #2925
+ detail::copy_option option, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void copy_symlink(const path& existing_symlink, const path& new_symlink, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ bool create_directories(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ bool create_directory(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void create_directory_symlink(const path& to, const path& from,
+ system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void create_hard_link(const path& to, const path& from, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void create_symlink(const path& to, const path& from, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path current_path(system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void current_path(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ bool equivalent(const path& p1, const path& p2, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ boost::uintmax_t file_size(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ boost::uintmax_t hard_link_count(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ std::time_t last_write_time(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void last_write_time(const path& p, const std::time_t new_time,
+ system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void permissions(const path& p, perms prms, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path read_symlink(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path relative(const path& p, const path& base, system::error_code* ec = 0);
+ BOOST_FILESYSTEM_DECL
+ bool remove(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ boost::uintmax_t remove_all(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void rename(const path& old_p, const path& new_p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ void resize_file(const path& p, uintmax_t size, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ space_info space(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path system_complete(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path temp_directory_path(system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path unique_path(const path& p, system::error_code* ec=0);
+ BOOST_FILESYSTEM_DECL
+ path weakly_canonical(const path& p, system::error_code* ec = 0);
+ } // namespace detail
+
+//--------------------------------------------------------------------------------------//
+// //
+// status query functions //
+// //
+//--------------------------------------------------------------------------------------//
+
+ inline
+ file_status status(const path& p) {return detail::status(p);}
+ inline
+ file_status status(const path& p, system::error_code& ec)
+ {return detail::status(p, &ec);}
+ inline
+ file_status symlink_status(const path& p) {return detail::symlink_status(p);}
+ inline
+ file_status symlink_status(const path& p, system::error_code& ec)
+ {return detail::symlink_status(p, &ec);}
+ inline
+ bool exists(const path& p) {return exists(detail::status(p));}
+ inline
+ bool exists(const path& p, system::error_code& ec)
+ {return exists(detail::status(p, &ec));}
+ inline
+ bool is_directory(const path& p) {return is_directory(detail::status(p));}
+ inline
+ bool is_directory(const path& p, system::error_code& ec)
+ {return is_directory(detail::status(p, &ec));}
+ inline
+ bool is_regular_file(const path& p) {return is_regular_file(detail::status(p));}
+ inline
+ bool is_regular_file(const path& p, system::error_code& ec)
+ {return is_regular_file(detail::status(p, &ec));}
+ inline
+ bool is_other(const path& p) {return is_other(detail::status(p));}
+ inline
+ bool is_other(const path& p, system::error_code& ec)
+ {return is_other(detail::status(p, &ec));}
+ inline
+ bool is_symlink(const path& p) {return is_symlink(detail::symlink_status(p));}
+ inline
+ bool is_symlink(const path& p, system::error_code& ec)
+ {return is_symlink(detail::symlink_status(p, &ec));}
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ inline
+ bool is_regular(const path& p) {return is_regular(detail::status(p));}
+ inline
+ bool is_regular(const path& p, system::error_code& ec)
+ {return is_regular(detail::status(p, &ec));}
+# endif
+
+ inline
+ bool is_empty(const path& p) {return detail::is_empty(p);}
+ inline
+ bool is_empty(const path& p, system::error_code& ec)
+ {return detail::is_empty(p, &ec);}
+
+//--------------------------------------------------------------------------------------//
+// //
+// operational functions //
+// in alphabetical order, unless otherwise noted //
+// //
+//--------------------------------------------------------------------------------------//
+
+ // forward declarations
+ path current_path(); // fwd declaration
+ path initial_path();
+
+ BOOST_FILESYSTEM_DECL
+ path absolute(const path& p, const path& base=current_path());
+ // If base.is_absolute(), throws nothing. Thus no need for ec argument
+
+ inline
+ path canonical(const path& p, const path& base=current_path())
+ {return detail::canonical(p, base);}
+ inline
+ path canonical(const path& p, system::error_code& ec)
+ {return detail::canonical(p, current_path(), &ec);}
+ inline
+ path canonical(const path& p, const path& base, system::error_code& ec)
+ {return detail::canonical(p, base, &ec);}
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ inline
+ path complete(const path& p)
+ {
+ return absolute(p, initial_path());
+ }
+
+ inline
+ path complete(const path& p, const path& base)
+ {
+ return absolute(p, base);
+ }
+# endif
+
+ inline
+ void copy(const path& from, const path& to) {detail::copy(from, to);}
+
+ inline
+ void copy(const path& from, const path& to, system::error_code& ec) BOOST_NOEXCEPT
+ {detail::copy(from, to, &ec);}
+ inline
+ void copy_directory(const path& from, const path& to)
+ {detail::copy_directory(from, to);}
+ inline
+ void copy_directory(const path& from, const path& to, system::error_code& ec) BOOST_NOEXCEPT
+ {detail::copy_directory(from, to, &ec);}
+ inline
+ void copy_file(const path& from, const path& to, // See ticket #2925
+ BOOST_SCOPED_ENUM(copy_option) option)
+ {
+ detail::copy_file(from, to, static_cast<detail::copy_option>(option));
+ }
+ inline
+ void copy_file(const path& from, const path& to)
+ {
+ detail::copy_file(from, to, detail::fail_if_exists);
+ }
+ inline
+ void copy_file(const path& from, const path& to, // See ticket #2925
+ BOOST_SCOPED_ENUM(copy_option) option, system::error_code& ec) BOOST_NOEXCEPT
+ {
+ detail::copy_file(from, to, static_cast<detail::copy_option>(option), &ec);
+ }
+ inline
+ void copy_file(const path& from, const path& to, system::error_code& ec) BOOST_NOEXCEPT
+ {
+ detail::copy_file(from, to, detail::fail_if_exists, &ec);
+ }
+ inline
+ void copy_symlink(const path& existing_symlink,
+ const path& new_symlink) {detail::copy_symlink(existing_symlink, new_symlink);}
+
+ inline
+ void copy_symlink(const path& existing_symlink, const path& new_symlink,
+ system::error_code& ec) BOOST_NOEXCEPT
+ {detail::copy_symlink(existing_symlink, new_symlink, &ec);}
+ inline
+ bool create_directories(const path& p) {return detail::create_directories(p);}
+
+ inline
+ bool create_directories(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::create_directories(p, &ec);}
+ inline
+ bool create_directory(const path& p) {return detail::create_directory(p);}
+
+ inline
+ bool create_directory(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::create_directory(p, &ec);}
+ inline
+ void create_directory_symlink(const path& to, const path& from)
+ {detail::create_directory_symlink(to, from);}
+ inline
+ void create_directory_symlink(const path& to, const path& from, system::error_code& ec) BOOST_NOEXCEPT
+ {detail::create_directory_symlink(to, from, &ec);}
+ inline
+ void create_hard_link(const path& to, const path& new_hard_link) {detail::create_hard_link(to, new_hard_link);}
+
+ inline
+ void create_hard_link(const path& to, const path& new_hard_link, system::error_code& ec) BOOST_NOEXCEPT
+ {detail::create_hard_link(to, new_hard_link, &ec);}
+ inline
+ void create_symlink(const path& to, const path& new_symlink) {detail::create_symlink(to, new_symlink);}
+
+ inline
+ void create_symlink(const path& to, const path& new_symlink, system::error_code& ec) BOOST_NOEXCEPT
+ {detail::create_symlink(to, new_symlink, &ec);}
+ inline
+ path current_path() {return detail::current_path();}
+
+ inline
+ path current_path(system::error_code& ec) BOOST_NOEXCEPT {return detail::current_path(&ec);}
+
+ inline
+ void current_path(const path& p) {detail::current_path(p);}
+
+ inline
+ void current_path(const path& p, system::error_code& ec) BOOST_NOEXCEPT {detail::current_path(p, &ec);}
+
+ inline
+ bool equivalent(const path& p1, const path& p2) {return detail::equivalent(p1, p2);}
+
+ inline
+ bool equivalent(const path& p1, const path& p2, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::equivalent(p1, p2, &ec);}
+ inline
+ boost::uintmax_t file_size(const path& p) {return detail::file_size(p);}
+
+ inline
+ boost::uintmax_t file_size(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::file_size(p, &ec);}
+ inline
+ boost::uintmax_t hard_link_count(const path& p) {return detail::hard_link_count(p);}
+
+ inline
+ boost::uintmax_t hard_link_count(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::hard_link_count(p, &ec);}
+ inline
+ path initial_path() {return detail::initial_path();}
+
+ inline
+ path initial_path(system::error_code& ec) {return detail::initial_path(&ec);}
+
+ template <class Path>
+ path initial_path() {return initial_path();}
+ template <class Path>
+ path initial_path(system::error_code& ec) {return detail::initial_path(&ec);}
+
+ inline
+ std::time_t last_write_time(const path& p) {return detail::last_write_time(p);}
+
+ inline
+ std::time_t last_write_time(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::last_write_time(p, &ec);}
+ inline
+ void last_write_time(const path& p, const std::time_t new_time)
+ {detail::last_write_time(p, new_time);}
+ inline
+ void last_write_time(const path& p, const std::time_t new_time,
+ system::error_code& ec) BOOST_NOEXCEPT
+ {detail::last_write_time(p, new_time, &ec);}
+ inline
+ void permissions(const path& p, perms prms)
+ {detail::permissions(p, prms);}
+ inline
+ void permissions(const path& p, perms prms, system::error_code& ec) BOOST_NOEXCEPT
+ {detail::permissions(p, prms, &ec);}
+
+ inline
+ path read_symlink(const path& p) {return detail::read_symlink(p);}
+
+ inline
+ path read_symlink(const path& p, system::error_code& ec)
+ {return detail::read_symlink(p, &ec);}
+ inline
+ // For standardization, if the committee doesn't like "remove", consider "eliminate"
+ bool remove(const path& p) {return detail::remove(p);}
+
+ inline
+ bool remove(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::remove(p, &ec);}
+
+ inline
+ boost::uintmax_t remove_all(const path& p) {return detail::remove_all(p);}
+
+ inline
+ boost::uintmax_t remove_all(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::remove_all(p, &ec);}
+ inline
+ void rename(const path& old_p, const path& new_p) {detail::rename(old_p, new_p);}
+
+ inline
+ void rename(const path& old_p, const path& new_p, system::error_code& ec) BOOST_NOEXCEPT
+ {detail::rename(old_p, new_p, &ec);}
+ inline // name suggested by Scott McMurray
+ void resize_file(const path& p, uintmax_t size) {detail::resize_file(p, size);}
+
+ inline
+ void resize_file(const path& p, uintmax_t size, system::error_code& ec) BOOST_NOEXCEPT
+ {detail::resize_file(p, size, &ec);}
+ inline
+ path relative(const path& p, const path& base=current_path())
+ {return detail::relative(p, base);}
+ inline
+ path relative(const path& p, system::error_code& ec)
+ {return detail::relative(p, current_path(), &ec);}
+ inline
+ path relative(const path& p, const path& base, system::error_code& ec)
+ {return detail::relative(p, base, &ec);}
+ inline
+ space_info space(const path& p) {return detail::space(p);}
+
+ inline
+ space_info space(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ {return detail::space(p, &ec);}
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ inline bool symbolic_link_exists(const path& p)
+ { return is_symlink(symlink_status(p)); }
+# endif
+
+ inline
+ path system_complete(const path& p) {return detail::system_complete(p);}
+
+ inline
+ path system_complete(const path& p, system::error_code& ec)
+ {return detail::system_complete(p, &ec);}
+ inline
+ path temp_directory_path() {return detail::temp_directory_path();}
+
+ inline
+ path temp_directory_path(system::error_code& ec)
+ {return detail::temp_directory_path(&ec);}
+ inline
+ path unique_path(const path& p="%%%%-%%%%-%%%%-%%%%")
+ {return detail::unique_path(p);}
+ inline
+ path unique_path(const path& p, system::error_code& ec)
+ {return detail::unique_path(p, &ec);}
+ inline
+ path weakly_canonical(const path& p) {return detail::weakly_canonical(p);}
+
+ inline
+ path weakly_canonical(const path& p, system::error_code& ec)
+ {return detail::weakly_canonical(p, &ec);}
+
+//--------------------------------------------------------------------------------------//
+// //
+// directory_entry //
+// //
+//--------------------------------------------------------------------------------------//
+
+// GCC has a problem with a member function named path within a namespace or
+// sub-namespace that also has a class named path. The workaround is to always
+// fully qualify the name path when it refers to the class name.
+
+class BOOST_FILESYSTEM_DECL directory_entry
+{
+public:
+ typedef boost::filesystem::path::value_type value_type; // enables class path ctor taking directory_entry
+
+ directory_entry() BOOST_NOEXCEPT {}
+ explicit directory_entry(const boost::filesystem::path& p)
+ : m_path(p), m_status(file_status()), m_symlink_status(file_status())
+ {}
+ directory_entry(const boost::filesystem::path& p,
+ file_status st, file_status symlink_st = file_status())
+ : m_path(p), m_status(st), m_symlink_status(symlink_st) {}
+
+ directory_entry(const directory_entry& rhs)
+ : m_path(rhs.m_path), m_status(rhs.m_status), m_symlink_status(rhs.m_symlink_status){}
+
+ directory_entry& operator=(const directory_entry& rhs)
+ {
+ m_path = rhs.m_path;
+ m_status = rhs.m_status;
+ m_symlink_status = rhs.m_symlink_status;
+ return *this;
+ }
+
+ // As of October 2015 the interaction between noexcept and =default is so troublesome
+ // for VC++, GCC, and probably other compilers, that =default is not used with noexcept
+ // functions. GCC is not even consistent for the same release on different platforms.
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ directory_entry(directory_entry&& rhs) BOOST_NOEXCEPT
+ {
+ m_path = std::move(rhs.m_path);
+ m_status = std::move(rhs.m_status);
+ m_symlink_status = std::move(rhs.m_symlink_status);
+ }
+ directory_entry& operator=(directory_entry&& rhs) BOOST_NOEXCEPT
+ {
+ m_path = std::move(rhs.m_path);
+ m_status = std::move(rhs.m_status);
+ m_symlink_status = std::move(rhs.m_symlink_status);
+ return *this;
+ }
+#endif
+
+ void assign(const boost::filesystem::path& p,
+ file_status st = file_status(), file_status symlink_st = file_status())
+ { m_path = p; m_status = st; m_symlink_status = symlink_st; }
+
+ void replace_filename(const boost::filesystem::path& p,
+ file_status st = file_status(), file_status symlink_st = file_status())
+ {
+ m_path.remove_filename();
+ m_path /= p;
+ m_status = st;
+ m_symlink_status = symlink_st;
+ }
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ void replace_leaf(const boost::filesystem::path& p,
+ file_status st, file_status symlink_st)
+ { replace_filename(p, st, symlink_st); }
+# endif
+
+ const boost::filesystem::path& path() const BOOST_NOEXCEPT {return m_path;}
+ operator const boost::filesystem::path&() const BOOST_NOEXCEPT
+ {return m_path;}
+ file_status status() const {return m_get_status();}
+ file_status status(system::error_code& ec) const BOOST_NOEXCEPT
+ {return m_get_status(&ec); }
+ file_status symlink_status() const {return m_get_symlink_status();}
+ file_status symlink_status(system::error_code& ec) const BOOST_NOEXCEPT
+ {return m_get_symlink_status(&ec); }
+
+ bool operator==(const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path == rhs.m_path; }
+ bool operator!=(const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path != rhs.m_path;}
+ bool operator< (const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path < rhs.m_path;}
+ bool operator<=(const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path <= rhs.m_path;}
+ bool operator> (const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path > rhs.m_path;}
+ bool operator>=(const directory_entry& rhs) const BOOST_NOEXCEPT {return m_path >= rhs.m_path;}
+
+private:
+ boost::filesystem::path m_path;
+ mutable file_status m_status; // stat()-like
+ mutable file_status m_symlink_status; // lstat()-like
+
+ file_status m_get_status(system::error_code* ec=0) const;
+ file_status m_get_symlink_status(system::error_code* ec=0) const;
+}; // directory_entry
+
+//--------------------------------------------------------------------------------------//
+// //
+// directory_iterator helpers //
+// //
+//--------------------------------------------------------------------------------------//
+
+class directory_iterator;
+
+namespace detail
+{
+ BOOST_FILESYSTEM_DECL
+ system::error_code dir_itr_close(// never throws()
+ void *& handle
+# if defined(BOOST_POSIX_API)
+ , void *& buffer
+# endif
+ );
+
+ struct dir_itr_imp
+ {
+ directory_entry dir_entry;
+ void* handle;
+
+# ifdef BOOST_POSIX_API
+ void* buffer; // see dir_itr_increment implementation
+# endif
+
+ dir_itr_imp() : handle(0)
+# ifdef BOOST_POSIX_API
+ , buffer(0)
+# endif
+ {}
+
+ ~dir_itr_imp() // never throws
+ {
+ dir_itr_close(handle
+# if defined(BOOST_POSIX_API)
+ , buffer
+# endif
+ );
+ }
+ };
+
+ // see path::iterator: comment below
+ BOOST_FILESYSTEM_DECL void directory_iterator_construct(directory_iterator& it,
+ const path& p, system::error_code* ec);
+ BOOST_FILESYSTEM_DECL void directory_iterator_increment(directory_iterator& it,
+ system::error_code* ec);
+
+} // namespace detail
+
+//--------------------------------------------------------------------------------------//
+// //
+// directory_iterator //
+// //
+//--------------------------------------------------------------------------------------//
+
+ class directory_iterator
+ : public boost::iterator_facade< directory_iterator,
+ directory_entry,
+ boost::single_pass_traversal_tag >
+ {
+ public:
+
+ directory_iterator() BOOST_NOEXCEPT {} // creates the "end" iterator
+
+ // iterator_facade derived classes don't seem to like implementations in
+ // separate translation unit dll's, so forward to detail functions
+ explicit directory_iterator(const path& p)
+ : m_imp(new detail::dir_itr_imp)
+ { detail::directory_iterator_construct(*this, p, 0); }
+
+ directory_iterator(const path& p, system::error_code& ec) BOOST_NOEXCEPT
+ : m_imp(new detail::dir_itr_imp)
+ { detail::directory_iterator_construct(*this, p, &ec); }
+
+ ~directory_iterator() {}
+
+ directory_iterator& increment(system::error_code& ec) BOOST_NOEXCEPT
+ {
+ detail::directory_iterator_increment(*this, &ec);
+ return *this;
+ }
+
+ private:
+ friend struct detail::dir_itr_imp;
+ friend BOOST_FILESYSTEM_DECL void detail::directory_iterator_construct(directory_iterator& it,
+ const path& p, system::error_code* ec);
+ friend BOOST_FILESYSTEM_DECL void detail::directory_iterator_increment(directory_iterator& it,
+ system::error_code* ec);
+
+ // shared_ptr provides the shallow-copy semantics required for single pass iterators
+ // (i.e. InputIterators). The end iterator is indicated by !m_imp || !m_imp->handle
+ boost::shared_ptr< detail::dir_itr_imp > m_imp;
+
+ friend class boost::iterator_core_access;
+
+ boost::iterator_facade<
+ directory_iterator,
+ directory_entry,
+ boost::single_pass_traversal_tag >::reference dereference() const
+ {
+ BOOST_ASSERT_MSG(m_imp.get(), "attempt to dereference end iterator");
+ return m_imp->dir_entry;
+ }
+
+ void increment() { detail::directory_iterator_increment(*this, 0); }
+
+ bool equal(const directory_iterator& rhs) const
+ {
+ return m_imp == rhs.m_imp
+ || (!m_imp && rhs.m_imp && !rhs.m_imp->handle)
+ || (!rhs.m_imp && m_imp && !m_imp->handle);
+ }
+
+ }; // directory_iterator
+
+ // enable directory_iterator C++11 range-base for statement use --------------------//
+
+ // begin() and end() are only used by a range-based for statement in the context of
+ // auto - thus the top-level const is stripped - so returning const is harmless and
+ // emphasizes begin() is just a pass through.
+ inline
+ const directory_iterator& begin(const directory_iterator& iter) BOOST_NOEXCEPT
+ {return iter;}
+ inline
+ directory_iterator end(const directory_iterator&) BOOST_NOEXCEPT
+ {return directory_iterator();}
+
+ // enable directory_iterator BOOST_FOREACH -----------------------------------------//
+
+ inline
+ directory_iterator& range_begin(directory_iterator& iter) BOOST_NOEXCEPT
+ {return iter;}
+ inline
+ directory_iterator range_begin(const directory_iterator& iter) BOOST_NOEXCEPT
+ {return iter;}
+ inline
+ directory_iterator range_end(directory_iterator&) BOOST_NOEXCEPT
+ {return directory_iterator();}
+ inline
+ directory_iterator range_end(const directory_iterator&) BOOST_NOEXCEPT
+ {return directory_iterator();}
+ } // namespace filesystem
+
+ // namespace boost template specializations
+ template<typename C, typename Enabler>
+ struct range_mutable_iterator;
+
+ template<>
+ struct range_mutable_iterator<boost::filesystem::directory_iterator, void>
+ { typedef boost::filesystem::directory_iterator type; };
+
+ template<typename C, typename Enabler>
+ struct range_const_iterator;
+
+ template<>
+ struct range_const_iterator<boost::filesystem::directory_iterator, void>
+ { typedef boost::filesystem::directory_iterator type; };
+
+namespace filesystem
+{
+
+//--------------------------------------------------------------------------------------//
+// //
+// recursive_directory_iterator helpers //
+// //
+//--------------------------------------------------------------------------------------//
+
+ BOOST_SCOPED_ENUM_START(symlink_option)
+ {
+ none,
+ no_recurse = none, // don't follow directory symlinks (default behavior)
+ recurse, // follow directory symlinks
+ _detail_no_push = recurse << 1, // internal use only
+
+ // BOOST_BITMASK op~ casts to int32_least_t, producing invalid enum values
+ _detail_extend_symlink_option_32_1 = 0x7fffffff,
+ _detail_extend_symlink_option_32_2 = -0x7fffffff-1
+ };
+ BOOST_SCOPED_ENUM_END
+
+ BOOST_BITMASK(BOOST_SCOPED_ENUM(symlink_option))
+
+ namespace detail
+ {
+ struct recur_dir_itr_imp
+ {
+ typedef directory_iterator element_type;
+ std::stack< element_type, std::vector< element_type > > m_stack;
+ int m_level;
+ BOOST_SCOPED_ENUM(symlink_option) m_options;
+
+ recur_dir_itr_imp() : m_level(0), m_options(symlink_option::none) {}
+
+ void increment(system::error_code* ec); // ec == 0 means throw on error
+
+ bool push_directory(system::error_code& ec) BOOST_NOEXCEPT;
+
+ void pop();
+
+ };
+
+ // Implementation is inline to avoid dynamic linking difficulties with m_stack:
+ // Microsoft warning C4251, m_stack needs to have dll-interface to be used by
+ // clients of struct 'boost::filesystem::detail::recur_dir_itr_imp'
+
+ inline
+ bool recur_dir_itr_imp::push_directory(system::error_code& ec) BOOST_NOEXCEPT
+ // Returns: true if push occurs, otherwise false. Always returns false on error.
+ {
+ ec.clear();
+
+ // Discover if the iterator is for a directory that needs to be recursed into,
+ // taking symlinks and options into account.
+
+ if ((m_options & symlink_option::_detail_no_push) == symlink_option::_detail_no_push)
+ {
+ m_options &= ~symlink_option::_detail_no_push;
+ return false;
+ }
+
+ file_status symlink_stat;
+
+ // if we are not recursing into symlinks, we are going to have to know if the
+ // stack top is a symlink, so get symlink_status and verify no error occurred
+ if ((m_options & symlink_option::recurse) != symlink_option::recurse)
+ {
+ symlink_stat = m_stack.top()->symlink_status(ec);
+ if (ec)
+ return false;
+ }
+
+ // Logic for following predicate was contributed by Daniel Aarno to handle cyclic
+ // symlinks correctly and efficiently, fixing ticket #5652.
+ // if (((m_options & symlink_option::recurse) == symlink_option::recurse
+ // || !is_symlink(m_stack.top()->symlink_status()))
+ // && is_directory(m_stack.top()->status())) ...
+ // The predicate code has since been rewritten to pass error_code arguments,
+ // per ticket #5653.
+
+ if ((m_options & symlink_option::recurse) == symlink_option::recurse
+ || !is_symlink(symlink_stat))
+ {
+ file_status stat = m_stack.top()->status(ec);
+ if (ec || !is_directory(stat))
+ return false;
+
+ directory_iterator next(m_stack.top()->path(), ec);
+ if (!ec && next != directory_iterator())
+ {
+ m_stack.push(next);
+ ++m_level;
+ return true;
+ }
+ }
+ return false;
+ }
+
+ inline
+ void recur_dir_itr_imp::increment(system::error_code* ec)
+ // ec == 0 means throw on error
+ //
+ // Invariant: On return, the top of the iterator stack is the next valid (possibly
+ // end) iterator, regardless of whether or not an error is reported, and regardless of
+ // whether any error is reported by exception or error code. In other words, progress
+ // is always made so a loop on the iterator will always eventually terminate
+ // regardless of errors.
+ {
+ system::error_code ec_push_directory;
+
+ // if various conditions are met, push a directory_iterator into the iterator stack
+ if (push_directory(ec_push_directory))
+ {
+ if (ec)
+ ec->clear();
+ return;
+ }
+
+ // Do the actual increment operation on the top iterator in the iterator
+ // stack, popping the stack if necessary, until either the stack is empty or a
+ // non-end iterator is reached.
+ while (!m_stack.empty() && ++m_stack.top() == directory_iterator())
+ {
+ m_stack.pop();
+ --m_level;
+ }
+
+ // report errors if any
+ if (ec_push_directory)
+ {
+ if (ec)
+ *ec = ec_push_directory;
+ else
+ {
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "filesystem::recursive_directory_iterator directory error",
+ ec_push_directory));
+ }
+ }
+ else if (ec)
+ ec->clear();
+ }
+
+ inline
+ void recur_dir_itr_imp::pop()
+ {
+ BOOST_ASSERT_MSG(m_level > 0,
+ "pop() on recursive_directory_iterator with level < 1");
+
+ do
+ {
+ m_stack.pop();
+ --m_level;
+ }
+ while (!m_stack.empty() && ++m_stack.top() == directory_iterator());
+ }
+ } // namespace detail
+
+//--------------------------------------------------------------------------------------//
+// //
+// recursive_directory_iterator //
+// //
+//--------------------------------------------------------------------------------------//
+
+ class recursive_directory_iterator
+ : public boost::iterator_facade<
+ recursive_directory_iterator,
+ directory_entry,
+ boost::single_pass_traversal_tag >
+ {
+ public:
+
+ recursive_directory_iterator() BOOST_NOEXCEPT {} // creates the "end" iterator
+
+ explicit recursive_directory_iterator(const path& dir_path) // throws if !exists()
+ : m_imp(new detail::recur_dir_itr_imp)
+ {
+ m_imp->m_options = symlink_option::none;
+ m_imp->m_stack.push(directory_iterator(dir_path));
+ if (m_imp->m_stack.top() == directory_iterator())
+ { m_imp.reset(); }
+ }
+
+ recursive_directory_iterator(const path& dir_path,
+ BOOST_SCOPED_ENUM(symlink_option) opt) // throws if !exists()
+ : m_imp(new detail::recur_dir_itr_imp)
+ {
+ m_imp->m_options = opt;
+ m_imp->m_stack.push(directory_iterator(dir_path));
+ if (m_imp->m_stack.top() == directory_iterator())
+ { m_imp.reset (); }
+ }
+
+ recursive_directory_iterator(const path& dir_path,
+ BOOST_SCOPED_ENUM(symlink_option) opt,
+ system::error_code & ec) BOOST_NOEXCEPT
+ : m_imp(new detail::recur_dir_itr_imp)
+ {
+ m_imp->m_options = opt;
+ m_imp->m_stack.push(directory_iterator(dir_path, ec));
+ if (m_imp->m_stack.top() == directory_iterator())
+ { m_imp.reset (); }
+ }
+
+ recursive_directory_iterator(const path& dir_path,
+ system::error_code & ec) BOOST_NOEXCEPT
+ : m_imp(new detail::recur_dir_itr_imp)
+ {
+ m_imp->m_options = symlink_option::none;
+ m_imp->m_stack.push(directory_iterator(dir_path, ec));
+ if (m_imp->m_stack.top() == directory_iterator())
+ { m_imp.reset (); }
+ }
+
+ recursive_directory_iterator& increment(system::error_code& ec) BOOST_NOEXCEPT
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "increment() on end recursive_directory_iterator");
+ m_imp->increment(&ec);
+ if (m_imp->m_stack.empty())
+ m_imp.reset(); // done, so make end iterator
+ return *this;
+ }
+
+ int depth() const BOOST_NOEXCEPT
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "depth() on end recursive_directory_iterator");
+ return m_imp->m_level;
+ }
+
+ int level() const BOOST_NOEXCEPT { return depth(); }
+
+ bool recursion_pending() const BOOST_NOEXCEPT
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "is_no_push_requested() on end recursive_directory_iterator");
+ return (m_imp->m_options & symlink_option::_detail_no_push)
+ == symlink_option::_detail_no_push;
+ }
+
+ bool no_push_pending() const BOOST_NOEXCEPT { return recursion_pending(); }
+
+# ifndef BOOST_FILESYSTEM_NO_DEPRECATED
+ bool no_push_request() const BOOST_NOEXCEPT { return no_push_pending(); }
+# endif
+
+ void pop()
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "pop() on end recursive_directory_iterator");
+ m_imp->pop();
+ if (m_imp->m_stack.empty()) m_imp.reset(); // done, so make end iterator
+ }
+
+ void disable_recursion_pending(bool value=true) BOOST_NOEXCEPT
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "no_push() on end recursive_directory_iterator");
+ if (value)
+ m_imp->m_options |= symlink_option::_detail_no_push;
+ else
+ m_imp->m_options &= ~symlink_option::_detail_no_push;
+ }
+
+ void no_push(bool value=true) BOOST_NOEXCEPT { disable_recursion_pending(value); }
+
+ file_status status() const
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "status() on end recursive_directory_iterator");
+ return m_imp->m_stack.top()->status();
+ }
+
+ file_status symlink_status() const
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "symlink_status() on end recursive_directory_iterator");
+ return m_imp->m_stack.top()->symlink_status();
+ }
+
+ private:
+
+ // shared_ptr provides the shallow-copy semantics required for single pass iterators
+ // (i.e. InputIterators).
+ // The end iterator is indicated by !m_imp || m_imp->m_stack.empty()
+ boost::shared_ptr< detail::recur_dir_itr_imp > m_imp;
+
+ friend class boost::iterator_core_access;
+
+ boost::iterator_facade<
+ recursive_directory_iterator,
+ directory_entry,
+ boost::single_pass_traversal_tag >::reference
+ dereference() const
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "dereference of end recursive_directory_iterator");
+ return *m_imp->m_stack.top();
+ }
+
+ void increment()
+ {
+ BOOST_ASSERT_MSG(m_imp.get(),
+ "increment of end recursive_directory_iterator");
+ m_imp->increment(0);
+ if (m_imp->m_stack.empty())
+ m_imp.reset(); // done, so make end iterator
+ }
+
+ bool equal(const recursive_directory_iterator& rhs) const
+ {
+ return m_imp == rhs.m_imp
+ || (!m_imp && rhs.m_imp && rhs.m_imp->m_stack.empty())
+ || (!rhs.m_imp && m_imp && m_imp->m_stack.empty()) ;
+ }
+
+ }; // recursive directory iterator
+
+ // enable recursive directory iterator C++11 range-base for statement use ----------//
+
+ // begin() and end() are only used by a range-based for statement in the context of
+ // auto - thus the top-level const is stripped - so returning const is harmless and
+ // emphasizes begin() is just a pass through.
+ inline
+ const recursive_directory_iterator&
+ begin(const recursive_directory_iterator& iter) BOOST_NOEXCEPT
+ {return iter;}
+ inline
+ recursive_directory_iterator end(const recursive_directory_iterator&) BOOST_NOEXCEPT
+ {return recursive_directory_iterator();}
+
+ // enable recursive directory iterator BOOST_FOREACH -------------------------------//
+
+ inline
+ recursive_directory_iterator&
+ range_begin(recursive_directory_iterator& iter) BOOST_NOEXCEPT
+ {return iter;}
+ inline
+ recursive_directory_iterator
+ range_begin(const recursive_directory_iterator& iter) BOOST_NOEXCEPT
+ {return iter;}
+ inline
+ recursive_directory_iterator range_end(recursive_directory_iterator&) BOOST_NOEXCEPT
+ {return recursive_directory_iterator();}
+ inline
+ recursive_directory_iterator range_end(const recursive_directory_iterator&) BOOST_NOEXCEPT
+ {return recursive_directory_iterator();}
+ } // namespace filesystem
+
+ // namespace boost template specializations
+ template<>
+ struct range_mutable_iterator<boost::filesystem::recursive_directory_iterator, void>
+ { typedef boost::filesystem::recursive_directory_iterator type; };
+ template<>
+ struct range_const_iterator<boost::filesystem::recursive_directory_iterator, void>
+ { typedef boost::filesystem::recursive_directory_iterator type; };
+
+namespace filesystem
+{
+
+# if !defined(BOOST_FILESYSTEM_NO_DEPRECATED)
+ typedef recursive_directory_iterator wrecursive_directory_iterator;
+# endif
+
+// test helper -----------------------------------------------------------------------//
+
+// Not part of the documented interface since false positives are possible;
+// there is no law that says that an OS that has large stat.st_size
+// actually supports large file sizes.
+
+ namespace detail
+ {
+ BOOST_FILESYSTEM_DECL bool possible_large_file_size_support();
+ }
+
+ } // namespace filesystem
+} // namespace boost
+
+#include <boost/config/abi_suffix.hpp> // pops abi_prefix.hpp pragmas
+#endif // BOOST_FILESYSTEM3_OPERATIONS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/path.hpp b/src/third_party/boost-1.69.0/boost/filesystem/path.hpp
index 65e27b17dac..65e27b17dac 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/path.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/path.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/path_traits.hpp b/src/third_party/boost-1.69.0/boost/filesystem/path_traits.hpp
index 129044a4693..129044a4693 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/path_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/path_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/filesystem/string_file.hpp b/src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp
index 015f659080a..015f659080a 100644
--- a/src/third_party/boost-1.68.0/boost/filesystem/string_file.hpp
+++ b/src/third_party/boost-1.69.0/boost/filesystem/string_file.hpp
diff --git a/src/third_party/boost-1.68.0/boost/foreach.hpp b/src/third_party/boost-1.69.0/boost/foreach.hpp
index eb3a50b6531..eb3a50b6531 100644
--- a/src/third_party/boost-1.68.0/boost/foreach.hpp
+++ b/src/third_party/boost-1.69.0/boost/foreach.hpp
diff --git a/src/third_party/boost-1.68.0/boost/foreach_fwd.hpp b/src/third_party/boost-1.69.0/boost/foreach_fwd.hpp
index 4e0bb370c2f..4e0bb370c2f 100644
--- a/src/third_party/boost-1.68.0/boost/foreach_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/foreach_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format.hpp b/src/third_party/boost-1.69.0/boost/format.hpp
index 73464a819f8..73464a819f8 100644
--- a/src/third_party/boost-1.68.0/boost/format.hpp
+++ b/src/third_party/boost-1.69.0/boost/format.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/alt_sstream.hpp b/src/third_party/boost-1.69.0/boost/format/alt_sstream.hpp
index 138e1757381..138e1757381 100644
--- a/src/third_party/boost-1.68.0/boost/format/alt_sstream.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/alt_sstream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/alt_sstream_impl.hpp b/src/third_party/boost-1.69.0/boost/format/alt_sstream_impl.hpp
index 998f8b2e55d..998f8b2e55d 100644
--- a/src/third_party/boost-1.68.0/boost/format/alt_sstream_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/alt_sstream_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/detail/compat_workarounds.hpp b/src/third_party/boost-1.69.0/boost/format/detail/compat_workarounds.hpp
index 8e51514f3ef..8e51514f3ef 100644
--- a/src/third_party/boost-1.68.0/boost/format/detail/compat_workarounds.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/detail/compat_workarounds.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/detail/config_macros.hpp b/src/third_party/boost-1.69.0/boost/format/detail/config_macros.hpp
index 44d1e86c631..44d1e86c631 100644
--- a/src/third_party/boost-1.68.0/boost/format/detail/config_macros.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/detail/config_macros.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/detail/msvc_disambiguater.hpp b/src/third_party/boost-1.69.0/boost/format/detail/msvc_disambiguater.hpp
index c2692c44356..c2692c44356 100644
--- a/src/third_party/boost-1.68.0/boost/format/detail/msvc_disambiguater.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/detail/msvc_disambiguater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/detail/unset_macros.hpp b/src/third_party/boost-1.69.0/boost/format/detail/unset_macros.hpp
index b3ac47b42be..b3ac47b42be 100644
--- a/src/third_party/boost-1.68.0/boost/format/detail/unset_macros.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/detail/unset_macros.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/detail/workarounds_gcc-2_95.hpp b/src/third_party/boost-1.69.0/boost/format/detail/workarounds_gcc-2_95.hpp
index 8c49d42d02c..8c49d42d02c 100644
--- a/src/third_party/boost-1.68.0/boost/format/detail/workarounds_gcc-2_95.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/detail/workarounds_gcc-2_95.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/detail/workarounds_stlport.hpp b/src/third_party/boost-1.69.0/boost/format/detail/workarounds_stlport.hpp
index 5d435b98a0e..5d435b98a0e 100644
--- a/src/third_party/boost-1.68.0/boost/format/detail/workarounds_stlport.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/detail/workarounds_stlport.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/exceptions.hpp b/src/third_party/boost-1.69.0/boost/format/exceptions.hpp
index 56ee30dce09..56ee30dce09 100644
--- a/src/third_party/boost-1.68.0/boost/format/exceptions.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/exceptions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/feed_args.hpp b/src/third_party/boost-1.69.0/boost/format/feed_args.hpp
index b0e520e54af..b0e520e54af 100644
--- a/src/third_party/boost-1.68.0/boost/format/feed_args.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/feed_args.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/format_class.hpp b/src/third_party/boost-1.69.0/boost/format/format_class.hpp
index ae98be4d759..ae98be4d759 100644
--- a/src/third_party/boost-1.68.0/boost/format/format_class.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/format_class.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/format_fwd.hpp b/src/third_party/boost-1.69.0/boost/format/format_fwd.hpp
index 16b8565468d..16b8565468d 100644
--- a/src/third_party/boost-1.68.0/boost/format/format_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/format_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/format_implementation.hpp b/src/third_party/boost-1.69.0/boost/format/format_implementation.hpp
index 2abb5c4b033..2abb5c4b033 100644
--- a/src/third_party/boost-1.68.0/boost/format/format_implementation.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/format_implementation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/free_funcs.hpp b/src/third_party/boost-1.69.0/boost/format/free_funcs.hpp
index 3a51545526f..3a51545526f 100644
--- a/src/third_party/boost-1.68.0/boost/format/free_funcs.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/free_funcs.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/group.hpp b/src/third_party/boost-1.69.0/boost/format/group.hpp
index c586b2a6171..c586b2a6171 100644
--- a/src/third_party/boost-1.68.0/boost/format/group.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/group.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/internals.hpp b/src/third_party/boost-1.69.0/boost/format/internals.hpp
index cd5fc540d38..cd5fc540d38 100644
--- a/src/third_party/boost-1.68.0/boost/format/internals.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/internals.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/internals_fwd.hpp b/src/third_party/boost-1.69.0/boost/format/internals_fwd.hpp
index 18cf122412d..18cf122412d 100644
--- a/src/third_party/boost-1.68.0/boost/format/internals_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/internals_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/format/parsing.hpp b/src/third_party/boost-1.69.0/boost/format/parsing.hpp
index 00074925c91..00074925c91 100644
--- a/src/third_party/boost-1.68.0/boost/format/parsing.hpp
+++ b/src/third_party/boost-1.69.0/boost/format/parsing.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function.hpp b/src/third_party/boost-1.69.0/boost/function.hpp
new file mode 100644
index 00000000000..ef907e0ff15
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/function.hpp
@@ -0,0 +1,74 @@
+// Boost.Function library
+
+// Copyright Douglas Gregor 2001-2003. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org/libs/function
+
+// William Kempf, Jesse Jones and Karl Nelson were all very helpful in the
+// design of this library.
+
+#ifndef BOOST_FUNCTION_MAX_ARGS
+# define BOOST_FUNCTION_MAX_ARGS 10
+#endif // BOOST_FUNCTION_MAX_ARGS
+
+#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
+
+#if !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED)
+#define BOOST_FUNCTION_MAX_ARGS_DEFINED 0
+#endif
+
+#include <functional> // unary_function, binary_function
+
+#include <boost/preprocessor/iterate.hpp>
+#include <boost/config/workaround.hpp>
+
+// Include the prologue here so that the use of file-level iteration
+// in anything that may be included by function_template.hpp doesn't break
+#include <boost/function/detail/prologue.hpp>
+
+// Older Visual Age C++ version do not handle the file iteration well
+#if BOOST_WORKAROUND(__IBMCPP__, >= 500) && BOOST_WORKAROUND(__IBMCPP__, < 800)
+# if BOOST_FUNCTION_MAX_ARGS >= 0
+# include <boost/function/function0.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 1
+# include <boost/function/function1.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 2
+# include <boost/function/function2.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 3
+# include <boost/function/function3.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 4
+# include <boost/function/function4.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 5
+# include <boost/function/function5.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 6
+# include <boost/function/function6.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 7
+# include <boost/function/function7.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 8
+# include <boost/function/function8.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 9
+# include <boost/function/function9.hpp>
+# endif
+# if BOOST_FUNCTION_MAX_ARGS >= 10
+# include <boost/function/function10.hpp>
+# endif
+#else
+// What is the '3' for?
+# define BOOST_PP_ITERATION_PARAMS_1 (3,(0,BOOST_FUNCTION_MAX_ARGS,<boost/function/detail/function_iterate.hpp>))
+# include BOOST_PP_ITERATE()
+# undef BOOST_PP_ITERATION_PARAMS_1
+#endif
+
+#endif // !defined(BOOST_FUNCTION_MAX_ARGS_DEFINED) || (BOOST_FUNCTION_MAX_ARGS_DEFINED != BOOST_FUNCTION_MAX_ARGS)
diff --git a/src/third_party/boost-1.68.0/boost/function/detail/function_iterate.hpp b/src/third_party/boost-1.69.0/boost/function/detail/function_iterate.hpp
index 5370b36aac5..5370b36aac5 100644
--- a/src/third_party/boost-1.68.0/boost/function/detail/function_iterate.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/detail/function_iterate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/detail/gen_maybe_include.pl b/src/third_party/boost-1.69.0/boost/function/detail/gen_maybe_include.pl
index bc409840b6a..bc409840b6a 100644
--- a/src/third_party/boost-1.68.0/boost/function/detail/gen_maybe_include.pl
+++ b/src/third_party/boost-1.69.0/boost/function/detail/gen_maybe_include.pl
diff --git a/src/third_party/boost-1.68.0/boost/function/detail/maybe_include.hpp b/src/third_party/boost-1.69.0/boost/function/detail/maybe_include.hpp
index ec88905dcd9..ec88905dcd9 100644
--- a/src/third_party/boost-1.68.0/boost/function/detail/maybe_include.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/detail/maybe_include.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/detail/prologue.hpp b/src/third_party/boost-1.69.0/boost/function/detail/prologue.hpp
index 53d0f05cd37..53d0f05cd37 100644
--- a/src/third_party/boost-1.68.0/boost/function/detail/prologue.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/detail/prologue.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function0.hpp b/src/third_party/boost-1.69.0/boost/function/function0.hpp
index 65a02e5facb..65a02e5facb 100644
--- a/src/third_party/boost-1.68.0/boost/function/function0.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function1.hpp b/src/third_party/boost-1.69.0/boost/function/function1.hpp
index 9089715155c..9089715155c 100644
--- a/src/third_party/boost-1.68.0/boost/function/function1.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function10.hpp b/src/third_party/boost-1.69.0/boost/function/function10.hpp
index 65627248496..65627248496 100644
--- a/src/third_party/boost-1.68.0/boost/function/function10.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function2.hpp b/src/third_party/boost-1.69.0/boost/function/function2.hpp
index dc8bf97521d..dc8bf97521d 100644
--- a/src/third_party/boost-1.68.0/boost/function/function2.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function3.hpp b/src/third_party/boost-1.69.0/boost/function/function3.hpp
index 19d1a49dd5a..19d1a49dd5a 100644
--- a/src/third_party/boost-1.68.0/boost/function/function3.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function4.hpp b/src/third_party/boost-1.69.0/boost/function/function4.hpp
index f3349e2dc97..f3349e2dc97 100644
--- a/src/third_party/boost-1.68.0/boost/function/function4.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function5.hpp b/src/third_party/boost-1.69.0/boost/function/function5.hpp
index a1305eb5ce2..a1305eb5ce2 100644
--- a/src/third_party/boost-1.68.0/boost/function/function5.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function6.hpp b/src/third_party/boost-1.69.0/boost/function/function6.hpp
index 1f609149196..1f609149196 100644
--- a/src/third_party/boost-1.68.0/boost/function/function6.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function7.hpp b/src/third_party/boost-1.69.0/boost/function/function7.hpp
index 68542ed46aa..68542ed46aa 100644
--- a/src/third_party/boost-1.68.0/boost/function/function7.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function7.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function8.hpp b/src/third_party/boost-1.69.0/boost/function/function8.hpp
index cf2c37661f7..cf2c37661f7 100644
--- a/src/third_party/boost-1.68.0/boost/function/function8.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function8.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/function9.hpp b/src/third_party/boost-1.69.0/boost/function/function9.hpp
index 590e0883d78..590e0883d78 100644
--- a/src/third_party/boost-1.68.0/boost/function/function9.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function9.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function_base.hpp b/src/third_party/boost-1.69.0/boost/function/function_base.hpp
new file mode 100644
index 00000000000..4db31c4fbcb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/function/function_base.hpp
@@ -0,0 +1,886 @@
+// Boost.Function library
+
+// Copyright Douglas Gregor 2001-2006
+// Copyright Emil Dotchevski 2007
+// Use, modification and distribution is subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+#ifndef BOOST_FUNCTION_BASE_HEADER
+#define BOOST_FUNCTION_BASE_HEADER
+
+#include <stdexcept>
+#include <string>
+#include <memory>
+#include <new>
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <boost/integer.hpp>
+#include <boost/type_index.hpp>
+#include <boost/type_traits/has_trivial_copy.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/composite_traits.hpp>
+#include <boost/ref.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/config/workaround.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#ifndef BOOST_NO_SFINAE
+#include <boost/type_traits/enable_if.hpp>
+#else
+#include <boost/type_traits/integral_constant.hpp>
+#endif
+#include <boost/function_equal.hpp>
+#include <boost/function/function_fwd.hpp>
+
+#if defined(BOOST_MSVC)
+# pragma warning( push )
+# pragma warning( disable : 4793 ) // complaint about native code generation
+# pragma warning( disable : 4127 ) // "conditional expression is constant"
+#endif
+
+#if defined(__ICL) && __ICL <= 600 || defined(__MWERKS__) && __MWERKS__ < 0x2406 && !defined(BOOST_STRICT_CONFIG)
+# define BOOST_FUNCTION_TARGET_FIX(x) x
+#else
+# define BOOST_FUNCTION_TARGET_FIX(x)
+#endif // __ICL etc
+
+# define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \
+ typename ::boost::enable_if_< \
+ !(::boost::is_integral<Functor>::value), \
+ Type>::type
+
+namespace boost {
+ namespace detail {
+ namespace function {
+ class X;
+
+ /**
+ * A buffer used to store small function objects in
+ * boost::function. It is a union containing function pointers,
+ * object pointers, and a structure that resembles a bound
+ * member function pointer.
+ */
+ union function_buffer_members
+ {
+ // For pointers to function objects
+ typedef void* obj_ptr_t;
+ mutable obj_ptr_t obj_ptr;
+
+ // For pointers to std::type_info objects
+ struct type_t {
+ // (get_functor_type_tag, check_functor_type_tag).
+ const boost::typeindex::type_info* type;
+
+ // Whether the type is const-qualified.
+ bool const_qualified;
+ // Whether the type is volatile-qualified.
+ bool volatile_qualified;
+ } type;
+
+ // For function pointers of all kinds
+ typedef void (*func_ptr_t)();
+ mutable func_ptr_t func_ptr;
+
+ // For bound member pointers
+ struct bound_memfunc_ptr_t {
+ void (X::*memfunc_ptr)(int);
+ void* obj_ptr;
+ } bound_memfunc_ptr;
+
+ // For references to function objects. We explicitly keep
+ // track of the cv-qualifiers on the object referenced.
+ struct obj_ref_t {
+ mutable void* obj_ptr;
+ bool is_const_qualified;
+ bool is_volatile_qualified;
+ } obj_ref;
+ };
+
+ union BOOST_SYMBOL_VISIBLE function_buffer
+ {
+ // Type-specific union members
+ mutable function_buffer_members members;
+
+ // To relax aliasing constraints
+ mutable char data[sizeof(function_buffer_members)];
+ };
+
+ /**
+ * The unusable class is a placeholder for unused function arguments
+ * It is also completely unusable except that it constructable from
+ * anything. This helps compilers without partial specialization to
+ * handle Boost.Function objects returning void.
+ */
+ struct unusable
+ {
+ unusable() {}
+ template<typename T> unusable(const T&) {}
+ };
+
+ /* Determine the return type. This supports compilers that do not support
+ * void returns or partial specialization by silently changing the return
+ * type to "unusable".
+ */
+ template<typename T> struct function_return_type { typedef T type; };
+
+ template<>
+ struct function_return_type<void>
+ {
+ typedef unusable type;
+ };
+
+ // The operation type to perform on the given functor/function pointer
+ enum functor_manager_operation_type {
+ clone_functor_tag,
+ move_functor_tag,
+ destroy_functor_tag,
+ check_functor_type_tag,
+ get_functor_type_tag
+ };
+
+ // Tags used to decide between different types of functions
+ struct function_ptr_tag {};
+ struct function_obj_tag {};
+ struct member_ptr_tag {};
+ struct function_obj_ref_tag {};
+
+ template<typename F>
+ class get_function_tag
+ {
+ typedef typename conditional<(is_pointer<F>::value),
+ function_ptr_tag,
+ function_obj_tag>::type ptr_or_obj_tag;
+
+ typedef typename conditional<(is_member_pointer<F>::value),
+ member_ptr_tag,
+ ptr_or_obj_tag>::type ptr_or_obj_or_mem_tag;
+
+ typedef typename conditional<(is_reference_wrapper<F>::value),
+ function_obj_ref_tag,
+ ptr_or_obj_or_mem_tag>::type or_ref_tag;
+
+ public:
+ typedef or_ref_tag type;
+ };
+
+ // The trivial manager does nothing but return the same pointer (if we
+ // are cloning) or return the null pointer (if we are deleting).
+ template<typename F>
+ struct reference_manager
+ {
+ static inline void
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ switch (op) {
+ case clone_functor_tag:
+ out_buffer.members.obj_ref = in_buffer.members.obj_ref;
+ return;
+
+ case move_functor_tag:
+ out_buffer.members.obj_ref = in_buffer.members.obj_ref;
+ in_buffer.members.obj_ref.obj_ptr = 0;
+ return;
+
+ case destroy_functor_tag:
+ out_buffer.members.obj_ref.obj_ptr = 0;
+ return;
+
+ case check_functor_type_tag:
+ {
+ // Check whether we have the same type. We can add
+ // cv-qualifiers, but we can't take them away.
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<F>()
+ && (!in_buffer.members.obj_ref.is_const_qualified
+ || out_buffer.members.type.const_qualified)
+ && (!in_buffer.members.obj_ref.is_volatile_qualified
+ || out_buffer.members.type.volatile_qualified))
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ref.obj_ptr;
+ else
+ out_buffer.members.obj_ptr = 0;
+ }
+ return;
+
+ case get_functor_type_tag:
+ out_buffer.members.type.type = &boost::typeindex::type_id<F>().type_info();
+ out_buffer.members.type.const_qualified = in_buffer.members.obj_ref.is_const_qualified;
+ out_buffer.members.type.volatile_qualified = in_buffer.members.obj_ref.is_volatile_qualified;
+ return;
+ }
+ }
+ };
+
+ /**
+ * Determine if boost::function can use the small-object
+ * optimization with the function object type F.
+ */
+ template<typename F>
+ struct function_allows_small_object_optimization
+ {
+ BOOST_STATIC_CONSTANT
+ (bool,
+ value = ((sizeof(F) <= sizeof(function_buffer) &&
+ (alignment_of<function_buffer>::value
+ % alignment_of<F>::value == 0))));
+ };
+
+ template <typename F,typename A>
+ struct functor_wrapper: public F, public A
+ {
+ functor_wrapper( F f, A a ):
+ F(f),
+ A(a)
+ {
+ }
+
+ functor_wrapper(const functor_wrapper& f) :
+ F(static_cast<const F&>(f)),
+ A(static_cast<const A&>(f))
+ {
+ }
+ };
+
+ /**
+ * The functor_manager class contains a static function "manage" which
+ * can clone or destroy the given function/function object pointer.
+ */
+ template<typename Functor>
+ struct functor_manager_common
+ {
+ typedef Functor functor_type;
+
+ // Function pointers
+ static inline void
+ manage_ptr(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ if (op == clone_functor_tag)
+ out_buffer.members.func_ptr = in_buffer.members.func_ptr;
+ else if (op == move_functor_tag) {
+ out_buffer.members.func_ptr = in_buffer.members.func_ptr;
+ in_buffer.members.func_ptr = 0;
+ } else if (op == destroy_functor_tag)
+ out_buffer.members.func_ptr = 0;
+ else if (op == check_functor_type_tag) {
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ out_buffer.members.obj_ptr = &in_buffer.members.func_ptr;
+ else
+ out_buffer.members.obj_ptr = 0;
+ } else /* op == get_functor_type_tag */ {
+ out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
+ }
+ }
+
+ // Function objects that fit in the small-object buffer.
+ static inline void
+ manage_small(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ if (op == clone_functor_tag || op == move_functor_tag) {
+ const functor_type* in_functor =
+ reinterpret_cast<const functor_type*>(in_buffer.data);
+ new (reinterpret_cast<void*>(out_buffer.data)) functor_type(*in_functor);
+
+ if (op == move_functor_tag) {
+ functor_type* f = reinterpret_cast<functor_type*>(in_buffer.data);
+ (void)f; // suppress warning about the value of f not being used (MSVC)
+ f->~Functor();
+ }
+ } else if (op == destroy_functor_tag) {
+ // Some compilers (Borland, vc6, ...) are unhappy with ~functor_type.
+ functor_type* f = reinterpret_cast<functor_type*>(out_buffer.data);
+ (void)f; // suppress warning about the value of f not being used (MSVC)
+ f->~Functor();
+ } else if (op == check_functor_type_tag) {
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ out_buffer.members.obj_ptr = in_buffer.data;
+ else
+ out_buffer.members.obj_ptr = 0;
+ } else /* op == get_functor_type_tag */ {
+ out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
+ }
+ }
+ };
+
+ template<typename Functor>
+ struct functor_manager
+ {
+ private:
+ typedef Functor functor_type;
+
+ // Function pointers
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, function_ptr_tag)
+ {
+ functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
+ }
+
+ // Function objects that fit in the small-object buffer.
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, true_type)
+ {
+ functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
+ }
+
+ // Function objects that require heap allocation
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, false_type)
+ {
+ if (op == clone_functor_tag) {
+ // Clone the functor
+ // GCC 2.95.3 gets the CV qualifiers wrong here, so we
+ // can't do the static_cast that we should do.
+ // jewillco: Changing this to static_cast because GCC 2.95.3 is
+ // obsolete.
+ const functor_type* f =
+ static_cast<const functor_type*>(in_buffer.members.obj_ptr);
+ functor_type* new_f = new functor_type(*f);
+ out_buffer.members.obj_ptr = new_f;
+ } else if (op == move_functor_tag) {
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
+ in_buffer.members.obj_ptr = 0;
+ } else if (op == destroy_functor_tag) {
+ /* Cast from the void pointer to the functor pointer type */
+ functor_type* f =
+ static_cast<functor_type*>(out_buffer.members.obj_ptr);
+ delete f;
+ out_buffer.members.obj_ptr = 0;
+ } else if (op == check_functor_type_tag) {
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
+ else
+ out_buffer.members.obj_ptr = 0;
+ } else /* op == get_functor_type_tag */ {
+ out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
+ }
+ }
+
+ // For function objects, we determine whether the function
+ // object can use the small-object optimization buffer or
+ // whether we need to allocate it on the heap.
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, function_obj_tag)
+ {
+ manager(in_buffer, out_buffer, op,
+ integral_constant<bool, (function_allows_small_object_optimization<functor_type>::value)>());
+ }
+
+ // For member pointers, we use the small-object optimization buffer.
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, member_ptr_tag)
+ {
+ manager(in_buffer, out_buffer, op, true_type());
+ }
+
+ public:
+ /* Dispatch to an appropriate manager based on whether we have a
+ function pointer or a function object pointer. */
+ static inline void
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ typedef typename get_function_tag<functor_type>::type tag_type;
+ switch (op) {
+ case get_functor_type_tag:
+ out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
+ return;
+
+ default:
+ manager(in_buffer, out_buffer, op, tag_type());
+ return;
+ }
+ }
+ };
+
+ template<typename Functor, typename Allocator>
+ struct functor_manager_a
+ {
+ private:
+ typedef Functor functor_type;
+
+ // Function pointers
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, function_ptr_tag)
+ {
+ functor_manager_common<Functor>::manage_ptr(in_buffer,out_buffer,op);
+ }
+
+ // Function objects that fit in the small-object buffer.
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, true_type)
+ {
+ functor_manager_common<Functor>::manage_small(in_buffer,out_buffer,op);
+ }
+
+ // Function objects that require heap allocation
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, false_type)
+ {
+ typedef functor_wrapper<Functor,Allocator> functor_wrapper_type;
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+#else
+ using wrapper_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<functor_wrapper_type>;
+ using wrapper_allocator_pointer_type = typename std::allocator_traits<wrapper_allocator_type>::pointer;
+#endif
+
+ if (op == clone_functor_tag) {
+ // Clone the functor
+ // GCC 2.95.3 gets the CV qualifiers wrong here, so we
+ // can't do the static_cast that we should do.
+ const functor_wrapper_type* f =
+ static_cast<const functor_wrapper_type*>(in_buffer.members.obj_ptr);
+ wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*f));
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
+ wrapper_allocator.construct(copy, *f);
+#else
+ std::allocator_traits<wrapper_allocator_type>::construct(wrapper_allocator, copy, *f);
+#endif
+
+ // Get back to the original pointer type
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ out_buffer.members.obj_ptr = new_f;
+ } else if (op == move_functor_tag) {
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
+ in_buffer.members.obj_ptr = 0;
+ } else if (op == destroy_functor_tag) {
+ /* Cast from the void pointer to the functor_wrapper_type */
+ functor_wrapper_type* victim =
+ static_cast<functor_wrapper_type*>(in_buffer.members.obj_ptr);
+ wrapper_allocator_type wrapper_allocator(static_cast<Allocator const &>(*victim));
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
+ wrapper_allocator.destroy(victim);
+#else
+ std::allocator_traits<wrapper_allocator_type>::destroy(wrapper_allocator, victim);
+#endif
+ wrapper_allocator.deallocate(victim,1);
+ out_buffer.members.obj_ptr = 0;
+ } else if (op == check_functor_type_tag) {
+ if (*out_buffer.members.type.type == boost::typeindex::type_id<Functor>())
+ out_buffer.members.obj_ptr = in_buffer.members.obj_ptr;
+ else
+ out_buffer.members.obj_ptr = 0;
+ } else /* op == get_functor_type_tag */ {
+ out_buffer.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
+ }
+ }
+
+ // For function objects, we determine whether the function
+ // object can use the small-object optimization buffer or
+ // whether we need to allocate it on the heap.
+ static inline void
+ manager(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op, function_obj_tag)
+ {
+ manager(in_buffer, out_buffer, op,
+ integral_constant<bool, (function_allows_small_object_optimization<functor_type>::value)>());
+ }
+
+ public:
+ /* Dispatch to an appropriate manager based on whether we have a
+ function pointer or a function object pointer. */
+ static inline void
+ manage(const function_buffer& in_buffer, function_buffer& out_buffer,
+ functor_manager_operation_type op)
+ {
+ typedef typename get_function_tag<functor_type>::type tag_type;
+ switch (op) {
+ case get_functor_type_tag:
+ out_buffer.members.type.type = &boost::typeindex::type_id<functor_type>().type_info();
+ out_buffer.members.type.const_qualified = false;
+ out_buffer.members.type.volatile_qualified = false;
+ return;
+
+ default:
+ manager(in_buffer, out_buffer, op, tag_type());
+ return;
+ }
+ }
+ };
+
+ // A type that is only used for comparisons against zero
+ struct useless_clear_type {};
+
+#ifdef BOOST_NO_SFINAE
+ // These routines perform comparisons between a Boost.Function
+ // object and an arbitrary function object (when the last
+ // parameter is false_type) or against zero (when the
+ // last parameter is true_type). They are only necessary
+ // for compilers that don't support SFINAE.
+ template<typename Function, typename Functor>
+ bool
+ compare_equal(const Function& f, const Functor&, int, true_type)
+ { return f.empty(); }
+
+ template<typename Function, typename Functor>
+ bool
+ compare_not_equal(const Function& f, const Functor&, int,
+ true_type)
+ { return !f.empty(); }
+
+ template<typename Function, typename Functor>
+ bool
+ compare_equal(const Function& f, const Functor& g, long,
+ false_type)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return function_equal(*fp, g);
+ else return false;
+ }
+
+ template<typename Function, typename Functor>
+ bool
+ compare_equal(const Function& f, const reference_wrapper<Functor>& g,
+ int, false_type)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return fp == g.get_pointer();
+ else return false;
+ }
+
+ template<typename Function, typename Functor>
+ bool
+ compare_not_equal(const Function& f, const Functor& g, long,
+ false_type)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return !function_equal(*fp, g);
+ else return true;
+ }
+
+ template<typename Function, typename Functor>
+ bool
+ compare_not_equal(const Function& f,
+ const reference_wrapper<Functor>& g, int,
+ false_type)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return fp != g.get_pointer();
+ else return true;
+ }
+#endif // BOOST_NO_SFINAE
+
+ /**
+ * Stores the "manager" portion of the vtable for a
+ * boost::function object.
+ */
+ struct vtable_base
+ {
+ void (*manager)(const function_buffer& in_buffer,
+ function_buffer& out_buffer,
+ functor_manager_operation_type op);
+ };
+ } // end namespace function
+ } // end namespace detail
+
+/**
+ * The function_base class contains the basic elements needed for the
+ * function1, function2, function3, etc. classes. It is common to all
+ * functions (and as such can be used to tell if we have one of the
+ * functionN objects).
+ */
+class function_base
+{
+public:
+ function_base() : vtable(0) { }
+
+ /** Determine if the function is empty (i.e., has no target). */
+ bool empty() const { return !vtable; }
+
+ /** Retrieve the type of the stored function object, or type_id<void>()
+ if this is empty. */
+ const boost::typeindex::type_info& target_type() const
+ {
+ if (!vtable) return boost::typeindex::type_id<void>().type_info();
+
+ detail::function::function_buffer type;
+ get_vtable()->manager(functor, type, detail::function::get_functor_type_tag);
+ return *type.members.type.type;
+ }
+
+ template<typename Functor>
+ Functor* target()
+ {
+ if (!vtable) return 0;
+
+ detail::function::function_buffer type_result;
+ type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ type_result.members.type.const_qualified = is_const<Functor>::value;
+ type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
+ get_vtable()->manager(functor, type_result,
+ detail::function::check_functor_type_tag);
+ return static_cast<Functor*>(type_result.members.obj_ptr);
+ }
+
+ template<typename Functor>
+ const Functor* target() const
+ {
+ if (!vtable) return 0;
+
+ detail::function::function_buffer type_result;
+ type_result.members.type.type = &boost::typeindex::type_id<Functor>().type_info();
+ type_result.members.type.const_qualified = true;
+ type_result.members.type.volatile_qualified = is_volatile<Functor>::value;
+ get_vtable()->manager(functor, type_result,
+ detail::function::check_functor_type_tag);
+ // GCC 2.95.3 gets the CV qualifiers wrong here, so we
+ // can't do the static_cast that we should do.
+ return static_cast<const Functor*>(type_result.members.obj_ptr);
+ }
+
+ template<typename F>
+ bool contains(const F& f) const
+ {
+ if (const F* fp = this->template target<F>())
+ {
+ return function_equal(*fp, f);
+ } else {
+ return false;
+ }
+ }
+
+#if defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3
+ // GCC 3.3 and newer cannot copy with the global operator==, due to
+ // problems with instantiation of function return types before it
+ // has been verified that the argument types match up.
+ template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator==(Functor g) const
+ {
+ if (const Functor* fp = target<Functor>())
+ return function_equal(*fp, g);
+ else return false;
+ }
+
+ template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator!=(Functor g) const
+ {
+ if (const Functor* fp = target<Functor>())
+ return !function_equal(*fp, g);
+ else return true;
+ }
+#endif
+
+public: // should be protected, but GCC 2.95.3 will fail to allow access
+ detail::function::vtable_base* get_vtable() const {
+ return reinterpret_cast<detail::function::vtable_base*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01));
+ }
+
+ bool has_trivial_copy_and_destroy() const {
+ return reinterpret_cast<std::size_t>(vtable) & 0x01;
+ }
+
+ detail::function::vtable_base* vtable;
+ mutable detail::function::function_buffer functor;
+};
+
+#if defined(BOOST_CLANG)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
+/**
+ * The bad_function_call exception class is thrown when a boost::function
+ * object is invoked
+ */
+class BOOST_SYMBOL_VISIBLE bad_function_call : public std::runtime_error
+{
+public:
+ bad_function_call() : std::runtime_error("call to empty boost::function") {}
+};
+#if defined(BOOST_CLANG)
+# pragma clang diagnostic pop
+#endif
+
+#ifndef BOOST_NO_SFINAE
+inline bool operator==(const function_base& f,
+ detail::function::useless_clear_type*)
+{
+ return f.empty();
+}
+
+inline bool operator!=(const function_base& f,
+ detail::function::useless_clear_type*)
+{
+ return !f.empty();
+}
+
+inline bool operator==(detail::function::useless_clear_type*,
+ const function_base& f)
+{
+ return f.empty();
+}
+
+inline bool operator!=(detail::function::useless_clear_type*,
+ const function_base& f)
+{
+ return !f.empty();
+}
+#endif
+
+#ifdef BOOST_NO_SFINAE
+// Comparisons between boost::function objects and arbitrary function objects
+template<typename Functor>
+ inline bool operator==(const function_base& f, Functor g)
+ {
+ typedef integral_constant<bool, (is_integral<Functor>::value)> integral;
+ return detail::function::compare_equal(f, g, 0, integral());
+ }
+
+template<typename Functor>
+ inline bool operator==(Functor g, const function_base& f)
+ {
+ typedef integral_constant<bool, (is_integral<Functor>::value)> integral;
+ return detail::function::compare_equal(f, g, 0, integral());
+ }
+
+template<typename Functor>
+ inline bool operator!=(const function_base& f, Functor g)
+ {
+ typedef integral_constant<bool, (is_integral<Functor>::value)> integral;
+ return detail::function::compare_not_equal(f, g, 0, integral());
+ }
+
+template<typename Functor>
+ inline bool operator!=(Functor g, const function_base& f)
+ {
+ typedef integral_constant<bool, (is_integral<Functor>::value)> integral;
+ return detail::function::compare_not_equal(f, g, 0, integral());
+ }
+#else
+
+# if !(defined(__GNUC__) && __GNUC__ == 3 && __GNUC_MINOR__ <= 3)
+// Comparisons between boost::function objects and arbitrary function
+// objects. GCC 3.3 and before has an obnoxious bug that prevents this
+// from working.
+template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator==(const function_base& f, Functor g)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return function_equal(*fp, g);
+ else return false;
+ }
+
+template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator==(Functor g, const function_base& f)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return function_equal(g, *fp);
+ else return false;
+ }
+
+template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator!=(const function_base& f, Functor g)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return !function_equal(*fp, g);
+ else return true;
+ }
+
+template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator!=(Functor g, const function_base& f)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return !function_equal(g, *fp);
+ else return true;
+ }
+# endif
+
+template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator==(const function_base& f, reference_wrapper<Functor> g)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return fp == g.get_pointer();
+ else return false;
+ }
+
+template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator==(reference_wrapper<Functor> g, const function_base& f)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return g.get_pointer() == fp;
+ else return false;
+ }
+
+template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator!=(const function_base& f, reference_wrapper<Functor> g)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return fp != g.get_pointer();
+ else return true;
+ }
+
+template<typename Functor>
+ BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor, bool)
+ operator!=(reference_wrapper<Functor> g, const function_base& f)
+ {
+ if (const Functor* fp = f.template target<Functor>())
+ return g.get_pointer() != fp;
+ else return true;
+ }
+
+#endif // Compiler supporting SFINAE
+
+namespace detail {
+ namespace function {
+ inline bool has_empty_target(const function_base* f)
+ {
+ return f->empty();
+ }
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
+ inline bool has_empty_target(const void*)
+ {
+ return false;
+ }
+#else
+ inline bool has_empty_target(...)
+ {
+ return false;
+ }
+#endif
+ } // end namespace function
+} // end namespace detail
+} // end namespace boost
+
+#undef BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL
+
+#if defined(BOOST_MSVC)
+# pragma warning( pop )
+#endif
+
+#endif // BOOST_FUNCTION_BASE_HEADER
diff --git a/src/third_party/boost-1.68.0/boost/function/function_fwd.hpp b/src/third_party/boost-1.69.0/boost/function/function_fwd.hpp
index e79b504899e..e79b504899e 100644
--- a/src/third_party/boost-1.68.0/boost/function/function_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/function/function_template.hpp b/src/third_party/boost-1.69.0/boost/function/function_template.hpp
new file mode 100644
index 00000000000..56f6bb491a7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/function/function_template.hpp
@@ -0,0 +1,1185 @@
+// Boost.Function library
+
+// Copyright Douglas Gregor 2001-2006
+// Copyright Emil Dotchevski 2007
+// Use, modification and distribution is subject to the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// For more information, see http://www.boost.org
+
+// Note: this header is a header template and must NOT have multiple-inclusion
+// protection.
+#include <boost/function/detail/prologue.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+
+#if defined(BOOST_MSVC)
+# pragma warning( push )
+# pragma warning( disable : 4127 ) // "conditional expression is constant"
+#endif
+
+#define BOOST_FUNCTION_TEMPLATE_PARMS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, typename T)
+
+#define BOOST_FUNCTION_TEMPLATE_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, T)
+
+#define BOOST_FUNCTION_PARM(J,I,D) BOOST_PP_CAT(T,I) BOOST_PP_CAT(a,I)
+
+#define BOOST_FUNCTION_PARMS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_PARM,BOOST_PP_EMPTY)
+
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM_PARAMS(BOOST_FUNCTION_NUM_ARGS, a)
+#else
+# define BOOST_FUNCTION_ARG(J,I,D) static_cast<BOOST_PP_CAT(T,I)&&>(BOOST_PP_CAT(a,I))
+# define BOOST_FUNCTION_ARGS BOOST_PP_ENUM(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG,BOOST_PP_EMPTY)
+#endif
+
+#define BOOST_FUNCTION_ARG_TYPE(J,I,D) \
+ typedef BOOST_PP_CAT(T,I) BOOST_PP_CAT(BOOST_PP_CAT(arg, BOOST_PP_INC(I)),_type);
+
+#define BOOST_FUNCTION_ARG_TYPES BOOST_PP_REPEAT(BOOST_FUNCTION_NUM_ARGS,BOOST_FUNCTION_ARG_TYPE,BOOST_PP_EMPTY)
+
+// Comma if nonzero number of arguments
+#if BOOST_FUNCTION_NUM_ARGS == 0
+# define BOOST_FUNCTION_COMMA
+#else
+# define BOOST_FUNCTION_COMMA ,
+#endif // BOOST_FUNCTION_NUM_ARGS > 0
+
+// Class names used in this version of the code
+#define BOOST_FUNCTION_FUNCTION BOOST_JOIN(function,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_FUNCTION_INVOKER \
+ BOOST_JOIN(function_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_VOID_FUNCTION_INVOKER \
+ BOOST_JOIN(void_function_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_FUNCTION_OBJ_INVOKER \
+ BOOST_JOIN(function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER \
+ BOOST_JOIN(void_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_FUNCTION_REF_INVOKER \
+ BOOST_JOIN(function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER \
+ BOOST_JOIN(void_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_MEMBER_INVOKER \
+ BOOST_JOIN(function_mem_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_VOID_MEMBER_INVOKER \
+ BOOST_JOIN(function_void_mem_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_GET_FUNCTION_INVOKER \
+ BOOST_JOIN(get_function_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER \
+ BOOST_JOIN(get_function_obj_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER \
+ BOOST_JOIN(get_function_ref_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_GET_MEMBER_INVOKER \
+ BOOST_JOIN(get_member_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_GET_INVOKER \
+ BOOST_JOIN(get_invoker,BOOST_FUNCTION_NUM_ARGS)
+#define BOOST_FUNCTION_VTABLE BOOST_JOIN(basic_vtable,BOOST_FUNCTION_NUM_ARGS)
+
+#ifndef BOOST_NO_VOID_RETURNS
+# define BOOST_FUNCTION_VOID_RETURN_TYPE void
+# define BOOST_FUNCTION_RETURN(X) X
+#else
+# define BOOST_FUNCTION_VOID_RETURN_TYPE boost::detail::function::unusable
+# define BOOST_FUNCTION_RETURN(X) X; return BOOST_FUNCTION_VOID_RETURN_TYPE ()
+#endif
+
+namespace boost {
+ namespace detail {
+ namespace function {
+ template<
+ typename FunctionPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_FUNCTION_INVOKER
+ {
+ static R invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
+ return f(BOOST_FUNCTION_ARGS);
+ }
+ };
+
+ template<
+ typename FunctionPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_VOID_FUNCTION_INVOKER
+ {
+ static BOOST_FUNCTION_VOID_RETURN_TYPE
+ invoke(function_buffer& function_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ FunctionPtr f = reinterpret_cast<FunctionPtr>(function_ptr.members.func_ptr);
+ BOOST_FUNCTION_RETURN(f(BOOST_FUNCTION_ARGS));
+ }
+ };
+
+ template<
+ typename FunctionObj,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
+ {
+ static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
+ return (*f)(BOOST_FUNCTION_ARGS);
+ }
+ };
+
+ template<
+ typename FunctionObj,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
+ {
+ static BOOST_FUNCTION_VOID_RETURN_TYPE
+ invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ FunctionObj* f;
+ if (function_allows_small_object_optimization<FunctionObj>::value)
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.data);
+ else
+ f = reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
+ BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
+ }
+ };
+
+ template<
+ typename FunctionObj,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_FUNCTION_REF_INVOKER
+ {
+ static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
+ return (*f)(BOOST_FUNCTION_ARGS);
+ }
+ };
+
+ template<
+ typename FunctionObj,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER
+ {
+ static BOOST_FUNCTION_VOID_RETURN_TYPE
+ invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ FunctionObj* f =
+ reinterpret_cast<FunctionObj*>(function_obj_ptr.members.obj_ptr);
+ BOOST_FUNCTION_RETURN((*f)(BOOST_FUNCTION_ARGS));
+ }
+ };
+
+#if BOOST_FUNCTION_NUM_ARGS > 0
+ /* Handle invocation of member pointers. */
+ template<
+ typename MemberPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_MEMBER_INVOKER
+ {
+ static R invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
+ return boost::mem_fn(*f)(BOOST_FUNCTION_ARGS);
+ }
+ };
+
+ template<
+ typename MemberPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_VOID_MEMBER_INVOKER
+ {
+ static BOOST_FUNCTION_VOID_RETURN_TYPE
+ invoke(function_buffer& function_obj_ptr BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_PARMS)
+
+ {
+ MemberPtr* f =
+ reinterpret_cast<MemberPtr*>(function_obj_ptr.data);
+ BOOST_FUNCTION_RETURN(boost::mem_fn(*f)(BOOST_FUNCTION_ARGS));
+ }
+ };
+#endif
+
+ template<
+ typename FunctionPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_GET_FUNCTION_INVOKER
+ {
+ typedef typename conditional<(is_void<R>::value),
+ BOOST_FUNCTION_VOID_FUNCTION_INVOKER<
+ FunctionPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >,
+ BOOST_FUNCTION_FUNCTION_INVOKER<
+ FunctionPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >
+ >::type type;
+ };
+
+ template<
+ typename FunctionObj,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
+ {
+ typedef typename conditional<(is_void<R>::value),
+ BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER<
+ FunctionObj,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >,
+ BOOST_FUNCTION_FUNCTION_OBJ_INVOKER<
+ FunctionObj,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >
+ >::type type;
+ };
+
+ template<
+ typename FunctionObj,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER
+ {
+ typedef typename conditional<(is_void<R>::value),
+ BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER<
+ FunctionObj,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >,
+ BOOST_FUNCTION_FUNCTION_REF_INVOKER<
+ FunctionObj,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >
+ >::type type;
+ };
+
+#if BOOST_FUNCTION_NUM_ARGS > 0
+ /* Retrieve the appropriate invoker for a member pointer. */
+ template<
+ typename MemberPtr,
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ struct BOOST_FUNCTION_GET_MEMBER_INVOKER
+ {
+ typedef typename conditional<(is_void<R>::value),
+ BOOST_FUNCTION_VOID_MEMBER_INVOKER<
+ MemberPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >,
+ BOOST_FUNCTION_MEMBER_INVOKER<
+ MemberPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >
+ >::type type;
+ };
+#endif
+
+ /* Given the tag returned by get_function_tag, retrieve the
+ actual invoker that will be used for the given function
+ object.
+
+ Each specialization contains an "apply" nested class template
+ that accepts the function object, return type, function
+ argument types, and allocator. The resulting "apply" class
+ contains two typedefs, "invoker_type" and "manager_type",
+ which correspond to the invoker and manager types. */
+ template<typename Tag>
+ struct BOOST_FUNCTION_GET_INVOKER { };
+
+ /* Retrieve the invoker for a function pointer. */
+ template<>
+ struct BOOST_FUNCTION_GET_INVOKER<function_ptr_tag>
+ {
+ template<typename FunctionPtr,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct apply
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
+ FunctionPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+
+ template<typename FunctionPtr, typename Allocator,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct apply_a
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_INVOKER<
+ FunctionPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager<FunctionPtr> manager_type;
+ };
+ };
+
+#if BOOST_FUNCTION_NUM_ARGS > 0
+ /* Retrieve the invoker for a member pointer. */
+ template<>
+ struct BOOST_FUNCTION_GET_INVOKER<member_ptr_tag>
+ {
+ template<typename MemberPtr,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct apply
+ {
+ typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
+ MemberPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+
+ template<typename MemberPtr, typename Allocator,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct apply_a
+ {
+ typedef typename BOOST_FUNCTION_GET_MEMBER_INVOKER<
+ MemberPtr,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager<MemberPtr> manager_type;
+ };
+ };
+#endif
+
+ /* Retrieve the invoker for a function object. */
+ template<>
+ struct BOOST_FUNCTION_GET_INVOKER<function_obj_tag>
+ {
+ template<typename FunctionObj,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct apply
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
+ FunctionObj,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager<FunctionObj> manager_type;
+ };
+
+ template<typename FunctionObj, typename Allocator,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct apply_a
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER<
+ FunctionObj,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef functor_manager_a<FunctionObj, Allocator> manager_type;
+ };
+ };
+
+ /* Retrieve the invoker for a reference to a function object. */
+ template<>
+ struct BOOST_FUNCTION_GET_INVOKER<function_obj_ref_tag>
+ {
+ template<typename RefWrapper,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct apply
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
+ typename RefWrapper::type,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+
+ template<typename RefWrapper, typename Allocator,
+ typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct apply_a
+ {
+ typedef typename BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER<
+ typename RefWrapper::type,
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >::type
+ invoker_type;
+
+ typedef reference_manager<typename RefWrapper::type> manager_type;
+ };
+ };
+
+
+ /**
+ * vtable for a specific boost::function instance. This
+ * structure must be an aggregate so that we can use static
+ * initialization in boost::function's assign_to and assign_to_a
+ * members. It therefore cannot have any constructors,
+ * destructors, base classes, etc.
+ */
+ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ struct BOOST_FUNCTION_VTABLE
+ {
+#ifndef BOOST_NO_VOID_RETURNS
+ typedef R result_type;
+#else
+ typedef typename function_return_type<R>::type result_type;
+#endif // BOOST_NO_VOID_RETURNS
+
+ typedef result_type (*invoker_type)(function_buffer&
+ BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS);
+
+ template<typename F>
+ bool assign_to(F f, function_buffer& functor) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to(f, functor, tag());
+ }
+ template<typename F,typename Allocator>
+ bool assign_to_a(F f, function_buffer& functor, Allocator a) const
+ {
+ typedef typename get_function_tag<F>::type tag;
+ return assign_to_a(f, functor, a, tag());
+ }
+
+ void clear(function_buffer& functor) const
+ {
+ if (base.manager)
+ base.manager(functor, functor, destroy_functor_tag);
+ }
+
+ private:
+ // Function pointers
+ template<typename FunctionPtr>
+ bool
+ assign_to(FunctionPtr f, function_buffer& functor, function_ptr_tag) const
+ {
+ this->clear(functor);
+ if (f) {
+ // should be a reinterpret cast, but some compilers insist
+ // on giving cv-qualifiers to free functions
+ functor.members.func_ptr = reinterpret_cast<void (*)()>(f);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionPtr,typename Allocator>
+ bool
+ assign_to_a(FunctionPtr f, function_buffer& functor, Allocator, function_ptr_tag) const
+ {
+ return assign_to(f,functor,function_ptr_tag());
+ }
+
+ // Member pointers
+#if BOOST_FUNCTION_NUM_ARGS > 0
+ template<typename MemberPtr>
+ bool assign_to(MemberPtr f, function_buffer& functor, member_ptr_tag) const
+ {
+ // DPG TBD: Add explicit support for member function
+ // objects, so we invoke through mem_fn() but we retain the
+ // right target_type() values.
+ if (f) {
+ this->assign_to(boost::mem_fn(f), functor);
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename MemberPtr,typename Allocator>
+ bool assign_to_a(MemberPtr f, function_buffer& functor, Allocator a, member_ptr_tag) const
+ {
+ // DPG TBD: Add explicit support for member function
+ // objects, so we invoke through mem_fn() but we retain the
+ // right target_type() values.
+ if (f) {
+ this->assign_to_a(boost::mem_fn(f), functor, a);
+ return true;
+ } else {
+ return false;
+ }
+ }
+#endif // BOOST_FUNCTION_NUM_ARGS > 0
+
+ // Function objects
+ // Assign to a function object using the small object optimization
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, true_type) const
+ {
+ new (reinterpret_cast<void*>(functor.data)) FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator, true_type) const
+ {
+ assign_functor(f,functor,true_type());
+ }
+
+ // Assign to a function object allocated on the heap.
+ template<typename FunctionObj>
+ void
+ assign_functor(FunctionObj f, function_buffer& functor, false_type) const
+ {
+ functor.members.obj_ptr = new FunctionObj(f);
+ }
+ template<typename FunctionObj,typename Allocator>
+ void
+ assign_functor_a(FunctionObj f, function_buffer& functor, Allocator a, false_type) const
+ {
+ typedef functor_wrapper<FunctionObj,Allocator> functor_wrapper_type;
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
+ typedef typename Allocator::template rebind<functor_wrapper_type>::other
+ wrapper_allocator_type;
+ typedef typename wrapper_allocator_type::pointer wrapper_allocator_pointer_type;
+#else
+ using wrapper_allocator_type = typename std::allocator_traits<Allocator>::template rebind_alloc<functor_wrapper_type>;
+ using wrapper_allocator_pointer_type = typename std::allocator_traits<wrapper_allocator_type>::pointer;
+#endif
+ wrapper_allocator_type wrapper_allocator(a);
+ wrapper_allocator_pointer_type copy = wrapper_allocator.allocate(1);
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
+ wrapper_allocator.construct(copy, functor_wrapper_type(f,a));
+#else
+ std::allocator_traits<wrapper_allocator_type>::construct(wrapper_allocator, copy, functor_wrapper_type(f,a));
+#endif
+ functor_wrapper_type* new_f = static_cast<functor_wrapper_type*>(copy);
+ functor.members.obj_ptr = new_f;
+ }
+
+ template<typename FunctionObj>
+ bool
+ assign_to(FunctionObj f, function_buffer& functor, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor(f, functor,
+ integral_constant<bool, (function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(FunctionObj f, function_buffer& functor, Allocator a, function_obj_tag) const
+ {
+ if (!boost::detail::function::has_empty_target(boost::addressof(f))) {
+ assign_functor_a(f, functor, a,
+ integral_constant<bool, (function_allows_small_object_optimization<FunctionObj>::value)>());
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ // Reference to a function object
+ template<typename FunctionObj>
+ bool
+ assign_to(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, function_obj_ref_tag) const
+ {
+ functor.members.obj_ref.obj_ptr = (void *)(f.get_pointer());
+ functor.members.obj_ref.is_const_qualified = is_const<FunctionObj>::value;
+ functor.members.obj_ref.is_volatile_qualified = is_volatile<FunctionObj>::value;
+ return true;
+ }
+ template<typename FunctionObj,typename Allocator>
+ bool
+ assign_to_a(const reference_wrapper<FunctionObj>& f,
+ function_buffer& functor, Allocator, function_obj_ref_tag) const
+ {
+ return assign_to(f,functor,function_obj_ref_tag());
+ }
+
+ public:
+ vtable_base base;
+ invoker_type invoker;
+ };
+ } // end namespace function
+ } // end namespace detail
+
+ template<
+ typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS
+ >
+ class BOOST_FUNCTION_FUNCTION : public function_base
+ {
+ public:
+#ifndef BOOST_NO_VOID_RETURNS
+ typedef R result_type;
+#else
+ typedef typename boost::detail::function::function_return_type<R>::type
+ result_type;
+#endif // BOOST_NO_VOID_RETURNS
+
+ private:
+ typedef boost::detail::function::BOOST_FUNCTION_VTABLE<
+ R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>
+ vtable_type;
+
+ vtable_type* get_vtable() const {
+ return reinterpret_cast<vtable_type*>(
+ reinterpret_cast<std::size_t>(vtable) & ~static_cast<std::size_t>(0x01));
+ }
+
+ struct clear_type {};
+
+ public:
+ BOOST_STATIC_CONSTANT(int, args = BOOST_FUNCTION_NUM_ARGS);
+
+ // add signature for boost::lambda
+ template<typename Args>
+ struct sig
+ {
+ typedef result_type type;
+ };
+
+#if BOOST_FUNCTION_NUM_ARGS == 1
+ typedef T0 argument_type;
+#elif BOOST_FUNCTION_NUM_ARGS == 2
+ typedef T0 first_argument_type;
+ typedef T1 second_argument_type;
+#endif
+
+ BOOST_STATIC_CONSTANT(int, arity = BOOST_FUNCTION_NUM_ARGS);
+ BOOST_FUNCTION_ARG_TYPES
+
+ typedef BOOST_FUNCTION_FUNCTION self_type;
+
+ BOOST_DEFAULTED_FUNCTION(BOOST_FUNCTION_FUNCTION(), : function_base() {})
+
+ // MSVC chokes if the following two constructors are collapsed into
+ // one with a default parameter.
+ template<typename Functor>
+ BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f
+#ifndef BOOST_NO_SFINAE
+ ,typename boost::enable_if_<
+ !(is_integral<Functor>::value),
+ int>::type = 0
+#endif // BOOST_NO_SFINAE
+ ) :
+ function_base()
+ {
+ this->assign_to(f);
+ }
+ template<typename Functor,typename Allocator>
+ BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a
+#ifndef BOOST_NO_SFINAE
+ ,typename boost::enable_if_<
+ !(is_integral<Functor>::value),
+ int>::type = 0
+#endif // BOOST_NO_SFINAE
+ ) :
+ function_base()
+ {
+ this->assign_to_a(f,a);
+ }
+
+#ifndef BOOST_NO_SFINAE
+ BOOST_FUNCTION_FUNCTION(clear_type*) : function_base() { }
+#else
+ BOOST_FUNCTION_FUNCTION(int zero) : function_base()
+ {
+ BOOST_ASSERT(zero == 0);
+ }
+#endif
+
+ BOOST_FUNCTION_FUNCTION(const BOOST_FUNCTION_FUNCTION& f) : function_base()
+ {
+ this->assign_to_own(f);
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_FUNCTION_FUNCTION(BOOST_FUNCTION_FUNCTION&& f) : function_base()
+ {
+ this->move_assign(f);
+ }
+#endif
+
+ ~BOOST_FUNCTION_FUNCTION() { clear(); }
+
+ result_type operator()(BOOST_FUNCTION_PARMS) const
+ {
+ if (this->empty())
+ boost::throw_exception(bad_function_call());
+
+ return get_vtable()->invoker
+ (this->functor BOOST_FUNCTION_COMMA BOOST_FUNCTION_ARGS);
+ }
+
+ // The distinction between when to use BOOST_FUNCTION_FUNCTION and
+ // when to use self_type is obnoxious. MSVC cannot handle self_type as
+ // the return type of these assignment operators, but Borland C++ cannot
+ // handle BOOST_FUNCTION_FUNCTION as the type of the temporary to
+ // construct.
+ template<typename Functor>
+#ifndef BOOST_NO_SFINAE
+ typename boost::enable_if_<
+ !(is_integral<Functor>::value),
+ BOOST_FUNCTION_FUNCTION&>::type
+#else
+ BOOST_FUNCTION_FUNCTION&
+#endif
+ operator=(Functor BOOST_FUNCTION_TARGET_FIX(const &) f)
+ {
+ this->clear();
+ BOOST_TRY {
+ this->assign_to(f);
+ } BOOST_CATCH (...) {
+ vtable = 0;
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return *this;
+ }
+ template<typename Functor,typename Allocator>
+ void assign(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a)
+ {
+ this->clear();
+ BOOST_TRY{
+ this->assign_to_a(f,a);
+ } BOOST_CATCH (...) {
+ vtable = 0;
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+
+#ifndef BOOST_NO_SFINAE
+ BOOST_FUNCTION_FUNCTION& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+#else
+ BOOST_FUNCTION_FUNCTION& operator=(int zero)
+ {
+ BOOST_ASSERT(zero == 0);
+ this->clear();
+ return *this;
+ }
+#endif
+
+ // Assignment from another BOOST_FUNCTION_FUNCTION
+ BOOST_FUNCTION_FUNCTION& operator=(const BOOST_FUNCTION_FUNCTION& f)
+ {
+ if (&f == this)
+ return *this;
+
+ this->clear();
+ BOOST_TRY {
+ this->assign_to_own(f);
+ } BOOST_CATCH (...) {
+ vtable = 0;
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return *this;
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ // Move assignment from another BOOST_FUNCTION_FUNCTION
+ BOOST_FUNCTION_FUNCTION& operator=(BOOST_FUNCTION_FUNCTION&& f)
+ {
+ if (&f == this)
+ return *this;
+
+ this->clear();
+ BOOST_TRY {
+ this->move_assign(f);
+ } BOOST_CATCH (...) {
+ vtable = 0;
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return *this;
+ }
+#endif
+
+ void swap(BOOST_FUNCTION_FUNCTION& other)
+ {
+ if (&other == this)
+ return;
+
+ BOOST_FUNCTION_FUNCTION tmp;
+ tmp.move_assign(*this);
+ this->move_assign(other);
+ other.move_assign(tmp);
+ }
+
+ // Clear out a target, if there is one
+ void clear()
+ {
+ if (vtable) {
+ if (!this->has_trivial_copy_and_destroy())
+ get_vtable()->clear(this->functor);
+ vtable = 0;
+ }
+ }
+
+#if (defined __SUNPRO_CC) && (__SUNPRO_CC <= 0x530) && !(defined BOOST_NO_COMPILER_CONFIG)
+ // Sun C++ 5.3 can't handle the safe_bool idiom, so don't use it
+ operator bool () const { return !this->empty(); }
+#else
+ private:
+ struct dummy {
+ void nonnull() {}
+ };
+
+ typedef void (dummy::*safe_bool)();
+
+ public:
+ operator safe_bool () const
+ { return (this->empty())? 0 : &dummy::nonnull; }
+
+ bool operator!() const
+ { return this->empty(); }
+#endif
+
+ private:
+ void assign_to_own(const BOOST_FUNCTION_FUNCTION& f)
+ {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ // Don't operate on storage directly since union type doesn't relax
+ // strict aliasing rules, despite of having member char type.
+ std::memcpy(this->functor.data, f.functor.data, sizeof(boost::detail::function::function_buffer));
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::clone_functor_tag);
+ }
+ }
+
+ template<typename Functor>
+ void assign_to(Functor f)
+ {
+ using boost::detail::function::vtable_base;
+
+ typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
+ typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply<Functor, R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS>
+ handler_type;
+
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+
+ // Note: it is extremely important that this initialization use
+ // static initialization. Otherwise, we will have a race
+ // condition here in multi-threaded code. See
+ // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/.
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+
+ if (stored_vtable.assign_to(f, functor)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ // coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ boost::detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<boost::detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+
+ template<typename Functor,typename Allocator>
+ void assign_to_a(Functor f,Allocator a)
+ {
+ using boost::detail::function::vtable_base;
+
+ typedef typename boost::detail::function::get_function_tag<Functor>::type tag;
+ typedef boost::detail::function::BOOST_FUNCTION_GET_INVOKER<tag> get_invoker;
+ typedef typename get_invoker::
+ template apply_a<Functor, Allocator, R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS>
+ handler_type;
+
+ typedef typename handler_type::invoker_type invoker_type;
+ typedef typename handler_type::manager_type manager_type;
+
+ // Note: it is extremely important that this initialization use
+ // static initialization. Otherwise, we will have a race
+ // condition here in multi-threaded code. See
+ // http://thread.gmane.org/gmane.comp.lib.boost.devel/164902/.
+ static const vtable_type stored_vtable =
+ { { &manager_type::manage }, &invoker_type::invoke };
+
+ if (stored_vtable.assign_to_a(f, functor, a)) {
+ std::size_t value = reinterpret_cast<std::size_t>(&stored_vtable.base);
+ // coverity[pointless_expression]: suppress coverity warnings on apparant if(const).
+ if (boost::has_trivial_copy_constructor<Functor>::value &&
+ boost::has_trivial_destructor<Functor>::value &&
+ boost::detail::function::function_allows_small_object_optimization<Functor>::value)
+ value |= static_cast<std::size_t>(0x01);
+ vtable = reinterpret_cast<boost::detail::function::vtable_base *>(value);
+ } else
+ vtable = 0;
+ }
+
+ // Moves the value from the specified argument to *this. If the argument
+ // has its function object allocated on the heap, move_assign will pass
+ // its buffer to *this, and set the argument's buffer pointer to NULL.
+ void move_assign(BOOST_FUNCTION_FUNCTION& f)
+ {
+ if (&f == this)
+ return;
+
+ BOOST_TRY {
+ if (!f.empty()) {
+ this->vtable = f.vtable;
+ if (this->has_trivial_copy_and_destroy())
+ // Don't operate on storage directly since union type doesn't relax
+ // strict aliasing rules, despite of having member char type.
+ std::memcpy(this->functor.data, f.functor.data, sizeof(this->functor.data));
+ else
+ get_vtable()->base.manager(f.functor, this->functor,
+ boost::detail::function::move_functor_tag);
+ f.vtable = 0;
+ } else {
+ clear();
+ }
+ } BOOST_CATCH (...) {
+ vtable = 0;
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ }
+ };
+
+ template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ inline void swap(BOOST_FUNCTION_FUNCTION<
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >& f1,
+ BOOST_FUNCTION_FUNCTION<
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS
+ >& f2)
+ {
+ f1.swap(f2);
+ }
+
+// Poison comparisons between boost::function objects of the same type.
+template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ void operator==(const BOOST_FUNCTION_FUNCTION<
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS>&,
+ const BOOST_FUNCTION_FUNCTION<
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS>&);
+template<typename R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_PARMS>
+ void operator!=(const BOOST_FUNCTION_FUNCTION<
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS>&,
+ const BOOST_FUNCTION_FUNCTION<
+ R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_ARGS>& );
+
+#if !defined(BOOST_FUNCTION_NO_FUNCTION_TYPE_SYNTAX)
+
+#if BOOST_FUNCTION_NUM_ARGS == 0
+#define BOOST_FUNCTION_PARTIAL_SPEC R (void)
+#else
+#define BOOST_FUNCTION_PARTIAL_SPEC R (BOOST_FUNCTION_TEMPLATE_ARGS)
+#endif
+
+template<typename R BOOST_FUNCTION_COMMA
+ BOOST_FUNCTION_TEMPLATE_PARMS>
+class function<BOOST_FUNCTION_PARTIAL_SPEC>
+ : public BOOST_FUNCTION_FUNCTION<R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS>
+{
+ typedef BOOST_FUNCTION_FUNCTION<R BOOST_FUNCTION_COMMA BOOST_FUNCTION_TEMPLATE_ARGS> base_type;
+ typedef function self_type;
+
+ struct clear_type {};
+
+public:
+
+ BOOST_DEFAULTED_FUNCTION(function(), : base_type() {})
+
+ template<typename Functor>
+ function(Functor f
+#ifndef BOOST_NO_SFINAE
+ ,typename boost::enable_if_<
+ !(is_integral<Functor>::value),
+ int>::type = 0
+#endif
+ ) :
+ base_type(f)
+ {
+ }
+ template<typename Functor,typename Allocator>
+ function(Functor f, Allocator a
+#ifndef BOOST_NO_SFINAE
+ ,typename boost::enable_if_<
+ !(is_integral<Functor>::value),
+ int>::type = 0
+#endif
+ ) :
+ base_type(f,a)
+ {
+ }
+
+#ifndef BOOST_NO_SFINAE
+ function(clear_type*) : base_type() {}
+#endif
+
+ function(const self_type& f) : base_type(static_cast<const base_type&>(f)){}
+
+ function(const base_type& f) : base_type(static_cast<const base_type&>(f)){}
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ // Move constructors
+ function(self_type&& f): base_type(static_cast<base_type&&>(f)){}
+ function(base_type&& f): base_type(static_cast<base_type&&>(f)){}
+#endif
+
+ self_type& operator=(const self_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ self_type& operator=(self_type&& f)
+ {
+ self_type(static_cast<self_type&&>(f)).swap(*this);
+ return *this;
+ }
+#endif
+
+ template<typename Functor>
+#ifndef BOOST_NO_SFINAE
+ typename boost::enable_if_<
+ !(is_integral<Functor>::value),
+ self_type&>::type
+#else
+ self_type&
+#endif
+ operator=(Functor f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+
+#ifndef BOOST_NO_SFINAE
+ self_type& operator=(clear_type*)
+ {
+ this->clear();
+ return *this;
+ }
+#endif
+
+ self_type& operator=(const base_type& f)
+ {
+ self_type(f).swap(*this);
+ return *this;
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ self_type& operator=(base_type&& f)
+ {
+ self_type(static_cast<base_type&&>(f)).swap(*this);
+ return *this;
+ }
+#endif
+};
+
+#undef BOOST_FUNCTION_PARTIAL_SPEC
+#endif // have partial specialization
+
+} // end namespace boost
+
+// Cleanup after ourselves...
+#undef BOOST_FUNCTION_VTABLE
+#undef BOOST_FUNCTION_COMMA
+#undef BOOST_FUNCTION_FUNCTION
+#undef BOOST_FUNCTION_FUNCTION_INVOKER
+#undef BOOST_FUNCTION_VOID_FUNCTION_INVOKER
+#undef BOOST_FUNCTION_FUNCTION_OBJ_INVOKER
+#undef BOOST_FUNCTION_VOID_FUNCTION_OBJ_INVOKER
+#undef BOOST_FUNCTION_FUNCTION_REF_INVOKER
+#undef BOOST_FUNCTION_VOID_FUNCTION_REF_INVOKER
+#undef BOOST_FUNCTION_MEMBER_INVOKER
+#undef BOOST_FUNCTION_VOID_MEMBER_INVOKER
+#undef BOOST_FUNCTION_GET_FUNCTION_INVOKER
+#undef BOOST_FUNCTION_GET_FUNCTION_OBJ_INVOKER
+#undef BOOST_FUNCTION_GET_FUNCTION_REF_INVOKER
+#undef BOOST_FUNCTION_GET_MEM_FUNCTION_INVOKER
+#undef BOOST_FUNCTION_GET_INVOKER
+#undef BOOST_FUNCTION_TEMPLATE_PARMS
+#undef BOOST_FUNCTION_TEMPLATE_ARGS
+#undef BOOST_FUNCTION_PARMS
+#undef BOOST_FUNCTION_PARM
+#ifdef BOOST_FUNCTION_ARG
+# undef BOOST_FUNCTION_ARG
+#endif
+#undef BOOST_FUNCTION_ARGS
+#undef BOOST_FUNCTION_ARG_TYPE
+#undef BOOST_FUNCTION_ARG_TYPES
+#undef BOOST_FUNCTION_VOID_RETURN_TYPE
+#undef BOOST_FUNCTION_RETURN
+
+#if defined(BOOST_MSVC)
+# pragma warning( pop )
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/function/function_typeof.hpp b/src/third_party/boost-1.69.0/boost/function/function_typeof.hpp
index 246dc15d09a..246dc15d09a 100644
--- a/src/third_party/boost-1.68.0/boost/function/function_typeof.hpp
+++ b/src/third_party/boost-1.69.0/boost/function/function_typeof.hpp
diff --git a/src/third_party/boost-1.68.0/boost/function/gen_function_N.pl b/src/third_party/boost-1.69.0/boost/function/gen_function_N.pl
index d8f1249b07a..d8f1249b07a 100644
--- a/src/third_party/boost-1.68.0/boost/function/gen_function_N.pl
+++ b/src/third_party/boost-1.69.0/boost/function/gen_function_N.pl
diff --git a/src/third_party/boost-1.68.0/boost/function_equal.hpp b/src/third_party/boost-1.69.0/boost/function_equal.hpp
index 2d76c75bc90..2d76c75bc90 100644
--- a/src/third_party/boost-1.68.0/boost/function_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/function_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/functional/hash.hpp b/src/third_party/boost-1.69.0/boost/functional/hash.hpp
index 327a3ecae76..327a3ecae76 100644
--- a/src/third_party/boost-1.68.0/boost/functional/hash.hpp
+++ b/src/third_party/boost-1.69.0/boost/functional/hash.hpp
diff --git a/src/third_party/boost-1.68.0/boost/functional/hash/hash.hpp b/src/third_party/boost-1.69.0/boost/functional/hash/hash.hpp
index 327a3ecae76..327a3ecae76 100644
--- a/src/third_party/boost-1.68.0/boost/functional/hash/hash.hpp
+++ b/src/third_party/boost-1.69.0/boost/functional/hash/hash.hpp
diff --git a/src/third_party/boost-1.68.0/boost/functional/hash_fwd.hpp b/src/third_party/boost-1.69.0/boost/functional/hash_fwd.hpp
index 62bc23c73b9..62bc23c73b9 100644
--- a/src/third_party/boost-1.68.0/boost/functional/hash_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/functional/hash_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp
index 3f087bda480..3f087bda480 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/detail/end_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/end_impl.hpp
index 7ef13fb4f88..7ef13fb4f88 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/detail/end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/mpl_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/mpl_iterator.hpp
index 87de32ada12..87de32ada12 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/mpl/mpl_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/mpl/mpl_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/std_pair.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/std_pair.hpp
index 79de3d44f37..79de3d44f37 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/std_pair.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/std_pair.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/adapt_struct.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/adapt_struct.hpp
new file mode 100644
index 00000000000..928bc995706
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/adapt_struct.hpp
@@ -0,0 +1,121 @@
+/*=============================================================================
+ Copyright (c) 2001-2007 Joel de Guzman
+ Copyright (c) 2009-2011 Christopher Schmidt
+ Copyright (c) 2013-2014 Damien Buhl
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
+
+#include <boost/fusion/support/config.hpp>
+#include <boost/preprocessor/config/config.hpp>
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/comparison/less.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/variadic/to_seq.hpp>
+
+#include <boost/fusion/adapted/struct/detail/extension.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp>
+#include <boost/fusion/adapted/struct/detail/at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/size_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/begin_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/end_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
+#include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
+
+#define BOOST_FUSION_ADAPT_STRUCT_C( \
+ TEMPLATE_PARAMS_SEQ, NAME_SEQ, IS_VIEW, I, ATTRIBUTE) \
+ BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
+ TEMPLATE_PARAMS_SEQ, \
+ NAME_SEQ, \
+ IS_VIEW, \
+ I, \
+ BOOST_PP_IIF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \
+ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR(ATTRIBUTE), \
+ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), \
+ BOOST_PP_LESS( \
+ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), 2))
+
+
+
+#if BOOST_PP_VARIADICS
+
+# define BOOST_FUSION_ADAPT_TPL_STRUCT(TEMPLATE_PARAMS_SEQ,NAME_SEQ, ...) \
+ BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ (1)TEMPLATE_PARAMS_SEQ, \
+ (1)NAME_SEQ, \
+ struct_tag, \
+ 0, \
+ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
+ BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)), \
+ BOOST_FUSION_ADAPT_STRUCT_C)
+
+# define BOOST_FUSION_ADAPT_STRUCT(...) \
+ BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ (0), \
+ (0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
+ struct_tag, \
+ 0, \
+ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
+ BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
+ BOOST_FUSION_ADAPT_STRUCT_C)
+
+# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(...) \
+ BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ (0), \
+ (0)(BOOST_PP_SEQ_HEAD(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
+ struct_tag, \
+ 1, \
+ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \
+ BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \
+ BOOST_FUSION_ADAPT_STRUCT_C)
+
+#else // BOOST_PP_VARIADICS
+
+# define BOOST_FUSION_ADAPT_TPL_STRUCT( \
+ TEMPLATE_PARAMS_SEQ,NAME_SEQ, ATTRIBUTES) \
+ BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ (1)TEMPLATE_PARAMS_SEQ, \
+ (1)NAME_SEQ, \
+ struct_tag, \
+ 0, \
+ BOOST_PP_CAT( \
+ BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
+ BOOST_FUSION_ADAPT_STRUCT_C)
+
+# define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES) \
+ BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ (0), \
+ (0)(NAME), \
+ struct_tag, \
+ 0, \
+ BOOST_PP_CAT( \
+ BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES, \
+ _END), \
+ BOOST_FUSION_ADAPT_STRUCT_C)
+
+# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \
+ BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ (0), \
+ (0)(NAME), \
+ struct_tag, \
+ 1, \
+ BOOST_PP_CAT( \
+ BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES, \
+ _END), \
+ BOOST_FUSION_ADAPT_STRUCT_C)
+
+
+#endif // BOOST_PP_VARIADICS
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp
index 71a542c7a43..71a542c7a43 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_auto.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base.hpp
new file mode 100644
index 00000000000..c66118f4544
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base.hpp
@@ -0,0 +1,311 @@
+/*=============================================================================
+ Copyright (c) 2001-2009 Joel de Guzman
+ Copyright (c) 2005-2006 Dan Marsden
+ Copyright (c) 2009-2011 Christopher Schmidt
+ Copyright (c) 2013-2014 Damien Buhl
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+
+#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP
+#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_HPP
+
+#include <boost/fusion/support/config.hpp>
+#include <boost/config.hpp>
+#include <boost/fusion/support/tag_of_fwd.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_auto.hpp>
+#include <boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp>
+
+#include <boost/preprocessor/empty.hpp>
+#include <boost/preprocessor/stringize.hpp>
+#include <boost/preprocessor/control/if.hpp>
+#include <boost/preprocessor/seq/size.hpp>
+#include <boost/preprocessor/seq/for_each.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+#include <boost/preprocessor/seq/seq.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/tuple/elem.hpp>
+#include <boost/preprocessor/arithmetic/dec.hpp>
+#include <boost/preprocessor/comparison/less.hpp>
+#include <boost/preprocessor/logical/not.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/tag.hpp>
+#include <boost/mpl/eval_if.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_reference.hpp>
+
+#include <boost/typeof/typeof.hpp>
+
+
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS(SEQ) \
+ BOOST_PP_SEQ_HEAD(SEQ)<BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TAIL(SEQ))> \
+ BOOST_PP_EMPTY()
+
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(SEQ) \
+ BOOST_PP_IF( \
+ BOOST_PP_SEQ_HEAD(SEQ), \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS, \
+ BOOST_PP_SEQ_HEAD)(BOOST_PP_SEQ_TAIL(SEQ))
+
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL_C(R, _, ELEM) \
+ (typename ELEM)
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL(SEQ) \
+ BOOST_PP_SEQ_ENUM( \
+ BOOST_PP_SEQ_FOR_EACH( \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL_C, \
+ _, \
+ BOOST_PP_SEQ_TAIL(SEQ)))
+#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(SEQ) \
+ BOOST_PP_IF( \
+ BOOST_PP_SEQ_HEAD(SEQ), \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL, \
+ BOOST_PP_TUPLE_EAT(1))(SEQ)
+
+#ifdef BOOST_MSVC
+# define BOOST_FUSION_ATTRIBUTE_TYPEOF( \
+ NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
+ \
+ BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
+ TEMPLATE_PARAMS_SEQ) \
+ \
+ struct deduced_attr_type { \
+ static const BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \
+ typedef \
+ BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \
+ BOOST_TYPEOF( PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \
+ 0, ATTRIBUTE)) \
+ type; \
+ }; \
+ \
+ typedef \
+ BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \
+ deduced_attr_type::type attribute_type;
+
+#else
+# define BOOST_FUSION_ATTRIBUTE_TYPEOF( \
+ NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
+ \
+ struct deduced_attr_type { \
+ static const BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \
+ typedef BOOST_TYPEOF( \
+ PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, 0, ATTRIBUTE)) \
+ type; \
+ }; \
+ \
+ typedef \
+ BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \
+ deduced_attr_type::type attribute_type;
+
+#endif
+
+#define BOOST_FUSION_ATTRIBUTE_GIVENTYPE( \
+ NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
+ typedef \
+ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, 0, ATTRIBUTE) attribute_type;
+
+
+#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
+# define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
+ MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
+ \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct tag_of< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) MODIFIER \
+ , void \
+ > \
+ { \
+ typedef TAG type; \
+ };
+#else
+# define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
+ MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
+ \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct tag_of<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) MODIFIER> \
+ { \
+ typedef TAG type; \
+ };
+#endif
+
+#define BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL(R,DATA,I,ATTRIBUTE) \
+ BOOST_PP_TUPLE_ELEM(4,0,DATA)( \
+ BOOST_PP_TUPLE_ELEM(4,1,DATA), \
+ BOOST_PP_TUPLE_ELEM(4,2,DATA), \
+ BOOST_PP_TUPLE_ELEM(4,3,DATA), \
+ I, \
+ ATTRIBUTE)
+
+#ifdef BOOST_MSVC
+# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM(R,_,ELEM) \
+ typedef ELEM ELEM;
+# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL(SEQ) \
+ BOOST_PP_SEQ_FOR_EACH( \
+ BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM, \
+ _, \
+ BOOST_PP_SEQ_TAIL(SEQ))
+# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ) \
+ BOOST_PP_IF( \
+ BOOST_PP_SEQ_HEAD(SEQ), \
+ BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL, \
+ BOOST_PP_TUPLE_EAT(1))(SEQ)
+#else
+# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ)
+#endif
+
+#define BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
+ TEMPLATE_PARAMS_SEQ,NAME_SEQ,IS_VIEW, \
+ I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPLE_SIZE, \
+ DEDUCE_TYPE) \
+ \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct access::struct_member< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
+ , I \
+ > \
+ { \
+ BOOST_PP_IF(DEDUCE_TYPE, \
+ BOOST_FUSION_ATTRIBUTE_TYPEOF, BOOST_FUSION_ATTRIBUTE_GIVENTYPE)( \
+ NAME_SEQ, \
+ ATTRIBUTE, \
+ ATTRIBUTE_TUPLE_SIZE, \
+ PREFIX, \
+ TEMPLATE_PARAMS_SEQ) \
+ \
+ BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
+ TEMPLATE_PARAMS_SEQ) \
+ \
+ typedef attribute_type type; \
+ \
+ template<typename Seq> \
+ struct apply \
+ { \
+ typedef typename \
+ add_reference< \
+ typename mpl::eval_if< \
+ is_const<Seq> \
+ , add_const<attribute_type> \
+ , mpl::identity<attribute_type> \
+ >::type \
+ >::type \
+ type; \
+ \
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ static type \
+ call(Seq& seq) \
+ { \
+ return seq.PREFIX() \
+ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \
+ BOOST_PP_NOT(DEDUCE_TYPE), ATTRIBUTE); \
+ } \
+ }; \
+ }; \
+ \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct struct_member_name< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
+ , I \
+ > \
+ { \
+ typedef char const* type; \
+ \
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
+ static type \
+ call() \
+ { \
+ return BOOST_PP_STRINGIZE( \
+ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \
+ BOOST_PP_NOT(DEDUCE_TYPE), ATTRIBUTE)); \
+ } \
+ };
+
+#define BOOST_FUSION_ADAPT_STRUCT_BASE( \
+ TEMPLATE_PARAMS_SEQ, \
+ NAME_SEQ, \
+ TAG, \
+ IS_VIEW, \
+ ATTRIBUTES_SEQ, \
+ ATTRIBUTES_CALLBACK) \
+ \
+namespace boost \
+{ \
+ namespace fusion \
+ { \
+ namespace traits \
+ { \
+ BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
+ BOOST_PP_EMPTY(), TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
+ BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
+ const, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
+ } \
+ \
+ namespace extension \
+ { \
+ BOOST_PP_IF( \
+ BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
+ BOOST_PP_SEQ_FOR_EACH_I_R, \
+ BOOST_PP_TUPLE_EAT(4))( \
+ 1, \
+ BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL, \
+ (ATTRIBUTES_CALLBACK,TEMPLATE_PARAMS_SEQ,NAME_SEQ, IS_VIEW),\
+ BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ)) \
+ \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
+ TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct struct_size<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)> \
+ : mpl::int_<BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ))> \
+ {}; \
+ \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
+ TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct struct_is_view< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
+ > \
+ : mpl::BOOST_PP_IIF(IS_VIEW,true_,false_) \
+ {}; \
+ } \
+ } \
+ \
+ namespace mpl \
+ { \
+ template<typename> \
+ struct sequence_tag; \
+ \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
+ TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct sequence_tag<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)> \
+ { \
+ typedef fusion::fusion_sequence_tag type; \
+ }; \
+ \
+ template< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
+ TEMPLATE_PARAMS_SEQ) \
+ > \
+ struct sequence_tag< \
+ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const \
+ > \
+ { \
+ typedef fusion::fusion_sequence_tag type; \
+ }; \
+ } \
+}
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
index 3755bc3679b..3755bc3679b 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp
index 8430262f8cb..8430262f8cb 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/at_impl.hpp
index 52ed847d6ea..52ed847d6ea 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/begin_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/begin_impl.hpp
index f67df3a7241..f67df3a7241 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp
index b98e8242028..b98e8242028 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/category_of_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/deref_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/deref_impl.hpp
index c53b51a3208..c53b51a3208 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/end_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/end_impl.hpp
index 855be7a4ee1..855be7a4ee1 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/extension.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/extension.hpp
index e63a0a45353..e63a0a45353 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/extension.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/extension.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp
index afcbe5ba444..afcbe5ba444 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_sequence_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp
index 71d284077ca..71d284077ca 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/is_view_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp
index 00371ca5b8a..00371ca5b8a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/size_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/size_impl.hpp
index baf411bd000..baf411bd000 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/size_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/size_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp
index f820475324d..f820475324d 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp
index 63dcbe52ff8..63dcbe52ff8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/adapted/struct/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/algorithm/transformation/push_back.hpp b/src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_back.hpp
index 51c2569d23b..51c2569d23b 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/algorithm/transformation/push_back.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_back.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/algorithm/transformation/push_front.hpp b/src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_front.hpp
index a1b7b390c39..a1b7b390c39 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/algorithm/transformation/push_front.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/algorithm/transformation/push_front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/generation/ignore.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/generation/ignore.hpp
index 781966322fc..781966322fc 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/generation/ignore.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/generation/ignore.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/cons.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/cons.hpp
index dd7f887389f..dd7f887389f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/cons.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/cons.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/cons_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/cons_fwd.hpp
index 547c42ca9b4..547c42ca9b4 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/cons_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/cons_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/cons_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/cons_iterator.hpp
index 58b7fd9e360..58b7fd9e360 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/cons_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/cons_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/at_impl.hpp
index ab36665c11a..ab36665c11a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/begin_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/begin_impl.hpp
index 088b382d1cf..088b382d1cf 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/limits.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/limits.hpp
index cc64ad7224e..cc64ad7224e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/limits.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/limits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp
index cedc7003434..cedc7003434 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/list_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp
index f513a991942..f513a991942 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list10_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp
index 2eedc8b293e..2eedc8b293e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list20_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp
index 32bfc606f79..32bfc606f79 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list30_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp
index 5d0da6df4bc..5d0da6df4bc 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list40_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp
index 2b3ae66cb6e..2b3ae66cb6e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list50_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp
index 8a4037da487..8a4037da487 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/cpp03/preprocessed/list_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/deref_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/deref_impl.hpp
index 3358a2a2f9f..3358a2a2f9f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/empty_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/empty_impl.hpp
index e25eab0bcc0..e25eab0bcc0 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/empty_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/empty_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/end_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/end_impl.hpp
index 6ed05a5f315..6ed05a5f315 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/equal_to_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/equal_to_impl.hpp
index a0fc297fc6f..a0fc297fc6f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/equal_to_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/equal_to_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/next_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/next_impl.hpp
index f766458be07..f766458be07 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/next_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/next_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/reverse_cons.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/reverse_cons.hpp
index 14905180fb6..14905180fb6 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/reverse_cons.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/reverse_cons.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/value_at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_at_impl.hpp
index 8b288a12bdc..8b288a12bdc 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/value_of_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_of_impl.hpp
index 9e7aa2085c1..9e7aa2085c1 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/list_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/list_fwd.hpp
index c5f26192678..c5f26192678 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/list_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/list_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/list/nil.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/list/nil.hpp
index 1b2c234986f..1b2c234986f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/list/nil.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/list/nil.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/advance_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/advance_impl.hpp
index 3bf26a59141..3bf26a59141 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/advance_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/advance_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/at_impl.hpp
index a2900d79430..a2900d79430 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/begin_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/begin_impl.hpp
index ef24cd74ee2..ef24cd74ee2 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/config.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/config.hpp
index 718b2d7954d..718b2d7954d 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/limits.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/limits.hpp
index 74a05102d21..74a05102d21 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/limits.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/limits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp
index 35b8e64329f..35b8e64329f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp
index d5e8aad116d..d5e8aad116d 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp
index 33f817ffaf9..33f817ffaf9 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector10_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp
index 91a9e59c468..91a9e59c468 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp
index b1672857a84..b1672857a84 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector20_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp
index c8234520383..c8234520383 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp
index 39f96aa836f..39f96aa836f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector30_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp
index ec16fcd94a4..ec16fcd94a4 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp
index e1d6e0911a2..e1d6e0911a2 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector40_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp
index 2d787edfb62..2d787edfb62 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp
index 6829e9b50f8..6829e9b50f8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector50_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp
index fb8f0e2f5b2..fb8f0e2f5b2 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp
index d631b53208b..d631b53208b 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp
index 9628f483ed8..9628f483ed8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp
index 38edabf45e9..38edabf45e9 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp
index a784b757368..a784b757368 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp
index fc9a260e20e..fc9a260e20e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_chooser50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp
index 42c3f5bc6cc..42c3f5bc6cc 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vector_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp
index 12b7a570ca7..12b7a570ca7 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp
index 97f64fa3595..97f64fa3595 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp
index 9c64ef05e9c..9c64ef05e9c 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp
index 8d4ea992d15..8d4ea992d15 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp
index 9df40b53a82..9df40b53a82 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp
index 03f289e9c9a..03f289e9c9a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp
index 5da47eebc63..5da47eebc63 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp
index 55c1097a757..55c1097a757 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp
index 47e878bccf4..47e878bccf4 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp
index 621f1606bf3..621f1606bf3 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp
index 44feb6002ca..44feb6002ca 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector.hpp
index f5c3024ea0e..f5c3024ea0e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp
index 58a31ddec34..58a31ddec34 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp
index d221faece21..d221faece21 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector10_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp
index 89f644c5a4e..89f644c5a4e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp
index e69b59f4a6a..e69b59f4a6a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector20_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp
index ad838c9ac69..ad838c9ac69 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp
index e799b096573..e799b096573 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector30_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp
index 10770907ebb..10770907ebb 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp
index 790dd76135b..790dd76135b 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector40_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp
index 6c0b48bbc4a..6c0b48bbc4a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp
index 4ec5e2812c2..4ec5e2812c2 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector50_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp
index 3422e4b9991..3422e4b9991 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_forward_ctor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp
index f894b1a6998..f894b1a6998 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp
index 932ce36c7d8..932ce36c7d8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp
index 002889ceb54..002889ceb54 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/deref_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/deref_impl.hpp
index c85bb82b3b1..c85bb82b3b1 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/distance_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/distance_impl.hpp
index 4c2a1226d66..4c2a1226d66 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/distance_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/distance_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/end_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/end_impl.hpp
index a77ef644e6a..a77ef644e6a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/equal_to_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/equal_to_impl.hpp
index 18b3e4a31ed..18b3e4a31ed 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/equal_to_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/equal_to_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/next_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/next_impl.hpp
index 28408205d8d..28408205d8d 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/next_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/next_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/prior_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/prior_impl.hpp
index 4d040d3959f..4d040d3959f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/prior_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/prior_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_at_impl.hpp
new file mode 100644
index 00000000000..f29c0e14e59
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_at_impl.hpp
@@ -0,0 +1,60 @@
+/*=============================================================================
+ Copyright (c) 2014,2018 Kohei Takahashi
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef FUSION_VALUE_AT_IMPL_16122014_1641
+#define FUSION_VALUE_AT_IMPL_16122014_1641
+
+#include <boost/fusion/support/config.hpp>
+#include <boost/fusion/container/vector/detail/config.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+// Without variadics, we will use the PP version
+///////////////////////////////////////////////////////////////////////////////
+#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
+# include <boost/fusion/container/vector/detail/cpp03/value_at_impl.hpp>
+#else
+
+///////////////////////////////////////////////////////////////////////////////
+// C++11 interface
+///////////////////////////////////////////////////////////////////////////////
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/mpl/identity.hpp>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+
+ namespace vector_detail
+ {
+ template <std::size_t I, typename T>
+ struct store;
+
+ template <std::size_t N, typename U>
+ static inline BOOST_FUSION_GPU_ENABLED
+ mpl::identity<U> value_at_impl(store<N, U> const volatile*);
+ }
+
+ namespace extension
+ {
+ template <typename Tag>
+ struct value_at_impl;
+
+ template <>
+ struct value_at_impl<vector_tag>
+ {
+ template <typename Sequence, typename N>
+ struct apply : BOOST_FUSION_DECLTYPE_N3031((
+ vector_detail::value_at_impl<N::value>(boost::declval<Sequence*>())
+ ))
+ {};
+ };
+ }
+}}
+
+#endif
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/value_of_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_of_impl.hpp
index d67ab3fcc21..d67ab3fcc21 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector.hpp
new file mode 100644
index 00000000000..02ffe514503
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector.hpp
@@ -0,0 +1,319 @@
+/*=============================================================================
+ Copyright (c) 2014-2015 Kohei Takahashi
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#ifndef FUSION_VECTOR_11052014_1625
+#define FUSION_VECTOR_11052014_1625
+
+#include <boost/config.hpp>
+#include <boost/fusion/support/config.hpp>
+#include <boost/fusion/container/vector/detail/config.hpp>
+#include <boost/fusion/container/vector/vector_fwd.hpp>
+
+///////////////////////////////////////////////////////////////////////////////
+// Without variadics, we will use the PP version
+///////////////////////////////////////////////////////////////////////////////
+#if !defined(BOOST_FUSION_HAS_VARIADIC_VECTOR)
+# include <boost/fusion/container/vector/detail/cpp03/vector.hpp>
+#else
+
+///////////////////////////////////////////////////////////////////////////////
+// C++11 interface
+///////////////////////////////////////////////////////////////////////////////
+#include <boost/fusion/support/sequence_base.hpp>
+#include <boost/fusion/support/is_sequence.hpp>
+#include <boost/fusion/support/detail/and.hpp>
+#include <boost/fusion/support/detail/index_sequence.hpp>
+#include <boost/fusion/container/vector/detail/at_impl.hpp>
+#include <boost/fusion/container/vector/detail/value_at_impl.hpp>
+#include <boost/fusion/container/vector/detail/begin_impl.hpp>
+#include <boost/fusion/container/vector/detail/end_impl.hpp>
+#include <boost/fusion/sequence/intrinsic/begin.hpp>
+#include <boost/fusion/sequence/intrinsic/size.hpp>
+#include <boost/fusion/iterator/advance.hpp>
+#include <boost/fusion/iterator/deref.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <cstddef>
+#include <utility>
+
+namespace boost { namespace fusion
+{
+ struct vector_tag;
+ struct random_access_traversal_tag;
+
+ namespace vector_detail
+ {
+ struct each_elem {};
+
+ template <
+ typename This, typename T, typename T_, std::size_t Size, bool IsSeq
+ >
+ struct can_convert_impl : false_type {};
+
+ template <typename This, typename T, typename Sequence, std::size_t Size>
+ struct can_convert_impl<This, T, Sequence, Size, true> : true_type {};
+
+ template <typename This, typename Sequence, typename T>
+ struct can_convert_impl<This, Sequence, T, 1, true>
+ : integral_constant<
+ bool
+ , !is_convertible<
+ Sequence
+ , typename fusion::extension::value_at_impl<vector_tag>::
+ template apply< This, mpl::int_<0> >::type
+ >::value
+ >
+ {};
+
+ template <typename This, typename T, typename T_, std::size_t Size>
+ struct can_convert
+ : can_convert_impl<
+ This, T, T_, Size, traits::is_sequence<T_>::value
+ >
+ {};
+
+ template <typename T, bool IsSeq, std::size_t Size>
+ struct is_longer_sequence_impl : false_type {};
+
+ template <typename Sequence, std::size_t Size>
+ struct is_longer_sequence_impl<Sequence, true, Size>
+ : integral_constant<
+ bool, (fusion::result_of::size<Sequence>::value >= Size)
+ >
+ {};
+
+ template<typename T, std::size_t Size>
+ struct is_longer_sequence
+ : is_longer_sequence_impl<T, traits::is_sequence<T>::value, Size>
+ {};
+
+ // forward_at_c allows to access Nth element even if ForwardSequence
+ // since fusion::at_c requires RandomAccessSequence.
+ namespace result_of
+ {
+ template <typename Sequence, int N>
+ struct forward_at_c
+ : fusion::result_of::deref<
+ typename fusion::result_of::advance_c<
+ typename fusion::result_of::begin<
+ typename remove_reference<Sequence>::type
+ >::type
+ , N
+ >::type
+ >
+ {};
+ }
+
+ template <int N, typename Sequence>
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ inline typename result_of::forward_at_c<Sequence, N>::type
+ forward_at_c(Sequence&& seq)
+ {
+ typedef typename
+ result_of::forward_at_c<Sequence, N>::type
+ result;
+ return std::forward<result>(*advance_c<N>(begin(seq)));
+ }
+
+ // Object proxy since preserve object order
+ template <std::size_t, typename T>
+ struct store
+ {
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ store()
+ : elem() // value-initialized explicitly
+ {}
+
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ store(store const& rhs)
+ : elem(rhs.elem)
+ {}
+
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ store&
+ operator=(store const& rhs)
+ {
+ elem = rhs.elem;
+ return *this;
+ }
+
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ store(store&& rhs)
+ : elem(static_cast<T&&>(rhs.elem))
+ {}
+
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ store&
+ operator=(store&& rhs)
+ {
+ elem = static_cast<T&&>(rhs.elem);
+ return *this;
+ }
+
+ template <
+ typename U
+ , typename = typename boost::disable_if<
+ is_base_of<store, typename remove_reference<U>::type>
+ >::type
+ >
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ store(U&& rhs)
+ : elem(std::forward<U>(rhs))
+ {}
+
+ using elem_type = T;
+ T elem;
+ };
+
+ // placed outside of vector_data due to GCC < 6 bug
+ template <std::size_t J, typename U>
+ static inline BOOST_FUSION_GPU_ENABLED
+ store<J, U> store_at_impl(store<J, U>*);
+
+ template <typename I, typename ...T>
+ struct vector_data;
+
+ template <std::size_t ...I, typename ...T>
+ struct vector_data<detail::index_sequence<I...>, T...>
+ : store<I, T>...
+ , sequence_base<vector_data<detail::index_sequence<I...>, T...> >
+ {
+ typedef vector_tag fusion_tag;
+ typedef fusion_sequence_tag tag; // this gets picked up by MPL
+ typedef mpl::false_ is_view;
+ typedef random_access_traversal_tag category;
+ typedef mpl::int_<sizeof...(T)> size;
+ typedef vector<T...> type_sequence;
+
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ BOOST_DEFAULTED_FUNCTION(vector_data(), {})
+
+ template <
+ typename Sequence
+ , typename Sequence_ = typename remove_reference<Sequence>::type
+ , typename = typename boost::enable_if<
+ can_convert<vector_data, Sequence, Sequence_, sizeof...(I)>
+ >::type
+ >
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ explicit
+ vector_data(each_elem, Sequence&& rhs)
+ : store<I, T>(forward_at_c<I>(std::forward<Sequence>(rhs)))...
+ {}
+
+ template <typename ...U>
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ explicit
+ vector_data(each_elem, U&&... var)
+ : store<I, T>(std::forward<U>(var))...
+ {}
+
+ template <typename Sequence>
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ void
+ assign_sequence(Sequence&& seq)
+ {
+ assign(std::forward<Sequence>(seq), detail::index_sequence<I...>());
+ }
+
+ template <typename Sequence>
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ void
+ assign(Sequence&&, detail::index_sequence<>) {}
+
+ template <typename Sequence, std::size_t N, std::size_t ...M>
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ void
+ assign(Sequence&& seq, detail::index_sequence<N, M...>)
+ {
+ at_impl(mpl::int_<N>()) = vector_detail::forward_at_c<N>(seq);
+ assign(std::forward<Sequence>(seq), detail::index_sequence<M...>());
+ }
+
+ private:
+ template <std::size_t J>
+ using store_at = decltype(store_at_impl<J>(static_cast<vector_data*>(nullptr)));
+
+ public:
+ template <typename J>
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ typename store_at<J::value>::elem_type& at_impl(J)
+ {
+ return store_at<J::value>::elem;
+ }
+
+ template <typename J>
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ typename store_at<J::value>::elem_type const& at_impl(J) const
+ {
+ return store_at<J::value>::elem;
+ }
+ };
+ } // namespace boost::fusion::vector_detail
+
+ template <typename... T>
+ struct vector
+ : vector_detail::vector_data<
+ typename detail::make_index_sequence<sizeof...(T)>::type
+ , T...
+ >
+ {
+ typedef vector_detail::vector_data<
+ typename detail::make_index_sequence<sizeof...(T)>::type
+ , T...
+ > base;
+
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ BOOST_DEFAULTED_FUNCTION(vector(), {})
+
+ template <
+ typename... U
+ , typename = typename boost::enable_if_c<(
+ sizeof...(U) >= 1 &&
+ fusion::detail::and_<is_convertible<U, T>...>::value &&
+ !fusion::detail::and_<
+ is_base_of<vector, typename remove_reference<U>::type>...
+ >::value
+ )>::type
+ >
+ // XXX: constexpr become error due to pull-request #79, booooo!!
+ // In the (near) future release, should be fixed.
+ /* BOOST_CONSTEXPR */ BOOST_FUSION_GPU_ENABLED
+ explicit vector(U&&... u)
+ : base(vector_detail::each_elem(), std::forward<U>(u)...)
+ {}
+
+ template <
+ typename Sequence
+ , typename = typename boost::enable_if_c<
+ vector_detail::is_longer_sequence<
+ typename remove_reference<Sequence>::type, sizeof...(T)
+ >::value
+ >::type
+ >
+ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ vector(Sequence&& seq)
+ : base(vector_detail::each_elem(), std::forward<Sequence>(seq))
+ {}
+
+ template <typename Sequence>
+ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
+ vector&
+ operator=(Sequence&& rhs)
+ {
+ base::assign_sequence(std::forward<Sequence>(rhs));
+ return *this;
+ }
+ };
+}}
+
+#endif
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/vector_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_fwd.hpp
index dcb0a0fc0c8..dcb0a0fc0c8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/vector_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/container/vector/vector_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_iterator.hpp
index 150530d14d5..150530d14d5 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/container/vector/vector_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/container/vector/vector_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/include/std_pair.hpp b/src/third_party/boost-1.69.0/boost/fusion/include/std_pair.hpp
index 7a882a97ad2..7a882a97ad2 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/include/std_pair.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/include/std_pair.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/include/tuple.hpp b/src/third_party/boost-1.69.0/boost/fusion/include/tuple.hpp
index 5d167f4f9d0..5d167f4f9d0 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/include/tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/include/tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/advance.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/advance.hpp
index f81596a7a5f..f81596a7a5f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/advance.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/advance.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/basic_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/basic_iterator.hpp
index eae46e63550..eae46e63550 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/basic_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/basic_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/deref.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/deref.hpp
index c31962cb093..c31962cb093 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/deref.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/deref.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/deref_data.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/deref_data.hpp
index 65a43324f94..65a43324f94 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/deref_data.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/deref_data.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp
index bee0934f579..bee0934f579 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_deref_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/adapt_value_traits.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_value_traits.hpp
index e27a2f90fd4..e27a2f90fd4 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/adapt_value_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/adapt_value_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/advance.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/advance.hpp
index 7eb3bbbdbd5..7eb3bbbdbd5 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/advance.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/advance.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/distance.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/distance.hpp
index 698490263b2..698490263b2 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/distance.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/distance.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segment_sequence.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segment_sequence.hpp
index 8b8d5c13f42..8b8d5c13f42 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segment_sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segment_sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_equal_to.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_equal_to.hpp
index 77a080f2b23..77a080f2b23 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_iterator.hpp
index 9e114155e01..9e114155e01 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_next_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_next_impl.hpp
index 62502ceef5f..62502ceef5f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/detail/segmented_next_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/detail/segmented_next_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/distance.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/distance.hpp
index 7f993c0d175..7f993c0d175 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/distance.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/distance.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/equal_to.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/equal_to.hpp
index 191795e1304..191795e1304 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/iterator_facade.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/iterator_facade.hpp
index 1760957eef3..1760957eef3 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/iterator_facade.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/iterator_facade.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/key_of.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/key_of.hpp
index 3459ab58e57..3459ab58e57 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/key_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/key_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/mpl/convert_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/convert_iterator.hpp
index 3e17478eb20..3e17478eb20 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/mpl/convert_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/convert_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/mpl/fusion_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/fusion_iterator.hpp
index f8feacf6710..f8feacf6710 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/mpl/fusion_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/mpl/fusion_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/next.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/next.hpp
index d6ca3d66305..d6ca3d66305 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/next.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/next.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/prior.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/prior.hpp
index 80e891c791e..80e891c791e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/prior.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/prior.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/segmented_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/segmented_iterator.hpp
index b9aac07c6c4..b9aac07c6c4 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/segmented_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/segmented_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/value_of.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/value_of.hpp
index 1408dc7a557..1408dc7a557 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/value_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/value_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/iterator/value_of_data.hpp b/src/third_party/boost-1.69.0/boost/fusion/iterator/value_of_data.hpp
index 341fe882a91..341fe882a91 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/iterator/value_of_data.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/iterator/value_of_data.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/mpl/begin.hpp b/src/third_party/boost-1.69.0/boost/fusion/mpl/begin.hpp
index f97e82ceb1f..f97e82ceb1f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/mpl/begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/mpl/begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/mpl/end.hpp b/src/third_party/boost-1.69.0/boost/fusion/mpl/end.hpp
index e5aa8b96c42..e5aa8b96c42 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/mpl/end.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/mpl/end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison.hpp
index d319f9e07f5..d319f9e07f5 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/equal_to.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/equal_to.hpp
index cffed6c399a..cffed6c399a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/greater.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater.hpp
index d762652935a..d762652935a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp
index d15d88c4040..d15d88c4040 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/greater_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/less.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less.hpp
index 04377d69603..04377d69603 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/less.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/less_equal.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less_equal.hpp
index e61d33c4fa4..e61d33c4fa4 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
index 323b2ac9d09..323b2ac9d09 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/detail/not_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/enable_comparison.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/enable_comparison.hpp
index 12794177142..12794177142 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/enable_comparison.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/enable_comparison.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/equal_to.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/equal_to.hpp
index 283ffefc8b7..283ffefc8b7 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/greater.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater.hpp
index fbbb7bfae2f..fbbb7bfae2f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/greater_equal.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater_equal.hpp
index 7b91a8886b9..7b91a8886b9 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/greater_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/greater_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/less.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less.hpp
index b056552a9ea..b056552a9ea 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/less.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/less_equal.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less_equal.hpp
index c5dfa8d5c74..c5dfa8d5c74 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/not_equal_to.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/not_equal_to.hpp
index fc2fef3343f..fc2fef3343f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/comparison/not_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/comparison/not_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/at.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/at.hpp
index a103e078a2f..a103e078a2f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/at.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/at.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/begin.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/begin.hpp
index 79c14d74aba..79c14d74aba 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
index ec20ac414d7..ec20ac414d7 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
index 12d9e24c479..12d9e24c479 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_begin_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
index 55419ed80d2..55419ed80d2 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
index da48649a246..da48649a246 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp
index 4defcedde1a..4defcedde1a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/detail/segmented_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/empty.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/empty.hpp
index 6a0dbe74a5c..6a0dbe74a5c 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/end.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/end.hpp
index b342468f0ee..b342468f0ee 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/end.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/segments.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/segments.hpp
index 41501a96435..41501a96435 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/segments.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/segments.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/size.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/size.hpp
index 97aa3ef9ecf..97aa3ef9ecf 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/value_at.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/value_at.hpp
index 152f0c94555..152f0c94555 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic/value_at.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic/value_at.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic_fwd.hpp
index a6354ea3bb3..a6354ea3bb3 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/intrinsic_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/intrinsic_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/io.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/io.hpp
index b0baf426c5f..b0baf426c5f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/io.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/in.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/in.hpp
index d0a8dc4964a..d0a8dc4964a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/in.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/in.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/manip.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/manip.hpp
index 01dd476cbd5..01dd476cbd5 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/manip.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/manip.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/out.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/out.hpp
index 7da87a53a41..7da87a53a41 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/detail/out.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/detail/out.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/in.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/in.hpp
index 288c247331b..288c247331b 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/in.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/in.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/out.hpp b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/out.hpp
index 5c4637d57b6..5c4637d57b6 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/sequence/io/out.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/sequence/io/out.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/as_const.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/as_const.hpp
index 04d5bfcc144..04d5bfcc144 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/as_const.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/as_const.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/category_of.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/category_of.hpp
index 7397c45ad64..7397c45ad64 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/category_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/category_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/config.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/config.hpp
new file mode 100644
index 00000000000..dc614d9d33b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/config.hpp
@@ -0,0 +1,130 @@
+/*=============================================================================
+ Copyright (c) 2014 Eric Niebler
+ Copyright (c) 2014,2015,2018 Kohei Takahashi
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#if !defined(FUSION_SUPPORT_CONFIG_01092014_1718)
+#define FUSION_SUPPORT_CONFIG_01092014_1718
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <utility>
+
+#ifndef BOOST_FUSION_GPU_ENABLED
+#define BOOST_FUSION_GPU_ENABLED BOOST_GPU_ENABLED
+#endif
+
+// Enclose with inline namespace because unqualified lookup of GCC < 4.5 is broken.
+//
+// namespace detail {
+// struct foo;
+// struct X { };
+// }
+//
+// template <typename T> void foo(T) { }
+//
+// int main()
+// {
+// foo(detail::X());
+// // prog.cc: In function 'int main()':
+// // prog.cc:2: error: 'struct detail::foo' is not a function,
+// // prog.cc:6: error: conflict with 'template<class T> void foo(T)'
+// // prog.cc:10: error: in call to 'foo'
+// }
+namespace boost { namespace fusion { namespace detail
+{
+ namespace barrier { }
+ using namespace barrier;
+}}}
+#define BOOST_FUSION_BARRIER_BEGIN namespace barrier {
+#define BOOST_FUSION_BARRIER_END }
+
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1900))
+// All of rvalue-reference ready MSVC don't perform implicit conversion from
+// fundamental type to rvalue-reference of another fundamental type [1].
+//
+// Following example doesn't compile
+//
+// int i;
+// long &&l = i; // sigh..., std::forward<long&&>(i) also fail.
+//
+// however, following one will work.
+//
+// int i;
+// long &&l = static_cast<long &&>(i);
+//
+// OK, now can we replace all usage of std::forward to static_cast? -- I say NO!
+// All of rvalue-reference ready Clang doesn't compile above static_cast usage [2], sigh...
+//
+// References:
+// 1. https://connect.microsoft.com/VisualStudio/feedback/details/1037806/implicit-conversion-doesnt-perform-for-fund
+// 2. http://llvm.org/bugs/show_bug.cgi?id=19917
+//
+// Tentatively, we use static_cast to forward if run under MSVC.
+# define BOOST_FUSION_FWD_ELEM(type, value) static_cast<type&&>(value)
+#else
+# define BOOST_FUSION_FWD_ELEM(type, value) std::forward<type>(value)
+#endif
+
+
+// Workaround for LWG 2408: C++17 SFINAE-friendly std::iterator_traits.
+// http://cplusplus.github.io/LWG/lwg-defects.html#2408
+//
+// - GCC 4.5 enables the feature under C++11.
+// https://gcc.gnu.org/ml/gcc-patches/2014-11/msg01105.html
+//
+// - MSVC 10.0 implements iterator intrinsics; MSVC 13.0 implements LWG2408.
+#if (defined(BOOST_LIBSTDCXX_VERSION) && (BOOST_LIBSTDCXX_VERSION < 40500) && \
+ defined(BOOST_LIBSTDCXX11)) || \
+ (defined(BOOST_MSVC) && (1600 <= BOOST_MSVC && BOOST_MSVC < 1900))
+# define BOOST_FUSION_WORKAROUND_FOR_LWG_2408
+namespace std
+{
+ template <typename>
+ struct iterator_traits;
+}
+#endif
+
+
+// Workaround for older GCC that doesn't accept `this` in constexpr.
+#if BOOST_WORKAROUND(BOOST_GCC, < 40700)
+#define BOOST_FUSION_CONSTEXPR_THIS
+#else
+#define BOOST_FUSION_CONSTEXPR_THIS BOOST_CONSTEXPR
+#endif
+
+
+// Workaround for compilers not implementing N3031 (DR743 and DR950).
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1913)) || \
+ BOOST_WORKAROUND(BOOST_GCC, < 40700) || \
+ defined(BOOST_CLANG) && (__clang_major__ == 3 && __clang_minor__ == 0)
+# if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+namespace boost { namespace fusion { namespace detail
+{
+ template <typename T>
+ using type_alias_t = T;
+}}}
+# define BOOST_FUSION_DECLTYPE_N3031(parenthesized_expr) \
+ boost::fusion::detail::type_alias_t<decltype parenthesized_expr>
+# else
+# include <boost/mpl/identity.hpp>
+# define BOOST_FUSION_DECLTYPE_N3031(parenthesized_expr) \
+ boost::mpl::identity<decltype parenthesized_expr>::type
+# endif
+#else
+# define BOOST_FUSION_DECLTYPE_N3031(parenthesized_expr) \
+ decltype parenthesized_expr
+#endif
+
+
+// Workaround for GCC 4.6 that rejects defaulted function with noexcept.
+#if BOOST_WORKAROUND(BOOST_GCC, / 100 == 406)
+# define BOOST_FUSION_NOEXCEPT_ON_DEFAULTED
+#else
+# define BOOST_FUSION_NOEXCEPT_ON_DEFAULTED BOOST_NOEXCEPT
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/access.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/access.hpp
index ab88538314c..ab88538314c 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/access.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/access.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/and.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/and.hpp
index 42926cb1584..42926cb1584 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/and.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/as_fusion_element.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/as_fusion_element.hpp
index 2af960eedf3..2af960eedf3 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/as_fusion_element.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/as_fusion_element.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/enabler.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/enabler.hpp
index ea263a41d33..ea263a41d33 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/enabler.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/enabler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/index_sequence.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/index_sequence.hpp
index e86def005e1..e86def005e1 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/index_sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/index_sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/is_mpl_sequence.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/is_mpl_sequence.hpp
index 16b6db12355..16b6db12355 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/is_mpl_sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/is_mpl_sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp
index 189c784dabe..189c784dabe 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/is_native_fusion_sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/mpl_iterator_category.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/mpl_iterator_category.hpp
index fcb00a01ca6..fcb00a01ca6 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/mpl_iterator_category.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/mpl_iterator_category.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/pp_round.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/pp_round.hpp
index 6c43b66f11e..6c43b66f11e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/pp_round.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/pp_round.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp
index 6a388bf8340..6a388bf8340 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/detail/segmented_fold_until_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/is_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/is_iterator.hpp
index b48aab8c3f6..b48aab8c3f6 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/is_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/is_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/is_segmented.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/is_segmented.hpp
index 1326feb346f..1326feb346f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/is_segmented.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/is_segmented.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/is_sequence.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/is_sequence.hpp
index 95a9423f942..95a9423f942 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/is_sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/is_sequence.hpp
diff --git a/src/third_party/boost-1.69.0/boost/fusion/support/is_view.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/is_view.hpp
new file mode 100644
index 00000000000..b2b52c423e7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/is_view.hpp
@@ -0,0 +1,75 @@
+/*=============================================================================
+ Copyright (c) 2001-2011 Joel de Guzman
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+==============================================================================*/
+#if !defined(FUSION_IS_VIEW_03202006_0015)
+#define FUSION_IS_VIEW_03202006_0015
+
+#include <boost/fusion/support/config.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/fusion/support/tag_of.hpp>
+
+namespace boost { namespace fusion
+{
+ // Special tags:
+ struct non_fusion_tag;
+ struct sequence_facade_tag;
+ struct boost_tuple_tag; // boost::tuples::tuple tag
+ struct boost_array_tag; // boost::array tag
+ struct mpl_sequence_tag; // mpl sequence tag
+ struct std_pair_tag; // std::pair tag
+
+ namespace extension
+ {
+ template<typename Tag>
+ struct is_view_impl
+ {
+ template <typename T>
+ struct apply
+ {
+ typedef typename T::is_view type;
+ };
+ };
+
+ template <>
+ struct is_view_impl<non_fusion_tag>
+ {
+ template <typename T>
+ struct apply : mpl::false_ {};
+ };
+
+ template <>
+ struct is_view_impl<sequence_facade_tag>
+ {
+ template <typename Sequence>
+ struct apply : Sequence::is_view {};
+ };
+
+ template <>
+ struct is_view_impl<boost_tuple_tag>;
+
+ template <>
+ struct is_view_impl<boost_array_tag>;
+
+ template <>
+ struct is_view_impl<mpl_sequence_tag>;
+
+ template <>
+ struct is_view_impl<std_pair_tag>;
+ }
+
+ namespace traits
+ {
+ template <typename T>
+ struct is_view :
+ mpl::bool_<
+ (bool)extension::is_view_impl<typename fusion::detail::tag_of<T>::type>::
+ template apply<T>::type::value
+ >
+ {};
+ }
+}}
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/iterator_base.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/iterator_base.hpp
index 5d8ce3abb77..5d8ce3abb77 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/iterator_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/iterator_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/sequence_base.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/sequence_base.hpp
index 2f9320e6c82..2f9320e6c82 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/sequence_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/sequence_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/tag_of.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/tag_of.hpp
index 61cb3b19ae8..61cb3b19ae8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/tag_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/tag_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/tag_of_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/tag_of_fwd.hpp
index ba434d93345..ba434d93345 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/tag_of_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/tag_of_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/support/void.hpp b/src/third_party/boost-1.69.0/boost/fusion/support/void.hpp
index 7650519012d..7650519012d 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/support/void.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/support/void.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple.hpp
index 49dac1d745a..49dac1d745a 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/make_tuple.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/make_tuple.hpp
index f87ea5a2315..f87ea5a2315 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/make_tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/make_tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp
index 6abb0336889..6abb0336889 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp
index f0ba114d6e8..f0ba114d6e8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp
index 31ef304e2a9..31ef304e2a9 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp
index 850829f3c7d..850829f3c7d 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp
index c85741b9588..c85741b9588 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp
index b4c99c51801..b4c99c51801 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/make_tuple50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp
index 3fd0e18becf..3fd0e18becf 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp
index a24a29a12ec..a24a29a12ec 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp
index 7ec319608b3..7ec319608b3 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple10_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp
index 73de49ffb86..73de49ffb86 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp
index 3769f890201..3769f890201 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple20_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp
index 9db26a0c9a1..9db26a0c9a1 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp
index b9f3e017c32..b9f3e017c32 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple30_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp
index 44e0d2c1d51..44e0d2c1d51 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp
index 200bf5db500..200bf5db500 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple40_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp
index db157b65491..db157b65491 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp
index 18fd75c4083..18fd75c4083 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple50_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
index 234936c587d..234936c587d 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp
index 5898c6b9784..5898c6b9784 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp
index 67ec63b78e3..67ec63b78e3 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp
index 37581f20c50..37581f20c50 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp
index d81cb0cdd62..d81cb0cdd62 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp
index 69eb0d8ddfb..69eb0d8ddfb 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp
index a024e5731cf..a024e5731cf 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/preprocessed/tuple_tie50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple.hpp
index 45408f0652b..45408f0652b 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_expand.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_expand.hpp
index 3909f647b85..3909f647b85 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_expand.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_expand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_fwd.hpp
index ef6bdfe8b60..ef6bdfe8b60 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_tie.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_tie.hpp
index b650d1cc160..b650d1cc160 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/detail/tuple_tie.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/detail/tuple_tie.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/make_tuple.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/make_tuple.hpp
index e5cbb3b2ac8..e5cbb3b2ac8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/make_tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/make_tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/tuple.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple.hpp
index 16b855113c8..16b855113c8 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/tuple_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_fwd.hpp
index b763acd52fe..b763acd52fe 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/tuple_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/tuple/tuple_tie.hpp b/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_tie.hpp
index a07dc0a43e4..a07dc0a43e4 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/tuple/tuple_tie.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/tuple/tuple_tie.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range.hpp
index 78d6ffad9e4..78d6ffad9e4 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/at_impl.hpp
index 20f1758310c..20f1758310c 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp
index 7e00dec0916..7e00dec0916 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/end_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/end_impl.hpp
index b76aa91cd51..b76aa91cd51 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp
index 88f4358bdf1..88f4358bdf1 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/is_segmented_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp
index 4b2c11ebe21..4b2c11ebe21 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp
index bbf4c45ad3b..bbf4c45ad3b 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/segments_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/size_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/size_impl.hpp
index 0678e5dde15..0678e5dde15 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/size_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/size_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp
index 652b8da192f..652b8da192f 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/iterator_range.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/iterator_range.hpp
index 272abcd9114..272abcd9114 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/iterator_range/iterator_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/iterator_range/iterator_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/begin_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/begin_impl.hpp
index b7a961a7f24..b7a961a7f24 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
index 2d5f8317e1d..2d5f8317e1d 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_data_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/deref_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_impl.hpp
index 0e1e39fffa0..0e1e39fffa0 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/end_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/end_impl.hpp
index 0b4b9b0abdf..0b4b9b0abdf 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp
index ec682f614d0..ec682f614d0 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/key_of_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/next_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/next_impl.hpp
index a7d18757da6..a7d18757da6 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/next_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/next_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
index f797135b395..f797135b395 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_data_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp
index f058a60cbcb..f058a60cbcb 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view.hpp
index 676cbc54dd3..676cbc54dd3 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view_fwd.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_fwd.hpp
index c3e3b45e831..c3e3b45e831 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_iterator.hpp
index ddd1341ee1e..ddd1341ee1e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/joint_view/joint_view_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/joint_view/joint_view_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/advance_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/advance_impl.hpp
index 5af22321b91..5af22321b91 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/advance_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/advance_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/at_impl.hpp
index 6c4c7579b66..6c4c7579b66 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/begin_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/begin_impl.hpp
index d6bca8f6b56..d6bca8f6b56 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/begin_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/begin_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/deref_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/deref_impl.hpp
index acb90d836b9..acb90d836b9 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/deref_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/deref_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/distance_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/distance_impl.hpp
index 9cd85fdc316..9cd85fdc316 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/distance_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/distance_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/end_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/end_impl.hpp
index d662ac246be..d662ac246be 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp
index a14b4c51285..a14b4c51285 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/equal_to_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/next_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/next_impl.hpp
index 55a4ff11b40..55a4ff11b40 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/next_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/next_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/prior_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/prior_impl.hpp
index 823f96e5a5e..823f96e5a5e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/prior_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/prior_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/size_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/size_impl.hpp
index eba89cdd8d7..eba89cdd8d7 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/size_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/size_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/value_at_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_at_impl.hpp
index b5721b84bd1..b5721b84bd1 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/value_at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/value_of_impl.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_of_impl.hpp
index dfb345c8cd1..dfb345c8cd1 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/detail/value_of_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/detail/value_of_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/single_view.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view.hpp
index a4437902c1e..a4437902c1e 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/single_view.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view.hpp
diff --git a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/single_view_iterator.hpp b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view_iterator.hpp
index 0f3e2744b57..0f3e2744b57 100644
--- a/src/third_party/boost-1.68.0/boost/fusion/view/single_view/single_view_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/fusion/view/single_view/single_view_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/generator_iterator.hpp b/src/third_party/boost-1.69.0/boost/generator_iterator.hpp
index 0fe1569c5a1..0fe1569c5a1 100644
--- a/src/third_party/boost-1.68.0/boost/generator_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/generator_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/get_pointer.hpp b/src/third_party/boost-1.69.0/boost/get_pointer.hpp
index 36e2cd7d0fb..36e2cd7d0fb 100644
--- a/src/third_party/boost-1.68.0/boost/get_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/get_pointer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/indirect_reference.hpp b/src/third_party/boost-1.69.0/boost/indirect_reference.hpp
index 3279cd052c8..3279cd052c8 100644
--- a/src/third_party/boost-1.68.0/boost/indirect_reference.hpp
+++ b/src/third_party/boost-1.69.0/boost/indirect_reference.hpp
diff --git a/src/third_party/boost-1.68.0/boost/integer.hpp b/src/third_party/boost-1.69.0/boost/integer.hpp
index 9fa00194845..9fa00194845 100644
--- a/src/third_party/boost-1.68.0/boost/integer.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/integer/common_factor.hpp b/src/third_party/boost-1.69.0/boost/integer/common_factor.hpp
index fab919937ca..fab919937ca 100644
--- a/src/third_party/boost-1.68.0/boost/integer/common_factor.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer/common_factor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/integer/common_factor_ct.hpp b/src/third_party/boost-1.69.0/boost/integer/common_factor_ct.hpp
index 0671d161c37..0671d161c37 100644
--- a/src/third_party/boost-1.68.0/boost/integer/common_factor_ct.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer/common_factor_ct.hpp
diff --git a/src/third_party/boost-1.69.0/boost/integer/common_factor_rt.hpp b/src/third_party/boost-1.69.0/boost/integer/common_factor_rt.hpp
new file mode 100644
index 00000000000..d79a9c574d7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/integer/common_factor_rt.hpp
@@ -0,0 +1,578 @@
+// (C) Copyright Jeremy William Murphy 2016.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_INTEGER_COMMON_FACTOR_RT_HPP
+#define BOOST_INTEGER_COMMON_FACTOR_RT_HPP
+
+#include <boost/assert.hpp>
+#include <boost/core/enable_if.hpp>
+
+#include <boost/config.hpp> // for BOOST_NESTED_TEMPLATE, etc.
+#include <boost/limits.hpp> // for std::numeric_limits
+#include <climits> // for CHAR_MIN
+#include <boost/detail/workaround.hpp>
+#include <iterator>
+#include <algorithm>
+#include <limits>
+#ifndef BOOST_NO_CXX11_HDR_TYPE_TRAITS
+#include <type_traits>
+#endif
+#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
+#include <functional>
+#endif
+
+#if ((defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+#include <intrin.h>
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127 4244) // Conditional expression is constant
+#endif
+
+#if !defined(BOOST_NO_CXX11_HDR_TYPE_TRAITS) && !defined(BOOST_NO_CXX11_NOEXCEPT)
+#define BOOST_GCD_NOEXCEPT(T) noexcept(std::is_arithmetic<T>::value)
+#else
+#define BOOST_GCD_NOEXCEPT(T)
+#endif
+
+namespace boost {
+
+ template <class I>
+ class rational;
+
+ namespace integer {
+
+ namespace gcd_detail{
+
+ //
+ // some helper functions which really should be constexpr already, but sadly aren't:
+ //
+#ifndef BOOST_NO_CXX14_CONSTEXPR
+ template <class T>
+ inline constexpr T constexpr_min(T const& a, T const& b) BOOST_GCD_NOEXCEPT(T)
+ {
+ return a < b ? a : b;
+ }
+ template <class T>
+ inline constexpr auto constexpr_swap(T&a, T& b) BOOST_GCD_NOEXCEPT(T) -> decltype(a.swap(b))
+ {
+ return a.swap(b);
+ }
+ template <class T, class U>
+ inline constexpr void constexpr_swap(T&a, U& b...) BOOST_GCD_NOEXCEPT(T)
+ {
+ T t(static_cast<T&&>(a));
+ a = static_cast<T&&>(b);
+ b = static_cast<T&&>(t);
+ }
+#else
+ template <class T>
+ inline T constexpr_min(T const& a, T const& b) BOOST_GCD_NOEXCEPT(T)
+ {
+ return a < b ? a : b;
+ }
+ template <class T>
+ inline void constexpr_swap(T&a, T& b) BOOST_GCD_NOEXCEPT(T)
+ {
+ using std::swap;
+ swap(a, b);
+ }
+#endif
+
+ template <class T, bool a =
+#ifndef BOOST_NO_CXX11_HDR_TYPE_TRAITS
+ std::is_unsigned<T>::value ||
+#endif
+ (std::numeric_limits<T>::is_specialized && !std::numeric_limits<T>::is_signed)>
+ struct gcd_traits_abs_defaults
+ {
+ inline static BOOST_CXX14_CONSTEXPR const T& abs(const T& val) BOOST_GCD_NOEXCEPT(T) { return val; }
+ };
+ template <class T>
+ struct gcd_traits_abs_defaults<T, false>
+ {
+ inline static T BOOST_CXX14_CONSTEXPR abs(const T& val) BOOST_GCD_NOEXCEPT(T)
+ {
+ // This sucks, but std::abs is not constexpr :(
+ return val < T(0) ? -val : val;
+ }
+ };
+
+ enum method_type
+ {
+ method_euclid = 0,
+ method_binary = 1,
+ method_mixed = 2
+ };
+
+ struct any_convert
+ {
+ template <class T>
+ any_convert(const T&);
+ };
+
+ struct unlikely_size
+ {
+ char buf[9973];
+ };
+
+ unlikely_size operator <<= (any_convert, any_convert);
+ unlikely_size operator >>= (any_convert, any_convert);
+
+ template <class T>
+ struct gcd_traits_defaults : public gcd_traits_abs_defaults<T>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(T& val) BOOST_GCD_NOEXCEPT(T)
+ {
+ unsigned r = 0;
+ while(0 == (val & 1u))
+ {
+#ifdef _MSC_VER // VC++ can't handle operator >>= in constexpr code for some reason
+ val = val >> 1;
+#else
+ val >>= 1;
+#endif
+ ++r;
+ }
+ return r;
+ }
+ inline static BOOST_CXX14_CONSTEXPR bool less(const T& a, const T& b) BOOST_GCD_NOEXCEPT(T)
+ {
+ return a < b;
+ }
+
+ static T& get_value();
+
+#ifndef BOOST_NO_SFINAE
+ static const bool has_operator_left_shift_equal = sizeof(get_value() <<= 2) != sizeof(unlikely_size);
+ static const bool has_operator_right_shift_equal = sizeof(get_value() >>= 2) != sizeof(unlikely_size);
+#else
+ static const bool has_operator_left_shift_equal = true;
+ static const bool has_operator_right_shift_equal = true;
+#endif
+ static const method_type method = std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer && has_operator_left_shift_equal && has_operator_right_shift_equal ? method_mixed : method_euclid;
+ };
+ //
+ // Default gcd_traits just inherits from defaults:
+ //
+ template <class T>
+ struct gcd_traits : public gcd_traits_defaults<T> {};
+
+ //
+ // Some platforms have fast bitscan operations, that allow us to implement
+ // make_odd much more efficiently, unfortunately we can't use these if we want
+ // the functions to be constexpr as the compiler intrinsics aren't constexpr.
+ //
+#if defined(BOOST_NO_CXX14_CONSTEXPR) && ((defined(BOOST_MSVC) && (BOOST_MSVC >= 1600)) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+#pragma intrinsic(_BitScanForward,)
+ template <>
+ struct gcd_traits<unsigned long> : public gcd_traits_defaults<unsigned long>
+ {
+ BOOST_FORCEINLINE static unsigned find_lsb(unsigned long val) BOOST_NOEXCEPT
+ {
+ unsigned long result;
+ _BitScanForward(&result, val);
+ return result;
+ }
+ BOOST_FORCEINLINE static unsigned make_odd(unsigned long& val) BOOST_NOEXCEPT
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+
+#ifdef _M_X64
+#pragma intrinsic(_BitScanForward64)
+ template <>
+ struct gcd_traits<unsigned __int64> : public gcd_traits_defaults<unsigned __int64>
+ {
+ BOOST_FORCEINLINE static unsigned find_lsb(unsigned __int64 mask) BOOST_NOEXCEPT
+ {
+ unsigned long result;
+ _BitScanForward64(&result, mask);
+ return result;
+ }
+ BOOST_FORCEINLINE static unsigned make_odd(unsigned __int64& val) BOOST_NOEXCEPT
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+#endif
+ //
+ // Other integer type are trivial adaptations of the above,
+ // this works for signed types too, as by the time these functions
+ // are called, all values are > 0.
+ //
+ template <> struct gcd_traits<long> : public gcd_traits_defaults<long>
+ { BOOST_FORCEINLINE static unsigned make_odd(long& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<unsigned int> : public gcd_traits_defaults<unsigned int>
+ { BOOST_FORCEINLINE static unsigned make_odd(unsigned int& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<int> : public gcd_traits_defaults<int>
+ { BOOST_FORCEINLINE static unsigned make_odd(int& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<unsigned short> : public gcd_traits_defaults<unsigned short>
+ { BOOST_FORCEINLINE static unsigned make_odd(unsigned short& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<short> : public gcd_traits_defaults<short>
+ { BOOST_FORCEINLINE static unsigned make_odd(short& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<unsigned char> : public gcd_traits_defaults<unsigned char>
+ { BOOST_FORCEINLINE static unsigned make_odd(unsigned char& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<signed char> : public gcd_traits_defaults<signed char>
+ { BOOST_FORCEINLINE static unsigned make_odd(signed char& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+ template <> struct gcd_traits<char> : public gcd_traits_defaults<char>
+ { BOOST_FORCEINLINE static unsigned make_odd(char& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+ template <> struct gcd_traits<wchar_t> : public gcd_traits_defaults<wchar_t>
+ { BOOST_FORCEINLINE static unsigned make_odd(wchar_t& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; } };
+#endif
+#ifdef _M_X64
+ template <> struct gcd_traits<__int64> : public gcd_traits_defaults<__int64>
+ { BOOST_FORCEINLINE static unsigned make_odd(__int64& val)BOOST_NOEXCEPT{ unsigned result = gcd_traits<unsigned __int64>::find_lsb(val); val >>= result; return result; } };
+#endif
+
+#elif defined(BOOST_GCC) || defined(__clang__) || (defined(BOOST_INTEL) && defined(__GNUC__))
+
+ template <>
+ struct gcd_traits<unsigned> : public gcd_traits_defaults<unsigned>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned find_lsb(unsigned mask)BOOST_NOEXCEPT
+ {
+ return __builtin_ctz(mask);
+ }
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(unsigned& val)BOOST_NOEXCEPT
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+ template <>
+ struct gcd_traits<unsigned long> : public gcd_traits_defaults<unsigned long>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned find_lsb(unsigned long mask)BOOST_NOEXCEPT
+ {
+ return __builtin_ctzl(mask);
+ }
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(unsigned long& val)BOOST_NOEXCEPT
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+ template <>
+ struct gcd_traits<boost::ulong_long_type> : public gcd_traits_defaults<boost::ulong_long_type>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned find_lsb(boost::ulong_long_type mask)BOOST_NOEXCEPT
+ {
+ return __builtin_ctzll(mask);
+ }
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(boost::ulong_long_type& val)BOOST_NOEXCEPT
+ {
+ unsigned result = find_lsb(val);
+ val >>= result;
+ return result;
+ }
+ };
+ //
+ // Other integer type are trivial adaptations of the above,
+ // this works for signed types too, as by the time these functions
+ // are called, all values are > 0.
+ //
+ template <> struct gcd_traits<boost::long_long_type> : public gcd_traits_defaults<boost::long_long_type>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(boost::long_long_type& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<boost::ulong_long_type>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<long> : public gcd_traits_defaults<long>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(long& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<int> : public gcd_traits_defaults<int>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(int& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned long>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<unsigned short> : public gcd_traits_defaults<unsigned short>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(unsigned short& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<short> : public gcd_traits_defaults<short>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(short& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<unsigned char> : public gcd_traits_defaults<unsigned char>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(unsigned char& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<signed char> : public gcd_traits_defaults<signed char>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(signed char& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+ template <> struct gcd_traits<char> : public gcd_traits_defaults<char>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(char& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+ template <> struct gcd_traits<wchar_t> : public gcd_traits_defaults<wchar_t>
+ {
+ BOOST_FORCEINLINE static BOOST_CXX14_CONSTEXPR unsigned make_odd(wchar_t& val)BOOST_NOEXCEPT { unsigned result = gcd_traits<unsigned>::find_lsb(val); val >>= result; return result; }
+ };
+#endif
+#endif
+ //
+ // The Mixed Binary Euclid Algorithm
+ // Sidi Mohamed Sedjelmaci
+ // Electronic Notes in Discrete Mathematics 35 (2009) 169-176
+ //
+ template <class T>
+ BOOST_CXX14_CONSTEXPR T mixed_binary_gcd(T u, T v) BOOST_GCD_NOEXCEPT(T)
+ {
+ if(gcd_traits<T>::less(u, v))
+ constexpr_swap(u, v);
+
+ unsigned shifts = 0;
+
+ if(u == T(0))
+ return v;
+ if(v == T(0))
+ return u;
+
+ shifts = constexpr_min(gcd_traits<T>::make_odd(u), gcd_traits<T>::make_odd(v));
+
+ while(gcd_traits<T>::less(1, v))
+ {
+ u %= v;
+ v -= u;
+ if(u == T(0))
+ return v << shifts;
+ if(v == T(0))
+ return u << shifts;
+ gcd_traits<T>::make_odd(u);
+ gcd_traits<T>::make_odd(v);
+ if(gcd_traits<T>::less(u, v))
+ constexpr_swap(u, v);
+ }
+ return (v == 1 ? v : u) << shifts;
+ }
+
+ /** Stein gcd (aka 'binary gcd')
+ *
+ * From Mathematics to Generic Programming, Alexander Stepanov, Daniel Rose
+ */
+ template <typename SteinDomain>
+ BOOST_CXX14_CONSTEXPR SteinDomain Stein_gcd(SteinDomain m, SteinDomain n) BOOST_GCD_NOEXCEPT(SteinDomain)
+ {
+ BOOST_ASSERT(m >= 0);
+ BOOST_ASSERT(n >= 0);
+ if (m == SteinDomain(0))
+ return n;
+ if (n == SteinDomain(0))
+ return m;
+ // m > 0 && n > 0
+ unsigned d_m = gcd_traits<SteinDomain>::make_odd(m);
+ unsigned d_n = gcd_traits<SteinDomain>::make_odd(n);
+ // odd(m) && odd(n)
+ while (m != n)
+ {
+ if (n > m)
+ constexpr_swap(n, m);
+ m -= n;
+ gcd_traits<SteinDomain>::make_odd(m);
+ }
+ // m == n
+ m <<= constexpr_min(d_m, d_n);
+ return m;
+ }
+
+
+ /** Euclidean algorithm
+ *
+ * From Mathematics to Generic Programming, Alexander Stepanov, Daniel Rose
+ *
+ */
+ template <typename EuclideanDomain>
+ inline BOOST_CXX14_CONSTEXPR EuclideanDomain Euclid_gcd(EuclideanDomain a, EuclideanDomain b) BOOST_GCD_NOEXCEPT(EuclideanDomain)
+ {
+ while (b != EuclideanDomain(0))
+ {
+ a %= b;
+ constexpr_swap(a, b);
+ }
+ return a;
+ }
+
+
+ template <typename T>
+ inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == method_mixed, T>::type
+ optimal_gcd_select(T const &a, T const &b) BOOST_GCD_NOEXCEPT(T)
+ {
+ return gcd_detail::mixed_binary_gcd(a, b);
+ }
+
+ template <typename T>
+ inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == method_binary, T>::type
+ optimal_gcd_select(T const &a, T const &b) BOOST_GCD_NOEXCEPT(T)
+ {
+ return gcd_detail::Stein_gcd(a, b);
+ }
+
+ template <typename T>
+ inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME enable_if_c<gcd_traits<T>::method == method_euclid, T>::type
+ optimal_gcd_select(T const &a, T const &b) BOOST_GCD_NOEXCEPT(T)
+ {
+ return gcd_detail::Euclid_gcd(a, b);
+ }
+
+ template <class T>
+ inline BOOST_CXX14_CONSTEXPR T lcm_imp(const T& a, const T& b) BOOST_GCD_NOEXCEPT(T)
+ {
+ T temp = boost::integer::gcd_detail::optimal_gcd_select(a, b);
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40500)
+ return (temp != T(0)) ? T(a / temp * b) : T(0);
+#else
+ return temp != T(0) ? T(a / temp * b) : T(0);
+#endif
+ }
+
+} // namespace detail
+
+
+template <typename Integer>
+inline BOOST_CXX14_CONSTEXPR Integer gcd(Integer const &a, Integer const &b) BOOST_GCD_NOEXCEPT(Integer)
+{
+ if(a == (std::numeric_limits<Integer>::min)())
+ return a == static_cast<Integer>(0) ? gcd_detail::gcd_traits<Integer>::abs(b) : boost::integer::gcd(static_cast<Integer>(a % b), b);
+ else if (b == (std::numeric_limits<Integer>::min)())
+ return b == static_cast<Integer>(0) ? gcd_detail::gcd_traits<Integer>::abs(a) : boost::integer::gcd(a, static_cast<Integer>(b % a));
+ return gcd_detail::optimal_gcd_select(static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(a)), static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(b)));
+}
+
+template <typename Integer>
+inline BOOST_CXX14_CONSTEXPR Integer lcm(Integer const &a, Integer const &b) BOOST_GCD_NOEXCEPT(Integer)
+{
+ return gcd_detail::lcm_imp(static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(a)), static_cast<Integer>(gcd_detail::gcd_traits<Integer>::abs(b)));
+}
+#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+//
+// This looks slightly odd, but the variadic forms must have 3 or more arguments, and the variadic argument pack may be empty.
+// This matters not at all for most compilers, but Oracle C++ selects the wrong overload in the 2-arg case unless we do this.
+//
+template <typename Integer, typename... Args>
+inline BOOST_CXX14_CONSTEXPR Integer gcd(Integer const &a, Integer const &b, const Integer& c, Args const&... args) BOOST_GCD_NOEXCEPT(Integer)
+{
+ Integer t = gcd(b, c, args...);
+ return t == 1 ? 1 : gcd(a, t);
+}
+
+template <typename Integer, typename... Args>
+inline BOOST_CXX14_CONSTEXPR Integer lcm(Integer const &a, Integer const &b, Integer const& c, Args const&... args) BOOST_GCD_NOEXCEPT(Integer)
+{
+ return lcm(a, lcm(b, c, args...));
+}
+#endif
+//
+// Special handling for rationals:
+//
+template <typename Integer>
+inline typename boost::enable_if_c<std::numeric_limits<Integer>::is_specialized, boost::rational<Integer> >::type gcd(boost::rational<Integer> const &a, boost::rational<Integer> const &b)
+{
+ return boost::rational<Integer>(static_cast<Integer>(gcd(a.numerator(), b.numerator())), static_cast<Integer>(lcm(a.denominator(), b.denominator())));
+}
+
+template <typename Integer>
+inline typename boost::enable_if_c<std::numeric_limits<Integer>::is_specialized, boost::rational<Integer> >::type lcm(boost::rational<Integer> const &a, boost::rational<Integer> const &b)
+{
+ return boost::rational<Integer>(static_cast<Integer>(lcm(a.numerator(), b.numerator())), static_cast<Integer>(gcd(a.denominator(), b.denominator())));
+}
+/**
+ * Knuth, The Art of Computer Programming: Volume 2, Third edition, 1998
+ * Chapter 4.5.2, Algorithm C: Greatest common divisor of n integers.
+ *
+ * Knuth counts down from n to zero but we naturally go from first to last.
+ * We also return the termination position because it might be useful to know.
+ *
+ * Partly by quirk, partly by design, this algorithm is defined for n = 1,
+ * because the gcd of {x} is x. It is not defined for n = 0.
+ *
+ * @tparam I Input iterator.
+ * @return The gcd of the range and the iterator position at termination.
+ */
+template <typename I>
+std::pair<typename std::iterator_traits<I>::value_type, I>
+gcd_range(I first, I last) BOOST_GCD_NOEXCEPT(I)
+{
+ BOOST_ASSERT(first != last);
+ typedef typename std::iterator_traits<I>::value_type T;
+
+ T d = *first++;
+ while (d != T(1) && first != last)
+ {
+ d = gcd(d, *first);
+ first++;
+ }
+ return std::make_pair(d, first);
+}
+template <typename I>
+std::pair<typename std::iterator_traits<I>::value_type, I>
+lcm_range(I first, I last) BOOST_GCD_NOEXCEPT(I)
+{
+ BOOST_ASSERT(first != last);
+ typedef typename std::iterator_traits<I>::value_type T;
+
+ T d = *first++;
+ while (d != T(1) && first != last)
+ {
+ d = lcm(d, *first);
+ first++;
+ }
+ return std::make_pair(d, first);
+}
+
+template < typename IntegerType >
+class gcd_evaluator
+#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
+ : public std::binary_function<IntegerType, IntegerType, IntegerType>
+#endif
+{
+public:
+#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
+ typedef IntegerType first_argument_type;
+ typedef IntegerType second_argument_type;
+ typedef IntegerType result_type;
+#endif
+ IntegerType operator()(IntegerType const &a, IntegerType const &b)const
+ {
+ return boost::integer::gcd(a, b);
+ }
+};
+
+template < typename IntegerType >
+class lcm_evaluator
+#ifdef BOOST_NO_CXX11_HDR_FUNCTIONAL
+ : public std::binary_function<IntegerType, IntegerType, IntegerType>
+#endif
+{
+public:
+#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
+ typedef IntegerType first_argument_type;
+ typedef IntegerType second_argument_type;
+ typedef IntegerType result_type;
+#endif
+ IntegerType operator()(IntegerType const &a, IntegerType const &b)const
+ {
+ return boost::integer::lcm(a, b);
+ }
+};
+
+} // namespace integer
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_INTEGER_COMMON_FACTOR_RT_HPP
diff --git a/src/third_party/boost-1.68.0/boost/integer/integer_log2.hpp b/src/third_party/boost-1.69.0/boost/integer/integer_log2.hpp
index 8b34ce7440a..8b34ce7440a 100644
--- a/src/third_party/boost-1.68.0/boost/integer/integer_log2.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer/integer_log2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/integer/integer_mask.hpp b/src/third_party/boost-1.69.0/boost/integer/integer_mask.hpp
index eee4679b84b..eee4679b84b 100644
--- a/src/third_party/boost-1.68.0/boost/integer/integer_mask.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer/integer_mask.hpp
diff --git a/src/third_party/boost-1.68.0/boost/integer/static_log2.hpp b/src/third_party/boost-1.69.0/boost/integer/static_log2.hpp
index 56c7a001251..56c7a001251 100644
--- a/src/third_party/boost-1.68.0/boost/integer/static_log2.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer/static_log2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/integer/static_min_max.hpp b/src/third_party/boost-1.69.0/boost/integer/static_min_max.hpp
index ee76fd424a1..ee76fd424a1 100644
--- a/src/third_party/boost-1.68.0/boost/integer/static_min_max.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer/static_min_max.hpp
diff --git a/src/third_party/boost-1.68.0/boost/integer_fwd.hpp b/src/third_party/boost-1.69.0/boost/integer_fwd.hpp
index 18519dd696d..18519dd696d 100644
--- a/src/third_party/boost-1.68.0/boost/integer_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/integer_traits.hpp b/src/third_party/boost-1.69.0/boost/integer_traits.hpp
index 94eb00d31e4..94eb00d31e4 100644
--- a/src/third_party/boost-1.68.0/boost/integer_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/integer_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/allocators/allocator.hpp b/src/third_party/boost-1.69.0/boost/interprocess/allocators/allocator.hpp
index 9a5bf32631a..9a5bf32631a 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/allocators/allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/allocators/allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/allocators/detail/allocator_common.hpp b/src/third_party/boost-1.69.0/boost/interprocess/allocators/detail/allocator_common.hpp
index 79394046966..79394046966 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/allocators/detail/allocator_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/allocators/detail/allocator_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/containers/allocation_type.hpp b/src/third_party/boost-1.69.0/boost/interprocess/containers/allocation_type.hpp
index 71752074731..71752074731 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/containers/allocation_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/containers/allocation_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/containers/containers_fwd.hpp b/src/third_party/boost-1.69.0/boost/interprocess/containers/containers_fwd.hpp
index 9620a92ee92..9620a92ee92 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/containers/containers_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/containers/containers_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/containers/string.hpp b/src/third_party/boost-1.69.0/boost/interprocess/containers/string.hpp
index bd1286411a8..bd1286411a8 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/containers/string.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/containers/string.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/containers/vector.hpp b/src/third_party/boost-1.69.0/boost/interprocess/containers/vector.hpp
index 89b3e471499..89b3e471499 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/containers/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/containers/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/containers/version_type.hpp b/src/third_party/boost-1.69.0/boost/interprocess/containers/version_type.hpp
index 68850729923..68850729923 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/containers/version_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/containers/version_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/creation_tags.hpp b/src/third_party/boost-1.69.0/boost/interprocess/creation_tags.hpp
index faf4e6f2d6b..faf4e6f2d6b 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/creation_tags.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/creation_tags.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/atomic.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/atomic.hpp
index 041076cd652..041076cd652 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/atomic.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/atomic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/cast_tags.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/cast_tags.hpp
index e47b86344cc..e47b86344cc 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/cast_tags.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/cast_tags.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/config_begin.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/config_begin.hpp
index d003ccd3144..d003ccd3144 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/config_begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/config_begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/config_end.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/config_end.hpp
index 55bccd1bf16..55bccd1bf16 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/config_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/config_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/config_external_begin.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_begin.hpp
index fb578ef013a..fb578ef013a 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/config_external_begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/config_external_end.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_end.hpp
index 214558f58c8..214558f58c8 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/config_external_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/config_external_end.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/file_wrapper.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/file_wrapper.hpp
new file mode 100644
index 00000000000..99e0fea570a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/file_wrapper.hpp
@@ -0,0 +1,213 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2006-2012. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTERPROCESS_DETAIL_FILE_WRAPPER_HPP
+#define BOOST_INTERPROCESS_DETAIL_FILE_WRAPPER_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/interprocess/detail/config_begin.hpp>
+#include <boost/interprocess/detail/workaround.hpp>
+#include <boost/interprocess/detail/os_file_functions.hpp>
+#include <boost/interprocess/creation_tags.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/interprocess/creation_tags.hpp>
+#include <boost/interprocess/detail/simple_swap.hpp>
+
+namespace boost {
+namespace interprocess {
+namespace ipcdetail{
+
+class file_wrapper
+{
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(file_wrapper)
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+ public:
+
+ //!Default constructor.
+ //!Represents an empty file_wrapper.
+ file_wrapper();
+
+ //!Creates a file object with name "name" and mode "mode", with the access mode "mode"
+ //!If the file previously exists, throws an error.
+ file_wrapper(create_only_t, const char *name, mode_t mode, const permissions &perm = permissions())
+ { this->priv_open_or_create(ipcdetail::DoCreate, name, mode, perm); }
+
+ //!Tries to create a file with name "name" and mode "mode", with the
+ //!access mode "mode". If the file previously exists, it tries to open it with mode "mode".
+ //!Otherwise throws an error.
+ file_wrapper(open_or_create_t, const char *name, mode_t mode, const permissions &perm = permissions())
+ { this->priv_open_or_create(ipcdetail::DoOpenOrCreate, name, mode, perm); }
+
+ //!Tries to open a file with name "name", with the access mode "mode".
+ //!If the file does not previously exist, it throws an error.
+ file_wrapper(open_only_t, const char *name, mode_t mode)
+ { this->priv_open_or_create(ipcdetail::DoOpen, name, mode, permissions()); }
+
+ //!Moves the ownership of "moved"'s file to *this.
+ //!After the call, "moved" does not represent any file.
+ //!Does not throw
+ file_wrapper(BOOST_RV_REF(file_wrapper) moved)
+ : m_handle(file_handle_t(ipcdetail::invalid_file()))
+ { this->swap(moved); }
+
+ //!Moves the ownership of "moved"'s file to *this.
+ //!After the call, "moved" does not represent any file.
+ //!Does not throw
+ file_wrapper &operator=(BOOST_RV_REF(file_wrapper) moved)
+ {
+ file_wrapper tmp(boost::move(moved));
+ this->swap(tmp);
+ return *this;
+ }
+
+ //!Swaps to file_wrappers.
+ //!Does not throw
+ void swap(file_wrapper &other);
+
+ //!Erases a file from the system.
+ //!Returns false on error. Never throws
+ static bool remove(const char *name);
+
+ //!Sets the size of the file
+ void truncate(offset_t length);
+
+ //!Closes the
+ //!file
+ ~file_wrapper();
+
+ //!Returns the name of the file
+ //!used in the constructor
+ const char *get_name() const;
+
+ //!Returns the name of the file
+ //!used in the constructor
+ bool get_size(offset_t &size) const;
+
+ //!Returns access mode
+ //!used in the constructor
+ mode_t get_mode() const;
+
+ //!Get mapping handle
+ //!to use with mapped_region
+ mapping_handle_t get_mapping_handle() const;
+
+ private:
+ //!Closes a previously opened file mapping. Never throws.
+ void priv_close();
+ //!Closes a previously opened file mapping. Never throws.
+ bool priv_open_or_create(ipcdetail::create_enum_t type, const char *filename, mode_t mode, const permissions &perm);
+
+ file_handle_t m_handle;
+ mode_t m_mode;
+ std::string m_filename;
+};
+
+inline file_wrapper::file_wrapper()
+ : m_handle(file_handle_t(ipcdetail::invalid_file()))
+ , m_mode(read_only), m_filename()
+{}
+
+inline file_wrapper::~file_wrapper()
+{ this->priv_close(); }
+
+inline const char *file_wrapper::get_name() const
+{ return m_filename.c_str(); }
+
+inline bool file_wrapper::get_size(offset_t &size) const
+{ return get_file_size((file_handle_t)m_handle, size); }
+
+inline void file_wrapper::swap(file_wrapper &other)
+{
+ (simple_swap)(m_handle, other.m_handle);
+ (simple_swap)(m_mode, other.m_mode);
+ m_filename.swap(other.m_filename);
+}
+
+inline mapping_handle_t file_wrapper::get_mapping_handle() const
+{ return mapping_handle_from_file_handle(m_handle); }
+
+inline mode_t file_wrapper::get_mode() const
+{ return m_mode; }
+
+inline bool file_wrapper::priv_open_or_create
+ (ipcdetail::create_enum_t type,
+ const char *filename,
+ mode_t mode,
+ const permissions &perm = permissions())
+{
+ m_filename = filename;
+
+ if(mode != read_only && mode != read_write){
+ error_info err(mode_error);
+ throw interprocess_exception(err);
+ }
+
+ //Open file existing native API to obtain the handle
+ switch(type){
+ case ipcdetail::DoOpen:
+ m_handle = open_existing_file(filename, mode);
+ break;
+ case ipcdetail::DoCreate:
+ m_handle = create_new_file(filename, mode, perm);
+ break;
+ case ipcdetail::DoOpenOrCreate:
+ m_handle = create_or_open_file(filename, mode, perm);
+ break;
+ default:
+ {
+ error_info err = other_error;
+ throw interprocess_exception(err);
+ }
+ }
+
+ //Check for error
+ if(m_handle == invalid_file()){
+ error_info err = system_error_code();
+ throw interprocess_exception(err);
+ }
+
+ m_mode = mode;
+ return true;
+}
+
+inline bool file_wrapper::remove(const char *filename)
+{ return delete_file(filename); }
+
+inline void file_wrapper::truncate(offset_t length)
+{
+ if(!truncate_file(m_handle, length)){
+ error_info err(system_error_code());
+ throw interprocess_exception(err);
+ }
+}
+
+inline void file_wrapper::priv_close()
+{
+ if(m_handle != invalid_file()){
+ close_file(m_handle);
+ m_handle = invalid_file();
+ }
+}
+
+} //namespace ipcdetail{
+} //namespace interprocess {
+} //namespace boost {
+
+#include <boost/interprocess/detail/config_end.hpp>
+
+#endif //BOOST_INTERPROCESS_DETAIL_FILE_WRAPPER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/in_place_interface.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/in_place_interface.hpp
index 367f9dca3dd..367f9dca3dd 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/in_place_interface.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/in_place_interface.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/intermodule_singleton_common.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/intermodule_singleton_common.hpp
index 392db1f86b7..392db1f86b7 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/intermodule_singleton_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/intermodule_singleton_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/interprocess_tester.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/interprocess_tester.hpp
index 368820f82a3..368820f82a3 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/interprocess_tester.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/interprocess_tester.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/managed_memory_impl.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/managed_memory_impl.hpp
index 939dc6a9717..939dc6a9717 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/managed_memory_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/managed_memory_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/managed_open_or_create_impl.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/managed_open_or_create_impl.hpp
index b47c310f48a..b47c310f48a 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/managed_open_or_create_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/managed_open_or_create_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/math_functions.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/math_functions.hpp
index a19efac1a42..a19efac1a42 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/math_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/math_functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/min_max.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/min_max.hpp
index 2097ff42460..2097ff42460 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/min_max.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/min_max.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/mpl.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/mpl.hpp
index 3dd8d63e179..3dd8d63e179 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/mpl.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/mpl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/named_proxy.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/named_proxy.hpp
index f3eb61d3981..f3eb61d3981 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/named_proxy.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/named_proxy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/nothrow.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/nothrow.hpp
index d79ba7647ec..d79ba7647ec 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/nothrow.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/nothrow.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/os_file_functions.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/os_file_functions.hpp
index 7a41868188c..7a41868188c 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/os_file_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/os_file_functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/os_thread_functions.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/os_thread_functions.hpp
index 1c48ecf58b7..1c48ecf58b7 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/os_thread_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/os_thread_functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/posix_time_types_wrk.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/posix_time_types_wrk.hpp
index 5a12d83d76a..5a12d83d76a 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/posix_time_types_wrk.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/posix_time_types_wrk.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/segment_manager_helper.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/segment_manager_helper.hpp
index 96ccf227fe1..96ccf227fe1 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/segment_manager_helper.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/segment_manager_helper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/shared_dir_helpers.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/shared_dir_helpers.hpp
index 0fcd898dcb9..0fcd898dcb9 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/shared_dir_helpers.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/shared_dir_helpers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/simple_swap.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/simple_swap.hpp
index 797a997075b..797a997075b 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/simple_swap.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/simple_swap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/std_fwd.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/std_fwd.hpp
index 282771c3e61..282771c3e61 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/std_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/std_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/transform_iterator.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/transform_iterator.hpp
index d409b523622..d409b523622 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/transform_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/transform_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/type_traits.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/type_traits.hpp
index 5765c888e7c..5765c888e7c 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/type_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/type_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/utilities.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/utilities.hpp
index c1b23423c22..c1b23423c22 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/utilities.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/utilities.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/variadic_templates_tools.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/variadic_templates_tools.hpp
index 936f702bc26..936f702bc26 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/variadic_templates_tools.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/variadic_templates_tools.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/detail/win32_api.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/win32_api.hpp
new file mode 100644
index 00000000000..bf0c6831855
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/win32_api.hpp
@@ -0,0 +1,2474 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTERPROCESS_WIN32_API_HPP
+#define BOOST_INTERPROCESS_WIN32_API_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/interprocess/detail/config_begin.hpp>
+#include <boost/interprocess/detail/workaround.hpp>
+#include <boost/date_time/filetime_functions.hpp>
+#include <cstddef>
+#include <cstring>
+#include <cstdlib>
+#include <cstdio>
+
+#include <boost/assert.hpp>
+#include <string>
+#include <vector>
+
+//#define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
+//#define BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED
+//#define BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
+
+#ifdef BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
+# define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME_VALUE 1
+#else
+# define BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME_VALUE 0
+#endif
+
+#ifdef BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED
+# define BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED_VALUE 1
+#else
+# define BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED_VALUE 0
+#endif
+
+#ifdef BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
+# define BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED_VALUE 1
+#else
+# define BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED_VALUE 0
+#endif
+
+#define BOOST_INTERPROCESS_BOOTSTAMP_VALUE_SUM \
+ (BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED_VALUE + \
+ BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED_VALUE + \
+ BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME_VALUE)
+
+#if 1 < BOOST_INTERPROCESS_BOOTSTAMP_VALUE_SUM
+# error "Only one of BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME, \
+ BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED and \
+ BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED can be defined"
+#endif
+
+#if 0 == BOOST_INTERPROCESS_BOOTSTAMP_VALUE_SUM
+# define BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED
+#endif
+
+#ifdef BOOST_USE_WINDOWS_H
+#include <windows.h>
+# if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME)
+# include <wbemidl.h>
+# include <objbase.h>
+# endif
+
+#include <shlobj.h>
+#endif
+
+#if defined(_MSC_VER)
+# pragma once
+# pragma comment( lib, "Advapi32.lib" )
+# pragma comment( lib, "oleaut32.lib" )
+# pragma comment( lib, "Ole32.lib" )
+# pragma comment( lib, "Shell32.lib" ) //SHGetFolderPath
+#endif
+
+#if defined (BOOST_INTERPROCESS_WINDOWS)
+# include <cstdarg>
+# include <boost/detail/interlocked.hpp>
+#else
+# error "This file can only be included in Windows OS"
+#endif
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Declaration of Windows structures or typedefs if BOOST_USE_WINDOWS_H is used
+//
+//////////////////////////////////////////////////////////////////////////////
+
+
+#if defined(BOOST_GCC)
+//Ignore -pedantic errors here (anonymous structs, etc.)
+# if (BOOST_GCC >= 40600)
+# pragma GCC diagnostic push
+# if (BOOST_GCC >= 40800)
+# pragma GCC diagnostic ignored "-Wpedantic"
+# else
+# pragma GCC diagnostic ignored "-pedantic"
+# endif
+# pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
+# else
+# pragma GCC system_header
+# endif
+//When loading DLLs we have no option but reinterpret casting function types
+# if (BOOST_GCC >= 80000)
+# pragma GCC diagnostic ignored "-Wcast-function-type"
+# endif
+#endif
+
+namespace boost {
+namespace interprocess {
+namespace winapi {
+
+//Own defines
+static const unsigned long MaxPath = 260;
+
+#ifndef BOOST_USE_WINDOWS_H
+
+struct GUID_BIPC
+{
+ unsigned long Data1;
+ unsigned short Data2;
+ unsigned short Data3;
+ unsigned char Data4[8];
+};
+
+#if defined(_MSC_VER)
+#pragma warning (push)
+#pragma warning (disable : 4201) // nonstandard extension used
+#endif
+
+struct decimal
+{
+ unsigned short wReserved;
+ union {
+ struct {
+ unsigned char scale;
+ unsigned char sign;
+ };
+ unsigned short signscale;
+ };
+ unsigned long Hi32;
+ union {
+ struct {
+ unsigned long Lo32;
+ unsigned long Mid32;
+ };
+ ::boost::ulong_long_type Lo64;
+ };
+};
+
+typedef unsigned short *bstr;
+
+
+struct wchar_variant
+{
+ union
+ {
+ struct
+ {
+ unsigned short vt;
+ unsigned short wReserved1;
+ unsigned short wReserved2;
+ unsigned short wReserved3;
+ union
+ {
+ bstr bstrVal;
+ struct
+ {
+ void* pvRecord;
+ void* pRecInfo;
+ };
+ };
+ };
+ decimal decVal;
+ };
+};
+
+#if defined(_MSC_VER)
+#pragma warning (pop)
+#endif
+
+struct IUnknown_BIPC
+{
+ public:
+ virtual long __stdcall QueryInterface(
+ const GUID_BIPC &riid, // [in]
+ void **ppvObject) = 0; // [iid_is][out]
+
+ virtual unsigned long __stdcall AddRef (void) = 0;
+ virtual unsigned long __stdcall Release(void) = 0;
+};
+
+struct IWbemClassObject_BIPC : public IUnknown_BIPC
+{
+ public:
+ virtual long __stdcall GetQualifierSet(
+ /* [out] */ void **ppQualSet) = 0;
+
+ virtual long __stdcall Get(
+ /* [string][in] */ const bstr wszName,
+ /* [in] */ long lFlags,
+ /* [unique][in][out] */ wchar_variant *pVal,
+ /* [unique][in][out] */ long *pType,
+ /* [unique][in][out] */ long *plFlavor) = 0;
+
+ virtual long __stdcall Put(
+ /* [string][in] */ const bstr wszName,
+ /* [in] */ long lFlags,
+ /* [in] */ wchar_variant *pVal,
+ /* [in] */ long Type) = 0;
+
+ virtual long __stdcall Delete(
+ /* [string][in] */ const bstr wszName) = 0;
+
+ virtual long __stdcall GetNames(
+ /* [string][in] */ const bstr wszQualifierName,
+ /* [in] */ long lFlags,
+ /* [in] */ wchar_variant *pQualifierVal,
+ /* [out] */ void * *pNames) = 0;
+
+ virtual long __stdcall BeginEnumeration(
+ /* [in] */ long lEnumFlags) = 0;
+
+ virtual long __stdcall Next(
+ /* [in] */ long lFlags,
+ /* [unique][in][out] */ bstr *strName,
+ /* [unique][in][out] */ wchar_variant *pVal,
+ /* [unique][in][out] */ long *pType,
+ /* [unique][in][out] */ long *plFlavor) = 0;
+
+ virtual long __stdcall EndEnumeration( void) = 0;
+
+ virtual long __stdcall GetPropertyQualifierSet(
+ /* [string][in] */ const bstr wszProperty,
+ /* [out] */ void **ppQualSet) = 0;
+
+ virtual long __stdcall Clone(
+ /* [out] */ IWbemClassObject_BIPC **ppCopy) = 0;
+
+ virtual long __stdcall GetObjectText(
+ /* [in] */ long lFlags,
+ /* [out] */ bstr *pstrObjectText) = 0;
+
+ virtual long __stdcall SpawnDerivedClass(
+ /* [in] */ long lFlags,
+ /* [out] */ IWbemClassObject_BIPC **ppNewClass) = 0;
+
+ virtual long __stdcall SpawnInstance(
+ /* [in] */ long lFlags,
+ /* [out] */ IWbemClassObject_BIPC **ppNewInstance) = 0;
+
+ virtual long __stdcall CompareTo(
+ /* [in] */ long lFlags,
+ /* [in] */ IWbemClassObject_BIPC *pCompareTo) = 0;
+
+ virtual long __stdcall GetPropertyOrigin(
+ /* [string][in] */ const bstr wszName,
+ /* [out] */ bstr *pstrClassName) = 0;
+
+ virtual long __stdcall InheritsFrom(
+ /* [in] */ const bstr strAncestor) = 0;
+
+ virtual long __stdcall GetMethod(
+ /* [string][in] */ const bstr wszName,
+ /* [in] */ long lFlags,
+ /* [out] */ IWbemClassObject_BIPC **ppInSignature,
+ /* [out] */ IWbemClassObject_BIPC **ppOutSignature) = 0;
+
+ virtual long __stdcall PutMethod(
+ /* [string][in] */ const bstr wszName,
+ /* [in] */ long lFlags,
+ /* [in] */ IWbemClassObject_BIPC *pInSignature,
+ /* [in] */ IWbemClassObject_BIPC *pOutSignature) = 0;
+
+ virtual long __stdcall DeleteMethod(
+ /* [string][in] */ const bstr wszName) = 0;
+
+ virtual long __stdcall BeginMethodEnumeration(
+ /* [in] */ long lEnumFlags) = 0;
+
+ virtual long __stdcall NextMethod(
+ /* [in] */ long lFlags,
+ /* [unique][in][out] */ bstr *pstrName,
+ /* [unique][in][out] */ IWbemClassObject_BIPC **ppInSignature,
+ /* [unique][in][out] */ IWbemClassObject_BIPC **ppOutSignature) = 0;
+
+ virtual long __stdcall EndMethodEnumeration( void) = 0;
+
+ virtual long __stdcall GetMethodQualifierSet(
+ /* [string][in] */ const bstr wszMethod,
+ /* [out] */ void **ppQualSet) = 0;
+
+ virtual long __stdcall GetMethodOrigin(
+ /* [string][in] */ const bstr wszMethodName,
+ /* [out] */ bstr *pstrClassName) = 0;
+
+};
+
+struct IWbemContext_BIPC : public IUnknown_BIPC
+{
+public:
+ virtual long __stdcall Clone(
+ /* [out] */ IWbemContext_BIPC **ppNewCopy) = 0;
+
+ virtual long __stdcall GetNames(
+ /* [in] */ long lFlags,
+ /* [out] */ void * *pNames) = 0;
+
+ virtual long __stdcall BeginEnumeration(
+ /* [in] */ long lFlags) = 0;
+
+ virtual long __stdcall Next(
+ /* [in] */ long lFlags,
+ /* [out] */ bstr *pstrName,
+ /* [out] */ wchar_variant *pValue) = 0;
+
+ virtual long __stdcall EndEnumeration( void) = 0;
+
+ virtual long __stdcall SetValue(
+ /* [string][in] */ const bstr wszName,
+ /* [in] */ long lFlags,
+ /* [in] */ wchar_variant *pValue) = 0;
+
+ virtual long __stdcall GetValue(
+ /* [string][in] */ const bstr wszName,
+ /* [in] */ long lFlags,
+ /* [out] */ wchar_variant *pValue) = 0;
+
+ virtual long __stdcall DeleteValue(
+ /* [string][in] */ const bstr wszName,
+ /* [in] */ long lFlags) = 0;
+
+ virtual long __stdcall DeleteAll( void) = 0;
+
+};
+
+
+struct IEnumWbemClassObject_BIPC : public IUnknown_BIPC
+{
+public:
+ virtual long __stdcall Reset( void) = 0;
+
+ virtual long __stdcall Next(
+ /* [in] */ long lTimeout,
+ /* [in] */ unsigned long uCount,
+ /* [length_is][size_is][out] */ IWbemClassObject_BIPC **apObjects,
+ /* [out] */ unsigned long *puReturned) = 0;
+
+ virtual long __stdcall NextAsync(
+ /* [in] */ unsigned long uCount,
+ /* [in] */ void *pSink) = 0;
+
+ virtual long __stdcall Clone(
+ /* [out] */ void **ppEnum) = 0;
+
+ virtual long __stdcall Skip(
+ /* [in] */ long lTimeout,
+ /* [in] */ unsigned long nCount) = 0;
+
+};
+
+struct IWbemServices_BIPC : public IUnknown_BIPC
+{
+public:
+ virtual long __stdcall OpenNamespace(
+ /* [in] */ const bstr strNamespace,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [unique][in][out] */ void **ppWorkingNamespace,
+ /* [unique][in][out] */ void **ppResult) = 0;
+
+ virtual long __stdcall CancelAsyncCall(
+ /* [in] */ void *pSink) = 0;
+
+ virtual long __stdcall QueryObjectSink(
+ /* [in] */ long lFlags,
+ /* [out] */ void **ppResponseHandler) = 0;
+
+ virtual long __stdcall GetObject(
+ /* [in] */ const bstr strObjectPath,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [unique][in][out] */ void **ppObject,
+ /* [unique][in][out] */ void **ppCallResult) = 0;
+
+ virtual long __stdcall GetObjectAsync(
+ /* [in] */ const bstr strObjectPath,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall PutClass(
+ /* [in] */ IWbemClassObject_BIPC *pObject,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [unique][in][out] */ void **ppCallResult) = 0;
+
+ virtual long __stdcall PutClassAsync(
+ /* [in] */ IWbemClassObject_BIPC *pObject,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall DeleteClass(
+ /* [in] */ const bstr strClass,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [unique][in][out] */ void **ppCallResult) = 0;
+
+ virtual long __stdcall DeleteClassAsync(
+ /* [in] */ const bstr strClass,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall CreateClassEnum(
+ /* [in] */ const bstr strSuperclass,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [out] */ void **ppEnum) = 0;
+
+ virtual long __stdcall CreateClassEnumAsync(
+ /* [in] */ const bstr strSuperclass,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall PutInstance(
+ /* [in] */ void *pInst,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [unique][in][out] */ void **ppCallResult) = 0;
+
+ virtual long __stdcall PutInstanceAsync(
+ /* [in] */ void *pInst,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall DeleteInstance(
+ /* [in] */ const bstr strObjectPath,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [unique][in][out] */ void **ppCallResult) = 0;
+
+ virtual long __stdcall DeleteInstanceAsync(
+ /* [in] */ const bstr strObjectPath,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall CreateInstanceEnum(
+ /* [in] */ const bstr strFilter,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [out] */ void **ppEnum) = 0;
+
+ virtual long __stdcall CreateInstanceEnumAsync(
+ /* [in] */ const bstr strFilter,
+ /* [in] */ long lFlags,
+ /* [in] */ void *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall ExecQuery(
+ /* [in] */ const bstr strQueryLanguage,
+ /* [in] */ const bstr strQuery,
+ /* [in] */ long lFlags,
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [out] */ IEnumWbemClassObject_BIPC **ppEnum) = 0;
+
+ virtual long __stdcall ExecQueryAsync(
+ /* [in] */ const bstr strQueryLanguage,
+ /* [in] */ const bstr strQuery,
+ /* [in] */ long lFlags,
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall ExecNotificationQuery(
+ /* [in] */ const bstr strQueryLanguage,
+ /* [in] */ const bstr strQuery,
+ /* [in] */ long lFlags,
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [out] */ void **ppEnum) = 0;
+
+ virtual long __stdcall ExecNotificationQueryAsync(
+ /* [in] */ const bstr strQueryLanguage,
+ /* [in] */ const bstr strQuery,
+ /* [in] */ long lFlags,
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [in] */ void *pResponseHandler) = 0;
+
+ virtual long __stdcall ExecMethod(
+ /* [in] */ const bstr strObjectPath,
+ /* [in] */ const bstr strMethodName,
+ /* [in] */ long lFlags,
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [in] */ IWbemClassObject_BIPC *pInParams,
+ /* [unique][in][out] */ IWbemClassObject_BIPC **ppOutParams,
+ /* [unique][in][out] */ void **ppCallResult) = 0;
+
+ virtual long __stdcall ExecMethodAsync(
+ /* [in] */ const bstr strObjectPath,
+ /* [in] */ const bstr strMethodName,
+ /* [in] */ long lFlags,
+ /* [in] */ IWbemContext_BIPC *pCtx,
+ /* [in] */ IWbemClassObject_BIPC *pInParams,
+ /* [in] */ void *pResponseHandler) = 0;
+
+};
+
+struct IWbemLocator_BIPC : public IUnknown_BIPC
+{
+public:
+ virtual long __stdcall ConnectServer(
+ /* [in] */ const bstr strNetworkResource,
+ /* [in] */ const bstr strUser,
+ /* [in] */ const bstr strPassword,
+ /* [in] */ const bstr strLocale,
+ /* [in] */ long lSecurityFlags,
+ /* [in] */ const bstr strAuthority,
+ /* [in] */ void *pCtx,
+ /* [out] */ IWbemServices_BIPC **ppNamespace) = 0;
+
+};
+
+struct interprocess_overlapped
+{
+ unsigned long *internal;
+ unsigned long *internal_high;
+ union {
+ struct {
+ unsigned long offset;
+ unsigned long offset_high;
+ }dummy;
+ void *pointer;
+ };
+
+ void *h_event;
+};
+
+
+struct interprocess_filetime
+{
+ unsigned long dwLowDateTime;
+ unsigned long dwHighDateTime;
+};
+
+struct win32_find_data
+{
+ unsigned long dwFileAttributes;
+ interprocess_filetime ftCreationTime;
+ interprocess_filetime ftLastAccessTime;
+ interprocess_filetime ftLastWriteTime;
+ unsigned long nFileSizeHigh;
+ unsigned long nFileSizeLow;
+ unsigned long dwReserved0;
+ unsigned long dwReserved1;
+ char cFileName[MaxPath];
+ char cAlternateFileName[14];
+};
+
+struct interprocess_security_attributes
+{
+ unsigned long nLength;
+ void *lpSecurityDescriptor;
+ int bInheritHandle;
+};
+
+struct system_info {
+ union {
+ unsigned long dwOemId; // Obsolete field...do not use
+ struct {
+ unsigned short wProcessorArchitecture;
+ unsigned short wReserved;
+ } dummy;
+ };
+ unsigned long dwPageSize;
+ void * lpMinimumApplicationAddress;
+ void * lpMaximumApplicationAddress;
+ unsigned long * dwActiveProcessorMask;
+ unsigned long dwNumberOfProcessors;
+ unsigned long dwProcessorType;
+ unsigned long dwAllocationGranularity;
+ unsigned short wProcessorLevel;
+ unsigned short wProcessorRevision;
+};
+
+struct interprocess_acl
+{
+ unsigned char AclRevision;
+ unsigned char Sbz1;
+ unsigned short AclSize;
+ unsigned short AceCount;
+ unsigned short Sbz2;
+};
+
+struct interprocess_security_descriptor
+{
+ unsigned char Revision;
+ unsigned char Sbz1;
+ unsigned short Control;
+ void *Owner;
+ void *Group;
+ interprocess_acl *Sacl;
+ interprocess_acl *Dacl;
+};
+
+struct interprocess_by_handle_file_information
+{
+ unsigned long dwFileAttributes;
+ interprocess_filetime ftCreationTime;
+ interprocess_filetime ftLastAccessTime;
+ interprocess_filetime ftLastWriteTime;
+ unsigned long dwVolumeSerialNumber;
+ unsigned long nFileSizeHigh;
+ unsigned long nFileSizeLow;
+ unsigned long nNumberOfLinks;
+ unsigned long nFileIndexHigh;
+ unsigned long nFileIndexLow;
+};
+
+struct interprocess_eventlogrecord
+{
+ unsigned long Length; // Length of full record
+ unsigned long Reserved; // Used by the service
+ unsigned long RecordNumber; // Absolute record number
+ unsigned long TimeGenerated; // Seconds since 1-1-1970
+ unsigned long TimeWritten; // Seconds since 1-1-1970
+ unsigned long EventID;
+ unsigned short EventType;
+ unsigned short NumStrings;
+ unsigned short EventCategory;
+ unsigned short ReservedFlags; // For use with paired events (auditing)
+ unsigned long ClosingRecordNumber; // For use with paired events (auditing)
+ unsigned long StringOffset; // Offset from beginning of record
+ unsigned long UserSidLength;
+ unsigned long UserSidOffset;
+ unsigned long DataLength;
+ unsigned long DataOffset; // Offset from beginning of record
+ //
+ // Then follow:
+ //
+ // wchar_t SourceName[]
+ // wchar_t Computername[]
+ // SID UserSid
+ // wchar_t Strings[]
+ // BYTE Data[]
+ // CHAR Pad[]
+ // unsigned long Length;
+ //
+};
+
+union large_integer
+{
+ __int64 QuadPart;
+};
+
+struct hinstance_struct { int unused; };
+typedef hinstance_struct *hmodule;
+
+struct hkey_struct;
+typedef hkey_struct *hkey;
+
+#ifdef _WIN64
+typedef __int64 (__stdcall *farproc_t)();
+#else
+typedef int (__stdcall *farproc_t)();
+#endif // _WIN64
+
+#else //#ifndef BOOST_USE_WINDOWS_H
+
+typedef GUID GUID_BIPC;
+typedef VARIANT wchar_variant;
+
+#if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME)
+
+typedef IUnknown IUnknown_BIPC;
+
+typedef IWbemClassObject IWbemClassObject_BIPC;
+
+typedef IWbemContext IWbemContext_BIPC;
+
+typedef IEnumWbemClassObject IEnumWbemClassObject_BIPC;
+
+typedef IWbemServices IWbemServices_BIPC;
+
+typedef IWbemLocator IWbemLocator_BIPC;
+
+#endif
+
+typedef OVERLAPPED interprocess_overlapped;
+
+typedef FILETIME interprocess_filetime;
+
+typedef WIN32_FIND_DATAA win32_find_data;
+
+typedef SECURITY_ATTRIBUTES interprocess_security_attributes;
+
+typedef SYSTEM_INFO system_info;
+
+typedef ACL interprocess_acl;
+
+typedef SECURITY_DESCRIPTOR interprocess_security_descriptor;
+
+typedef BY_HANDLE_FILE_INFORMATION interprocess_by_handle_file_information;
+
+typedef EVENTLOGRECORD interprocess_eventlogrecord;
+
+typedef LARGE_INTEGER large_integer;
+
+typedef HMODULE hmodule;
+
+typedef HKEY hkey;
+
+typedef BSTR bstr;
+
+typedef FARPROC farproc_t;
+
+#endif //#ifndef BOOST_USE_WINDOWS_H
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Nt native structures
+//
+//////////////////////////////////////////////////////////////////////////////
+
+struct interprocess_semaphore_basic_information
+{
+ unsigned int count; // current semaphore count
+ unsigned int limit; // max semaphore count
+};
+
+struct interprocess_section_basic_information
+{
+ void * base_address;
+ unsigned long section_attributes;
+ __int64 section_size;
+};
+
+struct file_rename_information_t {
+ int Replace;
+ void *RootDir;
+ unsigned long FileNameLength;
+ wchar_t FileName[1];
+};
+
+struct unicode_string_t {
+ unsigned short Length;
+ unsigned short MaximumLength;
+ wchar_t *Buffer;
+};
+
+struct object_attributes_t {
+ unsigned long Length;
+ void * RootDirectory;
+ unicode_string_t *ObjectName;
+ unsigned long Attributes;
+ void *SecurityDescriptor;
+ void *SecurityQualityOfService;
+};
+
+struct io_status_block_t {
+ union {
+ long Status;
+ void *Pointer;
+ };
+
+ unsigned long *Information;
+};
+
+union system_timeofday_information
+{
+ struct data_t
+ {
+ __int64 liKeBootTime;
+ __int64 liKeSystemTime;
+ __int64 liExpTimeZoneBias;
+ unsigned long uCurrentTimeZoneId;
+ unsigned long dwReserved;
+ ::boost::ulong_long_type ullBootTimeBias;
+ ::boost::ulong_long_type ullSleepTimeBias;
+ } data;
+ unsigned char Reserved1[sizeof(data_t)];
+};
+
+static const long BootstampLength = sizeof(__int64);
+static const long BootAndSystemstampLength = sizeof(__int64)*2;
+static const long SystemTimeOfDayInfoLength = sizeof(system_timeofday_information::data_t);
+
+struct object_name_information_t
+{
+ unicode_string_t Name;
+ wchar_t NameBuffer[1];
+};
+
+enum file_information_class_t {
+ file_directory_information = 1,
+ file_full_directory_information,
+ file_both_directory_information,
+ file_basic_information,
+ file_standard_information,
+ file_internal_information,
+ file_ea_information,
+ file_access_information,
+ file_name_information,
+ file_rename_information,
+ file_link_information,
+ file_names_information,
+ file_disposition_information,
+ file_position_information,
+ file_full_ea_information,
+ file_mode_information,
+ file_alignment_information,
+ file_all_information,
+ file_allocation_information,
+ file_end_of_file_information,
+ file_alternate_name_information,
+ file_stream_information,
+ file_pipe_information,
+ file_pipe_local_information,
+ file_pipe_remote_information,
+ file_mailslot_query_information,
+ file_mailslot_set_information,
+ file_compression_information,
+ file_copy_on_write_information,
+ file_completion_information,
+ file_move_cluster_information,
+ file_quota_information,
+ file_reparse_point_information,
+ file_network_open_information,
+ file_object_id_information,
+ file_tracking_information,
+ file_ole_directory_information,
+ file_content_index_information,
+ file_inherit_content_index_information,
+ file_ole_information,
+ file_maximum_information
+};
+
+enum semaphore_information_class {
+ semaphore_basic_information = 0
+};
+
+
+enum system_information_class {
+ system_basic_information = 0,
+ system_performance_information = 2,
+ system_time_of_day_information = 3,
+ system_process_information = 5,
+ system_processor_performance_information = 8,
+ system_interrupt_information = 23,
+ system_exception_information = 33,
+ system_registry_quota_information = 37,
+ system_lookaside_information = 45
+};
+
+enum object_information_class
+{
+ object_basic_information,
+ object_name_information,
+ object_type_information,
+ object_all_information,
+ object_data_information
+};
+
+enum section_information_class
+{
+ section_basic_information,
+ section_image_information
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Forward declaration of winapi
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_USE_WINDOWS_H
+
+//Kernel32.dll
+
+//Some windows API declarations
+extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentProcessId();
+extern "C" __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId();
+extern "C" __declspec(dllimport) int __stdcall GetProcessTimes
+ ( void *hProcess, interprocess_filetime* lpCreationTime
+ , interprocess_filetime *lpExitTime,interprocess_filetime *lpKernelTime
+ , interprocess_filetime *lpUserTime );
+extern "C" __declspec(dllimport) void __stdcall Sleep(unsigned long);
+extern "C" __declspec(dllimport) unsigned long __stdcall GetTickCount(void);
+extern "C" __declspec(dllimport) int __stdcall SwitchToThread();
+extern "C" __declspec(dllimport) unsigned long __stdcall GetLastError();
+extern "C" __declspec(dllimport) void __stdcall SetLastError(unsigned long);
+extern "C" __declspec(dllimport) void * __stdcall GetCurrentProcess();
+extern "C" __declspec(dllimport) int __stdcall CloseHandle(void*);
+extern "C" __declspec(dllimport) int __stdcall DuplicateHandle
+ ( void *hSourceProcessHandle, void *hSourceHandle
+ , void *hTargetProcessHandle, void **lpTargetHandle
+ , unsigned long dwDesiredAccess, int bInheritHandle
+ , unsigned long dwOptions);
+extern "C" __declspec(dllimport) long __stdcall GetFileType(void *hFile);
+extern "C" __declspec(dllimport) void *__stdcall FindFirstFileA(const char *lpFileName, win32_find_data *lpFindFileData);
+extern "C" __declspec(dllimport) int __stdcall FindNextFileA(void *hFindFile, win32_find_data *lpFindFileData);
+extern "C" __declspec(dllimport) int __stdcall FindClose(void *hFindFile);
+//extern "C" __declspec(dllimport) void __stdcall GetSystemTimeAsFileTime(interprocess_filetime*);
+//extern "C" __declspec(dllimport) int __stdcall FileTimeToLocalFileTime(const interprocess_filetime *in, const interprocess_filetime *out);
+extern "C" __declspec(dllimport) void * __stdcall CreateMutexA(interprocess_security_attributes*, int, const char *);
+extern "C" __declspec(dllimport) void * __stdcall OpenMutexA(unsigned long, int, const char *);
+extern "C" __declspec(dllimport) unsigned long __stdcall WaitForSingleObject(void *, unsigned long);
+extern "C" __declspec(dllimport) int __stdcall ReleaseMutex(void *);
+extern "C" __declspec(dllimport) int __stdcall UnmapViewOfFile(void *);
+extern "C" __declspec(dllimport) void * __stdcall CreateSemaphoreA(interprocess_security_attributes*, long, long, const char *);
+extern "C" __declspec(dllimport) int __stdcall ReleaseSemaphore(void *, long, long *);
+extern "C" __declspec(dllimport) void * __stdcall OpenSemaphoreA(unsigned long, int, const char *);
+extern "C" __declspec(dllimport) void * __stdcall CreateFileMappingA (void *, interprocess_security_attributes*, unsigned long, unsigned long, unsigned long, const char *);
+extern "C" __declspec(dllimport) void * __stdcall MapViewOfFileEx (void *, unsigned long, unsigned long, unsigned long, std::size_t, void*);
+extern "C" __declspec(dllimport) void * __stdcall OpenFileMappingA (unsigned long, int, const char *);
+extern "C" __declspec(dllimport) void * __stdcall CreateFileA (const char *, unsigned long, unsigned long, struct interprocess_security_attributes*, unsigned long, unsigned long, void *);
+extern "C" __declspec(dllimport) void __stdcall GetSystemInfo (struct system_info *);
+extern "C" __declspec(dllimport) int __stdcall FlushViewOfFile (void *, std::size_t);
+extern "C" __declspec(dllimport) int __stdcall VirtualUnlock (void *, std::size_t);
+extern "C" __declspec(dllimport) int __stdcall VirtualProtect (void *, std::size_t, unsigned long, unsigned long *);
+extern "C" __declspec(dllimport) int __stdcall FlushFileBuffers (void *);
+extern "C" __declspec(dllimport) int __stdcall GetFileSizeEx (void *, large_integer *size);
+extern "C" __declspec(dllimport) unsigned long __stdcall FormatMessageA
+ (unsigned long dwFlags, const void *lpSource, unsigned long dwMessageId,
+ unsigned long dwLanguageId, char *lpBuffer, unsigned long nSize,
+ std::va_list *Arguments);
+extern "C" __declspec(dllimport) void *__stdcall LocalFree (void *);
+extern "C" __declspec(dllimport) unsigned long __stdcall GetFileAttributesA(const char *);
+extern "C" __declspec(dllimport) int __stdcall CreateDirectoryA(const char *, interprocess_security_attributes*);
+extern "C" __declspec(dllimport) int __stdcall RemoveDirectoryA(const char *lpPathName);
+extern "C" __declspec(dllimport) int __stdcall GetTempPathA(unsigned long length, char *buffer);
+extern "C" __declspec(dllimport) int __stdcall CreateDirectory(const char *, interprocess_security_attributes*);
+extern "C" __declspec(dllimport) int __stdcall SetFileValidData(void *, __int64 size);
+extern "C" __declspec(dllimport) int __stdcall SetEndOfFile(void *);
+extern "C" __declspec(dllimport) int __stdcall SetFilePointerEx(void *, large_integer distance, large_integer *new_file_pointer, unsigned long move_method);
+extern "C" __declspec(dllimport) int __stdcall LockFile (void *hnd, unsigned long offset_low, unsigned long offset_high, unsigned long size_low, unsigned long size_high);
+extern "C" __declspec(dllimport) int __stdcall UnlockFile(void *hnd, unsigned long offset_low, unsigned long offset_high, unsigned long size_low, unsigned long size_high);
+extern "C" __declspec(dllimport) int __stdcall LockFileEx(void *hnd, unsigned long flags, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped* overlapped);
+extern "C" __declspec(dllimport) int __stdcall UnlockFileEx(void *hnd, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped* overlapped);
+extern "C" __declspec(dllimport) int __stdcall WriteFile(void *hnd, const void *buffer, unsigned long bytes_to_write, unsigned long *bytes_written, interprocess_overlapped* overlapped);
+extern "C" __declspec(dllimport) int __stdcall ReadFile(void *hnd, void *buffer, unsigned long bytes_to_read, unsigned long *bytes_read, interprocess_overlapped* overlapped);
+extern "C" __declspec(dllimport) int __stdcall InitializeSecurityDescriptor(interprocess_security_descriptor *pSecurityDescriptor, unsigned long dwRevision);
+extern "C" __declspec(dllimport) int __stdcall SetSecurityDescriptorDacl(interprocess_security_descriptor *pSecurityDescriptor, int bDaclPresent, interprocess_acl *pDacl, int bDaclDefaulted);
+extern "C" __declspec(dllimport) hmodule __stdcall LoadLibraryA(const char *);
+extern "C" __declspec(dllimport) int __stdcall FreeLibrary(hmodule);
+extern "C" __declspec(dllimport) farproc_t __stdcall GetProcAddress(void *, const char*);
+extern "C" __declspec(dllimport) hmodule __stdcall GetModuleHandleA(const char*);
+extern "C" __declspec(dllimport) void *__stdcall GetFileInformationByHandle(void *, interprocess_by_handle_file_information*);
+
+//Advapi32.dll
+extern "C" __declspec(dllimport) long __stdcall RegOpenKeyExA(hkey, const char *, unsigned long, unsigned long, hkey*);
+extern "C" __declspec(dllimport) long __stdcall RegQueryValueExA(hkey, const char *, unsigned long*, unsigned long*, unsigned char *, unsigned long*);
+extern "C" __declspec(dllimport) long __stdcall RegCloseKey(hkey);
+
+//Ole32.dll
+extern "C" __declspec(dllimport) long __stdcall CoInitializeEx(void *pvReserved, unsigned long dwCoInit);
+extern "C" __declspec(dllimport) long __stdcall CoInitializeSecurity(
+ void* pSecDesc,
+ long cAuthSvc,
+ void * asAuthSvc,
+ void *pReserved1,
+ unsigned long dwAuthnLevel,
+ unsigned long dwImpLevel,
+ void *pAuthList,
+ unsigned long dwCapabilities,
+ void *pReserved3 );
+
+ extern "C" __declspec(dllimport) long __stdcall CoSetProxyBlanket(
+ IUnknown_BIPC *pProxy,
+ unsigned long dwAuthnSvc,
+ unsigned long dwAuthzSvc,
+ wchar_t *pServerPrincName,
+ unsigned long dwAuthnLevel,
+ unsigned long dwImpLevel,
+ void *pAuthInfo,
+ unsigned long dwCapabilities);
+extern "C" __declspec(dllimport) long __stdcall CoCreateInstance(const GUID_BIPC & rclsid, IUnknown_BIPC *pUnkOuter,
+ unsigned long dwClsContext, const GUID_BIPC & riid, void** ppv);
+extern "C" __declspec(dllimport) void __stdcall CoUninitialize(void);
+
+//OleAut32.dll
+extern "C" __declspec(dllimport) long __stdcall VariantClear(wchar_variant * pvarg);
+
+//Shell32.dll
+extern "C" __declspec(dllimport) int __stdcall SHGetSpecialFolderPathA
+ (void* hwnd, const char *pszPath, int csidl, int fCreate);
+
+extern "C" __declspec(dllimport) int __stdcall SHGetFolderPathA(void *hwnd, int csidl, void *hToken, unsigned long dwFlags, const char *pszPath);
+
+//EventLog access functions
+
+extern "C" __declspec(dllimport) void* __stdcall OpenEventLogA
+ (const char* lpUNCServerName, const char* lpSourceName);
+
+extern "C" __declspec(dllimport) int __stdcall CloseEventLog(void *hEventLog);
+
+extern "C" __declspec(dllimport) int __stdcall ReadEventLogA
+ (void *hEventLog,
+ unsigned long dwReadFlags,
+ unsigned long dwRecordOffset,
+ void *lpBuffer,
+ unsigned long nNumberOfBytesToRead,
+ unsigned long *pnBytesRead,
+ unsigned long *pnMinNumberOfBytesNeeded
+ );
+
+#endif //#ifndef BOOST_USE_WINDOWS_H
+
+//kernel32.dll
+typedef int (__stdcall *QueryPerformanceCounter_t) (__int64 *lpPerformanceCount);
+typedef int (__stdcall *QueryPerformanceFrequency_t)(__int64 *lpFrequency);
+
+//ntdll.dll
+typedef long (__stdcall *NtDeleteFile_t)(object_attributes_t *ObjectAttributes);
+typedef long (__stdcall *NtSetInformationFile_t)(void *FileHandle, io_status_block_t *IoStatusBlock, void *FileInformation, unsigned long Length, int FileInformationClass );
+typedef long (__stdcall *NtOpenFile)(void **FileHandle, unsigned long DesiredAccess, object_attributes_t *ObjectAttributes
+ , io_status_block_t *IoStatusBlock, unsigned long ShareAccess, unsigned long Length, unsigned long OpenOptions);
+typedef long (__stdcall *NtQuerySystemInformation_t)(int, void*, unsigned long, unsigned long *);
+typedef long (__stdcall *NtQueryObject_t)(void*, object_information_class, void *, unsigned long, unsigned long *);
+typedef long (__stdcall *NtQuerySemaphore_t)(void*, unsigned int info_class, interprocess_semaphore_basic_information *pinfo, unsigned int info_size, unsigned int *ret_len);
+typedef long (__stdcall *NtQuerySection_t)(void*, section_information_class, interprocess_section_basic_information *pinfo, unsigned long info_size, unsigned long *ret_len);
+typedef long (__stdcall *NtQueryInformationFile_t)(void *,io_status_block_t *,void *, long, int);
+typedef long (__stdcall *NtOpenFile_t)(void*,unsigned long ,object_attributes_t*,io_status_block_t*,unsigned long,unsigned long);
+typedef long (__stdcall *NtClose_t) (void*);
+typedef long (__stdcall *NtQueryTimerResolution_t) (unsigned long* LowestResolution, unsigned long* HighestResolution, unsigned long* CurrentResolution);
+typedef long (__stdcall *NtSetTimerResolution_t) (unsigned long RequestedResolution, int Set, unsigned long* ActualResolution);
+
+} //namespace winapi {
+} //namespace interprocess {
+} //namespace boost {
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// Forward declaration of constants
+//
+//////////////////////////////////////////////////////////////////////////////
+
+namespace boost {
+namespace interprocess {
+namespace winapi {
+
+//Some used constants
+static const unsigned long infinite_time = 0xFFFFFFFF;
+static const unsigned long error_already_exists = 183L;
+static const unsigned long error_invalid_handle = 6L;
+static const unsigned long error_sharing_violation = 32L;
+static const unsigned long error_file_not_found = 2u;
+static const unsigned long error_no_more_files = 18u;
+static const unsigned long error_not_locked = 158L;
+//Retries in CreateFile, see http://support.microsoft.com/kb/316609
+static const unsigned long error_sharing_violation_tries = 3L;
+static const unsigned long error_sharing_violation_sleep_ms = 250L;
+static const unsigned long error_file_too_large = 223L;
+static const unsigned long error_insufficient_buffer = 122L;
+static const unsigned long error_handle_eof = 38L;
+static const unsigned long semaphore_all_access = (0x000F0000L)|(0x00100000L)|0x3;
+static const unsigned long mutex_all_access = (0x000F0000L)|(0x00100000L)|0x0001;
+
+static const unsigned long page_readonly = 0x02;
+static const unsigned long page_readwrite = 0x04;
+static const unsigned long page_writecopy = 0x08;
+static const unsigned long page_noaccess = 0x01;
+
+static const unsigned long standard_rights_required = 0x000F0000L;
+static const unsigned long section_query = 0x0001;
+static const unsigned long section_map_write = 0x0002;
+static const unsigned long section_map_read = 0x0004;
+static const unsigned long section_map_execute = 0x0008;
+static const unsigned long section_extend_size = 0x0010;
+static const unsigned long section_all_access = standard_rights_required |
+ section_query |
+ section_map_write |
+ section_map_read |
+ section_map_execute |
+ section_extend_size;
+
+static const unsigned long file_map_copy = section_query;
+static const unsigned long file_map_write = section_map_write;
+static const unsigned long file_map_read = section_map_read;
+static const unsigned long file_map_all_access = section_all_access;
+static const unsigned long delete_access = 0x00010000L;
+static const unsigned long file_flag_backup_semantics = 0x02000000;
+static const long file_flag_delete_on_close = 0x04000000;
+
+//Native API constants
+static const unsigned long file_open_for_backup_intent = 0x00004000;
+static const int file_share_valid_flags = 0x00000007;
+static const long file_delete_on_close = 0x00001000L;
+static const long obj_case_insensitive = 0x00000040L;
+static const long delete_flag = 0x00010000L;
+
+static const unsigned long movefile_copy_allowed = 0x02;
+static const unsigned long movefile_delay_until_reboot = 0x04;
+static const unsigned long movefile_replace_existing = 0x01;
+static const unsigned long movefile_write_through = 0x08;
+static const unsigned long movefile_create_hardlink = 0x10;
+static const unsigned long movefile_fail_if_not_trackable = 0x20;
+
+static const unsigned long file_share_read = 0x00000001;
+static const unsigned long file_share_write = 0x00000002;
+static const unsigned long file_share_delete = 0x00000004;
+
+static const unsigned long file_attribute_readonly = 0x00000001;
+static const unsigned long file_attribute_hidden = 0x00000002;
+static const unsigned long file_attribute_system = 0x00000004;
+static const unsigned long file_attribute_directory = 0x00000010;
+static const unsigned long file_attribute_archive = 0x00000020;
+static const unsigned long file_attribute_device = 0x00000040;
+static const unsigned long file_attribute_normal = 0x00000080;
+static const unsigned long file_attribute_temporary = 0x00000100;
+
+static const unsigned long generic_read = 0x80000000L;
+static const unsigned long generic_write = 0x40000000L;
+
+static const unsigned long wait_object_0 = 0;
+static const unsigned long wait_abandoned = 0x00000080L;
+static const unsigned long wait_timeout = 258L;
+static const unsigned long wait_failed = (unsigned long)0xFFFFFFFF;
+
+static const unsigned long duplicate_close_source = (unsigned long)0x00000001;
+static const unsigned long duplicate_same_access = (unsigned long)0x00000002;
+
+static const unsigned long format_message_allocate_buffer
+ = (unsigned long)0x00000100;
+static const unsigned long format_message_ignore_inserts
+ = (unsigned long)0x00000200;
+static const unsigned long format_message_from_string
+ = (unsigned long)0x00000400;
+static const unsigned long format_message_from_hmodule
+ = (unsigned long)0x00000800;
+static const unsigned long format_message_from_system
+ = (unsigned long)0x00001000;
+static const unsigned long format_message_argument_array
+ = (unsigned long)0x00002000;
+static const unsigned long format_message_max_width_mask
+ = (unsigned long)0x000000FF;
+static const unsigned long lang_neutral = (unsigned long)0x00;
+static const unsigned long sublang_default = (unsigned long)0x01;
+static const unsigned long invalid_file_size = (unsigned long)0xFFFFFFFF;
+static const unsigned long invalid_file_attributes = ((unsigned long)-1);
+static void * const invalid_handle_value = ((void*)(long)(-1));
+
+static const unsigned long file_type_char = 0x0002L;
+static const unsigned long file_type_disk = 0x0001L;
+static const unsigned long file_type_pipe = 0x0003L;
+static const unsigned long file_type_remote = 0x8000L;
+static const unsigned long file_type_unknown = 0x0000L;
+
+static const unsigned long create_new = 1;
+static const unsigned long create_always = 2;
+static const unsigned long open_existing = 3;
+static const unsigned long open_always = 4;
+static const unsigned long truncate_existing = 5;
+
+static const unsigned long file_begin = 0;
+static const unsigned long file_current = 1;
+static const unsigned long file_end = 2;
+
+static const unsigned long lockfile_fail_immediately = 1;
+static const unsigned long lockfile_exclusive_lock = 2;
+static const unsigned long error_lock_violation = 33;
+static const unsigned long security_descriptor_revision = 1;
+
+const unsigned long max_record_buffer_size = 0x10000L; // 64K
+const unsigned long max_path = 260;
+
+//Keys
+static const hkey hkey_local_machine = (hkey)(unsigned long*)(long)(0x80000002);
+static unsigned long key_query_value = 0x0001;
+
+//COM API
+const unsigned long RPC_C_AUTHN_LEVEL_PKT_BIPC = 4;
+const unsigned long RPC_C_AUTHN_DEFAULT_BIPC = 0xffffffffL;
+const unsigned long RPC_C_AUTHZ_DEFAULT_BIPC = 0xffffffffL;
+const unsigned long RPC_C_IMP_LEVEL_IMPERSONATE_BIPC = 3;
+const signed long EOAC_NONE_BIPC = 0;
+const signed long CLSCTX_INPROC_SERVER_BIPC = 0x1;
+const signed long CLSCTX_LOCAL_SERVER_BIPC = 0x4;
+const signed long WBEM_FLAG_RETURN_IMMEDIATELY_BIPC = 0x10;
+const signed long WBEM_FLAG_RETURN_WHEN_COMPLETE_BIPC = 0x0;
+const signed long WBEM_FLAG_FORWARD_ONLY_BIPC = 0x20;
+const signed long WBEM_INFINITE_BIPC = 0xffffffffL;
+const signed long RPC_E_TOO_LATE_BIPC = 0x80010119L;
+const signed long S_OK_BIPC = 0L;
+const signed long S_FALSE_BIPC = 1;
+const signed long RPC_E_CHANGED_MODE_BIPC = 0x80010106L;
+const unsigned long COINIT_APARTMENTTHREADED_BIPC = 0x2;
+const unsigned long COINIT_MULTITHREADED_BIPC = 0x0;
+const unsigned long COINIT_DISABLE_OLE1DDE_BIPC = 0x4;
+const unsigned long COINIT_SPEED_OVER_MEMORY_BIPC = 0x4;
+
+// Registry types
+#define reg_none ( 0 ) // No value type
+#define reg_sz ( 1 ) // Unicode nul terminated string
+#define reg_expand_sz ( 2 ) // Unicode nul terminated string
+ // (with environment variable references)
+#define reg_binary ( 3 ) // Free form binary
+#define reg_dword ( 4 ) // 32-bit number
+#define reg_dword_little_endian ( 4 ) // 32-bit number (same as REG_DWORD)
+#define reg_dword_big_endian ( 5 ) // 32-bit number
+#define reg_link ( 6 ) // Symbolic Link (unicode)
+#define reg_multi_sz ( 7 ) // Multiple Unicode strings
+#define reg_resource_list ( 8 ) // Resource list in the resource map
+#define reg_full_resource_descriptor ( 9 ) // Resource list in the hardware description
+#define reg_resource_requirements_list ( 10 )
+#define reg_qword ( 11 ) // 64-bit number
+#define reg_qword_little_endian ( 11 ) // 64-bit number (same as reg_qword)
+
+
+//If the user needs to change default COM initialization model,
+//it can define BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL to one of these:
+//
+// COINIT_APARTMENTTHREADED_BIPC
+// COINIT_MULTITHREADED_BIPC
+// COINIT_DISABLE_OLE1DDE_BIPC
+// COINIT_SPEED_OVER_MEMORY_BIPC
+#if !defined(BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL)
+ #define BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL COINIT_APARTMENTTHREADED_BIPC
+#elif (BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL != COINIT_APARTMENTTHREADED_BIPC) &&\
+ (BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL != COINIT_MULTITHREADED_BIPC) &&\
+ (BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL != COINIT_DISABLE_OLE1DDE_BIPC) &&\
+ (BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL != COINIT_SPEED_OVER_MEMORY_BIPC)
+ #error "Wrong value for BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL macro"
+#endif
+
+const GUID_BIPC CLSID_WbemAdministrativeLocator =
+ { 0xcb8555cc, 0x9128, 0x11d1, {0xad, 0x9b, 0x00, 0xc0, 0x4f, 0xd8, 0xfd, 0xff}};
+
+const GUID_BIPC IID_IUnknown = { 0x00000000, 0x0000, 0x0000, {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46}};
+
+static const unsigned long eventlog_sequential_read = 0x0001;
+static const unsigned long eventlog_backwards_read = 0x0008;
+
+} //namespace winapi {
+} //namespace interprocess {
+} //namespace boost {
+
+
+namespace boost {
+namespace interprocess {
+namespace winapi {
+
+inline unsigned long get_last_error()
+{ return GetLastError(); }
+
+inline void set_last_error(unsigned long err)
+{ return SetLastError(err); }
+
+inline unsigned long format_message
+ (unsigned long dwFlags, const void *lpSource,
+ unsigned long dwMessageId, unsigned long dwLanguageId,
+ char *lpBuffer, unsigned long nSize, std::va_list *Arguments)
+{
+ return FormatMessageA
+ (dwFlags, lpSource, dwMessageId, dwLanguageId, lpBuffer, nSize, Arguments);
+}
+
+//And now, wrapper functions
+inline void * local_free(void *hmem)
+{ return LocalFree(hmem); }
+
+inline unsigned long make_lang_id(unsigned long p, unsigned long s)
+{ return ((((unsigned short)(s)) << 10) | (unsigned short)(p)); }
+
+inline void sched_yield()
+{
+ if(!SwitchToThread()){
+ Sleep(0);
+ }
+}
+
+inline void sleep_tick()
+{ Sleep(1); }
+
+inline void sleep(unsigned long ms)
+{ Sleep(ms); }
+
+inline unsigned long get_current_thread_id()
+{ return GetCurrentThreadId(); }
+
+inline bool get_process_times
+ ( void *hProcess, interprocess_filetime* lpCreationTime
+ , interprocess_filetime *lpExitTime, interprocess_filetime *lpKernelTime
+ , interprocess_filetime *lpUserTime )
+{ return 0 != GetProcessTimes(hProcess, lpCreationTime, lpExitTime, lpKernelTime, lpUserTime); }
+
+inline unsigned long get_current_process_id()
+{ return GetCurrentProcessId(); }
+
+inline unsigned int close_handle(void* handle)
+{ return CloseHandle(handle); }
+
+inline void * find_first_file(const char *lpFileName, win32_find_data *lpFindFileData)
+{ return FindFirstFileA(lpFileName, lpFindFileData); }
+
+inline bool find_next_file(void *hFindFile, win32_find_data *lpFindFileData)
+{ return FindNextFileA(hFindFile, lpFindFileData) != 0; }
+
+inline bool find_close(void *handle)
+{ return FindClose(handle) != 0; }
+
+inline bool duplicate_current_process_handle
+ (void *hSourceHandle, void **lpTargetHandle)
+{
+ return 0 != DuplicateHandle
+ ( GetCurrentProcess(), hSourceHandle, GetCurrentProcess()
+ , lpTargetHandle, 0, 0
+ , duplicate_same_access);
+}
+
+inline unsigned long get_file_type(void *hFile)
+{
+ return GetFileType(hFile);
+}
+
+/*
+inline void get_system_time_as_file_time(interprocess_filetime *filetime)
+{ GetSystemTimeAsFileTime(filetime); }
+
+inline bool file_time_to_local_file_time
+ (const interprocess_filetime *in, const interprocess_filetime *out)
+{ return 0 != FileTimeToLocalFileTime(in, out); }
+*/
+inline void *open_or_create_mutex(const char *name, bool initial_owner, interprocess_security_attributes *attr)
+{ return CreateMutexA(attr, (int)initial_owner, name); }
+
+inline unsigned long wait_for_single_object(void *handle, unsigned long time)
+{ return WaitForSingleObject(handle, time); }
+
+inline int release_mutex(void *handle)
+{ return ReleaseMutex(handle); }
+
+inline int unmap_view_of_file(void *address)
+{ return UnmapViewOfFile(address); }
+
+inline void *open_or_create_semaphore(const char *name, long initial_count, long maximum_count, interprocess_security_attributes *attr)
+{ return CreateSemaphoreA(attr, initial_count, maximum_count, name); }
+
+inline void *open_semaphore(const char *name)
+{ return OpenSemaphoreA(semaphore_all_access, 0, name); }
+
+inline int release_semaphore(void *handle, long release_count, long *prev_count)
+{ return ReleaseSemaphore(handle, release_count, prev_count); }
+
+class interprocess_all_access_security
+{
+ interprocess_security_attributes sa;
+ interprocess_security_descriptor sd;
+ bool initialized;
+
+ public:
+ interprocess_all_access_security()
+ : initialized(false)
+ {
+ if(!InitializeSecurityDescriptor(&sd, security_descriptor_revision))
+ return;
+ if(!SetSecurityDescriptorDacl(&sd, true, 0, false))
+ return;
+ sa.lpSecurityDescriptor = &sd;
+ sa.nLength = sizeof(interprocess_security_attributes);
+ sa.bInheritHandle = false;
+ initialized = false;
+ }
+
+ interprocess_security_attributes *get_attributes()
+ { return &sa; }
+};
+
+inline void * create_file_mapping (void * handle, unsigned long access, ::boost::ulong_long_type file_offset, const char * name, interprocess_security_attributes *psec)
+{
+ const unsigned long high_size(file_offset >> 32), low_size((boost::uint32_t)file_offset);
+ return CreateFileMappingA (handle, psec, access, high_size, low_size, name);
+}
+
+inline void * open_file_mapping (unsigned long access, const char *name)
+{ return OpenFileMappingA (access, 0, name); }
+
+inline void *map_view_of_file_ex(void *handle, unsigned long file_access, ::boost::ulong_long_type offset, std::size_t numbytes, void *base_addr)
+{
+ const unsigned long offset_low = (unsigned long)(offset & ((::boost::ulong_long_type)0xFFFFFFFF));
+ const unsigned long offset_high = offset >> 32;
+ return MapViewOfFileEx(handle, file_access, offset_high, offset_low, numbytes, base_addr);
+}
+
+inline void *create_file(const char *name, unsigned long access, unsigned long creation_flags, unsigned long attributes, interprocess_security_attributes *psec)
+{
+ for (unsigned int attempt(0); attempt < error_sharing_violation_tries; ++attempt){
+ void * const handle = CreateFileA(name, access,
+ file_share_read | file_share_write | file_share_delete,
+ psec, creation_flags, attributes, 0);
+ bool const invalid(invalid_handle_value == handle);
+ if (!invalid){
+ return handle;
+ }
+ if (error_sharing_violation != get_last_error()){
+ return handle;
+ }
+ sleep(error_sharing_violation_sleep_ms);
+ }
+ return invalid_handle_value;
+}
+
+inline void get_system_info(system_info *info)
+{ GetSystemInfo(info); }
+
+inline bool flush_view_of_file(void *base_addr, std::size_t numbytes)
+{ return 0 != FlushViewOfFile(base_addr, numbytes); }
+
+inline bool virtual_unlock(void *base_addr, std::size_t numbytes)
+{ return 0 != VirtualUnlock(base_addr, numbytes); }
+
+inline bool virtual_protect(void *base_addr, std::size_t numbytes, unsigned long flNewProtect, unsigned long &lpflOldProtect)
+{ return 0 != VirtualProtect(base_addr, numbytes, flNewProtect, &lpflOldProtect); }
+
+inline bool flush_file_buffers(void *handle)
+{ return 0 != FlushFileBuffers(handle); }
+
+inline bool get_file_size(void *handle, __int64 &size)
+{ return 0 != GetFileSizeEx(handle, (large_integer*)&size); }
+
+inline bool create_directory(const char *name)
+{
+ interprocess_all_access_security sec;
+ return 0 != CreateDirectoryA(name, sec.get_attributes());
+}
+
+inline bool remove_directory(const char *lpPathName)
+{ return 0 != RemoveDirectoryA(lpPathName); }
+
+inline unsigned long get_temp_path(unsigned long length, char *buffer)
+{ return GetTempPathA(length, buffer); }
+
+inline int set_end_of_file(void *handle)
+{ return 0 != SetEndOfFile(handle); }
+
+inline bool set_file_pointer_ex(void *handle, __int64 distance, __int64 *new_file_pointer, unsigned long move_method)
+{
+ large_integer d; d.QuadPart = distance;
+ return 0 != SetFilePointerEx(handle, d, (large_integer*)new_file_pointer, move_method);
+}
+
+inline bool lock_file_ex(void *hnd, unsigned long flags, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped *overlapped)
+{ return 0 != LockFileEx(hnd, flags, reserved, size_low, size_high, overlapped); }
+
+inline bool unlock_file_ex(void *hnd, unsigned long reserved, unsigned long size_low, unsigned long size_high, interprocess_overlapped *overlapped)
+{ return 0 != UnlockFileEx(hnd, reserved, size_low, size_high, overlapped); }
+
+inline bool write_file(void *hnd, const void *buffer, unsigned long bytes_to_write, unsigned long *bytes_written, interprocess_overlapped* overlapped)
+{ return 0 != WriteFile(hnd, buffer, bytes_to_write, bytes_written, overlapped); }
+
+inline bool read_file(void *hnd, void *buffer, unsigned long bytes_to_read, unsigned long *bytes_read, interprocess_overlapped* overlapped)
+{ return 0 != ReadFile(hnd, buffer, bytes_to_read, bytes_read, overlapped); }
+
+inline bool get_file_information_by_handle(void *hnd, interprocess_by_handle_file_information *info)
+{ return 0 != GetFileInformationByHandle(hnd, info); }
+
+inline long interlocked_increment(long volatile *addr)
+{ return BOOST_INTERLOCKED_INCREMENT(const_cast<long*>(addr)); }
+
+inline long interlocked_decrement(long volatile *addr)
+{ return BOOST_INTERLOCKED_DECREMENT(const_cast<long*>(addr)); }
+
+inline long interlocked_compare_exchange(long volatile *addr, long val1, long val2)
+{ return BOOST_INTERLOCKED_COMPARE_EXCHANGE(const_cast<long*>(addr), val1, val2); }
+
+inline long interlocked_exchange_add(long volatile* addend, long value)
+{ return BOOST_INTERLOCKED_EXCHANGE_ADD(const_cast<long*>(addend), value); }
+
+inline long interlocked_exchange(long volatile* addend, long value)
+{ return BOOST_INTERLOCKED_EXCHANGE(const_cast<long*>(addend), value); }
+
+//Forward functions
+inline hmodule load_library(const char *name)
+{ return LoadLibraryA(name); }
+
+inline bool free_library(hmodule module)
+{ return 0 != FreeLibrary(module); }
+
+inline farproc_t get_proc_address(hmodule module, const char *name)
+{ return GetProcAddress(module, name); }
+
+inline void *get_current_process()
+{ return GetCurrentProcess(); }
+
+inline hmodule get_module_handle(const char *name)
+{ return GetModuleHandleA(name); }
+
+inline long reg_open_key_ex(hkey hKey, const char *lpSubKey, unsigned long ulOptions, unsigned long samDesired, hkey *phkResult)
+{ return RegOpenKeyExA(hKey, lpSubKey, ulOptions, samDesired, phkResult); }
+
+inline long reg_query_value_ex(hkey hKey, const char *lpValueName, unsigned long*lpReserved, unsigned long*lpType, unsigned char *lpData, unsigned long*lpcbData)
+{ return RegQueryValueExA(hKey, lpValueName, lpReserved, lpType, lpData, lpcbData); }
+
+inline long reg_close_key(hkey hKey)
+{ return RegCloseKey(hKey); }
+
+inline void initialize_object_attributes
+( object_attributes_t *pobject_attr, unicode_string_t *name
+ , unsigned long attr, void *rootdir, void *security_descr)
+
+{
+ pobject_attr->Length = sizeof(object_attributes_t);
+ pobject_attr->RootDirectory = rootdir;
+ pobject_attr->Attributes = attr;
+ pobject_attr->ObjectName = name;
+ pobject_attr->SecurityDescriptor = security_descr;
+ pobject_attr->SecurityQualityOfService = 0;
+}
+
+inline void rtl_init_empty_unicode_string(unicode_string_t *ucStr, wchar_t *buf, unsigned short bufSize)
+{
+ ucStr->Buffer = buf;
+ ucStr->Length = 0;
+ ucStr->MaximumLength = bufSize;
+}
+
+//A class that locates and caches loaded DLL function addresses.
+template<int Dummy>
+struct function_address_holder
+{
+ enum { NtSetInformationFile
+ , NtQuerySystemInformation
+ , NtQueryObject
+ , NtQuerySemaphore
+ , NtQuerySection
+ , NtOpenFile
+ , NtClose
+ , NtQueryTimerResolution
+ , QueryPerformanceCounter
+ , QueryPerformanceFrequency
+ , NumFunction
+ };
+ enum { NtDll_dll, Kernel32_dll, NumModule };
+
+ private:
+ static const char *FunctionNames[NumFunction];
+ static const char *ModuleNames[NumModule];
+ static farproc_t FunctionAddresses[NumFunction];
+ static unsigned int FunctionModules[NumFunction];
+ static volatile long FunctionStates[NumFunction];
+ static hmodule ModuleAddresses[NumModule];
+ static volatile long ModuleStates[NumModule];
+
+ static hmodule get_module_from_id(unsigned int id)
+ {
+ BOOST_ASSERT(id < (unsigned int)NumModule);
+ hmodule addr = get_module_handle(ModuleNames[id]);
+ BOOST_ASSERT(addr);
+ return addr;
+ }
+
+ static hmodule get_module(const unsigned int id)
+ {
+ BOOST_ASSERT(id < (unsigned int)NumModule);
+ for(unsigned i = 0; ModuleStates[id] < 2; ++i){
+ if(interlocked_compare_exchange(&ModuleStates[id], 1, 0) == 0){
+ ModuleAddresses[id] = get_module_from_id(id);
+ interlocked_increment(&ModuleStates[id]);
+ break;
+ }
+ else if(i & 1){
+ sched_yield();
+ }
+ else{
+ sleep_tick();
+ }
+ }
+ return ModuleAddresses[id];
+ }
+
+ static farproc_t get_address_from_dll(const unsigned int id)
+ {
+ BOOST_ASSERT(id < (unsigned int)NumFunction);
+ farproc_t addr = get_proc_address(get_module(FunctionModules[id]), FunctionNames[id]);
+ BOOST_ASSERT(addr);
+ return addr;
+ }
+
+ public:
+ static farproc_t get(const unsigned int id)
+ {
+ BOOST_ASSERT(id < (unsigned int)NumFunction);
+ for(unsigned i = 0; FunctionStates[id] < 2; ++i){
+ if(interlocked_compare_exchange(&FunctionStates[id], 1, 0) == 0){
+ FunctionAddresses[id] = get_address_from_dll(id);
+ interlocked_increment(&FunctionStates[id]);
+ break;
+ }
+ else if(i & 1){
+ sched_yield();
+ }
+ else{
+ sleep_tick();
+ }
+ }
+ return FunctionAddresses[id];
+ }
+};
+
+template<int Dummy>
+const char *function_address_holder<Dummy>::FunctionNames[function_address_holder<Dummy>::NumFunction] =
+{
+ "NtSetInformationFile",
+ "NtQuerySystemInformation",
+ "NtQueryObject",
+ "NtQuerySemaphore",
+ "NtQuerySection",
+ "NtOpenFile",
+ "NtClose",
+ "NtQueryTimerResolution",
+ "QueryPerformanceCounter",
+ "QueryPerformanceFrequency"
+};
+
+template<int Dummy>
+unsigned int function_address_holder<Dummy>::FunctionModules[function_address_holder<Dummy>::NumFunction] =
+{
+ NtDll_dll,
+ NtDll_dll,
+ NtDll_dll,
+ NtDll_dll,
+ NtDll_dll,
+ NtDll_dll,
+ NtDll_dll,
+ NtDll_dll,
+ Kernel32_dll,
+ Kernel32_dll
+};
+
+template<int Dummy>
+const char *function_address_holder<Dummy>::ModuleNames[function_address_holder<Dummy>::NumModule] =
+{
+ "ntdll.dll",
+ "kernel32.dll"
+};
+
+
+template<int Dummy>
+farproc_t function_address_holder<Dummy>::FunctionAddresses[function_address_holder<Dummy>::NumFunction];
+
+template<int Dummy>
+volatile long function_address_holder<Dummy>::FunctionStates[function_address_holder<Dummy>::NumFunction];
+
+template<int Dummy>
+hmodule function_address_holder<Dummy>::ModuleAddresses[function_address_holder<Dummy>::NumModule];
+
+template<int Dummy>
+volatile long function_address_holder<Dummy>::ModuleStates[function_address_holder<Dummy>::NumModule];
+
+
+struct dll_func
+ : public function_address_holder<0>
+{};
+
+//Complex winapi based functions...
+struct library_unloader
+{
+ hmodule lib_;
+ library_unloader(hmodule module) : lib_(module){}
+ ~library_unloader(){ free_library(lib_); }
+};
+
+
+inline bool get_system_time_of_day_information(system_timeofday_information &info)
+{
+ NtQuerySystemInformation_t pNtQuerySystemInformation = reinterpret_cast<NtQuerySystemInformation_t>
+ (dll_func::get(dll_func::NtQuerySystemInformation));
+ unsigned long res;
+ long status = pNtQuerySystemInformation(system_time_of_day_information, &info, sizeof(info), &res);
+ if(status){
+ return false;
+ }
+ return true;
+}
+
+inline bool get_boot_time(unsigned char (&bootstamp) [BootstampLength])
+{
+ system_timeofday_information info;
+ bool ret = get_system_time_of_day_information(info);
+ if(!ret){
+ return false;
+ }
+ std::memcpy(&bootstamp[0], &info.Reserved1, sizeof(bootstamp));
+ return true;
+}
+
+inline bool get_boot_and_system_time(unsigned char (&bootsystemstamp) [BootAndSystemstampLength])
+{
+ system_timeofday_information info;
+ bool ret = get_system_time_of_day_information(info);
+ if(!ret){
+ return false;
+ }
+ std::memcpy(&bootsystemstamp[0], &info.Reserved1, sizeof(bootsystemstamp));
+ return true;
+}
+
+//Writes the hexadecimal value of the buffer, in the wide character string.
+//str must be twice length
+inline void buffer_to_wide_str(const void *buf, std::size_t length, wchar_t *str)
+{
+ const wchar_t Characters [] =
+ { L'0', L'1', L'2', L'3', L'4', L'5', L'6', L'7'
+ , L'8', L'9', L'A', L'B', L'C', L'D', L'E', L'F' };
+ std::size_t char_counter = 0;
+ const char *chbuf = static_cast<const char *>(buf);
+ for(std::size_t i = 0; i != length; ++i){
+ str[char_counter++] = Characters[(chbuf[i]&0xF0)>>4];
+ str[char_counter++] = Characters[(chbuf[i]&0x0F)];
+ }
+}
+
+//Writes the hexadecimal value of the buffer, in the narrow character string.
+//str must be twice length
+inline void buffer_to_narrow_str(const void *buf, std::size_t length, char *str)
+{
+ const char Characters [] =
+ { '0', '1', '2', '3', '4', '5', '6', '7'
+ , '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
+ std::size_t char_counter = 0;
+ const char *chbuf = static_cast<const char *>(buf);
+ for(std::size_t i = 0; i != length; ++i){
+ str[char_counter++] = Characters[(chbuf[i]&0xF0)>>4];
+ str[char_counter++] = Characters[(chbuf[i]&0x0F)];
+ }
+}
+
+inline bool get_boot_time_str(char *bootstamp_str, std::size_t &s)
+ //will write BootstampLength chars
+{
+ if(s < (BootstampLength*2))
+ return false;
+ system_timeofday_information info;
+ bool ret = get_system_time_of_day_information(info);
+ if(!ret){
+ return false;
+ }
+
+ buffer_to_narrow_str(info.Reserved1, BootstampLength, bootstamp_str);
+ s = BootstampLength*2;
+ return true;
+}
+
+inline bool get_boot_and_system_time_wstr(wchar_t *bootsystemstamp, std::size_t &s)
+ //will write BootAndSystemstampLength chars
+{
+ if(s < (BootAndSystemstampLength*2))
+ return false;
+ system_timeofday_information info;
+ bool ret = get_system_time_of_day_information(info);
+ if(!ret){
+ return false;
+ }
+
+ buffer_to_wide_str(&info.Reserved1[0], BootAndSystemstampLength, bootsystemstamp);
+ s = BootAndSystemstampLength*2;
+ return true;
+}
+
+class handle_closer
+{
+ void *handle_;
+ handle_closer(const handle_closer &);
+ handle_closer& operator=(const handle_closer &);
+ public:
+ explicit handle_closer(void *handle) : handle_(handle){}
+ ~handle_closer()
+ { close_handle(handle_); }
+};
+
+class eventlog_handle_closer
+{
+ void *handle_;
+ eventlog_handle_closer(const handle_closer &);
+ eventlog_handle_closer& operator=(const eventlog_handle_closer &);
+ public:
+ explicit eventlog_handle_closer(void *handle) : handle_(handle){}
+ ~eventlog_handle_closer()
+ { CloseEventLog(handle_); }
+};
+
+union ntquery_mem_t
+{
+ object_name_information_t name;
+ struct ren_t
+ {
+ file_rename_information_t info;
+ wchar_t buf[1];
+ } ren;
+};
+
+class nt_query_mem_deleter
+{
+ static const std::size_t rename_offset = offsetof(ntquery_mem_t, ren.info.FileName) -
+ offsetof(ntquery_mem_t, name.Name.Buffer);
+ // Timestamp process id atomic count
+ static const std::size_t rename_suffix =
+ (SystemTimeOfDayInfoLength + sizeof(unsigned long) + sizeof(boost::uint32_t))*2;
+
+ public:
+ explicit nt_query_mem_deleter(std::size_t object_name_information_size)
+ : m_size(object_name_information_size + rename_offset + rename_suffix)
+ , m_buf(new char [m_size])
+ {}
+
+ ~nt_query_mem_deleter()
+ {
+ delete[]m_buf;
+ }
+
+ void realloc_mem(std::size_t num_bytes)
+ {
+ num_bytes += rename_suffix + rename_offset;
+ char *buf = m_buf;
+ m_buf = new char[num_bytes];
+ delete[]buf;
+ m_size = num_bytes;
+ }
+
+ ntquery_mem_t *query_mem() const
+ { return static_cast<ntquery_mem_t *>(static_cast<void*>(m_buf)); }
+
+ unsigned long object_name_information_size() const
+ {
+ return static_cast<unsigned long>(m_size - rename_offset - SystemTimeOfDayInfoLength*2);
+ }
+
+ std::size_t file_rename_information_size() const
+ { return static_cast<unsigned long>(m_size); }
+
+ private:
+ std::size_t m_size;
+ char *m_buf;
+};
+
+class c_heap_deleter
+{
+ public:
+ explicit c_heap_deleter(std::size_t size)
+ : m_buf(::malloc(size))
+ {}
+
+ ~c_heap_deleter()
+ {
+ if(m_buf) ::free(m_buf);
+ }
+
+ void realloc_mem(std::size_t num_bytes)
+ {
+ void *buf = ::realloc(m_buf, num_bytes);
+ if(!buf){
+ free(m_buf);
+ m_buf = 0;
+ }
+ }
+
+ void *get() const
+ { return m_buf; }
+
+ private:
+ void *m_buf;
+};
+
+inline bool unlink_file(const char *filename)
+{
+ //Don't try to optimize doing a DeleteFile first
+ //as there are interactions with permissions and
+ //in-use files.
+ //
+ //if(!delete_file(filename)){
+ // (...)
+ //
+
+ //This functions tries to emulate UNIX unlink semantics in windows.
+ //
+ //- Open the file and mark the handle as delete-on-close
+ //- Rename the file to an arbitrary name based on a random number
+ //- Close the handle. If there are no file users, it will be deleted.
+ // Otherwise it will be used by already connected handles but the
+ // file name can't be used to open this file again
+ try{
+ NtSetInformationFile_t pNtSetInformationFile =
+ reinterpret_cast<NtSetInformationFile_t>(dll_func::get(dll_func::NtSetInformationFile));
+
+ NtQueryObject_t pNtQueryObject = reinterpret_cast<NtQueryObject_t>(dll_func::get(dll_func::NtQueryObject));
+
+ //First step: Obtain a handle to the file using Win32 rules. This resolves relative paths
+ void *fh = create_file(filename, generic_read | delete_access, open_existing, 0, 0);
+ if(fh == invalid_handle_value){
+ return false;
+ }
+
+ handle_closer h_closer(fh);
+ {
+ //Obtain name length
+ unsigned long size;
+ const std::size_t initial_string_mem = 512u;
+
+ nt_query_mem_deleter nt_query_mem(sizeof(ntquery_mem_t)+initial_string_mem);
+ //Obtain file name with guessed length
+ if(pNtQueryObject(fh, object_name_information, nt_query_mem.query_mem(), nt_query_mem.object_name_information_size(), &size)){
+ //Obtain file name with exact length buffer
+ nt_query_mem.realloc_mem(size);
+ if(pNtQueryObject(fh, object_name_information, nt_query_mem.query_mem(), nt_query_mem.object_name_information_size(), &size)){
+ return false;
+ }
+ }
+ ntquery_mem_t *pmem = nt_query_mem.query_mem();
+ file_rename_information_t *pfri = &pmem->ren.info;
+ const std::size_t RenMaxNumChars =
+ (((char*)(pmem) + nt_query_mem.file_rename_information_size()) - (char*)&pmem->ren.info.FileName[0])/sizeof(wchar_t);
+
+ //Copy filename to the rename member
+ std::memmove(pmem->ren.info.FileName, pmem->name.Name.Buffer, pmem->name.Name.Length);
+ std::size_t filename_string_length = pmem->name.Name.Length/sizeof(wchar_t);
+
+ //Search '\\' character to replace from it
+ for(std::size_t i = filename_string_length; i != 0; --filename_string_length){
+ if(pmem->ren.info.FileName[--i] == L'\\')
+ break;
+ }
+
+ //Add random number
+ std::size_t s = RenMaxNumChars - filename_string_length;
+ if(!get_boot_and_system_time_wstr(&pfri->FileName[filename_string_length], s)){
+ return false;
+ }
+ filename_string_length += s;
+
+ //Sometimes the precission of the timestamp is not enough and we need to add another random number.
+ //The process id (to exclude concurrent processes) and an atomic count (to exclude concurrent threads).
+ //should be enough
+ const unsigned long pid = get_current_process_id();
+ buffer_to_wide_str(&pid, sizeof(pid), &pfri->FileName[filename_string_length]);
+ filename_string_length += sizeof(pid)*2;
+
+ static volatile boost::uint32_t u32_count = 0;
+ interlocked_decrement(reinterpret_cast<volatile long*>(&u32_count));
+ buffer_to_wide_str(const_cast<const boost::uint32_t *>(&u32_count), sizeof(boost::uint32_t), &pfri->FileName[filename_string_length]);
+ filename_string_length += sizeof(boost::uint32_t)*2;
+
+ //Fill rename information (FileNameLength is in bytes)
+ pfri->FileNameLength = static_cast<unsigned long>(sizeof(wchar_t)*(filename_string_length));
+ pfri->Replace = 1;
+ pfri->RootDir = 0;
+
+ //Cange the name of the in-use file...
+ io_status_block_t io;
+ if(0 != pNtSetInformationFile(fh, &io, pfri, nt_query_mem.file_rename_information_size(), file_rename_information)){
+ return false;
+ }
+ }
+ //...and mark it as delete-on-close
+ {
+ //Don't use pNtSetInformationFile with file_disposition_information as it can return STATUS_CANNOT_DELETE
+ //if the file is still mapped. Reopen it with NtOpenFile and file_delete_on_close
+ NtOpenFile_t pNtOpenFile = reinterpret_cast<NtOpenFile_t>(dll_func::get(dll_func::NtOpenFile));
+ NtClose_t pNtClose = reinterpret_cast<NtClose_t>(dll_func::get(dll_func::NtClose));
+ const wchar_t empty_str [] = L"";
+ unicode_string_t ustring = { sizeof(empty_str) - sizeof (wchar_t) //length in bytes without null
+ , sizeof(empty_str) //total size in bytes of memory allocated for Buffer.
+ , const_cast<wchar_t*>(empty_str)
+ };
+ object_attributes_t object_attr;
+ initialize_object_attributes(&object_attr, &ustring, 0, fh, 0);
+ void* fh2 = 0;
+ io_status_block_t io;
+ pNtOpenFile( &fh2, delete_flag, &object_attr, &io
+ , file_share_read | file_share_write | file_share_delete, file_delete_on_close);
+ pNtClose(fh2);
+ //Even if NtOpenFile fails, the file was renamed and the original no longer exists, so return a success status
+ return true;
+ }
+ }
+ catch(...){
+ return false;
+ }
+ return true;
+}
+
+struct reg_closer
+{
+ hkey key_;
+ reg_closer(hkey key) : key_(key){}
+ ~reg_closer(){ reg_close_key(key_); }
+};
+
+inline bool get_registry_value_buffer(hkey key_type, const char *subkey_name, const char *value_name, void *buf, std::size_t &buflen)
+{
+ bool bret = false;
+ hkey key;
+ if (reg_open_key_ex( key_type
+ , subkey_name
+ , 0
+ , key_query_value
+ , &key) == 0){
+ reg_closer key_closer(key);
+
+ //Obtain the value
+ unsigned long size = buflen;
+ unsigned long type;
+ buflen = 0;
+ bret = 0 == reg_query_value_ex( key, value_name, 0, &type, (unsigned char*)buf, &size);
+ if(bret)
+ buflen = (std::size_t)size;
+ }
+ return bret;
+}
+
+inline bool get_registry_value_string(hkey key_type, const char *subkey_name, const char *value_name, std::string &s)
+{
+ bool bret = false;
+ s.clear();
+ hkey key;
+ if (reg_open_key_ex( key_type
+ , subkey_name
+ , 0
+ , key_query_value
+ , &key) == 0){
+ reg_closer key_closer(key);
+
+ //Obtain the value
+ unsigned long size;
+ unsigned long type;
+ long err = reg_query_value_ex( key, value_name, 0, &type, 0, &size);
+ if((reg_sz == type || reg_expand_sz == type) && !err){
+ //Size includes terminating NULL
+ s.resize(size);
+ err = reg_query_value_ex( key, value_name, 0, &type, (unsigned char*)(&s[0]), &size);
+ if(!err){
+ s.erase(s.end()-1);
+ bret = true;
+ }
+ (void)err;
+ }
+ }
+ return bret;
+}
+
+inline void get_shared_documents_folder(std::string &s)
+{
+ #if 1 //Original registry search code
+ get_registry_value_string( hkey_local_machine
+ , "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders"
+ , "Common AppData"
+ , s);
+ #else //registry alternative: SHGetFolderPath
+ const int BIPC_CSIDL_COMMON_APPDATA = 0x0023; // All Users\Application Data
+ const int BIPC_CSIDL_FLAG_CREATE = 0x8000; // new for Win2K, or this in to force creation of folder
+ const int BIPC_SHGFP_TYPE_CURRENT = 0; // current value for user, verify it exists
+
+ s.clear();
+ char szPath[max_path];
+ if(0 == SHGetFolderPathA(0, BIPC_CSIDL_COMMON_APPDATA | BIPC_CSIDL_FLAG_CREATE, 0, BIPC_SHGFP_TYPE_CURRENT, szPath)){
+ s = szPath;
+ }
+
+ #endif
+}
+
+inline void get_registry_value(const char *folder, const char *value_key, std::vector<unsigned char> &s)
+{
+ s.clear();
+ hkey key;
+ if (reg_open_key_ex( hkey_local_machine
+ , folder
+ , 0
+ , key_query_value
+ , &key) == 0){
+ reg_closer key_closer(key);
+
+ //Obtain the value
+ unsigned long size;
+ unsigned long type;
+ const char *const reg_value = value_key;
+ //long err = (*pRegQueryValue)( key, reg_value, 0, &type, 0, &size);
+ long err = reg_query_value_ex( key, reg_value, 0, &type, 0, &size);
+ if(!err){
+ //Size includes terminating NULL
+ s.resize(size);
+ //err = (*pRegQueryValue)( key, reg_value, 0, &type, (unsigned char*)(&s[0]), &size);
+ err = reg_query_value_ex( key, reg_value, 0, &type, (unsigned char*)(&s[0]), &size);
+ if(!err)
+ s.erase(s.end()-1);
+ (void)err;
+ }
+ }
+}
+
+#if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME)
+
+struct co_uninitializer
+{
+ co_uninitializer(bool b_uninitialize)
+ : m_b_uninitialize(b_uninitialize)
+ {}
+
+ ~co_uninitializer()
+ {
+ if(m_b_uninitialize){
+ CoUninitialize();
+ }
+ }
+
+ private:
+ const bool m_b_uninitialize;
+};
+
+template<class Object>
+struct com_releaser
+{
+ Object *&object_;
+ com_releaser(Object *&object) : object_(object) {}
+ ~com_releaser() { object_->Release(); object_ = 0; }
+};
+
+inline bool get_wmi_class_attribute( std::wstring& strValue, const wchar_t *wmi_class, const wchar_t *wmi_class_var)
+{
+ //See example http://msdn.microsoft.com/en-us/library/aa390423%28v=VS.85%29.aspx
+ //
+ //See BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL definition if you need to change the
+ //default value of this macro in your application
+ long co_init_ret = CoInitializeEx(0, BOOST_INTERPROCESS_WINDOWS_COINIT_MODEL);
+ if(co_init_ret != S_OK_BIPC && co_init_ret != S_FALSE_BIPC && co_init_ret != RPC_E_CHANGED_MODE_BIPC)
+ return false;
+ co_uninitializer co_initialize_end(co_init_ret != RPC_E_CHANGED_MODE_BIPC);
+ (void)co_initialize_end;
+
+ bool bRet = false;
+ long sec_init_ret = CoInitializeSecurity
+ ( 0 //pVoid
+ ,-1 //cAuthSvc
+ , 0 //asAuthSvc
+ , 0 //pReserved1
+ , RPC_C_AUTHN_LEVEL_PKT_BIPC //dwAuthnLevel
+ , RPC_C_IMP_LEVEL_IMPERSONATE_BIPC //dwImpLevel
+ , 0 //pAuthList
+ , EOAC_NONE_BIPC //dwCapabilities
+ , 0 //pReserved3
+ );
+ if( 0 == sec_init_ret || RPC_E_TOO_LATE_BIPC == sec_init_ret)
+ {
+ IWbemLocator_BIPC * pIWbemLocator = 0;
+ const wchar_t * bstrNamespace = L"root\\cimv2";
+
+ if( 0 != CoCreateInstance(
+ CLSID_WbemAdministrativeLocator,
+ 0,
+ CLSCTX_INPROC_SERVER_BIPC | CLSCTX_LOCAL_SERVER_BIPC,
+ IID_IUnknown, (void **)&pIWbemLocator)){
+ return false;
+ }
+
+ com_releaser<IWbemLocator_BIPC> IWbemLocator_releaser(pIWbemLocator);
+
+ IWbemServices_BIPC *pWbemServices = 0;
+
+ if( 0 != pIWbemLocator->ConnectServer(
+ (bstr)bstrNamespace, // Namespace
+ 0, // Userid
+ 0, // PW
+ 0, // Locale
+ 0, // flags
+ 0, // Authority
+ 0, // Context
+ &pWbemServices
+ )
+ ){
+ return false;
+ }
+
+ if( S_OK_BIPC != CoSetProxyBlanket(
+ pWbemServices,
+ RPC_C_AUTHN_DEFAULT_BIPC,
+ RPC_C_AUTHZ_DEFAULT_BIPC,
+ 0,
+ RPC_C_AUTHN_LEVEL_PKT_BIPC,
+ RPC_C_IMP_LEVEL_IMPERSONATE_BIPC,
+ 0,
+ EOAC_NONE_BIPC
+ )
+ ){
+ return false;
+ }
+
+ com_releaser<IWbemServices_BIPC> IWbemServices_releaser(pWbemServices);
+
+ strValue.clear();
+ strValue += L"Select ";
+ strValue += wmi_class_var;
+ strValue += L" from ";
+ strValue += wmi_class;
+
+ IEnumWbemClassObject_BIPC * pEnumObject = 0;
+
+ if ( 0 != pWbemServices->ExecQuery(
+ (bstr)L"WQL",
+ (bstr)strValue.c_str(),
+ //WBEM_FLAG_RETURN_IMMEDIATELY_BIPC,
+ WBEM_FLAG_RETURN_WHEN_COMPLETE_BIPC | WBEM_FLAG_FORWARD_ONLY_BIPC,
+ 0,
+ &pEnumObject
+ )
+ ){
+ return false;
+ }
+
+ com_releaser<IEnumWbemClassObject_BIPC> IEnumWbemClassObject_releaser(pEnumObject);
+
+ //WBEM_FLAG_FORWARD_ONLY_BIPC incompatible with Reset
+ //if ( 0 != pEnumObject->Reset() ){
+ //return false;
+ //}
+
+ wchar_variant vwchar;
+ unsigned long uCount = 1, uReturned;
+ IWbemClassObject_BIPC * pClassObject = 0;
+ while( 0 == pEnumObject->Next( WBEM_INFINITE_BIPC, uCount, &pClassObject, &uReturned ) )
+ {
+ com_releaser<IWbemClassObject_BIPC> IWbemClassObject_releaser(pClassObject);
+ if ( 0 == pClassObject->Get( (bstr)L"LastBootUpTime", 0, &vwchar, 0, 0 ) ){
+ bRet = true;
+ strValue = (wchar_t*)vwchar.bstrVal;
+ VariantClear(&vwchar );
+ break;
+ }
+ }
+ }
+ return bRet;
+}
+
+//Obtains the bootup time from WMI LastBootUpTime.
+//This time seems to change with hibernation and clock synchronization so avoid it.
+inline bool get_last_bootup_time( std::wstring& strValue )
+{
+ bool ret = get_wmi_class_attribute(strValue, L"Win32_OperatingSystem", L"LastBootUpTime");
+ std::size_t timezone = strValue.find(L'+');
+ if(timezone != std::wstring::npos){
+ strValue.erase(timezone);
+ }
+ timezone = strValue.find(L'-');
+ if(timezone != std::wstring::npos){
+ strValue.erase(timezone);
+ }
+ return ret;
+}
+
+inline bool get_last_bootup_time( std::string& str )
+{
+ std::wstring wstr;
+ bool ret = get_last_bootup_time(wstr);
+ str.resize(wstr.size());
+ for(std::size_t i = 0, max = str.size(); i != max; ++i){
+ str[i] = '0' + (wstr[i]-L'0');
+ }
+ return ret;
+}
+
+#endif //BOOST_INTERPROCESS_BOOTSTAMP_IS_LASTBOOTUPTIME
+
+#if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED)
+
+// Loop through the buffer and obtain the contents of the
+// requested record in the buffer.
+inline bool find_record_in_buffer( const void* pBuffer, unsigned long dwBytesRead, const char *provider_name
+ , unsigned int id_to_find, interprocess_eventlogrecord *&pevent_log_record)
+{
+ const unsigned char * pRecord = static_cast<const unsigned char*>(pBuffer);
+ const unsigned char * pEndOfRecords = pRecord + dwBytesRead;
+
+ while (pRecord < pEndOfRecords){
+ interprocess_eventlogrecord *pTypedRecord = (interprocess_eventlogrecord*)pRecord;
+ // Check provider, written at the end of the fixed-part of the record
+ if (0 == std::strcmp(provider_name, (char*)(pRecord + sizeof(interprocess_eventlogrecord))))
+ {
+ // Check event id
+ if(id_to_find == (pTypedRecord->EventID & 0xFFFF)){
+ pevent_log_record = pTypedRecord;
+ return true;
+ }
+ }
+
+ pRecord += pTypedRecord->Length;
+ }
+ pevent_log_record = 0;
+ return false;
+}
+
+//Obtains the bootup time from the System Event Log,
+//event ID == 6005 (event log started).
+//Adapted from http://msdn.microsoft.com/en-us/library/windows/desktop/bb427356.aspx
+inline bool get_last_bootup_time(std::string &stamp)
+{
+ const char *source_name = "System";
+ const char *provider_name = "EventLog";
+ const unsigned short event_id = 6005u;
+
+ unsigned long status = 0;
+ unsigned long dwBytesToRead = 0;
+ unsigned long dwBytesRead = 0;
+ unsigned long dwMinimumBytesToRead = 0;
+
+ // The source name (provider) must exist as a subkey of Application.
+ void *hEventLog = OpenEventLogA(0, source_name);
+ if (hEventLog){
+ eventlog_handle_closer hnd_closer(hEventLog); (void)hnd_closer;
+ // Allocate an initial block of memory used to read event records. The number
+ // of records read into the buffer will vary depending on the size of each event.
+ // The size of each event will vary based on the size of the user-defined
+ // data included with each event, the number and length of insertion
+ // strings, and other data appended to the end of the event record.
+ dwBytesToRead = max_record_buffer_size;
+ c_heap_deleter heap_deleter(dwBytesToRead);
+
+ // Read blocks of records until you reach the end of the log or an
+ // error occurs. The records are read from newest to oldest. If the buffer
+ // is not big enough to hold a complete event record, reallocate the buffer.
+ if (heap_deleter.get() != 0){
+ while (0 == status){
+ if (!ReadEventLogA(hEventLog,
+ eventlog_sequential_read | eventlog_backwards_read,
+ 0,
+ heap_deleter.get(),
+ dwBytesToRead,
+ &dwBytesRead,
+ &dwMinimumBytesToRead)) {
+ status = get_last_error();
+ if (error_insufficient_buffer == status) {
+ status = 0;
+ dwBytesToRead = dwMinimumBytesToRead;
+ heap_deleter.realloc_mem(dwMinimumBytesToRead);
+ if (!heap_deleter.get()){
+ return false;
+ }
+ }
+ else{ //Not found or EOF
+ return false;
+ }
+ }
+ else
+ {
+ interprocess_eventlogrecord *pTypedRecord;
+ // Print the contents of each record in the buffer.
+ if(find_record_in_buffer(heap_deleter.get(), dwBytesRead, provider_name, event_id, pTypedRecord)){
+ char stamp_str[sizeof(unsigned long)*3+1];
+ std::sprintf(&stamp_str[0], "%u", ((unsigned int)pTypedRecord->TimeGenerated));
+ stamp = stamp_str;
+ break;
+ }
+ }
+ }
+ }
+ }
+ return true;
+}
+
+#endif //BOOST_INTERPROCESS_BOOTSTAMP_IS_EVENTLOG_BASED
+
+#if defined(BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED)
+
+inline bool get_last_bootup_time(std::string &stamp)
+{
+ unsigned dword_val = 0;
+ std::size_t dword_size = sizeof(dword_val);
+ bool b_ret = get_registry_value_buffer( hkey_local_machine
+ , "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Memory Management\\PrefetchParameters"
+ , "BootId", &dword_val, dword_size);
+ if (b_ret)
+ {
+ char dword_str[sizeof(dword_val)*2u+1];
+ buffer_to_narrow_str(&dword_val, dword_size, dword_str);
+ dword_str[sizeof(dword_val)*2] = '\0';
+ stamp = dword_str;
+
+ b_ret = get_registry_value_buffer( hkey_local_machine
+ , "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Power"
+ , "HybridBootAnimationTime", &dword_val, dword_size);
+ //Old Windows versions have no HybridBootAnimationTime
+ if(b_ret)
+ {
+ buffer_to_narrow_str(&dword_val, dword_size, dword_str);
+ dword_str[sizeof(dword_val)*2] = '\0';
+ stamp += "_";
+ stamp += dword_str;
+ }
+ b_ret = true;
+ }
+ return b_ret;
+}
+
+#endif //BOOST_INTERPROCESS_BOOTSTAMP_IS_SESSION_MANAGER_BASED
+
+inline bool is_directory(const char *path)
+{
+ unsigned long attrib = GetFileAttributesA(path);
+
+ return (attrib != invalid_file_attributes &&
+ (attrib & file_attribute_directory));
+}
+
+inline bool get_file_mapping_size(void *file_mapping_hnd, __int64 &size)
+{
+ NtQuerySection_t pNtQuerySection =
+ reinterpret_cast<NtQuerySection_t>(dll_func::get(dll_func::NtQuerySection));
+ //Obtain file name
+ interprocess_section_basic_information info;
+ unsigned long ntstatus =
+ pNtQuerySection(file_mapping_hnd, section_basic_information, &info, sizeof(info), 0);
+ size = info.section_size;
+ return !ntstatus;
+}
+
+inline bool get_semaphore_info(void *handle, long &count, long &limit)
+{
+ winapi::interprocess_semaphore_basic_information info;
+ winapi::NtQuerySemaphore_t pNtQuerySemaphore =
+ reinterpret_cast<winapi::NtQuerySemaphore_t>(dll_func::get(winapi::dll_func::NtQuerySemaphore));
+ unsigned int ret_len;
+ long status = pNtQuerySemaphore(handle, winapi::semaphore_basic_information, &info, sizeof(info), &ret_len);
+ count = info.count;
+ limit = info.limit;
+ return !status;
+}
+
+inline bool query_timer_resolution(unsigned long *lowres, unsigned long *highres, unsigned long *curres)
+{
+ winapi::NtQueryTimerResolution_t pNtQueryTimerResolution =
+ reinterpret_cast<winapi::NtQueryTimerResolution_t>(dll_func::get(winapi::dll_func::NtQueryTimerResolution));
+ return !pNtQueryTimerResolution(lowres, highres, curres);
+}
+
+inline bool query_performance_counter(__int64 *lpPerformanceCount)
+{
+ QueryPerformanceCounter_t pQueryPerformanceCounter = reinterpret_cast<QueryPerformanceCounter_t>
+ (dll_func::get(dll_func::QueryPerformanceCounter));
+ return 0 != pQueryPerformanceCounter(lpPerformanceCount);
+}
+
+inline bool query_performance_frequency(__int64 *lpFrequency)
+{
+ QueryPerformanceCounter_t pQueryPerformanceFrequency = reinterpret_cast<QueryPerformanceFrequency_t>
+ (dll_func::get(dll_func::QueryPerformanceFrequency));
+ return 0 != pQueryPerformanceFrequency(lpFrequency);
+}
+
+inline unsigned long get_tick_count()
+{ return GetTickCount(); }
+
+} //namespace winapi
+} //namespace interprocess
+} //namespace boost
+
+#if defined(BOOST_GCC) && (BOOST_GCC >= 40600)
+# pragma GCC diagnostic pop
+#endif
+
+#include <boost/interprocess/detail/config_end.hpp>
+
+#endif //#ifdef BOOST_INTERPROCESS_WIN32_API_HPP
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/windows_intermodule_singleton.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/windows_intermodule_singleton.hpp
index 12ad2015e3a..12ad2015e3a 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/windows_intermodule_singleton.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/windows_intermodule_singleton.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/detail/workaround.hpp b/src/third_party/boost-1.69.0/boost/interprocess/detail/workaround.hpp
index ea92db7f357..ea92db7f357 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/detail/workaround.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/detail/workaround.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/errors.hpp b/src/third_party/boost-1.69.0/boost/interprocess/errors.hpp
index f0198527a45..f0198527a45 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/errors.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/errors.hpp
diff --git a/src/third_party/boost-1.69.0/boost/interprocess/exceptions.hpp b/src/third_party/boost-1.69.0/boost/interprocess/exceptions.hpp
new file mode 100644
index 00000000000..336a5fce825
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/interprocess/exceptions.hpp
@@ -0,0 +1,110 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2005-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/interprocess for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTERPROCESS_EXCEPTIONS_HPP
+#define BOOST_INTERPROCESS_EXCEPTIONS_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/interprocess/detail/config_begin.hpp>
+#include <boost/interprocess/detail/workaround.hpp>
+#include <boost/interprocess/errors.hpp>
+#include <stdexcept>
+
+//!\file
+//!Describes exceptions thrown by interprocess classes
+
+namespace boost {
+
+namespace interprocess {
+
+//!This class is the base class of all exceptions
+//!thrown by boost::interprocess
+class BOOST_SYMBOL_VISIBLE interprocess_exception : public std::exception
+{
+ public:
+ interprocess_exception(const char *err)
+ : m_err(other_error)
+ {
+ try { m_str = err; }
+ catch (...) {}
+ }
+
+ interprocess_exception(const error_info &err_info, const char *str = 0)
+ : m_err(err_info)
+ {
+ try{
+ if(m_err.get_native_error() != 0){
+ fill_system_message(m_err.get_native_error(), m_str);
+ }
+ else if(str){
+ m_str = str;
+ }
+ else{
+ m_str = "boost::interprocess_exception::library_error";
+ }
+ }
+ catch(...){}
+ }
+
+ virtual ~interprocess_exception() BOOST_NOEXCEPT_OR_NOTHROW {}
+
+ virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return m_str.c_str(); }
+
+ native_error_t get_native_error()const { return m_err.get_native_error(); }
+
+ // Note: a value of other_error implies a library (rather than system) error
+ error_code_t get_error_code() const { return m_err.get_error_code(); }
+
+ #if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
+ private:
+ error_info m_err;
+ std::string m_str;
+ #endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
+};
+
+//!This is the exception thrown by shared interprocess_mutex family when a deadlock situation
+//!is detected or when using a interprocess_condition the interprocess_mutex is not locked
+class BOOST_SYMBOL_VISIBLE lock_exception : public interprocess_exception
+{
+ public:
+ lock_exception()
+ : interprocess_exception(lock_error)
+ {}
+
+ virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return "boost::interprocess::lock_exception"; }
+};
+
+
+//!This exception is thrown when a memory request can't be
+//!fulfilled.
+class BOOST_SYMBOL_VISIBLE bad_alloc : public interprocess_exception
+{
+ public:
+ bad_alloc() : interprocess_exception("::boost::interprocess::bad_alloc"){}
+ virtual const char* what() const BOOST_NOEXCEPT_OR_NOTHROW
+ { return "boost::interprocess::bad_alloc"; }
+};
+
+} // namespace interprocess {
+
+} // namespace boost
+
+#include <boost/interprocess/detail/config_end.hpp>
+
+#endif // BOOST_INTERPROCESS_EXCEPTIONS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/file_mapping.hpp b/src/third_party/boost-1.69.0/boost/interprocess/file_mapping.hpp
index 0d1cf1fe418..0d1cf1fe418 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/file_mapping.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/file_mapping.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/indexes/iset_index.hpp b/src/third_party/boost-1.69.0/boost/interprocess/indexes/iset_index.hpp
index ffaa24fa775..ffaa24fa775 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/indexes/iset_index.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/indexes/iset_index.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/interprocess_fwd.hpp b/src/third_party/boost-1.69.0/boost/interprocess/interprocess_fwd.hpp
index 882256e9344..882256e9344 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/interprocess_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/interprocess_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/managed_mapped_file.hpp b/src/third_party/boost-1.69.0/boost/interprocess/managed_mapped_file.hpp
index 14ec160614b..14ec160614b 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/managed_mapped_file.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/managed_mapped_file.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/managed_shared_memory.hpp b/src/third_party/boost-1.69.0/boost/interprocess/managed_shared_memory.hpp
index fadc19a71e6..fadc19a71e6 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/managed_shared_memory.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/managed_shared_memory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/mapped_region.hpp b/src/third_party/boost-1.69.0/boost/interprocess/mapped_region.hpp
index 1fb64086b56..1fb64086b56 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/mapped_region.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/mapped_region.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp b/src/third_party/boost-1.69.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
index eda4cf1be30..eda4cf1be30 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/mem_algo/detail/mem_algo_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp b/src/third_party/boost-1.69.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp
index 7da31f73bfc..7da31f73bfc 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/mem_algo/rbtree_best_fit.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/offset_ptr.hpp b/src/third_party/boost-1.69.0/boost/interprocess/offset_ptr.hpp
index 66d38cc965a..66d38cc965a 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/offset_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/offset_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/permissions.hpp b/src/third_party/boost-1.69.0/boost/interprocess/permissions.hpp
index 87fea28be79..87fea28be79 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/permissions.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/permissions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/segment_manager.hpp b/src/third_party/boost-1.69.0/boost/interprocess/segment_manager.hpp
index 8e2221e4dfa..8e2221e4dfa 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/segment_manager.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/segment_manager.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/shared_memory_object.hpp b/src/third_party/boost-1.69.0/boost/interprocess/shared_memory_object.hpp
index 34a695d461b..34a695d461b 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/shared_memory_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/shared_memory_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/smart_ptr/deleter.hpp b/src/third_party/boost-1.69.0/boost/interprocess/smart_ptr/deleter.hpp
index 3cd469df8ba..3cd469df8ba 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/smart_ptr/deleter.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/smart_ptr/deleter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/streams/bufferstream.hpp b/src/third_party/boost-1.69.0/boost/interprocess/streams/bufferstream.hpp
index 51f52b09e08..51f52b09e08 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/streams/bufferstream.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/streams/bufferstream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/detail/common_algorithms.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/detail/common_algorithms.hpp
index 87739b81213..87739b81213 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/detail/common_algorithms.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/detail/common_algorithms.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/detail/locks.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/detail/locks.hpp
index 88d9c0cb487..88d9c0cb487 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/detail/locks.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/detail/locks.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/interprocess_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_mutex.hpp
index 8bfc02c15d2..8bfc02c15d2 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/interprocess_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp
index e3825749379..e3825749379 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/interprocess_recursive_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/lock_options.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/lock_options.hpp
index 981ff5b6d3b..981ff5b6d3b 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/lock_options.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/lock_options.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/mutex_family.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/mutex_family.hpp
index b136ce4418d..b136ce4418d 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/mutex_family.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/mutex_family.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/named_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/named_mutex.hpp
index 127e8d8a8f0..127e8d8a8f0 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/named_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/named_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/null_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/null_mutex.hpp
index f3c29eb2567..f3c29eb2567 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/null_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/null_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/mutex.hpp
index 70adc23c96c..70adc23c96c 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/named_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_mutex.hpp
index 28fafa83ed9..28fafa83ed9 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/named_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/named_semaphore.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_semaphore.hpp
index 8180da1e481..8180da1e481 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/named_semaphore.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/named_semaphore.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/pthread_helpers.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/pthread_helpers.hpp
index c615c851ebb..c615c851ebb 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/pthread_helpers.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/pthread_helpers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp
index 5aa09e0c19e..5aa09e0c19e 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/ptime_to_timespec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/recursive_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/recursive_mutex.hpp
index 9ef4f127887..9ef4f127887 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/recursive_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp
index ca0f519b68e..ca0f519b68e 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/posix/semaphore_wrapper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/scoped_lock.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/scoped_lock.hpp
index 97986f0361e..97986f0361e 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/scoped_lock.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/scoped_lock.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/shm/named_creation_functor.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_creation_functor.hpp
index 137a1a8ea7d..137a1a8ea7d 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/shm/named_creation_functor.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_creation_functor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/shm/named_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_mutex.hpp
index 846727463f0..846727463f0 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/shm/named_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/shm/named_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/spin/mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/mutex.hpp
index 7663673433a..7663673433a 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/spin/mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/spin/recursive_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/recursive_mutex.hpp
index 495efd900ef..495efd900ef 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/spin/recursive_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/spin/wait.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/wait.hpp
index 984f91ad008..984f91ad008 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/spin/wait.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/spin/wait.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/mutex.hpp
index 4747d0cc66b..4747d0cc66b 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/named_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_mutex.hpp
index 64a83c94f8e..64a83c94f8e 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/named_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/named_sync.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_sync.hpp
index cf19335a34e..cf19335a34e 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/named_sync.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/named_sync.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/recursive_mutex.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/recursive_mutex.hpp
index bf406f8fec8..bf406f8fec8 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/recursive_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/recursive_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/sync_utils.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/sync_utils.hpp
index 8e054660ca9..8e054660ca9 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/sync_utils.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/sync_utils.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
index 983e33571da..983e33571da 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_mutex_wrapper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
index c98224f15d2..c98224f15d2 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_semaphore_wrapper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
index 428a26eb662..428a26eb662 100644
--- a/src/third_party/boost-1.68.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/interprocess/sync/windows/winapi_wrapper_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/any_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/any_hook.hpp
index 6d187812a6f..6d187812a6f 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/any_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/any_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/avl_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/avl_set.hpp
index d150140abd2..d150140abd2 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/avl_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/avl_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/avl_set_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/avl_set_hook.hpp
index 187130365b9..187130365b9 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/avl_set_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/avl_set_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/avltree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/avltree.hpp
index cdc9b75d608..cdc9b75d608 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/avltree.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/avltree.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/avltree_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/avltree_algorithms.hpp
new file mode 100644
index 00000000000..1d206cdc680
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/avltree_algorithms.hpp
@@ -0,0 +1,727 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Daniel K. O. 2005.
+// (C) Copyright Ion Gaztanaga 2007-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <cstddef>
+
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/bstree_algorithms.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+template<class NodeTraits, class F>
+struct avltree_node_cloner
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public detail::ebo_functor_holder<F>
+{
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef detail::ebo_functor_holder<F> base_t;
+
+ BOOST_INTRUSIVE_FORCEINLINE avltree_node_cloner(F f)
+ : base_t(f)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(const node_ptr & p)
+ {
+ node_ptr n = base_t::get()(p);
+ NodeTraits::set_balance(n, NodeTraits::get_balance(p));
+ return n;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(const node_ptr & p) const
+ {
+ node_ptr n = base_t::get()(p);
+ NodeTraits::set_balance(n, NodeTraits::get_balance(p));
+ return n;
+ }
+};
+
+namespace detail {
+
+template<class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct avltree_node_checker
+ : public bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker>
+{
+ typedef bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> base_checker_t;
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+
+ struct return_type
+ : public base_checker_t::return_type
+ {
+ return_type() : height(0) {}
+ int height;
+ };
+
+ avltree_node_checker(const NodePtrCompare& comp, ExtraChecker extra_checker)
+ : base_checker_t(comp, extra_checker)
+ {}
+
+ void operator () (const const_node_ptr& p,
+ const return_type& check_return_left, const return_type& check_return_right,
+ return_type& check_return)
+ {
+ const int height_diff = check_return_right.height - check_return_left.height; (void)height_diff;
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(
+ (height_diff == -1 && node_traits::get_balance(p) == node_traits::negative()) ||
+ (height_diff == 0 && node_traits::get_balance(p) == node_traits::zero()) ||
+ (height_diff == 1 && node_traits::get_balance(p) == node_traits::positive())
+ );
+ check_return.height = 1 +
+ (check_return_left.height > check_return_right.height ? check_return_left.height : check_return_right.height);
+ base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
+ }
+};
+
+} // namespace detail
+
+/// @endcond
+
+//! avltree_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the binary search tree
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <tt>balance</tt>: The type of the balance factor
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
+//!
+//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
+//!
+//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
+//!
+//! <tt>static balance get_balance(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_balance(node_ptr n, balance b);</tt>
+//!
+//! <tt>static balance negative();</tt>
+//!
+//! <tt>static balance zero();</tt>
+//!
+//! <tt>static balance positive();</tt>
+template<class NodeTraits>
+class avltree_algorithms
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_algorithms<NodeTraits>
+ #endif
+{
+ public:
+ typedef typename NodeTraits::node node;
+ typedef NodeTraits node_traits;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+ typedef typename NodeTraits::balance balance;
+
+ /// @cond
+ private:
+ typedef bstree_algorithms<NodeTraits> bstree_algo;
+
+ /// @endcond
+
+ public:
+ //! This type is the information that will be
+ //! filled by insert_unique_check
+ typedef typename bstree_algo::insert_commit_data insert_commit_data;
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
+ static node_ptr get_header(const const_node_ptr & n);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
+ static node_ptr begin_node(const const_node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
+ static node_ptr end_node(const const_node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
+ static void swap_tree(node_ptr header1, node_ptr header2);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr node2)
+ {
+ if(node1 == node2)
+ return;
+
+ node_ptr header1(bstree_algo::get_header(node1)), header2(bstree_algo::get_header(node2));
+ swap_nodes(node1, header1, node2, header2);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2)
+ {
+ if(node1 == node2) return;
+
+ bstree_algo::swap_nodes(node1, header1, node2, header2);
+ //Swap balance
+ balance c = NodeTraits::get_balance(node1);
+ NodeTraits::set_balance(node1, NodeTraits::get_balance(node2));
+ NodeTraits::set_balance(node2, c);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node)
+ {
+ if(node_to_be_replaced == new_node)
+ return;
+ replace_node(node_to_be_replaced, bstree_algo::get_header(node_to_be_replaced), new_node);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node)
+ {
+ bstree_algo::replace_node(node_to_be_replaced, header, new_node);
+ NodeTraits::set_balance(new_node, NodeTraits::get_balance(node_to_be_replaced));
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
+ static void unlink(node_ptr node)
+ {
+ node_ptr x = NodeTraits::get_parent(node);
+ if(x){
+ while(!is_header(x))
+ x = NodeTraits::get_parent(x);
+ erase(x, node);
+ }
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
+ static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
+ static bool unique(const const_node_ptr & node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
+ static std::size_t size(const const_node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
+ static node_ptr next_node(const node_ptr & node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
+ static node_ptr prev_node(const node_ptr & node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
+ static void init(const node_ptr & node);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Requires</b>: node must not be part of any tree.
+ //!
+ //! <b>Effects</b>: Initializes the header to represent an empty tree.
+ //! unique(header) == true.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
+ static void init_header(node_ptr header)
+ {
+ bstree_algo::init_header(header);
+ NodeTraits::set_balance(header, NodeTraits::zero());
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
+ static node_ptr erase(node_ptr header, node_ptr z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bstree_algo::erase(header, z, info);
+ rebalance_after_erasure(header, z, info);
+ return z;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare>
+ static bool transfer_unique
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bool const transferred = bstree_algo::transfer_unique(header1, comp, header2, z, info);
+ if(transferred){
+ rebalance_after_erasure(header2, z, info);
+ rebalance_after_insertion(header1, z);
+ }
+ return transferred;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare>
+ static void transfer_equal
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bstree_algo::transfer_equal(header1, comp, header2, z, info);
+ rebalance_after_erasure(header2, z, info);
+ rebalance_after_insertion(header1, z);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ static void clone
+ (const const_node_ptr & source_header, node_ptr target_header, Cloner cloner, Disposer disposer)
+ {
+ avltree_node_cloner<NodeTraits, Cloner> new_cloner(cloner);
+ bstree_algo::clone(source_header, target_header, new_cloner, disposer);
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
+ template<class Disposer>
+ static void clear_and_dispose(const node_ptr & header, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr lower_bound
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr upper_bound
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr find
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> equal_range
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> bounded_range
+ (const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
+ , bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare>
+ static node_ptr insert_equal_upper_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp)
+ {
+ bstree_algo::insert_equal_upper_bound(h, new_node, comp);
+ rebalance_after_insertion(h, new_node);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_lower_bound(node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare>
+ static node_ptr insert_equal_lower_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp)
+ {
+ bstree_algo::insert_equal_lower_bound(h, new_node, comp);
+ rebalance_after_insertion(h, new_node);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal(node_ptr,node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare>
+ static node_ptr insert_equal
+ (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp)
+ {
+ bstree_algo::insert_equal(header, hint, new_node, comp);
+ rebalance_after_insertion(header, new_node);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(node_ptr,node_ptr,node_ptr)
+ static node_ptr insert_before
+ (node_ptr header, node_ptr pos, node_ptr new_node)
+ {
+ bstree_algo::insert_before(header, pos, new_node);
+ rebalance_after_insertion(header, new_node);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::push_back(node_ptr,node_ptr)
+ static void push_back(node_ptr header, node_ptr new_node)
+ {
+ bstree_algo::push_back(header, new_node);
+ rebalance_after_insertion(header, new_node);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::push_front(node_ptr,node_ptr)
+ static void push_front(node_ptr header, node_ptr new_node)
+ {
+ bstree_algo::push_front(header, new_node);
+ rebalance_after_insertion(header, new_node);
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const const_node_ptr & header, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const const_node_ptr & header, const node_ptr &hint, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(node_ptr,node_ptr,const insert_commit_data &)
+ static void insert_unique_commit
+ (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data)
+ {
+ bstree_algo::insert_unique_commit(header, new_value, commit_data);
+ rebalance_after_insertion(header, new_value);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
+ static bool is_header(const const_node_ptr & p)
+ { return NodeTraits::get_balance(p) == NodeTraits::zero() && bstree_algo::is_header(p); }
+
+
+ /// @cond
+ static bool verify(const node_ptr &header)
+ {
+ std::size_t height;
+ std::size_t count;
+ return verify_recursion(NodeTraits::get_parent(header), count, height);
+ }
+
+ private:
+
+ static bool verify_recursion(node_ptr n, std::size_t &count, std::size_t &height)
+ {
+ if (!n){
+ count = 0;
+ height = 0;
+ return true;
+ }
+ std::size_t leftcount, rightcount;
+ std::size_t leftheight, rightheight;
+ if(!verify_recursion(NodeTraits::get_left (n), leftcount, leftheight) ||
+ !verify_recursion(NodeTraits::get_right(n), rightcount, rightheight) ){
+ return false;
+ }
+ count = 1u + leftcount + rightcount;
+ height = 1u + (leftheight > rightheight ? leftheight : rightheight);
+
+ //If equal height, balance must be zero
+ if(rightheight == leftheight){
+ if(NodeTraits::get_balance(n) != NodeTraits::zero()){
+ BOOST_ASSERT(0);
+ return false;
+ }
+ }
+ //If right is taller than left, then the difference must be at least 1 and the balance positive
+ else if(rightheight > leftheight){
+ if(rightheight - leftheight > 1 ){
+ BOOST_ASSERT(0);
+ return false;
+ }
+ else if(NodeTraits::get_balance(n) != NodeTraits::positive()){
+ BOOST_ASSERT(0);
+ return false;
+ }
+ }
+ //If left is taller than right, then the difference must be at least 1 and the balance negative
+ else{
+ if(leftheight - rightheight > 1 ){
+ BOOST_ASSERT(0);
+ return false;
+ }
+ else if(NodeTraits::get_balance(n) != NodeTraits::negative()){
+ BOOST_ASSERT(0);
+ return false;
+ }
+ }
+ return true;
+ }
+
+ static void rebalance_after_erasure
+ ( node_ptr header, node_ptr z, const typename bstree_algo::data_for_rebalance &info)
+ {
+ if(info.y != z){
+ NodeTraits::set_balance(info.y, NodeTraits::get_balance(z));
+ }
+ //Rebalance avltree
+ rebalance_after_erasure_restore_invariants(header, info.x, info.x_parent);
+ }
+
+ static void rebalance_after_erasure_restore_invariants(node_ptr header, node_ptr x, node_ptr x_parent)
+ {
+ for ( node_ptr root = NodeTraits::get_parent(header)
+ ; x != root
+ ; root = NodeTraits::get_parent(header), x_parent = NodeTraits::get_parent(x)) {
+ const balance x_parent_balance = NodeTraits::get_balance(x_parent);
+ //Don't cache x_is_leftchild or similar because x can be null and
+ //equal to both x_parent_left and x_parent_right
+ const node_ptr x_parent_left (NodeTraits::get_left(x_parent));
+ const node_ptr x_parent_right(NodeTraits::get_right(x_parent));
+
+ if(x_parent_balance == NodeTraits::zero()){
+ NodeTraits::set_balance( x_parent, x == x_parent_right ? NodeTraits::negative() : NodeTraits::positive() );
+ break; // the height didn't change, let's stop here
+ }
+ else if(x_parent_balance == NodeTraits::negative()){
+ if (x == x_parent_left) { ////x is left child or x and sibling are null
+ NodeTraits::set_balance(x_parent, NodeTraits::zero()); // balanced
+ x = x_parent;
+ }
+ else {
+ // x is right child (x_parent_left is the left child)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(x_parent_left);
+ if (NodeTraits::get_balance(x_parent_left) == NodeTraits::positive()) {
+ // x_parent_left MUST have a right child
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_right(x_parent_left));
+ x = avl_rotate_left_right(x_parent, x_parent_left, header);
+ }
+ else {
+ avl_rotate_right(x_parent, x_parent_left, header);
+ x = x_parent_left;
+ }
+
+ // if changed from negative to NodeTraits::positive(), no need to check above
+ if (NodeTraits::get_balance(x) == NodeTraits::positive()){
+ break;
+ }
+ }
+ }
+ else if(x_parent_balance == NodeTraits::positive()){
+ if (x == x_parent_right) { //x is right child or x and sibling are null
+ NodeTraits::set_balance(x_parent, NodeTraits::zero()); // balanced
+ x = x_parent;
+ }
+ else {
+ // x is left child (x_parent_right is the right child)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(x_parent_right);
+ if (NodeTraits::get_balance(x_parent_right) == NodeTraits::negative()) {
+ // x_parent_right MUST have then a left child
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_left(x_parent_right));
+ x = avl_rotate_right_left(x_parent, x_parent_right, header);
+ }
+ else {
+ avl_rotate_left(x_parent, x_parent_right, header);
+ x = x_parent_right;
+ }
+ // if changed from NodeTraits::positive() to negative, no need to check above
+ if (NodeTraits::get_balance(x) == NodeTraits::negative()){
+ break;
+ }
+ }
+ }
+ else{
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached
+ }
+ }
+ }
+
+ static void rebalance_after_insertion(node_ptr header, node_ptr x)
+ {
+ NodeTraits::set_balance(x, NodeTraits::zero());
+ // Rebalance.
+ for(node_ptr root = NodeTraits::get_parent(header); x != root; root = NodeTraits::get_parent(header)){
+ node_ptr const x_parent(NodeTraits::get_parent(x));
+ node_ptr const x_parent_left(NodeTraits::get_left(x_parent));
+ const balance x_parent_balance = NodeTraits::get_balance(x_parent);
+ const bool x_is_leftchild(x == x_parent_left);
+ if(x_parent_balance == NodeTraits::zero()){
+ // if x is left, parent will have parent->bal_factor = negative
+ // else, parent->bal_factor = NodeTraits::positive()
+ NodeTraits::set_balance( x_parent, x_is_leftchild ? NodeTraits::negative() : NodeTraits::positive() );
+ x = x_parent;
+ }
+ else if(x_parent_balance == NodeTraits::positive()){
+ // if x is a left child, parent->bal_factor = zero
+ if (x_is_leftchild)
+ NodeTraits::set_balance(x_parent, NodeTraits::zero());
+ else{ // x is a right child, needs rebalancing
+ if (NodeTraits::get_balance(x) == NodeTraits::negative())
+ avl_rotate_right_left(x_parent, x, header);
+ else
+ avl_rotate_left(x_parent, x, header);
+ }
+ break;
+ }
+ else if(x_parent_balance == NodeTraits::negative()){
+ // if x is a left child, needs rebalancing
+ if (x_is_leftchild) {
+ if (NodeTraits::get_balance(x) == NodeTraits::positive())
+ avl_rotate_left_right(x_parent, x, header);
+ else
+ avl_rotate_right(x_parent, x, header);
+ }
+ else
+ NodeTraits::set_balance(x_parent, NodeTraits::zero());
+ break;
+ }
+ else{
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached
+ }
+ }
+ }
+
+ static void left_right_balancing(node_ptr a, node_ptr b, node_ptr c)
+ {
+ // balancing...
+ const balance c_balance = NodeTraits::get_balance(c);
+ const balance zero_balance = NodeTraits::zero();
+ const balance posi_balance = NodeTraits::positive();
+ const balance nega_balance = NodeTraits::negative();
+ NodeTraits::set_balance(c, zero_balance);
+ if(c_balance == nega_balance){
+ NodeTraits::set_balance(a, posi_balance);
+ NodeTraits::set_balance(b, zero_balance);
+ }
+ else if(c_balance == zero_balance){
+ NodeTraits::set_balance(a, zero_balance);
+ NodeTraits::set_balance(b, zero_balance);
+ }
+ else if(c_balance == posi_balance){
+ NodeTraits::set_balance(a, zero_balance);
+ NodeTraits::set_balance(b, nega_balance);
+ }
+ else{
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(false); // never reached
+ }
+ }
+
+ static node_ptr avl_rotate_left_right(const node_ptr a, const node_ptr a_oldleft, node_ptr hdr)
+ { // [note: 'a_oldleft' is 'b']
+ // | | //
+ // a(-2) c //
+ // / \ / \ //
+ // / \ ==> / \ //
+ // (pos)b [g] b a //
+ // / \ / \ / \ //
+ // [d] c [d] e f [g] //
+ // / \ //
+ // e f //
+ const node_ptr c = NodeTraits::get_right(a_oldleft);
+ bstree_algo::rotate_left_no_parent_fix(a_oldleft, c);
+ //No need to link c with a [NodeTraits::set_parent(c, a) + NodeTraits::set_left(a, c)]
+ //as c is not root and another rotation is coming
+ bstree_algo::rotate_right(a, c, NodeTraits::get_parent(a), hdr);
+ left_right_balancing(a, a_oldleft, c);
+ return c;
+ }
+
+ static node_ptr avl_rotate_right_left(const node_ptr a, const node_ptr a_oldright, node_ptr hdr)
+ { // [note: 'a_oldright' is 'b']
+ // | | //
+ // a(pos) c //
+ // / \ / \ //
+ // / \ / \ //
+ // [d] b(neg) ==> a b //
+ // / \ / \ / \ //
+ // c [g] [d] e f [g] //
+ // / \ //
+ // e f //
+ const node_ptr c (NodeTraits::get_left(a_oldright));
+ bstree_algo::rotate_right_no_parent_fix(a_oldright, c);
+ //No need to link c with a [NodeTraits::set_parent(c, a) + NodeTraits::set_right(a, c)]
+ //as c is not root and another rotation is coming.
+ bstree_algo::rotate_left(a, c, NodeTraits::get_parent(a), hdr);
+ left_right_balancing(a_oldright, a, c);
+ return c;
+ }
+
+ static void avl_rotate_left(node_ptr x, node_ptr x_oldright, node_ptr hdr)
+ {
+ bstree_algo::rotate_left(x, x_oldright, NodeTraits::get_parent(x), hdr);
+
+ // reset the balancing factor
+ if (NodeTraits::get_balance(x_oldright) == NodeTraits::positive()) {
+ NodeTraits::set_balance(x, NodeTraits::zero());
+ NodeTraits::set_balance(x_oldright, NodeTraits::zero());
+ }
+ else { // this doesn't happen during insertions
+ NodeTraits::set_balance(x, NodeTraits::positive());
+ NodeTraits::set_balance(x_oldright, NodeTraits::negative());
+ }
+ }
+
+ static void avl_rotate_right(node_ptr x, node_ptr x_oldleft, node_ptr hdr)
+ {
+ bstree_algo::rotate_right(x, x_oldleft, NodeTraits::get_parent(x), hdr);
+
+ // reset the balancing factor
+ if (NodeTraits::get_balance(x_oldleft) == NodeTraits::negative()) {
+ NodeTraits::set_balance(x, NodeTraits::zero());
+ NodeTraits::set_balance(x_oldleft, NodeTraits::zero());
+ }
+ else { // this doesn't happen during insertions
+ NodeTraits::set_balance(x, NodeTraits::negative());
+ NodeTraits::set_balance(x_oldleft, NodeTraits::positive());
+ }
+ }
+
+ /// @endcond
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<AvlTreeAlgorithms, NodeTraits>
+{
+ typedef avltree_algorithms<NodeTraits> type;
+};
+
+template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct get_node_checker<AvlTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
+{
+ typedef detail::avltree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_AVLTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/bs_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/bs_set.hpp
index 693b6d855c6..693b6d855c6 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/bs_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/bs_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/bs_set_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/bs_set_hook.hpp
index a64c15ace59..a64c15ace59 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/bs_set_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/bs_set_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/bstree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/bstree.hpp
index 410eedf9303..410eedf9303 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/bstree.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/bstree.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/bstree_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/bstree_algorithms.hpp
new file mode 100644
index 00000000000..006d9c238bf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/bstree_algorithms.hpp
@@ -0,0 +1,2097 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_BSTREE_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_BSTREE_ALGORITHMS_HPP
+
+#include <cstddef>
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/bstree_algorithms_base.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/detail/uncast.hpp>
+#include <boost/intrusive/detail/math.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+
+#include <boost/intrusive/detail/minimal_pair_header.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+//! This type is the information that will be filled by insert_unique_check
+template <class NodePtr>
+struct insert_commit_data_t
+{
+ BOOST_INTRUSIVE_FORCEINLINE insert_commit_data_t()
+ : link_left(false), node()
+ {}
+ bool link_left;
+ NodePtr node;
+};
+
+template <class NodePtr>
+struct data_for_rebalance_t
+{
+ NodePtr x;
+ NodePtr x_parent;
+ NodePtr y;
+};
+
+namespace detail {
+
+template<class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct bstree_node_checker
+ : public ExtraChecker
+{
+ typedef ExtraChecker base_checker_t;
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+
+ struct return_type
+ : public base_checker_t::return_type
+ {
+ BOOST_INTRUSIVE_FORCEINLINE return_type()
+ : min_key_node_ptr(const_node_ptr()), max_key_node_ptr(const_node_ptr()), node_count(0)
+ {}
+
+ const_node_ptr min_key_node_ptr;
+ const_node_ptr max_key_node_ptr;
+ size_t node_count;
+ };
+
+ BOOST_INTRUSIVE_FORCEINLINE bstree_node_checker(const NodePtrCompare& comp, ExtraChecker extra_checker)
+ : base_checker_t(extra_checker), comp_(comp)
+ {}
+
+ void operator () (const const_node_ptr& p,
+ const return_type& check_return_left, const return_type& check_return_right,
+ return_type& check_return)
+ {
+ if (check_return_left.max_key_node_ptr)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(!comp_(p, check_return_left.max_key_node_ptr));
+ if (check_return_right.min_key_node_ptr)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(!comp_(check_return_right.min_key_node_ptr, p));
+ check_return.min_key_node_ptr = node_traits::get_left(p)? check_return_left.min_key_node_ptr : p;
+ check_return.max_key_node_ptr = node_traits::get_right(p)? check_return_right.max_key_node_ptr : p;
+ check_return.node_count = check_return_left.node_count + check_return_right.node_count + 1;
+ base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
+ }
+
+ const NodePtrCompare comp_;
+};
+
+} // namespace detail
+
+/// @endcond
+
+
+
+//! This is an implementation of a binary search tree.
+//! A node in the search tree has references to its children and its parent. This
+//! is to allow traversal of the whole tree from a given node making the
+//! implementation of iterator a pointer to a node.
+//! At the top of the tree a node is used specially. This node's parent pointer
+//! is pointing to the root of the tree. Its left pointer points to the
+//! leftmost node in the tree and the right pointer to the rightmost one.
+//! This node is used to represent the end-iterator.
+//!
+//! +---------+
+//! header------------------------------>| |
+//! | |
+//! +----------(left)--------| |--------(right)---------+
+//! | +---------+ |
+//! | | |
+//! | | (parent) |
+//! | | |
+//! | | |
+//! | +---------+ |
+//! root of tree ..|......................> | | |
+//! | | D | |
+//! | | | |
+//! | +-------+---------+-------+ |
+//! | | | |
+//! | | | |
+//! | | | |
+//! | | | |
+//! | | | |
+//! | +---------+ +---------+ |
+//! | | | | | |
+//! | | B | | F | |
+//! | | | | | |
+//! | +--+---------+--+ +--+---------+--+ |
+//! | | | | | |
+//! | | | | | |
+//! | | | | | |
+//! | +---+-----+ +-----+---+ +---+-----+ +-----+---+ |
+//! +-->| | | | | | | |<--+
+//! | A | | C | | E | | G |
+//! | | | | | | | |
+//! +---------+ +---------+ +---------+ +---------+
+//!
+//! bstree_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the binary search tree
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
+//!
+//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
+//!
+//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
+template<class NodeTraits>
+class bstree_algorithms : public bstree_algorithms_base<NodeTraits>
+{
+ public:
+ typedef typename NodeTraits::node node;
+ typedef NodeTraits node_traits;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+ typedef insert_commit_data_t<node_ptr> insert_commit_data;
+ typedef data_for_rebalance_t<node_ptr> data_for_rebalance;
+
+ /// @cond
+ typedef bstree_algorithms<NodeTraits> this_type;
+ typedef bstree_algorithms_base<NodeTraits> base_type;
+ private:
+ template<class Disposer>
+ struct dispose_subtree_disposer
+ {
+ BOOST_INTRUSIVE_FORCEINLINE dispose_subtree_disposer(Disposer &disp, const node_ptr & subtree)
+ : disposer_(&disp), subtree_(subtree)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE void release()
+ { disposer_ = 0; }
+
+ BOOST_INTRUSIVE_FORCEINLINE ~dispose_subtree_disposer()
+ {
+ if(disposer_){
+ dispose_subtree(subtree_, *disposer_);
+ }
+ }
+ Disposer *disposer_;
+ const node_ptr subtree_;
+ };
+
+ /// @endcond
+
+ public:
+ //! <b>Requires</b>: 'header' is the header node of a tree.
+ //!
+ //! <b>Effects</b>: Returns the first node of the tree, the header if the tree is empty.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr begin_node(const const_node_ptr & header)
+ { return node_traits::get_left(header); }
+
+ //! <b>Requires</b>: 'header' is the header node of a tree.
+ //!
+ //! <b>Effects</b>: Returns the header of the tree.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr end_node(const const_node_ptr & header)
+ { return detail::uncast(header); }
+
+ //! <b>Requires</b>: 'header' is the header node of a tree.
+ //!
+ //! <b>Effects</b>: Returns the root of the tree if any, header otherwise
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr root_node(const const_node_ptr & header)
+ {
+ node_ptr p = node_traits::get_parent(header);
+ return p ? p : detail::uncast(header);
+ }
+
+ //! <b>Requires</b>: 'node' is a node of the tree or a node initialized
+ //! by init(...) or init_node.
+ //!
+ //! <b>Effects</b>: Returns true if the node is initialized by init() or init_node().
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node)
+ { return !NodeTraits::get_parent(node); }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! <b>Requires</b>: 'node' is a node of the tree or a header node.
+ //!
+ //! <b>Effects</b>: Returns the header of the tree.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_header(const const_node_ptr & node);
+ #endif
+
+ //! <b>Requires</b>: node1 and node2 can't be header nodes
+ //! of two trees.
+ //!
+ //! <b>Effects</b>: Swaps two nodes. After the function node1 will be inserted
+ //! in the position node2 before the function. node2 will be inserted in the
+ //! position node1 had before the function.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This function will break container ordering invariants if
+ //! node1 and node2 are not equivalent according to the ordering rules.
+ //!
+ //!Experimental function
+ static void swap_nodes(node_ptr node1, node_ptr node2)
+ {
+ if(node1 == node2)
+ return;
+
+ node_ptr header1(base_type::get_header(node1)), header2(base_type::get_header(node2));
+ swap_nodes(node1, header1, node2, header2);
+ }
+
+ //! <b>Requires</b>: node1 and node2 can't be header nodes
+ //! of two trees with header header1 and header2.
+ //!
+ //! <b>Effects</b>: Swaps two nodes. After the function node1 will be inserted
+ //! in the position node2 before the function. node2 will be inserted in the
+ //! position node1 had before the function.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This function will break container ordering invariants if
+ //! node1 and node2 are not equivalent according to the ordering rules.
+ //!
+ //!Experimental function
+ static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2)
+ {
+ if(node1 == node2)
+ return;
+
+ //node1 and node2 must not be header nodes
+ //BOOST_INTRUSIVE_INVARIANT_ASSERT((header1 != node1 && header2 != node2));
+ if(header1 != header2){
+ //Update header1 if necessary
+ if(node1 == NodeTraits::get_left(header1)){
+ NodeTraits::set_left(header1, node2);
+ }
+
+ if(node1 == NodeTraits::get_right(header1)){
+ NodeTraits::set_right(header1, node2);
+ }
+
+ if(node1 == NodeTraits::get_parent(header1)){
+ NodeTraits::set_parent(header1, node2);
+ }
+
+ //Update header2 if necessary
+ if(node2 == NodeTraits::get_left(header2)){
+ NodeTraits::set_left(header2, node1);
+ }
+
+ if(node2 == NodeTraits::get_right(header2)){
+ NodeTraits::set_right(header2, node1);
+ }
+
+ if(node2 == NodeTraits::get_parent(header2)){
+ NodeTraits::set_parent(header2, node1);
+ }
+ }
+ else{
+ //If both nodes are from the same tree
+ //Update header if necessary
+ if(node1 == NodeTraits::get_left(header1)){
+ NodeTraits::set_left(header1, node2);
+ }
+ else if(node2 == NodeTraits::get_left(header2)){
+ NodeTraits::set_left(header2, node1);
+ }
+
+ if(node1 == NodeTraits::get_right(header1)){
+ NodeTraits::set_right(header1, node2);
+ }
+ else if(node2 == NodeTraits::get_right(header2)){
+ NodeTraits::set_right(header2, node1);
+ }
+
+ if(node1 == NodeTraits::get_parent(header1)){
+ NodeTraits::set_parent(header1, node2);
+ }
+ else if(node2 == NodeTraits::get_parent(header2)){
+ NodeTraits::set_parent(header2, node1);
+ }
+
+ //Adjust data in nodes to be swapped
+ //so that final link swap works as expected
+ if(node1 == NodeTraits::get_parent(node2)){
+ NodeTraits::set_parent(node2, node2);
+
+ if(node2 == NodeTraits::get_right(node1)){
+ NodeTraits::set_right(node1, node1);
+ }
+ else{
+ NodeTraits::set_left(node1, node1);
+ }
+ }
+ else if(node2 == NodeTraits::get_parent(node1)){
+ NodeTraits::set_parent(node1, node1);
+
+ if(node1 == NodeTraits::get_right(node2)){
+ NodeTraits::set_right(node2, node2);
+ }
+ else{
+ NodeTraits::set_left(node2, node2);
+ }
+ }
+ }
+
+ //Now swap all the links
+ node_ptr temp;
+ //swap left link
+ temp = NodeTraits::get_left(node1);
+ NodeTraits::set_left(node1, NodeTraits::get_left(node2));
+ NodeTraits::set_left(node2, temp);
+ //swap right link
+ temp = NodeTraits::get_right(node1);
+ NodeTraits::set_right(node1, NodeTraits::get_right(node2));
+ NodeTraits::set_right(node2, temp);
+ //swap parent link
+ temp = NodeTraits::get_parent(node1);
+ NodeTraits::set_parent(node1, NodeTraits::get_parent(node2));
+ NodeTraits::set_parent(node2, temp);
+
+ //Now adjust adjacent nodes for newly inserted node 1
+ if((temp = NodeTraits::get_left(node1))){
+ NodeTraits::set_parent(temp, node1);
+ }
+ if((temp = NodeTraits::get_right(node1))){
+ NodeTraits::set_parent(temp, node1);
+ }
+ if((temp = NodeTraits::get_parent(node1)) &&
+ //The header has been already updated so avoid it
+ temp != header2){
+ if(NodeTraits::get_left(temp) == node2){
+ NodeTraits::set_left(temp, node1);
+ }
+ if(NodeTraits::get_right(temp) == node2){
+ NodeTraits::set_right(temp, node1);
+ }
+ }
+ //Now adjust adjacent nodes for newly inserted node 2
+ if((temp = NodeTraits::get_left(node2))){
+ NodeTraits::set_parent(temp, node2);
+ }
+ if((temp = NodeTraits::get_right(node2))){
+ NodeTraits::set_parent(temp, node2);
+ }
+ if((temp = NodeTraits::get_parent(node2)) &&
+ //The header has been already updated so avoid it
+ temp != header1){
+ if(NodeTraits::get_left(temp) == node1){
+ NodeTraits::set_left(temp, node2);
+ }
+ if(NodeTraits::get_right(temp) == node1){
+ NodeTraits::set_right(temp, node2);
+ }
+ }
+ }
+
+ //! <b>Requires</b>: node_to_be_replaced must be inserted in a tree
+ //! and new_node must not be inserted in a tree.
+ //!
+ //! <b>Effects</b>: Replaces node_to_be_replaced in its position in the
+ //! tree with new_node. The tree does not need to be rebalanced
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This function will break container ordering invariants if
+ //! new_node is not equivalent to node_to_be_replaced according to the
+ //! ordering rules. This function is faster than erasing and inserting
+ //! the node, since no rebalancing and comparison is needed. Experimental function
+ BOOST_INTRUSIVE_FORCEINLINE static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node)
+ {
+ if(node_to_be_replaced == new_node)
+ return;
+ replace_node(node_to_be_replaced, base_type::get_header(node_to_be_replaced), new_node);
+ }
+
+ //! <b>Requires</b>: node_to_be_replaced must be inserted in a tree
+ //! with header "header" and new_node must not be inserted in a tree.
+ //!
+ //! <b>Effects</b>: Replaces node_to_be_replaced in its position in the
+ //! tree with new_node. The tree does not need to be rebalanced
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This function will break container ordering invariants if
+ //! new_node is not equivalent to node_to_be_replaced according to the
+ //! ordering rules. This function is faster than erasing and inserting
+ //! the node, since no rebalancing or comparison is needed. Experimental function
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node)
+ {
+ if(node_to_be_replaced == new_node)
+ return;
+
+ //Update header if necessary
+ if(node_to_be_replaced == NodeTraits::get_left(header)){
+ NodeTraits::set_left(header, new_node);
+ }
+
+ if(node_to_be_replaced == NodeTraits::get_right(header)){
+ NodeTraits::set_right(header, new_node);
+ }
+
+ if(node_to_be_replaced == NodeTraits::get_parent(header)){
+ NodeTraits::set_parent(header, new_node);
+ }
+
+ //Now set data from the original node
+ node_ptr temp;
+ NodeTraits::set_left(new_node, NodeTraits::get_left(node_to_be_replaced));
+ NodeTraits::set_right(new_node, NodeTraits::get_right(node_to_be_replaced));
+ NodeTraits::set_parent(new_node, NodeTraits::get_parent(node_to_be_replaced));
+
+ //Now adjust adjacent nodes for newly inserted node
+ if((temp = NodeTraits::get_left(new_node))){
+ NodeTraits::set_parent(temp, new_node);
+ }
+ if((temp = NodeTraits::get_right(new_node))){
+ NodeTraits::set_parent(temp, new_node);
+ }
+ if((temp = NodeTraits::get_parent(new_node)) &&
+ //The header has been already updated so avoid it
+ temp != header){
+ if(NodeTraits::get_left(temp) == node_to_be_replaced){
+ NodeTraits::set_left(temp, new_node);
+ }
+ if(NodeTraits::get_right(temp) == node_to_be_replaced){
+ NodeTraits::set_right(temp, new_node);
+ }
+ }
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! <b>Requires</b>: 'node' is a node from the tree except the header.
+ //!
+ //! <b>Effects</b>: Returns the next node of the tree.
+ //!
+ //! <b>Complexity</b>: Average constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr next_node(const node_ptr & node);
+
+ //! <b>Requires</b>: 'node' is a node from the tree except the leftmost node.
+ //!
+ //! <b>Effects</b>: Returns the previous node of the tree.
+ //!
+ //! <b>Complexity</b>: Average constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr prev_node(const node_ptr & node);
+
+ //! <b>Requires</b>: 'node' is a node of a tree but not the header.
+ //!
+ //! <b>Effects</b>: Returns the minimum node of the subtree starting at p.
+ //!
+ //! <b>Complexity</b>: Logarithmic to the size of the subtree.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr minimum(node_ptr node);
+
+ //! <b>Requires</b>: 'node' is a node of a tree but not the header.
+ //!
+ //! <b>Effects</b>: Returns the maximum node of the subtree starting at p.
+ //!
+ //! <b>Complexity</b>: Logarithmic to the size of the subtree.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr maximum(node_ptr node);
+ #endif
+
+ //! <b>Requires</b>: 'node' must not be part of any tree.
+ //!
+ //! <b>Effects</b>: After the function unique(node) == true.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
+ BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr node)
+ {
+ NodeTraits::set_parent(node, node_ptr());
+ NodeTraits::set_left(node, node_ptr());
+ NodeTraits::set_right(node, node_ptr());
+ };
+
+ //! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
+ {
+ return !NodeTraits::get_parent(node) &&
+ !NodeTraits::get_left(node) &&
+ !NodeTraits::get_right(node) ;
+ };
+
+ //! <b>Requires</b>: node must not be part of any tree.
+ //!
+ //! <b>Effects</b>: Initializes the header to represent an empty tree.
+ //! unique(header) == true.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr header)
+ {
+ NodeTraits::set_parent(header, node_ptr());
+ NodeTraits::set_left(header, header);
+ NodeTraits::set_right(header, header);
+ }
+
+ //! <b>Requires</b>: "disposer" must be an object function
+ //! taking a node_ptr parameter and shouldn't throw.
+ //!
+ //! <b>Effects</b>: Empties the target tree calling
+ //! <tt>void disposer::operator()(const node_ptr &)</tt> for every node of the tree
+ //! except the header.
+ //!
+ //! <b>Complexity</b>: Linear to the number of element of the source tree plus the.
+ //! number of elements of tree target tree when calling this function.
+ //!
+ //! <b>Throws</b>: If cloner functor throws. If this happens target nodes are disposed.
+ template<class Disposer>
+ static void clear_and_dispose(const node_ptr & header, Disposer disposer)
+ {
+ node_ptr source_root = NodeTraits::get_parent(header);
+ if(!source_root)
+ return;
+ dispose_subtree(source_root, disposer);
+ init_header(header);
+ }
+
+ //! <b>Requires</b>: header is the header of a tree.
+ //!
+ //! <b>Effects</b>: Unlinks the leftmost node from the tree, and
+ //! updates the header link to the new leftmost node.
+ //!
+ //! <b>Complexity</b>: Average complexity is constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Notes</b>: This function breaks the tree and the tree can
+ //! only be used for more unlink_leftmost_without_rebalance calls.
+ //! This function is normally used to achieve a step by step
+ //! controlled destruction of the tree.
+ static node_ptr unlink_leftmost_without_rebalance(node_ptr header)
+ {
+ node_ptr leftmost = NodeTraits::get_left(header);
+ if (leftmost == header)
+ return node_ptr();
+ node_ptr leftmost_parent(NodeTraits::get_parent(leftmost));
+ node_ptr leftmost_right (NodeTraits::get_right(leftmost));
+ bool is_root = leftmost_parent == header;
+
+ if (leftmost_right){
+ NodeTraits::set_parent(leftmost_right, leftmost_parent);
+ NodeTraits::set_left(header, base_type::minimum(leftmost_right));
+
+ if (is_root)
+ NodeTraits::set_parent(header, leftmost_right);
+ else
+ NodeTraits::set_left(NodeTraits::get_parent(header), leftmost_right);
+ }
+ else if (is_root){
+ NodeTraits::set_parent(header, node_ptr());
+ NodeTraits::set_left(header, header);
+ NodeTraits::set_right(header, header);
+ }
+ else{
+ NodeTraits::set_left(leftmost_parent, node_ptr());
+ NodeTraits::set_left(header, leftmost_parent);
+ }
+ return leftmost;
+ }
+
+ //! <b>Requires</b>: node is a node of the tree but it's not the header.
+ //!
+ //! <b>Effects</b>: Returns the number of nodes of the subtree.
+ //!
+ //! <b>Complexity</b>: Linear time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static std::size_t size(const const_node_ptr & header)
+ {
+ node_ptr beg(begin_node(header));
+ node_ptr end(end_node(header));
+ std::size_t i = 0;
+ for(;beg != end; beg = base_type::next_node(beg)) ++i;
+ return i;
+ }
+
+ //! <b>Requires</b>: header1 and header2 must be the header nodes
+ //! of two trees.
+ //!
+ //! <b>Effects</b>: Swaps two trees. After the function header1 will contain
+ //! links to the second tree and header2 will have links to the first tree.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void swap_tree(node_ptr header1, node_ptr header2)
+ {
+ if(header1 == header2)
+ return;
+
+ node_ptr tmp;
+
+ //Parent swap
+ tmp = NodeTraits::get_parent(header1);
+ NodeTraits::set_parent(header1, NodeTraits::get_parent(header2));
+ NodeTraits::set_parent(header2, tmp);
+ //Left swap
+ tmp = NodeTraits::get_left(header1);
+ NodeTraits::set_left(header1, NodeTraits::get_left(header2));
+ NodeTraits::set_left(header2, tmp);
+ //Right swap
+ tmp = NodeTraits::get_right(header1);
+ NodeTraits::set_right(header1, NodeTraits::get_right(header2));
+ NodeTraits::set_right(header2, tmp);
+
+ //Now test parent
+ node_ptr h1_parent(NodeTraits::get_parent(header1));
+ if(h1_parent){
+ NodeTraits::set_parent(h1_parent, header1);
+ }
+ else{
+ NodeTraits::set_left(header1, header1);
+ NodeTraits::set_right(header1, header1);
+ }
+
+ node_ptr h2_parent(NodeTraits::get_parent(header2));
+ if(h2_parent){
+ NodeTraits::set_parent(h2_parent, header2);
+ }
+ else{
+ NodeTraits::set_left(header2, header2);
+ NodeTraits::set_right(header2, header2);
+ }
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! <b>Requires</b>: p is a node of a tree.
+ //!
+ //! <b>Effects</b>: Returns true if p is the header of the tree.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static bool is_header(const const_node_ptr & p);
+ #endif
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
+ //!
+ //! <b>Effects</b>: Returns a node_ptr to the first element that is equivalent to
+ //! "key" according to "comp" or "header" if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr find
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ node_ptr end = detail::uncast(header);
+ node_ptr y = lower_bound(header, key, comp);
+ return (y == end || comp(key, y)) ? end : y;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
+ //! 'lower_key' must not be greater than 'upper_key' according to 'comp'. If
+ //! 'lower_key' == 'upper_key', ('left_closed' || 'right_closed') must be true.
+ //!
+ //! <b>Effects</b>: Returns an a pair with the following criteria:
+ //!
+ //! first = lower_bound(lower_key) if left_closed, upper_bound(lower_key) otherwise
+ //!
+ //! second = upper_bound(upper_key) if right_closed, lower_bound(upper_key) otherwise
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ //!
+ //! <b>Note</b>: This function can be more efficient than calling upper_bound
+ //! and lower_bound for lower_key and upper_key.
+ //!
+ //! <b>Note</b>: Experimental function, the interface might change.
+ template< class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> bounded_range
+ ( const const_node_ptr & header
+ , const KeyType &lower_key
+ , const KeyType &upper_key
+ , KeyNodePtrCompare comp
+ , bool left_closed
+ , bool right_closed)
+ {
+ node_ptr y = detail::uncast(header);
+ node_ptr x = NodeTraits::get_parent(header);
+
+ while(x){
+ //If x is less than lower_key the target
+ //range is on the right part
+ if(comp(x, lower_key)){
+ //Check for invalid input range
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(comp(x, upper_key));
+ x = NodeTraits::get_right(x);
+ }
+ //If the upper_key is less than x, the target
+ //range is on the left part
+ else if(comp(upper_key, x)){
+ y = x;
+ x = NodeTraits::get_left(x);
+ }
+ else{
+ //x is inside the bounded range(lower_key <= x <= upper_key),
+ //so we must split lower and upper searches
+ //
+ //Sanity check: if lower_key and upper_key are equal, then both left_closed and right_closed can't be false
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(left_closed || right_closed || comp(lower_key, x) || comp(x, upper_key));
+ return std::pair<node_ptr,node_ptr>(
+ left_closed
+ //If left_closed, then comp(x, lower_key) is already the lower_bound
+ //condition so we save one comparison and go to the next level
+ //following traditional lower_bound algo
+ ? lower_bound_loop(NodeTraits::get_left(x), x, lower_key, comp)
+ //If left-open, comp(x, lower_key) is not the upper_bound algo
+ //condition so we must recheck current 'x' node with upper_bound algo
+ : upper_bound_loop(x, y, lower_key, comp)
+ ,
+ right_closed
+ //If right_closed, then comp(upper_key, x) is already the upper_bound
+ //condition so we can save one comparison and go to the next level
+ //following lower_bound algo
+ ? upper_bound_loop(NodeTraits::get_right(x), y, upper_key, comp)
+ //If right-open, comp(upper_key, x) is not the lower_bound algo
+ //condition so we must recheck current 'x' node with lower_bound algo
+ : lower_bound_loop(x, y, upper_key, comp)
+ );
+ }
+ }
+ return std::pair<node_ptr,node_ptr> (y, y);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
+ //!
+ //! <b>Effects</b>: Returns the number of elements with a key equivalent to "key"
+ //! according to "comp".
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::size_t count
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ std::pair<node_ptr, node_ptr> ret = equal_range(header, key, comp);
+ std::size_t n = 0;
+ while(ret.first != ret.second){
+ ++n;
+ ret.first = base_type::next_node(ret.first);
+ }
+ return n;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
+ //!
+ //! <b>Effects</b>: Returns an a pair of node_ptr delimiting a range containing
+ //! all elements that are equivalent to "key" according to "comp" or an
+ //! empty range that indicates the position where those elements would be
+ //! if there are no equivalent elements.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class KeyType, class KeyNodePtrCompare>
+ BOOST_INTRUSIVE_FORCEINLINE static std::pair<node_ptr, node_ptr> equal_range
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ return bounded_range(header, key, key, comp, true, true);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
+ //!
+ //! <b>Effects</b>: Returns an a pair of node_ptr delimiting a range containing
+ //! the first element that is equivalent to "key" according to "comp" or an
+ //! empty range that indicates the position where that element would be
+ //! if there are no equivalent elements.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> lower_bound_range
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ node_ptr const lb(lower_bound(header, key, comp));
+ std::pair<node_ptr, node_ptr> ret_ii(lb, lb);
+ if(lb != header && !comp(key, lb)){
+ ret_ii.second = base_type::next_node(ret_ii.second);
+ }
+ return ret_ii;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
+ //!
+ //! <b>Effects</b>: Returns a node_ptr to the first element that is
+ //! not less than "key" according to "comp" or "header" if that element does
+ //! not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class KeyType, class KeyNodePtrCompare>
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr lower_bound
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ return lower_bound_loop(NodeTraits::get_parent(header), detail::uncast(header), key, comp);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. KeyNodePtrCompare can compare KeyType with tree's node_ptrs.
+ //!
+ //! <b>Effects</b>: Returns a node_ptr to the first element that is greater
+ //! than "key" according to "comp" or "header" if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class KeyType, class KeyNodePtrCompare>
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr upper_bound
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ return upper_bound_loop(NodeTraits::get_parent(header), detail::uncast(header), key, comp);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! "commit_data" must have been obtained from a previous call to
+ //! "insert_unique_check". No objects should have been inserted or erased
+ //! from the set between the "insert_unique_check" that filled "commit_data"
+ //! and the call to "insert_commit".
+ //!
+ //!
+ //! <b>Effects</b>: Inserts new_node in the set using the information obtained
+ //! from the "commit_data" that a previous "insert_check" filled.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Notes</b>: This function has only sense if a "insert_unique_check" has been
+ //! previously executed to fill "commit_data". No value should be inserted or
+ //! erased between the "insert_check" and "insert_commit" calls.
+ BOOST_INTRUSIVE_FORCEINLINE static void insert_unique_commit
+ (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data)
+ { return insert_commit(header, new_value, commit_data); }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares KeyType with a node_ptr.
+ //!
+ //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
+ //! tree according to "comp" and obtains the needed information to realize
+ //! a constant-time node insertion if there is no equivalent node.
+ //!
+ //! <b>Returns</b>: If there is an equivalent value
+ //! returns a pair containing a node_ptr to the already present node
+ //! and false. If there is not equivalent key can be inserted returns true
+ //! in the returned pair's boolean and fills "commit_data" that is meant to
+ //! be used with the "insert_commit" function to achieve a constant-time
+ //! insertion function.
+ //!
+ //! <b>Complexity</b>: Average complexity is at most logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ //!
+ //! <b>Notes</b>: This function is used to improve performance when constructing
+ //! a node is expensive and the user does not want to have two equivalent nodes
+ //! in the tree: if there is an equivalent value
+ //! the constructed object must be discarded. Many times, the part of the
+ //! node that is used to impose the order is much cheaper to construct
+ //! than the node and this function offers the possibility to use that part
+ //! to check if the insertion will be successful.
+ //!
+ //! If the check is successful, the user can construct the node and use
+ //! "insert_commit" to insert the node in constant-time. This gives a total
+ //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
+ //! if no more objects are inserted or erased from the set.
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const const_node_ptr & header, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ std::size_t depth = 0;
+ node_ptr h(detail::uncast(header));
+ node_ptr y(h);
+ node_ptr x(NodeTraits::get_parent(y));
+ node_ptr prev = node_ptr();
+
+ //Find the upper bound, cache the previous value and if we should
+ //store it in the left or right node
+ bool left_child = true;
+ while(x){
+ ++depth;
+ y = x;
+ x = (left_child = comp(key, x)) ?
+ NodeTraits::get_left(x) : (prev = y, NodeTraits::get_right(x));
+ }
+
+ if(pdepth) *pdepth = depth;
+
+ //Since we've found the upper bound there is no other value with the same key if:
+ // - There is no previous node
+ // - The previous node is less than the key
+ const bool not_present = !prev || comp(prev, key);
+ if(not_present){
+ commit_data.link_left = left_child;
+ commit_data.node = y;
+ }
+ return std::pair<node_ptr, bool>(prev, not_present);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares KeyType with a node_ptr.
+ //! "hint" is node from the "header"'s tree.
+ //!
+ //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
+ //! tree according to "comp" using "hint" as a hint to where it should be
+ //! inserted and obtains the needed information to realize
+ //! a constant-time node insertion if there is no equivalent node.
+ //! If "hint" is the upper_bound the function has constant time
+ //! complexity (two comparisons in the worst case).
+ //!
+ //! <b>Returns</b>: If there is an equivalent value
+ //! returns a pair containing a node_ptr to the already present node
+ //! and false. If there is not equivalent key can be inserted returns true
+ //! in the returned pair's boolean and fills "commit_data" that is meant to
+ //! be used with the "insert_commit" function to achieve a constant-time
+ //! insertion function.
+ //!
+ //! <b>Complexity</b>: Average complexity is at most logarithmic, but it is
+ //! amortized constant time if new_node should be inserted immediately before "hint".
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ //!
+ //! <b>Notes</b>: This function is used to improve performance when constructing
+ //! a node is expensive and the user does not want to have two equivalent nodes
+ //! in the tree: if there is an equivalent value
+ //! the constructed object must be discarded. Many times, the part of the
+ //! node that is used to impose the order is much cheaper to construct
+ //! than the node and this function offers the possibility to use that part
+ //! to check if the insertion will be successful.
+ //!
+ //! If the check is successful, the user can construct the node and use
+ //! "insert_commit" to insert the node in constant-time. This gives a total
+ //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
+ //! if no more objects are inserted or erased from the set.
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const const_node_ptr & header, const node_ptr &hint, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ //hint must be bigger than the key
+ if(hint == header || comp(key, hint)){
+ node_ptr prev(hint);
+ //Previous value should be less than the key
+ if(hint == begin_node(header) || comp((prev = base_type::prev_node(hint)), key)){
+ commit_data.link_left = unique(header) || !NodeTraits::get_left(hint);
+ commit_data.node = commit_data.link_left ? hint : prev;
+ if(pdepth){
+ *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1;
+ }
+ return std::pair<node_ptr, bool>(node_ptr(), true);
+ }
+ }
+ //Hint was wrong, use hintless insertion
+ return insert_unique_check(header, key, comp, commit_data, pdepth);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! NodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
+ //! the "header"'s tree.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
+ //! where it will be inserted. If "hint" is the upper_bound
+ //! the insertion takes constant time (two comparisons in the worst case).
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but it is amortized
+ //! constant time if new_node is inserted immediately before "hint".
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class NodePtrCompare>
+ static node_ptr insert_equal
+ (node_ptr h, node_ptr hint, node_ptr new_node, NodePtrCompare comp
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ insert_commit_data commit_data;
+ insert_equal_check(h, hint, new_node, comp, commit_data, pdepth);
+ insert_commit(h, new_node, commit_data);
+ return new_node;
+ }
+
+ //! <b>Requires</b>: "h" must be the header node of a tree.
+ //! NodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares two node_ptrs.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree before the upper bound
+ //! according to "comp".
+ //!
+ //! <b>Complexity</b>: Average complexity for insert element is at
+ //! most logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class NodePtrCompare>
+ static node_ptr insert_equal_upper_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ insert_commit_data commit_data;
+ insert_equal_upper_bound_check(h, new_node, comp, commit_data, pdepth);
+ insert_commit(h, new_node, commit_data);
+ return new_node;
+ }
+
+ //! <b>Requires</b>: "h" must be the header node of a tree.
+ //! NodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares two node_ptrs.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree before the lower bound
+ //! according to "comp".
+ //!
+ //! <b>Complexity</b>: Average complexity for insert element is at
+ //! most logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class NodePtrCompare>
+ static node_ptr insert_equal_lower_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ insert_commit_data commit_data;
+ insert_equal_lower_bound_check(h, new_node, comp, commit_data, pdepth);
+ insert_commit(h, new_node, commit_data);
+ return new_node;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! "pos" must be a valid iterator or header (end) node.
+ //! "pos" must be an iterator pointing to the successor to "new_node"
+ //! once inserted according to the order of already inserted nodes. This function does not
+ //! check "pos" and this precondition must be guaranteed by the caller.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree before "pos".
+ //!
+ //! <b>Complexity</b>: Constant-time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: If "pos" is not the successor of the newly inserted "new_node"
+ //! tree invariants might be broken.
+ static node_ptr insert_before
+ (node_ptr header, node_ptr pos, node_ptr new_node
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ insert_commit_data commit_data;
+ insert_before_check(header, pos, commit_data, pdepth);
+ insert_commit(header, new_node, commit_data);
+ return new_node;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! "new_node" must be, according to the used ordering no less than the
+ //! greatest inserted key.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree before "pos".
+ //!
+ //! <b>Complexity</b>: Constant-time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: If "new_node" is less than the greatest inserted key
+ //! tree invariants are broken. This function is slightly faster than
+ //! using "insert_before".
+ static void push_back
+ (node_ptr header, node_ptr new_node
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ insert_commit_data commit_data;
+ push_back_check(header, commit_data, pdepth);
+ insert_commit(header, new_node, commit_data);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! "new_node" must be, according to the used ordering, no greater than the
+ //! lowest inserted key.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree before "pos".
+ //!
+ //! <b>Complexity</b>: Constant-time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: If "new_node" is greater than the lowest inserted key
+ //! tree invariants are broken. This function is slightly faster than
+ //! using "insert_before".
+ static void push_front
+ (node_ptr header, node_ptr new_node
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ insert_commit_data commit_data;
+ push_front_check(header, commit_data, pdepth);
+ insert_commit(header, new_node, commit_data);
+ }
+
+ //! <b>Requires</b>: 'node' can't be a header node.
+ //!
+ //! <b>Effects</b>: Calculates the depth of a node: the depth of a
+ //! node is the length (number of edges) of the path from the root
+ //! to that node. (The root node is at depth 0.)
+ //!
+ //! <b>Complexity</b>: Logarithmic to the number of nodes in the tree.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static std::size_t depth(const_node_ptr node)
+ {
+ std::size_t depth = 0;
+ node_ptr p_parent;
+ while(node != NodeTraits::get_parent(p_parent = NodeTraits::get_parent(node))){
+ ++depth;
+ node = p_parent;
+ }
+ return depth;
+ }
+
+ //! <b>Requires</b>: "cloner" must be a function
+ //! object taking a node_ptr and returning a new cloned node of it. "disposer" must
+ //! take a node_ptr and shouldn't throw.
+ //!
+ //! <b>Effects</b>: First empties target tree calling
+ //! <tt>void disposer::operator()(const node_ptr &)</tt> for every node of the tree
+ //! except the header.
+ //!
+ //! Then, duplicates the entire tree pointed by "source_header" cloning each
+ //! source node with <tt>node_ptr Cloner::operator()(const node_ptr &)</tt> to obtain
+ //! the nodes of the target tree. If "cloner" throws, the cloned target nodes
+ //! are disposed using <tt>void disposer(const node_ptr &)</tt>.
+ //!
+ //! <b>Complexity</b>: Linear to the number of element of the source tree plus the
+ //! number of elements of tree target tree when calling this function.
+ //!
+ //! <b>Throws</b>: If cloner functor throws. If this happens target nodes are disposed.
+ template <class Cloner, class Disposer>
+ static void clone
+ (const const_node_ptr & source_header, node_ptr target_header, Cloner cloner, Disposer disposer)
+ {
+ if(!unique(target_header)){
+ clear_and_dispose(target_header, disposer);
+ }
+
+ node_ptr leftmost, rightmost;
+ node_ptr new_root = clone_subtree
+ (source_header, target_header, cloner, disposer, leftmost, rightmost);
+
+ //Now update header node
+ NodeTraits::set_parent(target_header, new_root);
+ NodeTraits::set_left (target_header, leftmost);
+ NodeTraits::set_right (target_header, rightmost);
+ }
+
+ //! <b>Requires</b>: header must be the header of a tree, z a node
+ //! of that tree and z != header.
+ //!
+ //! <b>Effects</b>: Erases node "z" from the tree with header "header".
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void erase(node_ptr header, node_ptr z)
+ {
+ data_for_rebalance ignored;
+ erase(header, z, ignored);
+ }
+
+ //! <b>Requires</b>: header1 and header2 must be the headers of trees tree1 and tree2
+ //! respectively, z a non-header node of tree1. NodePtrCompare is the comparison
+ //! function of tree1..
+ //!
+ //! <b>Effects</b>: Transfers node "z" from tree1 to tree2 if tree1 does not contain
+ //! a node that is equivalent to z.
+ //!
+ //! <b>Returns</b>: True if the node was trasferred, false otherwise.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If the comparison throws.
+ template<class NodePtrCompare>
+ BOOST_INTRUSIVE_FORCEINLINE static bool transfer_unique
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z)
+ {
+ data_for_rebalance ignored;
+ return transfer_unique(header1, comp, header2, z, ignored);
+ }
+
+ //! <b>Requires</b>: header1 and header2 must be the headers of trees tree1 and tree2
+ //! respectively, z a non-header node of tree1. NodePtrCompare is the comparison
+ //! function of tree1..
+ //!
+ //! <b>Effects</b>: Transfers node "z" from tree1 to tree2.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: If the comparison throws.
+ template<class NodePtrCompare>
+ BOOST_INTRUSIVE_FORCEINLINE static void transfer_equal
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z)
+ {
+ data_for_rebalance ignored;
+ transfer_equal(header1, comp, header2, z, ignored);
+ }
+
+ //! <b>Requires</b>: node is a tree node but not the header.
+ //!
+ //! <b>Effects</b>: Unlinks the node and rebalances the tree.
+ //!
+ //! <b>Complexity</b>: Average complexity is constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void unlink(node_ptr node)
+ {
+ node_ptr x = NodeTraits::get_parent(node);
+ if(x){
+ while(!base_type::is_header(x))
+ x = NodeTraits::get_parent(x);
+ erase(x, node);
+ }
+ }
+
+ //! <b>Requires</b>: header must be the header of a tree.
+ //!
+ //! <b>Effects</b>: Rebalances the tree.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear.
+ static void rebalance(node_ptr header)
+ {
+ node_ptr root = NodeTraits::get_parent(header);
+ if(root){
+ rebalance_subtree(root);
+ }
+ }
+
+ //! <b>Requires</b>: old_root is a node of a tree. It shall not be null.
+ //!
+ //! <b>Effects</b>: Rebalances the subtree rooted at old_root.
+ //!
+ //! <b>Returns</b>: The new root of the subtree.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear.
+ static node_ptr rebalance_subtree(node_ptr old_root)
+ {
+ //Taken from:
+ //"Tree rebalancing in optimal time and space"
+ //Quentin F. Stout and Bette L. Warren
+
+ //To avoid irregularities in the algorithm (old_root can be a
+ //left or right child or even the root of the tree) just put the
+ //root as the right child of its parent. Before doing this backup
+ //information to restore the original relationship after
+ //the algorithm is applied.
+ node_ptr super_root = NodeTraits::get_parent(old_root);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(super_root);
+
+ //Get root info
+ node_ptr super_root_right_backup = NodeTraits::get_right(super_root);
+ bool super_root_is_header = NodeTraits::get_parent(super_root) == old_root;
+ bool old_root_is_right = is_right_child(old_root);
+ NodeTraits::set_right(super_root, old_root);
+
+ std::size_t size;
+ subtree_to_vine(super_root, size);
+ vine_to_subtree(super_root, size);
+ node_ptr new_root = NodeTraits::get_right(super_root);
+
+ //Recover root
+ if(super_root_is_header){
+ NodeTraits::set_right(super_root, super_root_right_backup);
+ NodeTraits::set_parent(super_root, new_root);
+ }
+ else if(old_root_is_right){
+ NodeTraits::set_right(super_root, new_root);
+ }
+ else{
+ NodeTraits::set_right(super_root, super_root_right_backup);
+ NodeTraits::set_left(super_root, new_root);
+ }
+ return new_root;
+ }
+
+ //! <b>Effects</b>: Asserts the integrity of the container with additional checks provided by the user.
+ //!
+ //! <b>Requires</b>: header must be the header of a tree.
+ //!
+ //! <b>Complexity</b>: Linear time.
+ //!
+ //! <b>Note</b>: The method might not have effect when asserts are turned off (e.g., with NDEBUG).
+ //! Experimental function, interface might change in future versions.
+ template<class Checker>
+ static void check(const const_node_ptr& header, Checker checker, typename Checker::return_type& checker_return)
+ {
+ const_node_ptr root_node_ptr = NodeTraits::get_parent(header);
+ if (!root_node_ptr){
+ // check left&right header pointers
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_left(header) == header);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_right(header) == header);
+ }
+ else{
+ // check parent pointer of root node
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(root_node_ptr) == header);
+ // check subtree from root
+ check_subtree(root_node_ptr, checker, checker_return);
+ // check left&right header pointers
+ const_node_ptr p = root_node_ptr;
+ while (NodeTraits::get_left(p)) { p = NodeTraits::get_left(p); }
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_left(header) == p);
+ p = root_node_ptr;
+ while (NodeTraits::get_right(p)) { p = NodeTraits::get_right(p); }
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_right(header) == p);
+ }
+ }
+
+ protected:
+
+ template<class NodePtrCompare>
+ static bool transfer_unique
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z, data_for_rebalance &info)
+ {
+ insert_commit_data commit_data;
+ bool const transferable = insert_unique_check(header1, z, comp, commit_data).second;
+ if(transferable){
+ erase(header2, z, info);
+ insert_commit(header1, z, commit_data);
+ }
+ return transferable;
+ }
+
+ template<class NodePtrCompare>
+ static void transfer_equal
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z, data_for_rebalance &info)
+ {
+ insert_commit_data commit_data;
+ insert_equal_upper_bound_check(header1, z, comp, commit_data);
+ erase(header2, z, info);
+ insert_commit(header1, z, commit_data);
+ }
+
+ static void erase(node_ptr header, node_ptr z, data_for_rebalance &info)
+ {
+ node_ptr y(z);
+ node_ptr x;
+ const node_ptr z_left(NodeTraits::get_left(z));
+ const node_ptr z_right(NodeTraits::get_right(z));
+
+ if(!z_left){
+ x = z_right; // x might be null.
+ }
+ else if(!z_right){ // z has exactly one non-null child. y == z.
+ x = z_left; // x is not null.
+ BOOST_ASSERT(x);
+ }
+ else{ //make y != z
+ // y = find z's successor
+ y = base_type::minimum(z_right);
+ x = NodeTraits::get_right(y); // x might be null.
+ }
+
+ node_ptr x_parent;
+ const node_ptr z_parent(NodeTraits::get_parent(z));
+ const bool z_is_leftchild(NodeTraits::get_left(z_parent) == z);
+
+ if(y != z){ //has two children and y is the minimum of z
+ //y is z's successor and it has a null left child.
+ //x is the right child of y (it can be null)
+ //Relink y in place of z and link x with y's old parent
+ NodeTraits::set_parent(z_left, y);
+ NodeTraits::set_left(y, z_left);
+ if(y != z_right){
+ //Link y with the right tree of z
+ NodeTraits::set_right(y, z_right);
+ NodeTraits::set_parent(z_right, y);
+ //Link x with y's old parent (y must be a left child)
+ x_parent = NodeTraits::get_parent(y);
+ BOOST_ASSERT(NodeTraits::get_left(x_parent) == y);
+ if(x)
+ NodeTraits::set_parent(x, x_parent);
+ //Since y was the successor and not the right child of z, it must be a left child
+ NodeTraits::set_left(x_parent, x);
+ }
+ else{ //y was the right child of y so no need to fix x's position
+ x_parent = y;
+ }
+ NodeTraits::set_parent(y, z_parent);
+ this_type::set_child(header, y, z_parent, z_is_leftchild);
+ }
+ else { // z has zero or one child, x is one child (it can be null)
+ //Just link x to z's parent
+ x_parent = z_parent;
+ if(x)
+ NodeTraits::set_parent(x, z_parent);
+ this_type::set_child(header, x, z_parent, z_is_leftchild);
+
+ //Now update leftmost/rightmost in case z was one of them
+ if(NodeTraits::get_left(header) == z){
+ //z_left must be null because z is the leftmost
+ BOOST_ASSERT(!z_left);
+ NodeTraits::set_left(header, !z_right ?
+ z_parent : // makes leftmost == header if z == root
+ base_type::minimum(z_right));
+ }
+ if(NodeTraits::get_right(header) == z){
+ //z_right must be null because z is the rightmost
+ BOOST_ASSERT(!z_right);
+ NodeTraits::set_right(header, !z_left ?
+ z_parent : // makes rightmost == header if z == root
+ base_type::maximum(z_left));
+ }
+ }
+
+ //If z had 0/1 child, y == z and one of its children (and maybe null)
+ //If z had 2 children, y is the successor of z and x is the right child of y
+ info.x = x;
+ info.y = y;
+ //If z had 0/1 child, x_parent is the new parent of the old right child of y (z's successor)
+ //If z had 2 children, x_parent is the new parent of y (z_parent)
+ BOOST_ASSERT(!x || NodeTraits::get_parent(x) == x_parent);
+ info.x_parent = x_parent;
+ }
+
+ //! <b>Requires</b>: node is a node of the tree but it's not the header.
+ //!
+ //! <b>Effects</b>: Returns the number of nodes of the subtree.
+ //!
+ //! <b>Complexity</b>: Linear time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static std::size_t subtree_size(const const_node_ptr & subtree)
+ {
+ std::size_t count = 0;
+ if (subtree){
+ node_ptr n = detail::uncast(subtree);
+ node_ptr m = NodeTraits::get_left(n);
+ while(m){
+ n = m;
+ m = NodeTraits::get_left(n);
+ }
+
+ while(1){
+ ++count;
+ node_ptr n_right(NodeTraits::get_right(n));
+ if(n_right){
+ n = n_right;
+ m = NodeTraits::get_left(n);
+ while(m){
+ n = m;
+ m = NodeTraits::get_left(n);
+ }
+ }
+ else {
+ do{
+ if (n == subtree){
+ return count;
+ }
+ m = n;
+ n = NodeTraits::get_parent(n);
+ }while(NodeTraits::get_left(n) != m);
+ }
+ }
+ }
+ return count;
+ }
+
+ //! <b>Requires</b>: p is a node of a tree.
+ //!
+ //! <b>Effects</b>: Returns true if p is a left child.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static bool is_left_child(const node_ptr & p)
+ { return NodeTraits::get_left(NodeTraits::get_parent(p)) == p; }
+
+ //! <b>Requires</b>: p is a node of a tree.
+ //!
+ //! <b>Effects</b>: Returns true if p is a right child.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static bool is_right_child(const node_ptr & p)
+ { return NodeTraits::get_right(NodeTraits::get_parent(p)) == p; }
+
+ static void insert_before_check
+ (node_ptr header, node_ptr pos
+ , insert_commit_data &commit_data
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ node_ptr prev(pos);
+ if(pos != NodeTraits::get_left(header))
+ prev = base_type::prev_node(pos);
+ bool link_left = unique(header) || !NodeTraits::get_left(pos);
+ commit_data.link_left = link_left;
+ commit_data.node = link_left ? pos : prev;
+ if(pdepth){
+ *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1;
+ }
+ }
+
+ static void push_back_check
+ (node_ptr header, insert_commit_data &commit_data
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ node_ptr prev(NodeTraits::get_right(header));
+ if(pdepth){
+ *pdepth = prev == header ? 0 : depth(prev) + 1;
+ }
+ commit_data.link_left = false;
+ commit_data.node = prev;
+ }
+
+ static void push_front_check
+ (node_ptr header, insert_commit_data &commit_data
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ , std::size_t *pdepth = 0
+ #endif
+ )
+ {
+ node_ptr pos(NodeTraits::get_left(header));
+ if(pdepth){
+ *pdepth = pos == header ? 0 : depth(pos) + 1;
+ }
+ commit_data.link_left = true;
+ commit_data.node = pos;
+ }
+
+ template<class NodePtrCompare>
+ static void insert_equal_check
+ (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp
+ , insert_commit_data &commit_data
+ /// @cond
+ , std::size_t *pdepth = 0
+ /// @endcond
+ )
+ {
+ if(hint == header || !comp(hint, new_node)){
+ node_ptr prev(hint);
+ if(hint == NodeTraits::get_left(header) ||
+ !comp(new_node, (prev = base_type::prev_node(hint)))){
+ bool link_left = unique(header) || !NodeTraits::get_left(hint);
+ commit_data.link_left = link_left;
+ commit_data.node = link_left ? hint : prev;
+ if(pdepth){
+ *pdepth = commit_data.node == header ? 0 : depth(commit_data.node) + 1;
+ }
+ }
+ else{
+ insert_equal_upper_bound_check(header, new_node, comp, commit_data, pdepth);
+ }
+ }
+ else{
+ insert_equal_lower_bound_check(header, new_node, comp, commit_data, pdepth);
+ }
+ }
+
+ template<class NodePtrCompare>
+ static void insert_equal_upper_bound_check
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp, insert_commit_data & commit_data, std::size_t *pdepth = 0)
+ {
+ std::size_t depth = 0;
+ node_ptr y(h);
+ node_ptr x(NodeTraits::get_parent(y));
+
+ while(x){
+ ++depth;
+ y = x;
+ x = comp(new_node, x) ?
+ NodeTraits::get_left(x) : NodeTraits::get_right(x);
+ }
+ if(pdepth) *pdepth = depth;
+ commit_data.link_left = (y == h) || comp(new_node, y);
+ commit_data.node = y;
+ }
+
+ template<class NodePtrCompare>
+ static void insert_equal_lower_bound_check
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp, insert_commit_data & commit_data, std::size_t *pdepth = 0)
+ {
+ std::size_t depth = 0;
+ node_ptr y(h);
+ node_ptr x(NodeTraits::get_parent(y));
+
+ while(x){
+ ++depth;
+ y = x;
+ x = !comp(x, new_node) ?
+ NodeTraits::get_left(x) : NodeTraits::get_right(x);
+ }
+ if(pdepth) *pdepth = depth;
+ commit_data.link_left = (y == h) || !comp(y, new_node);
+ commit_data.node = y;
+ }
+
+ static void insert_commit
+ (node_ptr header, node_ptr new_node, const insert_commit_data &commit_data)
+ {
+ //Check if commit_data has not been initialized by a insert_unique_check call.
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(commit_data.node != node_ptr());
+ node_ptr parent_node(commit_data.node);
+ if(parent_node == header){
+ NodeTraits::set_parent(header, new_node);
+ NodeTraits::set_right(header, new_node);
+ NodeTraits::set_left(header, new_node);
+ }
+ else if(commit_data.link_left){
+ NodeTraits::set_left(parent_node, new_node);
+ if(parent_node == NodeTraits::get_left(header))
+ NodeTraits::set_left(header, new_node);
+ }
+ else{
+ NodeTraits::set_right(parent_node, new_node);
+ if(parent_node == NodeTraits::get_right(header))
+ NodeTraits::set_right(header, new_node);
+ }
+ NodeTraits::set_parent(new_node, parent_node);
+ NodeTraits::set_right(new_node, node_ptr());
+ NodeTraits::set_left(new_node, node_ptr());
+ }
+
+ //Fix header and own's parent data when replacing x with own, providing own's old data with parent
+ static void set_child(node_ptr header, node_ptr new_child, node_ptr new_parent, const bool link_left)
+ {
+ if(new_parent == header)
+ NodeTraits::set_parent(header, new_child);
+ else if(link_left)
+ NodeTraits::set_left(new_parent, new_child);
+ else
+ NodeTraits::set_right(new_parent, new_child);
+ }
+
+ // rotate p to left (no header and p's parent fixup)
+ static void rotate_left_no_parent_fix(node_ptr p, node_ptr p_right)
+ {
+ node_ptr p_right_left(NodeTraits::get_left(p_right));
+ NodeTraits::set_right(p, p_right_left);
+ if(p_right_left){
+ NodeTraits::set_parent(p_right_left, p);
+ }
+ NodeTraits::set_left(p_right, p);
+ NodeTraits::set_parent(p, p_right);
+ }
+
+ // rotate p to left (with header and p's parent fixup)
+ static void rotate_left(node_ptr p, node_ptr p_right, node_ptr p_parent, node_ptr header)
+ {
+ const bool p_was_left(NodeTraits::get_left(p_parent) == p);
+ rotate_left_no_parent_fix(p, p_right);
+ NodeTraits::set_parent(p_right, p_parent);
+ set_child(header, p_right, p_parent, p_was_left);
+ }
+
+ // rotate p to right (no header and p's parent fixup)
+ static void rotate_right_no_parent_fix(node_ptr p, node_ptr p_left)
+ {
+ node_ptr p_left_right(NodeTraits::get_right(p_left));
+ NodeTraits::set_left(p, p_left_right);
+ if(p_left_right){
+ NodeTraits::set_parent(p_left_right, p);
+ }
+ NodeTraits::set_right(p_left, p);
+ NodeTraits::set_parent(p, p_left);
+ }
+
+ // rotate p to right (with header and p's parent fixup)
+ static void rotate_right(node_ptr p, node_ptr p_left, node_ptr p_parent, node_ptr header)
+ {
+ const bool p_was_left(NodeTraits::get_left(p_parent) == p);
+ rotate_right_no_parent_fix(p, p_left);
+ NodeTraits::set_parent(p_left, p_parent);
+ set_child(header, p_left, p_parent, p_was_left);
+ }
+
+ private:
+
+ static void subtree_to_vine(node_ptr vine_tail, std::size_t &size)
+ {
+ //Inspired by LibAVL:
+ //It uses a clever optimization for trees with parent pointers.
+ //No parent pointer is updated when transforming a tree to a vine as
+ //most of them will be overriten during compression rotations.
+ //A final pass must be made after the rebalancing to updated those
+ //pointers not updated by tree_to_vine + compression calls
+ std::size_t len = 0;
+ node_ptr remainder = NodeTraits::get_right(vine_tail);
+ while(remainder){
+ node_ptr tempptr = NodeTraits::get_left(remainder);
+ if(!tempptr){ //move vine-tail down one
+ vine_tail = remainder;
+ remainder = NodeTraits::get_right(remainder);
+ ++len;
+ }
+ else{ //rotate
+ NodeTraits::set_left(remainder, NodeTraits::get_right(tempptr));
+ NodeTraits::set_right(tempptr, remainder);
+ remainder = tempptr;
+ NodeTraits::set_right(vine_tail, tempptr);
+ }
+ }
+ size = len;
+ }
+
+ static void compress_subtree(node_ptr scanner, std::size_t count)
+ {
+ while(count--){ //compress "count" spine nodes in the tree with pseudo-root scanner
+ node_ptr child = NodeTraits::get_right(scanner);
+ node_ptr child_right = NodeTraits::get_right(child);
+ NodeTraits::set_right(scanner, child_right);
+ //Avoid setting the parent of child_right
+ scanner = child_right;
+ node_ptr scanner_left = NodeTraits::get_left(scanner);
+ NodeTraits::set_right(child, scanner_left);
+ if(scanner_left)
+ NodeTraits::set_parent(scanner_left, child);
+ NodeTraits::set_left(scanner, child);
+ NodeTraits::set_parent(child, scanner);
+ }
+ }
+
+ static void vine_to_subtree(node_ptr super_root, std::size_t count)
+ {
+ const std::size_t one_szt = 1u;
+ std::size_t leaf_nodes = count + one_szt - std::size_t(one_szt << detail::floor_log2(count + one_szt));
+ compress_subtree(super_root, leaf_nodes); //create deepest leaves
+ std::size_t vine_nodes = count - leaf_nodes;
+ while(vine_nodes > 1){
+ vine_nodes /= 2;
+ compress_subtree(super_root, vine_nodes);
+ }
+
+ //Update parents of nodes still in the in the original vine line
+ //as those have not been updated by subtree_to_vine or compress_subtree
+ for ( node_ptr q = super_root, p = NodeTraits::get_right(super_root)
+ ; p
+ ; q = p, p = NodeTraits::get_right(p)){
+ NodeTraits::set_parent(p, q);
+ }
+ }
+
+ //! <b>Requires</b>: "n" must be a node inserted in a tree.
+ //!
+ //! <b>Effects</b>: Returns a pointer to the header node of the tree.
+ //!
+ //! <b>Complexity</b>: Logarithmic.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_root(const node_ptr & node)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT((!inited(node)));
+ node_ptr x = NodeTraits::get_parent(node);
+ if(x){
+ while(!base_type::is_header(x)){
+ x = NodeTraits::get_parent(x);
+ }
+ return x;
+ }
+ else{
+ return node;
+ }
+ }
+
+ template <class Cloner, class Disposer>
+ static node_ptr clone_subtree
+ (const const_node_ptr &source_parent, node_ptr target_parent
+ , Cloner cloner, Disposer disposer
+ , node_ptr &leftmost_out, node_ptr &rightmost_out
+ )
+ {
+ node_ptr target_sub_root = target_parent;
+ node_ptr source_root = NodeTraits::get_parent(source_parent);
+ if(!source_root){
+ leftmost_out = rightmost_out = source_root;
+ }
+ else{
+ //We'll calculate leftmost and rightmost nodes while iterating
+ node_ptr current = source_root;
+ node_ptr insertion_point = target_sub_root = cloner(current);
+
+ //We'll calculate leftmost and rightmost nodes while iterating
+ node_ptr leftmost = target_sub_root;
+ node_ptr rightmost = target_sub_root;
+
+ //First set the subroot
+ NodeTraits::set_left(target_sub_root, node_ptr());
+ NodeTraits::set_right(target_sub_root, node_ptr());
+ NodeTraits::set_parent(target_sub_root, target_parent);
+
+ dispose_subtree_disposer<Disposer> rollback(disposer, target_sub_root);
+ while(true) {
+ //First clone left nodes
+ if( NodeTraits::get_left(current) &&
+ !NodeTraits::get_left(insertion_point)) {
+ current = NodeTraits::get_left(current);
+ node_ptr temp = insertion_point;
+ //Clone and mark as leaf
+ insertion_point = cloner(current);
+ NodeTraits::set_left (insertion_point, node_ptr());
+ NodeTraits::set_right (insertion_point, node_ptr());
+ //Insert left
+ NodeTraits::set_parent(insertion_point, temp);
+ NodeTraits::set_left (temp, insertion_point);
+ //Update leftmost
+ if(rightmost == target_sub_root)
+ leftmost = insertion_point;
+ }
+ //Then clone right nodes
+ else if( NodeTraits::get_right(current) &&
+ !NodeTraits::get_right(insertion_point)){
+ current = NodeTraits::get_right(current);
+ node_ptr temp = insertion_point;
+ //Clone and mark as leaf
+ insertion_point = cloner(current);
+ NodeTraits::set_left (insertion_point, node_ptr());
+ NodeTraits::set_right (insertion_point, node_ptr());
+ //Insert right
+ NodeTraits::set_parent(insertion_point, temp);
+ NodeTraits::set_right (temp, insertion_point);
+ //Update rightmost
+ rightmost = insertion_point;
+ }
+ //If not, go up
+ else if(current == source_root){
+ break;
+ }
+ else{
+ //Branch completed, go up searching more nodes to clone
+ current = NodeTraits::get_parent(current);
+ insertion_point = NodeTraits::get_parent(insertion_point);
+ }
+ }
+ rollback.release();
+ leftmost_out = leftmost;
+ rightmost_out = rightmost;
+ }
+ return target_sub_root;
+ }
+
+ template<class Disposer>
+ static void dispose_subtree(node_ptr x, Disposer disposer)
+ {
+ while (x){
+ node_ptr save(NodeTraits::get_left(x));
+ if (save) {
+ // Right rotation
+ NodeTraits::set_left(x, NodeTraits::get_right(save));
+ NodeTraits::set_right(save, x);
+ }
+ else {
+ save = NodeTraits::get_right(x);
+ init(x);
+ disposer(x);
+ }
+ x = save;
+ }
+ }
+
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr lower_bound_loop
+ (node_ptr x, node_ptr y, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ while(x){
+ if(comp(x, key)){
+ x = NodeTraits::get_right(x);
+ }
+ else{
+ y = x;
+ x = NodeTraits::get_left(x);
+ }
+ }
+ return y;
+ }
+
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr upper_bound_loop
+ (node_ptr x, node_ptr y, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ while(x){
+ if(comp(key, x)){
+ y = x;
+ x = NodeTraits::get_left(x);
+ }
+ else{
+ x = NodeTraits::get_right(x);
+ }
+ }
+ return y;
+ }
+
+ template<class Checker>
+ static void check_subtree(const const_node_ptr& node, Checker checker, typename Checker::return_type& check_return)
+ {
+ const_node_ptr left = NodeTraits::get_left(node);
+ const_node_ptr right = NodeTraits::get_right(node);
+ typename Checker::return_type check_return_left;
+ typename Checker::return_type check_return_right;
+ if (left)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(left) == node);
+ check_subtree(left, checker, check_return_left);
+ }
+ if (right)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(NodeTraits::get_parent(right) == node);
+ check_subtree(right, checker, check_return_right);
+ }
+ checker(node, check_return_left, check_return_right, check_return);
+ }
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<BsTreeAlgorithms, NodeTraits>
+{
+ typedef bstree_algorithms<NodeTraits> type;
+};
+
+template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct get_node_checker<BsTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
+{
+ typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_BSTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/circular_list_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/circular_list_algorithms.hpp
new file mode 100644
index 00000000000..e5d41750469
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/circular_list_algorithms.hpp
@@ -0,0 +1,468 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+#include <cstddef>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+//! circular_list_algorithms provides basic algorithms to manipulate nodes
+//! forming a circular doubly linked list. An empty circular list is formed by a node
+//! whose pointers point to itself.
+//!
+//! circular_list_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the circular list
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_previous(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_previous(node_ptr n, node_ptr prev);</tt>
+//!
+//! <tt>static node_ptr get_next(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
+template<class NodeTraits>
+class circular_list_algorithms
+{
+ public:
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+ typedef NodeTraits node_traits;
+
+ //! <b>Effects</b>: Constructs an non-used list element, so that
+ //! inited(this_node) == true
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr this_node)
+ {
+ const node_ptr null_node = node_ptr();
+ NodeTraits::set_next(this_node, null_node);
+ NodeTraits::set_previous(this_node, null_node);
+ }
+
+ //! <b>Effects</b>: Returns true is "this_node" is in a non-used state
+ //! as if it was initialized by the "init" function.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr &this_node)
+ { return !NodeTraits::get_next(this_node); }
+
+ //! <b>Effects</b>: Constructs an empty list, making this_node the only
+ //! node of the circular list:
+ //! <tt>NodeTraits::get_next(this_node) == NodeTraits::get_previous(this_node)
+ //! == this_node</tt>.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr this_node)
+ {
+ NodeTraits::set_next(this_node, this_node);
+ NodeTraits::set_previous(this_node, this_node);
+ }
+
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
+ //! <tt>return NodeTraits::get_next(this_node) == this_node</tt>
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr &this_node)
+ {
+ node_ptr next = NodeTraits::get_next(this_node);
+ return !next || next == this_node;
+ }
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns the number of nodes in a circular list. If the circular list
+ //! is empty, returns 1.
+ //!
+ //! <b>Complexity</b>: Linear
+ //!
+ //! <b>Throws</b>: Nothing.
+ static std::size_t count(const const_node_ptr &this_node)
+ {
+ std::size_t result = 0;
+ const_node_ptr p = this_node;
+ do{
+ p = NodeTraits::get_next(p);
+ ++result;
+ }while (p != this_node);
+ return result;
+ }
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the node from the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr unlink(node_ptr this_node)
+ {
+ node_ptr next(NodeTraits::get_next(this_node));
+ node_ptr prev(NodeTraits::get_previous(this_node));
+ NodeTraits::set_next(prev, next);
+ NodeTraits::set_previous(next, prev);
+ return next;
+ }
+
+ //! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
+ //!
+ //! <b>Effects</b>: Unlinks the node [b, e) from the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void unlink(node_ptr b, node_ptr e)
+ {
+ if (b != e) {
+ node_ptr prevb(NodeTraits::get_previous(b));
+ NodeTraits::set_previous(e, prevb);
+ NodeTraits::set_next(prevb, e);
+ }
+ }
+
+ //! <b>Requires</b>: nxt_node must be a node of a circular list.
+ //!
+ //! <b>Effects</b>: Links this_node before nxt_node in the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void link_before(node_ptr nxt_node, node_ptr this_node)
+ {
+ node_ptr prev(NodeTraits::get_previous(nxt_node));
+ NodeTraits::set_previous(this_node, prev);
+ NodeTraits::set_next(this_node, nxt_node);
+ //nxt_node might be an alias for prev->next_
+ //so use it before NodeTraits::set_next(prev, ...)
+ //is called and the reference changes its value
+ NodeTraits::set_previous(nxt_node, this_node);
+ NodeTraits::set_next(prev, this_node);
+ }
+
+ //! <b>Requires</b>: prev_node must be a node of a circular list.
+ //!
+ //! <b>Effects</b>: Links this_node after prev_node in the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void link_after(node_ptr prev_node, node_ptr this_node)
+ {
+ node_ptr next(NodeTraits::get_next(prev_node));
+ NodeTraits::set_previous(this_node, prev_node);
+ NodeTraits::set_next(this_node, next);
+ //prev_node might be an alias for next->next_
+ //so use it before update it before NodeTraits::set_previous(next, ...)
+ //is called and the reference changes it's value
+ NodeTraits::set_next(prev_node, this_node);
+ NodeTraits::set_previous(next, this_node);
+ }
+
+ //! <b>Requires</b>: this_node and other_node must be nodes inserted
+ //! in circular lists or be empty circular lists.
+ //!
+ //! <b>Effects</b>: Swaps the position of the nodes: this_node is inserted in
+ //! other_nodes position in the second circular list and the other_node is inserted
+ //! in this_node's position in the first circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void swap_nodes(node_ptr this_node, node_ptr other_node)
+ {
+ if (other_node == this_node)
+ return;
+ bool this_inited = inited(this_node);
+ bool other_inited = inited(other_node);
+ if(this_inited){
+ init_header(this_node);
+ }
+ if(other_inited){
+ init_header(other_node);
+ }
+
+ node_ptr next_this(NodeTraits::get_next(this_node));
+ node_ptr prev_this(NodeTraits::get_previous(this_node));
+ node_ptr next_other(NodeTraits::get_next(other_node));
+ node_ptr prev_other(NodeTraits::get_previous(other_node));
+ //these first two swaps must happen before the other two
+ swap_prev(next_this, next_other);
+ swap_next(prev_this, prev_other);
+ swap_next(this_node, other_node);
+ swap_prev(this_node, other_node);
+
+ if(this_inited){
+ init(other_node);
+ }
+ if(other_inited){
+ init(this_node);
+ }
+ }
+
+ //! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
+ //! and p must be a node of a different circular list or may not be an iterator in
+ // [b, e).
+ //!
+ //! <b>Effects</b>: Removes the nodes from [b, e) range from their circular list and inserts
+ //! them before p in p's circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void transfer(node_ptr p, node_ptr b, node_ptr e)
+ {
+ if (b != e) {
+ node_ptr prev_p(NodeTraits::get_previous(p));
+ node_ptr prev_b(NodeTraits::get_previous(b));
+ node_ptr prev_e(NodeTraits::get_previous(e));
+ NodeTraits::set_next(prev_e, p);
+ NodeTraits::set_previous(p, prev_e);
+ NodeTraits::set_next(prev_b, e);
+ NodeTraits::set_previous(e, prev_b);
+ NodeTraits::set_next(prev_p, b);
+ NodeTraits::set_previous(b, prev_p);
+ }
+ }
+
+ //! <b>Requires</b>: i must a node of a circular list
+ //! and p must be a node of a different circular list.
+ //!
+ //! <b>Effects</b>: Removes the node i from its circular list and inserts
+ //! it before p in p's circular list.
+ //! If p == i or p == NodeTraits::get_next(i), this function is a null operation.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void transfer(node_ptr p, node_ptr i)
+ {
+ node_ptr n(NodeTraits::get_next(i));
+ if(n != p && i != p){
+ node_ptr prev_p(NodeTraits::get_previous(p));
+ node_ptr prev_i(NodeTraits::get_previous(i));
+ NodeTraits::set_next(prev_p, i);
+ NodeTraits::set_previous(i, prev_p);
+ NodeTraits::set_next(i, p);
+ NodeTraits::set_previous(p, i);
+ NodeTraits::set_previous(n, prev_i);
+ NodeTraits::set_next(prev_i, n);
+
+ }
+ }
+
+ //! <b>Effects</b>: Reverses the order of elements in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: This function is linear time.
+ static void reverse(node_ptr p)
+ {
+ node_ptr f(NodeTraits::get_next(p));
+ node_ptr i(NodeTraits::get_next(f)), e(p);
+
+ while(i != e) {
+ node_ptr n = i;
+ i = NodeTraits::get_next(i);
+ transfer(f, n, i);
+ f = n;
+ }
+ }
+
+ //! <b>Effects</b>: Moves the node p n positions towards the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of moved positions.
+ static void move_backwards(node_ptr p, std::size_t n)
+ {
+ //Null shift, nothing to do
+ if(!n) return;
+ node_ptr first = NodeTraits::get_next(p);
+ //size() == 0 or 1, nothing to do
+ if(first == NodeTraits::get_previous(p)) return;
+ unlink(p);
+ //Now get the new first node
+ while(n--){
+ first = NodeTraits::get_next(first);
+ }
+ link_before(first, p);
+ }
+
+ //! <b>Effects</b>: Moves the node p n positions towards the beginning of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of moved positions.
+ static void move_forward(node_ptr p, std::size_t n)
+ {
+ //Null shift, nothing to do
+ if(!n) return;
+ node_ptr last = NodeTraits::get_previous(p);
+ //size() == 0 or 1, nothing to do
+ if(last == NodeTraits::get_next(p)) return;
+
+ unlink(p);
+ //Now get the new last node
+ while(n--){
+ last = NodeTraits::get_previous(last);
+ }
+ link_after(last, p);
+ }
+
+ //! <b>Requires</b>: f and l must be in a circular list.
+ //!
+ //! <b>Effects</b>: Returns the number of nodes in the range [f, l).
+ //!
+ //! <b>Complexity</b>: Linear
+ //!
+ //! <b>Throws</b>: Nothing.
+ static std::size_t distance(const const_node_ptr &f, const const_node_ptr &l)
+ {
+ const_node_ptr i(f);
+ std::size_t result = 0;
+ while(i != l){
+ i = NodeTraits::get_next(i);
+ ++result;
+ }
+ return result;
+ }
+
+ struct stable_partition_info
+ {
+ std::size_t num_1st_partition;
+ std::size_t num_2nd_partition;
+ node_ptr beg_2st_partition;
+ };
+
+ template<class Pred>
+ static void stable_partition(node_ptr beg, node_ptr end, Pred pred, stable_partition_info &info)
+ {
+ node_ptr bcur = node_traits::get_previous(beg);
+ node_ptr cur = beg;
+ node_ptr new_f = end;
+
+ std::size_t num1 = 0, num2 = 0;
+ while(cur != end){
+ if(pred(cur)){
+ ++num1;
+ bcur = cur;
+ cur = node_traits::get_next(cur);
+ }
+ else{
+ ++num2;
+ node_ptr last_to_remove = bcur;
+ new_f = cur;
+ bcur = cur;
+ cur = node_traits::get_next(cur);
+ BOOST_TRY{
+ //Main loop
+ while(cur != end){
+ if(pred(cur)){ //Might throw
+ ++num1;
+ //Process current node
+ node_traits::set_next (last_to_remove, cur);
+ node_traits::set_previous(cur, last_to_remove);
+ last_to_remove = cur;
+ node_ptr nxt = node_traits::get_next(cur);
+ node_traits::set_next (bcur, nxt);
+ node_traits::set_previous(nxt, bcur);
+ cur = nxt;
+ }
+ else{
+ ++num2;
+ bcur = cur;
+ cur = node_traits::get_next(cur);
+ }
+ }
+ }
+ BOOST_CATCH(...){
+ node_traits::set_next (last_to_remove, new_f);
+ node_traits::set_previous(new_f, last_to_remove);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ node_traits::set_next(last_to_remove, new_f);
+ node_traits::set_previous(new_f, last_to_remove);
+ break;
+ }
+ }
+ info.num_1st_partition = num1;
+ info.num_2nd_partition = num2;
+ info.beg_2st_partition = new_f;
+ }
+
+ private:
+ BOOST_INTRUSIVE_FORCEINLINE static void swap_prev(node_ptr this_node, node_ptr other_node)
+ {
+ node_ptr temp(NodeTraits::get_previous(this_node));
+ NodeTraits::set_previous(this_node, NodeTraits::get_previous(other_node));
+ NodeTraits::set_previous(other_node, temp);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void swap_next(node_ptr this_node, node_ptr other_node)
+ {
+ node_ptr temp(NodeTraits::get_next(this_node));
+ NodeTraits::set_next(this_node, NodeTraits::get_next(other_node));
+ NodeTraits::set_next(other_node, temp);
+ }
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<CircularListAlgorithms, NodeTraits>
+{
+ typedef circular_list_algorithms<NodeTraits> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_CIRCULAR_LIST_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/circular_slist_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/circular_slist_algorithms.hpp
new file mode 100644
index 00000000000..bc5b4817897
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/circular_slist_algorithms.hpp
@@ -0,0 +1,406 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP
+
+#include <cstddef>
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/common_slist_algorithms.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+//! circular_slist_algorithms provides basic algorithms to manipulate nodes
+//! forming a circular singly linked list. An empty circular list is formed by a node
+//! whose pointer to the next node points to itself.
+//!
+//! circular_slist_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the circular list
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_next(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
+template<class NodeTraits>
+class circular_slist_algorithms
+ /// @cond
+ : public detail::common_slist_algorithms<NodeTraits>
+ /// @endcond
+{
+ /// @cond
+ typedef detail::common_slist_algorithms<NodeTraits> base_t;
+ /// @endcond
+ public:
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+ typedef NodeTraits node_traits;
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Constructs an non-used list element, putting the next
+ //! pointer to null:
+ //! <tt>NodeTraits::get_next(this_node) == node_ptr()</tt>
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void init(node_ptr this_node);
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
+ //! or it's a not inserted node:
+ //! <tt>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static bool unique(const_node_ptr this_node);
+
+ //! <b>Effects</b>: Returns true is "this_node" has the same state as
+ //! if it was inited using "init(node_ptr)"
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static bool inited(const_node_ptr this_node);
+
+ //! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the next node of prev_node from the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void unlink_after(node_ptr prev_node);
+
+ //! <b>Requires</b>: prev_node and last_node must be in a circular list
+ //! or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the range (prev_node, last_node) from the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void unlink_after(node_ptr prev_node, node_ptr last_node);
+
+ //! <b>Requires</b>: prev_node must be a node of a circular list.
+ //!
+ //! <b>Effects</b>: Links this_node after prev_node in the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void link_after(node_ptr prev_node, node_ptr this_node);
+
+ //! <b>Requires</b>: b and e must be nodes of the same circular list or an empty range.
+ //! and p must be a node of a different circular list.
+ //!
+ //! <b>Effects</b>: Removes the nodes from (b, e] range from their circular list and inserts
+ //! them after p in p's circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void transfer_after(node_ptr p, node_ptr b, node_ptr e);
+
+ #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Constructs an empty list, making this_node the only
+ //! node of the circular list:
+ //! <tt>NodeTraits::get_next(this_node) == this_node</tt>.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(node_ptr this_node)
+ { NodeTraits::set_next(this_node, this_node); }
+
+ //! <b>Requires</b>: this_node and prev_init_node must be in the same circular list.
+ //!
+ //! <b>Effects</b>: Returns the previous node of this_node in the circular list starting.
+ //! the search from prev_init_node. The first node checked for equality
+ //! is NodeTraits::get_next(prev_init_node).
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr &prev_init_node, const node_ptr &this_node)
+ { return base_t::get_previous_node(prev_init_node, this_node); }
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns the previous node of this_node in the circular list.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the circular list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & this_node)
+ { return base_t::get_previous_node(this_node, this_node); }
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns the previous node of the previous node of this_node in the circular list.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the circular list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_previous_node(const node_ptr & this_node)
+ { return get_previous_previous_node(this_node, this_node); }
+
+ //! <b>Requires</b>: this_node and p must be in the same circular list.
+ //!
+ //! <b>Effects</b>: Returns the previous node of the previous node of this_node in the
+ //! circular list starting. the search from p. The first node checked
+ //! for equality is NodeTraits::get_next((NodeTraits::get_next(p)).
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the circular list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static node_ptr get_previous_previous_node(node_ptr p, const node_ptr & this_node)
+ {
+ node_ptr p_next = NodeTraits::get_next(p);
+ node_ptr p_next_next = NodeTraits::get_next(p_next);
+ while (this_node != p_next_next){
+ p = p_next;
+ p_next = p_next_next;
+ p_next_next = NodeTraits::get_next(p_next);
+ }
+ return p;
+ }
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns the number of nodes in a circular list. If the circular list
+ //! is empty, returns 1.
+ //!
+ //! <b>Complexity</b>: Linear
+ //!
+ //! <b>Throws</b>: Nothing.
+ static std::size_t count(const const_node_ptr & this_node)
+ {
+ std::size_t result = 0;
+ const_node_ptr p = this_node;
+ do{
+ p = NodeTraits::get_next(p);
+ ++result;
+ } while (p != this_node);
+ return result;
+ }
+
+ //! <b>Requires</b>: this_node must be in a circular list, be an empty circular list or be inited.
+ //!
+ //! <b>Effects</b>: Unlinks the node from the circular list.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the circular list
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void unlink(node_ptr this_node)
+ {
+ if(NodeTraits::get_next(this_node))
+ base_t::unlink_after(get_previous_node(this_node));
+ }
+
+ //! <b>Requires</b>: nxt_node must be a node of a circular list.
+ //!
+ //! <b>Effects</b>: Links this_node before nxt_node in the circular list.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the circular list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void link_before (node_ptr nxt_node, node_ptr this_node)
+ { base_t::link_after(get_previous_node(nxt_node), this_node); }
+
+ //! <b>Requires</b>: this_node and other_node must be nodes inserted
+ //! in circular lists or be empty circular lists.
+ //!
+ //! <b>Effects</b>: Swaps the position of the nodes: this_node is inserted in
+ //! other_nodes position in the second circular list and the other_node is inserted
+ //! in this_node's position in the first circular list.
+ //!
+ //! <b>Complexity</b>: Linear to number of elements of both lists
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void swap_nodes(node_ptr this_node, node_ptr other_node)
+ {
+ if (other_node == this_node)
+ return;
+ const node_ptr this_next = NodeTraits::get_next(this_node);
+ const node_ptr other_next = NodeTraits::get_next(other_node);
+ const bool this_null = !this_next;
+ const bool other_null = !other_next;
+ const bool this_empty = this_next == this_node;
+ const bool other_empty = other_next == other_node;
+
+ if(!(other_null || other_empty)){
+ NodeTraits::set_next(this_next == other_node ? other_node : get_previous_node(other_node), this_node );
+ }
+ if(!(this_null | this_empty)){
+ NodeTraits::set_next(other_next == this_node ? this_node : get_previous_node(this_node), other_node );
+ }
+ NodeTraits::set_next(this_node, other_empty ? this_node : (other_next == this_node ? other_node : other_next) );
+ NodeTraits::set_next(other_node, this_empty ? other_node : (this_next == other_node ? this_node : this_next ) );
+ }
+
+ //! <b>Effects</b>: Reverses the order of elements in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: This function is linear to the contained elements.
+ static void reverse(node_ptr p)
+ {
+ node_ptr i = NodeTraits::get_next(p), e(p);
+ for (;;) {
+ node_ptr nxt(NodeTraits::get_next(i));
+ if (nxt == e)
+ break;
+ base_t::transfer_after(e, i, nxt);
+ }
+ }
+
+ //! <b>Effects</b>: Moves the node p n positions towards the end of the list.
+ //!
+ //! <b>Returns</b>: The previous node of p after the function if there has been any movement,
+ //! Null if n leads to no movement.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
+ static node_ptr move_backwards(node_ptr p, std::size_t n)
+ {
+ //Null shift, nothing to do
+ if(!n) return node_ptr();
+ node_ptr first = NodeTraits::get_next(p);
+
+ //count() == 1 or 2, nothing to do
+ if(NodeTraits::get_next(first) == p)
+ return node_ptr();
+
+ bool end_found = false;
+ node_ptr new_last = node_ptr();
+
+ //Now find the new last node according to the shift count.
+ //If we find p before finding the new last node
+ //unlink p, shortcut the search now that we know the size of the list
+ //and continue.
+ for(std::size_t i = 1; i <= n; ++i){
+ new_last = first;
+ first = NodeTraits::get_next(first);
+ if(first == p){
+ //Shortcut the shift with the modulo of the size of the list
+ n %= i;
+ if(!n)
+ return node_ptr();
+ i = 0;
+ //Unlink p and continue the new first node search
+ first = NodeTraits::get_next(p);
+ base_t::unlink_after(new_last);
+ end_found = true;
+ }
+ }
+
+ //If the p has not been found in the previous loop, find it
+ //starting in the new first node and unlink it
+ if(!end_found){
+ base_t::unlink_after(base_t::get_previous_node(first, p));
+ }
+
+ //Now link p after the new last node
+ base_t::link_after(new_last, p);
+ return new_last;
+ }
+
+ //! <b>Effects</b>: Moves the node p n positions towards the beginning of the list.
+ //!
+ //! <b>Returns</b>: The previous node of p after the function if there has been any movement,
+ //! Null if n leads equals to no movement.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
+ static node_ptr move_forward(node_ptr p, std::size_t n)
+ {
+ //Null shift, nothing to do
+ if(!n) return node_ptr();
+ node_ptr first = node_traits::get_next(p);
+
+ //count() == 1 or 2, nothing to do
+ if(node_traits::get_next(first) == p) return node_ptr();
+
+ //Iterate until p is found to know where the current last node is.
+ //If the shift count is less than the size of the list, we can also obtain
+ //the position of the new last node after the shift.
+ node_ptr old_last(first), next_to_it, new_last(p);
+ std::size_t distance = 1;
+ while(p != (next_to_it = node_traits::get_next(old_last))){
+ if(++distance > n)
+ new_last = node_traits::get_next(new_last);
+ old_last = next_to_it;
+ }
+ //If the shift was bigger or equal than the size, obtain the equivalent
+ //forward shifts and find the new last node.
+ if(distance <= n){
+ //Now find the equivalent forward shifts.
+ //Shortcut the shift with the modulo of the size of the list
+ std::size_t new_before_last_pos = (distance - (n % distance))% distance;
+ //If the shift is a multiple of the size there is nothing to do
+ if(!new_before_last_pos) return node_ptr();
+
+ for( new_last = p
+ ; new_before_last_pos--
+ ; new_last = node_traits::get_next(new_last)){
+ //empty
+ }
+ }
+
+ //Now unlink p and link it after the new last node
+ base_t::unlink_after(old_last);
+ base_t::link_after(new_last, p);
+ return new_last;
+ }
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<CircularSListAlgorithms, NodeTraits>
+{
+ typedef circular_slist_algorithms<NodeTraits> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_CIRCULAR_SLIST_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/derivation_value_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/derivation_value_traits.hpp
new file mode 100644
index 00000000000..223b9836327
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/derivation_value_traits.hpp
@@ -0,0 +1,77 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
+#define BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+//!This value traits template is used to create value traits
+//!from user defined node traits where value_traits::value_type will
+//!derive from node_traits::node
+
+template<class T, class NodeTraits, link_mode_type LinkMode
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ = safe_link
+ #endif
+>
+struct derivation_value_traits
+{
+ public:
+ typedef NodeTraits node_traits;
+ typedef T value_type;
+ typedef typename node_traits::node node;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<value_type>::type pointer;
+ typedef typename pointer_traits<node_ptr>::
+ template rebind_pointer<const value_type>::type const_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<pointer>::reference reference;
+ typedef typename boost::intrusive::
+ pointer_traits<const_pointer>::reference const_reference;
+ static const link_mode_type link_mode = LinkMode;
+
+ static node_ptr to_node_ptr(reference value)
+ { return node_ptr(&value); }
+
+ static const_node_ptr to_node_ptr(const_reference value)
+ { return node_ptr(&value); }
+
+ static pointer to_value_ptr(const node_ptr &n)
+ {
+ return pointer_traits<pointer>::pointer_to(static_cast<reference>(*n));
+ }
+
+ static const_pointer to_value_ptr(const const_node_ptr &n)
+ {
+ return pointer_traits<const_pointer>::pointer_to(static_cast<const_reference>(*n));
+ }
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_DERIVATION_VALUE_TRAITS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/algo_type.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/algo_type.hpp
index 70ec63f5740..70ec63f5740 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/algo_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/algo_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/algorithm.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/algorithm.hpp
index d2421ffaad6..d2421ffaad6 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/algorithm.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/algorithm.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/any_node_and_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/any_node_and_algorithms.hpp
new file mode 100644
index 00000000000..f04491840d6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/any_node_and_algorithms.hpp
@@ -0,0 +1,297 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2006-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_ANY_NODE_HPP
+#define BOOST_INTRUSIVE_ANY_NODE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/pointer_rebind.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <cstddef>
+
+namespace boost {
+namespace intrusive {
+
+template<class VoidPointer>
+struct any_node
+{
+ typedef any_node node;
+ typedef typename pointer_rebind<VoidPointer, node>::type node_ptr;
+ typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
+ node_ptr node_ptr_1;
+ node_ptr node_ptr_2;
+ node_ptr node_ptr_3;
+ std::size_t size_t_1;
+};
+
+template<class VoidPointer>
+struct any_list_node_traits
+{
+ typedef any_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
+ { return n->node_ptr_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
+ { n->node_ptr_1 = next; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const const_node_ptr & n)
+ { return n->node_ptr_2; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_previous(node_ptr n, node_ptr prev)
+ { n->node_ptr_2 = prev; }
+};
+
+
+template<class VoidPointer>
+struct any_slist_node_traits
+{
+ typedef any_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
+ { return n->node_ptr_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
+ { n->node_ptr_1 = next; }
+};
+
+
+template<class VoidPointer>
+struct any_unordered_node_traits
+ : public any_slist_node_traits<VoidPointer>
+{
+ typedef any_slist_node_traits<VoidPointer> reduced_slist_node_traits;
+ typedef typename reduced_slist_node_traits::node node;
+ typedef typename reduced_slist_node_traits::node_ptr node_ptr;
+ typedef typename reduced_slist_node_traits::const_node_ptr const_node_ptr;
+
+ static const bool store_hash = true;
+ static const bool optimize_multikey = true;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
+ { return n->node_ptr_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
+ { n->node_ptr_1 = next; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_prev_in_group(const const_node_ptr & n)
+ { return n->node_ptr_2; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_prev_in_group(node_ptr n, node_ptr prev)
+ { n->node_ptr_2 = prev; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static std::size_t get_hash(const const_node_ptr & n)
+ { return n->size_t_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_hash(const node_ptr & n, std::size_t h)
+ { n->size_t_1 = h; }
+};
+
+
+template<class VoidPointer>
+struct any_rbtree_node_traits
+{
+ typedef any_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+
+ typedef std::size_t color;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
+ { return n->node_ptr_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
+ { n->node_ptr_1 = p; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
+ { return n->node_ptr_2; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
+ { n->node_ptr_2 = l; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
+ { return n->node_ptr_3; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
+ { n->node_ptr_3 = r; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
+ { return n->size_t_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
+ { n->size_t_1 = c; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color black()
+ { return 0u; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color red()
+ { return 1u; }
+};
+
+
+template<class VoidPointer>
+struct any_avltree_node_traits
+{
+ typedef any_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+
+ typedef std::size_t balance;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
+ { return n->node_ptr_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
+ { n->node_ptr_1 = p; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
+ { return n->node_ptr_2; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
+ { n->node_ptr_2 = l; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
+ { return n->node_ptr_3; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
+ { n->node_ptr_3 = r; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
+ { return n->size_t_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
+ { n->size_t_1 = b; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance negative()
+ { return 0u; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance zero()
+ { return 1u; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance positive()
+ { return 2u; }
+};
+
+
+template<class VoidPointer>
+struct any_tree_node_traits
+{
+ typedef any_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
+ { return n->node_ptr_1; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
+ { n->node_ptr_1 = p; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
+ { return n->node_ptr_2; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
+ { n->node_ptr_2 = l; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
+ { return n->node_ptr_3; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
+ { n->node_ptr_3 = r; }
+};
+
+template<class VoidPointer>
+class any_node_traits
+{
+ public:
+ typedef any_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+};
+
+template<class VoidPointer>
+class any_algorithms
+{
+ template <class T>
+ static void function_not_available_for_any_hooks(typename detail::enable_if<detail::is_same<T, bool> >::type)
+ {}
+
+ public:
+ typedef any_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+ typedef any_node_traits<VoidPointer> node_traits;
+
+ //! <b>Requires</b>: node must not be part of any tree.
+ //!
+ //! <b>Effects</b>: After the function unique(node) == true.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Nodes</b>: If node is inserted in a tree, this function corrupts the tree.
+ BOOST_INTRUSIVE_FORCEINLINE static void init(const node_ptr & node)
+ { node->node_ptr_1 = node_ptr(); };
+
+ //! <b>Effects</b>: Returns true if node is in the same state as if called init(node)
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & node)
+ { return !node->node_ptr_1; };
+
+ BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & node)
+ { return !node->node_ptr_1; }
+
+ static void unlink(const node_ptr &)
+ {
+ //Auto-unlink hooks and unlink() are not available for any hooks
+ any_algorithms<VoidPointer>::template function_not_available_for_any_hooks<node_ptr>();
+ }
+
+ static void swap_nodes(const node_ptr &, const node_ptr &)
+ {
+ //Any nodes have no swap_nodes capability because they don't know
+ //what algorithm they must use to unlink the node from the container
+ any_algorithms<VoidPointer>::template function_not_available_for_any_hooks<node_ptr>();
+ }
+};
+
+///@cond
+
+template<class NodeTraits>
+struct get_algo<AnyAlgorithm, NodeTraits>
+{
+ typedef typename pointer_rebind<typename NodeTraits::node_ptr, void>::type void_pointer;
+ typedef any_algorithms<void_pointer> type;
+};
+
+///@endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#endif //BOOST_INTRUSIVE_ANY_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/array_initializer.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/array_initializer.hpp
index 126a253afb8..126a253afb8 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/array_initializer.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/array_initializer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/assert.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/assert.hpp
index 7199eb240c9..7199eb240c9 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/assert.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/assert.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/avltree_node.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/avltree_node.hpp
new file mode 100644
index 00000000000..85a864260c1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/avltree_node.hpp
@@ -0,0 +1,193 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_AVLTREE_NODE_HPP
+#define BOOST_INTRUSIVE_AVLTREE_NODE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/pointer_rebind.hpp>
+#include <boost/intrusive/avltree_algorithms.hpp>
+#include <boost/intrusive/pointer_plus_bits.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+
+namespace boost {
+namespace intrusive {
+
+/////////////////////////////////////////////////////////////////////////////
+// //
+// Generic node_traits for any pointer type //
+// //
+/////////////////////////////////////////////////////////////////////////////
+
+//This is the compact representation: 3 pointers
+template<class VoidPointer>
+struct compact_avltree_node
+{
+ typedef typename pointer_rebind<VoidPointer, compact_avltree_node<VoidPointer> >::type node_ptr;
+ typedef typename pointer_rebind<VoidPointer, const compact_avltree_node<VoidPointer> >::type const_node_ptr;
+ enum balance { negative_t, zero_t, positive_t };
+ node_ptr parent_, left_, right_;
+};
+
+//This is the normal representation: 3 pointers + enum
+template<class VoidPointer>
+struct avltree_node
+{
+ typedef typename pointer_rebind<VoidPointer, avltree_node<VoidPointer> >::type node_ptr;
+ typedef typename pointer_rebind<VoidPointer, const avltree_node<VoidPointer> >::type const_node_ptr;
+ enum balance { negative_t, zero_t, positive_t };
+ node_ptr parent_, left_, right_;
+ balance balance_;
+};
+
+//This is the default node traits implementation
+//using a node with 3 generic pointers plus an enum
+template<class VoidPointer>
+struct default_avltree_node_traits_impl
+{
+ typedef avltree_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+
+ typedef typename node::balance balance;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
+ { return n->parent_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
+ { return n->parent_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
+ { n->parent_ = p; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
+ { n->left_ = l; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
+ { n->right_ = r; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
+ { return n->balance_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const node_ptr & n)
+ { return n->balance_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
+ { n->balance_ = b; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance negative()
+ { return node::negative_t; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance zero()
+ { return node::zero_t; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance positive()
+ { return node::positive_t; }
+};
+
+//This is the compact node traits implementation
+//using a node with 3 generic pointers
+template<class VoidPointer>
+struct compact_avltree_node_traits_impl
+{
+ typedef compact_avltree_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+ typedef typename node::balance balance;
+
+ typedef pointer_plus_bits<node_ptr, 2> ptr_bit;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
+ { return ptr_bit::get_pointer(n->parent_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
+ { ptr_bit::set_pointer(n->parent_, p); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
+ { n->left_ = l; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
+ { n->right_ = r; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance get_balance(const const_node_ptr & n)
+ { return (balance)ptr_bit::get_bits(n->parent_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_balance(const node_ptr & n, balance b)
+ { ptr_bit::set_bits(n->parent_, (std::size_t)b); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance negative()
+ { return node::negative_t; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance zero()
+ { return node::zero_t; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static balance positive()
+ { return node::positive_t; }
+};
+
+//Dispatches the implementation based on the boolean
+template<class VoidPointer, bool Compact>
+struct avltree_node_traits_dispatch
+ : public default_avltree_node_traits_impl<VoidPointer>
+{};
+
+template<class VoidPointer>
+struct avltree_node_traits_dispatch<VoidPointer, true>
+ : public compact_avltree_node_traits_impl<VoidPointer>
+{};
+
+//Inherit from rbtree_node_traits_dispatch depending on the embedding capabilities
+template<class VoidPointer, bool OptimizeSize = false>
+struct avltree_node_traits
+ : public avltree_node_traits_dispatch
+ < VoidPointer
+ , OptimizeSize &&
+ max_pointer_plus_bits
+ < VoidPointer
+ , detail::alignment_of<compact_avltree_node<VoidPointer> >::value
+ >::value >= 2u
+ >
+{};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_AVLTREE_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/bstree_algorithms_base.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/bstree_algorithms_base.hpp
index 84040105658..84040105658 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/bstree_algorithms_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/bstree_algorithms_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/common_slist_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/common_slist_algorithms.hpp
new file mode 100644
index 00000000000..88f3fedac59
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/common_slist_algorithms.hpp
@@ -0,0 +1,198 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+#include <cstddef>
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+template<class NodeTraits>
+class common_slist_algorithms
+{
+ public:
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+ typedef NodeTraits node_traits;
+
+ static node_ptr get_previous_node(node_ptr p, const node_ptr & this_node)
+ {
+ for( node_ptr p_next
+ ; this_node != (p_next = NodeTraits::get_next(p))
+ ; p = p_next){
+ //Logic error: possible use of linear lists with
+ //operations only permitted with circular lists
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(p);
+ }
+ return p;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void init(node_ptr this_node)
+ { NodeTraits::set_next(this_node, node_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static bool unique(const const_node_ptr & this_node)
+ {
+ node_ptr next = NodeTraits::get_next(this_node);
+ return !next || next == this_node;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static bool inited(const const_node_ptr & this_node)
+ { return !NodeTraits::get_next(this_node); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node)
+ {
+ const_node_ptr this_node(NodeTraits::get_next(prev_node));
+ NodeTraits::set_next(prev_node, NodeTraits::get_next(this_node));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void unlink_after(node_ptr prev_node, node_ptr last_node)
+ { NodeTraits::set_next(prev_node, last_node); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void link_after(node_ptr prev_node, node_ptr this_node)
+ {
+ NodeTraits::set_next(this_node, NodeTraits::get_next(prev_node));
+ NodeTraits::set_next(prev_node, this_node);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void incorporate_after(node_ptr bp, node_ptr b, node_ptr be)
+ {
+ node_ptr p(NodeTraits::get_next(bp));
+ NodeTraits::set_next(bp, b);
+ NodeTraits::set_next(be, p);
+ }
+
+ static void transfer_after(node_ptr bp, node_ptr bb, node_ptr be)
+ {
+ if (bp != bb && bp != be && bb != be) {
+ node_ptr next_b = NodeTraits::get_next(bb);
+ node_ptr next_e = NodeTraits::get_next(be);
+ node_ptr next_p = NodeTraits::get_next(bp);
+ NodeTraits::set_next(bb, next_e);
+ NodeTraits::set_next(be, next_p);
+ NodeTraits::set_next(bp, next_b);
+ }
+ }
+
+ struct stable_partition_info
+ {
+ std::size_t num_1st_partition;
+ std::size_t num_2nd_partition;
+ node_ptr beg_2st_partition;
+ node_ptr new_last_node;
+ };
+
+ template<class Pred>
+ static void stable_partition(node_ptr before_beg, node_ptr end, Pred pred, stable_partition_info &info)
+ {
+ node_ptr bcur = before_beg;
+ node_ptr cur = node_traits::get_next(bcur);
+ node_ptr new_f = end;
+
+ std::size_t num1 = 0, num2 = 0;
+ while(cur != end){
+ if(pred(cur)){
+ ++num1;
+ bcur = cur;
+ cur = node_traits::get_next(cur);
+ }
+ else{
+ ++num2;
+ node_ptr last_to_remove = bcur;
+ new_f = cur;
+ bcur = cur;
+ cur = node_traits::get_next(cur);
+ BOOST_TRY{
+ //Main loop
+ while(cur != end){
+ if(pred(cur)){ //Might throw
+ ++num1;
+ //Process current node
+ node_traits::set_next(last_to_remove, cur);
+ last_to_remove = cur;
+ node_ptr nxt = node_traits::get_next(cur);
+ node_traits::set_next(bcur, nxt);
+ cur = nxt;
+ }
+ else{
+ ++num2;
+ bcur = cur;
+ cur = node_traits::get_next(cur);
+ }
+ }
+ }
+ BOOST_CATCH(...){
+ node_traits::set_next(last_to_remove, new_f);
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ node_traits::set_next(last_to_remove, new_f);
+ break;
+ }
+ }
+ info.num_1st_partition = num1;
+ info.num_2nd_partition = num2;
+ info.beg_2st_partition = new_f;
+ info.new_last_node = bcur;
+ }
+
+ //! <b>Requires</b>: f and l must be in a circular list.
+ //!
+ //! <b>Effects</b>: Returns the number of nodes in the range [f, l).
+ //!
+ //! <b>Complexity</b>: Linear
+ //!
+ //! <b>Throws</b>: Nothing.
+ static std::size_t distance(const const_node_ptr &f, const const_node_ptr &l)
+ {
+ const_node_ptr i(f);
+ std::size_t result = 0;
+ while(i != l){
+ i = NodeTraits::get_next(i);
+ ++result;
+ }
+ return result;
+ }
+};
+
+/// @endcond
+
+} //namespace detail
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<CommonSListAlgorithms, NodeTraits>
+{
+ typedef detail::common_slist_algorithms<NodeTraits> type;
+};
+
+
+} //namespace intrusive
+} //namespace boost
+
+#endif //BOOST_INTRUSIVE_COMMON_SLIST_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/config_begin.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/config_begin.hpp
index 8bd57a3b512..8bd57a3b512 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/config_begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/config_begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/config_end.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/config_end.hpp
index a081443e69e..a081443e69e 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/config_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/config_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/default_header_holder.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/default_header_holder.hpp
index ba561b5f5bc..ba561b5f5bc 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/default_header_holder.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/default_header_holder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/ebo_functor_holder.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/ebo_functor_holder.hpp
index 27415c11703..27415c11703 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/ebo_functor_holder.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/ebo_functor_holder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/empty_node_checker.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/empty_node_checker.hpp
index 16aa5600e71..16aa5600e71 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/empty_node_checker.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/empty_node_checker.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/equal_to_value.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/equal_to_value.hpp
index c5d9e5305c1..c5d9e5305c1 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/equal_to_value.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/equal_to_value.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/exception_disposer.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/exception_disposer.hpp
index 91c5bf3b67f..91c5bf3b67f 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/exception_disposer.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/exception_disposer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/function_detector.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/function_detector.hpp
index 5ecaeaf0731..5ecaeaf0731 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/function_detector.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/function_detector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/generic_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/generic_hook.hpp
index 13421b88050..13421b88050 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/generic_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/generic_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/get_value_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/get_value_traits.hpp
index 222f8078a64..222f8078a64 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/get_value_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/get_value_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/has_member_function_callable_with.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/has_member_function_callable_with.hpp
index 92ef60ee6df..92ef60ee6df 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/has_member_function_callable_with.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/has_member_function_callable_with.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/hashtable_node.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/hashtable_node.hpp
index d3b11d1b229..d3b11d1b229 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/hashtable_node.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/hashtable_node.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/hook_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/hook_traits.hpp
index 7a6f206ca2b..7a6f206ca2b 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/hook_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/hook_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/iiterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/iiterator.hpp
index 5ab1de2bb12..5ab1de2bb12 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/iiterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/iiterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/is_stateful_value_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/is_stateful_value_traits.hpp
index e43f6d340ac..e43f6d340ac 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/is_stateful_value_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/is_stateful_value_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/iterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/iterator.hpp
index c25be430a2c..c25be430a2c 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/key_nodeptr_comp.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/key_nodeptr_comp.hpp
index bdc025e5ab3..bdc025e5ab3 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/key_nodeptr_comp.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/key_nodeptr_comp.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/list_iterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/list_iterator.hpp
new file mode 100644
index 00000000000..3aae2d5a54d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/list_iterator.hpp
@@ -0,0 +1,134 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_LIST_ITERATOR_HPP
+#define BOOST_INTRUSIVE_LIST_ITERATOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/detail/std_fwd.hpp>
+#include <boost/intrusive/detail/iiterator.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+
+namespace boost {
+namespace intrusive {
+
+// list_iterator provides some basic functions for a
+// node oriented bidirectional iterator:
+template<class ValueTraits, bool IsConst>
+class list_iterator
+{
+ private:
+ typedef iiterator
+ <ValueTraits, IsConst, std::bidirectional_iterator_tag> types_t;
+
+ static const bool stateful_value_traits = types_t::stateful_value_traits;
+
+ typedef ValueTraits value_traits;
+ typedef typename types_t::node_traits node_traits;
+
+ typedef typename types_t::node node;
+ typedef typename types_t::node_ptr node_ptr;
+ typedef typename types_t::const_value_traits_ptr const_value_traits_ptr;
+
+ public:
+ typedef typename types_t::iterator_type::difference_type difference_type;
+ typedef typename types_t::iterator_type::value_type value_type;
+ typedef typename types_t::iterator_type::pointer pointer;
+ typedef typename types_t::iterator_type::reference reference;
+ typedef typename types_t::iterator_type::iterator_category iterator_category;
+
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit list_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
+ : members_(nodeptr, traits_ptr)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator(list_iterator<ValueTraits, false> const& other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
+ { return members_.nodeptr_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator &operator=(const node_ptr &node)
+ { members_.nodeptr_ = node; return static_cast<list_iterator&>(*this); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
+ { return members_.get_ptr(); }
+
+ public:
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator& operator++()
+ {
+ node_ptr p = node_traits::get_next(members_.nodeptr_);
+ members_.nodeptr_ = p;
+ return static_cast<list_iterator&> (*this);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator operator++(int)
+ {
+ list_iterator result (*this);
+ members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
+ return result;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator& operator--()
+ {
+ members_.nodeptr_ = node_traits::get_previous(members_.nodeptr_);
+ return static_cast<list_iterator&> (*this);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE list_iterator operator--(int)
+ {
+ list_iterator result (*this);
+ members_.nodeptr_ = node_traits::get_previous(members_.nodeptr_);
+ return result;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const list_iterator& l, const list_iterator& r)
+ { return l.pointed_node() == r.pointed_node(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const list_iterator& l, const list_iterator& r)
+ { return !(l == r); }
+
+ BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
+ { return *operator->(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
+ { return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
+
+ list_iterator<ValueTraits, false> unconst() const
+ { return list_iterator<ValueTraits, false>(this->pointed_node(), this->get_value_traits()); }
+
+ private:
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
+ { return ValueTraits::to_value_ptr(members_.nodeptr_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
+ { return this->get_value_traits()->to_value_ptr(members_.nodeptr_); }
+
+ iiterator_members<node_ptr, const_value_traits_ptr, stateful_value_traits> members_;
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#endif //BOOST_INTRUSIVE_LIST_ITERATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/list_node.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/list_node.hpp
new file mode 100644
index 00000000000..bc30e89f258
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/list_node.hpp
@@ -0,0 +1,72 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_LIST_NODE_HPP
+#define BOOST_INTRUSIVE_LIST_NODE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/pointer_rebind.hpp>
+
+namespace boost {
+namespace intrusive {
+
+// list_node_traits can be used with circular_list_algorithms and supplies
+// a list_node holding the pointers needed for a double-linked list
+// it is used by list_derived_node and list_member_node
+
+template<class VoidPointer>
+struct list_node
+{
+ typedef typename pointer_rebind<VoidPointer, list_node>::type node_ptr;
+ node_ptr next_;
+ node_ptr prev_;
+};
+
+template<class VoidPointer>
+struct list_node_traits
+{
+ typedef list_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const const_node_ptr & n)
+ { return n->prev_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous(const node_ptr & n)
+ { return n->prev_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_previous(node_ptr n, node_ptr prev)
+ { n->prev_ = prev; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
+ { return n->next_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
+ { return n->next_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
+ { n->next_ = next; }
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#endif //BOOST_INTRUSIVE_LIST_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/math.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/math.hpp
index 4901053cb3e..4901053cb3e 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/math.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/math.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/minimal_less_equal_header.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_less_equal_header.hpp
index 5e8a19debf9..5e8a19debf9 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/minimal_less_equal_header.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_less_equal_header.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/minimal_pair_header.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_pair_header.hpp
index 1358a085881..1358a085881 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/minimal_pair_header.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/minimal_pair_header.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/mpl.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/mpl.hpp
index 15230881611..15230881611 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/mpl.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/mpl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/node_cloner_disposer.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/node_cloner_disposer.hpp
new file mode 100644
index 00000000000..8ed3c4dab2e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/node_cloner_disposer.hpp
@@ -0,0 +1,105 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2014-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_DETAIL_NODE_CLONER_DISPOSER_HPP
+#define BOOST_INTRUSIVE_DETAIL_NODE_CLONER_DISPOSER_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+template<class F, class ValueTraits, algo_types AlgoType, bool IsConst = true>
+struct node_cloner
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public ebo_functor_holder<F>
+{
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef ebo_functor_holder<F> base_t;
+ typedef typename get_algo< AlgoType
+ , node_traits>::type node_algorithms;
+ static const bool safemode_or_autounlink =
+ is_safe_autounlink<value_traits::link_mode>::value;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::pointer pointer;
+ typedef typename value_traits::const_pointer const_pointer;
+ typedef typename node_traits::node node;
+ typedef typename value_traits::const_node_ptr const_node_ptr;
+ typedef typename pointer_traits<pointer>::reference reference;
+ typedef typename pointer_traits
+ <const_pointer>::reference const_reference;
+ typedef typename if_c<IsConst, const_reference, reference>::type reference_type;
+
+ node_cloner(F f, const ValueTraits *traits)
+ : base_t(f), traits_(traits)
+ {}
+
+ // tree-based containers use this method, which is proxy-reference friendly
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(const node_ptr & p)
+ {
+ reference_type v = *traits_->to_value_ptr(p);
+ node_ptr n = traits_->to_node_ptr(*base_t::get()(v));
+ //Cloned node must be in default mode if the linking mode requires it
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(n));
+ return n;
+ }
+
+ const ValueTraits * const traits_;
+};
+
+template<class F, class ValueTraits, algo_types AlgoType>
+struct node_disposer
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public ebo_functor_holder<F>
+{
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef ebo_functor_holder<F> base_t;
+ typedef typename get_algo< AlgoType
+ , node_traits>::type node_algorithms;
+ static const bool safemode_or_autounlink =
+ is_safe_autounlink<value_traits::link_mode>::value;
+
+ node_disposer(F f, const ValueTraits *cont)
+ : base_t(f), traits_(cont)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE void operator()(const node_ptr & p)
+ {
+ if(safemode_or_autounlink)
+ node_algorithms::init(p);
+ base_t::get()(traits_->to_value_ptr(p));
+ }
+ const ValueTraits * const traits_;
+};
+
+} //namespace detail{
+} //namespace intrusive{
+} //namespace boost{
+
+#endif //BOOST_INTRUSIVE_DETAIL_NODE_CLONER_DISPOSER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/node_holder.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/node_holder.hpp
index b8dabef2dfa..b8dabef2dfa 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/node_holder.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/node_holder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/node_to_value.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/node_to_value.hpp
index 218e78e4e0e..218e78e4e0e 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/node_to_value.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/node_to_value.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/parent_from_member.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/parent_from_member.hpp
index 275229ab474..275229ab474 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/parent_from_member.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/parent_from_member.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/rbtree_node.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/rbtree_node.hpp
new file mode 100644
index 00000000000..8b573ecc212
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/rbtree_node.hpp
@@ -0,0 +1,205 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2013.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_RBTREE_NODE_HPP
+#define BOOST_INTRUSIVE_RBTREE_NODE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/pointer_rebind.hpp>
+#include <boost/intrusive/rbtree_algorithms.hpp>
+#include <boost/intrusive/pointer_plus_bits.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/tree_node.hpp>
+
+namespace boost {
+namespace intrusive {
+
+/////////////////////////////////////////////////////////////////////////////
+// //
+// Generic node_traits for any pointer type //
+// //
+/////////////////////////////////////////////////////////////////////////////
+
+//This is the compact representation: 3 pointers
+template<class VoidPointer>
+struct compact_rbtree_node
+{
+ typedef compact_rbtree_node<VoidPointer> node;
+ typedef typename pointer_rebind<VoidPointer, node >::type node_ptr;
+ typedef typename pointer_rebind<VoidPointer, const node >::type const_node_ptr;
+ enum color { red_t, black_t };
+ node_ptr parent_, left_, right_;
+};
+
+//This is the normal representation: 3 pointers + enum
+template<class VoidPointer>
+struct rbtree_node
+{
+ typedef rbtree_node<VoidPointer> node;
+ typedef typename pointer_rebind<VoidPointer, node >::type node_ptr;
+ typedef typename pointer_rebind<VoidPointer, const node >::type const_node_ptr;
+
+ enum color { red_t, black_t };
+ node_ptr parent_, left_, right_;
+ color color_;
+};
+
+//This is the default node traits implementation
+//using a node with 3 generic pointers plus an enum
+template<class VoidPointer>
+struct default_rbtree_node_traits_impl
+{
+ typedef rbtree_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+
+ typedef typename node::color color;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
+ { return n->parent_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
+ { return n->parent_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
+ { n->parent_ = p; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
+ { n->left_ = l; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
+ { n->right_ = r; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
+ { return n->color_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color get_color(const node_ptr & n)
+ { return n->color_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
+ { n->color_ = c; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color black()
+ { return node::black_t; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color red()
+ { return node::red_t; }
+};
+
+//This is the compact node traits implementation
+//using a node with 3 generic pointers
+template<class VoidPointer>
+struct compact_rbtree_node_traits_impl
+{
+ typedef compact_rbtree_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename node::const_node_ptr const_node_ptr;
+
+ typedef pointer_plus_bits<node_ptr, 1> ptr_bit;
+
+ typedef typename node::color color;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
+ { return ptr_bit::get_pointer(n->parent_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
+ { return ptr_bit::get_pointer(n->parent_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
+ { ptr_bit::set_pointer(n->parent_, p); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
+ { n->left_ = l; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
+ { n->right_ = r; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color get_color(const const_node_ptr & n)
+ { return (color)ptr_bit::get_bits(n->parent_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color get_color(const node_ptr & n)
+ { return (color)ptr_bit::get_bits(n->parent_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_color(const node_ptr & n, color c)
+ { ptr_bit::set_bits(n->parent_, c != 0); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color black()
+ { return node::black_t; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static color red()
+ { return node::red_t; }
+};
+
+//Dispatches the implementation based on the boolean
+template<class VoidPointer, bool Compact>
+struct rbtree_node_traits_dispatch
+ : public default_rbtree_node_traits_impl<VoidPointer>
+{};
+
+template<class VoidPointer>
+struct rbtree_node_traits_dispatch<VoidPointer, true>
+ : public compact_rbtree_node_traits_impl<VoidPointer>
+{};
+
+//Inherit from rbtree_node_traits_dispatch depending on the embedding capabilities
+template<class VoidPointer, bool OptimizeSize = false>
+struct rbtree_node_traits
+ : public rbtree_node_traits_dispatch
+ < VoidPointer
+ , OptimizeSize &&
+ (max_pointer_plus_bits
+ < VoidPointer
+ , detail::alignment_of<compact_rbtree_node<VoidPointer> >::value
+ >::value >= 1)
+ >
+{};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_RBTREE_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/reverse_iterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/reverse_iterator.hpp
index 57631feb5d4..57631feb5d4 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/reverse_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/reverse_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/simple_disposers.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/simple_disposers.hpp
new file mode 100644
index 00000000000..f9d23bf62ed
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/simple_disposers.hpp
@@ -0,0 +1,50 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2014-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP
+#define BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+namespace detail {
+
+class null_disposer
+{
+ public:
+ template <class Pointer>
+ void operator()(Pointer)
+ {}
+};
+
+template<class NodeAlgorithms>
+class init_disposer
+{
+ typedef typename NodeAlgorithms::node_ptr node_ptr;
+
+ public:
+ BOOST_INTRUSIVE_FORCEINLINE void operator()(const node_ptr & p)
+ { NodeAlgorithms::init(p); }
+};
+
+} //namespace detail{
+} //namespace intrusive{
+} //namespace boost{
+
+#endif //BOOST_INTRUSIVE_DETAIL_SIMPLE_DISPOSERS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/size_holder.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/size_holder.hpp
index bd14dc50499..bd14dc50499 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/size_holder.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/size_holder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/slist_iterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/slist_iterator.hpp
new file mode 100644
index 00000000000..96a5ac01912
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/slist_iterator.hpp
@@ -0,0 +1,125 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_SLIST_ITERATOR_HPP
+#define BOOST_INTRUSIVE_SLIST_ITERATOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/detail/std_fwd.hpp>
+#include <boost/intrusive/detail/iiterator.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+
+namespace boost {
+namespace intrusive {
+
+
+// slist_iterator provides some basic functions for a
+// node oriented bidirectional iterator:
+template<class ValueTraits, bool IsConst>
+class slist_iterator
+{
+ private:
+ typedef iiterator
+ <ValueTraits, IsConst, std::forward_iterator_tag> types_t;
+
+ static const bool stateful_value_traits = types_t::stateful_value_traits;
+
+ typedef ValueTraits value_traits;
+ typedef typename types_t::node_traits node_traits;
+
+ typedef typename types_t::node node;
+ typedef typename types_t::node_ptr node_ptr;
+ typedef typename types_t::const_value_traits_ptr const_value_traits_ptr;
+
+ public:
+ typedef typename types_t::iterator_type::difference_type difference_type;
+ typedef typename types_t::iterator_type::value_type value_type;
+ typedef typename types_t::iterator_type::pointer pointer;
+ typedef typename types_t::iterator_type::reference reference;
+ typedef typename types_t::iterator_type::iterator_category iterator_category;
+
+ BOOST_INTRUSIVE_FORCEINLINE slist_iterator()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit slist_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
+ : members_(nodeptr, traits_ptr)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE slist_iterator(slist_iterator<ValueTraits, false> const& other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
+ { return members_.nodeptr_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE slist_iterator &operator=(const node_ptr &node)
+ { members_.nodeptr_ = node; return static_cast<slist_iterator&>(*this); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
+ { return members_.get_ptr(); }
+
+ public:
+ BOOST_INTRUSIVE_FORCEINLINE slist_iterator& operator++()
+ {
+ members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
+ return static_cast<slist_iterator&> (*this);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE slist_iterator operator++(int)
+ {
+ slist_iterator result (*this);
+ members_.nodeptr_ = node_traits::get_next(members_.nodeptr_);
+ return result;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const slist_iterator& l, const slist_iterator& r)
+ { return l.pointed_node() == r.pointed_node(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const slist_iterator& l, const slist_iterator& r)
+ { return !(l == r); }
+
+ BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
+ { return *operator->(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
+ { return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE slist_iterator<ValueTraits, false> unconst() const
+ { return slist_iterator<ValueTraits, false>(this->pointed_node(), this->get_value_traits()); }
+
+ private:
+
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
+ { return ValueTraits::to_value_ptr(members_.nodeptr_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
+ { return this->get_value_traits()->to_value_ptr(members_.nodeptr_); }
+
+ iiterator_members<node_ptr, const_value_traits_ptr, stateful_value_traits> members_;
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SLIST_ITERATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/slist_node.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/slist_node.hpp
new file mode 100644
index 00000000000..ee8ab40a3da
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/slist_node.hpp
@@ -0,0 +1,64 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_SLIST_NODE_HPP
+#define BOOST_INTRUSIVE_SLIST_NODE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/pointer_rebind.hpp>
+
+namespace boost {
+namespace intrusive {
+
+template<class VoidPointer>
+struct slist_node
+{
+ typedef typename pointer_rebind<VoidPointer, slist_node>::type node_ptr;
+ node_ptr next_;
+};
+
+// slist_node_traits can be used with circular_slist_algorithms and supplies
+// a slist_node holding the pointers needed for a singly-linked list
+// it is used by slist_base_hook and slist_member_hook
+template<class VoidPointer>
+struct slist_node_traits
+{
+ typedef slist_node<VoidPointer> node;
+ typedef typename node::node_ptr node_ptr;
+ typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const const_node_ptr & n)
+ { return n->next_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_next(const node_ptr & n)
+ { return n->next_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_next(node_ptr n, node_ptr next)
+ { n->next_ = next; }
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SLIST_NODE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/std_fwd.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/std_fwd.hpp
index 8193ea8ed1f..8193ea8ed1f 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/std_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/std_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/transform_iterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/transform_iterator.hpp
index 0a715754d71..0a715754d71 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/transform_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/transform_iterator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_iterator.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_iterator.hpp
new file mode 100644
index 00000000000..a4bbc1b0667
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_iterator.hpp
@@ -0,0 +1,172 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_TREE_ITERATOR_HPP
+#define BOOST_INTRUSIVE_TREE_ITERATOR_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/detail/std_fwd.hpp>
+#include <boost/intrusive/detail/iiterator.hpp>
+#include <boost/intrusive/detail/bstree_algorithms_base.hpp>
+
+namespace boost {
+namespace intrusive {
+
+/////////////////////////////////////////////////////////////////////////////
+// //
+// Implementation of the tree iterator //
+// //
+/////////////////////////////////////////////////////////////////////////////
+
+// tree_iterator provides some basic functions for a
+// node oriented bidirectional iterator:
+template<class ValueTraits, bool IsConst>
+class tree_iterator
+{
+ private:
+ typedef iiterator< ValueTraits, IsConst
+ , std::bidirectional_iterator_tag> types_t;
+ typedef typename types_t::value_traits value_traits;
+ typedef typename types_t::node_traits node_traits;
+ typedef typename types_t::node node;
+ typedef typename types_t::node_ptr node_ptr;
+ typedef typename types_t::const_value_traits_ptr const_value_traits_ptr;
+ typedef bstree_algorithms_base<node_traits> node_algorithms;
+
+ static const bool stateful_value_traits = types_t::stateful_value_traits;
+
+ void unspecified_bool_type_func() const {}
+ typedef void (tree_iterator::*unspecified_bool_type)() const;
+
+ public:
+ typedef typename types_t::iterator_type::difference_type difference_type;
+ typedef typename types_t::iterator_type::value_type value_type;
+ typedef typename types_t::iterator_type::pointer pointer;
+ typedef typename types_t::iterator_type::reference reference;
+ typedef typename types_t::iterator_type::iterator_category iterator_category;
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit tree_iterator(const node_ptr & nodeptr, const const_value_traits_ptr &traits_ptr)
+ : members_(nodeptr, traits_ptr)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator(tree_iterator<value_traits, false> const& other)
+ : members_(other.pointed_node(), other.get_value_traits())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr pointed_node() const
+ { return members_.nodeptr_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator &operator=(const node_ptr &nodeptr)
+ { members_.nodeptr_ = nodeptr; return static_cast<tree_iterator&>(*this); }
+
+ public:
+ tree_iterator& operator++()
+ {
+ members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_);
+ return static_cast<tree_iterator&> (*this);
+ }
+
+ tree_iterator operator++(int)
+ {
+ tree_iterator result (*this);
+ members_.nodeptr_ = node_algorithms::next_node(members_.nodeptr_);
+ return result;
+ }
+
+ tree_iterator& operator--()
+ {
+ members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_);
+ return static_cast<tree_iterator&> (*this);
+ }
+
+ tree_iterator operator--(int)
+ {
+ tree_iterator result (*this);
+ members_.nodeptr_ = node_algorithms::prev_node(members_.nodeptr_);
+ return result;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_left()
+ {
+ members_.nodeptr_ = node_traits::get_left(members_.nodeptr_);
+ return static_cast<tree_iterator&> (*this);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_right()
+ {
+ members_.nodeptr_ = node_traits::get_right(members_.nodeptr_);
+ return static_cast<tree_iterator&> (*this);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_iterator& go_parent()
+ {
+ members_.nodeptr_ = node_traits::get_parent(members_.nodeptr_);
+ return static_cast<tree_iterator&> (*this);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE operator unspecified_bool_type() const
+ { return members_.nodeptr_ ? &tree_iterator::unspecified_bool_type_func : 0; }
+
+ BOOST_INTRUSIVE_FORCEINLINE bool operator! () const
+ { return !members_.nodeptr_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE friend bool operator== (const tree_iterator& l, const tree_iterator& r)
+ { return l.pointed_node() == r.pointed_node(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE friend bool operator!= (const tree_iterator& l, const tree_iterator& r)
+ { return !(l == r); }
+
+ BOOST_INTRUSIVE_FORCEINLINE reference operator*() const
+ { return *operator->(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator->() const
+ { return this->operator_arrow(detail::bool_<stateful_value_traits>()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr get_value_traits() const
+ { return members_.get_ptr(); }
+
+ tree_iterator end_iterator_from_it() const
+ {
+ return tree_iterator(node_algorithms::get_header(this->pointed_node()), this->get_value_traits());
+ }
+
+ tree_iterator<value_traits, false> unconst() const
+ { return tree_iterator<value_traits, false>(this->pointed_node(), this->get_value_traits()); }
+
+ private:
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::false_) const
+ { return ValueTraits::to_value_ptr(members_.nodeptr_); }
+
+ BOOST_INTRUSIVE_FORCEINLINE pointer operator_arrow(detail::true_) const
+ { return this->get_value_traits()->to_value_ptr(members_.nodeptr_); }
+
+ iiterator_members<node_ptr, const_value_traits_ptr, stateful_value_traits> members_;
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_TREE_ITERATOR_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_node.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_node.hpp
new file mode 100644
index 00000000000..6df3343e03f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_node.hpp
@@ -0,0 +1,80 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_TREE_NODE_HPP
+#define BOOST_INTRUSIVE_TREE_NODE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/pointer_rebind.hpp>
+
+namespace boost {
+namespace intrusive {
+
+template<class VoidPointer>
+struct tree_node
+{
+ typedef typename pointer_rebind<VoidPointer, tree_node>::type node_ptr;
+
+ node_ptr parent_, left_, right_;
+};
+
+template<class VoidPointer>
+struct tree_node_traits
+{
+ typedef tree_node<VoidPointer> node;
+
+ typedef typename node::node_ptr node_ptr;
+ typedef typename pointer_rebind<VoidPointer, const node>::type const_node_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const const_node_ptr & n)
+ { return n->parent_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_parent(const node_ptr & n)
+ { return n->parent_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_parent(node_ptr n, node_ptr p)
+ { n->parent_ = p; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const const_node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_left(const node_ptr & n)
+ { return n->left_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_left(node_ptr n, node_ptr l)
+ { n->left_ = l; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const const_node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_right(const node_ptr & n)
+ { return n->right_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void set_right(node_ptr n, node_ptr r)
+ { n->right_ = r; }
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_TREE_NODE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_value_compare.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_value_compare.hpp
new file mode 100644
index 00000000000..c78da0acd6c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/tree_value_compare.hpp
@@ -0,0 +1,186 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2015-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_INTRUSIVE_DETAIL_TREE_VALUE_COMPARE_HPP
+#define BOOST_INTRUSIVE_DETAIL_TREE_VALUE_COMPARE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/intrusive/detail/workaround.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+
+namespace boost{
+namespace intrusive{
+
+//Needed to support smart references to value types
+template <class From, class ValuePtr>
+struct disable_if_smartref_to
+ : detail::disable_if_c
+ < detail::is_same
+ <From, typename pointer_traits
+ <ValuePtr>
+ ::reference>::value
+ || detail::is_same
+ <From, typename pointer_traits
+ < typename pointer_rebind
+ < ValuePtr
+ , const typename boost::movelib::pointer_element<ValuePtr>::type>::type>
+ ::reference>::value
+ >
+{};
+
+//This function object takes a KeyCompare function object
+//and compares values that contains keys using KeyOfValue
+template< class ValuePtr, class KeyCompare, class KeyOfValue, class Ret = bool
+ , bool = boost::intrusive::detail::is_same
+ <typename boost::movelib::pointer_element<ValuePtr>::type, typename KeyOfValue::type>::value >
+struct tree_value_compare
+ : public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
+{
+ typedef typename
+ boost::movelib::pointer_element<ValuePtr>::type value_type;
+ typedef KeyCompare key_compare;
+ typedef KeyOfValue key_of_value;
+ typedef typename KeyOfValue::type key_type;
+
+ typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare()
+ : base_t()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit tree_value_compare(const key_compare &kcomp)
+ : base_t(kcomp)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare (const tree_value_compare &x)
+ : base_t(x.base_t::get())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const tree_value_compare &x)
+ { this->base_t::get() = x.base_t::get(); return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const key_compare &x)
+ { this->base_t::get() = x; return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE const key_compare &key_comp() const
+ { return static_cast<const key_compare &>(*this); }
+
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key) const
+ { return this->key_comp()(key); }
+
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const value_type &value) const
+ { return this->key_comp()(KeyOfValue()(value)); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const U &nonkey
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(nonkey); }
+
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key1, const key_type &key2) const
+ { return this->key_comp()(key1, key2); }
+
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const value_type &value1, const value_type &value2) const
+ { return this->key_comp()(KeyOfValue()(value1), KeyOfValue()(value2)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key1, const value_type &value2) const
+ { return this->key_comp()(key1, KeyOfValue()(value2)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const value_type &value1, const key_type &key2) const
+ { return this->key_comp()(KeyOfValue()(value1), key2); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const key_type &key1, const U &nonkey2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(key1, nonkey2); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const U &nonkey1, const key_type &key2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(nonkey1, key2); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const value_type &value1, const U &nonvalue2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(KeyOfValue()(value1), nonvalue2); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const U &nonvalue1, const value_type &value2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(nonvalue1, KeyOfValue()(value2)); }
+};
+
+template<class ValuePtr, class KeyCompare, class KeyOfValue, class Ret>
+struct tree_value_compare<ValuePtr, KeyCompare, KeyOfValue, Ret, true>
+ : public boost::intrusive::detail::ebo_functor_holder<KeyCompare>
+{
+ typedef typename
+ boost::movelib::pointer_element<ValuePtr>::type value_type;
+ typedef KeyCompare key_compare;
+ typedef KeyOfValue key_of_value;
+ typedef typename KeyOfValue::type key_type;
+
+ typedef boost::intrusive::detail::ebo_functor_holder<KeyCompare> base_t;
+
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare()
+ : base_t()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit tree_value_compare(const key_compare &kcomp)
+ : base_t(kcomp)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare (const tree_value_compare &x)
+ : base_t(x.base_t::get())
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const tree_value_compare &x)
+ { this->base_t::get() = x.base_t::get(); return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE tree_value_compare &operator=(const key_compare &x)
+ { this->base_t::get() = x; return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE const key_compare &key_comp() const
+ { return static_cast<const key_compare &>(*this); }
+
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key) const
+ { return this->key_comp()(key); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const U &nonkey
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(nonkey); }
+
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const key_type &key1, const key_type &key2) const
+ { return this->key_comp()(key1, key2); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()( const key_type &key1, const U &nonkey2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(key1, nonkey2); }
+
+ template<class U>
+ BOOST_INTRUSIVE_FORCEINLINE Ret operator()(const U &nonkey1, const key_type &key2
+ , typename disable_if_smartref_to<U, ValuePtr>::type* = 0) const
+ { return this->key_comp()(nonkey1, key2); }
+};
+
+} //namespace intrusive{
+} //namespace boost{
+
+#endif //#ifdef BOOST_INTRUSIVE_DETAIL_TREE_VALUE_COMPARE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/uncast.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/uncast.hpp
index 7db97b74571..7db97b74571 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/uncast.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/uncast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/detail/workaround.hpp b/src/third_party/boost-1.69.0/boost/intrusive/detail/workaround.hpp
index 594ac0b2e54..594ac0b2e54 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/detail/workaround.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/detail/workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/hashtable.hpp b/src/third_party/boost-1.69.0/boost/intrusive/hashtable.hpp
new file mode 100644
index 00000000000..1f1f1696715
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/hashtable.hpp
@@ -0,0 +1,3668 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2006-2015
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_INTRUSIVE_HASHTABLE_HPP
+#define BOOST_INTRUSIVE_HASHTABLE_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+//General intrusive utilities
+#include <boost/intrusive/detail/hashtable_node.hpp>
+#include <boost/intrusive/detail/transform_iterator.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
+#include <boost/intrusive/detail/node_to_value.hpp>
+#include <boost/intrusive/detail/exception_disposer.hpp>
+#include <boost/intrusive/detail/node_cloner_disposer.hpp>
+#include <boost/intrusive/detail/simple_disposers.hpp>
+#include <boost/intrusive/detail/size_holder.hpp>
+#include <boost/intrusive/detail/iterator.hpp>
+
+//Implementation utilities
+#include <boost/intrusive/unordered_set_hook.hpp>
+#include <boost/intrusive/slist.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+
+//boost
+#include <boost/functional/hash.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/move/adl_move_swap.hpp>
+
+//std C++
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp> //std::equal_to
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
+#include <algorithm> //std::lower_bound, std::upper_bound
+#include <cstddef> //std::size_t
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+template<class InputIt, class T>
+InputIt priv_algo_find(InputIt first, InputIt last, const T& value)
+{
+ for (; first != last; ++first) {
+ if (*first == value) {
+ return first;
+ }
+ }
+ return last;
+}
+
+template<class InputIt, class T>
+typename boost::intrusive::iterator_traits<InputIt>::difference_type
+ priv_algo_count(InputIt first, InputIt last, const T& value)
+{
+ typename boost::intrusive::iterator_traits<InputIt>::difference_type ret = 0;
+ for (; first != last; ++first) {
+ if (*first == value) {
+ ret++;
+ }
+ }
+ return ret;
+}
+
+template <class ForwardIterator1, class ForwardIterator2>
+bool priv_algo_is_permutation(ForwardIterator1 first1, ForwardIterator1 last1, ForwardIterator2 first2)
+{
+ typedef typename
+ boost::intrusive::iterator_traits<ForwardIterator2>::difference_type
+ distance_type;
+ //Efficiently compare identical prefixes: O(N) if sequences
+ //have the same elements in the same order.
+ for ( ; first1 != last1; ++first1, ++first2){
+ if (! (*first1 == *first2))
+ break;
+ }
+ if (first1 == last1){
+ return true;
+ }
+
+ //Establish last2 assuming equal ranges by iterating over the
+ //rest of the list.
+ ForwardIterator2 last2 = first2;
+ boost::intrusive::iterator_advance(last2, boost::intrusive::iterator_distance(first1, last1));
+ for(ForwardIterator1 scan = first1; scan != last1; ++scan){
+ if (scan != (priv_algo_find)(first1, scan, *scan)){
+ continue; //We've seen this one before.
+ }
+ distance_type matches = (priv_algo_count)(first2, last2, *scan);
+ if (0 == matches || (priv_algo_count)(scan, last1, *scan != matches)){
+ return false;
+ }
+ }
+ return true;
+}
+
+template<int Dummy = 0>
+struct prime_list_holder
+{
+ private:
+
+ template <class SizeType> // sizeof(SizeType) < sizeof(std::size_t)
+ static BOOST_INTRUSIVE_FORCEINLINE SizeType truncate_size_type(std::size_t n, detail::true_)
+ {
+ return n < std::size_t(SizeType(-1)) ? static_cast<SizeType>(n) : SizeType(-1);
+ }
+
+ template <class SizeType> // sizeof(SizeType) == sizeof(std::size_t)
+ static BOOST_INTRUSIVE_FORCEINLINE SizeType truncate_size_type(std::size_t n, detail::false_)
+ {
+ return static_cast<SizeType>(n);
+ }
+
+ template <class SizeType> //sizeof(SizeType) > sizeof(std::size_t)
+ static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count_dispatch(SizeType n, detail::true_)
+ {
+ std::size_t const c = n > std::size_t(-1)
+ ? std::size_t(-1)
+ : suggested_upper_bucket_count_impl(static_cast<std::size_t>(n));
+ return static_cast<SizeType>(c);
+ }
+
+ template <class SizeType> //sizeof(SizeType) > sizeof(std::size_t)
+ static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count_dispatch(SizeType n, detail::true_)
+ {
+ std::size_t const c = n > std::size_t(-1)
+ ? std::size_t(-1)
+ : suggested_lower_bucket_count_impl(static_cast<std::size_t>(n));
+ return static_cast<SizeType>(c);
+ }
+
+ template <class SizeType>
+ static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count_dispatch(SizeType n, detail::false_)
+ {
+ std::size_t const c = suggested_upper_bucket_count_impl(static_cast<std::size_t>(n));
+ return truncate_size_type<SizeType>(c, detail::bool_<(sizeof(SizeType) < sizeof(std::size_t))>());
+
+ }
+
+ template <class SizeType>
+ static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count_dispatch(SizeType n, detail::false_)
+ {
+ std::size_t const c = suggested_lower_bucket_count_impl(static_cast<std::size_t>(n));
+ return truncate_size_type<SizeType>(c, detail::bool_<(sizeof(SizeType) < sizeof(std::size_t))>());
+ }
+
+ static const std::size_t prime_list[];
+ static const std::size_t prime_list_size;
+
+ static std::size_t suggested_lower_bucket_count_impl(std::size_t n)
+ {
+ const std::size_t *primes = &prime_list_holder<0>::prime_list[0];
+ const std::size_t *primes_end = primes + prime_list_holder<0>::prime_list_size;
+ std::size_t const* bound = std::lower_bound(primes, primes_end, n);
+ //Tables have upper SIZE_MAX, so we must always found an entry
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(bound != primes_end);
+ bound -= std::size_t(bound != primes);
+ return *bound;
+ }
+
+ static std::size_t suggested_upper_bucket_count_impl(std::size_t n)
+ {
+ const std::size_t *primes = &prime_list_holder<0>::prime_list[0];
+ const std::size_t *primes_end = primes + prime_list_holder<0>::prime_list_size;
+ std::size_t const* bound = std::upper_bound(primes, primes_end, n);
+ bound -= std::size_t(bound == primes_end);
+ return *bound;
+ }
+
+ public:
+
+ template <class SizeType>
+ static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_upper_bucket_count(SizeType n)
+ {
+ return (suggested_upper_bucket_count_dispatch)(n, detail::bool_<(sizeof(SizeType) > sizeof(std::size_t))>());
+ }
+
+ template <class SizeType>
+ static BOOST_INTRUSIVE_FORCEINLINE SizeType suggested_lower_bucket_count(SizeType n)
+ {
+ return (suggested_lower_bucket_count_dispatch)(n, detail::bool_<(sizeof(SizeType) > sizeof(std::size_t))>());
+ }
+};
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+//We only support LLP64(Win64) or LP64(most Unix) data models
+#ifdef _WIN64 //In 64 bit windows sizeof(size_t) == sizeof(unsigned long long)
+ #define BOOST_INTRUSIVE_PRIME_C(NUMBER) NUMBER##ULL
+ #define BOOST_INTRUSIVE_64_BIT_SIZE_T 1
+#else //In 32 bit windows and 32/64 bit unixes sizeof(size_t) == sizeof(unsigned long)
+ #define BOOST_INTRUSIVE_PRIME_C(NUMBER) NUMBER##UL
+ #define BOOST_INTRUSIVE_64_BIT_SIZE_T (((((ULONG_MAX>>16)>>16)>>16)>>15) != 0)
+#endif
+
+template<int Dummy>
+const std::size_t prime_list_holder<Dummy>::prime_list[] = {
+ BOOST_INTRUSIVE_PRIME_C(3), BOOST_INTRUSIVE_PRIME_C(7),
+ BOOST_INTRUSIVE_PRIME_C(11), BOOST_INTRUSIVE_PRIME_C(17),
+ BOOST_INTRUSIVE_PRIME_C(29), BOOST_INTRUSIVE_PRIME_C(53),
+ BOOST_INTRUSIVE_PRIME_C(97), BOOST_INTRUSIVE_PRIME_C(193),
+ BOOST_INTRUSIVE_PRIME_C(389), BOOST_INTRUSIVE_PRIME_C(769),
+ BOOST_INTRUSIVE_PRIME_C(1543), BOOST_INTRUSIVE_PRIME_C(3079),
+ BOOST_INTRUSIVE_PRIME_C(6151), BOOST_INTRUSIVE_PRIME_C(12289),
+ BOOST_INTRUSIVE_PRIME_C(24593), BOOST_INTRUSIVE_PRIME_C(49157),
+ BOOST_INTRUSIVE_PRIME_C(98317), BOOST_INTRUSIVE_PRIME_C(196613),
+ BOOST_INTRUSIVE_PRIME_C(393241), BOOST_INTRUSIVE_PRIME_C(786433),
+ BOOST_INTRUSIVE_PRIME_C(1572869), BOOST_INTRUSIVE_PRIME_C(3145739),
+ BOOST_INTRUSIVE_PRIME_C(6291469), BOOST_INTRUSIVE_PRIME_C(12582917),
+ BOOST_INTRUSIVE_PRIME_C(25165843), BOOST_INTRUSIVE_PRIME_C(50331653),
+ BOOST_INTRUSIVE_PRIME_C(100663319), BOOST_INTRUSIVE_PRIME_C(201326611),
+ BOOST_INTRUSIVE_PRIME_C(402653189), BOOST_INTRUSIVE_PRIME_C(805306457),
+ BOOST_INTRUSIVE_PRIME_C(1610612741), BOOST_INTRUSIVE_PRIME_C(3221225473),
+#if BOOST_INTRUSIVE_64_BIT_SIZE_T
+ //Taken from Boost.MultiIndex code, thanks to Joaquin M Lopez Munoz.
+ BOOST_INTRUSIVE_PRIME_C(6442450939), BOOST_INTRUSIVE_PRIME_C(12884901893),
+ BOOST_INTRUSIVE_PRIME_C(25769803751), BOOST_INTRUSIVE_PRIME_C(51539607551),
+ BOOST_INTRUSIVE_PRIME_C(103079215111), BOOST_INTRUSIVE_PRIME_C(206158430209),
+ BOOST_INTRUSIVE_PRIME_C(412316860441), BOOST_INTRUSIVE_PRIME_C(824633720831),
+ BOOST_INTRUSIVE_PRIME_C(1649267441651), BOOST_INTRUSIVE_PRIME_C(3298534883309),
+ BOOST_INTRUSIVE_PRIME_C(6597069766657), BOOST_INTRUSIVE_PRIME_C(13194139533299),
+ BOOST_INTRUSIVE_PRIME_C(26388279066623), BOOST_INTRUSIVE_PRIME_C(52776558133303),
+ BOOST_INTRUSIVE_PRIME_C(105553116266489), BOOST_INTRUSIVE_PRIME_C(211106232532969),
+ BOOST_INTRUSIVE_PRIME_C(422212465066001), BOOST_INTRUSIVE_PRIME_C(844424930131963),
+ BOOST_INTRUSIVE_PRIME_C(1688849860263953), BOOST_INTRUSIVE_PRIME_C(3377699720527861),
+ BOOST_INTRUSIVE_PRIME_C(6755399441055731), BOOST_INTRUSIVE_PRIME_C(13510798882111483),
+ BOOST_INTRUSIVE_PRIME_C(27021597764222939), BOOST_INTRUSIVE_PRIME_C(54043195528445957),
+ BOOST_INTRUSIVE_PRIME_C(108086391056891903), BOOST_INTRUSIVE_PRIME_C(216172782113783843),
+ BOOST_INTRUSIVE_PRIME_C(432345564227567621), BOOST_INTRUSIVE_PRIME_C(864691128455135207),
+ BOOST_INTRUSIVE_PRIME_C(1729382256910270481), BOOST_INTRUSIVE_PRIME_C(3458764513820540933),
+ BOOST_INTRUSIVE_PRIME_C(6917529027641081903), BOOST_INTRUSIVE_PRIME_C(13835058055282163729),
+ BOOST_INTRUSIVE_PRIME_C(18446744073709551557), BOOST_INTRUSIVE_PRIME_C(18446744073709551615) //Upper limit, just in case
+#else
+ BOOST_INTRUSIVE_PRIME_C(4294967291), BOOST_INTRUSIVE_PRIME_C(4294967295) //Upper limit, just in case
+#endif
+ };
+
+#undef BOOST_INTRUSIVE_PRIME_C
+#undef BOOST_INTRUSIVE_64_BIT_SIZE_T
+
+#endif //#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+template<int Dummy>
+const std::size_t prime_list_holder<Dummy>::prime_list_size
+ = sizeof(prime_list)/sizeof(std::size_t);
+
+struct hash_bool_flags
+{
+ static const std::size_t unique_keys_pos = 1u;
+ static const std::size_t constant_time_size_pos = 2u;
+ static const std::size_t power_2_buckets_pos = 4u;
+ static const std::size_t cache_begin_pos = 8u;
+ static const std::size_t compare_hash_pos = 16u;
+ static const std::size_t incremental_pos = 32u;
+};
+
+namespace detail {
+
+template<class SupposedValueTraits>
+struct get_slist_impl_from_supposed_value_traits
+{
+ typedef SupposedValueTraits value_traits;
+ typedef typename detail::get_node_traits
+ <value_traits>::type node_traits;
+ typedef typename get_slist_impl
+ <typename reduced_slist_node_traits
+ <node_traits>::type
+ >::type type;
+};
+
+template<class SupposedValueTraits>
+struct unordered_bucket_impl
+{
+ typedef typename
+ get_slist_impl_from_supposed_value_traits
+ <SupposedValueTraits>::type slist_impl;
+ typedef detail::bucket_impl<slist_impl> implementation_defined;
+ typedef implementation_defined type;
+};
+
+template<class SupposedValueTraits>
+struct unordered_bucket_ptr_impl
+{
+ typedef typename detail::get_node_traits
+ <SupposedValueTraits>::type::node_ptr node_ptr;
+ typedef typename unordered_bucket_impl
+ <SupposedValueTraits>::type bucket_type;
+
+ typedef typename pointer_traits
+ <node_ptr>::template rebind_pointer
+ < bucket_type >::type implementation_defined;
+ typedef implementation_defined type;
+};
+
+template <class T>
+struct store_hash_is_true
+{
+ template<bool Add>
+ struct two_or_three {yes_type _[2 + Add];};
+ template <class U> static yes_type test(...);
+ template <class U> static two_or_three<U::store_hash> test (int);
+ static const bool value = sizeof(test<T>(0)) > sizeof(yes_type)*2;
+};
+
+template <class T>
+struct optimize_multikey_is_true
+{
+ template<bool Add>
+ struct two_or_three {yes_type _[2 + Add];};
+ template <class U> static yes_type test(...);
+ template <class U> static two_or_three<U::optimize_multikey> test (int);
+ static const bool value = sizeof(test<T>(0)) > sizeof(yes_type)*2;
+};
+
+struct insert_commit_data_impl
+{
+ std::size_t hash;
+};
+
+template<class Node, class SlistNodePtr>
+BOOST_INTRUSIVE_FORCEINLINE typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type
+ dcast_bucket_ptr(const SlistNodePtr &p)
+{
+ typedef typename pointer_traits<SlistNodePtr>::template rebind_pointer<Node>::type node_ptr;
+ return pointer_traits<node_ptr>::pointer_to(static_cast<Node&>(*p));
+}
+
+template<class NodeTraits>
+struct group_functions
+{
+ // A group is reverse-linked
+ //
+ // A is "first in group"
+ // C is "last in group"
+ // __________________
+ // | _____ _____ |
+ // | | | | | | <- Group links
+ // ^ V ^ V ^ V
+ // _ _ _ _
+ // A|_| B|_| C|_| D|_|
+ //
+ // ^ | ^ | ^ | ^ V <- Bucket links
+ // _ _____| |_____| |______| |____| |
+ // |B| |
+ // ^________________________________|
+ //
+
+ typedef NodeTraits node_traits;
+ typedef unordered_group_adapter<node_traits> group_traits;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::node node;
+ typedef typename reduced_slist_node_traits
+ <node_traits>::type reduced_node_traits;
+ typedef typename reduced_node_traits::node_ptr slist_node_ptr;
+ typedef typename reduced_node_traits::node slist_node;
+ typedef circular_slist_algorithms<group_traits> group_algorithms;
+ typedef circular_slist_algorithms<node_traits> node_algorithms;
+
+ static slist_node_ptr get_bucket_before_begin
+ (slist_node_ptr bucket_beg, slist_node_ptr bucket_end, node_ptr p)
+ {
+ //First find the last node of p's group.
+ //This requires checking the first node of the next group or
+ //the bucket node.
+ node_ptr prev_node = p;
+ node_ptr nxt(node_traits::get_next(p));
+ while(!(bucket_beg <= nxt && nxt <= bucket_end) &&
+ (group_traits::get_next(nxt) == prev_node)){
+ prev_node = nxt;
+ nxt = node_traits::get_next(nxt);
+ }
+
+ //If we've reached the bucket node just return it.
+ if(bucket_beg <= nxt && nxt <= bucket_end){
+ return nxt;
+ }
+
+ //Otherwise, iterate using group links until the bucket node
+ node_ptr first_node_of_group = nxt;
+ node_ptr last_node_group = group_traits::get_next(first_node_of_group);
+ slist_node_ptr possible_end = node_traits::get_next(last_node_group);
+
+ while(!(bucket_beg <= possible_end && possible_end <= bucket_end)){
+ first_node_of_group = detail::dcast_bucket_ptr<node>(possible_end);
+ last_node_group = group_traits::get_next(first_node_of_group);
+ possible_end = node_traits::get_next(last_node_group);
+ }
+ return possible_end;
+ }
+
+ static node_ptr get_prev_to_first_in_group(slist_node_ptr bucket_node, node_ptr first_in_group)
+ {
+ node_ptr nb = detail::dcast_bucket_ptr<node>(bucket_node);
+ node_ptr n;
+ while((n = node_traits::get_next(nb)) != first_in_group){
+ nb = group_traits::get_next(n); //go to last in group
+ }
+ return nb;
+ }
+
+ static void erase_from_group(slist_node_ptr end_ptr, node_ptr to_erase_ptr, detail::true_)
+ {
+ node_ptr const nxt_ptr(node_traits::get_next(to_erase_ptr));
+ //Check if the next node is in the group (not end node) and reverse linked to
+ //'to_erase_ptr'. Erase if that's the case.
+ if(nxt_ptr != end_ptr && to_erase_ptr == group_traits::get_next(nxt_ptr)){
+ group_algorithms::unlink_after(nxt_ptr);
+ }
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void erase_from_group(const slist_node_ptr&, const node_ptr&, detail::false_)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(node_ptr first_in_group, detail::true_)
+ { return group_traits::get_next(first_in_group); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_last_in_group(node_ptr n, detail::false_)
+ { return n; }
+
+ static node_ptr get_first_in_group(node_ptr n, detail::true_)
+ {
+ node_ptr ng;
+ while(n == node_traits::get_next((ng = group_traits::get_next(n)))){
+ n = ng;
+ }
+ return n;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr next_group_if_first_in_group(node_ptr ptr)
+ {
+ return node_traits::get_next(group_traits::get_next(ptr));
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_first_in_group(node_ptr n, detail::false_)
+ { return n; }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void insert_in_group(node_ptr first_in_group, node_ptr n, true_)
+ { group_algorithms::link_after(first_in_group, n); }
+
+ static void insert_in_group(const node_ptr&, const node_ptr&, false_)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr split_group(node_ptr const new_first_in_group)
+ {
+ node_ptr const first((get_first_in_group)(new_first_in_group, detail::true_()));
+ if(first != new_first_in_group){
+ node_ptr const last = group_traits::get_next(first);
+ group_traits::set_next(first, group_traits::get_next(new_first_in_group));
+ group_traits::set_next(new_first_in_group, last);
+ }
+ return first;
+ }
+};
+
+template<class BucketType, class SplitTraits>
+class incremental_rehash_rollback
+{
+ private:
+ typedef BucketType bucket_type;
+ typedef SplitTraits split_traits;
+
+ incremental_rehash_rollback();
+ incremental_rehash_rollback & operator=(const incremental_rehash_rollback &);
+ incremental_rehash_rollback (const incremental_rehash_rollback &);
+
+ public:
+ incremental_rehash_rollback
+ (bucket_type &source_bucket, bucket_type &destiny_bucket, split_traits &split_traits)
+ : source_bucket_(source_bucket), destiny_bucket_(destiny_bucket)
+ , split_traits_(split_traits), released_(false)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE void release()
+ { released_ = true; }
+
+ ~incremental_rehash_rollback()
+ {
+ if(!released_){
+ //If an exception is thrown, just put all moved nodes back in the old bucket
+ //and move back the split mark.
+ destiny_bucket_.splice_after(destiny_bucket_.before_begin(), source_bucket_);
+ split_traits_.decrement();
+ }
+ }
+
+ private:
+ bucket_type &source_bucket_;
+ bucket_type &destiny_bucket_;
+ split_traits &split_traits_;
+ bool released_;
+};
+
+template<class NodeTraits>
+struct node_functions
+{
+ BOOST_INTRUSIVE_FORCEINLINE static void store_hash(typename NodeTraits::node_ptr p, std::size_t h, true_)
+ { return NodeTraits::set_hash(p, h); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static void store_hash(typename NodeTraits::node_ptr, std::size_t, false_)
+ {}
+};
+
+BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::false_)
+{ return hash_value % bucket_cnt; }
+
+BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket(std::size_t hash_value, std::size_t bucket_cnt, detail::true_)
+{ return hash_value & (bucket_cnt - 1); }
+
+template<bool Power2Buckets, bool Incremental>
+BOOST_INTRUSIVE_FORCEINLINE std::size_t hash_to_bucket_split(std::size_t hash_value, std::size_t bucket_cnt, std::size_t split)
+{
+ std::size_t bucket_number = detail::hash_to_bucket(hash_value, bucket_cnt, detail::bool_<Power2Buckets>());
+ if(Incremental)
+ bucket_number -= static_cast<std::size_t>(bucket_number >= split)*(bucket_cnt/2);
+ return bucket_number;
+}
+
+} //namespace detail {
+
+//!This metafunction will obtain the type of a bucket
+//!from the value_traits or hook option to be used with
+//!a hash container.
+template<class ValueTraitsOrHookOption>
+struct unordered_bucket
+ : public detail::unordered_bucket_impl
+ <typename ValueTraitsOrHookOption::
+ template pack<empty>::proto_value_traits
+ >
+{};
+
+//!This metafunction will obtain the type of a bucket pointer
+//!from the value_traits or hook option to be used with
+//!a hash container.
+template<class ValueTraitsOrHookOption>
+struct unordered_bucket_ptr
+ : public detail::unordered_bucket_ptr_impl
+ <typename ValueTraitsOrHookOption::
+ template pack<empty>::proto_value_traits
+ >
+{};
+
+//!This metafunction will obtain the type of the default bucket traits
+//!(when the user does not specify the bucket_traits<> option) from the
+//!value_traits or hook option to be used with
+//!a hash container.
+template<class ValueTraitsOrHookOption>
+struct unordered_default_bucket_traits
+{
+ typedef typename ValueTraitsOrHookOption::
+ template pack<empty>::proto_value_traits supposed_value_traits;
+ typedef typename detail::
+ get_slist_impl_from_supposed_value_traits
+ <supposed_value_traits>::type slist_impl;
+ typedef detail::bucket_traits_impl
+ <slist_impl> implementation_defined;
+ typedef implementation_defined type;
+};
+
+struct default_bucket_traits;
+
+//hashtable default hook traits
+struct default_hashtable_hook_applier
+{ template <class T> struct apply{ typedef typename T::default_hashtable_hook type; }; };
+
+template<>
+struct is_default_hook_tag<default_hashtable_hook_applier>
+{ static const bool value = true; };
+
+struct hashtable_defaults
+{
+ typedef default_hashtable_hook_applier proto_value_traits;
+ typedef std::size_t size_type;
+ typedef void key_of_value;
+ typedef void equal;
+ typedef void hash;
+ typedef default_bucket_traits bucket_traits;
+ static const bool constant_time_size = true;
+ static const bool power_2_buckets = false;
+ static const bool cache_begin = false;
+ static const bool compare_hash = false;
+ static const bool incremental = false;
+};
+
+template<class ValueTraits, bool IsConst>
+struct downcast_node_to_value_t
+ : public detail::node_to_value<ValueTraits, IsConst>
+{
+ typedef detail::node_to_value<ValueTraits, IsConst> base_t;
+ typedef typename base_t::result_type result_type;
+ typedef ValueTraits value_traits;
+ typedef typename detail::get_slist_impl
+ <typename detail::reduced_slist_node_traits
+ <typename value_traits::node_traits>::type
+ >::type slist_impl;
+ typedef typename detail::add_const_if_c
+ <typename slist_impl::node, IsConst>::type & first_argument_type;
+ typedef typename detail::add_const_if_c
+ < typename ValueTraits::node_traits::node
+ , IsConst>::type & intermediate_argument_type;
+ typedef typename pointer_traits
+ <typename ValueTraits::pointer>::
+ template rebind_pointer
+ <const ValueTraits>::type const_value_traits_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE downcast_node_to_value_t(const const_value_traits_ptr &ptr)
+ : base_t(ptr)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE result_type operator()(first_argument_type arg) const
+ { return this->base_t::operator()(static_cast<intermediate_argument_type>(arg)); }
+};
+
+template<class F, class SlistNodePtr, class NodePtr>
+struct node_cast_adaptor
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public detail::ebo_functor_holder<F>
+{
+ typedef detail::ebo_functor_holder<F> base_t;
+
+ typedef typename pointer_traits<SlistNodePtr>::element_type slist_node;
+ typedef typename pointer_traits<NodePtr>::element_type node;
+
+ template<class ConvertibleToF, class RealValuTraits>
+ BOOST_INTRUSIVE_FORCEINLINE node_cast_adaptor(const ConvertibleToF &c2f, const RealValuTraits *traits)
+ : base_t(base_t(c2f, traits))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE typename base_t::node_ptr operator()(const slist_node &to_clone)
+ { return base_t::operator()(static_cast<const node &>(to_clone)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE void operator()(SlistNodePtr to_clone)
+ {
+ base_t::operator()(pointer_traits<NodePtr>::pointer_to(static_cast<node &>(*to_clone)));
+ }
+};
+
+//bucket_plus_vtraits stores ValueTraits + BucketTraits
+//this data is needed by iterators to obtain the
+//value from the iterator and detect the bucket
+template<class ValueTraits, class BucketTraits>
+struct bucket_plus_vtraits
+{
+ typedef BucketTraits bucket_traits;
+ typedef ValueTraits value_traits;
+
+ static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
+
+ typedef typename
+ detail::get_slist_impl_from_supposed_value_traits
+ <value_traits>::type slist_impl;
+ typedef typename value_traits::node_traits node_traits;
+ typedef unordered_group_adapter<node_traits> group_traits;
+ typedef typename slist_impl::iterator siterator;
+ typedef detail::bucket_impl<slist_impl> bucket_type;
+ typedef detail::group_functions<node_traits> group_functions_t;
+ typedef typename slist_impl::node_algorithms node_algorithms;
+ typedef typename slist_impl::node_ptr slist_node_ptr;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::node node;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::pointer pointer;
+ typedef typename value_traits::const_pointer const_pointer;
+ typedef typename pointer_traits<pointer>::reference reference;
+ typedef typename pointer_traits
+ <const_pointer>::reference const_reference;
+ typedef circular_slist_algorithms<group_traits> group_algorithms;
+ typedef typename pointer_traits
+ <typename value_traits::pointer>::
+ template rebind_pointer
+ <const value_traits>::type const_value_traits_ptr;
+ typedef typename pointer_traits
+ <typename value_traits::pointer>::
+ template rebind_pointer
+ <const bucket_plus_vtraits>::type const_bucket_value_traits_ptr;
+ typedef typename detail::unordered_bucket_ptr_impl
+ <value_traits>::type bucket_ptr;
+
+ template<class BucketTraitsType>
+ BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
+ : data(val_traits, ::boost::forward<BucketTraitsType>(b_traits))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits & operator =(const bucket_plus_vtraits &x)
+ { data.bucket_traits_ = x.data.bucket_traits_; return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_value_traits_ptr priv_value_traits_ptr() const
+ { return pointer_traits<const_value_traits_ptr>::pointer_to(this->priv_value_traits()); }
+
+ //bucket_value_traits
+ //
+ BOOST_INTRUSIVE_FORCEINLINE const bucket_plus_vtraits &get_bucket_value_traits() const
+ { return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_plus_vtraits &get_bucket_value_traits()
+ { return *this; }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_bucket_value_traits_ptr bucket_value_traits_ptr() const
+ { return pointer_traits<const_bucket_value_traits_ptr>::pointer_to(this->get_bucket_value_traits()); }
+
+ //value traits
+ //
+ BOOST_INTRUSIVE_FORCEINLINE const value_traits &priv_value_traits() const
+ { return this->data; }
+
+ BOOST_INTRUSIVE_FORCEINLINE value_traits &priv_value_traits()
+ { return this->data; }
+
+ //bucket_traits
+ //
+ BOOST_INTRUSIVE_FORCEINLINE const bucket_traits &priv_bucket_traits() const
+ { return this->data.bucket_traits_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_traits &priv_bucket_traits()
+ { return this->data.bucket_traits_; }
+
+ //bucket operations
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_bucket_pointer() const
+ { return this->priv_bucket_traits().bucket_begin(); }
+
+ std::size_t priv_bucket_count() const
+ { return this->priv_bucket_traits().bucket_count(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_invalid_bucket() const
+ {
+ const bucket_traits &rbt = this->priv_bucket_traits();
+ return rbt.bucket_begin() + rbt.bucket_count();
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE siterator priv_invalid_local_it() const
+ { return this->priv_bucket_traits().bucket_begin()->before_begin(); }
+
+ template<class NodeDisposer>
+ static std::size_t priv_erase_from_single_bucket(bucket_type &b, siterator sbefore_first, siterator slast, NodeDisposer node_disposer, detail::true_) //optimize multikey
+ {
+ std::size_t n = 0;
+ siterator const sfirst(++siterator(sbefore_first));
+ if(sfirst != slast){
+ node_ptr const nf = detail::dcast_bucket_ptr<node>(sfirst.pointed_node());
+ node_ptr const nl = detail::dcast_bucket_ptr<node>(slast.pointed_node());
+ node_ptr const ne = detail::dcast_bucket_ptr<node>(b.end().pointed_node());
+
+ if(group_functions_t::next_group_if_first_in_group(nf) != nf) {
+ // The node is at the beginning of a group.
+ if(nl != ne){
+ group_functions_t::split_group(nl);
+ }
+ }
+ else {
+ node_ptr const group1 = group_functions_t::split_group(nf);
+ if(nl != ne) {
+ node_ptr const group2 = group_functions_t::split_group(ne);
+ if(nf == group2) { //Both first and last in the same group
+ //so join group1 and group2
+ node_ptr const end1 = group_traits::get_next(group1);
+ node_ptr const end2 = group_traits::get_next(group2);
+ group_traits::set_next(group1, end2);
+ group_traits::set_next(group2, end1);
+ }
+ }
+ }
+
+ siterator it(++siterator(sbefore_first));
+ while(it != slast){
+ node_disposer((it++).pointed_node());
+ ++n;
+ }
+ b.erase_after(sbefore_first, slast);
+ }
+ return n;
+ }
+
+ template<class NodeDisposer>
+ static std::size_t priv_erase_from_single_bucket(bucket_type &b, siterator sbefore_first, siterator slast, NodeDisposer node_disposer, detail::false_) //optimize multikey
+ {
+ std::size_t n = 0;
+ siterator it(++siterator(sbefore_first));
+ while(it != slast){
+ node_disposer((it++).pointed_node());
+ ++n;
+ }
+ b.erase_after(sbefore_first, slast);
+ return n;
+ }
+
+ template<class NodeDisposer>
+ static void priv_erase_node(bucket_type &b, siterator i, NodeDisposer node_disposer, detail::true_) //optimize multikey
+ {
+ node_ptr const ne(detail::dcast_bucket_ptr<node>(b.end().pointed_node()));
+ node_ptr n(detail::dcast_bucket_ptr<node>(i.pointed_node()));
+ node_ptr pos = node_traits::get_next(group_traits::get_next(n));
+ node_ptr bn;
+ node_ptr nn(node_traits::get_next(n));
+
+ if(pos != n) {
+ //Node is the first of the group
+ bn = group_functions_t::get_prev_to_first_in_group(ne, n);
+
+ //Unlink the rest of the group if it's not the last node of its group
+ if(nn != ne && group_traits::get_next(nn) == n){
+ group_algorithms::unlink_after(nn);
+ }
+ }
+ else if(nn != ne && group_traits::get_next(nn) == n){
+ //Node is not the end of the group
+ bn = group_traits::get_next(n);
+ group_algorithms::unlink_after(nn);
+ }
+ else{
+ //Node is the end of the group
+ bn = group_traits::get_next(n);
+ node_ptr const x(group_algorithms::get_previous_node(n));
+ group_algorithms::unlink_after(x);
+ }
+ b.erase_after_and_dispose(bucket_type::s_iterator_to(*bn), node_disposer);
+ }
+
+ template<class NodeDisposer>
+ BOOST_INTRUSIVE_FORCEINLINE static void priv_erase_node(bucket_type &b, siterator i, NodeDisposer node_disposer, detail::false_) //optimize multikey
+ { b.erase_after_and_dispose(b.previous(i), node_disposer); }
+
+ template<class NodeDisposer, bool OptimizeMultikey>
+ std::size_t priv_erase_node_range( siterator const &before_first_it, std::size_t const first_bucket
+ , siterator const &last_it, std::size_t const last_bucket
+ , NodeDisposer node_disposer, detail::bool_<OptimizeMultikey> optimize_multikey_tag)
+ {
+ std::size_t num_erased(0);
+ siterator last_step_before_it;
+ if(first_bucket != last_bucket){
+ bucket_type *b = (&this->priv_bucket_pointer()[0]);
+ num_erased += this->priv_erase_from_single_bucket
+ (b[first_bucket], before_first_it, b[first_bucket].end(), node_disposer, optimize_multikey_tag);
+ for(std::size_t i = 0, n = (last_bucket - first_bucket - 1); i != n; ++i){
+ num_erased += this->priv_erase_whole_bucket(b[first_bucket+i+1], node_disposer);
+ }
+ last_step_before_it = b[last_bucket].before_begin();
+ }
+ else{
+ last_step_before_it = before_first_it;
+ }
+ num_erased += this->priv_erase_from_single_bucket
+ (this->priv_bucket_pointer()[last_bucket], last_step_before_it, last_it, node_disposer, optimize_multikey_tag);
+ return num_erased;
+ }
+
+ static siterator priv_get_last(bucket_type &b, detail::true_) //optimize multikey
+ {
+ //First find the last node of p's group.
+ //This requires checking the first node of the next group or
+ //the bucket node.
+ slist_node_ptr end_ptr(b.end().pointed_node());
+ node_ptr possible_end(node_traits::get_next( detail::dcast_bucket_ptr<node>(end_ptr)));
+ node_ptr last_node_group(possible_end);
+
+ while(end_ptr != possible_end){
+ last_node_group = group_traits::get_next(detail::dcast_bucket_ptr<node>(possible_end));
+ possible_end = node_traits::get_next(last_node_group);
+ }
+ return bucket_type::s_iterator_to(*last_node_group);
+ }
+
+ template<class NodeDisposer>
+ std::size_t priv_erase_whole_bucket(bucket_type &b, NodeDisposer node_disposer)
+ {
+ std::size_t num_erased = 0;
+ siterator b_begin(b.before_begin());
+ siterator nxt(b_begin);
+ ++nxt;
+ siterator const end_sit(b.end());
+ while(nxt != end_sit){
+ //No need to init group links as we'll delete all bucket nodes
+ nxt = bucket_type::s_erase_after_and_dispose(b_begin, node_disposer);
+ ++num_erased;
+ }
+ return num_erased;
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static siterator priv_get_last(bucket_type &b, detail::false_) //NOT optimize multikey
+ { return b.previous(b.end()); }
+
+ static siterator priv_get_previous(bucket_type &b, siterator i, detail::true_) //optimize multikey
+ {
+ node_ptr const elem(detail::dcast_bucket_ptr<node>(i.pointed_node()));
+ node_ptr const prev_in_group(group_traits::get_next(elem));
+ bool const first_in_group = node_traits::get_next(prev_in_group) != elem;
+ typename bucket_type::node &n = first_in_group
+ ? *group_functions_t::get_prev_to_first_in_group(b.end().pointed_node(), elem)
+ : *group_traits::get_next(elem)
+ ;
+ return bucket_type::s_iterator_to(n);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static siterator priv_get_previous(bucket_type &b, siterator i, detail::false_) //NOT optimize multikey
+ { return b.previous(i); }
+
+ std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::true_) //optimize multikey
+ {
+ const bucket_ptr f(this->priv_bucket_pointer()), l(f + this->priv_bucket_count() - 1);
+ slist_node_ptr bb = group_functions_t::get_bucket_before_begin
+ ( f->end().pointed_node()
+ , l->end().pointed_node()
+ , detail::dcast_bucket_ptr<node>(it.pointed_node()));
+ //Now get the bucket_impl from the iterator
+ const bucket_type &b = static_cast<const bucket_type&>
+ (bucket_type::slist_type::container_from_end_iterator(bucket_type::s_iterator_to(*bb)));
+ //Now just calculate the index b has in the bucket array
+ return static_cast<std::size_t>(&b - &*f);
+ }
+
+ std::size_t priv_get_bucket_num_no_hash_store(siterator it, detail::false_) //NO optimize multikey
+ {
+ bucket_ptr f(this->priv_bucket_pointer()), l(f + this->priv_bucket_count() - 1);
+ slist_node_ptr first_ptr(f->cend().pointed_node())
+ , last_ptr(l->cend().pointed_node());
+
+ //The end node is embedded in the singly linked list:
+ //iterate until we reach it.
+ while(!(first_ptr <= it.pointed_node() && it.pointed_node() <= last_ptr)){
+ ++it;
+ }
+ //Now get the bucket_impl from the iterator
+ const bucket_type &b = static_cast<const bucket_type&>
+ (bucket_type::container_from_end_iterator(it));
+
+ //Now just calculate the index b has in the bucket array
+ return static_cast<std::size_t>(&b - &*f);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE static std::size_t priv_stored_hash(slist_node_ptr n, detail::true_) //store_hash
+ { return node_traits::get_hash(detail::dcast_bucket_ptr<node>(n)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE static std::size_t priv_stored_hash(slist_node_ptr, detail::false_) //NO store_hash
+ { return std::size_t(-1); }
+
+ BOOST_INTRUSIVE_FORCEINLINE node &priv_value_to_node(reference v)
+ { return *this->priv_value_traits().to_node_ptr(v); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const node &priv_value_to_node(const_reference v) const
+ { return *this->priv_value_traits().to_node_ptr(v); }
+
+ BOOST_INTRUSIVE_FORCEINLINE reference priv_value_from_slist_node(slist_node_ptr n)
+ { return *this->priv_value_traits().to_value_ptr(detail::dcast_bucket_ptr<node>(n)); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_reference priv_value_from_slist_node(slist_node_ptr n) const
+ { return *this->priv_value_traits().to_value_ptr(detail::dcast_bucket_ptr<node>(n)); }
+
+ void priv_clear_buckets(const bucket_ptr buckets_ptr, const std::size_t bucket_cnt)
+ {
+ bucket_ptr buckets_it = buckets_ptr;
+ for(std::size_t bucket_i = 0; bucket_i != bucket_cnt; ++buckets_it, ++bucket_i){
+ if(safemode_or_autounlink){
+ buckets_it->clear_and_dispose(detail::init_disposer<node_algorithms>());
+ }
+ else{
+ buckets_it->clear();
+ }
+ }
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_stored_or_compute_hash(const value_type &v, detail::true_) const //For store_hash == true
+ { return node_traits::get_hash(this->priv_value_traits().to_node_ptr(v)); }
+
+ typedef hashtable_iterator<bucket_plus_vtraits, false> iterator;
+ typedef hashtable_iterator<bucket_plus_vtraits, true> const_iterator;
+
+ BOOST_INTRUSIVE_FORCEINLINE iterator end()
+ { return iterator(this->priv_invalid_local_it(), 0); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator end() const
+ { return this->cend(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator cend() const
+ { return const_iterator(this->priv_invalid_local_it(), 0); }
+
+ //Public functions:
+ struct data_type : public ValueTraits
+ {
+ template<class BucketTraitsType>
+ BOOST_INTRUSIVE_FORCEINLINE data_type(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits)
+ : ValueTraits(val_traits), bucket_traits_(::boost::forward<BucketTraitsType>(b_traits))
+ {}
+
+ bucket_traits bucket_traits_;
+ } data;
+};
+
+template<class Hash, class>
+struct get_hash
+{
+ typedef Hash type;
+};
+
+template<class T>
+struct get_hash<void, T>
+{
+ typedef ::boost::hash<T> type;
+};
+
+template<class EqualTo, class>
+struct get_equal_to
+{
+ typedef EqualTo type;
+};
+
+template<class T>
+struct get_equal_to<void, T>
+{
+ typedef std::equal_to<T> type;
+};
+
+template<class KeyOfValue, class T>
+struct get_hash_key_of_value
+{
+ typedef KeyOfValue type;
+};
+
+template<class T>
+struct get_hash_key_of_value<void, T>
+{
+ typedef ::boost::intrusive::detail::identity<T> type;
+};
+
+template<class T, class VoidOrKeyOfValue>
+struct hash_key_types_base
+{
+ typedef typename get_hash_key_of_value
+ < VoidOrKeyOfValue, T>::type key_of_value;
+ typedef typename key_of_value::type key_type;
+};
+
+template<class T, class VoidOrKeyOfValue, class VoidOrKeyHash>
+struct hash_key_hash
+ : get_hash
+ < VoidOrKeyHash
+ , typename hash_key_types_base<T, VoidOrKeyOfValue>::key_type
+ >
+{};
+
+template<class T, class VoidOrKeyOfValue, class VoidOrKeyEqual>
+struct hash_key_equal
+ : get_equal_to
+ < VoidOrKeyEqual
+ , typename hash_key_types_base<T, VoidOrKeyOfValue>::key_type
+ >
+
+{};
+
+//bucket_hash_t
+//Stores bucket_plus_vtraits plust the hash function
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class BucketTraits>
+struct bucket_hash_t
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public detail::ebo_functor_holder
+ <typename hash_key_hash < typename bucket_plus_vtraits<ValueTraits,BucketTraits>::value_traits::value_type
+ , VoidOrKeyOfValue
+ , VoidOrKeyHash
+ >::type
+ >
+ , bucket_plus_vtraits<ValueTraits, BucketTraits> //4
+{
+ typedef typename bucket_plus_vtraits<ValueTraits,BucketTraits>::value_traits value_traits;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::node_traits node_traits;
+ typedef hash_key_hash
+ < value_type, VoidOrKeyOfValue, VoidOrKeyHash> hash_key_hash_t;
+ typedef typename hash_key_hash_t::type hasher;
+ typedef typename hash_key_types_base<value_type, VoidOrKeyOfValue>::key_of_value key_of_value;
+
+ typedef BucketTraits bucket_traits;
+ typedef bucket_plus_vtraits<ValueTraits, BucketTraits> bucket_plus_vtraits_t;
+ typedef detail::ebo_functor_holder<hasher> base_t;
+
+ template<class BucketTraitsType>
+ BOOST_INTRUSIVE_FORCEINLINE bucket_hash_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h)
+ : detail::ebo_functor_holder<hasher>(h), bucket_plus_vtraits_t(val_traits, ::boost::forward<BucketTraitsType>(b_traits))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE const hasher &priv_hasher() const
+ { return this->base_t::get(); }
+
+ hasher &priv_hasher()
+ { return this->base_t::get(); }
+
+ using bucket_plus_vtraits_t::priv_stored_or_compute_hash; //For store_hash == true
+
+ BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_stored_or_compute_hash(const value_type &v, detail::false_) const //For store_hash == false
+ { return this->priv_hasher()(key_of_value()(v)); }
+};
+
+template<class ValueTraits, class BucketTraits, class VoidOrKeyOfValue, class VoidOrKeyEqual>
+struct hashtable_equal_holder
+{
+ typedef detail::ebo_functor_holder
+ < typename hash_key_equal < typename bucket_plus_vtraits<ValueTraits, BucketTraits>::value_traits::value_type
+ , VoidOrKeyOfValue
+ , VoidOrKeyEqual
+ >::type
+ > type;
+};
+
+
+//bucket_hash_equal_t
+//Stores bucket_hash_t and the equality function when the first
+//non-empty bucket shall not be cached.
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, bool>
+struct bucket_hash_equal_t
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> //3
+ , public hashtable_equal_holder<ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type //equal
+{
+ typedef typename hashtable_equal_holder
+ <ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type equal_holder_t;
+ typedef bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> bucket_hash_type;
+ typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
+ typedef ValueTraits value_traits;
+ typedef typename equal_holder_t::functor_type key_equal;
+ typedef typename bucket_hash_type::hasher hasher;
+ typedef BucketTraits bucket_traits;
+ typedef typename bucket_plus_vtraits_t::slist_impl slist_impl;
+ typedef typename slist_impl::iterator siterator;
+ typedef detail::bucket_impl<slist_impl> bucket_type;
+ typedef typename detail::unordered_bucket_ptr_impl<value_traits>::type bucket_ptr;
+
+ template<class BucketTraitsType>
+ bucket_hash_equal_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h, const key_equal &e)
+ : bucket_hash_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h)
+ , equal_holder_t(e)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr priv_get_cache()
+ { return this->bucket_hash_type::priv_bucket_pointer(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
+ { return 0u; }
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_initialize_cache()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_swap_cache(bucket_hash_equal_t &)
+ {}
+
+ siterator priv_begin() const
+ {
+ std::size_t n = 0;
+ std::size_t bucket_cnt = this->bucket_hash_type::priv_bucket_count();
+ for (n = 0; n < bucket_cnt; ++n){
+ bucket_type &b = this->bucket_hash_type::priv_bucket_pointer()[n];
+ if(!b.empty()){
+ return b.begin();
+ }
+ }
+ return this->bucket_hash_type::priv_invalid_local_it();
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_insertion_update_cache(std::size_t)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_erasure_update_cache_range(std::size_t, std::size_t)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_erasure_update_cache()
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE const key_equal &priv_equal() const
+ { return this->equal_holder_t::get(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE key_equal &priv_equal()
+ { return this->equal_holder_t::get(); }
+};
+
+//bucket_hash_equal_t
+//Stores bucket_hash_t and the equality function when the first
+//non-empty bucket shall be cached.
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits> //cache_begin == true version
+struct bucket_hash_equal_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, true>
+ //Use public inheritance to avoid MSVC bugs with closures
+ : bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> //2
+ , hashtable_equal_holder<ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type
+{
+ typedef typename hashtable_equal_holder
+ <ValueTraits, BucketTraits, VoidOrKeyOfValue, VoidOrKeyEqual>::type equal_holder_t;
+
+ typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
+ typedef ValueTraits value_traits;
+ typedef typename equal_holder_t::functor_type key_equal;
+ typedef bucket_hash_t<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, BucketTraits> bucket_hash_type;
+ typedef typename bucket_hash_type::hasher hasher;
+ typedef BucketTraits bucket_traits;
+ typedef typename bucket_plus_vtraits_t::slist_impl::iterator siterator;
+
+ template<class BucketTraitsType>
+ bucket_hash_equal_t(const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits, const hasher & h, const key_equal &e)
+ : bucket_hash_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h)
+ , equal_holder_t(e)
+ {}
+
+ typedef typename detail::unordered_bucket_ptr_impl
+ <typename bucket_hash_type::value_traits>::type bucket_ptr;
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr &priv_get_cache()
+ { return cached_begin_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE const bucket_ptr &priv_get_cache() const
+ { return cached_begin_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_set_cache(const bucket_ptr &p)
+ { cached_begin_ = p; }
+
+ BOOST_INTRUSIVE_FORCEINLINE std::size_t priv_get_cache_bucket_num()
+ { return this->cached_begin_ - this->bucket_hash_type::priv_bucket_pointer(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_initialize_cache()
+ { this->cached_begin_ = this->bucket_hash_type::priv_invalid_bucket(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE void priv_swap_cache(bucket_hash_equal_t &other)
+ {
+ ::boost::adl_move_swap(this->cached_begin_, other.cached_begin_);
+ }
+
+ siterator priv_begin() const
+ {
+ if(this->cached_begin_ == this->bucket_hash_type::priv_invalid_bucket()){
+ return this->bucket_hash_type::priv_invalid_local_it();
+ }
+ else{
+ return this->cached_begin_->begin();
+ }
+ }
+
+ void priv_insertion_update_cache(std::size_t insertion_bucket)
+ {
+ bucket_ptr p = this->bucket_hash_type::priv_bucket_pointer() + insertion_bucket;
+ if(p < this->cached_begin_){
+ this->cached_begin_ = p;
+ }
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE const key_equal &priv_equal() const
+ { return this->equal_holder_t::get(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE key_equal &priv_equal()
+ { return this->equal_holder_t::get(); }
+
+ void priv_erasure_update_cache_range(std::size_t first_bucket_num, std::size_t last_bucket_num)
+ {
+ //If the last bucket is the end, the cache must be updated
+ //to the last position if all
+ if(this->priv_get_cache_bucket_num() == first_bucket_num &&
+ this->bucket_hash_type::priv_bucket_pointer()[first_bucket_num].empty() ){
+ this->priv_set_cache(this->bucket_hash_type::priv_bucket_pointer() + last_bucket_num);
+ this->priv_erasure_update_cache();
+ }
+ }
+
+ void priv_erasure_update_cache()
+ {
+ if(this->cached_begin_ != this->bucket_hash_type::priv_invalid_bucket()){
+ std::size_t current_n = this->priv_get_cache() - this->bucket_hash_type::priv_bucket_pointer();
+ for( const std::size_t num_buckets = this->bucket_hash_type::priv_bucket_count()
+ ; current_n < num_buckets
+ ; ++current_n, ++this->priv_get_cache()){
+ if(!this->priv_get_cache()->empty()){
+ return;
+ }
+ }
+ this->priv_initialize_cache();
+ }
+ }
+
+ bucket_ptr cached_begin_;
+};
+
+//This wrapper around size_traits is used
+//to maintain minimal container size with compilers like MSVC
+//that have problems with EBO and multiple empty base classes
+template<class DeriveFrom, class SizeType, bool>
+struct hashtable_size_traits_wrapper
+ : public DeriveFrom
+{
+ template<class Base, class Arg0, class Arg1, class Arg2>
+ hashtable_size_traits_wrapper( BOOST_FWD_REF(Base) base, BOOST_FWD_REF(Arg0) arg0
+ , BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
+ : DeriveFrom(::boost::forward<Base>(base)
+ , ::boost::forward<Arg0>(arg0)
+ , ::boost::forward<Arg1>(arg1)
+ , ::boost::forward<Arg2>(arg2))
+ {}
+ typedef detail::size_holder < true, SizeType> size_traits;//size_traits
+
+ size_traits size_traits_;
+
+ typedef const size_traits & size_traits_const_t;
+ typedef size_traits & size_traits_t;
+
+ BOOST_INTRUSIVE_FORCEINLINE size_traits_const_t priv_size_traits() const
+ { return size_traits_; }
+
+ BOOST_INTRUSIVE_FORCEINLINE size_traits_t priv_size_traits()
+ { return size_traits_; }
+};
+
+template<class DeriveFrom, class SizeType>
+struct hashtable_size_traits_wrapper<DeriveFrom, SizeType, false>
+ : public DeriveFrom
+{
+ template<class Base, class Arg0, class Arg1, class Arg2>
+ hashtable_size_traits_wrapper( BOOST_FWD_REF(Base) base, BOOST_FWD_REF(Arg0) arg0
+ , BOOST_FWD_REF(Arg1) arg1, BOOST_FWD_REF(Arg2) arg2)
+ : DeriveFrom(::boost::forward<Base>(base)
+ , ::boost::forward<Arg0>(arg0)
+ , ::boost::forward<Arg1>(arg1)
+ , ::boost::forward<Arg2>(arg2))
+ {}
+
+ typedef detail::size_holder< false, SizeType> size_traits;
+
+ typedef size_traits size_traits_const_t;
+ typedef size_traits size_traits_t;
+
+ BOOST_INTRUSIVE_FORCEINLINE size_traits priv_size_traits() const
+ { return size_traits(); }
+};
+
+//hashdata_internal
+//Stores bucket_hash_equal_t and split_traits
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, class SizeType, std::size_t BoolFlags>
+struct hashdata_internal
+ : public hashtable_size_traits_wrapper
+ < bucket_hash_equal_t
+ < ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
+ , BucketTraits
+ , 0 != (BoolFlags & hash_bool_flags::cache_begin_pos)
+ > //2
+ , SizeType
+ , (BoolFlags & hash_bool_flags::incremental_pos) != 0
+ >
+{
+ typedef hashtable_size_traits_wrapper
+ < bucket_hash_equal_t
+ < ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
+ , BucketTraits
+ , 0 != (BoolFlags & hash_bool_flags::cache_begin_pos)
+ > //2
+ , SizeType
+ , (BoolFlags & hash_bool_flags::incremental_pos) != 0
+ > internal_type;
+ typedef typename internal_type::key_equal key_equal;
+ typedef typename internal_type::hasher hasher;
+ typedef bucket_plus_vtraits<ValueTraits,BucketTraits> bucket_plus_vtraits_t;
+ typedef SizeType size_type;
+ typedef typename internal_type::size_traits split_traits;
+ typedef typename bucket_plus_vtraits_t::bucket_ptr bucket_ptr;
+ typedef typename bucket_plus_vtraits_t::const_value_traits_ptr const_value_traits_ptr;
+ typedef typename bucket_plus_vtraits_t::siterator siterator;
+ typedef typename bucket_plus_vtraits_t::bucket_traits bucket_traits;
+ typedef typename bucket_plus_vtraits_t::value_traits value_traits;
+ typedef typename bucket_plus_vtraits_t::bucket_type bucket_type;
+ typedef typename value_traits::value_type value_type;
+ typedef typename value_traits::pointer pointer;
+ typedef typename value_traits::const_pointer const_pointer;
+ typedef typename pointer_traits<pointer>::reference reference;
+ typedef typename pointer_traits
+ <const_pointer>::reference const_reference;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node node;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+ typedef detail::node_functions<node_traits> node_functions_t;
+ typedef typename detail::get_slist_impl
+ <typename detail::reduced_slist_node_traits
+ <typename value_traits::node_traits>::type
+ >::type slist_impl;
+ typedef typename slist_impl::node_algorithms node_algorithms;
+ typedef typename slist_impl::node_ptr slist_node_ptr;
+
+ typedef hash_key_types_base
+ < typename ValueTraits::value_type
+ , VoidOrKeyOfValue
+ > hash_types_base;
+ typedef typename hash_types_base::key_of_value key_of_value;
+
+ static const bool store_hash = detail::store_hash_is_true<node_traits>::value;
+ static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
+ static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
+
+ typedef detail::bool_<store_hash> store_hash_t;
+
+ typedef detail::transform_iterator
+ < typename slist_impl::iterator
+ , downcast_node_to_value_t
+ < value_traits
+ , false> > local_iterator;
+
+ typedef detail::transform_iterator
+ < typename slist_impl::iterator
+ , downcast_node_to_value_t
+ < value_traits
+ , true> > const_local_iterator;
+ //
+
+ template<class BucketTraitsType>
+ hashdata_internal( const ValueTraits &val_traits, BOOST_FWD_REF(BucketTraitsType) b_traits
+ , const hasher & h, const key_equal &e)
+ : internal_type(val_traits, ::boost::forward<BucketTraitsType>(b_traits), h, e)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE typename internal_type::size_traits_t priv_split_traits()
+ { return this->priv_size_traits(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE typename internal_type::size_traits_const_t priv_split_traits() const
+ { return this->priv_size_traits(); }
+
+ ~hashdata_internal()
+ { this->priv_clear_buckets(); }
+
+ void priv_clear_buckets()
+ {
+ this->internal_type::priv_clear_buckets
+ ( this->priv_get_cache()
+ , this->internal_type::priv_bucket_count()
+ - (this->priv_get_cache()
+ - this->internal_type::priv_bucket_pointer()));
+ }
+
+ void priv_clear_buckets_and_cache()
+ {
+ this->priv_clear_buckets();
+ this->priv_initialize_cache();
+ }
+
+ void priv_initialize_buckets_and_cache()
+ {
+ this->internal_type::priv_clear_buckets
+ ( this->internal_type::priv_bucket_pointer()
+ , this->internal_type::priv_bucket_count());
+ this->priv_initialize_cache();
+ }
+
+ typedef hashtable_iterator<bucket_plus_vtraits_t, false> iterator;
+ typedef hashtable_iterator<bucket_plus_vtraits_t, true> const_iterator;
+
+ static std::size_t priv_stored_hash(slist_node_ptr n, detail::true_ true_value)
+ { return bucket_plus_vtraits<ValueTraits, BucketTraits>::priv_stored_hash(n, true_value); }
+
+ static std::size_t priv_stored_hash(slist_node_ptr n, detail::false_ false_value)
+ { return bucket_plus_vtraits<ValueTraits, BucketTraits>::priv_stored_hash(n, false_value); }
+
+ //public functions
+ BOOST_INTRUSIVE_FORCEINLINE SizeType split_count() const
+ {
+ return this->priv_split_traits().get_size();
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE iterator iterator_to(reference value)
+ {
+ return iterator(bucket_type::s_iterator_to
+ (this->priv_value_to_node(value)), &this->get_bucket_value_traits());
+ }
+
+ const_iterator iterator_to(const_reference value) const
+ {
+ siterator const sit = bucket_type::s_iterator_to
+ ( *pointer_traits<node_ptr>::const_cast_from
+ (pointer_traits<const_node_ptr>::pointer_to(this->priv_value_to_node(value)))
+ );
+ return const_iterator(sit, &this->get_bucket_value_traits());
+ }
+
+ static local_iterator s_local_iterator_to(reference value)
+ {
+ BOOST_STATIC_ASSERT((!stateful_value_traits));
+ siterator sit = bucket_type::s_iterator_to(*value_traits::to_node_ptr(value));
+ return local_iterator(sit, const_value_traits_ptr());
+ }
+
+ static const_local_iterator s_local_iterator_to(const_reference value)
+ {
+ BOOST_STATIC_ASSERT((!stateful_value_traits));
+ siterator const sit = bucket_type::s_iterator_to
+ ( *pointer_traits<node_ptr>::const_cast_from
+ (value_traits::to_node_ptr(value))
+ );
+ return const_local_iterator(sit, const_value_traits_ptr());
+ }
+
+ local_iterator local_iterator_to(reference value)
+ {
+ siterator sit = bucket_type::s_iterator_to(this->priv_value_to_node(value));
+ return local_iterator(sit, this->priv_value_traits_ptr());
+ }
+
+ const_local_iterator local_iterator_to(const_reference value) const
+ {
+ siterator sit = bucket_type::s_iterator_to
+ ( *pointer_traits<node_ptr>::const_cast_from
+ (pointer_traits<const_node_ptr>::pointer_to(this->priv_value_to_node(value)))
+ );
+ return const_local_iterator(sit, this->priv_value_traits_ptr());
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket_count() const
+ {
+ const std::size_t bc = this->priv_bucket_count();
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(sizeof(size_type) >= sizeof(std::size_t) || bc <= size_type(-1));
+ return static_cast<size_type>(bc);
+ }
+
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket_size(size_type n) const
+ { return this->priv_bucket_pointer()[n].size(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE bucket_ptr bucket_pointer() const
+ { return this->priv_bucket_pointer(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE local_iterator begin(size_type n)
+ { return local_iterator(this->priv_bucket_pointer()[n].begin(), this->priv_value_traits_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_local_iterator begin(size_type n) const
+ { return this->cbegin(n); }
+
+ static BOOST_INTRUSIVE_FORCEINLINE size_type suggested_upper_bucket_count(size_type n)
+ {
+ return prime_list_holder<0>::suggested_upper_bucket_count(n);
+ }
+
+ static BOOST_INTRUSIVE_FORCEINLINE size_type suggested_lower_bucket_count(size_type n)
+ {
+ return prime_list_holder<0>::suggested_lower_bucket_count(n);
+ }
+
+ const_local_iterator cbegin(size_type n) const
+ {
+ return const_local_iterator
+ ( pointer_traits<bucket_ptr>::const_cast_from(this->priv_bucket_pointer())[n].begin()
+ , this->priv_value_traits_ptr());
+ }
+
+ using internal_type::end;
+ using internal_type::cend;
+
+ local_iterator end(size_type n)
+ { return local_iterator(this->priv_bucket_pointer()[n].end(), this->priv_value_traits_ptr()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_local_iterator end(size_type n) const
+ { return this->cend(n); }
+
+ const_local_iterator cend(size_type n) const
+ {
+ return const_local_iterator
+ ( pointer_traits<bucket_ptr>::const_cast_from(this->priv_bucket_pointer())[n].end()
+ , this->priv_value_traits_ptr());
+ }
+
+ //Public functions for hashtable_impl
+
+ BOOST_INTRUSIVE_FORCEINLINE iterator begin()
+ { return iterator(this->priv_begin(), &this->get_bucket_value_traits()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator begin() const
+ { return this->cbegin(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator cbegin() const
+ { return const_iterator(this->priv_begin(), &this->get_bucket_value_traits()); }
+
+ BOOST_INTRUSIVE_FORCEINLINE hasher hash_function() const
+ { return this->priv_hasher(); }
+
+ BOOST_INTRUSIVE_FORCEINLINE key_equal key_eq() const
+ { return this->priv_equal(); }
+};
+
+/// @endcond
+
+//! The class template hashtable is an intrusive hash table container, that
+//! is used to construct intrusive unordered_set and unordered_multiset containers. The
+//! no-throw guarantee holds only, if the VoidOrKeyEqual object and Hasher don't throw.
+//!
+//! hashtable is a semi-intrusive container: each object to be stored in the
+//! container must contain a proper hook, but the container also needs
+//! additional auxiliary memory to work: hashtable needs a pointer to an array
+//! of type `bucket_type` to be passed in the constructor. This bucket array must
+//! have at least the same lifetime as the container. This makes the use of
+//! hashtable more complicated than purely intrusive containers.
+//! `bucket_type` is default-constructible, copyable and assignable
+//!
+//! The template parameter \c T is the type to be managed by the container.
+//! The user can specify additional options and if no options are provided
+//! default options are used.
+//!
+//! The container supports the following options:
+//! \c base_hook<>/member_hook<>/value_traits<>,
+//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
+//! \c bucket_traits<>, power_2_buckets<>, cache_begin<> and incremental<>.
+//!
+//! hashtable only provides forward iterators but it provides 4 iterator types:
+//! iterator and const_iterator to navigate through the whole container and
+//! local_iterator and const_local_iterator to navigate through the values
+//! stored in a single bucket. Local iterators are faster and smaller.
+//!
+//! It's not recommended to use non constant-time size hashtables because several
+//! key functions, like "empty()", become non-constant time functions. Non
+//! constant_time size hashtables are mainly provided to support auto-unlink hooks.
+//!
+//! hashtables, does not make automatic rehashings nor
+//! offers functions related to a load factor. Rehashing can be explicitly requested
+//! and the user must provide a new bucket array that will be used from that moment.
+//!
+//! Since no automatic rehashing is done, iterators are never invalidated when
+//! inserting or erasing elements. Iterators are only invalidated when rehashing.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class BucketTraits, class SizeType, std::size_t BoolFlags>
+#endif
+class hashtable_impl
+ : private hashtable_size_traits_wrapper
+ < hashdata_internal
+ < ValueTraits
+ , VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
+ , BucketTraits, SizeType
+ , BoolFlags & (hash_bool_flags::incremental_pos | hash_bool_flags::cache_begin_pos) //1
+ >
+ , SizeType
+ , (BoolFlags & hash_bool_flags::constant_time_size_pos) != 0
+ >
+{
+ typedef hashtable_size_traits_wrapper
+ < hashdata_internal
+ < ValueTraits
+ , VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual
+ , BucketTraits, SizeType
+ , BoolFlags & (hash_bool_flags::incremental_pos | hash_bool_flags::cache_begin_pos) //1
+ >
+ , SizeType
+ , (BoolFlags & hash_bool_flags::constant_time_size_pos) != 0
+ > internal_type;
+ typedef typename internal_type::size_traits size_traits;
+ typedef hash_key_types_base
+ < typename ValueTraits::value_type
+ , VoidOrKeyOfValue
+ > hash_types_base;
+ public:
+ typedef ValueTraits value_traits;
+
+ /// @cond
+ typedef BucketTraits bucket_traits;
+
+ typedef typename internal_type::slist_impl slist_impl;
+ typedef bucket_plus_vtraits<ValueTraits, BucketTraits> bucket_plus_vtraits_t;
+ typedef typename bucket_plus_vtraits_t::const_value_traits_ptr const_value_traits_ptr;
+
+ using internal_type::begin;
+ using internal_type::cbegin;
+ using internal_type::end;
+ using internal_type::cend;
+ using internal_type::hash_function;
+ using internal_type::key_eq;
+ using internal_type::bucket_size;
+ using internal_type::bucket_count;
+ using internal_type::local_iterator_to;
+ using internal_type::s_local_iterator_to;
+ using internal_type::iterator_to;
+ using internal_type::bucket_pointer;
+ using internal_type::suggested_upper_bucket_count;
+ using internal_type::suggested_lower_bucket_count;
+ using internal_type::split_count;
+
+ /// @endcond
+
+ typedef typename value_traits::pointer pointer;
+ typedef typename value_traits::const_pointer const_pointer;
+ typedef typename value_traits::value_type value_type;
+ typedef typename hash_types_base::key_type key_type;
+ typedef typename hash_types_base::key_of_value key_of_value;
+ typedef typename pointer_traits<pointer>::reference reference;
+ typedef typename pointer_traits<const_pointer>::reference const_reference;
+ typedef typename pointer_traits<pointer>::difference_type difference_type;
+ typedef SizeType size_type;
+ typedef typename internal_type::key_equal key_equal;
+ typedef typename internal_type::hasher hasher;
+ typedef detail::bucket_impl<slist_impl> bucket_type;
+ typedef typename internal_type::bucket_ptr bucket_ptr;
+ typedef typename slist_impl::iterator siterator;
+ typedef typename slist_impl::const_iterator const_siterator;
+ typedef typename internal_type::iterator iterator;
+ typedef typename internal_type::const_iterator const_iterator;
+ typedef typename internal_type::local_iterator local_iterator;
+ typedef typename internal_type::const_local_iterator const_local_iterator;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node node;
+ typedef typename pointer_traits
+ <pointer>::template rebind_pointer
+ < node >::type node_ptr;
+ typedef typename pointer_traits
+ <pointer>::template rebind_pointer
+ < const node >::type const_node_ptr;
+ typedef typename pointer_traits
+ <node_ptr>::reference node_reference;
+ typedef typename pointer_traits
+ <const_node_ptr>::reference const_node_reference;
+ typedef typename slist_impl::node_algorithms node_algorithms;
+
+ static const bool stateful_value_traits = internal_type::stateful_value_traits;
+ static const bool store_hash = internal_type::store_hash;
+
+ static const bool unique_keys = 0 != (BoolFlags & hash_bool_flags::unique_keys_pos);
+ static const bool constant_time_size = 0 != (BoolFlags & hash_bool_flags::constant_time_size_pos);
+ static const bool cache_begin = 0 != (BoolFlags & hash_bool_flags::cache_begin_pos);
+ static const bool compare_hash = 0 != (BoolFlags & hash_bool_flags::compare_hash_pos);
+ static const bool incremental = 0 != (BoolFlags & hash_bool_flags::incremental_pos);
+ static const bool power_2_buckets = incremental || (0 != (BoolFlags & hash_bool_flags::power_2_buckets_pos));
+
+ static const bool optimize_multikey
+ = detail::optimize_multikey_is_true<node_traits>::value && !unique_keys;
+
+ /// @cond
+ static const bool is_multikey = !unique_keys;
+ private:
+
+ //Configuration error: compare_hash<> can't be specified without store_hash<>
+ //See documentation for more explanations
+ BOOST_STATIC_ASSERT((!compare_hash || store_hash));
+
+ typedef typename slist_impl::node_ptr slist_node_ptr;
+ typedef typename pointer_traits
+ <slist_node_ptr>::template rebind_pointer
+ < void >::type void_pointer;
+ //We'll define group traits, but these won't be instantiated if
+ //optimize_multikey is not true
+ typedef unordered_group_adapter<node_traits> group_traits;
+ typedef circular_slist_algorithms<group_traits> group_algorithms;
+ typedef typename internal_type::store_hash_t store_hash_t;
+ typedef detail::bool_<optimize_multikey> optimize_multikey_t;
+ typedef detail::bool_<cache_begin> cache_begin_t;
+ typedef detail::bool_<power_2_buckets> power_2_buckets_t;
+ typedef typename internal_type::split_traits split_traits;
+ typedef detail::group_functions<node_traits> group_functions_t;
+ typedef detail::node_functions<node_traits> node_functions_t;
+
+ private:
+ //noncopyable, movable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(hashtable_impl)
+
+ static const bool safemode_or_autounlink = internal_type::safemode_or_autounlink;
+
+ //Constant-time size is incompatible with auto-unlink hooks!
+ BOOST_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
+ //Cache begin is incompatible with auto-unlink hooks!
+ BOOST_STATIC_ASSERT(!(cache_begin && ((int)value_traits::link_mode == (int)auto_unlink)));
+
+ template<class Disposer>
+ struct typeof_node_disposer
+ {
+ typedef node_cast_adaptor
+ < detail::node_disposer< Disposer, value_traits, CircularSListAlgorithms>
+ , slist_node_ptr, node_ptr > type;
+ };
+
+ template<class Disposer>
+ typename typeof_node_disposer<Disposer>::type
+ make_node_disposer(const Disposer &disposer) const
+ {
+ typedef typename typeof_node_disposer<Disposer>::type return_t;
+ return return_t(disposer, &this->priv_value_traits());
+ }
+
+ /// @endcond
+
+ public:
+ typedef detail::insert_commit_data_impl insert_commit_data;
+
+
+ public:
+
+ //! <b>Requires</b>: buckets must not be being used by any other resource.
+ //!
+ //! <b>Effects</b>: Constructs an empty unordered_set, storing a reference
+ //! to the bucket array and copies of the key_hasher and equal_func functors.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the copy constructor or invocation of hash_func or equal_func throws.
+ //!
+ //! <b>Notes</b>: buckets array must be disposed only after
+ //! *this is disposed.
+ explicit hashtable_impl ( const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : internal_type(v_traits, b_traits, hash_func, equal_func)
+ {
+ this->priv_initialize_buckets_and_cache();
+ this->priv_size_traits().set_size(size_type(0));
+ size_type bucket_sz = this->bucket_count();
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_sz != 0);
+ //Check power of two bucket array if the option is activated
+ BOOST_INTRUSIVE_INVARIANT_ASSERT
+ (!power_2_buckets || (0 == (bucket_sz & (bucket_sz-1))));
+ this->priv_split_traits().set_size(bucket_sz>>1);
+ }
+
+ //! <b>Requires</b>: buckets must not be being used by any other resource
+ //! and dereferencing iterator must yield an lvalue of type value_type.
+ //!
+ //! <b>Effects</b>: Constructs an empty container and inserts elements from
+ //! [b, e).
+ //!
+ //! <b>Complexity</b>: If N is distance(b, e): Average case is O(N)
+ //! (with a good hash function and with buckets_len >= N),worst case O(N^2).
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the copy constructor or invocation of hasher or key_equal throws.
+ //!
+ //! <b>Notes</b>: buckets array must be disposed only after
+ //! *this is disposed.
+ template<class Iterator>
+ hashtable_impl ( bool unique, Iterator b, Iterator e
+ , const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : internal_type(v_traits, b_traits, hash_func, equal_func)
+ {
+ this->priv_initialize_buckets_and_cache();
+ this->priv_size_traits().set_size(size_type(0));
+ size_type bucket_sz = this->bucket_count();
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(bucket_sz != 0);
+ //Check power of two bucket array if the option is activated
+ BOOST_INTRUSIVE_INVARIANT_ASSERT
+ (!power_2_buckets || (0 == (bucket_sz & (bucket_sz-1))));
+ this->priv_split_traits().set_size(bucket_sz>>1);
+ //Now insert
+ if(unique)
+ this->insert_unique(b, e);
+ else
+ this->insert_equal(b, e);
+ }
+
+ //! <b>Effects</b>: Constructs a container moving resources from another container.
+ //! Internal value traits, bucket traits, hasher and comparison are move constructed and
+ //! nodes belonging to x are linked to *this.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node's
+ //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the move constructor of value traits, bucket traits, hasher or comparison throws.
+ hashtable_impl(BOOST_RV_REF(hashtable_impl) x)
+ : internal_type( ::boost::move(x.priv_value_traits())
+ , ::boost::move(x.priv_bucket_traits())
+ , ::boost::move(x.priv_hasher())
+ , ::boost::move(x.priv_equal())
+ )
+ {
+ this->priv_swap_cache(x);
+ x.priv_initialize_cache();
+ this->priv_size_traits().set_size(x.priv_size_traits().get_size());
+ x.priv_size_traits().set_size(size_type(0));
+ this->priv_split_traits().set_size(x.priv_split_traits().get_size());
+ x.priv_split_traits().set_size(size_type(0));
+ }
+
+ //! <b>Effects</b>: Equivalent to swap.
+ //!
+ hashtable_impl& operator=(BOOST_RV_REF(hashtable_impl) x)
+ { this->swap(x); return *this; }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Detaches all elements from this. The objects in the unordered_set
+ //! are not deleted (i.e. no destructors are called).
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the unordered_set, if
+ //! it's a safe-mode or auto-unlink value. Otherwise constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ ~hashtable_impl();
+
+ //! <b>Effects</b>: Returns an iterator pointing to the beginning of the unordered_set.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ //! Worst case (empty unordered_set): O(this->bucket_count())
+ //!
+ //! <b>Throws</b>: Nothing.
+ iterator begin();
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
+ //! of the unordered_set.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ //! Worst case (empty unordered_set): O(this->bucket_count())
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator begin() const;
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the beginning
+ //! of the unordered_set.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ //! Worst case (empty unordered_set): O(this->bucket_count())
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator cbegin() const;
+
+ //! <b>Effects</b>: Returns an iterator pointing to the end of the unordered_set.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ iterator end();
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the end of the unordered_set.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator end() const;
+
+ //! <b>Effects</b>: Returns a const_iterator pointing to the end of the unordered_set.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_iterator cend() const;
+
+ //! <b>Effects</b>: Returns the hasher object used by the unordered_set.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If hasher copy-constructor throws.
+ hasher hash_function() const;
+
+ //! <b>Effects</b>: Returns the key_equal object used by the unordered_set.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If key_equal copy-constructor throws.
+ key_equal key_eq() const;
+
+ #endif
+
+ //! <b>Effects</b>: Returns true if the container is empty.
+ //!
+ //! <b>Complexity</b>: if constant-time size and cache_begin options are disabled,
+ //! average constant time (worst case, with empty() == true: O(this->bucket_count()).
+ //! Otherwise constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ bool empty() const
+ {
+ if(constant_time_size){
+ return !this->size();
+ }
+ else if(cache_begin){
+ return this->begin() == this->end();
+ }
+ else{
+ size_type bucket_cnt = this->bucket_count();
+ const bucket_type *b = boost::movelib::to_raw_pointer(this->priv_bucket_pointer());
+ for (size_type n = 0; n < bucket_cnt; ++n, ++b){
+ if(!b->empty()){
+ return false;
+ }
+ }
+ return true;
+ }
+ }
+
+ //! <b>Effects</b>: Returns the number of elements stored in the unordered_set.
+ //!
+ //! <b>Complexity</b>: Linear to elements contained in *this if
+ //! constant_time_size is false. Constant-time otherwise.
+ //!
+ //! <b>Throws</b>: Nothing.
+ size_type size() const
+ {
+ if(constant_time_size)
+ return this->priv_size_traits().get_size();
+ else{
+ size_type len = 0;
+ size_type bucket_cnt = this->bucket_count();
+ const bucket_type *b = boost::movelib::to_raw_pointer(this->priv_bucket_pointer());
+ for (size_type n = 0; n < bucket_cnt; ++n, ++b){
+ len += b->size();
+ }
+ return len;
+ }
+ }
+
+ //! <b>Requires</b>: the hasher and the equality function unqualified swap
+ //! call should not throw.
+ //!
+ //! <b>Effects</b>: Swaps the contents of two unordered_sets.
+ //! Swaps also the contained bucket array and equality and hasher functors.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If the swap() call for the comparison or hash functors
+ //! found using ADL throw. Basic guarantee.
+ void swap(hashtable_impl& other)
+ {
+ //These can throw
+ ::boost::adl_move_swap(this->priv_equal(), other.priv_equal());
+ ::boost::adl_move_swap(this->priv_hasher(), other.priv_hasher());
+ //These can't throw
+ ::boost::adl_move_swap(this->priv_bucket_traits(), other.priv_bucket_traits());
+ ::boost::adl_move_swap(this->priv_value_traits(), other.priv_value_traits());
+ this->priv_swap_cache(other);
+ this->priv_size_traits().swap(other.priv_size_traits());
+ this->priv_split_traits().swap(other.priv_split_traits());
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw
+ //! Cloner should yield to nodes that compare equal and produce the same
+ //! hash than the original node.
+ //!
+ //! <b>Effects</b>: Erases all the elements from *this
+ //! calling Disposer::operator()(pointer), clones all the
+ //! elements from src calling Cloner::operator()(const_reference )
+ //! and inserts them on *this. The hash function and the equality
+ //! predicate are copied from the source.
+ //!
+ //! If store_hash option is true, this method does not use the hash function.
+ //!
+ //! If any operation throws, all cloned elements are unlinked and disposed
+ //! calling Disposer::operator()(pointer).
+ //!
+ //! <b>Complexity</b>: Linear to erased plus inserted elements.
+ //!
+ //! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
+ //! throws. Basic guarantee.
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const hashtable_impl &src, Cloner cloner, Disposer disposer)
+ { this->priv_clone_from(src, cloner, disposer); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw
+ //! Cloner should yield to nodes that compare equal and produce the same
+ //! hash than the original node.
+ //!
+ //! <b>Effects</b>: Erases all the elements from *this
+ //! calling Disposer::operator()(pointer), clones all the
+ //! elements from src calling Cloner::operator()(reference)
+ //! and inserts them on *this. The hash function and the equality
+ //! predicate are copied from the source.
+ //!
+ //! If store_hash option is true, this method does not use the hash function.
+ //!
+ //! If any operation throws, all cloned elements are unlinked and disposed
+ //! calling Disposer::operator()(pointer).
+ //!
+ //! <b>Complexity</b>: Linear to erased plus inserted elements.
+ //!
+ //! <b>Throws</b>: If cloner or hasher throw or hash or equality predicate copying
+ //! throws. Basic guarantee.
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(hashtable_impl) src, Cloner cloner, Disposer disposer)
+ { this->priv_clone_from(static_cast<hashtable_impl&>(src), cloner, disposer); }
+
+ //! <b>Requires</b>: value must be an lvalue
+ //!
+ //! <b>Effects</b>: Inserts the value into the unordered_set.
+ //!
+ //! <b>Returns</b>: An iterator to the inserted value.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ iterator insert_equal(reference value)
+ {
+ size_type bucket_num;
+ std::size_t hash_value;
+ siterator prev;
+ siterator const it = this->priv_find
+ (key_of_value()(value), this->priv_hasher(), this->priv_equal(), bucket_num, hash_value, prev);
+ bool const next_is_in_group = optimize_multikey && it != this->priv_invalid_local_it();
+ return this->priv_insert_equal_after_find(value, bucket_num, hash_value, prev, next_is_in_group);
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
+ //! of type value_type.
+ //!
+ //! <b>Effects</b>: Equivalent to this->insert_equal(t) for each element in [b, e).
+ //!
+ //! <b>Complexity</b>: Average case O(N), where N is distance(b, e).
+ //! Worst case O(N*this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws. Basic guarantee.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ template<class Iterator>
+ void insert_equal(Iterator b, Iterator e)
+ {
+ for (; b != e; ++b)
+ this->insert_equal(*b);
+ }
+
+ //! <b>Requires</b>: value must be an lvalue
+ //!
+ //! <b>Effects</b>: Tries to inserts value into the unordered_set.
+ //!
+ //! <b>Returns</b>: If the value
+ //! is not already present inserts it and returns a pair containing the
+ //! iterator to the new value and true. If there is an equivalent value
+ //! returns a pair containing an iterator to the already present value
+ //! and false.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws. Strong guarantee.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ std::pair<iterator, bool> insert_unique(reference value)
+ {
+ insert_commit_data commit_data;
+ std::pair<iterator, bool> ret = this->insert_unique_check(key_of_value()(value), commit_data);
+ if(ret.second){
+ ret.first = this->insert_unique_commit(value, commit_data);
+ }
+ return ret;
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue
+ //! of type value_type.
+ //!
+ //! <b>Effects</b>: Equivalent to this->insert_unique(t) for each element in [b, e).
+ //!
+ //! <b>Complexity</b>: Average case O(N), where N is distance(b, e).
+ //! Worst case O(N*this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws. Basic guarantee.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! No copy-constructors are called.
+ template<class Iterator>
+ void insert_unique(Iterator b, Iterator e)
+ {
+ for (; b != e; ++b)
+ this->insert_unique(*b);
+ }
+
+ //! <b>Requires</b>: "hash_func" must be a hash function that induces
+ //! the same hash values as the stored hasher. The difference is that
+ //! "hash_func" hashes the given key instead of the value_type.
+ //!
+ //! "equal_func" must be a equality function that induces
+ //! the same equality as key_equal. The difference is that
+ //! "equal_func" compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Checks if a value can be inserted in the unordered_set, using
+ //! a user provided key instead of the value itself.
+ //!
+ //! <b>Returns</b>: If there is an equivalent value
+ //! returns a pair containing an iterator to the already present value
+ //! and false. If the value can be inserted returns true in the returned
+ //! pair boolean and fills "commit_data" that is meant to be used with
+ //! the "insert_commit" function.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If hash_func or equal_func throw. Strong guarantee.
+ //!
+ //! <b>Notes</b>: This function is used to improve performance when constructing
+ //! a value_type is expensive: if there is an equivalent value
+ //! the constructed object must be discarded. Many times, the part of the
+ //! node that is used to impose the hash or the equality is much cheaper to
+ //! construct than the value_type and this function offers the possibility to
+ //! use that the part to check if the insertion will be successful.
+ //!
+ //! If the check is successful, the user can construct the value_type and use
+ //! "insert_commit" to insert the object in constant-time.
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
+ //! objects are inserted or erased from the unordered_set.
+ //!
+ //! After a successful rehashing insert_commit_data remains valid.
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<iterator, bool> insert_unique_check
+ ( const KeyType &key
+ , KeyHasher hash_func
+ , KeyEqual equal_func
+ , insert_commit_data &commit_data)
+ {
+ size_type bucket_num;
+ siterator prev;
+ siterator const pos = this->priv_find(key, hash_func, equal_func, bucket_num, commit_data.hash, prev);
+ return std::pair<iterator, bool>
+ ( iterator(pos, &this->get_bucket_value_traits())
+ , pos == this->priv_invalid_local_it());
+ }
+
+ //! <b>Effects</b>: Checks if a value can be inserted in the unordered_set, using
+ //! a user provided key instead of the value itself.
+ //!
+ //! <b>Returns</b>: If there is an equivalent value
+ //! returns a pair containing an iterator to the already present value
+ //! and false. If the value can be inserted returns true in the returned
+ //! pair boolean and fills "commit_data" that is meant to be used with
+ //! the "insert_commit" function.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If hasher or key_compare throw. Strong guarantee.
+ //!
+ //! <b>Notes</b>: This function is used to improve performance when constructing
+ //! a value_type is expensive: if there is an equivalent value
+ //! the constructed object must be discarded. Many times, the part of the
+ //! node that is used to impose the hash or the equality is much cheaper to
+ //! construct than the value_type and this function offers the possibility to
+ //! use that the part to check if the insertion will be successful.
+ //!
+ //! If the check is successful, the user can construct the value_type and use
+ //! "insert_commit" to insert the object in constant-time.
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_commit" only if no more
+ //! objects are inserted or erased from the unordered_set.
+ //!
+ //! After a successful rehashing insert_commit_data remains valid.
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_unique_check
+ ( const key_type &key, insert_commit_data &commit_data)
+ { return this->insert_unique_check(key, this->priv_hasher(), this->priv_equal(), commit_data); }
+
+ //! <b>Requires</b>: value must be an lvalue of type value_type. commit_data
+ //! must have been obtained from a previous call to "insert_check".
+ //! No objects should have been inserted or erased from the unordered_set between
+ //! the "insert_check" that filled "commit_data" and the call to "insert_commit".
+ //!
+ //! <b>Effects</b>: Inserts the value in the unordered_set using the information obtained
+ //! from the "commit_data" that a previous "insert_check" filled.
+ //!
+ //! <b>Returns</b>: An iterator to the newly inserted object.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Notes</b>: This function has only sense if a "insert_check" has been
+ //! previously executed to fill "commit_data". No value should be inserted or
+ //! erased between the "insert_check" and "insert_commit" calls.
+ //!
+ //! After a successful rehashing insert_commit_data remains valid.
+ iterator insert_unique_commit(reference value, const insert_commit_data &commit_data)
+ {
+ size_type bucket_num = this->priv_hash_to_bucket(commit_data.hash);
+ bucket_type &b = this->priv_bucket_pointer()[bucket_num];
+ this->priv_size_traits().increment();
+ node_ptr const n = pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(value));
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(n));
+ node_functions_t::store_hash(n, commit_data.hash, store_hash_t());
+ this->priv_insertion_update_cache(bucket_num);
+ group_functions_t::insert_in_group(n, n, optimize_multikey_t());
+ return iterator(b.insert_after(b.before_begin(), *n), &this->get_bucket_value_traits());
+ }
+
+ //! <b>Effects</b>: Erases the element pointed to by i.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased element. No destructors are called.
+ BOOST_INTRUSIVE_FORCEINLINE void erase(const_iterator i)
+ { this->erase_and_dispose(i, detail::null_disposer()); }
+
+ //! <b>Effects</b>: Erases the range pointed to by b end e.
+ //!
+ //! <b>Complexity</b>: Average case O(distance(b, e)),
+ //! worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ BOOST_INTRUSIVE_FORCEINLINE void erase(const_iterator b, const_iterator e)
+ { this->erase_and_dispose(b, e, detail::null_disposer()); }
+
+ //! <b>Effects</b>: Erases all the elements with the given value.
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: Average case O(this->count(value)).
+ //! Worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws.
+ //! Basic guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ BOOST_INTRUSIVE_FORCEINLINE size_type erase(const key_type &key)
+ { return this->erase(key, this->priv_hasher(), this->priv_equal()); }
+
+ //! <b>Requires</b>: "hash_func" must be a hash function that induces
+ //! the same hash values as the stored hasher. The difference is that
+ //! "hash_func" hashes the given key instead of the value_type.
+ //!
+ //! "equal_func" must be a equality function that induces
+ //! the same equality as key_equal. The difference is that
+ //! "equal_func" compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Erases all the elements that have the same hash and
+ //! compare equal with the given key.
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: Average case O(this->count(value)).
+ //! Worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If hash_func or equal_func throw. Basic guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ BOOST_INTRUSIVE_FORCEINLINE size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
+ { return this->erase_and_dispose(key, hash_func, equal_func, detail::null_disposer()); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the element pointed to by i.
+ //! Disposer::operator()(pointer) is called for the removed element.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class Disposer>
+ BOOST_INTRUSIVE_DOC1ST(void
+ , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
+ erase_and_dispose(const_iterator i, Disposer disposer)
+ {
+ //Get the bucket number and local iterator for both iterators
+ siterator const first_local_it(i.slist_it());
+ size_type const first_bucket_num = this->priv_get_bucket_num(first_local_it);
+ this->priv_erase_node(this->priv_bucket_pointer()[first_bucket_num], first_local_it, make_node_disposer(disposer), optimize_multikey_t());
+ this->priv_size_traits().decrement();
+ this->priv_erasure_update_cache_range(first_bucket_num, first_bucket_num);
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the range pointed to by b end e.
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Complexity</b>: Average case O(distance(b, e)),
+ //! worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class Disposer>
+ void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer)
+ {
+ if(b != e){
+ //Get the bucket number and local iterator for both iterators
+ siterator first_local_it(b.slist_it());
+ size_type first_bucket_num = this->priv_get_bucket_num(first_local_it);
+
+ const bucket_ptr buck_ptr = this->priv_bucket_pointer();
+ siterator before_first_local_it
+ = this->priv_get_previous(buck_ptr[first_bucket_num], first_local_it);
+ size_type last_bucket_num;
+ siterator last_local_it;
+
+ //For the end iterator, we will assign the end iterator
+ //of the last bucket
+ if(e == this->end()){
+ last_bucket_num = this->bucket_count() - 1;
+ last_local_it = buck_ptr[last_bucket_num].end();
+ }
+ else{
+ last_local_it = e.slist_it();
+ last_bucket_num = this->priv_get_bucket_num(last_local_it);
+ }
+ size_type const num_erased = this->priv_erase_node_range
+ ( before_first_local_it, first_bucket_num, last_local_it, last_bucket_num
+ , make_node_disposer(disposer), optimize_multikey_t());
+ this->priv_size_traits().set_size(this->priv_size_traits().get_size()-num_erased);
+ this->priv_erasure_update_cache_range(first_bucket_num, last_bucket_num);
+ }
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases all the elements with the given value.
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: Average case O(this->count(value)).
+ //! Worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws.
+ //! Basic guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ template<class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE size_type erase_and_dispose(const key_type &key, Disposer disposer)
+ { return this->erase_and_dispose(key, this->priv_hasher(), this->priv_equal(), disposer); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases all the elements with the given key.
+ //! according to the comparison functor "equal_func".
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Returns</b>: The number of erased elements.
+ //!
+ //! <b>Complexity</b>: Average case O(this->count(value)).
+ //! Worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If hash_func or equal_func throw. Basic guarantee.
+ //!
+ //! <b>Note</b>: Invalidates the iterators
+ //! to the erased elements.
+ template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func
+ ,KeyEqual equal_func, Disposer disposer)
+ {
+ size_type bucket_num;
+ std::size_t h;
+ siterator prev;
+ siterator it = this->priv_find(key, hash_func, equal_func, bucket_num, h, prev);
+ bool const success = it != this->priv_invalid_local_it();
+
+ size_type cnt(0);
+ if(success){
+ if(optimize_multikey){
+ cnt = this->priv_erase_from_single_bucket
+ (this->priv_bucket_pointer()[bucket_num], prev, ++(priv_last_in_group)(it), make_node_disposer(disposer), optimize_multikey_t());
+ }
+ else{
+ bucket_type &b = this->priv_bucket_pointer()[bucket_num];
+ siterator const end_sit = b.end();
+ do{
+ ++cnt;
+ ++it;
+ }while(it != end_sit &&
+ this->priv_is_value_equal_to_key
+ (this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func));
+ bucket_type::s_erase_after_and_dispose(prev, it, make_node_disposer(disposer));
+ }
+ this->priv_size_traits().set_size(this->priv_size_traits().get_size()-cnt);
+ this->priv_erasure_update_cache();
+ }
+
+ return cnt;
+ }
+
+ //! <b>Effects</b>: Erases all of the elements.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements on the container.
+ //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ void clear()
+ {
+ this->priv_clear_buckets_and_cache();
+ this->priv_size_traits().set_size(size_type(0));
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases all of the elements.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements on the container.
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements. No destructors are called.
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer)
+ {
+ if(!constant_time_size || !this->empty()){
+ size_type num_buckets = this->bucket_count();
+ bucket_ptr b = this->priv_bucket_pointer();
+ typename typeof_node_disposer<Disposer>::type d(disposer, &this->priv_value_traits());
+ for(; num_buckets--; ++b){
+ b->clear_and_dispose(d);
+ }
+ this->priv_size_traits().set_size(size_type(0));
+ }
+ this->priv_initialize_cache();
+ }
+
+ //! <b>Effects</b>: Returns the number of contained elements with the given value
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws.
+ BOOST_INTRUSIVE_FORCEINLINE size_type count(const key_type &key) const
+ { return this->count(key, this->priv_hasher(), this->priv_equal()); }
+
+ //! <b>Requires</b>: "hash_func" must be a hash function that induces
+ //! the same hash values as the stored hasher. The difference is that
+ //! "hash_func" hashes the given key instead of the value_type.
+ //!
+ //! "equal_func" must be a equality function that induces
+ //! the same equality as key_equal. The difference is that
+ //! "equal_func" compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Returns the number of contained elements with the given key
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If hash_func or equal throw.
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ size_type count(const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
+ {
+ size_type cnt;
+ size_type n_bucket;
+ this->priv_local_equal_range(key, hash_func, equal_func, n_bucket, cnt);
+ return cnt;
+ }
+
+ //! <b>Effects</b>: Finds an iterator to the first element is equal to
+ //! "value" or end() if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws.
+ BOOST_INTRUSIVE_FORCEINLINE iterator find(const key_type &key)
+ { return this->find(key, this->priv_hasher(), this->priv_equal()); }
+
+ //! <b>Requires</b>: "hash_func" must be a hash function that induces
+ //! the same hash values as the stored hasher. The difference is that
+ //! "hash_func" hashes the given key instead of the value_type.
+ //!
+ //! "equal_func" must be a equality function that induces
+ //! the same equality as key_equal. The difference is that
+ //! "equal_func" compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Finds an iterator to the first element whose key is
+ //! "key" according to the given hash and equality functor or end() if
+ //! that element does not exist.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If hash_func or equal_func throw.
+ //!
+ //! <b>Note</b>: This function is used when constructing a value_type
+ //! is expensive and the value_type can be compared with a cheaper
+ //! key type. Usually this key is part of the value_type.
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ iterator find(const KeyType &key, KeyHasher hash_func, KeyEqual equal_func)
+ {
+ size_type bucket_n;
+ std::size_t hash;
+ siterator prev;
+ return iterator( this->priv_find(key, hash_func, equal_func, bucket_n, hash, prev)
+ , &this->get_bucket_value_traits());
+ }
+
+ //! <b>Effects</b>: Finds a const_iterator to the first element whose key is
+ //! "key" or end() if that element does not exist.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws.
+ BOOST_INTRUSIVE_FORCEINLINE const_iterator find(const key_type &key) const
+ { return this->find(key, this->priv_hasher(), this->priv_equal()); }
+
+ //! <b>Requires</b>: "hash_func" must be a hash function that induces
+ //! the same hash values as the stored hasher. The difference is that
+ //! "hash_func" hashes the given key instead of the value_type.
+ //!
+ //! "equal_func" must be a equality function that induces
+ //! the same equality as key_equal. The difference is that
+ //! "equal_func" compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Finds an iterator to the first element whose key is
+ //! "key" according to the given hasher and equality functor or end() if
+ //! that element does not exist.
+ //!
+ //! <b>Complexity</b>: Average case O(1), worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If hash_func or equal_func throw.
+ //!
+ //! <b>Note</b>: This function is used when constructing a value_type
+ //! is expensive and the value_type can be compared with a cheaper
+ //! key type. Usually this key is part of the value_type.
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ const_iterator find
+ (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
+ {
+ size_type bucket_n;
+ std::size_t hash_value;
+ siterator prev;
+ return const_iterator( this->priv_find(key, hash_func, equal_func, bucket_n, hash_value, prev)
+ , &this->get_bucket_value_traits());
+ }
+
+ //! <b>Effects</b>: Returns a range containing all elements with values equivalent
+ //! to value. Returns std::make_pair(this->end(), this->end()) if no such
+ //! elements exist.
+ //!
+ //! <b>Complexity</b>: Average case O(this->count(value)). Worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws.
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->equal_range(key, this->priv_hasher(), this->priv_equal()); }
+
+ //! <b>Requires</b>: "hash_func" must be a hash function that induces
+ //! the same hash values as the stored hasher. The difference is that
+ //! "hash_func" hashes the given key instead of the value_type.
+ //!
+ //! "equal_func" must be a equality function that induces
+ //! the same equality as key_equal. The difference is that
+ //! "equal_func" compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Returns a range containing all elements with equivalent
+ //! keys. Returns std::make_pair(this->end(), this->end()) if no such
+ //! elements exist.
+ //!
+ //! <b>Complexity</b>: Average case O(this->count(key, hash_func, equal_func)).
+ //! Worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If hash_func or the equal_func throw.
+ //!
+ //! <b>Note</b>: This function is used when constructing a value_type
+ //! is expensive and the value_type can be compared with a cheaper
+ //! key type. Usually this key is part of the value_type.
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<iterator,iterator> equal_range
+ (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func)
+ {
+ std::pair<siterator, siterator> ret =
+ this->priv_equal_range(key, hash_func, equal_func);
+ return std::pair<iterator, iterator>
+ ( iterator(ret.first, &this->get_bucket_value_traits())
+ , iterator(ret.second, &this->get_bucket_value_traits()));
+ }
+
+ //! <b>Effects</b>: Returns a range containing all elements with values equivalent
+ //! to value. Returns std::make_pair(this->end(), this->end()) if no such
+ //! elements exist.
+ //!
+ //! <b>Complexity</b>: Average case O(this->count(value)). Worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the internal hasher or the equality functor throws.
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->equal_range(key, this->priv_hasher(), this->priv_equal()); }
+
+ //! <b>Requires</b>: "hash_func" must be a hash function that induces
+ //! the same hash values as the stored hasher. The difference is that
+ //! "hash_func" hashes the given key instead of the value_type.
+ //!
+ //! "equal_func" must be a equality function that induces
+ //! the same equality as key_equal. The difference is that
+ //! "equal_func" compares an arbitrary key with the contained values.
+ //!
+ //! <b>Effects</b>: Returns a range containing all elements with equivalent
+ //! keys. Returns std::make_pair(this->end(), this->end()) if no such
+ //! elements exist.
+ //!
+ //! <b>Complexity</b>: Average case O(this->count(key, hash_func, equal_func)).
+ //! Worst case O(this->size()).
+ //!
+ //! <b>Throws</b>: If the hasher or equal_func throw.
+ //!
+ //! <b>Note</b>: This function is used when constructing a value_type
+ //! is expensive and the value_type can be compared with a cheaper
+ //! key type. Usually this key is part of the value_type.
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<const_iterator,const_iterator> equal_range
+ (const KeyType &key, KeyHasher hash_func, KeyEqual equal_func) const
+ {
+ std::pair<siterator, siterator> ret =
+ this->priv_equal_range(key, hash_func, equal_func);
+ return std::pair<const_iterator, const_iterator>
+ ( const_iterator(ret.first, &this->get_bucket_value_traits())
+ , const_iterator(ret.second, &this->get_bucket_value_traits()));
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid iterator belonging to the unordered_set
+ //! that points to the value
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If the internal hash function throws.
+ iterator iterator_to(reference value);
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid const_iterator belonging to the
+ //! unordered_set that points to the value
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If the internal hash function throws.
+ const_iterator iterator_to(const_reference value) const;
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid local_iterator belonging to the unordered_set
+ //! that points to the value
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This static function is available only if the <i>value traits</i>
+ //! is stateless.
+ static local_iterator s_local_iterator_to(reference value);
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid const_local_iterator belonging to
+ //! the unordered_set that points to the value
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: This static function is available only if the <i>value traits</i>
+ //! is stateless.
+ static const_local_iterator s_local_iterator_to(const_reference value);
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid local_iterator belonging to the unordered_set
+ //! that points to the value
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ local_iterator local_iterator_to(reference value);
+
+ //! <b>Requires</b>: value must be an lvalue and shall be in a unordered_set of
+ //! appropriate type. Otherwise the behavior is undefined.
+ //!
+ //! <b>Effects</b>: Returns: a valid const_local_iterator belonging to
+ //! the unordered_set that points to the value
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ const_local_iterator local_iterator_to(const_reference value) const;
+
+ //! <b>Effects</b>: Returns the number of buckets passed in the constructor
+ //! or the last rehash function.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ size_type bucket_count() const;
+
+ //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
+ //!
+ //! <b>Effects</b>: Returns the number of elements in the nth bucket.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ size_type bucket_size(size_type n) const;
+ #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Returns the index of the bucket in which elements
+ //! with keys equivalent to k would be found, if any such element existed.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If the hash functor throws.
+ //!
+ //! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket(const key_type& k) const
+ { return this->bucket(k, this->priv_hasher()); }
+
+ //! <b>Requires</b>: "hash_func" must be a hash function that induces
+ //! the same hash values as the stored hasher. The difference is that
+ //! "hash_func" hashes the given key instead of the value_type.
+ //!
+ //! <b>Effects</b>: Returns the index of the bucket in which elements
+ //! with keys equivalent to k would be found, if any such element existed.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If hash_func throws.
+ //!
+ //! <b>Note</b>: the return value is in the range [0, this->bucket_count()).
+ template<class KeyType, class KeyHasher>
+ BOOST_INTRUSIVE_FORCEINLINE size_type bucket(const KeyType& k, KeyHasher hash_func) const
+ { return this->priv_hash_to_bucket(hash_func(k)); }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! <b>Effects</b>: Returns the bucket array pointer passed in the constructor
+ //! or the last rehash function.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ bucket_ptr bucket_pointer() const;
+
+ //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
+ //!
+ //! <b>Effects</b>: Returns a local_iterator pointing to the beginning
+ //! of the sequence stored in the bucket n.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
+ //! containing all of the elements in the nth bucket.
+ local_iterator begin(size_type n);
+
+ //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
+ //!
+ //! <b>Effects</b>: Returns a const_local_iterator pointing to the beginning
+ //! of the sequence stored in the bucket n.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
+ //! containing all of the elements in the nth bucket.
+ const_local_iterator begin(size_type n) const;
+
+ //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
+ //!
+ //! <b>Effects</b>: Returns a const_local_iterator pointing to the beginning
+ //! of the sequence stored in the bucket n.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
+ //! containing all of the elements in the nth bucket.
+ const_local_iterator cbegin(size_type n) const;
+
+ //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
+ //!
+ //! <b>Effects</b>: Returns a local_iterator pointing to the end
+ //! of the sequence stored in the bucket n.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
+ //! containing all of the elements in the nth bucket.
+ local_iterator end(size_type n);
+
+ //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
+ //!
+ //! <b>Effects</b>: Returns a const_local_iterator pointing to the end
+ //! of the sequence stored in the bucket n.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
+ //! containing all of the elements in the nth bucket.
+ const_local_iterator end(size_type n) const;
+
+ //! <b>Requires</b>: n is in the range [0, this->bucket_count()).
+ //!
+ //! <b>Effects</b>: Returns a const_local_iterator pointing to the end
+ //! of the sequence stored in the bucket n.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Note</b>: [this->begin(n), this->end(n)) is a valid range
+ //! containing all of the elements in the nth bucket.
+ const_local_iterator cend(size_type n) const;
+ #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Requires</b>: new_bucket_traits can hold a pointer to a new bucket array
+ //! or the same as the old bucket array with a different length. new_size is the length of the
+ //! the array pointed by new_buckets. If new_bucket_traits.bucket_begin() == this->bucket_pointer()
+ //! new_bucket_traits.bucket_count() can be bigger or smaller than this->bucket_count().
+ //! 'new_bucket_traits' copy constructor should not throw.
+ //!
+ //! <b>Effects</b>:
+ //! If `new_bucket_traits.bucket_begin() == this->bucket_pointer()` is false,
+ //! unlinks values from the old bucket and inserts then in the new one according
+ //! to the hash value of values.
+ //!
+ //! If `new_bucket_traits.bucket_begin() == this->bucket_pointer()` is true,
+ //! the implementations avoids moving values as much as possible.
+ //!
+ //! Bucket traits hold by *this is assigned from new_bucket_traits.
+ //! If the container is configured as incremental<>, the split bucket is set
+ //! to the new bucket_count().
+ //!
+ //! If store_hash option is true, this method does not use the hash function.
+ //! If false, the implementation tries to minimize calls to the hash function
+ //! (e.g. once for equivalent values if optimize_multikey<true> is true).
+ //!
+ //! If rehash is successful updates the internal bucket_traits with new_bucket_traits.
+ //!
+ //! <b>Complexity</b>: Average case linear in this->size(), worst case quadratic.
+ //!
+ //! <b>Throws</b>: If the hasher functor throws. Basic guarantee.
+ BOOST_INTRUSIVE_FORCEINLINE void rehash(const bucket_traits &new_bucket_traits)
+ { this->rehash_impl(new_bucket_traits, false); }
+
+ //! <b>Note</b>: This function is used when keys from inserted elements are changed
+ //! (e.g. a language change when key is a string) but uniqueness and hash properties are
+ //! preserved so a fast full rehash recovers invariants for *this without extracting and
+ //! reinserting all elements again.
+ //!
+ //! <b>Requires</b>: Calls produced to the hash function should not alter the value uniqueness
+ //! properties of already inserted elements. If hasher(key1) == hasher(key2) was true when
+ //! elements were inserted, it shall be true during calls produced in the execution of this function.
+ //!
+ //! key_equal is not called inside this function so it is assumed that key_equal(value1, value2)
+ //! should produce the same results as before for inserted elements.
+ //!
+ //! <b>Effects</b>: Reprocesses all values hold by *this, recalculating their hash values
+ //! and redistributing them though the buckets.
+ //!
+ //! If store_hash option is true, this method uses the hash function and updates the stored hash value.
+ //!
+ //! <b>Complexity</b>: Average case linear in this->size(), worst case quadratic.
+ //!
+ //! <b>Throws</b>: If the hasher functor throws. Basic guarantee.
+ BOOST_INTRUSIVE_FORCEINLINE void full_rehash()
+ { this->rehash_impl(this->priv_bucket_traits(), true); }
+
+ //! <b>Requires</b>:
+ //!
+ //! <b>Effects</b>:
+ //!
+ //! <b>Complexity</b>:
+ //!
+ //! <b>Throws</b>:
+ //!
+ //! <b>Note</b>: this method is only available if incremental<true> option is activated.
+ bool incremental_rehash(bool grow = true)
+ {
+ //This function is only available for containers with incremental hashing
+ BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
+ const size_type split_idx = this->priv_split_traits().get_size();
+ const size_type bucket_cnt = this->bucket_count();
+ const bucket_ptr buck_ptr = this->priv_bucket_pointer();
+ bool ret = false;
+
+ if(grow){
+ //Test if the split variable can be changed
+ if((ret = split_idx < bucket_cnt)){
+ const size_type bucket_to_rehash = split_idx - bucket_cnt/2;
+ bucket_type &old_bucket = buck_ptr[bucket_to_rehash];
+ this->priv_split_traits().increment();
+
+ //Anti-exception stuff: if an exception is thrown while
+ //moving elements from old_bucket to the target bucket, all moved
+ //elements are moved back to the original one.
+ detail::incremental_rehash_rollback<bucket_type, split_traits> rollback
+ ( buck_ptr[split_idx], old_bucket, this->priv_split_traits());
+ for( siterator before_i(old_bucket.before_begin()), i(old_bucket.begin()), end_sit(old_bucket.end())
+ ; i != end_sit; i = before_i, ++i){
+ const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
+ const std::size_t hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
+ const size_type new_n = this->priv_hash_to_bucket(hash_value);
+ siterator const last = (priv_last_in_group)(i);
+ if(new_n == bucket_to_rehash){
+ before_i = last;
+ }
+ else{
+ bucket_type &new_b = buck_ptr[new_n];
+ new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
+ }
+ }
+ rollback.release();
+ this->priv_erasure_update_cache();
+ }
+ }
+ else if((ret = split_idx > bucket_cnt/2)){ //!grow
+ const size_type target_bucket_num = split_idx - 1 - bucket_cnt/2;
+ bucket_type &target_bucket = buck_ptr[target_bucket_num];
+ bucket_type &source_bucket = buck_ptr[split_idx-1];
+ target_bucket.splice_after(target_bucket.cbefore_begin(), source_bucket);
+ this->priv_split_traits().decrement();
+ this->priv_insertion_update_cache(target_bucket_num);
+ }
+ return ret;
+ }
+
+ //! <b>Effects</b>: If new_bucket_traits.bucket_count() is not
+ //! this->bucket_count()/2 or this->bucket_count()*2, or
+ //! this->split_bucket() != new_bucket_traits.bucket_count() returns false
+ //! and does nothing.
+ //!
+ //! Otherwise, copy assigns new_bucket_traits to the internal bucket_traits
+ //! and transfers all the objects from old buckets to the new ones.
+ //!
+ //! <b>Complexity</b>: Linear to size().
+ //!
+ //! <b>Throws</b>: Nothing
+ //!
+ //! <b>Note</b>: this method is only available if incremental<true> option is activated.
+ bool incremental_rehash(const bucket_traits &new_bucket_traits)
+ {
+ //This function is only available for containers with incremental hashing
+ BOOST_STATIC_ASSERT(( incremental && power_2_buckets ));
+ size_type const new_bucket_traits_size = new_bucket_traits.bucket_count();
+ size_type const cur_bucket_traits = this->bucket_count();
+ const size_type split_idx = this->split_count();
+
+ //Test new bucket size is consistent with internal bucket size and split count
+ if(new_bucket_traits_size/2 == cur_bucket_traits){
+ if(!(split_idx >= cur_bucket_traits))
+ return false;
+ }
+ else if(new_bucket_traits_size == cur_bucket_traits/2){
+ if(!(split_idx <= new_bucket_traits_size))
+ return false;
+ }
+ else{
+ return false;
+ }
+
+ const size_type ini_n = this->priv_get_cache_bucket_num();
+ const bucket_ptr old_buckets = this->priv_bucket_pointer();
+ this->priv_bucket_traits() = new_bucket_traits;
+ if(new_bucket_traits.bucket_begin() != old_buckets){
+ for(size_type n = ini_n; n < split_idx; ++n){
+ bucket_type &new_bucket = new_bucket_traits.bucket_begin()[n];
+ bucket_type &old_bucket = old_buckets[n];
+ new_bucket.splice_after(new_bucket.cbefore_begin(), old_bucket);
+ }
+ //Put cache to safe position
+ this->priv_initialize_cache();
+ this->priv_insertion_update_cache(ini_n);
+ }
+ return true;
+ }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Requires</b>: incremental<> option must be set
+ //!
+ //! <b>Effects</b>: returns the current split count
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing
+ size_type split_count() const;
+
+ //! <b>Effects</b>: Returns the nearest new bucket count optimized for
+ //! the container that is bigger or equal than n. This suggestion can be
+ //! used to create bucket arrays with a size that will usually improve
+ //! container's performance. If such value does not exist, the
+ //! higher possible value is returned.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static size_type suggested_upper_bucket_count(size_type n);
+
+ //! <b>Effects</b>: Returns the nearest new bucket count optimized for
+ //! the container that is smaller or equal than n. This suggestion can be
+ //! used to create bucket arrays with a size that will usually improve
+ //! container's performance. If such value does not exist, the
+ //! lowest possible value is returned.
+ //!
+ //! <b>Complexity</b>: Amortized constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ static size_type suggested_lower_bucket_count(size_type n);
+ #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+
+ friend bool operator==(const hashtable_impl &x, const hashtable_impl &y)
+ {
+ //Taken from N3068
+ if(constant_time_size && x.size() != y.size()){
+ return false;
+ }
+ for (const_iterator ix = x.cbegin(), ex = x.cend(); ix != ex; ++ix){
+ std::pair<const_iterator, const_iterator> eqx(x.equal_range(key_of_value()(*ix))),
+ eqy(y.equal_range(key_of_value()(*ix)));
+ if (boost::intrusive::iterator_distance(eqx.first, eqx.second) !=
+ boost::intrusive::iterator_distance(eqy.first, eqy.second) ||
+ !(priv_algo_is_permutation)(eqx.first, eqx.second, eqy.first) ){
+ return false;
+ }
+ ix = eqx.second;
+ }
+ return true;
+ }
+
+ friend bool operator!=(const hashtable_impl &x, const hashtable_impl &y)
+ { return !(x == y); }
+
+ friend bool operator<(const hashtable_impl &x, const hashtable_impl &y)
+ { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ friend bool operator>(const hashtable_impl &x, const hashtable_impl &y)
+ { return y < x; }
+
+ friend bool operator<=(const hashtable_impl &x, const hashtable_impl &y)
+ { return !(y < x); }
+
+ friend bool operator>=(const hashtable_impl &x, const hashtable_impl &y)
+ { return !(x < y); }
+
+ /// @cond
+ BOOST_INTRUSIVE_FORCEINLINE void check() const {}
+ private:
+
+ void rehash_impl(const bucket_traits &new_bucket_traits, bool do_full_rehash)
+ {
+ const bucket_ptr new_buckets = new_bucket_traits.bucket_begin();
+ size_type new_bucket_count = new_bucket_traits.bucket_count();
+ const bucket_ptr old_buckets = this->priv_bucket_pointer();
+ size_type old_bucket_count = this->bucket_count();
+
+ //Check power of two bucket array if the option is activated
+ BOOST_INTRUSIVE_INVARIANT_ASSERT
+ (!power_2_buckets || (0 == (new_bucket_count & (new_bucket_count-1u))));
+
+ size_type n = this->priv_get_cache_bucket_num();
+ const bool same_buffer = old_buckets == new_buckets;
+ //If the new bucket length is a common factor
+ //of the old one we can avoid hash calculations.
+ const bool fast_shrink = (!do_full_rehash) && (!incremental) && (old_bucket_count >= new_bucket_count) &&
+ (power_2_buckets || (old_bucket_count % new_bucket_count) == 0);
+ //If we are shrinking the same bucket array and it's
+ //is a fast shrink, just rehash the last nodes
+ size_type new_first_bucket_num = new_bucket_count;
+ if(same_buffer && fast_shrink && (n < new_bucket_count)){
+ new_first_bucket_num = n;
+ n = new_bucket_count;
+ }
+
+ //Anti-exception stuff: they destroy the elements if something goes wrong.
+ //If the source and destination buckets are the same, the second rollback function
+ //is harmless, because all elements have been already unlinked and destroyed
+ typedef detail::init_disposer<node_algorithms> NodeDisposer;
+ typedef detail::exception_array_disposer<bucket_type, NodeDisposer, size_type> ArrayDisposer;
+ NodeDisposer node_disp;
+ ArrayDisposer rollback1(new_buckets[0], node_disp, new_bucket_count);
+ ArrayDisposer rollback2(old_buckets[0], node_disp, old_bucket_count);
+
+ //Put size in a safe value for rollback exception
+ size_type const size_backup = this->priv_size_traits().get_size();
+ this->priv_size_traits().set_size(0);
+ //Put cache to safe position
+ this->priv_initialize_cache();
+ this->priv_insertion_update_cache(size_type(0u));
+
+ //Iterate through nodes
+ for(; n < old_bucket_count; ++n){
+ bucket_type &old_bucket = old_buckets[n];
+ if(!fast_shrink){
+ for( siterator before_i(old_bucket.before_begin()), i(old_bucket.begin()), end_sit(old_bucket.end())
+ ; i != end_sit
+ ; i = before_i, ++i){
+
+ //First obtain hash value (and store it if do_full_rehash)
+ std::size_t hash_value;
+ if(do_full_rehash){
+ value_type &v = this->priv_value_from_slist_node(i.pointed_node());
+ hash_value = this->priv_hasher()(key_of_value()(v));
+ node_functions_t::store_hash(pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(v)), hash_value, store_hash_t());
+ }
+ else{
+ const value_type &v = this->priv_value_from_slist_node(i.pointed_node());
+ hash_value = this->priv_stored_or_compute_hash(v, store_hash_t());
+ }
+
+ //Now calculate the new bucket position
+ const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>
+ (hash_value, new_bucket_count, new_bucket_count);
+
+ //Update first used bucket cache
+ if(cache_begin && new_n < new_first_bucket_num)
+ new_first_bucket_num = new_n;
+
+ //If the target bucket is new, transfer the whole group
+ siterator const last = (priv_last_in_group)(i);
+
+ if(same_buffer && new_n == n){
+ before_i = last;
+ }
+ else{
+ bucket_type &new_b = new_buckets[new_n];
+ new_b.splice_after(new_b.before_begin(), old_bucket, before_i, last);
+ }
+ }
+ }
+ else{
+ const size_type new_n = detail::hash_to_bucket_split<power_2_buckets, incremental>(n, new_bucket_count, new_bucket_count);
+ if(cache_begin && new_n < new_first_bucket_num)
+ new_first_bucket_num = new_n;
+ bucket_type &new_b = new_buckets[new_n];
+ new_b.splice_after( new_b.before_begin()
+ , old_bucket
+ , old_bucket.before_begin()
+ , bucket_plus_vtraits_t::priv_get_last(old_bucket, optimize_multikey_t()));
+ }
+ }
+
+ this->priv_size_traits().set_size(size_backup);
+ this->priv_split_traits().set_size(new_bucket_count);
+ if(&new_bucket_traits != &this->priv_bucket_traits()){
+ this->priv_bucket_traits() = new_bucket_traits;
+ }
+ this->priv_initialize_cache();
+ this->priv_insertion_update_cache(new_first_bucket_num);
+ rollback1.release();
+ rollback2.release();
+ }
+
+ template <class MaybeConstHashtableImpl, class Cloner, class Disposer>
+ void priv_clone_from(MaybeConstHashtableImpl &src, Cloner cloner, Disposer disposer)
+ {
+ this->clear_and_dispose(disposer);
+ if(!constant_time_size || !src.empty()){
+ const size_type src_bucket_count = src.bucket_count();
+ const size_type dst_bucket_count = this->bucket_count();
+ //Check power of two bucket array if the option is activated
+ BOOST_INTRUSIVE_INVARIANT_ASSERT
+ (!power_2_buckets || (0 == (src_bucket_count & (src_bucket_count-1))));
+ BOOST_INTRUSIVE_INVARIANT_ASSERT
+ (!power_2_buckets || (0 == (dst_bucket_count & (dst_bucket_count-1))));
+ //If src bucket count is bigger or equal, structural copy is possible
+ const bool structural_copy = (!incremental) && (src_bucket_count >= dst_bucket_count) &&
+ (power_2_buckets || (src_bucket_count % dst_bucket_count) == 0);
+ if(structural_copy){
+ this->priv_structural_clone_from(src, cloner, disposer);
+ }
+ else{
+ //Unlike previous cloning algorithm, this can throw
+ //if cloner, hasher or comparison functor throw
+ typedef typename detail::if_c< detail::is_const<MaybeConstHashtableImpl>::value
+ , typename MaybeConstHashtableImpl::const_iterator
+ , typename MaybeConstHashtableImpl::iterator
+ >::type clone_iterator;
+ clone_iterator b(src.begin()), e(src.end());
+ detail::exception_disposer<hashtable_impl, Disposer> rollback(*this, disposer);
+ for(; b != e; ++b){
+ //No need to check for duplicates and insert it in the first position
+ //as this is an unordered container. So use minimal insertion code
+ std::size_t const hash_to_store = this->priv_stored_or_compute_hash(*b, store_hash_t());;
+ size_type const bucket_number = this->priv_hash_to_bucket(hash_to_store);
+ typedef typename detail::if_c
+ <detail::is_const<MaybeConstHashtableImpl>::value, const_reference, reference>::type reference_type;
+ reference_type r = *b;
+ this->priv_clone_front_in_bucket<reference_type>(bucket_number, r, hash_to_store, cloner);
+ }
+ rollback.release();
+ }
+ }
+ }
+
+ template<class ValueReference, class Cloner>
+ void priv_clone_front_in_bucket( size_type const bucket_number
+ , typename detail::identity<ValueReference>::type src_ref
+ , std::size_t const hash_to_store, Cloner cloner)
+ {
+ //No need to check for duplicates and insert it in the first position
+ //as this is an unordered container. So use minimal insertion code
+ //std::size_t const hash_value = this->priv_stored_or_compute_hash(src_ref, store_hash_t());;
+ //size_type const bucket_number = this->priv_hash_to_bucket(hash_value);
+ bucket_type &cur_bucket = this->priv_bucket_pointer()[bucket_number];
+ siterator const prev(cur_bucket.before_begin());
+ //Just check if the cloned node is equal to the first inserted value in the new bucket
+ //as equal src values were contiguous and they should be already inserted in the
+ //destination bucket.
+ bool const next_is_in_group = optimize_multikey && !cur_bucket.empty() &&
+ this->priv_equal()( key_of_value()(src_ref)
+ , key_of_value()(this->priv_value_from_slist_node((++siterator(prev)).pointed_node())));
+ this->priv_insert_equal_after_find(*cloner(src_ref), bucket_number, hash_to_store, prev, next_is_in_group);
+ }
+
+ template <class MaybeConstHashtableImpl, class Cloner, class Disposer>
+ void priv_structural_clone_from(MaybeConstHashtableImpl &src, Cloner cloner, Disposer disposer)
+ {
+ //First clone the first ones
+ const size_type src_bucket_count = src.bucket_count();
+ const size_type dst_bucket_count = this->bucket_count();
+ const bucket_ptr src_buckets = src.priv_bucket_pointer();
+ const bucket_ptr dst_buckets = this->priv_bucket_pointer();
+ size_type constructed = 0;
+ typedef node_cast_adaptor< detail::node_disposer<Disposer, value_traits, CircularSListAlgorithms>
+ , slist_node_ptr, node_ptr > NodeDisposer;
+ NodeDisposer node_disp(disposer, &this->priv_value_traits());
+
+ detail::exception_array_disposer<bucket_type, NodeDisposer, size_type>
+ rollback(dst_buckets[0], node_disp, constructed);
+ //Now insert the remaining ones using the modulo trick
+ for( //"constructed" already initialized
+ ; constructed < src_bucket_count
+ ; ++constructed){
+ //Since incremental hashing can't be structurally copied, avoid hash_to_bucket_split
+ const std::size_t new_n = detail::hash_to_bucket(constructed, dst_bucket_count, detail::bool_<power_2_buckets>());
+ bucket_type &src_b = src_buckets[constructed];
+ for( siterator b(src_b.begin()), e(src_b.end()); b != e; ++b){
+ slist_node_ptr const n(b.pointed_node());
+ typedef typename detail::if_c
+ <detail::is_const<MaybeConstHashtableImpl>::value, const_reference, reference>::type reference_type;
+ reference_type r = this->priv_value_from_slist_node(n);
+ this->priv_clone_front_in_bucket<reference_type>
+ (new_n, r, this->priv_stored_hash(n, store_hash_t()), cloner);
+ }
+ }
+ this->priv_hasher() = src.priv_hasher();
+ this->priv_equal() = src.priv_equal();
+ rollback.release();
+ this->priv_size_traits().set_size(src.priv_size_traits().get_size());
+ this->priv_split_traits().set_size(dst_bucket_count);
+ this->priv_insertion_update_cache(0u);
+ this->priv_erasure_update_cache();
+ }
+
+ std::size_t priv_hash_to_bucket(std::size_t hash_value) const
+ {
+ return detail::hash_to_bucket_split<power_2_buckets, incremental>
+ (hash_value, this->priv_bucket_traits().bucket_count(), this->priv_split_traits().get_size());
+ }
+
+ iterator priv_insert_equal_after_find(reference value, size_type bucket_num, std::size_t hash_value, siterator prev, bool const next_is_in_group)
+ {
+ //Now store hash if needed
+ node_ptr n = pointer_traits<node_ptr>::pointer_to(this->priv_value_to_node(value));
+ node_functions_t::store_hash(n, hash_value, store_hash_t());
+ //Checks for some modes
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::unique(n));
+ //Shortcut to optimize_multikey cases
+ group_functions_t::insert_in_group
+ ( next_is_in_group ? detail::dcast_bucket_ptr<node>((++siterator(prev)).pointed_node()) : n
+ , n, optimize_multikey_t());
+ //Update cache and increment size if needed
+ this->priv_insertion_update_cache(bucket_num);
+ this->priv_size_traits().increment();
+ //Insert the element in the bucket after it
+ return iterator(bucket_type::s_insert_after(prev, *n), &this->get_bucket_value_traits());
+ }
+
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ siterator priv_find //In case it is not found previt is bucket.before_begin()
+ ( const KeyType &key, KeyHasher hash_func
+ , KeyEqual equal_func, size_type &bucket_number, std::size_t &h, siterator &previt) const
+ {
+ h = hash_func(key);
+ return this->priv_find_with_hash(key, equal_func, bucket_number, h, previt);
+ }
+
+ template<class KeyType, class KeyEqual>
+ bool priv_is_value_equal_to_key(const value_type &v, const std::size_t h, const KeyType &key, KeyEqual equal_func) const
+ {
+ (void)h;
+ return (!compare_hash || this->priv_stored_or_compute_hash(v, store_hash_t()) == h) && equal_func(key, key_of_value()(v));
+ }
+
+ //return previous iterator to the next equal range group in case
+ static siterator priv_last_in_group(const siterator &it_first_in_group)
+ {
+ return bucket_type::s_iterator_to
+ (*group_functions_t::get_last_in_group
+ (detail::dcast_bucket_ptr<node>(it_first_in_group.pointed_node()), optimize_multikey_t()));
+ }
+
+ template<class KeyType, class KeyEqual>
+ siterator priv_find_with_hash //In case it is not found previt is bucket.before_begin()
+ ( const KeyType &key, KeyEqual equal_func, size_type &bucket_number, const std::size_t h, siterator &previt) const
+ {
+ bucket_number = this->priv_hash_to_bucket(h);
+ bucket_type &b = this->priv_bucket_pointer()[bucket_number];
+ previt = b.before_begin();
+ siterator it = previt;
+ siterator const endit = b.end();
+
+ while(++it != endit){
+ if(this->priv_is_value_equal_to_key(this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func)){
+ return it;
+ }
+ previt = it = (priv_last_in_group)(it);
+ }
+ previt = b.before_begin();
+ return this->priv_invalid_local_it();
+ }
+
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<siterator, siterator> priv_local_equal_range
+ ( const KeyType &key
+ , KeyHasher hash_func
+ , KeyEqual equal_func
+ , size_type &found_bucket
+ , size_type &cnt) const
+ {
+ size_type internal_cnt = 0;
+ //Let's see if the element is present
+
+ siterator prev;
+ size_type n_bucket;
+ std::size_t h;
+ std::pair<siterator, siterator> to_return
+ ( this->priv_find(key, hash_func, equal_func, n_bucket, h, prev)
+ , this->priv_invalid_local_it());
+
+ if(to_return.first != to_return.second){
+ found_bucket = n_bucket;
+ //If it's present, find the first that it's not equal in
+ //the same bucket
+ bucket_type &b = this->priv_bucket_pointer()[n_bucket];
+ siterator it = to_return.first;
+ ++internal_cnt; //At least one is found
+ if(optimize_multikey){
+ to_return.second = ++(priv_last_in_group)(it);
+ internal_cnt += boost::intrusive::iterator_distance(++it, to_return.second);
+ }
+ else{
+ siterator const bend = b.end();
+ while(++it != bend &&
+ this->priv_is_value_equal_to_key(this->priv_value_from_slist_node(it.pointed_node()), h, key, equal_func)){
+ ++internal_cnt;
+ }
+ to_return.second = it;
+ }
+ }
+ cnt = internal_cnt;
+ return to_return;
+ }
+
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<siterator, siterator> priv_equal_range
+ ( const KeyType &key
+ , KeyHasher hash_func
+ , KeyEqual equal_func) const
+ {
+ size_type n_bucket;
+ size_type cnt;
+
+ //Let's see if the element is present
+ std::pair<siterator, siterator> to_return
+ (this->priv_local_equal_range(key, hash_func, equal_func, n_bucket, cnt));
+ //If not, find the next element as ".second" if ".second" local iterator
+ //is not pointing to an element.
+ bucket_ptr const bp = this->priv_bucket_pointer();
+ if(to_return.first != to_return.second &&
+ to_return.second == bp[n_bucket].end()){
+ to_return.second = this->priv_invalid_local_it();
+ ++n_bucket;
+ for( const size_type max_bucket = this->bucket_count()
+ ; n_bucket != max_bucket
+ ; ++n_bucket){
+ bucket_type &b = bp[n_bucket];
+ if(!b.empty()){
+ to_return.second = b.begin();
+ break;
+ }
+ }
+ }
+ return to_return;
+ }
+
+ std::size_t priv_get_bucket_num(siterator it)
+ { return this->priv_get_bucket_num_hash_dispatch(it, store_hash_t()); }
+
+ std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::true_) //store_hash
+ {
+ return this->priv_hash_to_bucket
+ (this->priv_stored_hash(it.pointed_node(), store_hash_t()));
+ }
+
+ std::size_t priv_get_bucket_num_hash_dispatch(siterator it, detail::false_) //NO store_hash
+ { return this->priv_get_bucket_num_no_hash_store(it, optimize_multikey_t()); }
+
+ static siterator priv_get_previous(bucket_type &b, siterator i)
+ { return bucket_plus_vtraits_t::priv_get_previous(b, i, optimize_multikey_t()); }
+
+ /// @endcond
+};
+
+/// @cond
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template < class T
+ , bool UniqueKeys
+ , class PackedOptions
+ >
+#else
+template <class T, bool UniqueKeys, class ...Options>
+#endif
+struct make_bucket_traits
+{
+ //Real value traits must be calculated from options
+ typedef typename detail::get_value_traits
+ <T, typename PackedOptions::proto_value_traits>::type value_traits;
+
+ typedef typename PackedOptions::bucket_traits specified_bucket_traits;
+
+ //Real bucket traits must be calculated from options and calculated value_traits
+ typedef typename detail::get_slist_impl
+ <typename detail::reduced_slist_node_traits
+ <typename value_traits::node_traits>::type
+ >::type slist_impl;
+
+ typedef typename
+ detail::if_c< detail::is_same
+ < specified_bucket_traits
+ , default_bucket_traits
+ >::value
+ , detail::bucket_traits_impl<slist_impl>
+ , specified_bucket_traits
+ >::type type;
+};
+/// @endcond
+
+//! Helper metafunction to define a \c hashtable that yields to the same type when the
+//! same options (either explicitly or implicitly) are used.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class T, class ...Options>
+#else
+template<class T, class O1 = void, class O2 = void
+ , class O3 = void, class O4 = void
+ , class O5 = void, class O6 = void
+ , class O7 = void, class O8 = void
+ , class O9 = void, class O10= void
+ >
+#endif
+struct make_hashtable
+{
+ /// @cond
+ typedef typename pack_options
+ < hashtable_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef typename detail::get_value_traits
+ <T, typename packed_options::proto_value_traits>::type value_traits;
+
+ typedef typename make_bucket_traits
+ <T, false, packed_options>::type bucket_traits;
+
+ typedef hashtable_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::hash
+ , typename packed_options::equal
+ , bucket_traits
+ , typename packed_options::size_type
+ , (std::size_t(false)*hash_bool_flags::unique_keys_pos)
+ |(std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
+ |(std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
+ |(std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
+ |(std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
+ |(std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
+ > implementation_defined;
+
+ /// @endcond
+ typedef implementation_defined type;
+};
+
+#if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+#if defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class T, class ...Options>
+#else
+template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
+#endif
+class hashtable
+ : public make_hashtable<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_hashtable<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type Base;
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(hashtable)
+
+ public:
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::bucket_ptr bucket_ptr;
+ typedef typename Base::size_type size_type;
+ typedef typename Base::hasher hasher;
+ typedef typename Base::bucket_traits bucket_traits;
+ typedef typename Base::key_equal key_equal;
+
+ //Assert if passed value traits are compatible with the type
+ BOOST_STATIC_ASSERT((detail::is_same<typename value_traits::value_type, T>::value));
+
+ BOOST_INTRUSIVE_FORCEINLINE explicit hashtable ( const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : Base(b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable(BOOST_RV_REF(hashtable) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE hashtable& operator=(BOOST_RV_REF(hashtable) x)
+ { return static_cast<hashtable&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const hashtable &src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(src, cloner, disposer); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(hashtable) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_HASHTABLE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/intrusive_fwd.hpp b/src/third_party/boost-1.69.0/boost/intrusive/intrusive_fwd.hpp
index f51276d636e..f51276d636e 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/intrusive_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/intrusive_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/linear_slist_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/linear_slist_algorithms.hpp
new file mode 100644
index 00000000000..6aeb036ab52
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/linear_slist_algorithms.hpp
@@ -0,0 +1,342 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/common_slist_algorithms.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <cstddef>
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+//! linear_slist_algorithms provides basic algorithms to manipulate nodes
+//! forming a linear singly linked list.
+//!
+//! linear_slist_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the linear list
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_next(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_next(node_ptr n, node_ptr next);</tt>
+template<class NodeTraits>
+class linear_slist_algorithms
+ /// @cond
+ : public detail::common_slist_algorithms<NodeTraits>
+ /// @endcond
+{
+ /// @cond
+ typedef detail::common_slist_algorithms<NodeTraits> base_t;
+ /// @endcond
+ public:
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+ typedef NodeTraits node_traits;
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Constructs an non-used list element, putting the next
+ //! pointer to null:
+ //! <tt>NodeTraits::get_next(this_node) == node_ptr()</tt>
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void init(const node_ptr & this_node);
+
+ //! <b>Requires</b>: this_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Returns true is "this_node" is the only node of a circular list:
+ //! or it's a not inserted node:
+ //! <tt>return node_ptr() == NodeTraits::get_next(this_node) || NodeTraits::get_next(this_node) == this_node</tt>
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static bool unique(const_node_ptr this_node);
+
+ //! <b>Effects</b>: Returns true is "this_node" has the same state as if
+ //! it was inited using "init(node_ptr)"
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static bool inited(const_node_ptr this_node);
+
+ //! <b>Requires</b>: prev_node must be in a circular list or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the next node of prev_node from the circular list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void unlink_after(const node_ptr & prev_node);
+
+ //! <b>Requires</b>: prev_node and last_node must be in a circular list
+ //! or be an empty circular list.
+ //!
+ //! <b>Effects</b>: Unlinks the range (prev_node, last_node) from the linear list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void unlink_after(const node_ptr & prev_node, const node_ptr & last_node);
+
+ //! <b>Requires</b>: prev_node must be a node of a linear list.
+ //!
+ //! <b>Effects</b>: Links this_node after prev_node in the linear list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void link_after(const node_ptr & prev_node, const node_ptr & this_node);
+
+ //! <b>Requires</b>: b and e must be nodes of the same linear list or an empty range.
+ //! and p must be a node of a different linear list.
+ //!
+ //! <b>Effects</b>: Removes the nodes from (b, e] range from their linear list and inserts
+ //! them after p in p's linear list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void transfer_after(const node_ptr & p, const node_ptr & b, const node_ptr & e);
+
+ #endif //#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+
+ //! <b>Effects</b>: Constructs an empty list, making this_node the only
+ //! node of the circular list:
+ //! <tt>NodeTraits::get_next(this_node) == this_node</tt>.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static void init_header(const node_ptr & this_node)
+ { NodeTraits::set_next(this_node, node_ptr ()); }
+
+ //! <b>Requires</b>: this_node and prev_init_node must be in the same linear list.
+ //!
+ //! <b>Effects</b>: Returns the previous node of this_node in the linear list starting.
+ //! the search from prev_init_node. The first node checked for equality
+ //! is NodeTraits::get_next(prev_init_node).
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements between prev_init_node and this_node.
+ //!
+ //! <b>Throws</b>: Nothing.
+ BOOST_INTRUSIVE_FORCEINLINE static node_ptr get_previous_node(const node_ptr & prev_init_node, const node_ptr & this_node)
+ { return base_t::get_previous_node(prev_init_node, this_node); }
+
+ //! <b>Requires</b>: this_node must be in a linear list or be an empty linear list.
+ //!
+ //! <b>Effects</b>: Returns the number of nodes in a linear list. If the linear list
+ //! is empty, returns 1.
+ //!
+ //! <b>Complexity</b>: Linear
+ //!
+ //! <b>Throws</b>: Nothing.
+ static std::size_t count(const const_node_ptr & this_node)
+ {
+ std::size_t result = 0;
+ const_node_ptr p = this_node;
+ do{
+ p = NodeTraits::get_next(p);
+ ++result;
+ } while (p);
+ return result;
+ }
+
+ //! <b>Requires</b>: this_node and other_node must be nodes inserted
+ //! in linear lists or be empty linear lists.
+ //!
+ //! <b>Effects</b>: Moves all the nodes previously chained after this_node after other_node
+ //! and vice-versa.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ static void swap_trailing_nodes(node_ptr this_node, node_ptr other_node)
+ {
+ node_ptr this_nxt = NodeTraits::get_next(this_node);
+ node_ptr other_nxt = NodeTraits::get_next(other_node);
+ NodeTraits::set_next(this_node, other_nxt);
+ NodeTraits::set_next(other_node, this_nxt);
+ }
+
+ //! <b>Effects</b>: Reverses the order of elements in the list.
+ //!
+ //! <b>Returns</b>: The new first node of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: This function is linear to the contained elements.
+ static node_ptr reverse(node_ptr p)
+ {
+ if(!p) return node_ptr();
+ node_ptr i = NodeTraits::get_next(p);
+ node_ptr first(p);
+ while(i){
+ node_ptr nxti(NodeTraits::get_next(i));
+ base_t::unlink_after(p);
+ NodeTraits::set_next(i, first);
+ first = i;
+ i = nxti;
+ }
+ return first;
+ }
+
+ //! <b>Effects</b>: Moves the first n nodes starting at p to the end of the list.
+ //!
+ //! <b>Returns</b>: A pair containing the new first and last node of the list or
+ //! if there has been any movement, a null pair if n leads to no movement.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
+ static std::pair<node_ptr, node_ptr> move_first_n_backwards(node_ptr p, std::size_t n)
+ {
+ std::pair<node_ptr, node_ptr> ret;
+ //Null shift, or count() == 0 or 1, nothing to do
+ if(!n || !p || !NodeTraits::get_next(p)){
+ return ret;
+ }
+
+ node_ptr first = p;
+ bool end_found = false;
+ node_ptr new_last = node_ptr();
+ node_ptr old_last = node_ptr();
+
+ //Now find the new last node according to the shift count.
+ //If we find 0 before finding the new last node
+ //unlink p, shortcut the search now that we know the size of the list
+ //and continue.
+ for(std::size_t i = 1; i <= n; ++i){
+ new_last = first;
+ first = NodeTraits::get_next(first);
+ if(first == node_ptr()){
+ //Shortcut the shift with the modulo of the size of the list
+ n %= i;
+ if(!n) return ret;
+ old_last = new_last;
+ i = 0;
+ //Unlink p and continue the new first node search
+ first = p;
+ //unlink_after(new_last);
+ end_found = true;
+ }
+ }
+
+ //If the p has not been found in the previous loop, find it
+ //starting in the new first node and unlink it
+ if(!end_found){
+ old_last = base_t::get_previous_node(first, node_ptr());
+ }
+
+ //Now link p after the new last node
+ NodeTraits::set_next(old_last, p);
+ NodeTraits::set_next(new_last, node_ptr());
+ ret.first = first;
+ ret.second = new_last;
+ return ret;
+ }
+
+ //! <b>Effects</b>: Moves the first n nodes starting at p to the beginning of the list.
+ //!
+ //! <b>Returns</b>: A pair containing the new first and last node of the list or
+ //! if there has been any movement, a null pair if n leads to no movement.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements plus the number moved positions.
+ static std::pair<node_ptr, node_ptr> move_first_n_forward(node_ptr p, std::size_t n)
+ {
+ std::pair<node_ptr, node_ptr> ret;
+ //Null shift, or count() == 0 or 1, nothing to do
+ if(!n || !p || !NodeTraits::get_next(p))
+ return ret;
+
+ node_ptr first = p;
+
+ //Iterate until p is found to know where the current last node is.
+ //If the shift count is less than the size of the list, we can also obtain
+ //the position of the new last node after the shift.
+ node_ptr old_last(first), next_to_it, new_last(p);
+ std::size_t distance = 1;
+ while(!!(next_to_it = node_traits::get_next(old_last))){
+ if(distance++ > n)
+ new_last = node_traits::get_next(new_last);
+ old_last = next_to_it;
+ }
+ //If the shift was bigger or equal than the size, obtain the equivalent
+ //forward shifts and find the new last node.
+ if(distance <= n){
+ //Now find the equivalent forward shifts.
+ //Shortcut the shift with the modulo of the size of the list
+ std::size_t new_before_last_pos = (distance - (n % distance))% distance;
+ //If the shift is a multiple of the size there is nothing to do
+ if(!new_before_last_pos)
+ return ret;
+
+ for( new_last = p
+ ; --new_before_last_pos
+ ; new_last = node_traits::get_next(new_last)){
+ //empty
+ }
+ }
+
+ //Get the first new node
+ node_ptr new_first(node_traits::get_next(new_last));
+ //Now put the old beginning after the old end
+ NodeTraits::set_next(old_last, p);
+ NodeTraits::set_next(new_last, node_ptr());
+ ret.first = new_first;
+ ret.second = new_last;
+ return ret;
+ }
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<LinearSListAlgorithms, NodeTraits>
+{
+ typedef linear_slist_algorithms<NodeTraits> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_LINEAR_SLIST_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/link_mode.hpp b/src/third_party/boost-1.69.0/boost/intrusive/link_mode.hpp
index 4ba4daff7d7..4ba4daff7d7 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/link_mode.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/link_mode.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/list.hpp b/src/third_party/boost-1.69.0/boost/intrusive/list.hpp
index 71eac5c42e7..71eac5c42e7 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/list_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/list_hook.hpp
index 892e4e20d7d..892e4e20d7d 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/list_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/list_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/member_value_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/member_value_traits.hpp
index 0ab7ffb1122..0ab7ffb1122 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/member_value_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/member_value_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/options.hpp b/src/third_party/boost-1.69.0/boost/intrusive/options.hpp
index 6523ffb5742..6523ffb5742 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/options.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/options.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/pack_options.hpp b/src/third_party/boost-1.69.0/boost/intrusive/pack_options.hpp
index 944243f661c..944243f661c 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/pack_options.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/pack_options.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/parent_from_member.hpp b/src/third_party/boost-1.69.0/boost/intrusive/parent_from_member.hpp
index a9a9293c7ca..a9a9293c7ca 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/parent_from_member.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/parent_from_member.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/pointer_plus_bits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/pointer_plus_bits.hpp
index 2130f3c41c3..2130f3c41c3 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/pointer_plus_bits.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/pointer_plus_bits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/pointer_rebind.hpp b/src/third_party/boost-1.69.0/boost/intrusive/pointer_rebind.hpp
index 9592e06e1de..9592e06e1de 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/pointer_rebind.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/pointer_rebind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/pointer_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/pointer_traits.hpp
index 4216c7ee9ca..4216c7ee9ca 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/pointer_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/pointer_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/priority_compare.hpp b/src/third_party/boost-1.69.0/boost/intrusive/priority_compare.hpp
index f5589ce27b2..f5589ce27b2 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/priority_compare.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/priority_compare.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/rbtree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/rbtree.hpp
index 4f5d86dd6aa..4f5d86dd6aa 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/rbtree.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/rbtree.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/rbtree_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/rbtree_algorithms.hpp
new file mode 100644
index 00000000000..ee5e13a7aab
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/rbtree_algorithms.hpp
@@ -0,0 +1,622 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2014.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+//
+// The tree destruction algorithm is based on Julienne Walker and The EC Team code:
+//
+// This code is in the public domain. Anyone may use it or change it in any way that
+// they see fit. The author assumes no responsibility for damages incurred through
+// use of the original code or any variations thereof.
+//
+// It is requested, but not required, that due credit is given to the original author
+// and anyone who has modified the code through a header comment, such as this one.
+
+#ifndef BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <cstddef>
+
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/intrusive/bstree_algorithms.hpp>
+#include <boost/intrusive/detail/ebo_functor_holder.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+template<class NodeTraits, class F>
+struct rbtree_node_cloner
+ //Use public inheritance to avoid MSVC bugs with closures
+ : public detail::ebo_functor_holder<F>
+{
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef detail::ebo_functor_holder<F> base_t;
+
+ explicit rbtree_node_cloner(F f)
+ : base_t(f)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE node_ptr operator()(node_ptr p)
+ {
+ node_ptr n = base_t::get()(p);
+ NodeTraits::set_color(n, NodeTraits::get_color(p));
+ return n;
+ }
+};
+
+namespace detail {
+
+template<class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct rbtree_node_checker
+ : public bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker>
+{
+ typedef bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> base_checker_t;
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+ typedef typename node_traits::node_ptr node_ptr;
+
+ struct return_type
+ : public base_checker_t::return_type
+ {
+ return_type() : black_count_(0) {}
+ std::size_t black_count_;
+ };
+
+ rbtree_node_checker(const NodePtrCompare& comp, ExtraChecker extra_checker)
+ : base_checker_t(comp, extra_checker)
+ {}
+
+ void operator () (const const_node_ptr& p,
+ const return_type& check_return_left, const return_type& check_return_right,
+ return_type& check_return)
+ {
+
+ if (node_traits::get_color(p) == node_traits::red()){
+ //Red nodes have black children
+ const node_ptr p_left(node_traits::get_left(p)); (void)p_left;
+ const node_ptr p_right(node_traits::get_right(p)); (void)p_right;
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(!p_left || node_traits::get_color(p_left) == node_traits::black());
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(!p_right || node_traits::get_color(p_right) == node_traits::black());
+ //Red node can't be root
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_parent(node_traits::get_parent(p)) != p);
+ }
+ //Every path to p contains the same number of black nodes
+ const std::size_t l_black_count = check_return_left.black_count_;
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(l_black_count == check_return_right.black_count_);
+ check_return.black_count_ = l_black_count +
+ static_cast<std::size_t>(node_traits::get_color(p) == node_traits::black());
+ base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
+ }
+};
+
+} // namespace detail
+
+#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+//! rbtree_algorithms provides basic algorithms to manipulate
+//! nodes forming a red-black tree. The insertion and deletion algorithms are
+//! based on those in Cormen, Leiserson, and Rivest, Introduction to Algorithms
+//! (MIT Press, 1990), except that
+//!
+//! (1) the header node is maintained with links not only to the root
+//! but also to the leftmost node of the tree, to enable constant time
+//! begin(), and to the rightmost node of the tree, to enable linear time
+//! performance when used with the generic set algorithms (set_union,
+//! etc.);
+//!
+//! (2) when a node being deleted has two children its successor node is
+//! relinked into its place, rather than copied, so that the only
+//! pointers invalidated are those referring to the deleted node.
+//!
+//! rbtree_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the binary search tree
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <tt>color</tt>: The type that can store the color of a node
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
+//!
+//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
+//!
+//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
+//!
+//! <tt>static color get_color(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_color(node_ptr n, color c);</tt>
+//!
+//! <tt>static color black();</tt>
+//!
+//! <tt>static color red();</tt>
+template<class NodeTraits>
+class rbtree_algorithms
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_algorithms<NodeTraits>
+ #endif
+{
+ public:
+ typedef NodeTraits node_traits;
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+ typedef typename NodeTraits::color color;
+
+ /// @cond
+ private:
+
+ typedef bstree_algorithms<NodeTraits> bstree_algo;
+
+ /// @endcond
+
+ public:
+
+ //! This type is the information that will be
+ //! filled by insert_unique_check
+ typedef typename bstree_algo::insert_commit_data insert_commit_data;
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
+ static node_ptr get_header(const const_node_ptr & n);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
+ static node_ptr begin_node(const const_node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
+ static node_ptr end_node(const const_node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
+ static void swap_tree(node_ptr header1, node_ptr header2);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr node2)
+ {
+ if(node1 == node2)
+ return;
+
+ node_ptr header1(bstree_algo::get_header(node1)), header2(bstree_algo::get_header(node2));
+ swap_nodes(node1, header1, node2, header2);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2)
+ {
+ if(node1 == node2) return;
+
+ bstree_algo::swap_nodes(node1, header1, node2, header2);
+ //Swap color
+ color c = NodeTraits::get_color(node1);
+ NodeTraits::set_color(node1, NodeTraits::get_color(node2));
+ NodeTraits::set_color(node2, c);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node)
+ {
+ if(node_to_be_replaced == new_node)
+ return;
+ replace_node(node_to_be_replaced, bstree_algo::get_header(node_to_be_replaced), new_node);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node)
+ {
+ bstree_algo::replace_node(node_to_be_replaced, header, new_node);
+ NodeTraits::set_color(new_node, NodeTraits::get_color(node_to_be_replaced));
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
+ static void unlink(const node_ptr& node)
+ {
+ node_ptr x = NodeTraits::get_parent(node);
+ if(x){
+ while(!is_header(x))
+ x = NodeTraits::get_parent(x);
+ erase(x, node);
+ }
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
+ static node_ptr unlink_leftmost_without_rebalance(const node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
+ static bool unique(const const_node_ptr & node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
+ static std::size_t size(const const_node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
+ static node_ptr next_node(const node_ptr & node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
+ static node_ptr prev_node(const node_ptr & node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
+ static void init(const node_ptr & node);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
+ static void init_header(node_ptr header)
+ {
+ bstree_algo::init_header(header);
+ NodeTraits::set_color(header, NodeTraits::red());
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
+ static node_ptr erase(node_ptr header, node_ptr z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bstree_algo::erase(header, z, info);
+ rebalance_after_erasure(header, z, info);
+ return z;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare>
+ static bool transfer_unique
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bool const transferred = bstree_algo::transfer_unique(header1, comp, header2, z, info);
+ if(transferred){
+ rebalance_after_erasure(header2, z, info);
+ rebalance_after_insertion(header1, z);
+ }
+ return transferred;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare>
+ static void transfer_equal
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z)
+ {
+ typename bstree_algo::data_for_rebalance info;
+ bstree_algo::transfer_equal(header1, comp, header2, z, info);
+ rebalance_after_erasure(header2, z, info);
+ rebalance_after_insertion(header1, z);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ static void clone
+ (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer)
+ {
+ rbtree_node_cloner<NodeTraits, Cloner> new_cloner(cloner);
+ bstree_algo::clone(source_header, target_header, new_cloner, disposer);
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
+ template<class Disposer>
+ static void clear_and_dispose(const node_ptr & header, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr lower_bound
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr upper_bound
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr find
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> equal_range
+ (const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> bounded_range
+ (const const_node_ptr & header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
+ , bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::size_t count(const const_node_ptr & header, const KeyType &key, KeyNodePtrCompare comp);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare>
+ static node_ptr insert_equal_upper_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp)
+ {
+ bstree_algo::insert_equal_upper_bound(h, new_node, comp);
+ rebalance_after_insertion(h, new_node);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_lower_bound(node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare>
+ static node_ptr insert_equal_lower_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp)
+ {
+ bstree_algo::insert_equal_lower_bound(h, new_node, comp);
+ rebalance_after_insertion(h, new_node);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal(node_ptr,node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare>
+ static node_ptr insert_equal
+ (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp)
+ {
+ bstree_algo::insert_equal(header, hint, new_node, comp);
+ rebalance_after_insertion(header, new_node);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(node_ptr,node_ptr,node_ptr)
+ static node_ptr insert_before
+ (node_ptr header, node_ptr pos, node_ptr new_node)
+ {
+ bstree_algo::insert_before(header, pos, new_node);
+ rebalance_after_insertion(header, new_node);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::push_back(node_ptr,node_ptr)
+ static void push_back(node_ptr header, node_ptr new_node)
+ {
+ bstree_algo::push_back(header, new_node);
+ rebalance_after_insertion(header, new_node);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::push_front(node_ptr,node_ptr)
+ static void push_front(node_ptr header, node_ptr new_node)
+ {
+ bstree_algo::push_front(header, new_node);
+ rebalance_after_insertion(header, new_node);
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const_node_ptr header, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const_node_ptr header, node_ptr hint, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(node_ptr,node_ptr,const insert_commit_data&)
+ static void insert_unique_commit
+ (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data)
+ {
+ bstree_algo::insert_unique_commit(header, new_value, commit_data);
+ rebalance_after_insertion(header, new_value);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
+ static bool is_header(const const_node_ptr & p)
+ {
+ return NodeTraits::get_color(p) == NodeTraits::red() &&
+ bstree_algo::is_header(p);
+ }
+
+ /// @cond
+ private:
+
+ static void rebalance_after_erasure
+ ( node_ptr header, node_ptr z, const typename bstree_algo::data_for_rebalance &info)
+ {
+ color new_z_color;
+ if(info.y != z){
+ new_z_color = NodeTraits::get_color(info.y);
+ NodeTraits::set_color(info.y, NodeTraits::get_color(z));
+ }
+ else{
+ new_z_color = NodeTraits::get_color(z);
+ }
+ //Rebalance rbtree if needed
+ if(new_z_color != NodeTraits::red()){
+ rebalance_after_erasure_restore_invariants(header, info.x, info.x_parent);
+ }
+ }
+
+ static void rebalance_after_erasure_restore_invariants(node_ptr header, node_ptr x, node_ptr x_parent)
+ {
+ while(1){
+ if(x_parent == header || (x && NodeTraits::get_color(x) != NodeTraits::black())){
+ break;
+ }
+ //Don't cache x_is_leftchild or similar because x can be null and
+ //equal to both x_parent_left and x_parent_right
+ const node_ptr x_parent_left(NodeTraits::get_left(x_parent));
+ if(x == x_parent_left){ //x is left child
+ node_ptr w = NodeTraits::get_right(x_parent);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
+ if(NodeTraits::get_color(w) == NodeTraits::red()){
+ NodeTraits::set_color(w, NodeTraits::black());
+ NodeTraits::set_color(x_parent, NodeTraits::red());
+ bstree_algo::rotate_left(x_parent, w, NodeTraits::get_parent(x_parent), header);
+ w = NodeTraits::get_right(x_parent);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
+ }
+ node_ptr const w_left (NodeTraits::get_left(w));
+ node_ptr const w_right(NodeTraits::get_right(w));
+ if((!w_left || NodeTraits::get_color(w_left) == NodeTraits::black()) &&
+ (!w_right || NodeTraits::get_color(w_right) == NodeTraits::black())){
+ NodeTraits::set_color(w, NodeTraits::red());
+ x = x_parent;
+ x_parent = NodeTraits::get_parent(x_parent);
+ }
+ else {
+ if(!w_right || NodeTraits::get_color(w_right) == NodeTraits::black()){
+ NodeTraits::set_color(w_left, NodeTraits::black());
+ NodeTraits::set_color(w, NodeTraits::red());
+ bstree_algo::rotate_right(w, w_left, NodeTraits::get_parent(w), header);
+ w = NodeTraits::get_right(x_parent);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
+ }
+ NodeTraits::set_color(w, NodeTraits::get_color(x_parent));
+ NodeTraits::set_color(x_parent, NodeTraits::black());
+ const node_ptr new_wright(NodeTraits::get_right(w));
+ if(new_wright)
+ NodeTraits::set_color(new_wright, NodeTraits::black());
+ bstree_algo::rotate_left(x_parent, NodeTraits::get_right(x_parent), NodeTraits::get_parent(x_parent), header);
+ break;
+ }
+ }
+ else {
+ // same as above, with right_ <-> left_.
+ node_ptr w = x_parent_left;
+ if(NodeTraits::get_color(w) == NodeTraits::red()){
+ NodeTraits::set_color(w, NodeTraits::black());
+ NodeTraits::set_color(x_parent, NodeTraits::red());
+ bstree_algo::rotate_right(x_parent, w, NodeTraits::get_parent(x_parent), header);
+ w = NodeTraits::get_left(x_parent);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
+ }
+ node_ptr const w_left (NodeTraits::get_left(w));
+ node_ptr const w_right(NodeTraits::get_right(w));
+ if((!w_right || NodeTraits::get_color(w_right) == NodeTraits::black()) &&
+ (!w_left || NodeTraits::get_color(w_left) == NodeTraits::black())){
+ NodeTraits::set_color(w, NodeTraits::red());
+ x = x_parent;
+ x_parent = NodeTraits::get_parent(x_parent);
+ }
+ else {
+ if(!w_left || NodeTraits::get_color(w_left) == NodeTraits::black()){
+ NodeTraits::set_color(w_right, NodeTraits::black());
+ NodeTraits::set_color(w, NodeTraits::red());
+ bstree_algo::rotate_left(w, w_right, NodeTraits::get_parent(w), header);
+ w = NodeTraits::get_left(x_parent);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(w);
+ }
+ NodeTraits::set_color(w, NodeTraits::get_color(x_parent));
+ NodeTraits::set_color(x_parent, NodeTraits::black());
+ const node_ptr new_wleft(NodeTraits::get_left(w));
+ if(new_wleft)
+ NodeTraits::set_color(new_wleft, NodeTraits::black());
+ bstree_algo::rotate_right(x_parent, NodeTraits::get_left(x_parent), NodeTraits::get_parent(x_parent), header);
+ break;
+ }
+ }
+ }
+ if(x)
+ NodeTraits::set_color(x, NodeTraits::black());
+ }
+
+ static void rebalance_after_insertion(node_ptr header, node_ptr p)
+ {
+ NodeTraits::set_color(p, NodeTraits::red());
+ while(1){
+ node_ptr p_parent(NodeTraits::get_parent(p));
+ const node_ptr p_grandparent(NodeTraits::get_parent(p_parent));
+ if(p_parent == header || NodeTraits::get_color(p_parent) == NodeTraits::black() || p_grandparent == header){
+ break;
+ }
+
+ NodeTraits::set_color(p_grandparent, NodeTraits::red());
+ node_ptr const p_grandparent_left (NodeTraits::get_left (p_grandparent));
+ bool const p_parent_is_left_child = p_parent == p_grandparent_left;
+ node_ptr const x(p_parent_is_left_child ? NodeTraits::get_right(p_grandparent) : p_grandparent_left);
+
+ if(x && NodeTraits::get_color(x) == NodeTraits::red()){
+ NodeTraits::set_color(x, NodeTraits::black());
+ NodeTraits::set_color(p_parent, NodeTraits::black());
+ p = p_grandparent;
+ }
+ else{ //Final step
+ const bool p_is_left_child(NodeTraits::get_left(p_parent) == p);
+ if(p_parent_is_left_child){ //p_parent is left child
+ if(!p_is_left_child){ //p is right child
+ bstree_algo::rotate_left_no_parent_fix(p_parent, p);
+ //No need to link p and p_grandparent:
+ // [NodeTraits::set_parent(p, p_grandparent) + NodeTraits::set_left(p_grandparent, p)]
+ //as p_grandparent is not the header, another rotation is coming and p_parent
+ //will be the left child of p_grandparent
+ p_parent = p;
+ }
+ bstree_algo::rotate_right(p_grandparent, p_parent, NodeTraits::get_parent(p_grandparent), header);
+ }
+ else{ //p_parent is right child
+ if(p_is_left_child){ //p is left child
+ bstree_algo::rotate_right_no_parent_fix(p_parent, p);
+ //No need to link p and p_grandparent:
+ // [NodeTraits::set_parent(p, p_grandparent) + NodeTraits::set_right(p_grandparent, p)]
+ //as p_grandparent is not the header, another rotation is coming and p_parent
+ //will be the right child of p_grandparent
+ p_parent = p;
+ }
+ bstree_algo::rotate_left(p_grandparent, p_parent, NodeTraits::get_parent(p_grandparent), header);
+ }
+ NodeTraits::set_color(p_parent, NodeTraits::black());
+ break;
+ }
+ }
+ NodeTraits::set_color(NodeTraits::get_parent(header), NodeTraits::black());
+ }
+ /// @endcond
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<RbTreeAlgorithms, NodeTraits>
+{
+ typedef rbtree_algorithms<NodeTraits> type;
+};
+
+template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct get_node_checker<RbTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
+{
+ typedef detail::rbtree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_RBTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/set.hpp
index 3cd9013d4b7..3cd9013d4b7 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/set.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/set_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/set_hook.hpp
index e303b6442be..e303b6442be 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/set_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/set_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/sg_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/sg_set.hpp
index 745c3790b99..745c3790b99 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/sg_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/sg_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/sgtree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/sgtree.hpp
index 033efb878d6..033efb878d6 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/sgtree.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/sgtree.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/sgtree_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/sgtree_algorithms.hpp
new file mode 100644
index 00000000000..a3e233ce032
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/sgtree_algorithms.hpp
@@ -0,0 +1,420 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+//
+// Scapegoat tree algorithms are taken from the paper titled:
+// "Scapegoat Trees" by Igal Galperin Ronald L. Rivest.
+//
+/////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <cstddef>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/intrusive/bstree_algorithms.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+//! sgtree_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the binary search tree
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
+//!
+//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
+//!
+//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
+template<class NodeTraits>
+class sgtree_algorithms
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_algorithms<NodeTraits>
+ #endif
+{
+ public:
+ typedef typename NodeTraits::node node;
+ typedef NodeTraits node_traits;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+
+ /// @cond
+ private:
+
+ typedef bstree_algorithms<NodeTraits> bstree_algo;
+
+ /// @endcond
+
+ public:
+ //! This type is the information that will be
+ //! filled by insert_unique_check
+ struct insert_commit_data
+ : bstree_algo::insert_commit_data
+ {
+ std::size_t depth;
+ };
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
+ static node_ptr get_header(const_node_ptr n);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
+ static node_ptr begin_node(const_node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
+ static node_ptr end_node(const_node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
+ static void swap_tree(node_ptr header1, node_ptr header2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr node2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node);
+
+ //Unlink is not possible since tree metadata is needed to update the tree
+ //!static void unlink(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
+ static node_ptr unlink_leftmost_without_rebalance(node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
+ static bool unique(const_node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
+ static std::size_t size(const_node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
+ static node_ptr next_node(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
+ static node_ptr prev_node(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
+ static void init(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
+ static void init_header(node_ptr header);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
+ template<class AlphaByMaxSize>
+ static node_ptr erase(node_ptr header, node_ptr z, std::size_t tree_size, std::size_t &max_tree_size, AlphaByMaxSize alpha_by_maxsize)
+ {
+ bstree_algo::erase(header, z);
+ --tree_size;
+ if (tree_size > 0 &&
+ tree_size < alpha_by_maxsize(max_tree_size)){
+ bstree_algo::rebalance(header);
+ max_tree_size = tree_size;
+ }
+ return z;
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ static void clone
+ (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
+ template<class Disposer>
+ static void clear_and_dispose(node_ptr header, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr lower_bound
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr upper_bound
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr find
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> equal_range
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> bounded_range
+ (const_node_ptr header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
+ , bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::size_t count(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare, class H_Alpha>
+ static node_ptr insert_equal_upper_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ std::size_t depth;
+ bstree_algo::insert_equal_upper_bound(h, new_node, comp, &depth);
+ rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_lower_bound(node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare, class H_Alpha>
+ static node_ptr insert_equal_lower_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ std::size_t depth;
+ bstree_algo::insert_equal_lower_bound(h, new_node, comp, &depth);
+ rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal(node_ptr,node_ptr,node_ptr,NodePtrCompare)
+ template<class NodePtrCompare, class H_Alpha>
+ static node_ptr insert_equal
+ (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ std::size_t depth;
+ bstree_algo::insert_equal(header, hint, new_node, comp, &depth);
+ rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(node_ptr,node_ptr,node_ptr)
+ template<class H_Alpha>
+ static node_ptr insert_before
+ (node_ptr header, node_ptr pos, node_ptr new_node
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ std::size_t depth;
+ bstree_algo::insert_before(header, pos, new_node, &depth);
+ rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::push_back(node_ptr,node_ptr)
+ template<class H_Alpha>
+ static void push_back(node_ptr header, node_ptr new_node
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ std::size_t depth;
+ bstree_algo::push_back(header, new_node, &depth);
+ rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::push_front(node_ptr,node_ptr)
+ template<class H_Alpha>
+ static void push_front(node_ptr header, node_ptr new_node
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ std::size_t depth;
+ bstree_algo::push_front(header, new_node, &depth);
+ rebalance_after_insertion(new_node, depth, tree_size+1, h_alpha, max_tree_size);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const_node_ptr header, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
+ {
+ std::size_t depth;
+ std::pair<node_ptr, bool> ret =
+ bstree_algo::insert_unique_check(header, key, comp, commit_data, &depth);
+ commit_data.depth = depth;
+ return ret;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const_node_ptr header, node_ptr hint, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
+ {
+ std::size_t depth;
+ std::pair<node_ptr, bool> ret =
+ bstree_algo::insert_unique_check
+ (header, hint, key, comp, commit_data, &depth);
+ commit_data.depth = depth;
+ return ret;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(node_ptr,node_ptr,const insert_commit_data&)
+ template<class H_Alpha>
+ BOOST_INTRUSIVE_FORCEINLINE static void insert_unique_commit
+ (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ { return insert_commit(header, new_value, commit_data, tree_size, h_alpha, max_tree_size); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare, class H_Alpha, class AlphaByMaxSize>
+ static bool transfer_unique
+ ( node_ptr header1, NodePtrCompare comp, std::size_t tree1_size, std::size_t &max_tree1_size
+ , node_ptr header2, node_ptr z, std::size_t tree2_size, std::size_t &max_tree2_size
+ ,H_Alpha h_alpha, AlphaByMaxSize alpha_by_maxsize)
+ {
+ insert_commit_data commit_data;
+ bool const transferable = insert_unique_check(header1, z, comp, commit_data).second;
+ if(transferable){
+ erase(header2, z, tree2_size, max_tree2_size, alpha_by_maxsize);
+ insert_commit(header1, z, commit_data, tree1_size, h_alpha, max_tree1_size);
+ }
+ return transferable;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare, class H_Alpha, class AlphaByMaxSize>
+ static void transfer_equal
+ ( node_ptr header1, NodePtrCompare comp, std::size_t tree1_size, std::size_t &max_tree1_size
+ , node_ptr header2, node_ptr z, std::size_t tree2_size, std::size_t &max_tree2_size
+ ,H_Alpha h_alpha, AlphaByMaxSize alpha_by_maxsize)
+ {
+ insert_commit_data commit_data;
+ insert_equal_upper_bound_check(header1, z, comp, commit_data);
+ erase(header2, z, tree2_size, max_tree2_size, alpha_by_maxsize);
+ insert_commit(header1, z, commit_data, tree1_size, h_alpha, max_tree1_size);
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
+ static bool is_header(const_node_ptr p);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
+ static void rebalance(node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::rebalance_subtree
+ static node_ptr rebalance_subtree(node_ptr old_root)
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ /// @cond
+ private:
+
+ template<class KeyType, class KeyNodePtrCompare>
+ static void insert_equal_upper_bound_check
+ (node_ptr header, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
+ {
+ std::size_t depth;
+ bstree_algo::insert_equal_upper_bound_check(header, key, comp, commit_data, &depth);
+ commit_data.depth = depth;
+ }
+
+ template<class H_Alpha>
+ static void insert_commit
+ (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data
+ ,std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ bstree_algo::insert_unique_commit(header, new_value, commit_data);
+ rebalance_after_insertion(new_value, commit_data.depth, tree_size+1, h_alpha, max_tree_size);
+ }
+
+ template<class H_Alpha>
+ static void rebalance_after_insertion
+ (node_ptr x, std::size_t depth
+ , std::size_t tree_size, H_Alpha h_alpha, std::size_t &max_tree_size)
+ {
+ if(tree_size > max_tree_size)
+ max_tree_size = tree_size;
+
+ if(tree_size > 2 && //Nothing to do with only the root
+ //Check if the root node is unbalanced
+ //Scapegoat paper depth counts root depth as zero and "depth" counts root as 1,
+ //but since "depth" is the depth of the ancestor of x, i == depth
+ depth > h_alpha(tree_size)){
+
+ //Find the first non height-balanced node
+ //as described in the section 4.2 of the paper.
+ //This method is the alternative method described
+ //in the paper. Authors claim that this method
+ //may tend to yield more balanced trees on the average
+ //than the weight balanced method.
+ node_ptr s = x;
+ std::size_t size = 1;
+ for(std::size_t ancestor = 1; ancestor != depth; ++ancestor){
+ const node_ptr s_parent = NodeTraits::get_parent(s);
+ const node_ptr s_parent_left = NodeTraits::get_left(s_parent);
+ //Obtain parent's size (previous size + parent + sibling tree)
+ const node_ptr s_sibling = s_parent_left == s ? NodeTraits::get_right(s_parent) : s_parent_left;
+ size += 1 + bstree_algo::subtree_size(s_sibling);
+ s = s_parent;
+ if(ancestor > h_alpha(size)){ //is 's' scapegoat?
+ bstree_algo::rebalance_subtree(s);
+ return;
+ }
+ }
+ //The whole tree must be rebuilt
+ max_tree_size = tree_size;
+ bstree_algo::rebalance_subtree(NodeTraits::get_parent(s));
+ }
+ }
+ /// @endcond
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<SgTreeAlgorithms, NodeTraits>
+{
+ typedef sgtree_algorithms<NodeTraits> type;
+};
+
+template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct get_node_checker<SgTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
+{
+ typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SGTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/slist.hpp b/src/third_party/boost-1.69.0/boost/intrusive/slist.hpp
new file mode 100644
index 00000000000..1dc90a80a9a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/slist.hpp
@@ -0,0 +1,2254 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_SLIST_HPP
+#define BOOST_INTRUSIVE_SLIST_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/slist_hook.hpp>
+#include <boost/intrusive/circular_slist_algorithms.hpp>
+#include <boost/intrusive/linear_slist_algorithms.hpp>
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/link_mode.hpp>
+#include <boost/intrusive/detail/get_value_traits.hpp>
+#include <boost/intrusive/detail/is_stateful_value_traits.hpp>
+#include <boost/intrusive/detail/default_header_holder.hpp>
+#include <boost/intrusive/detail/uncast.hpp>
+#include <boost/intrusive/detail/mpl.hpp>
+#include <boost/intrusive/detail/iterator.hpp>
+#include <boost/intrusive/detail/slist_iterator.hpp>
+#include <boost/intrusive/detail/array_initializer.hpp>
+#include <boost/intrusive/detail/exception_disposer.hpp>
+#include <boost/intrusive/detail/equal_to_value.hpp>
+#include <boost/intrusive/detail/key_nodeptr_comp.hpp>
+#include <boost/intrusive/detail/simple_disposers.hpp>
+#include <boost/intrusive/detail/size_holder.hpp>
+#include <boost/intrusive/detail/algorithm.hpp>
+
+#include <boost/move/utility_core.hpp>
+#include <boost/static_assert.hpp>
+
+#include <boost/intrusive/detail/minimal_less_equal_header.hpp>//std::less
+#include <cstddef> //std::size_t
+#include <boost/intrusive/detail/minimal_pair_header.hpp> //std::pair
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+template<class HeaderHolder, class NodePtr, bool>
+struct header_holder_plus_last
+{
+ HeaderHolder header_holder_;
+ NodePtr last_;
+};
+
+template<class HeaderHolder, class NodePtr>
+struct header_holder_plus_last<HeaderHolder, NodePtr, false>
+{
+ HeaderHolder header_holder_;
+};
+
+struct default_slist_hook_applier
+{ template <class T> struct apply{ typedef typename T::default_slist_hook type; }; };
+
+template<>
+struct is_default_hook_tag<default_slist_hook_applier>
+{ static const bool value = true; };
+
+struct slist_defaults
+{
+ typedef default_slist_hook_applier proto_value_traits;
+ static const bool constant_time_size = true;
+ static const bool linear = false;
+ typedef std::size_t size_type;
+ static const bool cache_last = false;
+ typedef void header_holder_type;
+};
+
+struct slist_bool_flags
+{
+ static const std::size_t linear_pos = 1u;
+ static const std::size_t constant_time_size_pos = 2u;
+ static const std::size_t cache_last_pos = 4u;
+};
+
+
+/// @endcond
+
+//! The class template slist is an intrusive container, that encapsulates
+//! a singly-linked list. You can use such a list to squeeze the last bit
+//! of performance from your application. Unfortunately, the little gains
+//! come with some huge drawbacks. A lot of member functions can't be
+//! implemented as efficiently as for standard containers. To overcome
+//! this limitation some other member functions with rather unusual semantics
+//! have to be introduced.
+//!
+//! The template parameter \c T is the type to be managed by the container.
+//! The user can specify additional options and if no options are provided
+//! default options are used.
+//!
+//! The container supports the following options:
+//! \c base_hook<>/member_hook<>/value_traits<>,
+//! \c constant_time_size<>, \c size_type<>,
+//! \c linear<> and \c cache_last<>.
+//!
+//! The iterators of slist are forward iterators. slist provides a static
+//! function called "previous" to compute the previous iterator of a given iterator.
+//! This function has linear complexity. To improve the usability esp. with
+//! the '*_after' functions, ++end() == begin() and previous(begin()) == end()
+//! are defined. An new special function "before_begin()" is defined, which returns
+//! an iterator that points one less the beginning of the list: ++before_begin() == begin()
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class SizeType, std::size_t BoolFlags, typename HeaderHolder>
+#endif
+class slist_impl
+{
+ //Public typedefs
+ public:
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::pointer pointer;
+ typedef typename value_traits::const_pointer const_pointer;
+ typedef typename pointer_traits<pointer>::element_type value_type;
+ typedef typename pointer_traits<pointer>::reference reference;
+ typedef typename pointer_traits<const_pointer>::reference const_reference;
+ typedef typename pointer_traits<pointer>::difference_type difference_type;
+ typedef SizeType size_type;
+ typedef slist_iterator<value_traits, false> iterator;
+ typedef slist_iterator<value_traits, true> const_iterator;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::node node;
+ typedef typename node_traits::node_ptr node_ptr;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+ typedef typename detail::get_header_holder_type
+ < value_traits, HeaderHolder >::type header_holder_type;
+
+ static const bool constant_time_size = 0 != (BoolFlags & slist_bool_flags::constant_time_size_pos);
+ static const bool stateful_value_traits = detail::is_stateful_value_traits<value_traits>::value;
+ static const bool linear = 0 != (BoolFlags & slist_bool_flags::linear_pos);
+ static const bool cache_last = 0 != (BoolFlags & slist_bool_flags::cache_last_pos);
+ static const bool has_container_from_iterator =
+ detail::is_same< header_holder_type, detail::default_header_holder< node_traits > >::value;
+
+ typedef typename detail::if_c
+ < linear
+ , linear_slist_algorithms<node_traits>
+ , circular_slist_algorithms<node_traits>
+ >::type node_algorithms;
+
+ /// @cond
+ private:
+ typedef detail::size_holder<constant_time_size, size_type> size_traits;
+
+ //noncopyable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(slist_impl)
+
+ static const bool safemode_or_autounlink = is_safe_autounlink<value_traits::link_mode>::value;
+
+ //Constant-time size is incompatible with auto-unlink hooks!
+ BOOST_STATIC_ASSERT(!(constant_time_size && ((int)value_traits::link_mode == (int)auto_unlink)));
+ //Linear singly linked lists are incompatible with auto-unlink hooks!
+ BOOST_STATIC_ASSERT(!(linear && ((int)value_traits::link_mode == (int)auto_unlink)));
+ //A list with cached last node is incompatible with auto-unlink hooks!
+ BOOST_STATIC_ASSERT(!(cache_last && ((int)value_traits::link_mode == (int)auto_unlink)));
+
+ node_ptr get_end_node()
+ { return node_ptr(linear ? node_ptr() : this->get_root_node()); }
+
+ const_node_ptr get_end_node() const
+ {
+ return const_node_ptr
+ (linear ? const_node_ptr() : this->get_root_node()); }
+
+ node_ptr get_root_node()
+ { return data_.root_plus_size_.header_holder_.get_node(); }
+
+ const_node_ptr get_root_node() const
+ { return data_.root_plus_size_.header_holder_.get_node(); }
+
+ node_ptr get_last_node()
+ { return this->get_last_node(detail::bool_<cache_last>()); }
+
+ const_node_ptr get_last_node() const
+ { return this->get_last_node(detail::bool_<cache_last>()); }
+
+ void set_last_node(const node_ptr &n)
+ { return this->set_last_node(n, detail::bool_<cache_last>()); }
+
+ static node_ptr get_last_node(detail::bool_<false>)
+ {
+ //This function shall not be used if cache_last is not true
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
+ return node_ptr();
+ }
+
+ static void set_last_node(const node_ptr &, detail::bool_<false>)
+ {
+ //This function shall not be used if cache_last is not true
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
+ }
+
+ node_ptr get_last_node(detail::bool_<true>)
+ { return node_ptr(data_.root_plus_size_.last_); }
+
+ const_node_ptr get_last_node(detail::bool_<true>) const
+ { return const_node_ptr(data_.root_plus_size_.last_); }
+
+ void set_last_node(const node_ptr & n, detail::bool_<true>)
+ { data_.root_plus_size_.last_ = n; }
+
+ void set_default_constructed_state()
+ {
+ node_algorithms::init_header(this->get_root_node());
+ this->priv_size_traits().set_size(size_type(0));
+ if(cache_last){
+ this->set_last_node(this->get_root_node());
+ }
+ }
+
+ typedef header_holder_plus_last<header_holder_type, node_ptr, cache_last> header_holder_plus_last_t;
+ struct root_plus_size
+ : public size_traits
+ , public header_holder_plus_last_t
+ {};
+
+ struct data_t
+ : public slist_impl::value_traits
+ {
+ typedef typename slist_impl::value_traits value_traits;
+ explicit data_t(const value_traits &val_traits)
+ : value_traits(val_traits)
+ {}
+
+ root_plus_size root_plus_size_;
+ } data_;
+
+ size_traits &priv_size_traits()
+ { return data_.root_plus_size_; }
+
+ const size_traits &priv_size_traits() const
+ { return data_.root_plus_size_; }
+
+ const value_traits &priv_value_traits() const
+ { return data_; }
+
+ value_traits &priv_value_traits()
+ { return data_; }
+
+ typedef typename boost::intrusive::value_traits_pointers
+ <ValueTraits>::const_value_traits_ptr const_value_traits_ptr;
+
+ const_value_traits_ptr priv_value_traits_ptr() const
+ { return pointer_traits<const_value_traits_ptr>::pointer_to(this->priv_value_traits()); }
+
+ /// @endcond
+
+ public:
+
+ ///@cond
+
+ //! <b>Requires</b>: f and before_l belong to another slist.
+ //!
+ //! <b>Effects</b>: Transfers the range [f, before_l] to this
+ //! list, after the element pointed by prev_pos.
+ //! No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements transferred
+ //! if constant_time_size is true. Constant-time otherwise.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ //!
+ //! <b>Warning</b>: Experimental function, don't use it!
+ slist_impl( const node_ptr & f, const node_ptr & before_l
+ , size_type n, const value_traits &v_traits = value_traits())
+ : data_(v_traits)
+ {
+ if(n){
+ this->priv_size_traits().set_size(n);
+ if(cache_last){
+ this->set_last_node(before_l);
+ }
+ node_traits::set_next(this->get_root_node(), f);
+ node_traits::set_next(before_l, this->get_end_node());
+ }
+ else{
+ this->set_default_constructed_state();
+ }
+ }
+
+ ///@endcond
+
+ //! <b>Effects</b>: constructs an empty list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
+ slist_impl()
+ : data_(value_traits())
+ { this->set_default_constructed_state(); }
+
+ //! <b>Effects</b>: constructs an empty list.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
+ explicit slist_impl(const value_traits &v_traits)
+ : data_(v_traits)
+ { this->set_default_constructed_state(); }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield an lvalue of type value_type.
+ //!
+ //! <b>Effects</b>: Constructs a list equal to [b ,e).
+ //!
+ //! <b>Complexity</b>: Linear in distance(b, e). No copy constructors are called.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks).
+ template<class Iterator>
+ slist_impl(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
+ : data_(v_traits)
+ {
+ this->set_default_constructed_state();
+ //nothrow, no need to rollback to release elements on exception
+ this->insert_after(this->cbefore_begin(), b, e);
+ }
+
+ //! <b>Effects</b>: Constructs a container moving resources from another container.
+ //! Internal value traits are move constructed and
+ //! nodes belonging to x (except the node representing the "end") are linked to *this.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node's
+ //! move constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the move constructor of value traits throws.
+ slist_impl(BOOST_RV_REF(slist_impl) x)
+ : data_(::boost::move(x.priv_value_traits()))
+ {
+ this->set_default_constructed_state();
+ //nothrow, no need to rollback to release elements on exception
+ this->swap(x);
+ }
+
+ //! <b>Effects</b>: Equivalent to swap
+ //!
+ slist_impl& operator=(BOOST_RV_REF(slist_impl) x)
+ { this->swap(x); return *this; }
+
+ //! <b>Effects</b>: If it's a safe-mode
+ //! or auto-unlink value, the destructor does nothing
+ //! (ie. no code is generated). Otherwise it detaches all elements from this.
+ //! In this case the objects in the list are not deleted (i.e. no destructors
+ //! are called), but the hooks according to the value_traits template parameter
+ //! are set to their default value.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements in the list, if
+ //! it's a safe-mode or auto-unlink value. Otherwise constant.
+ ~slist_impl()
+ {
+ if(is_safe_autounlink<ValueTraits::link_mode>::value){
+ this->clear();
+ node_algorithms::init(this->get_root_node());
+ }
+ }
+
+ //! <b>Effects</b>: Erases all the elements of the container.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements of the list.
+ //! if it's a safe-mode or auto-unlink value_type. Constant time otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the erased elements.
+ void clear()
+ {
+ if(safemode_or_autounlink){
+ this->clear_and_dispose(detail::null_disposer());
+ }
+ else{
+ this->set_default_constructed_state();
+ }
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases all the elements of the container
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements of the list.
+ //!
+ //! <b>Note</b>: Invalidates the iterators to the erased elements.
+ template <class Disposer>
+ void clear_and_dispose(Disposer disposer)
+ {
+ const_iterator it(this->begin()), itend(this->end());
+ while(it != itend){
+ node_ptr to_erase(it.pointed_node());
+ ++it;
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(priv_value_traits().to_value_ptr(to_erase));
+ }
+ this->set_default_constructed_state();
+ }
+
+ //! <b>Requires</b>: value must be an lvalue.
+ //!
+ //! <b>Effects</b>: Inserts the value in the front of the list.
+ //! No copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ void push_front(reference value)
+ {
+ node_ptr to_insert = priv_value_traits().to_node_ptr(value);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(to_insert));
+ if(cache_last){
+ if(this->empty()){
+ this->set_last_node(to_insert);
+ }
+ }
+ node_algorithms::link_after(this->get_root_node(), to_insert);
+ this->priv_size_traits().increment();
+ }
+
+ //! <b>Requires</b>: value must be an lvalue.
+ //!
+ //! <b>Effects</b>: Inserts the value in the back of the list.
+ //! No copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! This function is only available is cache_last<> is true.
+ void push_back(reference value)
+ {
+ BOOST_STATIC_ASSERT((cache_last));
+ node_ptr n = priv_value_traits().to_node_ptr(value);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
+ node_algorithms::link_after(this->get_last_node(), n);
+ if(cache_last){
+ this->set_last_node(n);
+ }
+ this->priv_size_traits().increment();
+ }
+
+ //! <b>Effects</b>: Erases the first element of the list.
+ //! No destructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the erased element.
+ void pop_front()
+ { return this->pop_front_and_dispose(detail::null_disposer()); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the first element of the list.
+ //! Disposer::operator()(pointer) is called for the removed element.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Invalidates the iterators to the erased element.
+ template<class Disposer>
+ void pop_front_and_dispose(Disposer disposer)
+ {
+ node_ptr to_erase = node_traits::get_next(this->get_root_node());
+ node_algorithms::unlink_after(this->get_root_node());
+ this->priv_size_traits().decrement();
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(priv_value_traits().to_value_ptr(to_erase));
+ if(cache_last){
+ if(this->empty()){
+ this->set_last_node(this->get_root_node());
+ }
+ }
+ }
+
+ //! <b>Effects</b>: Returns a reference to the first element of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ reference front()
+ { return *this->priv_value_traits().to_value_ptr(node_traits::get_next(this->get_root_node())); }
+
+ //! <b>Effects</b>: Returns a const_reference to the first element of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_reference front() const
+ { return *this->priv_value_traits().to_value_ptr(detail::uncast(node_traits::get_next(this->get_root_node()))); }
+
+ //! <b>Effects</b>: Returns a reference to the last element of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! This function is only available is cache_last<> is true.
+ reference back()
+ {
+ BOOST_STATIC_ASSERT((cache_last));
+ return *this->priv_value_traits().to_value_ptr(this->get_last_node());
+ }
+
+ //! <b>Effects</b>: Returns a const_reference to the last element of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ //! This function is only available is cache_last<> is true.
+ const_reference back() const
+ {
+ BOOST_STATIC_ASSERT((cache_last));
+ return *this->priv_value_traits().to_value_ptr(this->get_last_node());
+ }
+
+ //! <b>Effects</b>: Returns an iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator begin()
+ { return iterator (node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator begin() const
+ { return const_iterator (node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the first element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbegin() const
+ { return const_iterator(node_traits::get_next(this->get_root_node()), this->priv_value_traits_ptr()); }
+
+ //! <b>Effects</b>: Returns an iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator end()
+ { return iterator(this->get_end_node(), this->priv_value_traits_ptr()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator end() const
+ { return const_iterator(detail::uncast(this->get_end_node()), this->priv_value_traits_ptr()); }
+
+ //! <b>Effects</b>: Returns a const_iterator to the end of the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cend() const
+ { return this->end(); }
+
+ //! <b>Effects</b>: Returns an iterator that points to a position
+ //! before the first element. Equivalent to "end()"
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ iterator before_begin()
+ { return iterator(this->get_root_node(), this->priv_value_traits_ptr()); }
+
+ //! <b>Effects</b>: Returns an iterator that points to a position
+ //! before the first element. Equivalent to "end()"
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator before_begin() const
+ { return const_iterator(detail::uncast(this->get_root_node()), this->priv_value_traits_ptr()); }
+
+ //! <b>Effects</b>: Returns an iterator that points to a position
+ //! before the first element. Equivalent to "end()"
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ const_iterator cbefore_begin() const
+ { return this->before_begin(); }
+
+ //! <b>Effects</b>: Returns an iterator to the last element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: This function is present only if cached_last<> option is true.
+ iterator last()
+ {
+ //This function shall not be used if cache_last is not true
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
+ return iterator (this->get_last_node(), this->priv_value_traits_ptr());
+ }
+
+ //! <b>Effects</b>: Returns a const_iterator to the last element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: This function is present only if cached_last<> option is true.
+ const_iterator last() const
+ {
+ //This function shall not be used if cache_last is not true
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(cache_last);
+ return const_iterator (this->get_last_node(), this->priv_value_traits_ptr());
+ }
+
+ //! <b>Effects</b>: Returns a const_iterator to the last element contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: This function is present only if cached_last<> option is true.
+ const_iterator clast() const
+ { return const_iterator(this->get_last_node(), this->priv_value_traits_ptr()); }
+
+ //! <b>Precondition</b>: end_iterator must be a valid end iterator
+ //! of slist.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the slist associated to the end iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static slist_impl &container_from_end_iterator(iterator end_iterator)
+ { return slist_impl::priv_container_from_end_iterator(end_iterator); }
+
+ //! <b>Precondition</b>: end_iterator must be a valid end const_iterator
+ //! of slist.
+ //!
+ //! <b>Effects</b>: Returns a const reference to the slist associated to the end iterator
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ static const slist_impl &container_from_end_iterator(const_iterator end_iterator)
+ { return slist_impl::priv_container_from_end_iterator(end_iterator); }
+
+ //! <b>Effects</b>: Returns the number of the elements contained in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements contained in the list.
+ //! if constant_time_size is false. Constant time otherwise.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ size_type size() const
+ {
+ if(constant_time_size)
+ return this->priv_size_traits().get_size();
+ else
+ return node_algorithms::count(this->get_root_node()) - 1;
+ }
+
+ //! <b>Effects</b>: Returns true if the list contains no elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ bool empty() const
+ { return node_algorithms::unique(this->get_root_node()); }
+
+ //! <b>Effects</b>: Swaps the elements of x and *this.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements of both lists.
+ //! Constant-time if linear<> and/or cache_last<> options are used.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ void swap(slist_impl& other)
+ {
+ if(cache_last){
+ priv_swap_cache_last(this, &other);
+ }
+ else{
+ this->priv_swap_lists(this->get_root_node(), other.get_root_node(), detail::bool_<linear>());
+ }
+ this->priv_size_traits().swap(other.priv_size_traits());
+ }
+
+ //! <b>Effects</b>: Moves backwards all the elements, so that the first
+ //! element becomes the second, the second becomes the third...
+ //! the last element becomes the first one.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements plus the number shifts.
+ //!
+ //! <b>Note</b>: Iterators Does not affect the validity of iterators and references.
+ void shift_backwards(size_type n = 1)
+ { this->priv_shift_backwards(n, detail::bool_<linear>()); }
+
+ //! <b>Effects</b>: Moves forward all the elements, so that the second
+ //! element becomes the first, the third becomes the second...
+ //! the first element becomes the last one.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements plus the number shifts.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ void shift_forward(size_type n = 1)
+ { this->priv_shift_forward(n, detail::bool_<linear>()); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //! Cloner should yield to nodes equivalent to the original nodes.
+ //!
+ //! <b>Effects</b>: Erases all the elements from *this
+ //! calling Disposer::operator()(pointer), clones all the
+ //! elements from src calling Cloner::operator()(const_reference )
+ //! and inserts them on *this.
+ //!
+ //! If cloner throws, all cloned elements are unlinked and disposed
+ //! calling Disposer::operator()(pointer).
+ //!
+ //! <b>Complexity</b>: Linear to erased plus inserted elements.
+ //!
+ //! <b>Throws</b>: If cloner throws.
+ template <class Cloner, class Disposer>
+ void clone_from(const slist_impl &src, Cloner cloner, Disposer disposer)
+ {
+ this->clear_and_dispose(disposer);
+ detail::exception_disposer<slist_impl, Disposer>
+ rollback(*this, disposer);
+ const_iterator prev(this->cbefore_begin());
+ const_iterator b(src.begin()), e(src.end());
+ for(; b != e; ++b){
+ prev = this->insert_after(prev, *cloner(*b));
+ }
+ rollback.release();
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //! Cloner should yield to nodes equivalent to the original nodes.
+ //!
+ //! <b>Effects</b>: Erases all the elements from *this
+ //! calling Disposer::operator()(pointer), clones all the
+ //! elements from src calling Cloner::operator()(reference)
+ //! and inserts them on *this.
+ //!
+ //! If cloner throws, all cloned elements are unlinked and disposed
+ //! calling Disposer::operator()(pointer).
+ //!
+ //! <b>Complexity</b>: Linear to erased plus inserted elements.
+ //!
+ //! <b>Throws</b>: If cloner throws.
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(slist_impl) src, Cloner cloner, Disposer disposer)
+ {
+ this->clear_and_dispose(disposer);
+ detail::exception_disposer<slist_impl, Disposer>
+ rollback(*this, disposer);
+ iterator prev(this->cbefore_begin());
+ iterator b(src.begin()), e(src.end());
+ for(; b != e; ++b){
+ prev = this->insert_after(prev, *cloner(*b));
+ }
+ rollback.release();
+ }
+
+ //! <b>Requires</b>: value must be an lvalue and prev_p must point to an element
+ //! contained by the list or to end().
+ //!
+ //! <b>Effects</b>: Inserts the value after the position pointed by prev_p.
+ //! No copy constructor is called.
+ //!
+ //! <b>Returns</b>: An iterator to the inserted element.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ iterator insert_after(const_iterator prev_p, reference value)
+ {
+ node_ptr n = priv_value_traits().to_node_ptr(value);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
+ node_ptr prev_n(prev_p.pointed_node());
+ node_algorithms::link_after(prev_n, n);
+ if(cache_last && (this->get_last_node() == prev_n)){
+ this->set_last_node(n);
+ }
+ this->priv_size_traits().increment();
+ return iterator (n, this->priv_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield
+ //! an lvalue of type value_type and prev_p must point to an element
+ //! contained by the list or to the end node.
+ //!
+ //! <b>Effects</b>: Inserts the [f, l)
+ //! after the position prev_p.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements inserted.
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ template<class Iterator>
+ void insert_after(const_iterator prev_p, Iterator f, Iterator l)
+ {
+ //Insert first nodes avoiding cache and size checks
+ size_type count = 0;
+ node_ptr prev_n(prev_p.pointed_node());
+ for (; f != l; ++f, ++count){
+ const node_ptr n = priv_value_traits().to_node_ptr(*f);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
+ node_algorithms::link_after(prev_n, n);
+ prev_n = n;
+ }
+ //Now fix special cases if needed
+ if(cache_last && (this->get_last_node() == prev_p.pointed_node())){
+ this->set_last_node(prev_n);
+ }
+ if(constant_time_size){
+ this->priv_size_traits().increase(count);
+ }
+ }
+
+ //! <b>Requires</b>: value must be an lvalue and p must point to an element
+ //! contained by the list or to end().
+ //!
+ //! <b>Effects</b>: Inserts the value before the position pointed by p.
+ //! No copy constructor is called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements before p.
+ //! Constant-time if cache_last<> is true and p == end().
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ iterator insert(const_iterator p, reference value)
+ { return this->insert_after(this->previous(p), value); }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield
+ //! an lvalue of type value_type and p must point to an element
+ //! contained by the list or to the end node.
+ //!
+ //! <b>Effects</b>: Inserts the pointed by b and e
+ //! before the position p. No copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements inserted plus linear
+ //! to the elements before b.
+ //! Linear to the number of elements to insert if cache_last<> option is true and p == end().
+ //!
+ //! <b>Note</b>: Does not affect the validity of iterators and references.
+ template<class Iterator>
+ void insert(const_iterator p, Iterator b, Iterator e)
+ { return this->insert_after(this->previous(p), b, e); }
+
+ //! <b>Effects</b>: Erases the element after the element pointed by prev of
+ //! the list. No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ iterator erase_after(const_iterator prev)
+ { return this->erase_after_and_dispose(prev, detail::null_disposer()); }
+
+ //! <b>Effects</b>: Erases the range (before_f, l) from
+ //! the list. No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of erased elements if it's a safe-mode
+ //! , auto-unlink value or constant-time size is activated. Constant time otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ iterator erase_after(const_iterator before_f, const_iterator l)
+ {
+ if(safemode_or_autounlink || constant_time_size){
+ return this->erase_after_and_dispose(before_f, l, detail::null_disposer());
+ }
+ else{
+ const node_ptr bfp = before_f.pointed_node();
+ const node_ptr lp = l.pointed_node();
+ if(cache_last){
+ if(lp == this->get_end_node()){
+ this->set_last_node(bfp);
+ }
+ }
+ node_algorithms::unlink_after(bfp, lp);
+ return l.unconst();
+ }
+ }
+
+ //! <b>Effects</b>: Erases the range (before_f, l) from
+ //! the list. n must be distance(before_f, l) - 1.
+ //! No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: constant-time if link_mode is normal_link.
+ //! Linear to the elements (l - before_f) otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ iterator erase_after(const_iterator before_f, const_iterator l, size_type n)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance((++const_iterator(before_f)).pointed_node(), l.pointed_node()) == n);
+ if(safemode_or_autounlink){
+ return this->erase_after(before_f, l);
+ }
+ else{
+ const node_ptr bfp = before_f.pointed_node();
+ const node_ptr lp = l.pointed_node();
+ if(cache_last){
+ if((lp == this->get_end_node())){
+ this->set_last_node(bfp);
+ }
+ }
+ node_algorithms::unlink_after(bfp, lp);
+ if(constant_time_size){
+ this->priv_size_traits().decrease(n);
+ }
+ return l.unconst();
+ }
+ }
+
+ //! <b>Effects</b>: Erases the element pointed by i of the list.
+ //! No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed element,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements before i.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ iterator erase(const_iterator i)
+ { return this->erase_after(this->previous(i)); }
+
+ //! <b>Requires</b>: f and l must be valid iterator to elements in *this.
+ //!
+ //! <b>Effects</b>: Erases the range pointed by b and e.
+ //! No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements before l.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased elements.
+ iterator erase(const_iterator f, const_iterator l)
+ { return this->erase_after(this->previous(f), l); }
+
+ //! <b>Effects</b>: Erases the range [f, l) from
+ //! the list. n must be distance(f, l).
+ //! No destructors are called.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: linear to the elements before f if link_mode is normal_link
+ //! and constant_time_size is activated. Linear to the elements before l otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ iterator erase(const_iterator f, const_iterator l, size_type n)
+ { return this->erase_after(this->previous(f), l, n); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the element after the element pointed by prev of
+ //! the list.
+ //! Disposer::operator()(pointer) is called for the removed element.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Invalidates the iterators to the erased element.
+ template<class Disposer>
+ iterator erase_after_and_dispose(const_iterator prev, Disposer disposer)
+ {
+ const_iterator it(prev);
+ ++it;
+ node_ptr to_erase(it.pointed_node());
+ ++it;
+ node_ptr prev_n(prev.pointed_node());
+ node_algorithms::unlink_after(prev_n);
+ if(cache_last && (to_erase == this->get_last_node())){
+ this->set_last_node(prev_n);
+ }
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(priv_value_traits().to_value_ptr(to_erase));
+ this->priv_size_traits().decrement();
+ return it.unconst();
+ }
+
+ /// @cond
+
+ static iterator s_insert_after(const_iterator const prev_p, reference value)
+ {
+ BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
+ node_ptr const n = value_traits::to_node_ptr(value);
+ BOOST_INTRUSIVE_SAFE_HOOK_DEFAULT_ASSERT(!safemode_or_autounlink || node_algorithms::inited(n));
+ node_algorithms::link_after(prev_p.pointed_node(), n);
+ return iterator (n, const_value_traits_ptr());
+ }
+
+ template<class Disposer>
+ static iterator s_erase_after_and_dispose(const_iterator prev, Disposer disposer)
+ {
+ BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
+ const_iterator it(prev);
+ ++it;
+ node_ptr to_erase(it.pointed_node());
+ ++it;
+ node_ptr prev_n(prev.pointed_node());
+ node_algorithms::unlink_after(prev_n);
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(value_traits::to_value_ptr(to_erase));
+ return it.unconst();
+ }
+
+ template<class Disposer>
+ static iterator s_erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer)
+ {
+ BOOST_STATIC_ASSERT(((!cache_last)&&(!constant_time_size)&&(!stateful_value_traits)));
+ node_ptr bfp(before_f.pointed_node()), lp(l.pointed_node());
+ node_ptr fp(node_traits::get_next(bfp));
+ node_algorithms::unlink_after(bfp, lp);
+ while(fp != lp){
+ node_ptr to_erase(fp);
+ fp = node_traits::get_next(fp);
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(value_traits::to_value_ptr(to_erase));
+ }
+ return l.unconst();
+ }
+
+ static iterator s_erase_after(const_iterator prev)
+ { return s_erase_after_and_dispose(prev, detail::null_disposer()); }
+
+ /// @endcond
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the range (before_f, l) from
+ //! the list.
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements (l - before_f + 1).
+ //!
+ //! <b>Note</b>: Invalidates the iterators to the erased element.
+ template<class Disposer>
+ iterator erase_after_and_dispose(const_iterator before_f, const_iterator l, Disposer disposer)
+ {
+ node_ptr bfp(before_f.pointed_node()), lp(l.pointed_node());
+ node_ptr fp(node_traits::get_next(bfp));
+ node_algorithms::unlink_after(bfp, lp);
+ while(fp != lp){
+ node_ptr to_erase(fp);
+ fp = node_traits::get_next(fp);
+ if(safemode_or_autounlink)
+ node_algorithms::init(to_erase);
+ disposer(priv_value_traits().to_value_ptr(to_erase));
+ this->priv_size_traits().decrement();
+ }
+ if(cache_last && (node_traits::get_next(bfp) == this->get_end_node())){
+ this->set_last_node(bfp);
+ }
+ return l.unconst();
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the element pointed by i of the list.
+ //! No destructors are called.
+ //! Disposer::operator()(pointer) is called for the removed element.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed element,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements before i.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased element.
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator i, Disposer disposer)
+ { return this->erase_after_and_dispose(this->previous(i), disposer); }
+
+ #if !defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ template<class Disposer>
+ iterator erase_and_dispose(iterator i, Disposer disposer)
+ { return this->erase_and_dispose(const_iterator(i), disposer); }
+ #endif
+
+ //! <b>Requires</b>: f and l must be valid iterator to elements in *this.
+ //! Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Erases the range pointed by b and e.
+ //! No destructors are called.
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Returns</b>: the first element remaining beyond the removed elements,
+ //! or end() if no such element exists.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of erased elements plus linear
+ //! to the elements before f.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references) to the
+ //! erased elements.
+ template<class Disposer>
+ iterator erase_and_dispose(const_iterator f, const_iterator l, Disposer disposer)
+ { return this->erase_after_and_dispose(this->previous(f), l, disposer); }
+
+ //! <b>Requires</b>: Dereferencing iterator must yield
+ //! an lvalue of type value_type.
+ //!
+ //! <b>Effects</b>: Clears the list and inserts the range pointed by b and e.
+ //! No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements inserted plus
+ //! linear to the elements contained in the list if it's a safe-mode
+ //! or auto-unlink value.
+ //! Linear to the number of elements inserted in the list otherwise.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements.
+ template<class Iterator>
+ void assign(Iterator b, Iterator e)
+ {
+ this->clear();
+ this->insert_after(this->cbefore_begin(), b, e);
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Requires</b>: Dereferencing iterator must yield
+ //! an lvalue of type value_type.
+ //!
+ //! <b>Effects</b>: Clears the list and inserts the range pointed by b and e.
+ //! No destructors or copy constructors are called.
+ //! Disposer::operator()(pointer) is called for the removed elements.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements inserted plus
+ //! linear to the elements contained in the list.
+ //!
+ //! <b>Note</b>: Invalidates the iterators (but not the references)
+ //! to the erased elements.
+ template<class Iterator, class Disposer>
+ void dispose_and_assign(Disposer disposer, Iterator b, Iterator e)
+ {
+ this->clear_and_dispose(disposer);
+ this->insert_after(this->cbefore_begin(), b, e, disposer);
+ }
+
+ //! <b>Requires</b>: prev must point to an element contained by this list or
+ //! to the before_begin() element
+ //!
+ //! <b>Effects</b>: Transfers all the elements of list x to this list, after the
+ //! the element pointed by prev. No destructors or copy constructors are called.
+ //!
+ //! <b>Returns</b>: Nothing.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: In general, linear to the elements contained in x.
+ //! Constant-time if cache_last<> option is true and also constant-time if
+ //! linear<> option is true "this" is empty and "l" is not used.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ //!
+ //! <b>Additional note</b>: If the optional parameter "l" is provided, it will be
+ //! assigned to the last spliced element or prev if x is empty.
+ //! This iterator can be used as new "prev" iterator for a new splice_after call.
+ //! that will splice new values after the previously spliced values.
+ void splice_after(const_iterator prev, slist_impl &x, const_iterator *l = 0)
+ {
+ if(x.empty()){
+ if(l) *l = prev;
+ }
+ else if(linear && this->empty()){
+ this->swap(x);
+ if(l) *l = this->previous(this->cend());
+ }
+ else{
+ const_iterator last_x(x.previous(x.end())); //constant time if cache_last is active
+ node_ptr prev_n(prev.pointed_node());
+ node_ptr last_x_n(last_x.pointed_node());
+ if(cache_last){
+ x.set_last_node(x.get_root_node());
+ if(node_traits::get_next(prev_n) == this->get_end_node()){
+ this->set_last_node(last_x_n);
+ }
+ }
+ node_algorithms::transfer_after( prev_n, x.before_begin().pointed_node(), last_x_n);
+ this->priv_size_traits().increase(x.priv_size_traits().get_size());
+ x.priv_size_traits().set_size(size_type(0));
+ if(l) *l = last_x;
+ }
+ }
+
+ //! <b>Requires</b>: prev must point to an element contained by this list or
+ //! to the before_begin() element. prev_ele must point to an element contained in list
+ //! x or must be x.before_begin().
+ //!
+ //! <b>Effects</b>: Transfers the element after prev_ele, from list x to this list,
+ //! after the element pointed by prev. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator prev_ele)
+ {
+ const_iterator elem = prev_ele;
+ this->splice_after(prev_pos, x, prev_ele, ++elem, 1);
+ }
+
+ //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
+ //! before_begin(), and before_f and before_l belong to x and
+ //! ++before_f != x.end() && before_l != x.end().
+ //!
+ //! <b>Effects</b>: Transfers the range (before_f, before_l] from list x to this
+ //! list, after the element pointed by prev_pos.
+ //! No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements transferred
+ //! if constant_time_size is true. Constant-time otherwise.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l)
+ {
+ if(constant_time_size)
+ this->splice_after(prev_pos, x, before_f, before_l, node_algorithms::distance(before_f.pointed_node(), before_l.pointed_node()));
+ else
+ this->priv_splice_after
+ (prev_pos.pointed_node(), x, before_f.pointed_node(), before_l.pointed_node());
+ }
+
+ //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
+ //! before_begin(), and before_f and before_l belong to x and
+ //! ++before_f != x.end() && before_l != x.end() and
+ //! n == distance(before_f, before_l).
+ //!
+ //! <b>Effects</b>: Transfers the range (before_f, before_l] from list x to this
+ //! list, after the element pointed by p. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice_after(const_iterator prev_pos, slist_impl &x, const_iterator before_f, const_iterator before_l, size_type n)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(node_algorithms::distance(before_f.pointed_node(), before_l.pointed_node()) == n);
+ this->priv_splice_after
+ (prev_pos.pointed_node(), x, before_f.pointed_node(), before_l.pointed_node());
+ if(constant_time_size){
+ this->priv_size_traits().increase(n);
+ x.priv_size_traits().decrease(n);
+ }
+ }
+
+ //! <b>Requires</b>: it is an iterator to an element in *this.
+ //!
+ //! <b>Effects</b>: Transfers all the elements of list x to this list, before the
+ //! the element pointed by it. No destructors or copy constructors are called.
+ //!
+ //! <b>Returns</b>: Nothing.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements contained in x plus linear to
+ //! the elements before it.
+ //! Linear to the elements before it if cache_last<> option is true.
+ //! Constant-time if cache_last<> option is true and it == end().
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ //!
+ //! <b>Additional note</b>: If the optional parameter "l" is provided, it will be
+ //! assigned to the last spliced element or prev if x is empty.
+ //! This iterator can be used as new "prev" iterator for a new splice_after call.
+ //! that will splice new values after the previously spliced values.
+ void splice(const_iterator it, slist_impl &x, const_iterator *l = 0)
+ { this->splice_after(this->previous(it), x, l); }
+
+ //! <b>Requires</b>: it p must be a valid iterator of *this.
+ //! elem must point to an element contained in list
+ //! x.
+ //!
+ //! <b>Effects</b>: Transfers the element elem, from list x to this list,
+ //! before the element pointed by pos. No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the elements before pos and before elem.
+ //! Linear to the elements before elem if cache_last<> option is true and pos == end().
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator pos, slist_impl &x, const_iterator elem)
+ { return this->splice_after(this->previous(pos), x, x.previous(elem)); }
+
+ //! <b>Requires</b>: pos must be a dereferenceable iterator in *this
+ //! and f and f belong to x and f and f a valid range on x.
+ //!
+ //! <b>Effects</b>: Transfers the range [f, l) from list x to this
+ //! list, before the element pointed by pos.
+ //! No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the sum of elements before pos, f, and l
+ //! plus linear to the number of elements transferred if constant_time_size is true.
+ //! Linear to the sum of elements before f, and l
+ //! plus linear to the number of elements transferred if constant_time_size is true
+ //! if cache_last<> is true and pos == end()
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator pos, slist_impl &x, const_iterator f, const_iterator l)
+ { return this->splice_after(this->previous(pos), x, x.previous(f), x.previous(l)); }
+
+ //! <b>Requires</b>: pos must be a dereferenceable iterator in *this
+ //! and f and l belong to x and f and l a valid range on x.
+ //! n == distance(f, l).
+ //!
+ //! <b>Effects</b>: Transfers the range [f, l) from list x to this
+ //! list, before the element pointed by pos.
+ //! No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the sum of elements before pos, f, and l.
+ //! Linear to the sum of elements before f and l
+ //! if cache_last<> is true and pos == end().
+ //!
+ //! <b>Note</b>: Iterators of values obtained from list x now point to elements of this
+ //! list. Iterators of this list and all the references are not invalidated.
+ void splice(const_iterator pos, slist_impl &x, const_iterator f, const_iterator l, size_type n)
+ { return this->splice_after(this->previous(pos), x, x.previous(f), x.previous(l), n); }
+
+ //! <b>Effects</b>: This function sorts the list *this according to std::less<value_type>.
+ //! The sort is stable, that is, the relative order of equivalent elements is preserved.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or the predicate throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: The number of comparisons is approximately N log N, where N
+ //! is the list's size.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated
+ template<class Predicate>
+ void sort(Predicate p)
+ {
+ if (node_traits::get_next(node_traits::get_next(this->get_root_node()))
+ != this->get_root_node()) {
+
+ slist_impl carry(this->priv_value_traits());
+ detail::array_initializer<slist_impl, 64> counter(this->priv_value_traits());
+ int fill = 0;
+ const_iterator last_inserted;
+ while(!this->empty()){
+ last_inserted = this->cbegin();
+ carry.splice_after(carry.cbefore_begin(), *this, this->cbefore_begin());
+ int i = 0;
+ while(i < fill && !counter[i].empty()) {
+ carry.swap(counter[i]);
+ carry.merge(counter[i++], p, &last_inserted);
+ }
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(counter[i].empty());
+ const_iterator last_element(carry.previous(last_inserted, carry.end()));
+
+ if(constant_time_size){
+ counter[i].splice_after( counter[i].cbefore_begin(), carry
+ , carry.cbefore_begin(), last_element
+ , carry.size());
+ }
+ else{
+ counter[i].splice_after( counter[i].cbefore_begin(), carry
+ , carry.cbefore_begin(), last_element);
+ }
+ if(i == fill)
+ ++fill;
+ }
+
+ for (int i = 1; i < fill; ++i)
+ counter[i].merge(counter[i-1], p, &last_inserted);
+ --fill;
+ const_iterator last_element(counter[fill].previous(last_inserted, counter[fill].end()));
+ if(constant_time_size){
+ this->splice_after( cbefore_begin(), counter[fill], counter[fill].cbefore_begin()
+ , last_element, counter[fill].size());
+ }
+ else{
+ this->splice_after( cbefore_begin(), counter[fill], counter[fill].cbefore_begin()
+ , last_element);
+ }
+ }
+ }
+
+ //! <b>Requires</b>: p must be a comparison function that induces a strict weak
+ //! ordering and both *this and x must be sorted according to that ordering
+ //! The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this. The merge is stable; that is, if an element from *this is
+ //! equivalent to one from x, then the element from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: If value_traits::node_traits::node
+ //! constructor throws (this does not happen with predefined Boost.Intrusive hooks)
+ //! or std::less<value_type> throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated.
+ void sort()
+ { this->sort(std::less<value_type>()); }
+
+ //! <b>Requires</b>: p must be a comparison function that induces a strict weak
+ //! ordering and both *this and x must be sorted according to that ordering
+ //! The lists x and *this must be distinct.
+ //!
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this. The merge is stable; that is, if an element from *this is
+ //! equivalent to one from x, then the element from *this will precede the one from x.
+ //!
+ //! <b>Returns</b>: Nothing.
+ //!
+ //! <b>Throws</b>: If the predicate throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated.
+ //!
+ //! <b>Additional note</b>: If optional "l" argument is passed, it is assigned
+ //! to an iterator to the last transferred value or end() is x is empty.
+ template<class Predicate>
+ void merge(slist_impl& x, Predicate p, const_iterator *l = 0)
+ {
+ const_iterator e(this->cend()), ex(x.cend()), bb(this->cbefore_begin()),
+ bb_next;
+ if(l) *l = e.unconst();
+ while(!x.empty()){
+ const_iterator ibx_next(x.cbefore_begin()), ibx(ibx_next++);
+ while (++(bb_next = bb) != e && !p(*ibx_next, *bb_next)){
+ bb = bb_next;
+ }
+ if(bb_next == e){
+ //Now transfer the rest to the end of the container
+ this->splice_after(bb, x, l);
+ break;
+ }
+ else{
+ size_type n(0);
+ do{
+ ibx = ibx_next; ++n;
+ } while(++(ibx_next = ibx) != ex && p(*ibx_next, *bb_next));
+ this->splice_after(bb, x, x.before_begin(), ibx, n);
+ if(l) *l = ibx;
+ }
+ }
+ }
+
+ //! <b>Effects</b>: This function removes all of x's elements and inserts them
+ //! in order into *this according to std::less<value_type>. The merge is stable;
+ //! that is, if an element from *this is equivalent to one from x, then the element
+ //! from *this will precede the one from x.
+ //!
+ //! <b>Throws</b>: if std::less<value_type> throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: This function is linear time: it performs at most
+ //! size() + x.size() - 1 comparisons.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated
+ void merge(slist_impl& x)
+ { this->merge(x, std::less<value_type>()); }
+
+ //! <b>Effects</b>: Reverses the order of elements in the list.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: This function is linear to the contained elements.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated
+ void reverse()
+ {
+ if(cache_last && !this->empty()){
+ this->set_last_node(node_traits::get_next(this->get_root_node()));
+ }
+ this->priv_reverse(detail::bool_<linear>());
+ }
+
+ //! <b>Effects</b>: Removes all the elements that compare equal to value.
+ //! No destructors are called.
+ //!
+ //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid. This function is
+ //! linear time: it performs exactly size() comparisons for equality.
+ void remove(const_reference value)
+ { this->remove_if(detail::equal_to_value<const_reference>(value)); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Removes all the elements that compare equal to value.
+ //! Disposer::operator()(pointer) is called for every removed element.
+ //!
+ //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template<class Disposer>
+ void remove_and_dispose(const_reference value, Disposer disposer)
+ { this->remove_and_dispose_if(detail::equal_to_value<const_reference>(value), disposer); }
+
+ //! <b>Effects</b>: Removes all the elements for which a specified
+ //! predicate is satisfied. No destructors are called.
+ //!
+ //! <b>Throws</b>: If pred throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: Linear time. It performs exactly size() calls to the predicate.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template<class Pred>
+ void remove_if(Pred pred)
+ {
+ const node_ptr bbeg = this->get_root_node();
+ typename node_algorithms::stable_partition_info info;
+ node_algorithms::stable_partition
+ (bbeg, this->get_end_node(), detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
+ //After cache last is set, slist invariants are preserved...
+ if(cache_last){
+ this->set_last_node(info.new_last_node);
+ }
+ //...so erase can be safely called
+ this->erase_after( const_iterator(bbeg, this->priv_value_traits_ptr())
+ , const_iterator(info.beg_2st_partition, this->priv_value_traits_ptr())
+ , info.num_1st_partition);
+ }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Removes all the elements for which a specified
+ //! predicate is satisfied.
+ //! Disposer::operator()(pointer) is called for every removed element.
+ //!
+ //! <b>Throws</b>: If pred throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: Linear time. It performs exactly size() comparisons for equality.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template<class Pred, class Disposer>
+ void remove_and_dispose_if(Pred pred, Disposer disposer)
+ {
+ const node_ptr bbeg = this->get_root_node();
+ typename node_algorithms::stable_partition_info info;
+ node_algorithms::stable_partition
+ (bbeg, this->get_end_node(), detail::key_nodeptr_comp<Pred, value_traits>(pred, &this->priv_value_traits()), info);
+ //After cache last is set, slist invariants are preserved...
+ if(cache_last){
+ this->set_last_node(info.new_last_node);
+ }
+ //...so erase can be safely called
+ this->erase_after_and_dispose( const_iterator(bbeg, this->priv_value_traits_ptr())
+ , const_iterator(info.beg_2st_partition, this->priv_value_traits_ptr())
+ , disposer);
+ }
+
+ //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
+ //! elements that are equal from the list. No destructors are called.
+ //!
+ //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: Linear time (size()-1) comparisons calls to pred()).
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ void unique()
+ { this->unique_and_dispose(std::equal_to<value_type>(), detail::null_disposer()); }
+
+ //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
+ //! elements that satisfy some binary predicate from the list.
+ //! No destructors are called.
+ //!
+ //! <b>Throws</b>: If the predicate throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: Linear time (size()-1) comparisons equality comparisons.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template<class BinaryPredicate>
+ void unique(BinaryPredicate pred)
+ { this->unique_and_dispose(pred, detail::null_disposer()); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
+ //! elements that satisfy some binary predicate from the list.
+ //! Disposer::operator()(pointer) is called for every removed element.
+ //!
+ //! <b>Throws</b>: If std::equal_to<value_type> throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: Linear time (size()-1) comparisons equality comparisons.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template<class Disposer>
+ void unique_and_dispose(Disposer disposer)
+ { this->unique(std::equal_to<value_type>(), disposer); }
+
+ //! <b>Requires</b>: Disposer::operator()(pointer) shouldn't throw.
+ //!
+ //! <b>Effects</b>: Removes adjacent duplicate elements or adjacent
+ //! elements that satisfy some binary predicate from the list.
+ //! Disposer::operator()(pointer) is called for every removed element.
+ //!
+ //! <b>Throws</b>: If the predicate throws. Basic guarantee.
+ //!
+ //! <b>Complexity</b>: Linear time (size()-1) comparisons equality comparisons.
+ //!
+ //! <b>Note</b>: The relative order of elements that are not removed is unchanged,
+ //! and iterators to elements that are not removed remain valid.
+ template<class BinaryPredicate, class Disposer>
+ void unique_and_dispose(BinaryPredicate pred, Disposer disposer)
+ {
+ const_iterator end_n(this->cend());
+ const_iterator bcur(this->cbegin());
+ if(bcur != end_n){
+ const_iterator cur(bcur);
+ ++cur;
+ while(cur != end_n) {
+ if (pred(*bcur, *cur)){
+ cur = this->erase_after_and_dispose(bcur, disposer);
+ }
+ else{
+ bcur = cur;
+ ++cur;
+ }
+ }
+ if(cache_last){
+ this->set_last_node(bcur.pointed_node());
+ }
+ }
+ }
+
+ //! <b>Requires</b>: value must be a reference to a value inserted in a list.
+ //!
+ //! <b>Effects</b>: This function returns a const_iterator pointing to the element
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated.
+ //! This static function is available only if the <i>value traits</i>
+ //! is stateless.
+ static iterator s_iterator_to(reference value)
+ {
+ BOOST_STATIC_ASSERT((!stateful_value_traits));
+ return iterator (value_traits::to_node_ptr(value), const_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: value must be a const reference to a value inserted in a list.
+ //!
+ //! <b>Effects</b>: This function returns an iterator pointing to the element.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated.
+ //! This static function is available only if the <i>value traits</i>
+ //! is stateless.
+ static const_iterator s_iterator_to(const_reference value)
+ {
+ BOOST_STATIC_ASSERT((!stateful_value_traits));
+ reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
+ return const_iterator(value_traits::to_node_ptr(r), const_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: value must be a reference to a value inserted in a list.
+ //!
+ //! <b>Effects</b>: This function returns a const_iterator pointing to the element
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated.
+ iterator iterator_to(reference value)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(linear || !node_algorithms::inited(this->priv_value_traits().to_node_ptr(value)));
+ return iterator (this->priv_value_traits().to_node_ptr(value), this->priv_value_traits_ptr());
+ }
+
+ //! <b>Requires</b>: value must be a const reference to a value inserted in a list.
+ //!
+ //! <b>Effects</b>: This function returns an iterator pointing to the element.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Note</b>: Iterators and references are not invalidated.
+ const_iterator iterator_to(const_reference value) const
+ {
+ reference r =*detail::uncast(pointer_traits<const_pointer>::pointer_to(value));
+ BOOST_INTRUSIVE_INVARIANT_ASSERT (linear || !node_algorithms::inited(this->priv_value_traits().to_node_ptr(r)));
+ return const_iterator(this->priv_value_traits().to_node_ptr(r), this->priv_value_traits_ptr());
+ }
+
+ //! <b>Returns</b>: The iterator to the element before i in the list.
+ //! Returns the end-iterator, if either i is the begin-iterator or the
+ //! list is empty.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements before i.
+ //! Constant if cache_last<> is true and i == end().
+ iterator previous(iterator i)
+ { return this->previous(this->cbefore_begin(), i); }
+
+ //! <b>Returns</b>: The const_iterator to the element before i in the list.
+ //! Returns the end-const_iterator, if either i is the begin-const_iterator or
+ //! the list is empty.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements before i.
+ //! Constant if cache_last<> is true and i == end().
+ const_iterator previous(const_iterator i) const
+ { return this->previous(this->cbefore_begin(), i); }
+
+ //! <b>Returns</b>: The iterator to the element before i in the list,
+ //! starting the search on element after prev_from.
+ //! Returns the end-iterator, if either i is the begin-iterator or the
+ //! list is empty.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements before i.
+ //! Constant if cache_last<> is true and i == end().
+ iterator previous(const_iterator prev_from, iterator i)
+ { return this->previous(prev_from, const_iterator(i)).unconst(); }
+
+ //! <b>Returns</b>: The const_iterator to the element before i in the list,
+ //! starting the search on element after prev_from.
+ //! Returns the end-const_iterator, if either i is the begin-const_iterator or
+ //! the list is empty.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements before i.
+ //! Constant if cache_last<> is true and i == end().
+ const_iterator previous(const_iterator prev_from, const_iterator i) const
+ {
+ if(cache_last && (i.pointed_node() == this->get_end_node())){
+ return const_iterator(detail::uncast(this->get_last_node()), this->priv_value_traits_ptr());
+ }
+ return const_iterator
+ (node_algorithms::get_previous_node
+ (prev_from.pointed_node(), i.pointed_node()), this->priv_value_traits_ptr());
+ }
+
+ ///@cond
+
+ //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
+ //! before_begin(), and f and before_l belong to another slist.
+ //!
+ //! <b>Effects</b>: Transfers the range [f, before_l] to this
+ //! list, after the element pointed by prev_pos.
+ //! No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Linear to the number of elements transferred
+ //! if constant_time_size is true. Constant-time otherwise.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from the list that owned f and before_l now
+ //! point to elements of this list. Iterators of this list and all the references are not invalidated.
+ //!
+ //! <b>Warning</b>: Experimental function, don't use it!
+ void incorporate_after(const_iterator prev_pos, const node_ptr & f, const node_ptr & before_l)
+ {
+ if(constant_time_size)
+ this->incorporate_after(prev_pos, f, before_l, node_algorithms::distance(f.pointed_node(), before_l.pointed_node())+1);
+ else
+ this->priv_incorporate_after(prev_pos.pointed_node(), f, before_l);
+ }
+
+ //! <b>Requires</b>: prev_pos must be a dereferenceable iterator in *this or be
+ //! before_begin(), and f and before_l belong to another slist.
+ //! n == distance(f, before_l) + 1.
+ //!
+ //! <b>Effects</b>: Transfers the range [f, before_l] to this
+ //! list, after the element pointed by prev_pos.
+ //! No destructors or copy constructors are called.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Note</b>: Iterators of values obtained from the list that owned f and before_l now
+ //! point to elements of this list. Iterators of this list and all the references are not invalidated.
+ //!
+ //! <b>Warning</b>: Experimental function, don't use it!
+ void incorporate_after(const_iterator prev_pos, const node_ptr & f, const node_ptr & before_l, size_type n)
+ {
+ if(n){
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(n > 0);
+ BOOST_INTRUSIVE_INVARIANT_ASSERT
+ (size_type(boost::intrusive::iterator_distance
+ ( iterator(f, this->priv_value_traits_ptr())
+ , iterator(before_l, this->priv_value_traits_ptr())))
+ +1 == n);
+ this->priv_incorporate_after(prev_pos.pointed_node(), f, before_l);
+ if(constant_time_size){
+ this->priv_size_traits().increase(n);
+ }
+ }
+ }
+
+ ///@endcond
+
+ //! <b>Effects</b>: Asserts the integrity of the container.
+ //!
+ //! <b>Complexity</b>: Linear time.
+ //!
+ //! <b>Note</b>: The method has no effect when asserts are turned off (e.g., with NDEBUG).
+ //! Experimental function, interface might change in future versions.
+ void check() const
+ {
+ const_node_ptr header_ptr = get_root_node();
+ // header's next is never null
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(node_traits::get_next(header_ptr));
+ if (node_traits::get_next(header_ptr) == header_ptr)
+ {
+ if (constant_time_size)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_size_traits().get_size() == 0);
+ return;
+ }
+ size_t node_count = 0;
+ const_node_ptr p = header_ptr;
+ while (true)
+ {
+ const_node_ptr next_p = node_traits::get_next(p);
+ if (!linear)
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(next_p);
+ }
+ else
+ {
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(next_p != header_ptr);
+ }
+ if ((!linear && next_p == header_ptr) || (linear && !next_p))
+ {
+ if (cache_last)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(get_last_node() == p);
+ break;
+ }
+ p = next_p;
+ ++node_count;
+ }
+ if (constant_time_size)
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(this->priv_size_traits().get_size() == node_count);
+ }
+
+
+ friend bool operator==(const slist_impl &x, const slist_impl &y)
+ {
+ if(constant_time_size && x.size() != y.size()){
+ return false;
+ }
+ return ::boost::intrusive::algo_equal(x.cbegin(), x.cend(), y.cbegin(), y.cend());
+ }
+
+ friend bool operator!=(const slist_impl &x, const slist_impl &y)
+ { return !(x == y); }
+
+ friend bool operator<(const slist_impl &x, const slist_impl &y)
+ { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ friend bool operator>(const slist_impl &x, const slist_impl &y)
+ { return y < x; }
+
+ friend bool operator<=(const slist_impl &x, const slist_impl &y)
+ { return !(y < x); }
+
+ friend bool operator>=(const slist_impl &x, const slist_impl &y)
+ { return !(x < y); }
+
+ friend void swap(slist_impl &x, slist_impl &y)
+ { x.swap(y); }
+
+ private:
+ void priv_splice_after(node_ptr prev_pos_n, slist_impl &x, node_ptr before_f_n, node_ptr before_l_n)
+ {
+ if (cache_last && (before_f_n != before_l_n)){
+ if(prev_pos_n == this->get_last_node()){
+ this->set_last_node(before_l_n);
+ }
+ if(&x != this && node_traits::get_next(before_l_n) == x.get_end_node()){
+ x.set_last_node(before_f_n);
+ }
+ }
+ node_algorithms::transfer_after(prev_pos_n, before_f_n, before_l_n);
+ }
+
+ void priv_incorporate_after(node_ptr prev_pos_n, node_ptr first_n, node_ptr before_l_n)
+ {
+ if(cache_last){
+ if(prev_pos_n == this->get_last_node()){
+ this->set_last_node(before_l_n);
+ }
+ }
+ node_algorithms::incorporate_after(prev_pos_n, first_n, before_l_n);
+ }
+
+ void priv_reverse(detail::bool_<false>)
+ { node_algorithms::reverse(this->get_root_node()); }
+
+ void priv_reverse(detail::bool_<true>)
+ {
+ node_ptr new_first = node_algorithms::reverse
+ (node_traits::get_next(this->get_root_node()));
+ node_traits::set_next(this->get_root_node(), new_first);
+ }
+
+ void priv_shift_backwards(size_type n, detail::bool_<false>)
+ {
+ node_ptr l = node_algorithms::move_forward(this->get_root_node(), (std::size_t)n);
+ if(cache_last && l){
+ this->set_last_node(l);
+ }
+ }
+
+ void priv_shift_backwards(size_type n, detail::bool_<true>)
+ {
+ std::pair<node_ptr, node_ptr> ret(
+ node_algorithms::move_first_n_forward
+ (node_traits::get_next(this->get_root_node()), (std::size_t)n));
+ if(ret.first){
+ node_traits::set_next(this->get_root_node(), ret.first);
+ if(cache_last){
+ this->set_last_node(ret.second);
+ }
+ }
+ }
+
+ void priv_shift_forward(size_type n, detail::bool_<false>)
+ {
+ node_ptr l = node_algorithms::move_backwards(this->get_root_node(), (std::size_t)n);
+ if(cache_last && l){
+ this->set_last_node(l);
+ }
+ }
+
+ void priv_shift_forward(size_type n, detail::bool_<true>)
+ {
+ std::pair<node_ptr, node_ptr> ret(
+ node_algorithms::move_first_n_backwards
+ (node_traits::get_next(this->get_root_node()), (std::size_t)n));
+ if(ret.first){
+ node_traits::set_next(this->get_root_node(), ret.first);
+ if(cache_last){
+ this->set_last_node(ret.second);
+ }
+ }
+ }
+
+ static void priv_swap_cache_last(slist_impl *this_impl, slist_impl *other_impl)
+ {
+ bool other_was_empty = false;
+ if(this_impl->empty()){
+ //Check if both are empty or
+ if(other_impl->empty())
+ return;
+ //If this is empty swap pointers
+ slist_impl *tmp = this_impl;
+ this_impl = other_impl;
+ other_impl = tmp;
+ other_was_empty = true;
+ }
+ else{
+ other_was_empty = other_impl->empty();
+ }
+
+ //Precondition: this is not empty
+ node_ptr other_old_last(other_impl->get_last_node());
+ node_ptr other_bfirst(other_impl->get_root_node());
+ node_ptr this_bfirst(this_impl->get_root_node());
+ node_ptr this_old_last(this_impl->get_last_node());
+
+ //Move all nodes from this to other's beginning
+ node_algorithms::transfer_after(other_bfirst, this_bfirst, this_old_last);
+ other_impl->set_last_node(this_old_last);
+
+ if(other_was_empty){
+ this_impl->set_last_node(this_bfirst);
+ }
+ else{
+ //Move trailing nodes from other to this
+ node_algorithms::transfer_after(this_bfirst, this_old_last, other_old_last);
+ this_impl->set_last_node(other_old_last);
+ }
+ }
+
+ //circular version
+ static void priv_swap_lists(node_ptr this_node, node_ptr other_node, detail::bool_<false>)
+ { node_algorithms::swap_nodes(this_node, other_node); }
+
+ //linear version
+ static void priv_swap_lists(node_ptr this_node, node_ptr other_node, detail::bool_<true>)
+ { node_algorithms::swap_trailing_nodes(this_node, other_node); }
+
+ static slist_impl &priv_container_from_end_iterator(const const_iterator &end_iterator)
+ {
+ //Obtaining the container from the end iterator is not possible with linear
+ //singly linked lists (because "end" is represented by the null pointer)
+ BOOST_STATIC_ASSERT(!linear);
+ BOOST_STATIC_ASSERT((has_container_from_iterator));
+ node_ptr p = end_iterator.pointed_node();
+ header_holder_type* h = header_holder_type::get_holder(p);
+ header_holder_plus_last_t* hpl = detail::parent_from_member< header_holder_plus_last_t, header_holder_type>
+ (h, &header_holder_plus_last_t::header_holder_);
+ root_plus_size* r = static_cast< root_plus_size* >(hpl);
+ data_t *d = detail::parent_from_member<data_t, root_plus_size>
+ ( r, &data_t::root_plus_size_);
+ slist_impl *s = detail::parent_from_member<slist_impl, data_t>(d, &slist_impl::data_);
+ return *s;
+ }
+};
+
+//! Helper metafunction to define a \c slist that yields to the same type when the
+//! same options (either explicitly or implicitly) are used.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class T, class ...Options>
+#else
+template<class T, class O1 = void, class O2 = void, class O3 = void, class O4 = void, class O5 = void, class O6 = void>
+#endif
+struct make_slist
+{
+ /// @cond
+ typedef typename pack_options
+ < slist_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef typename detail::get_value_traits
+ <T, typename packed_options::proto_value_traits>::type value_traits;
+ typedef slist_impl
+ < value_traits
+ , typename packed_options::size_type
+ , (std::size_t(packed_options::linear)*slist_bool_flags::linear_pos)
+ |(std::size_t(packed_options::constant_time_size)*slist_bool_flags::constant_time_size_pos)
+ |(std::size_t(packed_options::cache_last)*slist_bool_flags::cache_last_pos)
+ , typename packed_options::header_holder_type
+ > implementation_defined;
+ /// @endcond
+ typedef implementation_defined type;
+};
+
+
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class T, class O1, class O2, class O3, class O4, class O5, class O6>
+#else
+template<class T, class ...Options>
+#endif
+class slist
+ : public make_slist<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_slist
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6
+ #else
+ Options...
+ #endif
+ >::type Base;
+ //Assert if passed value traits are compatible with the type
+ BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(slist)
+
+ public:
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::size_type size_type;
+ typedef typename Base::node_ptr node_ptr;
+
+ slist()
+ : Base()
+ {}
+
+ explicit slist(const value_traits &v_traits)
+ : Base(v_traits)
+ {}
+
+ struct incorporate_t{};
+
+ slist( const node_ptr & f, const node_ptr & before_l
+ , size_type n, const value_traits &v_traits = value_traits())
+ : Base(f, before_l, n, v_traits)
+ {}
+
+ template<class Iterator>
+ slist(Iterator b, Iterator e, const value_traits &v_traits = value_traits())
+ : Base(b, e, v_traits)
+ {}
+
+ slist(BOOST_RV_REF(slist) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ slist& operator=(BOOST_RV_REF(slist) x)
+ { return static_cast<slist &>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ void clone_from(const slist &src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(src, cloner, disposer); }
+
+ template <class Cloner, class Disposer>
+ void clone_from(BOOST_RV_REF(slist) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+
+ static slist &container_from_end_iterator(iterator end_iterator)
+ { return static_cast<slist &>(Base::container_from_end_iterator(end_iterator)); }
+
+ static const slist &container_from_end_iterator(const_iterator end_iterator)
+ { return static_cast<const slist &>(Base::container_from_end_iterator(end_iterator)); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SLIST_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/slist_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/slist_hook.hpp
index 0f37772c6d1..0f37772c6d1 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/slist_hook.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/slist_hook.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/splay_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/splay_set.hpp
index da7662eeb14..da7662eeb14 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/splay_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/splay_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/splaytree.hpp b/src/third_party/boost-1.69.0/boost/intrusive/splaytree.hpp
index f6a1a93a9dd..f6a1a93a9dd 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/splaytree.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/splaytree.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/splaytree_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/splaytree_algorithms.hpp
new file mode 100644
index 00000000000..6376d32afdf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/splaytree_algorithms.hpp
@@ -0,0 +1,754 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+// The implementation of splay trees is based on the article and code published
+// in C++ Users Journal "Implementing Splay Trees in C++" (September 1, 2005).
+//
+// The splay code has been modified and (supposedly) improved by Ion Gaztanaga.
+//
+// Here is the copyright notice of the original file containing the splay code:
+//
+// splay_tree.h -- implementation of a STL compatible splay tree.
+//
+// Copyright (c) 2004 Ralf Mattethat
+//
+// Permission to copy, use, modify, sell and distribute this software
+// is granted provided this copyright notice appears in all copies.
+// This software is provided "as is" without express or implied
+// warranty, and with no claim as to its suitability for any purpose.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/intrusive/detail/uncast.hpp>
+#include <boost/intrusive/bstree_algorithms.hpp>
+
+#include <cstddef>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+namespace detail {
+
+template<class NodeTraits>
+struct splaydown_assemble_and_fix_header
+{
+ typedef typename NodeTraits::node_ptr node_ptr;
+
+ splaydown_assemble_and_fix_header(node_ptr t, node_ptr header, node_ptr leftmost, node_ptr rightmost)
+ : t_(t)
+ , null_node_(header)
+ , l_(null_node_)
+ , r_(null_node_)
+ , leftmost_(leftmost)
+ , rightmost_(rightmost)
+ {}
+
+ ~splaydown_assemble_and_fix_header()
+ {
+ this->assemble();
+
+ //Now recover the original header except for the
+ //splayed root node.
+ //"t_" is the current root and "null_node_" is the header node
+ NodeTraits::set_parent(null_node_, t_);
+ NodeTraits::set_parent(t_, null_node_);
+ //Recover leftmost/rightmost pointers
+ NodeTraits::set_left (null_node_, leftmost_);
+ NodeTraits::set_right(null_node_, rightmost_);
+ }
+
+ private:
+
+ void assemble()
+ {
+ //procedure assemble;
+ // left(r), right(l) := right(t), left(t);
+ // left(t), right(t) := right(null), left(null);
+ //end assemble;
+ { // left(r), right(l) := right(t), left(t);
+
+ node_ptr const old_t_left = NodeTraits::get_left(t_);
+ node_ptr const old_t_right = NodeTraits::get_right(t_);
+ NodeTraits::set_right(l_, old_t_left);
+ NodeTraits::set_left (r_, old_t_right);
+ if(old_t_left){
+ NodeTraits::set_parent(old_t_left, l_);
+ }
+ if(old_t_right){
+ NodeTraits::set_parent(old_t_right, r_);
+ }
+ }
+ { // left(t), right(t) := right(null), left(null);
+ node_ptr const null_right = NodeTraits::get_right(null_node_);
+ node_ptr const null_left = NodeTraits::get_left(null_node_);
+ NodeTraits::set_left (t_, null_right);
+ NodeTraits::set_right(t_, null_left);
+ if(null_right){
+ NodeTraits::set_parent(null_right, t_);
+ }
+ if(null_left){
+ NodeTraits::set_parent(null_left, t_);
+ }
+ }
+ }
+
+ public:
+ node_ptr t_, null_node_, l_, r_, leftmost_, rightmost_;
+};
+
+} //namespace detail {
+/// @endcond
+
+//! A splay tree is an implementation of a binary search tree. The tree is
+//! self balancing using the splay algorithm as described in
+//!
+//! "Self-Adjusting Binary Search Trees
+//! by Daniel Dominic Sleator and Robert Endre Tarjan
+//! AT&T Bell Laboratories, Murray Hill, NJ
+//! Journal of the ACM, Vol 32, no 3, July 1985, pp 652-686
+//!
+//! splaytree_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the binary search tree
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
+//!
+//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
+//!
+//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
+template<class NodeTraits>
+class splaytree_algorithms
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_algorithms<NodeTraits>
+ #endif
+{
+ /// @cond
+ private:
+ typedef bstree_algorithms<NodeTraits> bstree_algo;
+ /// @endcond
+
+ public:
+ typedef typename NodeTraits::node node;
+ typedef NodeTraits node_traits;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+
+ //! This type is the information that will be
+ //! filled by insert_unique_check
+ typedef typename bstree_algo::insert_commit_data insert_commit_data;
+
+ public:
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
+ static node_ptr get_header(const const_node_ptr & n);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
+ static node_ptr begin_node(const const_node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
+ static node_ptr end_node(const const_node_ptr & header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
+ static void swap_tree(const node_ptr & header1, const node_ptr & header2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr node2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
+ static void unlink(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
+ static node_ptr unlink_leftmost_without_rebalance(node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
+ static bool unique(const_node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
+ static std::size_t size(const_node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
+ static node_ptr next_node(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
+ static node_ptr prev_node(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
+ static void init(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
+ static void init_header(node_ptr header);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
+ //! Additional notes: the previous node of z is splayed to speed up range deletions.
+ static void erase(node_ptr header, node_ptr z)
+ {
+ //posibility 1
+ if(NodeTraits::get_left(z)){
+ splay_up(bstree_algo::prev_node(z), header);
+ }
+
+ //possibility 2
+ //if(NodeTraits::get_left(z)){
+ // node_ptr l = NodeTraits::get_left(z);
+ // splay_up(l, header);
+ //}
+
+ //if(NodeTraits::get_left(z)){
+ // node_ptr l = bstree_algo::prev_node(z);
+ // splay_up_impl(l, z);
+ //}
+
+ //possibility 4
+ //splay_up(z, header);
+
+ bstree_algo::erase(header, z);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare>
+ static bool transfer_unique
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z)
+ {
+ typename bstree_algo::insert_commit_data commit_data;
+ bool const transferable = bstree_algo::insert_unique_check(header1, z, comp, commit_data).second;
+ if(transferable){
+ erase(header2, z);
+ bstree_algo::insert_commit(header1, z, commit_data);
+ splay_up(z, header1);
+ }
+ return transferable;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare>
+ static void transfer_equal
+ (node_ptr header1, NodePtrCompare comp, node_ptr header2, node_ptr z)
+ {
+ insert_commit_data commit_data;
+ splay_down(header1, z, comp);
+ bstree_algo::insert_equal_upper_bound_check(header1, z, comp, commit_data);
+ erase(header2, z);
+ bstree_algo::insert_commit(header1, z, commit_data);
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ static void clone
+ (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
+ template<class Disposer>
+ static void clear_and_dispose(node_ptr header, Disposer disposer);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional notes: an element with key `key` is splayed.
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::size_t count
+ (node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ std::pair<node_ptr, node_ptr> ret = equal_range(header, key, comp);
+ std::size_t n = 0;
+ while(ret.first != ret.second){
+ ++n;
+ ret.first = next_node(ret.first);
+ }
+ return n;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional note: no splaying is performed
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::size_t count
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ { return bstree_algo::count(header, key, comp); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional notes: the first node of the range is splayed.
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr lower_bound
+ (node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ splay_down(detail::uncast(header), key, comp);
+ node_ptr y = bstree_algo::lower_bound(header, key, comp);
+ //splay_up(y, detail::uncast(header));
+ return y;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional note: no splaying is performed
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr lower_bound
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ { return bstree_algo::lower_bound(header, key, comp); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional notes: the first node of the range is splayed.
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr upper_bound
+ (node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ splay_down(detail::uncast(header), key, comp);
+ node_ptr y = bstree_algo::upper_bound(header, key, comp);
+ //splay_up(y, detail::uncast(header));
+ return y;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional note: no splaying is performed
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr upper_bound
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ { return bstree_algo::upper_bound(header, key, comp); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
+ //! Additional notes: the found node of the lower bound is splayed.
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr find
+ (node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ splay_down(detail::uncast(header), key, comp);
+ return bstree_algo::find(header, key, comp);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
+ //! Additional note: no splaying is performed
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr find
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ { return bstree_algo::find(header, key, comp); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional notes: the first node of the range is splayed.
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> equal_range
+ (node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ splay_down(detail::uncast(header), key, comp);
+ std::pair<node_ptr, node_ptr> ret = bstree_algo::equal_range(header, key, comp);
+ //splay_up(ret.first, detail::uncast(header));
+ return ret;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional note: no splaying is performed
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> equal_range
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ { return bstree_algo::equal_range(header, key, comp); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional notes: the first node of the range is splayed.
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> lower_bound_range
+ (node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ {
+ splay_down(detail::uncast(header), key, comp);
+ std::pair<node_ptr, node_ptr> ret = bstree_algo::lower_bound_range(header, key, comp);
+ //splay_up(ret.first, detail::uncast(header));
+ return ret;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ //! Additional note: no splaying is performed
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> lower_bound_range
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp)
+ { return bstree_algo::lower_bound_range(header, key, comp); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
+ //! Additional notes: the first node of the range is splayed.
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> bounded_range
+ (node_ptr header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
+ , bool left_closed, bool right_closed)
+ {
+ splay_down(detail::uncast(header), lower_key, comp);
+ std::pair<node_ptr, node_ptr> ret =
+ bstree_algo::bounded_range(header, lower_key, upper_key, comp, left_closed, right_closed);
+ //splay_up(ret.first, detail::uncast(header));
+ return ret;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
+ //! Additional note: no splaying is performed
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> bounded_range
+ (const_node_ptr header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
+ , bool left_closed, bool right_closed)
+ { return bstree_algo::bounded_range(header, lower_key, upper_key, comp, left_closed, right_closed); }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_upper_bound(node_ptr,node_ptr,NodePtrCompare)
+ //! Additional note: the inserted node is splayed
+ template<class NodePtrCompare>
+ static node_ptr insert_equal_upper_bound
+ (node_ptr header, node_ptr new_node, NodePtrCompare comp)
+ {
+ splay_down(header, new_node, comp);
+ return bstree_algo::insert_equal_upper_bound(header, new_node, comp);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal_lower_bound(node_ptr,node_ptr,NodePtrCompare)
+ //! Additional note: the inserted node is splayed
+ template<class NodePtrCompare>
+ static node_ptr insert_equal_lower_bound
+ (node_ptr header, node_ptr new_node, NodePtrCompare comp)
+ {
+ splay_down(header, new_node, comp);
+ return bstree_algo::insert_equal_lower_bound(header, new_node, comp);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_equal(node_ptr,node_ptr,node_ptr,NodePtrCompare)
+ //! Additional note: the inserted node is splayed
+ template<class NodePtrCompare>
+ static node_ptr insert_equal
+ (node_ptr header, node_ptr hint, node_ptr new_node, NodePtrCompare comp)
+ {
+ splay_down(header, new_node, comp);
+ return bstree_algo::insert_equal(header, hint, new_node, comp);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_before(node_ptr,node_ptr,node_ptr)
+ //! Additional note: the inserted node is splayed
+ static node_ptr insert_before
+ (node_ptr header, node_ptr pos, node_ptr new_node)
+ {
+ bstree_algo::insert_before(header, pos, new_node);
+ splay_up(new_node, header);
+ return new_node;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::push_back(node_ptr,node_ptr)
+ //! Additional note: the inserted node is splayed
+ static void push_back(node_ptr header, node_ptr new_node)
+ {
+ bstree_algo::push_back(header, new_node);
+ splay_up(new_node, header);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::push_front(node_ptr,node_ptr)
+ //! Additional note: the inserted node is splayed
+ static void push_front(node_ptr header, node_ptr new_node)
+ {
+ bstree_algo::push_front(header, new_node);
+ splay_up(new_node, header);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
+ //! Additional note: nodes with the given key are splayed
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (node_ptr header, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
+ {
+ splay_down(header, key, comp);
+ return bstree_algo::insert_unique_check(header, key, comp, commit_data);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_check(const const_node_ptr&,const node_ptr&,const KeyType&,KeyNodePtrCompare,insert_commit_data&)
+ //! Additional note: nodes with the given key are splayed
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (node_ptr header, node_ptr hint, const KeyType &key
+ ,KeyNodePtrCompare comp, insert_commit_data &commit_data)
+ {
+ splay_down(header, key, comp);
+ return bstree_algo::insert_unique_check(header, hint, key, comp, commit_data);
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::insert_unique_commit(node_ptr,node_ptr,const insert_commit_data&)
+ static void insert_unique_commit
+ (node_ptr header, node_ptr new_value, const insert_commit_data &commit_data);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
+ static bool is_header(const_node_ptr p);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::rebalance
+ static void rebalance(node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::rebalance_subtree
+ static node_ptr rebalance_subtree(node_ptr old_root);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ // bottom-up splay, use data_ as parent for n | complexity : logarithmic | exception : nothrow
+ static void splay_up(node_ptr node, node_ptr header)
+ { priv_splay_up<true>(node, header); }
+
+ // top-down splay | complexity : logarithmic | exception : strong, note A
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr splay_down(node_ptr header, const KeyType &key, KeyNodePtrCompare comp, bool *pfound = 0)
+ { return priv_splay_down<true>(header, key, comp, pfound); }
+
+ private:
+
+ /// @cond
+
+ // bottom-up splay, use data_ as parent for n | complexity : logarithmic | exception : nothrow
+ template<bool SimpleSplay>
+ static void priv_splay_up(node_ptr node, node_ptr header)
+ {
+ // If (node == header) do a splay for the right most node instead
+ // this is to boost performance of equal_range/count on equivalent containers in the case
+ // where there are many equal elements at the end
+ node_ptr n((node == header) ? NodeTraits::get_right(header) : node);
+ node_ptr t(header);
+
+ if( n == t ) return;
+
+ for( ;; ){
+ node_ptr p(NodeTraits::get_parent(n));
+ node_ptr g(NodeTraits::get_parent(p));
+
+ if( p == t ) break;
+
+ if( g == t ){
+ // zig
+ rotate(n);
+ }
+ else if ((NodeTraits::get_left(p) == n && NodeTraits::get_left(g) == p) ||
+ (NodeTraits::get_right(p) == n && NodeTraits::get_right(g) == p) ){
+ // zig-zig
+ rotate(p);
+ rotate(n);
+ }
+ else {
+ // zig-zag
+ rotate(n);
+ if(!SimpleSplay){
+ rotate(n);
+ }
+ }
+ }
+ }
+
+ template<bool SimpleSplay, class KeyType, class KeyNodePtrCompare>
+ static node_ptr priv_splay_down(node_ptr header, const KeyType &key, KeyNodePtrCompare comp, bool *pfound = 0)
+ {
+ //Most splay tree implementations use a dummy/null node to implement.
+ //this function. This has some problems for a generic library like Intrusive:
+ //
+ // * The node might not have a default constructor.
+ // * The default constructor could throw.
+ //
+ //We already have a header node. Leftmost and rightmost nodes of the tree
+ //are not changed when splaying (because the invariants of the tree don't
+ //change) We can back up them, use the header as the null node and
+ //reassign old values after the function has been completed.
+ node_ptr const old_root = NodeTraits::get_parent(header);
+ node_ptr const leftmost = NodeTraits::get_left(header);
+ node_ptr const rightmost = NodeTraits::get_right(header);
+ if(leftmost == rightmost){ //Empty or unique node
+ if(pfound){
+ *pfound = old_root && !comp(key, old_root) && !comp(old_root, key);
+ }
+ return old_root ? old_root : header;
+ }
+ else{
+ //Initialize "null node" (the header in our case)
+ NodeTraits::set_left (header, node_ptr());
+ NodeTraits::set_right(header, node_ptr());
+ //Class that will backup leftmost/rightmost from header, commit the assemble(),
+ //and will restore leftmost/rightmost to header even if "comp" throws
+ detail::splaydown_assemble_and_fix_header<NodeTraits> commit(old_root, header, leftmost, rightmost);
+ bool found = false;
+
+ for( ;; ){
+ if(comp(key, commit.t_)){
+ node_ptr const t_left = NodeTraits::get_left(commit.t_);
+ if(!t_left)
+ break;
+ if(comp(key, t_left)){
+ bstree_algo::rotate_right_no_parent_fix(commit.t_, t_left);
+ commit.t_ = t_left;
+ if( !NodeTraits::get_left(commit.t_) )
+ break;
+ link_right(commit.t_, commit.r_);
+ }
+ else{
+ link_right(commit.t_, commit.r_);
+ if(!SimpleSplay && comp(t_left, key)){
+ if( !NodeTraits::get_right(commit.t_) )
+ break;
+ link_left(commit.t_, commit.l_);
+ }
+ }
+ }
+ else if(comp(commit.t_, key)){
+ node_ptr const t_right = NodeTraits::get_right(commit.t_);
+ if(!t_right)
+ break;
+
+ if(comp(t_right, key)){
+ bstree_algo::rotate_left_no_parent_fix(commit.t_, t_right);
+ commit.t_ = t_right;
+ if( !NodeTraits::get_right(commit.t_) )
+ break;
+ link_left(commit.t_, commit.l_);
+ }
+ else{
+ link_left(commit.t_, commit.l_);
+ if(!SimpleSplay && comp(key, t_right)){
+ if( !NodeTraits::get_left(commit.t_) )
+ break;
+ link_right(commit.t_, commit.r_);
+ }
+ }
+ }
+ else{
+ found = true;
+ break;
+ }
+ }
+
+ //commit.~splaydown_assemble_and_fix_header<NodeTraits>() will first
+ //"assemble()" + link the new root & recover header's leftmost & rightmost
+ if(pfound){
+ *pfound = found;
+ }
+ return commit.t_;
+ }
+ }
+
+ // break link to left child node and attach it to left tree pointed to by l | complexity : constant | exception : nothrow
+ static void link_left(node_ptr & t, node_ptr & l)
+ {
+ //procedure link_left;
+ // t, l, right(l) := right(t), t, t
+ //end link_left
+ NodeTraits::set_right(l, t);
+ NodeTraits::set_parent(t, l);
+ l = t;
+ t = NodeTraits::get_right(t);
+ }
+
+ // break link to right child node and attach it to right tree pointed to by r | complexity : constant | exception : nothrow
+ static void link_right(node_ptr & t, node_ptr & r)
+ {
+ //procedure link_right;
+ // t, r, left(r) := left(t), t, t
+ //end link_right;
+ NodeTraits::set_left(r, t);
+ NodeTraits::set_parent(t, r);
+ r = t;
+ t = NodeTraits::get_left(t);
+ }
+
+ // rotate n with its parent | complexity : constant | exception : nothrow
+ static void rotate(node_ptr n)
+ {
+ //procedure rotate_left;
+ // t, right(t), left(right(t)) := right(t), left(right(t)), t
+ //end rotate_left;
+ node_ptr p = NodeTraits::get_parent(n);
+ node_ptr g = NodeTraits::get_parent(p);
+ //Test if g is header before breaking tree
+ //invariants that would make is_header invalid
+ bool g_is_header = bstree_algo::is_header(g);
+
+ if(NodeTraits::get_left(p) == n){
+ NodeTraits::set_left(p, NodeTraits::get_right(n));
+ if(NodeTraits::get_left(p))
+ NodeTraits::set_parent(NodeTraits::get_left(p), p);
+ NodeTraits::set_right(n, p);
+ }
+ else{ // must be ( p->right == n )
+ NodeTraits::set_right(p, NodeTraits::get_left(n));
+ if(NodeTraits::get_right(p))
+ NodeTraits::set_parent(NodeTraits::get_right(p), p);
+ NodeTraits::set_left(n, p);
+ }
+
+ NodeTraits::set_parent(p, n);
+ NodeTraits::set_parent(n, g);
+
+ if(g_is_header){
+ if(NodeTraits::get_parent(g) == p)
+ NodeTraits::set_parent(g, n);
+ else{//must be ( g->right == p )
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(false);
+ NodeTraits::set_right(g, n);
+ }
+ }
+ else{
+ if(NodeTraits::get_left(g) == p)
+ NodeTraits::set_left(g, n);
+ else //must be ( g->right == p )
+ NodeTraits::set_right(g, n);
+ }
+ }
+
+ /// @endcond
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<SplayTreeAlgorithms, NodeTraits>
+{
+ typedef splaytree_algorithms<NodeTraits> type;
+};
+
+template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct get_node_checker<SplayTreeAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
+{
+ typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_SPLAYTREE_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/treap.hpp b/src/third_party/boost-1.69.0/boost/intrusive/treap.hpp
index c6f63ff2deb..c6f63ff2deb 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/treap.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/treap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/treap_algorithms.hpp b/src/third_party/boost-1.69.0/boost/intrusive/treap_algorithms.hpp
new file mode 100644
index 00000000000..e9b8b233975
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/treap_algorithms.hpp
@@ -0,0 +1,699 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2006-2014.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
+#define BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <cstddef>
+
+#include <boost/intrusive/detail/assert.hpp>
+#include <boost/intrusive/detail/algo_type.hpp>
+#include <boost/intrusive/bstree_algorithms.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+namespace detail
+{
+
+template<class ValueTraits, class NodePtrPrioCompare, class ExtraChecker>
+struct treap_node_extra_checker
+ : public ExtraChecker
+{
+ typedef ExtraChecker base_checker_t;
+ typedef ValueTraits value_traits;
+ typedef typename value_traits::node_traits node_traits;
+ typedef typename node_traits::const_node_ptr const_node_ptr;
+
+ typedef typename base_checker_t::return_type return_type;
+
+ treap_node_extra_checker(const NodePtrPrioCompare& prio_comp, ExtraChecker extra_checker)
+ : base_checker_t(extra_checker), prio_comp_(prio_comp)
+ {}
+
+ void operator () (const const_node_ptr& p,
+ const return_type& check_return_left, const return_type& check_return_right,
+ return_type& check_return)
+ {
+ if (node_traits::get_left(p))
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(!prio_comp_(node_traits::get_left(p), p));
+ if (node_traits::get_right(p))
+ BOOST_INTRUSIVE_INVARIANT_ASSERT(!prio_comp_(node_traits::get_right(p), p));
+ base_checker_t::operator()(p, check_return_left, check_return_right, check_return);
+ }
+
+ const NodePtrPrioCompare prio_comp_;
+};
+
+} // namespace detail
+
+#endif //#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+//! treap_algorithms provides basic algorithms to manipulate
+//! nodes forming a treap.
+//!
+//! (1) the header node is maintained with links not only to the root
+//! but also to the leftmost node of the tree, to enable constant time
+//! begin(), and to the rightmost node of the tree, to enable linear time
+//! performance when used with the generic set algorithms (set_union,
+//! etc.);
+//!
+//! (2) when a node being deleted has two children its successor node is
+//! relinked into its place, rather than copied, so that the only
+//! pointers invalidated are those referring to the deleted node.
+//!
+//! treap_algorithms is configured with a NodeTraits class, which encapsulates the
+//! information about the node to be manipulated. NodeTraits must support the
+//! following interface:
+//!
+//! <b>Typedefs</b>:
+//!
+//! <tt>node</tt>: The type of the node that forms the treap
+//!
+//! <tt>node_ptr</tt>: A pointer to a node
+//!
+//! <tt>const_node_ptr</tt>: A pointer to a const node
+//!
+//! <b>Static functions</b>:
+//!
+//! <tt>static node_ptr get_parent(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_parent(node_ptr n, node_ptr parent);</tt>
+//!
+//! <tt>static node_ptr get_left(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_left(node_ptr n, node_ptr left);</tt>
+//!
+//! <tt>static node_ptr get_right(const_node_ptr n);</tt>
+//!
+//! <tt>static void set_right(node_ptr n, node_ptr right);</tt>
+template<class NodeTraits>
+class treap_algorithms
+ #ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ : public bstree_algorithms<NodeTraits>
+ #endif
+{
+ public:
+ typedef NodeTraits node_traits;
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+
+ /// @cond
+ private:
+
+ typedef bstree_algorithms<NodeTraits> bstree_algo;
+
+ class rerotate_on_destroy
+ {
+ rerotate_on_destroy& operator=(const rerotate_on_destroy&);
+
+ public:
+ rerotate_on_destroy(node_ptr header, node_ptr p, std::size_t &n)
+ : header_(header), p_(p), n_(n), remove_it_(true)
+ {}
+
+ ~rerotate_on_destroy()
+ {
+ if(remove_it_){
+ rotate_up_n(header_, p_, n_);
+ }
+ }
+
+ void release()
+ { remove_it_ = false; }
+
+ const node_ptr header_;
+ const node_ptr p_;
+ std::size_t &n_;
+ bool remove_it_;
+ };
+
+ static void rotate_up_n(const node_ptr header, const node_ptr p, std::size_t n)
+ {
+ node_ptr p_parent(NodeTraits::get_parent(p));
+ node_ptr p_grandparent(NodeTraits::get_parent(p_parent));
+ while(n--){
+ if(p == NodeTraits::get_left(p_parent)){ //p is left child
+ bstree_algo::rotate_right(p_parent, p, p_grandparent, header);
+ }
+ else{ //p is right child
+ bstree_algo::rotate_left(p_parent, p, p_grandparent, header);
+ }
+ p_parent = p_grandparent;
+ p_grandparent = NodeTraits::get_parent(p_parent);
+ }
+ }
+
+ /// @endcond
+
+ public:
+ //! This type is the information that will be
+ //! filled by insert_unique_check
+ struct insert_commit_data
+ /// @cond
+ : public bstree_algo::insert_commit_data
+ /// @endcond
+ {
+ /// @cond
+ std::size_t rotations;
+ /// @endcond
+ };
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::get_header(const const_node_ptr&)
+ static node_ptr get_header(const_node_ptr n);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::begin_node
+ static node_ptr begin_node(const_node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::end_node
+ static node_ptr end_node(const_node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_tree
+ static void swap_tree(node_ptr header1, node_ptr header2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr node2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::swap_nodes(node_ptr,node_ptr,node_ptr,node_ptr)
+ static void swap_nodes(node_ptr node1, node_ptr header1, node_ptr node2, node_ptr header2);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr new_node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::replace_node(node_ptr,node_ptr,node_ptr)
+ static void replace_node(node_ptr node_to_be_replaced, node_ptr header, node_ptr new_node);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink(node_ptr)
+ template<class NodePtrPriorityCompare>
+ static void unlink(node_ptr node, NodePtrPriorityCompare pcomp)
+ {
+ node_ptr x = NodeTraits::get_parent(node);
+ if(x){
+ while(!bstree_algo::is_header(x))
+ x = NodeTraits::get_parent(x);
+ erase(x, node, pcomp);
+ }
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unlink_leftmost_without_rebalance
+ static node_ptr unlink_leftmost_without_rebalance(node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::unique(const const_node_ptr&)
+ static bool unique(const_node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::size(const const_node_ptr&)
+ static std::size_t size(const_node_ptr header);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::next_node(const node_ptr&)
+ static node_ptr next_node(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::prev_node(const node_ptr&)
+ static node_ptr prev_node(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init(node_ptr)
+ static void init(node_ptr node);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::init_header(node_ptr)
+ static void init_header(node_ptr header);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::erase(node_ptr,node_ptr)
+ template<class NodePtrPriorityCompare>
+ static node_ptr erase(node_ptr header, node_ptr z, NodePtrPriorityCompare pcomp)
+ {
+ rebalance_for_erasure(header, z, pcomp);
+ bstree_algo::erase(header, z);
+ return z;
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clone(const const_node_ptr&,node_ptr,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ static void clone
+ (const_node_ptr source_header, node_ptr target_header, Cloner cloner, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::clear_and_dispose(const node_ptr&,Disposer)
+ template<class Disposer>
+ static void clear_and_dispose(node_ptr header, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::lower_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr lower_bound
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::upper_bound(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr upper_bound
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::find(const const_node_ptr&, const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static node_ptr find
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::equal_range(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> equal_range
+ (const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::bounded_range(const const_node_ptr&,const KeyType&,const KeyType&,KeyNodePtrCompare,bool,bool)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::pair<node_ptr, node_ptr> bounded_range
+ (const_node_ptr header, const KeyType &lower_key, const KeyType &upper_key, KeyNodePtrCompare comp
+ , bool left_closed, bool right_closed);
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::count(const const_node_ptr&,const KeyType&,KeyNodePtrCompare)
+ template<class KeyType, class KeyNodePtrCompare>
+ static std::size_t count(const_node_ptr header, const KeyType &key, KeyNodePtrCompare comp);
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! <b>Requires</b>: "h" must be the header node of a tree.
+ //! NodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares two node_ptrs.
+ //! NodePtrPriorityCompare is a priority function object that induces a strict weak
+ //! ordering compatible with the one used to create the
+ //! the tree. NodePtrPriorityCompare compares two node_ptrs.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree before the upper bound
+ //! according to "comp" and rotates the tree according to "pcomp".
+ //!
+ //! <b>Complexity</b>: Average complexity for insert element is at
+ //! most logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throw or "pcomp" throw.
+ template<class NodePtrCompare, class NodePtrPriorityCompare>
+ static node_ptr insert_equal_upper_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
+ {
+ insert_commit_data commit_data;
+ bstree_algo::insert_equal_upper_bound_check(h, new_node, comp, commit_data);
+ rebalance_check_and_commit(h, new_node, pcomp, commit_data);
+ return new_node;
+ }
+
+ //! <b>Requires</b>: "h" must be the header node of a tree.
+ //! NodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares two node_ptrs.
+ //! NodePtrPriorityCompare is a priority function object that induces a strict weak
+ //! ordering compatible with the one used to create the
+ //! the tree. NodePtrPriorityCompare compares two node_ptrs.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree before the upper bound
+ //! according to "comp" and rotates the tree according to "pcomp".
+ //!
+ //! <b>Complexity</b>: Average complexity for insert element is at
+ //! most logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ template<class NodePtrCompare, class NodePtrPriorityCompare>
+ static node_ptr insert_equal_lower_bound
+ (node_ptr h, node_ptr new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
+ {
+ insert_commit_data commit_data;
+ bstree_algo::insert_equal_lower_bound_check(h, new_node, comp, commit_data);
+ rebalance_check_and_commit(h, new_node, pcomp, commit_data);
+ return new_node;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! NodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares two node_ptrs. "hint" is node from
+ //! the "header"'s tree.
+ //! NodePtrPriorityCompare is a priority function object that induces a strict weak
+ //! ordering compatible with the one used to create the
+ //! the tree. NodePtrPriorityCompare compares two node_ptrs.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree, using "hint" as a hint to
+ //! where it will be inserted. If "hint" is the upper_bound
+ //! the insertion takes constant time (two comparisons in the worst case).
+ //! Rotates the tree according to "pcomp".
+ //!
+ //! <b>Complexity</b>: Logarithmic in general, but it is amortized
+ //! constant time if new_node is inserted immediately before "hint".
+ //!
+ //! <b>Throws</b>: If "comp" throw or "pcomp" throw.
+ template<class NodePtrCompare, class NodePtrPriorityCompare>
+ static node_ptr insert_equal
+ (node_ptr h, node_ptr hint, node_ptr new_node, NodePtrCompare comp, NodePtrPriorityCompare pcomp)
+ {
+ insert_commit_data commit_data;
+ bstree_algo::insert_equal_check(h, hint, new_node, comp, commit_data);
+ rebalance_check_and_commit(h, new_node, pcomp, commit_data);
+ return new_node;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! "pos" must be a valid node of the tree (including header end) node.
+ //! "pos" must be a node pointing to the successor to "new_node"
+ //! once inserted according to the order of already inserted nodes. This function does not
+ //! check "pos" and this precondition must be guaranteed by the caller.
+ //! NodePtrPriorityCompare is a priority function object that induces a strict weak
+ //! ordering compatible with the one used to create the
+ //! the tree. NodePtrPriorityCompare compares two node_ptrs.
+ //!
+ //! <b>Effects</b>: Inserts new_node into the tree before "pos"
+ //! and rotates the tree according to "pcomp".
+ //!
+ //! <b>Complexity</b>: Constant-time.
+ //!
+ //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
+ //!
+ //! <b>Note</b>: If "pos" is not the successor of the newly inserted "new_node"
+ //! tree invariants might be broken.
+ template<class NodePtrPriorityCompare>
+ static node_ptr insert_before
+ (node_ptr header, node_ptr pos, node_ptr new_node, NodePtrPriorityCompare pcomp)
+ {
+ insert_commit_data commit_data;
+ bstree_algo::insert_before_check(header, pos, commit_data);
+ rebalance_check_and_commit(header, new_node, pcomp, commit_data);
+ return new_node;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! "new_node" must be, according to the used ordering no less than the
+ //! greatest inserted key.
+ //! NodePtrPriorityCompare is a priority function object that induces a strict weak
+ //! ordering compatible with the one used to create the
+ //! the tree. NodePtrPriorityCompare compares two node_ptrs.
+ //!
+ //! <b>Effects</b>: Inserts x into the tree in the last position
+ //! and rotates the tree according to "pcomp".
+ //!
+ //! <b>Complexity</b>: Constant-time.
+ //!
+ //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
+ //!
+ //! <b>Note</b>: If "new_node" is less than the greatest inserted key
+ //! tree invariants are broken. This function is slightly faster than
+ //! using "insert_before".
+ template<class NodePtrPriorityCompare>
+ static void push_back(node_ptr header, node_ptr new_node, NodePtrPriorityCompare pcomp)
+ {
+ insert_commit_data commit_data;
+ bstree_algo::push_back_check(header, commit_data);
+ rebalance_check_and_commit(header, new_node, pcomp, commit_data);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! "new_node" must be, according to the used ordering, no greater than the
+ //! lowest inserted key.
+ //! NodePtrPriorityCompare is a priority function object that induces a strict weak
+ //! ordering compatible with the one used to create the
+ //! the tree. NodePtrPriorityCompare compares two node_ptrs.
+ //!
+ //! <b>Effects</b>: Inserts x into the tree in the first position
+ //! and rotates the tree according to "pcomp".
+ //!
+ //! <b>Complexity</b>: Constant-time.
+ //!
+ //! <b>Throws</b>: If "pcomp" throws, strong guarantee.
+ //!
+ //! <b>Note</b>: If "new_node" is greater than the lowest inserted key
+ //! tree invariants are broken. This function is slightly faster than
+ //! using "insert_before".
+ template<class NodePtrPriorityCompare>
+ static void push_front(node_ptr header, node_ptr new_node, NodePtrPriorityCompare pcomp)
+ {
+ insert_commit_data commit_data;
+ bstree_algo::push_front_check(header, commit_data);
+ rebalance_check_and_commit(header, new_node, pcomp, commit_data);
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares KeyType with a node_ptr.
+ //!
+ //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
+ //! tree according to "comp" and obtains the needed information to realize
+ //! a constant-time node insertion if there is no equivalent node.
+ //!
+ //! <b>Returns</b>: If there is an equivalent value
+ //! returns a pair containing a node_ptr to the already present node
+ //! and false. If there is not equivalent key can be inserted returns true
+ //! in the returned pair's boolean and fills "commit_data" that is meant to
+ //! be used with the "insert_commit" function to achieve a constant-time
+ //! insertion function.
+ //!
+ //! <b>Complexity</b>: Average complexity is at most logarithmic.
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ //!
+ //! <b>Notes</b>: This function is used to improve performance when constructing
+ //! a node is expensive and the user does not want to have two equivalent nodes
+ //! in the tree: if there is an equivalent value
+ //! the constructed object must be discarded. Many times, the part of the
+ //! node that is used to impose the order is much cheaper to construct
+ //! than the node and this function offers the possibility to use that part
+ //! to check if the insertion will be successful.
+ //!
+ //! If the check is successful, the user can construct the node and use
+ //! "insert_commit" to insert the node in constant-time. This gives a total
+ //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
+ //! if no more objects are inserted or erased from the set.
+ template<class KeyType, class KeyNodePtrCompare, class KeyNodePtrPrioCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const_node_ptr header, const KeyType &key
+ ,KeyNodePtrCompare comp, KeyNodePtrPrioCompare pcomp
+ ,insert_commit_data &commit_data)
+ {
+ std::pair<node_ptr, bool> ret =
+ bstree_algo::insert_unique_check(header, key, comp, commit_data);
+ if(ret.second)
+ rebalance_after_insertion_check(header, commit_data.node, key, pcomp, commit_data.rotations);
+ return ret;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! KeyNodePtrCompare is a function object that induces a strict weak
+ //! ordering compatible with the strict weak ordering used to create the
+ //! the tree. NodePtrCompare compares KeyType with a node_ptr.
+ //! "hint" is node from the "header"'s tree.
+ //!
+ //! <b>Effects</b>: Checks if there is an equivalent node to "key" in the
+ //! tree according to "comp" using "hint" as a hint to where it should be
+ //! inserted and obtains the needed information to realize
+ //! a constant-time node insertion if there is no equivalent node.
+ //! If "hint" is the upper_bound the function has constant time
+ //! complexity (two comparisons in the worst case).
+ //!
+ //! <b>Returns</b>: If there is an equivalent value
+ //! returns a pair containing a node_ptr to the already present node
+ //! and false. If there is not equivalent key can be inserted returns true
+ //! in the returned pair's boolean and fills "commit_data" that is meant to
+ //! be used with the "insert_commit" function to achieve a constant-time
+ //! insertion function.
+ //!
+ //! <b>Complexity</b>: Average complexity is at most logarithmic, but it is
+ //! amortized constant time if new_node should be inserted immediately before "hint".
+ //!
+ //! <b>Throws</b>: If "comp" throws.
+ //!
+ //! <b>Notes</b>: This function is used to improve performance when constructing
+ //! a node is expensive and the user does not want to have two equivalent nodes
+ //! in the tree: if there is an equivalent value
+ //! the constructed object must be discarded. Many times, the part of the
+ //! node that is used to impose the order is much cheaper to construct
+ //! than the node and this function offers the possibility to use that part
+ //! to check if the insertion will be successful.
+ //!
+ //! If the check is successful, the user can construct the node and use
+ //! "insert_commit" to insert the node in constant-time. This gives a total
+ //! logarithmic complexity to the insertion: check(O(log(N)) + commit(O(1)).
+ //!
+ //! "commit_data" remains valid for a subsequent "insert_unique_commit" only
+ //! if no more objects are inserted or erased from the set.
+ template<class KeyType, class KeyNodePtrCompare, class KeyNodePtrPrioCompare>
+ static std::pair<node_ptr, bool> insert_unique_check
+ (const_node_ptr header, node_ptr hint, const KeyType &key
+ ,KeyNodePtrCompare comp, KeyNodePtrPrioCompare pcomp, insert_commit_data &commit_data)
+ {
+ std::pair<node_ptr, bool> ret =
+ bstree_algo::insert_unique_check(header, hint, key, comp, commit_data);
+ if(ret.second)
+ rebalance_after_insertion_check(header, commit_data.node, key, pcomp, commit_data.rotations);
+ return ret;
+ }
+
+ //! <b>Requires</b>: "header" must be the header node of a tree.
+ //! "commit_data" must have been obtained from a previous call to
+ //! "insert_unique_check". No objects should have been inserted or erased
+ //! from the set between the "insert_unique_check" that filled "commit_data"
+ //! and the call to "insert_commit".
+ //!
+ //!
+ //! <b>Effects</b>: Inserts new_node in the set using the information obtained
+ //! from the "commit_data" that a previous "insert_check" filled.
+ //!
+ //! <b>Complexity</b>: Constant time.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Notes</b>: This function has only sense if a "insert_unique_check" has been
+ //! previously executed to fill "commit_data". No value should be inserted or
+ //! erased between the "insert_check" and "insert_commit" calls.
+ static void insert_unique_commit
+ (node_ptr header, node_ptr new_node, const insert_commit_data &commit_data)
+ {
+ bstree_algo::insert_unique_commit(header, new_node, commit_data);
+ rotate_up_n(header, new_node, commit_data.rotations);
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_unique
+ template<class NodePtrCompare, class KeyNodePtrPrioCompare>
+ static bool transfer_unique
+ (node_ptr header1, NodePtrCompare comp, KeyNodePtrPrioCompare pcomp, node_ptr header2, node_ptr z)
+ {
+ insert_commit_data commit_data;
+ bool const transferable = insert_unique_check(header1, z, comp, pcomp, commit_data).second;
+ if(transferable){
+ erase(header2, z, pcomp);
+ insert_unique_commit(header1, z, commit_data);
+ }
+ return transferable;
+ }
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::transfer_equal
+ template<class NodePtrCompare, class KeyNodePtrPrioCompare>
+ static void transfer_equal
+ (node_ptr header1, NodePtrCompare comp, KeyNodePtrPrioCompare pcomp, node_ptr header2, node_ptr z)
+ {
+ insert_commit_data commit_data;
+ bstree_algo::insert_equal_upper_bound_check(header1, z, comp, commit_data);
+ rebalance_after_insertion_check(header1, commit_data.node, z, pcomp, commit_data.rotations);
+ rebalance_for_erasure(header2, z, pcomp);
+ bstree_algo::erase(header2, z);
+ bstree_algo::insert_unique_commit(header1, z, commit_data);
+ rotate_up_n(header1, z, commit_data.rotations);
+ }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::bstree_algorithms::is_header
+ static bool is_header(const_node_ptr p);
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ /// @cond
+ private:
+
+ template<class NodePtrPriorityCompare>
+ static void rebalance_for_erasure(node_ptr header, node_ptr z, NodePtrPriorityCompare pcomp)
+ {
+ std::size_t n = 0;
+ rerotate_on_destroy rb(header, z, n);
+
+ node_ptr z_left = NodeTraits::get_left(z);
+ node_ptr z_right = NodeTraits::get_right(z);
+ while(z_left || z_right){
+ const node_ptr z_parent(NodeTraits::get_parent(z));
+ if(!z_right || (z_left && pcomp(z_left, z_right))){
+ bstree_algo::rotate_right(z, z_left, z_parent, header);
+ }
+ else{
+ bstree_algo::rotate_left(z, z_right, z_parent, header);
+ }
+ ++n;
+ z_left = NodeTraits::get_left(z);
+ z_right = NodeTraits::get_right(z);
+ }
+ rb.release();
+ }
+
+ template<class NodePtrPriorityCompare>
+ static void rebalance_check_and_commit
+ (node_ptr h, node_ptr new_node, NodePtrPriorityCompare pcomp, insert_commit_data &commit_data)
+ {
+ rebalance_after_insertion_check(h, commit_data.node, new_node, pcomp, commit_data.rotations);
+ //No-throw
+ bstree_algo::insert_unique_commit(h, new_node, commit_data);
+ rotate_up_n(h, new_node, commit_data.rotations);
+ }
+
+ template<class Key, class KeyNodePriorityCompare>
+ static void rebalance_after_insertion_check
+ (const_node_ptr header, const_node_ptr up, const Key &k
+ , KeyNodePriorityCompare pcomp, std::size_t &num_rotations)
+ {
+ const_node_ptr upnode(up);
+ //First check rotations since pcomp can throw
+ num_rotations = 0;
+ std::size_t n = 0;
+ while(upnode != header && pcomp(k, upnode)){
+ ++n;
+ upnode = NodeTraits::get_parent(upnode);
+ }
+ num_rotations = n;
+ }
+
+ template<class NodePtrPriorityCompare>
+ static bool check_invariant(const_node_ptr header, NodePtrPriorityCompare pcomp)
+ {
+ node_ptr beg = begin_node(header);
+ node_ptr end = end_node(header);
+
+ while(beg != end){
+ node_ptr p = NodeTraits::get_parent(beg);
+ if(p != header){
+ if(pcomp(beg, p))
+ return false;
+ }
+ beg = next_node(beg);
+ }
+ return true;
+ }
+
+ /// @endcond
+};
+
+/// @cond
+
+template<class NodeTraits>
+struct get_algo<TreapAlgorithms, NodeTraits>
+{
+ typedef treap_algorithms<NodeTraits> type;
+};
+
+template <class ValueTraits, class NodePtrCompare, class ExtraChecker>
+struct get_node_checker<TreapAlgorithms, ValueTraits, NodePtrCompare, ExtraChecker>
+{
+ typedef detail::bstree_node_checker<ValueTraits, NodePtrCompare, ExtraChecker> type;
+};
+
+/// @endcond
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_TREAP_ALGORITHMS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/treap_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/treap_set.hpp
index bf162badf0d..bf162badf0d 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/treap_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/treap_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/intrusive/trivial_value_traits.hpp b/src/third_party/boost-1.69.0/boost/intrusive/trivial_value_traits.hpp
index 84fac665d14..84fac665d14 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive/trivial_value_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive/trivial_value_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/unordered_set.hpp b/src/third_party/boost-1.69.0/boost/intrusive/unordered_set.hpp
new file mode 100644
index 00000000000..5588cb160ab
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/unordered_set.hpp
@@ -0,0 +1,994 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2014
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_INTRUSIVE_UNORDERED_SET_HPP
+#define BOOST_INTRUSIVE_UNORDERED_SET_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+#include <boost/intrusive/hashtable.hpp>
+#include <boost/move/utility_core.hpp>
+#include <boost/static_assert.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+//! The class template unordered_set is an intrusive container, that mimics most of
+//! the interface of std::tr1::unordered_set as described in the C++ TR1.
+//!
+//! unordered_set is a semi-intrusive container: each object to be stored in the
+//! container must contain a proper hook, but the container also needs
+//! additional auxiliary memory to work: unordered_set needs a pointer to an array
+//! of type `bucket_type` to be passed in the constructor. This bucket array must
+//! have at least the same lifetime as the container. This makes the use of
+//! unordered_set more complicated than purely intrusive containers.
+//! `bucket_type` is default-constructible, copyable and assignable
+//!
+//! The template parameter \c T is the type to be managed by the container.
+//! The user can specify additional options and if no options are provided
+//! default options are used.
+//!
+//! The container supports the following options:
+//! \c base_hook<>/member_hook<>/value_traits<>,
+//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
+//! \c bucket_traits<>, \c power_2_buckets<> and \c cache_begin<>.
+//!
+//! unordered_set only provides forward iterators but it provides 4 iterator types:
+//! iterator and const_iterator to navigate through the whole container and
+//! local_iterator and const_local_iterator to navigate through the values
+//! stored in a single bucket. Local iterators are faster and smaller.
+//!
+//! It's not recommended to use non constant-time size unordered_sets because several
+//! key functions, like "empty()", become non-constant time functions. Non
+//! constant-time size unordered_sets are mainly provided to support auto-unlink hooks.
+//!
+//! unordered_set, unlike std::unordered_set, does not make automatic rehashings nor
+//! offers functions related to a load factor. Rehashing can be explicitly requested
+//! and the user must provide a new bucket array that will be used from that moment.
+//!
+//! Since no automatic rehashing is done, iterators are never invalidated when
+//! inserting or erasing elements. Iterators are only invalidated when rehasing.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
+#endif
+class unordered_set_impl
+ : public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos>
+{
+ /// @cond
+ private:
+ typedef hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags|hash_bool_flags::unique_keys_pos> table_type;
+
+ template<class Iterator, class MaybeConstThis, class KeyType, class KeyHasher, class KeyEqual>
+ static std::pair<Iterator,Iterator> priv_equal_range(MaybeConstThis &c, const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
+ {
+ Iterator const it = c.find(key, hash_func, equal_func);
+ std::pair<Iterator,Iterator> ret(it, it);
+ if(it != c.end())
+ ++ret.second;
+ return ret;
+ }
+
+ //! This class is
+ //! movable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_set_impl)
+
+ typedef table_type implementation_defined;
+ /// @endcond
+
+ public:
+ typedef typename implementation_defined::value_type value_type;
+ typedef typename implementation_defined::key_type key_type;
+ typedef typename implementation_defined::key_of_value key_of_value;
+ typedef typename implementation_defined::value_traits value_traits;
+ typedef typename implementation_defined::bucket_traits bucket_traits;
+ typedef typename implementation_defined::pointer pointer;
+ typedef typename implementation_defined::const_pointer const_pointer;
+ typedef typename implementation_defined::reference reference;
+ typedef typename implementation_defined::const_reference const_reference;
+ typedef typename implementation_defined::difference_type difference_type;
+ typedef typename implementation_defined::size_type size_type;
+ typedef typename implementation_defined::key_equal key_equal;
+ typedef typename implementation_defined::hasher hasher;
+ typedef typename implementation_defined::bucket_type bucket_type;
+ typedef typename implementation_defined::bucket_ptr bucket_ptr;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ typedef typename implementation_defined::local_iterator local_iterator;
+ typedef typename implementation_defined::const_local_iterator const_local_iterator;
+ typedef typename implementation_defined::node_traits node_traits;
+ typedef typename implementation_defined::node node;
+ typedef typename implementation_defined::node_ptr node_ptr;
+ typedef typename implementation_defined::const_node_ptr const_node_ptr;
+ typedef typename implementation_defined::node_algorithms node_algorithms;
+
+ public:
+
+ //! @copydoc ::boost::intrusive::hashtable::hashtable(const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
+ BOOST_INTRUSIVE_FORCEINLINE explicit unordered_set_impl( const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : table_type(b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::hashtable::hashtable(bool,Iterator,Iterator,const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl( Iterator b
+ , Iterator e
+ , const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : table_type(true, b, e, b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::hashtable::hashtable(hashtable&&)
+ BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl(BOOST_RV_REF(unordered_set_impl) x)
+ : table_type(BOOST_MOVE_BASE(table_type, x))
+ {}
+
+ //! @copydoc ::boost::intrusive::hashtable::operator=(hashtable&&)
+ BOOST_INTRUSIVE_FORCEINLINE unordered_set_impl& operator=(BOOST_RV_REF(unordered_set_impl) x)
+ { return static_cast<unordered_set_impl&>(table_type::operator=(BOOST_MOVE_BASE(table_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+ //! @copydoc ::boost::intrusive::hashtable::~hashtable()
+ ~unordered_set_impl();
+
+ //! @copydoc ::boost::intrusive::hashtable::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::hashtable::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::hashtable::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::hash_function()const
+ hasher hash_function() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::key_eq()const
+ key_equal key_eq() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::hashtable
+ void swap(unordered_set_impl& other);
+
+ //! @copydoc ::boost::intrusive::hashtable::clone_from(const hashtable&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const unordered_set_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using table_type::clone_from;
+
+ #endif //#ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::hashtable::clone_from(hashtable&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_set_impl) src, Cloner cloner, Disposer disposer)
+ { table_type::clone_from(BOOST_MOVE_BASE(table_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::hashtable::insert_unique(reference)
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert(reference value)
+ { return table_type::insert_unique(value); }
+
+ //! @copydoc ::boost::intrusive::hashtable::insert_unique(Iterator,Iterator)
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE void insert(Iterator b, Iterator e)
+ { table_type::insert_unique(b, e); }
+
+ //! @copydoc ::boost::intrusive::hashtable::insert_unique_check(const key_type&,insert_commit_data&)
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_check(const key_type &key, insert_commit_data &commit_data)
+ { return table_type::insert_unique_check(key, commit_data); }
+
+ //! @copydoc ::boost::intrusive::hashtable::insert_unique_check(const KeyType&,KeyHasher,KeyEqual,insert_commit_data&)
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ BOOST_INTRUSIVE_FORCEINLINE std::pair<iterator, bool> insert_check
+ (const KeyType &key, KeyHasher hasher, KeyEqual key_value_equal, insert_commit_data &commit_data)
+ { return table_type::insert_unique_check(key, hasher, key_value_equal, commit_data); }
+
+ //! @copydoc ::boost::intrusive::hashtable::insert_unique_commit
+ BOOST_INTRUSIVE_FORCEINLINE iterator insert_commit(reference value, const insert_commit_data &commit_data)
+ { return table_type::insert_unique_commit(value, commit_data); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator)
+ void erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator,const_iterator)
+ void erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase(const KeyType&,KeyHasher,KeyEqual)
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ BOOST_INTRUSIVE_DOC1ST(void
+ , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
+ erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const key_type &,Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const KeyType&,KeyHasher,KeyEqual,Disposer)
+ template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::hashtable::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::count(const KeyType&,KeyHasher,KeyEqual)const
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ size_type count(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
+
+ //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)const
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ const_iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
+ #endif
+
+ //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)
+ std::pair<iterator,iterator> equal_range(const key_type &key)
+ { return this->equal_range(key, this->hash_function(), this->key_eq()); }
+
+ //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func)
+ { return this->priv_equal_range<iterator>(*this, key, hash_func, equal_func); }
+
+ //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const
+ { return this->equal_range(key, this->hash_function(), this->key_eq()); }
+
+ //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)const
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const
+ { return this->priv_equal_range<const_iterator>(*this, key, hash_func, equal_func); }
+
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ //! @copydoc ::boost::intrusive::hashtable::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::hashtable::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(reference)
+ static local_iterator s_local_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(const_reference)
+ static const_local_iterator s_local_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(reference)
+ local_iterator local_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(const_reference)
+ const_local_iterator local_iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket_count
+ size_type bucket_count() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket_size
+ size_type bucket_size(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket(const key_type&)const
+ size_type bucket(const key_type& k) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket(const KeyType&,KeyHasher)const
+ template<class KeyType, class KeyHasher>
+ size_type bucket(const KeyType& k, KeyHasher hash_func) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket_pointer
+ bucket_ptr bucket_pointer() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::begin(size_type)
+ local_iterator begin(size_type n);
+
+ //! @copydoc ::boost::intrusive::hashtable::begin(size_type)const
+ const_local_iterator begin(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::cbegin(size_type)const
+ const_local_iterator cbegin(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::end(size_type)
+ local_iterator end(size_type n);
+
+ //! @copydoc ::boost::intrusive::hashtable::end(size_type)const
+ const_local_iterator end(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::cend(size_type)const
+ const_local_iterator cend(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
+ void rehash(const bucket_traits &new_bucket_traits);
+
+ //! @copydoc ::boost::intrusive::hashtable::full_rehash
+ void full_rehash();
+
+ //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(bool)
+ bool incremental_rehash(bool grow = true);
+
+ //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(const bucket_traits &)
+ bool incremental_rehash(const bucket_traits &new_bucket_traits);
+
+ //! @copydoc ::boost::intrusive::hashtable::split_count
+ size_type split_count() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::suggested_upper_bucket_count
+ static size_type suggested_upper_bucket_count(size_type n);
+
+ //! @copydoc ::boost::intrusive::hashtable::suggested_lower_bucket_count
+ static size_type suggested_lower_bucket_count(size_type n);
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ friend bool operator==(const unordered_set_impl &x, const unordered_set_impl &y)
+ {
+ if(table_type::constant_time_size && x.size() != y.size()){
+ return false;
+ }
+ //Find each element of x in y
+ for (const_iterator ix = x.cbegin(), ex = x.cend(), ey = y.cend(); ix != ex; ++ix){
+ const_iterator iy = y.find(key_of_value()(*ix));
+ if (iy == ey || !(*ix == *iy))
+ return false;
+ }
+ return true;
+ }
+
+ friend bool operator!=(const unordered_set_impl &x, const unordered_set_impl &y)
+ { return !(x == y); }
+
+ friend bool operator<(const unordered_set_impl &x, const unordered_set_impl &y)
+ { return ::boost::intrusive::algo_lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()); }
+
+ friend bool operator>(const unordered_set_impl &x, const unordered_set_impl &y)
+ { return y < x; }
+
+ friend bool operator<=(const unordered_set_impl &x, const unordered_set_impl &y)
+ { return !(y < x); }
+
+ friend bool operator>=(const unordered_set_impl &x, const unordered_set_impl &y)
+ { return !(x < y); }
+};
+
+//! Helper metafunction to define an \c unordered_set that yields to the same type when the
+//! same options (either explicitly or implicitly) are used.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class T, class ...Options>
+#else
+template<class T, class O1 = void, class O2 = void
+ , class O3 = void, class O4 = void
+ , class O5 = void, class O6 = void
+ , class O7 = void, class O8 = void
+ , class O9 = void, class O10= void
+ >
+#endif
+struct make_unordered_set
+{
+ /// @cond
+ typedef typename pack_options
+ < hashtable_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef typename detail::get_value_traits
+ <T, typename packed_options::proto_value_traits>::type value_traits;
+
+ typedef typename make_bucket_traits
+ <T, true, packed_options>::type bucket_traits;
+
+ typedef unordered_set_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::hash
+ , typename packed_options::equal
+ , typename packed_options::size_type
+ , bucket_traits
+ , (std::size_t(true)*hash_bool_flags::unique_keys_pos)
+ | (std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
+ | (std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
+ | (std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
+ | (std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
+ | (std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
+ > implementation_defined;
+
+ /// @endcond
+ typedef implementation_defined type;
+};
+
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
+#else
+template<class T, class ...Options>
+#endif
+class unordered_set
+ : public make_unordered_set<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_unordered_set
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type Base;
+
+ //Assert if passed value traits are compatible with the type
+ BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_set)
+
+ public:
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::bucket_traits bucket_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::bucket_ptr bucket_ptr;
+ typedef typename Base::size_type size_type;
+ typedef typename Base::hasher hasher;
+ typedef typename Base::key_equal key_equal;
+
+ BOOST_INTRUSIVE_FORCEINLINE
+ explicit unordered_set ( const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : Base(b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE
+ unordered_set
+ ( Iterator b, Iterator e
+ , const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE unordered_set(BOOST_RV_REF(unordered_set) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE unordered_set& operator=(BOOST_RV_REF(unordered_set) x)
+ { return static_cast<unordered_set&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const unordered_set &src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(src, cloner, disposer); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_set) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+};
+
+#endif
+
+
+//! The class template unordered_multiset is an intrusive container, that mimics most of
+//! the interface of std::tr1::unordered_multiset as described in the C++ TR1.
+//!
+//! unordered_multiset is a semi-intrusive container: each object to be stored in the
+//! container must contain a proper hook, but the container also needs
+//! additional auxiliary memory to work: unordered_multiset needs a pointer to an array
+//! of type `bucket_type` to be passed in the constructor. This bucket array must
+//! have at least the same lifetime as the container. This makes the use of
+//! unordered_multiset more complicated than purely intrusive containers.
+//! `bucket_type` is default-constructible, copyable and assignable
+//!
+//! The template parameter \c T is the type to be managed by the container.
+//! The user can specify additional options and if no options are provided
+//! default options are used.
+//!
+//! The container supports the following options:
+//! \c base_hook<>/member_hook<>/value_traits<>,
+//! \c constant_time_size<>, \c size_type<>, \c hash<> and \c equal<>
+//! \c bucket_traits<>, \c power_2_buckets<> and \c cache_begin<>.
+//!
+//! unordered_multiset only provides forward iterators but it provides 4 iterator types:
+//! iterator and const_iterator to navigate through the whole container and
+//! local_iterator and const_local_iterator to navigate through the values
+//! stored in a single bucket. Local iterators are faster and smaller.
+//!
+//! It's not recommended to use non constant-time size unordered_multisets because several
+//! key functions, like "empty()", become non-constant time functions. Non
+//! constant-time size unordered_multisets are mainly provided to support auto-unlink hooks.
+//!
+//! unordered_multiset, unlike std::unordered_set, does not make automatic rehashings nor
+//! offers functions related to a load factor. Rehashing can be explicitly requested
+//! and the user must provide a new bucket array that will be used from that moment.
+//!
+//! Since no automatic rehashing is done, iterators are never invalidated when
+//! inserting or erasing elements. Iterators are only invalidated when rehasing.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+template<class T, class ...Options>
+#else
+template<class ValueTraits, class VoidOrKeyOfValue, class VoidOrKeyHash, class VoidOrKeyEqual, class SizeType, class BucketTraits, std::size_t BoolFlags>
+#endif
+class unordered_multiset_impl
+ : public hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags>
+{
+ /// @cond
+ private:
+ typedef hashtable_impl<ValueTraits, VoidOrKeyOfValue, VoidOrKeyHash, VoidOrKeyEqual, BucketTraits, SizeType, BoolFlags> table_type;
+ /// @endcond
+
+ //Movable
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_multiset_impl)
+
+ typedef table_type implementation_defined;
+
+ public:
+ typedef typename implementation_defined::value_type value_type;
+ typedef typename implementation_defined::key_type key_type;
+ typedef typename implementation_defined::value_traits value_traits;
+ typedef typename implementation_defined::bucket_traits bucket_traits;
+ typedef typename implementation_defined::pointer pointer;
+ typedef typename implementation_defined::const_pointer const_pointer;
+ typedef typename implementation_defined::reference reference;
+ typedef typename implementation_defined::const_reference const_reference;
+ typedef typename implementation_defined::difference_type difference_type;
+ typedef typename implementation_defined::size_type size_type;
+ typedef typename implementation_defined::key_equal key_equal;
+ typedef typename implementation_defined::hasher hasher;
+ typedef typename implementation_defined::bucket_type bucket_type;
+ typedef typename implementation_defined::bucket_ptr bucket_ptr;
+ typedef typename implementation_defined::iterator iterator;
+ typedef typename implementation_defined::const_iterator const_iterator;
+ typedef typename implementation_defined::insert_commit_data insert_commit_data;
+ typedef typename implementation_defined::local_iterator local_iterator;
+ typedef typename implementation_defined::const_local_iterator const_local_iterator;
+ typedef typename implementation_defined::node_traits node_traits;
+ typedef typename implementation_defined::node node;
+ typedef typename implementation_defined::node_ptr node_ptr;
+ typedef typename implementation_defined::const_node_ptr const_node_ptr;
+ typedef typename implementation_defined::node_algorithms node_algorithms;
+
+ public:
+
+ //! @copydoc ::boost::intrusive::hashtable::hashtable(const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
+ BOOST_INTRUSIVE_FORCEINLINE explicit unordered_multiset_impl ( const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : table_type(b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ //! @copydoc ::boost::intrusive::hashtable::hashtable(bool,Iterator,Iterator,const bucket_traits &,const hasher &,const key_equal &,const value_traits &)
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl ( Iterator b
+ , Iterator e
+ , const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : table_type(false, b, e, b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ //! <b>Effects</b>: to-do
+ //!
+ BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl(BOOST_RV_REF(unordered_multiset_impl) x)
+ : table_type(BOOST_MOVE_BASE(table_type, x))
+ {}
+
+ //! <b>Effects</b>: to-do
+ //!
+ BOOST_INTRUSIVE_FORCEINLINE unordered_multiset_impl& operator=(BOOST_RV_REF(unordered_multiset_impl) x)
+ { return static_cast<unordered_multiset_impl&>(table_type::operator=(BOOST_MOVE_BASE(table_type, x))); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::hashtable::~hashtable()
+ ~unordered_multiset_impl();
+
+ //! @copydoc ::boost::intrusive::hashtable::begin()
+ iterator begin();
+
+ //! @copydoc ::boost::intrusive::hashtable::begin()const
+ const_iterator begin() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::cbegin()const
+ const_iterator cbegin() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::end()
+ iterator end();
+
+ //! @copydoc ::boost::intrusive::hashtable::end()const
+ const_iterator end() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::cend()const
+ const_iterator cend() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::hash_function()const
+ hasher hash_function() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::key_eq()const
+ key_equal key_eq() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::empty()const
+ bool empty() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::size()const
+ size_type size() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::hashtable
+ void swap(unordered_multiset_impl& other);
+
+ //! @copydoc ::boost::intrusive::hashtable::clone_from(const hashtable&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ void clone_from(const unordered_multiset_impl &src, Cloner cloner, Disposer disposer);
+
+ #else
+
+ using table_type::clone_from;
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::hashtable::clone_from(hashtable&&,Cloner,Disposer)
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_multiset_impl) src, Cloner cloner, Disposer disposer)
+ { table_type::clone_from(BOOST_MOVE_BASE(table_type, src), cloner, disposer); }
+
+ //! @copydoc ::boost::intrusive::hashtable::insert_equal(reference)
+ BOOST_INTRUSIVE_FORCEINLINE iterator insert(reference value)
+ { return table_type::insert_equal(value); }
+
+ //! @copydoc ::boost::intrusive::hashtable::insert_equal(Iterator,Iterator)
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE void insert(Iterator b, Iterator e)
+ { table_type::insert_equal(b, e); }
+
+ #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+ //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator)
+ void erase(const_iterator i);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase(const_iterator,const_iterator)
+ void erase(const_iterator b, const_iterator e);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase(const key_type &)
+ size_type erase(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase(const KeyType&,KeyHasher,KeyEqual)
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ size_type erase(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,Disposer)
+ template<class Disposer>
+ BOOST_INTRUSIVE_DOC1ST(void
+ , typename detail::disable_if_convertible<Disposer BOOST_INTRUSIVE_I const_iterator>::type)
+ erase_and_dispose(const_iterator i, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const_iterator,const_iterator,Disposer)
+ template<class Disposer>
+ void erase_and_dispose(const_iterator b, const_iterator e, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const key_type &,Disposer)
+ template<class Disposer>
+ size_type erase_and_dispose(const key_type &key, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::erase_and_dispose(const KeyType&,KeyHasher,KeyEqual,Disposer)
+ template<class KeyType, class KeyHasher, class KeyEqual, class Disposer>
+ size_type erase_and_dispose(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func, Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::clear
+ void clear();
+
+ //! @copydoc ::boost::intrusive::hashtable::clear_and_dispose
+ template<class Disposer>
+ void clear_and_dispose(Disposer disposer);
+
+ //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
+ size_type count(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::count(const KeyType&,KeyHasher,KeyEqual)const
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ size_type count(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::find(const key_type &)
+ iterator find(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
+
+ //! @copydoc ::boost::intrusive::hashtable::count(const key_type &)const
+ const_iterator find(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::find(const KeyType &,KeyHasher,KeyEqual)const
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ const_iterator find(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)
+ std::pair<iterator,iterator> equal_range(const key_type &key);
+
+ //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<iterator,iterator> equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func);
+
+ //! @copydoc ::boost::intrusive::hashtable::equal_range(const key_type&)const
+ std::pair<const_iterator, const_iterator>
+ equal_range(const key_type &key) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::equal_range(const KeyType &,KeyHasher,KeyEqual)const
+ template<class KeyType, class KeyHasher, class KeyEqual>
+ std::pair<const_iterator, const_iterator>
+ equal_range(const KeyType& key, KeyHasher hash_func, KeyEqual equal_func) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::iterator_to(reference)
+ iterator iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::hashtable::iterator_to(const_reference)const
+ const_iterator iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(reference)
+ static local_iterator s_local_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::hashtable::s_local_iterator_to(const_reference)
+ static const_local_iterator s_local_iterator_to(const_reference value);
+
+ //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(reference)
+ local_iterator local_iterator_to(reference value);
+
+ //! @copydoc ::boost::intrusive::hashtable::local_iterator_to(const_reference)
+ const_local_iterator local_iterator_to(const_reference value) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket_count
+ size_type bucket_count() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket_size
+ size_type bucket_size(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket(const key_type&)const
+ size_type bucket(const key_type& k) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket(const KeyType&,KeyHasher)const
+ template<class KeyType, class KeyHasher>
+ size_type bucket(const KeyType& k, KeyHasher hash_func) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::bucket_pointer
+ bucket_ptr bucket_pointer() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::begin(size_type)
+ local_iterator begin(size_type n);
+
+ //! @copydoc ::boost::intrusive::hashtable::begin(size_type)const
+ const_local_iterator begin(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::cbegin(size_type)const
+ const_local_iterator cbegin(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::end(size_type)
+ local_iterator end(size_type n);
+
+ //! @copydoc ::boost::intrusive::hashtable::end(size_type)const
+ const_local_iterator end(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::cend(size_type)const
+ const_local_iterator cend(size_type n) const;
+
+ //! @copydoc ::boost::intrusive::hashtable::rehash(const bucket_traits &)
+ void rehash(const bucket_traits &new_bucket_traits);
+
+ //! @copydoc ::boost::intrusive::hashtable::full_rehash
+ void full_rehash();
+
+ //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(bool)
+ bool incremental_rehash(bool grow = true);
+
+ //! @copydoc ::boost::intrusive::hashtable::incremental_rehash(const bucket_traits &)
+ bool incremental_rehash(const bucket_traits &new_bucket_traits);
+
+ //! @copydoc ::boost::intrusive::hashtable::split_count
+ size_type split_count() const;
+
+ //! @copydoc ::boost::intrusive::hashtable::suggested_upper_bucket_count
+ static size_type suggested_upper_bucket_count(size_type n);
+
+ //! @copydoc ::boost::intrusive::hashtable::suggested_lower_bucket_count
+ static size_type suggested_lower_bucket_count(size_type n);
+
+ #endif // #ifdef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+};
+
+//! Helper metafunction to define an \c unordered_multiset that yields to the same type when the
+//! same options (either explicitly or implicitly) are used.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class T, class ...Options>
+#else
+template<class T, class O1 = void, class O2 = void
+ , class O3 = void, class O4 = void
+ , class O5 = void, class O6 = void
+ , class O7 = void, class O8 = void
+ , class O9 = void, class O10= void
+ >
+#endif
+struct make_unordered_multiset
+{
+ /// @cond
+ typedef typename pack_options
+ < hashtable_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef typename detail::get_value_traits
+ <T, typename packed_options::proto_value_traits>::type value_traits;
+
+ typedef typename make_bucket_traits
+ <T, true, packed_options>::type bucket_traits;
+
+ typedef unordered_multiset_impl
+ < value_traits
+ , typename packed_options::key_of_value
+ , typename packed_options::hash
+ , typename packed_options::equal
+ , typename packed_options::size_type
+ , bucket_traits
+ , (std::size_t(false)*hash_bool_flags::unique_keys_pos)
+ | (std::size_t(packed_options::constant_time_size)*hash_bool_flags::constant_time_size_pos)
+ | (std::size_t(packed_options::power_2_buckets)*hash_bool_flags::power_2_buckets_pos)
+ | (std::size_t(packed_options::cache_begin)*hash_bool_flags::cache_begin_pos)
+ | (std::size_t(packed_options::compare_hash)*hash_bool_flags::compare_hash_pos)
+ | (std::size_t(packed_options::incremental)*hash_bool_flags::incremental_pos)
+ > implementation_defined;
+
+ /// @endcond
+ typedef implementation_defined type;
+};
+
+#ifndef BOOST_INTRUSIVE_DOXYGEN_INVOKED
+
+#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class T, class O1, class O2, class O3, class O4, class O5, class O6, class O7, class O8, class O9, class O10>
+#else
+template<class T, class ...Options>
+#endif
+class unordered_multiset
+ : public make_unordered_multiset<T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type
+{
+ typedef typename make_unordered_multiset
+ <T,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4, O5, O6, O7, O8, O9, O10
+ #else
+ Options...
+ #endif
+ >::type Base;
+ //Assert if passed value traits are compatible with the type
+ BOOST_STATIC_ASSERT((detail::is_same<typename Base::value_traits::value_type, T>::value));
+ BOOST_MOVABLE_BUT_NOT_COPYABLE(unordered_multiset)
+
+ public:
+ typedef typename Base::value_traits value_traits;
+ typedef typename Base::bucket_traits bucket_traits;
+ typedef typename Base::iterator iterator;
+ typedef typename Base::const_iterator const_iterator;
+ typedef typename Base::bucket_ptr bucket_ptr;
+ typedef typename Base::size_type size_type;
+ typedef typename Base::hasher hasher;
+ typedef typename Base::key_equal key_equal;
+
+ BOOST_INTRUSIVE_FORCEINLINE
+ explicit unordered_multiset( const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : Base(b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ template<class Iterator>
+ BOOST_INTRUSIVE_FORCEINLINE
+ unordered_multiset( Iterator b
+ , Iterator e
+ , const bucket_traits &b_traits
+ , const hasher & hash_func = hasher()
+ , const key_equal &equal_func = key_equal()
+ , const value_traits &v_traits = value_traits())
+ : Base(b, e, b_traits, hash_func, equal_func, v_traits)
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE unordered_multiset(BOOST_RV_REF(unordered_multiset) x)
+ : Base(BOOST_MOVE_BASE(Base, x))
+ {}
+
+ BOOST_INTRUSIVE_FORCEINLINE unordered_multiset& operator=(BOOST_RV_REF(unordered_multiset) x)
+ { return static_cast<unordered_multiset&>(this->Base::operator=(BOOST_MOVE_BASE(Base, x))); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(const unordered_multiset &src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(src, cloner, disposer); }
+
+ template <class Cloner, class Disposer>
+ BOOST_INTRUSIVE_FORCEINLINE void clone_from(BOOST_RV_REF(unordered_multiset) src, Cloner cloner, Disposer disposer)
+ { Base::clone_from(BOOST_MOVE_BASE(Base, src), cloner, disposer); }
+};
+
+#endif
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_UNORDERED_SET_HPP
diff --git a/src/third_party/boost-1.69.0/boost/intrusive/unordered_set_hook.hpp b/src/third_party/boost-1.69.0/boost/intrusive/unordered_set_hook.hpp
new file mode 100644
index 00000000000..f03940bdfb0
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/intrusive/unordered_set_hook.hpp
@@ -0,0 +1,459 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Olaf Krzikalla 2004-2006.
+// (C) Copyright Ion Gaztanaga 2006-2013
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/intrusive for documentation.
+//
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP
+#define BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP
+
+#include <boost/intrusive/detail/config_begin.hpp>
+#include <boost/intrusive/intrusive_fwd.hpp>
+
+#include <boost/intrusive/pointer_traits.hpp>
+#include <boost/intrusive/slist_hook.hpp>
+#include <boost/intrusive/options.hpp>
+#include <boost/intrusive/detail/generic_hook.hpp>
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+namespace boost {
+namespace intrusive {
+
+/// @cond
+
+template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
+struct unordered_node
+ : public slist_node<VoidPointer>
+{
+ typedef typename pointer_traits
+ <VoidPointer>::template rebind_pointer
+ < unordered_node<VoidPointer, StoreHash, OptimizeMultiKey> >::type
+ node_ptr;
+ node_ptr prev_in_group_;
+ std::size_t hash_;
+};
+
+template<class VoidPointer>
+struct unordered_node<VoidPointer, false, true>
+ : public slist_node<VoidPointer>
+{
+ typedef typename pointer_traits
+ <VoidPointer>::template rebind_pointer
+ < unordered_node<VoidPointer, false, true> >::type
+ node_ptr;
+ node_ptr prev_in_group_;
+};
+
+template<class VoidPointer>
+struct unordered_node<VoidPointer, true, false>
+ : public slist_node<VoidPointer>
+{
+ typedef typename pointer_traits
+ <VoidPointer>::template rebind_pointer
+ < unordered_node<VoidPointer, true, false> >::type
+ node_ptr;
+ std::size_t hash_;
+};
+
+template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
+struct unordered_node_traits
+ : public slist_node_traits<VoidPointer>
+{
+ typedef slist_node_traits<VoidPointer> reduced_slist_node_traits;
+ typedef unordered_node<VoidPointer, StoreHash, OptimizeMultiKey> node;
+
+ typedef typename pointer_traits
+ <VoidPointer>::template rebind_pointer
+ < node >::type node_ptr;
+ typedef typename pointer_traits
+ <VoidPointer>::template rebind_pointer
+ < const node >::type const_node_ptr;
+
+ static const bool store_hash = StoreHash;
+ static const bool optimize_multikey = OptimizeMultiKey;
+
+ static node_ptr get_next(const const_node_ptr & n)
+ { return pointer_traits<node_ptr>::static_cast_from(n->next_); }
+
+ static void set_next(node_ptr n, node_ptr next)
+ { n->next_ = next; }
+
+ static node_ptr get_prev_in_group(const const_node_ptr & n)
+ { return n->prev_in_group_; }
+
+ static void set_prev_in_group(node_ptr n, node_ptr prev)
+ { n->prev_in_group_ = prev; }
+
+ static std::size_t get_hash(const const_node_ptr & n)
+ { return n->hash_; }
+
+ static void set_hash(const node_ptr & n, std::size_t h)
+ { n->hash_ = h; }
+};
+
+template<class NodeTraits>
+struct unordered_group_adapter
+{
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+
+ static node_ptr get_next(const const_node_ptr & n)
+ { return NodeTraits::get_prev_in_group(n); }
+
+ static void set_next(node_ptr n, node_ptr next)
+ { NodeTraits::set_prev_in_group(n, next); }
+};
+
+template<class NodeTraits>
+struct unordered_algorithms
+ : public circular_slist_algorithms<NodeTraits>
+{
+ typedef circular_slist_algorithms<NodeTraits> base_type;
+ typedef unordered_group_adapter<NodeTraits> group_traits;
+ typedef circular_slist_algorithms<group_traits> group_algorithms;
+ typedef NodeTraits node_traits;
+ typedef typename NodeTraits::node node;
+ typedef typename NodeTraits::node_ptr node_ptr;
+ typedef typename NodeTraits::const_node_ptr const_node_ptr;
+
+ static void init(typename base_type::node_ptr n)
+ {
+ base_type::init(n);
+ group_algorithms::init(n);
+ }
+
+ static void init_header(typename base_type::node_ptr n)
+ {
+ base_type::init_header(n);
+ group_algorithms::init_header(n);
+ }
+
+ static void unlink(typename base_type::node_ptr n)
+ {
+ base_type::unlink(n);
+ group_algorithms::unlink(n);
+ }
+};
+
+//Class to avoid defining the same algo as a circular list, as hooks would be ambiguous between them
+template<class Algo>
+struct uset_algo_wrapper : public Algo
+{};
+
+template<class VoidPointer, bool StoreHash, bool OptimizeMultiKey>
+struct get_uset_node_traits
+{
+ typedef typename detail::if_c
+ < (StoreHash || OptimizeMultiKey)
+ , unordered_node_traits<VoidPointer, StoreHash, OptimizeMultiKey>
+ , slist_node_traits<VoidPointer>
+ >::type type;
+};
+
+template<bool OptimizeMultiKey>
+struct get_uset_algo_type
+{
+ static const algo_types value = OptimizeMultiKey ? UnorderedAlgorithms : UnorderedCircularSlistAlgorithms;
+};
+
+template<class NodeTraits>
+struct get_algo<UnorderedAlgorithms, NodeTraits>
+{
+ typedef unordered_algorithms<NodeTraits> type;
+};
+
+template<class NodeTraits>
+struct get_algo<UnorderedCircularSlistAlgorithms, NodeTraits>
+{
+ typedef uset_algo_wrapper< circular_slist_algorithms<NodeTraits> > type;
+};
+
+/// @endcond
+
+//! Helper metafunction to define a \c unordered_set_base_hook that yields to the same
+//! type when the same options (either explicitly or implicitly) are used.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class ...Options>
+#else
+template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
+#endif
+struct make_unordered_set_base_hook
+{
+ /// @cond
+ typedef typename pack_options
+ < hook_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef generic_hook
+ < get_uset_algo_type <packed_options::optimize_multikey>::value
+ , typename get_uset_node_traits < typename packed_options::void_pointer
+ , packed_options::store_hash
+ , packed_options::optimize_multikey
+ >::type
+ , typename packed_options::tag
+ , packed_options::link_mode
+ , HashBaseHookId
+ > implementation_defined;
+ /// @endcond
+ typedef implementation_defined type;
+};
+
+//! Derive a class from unordered_set_base_hook in order to store objects in
+//! in an unordered_set/unordered_multi_set. unordered_set_base_hook holds the data necessary to maintain
+//! the unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set.
+//!
+//! The hook admits the following options: \c tag<>, \c void_pointer<>,
+//! \c link_mode<>, \c store_hash<> and \c optimize_multikey<>.
+//!
+//! \c tag<> defines a tag to identify the node.
+//! The same tag value can be used in different classes, but if a class is
+//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its
+//! unique tag.
+//!
+//! \c void_pointer<> is the pointer type that will be used internally in the hook
+//! and the container configured to use this hook.
+//!
+//! \c link_mode<> will specify the linking mode of the hook (\c normal_link,
+//! \c auto_unlink or \c safe_link).
+//!
+//! \c store_hash<> will tell the hook to store the hash of the value
+//! to speed up rehashings.
+//!
+//! \c optimize_multikey<> will tell the hook to store a link to form a group
+//! with other value with the same value to speed up searches and insertions
+//! in unordered_multisets with a great number of with equivalent keys.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class ...Options>
+#else
+template<class O1, class O2, class O3, class O4>
+#endif
+class unordered_set_base_hook
+ : public make_unordered_set_base_hook<
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4
+ #else
+ Options...
+ #endif
+ >::type
+{
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ public:
+ //! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
+ //! initializes the node to an unlinked state.
+ //!
+ //! <b>Throws</b>: Nothing.
+ unordered_set_base_hook();
+
+ //! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
+ //! initializes the node to an unlinked state. The argument is ignored.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Rationale</b>: Providing a copy-constructor
+ //! makes classes using the hook STL-compliant without forcing the
+ //! user to do some additional work. \c swap can be used to emulate
+ //! move-semantics.
+ unordered_set_base_hook(const unordered_set_base_hook& );
+
+ //! <b>Effects</b>: Empty function. The argument is ignored.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Rationale</b>: Providing an assignment operator
+ //! makes classes using the hook STL-compliant without forcing the
+ //! user to do some additional work. \c swap can be used to emulate
+ //! move-semantics.
+ unordered_set_base_hook& operator=(const unordered_set_base_hook& );
+
+ //! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
+ //! nothing (ie. no code is generated). If link_mode is \c safe_link and the
+ //! object is stored in an unordered_set an assertion is raised. If link_mode is
+ //! \c auto_unlink and \c is_linked() is true, the node is unlinked.
+ //!
+ //! <b>Throws</b>: Nothing.
+ ~unordered_set_base_hook();
+
+ //! <b>Effects</b>: Swapping two nodes swaps the position of the elements
+ //! related to those nodes in one or two containers. That is, if the node
+ //! this is part of the element e1, the node x is part of the element e2
+ //! and both elements are included in the containers s1 and s2, then after
+ //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1
+ //! at the position of e1. If one element is not in a container, then
+ //! after the swap-operation the other element is not in a container.
+ //! Iterators to e1 and e2 related to those nodes are invalidated.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ void swap_nodes(unordered_set_base_hook &other);
+
+ //! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
+ //!
+ //! <b>Returns</b>: true, if the node belongs to a container, false
+ //! otherwise. This function can be used to test whether \c unordered_set::iterator_to
+ //! will return a valid iterator.
+ //!
+ //! <b>Complexity</b>: Constant
+ bool is_linked() const;
+
+ //! <b>Effects</b>: Removes the node if it's inserted in a container.
+ //! This function is only allowed if link_mode is \c auto_unlink.
+ //!
+ //! <b>Throws</b>: Nothing.
+ void unlink();
+ #endif
+};
+
+
+//! Helper metafunction to define a \c unordered_set_member_hook that yields to the same
+//! type when the same options (either explicitly or implicitly) are used.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class ...Options>
+#else
+template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
+#endif
+struct make_unordered_set_member_hook
+{
+ /// @cond
+ typedef typename pack_options
+ < hook_defaults,
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4
+ #else
+ Options...
+ #endif
+ >::type packed_options;
+
+ typedef generic_hook
+ < get_uset_algo_type <packed_options::optimize_multikey>::value
+ , typename get_uset_node_traits < typename packed_options::void_pointer
+ , packed_options::store_hash
+ , packed_options::optimize_multikey
+ >::type
+ , member_tag
+ , packed_options::link_mode
+ , NoBaseHookId
+ > implementation_defined;
+ /// @endcond
+ typedef implementation_defined type;
+};
+
+//! Put a public data member unordered_set_member_hook in order to store objects of this class in
+//! an unordered_set/unordered_multi_set. unordered_set_member_hook holds the data necessary for maintaining the
+//! unordered_set/unordered_multi_set and provides an appropriate value_traits class for unordered_set/unordered_multi_set.
+//!
+//! The hook admits the following options: \c void_pointer<>,
+//! \c link_mode<> and \c store_hash<>.
+//!
+//! \c void_pointer<> is the pointer type that will be used internally in the hook
+//! and the container configured to use this hook.
+//!
+//! \c link_mode<> will specify the linking mode of the hook (\c normal_link,
+//! \c auto_unlink or \c safe_link).
+//!
+//! \c store_hash<> will tell the hook to store the hash of the value
+//! to speed up rehashings.
+#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+template<class ...Options>
+#else
+template<class O1, class O2, class O3, class O4>
+#endif
+class unordered_set_member_hook
+ : public make_unordered_set_member_hook<
+ #if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
+ O1, O2, O3, O4
+ #else
+ Options...
+ #endif
+ >::type
+{
+ #if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
+ public:
+ //! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
+ //! initializes the node to an unlinked state.
+ //!
+ //! <b>Throws</b>: Nothing.
+ unordered_set_member_hook();
+
+ //! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
+ //! initializes the node to an unlinked state. The argument is ignored.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Rationale</b>: Providing a copy-constructor
+ //! makes classes using the hook STL-compliant without forcing the
+ //! user to do some additional work. \c swap can be used to emulate
+ //! move-semantics.
+ unordered_set_member_hook(const unordered_set_member_hook& );
+
+ //! <b>Effects</b>: Empty function. The argument is ignored.
+ //!
+ //! <b>Throws</b>: Nothing.
+ //!
+ //! <b>Rationale</b>: Providing an assignment operator
+ //! makes classes using the hook STL-compliant without forcing the
+ //! user to do some additional work. \c swap can be used to emulate
+ //! move-semantics.
+ unordered_set_member_hook& operator=(const unordered_set_member_hook& );
+
+ //! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
+ //! nothing (ie. no code is generated). If link_mode is \c safe_link and the
+ //! object is stored in an unordered_set an assertion is raised. If link_mode is
+ //! \c auto_unlink and \c is_linked() is true, the node is unlinked.
+ //!
+ //! <b>Throws</b>: Nothing.
+ ~unordered_set_member_hook();
+
+ //! <b>Effects</b>: Swapping two nodes swaps the position of the elements
+ //! related to those nodes in one or two containers. That is, if the node
+ //! this is part of the element e1, the node x is part of the element e2
+ //! and both elements are included in the containers s1 and s2, then after
+ //! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1
+ //! at the position of e1. If one element is not in a container, then
+ //! after the swap-operation the other element is not in a container.
+ //! Iterators to e1 and e2 related to those nodes are invalidated.
+ //!
+ //! <b>Complexity</b>: Constant
+ //!
+ //! <b>Throws</b>: Nothing.
+ void swap_nodes(unordered_set_member_hook &other);
+
+ //! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
+ //!
+ //! <b>Returns</b>: true, if the node belongs to a container, false
+ //! otherwise. This function can be used to test whether \c unordered_set::iterator_to
+ //! will return a valid iterator.
+ //!
+ //! <b>Complexity</b>: Constant
+ bool is_linked() const;
+
+ //! <b>Effects</b>: Removes the node if it's inserted in a container.
+ //! This function is only allowed if link_mode is \c auto_unlink.
+ //!
+ //! <b>Throws</b>: Nothing.
+ void unlink();
+ #endif
+};
+
+} //namespace intrusive
+} //namespace boost
+
+#include <boost/intrusive/detail/config_end.hpp>
+
+#endif //BOOST_INTRUSIVE_UNORDERED_SET_HOOK_HPP
diff --git a/src/third_party/boost-1.68.0/boost/intrusive_ptr.hpp b/src/third_party/boost-1.69.0/boost/intrusive_ptr.hpp
index c43adbdc0dc..c43adbdc0dc 100644
--- a/src/third_party/boost-1.68.0/boost/intrusive_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/intrusive_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/io/detail/quoted_manip.hpp b/src/third_party/boost-1.69.0/boost/io/detail/quoted_manip.hpp
index 502f422aa1a..502f422aa1a 100644
--- a/src/third_party/boost-1.68.0/boost/io/detail/quoted_manip.hpp
+++ b/src/third_party/boost-1.69.0/boost/io/detail/quoted_manip.hpp
diff --git a/src/third_party/boost-1.68.0/boost/io/ios_state.hpp b/src/third_party/boost-1.69.0/boost/io/ios_state.hpp
index 07cfb345ff5..07cfb345ff5 100644
--- a/src/third_party/boost-1.68.0/boost/io/ios_state.hpp
+++ b/src/third_party/boost-1.69.0/boost/io/ios_state.hpp
diff --git a/src/third_party/boost-1.68.0/boost/io_fwd.hpp b/src/third_party/boost-1.69.0/boost/io_fwd.hpp
index 417b81e3e12..417b81e3e12 100644
--- a/src/third_party/boost-1.68.0/boost/io_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/io_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/categories.hpp b/src/third_party/boost-1.69.0/boost/iostreams/categories.hpp
index 0e84de1e985..0e84de1e985 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/categories.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/categories.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/chain.hpp b/src/third_party/boost-1.69.0/boost/iostreams/chain.hpp
new file mode 100644
index 00000000000..5a17b8c4724
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/chain.hpp
@@ -0,0 +1,594 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/assert.hpp>
+#include <exception>
+#include <iterator> // advance.
+#include <list>
+#include <memory> // allocator, auto_ptr or unique_ptr.
+#include <stdexcept> // logic_error, out_of_range.
+#include <boost/checked_delete.hpp>
+#include <boost/config.hpp> // BOOST_MSVC, template friends,
+#include <boost/detail/workaround.hpp> // BOOST_NESTED_TEMPLATE
+#include <boost/core/typeinfo.hpp>
+#include <boost/iostreams/constants.hpp>
+#include <boost/iostreams/detail/access_control.hpp>
+#include <boost/iostreams/detail/char_traits.hpp>
+#include <boost/iostreams/detail/push.hpp>
+#include <boost/iostreams/detail/streambuf.hpp> // pubsync.
+#include <boost/iostreams/detail/wrap_unwrap.hpp>
+#include <boost/iostreams/device/null.hpp>
+#include <boost/iostreams/positioning.hpp>
+#include <boost/iostreams/traits.hpp> // is_filter.
+#include <boost/iostreams/stream_buffer.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type.hpp>
+#include <boost/iostreams/detail/execute.hpp>
+
+// Sometimes type_info objects must be compared by name. Borrowed from
+// Boost.Python and Boost.Function.
+#if defined(__GNUC__) || \
+ defined(_AIX) || \
+ (defined(__sgi) && defined(__host_mips)) || \
+ (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC)) \
+ /**/
+# include <cstring>
+# define BOOST_IOSTREAMS_COMPARE_TYPE_ID(X,Y) \
+ (std::strcmp((X).name(),(Y).name()) == 0)
+#else
+# define BOOST_IOSTREAMS_COMPARE_TYPE_ID(X,Y) ((X)==(Y))
+#endif
+
+// Deprecated. Unused.
+#define BOOST_IOSTREAMS_COMPONENT_TYPE(chain, index) \
+ chain.component_type( index ) \
+ /**/
+
+// Deprecated. Unused.
+#define BOOST_IOSTREAMS_COMPONENT(chain, index, target) \
+ chain.component< target >( index ) \
+ /**/
+
+namespace boost { namespace iostreams {
+
+//--------------Definition of chain and wchain--------------------------------//
+
+namespace detail {
+
+template<typename Chain> class chain_client;
+
+//
+// Concept name: Chain.
+// Description: Represents a chain of stream buffers which provides access
+// to the first buffer in the chain and sends notifications when the
+// streambufs are added to or removed from chain.
+// Refines: Closable device with mode equal to typename Chain::mode.
+// Models: chain, converting_chain.
+// Example:
+//
+// class chain {
+// public:
+// typedef xxx chain_type;
+// typedef xxx client_type;
+// typedef xxx mode;
+// bool is_complete() const; // Ready for i/o.
+// template<typename T>
+// void push( const T& t, // Adds a stream buffer to
+// streamsize, // chain, based on t, with
+// streamsize ); // given buffer and putback
+// // buffer sizes. Pass -1 to
+// // request default size.
+// protected:
+// void register_client(client_type* client); // Associate client.
+// void notify(); // Notify client.
+// };
+//
+
+//
+// Description: Represents a chain of filters with an optional device at the
+// end.
+// Template parameters:
+// Self - A class deriving from the current instantiation of this template.
+// This is an example of the Curiously Recurring Template Pattern.
+// Ch - The character type.
+// Tr - The character traits type.
+// Alloc - The allocator type.
+// Mode - A mode tag.
+//
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+class chain_base {
+public:
+ typedef Ch char_type;
+ BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr)
+ typedef Alloc allocator_type;
+ typedef Mode mode;
+ struct category
+ : Mode,
+ device_tag
+ { };
+ typedef chain_client<Self> client_type;
+ friend class chain_client<Self>;
+private:
+ typedef linked_streambuf<Ch> streambuf_type;
+ typedef std::list<streambuf_type*> list_type;
+ typedef chain_base<Self, Ch, Tr, Alloc, Mode> my_type;
+protected:
+ chain_base() : pimpl_(new chain_impl) { }
+ chain_base(const chain_base& rhs): pimpl_(rhs.pimpl_) { }
+public:
+
+ // dual_use is a pseudo-mode to facilitate filter writing,
+ // not a genuine mode.
+ BOOST_STATIC_ASSERT((!is_convertible<mode, dual_use>::value));
+
+ //----------Buffer sizing-------------------------------------------------//
+
+ // Sets the size of the buffer created for the devices to be added to this
+ // chain. Does not affect the size of the buffer for devices already
+ // added.
+ void set_device_buffer_size(std::streamsize n)
+ { pimpl_->device_buffer_size_ = n; }
+
+ // Sets the size of the buffer created for the filters to be added
+ // to this chain. Does not affect the size of the buffer for filters already
+ // added.
+ void set_filter_buffer_size(std::streamsize n)
+ { pimpl_->filter_buffer_size_ = n; }
+
+ // Sets the size of the putback buffer for filters and devices to be added
+ // to this chain. Does not affect the size of the buffer for filters or
+ // devices already added.
+ void set_pback_size(std::streamsize n)
+ { pimpl_->pback_size_ = n; }
+
+ //----------Device interface----------------------------------------------//
+
+ std::streamsize read(char_type* s, std::streamsize n);
+ std::streamsize write(const char_type* s, std::streamsize n);
+ std::streampos seek(stream_offset off, BOOST_IOS::seekdir way);
+
+ //----------Direct component access---------------------------------------//
+
+ const boost::core::typeinfo& component_type(int n) const
+ {
+ if (static_cast<size_type>(n) >= size())
+ boost::throw_exception(std::out_of_range("bad chain offset"));
+ return (*boost::next(list().begin(), n))->component_type();
+ }
+
+ // Deprecated.
+ template<int N>
+ const boost::core::typeinfo& component_type() const { return component_type(N); }
+
+ template<typename T>
+ T* component(int n) const { return component(n, boost::type<T>()); }
+
+ // Deprecated.
+ template<int N, typename T>
+ T* component() const { return component<T>(N); }
+
+#if !BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+ private:
+#endif
+ template<typename T>
+ T* component(int n, boost::type<T>) const
+ {
+ if (static_cast<size_type>(n) >= size())
+ boost::throw_exception(std::out_of_range("bad chain offset"));
+ streambuf_type* link = *boost::next(list().begin(), n);
+ if (BOOST_IOSTREAMS_COMPARE_TYPE_ID(link->component_type(), BOOST_CORE_TYPEID(T)))
+ return static_cast<T*>(link->component_impl());
+ else
+ return 0;
+ }
+public:
+
+ //----------Container-like interface--------------------------------------//
+
+ typedef typename list_type::size_type size_type;
+ streambuf_type& front() { return *list().front(); }
+ BOOST_IOSTREAMS_DEFINE_PUSH(push, mode, char_type, push_impl)
+ void pop();
+ bool empty() const { return list().empty(); }
+ size_type size() const { return list().size(); }
+ void reset();
+
+ //----------Additional i/o functions--------------------------------------//
+
+ // Returns true if this chain is non-empty and its final link
+ // is a source or sink, i.e., if it is ready to perform i/o.
+ bool is_complete() const;
+ bool auto_close() const;
+ void set_auto_close(bool close);
+ bool sync() { return front().BOOST_IOSTREAMS_PUBSYNC() != -1; }
+ bool strict_sync();
+private:
+ template<typename T>
+ void push_impl(const T& t, std::streamsize buffer_size = -1,
+ std::streamsize pback_size = -1)
+ {
+ typedef typename iostreams::category_of<T>::type category;
+ typedef typename unwrap_ios<T>::type component_type;
+ typedef stream_buffer<
+ component_type,
+ BOOST_IOSTREAMS_CHAR_TRAITS(char_type),
+ Alloc, Mode
+ > streambuf_t;
+ typedef typename list_type::iterator iterator;
+ BOOST_STATIC_ASSERT((is_convertible<category, Mode>::value));
+ if (is_complete())
+ boost::throw_exception(std::logic_error("chain complete"));
+ streambuf_type* prev = !empty() ? list().back() : 0;
+ buffer_size =
+ buffer_size != -1 ?
+ buffer_size :
+ iostreams::optimal_buffer_size(t);
+ pback_size =
+ pback_size != -1 ?
+ pback_size :
+ pimpl_->pback_size_;
+
+#if defined(BOOST_NO_CXX11_SMART_PTR)
+
+ std::auto_ptr<streambuf_t>
+ buf(new streambuf_t(t, buffer_size, pback_size));
+
+#else
+
+ std::unique_ptr<streambuf_t>
+ buf(new streambuf_t(t, buffer_size, pback_size));
+
+#endif
+
+ list().push_back(buf.get());
+ buf.release();
+ if (is_device<component_type>::value) {
+ pimpl_->flags_ |= f_complete | f_open;
+ for ( iterator first = list().begin(),
+ last = list().end();
+ first != last;
+ ++first )
+ {
+ (*first)->set_needs_close();
+ }
+ }
+ if (prev) prev->set_next(list().back());
+ notify();
+ }
+
+ list_type& list() { return pimpl_->links_; }
+ const list_type& list() const { return pimpl_->links_; }
+ void register_client(client_type* client) { pimpl_->client_ = client; }
+ void notify() { if (pimpl_->client_) pimpl_->client_->notify(); }
+
+ //----------Nested classes------------------------------------------------//
+
+ static void close(streambuf_type* b, BOOST_IOS::openmode m)
+ {
+ if (m == BOOST_IOS::out && is_convertible<Mode, output>::value)
+ b->BOOST_IOSTREAMS_PUBSYNC();
+ b->close(m);
+ }
+
+ static void set_next(streambuf_type* b, streambuf_type* next)
+ { b->set_next(next); }
+
+ static void set_auto_close(streambuf_type* b, bool close)
+ { b->set_auto_close(close); }
+
+ struct closer {
+ typedef streambuf_type* argument_type;
+ typedef void result_type;
+ closer(BOOST_IOS::openmode m) : mode_(m) { }
+ void operator() (streambuf_type* b)
+ {
+ close(b, mode_);
+ }
+ BOOST_IOS::openmode mode_;
+ };
+ friend struct closer;
+
+ enum flags {
+ f_complete = 1,
+ f_open = 2,
+ f_auto_close = 4
+ };
+
+ struct chain_impl {
+ chain_impl()
+ : client_(0), device_buffer_size_(default_device_buffer_size),
+ filter_buffer_size_(default_filter_buffer_size),
+ pback_size_(default_pback_buffer_size),
+ flags_(f_auto_close)
+ { }
+ ~chain_impl()
+ {
+ try { close(); } catch (...) { }
+ try { reset(); } catch (...) { }
+ }
+ void close()
+ {
+ if ((flags_ & f_open) != 0) {
+ flags_ &= ~f_open;
+ stream_buffer< basic_null_device<Ch, Mode> > null;
+ if ((flags_ & f_complete) == 0) {
+ null.open(basic_null_device<Ch, Mode>());
+ set_next(links_.back(), &null);
+ }
+ links_.front()->BOOST_IOSTREAMS_PUBSYNC();
+ try {
+ boost::iostreams::detail::execute_foreach(
+ links_.rbegin(), links_.rend(),
+ closer(BOOST_IOS::in)
+ );
+ } catch (...) {
+ try {
+ boost::iostreams::detail::execute_foreach(
+ links_.begin(), links_.end(),
+ closer(BOOST_IOS::out)
+ );
+ } catch (...) { }
+ throw;
+ }
+ boost::iostreams::detail::execute_foreach(
+ links_.begin(), links_.end(),
+ closer(BOOST_IOS::out)
+ );
+ }
+ }
+ void reset()
+ {
+ typedef typename list_type::iterator iterator;
+ for ( iterator first = links_.begin(),
+ last = links_.end();
+ first != last;
+ ++first )
+ {
+ if ( (flags_ & f_complete) == 0 ||
+ (flags_ & f_auto_close) == 0 )
+ {
+ set_auto_close(*first, false);
+ }
+ streambuf_type* buf = 0;
+ std::swap(buf, *first);
+ delete buf;
+ }
+ links_.clear();
+ flags_ &= ~f_complete;
+ flags_ &= ~f_open;
+ }
+ list_type links_;
+ client_type* client_;
+ std::streamsize device_buffer_size_,
+ filter_buffer_size_,
+ pback_size_;
+ int flags_;
+ };
+ friend struct chain_impl;
+
+ //----------Member data---------------------------------------------------//
+
+private:
+ shared_ptr<chain_impl> pimpl_;
+};
+
+} // End namespace detail.
+
+//
+// Macro: BOOST_IOSTREAMS_DECL_CHAIN(name, category)
+// Description: Defines a template derived from chain_base appropriate for a
+// particular i/o category. The template has the following parameters:
+// Ch - The character type.
+// Tr - The character traits type.
+// Alloc - The allocator type.
+// Macro parameters:
+// name_ - The name of the template to be defined.
+// category_ - The i/o category of the template to be defined.
+//
+#define BOOST_IOSTREAMS_DECL_CHAIN(name_, default_char_) \
+ template< typename Mode, typename Ch = default_char_, \
+ typename Tr = BOOST_IOSTREAMS_CHAR_TRAITS(Ch), \
+ typename Alloc = std::allocator<Ch> > \
+ class name_ : public boost::iostreams::detail::chain_base< \
+ name_<Mode, Ch, Tr, Alloc>, \
+ Ch, Tr, Alloc, Mode \
+ > \
+ { \
+ public: \
+ struct category : device_tag, Mode { }; \
+ typedef Mode mode; \
+ private: \
+ typedef boost::iostreams::detail::chain_base< \
+ name_<Mode, Ch, Tr, Alloc>, \
+ Ch, Tr, Alloc, Mode \
+ > base_type; \
+ public: \
+ typedef Ch char_type; \
+ typedef Tr traits_type; \
+ typedef typename traits_type::int_type int_type; \
+ typedef typename traits_type::off_type off_type; \
+ name_() { } \
+ name_(const name_& rhs) : base_type(rhs) { } \
+ name_& operator=(const name_& rhs) \
+ { base_type::operator=(rhs); return *this; } \
+ }; \
+ /**/
+BOOST_IOSTREAMS_DECL_CHAIN(chain, char)
+BOOST_IOSTREAMS_DECL_CHAIN(wchain, wchar_t)
+#undef BOOST_IOSTREAMS_DECL_CHAIN
+
+//--------------Definition of chain_client------------------------------------//
+
+namespace detail {
+
+//
+// Template name: chain_client
+// Description: Class whose instances provide access to an underlying chain
+// using an interface similar to the chains.
+// Subclasses: the various stream and stream buffer templates.
+//
+template<typename Chain>
+class chain_client {
+public:
+ typedef Chain chain_type;
+ typedef typename chain_type::char_type char_type;
+ typedef typename chain_type::traits_type traits_type;
+ typedef typename chain_type::size_type size_type;
+ typedef typename chain_type::mode mode;
+
+ chain_client(chain_type* chn = 0) : chain_(chn ) { }
+ chain_client(chain_client* client) : chain_(client->chain_) { }
+ virtual ~chain_client() { }
+
+ const boost::core::typeinfo& component_type(int n) const
+ { return chain_->component_type(n); }
+
+ // Deprecated.
+ template<int N>
+ const boost::core::typeinfo& component_type() const
+ { return chain_->BOOST_NESTED_TEMPLATE component_type<N>(); }
+
+ template<typename T>
+ T* component(int n) const
+ { return chain_->BOOST_NESTED_TEMPLATE component<T>(n); }
+
+ // Deprecated.
+ template<int N, typename T>
+ T* component() const
+ { return chain_->BOOST_NESTED_TEMPLATE component<N, T>(); }
+
+ bool is_complete() const { return chain_->is_complete(); }
+ bool auto_close() const { return chain_->auto_close(); }
+ void set_auto_close(bool close) { chain_->set_auto_close(close); }
+ bool strict_sync() { return chain_->strict_sync(); }
+ void set_device_buffer_size(std::streamsize n)
+ { chain_->set_device_buffer_size(n); }
+ void set_filter_buffer_size(std::streamsize n)
+ { chain_->set_filter_buffer_size(n); }
+ void set_pback_size(std::streamsize n) { chain_->set_pback_size(n); }
+ BOOST_IOSTREAMS_DEFINE_PUSH(push, mode, char_type, push_impl)
+ void pop() { chain_->pop(); }
+ bool empty() const { return chain_->empty(); }
+ size_type size() const { return chain_->size(); }
+ void reset() { chain_->reset(); }
+
+ // Returns a copy of the underlying chain.
+ chain_type filters() { return *chain_; }
+ chain_type filters() const { return *chain_; }
+protected:
+ template<typename T>
+ void push_impl(const T& t BOOST_IOSTREAMS_PUSH_PARAMS())
+ { chain_->push(t BOOST_IOSTREAMS_PUSH_ARGS()); }
+ chain_type& ref() { return *chain_; }
+ void set_chain(chain_type* c)
+ { chain_ = c; chain_->register_client(this); }
+#if !defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS) && \
+ (!BOOST_WORKAROUND(__BORLANDC__, < 0x600))
+ template<typename S, typename C, typename T, typename A, typename M>
+ friend class chain_base;
+#else
+ public:
+#endif
+ virtual void notify() { }
+private:
+ chain_type* chain_;
+};
+
+//--------------Implementation of chain_base----------------------------------//
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+inline std::streamsize chain_base<Self, Ch, Tr, Alloc, Mode>::read
+ (char_type* s, std::streamsize n)
+{ return iostreams::read(*list().front(), s, n); }
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+inline std::streamsize chain_base<Self, Ch, Tr, Alloc, Mode>::write
+ (const char_type* s, std::streamsize n)
+{ return iostreams::write(*list().front(), s, n); }
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+inline std::streampos chain_base<Self, Ch, Tr, Alloc, Mode>::seek
+ (stream_offset off, BOOST_IOS::seekdir way)
+{ return iostreams::seek(*list().front(), off, way); }
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+void chain_base<Self, Ch, Tr, Alloc, Mode>::reset()
+{
+ using namespace std;
+ pimpl_->close();
+ pimpl_->reset();
+}
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+bool chain_base<Self, Ch, Tr, Alloc, Mode>::is_complete() const
+{
+ return (pimpl_->flags_ & f_complete) != 0;
+}
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+bool chain_base<Self, Ch, Tr, Alloc, Mode>::auto_close() const
+{
+ return (pimpl_->flags_ & f_auto_close) != 0;
+}
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+void chain_base<Self, Ch, Tr, Alloc, Mode>::set_auto_close(bool close)
+{
+ pimpl_->flags_ =
+ (pimpl_->flags_ & ~f_auto_close) |
+ (close ? f_auto_close : 0);
+}
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+bool chain_base<Self, Ch, Tr, Alloc, Mode>::strict_sync()
+{
+ typedef typename list_type::iterator iterator;
+ bool result = true;
+ for ( iterator first = list().begin(),
+ last = list().end();
+ first != last;
+ ++first )
+ {
+ bool s = (*first)->strict_sync();
+ result = result && s;
+ }
+ return result;
+}
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+void chain_base<Self, Ch, Tr, Alloc, Mode>::pop()
+{
+ BOOST_ASSERT(!empty());
+ if (auto_close())
+ pimpl_->close();
+ streambuf_type* buf = 0;
+ std::swap(buf, list().back());
+ buf->set_auto_close(false);
+ buf->set_next(0);
+ delete buf;
+ list().pop_back();
+ pimpl_->flags_ &= ~f_complete;
+ if (auto_close() || list().empty())
+ pimpl_->flags_ &= ~f_open;
+}
+
+} // End namespace detail.
+
+} } // End namespaces iostreams, boost.
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CHAIN_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/char_traits.hpp b/src/third_party/boost-1.69.0/boost/iostreams/char_traits.hpp
index 76ddf9d4f26..76ddf9d4f26 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/char_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/char_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/checked_operations.hpp b/src/third_party/boost-1.69.0/boost/iostreams/checked_operations.hpp
index 667d9254438..667d9254438 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/checked_operations.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/checked_operations.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/close.hpp b/src/third_party/boost-1.69.0/boost/iostreams/close.hpp
index 8ae499ff26c..8ae499ff26c 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/close.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/close.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/code_converter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/code_converter.hpp
index 0bac461d440..0bac461d440 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/code_converter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/code_converter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/combine.hpp b/src/third_party/boost-1.69.0/boost/iostreams/combine.hpp
index 107122a97bb..107122a97bb 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/combine.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/combine.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/compose.hpp b/src/third_party/boost-1.69.0/boost/iostreams/compose.hpp
index 6d62721f330..6d62721f330 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/compose.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/compose.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/concepts.hpp b/src/third_party/boost-1.69.0/boost/iostreams/concepts.hpp
index da4bfd69509..da4bfd69509 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/concepts.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/concepts.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/constants.hpp b/src/third_party/boost-1.69.0/boost/iostreams/constants.hpp
index 55e6f5fdf32..55e6f5fdf32 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/constants.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/constants.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/copy.hpp b/src/third_party/boost-1.69.0/boost/iostreams/copy.hpp
index d165cc0e013..d165cc0e013 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/absolute_path.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/absolute_path.hpp
index 090958a95eb..090958a95eb 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/absolute_path.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/absolute_path.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/access_control.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/access_control.hpp
index 9c3328a2265..9c3328a2265 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/access_control.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/access_control.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/concept_adapter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/concept_adapter.hpp
index 05b5ff4ca72..05b5ff4ca72 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/concept_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/concept_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/device_adapter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/device_adapter.hpp
index 9dd723a0fd1..9dd723a0fd1 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/device_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/device_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/direct_adapter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/direct_adapter.hpp
new file mode 100644
index 00000000000..60fe8c274f7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/direct_adapter.hpp
@@ -0,0 +1,282 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/config.hpp> // SFINAE, MSVC, put ptrdiff_t in std.
+#include <algorithm> // copy, min.
+#include <cstddef> // ptrdiff_t.
+#include <boost/detail/workaround.hpp>
+#include <boost/iostreams/categories.hpp>
+#include <boost/iostreams/detail/config/limits.hpp> // forwarding.
+#include <boost/iostreams/detail/config/wide_streams.hpp> // locale.
+#include <boost/iostreams/detail/double_object.hpp>
+#include <boost/iostreams/detail/error.hpp>
+#include <boost/iostreams/detail/ios.hpp> // openmode, seekdir, int types.
+#include <boost/iostreams/traits.hpp> // mode_of, is_direct.
+#include <boost/iostreams/operations.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/preprocessor/iteration/local.hpp>
+#include <boost/preprocessor/repetition/enum_binary_params.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+// Must come last.
+#include <boost/iostreams/detail/config/disable_warnings.hpp> // VC7.1
+
+namespace boost { namespace iostreams { namespace detail {
+
+//------------------Definition of direct_adapter_base-------------------------//
+
+// Put all initialization in base class to faciliate forwarding.
+template<typename Direct>
+class direct_adapter_base {
+public:
+ typedef typename char_type_of<Direct>::type char_type;
+ typedef typename mode_of<Direct>::type mode_type;
+ struct category
+ : mode_type,
+ device_tag,
+ closable_tag
+ #ifndef BOOST_IOSTREAMS_NO_LOCALE
+ , localizable_tag
+ #endif
+ { };
+protected:
+ explicit direct_adapter_base(const Direct& d);
+ typedef is_convertible<category, two_sequence> is_double;
+ struct pointers {
+ pointers() : beg(0), ptr(0), end(0) { }
+ char_type *beg, *ptr, *end;
+ };
+ void init_input(mpl::true_);
+ void init_input(mpl::false_) { }
+ void init_output(mpl::true_);
+ void init_output(mpl::false_) { }
+ double_object<pointers, is_double> ptrs_;
+ Direct d_;
+};
+
+template<typename Direct>
+class direct_adapter : private direct_adapter_base<Direct> {
+private:
+ typedef direct_adapter_base<Direct> base_type;
+ typedef typename base_type::pointers pointers;
+ typedef typename base_type::is_double is_double;
+ using base_type::ptrs_;
+ using base_type::d_;
+public:
+ typedef typename base_type::char_type char_type;
+ typedef typename base_type::category category;
+
+ // Constructors
+
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
+ direct_adapter(const Direct& d) : base_type(d) { }
+ direct_adapter(const direct_adapter& d) : base_type(d) { }
+# define BOOST_PP_LOCAL_LIMITS (1, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY)
+#else
+ template<typename U>
+ struct is_direct
+ : mpl::or_<
+ is_same<U, direct_adapter<Direct> >,
+ is_same<U, Direct>
+ >
+ { };
+ template<typename U>
+ direct_adapter(const U& u)
+ : base_type(forward(u, is_direct<U>()))
+ { }
+# define BOOST_PP_LOCAL_LIMITS (2, BOOST_IOSTREAMS_MAX_FORWARDING_ARITY)
+#endif
+
+#define BOOST_PP_LOCAL_MACRO(n) \
+ template<BOOST_PP_ENUM_PARAMS(n, typename P)> \
+ direct_adapter(BOOST_PP_ENUM_BINARY_PARAMS(n, const P, &p)) \
+ : base_type(Direct(BOOST_PP_ENUM_PARAMS(n, p))) \
+ { } \
+ /**/
+#include BOOST_PP_LOCAL_ITERATE()
+#undef BOOST_PP_LOCAL_MACRO
+
+ // Device interface.
+
+ std::streamsize read(char_type* s, std::streamsize n);
+ std::streamsize write(const char_type* s, std::streamsize n);
+ std::streampos seek( stream_offset, BOOST_IOS::seekdir,
+ BOOST_IOS::openmode = BOOST_IOS::in | BOOST_IOS::out );
+ void close();
+ void close(BOOST_IOS::openmode which);
+#ifndef BOOST_IOSTREAMS_NO_LOCALE
+ void imbue(const std::locale&);
+#endif
+
+ // Direct device access.
+
+ Direct& operator*() { return d_; }
+ Direct* operator->() { return &d_; }
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
+private:
+ template<typename U>
+ static Direct forward(const U& u, mpl::true_) { return u; }
+ template<typename U>
+ static Direct forward(const U& u, mpl::false_) { return Direct(u); }
+#endif
+};
+
+//--------------Definition of wrap_direct and unwrap_direct-------------------//
+
+template<typename Device>
+struct wrap_direct_traits
+ : mpl::if_<
+ is_direct<Device>,
+ direct_adapter<Device>,
+ Device
+ >
+ { };
+
+template<typename Device>
+typename wrap_direct_traits<Device>::type
+inline wrap_direct(Device dev)
+{
+ typedef typename wrap_direct_traits<Device>::type type;
+ return type(dev);
+}
+
+template<typename Device>
+inline Device& unwrap_direct(Device& d) { return d; }
+
+template<typename Device>
+inline Device& unwrap_direct(direct_adapter<Device>& d) { return *d; }
+
+//--------------Implementation of direct_adapter_base-------------------------//
+
+template<typename Direct>
+direct_adapter_base<Direct>::direct_adapter_base(const Direct& d) : d_(d)
+{
+ init_input(is_convertible<category, input>());
+ init_output(is_convertible<category, output>());
+}
+
+template<typename Direct>
+void direct_adapter_base<Direct>::init_input(mpl::true_)
+{
+ std::pair<char_type*, char_type*> seq = iostreams::input_sequence(d_);
+ ptrs_.first().beg = seq.first;
+ ptrs_.first().ptr = seq.first;
+ ptrs_.first().end = seq.second;
+}
+
+template<typename Direct>
+void direct_adapter_base<Direct>::init_output(mpl::true_)
+{
+ std::pair<char_type*, char_type*> seq = iostreams::output_sequence(d_);
+ ptrs_.second().beg = seq.first;
+ ptrs_.second().ptr = seq.first;
+ ptrs_.second().end = seq.second;
+}
+
+//--------------Implementation of direct_adapter------------------------------//
+
+template<typename Direct>
+inline std::streamsize direct_adapter<Direct>::read
+ (char_type* s, std::streamsize n)
+{
+ using namespace std;
+ pointers& get = ptrs_.first();
+ std::streamsize avail =
+ static_cast<std::streamsize>(get.end - get.ptr);
+ std::streamsize result = (std::min)(n, avail);
+ std::copy(get.ptr, get.ptr + result, s);
+ get.ptr += result;
+ return result != 0 ? result : -1;
+}
+
+template<typename Direct>
+inline std::streamsize direct_adapter<Direct>::write
+ (const char_type* s, std::streamsize n)
+{
+ using namespace std;
+ pointers& put = ptrs_.second();
+ if (n > static_cast<std::streamsize>(put.end - put.ptr))
+ boost::throw_exception(write_area_exhausted());
+ std::copy(s, s + n, put.ptr);
+ put.ptr += n;
+ return n;
+}
+
+template<typename Direct>
+inline std::streampos direct_adapter<Direct>::seek
+ ( stream_offset off, BOOST_IOS::seekdir way,
+ BOOST_IOS::openmode which )
+{
+ using namespace std;
+ pointers& get = ptrs_.first();
+ pointers& put = ptrs_.second();
+ if (way == BOOST_IOS::cur && get.ptr != put.ptr)
+ boost::throw_exception(bad_seek());
+ ptrdiff_t next = 0;
+ if ((which & BOOST_IOS::in) || !is_double::value) {
+ if (way == BOOST_IOS::beg)
+ next = off;
+ else if (way == BOOST_IOS::cur)
+ next = get.ptr - get.beg + off;
+ else
+ next = get.end - get.beg + off;
+ if (next >= 0 && next <= get.end - get.beg)
+ get.ptr = get.beg + next;
+ else
+ boost::throw_exception(bad_seek());
+ }
+ if ((which & BOOST_IOS::out) && is_double::value) {
+ if (way == BOOST_IOS::beg)
+ next = off;
+ else if (way == BOOST_IOS::cur)
+ next = put.ptr - put.beg + off;
+ else
+ next = put.end - put.beg + off;
+ if (next >= 0 && next <= put.end - put.beg)
+ put.ptr = put.beg + next;
+ else
+ boost::throw_exception(bad_seek());
+ }
+ return offset_to_position(next);
+}
+
+template<typename Direct>
+void direct_adapter<Direct>::close()
+{
+ BOOST_STATIC_ASSERT((!is_convertible<category, two_sequence>::value));
+ detail::close_all(d_);
+}
+
+template<typename Direct>
+void direct_adapter<Direct>::close(BOOST_IOS::openmode which)
+{
+ BOOST_STATIC_ASSERT((is_convertible<category, two_sequence>::value));
+ boost::iostreams::close(d_, which);
+}
+
+#ifndef BOOST_IOSTREAMS_NO_LOCALE
+ template<typename Direct>
+ void direct_adapter<Direct>::imbue(const std::locale& loc)
+ { boost::iostreams::imbue(d_, loc); }
+#endif
+
+} } } // End namespaces detail, iostreams, boost.
+
+#include <boost/iostreams/detail/config/enable_warnings.hpp>
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_ADAPTER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/filter_adapter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/filter_adapter.hpp
index a2ab49250b9..a2ab49250b9 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/filter_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/filter_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/mode_adapter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/mode_adapter.hpp
index 46e83c58af5..46e83c58af5 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/mode_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/mode_adapter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
new file mode 100644
index 00000000000..85794d0daa4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/non_blocking_adapter.hpp
@@ -0,0 +1,62 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2005-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED
+
+#include <boost/iostreams/detail/ios.hpp> // streamsize, seekdir, openmode.
+#include <boost/iostreams/read.hpp>
+#include <boost/iostreams/seek.hpp>
+#include <boost/iostreams/traits.hpp>
+#include <boost/iostreams/write.hpp>
+
+namespace boost { namespace iostreams {
+
+template<typename Device>
+class non_blocking_adapter {
+public:
+ typedef typename char_type_of<Device>::type char_type;
+ struct category
+ : mode_of<Device>::type, device_tag
+ { };
+ explicit non_blocking_adapter(Device& dev) : device_(dev) { }
+ std::streamsize read(char_type* s, std::streamsize n)
+ {
+ std::streamsize result = 0;
+ while (result < n) {
+ std::streamsize amt = iostreams::read(device_, s + result, n - result);
+ if (amt == -1)
+ break;
+ result += amt;
+ }
+ return result != 0 ? result : -1;
+ }
+ std::streamsize write(const char_type* s, std::streamsize n)
+ {
+ std::streamsize result = 0;
+ while (result < n) {
+ std::streamsize amt =
+ iostreams::write(device_, s + result, n - result);
+ // write errors, like EOF on read, need to be handled.
+ if (amt == -1)
+ break;
+ result += amt;
+ }
+ return result;
+ }
+ std::streampos seek( stream_offset off, BOOST_IOS::seekdir way,
+ BOOST_IOS::openmode which =
+ BOOST_IOS::in | BOOST_IOS::out )
+ { return iostreams::seek(device_, off, way, which); }
+public:
+ non_blocking_adapter& operator=(const non_blocking_adapter&);
+ Device& device_;
+};
+
+} } // End namespace iostreams.
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_NON_BLOCKING_ADAPTER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
index 2ed9039c7ba..2ed9039c7ba 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/output_iterator_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/range_adapter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/range_adapter.hpp
index b7fe56f7ed9..b7fe56f7ed9 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/adapter/range_adapter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/adapter/range_adapter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/add_facet.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/add_facet.hpp
index 6033d4f8a1e..6033d4f8a1e 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/add_facet.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/add_facet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/bool_trait_def.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/bool_trait_def.hpp
index c3fb9d587b9..c3fb9d587b9 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/bool_trait_def.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/bool_trait_def.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp
index 4444916c3ae..4444916c3ae 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp
index 834f996f40e..834f996f40e 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
index d5c7107087e..d5c7107087e 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/broken_overload_resolution/stream_buffer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/buffer.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/buffer.hpp
new file mode 100644
index 00000000000..59617f4eb3e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/buffer.hpp
@@ -0,0 +1,229 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <algorithm> // swap.
+#include <memory> // allocator.
+#include <boost/config.hpp> // member templates.
+#include <boost/iostreams/char_traits.hpp>
+#include <boost/iostreams/detail/ios.hpp> // streamsize.
+#include <boost/iostreams/read.hpp>
+#include <boost/iostreams/traits.hpp> // int_type_of.
+#include <boost/iostreams/checked_operations.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost { namespace iostreams { namespace detail {
+
+//----------------Buffers-----------------------------------------------------//
+
+//
+// Template name: buffer
+// Description: Character buffer.
+// Template parameters:
+// Ch - The character type.
+// Alloc - The Allocator type.
+//
+template< typename Ch,
+ typename Alloc = std::allocator<Ch> >
+class basic_buffer {
+private:
+#ifndef BOOST_NO_STD_ALLOCATOR
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
+ typedef typename Alloc::template rebind<Ch>::other allocator_type;
+#else
+ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<Ch> allocator_type;
+ typedef std::allocator_traits<allocator_type> allocator_traits;
+#endif
+#else
+ typedef std::allocator<Ch> allocator_type;
+#endif
+ static Ch* allocate(std::streamsize buffer_size);
+public:
+ basic_buffer();
+ basic_buffer(std::streamsize buffer_size);
+ ~basic_buffer();
+ void resize(std::streamsize buffer_size);
+ Ch* begin() const { return buf_; }
+ Ch* end() const { return buf_ + size_; }
+ Ch* data() const { return buf_; }
+ std::streamsize size() const { return size_; }
+ void swap(basic_buffer& rhs);
+private:
+ // Disallow copying and assignment.
+ basic_buffer(const basic_buffer&);
+ basic_buffer& operator=(const basic_buffer&);
+ Ch* buf_;
+ std::streamsize size_;
+};
+
+template<typename Ch, typename Alloc>
+void swap(basic_buffer<Ch, Alloc>& lhs, basic_buffer<Ch, Alloc>& rhs)
+{ lhs.swap(rhs); }
+
+//
+// Template name: buffer
+// Description: Character buffer with two pointers accessible via ptr() and
+// eptr().
+// Template parameters:
+// Ch - A character type.
+//
+template< typename Ch,
+ typename Alloc = std::allocator<Ch> >
+class buffer : public basic_buffer<Ch, Alloc> {
+private:
+ typedef basic_buffer<Ch, Alloc> base;
+public:
+ typedef iostreams::char_traits<Ch> traits_type;
+ using base::resize;
+ using base::data;
+ using base::size;
+ typedef Ch* const const_pointer;
+ buffer(std::streamsize buffer_size);
+ Ch* & ptr() { return ptr_; }
+ const_pointer& ptr() const { return ptr_; }
+ Ch* & eptr() { return eptr_; }
+ const_pointer& eptr() const { return eptr_; }
+ void set(std::streamsize ptr, std::streamsize end);
+ void swap(buffer& rhs);
+
+ // Returns an int_type as a status code.
+ template<typename Source>
+ typename int_type_of<Source>::type fill(Source& src)
+ {
+ using namespace std;
+ std::streamsize keep;
+ if ((keep = static_cast<std::streamsize>(eptr_ - ptr_)) > 0)
+ traits_type::move(
+ this->data(),
+ ptr_,
+ static_cast<size_t>(keep)
+ );
+ set(0, keep);
+ std::streamsize result =
+ iostreams::read(src, this->data() + keep, this->size() - keep);
+ if (result != -1)
+ this->set(0, keep + result);
+ return result == -1 ?
+ traits_type::eof() :
+ result == 0 ?
+ traits_type::would_block() :
+ traits_type::good();
+
+ }
+
+ // Returns true if one or more characters were written.
+ template<typename Sink>
+ bool flush(Sink& dest)
+ {
+ using namespace std;
+ std::streamsize amt = static_cast<std::streamsize>(eptr_ - ptr_);
+ std::streamsize result = iostreams::write_if(dest, ptr_, amt);
+ if (result < amt) {
+ traits_type::move( this->data(),
+ ptr_ + static_cast<size_t>(result),
+ static_cast<size_t>(amt - result) );
+ }
+ this->set(0, amt - result);
+ return result != 0;
+ }
+private:
+ Ch *ptr_, *eptr_;
+};
+
+template<typename Ch, typename Alloc>
+void swap(buffer<Ch, Alloc>& lhs, buffer<Ch, Alloc>& rhs)
+{ lhs.swap(rhs); }
+
+//--------------Implementation of basic_buffer--------------------------------//
+
+template<typename Ch, typename Alloc>
+basic_buffer<Ch, Alloc>::basic_buffer() : buf_(0), size_(0) { }
+
+template<typename Ch, typename Alloc>
+inline Ch* basic_buffer<Ch, Alloc>::allocate(std::streamsize buffer_size)
+{
+#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
+ return static_cast<Ch*>(allocator_type().allocate(
+ static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(buffer_size), 0));
+#else
+ allocator_type alloc;
+ return static_cast<Ch*>(allocator_traits::allocate(alloc,
+ static_cast<BOOST_DEDUCED_TYPENAME allocator_traits::size_type>(buffer_size)));
+#endif
+}
+
+template<typename Ch, typename Alloc>
+basic_buffer<Ch, Alloc>::basic_buffer(std::streamsize buffer_size)
+ : buf_(allocate(buffer_size)),
+ size_(buffer_size) // Cast for SunPro 5.3.
+ { }
+
+template<typename Ch, typename Alloc>
+inline basic_buffer<Ch, Alloc>::~basic_buffer()
+{
+ if (buf_) {
+#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
+ allocator_type().deallocate(buf_,
+ static_cast<BOOST_DEDUCED_TYPENAME Alloc::size_type>(size_));
+#else
+ allocator_type alloc;
+ allocator_traits::deallocate(alloc, buf_,
+ static_cast<BOOST_DEDUCED_TYPENAME allocator_traits::size_type>(size_));
+#endif
+ }
+}
+
+template<typename Ch, typename Alloc>
+inline void basic_buffer<Ch, Alloc>::resize(std::streamsize buffer_size)
+{
+ if (size_ != buffer_size) {
+ basic_buffer<Ch, Alloc> temp(buffer_size);
+ std::swap(size_, temp.size_);
+ std::swap(buf_, temp.buf_);
+ }
+}
+
+template<typename Ch, typename Alloc>
+void basic_buffer<Ch, Alloc>::swap(basic_buffer& rhs)
+{
+ std::swap(buf_, rhs.buf_);
+ std::swap(size_, rhs.size_);
+}
+
+//--------------Implementation of buffer--------------------------------------//
+
+template<typename Ch, typename Alloc>
+buffer<Ch, Alloc>::buffer(std::streamsize buffer_size)
+ : basic_buffer<Ch, Alloc>(buffer_size), ptr_(data()), eptr_(data() + buffer_size) { }
+
+template<typename Ch, typename Alloc>
+inline void buffer<Ch, Alloc>::set(std::streamsize ptr, std::streamsize end)
+{
+ ptr_ = data() + ptr;
+ eptr_ = data() + end;
+}
+
+template<typename Ch, typename Alloc>
+inline void buffer<Ch, Alloc>::swap(buffer& rhs)
+{
+ base::swap(rhs);
+ std::swap(ptr_, rhs.ptr_);
+ std::swap(eptr_, rhs.eptr_);
+}
+
+//----------------------------------------------------------------------------//
+
+} } } // End namespaces detail, iostreams, boost.
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_BUFFERS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/call_traits.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/call_traits.hpp
index be6123737be..be6123737be 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/call_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/call_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/char_traits.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/char_traits.hpp
index ce3eb6dbe7b..ce3eb6dbe7b 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/char_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/char_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/codecvt_helper.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_helper.hpp
index 0bd8d598ea9..0bd8d598ea9 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/codecvt_helper.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_helper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/codecvt_holder.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_holder.hpp
index 13a93334ebe..13a93334ebe 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/codecvt_holder.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/codecvt_holder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/auto_link.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/auto_link.hpp
index 07ab23c3c1d..07ab23c3c1d 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/auto_link.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/auto_link.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/bzip2.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/bzip2.hpp
index bfcda405600..bfcda405600 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/bzip2.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/bzip2.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/codecvt.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/codecvt.hpp
new file mode 100644
index 00000000000..48adf4da800
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/codecvt.hpp
@@ -0,0 +1,81 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/iostreams/detail/config/wide_streams.hpp>
+#include <cstddef>
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+//------------------Support for codecvt with user-defined state types---------//
+
+#if defined(__MSL_CPP__) || defined(__LIBCOMO__) || \
+ BOOST_WORKAROUND(_STLPORT_VERSION, <= 0x450) || \
+ defined(_LIBCPP_VERSION) \
+ /**/
+# define BOOST_IOSTREAMS_NO_PRIMARY_CODECVT_DEFINITION
+#endif
+
+#if defined(__GLIBCPP__) || defined(__GLIBCXX__) || \
+ BOOST_WORKAROUND(_STLPORT_VERSION, > 0x450) \
+ /**/
+# define BOOST_IOSTREAMS_EMPTY_PRIMARY_CODECVT_DEFINITION
+#endif
+
+//------------------Check for codecvt ctor taking a reference count-----------//
+
+#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205)) || \
+ BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461) \
+ /**/
+# define BOOST_IOSTREAMS_NO_CODECVT_CTOR_FROM_SIZE_T
+#endif
+
+//------------------Normalize codecvt::length---------------------------------//
+
+#if !defined(__MSL_CPP__) && !defined(__LIBCOMO__) && !defined(__clang__) && \
+ (!defined(BOOST_RWSTD_VER) || BOOST_RWSTD_VER < 0x04010300) && \
+ (!defined(__MACH__) || !defined(__INTEL_COMPILER))
+ /**/
+# define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER const
+#else
+# define BOOST_IOSTREAMS_CODECVT_CV_QUALIFIER
+#endif
+
+//------------------Check for codecvt::max_length-----------------------------//
+
+#if BOOST_WORKAROUND(_STLPORT_VERSION, < 0x461)
+# define BOOST_IOSTREAMS_NO_CODECVT_MAX_LENGTH
+#endif
+
+//------------------Put mbstate_t and codecvt in std--------------------------//
+
+#ifndef BOOST_IOSTREAMS_NO_LOCALE
+# include <locale>
+#endif
+
+// From Robert Ramey's version of utf8_codecvt_facet.
+namespace std {
+
+#if defined(__LIBCOMO__)
+ using ::mbstate_t;
+#elif defined(BOOST_DINKUMWARE_STDLIB) && !defined(__BORLANDC__)
+ using ::mbstate_t;
+#elif defined(__SGI_STL_PORT)
+#elif defined(BOOST_NO_STDC_NAMESPACE)
+ using ::codecvt;
+ using ::mbstate_t;
+#endif
+
+} // End namespace std.
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_CODECVT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/disable_warnings.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/disable_warnings.hpp
index ef25cdb907a..ef25cdb907a 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/disable_warnings.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/disable_warnings.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/dyn_link.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/dyn_link.hpp
index cc8c73bd909..cc8c73bd909 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/dyn_link.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/dyn_link.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/enable_warnings.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/enable_warnings.hpp
index 5712f364423..5712f364423 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/enable_warnings.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/enable_warnings.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/fpos.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/fpos.hpp
new file mode 100644
index 00000000000..b46b168973e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/fpos.hpp
@@ -0,0 +1,44 @@
+/*
+ * Distributed under the Boost Software License, Version 1.0.(See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+ *
+ * See http://www.boost.org/libs/iostreams for documentation.
+
+ * File: boost/iostreams/detail/execute.hpp
+ * Date: Thu Dec 06 13:21:54 MST 2007
+ * Copyright: 2007-2008 CodeRage, LLC
+ * Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
+ *
+ * Defines the preprocessor symbol BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS for
+ * platforms that use the implementation of std::fpos from the Dinkumware
+ * Standard Library.
+ */
+
+#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/config.hpp>
+
+# if (defined(_YVALS) || defined(_CPPLIB_VER)) && !defined(__SGI_STL_PORT) && \
+ !defined(_STLPORT_VERSION) && !defined(__QNX__) && !defined(_VX_CPU) && !defined(__VXWORKS__) \
+ && !(defined(BOOST_MSVC) && _MSVC_STL_VERSION >= 141)
+ /**/
+
+#include <boost/iostreams/detail/ios.hpp>
+
+# define BOOST_IOSTREAMS_HAS_DINKUMWARE_FPOS
+
+#if !defined(_FPOSOFF)
+#define BOOST_IOSTREAMS_FPOSOFF(fp) ((long long)(fp))
+#else
+#define BOOST_IOSTREAMS_FPOSOFF(fp) _FPOSOFF(fp)
+#endif
+
+# endif
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_FPOS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/gcc.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/gcc.hpp
index ff6892a5e52..ff6892a5e52 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/gcc.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/gcc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/limits.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/limits.hpp
index 155d6b0a69c..155d6b0a69c 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/limits.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/limits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/overload_resolution.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/overload_resolution.hpp
index 63d9e2830d5..63d9e2830d5 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/overload_resolution.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/overload_resolution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/rtl.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/rtl.hpp
index d9fbe5080de..d9fbe5080de 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/rtl.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/rtl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/unreachable_return.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/unreachable_return.hpp
index 65fba609deb..65fba609deb 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/unreachable_return.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/unreachable_return.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/config/wide_streams.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/wide_streams.hpp
new file mode 100644
index 00000000000..ca8dff38f5c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/wide_streams.hpp
@@ -0,0 +1,54 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Adapted from http://www.boost.org/more/separate_compilation.html, by
+// John Maddock.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <cstddef>
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+//------------------Templated stream support----------------------------------//
+
+// From boost/dynamic_bitset.hpp; thanks to Matthias Troyer for cray patch.
+#ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
+# if defined(__STL_CONFIG_H) && \
+ !defined (__STL_USE_NEW_IOSTREAMS) && !defined(__crayx1) \
+ /**/
+# define BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
+# endif
+#endif // #ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
+
+//------------------Wide stream support---------------------------------------//
+
+#ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS
+# if defined(BOOST_IOSTREAMS_NO_STREAM_TEMPLATES) || \
+ defined (BOOST_NO_STD_WSTREAMBUF) && \
+ ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
+ /**/
+# define BOOST_IOSTREAMS_NO_WIDE_STREAMS
+# endif
+#endif // #ifndef BOOST_IOSTREAMS_NO_WIDE_STREAMS
+
+//------------------Locale support--------------------------------------------//
+
+#ifndef BOOST_IOSTREAMS_NO_LOCALE
+# if defined(BOOST_NO_STD_LOCALE) && \
+ ( !defined(__MSL_CPP__) || defined(_MSL_NO_WCHART_CPP_SUPPORT) ) \
+ /**/
+# define BOOST_IOSTREAMS_NO_LOCALE
+# endif
+#endif // #ifndef BOOST_IOSTREAMS_NO_LOCALE
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_CONFIG_WIDE_STREAMS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/windows_posix.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/windows_posix.hpp
index 4e73c50d0de..4e73c50d0de 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/windows_posix.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/windows_posix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/zlib.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/zlib.hpp
index 017dd0c1828..017dd0c1828 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/config/zlib.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/config/zlib.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/counted_array.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/counted_array.hpp
index c0cd8a17654..c0cd8a17654 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/counted_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/counted_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/current_directory.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/current_directory.hpp
index 374444c59f1..374444c59f1 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/current_directory.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/current_directory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/default_arg.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/default_arg.hpp
index c443e9872ab..c443e9872ab 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/default_arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/default_arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/dispatch.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/dispatch.hpp
index 35cf244141b..35cf244141b 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/dispatch.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/dispatch.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/double_object.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/double_object.hpp
index efb3b786010..efb3b786010 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/double_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/double_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/enable_if_stream.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/enable_if_stream.hpp
index 826e44d2a55..826e44d2a55 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/enable_if_stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/enable_if_stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/error.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/error.hpp
index 85cbd98fe26..85cbd98fe26 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/error.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/execute.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/execute.hpp
index 28e42172344..28e42172344 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/execute.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/execute.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/file_handle.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/file_handle.hpp
index d797efb29a0..d797efb29a0 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/file_handle.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/file_handle.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/forward.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/forward.hpp
index f5ed4f85dc9..f5ed4f85dc9 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/fstream.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/fstream.hpp
index 848258d97c0..848258d97c0 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/fstream.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/fstream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/functional.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/functional.hpp
index 97b7fe5e758..97b7fe5e758 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/functional.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/functional.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/ios.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/ios.hpp
index b123ddeb58e..b123ddeb58e 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/ios.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/ios.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/iostream.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/iostream.hpp
index 1e19f082785..1e19f082785 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/iostream.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/iostream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/is_dereferenceable.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/is_dereferenceable.hpp
index 06744abbdf1..06744abbdf1 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/is_dereferenceable.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/is_dereferenceable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/is_iterator_range.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/is_iterator_range.hpp
index 39d845f4a37..39d845f4a37 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/is_iterator_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/is_iterator_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/newline.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/newline.hpp
index d6fceb04b0c..d6fceb04b0c 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/newline.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/newline.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/optional.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/optional.hpp
index 867dfbda690..867dfbda690 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/optional.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/optional.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/param_type.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/param_type.hpp
index 3a9949348cc..3a9949348cc 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/param_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/param_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/path.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/path.hpp
index a5d1ad330f0..a5d1ad330f0 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/path.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/path.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/push.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/push.hpp
index 1a9393cb026..1a9393cb026 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/push.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/push.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/push_params.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/push_params.hpp
index 8d8e5d74b36..8d8e5d74b36 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/push_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/push_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/resolve.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/resolve.hpp
index 2d480950e11..2d480950e11 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/resolve.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/resolve.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/restrict_impl.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/restrict_impl.hpp
new file mode 100644
index 00000000000..e949b6ac479
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/restrict_impl.hpp
@@ -0,0 +1,483 @@
+/*
+ * Distributed under the Boost Software License, Version 1.0.(See accompanying
+ * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+ *
+ * See http://www.boost.org/libs/iostreams for documentation.
+
+ * File: boost/iostreams/detail/restrict_impl.hpp
+ * Date: Sun Jan 06 12:57:30 MST 2008
+ * Copyright: 2007-2008 CodeRage, LLC
+ * Author: Jonathan Turkanis
+ * Contact: turkanis at coderage dot com
+ *
+ * If included with the macro BOOST_IOSTREAMS_RESTRICT undefined, defines the
+ * class template boost::iostreams::restriction. If included with the macro
+ * BOOST_IOSTREAMS_RESTRICT defined as an identifier, defines the overloaded
+ * function template boost::iostreams::BOOST_IOSTREAMS_RESTRICT, and object
+ * generator for boost::iostreams::restriction.
+ *
+ * This design allows <boost/iostreams/restrict.hpp> and
+ * <boost/iostreams/slice.hpp> to share an implementation.
+ */
+
+#if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) && \
+ !defined(BOOST_IOSTREAMS_RESTRICT)
+# define BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED
+
+//------------------Implementation of restriction-----------------------------//
+
+# include <algorithm> // min.
+# include <utility> // pair.
+# include <boost/cstdint.hpp> // intmax_t.
+# include <boost/config.hpp> // DEDUCED_TYPENAME.
+# include <boost/iostreams/categories.hpp>
+# include <boost/iostreams/char_traits.hpp>
+# include <boost/iostreams/detail/adapter/device_adapter.hpp>
+# include <boost/iostreams/detail/adapter/filter_adapter.hpp>
+# include <boost/iostreams/detail/call_traits.hpp>
+# include <boost/iostreams/detail/enable_if_stream.hpp>
+# include <boost/iostreams/detail/error.hpp>
+# include <boost/iostreams/detail/ios.hpp> // failure.
+# include <boost/iostreams/detail/select.hpp>
+# include <boost/iostreams/operations.hpp>
+# include <boost/iostreams/skip.hpp>
+# include <boost/iostreams/traits.hpp> // mode_of, is_direct.
+# include <boost/mpl/bool.hpp>
+# include <boost/static_assert.hpp>
+# include <boost/throw_exception.hpp>
+# include <boost/type_traits/is_convertible.hpp>
+
+# include <boost/iostreams/detail/config/disable_warnings.hpp>
+
+namespace boost { namespace iostreams {
+
+namespace detail {
+
+//
+// Template name: restricted_indirect_device.
+// Description: Provides an restricted view of an indirect Device.
+// Template parameters:
+// Device - An indirect model of Device that models either Source or
+// SeekableDevice.
+//
+template<typename Device>
+class restricted_indirect_device : public device_adapter<Device> {
+private:
+ typedef typename detail::param_type<Device>::type param_type;
+public:
+ typedef typename char_type_of<Device>::type char_type;
+ typedef typename mode_of<Device>::type mode;
+ BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
+ struct category
+ : mode,
+ device_tag,
+ closable_tag,
+ flushable_tag,
+ localizable_tag,
+ optimally_buffered_tag
+ { };
+ restricted_indirect_device( param_type dev, stream_offset off,
+ stream_offset len = -1 );
+ std::streamsize read(char_type* s, std::streamsize n);
+ std::streamsize write(const char_type* s, std::streamsize n);
+ std::streampos seek(stream_offset off, BOOST_IOS::seekdir way);
+private:
+ stream_offset beg_, pos_, end_;
+};
+
+//
+// Template name: restricted_direct_device.
+// Description: Provides an restricted view of a Direct Device.
+// Template parameters:
+// Device - A model of Direct and Device.
+//
+template<typename Device>
+class restricted_direct_device : public device_adapter<Device> {
+public:
+ typedef typename char_type_of<Device>::type char_type;
+ typedef std::pair<char_type*, char_type*> pair_type;
+ typedef typename mode_of<Device>::type mode;
+ BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
+ struct category
+ : mode_of<Device>::type,
+ device_tag,
+ direct_tag,
+ closable_tag,
+ localizable_tag
+ { };
+ restricted_direct_device( const Device& dev, stream_offset off,
+ stream_offset len = -1 );
+ pair_type input_sequence();
+ pair_type output_sequence();
+private:
+ pair_type sequence(mpl::true_);
+ pair_type sequence(mpl::false_);
+ char_type *beg_, *end_;
+};
+
+//
+// Template name: restricted_filter.
+// Description: Provides an restricted view of a Filter.
+// Template parameters:
+// Filter - An indirect model of Filter.
+//
+template<typename Filter>
+class restricted_filter : public filter_adapter<Filter> {
+public:
+ typedef typename char_type_of<Filter>::type char_type;
+ typedef typename mode_of<Filter>::type mode;
+ BOOST_STATIC_ASSERT(!(is_convertible<mode, detail::two_sequence>::value));
+ struct category
+ : mode,
+ filter_tag,
+ multichar_tag,
+ closable_tag,
+ localizable_tag,
+ optimally_buffered_tag
+ { };
+ restricted_filter( const Filter& flt, stream_offset off,
+ stream_offset len = -1 );
+
+ template<typename Source>
+ std::streamsize read(Source& src, char_type* s, std::streamsize n)
+ {
+ using namespace std;
+ if (!open_)
+ open(src, BOOST_IOS::in);
+ std::streamsize amt =
+ end_ != -1 ?
+ (std::min) (n, static_cast<std::streamsize>(end_ - pos_)) :
+ n;
+ std::streamsize result =
+ iostreams::read(this->component(), src, s, amt);
+ if (result != -1)
+ pos_ += result;
+ return result;
+ }
+
+ template<typename Sink>
+ std::streamsize write(Sink& snk, const char_type* s, std::streamsize n)
+ {
+ if (!open_)
+ open(snk, BOOST_IOS::out);
+ if (end_ != -1 && pos_ + n >= end_) {
+ if(pos_ < end_)
+ pos_ += iostreams::write(this->component(),
+ snk, s, end_ - pos_);
+ boost::throw_exception(bad_write());
+ }
+ std::streamsize result =
+ iostreams::write(this->component(), snk, s, n);
+ pos_ += result;
+ return result;
+ }
+
+ template<typename Device>
+ std::streampos seek(Device& dev, stream_offset off, BOOST_IOS::seekdir way)
+ {
+ stream_offset next;
+ if (way == BOOST_IOS::beg) {
+ next = beg_ + off;
+ } else if (way == BOOST_IOS::cur) {
+ next = pos_ + off;
+ } else if (end_ != -1) {
+ next = end_ + off;
+ } else {
+ // Restriction is half-open; seek relative to the actual end.
+ pos_ = this->component().seek(dev, off, BOOST_IOS::end);
+ if (pos_ < beg_)
+ boost::throw_exception(bad_seek());
+ return offset_to_position(pos_ - beg_);
+ }
+ if (next < beg_ || (end_ != -1 && next >= end_))
+ boost::throw_exception(bad_seek());
+ pos_ = this->component().seek(dev, next, BOOST_IOS::cur);
+ return offset_to_position(pos_ - beg_);
+ }
+
+ template<typename Device>
+ void close(Device& dev)
+ {
+ open_ = false;
+ detail::close_all(this->component(), dev);
+ }
+
+ template<typename Device>
+ void close(Device& dev, BOOST_IOS::openmode which)
+ {
+ open_ = false;
+ iostreams::close(this->component(), dev, which);
+ }
+private:
+ template<typename Device>
+ void open(Device& dev, BOOST_IOS::openmode which)
+ {
+ typedef typename is_convertible<mode, dual_use>::type is_dual_use;
+ open_ = true;
+ which = is_dual_use() ? which : (BOOST_IOS::in | BOOST_IOS::out);
+ iostreams::skip(this->component(), dev, beg_, which);
+ }
+
+ stream_offset beg_, pos_, end_;
+ bool open_;
+};
+
+template<typename T>
+struct restriction_traits
+ : iostreams::select< // Disambiguation for Tru64.
+ is_filter<T>, restricted_filter<T>,
+ is_direct<T>, restricted_direct_device<T>,
+ else_, restricted_indirect_device<T>
+ >
+ { };
+
+} // End namespace detail.
+
+template<typename T>
+struct restriction : public detail::restriction_traits<T>::type {
+ typedef typename detail::param_type<T>::type param_type;
+ typedef typename detail::restriction_traits<T>::type base_type;
+ restriction(param_type t, stream_offset off, stream_offset len = -1)
+ : base_type(t, off, len)
+ { }
+};
+
+namespace detail {
+
+//--------------Implementation of restricted_indirect_device------------------//
+
+template<typename Device>
+restricted_indirect_device<Device>::restricted_indirect_device
+ (param_type dev, stream_offset off, stream_offset len)
+ : device_adapter<Device>(dev), beg_(off), pos_(off),
+ end_(len != -1 ? off + len : -1)
+{
+ if (len < -1 || off < 0)
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
+ iostreams::skip(this->component(), off);
+}
+
+template<typename Device>
+inline std::streamsize restricted_indirect_device<Device>::read
+ (char_type* s, std::streamsize n)
+{
+ using namespace std;
+ std::streamsize amt =
+ end_ != -1 ?
+ (std::min) (n, static_cast<std::streamsize>(end_ - pos_)) :
+ n;
+ std::streamsize result = iostreams::read(this->component(), s, amt);
+ if (result != -1)
+ pos_ += result;
+ return result;
+}
+
+template<typename Device>
+inline std::streamsize restricted_indirect_device<Device>::write
+ (const char_type* s, std::streamsize n)
+{
+ if (end_ != -1 && pos_ + n >= end_) {
+ if(pos_ < end_)
+ pos_ += iostreams::write(this->component(), s, end_ - pos_);
+ boost::throw_exception(bad_write());
+ }
+ std::streamsize result = iostreams::write(this->component(), s, n);
+ pos_ += result;
+ return result;
+}
+
+template<typename Device>
+std::streampos restricted_indirect_device<Device>::seek
+ (stream_offset off, BOOST_IOS::seekdir way)
+{
+ stream_offset next;
+ if (way == BOOST_IOS::beg) {
+ next = beg_ + off;
+ } else if (way == BOOST_IOS::cur) {
+ next = pos_ + off;
+ } else if (end_ != -1) {
+ next = end_ + off;
+ } else {
+ // Restriction is half-open; seek relative to the actual end.
+ pos_ = iostreams::seek(this->component(), off, BOOST_IOS::end);
+ if (pos_ < beg_)
+ boost::throw_exception(bad_seek());
+ return offset_to_position(pos_ - beg_);
+ }
+ if (next < beg_ || (end_ != -1 && next > end_))
+ boost::throw_exception(bad_seek());
+ pos_ = iostreams::seek(this->component(), next - pos_, BOOST_IOS::cur);
+ return offset_to_position(pos_ - beg_);
+}
+
+//--------------Implementation of restricted_direct_device--------------------//
+
+template<typename Device>
+restricted_direct_device<Device>::restricted_direct_device
+ (const Device& dev, stream_offset off, stream_offset len)
+ : device_adapter<Device>(dev), beg_(0), end_(0)
+{
+ std::pair<char_type*, char_type*> seq =
+ sequence(is_convertible<category, input>());
+ if ( off < 0 || len < -1 ||
+ (len != -1 && off + len > seq.second - seq.first) )
+ {
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
+ }
+ beg_ = seq.first + off;
+ end_ = len != -1 ?
+ seq.first + off + len :
+ seq.second;
+}
+
+template<typename Device>
+typename restricted_direct_device<Device>::pair_type
+restricted_direct_device<Device>::input_sequence()
+{
+ BOOST_STATIC_ASSERT((is_convertible<category, input>::value));
+ return std::make_pair(beg_, end_);
+}
+
+template<typename Device>
+typename restricted_direct_device<Device>::pair_type
+restricted_direct_device<Device>::output_sequence()
+{
+ BOOST_STATIC_ASSERT((is_convertible<category, output>::value));
+ return std::make_pair(beg_, end_);
+}
+
+template<typename Device>
+typename restricted_direct_device<Device>::pair_type
+restricted_direct_device<Device>::sequence(mpl::true_)
+{ return iostreams::input_sequence(this->component()); }
+
+template<typename Device>
+typename restricted_direct_device<Device>::pair_type
+restricted_direct_device<Device>::sequence(mpl::false_)
+{ return iostreams::output_sequence(this->component()); }
+
+//--------------Implementation of restricted_filter---------------------------//
+
+template<typename Filter>
+restricted_filter<Filter>::restricted_filter
+ (const Filter& flt, stream_offset off, stream_offset len)
+ : filter_adapter<Filter>(flt), beg_(off),
+ pos_(off), end_(len != -1 ? off + len : -1), open_(false)
+{
+ if (len < -1 || off < 0)
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE("bad offset"));
+}
+
+} // End namespace detail.
+
+} } // End namespaces iostreams, boost.
+
+#elif defined(BOOST_IOSTREAMS_RESTRICT)
+
+namespace boost { namespace iostreams {
+
+//--------------Implementation of restrict/slice------------------------------//
+
+// Note: The following workarounds are patterned after resolve.hpp. It has not
+// yet been confirmed that they are necessary.
+
+# ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //------------------------//
+# ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //------------------------------//
+
+template<typename T>
+restriction<T>
+BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
+ BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
+{ return restriction<T>(t, off, len); }
+
+template<typename Ch, typename Tr>
+restriction< std::basic_streambuf<Ch, Tr> >
+BOOST_IOSTREAMS_RESTRICT( std::basic_streambuf<Ch, Tr>& sb, stream_offset off,
+ stream_offset len = -1 )
+{ return restriction< std::basic_streambuf<Ch, Tr> >(sb, off, len); }
+
+template<typename Ch, typename Tr>
+restriction< std::basic_istream<Ch, Tr> >
+BOOST_IOSTREAMS_RESTRICT
+ (std::basic_istream<Ch, Tr>& is, stream_offset off, stream_offset len = -1)
+{ return restriction< std::basic_istream<Ch, Tr> >(is, off, len); }
+
+template<typename Ch, typename Tr>
+restriction< std::basic_ostream<Ch, Tr> >
+BOOST_IOSTREAMS_RESTRICT
+ (std::basic_ostream<Ch, Tr>& os, stream_offset off, stream_offset len = -1)
+{ return restriction< std::basic_ostream<Ch, Tr> >(os, off, len); }
+
+template<typename Ch, typename Tr>
+restriction< std::basic_iostream<Ch, Tr> >
+BOOST_IOSTREAMS_RESTRICT
+ (std::basic_iostream<Ch, Tr>& io, stream_offset off, stream_offset len = -1)
+{ return restriction< std::basic_iostream<Ch, Tr> >(io, off, len); }
+
+# else // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //--------------------//
+
+template<typename T>
+restriction<T>
+BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
+ BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
+{ return restriction<T>(t, off, len); }
+
+restriction<std::streambuf>
+BOOST_IOSTREAMS_RESTRICT
+ (std::streambuf& sb, stream_offset off, stream_offset len = -1)
+{ return restriction<std::streambuf>(sb, off, len); }
+
+restriction<std::istream>
+BOOST_IOSTREAMS_RESTRICT
+ (std::istream<Ch, Tr>& is, stream_offset off, stream_offset len = -1)
+{ return restriction<std::istream>(is, off, len); }
+
+restriction<std::ostream>
+BOOST_IOSTREAMS_RESTRICT
+ (std::ostream<Ch, Tr>& os, stream_offset off, stream_offset len = -1)
+{ return restriction<std::ostream>(os, off, len); }
+
+restriction<std::iostream>
+BOOST_IOSTREAMS_RESTRICT
+ (std::iostream<Ch, Tr>& io, stream_offset off, stream_offset len = -1)
+{ return restriction<std::iostream>(io, off, len); }
+
+# endif // # ifndef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES //-------------------//
+# else // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //---------------//
+
+template<typename T>
+restriction<T>
+BOOST_IOSTREAMS_RESTRICT
+ (const T& t, stream_offset off, stream_offset len, mpl::true_)
+{ // Bad overload resolution.
+ return restriction<T>(const_cast<T&>(t, off, len));
+}
+
+template<typename T>
+restriction<T>
+BOOST_IOSTREAMS_RESTRICT
+ (const T& t, stream_offset off, stream_offset len, mpl::false_)
+{ return restriction<T>(t, off, len); }
+
+template<typename T>
+restriction<T>
+BOOST_IOSTREAMS_RESTRICT( const T& t, stream_offset off, stream_offset len = -1
+ BOOST_IOSTREAMS_DISABLE_IF_STREAM(T) )
+{ return BOOST_IOSTREAMS_RESTRICT(t, off, len, is_std_io<T>()); }
+
+# if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && \
+ !defined(__GNUC__) // ---------------------------------------------------//
+
+template<typename T>
+restriction<T>
+BOOST_IOSTREAMS_RESTRICT(T& t, stream_offset off, stream_offset len = -1)
+{ return restriction<T>(t, off, len); }
+
+# endif // Borland 5.x or GCC //-------------------------------//
+# endif // #ifndef BOOST_IOSTREAMS_BROKEN_OVERLOAD_RESOLUTION //--------------//
+
+} } // End namespaces iostreams, boost.
+
+# include <boost/iostreams/detail/config/enable_warnings.hpp>
+
+#endif // #if !defined(BOOST_IOSTREAMS_RESTRICT_IMPL_HPP_INCLUDED) ...
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/select.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/select.hpp
index 16c5973ad11..16c5973ad11 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/select.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/select.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/select_by_size.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/select_by_size.hpp
index e08ca3458b6..e08ca3458b6 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/select_by_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/select_by_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf.hpp
index f2e8081b20c..f2e8081b20c 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/chainbuf.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/chainbuf.hpp
index c3714fe041c..c3714fe041c 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/streambuf/chainbuf.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/chainbuf.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp
new file mode 100644
index 00000000000..a55c4621efa
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/direct_streambuf.hpp
@@ -0,0 +1,311 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/assert.hpp>
+#include <cstddef>
+#include <utility> // pair.
+#include <boost/config.hpp> // BOOST_DEDUCED_TYPENAME,
+#include <boost/core/typeinfo.hpp>
+#include <boost/iostreams/detail/char_traits.hpp> // member template friends.
+#include <boost/iostreams/detail/config/wide_streams.hpp>
+#include <boost/iostreams/detail/error.hpp>
+#include <boost/iostreams/detail/execute.hpp>
+#include <boost/iostreams/detail/functional.hpp>
+#include <boost/iostreams/detail/ios.hpp>
+#include <boost/iostreams/detail/optional.hpp>
+#include <boost/iostreams/detail/streambuf.hpp>
+#include <boost/iostreams/detail/streambuf/linked_streambuf.hpp>
+#include <boost/iostreams/operations.hpp>
+#include <boost/iostreams/positioning.hpp>
+#include <boost/iostreams/traits.hpp>
+#include <boost/throw_exception.hpp>
+
+// Must come last.
+#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
+
+namespace boost { namespace iostreams {
+
+namespace detail {
+
+template< typename T,
+ typename Tr =
+ BOOST_IOSTREAMS_CHAR_TRAITS(
+ BOOST_DEDUCED_TYPENAME char_type_of<T>::type
+ ) >
+class direct_streambuf
+ : public linked_streambuf<BOOST_DEDUCED_TYPENAME char_type_of<T>::type, Tr>
+{
+public:
+ typedef typename char_type_of<T>::type char_type;
+ BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr)
+private:
+ typedef linked_streambuf<char_type, traits_type> base_type;
+ typedef typename category_of<T>::type category;
+ typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(
+ char_type, traits_type
+ ) streambuf_type;
+public: // stream needs access.
+ void open(const T& t, std::streamsize buffer_size,
+ std::streamsize pback_size);
+ bool is_open() const;
+ void close();
+ bool auto_close() const { return auto_close_; }
+ void set_auto_close(bool close) { auto_close_ = close; }
+ bool strict_sync() { return true; }
+
+ // Declared in linked_streambuf.
+ T* component() { return storage_.get(); }
+protected:
+ BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
+ direct_streambuf();
+
+ //--------------Virtual functions-----------------------------------------//
+
+ // Declared in linked_streambuf.
+ void close_impl(BOOST_IOS::openmode m);
+ const boost::core::typeinfo& component_type() const { return BOOST_CORE_TYPEID(T); }
+ void* component_impl() { return component(); }
+#ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
+ public:
+#endif
+
+ // Declared in basic_streambuf.
+ int_type underflow();
+ int_type pbackfail(int_type c);
+ int_type overflow(int_type c);
+ pos_type seekoff( off_type off, BOOST_IOS::seekdir way,
+ BOOST_IOS::openmode which );
+ pos_type seekpos(pos_type sp, BOOST_IOS::openmode which);
+private:
+ pos_type seek_impl( stream_offset off, BOOST_IOS::seekdir way,
+ BOOST_IOS::openmode which );
+ void init_input(any_tag) { }
+ void init_input(input);
+ void init_output(any_tag) { }
+ void init_output(output);
+ void init_get_area();
+ void init_put_area();
+ bool one_head() const;
+ bool two_head() const;
+ optional<T> storage_;
+ char_type *ibeg_, *iend_, *obeg_, *oend_;
+ bool auto_close_;
+};
+
+//------------------Implementation of direct_streambuf------------------------//
+
+template<typename T, typename Tr>
+direct_streambuf<T, Tr>::direct_streambuf()
+ : ibeg_(0), iend_(0), obeg_(0), oend_(0), auto_close_(true)
+{ this->set_true_eof(true); }
+
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::open
+ (const T& t, std::streamsize, std::streamsize)
+{
+ storage_.reset(t);
+ init_input(category());
+ init_output(category());
+ setg(0, 0, 0);
+ setp(0, 0);
+ this->set_needs_close();
+}
+
+template<typename T, typename Tr>
+bool direct_streambuf<T, Tr>::is_open() const
+{ return ibeg_ != 0 || obeg_ != 0; }
+
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::close()
+{
+ base_type* self = this;
+ detail::execute_all( detail::call_member_close(*self, BOOST_IOS::in),
+ detail::call_member_close(*self, BOOST_IOS::out),
+ detail::call_reset(storage_) );
+}
+
+template<typename T, typename Tr>
+typename direct_streambuf<T, Tr>::int_type
+direct_streambuf<T, Tr>::underflow()
+{
+ if (!ibeg_)
+ boost::throw_exception(cant_read());
+ if (!gptr())
+ init_get_area();
+ return gptr() != iend_ ?
+ traits_type::to_int_type(*gptr()) :
+ traits_type::eof();
+}
+
+template<typename T, typename Tr>
+typename direct_streambuf<T, Tr>::int_type
+direct_streambuf<T, Tr>::pbackfail(int_type c)
+{
+ using namespace std;
+ if (!ibeg_)
+ boost::throw_exception(cant_read());
+ if (gptr() != 0 && gptr() != ibeg_) {
+ gbump(-1);
+ if (!traits_type::eq_int_type(c, traits_type::eof()))
+ *gptr() = traits_type::to_char_type(c);
+ return traits_type::not_eof(c);
+ }
+ boost::throw_exception(bad_putback());
+}
+
+template<typename T, typename Tr>
+typename direct_streambuf<T, Tr>::int_type
+direct_streambuf<T, Tr>::overflow(int_type c)
+{
+ using namespace std;
+ if (!obeg_)
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE("no write access"));
+ if (!pptr()) init_put_area();
+ if (!traits_type::eq_int_type(c, traits_type::eof())) {
+ if (pptr() == oend_)
+ boost::throw_exception(
+ BOOST_IOSTREAMS_FAILURE("write area exhausted")
+ );
+ *pptr() = traits_type::to_char_type(c);
+ pbump(1);
+ return c;
+ }
+ return traits_type::not_eof(c);
+}
+
+template<typename T, typename Tr>
+inline typename direct_streambuf<T, Tr>::pos_type
+direct_streambuf<T, Tr>::seekoff
+ (off_type off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
+{ return seek_impl(off, way, which); }
+
+template<typename T, typename Tr>
+inline typename direct_streambuf<T, Tr>::pos_type
+direct_streambuf<T, Tr>::seekpos
+ (pos_type sp, BOOST_IOS::openmode which)
+{
+ return seek_impl(position_to_offset(sp), BOOST_IOS::beg, which);
+}
+
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::close_impl(BOOST_IOS::openmode which)
+{
+ if (which == BOOST_IOS::in && ibeg_ != 0) {
+ setg(0, 0, 0);
+ ibeg_ = iend_ = 0;
+ }
+ if (which == BOOST_IOS::out && obeg_ != 0) {
+ sync();
+ setp(0, 0);
+ obeg_ = oend_ = 0;
+ }
+ boost::iostreams::close(*storage_, which);
+}
+
+template<typename T, typename Tr>
+typename direct_streambuf<T, Tr>::pos_type direct_streambuf<T, Tr>::seek_impl
+ (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
+{
+ using namespace std;
+ BOOST_IOS::openmode both = BOOST_IOS::in | BOOST_IOS::out;
+ if (two_head() && (which & both) == both)
+ boost::throw_exception(bad_seek());
+ stream_offset result = -1;
+ bool one = one_head();
+ if (one && (pptr() != 0 || gptr()== 0))
+ init_get_area(); // Switch to input mode, for code reuse.
+ if (one || ((which & BOOST_IOS::in) != 0 && ibeg_ != 0)) {
+ if (!gptr()) setg(ibeg_, ibeg_, iend_);
+ ptrdiff_t next = 0;
+ switch (way) {
+ case BOOST_IOS::beg: next = off; break;
+ case BOOST_IOS::cur: next = (gptr() - ibeg_) + off; break;
+ case BOOST_IOS::end: next = (iend_ - ibeg_) + off; break;
+ default: BOOST_ASSERT(0);
+ }
+ if (next < 0 || next > (iend_ - ibeg_))
+ boost::throw_exception(bad_seek());
+ setg(ibeg_, ibeg_ + next, iend_);
+ result = next;
+ }
+ if (!one && (which & BOOST_IOS::out) != 0 && obeg_ != 0) {
+ if (!pptr()) setp(obeg_, oend_);
+ ptrdiff_t next = 0;
+ switch (way) {
+ case BOOST_IOS::beg: next = off; break;
+ case BOOST_IOS::cur: next = (pptr() - obeg_) + off; break;
+ case BOOST_IOS::end: next = (oend_ - obeg_) + off; break;
+ default: BOOST_ASSERT(0);
+ }
+ if (next < 0 || next > (oend_ - obeg_))
+ boost::throw_exception(bad_seek());
+ pbump(static_cast<int>(next - (pptr() - obeg_)));
+ result = next;
+ }
+ return offset_to_position(result);
+}
+
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::init_input(input)
+{
+ std::pair<char_type*, char_type*> p = input_sequence(*storage_);
+ ibeg_ = p.first;
+ iend_ = p.second;
+}
+
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::init_output(output)
+{
+ std::pair<char_type*, char_type*> p = output_sequence(*storage_);
+ obeg_ = p.first;
+ oend_ = p.second;
+}
+
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::init_get_area()
+{
+ setg(ibeg_, ibeg_, iend_);
+ if (one_head() && pptr()) {
+ gbump(static_cast<int>(pptr() - obeg_));
+ setp(0, 0);
+ }
+}
+
+template<typename T, typename Tr>
+void direct_streambuf<T, Tr>::init_put_area()
+{
+ setp(obeg_, oend_);
+ if (one_head() && gptr()) {
+ pbump(static_cast<int>(gptr() - ibeg_));
+ setg(0, 0, 0);
+ }
+}
+
+template<typename T, typename Tr>
+inline bool direct_streambuf<T, Tr>::one_head() const
+{ return ibeg_ && obeg_ && ibeg_ == obeg_; }
+
+template<typename T, typename Tr>
+inline bool direct_streambuf<T, Tr>::two_head() const
+{ return ibeg_ && obeg_ && ibeg_ != obeg_; }
+
+//----------------------------------------------------------------------------//
+
+} // End namespace detail.
+
+} } // End namespaces iostreams, boost.
+
+#include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_DIRECT_STREAMBUF_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
new file mode 100644
index 00000000000..6eb10507171
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/indirect_streambuf.hpp
@@ -0,0 +1,447 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// This material is heavily indebted to the discussion and code samples in
+// A. Langer and K. Kreft, "Standard C++ IOStreams and Locales",
+// Addison-Wesley, 2000, pp. 228-43.
+
+// User "GMSB" provided an optimization for small seeks.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED
+
+#include <algorithm> // min, max.
+#include <cassert>
+#include <exception>
+#include <boost/config.hpp> // Member template friends.
+#include <boost/detail/workaround.hpp>
+#include <boost/core/typeinfo.hpp>
+#include <boost/iostreams/constants.hpp>
+#include <boost/iostreams/detail/adapter/concept_adapter.hpp>
+#include <boost/iostreams/detail/buffer.hpp>
+#include <boost/iostreams/detail/config/wide_streams.hpp>
+#include <boost/iostreams/detail/double_object.hpp>
+#include <boost/iostreams/detail/execute.hpp>
+#include <boost/iostreams/detail/functional.hpp>
+#include <boost/iostreams/detail/ios.hpp>
+#include <boost/iostreams/detail/optional.hpp>
+#include <boost/iostreams/detail/push.hpp>
+#include <boost/iostreams/detail/streambuf/linked_streambuf.hpp>
+#include <boost/iostreams/operations.hpp>
+#include <boost/iostreams/positioning.hpp>
+#include <boost/iostreams/traits.hpp>
+#include <boost/iostreams/operations.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+// Must come last.
+#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC, BCC 5.x
+
+namespace boost { namespace iostreams { namespace detail {
+
+//
+// Description: The implementation of basic_streambuf used by chains.
+//
+template<typename T, typename Tr, typename Alloc, typename Mode>
+class indirect_streambuf
+ : public linked_streambuf<BOOST_DEDUCED_TYPENAME char_type_of<T>::type, Tr>
+{
+public:
+ typedef typename char_type_of<T>::type char_type;
+ BOOST_IOSTREAMS_STREAMBUF_TYPEDEFS(Tr)
+private:
+ typedef typename category_of<T>::type category;
+ typedef concept_adapter<T> wrapper;
+ typedef detail::basic_buffer<char_type, Alloc> buffer_type;
+ typedef indirect_streambuf<T, Tr, Alloc, Mode> my_type;
+ typedef detail::linked_streambuf<char_type, traits_type> base_type;
+ typedef linked_streambuf<char_type, Tr> streambuf_type;
+public:
+ indirect_streambuf();
+
+ void open(const T& t BOOST_IOSTREAMS_PUSH_PARAMS());
+ bool is_open() const;
+ void close();
+ bool auto_close() const;
+ void set_auto_close(bool close);
+ bool strict_sync();
+
+ // Declared in linked_streambuf.
+ T* component() { return &*obj(); }
+protected:
+ BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base_type)
+
+ //----------virtual functions---------------------------------------------//
+
+#ifndef BOOST_IOSTREAMS_NO_LOCALE
+ void imbue(const std::locale& loc);
+#endif
+#ifdef BOOST_IOSTREAMS_NO_STREAM_TEMPLATES
+ public:
+#endif
+ int_type underflow();
+ int_type pbackfail(int_type c);
+ int_type overflow(int_type c);
+ int sync();
+ pos_type seekoff( off_type off, BOOST_IOS::seekdir way,
+ BOOST_IOS::openmode which );
+ pos_type seekpos(pos_type sp, BOOST_IOS::openmode which);
+
+ // Declared in linked_streambuf.
+ void set_next(streambuf_type* next);
+ void close_impl(BOOST_IOS::openmode m);
+ const boost::core::typeinfo& component_type() const { return BOOST_CORE_TYPEID(T); }
+ void* component_impl() { return component(); }
+private:
+
+ //----------Accessor functions--------------------------------------------//
+
+ wrapper& obj() { return *storage_; }
+ streambuf_type* next() const { return next_; }
+ buffer_type& in() { return buffer_.first(); }
+ buffer_type& out() { return buffer_.second(); }
+ bool can_read() const { return is_convertible<Mode, input>::value; }
+ bool can_write() const { return is_convertible<Mode, output>::value; }
+ bool output_buffered() const { return (flags_ & f_output_buffered) != 0; }
+ bool shared_buffer() const { return is_convertible<Mode, seekable>::value || is_convertible<Mode, dual_seekable>::value; }
+ void set_flags(int f) { flags_ = f; }
+
+ //----------State changing functions--------------------------------------//
+
+ virtual void init_get_area();
+ virtual void init_put_area();
+
+ //----------Utility function----------------------------------------------//
+
+ pos_type seek_impl( stream_offset off, BOOST_IOS::seekdir way,
+ BOOST_IOS::openmode which );
+ void sync_impl();
+
+ enum flag_type {
+ f_open = 1,
+ f_output_buffered = f_open << 1,
+ f_auto_close = f_output_buffered << 1
+ };
+
+ optional<wrapper> storage_;
+ streambuf_type* next_;
+ double_object<
+ buffer_type,
+ is_convertible<
+ Mode,
+ two_sequence
+ >
+ > buffer_;
+ std::streamsize pback_size_;
+ int flags_;
+};
+
+//--------------Implementation of indirect_streambuf--------------------------//
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+indirect_streambuf<T, Tr, Alloc, Mode>::indirect_streambuf()
+ : next_(0), pback_size_(0), flags_(f_auto_close) { }
+
+//--------------Implementation of open, is_open and close---------------------//
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::open
+ (const T& t, std::streamsize buffer_size, std::streamsize pback_size)
+{
+ using namespace std;
+
+ // Normalize buffer sizes.
+ buffer_size =
+ (buffer_size != -1) ?
+ buffer_size :
+ iostreams::optimal_buffer_size(t);
+ pback_size =
+ (pback_size != -1) ?
+ pback_size :
+ default_pback_buffer_size;
+
+ // Construct input buffer.
+ if (can_read()) {
+ pback_size_ = (std::max)(std::streamsize(2), pback_size); // STLPort needs 2.
+ std::streamsize size =
+ pback_size_ +
+ ( buffer_size ? buffer_size: std::streamsize(1) );
+ in().resize(static_cast<int>(size));
+ if (!shared_buffer())
+ init_get_area();
+ }
+
+ // Construct output buffer.
+ if (can_write() && !shared_buffer()) {
+ if (buffer_size != std::streamsize(0))
+ out().resize(static_cast<int>(buffer_size));
+ init_put_area();
+ }
+
+ storage_.reset(wrapper(t));
+ flags_ |= f_open;
+ if (can_write() && buffer_size > 1)
+ flags_ |= f_output_buffered;
+ this->set_true_eof(false);
+ this->set_needs_close();
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline bool indirect_streambuf<T, Tr, Alloc, Mode>::is_open() const
+{ return (flags_ & f_open) != 0; }
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::close()
+{
+ using namespace std;
+ base_type* self = this;
+ detail::execute_all(
+ detail::call_member_close(*self, BOOST_IOS::in),
+ detail::call_member_close(*self, BOOST_IOS::out),
+ detail::call_reset(storage_),
+ detail::clear_flags(flags_)
+ );
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+bool indirect_streambuf<T, Tr, Alloc, Mode>::auto_close() const
+{ return (flags_ & f_auto_close) != 0; }
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::set_auto_close(bool close)
+{ flags_ = (flags_ & ~f_auto_close) | (close ? f_auto_close : 0); }
+
+//--------------Implementation virtual functions------------------------------//
+
+#ifndef BOOST_IOSTREAMS_NO_LOCALE
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::imbue(const std::locale& loc)
+{
+ if (is_open()) {
+ obj().imbue(loc);
+ if (next_)
+ next_->pubimbue(loc);
+ }
+}
+#endif
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
+indirect_streambuf<T, Tr, Alloc, Mode>::underflow()
+{
+ using namespace std;
+ if (!gptr()) init_get_area();
+ buffer_type& buf = in();
+ if (gptr() < egptr()) return traits_type::to_int_type(*gptr());
+
+ // Fill putback buffer.
+ std::streamsize keep =
+ (std::min)( static_cast<std::streamsize>(gptr() - eback()),
+ pback_size_ );
+ if (keep)
+ traits_type::move( buf.data() + (pback_size_ - keep),
+ gptr() - keep, keep );
+
+ // Set pointers to reasonable values in case read throws.
+ setg( buf.data() + pback_size_ - keep,
+ buf.data() + pback_size_,
+ buf.data() + pback_size_ );
+
+ // Read from source.
+ std::streamsize chars =
+ obj().read(buf.data() + pback_size_, buf.size() - pback_size_, next_);
+ if (chars == -1) {
+ this->set_true_eof(true);
+ chars = 0;
+ }
+ setg(eback(), gptr(), buf.data() + pback_size_ + chars);
+ return chars != 0 ?
+ traits_type::to_int_type(*gptr()) :
+ traits_type::eof();
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
+indirect_streambuf<T, Tr, Alloc, Mode>::pbackfail(int_type c)
+{
+ if (gptr() != eback()) {
+ gbump(-1);
+ if (!traits_type::eq_int_type(c, traits_type::eof()))
+ *gptr() = traits_type::to_char_type(c);
+ return traits_type::not_eof(c);
+ } else {
+ boost::throw_exception(bad_putback());
+ }
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+typename indirect_streambuf<T, Tr, Alloc, Mode>::int_type
+indirect_streambuf<T, Tr, Alloc, Mode>::overflow(int_type c)
+{
+ if ( (output_buffered() && pptr() == 0) ||
+ (shared_buffer() && gptr() != 0) )
+ {
+ init_put_area();
+ }
+ if (!traits_type::eq_int_type(c, traits_type::eof())) {
+ if (output_buffered()) {
+ if (pptr() == epptr()) {
+ sync_impl();
+ if (pptr() == epptr())
+ return traits_type::eof();
+ }
+ *pptr() = traits_type::to_char_type(c);
+ pbump(1);
+ } else {
+ char_type d = traits_type::to_char_type(c);
+ if (obj().write(&d, 1, next_) != 1)
+ return traits_type::eof();
+ }
+ }
+ return traits_type::not_eof(c);
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+int indirect_streambuf<T, Tr, Alloc, Mode>::sync()
+{
+ try { // sync() is no-throw.
+ sync_impl();
+ obj().flush(next_);
+ return 0;
+ } catch (...) { return -1; }
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+bool indirect_streambuf<T, Tr, Alloc, Mode>::strict_sync()
+{
+ try { // sync() is no-throw.
+ sync_impl();
+ return obj().flush(next_);
+ } catch (...) { return false; }
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
+indirect_streambuf<T, Tr, Alloc, Mode>::seekoff
+ (off_type off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
+{ return seek_impl(off, way, which); }
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
+indirect_streambuf<T, Tr, Alloc, Mode>::seekpos
+ (pos_type sp, BOOST_IOS::openmode which)
+{
+ return seek_impl(position_to_offset(sp), BOOST_IOS::beg, which);
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+typename indirect_streambuf<T, Tr, Alloc, Mode>::pos_type
+indirect_streambuf<T, Tr, Alloc, Mode>::seek_impl
+ (stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which)
+{
+ if ( gptr() != 0 && way == BOOST_IOS::cur && which == BOOST_IOS::in &&
+ eback() - gptr() <= off && off <= egptr() - gptr() )
+ { // Small seek optimization
+ gbump(static_cast<int>(off));
+ return obj().seek(stream_offset(0), BOOST_IOS::cur, BOOST_IOS::in, next_) -
+ static_cast<off_type>(egptr() - gptr());
+ }
+ if (pptr() != 0)
+ this->BOOST_IOSTREAMS_PUBSYNC(); // sync() confuses VisualAge 6.
+ if (way == BOOST_IOS::cur && gptr())
+ off -= static_cast<off_type>(egptr() - gptr());
+ bool two_head = is_convertible<category, dual_seekable>::value ||
+ is_convertible<category, bidirectional_seekable>::value;
+ if (two_head) {
+ BOOST_IOS::openmode both = BOOST_IOS::in | BOOST_IOS::out;
+ if ((which & both) == both)
+ boost::throw_exception(bad_seek());
+ if (which & BOOST_IOS::in) {
+ setg(0, 0, 0);
+ }
+ if (which & BOOST_IOS::out) {
+ setp(0, 0);
+ }
+ }
+ else {
+ setg(0, 0, 0);
+ setp(0, 0);
+ }
+ return obj().seek(off, way, which, next_);
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline void indirect_streambuf<T, Tr, Alloc, Mode>::set_next
+ (streambuf_type* next)
+{ next_ = next; }
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+inline void indirect_streambuf<T, Tr, Alloc, Mode>::close_impl
+ (BOOST_IOS::openmode which)
+{
+ if (which == BOOST_IOS::in && is_convertible<Mode, input>::value) {
+ setg(0, 0, 0);
+ }
+ if (which == BOOST_IOS::out && is_convertible<Mode, output>::value) {
+ sync();
+ setp(0, 0);
+ }
+ if ( !is_convertible<category, dual_use>::value ||
+ is_convertible<Mode, input>::value == (which == BOOST_IOS::in) )
+ {
+ obj().close(which, next_);
+ }
+}
+
+//----------State changing functions------------------------------------------//
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::sync_impl()
+{
+ std::streamsize avail, amt;
+ if ((avail = static_cast<std::streamsize>(pptr() - pbase())) > 0) {
+ if ((amt = obj().write(pbase(), avail, next())) == avail)
+ setp(out().begin(), out().end());
+ else {
+ const char_type* ptr = pptr();
+ setp(out().begin() + amt, out().end());
+ pbump(static_cast<int>(ptr - pptr()));
+ }
+ }
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::init_get_area()
+{
+ if (shared_buffer() && pptr() != 0) {
+ sync_impl();
+ setp(0, 0);
+ }
+ setg(in().begin(), in().begin(), in().begin());
+}
+
+template<typename T, typename Tr, typename Alloc, typename Mode>
+void indirect_streambuf<T, Tr, Alloc, Mode>::init_put_area()
+{
+ using namespace std;
+ if (shared_buffer() && gptr() != 0) {
+ obj().seek(static_cast<off_type>(gptr() - egptr()), BOOST_IOS::cur, BOOST_IOS::in, next_);
+ setg(0, 0, 0);
+ }
+ if (output_buffered())
+ setp(out().begin(), out().end());
+ else
+ setp(0, 0);
+}
+
+//----------------------------------------------------------------------------//
+
+} } } // End namespaces detail, iostreams, boost.
+
+#include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC, BCC 5.x
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_INDIRECT_STREAMBUF_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp
new file mode 100644
index 00000000000..708c2c42aba
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/streambuf/linked_streambuf.hpp
@@ -0,0 +1,114 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
+#define BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/config.hpp> // member template friends.
+#include <boost/core/typeinfo.hpp>
+#include <boost/iostreams/detail/char_traits.hpp>
+#include <boost/iostreams/detail/ios.hpp> // openmode.
+#include <boost/iostreams/detail/streambuf.hpp>
+
+// Must come last.
+#include <boost/iostreams/detail/config/disable_warnings.hpp> // MSVC.
+
+namespace boost { namespace iostreams { namespace detail {
+
+template<typename Self, typename Ch, typename Tr, typename Alloc, typename Mode>
+class chain_base;
+
+template<typename Chain, typename Access, typename Mode> class chainbuf;
+
+#define BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base) \
+ using base::eback; using base::gptr; using base::egptr; \
+ using base::setg; using base::gbump; using base::pbase; \
+ using base::pptr; using base::epptr; using base::setp; \
+ using base::pbump; using base::underflow; using base::pbackfail; \
+ using base::xsgetn; using base::overflow; using base::xsputn; \
+ using base::sync; using base::seekoff; using base::seekpos; \
+ /**/
+
+template<typename Ch, typename Tr = BOOST_IOSTREAMS_CHAR_TRAITS(Ch) >
+class linked_streambuf : public BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, Tr) {
+protected:
+ linked_streambuf() : flags_(0) { }
+ void set_true_eof(bool eof)
+ {
+ flags_ = (flags_ & ~f_true_eof) | (eof ? f_true_eof : 0);
+ }
+public:
+
+ // Should be called only after receiving an ordinary EOF indication,
+ // to confirm that it represents EOF rather than WOULD_BLOCK.
+ bool true_eof() const { return (flags_ & f_true_eof) != 0; }
+protected:
+
+ //----------grant friendship to chain_base and chainbuf-------------------//
+
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+ template< typename Self, typename ChT, typename TrT,
+ typename Alloc, typename Mode >
+ friend class chain_base;
+ template<typename Chain, typename Mode, typename Access>
+ friend class chainbuf;
+ template<typename U>
+ friend class member_close_operation;
+#else
+ public:
+ typedef BOOST_IOSTREAMS_BASIC_STREAMBUF(Ch, Tr) base;
+ BOOST_IOSTREAMS_USING_PROTECTED_STREAMBUF_MEMBERS(base)
+#endif
+ void close(BOOST_IOS::openmode which)
+ {
+ if ( which == BOOST_IOS::in &&
+ (flags_ & f_input_closed) == 0 )
+ {
+ flags_ |= f_input_closed;
+ close_impl(which);
+ }
+ if ( which == BOOST_IOS::out &&
+ (flags_ & f_output_closed) == 0 )
+ {
+ flags_ |= f_output_closed;
+ close_impl(which);
+ }
+ }
+ void set_needs_close()
+ {
+ flags_ &= ~(f_input_closed | f_output_closed);
+ }
+ virtual void set_next(linked_streambuf<Ch, Tr>* /* next */) { }
+ virtual void close_impl(BOOST_IOS::openmode) = 0;
+ virtual bool auto_close() const = 0;
+ virtual void set_auto_close(bool) = 0;
+ virtual bool strict_sync() = 0;
+ virtual const boost::core::typeinfo& component_type() const = 0;
+ virtual void* component_impl() = 0;
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+ private:
+#else
+ public:
+#endif
+private:
+ enum flag_type {
+ f_true_eof = 1,
+ f_input_closed = f_true_eof << 1,
+ f_output_closed = f_input_closed << 1
+ };
+ int flags_;
+};
+
+} } } // End namespaces detail, iostreams, boost.
+
+#include <boost/iostreams/detail/config/enable_warnings.hpp> // MSVC.
+
+#endif // #ifndef BOOST_IOSTREAMS_DETAIL_LINKED_STREAMBUF_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/system_failure.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/system_failure.hpp
index 10b291a516f..10b291a516f 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/system_failure.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/system_failure.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/template_params.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/template_params.hpp
index b07012fb825..b07012fb825 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/template_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/template_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/translate_int_type.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/translate_int_type.hpp
index ae48a2c46fe..ae48a2c46fe 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/translate_int_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/translate_int_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/detail/wrap_unwrap.hpp b/src/third_party/boost-1.69.0/boost/iostreams/detail/wrap_unwrap.hpp
index f5f97897f9e..f5f97897f9e 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/detail/wrap_unwrap.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/detail/wrap_unwrap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/device/array.hpp b/src/third_party/boost-1.69.0/boost/iostreams/device/array.hpp
index 768a5644a11..768a5644a11 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/device/array.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/device/array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/device/back_inserter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/device/back_inserter.hpp
index 669c889e0ad..669c889e0ad 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/device/back_inserter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/device/back_inserter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/device/file.hpp b/src/third_party/boost-1.69.0/boost/iostreams/device/file.hpp
index 3eb0301647e..3eb0301647e 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/device/file.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/device/file.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/device/file_descriptor.hpp b/src/third_party/boost-1.69.0/boost/iostreams/device/file_descriptor.hpp
index 5d6af128147..5d6af128147 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/device/file_descriptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/device/file_descriptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/device/mapped_file.hpp b/src/third_party/boost-1.69.0/boost/iostreams/device/mapped_file.hpp
index 1332beabd14..1332beabd14 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/device/mapped_file.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/device/mapped_file.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/device/null.hpp b/src/third_party/boost-1.69.0/boost/iostreams/device/null.hpp
index a3943d7436b..a3943d7436b 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/device/null.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/device/null.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/aggregate.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/aggregate.hpp
index a645a75a2ea..a645a75a2ea 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/aggregate.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/aggregate.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/bzip2.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/bzip2.hpp
new file mode 100644
index 00000000000..249e43a04fc
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/bzip2.hpp
@@ -0,0 +1,429 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Note: custom allocators are not supported on VC6, since that compiler
+// had trouble finding the function zlib_base::do_init.
+
+#ifndef BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED
+#define BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <cassert>
+#include <memory> // allocator.
+#include <new> // bad_alloc.
+#include <boost/config.hpp> // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM.
+#include <boost/detail/workaround.hpp>
+#include <boost/iostreams/constants.hpp> // buffer size.
+#include <boost/iostreams/detail/config/auto_link.hpp>
+#include <boost/iostreams/detail/config/bzip2.hpp>
+#include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/detail/config/wide_streams.hpp>
+#include <boost/iostreams/detail/ios.hpp> // failure, streamsize.
+#include <boost/iostreams/filter/symmetric.hpp>
+#include <boost/iostreams/pipeline.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+// Must come last.
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4251 4231 4660)
+#endif
+#include <boost/config/abi_prefix.hpp>
+
+// Temporary fix.
+#undef small
+
+namespace boost { namespace iostreams {
+
+namespace bzip2 {
+
+ // Typedefs.
+
+typedef void* (*alloc_func)(void*, int, int);
+typedef void (*free_func)(void*, void*);
+
+ // Status codes
+
+BOOST_IOSTREAMS_DECL extern const int ok;
+BOOST_IOSTREAMS_DECL extern const int run_ok;
+BOOST_IOSTREAMS_DECL extern const int flush_ok;
+BOOST_IOSTREAMS_DECL extern const int finish_ok;
+BOOST_IOSTREAMS_DECL extern const int stream_end;
+BOOST_IOSTREAMS_DECL extern const int sequence_error;
+BOOST_IOSTREAMS_DECL extern const int param_error;
+BOOST_IOSTREAMS_DECL extern const int mem_error;
+BOOST_IOSTREAMS_DECL extern const int data_error;
+BOOST_IOSTREAMS_DECL extern const int data_error_magic;
+BOOST_IOSTREAMS_DECL extern const int io_error;
+BOOST_IOSTREAMS_DECL extern const int unexpected_eof;
+BOOST_IOSTREAMS_DECL extern const int outbuff_full;
+BOOST_IOSTREAMS_DECL extern const int config_error;
+
+ // Action codes
+
+BOOST_IOSTREAMS_DECL extern const int finish;
+BOOST_IOSTREAMS_DECL extern const int run;
+
+ // Default values
+
+const int default_block_size = 9;
+const int default_work_factor = 30;
+const bool default_small = false;
+
+} // End namespace bzip2.
+
+//
+// Class name: bzip2_params.
+// Description: Encapsulates the parameters passed to deflateInit2
+// to customize compression.
+//
+struct bzip2_params {
+
+ // Non-explicit constructor for compression.
+ bzip2_params( int block_size_ = bzip2::default_block_size,
+ int work_factor_ = bzip2::default_work_factor )
+ : block_size(block_size_), work_factor(work_factor_)
+ { }
+
+ // Constructor for decompression.
+ bzip2_params(bool small)
+ : small(small), work_factor(0)
+ { }
+
+ union {
+ int block_size; // For compression.
+ bool small; // For decompression.
+ };
+ int work_factor;
+};
+
+//
+// Class name: bzip2_error.
+// Description: Subclass of std::ios_base::failure thrown to indicate
+// bzip2 errors other than out-of-memory conditions.
+//
+class BOOST_IOSTREAMS_DECL bzip2_error : public BOOST_IOSTREAMS_FAILURE {
+public:
+ explicit bzip2_error(int error);
+ int error() const { return error_; }
+ static void check BOOST_PREVENT_MACRO_SUBSTITUTION(int error);
+private:
+ int error_;
+};
+
+namespace detail {
+
+template<typename Alloc>
+struct bzip2_allocator_traits {
+#ifndef BOOST_NO_STD_ALLOCATOR
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
+ typedef typename Alloc::template rebind<char>::other type;
+#else
+ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<char> type;
+#endif
+#else
+ typedef std::allocator<char> type;
+#endif
+};
+
+template< typename Alloc,
+ typename Base = // VC6 workaround (C2516)
+ BOOST_DEDUCED_TYPENAME bzip2_allocator_traits<Alloc>::type >
+struct bzip2_allocator : private Base {
+private:
+#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
+ typedef typename Base::size_type size_type;
+#else
+ typedef typename std::allocator_traits<Base>::size_type size_type;
+#endif
+public:
+ BOOST_STATIC_CONSTANT(bool, custom =
+ (!is_same<std::allocator<char>, Base>::value));
+ typedef typename bzip2_allocator_traits<Alloc>::type allocator_type;
+ static void* allocate(void* self, int items, int size);
+ static void deallocate(void* self, void* address);
+};
+
+class BOOST_IOSTREAMS_DECL bzip2_base {
+public:
+ typedef char char_type;
+protected:
+ bzip2_base(const bzip2_params& params);
+ ~bzip2_base();
+ bzip2_params& params() { return params_; }
+ bool& ready() { return ready_; }
+ template<typename Alloc>
+ void init( bool compress,
+ bzip2_allocator<Alloc>& alloc )
+ {
+ bool custom = bzip2_allocator<Alloc>::custom;
+ do_init( compress,
+ custom ? bzip2_allocator<Alloc>::allocate : 0,
+ custom ? bzip2_allocator<Alloc>::deallocate : 0,
+ custom ? &alloc : 0 );
+ }
+ void before( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end );
+ void after(const char*& src_begin, char*& dest_begin);
+ int check_end(const char* src_begin, const char* dest_begin);
+ int compress(int action);
+ int decompress();
+ int end(bool compress, std::nothrow_t);
+ void end(bool compress);
+private:
+ void do_init( bool compress,
+ bzip2::alloc_func,
+ bzip2::free_func,
+ void* derived );
+ bzip2_params params_;
+ void* stream_; // Actual type: bz_stream*.
+ bool ready_;
+};
+
+//
+// Template name: bzip2_compressor_impl
+// Description: Model of SymmetricFilter implementing compression by
+// delegating to the libbzip2 function BZ_bzCompress.
+//
+template<typename Alloc = std::allocator<char> >
+class bzip2_compressor_impl
+ : public bzip2_base,
+ #if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+ public
+ #endif
+ bzip2_allocator<Alloc>
+{
+public:
+ bzip2_compressor_impl(const bzip2_params&);
+ ~bzip2_compressor_impl();
+ bool filter( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end, bool flush );
+ void close();
+private:
+ void init();
+ bool eof_; // Guard to make sure filter() isn't called after it returns false.
+};
+
+//
+// Template name: bzip2_compressor
+// Description: Model of SymmetricFilter implementing decompression by
+// delegating to the libbzip2 function BZ_bzDecompress.
+//
+template<typename Alloc = std::allocator<char> >
+class bzip2_decompressor_impl
+ : public bzip2_base,
+ #if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+ public
+ #endif
+ bzip2_allocator<Alloc>
+{
+public:
+ bzip2_decompressor_impl(bool small = bzip2::default_small);
+ ~bzip2_decompressor_impl();
+ bool filter( const char*& begin_in, const char* end_in,
+ char*& begin_out, char* end_out, bool flush );
+ void close();
+private:
+ void init();
+ bool eof_; // Guard to make sure filter() isn't called after it returns false.
+};
+
+} // End namespace detail.
+
+//
+// Template name: bzip2_compressor
+// Description: Model of InputFilter and OutputFilter implementing
+// compression using libbzip2.
+//
+template<typename Alloc = std::allocator<char> >
+struct basic_bzip2_compressor
+ : symmetric_filter<detail::bzip2_compressor_impl<Alloc>, Alloc>
+{
+private:
+ typedef detail::bzip2_compressor_impl<Alloc> impl_type;
+ typedef symmetric_filter<impl_type, Alloc> base_type;
+public:
+ typedef typename base_type::char_type char_type;
+ typedef typename base_type::category category;
+ basic_bzip2_compressor( const bzip2_params& = bzip2::default_block_size,
+ std::streamsize buffer_size = default_device_buffer_size );
+};
+BOOST_IOSTREAMS_PIPABLE(basic_bzip2_compressor, 1)
+
+typedef basic_bzip2_compressor<> bzip2_compressor;
+
+//
+// Template name: bzip2_decompressor
+// Description: Model of InputFilter and OutputFilter implementing
+// decompression using libbzip2.
+//
+template<typename Alloc = std::allocator<char> >
+struct basic_bzip2_decompressor
+ : symmetric_filter<detail::bzip2_decompressor_impl<Alloc>, Alloc>
+{
+private:
+ typedef detail::bzip2_decompressor_impl<Alloc> impl_type;
+ typedef symmetric_filter<impl_type, Alloc> base_type;
+public:
+ typedef typename base_type::char_type char_type;
+ typedef typename base_type::category category;
+ basic_bzip2_decompressor( bool small = bzip2::default_small,
+ std::streamsize buffer_size = default_device_buffer_size );
+};
+BOOST_IOSTREAMS_PIPABLE(basic_bzip2_decompressor, 1)
+
+typedef basic_bzip2_decompressor<> bzip2_decompressor;
+
+//----------------------------------------------------------------------------//
+
+//------------------Implementation of bzip2_allocator-------------------------//
+
+namespace detail {
+
+template<typename Alloc, typename Base>
+void* bzip2_allocator<Alloc, Base>::allocate(void* self, int items, int size)
+{
+ size_type len = items * size;
+ char* ptr =
+ static_cast<allocator_type*>(self)->allocate
+ (len + sizeof(size_type)
+ #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
+ , (char*)0
+ #endif
+ );
+ *reinterpret_cast<size_type*>(ptr) = len;
+ return ptr + sizeof(size_type);
+}
+
+template<typename Alloc, typename Base>
+void bzip2_allocator<Alloc, Base>::deallocate(void* self, void* address)
+{
+ char* ptr = reinterpret_cast<char*>(address) - sizeof(size_type);
+ size_type len = *reinterpret_cast<size_type*>(ptr) + sizeof(size_type);
+ static_cast<allocator_type*>(self)->deallocate(ptr, len);
+}
+
+//------------------Implementation of bzip2_compressor_impl-------------------//
+
+template<typename Alloc>
+bzip2_compressor_impl<Alloc>::bzip2_compressor_impl(const bzip2_params& p)
+ : bzip2_base(p), eof_(false) { }
+
+template<typename Alloc>
+bzip2_compressor_impl<Alloc>::~bzip2_compressor_impl()
+{ (void) bzip2_base::end(true, std::nothrow); }
+
+template<typename Alloc>
+bool bzip2_compressor_impl<Alloc>::filter
+ ( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end, bool flush )
+{
+ if (!ready()) init();
+ if (eof_) return false;
+ before(src_begin, src_end, dest_begin, dest_end);
+ int result = compress(flush ? bzip2::finish : bzip2::run);
+ after(src_begin, dest_begin);
+ bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
+ return !(eof_ = result == bzip2::stream_end);
+}
+
+template<typename Alloc>
+void bzip2_compressor_impl<Alloc>::close()
+{
+ try {
+ end(true);
+ } catch (...) {
+ eof_ = false;
+ throw;
+ }
+ eof_ = false;
+}
+
+template<typename Alloc>
+inline void bzip2_compressor_impl<Alloc>::init()
+{ bzip2_base::init(true, static_cast<bzip2_allocator<Alloc>&>(*this)); }
+
+//------------------Implementation of bzip2_decompressor_impl-----------------//
+
+template<typename Alloc>
+bzip2_decompressor_impl<Alloc>::bzip2_decompressor_impl(bool small)
+ : bzip2_base(bzip2_params(small)), eof_(false) { }
+
+template<typename Alloc>
+bzip2_decompressor_impl<Alloc>::~bzip2_decompressor_impl()
+{ (void) bzip2_base::end(false, std::nothrow); }
+
+template<typename Alloc>
+bool bzip2_decompressor_impl<Alloc>::filter
+ ( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end, bool flush )
+{
+ if (eof_) {
+ // reset the stream if there are more characters
+ if(src_begin == src_end)
+ return false;
+ else
+ close();
+ }
+ if (!ready())
+ init();
+ before(src_begin, src_end, dest_begin, dest_end);
+ int result = decompress();
+ if(result == bzip2::ok && flush)
+ result = check_end(src_begin, dest_begin);
+ after(src_begin, dest_begin);
+ bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
+ eof_ = result == bzip2::stream_end;
+ return true;
+}
+
+template<typename Alloc>
+void bzip2_decompressor_impl<Alloc>::close()
+{
+ try {
+ end(false);
+ } catch (...) {
+ eof_ = false;
+ throw;
+ }
+ eof_ = false;
+}
+
+template<typename Alloc>
+inline void bzip2_decompressor_impl<Alloc>::init()
+{ bzip2_base::init(false, static_cast<bzip2_allocator<Alloc>&>(*this)); }
+} // End namespace detail.
+
+//------------------Implementation of bzip2_decompressor----------------------//
+
+template<typename Alloc>
+basic_bzip2_compressor<Alloc>::basic_bzip2_compressor
+ (const bzip2_params& p, std::streamsize buffer_size)
+ : base_type(buffer_size, p)
+ { }
+
+//------------------Implementation of bzip2_decompressor----------------------//
+
+template<typename Alloc>
+basic_bzip2_decompressor<Alloc>::basic_bzip2_decompressor
+ (bool small, std::streamsize buffer_size)
+ : base_type(buffer_size, small)
+ { }
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
+
+#include <boost/config/abi_suffix.hpp> // Pops abi_suffix.hpp pragmas.
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#endif // #ifndef BOOST_IOSTREAMS_BZIP2_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/counter.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/counter.hpp
index 8cf775e7037..8cf775e7037 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/counter.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/counter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/grep.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/grep.hpp
index b30309734e2..b30309734e2 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/grep.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/grep.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/gzip.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/gzip.hpp
index e236983e0ba..e236983e0ba 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/gzip.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/gzip.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/line.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/line.hpp
index 2c66f0ed91a..2c66f0ed91a 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/line.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/line.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/lzma.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/lzma.hpp
index 94cd2b3b54e..94cd2b3b54e 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/lzma.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/lzma.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/newline.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/newline.hpp
index 57a36395eda..57a36395eda 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/newline.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/newline.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/regex.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/regex.hpp
index e943553c61b..e943553c61b 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/regex.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/regex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/stdio.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/stdio.hpp
index 5ad921b2cea..5ad921b2cea 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/stdio.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/stdio.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/symmetric.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/symmetric.hpp
index f18089f4fb8..f18089f4fb8 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/symmetric.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/symmetric.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/test.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/test.hpp
index 00e2dffd4cb..00e2dffd4cb 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/test.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/test.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filter/zlib.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/zlib.hpp
index e57870a510f..e57870a510f 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filter/zlib.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/zlib.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iostreams/filter/zstd.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filter/zstd.hpp
new file mode 100644
index 00000000000..176799d937f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filter/zstd.hpp
@@ -0,0 +1,363 @@
+// (C) Copyright Reimar Döffinger 2018.
+// Based on zstd.hpp by:
+// (C) Copyright Milan Svoboda 2008.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+#ifndef BOOST_IOSTREAMS_ZSTD_HPP_INCLUDED
+#define BOOST_IOSTREAMS_ZSTD_HPP_INCLUDED
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <cassert>
+#include <iosfwd> // streamsize.
+#include <memory> // allocator, bad_alloc.
+#include <new>
+#include <boost/config.hpp> // MSVC, STATIC_CONSTANT, DEDUCED_TYPENAME, DINKUM.
+#include <boost/detail/workaround.hpp>
+#include <boost/iostreams/constants.hpp> // buffer size.
+#include <boost/iostreams/detail/config/auto_link.hpp>
+#include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/detail/config/wide_streams.hpp>
+#include <boost/iostreams/detail/ios.hpp> // failure, streamsize.
+#include <boost/iostreams/filter/symmetric.hpp>
+#include <boost/iostreams/pipeline.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+// Must come last.
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4251 4231 4660) // Dependencies not exported.
+#endif
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost { namespace iostreams {
+
+namespace zstd {
+
+typedef void* (*alloc_func)(void*, size_t, size_t);
+typedef void (*free_func)(void*, void*);
+
+ // Compression levels
+
+BOOST_IOSTREAMS_DECL extern const uint32_t best_speed;
+BOOST_IOSTREAMS_DECL extern const uint32_t best_compression;
+BOOST_IOSTREAMS_DECL extern const uint32_t default_compression;
+
+ // Status codes
+
+BOOST_IOSTREAMS_DECL extern const int okay;
+BOOST_IOSTREAMS_DECL extern const int stream_end;
+
+ // Flush codes
+
+BOOST_IOSTREAMS_DECL extern const int finish;
+BOOST_IOSTREAMS_DECL extern const int flush;
+BOOST_IOSTREAMS_DECL extern const int run;
+
+ // Code for current OS
+
+ // Null pointer constant.
+
+const int null = 0;
+
+ // Default values
+
+} // End namespace zstd.
+
+//
+// Class name: zstd_params.
+// Description: Encapsulates the parameters passed to zstddec_init
+// to customize compression and decompression.
+//
+struct zstd_params {
+
+ // Non-explicit constructor.
+ zstd_params( uint32_t level = zstd::default_compression )
+ : level(level)
+ { }
+ uint32_t level;
+};
+
+//
+// Class name: zstd_error.
+// Description: Subclass of std::ios::failure thrown to indicate
+// zstd errors other than out-of-memory conditions.
+//
+class BOOST_IOSTREAMS_DECL zstd_error : public BOOST_IOSTREAMS_FAILURE {
+public:
+ explicit zstd_error(size_t error);
+ int error() const { return error_; }
+ static void check BOOST_PREVENT_MACRO_SUBSTITUTION(size_t error);
+private:
+ size_t error_;
+};
+
+namespace detail {
+
+template<typename Alloc>
+struct zstd_allocator_traits {
+#ifndef BOOST_NO_STD_ALLOCATOR
+#if defined(BOOST_NO_CXX11_ALLOCATOR)
+ typedef typename Alloc::template rebind<char>::other type;
+#else
+ typedef typename std::allocator_traits<Alloc>::template rebind_alloc<char> type;
+#endif
+#else
+ typedef std::allocator<char> type;
+#endif
+};
+
+template< typename Alloc,
+ typename Base = // VC6 workaround (C2516)
+ BOOST_DEDUCED_TYPENAME zstd_allocator_traits<Alloc>::type >
+struct zstd_allocator : private Base {
+private:
+#if defined(BOOST_NO_CXX11_ALLOCATOR) || defined(BOOST_NO_STD_ALLOCATOR)
+ typedef typename Base::size_type size_type;
+#else
+ typedef typename std::allocator_traits<Base>::size_type size_type;
+#endif
+public:
+ BOOST_STATIC_CONSTANT(bool, custom =
+ (!is_same<std::allocator<char>, Base>::value));
+ typedef typename zstd_allocator_traits<Alloc>::type allocator_type;
+ static void* allocate(void* self, size_t items, size_t size);
+ static void deallocate(void* self, void* address);
+};
+
+class BOOST_IOSTREAMS_DECL zstd_base {
+public:
+ typedef char char_type;
+protected:
+ zstd_base();
+ ~zstd_base();
+ template<typename Alloc>
+ void init( const zstd_params& p,
+ bool compress,
+ zstd_allocator<Alloc>& zalloc )
+ {
+ bool custom = zstd_allocator<Alloc>::custom;
+ do_init( p, compress,
+ custom ? zstd_allocator<Alloc>::allocate : 0,
+ custom ? zstd_allocator<Alloc>::deallocate : 0,
+ &zalloc );
+ }
+ void before( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end );
+ void after( const char*& src_begin, char*& dest_begin,
+ bool compress );
+ int deflate(int action);
+ int inflate(int action);
+ void reset(bool compress, bool realloc);
+private:
+ void do_init( const zstd_params& p, bool compress,
+ zstd::alloc_func,
+ zstd::free_func,
+ void* derived );
+ void* cstream_; // Actual type: ZSTD_CStream *
+ void* dstream_; // Actual type: ZSTD_DStream *
+ void* in_; // Actual type: ZSTD_inBuffer *
+ void* out_; // Actual type: ZSTD_outBuffer *
+ int eof_;
+ uint32_t level;
+};
+
+//
+// Template name: zstd_compressor_impl
+// Description: Model of C-Style Filter implementing compression by
+// delegating to the zstd function deflate.
+//
+template<typename Alloc = std::allocator<char> >
+class zstd_compressor_impl : public zstd_base, public zstd_allocator<Alloc> {
+public:
+ zstd_compressor_impl(const zstd_params& = zstd::default_compression);
+ ~zstd_compressor_impl();
+ bool filter( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end, bool flush );
+ void close();
+};
+
+//
+// Template name: zstd_compressor_impl
+// Description: Model of C-Style Filte implementing decompression by
+// delegating to the zstd function inflate.
+//
+template<typename Alloc = std::allocator<char> >
+class zstd_decompressor_impl : public zstd_base, public zstd_allocator<Alloc> {
+public:
+ zstd_decompressor_impl(const zstd_params&);
+ zstd_decompressor_impl();
+ ~zstd_decompressor_impl();
+ bool filter( const char*& begin_in, const char* end_in,
+ char*& begin_out, char* end_out, bool flush );
+ void close();
+};
+
+} // End namespace detail.
+
+//
+// Template name: zstd_compressor
+// Description: Model of InputFilter and OutputFilter implementing
+// compression using zstd.
+//
+template<typename Alloc = std::allocator<char> >
+struct basic_zstd_compressor
+ : symmetric_filter<detail::zstd_compressor_impl<Alloc>, Alloc>
+{
+private:
+ typedef detail::zstd_compressor_impl<Alloc> impl_type;
+ typedef symmetric_filter<impl_type, Alloc> base_type;
+public:
+ typedef typename base_type::char_type char_type;
+ typedef typename base_type::category category;
+ basic_zstd_compressor( const zstd_params& = zstd::default_compression,
+ std::streamsize buffer_size = default_device_buffer_size );
+};
+BOOST_IOSTREAMS_PIPABLE(basic_zstd_compressor, 1)
+
+typedef basic_zstd_compressor<> zstd_compressor;
+
+//
+// Template name: zstd_decompressor
+// Description: Model of InputFilter and OutputFilter implementing
+// decompression using zstd.
+//
+template<typename Alloc = std::allocator<char> >
+struct basic_zstd_decompressor
+ : symmetric_filter<detail::zstd_decompressor_impl<Alloc>, Alloc>
+{
+private:
+ typedef detail::zstd_decompressor_impl<Alloc> impl_type;
+ typedef symmetric_filter<impl_type, Alloc> base_type;
+public:
+ typedef typename base_type::char_type char_type;
+ typedef typename base_type::category category;
+ basic_zstd_decompressor( std::streamsize buffer_size = default_device_buffer_size );
+ basic_zstd_decompressor( const zstd_params& p,
+ std::streamsize buffer_size = default_device_buffer_size );
+};
+BOOST_IOSTREAMS_PIPABLE(basic_zstd_decompressor, 1)
+
+typedef basic_zstd_decompressor<> zstd_decompressor;
+
+//----------------------------------------------------------------------------//
+
+//------------------Implementation of zstd_allocator--------------------------//
+
+namespace detail {
+
+template<typename Alloc, typename Base>
+void* zstd_allocator<Alloc, Base>::allocate
+ (void* self, size_t items, size_t size)
+{
+ size_type len = items * size;
+ char* ptr =
+ static_cast<allocator_type*>(self)->allocate
+ (len + sizeof(size_type)
+ #if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1)
+ , (char*)0
+ #endif
+ );
+ *reinterpret_cast<size_type*>(ptr) = len;
+ return ptr + sizeof(size_type);
+}
+
+template<typename Alloc, typename Base>
+void zstd_allocator<Alloc, Base>::deallocate(void* self, void* address)
+{
+ char* ptr = reinterpret_cast<char*>(address) - sizeof(size_type);
+ size_type len = *reinterpret_cast<size_type*>(ptr) + sizeof(size_type);
+ static_cast<allocator_type*>(self)->deallocate(ptr, len);
+}
+
+//------------------Implementation of zstd_compressor_impl--------------------//
+
+template<typename Alloc>
+zstd_compressor_impl<Alloc>::zstd_compressor_impl(const zstd_params& p)
+{ init(p, true, static_cast<zstd_allocator<Alloc>&>(*this)); }
+
+template<typename Alloc>
+zstd_compressor_impl<Alloc>::~zstd_compressor_impl()
+{ reset(true, false); }
+
+template<typename Alloc>
+bool zstd_compressor_impl<Alloc>::filter
+ ( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end, bool flush )
+{
+ before(src_begin, src_end, dest_begin, dest_end);
+ int result = deflate(flush ? zstd::finish : zstd::run);
+ after(src_begin, dest_begin, true);
+ return result != zstd::stream_end;
+}
+
+template<typename Alloc>
+void zstd_compressor_impl<Alloc>::close() { reset(true, true); }
+
+//------------------Implementation of zstd_decompressor_impl------------------//
+
+template<typename Alloc>
+zstd_decompressor_impl<Alloc>::zstd_decompressor_impl(const zstd_params& p)
+{ init(p, false, static_cast<zstd_allocator<Alloc>&>(*this)); }
+
+template<typename Alloc>
+zstd_decompressor_impl<Alloc>::~zstd_decompressor_impl()
+{ reset(false, false); }
+
+template<typename Alloc>
+zstd_decompressor_impl<Alloc>::zstd_decompressor_impl()
+{
+ zstd_params p;
+ init(p, false, static_cast<zstd_allocator<Alloc>&>(*this));
+}
+
+template<typename Alloc>
+bool zstd_decompressor_impl<Alloc>::filter
+ ( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end, bool flush )
+{
+ before(src_begin, src_end, dest_begin, dest_end);
+ int result = inflate(flush ? zstd::finish : zstd::run);
+ after(src_begin, dest_begin, false);
+ return result != zstd::stream_end;
+}
+
+template<typename Alloc>
+void zstd_decompressor_impl<Alloc>::close() { reset(false, true); }
+
+} // End namespace detail.
+
+//------------------Implementation of zstd_compressor-----------------------//
+
+template<typename Alloc>
+basic_zstd_compressor<Alloc>::basic_zstd_compressor
+ (const zstd_params& p, std::streamsize buffer_size)
+ : base_type(buffer_size, p) { }
+
+//------------------Implementation of zstd_decompressor-----------------------//
+
+template<typename Alloc>
+basic_zstd_decompressor<Alloc>::basic_zstd_decompressor
+ (std::streamsize buffer_size)
+ : base_type(buffer_size) { }
+
+template<typename Alloc>
+basic_zstd_decompressor<Alloc>::basic_zstd_decompressor
+ (const zstd_params& p, std::streamsize buffer_size)
+ : base_type(buffer_size, p) { }
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
+
+#include <boost/config/abi_suffix.hpp> // Pops abi_suffix.hpp pragmas.
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#endif // #ifndef BOOST_IOSTREAMS_ZSTD_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filtering_stream.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filtering_stream.hpp
index 8621ef96b2e..8621ef96b2e 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filtering_stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filtering_stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/filtering_streambuf.hpp b/src/third_party/boost-1.69.0/boost/iostreams/filtering_streambuf.hpp
index affe4a71c43..affe4a71c43 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/filtering_streambuf.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/filtering_streambuf.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/flush.hpp b/src/third_party/boost-1.69.0/boost/iostreams/flush.hpp
index 5212a448f1a..5212a448f1a 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/flush.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/flush.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/get.hpp b/src/third_party/boost-1.69.0/boost/iostreams/get.hpp
index 12d530fd816..12d530fd816 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/get.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/get.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/imbue.hpp b/src/third_party/boost-1.69.0/boost/iostreams/imbue.hpp
index 48d2e1845ac..48d2e1845ac 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/imbue.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/imbue.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/input_sequence.hpp b/src/third_party/boost-1.69.0/boost/iostreams/input_sequence.hpp
index e504c8e8ff9..e504c8e8ff9 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/input_sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/input_sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/invert.hpp b/src/third_party/boost-1.69.0/boost/iostreams/invert.hpp
index d4a17bf7f33..d4a17bf7f33 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/invert.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/invert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/operations.hpp b/src/third_party/boost-1.69.0/boost/iostreams/operations.hpp
index 28bd7731723..28bd7731723 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/operations.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/operations.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/operations_fwd.hpp b/src/third_party/boost-1.69.0/boost/iostreams/operations_fwd.hpp
index ae68d704676..ae68d704676 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/operations_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/operations_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/optimal_buffer_size.hpp b/src/third_party/boost-1.69.0/boost/iostreams/optimal_buffer_size.hpp
index 13894faab86..13894faab86 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/optimal_buffer_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/optimal_buffer_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/output_sequence.hpp b/src/third_party/boost-1.69.0/boost/iostreams/output_sequence.hpp
index 5b42bf457df..5b42bf457df 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/output_sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/output_sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/pipeline.hpp b/src/third_party/boost-1.69.0/boost/iostreams/pipeline.hpp
index d29c2da3f75..d29c2da3f75 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/pipeline.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/pipeline.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/positioning.hpp b/src/third_party/boost-1.69.0/boost/iostreams/positioning.hpp
index 12f2afc84b6..12f2afc84b6 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/positioning.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/positioning.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/put.hpp b/src/third_party/boost-1.69.0/boost/iostreams/put.hpp
index a3fe33f2071..a3fe33f2071 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/put.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/put.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/putback.hpp b/src/third_party/boost-1.69.0/boost/iostreams/putback.hpp
index a4969f641a7..a4969f641a7 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/putback.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/putback.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/read.hpp b/src/third_party/boost-1.69.0/boost/iostreams/read.hpp
index a8652c5644b..a8652c5644b 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/read.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/read.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/restrict.hpp b/src/third_party/boost-1.69.0/boost/iostreams/restrict.hpp
index e17eb8c9659..e17eb8c9659 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/restrict.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/restrict.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/seek.hpp b/src/third_party/boost-1.69.0/boost/iostreams/seek.hpp
index 148c90bfa8c..148c90bfa8c 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/seek.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/seek.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/skip.hpp b/src/third_party/boost-1.69.0/boost/iostreams/skip.hpp
index eb097dd7bb5..eb097dd7bb5 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/skip.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/skip.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/slice.hpp b/src/third_party/boost-1.69.0/boost/iostreams/slice.hpp
index 820a316fe1b..820a316fe1b 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/slice.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/slice.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/stream.hpp b/src/third_party/boost-1.69.0/boost/iostreams/stream.hpp
index c581837b754..c581837b754 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/stream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/stream_buffer.hpp b/src/third_party/boost-1.69.0/boost/iostreams/stream_buffer.hpp
index dbcb786c659..dbcb786c659 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/stream_buffer.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/stream_buffer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/tee.hpp b/src/third_party/boost-1.69.0/boost/iostreams/tee.hpp
index 6df85e9b402..6df85e9b402 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/tee.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/tee.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/traits.hpp b/src/third_party/boost-1.69.0/boost/iostreams/traits.hpp
index f8d7a3ff5b8..f8d7a3ff5b8 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/traits_fwd.hpp b/src/third_party/boost-1.69.0/boost/iostreams/traits_fwd.hpp
index a3e952623a6..a3e952623a6 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/traits_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/traits_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iostreams/write.hpp b/src/third_party/boost-1.69.0/boost/iostreams/write.hpp
index 8faf986ae03..8faf986ae03 100644
--- a/src/third_party/boost-1.68.0/boost/iostreams/write.hpp
+++ b/src/third_party/boost-1.69.0/boost/iostreams/write.hpp
diff --git a/src/third_party/boost-1.68.0/boost/is_placeholder.hpp b/src/third_party/boost-1.69.0/boost/is_placeholder.hpp
index 5f1b544f944..5f1b544f944 100644
--- a/src/third_party/boost-1.68.0/boost/is_placeholder.hpp
+++ b/src/third_party/boost-1.69.0/boost/is_placeholder.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/advance.hpp b/src/third_party/boost-1.69.0/boost/iterator/advance.hpp
new file mode 100644
index 00000000000..92af8fbfe63
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iterator/advance.hpp
@@ -0,0 +1,84 @@
+// Copyright (C) 2017 Michel Morin.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_ITERATOR_ADVANCE_HPP
+#define BOOST_ITERATOR_ADVANCE_HPP
+
+#include <boost/config.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+
+namespace boost {
+namespace iterators {
+
+ namespace detail {
+ template <typename InputIterator, typename Distance>
+ inline BOOST_CXX14_CONSTEXPR void
+ advance_impl(
+ InputIterator& it
+ , Distance n
+ , incrementable_traversal_tag
+ )
+ {
+ while (n > 0) {
+ ++it;
+ --n;
+ }
+ }
+
+ template <typename BidirectionalIterator, typename Distance>
+ inline BOOST_CXX14_CONSTEXPR void
+ advance_impl(
+ BidirectionalIterator& it
+ , Distance n
+ , bidirectional_traversal_tag
+ )
+ {
+ if (n >= 0) {
+ while (n > 0) {
+ ++it;
+ --n;
+ }
+ }
+ else {
+ while (n < 0) {
+ --it;
+ ++n;
+ }
+ }
+ }
+
+ template <typename RandomAccessIterator, typename Distance>
+ inline BOOST_CXX14_CONSTEXPR void
+ advance_impl(
+ RandomAccessIterator& it
+ , Distance n
+ , random_access_traversal_tag
+ )
+ {
+ it += n;
+ }
+ }
+
+ namespace advance_adl_barrier {
+ template <typename InputIterator, typename Distance>
+ inline BOOST_CXX14_CONSTEXPR void
+ advance(InputIterator& it, Distance n)
+ {
+ detail::advance_impl(
+ it, n, typename iterator_traversal<InputIterator>::type()
+ );
+ }
+ }
+
+ using namespace advance_adl_barrier;
+
+} // namespace iterators
+
+using namespace iterators::advance_adl_barrier;
+
+} // namespace boost
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/iterator/counting_iterator.hpp b/src/third_party/boost-1.69.0/boost/iterator/counting_iterator.hpp
new file mode 100644
index 00000000000..d90980e1179
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iterator/counting_iterator.hpp
@@ -0,0 +1,220 @@
+// Copyright David Abrahams 2003.
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+#ifndef COUNTING_ITERATOR_DWA200348_HPP
+# define COUNTING_ITERATOR_DWA200348_HPP
+
+# include <boost/iterator/iterator_adaptor.hpp>
+# include <boost/detail/numeric_traits.hpp>
+# include <boost/mpl/bool.hpp>
+# include <boost/mpl/if.hpp>
+# include <boost/mpl/identity.hpp>
+# include <boost/mpl/eval_if.hpp>
+
+namespace boost {
+namespace iterators {
+
+template <
+ class Incrementable
+ , class CategoryOrTraversal
+ , class Difference
+>
+class counting_iterator;
+
+namespace detail
+{
+ // Try to detect numeric types at compile time in ways compatible
+ // with the limitations of the compiler and library.
+ template <class T>
+ struct is_numeric_impl
+ {
+ // For a while, this wasn't true, but we rely on it below. This is a regression assert.
+ BOOST_STATIC_ASSERT(::boost::is_integral<char>::value);
+
+# ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+
+ BOOST_STATIC_CONSTANT(bool, value = std::numeric_limits<T>::is_specialized);
+
+# else
+
+# if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551))
+ BOOST_STATIC_CONSTANT(
+ bool, value = (
+ boost::is_convertible<int,T>::value
+ && boost::is_convertible<T,int>::value
+ ));
+# else
+ BOOST_STATIC_CONSTANT(bool, value = ::boost::is_arithmetic<T>::value);
+# endif
+
+# endif
+ };
+
+ template <class T>
+ struct is_numeric
+ : mpl::bool_<(::boost::iterators::detail::is_numeric_impl<T>::value)>
+ {};
+
+# if defined(BOOST_HAS_LONG_LONG)
+ template <>
+ struct is_numeric< ::boost::long_long_type>
+ : mpl::true_ {};
+
+ template <>
+ struct is_numeric< ::boost::ulong_long_type>
+ : mpl::true_ {};
+# endif
+
+ // Some compilers fail to have a numeric_limits specialization
+ template <>
+ struct is_numeric<wchar_t>
+ : mpl::true_ {};
+
+ template <class T>
+ struct numeric_difference
+ {
+ typedef typename boost::detail::numeric_traits<T>::difference_type type;
+ };
+
+ BOOST_STATIC_ASSERT(is_numeric<int>::value);
+
+ template <class Incrementable, class CategoryOrTraversal, class Difference>
+ struct counting_iterator_base
+ {
+ typedef typename detail::ia_dflt_help<
+ CategoryOrTraversal
+ , mpl::eval_if<
+ is_numeric<Incrementable>
+ , mpl::identity<random_access_traversal_tag>
+ , iterator_traversal<Incrementable>
+ >
+ >::type traversal;
+
+ typedef typename detail::ia_dflt_help<
+ Difference
+ , mpl::eval_if<
+ is_numeric<Incrementable>
+ , numeric_difference<Incrementable>
+ , iterator_difference<Incrementable>
+ >
+ >::type difference;
+
+ typedef iterator_adaptor<
+ counting_iterator<Incrementable, CategoryOrTraversal, Difference> // self
+ , Incrementable // Base
+ , Incrementable // Value
+# ifndef BOOST_ITERATOR_REF_CONSTNESS_KILLS_WRITABILITY
+ const // MSVC won't strip this. Instead we enable Thomas'
+ // criterion (see boost/iterator/detail/facade_iterator_category.hpp)
+# endif
+ , traversal
+ , Incrementable const& // reference
+ , difference
+ > type;
+ };
+
+ // Template class distance_policy_select -- choose a policy for computing the
+ // distance between counting_iterators at compile-time based on whether or not
+ // the iterator wraps an integer or an iterator, using "poor man's partial
+ // specialization".
+
+ template <bool is_integer> struct distance_policy_select;
+
+ // A policy for wrapped iterators
+ template <class Difference, class Incrementable1, class Incrementable2>
+ struct iterator_distance
+ {
+ static Difference distance(Incrementable1 x, Incrementable2 y)
+ {
+ return y - x;
+ }
+ };
+
+ // A policy for wrapped numbers
+ template <class Difference, class Incrementable1, class Incrementable2>
+ struct number_distance
+ {
+ static Difference distance(Incrementable1 x, Incrementable2 y)
+ {
+ return boost::detail::numeric_distance(x, y);
+ }
+ };
+}
+
+template <
+ class Incrementable
+ , class CategoryOrTraversal = use_default
+ , class Difference = use_default
+>
+class counting_iterator
+ : public detail::counting_iterator_base<
+ Incrementable, CategoryOrTraversal, Difference
+ >::type
+{
+ typedef typename detail::counting_iterator_base<
+ Incrementable, CategoryOrTraversal, Difference
+ >::type super_t;
+
+ friend class iterator_core_access;
+
+ public:
+ typedef typename super_t::difference_type difference_type;
+
+ counting_iterator() { }
+
+ counting_iterator(counting_iterator const& rhs) : super_t(rhs.base()) {}
+
+ counting_iterator(Incrementable x)
+ : super_t(x)
+ {
+ }
+
+# if 0
+ template<class OtherIncrementable>
+ counting_iterator(
+ counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const& t
+ , typename enable_if_convertible<OtherIncrementable, Incrementable>::type* = 0
+ )
+ : super_t(t.base())
+ {}
+# endif
+
+ private:
+
+ typename super_t::reference dereference() const
+ {
+ return this->base_reference();
+ }
+
+ template <class OtherIncrementable>
+ difference_type
+ distance_to(counting_iterator<OtherIncrementable, CategoryOrTraversal, Difference> const& y) const
+ {
+ typedef typename mpl::if_<
+ detail::is_numeric<Incrementable>
+ , detail::number_distance<difference_type, Incrementable, OtherIncrementable>
+ , detail::iterator_distance<difference_type, Incrementable, OtherIncrementable>
+ >::type d;
+
+ return d::distance(this->base(), y.base());
+ }
+};
+
+// Manufacture a counting iterator for an arbitrary incrementable type
+template <class Incrementable>
+inline counting_iterator<Incrementable>
+make_counting_iterator(Incrementable x)
+{
+ typedef counting_iterator<Incrementable> result_t;
+ return result_t(x);
+}
+
+} // namespace iterators
+
+using iterators::counting_iterator;
+using iterators::make_counting_iterator;
+
+} // namespace boost
+
+#endif // COUNTING_ITERATOR_DWA200348_HPP
diff --git a/src/third_party/boost-1.68.0/boost/iterator/detail/config_def.hpp b/src/third_party/boost-1.69.0/boost/iterator/detail/config_def.hpp
index 117e75a76d4..117e75a76d4 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/detail/config_def.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/detail/config_def.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/detail/config_undef.hpp b/src/third_party/boost-1.69.0/boost/iterator/detail/config_undef.hpp
index bf1b8d708c5..bf1b8d708c5 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/detail/config_undef.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/detail/config_undef.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/detail/enable_if.hpp b/src/third_party/boost-1.69.0/boost/iterator/detail/enable_if.hpp
index 071f5fe81d4..071f5fe81d4 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/detail/enable_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/detail/enable_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/detail/facade_iterator_category.hpp b/src/third_party/boost-1.69.0/boost/iterator/detail/facade_iterator_category.hpp
index 67fdf446b0d..67fdf446b0d 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/detail/facade_iterator_category.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/detail/facade_iterator_category.hpp
diff --git a/src/third_party/boost-1.69.0/boost/iterator/distance.hpp b/src/third_party/boost-1.69.0/boost/iterator/distance.hpp
new file mode 100644
index 00000000000..bef650b289f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/iterator/distance.hpp
@@ -0,0 +1,65 @@
+// Copyright (C) 2017 Michel Morin.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_ITERATOR_DISTANCE_HPP
+#define BOOST_ITERATOR_DISTANCE_HPP
+
+#include <boost/config.hpp>
+#include <boost/iterator/iterator_categories.hpp>
+#include <boost/iterator/iterator_traits.hpp>
+
+namespace boost {
+namespace iterators {
+
+ namespace detail {
+ template <typename SinglePassIterator>
+ inline BOOST_CXX14_CONSTEXPR typename iterator_difference<SinglePassIterator>::type
+ distance_impl(
+ SinglePassIterator first
+ , SinglePassIterator last
+ , single_pass_traversal_tag
+ )
+ {
+ typename iterator_difference<SinglePassIterator>::type n = 0;
+ while (first != last) {
+ ++first;
+ ++n;
+ }
+ return n;
+ }
+
+ template <typename RandomAccessIterator>
+ inline BOOST_CXX14_CONSTEXPR typename iterator_difference<RandomAccessIterator>::type
+ distance_impl(
+ RandomAccessIterator first
+ , RandomAccessIterator last
+ , random_access_traversal_tag
+ )
+ {
+ return last - first;
+ }
+ }
+
+ namespace distance_adl_barrier {
+ template <typename SinglePassIterator>
+ inline BOOST_CXX14_CONSTEXPR typename iterator_difference<SinglePassIterator>::type
+ distance(SinglePassIterator first, SinglePassIterator last)
+ {
+ return detail::distance_impl(
+ first, last, typename iterator_traversal<SinglePassIterator>::type()
+ );
+ }
+ }
+
+ using namespace distance_adl_barrier;
+
+} // namespace iterators
+
+using namespace iterators::distance_adl_barrier;
+
+} // namespace boost
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/iterator/filter_iterator.hpp b/src/third_party/boost-1.69.0/boost/iterator/filter_iterator.hpp
index b87c02b0aba..b87c02b0aba 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/filter_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/filter_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/indirect_iterator.hpp b/src/third_party/boost-1.69.0/boost/iterator/indirect_iterator.hpp
index 7449d621bbf..7449d621bbf 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/indirect_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/indirect_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/interoperable.hpp b/src/third_party/boost-1.69.0/boost/iterator/interoperable.hpp
index 6f3c872a27b..6f3c872a27b 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/interoperable.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/interoperable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/iterator_adaptor.hpp b/src/third_party/boost-1.69.0/boost/iterator/iterator_adaptor.hpp
index f803fc65ed6..f803fc65ed6 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/iterator_adaptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/iterator_adaptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/iterator_categories.hpp b/src/third_party/boost-1.69.0/boost/iterator/iterator_categories.hpp
index baf805af6e3..baf805af6e3 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/iterator_categories.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/iterator_categories.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/iterator_concepts.hpp b/src/third_party/boost-1.69.0/boost/iterator/iterator_concepts.hpp
index 415cc496a02..415cc496a02 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/iterator_concepts.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/iterator_concepts.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/iterator_facade.hpp b/src/third_party/boost-1.69.0/boost/iterator/iterator_facade.hpp
index 225c53a231d..225c53a231d 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/iterator_facade.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/iterator_facade.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/iterator_traits.hpp b/src/third_party/boost-1.69.0/boost/iterator/iterator_traits.hpp
index 6582a68f507..6582a68f507 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/iterator_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/iterator_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/minimum_category.hpp b/src/third_party/boost-1.69.0/boost/iterator/minimum_category.hpp
index 15679bc77d5..15679bc77d5 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/minimum_category.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/minimum_category.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/reverse_iterator.hpp b/src/third_party/boost-1.69.0/boost/iterator/reverse_iterator.hpp
index 03b7925ca72..03b7925ca72 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/reverse_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/reverse_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/iterator/transform_iterator.hpp b/src/third_party/boost-1.69.0/boost/iterator/transform_iterator.hpp
index 2281df877f1..2281df877f1 100644
--- a/src/third_party/boost-1.68.0/boost/iterator/transform_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/iterator/transform_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/bind.hpp b/src/third_party/boost-1.69.0/boost/lambda/bind.hpp
index 0371393cbaf..0371393cbaf 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/core.hpp b/src/third_party/boost-1.69.0/boost/lambda/core.hpp
index b81fdf88a1e..b81fdf88a1e 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/core.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/core.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/actions.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/actions.hpp
index 668799f9fef..668799f9fef 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/actions.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/actions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/arity_code.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/arity_code.hpp
index bed34b9a4dd..bed34b9a4dd 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/arity_code.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/arity_code.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/bind_functions.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/bind_functions.hpp
index f85513c091a..f85513c091a 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/bind_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/bind_functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/function_adaptors.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/function_adaptors.hpp
index 35db8b43045..35db8b43045 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/function_adaptors.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/function_adaptors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/is_instance_of.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/is_instance_of.hpp
index 1dfbd43a533..1dfbd43a533 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/is_instance_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/is_instance_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_config.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_config.hpp
index f47100b9698..f47100b9698 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_functor_base.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functor_base.hpp
index b084acd21aa..b084acd21aa 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_functor_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functor_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_functors.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functors.hpp
index febb6fc828a..febb6fc828a 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_functors.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_functors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_fwd.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_fwd.hpp
index a27bfaded19..a27bfaded19 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_traits.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_traits.hpp
index cae0f38e6da..cae0f38e6da 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/lambda_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/lambda_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/member_ptr.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/member_ptr.hpp
index 288f70c5de6..288f70c5de6 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/member_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/member_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/operator_actions.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/operator_actions.hpp
index 949b40fa431..949b40fa431 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/operator_actions.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/operator_actions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/operator_lambda_func_base.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/operator_lambda_func_base.hpp
index 12a6d934a49..12a6d934a49 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/operator_lambda_func_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/operator_lambda_func_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/operator_return_type_traits.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/operator_return_type_traits.hpp
index 6af4d03671a..6af4d03671a 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/operator_return_type_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/operator_return_type_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/operators.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/operators.hpp
index 136e28f1b41..136e28f1b41 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/ret.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/ret.hpp
index 96f5fc18bb6..96f5fc18bb6 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/ret.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/ret.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/return_type_traits.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/return_type_traits.hpp
index da2879cbb0d..da2879cbb0d 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/return_type_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/return_type_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/detail/select_functions.hpp b/src/third_party/boost-1.69.0/boost/lambda/detail/select_functions.hpp
index 956045c63f4..956045c63f4 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/detail/select_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/detail/select_functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/if.hpp b/src/third_party/boost-1.69.0/boost/lambda/if.hpp
index 08f45f984a3..08f45f984a3 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/if.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/lambda/lambda.hpp b/src/third_party/boost-1.69.0/boost/lambda/lambda.hpp
index e1654a29641..e1654a29641 100644
--- a/src/third_party/boost-1.68.0/boost/lambda/lambda.hpp
+++ b/src/third_party/boost-1.69.0/boost/lambda/lambda.hpp
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast.hpp
new file mode 100644
index 00000000000..48884898de1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast.hpp
@@ -0,0 +1,105 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_INCLUDED
+#define BOOST_LEXICAL_CAST_INCLUDED
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
+#define BOOST_LCAST_NO_WCHAR_T
+#endif
+
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/lexical_cast/bad_lexical_cast.hpp>
+#include <boost/lexical_cast/try_lexical_convert.hpp>
+
+namespace boost
+{
+ template <typename Target, typename Source>
+ inline Target lexical_cast(const Source &arg)
+ {
+ Target result = Target();
+
+ if (!boost::conversion::detail::try_lexical_convert(arg, result)) {
+ boost::conversion::detail::throw_bad_cast<Source, Target>();
+ }
+
+ return result;
+ }
+
+ template <typename Target>
+ inline Target lexical_cast(const char* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const char*>(chars, chars + count)
+ );
+ }
+
+ template <typename Target>
+ inline Target lexical_cast(const unsigned char* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const unsigned char*>(chars, chars + count)
+ );
+ }
+
+ template <typename Target>
+ inline Target lexical_cast(const signed char* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const signed char*>(chars, chars + count)
+ );
+ }
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+ template <typename Target>
+ inline Target lexical_cast(const wchar_t* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const wchar_t*>(chars, chars + count)
+ );
+ }
+#endif
+#ifndef BOOST_NO_CXX11_CHAR16_T
+ template <typename Target>
+ inline Target lexical_cast(const char16_t* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const char16_t*>(chars, chars + count)
+ );
+ }
+#endif
+#ifndef BOOST_NO_CXX11_CHAR32_T
+ template <typename Target>
+ inline Target lexical_cast(const char32_t* chars, std::size_t count)
+ {
+ return ::boost::lexical_cast<Target>(
+ ::boost::iterator_range<const char32_t*>(chars, chars + count)
+ );
+ }
+#endif
+
+} // namespace boost
+
+#undef BOOST_LCAST_NO_WCHAR_T
+
+#endif // BOOST_LEXICAL_CAST_INCLUDED
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/bad_lexical_cast.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/bad_lexical_cast.hpp
new file mode 100644
index 00000000000..1cb51d79dc3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/bad_lexical_cast.hpp
@@ -0,0 +1,101 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP
+#define BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <typeinfo>
+#include <exception>
+#include <boost/throw_exception.hpp>
+
+namespace boost
+{
+ // exception used to indicate runtime lexical_cast failure
+ class BOOST_SYMBOL_VISIBLE bad_lexical_cast :
+ // workaround MSVC bug with std::bad_cast when _HAS_EXCEPTIONS == 0
+#if defined(BOOST_MSVC) && defined(_HAS_EXCEPTIONS) && !_HAS_EXCEPTIONS
+ public std::exception
+#else
+ public std::bad_cast
+#endif
+
+#if defined(__BORLANDC__) && BOOST_WORKAROUND( __BORLANDC__, < 0x560 )
+ // under bcc32 5.5.1 bad_cast doesn't derive from exception
+ , public std::exception
+#endif
+
+ {
+ public:
+ bad_lexical_cast() BOOST_NOEXCEPT
+#ifndef BOOST_NO_TYPEID
+ : source(&typeid(void)), target(&typeid(void))
+#endif
+ {}
+
+ virtual const char *what() const BOOST_NOEXCEPT_OR_NOTHROW {
+ return "bad lexical cast: "
+ "source type value could not be interpreted as target";
+ }
+
+ virtual ~bad_lexical_cast() BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+#ifndef BOOST_NO_TYPEID
+ bad_lexical_cast(
+ const std::type_info &source_type_arg,
+ const std::type_info &target_type_arg) BOOST_NOEXCEPT
+ : source(&source_type_arg), target(&target_type_arg)
+ {}
+
+ const std::type_info &source_type() const BOOST_NOEXCEPT {
+ return *source;
+ }
+
+ const std::type_info &target_type() const BOOST_NOEXCEPT {
+ return *target;
+ }
+
+ private:
+ const std::type_info *source;
+ const std::type_info *target;
+#endif
+ };
+
+ namespace conversion { namespace detail {
+#ifdef BOOST_NO_TYPEID
+ template <class S, class T>
+ inline void throw_bad_cast() {
+ boost::throw_exception(bad_lexical_cast());
+ }
+#else
+ template <class S, class T>
+ inline void throw_bad_cast() {
+ boost::throw_exception(bad_lexical_cast(typeid(S), typeid(T)));
+ }
+#endif
+ }} // namespace conversion::detail
+
+
+} // namespace boost
+
+#endif // BOOST_LEXICAL_CAST_BAD_LEXICAL_CAST_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_lexical.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_lexical.hpp
new file mode 100644
index 00000000000..a50eab36e1e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_lexical.hpp
@@ -0,0 +1,498 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP
+#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
+#define BOOST_LCAST_NO_WCHAR_T
+#endif
+
+#include <cstddef>
+#include <string>
+#include <boost/limits.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/type_identity.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_float.hpp>
+#include <boost/type_traits/has_left_shift.hpp>
+#include <boost/type_traits/has_right_shift.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/detail/lcast_precision.hpp>
+
+#include <boost/lexical_cast/detail/widest_char.hpp>
+#include <boost/lexical_cast/detail/is_character.hpp>
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#include <array>
+#endif
+
+#include <boost/array.hpp>
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/container/container_fwd.hpp>
+
+#include <boost/lexical_cast/detail/converter_lexical_streams.hpp>
+
+namespace boost {
+
+ namespace detail // normalize_single_byte_char<Char>
+ {
+ // Converts signed/unsigned char to char
+ template < class Char >
+ struct normalize_single_byte_char
+ {
+ typedef Char type;
+ };
+
+ template <>
+ struct normalize_single_byte_char< signed char >
+ {
+ typedef char type;
+ };
+
+ template <>
+ struct normalize_single_byte_char< unsigned char >
+ {
+ typedef char type;
+ };
+ }
+
+ namespace detail // deduce_character_type_later<T>
+ {
+ // Helper type, meaning that stram character for T must be deduced
+ // at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
+ template < class T > struct deduce_character_type_later {};
+ }
+
+ namespace detail // stream_char_common<T>
+ {
+ // Selectors to choose stream character type (common for Source and Target)
+ // Returns one of char, wchar_t, char16_t, char32_t or deduce_character_type_later<T> types
+ // Executed on Stage 1 (See deduce_source_char<T> and deduce_target_char<T>)
+ template < typename Type >
+ struct stream_char_common: public boost::conditional<
+ boost::detail::is_character< Type >::value,
+ Type,
+ boost::detail::deduce_character_type_later< Type >
+ > {};
+
+ template < typename Char >
+ struct stream_char_common< Char* >: public boost::conditional<
+ boost::detail::is_character< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< Char* >
+ > {};
+
+ template < typename Char >
+ struct stream_char_common< const Char* >: public boost::conditional<
+ boost::detail::is_character< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< const Char* >
+ > {};
+
+ template < typename Char >
+ struct stream_char_common< boost::iterator_range< Char* > >: public boost::conditional<
+ boost::detail::is_character< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< boost::iterator_range< Char* > >
+ > {};
+
+ template < typename Char >
+ struct stream_char_common< boost::iterator_range< const Char* > >: public boost::conditional<
+ boost::detail::is_character< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< boost::iterator_range< const Char* > >
+ > {};
+
+ template < class Char, class Traits, class Alloc >
+ struct stream_char_common< std::basic_string< Char, Traits, Alloc > >
+ {
+ typedef Char type;
+ };
+
+ template < class Char, class Traits, class Alloc >
+ struct stream_char_common< boost::container::basic_string< Char, Traits, Alloc > >
+ {
+ typedef Char type;
+ };
+
+ template < typename Char, std::size_t N >
+ struct stream_char_common< boost::array< Char, N > >: public boost::conditional<
+ boost::detail::is_character< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< boost::array< Char, N > >
+ > {};
+
+ template < typename Char, std::size_t N >
+ struct stream_char_common< boost::array< const Char, N > >: public boost::conditional<
+ boost::detail::is_character< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< boost::array< const Char, N > >
+ > {};
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+ template < typename Char, std::size_t N >
+ struct stream_char_common< std::array<Char, N > >: public boost::conditional<
+ boost::detail::is_character< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< std::array< Char, N > >
+ > {};
+
+ template < typename Char, std::size_t N >
+ struct stream_char_common< std::array< const Char, N > >: public boost::conditional<
+ boost::detail::is_character< Char >::value,
+ Char,
+ boost::detail::deduce_character_type_later< std::array< const Char, N > >
+ > {};
+#endif
+
+#ifdef BOOST_HAS_INT128
+ template <> struct stream_char_common< boost::int128_type >: public boost::type_identity< char > {};
+ template <> struct stream_char_common< boost::uint128_type >: public boost::type_identity< char > {};
+#endif
+
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && defined(BOOST_NO_INTRINSIC_WCHAR_T)
+ template <>
+ struct stream_char_common< wchar_t >
+ {
+ typedef char type;
+ };
+#endif
+ }
+
+ namespace detail // deduce_source_char_impl<T>
+ {
+ // If type T is `deduce_character_type_later` type, then tries to deduce
+ // character type using boost::has_left_shift<T> metafunction.
+ // Otherwise supplied type T is a character type, that must be normalized
+ // using normalize_single_byte_char<Char>.
+ // Executed at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
+ template < class Char >
+ struct deduce_source_char_impl
+ {
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::normalize_single_byte_char< Char >::type type;
+ };
+
+ template < class T >
+ struct deduce_source_char_impl< deduce_character_type_later< T > >
+ {
+ typedef boost::has_left_shift< std::basic_ostream< char >, T > result_t;
+
+#if defined(BOOST_LCAST_NO_WCHAR_T)
+ BOOST_STATIC_ASSERT_MSG((result_t::value),
+ "Source type is not std::ostream`able and std::wostream`s are not supported by your STL implementation");
+ typedef char type;
+#else
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ result_t::value, char, wchar_t
+ >::type type;
+
+ BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_left_shift< std::basic_ostream< type >, T >::value),
+ "Source type is neither std::ostream`able nor std::wostream`able");
+#endif
+ };
+ }
+
+ namespace detail // deduce_target_char_impl<T>
+ {
+ // If type T is `deduce_character_type_later` type, then tries to deduce
+ // character type using boost::has_right_shift<T> metafunction.
+ // Otherwise supplied type T is a character type, that must be normalized
+ // using normalize_single_byte_char<Char>.
+ // Executed at Stage 2 (See deduce_source_char<T> and deduce_target_char<T>)
+ template < class Char >
+ struct deduce_target_char_impl
+ {
+ typedef BOOST_DEDUCED_TYPENAME normalize_single_byte_char< Char >::type type;
+ };
+
+ template < class T >
+ struct deduce_target_char_impl< deduce_character_type_later<T> >
+ {
+ typedef boost::has_right_shift<std::basic_istream<char>, T > result_t;
+
+#if defined(BOOST_LCAST_NO_WCHAR_T)
+ BOOST_STATIC_ASSERT_MSG((result_t::value),
+ "Target type is not std::istream`able and std::wistream`s are not supported by your STL implementation");
+ typedef char type;
+#else
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ result_t::value, char, wchar_t
+ >::type type;
+
+ BOOST_STATIC_ASSERT_MSG((result_t::value || boost::has_right_shift<std::basic_istream<wchar_t>, T >::value),
+ "Target type is neither std::istream`able nor std::wistream`able");
+#endif
+ };
+ }
+
+ namespace detail // deduce_target_char<T> and deduce_source_char<T>
+ {
+ // We deduce stream character types in two stages.
+ //
+ // Stage 1 is common for Target and Source. At Stage 1 we get
+ // non normalized character type (may contain unsigned/signed char)
+ // or deduce_character_type_later<T> where T is the original type.
+ // Stage 1 is executed by stream_char_common<T>
+ //
+ // At Stage 2 we normalize character types or try to deduce character
+ // type using metafunctions.
+ // Stage 2 is executed by deduce_target_char_impl<T> and
+ // deduce_source_char_impl<T>
+ //
+ // deduce_target_char<T> and deduce_source_char<T> functions combine
+ // both stages
+
+ template < class T >
+ struct deduce_target_char
+ {
+ typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type;
+ typedef BOOST_DEDUCED_TYPENAME deduce_target_char_impl< stage1_type >::type stage2_type;
+
+ typedef stage2_type type;
+ };
+
+ template < class T >
+ struct deduce_source_char
+ {
+ typedef BOOST_DEDUCED_TYPENAME stream_char_common< T >::type stage1_type;
+ typedef BOOST_DEDUCED_TYPENAME deduce_source_char_impl< stage1_type >::type stage2_type;
+
+ typedef stage2_type type;
+ };
+ }
+
+ namespace detail // extract_char_traits template
+ {
+ // We are attempting to get char_traits<> from T
+ // template parameter. Otherwise we'll be using std::char_traits<Char>
+ template < class Char, class T >
+ struct extract_char_traits
+ : boost::false_type
+ {
+ typedef std::char_traits< Char > trait_t;
+ };
+
+ template < class Char, class Traits, class Alloc >
+ struct extract_char_traits< Char, std::basic_string< Char, Traits, Alloc > >
+ : boost::true_type
+ {
+ typedef Traits trait_t;
+ };
+
+ template < class Char, class Traits, class Alloc>
+ struct extract_char_traits< Char, boost::container::basic_string< Char, Traits, Alloc > >
+ : boost::true_type
+ {
+ typedef Traits trait_t;
+ };
+ }
+
+ namespace detail // array_to_pointer_decay<T>
+ {
+ template<class T>
+ struct array_to_pointer_decay
+ {
+ typedef T type;
+ };
+
+ template<class T, std::size_t N>
+ struct array_to_pointer_decay<T[N]>
+ {
+ typedef const T * type;
+ };
+ }
+
+ namespace detail // lcast_src_length
+ {
+ // Return max. length of string representation of Source;
+ template< class Source, // Source type of lexical_cast.
+ class Enable = void // helper type
+ >
+ struct lcast_src_length
+ {
+ BOOST_STATIC_CONSTANT(std::size_t, value = 1);
+ };
+
+ // Helper for integral types.
+ // Notes on length calculation:
+ // Max length for 32bit int with grouping "\1" and thousands_sep ',':
+ // "-2,1,4,7,4,8,3,6,4,7"
+ // ^ - is_signed
+ // ^ - 1 digit not counted by digits10
+ // ^^^^^^^^^^^^^^^^^^ - digits10 * 2
+ //
+ // Constant is_specialized is used instead of constant 1
+ // to prevent buffer overflow in a rare case when
+ // <boost/limits.hpp> doesn't add missing specialization for
+ // numeric_limits<T> for some integral type T.
+ // When is_specialized is false, the whole expression is 0.
+ template <class Source>
+ struct lcast_src_length<
+ Source, BOOST_DEDUCED_TYPENAME boost::enable_if<boost::is_integral<Source> >::type
+ >
+ {
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_CONSTANT(std::size_t, value =
+ std::numeric_limits<Source>::is_signed +
+ std::numeric_limits<Source>::is_specialized + /* == 1 */
+ std::numeric_limits<Source>::digits10 * 2
+ );
+#else
+ BOOST_STATIC_CONSTANT(std::size_t, value = 156);
+ BOOST_STATIC_ASSERT(sizeof(Source) * CHAR_BIT <= 256);
+#endif
+ };
+
+ // Helper for floating point types.
+ // -1.23456789e-123456
+ // ^ sign
+ // ^ leading digit
+ // ^ decimal point
+ // ^^^^^^^^ lcast_precision<Source>::value
+ // ^ "e"
+ // ^ exponent sign
+ // ^^^^^^ exponent (assumed 6 or less digits)
+ // sign + leading digit + decimal point + "e" + exponent sign == 5
+ template<class Source>
+ struct lcast_src_length<
+ Source, BOOST_DEDUCED_TYPENAME boost::enable_if<boost::is_float<Source> >::type
+ >
+ {
+
+#ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+ BOOST_STATIC_ASSERT(
+ std::numeric_limits<Source>::max_exponent10 <= 999999L &&
+ std::numeric_limits<Source>::min_exponent10 >= -999999L
+ );
+
+ BOOST_STATIC_CONSTANT(std::size_t, value =
+ 5 + lcast_precision<Source>::value + 6
+ );
+#else // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+ BOOST_STATIC_CONSTANT(std::size_t, value = 156);
+#endif // #ifndef BOOST_LCAST_NO_COMPILE_TIME_PRECISION
+ };
+ }
+
+ namespace detail // lexical_cast_stream_traits<Source, Target>
+ {
+ template <class Source, class Target>
+ struct lexical_cast_stream_traits {
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay<Source>::type src;
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<src>::type no_cv_src;
+
+ typedef boost::detail::deduce_source_char<no_cv_src> deduce_src_char_metafunc;
+ typedef BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::type src_char_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::deduce_target_char<Target>::type target_char_t;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::widest_char<
+ target_char_t, src_char_t
+ >::type char_type;
+
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ BOOST_STATIC_ASSERT_MSG(( !boost::is_same<char16_t, src_char_t>::value
+ && !boost::is_same<char16_t, target_char_t>::value),
+ "Your compiler does not have full support for char16_t" );
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ BOOST_STATIC_ASSERT_MSG(( !boost::is_same<char32_t, src_char_t>::value
+ && !boost::is_same<char32_t, target_char_t>::value),
+ "Your compiler does not have full support for char32_t" );
+#endif
+
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::detail::extract_char_traits<char_type, Target>::value,
+ BOOST_DEDUCED_TYPENAME boost::detail::extract_char_traits<char_type, Target>,
+ BOOST_DEDUCED_TYPENAME boost::detail::extract_char_traits<char_type, no_cv_src>
+ >::type::trait_t traits;
+
+ typedef boost::integral_constant<
+ bool,
+ boost::is_same<char, src_char_t>::value && // source is not a wide character based type
+ (sizeof(char) != sizeof(target_char_t)) && // target type is based on wide character
+ (!(boost::detail::is_character<no_cv_src>::value))
+ > is_string_widening_required_t;
+
+ typedef boost::integral_constant<
+ bool,
+ !(boost::is_integral<no_cv_src>::value ||
+ boost::detail::is_character<
+ BOOST_DEDUCED_TYPENAME deduce_src_char_metafunc::stage1_type // if we did not get character type at stage1
+ >::value // then we have no optimization for that type
+ )
+ > is_source_input_not_optimized_t;
+
+ // If we have an optimized conversion for
+ // Source, we do not need to construct stringbuf.
+ BOOST_STATIC_CONSTANT(bool, requires_stringbuf =
+ (is_string_widening_required_t::value || is_source_input_not_optimized_t::value)
+ );
+
+ typedef boost::detail::lcast_src_length<no_cv_src> len_t;
+ };
+ }
+
+ namespace detail
+ {
+ template<typename Target, typename Source>
+ struct lexical_converter_impl
+ {
+ typedef lexical_cast_stream_traits<Source, Target> stream_trait;
+
+ typedef detail::lexical_istream_limited_src<
+ BOOST_DEDUCED_TYPENAME stream_trait::char_type,
+ BOOST_DEDUCED_TYPENAME stream_trait::traits,
+ stream_trait::requires_stringbuf,
+ stream_trait::len_t::value + 1
+ > i_interpreter_type;
+
+ typedef detail::lexical_ostream_limited_src<
+ BOOST_DEDUCED_TYPENAME stream_trait::char_type,
+ BOOST_DEDUCED_TYPENAME stream_trait::traits
+ > o_interpreter_type;
+
+ static inline bool try_convert(const Source& arg, Target& result) {
+ i_interpreter_type i_interpreter;
+
+ // Disabling ADL, by directly specifying operators.
+ if (!(i_interpreter.operator <<(arg)))
+ return false;
+
+ o_interpreter_type out(i_interpreter.cbegin(), i_interpreter.cend());
+
+ // Disabling ADL, by directly specifying operators.
+ if(!(out.operator >>(result)))
+ return false;
+
+ return true;
+ }
+ };
+ }
+
+} // namespace boost
+
+#undef BOOST_LCAST_NO_WCHAR_T
+
+#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_lexical_streams.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_lexical_streams.hpp
new file mode 100644
index 00000000000..a4c8ab9ef9d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_lexical_streams.hpp
@@ -0,0 +1,786 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014, Nowember 2016
+
+#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP
+#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_STREAMS_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
+#define BOOST_LCAST_NO_WCHAR_T
+#endif
+
+#include <cstddef>
+#include <string>
+#include <cstring>
+#include <cstdio>
+#include <boost/limits.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/detail/workaround.hpp>
+
+
+#ifndef BOOST_NO_STD_LOCALE
+# include <locale>
+#else
+# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+ // Getting error at this point means, that your STL library is old/lame/misconfigured.
+ // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE,
+ // but beware: lexical_cast will understand only 'C' locale delimeters and thousands
+ // separators.
+# error "Unable to use <locale> header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force "
+# error "boost::lexical_cast to use only 'C' locale during conversions."
+# endif
+#endif
+
+#ifdef BOOST_NO_STRINGSTREAM
+#include <strstream>
+#else
+#include <sstream>
+#endif
+
+#include <boost/lexical_cast/detail/lcast_char_constants.hpp>
+#include <boost/lexical_cast/detail/lcast_unsigned_converters.hpp>
+#include <boost/lexical_cast/detail/inf_nan.hpp>
+
+#include <istream>
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+#include <array>
+#endif
+
+#include <boost/array.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_float.hpp>
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/container/container_fwd.hpp>
+#include <boost/integer.hpp>
+#include <boost/detail/basic_pointerbuf.hpp>
+#include <boost/noncopyable.hpp>
+#ifndef BOOST_NO_CWCHAR
+# include <cwchar>
+#endif
+
+namespace boost {
+
+ namespace detail // basic_unlockedbuf
+ {
+ // acts as a stream buffer which wraps around a pair of pointers
+ // and gives acces to internals
+ template <class BufferType, class CharT>
+ class basic_unlockedbuf : public basic_pointerbuf<CharT, BufferType> {
+ public:
+ typedef basic_pointerbuf<CharT, BufferType> base_type;
+ typedef BOOST_DEDUCED_TYPENAME base_type::streamsize streamsize;
+
+#ifndef BOOST_NO_USING_TEMPLATE
+ using base_type::pptr;
+ using base_type::pbase;
+ using base_type::setbuf;
+#else
+ charT* pptr() const { return base_type::pptr(); }
+ charT* pbase() const { return base_type::pbase(); }
+ BufferType* setbuf(char_type* s, streamsize n) { return base_type::setbuf(s, n); }
+#endif
+ };
+ }
+
+ namespace detail
+ {
+ struct do_not_construct_out_buffer_t{};
+ struct do_not_construct_out_stream_t{
+ do_not_construct_out_stream_t(do_not_construct_out_buffer_t*){}
+ };
+
+ template <class CharT, class Traits>
+ struct out_stream_helper_trait {
+#if defined(BOOST_NO_STRINGSTREAM)
+ typedef std::ostream out_stream_t;
+ typedef basic_unlockedbuf<std::strstreambuf, char> stringbuffer_t;
+#elif defined(BOOST_NO_STD_LOCALE)
+ typedef std::ostream out_stream_t;
+ typedef basic_unlockedbuf<std::stringbuf, char> stringbuffer_t;
+ typedef basic_unlockedbuf<std::streambuf, char> buffer_t;
+#else
+ typedef std::basic_ostream<CharT, Traits> out_stream_t;
+ typedef basic_unlockedbuf<std::basic_stringbuf<CharT, Traits>, CharT> stringbuffer_t;
+ typedef basic_unlockedbuf<std::basic_streambuf<CharT, Traits>, CharT> buffer_t;
+#endif
+ };
+ }
+
+ namespace detail // optimized stream wrappers
+ {
+ template< class CharT // a result of widest_char transformation
+ , class Traits
+ , bool RequiresStringbuffer
+ , std::size_t CharacterBufferSize
+ >
+ class lexical_istream_limited_src: boost::noncopyable {
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ RequiresStringbuffer,
+ BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::out_stream_t,
+ do_not_construct_out_stream_t
+ >::type deduced_out_stream_t;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ RequiresStringbuffer,
+ BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::stringbuffer_t,
+ do_not_construct_out_buffer_t
+ >::type deduced_out_buffer_t;
+
+ deduced_out_buffer_t out_buffer;
+ deduced_out_stream_t out_stream;
+ CharT buffer[CharacterBufferSize];
+
+ // After the `operator <<` finishes, `[start, finish)` is
+ // the range to output by `operator >>`
+ const CharT* start;
+ const CharT* finish;
+
+ public:
+ lexical_istream_limited_src() BOOST_NOEXCEPT
+ : out_buffer()
+ , out_stream(&out_buffer)
+ , start(buffer)
+ , finish(buffer + CharacterBufferSize)
+ {}
+
+ const CharT* cbegin() const BOOST_NOEXCEPT {
+ return start;
+ }
+
+ const CharT* cend() const BOOST_NOEXCEPT {
+ return finish;
+ }
+
+ private:
+/************************************ HELPER FUNCTIONS FOR OPERATORS << ( ... ) ********************************/
+ bool shl_char(CharT ch) BOOST_NOEXCEPT {
+ Traits::assign(buffer[0], ch);
+ finish = start + 1;
+ return true;
+ }
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+ template <class T>
+ bool shl_char(T ch) {
+ BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)) ,
+ "boost::lexical_cast does not support narrowing of char types."
+ "Use boost::locale instead" );
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+ std::locale loc;
+ CharT const w = BOOST_USE_FACET(std::ctype<CharT>, loc).widen(ch);
+#else
+ CharT const w = static_cast<CharT>(ch);
+#endif
+ Traits::assign(buffer[0], w);
+ finish = start + 1;
+ return true;
+ }
+#endif
+
+ bool shl_char_array(CharT const* str_value) BOOST_NOEXCEPT {
+ start = str_value;
+ finish = start + Traits::length(str_value);
+ return true;
+ }
+
+ template <class T>
+ bool shl_char_array(T const* str_value) {
+ BOOST_STATIC_ASSERT_MSG(( sizeof(T) <= sizeof(CharT)),
+ "boost::lexical_cast does not support narrowing of char types."
+ "Use boost::locale instead" );
+ return shl_input_streamable(str_value);
+ }
+
+ bool shl_char_array_limited(CharT const* str, std::size_t max_size) BOOST_NOEXCEPT {
+ start = str;
+ finish = std::find(start, start + max_size, Traits::to_char_type(0));
+ return true;
+ }
+
+ template<typename InputStreamable>
+ bool shl_input_streamable(InputStreamable& input) {
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
+ // If you have compilation error at this point, than your STL library
+ // does not support such conversions. Try updating it.
+ BOOST_STATIC_ASSERT((boost::is_same<char, CharT>::value));
+#endif
+
+#ifndef BOOST_NO_EXCEPTIONS
+ out_stream.exceptions(std::ios::badbit);
+ try {
+#endif
+ bool const result = !(out_stream << input).fail();
+ const deduced_out_buffer_t* const p = static_cast<deduced_out_buffer_t*>(
+ out_stream.rdbuf()
+ );
+ start = p->pbase();
+ finish = p->pptr();
+ return result;
+#ifndef BOOST_NO_EXCEPTIONS
+ } catch (const ::std::ios_base::failure& /*f*/) {
+ return false;
+ }
+#endif
+ }
+
+ template <class T>
+ inline bool shl_unsigned(const T n) {
+ CharT* tmp_finish = buffer + CharacterBufferSize;
+ start = lcast_put_unsigned<Traits, T, CharT>(n, tmp_finish).convert();
+ finish = tmp_finish;
+ return true;
+ }
+
+ template <class T>
+ inline bool shl_signed(const T n) {
+ CharT* tmp_finish = buffer + CharacterBufferSize;
+ typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned<T>::type utype;
+ CharT* tmp_start = lcast_put_unsigned<Traits, utype, CharT>(lcast_to_unsigned(n), tmp_finish).convert();
+ if (n < 0) {
+ --tmp_start;
+ CharT const minus = lcast_char_constants<CharT>::minus;
+ Traits::assign(*tmp_start, minus);
+ }
+ start = tmp_start;
+ finish = tmp_finish;
+ return true;
+ }
+
+ template <class T, class SomeCharT>
+ bool shl_real_type(const T& val, SomeCharT* /*begin*/) {
+ lcast_set_precision(out_stream, &val);
+ return shl_input_streamable(val);
+ }
+
+ bool shl_real_type(float val, char* begin) {
+ using namespace std;
+ const double val_as_double = val;
+ finish = start +
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+ sprintf_s(begin, CharacterBufferSize,
+#else
+ sprintf(begin,
+#endif
+ "%.*g", static_cast<int>(boost::detail::lcast_get_precision<float>()), val_as_double);
+ return finish > start;
+ }
+
+ bool shl_real_type(double val, char* begin) {
+ using namespace std;
+ finish = start +
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+ sprintf_s(begin, CharacterBufferSize,
+#else
+ sprintf(begin,
+#endif
+ "%.*g", static_cast<int>(boost::detail::lcast_get_precision<double>()), val);
+ return finish > start;
+ }
+
+#ifndef __MINGW32__
+ bool shl_real_type(long double val, char* begin) {
+ using namespace std;
+ finish = start +
+#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)
+ sprintf_s(begin, CharacterBufferSize,
+#else
+ sprintf(begin,
+#endif
+ "%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double>()), val );
+ return finish > start;
+ }
+#endif
+
+
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_SWPRINTF) && !defined(__MINGW32__)
+ bool shl_real_type(float val, wchar_t* begin) {
+ using namespace std;
+ const double val_as_double = val;
+ finish = start + swprintf(begin, CharacterBufferSize,
+ L"%.*g",
+ static_cast<int>(boost::detail::lcast_get_precision<float >()),
+ val_as_double );
+ return finish > start;
+ }
+
+ bool shl_real_type(double val, wchar_t* begin) {
+ using namespace std;
+ finish = start + swprintf(begin, CharacterBufferSize,
+ L"%.*g", static_cast<int>(boost::detail::lcast_get_precision<double >()), val );
+ return finish > start;
+ }
+
+ bool shl_real_type(long double val, wchar_t* begin) {
+ using namespace std;
+ finish = start + swprintf(begin, CharacterBufferSize,
+ L"%.*Lg", static_cast<int>(boost::detail::lcast_get_precision<long double >()), val );
+ return finish > start;
+ }
+#endif
+ template <class T>
+ bool shl_real(T val) {
+ CharT* tmp_finish = buffer + CharacterBufferSize;
+ if (put_inf_nan(buffer, tmp_finish, val)) {
+ finish = tmp_finish;
+ return true;
+ }
+
+ return shl_real_type(val, static_cast<CharT*>(buffer));
+ }
+
+/************************************ OPERATORS << ( ... ) ********************************/
+ public:
+ template<class Alloc>
+ bool operator<<(std::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT {
+ start = str.data();
+ finish = start + str.length();
+ return true;
+ }
+
+ template<class Alloc>
+ bool operator<<(boost::container::basic_string<CharT,Traits,Alloc> const& str) BOOST_NOEXCEPT {
+ start = str.data();
+ finish = start + str.length();
+ return true;
+ }
+
+ bool operator<<(bool value) BOOST_NOEXCEPT {
+ CharT const czero = lcast_char_constants<CharT>::zero;
+ Traits::assign(buffer[0], Traits::to_char_type(czero + value));
+ finish = start + 1;
+ return true;
+ }
+
+ template <class C>
+ BOOST_DEDUCED_TYPENAME boost::disable_if<boost::is_const<C>, bool>::type
+ operator<<(const iterator_range<C*>& rng) BOOST_NOEXCEPT {
+ return (*this) << iterator_range<const C*>(rng.begin(), rng.end());
+ }
+
+ bool operator<<(const iterator_range<const CharT*>& rng) BOOST_NOEXCEPT {
+ start = rng.begin();
+ finish = rng.end();
+ return true;
+ }
+
+ bool operator<<(const iterator_range<const signed char*>& rng) BOOST_NOEXCEPT {
+ return (*this) << iterator_range<const char*>(
+ reinterpret_cast<const char*>(rng.begin()),
+ reinterpret_cast<const char*>(rng.end())
+ );
+ }
+
+ bool operator<<(const iterator_range<const unsigned char*>& rng) BOOST_NOEXCEPT {
+ return (*this) << iterator_range<const char*>(
+ reinterpret_cast<const char*>(rng.begin()),
+ reinterpret_cast<const char*>(rng.end())
+ );
+ }
+
+ bool operator<<(char ch) { return shl_char(ch); }
+ bool operator<<(unsigned char ch) { return ((*this) << static_cast<char>(ch)); }
+ bool operator<<(signed char ch) { return ((*this) << static_cast<char>(ch)); }
+#if !defined(BOOST_LCAST_NO_WCHAR_T)
+ bool operator<<(wchar_t const* str) { return shl_char_array(str); }
+ bool operator<<(wchar_t * str) { return shl_char_array(str); }
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+ bool operator<<(wchar_t ch) { return shl_char(ch); }
+#endif
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ bool operator<<(char16_t ch) { return shl_char(ch); }
+ bool operator<<(char16_t * str) { return shl_char_array(str); }
+ bool operator<<(char16_t const * str) { return shl_char_array(str); }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ bool operator<<(char32_t ch) { return shl_char(ch); }
+ bool operator<<(char32_t * str) { return shl_char_array(str); }
+ bool operator<<(char32_t const * str) { return shl_char_array(str); }
+#endif
+ bool operator<<(unsigned char const* ch) { return ((*this) << reinterpret_cast<char const*>(ch)); }
+ bool operator<<(unsigned char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); }
+ bool operator<<(signed char const* ch) { return ((*this) << reinterpret_cast<char const*>(ch)); }
+ bool operator<<(signed char * ch) { return ((*this) << reinterpret_cast<char *>(ch)); }
+ bool operator<<(char const* str_value) { return shl_char_array(str_value); }
+ bool operator<<(char* str_value) { return shl_char_array(str_value); }
+ bool operator<<(short n) { return shl_signed(n); }
+ bool operator<<(int n) { return shl_signed(n); }
+ bool operator<<(long n) { return shl_signed(n); }
+ bool operator<<(unsigned short n) { return shl_unsigned(n); }
+ bool operator<<(unsigned int n) { return shl_unsigned(n); }
+ bool operator<<(unsigned long n) { return shl_unsigned(n); }
+
+#if defined(BOOST_HAS_LONG_LONG)
+ bool operator<<(boost::ulong_long_type n) { return shl_unsigned(n); }
+ bool operator<<(boost::long_long_type n) { return shl_signed(n); }
+#elif defined(BOOST_HAS_MS_INT64)
+ bool operator<<(unsigned __int64 n) { return shl_unsigned(n); }
+ bool operator<<( __int64 n) { return shl_signed(n); }
+#endif
+
+#ifdef BOOST_HAS_INT128
+ bool operator<<(const boost::uint128_type& n) { return shl_unsigned(n); }
+ bool operator<<(const boost::int128_type& n) { return shl_signed(n); }
+#endif
+ bool operator<<(float val) { return shl_real(val); }
+ bool operator<<(double val) { return shl_real(val); }
+ bool operator<<(long double val) {
+#ifndef __MINGW32__
+ return shl_real(val);
+#else
+ return shl_real(static_cast<double>(val));
+#endif
+ }
+
+ // Adding constness to characters. Constness does not change layout
+ template <class C, std::size_t N>
+ BOOST_DEDUCED_TYPENAME boost::disable_if<boost::is_const<C>, bool>::type
+ operator<<(boost::array<C, N> const& input) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG(
+ (sizeof(boost::array<const C, N>) == sizeof(boost::array<C, N>)),
+ "boost::array<C, N> and boost::array<const C, N> must have exactly the same layout."
+ );
+ return ((*this) << reinterpret_cast<boost::array<const C, N> const& >(input));
+ }
+
+ template <std::size_t N>
+ bool operator<<(boost::array<const CharT, N> const& input) BOOST_NOEXCEPT {
+ return shl_char_array_limited(input.data(), N);
+ }
+
+ template <std::size_t N>
+ bool operator<<(boost::array<const unsigned char, N> const& input) BOOST_NOEXCEPT {
+ return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input));
+ }
+
+ template <std::size_t N>
+ bool operator<<(boost::array<const signed char, N> const& input) BOOST_NOEXCEPT {
+ return ((*this) << reinterpret_cast<boost::array<const char, N> const& >(input));
+ }
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+ // Making a Boost.Array from std::array
+ template <class C, std::size_t N>
+ bool operator<<(std::array<C, N> const& input) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG(
+ (sizeof(std::array<C, N>) == sizeof(boost::array<C, N>)),
+ "std::array and boost::array must have exactly the same layout. "
+ "Bug in implementation of std::array or boost::array."
+ );
+ return ((*this) << reinterpret_cast<boost::array<C, N> const& >(input));
+ }
+#endif
+ template <class InStreamable>
+ bool operator<<(const InStreamable& input) { return shl_input_streamable(input); }
+ };
+
+
+ template <class CharT, class Traits>
+ class lexical_ostream_limited_src: boost::noncopyable {
+ //`[start, finish)` is the range to output by `operator >>`
+ const CharT* start;
+ const CharT* const finish;
+
+ public:
+ lexical_ostream_limited_src(const CharT* begin, const CharT* end) BOOST_NOEXCEPT
+ : start(begin)
+ , finish(end)
+ {}
+
+/************************************ HELPER FUNCTIONS FOR OPERATORS >> ( ... ) ********************************/
+ private:
+ template <typename Type>
+ bool shr_unsigned(Type& output) {
+ if (start == finish) return false;
+ CharT const minus = lcast_char_constants<CharT>::minus;
+ CharT const plus = lcast_char_constants<CharT>::plus;
+ bool const has_minus = Traits::eq(minus, *start);
+
+ /* We won`t use `start' any more, so no need in decrementing it after */
+ if (has_minus || Traits::eq(plus, *start)) {
+ ++start;
+ }
+
+ bool const succeed = lcast_ret_unsigned<Traits, Type, CharT>(output, start, finish).convert();
+
+ if (has_minus) {
+ output = static_cast<Type>(0u - output);
+ }
+
+ return succeed;
+ }
+
+ template <typename Type>
+ bool shr_signed(Type& output) {
+ if (start == finish) return false;
+ CharT const minus = lcast_char_constants<CharT>::minus;
+ CharT const plus = lcast_char_constants<CharT>::plus;
+ typedef BOOST_DEDUCED_TYPENAME make_unsigned<Type>::type utype;
+ utype out_tmp = 0;
+ bool const has_minus = Traits::eq(minus, *start);
+
+ /* We won`t use `start' any more, so no need in decrementing it after */
+ if (has_minus || Traits::eq(plus, *start)) {
+ ++start;
+ }
+
+ bool succeed = lcast_ret_unsigned<Traits, utype, CharT>(out_tmp, start, finish).convert();
+ if (has_minus) {
+ utype const comp_val = (static_cast<utype>(1) << std::numeric_limits<Type>::digits);
+ succeed = succeed && out_tmp<=comp_val;
+ output = static_cast<Type>(0u - out_tmp);
+ } else {
+ utype const comp_val = static_cast<utype>((std::numeric_limits<Type>::max)());
+ succeed = succeed && out_tmp<=comp_val;
+ output = static_cast<Type>(out_tmp);
+ }
+ return succeed;
+ }
+
+ template<typename InputStreamable>
+ bool shr_using_base_class(InputStreamable& output)
+ {
+ BOOST_STATIC_ASSERT_MSG(
+ (!boost::is_pointer<InputStreamable>::value),
+ "boost::lexical_cast can not convert to pointers"
+ );
+
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_LOCALE)
+ BOOST_STATIC_ASSERT_MSG((boost::is_same<char, CharT>::value),
+ "boost::lexical_cast can not convert, because your STL library does not "
+ "support such conversions. Try updating it."
+ );
+#endif
+
+#if defined(BOOST_NO_STRINGSTREAM)
+ std::istrstream stream(start, static_cast<std::istrstream::streamsize>(finish - start));
+#else
+ typedef BOOST_DEDUCED_TYPENAME out_stream_helper_trait<CharT, Traits>::buffer_t buffer_t;
+ buffer_t buf;
+ // Usually `istream` and `basic_istream` do not modify
+ // content of buffer; `buffer_t` assures that this is true
+ buf.setbuf(const_cast<CharT*>(start), static_cast<typename buffer_t::streamsize>(finish - start));
+#if defined(BOOST_NO_STD_LOCALE)
+ std::istream stream(&buf);
+#else
+ std::basic_istream<CharT, Traits> stream(&buf);
+#endif // BOOST_NO_STD_LOCALE
+#endif // BOOST_NO_STRINGSTREAM
+
+#ifndef BOOST_NO_EXCEPTIONS
+ stream.exceptions(std::ios::badbit);
+ try {
+#endif
+ stream.unsetf(std::ios::skipws);
+ lcast_set_precision(stream, static_cast<InputStreamable*>(0));
+
+ return (stream >> output)
+ && (stream.get() == Traits::eof());
+
+#ifndef BOOST_NO_EXCEPTIONS
+ } catch (const ::std::ios_base::failure& /*f*/) {
+ return false;
+ }
+#endif
+ }
+
+ template<class T>
+ inline bool shr_xchar(T& output) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG(( sizeof(CharT) == sizeof(T) ),
+ "boost::lexical_cast does not support narrowing of character types."
+ "Use boost::locale instead" );
+ bool const ok = (finish - start == 1);
+ if (ok) {
+ CharT out;
+ Traits::assign(out, *start);
+ output = static_cast<T>(out);
+ }
+ return ok;
+ }
+
+ template <std::size_t N, class ArrayT>
+ bool shr_std_array(ArrayT& output) BOOST_NOEXCEPT {
+ using namespace std;
+ const std::size_t size = static_cast<std::size_t>(finish - start);
+ if (size > N - 1) { // `-1` because we need to store \0 at the end
+ return false;
+ }
+
+ memcpy(&output[0], start, size * sizeof(CharT));
+ output[size] = Traits::to_char_type(0);
+ return true;
+ }
+
+/************************************ OPERATORS >> ( ... ) ********************************/
+ public:
+ bool operator>>(unsigned short& output) { return shr_unsigned(output); }
+ bool operator>>(unsigned int& output) { return shr_unsigned(output); }
+ bool operator>>(unsigned long int& output) { return shr_unsigned(output); }
+ bool operator>>(short& output) { return shr_signed(output); }
+ bool operator>>(int& output) { return shr_signed(output); }
+ bool operator>>(long int& output) { return shr_signed(output); }
+#if defined(BOOST_HAS_LONG_LONG)
+ bool operator>>(boost::ulong_long_type& output) { return shr_unsigned(output); }
+ bool operator>>(boost::long_long_type& output) { return shr_signed(output); }
+#elif defined(BOOST_HAS_MS_INT64)
+ bool operator>>(unsigned __int64& output) { return shr_unsigned(output); }
+ bool operator>>(__int64& output) { return shr_signed(output); }
+#endif
+
+#ifdef BOOST_HAS_INT128
+ bool operator>>(boost::uint128_type& output) { return shr_unsigned(output); }
+ bool operator>>(boost::int128_type& output) { return shr_signed(output); }
+#endif
+
+ bool operator>>(char& output) { return shr_xchar(output); }
+ bool operator>>(unsigned char& output) { return shr_xchar(output); }
+ bool operator>>(signed char& output) { return shr_xchar(output); }
+#if !defined(BOOST_LCAST_NO_WCHAR_T) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+ bool operator>>(wchar_t& output) { return shr_xchar(output); }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ bool operator>>(char16_t& output) { return shr_xchar(output); }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ bool operator>>(char32_t& output) { return shr_xchar(output); }
+#endif
+ template<class Alloc>
+ bool operator>>(std::basic_string<CharT,Traits,Alloc>& str) {
+ str.assign(start, finish); return true;
+ }
+
+ template<class Alloc>
+ bool operator>>(boost::container::basic_string<CharT,Traits,Alloc>& str) {
+ str.assign(start, finish); return true;
+ }
+
+ template <std::size_t N>
+ bool operator>>(boost::array<CharT, N>& output) BOOST_NOEXCEPT {
+ return shr_std_array<N>(output);
+ }
+
+ template <std::size_t N>
+ bool operator>>(boost::array<unsigned char, N>& output) BOOST_NOEXCEPT {
+ return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output));
+ }
+
+ template <std::size_t N>
+ bool operator>>(boost::array<signed char, N>& output) BOOST_NOEXCEPT {
+ return ((*this) >> reinterpret_cast<boost::array<char, N>& >(output));
+ }
+
+#ifndef BOOST_NO_CXX11_HDR_ARRAY
+ template <class C, std::size_t N>
+ bool operator>>(std::array<C, N>& output) BOOST_NOEXCEPT {
+ BOOST_STATIC_ASSERT_MSG(
+ (sizeof(std::array<C, N>) == sizeof(boost::array<C, N>)),
+ "std::array<C, N> and boost::array<C, N> must have exactly the same layout."
+ );
+ return ((*this) >> reinterpret_cast<boost::array<C, N>& >(output));
+ }
+#endif
+
+ bool operator>>(bool& output) BOOST_NOEXCEPT {
+ output = false; // Suppress warning about uninitalized variable
+
+ if (start == finish) return false;
+ CharT const zero = lcast_char_constants<CharT>::zero;
+ CharT const plus = lcast_char_constants<CharT>::plus;
+ CharT const minus = lcast_char_constants<CharT>::minus;
+
+ const CharT* const dec_finish = finish - 1;
+ output = Traits::eq(*dec_finish, zero + 1);
+ if (!output && !Traits::eq(*dec_finish, zero)) {
+ return false; // Does not ends on '0' or '1'
+ }
+
+ if (start == dec_finish) return true;
+
+ // We may have sign at the beginning
+ if (Traits::eq(plus, *start) || (Traits::eq(minus, *start) && !output)) {
+ ++ start;
+ }
+
+ // Skipping zeros
+ while (start != dec_finish) {
+ if (!Traits::eq(zero, *start)) {
+ return false; // Not a zero => error
+ }
+
+ ++ start;
+ }
+
+ return true;
+ }
+
+ private:
+ // Not optimised converter
+ template <class T>
+ bool float_types_converter_internal(T& output) {
+ if (parse_inf_nan(start, finish, output)) return true;
+ bool const return_value = shr_using_base_class(output);
+
+ /* Some compilers and libraries successfully
+ * parse 'inf', 'INFINITY', '1.0E', '1.0E-'...
+ * We are trying to provide a unified behaviour,
+ * so we just forbid such conversions (as some
+ * of the most popular compilers/libraries do)
+ * */
+ CharT const minus = lcast_char_constants<CharT>::minus;
+ CharT const plus = lcast_char_constants<CharT>::plus;
+ CharT const capital_e = lcast_char_constants<CharT>::capital_e;
+ CharT const lowercase_e = lcast_char_constants<CharT>::lowercase_e;
+ if ( return_value &&
+ (
+ Traits::eq(*(finish-1), lowercase_e) // 1.0e
+ || Traits::eq(*(finish-1), capital_e) // 1.0E
+ || Traits::eq(*(finish-1), minus) // 1.0e- or 1.0E-
+ || Traits::eq(*(finish-1), plus) // 1.0e+ or 1.0E+
+ )
+ ) return false;
+
+ return return_value;
+ }
+
+ public:
+ bool operator>>(float& output) { return float_types_converter_internal(output); }
+ bool operator>>(double& output) { return float_types_converter_internal(output); }
+ bool operator>>(long double& output) { return float_types_converter_internal(output); }
+
+ // Generic istream-based algorithm.
+ // lcast_streambuf_for_target<InputStreamable>::value is true.
+ template <typename InputStreamable>
+ bool operator>>(InputStreamable& output) {
+ return shr_using_base_class(output);
+ }
+ };
+ }
+} // namespace boost
+
+#undef BOOST_LCAST_NO_WCHAR_T
+
+#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_LEXICAL_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_numeric.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_numeric.hpp
new file mode 100644
index 00000000000..d153e907138
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/converter_numeric.hpp
@@ -0,0 +1,172 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2016
+
+#ifndef BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP
+#define BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <boost/limits.hpp>
+#include <boost/type_traits/type_identity.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_float.hpp>
+
+#include <boost/numeric/conversion/cast.hpp>
+
+namespace boost { namespace detail {
+
+template <class Source >
+struct detect_precision_loss
+{
+ typedef Source source_type;
+ typedef boost::numeric::Trunc<Source> Rounder;
+ typedef BOOST_DEDUCED_TYPENAME conditional<
+ boost::is_arithmetic<Source>::value, Source, Source const&
+ >::type argument_type ;
+
+ static inline source_type nearbyint(argument_type s, bool& is_ok) BOOST_NOEXCEPT {
+ const source_type near_int = Rounder::nearbyint(s);
+ if (near_int && is_ok) {
+ const source_type orig_div_round = s / near_int;
+ const source_type eps = std::numeric_limits<source_type>::epsilon();
+
+ is_ok = !((orig_div_round > 1 ? orig_div_round - 1 : 1 - orig_div_round) > eps);
+ }
+
+ return s;
+ }
+
+ typedef typename Rounder::round_style round_style;
+};
+
+template <typename Base, class Source>
+struct fake_precision_loss: public Base
+{
+ typedef Source source_type ;
+ typedef BOOST_DEDUCED_TYPENAME conditional<
+ boost::is_arithmetic<Source>::value, Source, Source const&
+ >::type argument_type ;
+
+ static inline source_type nearbyint(argument_type s, bool& /*is_ok*/) BOOST_NOEXCEPT {
+ return s;
+ }
+};
+
+struct nothrow_overflow_handler
+{
+ inline bool operator() ( boost::numeric::range_check_result r ) const BOOST_NOEXCEPT {
+ return (r == boost::numeric::cInRange);
+ }
+};
+
+template <typename Target, typename Source>
+inline bool noexcept_numeric_convert(const Source& arg, Target& result) BOOST_NOEXCEPT {
+ typedef boost::numeric::converter<
+ Target,
+ Source,
+ boost::numeric::conversion_traits<Target, Source >,
+ nothrow_overflow_handler,
+ detect_precision_loss<Source >
+ > converter_orig_t;
+
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::is_base_of< detect_precision_loss<Source >, converter_orig_t >::value,
+ converter_orig_t,
+ fake_precision_loss<converter_orig_t, Source>
+ >::type converter_t;
+
+ bool res = nothrow_overflow_handler()(converter_t::out_of_range(arg));
+ result = converter_t::low_level_convert(converter_t::nearbyint(arg, res));
+ return res;
+}
+
+template <typename Target, typename Source>
+struct lexical_cast_dynamic_num_not_ignoring_minus
+{
+ static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT {
+ return noexcept_numeric_convert<Target, Source >(arg, result);
+ }
+};
+
+template <typename Target, typename Source>
+struct lexical_cast_dynamic_num_ignoring_minus
+{
+ static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT {
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::is_float<Source>::value,
+ boost::type_identity<Source>,
+ boost::make_unsigned<Source>
+ >::type usource_lazy_t;
+ typedef BOOST_DEDUCED_TYPENAME usource_lazy_t::type usource_t;
+
+ if (arg < 0) {
+ const bool res = noexcept_numeric_convert<Target, usource_t>(0u - arg, result);
+ result = static_cast<Target>(0u - result);
+ return res;
+ } else {
+ return noexcept_numeric_convert<Target, usource_t>(arg, result);
+ }
+ }
+};
+
+/*
+ * lexical_cast_dynamic_num follows the rules:
+ * 1) If Source can be converted to Target without precision loss and
+ * without overflows, then assign Source to Target and return
+ *
+ * 2) If Source is less than 0 and Target is an unsigned integer,
+ * then negate Source, check the requirements of rule 1) and if
+ * successful, assign static_casted Source to Target and return
+ *
+ * 3) Otherwise throw a bad_lexical_cast exception
+ *
+ *
+ * Rule 2) required because boost::lexical_cast has the behavior of
+ * stringstream, which uses the rules of scanf for conversions. And
+ * in the C99 standard for unsigned input value minus sign is
+ * optional, so if a negative number is read, no errors will arise
+ * and the result will be the two's complement.
+ */
+template <typename Target, typename Source>
+struct dynamic_num_converter_impl
+{
+ static inline bool try_convert(const Source &arg, Target& result) BOOST_NOEXCEPT {
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::is_unsigned<Target>::value &&
+ (boost::is_signed<Source>::value || boost::is_float<Source>::value) &&
+ !(boost::is_same<Source, bool>::value) &&
+ !(boost::is_same<Target, bool>::value),
+ lexical_cast_dynamic_num_ignoring_minus<Target, Source>,
+ lexical_cast_dynamic_num_not_ignoring_minus<Target, Source>
+ >::type caster_type;
+
+ return caster_type::try_convert(arg, result);
+ }
+};
+
+}} // namespace boost::detail
+
+#endif // BOOST_LEXICAL_CAST_DETAIL_CONVERTER_NUMERIC_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/inf_nan.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/inf_nan.hpp
new file mode 100644
index 00000000000..2861a369e8c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/inf_nan.hpp
@@ -0,0 +1,197 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP
+#define BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined(BOOST_NO_STRINGSTREAM) || defined(BOOST_NO_STD_WSTRING)
+#define BOOST_LCAST_NO_WCHAR_T
+#endif
+
+#include <cstddef>
+#include <cstring>
+#include <boost/limits.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+
+#include <boost/lexical_cast/detail/lcast_char_constants.hpp>
+
+namespace boost {
+ namespace detail
+ {
+ template <class CharT>
+ bool lc_iequal(const CharT* val, const CharT* lcase, const CharT* ucase, unsigned int len) BOOST_NOEXCEPT {
+ for( unsigned int i=0; i < len; ++i ) {
+ if ( val[i] != lcase[i] && val[i] != ucase[i] ) return false;
+ }
+
+ return true;
+ }
+
+ /* Returns true and sets the correct value if found NaN or Inf. */
+ template <class CharT, class T>
+ inline bool parse_inf_nan_impl(const CharT* begin, const CharT* end, T& value
+ , const CharT* lc_NAN, const CharT* lc_nan
+ , const CharT* lc_INFINITY, const CharT* lc_infinity
+ , const CharT opening_brace, const CharT closing_brace) BOOST_NOEXCEPT
+ {
+ using namespace std;
+ if (begin == end) return false;
+ const CharT minus = lcast_char_constants<CharT>::minus;
+ const CharT plus = lcast_char_constants<CharT>::plus;
+ const int inifinity_size = 8; // == sizeof("infinity") - 1
+
+ /* Parsing +/- */
+ bool const has_minus = (*begin == minus);
+ if (has_minus || *begin == plus) {
+ ++ begin;
+ }
+
+ if (end - begin < 3) return false;
+ if (lc_iequal(begin, lc_nan, lc_NAN, 3)) {
+ begin += 3;
+ if (end != begin) {
+ /* It is 'nan(...)' or some bad input*/
+
+ if (end - begin < 2) return false; // bad input
+ -- end;
+ if (*begin != opening_brace || *end != closing_brace) return false; // bad input
+ }
+
+ if( !has_minus ) value = std::numeric_limits<T>::quiet_NaN();
+ else value = (boost::math::changesign) (std::numeric_limits<T>::quiet_NaN());
+ return true;
+ } else if (
+ ( /* 'INF' or 'inf' */
+ end - begin == 3 // 3 == sizeof('inf') - 1
+ && lc_iequal(begin, lc_infinity, lc_INFINITY, 3)
+ )
+ ||
+ ( /* 'INFINITY' or 'infinity' */
+ end - begin == inifinity_size
+ && lc_iequal(begin, lc_infinity, lc_INFINITY, inifinity_size)
+ )
+ )
+ {
+ if( !has_minus ) value = std::numeric_limits<T>::infinity();
+ else value = (boost::math::changesign) (std::numeric_limits<T>::infinity());
+ return true;
+ }
+
+ return false;
+ }
+
+ template <class CharT, class T>
+ bool put_inf_nan_impl(CharT* begin, CharT*& end, const T& value
+ , const CharT* lc_nan
+ , const CharT* lc_infinity) BOOST_NOEXCEPT
+ {
+ using namespace std;
+ const CharT minus = lcast_char_constants<CharT>::minus;
+ if ((boost::math::isnan)(value)) {
+ if ((boost::math::signbit)(value)) {
+ *begin = minus;
+ ++ begin;
+ }
+
+ memcpy(begin, lc_nan, 3 * sizeof(CharT));
+ end = begin + 3;
+ return true;
+ } else if ((boost::math::isinf)(value)) {
+ if ((boost::math::signbit)(value)) {
+ *begin = minus;
+ ++ begin;
+ }
+
+ memcpy(begin, lc_infinity, 3 * sizeof(CharT));
+ end = begin + 3;
+ return true;
+ }
+
+ return false;
+ }
+
+
+#ifndef BOOST_LCAST_NO_WCHAR_T
+ template <class T>
+ bool parse_inf_nan(const wchar_t* begin, const wchar_t* end, T& value) BOOST_NOEXCEPT {
+ return parse_inf_nan_impl(begin, end, value
+ , L"NAN", L"nan"
+ , L"INFINITY", L"infinity"
+ , L'(', L')');
+ }
+
+ template <class T>
+ bool put_inf_nan(wchar_t* begin, wchar_t*& end, const T& value) BOOST_NOEXCEPT {
+ return put_inf_nan_impl(begin, end, value, L"nan", L"infinity");
+ }
+
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR16_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ template <class T>
+ bool parse_inf_nan(const char16_t* begin, const char16_t* end, T& value) BOOST_NOEXCEPT {
+ return parse_inf_nan_impl(begin, end, value
+ , u"NAN", u"nan"
+ , u"INFINITY", u"infinity"
+ , u'(', u')');
+ }
+
+ template <class T>
+ bool put_inf_nan(char16_t* begin, char16_t*& end, const T& value) BOOST_NOEXCEPT {
+ return put_inf_nan_impl(begin, end, value, u"nan", u"infinity");
+ }
+#endif
+#if !defined(BOOST_NO_CXX11_CHAR32_T) && !defined(BOOST_NO_CXX11_UNICODE_LITERALS)
+ template <class T>
+ bool parse_inf_nan(const char32_t* begin, const char32_t* end, T& value) BOOST_NOEXCEPT {
+ return parse_inf_nan_impl(begin, end, value
+ , U"NAN", U"nan"
+ , U"INFINITY", U"infinity"
+ , U'(', U')');
+ }
+
+ template <class T>
+ bool put_inf_nan(char32_t* begin, char32_t*& end, const T& value) BOOST_NOEXCEPT {
+ return put_inf_nan_impl(begin, end, value, U"nan", U"infinity");
+ }
+#endif
+
+ template <class CharT, class T>
+ bool parse_inf_nan(const CharT* begin, const CharT* end, T& value) BOOST_NOEXCEPT {
+ return parse_inf_nan_impl(begin, end, value
+ , "NAN", "nan"
+ , "INFINITY", "infinity"
+ , '(', ')');
+ }
+
+ template <class CharT, class T>
+ bool put_inf_nan(CharT* begin, CharT*& end, const T& value) BOOST_NOEXCEPT {
+ return put_inf_nan_impl(begin, end, value, "nan", "infinity");
+ }
+ }
+} // namespace boost
+
+#undef BOOST_LCAST_NO_WCHAR_T
+
+#endif // BOOST_LEXICAL_CAST_DETAIL_INF_NAN_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/is_character.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/is_character.hpp
new file mode 100644
index 00000000000..379f88293f7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/is_character.hpp
@@ -0,0 +1,59 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
+#define BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost {
+
+ namespace detail // is_character<...>
+ {
+ // returns true, if T is one of the character types
+ template < typename T >
+ struct is_character
+ {
+ typedef BOOST_DEDUCED_TYPENAME boost::integral_constant<
+ bool,
+ boost::is_same< T, char >::value ||
+ #if !defined(BOOST_NO_STRINGSTREAM) && !defined(BOOST_NO_STD_WSTRING)
+ boost::is_same< T, wchar_t >::value ||
+ #endif
+ #ifndef BOOST_NO_CXX11_CHAR16_T
+ boost::is_same< T, char16_t >::value ||
+ #endif
+ #ifndef BOOST_NO_CXX11_CHAR32_T
+ boost::is_same< T, char32_t >::value ||
+ #endif
+ boost::is_same< T, unsigned char >::value ||
+ boost::is_same< T, signed char >::value
+ > type;
+
+ BOOST_STATIC_CONSTANT(bool, value = (type::value) );
+ };
+ }
+}
+
+#endif // BOOST_LEXICAL_CAST_DETAIL_IS_CHARACTER_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/lcast_char_constants.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/lcast_char_constants.hpp
new file mode 100644
index 00000000000..883e82c45ca
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/lcast_char_constants.hpp
@@ -0,0 +1,46 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP
+#define BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost
+{
+ namespace detail // '0', '-', '+', 'e', 'E' and '.' constants
+ {
+ template < typename Char >
+ struct lcast_char_constants {
+ // We check in tests assumption that static casted character is
+ // equal to correctly written C++ literal: U'0' == static_cast<char32_t>('0')
+ BOOST_STATIC_CONSTANT(Char, zero = static_cast<Char>('0'));
+ BOOST_STATIC_CONSTANT(Char, minus = static_cast<Char>('-'));
+ BOOST_STATIC_CONSTANT(Char, plus = static_cast<Char>('+'));
+ BOOST_STATIC_CONSTANT(Char, lowercase_e = static_cast<Char>('e'));
+ BOOST_STATIC_CONSTANT(Char, capital_e = static_cast<Char>('E'));
+ BOOST_STATIC_CONSTANT(Char, c_decimal_separator = static_cast<Char>('.'));
+ };
+ }
+} // namespace boost
+
+
+#endif // BOOST_LEXICAL_CAST_DETAIL_LCAST_CHAR_CONSTANTS_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp
new file mode 100644
index 00000000000..4c5f3262e91
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/lcast_unsigned_converters.hpp
@@ -0,0 +1,294 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP
+#define BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#include <climits>
+#include <cstddef>
+#include <string>
+#include <cstring>
+#include <cstdio>
+#include <boost/limits.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/detail/workaround.hpp>
+
+
+#ifndef BOOST_NO_STD_LOCALE
+# include <locale>
+#else
+# ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+ // Getting error at this point means, that your STL library is old/lame/misconfigured.
+ // If nothing can be done with STL library, define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE,
+ // but beware: lexical_cast will understand only 'C' locale delimeters and thousands
+ // separators.
+# error "Unable to use <locale> header. Define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE to force "
+# error "boost::lexical_cast to use only 'C' locale during conversions."
+# endif
+#endif
+
+#include <boost/lexical_cast/detail/lcast_char_constants.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/noncopyable.hpp>
+
+namespace boost
+{
+ namespace detail // lcast_to_unsigned
+ {
+ template<class T>
+ inline
+ BOOST_DEDUCED_TYPENAME boost::make_unsigned<T>::type lcast_to_unsigned(const T value) BOOST_NOEXCEPT {
+ typedef BOOST_DEDUCED_TYPENAME boost::make_unsigned<T>::type result_type;
+ return value < 0
+ ? static_cast<result_type>(0u - static_cast<result_type>(value))
+ : static_cast<result_type>(value);
+ }
+ }
+
+ namespace detail // lcast_put_unsigned
+ {
+ template <class Traits, class T, class CharT>
+ class lcast_put_unsigned: boost::noncopyable {
+ typedef BOOST_DEDUCED_TYPENAME Traits::int_type int_type;
+ BOOST_DEDUCED_TYPENAME boost::conditional<
+ (sizeof(unsigned) > sizeof(T))
+ , unsigned
+ , T
+ >::type m_value;
+ CharT* m_finish;
+ CharT const m_czero;
+ int_type const m_zero;
+
+ public:
+ lcast_put_unsigned(const T n_param, CharT* finish) BOOST_NOEXCEPT
+ : m_value(n_param), m_finish(finish)
+ , m_czero(lcast_char_constants<CharT>::zero), m_zero(Traits::to_int_type(m_czero))
+ {
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
+#endif
+ }
+
+ CharT* convert() {
+#ifndef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+ std::locale loc;
+ if (loc == std::locale::classic()) {
+ return main_convert_loop();
+ }
+
+ typedef std::numpunct<CharT> numpunct;
+ numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+ std::string const grouping = np.grouping();
+ std::string::size_type const grouping_size = grouping.size();
+
+ if (!grouping_size || grouping[0] <= 0) {
+ return main_convert_loop();
+ }
+
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ // Check that ulimited group is unreachable:
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::digits10 < CHAR_MAX);
+#endif
+ CharT const thousands_sep = np.thousands_sep();
+ std::string::size_type group = 0; // current group number
+ char last_grp_size = grouping[0];
+ char left = last_grp_size;
+
+ do {
+ if (left == 0) {
+ ++group;
+ if (group < grouping_size) {
+ char const grp_size = grouping[group];
+ last_grp_size = (grp_size <= 0 ? static_cast<char>(CHAR_MAX) : grp_size);
+ }
+
+ left = last_grp_size;
+ --m_finish;
+ Traits::assign(*m_finish, thousands_sep);
+ }
+
+ --left;
+ } while (main_convert_iteration());
+
+ return m_finish;
+#else
+ return main_convert_loop();
+#endif
+ }
+
+ private:
+ inline bool main_convert_iteration() BOOST_NOEXCEPT {
+ --m_finish;
+ int_type const digit = static_cast<int_type>(m_value % 10U);
+ Traits::assign(*m_finish, Traits::to_char_type(m_zero + digit));
+ m_value /= 10;
+ return !!m_value; // suppressing warnings
+ }
+
+ inline CharT* main_convert_loop() BOOST_NOEXCEPT {
+ while (main_convert_iteration());
+ return m_finish;
+ }
+ };
+ }
+
+ namespace detail // lcast_ret_unsigned
+ {
+ template <class Traits, class T, class CharT>
+ class lcast_ret_unsigned: boost::noncopyable {
+ bool m_multiplier_overflowed;
+ T m_multiplier;
+ T& m_value;
+ const CharT* const m_begin;
+ const CharT* m_end;
+
+ public:
+ lcast_ret_unsigned(T& value, const CharT* const begin, const CharT* end) BOOST_NOEXCEPT
+ : m_multiplier_overflowed(false), m_multiplier(1), m_value(value), m_begin(begin), m_end(end)
+ {
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT(!std::numeric_limits<T>::is_signed);
+
+ // GCC when used with flag -std=c++0x may not have std::numeric_limits
+ // specializations for __int128 and unsigned __int128 types.
+ // Try compilation with -std=gnu++0x or -std=gnu++11.
+ //
+ // http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40856
+ BOOST_STATIC_ASSERT_MSG(std::numeric_limits<T>::is_specialized,
+ "std::numeric_limits are not specialized for integral type passed to boost::lexical_cast"
+ );
+#endif
+ }
+
+ inline bool convert() {
+ CharT const czero = lcast_char_constants<CharT>::zero;
+ --m_end;
+ m_value = static_cast<T>(0);
+
+ if (m_begin > m_end || *m_end < czero || *m_end >= czero + 10)
+ return false;
+ m_value = static_cast<T>(*m_end - czero);
+ --m_end;
+
+#ifdef BOOST_LEXICAL_CAST_ASSUME_C_LOCALE
+ return main_convert_loop();
+#else
+ std::locale loc;
+ if (loc == std::locale::classic()) {
+ return main_convert_loop();
+ }
+
+ typedef std::numpunct<CharT> numpunct;
+ numpunct const& np = BOOST_USE_FACET(numpunct, loc);
+ std::string const& grouping = np.grouping();
+ std::string::size_type const grouping_size = grouping.size();
+
+ /* According to Programming languages - C++
+ * we MUST check for correct grouping
+ */
+ if (!grouping_size || grouping[0] <= 0) {
+ return main_convert_loop();
+ }
+
+ unsigned char current_grouping = 0;
+ CharT const thousands_sep = np.thousands_sep();
+ char remained = static_cast<char>(grouping[current_grouping] - 1);
+
+ for (;m_end >= m_begin; --m_end)
+ {
+ if (remained) {
+ if (!main_convert_iteration()) {
+ return false;
+ }
+ --remained;
+ } else {
+ if ( !Traits::eq(*m_end, thousands_sep) ) //|| begin == end ) return false;
+ {
+ /*
+ * According to Programming languages - C++
+ * Digit grouping is checked. That is, the positions of discarded
+ * separators is examined for consistency with
+ * use_facet<numpunct<charT> >(loc ).grouping()
+ *
+ * BUT what if there is no separators at all and grouping()
+ * is not empty? Well, we have no extraced separators, so we
+ * won`t check them for consistency. This will allow us to
+ * work with "C" locale from other locales
+ */
+ return main_convert_loop();
+ } else {
+ if (m_begin == m_end) return false;
+ if (current_grouping < grouping_size - 1) ++current_grouping;
+ remained = grouping[current_grouping];
+ }
+ }
+ } /*for*/
+
+ return true;
+#endif
+ }
+
+ private:
+ // Iteration that does not care about grouping/separators and assumes that all
+ // input characters are digits
+ inline bool main_convert_iteration() BOOST_NOEXCEPT {
+ CharT const czero = lcast_char_constants<CharT>::zero;
+ T const maxv = (std::numeric_limits<T>::max)();
+
+ m_multiplier_overflowed = m_multiplier_overflowed || (maxv/10 < m_multiplier);
+ m_multiplier = static_cast<T>(m_multiplier * 10);
+
+ T const dig_value = static_cast<T>(*m_end - czero);
+ T const new_sub_value = static_cast<T>(m_multiplier * dig_value);
+
+ // We must correctly handle situations like `000000000000000000000000000001`.
+ // So we take care of overflow only if `dig_value` is not '0'.
+ if (*m_end < czero || *m_end >= czero + 10 // checking for correct digit
+ || (dig_value && ( // checking for overflow of ...
+ m_multiplier_overflowed // ... multiplier
+ || static_cast<T>(maxv / dig_value) < m_multiplier // ... subvalue
+ || static_cast<T>(maxv - new_sub_value) < m_value // ... whole expression
+ ))
+ ) return false;
+
+ m_value = static_cast<T>(m_value + new_sub_value);
+
+ return true;
+ }
+
+ bool main_convert_loop() BOOST_NOEXCEPT {
+ for ( ; m_end >= m_begin; --m_end) {
+ if (!main_convert_iteration()) {
+ return false;
+ }
+ }
+
+ return true;
+ }
+ };
+ }
+} // namespace boost
+
+#endif // BOOST_LEXICAL_CAST_DETAIL_LCAST_UNSIGNED_CONVERTERS_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/detail/widest_char.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/widest_char.hpp
new file mode 100644
index 00000000000..c9dee10b6c4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/detail/widest_char.hpp
@@ -0,0 +1,43 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP
+#define BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+
+#include <boost/type_traits/conditional.hpp>
+
+namespace boost { namespace detail {
+
+ template <typename TargetChar, typename SourceChar>
+ struct widest_char {
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ (sizeof(TargetChar) > sizeof(SourceChar))
+ , TargetChar
+ , SourceChar
+ >::type type;
+ };
+
+}} // namespace boost::detail
+
+#endif // BOOST_LEXICAL_CAST_DETAIL_WIDEST_CHAR_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/lexical_cast/try_lexical_convert.hpp b/src/third_party/boost-1.69.0/boost/lexical_cast/try_lexical_convert.hpp
new file mode 100644
index 00000000000..187779d673d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/lexical_cast/try_lexical_convert.hpp
@@ -0,0 +1,232 @@
+// Copyright Kevlin Henney, 2000-2005.
+// Copyright Alexander Nasonov, 2006-2010.
+// Copyright Antony Polukhin, 2011-2018.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// what: lexical_cast custom keyword cast
+// who: contributed by Kevlin Henney,
+// enhanced with contributions from Terje Slettebo,
+// with additional fixes and suggestions from Gennaro Prota,
+// Beman Dawes, Dave Abrahams, Daryle Walker, Peter Dimov,
+// Alexander Nasonov, Antony Polukhin, Justin Viiret, Michael Hofmann,
+// Cheng Yang, Matthew Bradbury, David W. Birdsall, Pavel Korzh and other Boosters
+// when: November 2000, March 2003, June 2005, June 2006, March 2011 - 2014
+
+#ifndef BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP
+#define BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP
+
+#include <boost/config.hpp>
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+#if defined(__clang__) || (defined(__GNUC__) && \
+ !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wuninitialized"
+#pragma GCC diagnostic ignored "-Wsign-conversion"
+#endif
+
+
+#include <string>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/type_identity.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+
+#include <boost/lexical_cast/detail/is_character.hpp>
+#include <boost/lexical_cast/detail/converter_numeric.hpp>
+#include <boost/lexical_cast/detail/converter_lexical.hpp>
+
+#include <boost/range/iterator_range_core.hpp>
+#include <boost/container/container_fwd.hpp>
+
+namespace boost {
+ namespace detail
+ {
+ template<typename T>
+ struct is_stdstring
+ : boost::false_type
+ {};
+
+ template<typename CharT, typename Traits, typename Alloc>
+ struct is_stdstring< std::basic_string<CharT, Traits, Alloc> >
+ : boost::true_type
+ {};
+
+ // Sun Studio has problem with partial specialization of templates differing only in namespace.
+ // We workaround that by making `is_booststring` trait, instead of specializing `is_stdstring` for `boost::container::basic_string`.
+ template<typename T>
+ struct is_booststring
+ : boost::false_type
+ {};
+
+ template<typename CharT, typename Traits, typename Alloc>
+ struct is_booststring< boost::container::basic_string<CharT, Traits, Alloc> >
+ : boost::true_type
+ {};
+
+ template<typename Target, typename Source>
+ struct is_arithmetic_and_not_xchars
+ {
+ typedef boost::integral_constant<
+ bool,
+ !(boost::detail::is_character<Target>::value) &&
+ !(boost::detail::is_character<Source>::value) &&
+ boost::is_arithmetic<Source>::value &&
+ boost::is_arithmetic<Target>::value
+ > type;
+
+ BOOST_STATIC_CONSTANT(bool, value = (
+ type::value
+ ));
+ };
+
+ /*
+ * is_xchar_to_xchar<Target, Source>::value is true,
+ * Target and Souce are char types of the same size 1 (char, signed char, unsigned char).
+ */
+ template<typename Target, typename Source>
+ struct is_xchar_to_xchar
+ {
+ typedef boost::integral_constant<
+ bool,
+ sizeof(Source) == sizeof(Target) &&
+ sizeof(Source) == sizeof(char) &&
+ boost::detail::is_character<Target>::value &&
+ boost::detail::is_character<Source>::value
+ > type;
+
+ BOOST_STATIC_CONSTANT(bool, value = (
+ type::value
+ ));
+ };
+
+ template<typename Target, typename Source>
+ struct is_char_array_to_stdstring
+ : boost::false_type
+ {};
+
+ template<typename CharT, typename Traits, typename Alloc>
+ struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, CharT* >
+ : boost::true_type
+ {};
+
+ template<typename CharT, typename Traits, typename Alloc>
+ struct is_char_array_to_stdstring< std::basic_string<CharT, Traits, Alloc>, const CharT* >
+ : boost::true_type
+ {};
+
+ // Sun Studio has problem with partial specialization of templates differing only in namespace.
+ // We workaround that by making `is_char_array_to_booststring` trait, instead of specializing `is_char_array_to_stdstring` for `boost::container::basic_string`.
+ template<typename Target, typename Source>
+ struct is_char_array_to_booststring
+ : boost::false_type
+ {};
+
+ template<typename CharT, typename Traits, typename Alloc>
+ struct is_char_array_to_booststring< boost::container::basic_string<CharT, Traits, Alloc>, CharT* >
+ : boost::true_type
+ {};
+
+ template<typename CharT, typename Traits, typename Alloc>
+ struct is_char_array_to_booststring< boost::container::basic_string<CharT, Traits, Alloc>, const CharT* >
+ : boost::true_type
+ {};
+
+ template <typename Target, typename Source>
+ struct copy_converter_impl
+ {
+// MSVC fail to forward an array (DevDiv#555157 "SILENT BAD CODEGEN triggered by perfect forwarding",
+// fixed in 2013 RTM).
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && (!defined(BOOST_MSVC) || BOOST_MSVC >= 1800)
+ template <class T>
+ static inline bool try_convert(T&& arg, Target& result) {
+ result = static_cast<T&&>(arg); // eqaul to `result = std::forward<T>(arg);`
+ return true;
+ }
+#else
+ static inline bool try_convert(const Source& arg, Target& result) {
+ result = arg;
+ return true;
+ }
+#endif
+ };
+ }
+
+ namespace conversion { namespace detail {
+
+ template <typename Target, typename Source>
+ inline bool try_lexical_convert(const Source& arg, Target& result)
+ {
+ typedef BOOST_DEDUCED_TYPENAME boost::detail::array_to_pointer_decay<Source>::type src;
+
+ typedef boost::integral_constant<
+ bool,
+ boost::detail::is_xchar_to_xchar<Target, src >::value ||
+ boost::detail::is_char_array_to_stdstring<Target, src >::value ||
+ boost::detail::is_char_array_to_booststring<Target, src >::value ||
+ (
+ boost::is_same<Target, src >::value &&
+ (boost::detail::is_stdstring<Target >::value || boost::detail::is_booststring<Target >::value)
+ ) ||
+ (
+ boost::is_same<Target, src >::value &&
+ boost::detail::is_character<Target >::value
+ )
+ > shall_we_copy_t;
+
+ typedef boost::detail::is_arithmetic_and_not_xchars<Target, src >
+ shall_we_copy_with_dynamic_check_t;
+
+ // We do evaluate second `if_` lazily to avoid unnecessary instantiations
+ // of `shall_we_copy_with_dynamic_check_t` and improve compilation times.
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ shall_we_copy_t::value,
+ boost::type_identity<boost::detail::copy_converter_impl<Target, src > >,
+ boost::conditional<
+ shall_we_copy_with_dynamic_check_t::value,
+ boost::detail::dynamic_num_converter_impl<Target, src >,
+ boost::detail::lexical_converter_impl<Target, src >
+ >
+ >::type caster_type_lazy;
+
+ typedef BOOST_DEDUCED_TYPENAME caster_type_lazy::type caster_type;
+
+ return caster_type::try_convert(arg, result);
+ }
+
+ template <typename Target, typename CharacterT>
+ inline bool try_lexical_convert(const CharacterT* chars, std::size_t count, Target& result)
+ {
+ BOOST_STATIC_ASSERT_MSG(
+ boost::detail::is_character<CharacterT>::value,
+ "This overload of try_lexical_convert is meant to be used only with arrays of characters."
+ );
+ return ::boost::conversion::detail::try_lexical_convert(
+ ::boost::iterator_range<const CharacterT*>(chars, chars + count), result
+ );
+ }
+
+ }} // namespace conversion::detail
+
+ namespace conversion {
+ // ADL barrier
+ using ::boost::conversion::detail::try_lexical_convert;
+ }
+
+} // namespace boost
+
+#if defined(__clang__) || (defined(__GNUC__) && \
+ !(defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)) && \
+ (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)))
+#pragma GCC diagnostic pop
+#endif
+
+#endif // BOOST_LEXICAL_CAST_TRY_LEXICAL_CONVERT_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/limits.hpp b/src/third_party/boost-1.69.0/boost/limits.hpp
index 47d81556118..47d81556118 100644
--- a/src/third_party/boost-1.68.0/boost/limits.hpp
+++ b/src/third_party/boost-1.69.0/boost/limits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/logic/tribool.hpp b/src/third_party/boost-1.69.0/boost/logic/tribool.hpp
new file mode 100644
index 00000000000..041c59cefc6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/logic/tribool.hpp
@@ -0,0 +1,469 @@
+// Three-state boolean logic library
+
+// Copyright Douglas Gregor 2002-2004. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+// For more information, see http://www.boost.org
+#ifndef BOOST_LOGIC_TRIBOOL_HPP
+#define BOOST_LOGIC_TRIBOOL_HPP
+
+#include <boost/logic/tribool_fwd.hpp>
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace logic {
+
+/// INTERNAL ONLY
+namespace detail {
+/**
+ * INTERNAL ONLY
+ *
+ * \brief A type used only to uniquely identify the 'indeterminate'
+ * function/keyword.
+ */
+struct indeterminate_t
+{
+#if BOOST_WORKAROUND(__BORLANDC__, < 0x0600)
+ char dummy_; // BCB would use 8 bytes by default
+#endif
+};
+
+} // end namespace detail
+
+/**
+ * INTERNAL ONLY
+ * The type of the 'indeterminate' keyword. This has the same type as the
+ * function 'indeterminate' so that we can recognize when the keyword is
+ * used.
+ */
+typedef bool (*indeterminate_keyword_t)(tribool, detail::indeterminate_t);
+
+/**
+ * \brief Keyword and test function for the indeterminate tribool value
+ *
+ * The \c indeterminate function has a dual role. It's first role is
+ * as a unary function that tells whether the tribool value is in the
+ * "indeterminate" state. It's second role is as a keyword
+ * representing the indeterminate (just like "true" and "false"
+ * represent the true and false states). If you do not like the name
+ * "indeterminate", and would prefer to use a different name, see the
+ * macro \c BOOST_TRIBOOL_THIRD_STATE.
+ *
+ * \returns <tt>x.value == tribool::indeterminate_value</tt>
+ * \throws nothrow
+ */
+BOOST_CONSTEXPR inline bool
+indeterminate(tribool x,
+ detail::indeterminate_t dummy = detail::indeterminate_t()) BOOST_NOEXCEPT;
+
+/**
+ * \brief A 3-state boolean type.
+ *
+ * 3-state boolean values are either true, false, or
+ * indeterminate.
+ */
+class tribool
+{
+#if defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS )
+private:
+ /// INTERNAL ONLY
+ struct dummy {
+ void nonnull() {};
+ };
+
+ typedef void (dummy::*safe_bool)();
+#endif
+
+public:
+ /**
+ * Construct a new 3-state boolean value with the value 'false'.
+ *
+ * \throws nothrow
+ */
+ BOOST_CONSTEXPR tribool() BOOST_NOEXCEPT : value(false_value) {}
+
+ /**
+ * Construct a new 3-state boolean value with the given boolean
+ * value, which may be \c true or \c false.
+ *
+ * \throws nothrow
+ */
+ BOOST_CONSTEXPR tribool(bool initial_value) BOOST_NOEXCEPT : value(initial_value? true_value : false_value) {}
+
+ /**
+ * Construct a new 3-state boolean value with an indeterminate value.
+ *
+ * \throws nothrow
+ */
+ BOOST_CONSTEXPR tribool(indeterminate_keyword_t) BOOST_NOEXCEPT : value(indeterminate_value) {}
+
+ /**
+ * Use a 3-state boolean in a boolean context. Will evaluate true in a
+ * boolean context only when the 3-state boolean is definitely true.
+ *
+ * \returns true if the 3-state boolean is true, false otherwise
+ * \throws nothrow
+ */
+#if !defined( BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS )
+
+ BOOST_CONSTEXPR explicit operator bool () const BOOST_NOEXCEPT
+ {
+ return value == true_value;
+ }
+
+#else
+
+ BOOST_CONSTEXPR operator safe_bool() const BOOST_NOEXCEPT
+ {
+ return value == true_value? &dummy::nonnull : 0;
+ }
+
+#endif
+
+ /**
+ * The actual stored value in this 3-state boolean, which may be false, true,
+ * or indeterminate.
+ */
+ enum value_t { false_value, true_value, indeterminate_value } value;
+};
+
+// Check if the given tribool has an indeterminate value. Also doubles as a
+// keyword for the 'indeterminate' value
+BOOST_CONSTEXPR inline bool indeterminate(tribool x, detail::indeterminate_t) BOOST_NOEXCEPT
+{
+ return x.value == tribool::indeterminate_value;
+}
+
+/** @defgroup logical Logical operations
+ */
+//@{
+/**
+ * \brief Computes the logical negation of a tribool
+ *
+ * \returns the logical negation of the tribool, according to the
+ * table:
+ * <table border=1>
+ * <tr>
+ * <th><center><code>!</code></center></th>
+ * <th/>
+ * </tr>
+ * <tr>
+ * <th><center>false</center></th>
+ * <td><center>true</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>true</center></th>
+ * <td><center>false</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>indeterminate</center></th>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * </table>
+ * \throws nothrow
+ */
+BOOST_CONSTEXPR inline tribool operator!(tribool x) BOOST_NOEXCEPT
+{
+ return x.value == tribool::false_value? tribool(true)
+ :x.value == tribool::true_value? tribool(false)
+ :tribool(indeterminate);
+}
+
+/**
+ * \brief Computes the logical conjunction of two tribools
+ *
+ * \returns the result of logically ANDing the two tribool values,
+ * according to the following table:
+ * <table border=1>
+ * <tr>
+ * <th><center><code>&amp;&amp;</code></center></th>
+ * <th><center>false</center></th>
+ * <th><center>true</center></th>
+ * <th><center>indeterminate</center></th>
+ * </tr>
+ * <tr>
+ * <th><center>false</center></th>
+ * <td><center>false</center></td>
+ * <td><center>false</center></td>
+ * <td><center>false</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>true</center></th>
+ * <td><center>false</center></td>
+ * <td><center>true</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>indeterminate</center></th>
+ * <td><center>false</center></td>
+ * <td><center>indeterminate</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * </table>
+ * \throws nothrow
+ */
+BOOST_CONSTEXPR inline tribool operator&&(tribool x, tribool y) BOOST_NOEXCEPT
+{
+ return (static_cast<bool>(!x) || static_cast<bool>(!y))
+ ? tribool(false)
+ : ((static_cast<bool>(x) && static_cast<bool>(y)) ? tribool(true) : indeterminate)
+ ;
+}
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator&&(tribool x, bool y) BOOST_NOEXCEPT
+{ return y? x : tribool(false); }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator&&(bool x, tribool y) BOOST_NOEXCEPT
+{ return x? y : tribool(false); }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator&&(indeterminate_keyword_t, tribool x) BOOST_NOEXCEPT
+{ return !x? tribool(false) : tribool(indeterminate); }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator&&(tribool x, indeterminate_keyword_t) BOOST_NOEXCEPT
+{ return !x? tribool(false) : tribool(indeterminate); }
+
+/**
+ * \brief Computes the logical disjunction of two tribools
+ *
+ * \returns the result of logically ORing the two tribool values,
+ * according to the following table:
+ * <table border=1>
+ * <tr>
+ * <th><center><code>||</code></center></th>
+ * <th><center>false</center></th>
+ * <th><center>true</center></th>
+ * <th><center>indeterminate</center></th>
+ * </tr>
+ * <tr>
+ * <th><center>false</center></th>
+ * <td><center>false</center></td>
+ * <td><center>true</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>true</center></th>
+ * <td><center>true</center></td>
+ * <td><center>true</center></td>
+ * <td><center>true</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>indeterminate</center></th>
+ * <td><center>indeterminate</center></td>
+ * <td><center>true</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * </table>
+ * \throws nothrow
+ */
+BOOST_CONSTEXPR inline tribool operator||(tribool x, tribool y) BOOST_NOEXCEPT
+{
+ return (static_cast<bool>(!x) && static_cast<bool>(!y))
+ ? tribool(false)
+ : ((static_cast<bool>(x) || static_cast<bool>(y)) ? tribool(true) : tribool(indeterminate))
+ ;
+}
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator||(tribool x, bool y) BOOST_NOEXCEPT
+{ return y? tribool(true) : x; }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator||(bool x, tribool y) BOOST_NOEXCEPT
+{ return x? tribool(true) : y; }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator||(indeterminate_keyword_t, tribool x) BOOST_NOEXCEPT
+{ return x? tribool(true) : tribool(indeterminate); }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator||(tribool x, indeterminate_keyword_t) BOOST_NOEXCEPT
+{ return x? tribool(true) : tribool(indeterminate); }
+//@}
+
+/**
+ * \brief Compare tribools for equality
+ *
+ * \returns the result of comparing two tribool values, according to
+ * the following table:
+ * <table border=1>
+ * <tr>
+ * <th><center><code>==</code></center></th>
+ * <th><center>false</center></th>
+ * <th><center>true</center></th>
+ * <th><center>indeterminate</center></th>
+ * </tr>
+ * <tr>
+ * <th><center>false</center></th>
+ * <td><center>true</center></td>
+ * <td><center>false</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>true</center></th>
+ * <td><center>false</center></td>
+ * <td><center>true</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>indeterminate</center></th>
+ * <td><center>indeterminate</center></td>
+ * <td><center>indeterminate</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * </table>
+ * \throws nothrow
+ */
+BOOST_CONSTEXPR inline tribool operator==(tribool x, tribool y) BOOST_NOEXCEPT
+{
+ return (indeterminate(x) || indeterminate(y))
+ ? indeterminate
+ : ((x && y) || (!x && !y))
+ ;
+}
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator==(tribool x, bool y) BOOST_NOEXCEPT { return x == tribool(y); }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator==(bool x, tribool y) BOOST_NOEXCEPT { return tribool(x) == y; }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator==(indeterminate_keyword_t, tribool x) BOOST_NOEXCEPT
+{ return tribool(indeterminate) == x; }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator==(tribool x, indeterminate_keyword_t) BOOST_NOEXCEPT
+{ return tribool(indeterminate) == x; }
+
+/**
+ * \brief Compare tribools for inequality
+ *
+ * \returns the result of comparing two tribool values for inequality,
+ * according to the following table:
+ * <table border=1>
+ * <tr>
+ * <th><center><code>!=</code></center></th>
+ * <th><center>false</center></th>
+ * <th><center>true</center></th>
+ * <th><center>indeterminate</center></th>
+ * </tr>
+ * <tr>
+ * <th><center>false</center></th>
+ * <td><center>false</center></td>
+ * <td><center>true</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>true</center></th>
+ * <td><center>true</center></td>
+ * <td><center>false</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * <tr>
+ * <th><center>indeterminate</center></th>
+ * <td><center>indeterminate</center></td>
+ * <td><center>indeterminate</center></td>
+ * <td><center>indeterminate</center></td>
+ * </tr>
+ * </table>
+ * \throws nothrow
+ */
+BOOST_CONSTEXPR inline tribool operator!=(tribool x, tribool y) BOOST_NOEXCEPT
+{
+ return (indeterminate(x) || indeterminate(y))
+ ? indeterminate
+ : !((x && y) || (!x && !y))
+ ;
+}
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator!=(tribool x, bool y) BOOST_NOEXCEPT { return x != tribool(y); }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator!=(bool x, tribool y) BOOST_NOEXCEPT { return tribool(x) != y; }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator!=(indeterminate_keyword_t, tribool x) BOOST_NOEXCEPT
+{ return tribool(indeterminate) != x; }
+
+/**
+ * \overload
+ */
+BOOST_CONSTEXPR inline tribool operator!=(tribool x, indeterminate_keyword_t) BOOST_NOEXCEPT
+{ return x != tribool(indeterminate); }
+
+} } // end namespace boost::logic
+
+// Pull tribool and indeterminate into namespace "boost"
+namespace boost {
+ using logic::tribool;
+ using logic::indeterminate;
+}
+
+/**
+ * \brief Declare a new name for the third state of a tribool
+ *
+ * Use this macro to declare a new name for the third state of a
+ * tribool. This state can have any number of new names (in addition
+ * to \c indeterminate), all of which will be equivalent. The new name will be
+ * placed in the namespace in which the macro is expanded.
+ *
+ * Example:
+ * BOOST_TRIBOOL_THIRD_STATE(true_or_false)
+ *
+ * tribool x(true_or_false);
+ * // potentially set x
+ * if (true_or_false(x)) {
+ * // don't know what x is
+ * }
+ */
+#define BOOST_TRIBOOL_THIRD_STATE(Name) \
+inline bool \
+Name(boost::logic::tribool x, \
+ boost::logic::detail::indeterminate_t = \
+ boost::logic::detail::indeterminate_t()) \
+{ return x.value == boost::logic::tribool::indeterminate_value; }
+
+#endif // BOOST_LOGIC_TRIBOOL_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/logic/tribool_fwd.hpp b/src/third_party/boost-1.69.0/boost/logic/tribool_fwd.hpp
index 2cdd91bb338..2cdd91bb338 100644
--- a/src/third_party/boost-1.68.0/boost/logic/tribool_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/logic/tribool_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/make_shared.hpp b/src/third_party/boost-1.69.0/boost/make_shared.hpp
index 588fbfde1b8..588fbfde1b8 100644
--- a/src/third_party/boost-1.68.0/boost/make_shared.hpp
+++ b/src/third_party/boost-1.69.0/boost/make_shared.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/constants/calculate_constants.hpp b/src/third_party/boost-1.69.0/boost/math/constants/calculate_constants.hpp
new file mode 100644
index 00000000000..71487885bfe
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/constants/calculate_constants.hpp
@@ -0,0 +1,983 @@
+// Copyright John Maddock 2010, 2012.
+// Copyright Paul A. Bristow 2011, 2012.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
+#define BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
+
+#include <boost/math/special_functions/trunc.hpp>
+
+namespace boost{ namespace math{ namespace constants{ namespace detail{
+
+template <class T>
+template<int N>
+inline T constant_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+
+ return ldexp(acos(T(0)), 1);
+
+ /*
+ // Although this code works well, it's usually more accurate to just call acos
+ // and access the number types own representation of PI which is usually calculated
+ // at slightly higher precision...
+
+ T result;
+ T a = 1;
+ T b;
+ T A(a);
+ T B = 0.5f;
+ T D = 0.25f;
+
+ T lim;
+ lim = boost::math::tools::epsilon<T>();
+
+ unsigned k = 1;
+
+ do
+ {
+ result = A + B;
+ result = ldexp(result, -2);
+ b = sqrt(B);
+ a += b;
+ a = ldexp(a, -1);
+ A = a * a;
+ B = A - result;
+ B = ldexp(B, 1);
+ result = A - B;
+ bool neg = boost::math::sign(result) < 0;
+ if(neg)
+ result = -result;
+ if(result <= lim)
+ break;
+ if(neg)
+ result = -result;
+ result = ldexp(result, k - 1);
+ D -= result;
+ ++k;
+ lim = ldexp(lim, 1);
+ }
+ while(true);
+
+ result = B / D;
+ return result;
+ */
+}
+
+template <class T>
+template<int N>
+inline T constant_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return 2 * pi<T, policies::policy<policies::digits2<N> > >();
+}
+
+template <class T> // 2 / pi
+template<int N>
+inline T constant_two_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return 2 / pi<T, policies::policy<policies::digits2<N> > >();
+}
+
+template <class T> // sqrt(2/pi)
+template <int N>
+inline T constant_root_two_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt((2 / pi<T, policies::policy<policies::digits2<N> > >()));
+}
+
+template <class T>
+template<int N>
+inline T constant_one_div_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return 1 / two_pi<T, policies::policy<policies::digits2<N> > >();
+}
+
+template <class T>
+template<int N>
+inline T constant_root_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(pi<T, policies::policy<policies::digits2<N> > >());
+}
+
+template <class T>
+template<int N>
+inline T constant_root_half_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(pi<T, policies::policy<policies::digits2<N> > >() / 2);
+}
+
+template <class T>
+template<int N>
+inline T constant_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(two_pi<T, policies::policy<policies::digits2<N> > >());
+}
+
+template <class T>
+template<int N>
+inline T constant_log_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return log(root_two_pi<T, policies::policy<policies::digits2<N> > >());
+}
+
+template <class T>
+template<int N>
+inline T constant_root_ln_four<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(log(static_cast<T>(4)));
+}
+
+template <class T>
+template<int N>
+inline T constant_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ //
+ // Although we can clearly calculate this from first principles, this hooks into
+ // T's own notion of e, which hopefully will more accurate than one calculated to
+ // a few epsilon:
+ //
+ BOOST_MATH_STD_USING
+ return exp(static_cast<T>(1));
+}
+
+template <class T>
+template<int N>
+inline T constant_half<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return static_cast<T>(1) / static_cast<T>(2);
+}
+
+template <class T>
+template<int M>
+inline T constant_euler<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<M>))
+{
+ BOOST_MATH_STD_USING
+ //
+ // This is the method described in:
+ // "Some New Algorithms for High-Precision Computation of Euler's Constant"
+ // Richard P Brent and Edwin M McMillan.
+ // Mathematics of Computation, Volume 34, Number 149, Jan 1980, pages 305-312.
+ // See equation 17 with p = 2.
+ //
+ T n = 3 + (M ? (std::min)(M, tools::digits<T>()) : tools::digits<T>()) / 4;
+ T lim = M ? ldexp(T(1), 1 - (std::min)(M, tools::digits<T>())) : tools::epsilon<T>();
+ T lnn = log(n);
+ T term = 1;
+ T N = -lnn;
+ T D = 1;
+ T Hk = 0;
+ T one = 1;
+
+ for(unsigned k = 1;; ++k)
+ {
+ term *= n * n;
+ term /= k * k;
+ Hk += one / k;
+ N += term * (Hk - lnn);
+ D += term;
+
+ if(term < D * lim)
+ break;
+ }
+ return N / D;
+}
+
+template <class T>
+template<int N>
+inline T constant_euler_sqr<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return euler<T, policies::policy<policies::digits2<N> > >()
+ * euler<T, policies::policy<policies::digits2<N> > >();
+}
+
+template <class T>
+template<int N>
+inline T constant_one_div_euler<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(1)
+ / euler<T, policies::policy<policies::digits2<N> > >();
+}
+
+
+template <class T>
+template<int N>
+inline T constant_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(static_cast<T>(2));
+}
+
+
+template <class T>
+template<int N>
+inline T constant_root_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(static_cast<T>(3));
+}
+
+template <class T>
+template<int N>
+inline T constant_half_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(static_cast<T>(2)) / 2;
+}
+
+template <class T>
+template<int N>
+inline T constant_ln_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ //
+ // Although there are good ways to calculate this from scratch, this hooks into
+ // T's own notion of log(2) which will hopefully be accurate to the full precision
+ // of T:
+ //
+ BOOST_MATH_STD_USING
+ return log(static_cast<T>(2));
+}
+
+template <class T>
+template<int N>
+inline T constant_ln_ten<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return log(static_cast<T>(10));
+}
+
+template <class T>
+template<int N>
+inline T constant_ln_ln_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return log(log(static_cast<T>(2)));
+}
+
+template <class T>
+template<int N>
+inline T constant_third<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(1) / static_cast<T>(3);
+}
+
+template <class T>
+template<int N>
+inline T constant_twothirds<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(2) / static_cast<T>(3);
+}
+
+template <class T>
+template<int N>
+inline T constant_two_thirds<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(2) / static_cast<T>(3);
+}
+
+template <class T>
+template<int N>
+inline T constant_three_quarters<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(3) / static_cast<T>(4);
+}
+
+template <class T>
+template<int N>
+inline T constant_sixth<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(1) / static_cast<T>(6);
+}
+
+// Pi and related constants.
+template <class T>
+template<int N>
+inline T constant_pi_minus_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(3);
+}
+
+template <class T>
+template<int N>
+inline T constant_four_minus_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return static_cast<T>(4) - pi<T, policies::policy<policies::digits2<N> > >();
+}
+
+//template <class T>
+//template<int N>
+//inline T constant_pow23_four_minus_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+//{
+// BOOST_MATH_STD_USING
+// return pow(four_minus_pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1.5));
+//}
+
+template <class T>
+template<int N>
+inline T constant_exp_minus_half<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return exp(static_cast<T>(-0.5));
+}
+
+template <class T>
+template<int N>
+inline T constant_exp_minus_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return exp(static_cast<T>(-1.));
+}
+
+template <class T>
+template<int N>
+inline T constant_one_div_root_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return static_cast<T>(1) / root_two<T, policies::policy<policies::digits2<N> > >();
+}
+
+template <class T>
+template<int N>
+inline T constant_one_div_root_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return static_cast<T>(1) / root_pi<T, policies::policy<policies::digits2<N> > >();
+}
+
+template <class T>
+template<int N>
+inline T constant_one_div_root_two_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ return static_cast<T>(1) / root_two_pi<T, policies::policy<policies::digits2<N> > >();
+}
+
+template <class T>
+template<int N>
+inline T constant_root_one_div_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(static_cast<T>(1) / pi<T, policies::policy<policies::digits2<N> > >());
+}
+
+template <class T>
+template<int N>
+inline T constant_four_thirds_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(4) / static_cast<T>(3);
+}
+
+template <class T>
+template<int N>
+inline T constant_half_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >() / static_cast<T>(2);
+}
+
+
+template <class T>
+template<int N>
+inline T constant_third_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >() / static_cast<T>(3);
+}
+
+template <class T>
+template<int N>
+inline T constant_sixth_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >() / static_cast<T>(6);
+}
+
+template <class T>
+template<int N>
+inline T constant_two_thirds_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(2) / static_cast<T>(3);
+}
+
+template <class T>
+template<int N>
+inline T constant_three_quarters_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >() * static_cast<T>(3) / static_cast<T>(4);
+}
+
+template <class T>
+template<int N>
+inline T constant_pi_pow_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pow(pi<T, policies::policy<policies::digits2<N> > >(), e<T, policies::policy<policies::digits2<N> > >()); //
+}
+
+template <class T>
+template<int N>
+inline T constant_pi_sqr<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >()
+ * pi<T, policies::policy<policies::digits2<N> > >() ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_pi_sqr_div_six<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >()
+ * pi<T, policies::policy<policies::digits2<N> > >()
+ / static_cast<T>(6); //
+}
+
+
+template <class T>
+template<int N>
+inline T constant_pi_cubed<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >()
+ * pi<T, policies::policy<policies::digits2<N> > >()
+ * pi<T, policies::policy<policies::digits2<N> > >()
+ ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_cbrt_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1)/ static_cast<T>(3));
+}
+
+template <class T>
+template<int N>
+inline T constant_one_div_cbrt_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(1)
+ / pow(pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(1)/ static_cast<T>(3));
+}
+
+// Euler's e
+
+template <class T>
+template<int N>
+inline T constant_e_pow_pi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pow(e<T, policies::policy<policies::digits2<N> > >(), pi<T, policies::policy<policies::digits2<N> > >()); //
+}
+
+template <class T>
+template<int N>
+inline T constant_root_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sqrt(e<T, policies::policy<policies::digits2<N> > >());
+}
+
+template <class T>
+template<int N>
+inline T constant_log10_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return log10(e<T, policies::policy<policies::digits2<N> > >());
+}
+
+template <class T>
+template<int N>
+inline T constant_one_div_log10_e<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(1) /
+ log10(e<T, policies::policy<policies::digits2<N> > >());
+}
+
+// Trigonometric
+
+template <class T>
+template<int N>
+inline T constant_degree<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return pi<T, policies::policy<policies::digits2<N> > >()
+ / static_cast<T>(180)
+ ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_radian<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(180)
+ / pi<T, policies::policy<policies::digits2<N> > >()
+ ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_sin_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sin(static_cast<T>(1)) ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_cos_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return cos(static_cast<T>(1)) ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_sinh_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return sinh(static_cast<T>(1)) ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_cosh_one<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return cosh(static_cast<T>(1)) ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return (static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) ; //
+}
+
+template <class T>
+template<int N>
+inline T constant_ln_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ //return log(phi<T, policies::policy<policies::digits2<N> > >()); // ???
+ return log((static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) );
+}
+template <class T>
+template<int N>
+inline T constant_one_div_ln_phi<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+ return static_cast<T>(1) /
+ log((static_cast<T>(1) + sqrt(static_cast<T>(5)) )/static_cast<T>(2) );
+}
+
+// Zeta
+
+template <class T>
+template<int N>
+inline T constant_zeta_two<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ BOOST_MATH_STD_USING
+
+ return pi<T, policies::policy<policies::digits2<N> > >()
+ * pi<T, policies::policy<policies::digits2<N> > >()
+ /static_cast<T>(6);
+}
+
+template <class T>
+template<int N>
+inline T constant_zeta_three<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ // http://mathworld.wolfram.com/AperysConstant.html
+ // http://en.wikipedia.org/wiki/Mathematical_constant
+
+ // http://oeis.org/A002117/constant
+ //T zeta3("1.20205690315959428539973816151144999076"
+ // "4986292340498881792271555341838205786313"
+ // "09018645587360933525814619915");
+
+ //"1.202056903159594285399738161511449990, 76498629234049888179227155534183820578631309018645587360933525814619915" A002117
+ // 1.202056903159594285399738161511449990, 76498629234049888179227155534183820578631309018645587360933525814619915780, +00);
+ //"1.2020569031595942 double
+ // http://www.spaennare.se/SSPROG/ssnum.pdf // section 11, Algorithm for Apery's constant zeta(3).
+ // Programs to Calculate some Mathematical Constants to Large Precision, Document Version 1.50
+
+ // by Stefan Spannare September 19, 2007
+ // zeta(3) = 1/64 * sum
+ BOOST_MATH_STD_USING
+ T n_fact=static_cast<T>(1); // build n! for n = 0.
+ T sum = static_cast<double>(77); // Start with n = 0 case.
+ // for n = 0, (77/1) /64 = 1.203125
+ //double lim = std::numeric_limits<double>::epsilon();
+ T lim = N ? ldexp(T(1), 1 - (std::min)(N, tools::digits<T>())) : tools::epsilon<T>();
+ for(unsigned int n = 1; n < 40; ++n)
+ { // three to five decimal digits per term, so 40 should be plenty for 100 decimal digits.
+ //cout << "n = " << n << endl;
+ n_fact *= n; // n!
+ T n_fact_p10 = n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact * n_fact; // (n!)^10
+ T num = ((205 * n * n) + (250 * n) + 77) * n_fact_p10; // 205n^2 + 250n + 77
+ // int nn = (2 * n + 1);
+ // T d = factorial(nn); // inline factorial.
+ T d = 1;
+ for(unsigned int i = 1; i <= (n+n + 1); ++i) // (2n + 1)
+ {
+ d *= i;
+ }
+ T den = d * d * d * d * d; // [(2n+1)!]^5
+ //cout << "den = " << den << endl;
+ T term = num/den;
+ if (n % 2 != 0)
+ { //term *= -1;
+ sum -= term;
+ }
+ else
+ {
+ sum += term;
+ }
+ //cout << "term = " << term << endl;
+ //cout << "sum/64 = " << sum/64 << endl;
+ if(abs(term) < lim)
+ {
+ break;
+ }
+ }
+ return sum / 64;
+}
+
+template <class T>
+template<int N>
+inline T constant_catalan<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{ // http://oeis.org/A006752/constant
+ //T c("0.915965594177219015054603514932384110774"
+ //"149374281672134266498119621763019776254769479356512926115106248574");
+
+ // 9.159655941772190150546035149323841107, 74149374281672134266498119621763019776254769479356512926115106248574422619, -01);
+
+ // This is equation (entry) 31 from
+ // http://www-2.cs.cmu.edu/~adamchik/articles/catalan/catalan.htm
+ // See also http://www.mpfr.org/algorithms.pdf
+ BOOST_MATH_STD_USING
+ T k_fact = 1;
+ T tk_fact = 1;
+ T sum = 1;
+ T term;
+ T lim = N ? ldexp(T(1), 1 - (std::min)(N, tools::digits<T>())) : tools::epsilon<T>();
+
+ for(unsigned k = 1;; ++k)
+ {
+ k_fact *= k;
+ tk_fact *= (2 * k) * (2 * k - 1);
+ term = k_fact * k_fact / (tk_fact * (2 * k + 1) * (2 * k + 1));
+ sum += term;
+ if(term < lim)
+ {
+ break;
+ }
+ }
+ return boost::math::constants::pi<T, boost::math::policies::policy<> >()
+ * log(2 + boost::math::constants::root_three<T, boost::math::policies::policy<> >())
+ / 8
+ + 3 * sum / 8;
+}
+
+namespace khinchin_detail{
+
+template <class T>
+T zeta_polynomial_series(T s, T sc, int digits)
+{
+ BOOST_MATH_STD_USING
+ //
+ // This is algorithm 3 from:
+ //
+ // "An Efficient Algorithm for the Riemann Zeta Function", P. Borwein,
+ // Canadian Mathematical Society, Conference Proceedings, 2000.
+ // See: http://www.cecm.sfu.ca/personal/pborwein/PAPERS/P155.pdf
+ //
+ BOOST_MATH_STD_USING
+ int n = (digits * 19) / 53;
+ T sum = 0;
+ T two_n = ldexp(T(1), n);
+ int ej_sign = 1;
+ for(int j = 0; j < n; ++j)
+ {
+ sum += ej_sign * -two_n / pow(T(j + 1), s);
+ ej_sign = -ej_sign;
+ }
+ T ej_sum = 1;
+ T ej_term = 1;
+ for(int j = n; j <= 2 * n - 1; ++j)
+ {
+ sum += ej_sign * (ej_sum - two_n) / pow(T(j + 1), s);
+ ej_sign = -ej_sign;
+ ej_term *= 2 * n - j;
+ ej_term /= j - n + 1;
+ ej_sum += ej_term;
+ }
+ return -sum / (two_n * (1 - pow(T(2), sc)));
+}
+
+template <class T>
+T khinchin(int digits)
+{
+ BOOST_MATH_STD_USING
+ T sum = 0;
+ T term;
+ T lim = ldexp(T(1), 1-digits);
+ T factor = 0;
+ unsigned last_k = 1;
+ T num = 1;
+ for(unsigned n = 1;; ++n)
+ {
+ for(unsigned k = last_k; k <= 2 * n - 1; ++k)
+ {
+ factor += num / k;
+ num = -num;
+ }
+ last_k = 2 * n;
+ term = (zeta_polynomial_series(T(2 * n), T(1 - T(2 * n)), digits) - 1) * factor / n;
+ sum += term;
+ if(term < lim)
+ break;
+ }
+ return exp(sum / boost::math::constants::ln_two<T, boost::math::policies::policy<> >());
+}
+
+}
+
+template <class T>
+template<int N>
+inline T constant_khinchin<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+ int n = N ? (std::min)(N, tools::digits<T>()) : tools::digits<T>();
+ return khinchin_detail::khinchin<T>(n);
+}
+
+template <class T>
+template<int N>
+inline T constant_extreme_value_skewness<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{ // from e_float constants.cpp
+ // Mathematica: N[12 Sqrt[6] Zeta[3]/Pi^3, 1101]
+ BOOST_MATH_STD_USING
+ T ev(12 * sqrt(static_cast<T>(6)) * zeta_three<T, policies::policy<policies::digits2<N> > >()
+ / pi_cubed<T, policies::policy<policies::digits2<N> > >() );
+
+//T ev(
+//"1.1395470994046486574927930193898461120875997958365518247216557100852480077060706857071875468869385150"
+//"1894272048688553376986765366075828644841024041679714157616857834895702411080704529137366329462558680"
+//"2015498788776135705587959418756809080074611906006528647805347822929577145038743873949415294942796280"
+//"0895597703063466053535550338267721294164578901640163603544404938283861127819804918174973533694090594"
+//"3094963822672055237678432023017824416203652657301470473548274848068762500300316769691474974950757965"
+//"8640779777748741897542093874605477776538884083378029488863880220988107155275203245233994097178778984"
+//"3488995668362387892097897322246698071290011857605809901090220903955815127463328974447572119951192970"
+//"3684453635456559086126406960279692862247058250100678008419431185138019869693206366891639436908462809"
+//"9756051372711251054914491837034685476095423926553367264355374652153595857163724698198860485357368964"
+//"3807049634423621246870868566707915720704996296083373077647528285782964567312903914752617978405994377"
+//"9064157147206717895272199736902453130842229559980076472936976287378945035706933650987259357729800315");
+
+ return ev;
+}
+
+namespace detail{
+//
+// Calculation of the Glaisher constant depends upon calculating the
+// derivative of the zeta function at 2, we can then use the relation:
+// zeta'(2) = 1/6 pi^2 [euler + ln(2pi)-12ln(A)]
+// To get the constant A.
+// See equation 45 at http://mathworld.wolfram.com/RiemannZetaFunction.html.
+//
+// The derivative of the zeta function is computed by direct differentiation
+// of the relation:
+// (1-2^(1-s))zeta(s) = SUM(n=0, INF){ (-n)^n / (n+1)^s }
+// Which gives us 2 slowly converging but alternating sums to compute,
+// for this we use Algorithm 1 from "Convergent Acceleration of Alternating Series",
+// Henri Cohen, Fernando Rodriguez Villegas and Don Zagier, Experimental Mathematics 9:1 (1999).
+// See http://www.math.utexas.edu/users/villegas/publications/conv-accel.pdf
+//
+template <class T>
+T zeta_series_derivative_2(unsigned digits)
+{
+ // Derivative of the series part, evaluated at 2:
+ BOOST_MATH_STD_USING
+ int n = digits * 301 * 13 / 10000;
+ boost::math::itrunc((std::numeric_limits<T>::digits10 + 1) * 1.3);
+ T d = pow(3 + sqrt(T(8)), n);
+ d = (d + 1 / d) / 2;
+ T b = -1;
+ T c = -d;
+ T s = 0;
+ for(int k = 0; k < n; ++k)
+ {
+ T a = -log(T(k+1)) / ((k+1) * (k+1));
+ c = b - c;
+ s = s + c * a;
+ b = (k + n) * (k - n) * b / ((k + T(0.5f)) * (k + 1));
+ }
+ return s / d;
+}
+
+template <class T>
+T zeta_series_2(unsigned digits)
+{
+ // Series part of zeta at 2:
+ BOOST_MATH_STD_USING
+ int n = digits * 301 * 13 / 10000;
+ T d = pow(3 + sqrt(T(8)), n);
+ d = (d + 1 / d) / 2;
+ T b = -1;
+ T c = -d;
+ T s = 0;
+ for(int k = 0; k < n; ++k)
+ {
+ T a = T(1) / ((k + 1) * (k + 1));
+ c = b - c;
+ s = s + c * a;
+ b = (k + n) * (k - n) * b / ((k + T(0.5f)) * (k + 1));
+ }
+ return s / d;
+}
+
+template <class T>
+inline T zeta_series_lead_2()
+{
+ // lead part at 2:
+ return 2;
+}
+
+template <class T>
+inline T zeta_series_derivative_lead_2()
+{
+ // derivative of lead part at 2:
+ return -2 * boost::math::constants::ln_two<T>();
+}
+
+template <class T>
+inline T zeta_derivative_2(unsigned n)
+{
+ // zeta derivative at 2:
+ return zeta_series_derivative_2<T>(n) * zeta_series_lead_2<T>()
+ + zeta_series_derivative_lead_2<T>() * zeta_series_2<T>(n);
+}
+
+} // namespace detail
+
+template <class T>
+template<int N>
+inline T constant_glaisher<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{
+
+ BOOST_MATH_STD_USING
+ typedef policies::policy<policies::digits2<N> > forwarding_policy;
+ int n = N ? (std::min)(N, tools::digits<T>()) : tools::digits<T>();
+ T v = detail::zeta_derivative_2<T>(n);
+ v *= 6;
+ v /= boost::math::constants::pi<T, forwarding_policy>() * boost::math::constants::pi<T, forwarding_policy>();
+ v -= boost::math::constants::euler<T, forwarding_policy>();
+ v -= log(2 * boost::math::constants::pi<T, forwarding_policy>());
+ v /= -12;
+ return exp(v);
+
+ /*
+ // from http://mpmath.googlecode.com/svn/data/glaisher.txt
+ // 20,000 digits of the Glaisher-Kinkelin constant A = exp(1/2 - zeta'(-1))
+ // Computed using A = exp((6 (-zeta'(2))/pi^2 + log 2 pi + gamma)/12)
+ // with Euler-Maclaurin summation for zeta'(2).
+ T g(
+ "1.282427129100622636875342568869791727767688927325001192063740021740406308858826"
+ "46112973649195820237439420646120399000748933157791362775280404159072573861727522"
+ "14334327143439787335067915257366856907876561146686449997784962754518174312394652"
+ "76128213808180219264516851546143919901083573730703504903888123418813674978133050"
+ "93770833682222494115874837348064399978830070125567001286994157705432053927585405"
+ "81731588155481762970384743250467775147374600031616023046613296342991558095879293"
+ "36343887288701988953460725233184702489001091776941712153569193674967261270398013"
+ "52652668868978218897401729375840750167472114895288815996668743164513890306962645"
+ "59870469543740253099606800842447417554061490189444139386196089129682173528798629"
+ "88434220366989900606980888785849587494085307347117090132667567503310523405221054"
+ "14176776156308191919997185237047761312315374135304725819814797451761027540834943"
+ "14384965234139453373065832325673954957601692256427736926358821692159870775858274"
+ "69575162841550648585890834128227556209547002918593263079373376942077522290940187");
+
+ return g;
+ */
+}
+
+template <class T>
+template<int N>
+inline T constant_rayleigh_skewness<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{ // From e_float
+ // 1100 digits of the Rayleigh distribution skewness
+ // Mathematica: N[2 Sqrt[Pi] (Pi - 3)/((4 - Pi)^(3/2)), 1100]
+
+ BOOST_MATH_STD_USING
+ T rs(2 * root_pi<T, policies::policy<policies::digits2<N> > >()
+ * pi_minus_three<T, policies::policy<policies::digits2<N> > >()
+ / pow(four_minus_pi<T, policies::policy<policies::digits2<N> > >(), static_cast<T>(3./2))
+ );
+ // 6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264,
+
+ //"0.6311106578189371381918993515442277798440422031347194976580945856929268196174737254599050270325373067"
+ //"9440004726436754739597525250317640394102954301685809920213808351450851396781817932734836994829371322"
+ //"5797376021347531983451654130317032832308462278373358624120822253764532674177325950686466133508511968"
+ //"2389168716630349407238090652663422922072397393006683401992961569208109477307776249225072042971818671"
+ //"4058887072693437217879039875871765635655476241624825389439481561152126886932506682176611183750503553"
+ //"1218982627032068396407180216351425758181396562859085306247387212297187006230007438534686340210168288"
+ //"8956816965453815849613622117088096547521391672977226658826566757207615552041767516828171274858145957"
+ //"6137539156656005855905288420585194082284972984285863898582313048515484073396332610565441264220790791"
+ //"0194897267890422924599776483890102027823328602965235306539844007677157873140562950510028206251529523"
+ //"7428049693650605954398446899724157486062545281504433364675815915402937209673727753199567661561209251"
+ //"4695589950526053470201635372590001578503476490223746511106018091907936826431407434894024396366284848"); ;
+ return rs;
+}
+
+template <class T>
+template<int N>
+inline T constant_rayleigh_kurtosis_excess<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{ // - (6 Pi^2 - 24 Pi + 16)/((Pi - 4)^2)
+ // Might provide and calculate this using pi_minus_four.
+ BOOST_MATH_STD_USING
+ return - (((static_cast<T>(6) * pi<T, policies::policy<policies::digits2<N> > >()
+ * pi<T, policies::policy<policies::digits2<N> > >())
+ - (static_cast<T>(24) * pi<T, policies::policy<policies::digits2<N> > >()) + static_cast<T>(16) )
+ /
+ ((pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4))
+ * (pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4)))
+ );
+}
+
+template <class T>
+template<int N>
+inline T constant_rayleigh_kurtosis<T>::compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))
+{ // 3 - (6 Pi^2 - 24 Pi + 16)/((Pi - 4)^2)
+ // Might provide and calculate this using pi_minus_four.
+ BOOST_MATH_STD_USING
+ return static_cast<T>(3) - (((static_cast<T>(6) * pi<T, policies::policy<policies::digits2<N> > >()
+ * pi<T, policies::policy<policies::digits2<N> > >())
+ - (static_cast<T>(24) * pi<T, policies::policy<policies::digits2<N> > >()) + static_cast<T>(16) )
+ /
+ ((pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4))
+ * (pi<T, policies::policy<policies::digits2<N> > >() - static_cast<T>(4)))
+ );
+}
+
+}}}} // namespaces
+
+#endif // BOOST_MATH_CALCULATE_CONSTANTS_CONSTANTS_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/math/constants/constants.hpp b/src/third_party/boost-1.69.0/boost/math/constants/constants.hpp
new file mode 100644
index 00000000000..19edc5b0e79
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/constants/constants.hpp
@@ -0,0 +1,348 @@
+// Copyright John Maddock 2005-2006, 2011.
+// Copyright Paul A. Bristow 2006-2011.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
+#define BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
+
+#include <boost/math/tools/config.hpp>
+#include <boost/math/policies/policy.hpp>
+#include <boost/math/tools/precision.hpp>
+#include <boost/math/tools/convert_from_string.hpp>
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4127 4701)
+#endif
+#ifndef BOOST_MATH_NO_LEXICAL_CAST
+#include <boost/lexical_cast.hpp>
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/utility/declval.hpp>
+
+
+namespace boost{ namespace math
+{
+ namespace constants
+ {
+ // To permit other calculations at about 100 decimal digits with some UDT,
+ // it is obviously necessary to define constants to this accuracy.
+
+ // However, some compilers do not accept decimal digits strings as long as this.
+ // So the constant is split into two parts, with the 1st containing at least
+ // long double precision, and the 2nd zero if not needed or known.
+ // The 3rd part permits an exponent to be provided if necessary (use zero if none) -
+ // the other two parameters may only contain decimal digits (and sign and decimal point),
+ // and may NOT include an exponent like 1.234E99.
+ // The second digit string is only used if T is a User-Defined Type,
+ // when the constant is converted to a long string literal and lexical_casted to type T.
+ // (This is necessary because you can't use a numeric constant
+ // since even a long double might not have enough digits).
+
+ enum construction_method
+ {
+ construct_from_float = 1,
+ construct_from_double = 2,
+ construct_from_long_double = 3,
+ construct_from_string = 4,
+ construct_from_float128 = 5,
+ // Must be the largest value above:
+ construct_max = construct_from_float128
+ };
+
+ //
+ // Traits class determines how to convert from string based on whether T has a constructor
+ // from const char* or not:
+ //
+ template <int N>
+ struct dummy_size{};
+
+ //
+ // Max number of binary digits in the string representations of our constants:
+ //
+ BOOST_STATIC_CONSTANT(int, max_string_digits = (101 * 1000L) / 301L);
+
+ template <class Real, class Policy>
+ struct construction_traits
+ {
+ private:
+ typedef typename policies::precision<Real, Policy>::type t1;
+ typedef typename policies::precision<float, Policy>::type t2;
+ typedef typename policies::precision<double, Policy>::type t3;
+ typedef typename policies::precision<long double, Policy>::type t4;
+#ifdef BOOST_MATH_USE_FLOAT128
+ typedef mpl::int_<113> t5;
+#endif
+ public:
+ typedef typename mpl::if_<
+ mpl::and_<boost::is_convertible<float, Real>, mpl::bool_< t1::value <= t2::value>, mpl::bool_<0 != t1::value> >,
+ mpl::int_<construct_from_float>,
+ typename mpl::if_<
+ mpl::and_<boost::is_convertible<double, Real>, mpl::bool_< t1::value <= t3::value>, mpl::bool_<0 != t1::value> >,
+ mpl::int_<construct_from_double>,
+ typename mpl::if_<
+ mpl::and_<boost::is_convertible<long double, Real>, mpl::bool_< t1::value <= t4::value>, mpl::bool_<0 != t1::value> >,
+ mpl::int_<construct_from_long_double>,
+#ifdef BOOST_MATH_USE_FLOAT128
+ typename mpl::if_<
+ mpl::and_<boost::is_convertible<BOOST_MATH_FLOAT128_TYPE, Real>, mpl::bool_< t1::value <= t5::value>, mpl::bool_<0 != t1::value> >,
+ mpl::int_<construct_from_float128>,
+ typename mpl::if_<
+ mpl::and_<mpl::bool_< t1::value <= max_string_digits>, mpl::bool_<0 != t1::value> >,
+ mpl::int_<construct_from_string>,
+ mpl::int_<t1::value>
+ >::type
+ >::type
+#else
+ typename mpl::if_<
+ mpl::and_<mpl::bool_< t1::value <= max_string_digits>, mpl::bool_<0 != t1::value> >,
+ mpl::int_<construct_from_string>,
+ mpl::int_<t1::value>
+ >::type
+#endif
+ >::type
+ >::type
+ >::type type;
+ };
+
+#ifdef BOOST_HAS_THREADS
+#define BOOST_MATH_CONSTANT_THREAD_HELPER(name, prefix) \
+ boost::once_flag f = BOOST_ONCE_INIT;\
+ boost::call_once(f, &BOOST_JOIN(BOOST_JOIN(string_, get_), name)<T>);
+#else
+#define BOOST_MATH_CONSTANT_THREAD_HELPER(name, prefix)
+#endif
+
+ namespace detail{
+
+ template <class Real, class Policy = boost::math::policies::policy<> >
+ struct constant_return
+ {
+ typedef typename construction_traits<Real, Policy>::type construct_type;
+ typedef typename mpl::if_c<
+ (construct_type::value == construct_from_string) || (construct_type::value > construct_max),
+ const Real&, Real>::type type;
+ };
+
+ template <class T, const T& (*F)()>
+ struct constant_initializer
+ {
+ static void force_instantiate()
+ {
+ init.force_instantiate();
+ }
+ private:
+ struct initializer
+ {
+ initializer()
+ {
+ F();
+ }
+ void force_instantiate()const{}
+ };
+ static const initializer init;
+ };
+
+ template <class T, const T& (*F)()>
+ typename constant_initializer<T, F>::initializer const constant_initializer<T, F>::init;
+
+ template <class T, int N, const T& (*F)(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))>
+ struct constant_initializer2
+ {
+ static void force_instantiate()
+ {
+ init.force_instantiate();
+ }
+ private:
+ struct initializer
+ {
+ initializer()
+ {
+ F();
+ }
+ void force_instantiate()const{}
+ };
+ static const initializer init;
+ };
+
+ template <class T, int N, const T& (*F)(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))>
+ typename constant_initializer2<T, N, F>::initializer const constant_initializer2<T, N, F>::init;
+
+ }
+
+#ifdef BOOST_MATH_USE_FLOAT128
+# define BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x) \
+ static inline BOOST_CONSTEXPR T get(const mpl::int_<construct_from_float128>&) BOOST_NOEXCEPT\
+ { return BOOST_JOIN(x, Q); }
+#else
+# define BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x)
+#endif
+
+#ifdef BOOST_NO_CXX11_THREAD_LOCAL
+# define BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name) constant_initializer<T, & BOOST_JOIN(constant_, name)<T>::get_from_variable_precision>::force_instantiate();
+#else
+# define BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)
+#endif
+
+#define BOOST_DEFINE_MATH_CONSTANT(name, x, y)\
+ namespace detail{\
+ template <class T> struct BOOST_JOIN(constant_, name){\
+ private:\
+ /* The default implementations come next: */ \
+ static inline const T& get_from_string()\
+ {\
+ static const T result(boost::math::tools::convert_from_string<T>(y));\
+ return result;\
+ }\
+ /* This one is for very high precision that is none the less known at compile time: */ \
+ template <int N> static T compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>));\
+ template <int N> static inline const T& get_from_compute(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(mpl::int_<N>))\
+ {\
+ static const T result = compute<N>();\
+ return result;\
+ }\
+ static inline const T& get_from_variable_precision()\
+ {\
+ static BOOST_MATH_THREAD_LOCAL int digits = 0;\
+ static BOOST_MATH_THREAD_LOCAL T value;\
+ int current_digits = boost::math::tools::digits<T>();\
+ if(digits != current_digits)\
+ {\
+ value = current_digits > max_string_digits ? compute<0>() : T(boost::math::tools::convert_from_string<T>(y));\
+ digits = current_digits; \
+ }\
+ return value;\
+ }\
+ /* public getters come next */\
+ public:\
+ static inline const T& get(const mpl::int_<construct_from_string>&)\
+ {\
+ constant_initializer<T, & BOOST_JOIN(constant_, name)<T>::get_from_string >::force_instantiate();\
+ return get_from_string();\
+ }\
+ static inline BOOST_CONSTEXPR T get(const mpl::int_<construct_from_float>) BOOST_NOEXCEPT\
+ { return BOOST_JOIN(x, F); }\
+ static inline BOOST_CONSTEXPR T get(const mpl::int_<construct_from_double>&) BOOST_NOEXCEPT\
+ { return x; }\
+ static inline BOOST_CONSTEXPR T get(const mpl::int_<construct_from_long_double>&) BOOST_NOEXCEPT\
+ { return BOOST_JOIN(x, L); }\
+ BOOST_MATH_FLOAT128_CONSTANT_OVERLOAD(x) \
+ template <int N> static inline const T& get(const mpl::int_<N>&)\
+ {\
+ constant_initializer2<T, N, & BOOST_JOIN(constant_, name)<T>::template get_from_compute<N> >::force_instantiate();\
+ return get_from_compute<N>(); \
+ }\
+ /* This one is for true arbitary precision, which may well vary at runtime: */ \
+ static inline T get(const mpl::int_<0>&)\
+ {\
+ BOOST_MATH_PRECOMPUTE_IF_NOT_LOCAL(constant_, name)\
+ return get_from_variable_precision(); }\
+ }; /* end of struct */\
+ } /* namespace detail */ \
+ \
+ \
+ /* The actual forwarding function: */ \
+ template <class T, class Policy> inline BOOST_CONSTEXPR typename detail::constant_return<T, Policy>::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T) BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(Policy)) BOOST_MATH_NOEXCEPT(T)\
+ { return detail:: BOOST_JOIN(constant_, name)<T>::get(typename construction_traits<T, Policy>::type()); }\
+ template <class T> inline BOOST_CONSTEXPR typename detail::constant_return<T>::type name(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_MATH_NOEXCEPT(T)\
+ { return name<T, boost::math::policies::policy<> >(); }\
+ \
+ \
+ /* Now the namespace specific versions: */ \
+ } namespace float_constants{ BOOST_STATIC_CONSTEXPR float name = BOOST_JOIN(x, F); }\
+ namespace double_constants{ BOOST_STATIC_CONSTEXPR double name = x; } \
+ namespace long_double_constants{ BOOST_STATIC_CONSTEXPR long double name = BOOST_JOIN(x, L); }\
+ namespace constants{
+
+ BOOST_DEFINE_MATH_CONSTANT(half, 5.000000000000000000000000000000000000e-01, "5.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
+ BOOST_DEFINE_MATH_CONSTANT(third, 3.333333333333333333333333333333333333e-01, "3.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333e-01")
+ BOOST_DEFINE_MATH_CONSTANT(twothirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
+ BOOST_DEFINE_MATH_CONSTANT(two_thirds, 6.666666666666666666666666666666666666e-01, "6.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
+ BOOST_DEFINE_MATH_CONSTANT(sixth, 1.666666666666666666666666666666666666e-01, "1.66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666667e-01")
+ BOOST_DEFINE_MATH_CONSTANT(three_quarters, 7.500000000000000000000000000000000000e-01, "7.50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-01")
+ BOOST_DEFINE_MATH_CONSTANT(root_two, 1.414213562373095048801688724209698078e+00, "1.41421356237309504880168872420969807856967187537694807317667973799073247846210703885038753432764157273501384623e+00")
+ BOOST_DEFINE_MATH_CONSTANT(root_three, 1.732050807568877293527446341505872366e+00, "1.73205080756887729352744634150587236694280525381038062805580697945193301690880003708114618675724857567562614142e+00")
+ BOOST_DEFINE_MATH_CONSTANT(half_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01")
+ BOOST_DEFINE_MATH_CONSTANT(ln_two, 6.931471805599453094172321214581765680e-01, "6.93147180559945309417232121458176568075500134360255254120680009493393621969694715605863326996418687542001481021e-01")
+ BOOST_DEFINE_MATH_CONSTANT(ln_ln_two, -3.665129205816643270124391582326694694e-01, "-3.66512920581664327012439158232669469454263447837105263053677713670561615319352738549455822856698908358302523045e-01")
+ BOOST_DEFINE_MATH_CONSTANT(root_ln_four, 1.177410022515474691011569326459699637e+00, "1.17741002251547469101156932645969963774738568938582053852252575650002658854698492680841813836877081106747157858e+00")
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_two, 7.071067811865475244008443621048490392e-01, "7.07106781186547524400844362104849039284835937688474036588339868995366239231053519425193767163820786367506923115e-01")
+ BOOST_DEFINE_MATH_CONSTANT(pi, 3.141592653589793238462643383279502884e+00, "3.14159265358979323846264338327950288419716939937510582097494459230781640628620899862803482534211706798214808651e+00")
+ BOOST_DEFINE_MATH_CONSTANT(half_pi, 1.570796326794896619231321691639751442e+00, "1.57079632679489661923132169163975144209858469968755291048747229615390820314310449931401741267105853399107404326e+00")
+ BOOST_DEFINE_MATH_CONSTANT(third_pi, 1.047197551196597746154214461093167628e+00, "1.04719755119659774615421446109316762806572313312503527365831486410260546876206966620934494178070568932738269550e+00")
+ BOOST_DEFINE_MATH_CONSTANT(sixth_pi, 5.235987755982988730771072305465838140e-01, "5.23598775598298873077107230546583814032861566562517636829157432051302734381034833104672470890352844663691347752e-01")
+ BOOST_DEFINE_MATH_CONSTANT(two_pi, 6.283185307179586476925286766559005768e+00, "6.28318530717958647692528676655900576839433879875021164194988918461563281257241799725606965068423413596429617303e+00")
+ BOOST_DEFINE_MATH_CONSTANT(two_thirds_pi, 2.094395102393195492308428922186335256e+00, "2.09439510239319549230842892218633525613144626625007054731662972820521093752413933241868988356141137865476539101e+00")
+ BOOST_DEFINE_MATH_CONSTANT(three_quarters_pi, 2.356194490192344928846982537459627163e+00, "2.35619449019234492884698253745962716314787704953132936573120844423086230471465674897102611900658780098661106488e+00")
+ BOOST_DEFINE_MATH_CONSTANT(four_thirds_pi, 4.188790204786390984616857844372670512e+00, "4.18879020478639098461685784437267051226289253250014109463325945641042187504827866483737976712282275730953078202e+00")
+ BOOST_DEFINE_MATH_CONSTANT(one_div_two_pi, 1.591549430918953357688837633725143620e-01, "1.59154943091895335768883763372514362034459645740456448747667344058896797634226535090113802766253085956072842727e-01")
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_two_pi, 3.989422804014326779399460599343818684e-01, "3.98942280401432677939946059934381868475858631164934657665925829670657925899301838501252333907306936430302558863e-01")
+ BOOST_DEFINE_MATH_CONSTANT(root_pi, 1.772453850905516027298167483341145182e+00, "1.77245385090551602729816748334114518279754945612238712821380778985291128459103218137495065673854466541622682362e+00")
+ BOOST_DEFINE_MATH_CONSTANT(root_half_pi, 1.253314137315500251207882642405522626e+00, "1.25331413731550025120788264240552262650349337030496915831496178817114682730392098747329791918902863305800498633e+00")
+ BOOST_DEFINE_MATH_CONSTANT(root_two_pi, 2.506628274631000502415765284811045253e+00, "2.50662827463100050241576528481104525300698674060993831662992357634229365460784197494659583837805726611600997267e+00")
+ BOOST_DEFINE_MATH_CONSTANT(log_root_two_pi, 9.189385332046727417803297364056176398e-01, "9.18938533204672741780329736405617639861397473637783412817151540482765695927260397694743298635954197622005646625e-01")
+ BOOST_DEFINE_MATH_CONSTANT(one_div_root_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01")
+ BOOST_DEFINE_MATH_CONSTANT(root_one_div_pi, 5.641895835477562869480794515607725858e-01, "5.64189583547756286948079451560772585844050629328998856844085721710642468441493414486743660202107363443028347906e-01")
+ BOOST_DEFINE_MATH_CONSTANT(pi_minus_three, 1.415926535897932384626433832795028841e-01, "1.41592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067982148086513e-01")
+ BOOST_DEFINE_MATH_CONSTANT(four_minus_pi, 8.584073464102067615373566167204971158e-01, "8.58407346410206761537356616720497115802830600624894179025055407692183593713791001371965174657882932017851913487e-01")
+ //BOOST_DEFINE_MATH_CONSTANT(pow23_four_minus_pi, 7.953167673715975443483953350568065807e-01, "7.95316767371597544348395335056806580727639173327713205445302234388856268267518187590758006888600828436839800178e-01")
+ BOOST_DEFINE_MATH_CONSTANT(pi_pow_e, 2.245915771836104547342715220454373502e+01, "2.24591577183610454734271522045437350275893151339966922492030025540669260403991179123185197527271430315314500731e+01")
+ BOOST_DEFINE_MATH_CONSTANT(pi_sqr, 9.869604401089358618834490999876151135e+00, "9.86960440108935861883449099987615113531369940724079062641334937622004482241920524300177340371855223182402591377e+00")
+ BOOST_DEFINE_MATH_CONSTANT(pi_sqr_div_six, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00")
+ BOOST_DEFINE_MATH_CONSTANT(pi_cubed, 3.100627668029982017547631506710139520e+01, "3.10062766802998201754763150671013952022252885658851076941445381038063949174657060375667010326028861930301219616e+01")
+ BOOST_DEFINE_MATH_CONSTANT(cbrt_pi, 1.464591887561523263020142527263790391e+00, "1.46459188756152326302014252726379039173859685562793717435725593713839364979828626614568206782035382089750397002e+00")
+ BOOST_DEFINE_MATH_CONSTANT(one_div_cbrt_pi, 6.827840632552956814670208331581645981e-01, "6.82784063255295681467020833158164598108367515632448804042681583118899226433403918237673501922595519865685577274e-01")
+ BOOST_DEFINE_MATH_CONSTANT(e, 2.718281828459045235360287471352662497e+00, "2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193e+00")
+ BOOST_DEFINE_MATH_CONSTANT(exp_minus_half, 6.065306597126334236037995349911804534e-01, "6.06530659712633423603799534991180453441918135487186955682892158735056519413748423998647611507989456026423789794e-01")
+ BOOST_DEFINE_MATH_CONSTANT(exp_minus_one, 3.678794411714423215955237701614608674e-01, "3.67879441171442321595523770161460867445811131031767834507836801697461495744899803357147274345919643746627325277e-01")
+ BOOST_DEFINE_MATH_CONSTANT(e_pow_pi, 2.314069263277926900572908636794854738e+01, "2.31406926327792690057290863679485473802661062426002119934450464095243423506904527835169719970675492196759527048e+01")
+ BOOST_DEFINE_MATH_CONSTANT(root_e, 1.648721270700128146848650787814163571e+00, "1.64872127070012814684865078781416357165377610071014801157507931164066102119421560863277652005636664300286663776e+00")
+ BOOST_DEFINE_MATH_CONSTANT(log10_e, 4.342944819032518276511289189166050822e-01, "4.34294481903251827651128918916605082294397005803666566114453783165864649208870774729224949338431748318706106745e-01")
+ BOOST_DEFINE_MATH_CONSTANT(one_div_log10_e, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00")
+ BOOST_DEFINE_MATH_CONSTANT(ln_ten, 2.302585092994045684017991454684364207e+00, "2.30258509299404568401799145468436420760110148862877297603332790096757260967735248023599720508959829834196778404e+00")
+ BOOST_DEFINE_MATH_CONSTANT(degree, 1.745329251994329576923690768488612713e-02, "1.74532925199432957692369076848861271344287188854172545609719144017100911460344944368224156963450948221230449251e-02")
+ BOOST_DEFINE_MATH_CONSTANT(radian, 5.729577951308232087679815481410517033e+01, "5.72957795130823208767981548141051703324054724665643215491602438612028471483215526324409689958511109441862233816e+01")
+ BOOST_DEFINE_MATH_CONSTANT(sin_one, 8.414709848078965066525023216302989996e-01, "8.41470984807896506652502321630298999622563060798371065672751709991910404391239668948639743543052695854349037908e-01")
+ BOOST_DEFINE_MATH_CONSTANT(cos_one, 5.403023058681397174009366074429766037e-01, "5.40302305868139717400936607442976603732310420617922227670097255381100394774471764517951856087183089343571731160e-01")
+ BOOST_DEFINE_MATH_CONSTANT(sinh_one, 1.175201193643801456882381850595600815e+00, "1.17520119364380145688238185059560081515571798133409587022956541301330756730432389560711745208962339184041953333e+00")
+ BOOST_DEFINE_MATH_CONSTANT(cosh_one, 1.543080634815243778477905620757061682e+00, "1.54308063481524377847790562075706168260152911236586370473740221471076906304922369896426472643554303558704685860e+00")
+ BOOST_DEFINE_MATH_CONSTANT(phi, 1.618033988749894848204586834365638117e+00, "1.61803398874989484820458683436563811772030917980576286213544862270526046281890244970720720418939113748475408808e+00")
+ BOOST_DEFINE_MATH_CONSTANT(ln_phi, 4.812118250596034474977589134243684231e-01, "4.81211825059603447497758913424368423135184334385660519661018168840163867608221774412009429122723474997231839958e-01")
+ BOOST_DEFINE_MATH_CONSTANT(one_div_ln_phi, 2.078086921235027537601322606117795767e+00, "2.07808692123502753760132260611779576774219226778328348027813992191974386928553540901445615414453604821933918634e+00")
+ BOOST_DEFINE_MATH_CONSTANT(euler, 5.772156649015328606065120900824024310e-01, "5.77215664901532860606512090082402431042159335939923598805767234884867726777664670936947063291746749514631447250e-01")
+ BOOST_DEFINE_MATH_CONSTANT(one_div_euler, 1.732454714600633473583025315860829681e+00, "1.73245471460063347358302531586082968115577655226680502204843613287065531408655243008832840219409928068072365714e+00")
+ BOOST_DEFINE_MATH_CONSTANT(euler_sqr, 3.331779238077186743183761363552442266e-01, "3.33177923807718674318376136355244226659417140249629743150833338002265793695756669661263268631715977303039565603e-01")
+ BOOST_DEFINE_MATH_CONSTANT(zeta_two, 1.644934066848226436472415166646025189e+00, "1.64493406684822643647241516664602518921894990120679843773555822937000747040320087383362890061975870530400431896e+00")
+ BOOST_DEFINE_MATH_CONSTANT(zeta_three, 1.202056903159594285399738161511449990e+00, "1.20205690315959428539973816151144999076498629234049888179227155534183820578631309018645587360933525814619915780e+00")
+ BOOST_DEFINE_MATH_CONSTANT(catalan, 9.159655941772190150546035149323841107e-01, "9.15965594177219015054603514932384110774149374281672134266498119621763019776254769479356512926115106248574422619e-01")
+ BOOST_DEFINE_MATH_CONSTANT(glaisher, 1.282427129100622636875342568869791727e+00, "1.28242712910062263687534256886979172776768892732500119206374002174040630885882646112973649195820237439420646120e+00")
+ BOOST_DEFINE_MATH_CONSTANT(khinchin, 2.685452001065306445309714835481795693e+00, "2.68545200106530644530971483548179569382038229399446295305115234555721885953715200280114117493184769799515346591e+00")
+ BOOST_DEFINE_MATH_CONSTANT(extreme_value_skewness, 1.139547099404648657492793019389846112e+00, "1.13954709940464865749279301938984611208759979583655182472165571008524800770607068570718754688693851501894272049e+00")
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_skewness, 6.311106578189371381918993515442277798e-01, "6.31110657818937138191899351544227779844042203134719497658094585692926819617473725459905027032537306794400047264e-01")
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis, 3.245089300687638062848660410619754415e+00, "3.24508930068763806284866041061975441541706673178920936177133764493367904540874159051490619368679348977426462633e+00")
+ BOOST_DEFINE_MATH_CONSTANT(rayleigh_kurtosis_excess, 2.450893006876380628486604106197544154e-01, "2.45089300687638062848660410619754415417066731789209361771337644933679045408741590514906193686793489774264626328e-01")
+
+ BOOST_DEFINE_MATH_CONSTANT(two_div_pi, 6.366197723675813430755350534900574481e-01, "6.36619772367581343075535053490057448137838582961825794990669376235587190536906140360455211065012343824291370907e-01")
+ BOOST_DEFINE_MATH_CONSTANT(root_two_div_pi, 7.978845608028653558798921198687637369e-01, "7.97884560802865355879892119868763736951717262329869315331851659341315851798603677002504667814613872860605117725e-01")
+
+
+} // namespace constants
+} // namespace math
+} // namespace boost
+
+//
+// We deliberately include this *after* all the declarations above,
+// that way the calculation routines can call on other constants above:
+//
+#include <boost/math/constants/calculate_constants.hpp>
+
+#endif // BOOST_MATH_CONSTANTS_CONSTANTS_INCLUDED
+
+
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/beta.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/beta.hpp
index 5ecf902d990..5ecf902d990 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/beta.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/beta.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/binomial.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/binomial.hpp
index 620bf9b1214..620bf9b1214 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/binomial.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/binomial.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/cauchy.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/cauchy.hpp
index 5a3a64f0f2c..5a3a64f0f2c 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/cauchy.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/cauchy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/chi_squared.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/chi_squared.hpp
index 071c7756f49..071c7756f49 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/chi_squared.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/chi_squared.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/complement.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/complement.hpp
index 26d0d49e6de..26d0d49e6de 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/complement.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/complement.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/detail/common_error_handling.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/detail/common_error_handling.hpp
index 486fb0b5c8d..486fb0b5c8d 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/detail/common_error_handling.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/detail/common_error_handling.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/detail/derived_accessors.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/detail/derived_accessors.hpp
index 00f5a93258c..00f5a93258c 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/detail/derived_accessors.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/detail/derived_accessors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/detail/generic_mode.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_mode.hpp
index 3857c9f2ec9..3857c9f2ec9 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/detail/generic_mode.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_mode.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/detail/generic_quantile.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_quantile.hpp
index afde2cacb71..afde2cacb71 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/detail/generic_quantile.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/detail/generic_quantile.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/detail/inv_discrete_quantile.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/detail/inv_discrete_quantile.hpp
index 23e00b8e036..23e00b8e036 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/detail/inv_discrete_quantile.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/detail/inv_discrete_quantile.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/exponential.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/exponential.hpp
index 05c49374ed1..05c49374ed1 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/exponential.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/exponential.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/distributions/extreme_value.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/extreme_value.hpp
new file mode 100644
index 00000000000..3f745868297
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/extreme_value.hpp
@@ -0,0 +1,300 @@
+// Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_STATS_EXTREME_VALUE_HPP
+#define BOOST_STATS_EXTREME_VALUE_HPP
+
+#include <boost/math/distributions/fwd.hpp>
+#include <boost/math/constants/constants.hpp>
+#include <boost/math/special_functions/log1p.hpp>
+#include <boost/math/special_functions/expm1.hpp>
+#include <boost/math/distributions/complement.hpp>
+#include <boost/math/distributions/detail/common_error_handling.hpp>
+#include <boost/config/no_tr1/cmath.hpp>
+
+//
+// This is the maximum extreme value distribution, see
+// http://www.itl.nist.gov/div898/handbook/eda/section3/eda366g.htm
+// and http://mathworld.wolfram.com/ExtremeValueDistribution.html
+// Also known as a Fisher-Tippett distribution, a log-Weibull
+// distribution or a Gumbel distribution.
+
+#include <utility>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
+#endif
+
+namespace boost{ namespace math{
+
+namespace detail{
+//
+// Error check:
+//
+template <class RealType, class Policy>
+inline bool verify_scale_b(const char* function, RealType b, RealType* presult, const Policy& pol)
+{
+ if((b <= 0) || !(boost::math::isfinite)(b))
+ {
+ *presult = policies::raise_domain_error<RealType>(
+ function,
+ "The scale parameter \"b\" must be finite and > 0, but was: %1%.", b, pol);
+ return false;
+ }
+ return true;
+}
+
+} // namespace detail
+
+template <class RealType = double, class Policy = policies::policy<> >
+class extreme_value_distribution
+{
+public:
+ typedef RealType value_type;
+ typedef Policy policy_type;
+
+ extreme_value_distribution(RealType a = 0, RealType b = 1)
+ : m_a(a), m_b(b)
+ {
+ RealType err;
+ detail::verify_scale_b("boost::math::extreme_value_distribution<%1%>::extreme_value_distribution", b, &err, Policy());
+ detail::check_finite("boost::math::extreme_value_distribution<%1%>::extreme_value_distribution", a, &err, Policy());
+ } // extreme_value_distribution
+
+ RealType location()const { return m_a; }
+ RealType scale()const { return m_b; }
+
+private:
+ RealType m_a, m_b;
+};
+
+typedef extreme_value_distribution<double> extreme_value;
+
+template <class RealType, class Policy>
+inline const std::pair<RealType, RealType> range(const extreme_value_distribution<RealType, Policy>& /*dist*/)
+{ // Range of permissible values for random variable x.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(
+ std::numeric_limits<RealType>::has_infinity ? -std::numeric_limits<RealType>::infinity() : -max_value<RealType>(),
+ std::numeric_limits<RealType>::has_infinity ? std::numeric_limits<RealType>::infinity() : max_value<RealType>());
+}
+
+template <class RealType, class Policy>
+inline const std::pair<RealType, RealType> support(const extreme_value_distribution<RealType, Policy>& /*dist*/)
+{ // Range of supported values for random variable x.
+ // This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
+ using boost::math::tools::max_value;
+ return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
+}
+
+template <class RealType, class Policy>
+inline RealType pdf(const extreme_value_distribution<RealType, Policy>& dist, const RealType& x)
+{
+ BOOST_MATH_STD_USING // for ADL of std functions
+
+ static const char* function = "boost::math::pdf(const extreme_value_distribution<%1%>&, %1%)";
+
+ RealType a = dist.location();
+ RealType b = dist.scale();
+ RealType result = 0;
+ if(0 == detail::verify_scale_b(function, b, &result, Policy()))
+ return result;
+ if(0 == detail::check_finite(function, a, &result, Policy()))
+ return result;
+ if((boost::math::isinf)(x))
+ return 0.0f;
+ if(0 == detail::check_x(function, x, &result, Policy()))
+ return result;
+ RealType e = (a - x) / b;
+ if(e < tools::log_max_value<RealType>())
+ result = exp(e) * exp(-exp(e)) / b;
+ // else.... result *must* be zero since exp(e) is infinite...
+ return result;
+} // pdf
+
+template <class RealType, class Policy>
+inline RealType cdf(const extreme_value_distribution<RealType, Policy>& dist, const RealType& x)
+{
+ BOOST_MATH_STD_USING // for ADL of std functions
+
+ static const char* function = "boost::math::cdf(const extreme_value_distribution<%1%>&, %1%)";
+
+ if((boost::math::isinf)(x))
+ return x < 0 ? 0.0f : 1.0f;
+ RealType a = dist.location();
+ RealType b = dist.scale();
+ RealType result = 0;
+ if(0 == detail::verify_scale_b(function, b, &result, Policy()))
+ return result;
+ if(0 == detail::check_finite(function, a, &result, Policy()))
+ return result;
+ if(0 == detail::check_finite(function, a, &result, Policy()))
+ return result;
+ if(0 == detail::check_x("boost::math::cdf(const extreme_value_distribution<%1%>&, %1%)", x, &result, Policy()))
+ return result;
+
+ result = exp(-exp((a-x)/b));
+
+ return result;
+} // cdf
+
+template <class RealType, class Policy>
+RealType quantile(const extreme_value_distribution<RealType, Policy>& dist, const RealType& p)
+{
+ BOOST_MATH_STD_USING // for ADL of std functions
+
+ static const char* function = "boost::math::quantile(const extreme_value_distribution<%1%>&, %1%)";
+
+ RealType a = dist.location();
+ RealType b = dist.scale();
+ RealType result = 0;
+ if(0 == detail::verify_scale_b(function, b, &result, Policy()))
+ return result;
+ if(0 == detail::check_finite(function, a, &result, Policy()))
+ return result;
+ if(0 == detail::check_probability(function, p, &result, Policy()))
+ return result;
+
+ if(p == 0)
+ return -policies::raise_overflow_error<RealType>(function, 0, Policy());
+ if(p == 1)
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
+
+ result = a - log(-log(p)) * b;
+
+ return result;
+} // quantile
+
+template <class RealType, class Policy>
+inline RealType cdf(const complemented2_type<extreme_value_distribution<RealType, Policy>, RealType>& c)
+{
+ BOOST_MATH_STD_USING // for ADL of std functions
+
+ static const char* function = "boost::math::cdf(const extreme_value_distribution<%1%>&, %1%)";
+
+ if((boost::math::isinf)(c.param))
+ return c.param < 0 ? 1.0f : 0.0f;
+ RealType a = c.dist.location();
+ RealType b = c.dist.scale();
+ RealType result = 0;
+ if(0 == detail::verify_scale_b(function, b, &result, Policy()))
+ return result;
+ if(0 == detail::check_finite(function, a, &result, Policy()))
+ return result;
+ if(0 == detail::check_x(function, c.param, &result, Policy()))
+ return result;
+
+ result = -boost::math::expm1(-exp((a-c.param)/b), Policy());
+
+ return result;
+}
+
+template <class RealType, class Policy>
+RealType quantile(const complemented2_type<extreme_value_distribution<RealType, Policy>, RealType>& c)
+{
+ BOOST_MATH_STD_USING // for ADL of std functions
+
+ static const char* function = "boost::math::quantile(const extreme_value_distribution<%1%>&, %1%)";
+
+ RealType a = c.dist.location();
+ RealType b = c.dist.scale();
+ RealType q = c.param;
+ RealType result = 0;
+ if(0 == detail::verify_scale_b(function, b, &result, Policy()))
+ return result;
+ if(0 == detail::check_finite(function, a, &result, Policy()))
+ return result;
+ if(0 == detail::check_probability(function, q, &result, Policy()))
+ return result;
+
+ if(q == 0)
+ return policies::raise_overflow_error<RealType>(function, 0, Policy());
+ if(q == 1)
+ return -policies::raise_overflow_error<RealType>(function, 0, Policy());
+
+ result = a - log(-boost::math::log1p(-q, Policy())) * b;
+
+ return result;
+}
+
+template <class RealType, class Policy>
+inline RealType mean(const extreme_value_distribution<RealType, Policy>& dist)
+{
+ RealType a = dist.location();
+ RealType b = dist.scale();
+ RealType result = 0;
+ if(0 == detail::verify_scale_b("boost::math::mean(const extreme_value_distribution<%1%>&)", b, &result, Policy()))
+ return result;
+ if (0 == detail::check_finite("boost::math::mean(const extreme_value_distribution<%1%>&)", a, &result, Policy()))
+ return result;
+ return a + constants::euler<RealType>() * b;
+}
+
+template <class RealType, class Policy>
+inline RealType standard_deviation(const extreme_value_distribution<RealType, Policy>& dist)
+{
+ BOOST_MATH_STD_USING // for ADL of std functions.
+
+ RealType b = dist.scale();
+ RealType result = 0;
+ if(0 == detail::verify_scale_b("boost::math::standard_deviation(const extreme_value_distribution<%1%>&)", b, &result, Policy()))
+ return result;
+ if(0 == detail::check_finite("boost::math::standard_deviation(const extreme_value_distribution<%1%>&)", dist.location(), &result, Policy()))
+ return result;
+ return constants::pi<RealType>() * b / sqrt(static_cast<RealType>(6));
+}
+
+template <class RealType, class Policy>
+inline RealType mode(const extreme_value_distribution<RealType, Policy>& dist)
+{
+ return dist.location();
+}
+
+template <class RealType, class Policy>
+inline RealType median(const extreme_value_distribution<RealType, Policy>& dist)
+{
+ using constants::ln_ln_two;
+ return dist.location() - dist.scale() * ln_ln_two<RealType>();
+}
+
+template <class RealType, class Policy>
+inline RealType skewness(const extreme_value_distribution<RealType, Policy>& /*dist*/)
+{
+ //
+ // This is 12 * sqrt(6) * zeta(3) / pi^3:
+ // See http://mathworld.wolfram.com/ExtremeValueDistribution.html
+ //
+ return static_cast<RealType>(1.1395470994046486574927930193898461120875997958366L);
+}
+
+template <class RealType, class Policy>
+inline RealType kurtosis(const extreme_value_distribution<RealType, Policy>& /*dist*/)
+{
+ // See http://mathworld.wolfram.com/ExtremeValueDistribution.html
+ return RealType(27) / 5;
+}
+
+template <class RealType, class Policy>
+inline RealType kurtosis_excess(const extreme_value_distribution<RealType, Policy>& /*dist*/)
+{
+ // See http://mathworld.wolfram.com/ExtremeValueDistribution.html
+ return RealType(12) / 5;
+}
+
+
+} // namespace math
+} // namespace boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+// This include must be at the end, *after* the accessors
+// for this distribution have been defined, in order to
+// keep compilers that support two-phase lookup happy.
+#include <boost/math/distributions/detail/derived_accessors.hpp>
+
+#endif // BOOST_STATS_EXTREME_VALUE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/fisher_f.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/fisher_f.hpp
index 798db2fa75f..798db2fa75f 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/fisher_f.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/fisher_f.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/fwd.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/fwd.hpp
index 5b212c8ec66..5b212c8ec66 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/gamma.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/gamma.hpp
index 9a9e2a4f524..9a9e2a4f524 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/gamma.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/gamma.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/geometric.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/geometric.hpp
index 6c9713eadd8..6c9713eadd8 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/geometric.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/geometric.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/hyperexponential.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/hyperexponential.hpp
index 4ed281c6626..4ed281c6626 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/hyperexponential.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/hyperexponential.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/laplace.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/laplace.hpp
index 09b24c868b5..09b24c868b5 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/laplace.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/laplace.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/lognormal.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/lognormal.hpp
index 4e6c0610d4b..4e6c0610d4b 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/lognormal.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/lognormal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/negative_binomial.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/negative_binomial.hpp
index 3b4de4062f7..3b4de4062f7 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/negative_binomial.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/negative_binomial.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/non_central_chi_squared.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/non_central_chi_squared.hpp
index 038d951b029..038d951b029 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/non_central_chi_squared.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/non_central_chi_squared.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/normal.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/normal.hpp
index 32cf66e3ef0..32cf66e3ef0 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/normal.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/normal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/poisson.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/poisson.hpp
index e4665bff69b..e4665bff69b 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/poisson.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/poisson.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/students_t.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/students_t.hpp
index 6bf0e3cd02b..6bf0e3cd02b 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/students_t.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/students_t.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/triangular.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/triangular.hpp
index 1e49a38faf7..1e49a38faf7 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/triangular.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/triangular.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/uniform.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/uniform.hpp
index 856c144e369..856c144e369 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/uniform.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/uniform.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/distributions/weibull.hpp b/src/third_party/boost-1.69.0/boost/math/distributions/weibull.hpp
index da1189090cb..da1189090cb 100644
--- a/src/third_party/boost-1.68.0/boost/math/distributions/weibull.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/distributions/weibull.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/policies/error_handling.hpp b/src/third_party/boost-1.69.0/boost/math/policies/error_handling.hpp
index 124337ee879..124337ee879 100644
--- a/src/third_party/boost-1.68.0/boost/math/policies/error_handling.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/policies/error_handling.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/policies/policy.hpp b/src/third_party/boost-1.69.0/boost/math/policies/policy.hpp
index c1e1a7be4a4..c1e1a7be4a4 100644
--- a/src/third_party/boost-1.68.0/boost/math/policies/policy.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/policies/policy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/acosh.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/acosh.hpp
index 3b7edbad3f8..3b7edbad3f8 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/acosh.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/acosh.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/asinh.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/asinh.hpp
index e55a3562846..e55a3562846 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/asinh.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/asinh.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/atanh.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/atanh.hpp
index 871a465a8cd..871a465a8cd 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/atanh.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/atanh.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/bernoulli.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/bernoulli.hpp
index e5323fbd425..e5323fbd425 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/bernoulli.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/bernoulli.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/bessel.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/bessel.hpp
index 69f931bd5a4..69f931bd5a4 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/bessel.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/bessel.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/beta.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/beta.hpp
index 35b114ef158..35b114ef158 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/beta.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/beta.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/binomial.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/binomial.hpp
index 9a24fc15bbd..9a24fc15bbd 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/binomial.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/binomial.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/cbrt.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/cbrt.hpp
index c34ad39949a..c34ad39949a 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/cbrt.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/cbrt.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/cos_pi.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/cos_pi.hpp
index 669a2c87ae3..669a2c87ae3 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/cos_pi.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/cos_pi.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp
index b5a71c78eb2..b5a71c78eb2 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/airy_ai_bi_zero.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bernoulli_details.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bernoulli_details.hpp
index 75fadbf34ae..75fadbf34ae 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bernoulli_details.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bernoulli_details.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_i0.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i0.hpp
index c70f42e57a2..c70f42e57a2 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_i0.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_i1.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i1.hpp
index 3c288d72e51..3c288d72e51 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_i1.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_i1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_ik.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_ik.hpp
index aac1781e10d..aac1781e10d 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_ik.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_ik.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_j0.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j0.hpp
index ebcab17240f..ebcab17240f 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_j0.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_j1.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j1.hpp
index 91ecd2832d0..91ecd2832d0 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_j1.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_j1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jn.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jn.hpp
index 2413630637f..2413630637f 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jn.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy.hpp
index b67d989b689..b67d989b689 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_asym.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_asym.hpp
index 4d7ac485ad6..4d7ac485ad6 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_asym.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_asym.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_series.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_series.hpp
index d50bef84e81..d50bef84e81 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_series.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_series.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_zero.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_zero.hpp
index ecd8696eeeb..ecd8696eeeb 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_jy_zero.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_jy_zero.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_k0.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k0.hpp
index 74f4014bd9b..74f4014bd9b 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_k0.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_k1.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k1.hpp
index 2ab191fb498..2ab191fb498 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_k1.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_k1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_kn.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_kn.hpp
index 54c4a1cfa7a..54c4a1cfa7a 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_kn.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_kn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_y0.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y0.hpp
index 84b64aaa733..84b64aaa733 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_y0.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_y1.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y1.hpp
index 7dc99c42cd9..7dc99c42cd9 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_y1.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_y1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_yn.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_yn.hpp
index 62d7377e4ff..62d7377e4ff 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/bessel_yn.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/bessel_yn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/erf_inv.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/erf_inv.hpp
index 4e483005216..4e483005216 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/erf_inv.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/erf_inv.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/fp_traits.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/fp_traits.hpp
new file mode 100644
index 00000000000..013f830bcad
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/fp_traits.hpp
@@ -0,0 +1,581 @@
+// fp_traits.hpp
+
+#ifndef BOOST_MATH_FP_TRAITS_HPP
+#define BOOST_MATH_FP_TRAITS_HPP
+
+// Copyright (c) 2006 Johan Rade
+
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+To support old compilers, care has been taken to avoid partial template
+specialization and meta function forwarding.
+With these techniques, the code could be simplified.
+*/
+
+#if defined(__vms) && defined(__DECCXX) && !__IEEE_FLOAT
+// The VAX floating point formats are used (for float and double)
+# define BOOST_FPCLASSIFY_VAX_FORMAT
+#endif
+
+#include <cstring>
+
+#include <boost/assert.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/predef/other/endian.h>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+ namespace std{ using ::memcpy; }
+#endif
+
+#ifndef FP_NORMAL
+
+#define FP_ZERO 0
+#define FP_NORMAL 1
+#define FP_INFINITE 2
+#define FP_NAN 3
+#define FP_SUBNORMAL 4
+
+#else
+
+#define BOOST_HAS_FPCLASSIFY
+
+#ifndef fpclassify
+# if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+ && defined(_GLIBCXX_USE_C99_MATH) \
+ && !(defined(_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC) \
+ && (_GLIBCXX_USE_C99_FP_MACROS_DYNAMIC != 0))
+# ifdef _STLP_VENDOR_CSTD
+# if _STLPORT_VERSION >= 0x520
+# define BOOST_FPCLASSIFY_PREFIX ::__std_alias::
+# else
+# define BOOST_FPCLASSIFY_PREFIX ::_STLP_VENDOR_CSTD::
+# endif
+# else
+# define BOOST_FPCLASSIFY_PREFIX ::std::
+# endif
+# else
+# undef BOOST_HAS_FPCLASSIFY
+# define BOOST_FPCLASSIFY_PREFIX
+# endif
+#elif (defined(__HP_aCC) && !defined(__hppa))
+// aCC 6 appears to do "#define fpclassify fpclassify" which messes us up a bit!
+# define BOOST_FPCLASSIFY_PREFIX ::
+#else
+# define BOOST_FPCLASSIFY_PREFIX
+#endif
+
+#ifdef __MINGW32__
+# undef BOOST_HAS_FPCLASSIFY
+#endif
+
+#endif
+
+
+//------------------------------------------------------------------------------
+
+namespace boost {
+namespace math {
+namespace detail {
+
+//------------------------------------------------------------------------------
+
+/*
+The following classes are used to tag the different methods that are used
+for floating point classification
+*/
+
+struct native_tag {};
+template <bool has_limits>
+struct generic_tag {};
+struct ieee_tag {};
+struct ieee_copy_all_bits_tag : public ieee_tag {};
+struct ieee_copy_leading_bits_tag : public ieee_tag {};
+
+#ifdef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+//
+// These helper functions are used only when numeric_limits<>
+// members are not compile time constants:
+//
+inline bool is_generic_tag_false(const generic_tag<false>*)
+{
+ return true;
+}
+inline bool is_generic_tag_false(const void*)
+{
+ return false;
+}
+#endif
+
+//------------------------------------------------------------------------------
+
+/*
+Most processors support three different floating point precisions:
+single precision (32 bits), double precision (64 bits)
+and extended double precision (80 - 128 bits, depending on the processor)
+
+Note that the C++ type long double can be implemented
+both as double precision and extended double precision.
+*/
+
+struct unknown_precision{};
+struct single_precision {};
+struct double_precision {};
+struct extended_double_precision {};
+
+// native_tag version --------------------------------------------------------------
+
+template<class T> struct fp_traits_native
+{
+ typedef native_tag method;
+};
+
+// generic_tag version -------------------------------------------------------------
+
+template<class T, class U> struct fp_traits_non_native
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ typedef generic_tag<std::numeric_limits<T>::is_specialized> method;
+#else
+ typedef generic_tag<false> method;
+#endif
+};
+
+// ieee_tag versions ---------------------------------------------------------------
+
+/*
+These specializations of fp_traits_non_native contain information needed
+to "parse" the binary representation of a floating point number.
+
+Typedef members:
+
+ bits -- the target type when copying the leading bytes of a floating
+ point number. It is a typedef for uint32_t or uint64_t.
+
+ method -- tells us whether all bytes are copied or not.
+ It is a typedef for ieee_copy_all_bits_tag or ieee_copy_leading_bits_tag.
+
+Static data members:
+
+ sign, exponent, flag, significand -- bit masks that give the meaning of the
+ bits in the leading bytes.
+
+Static function members:
+
+ get_bits(), set_bits() -- provide access to the leading bytes.
+
+*/
+
+// ieee_tag version, float (32 bits) -----------------------------------------------
+
+#ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+
+template<> struct fp_traits_non_native<float, single_precision>
+{
+ typedef ieee_copy_all_bits_tag method;
+
+ BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
+ BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7f800000);
+ BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);
+ BOOST_STATIC_CONSTANT(uint32_t, significand = 0x007fffff);
+
+ typedef uint32_t bits;
+ static void get_bits(float x, uint32_t& a) { std::memcpy(&a, &x, 4); }
+ static void set_bits(float& x, uint32_t a) { std::memcpy(&x, &a, 4); }
+};
+
+// ieee_tag version, double (64 bits) ----------------------------------------------
+
+#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) \
+ || defined(__BORLANDC__) || defined(__CODEGEAR__)
+
+template<> struct fp_traits_non_native<double, double_precision>
+{
+ typedef ieee_copy_leading_bits_tag method;
+
+ BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
+ BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);
+ BOOST_STATIC_CONSTANT(uint32_t, flag = 0);
+ BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+ typedef uint32_t bits;
+
+ static void get_bits(double x, uint32_t& a)
+ {
+ std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+ }
+
+ static void set_bits(double& x, uint32_t a)
+ {
+ std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+ }
+
+private:
+
+#if BOOST_ENDIAN_BIG_BYTE
+ BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif BOOST_ENDIAN_LITTLE_BYTE
+ BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#else
+ BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+//..............................................................................
+
+#else
+
+template<> struct fp_traits_non_native<double, double_precision>
+{
+ typedef ieee_copy_all_bits_tag method;
+
+ static const uint64_t sign = ((uint64_t)0x80000000u) << 32;
+ static const uint64_t exponent = ((uint64_t)0x7ff00000) << 32;
+ static const uint64_t flag = 0;
+ static const uint64_t significand
+ = (((uint64_t)0x000fffff) << 32) + ((uint64_t)0xffffffffu);
+
+ typedef uint64_t bits;
+ static void get_bits(double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+ static void set_bits(double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+
+#endif
+
+#endif // #ifndef BOOST_FPCLASSIFY_VAX_FORMAT
+
+// long double (64 bits) -------------------------------------------------------
+
+#if defined(BOOST_NO_INT64_T) || defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION)\
+ || defined(__BORLANDC__) || defined(__CODEGEAR__)
+
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+ typedef ieee_copy_leading_bits_tag method;
+
+ BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
+ BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);
+ BOOST_STATIC_CONSTANT(uint32_t, flag = 0);
+ BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+ typedef uint32_t bits;
+
+ static void get_bits(long double x, uint32_t& a)
+ {
+ std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+ }
+
+ static void set_bits(long double& x, uint32_t a)
+ {
+ std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+ }
+
+private:
+
+#if BOOST_ENDIAN_BIG_BYTE
+ BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif BOOST_ENDIAN_LITTLE_BYTE
+ BOOST_STATIC_CONSTANT(int, offset_ = 4);
+#else
+ BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+//..............................................................................
+
+#else
+
+template<> struct fp_traits_non_native<long double, double_precision>
+{
+ typedef ieee_copy_all_bits_tag method;
+
+ static const uint64_t sign = (uint64_t)0x80000000u << 32;
+ static const uint64_t exponent = (uint64_t)0x7ff00000 << 32;
+ static const uint64_t flag = 0;
+ static const uint64_t significand
+ = ((uint64_t)0x000fffff << 32) + (uint64_t)0xffffffffu;
+
+ typedef uint64_t bits;
+ static void get_bits(long double x, uint64_t& a) { std::memcpy(&a, &x, 8); }
+ static void set_bits(long double& x, uint64_t a) { std::memcpy(&x, &a, 8); }
+};
+
+#endif
+
+
+// long double (>64 bits), x86 and x64 -----------------------------------------
+
+#if defined(__i386) || defined(__i386__) || defined(_M_IX86) \
+ || defined(__amd64) || defined(__amd64__) || defined(_M_AMD64) \
+ || defined(__x86_64) || defined(__x86_64__) || defined(_M_X64)
+
+// Intel extended double precision format (80 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+ typedef ieee_copy_leading_bits_tag method;
+
+ BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
+ BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);
+ BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000);
+ BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+
+ typedef uint32_t bits;
+
+ static void get_bits(long double x, uint32_t& a)
+ {
+ std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + 6, 4);
+ }
+
+ static void set_bits(long double& x, uint32_t a)
+ {
+ std::memcpy(reinterpret_cast<unsigned char*>(&x) + 6, &a, 4);
+ }
+};
+
+
+// long double (>64 bits), Itanium ---------------------------------------------
+
+#elif defined(__ia64) || defined(__ia64__) || defined(_M_IA64)
+
+// The floating point format is unknown at compile time
+// No template specialization is provided.
+// The generic_tag definition is used.
+
+// The Itanium supports both
+// the Intel extended double precision format (80 bits) and
+// the IEEE extended double precision format with 15 exponent bits (128 bits).
+
+#elif defined(__GNUC__) && (LDBL_MANT_DIG == 106)
+
+//
+// Define nothing here and fall though to generic_tag:
+// We have GCC's "double double" in effect, and any attempt
+// to handle it via bit-fiddling is pretty much doomed to fail...
+//
+
+// long double (>64 bits), PowerPC ---------------------------------------------
+
+#elif defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) \
+ || defined(__ppc) || defined(__ppc__) || defined(__PPC__)
+
+// PowerPC extended double precision format (128 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+ typedef ieee_copy_leading_bits_tag method;
+
+ BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
+ BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7ff00000);
+ BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);
+ BOOST_STATIC_CONSTANT(uint32_t, significand = 0x000fffff);
+
+ typedef uint32_t bits;
+
+ static void get_bits(long double x, uint32_t& a)
+ {
+ std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+ }
+
+ static void set_bits(long double& x, uint32_t a)
+ {
+ std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+ }
+
+private:
+
+#if BOOST_ENDIAN_BIG_BYTE
+ BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif BOOST_ENDIAN_LITTLE_BYTE
+ BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#else
+ BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+
+// long double (>64 bits), Motorola 68K ----------------------------------------
+
+#elif defined(__m68k) || defined(__m68k__) \
+ || defined(__mc68000) || defined(__mc68000__) \
+
+// Motorola extended double precision format (96 bits)
+
+// It is the same format as the Intel extended double precision format,
+// except that 1) it is big-endian, 2) the 3rd and 4th byte are padding, and
+// 3) the flag bit is not set for infinity
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+ typedef ieee_copy_leading_bits_tag method;
+
+ BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
+ BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);
+ BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00008000);
+ BOOST_STATIC_CONSTANT(uint32_t, significand = 0x00007fff);
+
+ // copy 1st, 2nd, 5th and 6th byte. 3rd and 4th byte are padding.
+
+ typedef uint32_t bits;
+
+ static void get_bits(long double x, uint32_t& a)
+ {
+ std::memcpy(&a, &x, 2);
+ std::memcpy(reinterpret_cast<unsigned char*>(&a) + 2,
+ reinterpret_cast<const unsigned char*>(&x) + 4, 2);
+ }
+
+ static void set_bits(long double& x, uint32_t a)
+ {
+ std::memcpy(&x, &a, 2);
+ std::memcpy(reinterpret_cast<unsigned char*>(&x) + 4,
+ reinterpret_cast<const unsigned char*>(&a) + 2, 2);
+ }
+};
+
+
+// long double (>64 bits), All other processors --------------------------------
+
+#else
+
+// IEEE extended double precision format with 15 exponent bits (128 bits)
+
+template<>
+struct fp_traits_non_native<long double, extended_double_precision>
+{
+ typedef ieee_copy_leading_bits_tag method;
+
+ BOOST_STATIC_CONSTANT(uint32_t, sign = 0x80000000u);
+ BOOST_STATIC_CONSTANT(uint32_t, exponent = 0x7fff0000);
+ BOOST_STATIC_CONSTANT(uint32_t, flag = 0x00000000);
+ BOOST_STATIC_CONSTANT(uint32_t, significand = 0x0000ffff);
+
+ typedef uint32_t bits;
+
+ static void get_bits(long double x, uint32_t& a)
+ {
+ std::memcpy(&a, reinterpret_cast<const unsigned char*>(&x) + offset_, 4);
+ }
+
+ static void set_bits(long double& x, uint32_t a)
+ {
+ std::memcpy(reinterpret_cast<unsigned char*>(&x) + offset_, &a, 4);
+ }
+
+private:
+
+#if BOOST_ENDIAN_BIG_BYTE
+ BOOST_STATIC_CONSTANT(int, offset_ = 0);
+#elif BOOST_ENDIAN_LITTLE_BYTE
+ BOOST_STATIC_CONSTANT(int, offset_ = 12);
+#else
+ BOOST_STATIC_ASSERT(false);
+#endif
+};
+
+#endif
+
+//------------------------------------------------------------------------------
+
+// size_to_precision is a type switch for converting a C++ floating point type
+// to the corresponding precision type.
+
+template<int n, bool fp> struct size_to_precision
+{
+ typedef unknown_precision type;
+};
+
+template<> struct size_to_precision<4, true>
+{
+ typedef single_precision type;
+};
+
+template<> struct size_to_precision<8, true>
+{
+ typedef double_precision type;
+};
+
+template<> struct size_to_precision<10, true>
+{
+ typedef extended_double_precision type;
+};
+
+template<> struct size_to_precision<12, true>
+{
+ typedef extended_double_precision type;
+};
+
+template<> struct size_to_precision<16, true>
+{
+ typedef extended_double_precision type;
+};
+
+//------------------------------------------------------------------------------
+//
+// Figure out whether to use native classification functions based on
+// whether T is a built in floating point type or not:
+//
+template <class T>
+struct select_native
+{
+ typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
+ typedef fp_traits_non_native<T, precision> type;
+};
+template<>
+struct select_native<float>
+{
+ typedef fp_traits_native<float> type;
+};
+template<>
+struct select_native<double>
+{
+ typedef fp_traits_native<double> type;
+};
+template<>
+struct select_native<long double>
+{
+ typedef fp_traits_native<long double> type;
+};
+
+//------------------------------------------------------------------------------
+
+// fp_traits is a type switch that selects the right fp_traits_non_native
+
+#if (defined(BOOST_MATH_USE_C99) && !(defined(__GNUC__) && (__GNUC__ < 4))) \
+ && !defined(__hpux) \
+ && !defined(__DECCXX)\
+ && !defined(__osf__) \
+ && !defined(__SGI_STL_PORT) && !defined(_STLPORT_VERSION)\
+ && !defined(__FAST_MATH__)\
+ && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)\
+ && !defined(BOOST_INTEL)\
+ && !defined(sun)\
+ && !defined(__VXWORKS__)
+# define BOOST_MATH_USE_STD_FPCLASSIFY
+#endif
+
+template<class T> struct fp_traits
+{
+ typedef BOOST_DEDUCED_TYPENAME size_to_precision<sizeof(T), ::boost::is_floating_point<T>::value>::type precision;
+#if defined(BOOST_MATH_USE_STD_FPCLASSIFY) && !defined(BOOST_MATH_DISABLE_STD_FPCLASSIFY)
+ typedef typename select_native<T>::type type;
+#else
+ typedef fp_traits_non_native<T, precision> type;
+#endif
+ typedef fp_traits_non_native<T, precision> sign_change_type;
+};
+
+//------------------------------------------------------------------------------
+
+} // namespace detail
+} // namespace math
+} // namespace boost
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/gamma_inva.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/gamma_inva.hpp
index 7c32d2946c0..7c32d2946c0 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/gamma_inva.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/gamma_inva.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp
index f5735a84956..f5735a84956 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inv_ab.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/ibeta_inverse.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inverse.hpp
index a9fe8cd49cb..a9fe8cd49cb 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/ibeta_inverse.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/ibeta_inverse.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/detail/iconv.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/iconv.hpp
new file mode 100644
index 00000000000..4256ffcc88e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/iconv.hpp
@@ -0,0 +1,42 @@
+// Copyright (c) 2009 John Maddock
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_ICONV_HPP
+#define BOOST_MATH_ICONV_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/special_functions/round.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+
+namespace boost { namespace math { namespace detail{
+
+template <class T, class Policy>
+inline int iconv_imp(T v, Policy const&, mpl::true_ const&)
+{
+ return static_cast<int>(v);
+}
+
+template <class T, class Policy>
+inline int iconv_imp(T v, Policy const& pol, mpl::false_ const&)
+{
+ BOOST_MATH_STD_USING
+ return iround(v, pol);
+}
+
+template <class T, class Policy>
+inline int iconv(T v, Policy const& pol)
+{
+ typedef typename boost::is_convertible<T, int>::type tag_type;
+ return iconv_imp(v, pol, tag_type());
+}
+
+
+}}} // namespaces
+
+#endif // BOOST_MATH_ICONV_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/igamma_inverse.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_inverse.hpp
index fd0189ca6d5..fd0189ca6d5 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/igamma_inverse.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_inverse.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/igamma_large.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_large.hpp
index eb3d4ba93e7..eb3d4ba93e7 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/igamma_large.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/igamma_large.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/lanczos_sse2.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/lanczos_sse2.hpp
index df1a047435d..df1a047435d 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/lanczos_sse2.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/lanczos_sse2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/lgamma_small.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/lgamma_small.hpp
index e65f8b7e98e..e65f8b7e98e 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/lgamma_small.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/lgamma_small.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/round_fwd.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/round_fwd.hpp
index 8c45a7d75a4..8c45a7d75a4 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/round_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/round_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/t_distribution_inv.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/t_distribution_inv.hpp
index ab5a8fbca69..ab5a8fbca69 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/t_distribution_inv.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/t_distribution_inv.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp
index 5a16d9df176..5a16d9df176 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_bernoulli.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/unchecked_factorial.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_factorial.hpp
index 17366742c46..17366742c46 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/detail/unchecked_factorial.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/detail/unchecked_factorial.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/erf.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/erf.hpp
new file mode 100644
index 00000000000..1fe51e335d2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/erf.hpp
@@ -0,0 +1,1276 @@
+// (C) Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_SPECIAL_ERF_HPP
+#define BOOST_MATH_SPECIAL_ERF_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/tools/config.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+#include <boost/math/tools/roots.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/tools/big_constant.hpp>
+
+namespace boost{ namespace math{
+
+namespace detail
+{
+
+//
+// Asymptotic series for large z:
+//
+template <class T>
+struct erf_asympt_series_t
+{
+ erf_asympt_series_t(T z) : xx(2 * -z * z), tk(1)
+ {
+ BOOST_MATH_STD_USING
+ result = -exp(-z * z) / sqrt(boost::math::constants::pi<T>());
+ result /= z;
+ }
+
+ typedef T result_type;
+
+ T operator()()
+ {
+ BOOST_MATH_STD_USING
+ T r = result;
+ result *= tk / xx;
+ tk += 2;
+ if( fabs(r) < fabs(result))
+ result = 0;
+ return r;
+ }
+private:
+ T result;
+ T xx;
+ int tk;
+};
+//
+// How large z has to be in order to ensure that the series converges:
+//
+template <class T>
+inline float erf_asymptotic_limit_N(const T&)
+{
+ return (std::numeric_limits<float>::max)();
+}
+inline float erf_asymptotic_limit_N(const mpl::int_<24>&)
+{
+ return 2.8F;
+}
+inline float erf_asymptotic_limit_N(const mpl::int_<53>&)
+{
+ return 4.3F;
+}
+inline float erf_asymptotic_limit_N(const mpl::int_<64>&)
+{
+ return 4.8F;
+}
+inline float erf_asymptotic_limit_N(const mpl::int_<106>&)
+{
+ return 6.5F;
+}
+inline float erf_asymptotic_limit_N(const mpl::int_<113>&)
+{
+ return 6.8F;
+}
+
+template <class T, class Policy>
+inline T erf_asymptotic_limit()
+{
+ typedef typename policies::precision<T, Policy>::type precision_type;
+ typedef typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<24> >,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::int_<0>,
+ mpl::int_<24>
+ >::type,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<53> >,
+ mpl::int_<53>,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<64> >,
+ mpl::int_<64>,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<106> >,
+ mpl::int_<106>,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<113> >,
+ mpl::int_<113>,
+ mpl::int_<0>
+ >::type
+ >::type
+ >::type
+ >::type
+ >::type tag_type;
+ return erf_asymptotic_limit_N(tag_type());
+}
+
+template <class T, class Policy, class Tag>
+T erf_imp(T z, bool invert, const Policy& pol, const Tag& t)
+{
+ BOOST_MATH_STD_USING
+
+ BOOST_MATH_INSTRUMENT_CODE("Generic erf_imp called");
+
+ if(z < 0)
+ {
+ if(!invert)
+ return -erf_imp(T(-z), invert, pol, t);
+ else
+ return 1 + erf_imp(T(-z), false, pol, t);
+ }
+
+ T result;
+
+ if(!invert && (z > detail::erf_asymptotic_limit<T, Policy>()))
+ {
+ detail::erf_asympt_series_t<T> s(z);
+ boost::uintmax_t max_iter = policies::get_max_series_iterations<Policy>();
+ result = boost::math::tools::sum_series(s, policies::get_epsilon<T, Policy>(), max_iter, 1);
+ policies::check_series_iterations<T>("boost::math::erf<%1%>(%1%, %1%)", max_iter, pol);
+ }
+ else
+ {
+ T x = z * z;
+ if(x < 0.6)
+ {
+ // Compute P:
+ result = z * exp(-x);
+ result /= sqrt(boost::math::constants::pi<T>());
+ if(result != 0)
+ result *= 2 * detail::lower_gamma_series(T(0.5f), x, pol);
+ }
+ else if(x < 1.1f)
+ {
+ // Compute Q:
+ invert = !invert;
+ result = tgamma_small_upper_part(T(0.5f), x, pol);
+ result /= sqrt(boost::math::constants::pi<T>());
+ }
+ else if(x > 1 / tools::epsilon<T>())
+ {
+ // http://functions.wolfram.com/06.27.06.0006.02
+ invert = !invert;
+ result = exp(-x) / (constants::root_pi<T>() * z);
+ }
+ else
+ {
+ // Compute Q:
+ invert = !invert;
+ result = z * exp(-x);
+ result /= boost::math::constants::root_pi<T>();
+ result *= upper_gamma_fraction(T(0.5f), x, policies::get_epsilon<T, Policy>());
+ }
+ }
+ if(invert)
+ result = 1 - result;
+ return result;
+}
+
+template <class T, class Policy>
+T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<53>& t)
+{
+ BOOST_MATH_STD_USING
+
+ BOOST_MATH_INSTRUMENT_CODE("53-bit precision erf_imp called");
+
+ if ((boost::math::isnan)(z))
+ return policies::raise_denorm_error("boost::math::erf<%1%>(%1%)", "Expected a finite argument but got %1%", z, pol);
+
+ if(z < 0)
+ {
+ if(!invert)
+ return -erf_imp(T(-z), invert, pol, t);
+ else if(z < -0.5)
+ return 2 - erf_imp(T(-z), invert, pol, t);
+ else
+ return 1 + erf_imp(T(-z), false, pol, t);
+ }
+
+ T result;
+
+ //
+ // Big bunch of selection statements now to pick
+ // which implementation to use,
+ // try to put most likely options first:
+ //
+ if(z < 0.5)
+ {
+ //
+ // We're going to calculate erf:
+ //
+ if(z < 1e-10)
+ {
+ if(z == 0)
+ {
+ result = T(0);
+ }
+ else
+ {
+ static const T c = BOOST_MATH_BIG_CONSTANT(T, 53, 0.003379167095512573896158903121545171688);
+ result = static_cast<T>(z * 1.125f + z * c);
+ }
+ }
+ else
+ {
+ // Maximum Deviation Found: 1.561e-17
+ // Expected Error Term: 1.561e-17
+ // Maximum Relative Change in Control Points: 1.155e-04
+ // Max Error found at double precision = 2.961182e-17
+
+ static const T Y = 1.044948577880859375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0834305892146531832907),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -0.338165134459360935041),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -0.0509990735146777432841),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -0.00772758345802133288487),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -0.000322780120964605683831),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.455004033050794024546),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0875222600142252549554),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.00858571925074406212772),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.000370900071787748000569),
+ };
+ T zz = z * z;
+ result = z * (Y + tools::evaluate_polynomial(P, zz) / tools::evaluate_polynomial(Q, zz));
+ }
+ }
+ else if(invert ? (z < 28) : (z < 5.8f))
+ {
+ //
+ // We'll be calculating erfc:
+ //
+ invert = !invert;
+ if(z < 1.5f)
+ {
+ // Maximum Deviation Found: 3.702e-17
+ // Expected Error Term: 3.702e-17
+ // Maximum Relative Change in Control Points: 2.845e-04
+ // Max Error found at double precision = 4.841816e-17
+ static const T Y = 0.405935764312744140625f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, -0.098090592216281240205),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.178114665841120341155),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.191003695796775433986),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0888900368967884466578),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0195049001251218801359),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.00180424538297014223957),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.84759070983002217845),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.42628004845511324508),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.578052804889902404909),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.12385097467900864233),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0113385233577001411017),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.337511472483094676155e-5),
+ };
+ BOOST_MATH_INSTRUMENT_VARIABLE(Y);
+ BOOST_MATH_INSTRUMENT_VARIABLE(P[0]);
+ BOOST_MATH_INSTRUMENT_VARIABLE(Q[0]);
+ BOOST_MATH_INSTRUMENT_VARIABLE(z);
+ result = Y + tools::evaluate_polynomial(P, T(z - 0.5)) / tools::evaluate_polynomial(Q, T(z - 0.5));
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ result *= exp(-z * z) / z;
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+ }
+ else if(z < 2.5f)
+ {
+ // Max Error found at double precision = 6.599585e-18
+ // Maximum Deviation Found: 3.909e-18
+ // Expected Error Term: 3.909e-18
+ // Maximum Relative Change in Control Points: 9.886e-05
+ static const T Y = 0.50672817230224609375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, -0.0243500476207698441272),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0386540375035707201728),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.04394818964209516296),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0175679436311802092299),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.00323962406290842133584),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.000235839115596880717416),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.53991494948552447182),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.982403709157920235114),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.325732924782444448493),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0563921837420478160373),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.00410369723978904575884),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 1.5)) / tools::evaluate_polynomial(Q, T(z - 1.5));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 26));
+ hi = ldexp(hi, expon - 26);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 4.5f)
+ {
+ // Maximum Deviation Found: 1.512e-17
+ // Expected Error Term: 1.512e-17
+ // Maximum Relative Change in Control Points: 2.222e-04
+ // Max Error found at double precision = 2.062515e-17
+ static const T Y = 0.5405750274658203125f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.00295276716530971662634),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0137384425896355332126),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.00840807615555585383007),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.00212825620914618649141),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.000250269961544794627958),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.113212406648847561139e-4),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.04217814166938418171),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.442597659481563127003),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0958492726301061423444),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0105982906484876531489),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.000479411269521714493907),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 3.5)) / tools::evaluate_polynomial(Q, T(z - 3.5));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 26));
+ hi = ldexp(hi, expon - 26);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else
+ {
+ // Max Error found at double precision = 2.997958e-17
+ // Maximum Deviation Found: 2.860e-17
+ // Expected Error Term: 2.859e-17
+ // Maximum Relative Change in Control Points: 1.357e-05
+ static const T Y = 0.5579090118408203125f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.00628057170626964891937),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 0.0175389834052493308818),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -0.212652252872804219852),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -0.687717681153649930619),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -2.5518551727311523996),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -3.22729451764143718517),
+ BOOST_MATH_BIG_CONSTANT(T, 53, -2.8175401114513378771),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 53, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 2.79257750980575282228),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 11.0567237927800161565),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 15.930646027911794143),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 22.9367376522880577224),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 13.5064170191802889145),
+ BOOST_MATH_BIG_CONSTANT(T, 53, 5.48409182238641741584),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 26));
+ hi = ldexp(hi, expon - 26);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ }
+ else
+ {
+ //
+ // Any value of z larger than 28 will underflow to zero:
+ //
+ result = 0;
+ invert = !invert;
+ }
+
+ if(invert)
+ {
+ result = 1 - result;
+ }
+
+ return result;
+} // template <class T, class Lanczos>T erf_imp(T z, bool invert, const Lanczos& l, const mpl::int_<53>& t)
+
+
+template <class T, class Policy>
+T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<64>& t)
+{
+ BOOST_MATH_STD_USING
+
+ BOOST_MATH_INSTRUMENT_CODE("64-bit precision erf_imp called");
+
+ if(z < 0)
+ {
+ if(!invert)
+ return -erf_imp(T(-z), invert, pol, t);
+ else if(z < -0.5)
+ return 2 - erf_imp(T(-z), invert, pol, t);
+ else
+ return 1 + erf_imp(T(-z), false, pol, t);
+ }
+
+ T result;
+
+ //
+ // Big bunch of selection statements now to pick which
+ // implementation to use, try to put most likely options
+ // first:
+ //
+ if(z < 0.5)
+ {
+ //
+ // We're going to calculate erf:
+ //
+ if(z == 0)
+ {
+ result = 0;
+ }
+ else if(z < 1e-10)
+ {
+ static const T c = BOOST_MATH_BIG_CONSTANT(T, 64, 0.003379167095512573896158903121545171688);
+ result = z * 1.125 + z * c;
+ }
+ else
+ {
+ // Max Error found at long double precision = 1.623299e-20
+ // Maximum Deviation Found: 4.326e-22
+ // Expected Error Term: -4.326e-22
+ // Maximum Relative Change in Control Points: 1.474e-04
+ static const T Y = 1.044948577880859375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0834305892146531988966),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.338097283075565413695),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0509602734406067204596),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.00904906346158537794396),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.000489468651464798669181),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.200305626366151877759e-4),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.455817300515875172439),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0916537354356241792007),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0102722652675910031202),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000650511752687851548735),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.189532519105655496778e-4),
+ };
+ result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z)));
+ }
+ }
+ else if(invert ? (z < 110) : (z < 6.4f))
+ {
+ //
+ // We'll be calculating erfc:
+ //
+ invert = !invert;
+ if(z < 1.5)
+ {
+ // Max Error found at long double precision = 3.239590e-20
+ // Maximum Deviation Found: 2.241e-20
+ // Expected Error Term: -2.241e-20
+ // Maximum Relative Change in Control Points: 5.110e-03
+ static const T Y = 0.405935764312744140625f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.0980905922162812031672),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.159989089922969141329),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.222359821619935712378),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.127303921703577362312),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0384057530342762400273),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00628431160851156719325),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000441266654514391746428),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.266689068336295642561e-7),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 2.03237474985469469291),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.78355454954969405222),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.867940326293760578231),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.248025606990021698392),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0396649631833002269861),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00279220237309449026796),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 32));
+ hi = ldexp(hi, expon - 32);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 2.5)
+ {
+ // Max Error found at long double precision = 3.686211e-21
+ // Maximum Deviation Found: 1.495e-21
+ // Expected Error Term: -1.494e-21
+ // Maximum Relative Change in Control Points: 1.793e-04
+ static const T Y = 0.50672817230224609375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.024350047620769840217),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0343522687935671451309),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0505420824305544949541),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0257479325917757388209),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00669349844190354356118),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00090807914416099524444),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.515917266698050027934e-4),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.71657861671930336344),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.26409634824280366218),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.512371437838969015941),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.120902623051120950935),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0158027197831887485261),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.000897871370778031611439),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 32));
+ hi = ldexp(hi, expon - 32);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 4.5)
+ {
+ // Maximum Deviation Found: 1.107e-20
+ // Expected Error Term: -1.106e-20
+ // Maximum Relative Change in Control Points: 1.709e-04
+ // Max Error found at long double precision = 1.446908e-20
+ static const T Y = 0.5405750274658203125f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0029527671653097284033),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0141853245895495604051),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0104959584626432293901),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00343963795976100077626),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00059065441194877637899),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.523435380636174008685e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.189896043050331257262e-5),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.19352160185285642574),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.603256964363454392857),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.165411142458540585835),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0259729870946203166468),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00221657568292893699158),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.804149464190309799804e-4),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 3.5f)) / tools::evaluate_polynomial(Q, T(z - 3.5f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 32));
+ hi = ldexp(hi, expon - 32);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else
+ {
+ // Max Error found at long double precision = 7.961166e-21
+ // Maximum Deviation Found: 6.677e-21
+ // Expected Error Term: 6.676e-21
+ // Maximum Relative Change in Control Points: 2.319e-05
+ static const T Y = 0.55825519561767578125f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.00593438793008050214106),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 0.0280666231009089713937),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.141597835204583050043),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -0.978088201154300548842),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -5.47351527796012049443),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -13.8677304660245326627),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -27.1274948720539821722),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -29.2545152747009461519),
+ BOOST_MATH_BIG_CONSTANT(T, 64, -16.8865774499799676937),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 64, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 4.72948911186645394541),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 23.6750543147695749212),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 60.0021517335693186785),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 131.766251645149522868),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 178.167924971283482513),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 182.499390505915222699),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 104.365251479578577989),
+ BOOST_MATH_BIG_CONSTANT(T, 64, 30.8365511891224291717),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 32));
+ hi = ldexp(hi, expon - 32);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ }
+ else
+ {
+ //
+ // Any value of z larger than 110 will underflow to zero:
+ //
+ result = 0;
+ invert = !invert;
+ }
+
+ if(invert)
+ {
+ result = 1 - result;
+ }
+
+ return result;
+} // template <class T, class Lanczos>T erf_imp(T z, bool invert, const Lanczos& l, const mpl::int_<64>& t)
+
+
+template <class T, class Policy>
+T erf_imp(T z, bool invert, const Policy& pol, const mpl::int_<113>& t)
+{
+ BOOST_MATH_STD_USING
+
+ BOOST_MATH_INSTRUMENT_CODE("113-bit precision erf_imp called");
+
+ if(z < 0)
+ {
+ if(!invert)
+ return -erf_imp(T(-z), invert, pol, t);
+ else if(z < -0.5)
+ return 2 - erf_imp(T(-z), invert, pol, t);
+ else
+ return 1 + erf_imp(T(-z), false, pol, t);
+ }
+
+ T result;
+
+ //
+ // Big bunch of selection statements now to pick which
+ // implementation to use, try to put most likely options
+ // first:
+ //
+ if(z < 0.5)
+ {
+ //
+ // We're going to calculate erf:
+ //
+ if(z == 0)
+ {
+ result = 0;
+ }
+ else if(z < 1e-20)
+ {
+ static const T c = BOOST_MATH_BIG_CONSTANT(T, 113, 0.003379167095512573896158903121545171688);
+ result = z * 1.125 + z * c;
+ }
+ else
+ {
+ // Max Error found at long double precision = 2.342380e-35
+ // Maximum Deviation Found: 6.124e-36
+ // Expected Error Term: -6.124e-36
+ // Maximum Relative Change in Control Points: 3.492e-10
+ static const T Y = 1.0841522216796875f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0442269454158250738961589031215451778),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.35549265736002144875335323556961233),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0582179564566667896225454670863270393),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0112694696904802304229950538453123925),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.000805730648981801146251825329609079099),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.566304966591936566229702842075966273e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.169655010425186987820201021510002265e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.344448249920445916714548295433198544e-7),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.466542092785657604666906909196052522),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.100005087012526447295176964142107611),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0128341535890117646540050072234142603),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00107150448466867929159660677016658186),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.586168368028999183607733369248338474e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.196230608502104324965623171516808796e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.313388521582925207734229967907890146e-7),
+ };
+ result = z * (Y + tools::evaluate_polynomial(P, T(z * z)) / tools::evaluate_polynomial(Q, T(z * z)));
+ }
+ }
+ else if(invert ? (z < 110) : (z < 8.65f))
+ {
+ //
+ // We'll be calculating erfc:
+ //
+ invert = !invert;
+ if(z < 1)
+ {
+ // Max Error found at long double precision = 3.246278e-35
+ // Maximum Deviation Found: 1.388e-35
+ // Expected Error Term: 1.387e-35
+ // Maximum Relative Change in Control Points: 6.127e-05
+ static const T Y = 0.371877193450927734375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0640320213544647969396032886581290455),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.200769874440155895637857443946706731),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.378447199873537170666487408805779826),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.30521399466465939450398642044975127),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.146890026406815277906781824723458196),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0464837937749539978247589252732769567),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00987895759019540115099100165904822903),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00137507575429025512038051025154301132),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0001144764551085935580772512359680516),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.436544865032836914773944382339900079e-5),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.47651182872457465043733800302427977),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.78706486002517996428836400245547955),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.87295924621659627926365005293130693),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.829375825174365625428280908787261065),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.251334771307848291593780143950311514),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0522110268876176186719436765734722473),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00718332151250963182233267040106902368),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000595279058621482041084986219276392459),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.226988669466501655990637599399326874e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.270666232259029102353426738909226413e-10),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 0.5f)) / tools::evaluate_polynomial(Q, T(z - 0.5f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 1.5)
+ {
+ // Max Error found at long double precision = 2.215785e-35
+ // Maximum Deviation Found: 1.539e-35
+ // Expected Error Term: 1.538e-35
+ // Maximum Relative Change in Control Points: 6.104e-05
+ static const T Y = 0.45658016204833984375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0289965858925328393392496555094848345),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0868181194868601184627743162571779226),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.169373435121178901746317404936356745),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.13350446515949251201104889028133486),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0617447837290183627136837688446313313),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0185618495228251406703152962489700468),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00371949406491883508764162050169531013),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000485121708792921297742105775823900772),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.376494706741453489892108068231400061e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.133166058052466262415271732172490045e-5),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.32970330146503867261275580968135126),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.46325715420422771961250513514928746),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.55307882560757679068505047390857842),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.644274289865972449441174485441409076),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.182609091063258208068606847453955649),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0354171651271241474946129665801606795),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00454060370165285246451879969534083997),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000349871943711566546821198612518656486),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.123749319840299552925421880481085392e-4),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 1.0f)) / tools::evaluate_polynomial(Q, T(z - 1.0f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 2.25)
+ {
+ // Maximum Deviation Found: 1.418e-35
+ // Expected Error Term: 1.418e-35
+ // Maximum Relative Change in Control Points: 1.316e-04
+ // Max Error found at long double precision = 1.998462e-35
+ static const T Y = 0.50250148773193359375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0201233630504573402185161184151016606),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0331864357574860196516686996302305002),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0716562720864787193337475444413405461),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0545835322082103985114927569724880658),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0236692635189696678976549720784989593),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00656970902163248872837262539337601845),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00120282643299089441390490459256235021),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000142123229065182650020762792081622986),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.991531438367015135346716277792989347e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.312857043762117596999398067153076051e-6),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.13506082409097783827103424943508554),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2.06399257267556230937723190496806215),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.18678481279932541314830499880691109),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.447733186643051752513538142316799562),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.11505680005657879437196953047542148),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.020163993632192726170219663831914034),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00232708971840141388847728782209730585),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000160733201627963528519726484608224112),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.507158721790721802724402992033269266e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.18647774409821470950544212696270639e-12),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 1.5f)) / tools::evaluate_polynomial(Q, T(z - 1.5f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if (z < 3)
+ {
+ // Maximum Deviation Found: 3.575e-36
+ // Expected Error Term: 3.575e-36
+ // Maximum Relative Change in Control Points: 7.103e-05
+ // Max Error found at long double precision = 5.794737e-36
+ static const T Y = 0.52896785736083984375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.00902152521745813634562524098263360074),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0145207142776691539346923710537580927),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0301681239582193983824211995978678571),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0215548540823305814379020678660434461),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00864683476267958365678294164340749949),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00219693096885585491739823283511049902),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000364961639163319762492184502159894371),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.388174251026723752769264051548703059e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.241918026931789436000532513553594321e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.676586625472423508158937481943649258e-7),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.93669171363907292305550231764920001),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.69468476144051356810672506101377494),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.880023580986436640372794392579985511),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.299099106711315090710836273697708402),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0690593962363545715997445583603382337),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0108427016361318921960863149875360222),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00111747247208044534520499324234317695),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.686843205749767250666787987163701209e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.192093541425429248675532015101904262e-5),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 2.25f)) / tools::evaluate_polynomial(Q, T(z - 2.25f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 3.5)
+ {
+ // Maximum Deviation Found: 8.126e-37
+ // Expected Error Term: -8.126e-37
+ // Maximum Relative Change in Control Points: 1.363e-04
+ // Max Error found at long double precision = 1.747062e-36
+ static const T Y = 0.54037380218505859375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.0033703486408887424921155540591370375),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0104948043110005245215286678898115811),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0148530118504000311502310457390417795),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00816693029245443090102738825536188916),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00249716579989140882491939681805594585),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0004655591010047353023978045800916647),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.531129557920045295895085236636025323e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.343526765122727069515775194111741049e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.971120407556888763695313774578711839e-7),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.59911256167540354915906501335919317),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.136006830764025173864831382946934),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.468565867990030871678574840738423023),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.122821824954470343413956476900662236),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0209670914950115943338996513330141633),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00227845718243186165620199012883547257),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000144243326443913171313947613547085553),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.407763415954267700941230249989140046e-5),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 3.0f)) / tools::evaluate_polynomial(Q, T(z - 3.0f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 5.5)
+ {
+ // Maximum Deviation Found: 5.804e-36
+ // Expected Error Term: -5.803e-36
+ // Maximum Relative Change in Control Points: 2.475e-05
+ // Max Error found at long double precision = 1.349545e-35
+ static const T Y = 0.55000019073486328125f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00118142849742309772151454518093813615),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0072201822885703318172366893469382745),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0078782276276860110721875733778481505),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00418229166204362376187593976656261146),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00134198400587769200074194304298642705),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000283210387078004063264777611497435572),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.405687064094911866569295610914844928e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.39348283801568113807887364414008292e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.248798540917787001526976889284624449e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.929502490223452372919607105387474751e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.156161469668275442569286723236274457e-9),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.52955245103668419479878456656709381),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.06263944820093830054635017117417064),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.441684612681607364321013134378316463),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.121665258426166960049773715928906382),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0232134512374747691424978642874321434),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00310778180686296328582860464875562636),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000288361770756174705123674838640161693),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.177529187194133944622193191942300132e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.655068544833064069223029299070876623e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.11005507545746069573608988651927452e-7),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 4.5f)) / tools::evaluate_polynomial(Q, T(z - 4.5f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 7.5)
+ {
+ // Maximum Deviation Found: 1.007e-36
+ // Expected Error Term: 1.007e-36
+ // Maximum Relative Change in Control Points: 1.027e-03
+ // Max Error found at long double precision = 2.646420e-36
+ static const T Y = 0.5574436187744140625f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000293236907400849056269309713064107674),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00225110719535060642692275221961480162),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00190984458121502831421717207849429799),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000747757733460111743833929141001680706),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000170663175280949889583158597373928096),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.246441188958013822253071608197514058e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.229818000860544644974205957895688106e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.134886977703388748488480980637704864e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.454764611880548962757125070106650958e-8),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.673002744115866600294723141176820155e-10),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.12843690320861239631195353379313367),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.569900657061622955362493442186537259),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.169094404206844928112348730277514273),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0324887449084220415058158657252147063),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00419252877436825753042680842608219552),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00036344133176118603523976748563178578),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.204123895931375107397698245752850347e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.674128352521481412232785122943508729e-6),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.997637501418963696542159244436245077e-8),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z - 6.5f)) / tools::evaluate_polynomial(Q, T(z - 6.5f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else if(z < 11.5)
+ {
+ // Maximum Deviation Found: 8.380e-36
+ // Expected Error Term: 8.380e-36
+ // Maximum Relative Change in Control Points: 2.632e-06
+ // Max Error found at long double precision = 9.849522e-36
+ static const T Y = 0.56083202362060546875f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000282420728751494363613829834891390121),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00175387065018002823433704079355125161),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0021344978564889819420775336322920375),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00124151356560137532655039683963075661),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000423600733566948018555157026862139644),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.914030340865175237133613697319509698e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.126999927156823363353809747017945494e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.110610959842869849776179749369376402e-5),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.55075079477173482096725348704634529e-7),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.119735694018906705225870691331543806e-8),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.69889613396167354566098060039549882),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.28824647372749624464956031163282674),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.572297795434934493541628008224078717),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.164157697425571712377043857240773164),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.0315311145224594430281219516531649562),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00405588922155632380812945849777127458),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000336929033691445666232029762868642417),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.164033049810404773469413526427932109e-4),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.356615210500531410114914617294694857e-6),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(z / 2 - 4.75f)) / tools::evaluate_polynomial(Q, T(z / 2 - 4.75f));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ else
+ {
+ // Maximum Deviation Found: 1.132e-35
+ // Expected Error Term: -1.132e-35
+ // Maximum Relative Change in Control Points: 4.674e-04
+ // Max Error found at long double precision = 1.162590e-35
+ static const T Y = 0.5632686614990234375f;
+ static const T P[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.000920922048732849448079451574171836943),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 0.00321439044532288750501700028748922439),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.250455263029390118657884864261823431),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -0.906807635364090342031792404764598142),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -8.92233572835991735876688745989985565),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -21.7797433494422564811782116907878495),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -91.1451915251976354349734589601171659),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -144.1279109655993927069052125017673),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -313.845076581796338665519022313775589),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -273.11378811923343424081101235736475),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -271.651566205951067025696102600443452),
+ BOOST_MATH_BIG_CONSTANT(T, 113, -60.0530577077238079968843307523245547),
+ };
+ static const T Q[] = {
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1.0),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 3.49040448075464744191022350947892036),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 34.3563592467165971295915749548313227),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 84.4993232033879023178285731843850461),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 376.005865281206894120659401340373818),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 629.95369438888946233003926191755125),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1568.35771983533158591604513304269098),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1646.02452040831961063640827116581021),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 2299.96860633240298708910425594484895),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 1222.73204392037452750381340219906374),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 799.359797306084372350264298361110448),
+ BOOST_MATH_BIG_CONSTANT(T, 113, 72.7415265778588087243442792401576737),
+ };
+ result = Y + tools::evaluate_polynomial(P, T(1 / z)) / tools::evaluate_polynomial(Q, T(1 / z));
+ T hi, lo;
+ int expon;
+ hi = floor(ldexp(frexp(z, &expon), 56));
+ hi = ldexp(hi, expon - 56);
+ lo = z - hi;
+ T sq = z * z;
+ T err_sqr = ((hi * hi - sq) + 2 * hi * lo) + lo * lo;
+ result *= exp(-sq) * exp(-err_sqr) / z;
+ }
+ }
+ else
+ {
+ //
+ // Any value of z larger than 110 will underflow to zero:
+ //
+ result = 0;
+ invert = !invert;
+ }
+
+ if(invert)
+ {
+ result = 1 - result;
+ }
+
+ return result;
+} // template <class T, class Lanczos>T erf_imp(T z, bool invert, const Lanczos& l, const mpl::int_<113>& t)
+
+template <class T, class Policy, class tag>
+struct erf_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init(tag());
+ }
+ static void do_init(const mpl::int_<0>&){}
+ static void do_init(const mpl::int_<53>&)
+ {
+ boost::math::erf(static_cast<T>(1e-12), Policy());
+ boost::math::erf(static_cast<T>(0.25), Policy());
+ boost::math::erf(static_cast<T>(1.25), Policy());
+ boost::math::erf(static_cast<T>(2.25), Policy());
+ boost::math::erf(static_cast<T>(4.25), Policy());
+ boost::math::erf(static_cast<T>(5.25), Policy());
+ }
+ static void do_init(const mpl::int_<64>&)
+ {
+ boost::math::erf(static_cast<T>(1e-12), Policy());
+ boost::math::erf(static_cast<T>(0.25), Policy());
+ boost::math::erf(static_cast<T>(1.25), Policy());
+ boost::math::erf(static_cast<T>(2.25), Policy());
+ boost::math::erf(static_cast<T>(4.25), Policy());
+ boost::math::erf(static_cast<T>(5.25), Policy());
+ }
+ static void do_init(const mpl::int_<113>&)
+ {
+ boost::math::erf(static_cast<T>(1e-22), Policy());
+ boost::math::erf(static_cast<T>(0.25), Policy());
+ boost::math::erf(static_cast<T>(1.25), Policy());
+ boost::math::erf(static_cast<T>(2.125), Policy());
+ boost::math::erf(static_cast<T>(2.75), Policy());
+ boost::math::erf(static_cast<T>(3.25), Policy());
+ boost::math::erf(static_cast<T>(5.25), Policy());
+ boost::math::erf(static_cast<T>(7.25), Policy());
+ boost::math::erf(static_cast<T>(11.25), Policy());
+ boost::math::erf(static_cast<T>(12.5), Policy());
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T, class Policy, class tag>
+const typename erf_initializer<T, Policy, tag>::init erf_initializer<T, Policy, tag>::initializer;
+
+} // namespace detail
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type erf(T z, const Policy& /* pol */)
+{
+ typedef typename tools::promote_args<T>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ BOOST_MATH_INSTRUMENT_CODE("result_type = " << typeid(result_type).name());
+ BOOST_MATH_INSTRUMENT_CODE("value_type = " << typeid(value_type).name());
+ BOOST_MATH_INSTRUMENT_CODE("precision_type = " << typeid(precision_type).name());
+
+ typedef typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::int_<0>,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<53> >,
+ mpl::int_<53>, // double
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<64> >,
+ mpl::int_<64>, // 80-bit long double
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<113> >,
+ mpl::int_<113>, // 128-bit long double
+ mpl::int_<0> // too many bits, use generic version.
+ >::type
+ >::type
+ >::type
+ >::type tag_type;
+
+ BOOST_MATH_INSTRUMENT_CODE("tag_type = " << typeid(tag_type).name());
+
+ detail::erf_initializer<value_type, forwarding_policy, tag_type>::force_instantiate(); // Force constants to be initialized before main
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
+ static_cast<value_type>(z),
+ false,
+ forwarding_policy(),
+ tag_type()), "boost::math::erf<%1%>(%1%, %1%)");
+}
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type erfc(T z, const Policy& /* pol */)
+{
+ typedef typename tools::promote_args<T>::type result_type;
+ typedef typename policies::evaluation<result_type, Policy>::type value_type;
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
+ typedef typename policies::normalise<
+ Policy,
+ policies::promote_float<false>,
+ policies::promote_double<false>,
+ policies::discrete_quantile<>,
+ policies::assert_undefined<> >::type forwarding_policy;
+
+ BOOST_MATH_INSTRUMENT_CODE("result_type = " << typeid(result_type).name());
+ BOOST_MATH_INSTRUMENT_CODE("value_type = " << typeid(value_type).name());
+ BOOST_MATH_INSTRUMENT_CODE("precision_type = " << typeid(precision_type).name());
+
+ typedef typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::int_<0>,
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<53> >,
+ mpl::int_<53>, // double
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<64> >,
+ mpl::int_<64>, // 80-bit long double
+ typename mpl::if_<
+ mpl::less_equal<precision_type, mpl::int_<113> >,
+ mpl::int_<113>, // 128-bit long double
+ mpl::int_<0> // too many bits, use generic version.
+ >::type
+ >::type
+ >::type
+ >::type tag_type;
+
+ BOOST_MATH_INSTRUMENT_CODE("tag_type = " << typeid(tag_type).name());
+
+ detail::erf_initializer<value_type, forwarding_policy, tag_type>::force_instantiate(); // Force constants to be initialized before main
+
+ return policies::checked_narrowing_cast<result_type, forwarding_policy>(detail::erf_imp(
+ static_cast<value_type>(z),
+ true,
+ forwarding_policy(),
+ tag_type()), "boost::math::erfc<%1%>(%1%, %1%)");
+}
+
+template <class T>
+inline typename tools::promote_args<T>::type erf(T z)
+{
+ return boost::math::erf(z, policies::policy<>());
+}
+
+template <class T>
+inline typename tools::promote_args<T>::type erfc(T z)
+{
+ return boost::math::erfc(z, policies::policy<>());
+}
+
+} // namespace math
+} // namespace boost
+
+#include <boost/math/special_functions/detail/erf_inv.hpp>
+
+#endif // BOOST_MATH_SPECIAL_ERF_HPP
+
+
+
+
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/expm1.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/expm1.hpp
index 9cecc897560..9cecc897560 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/expm1.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/expm1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/factorials.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/factorials.hpp
index e36a098bb63..e36a098bb63 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/factorials.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/factorials.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/fpclassify.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/fpclassify.hpp
index d83e111c48c..d83e111c48c 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/fpclassify.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/fpclassify.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/gamma.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/gamma.hpp
index 1903b997cbf..1903b997cbf 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/gamma.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/gamma.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/hypot.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/hypot.hpp
index efe1a3f2115..efe1a3f2115 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/hypot.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/hypot.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/lanczos.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/lanczos.hpp
index c1ff86930b6..c1ff86930b6 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/lanczos.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/lanczos.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/log1p.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/log1p.hpp
index 7fa1eb8de99..7fa1eb8de99 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/log1p.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/log1p.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/math_fwd.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/math_fwd.hpp
new file mode 100644
index 00000000000..795620b4ed7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/math_fwd.hpp
@@ -0,0 +1,1678 @@
+// math_fwd.hpp
+
+// TODO revise completely for new distribution classes.
+
+// Copyright Paul A. Bristow 2006.
+// Copyright John Maddock 2006.
+
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt
+// or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// Omnibus list of forward declarations of math special functions.
+
+// IT = Integer type.
+// RT = Real type (built-in floating-point types, float, double, long double) & User Defined Types
+// AT = Integer or Real type
+
+#ifndef BOOST_MATH_SPECIAL_MATH_FWD_HPP
+#define BOOST_MATH_SPECIAL_MATH_FWD_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <vector>
+#include <boost/math/special_functions/detail/round_fwd.hpp>
+#include <boost/math/tools/promotion.hpp> // for argument promotion.
+#include <boost/math/policies/policy.hpp>
+#include <boost/mpl/comparison.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/config/no_tr1/complex.hpp>
+
+#define BOOST_NO_MACRO_EXPAND /**/
+
+namespace boost
+{
+ namespace math
+ { // Math functions (in roughly alphabetic order).
+
+ // Beta functions.
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type
+ beta(RT1 a, RT2 b); // Beta function (2 arguments).
+
+ template <class RT1, class RT2, class A>
+ typename tools::promote_args<RT1, RT2, A>::type
+ beta(RT1 a, RT2 b, A x); // Beta function (3 arguments).
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ beta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Beta function (3 arguments).
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ betac(RT1 a, RT2 b, RT3 x);
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ betac(RT1 a, RT2 b, RT3 x, const Policy& pol);
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta(RT1 a, RT2 b, RT3 x); // Incomplete beta function.
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta function.
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac(RT1 a, RT2 b, RT3 x); // Incomplete beta complement function.
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac(RT1 a, RT2 b, RT3 x, const Policy& pol); // Incomplete beta complement function.
+
+ template <class T1, class T2, class T3, class T4>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ibeta_inv(T1 a, T2 b, T3 p, T4* py);
+
+ template <class T1, class T2, class T3, class T4, class Policy>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ibeta_inv(T1 a, T2 b, T3 p, T4* py, const Policy& pol);
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_inv(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_inv(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_inva(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_inva(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_invb(RT1 a, RT2 b, RT3 p); // Incomplete beta inverse function.
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_invb(RT1 a, RT2 b, RT3 p, const Policy&); // Incomplete beta inverse function.
+
+ template <class T1, class T2, class T3, class T4>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ibetac_inv(T1 a, T2 b, T3 q, T4* py);
+
+ template <class T1, class T2, class T3, class T4, class Policy>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ibetac_inv(T1 a, T2 b, T3 q, T4* py, const Policy& pol);
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_inv(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_inv(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_inva(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_inva(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_invb(RT1 a, RT2 b, RT3 q); // Incomplete beta complement inverse function.
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibetac_invb(RT1 a, RT2 b, RT3 q, const Policy&); // Incomplete beta complement inverse function.
+
+ template <class RT1, class RT2, class RT3>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_derivative(RT1 a, RT2 b, RT3 x); // derivative of incomplete beta
+
+ template <class RT1, class RT2, class RT3, class Policy>
+ typename tools::promote_args<RT1, RT2, RT3>::type
+ ibeta_derivative(RT1 a, RT2 b, RT3 x, const Policy& pol); // derivative of incomplete beta
+
+ // Binomial:
+ template <class T, class Policy>
+ T binomial_coefficient(unsigned n, unsigned k, const Policy& pol);
+ template <class T>
+ T binomial_coefficient(unsigned n, unsigned k);
+
+ // erf & erfc error functions.
+ template <class RT> // Error function.
+ typename tools::promote_args<RT>::type erf(RT z);
+ template <class RT, class Policy> // Error function.
+ typename tools::promote_args<RT>::type erf(RT z, const Policy&);
+
+ template <class RT>// Error function complement.
+ typename tools::promote_args<RT>::type erfc(RT z);
+ template <class RT, class Policy>// Error function complement.
+ typename tools::promote_args<RT>::type erfc(RT z, const Policy&);
+
+ template <class RT>// Error function inverse.
+ typename tools::promote_args<RT>::type erf_inv(RT z);
+ template <class RT, class Policy>// Error function inverse.
+ typename tools::promote_args<RT>::type erf_inv(RT z, const Policy& pol);
+
+ template <class RT>// Error function complement inverse.
+ typename tools::promote_args<RT>::type erfc_inv(RT z);
+ template <class RT, class Policy>// Error function complement inverse.
+ typename tools::promote_args<RT>::type erfc_inv(RT z, const Policy& pol);
+
+ // Polynomials:
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ legendre_next(unsigned l, T1 x, T2 Pl, T3 Plm1);
+
+ template <class T>
+ typename tools::promote_args<T>::type
+ legendre_p(int l, T x);
+ template <class T>
+ typename tools::promote_args<T>::type
+ legendre_p_prime(int l, T x);
+
+
+ template <class T, class Policy>
+ inline std::vector<T> legendre_p_zeros(int l, const Policy& pol);
+
+ template <class T>
+ inline std::vector<T> legendre_p_zeros(int l);
+
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
+ template <class T, class Policy>
+ typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
+ legendre_p(int l, T x, const Policy& pol);
+ template <class T, class Policy>
+ inline typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
+ legendre_p_prime(int l, T x, const Policy& pol);
+#endif
+ template <class T>
+ typename tools::promote_args<T>::type
+ legendre_q(unsigned l, T x);
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1310)
+ template <class T, class Policy>
+ typename boost::enable_if_c<policies::is_policy<Policy>::value, typename tools::promote_args<T>::type>::type
+ legendre_q(unsigned l, T x, const Policy& pol);
+#endif
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ legendre_next(unsigned l, unsigned m, T1 x, T2 Pl, T3 Plm1);
+
+ template <class T>
+ typename tools::promote_args<T>::type
+ legendre_p(int l, int m, T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type
+ legendre_p(int l, int m, T x, const Policy& pol);
+
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ laguerre_next(unsigned n, T1 x, T2 Ln, T3 Lnm1);
+
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ laguerre_next(unsigned n, unsigned l, T1 x, T2 Pl, T3 Plm1);
+
+ template <class T>
+ typename tools::promote_args<T>::type
+ laguerre(unsigned n, T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type
+ laguerre(unsigned n, unsigned m, T x, const Policy& pol);
+
+ template <class T1, class T2>
+ struct laguerre_result
+ {
+ typedef typename mpl::if_<
+ policies::is_policy<T2>,
+ typename tools::promote_args<T1>::type,
+ typename tools::promote_args<T2>::type
+ >::type type;
+ };
+
+ template <class T1, class T2>
+ typename laguerre_result<T1, T2>::type
+ laguerre(unsigned n, T1 m, T2 x);
+
+ template <class T>
+ typename tools::promote_args<T>::type
+ hermite(unsigned n, T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type
+ hermite(unsigned n, T x, const Policy& pol);
+
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ hermite_next(unsigned n, T1 x, T2 Hn, T3 Hnm1);
+
+ template<class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type chebyshev_next(T1 const & x, T2 const & Tn, T3 const & Tn_1);
+
+ template <class Real, class Policy>
+ typename tools::promote_args<Real>::type
+ chebyshev_t(unsigned n, Real const & x, const Policy&);
+ template<class Real>
+ typename tools::promote_args<Real>::type chebyshev_t(unsigned n, Real const & x);
+
+ template <class Real, class Policy>
+ typename tools::promote_args<Real>::type
+ chebyshev_u(unsigned n, Real const & x, const Policy&);
+ template<class Real>
+ typename tools::promote_args<Real>::type chebyshev_u(unsigned n, Real const & x);
+
+ template <class Real, class Policy>
+ typename tools::promote_args<Real>::type
+ chebyshev_t_prime(unsigned n, Real const & x, const Policy&);
+ template<class Real>
+ typename tools::promote_args<Real>::type chebyshev_t_prime(unsigned n, Real const & x);
+
+ template<class Real, class T2>
+ Real chebyshev_clenshaw_recurrence(const Real* const c, size_t length, const T2& x);
+
+ template <class T1, class T2>
+ std::complex<typename tools::promote_args<T1, T2>::type>
+ spherical_harmonic(unsigned n, int m, T1 theta, T2 phi);
+
+ template <class T1, class T2, class Policy>
+ std::complex<typename tools::promote_args<T1, T2>::type>
+ spherical_harmonic(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);
+
+ // Elliptic integrals:
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rf(T1 x, T2 y, T3 z);
+
+ template <class T1, class T2, class T3, class Policy>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rf(T1 x, T2 y, T3 z, const Policy& pol);
+
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rd(T1 x, T2 y, T3 z);
+
+ template <class T1, class T2, class T3, class Policy>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rd(T1 x, T2 y, T3 z, const Policy& pol);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ ellint_rc(T1 x, T2 y);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ ellint_rc(T1 x, T2 y, const Policy& pol);
+
+ template <class T1, class T2, class T3, class T4>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ellint_rj(T1 x, T2 y, T3 z, T4 p);
+
+ template <class T1, class T2, class T3, class T4, class Policy>
+ typename tools::promote_args<T1, T2, T3, T4>::type
+ ellint_rj(T1 x, T2 y, T3 z, T4 p, const Policy& pol);
+
+ template <class T1, class T2, class T3>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rg(T1 x, T2 y, T3 z);
+
+ template <class T1, class T2, class T3, class Policy>
+ typename tools::promote_args<T1, T2, T3>::type
+ ellint_rg(T1 x, T2 y, T3 z, const Policy& pol);
+
+ template <typename T>
+ typename tools::promote_args<T>::type ellint_2(T k);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi, const Policy& pol);
+
+ template <typename T>
+ typename tools::promote_args<T>::type ellint_1(T k);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi, const Policy& pol);
+
+ template <typename T>
+ typename tools::promote_args<T>::type ellint_d(T k);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi, const Policy& pol);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi, const Policy& pol);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi, const Policy& pol);
+
+ namespace detail{
+
+ template <class T, class U, class V>
+ struct ellint_3_result
+ {
+ typedef typename mpl::if_<
+ policies::is_policy<V>,
+ typename tools::promote_args<T, U>::type,
+ typename tools::promote_args<T, U, V>::type
+ >::type type;
+ };
+
+ } // namespace detail
+
+
+ template <class T1, class T2, class T3>
+ typename detail::ellint_3_result<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi);
+
+ template <class T1, class T2, class T3, class Policy>
+ typename tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi, const Policy& pol);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v);
+
+ // Factorial functions.
+ // Note: not for integral types, at present.
+ template <class RT>
+ struct max_factorial;
+ template <class RT>
+ RT factorial(unsigned int);
+ template <class RT, class Policy>
+ RT factorial(unsigned int, const Policy& pol);
+ template <class RT>
+ RT unchecked_factorial(unsigned int BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(RT));
+ template <class RT>
+ RT double_factorial(unsigned i);
+ template <class RT, class Policy>
+ RT double_factorial(unsigned i, const Policy& pol);
+
+ template <class RT>
+ typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n);
+
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type falling_factorial(RT x, unsigned n, const Policy& pol);
+
+ template <class RT>
+ typename tools::promote_args<RT>::type rising_factorial(RT x, int n);
+
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type rising_factorial(RT x, int n, const Policy& pol);
+
+ // Gamma functions.
+ template <class RT>
+ typename tools::promote_args<RT>::type tgamma(RT z);
+
+ template <class RT>
+ typename tools::promote_args<RT>::type tgamma1pm1(RT z);
+
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type tgamma1pm1(RT z, const Policy& pol);
+
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z);
+
+ template <class RT1, class RT2, class Policy>
+ typename tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z, const Policy& pol);
+
+ template <class RT>
+ typename tools::promote_args<RT>::type lgamma(RT z, int* sign);
+
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type lgamma(RT z, int* sign, const Policy& pol);
+
+ template <class RT>
+ typename tools::promote_args<RT>::type lgamma(RT x);
+
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type lgamma(RT x, const Policy& pol);
+
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z);
+
+ template <class RT1, class RT2, class Policy>
+ typename tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z, const Policy&);
+
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z);
+
+ template <class RT1, class RT2, class Policy>
+ typename tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z, const Policy&);
+
+ template <class RT1, class RT2>
+ typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z);
+
+ template <class RT1, class RT2, class Policy>
+ typename tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z, const Policy&);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta, const Policy&);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b, const Policy&);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x, const Policy&);
+
+ // gamma inverse.
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p, const Policy&);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p, const Policy&);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q, const Policy&);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q, const Policy&);
+
+ // digamma:
+ template <class T>
+ typename tools::promote_args<T>::type digamma(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type digamma(T x, const Policy&);
+
+ // trigamma:
+ template <class T>
+ typename tools::promote_args<T>::type trigamma(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type trigamma(T x, const Policy&);
+
+ // polygamma:
+ template <class T>
+ typename tools::promote_args<T>::type polygamma(int n, T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type polygamma(int n, T x, const Policy&);
+
+ // Hypotenuse function sqrt(x ^ 2 + y ^ 2).
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ hypot(T1 x, T2 y);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ hypot(T1 x, T2 y, const Policy&);
+
+ // cbrt - cube root.
+ template <class RT>
+ typename tools::promote_args<RT>::type cbrt(RT z);
+
+ template <class RT, class Policy>
+ typename tools::promote_args<RT>::type cbrt(RT z, const Policy&);
+
+ // log1p is log(x + 1)
+ template <class T>
+ typename tools::promote_args<T>::type log1p(T);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type log1p(T, const Policy&);
+
+ // log1pmx is log(x + 1) - x
+ template <class T>
+ typename tools::promote_args<T>::type log1pmx(T);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type log1pmx(T, const Policy&);
+
+ // Exp (x) minus 1 functions.
+ template <class T>
+ typename tools::promote_args<T>::type expm1(T);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type expm1(T, const Policy&);
+
+ // Power - 1
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type
+ powm1(const T1 a, const T2 z);
+
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type
+ powm1(const T1 a, const T2 z, const Policy&);
+
+ // sqrt(1+x) - 1
+ template <class T>
+ typename tools::promote_args<T>::type sqrt1pm1(const T& val);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type sqrt1pm1(const T& val, const Policy&);
+
+ // sinus cardinals:
+ template <class T>
+ typename tools::promote_args<T>::type sinc_pi(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type sinc_pi(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type sinhc_pi(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type sinhc_pi(T x, const Policy&);
+
+ // inverse hyperbolics:
+ template<typename T>
+ typename tools::promote_args<T>::type asinh(T x);
+
+ template<typename T, class Policy>
+ typename tools::promote_args<T>::type asinh(T x, const Policy&);
+
+ template<typename T>
+ typename tools::promote_args<T>::type acosh(T x);
+
+ template<typename T, class Policy>
+ typename tools::promote_args<T>::type acosh(T x, const Policy&);
+
+ template<typename T>
+ typename tools::promote_args<T>::type atanh(T x);
+
+ template<typename T, class Policy>
+ typename tools::promote_args<T>::type atanh(T x, const Policy&);
+
+ namespace detail{
+
+ typedef mpl::int_<0> bessel_no_int_tag; // No integer optimisation possible.
+ typedef mpl::int_<1> bessel_maybe_int_tag; // Maybe integer optimisation.
+ typedef mpl::int_<2> bessel_int_tag; // Definite integer optimistaion.
+
+ template <class T1, class T2, class Policy>
+ struct bessel_traits
+ {
+ typedef typename mpl::if_<
+ is_integral<T1>,
+ typename tools::promote_args<T2>::type,
+ typename tools::promote_args<T1, T2>::type
+ >::type result_type;
+
+ typedef typename policies::precision<result_type, Policy>::type precision_type;
+
+ typedef typename mpl::if_<
+ mpl::or_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::greater<precision_type, mpl::int_<64> > >,
+ bessel_no_int_tag,
+ typename mpl::if_<
+ is_integral<T1>,
+ bessel_int_tag,
+ bessel_maybe_int_tag
+ >::type
+ >::type optimisation_tag;
+ typedef typename mpl::if_<
+ mpl::or_<
+ mpl::less_equal<precision_type, mpl::int_<0> >,
+ mpl::greater<precision_type, mpl::int_<113> > >,
+ bessel_no_int_tag,
+ typename mpl::if_<
+ is_integral<T1>,
+ bessel_int_tag,
+ bessel_maybe_int_tag
+ >::type
+ >::type optimisation_tag128;
+ };
+ } // detail
+
+ // Bessel functions:
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_j_prime(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j(T1 v, T2 x);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_j_prime(T1 v, T2 x);
+
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel(unsigned v, T x, const Policy& pol);
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type sph_bessel_prime(unsigned v, T x, const Policy& pol);
+
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel(unsigned v, T x);
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_bessel_prime(unsigned v, T x);
+
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_i_prime(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i(T1 v, T2 x);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_i_prime(T1 v, T2 x);
+
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_bessel_k_prime(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k(T1 v, T2 x);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_bessel_k_prime(T1 v, T2 x);
+
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann(T1 v, T2 x, const Policy& pol);
+ template <class T1, class T2, class Policy>
+ typename detail::bessel_traits<T1, T2, Policy>::result_type cyl_neumann_prime(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann(T1 v, T2 x);
+ template <class T1, class T2>
+ typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type cyl_neumann_prime(T1 v, T2 x);
+
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann(unsigned v, T x, const Policy& pol);
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type sph_neumann_prime(unsigned v, T x, const Policy& pol);
+
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann(unsigned v, T x);
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type sph_neumann_prime(unsigned v, T x);
+
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type cyl_bessel_j_zero(T v, int m, const Policy& pol);
+
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_bessel_j_zero(T v, int m);
+
+ template <class T, class OutputIterator>
+ OutputIterator cyl_bessel_j_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator cyl_bessel_j_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
+ template <class T, class Policy>
+ typename detail::bessel_traits<T, T, Policy>::result_type cyl_neumann_zero(T v, int m, const Policy& pol);
+
+ template <class T>
+ typename detail::bessel_traits<T, T, policies::policy<> >::result_type cyl_neumann_zero(T v, int m);
+
+ template <class T, class OutputIterator>
+ OutputIterator cyl_neumann_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator cyl_neumann_zero(T v,
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
+ template <class T1, class T2>
+ std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_1(T1 v, T2 x);
+
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_1(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> cyl_hankel_2(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> cyl_hankel_2(T1 v, T2 x);
+
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_1(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_1(T1 v, T2 x);
+
+ template <class T1, class T2, class Policy>
+ std::complex<typename detail::bessel_traits<T1, T2, Policy>::result_type> sph_hankel_2(T1 v, T2 x, const Policy& pol);
+
+ template <class T1, class T2>
+ std::complex<typename detail::bessel_traits<T1, T2, policies::policy<> >::result_type> sph_hankel_2(T1 v, T2 x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type airy_ai(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type airy_ai(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type airy_bi(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type airy_bi(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type airy_ai_prime(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type airy_ai_prime(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type airy_bi_prime(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type airy_bi_prime(T x);
+
+ template <class T>
+ T airy_ai_zero(int m);
+ template <class T, class Policy>
+ T airy_ai_zero(int m, const Policy&);
+
+ template <class OutputIterator>
+ OutputIterator airy_ai_zero(
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+ template <class OutputIterator, class Policy>
+ OutputIterator airy_ai_zero(
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
+ template <class T>
+ T airy_bi_zero(int m);
+ template <class T, class Policy>
+ T airy_bi_zero(int m, const Policy&);
+
+ template <class OutputIterator>
+ OutputIterator airy_bi_zero(
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it);
+ template <class OutputIterator, class Policy>
+ OutputIterator airy_bi_zero(
+ int start_index,
+ unsigned number_of_zeros,
+ OutputIterator out_it,
+ const Policy&);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type sin_pi(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type sin_pi(T x);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type cos_pi(T x, const Policy&);
+
+ template <class T>
+ typename tools::promote_args<T>::type cos_pi(T x);
+
+ template <class T>
+ int fpclassify BOOST_NO_MACRO_EXPAND(T t);
+
+ template <class T>
+ bool isfinite BOOST_NO_MACRO_EXPAND(T z);
+
+ template <class T>
+ bool isinf BOOST_NO_MACRO_EXPAND(T t);
+
+ template <class T>
+ bool isnan BOOST_NO_MACRO_EXPAND(T t);
+
+ template <class T>
+ bool isnormal BOOST_NO_MACRO_EXPAND(T t);
+
+ template<class T>
+ int signbit BOOST_NO_MACRO_EXPAND(T x);
+
+ template <class T>
+ int sign BOOST_NO_MACRO_EXPAND(const T& z);
+
+ template <class T, class U>
+ typename tools::promote_args_permissive<T, U>::type copysign BOOST_NO_MACRO_EXPAND(const T& x, const U& y);
+
+ template <class T>
+ typename tools::promote_args_permissive<T>::type changesign BOOST_NO_MACRO_EXPAND(const T& z);
+
+ // Exponential integrals:
+ namespace detail{
+
+ template <class T, class U>
+ struct expint_result
+ {
+ typedef typename mpl::if_<
+ policies::is_policy<U>,
+ typename tools::promote_args<T>::type,
+ typename tools::promote_args<U>::type
+ >::type type;
+ };
+
+ } // namespace detail
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type expint(unsigned n, T z, const Policy&);
+
+ template <class T, class U>
+ typename detail::expint_result<T, U>::type expint(T const z, U const u);
+
+ template <class T>
+ typename tools::promote_args<T>::type expint(T z);
+
+ // Zeta:
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type zeta(T s, const Policy&);
+
+ // Owen's T function:
+ template <class T1, class T2, class Policy>
+ typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a, const Policy& pol);
+
+ template <class T1, class T2>
+ typename tools::promote_args<T1, T2>::type owens_t(T1 h, T2 a);
+
+ // Jacobi Functions:
+ template <class T, class U, class V, class Policy>
+ typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn, V* pdn, const Policy&);
+
+ template <class T, class U, class V>
+ typename tools::promote_args<T, U, V>::type jacobi_elliptic(T k, U theta, V* pcn = 0, V* pdn = 0);
+
+ template <class U, class T, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta, const Policy& pol);
+
+ template <class U, class T>
+ typename tools::promote_args<T, U>::type jacobi_sn(U k, T theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_cn(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_dn(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_cd(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_dc(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_ns(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_sd(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_ds(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_nc(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_nd(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_sc(T k, U theta);
+
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta, const Policy& pol);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type jacobi_cs(T k, U theta);
+
+
+ template <class T>
+ typename tools::promote_args<T>::type zeta(T s);
+
+ // pow:
+ template <int N, typename T, class Policy>
+ typename tools::promote_args<T>::type pow(T base, const Policy& policy);
+
+ template <int N, typename T>
+ typename tools::promote_args<T>::type pow(T base);
+
+ // next:
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type nextafter(const T&, const U&, const Policy&);
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type nextafter(const T&, const U&);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type float_next(const T&, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type float_next(const T&);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type float_prior(const T&, const Policy&);
+ template <class T>
+ typename tools::promote_args<T>::type float_prior(const T&);
+ template <class T, class U, class Policy>
+ typename tools::promote_args<T, U>::type float_distance(const T&, const U&, const Policy&);
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type float_distance(const T&, const U&);
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol);
+ template <class T>
+ typename tools::promote_args<T>::type float_advance(const T& val, int distance);
+
+ template <class T, class Policy>
+ typename tools::promote_args<T>::type ulp(const T& val, const Policy& pol);
+ template <class T>
+ typename tools::promote_args<T>::type ulp(const T& val);
+
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type relative_difference(const T&, const U&);
+ template <class T, class U>
+ typename tools::promote_args<T, U>::type epsilon_difference(const T&, const U&);
+
+ template<class T>
+ BOOST_MATH_CONSTEXPR_TABLE_FUNCTION T unchecked_bernoulli_b2n(const std::size_t n);
+ template <class T, class Policy>
+ T bernoulli_b2n(const int i, const Policy &pol);
+ template <class T>
+ T bernoulli_b2n(const int i);
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator bernoulli_b2n(const int start_index,
+ const unsigned number_of_bernoullis_b2n,
+ OutputIterator out_it,
+ const Policy& pol);
+ template <class T, class OutputIterator>
+ OutputIterator bernoulli_b2n(const int start_index,
+ const unsigned number_of_bernoullis_b2n,
+ OutputIterator out_it);
+ template <class T, class Policy>
+ T tangent_t2n(const int i, const Policy &pol);
+ template <class T>
+ T tangent_t2n(const int i);
+ template <class T, class OutputIterator, class Policy>
+ OutputIterator tangent_t2n(const int start_index,
+ const unsigned number_of_bernoullis_b2n,
+ OutputIterator out_it,
+ const Policy& pol);
+ template <class T, class OutputIterator>
+ OutputIterator tangent_t2n(const int start_index,
+ const unsigned number_of_bernoullis_b2n,
+ OutputIterator out_it);
+
+ // Lambert W:
+ template <class T, class Policy>
+ typename boost::math::tools::promote_args<T>::type lambert_w0(T z, const Policy& pol);
+ template <class T>
+ typename boost::math::tools::promote_args<T>::type lambert_w0(T z);
+ template <class T, class Policy>
+ typename boost::math::tools::promote_args<T>::type lambert_wm1(T z, const Policy& pol);
+ template <class T>
+ typename boost::math::tools::promote_args<T>::type lambert_wm1(T z);
+ template <class T, class Policy>
+ typename boost::math::tools::promote_args<T>::type lambert_w0_prime(T z, const Policy& pol);
+ template <class T>
+ typename boost::math::tools::promote_args<T>::type lambert_w0_prime(T z);
+ template <class T, class Policy>
+ typename boost::math::tools::promote_args<T>::type lambert_wm1_prime(T z, const Policy& pol);
+ template <class T>
+ typename boost::math::tools::promote_args<T>::type lambert_wm1_prime(T z);
+
+
+
+
+ } // namespace math
+} // namespace boost
+
+#ifdef BOOST_HAS_LONG_LONG
+#define BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+ \
+ template <class T>\
+ inline T modf(const T& v, boost::long_long_type* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+ \
+ template <class T>\
+ inline boost::long_long_type lltrunc(const T& v){ using boost::math::lltrunc; return lltrunc(v, Policy()); }\
+ \
+ template <class T>\
+ inline boost::long_long_type llround(const T& v){ using boost::math::llround; return llround(v, Policy()); }\
+
+#else
+#define BOOST_MATH_DETAIL_LL_FUNC(Policy)
+#endif
+
+#define BOOST_MATH_DECLARE_SPECIAL_FUNCTIONS(Policy)\
+ \
+ BOOST_MATH_DETAIL_LL_FUNC(Policy)\
+ \
+ template <class RT1, class RT2>\
+ inline typename boost::math::tools::promote_args<RT1, RT2>::type \
+ beta(RT1 a, RT2 b) { return ::boost::math::beta(a, b, Policy()); }\
+\
+ template <class RT1, class RT2, class A>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, A>::type \
+ beta(RT1 a, RT2 b, A x){ return ::boost::math::beta(a, b, x, Policy()); }\
+\
+ template <class RT1, class RT2, class RT3>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+ betac(RT1 a, RT2 b, RT3 x) { return ::boost::math::betac(a, b, x, Policy()); }\
+\
+ template <class RT1, class RT2, class RT3>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+ ibeta(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta(a, b, x, Policy()); }\
+\
+ template <class RT1, class RT2, class RT3>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+ ibetac(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibetac(a, b, x, Policy()); }\
+\
+ template <class T1, class T2, class T3, class T4>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
+ ibeta_inv(T1 a, T2 b, T3 p, T4* py){ return ::boost::math::ibeta_inv(a, b, p, py, Policy()); }\
+\
+ template <class RT1, class RT2, class RT3>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+ ibeta_inv(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inv(a, b, p, Policy()); }\
+\
+ template <class T1, class T2, class T3, class T4>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
+ ibetac_inv(T1 a, T2 b, T3 q, T4* py){ return ::boost::math::ibetac_inv(a, b, q, py, Policy()); }\
+\
+ template <class RT1, class RT2, class RT3>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+ ibeta_inva(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_inva(a, b, p, Policy()); }\
+\
+ template <class T1, class T2, class T3>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+ ibetac_inva(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_inva(a, b, q, Policy()); }\
+\
+ template <class RT1, class RT2, class RT3>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+ ibeta_invb(RT1 a, RT2 b, RT3 p){ return ::boost::math::ibeta_invb(a, b, p, Policy()); }\
+\
+ template <class T1, class T2, class T3>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+ ibetac_invb(T1 a, T2 b, T3 q){ return ::boost::math::ibetac_invb(a, b, q, Policy()); }\
+\
+ template <class RT1, class RT2, class RT3>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+ ibetac_inv(RT1 a, RT2 b, RT3 q){ return ::boost::math::ibetac_inv(a, b, q, Policy()); }\
+\
+ template <class RT1, class RT2, class RT3>\
+ inline typename boost::math::tools::promote_args<RT1, RT2, RT3>::type \
+ ibeta_derivative(RT1 a, RT2 b, RT3 x){ return ::boost::math::ibeta_derivative(a, b, x, Policy()); }\
+\
+ template <class T> T binomial_coefficient(unsigned n, unsigned k){ return ::boost::math::binomial_coefficient<T, Policy>(n, k, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type erf(RT z) { return ::boost::math::erf(z, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type erfc(RT z){ return ::boost::math::erfc(z, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type erf_inv(RT z) { return ::boost::math::erf_inv(z, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type erfc_inv(RT z){ return ::boost::math::erfc_inv(z, Policy()); }\
+\
+ using boost::math::legendre_next;\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type \
+ legendre_p(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type \
+ legendre_p_prime(int l, T x){ return ::boost::math::legendre_p(l, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type \
+ legendre_q(unsigned l, T x){ return ::boost::math::legendre_q(l, x, Policy()); }\
+\
+ using ::boost::math::legendre_next;\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type \
+ legendre_p(int l, int m, T x){ return ::boost::math::legendre_p(l, m, x, Policy()); }\
+\
+ using ::boost::math::laguerre_next;\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type \
+ laguerre(unsigned n, T x){ return ::boost::math::laguerre(n, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::laguerre_result<T1, T2>::type \
+ laguerre(unsigned n, T1 m, T2 x) { return ::boost::math::laguerre(n, m, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type \
+ hermite(unsigned n, T x){ return ::boost::math::hermite(n, x, Policy()); }\
+\
+ using boost::math::hermite_next;\
+\
+ using boost::math::chebyshev_next;\
+\
+ template<class Real>\
+ Real chebyshev_t(unsigned n, Real const & x){ return ::boost::math::chebyshev_t(n, x, Policy()); }\
+\
+ template<class Real>\
+ Real chebyshev_u(unsigned n, Real const & x){ return ::boost::math::chebyshev_u(n, x, Policy()); }\
+\
+ template<class Real>\
+ Real chebyshev_t_prime(unsigned n, Real const & x){ return ::boost::math::chebyshev_t_prime(n, x, Policy()); }\
+\
+ using ::boost::math::chebyshev_clenshaw_recurrence;\
+\
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::tools::promote_args<T1, T2>::type> \
+ spherical_harmonic(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic(n, m, theta, phi, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type \
+ spherical_harmonic_r(unsigned n, int m, T1 theta, T2 phi){ return ::boost::math::spherical_harmonic_r(n, m, theta, phi, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type \
+ spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi){ return boost::math::spherical_harmonic_i(n, m, theta, phi, Policy()); }\
+\
+ template <class T1, class T2, class Policy>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type \
+ spherical_harmonic_i(unsigned n, int m, T1 theta, T2 phi, const Policy& pol);\
+\
+ template <class T1, class T2, class T3>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+ ellint_rf(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rf(x, y, z, Policy()); }\
+\
+ template <class T1, class T2, class T3>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+ ellint_rd(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rd(x, y, z, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type \
+ ellint_rc(T1 x, T2 y){ return ::boost::math::ellint_rc(x, y, Policy()); }\
+\
+ template <class T1, class T2, class T3, class T4>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3, T4>::type \
+ ellint_rj(T1 x, T2 y, T3 z, T4 p){ return boost::math::ellint_rj(x, y, z, p, Policy()); }\
+\
+ template <class T1, class T2, class T3>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3>::type \
+ ellint_rg(T1 x, T2 y, T3 z){ return ::boost::math::ellint_rg(x, y, z, Policy()); }\
+ \
+ template <typename T>\
+ inline typename boost::math::tools::promote_args<T>::type ellint_2(T k){ return boost::math::ellint_2(k, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type ellint_2(T1 k, T2 phi){ return boost::math::ellint_2(k, phi, Policy()); }\
+\
+ template <typename T>\
+ inline typename boost::math::tools::promote_args<T>::type ellint_d(T k){ return boost::math::ellint_d(k, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type ellint_d(T1 k, T2 phi){ return boost::math::ellint_d(k, phi, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type jacobi_zeta(T1 k, T2 phi){ return boost::math::jacobi_zeta(k, phi, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type heuman_lambda(T1 k, T2 phi){ return boost::math::heuman_lambda(k, phi, Policy()); }\
+\
+ template <typename T>\
+ inline typename boost::math::tools::promote_args<T>::type ellint_1(T k){ return boost::math::ellint_1(k, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type ellint_1(T1 k, T2 phi){ return boost::math::ellint_1(k, phi, Policy()); }\
+\
+ template <class T1, class T2, class T3>\
+ inline typename boost::math::tools::promote_args<T1, T2, T3>::type ellint_3(T1 k, T2 v, T3 phi){ return boost::math::ellint_3(k, v, phi, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type ellint_3(T1 k, T2 v){ return boost::math::ellint_3(k, v, Policy()); }\
+\
+ using boost::math::max_factorial;\
+ template <class RT>\
+ inline RT factorial(unsigned int i) { return boost::math::factorial<RT>(i, Policy()); }\
+ using boost::math::unchecked_factorial;\
+ template <class RT>\
+ inline RT double_factorial(unsigned i){ return boost::math::double_factorial<RT>(i, Policy()); }\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type falling_factorial(RT x, unsigned n){ return boost::math::falling_factorial(x, n, Policy()); }\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type rising_factorial(RT x, unsigned n){ return boost::math::rising_factorial(x, n, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type tgamma(RT z){ return boost::math::tgamma(z, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type tgamma1pm1(RT z){ return boost::math::tgamma1pm1(z, Policy()); }\
+\
+ template <class RT1, class RT2>\
+ inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma(RT1 a, RT2 z){ return boost::math::tgamma(a, z, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type lgamma(RT z, int* sign){ return boost::math::lgamma(z, sign, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type lgamma(RT x){ return boost::math::lgamma(x, Policy()); }\
+\
+ template <class RT1, class RT2>\
+ inline typename boost::math::tools::promote_args<RT1, RT2>::type tgamma_lower(RT1 a, RT2 z){ return boost::math::tgamma_lower(a, z, Policy()); }\
+\
+ template <class RT1, class RT2>\
+ inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_q(RT1 a, RT2 z){ return boost::math::gamma_q(a, z, Policy()); }\
+\
+ template <class RT1, class RT2>\
+ inline typename boost::math::tools::promote_args<RT1, RT2>::type gamma_p(RT1 a, RT2 z){ return boost::math::gamma_p(a, z, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_delta_ratio(T1 z, T2 delta){ return boost::math::tgamma_delta_ratio(z, delta, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type tgamma_ratio(T1 a, T2 b) { return boost::math::tgamma_ratio(a, b, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_derivative(T1 a, T2 x){ return boost::math::gamma_p_derivative(a, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inv(T1 a, T2 p){ return boost::math::gamma_p_inv(a, p, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type gamma_p_inva(T1 a, T2 p){ return boost::math::gamma_p_inva(a, p, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inv(T1 a, T2 q){ return boost::math::gamma_q_inv(a, q, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type gamma_q_inva(T1 a, T2 q){ return boost::math::gamma_q_inva(a, q, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type digamma(T x){ return boost::math::digamma(x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type trigamma(T x){ return boost::math::trigamma(x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type polygamma(int n, T x){ return boost::math::polygamma(n, x, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type \
+ hypot(T1 x, T2 y){ return boost::math::hypot(x, y, Policy()); }\
+\
+ template <class RT>\
+ inline typename boost::math::tools::promote_args<RT>::type cbrt(RT z){ return boost::math::cbrt(z, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type log1p(T x){ return boost::math::log1p(x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type log1pmx(T x){ return boost::math::log1pmx(x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type expm1(T x){ return boost::math::expm1(x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::tools::promote_args<T1, T2>::type \
+ powm1(const T1 a, const T2 z){ return boost::math::powm1(a, z, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type sqrt1pm1(const T& val){ return boost::math::sqrt1pm1(val, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type sinc_pi(T x){ return boost::math::sinc_pi(x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type sinhc_pi(T x){ return boost::math::sinhc_pi(x, Policy()); }\
+\
+ template<typename T>\
+ inline typename boost::math::tools::promote_args<T>::type asinh(const T x){ return boost::math::asinh(x, Policy()); }\
+\
+ template<typename T>\
+ inline typename boost::math::tools::promote_args<T>::type acosh(const T x){ return boost::math::acosh(x, Policy()); }\
+\
+ template<typename T>\
+ inline typename boost::math::tools::promote_args<T>::type atanh(const T x){ return boost::math::atanh(x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j(T1 v, T2 x)\
+ { return boost::math::cyl_bessel_j(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type cyl_bessel_j_prime(T1 v, T2 x)\
+ { return boost::math::cyl_bessel_j_prime(v, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel(unsigned v, T x)\
+ { return boost::math::sph_bessel(v, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type sph_bessel_prime(unsigned v, T x)\
+ { return boost::math::sph_bessel_prime(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_bessel_i(T1 v, T2 x) { return boost::math::cyl_bessel_i(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_bessel_i_prime(T1 v, T2 x) { return boost::math::cyl_bessel_i_prime(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_bessel_k(T1 v, T2 x) { return boost::math::cyl_bessel_k(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_bessel_k_prime(T1 v, T2 x) { return boost::math::cyl_bessel_k_prime(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_neumann(T1 v, T2 x){ return boost::math::cyl_neumann(v, x, Policy()); }\
+\
+ template <class T1, class T2>\
+ inline typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type \
+ cyl_neumann_prime(T1 v, T2 x){ return boost::math::cyl_neumann_prime(v, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
+ sph_neumann(unsigned v, T x){ return boost::math::sph_neumann(v, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type \
+ sph_neumann_prime(unsigned v, T x){ return boost::math::sph_neumann_prime(v, x, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_bessel_j_zero(T v, int m)\
+ { return boost::math::cyl_bessel_j_zero(v, m, Policy()); }\
+\
+template <class OutputIterator, class T>\
+ inline void cyl_bessel_j_zero(T v,\
+ int start_index,\
+ unsigned number_of_zeros,\
+ OutputIterator out_it)\
+ { boost::math::cyl_bessel_j_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::detail::bessel_traits<T, T, Policy >::result_type cyl_neumann_zero(T v, int m)\
+ { return boost::math::cyl_neumann_zero(v, m, Policy()); }\
+\
+template <class OutputIterator, class T>\
+ inline void cyl_neumann_zero(T v,\
+ int start_index,\
+ unsigned number_of_zeros,\
+ OutputIterator out_it)\
+ { boost::math::cyl_neumann_zero(v, start_index, number_of_zeros, out_it, Policy()); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type sin_pi(T x){ return boost::math::sin_pi(x); }\
+\
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type cos_pi(T x){ return boost::math::cos_pi(x); }\
+\
+ using boost::math::fpclassify;\
+ using boost::math::isfinite;\
+ using boost::math::isinf;\
+ using boost::math::isnan;\
+ using boost::math::isnormal;\
+ using boost::math::signbit;\
+ using boost::math::sign;\
+ using boost::math::copysign;\
+ using boost::math::changesign;\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T,U>::type expint(T const& z, U const& u)\
+ { return boost::math::expint(z, u, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type expint(T z){ return boost::math::expint(z, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type zeta(T s){ return boost::math::zeta(s, Policy()); }\
+ \
+ template <class T>\
+ inline T round(const T& v){ using boost::math::round; return round(v, Policy()); }\
+ \
+ template <class T>\
+ inline int iround(const T& v){ using boost::math::iround; return iround(v, Policy()); }\
+ \
+ template <class T>\
+ inline long lround(const T& v){ using boost::math::lround; return lround(v, Policy()); }\
+ \
+ template <class T>\
+ inline T trunc(const T& v){ using boost::math::trunc; return trunc(v, Policy()); }\
+ \
+ template <class T>\
+ inline int itrunc(const T& v){ using boost::math::itrunc; return itrunc(v, Policy()); }\
+ \
+ template <class T>\
+ inline long ltrunc(const T& v){ using boost::math::ltrunc; return ltrunc(v, Policy()); }\
+ \
+ template <class T>\
+ inline T modf(const T& v, T* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+ \
+ template <class T>\
+ inline T modf(const T& v, int* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+ \
+ template <class T>\
+ inline T modf(const T& v, long* ipart){ using boost::math::modf; return modf(v, ipart, Policy()); }\
+ \
+ template <int N, class T>\
+ inline typename boost::math::tools::promote_args<T>::type pow(T v){ return boost::math::pow<N>(v, Policy()); }\
+ \
+ template <class T> T nextafter(const T& a, const T& b){ return boost::math::nextafter(a, b, Policy()); }\
+ template <class T> T float_next(const T& a){ return boost::math::float_next(a, Policy()); }\
+ template <class T> T float_prior(const T& a){ return boost::math::float_prior(a, Policy()); }\
+ template <class T> T float_distance(const T& a, const T& b){ return boost::math::float_distance(a, b, Policy()); }\
+ template <class T> T ulp(const T& a){ return boost::math::ulp(a, Policy()); }\
+ \
+ template <class RT1, class RT2>\
+ inline typename boost::math::tools::promote_args<RT1, RT2>::type owens_t(RT1 a, RT2 z){ return boost::math::owens_t(a, z, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_1(T1 v, T2 x)\
+ { return boost::math::cyl_hankel_1(v, x, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> cyl_hankel_2(T1 v, T2 x)\
+ { return boost::math::cyl_hankel_2(v, x, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_1(T1 v, T2 x)\
+ { return boost::math::sph_hankel_1(v, x, Policy()); }\
+ \
+ template <class T1, class T2>\
+ inline std::complex<typename boost::math::detail::bessel_traits<T1, T2, Policy >::result_type> sph_hankel_2(T1 v, T2 x)\
+ { return boost::math::sph_hankel_2(v, x, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type jacobi_elliptic(T k, T theta, T* pcn, T* pdn)\
+ { return boost::math::jacobi_elliptic(k, theta, pcn, pdn, Policy()); }\
+ \
+ template <class U, class T>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_sn(U k, T theta)\
+ { return boost::math::jacobi_sn(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_cn(T k, U theta)\
+ { return boost::math::jacobi_cn(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_dn(T k, U theta)\
+ { return boost::math::jacobi_dn(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_cd(T k, U theta)\
+ { return boost::math::jacobi_cd(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_dc(T k, U theta)\
+ { return boost::math::jacobi_dc(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_ns(T k, U theta)\
+ { return boost::math::jacobi_ns(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_sd(T k, U theta)\
+ { return boost::math::jacobi_sd(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_ds(T k, U theta)\
+ { return boost::math::jacobi_ds(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_nc(T k, U theta)\
+ { return boost::math::jacobi_nc(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_nd(T k, U theta)\
+ { return boost::math::jacobi_nd(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_sc(T k, U theta)\
+ { return boost::math::jacobi_sc(k, theta, Policy()); }\
+ \
+ template <class T, class U>\
+ inline typename boost::math::tools::promote_args<T, U>::type jacobi_cs(T k, U theta)\
+ { return boost::math::jacobi_cs(k, theta, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type airy_ai(T x)\
+ { return boost::math::airy_ai(x, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type airy_bi(T x)\
+ { return boost::math::airy_bi(x, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type airy_ai_prime(T x)\
+ { return boost::math::airy_ai_prime(x, Policy()); }\
+ \
+ template <class T>\
+ inline typename boost::math::tools::promote_args<T>::type airy_bi_prime(T x)\
+ { return boost::math::airy_bi_prime(x, Policy()); }\
+ \
+ template <class T>\
+ inline T airy_ai_zero(int m)\
+ { return boost::math::airy_ai_zero<T>(m, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator airy_ai_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
+ { return boost::math::airy_ai_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
+ \
+ template <class T>\
+ inline T airy_bi_zero(int m)\
+ { return boost::math::airy_bi_zero<T>(m, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator airy_bi_zero(int start_index, unsigned number_of_zeros, OutputIterator out_it)\
+ { return boost::math::airy_bi_zero<T>(start_index, number_of_zeros, out_it, Policy()); }\
+ \
+ template <class T>\
+ T bernoulli_b2n(const int i)\
+ { return boost::math::bernoulli_b2n<T>(i, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator bernoulli_b2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\
+ { return boost::math::bernoulli_b2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\
+ \
+ template <class T>\
+ T tangent_t2n(const int i)\
+ { return boost::math::tangent_t2n<T>(i, Policy()); }\
+ template <class T, class OutputIterator>\
+ OutputIterator tangent_t2n(int start_index, unsigned number_of_bernoullis_b2n, OutputIterator out_it)\
+ { return boost::math::tangent_t2n<T>(start_index, number_of_bernoullis_b2n, out_it, Policy()); }\
+ \
+ template <class T> inline typename boost::math::tools::promote_args<T>::type lambert_w0(T z) { return boost::math::lambert_w0(z, Policy()); }\
+ template <class T> inline typename boost::math::tools::promote_args<T>::type lambert_wm1(T z) { return boost::math::lambert_w0(z, Policy()); }\
+ template <class T> inline typename boost::math::tools::promote_args<T>::type lambert_w0_prime(T z) { return boost::math::lambert_w0(z, Policy()); }\
+ template <class T> inline typename boost::math::tools::promote_args<T>::type lambert_wm1_prime(T z) { return boost::math::lambert_w0(z, Policy()); }\
+ \
+
+
+
+
+
+
+#endif // BOOST_MATH_SPECIAL_MATH_FWD_HPP
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/next.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/next.hpp
new file mode 100644
index 00000000000..e27bf0ed958
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/next.hpp
@@ -0,0 +1,858 @@
+// (C) Copyright John Maddock 2008.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_SPECIAL_NEXT_HPP
+#define BOOST_MATH_SPECIAL_NEXT_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/math/special_functions/trunc.hpp>
+
+#include <float.h>
+
+#if !defined(_CRAYC) && !defined(__CUDACC__) && (!defined(__GNUC__) || (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ > 3)))
+#if (defined(_M_IX86_FP) && (_M_IX86_FP >= 2)) || defined(__SSE2__)
+#include "xmmintrin.h"
+#define BOOST_MATH_CHECK_SSE2
+#endif
+#endif
+
+namespace boost{ namespace math{
+
+ namespace concepts {
+
+ class real_concept;
+ class std_real_concept;
+
+ }
+
+namespace detail{
+
+template <class T>
+struct has_hidden_guard_digits;
+template <>
+struct has_hidden_guard_digits<float> : public mpl::false_ {};
+template <>
+struct has_hidden_guard_digits<double> : public mpl::false_ {};
+template <>
+struct has_hidden_guard_digits<long double> : public mpl::false_ {};
+#ifdef BOOST_HAS_FLOAT128
+template <>
+struct has_hidden_guard_digits<__float128> : public mpl::false_ {};
+#endif
+template <>
+struct has_hidden_guard_digits<boost::math::concepts::real_concept> : public mpl::false_ {};
+template <>
+struct has_hidden_guard_digits<boost::math::concepts::std_real_concept> : public mpl::false_ {};
+
+template <class T, bool b>
+struct has_hidden_guard_digits_10 : public mpl::false_ {};
+template <class T>
+struct has_hidden_guard_digits_10<T, true> : public mpl::bool_<(std::numeric_limits<T>::digits10 != std::numeric_limits<T>::max_digits10)> {};
+
+template <class T>
+struct has_hidden_guard_digits
+ : public has_hidden_guard_digits_10<T,
+ std::numeric_limits<T>::is_specialized
+ && (std::numeric_limits<T>::radix == 10) >
+{};
+
+template <class T>
+inline const T& normalize_value(const T& val, const mpl::false_&) { return val; }
+template <class T>
+inline T normalize_value(const T& val, const mpl::true_&)
+{
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
+
+ boost::intmax_t shift = (boost::intmax_t)std::numeric_limits<T>::digits - (boost::intmax_t)ilogb(val) - 1;
+ T result = scalbn(val, shift);
+ result = round(result);
+ return scalbn(result, -shift);
+}
+
+template <class T>
+inline T get_smallest_value(mpl::true_ const&)
+{
+ //
+ // numeric_limits lies about denorms being present - particularly
+ // when this can be turned on or off at runtime, as is the case
+ // when using the SSE2 registers in DAZ or FTZ mode.
+ //
+ static const T m = std::numeric_limits<T>::denorm_min();
+#ifdef BOOST_MATH_CHECK_SSE2
+ return (_mm_getcsr() & (_MM_FLUSH_ZERO_ON | 0x40)) ? tools::min_value<T>() : m;;
+#else
+ return ((tools::min_value<T>() / 2) == 0) ? tools::min_value<T>() : m;
+#endif
+}
+
+template <class T>
+inline T get_smallest_value(mpl::false_ const&)
+{
+ return tools::min_value<T>();
+}
+
+template <class T>
+inline T get_smallest_value()
+{
+#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1310)
+ return get_smallest_value<T>(mpl::bool_<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == 1)>());
+#else
+ return get_smallest_value<T>(mpl::bool_<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::has_denorm == std::denorm_present)>());
+#endif
+}
+
+//
+// Returns the smallest value that won't generate denorms when
+// we calculate the value of the least-significant-bit:
+//
+template <class T>
+T get_min_shift_value();
+
+template <class T>
+struct min_shift_initializer
+{
+ struct init
+ {
+ init()
+ {
+ do_init();
+ }
+ static void do_init()
+ {
+ get_min_shift_value<T>();
+ }
+ void force_instantiate()const{}
+ };
+ static const init initializer;
+ static void force_instantiate()
+ {
+ initializer.force_instantiate();
+ }
+};
+
+template <class T>
+const typename min_shift_initializer<T>::init min_shift_initializer<T>::initializer;
+
+template <class T>
+inline T calc_min_shifted(const mpl::true_&)
+{
+ BOOST_MATH_STD_USING
+ return ldexp(tools::min_value<T>(), tools::digits<T>() + 1);
+}
+template <class T>
+inline T calc_min_shifted(const mpl::false_&)
+{
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
+
+ return scalbn(tools::min_value<T>(), std::numeric_limits<T>::digits + 1);
+}
+
+
+template <class T>
+inline T get_min_shift_value()
+{
+ static const T val = calc_min_shifted<T>(mpl::bool_<!std::numeric_limits<T>::is_specialized || std::numeric_limits<T>::radix == 2>());
+ min_shift_initializer<T>::force_instantiate();
+
+ return val;
+}
+
+template <class T, class Policy>
+T float_next_imp(const T& val, const mpl::true_&, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ int expon;
+ static const char* function = "float_next<%1%>(%1%)";
+
+ int fpclass = (boost::math::fpclassify)(val);
+
+ if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ {
+ if(val < 0)
+ return -tools::max_value<T>();
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument must be finite, but got %1%", val, pol);
+ }
+
+ if(val >= tools::max_value<T>())
+ return policies::raise_overflow_error<T>(function, 0, pol);
+
+ if(val == 0)
+ return detail::get_smallest_value<T>();
+
+ if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != -tools::min_value<T>()))
+ {
+ //
+ // Special case: if the value of the least significant bit is a denorm, and the result
+ // would not be a denorm, then shift the input, increment, and shift back.
+ // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
+ //
+ return ldexp(float_next(T(ldexp(val, 2 * tools::digits<T>())), pol), -2 * tools::digits<T>());
+ }
+
+ if(-0.5f == frexp(val, &expon))
+ --expon; // reduce exponent when val is a power of two, and negative.
+ T diff = ldexp(T(1), expon - tools::digits<T>());
+ if(diff == 0)
+ diff = detail::get_smallest_value<T>();
+ return val + diff;
+} // float_next_imp
+//
+// Special version for some base other than 2:
+//
+template <class T, class Policy>
+T float_next_imp(const T& val, const mpl::false_&, const Policy& pol)
+{
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
+
+ BOOST_MATH_STD_USING
+ boost::intmax_t expon;
+ static const char* function = "float_next<%1%>(%1%)";
+
+ int fpclass = (boost::math::fpclassify)(val);
+
+ if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ {
+ if(val < 0)
+ return -tools::max_value<T>();
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument must be finite, but got %1%", val, pol);
+ }
+
+ if(val >= tools::max_value<T>())
+ return policies::raise_overflow_error<T>(function, 0, pol);
+
+ if(val == 0)
+ return detail::get_smallest_value<T>();
+
+ if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != -tools::min_value<T>()))
+ {
+ //
+ // Special case: if the value of the least significant bit is a denorm, and the result
+ // would not be a denorm, then shift the input, increment, and shift back.
+ // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
+ //
+ return scalbn(float_next(T(scalbn(val, 2 * std::numeric_limits<T>::digits)), pol), -2 * std::numeric_limits<T>::digits);
+ }
+
+ expon = 1 + ilogb(val);
+ if(-1 == scalbn(val, -expon) * std::numeric_limits<T>::radix)
+ --expon; // reduce exponent when val is a power of base, and negative.
+ T diff = scalbn(T(1), expon - std::numeric_limits<T>::digits);
+ if(diff == 0)
+ diff = detail::get_smallest_value<T>();
+ return val + diff;
+} // float_next_imp
+
+} // namespace detail
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type float_next(const T& val, const Policy& pol)
+{
+ typedef typename tools::promote_args<T>::type result_type;
+ return detail::float_next_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol);
+}
+
+#if 0 //def BOOST_MSVC
+//
+// We used to use ::_nextafter here, but doing so fails when using
+// the SSE2 registers if the FTZ or DAZ flags are set, so use our own
+// - albeit slower - code instead as at least that gives the correct answer.
+//
+template <class Policy>
+inline double float_next(const double& val, const Policy& pol)
+{
+ static const char* function = "float_next<%1%>(%1%)";
+
+ if(!(boost::math::isfinite)(val) && (val > 0))
+ return policies::raise_domain_error<double>(
+ function,
+ "Argument must be finite, but got %1%", val, pol);
+
+ if(val >= tools::max_value<double>())
+ return policies::raise_overflow_error<double>(function, 0, pol);
+
+ return ::_nextafter(val, tools::max_value<double>());
+}
+#endif
+
+template <class T>
+inline typename tools::promote_args<T>::type float_next(const T& val)
+{
+ return float_next(val, policies::policy<>());
+}
+
+namespace detail{
+
+template <class T, class Policy>
+T float_prior_imp(const T& val, const mpl::true_&, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ int expon;
+ static const char* function = "float_prior<%1%>(%1%)";
+
+ int fpclass = (boost::math::fpclassify)(val);
+
+ if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ {
+ if(val > 0)
+ return tools::max_value<T>();
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument must be finite, but got %1%", val, pol);
+ }
+
+ if(val <= -tools::max_value<T>())
+ return -policies::raise_overflow_error<T>(function, 0, pol);
+
+ if(val == 0)
+ return -detail::get_smallest_value<T>();
+
+ if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != tools::min_value<T>()))
+ {
+ //
+ // Special case: if the value of the least significant bit is a denorm, and the result
+ // would not be a denorm, then shift the input, increment, and shift back.
+ // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
+ //
+ return ldexp(float_prior(T(ldexp(val, 2 * tools::digits<T>())), pol), -2 * tools::digits<T>());
+ }
+
+ T remain = frexp(val, &expon);
+ if(remain == 0.5f)
+ --expon; // when val is a power of two we must reduce the exponent
+ T diff = ldexp(T(1), expon - tools::digits<T>());
+ if(diff == 0)
+ diff = detail::get_smallest_value<T>();
+ return val - diff;
+} // float_prior_imp
+//
+// Special version for bases other than 2:
+//
+template <class T, class Policy>
+T float_prior_imp(const T& val, const mpl::false_&, const Policy& pol)
+{
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
+
+ BOOST_MATH_STD_USING
+ boost::intmax_t expon;
+ static const char* function = "float_prior<%1%>(%1%)";
+
+ int fpclass = (boost::math::fpclassify)(val);
+
+ if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ {
+ if(val > 0)
+ return tools::max_value<T>();
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument must be finite, but got %1%", val, pol);
+ }
+
+ if(val <= -tools::max_value<T>())
+ return -policies::raise_overflow_error<T>(function, 0, pol);
+
+ if(val == 0)
+ return -detail::get_smallest_value<T>();
+
+ if((fpclass != (int)FP_SUBNORMAL) && (fpclass != (int)FP_ZERO) && (fabs(val) < detail::get_min_shift_value<T>()) && (val != tools::min_value<T>()))
+ {
+ //
+ // Special case: if the value of the least significant bit is a denorm, and the result
+ // would not be a denorm, then shift the input, increment, and shift back.
+ // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
+ //
+ return scalbn(float_prior(T(scalbn(val, 2 * std::numeric_limits<T>::digits)), pol), -2 * std::numeric_limits<T>::digits);
+ }
+
+ expon = 1 + ilogb(val);
+ T remain = scalbn(val, -expon);
+ if(remain * std::numeric_limits<T>::radix == 1)
+ --expon; // when val is a power of two we must reduce the exponent
+ T diff = scalbn(T(1), expon - std::numeric_limits<T>::digits);
+ if(diff == 0)
+ diff = detail::get_smallest_value<T>();
+ return val - diff;
+} // float_prior_imp
+
+} // namespace detail
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type float_prior(const T& val, const Policy& pol)
+{
+ typedef typename tools::promote_args<T>::type result_type;
+ return detail::float_prior_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol);
+}
+
+#if 0 //def BOOST_MSVC
+//
+// We used to use ::_nextafter here, but doing so fails when using
+// the SSE2 registers if the FTZ or DAZ flags are set, so use our own
+// - albeit slower - code instead as at least that gives the correct answer.
+//
+template <class Policy>
+inline double float_prior(const double& val, const Policy& pol)
+{
+ static const char* function = "float_prior<%1%>(%1%)";
+
+ if(!(boost::math::isfinite)(val) && (val < 0))
+ return policies::raise_domain_error<double>(
+ function,
+ "Argument must be finite, but got %1%", val, pol);
+
+ if(val <= -tools::max_value<double>())
+ return -policies::raise_overflow_error<double>(function, 0, pol);
+
+ return ::_nextafter(val, -tools::max_value<double>());
+}
+#endif
+
+template <class T>
+inline typename tools::promote_args<T>::type float_prior(const T& val)
+{
+ return float_prior(val, policies::policy<>());
+}
+
+template <class T, class U, class Policy>
+inline typename tools::promote_args<T, U>::type nextafter(const T& val, const U& direction, const Policy& pol)
+{
+ typedef typename tools::promote_args<T, U>::type result_type;
+ return val < direction ? boost::math::float_next<result_type>(val, pol) : val == direction ? val : boost::math::float_prior<result_type>(val, pol);
+}
+
+template <class T, class U>
+inline typename tools::promote_args<T, U>::type nextafter(const T& val, const U& direction)
+{
+ return nextafter(val, direction, policies::policy<>());
+}
+
+namespace detail{
+
+template <class T, class Policy>
+T float_distance_imp(const T& a, const T& b, const mpl::true_&, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ //
+ // Error handling:
+ //
+ static const char* function = "float_distance<%1%>(%1%, %1%)";
+ if(!(boost::math::isfinite)(a))
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument a must be finite, but got %1%", a, pol);
+ if(!(boost::math::isfinite)(b))
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument b must be finite, but got %1%", b, pol);
+ //
+ // Special cases:
+ //
+ if(a > b)
+ return -float_distance(b, a, pol);
+ if(a == b)
+ return T(0);
+ if(a == 0)
+ return 1 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol));
+ if(b == 0)
+ return 1 + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol));
+ if(boost::math::sign(a) != boost::math::sign(b))
+ return 2 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol))
+ + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol));
+ //
+ // By the time we get here, both a and b must have the same sign, we want
+ // b > a and both postive for the following logic:
+ //
+ if(a < 0)
+ return float_distance(static_cast<T>(-b), static_cast<T>(-a), pol);
+
+ BOOST_ASSERT(a >= 0);
+ BOOST_ASSERT(b >= a);
+
+ int expon;
+ //
+ // Note that if a is a denorm then the usual formula fails
+ // because we actually have fewer than tools::digits<T>()
+ // significant bits in the representation:
+ //
+ frexp(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) ? tools::min_value<T>() : a, &expon);
+ T upper = ldexp(T(1), expon);
+ T result = T(0);
+ //
+ // If b is greater than upper, then we *must* split the calculation
+ // as the size of the ULP changes with each order of magnitude change:
+ //
+ if(b > upper)
+ {
+ int expon2;
+ frexp(b, &expon2);
+ T upper2 = ldexp(T(0.5), expon2);
+ result = float_distance(upper2, b);
+ result += (expon2 - expon - 1) * ldexp(T(1), tools::digits<T>() - 1);
+ }
+ //
+ // Use compensated double-double addition to avoid rounding
+ // errors in the subtraction:
+ //
+ expon = tools::digits<T>() - expon;
+ T mb, x, y, z;
+ if(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) || (b - a < tools::min_value<T>()))
+ {
+ //
+ // Special case - either one end of the range is a denormal, or else the difference is.
+ // The regular code will fail if we're using the SSE2 registers on Intel and either
+ // the FTZ or DAZ flags are set.
+ //
+ T a2 = ldexp(a, tools::digits<T>());
+ T b2 = ldexp(b, tools::digits<T>());
+ mb = -(std::min)(T(ldexp(upper, tools::digits<T>())), b2);
+ x = a2 + mb;
+ z = x - a2;
+ y = (a2 - (x - z)) + (mb - z);
+
+ expon -= tools::digits<T>();
+ }
+ else
+ {
+ mb = -(std::min)(upper, b);
+ x = a + mb;
+ z = x - a;
+ y = (a - (x - z)) + (mb - z);
+ }
+ if(x < 0)
+ {
+ x = -x;
+ y = -y;
+ }
+ result += ldexp(x, expon) + ldexp(y, expon);
+ //
+ // Result must be an integer:
+ //
+ BOOST_ASSERT(result == floor(result));
+ return result;
+} // float_distance_imp
+//
+// Special versions for bases other than 2:
+//
+template <class T, class Policy>
+T float_distance_imp(const T& a, const T& b, const mpl::false_&, const Policy& pol)
+{
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
+
+ BOOST_MATH_STD_USING
+ //
+ // Error handling:
+ //
+ static const char* function = "float_distance<%1%>(%1%, %1%)";
+ if(!(boost::math::isfinite)(a))
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument a must be finite, but got %1%", a, pol);
+ if(!(boost::math::isfinite)(b))
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument b must be finite, but got %1%", b, pol);
+ //
+ // Special cases:
+ //
+ if(a > b)
+ return -float_distance(b, a, pol);
+ if(a == b)
+ return T(0);
+ if(a == 0)
+ return 1 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol));
+ if(b == 0)
+ return 1 + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol));
+ if(boost::math::sign(a) != boost::math::sign(b))
+ return 2 + fabs(float_distance(static_cast<T>((b < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), b, pol))
+ + fabs(float_distance(static_cast<T>((a < 0) ? T(-detail::get_smallest_value<T>()) : detail::get_smallest_value<T>()), a, pol));
+ //
+ // By the time we get here, both a and b must have the same sign, we want
+ // b > a and both postive for the following logic:
+ //
+ if(a < 0)
+ return float_distance(static_cast<T>(-b), static_cast<T>(-a), pol);
+
+ BOOST_ASSERT(a >= 0);
+ BOOST_ASSERT(b >= a);
+
+ boost::intmax_t expon;
+ //
+ // Note that if a is a denorm then the usual formula fails
+ // because we actually have fewer than tools::digits<T>()
+ // significant bits in the representation:
+ //
+ expon = 1 + ilogb(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) ? tools::min_value<T>() : a);
+ T upper = scalbn(T(1), expon);
+ T result = T(0);
+ //
+ // If b is greater than upper, then we *must* split the calculation
+ // as the size of the ULP changes with each order of magnitude change:
+ //
+ if(b > upper)
+ {
+ boost::intmax_t expon2 = 1 + ilogb(b);
+ T upper2 = scalbn(T(1), expon2 - 1);
+ result = float_distance(upper2, b);
+ result += (expon2 - expon - 1) * scalbn(T(1), std::numeric_limits<T>::digits - 1);
+ }
+ //
+ // Use compensated double-double addition to avoid rounding
+ // errors in the subtraction:
+ //
+ expon = std::numeric_limits<T>::digits - expon;
+ T mb, x, y, z;
+ if(((boost::math::fpclassify)(a) == (int)FP_SUBNORMAL) || (b - a < tools::min_value<T>()))
+ {
+ //
+ // Special case - either one end of the range is a denormal, or else the difference is.
+ // The regular code will fail if we're using the SSE2 registers on Intel and either
+ // the FTZ or DAZ flags are set.
+ //
+ T a2 = scalbn(a, std::numeric_limits<T>::digits);
+ T b2 = scalbn(b, std::numeric_limits<T>::digits);
+ mb = -(std::min)(T(scalbn(upper, std::numeric_limits<T>::digits)), b2);
+ x = a2 + mb;
+ z = x - a2;
+ y = (a2 - (x - z)) + (mb - z);
+
+ expon -= std::numeric_limits<T>::digits;
+ }
+ else
+ {
+ mb = -(std::min)(upper, b);
+ x = a + mb;
+ z = x - a;
+ y = (a - (x - z)) + (mb - z);
+ }
+ if(x < 0)
+ {
+ x = -x;
+ y = -y;
+ }
+ result += scalbn(x, expon) + scalbn(y, expon);
+ //
+ // Result must be an integer:
+ //
+ BOOST_ASSERT(result == floor(result));
+ return result;
+} // float_distance_imp
+
+} // namespace detail
+
+template <class T, class U, class Policy>
+inline typename tools::promote_args<T, U>::type float_distance(const T& a, const U& b, const Policy& pol)
+{
+ typedef typename tools::promote_args<T, U>::type result_type;
+ return detail::float_distance_imp(detail::normalize_value(static_cast<result_type>(a), typename detail::has_hidden_guard_digits<result_type>::type()), detail::normalize_value(static_cast<result_type>(b), typename detail::has_hidden_guard_digits<result_type>::type()), mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol);
+}
+
+template <class T, class U>
+typename tools::promote_args<T, U>::type float_distance(const T& a, const U& b)
+{
+ return boost::math::float_distance(a, b, policies::policy<>());
+}
+
+namespace detail{
+
+template <class T, class Policy>
+T float_advance_imp(T val, int distance, const mpl::true_&, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ //
+ // Error handling:
+ //
+ static const char* function = "float_advance<%1%>(%1%, int)";
+
+ int fpclass = (boost::math::fpclassify)(val);
+
+ if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument val must be finite, but got %1%", val, pol);
+
+ if(val < 0)
+ return -float_advance(-val, -distance, pol);
+ if(distance == 0)
+ return val;
+ if(distance == 1)
+ return float_next(val, pol);
+ if(distance == -1)
+ return float_prior(val, pol);
+
+ if(fabs(val) < detail::get_min_shift_value<T>())
+ {
+ //
+ // Special case: if the value of the least significant bit is a denorm,
+ // implement in terms of float_next/float_prior.
+ // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
+ //
+ if(distance > 0)
+ {
+ do{ val = float_next(val, pol); } while(--distance);
+ }
+ else
+ {
+ do{ val = float_prior(val, pol); } while(++distance);
+ }
+ return val;
+ }
+
+ int expon;
+ frexp(val, &expon);
+ T limit = ldexp((distance < 0 ? T(0.5f) : T(1)), expon);
+ if(val <= tools::min_value<T>())
+ {
+ limit = sign(T(distance)) * tools::min_value<T>();
+ }
+ T limit_distance = float_distance(val, limit);
+ while(fabs(limit_distance) < abs(distance))
+ {
+ distance -= itrunc(limit_distance);
+ val = limit;
+ if(distance < 0)
+ {
+ limit /= 2;
+ expon--;
+ }
+ else
+ {
+ limit *= 2;
+ expon++;
+ }
+ limit_distance = float_distance(val, limit);
+ if(distance && (limit_distance == 0))
+ {
+ return policies::raise_evaluation_error<T>(function, "Internal logic failed while trying to increment floating point value %1%: most likely your FPU is in non-IEEE conforming mode.", val, pol);
+ }
+ }
+ if((0.5f == frexp(val, &expon)) && (distance < 0))
+ --expon;
+ T diff = 0;
+ if(val != 0)
+ diff = distance * ldexp(T(1), expon - tools::digits<T>());
+ if(diff == 0)
+ diff = distance * detail::get_smallest_value<T>();
+ return val += diff;
+} // float_advance_imp
+//
+// Special version for bases other than 2:
+//
+template <class T, class Policy>
+T float_advance_imp(T val, int distance, const mpl::false_&, const Policy& pol)
+{
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::radix != 2);
+
+ BOOST_MATH_STD_USING
+ //
+ // Error handling:
+ //
+ static const char* function = "float_advance<%1%>(%1%, int)";
+
+ int fpclass = (boost::math::fpclassify)(val);
+
+ if((fpclass == (int)FP_NAN) || (fpclass == (int)FP_INFINITE))
+ return policies::raise_domain_error<T>(
+ function,
+ "Argument val must be finite, but got %1%", val, pol);
+
+ if(val < 0)
+ return -float_advance(-val, -distance, pol);
+ if(distance == 0)
+ return val;
+ if(distance == 1)
+ return float_next(val, pol);
+ if(distance == -1)
+ return float_prior(val, pol);
+
+ if(fabs(val) < detail::get_min_shift_value<T>())
+ {
+ //
+ // Special case: if the value of the least significant bit is a denorm,
+ // implement in terms of float_next/float_prior.
+ // This avoids issues with the Intel SSE2 registers when the FTZ or DAZ flags are set.
+ //
+ if(distance > 0)
+ {
+ do{ val = float_next(val, pol); } while(--distance);
+ }
+ else
+ {
+ do{ val = float_prior(val, pol); } while(++distance);
+ }
+ return val;
+ }
+
+ boost::intmax_t expon = 1 + ilogb(val);
+ T limit = scalbn(T(1), distance < 0 ? expon - 1 : expon);
+ if(val <= tools::min_value<T>())
+ {
+ limit = sign(T(distance)) * tools::min_value<T>();
+ }
+ T limit_distance = float_distance(val, limit);
+ while(fabs(limit_distance) < abs(distance))
+ {
+ distance -= itrunc(limit_distance);
+ val = limit;
+ if(distance < 0)
+ {
+ limit /= std::numeric_limits<T>::radix;
+ expon--;
+ }
+ else
+ {
+ limit *= std::numeric_limits<T>::radix;
+ expon++;
+ }
+ limit_distance = float_distance(val, limit);
+ if(distance && (limit_distance == 0))
+ {
+ return policies::raise_evaluation_error<T>(function, "Internal logic failed while trying to increment floating point value %1%: most likely your FPU is in non-IEEE conforming mode.", val, pol);
+ }
+ }
+ /*expon = 1 + ilogb(val);
+ if((1 == scalbn(val, 1 + expon)) && (distance < 0))
+ --expon;*/
+ T diff = 0;
+ if(val != 0)
+ diff = distance * scalbn(T(1), expon - std::numeric_limits<T>::digits);
+ if(diff == 0)
+ diff = distance * detail::get_smallest_value<T>();
+ return val += diff;
+} // float_advance_imp
+
+} // namespace detail
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type float_advance(T val, int distance, const Policy& pol)
+{
+ typedef typename tools::promote_args<T>::type result_type;
+ return detail::float_advance_imp(detail::normalize_value(static_cast<result_type>(val), typename detail::has_hidden_guard_digits<result_type>::type()), distance, mpl::bool_<!std::numeric_limits<result_type>::is_specialized || (std::numeric_limits<result_type>::radix == 2)>(), pol);
+}
+
+template <class T>
+inline typename tools::promote_args<T>::type float_advance(const T& val, int distance)
+{
+ return boost::math::float_advance(val, distance, policies::policy<>());
+}
+
+}} // boost math namespaces
+
+#endif // BOOST_MATH_SPECIAL_NEXT_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/pow.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/pow.hpp
index 494f721d058..494f721d058 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/pow.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/pow.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/powm1.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/powm1.hpp
index 37db8746c8a..37db8746c8a 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/powm1.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/powm1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/round.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/round.hpp
index e21f7185d18..e21f7185d18 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/round.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/round.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/sign.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/sign.hpp
index 5cb21bac54a..5cb21bac54a 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/sign.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/sign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/sin_pi.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/sin_pi.hpp
index ae6b3e74423..ae6b3e74423 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/sin_pi.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/sin_pi.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/sinc.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/sinc.hpp
index 131e985fd9f..131e985fd9f 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/sinc.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/sinc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/sqrt1pm1.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/sqrt1pm1.hpp
index 293a9d97b31..293a9d97b31 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/sqrt1pm1.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/sqrt1pm1.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/special_functions/trunc.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/trunc.hpp
new file mode 100644
index 00000000000..8a7b042449f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/trunc.hpp
@@ -0,0 +1,111 @@
+// Copyright John Maddock 2007.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TRUNC_HPP
+#define BOOST_MATH_TRUNC_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/special_functions/math_fwd.hpp>
+#include <boost/math/tools/config.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+
+namespace boost{ namespace math{ namespace detail{
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol, const mpl::false_&)
+{
+ BOOST_MATH_STD_USING
+ typedef typename tools::promote_args<T>::type result_type;
+ if(!(boost::math::isfinite)(v))
+ return policies::raise_rounding_error("boost::math::trunc<%1%>(%1%)", 0, static_cast<result_type>(v), static_cast<result_type>(v), pol);
+ return (v >= 0) ? static_cast<result_type>(floor(v)) : static_cast<result_type>(ceil(v));
+}
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type trunc(const T& v, const Policy&, const mpl::true_&)
+{
+ return v;
+}
+
+}
+
+template <class T, class Policy>
+inline typename tools::promote_args<T>::type trunc(const T& v, const Policy& pol)
+{
+ return detail::trunc(v, pol, mpl::bool_<detail::is_integer_for_rounding<T>::value>());
+}
+template <class T>
+inline typename tools::promote_args<T>::type trunc(const T& v)
+{
+ return trunc(v, policies::policy<>());
+}
+//
+// The following functions will not compile unless T has an
+// implicit convertion to the integer types. For user-defined
+// number types this will likely not be the case. In that case
+// these functions should either be specialized for the UDT in
+// question, or else overloads should be placed in the same
+// namespace as the UDT: these will then be found via argument
+// dependent lookup. See our concept archetypes for examples.
+//
+template <class T, class Policy>
+inline int itrunc(const T& v, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ typedef typename tools::promote_args<T>::type result_type;
+ result_type r = boost::math::trunc(v, pol);
+ if((r > (std::numeric_limits<int>::max)()) || (r < (std::numeric_limits<int>::min)()))
+ return static_cast<int>(policies::raise_rounding_error("boost::math::itrunc<%1%>(%1%)", 0, static_cast<result_type>(v), 0, pol));
+ return static_cast<int>(r);
+}
+template <class T>
+inline int itrunc(const T& v)
+{
+ return itrunc(v, policies::policy<>());
+}
+
+template <class T, class Policy>
+inline long ltrunc(const T& v, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ typedef typename tools::promote_args<T>::type result_type;
+ result_type r = boost::math::trunc(v, pol);
+ if((r > (std::numeric_limits<long>::max)()) || (r < (std::numeric_limits<long>::min)()))
+ return static_cast<long>(policies::raise_rounding_error("boost::math::ltrunc<%1%>(%1%)", 0, static_cast<result_type>(v), 0L, pol));
+ return static_cast<long>(r);
+}
+template <class T>
+inline long ltrunc(const T& v)
+{
+ return ltrunc(v, policies::policy<>());
+}
+
+#ifdef BOOST_HAS_LONG_LONG
+
+template <class T, class Policy>
+inline boost::long_long_type lltrunc(const T& v, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ typedef typename tools::promote_args<T>::type result_type;
+ result_type r = boost::math::trunc(v, pol);
+ if((r > (std::numeric_limits<boost::long_long_type>::max)()) || (r < (std::numeric_limits<boost::long_long_type>::min)()))
+ return static_cast<boost::long_long_type>(policies::raise_rounding_error("boost::math::lltrunc<%1%>(%1%)", 0, v, static_cast<boost::long_long_type>(0), pol));
+ return static_cast<boost::long_long_type>(r);
+}
+template <class T>
+inline boost::long_long_type lltrunc(const T& v)
+{
+ return lltrunc(v, policies::policy<>());
+}
+
+#endif
+
+}} // namespaces
+
+#endif // BOOST_MATH_TRUNC_HPP
diff --git a/src/third_party/boost-1.68.0/boost/math/special_functions/zeta.hpp b/src/third_party/boost-1.69.0/boost/math/special_functions/zeta.hpp
index 91b83c1b2ee..91b83c1b2ee 100644
--- a/src/third_party/boost-1.68.0/boost/math/special_functions/zeta.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/special_functions/zeta.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/atomic.hpp b/src/third_party/boost-1.69.0/boost/math/tools/atomic.hpp
index 29a48b824c7..29a48b824c7 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/atomic.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/atomic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/big_constant.hpp b/src/third_party/boost-1.69.0/boost/math/tools/big_constant.hpp
index a6f7bc0f1a8..a6f7bc0f1a8 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/big_constant.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/big_constant.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/complex.hpp b/src/third_party/boost-1.69.0/boost/math/tools/complex.hpp
new file mode 100644
index 00000000000..f3c01846dc7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/tools/complex.hpp
@@ -0,0 +1,57 @@
+// Copyright John Maddock 2018.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+//
+// Tools for operator on complex as well as scalar types.
+//
+
+#include <boost/type_traits/is_complex.hpp>
+
+namespace boost {
+ namespace math {
+ namespace tools {
+
+ //
+ // Speicalize this trait for user-defined complex types (ie Boost.Multiprecision):
+ //
+ template <class T>
+ struct is_complex_type : public boost::is_complex<T> {};
+ //
+ // Use this trait to typecast integer literals to something
+ // that will interoperate with T:
+ //
+ template <class T, bool = is_complex_type<T>::value>
+ struct integer_scalar_type
+ {
+ typedef int type;
+ };
+ template <class T>
+ struct integer_scalar_type<T, true>
+ {
+ typedef typename T::value_type type;
+ };
+ template <class T, bool = is_complex_type<T>::value>
+ struct unsigned_scalar_type
+ {
+ typedef unsigned type;
+ };
+ template <class T>
+ struct unsigned_scalar_type<T, true>
+ {
+ typedef typename T::value_type type;
+ };
+ template <class T, bool = is_complex_type<T>::value>
+ struct scalar_type
+ {
+ typedef T type;
+ };
+ template <class T>
+ struct scalar_type<T, true>
+ {
+ typedef typename T::value_type type;
+ };
+
+
+} } }
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/config.hpp b/src/third_party/boost-1.69.0/boost/math/tools/config.hpp
index 17bfec16fee..17bfec16fee 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/convert_from_string.hpp b/src/third_party/boost-1.69.0/boost/math/tools/convert_from_string.hpp
index cce61ccbd9d..cce61ccbd9d 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/convert_from_string.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/convert_from_string.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_10.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_10.hpp
index 48cf9e39b3a..48cf9e39b3a 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_10.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_11.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_11.hpp
index e52595429eb..e52595429eb 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_11.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_11.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_12.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_12.hpp
index 10cd178975d..10cd178975d 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_12.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_12.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_13.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_13.hpp
index 90fa9ec43d8..90fa9ec43d8 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_13.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_13.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_14.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_14.hpp
index 389c8063b0f..389c8063b0f 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_14.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_14.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_15.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_15.hpp
index d196a41603b..d196a41603b 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_15.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_15.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_16.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_16.hpp
index fa48c6614c0..fa48c6614c0 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_16.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_16.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_17.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_17.hpp
index 4575aeac7b3..4575aeac7b3 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_17.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_17.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_18.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_18.hpp
index 95dd4004169..95dd4004169 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_18.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_18.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_19.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_19.hpp
index 6d73eb8ffc1..6d73eb8ffc1 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_19.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_19.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_2.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_2.hpp
index 85640edf677..85640edf677 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_2.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_20.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_20.hpp
index f8b7f34384e..f8b7f34384e 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_20.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_3.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_3.hpp
index c0ad4660e9b..c0ad4660e9b 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_3.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_4.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_4.hpp
index 27ad74eb951..27ad74eb951 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_4.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_5.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_5.hpp
index 5cfafb4052c..5cfafb4052c 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_5.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_6.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_6.hpp
index f7f4bee4801..f7f4bee4801 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_6.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_7.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_7.hpp
index c612822fc05..c612822fc05 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_7.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_7.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_8.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_8.hpp
index 5d9b453b9d1..5d9b453b9d1 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_8.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_8.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_9.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_9.hpp
index 84977fd13b6..84977fd13b6 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner1_9.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner1_9.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_10.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_10.hpp
index f10c5d04928..f10c5d04928 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_10.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_11.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_11.hpp
index 757357addf9..757357addf9 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_11.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_11.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_12.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_12.hpp
index e0fc8a9df75..e0fc8a9df75 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_12.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_12.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_13.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_13.hpp
index c13a0a7cc2c..c13a0a7cc2c 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_13.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_13.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_14.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_14.hpp
index ccc6e7d8da1..ccc6e7d8da1 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_14.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_14.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_15.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_15.hpp
index a409ba7fdba..a409ba7fdba 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_15.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_15.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_16.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_16.hpp
index a69c1a36192..a69c1a36192 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_16.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_16.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_17.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_17.hpp
index 9e7c05d0071..9e7c05d0071 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_17.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_17.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_18.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_18.hpp
index 1ea0e052c06..1ea0e052c06 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_18.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_18.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_19.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_19.hpp
index 45c125c871c..45c125c871c 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_19.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_19.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_2.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_2.hpp
index 20da483c338..20da483c338 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_2.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_20.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_20.hpp
index 956c6dba4f9..956c6dba4f9 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_20.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_3.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_3.hpp
index 58b290c7c91..58b290c7c91 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_3.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_4.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_4.hpp
index 74f969b749c..74f969b749c 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_4.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_5.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_5.hpp
index 134cbc8ef90..134cbc8ef90 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_5.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_6.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_6.hpp
index 7cb75d75c8f..7cb75d75c8f 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_6.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_7.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_7.hpp
index 327639deb61..327639deb61 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_7.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_7.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_8.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_8.hpp
index 2145ad6dcdf..2145ad6dcdf 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_8.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_8.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_9.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_9.hpp
index 08f6336e49a..08f6336e49a 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner2_9.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner2_9.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_10.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_10.hpp
index 05ad20cc300..05ad20cc300 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_10.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_11.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_11.hpp
index 9f8628e7504..9f8628e7504 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_11.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_11.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_12.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_12.hpp
index ccb3ec4d109..ccb3ec4d109 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_12.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_12.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_13.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_13.hpp
index a8cdf2c508f..a8cdf2c508f 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_13.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_13.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_14.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_14.hpp
index 5eb4ef1f289..5eb4ef1f289 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_14.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_14.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_15.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_15.hpp
index 7e8edcd8aab..7e8edcd8aab 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_15.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_15.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_16.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_16.hpp
index 58bea1581f2..58bea1581f2 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_16.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_16.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_17.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_17.hpp
index 007b8a4918d..007b8a4918d 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_17.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_17.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_18.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_18.hpp
index 68935adba15..68935adba15 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_18.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_18.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_19.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_19.hpp
index acffba6b476..acffba6b476 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_19.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_19.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_2.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_2.hpp
index 6b8d9a71f87..6b8d9a71f87 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_2.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_20.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_20.hpp
index b3a170c095f..b3a170c095f 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_20.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_3.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_3.hpp
index 05fe88fcccf..05fe88fcccf 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_3.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_4.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_4.hpp
index b98d6f678d4..b98d6f678d4 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_4.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_5.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_5.hpp
index 12e639cef3e..12e639cef3e 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_5.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_6.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_6.hpp
index b645cb5bbc0..b645cb5bbc0 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_6.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_7.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_7.hpp
index 3df4b5b4eff..3df4b5b4eff 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_7.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_7.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_8.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_8.hpp
index 9a49d2555ed..9a49d2555ed 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_8.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_8.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_9.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_9.hpp
index 3507d376047..3507d376047 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/polynomial_horner3_9.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/polynomial_horner3_9.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_10.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_10.hpp
index e6708538698..e6708538698 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_10.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_11.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_11.hpp
index 65e17598ff3..65e17598ff3 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_11.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_11.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_12.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_12.hpp
index de33af0e07c..de33af0e07c 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_12.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_12.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_13.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_13.hpp
index ed4ac1af8b9..ed4ac1af8b9 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_13.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_13.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_14.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_14.hpp
index a3222f8212b..a3222f8212b 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_14.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_14.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_15.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_15.hpp
index c8cd691573f..c8cd691573f 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_15.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_15.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_16.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_16.hpp
index 8003c82db73..8003c82db73 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_16.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_16.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_17.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_17.hpp
index 294c3f175d6..294c3f175d6 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_17.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_17.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_18.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_18.hpp
index 1a48bba0971..1a48bba0971 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_18.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_18.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_19.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_19.hpp
index 12fd75cf1bc..12fd75cf1bc 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_19.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_19.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_2.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_2.hpp
index c838f2a2cd3..c838f2a2cd3 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_2.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_20.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_20.hpp
index 3ee3e966e61..3ee3e966e61 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_20.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_3.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_3.hpp
index 034ead3f660..034ead3f660 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_3.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_4.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_4.hpp
index de2972f4c49..de2972f4c49 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_4.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_5.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_5.hpp
index a59ff114d14..a59ff114d14 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_5.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_6.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_6.hpp
index c5000c5db46..c5000c5db46 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_6.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_7.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_7.hpp
index bc860f3bf7e..bc860f3bf7e 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_7.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_7.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_8.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_8.hpp
index 69368978b6a..69368978b6a 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_8.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_8.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_9.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_9.hpp
index 0aafea15fd8..0aafea15fd8 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner1_9.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner1_9.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_10.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_10.hpp
index 127777bc2a2..127777bc2a2 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_10.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_11.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_11.hpp
index 53983ed4ad1..53983ed4ad1 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_11.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_11.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_12.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_12.hpp
index 4ad0856b06e..4ad0856b06e 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_12.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_12.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_13.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_13.hpp
index 5f9303d0c3a..5f9303d0c3a 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_13.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_13.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_14.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_14.hpp
index dc512f393fd..dc512f393fd 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_14.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_14.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_15.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_15.hpp
index cf084e8be05..cf084e8be05 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_15.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_15.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_16.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_16.hpp
index 3d13db25534..3d13db25534 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_16.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_16.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_17.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_17.hpp
index 3adf4053bdf..3adf4053bdf 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_17.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_17.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_18.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_18.hpp
index 607609fd8e4..607609fd8e4 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_18.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_18.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_19.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_19.hpp
index bc324c3be32..bc324c3be32 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_19.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_19.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_2.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_2.hpp
index 95ec0251d5e..95ec0251d5e 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_2.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_20.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_20.hpp
index cf1211b61fb..cf1211b61fb 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_20.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_3.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_3.hpp
index 9ce437b41f8..9ce437b41f8 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_3.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_4.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_4.hpp
index 00543ede853..00543ede853 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_4.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_5.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_5.hpp
index d117b66633d..d117b66633d 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_5.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_6.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_6.hpp
index c431d16344a..c431d16344a 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_6.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_7.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_7.hpp
index 2104302472f..2104302472f 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_7.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_7.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_8.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_8.hpp
index fd98289b993..fd98289b993 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_8.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_8.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_9.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_9.hpp
index 1081ab2f8b4..1081ab2f8b4 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner2_9.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner2_9.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_10.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_10.hpp
index 7da05875f32..7da05875f32 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_10.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_11.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_11.hpp
index df971197a35..df971197a35 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_11.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_11.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_12.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_12.hpp
index 668f76684fa..668f76684fa 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_12.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_12.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_13.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_13.hpp
index b0b4c2ac589..b0b4c2ac589 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_13.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_13.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_14.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_14.hpp
index 92035ef8060..92035ef8060 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_14.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_14.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_15.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_15.hpp
index 9536ecd8447..9536ecd8447 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_15.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_15.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_16.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_16.hpp
index 7ccf8f6e7af..7ccf8f6e7af 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_16.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_16.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_17.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_17.hpp
index 1a35c47397a..1a35c47397a 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_17.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_17.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_18.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_18.hpp
index 8a1c16eb2f0..8a1c16eb2f0 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_18.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_18.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_19.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_19.hpp
index 15d16bafc39..15d16bafc39 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_19.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_19.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_2.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_2.hpp
index 95ec0251d5e..95ec0251d5e 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_2.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_20.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_20.hpp
index 78233214d87..78233214d87 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_20.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_3.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_3.hpp
index 9ce437b41f8..9ce437b41f8 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_3.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_4.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_4.hpp
index 00543ede853..00543ede853 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_4.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_5.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_5.hpp
index 35dce45a805..35dce45a805 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_5.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_6.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_6.hpp
index b9361ba07ab..b9361ba07ab 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_6.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_6.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_7.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_7.hpp
index 92b00b3a15e..92b00b3a15e 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_7.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_7.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_8.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_8.hpp
index 197b6c05500..197b6c05500 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_8.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_8.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_9.hpp b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_9.hpp
index 5aad957c373..5aad957c373 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/detail/rational_horner3_9.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/detail/rational_horner3_9.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/fraction.hpp b/src/third_party/boost-1.69.0/boost/math/tools/fraction.hpp
new file mode 100644
index 00000000000..8c41d4472db
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/tools/fraction.hpp
@@ -0,0 +1,287 @@
+// (C) Copyright John Maddock 2005-2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_FRACTION_INCLUDED
+#define BOOST_MATH_TOOLS_FRACTION_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/math/tools/precision.hpp>
+#include <boost/math/tools/complex.hpp>
+
+namespace boost{ namespace math{ namespace tools{
+
+namespace detail
+{
+
+ template <class T>
+ struct is_pair : public boost::false_type{};
+
+ template <class T, class U>
+ struct is_pair<std::pair<T,U> > : public boost::true_type{};
+
+ template <class Gen>
+ struct fraction_traits_simple
+ {
+ typedef typename Gen::result_type result_type;
+ typedef typename Gen::result_type value_type;
+
+ static result_type a(const value_type&) BOOST_MATH_NOEXCEPT(value_type)
+ {
+ return 1;
+ }
+ static result_type b(const value_type& v) BOOST_MATH_NOEXCEPT(value_type)
+ {
+ return v;
+ }
+ };
+
+ template <class Gen>
+ struct fraction_traits_pair
+ {
+ typedef typename Gen::result_type value_type;
+ typedef typename value_type::first_type result_type;
+
+ static result_type a(const value_type& v) BOOST_MATH_NOEXCEPT(value_type)
+ {
+ return v.first;
+ }
+ static result_type b(const value_type& v) BOOST_MATH_NOEXCEPT(value_type)
+ {
+ return v.second;
+ }
+ };
+
+ template <class Gen>
+ struct fraction_traits
+ : public boost::mpl::if_c<
+ is_pair<typename Gen::result_type>::value,
+ fraction_traits_pair<Gen>,
+ fraction_traits_simple<Gen> >::type
+ {
+ };
+
+ template <class T, bool = is_complex_type<T>::value>
+ struct tiny_value
+ {
+ static T get() {
+ return tools::min_value<T>();
+ }
+ };
+ template <class T>
+ struct tiny_value<T, true>
+ {
+ typedef typename T::value_type value_type;
+ static T get() {
+ return tools::min_value<value_type>();
+ }
+ };
+
+} // namespace detail
+
+//
+// continued_fraction_b
+// Evaluates:
+//
+// b0 + a1
+// ---------------
+// b1 + a2
+// ----------
+// b2 + a3
+// -----
+// b3 + ...
+//
+// Note that the first a0 returned by generator Gen is disarded.
+//
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, const U& factor, boost::uintmax_t& max_terms)
+ BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+ typedef typename traits::value_type value_type;
+ typedef typename integer_scalar_type<result_type>::type integer_type;
+ typedef typename scalar_type<result_type>::type scalar_type;
+
+ integer_type const zero(0), one(1);
+
+ result_type tiny = detail::tiny_value<result_type>::get();
+ scalar_type terminator = abs(factor);
+
+ value_type v = g();
+
+ result_type f, C, D, delta;
+ f = traits::b(v);
+ if(f == zero)
+ f = tiny;
+ C = f;
+ D = 0;
+
+ boost::uintmax_t counter(max_terms);
+
+ do{
+ v = g();
+ D = traits::b(v) + traits::a(v) * D;
+ if(D == result_type(0))
+ D = tiny;
+ C = traits::b(v) + traits::a(v) / C;
+ if(C == zero)
+ C = tiny;
+ D = one/D;
+ delta = C*D;
+ f = f * delta;
+ }while((abs(delta - one) > terminator) && --counter);
+
+ max_terms = max_terms - counter;
+
+ return f;
+}
+
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, const U& factor)
+ BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
+{
+ boost::uintmax_t max_terms = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_b(g, factor, max_terms);
+}
+
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits)
+ BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+
+ result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
+ boost::uintmax_t max_terms = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_b(g, factor, max_terms);
+}
+
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_b(Gen& g, int bits, boost::uintmax_t& max_terms)
+ BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+
+ result_type factor = ldexp(1.0f, 1 - bits); // 1 / pow(result_type(2), bits);
+ return continued_fraction_b(g, factor, max_terms);
+}
+
+//
+// continued_fraction_a
+// Evaluates:
+//
+// a1
+// ---------------
+// b1 + a2
+// ----------
+// b2 + a3
+// -----
+// b3 + ...
+//
+// Note that the first a1 and b1 returned by generator Gen are both used.
+//
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, const U& factor, boost::uintmax_t& max_terms)
+ BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+ typedef typename traits::value_type value_type;
+ typedef typename integer_scalar_type<result_type>::type integer_type;
+ typedef typename scalar_type<result_type>::type scalar_type;
+
+ integer_type const zero(0), one(1);
+
+ result_type tiny = detail::tiny_value<result_type>::get();
+ scalar_type terminator = abs(factor);
+
+ value_type v = g();
+
+ result_type f, C, D, delta, a0;
+ f = traits::b(v);
+ a0 = traits::a(v);
+ if(f == zero)
+ f = tiny;
+ C = f;
+ D = 0;
+
+ boost::uintmax_t counter(max_terms);
+
+ do{
+ v = g();
+ D = traits::b(v) + traits::a(v) * D;
+ if(D == zero)
+ D = tiny;
+ C = traits::b(v) + traits::a(v) / C;
+ if(C == zero)
+ C = tiny;
+ D = one/D;
+ delta = C*D;
+ f = f * delta;
+ }while((abs(delta - one) > terminator) && --counter);
+
+ max_terms = max_terms - counter;
+
+ return a0/f;
+}
+
+template <class Gen, class U>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, const U& factor)
+ BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
+{
+ boost::uintmax_t max_iter = (std::numeric_limits<boost::uintmax_t>::max)();
+ return continued_fraction_a(g, factor, max_iter);
+}
+
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits)
+ BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+
+ result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
+ boost::uintmax_t max_iter = (std::numeric_limits<boost::uintmax_t>::max)();
+
+ return continued_fraction_a(g, factor, max_iter);
+}
+
+template <class Gen>
+inline typename detail::fraction_traits<Gen>::result_type continued_fraction_a(Gen& g, int bits, boost::uintmax_t& max_terms)
+ BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename detail::fraction_traits<Gen>::result_type) && noexcept(std::declval<Gen>()()))
+{
+ BOOST_MATH_STD_USING // ADL of std names
+
+ typedef detail::fraction_traits<Gen> traits;
+ typedef typename traits::result_type result_type;
+
+ result_type factor = ldexp(1.0f, 1-bits); // 1 / pow(result_type(2), bits);
+ return continued_fraction_a(g, factor, max_terms);
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_FRACTION_INCLUDED
+
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/minima.hpp b/src/third_party/boost-1.69.0/boost/math/tools/minima.hpp
index b76dabe3f6e..b76dabe3f6e 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/minima.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/minima.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/precision.hpp b/src/third_party/boost-1.69.0/boost/math/tools/precision.hpp
new file mode 100644
index 00000000000..6d1de643715
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/tools/precision.hpp
@@ -0,0 +1,409 @@
+// Copyright John Maddock 2005-2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_PRECISION_INCLUDED
+#define BOOST_MATH_TOOLS_PRECISION_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/limits.hpp>
+#include <boost/assert.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/mpl/int.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/math/policies/policy.hpp>
+
+// These two are for LDBL_MAN_DIG:
+#include <limits.h>
+#include <math.h>
+
+namespace boost{ namespace math
+{
+namespace tools
+{
+// If T is not specialized, the functions digits, max_value and min_value,
+// all get synthesised automatically from std::numeric_limits.
+// However, if numeric_limits is not specialised for type RealType,
+// for example with NTL::RR type, then you will get a compiler error
+// when code tries to use these functions, unless you explicitly specialise them.
+
+// For example if the precision of RealType varies at runtime,
+// then numeric_limits support may not be appropriate,
+// see boost/math/tools/ntl.hpp for examples like
+// template <> NTL::RR max_value<NTL::RR> ...
+// See Conceptual Requirements for Real Number Types.
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR int digits(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_NOEXCEPT
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::radix == 2 || ::std::numeric_limits<T>::radix == 10);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+ BOOST_ASSERT(::std::numeric_limits<T>::radix == 2 || ::std::numeric_limits<T>::radix == 10);
+#endif
+ return std::numeric_limits<T>::radix == 2
+ ? std::numeric_limits<T>::digits
+ : ((std::numeric_limits<T>::digits + 1) * 1000L) / 301L;
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+ return (std::numeric_limits<T>::max)();
+} // Also used as a finite 'infinite' value for - and +infinity, for example:
+// -max_value<double> = -1.79769e+308, max_value<double> = 1.79769e+308.
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<T>::is_specialized);
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+#endif
+ return (std::numeric_limits<T>::min)();
+}
+
+namespace detail{
+//
+// Logarithmic limits come next, note that although
+// we can compute these from the log of the max value
+// that is not in general thread safe (if we cache the value)
+// so it's better to specialise these:
+//
+// For type float first:
+//
+template <class T>
+inline BOOST_MATH_CONSTEXPR T log_max_value(const mpl::int_<128>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+ return 88.0f;
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T log_min_value(const mpl::int_<128>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+ return -87.0f;
+}
+//
+// Now double:
+//
+template <class T>
+inline BOOST_MATH_CONSTEXPR T log_max_value(const mpl::int_<1024>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+ return 709.0;
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T log_min_value(const mpl::int_<1024>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+ return -708.0;
+}
+//
+// 80 and 128-bit long doubles:
+//
+template <class T>
+inline BOOST_MATH_CONSTEXPR T log_max_value(const mpl::int_<16384>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+ return 11356.0L;
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T log_min_value(const mpl::int_<16384>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+ return -11355.0L;
+}
+
+template <class T>
+inline T log_max_value(const mpl::int_<0>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ BOOST_MATH_STD_USING
+#ifdef __SUNPRO_CC
+ static const T m = boost::math::tools::max_value<T>();
+ static const T val = log(m);
+#else
+ static const T val = log(boost::math::tools::max_value<T>());
+#endif
+ return val;
+}
+
+template <class T>
+inline T log_min_value(const mpl::int_<0>& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ BOOST_MATH_STD_USING
+#ifdef __SUNPRO_CC
+ static const T m = boost::math::tools::min_value<T>();
+ static const T val = log(m);
+#else
+ static const T val = log(boost::math::tools::min_value<T>());
+#endif
+ return val;
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T epsilon(const mpl::true_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_MATH_NOEXCEPT(T)
+{
+ return std::numeric_limits<T>::epsilon();
+}
+
+#if defined(__GNUC__) && ((LDBL_MANT_DIG == 106) || (__LDBL_MANT_DIG__ == 106))
+template <>
+inline BOOST_MATH_CONSTEXPR long double epsilon<long double>(const mpl::true_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(long double)) BOOST_MATH_NOEXCEPT(long double)
+{
+ // numeric_limits on Darwin (and elsewhere) tells lies here:
+ // the issue is that long double on a few platforms is
+ // really a "double double" which has a non-contiguous
+ // mantissa: 53 bits followed by an unspecified number of
+ // zero bits, followed by 53 more bits. Thus the apparent
+ // precision of the type varies depending where it's been.
+ // Set epsilon to the value that a 106 bit fixed mantissa
+ // type would have, as that will give us sensible behaviour everywhere.
+ //
+ // This static assert fails for some unknown reason, so
+ // disabled for now...
+ // BOOST_STATIC_ASSERT(std::numeric_limits<long double>::digits == 106);
+ return 2.4651903288156618919116517665087e-32L;
+}
+#endif
+
+template <class T>
+inline T epsilon(const mpl::false_& BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE(T))
+{
+ // Note: don't cache result as precision may vary at runtime:
+ BOOST_MATH_STD_USING // for ADL of std names
+ return ldexp(static_cast<T>(1), 1-policies::digits<T, policies::policy<> >());
+}
+
+template <class T>
+struct log_limit_traits
+{
+ typedef typename mpl::if_c<
+ (std::numeric_limits<T>::radix == 2) &&
+ (std::numeric_limits<T>::max_exponent == 128
+ || std::numeric_limits<T>::max_exponent == 1024
+ || std::numeric_limits<T>::max_exponent == 16384),
+ mpl::int_<(std::numeric_limits<T>::max_exponent > INT_MAX ? INT_MAX : static_cast<int>(std::numeric_limits<T>::max_exponent))>,
+ mpl::int_<0>
+ >::type tag_type;
+ BOOST_STATIC_CONSTANT(bool, value = tag_type::value ? true : false);
+ BOOST_STATIC_ASSERT(::std::numeric_limits<T>::is_specialized || (value == 0));
+};
+
+template <class T, bool b> struct log_limit_noexcept_traits_imp : public log_limit_traits<T> {};
+template <class T> struct log_limit_noexcept_traits_imp<T, false> : public boost::integral_constant<bool, false> {};
+
+template <class T>
+struct log_limit_noexcept_traits : public log_limit_noexcept_traits_imp<T, BOOST_MATH_IS_FLOAT(T)> {};
+
+} // namespace detail
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4309)
+#endif
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T log_max_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_NOEXCEPT_IF(detail::log_limit_noexcept_traits<T>::value)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ return detail::log_max_value<T>(typename detail::log_limit_traits<T>::tag_type());
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+ BOOST_MATH_STD_USING
+ static const T val = log((std::numeric_limits<T>::max)());
+ return val;
+#endif
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T log_min_value(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE(T)) BOOST_NOEXCEPT_IF(detail::log_limit_noexcept_traits<T>::value)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ return detail::log_min_value<T>(typename detail::log_limit_traits<T>::tag_type());
+#else
+ BOOST_ASSERT(::std::numeric_limits<T>::is_specialized);
+ BOOST_MATH_STD_USING
+ static const T val = log((std::numeric_limits<T>::min)());
+ return val;
+#endif
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T epsilon(BOOST_MATH_EXPLICIT_TEMPLATE_TYPE_SPEC(T)) BOOST_MATH_NOEXCEPT(T)
+{
+#ifndef BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
+ return detail::epsilon<T>(mpl::bool_< ::std::numeric_limits<T>::is_specialized>());
+#else
+ return ::std::numeric_limits<T>::is_specialized ?
+ detail::epsilon<T>(mpl::true_()) :
+ detail::epsilon<T>(mpl::false_());
+#endif
+}
+
+namespace detail{
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T root_epsilon_imp(const mpl::int_<24>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.00034526698300124390839884978618400831996329879769945L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T root_epsilon_imp(const T*, const mpl::int_<53>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.1490116119384765625e-7L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T root_epsilon_imp(const T*, const mpl::int_<64>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.32927225399135962333569506281281311031656150598474e-9L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T root_epsilon_imp(const T*, const mpl::int_<113>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.1387778780781445675529539585113525390625e-16L);
+}
+
+template <class T, class Tag>
+inline T root_epsilon_imp(const T*, const Tag&)
+{
+ BOOST_MATH_STD_USING
+ static const T r_eps = sqrt(tools::epsilon<T>());
+ return r_eps;
+}
+
+template <class T>
+inline T root_epsilon_imp(const T*, const mpl::int_<0>&)
+{
+ BOOST_MATH_STD_USING
+ return sqrt(tools::epsilon<T>());
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const mpl::int_<24>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.0049215666011518482998719164346805794944150447839903L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const T*, const mpl::int_<53>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(6.05545445239333906078989272793696693569753008995e-6L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const T*, const mpl::int_<64>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(4.76837158203125e-7L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T cbrt_epsilon_imp(const T*, const mpl::int_<113>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(5.7749313854154005630396773604745549542403508090496e-12L);
+}
+
+template <class T, class Tag>
+inline T cbrt_epsilon_imp(const T*, const Tag&)
+{
+ BOOST_MATH_STD_USING;
+ static const T cbrt_eps = pow(tools::epsilon<T>(), T(1) / 3);
+ return cbrt_eps;
+}
+
+template <class T>
+inline T cbrt_epsilon_imp(const T*, const mpl::int_<0>&)
+{
+ BOOST_MATH_STD_USING;
+ return pow(tools::epsilon<T>(), T(1) / 3);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<24>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.018581361171917516667460937040007436176452688944747L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<53>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.0001220703125L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<64>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.18145860519450699870567321328132261891067079047605e-4L);
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T forth_root_epsilon_imp(const T*, const mpl::int_<113>&) BOOST_MATH_NOEXCEPT(T)
+{
+ return static_cast<T>(0.37252902984619140625e-8L);
+}
+
+template <class T, class Tag>
+inline T forth_root_epsilon_imp(const T*, const Tag&)
+{
+ BOOST_MATH_STD_USING
+ static const T r_eps = sqrt(sqrt(tools::epsilon<T>()));
+ return r_eps;
+}
+
+template <class T>
+inline T forth_root_epsilon_imp(const T*, const mpl::int_<0>&)
+{
+ BOOST_MATH_STD_USING
+ return sqrt(sqrt(tools::epsilon<T>()));
+}
+
+template <class T>
+struct root_epsilon_traits
+{
+ typedef mpl::int_< (::std::numeric_limits<T>::radix == 2) && (::std::numeric_limits<T>::digits != INT_MAX) ? std::numeric_limits<T>::digits : 0> tag_type;
+ BOOST_STATIC_CONSTANT(bool, has_noexcept = (tag_type::value == 113) || (tag_type::value == 64) || (tag_type::value == 53) || (tag_type::value == 24));
+};
+
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T root_epsilon() BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && detail::root_epsilon_traits<T>::has_noexcept)
+{
+ return detail::root_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type());
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T cbrt_epsilon() BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && detail::root_epsilon_traits<T>::has_noexcept)
+{
+ return detail::cbrt_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type());
+}
+
+template <class T>
+inline BOOST_MATH_CONSTEXPR T forth_root_epsilon() BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && detail::root_epsilon_traits<T>::has_noexcept)
+{
+ return detail::forth_root_epsilon_imp(static_cast<T const*>(0), typename detail::root_epsilon_traits<T>::tag_type());
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_PRECISION_INCLUDED
+
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/promotion.hpp b/src/third_party/boost-1.69.0/boost/math/tools/promotion.hpp
index 494d7f99e20..494d7f99e20 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/promotion.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/promotion.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/rational.hpp b/src/third_party/boost-1.69.0/boost/math/tools/rational.hpp
index d8bd4a73aa8..d8bd4a73aa8 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/rational.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/rational.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/real_cast.hpp b/src/third_party/boost-1.69.0/boost/math/tools/real_cast.hpp
index 873e60259b8..873e60259b8 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/real_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/real_cast.hpp
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/roots.hpp b/src/third_party/boost-1.69.0/boost/math/tools/roots.hpp
new file mode 100644
index 00000000000..81e84661382
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/tools/roots.hpp
@@ -0,0 +1,568 @@
+// (C) Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
+#define BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <utility>
+#include <boost/config/no_tr1/cmath.hpp>
+#include <stdexcept>
+
+#include <boost/math/tools/config.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4512)
+#endif
+#include <boost/math/tools/tuple.hpp>
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/math/tools/toms748_solve.hpp>
+#include <boost/math/policies/error_handling.hpp>
+
+namespace boost{ namespace math{ namespace tools{
+
+namespace detail{
+
+namespace dummy{
+
+ template<int n, class T>
+ typename T::value_type get(const T&) BOOST_MATH_NOEXCEPT(T);
+}
+
+template <class Tuple, class T>
+void unpack_tuple(const Tuple& t, T& a, T& b) BOOST_MATH_NOEXCEPT(T)
+{
+ using dummy::get;
+ // Use ADL to find the right overload for get:
+ a = get<0>(t);
+ b = get<1>(t);
+}
+template <class Tuple, class T>
+void unpack_tuple(const Tuple& t, T& a, T& b, T& c) BOOST_MATH_NOEXCEPT(T)
+{
+ using dummy::get;
+ // Use ADL to find the right overload for get:
+ a = get<0>(t);
+ b = get<1>(t);
+ c = get<2>(t);
+}
+
+template <class Tuple, class T>
+inline void unpack_0(const Tuple& t, T& val) BOOST_MATH_NOEXCEPT(T)
+{
+ using dummy::get;
+ // Rely on ADL to find the correct overload of get:
+ val = get<0>(t);
+}
+
+template <class T, class U, class V>
+inline void unpack_tuple(const std::pair<T, U>& p, V& a, V& b) BOOST_MATH_NOEXCEPT(T)
+{
+ a = p.first;
+ b = p.second;
+}
+template <class T, class U, class V>
+inline void unpack_0(const std::pair<T, U>& p, V& a) BOOST_MATH_NOEXCEPT(T)
+{
+ a = p.first;
+}
+
+template <class F, class T>
+void handle_zero_derivative(F f,
+ T& last_f0,
+ const T& f0,
+ T& delta,
+ T& result,
+ T& guess,
+ const T& min,
+ const T& max) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ if(last_f0 == 0)
+ {
+ // this must be the first iteration, pretend that we had a
+ // previous one at either min or max:
+ if(result == min)
+ {
+ guess = max;
+ }
+ else
+ {
+ guess = min;
+ }
+ unpack_0(f(guess), last_f0);
+ delta = guess - result;
+ }
+ if(sign(last_f0) * sign(f0) < 0)
+ {
+ // we've crossed over so move in opposite direction to last step:
+ if(delta < 0)
+ {
+ delta = (result - min) / 2;
+ }
+ else
+ {
+ delta = (result - max) / 2;
+ }
+ }
+ else
+ {
+ // move in same direction as last step:
+ if(delta < 0)
+ {
+ delta = (result - max) / 2;
+ }
+ else
+ {
+ delta = (result - min) / 2;
+ }
+ }
+}
+
+} // namespace
+
+template <class F, class T, class Tol, class Policy>
+std::pair<T, T> bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter, const Policy& pol) BOOST_NOEXCEPT_IF(policies::is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ T fmin = f(min);
+ T fmax = f(max);
+ if(fmin == 0)
+ {
+ max_iter = 2;
+ return std::make_pair(min, min);
+ }
+ if(fmax == 0)
+ {
+ max_iter = 2;
+ return std::make_pair(max, max);
+ }
+
+ //
+ // Error checking:
+ //
+ static const char* function = "boost::math::tools::bisect<%1%>";
+ if(min >= max)
+ {
+ return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function,
+ "Arguments in wrong order in boost::math::tools::bisect (first arg=%1%)", min, pol));
+ }
+ if(fmin * fmax >= 0)
+ {
+ return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function,
+ "No change of sign in boost::math::tools::bisect, either there is no root to find, or there are multiple roots in the interval (f(min) = %1%).", fmin, pol));
+ }
+
+ //
+ // Three function invocations so far:
+ //
+ boost::uintmax_t count = max_iter;
+ if(count < 3)
+ count = 0;
+ else
+ count -= 3;
+
+ while(count && (0 == tol(min, max)))
+ {
+ T mid = (min + max) / 2;
+ T fmid = f(mid);
+ if((mid == max) || (mid == min))
+ break;
+ if(fmid == 0)
+ {
+ min = max = mid;
+ break;
+ }
+ else if(sign(fmid) * sign(fmin) < 0)
+ {
+ max = mid;
+ fmax = fmid;
+ }
+ else
+ {
+ min = mid;
+ fmin = fmid;
+ }
+ --count;
+ }
+
+ max_iter -= count;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Bisection iteration, final count = " << max_iter << std::endl;
+
+ static boost::uintmax_t max_count = 0;
+ if(max_iter > max_count)
+ {
+ max_count = max_iter;
+ std::cout << "Maximum iterations: " << max_iter << std::endl;
+ }
+#endif
+
+ return std::make_pair(min, max);
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> bisect(F f, T min, T max, Tol tol, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(policies::is_noexcept_error_policy<policies::policy<> >::value && BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ return bisect(f, min, max, tol, max_iter, policies::policy<>());
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> bisect(F f, T min, T max, Tol tol) BOOST_NOEXCEPT_IF(policies::is_noexcept_error_policy<policies::policy<> >::value && BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return bisect(f, min, max, tol, m, policies::policy<>());
+}
+
+
+template <class F, class T>
+T newton_raphson_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ BOOST_MATH_STD_USING
+
+ T f0(0), f1, last_f0(0);
+ T result = guess;
+
+ T factor = static_cast<T>(ldexp(1.0, 1 - digits));
+ T delta = tools::max_value<T>();
+ T delta1 = tools::max_value<T>();
+ T delta2 = tools::max_value<T>();
+
+ boost::uintmax_t count(max_iter);
+
+ do{
+ last_f0 = f0;
+ delta2 = delta1;
+ delta1 = delta;
+ detail::unpack_tuple(f(result), f0, f1);
+ --count;
+ if(0 == f0)
+ break;
+ if(f1 == 0)
+ {
+ // Oops zero derivative!!!
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Newton iteration, zero derivative found" << std::endl;
+#endif
+ detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max);
+ }
+ else
+ {
+ delta = f0 / f1;
+ }
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Newton iteration, delta = " << delta << std::endl;
+#endif
+ if(fabs(delta * 2) > fabs(delta2))
+ {
+ // last two steps haven't converged.
+ delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
+ if (fabs(delta) > fabs(result))
+ delta = sign(delta) * result; // protect against huge jumps!
+ // reset delta2 so we don't take this branch next time round:
+ delta1 = delta;
+ delta2 = 3 * delta;
+ }
+ guess = result;
+ result -= delta;
+ if(result <= min)
+ {
+ delta = 0.5F * (guess - min);
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ else if(result >= max)
+ {
+ delta = 0.5F * (guess - max);
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ // update brackets:
+ if(delta > 0)
+ max = guess;
+ else
+ min = guess;
+ }while(count && (fabs(result * factor) < fabs(delta)));
+
+ max_iter -= count;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Newton Raphson iteration, final count = " << max_iter << std::endl;
+
+ static boost::uintmax_t max_count = 0;
+ if(max_iter > max_count)
+ {
+ max_count = max_iter;
+ std::cout << "Maximum iterations: " << max_iter << std::endl;
+ }
+#endif
+
+ return result;
+}
+
+template <class F, class T>
+inline T newton_raphson_iterate(F f, T guess, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return newton_raphson_iterate(f, guess, min, max, digits, m);
+}
+
+namespace detail{
+
+ struct halley_step
+ {
+ template <class T>
+ static T step(const T& /*x*/, const T& f0, const T& f1, const T& f2) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T))
+ {
+ using std::fabs;
+ T denom = 2 * f0;
+ T num = 2 * f1 - f0 * (f2 / f1);
+ T delta;
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(denom);
+ BOOST_MATH_INSTRUMENT_VARIABLE(num);
+
+ if((fabs(num) < 1) && (fabs(denom) >= fabs(num) * tools::max_value<T>()))
+ {
+ // possible overflow, use Newton step:
+ delta = f0 / f1;
+ }
+ else
+ delta = denom / num;
+ return delta;
+ }
+ };
+
+ template <class Stepper, class F, class T>
+ T second_order_root_finder(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+ {
+ BOOST_MATH_STD_USING
+
+ T f0(0), f1, f2;
+ T result = guess;
+
+ T factor = ldexp(static_cast<T>(1.0), 1 - digits);
+ T delta = (std::max)(T(10000000 * guess), T(10000000)); // arbitarily large delta
+ T last_f0 = 0;
+ T delta1 = delta;
+ T delta2 = delta;
+ bool out_of_bounds_sentry = false;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Second order root iteration, limit = " << factor << std::endl;
+#endif
+
+ boost::uintmax_t count(max_iter);
+
+ do{
+ last_f0 = f0;
+ delta2 = delta1;
+ delta1 = delta;
+ detail::unpack_tuple(f(result), f0, f1, f2);
+ --count;
+
+ BOOST_MATH_INSTRUMENT_VARIABLE(f0);
+ BOOST_MATH_INSTRUMENT_VARIABLE(f1);
+ BOOST_MATH_INSTRUMENT_VARIABLE(f2);
+
+ if(0 == f0)
+ break;
+ if(f1 == 0)
+ {
+ // Oops zero derivative!!!
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Second order root iteration, zero derivative found" << std::endl;
+#endif
+ detail::handle_zero_derivative(f, last_f0, f0, delta, result, guess, min, max);
+ }
+ else
+ {
+ if(f2 != 0)
+ {
+ delta = Stepper::step(result, f0, f1, f2);
+ if(delta * f1 / f0 < 0)
+ {
+ // Oh dear, we have a problem as Newton and Halley steps
+ // disagree about which way we should move. Probably
+ // there is cancelation error in the calculation of the
+ // Halley step, or else the derivatives are so small
+ // that their values are basically trash. We will move
+ // in the direction indicated by a Newton step, but
+ // by no more than twice the current guess value, otherwise
+ // we can jump way out of bounds if we're not careful.
+ // See https://svn.boost.org/trac/boost/ticket/8314.
+ delta = f0 / f1;
+ if(fabs(delta) > 2 * fabs(guess))
+ delta = (delta < 0 ? -1 : 1) * 2 * fabs(guess);
+ }
+ }
+ else
+ delta = f0 / f1;
+ }
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Second order root iteration, delta = " << delta << std::endl;
+#endif
+ T convergence = fabs(delta / delta2);
+ if((convergence > 0.8) && (convergence < 2))
+ {
+ // last two steps haven't converged.
+ delta = (delta > 0) ? (result - min) / 2 : (result - max) / 2;
+ if (fabs(delta) > result)
+ delta = sign(delta) * result; // protect against huge jumps!
+ // reset delta2 so that this branch will *not* be taken on the
+ // next iteration:
+ delta2 = delta * 3;
+ delta1 = delta;
+ BOOST_MATH_INSTRUMENT_VARIABLE(delta);
+ }
+ guess = result;
+ result -= delta;
+ BOOST_MATH_INSTRUMENT_VARIABLE(result);
+
+ // check for out of bounds step:
+ if(result < min)
+ {
+ T diff = ((fabs(min) < 1) && (fabs(result) > 1) && (tools::max_value<T>() / fabs(result) < fabs(min))) ? T(1000) : T(result / min);
+ if(fabs(diff) < 1)
+ diff = 1 / diff;
+ if(!out_of_bounds_sentry && (diff > 0) && (diff < 3))
+ {
+ // Only a small out of bounds step, lets assume that the result
+ // is probably approximately at min:
+ delta = 0.99f * (guess - min);
+ result = guess - delta;
+ out_of_bounds_sentry = true; // only take this branch once!
+ }
+ else
+ {
+ delta = (guess - min) / 2;
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ }
+ else if(result > max)
+ {
+ T diff = ((fabs(max) < 1) && (fabs(result) > 1) && (tools::max_value<T>() / fabs(result) < fabs(max))) ? T(1000) : T(result / max);
+ if(fabs(diff) < 1)
+ diff = 1 / diff;
+ if(!out_of_bounds_sentry && (diff > 0) && (diff < 3))
+ {
+ // Only a small out of bounds step, lets assume that the result
+ // is probably approximately at min:
+ delta = 0.99f * (guess - max);
+ result = guess - delta;
+ out_of_bounds_sentry = true; // only take this branch once!
+ }
+ else
+ {
+ delta = (guess - max) / 2;
+ result = guess - delta;
+ if((result == min) || (result == max))
+ break;
+ }
+ }
+ // update brackets:
+ if(delta > 0)
+ max = guess;
+ else
+ min = guess;
+ } while(count && (fabs(result * factor) < fabs(delta)));
+
+ max_iter -= count;
+
+#ifdef BOOST_MATH_INSTRUMENT
+ std::cout << "Second order root iteration, final count = " << max_iter << std::endl;
+#endif
+
+ return result;
+ }
+
+}
+
+template <class F, class T>
+T halley_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ return detail::second_order_root_finder<detail::halley_step>(f, guess, min, max, digits, max_iter);
+}
+
+template <class F, class T>
+inline T halley_iterate(F f, T guess, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return halley_iterate(f, guess, min, max, digits, m);
+}
+
+namespace detail{
+
+ struct schroder_stepper
+ {
+ template <class T>
+ static T step(const T& x, const T& f0, const T& f1, const T& f2) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T))
+ {
+ T ratio = f0 / f1;
+ T delta;
+ if(ratio / x < 0.1)
+ {
+ delta = ratio + (f2 / (2 * f1)) * ratio * ratio;
+ // check second derivative doesn't over compensate:
+ if(delta * ratio < 0)
+ delta = ratio;
+ }
+ else
+ delta = ratio; // fall back to Newton iteration.
+ return delta;
+ }
+ };
+
+}
+
+template <class F, class T>
+T schroder_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ return detail::second_order_root_finder<detail::schroder_stepper>(f, guess, min, max, digits, max_iter);
+}
+
+template <class F, class T>
+inline T schroder_iterate(F f, T guess, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return schroder_iterate(f, guess, min, max, digits, m);
+}
+//
+// These two are the old spelling of this function, retained for backwards compatibity just in case:
+//
+template <class F, class T>
+T schroeder_iterate(F f, T guess, T min, T max, int digits, boost::uintmax_t& max_iter) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ return detail::second_order_root_finder<detail::schroder_stepper>(f, guess, min, max, digits, max_iter);
+}
+
+template <class F, class T>
+inline T schroeder_iterate(F f, T guess, T min, T max, int digits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && noexcept(std::declval<F>()(std::declval<T>())))
+{
+ boost::uintmax_t m = (std::numeric_limits<boost::uintmax_t>::max)();
+ return schroder_iterate(f, guess, min, max, digits, m);
+}
+
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_NEWTON_SOLVER_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/series.hpp b/src/third_party/boost-1.69.0/boost/math/tools/series.hpp
new file mode 100644
index 00000000000..eea1046cd38
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/tools/series.hpp
@@ -0,0 +1,158 @@
+// (C) Copyright John Maddock 2005-2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_SERIES_INCLUDED
+#define BOOST_MATH_TOOLS_SERIES_INCLUDED
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/config/no_tr1/cmath.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/limits.hpp>
+#include <boost/math/tools/config.hpp>
+
+namespace boost{ namespace math{ namespace tools{
+
+//
+// Simple series summation come first:
+//
+template <class Functor, class U, class V>
+inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms, const V& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
+{
+ BOOST_MATH_STD_USING
+
+ typedef typename Functor::result_type result_type;
+
+ boost::uintmax_t counter = max_terms;
+
+ result_type result = init_value;
+ result_type next_term;
+ do{
+ next_term = func();
+ result += next_term;
+ }
+ while((abs(factor * result) < abs(next_term)) && --counter);
+
+ // set max_terms to the actual number of terms of the series evaluated:
+ max_terms = max_terms - counter;
+
+ return result;
+}
+
+template <class Functor, class U>
+inline typename Functor::result_type sum_series(Functor& func, const U& factor, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
+{
+ typename Functor::result_type init_value = 0;
+ return sum_series(func, factor, max_terms, init_value);
+}
+
+template <class Functor, class U>
+inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms, const U& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
+{
+ BOOST_MATH_STD_USING
+ typedef typename Functor::result_type result_type;
+ result_type factor = ldexp(result_type(1), 1 - bits);
+ return sum_series(func, factor, max_terms, init_value);
+}
+
+template <class Functor>
+inline typename Functor::result_type sum_series(Functor& func, int bits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
+{
+ BOOST_MATH_STD_USING
+ typedef typename Functor::result_type result_type;
+ boost::uintmax_t iters = (std::numeric_limits<boost::uintmax_t>::max)();
+ result_type init_val = 0;
+ return sum_series(func, bits, iters, init_val);
+}
+
+template <class Functor>
+inline typename Functor::result_type sum_series(Functor& func, int bits, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
+{
+ BOOST_MATH_STD_USING
+ typedef typename Functor::result_type result_type;
+ result_type init_val = 0;
+ return sum_series(func, bits, max_terms, init_val);
+}
+
+template <class Functor, class U>
+inline typename Functor::result_type sum_series(Functor& func, int bits, const U& init_value) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
+{
+ BOOST_MATH_STD_USING
+ boost::uintmax_t iters = (std::numeric_limits<boost::uintmax_t>::max)();
+ return sum_series(func, bits, iters, init_value);
+}
+
+//
+// Algorithm kahan_sum_series invokes Functor func until the N'th
+// term is too small to have any effect on the total, the terms
+// are added using the Kahan summation method.
+//
+// CAUTION: Optimizing compilers combined with extended-precision
+// machine registers conspire to render this algorithm partly broken:
+// double rounding of intermediate terms (first to a long double machine
+// register, and then to a double result) cause the rounding error computed
+// by the algorithm to be off by up to 1ulp. However this occurs rarely, and
+// in any case the result is still much better than a naive summation.
+//
+template <class Functor>
+inline typename Functor::result_type kahan_sum_series(Functor& func, int bits) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
+{
+ BOOST_MATH_STD_USING
+
+ typedef typename Functor::result_type result_type;
+
+ result_type factor = pow(result_type(2), bits);
+ result_type result = func();
+ result_type next_term, y, t;
+ result_type carry = 0;
+ do{
+ next_term = func();
+ y = next_term - carry;
+ t = result + y;
+ carry = t - result;
+ carry -= y;
+ result = t;
+ }
+ while(fabs(result) < fabs(factor * next_term));
+ return result;
+}
+
+template <class Functor>
+inline typename Functor::result_type kahan_sum_series(Functor& func, int bits, boost::uintmax_t& max_terms) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(typename Functor::result_type) && noexcept(std::declval<Functor>()()))
+{
+ BOOST_MATH_STD_USING
+
+ typedef typename Functor::result_type result_type;
+
+ boost::uintmax_t counter = max_terms;
+
+ result_type factor = ldexp(result_type(1), bits);
+ result_type result = func();
+ result_type next_term, y, t;
+ result_type carry = 0;
+ do{
+ next_term = func();
+ y = next_term - carry;
+ t = result + y;
+ carry = t - result;
+ carry -= y;
+ result = t;
+ }
+ while((fabs(result) < fabs(factor * next_term)) && --counter);
+
+ // set max_terms to the actual number of terms of the series evaluated:
+ max_terms = max_terms - counter;
+
+ return result;
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+#endif // BOOST_MATH_TOOLS_SERIES_INCLUDED
+
diff --git a/src/third_party/boost-1.69.0/boost/math/tools/toms748_solve.hpp b/src/third_party/boost-1.69.0/boost/math/tools/toms748_solve.hpp
new file mode 100644
index 00000000000..8beb0172dae
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/math/tools/toms748_solve.hpp
@@ -0,0 +1,621 @@
+// (C) Copyright John Maddock 2006.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
+#define BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
+
+#ifdef _MSC_VER
+#pragma once
+#endif
+
+#include <boost/math/tools/precision.hpp>
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/math/tools/config.hpp>
+#include <boost/math/special_functions/sign.hpp>
+#include <boost/cstdint.hpp>
+#include <limits>
+
+#ifdef BOOST_MATH_LOG_ROOT_ITERATIONS
+# define BOOST_MATH_LOGGER_INCLUDE <boost/math/tools/iteration_logger.hpp>
+# include BOOST_MATH_LOGGER_INCLUDE
+# undef BOOST_MATH_LOGGER_INCLUDE
+#else
+# define BOOST_MATH_LOG_COUNT(count)
+#endif
+
+namespace boost{ namespace math{ namespace tools{
+
+template <class T>
+class eps_tolerance
+{
+public:
+ eps_tolerance()
+ {
+ eps = 4 * tools::epsilon<T>();
+ }
+ eps_tolerance(unsigned bits)
+ {
+ BOOST_MATH_STD_USING
+ eps = (std::max)(T(ldexp(1.0F, 1-bits)), T(4 * tools::epsilon<T>()));
+ }
+ bool operator()(const T& a, const T& b)
+ {
+ BOOST_MATH_STD_USING
+ return fabs(a - b) <= (eps * (std::min)(fabs(a), fabs(b)));
+ }
+private:
+ T eps;
+};
+
+struct equal_floor
+{
+ equal_floor(){}
+ template <class T>
+ bool operator()(const T& a, const T& b)
+ {
+ BOOST_MATH_STD_USING
+ return floor(a) == floor(b);
+ }
+};
+
+struct equal_ceil
+{
+ equal_ceil(){}
+ template <class T>
+ bool operator()(const T& a, const T& b)
+ {
+ BOOST_MATH_STD_USING
+ return ceil(a) == ceil(b);
+ }
+};
+
+struct equal_nearest_integer
+{
+ equal_nearest_integer(){}
+ template <class T>
+ bool operator()(const T& a, const T& b)
+ {
+ BOOST_MATH_STD_USING
+ return floor(a + 0.5f) == floor(b + 0.5f);
+ }
+};
+
+namespace detail{
+
+template <class F, class T>
+void bracket(F f, T& a, T& b, T c, T& fa, T& fb, T& d, T& fd)
+{
+ //
+ // Given a point c inside the existing enclosing interval
+ // [a, b] sets a = c if f(c) == 0, otherwise finds the new
+ // enclosing interval: either [a, c] or [c, b] and sets
+ // d and fd to the point that has just been removed from
+ // the interval. In other words d is the third best guess
+ // to the root.
+ //
+ BOOST_MATH_STD_USING // For ADL of std math functions
+ T tol = tools::epsilon<T>() * 2;
+ //
+ // If the interval [a,b] is very small, or if c is too close
+ // to one end of the interval then we need to adjust the
+ // location of c accordingly:
+ //
+ if((b - a) < 2 * tol * a)
+ {
+ c = a + (b - a) / 2;
+ }
+ else if(c <= a + fabs(a) * tol)
+ {
+ c = a + fabs(a) * tol;
+ }
+ else if(c >= b - fabs(b) * tol)
+ {
+ c = b - fabs(b) * tol;
+ }
+ //
+ // OK, lets invoke f(c):
+ //
+ T fc = f(c);
+ //
+ // if we have a zero then we have an exact solution to the root:
+ //
+ if(fc == 0)
+ {
+ a = c;
+ fa = 0;
+ d = 0;
+ fd = 0;
+ return;
+ }
+ //
+ // Non-zero fc, update the interval:
+ //
+ if(boost::math::sign(fa) * boost::math::sign(fc) < 0)
+ {
+ d = b;
+ fd = fb;
+ b = c;
+ fb = fc;
+ }
+ else
+ {
+ d = a;
+ fd = fa;
+ a = c;
+ fa= fc;
+ }
+}
+
+template <class T>
+inline T safe_div(T num, T denom, T r)
+{
+ //
+ // return num / denom without overflow,
+ // return r if overflow would occur.
+ //
+ BOOST_MATH_STD_USING // For ADL of std math functions
+
+ if(fabs(denom) < 1)
+ {
+ if(fabs(denom * tools::max_value<T>()) <= fabs(num))
+ return r;
+ }
+ return num / denom;
+}
+
+template <class T>
+inline T secant_interpolate(const T& a, const T& b, const T& fa, const T& fb)
+{
+ //
+ // Performs standard secant interpolation of [a,b] given
+ // function evaluations f(a) and f(b). Performs a bisection
+ // if secant interpolation would leave us very close to either
+ // a or b. Rationale: we only call this function when at least
+ // one other form of interpolation has already failed, so we know
+ // that the function is unlikely to be smooth with a root very
+ // close to a or b.
+ //
+ BOOST_MATH_STD_USING // For ADL of std math functions
+
+ T tol = tools::epsilon<T>() * 5;
+ T c = a - (fa / (fb - fa)) * (b - a);
+ if((c <= a + fabs(a) * tol) || (c >= b - fabs(b) * tol))
+ return (a + b) / 2;
+ return c;
+}
+
+template <class T>
+T quadratic_interpolate(const T& a, const T& b, T const& d,
+ const T& fa, const T& fb, T const& fd,
+ unsigned count)
+{
+ //
+ // Performs quadratic interpolation to determine the next point,
+ // takes count Newton steps to find the location of the
+ // quadratic polynomial.
+ //
+ // Point d must lie outside of the interval [a,b], it is the third
+ // best approximation to the root, after a and b.
+ //
+ // Note: this does not guarantee to find a root
+ // inside [a, b], so we fall back to a secant step should
+ // the result be out of range.
+ //
+ // Start by obtaining the coefficients of the quadratic polynomial:
+ //
+ T B = safe_div(T(fb - fa), T(b - a), tools::max_value<T>());
+ T A = safe_div(T(fd - fb), T(d - b), tools::max_value<T>());
+ A = safe_div(T(A - B), T(d - a), T(0));
+
+ if(A == 0)
+ {
+ // failure to determine coefficients, try a secant step:
+ return secant_interpolate(a, b, fa, fb);
+ }
+ //
+ // Determine the starting point of the Newton steps:
+ //
+ T c;
+ if(boost::math::sign(A) * boost::math::sign(fa) > 0)
+ {
+ c = a;
+ }
+ else
+ {
+ c = b;
+ }
+ //
+ // Take the Newton steps:
+ //
+ for(unsigned i = 1; i <= count; ++i)
+ {
+ //c -= safe_div(B * c, (B + A * (2 * c - a - b)), 1 + c - a);
+ c -= safe_div(T(fa+(B+A*(c-b))*(c-a)), T(B + A * (2 * c - a - b)), T(1 + c - a));
+ }
+ if((c <= a) || (c >= b))
+ {
+ // Oops, failure, try a secant step:
+ c = secant_interpolate(a, b, fa, fb);
+ }
+ return c;
+}
+
+template <class T>
+T cubic_interpolate(const T& a, const T& b, const T& d,
+ const T& e, const T& fa, const T& fb,
+ const T& fd, const T& fe)
+{
+ //
+ // Uses inverse cubic interpolation of f(x) at points
+ // [a,b,d,e] to obtain an approximate root of f(x).
+ // Points d and e lie outside the interval [a,b]
+ // and are the third and forth best approximations
+ // to the root that we have found so far.
+ //
+ // Note: this does not guarantee to find a root
+ // inside [a, b], so we fall back to quadratic
+ // interpolation in case of an erroneous result.
+ //
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b
+ << " d = " << d << " e = " << e << " fa = " << fa << " fb = " << fb
+ << " fd = " << fd << " fe = " << fe);
+ T q11 = (d - e) * fd / (fe - fd);
+ T q21 = (b - d) * fb / (fd - fb);
+ T q31 = (a - b) * fa / (fb - fa);
+ T d21 = (b - d) * fd / (fd - fb);
+ T d31 = (a - b) * fb / (fb - fa);
+ BOOST_MATH_INSTRUMENT_CODE(
+ "q11 = " << q11 << " q21 = " << q21 << " q31 = " << q31
+ << " d21 = " << d21 << " d31 = " << d31);
+ T q22 = (d21 - q11) * fb / (fe - fb);
+ T q32 = (d31 - q21) * fa / (fd - fa);
+ T d32 = (d31 - q21) * fd / (fd - fa);
+ T q33 = (d32 - q22) * fa / (fe - fa);
+ T c = q31 + q32 + q33 + a;
+ BOOST_MATH_INSTRUMENT_CODE(
+ "q22 = " << q22 << " q32 = " << q32 << " d32 = " << d32
+ << " q33 = " << q33 << " c = " << c);
+
+ if((c <= a) || (c >= b))
+ {
+ // Out of bounds step, fall back to quadratic interpolation:
+ c = quadratic_interpolate(a, b, d, fa, fb, fd, 3);
+ BOOST_MATH_INSTRUMENT_CODE(
+ "Out of bounds interpolation, falling back to quadratic interpolation. c = " << c);
+ }
+
+ return c;
+}
+
+} // namespace detail
+
+template <class F, class T, class Tol, class Policy>
+std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
+{
+ //
+ // Main entry point and logic for Toms Algorithm 748
+ // root finder.
+ //
+ BOOST_MATH_STD_USING // For ADL of std math functions
+
+ static const char* function = "boost::math::tools::toms748_solve<%1%>";
+
+ //
+ // Sanity check - are we allowed to iterate at all?
+ //
+ if (max_iter == 0)
+ return std::make_pair(ax, bx);
+
+ boost::uintmax_t count = max_iter;
+ T a, b, fa, fb, c, u, fu, a0, b0, d, fd, e, fe;
+ static const T mu = 0.5f;
+
+ // initialise a, b and fa, fb:
+ a = ax;
+ b = bx;
+ if(a >= b)
+ return boost::math::detail::pair_from_single(policies::raise_domain_error(
+ function,
+ "Parameters a and b out of order: a=%1%", a, pol));
+ fa = fax;
+ fb = fbx;
+
+ if(tol(a, b) || (fa == 0) || (fb == 0))
+ {
+ max_iter = 0;
+ if(fa == 0)
+ b = a;
+ else if(fb == 0)
+ a = b;
+ return std::make_pair(a, b);
+ }
+
+ if(boost::math::sign(fa) * boost::math::sign(fb) > 0)
+ return boost::math::detail::pair_from_single(policies::raise_domain_error(
+ function,
+ "Parameters a and b do not bracket the root: a=%1%", a, pol));
+ // dummy value for fd, e and fe:
+ fe = e = fd = 1e5F;
+
+ if(fa != 0)
+ {
+ //
+ // On the first step we take a secant step:
+ //
+ c = detail::secant_interpolate(a, b, fa, fb);
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+
+ if(count && (fa != 0) && !tol(a, b))
+ {
+ //
+ // On the second step we take a quadratic interpolation:
+ //
+ c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 2);
+ e = d;
+ fe = fd;
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ }
+ }
+
+ while(count && (fa != 0) && !tol(a, b))
+ {
+ // save our brackets:
+ a0 = a;
+ b0 = b;
+ //
+ // Starting with the third step taken
+ // we can use either quadratic or cubic interpolation.
+ // Cubic interpolation requires that all four function values
+ // fa, fb, fd, and fe are distinct, should that not be the case
+ // then variable prof will get set to true, and we'll end up
+ // taking a quadratic step instead.
+ //
+ T min_diff = tools::min_value<T>() * 32;
+ bool prof = (fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb - fd) < min_diff) || (fabs(fb - fe) < min_diff) || (fabs(fd - fe) < min_diff);
+ if(prof)
+ {
+ c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 2);
+ BOOST_MATH_INSTRUMENT_CODE("Can't take cubic step!!!!");
+ }
+ else
+ {
+ c = detail::cubic_interpolate(a, b, d, e, fa, fb, fd, fe);
+ }
+ //
+ // re-bracket, and check for termination:
+ //
+ e = d;
+ fe = fd;
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ if((0 == --count) || (fa == 0) || tol(a, b))
+ break;
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ //
+ // Now another interpolated step:
+ //
+ prof = (fabs(fa - fb) < min_diff) || (fabs(fa - fd) < min_diff) || (fabs(fa - fe) < min_diff) || (fabs(fb - fd) < min_diff) || (fabs(fb - fe) < min_diff) || (fabs(fd - fe) < min_diff);
+ if(prof)
+ {
+ c = detail::quadratic_interpolate(a, b, d, fa, fb, fd, 3);
+ BOOST_MATH_INSTRUMENT_CODE("Can't take cubic step!!!!");
+ }
+ else
+ {
+ c = detail::cubic_interpolate(a, b, d, e, fa, fb, fd, fe);
+ }
+ //
+ // Bracket again, and check termination condition, update e:
+ //
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ if((0 == --count) || (fa == 0) || tol(a, b))
+ break;
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ //
+ // Now we take a double-length secant step:
+ //
+ if(fabs(fa) < fabs(fb))
+ {
+ u = a;
+ fu = fa;
+ }
+ else
+ {
+ u = b;
+ fu = fb;
+ }
+ c = u - 2 * (fu / (fb - fa)) * (b - a);
+ if(fabs(c - u) > (b - a) / 2)
+ {
+ c = a + (b - a) / 2;
+ }
+ //
+ // Bracket again, and check termination condition:
+ //
+ e = d;
+ fe = fd;
+ detail::bracket(f, a, b, c, fa, fb, d, fd);
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ BOOST_MATH_INSTRUMENT_CODE(" tol = " << T((fabs(a) - fabs(b)) / fabs(a)));
+ if((0 == --count) || (fa == 0) || tol(a, b))
+ break;
+ //
+ // And finally... check to see if an additional bisection step is
+ // to be taken, we do this if we're not converging fast enough:
+ //
+ if((b - a) < mu * (b0 - a0))
+ continue;
+ //
+ // bracket again on a bisection:
+ //
+ e = d;
+ fe = fd;
+ detail::bracket(f, a, b, T(a + (b - a) / 2), fa, fb, d, fd);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE("Not converging: Taking a bisection!!!!");
+ BOOST_MATH_INSTRUMENT_CODE(" a = " << a << " b = " << b);
+ } // while loop
+
+ max_iter -= count;
+ if(fa == 0)
+ {
+ b = a;
+ }
+ else if(fb == 0)
+ {
+ a = b;
+ }
+ BOOST_MATH_LOG_COUNT(max_iter)
+ return std::make_pair(a, b);
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, const T& fax, const T& fbx, Tol tol, boost::uintmax_t& max_iter)
+{
+ return toms748_solve(f, ax, bx, fax, fbx, tol, max_iter, policies::policy<>());
+}
+
+template <class F, class T, class Tol, class Policy>
+inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
+{
+ if (max_iter <= 2)
+ return std::make_pair(ax, bx);
+ max_iter -= 2;
+ std::pair<T, T> r = toms748_solve(f, ax, bx, f(ax), f(bx), tol, max_iter, pol);
+ max_iter += 2;
+ return r;
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> toms748_solve(F f, const T& ax, const T& bx, Tol tol, boost::uintmax_t& max_iter)
+{
+ return toms748_solve(f, ax, bx, tol, max_iter, policies::policy<>());
+}
+
+template <class F, class T, class Tol, class Policy>
+std::pair<T, T> bracket_and_solve_root(F f, const T& guess, T factor, bool rising, Tol tol, boost::uintmax_t& max_iter, const Policy& pol)
+{
+ BOOST_MATH_STD_USING
+ static const char* function = "boost::math::tools::bracket_and_solve_root<%1%>";
+ //
+ // Set up inital brackets:
+ //
+ T a = guess;
+ T b = a;
+ T fa = f(a);
+ T fb = fa;
+ //
+ // Set up invocation count:
+ //
+ boost::uintmax_t count = max_iter - 1;
+
+ int step = 32;
+
+ if((fa < 0) == (guess < 0 ? !rising : rising))
+ {
+ //
+ // Zero is to the right of b, so walk upwards
+ // until we find it:
+ //
+ while((boost::math::sign)(fb) == (boost::math::sign)(fa))
+ {
+ if(count == 0)
+ return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", b, pol));
+ //
+ // Heuristic: normally it's best not to increase the step sizes as we'll just end up
+ // with a really wide range to search for the root. However, if the initial guess was *really*
+ // bad then we need to speed up the search otherwise we'll take forever if we're orders of
+ // magnitude out. This happens most often if the guess is a small value (say 1) and the result
+ // we're looking for is close to std::numeric_limits<T>::min().
+ //
+ if((max_iter - count) % step == 0)
+ {
+ factor *= 2;
+ if(step > 1) step /= 2;
+ }
+ //
+ // Now go ahead and move our guess by "factor":
+ //
+ a = b;
+ fa = fb;
+ b *= factor;
+ fb = f(b);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE("a = " << a << " b = " << b << " fa = " << fa << " fb = " << fb << " count = " << count);
+ }
+ }
+ else
+ {
+ //
+ // Zero is to the left of a, so walk downwards
+ // until we find it:
+ //
+ while((boost::math::sign)(fb) == (boost::math::sign)(fa))
+ {
+ if(fabs(a) < tools::min_value<T>())
+ {
+ // Escape route just in case the answer is zero!
+ max_iter -= count;
+ max_iter += 1;
+ return a > 0 ? std::make_pair(T(0), T(a)) : std::make_pair(T(a), T(0));
+ }
+ if(count == 0)
+ return boost::math::detail::pair_from_single(policies::raise_evaluation_error(function, "Unable to bracket root, last nearest value was %1%", a, pol));
+ //
+ // Heuristic: normally it's best not to increase the step sizes as we'll just end up
+ // with a really wide range to search for the root. However, if the initial guess was *really*
+ // bad then we need to speed up the search otherwise we'll take forever if we're orders of
+ // magnitude out. This happens most often if the guess is a small value (say 1) and the result
+ // we're looking for is close to std::numeric_limits<T>::min().
+ //
+ if((max_iter - count) % step == 0)
+ {
+ factor *= 2;
+ if(step > 1) step /= 2;
+ }
+ //
+ // Now go ahead and move are guess by "factor":
+ //
+ b = a;
+ fb = fa;
+ a /= factor;
+ fa = f(a);
+ --count;
+ BOOST_MATH_INSTRUMENT_CODE("a = " << a << " b = " << b << " fa = " << fa << " fb = " << fb << " count = " << count);
+ }
+ }
+ max_iter -= count;
+ max_iter += 1;
+ std::pair<T, T> r = toms748_solve(
+ f,
+ (a < 0 ? b : a),
+ (a < 0 ? a : b),
+ (a < 0 ? fb : fa),
+ (a < 0 ? fa : fb),
+ tol,
+ count,
+ pol);
+ max_iter += count;
+ BOOST_MATH_INSTRUMENT_CODE("max_iter = " << max_iter << " count = " << count);
+ BOOST_MATH_LOG_COUNT(max_iter)
+ return r;
+}
+
+template <class F, class T, class Tol>
+inline std::pair<T, T> bracket_and_solve_root(F f, const T& guess, const T& factor, bool rising, Tol tol, boost::uintmax_t& max_iter)
+{
+ return bracket_and_solve_root(f, guess, factor, rising, tol, max_iter, policies::policy<>());
+}
+
+} // namespace tools
+} // namespace math
+} // namespace boost
+
+
+#endif // BOOST_MATH_TOOLS_SOLVE_ROOT_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/tuple.hpp b/src/third_party/boost-1.69.0/boost/math/tools/tuple.hpp
index 81de59fa3ab..81de59fa3ab 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/math/tools/user.hpp b/src/third_party/boost-1.69.0/boost/math/tools/user.hpp
index 08a7e53d9eb..08a7e53d9eb 100644
--- a/src/third_party/boost-1.68.0/boost/math/tools/user.hpp
+++ b/src/third_party/boost-1.69.0/boost/math/tools/user.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mem_fn.hpp b/src/third_party/boost-1.69.0/boost/mem_fn.hpp
index 3bcd2c548bc..3bcd2c548bc 100644
--- a/src/third_party/boost-1.68.0/boost/mem_fn.hpp
+++ b/src/third_party/boost-1.69.0/boost/mem_fn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/memory_order.hpp b/src/third_party/boost-1.69.0/boost/memory_order.hpp
index 1f7d2027315..1f7d2027315 100644
--- a/src/third_party/boost-1.68.0/boost/memory_order.hpp
+++ b/src/third_party/boost-1.69.0/boost/memory_order.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/adl_move_swap.hpp b/src/third_party/boost-1.69.0/boost/move/adl_move_swap.hpp
index d9096e36c37..d9096e36c37 100644
--- a/src/third_party/boost-1.68.0/boost/move/adl_move_swap.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/adl_move_swap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/adaptive_merge.hpp b/src/third_party/boost-1.69.0/boost/move/algo/adaptive_merge.hpp
index 4de4007e2d7..4de4007e2d7 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/adaptive_merge.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/adaptive_merge.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/adaptive_sort.hpp b/src/third_party/boost-1.69.0/boost/move/algo/adaptive_sort.hpp
index 4f50bf1cff3..4f50bf1cff3 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/adaptive_sort.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/adaptive_sort.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/adaptive_sort_merge.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/adaptive_sort_merge.hpp
index 4c2808622ae..4c2808622ae 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/adaptive_sort_merge.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/adaptive_sort_merge.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/basic_op.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/basic_op.hpp
index ea5faf0e537..ea5faf0e537 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/basic_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/basic_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/heap_sort.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/heap_sort.hpp
index 5474d9f5c42..5474d9f5c42 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/heap_sort.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/heap_sort.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/insertion_sort.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/insertion_sort.hpp
index 5c378c3e36b..5c378c3e36b 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/insertion_sort.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/insertion_sort.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/is_sorted.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/is_sorted.hpp
index d3dccfc2dbd..d3dccfc2dbd 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/is_sorted.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/is_sorted.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/merge.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/merge.hpp
index 860773579c7..860773579c7 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/merge.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/merge.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/merge_sort.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/merge_sort.hpp
index 62d185acb63..62d185acb63 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/merge_sort.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/merge_sort.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/pdqsort.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/pdqsort.hpp
index b6a127896c9..b6a127896c9 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/pdqsort.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/pdqsort.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/detail/set_difference.hpp b/src/third_party/boost-1.69.0/boost/move/algo/detail/set_difference.hpp
index 51d047592af..51d047592af 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/detail/set_difference.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/detail/set_difference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/algo/move.hpp b/src/third_party/boost-1.69.0/boost/move/algo/move.hpp
new file mode 100644
index 00000000000..5d5ba19ea0f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/move/algo/move.hpp
@@ -0,0 +1,156 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2012-2016.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! \file
+
+#ifndef BOOST_MOVE_ALGO_MOVE_HPP
+#define BOOST_MOVE_ALGO_MOVE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/config_begin.hpp>
+
+#include <boost/move/utility_core.hpp>
+#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/move/detail/iterator_to_raw_pointer.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+
+namespace boost {
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
+
+ //! <b>Effects</b>: Moves elements in the range [first,last) into the range [result,result + (last -
+ //! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first),
+ //! performs *(result + n) = ::boost::move (*(first + n)).
+ //!
+ //! <b>Effects</b>: result + (last - first).
+ //!
+ //! <b>Requires</b>: result shall not be in the range [first,last).
+ //!
+ //! <b>Complexity</b>: Exactly last - first move assignments.
+ template <typename I, // I models InputIterator
+ typename O> // O models OutputIterator
+ O move(I f, I l, O result)
+ {
+ while (f != l) {
+ *result = ::boost::move(*f);
+ ++f; ++result;
+ }
+ return result;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // move_backward
+ //
+ //////////////////////////////////////////////////////////////////////////////
+
+ //! <b>Effects</b>: Moves elements in the range [first,last) into the range
+ //! [result - (last-first),result) starting from last - 1 and proceeding to
+ //! first. For each positive integer n <= (last - first),
+ //! performs *(result - n) = ::boost::move(*(last - n)).
+ //!
+ //! <b>Requires</b>: result shall not be in the range [first,last).
+ //!
+ //! <b>Returns</b>: result - (last - first).
+ //!
+ //! <b>Complexity</b>: Exactly last - first assignments.
+ template <typename I, // I models BidirectionalIterator
+ typename O> // O models BidirectionalIterator
+ O move_backward(I f, I l, O result)
+ {
+ while (f != l) {
+ --l; --result;
+ *result = ::boost::move(*l);
+ }
+ return result;
+ }
+
+#else
+
+ using ::std::move_backward;
+
+#endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; first != last; ++result, ++first)
+//! new (static_cast<void*>(&*result))
+//! typename iterator_traits<ForwardIterator>::value_type(boost::move(*first));
+//! \endcode
+//!
+//! <b>Returns</b>: result
+template
+ <typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+F uninitialized_move(I f, I l, F r
+ /// @cond
+// ,typename ::boost::move_detail::enable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0
+ /// @endcond
+ )
+{
+ typedef typename boost::movelib::iterator_traits<I>::value_type input_value_type;
+
+ F back = r;
+ BOOST_TRY{
+ while (f != l) {
+ void * const addr = static_cast<void*>(::boost::move_detail::addressof(*r));
+ ::new(addr) input_value_type(::boost::move(*f));
+ ++f; ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ boost::movelib::iterator_to_raw_pointer(back)->~input_value_type();
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+/// @cond
+/*
+template
+ <typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+F uninitialized_move(I f, I l, F r,
+ typename ::boost::move_detail::disable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0)
+{
+ return std::uninitialized_copy(f, l, r);
+}
+*/
+
+/// @endcond
+
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_MOVE_ALGO_MOVE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/predicate.hpp b/src/third_party/boost-1.69.0/boost/move/algo/predicate.hpp
index 0287d663184..0287d663184 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/predicate.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/predicate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/algo/unique.hpp b/src/third_party/boost-1.69.0/boost/move/algo/unique.hpp
index 8022a654e26..8022a654e26 100644
--- a/src/third_party/boost-1.68.0/boost/move/algo/unique.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/algo/unique.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/algorithm.hpp b/src/third_party/boost-1.69.0/boost/move/algorithm.hpp
new file mode 100644
index 00000000000..880d661e7dd
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/move/algorithm.hpp
@@ -0,0 +1,167 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2012-2012.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! \file
+
+#ifndef BOOST_MOVE_ALGORITHM_HPP
+#define BOOST_MOVE_ALGORITHM_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/config_begin.hpp>
+
+#include <boost/move/utility_core.hpp>
+#include <boost/move/iterator.hpp>
+#include <boost/move/algo/move.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+
+#include <algorithm> //copy, copy_backward
+#include <memory> //uninitialized_copy
+
+namespace boost {
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_copy_or_move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+namespace move_detail {
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline F uninitialized_move_move_iterator(I f, I l, F r
+// ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0
+)
+{
+ return ::boost::uninitialized_move(f, l, r);
+}
+/*
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+F uninitialized_move_move_iterator(I f, I l, F r,
+ typename ::boost::move_detail::disable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0)
+{
+ return std::uninitialized_copy(f.base(), l.base(), r);
+}
+*/
+} //namespace move_detail {
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline F uninitialized_copy_or_move(I f, I l, F r,
+ typename ::boost::move_detail::enable_if< move_detail::is_move_iterator<I> >::type* = 0)
+{
+ return ::boost::move_detail::uninitialized_move_move_iterator(f, l, r);
+}
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// copy_or_move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+namespace move_detail {
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline F move_move_iterator(I f, I l, F r
+// ,typename ::boost::move_detail::enable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0
+)
+{
+ return ::boost::move(f, l, r);
+}
+/*
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+F move_move_iterator(I f, I l, F r,
+ typename ::boost::move_detail::disable_if< has_move_emulation_enabled<typename I::value_type> >::type* = 0)
+{
+ return std::copy(f.base(), l.base(), r);
+}
+*/
+
+} //namespace move_detail {
+
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline F copy_or_move(I f, I l, F r,
+ typename ::boost::move_detail::enable_if< move_detail::is_move_iterator<I> >::type* = 0)
+{
+ return ::boost::move_detail::move_move_iterator(f, l, r);
+}
+
+/// @endcond
+
+//! <b>Effects</b>:
+//! \code
+//! for (; first != last; ++result, ++first)
+//! new (static_cast<void*>(&*result))
+//! typename iterator_traits<ForwardIterator>::value_type(*first);
+//! \endcode
+//!
+//! <b>Returns</b>: result
+//!
+//! <b>Note</b>: This function is provided because
+//! <i>std::uninitialized_copy</i> from some STL implementations
+//! is not compatible with <i>move_iterator</i>
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline F uninitialized_copy_or_move(I f, I l, F r
+ /// @cond
+ ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator<I> >::type* = 0
+ /// @endcond
+ )
+{
+ return std::uninitialized_copy(f, l, r);
+}
+
+//! <b>Effects</b>:
+//! \code
+//! for (; first != last; ++result, ++first)
+//! *result = *first;
+//! \endcode
+//!
+//! <b>Returns</b>: result
+//!
+//! <b>Note</b>: This function is provided because
+//! <i>std::uninitialized_copy</i> from some STL implementations
+//! is not compatible with <i>move_iterator</i>
+template
+<typename I, // I models InputIterator
+typename F> // F models ForwardIterator
+inline F copy_or_move(I f, I l, F r
+ /// @cond
+ ,typename ::boost::move_detail::disable_if< move_detail::is_move_iterator<I> >::type* = 0
+ /// @endcond
+ )
+{
+ return std::copy(f, l, r);
+}
+
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_MOVE_ALGORITHM_HPP
diff --git a/src/third_party/boost-1.69.0/boost/move/core.hpp b/src/third_party/boost-1.69.0/boost/move/core.hpp
new file mode 100644
index 00000000000..b34740dcf83
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/move/core.hpp
@@ -0,0 +1,494 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2012-2012.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! \file
+//! This header implements macros to define movable classes and
+//! move-aware functions
+
+#ifndef BOOST_MOVE_CORE_HPP
+#define BOOST_MOVE_CORE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp>
+
+// @cond
+
+//boost_move_no_copy_constructor_or_assign typedef
+//used to detect noncopyable types for other Boost libraries.
+#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \
+ private:\
+ TYPE(TYPE &);\
+ TYPE& operator=(TYPE &);\
+ public:\
+ typedef int boost_move_no_copy_constructor_or_assign; \
+ private:\
+ //
+#else
+ #define BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE) \
+ public:\
+ TYPE(TYPE const &) = delete;\
+ TYPE& operator=(TYPE const &) = delete;\
+ public:\
+ typedef int boost_move_no_copy_constructor_or_assign; \
+ private:\
+ //
+#endif //BOOST_NO_CXX11_DELETED_FUNCTIONS
+
+// @endcond
+
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+ #include <boost/move/detail/type_traits.hpp>
+
+ #define BOOST_MOVE_TO_RV_CAST(RV_TYPE, ARG) reinterpret_cast<RV_TYPE>(ARG)
+
+ //Move emulation rv breaks standard aliasing rules so add workarounds for some compilers
+ #if defined(BOOST_GCC) && (BOOST_GCC >= 40400) && (BOOST_GCC < 40500)
+ #define BOOST_RV_ATTRIBUTE_MAY_ALIAS BOOST_MAY_ALIAS
+ #else
+ #define BOOST_RV_ATTRIBUTE_MAY_ALIAS
+ #endif
+
+ namespace boost {
+
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // struct rv
+ //
+ //////////////////////////////////////////////////////////////////////////////
+ template <class T>
+ class BOOST_RV_ATTRIBUTE_MAY_ALIAS rv
+ : public ::boost::move_detail::if_c
+ < ::boost::move_detail::is_class<T>::value
+ , T
+ , ::boost::move_detail::nat
+ >::type
+ {
+ rv();
+ ~rv() throw();
+ rv(rv const&);
+ void operator=(rv const&);
+ };
+
+
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // is_rv
+ //
+ //////////////////////////////////////////////////////////////////////////////
+
+ namespace move_detail {
+
+ template <class T>
+ struct is_rv
+ //Derive from integral constant because some Boost code assummes it has
+ //a "type" internal typedef
+ : integral_constant<bool, ::boost::move_detail::is_rv_impl<T>::value >
+ {};
+
+ template <class T>
+ struct is_not_rv
+ {
+ static const bool value = !is_rv<T>::value;
+ };
+
+ } //namespace move_detail {
+
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // has_move_emulation_enabled
+ //
+ //////////////////////////////////////////////////////////////////////////////
+ template<class T>
+ struct has_move_emulation_enabled
+ : ::boost::move_detail::has_move_emulation_enabled_impl<T>
+ {};
+
+ template<class T>
+ struct has_move_emulation_disabled
+ {
+ static const bool value = !::boost::move_detail::has_move_emulation_enabled_impl<T>::value;
+ };
+
+ } //namespace boost {
+
+ #define BOOST_RV_REF(TYPE)\
+ ::boost::rv< TYPE >& \
+ //
+
+ #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
+ ::boost::rv< TYPE<ARG1, ARG2> >& \
+ //
+
+ #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
+ ::boost::rv< TYPE<ARG1, ARG2, ARG3> >& \
+ //
+
+ #define BOOST_RV_REF_BEG\
+ ::boost::rv< \
+ //
+
+ #define BOOST_RV_REF_END\
+ >& \
+ //
+
+ #define BOOST_RV_REF_BEG_IF_CXX11 \
+ \
+ //
+
+ #define BOOST_RV_REF_END_IF_CXX11 \
+ \
+ //
+
+ #define BOOST_FWD_REF(TYPE)\
+ const TYPE & \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF(TYPE)\
+ const ::boost::rv< TYPE >& \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF_BEG \
+ const ::boost::rv< \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF_END \
+ >& \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
+ const ::boost::rv< TYPE<ARG1, ARG2> >& \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
+ const ::boost::rv< TYPE<ARG1, ARG2, ARG3> >& \
+ //
+
+ #define BOOST_CATCH_CONST_RLVALUE(TYPE)\
+ const ::boost::rv< TYPE >& \
+ //
+
+ namespace boost {
+ namespace move_detail {
+
+ template <class Ret, class T>
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
+ < ::boost::move_detail::is_lvalue_reference<Ret>::value ||
+ !::boost::has_move_emulation_enabled<T>::value
+ , T&>::type
+ move_return(T& x) BOOST_NOEXCEPT
+ {
+ return x;
+ }
+
+ template <class Ret, class T>
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
+ < !::boost::move_detail::is_lvalue_reference<Ret>::value &&
+ ::boost::has_move_emulation_enabled<T>::value
+ , ::boost::rv<T>&>::type
+ move_return(T& x) BOOST_NOEXCEPT
+ {
+ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<T>*, ::boost::move_detail::addressof(x));
+ }
+
+ template <class Ret, class T>
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
+ < !::boost::move_detail::is_lvalue_reference<Ret>::value &&
+ ::boost::has_move_emulation_enabled<T>::value
+ , ::boost::rv<T>&>::type
+ move_return(::boost::rv<T>& x) BOOST_NOEXCEPT
+ {
+ return x;
+ }
+
+ } //namespace move_detail {
+ } //namespace boost {
+
+ #define BOOST_MOVE_RET(RET_TYPE, REF)\
+ boost::move_detail::move_return< RET_TYPE >(REF)
+ //
+
+ #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \
+ ::boost::move((BASE_TYPE&)(ARG))
+ //
+
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // BOOST_MOVABLE_BUT_NOT_COPYABLE
+ //
+ //////////////////////////////////////////////////////////////////////////////
+ #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
+ BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
+ public:\
+ BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
+ { return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
+ BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
+ { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
+ private:\
+ //
+
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // BOOST_COPYABLE_AND_MOVABLE
+ //
+ //////////////////////////////////////////////////////////////////////////////
+
+ #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
+ public:\
+ BOOST_MOVE_FORCEINLINE TYPE& operator=(TYPE &t)\
+ { this->operator=(const_cast<const TYPE&>(t)); return *this;}\
+ public:\
+ BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
+ { return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
+ BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
+ { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
+ private:\
+ //
+
+ #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
+ public:\
+ BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
+ { return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
+ BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
+ { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
+ private:\
+ //
+
+ namespace boost{
+ namespace move_detail{
+
+ template< class T>
+ struct forward_type
+ { typedef const T &type; };
+
+ template< class T>
+ struct forward_type< boost::rv<T> >
+ { typedef T type; };
+
+ }}
+
+#else //BOOST_NO_CXX11_RVALUE_REFERENCES
+
+ //! This macro marks a type as movable but not copyable, disabling copy construction
+ //! and assignment. The user will need to write a move constructor/assignment as explained
+ //! in the documentation to fully write a movable but not copyable class.
+ #define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
+ BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
+ public:\
+ typedef int boost_move_emulation_t;\
+ private:\
+ //
+
+ //! This macro marks a type as copyable and movable.
+ //! The user will need to write a move constructor/assignment and a copy assignment
+ //! as explained in the documentation to fully write a copyable and movable class.
+ #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
+ //
+
+ #if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+ #define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
+ //
+ #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+ namespace boost {
+
+ //!This trait yields to a compile-time true boolean if T was marked as
+ //!BOOST_MOVABLE_BUT_NOT_COPYABLE or BOOST_COPYABLE_AND_MOVABLE and
+ //!rvalue references are not available on the platform. False otherwise.
+ template<class T>
+ struct has_move_emulation_enabled
+ {
+ static const bool value = false;
+ };
+
+ template<class T>
+ struct has_move_emulation_disabled
+ {
+ static const bool value = true;
+ };
+
+ } //namespace boost{
+
+ //!This macro is used to achieve portable syntax in move
+ //!constructors and assignments for classes marked as
+ //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE
+ #define BOOST_RV_REF(TYPE)\
+ TYPE && \
+ //
+
+ //!This macro is used to achieve portable syntax in move
+ //!constructors and assignments for template classes marked as
+ //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE.
+ //!As macros have problems with comma-separated template arguments,
+ //!the template argument must be preceded with BOOST_RV_REF_BEG
+ //!and ended with BOOST_RV_REF_END
+ #define BOOST_RV_REF_BEG\
+ \
+ //
+
+ //!This macro is used to achieve portable syntax in move
+ //!constructors and assignments for template classes marked as
+ //!BOOST_COPYABLE_AND_MOVABLE or BOOST_MOVABLE_BUT_NOT_COPYABLE.
+ //!As macros have problems with comma-separated template arguments,
+ //!the template argument must be preceded with BOOST_RV_REF_BEG
+ //!and ended with BOOST_RV_REF_END
+ #define BOOST_RV_REF_END\
+ && \
+ //
+
+ //!This macro expands to BOOST_RV_REF_BEG if BOOST_NO_CXX11_RVALUE_REFERENCES
+ //!is not defined, empty otherwise
+ #define BOOST_RV_REF_BEG_IF_CXX11 \
+ BOOST_RV_REF_BEG \
+ //
+
+ //!This macro expands to BOOST_RV_REF_END if BOOST_NO_CXX11_RVALUE_REFERENCES
+ //!is not defined, empty otherwise
+ #define BOOST_RV_REF_END_IF_CXX11 \
+ BOOST_RV_REF_END \
+ //
+
+ //!This macro is used to achieve portable syntax in copy
+ //!assignment for classes marked as BOOST_COPYABLE_AND_MOVABLE.
+ #define BOOST_COPY_ASSIGN_REF(TYPE)\
+ const TYPE & \
+ //
+
+ //! This macro is used to implement portable perfect forwarding
+ //! as explained in the documentation.
+ #define BOOST_FWD_REF(TYPE)\
+ TYPE && \
+ //
+
+ #if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+ #define BOOST_RV_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
+ TYPE<ARG1, ARG2> && \
+ //
+
+ #define BOOST_RV_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
+ TYPE<ARG1, ARG2, ARG3> && \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF_BEG \
+ const \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF_END \
+ & \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF_2_TEMPL_ARGS(TYPE, ARG1, ARG2)\
+ const TYPE<ARG1, ARG2> & \
+ //
+
+ #define BOOST_COPY_ASSIGN_REF_3_TEMPL_ARGS(TYPE, ARG1, ARG2, ARG3)\
+ const TYPE<ARG1, ARG2, ARG3>& \
+ //
+
+ #define BOOST_CATCH_CONST_RLVALUE(TYPE)\
+ const TYPE & \
+ //
+
+ #endif //#if !defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+ #if !defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+ //!This macro is used to achieve portable move return semantics.
+ //!The C++11 Standard allows implicit move returns when the object to be returned
+ //!is designated by a lvalue and:
+ //! - The criteria for elision of a copy operation are met OR
+ //! - The criteria would be met save for the fact that the source object is a function parameter
+ //!
+ //!For C++11 conforming compilers this macros only yields to REF:
+ //! <code>return BOOST_MOVE_RET(RET_TYPE, REF);</code> -> <code>return REF;</code>
+ //!
+ //!For compilers without rvalue references
+ //!this macro does an explicit move if the move emulation is activated
+ //!and the return type (RET_TYPE) is not a reference.
+ //!
+ //!For non-conforming compilers with rvalue references like Visual 2010 & 2012,
+ //!an explicit move is performed if RET_TYPE is not a reference.
+ //!
+ //! <b>Caution</b>: When using this macro in non-conforming or C++03
+ //!compilers, a move will be performed even if the C++11 standard does not allow it
+ //!(e.g. returning a static variable). The user is responsible for using this macro
+ //!only to return local objects that met C++11 criteria.
+ #define BOOST_MOVE_RET(RET_TYPE, REF)\
+ REF
+ //
+
+ #else //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+ #include <boost/move/detail/meta_utils.hpp>
+
+ namespace boost {
+ namespace move_detail {
+
+ template <class Ret, class T>
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
+ < ::boost::move_detail::is_lvalue_reference<Ret>::value
+ , T&>::type
+ move_return(T& x) BOOST_NOEXCEPT
+ {
+ return x;
+ }
+
+ template <class Ret, class T>
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
+ < !::boost::move_detail::is_lvalue_reference<Ret>::value
+ , Ret && >::type
+ move_return(T&& t) BOOST_NOEXCEPT
+ {
+ return static_cast< Ret&& >(t);
+ }
+
+ } //namespace move_detail {
+ } //namespace boost {
+
+ #define BOOST_MOVE_RET(RET_TYPE, REF)\
+ boost::move_detail::move_return< RET_TYPE >(REF)
+ //
+
+ #endif //!defined(BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG) || defined(BOOST_MOVE_DOXYGEN_INVOKED)
+
+ //!This macro is used to achieve portable optimal move constructors.
+ //!
+ //!When implementing the move constructor, in C++03 compilers the moved-from argument must be
+ //!cast to the base type before calling `::boost::move()` due to rvalue reference limitations.
+ //!
+ //!In C++11 compilers the cast from a rvalue reference of a derived type to a rvalue reference of
+ //!a base type is implicit.
+ #define BOOST_MOVE_BASE(BASE_TYPE, ARG) \
+ ::boost::move((BASE_TYPE&)(ARG))
+ //
+
+ namespace boost {
+ namespace move_detail {
+
+ template< class T> struct forward_type { typedef T type; };
+
+ }}
+
+#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_MOVE_CORE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/move/default_delete.hpp b/src/third_party/boost-1.69.0/boost/move/default_delete.hpp
index 31ae67aa07c..31ae67aa07c 100644
--- a/src/third_party/boost-1.68.0/boost/move/default_delete.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/default_delete.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/config_begin.hpp b/src/third_party/boost-1.69.0/boost/move/detail/config_begin.hpp
index 637eb158bd1..637eb158bd1 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/config_begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/config_begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/config_end.hpp b/src/third_party/boost-1.69.0/boost/move/detail/config_end.hpp
index 71a99e93c9d..71a99e93c9d 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/config_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/config_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/destruct_n.hpp b/src/third_party/boost-1.69.0/boost/move/detail/destruct_n.hpp
index 9f60fc2773a..9f60fc2773a 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/destruct_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/destruct_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/fwd_macros.hpp b/src/third_party/boost-1.69.0/boost/move/detail/fwd_macros.hpp
index a5df5f1be78..a5df5f1be78 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/fwd_macros.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/fwd_macros.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/iterator_to_raw_pointer.hpp b/src/third_party/boost-1.69.0/boost/move/detail/iterator_to_raw_pointer.hpp
index 97ee3a65955..97ee3a65955 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/iterator_to_raw_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/iterator_to_raw_pointer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/iterator_traits.hpp b/src/third_party/boost-1.69.0/boost/move/detail/iterator_traits.hpp
index 5ffcb2cf056..5ffcb2cf056 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/iterator_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/iterator_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/meta_utils.hpp b/src/third_party/boost-1.69.0/boost/move/detail/meta_utils.hpp
new file mode 100644
index 00000000000..f16e185d6df
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/move/detail/meta_utils.hpp
@@ -0,0 +1,587 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2012-2015.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! \file
+
+#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
+#define BOOST_MOVE_DETAIL_META_UTILS_HPP
+
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp> //forceinline
+#include <boost/move/detail/meta_utils_core.hpp>
+#include <cstddef> //for std::size_t
+
+//Small meta-typetraits to support move
+
+namespace boost {
+
+//Forward declare boost::rv
+template <class T> class rv;
+
+namespace move_detail {
+
+//////////////////////////////////////
+// is_different
+//////////////////////////////////////
+template<class T, class U>
+struct is_different
+{
+ static const bool value = !is_same<T, U>::value;
+};
+
+//////////////////////////////////////
+// apply
+//////////////////////////////////////
+template<class F, class Param>
+struct apply
+{
+ typedef typename F::template apply<Param>::type type;
+};
+
+//////////////////////////////////////
+// bool_
+//////////////////////////////////////
+
+template< bool C_ >
+struct bool_ : integral_constant<bool, C_>
+{
+ operator bool() const { return C_; }
+ bool operator()() const { return C_; }
+};
+
+typedef bool_<true> true_;
+typedef bool_<false> false_;
+
+//////////////////////////////////////
+// nat
+//////////////////////////////////////
+struct nat{};
+struct nat2{};
+struct nat3{};
+
+//////////////////////////////////////
+// yes_type/no_type
+//////////////////////////////////////
+typedef char yes_type;
+
+struct no_type
+{
+ char _[2];
+};
+
+//////////////////////////////////////
+// natify
+//////////////////////////////////////
+template <class T> struct natify{};
+
+//////////////////////////////////////
+// remove_reference
+//////////////////////////////////////
+template<class T>
+struct remove_reference
+{
+ typedef T type;
+};
+
+template<class T>
+struct remove_reference<T&>
+{
+ typedef T type;
+};
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template<class T>
+struct remove_reference<T&&>
+{
+ typedef T type;
+};
+
+#else
+
+template<class T>
+struct remove_reference< rv<T> >
+{
+ typedef T type;
+};
+
+template<class T>
+struct remove_reference< rv<T> &>
+{
+ typedef T type;
+};
+
+template<class T>
+struct remove_reference< const rv<T> &>
+{
+ typedef T type;
+};
+
+#endif
+
+//////////////////////////////////////
+// remove_pointer
+//////////////////////////////////////
+
+template< class T > struct remove_pointer { typedef T type; };
+template< class T > struct remove_pointer<T*> { typedef T type; };
+template< class T > struct remove_pointer<T* const> { typedef T type; };
+template< class T > struct remove_pointer<T* volatile> { typedef T type; };
+template< class T > struct remove_pointer<T* const volatile> { typedef T type; };
+
+//////////////////////////////////////
+// add_pointer
+//////////////////////////////////////
+template< class T >
+struct add_pointer
+{
+ typedef typename remove_reference<T>::type* type;
+};
+
+//////////////////////////////////////
+// add_const
+//////////////////////////////////////
+template<class T>
+struct add_const
+{
+ typedef const T type;
+};
+
+template<class T>
+struct add_const<T&>
+{
+ typedef const T& type;
+};
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template<class T>
+struct add_const<T&&>
+{
+ typedef T&& type;
+};
+
+#endif
+
+//////////////////////////////////////
+// add_lvalue_reference
+//////////////////////////////////////
+template<class T>
+struct add_lvalue_reference
+{ typedef T& type; };
+
+template<class T> struct add_lvalue_reference<T&> { typedef T& type; };
+template<> struct add_lvalue_reference<void> { typedef void type; };
+template<> struct add_lvalue_reference<const void> { typedef const void type; };
+template<> struct add_lvalue_reference<volatile void> { typedef volatile void type; };
+template<> struct add_lvalue_reference<const volatile void>{ typedef const volatile void type; };
+
+template<class T>
+struct add_const_lvalue_reference
+{
+ typedef typename remove_reference<T>::type t_unreferenced;
+ typedef typename add_const<t_unreferenced>::type t_unreferenced_const;
+ typedef typename add_lvalue_reference
+ <t_unreferenced_const>::type type;
+};
+
+//////////////////////////////////////
+// is_lvalue_reference
+//////////////////////////////////////
+template<class T>
+struct is_lvalue_reference
+{
+ static const bool value = false;
+};
+
+template<class T>
+struct is_lvalue_reference<T&>
+{
+ static const bool value = true;
+};
+
+
+//////////////////////////////////////
+// identity
+//////////////////////////////////////
+template <class T>
+struct identity
+{
+ typedef T type;
+ typedef typename add_const_lvalue_reference<T>::type reference;
+ reference operator()(reference t)
+ { return t; }
+};
+
+//////////////////////////////////////
+// is_class_or_union
+//////////////////////////////////////
+template<class T>
+struct is_class_or_union
+{
+ struct twochar { char dummy[2]; };
+ template <class U>
+ static char is_class_or_union_tester(void(U::*)(void));
+ template <class U>
+ static twochar is_class_or_union_tester(...);
+ static const bool value = sizeof(is_class_or_union_tester<T>(0)) == sizeof(char);
+};
+
+//////////////////////////////////////
+// addressof
+//////////////////////////////////////
+template<class T>
+struct addr_impl_ref
+{
+ T & v_;
+ BOOST_MOVE_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {}
+ BOOST_MOVE_FORCEINLINE operator T& () const { return v_; }
+
+ private:
+ addr_impl_ref & operator=(const addr_impl_ref &);
+};
+
+template<class T>
+struct addressof_impl
+{
+ BOOST_MOVE_FORCEINLINE static T * f( T & v, long )
+ {
+ return reinterpret_cast<T*>(
+ &const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
+ }
+
+ BOOST_MOVE_FORCEINLINE static T * f( T * v, int )
+ { return v; }
+};
+
+template<class T>
+BOOST_MOVE_FORCEINLINE T * addressof( T & v )
+{
+ return ::boost::move_detail::addressof_impl<T>::f
+ ( ::boost::move_detail::addr_impl_ref<T>( v ), 0 );
+}
+
+//////////////////////////////////////
+// has_pointer_type
+//////////////////////////////////////
+template <class T>
+struct has_pointer_type
+{
+ struct two { char c[2]; };
+ template <class U> static two test(...);
+ template <class U> static char test(typename U::pointer* = 0);
+ static const bool value = sizeof(test<T>(0)) == 1;
+};
+
+//////////////////////////////////////
+// is_convertible
+//////////////////////////////////////
+#if defined(_MSC_VER) && (_MSC_VER >= 1400)
+
+//use intrinsic since in MSVC
+//overaligned types can't go through ellipsis
+template <class T, class U>
+struct is_convertible
+{
+ static const bool value = __is_convertible_to(T, U);
+};
+
+#else
+
+template <class T, class U>
+class is_convertible
+{
+ typedef typename add_lvalue_reference<T>::type t_reference;
+ typedef char true_t;
+ class false_t { char dummy[2]; };
+ static false_t dispatch(...);
+ static true_t dispatch(U);
+ static t_reference trigger();
+ public:
+ static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t);
+};
+
+#endif
+
+template <class T, class U, bool IsSame = is_same<T, U>::value>
+struct is_same_or_convertible
+ : is_convertible<T, U>
+{};
+
+template <class T, class U>
+struct is_same_or_convertible<T, U, true>
+{
+ static const bool value = true;
+};
+
+template<
+ bool C
+ , typename F1
+ , typename F2
+ >
+struct eval_if_c
+ : if_c<C,F1,F2>::type
+{};
+
+template<
+ typename C
+ , typename T1
+ , typename T2
+ >
+struct eval_if
+ : if_<C,T1,T2>::type
+{};
+
+
+#if defined(BOOST_GCC) && (BOOST_GCC <= 40000)
+#define BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN
+#endif
+
+template<class T, class U, class R = void>
+struct enable_if_convertible
+ : enable_if< is_convertible<T, U>, R>
+{};
+
+template<class T, class U, class R = void>
+struct disable_if_convertible
+ : disable_if< is_convertible<T, U>, R>
+{};
+
+template<class T, class U, class R = void>
+struct enable_if_same_or_convertible
+ : enable_if< is_same_or_convertible<T, U>, R>
+{};
+
+template<class T, class U, class R = void>
+struct disable_if_same_or_convertible
+ : disable_if< is_same_or_convertible<T, U>, R>
+{};
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// and_
+//
+//////////////////////////////////////////////////////////////////////////////
+template<bool, class B = true_, class C = true_, class D = true_>
+struct and_impl
+ : and_impl<B::value, C, D>
+{};
+
+template<>
+struct and_impl<true, true_, true_, true_>
+{
+ static const bool value = true;
+};
+
+template<class B, class C, class D>
+struct and_impl<false, B, C, D>
+{
+ static const bool value = false;
+};
+
+template<class A, class B, class C = true_, class D = true_>
+struct and_
+ : and_impl<A::value, B, C, D>
+{};
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// or_
+//
+//////////////////////////////////////////////////////////////////////////////
+template<bool, class B = false_, class C = false_, class D = false_>
+struct or_impl
+ : or_impl<B::value, C, D>
+{};
+
+template<>
+struct or_impl<false, false_, false_, false_>
+{
+ static const bool value = false;
+};
+
+template<class B, class C, class D>
+struct or_impl<true, B, C, D>
+{
+ static const bool value = true;
+};
+
+template<class A, class B, class C = false_, class D = false_>
+struct or_
+ : or_impl<A::value, B, C, D>
+{};
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// not_
+//
+//////////////////////////////////////////////////////////////////////////////
+template<class T>
+struct not_
+{
+ static const bool value = !T::value;
+};
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// enable_if_and / disable_if_and / enable_if_or / disable_if_or
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template<class R, class A, class B, class C = true_, class D = true_>
+struct enable_if_and
+ : enable_if_c< and_<A, B, C, D>::value, R>
+{};
+
+template<class R, class A, class B, class C = true_, class D = true_>
+struct disable_if_and
+ : disable_if_c< and_<A, B, C, D>::value, R>
+{};
+
+template<class R, class A, class B, class C = false_, class D = false_>
+struct enable_if_or
+ : enable_if_c< or_<A, B, C, D>::value, R>
+{};
+
+template<class R, class A, class B, class C = false_, class D = false_>
+struct disable_if_or
+ : disable_if_c< or_<A, B, C, D>::value, R>
+{};
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// has_move_emulation_enabled_impl
+//
+//////////////////////////////////////////////////////////////////////////////
+template<class T>
+struct has_move_emulation_enabled_impl
+ : is_convertible< T, ::boost::rv<T>& >
+{};
+
+template<class T>
+struct has_move_emulation_enabled_impl<T&>
+{ static const bool value = false; };
+
+template<class T>
+struct has_move_emulation_enabled_impl< ::boost::rv<T> >
+{ static const bool value = false; };
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// is_rv_impl
+//
+//////////////////////////////////////////////////////////////////////////////
+
+template <class T>
+struct is_rv_impl
+{ static const bool value = false; };
+
+template <class T>
+struct is_rv_impl< rv<T> >
+{ static const bool value = true; };
+
+template <class T>
+struct is_rv_impl< const rv<T> >
+{ static const bool value = true; };
+
+// Code from Jeffrey Lee Hellrung, many thanks
+
+template< class T >
+struct is_rvalue_reference
+{ static const bool value = false; };
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template< class T >
+struct is_rvalue_reference< T&& >
+{ static const bool value = true; };
+
+#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template< class T >
+struct is_rvalue_reference< boost::rv<T>& >
+{ static const bool value = true; };
+
+template< class T >
+struct is_rvalue_reference< const boost::rv<T>& >
+{ static const bool value = true; };
+
+#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template< class T >
+struct add_rvalue_reference
+{ typedef T&& type; };
+
+#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+namespace detail_add_rvalue_reference
+{
+ template< class T
+ , bool emulation = has_move_emulation_enabled_impl<T>::value
+ , bool rv = is_rv_impl<T>::value >
+ struct add_rvalue_reference_impl { typedef T type; };
+
+ template< class T, bool emulation>
+ struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; };
+
+ template< class T, bool rv >
+ struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv<T>& type; };
+} // namespace detail_add_rvalue_reference
+
+template< class T >
+struct add_rvalue_reference
+ : detail_add_rvalue_reference::add_rvalue_reference_impl<T>
+{ };
+
+template< class T >
+struct add_rvalue_reference<T &>
+{ typedef T & type; };
+
+#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+template< class T > struct remove_rvalue_reference { typedef T type; };
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template< class T > struct remove_rvalue_reference< T&& > { typedef T type; };
+#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template< class T > struct remove_rvalue_reference< rv<T> > { typedef T type; };
+ template< class T > struct remove_rvalue_reference< const rv<T> > { typedef T type; };
+ template< class T > struct remove_rvalue_reference< volatile rv<T> > { typedef T type; };
+ template< class T > struct remove_rvalue_reference< const volatile rv<T> > { typedef T type; };
+ template< class T > struct remove_rvalue_reference< rv<T>& > { typedef T type; };
+ template< class T > struct remove_rvalue_reference< const rv<T>& > { typedef T type; };
+ template< class T > struct remove_rvalue_reference< volatile rv<T>& > { typedef T type; };
+ template< class T > struct remove_rvalue_reference< const volatile rv<T>& >{ typedef T type; };
+#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+
+// Ideas from Boost.Move review, Jeffrey Lee Hellrung:
+//
+//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ?
+// Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue
+// references the same as wrt real rvalue references, i.e., add_reference< rv<T>& > -> T& rather than
+// rv<T>& (since T&& & -> T&).
+//
+//- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...?
+//
+//- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated
+// rvalue references in C++03. This may be necessary to prevent "accidental moves".
+
+} //namespace move_detail {
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/meta_utils_core.hpp b/src/third_party/boost-1.69.0/boost/move/detail/meta_utils_core.hpp
index 40dbb6efc3d..40dbb6efc3d 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/meta_utils_core.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/meta_utils_core.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/move_helpers.hpp b/src/third_party/boost-1.69.0/boost/move/detail/move_helpers.hpp
index 17138444d1d..17138444d1d 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/move_helpers.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/move_helpers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/placement_new.hpp b/src/third_party/boost-1.69.0/boost/move/detail/placement_new.hpp
index 69d33328cfe..69d33328cfe 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/placement_new.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/placement_new.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/pointer_element.hpp b/src/third_party/boost-1.69.0/boost/move/detail/pointer_element.hpp
index ecdd6080ce0..ecdd6080ce0 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/pointer_element.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/pointer_element.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/reverse_iterator.hpp b/src/third_party/boost-1.69.0/boost/move/detail/reverse_iterator.hpp
index 73f59ce79f1..73f59ce79f1 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/reverse_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/reverse_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/std_ns_begin.hpp b/src/third_party/boost-1.69.0/boost/move/detail/std_ns_begin.hpp
index a768e61a15e..a768e61a15e 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/std_ns_begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/std_ns_begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/std_ns_end.hpp b/src/third_party/boost-1.69.0/boost/move/detail/std_ns_end.hpp
index 097505995bb..097505995bb 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/std_ns_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/std_ns_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/to_raw_pointer.hpp b/src/third_party/boost-1.69.0/boost/move/detail/to_raw_pointer.hpp
index 7e89beb4db0..7e89beb4db0 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/to_raw_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/to_raw_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/move/detail/type_traits.hpp b/src/third_party/boost-1.69.0/boost/move/detail/type_traits.hpp
new file mode 100644
index 00000000000..8432ca22830
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/move/detail/type_traits.hpp
@@ -0,0 +1,1086 @@
+//////////////////////////////////////////////////////////////////////////////
+// (C) Copyright John Maddock 2000.
+// (C) Copyright Ion Gaztanaga 2005-2015.
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+// The alignment and Type traits implementation comes from
+// John Maddock's TypeTraits library.
+//
+// Some other tricks come from Howard Hinnant's papers and StackOverflow replies
+//////////////////////////////////////////////////////////////////////////////
+#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP
+#define BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp>
+
+// move/detail
+#include <boost/move/detail/meta_utils.hpp>
+// other
+#include <boost/assert.hpp>
+#include <boost/static_assert.hpp>
+// std
+#include <cstddef>
+
+//Use of Boost.TypeTraits leads to long preprocessed source code due to
+//MPL dependencies. We'll use intrinsics directly and make or own
+//simplified version of TypeTraits.
+//If someday Boost.TypeTraits dependencies are minimized, we should
+//revisit this file redirecting code to Boost.TypeTraits traits.
+
+//These traits don't care about volatile, reference or other checks
+//made by Boost.TypeTraits because no volatile or reference types
+//can be hold in Boost.Containers. This helps to avoid any Boost.TypeTraits
+//dependency.
+
+// Helper macros for builtin compiler support.
+// If your compiler has builtin support for any of the following
+// traits concepts, then redefine the appropriate macros to pick
+// up on the compiler support:
+//
+// (these should largely ignore cv-qualifiers)
+// BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type
+// BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
+// BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
+// (Note: this trait does not guarantee T is copy constructible, the copy constructor could be deleted but still be trivial)
+// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy
+// BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
+// (Note: this trait does not guarantee T is assignable , the copy assignmen could be deleted but still be trivial)
+// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy
+// BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
+// BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw
+// BOOST_MOVE_HAS_NOTHROW_COPY(T) should evaluate to true if T(t) can not throw
+// BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) should evaluate to true if t = u can not throw
+// BOOST_MOVE_IS_ENUM(T) should evaluate to true it t is a union type.
+//
+// The following can also be defined: when detected our implementation is greatly simplified.
+//
+// BOOST_ALIGNMENT_OF(T) should evaluate to the alignment requirements of type T.
+
+#if defined(__MSL_CPP__) && (__MSL_CPP__ >= 0x8000)
+ // Metrowerks compiler is acquiring intrinsic type traits support
+ // post version 8. We hook into the published interface to pick up
+ // user defined specializations as well as compiler intrinsics as
+ // and when they become available:
+# include <msl_utility>
+# define BOOST_MOVE_IS_UNION(T) BOOST_STD_EXTENSION_NAMESPACE::is_union<T>::value
+# define BOOST_MOVE_IS_POD(T) BOOST_STD_EXTENSION_NAMESPACE::is_POD<T>::value
+# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_default_ctor<T>::value
+# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_copy_ctor<T>::value
+# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_assignment<T>::value
+# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) BOOST_STD_EXTENSION_NAMESPACE::has_trivial_dtor<T>::value
+#endif
+
+#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\
+ || (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500))
+# define BOOST_MOVE_IS_UNION(T) __is_union(T)
+# define BOOST_MOVE_IS_POD(T) (__is_pod(T) && __has_trivial_constructor(T))
+# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
+# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
+# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T)|| ::boost::move_detail::is_pod<T>::value)
+# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) || ::boost::move_detail::is_pod<T>::value)
+# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) || ::boost::move_detail::is_pod<T>::value)
+# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) || ::boost::move_detail::is_trivially_default_constructible<T>::value)
+# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T) || ::boost::move_detail::is_trivially_copy_constructible<T>::value)
+# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T) || ::boost::move_detail::is_trivially_copy_assignable<T>::value)
+
+# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
+# if defined(_MSC_VER) && (_MSC_VER >= 1700)
+# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__has_trivial_move_constructor(T) || ::boost::move_detail::is_pod<T>::value)
+# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) (__has_trivial_move_assign(T) || ::boost::move_detail::is_pod<T>::value)
+# endif
+#endif
+
+#if defined(BOOST_CLANG) && defined(__has_feature)
+
+# if __has_feature(is_union)
+# define BOOST_MOVE_IS_UNION(T) __is_union(T)
+# endif
+# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_pod)
+# define BOOST_MOVE_IS_POD(T) __is_pod(T)
+# endif
+# if (!defined(__GLIBCXX__) || (__GLIBCXX__ >= 20080306 && __GLIBCXX__ != 20080519)) && __has_feature(is_empty)
+# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
+# endif
+# if __has_feature(has_trivial_constructor)
+# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
+# endif
+# if __has_feature(has_trivial_copy)
+# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
+# endif
+# if __has_feature(has_trivial_assign)
+# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) )
+# endif
+# if __has_feature(has_trivial_destructor)
+# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
+# endif
+# if __has_feature(has_nothrow_constructor)
+# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
+# endif
+# if __has_feature(has_nothrow_copy)
+# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T))
+# endif
+# if __has_feature(is_nothrow_copy_assignable)
+# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T))
+# endif
+# if __has_feature(is_enum)
+# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
+# endif
+# if __has_feature(has_trivial_move_constructor)
+# define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T)
+# endif
+# if __has_feature(has_trivial_move_assign)
+# define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T)
+# endif
+# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof(T)
+#endif
+
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG)
+
+#ifdef BOOST_INTEL
+# define BOOST_MOVE_INTEL_TT_OPTS || ::boost::move_detail::is_pod<T>::value
+#else
+# define BOOST_MOVE_INTEL_TT_OPTS
+#endif
+
+# define BOOST_MOVE_IS_UNION(T) __is_union(T)
+# define BOOST_MOVE_IS_POD(T) __is_pod(T)
+# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
+# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) ((__has_trivial_constructor(T) BOOST_MOVE_INTEL_TT_OPTS))
+# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) ((__has_trivial_copy(T) BOOST_MOVE_INTEL_TT_OPTS))
+# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) ((__has_trivial_assign(T) BOOST_MOVE_INTEL_TT_OPTS) )
+# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T) BOOST_MOVE_INTEL_TT_OPTS)
+# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_constructor(T) BOOST_MOVE_INTEL_TT_OPTS)
+# define BOOST_MOVE_HAS_NOTHROW_COPY(T) ((__has_nothrow_copy(T) BOOST_MOVE_INTEL_TT_OPTS))
+# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) ((__has_nothrow_assign(T) BOOST_MOVE_INTEL_TT_OPTS))
+
+# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
+# if (!defined(unix) && !defined(__unix__)) || defined(__LP64__)
+ // GCC sometimes lies about alignment requirements
+ // of type double on 32-bit unix platforms, use the
+ // old implementation instead in that case:
+# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T)
+# endif
+#endif
+
+#if defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
+
+# define BOOST_MOVE_IS_UNION(T) __is_union(T)
+# define BOOST_MOVE_IS_POD(T) __is_pod(T)
+# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
+# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
+# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T))
+# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T))
+# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) __has_trivial_destructor(T)
+# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) __has_nothrow_constructor(T)
+# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy(T))
+# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T))
+
+# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
+# define BOOST_MOVE_ALIGNMENT_OF(T) __alignof__(T)
+#endif
+
+# if defined(__CODEGEARC__)
+# define BOOST_MOVE_IS_UNION(T) __is_union(T)
+# define BOOST_MOVE_IS_POD(T) __is_pod(T)
+# define BOOST_MOVE_IS_EMPTY(T) __is_empty(T)
+# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) (__has_trivial_default_constructor(T))
+# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy_constructor(T))
+# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T))
+# define BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) (__has_trivial_destructor(T))
+# define BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) (__has_nothrow_default_constructor(T))
+# define BOOST_MOVE_HAS_NOTHROW_COPY(T) (__has_nothrow_copy_constructor(T))
+# define BOOST_MOVE_HAS_NOTHROW_ASSIGN(T) (__has_nothrow_assign(T))
+
+# define BOOST_MOVE_IS_ENUM(T) __is_enum(T)
+# define BOOST_MOVE_ALIGNMENT_OF(T) alignof(T)
+
+#endif
+
+//Fallback definitions
+
+#ifdef BOOST_MOVE_IS_UNION
+ #define BOOST_MOVE_IS_UNION_IMPL(T) BOOST_MOVE_IS_UNION(T)
+#else
+ #define BOOST_MOVE_IS_UNION_IMPL(T) false
+#endif
+
+#ifdef BOOST_MOVE_IS_POD
+ //in some compilers the intrinsic is limited to class types so add scalar and void
+ #define BOOST_MOVE_IS_POD_IMPL(T) (::boost::move_detail::is_scalar<T>::value ||\
+ ::boost::move_detail::is_void<T>::value ||\
+ BOOST_MOVE_IS_POD(T))
+#else
+ #define BOOST_MOVE_IS_POD_IMPL(T) \
+ (::boost::move_detail::is_scalar<T>::value || ::boost::move_detail::is_void<T>::value)
+#endif
+
+#ifdef BOOST_MOVE_IS_EMPTY
+ #define BOOST_MOVE_IS_EMPTY_IMPL(T) BOOST_MOVE_IS_EMPTY(T)
+#else
+ #define BOOST_MOVE_IS_EMPTY_IMPL(T) ::boost::move_detail::is_empty_nonintrinsic<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
+ #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value ||\
+ (::boost::move_detail::is_copy_constructible<T>::value &&\
+ BOOST_MOVE_HAS_TRIVIAL_COPY(T))
+#else
+ #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR
+ #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T)
+#else
+ #define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR
+ #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)
+#else
+ #define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN
+ #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value ||\
+ ( ::boost::move_detail::is_copy_assignable<T>::value &&\
+ BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T))
+#else
+ #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN
+ #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T)
+#else
+ #define BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR
+ #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T)
+#else
+ #define BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR
+ #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T)
+#else
+ #define BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_NOTHROW_COPY
+ #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_COPY(T)
+#else
+ #define BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE
+ #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE(T)
+#else
+ #define BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_NOTHROW_ASSIGN
+ #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_ASSIGN(T)
+#else
+ #define BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN
+ #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T)
+#else
+ #define BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
+#endif
+
+#ifdef BOOST_MOVE_IS_ENUM
+ #define BOOST_MOVE_IS_ENUM_IMPL(T) BOOST_MOVE_IS_ENUM(T)
+#else
+ #define BOOST_MOVE_IS_ENUM_IMPL(T) ::boost::move_detail::is_enum_nonintrinsic<T>::value
+#endif
+
+namespace boost {
+namespace move_detail {
+
+//////////////////////////
+// is_reference
+//////////////////////////
+template<class T>
+struct is_reference
+{ static const bool value = false; };
+
+template<class T>
+struct is_reference<T&>
+{ static const bool value = true; };
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+template<class T>
+struct is_reference<T&&>
+{ static const bool value = true; };
+#endif
+
+//////////////////////////
+// is_pointer
+//////////////////////////
+template<class T>
+struct is_pointer
+{ static const bool value = false; };
+
+template<class T>
+struct is_pointer<T*>
+{ static const bool value = true; };
+
+//////////////////////////
+// is_const
+//////////////////////////
+template<class T>
+struct is_const
+{ static const bool value = false; };
+
+template<class T>
+struct is_const<const T>
+{ static const bool value = true; };
+
+//////////////////////////
+// unvoid_ref
+//////////////////////////
+template <typename T> struct unvoid_ref : add_lvalue_reference<T>{};
+template <> struct unvoid_ref<void> { typedef unvoid_ref & type; };
+template <> struct unvoid_ref<const void> { typedef unvoid_ref & type; };
+template <> struct unvoid_ref<volatile void> { typedef unvoid_ref & type; };
+template <> struct unvoid_ref<const volatile void> { typedef unvoid_ref & type; };
+
+template <typename T>
+struct add_reference : add_lvalue_reference<T>
+{};
+
+//////////////////////////
+// add_const_reference
+//////////////////////////
+template <class T>
+struct add_const_reference
+{ typedef const T &type; };
+
+template <class T>
+struct add_const_reference<T&>
+{ typedef T& type; };
+
+//////////////////////////
+// add_const_if_c
+//////////////////////////
+template<class T, bool Add>
+struct add_const_if_c
+ : if_c<Add, typename add_const<T>::type, T>
+{};
+
+//////////////////////////
+// remove_const
+//////////////////////////
+template<class T>
+struct remove_const
+{ typedef T type; };
+
+template<class T>
+struct remove_const< const T>
+{ typedef T type; };
+
+//////////////////////////
+// remove_cv
+//////////////////////////
+template<typename T> struct remove_cv { typedef T type; };
+template<typename T> struct remove_cv<const T> { typedef T type; };
+template<typename T> struct remove_cv<const volatile T> { typedef T type; };
+template<typename T> struct remove_cv<volatile T> { typedef T type; };
+
+//////////////////////////
+// make_unsigned
+//////////////////////////
+template <class T>
+struct make_unsigned_impl { typedef T type; };
+template <> struct make_unsigned_impl<signed char> { typedef unsigned char type; };
+template <> struct make_unsigned_impl<signed short> { typedef unsigned short type; };
+template <> struct make_unsigned_impl<signed int> { typedef unsigned int type; };
+template <> struct make_unsigned_impl<signed long> { typedef unsigned long type; };
+#ifdef BOOST_HAS_LONG_LONG
+template <> struct make_unsigned_impl< ::boost::long_long_type > { typedef ::boost::ulong_long_type type; };
+#endif
+
+template <class T>
+struct make_unsigned
+ : make_unsigned_impl<typename remove_cv<T>::type>
+{};
+
+//////////////////////////
+// is_floating_point
+//////////////////////////
+template<class T> struct is_floating_point_cv { static const bool value = false; };
+template<> struct is_floating_point_cv<float> { static const bool value = true; };
+template<> struct is_floating_point_cv<double> { static const bool value = true; };
+template<> struct is_floating_point_cv<long double> { static const bool value = true; };
+
+template<class T>
+struct is_floating_point
+ : is_floating_point_cv<typename remove_cv<T>::type>
+{};
+
+//////////////////////////
+// is_integral
+//////////////////////////
+template<class T> struct is_integral_cv { static const bool value = false; };
+template<> struct is_integral_cv< bool>{ static const bool value = true; };
+template<> struct is_integral_cv< char>{ static const bool value = true; };
+template<> struct is_integral_cv< unsigned char>{ static const bool value = true; };
+template<> struct is_integral_cv< signed char>{ static const bool value = true; };
+#ifndef BOOST_NO_CXX11_CHAR16_T
+template<> struct is_integral_cv< char16_t>{ static const bool value = true; };
+#endif
+#ifndef BOOST_NO_CXX11_CHAR32_T
+template<> struct is_integral_cv< char32_t>{ static const bool value = true; };
+#endif
+#ifndef BOOST_NO_INTRINSIC_WCHAR_T
+template<> struct is_integral_cv< wchar_t>{ static const bool value = true; };
+#endif
+template<> struct is_integral_cv< short>{ static const bool value = true; };
+template<> struct is_integral_cv< unsigned short>{ static const bool value = true; };
+template<> struct is_integral_cv< int>{ static const bool value = true; };
+template<> struct is_integral_cv< unsigned int>{ static const bool value = true; };
+template<> struct is_integral_cv< long>{ static const bool value = true; };
+template<> struct is_integral_cv< unsigned long>{ static const bool value = true; };
+#ifdef BOOST_HAS_LONG_LONG
+template<> struct is_integral_cv< ::boost:: long_long_type>{ static const bool value = true; };
+template<> struct is_integral_cv< ::boost::ulong_long_type>{ static const bool value = true; };
+#endif
+
+template<class T>
+struct is_integral
+ : public is_integral_cv<typename remove_cv<T>::type>
+{};
+
+//////////////////////////////////////
+// remove_all_extents
+//////////////////////////////////////
+template <class T>
+struct remove_all_extents
+{ typedef T type;};
+
+template <class T>
+struct remove_all_extents<T[]>
+{ typedef typename remove_all_extents<T>::type type; };
+
+template <class T, std::size_t N>
+struct remove_all_extents<T[N]>
+{ typedef typename remove_all_extents<T>::type type;};
+
+//////////////////////////
+// is_scalar
+//////////////////////////
+template<class T>
+struct is_scalar
+{ static const bool value = is_integral<T>::value || is_floating_point<T>::value; };
+
+//////////////////////////
+// is_void
+//////////////////////////
+template<class T>
+struct is_void_cv
+{ static const bool value = false; };
+
+template<>
+struct is_void_cv<void>
+{ static const bool value = true; };
+
+template<class T>
+struct is_void
+ : is_void_cv<typename remove_cv<T>::type>
+{};
+
+//////////////////////////////////////
+// is_array
+//////////////////////////////////////
+template<class T>
+struct is_array
+{ static const bool value = false; };
+
+template<class T>
+struct is_array<T[]>
+{ static const bool value = true; };
+
+template<class T, std::size_t N>
+struct is_array<T[N]>
+{ static const bool value = true; };
+
+//////////////////////////////////////
+// is_member_pointer
+//////////////////////////////////////
+template <class T> struct is_member_pointer_cv { static const bool value = false; };
+template <class T, class U>struct is_member_pointer_cv<T U::*> { static const bool value = true; };
+
+template <class T>
+struct is_member_pointer
+ : is_member_pointer_cv<typename remove_cv<T>::type>
+{};
+
+//////////////////////////////////////
+// is_nullptr_t
+//////////////////////////////////////
+template <class T>
+struct is_nullptr_t_cv
+{ static const bool value = false; };
+
+#if !defined(BOOST_NO_CXX11_NULLPTR)
+template <>
+struct is_nullptr_t_cv
+ #if !defined(BOOST_NO_CXX11_DECLTYPE)
+ <decltype(nullptr)>
+ #else
+ <std::nullptr_t>
+ #endif
+{ static const bool value = true; };
+#endif
+
+template <class T>
+struct is_nullptr_t
+ : is_nullptr_t_cv<typename remove_cv<T>::type>
+{};
+
+//////////////////////////////////////
+// is_function
+//////////////////////////////////////
+//Inspired by libc++, thanks to Howard Hinnant
+//For a function to pointer an lvalue of function type T can be implicitly converted to a prvalue
+//pointer to that function. This does not apply to non-static member functions because lvalues
+//that refer to non-static member functions do not exist.
+template <class T>
+struct is_reference_convertible_to_pointer
+{
+ struct twochar { char dummy[2]; };
+ template <class U> static char test(U*);
+ template <class U> static twochar test(...);
+ static T& source();
+ static const bool value = sizeof(char) == sizeof(test<T>(source()));
+};
+//Filter out:
+// - class types that might have implicit conversions
+// - void (to avoid forming a reference to void later)
+// - references (e.g.: filtering reference to functions)
+// - nullptr_t (convertible to pointer)
+template < class T
+ , bool Filter = is_class_or_union<T>::value ||
+ is_void<T>::value ||
+ is_reference<T>::value ||
+ is_nullptr_t<T>::value >
+struct is_function_impl
+{ static const bool value = is_reference_convertible_to_pointer<T>::value; };
+
+template <class T>
+struct is_function_impl<T, true>
+{ static const bool value = false; };
+
+template <class T>
+struct is_function
+ : is_function_impl<T>
+{};
+
+//////////////////////////////////////
+// is_union
+//////////////////////////////////////
+template<class T>
+struct is_union_noextents_cv
+{ static const bool value = BOOST_MOVE_IS_UNION_IMPL(T); };
+
+template<class T>
+struct is_union
+ : is_union_noextents_cv<typename remove_cv<typename remove_all_extents<T>::type>::type>
+{};
+
+//////////////////////////////////////
+// is_class
+//////////////////////////////////////
+template <class T>
+struct is_class
+{
+ static const bool value = is_class_or_union<T>::value && ! is_union<T>::value;
+};
+
+
+//////////////////////////////////////
+// is_arithmetic
+//////////////////////////////////////
+template <class T>
+struct is_arithmetic
+{
+ static const bool value = is_floating_point<T>::value ||
+ is_integral<T>::value;
+};
+
+//////////////////////////////////////
+// is_member_function_pointer
+//////////////////////////////////////
+template <class T>
+struct is_member_function_pointer_cv
+{
+ static const bool value = false;
+};
+
+template <class T, class C>
+struct is_member_function_pointer_cv<T C::*>
+ : is_function<T>
+{};
+
+template <class T>
+struct is_member_function_pointer
+ : is_member_function_pointer_cv<typename remove_cv<T>::type>
+{};
+
+//////////////////////////////////////
+// is_enum
+//////////////////////////////////////
+#if !defined(BOOST_MOVE_IS_ENUM)
+//Based on (http://howardhinnant.github.io/TypeHiearchy.pdf)
+template <class T>
+struct is_enum_nonintrinsic
+{
+ static const bool value = !is_arithmetic<T>::value &&
+ !is_reference<T>::value &&
+ !is_class_or_union<T>::value &&
+ !is_array<T>::value &&
+ !is_void<T>::value &&
+ !is_nullptr_t<T>::value &&
+ !is_member_pointer<T>::value &&
+ !is_pointer<T>::value &&
+ !is_function<T>::value;
+};
+#endif
+
+template <class T>
+struct is_enum
+{ static const bool value = BOOST_MOVE_IS_ENUM_IMPL(T); };
+
+//////////////////////////////////////
+// is_pod
+//////////////////////////////////////
+template<class T>
+struct is_pod_noextents_cv //for non-c++11 compilers, a safe fallback
+{ static const bool value = BOOST_MOVE_IS_POD_IMPL(T); };
+
+template<class T>
+struct is_pod
+ : is_pod_noextents_cv<typename remove_cv<typename remove_all_extents<T>::type>::type>
+{};
+
+//////////////////////////////////////
+// is_empty
+//////////////////////////////////////
+#if !defined(BOOST_MOVE_IS_EMPTY)
+
+template <typename T>
+struct empty_helper_t1 : public T
+{
+ empty_helper_t1(); // hh compiler bug workaround
+ int i[256];
+ private:
+
+ empty_helper_t1(const empty_helper_t1&);
+ empty_helper_t1& operator=(const empty_helper_t1&);
+};
+
+struct empty_helper_t2 { int i[256]; };
+
+template <typename T, bool IsClass = is_class<T>::value >
+struct is_empty_nonintrinsic
+{
+ static const bool value = false;
+};
+
+template <typename T>
+struct is_empty_nonintrinsic<T, true>
+{
+ static const bool value = sizeof(empty_helper_t1<T>) == sizeof(empty_helper_t2);
+};
+#endif
+
+template <class T>
+struct is_empty
+{ static const bool value = BOOST_MOVE_IS_EMPTY_IMPL(T); };
+
+
+template<class T>
+struct has_boost_move_no_copy_constructor_or_assign_type
+{
+ template <class U>
+ static yes_type test(typename U::boost_move_no_copy_constructor_or_assign*);
+
+ template <class U>
+ static no_type test(...);
+
+ static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
+};
+
+//////////////////////////////////////
+// is_copy_constructible
+//////////////////////////////////////
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \
+ && !defined(BOOST_INTEL_CXX_VERSION) && \
+ !(defined(BOOST_MSVC) && _MSC_VER == 1800)
+#define BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE
+#endif
+
+template<class T>
+struct is_copy_constructible
+{
+ // Intel compiler has problems with SFINAE for copy constructors and deleted functions:
+ //
+ // error: function *function_name* cannot be referenced -- it is a deleted function
+ // static yes_type test(U&, decltype(U(boost::declval<U&>()))* = 0);
+ // ^
+ // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
+ // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
+ #if defined(BOOST_MOVE_TT_CXX11_IS_COPY_CONSTRUCTIBLE)
+ template<class U> static typename add_reference<U>::type source();
+ static no_type test(...);
+ #ifdef BOOST_NO_CXX11_DECLTYPE
+ template <class U>
+ static yes_type test(U&, bool_<sizeof(U(source<U>()))>* = 0);
+ #else
+ template <class U>
+ static yes_type test(U&, decltype(U(source<U>()))* = 0);
+ #endif
+ static const bool value = sizeof(test(source<T>())) == sizeof(yes_type);
+ #else
+ static const bool value = !has_boost_move_no_copy_constructor_or_assign_type<T>::value;
+ #endif
+};
+
+
+//////////////////////////////////////
+// is_copy_assignable
+//////////////////////////////////////
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \
+ && !defined(BOOST_INTEL_CXX_VERSION) && \
+ !(defined(BOOST_MSVC) && _MSC_VER == 1800)
+#define BOOST_MOVE_TT_CXX11_IS_COPY_ASSIGNABLE
+#endif
+
+template <class T>
+struct is_copy_assignable
+{
+// Intel compiler has problems with SFINAE for copy constructors and deleted functions:
+//
+// error: function *function_name* cannot be referenced -- it is a deleted function
+// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval<T1&>()))* = 0);
+// ^
+//
+// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
+// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
+#if defined(BOOST_MOVE_TT_CXX11_IS_COPY_ASSIGNABLE)
+ typedef char yes_type;
+ struct no_type { char dummy[2]; };
+
+ template <class U> static typename add_reference<U>::type source();
+ template <class U> static decltype(source<U&>() = source<const U&>(), yes_type() ) test(int);
+ template <class> static no_type test(...);
+
+ static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
+#else
+ static const bool value = !has_boost_move_no_copy_constructor_or_assign_type<T>::value;
+#endif
+};
+
+//////////////////////////////////////
+// is_trivially_destructible
+//////////////////////////////////////
+template<class T>
+struct is_trivially_destructible
+{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DESTRUCTIBLE(T); };
+
+//////////////////////////////////////
+// is_trivially_default_constructible
+//////////////////////////////////////
+template<class T>
+struct is_trivially_default_constructible
+{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T); };
+
+//////////////////////////////////////
+// is_trivially_copy_constructible
+//////////////////////////////////////
+template<class T>
+struct is_trivially_copy_constructible
+{
+ //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
+ //deleted copy constructors so make sure the type is copy constructible.
+ static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T);
+};
+
+//////////////////////////////////////
+// is_trivially_move_constructible
+//////////////////////////////////////
+template<class T>
+struct is_trivially_move_constructible
+{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
+
+//////////////////////////////////////
+// is_trivially_copy_assignable
+//////////////////////////////////////
+template<class T>
+struct is_trivially_copy_assignable
+{
+ //In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
+ //deleted copy constructors so make sure the type is copy constructible.
+ static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T);
+};
+
+//////////////////////////////////////
+// is_trivially_move_assignable
+//////////////////////////////////////
+template<class T>
+struct is_trivially_move_assignable
+{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_ASSIGNABLE(T); };
+
+//////////////////////////////////////
+// is_nothrow_default_constructible
+//////////////////////////////////////
+template<class T>
+struct is_nothrow_default_constructible
+ : is_pod<T>
+{ static const bool value = BOOST_MOVE_IS_NOTHROW_DEFAULT_CONSTRUCTIBLE(T); };
+
+//////////////////////////////////////
+// is_nothrow_copy_constructible
+//////////////////////////////////////
+template<class T>
+struct is_nothrow_copy_constructible
+{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_CONSTRUCTIBLE(T); };
+
+//////////////////////////////////////
+// is_nothrow_move_constructible
+//////////////////////////////////////
+template<class T>
+struct is_nothrow_move_constructible
+{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_CONSTRUCTIBLE(T); };
+
+//////////////////////////////////////
+// is_nothrow_copy_assignable
+//////////////////////////////////////
+template<class T>
+struct is_nothrow_copy_assignable
+{ static const bool value = BOOST_MOVE_IS_NOTHROW_COPY_ASSIGNABLE(T); };
+
+//////////////////////////////////////
+// is_nothrow_move_assignable
+//////////////////////////////////////
+template<class T>
+struct is_nothrow_move_assignable
+{ static const bool value = BOOST_MOVE_IS_NOTHROW_MOVE_ASSIGNABLE(T); };
+
+//////////////////////////////////////
+// is_nothrow_swappable
+//////////////////////////////////////
+template<class T>
+struct is_nothrow_swappable
+{
+ static const bool value = is_empty<T>::value || is_pod<T>::value;
+};
+
+//////////////////////////////////////
+// alignment_of
+//////////////////////////////////////
+template <typename T>
+struct alignment_of_hack
+{
+ T t1;
+ char c;
+ T t2;
+ alignment_of_hack();
+};
+
+template <unsigned A, unsigned S>
+struct alignment_logic
+{ static const std::size_t value = A < S ? A : S; };
+
+template< typename T >
+struct alignment_of_impl
+#if defined(BOOST_MSVC) && (BOOST_MSVC >= 1400)
+ // With MSVC both the native __alignof operator
+ // and our own logic gets things wrong from time to time :-(
+ // Using a combination of the two seems to make the most of a bad job:
+ : alignment_logic< sizeof(alignment_of_hack<T>) - 2*sizeof(T), __alignof(T)>
+{};
+#elif !defined(BOOST_MOVE_ALIGNMENT_OF)
+ : alignment_logic< sizeof(alignment_of_hack<T>) - 2*sizeof(T), sizeof(T)>
+{};
+#else
+{ static const std::size_t value = BOOST_MOVE_ALIGNMENT_OF(T); };
+#endif
+
+template< typename T >
+struct alignment_of
+ : alignment_of_impl<T>
+{};
+
+class alignment_dummy;
+typedef void (*function_ptr)();
+typedef int (alignment_dummy::*member_ptr);
+typedef int (alignment_dummy::*member_function_ptr)();
+struct alignment_struct
+{ long double dummy[4]; };
+
+/////////////////////////////
+// max_align_t
+/////////////////////////////
+//This is not standard, but should work with all compilers
+union max_align
+{
+ char char_;
+ short short_;
+ int int_;
+ long long_;
+ #ifdef BOOST_HAS_LONG_LONG
+ ::boost::long_long_type long_long_;
+ #endif
+ float float_;
+ double double_;
+ void * void_ptr_;
+ long double long_double_[4];
+ alignment_dummy *unknown_class_ptr_;
+ function_ptr function_ptr_;
+ member_function_ptr member_function_ptr_;
+ alignment_struct alignment_struct_;
+};
+
+typedef union max_align max_align_t;
+
+/////////////////////////////
+// aligned_storage
+/////////////////////////////
+
+#if !defined(BOOST_NO_ALIGNMENT)
+
+template<std::size_t Len, std::size_t Align>
+struct aligned_struct;
+
+#define BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(A)\
+template<std::size_t Len>\
+struct BOOST_ALIGNMENT(A) aligned_struct<Len, A>\
+{\
+ unsigned char data[Len];\
+};\
+//
+
+//Up to 4K alignment (typical page size)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x2)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x4)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x8)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x10)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x20)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x40)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x80)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x100)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x200)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x400)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x800)
+BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000)
+
+#undef BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT
+
+// Workaround for bogus [-Wignored-attributes] warning on GCC 6.x/7.x: don't use a type that "directly" carries the alignment attribute.
+// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82270
+template<std::size_t Len, std::size_t Align>
+union aligned_struct_wrapper
+{
+ aligned_struct<Len, Align> aligner;
+ unsigned char data[sizeof(aligned_struct<Len, Align>)];
+};
+
+template<std::size_t Len, std::size_t Align>
+struct aligned_storage_impl
+{
+ typedef aligned_struct_wrapper<Len, Align> type;
+};
+
+#else //BOOST_NO_ALIGNMENT
+
+template<class T, std::size_t Len>
+union aligned_union
+{
+ T aligner;
+ unsigned char data[Len];
+};
+
+template<std::size_t Len, std::size_t Align, class T, bool Ok>
+struct aligned_next;
+
+template<std::size_t Len, std::size_t Align, class T>
+struct aligned_next<Len, Align, T, true>
+{
+ BOOST_STATIC_ASSERT((alignment_of<T>::value == Align));
+ typedef aligned_union<T, Len> type;
+};
+
+//End of search defaults to max_align_t
+template<std::size_t Len, std::size_t Align>
+struct aligned_next<Len, Align, max_align_t, false>
+{ typedef aligned_union<max_align_t, Len> type; };
+
+//Now define a search list through types
+#define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\
+ template<std::size_t Len, std::size_t Align>\
+ struct aligned_next<Len, Align, TYPE, false>\
+ : aligned_next<Len, Align, NEXT_TYPE, Align == alignment_of<NEXT_TYPE>::value>\
+ {};\
+ //
+ BOOST_MOVE_ALIGNED_NEXT_STEP(long double, max_align_t)
+ BOOST_MOVE_ALIGNED_NEXT_STEP(double, long double)
+ #ifdef BOOST_HAS_LONG_LONG
+ BOOST_MOVE_ALIGNED_NEXT_STEP(::boost::long_long_type, double)
+ BOOST_MOVE_ALIGNED_NEXT_STEP(long, ::boost::long_long_type)
+ #else
+ BOOST_MOVE_ALIGNED_NEXT_STEP(long, double)
+ #endif
+ BOOST_MOVE_ALIGNED_NEXT_STEP(int, long)
+ BOOST_MOVE_ALIGNED_NEXT_STEP(short, int)
+ BOOST_MOVE_ALIGNED_NEXT_STEP(char, short)
+#undef BOOST_MOVE_ALIGNED_NEXT_STEP
+
+template<std::size_t Len, std::size_t Align>
+struct aligned_storage_impl
+ : aligned_next<Len, Align, char, Align == alignment_of<char>::value>
+{};
+
+#endif
+
+template<std::size_t Len, std::size_t Align = alignment_of<max_align_t>::value>
+struct aligned_storage
+{
+ //Sanity checks for input parameters
+ BOOST_STATIC_ASSERT(Align > 0);
+
+ //Sanity checks for output type
+ typedef typename aligned_storage_impl<Len ? Len : 1, Align>::type type;
+ static const std::size_t value = alignment_of<type>::value;
+ BOOST_STATIC_ASSERT(value >= Align);
+ BOOST_STATIC_ASSERT((value % Align) == 0);
+
+ //Just in case someone instantiates aligned_storage
+ //instead of aligned_storage::type (typical error).
+ private:
+ aligned_storage();
+};
+
+} //namespace move_detail {
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_MOVE_DETAIL_TYPE_TRAITS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/unique_ptr_meta_utils.hpp b/src/third_party/boost-1.69.0/boost/move/detail/unique_ptr_meta_utils.hpp
index e11124d8988..e11124d8988 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/unique_ptr_meta_utils.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/unique_ptr_meta_utils.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/detail/workaround.hpp b/src/third_party/boost-1.69.0/boost/move/detail/workaround.hpp
index 1d16f243321..1d16f243321 100644
--- a/src/third_party/boost-1.68.0/boost/move/detail/workaround.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/detail/workaround.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/iterator.hpp b/src/third_party/boost-1.69.0/boost/move/iterator.hpp
index f36df23c0c0..f36df23c0c0 100644
--- a/src/third_party/boost-1.68.0/boost/move/iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/make_unique.hpp b/src/third_party/boost-1.69.0/boost/move/make_unique.hpp
index ef106dbb55a..ef106dbb55a 100644
--- a/src/third_party/boost-1.68.0/boost/move/make_unique.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/make_unique.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/move.hpp b/src/third_party/boost-1.69.0/boost/move/move.hpp
index 62dddbc9548..62dddbc9548 100644
--- a/src/third_party/boost-1.68.0/boost/move/move.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/move.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/traits.hpp b/src/third_party/boost-1.69.0/boost/move/traits.hpp
index b48b8f61d2d..b48b8f61d2d 100644
--- a/src/third_party/boost-1.68.0/boost/move/traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/unique_ptr.hpp b/src/third_party/boost-1.69.0/boost/move/unique_ptr.hpp
index 2d794e8ed57..2d794e8ed57 100644
--- a/src/third_party/boost-1.68.0/boost/move/unique_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/unique_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/utility.hpp b/src/third_party/boost-1.69.0/boost/move/utility.hpp
index 28de7935c86..28de7935c86 100644
--- a/src/third_party/boost-1.68.0/boost/move/utility.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/utility.hpp
diff --git a/src/third_party/boost-1.68.0/boost/move/utility_core.hpp b/src/third_party/boost-1.69.0/boost/move/utility_core.hpp
index 55042a9bb15..55042a9bb15 100644
--- a/src/third_party/boost-1.68.0/boost/move/utility_core.hpp
+++ b/src/third_party/boost-1.69.0/boost/move/utility_core.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/O1_size.hpp b/src/third_party/boost-1.69.0/boost/mpl/O1_size.hpp
index 98bd3a7459f..98bd3a7459f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/O1_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/O1_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/O1_size_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/O1_size_fwd.hpp
index c84a7a56ae1..c84a7a56ae1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/O1_size_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/O1_size_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/advance.hpp b/src/third_party/boost-1.69.0/boost/mpl/advance.hpp
index 1af600417f8..1af600417f8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/advance.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/advance.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/advance_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/advance_fwd.hpp
index 803841019d3..803841019d3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/advance_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/advance_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/always.hpp b/src/third_party/boost-1.69.0/boost/mpl/always.hpp
index 5fe71321e10..5fe71321e10 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/always.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/always.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/and.hpp b/src/third_party/boost-1.69.0/boost/mpl/and.hpp
index 454aaf2e969..454aaf2e969 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/and.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/apply.hpp b/src/third_party/boost-1.69.0/boost/mpl/apply.hpp
index 581eb6810e2..581eb6810e2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/apply_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/apply_fwd.hpp
index 5f5fa789160..5f5fa789160 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/apply_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/apply_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/apply_wrap.hpp b/src/third_party/boost-1.69.0/boost/mpl/apply_wrap.hpp
index b807779cfa1..b807779cfa1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/apply_wrap.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/apply_wrap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/arg.hpp b/src/third_party/boost-1.69.0/boost/mpl/arg.hpp
index f51adfaeab9..f51adfaeab9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/arg_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/arg_fwd.hpp
index 7346dc35559..7346dc35559 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/arg_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/arg_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/mpl/assert.hpp b/src/third_party/boost-1.69.0/boost/mpl/assert.hpp
new file mode 100644
index 00000000000..7f220941a31
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/mpl/assert.hpp
@@ -0,0 +1,459 @@
+
+#ifndef BOOST_MPL_ASSERT_HPP_INCLUDED
+#define BOOST_MPL_ASSERT_HPP_INCLUDED
+
+// Copyright Aleksey Gurtovoy 2000-2006
+//
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/mpl for documentation.
+
+// $Id$
+// $Date$
+// $Revision$
+
+#include <boost/mpl/not.hpp>
+#include <boost/mpl/aux_/value_wknd.hpp>
+#include <boost/mpl/aux_/nested_type_wknd.hpp>
+#include <boost/mpl/aux_/yes_no.hpp>
+#include <boost/mpl/aux_/na.hpp>
+#include <boost/mpl/aux_/adl_barrier.hpp>
+
+#include <boost/mpl/aux_/config/nttp.hpp>
+#include <boost/mpl/aux_/config/dtp.hpp>
+#include <boost/mpl/aux_/config/gcc.hpp>
+#include <boost/mpl/aux_/config/msvc.hpp>
+#include <boost/mpl/aux_/config/gpu.hpp>
+#include <boost/mpl/aux_/config/static_constant.hpp>
+#include <boost/mpl/aux_/config/pp_counter.hpp>
+#include <boost/mpl/aux_/config/workaround.hpp>
+
+#include <boost/preprocessor/cat.hpp>
+
+#include <boost/config.hpp> // make sure 'size_t' is placed into 'std'
+#include <cstddef>
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
+#include <boost/mpl/if.hpp>
+#endif
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
+ || (BOOST_MPL_CFG_GCC != 0) \
+ || BOOST_WORKAROUND(__IBMCPP__, <= 600)
+# define BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
+#endif
+
+#if BOOST_WORKAROUND(__MWERKS__, < 0x3202) \
+ || BOOST_WORKAROUND(__EDG_VERSION__, <= 238) \
+ || BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
+ || BOOST_WORKAROUND(__DMC__, BOOST_TESTED_AT(0x840))
+# define BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
+#endif
+
+// agurt, 10/nov/06: use enums for Borland (which cannot cope with static constants)
+// and GCC (which issues "unused variable" warnings when static constants are used
+// at a function scope)
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x610)) \
+ || (BOOST_MPL_CFG_GCC != 0) || (BOOST_MPL_CFG_GPU != 0) || defined(__PGI)
+# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) enum { expr }
+#else
+# define BOOST_MPL_AUX_ASSERT_CONSTANT(T, expr) BOOST_STATIC_CONSTANT(T, expr)
+#endif
+
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN
+
+struct failed {};
+
+// agurt, 24/aug/04: MSVC 7.1 workaround here and below: return/accept
+// 'assert<false>' by reference; can't apply it unconditionally -- apparently it
+// degrades the quality of GCC diagnostics
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1310)
+# define AUX778076_ASSERT_ARG(x) x&
+#else
+# define AUX778076_ASSERT_ARG(x) x
+#endif
+
+template< bool C > struct assert { typedef void* type; };
+template<> struct assert<false> { typedef AUX778076_ASSERT_ARG(assert) type; };
+
+template< bool C >
+int assertion_failed( typename assert<C>::type );
+
+template< bool C >
+struct assertion
+{
+ static int failed( assert<false> );
+};
+
+template<>
+struct assertion<true>
+{
+ static int failed( void* );
+};
+
+struct assert_
+{
+#if !defined(BOOST_MPL_CFG_NO_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
+ template< typename T1, typename T2 = na, typename T3 = na, typename T4 = na > struct types {};
+#endif
+ static assert_ const arg;
+ enum relations { equal = 1, not_equal, greater, greater_equal, less, less_equal };
+};
+
+
+#if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
+
+bool operator==( failed, failed );
+bool operator!=( failed, failed );
+bool operator>( failed, failed );
+bool operator>=( failed, failed );
+bool operator<( failed, failed );
+bool operator<=( failed, failed );
+
+#if defined(__EDG_VERSION__)
+template< bool (*)(failed, failed), long x, long y > struct assert_relation {};
+# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<r,x,y>
+#else
+template< BOOST_MPL_AUX_NTTP_DECL(long, x), BOOST_MPL_AUX_NTTP_DECL(long, y), bool (*)(failed, failed) >
+struct assert_relation {};
+# define BOOST_MPL_AUX_ASSERT_RELATION(x, y, r) assert_relation<x,y,r>
+#endif
+
+#else // BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
+
+boost::mpl::aux::weighted_tag<1>::type operator==( assert_, assert_ );
+boost::mpl::aux::weighted_tag<2>::type operator!=( assert_, assert_ );
+boost::mpl::aux::weighted_tag<3>::type operator>( assert_, assert_ );
+boost::mpl::aux::weighted_tag<4>::type operator>=( assert_, assert_ );
+boost::mpl::aux::weighted_tag<5>::type operator<( assert_, assert_ );
+boost::mpl::aux::weighted_tag<6>::type operator<=( assert_, assert_ );
+
+template< assert_::relations r, long x, long y > struct assert_relation {};
+
+#endif
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
+
+template<class Pred>
+struct extract_assert_pred;
+
+template<class Pred>
+struct extract_assert_pred<void(Pred)> { typedef Pred type; };
+
+template<class Pred>
+struct eval_assert {
+ typedef typename extract_assert_pred<Pred>::type P;
+ typedef typename P::type p_type;
+ typedef typename ::boost::mpl::if_c<p_type::value,
+ AUX778076_ASSERT_ARG(assert<false>),
+ failed ************ P::************
+ >::type type;
+};
+
+template<class Pred>
+struct eval_assert_not {
+ typedef typename extract_assert_pred<Pred>::type P;
+ typedef typename P::type p_type;
+ typedef typename ::boost::mpl::if_c<!p_type::value,
+ AUX778076_ASSERT_ARG(assert<false>),
+ failed ************ ::boost::mpl::not_<P>::************
+ >::type type;
+};
+
+template< typename T >
+T make_assert_arg();
+
+#elif !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
+
+template< bool > struct assert_arg_pred_impl { typedef int type; };
+template<> struct assert_arg_pred_impl<true> { typedef void* type; };
+
+template< typename P > struct assert_arg_pred
+{
+ typedef typename P::type p_type;
+ typedef typename assert_arg_pred_impl< p_type::value >::type type;
+};
+
+template< typename P > struct assert_arg_pred_not
+{
+ typedef typename P::type p_type;
+ BOOST_MPL_AUX_ASSERT_CONSTANT( bool, p = !p_type::value );
+ typedef typename assert_arg_pred_impl<p>::type type;
+};
+
+#if defined(BOOST_GCC) && BOOST_GCC >= 80000
+#define BOOST_MPL_IGNORE_PARENTHESES_WARNING
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wparentheses"
+#endif
+
+template< typename Pred >
+failed ************ (Pred::************
+ assert_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type )
+ );
+
+template< typename Pred >
+failed ************ (boost::mpl::not_<Pred>::************
+ assert_not_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type )
+ );
+
+#ifdef BOOST_MPL_IGNORE_PARENTHESES_WARNING
+#undef BOOST_MPL_IGNORE_PARENTHESES_WARNING
+#pragma GCC diagnostic pop
+#endif
+
+template< typename Pred >
+AUX778076_ASSERT_ARG(assert<false>)
+assert_arg( void (*)(Pred), typename assert_arg_pred_not<Pred>::type );
+
+template< typename Pred >
+AUX778076_ASSERT_ARG(assert<false>)
+assert_not_arg( void (*)(Pred), typename assert_arg_pred<Pred>::type );
+
+
+#else // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
+
+template< bool c, typename Pred > struct assert_arg_type_impl
+{
+ typedef failed ************ Pred::* mwcw83_wknd;
+ typedef mwcw83_wknd ************* type;
+};
+
+template< typename Pred > struct assert_arg_type_impl<true,Pred>
+{
+ typedef AUX778076_ASSERT_ARG(assert<false>) type;
+};
+
+template< typename Pred > struct assert_arg_type
+ : assert_arg_type_impl< BOOST_MPL_AUX_VALUE_WKND(BOOST_MPL_AUX_NESTED_TYPE_WKND(Pred))::value, Pred >
+{
+};
+
+template< typename Pred >
+typename assert_arg_type<Pred>::type
+assert_arg(void (*)(Pred), int);
+
+template< typename Pred >
+typename assert_arg_type< boost::mpl::not_<Pred> >::type
+assert_not_arg(void (*)(Pred), int);
+
+# if !defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
+template< long x, long y, bool (*r)(failed, failed) >
+typename assert_arg_type_impl< false,BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) >::type
+assert_rel_arg( BOOST_MPL_AUX_ASSERT_RELATION(x,y,r) );
+# else
+template< assert_::relations r, long x, long y >
+typename assert_arg_type_impl< false,assert_relation<r,x,y> >::type
+assert_rel_arg( assert_relation<r,x,y> );
+# endif
+
+#endif // BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER
+
+#undef AUX778076_ASSERT_ARG
+
+BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE
+
+#if BOOST_WORKAROUND(BOOST_MSVC, == 1700)
+
+// BOOST_MPL_ASSERT((pred<x,...>))
+
+#define BOOST_MPL_ASSERT(pred) \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
+ boost::mpl::assertion_failed<false>( \
+ boost::mpl::make_assert_arg< \
+ typename boost::mpl::eval_assert<void pred>::type \
+ >() \
+ ) \
+ ) \
+ ) \
+/**/
+
+// BOOST_MPL_ASSERT_NOT((pred<x,...>))
+
+#define BOOST_MPL_ASSERT_NOT(pred) \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
+ boost::mpl::assertion_failed<false>( \
+ boost::mpl::make_assert_arg< \
+ typename boost::mpl::eval_assert_not<void pred>::type \
+ >() \
+ ) \
+ ) \
+ ) \
+/**/
+
+#else
+
+// BOOST_MPL_ASSERT((pred<x,...>))
+
+#define BOOST_MPL_ASSERT(pred) \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
+ boost::mpl::assertion_failed<false>( \
+ boost::mpl::assert_arg( (void (*) pred)0, 1 ) \
+ ) \
+ ) \
+ ) \
+/**/
+
+// BOOST_MPL_ASSERT_NOT((pred<x,...>))
+
+#if BOOST_WORKAROUND(BOOST_MSVC, <= 1300)
+# define BOOST_MPL_ASSERT_NOT(pred) \
+enum { \
+ BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
+ boost::mpl::assertion<false>::failed( \
+ boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
+ ) \
+ ) \
+}\
+/**/
+#else
+# define BOOST_MPL_ASSERT_NOT(pred) \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
+ boost::mpl::assertion_failed<false>( \
+ boost::mpl::assert_not_arg( (void (*) pred)0, 1 ) \
+ ) \
+ ) \
+ ) \
+/**/
+#endif
+
+#endif
+
+// BOOST_MPL_ASSERT_RELATION(x, ==|!=|<=|<|>=|>, y)
+
+#if defined(BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES)
+
+# if !defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
+// agurt, 9/nov/06: 'enum' below is a workaround for gcc 4.0.4/4.1.1 bugs #29522 and #29518
+# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
+enum { BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) }; \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
+ boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
+ (boost::mpl::failed ************ ( boost::mpl::assert_relation< \
+ boost::mpl::assert_::relations( sizeof( \
+ boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
+ ) ) \
+ , x \
+ , y \
+ >::************)) 0 ) \
+ ) \
+ ) \
+/**/
+# else
+# define BOOST_MPL_ASSERT_RELATION_IMPL(counter, x, rel, y) \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assert_rel,counter) = sizeof( \
+ boost::mpl::assert_::arg rel boost::mpl::assert_::arg \
+ ) \
+ ); \
+BOOST_MPL_AUX_ASSERT_CONSTANT( bool, BOOST_PP_CAT(mpl_assert_rel_value,counter) = (x rel y) ); \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
+ boost::mpl::assertion_failed<BOOST_PP_CAT(mpl_assert_rel_value,counter)>( \
+ boost::mpl::assert_rel_arg( boost::mpl::assert_relation< \
+ boost::mpl::assert_::relations(BOOST_PP_CAT(mpl_assert_rel,counter)) \
+ , x \
+ , y \
+ >() ) \
+ ) \
+ ) \
+ ) \
+/**/
+# endif
+
+# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
+BOOST_MPL_ASSERT_RELATION_IMPL(BOOST_MPL_AUX_PP_COUNTER(), x, rel, y) \
+/**/
+
+#else // !BOOST_MPL_CFG_ASSERT_USE_RELATION_NAMES
+
+# if defined(BOOST_MPL_CFG_ASSERT_BROKEN_POINTER_TO_POINTER_TO_MEMBER)
+# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
+ boost::mpl::assertion_failed<(x rel y)>( boost::mpl::assert_rel_arg( \
+ boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))() \
+ ) ) \
+ ) \
+ ) \
+/**/
+# else
+# define BOOST_MPL_ASSERT_RELATION(x, rel, y) \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,BOOST_MPL_AUX_PP_COUNTER()) = sizeof( \
+ boost::mpl::assertion_failed<(x rel y)>( (boost::mpl::failed ************ ( \
+ boost::mpl::BOOST_MPL_AUX_ASSERT_RELATION(x,y,(&boost::mpl::operator rel))::************))0 ) \
+ ) \
+ ) \
+/**/
+# endif
+
+#endif
+
+
+// BOOST_MPL_ASSERT_MSG( (pred<x,...>::value), USER_PROVIDED_MESSAGE, (types<x,...>) )
+
+#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3202))
+# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
+struct msg; \
+typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
+{ \
+ using boost::mpl::assert_::types; \
+ static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
+ { return 0; } \
+} BOOST_PP_CAT(mpl_assert_arg,counter); \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
+ boost::mpl::assertion<(c)>::failed( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
+ ) \
+ ) \
+/**/
+#else
+# define BOOST_MPL_ASSERT_MSG_IMPL( counter, c, msg, types_ ) \
+struct msg; \
+typedef struct BOOST_PP_CAT(msg,counter) : boost::mpl::assert_ \
+{ \
+ static boost::mpl::failed ************ (msg::************ assert_arg()) types_ \
+ { return 0; } \
+} BOOST_PP_CAT(mpl_assert_arg,counter); \
+BOOST_MPL_AUX_ASSERT_CONSTANT( \
+ std::size_t \
+ , BOOST_PP_CAT(mpl_assertion_in_line_,counter) = sizeof( \
+ boost::mpl::assertion_failed<(c)>( BOOST_PP_CAT(mpl_assert_arg,counter)::assert_arg() ) \
+ ) \
+ ) \
+/**/
+#endif
+
+#if 0
+// Work around BOOST_MPL_ASSERT_MSG_IMPL generating multiple definition linker errors on VC++8.
+// #if defined(BOOST_MSVC) && BOOST_MSVC < 1500
+# include <boost/static_assert.hpp>
+# define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
+BOOST_STATIC_ASSERT_MSG( c, #msg ) \
+/**/
+#else
+# define BOOST_MPL_ASSERT_MSG( c, msg, types_ ) \
+BOOST_MPL_ASSERT_MSG_IMPL( BOOST_MPL_AUX_PP_COUNTER(), c, msg, types_ ) \
+/**/
+#endif
+
+#endif // BOOST_MPL_ASSERT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/mpl/at.hpp b/src/third_party/boost-1.69.0/boost/mpl/at.hpp
index aa90e59c167..aa90e59c167 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/at.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/at.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/at_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/at_fwd.hpp
index 6aaae38351e..6aaae38351e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/at_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/at_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/O1_size_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/O1_size_impl.hpp
index 3bcbd0f787c..3bcbd0f787c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/O1_size_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/O1_size_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/adl_barrier.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/adl_barrier.hpp
index 3968c242adb..3968c242adb 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/adl_barrier.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/adl_barrier.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/advance_backward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/advance_backward.hpp
index df567932118..df567932118 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/advance_backward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/advance_backward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/advance_forward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/advance_forward.hpp
index 62b0101c67b..62b0101c67b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/advance_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/advance_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/arg_typedef.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/arg_typedef.hpp
index 362db16006a..362db16006a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/arg_typedef.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/arg_typedef.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/arithmetic_op.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/arithmetic_op.hpp
index 0171db5db63..0171db5db63 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/arithmetic_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/arithmetic_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/arity.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/arity.hpp
index d13ab4aded8..d13ab4aded8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/arity.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/arity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/arity_spec.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/arity_spec.hpp
index 7c8221428d3..7c8221428d3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/arity_spec.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/arity_spec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/at_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/at_impl.hpp
index 923937480ea..923937480ea 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/begin_end_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/begin_end_impl.hpp
index 58b70dd1018..58b70dd1018 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/begin_end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/begin_end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/clear_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/clear_impl.hpp
index 20b270c0cea..20b270c0cea 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/clear_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/clear_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/common_name_wknd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/common_name_wknd.hpp
index 00758b243ed..00758b243ed 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/common_name_wknd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/common_name_wknd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/comparison_op.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/comparison_op.hpp
index 2df72d300a7..2df72d300a7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/comparison_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/comparison_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/adl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/adl.hpp
index e9bdf1156b0..e9bdf1156b0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/adl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/adl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/arrays.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/arrays.hpp
index a9ea68ad678..a9ea68ad678 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/arrays.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/arrays.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/bcc.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/bcc.hpp
index fe4941a5983..fe4941a5983 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/bcc.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/bcc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/bind.hpp
index 10bcb94b8b4..10bcb94b8b4 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/compiler.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/compiler.hpp
index 7d3e3b6622f..7d3e3b6622f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/compiler.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/compiler.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/ctps.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/ctps.hpp
index af78f47ffda..af78f47ffda 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/ctps.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/ctps.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/dependent_nttp.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dependent_nttp.hpp
index 5c2e24dbbd3..5c2e24dbbd3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/dependent_nttp.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dependent_nttp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp
index 9f8ea8c67f7..9f8ea8c67f7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dmc_ambiguous_ctps.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/dtp.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dtp.hpp
index 4379b6b2fcf..4379b6b2fcf 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/dtp.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/dtp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/eti.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/eti.hpp
index 519d433d359..519d433d359 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/eti.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/eti.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/forwarding.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/forwarding.hpp
index b4296ad9612..b4296ad9612 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/forwarding.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/forwarding.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/gcc.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/gcc.hpp
index 080495de17d..080495de17d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/gcc.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/gcc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/gpu.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/gpu.hpp
index 0e5ed784c45..0e5ed784c45 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/gpu.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/gpu.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/has_apply.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_apply.hpp
index 4dc01c66474..4dc01c66474 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/has_apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/has_xxx.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_xxx.hpp
index b0f2f8c23e0..b0f2f8c23e0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/has_xxx.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/has_xxx.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/integral.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/integral.hpp
index 144542d9c34..144542d9c34 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/integral.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/integral.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/intel.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/intel.hpp
index 5bd91591739..5bd91591739 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/intel.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/intel.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/lambda.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/lambda.hpp
index 93fbafe0713..93fbafe0713 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/lambda.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/lambda.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/msvc.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc.hpp
index 8a6b9246277..8a6b9246277 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/msvc.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/msvc_typename.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc_typename.hpp
index feedc16db87..feedc16db87 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/msvc_typename.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/msvc_typename.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/nttp.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/nttp.hpp
index 11125a9bffc..11125a9bffc 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/nttp.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/nttp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/operators.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/operators.hpp
index 3fb9db30572..3fb9db30572 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/overload_resolution.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/overload_resolution.hpp
index 61e4486e9bc..61e4486e9bc 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/overload_resolution.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/overload_resolution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/pp_counter.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/pp_counter.hpp
index e7fb8d66c62..e7fb8d66c62 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/pp_counter.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/pp_counter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/preprocessor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/preprocessor.hpp
index 82ebc68fe0c..82ebc68fe0c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/preprocessor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/preprocessor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/static_constant.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/static_constant.hpp
index ece38fb0e99..ece38fb0e99 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/static_constant.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/static_constant.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/ttp.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/ttp.hpp
index 3aff3f84df0..3aff3f84df0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/ttp.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/ttp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/typeof.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/typeof.hpp
index cde6179c67c..cde6179c67c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/typeof.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/typeof.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/use_preprocessed.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/use_preprocessed.hpp
index 8fd5c607559..8fd5c607559 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/use_preprocessed.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/use_preprocessed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/workaround.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/workaround.hpp
index 82c632982df..82c632982df 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/config/workaround.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/config/workaround.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/contains_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/contains_impl.hpp
index b80caeafedc..b80caeafedc 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/contains_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/contains_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/count_args.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/count_args.hpp
index b432d370eb9..b432d370eb9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/count_args.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/count_args.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/empty_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/empty_impl.hpp
index cfe55ae2524..cfe55ae2524 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/empty_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/empty_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/find_if_pred.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/find_if_pred.hpp
index c07d89d6c7f..c07d89d6c7f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/find_if_pred.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/find_if_pred.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl.hpp
index 97c88c5b290..97c88c5b290 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/fold_impl_body.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl_body.hpp
index 02dd645f723..02dd645f723 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/fold_impl_body.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/fold_impl_body.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/front_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/front_impl.hpp
index 9493c1c4e97..9493c1c4e97 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/front_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/front_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/full_lambda.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/full_lambda.hpp
index 918aff5c09f..918aff5c09f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/full_lambda.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/full_lambda.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_apply.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_apply.hpp
index 9c16a354982..9c16a354982 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_begin.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_begin.hpp
index 4ee415cbb99..4ee415cbb99 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_key_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_key_impl.hpp
index 7a0e9b55832..7a0e9b55832 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_key_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_key_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_rebind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_rebind.hpp
index eb4eda613c6..eb4eda613c6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_rebind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_rebind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_size.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_size.hpp
index ff29913f9ba..ff29913f9ba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_tag.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_tag.hpp
index 3912a76af67..3912a76af67 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_type.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_type.hpp
index 6744ef5b062..6744ef5b062 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/has_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/has_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/include_preprocessed.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/include_preprocessed.hpp
index c13434c8ebb..c13434c8ebb 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/include_preprocessed.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/include_preprocessed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/insert_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/insert_impl.hpp
index 03a304b580f..03a304b580f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/insert_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/insert_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/inserter_algorithm.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/inserter_algorithm.hpp
index 20ae8161c7d..20ae8161c7d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/inserter_algorithm.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/inserter_algorithm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/integral_wrapper.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/integral_wrapper.hpp
index 6bc05f7e96e..6bc05f7e96e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/integral_wrapper.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/integral_wrapper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/is_msvc_eti_arg.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/is_msvc_eti_arg.hpp
index 4989940bad9..4989940bad9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/is_msvc_eti_arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/is_msvc_eti_arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/iter_apply.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_apply.hpp
index 41dfdfadd5e..41dfdfadd5e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/iter_apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/iter_fold_if_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_if_impl.hpp
index 6372e83de44..6372e83de44 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_impl.hpp
index b4d2922f51a..b4d2922f51a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_arity_param.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_arity_param.hpp
index 63cfcd4f171..63cfcd4f171 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_arity_param.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_arity_param.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_no_ctps.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_no_ctps.hpp
index 9e0d0203a7b..9e0d0203a7b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_spec.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_spec.hpp
index 6ffacc0a6db..6ffacc0a6db 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_spec.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_spec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_support.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_support.hpp
index 5b2af585835..5b2af585835 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/lambda_support.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/lambda_support.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/largest_int.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/largest_int.hpp
index feaa1eca726..feaa1eca726 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/largest_int.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/largest_int.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/logical_op.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/logical_op.hpp
index 0ba2510262f..0ba2510262f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/logical_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/logical_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_dtw.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_dtw.hpp
index d595b231f3f..d595b231f3f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_dtw.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_dtw.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_eti_base.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_eti_base.hpp
index 0d8ace69644..0d8ace69644 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_eti_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_eti_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_is_class.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_is_class.hpp
index acd40e33077..acd40e33077 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_is_class.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_is_class.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_never_true.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_never_true.hpp
index 2df9b811728..2df9b811728 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_never_true.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_never_true.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_type.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_type.hpp
index bea244f319e..bea244f319e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/msvc_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/msvc_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/na.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/na.hpp
index f079c1e78cd..f079c1e78cd 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/na.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/na.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/na_assert.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/na_assert.hpp
index 1983c09061e..1983c09061e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/na_assert.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/na_assert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/na_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/na_fwd.hpp
index 43882419397..43882419397 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/na_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/na_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/na_spec.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/na_spec.hpp
index d052fce18ea..d052fce18ea 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/na_spec.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/na_spec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/nested_type_wknd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/nested_type_wknd.hpp
index 4207abdbc54..4207abdbc54 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/nested_type_wknd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/nested_type_wknd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/nttp_decl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/nttp_decl.hpp
index 8c344d874d7..8c344d874d7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/nttp_decl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/nttp_decl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/numeric_cast_utils.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_cast_utils.hpp
index a7ac85a99d7..a7ac85a99d7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/numeric_cast_utils.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_cast_utils.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/numeric_op.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_op.hpp
index 54925570136..54925570136 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/numeric_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/numeric_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/overload_names.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/overload_names.hpp
index f9bbb3916b0..f9bbb3916b0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/overload_names.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/overload_names.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp
index 26de94cea1a..26de94cea1a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_backward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp
index b137cc72af1..b137cc72af1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/advance_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/and.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/and.hpp
index 010ad1fc849..010ad1fc849 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/and.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp
index e08eaccf03a..e08eaccf03a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp
index b2ed5d51301..b2ed5d51301 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp
index 34d51a1a587..34d51a1a587 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/apply_wrap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp
index 6f2f8a80709..6f2f8a80709 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp
index b0702324aaf..b0702324aaf 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp
index 0e9513a649a..0e9513a649a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp
index c4a5060ff8b..c4a5060ff8b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bind_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp
index 0bbf54ea26d..0bbf54ea26d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp
index 55b31cb8a9c..55b31cb8a9c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp
index ec1939151d0..ec1939151d0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/bitxor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp
index de67398a37c..de67398a37c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/deque.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp
index 86f16826f79..86f16826f79 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/divides.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp
index 62c994589f4..62c994589f4 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp
index 9e7a29300d6..9e7a29300d6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp
index e3eef71b1ea..e3eef71b1ea 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp
index 14d8e08bff0..14d8e08bff0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp
index 2603f9184a0..2603f9184a0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/greater_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp
index 00f31c42268..00f31c42268 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/inherit.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp
index 695179584d3..695179584d3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp
index 805790e86d6..805790e86d6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp
index 890a198a464..890a198a464 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/less.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less.hpp
index 4fe3cd17c49..4fe3cd17c49 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/less.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp
index ca2894f6f93..ca2894f6f93 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/list.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list.hpp
index 4e8ad53d212..4e8ad53d212 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp
index 0b48a7f8e11..0b48a7f8e11 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/list_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/map.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/map.hpp
index 837e0137718..837e0137718 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/map.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp
index 71d49137660..71d49137660 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/minus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp
index 224b34930c9..224b34930c9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/modulus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp
index 98b21b1e22d..98b21b1e22d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/not_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/or.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/or.hpp
index 31e1aaa4e60..31e1aaa4e60 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/or.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp
index ff97364b9ba..ff97364b9ba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/placeholders.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp
index a9f6ee79a5c..a9f6ee79a5c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/plus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp
index 020f093965a..020f093965a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/quote.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp
index c468684c91e..c468684c91e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp
index 658f92a7c38..658f92a7c38 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/set.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set.hpp
index 5721922e111..5721922e111 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/set.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp
index cbeb932c13d..cbeb932c13d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/set_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp
index b5b181ce196..b5b181ce196 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_left.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp
index f7a342e989a..f7a342e989a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/shift_right.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
index daec4b8a8e1..daec4b8a8e1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/times.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/times.hpp
index cb97cc4e132..cb97cc4e132 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/times.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp
index 2194ce9d11b..2194ce9d11b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/unpack_args.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp
index bfa9565a537..bfa9565a537 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp
index 0f1560d7f13..0f1560d7f13 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/gcc/vector_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp
index 26de94cea1a..26de94cea1a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_backward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp
index b137cc72af1..b137cc72af1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/advance_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp
index 555c8001678..555c8001678 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp
index 9838e799b57..9838e799b57 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp
index 7de6dad088b..7de6dad088b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp
index efa213dfedc..efa213dfedc 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/apply_wrap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp
index 6f2f8a80709..6f2f8a80709 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp
index 254e5b8886c..254e5b8886c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp
index 12062b425b7..12062b425b7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp
index c4a5060ff8b..c4a5060ff8b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bind_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp
index 020d6ba4c67..020d6ba4c67 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp
index 04748776754..04748776754 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp
index 42a9758bbdd..42a9758bbdd 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/bitxor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp
index a0445d9dfdd..a0445d9dfdd 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/deque.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp
index 00636dcbf2d..00636dcbf2d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/divides.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp
index b14cdda3b96..b14cdda3b96 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp
index 58066d81f61..58066d81f61 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp
index bf818731eba..bf818731eba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp
index 6fdf8badbe6..6fdf8badbe6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp
index f848eef98c2..f848eef98c2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/greater_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp
index 233a1ec30c2..233a1ec30c2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/inherit.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp
index 695179584d3..695179584d3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp
index 50ea754f2ec..50ea754f2ec 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp
index 890a198a464..890a198a464 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp
index 7fb35e10771..7fb35e10771 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp
index 206ecdcf937..206ecdcf937 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp
index e5ea456c9e2..e5ea456c9e2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp
index ab25482f55d..ab25482f55d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp
index 970e0b76028..970e0b76028 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp
index 7b49450a554..7b49450a554 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/minus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp
index 8badbab5b12..8badbab5b12 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/modulus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp
index d87d8cd11ed..d87d8cd11ed 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/not_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp
index 3f7394e7ccd..3f7394e7ccd 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp
index ff97364b9ba..ff97364b9ba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/placeholders.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp
index a55b24c4508..a55b24c4508 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/plus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp
index b85880ffddb..b85880ffddb 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/quote.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp
index 7a07414adff..7a07414adff 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp
index 39a4057b77d..39a4057b77d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp
index 95aaa5cbdfa..95aaa5cbdfa 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp
index 1ff34f9032a..1ff34f9032a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/set_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp
index d14a5e48860..d14a5e48860 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_left.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp
index 08c4915ebd0..08c4915ebd0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/shift_right.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp
index 1164f0f8c27..1164f0f8c27 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp
index fd773cc842b..fd773cc842b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp
index 26533dd4236..26533dd4236 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/unpack_args.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp
index a6c7b6219a6..a6c7b6219a6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp
index c522d0826ff..c522d0826ff 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp
index 26de94cea1a..26de94cea1a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_backward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp
index b137cc72af1..b137cc72af1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/advance_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp
index 010ad1fc849..010ad1fc849 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp
index e08eaccf03a..e08eaccf03a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp
index b2ed5d51301..b2ed5d51301 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp
index 34d51a1a587..34d51a1a587 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/apply_wrap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp
index 6f2f8a80709..6f2f8a80709 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp
index 095b84dd9b1..095b84dd9b1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/basic_bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp
index 28914408ab2..28914408ab2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp
index c4a5060ff8b..c4a5060ff8b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bind_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp
index 282771bce55..282771bce55 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp
index bc9c1989db1..bc9c1989db1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp
index 76ce540b4ee..76ce540b4ee 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/bitxor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp
index de67398a37c..de67398a37c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/deque.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp
index 9bc7fb192a0..9bc7fb192a0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/divides.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
index fa2dc4a25ac..fa2dc4a25ac 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp
index 9e7a29300d6..9e7a29300d6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp
index bf818731eba..bf818731eba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp
index faa3f2ba9a1..faa3f2ba9a1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp
index 392d142d920..392d142d920 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/greater_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp
index 00f31c42268..00f31c42268 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/inherit.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp
index 695179584d3..695179584d3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp
index 805790e86d6..805790e86d6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp
index 890a198a464..890a198a464 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp
index 6451680fe80..6451680fe80 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp
index 00ae0d3ecb5..00ae0d3ecb5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp
index 4e8ad53d212..4e8ad53d212 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp
index 0b48a7f8e11..0b48a7f8e11 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/list_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp
index 837e0137718..837e0137718 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp
index bb67c59a52b..bb67c59a52b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/minus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp
index 6fd0cab37a5..6fd0cab37a5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/modulus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp
index 7c940a5b076..7c940a5b076 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/not_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp
index 31e1aaa4e60..31e1aaa4e60 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp
index ff97364b9ba..ff97364b9ba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/placeholders.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp
index cecead75abc..cecead75abc 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/plus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp
index e7a7f001961..e7a7f001961 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/quote.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp
index c468684c91e..c468684c91e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp
index 658f92a7c38..658f92a7c38 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp
index 5721922e111..5721922e111 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp
index cbeb932c13d..cbeb932c13d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/set_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp
index 7ef46725226..7ef46725226 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_left.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp
index 91a98f7385b..91a98f7385b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/shift_right.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp
index 1164f0f8c27..1164f0f8c27 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/template_arity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp
index d019b572479..d019b572479 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp
index 2194ce9d11b..2194ce9d11b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/unpack_args.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp
index bfa9565a537..bfa9565a537 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp
index 0f1560d7f13..0f1560d7f13 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/no_ttp/vector_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp
index 26de94cea1a..26de94cea1a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp
index b137cc72af1..b137cc72af1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/and.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/and.hpp
index 163913f81a3..163913f81a3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/and.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply.hpp
index 89d9e4b4ea7..89d9e4b4ea7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp
index b2ed5d51301..b2ed5d51301 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp
index 34d51a1a587..34d51a1a587 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/apply_wrap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/arg.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/arg.hpp
index 6f2f8a80709..6f2f8a80709 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp
index b0702324aaf..b0702324aaf 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind.hpp
index 0e9513a649a..0e9513a649a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp
index c4a5060ff8b..c4a5060ff8b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bind_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp
index ee40fb3d3f7..ee40fb3d3f7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp
index 1e28d3b07eb..1e28d3b07eb 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp
index 2ba879d67b1..2ba879d67b1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/bitxor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/deque.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/deque.hpp
index de67398a37c..de67398a37c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/deque.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/deque.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/divides.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/divides.hpp
index f365d62dfaf..f365d62dfaf 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/divides.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/divides.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp
index bbc6bf0dc1d..bbc6bf0dc1d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp
index 9e7a29300d6..9e7a29300d6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp
index bf818731eba..bf818731eba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/greater.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater.hpp
index 38c8bb3add4..38c8bb3add4 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp
index 2aa8370f0ff..2aa8370f0ff 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/greater_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp
index 8b34e718c34..8b34e718c34 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/inherit.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp
index 695179584d3..695179584d3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp
index 805790e86d6..805790e86d6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp
index f8f109c2bda..f8f109c2bda 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/less.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less.hpp
index 928d0e3087e..928d0e3087e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/less.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp
index 364cd967a7c..364cd967a7c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/list.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list.hpp
index 4e8ad53d212..4e8ad53d212 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp
index 0b48a7f8e11..0b48a7f8e11 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/list_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/map.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/map.hpp
index 837e0137718..837e0137718 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/map.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/minus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/minus.hpp
index 0b8b5ceeb7d..0b8b5ceeb7d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/minus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/minus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp
index 6a64e49a81c..6a64e49a81c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/modulus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp
index c08d7f06d7e..c08d7f06d7e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/not_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/or.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/or.hpp
index 986b2e0ea4b..986b2e0ea4b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/or.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp
index ff97364b9ba..ff97364b9ba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/placeholders.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/plus.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/plus.hpp
index ed2e432dc88..ed2e432dc88 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/plus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/plus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/quote.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/quote.hpp
index d7d0420e4d8..d7d0420e4d8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/quote.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/quote.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp
index c468684c91e..c468684c91e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp
index 658f92a7c38..658f92a7c38 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/set.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set.hpp
index 5721922e111..5721922e111 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/set.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp
index cbeb932c13d..cbeb932c13d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/set_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp
index cf9c837d6a5..cf9c837d6a5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_left.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp
index 477229f24e2..477229f24e2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/shift_right.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp
index a23fc238467..a23fc238467 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/template_arity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/times.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/times.hpp
index ca88d405f05..ca88d405f05 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/times.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp
index 2194ce9d11b..2194ce9d11b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/unpack_args.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/vector.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector.hpp
index bfa9565a537..bfa9565a537 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp
index 0f1560d7f13..0f1560d7f13 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessed/plain/vector_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/add.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/add.hpp
index 53e646ef6ab..53e646ef6ab 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/add.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/add.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp
index cab3989d1c9..cab3989d1c9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/def_params_tail.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/default_params.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/default_params.hpp
index c3548c6c9b6..c3548c6c9b6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/default_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/default_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/enum.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/enum.hpp
index 64c5e6a8f6b..64c5e6a8f6b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/ext_params.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/ext_params.hpp
index f5e6e502cd5..f5e6e502cd5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/ext_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/ext_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/filter_params.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/filter_params.hpp
index 7c0df4f7d51..7c0df4f7d51 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/filter_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/filter_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/is_seq.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/is_seq.hpp
index cb6dcb98c17..cb6dcb98c17 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/is_seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/is_seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/params.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/params.hpp
index acad321903f..acad321903f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/params.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp
index de5535cea8f..de5535cea8f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/partial_spec_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/range.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/range.hpp
index d66eeb559c8..d66eeb559c8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/range.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/repeat.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/repeat.hpp
index 05113676658..05113676658 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/repeat.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/repeat.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/sub.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/sub.hpp
index c794c749fac..c794c749fac 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/sub.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/sub.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/token_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/token_equal.hpp
index ffdb20f9e43..ffdb20f9e43 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/token_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/token_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/tuple.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/tuple.hpp
index 755bbc58e47..755bbc58e47 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/preprocessor/tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/preprocessor/tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/ptr_to_ref.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/ptr_to_ref.hpp
index 8517b302942..8517b302942 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/ptr_to_ref.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/ptr_to_ref.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/push_back_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/push_back_impl.hpp
index 27e7a604434..27e7a604434 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/push_back_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/push_back_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/push_front_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/push_front_impl.hpp
index 5b83ee76454..5b83ee76454 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/push_front_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/push_front_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl.hpp
index a27a35fa139..a27a35fa139 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_fold_impl_body.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl_body.hpp
index 0f800106674..0f800106674 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_fold_impl_body.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_fold_impl_body.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp
index 83182a2e904..83182a2e904 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/reverse_iter_fold_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/sequence_wrapper.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/sequence_wrapper.hpp
index 3f5e553039c..3f5e553039c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/sequence_wrapper.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/sequence_wrapper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/size_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/size_impl.hpp
index 50f5ee91895..50f5ee91895 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/size_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/size_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/static_cast.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/static_cast.hpp
index f72d1c7c9b3..f72d1c7c9b3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/static_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/static_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/template_arity.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity.hpp
index f0111598256..f0111598256 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/template_arity.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/template_arity_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity_fwd.hpp
index 19d63a39616..19d63a39616 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/template_arity_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/template_arity_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/traits_lambda_spec.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/traits_lambda_spec.hpp
index 4a7ff26b58e..4a7ff26b58e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/traits_lambda_spec.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/traits_lambda_spec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/type_wrapper.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/type_wrapper.hpp
index f3ac3079a9a..f3ac3079a9a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/type_wrapper.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/type_wrapper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/unwrap.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/unwrap.hpp
index caeb97d7d37..caeb97d7d37 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/unwrap.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/unwrap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/value_wknd.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/value_wknd.hpp
index 23fefde0219..23fefde0219 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/value_wknd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/value_wknd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/aux_/yes_no.hpp b/src/third_party/boost-1.69.0/boost/mpl/aux_/yes_no.hpp
index 21a18a21c28..21a18a21c28 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/aux_/yes_no.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/aux_/yes_no.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/back_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/back_fwd.hpp
index 119722c31ab..119722c31ab 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/back_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/back_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/back_inserter.hpp b/src/third_party/boost-1.69.0/boost/mpl/back_inserter.hpp
index 8fc4083c3a9..8fc4083c3a9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/back_inserter.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/back_inserter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/base.hpp b/src/third_party/boost-1.69.0/boost/mpl/base.hpp
index 8f438490ef8..8f438490ef8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/base.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/begin.hpp b/src/third_party/boost-1.69.0/boost/mpl/begin.hpp
index 15bdf7e3885..15bdf7e3885 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/begin_end.hpp b/src/third_party/boost-1.69.0/boost/mpl/begin_end.hpp
index b7074afd205..b7074afd205 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/begin_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/begin_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/begin_end_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/begin_end_fwd.hpp
index 70ef9efec43..70ef9efec43 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/begin_end_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/begin_end_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/bind.hpp b/src/third_party/boost-1.69.0/boost/mpl/bind.hpp
index 63ee3f27e2e..63ee3f27e2e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/bind.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/bind.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/bind_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/bind_fwd.hpp
index 4746edd60b3..4746edd60b3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/bind_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/bind_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/bool.hpp b/src/third_party/boost-1.69.0/boost/mpl/bool.hpp
index 0a6180cedf0..0a6180cedf0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/bool.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/bool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/bool_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/bool_fwd.hpp
index e6292528487..e6292528487 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/bool_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/bool_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/clear.hpp b/src/third_party/boost-1.69.0/boost/mpl/clear.hpp
index c6b95edf4b7..c6b95edf4b7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/clear.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/clear.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/clear_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/clear_fwd.hpp
index d14a1d2b248..d14a1d2b248 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/clear_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/clear_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/comparison.hpp b/src/third_party/boost-1.69.0/boost/mpl/comparison.hpp
index 99dca9dd809..99dca9dd809 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/comparison.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/comparison.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/contains.hpp b/src/third_party/boost-1.69.0/boost/mpl/contains.hpp
index 02c2aa4f8bc..02c2aa4f8bc 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/contains.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/contains.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/contains_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/contains_fwd.hpp
index c7c667285df..c7c667285df 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/contains_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/contains_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/deref.hpp b/src/third_party/boost-1.69.0/boost/mpl/deref.hpp
index 1105ec9038d..1105ec9038d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/deref.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/deref.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/distance.hpp b/src/third_party/boost-1.69.0/boost/mpl/distance.hpp
index 95f4f33510c..95f4f33510c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/distance.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/distance.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/distance_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/distance_fwd.hpp
index a69a7c5140c..a69a7c5140c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/distance_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/distance_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/divides.hpp b/src/third_party/boost-1.69.0/boost/mpl/divides.hpp
index 55c8b0d10a7..55c8b0d10a7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/divides.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/divides.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/empty.hpp b/src/third_party/boost-1.69.0/boost/mpl/empty.hpp
index 1185324c1b6..1185324c1b6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/empty_base.hpp b/src/third_party/boost-1.69.0/boost/mpl/empty_base.hpp
index cb56ef676c3..cb56ef676c3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/empty_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/empty_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/empty_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/empty_fwd.hpp
index 551c9660aba..551c9660aba 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/empty_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/empty_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/end.hpp b/src/third_party/boost-1.69.0/boost/mpl/end.hpp
index cb8d525f51f..cb8d525f51f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/end.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/equal_to.hpp
index 5dfc87dbe2a..5dfc87dbe2a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/erase_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/erase_fwd.hpp
index 44e38eac287..44e38eac287 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/erase_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/erase_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/erase_key_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/erase_key_fwd.hpp
index 54265eef812..54265eef812 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/erase_key_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/erase_key_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/eval_if.hpp b/src/third_party/boost-1.69.0/boost/mpl/eval_if.hpp
index e892703fd86..e892703fd86 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/eval_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/eval_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/find.hpp b/src/third_party/boost-1.69.0/boost/mpl/find.hpp
index 31a8b0eb897..31a8b0eb897 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/find.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/find.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/find_if.hpp b/src/third_party/boost-1.69.0/boost/mpl/find_if.hpp
index 83a007e77e6..83a007e77e6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/find_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/find_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/fold.hpp b/src/third_party/boost-1.69.0/boost/mpl/fold.hpp
index 0bc67ef3d66..0bc67ef3d66 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/fold.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/fold.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/for_each.hpp b/src/third_party/boost-1.69.0/boost/mpl/for_each.hpp
index 6b40ce1663c..6b40ce1663c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/for_each.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/for_each.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/front.hpp b/src/third_party/boost-1.69.0/boost/mpl/front.hpp
index b222ff25418..b222ff25418 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/front.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/front_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/front_fwd.hpp
index f01282a77bb..f01282a77bb 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/front_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/front_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/front_inserter.hpp b/src/third_party/boost-1.69.0/boost/mpl/front_inserter.hpp
index 0a6b197ef80..0a6b197ef80 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/front_inserter.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/front_inserter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/greater.hpp b/src/third_party/boost-1.69.0/boost/mpl/greater.hpp
index b1f0a2cf13b..b1f0a2cf13b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/greater_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/greater_equal.hpp
index 7a06a62e8e4..7a06a62e8e4 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/greater_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/greater_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/has_key.hpp b/src/third_party/boost-1.69.0/boost/mpl/has_key.hpp
index ac3a5c7bb18..ac3a5c7bb18 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/has_key.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/has_key.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/has_key_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/has_key_fwd.hpp
index 54b7ed622dc..54b7ed622dc 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/has_key_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/has_key_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/has_xxx.hpp b/src/third_party/boost-1.69.0/boost/mpl/has_xxx.hpp
index 82e67ddca4c..82e67ddca4c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/has_xxx.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/has_xxx.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/identity.hpp b/src/third_party/boost-1.69.0/boost/mpl/identity.hpp
index 190d2f53f6f..190d2f53f6f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/identity.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/identity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/if.hpp b/src/third_party/boost-1.69.0/boost/mpl/if.hpp
index b6bdf6c6922..b6bdf6c6922 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/if.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/inherit.hpp b/src/third_party/boost-1.69.0/boost/mpl/inherit.hpp
index b5427371d95..b5427371d95 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/inherit.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/inherit.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/insert.hpp b/src/third_party/boost-1.69.0/boost/mpl/insert.hpp
index 5e379a49788..5e379a49788 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/insert.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/insert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/insert_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/insert_fwd.hpp
index ba6b1617603..ba6b1617603 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/insert_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/insert_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/insert_range_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/insert_range_fwd.hpp
index d9c946f2a9a..d9c946f2a9a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/insert_range_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/insert_range_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/inserter.hpp b/src/third_party/boost-1.69.0/boost/mpl/inserter.hpp
index 964df7f692a..964df7f692a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/inserter.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/inserter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/int.hpp b/src/third_party/boost-1.69.0/boost/mpl/int.hpp
index b7fa0a765f5..b7fa0a765f5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/int.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/int.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/int_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/int_fwd.hpp
index 03d20c1cd6f..03d20c1cd6f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/int_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/int_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/integral_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/integral_c.hpp
index 7a692dcab64..7a692dcab64 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/integral_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/integral_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/integral_c_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/integral_c_fwd.hpp
index 05e311daa18..05e311daa18 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/integral_c_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/integral_c_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/integral_c_tag.hpp b/src/third_party/boost-1.69.0/boost/mpl/integral_c_tag.hpp
index b6046920f8f..b6046920f8f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/integral_c_tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/integral_c_tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/is_placeholder.hpp b/src/third_party/boost-1.69.0/boost/mpl/is_placeholder.hpp
index 9f79ef102ce..9f79ef102ce 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/is_placeholder.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/is_placeholder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/is_sequence.hpp b/src/third_party/boost-1.69.0/boost/mpl/is_sequence.hpp
index 68e036fa918..68e036fa918 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/is_sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/is_sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/iter_fold.hpp b/src/third_party/boost-1.69.0/boost/mpl/iter_fold.hpp
index 1b56b790405..1b56b790405 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/iter_fold.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/iter_fold.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/iter_fold_if.hpp b/src/third_party/boost-1.69.0/boost/mpl/iter_fold_if.hpp
index 0115b7b2244..0115b7b2244 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/iter_fold_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/iter_fold_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/iterator_category.hpp b/src/third_party/boost-1.69.0/boost/mpl/iterator_category.hpp
index d5ea4afee34..d5ea4afee34 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/iterator_category.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/iterator_category.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/iterator_range.hpp b/src/third_party/boost-1.69.0/boost/mpl/iterator_range.hpp
index a637e2241a4..a637e2241a4 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/iterator_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/iterator_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/iterator_tags.hpp b/src/third_party/boost-1.69.0/boost/mpl/iterator_tags.hpp
index 7c3116ab45b..7c3116ab45b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/iterator_tags.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/iterator_tags.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/key_type_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/key_type_fwd.hpp
index 1e86b782c5d..1e86b782c5d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/key_type_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/key_type_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/lambda.hpp b/src/third_party/boost-1.69.0/boost/mpl/lambda.hpp
index cc8f6075ce5..cc8f6075ce5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/lambda.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/lambda.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/lambda_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/lambda_fwd.hpp
index 57b04264107..57b04264107 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/lambda_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/lambda_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/less.hpp b/src/third_party/boost-1.69.0/boost/mpl/less.hpp
index 63da5aa4efa..63da5aa4efa 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/less.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/less_equal.hpp b/src/third_party/boost-1.69.0/boost/mpl/less_equal.hpp
index 3d668c27907..3d668c27907 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/limits/arity.hpp b/src/third_party/boost-1.69.0/boost/mpl/limits/arity.hpp
index 8c3eb362ce7..8c3eb362ce7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/limits/arity.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/limits/arity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/limits/list.hpp b/src/third_party/boost-1.69.0/boost/mpl/limits/list.hpp
index b22d6a7b813..b22d6a7b813 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/limits/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/limits/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/limits/unrolling.hpp b/src/third_party/boost-1.69.0/boost/mpl/limits/unrolling.hpp
index 6dba94222e8..6dba94222e8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/limits/unrolling.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/limits/unrolling.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/limits/vector.hpp b/src/third_party/boost-1.69.0/boost/mpl/limits/vector.hpp
index 9007589168c..9007589168c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/limits/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/limits/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list.hpp b/src/third_party/boost-1.69.0/boost/mpl/list.hpp
index cff8a4ddd8a..cff8a4ddd8a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/O1_size.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/O1_size.hpp
index ccbc3f1b320..ccbc3f1b320 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/O1_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/O1_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/begin_end.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/begin_end.hpp
index b568bee21c2..b568bee21c2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/begin_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/begin_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/clear.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/clear.hpp
index b16162f7c07..b16162f7c07 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/clear.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/clear.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/empty.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/empty.hpp
index 95f9243947c..95f9243947c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/front.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/front.hpp
index 9bea1fd3426..9bea1fd3426 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/front.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/include_preprocessed.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/include_preprocessed.hpp
index 4f7cab26091..4f7cab26091 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/include_preprocessed.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/include_preprocessed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/item.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/item.hpp
index 8505deb2848..8505deb2848 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/item.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/item.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/iterator.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/iterator.hpp
index 6b5ea786305..6b5ea786305 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/numbered.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered.hpp
index 0cd49a6d36e..0cd49a6d36e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/numbered.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/numbered_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered_c.hpp
index 0006fd6cfcd..0006fd6cfcd 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/numbered_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/numbered_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/pop_front.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/pop_front.hpp
index 46a04145692..46a04145692 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/pop_front.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/pop_front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
index 99368d2c18a..99368d2c18a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
index 7133d712167..7133d712167 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list10_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
index 750e495f3fe..750e495f3fe 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
index 7f15acf3e96..7f15acf3e96 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list20_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
index 54591011961..54591011961 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
index 5393d792bdb..5393d792bdb 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list30_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
index 68c67613648..68c67613648 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
index 0c51ba20956..0c51ba20956 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list40_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
index 4cc22da278c..4cc22da278c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
index 28c061d5bf3..28c061d5bf3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/preprocessed/plain/list50_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/push_back.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_back.hpp
index 8f3b73e430c..8f3b73e430c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/push_back.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_back.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/push_front.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_front.hpp
index fcfbe4ab3e3..fcfbe4ab3e3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/push_front.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/push_front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/size.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/size.hpp
index f5e7feafda2..f5e7feafda2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/tag.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/tag.hpp
index f5ed2bbfe62..f5ed2bbfe62 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/aux_/tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/aux_/tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list0.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list0.hpp
index 8e06b8d0885..8e06b8d0885 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list0.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list0_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list0_c.hpp
index 807ca1c2c9f..807ca1c2c9f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list0_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list0_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list10.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list10.hpp
index d32d0d8c77f..d32d0d8c77f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list10.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list10_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list10_c.hpp
index 25c8f9defb1..25c8f9defb1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list10_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list10_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list20.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list20.hpp
index 724cabd2373..724cabd2373 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list20.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list20_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list20_c.hpp
index 0026f695ac7..0026f695ac7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list20_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list20_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list30.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list30.hpp
index a9004c7376e..a9004c7376e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list30.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list30_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list30_c.hpp
index c9965747780..c9965747780 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list30_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list30_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list40.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list40.hpp
index 02f869efbe2..02f869efbe2 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list40.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list40_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list40_c.hpp
index 808d599dd9d..808d599dd9d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list40_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list40_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list50.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list50.hpp
index f16c68cebab..f16c68cebab 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list50.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/list/list50_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/list/list50_c.hpp
index 20692d898ef..20692d898ef 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/list/list50_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/list/list50_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/logical.hpp b/src/third_party/boost-1.69.0/boost/mpl/logical.hpp
index c8236b5fe8e..c8236b5fe8e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/logical.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/logical.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/long.hpp b/src/third_party/boost-1.69.0/boost/mpl/long.hpp
index c455267341d..c455267341d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/long.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/long.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/long_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/long_fwd.hpp
index 5f62f2b81ce..5f62f2b81ce 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/long_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/long_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/max.hpp b/src/third_party/boost-1.69.0/boost/mpl/max.hpp
index 4a4c8c1c086..4a4c8c1c086 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/max.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/max.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/min_max.hpp b/src/third_party/boost-1.69.0/boost/mpl/min_max.hpp
index 77545cd352c..77545cd352c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/min_max.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/min_max.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/minus.hpp b/src/third_party/boost-1.69.0/boost/mpl/minus.hpp
index 9f29f74b545..9f29f74b545 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/minus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/minus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/multiplies.hpp b/src/third_party/boost-1.69.0/boost/mpl/multiplies.hpp
index 53c39d98a49..53c39d98a49 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/multiplies.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/multiplies.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/negate.hpp b/src/third_party/boost-1.69.0/boost/mpl/negate.hpp
index d6aa0654596..d6aa0654596 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/negate.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/negate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/next.hpp b/src/third_party/boost-1.69.0/boost/mpl/next.hpp
index 954b2226c6b..954b2226c6b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/next.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/next.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/next_prior.hpp b/src/third_party/boost-1.69.0/boost/mpl/next_prior.hpp
index d45fa20eaad..d45fa20eaad 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/next_prior.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/next_prior.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/not.hpp b/src/third_party/boost-1.69.0/boost/mpl/not.hpp
index d5f6025579b..d5f6025579b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/not.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/not.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/not_equal_to.hpp b/src/third_party/boost-1.69.0/boost/mpl/not_equal_to.hpp
index 11ef3424c91..11ef3424c91 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/not_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/not_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/numeric_cast.hpp b/src/third_party/boost-1.69.0/boost/mpl/numeric_cast.hpp
index 6541470445c..6541470445c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/numeric_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/numeric_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/or.hpp b/src/third_party/boost-1.69.0/boost/mpl/or.hpp
index f9704d5166c..f9704d5166c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/or.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/pair.hpp b/src/third_party/boost-1.69.0/boost/mpl/pair.hpp
index 67c01d73ced..67c01d73ced 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/pair.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/pair.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/pair_view.hpp b/src/third_party/boost-1.69.0/boost/mpl/pair_view.hpp
index a72cf9287a4..a72cf9287a4 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/pair_view.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/pair_view.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/placeholders.hpp b/src/third_party/boost-1.69.0/boost/mpl/placeholders.hpp
index df0373ca572..df0373ca572 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/placeholders.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/placeholders.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/plus.hpp b/src/third_party/boost-1.69.0/boost/mpl/plus.hpp
index 455920b5d11..455920b5d11 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/plus.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/plus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/pop_back_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/pop_back_fwd.hpp
index 70957046cd6..70957046cd6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/pop_back_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/pop_back_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/pop_front_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/pop_front_fwd.hpp
index 719c8b218a7..719c8b218a7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/pop_front_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/pop_front_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/print.hpp b/src/third_party/boost-1.69.0/boost/mpl/print.hpp
index 36e25cd3e7d..36e25cd3e7d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/print.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/print.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/prior.hpp b/src/third_party/boost-1.69.0/boost/mpl/prior.hpp
index 849802cfa1e..849802cfa1e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/prior.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/prior.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/protect.hpp b/src/third_party/boost-1.69.0/boost/mpl/protect.hpp
index 80574c27501..80574c27501 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/protect.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/protect.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/push_back.hpp b/src/third_party/boost-1.69.0/boost/mpl/push_back.hpp
index 95a2587be6b..95a2587be6b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/push_back.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/push_back.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/push_back_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/push_back_fwd.hpp
index 7a4f7a754ac..7a4f7a754ac 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/push_back_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/push_back_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/push_front.hpp b/src/third_party/boost-1.69.0/boost/mpl/push_front.hpp
index e4d0dfb7fb9..e4d0dfb7fb9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/push_front.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/push_front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/push_front_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/push_front_fwd.hpp
index d6ad5af572b..d6ad5af572b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/push_front_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/push_front_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/quote.hpp b/src/third_party/boost-1.69.0/boost/mpl/quote.hpp
index 242c2e7afb4..242c2e7afb4 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/quote.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/quote.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/remove_if.hpp b/src/third_party/boost-1.69.0/boost/mpl/remove_if.hpp
index bbe6564b094..bbe6564b094 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/remove_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/remove_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/reverse_fold.hpp b/src/third_party/boost-1.69.0/boost/mpl/reverse_fold.hpp
index 87c26a9a845..87c26a9a845 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/reverse_fold.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/reverse_fold.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/reverse_iter_fold.hpp b/src/third_party/boost-1.69.0/boost/mpl/reverse_iter_fold.hpp
index 348f295ee79..348f295ee79 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/reverse_iter_fold.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/reverse_iter_fold.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/same_as.hpp b/src/third_party/boost-1.69.0/boost/mpl/same_as.hpp
index 4be20bc33e9..4be20bc33e9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/same_as.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/same_as.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/sequence_tag.hpp b/src/third_party/boost-1.69.0/boost/mpl/sequence_tag.hpp
index f87d92b28b5..f87d92b28b5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/sequence_tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/sequence_tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/sequence_tag_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/sequence_tag_fwd.hpp
index 4b0ed6f6b70..4b0ed6f6b70 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/sequence_tag_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/sequence_tag_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/at_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/at_impl.hpp
index 89119c4a599..89119c4a599 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/at_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/at_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/begin_end_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/begin_end_impl.hpp
index 2595280532d..2595280532d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/begin_end_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/begin_end_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/clear_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/clear_impl.hpp
index 9c6c76030a6..9c6c76030a6 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/clear_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/clear_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/empty_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/empty_impl.hpp
index 997ff023a25..997ff023a25 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/empty_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/empty_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/erase_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_impl.hpp
index c4a95b4a85a..c4a95b4a85a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/erase_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/erase_key_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_key_impl.hpp
index f945d4fb3da..f945d4fb3da 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/erase_key_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/erase_key_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/has_key_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/has_key_impl.hpp
index bdc3273181f..bdc3273181f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/has_key_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/has_key_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/insert_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_impl.hpp
index ff180acaa86..ff180acaa86 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/insert_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/insert_range_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_range_impl.hpp
index f7150a87146..f7150a87146 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/insert_range_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/insert_range_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/item.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/item.hpp
index bd5bc953f4d..bd5bc953f4d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/item.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/item.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/iterator.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/iterator.hpp
index 9a58a25f2ee..9a58a25f2ee 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/key_type_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/key_type_impl.hpp
index 8e8a0905447..8e8a0905447 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/key_type_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/key_type_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/set0.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/set0.hpp
index 65f52a8170b..65f52a8170b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/set0.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/set0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/size_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/size_impl.hpp
index e865596698b..e865596698b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/size_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/size_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/tag.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/tag.hpp
index f11fc2bbebb..f11fc2bbebb 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/value_type_impl.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/value_type_impl.hpp
index 91cf0d00cf8..91cf0d00cf8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/aux_/value_type_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/aux_/value_type_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/set/set0.hpp b/src/third_party/boost-1.69.0/boost/mpl/set/set0.hpp
index 1c424e4646a..1c424e4646a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/set/set0.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/set/set0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/size.hpp b/src/third_party/boost-1.69.0/boost/mpl/size.hpp
index 12ffefbb78c..12ffefbb78c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/size_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/size_fwd.hpp
index c72628dd1e8..c72628dd1e8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/size_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/size_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/size_t.hpp b/src/third_party/boost-1.69.0/boost/mpl/size_t.hpp
index 99e9b41d0d8..99e9b41d0d8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/size_t.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/size_t.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/size_t_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/size_t_fwd.hpp
index ffdf4b32dc4..ffdf4b32dc4 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/size_t_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/size_t_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/tag.hpp b/src/third_party/boost-1.69.0/boost/mpl/tag.hpp
index 858627753d8..858627753d8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/times.hpp b/src/third_party/boost-1.69.0/boost/mpl/times.hpp
index f309557c6b5..f309557c6b5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/times.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/transform.hpp b/src/third_party/boost-1.69.0/boost/mpl/transform.hpp
index 4d3e2a0497f..4d3e2a0497f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/transform.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/transform.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/value_type_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/value_type_fwd.hpp
index d8635bfe414..d8635bfe414 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/value_type_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/value_type_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector.hpp
index 479983d5ce3..479983d5ce3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/O1_size.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/O1_size.hpp
index ac9e3cf8877..ac9e3cf8877 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/O1_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/O1_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/at.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/at.hpp
index 0a7583ccf1f..0a7583ccf1f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/at.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/at.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/back.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/back.hpp
index b66363ec115..b66363ec115 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/back.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/back.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/begin_end.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/begin_end.hpp
index aa344515669..aa344515669 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/begin_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/begin_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/clear.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/clear.hpp
index b06d8be7527..b06d8be7527 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/clear.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/clear.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/empty.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/empty.hpp
index 5490a5f72f8..5490a5f72f8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/front.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/front.hpp
index a358db52cf3..a358db52cf3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/front.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/include_preprocessed.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/include_preprocessed.hpp
index a676116f603..a676116f603 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/include_preprocessed.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/include_preprocessed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/item.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/item.hpp
index 71538ceb413..71538ceb413 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/item.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/item.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/iterator.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/iterator.hpp
index 32df3156961..32df3156961 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/numbered.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered.hpp
index b3f03873bab..b3f03873bab 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/numbered.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/numbered_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered_c.hpp
index 4c159f948c0..4c159f948c0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/numbered_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/numbered_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/pop_back.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_back.hpp
index 1d95e355c05..1d95e355c05 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/pop_back.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_back.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/pop_front.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_front.hpp
index c94b8711c47..c94b8711c47 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/pop_front.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/pop_front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp
index c79a1ac6061..c79a1ac6061 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp
index 8b36f6a3ed7..8b36f6a3ed7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector10_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp
index eb92a7814c1..eb92a7814c1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp
index 56ca53f4ea3..56ca53f4ea3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector20_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp
index a685019b486..a685019b486 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp
index 6251dbc5467..6251dbc5467 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector30_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp
index 1ed648a9d0a..1ed648a9d0a 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp
index ba0ffa88ee0..ba0ffa88ee0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector40_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp
index 3da323a998f..3da323a998f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp
index e07f2b3ad56..e07f2b3ad56 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/no_ctps/vector50_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp
index 88bbd3b318d..88bbd3b318d 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp
index 8b36f6a3ed7..8b36f6a3ed7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector10_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp
index 8c6c8bbb97c..8c6c8bbb97c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp
index 56ca53f4ea3..56ca53f4ea3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector20_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp
index b7da8e76b6f..b7da8e76b6f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp
index 6251dbc5467..6251dbc5467 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector30_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp
index 7487be4b06b..7487be4b06b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp
index ba0ffa88ee0..ba0ffa88ee0 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector40_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp
index 5a4c6d75dfe..5a4c6d75dfe 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp
index e07f2b3ad56..e07f2b3ad56 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/plain/vector50_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp
index e4c640709a1..e4c640709a1 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp
index 18eabc64daa..18eabc64daa 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector10_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp
index 78ccac4e91e..78ccac4e91e 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp
index 4bf67423062..4bf67423062 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector20_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp
index c4049906f3b..c4049906f3b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp
index 5741bb4b654..5741bb4b654 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector30_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp
index debcf7027da..debcf7027da 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp
index 88d742e0a5c..88d742e0a5c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector40_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp
index 8db06df4540..8db06df4540 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp
index f56d6aff067..f56d6aff067 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/preprocessed/typeof_based/vector50_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/push_back.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_back.hpp
index 527828c9ba3..527828c9ba3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/push_back.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_back.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/push_front.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_front.hpp
index f315de58b7c..f315de58b7c 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/push_front.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/push_front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/size.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/size.hpp
index c131e8866d8..c131e8866d8 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/tag.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/tag.hpp
index 90d16e38c08..90d16e38c08 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/vector0.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/vector0.hpp
index 402667360d3..402667360d3 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/aux_/vector0.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/aux_/vector0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector0.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector0.hpp
index 39759ddc24b..39759ddc24b 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector0.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector0.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector0_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector0_c.hpp
index 0e60215ddde..0e60215ddde 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector0_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector0_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector10.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector10.hpp
index 53a2a163ae7..53a2a163ae7 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector10.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector10.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector10_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector10_c.hpp
index be52d2f7f35..be52d2f7f35 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector10_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector10_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector20.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector20.hpp
index 96d1b9f45cd..96d1b9f45cd 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector20.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector20.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector20_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector20_c.hpp
index 3913f260269..3913f260269 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector20_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector20_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector30.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector30.hpp
index b2f0a5eb05f..b2f0a5eb05f 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector30.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector30.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector30_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector30_c.hpp
index 94cdab465a9..94cdab465a9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector30_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector30_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector40.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector40.hpp
index 2d2ef8195cc..2d2ef8195cc 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector40.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector40.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector40_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector40_c.hpp
index 25e2ebf3d26..25e2ebf3d26 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector40_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector40_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector50.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector50.hpp
index dc2d5c20a41..dc2d5c20a41 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector50.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector50.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/vector/vector50_c.hpp b/src/third_party/boost-1.69.0/boost/mpl/vector/vector50_c.hpp
index 7388bf404b9..7388bf404b9 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/vector/vector50_c.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/vector/vector50_c.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/void.hpp b/src/third_party/boost-1.69.0/boost/mpl/void.hpp
index 3dcbdd1d0ea..3dcbdd1d0ea 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/void.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/void.hpp
diff --git a/src/third_party/boost-1.68.0/boost/mpl/void_fwd.hpp b/src/third_party/boost-1.69.0/boost/mpl/void_fwd.hpp
index 86078b5c9e5..86078b5c9e5 100644
--- a/src/third_party/boost-1.68.0/boost/mpl/void_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/mpl/void_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/composite_key.hpp b/src/third_party/boost-1.69.0/boost/multi_index/composite_key.hpp
index 787cdf83195..787cdf83195 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/composite_key.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/composite_key.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/access_specifier.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/access_specifier.hpp
index f3346e836d4..f3346e836d4 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/access_specifier.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/access_specifier.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/adl_swap.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/adl_swap.hpp
index 02b06442290..02b06442290 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/adl_swap.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/adl_swap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/archive_constructed.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/archive_constructed.hpp
index 0a7a26e0d4e..0a7a26e0d4e 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/archive_constructed.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/archive_constructed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/auto_space.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/auto_space.hpp
index 911f810f8fa..911f810f8fa 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/auto_space.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/auto_space.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/base_type.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/base_type.hpp
index 8c9b62b716a..8c9b62b716a 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/base_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/base_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/bidir_node_iterator.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/bidir_node_iterator.hpp
index 9be5ec84b43..9be5ec84b43 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/bidir_node_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/bidir_node_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/bucket_array.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/bucket_array.hpp
index d9fa434d9a9..d9fa434d9a9 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/bucket_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/bucket_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/cons_stdtuple.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/cons_stdtuple.hpp
index 855c5e06aa9..855c5e06aa9 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/cons_stdtuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/cons_stdtuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/converter.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/converter.hpp
index 3e04a3e8295..3e04a3e8295 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/converter.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/converter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/copy_map.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/copy_map.hpp
index 1ab2bf00433..1ab2bf00433 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/copy_map.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/copy_map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp
index f0fa7304253..f0fa7304253 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/do_not_copy_elements_tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/duplicates_iterator.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/duplicates_iterator.hpp
index cbebf264045..cbebf264045 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/duplicates_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/duplicates_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/has_tag.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/has_tag.hpp
index 217b61143af..217b61143af 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/has_tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/has_tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_args.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_args.hpp
index 81902f5a4a5..81902f5a4a5 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_args.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_args.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_iterator.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_iterator.hpp
index 8d063002a1d..8d063002a1d 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_node.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_node.hpp
index 2be575b4693..2be575b4693 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/hash_index_node.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/hash_index_node.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/header_holder.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/header_holder.hpp
index ca8a9b2edb1..ca8a9b2edb1 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/header_holder.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/header_holder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
index ae398456d1f..ae398456d1f 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/ignore_wstrict_aliasing.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_base.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_base.hpp
index 22cf0f14027..22cf0f14027 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_loader.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_loader.hpp
index 71418a10e19..71418a10e19 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_loader.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_loader.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_matcher.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_matcher.hpp
index 34d1f9d5a8d..34d1f9d5a8d 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_matcher.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_matcher.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_node_base.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_node_base.hpp
index 1a1f0cae4be..1a1f0cae4be 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_node_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_node_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_saver.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_saver.hpp
index ae09d4eba4f..ae09d4eba4f 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/index_saver.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/index_saver.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/invariant_assert.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/invariant_assert.hpp
index c6c547c7c33..c6c547c7c33 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/invariant_assert.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/invariant_assert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/is_index_list.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/is_index_list.hpp
index f6a24218b81..f6a24218b81 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/is_index_list.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/is_index_list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/is_transparent.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/is_transparent.hpp
index 72036d257e2..72036d257e2 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/is_transparent.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/is_transparent.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/iter_adaptor.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/iter_adaptor.hpp
index 7a032350b36..7a032350b36 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/iter_adaptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/iter_adaptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/modify_key_adaptor.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/modify_key_adaptor.hpp
index 6df89b18386..6df89b18386 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/modify_key_adaptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/modify_key_adaptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/no_duplicate_tags.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/no_duplicate_tags.hpp
index ba216ed82cf..ba216ed82cf 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/no_duplicate_tags.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/no_duplicate_tags.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/node_type.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/node_type.hpp
index 7fe85cf968b..7fe85cf968b 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/node_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/node_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_args.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_args.hpp
index 3e2641f2f4d..3e2641f2f4d 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_args.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_args.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_impl.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl.hpp
index 1093b87c99e..1093b87c99e 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_impl_fwd.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl_fwd.hpp
index 6590ef05fdd..6590ef05fdd 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_impl_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_impl_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_node.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_node.hpp
index 09627fd19cb..09627fd19cb 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_node.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_node.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_ops.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_ops.hpp
index 84d5cacae19..84d5cacae19 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/ord_index_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/ord_index_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/promotes_arg.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/promotes_arg.hpp
index 7a11b6e9fbe..7a11b6e9fbe 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/promotes_arg.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/promotes_arg.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/raw_ptr.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/raw_ptr.hpp
index c32007435c0..c32007435c0 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/raw_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/raw_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp
index ee2c799d5a8..ee2c799d5a8 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/restore_wstrict_aliasing.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_loader.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_loader.hpp
index 4b00345a6d9..4b00345a6d9 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_loader.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_loader.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_node.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_node.hpp
index 72d93846a00..72d93846a00 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_node.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_node.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_ops.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ops.hpp
index f5e76e4441f..f5e76e4441f 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_ptr_array.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ptr_array.hpp
index 795f9cf2742..795f9cf2742 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_index_ptr_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_index_ptr_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_node_iterator.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_node_iterator.hpp
index 48026132fb7..48026132fb7 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnd_node_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnd_node_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnk_index_ops.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnk_index_ops.hpp
index fb233cf4973..fb233cf4973 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/rnk_index_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/rnk_index_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/safe_mode.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/safe_mode.hpp
index 905270e9fb3..905270e9fb3 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/safe_mode.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/safe_mode.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/scope_guard.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/scope_guard.hpp
index 116f8f50415..116f8f50415 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/scope_guard.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/scope_guard.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/seq_index_node.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_node.hpp
index abbe4e5795f..abbe4e5795f 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/seq_index_node.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_node.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/seq_index_ops.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_ops.hpp
index 142bdd9dd9a..142bdd9dd9a 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/seq_index_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/seq_index_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/serialization_version.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/serialization_version.hpp
index ccd8bb4f791..ccd8bb4f791 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/serialization_version.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/serialization_version.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/uintptr_type.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/uintptr_type.hpp
index 9c92d01d4de..9c92d01d4de 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/uintptr_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/uintptr_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/unbounded.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/unbounded.hpp
index dc09be1770d..dc09be1770d 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/unbounded.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/unbounded.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/value_compare.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/value_compare.hpp
index ac42e8779aa..ac42e8779aa 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/value_compare.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/value_compare.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/detail/vartempl_support.hpp b/src/third_party/boost-1.69.0/boost/multi_index/detail/vartempl_support.hpp
index 06ff430f4be..06ff430f4be 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/detail/vartempl_support.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/detail/vartempl_support.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/global_fun.hpp b/src/third_party/boost-1.69.0/boost/multi_index/global_fun.hpp
index 2c13769100c..2c13769100c 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/global_fun.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/global_fun.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/hashed_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/hashed_index.hpp
index 7b142223742..7b142223742 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/hashed_index.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/hashed_index.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/hashed_index_fwd.hpp b/src/third_party/boost-1.69.0/boost/multi_index/hashed_index_fwd.hpp
index d77e36c321b..d77e36c321b 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/hashed_index_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/hashed_index_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/identity.hpp b/src/third_party/boost-1.69.0/boost/multi_index/identity.hpp
index 6c832ce1562..6c832ce1562 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/identity.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/identity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/identity_fwd.hpp b/src/third_party/boost-1.69.0/boost/multi_index/identity_fwd.hpp
index af6bd55ef5f..af6bd55ef5f 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/identity_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/identity_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/indexed_by.hpp b/src/third_party/boost-1.69.0/boost/multi_index/indexed_by.hpp
index d2217e39166..d2217e39166 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/indexed_by.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/indexed_by.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multi_index/key.hpp b/src/third_party/boost-1.69.0/boost/multi_index/key.hpp
new file mode 100644
index 00000000000..48a418ac537
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multi_index/key.hpp
@@ -0,0 +1,147 @@
+/* Copyright 2003-2018 Joaquin M Lopez Munoz.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * See http://www.boost.org/libs/multi_index for library home page.
+ */
+
+#ifndef BOOST_MULTI_INDEX_KEY_HPP
+#define BOOST_MULTI_INDEX_KEY_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
+#include <boost/multi_index/composite_key.hpp>
+#include <boost/multi_index/global_fun.hpp>
+#include <boost/multi_index/member.hpp>
+#include <boost/multi_index/mem_fun.hpp>
+
+#if __cplusplus>=201703L||\
+ defined(BOOST_MSVC)&&defined(__cpp_nontype_template_parameter_auto)
+
+#define BOOST_MULTI_INDEX_KEY_SUPPORTED
+
+#include <type_traits>
+
+namespace boost{
+
+namespace multi_index{
+
+/* C++17 terse key specification syntax */
+
+namespace detail{
+
+template<typename T,T,typename=void>
+struct typed_key_impl;
+
+template<typename Class,typename Type,Type Class::*PtrToMember>
+struct typed_key_impl<
+ Type Class::*,PtrToMember,
+ typename std::enable_if<!std::is_function<Type>::value>::type
+>
+{
+ using value_type=Class;
+ using type=member<Class,Type,PtrToMember>;
+};
+
+template<
+ typename Class,typename Type,Type (Class::*PtrToMemberFunction)()const
+>
+struct typed_key_impl<Type (Class::*)()const,PtrToMemberFunction>
+{
+ using value_type=Class;
+ using type=const_mem_fun<Class,Type,PtrToMemberFunction>;
+};
+
+template<typename Class,typename Type,Type (Class::*PtrToMemberFunction)()>
+struct typed_key_impl<Type (Class::*)(),PtrToMemberFunction>
+{
+ using value_type=Class;
+ using type=mem_fun<Class,Type,PtrToMemberFunction>;
+};
+
+template<class Value,typename Type,Type (*PtrToFunction)(Value)>
+struct typed_key_impl<Type (*)(Value),PtrToFunction>
+{
+ using value_type=Value;
+ using type=global_fun<Value,Type,PtrToFunction>;
+};
+
+template<auto... Keys>
+struct key_impl;
+
+template<auto Key>
+struct key_impl<Key>:typed_key_impl<decltype(Key),Key>{};
+
+template<typename... Ts>
+struct least_generic;
+
+template<typename T0,typename... Ts>
+struct least_generic<T0,Ts...>
+{
+ using type=T0;
+};
+
+template<typename T0,typename T1,typename... Ts>
+struct least_generic<T0,T1,Ts...>
+{
+ static_assert(
+ std::is_convertible<const T0&,const T1&>::value||
+ std::is_convertible<const T1&,const T0&>::value,
+ "one type should be convertible to the other");
+
+ using type=typename least_generic<
+ typename std::conditional<
+ std::is_convertible<const T0&,const T1&>::value,T0,T1
+ >::type,
+ Ts...
+ >::type;
+};
+
+template<auto Key0,auto... Keys>
+struct key_impl<Key0,Keys...>
+{
+ using value_type=typename least_generic<
+ typename std::decay<typename key_impl<Key0>::value_type>::type,
+ typename std::decay<typename key_impl<Keys>::value_type>::type...
+ >::type;
+ using type=composite_key<
+ value_type,
+ typename key_impl<Key0>::type,
+ typename key_impl<Keys>::type...
+ >;
+};
+
+template<typename=composite_key<void,void>>
+struct composite_key_size;
+
+template<typename... Args>
+struct composite_key_size<composite_key<Args...>>
+{
+ static constexpr auto value=sizeof...(Args)-1;
+};
+
+template<auto... Keys>
+struct limited_size_key_impl
+{
+ static_assert(
+ sizeof...(Keys)<=composite_key_size<>::value,
+ "specified number of keys must meet the limits of "
+ "boost::multi_index::composite_key");
+ using type=typename key_impl<Keys...>::type;
+};
+
+} /* namespace multi_index::detail */
+
+template<auto... Keys>
+using key=typename detail::limited_size_key_impl<Keys...>::type;
+
+} /* namespace multi_index */
+
+} /* namespace boost */
+
+#endif
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/key_extractors.hpp b/src/third_party/boost-1.69.0/boost/multi_index/key_extractors.hpp
index 60179ba2339..60179ba2339 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/key_extractors.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/key_extractors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/mem_fun.hpp b/src/third_party/boost-1.69.0/boost/multi_index/mem_fun.hpp
index 111c386c5f5..111c386c5f5 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/mem_fun.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/mem_fun.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/member.hpp b/src/third_party/boost-1.69.0/boost/multi_index/member.hpp
index a8e645074a2..a8e645074a2 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/member.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/member.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/ordered_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/ordered_index.hpp
index 5bcd69de8c9..5bcd69de8c9 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/ordered_index.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/ordered_index.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/ordered_index_fwd.hpp b/src/third_party/boost-1.69.0/boost/multi_index/ordered_index_fwd.hpp
index fe44aaf860d..fe44aaf860d 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/ordered_index_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/ordered_index_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/random_access_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/random_access_index.hpp
index 9db54380699..9db54380699 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/random_access_index.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/random_access_index.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/random_access_index_fwd.hpp b/src/third_party/boost-1.69.0/boost/multi_index/random_access_index_fwd.hpp
index 2ea19295426..2ea19295426 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/random_access_index_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/random_access_index_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/ranked_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/ranked_index.hpp
index 4b24c4f5937..4b24c4f5937 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/ranked_index.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/ranked_index.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/ranked_index_fwd.hpp b/src/third_party/boost-1.69.0/boost/multi_index/ranked_index_fwd.hpp
index 380d3480736..380d3480736 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/ranked_index_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/ranked_index_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/safe_mode_errors.hpp b/src/third_party/boost-1.69.0/boost/multi_index/safe_mode_errors.hpp
index 1904706edec..1904706edec 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/safe_mode_errors.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/safe_mode_errors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/sequenced_index.hpp b/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index.hpp
index ad538e0c4b5..ad538e0c4b5 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/sequenced_index.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/sequenced_index_fwd.hpp b/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index_fwd.hpp
index a019f2a6d2f..a019f2a6d2f 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/sequenced_index_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/sequenced_index_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index/tag.hpp b/src/third_party/boost-1.69.0/boost/multi_index/tag.hpp
index ce51f8241ee..ce51f8241ee 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index/tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index/tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index_container.hpp b/src/third_party/boost-1.69.0/boost/multi_index_container.hpp
index b50bdbc90a6..b50bdbc90a6 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index_container.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index_container.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multi_index_container_fwd.hpp b/src/third_party/boost-1.69.0/boost/multi_index_container_fwd.hpp
index b35acad407a..b35acad407a 100644
--- a/src/third_party/boost-1.68.0/boost/multi_index_container_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/multi_index_container_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float.hpp
new file mode 100644
index 00000000000..03daf96fe4e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float.hpp
@@ -0,0 +1,2026 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2013 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifndef BOOST_MATH_CPP_BIN_FLOAT_HPP
+#define BOOST_MATH_CPP_BIN_FLOAT_HPP
+
+#include <boost/multiprecision/cpp_int.hpp>
+#include <boost/multiprecision/integer.hpp>
+#include <boost/math/special_functions/trunc.hpp>
+#include <boost/multiprecision/detail/float_string_cvt.hpp>
+
+//
+// Some includes we need from Boost.Math, since we rely on that library to provide these functions:
+//
+#include <boost/math/special_functions/asinh.hpp>
+#include <boost/math/special_functions/acosh.hpp>
+#include <boost/math/special_functions/atanh.hpp>
+#include <boost/math/special_functions/cbrt.hpp>
+#include <boost/math/special_functions/expm1.hpp>
+#include <boost/math/special_functions/gamma.hpp>
+
+#ifdef BOOST_HAS_FLOAT128
+#include <quadmath.h>
+#endif
+
+namespace boost{ namespace multiprecision{ namespace backends{
+
+enum digit_base_type
+{
+ digit_base_2 = 2,
+ digit_base_10 = 10
+};
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4522 6326) // multiple assignment operators specified, comparison of two constants
+#endif
+
+namespace detail{
+
+template <class U>
+inline typename enable_if_c<is_unsigned<U>::value, bool>::type is_negative(U) { return false; }
+template <class S>
+inline typename disable_if_c<is_unsigned<S>::value, bool>::type is_negative(S s) { return s < 0; }
+
+}
+
+template <unsigned Digits, digit_base_type DigitBase = digit_base_10, class Allocator = void, class Exponent = int, Exponent MinExponent = 0, Exponent MaxExponent = 0>
+class cpp_bin_float
+{
+public:
+ static const unsigned bit_count = DigitBase == digit_base_2 ? Digits : (Digits * 1000uL) / 301uL + (((Digits * 1000uL) % 301) ? 2u : 1u);
+ typedef cpp_int_backend<is_void<Allocator>::value ? bit_count : 0, bit_count, is_void<Allocator>::value ? unsigned_magnitude : signed_magnitude, unchecked, Allocator> rep_type;
+ typedef cpp_int_backend<is_void<Allocator>::value ? 2 * bit_count : 0, 2 * bit_count, is_void<Allocator>::value ? unsigned_magnitude : signed_magnitude, unchecked, Allocator> double_rep_type;
+
+ typedef typename rep_type::signed_types signed_types;
+ typedef typename rep_type::unsigned_types unsigned_types;
+ typedef boost::mpl::list<float, double, long double> float_types;
+ typedef Exponent exponent_type;
+
+ static const exponent_type max_exponent_limit = boost::integer_traits<exponent_type>::const_max - 2 * static_cast<exponent_type>(bit_count);
+ static const exponent_type min_exponent_limit = boost::integer_traits<exponent_type>::const_min + 2 * static_cast<exponent_type>(bit_count);
+
+ BOOST_STATIC_ASSERT_MSG(MinExponent >= min_exponent_limit, "Template parameter MinExponent is too negative for our internal logic to function correctly, sorry!");
+ BOOST_STATIC_ASSERT_MSG(MaxExponent <= max_exponent_limit, "Template parameter MaxExponent is too large for our internal logic to function correctly, sorry!");
+ BOOST_STATIC_ASSERT_MSG(MinExponent <= 0, "Template parameter MinExponent can not be positive!");
+ BOOST_STATIC_ASSERT_MSG(MaxExponent >= 0, "Template parameter MaxExponent can not be negative!");
+
+ static const exponent_type max_exponent = MaxExponent == 0 ? max_exponent_limit : MaxExponent;
+ static const exponent_type min_exponent = MinExponent == 0 ? min_exponent_limit : MinExponent;
+
+ static const exponent_type exponent_zero = max_exponent + 1;
+ static const exponent_type exponent_infinity = max_exponent + 2;
+ static const exponent_type exponent_nan = max_exponent + 3;
+
+private:
+
+ rep_type m_data;
+ exponent_type m_exponent;
+ bool m_sign;
+public:
+ cpp_bin_float() BOOST_MP_NOEXCEPT_IF(noexcept(rep_type())) : m_data(), m_exponent(exponent_zero), m_sign(false) {}
+
+ cpp_bin_float(const cpp_bin_float &o) BOOST_MP_NOEXCEPT_IF(noexcept(rep_type(std::declval<const rep_type&>())))
+ : m_data(o.m_data), m_exponent(o.m_exponent), m_sign(o.m_sign) {}
+
+ template <unsigned D, digit_base_type B, class A, class E, E MinE, E MaxE>
+ cpp_bin_float(const cpp_bin_float<D, B, A, E, MinE, MaxE> &o, typename boost::enable_if_c<(bit_count >= cpp_bin_float<D, B, A, E, MinE, MaxE>::bit_count)>::type const* = 0)
+ {
+ *this = o;
+ }
+ template <unsigned D, digit_base_type B, class A, class E, E MinE, E MaxE>
+ explicit cpp_bin_float(const cpp_bin_float<D, B, A, E, MinE, MaxE> &o, typename boost::disable_if_c<(bit_count >= cpp_bin_float<D, B, A, E, MinE, MaxE>::bit_count)>::type const* = 0)
+ : m_exponent(o.exponent()), m_sign(o.sign())
+ {
+ *this = o;
+ }
+ template <class Float>
+ cpp_bin_float(const Float& f,
+ typename boost::enable_if_c<
+ (number_category<Float>::value == number_kind_floating_point)
+ && (std::numeric_limits<Float>::digits <= (int)bit_count)
+ && (std::numeric_limits<Float>::radix == 2)
+ && (std::numeric_limits<Float>::is_specialized)
+#ifdef BOOST_HAS_FLOAT128
+ && !boost::is_same<Float, __float128>::value
+#endif
+ >::type const* = 0)
+ : m_data(), m_exponent(0), m_sign(false)
+ {
+ this->assign_float(f);
+ }
+
+ template <class Float>
+ explicit cpp_bin_float(const Float& f,
+ typename boost::enable_if_c<
+ (number_category<Float>::value == number_kind_floating_point)
+ && (std::numeric_limits<Float>::digits > (int)bit_count)
+ && (std::numeric_limits<Float>::radix == 2)
+ && (std::numeric_limits<Float>::is_specialized)
+#ifdef BOOST_HAS_FLOAT128
+ && !boost::is_same<Float, __float128>::value
+#endif
+>::type const* = 0)
+ : m_data(), m_exponent(0), m_sign(false)
+ {
+ this->assign_float(f);
+ }
+#ifdef BOOST_HAS_FLOAT128
+ template <class Float>
+ cpp_bin_float(const Float& f,
+ typename boost::enable_if_c<
+ boost::is_same<Float, __float128>::value
+ && ((int)bit_count >= 113)
+ >::type const* = 0)
+ : m_data(), m_exponent(0), m_sign(false)
+ {
+ this->assign_float(f);
+ }
+ template <class Float>
+ explicit cpp_bin_float(const Float& f,
+ typename boost::enable_if_c<
+ boost::is_same<Float, __float128>::value
+ && ((int)bit_count < 113)
+ >::type const* = 0)
+ : m_data(), m_exponent(0), m_sign(false)
+ {
+ this->assign_float(f);
+ }
+#endif
+ cpp_bin_float& operator=(const cpp_bin_float &o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<rep_type&>() = std::declval<const rep_type&>()))
+ {
+ m_data = o.m_data;
+ m_exponent = o.m_exponent;
+ m_sign = o.m_sign;
+ return *this;
+ }
+
+ template <unsigned D, digit_base_type B, class A, class E, E MinE, E MaxE>
+ cpp_bin_float& operator=(const cpp_bin_float<D, B, A, E, MinE, MaxE> &f)
+ {
+ switch(eval_fpclassify(f))
+ {
+ case FP_ZERO:
+ m_data = limb_type(0);
+ m_sign = f.sign();
+ m_exponent = exponent_zero;
+ break;
+ case FP_NAN:
+ m_data = limb_type(0);
+ m_sign = false;
+ m_exponent = exponent_nan;
+ break;;
+ case FP_INFINITE:
+ m_data = limb_type(0);
+ m_sign = f.sign();
+ m_exponent = exponent_infinity;
+ break;
+ default:
+ typename cpp_bin_float<D, B, A, E, MinE, MaxE>::rep_type b(f.bits());
+ this->exponent() = f.exponent() + (E)bit_count - (E)cpp_bin_float<D, B, A, E, MinE, MaxE>::bit_count;
+ this->sign() = f.sign();
+ copy_and_round(*this, b);
+ }
+ return *this;
+ }
+#ifdef BOOST_HAS_FLOAT128
+ template <class Float>
+ typename boost::enable_if_c<
+ (number_category<Float>::value == number_kind_floating_point)
+ //&& (std::numeric_limits<Float>::digits <= (int)bit_count)
+ && ((std::numeric_limits<Float>::radix == 2) || (boost::is_same<Float, __float128>::value)), cpp_bin_float&>::type
+ operator=(const Float& f)
+#else
+ template <class Float>
+ typename boost::enable_if_c<
+ (number_category<Float>::value == number_kind_floating_point)
+ //&& (std::numeric_limits<Float>::digits <= (int)bit_count)
+ && (std::numeric_limits<Float>::radix == 2), cpp_bin_float&>::type
+ operator=(const Float& f)
+#endif
+ {
+ return assign_float(f);
+ }
+
+#ifdef BOOST_HAS_FLOAT128
+ template <class Float>
+ typename boost::enable_if_c<boost::is_same<Float, __float128>::value, cpp_bin_float& >::type assign_float(Float f)
+ {
+ using default_ops::eval_add;
+ typedef typename boost::multiprecision::detail::canonical<int, cpp_bin_float>::type bf_int_type;
+ if(f == 0)
+ {
+ m_data = limb_type(0);
+ m_sign = (signbitq(f) > 0);
+ m_exponent = exponent_zero;
+ return *this;
+ }
+ else if(isnanq(f))
+ {
+ m_data = limb_type(0);
+ m_sign = false;
+ m_exponent = exponent_nan;
+ return *this;
+ }
+ else if(isinfq(f))
+ {
+ m_data = limb_type(0);
+ m_sign = (f < 0);
+ m_exponent = exponent_infinity;
+ return *this;
+ }
+ if(f < 0)
+ {
+ *this = -f;
+ this->negate();
+ return *this;
+ }
+
+ typedef typename mpl::front<unsigned_types>::type ui_type;
+ m_data = static_cast<ui_type>(0u);
+ m_sign = false;
+ m_exponent = 0;
+
+ static const int bits = sizeof(int) * CHAR_BIT - 1;
+ int e;
+ f = frexpq(f, &e);
+ while(f)
+ {
+ f = ldexpq(f, bits);
+ e -= bits;
+ int ipart = (int)truncq(f);
+ f -= ipart;
+ m_exponent += bits;
+ cpp_bin_float t;
+ t = static_cast<bf_int_type>(ipart);
+ eval_add(*this, t);
+ }
+ m_exponent += static_cast<Exponent>(e);
+ return *this;
+ }
+#endif
+#ifdef BOOST_HAS_FLOAT128
+ template <class Float>
+ typename boost::enable_if_c<is_floating_point<Float>::value && !is_same<Float, __float128>::value, cpp_bin_float&>::type assign_float(Float f)
+#else
+ template <class Float>
+ typename boost::enable_if_c<is_floating_point<Float>::value, cpp_bin_float&>::type assign_float(Float f)
+#endif
+ {
+ BOOST_MATH_STD_USING
+ using default_ops::eval_add;
+ typedef typename boost::multiprecision::detail::canonical<int, cpp_bin_float>::type bf_int_type;
+
+ switch((boost::math::fpclassify)(f))
+ {
+ case FP_ZERO:
+ m_data = limb_type(0);
+ m_sign = ((boost::math::signbit)(f) > 0);
+ m_exponent = exponent_zero;
+ return *this;
+ case FP_NAN:
+ m_data = limb_type(0);
+ m_sign = false;
+ m_exponent = exponent_nan;
+ return *this;
+ case FP_INFINITE:
+ m_data = limb_type(0);
+ m_sign = (f < 0);
+ m_exponent = exponent_infinity;
+ return *this;
+ }
+ if(f < 0)
+ {
+ *this = -f;
+ this->negate();
+ return *this;
+ }
+
+ typedef typename mpl::front<unsigned_types>::type ui_type;
+ m_data = static_cast<ui_type>(0u);
+ m_sign = false;
+ m_exponent = 0;
+
+ static const int bits = sizeof(int) * CHAR_BIT - 1;
+ int e;
+ f = frexp(f, &e);
+ while(f)
+ {
+ f = ldexp(f, bits);
+ e -= bits;
+#ifndef BOOST_MATH_NO_LONG_DOUBLE_MATH_FUNCTIONS
+ int ipart = itrunc(f);
+#else
+ int ipart = static_cast<int>(f);
+#endif
+ f -= ipart;
+ m_exponent += bits;
+ cpp_bin_float t;
+ t = static_cast<bf_int_type>(ipart);
+ eval_add(*this, t);
+ }
+ m_exponent += static_cast<Exponent>(e);
+ return *this;
+ }
+
+ template <class Float>
+ typename boost::enable_if_c<
+ (number_category<Float>::value == number_kind_floating_point)
+ && !boost::is_floating_point<Float>::value
+ /*&& (std::numeric_limits<number<Float> >::radix == 2)*/,
+ cpp_bin_float&>::type assign_float(Float f)
+ {
+ BOOST_MATH_STD_USING
+ using default_ops::eval_add;
+ using default_ops::eval_get_sign;
+ using default_ops::eval_convert_to;
+ using default_ops::eval_subtract;
+
+ typedef typename boost::multiprecision::detail::canonical<int, Float>::type f_int_type;
+ typedef typename boost::multiprecision::detail::canonical<int, cpp_bin_float>::type bf_int_type;
+
+ switch(eval_fpclassify(f))
+ {
+ case FP_ZERO:
+ m_data = limb_type(0);
+ m_sign = ((boost::math::signbit)(f) > 0);
+ m_exponent = exponent_zero;
+ return *this;
+ case FP_NAN:
+ m_data = limb_type(0);
+ m_sign = false;
+ m_exponent = exponent_nan;
+ return *this;
+ case FP_INFINITE:
+ m_data = limb_type(0);
+ m_sign = (f < 0);
+ m_exponent = exponent_infinity;
+ return *this;
+ }
+ if(eval_get_sign(f) < 0)
+ {
+ f.negate();
+ *this = f;
+ this->negate();
+ return *this;
+ }
+
+ typedef typename mpl::front<unsigned_types>::type ui_type;
+ m_data = static_cast<ui_type>(0u);
+ m_sign = false;
+ m_exponent = 0;
+
+ static const int bits = sizeof(int) * CHAR_BIT - 1;
+ int e;
+ eval_frexp(f, f, &e);
+ while(eval_get_sign(f) != 0)
+ {
+ eval_ldexp(f, f, bits);
+ e -= bits;
+ int ipart;
+ eval_convert_to(&ipart, f);
+ eval_subtract(f, static_cast<f_int_type>(ipart));
+ m_exponent += bits;
+ eval_add(*this, static_cast<bf_int_type>(ipart));
+ }
+ m_exponent += e;
+ if(m_exponent > max_exponent)
+ m_exponent = exponent_infinity;
+ if(m_exponent < min_exponent)
+ {
+ m_data = limb_type(0u);
+ m_exponent = exponent_zero;
+ m_sign = ((boost::math::signbit)(f) > 0);
+ }
+ else if(eval_get_sign(m_data) == 0)
+ {
+ m_exponent = exponent_zero;
+ m_sign = ((boost::math::signbit)(f) > 0);
+ }
+ return *this;
+ }
+
+ template <class I>
+ typename boost::enable_if<is_integral<I>, cpp_bin_float&>::type operator=(const I& i)
+ {
+ using default_ops::eval_bit_test;
+ if(!i)
+ {
+ m_data = static_cast<limb_type>(0);
+ m_exponent = exponent_zero;
+ m_sign = false;
+ }
+ else
+ {
+ typedef typename make_unsigned<I>::type ui_type;
+ ui_type fi = static_cast<ui_type>(boost::multiprecision::detail::unsigned_abs(i));
+ typedef typename boost::multiprecision::detail::canonical<ui_type, rep_type>::type ar_type;
+ m_data = static_cast<ar_type>(fi);
+ unsigned shift = msb(fi);
+ if(shift >= bit_count)
+ {
+ m_exponent = static_cast<Exponent>(shift);
+ m_data = static_cast<ar_type>(fi >> (shift + 1 - bit_count));
+ }
+ else
+ {
+ m_exponent = static_cast<Exponent>(shift);
+ eval_left_shift(m_data, bit_count - shift - 1);
+ }
+ BOOST_ASSERT(eval_bit_test(m_data, bit_count-1));
+ m_sign = detail::is_negative(i);
+ }
+ return *this;
+ }
+
+ cpp_bin_float& operator=(const char *s);
+
+ void swap(cpp_bin_float &o) BOOST_NOEXCEPT
+ {
+ m_data.swap(o.m_data);
+ std::swap(m_exponent, o.m_exponent);
+ std::swap(m_sign, o.m_sign);
+ }
+
+ std::string str(std::streamsize dig, std::ios_base::fmtflags f) const;
+
+ void negate()
+ {
+ if(m_exponent != exponent_nan)
+ m_sign = !m_sign;
+ }
+
+ int compare(const cpp_bin_float &o) const BOOST_NOEXCEPT
+ {
+ if(m_sign != o.m_sign)
+ return (m_exponent == exponent_zero) && (m_exponent == o.m_exponent) ? 0 : m_sign ? -1 : 1;
+ int result;
+ if(m_exponent == exponent_nan)
+ return -1;
+ else if(m_exponent != o.m_exponent)
+ {
+ if(m_exponent == exponent_zero)
+ result = -1;
+ else if(o.m_exponent == exponent_zero)
+ result = 1;
+ else
+ result = m_exponent > o.m_exponent ? 1 : -1;
+ }
+ else
+ result = m_data.compare(o.m_data);
+ if(m_sign)
+ result = -result;
+ return result;
+ }
+ template <class A>
+ int compare(const A& o) const BOOST_NOEXCEPT
+ {
+ cpp_bin_float b;
+ b = o;
+ return compare(b);
+ }
+
+ rep_type& bits() { return m_data; }
+ const rep_type& bits()const { return m_data; }
+ exponent_type& exponent() { return m_exponent; }
+ const exponent_type& exponent()const { return m_exponent; }
+ bool& sign() { return m_sign; }
+ const bool& sign()const { return m_sign; }
+ void check_invariants()
+ {
+ using default_ops::eval_bit_test;
+ using default_ops::eval_is_zero;
+ if((m_exponent <= max_exponent) && (m_exponent >= min_exponent))
+ {
+ BOOST_ASSERT(eval_bit_test(m_data, bit_count - 1));
+ }
+ else
+ {
+ BOOST_ASSERT(m_exponent > max_exponent);
+ BOOST_ASSERT(m_exponent <= exponent_nan);
+ BOOST_ASSERT(eval_is_zero(m_data));
+ }
+ }
+ template<class Archive>
+ void serialize(Archive & ar, const unsigned int /*version*/)
+ {
+ ar & m_data;
+ ar & m_exponent;
+ ar & m_sign;
+ }
+};
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class Int>
+inline void copy_and_round(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, Int &arg, int bits_to_keep = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
+{
+ // Precondition: exponent of res must have been set before this function is called
+ // as we may need to adjust it based on how many bits_to_keep in arg are set.
+ using default_ops::eval_msb;
+ using default_ops::eval_lsb;
+ using default_ops::eval_left_shift;
+ using default_ops::eval_bit_test;
+ using default_ops::eval_right_shift;
+ using default_ops::eval_increment;
+ using default_ops::eval_get_sign;
+
+ // cancellation may have resulted in arg being all zeros:
+ if(eval_get_sign(arg) == 0)
+ {
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
+ res.sign() = false;
+ res.bits() = static_cast<limb_type>(0u);
+ return;
+ }
+ int msb = eval_msb(arg);
+ if(static_cast<int>(bits_to_keep) > msb + 1)
+ {
+ // Must have had cancellation in subtraction,
+ // or be converting from a narrower type, so shift left:
+ res.bits() = arg;
+ eval_left_shift(res.bits(), bits_to_keep - msb - 1);
+ res.exponent() -= static_cast<Exponent>(bits_to_keep - msb - 1);
+ }
+ else if(static_cast<int>(bits_to_keep) < msb + 1)
+ {
+ // We have more bits_to_keep than we need, so round as required,
+ // first get the rounding bit:
+ bool roundup = eval_bit_test(arg, msb - bits_to_keep);
+ // Then check for a tie:
+ if(roundup && (msb - bits_to_keep == (int)eval_lsb(arg)))
+ {
+ // Ties round towards even:
+ if(!eval_bit_test(arg, msb - bits_to_keep + 1))
+ roundup = false;
+ }
+ // Shift off the bits_to_keep we don't need:
+ eval_right_shift(arg, msb - bits_to_keep + 1);
+ res.exponent() += static_cast<Exponent>(msb - bits_to_keep + 1);
+ if(roundup)
+ {
+ eval_increment(arg);
+ if(bits_to_keep)
+ {
+ if(eval_bit_test(arg, bits_to_keep))
+ {
+ // This happens very very rairly, all the bits left after
+ // truncation must be 1's and we're rounding up an order of magnitude:
+ eval_right_shift(arg, 1u);
+ ++res.exponent();
+ }
+ }
+ else
+ {
+ // We get here when bits_to_keep is zero but we're rounding up,
+ // as a result we end up with a single digit that is a 1:
+ ++bits_to_keep;
+ }
+ }
+ if(bits_to_keep != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
+ {
+ // Normalize result when we're rounding to fewer bits than we can hold, only happens in conversions
+ // to narrower types:
+ eval_left_shift(arg, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - bits_to_keep);
+ res.exponent() -= static_cast<Exponent>(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - bits_to_keep);
+ }
+ res.bits() = arg;
+ }
+ else
+ {
+ res.bits() = arg;
+ }
+ if(!bits_to_keep && !res.bits().limbs()[0])
+ {
+ // We're keeping zero bits and did not round up, so result is zero:
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
+ return;
+ }
+ // Result must be normalized:
+ BOOST_ASSERT(((int)eval_msb(res.bits()) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1));
+
+ if(res.exponent() > cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent)
+ {
+ // Overflow:
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
+ res.bits() = static_cast<limb_type>(0u);
+ }
+ else if(res.exponent() < cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent)
+ {
+ // Underflow:
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
+ res.bits() = static_cast<limb_type>(0u);
+ }
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void do_eval_add(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
+{
+ if(a.exponent() < b.exponent())
+ {
+ bool s = a.sign();
+ do_eval_add(res, b, a);
+ if(res.sign() != s)
+ res.negate();
+ return;
+ }
+
+ using default_ops::eval_add;
+ using default_ops::eval_bit_test;
+
+ typedef typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type exponent_type;
+
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
+
+ // Special cases first:
+ switch(a.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
+ bool s = a.sign();
+ res = b;
+ res.sign() = s;
+ return;
+ }
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan)
+ res = b;
+ else
+ res = a;
+ return; // result is still infinite.
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = a;
+ return; // result is still a NaN.
+ }
+ switch(b.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ res = a;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ res = b;
+ if(res.sign())
+ res.negate();
+ return; // result is infinite.
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = b;
+ return; // result is a NaN.
+ }
+
+ BOOST_STATIC_ASSERT(boost::integer_traits<exponent_type>::const_max - cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count > cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent);
+
+ bool s = a.sign();
+ dt = a.bits();
+ if(a.exponent() > (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + b.exponent())
+ {
+ res.exponent() = a.exponent();
+ }
+ else
+ {
+ exponent_type e_diff = a.exponent() - b.exponent();
+ BOOST_ASSERT(e_diff >= 0);
+ eval_left_shift(dt, e_diff);
+ res.exponent() = a.exponent() - e_diff;
+ eval_add(dt, b.bits());
+ }
+
+ copy_and_round(res, dt);
+ res.check_invariants();
+ if(res.sign() != s)
+ res.negate();
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void do_eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
+{
+ using default_ops::eval_subtract;
+ using default_ops::eval_bit_test;
+ using default_ops::eval_decrement;
+
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
+
+ // Special cases first:
+ switch(a.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan)
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ else
+ {
+ bool s = a.sign();
+ res = b;
+ if(res.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero)
+ res.sign() = false;
+ else if(res.sign() == s)
+ res.negate();
+ }
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ if((b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan) || (b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity))
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ else
+ res = a;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = a;
+ return; // result is still a NaN.
+ }
+ switch(b.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ res = a;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
+ res.sign() = !a.sign();
+ res.bits() = static_cast<limb_type>(0u);
+ return; // result is a NaN.
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = b;
+ return; // result is still a NaN.
+ }
+
+ bool s = a.sign();
+ if((a.exponent() > b.exponent()) || ((a.exponent() == b.exponent()) && a.bits().compare(b.bits()) >= 0))
+ {
+ dt = a.bits();
+ if(a.exponent() <= (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + b.exponent())
+ {
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e_diff = a.exponent() - b.exponent();
+ eval_left_shift(dt, e_diff);
+ res.exponent() = a.exponent() - e_diff;
+ eval_subtract(dt, b.bits());
+ }
+ else if(a.exponent() == (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + b.exponent() + 1)
+ {
+ if(eval_lsb(b.bits()) != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1)
+ {
+ eval_left_shift(dt, 1);
+ eval_decrement(dt);
+ res.exponent() = a.exponent() - 1;
+ }
+ else
+ res.exponent() = a.exponent();
+ }
+ else
+ res.exponent() = a.exponent();
+ }
+ else
+ {
+ dt = b.bits();
+ if(b.exponent() <= (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + a.exponent())
+ {
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type e_diff = a.exponent() - b.exponent();
+ eval_left_shift(dt, -e_diff);
+ res.exponent() = b.exponent() + e_diff;
+ eval_subtract(dt, a.bits());
+ }
+ else if(b.exponent() == (int)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + a.exponent() + 1)
+ {
+ if(eval_lsb(a.bits()) != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1)
+ {
+ eval_left_shift(dt, 1);
+ eval_decrement(dt);
+ res.exponent() = b.exponent() - 1;
+ }
+ else
+ res.exponent() = b.exponent();
+ }
+ else
+ res.exponent() = b.exponent();
+ s = !s;
+ }
+
+ copy_and_round(res, dt);
+ if(res.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero)
+ res.sign() = false;
+ else if(res.sign() != s)
+ res.negate();
+ res.check_invariants();
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_add(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
+{
+ if(a.sign() == b.sign())
+ do_eval_add(res, a, b);
+ else
+ do_eval_subtract(res, a, b);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_add(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a)
+{
+ return eval_add(res, res, a);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
+{
+ if(a.sign() != b.sign())
+ do_eval_add(res, a, b);
+ else
+ do_eval_subtract(res, a, b);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_subtract(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a)
+{
+ return eval_subtract(res, res, a);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
+{
+ using default_ops::eval_bit_test;
+ using default_ops::eval_multiply;
+
+ // Special cases first:
+ switch(a.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
+ if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan)
+ res = b;
+ else if(b.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity)
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ else
+ {
+ bool s = a.sign() != b.sign();
+ res = a;
+ res.sign() = s;
+ }
+ return;
+ }
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ switch(b.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ break;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = b;
+ break;
+ default:
+ bool s = a.sign() != b.sign();
+ res = a;
+ res.sign() = s;
+ break;
+ }
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = a;
+ return;
+ }
+ if(b.exponent() > cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent)
+ {
+ bool s = a.sign() != b.sign();
+ res = b;
+ res.sign() = s;
+ return;
+ }
+ if((a.exponent() > 0) && (b.exponent() > 0))
+ {
+ if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent + 2 - a.exponent() < b.exponent())
+ {
+ // We will certainly overflow:
+ bool s = a.sign() != b.sign();
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
+ res.sign() = s;
+ res.bits() = static_cast<limb_type>(0u);
+ return;
+ }
+ }
+ if((a.exponent() < 0) && (b.exponent() < 0))
+ {
+ if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent - 2 - a.exponent() > b.exponent())
+ {
+ // We will certainly underflow:
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
+ res.sign() = a.sign() != b.sign();
+ res.bits() = static_cast<limb_type>(0u);
+ return;
+ }
+ }
+
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
+ eval_multiply(dt, a.bits(), b.bits());
+ res.exponent() = a.exponent() + b.exponent() - (Exponent)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count + 1;
+ copy_and_round(res, dt);
+ res.check_invariants();
+ res.sign() = a.sign() != b.sign();
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a)
+{
+ eval_multiply(res, res, a);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class U>
+inline typename enable_if_c<is_unsigned<U>::value>::type eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const U &b)
+{
+ using default_ops::eval_bit_test;
+ using default_ops::eval_multiply;
+
+ // Special cases first:
+ switch(a.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
+ bool s = a.sign();
+ res = a;
+ res.sign() = s;
+ return;
+ }
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ if(b == 0)
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ else
+ res = a;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = a;
+ return;
+ }
+
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type dt;
+ typedef typename boost::multiprecision::detail::canonical<U, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type>::type canon_ui_type;
+ eval_multiply(dt, a.bits(), static_cast<canon_ui_type>(b));
+ res.exponent() = a.exponent();
+ copy_and_round(res, dt);
+ res.check_invariants();
+ res.sign() = a.sign();
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class U>
+inline typename enable_if_c<is_unsigned<U>::value>::type eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const U &b)
+{
+ eval_multiply(res, res, b);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class S>
+inline typename enable_if_c<is_signed<S>::value>::type eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, const S &b)
+{
+ typedef typename make_unsigned<S>::type ui_type;
+ eval_multiply(res, a, static_cast<ui_type>(boost::multiprecision::detail::unsigned_abs(b)));
+ if(b < 0)
+ res.negate();
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class S>
+inline typename enable_if_c<is_signed<S>::value>::type eval_multiply(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const S &b)
+{
+ eval_multiply(res, res, b);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &u, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &v)
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:6326) // comparison of two constants
+#endif
+ using default_ops::eval_subtract;
+ using default_ops::eval_qr;
+ using default_ops::eval_bit_test;
+ using default_ops::eval_get_sign;
+ using default_ops::eval_increment;
+
+ //
+ // Special cases first:
+ //
+ switch(u.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
+ switch(v.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ return;
+ }
+ bool s = u.sign() != v.sign();
+ res = u;
+ res.sign() = s;
+ return;
+ }
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ {
+ switch(v.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ return;
+ }
+ bool s = u.sign() != v.sign();
+ res = u;
+ res.sign() = s;
+ return;
+ }
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ return;
+ }
+ switch(v.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
+ bool s = u.sign() != v.sign();
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
+ res.sign() = s;
+ return;
+ }
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
+ res.bits() = limb_type(0);
+ res.sign() = u.sign() != v.sign();
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ return;
+ }
+
+ // We can scale u and v so that both are integers, then perform integer
+ // division to obtain quotient q and remainder r, such that:
+ //
+ // q * v + r = u
+ //
+ // and hense:
+ //
+ // q + r/v = u/v
+ //
+ // From this, assuming q has cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count
+ // bits we only need to determine whether
+ // r/v is less than, equal to, or greater than 0.5 to determine rounding -
+ // this we can do with a shift and comparison.
+ //
+ // We can set the exponent and sign of the result up front:
+ //
+ if((v.exponent() < 0) && (u.exponent() > 0))
+ {
+ // Check for overflow:
+ if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent + v.exponent() < u.exponent() - 1)
+ {
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
+ res.sign() = u.sign() != v.sign();
+ res.bits() = static_cast<limb_type>(0u);
+ return;
+ }
+ }
+ else if((v.exponent() > 0) && (u.exponent() < 0))
+ {
+ // Check for underflow:
+ if(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent + v.exponent() > u.exponent())
+ {
+ // We will certainly underflow:
+ res.exponent() = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
+ res.sign() = u.sign() != v.sign();
+ res.bits() = static_cast<limb_type>(0u);
+ return;
+ }
+ }
+ res.exponent() = u.exponent() - v.exponent() - 1;
+ res.sign() = u.sign() != v.sign();
+ //
+ // Now get the quotient and remainder:
+ //
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type t(u.bits()), t2(v.bits()), q, r;
+ eval_left_shift(t, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count);
+ eval_qr(t, t2, q, r);
+ //
+ // We now have either "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count"
+ // or "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count+1" significant
+ // bits in q.
+ //
+ static const unsigned limb_bits = sizeof(limb_type) * CHAR_BIT;
+ if(eval_bit_test(q, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count))
+ {
+ //
+ // OK we have cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count+1 bits,
+ // so we already have rounding info,
+ // we just need to changes things if the last bit is 1 and either the
+ // remainder is non-zero (ie we do not have a tie) or the quotient would
+ // be odd if it were shifted to the correct number of bits (ie a tiebreak).
+ //
+ BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count));
+ if((q.limbs()[0] & 1u) && (eval_get_sign(r) || (q.limbs()[0] & 2u)))
+ {
+ eval_increment(q);
+ }
+ }
+ else
+ {
+ //
+ // We have exactly "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count" bits in q.
+ // Get rounding info, which we can get by comparing 2r with v.
+ // We want to call copy_and_round to handle rounding and general cleanup,
+ // so we'll left shift q and add some fake digits on the end to represent
+ // how we'll be rounding.
+ //
+ BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1));
+ static const unsigned lshift = (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count < limb_bits) ? 2 : limb_bits;
+ eval_left_shift(q, lshift);
+ res.exponent() -= lshift;
+ eval_left_shift(r, 1u);
+ int c = r.compare(v.bits());
+ if(c == 0)
+ q.limbs()[0] |= static_cast<limb_type>(1u) << (lshift - 1);
+ else if(c > 0)
+ q.limbs()[0] |= (static_cast<limb_type>(1u) << (lshift - 1)) + static_cast<limb_type>(1u);
+ }
+ copy_and_round(res, q);
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ eval_divide(res, res, arg);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class U>
+inline typename enable_if_c<is_unsigned<U>::value>::type eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &u, const U &v)
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:6326) // comparison of two constants
+#endif
+ using default_ops::eval_subtract;
+ using default_ops::eval_qr;
+ using default_ops::eval_bit_test;
+ using default_ops::eval_get_sign;
+ using default_ops::eval_increment;
+
+ //
+ // Special cases first:
+ //
+ switch(u.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ {
+ if(v == 0)
+ {
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ return;
+ }
+ bool s = u.sign() != (v < 0);
+ res = u;
+ res.sign() = s;
+ return;
+ }
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ res = u;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ return;
+ }
+ if(v == 0)
+ {
+ bool s = u.sign();
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
+ res.sign() = s;
+ return;
+ }
+
+ // We can scale u and v so that both are integers, then perform integer
+ // division to obtain quotient q and remainder r, such that:
+ //
+ // q * v + r = u
+ //
+ // and hense:
+ //
+ // q + r/v = u/v
+ //
+ // From this, assuming q has "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count" cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count, we only need to determine whether
+ // r/v is less than, equal to, or greater than 0.5 to determine rounding -
+ // this we can do with a shift and comparison.
+ //
+ // We can set the exponent and sign of the result up front:
+ //
+ int gb = msb(v);
+ res.exponent() = u.exponent() - static_cast<Exponent>(gb) - static_cast<Exponent>(1);
+ res.sign() = u.sign();
+ //
+ // Now get the quotient and remainder:
+ //
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type t(u.bits()), q, r;
+ eval_left_shift(t, gb + 1);
+ eval_qr(t, number<typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type>::canonical_value(v), q, r);
+ //
+ // We now have either "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count" or "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count+1" significant cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count in q.
+ //
+ static const unsigned limb_bits = sizeof(limb_type) * CHAR_BIT;
+ if(eval_bit_test(q, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count))
+ {
+ //
+ // OK we have cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count+1 cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count, so we already have rounding info,
+ // we just need to changes things if the last bit is 1 and the
+ // remainder is non-zero (ie we do not have a tie).
+ //
+ BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count));
+ if((q.limbs()[0] & 1u) && eval_get_sign(r))
+ {
+ eval_increment(q);
+ }
+ }
+ else
+ {
+ //
+ // We have exactly "cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count" cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count in q.
+ // Get rounding info, which we can get by comparing 2r with v.
+ // We want to call copy_and_round to handle rounding and general cleanup,
+ // so we'll left shift q and add some fake cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count on the end to represent
+ // how we'll be rounding.
+ //
+ BOOST_ASSERT((eval_msb(q) == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1));
+ static const unsigned lshift = cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count < limb_bits ? 2 : limb_bits;
+ eval_left_shift(q, lshift);
+ res.exponent() -= lshift;
+ eval_left_shift(r, 1u);
+ int c = r.compare(number<typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type>::canonical_value(v));
+ if(c == 0)
+ q.limbs()[0] |= static_cast<limb_type>(1u) << (lshift - 1);
+ else if(c > 0)
+ q.limbs()[0] |= (static_cast<limb_type>(1u) << (lshift - 1)) + static_cast<limb_type>(1u);
+ }
+ copy_and_round(res, q);
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class U>
+inline typename enable_if_c<is_unsigned<U>::value>::type eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const U &v)
+{
+ eval_divide(res, res, v);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class S>
+inline typename enable_if_c<is_signed<S>::value>::type eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &u, const S &v)
+{
+ typedef typename make_unsigned<S>::type ui_type;
+ eval_divide(res, u, static_cast<ui_type>(boost::multiprecision::detail::unsigned_abs(v)));
+ if(v < 0)
+ res.negate();
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class S>
+inline typename enable_if_c<is_signed<S>::value>::type eval_divide(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const S &v)
+{
+ eval_divide(res, res, v);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline int eval_get_sign(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ return arg.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero ? 0 : arg.sign() ? -1 : 1;
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline bool eval_is_zero(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ return arg.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero;
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline bool eval_eq(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &a, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &b)
+{
+ if(a.exponent() == b.exponent())
+ {
+ if(a.exponent() == cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero)
+ return true;
+ return (a.sign() == b.sign())
+ && (a.bits().compare(b.bits()) == 0)
+ && (a.exponent() != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan);
+ }
+ return false;
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_convert_to(boost::long_long_type *res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ switch(arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ *res = 0;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ BOOST_THROW_EXCEPTION(std::runtime_error("Could not convert NaN to integer."));
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ *res = (std::numeric_limits<boost::long_long_type>::max)();
+ if(arg.sign())
+ *res = -*res;
+ return;
+ }
+ typedef typename mpl::if_c < sizeof(typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type) < sizeof(int), int, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type > ::type shift_type;
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::rep_type man(arg.bits());
+ shift_type shift
+ = (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1 - arg.exponent();
+ if(shift > (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1)
+ {
+ *res = 0;
+ return;
+ }
+ if(arg.sign() && (arg.compare((std::numeric_limits<boost::long_long_type>::min)()) <= 0))
+ {
+ *res = (std::numeric_limits<boost::long_long_type>::min)();
+ return;
+ }
+ else if(!arg.sign() && (arg.compare((std::numeric_limits<boost::long_long_type>::max)()) >= 0))
+ {
+ *res = (std::numeric_limits<boost::long_long_type>::max)();
+ return;
+ }
+
+ if (shift < 0)
+ {
+ if (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - shift <= std::numeric_limits<boost::long_long_type>::digits)
+ {
+ // We have more bits in long_long_type than the float, so it's OK to left shift:
+ eval_convert_to(res, man);
+ *res <<= -shift;
+ }
+ else
+ {
+ *res = (std::numeric_limits<boost::long_long_type>::max)();
+ return;
+ }
+ }
+ else
+ {
+ eval_right_shift(man, shift);
+ eval_convert_to(res, man);
+ }
+ if(arg.sign())
+ {
+ *res = -*res;
+ }
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_convert_to(boost::ulong_long_type *res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ switch(arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ *res = 0;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ BOOST_THROW_EXCEPTION(std::runtime_error("Could not convert NaN to integer."));
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ *res = (std::numeric_limits<boost::ulong_long_type>::max)();
+ return;
+ }
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::rep_type man(arg.bits());
+ typedef typename mpl::if_c < sizeof(typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type) < sizeof(int), int, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type > ::type shift_type;
+ shift_type shift
+ = (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1 - arg.exponent();
+ if(shift > (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1)
+ {
+ *res = 0;
+ return;
+ }
+ else if(shift < 0)
+ {
+ if (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - shift <= std::numeric_limits<boost::ulong_long_type>::digits)
+ {
+ // We have more bits in ulong_long_type than the float, so it's OK to left shift:
+ eval_convert_to(res, man);
+ *res <<= -shift;
+ return;
+ }
+ *res = (std::numeric_limits<boost::ulong_long_type>::max)();
+ return;
+ }
+ eval_right_shift(man, shift);
+ eval_convert_to(res, man);
+}
+
+template <class Float, unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline typename boost::enable_if_c<boost::is_float<Float>::value>::type eval_convert_to(Float *res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &original_arg)
+{
+ typedef cpp_bin_float<std::numeric_limits<Float>::digits, digit_base_2, void, Exponent, MinE, MaxE> conv_type;
+ typedef typename common_type<typename conv_type::exponent_type, int>::type common_exp_type;
+ //
+ // Special cases first:
+ //
+ switch(original_arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ *res = 0;
+ if(original_arg.sign())
+ *res = -*res;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ *res = std::numeric_limits<Float>::quiet_NaN();
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ *res = (std::numeric_limits<Float>::infinity)();
+ if(original_arg.sign())
+ *res = -*res;
+ return;
+ }
+ //
+ // Check for super large exponent that must be converted to infinity:
+ //
+ if(original_arg.exponent() > std::numeric_limits<Float>::max_exponent)
+ {
+ *res = std::numeric_limits<Float>::has_infinity ? std::numeric_limits<Float>::infinity() : (std::numeric_limits<Float>::max)();
+ if(original_arg.sign())
+ *res = -*res;
+ return;
+ }
+ //
+ // Figure out how many digits we will have in our result,
+ // allowing for a possibly denormalized result:
+ //
+ common_exp_type digits_to_round_to = std::numeric_limits<Float>::digits;
+ if(original_arg.exponent() < std::numeric_limits<Float>::min_exponent - 1)
+ {
+ common_exp_type diff = original_arg.exponent();
+ diff -= std::numeric_limits<Float>::min_exponent - 1;
+ digits_to_round_to += diff;
+ }
+ if(digits_to_round_to < 0)
+ {
+ // Result must be zero:
+ *res = 0;
+ if(original_arg.sign())
+ *res = -*res;
+ return;
+ }
+ //
+ // Perform rounding first, then afterwards extract the digits:
+ //
+ cpp_bin_float<std::numeric_limits<Float>::digits, digit_base_2, Allocator, Exponent, MinE, MaxE> arg;
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::rep_type bits(original_arg.bits());
+ arg.exponent() = original_arg.exponent();
+ copy_and_round(arg, bits, (int)digits_to_round_to);
+ common_exp_type e = arg.exponent();
+ e -= cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1;
+ static const unsigned limbs_needed = std::numeric_limits<Float>::digits / (sizeof(*arg.bits().limbs()) * CHAR_BIT)
+ + (std::numeric_limits<Float>::digits % (sizeof(*arg.bits().limbs()) * CHAR_BIT) ? 1 : 0);
+ unsigned first_limb_needed = arg.bits().size() - limbs_needed;
+ *res = 0;
+ e += first_limb_needed * sizeof(*arg.bits().limbs()) * CHAR_BIT;
+ while(first_limb_needed < arg.bits().size())
+ {
+ *res += std::ldexp(static_cast<Float>(arg.bits().limbs()[first_limb_needed]), static_cast<int>(e));
+ ++first_limb_needed;
+ e += sizeof(*arg.bits().limbs()) * CHAR_BIT;
+ }
+ if(original_arg.sign())
+ *res = -*res;
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_frexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, Exponent *e)
+{
+ switch(arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ *e = 0;
+ res = arg;
+ return;
+ }
+ res = arg;
+ *e = arg.exponent() + 1;
+ res.exponent() = -1;
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class I>
+inline void eval_frexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, I *pe)
+{
+ Exponent e;
+ eval_frexp(res, arg, &e);
+ if((e > (std::numeric_limits<I>::max)()) || (e < (std::numeric_limits<I>::min)()))
+ {
+ BOOST_THROW_EXCEPTION(std::runtime_error("Exponent was outside of the range of the argument type to frexp."));
+ }
+ *pe = static_cast<I>(e);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_ldexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, Exponent e)
+{
+ switch(arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ res = arg;
+ return;
+ }
+ if((e > 0) && (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent - e < arg.exponent()))
+ {
+ // Overflow:
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
+ res.sign() = arg.sign();
+ }
+ else if((e < 0) && (cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent - e > arg.exponent()))
+ {
+ // Underflow:
+ res = limb_type(0);
+ }
+ else
+ {
+ res = arg;
+ res.exponent() += e;
+ }
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class I>
+inline typename enable_if_c<is_unsigned<I>::value>::type eval_ldexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, I e)
+{
+ typedef typename make_signed<I>::type si_type;
+ if(e > static_cast<I>((std::numeric_limits<si_type>::max)()))
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
+ else
+ eval_ldexp(res, arg, static_cast<si_type>(e));
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, class I>
+inline typename enable_if_c<is_signed<I>::value>::type eval_ldexp(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg, I e)
+{
+ if((e > (std::numeric_limits<Exponent>::max)()) || (e < (std::numeric_limits<Exponent>::min)()))
+ {
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity().backend();
+ if(e < 0)
+ res.negate();
+ }
+ else
+ eval_ldexp(res, arg, static_cast<Exponent>(e));
+}
+
+/*
+* Sign manipulation
+*/
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_abs(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ res = arg;
+ res.sign() = false;
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_fabs(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ res = arg;
+ res.sign() = false;
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline int eval_fpclassify(const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ switch(arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ return FP_ZERO;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ return FP_INFINITE;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ return FP_NAN;
+ }
+ return FP_NORMAL;
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_sqrt(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ using default_ops::eval_integer_sqrt;
+ using default_ops::eval_bit_test;
+ using default_ops::eval_increment;
+ switch(arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ errno = EDOM;
+ // fallthrough...
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ res = arg;
+ return;
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ if(arg.sign())
+ {
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ errno = EDOM;
+ }
+ else
+ res = arg;
+ return;
+ }
+ if(arg.sign())
+ {
+ res = std::numeric_limits<number<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN().backend();
+ errno = EDOM;
+ return;
+ }
+
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::double_rep_type t(arg.bits()), r, s;
+ eval_left_shift(t, arg.exponent() & 1 ? cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count : cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1);
+ eval_integer_sqrt(s, r, t);
+
+ if(!eval_bit_test(s, cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count))
+ {
+ // We have exactly the right number of cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count in the result, round as required:
+ if(s.compare(r) < 0)
+ {
+ eval_increment(s);
+ }
+ }
+ typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type ae = arg.exponent();
+ res.exponent() = ae / 2;
+ if((ae & 1) && (ae < 0))
+ --res.exponent();
+ copy_and_round(res, s);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_floor(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ using default_ops::eval_increment;
+ switch(arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ errno = EDOM;
+ // fallthrough...
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ res = arg;
+ return;
+ }
+ typedef typename mpl::if_c < sizeof(typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type) < sizeof(int), int, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type > ::type shift_type;
+ shift_type shift =
+ (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - arg.exponent() - 1;
+ if((arg.exponent() > (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent) || (shift <= 0))
+ {
+ // Either arg is already an integer, or a special value:
+ res = arg;
+ return;
+ }
+ if(shift >= (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
+ {
+ res = static_cast<signed_limb_type>(arg.sign() ? -1 : 0);
+ return;
+ }
+ bool fractional = (shift_type)eval_lsb(arg.bits()) < shift;
+ res = arg;
+ eval_right_shift(res.bits(), shift);
+ if(fractional && res.sign())
+ {
+ eval_increment(res.bits());
+ if(eval_msb(res.bits()) != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1 - shift)
+ {
+ // Must have extended result by one bit in the increment:
+ --shift;
+ ++res.exponent();
+ }
+ }
+ eval_left_shift(res.bits(), shift);
+}
+
+template <unsigned Digits, digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+inline void eval_ceil(cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &res, const cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> &arg)
+{
+ using default_ops::eval_increment;
+ switch(arg.exponent())
+ {
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity:
+ errno = EDOM;
+ // fallthrough...
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_zero:
+ case cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan:
+ res = arg;
+ return;
+ }
+ typedef typename mpl::if_c < sizeof(typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type) < sizeof(int), int, typename cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type > ::type shift_type;
+ shift_type shift = (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - arg.exponent() - 1;
+ if((arg.exponent() > (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent) || (shift <= 0))
+ {
+ // Either arg is already an integer, or a special value:
+ res = arg;
+ return;
+ }
+ if(shift >= (shift_type)cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count)
+ {
+ bool s = arg.sign(); // takes care of signed zeros
+ res = static_cast<signed_limb_type>(arg.sign() ? 0 : 1);
+ res.sign() = s;
+ return;
+ }
+ bool fractional = (shift_type)eval_lsb(arg.bits()) < shift;
+ res = arg;
+ eval_right_shift(res.bits(), shift);
+ if(fractional && !res.sign())
+ {
+ eval_increment(res.bits());
+ if(eval_msb(res.bits()) != cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1 - shift)
+ {
+ // Must have extended result by one bit in the increment:
+ --shift;
+ ++res.exponent();
+ }
+ }
+ eval_left_shift(res.bits(), shift);
+}
+
+template<unsigned D1, backends::digit_base_type B1, class A1, class E1, E1 M1, E1 M2>
+int eval_signbit(const cpp_bin_float<D1, B1, A1, E1, M1, M2>& val)
+{
+ return val.sign();
+}
+
+template<unsigned D1, backends::digit_base_type B1, class A1, class E1, E1 M1, E1 M2>
+inline std::size_t hash_value(const cpp_bin_float<D1, B1, A1, E1, M1, M2>& val)
+{
+ std::size_t result = hash_value(val.bits());
+ boost::hash_combine(result, val.exponent());
+ boost::hash_combine(result, val.sign());
+ return result;
+}
+
+
+} // namespace backends
+
+#ifdef BOOST_NO_SFINAE_EXPR
+
+namespace detail{
+
+template<unsigned D1, backends::digit_base_type B1, class A1, class E1, E1 M1, E1 M2, unsigned D2, backends::digit_base_type B2, class A2, class E2, E2 M3, E2 M4>
+struct is_explicitly_convertible<backends::cpp_bin_float<D1, B1, A1, E1, M1, M2>, backends::cpp_bin_float<D2, B2, A2, E2, M3, M4> > : public mpl::true_ {};
+template<class FloatT, unsigned D2, backends::digit_base_type B2, class A2, class E2, E2 M3, E2 M4>
+struct is_explicitly_convertible<FloatT, backends::cpp_bin_float<D2, B2, A2, E2, M3, M4> > : public boost::is_floating_point<FloatT> {};
+
+}
+#endif
+
+template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Exponent, Exponent MinE, Exponent MaxE, class Allocator, boost::multiprecision::expression_template_option ExpressionTemplates>
+inline boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>
+copysign BOOST_PREVENT_MACRO_SUBSTITUTION(
+ const boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>& a,
+ const boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates>& b)
+{
+ boost::multiprecision::number<boost::multiprecision::backends::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> res(a);
+ res.backend().sign() = b.backend().sign();
+ return res;
+}
+
+using backends::cpp_bin_float;
+using backends::digit_base_2;
+using backends::digit_base_10;
+
+template<unsigned Digits, backends::digit_base_type DigitBase, class Exponent, Exponent MinE, Exponent MaxE, class Allocator>
+struct number_category<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > : public boost::mpl::int_<boost::multiprecision::number_kind_floating_point>{};
+
+template<unsigned Digits, backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE>
+struct expression_template_default<cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> >
+{
+ static const expression_template_option value = is_void<Allocator>::value ? et_off : et_on;
+};
+
+typedef number<backends::cpp_bin_float<50> > cpp_bin_float_50;
+typedef number<backends::cpp_bin_float<100> > cpp_bin_float_100;
+
+typedef number<backends::cpp_bin_float<24, backends::digit_base_2, void, boost::int16_t, -126, 127>, et_off> cpp_bin_float_single;
+typedef number<backends::cpp_bin_float<53, backends::digit_base_2, void, boost::int16_t, -1022, 1023>, et_off> cpp_bin_float_double;
+typedef number<backends::cpp_bin_float<64, backends::digit_base_2, void, boost::int16_t, -16382, 16383>, et_off> cpp_bin_float_double_extended;
+typedef number<backends::cpp_bin_float<113, backends::digit_base_2, void, boost::int16_t, -16382, 16383>, et_off> cpp_bin_float_quad;
+typedef number<backends::cpp_bin_float<237, backends::digit_base_2, void, boost::int32_t, -262142, 262143>, et_off> cpp_bin_float_oct;
+
+} // namespace multiprecision
+
+namespace math {
+
+ using boost::multiprecision::signbit;
+ using boost::multiprecision::copysign;
+
+} // namespace math
+
+} // namespace boost
+
+#include <boost/multiprecision/cpp_bin_float/io.hpp>
+#include <boost/multiprecision/cpp_bin_float/transcendental.hpp>
+
+namespace std{
+
+//
+// numeric_limits [partial] specializations for the types declared in this header:
+//
+template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+class numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >
+{
+ typedef boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> number_type;
+public:
+ BOOST_STATIC_CONSTEXPR bool is_specialized = true;
+ static number_type (min)()
+ {
+ initializer.do_nothing();
+ static std::pair<bool, number_type> value;
+ if(!value.first)
+ {
+ value.first = true;
+ typedef typename boost::mpl::front<typename number_type::backend_type::unsigned_types>::type ui_type;
+ value.second.backend() = ui_type(1u);
+ value.second.backend().exponent() = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent;
+ }
+ return value.second;
+ }
+ static number_type (max)()
+ {
+ initializer.do_nothing();
+ static std::pair<bool, number_type> value;
+ if(!value.first)
+ {
+ value.first = true;
+ if(boost::is_void<Allocator>::value)
+ eval_complement(value.second.backend().bits(), value.second.backend().bits());
+ else
+ {
+ // We jump through hoops here using the backend type directly just to keep VC12 happy
+ // (ie compiler workaround, for very strange compiler bug):
+ using boost::multiprecision::default_ops::eval_add;
+ using boost::multiprecision::default_ops::eval_decrement;
+ using boost::multiprecision::default_ops::eval_left_shift;
+ typedef typename number_type::backend_type::rep_type int_backend_type;
+ typedef typename boost::mpl::front<typename int_backend_type::unsigned_types>::type ui_type;
+ int_backend_type i;
+ i = ui_type(1u);
+ eval_left_shift(i, boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count - 1);
+ int_backend_type j(i);
+ eval_decrement(i);
+ eval_add(j, i);
+ value.second.backend().bits() = j;
+ }
+ value.second.backend().exponent() = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent;
+ }
+ return value.second;
+ }
+ BOOST_STATIC_CONSTEXPR number_type lowest()
+ {
+ return -(max)();
+ }
+ BOOST_STATIC_CONSTEXPR int digits = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::bit_count;
+ BOOST_STATIC_CONSTEXPR int digits10 = (digits - 1) * 301 / 1000;
+ // Is this really correct???
+ BOOST_STATIC_CONSTEXPR int max_digits10 = (digits * 301 / 1000) + 3;
+ BOOST_STATIC_CONSTEXPR bool is_signed = true;
+ BOOST_STATIC_CONSTEXPR bool is_integer = false;
+ BOOST_STATIC_CONSTEXPR bool is_exact = false;
+ BOOST_STATIC_CONSTEXPR int radix = 2;
+ static number_type epsilon()
+ {
+ initializer.do_nothing();
+ static std::pair<bool, number_type> value;
+ if(!value.first)
+ {
+ // We jump through hoops here just to keep VC12 happy (ie compiler workaround, for very strange compiler bug):
+ typedef typename boost::mpl::front<typename number_type::backend_type::unsigned_types>::type ui_type;
+ value.first = true;
+ value.second.backend() = ui_type(1u);
+ value.second = ldexp(value.second, 1 - (int)digits);
+ }
+ return value.second;
+ }
+ // What value should this be????
+ static number_type round_error()
+ {
+ // returns 0.5
+ initializer.do_nothing();
+ static std::pair<bool, number_type> value;
+ if(!value.first)
+ {
+ value.first = true;
+ // We jump through hoops here just to keep VC12 happy (ie compiler workaround, for very strange compiler bug):
+ typedef typename boost::mpl::front<typename number_type::backend_type::unsigned_types>::type ui_type;
+ value.second.backend() = ui_type(1u);
+ value.second = ldexp(value.second, -1);
+ }
+ return value.second;
+ }
+ BOOST_STATIC_CONSTEXPR typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type min_exponent = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::min_exponent;
+ BOOST_STATIC_CONSTEXPR typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type min_exponent10 = (min_exponent / 1000) * 301L;
+ BOOST_STATIC_CONSTEXPR typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type max_exponent = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::max_exponent;
+ BOOST_STATIC_CONSTEXPR typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type max_exponent10 = (max_exponent / 1000) * 301L;
+ BOOST_STATIC_CONSTEXPR bool has_infinity = true;
+ BOOST_STATIC_CONSTEXPR bool has_quiet_NaN = true;
+ BOOST_STATIC_CONSTEXPR bool has_signaling_NaN = false;
+ BOOST_STATIC_CONSTEXPR float_denorm_style has_denorm = denorm_absent;
+ BOOST_STATIC_CONSTEXPR bool has_denorm_loss = false;
+ static number_type infinity()
+ {
+ initializer.do_nothing();
+ static std::pair<bool, number_type> value;
+ if(!value.first)
+ {
+ value.first = true;
+ value.second.backend().exponent() = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_infinity;
+ }
+ return value.second;
+ }
+ static number_type quiet_NaN()
+ {
+ initializer.do_nothing();
+ static std::pair<bool, number_type> value;
+ if(!value.first)
+ {
+ value.first = true;
+ value.second.backend().exponent() = boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_nan;
+ }
+ return value.second;
+ }
+ BOOST_STATIC_CONSTEXPR number_type signaling_NaN()
+ {
+ return number_type(0);
+ }
+ BOOST_STATIC_CONSTEXPR number_type denorm_min() { return number_type(0); }
+ BOOST_STATIC_CONSTEXPR bool is_iec559 = false;
+ BOOST_STATIC_CONSTEXPR bool is_bounded = true;
+ BOOST_STATIC_CONSTEXPR bool is_modulo = false;
+ BOOST_STATIC_CONSTEXPR bool traps = true;
+ BOOST_STATIC_CONSTEXPR bool tinyness_before = false;
+ BOOST_STATIC_CONSTEXPR float_round_style round_style = round_to_nearest;
+private:
+ struct data_initializer
+ {
+ data_initializer()
+ {
+ std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::epsilon();
+ std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::round_error();
+ (std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::min)();
+ (std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::max)();
+ std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::infinity();
+ std::numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE> > >::quiet_NaN();
+ }
+ void do_nothing()const{}
+ };
+ static const data_initializer initializer;
+};
+
+template<unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+const typename numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::data_initializer numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::initializer;
+
+#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::digits;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::digits10;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::max_digits10;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_signed;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_integer;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_exact;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST int numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::radix;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::min_exponent;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::min_exponent10;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::max_exponent;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST typename boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>::exponent_type numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::max_exponent10;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_infinity;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_quiet_NaN;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_signaling_NaN;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST float_denorm_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_denorm;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::has_denorm_loss;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_iec559;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_bounded;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::is_modulo;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::traps;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST bool numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::tinyness_before;
+template <unsigned Digits, boost::multiprecision::backends::digit_base_type DigitBase, class Allocator, class Exponent, Exponent MinE, Exponent MaxE, boost::multiprecision::expression_template_option ExpressionTemplates>
+BOOST_CONSTEXPR_OR_CONST float_round_style numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bin_float<Digits, DigitBase, Allocator, Exponent, MinE, MaxE>, ExpressionTemplates> >::round_style;
+
+#endif
+
+} // namespace std
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float/io.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/io.hpp
index 8a3faaa4ff6..8a3faaa4ff6 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float/io.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float/transcendental.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/transcendental.hpp
index 5c969716a54..5c969716a54 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_bin_float/transcendental.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_bin_float/transcendental.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int.hpp
new file mode 100644
index 00000000000..d81831b8a6d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int.hpp
@@ -0,0 +1,1986 @@
+//////////////////3/////////////////////////////////////////////
+// Copyright 2012 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifndef BOOST_MP_CPP_INT_HPP
+#define BOOST_MP_CPP_INT_HPP
+
+#include <iostream>
+#include <iomanip>
+#include <boost/cstdint.hpp>
+#include <boost/multiprecision/number.hpp>
+#include <boost/multiprecision/detail/integer_ops.hpp>
+#include <boost/multiprecision/detail/rebind.hpp>
+#include <boost/core/empty_value.hpp>
+#include <boost/array.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/multiprecision/cpp_int/cpp_int_config.hpp>
+#include <boost/multiprecision/rational_adaptor.hpp>
+#include <boost/multiprecision/traits/is_byte_container.hpp>
+#include <boost/predef/other/endian.h>
+#include <boost/integer/static_min_max.hpp>
+#include <boost/type_traits/common_type.hpp>
+#include <boost/type_traits/make_signed.hpp>
+#include <boost/multiprecision/cpp_int/checked.hpp>
+#ifdef BOOST_MP_USER_DEFINED_LITERALS
+#include <boost/multiprecision/cpp_int/value_pack.hpp>
+#endif
+
+namespace boost{
+namespace multiprecision{
+namespace backends{
+
+ using boost::enable_if;
+
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4307) // integral constant overflow (oveflow is in a branch not taken when it would overflow)
+#pragma warning(disable:4127) // conditional expression is constant
+#pragma warning(disable:4702) // Unreachable code (reachability depends on template params)
+#endif
+
+template <unsigned MinBits = 0, unsigned MaxBits = 0, boost::multiprecision::cpp_integer_type SignType = signed_magnitude, cpp_int_check_type Checked = unchecked, class Allocator = typename mpl::if_c<MinBits && (MinBits == MaxBits), void, std::allocator<limb_type> >::type >
+struct cpp_int_backend;
+
+} // namespace backends
+
+namespace detail {
+
+ template <unsigned MinBits, unsigned MaxBits, boost::multiprecision::cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+ struct is_byte_container<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > : public boost::false_type {};
+
+} // namespace detail
+
+namespace backends{
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, bool trivial = false>
+struct cpp_int_base;
+//
+// Traits class determines the maximum and minimum precision values:
+//
+template <class T> struct max_precision;
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
+{
+ static const unsigned value = is_void<Allocator>::value ?
+ static_unsigned_max<MinBits, MaxBits>::value
+ : (((MaxBits >= MinBits) && MaxBits) ? MaxBits : UINT_MAX);
+};
+
+template <class T> struct min_precision;
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct min_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
+{
+ static const unsigned value = (is_void<Allocator>::value ? static_unsigned_max<MinBits, MaxBits>::value : MinBits);
+};
+//
+// Traits class determines whether the number of bits precision requested could fit in a native type,
+// we call this a "trivial" cpp_int:
+//
+template <class T>
+struct is_trivial_cpp_int
+{
+ static const bool value = false;
+};
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
+{
+ typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> self;
+ static const bool value = is_void<Allocator>::value && (max_precision<self>::value <= (sizeof(double_limb_type) * CHAR_BIT) - (SignType == signed_packed ? 1 : 0));
+};
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct is_trivial_cpp_int<cpp_int_base<MinBits, MaxBits, SignType, Checked, Allocator, true> >
+{
+ static const bool value = true;
+};
+
+} // namespace backends
+//
+// Traits class to determine whether a cpp_int_backend is signed or not:
+//
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct is_unsigned_number<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
+ : public mpl::bool_<(SignType == unsigned_magnitude) || (SignType == unsigned_packed)>{};
+
+namespace backends{
+//
+// Traits class determines whether T should be implicitly convertible to U, or
+// whether the constructor should be made explicit. The latter happens if we
+// are losing the sign, or have fewer digits precision in the target type:
+//
+template <class T, class U>
+struct is_implicit_cpp_int_conversion;
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+struct is_implicit_cpp_int_conversion<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >
+{
+ typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> t1;
+ typedef cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> t2;
+ static const bool value =
+ (is_signed_number<t2>::value || !is_signed_number<t1>::value)
+ && (max_precision<t1>::value <= max_precision<t2>::value);
+};
+
+//
+// Traits class to determine whether operations on a cpp_int may throw:
+//
+template <class T>
+struct is_non_throwing_cpp_int : public mpl::false_{};
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType>
+struct is_non_throwing_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, unchecked, void> > : public mpl::true_ {};
+
+//
+// Traits class, determines whether the cpp_int is fixed precision or not:
+//
+template <class T>
+struct is_fixed_precision;
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct is_fixed_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
+ : public mpl::bool_<max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value != UINT_MAX> {};
+
+namespace detail{
+
+inline void verify_new_size(unsigned new_size, unsigned min_size, const mpl::int_<checked>&)
+{
+ if(new_size < min_size)
+ BOOST_THROW_EXCEPTION(std::overflow_error("Unable to allocate sufficient storage for the value of the result: value overflows the maximum allowable magnitude."));
+}
+inline void verify_new_size(unsigned /*new_size*/, unsigned /*min_size*/, const mpl::int_<unchecked>&){}
+
+template <class U>
+inline void verify_limb_mask(bool b, U limb, U mask, const mpl::int_<checked>&)
+{
+ // When we mask out "limb" with "mask", do we loose bits? If so it's an overflow error:
+ if(b && (limb & ~mask))
+ BOOST_THROW_EXCEPTION(std::overflow_error("Overflow in cpp_int arithmetic: there is insufficient precision in the target type to hold all of the bits of the result."));
+}
+template <class U>
+inline void verify_limb_mask(bool /*b*/, U /*limb*/, U /*mask*/, const mpl::int_<unchecked>&){}
+
+}
+
+//
+// Now define the various data layouts that are possible as partial specializations of the base class,
+// starting with the default arbitrary precision signed integer type:
+//
+template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
+struct cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>
+ : private boost::empty_value<typename detail::rebind<limb_type, Allocator>::type>
+{
+ typedef typename detail::rebind<limb_type, Allocator>::type allocator_type;
+#ifdef BOOST_NO_CXX11_ALLOCATOR
+ typedef typename allocator_type::pointer limb_pointer;
+ typedef typename allocator_type::const_pointer const_limb_pointer;
+#else
+ typedef typename std::allocator_traits<allocator_type>::pointer limb_pointer;
+ typedef typename std::allocator_traits<allocator_type>::const_pointer const_limb_pointer;
+#endif
+ typedef mpl::int_<Checked> checked_type;
+
+ //
+ // Interface invariants:
+ //
+ BOOST_STATIC_ASSERT(!is_void<Allocator>::value);
+
+private:
+ typedef boost::empty_value<allocator_type> base_type;
+
+ struct limb_data
+ {
+ unsigned capacity;
+ limb_pointer data;
+ };
+
+public:
+ BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT);
+ BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast<limb_type>(0u));
+ BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1));
+ BOOST_STATIC_CONSTANT(unsigned, internal_limb_count =
+ MinBits
+ ? (MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0))
+ : (sizeof(limb_data) / sizeof(limb_type)));
+ BOOST_STATIC_CONSTANT(bool, variable = true);
+
+private:
+ union data_type
+ {
+ limb_data ld;
+ limb_type la[internal_limb_count];
+ limb_type first;
+ double_limb_type double_first;
+
+ BOOST_CONSTEXPR data_type() : first(0) {}
+ BOOST_CONSTEXPR data_type(limb_type i) : first(i) {}
+ BOOST_CONSTEXPR data_type(signed_limb_type i) : first(i < 0 ? static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i) {}
+#if BOOST_ENDIAN_LITTLE_BYTE
+ BOOST_CONSTEXPR data_type(double_limb_type i) : double_first(i) {}
+ BOOST_CONSTEXPR data_type(signed_double_limb_type i) : double_first(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i) {}
+#endif
+ };
+
+ data_type m_data;
+ unsigned m_limbs;
+ bool m_sign, m_internal;
+
+public:
+ //
+ // Direct construction:
+ //
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(limb_type i)BOOST_NOEXCEPT
+ : m_data(i), m_limbs(1), m_sign(false), m_internal(true) { }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_limb_type i)BOOST_NOEXCEPT
+ : m_data(i), m_limbs(1), m_sign(i < 0), m_internal(true) { }
+#if BOOST_ENDIAN_LITTLE_BYTE && !defined(BOOST_MP_TEST_NO_LE)
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
+ : m_data(i), m_limbs(i > max_limb_value ? 2 : 1), m_sign(false), m_internal(true) { }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_double_limb_type i)BOOST_NOEXCEPT
+ : m_data(i), m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > static_cast<double_limb_type>(max_limb_value) ? 2 : 1) : (i > max_limb_value ? 2 : 1)),
+ m_sign(i < 0), m_internal(true) { }
+#endif
+ //
+ // Helper functions for getting at our internal data, and manipulating storage:
+ //
+ BOOST_MP_FORCEINLINE allocator_type& allocator() BOOST_NOEXCEPT { return base_type::get(); }
+ BOOST_MP_FORCEINLINE const allocator_type& allocator()const BOOST_NOEXCEPT { return base_type::get(); }
+ BOOST_MP_FORCEINLINE unsigned size()const BOOST_NOEXCEPT { return m_limbs; }
+ BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return m_internal ? m_data.la : m_data.ld.data; }
+ BOOST_MP_FORCEINLINE const_limb_pointer limbs()const BOOST_NOEXCEPT { return m_internal ? m_data.la : m_data.ld.data; }
+ BOOST_MP_FORCEINLINE unsigned capacity()const BOOST_NOEXCEPT { return m_internal ? internal_limb_count : m_data.ld.capacity; }
+ BOOST_MP_FORCEINLINE bool sign()const BOOST_NOEXCEPT { return m_sign; }
+ void sign(bool b) BOOST_NOEXCEPT
+ {
+ m_sign = b;
+ // Check for zero value:
+ if(m_sign && (m_limbs == 1))
+ {
+ if(limbs()[0] == 0)
+ m_sign = false;
+ }
+ }
+ void resize(unsigned new_size, unsigned min_size)
+ {
+ static const unsigned max_limbs = MaxBits / (CHAR_BIT * sizeof(limb_type)) + ((MaxBits % (CHAR_BIT * sizeof(limb_type))) ? 1 : 0);
+ // We never resize beyond MaxSize:
+ if(new_size > max_limbs)
+ new_size = max_limbs;
+ detail::verify_new_size(new_size, min_size, checked_type());
+ // See if we have enough capacity already:
+ unsigned cap = capacity();
+ if(new_size > cap)
+ {
+ // Allocate a new buffer and copy everything over:
+ cap = (std::min)((std::max)(cap * 4, new_size), max_limbs);
+ limb_pointer pl = allocator().allocate(cap);
+ std::memcpy(pl, limbs(), size() * sizeof(limbs()[0]));
+ if(!m_internal)
+ allocator().deallocate(limbs(), capacity());
+ else
+ m_internal = false;
+ m_limbs = new_size;
+ m_data.ld.capacity = cap;
+ m_data.ld.data = pl;
+ }
+ else
+ {
+ m_limbs = new_size;
+ }
+ }
+ BOOST_MP_FORCEINLINE void normalize() BOOST_NOEXCEPT
+ {
+ limb_pointer p = limbs();
+ while((m_limbs-1) && !p[m_limbs - 1])--m_limbs;
+ }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base() BOOST_NOEXCEPT : m_data(), m_limbs(1), m_sign(false), m_internal(true) {}
+ BOOST_MP_FORCEINLINE cpp_int_base(const cpp_int_base& o) : base_type(o), m_limbs(0), m_internal(true)
+ {
+ resize(o.size(), o.size());
+ std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
+ m_sign = o.m_sign;
+ }
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ cpp_int_base(cpp_int_base&& o)
+ : base_type(static_cast<base_type&&>(o)), m_limbs(o.m_limbs), m_sign(o.m_sign), m_internal(o.m_internal)
+ {
+ if(m_internal)
+ {
+ std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
+ }
+ else
+ {
+ m_data.ld = o.m_data.ld;
+ o.m_limbs = 0;
+ o.m_internal = true;
+ }
+ }
+ cpp_int_base& operator = (cpp_int_base&& o) BOOST_NOEXCEPT
+ {
+ if(!m_internal)
+ allocator().deallocate(m_data.ld.data, m_data.ld.capacity);
+ *static_cast<base_type*>(this) = static_cast<base_type&&>(o);
+ m_limbs = o.m_limbs;
+ m_sign = o.m_sign;
+ m_internal = o.m_internal;
+ if(m_internal)
+ {
+ std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
+ }
+ else
+ {
+ m_data.ld = o.m_data.ld;
+ o.m_limbs = 0;
+ o.m_internal = true;
+ }
+ return *this;
+ }
+#endif
+ BOOST_MP_FORCEINLINE ~cpp_int_base() BOOST_NOEXCEPT
+ {
+ if(!m_internal)
+ allocator().deallocate(limbs(), capacity());
+ }
+ void assign(const cpp_int_base& o)
+ {
+ if(this != &o)
+ {
+ static_cast<base_type&>(*this) = static_cast<const base_type&>(o);
+ m_limbs = 0;
+ resize(o.size(), o.size());
+ std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
+ m_sign = o.m_sign;
+ }
+ }
+ BOOST_MP_FORCEINLINE void negate() BOOST_NOEXCEPT
+ {
+ m_sign = !m_sign;
+ // Check for zero value:
+ if(m_sign && (m_limbs == 1))
+ {
+ if(limbs()[0] == 0)
+ m_sign = false;
+ }
+ }
+ BOOST_MP_FORCEINLINE bool isneg()const BOOST_NOEXCEPT
+ {
+ return m_sign;
+ }
+ BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ std::swap(m_data, o.m_data);
+ std::swap(m_sign, o.m_sign);
+ std::swap(m_internal, o.m_internal);
+ std::swap(m_limbs, o.m_limbs);
+ }
+protected:
+ template <class A>
+ void check_in_range(const A&) BOOST_NOEXCEPT {}
+};
+
+#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+
+template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
+const unsigned cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::limb_bits;
+template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
+const limb_type cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::max_limb_value;
+template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
+const limb_type cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::sign_bit_mask;
+template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
+const unsigned cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::internal_limb_count;
+template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
+const bool cpp_int_base<MinBits, MaxBits, signed_magnitude, Checked, Allocator, false>::variable;
+
+#endif
+
+template <unsigned MinBits, unsigned MaxBits, cpp_int_check_type Checked, class Allocator>
+struct cpp_int_base<MinBits, MaxBits, unsigned_magnitude, Checked, Allocator, false>
+ : private boost::empty_value<typename detail::rebind<limb_type, Allocator>::type>
+{
+ //
+ // There is currently no support for unsigned arbitrary precision arithmetic, largely
+ // because it's not clear what subtraction should do:
+ //
+ BOOST_STATIC_ASSERT_MSG(((sizeof(Allocator) == 0) && !is_void<Allocator>::value), "There is curently no support for unsigned arbitrary precision integers.");
+};
+//
+// Fixed precision (i.e. no allocator), signed-magnitude type with limb-usage count:
+//
+template <unsigned MinBits, cpp_int_check_type Checked>
+struct cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>
+{
+ typedef limb_type* limb_pointer;
+ typedef const limb_type* const_limb_pointer;
+ typedef mpl::int_<Checked> checked_type;
+
+ //
+ // Interface invariants:
+ //
+ BOOST_STATIC_ASSERT_MSG(MinBits > sizeof(double_limb_type) * CHAR_BIT, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?");
+
+public:
+ BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT);
+ BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast<limb_type>(0u));
+ BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1));
+ BOOST_STATIC_CONSTANT(unsigned, internal_limb_count = MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0));
+ BOOST_STATIC_CONSTANT(bool, variable = false);
+ BOOST_STATIC_CONSTANT(limb_type, upper_limb_mask = (MinBits % limb_bits) ? (limb_type(1) << (MinBits % limb_bits)) -1 : (~limb_type(0)));
+ BOOST_STATIC_ASSERT_MSG(internal_limb_count >= 2, "A fixed precision integer type must have at least 2 limbs");
+
+private:
+ union data_type{
+ limb_type m_data[internal_limb_count];
+ limb_type m_first_limb;
+ double_limb_type m_double_first_limb;
+
+ BOOST_CONSTEXPR data_type() : m_first_limb(0) {}
+ BOOST_CONSTEXPR data_type(limb_type i) : m_first_limb(i) {}
+ BOOST_CONSTEXPR data_type(double_limb_type i) : m_double_first_limb(i) {}
+#if defined(BOOST_MP_USER_DEFINED_LITERALS)
+ template <limb_type...VALUES>
+ BOOST_CONSTEXPR data_type(literals::detail::value_pack<VALUES...>) : m_data{ VALUES... } {}
+#endif
+ } m_wrapper;
+ boost::uint16_t m_limbs;
+ bool m_sign;
+
+public:
+ //
+ // Direct construction:
+ //
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(limb_type i)BOOST_NOEXCEPT
+ : m_wrapper(i), m_limbs(1), m_sign(false) {}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_limb_type i)BOOST_NOEXCEPT
+ : m_wrapper(limb_type(i < 0 ? static_cast<limb_type>(-static_cast<signed_double_limb_type>(i)) : i)), m_limbs(1), m_sign(i < 0) {}
+#if BOOST_ENDIAN_LITTLE_BYTE && !defined(BOOST_MP_TEST_NO_LE)
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
+ : m_wrapper(i), m_limbs(i > max_limb_value ? 2 : 1), m_sign(false) {}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(signed_double_limb_type i)BOOST_NOEXCEPT
+ : m_wrapper(double_limb_type(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i)),
+ m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > max_limb_value ? 2 : 1) : (i > max_limb_value ? 2 : 1)),
+ m_sign(i < 0) {}
+#endif
+#if defined(BOOST_MP_USER_DEFINED_LITERALS)
+ template <limb_type...VALUES>
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<VALUES...> i)
+ : m_wrapper(i), m_limbs(sizeof...(VALUES)), m_sign(false) {}
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<> i)
+ : m_wrapper(i), m_limbs(1), m_sign(false) {}
+ BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& a, const literals::detail::negate_tag&)
+ : m_wrapper(a.m_wrapper), m_limbs(a.m_limbs), m_sign((a.m_limbs == 1) && (*a.limbs() == 0) ? false : !a.m_sign) {}
+#endif
+ //
+ // Helper functions for getting at our internal data, and manipulating storage:
+ //
+ BOOST_MP_FORCEINLINE unsigned size()const BOOST_NOEXCEPT { return m_limbs; }
+ BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return m_wrapper.m_data; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const_limb_pointer limbs()const BOOST_NOEXCEPT { return m_wrapper.m_data; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool sign()const BOOST_NOEXCEPT { return m_sign; }
+ BOOST_MP_FORCEINLINE void sign(bool b) BOOST_NOEXCEPT
+ {
+ m_sign = b;
+ // Check for zero value:
+ if(m_sign && (m_limbs == 1))
+ {
+ if(limbs()[0] == 0)
+ m_sign = false;
+ }
+ }
+ BOOST_MP_FORCEINLINE void resize(unsigned new_size, unsigned min_size) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ m_limbs = static_cast<boost::uint16_t>((std::min)(new_size, internal_limb_count));
+ detail::verify_new_size(m_limbs, min_size, checked_type());
+ }
+ BOOST_MP_FORCEINLINE void normalize() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ limb_pointer p = limbs();
+ detail::verify_limb_mask(m_limbs == internal_limb_count, p[internal_limb_count-1], upper_limb_mask, checked_type());
+ p[internal_limb_count-1] &= upper_limb_mask;
+ while((m_limbs-1) && !p[m_limbs - 1])--m_limbs;
+ if((m_limbs == 1) && (!*p)) m_sign = false; // zero is always unsigned
+ }
+
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base()BOOST_NOEXCEPT : m_wrapper(limb_type(0u)), m_limbs(1), m_sign(false) {}
+ // Not defaulted, it breaks constexpr support in the Intel compiler for some reason:
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& o)BOOST_NOEXCEPT
+ : m_wrapper(o.m_wrapper), m_limbs(o.m_limbs), m_sign(o.m_sign) {}
+ // Defaulted functions:
+ //~cpp_int_base() BOOST_NOEXCEPT {}
+
+ void assign(const cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ if(this != &o)
+ {
+ m_limbs = o.m_limbs;
+ std::memcpy(limbs(), o.limbs(), o.size() * sizeof(o.limbs()[0]));
+ m_sign = o.m_sign;
+ }
+ }
+ BOOST_MP_FORCEINLINE void negate() BOOST_NOEXCEPT
+ {
+ m_sign = !m_sign;
+ // Check for zero value:
+ if(m_sign && (m_limbs == 1))
+ {
+ if(limbs()[0] == 0)
+ m_sign = false;
+ }
+ }
+ BOOST_MP_FORCEINLINE bool isneg()const BOOST_NOEXCEPT
+ {
+ return m_sign;
+ }
+ BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ for(unsigned i = 0; i < (std::max)(size(), o.size()); ++i)
+ std::swap(m_wrapper.m_data[i], o.m_wrapper.m_data[i]);
+ std::swap(m_sign, o.m_sign);
+ std::swap(m_limbs, o.m_limbs);
+ }
+protected:
+ template <class A>
+ void check_in_range(const A&) BOOST_NOEXCEPT {}
+};
+#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+
+template <unsigned MinBits, cpp_int_check_type Checked>
+const unsigned cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::limb_bits;
+template <unsigned MinBits, cpp_int_check_type Checked>
+const limb_type cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::max_limb_value;
+template <unsigned MinBits, cpp_int_check_type Checked>
+const limb_type cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::sign_bit_mask;
+template <unsigned MinBits, cpp_int_check_type Checked>
+const unsigned cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::internal_limb_count;
+template <unsigned MinBits, cpp_int_check_type Checked>
+const bool cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, false>::variable;
+
+#endif
+//
+// Fixed precision (i.e. no allocator), unsigned type with limb-usage count:
+//
+template <unsigned MinBits, cpp_int_check_type Checked>
+struct cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>
+{
+ typedef limb_type* limb_pointer;
+ typedef const limb_type* const_limb_pointer;
+ typedef mpl::int_<Checked> checked_type;
+
+ //
+ // Interface invariants:
+ //
+ BOOST_STATIC_ASSERT_MSG(MinBits > sizeof(double_limb_type) * CHAR_BIT, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?");
+
+public:
+ BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(limb_type) * CHAR_BIT);
+ BOOST_STATIC_CONSTANT(limb_type, max_limb_value = ~static_cast<limb_type>(0u));
+ BOOST_STATIC_CONSTANT(limb_type, sign_bit_mask = static_cast<limb_type>(1u) << (limb_bits - 1));
+ BOOST_STATIC_CONSTANT(unsigned, internal_limb_count = MinBits / limb_bits + ((MinBits % limb_bits) ? 1 : 0));
+ BOOST_STATIC_CONSTANT(bool, variable = false);
+ BOOST_STATIC_CONSTANT(limb_type, upper_limb_mask = (MinBits % limb_bits) ? (limb_type(1) << (MinBits % limb_bits)) -1 : (~limb_type(0)));
+ BOOST_STATIC_ASSERT_MSG(internal_limb_count >= 2, "A fixed precision integer type must have at least 2 limbs");
+
+private:
+ union data_type{
+ limb_type m_data[internal_limb_count];
+ limb_type m_first_limb;
+ double_limb_type m_double_first_limb;
+
+ BOOST_CONSTEXPR data_type() : m_first_limb(0) {}
+ BOOST_CONSTEXPR data_type(limb_type i) : m_first_limb(i) {}
+ BOOST_CONSTEXPR data_type(double_limb_type i) : m_double_first_limb(i) {}
+#if defined(BOOST_MP_USER_DEFINED_LITERALS)
+ template <limb_type...VALUES>
+ BOOST_CONSTEXPR data_type(literals::detail::value_pack<VALUES...>) : m_data{ VALUES... } {}
+#endif
+ } m_wrapper;
+ limb_type m_limbs;
+
+public:
+ //
+ // Direct construction:
+ //
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(limb_type i)BOOST_NOEXCEPT
+ : m_wrapper(i), m_limbs(1) {}
+ BOOST_MP_FORCEINLINE cpp_int_base(signed_limb_type i)BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ : m_wrapper(limb_type(i < 0 ? static_cast<limb_type>(-static_cast<signed_double_limb_type>(i)) : i)), m_limbs(1) { if(i < 0) negate(); }
+#if BOOST_ENDIAN_LITTLE_BYTE && !defined(BOOST_MP_TEST_NO_LE)
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(double_limb_type i)BOOST_NOEXCEPT
+ : m_wrapper(i), m_limbs(i > max_limb_value ? 2 : 1) {}
+ BOOST_MP_FORCEINLINE cpp_int_base(signed_double_limb_type i)BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ : m_wrapper(double_limb_type(i < 0 ? static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) : i)),
+ m_limbs(i < 0 ? (static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i)) > max_limb_value ? 2 : 1) : (i > max_limb_value ? 2 : 1))
+ {
+ if (i < 0) negate();
+ }
+#endif
+#if defined(BOOST_MP_USER_DEFINED_LITERALS)
+ template <limb_type...VALUES>
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<VALUES...> i)
+ : m_wrapper(i), m_limbs(sizeof...(VALUES)) {}
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<>)
+ : m_wrapper(static_cast<limb_type>(0u)), m_limbs(1) {}
+#endif
+ //
+ // Helper functions for getting at our internal data, and manipulating storage:
+ //
+ BOOST_MP_FORCEINLINE unsigned size()const BOOST_NOEXCEPT { return m_limbs; }
+ BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return m_wrapper.m_data; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const_limb_pointer limbs()const BOOST_NOEXCEPT { return m_wrapper.m_data; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool sign()const BOOST_NOEXCEPT { return false; }
+ BOOST_MP_FORCEINLINE void sign(bool b) BOOST_MP_NOEXCEPT_IF((Checked == unchecked)) { if(b) negate(); }
+ BOOST_MP_FORCEINLINE void resize(unsigned new_size, unsigned min_size) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ m_limbs = (std::min)(new_size, internal_limb_count);
+ detail::verify_new_size(m_limbs, min_size, checked_type());
+ }
+ BOOST_MP_FORCEINLINE void normalize() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ limb_pointer p = limbs();
+ detail::verify_limb_mask(m_limbs == internal_limb_count, p[internal_limb_count-1], upper_limb_mask, checked_type());
+ p[internal_limb_count-1] &= upper_limb_mask;
+ while((m_limbs-1) && !p[m_limbs - 1])--m_limbs;
+ }
+
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base() BOOST_NOEXCEPT
+ : m_wrapper(limb_type(0u)), m_limbs(1) {}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& o) BOOST_NOEXCEPT
+ : m_wrapper(o.m_wrapper), m_limbs(o.m_limbs) {}
+ // Defaulted functions:
+ //~cpp_int_base() BOOST_NOEXCEPT {}
+
+ BOOST_MP_FORCEINLINE void assign(const cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ if(this != &o)
+ {
+ m_limbs = o.m_limbs;
+ std::memcpy(limbs(), o.limbs(), o.size() * sizeof(limbs()[0]));
+ }
+ }
+private:
+ void check_negate(const mpl::int_<checked>&)
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("Attempt to negate an unsigned number."));
+ }
+ void check_negate(const mpl::int_<unchecked>&){}
+public:
+ void negate() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ // Not so much a negate as a complement - this gets called when subtraction
+ // would result in a "negative" number:
+ unsigned i;
+ if((m_limbs == 1) && (m_wrapper.m_data[0] == 0))
+ return; // negating zero is always zero, and always OK.
+ check_negate(checked_type());
+ for(i = m_limbs; i < internal_limb_count; ++i)
+ m_wrapper.m_data[i] = 0;
+ m_limbs = internal_limb_count;
+ for(i = 0; i < internal_limb_count; ++i)
+ m_wrapper.m_data[i] = ~m_wrapper.m_data[i];
+ normalize();
+ eval_increment(static_cast<cpp_int_backend<MinBits, MinBits, unsigned_magnitude, Checked, void>& >(*this));
+ }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool isneg()const BOOST_NOEXCEPT
+ {
+ return false;
+ }
+ BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ for(unsigned i = 0; i < (std::max)(size(), o.size()); ++i)
+ std::swap(m_wrapper.m_data[i], o.m_wrapper.m_data[i]);
+ std::swap(m_limbs, o.m_limbs);
+ }
+protected:
+ template <class A>
+ void check_in_range(const A&) BOOST_NOEXCEPT {}
+};
+#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
+
+template <unsigned MinBits, cpp_int_check_type Checked>
+const unsigned cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::limb_bits;
+template <unsigned MinBits, cpp_int_check_type Checked>
+const limb_type cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::max_limb_value;
+template <unsigned MinBits, cpp_int_check_type Checked>
+const limb_type cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::sign_bit_mask;
+template <unsigned MinBits, cpp_int_check_type Checked>
+const unsigned cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::internal_limb_count;
+template <unsigned MinBits, cpp_int_check_type Checked>
+const bool cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, false>::variable;
+
+#endif
+//
+// Traits classes to figure out a native type with N bits, these vary from boost::uint_t<N> only
+// because some platforms have native integer types longer than boost::long_long_type, "really boost::long_long_type" anyone??
+//
+template <unsigned N, bool s>
+struct trivial_limb_type_imp
+{
+ typedef double_limb_type type;
+};
+
+template <unsigned N>
+struct trivial_limb_type_imp<N, true>
+{
+ typedef typename boost::uint_t<N>::least type;
+};
+
+template <unsigned N>
+struct trivial_limb_type : public trivial_limb_type_imp<N, N <= sizeof(boost::long_long_type) * CHAR_BIT> {};
+//
+// Backend for fixed precision signed-magnitude type which will fit entirely inside a "double_limb_type":
+//
+template <unsigned MinBits, cpp_int_check_type Checked>
+struct cpp_int_base<MinBits, MinBits, signed_magnitude, Checked, void, true>
+{
+ typedef typename trivial_limb_type<MinBits>::type local_limb_type;
+ typedef local_limb_type* limb_pointer;
+ typedef const local_limb_type* const_limb_pointer;
+ typedef mpl::int_<Checked> checked_type;
+protected:
+ BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(local_limb_type) * CHAR_BIT);
+ BOOST_STATIC_CONSTANT(local_limb_type, limb_mask = (MinBits < limb_bits) ? local_limb_type((local_limb_type(~local_limb_type(0))) >> (limb_bits - MinBits)) : local_limb_type(~local_limb_type(0)));
+private:
+ local_limb_type m_data;
+ bool m_sign;
+
+ //
+ // Interface invariants:
+ //
+ BOOST_STATIC_ASSERT_MSG(MinBits <= sizeof(double_limb_type) * CHAR_BIT, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?");
+protected:
+ template <class T>
+ typename boost::disable_if_c<!boost::is_integral<T>::value || (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits))>::type
+ check_in_range(T val, const mpl::int_<checked>&)
+ {
+ typedef typename common_type<typename make_unsigned<T>::type, local_limb_type>::type common_type;
+
+ if(static_cast<common_type>(boost::multiprecision::detail::unsigned_abs(val)) > static_cast<common_type>(limb_mask))
+ BOOST_THROW_EXCEPTION(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."));
+ }
+ template <class T>
+ typename boost::disable_if_c<boost::is_integral<T>::value || (std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits))>::type
+ check_in_range(T val, const mpl::int_<checked>&)
+ {
+ using std::abs;
+ typedef typename common_type<T, local_limb_type>::type common_type;
+
+ if (static_cast<common_type>(abs(val)) > static_cast<common_type>(limb_mask))
+ BOOST_THROW_EXCEPTION(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."));
+ }
+ template <class T, int C>
+ void check_in_range(T, const mpl::int_<C>&) BOOST_NOEXCEPT {}
+
+ template <class T>
+ void check_in_range(T val) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<T>(), checked_type())))
+ {
+ check_in_range(val, checked_type());
+ }
+
+public:
+ //
+ // Direct construction:
+ //
+ template <class SI>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
+ : m_data(i < 0 ? static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask) : static_cast<local_limb_type>(i & limb_mask)), m_sign(i < 0) {}
+ template <class SI>
+ BOOST_MP_FORCEINLINE cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
+ : m_data(i < 0 ? (static_cast<local_limb_type>(static_cast<typename make_unsigned<SI>::type>(boost::multiprecision::detail::unsigned_abs(i)) & limb_mask)) : static_cast<local_limb_type>(i & limb_mask)), m_sign(i < 0)
+ { check_in_range(i); }
+ template <class UI>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked)>::type const* = 0) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(i) & limb_mask), m_sign(false) {}
+ template <class UI>
+ BOOST_MP_FORCEINLINE cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked)>::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))
+ : m_data(static_cast<local_limb_type>(i) & limb_mask), m_sign(false) { check_in_range(i); }
+ template <class F>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(F i, typename boost::enable_if_c<is_floating_point<F>::value && (Checked == unchecked)>::type const* = 0) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask), m_sign(i < 0) {}
+ template <class F>
+ BOOST_MP_FORCEINLINE cpp_int_base(F i, typename boost::enable_if_c<is_floating_point<F>::value && (Checked == checked)>::type const* = 0)
+ : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask), m_sign(i < 0) { check_in_range(i); }
+#if defined(BOOST_MP_USER_DEFINED_LITERALS)
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<>) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(0u)), m_sign(false) {}
+ template <limb_type a>
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<a>)BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(a)), m_sign(false) {}
+ template <limb_type a, limb_type b>
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<a, b>)BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(a) | (static_cast<local_limb_type>(b) << bits_per_limb)), m_sign(false) {}
+ BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& a, const literals::detail::negate_tag&)BOOST_NOEXCEPT
+ : m_data(a.m_data), m_sign(a.m_data ? !a.m_sign : false) {}
+#endif
+ //
+ // Helper functions for getting at our internal data, and manipulating storage:
+ //
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR unsigned size()const BOOST_NOEXCEPT { return 1; }
+ BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return &m_data; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const_limb_pointer limbs()const BOOST_NOEXCEPT { return &m_data; }
+ BOOST_MP_FORCEINLINE bool sign()const BOOST_NOEXCEPT { return m_sign; }
+ BOOST_MP_FORCEINLINE void sign(bool b) BOOST_NOEXCEPT
+ {
+ m_sign = b;
+ // Check for zero value:
+ if(m_sign && !m_data)
+ {
+ m_sign = false;
+ }
+ }
+ BOOST_MP_FORCEINLINE void resize(unsigned new_size, unsigned min_size)
+ {
+ detail::verify_new_size(2, min_size, checked_type());
+ }
+ BOOST_MP_FORCEINLINE void normalize() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ if(!m_data)
+ m_sign = false; // zero is always unsigned
+ detail::verify_limb_mask(true, m_data, limb_mask, checked_type());
+ m_data &= limb_mask;
+ }
+
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base() BOOST_NOEXCEPT : m_data(0), m_sign(false) {}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& o) BOOST_NOEXCEPT
+ : m_data(o.m_data), m_sign(o.m_sign) {}
+ //~cpp_int_base() BOOST_NOEXCEPT {}
+ BOOST_MP_FORCEINLINE void assign(const cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ m_data = o.m_data;
+ m_sign = o.m_sign;
+ }
+ BOOST_MP_FORCEINLINE void negate() BOOST_NOEXCEPT
+ {
+ m_sign = !m_sign;
+ // Check for zero value:
+ if(m_data == 0)
+ {
+ m_sign = false;
+ }
+ }
+ BOOST_MP_FORCEINLINE bool isneg()const BOOST_NOEXCEPT
+ {
+ return m_sign;
+ }
+ BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ std::swap(m_sign, o.m_sign);
+ std::swap(m_data, o.m_data);
+ }
+};
+//
+// Backend for unsigned fixed precision (i.e. no allocator) type which will fit entirely inside a "double_limb_type":
+//
+template <unsigned MinBits, cpp_int_check_type Checked>
+struct cpp_int_base<MinBits, MinBits, unsigned_magnitude, Checked, void, true>
+{
+ typedef typename trivial_limb_type<MinBits>::type local_limb_type;
+ typedef local_limb_type* limb_pointer;
+ typedef const local_limb_type* const_limb_pointer;
+private:
+ BOOST_STATIC_CONSTANT(unsigned, limb_bits = sizeof(local_limb_type) * CHAR_BIT);
+ BOOST_STATIC_CONSTANT(local_limb_type, limb_mask = limb_bits != MinBits ?
+ static_cast<local_limb_type>(static_cast<local_limb_type>(~local_limb_type(0)) >> (limb_bits - MinBits))
+ : static_cast<local_limb_type>(~local_limb_type(0)));
+
+ local_limb_type m_data;
+
+ typedef mpl::int_<Checked> checked_type;
+
+ //
+ // Interface invariants:
+ //
+ BOOST_STATIC_ASSERT_MSG(MinBits <= sizeof(double_limb_type) * CHAR_BIT, "Template parameter MinBits is inconsistent with the parameter trivial - did you mistakingly try to override the trivial parameter?");
+protected:
+ template <class T>
+ typename boost::disable_if_c<std::numeric_limits<T>::is_specialized && (std::numeric_limits<T>::digits <= (int)MinBits)>::type
+ check_in_range(T val, const mpl::int_<checked>&, const boost::false_type&)
+ {
+ typedef typename common_type<T, local_limb_type>::type common_type;
+
+ if(static_cast<common_type>(val) > limb_mask)
+ BOOST_THROW_EXCEPTION(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."));
+ }
+ template <class T>
+ void check_in_range(T val, const mpl::int_<checked>&, const boost::true_type&)
+ {
+ typedef typename common_type<T, local_limb_type>::type common_type;
+
+ if(static_cast<common_type>(val) > limb_mask)
+ BOOST_THROW_EXCEPTION(std::range_error("The argument to a cpp_int constructor exceeded the largest value it can represent."));
+ if(val < 0)
+ BOOST_THROW_EXCEPTION(std::range_error("The argument to an unsigned cpp_int constructor was negative."));
+ }
+ template <class T, int C, bool B>
+ BOOST_MP_FORCEINLINE void check_in_range(T, const mpl::int_<C>&, const boost::integral_constant<bool, B>&) BOOST_NOEXCEPT {}
+
+ template <class T>
+ BOOST_MP_FORCEINLINE void check_in_range(T val) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<T>(), checked_type(), is_signed<T>())))
+ {
+ check_in_range(val, checked_type(), is_signed<T>());
+ }
+
+public:
+ //
+ // Direct construction:
+ //
+#ifdef __MSVC_RUNTIME_CHECKS
+ template <class SI>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
+ : m_data(i < 0 ? (1 + ~static_cast<local_limb_type>(-i & limb_mask)) & limb_mask : static_cast<local_limb_type>(i & limb_mask)) {}
+ template <class SI>
+ BOOST_MP_FORCEINLINE cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
+ : m_data(i < 0 ? 1 + ~static_cast<local_limb_type>(-i & limb_mask) : static_cast<local_limb_type>(i & limb_mask)) { check_in_range(i); }
+ template <class UI>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(i & limb_mask)) {}
+ template <class UI>
+ BOOST_MP_FORCEINLINE cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))
+ : m_data(static_cast<local_limb_type>(i & limb_mask)) { check_in_range(i); }
+#else
+ template <class SI>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
+ : m_data(i < 0 ? (1 + ~static_cast<local_limb_type>(-i)) & limb_mask : static_cast<local_limb_type>(i) & limb_mask) {}
+ template <class SI>
+ BOOST_MP_FORCEINLINE cpp_int_base(SI i, typename boost::enable_if_c<is_signed<SI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<SI>())))
+ : m_data(i < 0 ? 1 + ~static_cast<local_limb_type>(-i) : static_cast<local_limb_type>(i)) { check_in_range(i); }
+ template <class UI>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == unchecked) >::type const* = 0) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(i) & limb_mask) {}
+ template <class UI>
+ BOOST_MP_FORCEINLINE cpp_int_base(UI i, typename boost::enable_if_c<is_unsigned<UI>::value && (Checked == checked) >::type const* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_base>().check_in_range(std::declval<UI>())))
+ : m_data(static_cast<local_limb_type>(i)) { check_in_range(i); }
+#endif
+ template <class F>
+ BOOST_MP_FORCEINLINE cpp_int_base(F i, typename boost::enable_if<is_floating_point<F> >::type const* = 0) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ : m_data(static_cast<local_limb_type>(std::fabs(i)) & limb_mask)
+ {
+ check_in_range(i);
+ if(i < 0)
+ negate();
+ }
+#if defined(BOOST_MP_USER_DEFINED_LITERALS)
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<>) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(0u)) {}
+ template <limb_type a>
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<a>) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(a)) {}
+ template <limb_type a, limb_type b>
+ BOOST_CONSTEXPR cpp_int_base(literals::detail::value_pack<a, b>) BOOST_NOEXCEPT
+ : m_data(static_cast<local_limb_type>(a) | (static_cast<local_limb_type>(b) << bits_per_limb)) {}
+#endif
+ //
+ // Helper functions for getting at our internal data, and manipulating storage:
+ //
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR unsigned size()const BOOST_NOEXCEPT { return 1; }
+ BOOST_MP_FORCEINLINE limb_pointer limbs() BOOST_NOEXCEPT { return &m_data; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const_limb_pointer limbs()const BOOST_NOEXCEPT { return &m_data; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool sign()const BOOST_NOEXCEPT { return false; }
+ BOOST_MP_FORCEINLINE void sign(bool b) BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ if(b)
+ negate();
+ }
+ BOOST_MP_FORCEINLINE void resize(unsigned, unsigned min_size)
+ {
+ detail::verify_new_size(2, min_size, checked_type());
+ }
+ BOOST_MP_FORCEINLINE void normalize() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ detail::verify_limb_mask(true, m_data, limb_mask, checked_type());
+ m_data &= limb_mask;
+ }
+
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base() BOOST_NOEXCEPT : m_data(0) {}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_base(const cpp_int_base& o) BOOST_NOEXCEPT
+ : m_data(o.m_data) {}
+ //~cpp_int_base() BOOST_NOEXCEPT {}
+ BOOST_MP_FORCEINLINE void assign(const cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ m_data = o.m_data;
+ }
+ BOOST_MP_FORCEINLINE void negate() BOOST_MP_NOEXCEPT_IF((Checked == unchecked))
+ {
+ if(Checked == checked)
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("Attempt to negate an unsigned type."));
+ }
+ m_data = ~m_data;
+ ++m_data;
+ }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool isneg()const BOOST_NOEXCEPT
+ {
+ return false;
+ }
+ BOOST_MP_FORCEINLINE void do_swap(cpp_int_base& o) BOOST_NOEXCEPT
+ {
+ std::swap(m_data, o.m_data);
+ }
+};
+//
+// Traits class, lets us know whether type T can be directly converted to the base type,
+// used to enable/disable constructors etc:
+//
+template <class Arg, class Base>
+struct is_allowed_cpp_int_base_conversion : public mpl::if_c<
+ is_same<Arg, limb_type>::value || is_same<Arg, signed_limb_type>::value
+#if BOOST_ENDIAN_LITTLE_BYTE && !defined(BOOST_MP_TEST_NO_LE)
+ || is_same<Arg, double_limb_type>::value || is_same<Arg, signed_double_limb_type>::value
+#endif
+#if defined(BOOST_MP_USER_DEFINED_LITERALS)
+ || literals::detail::is_value_pack<Arg>::value
+#endif
+ || (is_trivial_cpp_int<Base>::value && is_arithmetic<Arg>::value),
+ mpl::true_,
+ mpl::false_
+ >::type
+{};
+//
+// Now the actual backend, normalising parameters passed to the base class:
+//
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct cpp_int_backend
+ : public cpp_int_base<
+ min_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
+ max_precision<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
+ SignType,
+ Checked,
+ Allocator,
+ is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value>
+{
+ typedef cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> self_type;
+ typedef cpp_int_base<
+ min_precision<self_type>::value,
+ max_precision<self_type>::value,
+ SignType,
+ Checked,
+ Allocator,
+ is_trivial_cpp_int<self_type>::value> base_type;
+ typedef mpl::bool_<is_trivial_cpp_int<self_type>::value> trivial_tag;
+public:
+ typedef typename mpl::if_<
+ trivial_tag,
+ mpl::list<
+ signed char, short, int, long,
+ boost::long_long_type, signed_double_limb_type>,
+ mpl::list<signed_limb_type, signed_double_limb_type>
+ >::type signed_types;
+ typedef typename mpl::if_<
+ trivial_tag,
+ mpl::list<unsigned char, unsigned short, unsigned,
+ unsigned long, boost::ulong_long_type, double_limb_type>,
+ mpl::list<limb_type, double_limb_type>
+ >::type unsigned_types;
+ typedef typename mpl::if_<
+ trivial_tag,
+ mpl::list<float, double, long double>,
+ mpl::list<long double>
+ >::type float_types;
+ typedef mpl::int_<Checked> checked_type;
+
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend() BOOST_NOEXCEPT{}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend(const cpp_int_backend& o) BOOST_MP_NOEXCEPT_IF(boost::is_void<Allocator>::value) : base_type(o) {}
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend(cpp_int_backend&& o) BOOST_NOEXCEPT
+ : base_type(static_cast<base_type&&>(o)) {}
+#endif
+ //
+ // Direct construction from arithmetic type:
+ //
+ template <class Arg>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR cpp_int_backend(Arg i, typename boost::enable_if_c<is_allowed_cpp_int_base_conversion<Arg, base_type>::value >::type const* = 0)BOOST_MP_NOEXCEPT_IF(noexcept(base_type(std::declval<Arg>())))
+ : base_type(i) {}
+
+private:
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::true_ const&, mpl::true_ const &)
+ {
+ // Assigning trivial type to trivial type:
+ this->check_in_range(*other.limbs());
+ *this->limbs() = static_cast<typename self_type::local_limb_type>(*other.limbs());
+ this->sign(other.sign());
+ this->normalize();
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::true_ const&, mpl::false_ const &)
+ {
+ // non-trivial to trivial narrowing conversion:
+ double_limb_type v = *other.limbs();
+ if(other.size() > 1)
+ {
+ v |= static_cast<double_limb_type>(other.limbs()[1]) << bits_per_limb;
+ if((Checked == checked) && (other.size() > 2))
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("Assignment of a cpp_int that is out of range for the target type."));
+ }
+ }
+ *this = v;
+ this->sign(other.sign());
+ this->normalize();
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::false_ const&, mpl::true_ const &)
+ {
+ // trivial to non-trivial, treat the trivial argument as if it were an unsigned arithmetic type, then set the sign afterwards:
+ *this = static_cast<
+ typename boost::multiprecision::detail::canonical<
+ typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::local_limb_type,
+ cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>
+ >::type
+ >(*other.limbs());
+ this->sign(other.sign());
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ void do_assign(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other, mpl::false_ const&, mpl::false_ const &)
+ {
+ // regular non-trivial to non-trivial assign:
+ this->resize(other.size(), other.size());
+ std::memcpy(this->limbs(), other.limbs(), (std::min)(other.size(), this->size()) * sizeof(this->limbs()[0]));
+ this->sign(other.sign());
+ this->normalize();
+ }
+public:
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ cpp_int_backend(
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other,
+ typename boost::enable_if_c<is_implicit_cpp_int_conversion<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>, self_type>::value>::type* = 0)
+ : base_type()
+ {
+ do_assign(
+ other,
+ mpl::bool_<is_trivial_cpp_int<self_type>::value>(),
+ mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>());
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ explicit cpp_int_backend(
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other,
+ typename boost::disable_if_c<is_implicit_cpp_int_conversion<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>, self_type>::value>::type* = 0)
+ : base_type()
+ {
+ do_assign(
+ other,
+ mpl::bool_<is_trivial_cpp_int<self_type>::value>(),
+ mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>());
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ cpp_int_backend& operator=(
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& other)
+ {
+ do_assign(
+ other,
+ mpl::bool_<is_trivial_cpp_int<self_type>::value>(),
+ mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value>());
+ return *this;
+ }
+#ifdef BOOST_MP_USER_DEFINED_LITERALS
+ BOOST_CONSTEXPR cpp_int_backend(const cpp_int_backend& a, const literals::detail::negate_tag& tag)
+ : base_type(static_cast<const base_type&>(a), tag){}
+#endif
+
+ BOOST_MP_FORCEINLINE cpp_int_backend& operator = (const cpp_int_backend& o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().assign(std::declval<const cpp_int_backend&>())))
+ {
+ this->assign(o);
+ return *this;
+ }
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_MP_FORCEINLINE cpp_int_backend& operator = (cpp_int_backend&& o) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<base_type&>() = std::declval<base_type>()))
+ {
+ *static_cast<base_type*>(this) = static_cast<base_type&&>(o);
+ return *this;
+ }
+#endif
+private:
+ template <class A>
+ typename boost::enable_if<is_unsigned<A> >::type do_assign_arithmetic(A val, const mpl::true_&)
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().check_in_range(std::declval<A>())))
+ {
+ this->check_in_range(val);
+ *this->limbs() = static_cast<typename self_type::local_limb_type>(val);
+ this->sign(false);
+ this->normalize();
+ }
+ template <class A>
+ typename boost::disable_if_c<is_unsigned<A>::value || !is_integral<A>::value >::type do_assign_arithmetic(A val, const mpl::true_&)
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().check_in_range(std::declval<A>())) && noexcept(std::declval<cpp_int_backend>().sign(true)))
+ {
+ this->check_in_range(val);
+ *this->limbs() = (val < 0) ? static_cast<typename self_type::local_limb_type>(boost::multiprecision::detail::unsigned_abs(val)) : static_cast<typename self_type::local_limb_type>(val);
+ this->sign(val < 0);
+ this->normalize();
+ }
+ template <class A>
+ typename boost::enable_if_c< !is_integral<A>::value>::type do_assign_arithmetic(A val, const mpl::true_&)
+ {
+ this->check_in_range(val);
+ *this->limbs() = (val < 0) ? static_cast<typename self_type::local_limb_type>(boost::multiprecision::detail::abs(val)) : static_cast<typename self_type::local_limb_type>(val);
+ this->sign(val < 0);
+ this->normalize();
+ }
+ BOOST_MP_FORCEINLINE void do_assign_arithmetic(limb_type i, const mpl::false_&) BOOST_NOEXCEPT
+ {
+ this->resize(1, 1);
+ *this->limbs() = i;
+ this->sign(false);
+ }
+ BOOST_MP_FORCEINLINE void do_assign_arithmetic(signed_limb_type i, const mpl::false_&) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().sign(true)))
+ {
+ this->resize(1, 1);
+ *this->limbs() = static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(i));
+ this->sign(i < 0);
+ }
+ void do_assign_arithmetic(double_limb_type i, const mpl::false_&) BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT(sizeof(i) == 2 * sizeof(limb_type));
+ BOOST_STATIC_ASSERT(base_type::internal_limb_count >= 2);
+ typename base_type::limb_pointer p = this->limbs();
+#ifdef __MSVC_RUNTIME_CHECKS
+ *p = static_cast<limb_type>(i & ~static_cast<limb_type>(0));
+#else
+ *p = static_cast<limb_type>(i);
+#endif
+ p[1] = static_cast<limb_type>(i >> base_type::limb_bits);
+ this->resize(p[1] ? 2 : 1, p[1] ? 2 : 1);
+ this->sign(false);
+ }
+ void do_assign_arithmetic(signed_double_limb_type i, const mpl::false_&) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().sign(true)))
+ {
+ BOOST_STATIC_ASSERT(sizeof(i) == 2 * sizeof(limb_type));
+ BOOST_STATIC_ASSERT(base_type::internal_limb_count >= 2);
+ bool s = false;
+ double_limb_type ui;
+ if(i < 0)
+ s = true;
+ ui = static_cast<double_limb_type>(boost::multiprecision::detail::unsigned_abs(i));
+ typename base_type::limb_pointer p = this->limbs();
+#ifdef __MSVC_RUNTIME_CHECKS
+ *p = static_cast<limb_type>(ui & ~static_cast<limb_type>(0));
+#else
+ *p = static_cast<limb_type>(ui);
+#endif
+ p[1] = static_cast<limb_type>(ui >> base_type::limb_bits);
+ this->resize(p[1] ? 2 : 1, p[1] ? 2 : 1);
+ this->sign(s);
+ }
+
+ void do_assign_arithmetic(long double a, const mpl::false_&)
+ {
+ using default_ops::eval_add;
+ using default_ops::eval_subtract;
+ using std::frexp;
+ using std::ldexp;
+ using std::floor;
+
+ if(a < 0)
+ {
+ do_assign_arithmetic(-a, mpl::false_());
+ this->sign(true);
+ return;
+ }
+
+ if (a == 0) {
+ *this = static_cast<limb_type>(0u);
+ }
+
+ if (a == 1) {
+ *this = static_cast<limb_type>(1u);
+ }
+
+ if ((boost::math::isinf)(a) || (boost::math::isnan)(a))
+ {
+ BOOST_THROW_EXCEPTION(std::runtime_error("Cannot convert a non-finite number to an integer."));
+ }
+
+ int e;
+ long double f, term;
+ *this = static_cast<limb_type>(0u);
+
+ f = frexp(a, &e);
+
+ static const limb_type shift = std::numeric_limits<limb_type>::digits;
+
+ while(f)
+ {
+ // extract int sized bits from f:
+ f = ldexp(f, shift);
+ term = floor(f);
+ e -= shift;
+ eval_left_shift(*this, shift);
+ if(term > 0)
+ eval_add(*this, static_cast<limb_type>(term));
+ else
+ eval_subtract(*this, static_cast<limb_type>(-term));
+ f -= term;
+ }
+ if(e > 0)
+ eval_left_shift(*this, e);
+ else if(e < 0)
+ eval_right_shift(*this, -e);
+ }
+public:
+ template <class Arithmetic>
+ BOOST_MP_FORCEINLINE typename boost::enable_if_c<!boost::multiprecision::detail::is_byte_container<Arithmetic>::value, cpp_int_backend&>::type operator = (Arithmetic val) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<cpp_int_backend>().do_assign_arithmetic(std::declval<Arithmetic>(), trivial_tag())))
+ {
+ do_assign_arithmetic(val, trivial_tag());
+ return *this;
+ }
+private:
+ void do_assign_string(const char* s, const mpl::true_&)
+ {
+ std::size_t n = s ? std::strlen(s) : 0;
+ *this = 0;
+ unsigned radix = 10;
+ bool isneg = false;
+ if(n && (*s == '-'))
+ {
+ --n;
+ ++s;
+ isneg = true;
+ }
+ if(n && (*s == '0'))
+ {
+ if((n > 1) && ((s[1] == 'x') || (s[1] == 'X')))
+ {
+ radix = 16;
+ s +=2;
+ n -= 2;
+ }
+ else
+ {
+ radix = 8;
+ n -= 1;
+ }
+ }
+ if(n)
+ {
+ unsigned val;
+ while(*s)
+ {
+ if(*s >= '0' && *s <= '9')
+ val = *s - '0';
+ else if(*s >= 'a' && *s <= 'f')
+ val = 10 + *s - 'a';
+ else if(*s >= 'A' && *s <= 'F')
+ val = 10 + *s - 'A';
+ else
+ val = radix + 1;
+ if(val >= radix)
+ {
+ BOOST_THROW_EXCEPTION(std::runtime_error("Unexpected content found while parsing character string."));
+ }
+ *this->limbs() = detail::checked_multiply(*this->limbs(), static_cast<typename base_type::local_limb_type>(radix), checked_type());
+ *this->limbs() = detail::checked_add(*this->limbs(), static_cast<typename base_type::local_limb_type>(val), checked_type());
+ ++s;
+ }
+ }
+ if(isneg)
+ this->negate();
+ }
+ void do_assign_string(const char* s, const mpl::false_&)
+ {
+ using default_ops::eval_multiply;
+ using default_ops::eval_add;
+ std::size_t n = s ? std::strlen(s) : 0;
+ *this = static_cast<limb_type>(0u);
+ unsigned radix = 10;
+ bool isneg = false;
+ if(n && (*s == '-'))
+ {
+ --n;
+ ++s;
+ isneg = true;
+ }
+ if(n && (*s == '0'))
+ {
+ if((n > 1) && ((s[1] == 'x') || (s[1] == 'X')))
+ {
+ radix = 16;
+ s +=2;
+ n -= 2;
+ }
+ else
+ {
+ radix = 8;
+ n -= 1;
+ }
+ }
+ //
+ // Exception guarantee: create the result in stack variable "result"
+ // then do a swap at the end. In the event of a throw, *this will
+ // be left unchanged.
+ //
+ cpp_int_backend result;
+ if(n)
+ {
+ if(radix == 16)
+ {
+ while(*s == '0') ++s;
+ std::size_t bitcount = 4 * std::strlen(s);
+ limb_type val;
+ std::size_t limb, shift;
+ if(bitcount > 4)
+ bitcount -= 4;
+ else
+ bitcount = 0;
+ std::size_t newsize = bitcount / (sizeof(limb_type) * CHAR_BIT) + 1;
+ result.resize(static_cast<unsigned>(newsize), static_cast<unsigned>(newsize)); // will throw if this is a checked integer that cannot be resized
+ std::memset(result.limbs(), 0, result.size() * sizeof(limb_type));
+ while(*s)
+ {
+ if(*s >= '0' && *s <= '9')
+ val = *s - '0';
+ else if(*s >= 'a' && *s <= 'f')
+ val = 10 + *s - 'a';
+ else if(*s >= 'A' && *s <= 'F')
+ val = 10 + *s - 'A';
+ else
+ {
+ BOOST_THROW_EXCEPTION(std::runtime_error("Unexpected content found while parsing character string."));
+ }
+ limb = bitcount / (sizeof(limb_type) * CHAR_BIT);
+ shift = bitcount % (sizeof(limb_type) * CHAR_BIT);
+ val <<= shift;
+ if(result.size() > limb)
+ {
+ result.limbs()[limb] |= val;
+ }
+ ++s;
+ bitcount -= 4;
+ }
+ result.normalize();
+ }
+ else if(radix == 8)
+ {
+ while(*s == '0') ++s;
+ std::size_t bitcount = 3 * std::strlen(s);
+ limb_type val;
+ std::size_t limb, shift;
+ if(bitcount > 3)
+ bitcount -= 3;
+ else
+ bitcount = 0;
+ std::size_t newsize = bitcount / (sizeof(limb_type) * CHAR_BIT) + 1;
+ result.resize(static_cast<unsigned>(newsize), static_cast<unsigned>(newsize)); // will throw if this is a checked integer that cannot be resized
+ std::memset(result.limbs(), 0, result.size() * sizeof(limb_type));
+ while(*s)
+ {
+ if(*s >= '0' && *s <= '7')
+ val = *s - '0';
+ else
+ {
+ BOOST_THROW_EXCEPTION(std::runtime_error("Unexpected content found while parsing character string."));
+ }
+ limb = bitcount / (sizeof(limb_type) * CHAR_BIT);
+ shift = bitcount % (sizeof(limb_type) * CHAR_BIT);
+ if(result.size() > limb)
+ {
+ result.limbs()[limb] |= (val << shift);
+ if(shift > sizeof(limb_type) * CHAR_BIT - 3)
+ {
+ // Deal with the bits in val that overflow into the next limb:
+ val >>= (sizeof(limb_type) * CHAR_BIT - shift);
+ if(val)
+ {
+ // If this is the most-significant-limb, we may need to allocate an extra one for the overflow:
+ if(limb + 1 == newsize)
+ result.resize(static_cast<unsigned>(newsize + 1), static_cast<unsigned>(newsize + 1));
+ if(result.size() > limb + 1)
+ {
+ result.limbs()[limb + 1] |= val;
+ }
+ }
+ }
+ }
+ ++s;
+ bitcount -= 3;
+ }
+ result.normalize();
+ }
+ else
+ {
+ // Base 10, we extract blocks of size 10^9 at a time, that way
+ // the number of multiplications is kept to a minimum:
+ limb_type block_mult = max_block_10;
+ while(*s)
+ {
+ limb_type block = 0;
+ for(unsigned i = 0; i < digits_per_block_10; ++i)
+ {
+ limb_type val;
+ if(*s >= '0' && *s <= '9')
+ val = *s - '0';
+ else
+ BOOST_THROW_EXCEPTION(std::runtime_error("Unexpected character encountered in input."));
+ block *= 10;
+ block += val;
+ if(!*++s)
+ {
+ block_mult = block_multiplier(i);
+ break;
+ }
+ }
+ eval_multiply(result, block_mult);
+ eval_add(result, block);
+ }
+ }
+ }
+ if(isneg)
+ result.negate();
+ result.swap(*this);
+ }
+public:
+ cpp_int_backend& operator = (const char* s)
+ {
+ do_assign_string(s, trivial_tag());
+ return *this;
+ }
+ BOOST_MP_FORCEINLINE void swap(cpp_int_backend& o) BOOST_NOEXCEPT
+ {
+ this->do_swap(o);
+ }
+private:
+ std::string do_get_trivial_string(std::ios_base::fmtflags f, const mpl::false_&)const
+ {
+ typedef typename mpl::if_c<sizeof(typename base_type::local_limb_type) == 1, unsigned, typename base_type::local_limb_type>::type io_type;
+ if(this->sign() && (((f & std::ios_base::hex) == std::ios_base::hex) || ((f & std::ios_base::oct) == std::ios_base::oct)))
+ BOOST_THROW_EXCEPTION(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."));
+ std::stringstream ss;
+ ss.flags(f & ~std::ios_base::showpos);
+ ss << static_cast<io_type>(*this->limbs());
+ std::string result;
+ if(this->sign())
+ result += '-';
+ else if(f & std::ios_base::showpos)
+ result += '+';
+ result += ss.str();
+ return result;
+ }
+ std::string do_get_trivial_string(std::ios_base::fmtflags f, const mpl::true_&)const
+ {
+ // Even though we have only one limb, we can't do IO on it :-(
+ int base = 10;
+ if((f & std::ios_base::oct) == std::ios_base::oct)
+ base = 8;
+ else if((f & std::ios_base::hex) == std::ios_base::hex)
+ base = 16;
+ std::string result;
+
+ unsigned Bits = sizeof(typename base_type::local_limb_type) * CHAR_BIT;
+
+ if(base == 8 || base == 16)
+ {
+ if(this->sign())
+ BOOST_THROW_EXCEPTION(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."));
+ limb_type shift = base == 8 ? 3 : 4;
+ limb_type mask = static_cast<limb_type>((1u << shift) - 1);
+ typename base_type::local_limb_type v = *this->limbs();
+ result.assign(Bits / shift + (Bits % shift ? 1 : 0), '0');
+ std::string::difference_type pos = result.size() - 1;
+ for(unsigned i = 0; i < Bits / shift; ++i)
+ {
+ char c = '0' + static_cast<char>(v & mask);
+ if(c > '9')
+ c += 'A' - '9' - 1;
+ result[pos--] = c;
+ v >>= shift;
+ }
+ if(Bits % shift)
+ {
+ mask = static_cast<limb_type>((1u << (Bits % shift)) - 1);
+ char c = '0' + static_cast<char>(v & mask);
+ if(c > '9')
+ c += 'A' - '9';
+ result[pos] = c;
+ }
+ //
+ // Get rid of leading zeros:
+ //
+ std::string::size_type n = result.find_first_not_of('0');
+ if(!result.empty() && (n == std::string::npos))
+ n = result.size() - 1;
+ result.erase(0, n);
+ if(f & std::ios_base::showbase)
+ {
+ const char* pp = base == 8 ? "0" : "0x";
+ result.insert(static_cast<std::string::size_type>(0), pp);
+ }
+ }
+ else
+ {
+ result.assign(Bits / 3 + 1, '0');
+ std::string::difference_type pos = result.size() - 1;
+ typename base_type::local_limb_type v(*this->limbs());
+ bool neg = false;
+ if(this->sign())
+ {
+ neg = true;
+ }
+ while(v)
+ {
+ result[pos] = (v % 10) + '0';
+ --pos;
+ v /= 10;
+ }
+ std::string::size_type n = result.find_first_not_of('0');
+ result.erase(0, n);
+ if(result.empty())
+ result = "0";
+ if(neg)
+ result.insert(static_cast<std::string::size_type>(0), 1, '-');
+ else if(f & std::ios_base::showpos)
+ result.insert(static_cast<std::string::size_type>(0), 1, '+');
+ }
+ return result;
+ }
+ std::string do_get_string(std::ios_base::fmtflags f, const mpl::true_&)const
+ {
+#ifdef BOOST_MP_NO_DOUBLE_LIMB_TYPE_IO
+ return do_get_trivial_string(f, mpl::bool_<is_same<typename base_type::local_limb_type, double_limb_type>::value>());
+#else
+ return do_get_trivial_string(f, mpl::bool_<false>());
+#endif
+ }
+ std::string do_get_string(std::ios_base::fmtflags f, const mpl::false_&)const
+ {
+ using default_ops::eval_get_sign;
+ int base = 10;
+ if((f & std::ios_base::oct) == std::ios_base::oct)
+ base = 8;
+ else if((f & std::ios_base::hex) == std::ios_base::hex)
+ base = 16;
+ std::string result;
+
+ unsigned Bits = this->size() * base_type::limb_bits;
+
+ if(base == 8 || base == 16)
+ {
+ if(this->sign())
+ BOOST_THROW_EXCEPTION(std::runtime_error("Base 8 or 16 printing of negative numbers is not supported."));
+ limb_type shift = base == 8 ? 3 : 4;
+ limb_type mask = static_cast<limb_type>((1u << shift) - 1);
+ cpp_int_backend t(*this);
+ result.assign(Bits / shift + ((Bits % shift) ? 1 : 0), '0');
+ std::string::difference_type pos = result.size() - 1;
+ for(unsigned i = 0; i < Bits / shift; ++i)
+ {
+ char c = '0' + static_cast<char>(t.limbs()[0] & mask);
+ if(c > '9')
+ c += 'A' - '9' - 1;
+ result[pos--] = c;
+ eval_right_shift(t, shift);
+ }
+ if(Bits % shift)
+ {
+ mask = static_cast<limb_type>((1u << (Bits % shift)) - 1);
+ char c = '0' + static_cast<char>(t.limbs()[0] & mask);
+ if(c > '9')
+ c += 'A' - '9';
+ result[pos] = c;
+ }
+ //
+ // Get rid of leading zeros:
+ //
+ std::string::size_type n = result.find_first_not_of('0');
+ if(!result.empty() && (n == std::string::npos))
+ n = result.size() - 1;
+ result.erase(0, n);
+ if(f & std::ios_base::showbase)
+ {
+ const char* pp = base == 8 ? "0" : "0x";
+ result.insert(static_cast<std::string::size_type>(0), pp);
+ }
+ }
+ else
+ {
+ result.assign(Bits / 3 + 1, '0');
+ std::string::difference_type pos = result.size() - 1;
+ cpp_int_backend t(*this);
+ cpp_int_backend r;
+ bool neg = false;
+ if(t.sign())
+ {
+ t.negate();
+ neg = true;
+ }
+ if(this->size() == 1)
+ {
+ result = boost::lexical_cast<std::string>(t.limbs()[0]);
+ }
+ else
+ {
+ cpp_int_backend block10;
+ block10 = max_block_10;
+ while(eval_get_sign(t) != 0)
+ {
+ cpp_int_backend t2;
+ divide_unsigned_helper(&t2, t, block10, r);
+ t = t2;
+ limb_type v = r.limbs()[0];
+ for(unsigned i = 0; i < digits_per_block_10; ++i)
+ {
+ char c = '0' + v % 10;
+ v /= 10;
+ result[pos] = c;
+ if(pos-- == 0)
+ break;
+ }
+ }
+ }
+ std::string::size_type n = result.find_first_not_of('0');
+ result.erase(0, n);
+ if(result.empty())
+ result = "0";
+ if(neg)
+ result.insert(static_cast<std::string::size_type>(0), 1, '-');
+ else if(f & std::ios_base::showpos)
+ result.insert(static_cast<std::string::size_type>(0), 1, '+');
+ }
+ return result;
+ }
+public:
+ std::string str(std::streamsize /*digits*/, std::ios_base::fmtflags f)const
+ {
+ return do_get_string(f, trivial_tag());
+ }
+private:
+ template <class Container>
+ void construct_from_container(const Container& c, const mpl::false_&)
+ {
+ //
+ // We assume that c is a sequence of (unsigned) bytes with the most significant byte first:
+ //
+ unsigned newsize = static_cast<unsigned>(c.size() / sizeof(limb_type));
+ if(c.size() % sizeof(limb_type))
+ {
+ ++newsize;
+ }
+ if(newsize)
+ {
+ this->resize(newsize, newsize); // May throw
+ std::memset(this->limbs(), 0, this->size());
+ typename Container::const_iterator i(c.begin()), j(c.end());
+ unsigned byte_location = static_cast<unsigned>(c.size() - 1);
+ while(i != j)
+ {
+ unsigned limb = byte_location / sizeof(limb_type);
+ unsigned shift = (byte_location % sizeof(limb_type)) * CHAR_BIT;
+ if(this->size() > limb)
+ this->limbs()[limb] |= static_cast<limb_type>(static_cast<unsigned char>(*i)) << shift;
+ ++i;
+ --byte_location;
+ }
+ }
+ }
+ template <class Container>
+ void construct_from_container(const Container& c, const mpl::true_&)
+ {
+ //
+ // We assume that c is a sequence of (unsigned) bytes with the most significant byte first:
+ //
+ typedef typename base_type::local_limb_type local_limb_type;
+ *this->limbs() = 0;
+ if(c.size())
+ {
+ typename Container::const_iterator i(c.begin()), j(c.end());
+ unsigned byte_location = static_cast<unsigned>(c.size() - 1);
+ while(i != j)
+ {
+ unsigned limb = byte_location / sizeof(local_limb_type);
+ unsigned shift = (byte_location % sizeof(local_limb_type)) * CHAR_BIT;
+ if(limb == 0)
+ this->limbs()[0] |= static_cast<limb_type>(static_cast<unsigned char>(*i)) << shift;
+ ++i;
+ --byte_location;
+ }
+ }
+ }
+public:
+ template <class Container>
+ cpp_int_backend(const Container& c, typename boost::enable_if_c<boost::multiprecision::detail::is_byte_container<Container>::value>::type const* = 0)
+ {
+ //
+ // We assume that c is a sequence of (unsigned) bytes with the most significant byte first:
+ //
+ construct_from_container(c, trivial_tag());
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::false_&, const mpl::false_&)const BOOST_NOEXCEPT
+ {
+ if(this->sign() != o.sign())
+ return this->sign() ? -1 : 1;
+
+ // Only do the compare if the same sign:
+ int result = compare_unsigned(o);
+
+ if(this->sign())
+ result = -result;
+ return result;
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::true_&, const mpl::false_&)const
+ {
+ cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> t(*this);
+ return t.compare(o);
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::false_&, const mpl::true_&)const
+ {
+ cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> t(o);
+ return compare(t);
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ int compare_imp(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::true_&, const mpl::true_&)const BOOST_NOEXCEPT
+ {
+ if(this->sign())
+ {
+ if(o.sign())
+ {
+ return *this->limbs() < *o.limbs() ? 1 : (*this->limbs() > *o.limbs() ? -1 : 0);
+ }
+ else
+ return -1;
+ }
+ else
+ {
+ if(o.sign())
+ return 1;
+ return *this->limbs() < *o.limbs() ? -1 : (*this->limbs() > *o.limbs() ? 1 : 0);
+ }
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ int compare(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o)const BOOST_NOEXCEPT
+ {
+ typedef mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value> t1;
+ typedef mpl::bool_<is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value> t2;
+ return compare_imp(o, t1(), t2());
+ }
+ template <unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+ int compare_unsigned(const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o)const BOOST_NOEXCEPT
+ {
+ if(this->size() != o.size())
+ {
+ return this->size() > o.size() ? 1 : -1;
+ }
+ typename base_type::const_limb_pointer pa = this->limbs();
+ typename base_type::const_limb_pointer pb = o.limbs();
+ for(int i = this->size() - 1; i >= 0; --i)
+ {
+ if(pa[i] != pb[i])
+ return pa[i] > pb[i] ? 1 : -1;
+ }
+ return 0;
+ }
+ template <class Arithmetic>
+ BOOST_MP_FORCEINLINE typename boost::enable_if<is_arithmetic<Arithmetic>, int>::type compare(Arithmetic i)const
+ {
+ // braindead version:
+ cpp_int_backend t;
+ t = i;
+ return compare(t);
+ }
+};
+
+} // namespace backends
+
+namespace default_ops{
+
+template <class Backend>
+struct double_precision_type;
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct double_precision_type<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >
+{
+ typedef typename mpl::if_c<
+ backends::is_fixed_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
+ backends::cpp_int_backend<
+ (is_void<Allocator>::value ?
+ 2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value
+ : MinBits),
+ 2 * backends::max_precision<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value,
+ SignType,
+ Checked,
+ Allocator>,
+ backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>
+ >::type type;
+};
+
+
+}
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked>
+struct expression_template_default<backends::cpp_int_backend<MinBits, MaxBits, SignType, Checked, void> >
+{
+ static const expression_template_option value = et_off;
+};
+
+using boost::multiprecision::backends::cpp_int_backend;
+
+template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+struct number_category<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> > : public mpl::int_<number_kind_integer>{};
+
+typedef number<cpp_int_backend<> > cpp_int;
+typedef rational_adaptor<cpp_int_backend<> > cpp_rational_backend;
+typedef number<cpp_rational_backend> cpp_rational;
+
+// Fixed precision unsigned types:
+typedef number<cpp_int_backend<128, 128, unsigned_magnitude, unchecked, void> > uint128_t;
+typedef number<cpp_int_backend<256, 256, unsigned_magnitude, unchecked, void> > uint256_t;
+typedef number<cpp_int_backend<512, 512, unsigned_magnitude, unchecked, void> > uint512_t;
+typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, unchecked, void> > uint1024_t;
+
+// Fixed precision signed types:
+typedef number<cpp_int_backend<128, 128, signed_magnitude, unchecked, void> > int128_t;
+typedef number<cpp_int_backend<256, 256, signed_magnitude, unchecked, void> > int256_t;
+typedef number<cpp_int_backend<512, 512, signed_magnitude, unchecked, void> > int512_t;
+typedef number<cpp_int_backend<1024, 1024, signed_magnitude, unchecked, void> > int1024_t;
+
+// Over again, but with checking enabled this time:
+typedef number<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_int;
+typedef rational_adaptor<cpp_int_backend<0, 0, signed_magnitude, checked> > checked_cpp_rational_backend;
+typedef number<checked_cpp_rational_backend> checked_cpp_rational;
+// Fixed precision unsigned types:
+typedef number<cpp_int_backend<128, 128, unsigned_magnitude, checked, void> > checked_uint128_t;
+typedef number<cpp_int_backend<256, 256, unsigned_magnitude, checked, void> > checked_uint256_t;
+typedef number<cpp_int_backend<512, 512, unsigned_magnitude, checked, void> > checked_uint512_t;
+typedef number<cpp_int_backend<1024, 1024, unsigned_magnitude, checked, void> > checked_uint1024_t;
+
+// Fixed precision signed types:
+typedef number<cpp_int_backend<128, 128, signed_magnitude, checked, void> > checked_int128_t;
+typedef number<cpp_int_backend<256, 256, signed_magnitude, checked, void> > checked_int256_t;
+typedef number<cpp_int_backend<512, 512, signed_magnitude, checked, void> > checked_int512_t;
+typedef number<cpp_int_backend<1024, 1024, signed_magnitude, checked, void> > checked_int1024_t;
+
+#ifdef BOOST_NO_SFINAE_EXPR
+
+namespace detail{
+
+template<unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+struct is_explicitly_convertible<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > : public mpl::true_ {};
+
+}
+#endif
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+}} // namespaces
+
+//
+// Last of all we include the implementations of all the eval_* non member functions:
+//
+#include <boost/multiprecision/cpp_int/comparison.hpp>
+#include <boost/multiprecision/cpp_int/add.hpp>
+#include <boost/multiprecision/cpp_int/multiply.hpp>
+#include <boost/multiprecision/cpp_int/divide.hpp>
+#include <boost/multiprecision/cpp_int/bitwise.hpp>
+#include <boost/multiprecision/cpp_int/misc.hpp>
+#include <boost/multiprecision/cpp_int/limits.hpp>
+#ifdef BOOST_MP_USER_DEFINED_LITERALS
+#include <boost/multiprecision/cpp_int/literals.hpp>
+#endif
+#include <boost/multiprecision/cpp_int/serialize.hpp>
+#include <boost/multiprecision/cpp_int/import_export.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/add.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/add.hpp
index 3b769cd8b62..3b769cd8b62 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/add.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/add.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/bitwise.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/bitwise.hpp
new file mode 100644
index 00000000000..bb0eb59e66e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/bitwise.hpp
@@ -0,0 +1,842 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2012 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+//
+// Comparison operators for cpp_int_backend:
+//
+#ifndef BOOST_MP_CPP_INT_BIT_HPP
+#define BOOST_MP_CPP_INT_BIT_HPP
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4319)
+#endif
+
+namespace boost{ namespace multiprecision{ namespace backends{
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+void is_valid_bitwise_op(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o, const mpl::int_<checked>&)
+{
+ if(result.sign() || o.sign())
+ BOOST_THROW_EXCEPTION(std::range_error("Bitwise operations on negative values results in undefined behavior."));
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+void is_valid_bitwise_op(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>&,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& , const mpl::int_<unchecked>&){}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
+void is_valid_bitwise_op(
+ const cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>& result, const mpl::int_<checked>&)
+{
+ if(result.sign())
+ BOOST_THROW_EXCEPTION(std::range_error("Bitwise operations on negative values results in undefined behavior."));
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
+void is_valid_bitwise_op(
+ const cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>&, const mpl::int_<checked>&){}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+void is_valid_bitwise_op(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>&, const mpl::int_<unchecked>&){}
+
+template <class CppInt1, class CppInt2, class Op>
+void bitwise_op(
+ CppInt1& result,
+ const CppInt2& o,
+ Op op, const mpl::true_&) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<CppInt1>::value))
+{
+ //
+ // There are 4 cases:
+ // * Both positive.
+ // * result negative, o positive.
+ // * o negative, result positive.
+ // * Both negative.
+ //
+ // When one arg is negative we convert to 2's complement form "on the fly",
+ // and then convert back to signed-magnitude form at the end.
+ //
+ // Note however, that if the type is checked, then bitwise ops on negative values
+ // are not permitted and an exception will result.
+ //
+ is_valid_bitwise_op(result, o, typename CppInt1::checked_type());
+ //
+ // First figure out how big the result needs to be and set up some data:
+ //
+ unsigned rs = result.size();
+ unsigned os = o.size();
+ unsigned m, x;
+ minmax(rs, os, m, x);
+ result.resize(x, x);
+ typename CppInt1::limb_pointer pr = result.limbs();
+ typename CppInt2::const_limb_pointer po = o.limbs();
+ for(unsigned i = rs; i < x; ++i)
+ pr[i] = 0;
+
+ limb_type next_limb = 0;
+
+ if(!result.sign())
+ {
+ if(!o.sign())
+ {
+ for(unsigned i = 0; i < os; ++i)
+ pr[i] = op(pr[i], po[i]);
+ for(unsigned i = os; i < x; ++i)
+ pr[i] = op(pr[i], limb_type(0));
+ }
+ else
+ {
+ // "o" is negative:
+ double_limb_type carry = 1;
+ for(unsigned i = 0; i < os; ++i)
+ {
+ carry += static_cast<double_limb_type>(~po[i]);
+ pr[i] = op(pr[i], static_cast<limb_type>(carry));
+ carry >>= CppInt1::limb_bits;
+ }
+ for(unsigned i = os; i < x; ++i)
+ {
+ carry += static_cast<double_limb_type>(~limb_type(0));
+ pr[i] = op(pr[i], static_cast<limb_type>(carry));
+ carry >>= CppInt1::limb_bits;
+ }
+ // Set the overflow into the "extra" limb:
+ carry += static_cast<double_limb_type>(~limb_type(0));
+ next_limb = op(limb_type(0), static_cast<limb_type>(carry));
+ }
+ }
+ else
+ {
+ if(!o.sign())
+ {
+ // "result" is negative:
+ double_limb_type carry = 1;
+ for(unsigned i = 0; i < os; ++i)
+ {
+ carry += static_cast<double_limb_type>(~pr[i]);
+ pr[i] = op(static_cast<limb_type>(carry), po[i]);
+ carry >>= CppInt1::limb_bits;
+ }
+ for(unsigned i = os; i < x; ++i)
+ {
+ carry += static_cast<double_limb_type>(~pr[i]);
+ pr[i] = op(static_cast<limb_type>(carry), limb_type(0));
+ carry >>= CppInt1::limb_bits;
+ }
+ // Set the overflow into the "extra" limb:
+ carry += static_cast<double_limb_type>(~limb_type(0));
+ next_limb = op(static_cast<limb_type>(carry), limb_type(0));
+ }
+ else
+ {
+ // both are negative:
+ double_limb_type r_carry = 1;
+ double_limb_type o_carry = 1;
+ for(unsigned i = 0; i < os; ++i)
+ {
+ r_carry += static_cast<double_limb_type>(~pr[i]);
+ o_carry += static_cast<double_limb_type>(~po[i]);
+ pr[i] = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry));
+ r_carry >>= CppInt1::limb_bits;
+ o_carry >>= CppInt1::limb_bits;
+ }
+ for(unsigned i = os; i < x; ++i)
+ {
+ r_carry += static_cast<double_limb_type>(~pr[i]);
+ o_carry += static_cast<double_limb_type>(~limb_type(0));
+ pr[i] = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry));
+ r_carry >>= CppInt1::limb_bits;
+ o_carry >>= CppInt1::limb_bits;
+ }
+ // Set the overflow into the "extra" limb:
+ r_carry += static_cast<double_limb_type>(~limb_type(0));
+ o_carry += static_cast<double_limb_type>(~limb_type(0));
+ next_limb = op(static_cast<limb_type>(r_carry), static_cast<limb_type>(o_carry));
+ }
+ }
+ //
+ // See if the result is negative or not:
+ //
+ if(static_cast<signed_limb_type>(next_limb) < 0)
+ {
+ double_limb_type carry = 1;
+ for(unsigned i = 0; i < x; ++i)
+ {
+ carry += static_cast<double_limb_type>(~pr[i]);
+ pr[i] = static_cast<limb_type>(carry);
+ carry >>= CppInt1::limb_bits;
+ }
+ if(carry)
+ {
+ result.resize(x + 1, x);
+ if(result.size() > x)
+ result.limbs()[x] = static_cast<limb_type>(carry);
+ }
+ result.sign(true);
+ }
+ else
+ result.sign(false);
+
+ result.normalize();
+}
+
+template <class CppInt1, class CppInt2, class Op>
+void bitwise_op(
+ CppInt1& result,
+ const CppInt2& o,
+ Op op, const mpl::false_&) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<CppInt1>::value))
+{
+ //
+ // Both arguments are unsigned types, very simple case handled as a special case.
+ //
+ // First figure out how big the result needs to be and set up some data:
+ //
+ unsigned rs = result.size();
+ unsigned os = o.size();
+ unsigned m, x;
+ minmax(rs, os, m, x);
+ result.resize(x, x);
+ typename CppInt1::limb_pointer pr = result.limbs();
+ typename CppInt2::const_limb_pointer po = o.limbs();
+ for(unsigned i = rs; i < x; ++i)
+ pr[i] = 0;
+
+ for(unsigned i = 0; i < os; ++i)
+ pr[i] = op(pr[i], po[i]);
+ for(unsigned i = os; i < x; ++i)
+ pr[i] = op(pr[i], limb_type(0));
+
+ result.normalize();
+}
+
+struct bit_and{ limb_type operator()(limb_type a, limb_type b)const BOOST_NOEXCEPT { return a & b; } };
+struct bit_or { limb_type operator()(limb_type a, limb_type b)const BOOST_NOEXCEPT { return a | b; } };
+struct bit_xor{ limb_type operator()(limb_type a, limb_type b)const BOOST_NOEXCEPT { return a ^ b; } };
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_bitwise_and(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ bitwise_op(result, o, bit_and(),
+ mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>());
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_bitwise_or(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ bitwise_op(result, o, bit_or(),
+ mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>());
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_bitwise_xor(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ bitwise_op(result, o, bit_xor(),
+ mpl::bool_<std::numeric_limits<number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::is_signed || std::numeric_limits<number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> > >::is_signed>());
+}
+//
+// Again for operands which are single limbs:
+//
+template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type
+ eval_bitwise_and(
+ cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result,
+ limb_type l) BOOST_NOEXCEPT
+{
+ result.limbs()[0] &= l;
+ result.resize(1, 1);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type
+ eval_bitwise_or(
+ cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result,
+ limb_type l) BOOST_NOEXCEPT
+{
+ result.limbs()[0] |= l;
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type
+ eval_bitwise_xor(
+ cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result,
+ limb_type l) BOOST_NOEXCEPT
+{
+ result.limbs()[0] ^= l;
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_complement(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ BOOST_STATIC_ASSERT_MSG(((Checked1 != checked) || (Checked2 != checked)), "Attempt to take the complement of a signed type results in undefined behavior.");
+ // Increment and negate:
+ result = o;
+ eval_increment(result);
+ result.negate();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value >::type
+ eval_complement(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ unsigned os = o.size();
+ result.resize(UINT_MAX, os);
+ for(unsigned i = 0; i < os; ++i)
+ result.limbs()[i] = ~o.limbs()[i];
+ for(unsigned i = os; i < result.size(); ++i)
+ result.limbs()[i] = ~static_cast<limb_type>(0);
+ result.normalize();
+}
+
+template <class Int>
+inline void left_shift_byte(Int& result, double_limb_type s)
+{
+ limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
+ limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
+ unsigned ors = result.size();
+ if((ors == 1) && (!*result.limbs()))
+ return; // shifting zero yields zero.
+ unsigned rs = ors;
+ if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift)))
+ ++rs; // Most significant limb will overflow when shifted
+ rs += offset;
+ result.resize(rs, rs);
+ rs = result.size();
+
+ typename Int::limb_pointer pr = result.limbs();
+
+ if(rs != ors)
+ pr[rs - 1] = 0u;
+ std::size_t bytes = static_cast<std::size_t>(s / CHAR_BIT);
+ std::size_t len = (std::min)(ors * sizeof(limb_type), rs * sizeof(limb_type) - bytes);
+ if(bytes >= rs * sizeof(limb_type))
+ result = static_cast<limb_type>(0u);
+ else
+ {
+ unsigned char* pc = reinterpret_cast<unsigned char*>(pr);
+ std::memmove(pc + bytes, pc, len);
+ std::memset(pc, 0, bytes);
+ }
+}
+
+template <class Int>
+inline void left_shift_limb(Int& result, double_limb_type s)
+{
+ limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
+ limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
+
+ unsigned ors = result.size();
+ if((ors == 1) && (!*result.limbs()))
+ return; // shifting zero yields zero.
+ unsigned rs = ors;
+ if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift)))
+ ++rs; // Most significant limb will overflow when shifted
+ rs += offset;
+ result.resize(rs, rs);
+
+ typename Int::limb_pointer pr = result.limbs();
+
+ if(offset > rs)
+ {
+ // The result is shifted past the end of the result:
+ result = static_cast<limb_type>(0);
+ return;
+ }
+
+ unsigned i = rs - result.size();
+ for(; i < ors; ++i)
+ pr[rs - 1 - i] = pr[ors - 1 - i];
+ for(; i < rs; ++i)
+ pr[rs - 1 - i] = 0;
+}
+
+template <class Int>
+inline void left_shift_generic(Int& result, double_limb_type s)
+{
+ limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
+ limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
+
+ unsigned ors = result.size();
+ if((ors == 1) && (!*result.limbs()))
+ return; // shifting zero yields zero.
+ unsigned rs = ors;
+ if(shift && (result.limbs()[ors - 1] >> (Int::limb_bits - shift)))
+ ++rs; // Most significant limb will overflow when shifted
+ rs += offset;
+ result.resize(rs, rs);
+ bool truncated = result.size() != rs;
+
+ typename Int::limb_pointer pr = result.limbs();
+
+ if(offset > rs)
+ {
+ // The result is shifted past the end of the result:
+ result = static_cast<limb_type>(0);
+ return;
+ }
+
+ unsigned i = rs - result.size();
+ // This code only works when shift is non-zero, otherwise we invoke undefined behaviour!
+ BOOST_ASSERT(shift);
+ if(!truncated)
+ {
+ if(rs > ors + offset)
+ {
+ pr[rs - 1 - i] = pr[ors - 1 - i] >> (Int::limb_bits - shift);
+ --rs;
+ }
+ else
+ {
+ pr[rs - 1 - i] = pr[ors - 1 - i] << shift;
+ if(ors > 1)
+ pr[rs - 1 - i] |= pr[ors - 2 - i] >> (Int::limb_bits - shift);
+ ++i;
+ }
+ }
+ for(; rs - i >= 2 + offset; ++i)
+ {
+ pr[rs - 1 - i] = pr[rs - 1 - i - offset] << shift;
+ pr[rs - 1 - i] |= pr[rs - 2 - i - offset] >> (Int::limb_bits - shift);
+ }
+ if(rs - i >= 1 + offset)
+ {
+ pr[rs - 1 - i] = pr[rs - 1 - i - offset] << shift;
+ ++i;
+ }
+ for(; i < rs; ++i)
+ pr[rs - 1 - i] = 0;
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
+ eval_left_shift(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ double_limb_type s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ if(!s)
+ return;
+
+#if BOOST_ENDIAN_LITTLE_BYTE && defined(BOOST_MP_USE_LIMB_SHIFT)
+ static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits - 1;
+ static const limb_type byte_shift_mask = CHAR_BIT - 1;
+ if((s & limb_shift_mask) == 0)
+ {
+ left_shift_limb(result, s);
+ }
+ else if((s & byte_shift_mask) == 0)
+ {
+ left_shift_byte(result, s);
+ }
+#elif BOOST_ENDIAN_LITTLE_BYTE
+ static const limb_type byte_shift_mask = CHAR_BIT - 1;
+ if((s & byte_shift_mask) == 0)
+ {
+ left_shift_byte(result, s);
+ }
+#else
+ static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits - 1;
+ if((s & limb_shift_mask) == 0)
+ {
+ left_shift_limb(result, s);
+ }
+#endif
+ else
+ {
+ left_shift_generic(result, s);
+ }
+ //
+ // We may have shifted off the end and have leading zeros:
+ //
+ result.normalize();
+}
+
+template <class Int>
+inline void right_shift_byte(Int& result, double_limb_type s)
+{
+ limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
+ limb_type shift;
+ BOOST_ASSERT((s % CHAR_BIT) == 0);
+ unsigned ors = result.size();
+ unsigned rs = ors;
+ if(offset >= rs)
+ {
+ result = limb_type(0);
+ return;
+ }
+ rs -= offset;
+ typename Int::limb_pointer pr = result.limbs();
+ unsigned char* pc = reinterpret_cast<unsigned char*>(pr);
+ shift = static_cast<limb_type>(s / CHAR_BIT);
+ std::memmove(pc, pc + shift, ors * sizeof(pr[0]) - shift);
+ shift = (sizeof(limb_type) - shift % sizeof(limb_type)) * CHAR_BIT;
+ if(shift < Int::limb_bits)
+ {
+ pr[ors - offset - 1] &= (static_cast<limb_type>(1u) << shift) - 1;
+ if(!pr[ors - offset - 1] && (rs > 1))
+ --rs;
+ }
+ result.resize(rs, rs);
+}
+
+template <class Int>
+inline void right_shift_limb(Int& result, double_limb_type s)
+{
+ limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
+ BOOST_ASSERT((s % Int::limb_bits) == 0);
+ unsigned ors = result.size();
+ unsigned rs = ors;
+ if(offset >= rs)
+ {
+ result = limb_type(0);
+ return;
+ }
+ rs -= offset;
+ typename Int::limb_pointer pr = result.limbs();
+ unsigned i = 0;
+ for(; i < rs; ++i)
+ pr[i] = pr[i + offset];
+ result.resize(rs, rs);
+}
+
+template <class Int>
+inline void right_shift_generic(Int& result, double_limb_type s)
+{
+ limb_type offset = static_cast<limb_type>(s / Int::limb_bits);
+ limb_type shift = static_cast<limb_type>(s % Int::limb_bits);
+ unsigned ors = result.size();
+ unsigned rs = ors;
+ if(offset >= rs)
+ {
+ result = limb_type(0);
+ return;
+ }
+ rs -= offset;
+ typename Int::limb_pointer pr = result.limbs();
+ if((pr[ors - 1] >> shift) == 0)
+ {
+ if(--rs == 0)
+ {
+ result = limb_type(0);
+ return;
+ }
+ }
+ unsigned i = 0;
+
+ // This code only works for non-zero shift, otherwise we invoke undefined behaviour!
+ BOOST_ASSERT(shift);
+ for(; i + offset + 1 < ors; ++i)
+ {
+ pr[i] = pr[i + offset] >> shift;
+ pr[i] |= pr[i + offset + 1] << (Int::limb_bits - shift);
+ }
+ pr[i] = pr[i + offset] >> shift;
+ result.resize(rs, rs);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
+inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value>::type
+ eval_right_shift(
+ cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>& result,
+ double_limb_type s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1> >::value))
+{
+ is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, unsigned_magnitude, Checked1, Allocator1>::checked_type());
+ if(!s)
+ return;
+
+#if BOOST_ENDIAN_LITTLE_BYTE && defined(BOOST_MP_USE_LIMB_SHIFT)
+ static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::limb_bits - 1;
+ static const limb_type byte_shift_mask = CHAR_BIT - 1;
+ if((s & limb_shift_mask) == 0)
+ right_shift_limb(result, s);
+ else if((s & byte_shift_mask) == 0)
+ right_shift_byte(result, s);
+#elif BOOST_ENDIAN_LITTLE_BYTE
+ static const limb_type byte_shift_mask = CHAR_BIT - 1;
+ if((s & byte_shift_mask) == 0)
+ right_shift_byte(result, s);
+#else
+ static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::limb_bits - 1;
+ if((s & limb_shift_mask) == 0)
+ right_shift_limb(result, s);
+#endif
+ else
+ right_shift_generic(result, s);
+}
+template <unsigned MinBits1, unsigned MaxBits1, cpp_int_check_type Checked1, class Allocator1>
+inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1> >::value>::type
+ eval_right_shift(
+ cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>& result,
+ double_limb_type s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1> >::value))
+{
+ is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::checked_type());
+ if(!s)
+ return;
+
+ bool is_neg = result.sign();
+ if(is_neg)
+ eval_increment(result);
+
+#if BOOST_ENDIAN_LITTLE_BYTE && defined(BOOST_MP_USE_LIMB_SHIFT)
+ static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::limb_bits - 1;
+ static const limb_type byte_shift_mask = CHAR_BIT - 1;
+ if((s & limb_shift_mask) == 0)
+ right_shift_limb(result, s);
+ else if((s & byte_shift_mask) == 0)
+ right_shift_byte(result, s);
+#elif BOOST_ENDIAN_LITTLE_BYTE
+ static const limb_type byte_shift_mask = CHAR_BIT - 1;
+ if((s & byte_shift_mask) == 0)
+ right_shift_byte(result, s);
+#else
+ static const limb_type limb_shift_mask = cpp_int_backend<MinBits1, MaxBits1, signed_magnitude, Checked1, Allocator1>::limb_bits - 1;
+ if((s & limb_shift_mask) == 0)
+ right_shift_limb(result, s);
+#endif
+ else
+ right_shift_generic(result, s);
+ if(is_neg)
+ eval_decrement(result);
+}
+
+//
+// Over again for trivial cpp_int's:
+//
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class T>
+BOOST_MP_FORCEINLINE typename enable_if<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::type
+ eval_left_shift(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, T s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ *result.limbs() = detail::checked_left_shift(*result.limbs(), s, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ result.normalize();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class T>
+BOOST_MP_FORCEINLINE typename enable_if<is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> > >::type
+ eval_right_shift(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, T s) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ // Nothing to check here... just make sure we don't invoke undefined behavior:
+ is_valid_bitwise_op(result, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ *result.limbs() = (static_cast<unsigned>(s) >= sizeof(*result.limbs()) * CHAR_BIT) ? 0 : (result.sign() ? ((--*result.limbs()) >> s) + 1 : *result.limbs() >> s);
+ if(result.sign() && (*result.limbs() == 0))
+ result = static_cast<signed_limb_type>(-1);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value)
+ >::type
+ eval_complement(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ BOOST_STATIC_ASSERT_MSG(((Checked1 != checked) || (Checked2 != checked)), "Attempt to take the complement of a signed type results in undefined behavior.");
+ //
+ // If we're not checked then emulate 2's complement behavior:
+ //
+ if(o.sign())
+ {
+ *result.limbs() = *o.limbs() - 1;
+ result.sign(false);
+ }
+ else
+ {
+ *result.limbs() = 1 + *o.limbs();
+ result.sign(true);
+ }
+ result.normalize();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ >::type
+ eval_complement(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ *result.limbs() = ~*o.limbs();
+ result.normalize();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ >::type
+ eval_bitwise_and(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ *result.limbs() &= *o.limbs();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value)
+ >::type
+ eval_bitwise_and(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+
+ using default_ops::eval_bit_test;
+ using default_ops::eval_increment;
+
+ if(result.sign() || o.sign())
+ {
+ static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value;
+ cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result);
+ cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o);
+ eval_bitwise_and(t1, t2);
+ bool s = eval_bit_test(t1, m + 1);
+ if(s)
+ {
+ eval_complement(t1, t1);
+ eval_increment(t1);
+ }
+ result = t1;
+ result.sign(s);
+ }
+ else
+ {
+ *result.limbs() &= *o.limbs();
+ }
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ >::type
+ eval_bitwise_or(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ *result.limbs() |= *o.limbs();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value)
+ >::type
+ eval_bitwise_or(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+
+ using default_ops::eval_bit_test;
+ using default_ops::eval_increment;
+
+ if(result.sign() || o.sign())
+ {
+ static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value;
+ cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result);
+ cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o);
+ eval_bitwise_or(t1, t2);
+ bool s = eval_bit_test(t1, m + 1);
+ if(s)
+ {
+ eval_complement(t1, t1);
+ eval_increment(t1);
+ }
+ result = t1;
+ result.sign(s);
+ }
+ else
+ {
+ *result.limbs() |= *o.limbs();
+ result.normalize();
+ }
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ >::type
+ eval_bitwise_xor(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ *result.limbs() ^= *o.limbs();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value || is_signed_number<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value)
+ >::type
+ eval_bitwise_xor(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ is_valid_bitwise_op(result, o, typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+
+ using default_ops::eval_bit_test;
+ using default_ops::eval_increment;
+
+ if(result.sign() || o.sign())
+ {
+ static const unsigned m = static_unsigned_max<static_unsigned_max<MinBits1, MinBits2>::value, static_unsigned_max<MaxBits1, MaxBits2>::value>::value;
+ cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t1(result);
+ cpp_int_backend<m + 1, m + 1, unsigned_magnitude, unchecked, void> t2(o);
+ eval_bitwise_xor(t1, t2);
+ bool s = eval_bit_test(t1, m + 1);
+ if(s)
+ {
+ eval_complement(t1, t1);
+ eval_increment(t1);
+ }
+ result = t1;
+ result.sign(s);
+ }
+ else
+ {
+ *result.limbs() ^= *o.limbs();
+ }
+}
+
+}}} // namespaces
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/checked.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/checked.hpp
index cafe50ea496..cafe50ea496 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/checked.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/checked.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/comparison.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/comparison.hpp
index 48a66fc2b27..48a66fc2b27 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/comparison.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/comparison.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/cpp_int_config.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/cpp_int_config.hpp
index eb88f3da804..eb88f3da804 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/cpp_int_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/cpp_int_config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/divide.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/divide.hpp
index 81583ec384a..81583ec384a 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/divide.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/divide.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/import_export.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/import_export.hpp
new file mode 100644
index 00000000000..7bb916d4ce3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/import_export.hpp
@@ -0,0 +1,251 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2015 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+
+#ifndef BOOST_MP_CPP_INT_IMPORT_EXPORT_HPP
+#define BOOST_MP_CPP_INT_IMPORT_EXPORT_HPP
+
+
+namespace boost {
+ namespace multiprecision {
+
+ namespace detail {
+
+ template <class Backend, class Unsigned>
+ void assign_bits(Backend& val, Unsigned bits, unsigned bit_location, unsigned chunk_bits, const mpl::false_& tag)
+ {
+ unsigned limb = bit_location / (sizeof(limb_type) * CHAR_BIT);
+ unsigned shift = bit_location % (sizeof(limb_type) * CHAR_BIT);
+
+ limb_type mask = chunk_bits >= sizeof(limb_type) * CHAR_BIT ? ~static_cast<limb_type>(0u) : (static_cast<limb_type>(1u) << chunk_bits) - 1;
+
+ limb_type value = static_cast<limb_type>(bits & mask) << shift;
+ if(value)
+ {
+ if(val.size() == limb)
+ {
+ val.resize(limb + 1, limb + 1);
+ if(val.size() > limb)
+ val.limbs()[limb] = value;
+ }
+ else if(val.size() > limb)
+ val.limbs()[limb] |= value;
+ }
+ if(chunk_bits > sizeof(limb_type) * CHAR_BIT - shift)
+ {
+ shift = sizeof(limb_type) * CHAR_BIT - shift;
+ chunk_bits -= shift;
+ bit_location += shift;
+ bits >>= shift;
+ if(bits)
+ assign_bits(val, bits, bit_location, chunk_bits, tag);
+ }
+ }
+ template <class Backend, class Unsigned>
+ void assign_bits(Backend& val, Unsigned bits, unsigned bit_location, unsigned chunk_bits, const mpl::true_&)
+ {
+ typedef typename Backend::local_limb_type local_limb_type;
+ //
+ // Check for possible overflow, this may trigger an exception, or have no effect
+ // depending on whether this is a checked integer or not:
+ //
+ if((bit_location >= sizeof(local_limb_type) * CHAR_BIT) && bits)
+ val.resize(2, 2);
+ else
+ {
+ local_limb_type mask = chunk_bits >= sizeof(local_limb_type) * CHAR_BIT ? ~static_cast<local_limb_type>(0u) : (static_cast<local_limb_type>(1u) << chunk_bits) - 1;
+ local_limb_type value = (static_cast<local_limb_type>(bits) & mask) << bit_location;
+ *val.limbs() |= value;
+ //
+ // Check for overflow bits:
+ //
+ bit_location = sizeof(local_limb_type) * CHAR_BIT - bit_location;
+ if((bit_location < sizeof(bits)*CHAR_BIT) && (bits >>= bit_location))
+ val.resize(2, 2); // May throw!
+ }
+ }
+
+ template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+ inline void resize_to_bit_size(cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& newval, unsigned bits, const mpl::false_&)
+ {
+ unsigned limb_count = static_cast<unsigned>(bits / (sizeof(limb_type) * CHAR_BIT));
+ if(bits % (sizeof(limb_type) * CHAR_BIT))
+ ++limb_count;
+ static const unsigned max_limbs = MaxBits ? MaxBits / (CHAR_BIT * sizeof(limb_type)) + ((MaxBits % (CHAR_BIT * sizeof(limb_type))) ? 1 : 0) : (std::numeric_limits<unsigned>::max)();
+ if(limb_count > max_limbs)
+ limb_count = max_limbs;
+ newval.resize(limb_count, limb_count);
+ std::memset(newval.limbs(), 0, newval.size() * sizeof(limb_type));
+ }
+ template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator>
+ inline void resize_to_bit_size(cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& newval, unsigned, const mpl::true_&)
+ {
+ *newval.limbs() = 0;
+ }
+
+ template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class Iterator>
+ number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&
+ import_bits_generic(
+ number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, Iterator i, Iterator j, unsigned chunk_size = 0, bool msv_first = true)
+ {
+ typename number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>::backend_type newval;
+
+ typedef typename std::iterator_traits<Iterator>::value_type value_type;
+ typedef typename boost::make_unsigned<value_type>::type unsigned_value_type;
+ typedef typename std::iterator_traits<Iterator>::difference_type difference_type;
+ typedef typename boost::make_unsigned<difference_type>::type size_type;
+ typedef typename cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>::trivial_tag tag_type;
+
+ if(!chunk_size)
+ chunk_size = std::numeric_limits<value_type>::digits;
+
+ size_type limbs = std::distance(i, j);
+ size_type bits = limbs * chunk_size;
+
+ detail::resize_to_bit_size(newval, static_cast<unsigned>(bits), tag_type());
+
+ difference_type bit_location = msv_first ? bits - chunk_size : 0;
+ difference_type bit_location_change = msv_first ? -static_cast<difference_type>(chunk_size) : chunk_size;
+
+ while(i != j)
+ {
+ detail::assign_bits(newval, static_cast<unsigned_value_type>(*i), static_cast<unsigned>(bit_location), chunk_size, tag_type());
+ ++i;
+ bit_location += bit_location_change;
+ }
+
+ newval.normalize();
+
+ val.backend().swap(newval);
+ return val;
+ }
+
+ template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T>
+ inline typename boost::disable_if_c<boost::multiprecision::backends::is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&>::type
+ import_bits_fast(
+ number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0)
+ {
+ std::size_t byte_len = (j - i) * (chunk_size ? chunk_size / CHAR_BIT : sizeof(*i));
+ std::size_t limb_len = byte_len / sizeof(limb_type);
+ if(byte_len % sizeof(limb_type))
+ ++limb_len;
+ cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& result = val.backend();
+ result.resize(static_cast<unsigned>(limb_len), static_cast<unsigned>(limb_len)); // checked types may throw here if they're not large enough to hold the data!
+ result.limbs()[result.size() - 1] = 0u;
+ std::memcpy(result.limbs(), i, (std::min)(byte_len, result.size() * sizeof(limb_type)));
+ result.normalize(); // In case data has leading zeros.
+ return val;
+ }
+ template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T>
+ inline typename boost::enable_if_c<boost::multiprecision::backends::is_trivial_cpp_int<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator> >::value, number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&>::type
+ import_bits_fast(
+ number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0)
+ {
+ cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>& result = val.backend();
+ std::size_t byte_len = (j - i) * (chunk_size ? chunk_size / CHAR_BIT : sizeof(*i));
+ std::size_t limb_len = byte_len / sizeof(result.limbs()[0]);
+ if(byte_len % sizeof(result.limbs()[0]))
+ ++limb_len;
+ result.limbs()[0] = 0u;
+ result.resize(static_cast<unsigned>(limb_len), static_cast<unsigned>(limb_len)); // checked types may throw here if they're not large enough to hold the data!
+ std::memcpy(result.limbs(), i, (std::min)(byte_len, result.size() * sizeof(result.limbs()[0])));
+ result.normalize(); // In case data has leading zeros.
+ return val;
+ }
+ }
+
+
+ template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class Iterator>
+ inline number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&
+ import_bits(
+ number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, Iterator i, Iterator j, unsigned chunk_size = 0, bool msv_first = true)
+ {
+ return detail::import_bits_generic(val, i, j, chunk_size, msv_first);
+ }
+
+ template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class T>
+ inline number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>&
+ import_bits(
+ number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, T* i, T* j, unsigned chunk_size = 0, bool msv_first = true)
+ {
+#if BOOST_ENDIAN_LITTLE_BYTE
+ if(((chunk_size % CHAR_BIT) == 0) && !msv_first)
+ return detail::import_bits_fast(val, i, j, chunk_size);
+#endif
+ return detail::import_bits_generic(val, i, j, chunk_size, msv_first);
+ }
+
+ namespace detail {
+
+ template <class Backend>
+ boost::uintmax_t extract_bits(const Backend& val, unsigned location, unsigned count, const mpl::false_& tag)
+ {
+ unsigned limb = location / (sizeof(limb_type) * CHAR_BIT);
+ unsigned shift = location % (sizeof(limb_type) * CHAR_BIT);
+ boost::uintmax_t result = 0;
+ boost::uintmax_t mask = count == std::numeric_limits<boost::uintmax_t>::digits ? ~static_cast<boost::uintmax_t>(0) : (static_cast<boost::uintmax_t>(1u) << count) - 1;
+ if(count > (sizeof(limb_type) * CHAR_BIT - shift))
+ {
+ result = extract_bits(val, location + sizeof(limb_type) * CHAR_BIT - shift, count - sizeof(limb_type) * CHAR_BIT + shift, tag);
+ result <<= sizeof(limb_type) * CHAR_BIT - shift;
+ }
+ if(limb < val.size())
+ result |= (val.limbs()[limb] >> shift) & mask;
+ return result;
+ }
+
+ template <class Backend>
+ inline boost::uintmax_t extract_bits(const Backend& val, unsigned location, unsigned count, const mpl::true_&)
+ {
+ typename Backend::local_limb_type result = *val.limbs();
+ typename Backend::local_limb_type mask = count >= std::numeric_limits<typename Backend::local_limb_type>::digits ? ~static_cast<typename Backend::local_limb_type>(0) : (static_cast<typename Backend::local_limb_type>(1u) << count) - 1;
+ return (result >> location) & mask;
+ }
+
+ }
+
+ template <unsigned MinBits, unsigned MaxBits, cpp_integer_type SignType, cpp_int_check_type Checked, class Allocator, expression_template_option ExpressionTemplates, class OutputIterator>
+ OutputIterator export_bits(
+ const number<cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>, ExpressionTemplates>& val, OutputIterator out, unsigned chunk_size, bool msv_first = true)
+ {
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4244)
+#endif
+ typedef typename cpp_int_backend<MinBits, MaxBits, SignType, Checked, Allocator>::trivial_tag tag_type;
+ if(!val)
+ {
+ *out = 0;
+ ++out;
+ return out;
+ }
+ unsigned bitcount = boost::multiprecision::backends::eval_msb_imp(val.backend()) + 1;
+ unsigned chunks = bitcount / chunk_size;
+ if(bitcount % chunk_size)
+ ++chunks;
+
+ int bit_location = msv_first ? bitcount - chunk_size : 0;
+ int bit_step = msv_first ? -static_cast<int>(chunk_size) : chunk_size;
+ while(bit_location % bit_step) ++bit_location;
+
+ do
+ {
+ *out = detail::extract_bits(val.backend(), bit_location, chunk_size, tag_type());
+ ++out;
+ bit_location += bit_step;
+ } while((bit_location >= 0) && (bit_location < (int)bitcount));
+
+ return out;
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+ }
+
+ }
+}
+
+
+
+#endif // BOOST_MP_CPP_INT_IMPORT_EXPORT_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/limits.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/limits.hpp
index b19e1ebbe64..b19e1ebbe64 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/limits.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/limits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/literals.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/literals.hpp
index ce30fd84847..ce30fd84847 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/literals.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/literals.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/misc.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/misc.hpp
index 0985c73f42f..0985c73f42f 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/misc.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/misc.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/multiply.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/multiply.hpp
new file mode 100644
index 00000000000..ac01812b5c6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/multiply.hpp
@@ -0,0 +1,498 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2012 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+//
+// Comparison operators for cpp_int_backend:
+//
+#ifndef BOOST_MP_CPP_INT_MUL_HPP
+#define BOOST_MP_CPP_INT_MUL_HPP
+
+namespace boost{ namespace multiprecision{ namespace backends{
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable:4127) // conditional expression is constant
+#endif
+
+ template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
+ const limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ if(!val)
+ {
+ result = static_cast<limb_type>(0);
+ return;
+ }
+ if((void*)&a != (void*)&result)
+ result.resize(a.size(), a.size());
+ double_limb_type carry = 0;
+ typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer p = result.limbs();
+ typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer pe = result.limbs() + result.size();
+ typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::const_limb_pointer pa = a.limbs();
+ while(p != pe)
+ {
+ carry += static_cast<double_limb_type>(*pa) * static_cast<double_limb_type>(val);
+#ifdef __MSVC_RUNTIME_CHECKS
+ *p = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
+ *p = static_cast<limb_type>(carry);
+#endif
+ carry >>= cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits;
+ ++p, ++pa;
+ }
+ if(carry)
+ {
+ unsigned i = result.size();
+ result.resize(i + 1, i + 1);
+ if(result.size() > i)
+ result.limbs()[i] = static_cast<limb_type>(carry);
+ }
+ result.sign(a.sign());
+ if(!cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::variable)
+ result.normalize();
+}
+
+//
+// resize_for_carry forces a resize of the underlying buffer only if a previous request
+// for "required" elements could possibly have failed, *and* we have checking enabled.
+// This will cause an overflow error inside resize():
+//
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+inline void resize_for_carry(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& /*result*/, unsigned /*required*/){}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, class Allocator1>
+inline void resize_for_carry(cpp_int_backend<MinBits1, MaxBits1, SignType1, checked, Allocator1>& result, unsigned required)
+{
+ if(result.size() < required)
+ result.resize(required, required);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2, unsigned MinBits3, unsigned MaxBits3, cpp_integer_type SignType3, cpp_int_check_type Checked3, class Allocator3>
+inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3> >::value >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
+ const cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>& b) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ // Very simple long multiplication, only usable for small numbers of limb_type's
+ // but that's the typical use case for this type anyway:
+ //
+ // Special cases first:
+ //
+ unsigned as = a.size();
+ unsigned bs = b.size();
+ typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::const_limb_pointer pa = a.limbs();
+ typename cpp_int_backend<MinBits3, MaxBits3, SignType3, Checked3, Allocator3>::const_limb_pointer pb = b.limbs();
+ if(as == 1)
+ {
+ bool s = b.sign() != a.sign();
+ if(bs == 1)
+ {
+ result = static_cast<double_limb_type>(*pa) * static_cast<double_limb_type>(*pb);
+ }
+ else
+ {
+ limb_type l = *pa;
+ eval_multiply(result, b, l);
+ }
+ result.sign(s);
+ return;
+ }
+ if(bs == 1)
+ {
+ bool s = b.sign() != a.sign();
+ limb_type l = *pb;
+ eval_multiply(result, a, l);
+ result.sign(s);
+ return;
+ }
+
+ if((void*)&result == (void*)&a)
+ {
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(a);
+ eval_multiply(result, t, b);
+ return;
+ }
+ if((void*)&result == (void*)&b)
+ {
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(b);
+ eval_multiply(result, a, t);
+ return;
+ }
+
+ result.resize(as + bs, as + bs - 1);
+ typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_pointer pr = result.limbs();
+
+ static const double_limb_type limb_max = ~static_cast<limb_type>(0u);
+ static const double_limb_type double_limb_max = ~static_cast<double_limb_type>(0u);
+ BOOST_STATIC_ASSERT(double_limb_max - 2 * limb_max >= limb_max * limb_max);
+
+ double_limb_type carry = 0;
+ std::memset(pr, 0, result.size() * sizeof(limb_type));
+ for(unsigned i = 0; i < as; ++i)
+ {
+ unsigned inner_limit = cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::variable ? bs : (std::min)(result.size() - i, bs);
+ unsigned j;
+ for(j = 0; j < inner_limit; ++j)
+ {
+ BOOST_ASSERT(i+j < result.size());
+#if (!defined(__GLIBCXX__) && !defined(__GLIBCPP__)) || !BOOST_WORKAROUND(BOOST_GCC_VERSION, <= 50100)
+ BOOST_ASSERT(!std::numeric_limits<double_limb_type>::is_specialized
+ || ((std::numeric_limits<double_limb_type>::max)() - carry
+ >
+ static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value) * static_cast<double_limb_type>(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value)));
+#endif
+ carry += static_cast<double_limb_type>(pa[i]) * static_cast<double_limb_type>(pb[j]);
+ BOOST_ASSERT(!std::numeric_limits<double_limb_type>::is_specialized || ((std::numeric_limits<double_limb_type>::max)() - carry >= pr[i+j]));
+ carry += pr[i + j];
+#ifdef __MSVC_RUNTIME_CHECKS
+ pr[i + j] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
+ pr[i + j] = static_cast<limb_type>(carry);
+#endif
+ carry >>= cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::limb_bits;
+ BOOST_ASSERT(carry <= (cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::max_limb_value));
+ }
+ if(carry)
+ {
+ resize_for_carry(result, i + j + 1); // May throw if checking is enabled
+ if(i + j < result.size())
+#ifdef __MSVC_RUNTIME_CHECKS
+ pr[i + j] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+#else
+ pr[i + j] = static_cast<limb_type>(carry);
+#endif
+ }
+ carry = 0;
+ }
+ result.normalize();
+ //
+ // Set the sign of the result:
+ //
+ result.sign(a.sign() != b.sign());
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ eval_multiply(result, result, a);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
+ eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ eval_multiply(result, result, val);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
+ const double_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ if(val <= (std::numeric_limits<limb_type>::max)())
+ {
+ eval_multiply(result, a, static_cast<limb_type>(val));
+ }
+ else
+ {
+#if BOOST_ENDIAN_LITTLE_BYTE && !defined(BOOST_MP_TEST_NO_LE)
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(val);
+#else
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t;
+ t = val;
+#endif
+ eval_multiply(result, a, t);
+ }
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
+ eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const double_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ eval_multiply(result, result, val);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
+ const signed_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ if(val > 0)
+ eval_multiply(result, a, static_cast<limb_type>(val));
+ else
+ {
+ eval_multiply(result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(val)));
+ result.negate();
+ }
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
+ eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const signed_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ eval_multiply(result, result, val);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+inline typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value && !is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>& a,
+ const signed_double_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ if(val > 0)
+ {
+ if(val <= (std::numeric_limits<limb_type>::max)())
+ {
+ eval_multiply(result, a, static_cast<limb_type>(val));
+ return;
+ }
+ }
+ else if(val >= -static_cast<signed_double_limb_type>((std::numeric_limits<limb_type>::max)()))
+ {
+ eval_multiply(result, a, static_cast<limb_type>(boost::multiprecision::detail::unsigned_abs(val)));
+ result.negate();
+ return;
+ }
+#if BOOST_ENDIAN_LITTLE_BYTE && !defined(BOOST_MP_TEST_NO_LE)
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t(val);
+#else
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> t;
+ t = val;
+#endif
+ eval_multiply(result, a, t);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<!is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value>::type
+ eval_multiply(cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result, const signed_double_limb_type& val) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ eval_multiply(result, result, val);
+}
+
+//
+// Now over again for trivial cpp_int's:
+//
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value)
+ >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ *result.limbs() = detail::checked_multiply(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ result.sign(result.sign() != o.sign());
+ result.normalize();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& o) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ *result.limbs() = detail::checked_multiply(*result.limbs(), *o.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ result.normalize();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && (is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ || is_signed_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value)
+ >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a,
+ const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ *result.limbs() = detail::checked_multiply(*a.limbs(), *b.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ result.sign(a.sign() != b.sign());
+ result.normalize();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<
+ is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_unsigned_number<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& a,
+ const cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& b) BOOST_MP_NOEXCEPT_IF((is_non_throwing_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value))
+{
+ *result.limbs() = detail::checked_multiply(*a.limbs(), *b.limbs(), typename cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>::checked_type());
+ result.normalize();
+}
+
+//
+// Special routines for multiplying two integers to obtain a multiprecision result:
+//
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<
+ !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ signed_double_limb_type a, signed_double_limb_type b)
+{
+ static const signed_double_limb_type mask = ~static_cast<limb_type>(0);
+ static const unsigned limb_bits = sizeof(limb_type) * CHAR_BIT;
+ bool s = false;
+ double_limb_type w, x, y, z;
+ if(a < 0)
+ {
+ a = -a;
+ s = true;
+ }
+ if(b < 0)
+ {
+ b = -b;
+ s = !s;
+ }
+ w = a & mask;
+ x = a >> limb_bits;
+ y = b & mask;
+ z = b >> limb_bits;
+
+ result.resize(4, 4);
+ limb_type* pr = result.limbs();
+
+ double_limb_type carry = w * y;
+#ifdef __MSVC_RUNTIME_CHECKS
+ pr[0] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ carry += w * z + x * y;
+ pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ carry += x * z;
+ pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ pr[3] = static_cast<limb_type>(carry >> limb_bits);
+#else
+ pr[0] = static_cast<limb_type>(carry);
+ carry >>= limb_bits;
+ carry += w * z + x * y;
+ pr[1] = static_cast<limb_type>(carry);
+ carry >>= limb_bits;
+ carry += x * z;
+ pr[2] = static_cast<limb_type>(carry);
+ pr[3] = static_cast<limb_type>(carry >> limb_bits);
+#endif
+ result.sign(s);
+ result.normalize();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1>
+BOOST_MP_FORCEINLINE typename enable_if_c<
+ !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ double_limb_type a, double_limb_type b)
+{
+ static const signed_double_limb_type mask = ~static_cast<limb_type>(0);
+ static const unsigned limb_bits = sizeof(limb_type) * CHAR_BIT;
+
+ double_limb_type w, x, y, z;
+ w = a & mask;
+ x = a >> limb_bits;
+ y = b & mask;
+ z = b >> limb_bits;
+
+ result.resize(4, 4);
+ limb_type* pr = result.limbs();
+
+ double_limb_type carry = w * y;
+#ifdef __MSVC_RUNTIME_CHECKS
+ pr[0] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ carry += w * z;
+ pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry = x * y + pr[1];
+ pr[1] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ carry >>= limb_bits;
+ carry += pr[2] + x * z;
+ pr[2] = static_cast<limb_type>(carry & ~static_cast<limb_type>(0));
+ pr[3] = static_cast<limb_type>(carry >> limb_bits);
+#else
+ pr[0] = static_cast<limb_type>(carry);
+ carry >>= limb_bits;
+ carry += w * z;
+ pr[1] = static_cast<limb_type>(carry);
+ carry >>= limb_bits;
+ pr[2] = static_cast<limb_type>(carry);
+ carry = x * y + pr[1];
+ pr[1] = static_cast<limb_type>(carry);
+ carry >>= limb_bits;
+ carry += pr[2] + x * z;
+ pr[2] = static_cast<limb_type>(carry);
+ pr[3] = static_cast<limb_type>(carry >> limb_bits);
+#endif
+ result.sign(false);
+ result.normalize();
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1,
+ unsigned MinBits2, unsigned MaxBits2, cpp_integer_type SignType2, cpp_int_check_type Checked2, class Allocator2>
+BOOST_MP_FORCEINLINE typename enable_if_c<
+ !is_trivial_cpp_int<cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ && is_trivial_cpp_int<cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> >::value
+ >::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> const& a,
+ cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2> const& b)
+{
+ typedef typename boost::multiprecision::detail::canonical<typename cpp_int_backend<MinBits2, MaxBits2, SignType2, Checked2, Allocator2>::local_limb_type, cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1> >::type canonical_type;
+ eval_multiply(result, static_cast<canonical_type>(*a.limbs()), static_cast<canonical_type>(*b.limbs()));
+ result.sign(a.sign() != b.sign());
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class SI>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_signed<SI>::value && (sizeof(SI) <= sizeof(signed_double_limb_type) / 2)>::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ SI a, SI b)
+{
+ result = static_cast<signed_double_limb_type>(a) * static_cast<signed_double_limb_type>(b);
+}
+
+template <unsigned MinBits1, unsigned MaxBits1, cpp_integer_type SignType1, cpp_int_check_type Checked1, class Allocator1, class UI>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_unsigned<UI>::value && (sizeof(UI) <= sizeof(signed_double_limb_type) / 2)>::type
+ eval_multiply(
+ cpp_int_backend<MinBits1, MaxBits1, SignType1, Checked1, Allocator1>& result,
+ UI a, UI b)
+{
+ result = static_cast<double_limb_type>(a) * static_cast<double_limb_type>(b);
+}
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
+}}} // namespaces
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/serialize.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/serialize.hpp
index 042a9f89f7e..042a9f89f7e 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/serialize.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/serialize.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/value_pack.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/value_pack.hpp
index 29d9562e04a..29d9562e04a 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/cpp_int/value_pack.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/cpp_int/value_pack.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/debug_adaptor.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/debug_adaptor.hpp
index cb61c5b59b6..cb61c5b59b6 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/debug_adaptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/debug_adaptor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/bitscan.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/bitscan.hpp
new file mode 100644
index 00000000000..e6fd74ac37d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/bitscan.hpp
@@ -0,0 +1,265 @@
+///////////////////////////////////////////////////////////////
+// Copyright 2013 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_
+//
+// Comparison operators for cpp_int_backend:
+//
+#ifndef BOOST_MP_DETAIL_BITSCAN_HPP
+#define BOOST_MP_DETAIL_BITSCAN_HPP
+
+#include <boost/predef/other/endian.h>
+#include <boost/cstdint.hpp>
+
+#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+#include <intrin.h>
+#endif
+
+namespace boost{ namespace multiprecision{ namespace detail{
+
+template <class Unsigned>
+inline unsigned find_lsb(Unsigned mask, const mpl::int_<0>&)
+{
+ unsigned result = 0;
+ while(!(mask & 1u))
+ {
+ mask >>= 1;
+ ++result;
+ }
+ return result;
+}
+
+template <class Unsigned>
+inline unsigned find_msb(Unsigned mask, const mpl::int_<0>&)
+{
+ unsigned index = 0;
+ while(mask)
+ {
+ ++index;
+ mask >>= 1;
+ }
+ return --index;
+}
+
+#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
+
+#pragma intrinsic(_BitScanForward,_BitScanReverse)
+
+BOOST_FORCEINLINE unsigned find_lsb(unsigned long mask, const mpl::int_<1>&)
+{
+ unsigned long result;
+ _BitScanForward(&result, mask);
+ return result;
+}
+
+BOOST_FORCEINLINE unsigned find_msb(unsigned long mask, const mpl::int_<1>&)
+{
+ unsigned long result;
+ _BitScanReverse(&result, mask);
+ return result;
+}
+#ifdef _M_X64
+
+#pragma intrinsic(_BitScanForward64,_BitScanReverse64)
+
+BOOST_FORCEINLINE unsigned find_lsb(unsigned __int64 mask, const mpl::int_<2>&)
+{
+ unsigned long result;
+ _BitScanForward64(&result, mask);
+ return result;
+}
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_msb(Unsigned mask, const mpl::int_<2>&)
+{
+ unsigned long result;
+ _BitScanReverse64(&result, mask);
+ return result;
+}
+#endif
+
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
+{
+ typedef typename make_unsigned<Unsigned>::type ui_type;
+ typedef typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(unsigned long),
+ mpl::int_<1>,
+#ifdef _M_X64
+ typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(__int64),
+ mpl::int_<2>,
+ mpl::int_<0>
+ >::type
+#else
+ mpl::int_<0>
+#endif
+ >::type tag_type;
+ return find_lsb(static_cast<ui_type>(mask), tag_type());
+}
+
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
+{
+ typedef typename make_unsigned<Unsigned>::type ui_type;
+ typedef typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(unsigned long),
+ mpl::int_<1>,
+#ifdef _M_X64
+ typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(__int64),
+ mpl::int_<2>,
+ mpl::int_<0>
+ >::type
+#else
+ mpl::int_<0>
+#endif
+ >::type tag_type;
+ return find_msb(static_cast<ui_type>(mask), tag_type());
+}
+
+#elif defined(BOOST_GCC) || defined(__clang__) || (defined(BOOST_INTEL) && defined(__GNUC__))
+
+BOOST_FORCEINLINE unsigned find_lsb(unsigned mask, mpl::int_<1> const&)
+{
+ return __builtin_ctz(mask);
+}
+BOOST_FORCEINLINE unsigned find_lsb(unsigned long mask, mpl::int_<2> const&)
+{
+ return __builtin_ctzl(mask);
+}
+BOOST_FORCEINLINE unsigned find_lsb(boost::ulong_long_type mask, mpl::int_<3> const&)
+{
+ return __builtin_ctzll(mask);
+}
+BOOST_FORCEINLINE unsigned find_msb(unsigned mask, mpl::int_<1> const&)
+{
+ return sizeof(unsigned) * CHAR_BIT - 1 - __builtin_clz(mask);
+}
+BOOST_FORCEINLINE unsigned find_msb(unsigned long mask, mpl::int_<2> const&)
+{
+ return sizeof(unsigned long) * CHAR_BIT - 1 - __builtin_clzl(mask);
+}
+BOOST_FORCEINLINE unsigned find_msb(boost::ulong_long_type mask, mpl::int_<3> const&)
+{
+ return sizeof(boost::ulong_long_type) * CHAR_BIT - 1 - __builtin_clzll(mask);
+}
+#ifdef BOOST_HAS_INT128
+
+__extension__ typedef unsigned __int128 uint128_type;
+
+BOOST_FORCEINLINE unsigned find_msb(uint128_type mask, mpl::int_<0> const&)
+{
+ union { uint128_type v; boost::uint64_t sv[2]; } val;
+ val.v = mask;
+#if BOOST_ENDIAN_LITTLE_BYTE
+ if(val.sv[1])
+ return find_msb(val.sv[1], mpl::int_<3>()) + 64;
+ return find_msb(val.sv[0], mpl::int_<3>());
+#else
+ if(val.sv[0])
+ return find_msb(val.sv[0], mpl::int_<3>()) + 64;
+ return find_msb(val.sv[1], mpl::int_<3>());
+#endif
+}
+BOOST_FORCEINLINE unsigned find_lsb(uint128_type mask, mpl::int_<0> const&)
+{
+ union { uint128_type v; boost::uint64_t sv[2]; } val;
+ val.v = mask;
+#if BOOST_ENDIAN_LITTLE_BYTE
+ if(val.sv[0] == 0)
+ return find_lsb(val.sv[1], mpl::int_<3>()) + 64;
+ return find_lsb(val.sv[0], mpl::int_<3>());
+#else
+ if(val.sv[1] == 0)
+ return find_lsb(val.sv[0], mpl::int_<3>()) + 64;
+ return find_lsb(val.sv[1], mpl::int_<3>());
+#endif
+}
+#endif
+
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
+{
+ typedef typename make_unsigned<Unsigned>::type ui_type;
+ typedef typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(unsigned),
+ mpl::int_<1>,
+ typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(unsigned long),
+ mpl::int_<2>,
+ typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(boost::ulong_long_type),
+ mpl::int_<3>,
+ mpl::int_<0>
+ >::type
+ >::type
+ >::type tag_type;
+ return find_lsb(static_cast<ui_type>(mask), tag_type());
+}
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
+{
+ typedef typename make_unsigned<Unsigned>::type ui_type;
+ typedef typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(unsigned),
+ mpl::int_<1>,
+ typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(unsigned long),
+ mpl::int_<2>,
+ typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(boost::ulong_long_type),
+ mpl::int_<3>,
+ mpl::int_<0>
+ >::type
+ >::type
+ >::type tag_type;
+ return find_msb(static_cast<ui_type>(mask), tag_type());
+}
+#elif defined(BOOST_INTEL)
+BOOST_FORCEINLINE unsigned find_lsb(unsigned mask, mpl::int_<1> const&)
+{
+ return _bit_scan_forward(mask);
+}
+BOOST_FORCEINLINE unsigned find_msb(unsigned mask, mpl::int_<1> const&)
+{
+ return _bit_scan_reverse(mask);
+}
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
+{
+ typedef typename make_unsigned<Unsigned>::type ui_type;
+ typedef typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(unsigned),
+ mpl::int_<1>,
+ mpl::int_<0>
+ >::type tag_type;
+ return find_lsb(static_cast<ui_type>(mask), tag_type());
+}
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
+{
+ typedef typename make_unsigned<Unsigned>::type ui_type;
+ typedef typename mpl::if_c<
+ sizeof(Unsigned) <= sizeof(unsigned),
+ mpl::int_<1>,
+ mpl::int_<0>
+ >::type tag_type;
+ return find_msb(static_cast<ui_type>(mask), tag_type());
+}
+#else
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
+{
+ return find_lsb(mask, mpl::int_<0>());
+}
+template <class Unsigned>
+BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
+{
+ return find_msb(mask, mpl::int_<0>());
+}
+#endif
+
+}}}
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/default_ops.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/default_ops.hpp
new file mode 100644
index 00000000000..145ecc6729e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/default_ops.hpp
@@ -0,0 +1,3823 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_BIG_NUM_DEF_OPS
+#define BOOST_MATH_BIG_NUM_DEF_OPS
+
+#include <boost/math/policies/error_handling.hpp>
+#include <boost/multiprecision/detail/number_base.hpp>
+#include <boost/math/special_functions/fpclassify.hpp>
+#include <boost/math/special_functions/next.hpp>
+#include <boost/math/special_functions/hypot.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/mpl/front.hpp>
+#include <boost/mpl/fold.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#ifndef BOOST_NO_CXX17_HDR_STRING_VIEW
+#include <string_view>
+#endif
+
+#ifndef INSTRUMENT_BACKEND
+#ifndef BOOST_MP_INSTRUMENT
+#define INSTRUMENT_BACKEND(x)
+#else
+#define INSTRUMENT_BACKEND(x)\
+ std::cout << BOOST_STRINGIZE(x) << " = " << x.str(0, std::ios_base::scientific) << std::endl;
+#endif
+#endif
+
+
+namespace boost{ namespace multiprecision{
+
+ namespace detail {
+
+ template <class T>
+ struct is_backend;
+
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_integer>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_floating_point>& /*to_type*/, const mpl::int_<number_kind_floating_point>& /*from_type*/);
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& /*to_type*/, const mpl::int_<number_kind_rational>& /*from_type*/);
+ template <class To, class From>
+ void generic_interconvert(To& to, const From& from, const mpl::int_<number_kind_rational>& /*to_type*/, const mpl::int_<number_kind_integer>& /*from_type*/);
+
+}
+
+namespace default_ops{
+
+#ifdef BOOST_MSVC
+// warning C4127: conditional expression is constant
+// warning C4146: unary minus operator applied to unsigned type, result still unsigned
+#pragma warning(push)
+#pragma warning(disable:4127 4146)
+#endif
+//
+// Default versions of mixed arithmetic, these just construct a temporary
+// from the arithmetic value and then do the arithmetic on that, two versions
+// of each depending on whether the backend can be directly constructed from type V.
+//
+// Note that we have to provide *all* the template parameters to class number when used in
+// enable_if as MSVC-10 won't compile the code if we rely on a computed-default parameter.
+// Since the result of the test doesn't depend on whether expression templates are on or off
+// we just use et_on everywhere. We could use a BOOST_WORKAROUND but that just obfuscates the
+// code even more....
+//
+template <class T, class V>
+inline typename disable_if_c<is_convertible<V, T>::value >::type
+ eval_add(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_add(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, T>::value >::type
+ eval_add(T& result, V const& v)
+{
+ T t(v);
+ eval_add(result, t);
+}
+template <class T, class V>
+inline typename disable_if_c<is_convertible<V, T>::value>::type
+ eval_subtract(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_subtract(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, T>::value>::type
+ eval_subtract(T& result, V const& v)
+{
+ T t(v);
+ eval_subtract(result, t);
+}
+template <class T, class V>
+inline typename disable_if_c<is_convertible<V, T>::value>::type
+ eval_multiply(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_multiply(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, T>::value>::type
+ eval_multiply(T& result, V const& v)
+{
+ T t(v);
+ eval_multiply(result, t);
+}
+
+template <class T, class U, class V>
+void eval_multiply(T& t, const U& u, const V& v);
+
+template <class T, class U, class V>
+inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v)
+{
+ T z;
+ eval_multiply(z, u, v);
+ eval_add(t, z);
+}
+template <class T, class U, class V>
+inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v)
+{
+ eval_multiply_add(t, v, u);
+}
+template <class T, class U, class V>
+inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v)
+{
+ T z;
+ eval_multiply(z, u, v);
+ eval_subtract(t, z);
+}
+template <class T, class U, class V>
+inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v)
+{
+ eval_multiply_subtract(t, v, u);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
+ eval_divide(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_divide(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
+ eval_divide(T& result, V const& v)
+{
+ T t(v);
+ eval_divide(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
+ eval_modulus(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_modulus(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value&& is_convertible<V, T>::value>::type
+ eval_modulus(T& result, V const& v)
+{
+ T t(v);
+ eval_modulus(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
+ eval_bitwise_and(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_bitwise_and(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
+ eval_bitwise_and(T& result, V const& v)
+{
+ T t(v);
+ eval_bitwise_and(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
+ eval_bitwise_or(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_bitwise_or(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
+ eval_bitwise_or(T& result, V const& v)
+{
+ T t(v);
+ eval_bitwise_or(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
+ eval_bitwise_xor(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_bitwise_xor(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
+ eval_bitwise_xor(T& result, V const& v)
+{
+ T t(v);
+ eval_bitwise_xor(result, t);
+}
+
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && !is_convertible<V, T>::value>::type
+ eval_complement(T& result, V const& v)
+{
+ T t;
+ t = v;
+ eval_complement(result, t);
+}
+template <class T, class V>
+inline typename enable_if_c<is_convertible<V, number<T, et_on> >::value && is_convertible<V, T>::value>::type
+ eval_complement(T& result, V const& v)
+{
+ T t(v);
+ eval_complement(result, t);
+}
+
+//
+// Default versions of 3-arg arithmetic functions, these mostly just forward to the 2 arg versions:
+//
+template <class T, class U, class V>
+void eval_add(T& t, const U& u, const V& v);
+
+template <class T>
+inline void eval_add_default(T& t, const T& u, const T& v)
+{
+ if(&t == &v)
+ {
+ eval_add(t, u);
+ }
+ else if(&t == &u)
+ {
+ eval_add(t, v);
+ }
+ else
+ {
+ t = u;
+ eval_add(t, v);
+ }
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_add_default(T& t, const T& u, const U& v)
+{
+ T vv;
+ vv = v;
+ eval_add(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_add_default(T& t, const T& u, const U& v)
+{
+ T vv(v);
+ eval_add(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_add_default(T& t, const U& u, const T& v)
+{
+ eval_add(t, v, u);
+}
+template <class T, class U, class V>
+inline void eval_add_default(T& t, const U& u, const V& v)
+{
+ if(is_same<T, V>::value && ((void*)&t == (void*)&v))
+ {
+ eval_add(t, u);
+ }
+ else
+ {
+ t = u;
+ eval_add(t, v);
+ }
+}
+template <class T, class U, class V>
+inline void eval_add(T& t, const U& u, const V& v)
+{
+ eval_add_default(t, u, v);
+}
+
+template <class T, class U, class V>
+void eval_subtract(T& t, const U& u, const V& v);
+
+template <class T>
+inline void eval_subtract_default(T& t, const T& u, const T& v)
+{
+ if((&t == &v) && is_signed_number<T>::value)
+ {
+ eval_subtract(t, u);
+ t.negate();
+ }
+ else if(&t == &u)
+ {
+ eval_subtract(t, v);
+ }
+ else
+ {
+ t = u;
+ eval_subtract(t, v);
+ }
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_subtract_default(T& t, const T& u, const U& v)
+{
+ T vv;
+ vv = v;
+ eval_subtract(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_subtract_default(T& t, const T& u, const U& v)
+{
+ T vv(v);
+ eval_subtract(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_signed_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
+{
+ eval_subtract(t, v, u);
+ t.negate();
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
+{
+ T temp;
+ temp = u;
+ eval_subtract(t, temp, v);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value && is_unsigned_number<T>::value>::type eval_subtract_default(T& t, const U& u, const T& v)
+{
+ T temp(u);
+ eval_subtract(t, temp, v);
+}
+template <class T, class U, class V>
+inline void eval_subtract_default(T& t, const U& u, const V& v)
+{
+ if(is_same<T, V>::value && ((void*)&t == (void*)&v))
+ {
+ eval_subtract(t, u);
+ t.negate();
+ }
+ else
+ {
+ t = u;
+ eval_subtract(t, v);
+ }
+}
+template <class T, class U, class V>
+inline void eval_subtract(T& t, const U& u, const V& v)
+{
+ eval_subtract_default(t, u, v);
+}
+
+template <class T>
+inline void eval_multiply_default(T& t, const T& u, const T& v)
+{
+ if(&t == &v)
+ {
+ eval_multiply(t, u);
+ }
+ else if(&t == &u)
+ {
+ eval_multiply(t, v);
+ }
+ else
+ {
+ t = u;
+ eval_multiply(t, v);
+ }
+}
+#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_multiply_default(T& t, const T& u, const U& v)
+{
+ T vv;
+ vv = v;
+ eval_multiply(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_multiply_default(T& t, const T& u, const U& v)
+{
+ T vv(v);
+ eval_multiply(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_multiply_default(T& t, const U& u, const T& v)
+{
+ eval_multiply(t, v, u);
+}
+#endif
+template <class T, class U, class V>
+inline void eval_multiply_default(T& t, const U& u, const V& v)
+{
+ if(is_same<T, V>::value && ((void*)&t == (void*)&v))
+ {
+ eval_multiply(t, u);
+ }
+ else
+ {
+ t = number<T>::canonical_value(u);
+ eval_multiply(t, v);
+ }
+}
+template <class T, class U, class V>
+inline void eval_multiply(T& t, const U& u, const V& v)
+{
+ eval_multiply_default(t, u, v);
+}
+
+template <class T>
+inline void eval_multiply_add(T& t, const T& u, const T& v, const T& x)
+{
+ if((void*)&x == (void*)&t)
+ {
+ T z;
+ z = number<T>::canonical_value(x);
+ eval_multiply_add(t, u, v, z);
+ }
+ else
+ {
+ eval_multiply(t, u, v);
+ eval_add(t, x);
+ }
+}
+
+template <class T, class U>
+inline typename boost::disable_if_c<boost::is_same<T, U>::value, T>::type make_T(const U& u)
+{
+ T t;
+ t = number<T>::canonical_value(u);
+ return BOOST_MP_MOVE(t);
+}
+template <class T>
+inline const T& make_T(const T& t)
+{
+ return t;
+}
+
+template <class T, class U, class V, class X>
+inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v, const X& x)
+{
+ eval_multiply_add(t, make_T<T>(u), make_T<T>(v), make_T<T>(x));
+}
+template <class T, class U, class V, class X>
+inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_add(T& t, const U& u, const V& v, const X& x)
+{
+ eval_multiply_add(t, v, u, x);
+}
+template <class T, class U, class V, class X>
+inline typename disable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v, const X& x)
+{
+ if((void*)&x == (void*)&t)
+ {
+ T z;
+ z = x;
+ eval_multiply_subtract(t, u, v, z);
+ }
+ else
+ {
+ eval_multiply(t, u, v);
+ eval_subtract(t, x);
+ }
+}
+template <class T, class U, class V, class X>
+inline typename enable_if_c<!is_same<T, U>::value && is_same<T, V>::value>::type eval_multiply_subtract(T& t, const U& u, const V& v, const X& x)
+{
+ eval_multiply_subtract(t, v, u, x);
+}
+
+template <class T, class U, class V>
+void eval_divide(T& t, const U& u, const V& v);
+
+template <class T>
+inline void eval_divide_default(T& t, const T& u, const T& v)
+{
+ if(&t == &u)
+ eval_divide(t, v);
+ else if(&t == &v)
+ {
+ T temp;
+ eval_divide(temp, u, v);
+ temp.swap(t);
+ }
+ else
+ {
+ t = u;
+ eval_divide(t, v);
+ }
+}
+#if !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_divide_default(T& t, const T& u, const U& v)
+{
+ T vv;
+ vv = v;
+ eval_divide(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_divide_default(T& t, const T& u, const U& v)
+{
+ T vv(v);
+ eval_divide(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_divide_default(T& t, const U& u, const T& v)
+{
+ T uu;
+ uu = u;
+ eval_divide(t, uu, v);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_divide_default(T& t, const U& u, const T& v)
+{
+ T uu(u);
+ eval_divide(t, uu, v);
+}
+#endif
+template <class T, class U, class V>
+inline void eval_divide_default(T& t, const U& u, const V& v)
+{
+ if(is_same<T, V>::value && ((void*)&t == (void*)&v))
+ {
+ T temp;
+ temp = u;
+ eval_divide(temp, v);
+ t = temp;
+ }
+ else
+ {
+ t = u;
+ eval_divide(t, v);
+ }
+}
+template <class T, class U, class V>
+inline void eval_divide(T& t, const U& u, const V& v)
+{
+ eval_divide_default(t, u, v);
+}
+
+template <class T, class U, class V>
+void eval_modulus(T& t, const U& u, const V& v);
+
+template <class T>
+inline void eval_modulus_default(T& t, const T& u, const T& v)
+{
+ if(&t == &u)
+ eval_modulus(t, v);
+ else if(&t == &v)
+ {
+ T temp;
+ eval_modulus(temp, u, v);
+ temp.swap(t);
+ }
+ else
+ {
+ t = u;
+ eval_modulus(t, v);
+ }
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_modulus_default(T& t, const T& u, const U& v)
+{
+ T vv;
+ vv = v;
+ eval_modulus(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_modulus_default(T& t, const T& u, const U& v)
+{
+ T vv(v);
+ eval_modulus(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_modulus_default(T& t, const U& u, const T& v)
+{
+ T uu;
+ uu = u;
+ eval_modulus(t, uu, v);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_modulus_default(T& t, const U& u, const T& v)
+{
+ T uu(u);
+ eval_modulus(t, uu, v);
+}
+template <class T, class U, class V>
+inline void eval_modulus_default(T& t, const U& u, const V& v)
+{
+ if(is_same<T, V>::value && ((void*)&t == (void*)&v))
+ {
+ T temp(u);
+ eval_modulus(temp, v);
+ t = temp;
+ }
+ else
+ {
+ t = u;
+ eval_modulus(t, v);
+ }
+}
+template <class T, class U, class V>
+inline void eval_modulus(T& t, const U& u, const V& v)
+{
+ eval_modulus_default(t, u, v);
+}
+
+template <class T, class U, class V>
+void eval_bitwise_and(T& t, const U& u, const V& v);
+
+template <class T>
+inline void eval_bitwise_and_default(T& t, const T& u, const T& v)
+{
+ if(&t == &v)
+ {
+ eval_bitwise_and(t, u);
+ }
+ else if(&t == &u)
+ {
+ eval_bitwise_and(t, v);
+ }
+ else
+ {
+ t = u;
+ eval_bitwise_and(t, v);
+ }
+}
+template <class T, class U>
+inline typename disable_if_c<is_convertible<U, T>::value>::type eval_bitwise_and_default(T& t, const T& u, const U& v)
+{
+ T vv;
+ vv = v;
+ eval_bitwise_and(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, T>::value>::type eval_bitwise_and_default(T& t, const T& u, const U& v)
+{
+ T vv(v);
+ eval_bitwise_and(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_and_default(T& t, const U& u, const T& v)
+{
+ eval_bitwise_and(t, v, u);
+}
+template <class T, class U, class V>
+inline typename disable_if_c<is_same<T, U>::value || is_same<T, V>::value>::type eval_bitwise_and_default(T& t, const U& u, const V& v)
+{
+ t = u;
+ eval_bitwise_and(t, v);
+}
+template <class T, class U, class V>
+inline void eval_bitwise_and(T& t, const U& u, const V& v)
+{
+ eval_bitwise_and_default(t, u, v);
+}
+
+template <class T, class U, class V>
+void eval_bitwise_or(T& t, const U& u, const V& v);
+
+template <class T>
+inline void eval_bitwise_or_default(T& t, const T& u, const T& v)
+{
+ if(&t == &v)
+ {
+ eval_bitwise_or(t, u);
+ }
+ else if(&t == &u)
+ {
+ eval_bitwise_or(t, v);
+ }
+ else
+ {
+ t = u;
+ eval_bitwise_or(t, v);
+ }
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_bitwise_or_default(T& t, const T& u, const U& v)
+{
+ T vv;
+ vv = v;
+ eval_bitwise_or(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_bitwise_or_default(T& t, const T& u, const U& v)
+{
+ T vv(v);
+ eval_bitwise_or(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_or_default(T& t, const U& u, const T& v)
+{
+ eval_bitwise_or(t, v, u);
+}
+template <class T, class U, class V>
+inline void eval_bitwise_or_default(T& t, const U& u, const V& v)
+{
+ if(is_same<T, V>::value && ((void*)&t == (void*)&v))
+ {
+ eval_bitwise_or(t, u);
+ }
+ else
+ {
+ t = u;
+ eval_bitwise_or(t, v);
+ }
+}
+template <class T, class U, class V>
+inline void eval_bitwise_or(T& t, const U& u, const V& v)
+{
+ eval_bitwise_or_default(t, u, v);
+}
+
+template <class T, class U, class V>
+void eval_bitwise_xor(T& t, const U& u, const V& v);
+
+template <class T>
+inline void eval_bitwise_xor_default(T& t, const T& u, const T& v)
+{
+ if(&t == &v)
+ {
+ eval_bitwise_xor(t, u);
+ }
+ else if(&t == &u)
+ {
+ eval_bitwise_xor(t, v);
+ }
+ else
+ {
+ t = u;
+ eval_bitwise_xor(t, v);
+ }
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && !is_convertible<U, T>::value>::type eval_bitwise_xor_default(T& t, const T& u, const U& v)
+{
+ T vv;
+ vv = v;
+ eval_bitwise_xor(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value && is_convertible<U, T>::value>::type eval_bitwise_xor_default(T& t, const T& u, const U& v)
+{
+ T vv(v);
+ eval_bitwise_xor(t, u, vv);
+}
+template <class T, class U>
+inline typename enable_if_c<is_convertible<U, number<T, et_on> >::value>::type eval_bitwise_xor_default(T& t, const U& u, const T& v)
+{
+ eval_bitwise_xor(t, v, u);
+}
+template <class T, class U, class V>
+inline void eval_bitwise_xor_default(T& t, const U& u, const V& v)
+{
+ if(is_same<T, V>::value && ((void*)&t == (void*)&v))
+ {
+ eval_bitwise_xor(t, u);
+ }
+ else
+ {
+ t = u;
+ eval_bitwise_xor(t, v);
+ }
+}
+template <class T, class U, class V>
+inline void eval_bitwise_xor(T& t, const U& u, const V& v)
+{
+ eval_bitwise_xor_default(t, u, v);
+}
+
+template <class T>
+inline void eval_increment(T& val)
+{
+ typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
+ eval_add(val, static_cast<ui_type>(1u));
+}
+template <class T>
+inline void eval_decrement(T& val)
+{
+ typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
+ eval_subtract(val, static_cast<ui_type>(1u));
+}
+
+template <class T, class V>
+inline void eval_left_shift(T& result, const T& arg, const V val)
+{
+ result = arg;
+ eval_left_shift(result, val);
+}
+
+template <class T, class V>
+inline void eval_right_shift(T& result, const T& arg, const V val)
+{
+ result = arg;
+ eval_right_shift(result, val);
+}
+
+template <class T>
+inline bool eval_is_zero(const T& val)
+{
+ typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
+ return val.compare(static_cast<ui_type>(0)) == 0;
+}
+template <class T>
+inline int eval_get_sign(const T& val)
+{
+ typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
+ return val.compare(static_cast<ui_type>(0));
+}
+
+template <class T, class V, class U>
+inline void assign_components_imp(T& result, const V& v1, const U& v2, const mpl::int_<number_kind_rational>&)
+{
+ result = v1;
+ T t;
+ t = v2;
+ eval_divide(result, t);
+}
+
+template <class T, class V, class U, int N>
+inline void assign_components_imp(T& result, const V& v1, const U& v2, const mpl::int_<N>&)
+{
+ typedef typename component_type<number<T> >::type component_number_type;
+
+ component_number_type x(v1), y(v2);
+ assign_components(result, x.backend(), y.backend());
+}
+
+template <class T, class V, class U>
+inline void assign_components(T& result, const V& v1, const U& v2)
+{
+ return assign_components_imp(result, v1, v2, typename number_category<T>::type());
+}
+#ifndef BOOST_NO_CXX17_HDR_STRING_VIEW
+template <class Result, class Traits>
+inline void assign_from_string_view(Result& result, const std::basic_string_view<char, Traits>& view)
+{
+ // since most (all?) backends require a const char* to construct from, we just
+ // convert to that:
+ std::string s(view);
+ result = s.c_str();
+}
+template <class Result, class Traits>
+inline void assign_from_string_view(Result& result, const std::basic_string_view<char, Traits>& view_x, const std::basic_string_view<char, Traits>& view_y)
+{
+ // since most (all?) backends require a const char* to construct from, we just
+ // convert to that:
+ std::string x(view_x), y(view_y);
+ assign_components(result, x.c_str(), y.c_str());
+}
+#endif
+template <class R, int b>
+struct has_enough_bits
+{
+ template <class T>
+ struct type : public mpl::and_<mpl::not_<is_same<R, T> >, mpl::bool_<std::numeric_limits<T>::digits >= b> >{};
+};
+
+template <class R>
+struct terminal
+{
+ terminal(const R& v) : value(v){}
+ terminal(){}
+ terminal& operator = (R val) { value = val; return *this; }
+ R value;
+ operator R()const { return value; }
+};
+
+template<class R, class B>
+struct calculate_next_larger_type
+{
+ // Find which list we're looking through:
+ typedef typename mpl::if_<
+ is_signed<R>,
+ typename B::signed_types,
+ typename mpl::if_<
+ is_unsigned<R>,
+ typename B::unsigned_types,
+ typename B::float_types
+ >::type
+ >::type list_type;
+ // A predicate to find a type with enough bits:
+ typedef typename has_enough_bits<R, std::numeric_limits<R>::digits>::template type<mpl::_> pred_type;
+ // See if the last type is in the list, if so we have to start after this:
+ typedef typename mpl::find_if<
+ list_type,
+ is_same<R, mpl::_>
+ >::type start_last;
+ // Where we're starting from, either the start of the sequence or the last type found:
+ typedef typename mpl::if_<is_same<start_last, typename mpl::end<list_type>::type>, typename mpl::begin<list_type>::type, start_last>::type start_seq;
+ // The range we're searching:
+ typedef mpl::iterator_range<start_seq, typename mpl::end<list_type>::type> range;
+ // Find the next type:
+ typedef typename mpl::find_if<
+ range,
+ pred_type
+ >::type iter_type;
+ // Either the next type, or a "terminal" to indicate we've run out of types to search:
+ typedef typename mpl::eval_if<
+ is_same<typename mpl::end<list_type>::type, iter_type>,
+ mpl::identity<terminal<R> >,
+ mpl::deref<iter_type>
+ >::type type;
+};
+
+template <class R, class T>
+inline typename boost::enable_if_c<boost::is_integral<R>::value, bool>::type check_in_range(const T& t)
+{
+ // Can t fit in an R?
+ if((t > 0) && std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (t > (std::numeric_limits<R>::max)()))
+ return true;
+ else
+ return false;
+}
+
+template <class R, class B>
+inline typename boost::enable_if_c<boost::is_integral<R>::value>::type eval_convert_to(R* result, const B& backend)
+{
+ typedef typename calculate_next_larger_type<R, B>::type next_type;
+ next_type n;
+ eval_convert_to(&n, backend);
+ if(!boost::is_unsigned<R>::value && std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (n > (next_type)(std::numeric_limits<R>::max)()))
+ {
+ *result = (std::numeric_limits<R>::max)();
+ }
+ else if (std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && (n < (next_type)(std::numeric_limits<R>::min)()))
+ {
+ *result = (std::numeric_limits<R>::min)();
+ }
+ else
+ *result = static_cast<R>(n);
+}
+
+template <class R, class B>
+inline typename boost::disable_if_c<boost::is_integral<R>::value>::type eval_convert_to(R* result, const B& backend)
+{
+ typedef typename calculate_next_larger_type<R, B>::type next_type;
+ next_type n;
+ eval_convert_to(&n, backend);
+ if(std::numeric_limits<R>::is_specialized && std::numeric_limits<R>::is_bounded && ((n > (next_type)(std::numeric_limits<R>::max)() || (n < (next_type)-(std::numeric_limits<R>::max)()) )))
+ {
+ *result = n > 0 ? (std::numeric_limits<R>::max)() : -(std::numeric_limits<R>::max)();
+ }
+ else
+ *result = static_cast<R>(n);
+}
+
+template <class R, class B>
+inline void last_chance_eval_convert_to(terminal<R>* result, const B& backend, const mpl::false_&)
+{
+ //
+ // We ran out of types to try for the conversion, try
+ // a lexical_cast and hope for the best:
+ //
+ if (std::numeric_limits<R>::is_integer && !std::numeric_limits<R>::is_signed && (eval_get_sign(backend) < 0))
+ BOOST_THROW_EXCEPTION(std::range_error("Attempt to convert negative value to an unsigned integer results in undefined behaviour"));
+ try
+ {
+ result->value = boost::lexical_cast<R>(backend.str(0, std::ios_base::fmtflags(0)));
+ }
+ catch (const bad_lexical_cast&)
+ {
+ if (eval_get_sign(backend) < 0)
+ {
+ *result = std::numeric_limits<R>::is_integer && std::numeric_limits<R>::is_signed ? (std::numeric_limits<R>::min)() : -(std::numeric_limits<R>::max)();
+ }
+ else
+ *result = (std::numeric_limits<R>::max)();
+ }
+}
+
+template <class R, class B>
+inline void last_chance_eval_convert_to(terminal<R>* result, const B& backend, const mpl::true_&)
+{
+ //
+ // We ran out of types to try for the conversion, try
+ // a lexical_cast and hope for the best:
+ //
+ if (std::numeric_limits<R>::is_integer && !std::numeric_limits<R>::is_signed && (eval_get_sign(backend) < 0))
+ BOOST_THROW_EXCEPTION(std::range_error("Attempt to convert negative value to an unsigned integer results in undefined behaviour"));
+ try
+ {
+ B t(backend);
+ R mask = ~static_cast<R>(0u);
+ eval_bitwise_and(t, mask);
+ result->value = boost::lexical_cast<R>(t.str(0, std::ios_base::fmtflags(0)));
+ }
+ catch (const bad_lexical_cast&)
+ {
+ if (eval_get_sign(backend) < 0)
+ {
+ *result = std::numeric_limits<R>::is_integer && std::numeric_limits<R>::is_signed ? (std::numeric_limits<R>::min)() : -(std::numeric_limits<R>::max)();
+ }
+ else
+ *result = (std::numeric_limits<R>::max)();
+ }
+}
+
+template <class R, class B>
+inline void eval_convert_to(terminal<R>* result, const B& backend)
+{
+ typedef mpl::bool_<boost::is_unsigned<R>::value && number_category<B>::value == number_kind_integer> tag_type;
+ last_chance_eval_convert_to(result, backend, tag_type());
+}
+
+template <class B1, class B2, expression_template_option et>
+inline void eval_convert_to(terminal<number<B1, et> >* result, const B2& backend)
+{
+ //
+ // We ran out of types to try for the conversion, try
+ // a generic conversion and hope for the best:
+ //
+ boost::multiprecision::detail::generic_interconvert(result->value.backend(), backend, number_category<B1>(), number_category<B2>());
+}
+
+template <class B>
+inline void eval_convert_to(std::string* result, const B& backend)
+{
+ *result = backend.str(0, std::ios_base::fmtflags(0));
+}
+
+template <class B>
+inline void eval_convert_to(std::complex<float>* result, const B& backend)
+{
+ typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type;
+ scalar_type re, im;
+ eval_real(re.backend(), backend);
+ eval_imag(im.backend(), backend);
+
+ *result = std::complex<float>(re.template convert_to<float>(), im.template convert_to<float>());
+}
+
+template <class B>
+inline void eval_convert_to(std::complex<double>* result, const B& backend)
+{
+ typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type;
+ scalar_type re, im;
+ eval_real(re.backend(), backend);
+ eval_imag(im.backend(), backend);
+
+ *result = std::complex<double>(re.template convert_to<double>(), im.template convert_to<double>());
+}
+
+template <class B>
+inline void eval_convert_to(std::complex<long double>* result, const B& backend)
+{
+ typedef typename scalar_result_from_possible_complex<multiprecision::number<B> >::type scalar_type;
+ scalar_type re, im;
+ eval_real(re.backend(), backend);
+ eval_imag(im.backend(), backend);
+
+ *result = std::complex<long double>(re.template convert_to<long double>(), im.template convert_to<long double>());
+}
+
+//
+// Functions:
+//
+template <class T>
+void eval_abs(T& result, const T& arg)
+{
+ typedef typename T::signed_types type_list;
+ typedef typename mpl::front<type_list>::type front;
+ result = arg;
+ if(arg.compare(front(0)) < 0)
+ result.negate();
+}
+template <class T>
+void eval_fabs(T& result, const T& arg)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The fabs function is only valid for floating point types.");
+ typedef typename T::signed_types type_list;
+ typedef typename mpl::front<type_list>::type front;
+ result = arg;
+ if(arg.compare(front(0)) < 0)
+ result.negate();
+}
+
+template <class Backend>
+inline int eval_fpclassify(const Backend& arg)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_floating_point, "The fpclassify function is only valid for floating point types.");
+ return eval_is_zero(arg) ? FP_ZERO : FP_NORMAL;
+}
+
+template <class T>
+inline void eval_fmod(T& result, const T& a, const T& b)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The fmod function is only valid for floating point types.");
+ if((&result == &a) || (&result == &b))
+ {
+ T temp;
+ eval_fmod(temp, a, b);
+ result = temp;
+ return;
+ }
+ switch(eval_fpclassify(a))
+ {
+ case FP_ZERO:
+ result = a;
+ return;
+ case FP_INFINITE:
+ case FP_NAN:
+ result = std::numeric_limits<number<T> >::quiet_NaN().backend();
+ errno = EDOM;
+ return;
+ }
+ switch(eval_fpclassify(b))
+ {
+ case FP_ZERO:
+ case FP_NAN:
+ result = std::numeric_limits<number<T> >::quiet_NaN().backend();
+ errno = EDOM;
+ return;
+ }
+ T n;
+ eval_divide(result, a, b);
+ if(eval_get_sign(result) < 0)
+ eval_ceil(n, result);
+ else
+ eval_floor(n, result);
+ eval_multiply(n, b);
+ eval_subtract(result, a, n);
+}
+template<class T, class A>
+inline typename enable_if<is_arithmetic<A>, void>::type eval_fmod(T& result, const T& x, const A& a)
+{
+ typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
+ typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
+ cast_type c;
+ c = a;
+ eval_fmod(result, x, c);
+}
+
+template<class T, class A>
+inline typename enable_if<is_arithmetic<A>, void>::type eval_fmod(T& result, const A& x, const T& a)
+{
+ typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
+ typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
+ cast_type c;
+ c = x;
+ eval_fmod(result, c, a);
+}
+
+template <class T>
+void eval_round(T& result, const T& a);
+
+template <class T>
+inline void eval_remquo(T& result, const T& a, const T& b, int* pi)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The remquo function is only valid for floating point types.");
+ if((&result == &a) || (&result == &b))
+ {
+ T temp;
+ eval_remquo(temp, a, b, pi);
+ result = temp;
+ return;
+ }
+ T n;
+ eval_divide(result, a, b);
+ eval_round(n, result);
+ eval_convert_to(pi, n);
+ eval_multiply(n, b);
+ eval_subtract(result, a, n);
+}
+template<class T, class A>
+inline typename enable_if<is_arithmetic<A>, void>::type eval_remquo(T& result, const T& x, const A& a, int* pi)
+{
+ typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
+ typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
+ cast_type c;
+ c = a;
+ eval_remquo(result, x, c, pi);
+}
+template<class T, class A>
+inline typename enable_if<is_arithmetic<A>, void>::type eval_remquo(T& result, const A& x, const T& a, int* pi)
+{
+ typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
+ typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
+ cast_type c;
+ c = x;
+ eval_remquo(result, c, a, pi);
+}
+template <class T, class U, class V>
+inline void eval_remainder(T& result, const U& a, const V& b)
+{
+ int i;
+ eval_remquo(result, a, b, &i);
+}
+
+template <class B>
+bool eval_gt(const B& a, const B& b);
+template <class T, class U>
+bool eval_gt(const T& a, const U& b);
+template <class B>
+bool eval_lt(const B& a, const B& b);
+template <class T, class U>
+bool eval_lt(const T& a, const U& b);
+
+template<class T>
+inline void eval_fdim(T& result, const T& a, const T& b)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ static const ui_type zero = 0u;
+ switch(eval_fpclassify(b))
+ {
+ case FP_NAN:
+ case FP_INFINITE:
+ result = zero;
+ return;
+ }
+ switch(eval_fpclassify(a))
+ {
+ case FP_NAN:
+ result = zero;
+ return;
+ case FP_INFINITE:
+ result = a;
+ return;
+ }
+ if(eval_gt(a, b))
+ {
+ eval_subtract(result, a, b);
+ }
+ else
+ result = zero;
+}
+
+template<class T, class A>
+inline typename boost::enable_if_c<boost::is_arithmetic<A>::value>::type eval_fdim(T& result, const T& a, const A& b)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ typedef typename boost::multiprecision::detail::canonical<A, T>::type arithmetic_type;
+ static const ui_type zero = 0u;
+ arithmetic_type canonical_b = b;
+ switch((::boost::math::fpclassify)(b))
+ {
+ case FP_NAN:
+ case FP_INFINITE:
+ result = zero;
+ return;
+ }
+ switch(eval_fpclassify(a))
+ {
+ case FP_NAN:
+ result = zero;
+ return;
+ case FP_INFINITE:
+ result = a;
+ return;
+ }
+ if(eval_gt(a, canonical_b))
+ {
+ eval_subtract(result, a, canonical_b);
+ }
+ else
+ result = zero;
+}
+
+template<class T, class A>
+inline typename boost::enable_if_c<boost::is_arithmetic<A>::value>::type eval_fdim(T& result, const A& a, const T& b)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ typedef typename boost::multiprecision::detail::canonical<A, T>::type arithmetic_type;
+ static const ui_type zero = 0u;
+ arithmetic_type canonical_a = a;
+ switch(eval_fpclassify(b))
+ {
+ case FP_NAN:
+ case FP_INFINITE:
+ result = zero;
+ return;
+ }
+ switch((::boost::math::fpclassify)(a))
+ {
+ case FP_NAN:
+ result = zero;
+ return;
+ case FP_INFINITE:
+ result = std::numeric_limits<number<T> >::infinity().backend();
+ return;
+ }
+ if(eval_gt(canonical_a, b))
+ {
+ eval_subtract(result, canonical_a, b);
+ }
+ else
+ result = zero;
+}
+
+template <class T>
+inline void eval_trunc(T& result, const T& a)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The trunc function is only valid for floating point types.");
+ switch(eval_fpclassify(a))
+ {
+ case FP_NAN:
+ errno = EDOM;
+ // fallthrough...
+ case FP_ZERO:
+ case FP_INFINITE:
+ result = a;
+ return;
+ }
+ if(eval_get_sign(a) < 0)
+ eval_ceil(result, a);
+ else
+ eval_floor(result, a);
+}
+
+template <class T>
+inline void eval_modf(T& result, T const& arg, T* pipart)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ int c = eval_fpclassify(arg);
+ if(c == (int)FP_NAN)
+ {
+ if(pipart)
+ *pipart = arg;
+ result = arg;
+ return;
+ }
+ else if(c == (int)FP_INFINITE)
+ {
+ if(pipart)
+ *pipart = arg;
+ result = ui_type(0u);
+ return;
+ }
+ if(pipart)
+ {
+ eval_trunc(*pipart, arg);
+ eval_subtract(result, arg, *pipart);
+ }
+ else
+ {
+ T ipart;
+ eval_trunc(ipart, arg);
+ eval_subtract(result, arg, ipart);
+ }
+}
+
+template <class T>
+inline void eval_round(T& result, const T& a)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The round function is only valid for floating point types.");
+ typedef typename boost::multiprecision::detail::canonical<float, T>::type fp_type;
+ int c = eval_fpclassify(a);
+ if(c == (int)FP_NAN)
+ {
+ result = a;
+ errno = EDOM;
+ return;
+ }
+ if((c == FP_ZERO) || (c == (int)FP_INFINITE))
+ {
+ result = a;
+ }
+ else if(eval_get_sign(a) < 0)
+ {
+ eval_subtract(result, a, fp_type(0.5f));
+ eval_ceil(result, result);
+ }
+ else
+ {
+ eval_add(result, a, fp_type(0.5f));
+ eval_floor(result, result);
+ }
+}
+
+template <class B>
+void eval_lcm(B& result, const B& a, const B& b);
+template <class B>
+void eval_gcd(B& result, const B& a, const B& b);
+
+template <class T, class Arithmetic>
+inline typename enable_if<is_integral<Arithmetic> >::type eval_gcd(T& result, const T& a, const Arithmetic& b)
+{
+ typedef typename boost::multiprecision::detail::canonical<Arithmetic, T>::type si_type;
+ using default_ops::eval_gcd;
+ T t;
+ t = static_cast<si_type>(b);
+ eval_gcd(result, a, t);
+}
+template <class T, class Arithmetic>
+inline typename enable_if<is_integral<Arithmetic> >::type eval_gcd(T& result, const Arithmetic& a, const T& b)
+{
+ eval_gcd(result, b, a);
+}
+template <class T, class Arithmetic>
+inline typename enable_if<is_integral<Arithmetic> >::type eval_lcm(T& result, const T& a, const Arithmetic& b)
+{
+ typedef typename boost::multiprecision::detail::canonical<Arithmetic, T>::type si_type;
+ using default_ops::eval_lcm;
+ T t;
+ t = static_cast<si_type>(b);
+ eval_lcm(result, a, t);
+}
+template <class T, class Arithmetic>
+inline typename enable_if<is_integral<Arithmetic> >::type eval_lcm(T& result, const Arithmetic& a, const T& b)
+{
+ eval_lcm(result, b, a);
+}
+
+template <class T>
+inline unsigned eval_lsb(const T& val)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ int c = eval_get_sign(val);
+ if(c == 0)
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("No bits were set in the operand."));
+ }
+ if(c < 0)
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
+ }
+ unsigned result = 0;
+ T mask, t;
+ mask = ui_type(1);
+ do
+ {
+ eval_bitwise_and(t, mask, val);
+ ++result;
+ eval_left_shift(mask, 1);
+ }
+ while(eval_is_zero(t));
+
+ return --result;
+}
+
+template <class T>
+inline int eval_msb(const T& val)
+{
+ int c = eval_get_sign(val);
+ if(c == 0)
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("No bits were set in the operand."));
+ }
+ if(c < 0)
+ {
+ BOOST_THROW_EXCEPTION(std::range_error("Testing individual bits in negative values is not supported - results are undefined."));
+ }
+ //
+ // This implementation is really really rubbish - it does
+ // a linear scan for the most-significant-bit. We should really
+ // do a binary search, but as none of our backends actually needs
+ // this implementation, we'll leave it for now. In fact for most
+ // backends it's likely that there will always be a more efficient
+ // native implementation possible.
+ //
+ unsigned result = 0;
+ T t(val);
+ while(!eval_is_zero(t))
+ {
+ eval_right_shift(t, 1);
+ ++result;
+ }
+ return --result;
+}
+
+template <class T>
+inline bool eval_bit_test(const T& val, unsigned index)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ T mask, t;
+ mask = ui_type(1);
+ eval_left_shift(mask, index);
+ eval_bitwise_and(t, mask, val);
+ return !eval_is_zero(t);
+}
+
+template <class T>
+inline void eval_bit_set(T& val, unsigned index)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ T mask;
+ mask = ui_type(1);
+ eval_left_shift(mask, index);
+ eval_bitwise_or(val, mask);
+}
+
+template <class T>
+inline void eval_bit_flip(T& val, unsigned index)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ T mask;
+ mask = ui_type(1);
+ eval_left_shift(mask, index);
+ eval_bitwise_xor(val, mask);
+}
+
+template <class T>
+inline void eval_bit_unset(T& val, unsigned index)
+{
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ T mask, t;
+ mask = ui_type(1);
+ eval_left_shift(mask, index);
+ eval_bitwise_and(t, mask, val);
+ if(!eval_is_zero(t))
+ eval_bitwise_xor(val, mask);
+}
+
+template <class B>
+void eval_integer_sqrt(B& s, B& r, const B& x)
+{
+ //
+ // This is slow bit-by-bit integer square root, see for example
+ // http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Binary_numeral_system_.28base_2.29
+ // There are better methods such as http://hal.inria.fr/docs/00/07/28/54/PDF/RR-3805.pdf
+ // and http://hal.inria.fr/docs/00/07/21/13/PDF/RR-4475.pdf which should be implemented
+ // at some point.
+ //
+ typedef typename boost::multiprecision::detail::canonical<unsigned char, B>::type ui_type;
+
+ s = ui_type(0u);
+ if(eval_get_sign(x) == 0)
+ {
+ r = ui_type(0u);
+ return;
+ }
+ int g = eval_msb(x);
+ if(g <= 1)
+ {
+ s = ui_type(1);
+ eval_subtract(r, x, s);
+ return;
+ }
+
+ B t;
+ r = x;
+ g /= 2;
+ int org_g = g;
+ eval_bit_set(s, g);
+ eval_bit_set(t, 2 * g);
+ eval_subtract(r, x, t);
+ --g;
+ if(eval_get_sign(r) == 0)
+ return;
+ int msbr = eval_msb(r);
+ do
+ {
+ if(msbr >= org_g + g + 1)
+ {
+ t = s;
+ eval_left_shift(t, g + 1);
+ eval_bit_set(t, 2 * g);
+ if(t.compare(r) <= 0)
+ {
+ BOOST_ASSERT(g >= 0);
+ eval_bit_set(s, g);
+ eval_subtract(r, t);
+ if(eval_get_sign(r) == 0)
+ return;
+ msbr = eval_msb(r);
+ }
+ }
+ --g;
+ }
+ while(g >= 0);
+}
+
+template <class B>
+inline void eval_conj(B& result, const B& val)
+{
+ result = val; // assume non-complex result.
+}
+template <class B>
+inline void eval_proj(B& result, const B& val)
+{
+ result = val; // assume non-complex result.
+}
+
+//
+// These have to implemented by the backend, declared here so that our macro generated code compiles OK.
+//
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_floor();
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_ceil();
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_trunc();
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_sqrt();
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_ldexp();
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_frexp();
+// TODO implement default versions of these:
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_asinh();
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_acosh();
+template <class T>
+typename enable_if_c<sizeof(T) == 0>::type eval_atanh();
+
+//
+// eval_logb and eval_scalbn simply assume base 2 and forward to
+// eval_ldexp and eval_frexp:
+//
+template <class B>
+inline typename B::exponent_type eval_ilogb(const B& val)
+{
+ BOOST_STATIC_ASSERT_MSG(!std::numeric_limits<number<B> >::is_specialized || (std::numeric_limits<number<B> >::radix == 2), "The default implementation of ilogb requires a base 2 number type");
+ typename B::exponent_type e;
+ switch(eval_fpclassify(val))
+ {
+ case FP_NAN:
+#ifdef FP_ILOGBNAN
+ return FP_ILOGBNAN > 0 ? (std::numeric_limits<typename B::exponent_type>::max)() : (std::numeric_limits<typename B::exponent_type>::min)();
+#else
+ return (std::numeric_limits<typename B::exponent_type>::max)();
+#endif
+ case FP_INFINITE:
+ return (std::numeric_limits<typename B::exponent_type>::max)();
+ case FP_ZERO:
+ return (std::numeric_limits<typename B::exponent_type>::min)();
+ }
+ B result;
+ eval_frexp(result, val, &e);
+ return e - 1;
+}
+
+template <class T>
+int eval_signbit(const T& val);
+
+template <class B>
+inline void eval_logb(B& result, const B& val)
+{
+ switch(eval_fpclassify(val))
+ {
+ case FP_NAN:
+ result = val;
+ errno = EDOM;
+ return;
+ case FP_ZERO:
+ result = std::numeric_limits<number<B> >::infinity().backend();
+ result.negate();
+ errno = ERANGE;
+ return;
+ case FP_INFINITE:
+ result = val;
+ if(eval_signbit(val))
+ result.negate();
+ return;
+ }
+ typedef typename boost::mpl::if_c<boost::is_same<boost::intmax_t, long>::value, boost::long_long_type, boost::intmax_t>::type max_t;
+ result = static_cast<max_t>(eval_ilogb(val));
+}
+template <class B, class A>
+inline void eval_scalbn(B& result, const B& val, A e)
+{
+ BOOST_STATIC_ASSERT_MSG(!std::numeric_limits<number<B> >::is_specialized || (std::numeric_limits<number<B> >::radix == 2), "The default implementation of scalbn requires a base 2 number type");
+ eval_ldexp(result, val, static_cast<typename B::exponent_type>(e));
+}
+template <class B, class A>
+inline void eval_scalbln(B& result, const B& val, A e)
+{
+ eval_scalbn(result, val, e);
+}
+
+template <class T>
+inline bool is_arg_nan(const T& val, mpl::true_ const&, const mpl::false_&)
+{
+ return eval_fpclassify(val) == FP_NAN;
+}
+template <class T>
+inline bool is_arg_nan(const T& val, mpl::false_ const&, const mpl::true_&)
+{
+ return (boost::math::isnan)(val);
+}
+template <class T>
+inline bool is_arg_nan(const T&, mpl::false_ const&, const mpl::false_&)
+{
+ return false;
+}
+
+template <class T>
+inline bool is_arg_nan(const T& val)
+{
+ return is_arg_nan(val, mpl::bool_<boost::multiprecision::detail::is_backend<T>::value>(), is_floating_point<T>());
+}
+
+template <class T, class U, class V>
+inline void eval_fmax(T& result, const U& a, const V& b)
+{
+ if(is_arg_nan(a))
+ result = number<T>::canonical_value(b);
+ else if(is_arg_nan(b))
+ result = number<T>::canonical_value(a);
+ else if(eval_lt(number<T>::canonical_value(a), number<T>::canonical_value(b)))
+ result = number<T>::canonical_value(b);
+ else
+ result = number<T>::canonical_value(a);
+}
+template <class T, class U, class V>
+inline void eval_fmin(T& result, const U& a, const V& b)
+{
+ if(is_arg_nan(a))
+ result = number<T>::canonical_value(b);
+ else if(is_arg_nan(b))
+ result = number<T>::canonical_value(a);
+ else if(eval_lt(number<T>::canonical_value(a), number<T>::canonical_value(b)))
+ result = number<T>::canonical_value(a);
+ else
+ result = number<T>::canonical_value(b);
+}
+
+template <class R, class T, class U>
+inline void eval_hypot(R& result, const T& a, const U& b)
+{
+ //
+ // Normalize x and y, so that both are positive and x >= y:
+ //
+ R x, y;
+ x = number<R>::canonical_value(a);
+ y = number<R>::canonical_value(b);
+ if(eval_get_sign(x) < 0)
+ x.negate();
+ if(eval_get_sign(y) < 0)
+ y.negate();
+
+ // Special case, see C99 Annex F.
+ // The order of the if's is important: do not change!
+ int c1 = eval_fpclassify(x);
+ int c2 = eval_fpclassify(y);
+
+ if(c1 == FP_ZERO)
+ {
+ result = y;
+ return;
+ }
+ if(c2 == FP_ZERO)
+ {
+ result = x;
+ return;
+ }
+ if(c1 == FP_INFINITE)
+ {
+ result = x;
+ return;
+ }
+ if((c2 == FP_INFINITE) || (c2 == FP_NAN))
+ {
+ result = y;
+ return;
+ }
+ if(c1 == FP_NAN)
+ {
+ result = x;
+ return;
+ }
+
+ if(eval_gt(y, x))
+ x.swap(y);
+
+ eval_multiply(result, x, std::numeric_limits<number<R> >::epsilon().backend());
+
+ if(eval_gt(result, y))
+ {
+ result = x;
+ return;
+ }
+
+ R rat;
+ eval_divide(rat, y, x);
+ eval_multiply(result, rat, rat);
+ eval_increment(result);
+ eval_sqrt(rat, result);
+ eval_multiply(result, rat, x);
+}
+
+template <class R, class T>
+inline void eval_nearbyint(R& result, const T& a)
+{
+ eval_round(result, a);
+}
+template <class R, class T>
+inline void eval_rint(R& result, const T& a)
+{
+ eval_nearbyint(result, a);
+}
+
+template <class T>
+inline int eval_signbit(const T& val)
+{
+ return eval_get_sign(val) < 0 ? 1 : 0;
+}
+
+//
+// Real and imaginary parts:
+//
+template <class To, class From>
+inline void eval_real(To& to, const From& from)
+{
+ to = from;
+}
+template <class To, class From>
+inline void eval_imag(To& to, const From& )
+{
+ typedef typename mpl::front<typename To::unsigned_types>::type ui_type;
+ to = ui_type(0);
+}
+
+} namespace default_ops_adl {
+
+template <class To, class From>
+inline void eval_set_real_imp(To& to, const From& from)
+{
+ typedef typename component_type<number<To> >::type to_component_type;
+ typename to_component_type::backend_type to_component;
+ to_component = from;
+ eval_set_real(to, to_component);
+}
+template <class To, class From>
+inline void eval_set_imag_imp(To& to, const From& from)
+{
+ typedef typename component_type<number<To> >::type to_component_type;
+ typename to_component_type::backend_type to_component;
+ to_component = from;
+ eval_set_imag(to, to_component);
+}
+
+} namespace default_ops{
+
+template <class To, class From>
+inline typename enable_if_c<number_category<To>::value == number_kind_complex>::type eval_set_real(To& to, const From& from)
+{
+ default_ops_adl::eval_set_real_imp(to, from);
+}
+template <class To, class From>
+inline typename disable_if_c<number_category<To>::value == number_kind_complex>::type eval_set_real(To& to, const From& from)
+{
+ to = from;
+}
+
+template <class To, class From>
+inline void eval_set_imag(To& to, const From& from)
+{
+ default_ops_adl::eval_set_imag_imp(to, from);
+}
+
+template <class T>
+inline void eval_set_real(T& to, const T& from)
+{
+ to = from;
+}
+template <class T>
+void eval_set_imag(T&, const T&)
+{
+ BOOST_STATIC_ASSERT_MSG(sizeof(T) == INT_MAX, "eval_set_imag needs to be specialised for each specific backend");
+}
+
+//
+// These functions are implemented in separate files, but expanded inline here,
+// DO NOT CHANGE THE ORDER OF THESE INCLUDES:
+//
+#include <boost/multiprecision/detail/functions/constants.hpp>
+#include <boost/multiprecision/detail/functions/pow.hpp>
+#include <boost/multiprecision/detail/functions/trig.hpp>
+
+}
+
+//
+// Default versions of floating point classification routines:
+//
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline int fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ using multiprecision::default_ops::eval_fpclassify;
+ return eval_fpclassify(arg.backend());
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline int fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline bool isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ int v = fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(arg);
+ return (v != (int)FP_INFINITE) && (v != (int)FP_NAN);
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline bool isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return isfinite BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline bool isnan BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(arg) == (int)FP_NAN;
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline bool isnan BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return isnan BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline bool isinf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(arg) == (int)FP_INFINITE;
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline bool isinf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return isinf BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline bool isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ return fpclassify BOOST_PREVENT_MACRO_SUBSTITUTION(arg) == (int)FP_NORMAL;
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline bool isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return isnormal BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
+}
+
+// Default versions of sign manipulation functions, if individual backends can do better than this
+// (for example with signed zero), then they should overload these functions further:
+
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline int sign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ return arg.sign();
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline int sign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return sign BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
+}
+
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ using default_ops::eval_signbit;
+ return eval_signbit(arg.backend());
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline int signbit BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return signbit BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline multiprecision::number<Backend, ExpressionTemplates> changesign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+{
+ return -arg;
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type changesign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return changesign BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(arg));
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline multiprecision::number<Backend, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
+{
+ return (boost::multiprecision::signbit)(a) != (boost::multiprecision::signbit)(b) ? (boost::multiprecision::changesign)(a) : a;
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
+inline multiprecision::number<Backend, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b)
+{
+ return copysign BOOST_PREVENT_MACRO_SUBSTITUTION(a, multiprecision::number<Backend, ExpressionTemplates>(b));
+}
+template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline multiprecision::number<Backend, ExpressionTemplates> copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
+{
+ return copysign BOOST_PREVENT_MACRO_SUBSTITUTION(multiprecision::number<Backend, ExpressionTemplates>(a), b);
+}
+template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
+inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type copysign BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ return copysign BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(a), value_type(b));
+}
+//
+// real and imag:
+//
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type
+ real(const multiprecision::number<Backend, ExpressionTemplates>& a)
+{
+ using default_ops::eval_real;
+ typedef typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result_type;
+ boost::multiprecision::detail::scoped_default_precision<result_type> precision_guard(a);
+ result_type result;
+ eval_real(result.backend(), a.backend());
+ return result;
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type
+ imag(const multiprecision::number<Backend, ExpressionTemplates>& a)
+{
+ using default_ops::eval_imag;
+ typedef typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result_type;
+ boost::multiprecision::detail::scoped_default_precision<result_type> precision_guard(a);
+ result_type result;
+ eval_imag(result.backend(), a.backend());
+ return result;
+}
+
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename scalar_result_from_possible_complex<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+ real(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return real(value_type(arg));
+}
+
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename scalar_result_from_possible_complex<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+ imag(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return imag(value_type(arg));
+}
+
+//
+// Complex number functions, these are overloaded at the Backend level, we just provide the
+// expression template versions here, plus overloads for non-complex types:
+//
+template <class T, expression_template_option ExpressionTemplates>
+inline typename boost::lazy_enable_if_c<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates> > >::type
+ abs(const number<T, ExpressionTemplates>& v)
+{
+ return BOOST_MP_MOVE(boost::math::hypot(real(v), imag(v)));
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename boost::lazy_enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex, component_type<typename detail::expression<tag, A1, A2, A3, A4>::result_type> >::type
+ abs(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(abs(static_cast<number_type>(v)));
+}
+
+template <class T, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<T>::value == number_kind_complex, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type>::type
+arg(const number<T, ExpressionTemplates>& v)
+{
+ return BOOST_MP_MOVE(atan2(imag(v), real(v)));
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type>::type
+arg(const number<T, ExpressionTemplates>&)
+{
+ return 0;
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex || number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename scalar_result_from_possible_complex<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type>::type
+arg(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(arg(static_cast<number_type>(v)));
+}
+
+template <class T, expression_template_option ExpressionTemplates>
+inline typename boost::lazy_enable_if_c<number_category<T>::value == number_kind_complex, component_type<number<T, ExpressionTemplates> > >::type
+norm(const number<T, ExpressionTemplates>& v)
+{
+ typename component_type<number<T, ExpressionTemplates> >::type a(real(v)), b(imag(v));
+ return BOOST_MP_MOVE(a * a + b * b);
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline typename boost::enable_if_c<number_category<T>::value != number_kind_complex, typename scalar_result_from_possible_complex<number<T, ExpressionTemplates> >::type >::type
+norm(const number<T, ExpressionTemplates>& v)
+{
+ return v * v;
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename scalar_result_from_possible_complex<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+norm(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(norm(static_cast<number_type>(v)));
+}
+
+template <class Backend, expression_template_option ExpressionTemplates>
+typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type polar(number<Backend, ExpressionTemplates> const& r, number<Backend, ExpressionTemplates> const& theta)
+{
+ return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta)));
+}
+
+template <class tag, class A1, class A2, class A3, class A4, class Backend, expression_template_option ExpressionTemplates>
+typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, ExpressionTemplates> >::value,
+ typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type
+ polar(detail::expression<tag, A1, A2, A3, A4> const& r, number<Backend, ExpressionTemplates> const& theta)
+{
+ return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta)));
+}
+
+template <class Backend, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
+typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, ExpressionTemplates> >::value,
+ typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type
+ polar(number<Backend, ExpressionTemplates> const& r, detail::expression<tag, A1, A2, A3, A4> const& theta)
+{
+ return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta)));
+}
+
+template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
+typename enable_if_c<boost::is_same<typename detail::expression<tag, A1, A2, A3, A4>::result_type, typename detail::expression<tagb, A1b, A2b, A3b, A4b>::result_type >::value,
+ typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type >::type>::type
+ polar(detail::expression<tag, A1, A2, A3, A4> const& r, detail::expression<tagb, A1b, A2b, A3b, A4b> const& theta)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type scalar_type;
+ return typename complex_result_from_scalar<scalar_type>::type(scalar_type(r * cos(theta)), scalar_type(r * sin(theta)));
+}
+//
+// We also allow the first argument to polar to be an arithmetic type (probably a literal):
+//
+template <class Scalar, class Backend, expression_template_option ExpressionTemplates>
+typename boost::enable_if_c<boost::is_arithmetic<Scalar>::value, typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type>::type
+ polar(Scalar const& r, number<Backend, ExpressionTemplates> const& theta)
+{
+ return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(number<Backend, ExpressionTemplates>(r * cos(theta)), number<Backend, ExpressionTemplates>(r * sin(theta)));
+}
+
+template <class tag, class A1, class A2, class A3, class A4, class Scalar>
+typename enable_if_c<boost::is_arithmetic<Scalar>::value,
+ typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type>::type
+ polar(Scalar const& r, detail::expression<tag, A1, A2, A3, A4> const& theta)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type scalar_type;
+ return typename complex_result_from_scalar<scalar_type>::type(scalar_type(r * cos(theta)), scalar_type(r * sin(theta)));
+}
+//
+// Single argument overloads:
+//
+template <class Backend, expression_template_option ExpressionTemplates>
+typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type polar(number<Backend, ExpressionTemplates> const& r)
+{
+ return typename complex_result_from_scalar<number<Backend, ExpressionTemplates> >::type(r);
+}
+
+template <class tag, class A1, class A2, class A3, class A4>
+typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+ polar(detail::expression<tag, A1, A2, A3, A4> const& r)
+{
+ return typename complex_result_from_scalar<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type(r);
+}
+
+
+
+} // namespace multiprecision
+
+namespace math {
+
+ //
+ // Import Math functions here, so they can be found by Boost.Math:
+ //
+ using boost::multiprecision::signbit;
+ using boost::multiprecision::sign;
+ using boost::multiprecision::copysign;
+ using boost::multiprecision::changesign;
+ using boost::multiprecision::fpclassify;
+ using boost::multiprecision::isinf;
+ using boost::multiprecision::isnan;
+ using boost::multiprecision::isnormal;
+ using boost::multiprecision::isfinite;
+
+}
+
+namespace multiprecision{
+
+ typedef ::boost::math::policies::policy<
+ ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>,
+ ::boost::math::policies::pole_error< ::boost::math::policies::errno_on_error>,
+ ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>,
+ ::boost::math::policies::evaluation_error< ::boost::math::policies::errno_on_error>,
+ ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error>
+ > c99_error_policy;
+
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type
+ asinh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ return boost::math::asinh(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+ asinh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type > precision_guard(arg);
+ return asinh(value_type(arg));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type
+ acosh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ return boost::math::acosh(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+ acosh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type > precision_guard(arg);
+ return acosh(value_type(arg));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline typename boost::enable_if_c<number_category<Backend>::value != number_kind_complex, multiprecision::number<Backend, ExpressionTemplates> >::type
+ atanh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ return boost::math::atanh(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename boost::enable_if_c<number_category<typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::value != number_kind_complex, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+ atanh BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type > precision_guard(arg);
+ return atanh(value_type(arg));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ return boost::math::cbrt(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type cbrt BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return cbrt(value_type(arg));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> erf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ return boost::math::erf(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type erf BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return erf(value_type(arg));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> erfc BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ return boost::math::erfc(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type erfc BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return erfc(value_type(arg));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ return boost::math::expm1(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type expm1 BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return expm1(value_type(arg));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ multiprecision::number<Backend, ExpressionTemplates> result;
+ result = boost::math::lgamma(arg, c99_error_policy());
+ if((boost::multiprecision::isnan)(result) && !(boost::multiprecision::isnan)(arg))
+ {
+ result = std::numeric_limits<multiprecision::number<Backend, ExpressionTemplates> >::infinity();
+ errno = ERANGE;
+ }
+ return result;
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type lgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return lgamma(value_type(arg));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ if((arg == 0) && std::numeric_limits<multiprecision::number<Backend, ExpressionTemplates> >::has_infinity)
+ {
+ errno = ERANGE;
+ return 1 / arg;
+ }
+ return boost::math::tgamma(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type tgamma BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return tgamma(value_type(arg));
+ }
+
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline long lrint BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ return lround(arg);
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline long lrint BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ return lround(arg);
+ }
+#ifndef BOOST_NO_LONG_LONG
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline boost::long_long_type llrint BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ return llround(arg);
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline boost::long_long_type llrint BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ return llround(arg);
+ }
+#endif
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> log1p BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& arg)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(arg);
+ return boost::math::log1p(arg, c99_error_policy());
+ }
+ template <class tag, class A1, class A2, class A3, class A4>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type log1p BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& arg)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(arg);
+ return log1p(value_type(arg));
+ }
+
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b);
+ return boost::math::nextafter(a, b, c99_error_policy());
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
+ inline multiprecision::number<Backend, ExpressionTemplates> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b);
+ return nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(a, multiprecision::number<Backend, ExpressionTemplates>(b));
+ }
+ template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b);
+ return nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(multiprecision::number<Backend, ExpressionTemplates>(a), b);
+ }
+ template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(a, b);
+ return nextafter BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(a), value_type(b));
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b);
+ return boost::math::nextafter(a, b, c99_error_policy());
+ }
+ template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
+ inline multiprecision::number<Backend, ExpressionTemplates> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::number<Backend, ExpressionTemplates>& a, const multiprecision::detail::expression<tag, A1, A2, A3, A4>& b)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b);
+ return nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(a, multiprecision::number<Backend, ExpressionTemplates>(b));
+ }
+ template <class tag, class A1, class A2, class A3, class A4, class Backend, multiprecision::expression_template_option ExpressionTemplates>
+ inline multiprecision::number<Backend, ExpressionTemplates> nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::number<Backend, ExpressionTemplates>& b)
+ {
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(a, b);
+ return nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(multiprecision::number<Backend, ExpressionTemplates>(a), b);
+ }
+ template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b>
+ inline typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(const multiprecision::detail::expression<tag, A1, A2, A3, A4>& a, const multiprecision::detail::expression<tagb, A1b, A2b, A3b, A4b>& b)
+ {
+ typedef typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type value_type;
+ detail::scoped_default_precision<value_type> precision_guard(a, b);
+ return nexttoward BOOST_PREVENT_MACRO_SUBSTITUTION(value_type(a), value_type(b));
+ }
+
+template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3>
+inline number<B1, ET1>& add(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b)
+{
+ BOOST_STATIC_ASSERT_MSG((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists");
+ BOOST_STATIC_ASSERT_MSG((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists");
+ using default_ops::eval_add;
+ eval_add(result.backend(), a.backend(), b.backend());
+ return result;
+}
+
+template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3>
+inline number<B1, ET1>& subtract(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b)
+{
+ BOOST_STATIC_ASSERT_MSG((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists");
+ BOOST_STATIC_ASSERT_MSG((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists");
+ using default_ops::eval_subtract;
+ eval_subtract(result.backend(), a.backend(), b.backend());
+ return result;
+}
+
+template <class B1, class B2, class B3, expression_template_option ET1, expression_template_option ET2, expression_template_option ET3>
+inline number<B1, ET1>& multiply(number<B1, ET1>& result, const number<B2, ET2>& a, const number<B3, ET3>& b)
+{
+ BOOST_STATIC_ASSERT_MSG((is_convertible<B2, B1>::value), "No conversion to the target of a mixed precision addition exists");
+ BOOST_STATIC_ASSERT_MSG((is_convertible<B3, B1>::value), "No conversion to the target of a mixed precision addition exists");
+ using default_ops::eval_multiply;
+ eval_multiply(result.backend(), a.backend(), b.backend());
+ return result;
+}
+
+template <class B, expression_template_option ET, class I>
+inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type
+ add(number<B, ET>& result, const I& a, const I& b)
+{
+ using default_ops::eval_add;
+ typedef typename detail::canonical<I, B>::type canonical_type;
+ eval_add(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b));
+ return result;
+}
+
+template <class B, expression_template_option ET, class I>
+inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type
+ subtract(number<B, ET>& result, const I& a, const I& b)
+{
+ using default_ops::eval_subtract;
+ typedef typename detail::canonical<I, B>::type canonical_type;
+ eval_subtract(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b));
+ return result;
+}
+
+template <class B, expression_template_option ET, class I>
+inline typename enable_if_c<is_integral<I>::value, number<B, ET>&>::type
+ multiply(number<B, ET>& result, const I& a, const I& b)
+{
+ using default_ops::eval_multiply;
+ typedef typename detail::canonical<I, B>::type canonical_type;
+ eval_multiply(result.backend(), static_cast<canonical_type>(a), static_cast<canonical_type>(b));
+ return result;
+}
+
+template <class tag, class A1, class A2, class A3, class A4, class Policy>
+inline typename detail::expression<tag, A1, A2, A3, A4>::result_type trunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(trunc(number_type(v), pol));
+}
+
+template <class Backend, expression_template_option ExpressionTemplates, class Policy>
+inline number<Backend, ExpressionTemplates> trunc(const number<Backend, ExpressionTemplates>& v, const Policy&)
+{
+ using default_ops::eval_trunc;
+ detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(v);
+ number<Backend, ExpressionTemplates> result;
+ eval_trunc(result.backend(), v.backend());
+ return BOOST_MP_MOVE(result);
+}
+
+template <class tag, class A1, class A2, class A3, class A4, class Policy>
+inline int itrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ number_type r(trunc(v, pol));
+ if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::itrunc<%1%>(%1%)", 0, number_type(v), 0, pol);
+ return r.template convert_to<int>();
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline int itrunc(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ return itrunc(v, boost::math::policies::policy<>());
+}
+template <class Backend, expression_template_option ExpressionTemplates, class Policy>
+inline int itrunc(const number<Backend, ExpressionTemplates>& v, const Policy& pol)
+{
+ number<Backend, ExpressionTemplates> r(trunc(v, pol));
+ if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::itrunc<%1%>(%1%)", 0, v, 0, pol);
+ return r.template convert_to<int>();
+}
+template <class Backend, expression_template_option ExpressionTemplates>
+inline int itrunc(const number<Backend, ExpressionTemplates>& v)
+{
+ return itrunc(v, boost::math::policies::policy<>());
+}
+template <class tag, class A1, class A2, class A3, class A4, class Policy>
+inline long ltrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ number_type r(trunc(v, pol));
+ if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::ltrunc<%1%>(%1%)", 0, number_type(v), 0L, pol);
+ return r.template convert_to<long>();
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline long ltrunc(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ return ltrunc(v, boost::math::policies::policy<>());
+}
+template <class T, expression_template_option ExpressionTemplates, class Policy>
+inline long ltrunc(const number<T, ExpressionTemplates>& v, const Policy& pol)
+{
+ number<T, ExpressionTemplates> r(trunc(v, pol));
+ if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::ltrunc<%1%>(%1%)", 0, v, 0L, pol);
+ return r.template convert_to<long>();
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline long ltrunc(const number<T, ExpressionTemplates>& v)
+{
+ return ltrunc(v, boost::math::policies::policy<>());
+}
+#ifndef BOOST_NO_LONG_LONG
+template <class tag, class A1, class A2, class A3, class A4, class Policy>
+inline boost::long_long_type lltrunc(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ number_type r(trunc(v, pol));
+ if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::lltrunc<%1%>(%1%)", 0, number_type(v), 0LL, pol);
+ return r.template convert_to<boost::long_long_type>();
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline boost::long_long_type lltrunc(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ return lltrunc(v, boost::math::policies::policy<>());
+}
+template <class T, expression_template_option ExpressionTemplates, class Policy>
+inline boost::long_long_type lltrunc(const number<T, ExpressionTemplates>& v, const Policy& pol)
+{
+ number<T, ExpressionTemplates> r(trunc(v, pol));
+ if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::lltrunc<%1%>(%1%)", 0, v, 0LL, pol);
+ return r.template convert_to<boost::long_long_type>();
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline boost::long_long_type lltrunc(const number<T, ExpressionTemplates>& v)
+{
+ return lltrunc(v, boost::math::policies::policy<>());
+}
+#endif
+template <class tag, class A1, class A2, class A3, class A4, class Policy>
+inline typename detail::expression<tag, A1, A2, A3, A4>::result_type round(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(round(static_cast<number_type>(v), pol));
+}
+template <class T, expression_template_option ExpressionTemplates, class Policy>
+inline number<T, ExpressionTemplates> round(const number<T, ExpressionTemplates>& v, const Policy&)
+{
+ using default_ops::eval_round;
+ detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v);
+ number<T, ExpressionTemplates> result;
+ eval_round(result.backend(), v.backend());
+ return BOOST_MP_MOVE(result);
+}
+
+template <class tag, class A1, class A2, class A3, class A4, class Policy>
+inline int iround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ number_type r(round(v, pol));
+ if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, number_type(v), 0, pol);
+ return r.template convert_to<int>();
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline int iround(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ return iround(v, boost::math::policies::policy<>());
+}
+template <class T, expression_template_option ExpressionTemplates, class Policy>
+inline int iround(const number<T, ExpressionTemplates>& v, const Policy& pol)
+{
+ number<T, ExpressionTemplates> r(round(v, pol));
+ if((r > (std::numeric_limits<int>::max)()) || r < (std::numeric_limits<int>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, v, 0, pol);
+ return r.template convert_to<int>();
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline int iround(const number<T, ExpressionTemplates>& v)
+{
+ return iround(v, boost::math::policies::policy<>());
+}
+template <class tag, class A1, class A2, class A3, class A4, class Policy>
+inline long lround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ number_type r(round(v, pol));
+ if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::lround<%1%>(%1%)", 0, number_type(v), 0L, pol);
+ return r.template convert_to<long>();
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline long lround(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ return lround(v, boost::math::policies::policy<>());
+}
+template <class T, expression_template_option ExpressionTemplates, class Policy>
+inline long lround(const number<T, ExpressionTemplates>& v, const Policy& pol)
+{
+ number<T, ExpressionTemplates> r(round(v, pol));
+ if((r > (std::numeric_limits<long>::max)()) || r < (std::numeric_limits<long>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::lround<%1%>(%1%)", 0, v, 0L, pol);
+ return r.template convert_to<long>();
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline long lround(const number<T, ExpressionTemplates>& v)
+{
+ return lround(v, boost::math::policies::policy<>());
+}
+#ifndef BOOST_NO_LONG_LONG
+template <class tag, class A1, class A2, class A3, class A4, class Policy>
+inline boost::long_long_type llround(const detail::expression<tag, A1, A2, A3, A4>& v, const Policy& pol)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ number_type r(round(v, pol));
+ if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, number_type(v), 0LL, pol);
+ return r.template convert_to<boost::long_long_type>();
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline boost::long_long_type llround(const detail::expression<tag, A1, A2, A3, A4>& v)
+{
+ return llround(v, boost::math::policies::policy<>());
+}
+template <class T, expression_template_option ExpressionTemplates, class Policy>
+inline boost::long_long_type llround(const number<T, ExpressionTemplates>& v, const Policy& pol)
+{
+ number<T, ExpressionTemplates> r(round(v, pol));
+ if((r > (std::numeric_limits<boost::long_long_type>::max)()) || r < (std::numeric_limits<boost::long_long_type>::min)() || !(boost::math::isfinite)(v))
+ return boost::math::policies::raise_rounding_error("boost::multiprecision::iround<%1%>(%1%)", 0, v, 0LL, pol);
+ return r.template convert_to<boost::long_long_type>();
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline boost::long_long_type llround(const number<T, ExpressionTemplates>& v)
+{
+ return llround(v, boost::math::policies::policy<>());
+}
+#endif
+//
+// frexp does not return an expression template since we require the
+// integer argument to be evaluated even if the returned value is
+// not assigned to anything...
+//
+template <class T, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, short* pint)
+{
+ using default_ops::eval_frexp;
+ detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v);
+ number<T, ExpressionTemplates> result;
+ eval_frexp(result.backend(), v.backend(), pint);
+ return BOOST_MP_MOVE(result);
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+ frexp(const detail::expression<tag, A1, A2, A3, A4>& v, short* pint)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, int* pint)
+{
+ using default_ops::eval_frexp;
+ detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v);
+ number<T, ExpressionTemplates> result;
+ eval_frexp(result.backend(), v.backend(), pint);
+ return BOOST_MP_MOVE(result);
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+frexp(const detail::expression<tag, A1, A2, A3, A4>& v, int* pint)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, long* pint)
+{
+ using default_ops::eval_frexp;
+ detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v);
+ number<T, ExpressionTemplates> result;
+ eval_frexp(result.backend(), v.backend(), pint);
+ return BOOST_MP_MOVE(result);
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+frexp(const detail::expression<tag, A1, A2, A3, A4>& v, long* pint)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
+}
+template <class T, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type frexp(const number<T, ExpressionTemplates>& v, boost::long_long_type* pint)
+{
+ using default_ops::eval_frexp;
+ detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v);
+ number<T, ExpressionTemplates> result;
+ eval_frexp(result.backend(), v.backend(), pint);
+ return BOOST_MP_MOVE(result);
+}
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename enable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_floating_point, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::type
+frexp(const detail::expression<tag, A1, A2, A3, A4>& v, boost::long_long_type* pint)
+{
+ typedef typename detail::expression<tag, A1, A2, A3, A4>::result_type number_type;
+ return BOOST_MP_MOVE(frexp(static_cast<number_type>(v), pint));
+}
+//
+// modf does not return an expression template since we require the
+// second argument to be evaluated even if the returned value is
+// not assigned to anything...
+//
+template <class T, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type modf(const number<T, ExpressionTemplates>& v, number<T, ExpressionTemplates>* pipart)
+{
+ using default_ops::eval_modf;
+ detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v);
+ number<T, ExpressionTemplates> result;
+ eval_modf(result.backend(), v.backend(), pipart ? &pipart->backend() : 0);
+ return BOOST_MP_MOVE(result);
+}
+template <class T, expression_template_option ExpressionTemplates, class tag, class A1, class A2, class A3, class A4>
+inline typename enable_if_c<number_category<T>::value == number_kind_floating_point, number<T, ExpressionTemplates> >::type modf(const detail::expression<tag, A1, A2, A3, A4>& v, number<T, ExpressionTemplates>* pipart)
+{
+ using default_ops::eval_modf;
+ detail::scoped_default_precision<multiprecision::number<T, ExpressionTemplates> > precision_guard(v);
+ number<T, ExpressionTemplates> result, arg(v);
+ eval_modf(result.backend(), arg.backend(), pipart ? &pipart->backend() : 0);
+ return BOOST_MP_MOVE(result);
+}
+
+//
+// Integer square root:
+//
+template <class B, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, ExpressionTemplates> >::type
+ sqrt(const number<B, ExpressionTemplates>& x)
+{
+ using default_ops::eval_integer_sqrt;
+ number<B, ExpressionTemplates> s, r;
+ eval_integer_sqrt(s.backend(), r.backend(), x.backend());
+ return s;
+}
+//
+// fma:
+//
+
+namespace default_ops {
+
+ struct fma_func
+ {
+ template <class B, class T, class U, class V>
+ void operator()(B& result, const T& a, const U& b, const V& c)const
+ {
+ eval_multiply_add(result, a, b, c);
+ }
+ };
+
+
+}
+
+template <class Backend, class U, class V>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>,
+ mpl::or_<
+ is_number<U>,
+ is_number_expression<U>,
+ is_arithmetic<U>
+ >,
+ mpl::or_<
+ is_number<V>,
+ is_number_expression<V>,
+ is_arithmetic<V>
+ >
+ >,
+ detail::expression<detail::function, default_ops::fma_func, number<Backend, et_on>, U, V>
+>::type
+fma(const number<Backend, et_on>& a, const U& b, const V& c)
+{
+ return detail::expression<detail::function, default_ops::fma_func, number<Backend, et_on>, U, V>(
+ default_ops::fma_func(), a, b, c);
+}
+
+template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class U, class V>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>,
+ mpl::or_<
+ is_number<U>,
+ is_number_expression<U>,
+ is_arithmetic<U>
+ >,
+ mpl::or_<
+ is_number<V>,
+ is_number_expression<V>,
+ is_arithmetic<V>
+ >
+ >,
+ detail::expression<detail::function, default_ops::fma_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, V>
+>::type
+fma(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const U& b, const V& c)
+{
+ return detail::expression<detail::function, default_ops::fma_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, V>(
+ default_ops::fma_func(), a, b, c);
+}
+
+template <class Backend, class U, class V>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>,
+ mpl::or_<
+ is_number<U>,
+ is_number_expression<U>,
+ is_arithmetic<U>
+ >,
+ mpl::or_<
+ is_number<V>,
+ is_number_expression<V>,
+ is_arithmetic<V>
+ >
+ >,
+ number<Backend, et_off>
+>::type
+fma(const number<Backend, et_off>& a, const U& b, const V& c)
+{
+ using default_ops::eval_multiply_add;
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b, c);
+ number<Backend, et_off> result;
+ eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c));
+ return BOOST_MP_MOVE(result);
+}
+
+template <class U, class Backend, class V>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>,
+ is_arithmetic<U>,
+ mpl::or_<
+ is_number<V>,
+ is_number_expression<V>,
+ is_arithmetic<V>
+ >
+ >,
+ detail::expression<detail::function, default_ops::fma_func, U, number<Backend, et_on>, V>
+>::type
+fma(const U& a, const number<Backend, et_on>& b, const V& c)
+{
+ return detail::expression<detail::function, default_ops::fma_func, U, number<Backend, et_on>, V>(
+ default_ops::fma_func(), a, b, c);
+}
+
+template <class U, class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>,
+ is_arithmetic<U>,
+ mpl::or_<
+ is_number<V>,
+ is_number_expression<V>,
+ is_arithmetic<V>
+ >
+ >,
+ detail::expression<detail::function, default_ops::fma_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>
+>::type
+fma(const U& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b, const V& c)
+{
+ return detail::expression<detail::function, default_ops::fma_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V>(
+ default_ops::fma_func(), a, b, c);
+}
+
+template <class U, class Backend, class V>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>,
+ is_arithmetic<U>,
+ mpl::or_<
+ is_number<V>,
+ is_number_expression<V>,
+ is_arithmetic<V>
+ >
+ >,
+ number<Backend, et_off>
+>::type
+fma(const U& a, const number<Backend, et_off>& b, const V& c)
+{
+ using default_ops::eval_multiply_add;
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b, c);
+ number<Backend, et_off> result;
+ eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c));
+ return BOOST_MP_MOVE(result);
+}
+
+template <class U, class V, class Backend>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<number<Backend, et_on> >::value == number_kind_floating_point>,
+ is_arithmetic<U>,
+ is_arithmetic<V>
+ >,
+ detail::expression<detail::function, default_ops::fma_func, U, V, number<Backend, et_on> >
+>::type
+fma(const U& a, const V& b, const number<Backend, et_on>& c)
+{
+ return detail::expression<detail::function, default_ops::fma_func, U, V, number<Backend, et_on> >(
+ default_ops::fma_func(), a, b, c);
+}
+
+template <class U, class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point>,
+ is_arithmetic<U>,
+ is_arithmetic<V>
+ >,
+ detail::expression<detail::function, default_ops::fma_func, U, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
+>::type
+fma(const U& a, const V& b, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& c)
+{
+ return detail::expression<detail::function, default_ops::fma_func, U, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(
+ default_ops::fma_func(), a, b, c);
+}
+
+template <class U, class V, class Backend>
+inline typename enable_if<
+ mpl::and_<
+ mpl::bool_<number_category<number<Backend, et_off> >::value == number_kind_floating_point>,
+ is_arithmetic<U>,
+ is_arithmetic<V>
+ >,
+ number<Backend, et_off>
+>::type
+fma(const U& a, const V& b, const number<Backend, et_off>& c)
+{
+ using default_ops::eval_multiply_add;
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b, c);
+ number<Backend, et_off> result;
+ eval_multiply_add(result.backend(), number<Backend, et_off>::canonical_value(a), number<Backend, et_off>::canonical_value(b), number<Backend, et_off>::canonical_value(c));
+ return BOOST_MP_MOVE(result);
+}
+
+namespace default_ops {
+
+ struct remquo_func
+ {
+ template <class B, class T, class U>
+ void operator()(B& result, const T& a, const U& b, int* pi)const
+ {
+ eval_remquo(result, a, b, pi);
+ }
+ };
+
+}
+
+template <class Backend, class U>
+inline typename enable_if_c<
+ number_category<number<Backend, et_on> >::value == number_kind_floating_point,
+ detail::expression<detail::function, default_ops::remquo_func, number<Backend, et_on>, U, int*>
+>::type
+remquo(const number<Backend, et_on>& a, const U& b, int* pi)
+{
+ return detail::expression<detail::function, default_ops::remquo_func, number<Backend, et_on>, U, int*>(
+ default_ops::remquo_func(), a, b, pi);
+}
+
+template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class U>
+inline typename enable_if_c<
+ number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point,
+ detail::expression<detail::function, default_ops::remquo_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, int*>
+>::type
+remquo(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const U& b, int* pi)
+{
+ return detail::expression<detail::function, default_ops::remquo_func, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, U, int*>(
+ default_ops::remquo_func(), a, b, pi);
+}
+
+template <class U, class Backend>
+inline typename enable_if_c<
+ (number_category<number<Backend, et_on> >::value == number_kind_floating_point)
+ && !is_number<U>::value && !is_number_expression<U>::value,
+ detail::expression<detail::function, default_ops::remquo_func, U, number<Backend, et_on>, int*>
+>::type
+remquo(const U& a, const number<Backend, et_on>& b, int* pi)
+{
+ return detail::expression<detail::function, default_ops::remquo_func, U, number<Backend, et_on>, int*>(
+ default_ops::remquo_func(), a, b, pi);
+}
+
+template <class U, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+inline typename enable_if_c<
+ (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type >::value == number_kind_floating_point)
+ && !is_number<U>::value && !is_number_expression<U>::value,
+ detail::expression<detail::function, default_ops::remquo_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, int*>
+>::type
+remquo(const U& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b, int* pi)
+{
+ return detail::expression<detail::function, default_ops::remquo_func, U, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, int*>(
+ default_ops::remquo_func(), a, b, pi);
+}
+
+template <class Backend, class U>
+inline typename enable_if_c<
+ number_category<number<Backend, et_on> >::value == number_kind_floating_point,
+ number<Backend, et_off>
+>::type
+remquo(const number<Backend, et_off>& a, const U& b, int* pi)
+{
+ using default_ops::eval_remquo;
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b);
+ number<Backend, et_off> result;
+ eval_remquo(result.backend(), a.backend(), number<Backend, et_off>::canonical_value(b), pi);
+ return BOOST_MP_MOVE(result);
+}
+template <class U, class Backend>
+inline typename enable_if_c<
+(number_category<number<Backend, et_on> >::value == number_kind_floating_point)
+&& !is_number<U>::value && !is_number_expression<U>::value,
+number<Backend, et_off>
+>::type
+remquo(const U& a, const number<Backend, et_off>& b, int* pi)
+{
+ using default_ops::eval_remquo;
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(a, b);
+ number<Backend, et_off> result;
+ eval_remquo(result.backend(), number<Backend, et_off>::canonical_value(a), b.backend(), pi);
+ return BOOST_MP_MOVE(result);
+}
+
+
+template <class B, expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, ExpressionTemplates> >::type
+ sqrt(const number<B, ExpressionTemplates>& x, number<B, ExpressionTemplates>& r)
+{
+ using default_ops::eval_integer_sqrt;
+ detail::scoped_default_precision<multiprecision::number<B, ExpressionTemplates> > precision_guard(x, r);
+ number<B, ExpressionTemplates> s;
+ eval_integer_sqrt(s.backend(), r.backend(), x.backend());
+ return s;
+}
+
+#define UNARY_OP_FUNCTOR(func, category)\
+namespace detail{\
+template <class Backend> \
+struct BOOST_JOIN(category, BOOST_JOIN(func, _funct))\
+{\
+ void operator()(Backend& result, const Backend& arg)const\
+ {\
+ using default_ops::BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result, arg);\
+ }\
+ template <class U>\
+ void operator()(U& result, const Backend& arg)const\
+ {\
+ using default_ops::BOOST_JOIN(eval_,func);\
+ Backend temp;\
+ BOOST_JOIN(eval_,func)(temp, arg);\
+ result = temp;\
+ }\
+};\
+\
+}\
+\
+template <class tag, class A1, class A2, class A3, class A4> \
+inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category,\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , detail::expression<tag, A1, A2, A3, A4> > \
+>::type \
+func(const detail::expression<tag, A1, A2, A3, A4>& arg)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+> (\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
+ , arg \
+ );\
+}\
+template <class Backend> \
+inline typename enable_if_c<number_category<Backend>::value == category,\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> > \
+>::type \
+func(const number<Backend, et_on>& arg)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
+ , arg \
+ );\
+}\
+template <class Backend> \
+inline typename boost::enable_if_c<\
+ boost::multiprecision::number_category<Backend>::value == category,\
+ number<Backend, et_off> >::type \
+func(const number<Backend, et_off>& arg)\
+{\
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg);\
+ number<Backend, et_off> result;\
+ using default_ops::BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result.backend(), arg.backend());\
+ return BOOST_MP_MOVE(result);\
+}
+
+#define BINARY_OP_FUNCTOR(func, category)\
+namespace detail{\
+template <class Backend> \
+struct BOOST_JOIN(category, BOOST_JOIN(func, _funct))\
+{\
+ void operator()(Backend& result, const Backend& arg, const Backend& a)const\
+ {\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result, arg, a);\
+ }\
+ template <class Arithmetic> \
+ void operator()(Backend& result, const Backend& arg, const Arithmetic& a)const\
+ {\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result, arg, number<Backend>::canonical_value(a));\
+ }\
+ template <class Arithmetic> \
+ void operator()(Backend& result, const Arithmetic& arg, const Backend& a)const\
+ {\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result, number<Backend>::canonical_value(arg), a);\
+ }\
+ template <class U>\
+ void operator()(U& result, const Backend& arg, const Backend& a)const\
+ {\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ Backend r;\
+ BOOST_JOIN(eval_,func)(r, arg, a);\
+ result = r;\
+ }\
+ template <class U, class Arithmetic> \
+ void operator()(U& result, const Backend& arg, const Arithmetic& a)const\
+ {\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ Backend r;\
+ BOOST_JOIN(eval_,func)(r, arg, number<Backend>::canonical_value(a));\
+ result = r;\
+ }\
+ template <class U, class Arithmetic> \
+ void operator()(U& result, const Arithmetic& arg, const Backend& a)const\
+ {\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ Backend r;\
+ BOOST_JOIN(eval_,func)(r, number<Backend>::canonical_value(arg), a);\
+ result = r;\
+ }\
+};\
+\
+}\
+template <class Backend> \
+inline typename enable_if_c<number_category<Backend>::value == category,\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ , number<Backend, et_on> > \
+>::type \
+func(const number<Backend, et_on>& arg, const number<Backend, et_on>& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ , number<Backend, et_on> \
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class Backend, class tag, class A1, class A2, class A3, class A4> \
+inline typename enable_if_c<\
+ (number_category<Backend>::value == category) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ , detail::expression<tag, A1, A2, A3, A4> > \
+>::type \
+func(const number<Backend, et_on>& arg, const detail::expression<tag, A1, A2, A3, A4>& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class tag, class A1, class A2, class A3, class A4, class Backend> \
+inline typename enable_if_c<\
+ (number_category<Backend>::value == category) && (boost::is_convertible<typename detail::expression<tag, A1, A2, A3, A4>::result_type, number<Backend, et_on> >::value),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ , number<Backend, et_on> > \
+>::type \
+func(const detail::expression<tag, A1, A2, A3, A4>& arg, const number<Backend, et_on>& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ , number<Backend, et_on> \
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class tag, class A1, class A2, class A3, class A4, class tagb, class A1b, class A2b, class A3b, class A4b> \
+inline typename enable_if_c<\
+ (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category) && (number_category<detail::expression<tagb, A1b, A2b, A3b, A4b> >::value == category),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ , detail::expression<tagb, A1b, A2b, A3b, A4b> > \
+>::type \
+func(const detail::expression<tag, A1, A2, A3, A4>& arg, const detail::expression<tagb, A1b, A2b, A3b, A4b>& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ , detail::expression<tagb, A1b, A2b, A3b, A4b> \
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class Backend, class Arithmetic> \
+inline typename enable_if_c<\
+ is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == category),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ , Arithmetic\
+ > \
+>::type \
+func(const number<Backend, et_on>& arg, const Arithmetic& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ , Arithmetic\
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> \
+inline typename enable_if_c<\
+ is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ , Arithmetic\
+ > \
+>::type \
+func(const detail::expression<tag, A1, A2, A3, A4>& arg, const Arithmetic& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ , Arithmetic\
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class Backend, class Arithmetic> \
+inline typename enable_if_c<\
+ is_compatible_arithmetic_type<Arithmetic, number<Backend, et_on> >::value && (number_category<Backend>::value == category),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , Arithmetic \
+ , number<Backend, et_on> \
+ > \
+>::type \
+func(const Arithmetic& arg, const number<Backend, et_on>& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , Arithmetic \
+ , number<Backend, et_on> \
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class tag, class A1, class A2, class A3, class A4, class Arithmetic> \
+inline typename enable_if_c<\
+ is_compatible_arithmetic_type<Arithmetic, typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value && (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , Arithmetic \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ > \
+>::type \
+func(const Arithmetic& arg, const detail::expression<tag, A1, A2, A3, A4>& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , Arithmetic \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class Backend> \
+inline typename enable_if_c<(number_category<Backend>::value == category),\
+ number<Backend, et_off> >::type \
+func(const number<Backend, et_off>& arg, const number<Backend, et_off>& a)\
+{\
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a);\
+ number<Backend, et_off> result;\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result.backend(), arg.backend(), a.backend());\
+ return BOOST_MP_MOVE(result);\
+}\
+template <class Backend, class Arithmetic> \
+inline typename enable_if_c<\
+ is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == category),\
+ number<Backend, et_off> \
+>::type \
+func(const number<Backend, et_off>& arg, const Arithmetic& a)\
+{\
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg);\
+ number<Backend, et_off> result;\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result.backend(), arg.backend(), number<Backend, et_off>::canonical_value(a));\
+ return BOOST_MP_MOVE(result);\
+}\
+template <class Backend, class Arithmetic> \
+inline typename enable_if_c<\
+ is_compatible_arithmetic_type<Arithmetic, number<Backend, et_off> >::value && (number_category<Backend>::value == category),\
+ number<Backend, et_off> \
+>::type \
+func(const Arithmetic& a, const number<Backend, et_off>& arg)\
+{\
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg);\
+ number<Backend, et_off> result;\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result.backend(), number<Backend, et_off>::canonical_value(a), arg.backend());\
+ return BOOST_MP_MOVE(result);\
+}\
+
+
+#define HETERO_BINARY_OP_FUNCTOR_B(func, Arg2, category)\
+template <class tag, class A1, class A2, class A3, class A4> \
+inline typename enable_if_c<\
+ (number_category<detail::expression<tag, A1, A2, A3, A4> >::value == category),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ , Arg2> \
+>::type \
+func(const detail::expression<tag, A1, A2, A3, A4>& arg, Arg2 const& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type> \
+ , detail::expression<tag, A1, A2, A3, A4> \
+ , Arg2\
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>() \
+ , arg, a \
+ );\
+}\
+template <class Backend> \
+inline typename enable_if_c<\
+ (number_category<Backend>::value == category),\
+ detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ , Arg2> \
+>::type \
+func(const number<Backend, et_on>& arg, Arg2 const& a)\
+{\
+ return detail::expression<\
+ detail::function\
+ , detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend> \
+ , number<Backend, et_on> \
+ , Arg2\
+ >(\
+ detail::BOOST_JOIN(category, BOOST_JOIN(func, _funct))<Backend>() \
+ , arg,\
+ a\
+ );\
+}\
+template <class Backend> \
+inline typename enable_if_c<\
+ (number_category<Backend>::value == category),\
+ number<Backend, et_off> >::type \
+func(const number<Backend, et_off>& arg, Arg2 const& a)\
+{\
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg, a);\
+ number<Backend, et_off> result;\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result.backend(), arg.backend(), a);\
+ return BOOST_MP_MOVE(result);\
+}\
+
+#define HETERO_BINARY_OP_FUNCTOR(func, Arg2, category)\
+namespace detail{\
+template <class Backend> \
+struct BOOST_JOIN(category, BOOST_JOIN(func, _funct))\
+{\
+ template <class Arg>\
+ void operator()(Backend& result, Backend const& arg, Arg a)const\
+ {\
+ using default_ops:: BOOST_JOIN(eval_,func);\
+ BOOST_JOIN(eval_,func)(result, arg, a);\
+ }\
+};\
+\
+}\
+\
+HETERO_BINARY_OP_FUNCTOR_B(func, Arg2, category)
+
+namespace detail{
+template <class Backend>
+struct abs_funct
+{
+ void operator()(Backend& result, const Backend& arg)const
+ {
+ using default_ops::eval_abs;
+ eval_abs(result, arg);
+ }
+};
+template <class Backend>
+struct conj_funct
+{
+ void operator()(Backend& result, const Backend& arg)const
+ {
+ using default_ops::eval_conj;
+ eval_conj(result, arg);
+ }
+};
+template <class Backend>
+struct proj_funct
+{
+ void operator()(Backend& result, const Backend& arg)const
+ {
+ using default_ops::eval_proj;
+ eval_proj(result, arg);
+ }
+};
+
+}
+
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename boost::disable_if_c<number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>::value == number_kind_complex,
+ detail::expression<
+ detail::function
+ , detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
+ , detail::expression<tag, A1, A2, A3, A4> > >::type
+abs(const detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ return detail::expression<
+ detail::function
+ , detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
+ , detail::expression<tag, A1, A2, A3, A4>
+> (
+ detail::abs_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>()
+ , arg
+ );
+}
+template <class Backend>
+inline typename disable_if_c<number_category<Backend>::value == number_kind_complex,
+ detail::expression<
+ detail::function
+ , detail::abs_funct<Backend>
+ , number<Backend, et_on> > >::type
+abs(const number<Backend, et_on>& arg)
+{
+ return detail::expression<
+ detail::function
+ , detail::abs_funct<Backend>
+ , number<Backend, et_on>
+ >(
+ detail::abs_funct<Backend>()
+ , arg
+ );
+}
+template <class Backend>
+inline typename disable_if_c<number_category<Backend>::value == number_kind_complex, number<Backend, et_off> >::type
+abs(const number<Backend, et_off>& arg)
+{
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg);
+ number<Backend, et_off> result;
+ using default_ops::eval_abs;
+ eval_abs(result.backend(), arg.backend());
+ return BOOST_MP_MOVE(result);
+}
+
+template <class tag, class A1, class A2, class A3, class A4>
+inline detail::expression<
+ detail::function
+ , detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
+ , detail::expression<tag, A1, A2, A3, A4> >
+conj(const detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ return detail::expression<
+ detail::function
+ , detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
+ , detail::expression<tag, A1, A2, A3, A4>
+> (
+ detail::conj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>()
+ , arg
+ );
+}
+template <class Backend>
+inline detail::expression<
+ detail::function
+ , detail::conj_funct<Backend>
+ , number<Backend, et_on> >
+conj(const number<Backend, et_on>& arg)
+{
+ return detail::expression<
+ detail::function
+ , detail::conj_funct<Backend>
+ , number<Backend, et_on>
+ >(
+ detail::conj_funct<Backend>()
+ , arg
+ );
+}
+template <class Backend>
+inline number<Backend, et_off>
+conj(const number<Backend, et_off>& arg)
+{
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg);
+ number<Backend, et_off> result;
+ using default_ops::eval_conj;
+ eval_conj(result.backend(), arg.backend());
+ return BOOST_MP_MOVE(result);
+}
+
+template <class tag, class A1, class A2, class A3, class A4>
+inline detail::expression<
+ detail::function
+ , detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
+ , detail::expression<tag, A1, A2, A3, A4> >
+proj(const detail::expression<tag, A1, A2, A3, A4>& arg)
+{
+ return detail::expression<
+ detail::function
+ , detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>
+ , detail::expression<tag, A1, A2, A3, A4>
+> (
+ detail::proj_funct<typename detail::backend_type<detail::expression<tag, A1, A2, A3, A4> >::type>()
+ , arg
+ );
+}
+template <class Backend>
+inline detail::expression<
+ detail::function
+ , detail::proj_funct<Backend>
+ , number<Backend, et_on> >
+proj(const number<Backend, et_on>& arg)
+{
+ return detail::expression<
+ detail::function
+ , detail::proj_funct<Backend>
+ , number<Backend, et_on>
+ >(
+ detail::proj_funct<Backend>()
+ , arg
+ );
+}
+template <class Backend>
+inline number<Backend, et_off>
+proj(const number<Backend, et_off>& arg)
+{
+ detail::scoped_default_precision<multiprecision::number<Backend, et_off> > precision_guard(arg);
+ number<Backend, et_off> result;
+ using default_ops::eval_proj;
+ eval_proj(result.backend(), arg.backend());
+ return BOOST_MP_MOVE(result);
+}
+
+UNARY_OP_FUNCTOR(fabs, number_kind_floating_point)
+UNARY_OP_FUNCTOR(sqrt, number_kind_floating_point)
+UNARY_OP_FUNCTOR(floor, number_kind_floating_point)
+UNARY_OP_FUNCTOR(ceil, number_kind_floating_point)
+UNARY_OP_FUNCTOR(trunc, number_kind_floating_point)
+UNARY_OP_FUNCTOR(round, number_kind_floating_point)
+UNARY_OP_FUNCTOR(exp, number_kind_floating_point)
+UNARY_OP_FUNCTOR(exp2, number_kind_floating_point)
+UNARY_OP_FUNCTOR(log, number_kind_floating_point)
+UNARY_OP_FUNCTOR(log10, number_kind_floating_point)
+UNARY_OP_FUNCTOR(cos, number_kind_floating_point)
+UNARY_OP_FUNCTOR(sin, number_kind_floating_point)
+UNARY_OP_FUNCTOR(tan, number_kind_floating_point)
+UNARY_OP_FUNCTOR(asin, number_kind_floating_point)
+UNARY_OP_FUNCTOR(acos, number_kind_floating_point)
+UNARY_OP_FUNCTOR(atan, number_kind_floating_point)
+UNARY_OP_FUNCTOR(cosh, number_kind_floating_point)
+UNARY_OP_FUNCTOR(sinh, number_kind_floating_point)
+UNARY_OP_FUNCTOR(tanh, number_kind_floating_point)
+UNARY_OP_FUNCTOR(log2, number_kind_floating_point)
+UNARY_OP_FUNCTOR(nearbyint, number_kind_floating_point)
+UNARY_OP_FUNCTOR(rint, number_kind_floating_point)
+
+HETERO_BINARY_OP_FUNCTOR(ldexp, short, number_kind_floating_point)
+//HETERO_BINARY_OP_FUNCTOR(frexp, short*, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(ldexp, int, number_kind_floating_point)
+//HETERO_BINARY_OP_FUNCTOR_B(frexp, int*, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(ldexp, long, number_kind_floating_point)
+//HETERO_BINARY_OP_FUNCTOR_B(frexp, long*, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(ldexp, boost::long_long_type, number_kind_floating_point)
+//HETERO_BINARY_OP_FUNCTOR_B(frexp, boost::long_long_type*, number_kind_floating_point)
+BINARY_OP_FUNCTOR(pow, number_kind_floating_point)
+BINARY_OP_FUNCTOR(fmod, number_kind_floating_point)
+BINARY_OP_FUNCTOR(fmax, number_kind_floating_point)
+BINARY_OP_FUNCTOR(fmin, number_kind_floating_point)
+BINARY_OP_FUNCTOR(atan2, number_kind_floating_point)
+BINARY_OP_FUNCTOR(fdim, number_kind_floating_point)
+BINARY_OP_FUNCTOR(hypot, number_kind_floating_point)
+BINARY_OP_FUNCTOR(remainder, number_kind_floating_point)
+
+UNARY_OP_FUNCTOR(logb, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR(scalbn, short, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR(scalbln, short, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(scalbn, int, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(scalbln, int, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(scalbn, long, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(scalbln, long, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(scalbn, boost::long_long_type, number_kind_floating_point)
+HETERO_BINARY_OP_FUNCTOR_B(scalbln, boost::long_long_type, number_kind_floating_point)
+
+//
+// Complex functions:
+//
+UNARY_OP_FUNCTOR(exp, number_kind_complex)
+UNARY_OP_FUNCTOR(log, number_kind_complex)
+UNARY_OP_FUNCTOR(log10, number_kind_complex)
+BINARY_OP_FUNCTOR(pow, number_kind_complex)
+UNARY_OP_FUNCTOR(sqrt, number_kind_complex)
+UNARY_OP_FUNCTOR(sin, number_kind_complex)
+UNARY_OP_FUNCTOR(cos, number_kind_complex)
+UNARY_OP_FUNCTOR(tan, number_kind_complex)
+UNARY_OP_FUNCTOR(asin, number_kind_complex)
+UNARY_OP_FUNCTOR(acos, number_kind_complex)
+UNARY_OP_FUNCTOR(atan, number_kind_complex)
+UNARY_OP_FUNCTOR(sinh, number_kind_complex)
+UNARY_OP_FUNCTOR(cosh, number_kind_complex)
+UNARY_OP_FUNCTOR(tanh, number_kind_complex)
+UNARY_OP_FUNCTOR(asinh, number_kind_complex)
+UNARY_OP_FUNCTOR(acosh, number_kind_complex)
+UNARY_OP_FUNCTOR(atanh, number_kind_complex)
+
+//
+// Integer functions:
+//
+BINARY_OP_FUNCTOR(gcd, number_kind_integer)
+BINARY_OP_FUNCTOR(lcm, number_kind_integer)
+HETERO_BINARY_OP_FUNCTOR(pow, unsigned, number_kind_integer)
+
+#undef BINARY_OP_FUNCTOR
+#undef UNARY_OP_FUNCTOR
+
+//
+// ilogb:
+//
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline typename enable_if_c<number_category<Backend>::value == number_kind_floating_point, typename Backend::exponent_type>::type
+ ilogb(const multiprecision::number<Backend, ExpressionTemplates>& val)
+{
+ using default_ops::eval_ilogb;
+ return eval_ilogb(val.backend());
+}
+
+template <class tag, class A1, class A2, class A3, class A4>
+inline typename enable_if_c<number_category<detail::expression<tag, A1, A2, A3, A4> >::value == number_kind_floating_point, typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type::backend_type::exponent_type>::type
+ilogb(const detail::expression<tag, A1, A2, A3, A4>& val)
+{
+ using default_ops::eval_ilogb;
+ typename multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type arg(val);
+ return eval_ilogb(arg.backend());
+}
+
+} //namespace multiprecision
+
+namespace math{
+//
+// Overload of Boost.Math functions that find the wrong overload when used with number:
+//
+namespace detail{
+ template <class T> T sinc_pi_imp(T);
+ template <class T> T sinhc_pi_imp(T);
+}
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline multiprecision::number<Backend, ExpressionTemplates> sinc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x)
+{
+ boost::multiprecision::detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(x);
+ return BOOST_MP_MOVE(detail::sinc_pi_imp(x));
+}
+
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class Policy>
+inline multiprecision::number<Backend, ExpressionTemplates> sinc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x, const Policy&)
+{
+ boost::multiprecision::detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(x);
+ return BOOST_MP_MOVE(detail::sinc_pi_imp(x));
+}
+
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline multiprecision::number<Backend, ExpressionTemplates> sinhc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x)
+{
+ boost::multiprecision::detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(x);
+ return BOOST_MP_MOVE(detail::sinhc_pi_imp(x));
+}
+
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates, class Policy>
+inline multiprecision::number<Backend, ExpressionTemplates> sinhc_pi(const multiprecision::number<Backend, ExpressionTemplates>& x, const Policy&)
+{
+ boost::multiprecision::detail::scoped_default_precision<multiprecision::number<Backend, ExpressionTemplates> > precision_guard(x);
+ return BOOST_MP_MOVE(boost::math::sinhc_pi(x));
+}
+
+using boost::multiprecision::gcd;
+using boost::multiprecision::lcm;
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+} // namespace math
+
+namespace integer {
+
+using boost::multiprecision::gcd;
+using boost::multiprecision::lcm;
+
+}
+
+} // namespace boost
+
+//
+// This has to come last of all:
+//
+#include <boost/multiprecision/detail/no_et_ops.hpp>
+#include <boost/multiprecision/detail/et_ops.hpp>
+//
+// min/max overloads:
+//
+#include <boost/multiprecision/detail/min_max.hpp>
+
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/et_ops.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/et_ops.hpp
index 3778e01029d..3778e01029d 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/et_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/et_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/float_string_cvt.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/float_string_cvt.hpp
index 9b5774f1afe..9b5774f1afe 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/float_string_cvt.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/float_string_cvt.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/constants.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/constants.hpp
new file mode 100644
index 00000000000..a9c83f98484
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/constants.hpp
@@ -0,0 +1,333 @@
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// This file has no include guards or namespaces - it's expanded inline inside default_ops.hpp
+//
+
+template <class T>
+void calc_log2(T& num, unsigned digits)
+{
+ typedef typename boost::multiprecision::detail::canonical<boost::uint32_t, T>::type ui_type;
+ typedef typename mpl::front<typename T::signed_types>::type si_type;
+
+ //
+ // String value with 1100 digits:
+ //
+ static const char* string_val = "0."
+ "6931471805599453094172321214581765680755001343602552541206800094933936219696947156058633269964186875"
+ "4200148102057068573368552023575813055703267075163507596193072757082837143519030703862389167347112335"
+ "0115364497955239120475172681574932065155524734139525882950453007095326366642654104239157814952043740"
+ "4303855008019441706416715186447128399681717845469570262716310645461502572074024816377733896385506952"
+ "6066834113727387372292895649354702576265209885969320196505855476470330679365443254763274495125040606"
+ "9438147104689946506220167720424524529612687946546193165174681392672504103802546259656869144192871608"
+ "2938031727143677826548775664850856740776484514644399404614226031930967354025744460703080960850474866"
+ "3852313818167675143866747664789088143714198549423151997354880375165861275352916610007105355824987941"
+ "4729509293113897155998205654392871700072180857610252368892132449713893203784393530887748259701715591"
+ "0708823683627589842589185353024363421436706118923678919237231467232172053401649256872747782344535347"
+ "6481149418642386776774406069562657379600867076257199184734022651462837904883062033061144630073719489";
+ //
+ // Check if we can just construct from string:
+ //
+ if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
+ {
+ num = string_val;
+ return;
+ }
+ //
+ // We calculate log2 from using the formula:
+ //
+ // ln(2) = 3/4 SUM[n>=0] ((-1)^n * N!^2 / (2^n(2n+1)!))
+ //
+ // Numerator and denominator are calculated separately and then
+ // divided at the end, we also precalculate the terms up to n = 5
+ // since these fit in a 32-bit integer anyway.
+ //
+ // See Gourdon, X., and Sebah, P. The logarithmic constant: log 2, Jan. 2004.
+ // Also http://www.mpfr.org/algorithms.pdf.
+ //
+ num = static_cast<ui_type>(1180509120uL);
+ T denom, next_term, temp;
+ denom = static_cast<ui_type>(1277337600uL);
+ next_term = static_cast<ui_type>(120uL);
+ si_type sign = -1;
+
+ ui_type limit = digits / 3 + 1;
+
+ for(ui_type n = 6; n < limit; ++n)
+ {
+ temp = static_cast<ui_type>(2);
+ eval_multiply(temp, ui_type(2 * n));
+ eval_multiply(temp, ui_type(2 * n + 1));
+ eval_multiply(num, temp);
+ eval_multiply(denom, temp);
+ sign = -sign;
+ eval_multiply(next_term, n);
+ eval_multiply(temp, next_term, next_term);
+ if(sign < 0)
+ temp.negate();
+ eval_add(num, temp);
+ }
+ eval_multiply(denom, ui_type(4));
+ eval_multiply(num, ui_type(3));
+ INSTRUMENT_BACKEND(denom);
+ INSTRUMENT_BACKEND(num);
+ eval_divide(num, denom);
+ INSTRUMENT_BACKEND(num);
+}
+
+template <class T>
+void calc_e(T& result, unsigned digits)
+{
+ typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
+ //
+ // 1100 digits in string form:
+ //
+ const char* string_val = "2."
+ "7182818284590452353602874713526624977572470936999595749669676277240766303535475945713821785251664274"
+ "2746639193200305992181741359662904357290033429526059563073813232862794349076323382988075319525101901"
+ "1573834187930702154089149934884167509244761460668082264800168477411853742345442437107539077744992069"
+ "5517027618386062613313845830007520449338265602976067371132007093287091274437470472306969772093101416"
+ "9283681902551510865746377211125238978442505695369677078544996996794686445490598793163688923009879312"
+ "7736178215424999229576351482208269895193668033182528869398496465105820939239829488793320362509443117"
+ "3012381970684161403970198376793206832823764648042953118023287825098194558153017567173613320698112509"
+ "9618188159304169035159888851934580727386673858942287922849989208680582574927961048419844436346324496"
+ "8487560233624827041978623209002160990235304369941849146314093431738143640546253152096183690888707016"
+ "7683964243781405927145635490613031072085103837505101157477041718986106873969655212671546889570350354"
+ "0212340784981933432106817012100562788023519303322474501585390473041995777709350366041699732972508869";
+ //
+ // Check if we can just construct from string:
+ //
+ if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
+ {
+ result = string_val;
+ return;
+ }
+
+ T lim;
+ lim = ui_type(1);
+ eval_ldexp(lim, lim, digits);
+
+ //
+ // Standard evaluation from the definition of e: http://functions.wolfram.com/Constants/E/02/
+ //
+ result = ui_type(2);
+ T denom;
+ denom = ui_type(1);
+ ui_type i = 2;
+ do{
+ eval_multiply(denom, i);
+ eval_multiply(result, i);
+ eval_add(result, ui_type(1));
+ ++i;
+ }while(denom.compare(lim) <= 0);
+ eval_divide(result, denom);
+}
+
+template <class T>
+void calc_pi(T& result, unsigned digits)
+{
+ typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
+ typedef typename mpl::front<typename T::float_types>::type real_type;
+ //
+ // 1100 digits in string form:
+ //
+ const char* string_val = "3."
+ "1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679"
+ "8214808651328230664709384460955058223172535940812848111745028410270193852110555964462294895493038196"
+ "4428810975665933446128475648233786783165271201909145648566923460348610454326648213393607260249141273"
+ "7245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094"
+ "3305727036575959195309218611738193261179310511854807446237996274956735188575272489122793818301194912"
+ "9833673362440656643086021394946395224737190702179860943702770539217176293176752384674818467669405132"
+ "0005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235"
+ "4201995611212902196086403441815981362977477130996051870721134999999837297804995105973173281609631859"
+ "5024459455346908302642522308253344685035261931188171010003137838752886587533208381420617177669147303"
+ "5982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989"
+ "3809525720106548586327886593615338182796823030195203530185296899577362259941389124972177528347913152";
+ //
+ // Check if we can just construct from string:
+ //
+ if(digits < 3640) // 3640 binary digits ~ 1100 decimal digits
+ {
+ result = string_val;
+ return;
+ }
+
+ T a;
+ a = ui_type(1);
+ T b;
+ T A(a);
+ T B;
+ B = real_type(0.5f);
+ T D;
+ D = real_type(0.25f);
+
+ T lim;
+ lim = ui_type(1);
+ eval_ldexp(lim, lim, -(int)digits);
+
+ //
+ // This algorithm is from:
+ // Schonhage, A., Grotefeld, A. F. W., and Vetter, E. Fast Algorithms: A Multitape Turing
+ // Machine Implementation. BI Wissenschaftverlag, 1994.
+ // Also described in MPFR's algorithm guide: http://www.mpfr.org/algorithms.pdf.
+ //
+ // Let:
+ // a[0] = A[0] = 1
+ // B[0] = 1/2
+ // D[0] = 1/4
+ // Then:
+ // S[k+1] = (A[k]+B[k]) / 4
+ // b[k] = sqrt(B[k])
+ // a[k+1] = a[k]^2
+ // B[k+1] = 2(A[k+1]-S[k+1])
+ // D[k+1] = D[k] - 2^k(A[k+1]-B[k+1])
+ // Stop when |A[k]-B[k]| <= 2^(k-p)
+ // and PI = B[k]/D[k]
+
+ unsigned k = 1;
+
+ do
+ {
+ eval_add(result, A, B);
+ eval_ldexp(result, result, -2);
+ eval_sqrt(b, B);
+ eval_add(a, b);
+ eval_ldexp(a, a, -1);
+ eval_multiply(A, a, a);
+ eval_subtract(B, A, result);
+ eval_ldexp(B, B, 1);
+ eval_subtract(result, A, B);
+ bool neg = eval_get_sign(result) < 0;
+ if(neg)
+ result.negate();
+ if(result.compare(lim) <= 0)
+ break;
+ if(neg)
+ result.negate();
+ eval_ldexp(result, result, k - 1);
+ eval_subtract(D, result);
+ ++k;
+ eval_ldexp(lim, lim, 1);
+ }
+ while(true);
+
+ eval_divide(result, B, D);
+}
+
+template <class T, const T& (*F)(void)>
+struct constant_initializer
+{
+ static void do_nothing()
+ {
+ init.do_nothing();
+ }
+private:
+ struct initializer
+ {
+ initializer()
+ {
+ F();
+ }
+ void do_nothing()const{}
+ };
+ static const initializer init;
+};
+
+template <class T, const T& (*F)(void)>
+typename constant_initializer<T, F>::initializer const constant_initializer<T, F>::init;
+
+template <class T>
+const T& get_constant_ln2()
+{
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL long digits = 0;
+#ifndef BOOST_MP_USING_THREAD_LOCAL
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ constant_initializer<T, &get_constant_ln2<T> >::do_nothing();
+
+ if(!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+ b = true;
+#else
+ if ((digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+#endif
+ calc_log2(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
+ digits = boost::multiprecision::detail::digits2<number<T> >::value();
+ }
+
+ return result;
+}
+
+template <class T>
+const T& get_constant_e()
+{
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL long digits = 0;
+#ifndef BOOST_MP_USING_THREAD_LOCAL
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ constant_initializer<T, &get_constant_e<T> >::do_nothing();
+
+ if (!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+ b = true;
+#else
+ if ((digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+#endif
+ calc_e(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
+ digits = boost::multiprecision::detail::digits2<number<T> >::value();
+ }
+
+ return result;
+}
+
+template <class T>
+const T& get_constant_pi()
+{
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL long digits = 0;
+#ifndef BOOST_MP_USING_THREAD_LOCAL
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ constant_initializer<T, &get_constant_pi<T> >::do_nothing();
+
+ if (!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+ b = true;
+#else
+ if ((digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+#endif
+ calc_pi(result, boost::multiprecision::detail::digits2<number<T, et_on> >::value());
+ digits = boost::multiprecision::detail::digits2<number<T> >::value();
+ }
+
+ return result;
+}
+
+template <class T>
+const T& get_constant_one_over_epsilon()
+{
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL long digits = 0;
+#ifndef BOOST_MP_USING_THREAD_LOCAL
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ constant_initializer<T, &get_constant_one_over_epsilon<T> >::do_nothing();
+
+ if (!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+ b = true;
+#else
+ if ((digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+#endif
+ typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
+ result = static_cast<ui_type>(1u);
+ eval_divide(result, std::numeric_limits<number<T> >::epsilon().backend());
+ }
+
+ return result;
+}
+
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/pow.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/pow.hpp
new file mode 100644
index 00000000000..1abc705a9a3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/pow.hpp
@@ -0,0 +1,909 @@
+
+// Copyright Christopher Kormanyos 2002 - 2013.
+// Copyright 2011 - 2013 John Maddock. Distributed under the Boost
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// This work is based on an earlier work:
+// "Algorithm 910: A Portable C++ Multiple-Precision System for Special-Function Calculations",
+// in ACM TOMS, {VOL 37, ISSUE 4, (February 2011)} (C) ACM, 2011. http://doi.acm.org/10.1145/1916461.1916469
+//
+// This file has no include guards or namespaces - it's expanded inline inside default_ops.hpp
+//
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:6326) // comparison of two constants
+#endif
+
+namespace detail{
+
+template<typename T, typename U>
+inline void pow_imp(T& result, const T& t, const U& p, const mpl::false_&)
+{
+ // Compute the pure power of typename T t^p.
+ // Use the S-and-X binary method, as described in
+ // D. E. Knuth, "The Art of Computer Programming", Vol. 2,
+ // Section 4.6.3 . The resulting computational complexity
+ // is order log2[abs(p)].
+
+ typedef typename boost::multiprecision::detail::canonical<U, T>::type int_type;
+
+ if(&result == &t)
+ {
+ T temp;
+ pow_imp(temp, t, p, mpl::false_());
+ result = temp;
+ return;
+ }
+
+ // This will store the result.
+ if(U(p % U(2)) != U(0))
+ {
+ result = t;
+ }
+ else
+ result = int_type(1);
+
+ U p2(p);
+
+ // The variable x stores the binary powers of t.
+ T x(t);
+
+ while(U(p2 /= 2) != U(0))
+ {
+ // Square x for each binary power.
+ eval_multiply(x, x);
+
+ const bool has_binary_power = (U(p2 % U(2)) != U(0));
+
+ if(has_binary_power)
+ {
+ // Multiply the result with each binary power contained in the exponent.
+ eval_multiply(result, x);
+ }
+ }
+}
+
+template<typename T, typename U>
+inline void pow_imp(T& result, const T& t, const U& p, const mpl::true_&)
+{
+ // Signed integer power, just take care of the sign then call the unsigned version:
+ typedef typename boost::multiprecision::detail::canonical<U, T>::type int_type;
+ typedef typename make_unsigned<U>::type ui_type;
+
+ if(p < 0)
+ {
+ T temp;
+ temp = static_cast<int_type>(1);
+ T denom;
+ pow_imp(denom, t, static_cast<ui_type>(-p), mpl::false_());
+ eval_divide(result, temp, denom);
+ return;
+ }
+ pow_imp(result, t, static_cast<ui_type>(p), mpl::false_());
+}
+
+} // namespace detail
+
+template<typename T, typename U>
+inline typename enable_if_c<is_integral<U>::value>::type eval_pow(T& result, const T& t, const U& p)
+{
+ detail::pow_imp(result, t, p, boost::is_signed<U>());
+}
+
+template <class T>
+void hyp0F0(T& H0F0, const T& x)
+{
+ // Compute the series representation of Hypergeometric0F0 taken from
+ // http://functions.wolfram.com/HypergeometricFunctions/Hypergeometric0F0/06/01/
+ // There are no checks on input range or parameter boundaries.
+
+ typedef typename mpl::front<typename T::unsigned_types>::type ui_type;
+
+ BOOST_ASSERT(&H0F0 != &x);
+ long tol = boost::multiprecision::detail::digits2<number<T, et_on> >::value();
+ T t;
+
+ T x_pow_n_div_n_fact(x);
+
+ eval_add(H0F0, x_pow_n_div_n_fact, ui_type(1));
+
+ T lim;
+ eval_ldexp(lim, H0F0, 1 - tol);
+ if(eval_get_sign(lim) < 0)
+ lim.negate();
+
+ ui_type n;
+
+ const unsigned series_limit =
+ boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100
+ ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value();
+ // Series expansion of hyperg_0f0(; ; x).
+ for(n = 2; n < series_limit; ++n)
+ {
+ eval_multiply(x_pow_n_div_n_fact, x);
+ eval_divide(x_pow_n_div_n_fact, n);
+ eval_add(H0F0, x_pow_n_div_n_fact);
+ bool neg = eval_get_sign(x_pow_n_div_n_fact) < 0;
+ if(neg)
+ x_pow_n_div_n_fact.negate();
+ if(lim.compare(x_pow_n_div_n_fact) > 0)
+ break;
+ if(neg)
+ x_pow_n_div_n_fact.negate();
+ }
+ if(n >= series_limit)
+ BOOST_THROW_EXCEPTION(std::runtime_error("H0F0 failed to converge"));
+}
+
+template <class T>
+void hyp1F0(T& H1F0, const T& a, const T& x)
+{
+ // Compute the series representation of Hypergeometric1F0 taken from
+ // http://functions.wolfram.com/HypergeometricFunctions/Hypergeometric1F0/06/01/01/
+ // and also see the corresponding section for the power function (i.e. x^a).
+ // There are no checks on input range or parameter boundaries.
+
+ typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
+
+ BOOST_ASSERT(&H1F0 != &x);
+ BOOST_ASSERT(&H1F0 != &a);
+
+ T x_pow_n_div_n_fact(x);
+ T pochham_a (a);
+ T ap (a);
+
+ eval_multiply(H1F0, pochham_a, x_pow_n_div_n_fact);
+ eval_add(H1F0, si_type(1));
+ T lim;
+ eval_ldexp(lim, H1F0, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
+ if(eval_get_sign(lim) < 0)
+ lim.negate();
+
+ si_type n;
+ T term, part;
+
+ const si_type series_limit =
+ boost::multiprecision::detail::digits2<number<T, et_on> >::value() < 100
+ ? 100 : boost::multiprecision::detail::digits2<number<T, et_on> >::value();
+ // Series expansion of hyperg_1f0(a; ; x).
+ for(n = 2; n < series_limit; n++)
+ {
+ eval_multiply(x_pow_n_div_n_fact, x);
+ eval_divide(x_pow_n_div_n_fact, n);
+ eval_increment(ap);
+ eval_multiply(pochham_a, ap);
+ eval_multiply(term, pochham_a, x_pow_n_div_n_fact);
+ eval_add(H1F0, term);
+ if(eval_get_sign(term) < 0)
+ term.negate();
+ if(lim.compare(term) >= 0)
+ break;
+ }
+ if(n >= series_limit)
+ BOOST_THROW_EXCEPTION(std::runtime_error("H1F0 failed to converge"));
+}
+
+template <class T>
+void eval_exp(T& result, const T& x)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The exp function is only valid for floating point types.");
+ if(&x == &result)
+ {
+ T temp;
+ eval_exp(temp, x);
+ result = temp;
+ return;
+ }
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
+ typedef typename T::exponent_type exp_type;
+ typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
+
+ // Handle special arguments.
+ int type = eval_fpclassify(x);
+ bool isneg = eval_get_sign(x) < 0;
+ if(type == (int)FP_NAN)
+ {
+ result = x;
+ errno = EDOM;
+ return;
+ }
+ else if(type == (int)FP_INFINITE)
+ {
+ if(isneg)
+ result = ui_type(0u);
+ else
+ result = x;
+ return;
+ }
+ else if(type == (int)FP_ZERO)
+ {
+ result = ui_type(1);
+ return;
+ }
+
+ // Get local copy of argument and force it to be positive.
+ T xx = x;
+ T exp_series;
+ if(isneg)
+ xx.negate();
+
+ // Check the range of the argument.
+ if(xx.compare(si_type(1)) <= 0)
+ {
+ //
+ // Use series for exp(x) - 1:
+ //
+ T lim;
+ if(std::numeric_limits<number<T, et_on> >::is_specialized)
+ lim = std::numeric_limits<number<T, et_on> >::epsilon().backend();
+ else
+ {
+ result = ui_type(1);
+ eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
+ }
+ unsigned k = 2;
+ exp_series = xx;
+ result = si_type(1);
+ if(isneg)
+ eval_subtract(result, exp_series);
+ else
+ eval_add(result, exp_series);
+ eval_multiply(exp_series, xx);
+ eval_divide(exp_series, ui_type(k));
+ eval_add(result, exp_series);
+ while(exp_series.compare(lim) > 0)
+ {
+ ++k;
+ eval_multiply(exp_series, xx);
+ eval_divide(exp_series, ui_type(k));
+ if(isneg && (k&1))
+ eval_subtract(result, exp_series);
+ else
+ eval_add(result, exp_series);
+ }
+ return;
+ }
+
+ // Check for pure-integer arguments which can be either signed or unsigned.
+ typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type ll;
+ eval_trunc(exp_series, x);
+ eval_convert_to(&ll, exp_series);
+ if(x.compare(ll) == 0)
+ {
+ detail::pow_imp(result, get_constant_e<T>(), ll, mpl::true_());
+ return;
+ }
+ else if(exp_series.compare(x) == 0)
+ {
+ // We have a value that has no fractional part, but is too large to fit
+ // in a long long, in this situation the code below will fail, so
+ // we're just going to assume that this will overflow:
+ if(isneg)
+ result = ui_type(0);
+ else
+ result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend();
+ return;
+ }
+
+ // The algorithm for exp has been taken from MPFUN.
+ // exp(t) = [ (1 + r + r^2/2! + r^3/3! + r^4/4! ...)^p2 ] * 2^n
+ // where p2 is a power of 2 such as 2048, r = t_prime / p2, and
+ // t_prime = t - n*ln2, with n chosen to minimize the absolute
+ // value of t_prime. In the resulting Taylor series, which is
+ // implemented as a hypergeometric function, |r| is bounded by
+ // ln2 / p2. For small arguments, no scaling is done.
+
+ // Compute the exponential series of the (possibly) scaled argument.
+
+ eval_divide(result, xx, get_constant_ln2<T>());
+ exp_type n;
+ eval_convert_to(&n, result);
+
+ if (n == (std::numeric_limits<exp_type>::max)())
+ {
+ // Exponent is too large to fit in our exponent type:
+ if (isneg)
+ result = ui_type(0);
+ else
+ result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend();
+ return;
+ }
+
+ // The scaling is 2^11 = 2048.
+ const si_type p2 = static_cast<si_type>(si_type(1) << 11);
+
+ eval_multiply(exp_series, get_constant_ln2<T>(), static_cast<canonical_exp_type>(n));
+ eval_subtract(exp_series, xx);
+ eval_divide(exp_series, p2);
+ exp_series.negate();
+ hyp0F0(result, exp_series);
+
+ detail::pow_imp(exp_series, result, p2, mpl::true_());
+ result = ui_type(1);
+ eval_ldexp(result, result, n);
+ eval_multiply(exp_series, result);
+
+ if(isneg)
+ eval_divide(result, ui_type(1), exp_series);
+ else
+ result = exp_series;
+}
+
+template <class T>
+void eval_log(T& result, const T& arg)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The log function is only valid for floating point types.");
+ //
+ // We use a variation of http://dlmf.nist.gov/4.45#i
+ // using frexp to reduce the argument to x * 2^n,
+ // then let y = x - 1 and compute:
+ // log(x) = log(2) * n + log1p(1 + y)
+ //
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ typedef typename T::exponent_type exp_type;
+ typedef typename boost::multiprecision::detail::canonical<exp_type, T>::type canonical_exp_type;
+ typedef typename mpl::front<typename T::float_types>::type fp_type;
+ int s = eval_signbit(arg);
+ switch(eval_fpclassify(arg))
+ {
+ case FP_NAN:
+ result = arg;
+ errno = EDOM;
+ return;
+ case FP_INFINITE:
+ if(s) break;
+ result = arg;
+ return;
+ case FP_ZERO:
+ result = std::numeric_limits<number<T> >::has_infinity ? std::numeric_limits<number<T> >::infinity().backend() : (std::numeric_limits<number<T> >::max)().backend();
+ result.negate();
+ errno = ERANGE;
+ return;
+ }
+ if(s)
+ {
+ result = std::numeric_limits<number<T> >::quiet_NaN().backend();
+ errno = EDOM;
+ return;
+ }
+
+ exp_type e;
+ T t;
+ eval_frexp(t, arg, &e);
+ bool alternate = false;
+
+ if(t.compare(fp_type(2) / fp_type(3)) <= 0)
+ {
+ alternate = true;
+ eval_ldexp(t, t, 1);
+ --e;
+ }
+
+ eval_multiply(result, get_constant_ln2<T>(), canonical_exp_type(e));
+ INSTRUMENT_BACKEND(result);
+ eval_subtract(t, ui_type(1)); /* -0.3 <= t <= 0.3 */
+ if(!alternate)
+ t.negate(); /* 0 <= t <= 0.33333 */
+ T pow = t;
+ T lim;
+ T t2;
+
+ if(alternate)
+ eval_add(result, t);
+ else
+ eval_subtract(result, t);
+
+ if(std::numeric_limits<number<T, et_on> >::is_specialized)
+ eval_multiply(lim, result, std::numeric_limits<number<T, et_on> >::epsilon().backend());
+ else
+ eval_ldexp(lim, result, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
+ if(eval_get_sign(lim) < 0)
+ lim.negate();
+ INSTRUMENT_BACKEND(lim);
+
+ ui_type k = 1;
+ do
+ {
+ ++k;
+ eval_multiply(pow, t);
+ eval_divide(t2, pow, k);
+ INSTRUMENT_BACKEND(t2);
+ if(alternate && ((k & 1) != 0))
+ eval_add(result, t2);
+ else
+ eval_subtract(result, t2);
+ INSTRUMENT_BACKEND(result);
+ }while(lim.compare(t2) < 0);
+}
+
+template <class T>
+const T& get_constant_log10()
+{
+ static BOOST_MP_THREAD_LOCAL T result;
+ static BOOST_MP_THREAD_LOCAL long digits = 0;
+#ifndef BOOST_MP_USING_THREAD_LOCAL
+ static BOOST_MP_THREAD_LOCAL bool b = false;
+ constant_initializer<T, &get_constant_log10<T> >::do_nothing();
+
+ if (!b || (digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+ b = true;
+#else
+ if ((digits != boost::multiprecision::detail::digits2<number<T> >::value()))
+ {
+#endif
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ T ten;
+ ten = ui_type(10u);
+ eval_log(result, ten);
+ digits = boost::multiprecision::detail::digits2<number<T> >::value();
+ }
+
+ return result;
+}
+
+template <class T>
+void eval_log10(T& result, const T& arg)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The log10 function is only valid for floating point types.");
+ eval_log(result, arg);
+ eval_divide(result, get_constant_log10<T>());
+}
+
+template <class R, class T>
+inline void eval_log2(R& result, const T& a)
+{
+ eval_log(result, a);
+ eval_divide(result, get_constant_ln2<R>());
+}
+
+template<typename T>
+inline void eval_pow(T& result, const T& x, const T& a)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The pow function is only valid for floating point types.");
+ typedef typename boost::multiprecision::detail::canonical<int, T>::type si_type;
+ typedef typename mpl::front<typename T::float_types>::type fp_type;
+
+ if((&result == &x) || (&result == &a))
+ {
+ T t;
+ eval_pow(t, x, a);
+ result = t;
+ return;
+ }
+
+ if((a.compare(si_type(1)) == 0) || (x.compare(si_type(1)) == 0))
+ {
+ result = x;
+ return;
+ }
+ if(a.compare(si_type(0)) == 0)
+ {
+ result = si_type(1);
+ return;
+ }
+
+ int type = eval_fpclassify(x);
+
+ switch(type)
+ {
+ case FP_ZERO:
+ switch(eval_fpclassify(a))
+ {
+ case FP_ZERO:
+ result = si_type(1);
+ break;
+ case FP_NAN:
+ result = a;
+ break;
+ case FP_NORMAL:
+ {
+ // Need to check for a an odd integer as a special case:
+ try
+ {
+ typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type i;
+ eval_convert_to(&i, a);
+ if(a.compare(i) == 0)
+ {
+ if(eval_signbit(a))
+ {
+ if(i & 1)
+ {
+ result = std::numeric_limits<number<T> >::infinity().backend();
+ if(eval_signbit(x))
+ result.negate();
+ errno = ERANGE;
+ }
+ else
+ {
+ result = std::numeric_limits<number<T> >::infinity().backend();
+ errno = ERANGE;
+ }
+ }
+ else if(i & 1)
+ {
+ result = x;
+ }
+ else
+ result = si_type(0);
+ return;
+ }
+ }
+ catch(const std::exception&)
+ {
+ // fallthrough..
+ }
+ }
+ default:
+ if(eval_signbit(a))
+ {
+ result = std::numeric_limits<number<T> >::infinity().backend();
+ errno = ERANGE;
+ }
+ else
+ result = x;
+ break;
+ }
+ return;
+ case FP_NAN:
+ result = x;
+ errno = ERANGE;
+ return;
+ default: ;
+ }
+
+ int s = eval_get_sign(a);
+ if(s == 0)
+ {
+ result = si_type(1);
+ return;
+ }
+
+ if(s < 0)
+ {
+ T t, da;
+ t = a;
+ t.negate();
+ eval_pow(da, x, t);
+ eval_divide(result, si_type(1), da);
+ return;
+ }
+
+ typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type an;
+ typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type max_an =
+ std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::is_specialized ?
+ (std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::max)() :
+ static_cast<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>(1) << (sizeof(typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type) * CHAR_BIT - 2);
+ typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type min_an =
+ std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::is_specialized ?
+ (std::numeric_limits<typename boost::multiprecision::detail::canonical<boost::intmax_t, T>::type>::min)() :
+ -min_an;
+
+
+ T fa;
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ eval_convert_to(&an, a);
+ if(a.compare(an) == 0)
+ {
+ detail::pow_imp(result, x, an, mpl::true_());
+ return;
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(const std::exception&)
+ {
+ // conversion failed, just fall through, value is not an integer.
+ an = (std::numeric_limits<boost::intmax_t>::max)();
+ }
+#endif
+ if((eval_get_sign(x) < 0))
+ {
+ typename boost::multiprecision::detail::canonical<boost::uintmax_t, T>::type aun;
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+ {
+#endif
+ eval_convert_to(&aun, a);
+ if(a.compare(aun) == 0)
+ {
+ fa = x;
+ fa.negate();
+ eval_pow(result, fa, a);
+ if(aun & 1u)
+ result.negate();
+ return;
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(const std::exception&)
+ {
+ // conversion failed, just fall through, value is not an integer.
+ }
+#endif
+ eval_floor(result, a);
+ // -1^INF is a special case in C99:
+ if((x.compare(si_type(-1)) == 0) && (eval_fpclassify(a) == FP_INFINITE))
+ {
+ result = si_type(1);
+ }
+ else if(a.compare(result) == 0)
+ {
+ // exponent is so large we have no fractional part:
+ if(x.compare(si_type(-1)) < 0)
+ {
+ result = std::numeric_limits<number<T, et_on> >::infinity().backend();
+ }
+ else
+ {
+ result = si_type(0);
+ }
+ }
+ else if(type == FP_INFINITE)
+ {
+ result = std::numeric_limits<number<T, et_on> >::infinity().backend();
+ }
+ else if(std::numeric_limits<number<T, et_on> >::has_quiet_NaN)
+ {
+ result = std::numeric_limits<number<T, et_on> >::quiet_NaN().backend();
+ errno = EDOM;
+ }
+ else
+ {
+ BOOST_THROW_EXCEPTION(std::domain_error("Result of pow is undefined or non-real and there is no NaN for this number type."));
+ }
+ return;
+ }
+
+ T t, da;
+
+ eval_subtract(da, a, an);
+
+ if((x.compare(fp_type(0.5)) >= 0) && (x.compare(fp_type(0.9)) < 0) && (an < max_an) && (an > min_an))
+ {
+ if(a.compare(fp_type(1e-5f)) <= 0)
+ {
+ // Series expansion for small a.
+ eval_log(t, x);
+ eval_multiply(t, a);
+ hyp0F0(result, t);
+ return;
+ }
+ else
+ {
+ // Series expansion for moderately sized x. Note that for large power of a,
+ // the power of the integer part of a is calculated using the pown function.
+ if(an)
+ {
+ da.negate();
+ t = si_type(1);
+ eval_subtract(t, x);
+ hyp1F0(result, da, t);
+ detail::pow_imp(t, x, an, mpl::true_());
+ eval_multiply(result, t);
+ }
+ else
+ {
+ da = a;
+ da.negate();
+ t = si_type(1);
+ eval_subtract(t, x);
+ hyp1F0(result, da, t);
+ }
+ }
+ }
+ else
+ {
+ // Series expansion for pow(x, a). Note that for large power of a, the power
+ // of the integer part of a is calculated using the pown function.
+ if(an)
+ {
+ eval_log(t, x);
+ eval_multiply(t, da);
+ eval_exp(result, t);
+ detail::pow_imp(t, x, an, mpl::true_());
+ eval_multiply(result, t);
+ }
+ else
+ {
+ eval_log(t, x);
+ eval_multiply(t, a);
+ eval_exp(result, t);
+ }
+ }
+}
+
+template<class T, class A>
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1800)
+inline typename enable_if_c<!is_integral<A>::value, void>::type
+#else
+inline typename enable_if_c<is_compatible_arithmetic_type<A, number<T> >::value && !is_integral<A>::value, void>::type
+#endif
+ eval_pow(T& result, const T& x, const A& a)
+{
+ // Note this one is restricted to float arguments since pow.hpp already has a version for
+ // integer powers....
+ typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
+ typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
+ cast_type c;
+ c = a;
+ eval_pow(result, x, c);
+}
+
+template<class T, class A>
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1800)
+inline void
+#else
+inline typename enable_if_c<is_compatible_arithmetic_type<A, number<T> >::value, void>::type
+#endif
+ eval_pow(T& result, const A& x, const T& a)
+{
+ typedef typename boost::multiprecision::detail::canonical<A, T>::type canonical_type;
+ typedef typename mpl::if_<is_same<A, canonical_type>, T, canonical_type>::type cast_type;
+ cast_type c;
+ c = x;
+ eval_pow(result, c, a);
+}
+
+template <class T>
+void eval_exp2(T& result, const T& arg)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The log function is only valid for floating point types.");
+
+ // Check for pure-integer arguments which can be either signed or unsigned.
+ typename boost::multiprecision::detail::canonical<typename T::exponent_type, T>::type i;
+ T temp;
+ try {
+ eval_trunc(temp, arg);
+ eval_convert_to(&i, temp);
+ if(arg.compare(i) == 0)
+ {
+ temp = static_cast<typename mpl::front<typename T::unsigned_types>::type>(1u);
+ eval_ldexp(result, temp, i);
+ return;
+ }
+ }
+ catch(const boost::math::rounding_error&)
+ { /* Fallthrough */ }
+ catch(const std::runtime_error&)
+ { /* Fallthrough */ }
+
+ temp = static_cast<typename mpl::front<typename T::unsigned_types>::type>(2u);
+ eval_pow(result, temp, arg);
+}
+
+namespace detail{
+
+ template <class T>
+ void small_sinh_series(T x, T& result)
+ {
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ bool neg = eval_get_sign(x) < 0;
+ if(neg)
+ x.negate();
+ T p(x);
+ T mult(x);
+ eval_multiply(mult, x);
+ result = x;
+ ui_type k = 1;
+
+ T lim(x);
+ eval_ldexp(lim, lim, 1 - boost::multiprecision::detail::digits2<number<T, et_on> >::value());
+
+ do
+ {
+ eval_multiply(p, mult);
+ eval_divide(p, ++k);
+ eval_divide(p, ++k);
+ eval_add(result, p);
+ }while(p.compare(lim) >= 0);
+ if(neg)
+ result.negate();
+ }
+
+ template <class T>
+ void sinhcosh(const T& x, T* p_sinh, T* p_cosh)
+ {
+ typedef typename boost::multiprecision::detail::canonical<unsigned, T>::type ui_type;
+ typedef typename mpl::front<typename T::float_types>::type fp_type;
+
+ switch(eval_fpclassify(x))
+ {
+ case FP_NAN:
+ errno = EDOM;
+ // fallthrough...
+ case FP_INFINITE:
+ if(p_sinh)
+ *p_sinh = x;
+ if(p_cosh)
+ {
+ *p_cosh = x;
+ if(eval_get_sign(x) < 0)
+ p_cosh->negate();
+ }
+ return;
+ case FP_ZERO:
+ if(p_sinh)
+ *p_sinh = x;
+ if(p_cosh)
+ *p_cosh = ui_type(1);
+ return;
+ default: ;
+ }
+
+ bool small_sinh = eval_get_sign(x) < 0 ? x.compare(fp_type(-0.5)) > 0 : x.compare(fp_type(0.5)) < 0;
+
+ if(p_cosh || !small_sinh)
+ {
+ T e_px, e_mx;
+ eval_exp(e_px, x);
+ eval_divide(e_mx, ui_type(1), e_px);
+ if(eval_signbit(e_mx) != eval_signbit(e_px))
+ e_mx.negate(); // Handles lack of signed zero in some types
+
+ if(p_sinh)
+ {
+ if(small_sinh)
+ {
+ small_sinh_series(x, *p_sinh);
+ }
+ else
+ {
+ eval_subtract(*p_sinh, e_px, e_mx);
+ eval_ldexp(*p_sinh, *p_sinh, -1);
+ }
+ }
+ if(p_cosh)
+ {
+ eval_add(*p_cosh, e_px, e_mx);
+ eval_ldexp(*p_cosh, *p_cosh, -1);
+ }
+ }
+ else
+ {
+ small_sinh_series(x, *p_sinh);
+ }
+ }
+
+} // namespace detail
+
+template <class T>
+inline void eval_sinh(T& result, const T& x)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The sinh function is only valid for floating point types.");
+ detail::sinhcosh(x, &result, static_cast<T*>(0));
+}
+
+template <class T>
+inline void eval_cosh(T& result, const T& x)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The cosh function is only valid for floating point types.");
+ detail::sinhcosh(x, static_cast<T*>(0), &result);
+}
+
+template <class T>
+inline void eval_tanh(T& result, const T& x)
+{
+ BOOST_STATIC_ASSERT_MSG(number_category<T>::value == number_kind_floating_point, "The tanh function is only valid for floating point types.");
+ T c;
+ detail::sinhcosh(x, &result, &c);
+ if((eval_fpclassify(result) == FP_INFINITE) && (eval_fpclassify(c) == FP_INFINITE))
+ {
+ bool s = eval_signbit(result) != eval_signbit(c);
+ result = static_cast<typename mpl::front<typename T::unsigned_types>::type>(1u);
+ if(s)
+ result.negate();
+ return;
+ }
+ eval_divide(result, c);
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/trig.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/trig.hpp
index c001f955c9f..c001f955c9f 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/functions/trig.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/functions/trig.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/generic_interconvert.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/generic_interconvert.hpp
index 730f45cc3a8..730f45cc3a8 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/generic_interconvert.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/generic_interconvert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/integer_ops.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/integer_ops.hpp
index 4b1a9d8baed..4b1a9d8baed 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/integer_ops.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/integer_ops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/min_max.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/min_max.hpp
index 56ac5346cfe..56ac5346cfe 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/min_max.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/min_max.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/no_et_ops.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/no_et_ops.hpp
new file mode 100644
index 00000000000..7058e387e69
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/no_et_ops.hpp
@@ -0,0 +1,660 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2012 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MP_NO_ET_OPS_HPP
+#define BOOST_MP_NO_ET_OPS_HPP
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4714)
+#endif
+
+namespace boost{
+namespace multiprecision{
+
+//
+// Operators for non-expression template enabled number.
+// NOTE: this is not a complete header - really just a suffix to default_ops.hpp.
+// NOTE: these operators have to be defined after the methods in default_ops.hpp.
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator - (const number<B, et_off>& v)
+{
+ BOOST_STATIC_ASSERT_MSG(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(v);
+ number<B, et_off> result(v);
+ result.backend().negate();
+ return result;
+}
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator ~ (const number<B, et_off>& v)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(v);
+ number<B, et_off> result;
+ eval_complement(result.backend(), v.backend());
+ return result;
+}
+//
+// Addition:
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator + (const number<B, et_off>& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ number<B, et_off> result;
+ using default_ops::eval_add;
+ eval_add(result.backend(), a.backend(), b.backend());
+ return result;
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator + (const number<B, et_off>& a, const V& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a);
+ number<B, et_off> result;
+ using default_ops::eval_add;
+ eval_add(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
+ return result;
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator + (const V& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b);
+ number<B, et_off> result;
+ using default_ops::eval_add;
+ eval_add(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
+ return result;
+}
+//
+// Subtraction:
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator - (const number<B, et_off>& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ number<B, et_off> result;
+ using default_ops::eval_subtract;
+ eval_subtract(result.backend(), a.backend(), b.backend());
+ return result;
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator - (const number<B, et_off>& a, const V& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a);
+ number<B, et_off> result;
+ using default_ops::eval_subtract;
+ eval_subtract(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
+ return result;
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator - (const V& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b);
+ number<B, et_off> result;
+ using default_ops::eval_subtract;
+ eval_subtract(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
+ return result;
+}
+//
+// Multiply:
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator * (const number<B, et_off>& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ number<B, et_off> result;
+ using default_ops::eval_multiply;
+ eval_multiply(result.backend(), a.backend(), b.backend());
+ return result;
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator * (const number<B, et_off>& a, const V& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a);
+ number<B, et_off> result;
+ using default_ops::eval_multiply;
+ eval_multiply(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
+ return result;
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator * (const V& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b);
+ number<B, et_off> result;
+ using default_ops::eval_multiply;
+ eval_multiply(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
+ return result;
+}
+//
+// divide:
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator / (const number<B, et_off>& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ number<B, et_off> result;
+ using default_ops::eval_divide;
+ eval_divide(result.backend(), a.backend(), b.backend());
+ return result;
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator / (const number<B, et_off>& a, const V& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a);
+ number<B, et_off> result;
+ using default_ops::eval_divide;
+ eval_divide(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
+ return result;
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator / (const V& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b);
+ number<B, et_off> result;
+ using default_ops::eval_divide;
+ eval_divide(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
+ return result;
+}
+//
+// modulus:
+//
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator % (const number<B, et_off>& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ number<B, et_off> result;
+ using default_ops::eval_modulus;
+ eval_modulus(result.backend(), a.backend(), b.backend());
+ return result;
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator % (const number<B, et_off>& a, const V& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a);
+ number<B, et_off> result;
+ using default_ops::eval_modulus;
+ eval_modulus(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
+ return result;
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator % (const V& a, const number<B, et_off>& b)
+{
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(b);
+ number<B, et_off> result;
+ using default_ops::eval_modulus;
+ eval_modulus(result.backend(), number<B, et_off>::canonical_value(a), b.backend());
+ return result;
+}
+//
+// Bitwise or:
+//
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (const number<B, et_off>& a, const number<B, et_off>& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(result.backend(), a.backend(), b.backend());
+ return result;
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator | (const number<B, et_off>& a, const V& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
+ return result;
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator | (const V& a, const number<B, et_off>& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
+ return result;
+}
+//
+// Bitwise xor:
+//
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (const number<B, et_off>& a, const number<B, et_off>& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(result.backend(), a.backend(), b.backend());
+ return result;
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator ^ (const number<B, et_off>& a, const V& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
+ return result;
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator ^ (const V& a, const number<B, et_off>& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
+ return result;
+}
+//
+// Bitwise and:
+//
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (const number<B, et_off>& a, const number<B, et_off>& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(result.backend(), a.backend(), b.backend());
+ return result;
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator & (const number<B, et_off>& a, const V& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(result.backend(), a.backend(), number<B, et_off>::canonical_value(b));
+ return result;
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator & (const V& a, const number<B, et_off>& b)
+{
+ number<B, et_off> result;
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(result.backend(), b.backend(), number<B, et_off>::canonical_value(a));
+ return result;
+}
+//
+// shifts:
+//
+template <class B, class I>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator << (const number<B, et_off>& a, const I& b)
+{
+ number<B, et_off> result(a);
+ using default_ops::eval_left_shift;
+ detail::check_shift_range(b, mpl::bool_<(sizeof(I) > sizeof(std::size_t))>(), is_signed<I>());
+ eval_left_shift(result.backend(), b);
+ return result;
+}
+template <class B, class I>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator >> (const number<B, et_off>& a, const I& b)
+{
+ number<B, et_off> result(a);
+ using default_ops::eval_right_shift;
+ detail::check_shift_range(b, mpl::bool_<(sizeof(I) > sizeof(std::size_t))>(), is_signed<I>());
+ eval_right_shift(result.backend(), b);
+ return result;
+}
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !(defined(__GNUC__) && ((__GNUC__ == 4) && (__GNUC_MINOR__ < 5)))
+//
+// If we have rvalue references go all over again with rvalue ref overloads and move semantics.
+// Note that while it would be tempting to implement these so they return an rvalue reference
+// (and indeed this would be optimally efficient), this is unsafe due to users propensity to
+// write:
+//
+// const T& t = a * b;
+//
+// which would lead to a dangling reference if we didn't return by value. Of course move
+// semantics help a great deal in return by value, so performance is still pretty good...
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& v)
+{
+ BOOST_STATIC_ASSERT_MSG(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
+ v.backend().negate();
+ return static_cast<number<B, et_off>&&>(v);
+}
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ~ (number<B, et_off>&& v)
+{
+ eval_complement(v.backend(), v.backend());
+ return static_cast<number<B, et_off>&&>(v);
+}
+//
+// Addition:
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator + (number<B, et_off>&& a, const number<B, et_off>& b)
+{
+ using default_ops::eval_add;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_add(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator + (const number<B, et_off>& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_add;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_add(b.backend(), a.backend());
+ return static_cast<number<B, et_off>&&>(b);
+}
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator + (number<B, et_off>&& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_add;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_add(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator + (number<B, et_off>&& a, const V& b)
+{
+ using default_ops::eval_add;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_add(a.backend(), number<B, et_off>::canonical_value(b));
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator + (const V& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_add;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_add(b.backend(), number<B, et_off>::canonical_value(a));
+ return static_cast<number<B, et_off>&&>(b);
+}
+//
+// Subtraction:
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& a, const number<B, et_off>& b)
+{
+ using default_ops::eval_subtract;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_subtract(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if<is_signed_number<B>, number<B, et_off> >::type operator - (const number<B, et_off>& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_subtract;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_subtract(b.backend(), a.backend());
+ b.backend().negate();
+ return static_cast<number<B, et_off>&&>(b);
+}
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator - (number<B, et_off>&& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_subtract;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_subtract(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator - (number<B, et_off>&& a, const V& b)
+{
+ using default_ops::eval_subtract;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_subtract(a.backend(), number<B, et_off>::canonical_value(b));
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<(is_compatible_arithmetic_type<V, number<B, et_off> >::value && is_signed_number<B>::value), number<B, et_off> >::type
+ operator - (const V& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_subtract;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_subtract(b.backend(), number<B, et_off>::canonical_value(a));
+ b.backend().negate();
+ return static_cast<number<B, et_off>&&>(b);
+}
+//
+// Multiply:
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator * (number<B, et_off>&& a, const number<B, et_off>& b)
+{
+ using default_ops::eval_multiply;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_multiply(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator * (const number<B, et_off>& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_multiply;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_multiply(b.backend(), a.backend());
+ return static_cast<number<B, et_off>&&>(b);
+}
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator * (number<B, et_off>&& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_multiply;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_multiply(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator * (number<B, et_off>&& a, const V& b)
+{
+ using default_ops::eval_multiply;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_multiply(a.backend(), number<B, et_off>::canonical_value(b));
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator * (const V& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_multiply;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_multiply(b.backend(), number<B, et_off>::canonical_value(a));
+ return static_cast<number<B, et_off>&&>(b);
+}
+//
+// divide:
+//
+template <class B>
+BOOST_MP_FORCEINLINE number<B, et_off> operator / (number<B, et_off>&& a, const number<B, et_off>& b)
+{
+ using default_ops::eval_divide;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_divide(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if<is_compatible_arithmetic_type<V, number<B, et_off> >, number<B, et_off> >::type
+ operator / (number<B, et_off>&& a, const V& b)
+{
+ using default_ops::eval_divide;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_divide(a.backend(), number<B, et_off>::canonical_value(b));
+ return static_cast<number<B, et_off>&&>(a);
+}
+//
+// modulus:
+//
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator % (number<B, et_off>&& a, const number<B, et_off>& b)
+{
+ using default_ops::eval_modulus;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_modulus(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator % (number<B, et_off>&& a, const V& b)
+{
+ using default_ops::eval_modulus;
+ detail::scoped_default_precision<multiprecision::number<B, et_off> > precision_guard(a, b);
+ eval_modulus(a.backend(), number<B, et_off>::canonical_value(b));
+ return static_cast<number<B, et_off>&&>(a);
+}
+//
+// Bitwise or:
+//
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (number<B, et_off>&& a, const number<B, et_off>& b)
+{
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (const number<B, et_off>& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(b.backend(), a.backend());
+ return static_cast<number<B, et_off>&&>(b);
+}
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator | (number<B, et_off>&& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator | (number<B, et_off>&& a, const V& b)
+{
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(a.backend(), number<B, et_off>::canonical_value(b));
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator | (const V& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(b.backend(), number<B, et_off>::canonical_value(a));
+ return static_cast<number<B, et_off>&&>(b);
+}
+//
+// Bitwise xor:
+//
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (number<B, et_off>&& a, const number<B, et_off>& b)
+{
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (const number<B, et_off>& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(b.backend(), a.backend());
+ return static_cast<number<B, et_off>&&>(b);
+}
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator ^ (number<B, et_off>&& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator ^ (number<B, et_off>&& a, const V& b)
+{
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(a.backend(), number<B, et_off>::canonical_value(b));
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator ^ (const V& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(b.backend(), number<B, et_off>::canonical_value(a));
+ return static_cast<number<B, et_off>&&>(b);
+}
+//
+// Bitwise and:
+//
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (number<B, et_off>&& a, const number<B, et_off>& b)
+{
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (const number<B, et_off>& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(b.backend(), a.backend());
+ return static_cast<number<B, et_off>&&>(b);
+}
+template <class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<number_category<B>::value == number_kind_integer, number<B, et_off> >::type operator & (number<B, et_off>&& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(a.backend(), b.backend());
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class V>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator & (number<B, et_off>&& a, const V& b)
+{
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(a.backend(), number<B, et_off>::canonical_value(b));
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class V, class B>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_off> >::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator & (const V& a, number<B, et_off>&& b)
+{
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(b.backend(), number<B, et_off>::canonical_value(a));
+ return static_cast<number<B, et_off>&&>(b);
+}
+//
+// shifts:
+//
+template <class B, class I>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator << (number<B, et_off>&& a, const I& b)
+{
+ using default_ops::eval_left_shift;
+ eval_left_shift(a.backend(), b);
+ return static_cast<number<B, et_off>&&>(a);
+}
+template <class B, class I>
+BOOST_MP_FORCEINLINE typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), number<B, et_off> >::type
+ operator >> (number<B, et_off>&& a, const I& b)
+{
+ using default_ops::eval_right_shift;
+ eval_right_shift(a.backend(), b);
+ return static_cast<number<B, et_off>&&>(a);
+}
+
+#endif
+
+}} // namespaces
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_MP_NO_ET_OPS_HPP
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/number_base.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/number_base.hpp
new file mode 100644
index 00000000000..9665a825a02
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/number_base.hpp
@@ -0,0 +1,1637 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_BIG_NUM_BASE_HPP
+#define BOOST_MATH_BIG_NUM_BASE_HPP
+
+#include <limits>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/decay.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4307)
+#endif
+#include <boost/lexical_cast.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#if defined(NDEBUG) && !defined(_DEBUG)
+# define BOOST_MP_FORCEINLINE BOOST_FORCEINLINE
+#else
+# define BOOST_MP_FORCEINLINE inline
+#endif
+
+#if (defined(BOOST_GCC) && (BOOST_GCC <= 40700)) || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5140) || (defined(__clang_major__) && (__clang_major__ == 3) && (__clang_minor__ < 5))
+# define BOOST_MP_NOEXCEPT_IF(x)
+#else
+# define BOOST_MP_NOEXCEPT_IF(x) BOOST_NOEXCEPT_IF(x)
+#endif
+
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) || BOOST_WORKAROUND(__SUNPRO_CC, < 0x5140)
+#define BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+#endif
+
+//
+// Thread local storage:
+// Note fails on Mingw, see https://sourceforge.net/p/mingw-w64/bugs/527/
+//
+#if !defined(BOOST_NO_CXX11_THREAD_LOCAL) && !defined(BOOST_INTEL) && !defined(__MINGW32__)
+# define BOOST_MP_THREAD_LOCAL thread_local
+# define BOOST_MP_USING_THREAD_LOCAL
+#else
+# define BOOST_MP_THREAD_LOCAL
+#endif
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:6326)
+#endif
+
+namespace boost{
+ namespace multiprecision{
+
+enum expression_template_option
+{
+ et_off = 0,
+ et_on = 1
+};
+
+template <class Backend>
+struct expression_template_default
+{
+ static const expression_template_option value = et_on;
+};
+
+template <class Backend, expression_template_option ExpressionTemplates = expression_template_default<Backend>::value>
+class number;
+
+template <class T>
+struct is_number : public mpl::false_ {};
+
+template <class Backend, expression_template_option ExpressionTemplates>
+struct is_number<number<Backend, ExpressionTemplates> > : public mpl::true_ {};
+
+template <class T>
+struct is_et_number : public mpl::false_ {};
+
+template <class Backend>
+struct is_et_number<number<Backend, et_on> > : public mpl::true_ {};
+
+template <class T>
+struct is_no_et_number : public mpl::false_ {};
+
+template <class Backend>
+struct is_no_et_number<number<Backend, et_off> > : public mpl::true_ {};
+
+namespace detail{
+
+// Forward-declare an expression wrapper
+template<class tag, class Arg1 = void, class Arg2 = void, class Arg3 = void, class Arg4 = void>
+struct expression;
+
+} // namespace detail
+
+template <class T>
+struct is_number_expression : public mpl::false_ {};
+
+template<class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+struct is_number_expression<detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > : public mpl::true_ {};
+
+template <class T, class Num>
+struct is_compatible_arithmetic_type
+ : public mpl::bool_<
+ is_convertible<T, Num>::value
+ && !is_same<T, Num>::value
+ && !is_number_expression<T>::value>
+{};
+
+namespace detail{
+//
+// Workaround for missing abs(boost::long_long_type) and abs(__int128) on some compilers:
+//
+template <class T>
+BOOST_CONSTEXPR typename enable_if_c<(is_signed<T>::value || is_floating_point<T>::value), T>::type abs(T t) BOOST_NOEXCEPT
+{
+ // This strange expression avoids a hardware trap in the corner case
+ // that val is the most negative value permitted in boost::long_long_type.
+ // See https://svn.boost.org/trac/boost/ticket/9740.
+ return t < 0 ? T(1u) + T(-(t + 1)) : t;
+}
+template <class T>
+BOOST_CONSTEXPR typename enable_if_c<(is_unsigned<T>::value), T>::type abs(T t) BOOST_NOEXCEPT
+{
+ return t;
+}
+
+#define BOOST_MP_USING_ABS using boost::multiprecision::detail::abs;
+
+template <class T>
+BOOST_CONSTEXPR typename enable_if_c<(is_signed<T>::value || is_floating_point<T>::value), typename make_unsigned<T>::type>::type unsigned_abs(T t) BOOST_NOEXCEPT
+{
+ // This strange expression avoids a hardware trap in the corner case
+ // that val is the most negative value permitted in boost::long_long_type.
+ // See https://svn.boost.org/trac/boost/ticket/9740.
+ return t < 0 ? static_cast<typename make_unsigned<T>::type>(1u) + static_cast<typename make_unsigned<T>::type>(-(t + 1)) : static_cast<typename make_unsigned<T>::type>(t);
+}
+template <class T>
+BOOST_CONSTEXPR typename enable_if_c<(is_unsigned<T>::value), T>::type unsigned_abs(T t) BOOST_NOEXCEPT
+{
+ return t;
+}
+
+//
+// Move support:
+//
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+# define BOOST_MP_MOVE(x) std::move(x)
+#else
+# define BOOST_MP_MOVE(x) x
+#endif
+
+template <class T>
+struct bits_of
+{
+ BOOST_STATIC_ASSERT(is_integral<T>::value || is_enum<T>::value || std::numeric_limits<T>::is_specialized);
+ static const unsigned value =
+ std::numeric_limits<T>::is_specialized ?
+ std::numeric_limits<T>::digits
+ : sizeof(T) * CHAR_BIT - (is_signed<T>::value ? 1 : 0);
+};
+
+#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__)
+template<> struct bits_of<__float128> { static const unsigned value = 113; };
+#endif
+
+template <int b>
+struct has_enough_bits
+{
+ template <class T>
+ struct type : public mpl::bool_<bits_of<T>::value>= b>{};
+};
+
+template <class Val, class Backend, class Tag>
+struct canonical_imp
+{
+ typedef typename remove_cv<typename decay<const Val>::type>::type type;
+};
+template <class B, class Backend, class Tag>
+struct canonical_imp<number<B, et_on>, Backend, Tag>
+{
+ typedef B type;
+};
+template <class B, class Backend, class Tag>
+struct canonical_imp<number<B, et_off>, Backend, Tag>
+{
+ typedef B type;
+};
+#ifdef __SUNPRO_CC
+template <class B, class Backend>
+struct canonical_imp<number<B, et_on>, Backend, mpl::int_<3> >
+{
+ typedef B type;
+};
+template <class B, class Backend>
+struct canonical_imp<number<B, et_off>, Backend, mpl::int_<3> >
+{
+ typedef B type;
+};
+#endif
+template <class Val, class Backend>
+struct canonical_imp<Val, Backend, mpl::int_<0> >
+{
+ typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type;
+ typedef typename mpl::find_if<
+ typename Backend::signed_types,
+ pred_type
+ >::type iter_type;
+ typedef typename mpl::end<typename Backend::signed_types>::type end_type;
+ typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type;
+};
+template <class Val, class Backend>
+struct canonical_imp<Val, Backend, mpl::int_<1> >
+{
+ typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type;
+ typedef typename mpl::find_if<
+ typename Backend::unsigned_types,
+ pred_type
+ >::type iter_type;
+ typedef typename mpl::end<typename Backend::unsigned_types>::type end_type;
+ typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type;
+};
+template <class Val, class Backend>
+struct canonical_imp<Val, Backend, mpl::int_<2> >
+{
+ typedef typename has_enough_bits<bits_of<Val>::value>::template type<mpl::_> pred_type;
+ typedef typename mpl::find_if<
+ typename Backend::float_types,
+ pred_type
+ >::type iter_type;
+ typedef typename mpl::end<typename Backend::float_types>::type end_type;
+ typedef typename mpl::eval_if<boost::is_same<iter_type, end_type>, mpl::identity<Val>, mpl::deref<iter_type> >::type type;
+};
+template <class Val, class Backend>
+struct canonical_imp<Val, Backend, mpl::int_<3> >
+{
+ typedef const char* type;
+};
+
+template <class Val, class Backend>
+struct canonical
+{
+ typedef typename mpl::if_<
+ is_signed<Val>,
+ mpl::int_<0>,
+ typename mpl::if_<
+ is_unsigned<Val>,
+ mpl::int_<1>,
+ typename mpl::if_<
+ is_floating_point<Val>,
+ mpl::int_<2>,
+ typename mpl::if_<
+ mpl::or_<
+ is_convertible<Val, const char*>,
+ is_same<Val, std::string>
+ >,
+ mpl::int_<3>,
+ mpl::int_<4>
+ >::type
+ >::type
+ >::type
+ >::type tag_type;
+
+ typedef typename canonical_imp<Val, Backend, tag_type>::type type;
+};
+
+struct terminal{};
+struct negate{};
+struct plus{};
+struct minus{};
+struct multiplies{};
+struct divides{};
+struct modulus{};
+struct shift_left{};
+struct shift_right{};
+struct bitwise_and{};
+struct bitwise_or{};
+struct bitwise_xor{};
+struct bitwise_complement{};
+struct add_immediates{};
+struct subtract_immediates{};
+struct multiply_immediates{};
+struct divide_immediates{};
+struct modulus_immediates{};
+struct bitwise_and_immediates{};
+struct bitwise_or_immediates{};
+struct bitwise_xor_immediates{};
+struct complement_immediates{};
+struct function{};
+struct multiply_add{};
+struct multiply_subtract{};
+
+template <class T>
+struct backend_type;
+
+template <class T, expression_template_option ExpressionTemplates>
+struct backend_type<number<T, ExpressionTemplates> >
+{
+ typedef T type;
+};
+
+template <class tag, class A1, class A2, class A3, class A4>
+struct backend_type<expression<tag, A1, A2, A3, A4> >
+{
+ typedef typename backend_type<typename expression<tag, A1, A2, A3, A4>::result_type>::type type;
+};
+
+
+template <class T1, class T2>
+struct combine_expression
+{
+#ifdef BOOST_NO_CXX11_DECLTYPE
+ typedef typename mpl::if_c<(sizeof(T1() + T2()) == sizeof(T1)), T1, T2>::type type;
+#else
+ typedef decltype(T1() + T2()) type;
+#endif
+};
+
+template <class T1, expression_template_option ExpressionTemplates, class T2>
+struct combine_expression<number<T1, ExpressionTemplates>, T2>
+{
+ typedef number<T1, ExpressionTemplates> type;
+};
+
+template <class T1, class T2, expression_template_option ExpressionTemplates>
+struct combine_expression<T1, number<T2, ExpressionTemplates> >
+{
+ typedef number<T2, ExpressionTemplates> type;
+};
+
+template <class T, expression_template_option ExpressionTemplates>
+struct combine_expression<number<T, ExpressionTemplates>, number<T, ExpressionTemplates> >
+{
+ typedef number<T, ExpressionTemplates> type;
+};
+
+template <class T1, expression_template_option ExpressionTemplates1, class T2, expression_template_option ExpressionTemplates2>
+struct combine_expression<number<T1, ExpressionTemplates1>, number<T2, ExpressionTemplates2> >
+{
+ typedef typename mpl::if_c<
+ is_convertible<number<T2, ExpressionTemplates2>, number<T1, ExpressionTemplates2> >::value,
+ number<T1, ExpressionTemplates1>,
+ number<T2, ExpressionTemplates2>
+ >::type type;
+};
+
+template <class T>
+struct arg_type
+{
+ typedef expression<terminal, T> type;
+};
+
+template <class Tag, class Arg1, class Arg2, class Arg3, class Arg4>
+struct arg_type<expression<Tag, Arg1, Arg2, Arg3, Arg4> >
+{
+ typedef expression<Tag, Arg1, Arg2, Arg3, Arg4> type;
+};
+
+struct unmentionable
+{
+ unmentionable* proc(){ return 0; }
+};
+
+typedef unmentionable* (unmentionable::*unmentionable_type)();
+
+template <class T, bool b>
+struct expression_storage_base
+{
+ typedef const T& type;
+};
+
+template <class T>
+struct expression_storage_base<T, true>
+{
+ typedef T type;
+};
+
+template <class T>
+struct expression_storage : public expression_storage_base<T, boost::is_arithmetic<T>::value> {};
+
+template <class T>
+struct expression_storage<T*>
+{
+ typedef T* type;
+};
+
+template <class T>
+struct expression_storage<const T*>
+{
+ typedef const T* type;
+};
+
+template <class tag, class A1, class A2, class A3, class A4>
+struct expression_storage<expression<tag, A1, A2, A3, A4> >
+{
+ typedef expression<tag, A1, A2, A3, A4> type;
+};
+
+template<class tag, class Arg1>
+struct expression<tag, Arg1, void, void, void>
+{
+ typedef mpl::int_<1> arity;
+ typedef typename arg_type<Arg1>::type left_type;
+ typedef typename left_type::result_type left_result_type;
+ typedef typename left_type::result_type result_type;
+ typedef tag tag_type;
+
+ explicit expression(const Arg1& a) : arg(a) {}
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+ //
+ // If we have static_assert we can give a more useful error message
+ // than if we simply have no operator defined at all:
+ //
+ template <class Other>
+ expression& operator=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator+=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator-=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator*=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator/=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator%=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator|=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator&=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator^=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator<<=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator>>=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+#endif
+
+ left_type left()const { return left_type(arg); }
+
+ const Arg1& left_ref()const BOOST_NOEXCEPT { return arg; }
+
+ static const unsigned depth = left_type::depth + 1;
+#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
+ //
+ // Horrible workaround for gcc-4.6.x which always prefers the template
+ // operator bool() rather than the non-template operator when converting to
+ // an arithmetic type:
+ //
+ template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
+ explicit operator T ()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+ }
+ template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
+ explicit operator T ()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+# else
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
+ explicit operator T()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+ BOOST_MP_FORCEINLINE explicit operator bool()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+ }
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
+# endif
+#else
+ operator unmentionable_type()const
+ {
+ result_type r(*this);
+ return r ? &unmentionable::proc : 0;
+ }
+#endif
+
+ template <class T>
+ T convert_to()
+ {
+ result_type r(*this);
+ return r.template convert_to<T>();
+ }
+
+private:
+ typename expression_storage<Arg1>::type arg;
+ expression& operator=(const expression&);
+};
+
+template<class Arg1>
+struct expression<terminal, Arg1, void, void, void>
+{
+ typedef mpl::int_<0> arity;
+ typedef Arg1 result_type;
+ typedef terminal tag_type;
+
+ explicit expression(const Arg1& a) : arg(a) {}
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+ //
+ // If we have static_assert we can give a more useful error message
+ // than if we simply have no operator defined at all:
+ //
+ template <class Other>
+ expression& operator=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator+=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator-=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator*=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator/=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator%=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator|=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator&=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator^=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator<<=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator>>=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+#endif
+
+ const Arg1& value()const BOOST_NOEXCEPT { return arg; }
+
+ static const unsigned depth = 0;
+
+#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
+ //
+ // Horrible workaround for gcc-4.6.x which always prefers the template
+ // operator bool() rather than the non-template operator when converting to
+ // an arithmetic type:
+ //
+ template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
+ explicit operator T ()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+}
+ template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
+ explicit operator T ()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+# else
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
+ explicit operator T()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+ BOOST_MP_FORCEINLINE explicit operator bool()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+ }
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
+# endif
+#else
+ operator unmentionable_type()const
+ {
+ return arg ? &unmentionable::proc : 0;
+ }
+#endif
+
+ template <class T>
+ T convert_to()
+ {
+ result_type r(*this);
+ return r.template convert_to<T>();
+ }
+
+private:
+ typename expression_storage<Arg1>::type arg;
+ expression& operator=(const expression&);
+};
+
+template <class tag, class Arg1, class Arg2>
+struct expression<tag, Arg1, Arg2, void, void>
+{
+ typedef mpl::int_<2> arity;
+ typedef typename arg_type<Arg1>::type left_type;
+ typedef typename arg_type<Arg2>::type right_type;
+ typedef typename left_type::result_type left_result_type;
+ typedef typename right_type::result_type right_result_type;
+ typedef typename combine_expression<left_result_type, right_result_type>::type result_type;
+ typedef tag tag_type;
+
+ expression(const Arg1& a1, const Arg2& a2) : arg1(a1), arg2(a2) {}
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+ //
+ // If we have static_assert we can give a more useful error message
+ // than if we simply have no operator defined at all:
+ //
+ template <class Other>
+ expression& operator=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator+=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator-=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator*=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator/=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator%=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator|=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator&=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator^=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator<<=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator>>=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+#endif
+
+ left_type left()const { return left_type(arg1); }
+ right_type right()const { return right_type(arg2); }
+ const Arg1& left_ref()const BOOST_NOEXCEPT { return arg1; }
+ const Arg2& right_ref()const BOOST_NOEXCEPT { return arg2; }
+
+#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
+ //
+ // Horrible workaround for gcc-4.6.x which always prefers the template
+ // operator bool() rather than the non-template operator when converting to
+ // an arithmetic type:
+ //
+ template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
+ explicit operator T ()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+}
+ template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
+ explicit operator T ()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+# else
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
+ explicit operator T()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+ BOOST_MP_FORCEINLINE explicit operator bool()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+ }
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
+# endif
+#else
+ operator unmentionable_type()const
+ {
+ result_type r(*this);
+ return r ? &unmentionable::proc : 0;
+ }
+#endif
+ template <class T>
+ T convert_to()
+ {
+ result_type r(*this);
+ return r.template convert_to<T>();
+ }
+
+ static const unsigned left_depth = left_type::depth + 1;
+ static const unsigned right_depth = right_type::depth + 1;
+ static const unsigned depth = left_depth > right_depth ? left_depth : right_depth;
+private:
+ typename expression_storage<Arg1>::type arg1;
+ typename expression_storage<Arg2>::type arg2;
+ expression& operator=(const expression&);
+};
+
+template <class tag, class Arg1, class Arg2, class Arg3>
+struct expression<tag, Arg1, Arg2, Arg3, void>
+{
+ typedef mpl::int_<3> arity;
+ typedef typename arg_type<Arg1>::type left_type;
+ typedef typename arg_type<Arg2>::type middle_type;
+ typedef typename arg_type<Arg3>::type right_type;
+ typedef typename left_type::result_type left_result_type;
+ typedef typename middle_type::result_type middle_result_type;
+ typedef typename right_type::result_type right_result_type;
+ typedef typename combine_expression<
+ left_result_type,
+ typename combine_expression<right_result_type, middle_result_type>::type
+ >::type result_type;
+ typedef tag tag_type;
+
+ expression(const Arg1& a1, const Arg2& a2, const Arg3& a3) : arg1(a1), arg2(a2), arg3(a3) {}
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+ //
+ // If we have static_assert we can give a more useful error message
+ // than if we simply have no operator defined at all:
+ //
+ template <class Other>
+ expression& operator=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator+=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator-=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator*=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator/=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator%=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator|=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator&=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator^=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator<<=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator>>=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+#endif
+
+ left_type left()const { return left_type(arg1); }
+ middle_type middle()const { return middle_type(arg2); }
+ right_type right()const { return right_type(arg3); }
+ const Arg1& left_ref()const BOOST_NOEXCEPT { return arg1; }
+ const Arg2& middle_ref()const BOOST_NOEXCEPT { return arg2; }
+ const Arg3& right_ref()const BOOST_NOEXCEPT { return arg3; }
+
+#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
+ //
+ // Horrible workaround for gcc-4.6.x which always prefers the template
+ // operator bool() rather than the non-template operator when converting to
+ // an arithmetic type:
+ //
+ template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
+ explicit operator T ()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+}
+ template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
+ explicit operator T ()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+# else
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
+ explicit operator T()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+ BOOST_MP_FORCEINLINE explicit operator bool()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+ }
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
+# endif
+#else
+ operator unmentionable_type()const
+ {
+ result_type r(*this);
+ return r ? &unmentionable::proc : 0;
+ }
+#endif
+ template <class T>
+ T convert_to()
+ {
+ result_type r(*this);
+ return r.template convert_to<T>();
+ }
+
+ static const unsigned left_depth = left_type::depth + 1;
+ static const unsigned middle_depth = middle_type::depth + 1;
+ static const unsigned right_depth = right_type::depth + 1;
+ static const unsigned depth = left_depth > right_depth ? (left_depth > middle_depth ? left_depth : middle_depth) : (right_depth > middle_depth ? right_depth : middle_depth);
+private:
+ typename expression_storage<Arg1>::type arg1;
+ typename expression_storage<Arg2>::type arg2;
+ typename expression_storage<Arg3>::type arg3;
+ expression& operator=(const expression&);
+};
+
+template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+struct expression
+{
+ typedef mpl::int_<4> arity;
+ typedef typename arg_type<Arg1>::type left_type;
+ typedef typename arg_type<Arg2>::type left_middle_type;
+ typedef typename arg_type<Arg3>::type right_middle_type;
+ typedef typename arg_type<Arg4>::type right_type;
+ typedef typename left_type::result_type left_result_type;
+ typedef typename left_middle_type::result_type left_middle_result_type;
+ typedef typename right_middle_type::result_type right_middle_result_type;
+ typedef typename right_type::result_type right_result_type;
+ typedef typename combine_expression<
+ left_result_type,
+ typename combine_expression<
+ left_middle_result_type,
+ typename combine_expression<right_middle_result_type, right_result_type>::type
+ >::type
+ >::type result_type;
+ typedef tag tag_type;
+
+ expression(const Arg1& a1, const Arg2& a2, const Arg3& a3, const Arg4& a4) : arg1(a1), arg2(a2), arg3(a3), arg4(a4) {}
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+ //
+ // If we have static_assert we can give a more useful error message
+ // than if we simply have no operator defined at all:
+ //
+ template <class Other>
+ expression& operator=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not assign to a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator++(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not increment a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--()
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ expression& operator--(int)
+ {
+ // This should always fail:
+ static_assert(sizeof(*this) == INT_MAX, "You can not decrement a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator+=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator+= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator-=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator-= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator*=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator*= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator/=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator/= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator%=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator%= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator|=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator|= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator&=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator&= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator^=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator^= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator<<=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator<<= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+ template <class Other>
+ expression& operator>>=(const Other&)
+ {
+ // This should always fail:
+ static_assert(sizeof(Other) == INT_MAX, "You can not use operator>>= on a Boost.Multiprecision expression template: did you inadvertantly store an expression template in a \"auto\" variable? Or pass an expression to a template function with deduced temnplate arguments?");
+ return *this;
+ }
+#endif
+
+ left_type left()const { return left_type(arg1); }
+ left_middle_type left_middle()const { return left_middle_type(arg2); }
+ right_middle_type right_middle()const { return right_middle_type(arg3); }
+ right_type right()const { return right_type(arg4); }
+ const Arg1& left_ref()const BOOST_NOEXCEPT { return arg1; }
+ const Arg2& left_middle_ref()const BOOST_NOEXCEPT { return arg2; }
+ const Arg3& right_middle_ref()const BOOST_NOEXCEPT { return arg3; }
+ const Arg4& right_ref()const BOOST_NOEXCEPT { return arg4; }
+
+#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
+ //
+ // Horrible workaround for gcc-4.6.x which always prefers the template
+ // operator bool() rather than the non-template operator when converting to
+ // an arithmetic type:
+ //
+ template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
+ explicit operator T ()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+}
+ template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value || is_number<T>::value, int>::type = 0>
+ explicit operator T ()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+# else
+ template <class T
+#ifndef __SUNPRO_CC
+, typename boost::disable_if_c<is_number<T>::value || is_constructible<T const&, result_type>::value, int>::type = 0
+#endif
+>
+ explicit operator T()const
+ {
+ return static_cast<T>(static_cast<result_type>(*this));
+ }
+ BOOST_MP_FORCEINLINE explicit operator bool()const
+ {
+ result_type r(*this);
+ return static_cast<bool>(r);
+ }
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
+# endif
+#else
+ operator unmentionable_type()const
+ {
+ result_type r(*this);
+ return r ? &unmentionable::proc : 0;
+ }
+#endif
+ template <class T>
+ T convert_to()
+ {
+ result_type r(*this);
+ return r.template convert_to<T>();
+ }
+
+ static const unsigned left_depth = left_type::depth + 1;
+ static const unsigned left_middle_depth = left_middle_type::depth + 1;
+ static const unsigned right_middle_depth = right_middle_type::depth + 1;
+ static const unsigned right_depth = right_type::depth + 1;
+
+ static const unsigned left_max_depth = left_depth > left_middle_depth ? left_depth : left_middle_depth;
+ static const unsigned right_max_depth = right_depth > right_middle_depth ? right_depth : right_middle_depth;
+
+ static const unsigned depth = left_max_depth > right_max_depth ? left_max_depth : right_max_depth;
+private:
+ typename expression_storage<Arg1>::type arg1;
+ typename expression_storage<Arg2>::type arg2;
+ typename expression_storage<Arg3>::type arg3;
+ typename expression_storage<Arg4>::type arg4;
+ expression& operator=(const expression&);
+};
+
+template <class T>
+struct digits2
+{
+ BOOST_STATIC_ASSERT(std::numeric_limits<T>::is_specialized);
+ BOOST_STATIC_ASSERT((std::numeric_limits<T>::radix == 2) || (std::numeric_limits<T>::radix == 10));
+ // If we really have so many digits that this fails, then we're probably going to hit other problems anyway:
+ BOOST_STATIC_ASSERT(LONG_MAX / 1000 > (std::numeric_limits<T>::digits + 1));
+ static const long m_value = std::numeric_limits<T>::radix == 10 ? (((std::numeric_limits<T>::digits + 1) * 1000L) / 301L) : std::numeric_limits<T>::digits;
+ static inline BOOST_CONSTEXPR long value()BOOST_NOEXCEPT { return m_value; }
+};
+
+#ifndef BOOST_MP_MIN_EXPONENT_DIGITS
+#ifdef _MSC_VER
+# define BOOST_MP_MIN_EXPONENT_DIGITS 2
+#else
+# define BOOST_MP_MIN_EXPONENT_DIGITS 2
+#endif
+#endif
+
+template <class S>
+void format_float_string(S& str, boost::intmax_t my_exp, boost::intmax_t digits, std::ios_base::fmtflags f, bool iszero)
+{
+ typedef typename S::size_type size_type;
+ bool scientific = (f & std::ios_base::scientific) == std::ios_base::scientific;
+ bool fixed = (f & std::ios_base::fixed) == std::ios_base::fixed;
+ bool showpoint = (f & std::ios_base::showpoint) == std::ios_base::showpoint;
+ bool showpos = (f & std::ios_base::showpos) == std::ios_base::showpos;
+
+ bool neg = str.size() && (str[0] == '-');
+
+ if(neg)
+ str.erase(0, 1);
+
+ if(digits == 0)
+ {
+ digits = (std::max)(str.size(), size_type(16));
+ }
+
+ if(iszero || str.empty() || (str.find_first_not_of('0') == S::npos))
+ {
+ // We will be printing zero, even though the value might not
+ // actually be zero (it just may have been rounded to zero).
+ str = "0";
+ if(scientific || fixed)
+ {
+ str.append(1, '.');
+ str.append(size_type(digits), '0');
+ if(scientific)
+ str.append("e+00");
+ }
+ else
+ {
+ if(showpoint)
+ {
+ str.append(1, '.');
+ if(digits > 1)
+ str.append(size_type(digits - 1), '0');
+ }
+ }
+ if(neg)
+ str.insert(static_cast<std::string::size_type>(0), 1, '-');
+ else if(showpos)
+ str.insert(static_cast<std::string::size_type>(0), 1, '+');
+ return;
+ }
+
+ if(!fixed && !scientific && !showpoint)
+ {
+ //
+ // Suppress trailing zeros:
+ //
+ std::string::iterator pos = str.end();
+ while(pos != str.begin() && *--pos == '0'){}
+ if(pos != str.end())
+ ++pos;
+ str.erase(pos, str.end());
+ if(str.empty())
+ str = '0';
+ }
+ else if(!fixed || (my_exp >= 0))
+ {
+ //
+ // Pad out the end with zero's if we need to:
+ //
+ boost::intmax_t chars = str.size();
+ chars = digits - chars;
+ if(scientific)
+ ++chars;
+ if(chars > 0)
+ {
+ str.append(static_cast<std::string::size_type>(chars), '0');
+ }
+ }
+
+ if(fixed || (!scientific && (my_exp >= -4) && (my_exp < digits)))
+ {
+ if(1 + my_exp > static_cast<boost::intmax_t>(str.size()))
+ {
+ // Just pad out the end with zeros:
+ str.append(static_cast<std::string::size_type>(1 + my_exp - str.size()), '0');
+ if(showpoint || fixed)
+ str.append(".");
+ }
+ else if(my_exp + 1 < static_cast<boost::intmax_t>(str.size()))
+ {
+ if(my_exp < 0)
+ {
+ str.insert(static_cast<std::string::size_type>(0), static_cast<std::string::size_type>(-1 - my_exp), '0');
+ str.insert(static_cast<std::string::size_type>(0), "0.");
+ }
+ else
+ {
+ // Insert the decimal point:
+ str.insert(static_cast<std::string::size_type>(my_exp + 1), 1, '.');
+ }
+ }
+ else if(showpoint || fixed) // we have exactly the digits we require to left of the point
+ str += ".";
+
+ if(fixed)
+ {
+ // We may need to add trailing zeros:
+ boost::intmax_t l = str.find('.') + 1;
+ l = digits - (str.size() - l);
+ if(l > 0)
+ str.append(size_type(l), '0');
+ }
+ }
+ else
+ {
+ BOOST_MP_USING_ABS
+ // Scientific format:
+ if(showpoint || (str.size() > 1))
+ str.insert(static_cast<std::string::size_type>(1u), 1, '.');
+ str.append(static_cast<std::string::size_type>(1u), 'e');
+ S e = boost::lexical_cast<S>(abs(my_exp));
+ if(e.size() < BOOST_MP_MIN_EXPONENT_DIGITS)
+ e.insert(static_cast<std::string::size_type>(0), BOOST_MP_MIN_EXPONENT_DIGITS - e.size(), '0');
+ if(my_exp < 0)
+ e.insert(static_cast<std::string::size_type>(0), 1, '-');
+ else
+ e.insert(static_cast<std::string::size_type>(0), 1, '+');
+ str.append(e);
+ }
+ if(neg)
+ str.insert(static_cast<std::string::size_type>(0), 1, '-');
+ else if(showpos)
+ str.insert(static_cast<std::string::size_type>(0), 1, '+');
+}
+
+template <class V>
+void check_shift_range(V val, const mpl::true_&, const mpl::true_&)
+{
+ if(val > (std::numeric_limits<std::size_t>::max)())
+ BOOST_THROW_EXCEPTION(std::out_of_range("Can not shift by a value greater than std::numeric_limits<std::size_t>::max()."));
+ if(val < 0)
+ BOOST_THROW_EXCEPTION(std::out_of_range("Can not shift by a negative value."));
+}
+template <class V>
+void check_shift_range(V val, const mpl::false_&, const mpl::true_&)
+{
+ if(val < 0)
+ BOOST_THROW_EXCEPTION(std::out_of_range("Can not shift by a negative value."));
+}
+template <class V>
+void check_shift_range(V val, const mpl::true_&, const mpl::false_&)
+{
+ if(val > (std::numeric_limits<std::size_t>::max)())
+ BOOST_THROW_EXCEPTION(std::out_of_range("Can not shift by a value greater than std::numeric_limits<std::size_t>::max()."));
+}
+template <class V>
+void check_shift_range(V, const mpl::false_&, const mpl::false_&) BOOST_NOEXCEPT{}
+
+template <class T>
+const T& evaluate_if_expression(const T& val) { return val; }
+template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+typename expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type evaluate_if_expression(const expression<tag, Arg1, Arg2, Arg3, Arg4>& val) { return val; }
+
+
+} // namespace detail
+
+//
+// Traits class, lets us know what kind of number we have, defaults to a floating point type:
+//
+enum number_category_type
+{
+ number_kind_unknown = -1,
+ number_kind_integer = 0,
+ number_kind_floating_point = 1,
+ number_kind_rational = 2,
+ number_kind_fixed_point = 3,
+ number_kind_complex = 4
+};
+
+template <class Num>
+struct number_category : public mpl::int_<std::numeric_limits<Num>::is_integer ? number_kind_integer : (std::numeric_limits<Num>::max_exponent ? number_kind_floating_point : number_kind_unknown)> {};
+template <class Backend, expression_template_option ExpressionTemplates>
+struct number_category<number<Backend, ExpressionTemplates> > : public number_category<Backend>{};
+template <class tag, class A1, class A2, class A3, class A4>
+struct number_category<detail::expression<tag, A1, A2, A3, A4> > : public number_category<typename detail::expression<tag, A1, A2, A3, A4>::result_type>{};
+//
+// Specializations for types which do not always have numberic_limits specializations:
+//
+#ifdef BOOST_HAS_INT128
+template <>
+struct number_category<__int128> : public mpl::int_<number_kind_integer> {};
+template <>
+struct number_category<unsigned __int128> : public mpl::int_<number_kind_integer> {};
+#endif
+#ifdef BOOST_HAS_FLOAT128
+template <>
+struct number_category<__float128> : public mpl::int_<number_kind_floating_point> {};
+#endif
+
+template <class T>
+struct component_type { typedef T type; };
+template <class tag, class A1, class A2, class A3, class A4>
+struct component_type<detail::expression<tag, A1, A2, A3, A4> > : public component_type<typename detail::expression<tag, A1, A2, A3, A4>::result_type>{};
+
+template <class T>
+struct scalar_result_from_possible_complex
+{
+ typedef typename mpl::if_c<number_category<T>::value == number_kind_complex,
+ typename component_type<T>::type, T>::type type;
+};
+
+template <class T>
+struct complex_result_from_scalar; // individual backends must specialize this trait.
+
+template <class T>
+struct is_unsigned_number : public mpl::false_{};
+template <class Backend, expression_template_option ExpressionTemplates>
+struct is_unsigned_number<number<Backend, ExpressionTemplates> > : public is_unsigned_number<Backend> {};
+template <class T>
+struct is_signed_number : public mpl::bool_<!is_unsigned_number<T>::value> {};
+template <class T>
+struct is_interval_number : public mpl::false_ {};
+template <class Backend, expression_template_option ExpressionTemplates>
+struct is_interval_number<number<Backend, ExpressionTemplates> > : public is_interval_number<Backend>{};
+
+}} // namespaces
+
+namespace boost{ namespace math{ namespace tools{
+
+template <class T>
+struct promote_arg;
+
+template <class tag, class A1, class A2, class A3, class A4>
+struct promote_arg<boost::multiprecision::detail::expression<tag, A1, A2, A3, A4> >
+{
+ typedef typename boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type type;
+};
+
+template <class R, class B, boost::multiprecision::expression_template_option ET>
+inline R real_cast(const boost::multiprecision::number<B, ET>& val)
+{
+ return val.template convert_to<R>();
+}
+
+template <class R, class tag, class A1, class A2, class A3, class A4>
+inline R real_cast(const boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>& val)
+{
+ typedef typename boost::multiprecision::detail::expression<tag, A1, A2, A3, A4>::result_type val_type;
+ return val_type(val).template convert_to<R>();
+}
+
+
+}
+
+namespace constants{
+
+ template <class T>
+ struct is_explicitly_convertible_from_string;
+
+ template <class B, boost::multiprecision::expression_template_option ET>
+ struct is_explicitly_convertible_from_string<boost::multiprecision::number<B, ET> >
+ {
+ static const bool value = true;
+ };
+
+}
+
+}}
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#endif // BOOST_MATH_BIG_NUM_BASE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/number_compare.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/number_compare.hpp
index 0c9618484a0..0c9618484a0 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/number_compare.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/number_compare.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/precision.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/precision.hpp
new file mode 100644
index 00000000000..f5963abf697
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/precision.hpp
@@ -0,0 +1,139 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2018 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MP_PRECISION_HPP
+#define BOOST_MP_PRECISION_HPP
+
+#include <boost/multiprecision/traits/is_variable_precision.hpp>
+#include <boost/multiprecision/detail/number_base.hpp>
+
+namespace boost{ namespace multiprecision{ namespace detail{
+
+ template <class B, boost::multiprecision::expression_template_option ET>
+ inline unsigned current_precision_of_imp(const boost::multiprecision::number<B, ET>& n, const mpl::true_&)
+ {
+ return n.precision();
+ }
+ template <class B, boost::multiprecision::expression_template_option ET>
+ inline BOOST_CONSTEXPR unsigned current_precision_of_imp(const boost::multiprecision::number<B, ET>&, const mpl::false_&)
+ {
+ return std::numeric_limits<boost::multiprecision::number<B, ET> >::digits10;
+ }
+
+ template <class Terminal>
+ inline BOOST_CONSTEXPR unsigned current_precision_of(const Terminal&)
+ {
+ return std::numeric_limits<Terminal>::digits10;
+ }
+
+ template <class Terminal, std::size_t N>
+ inline BOOST_CONSTEXPR unsigned current_precision_of(const Terminal(&)[N])
+ { // For string literals:
+ return 0;
+ }
+
+ template <class B, boost::multiprecision::expression_template_option ET>
+ inline BOOST_CONSTEXPR unsigned current_precision_of(const boost::multiprecision::number<B, ET>& n)
+ {
+ return current_precision_of_imp(n, boost::multiprecision::detail::is_variable_precision<boost::multiprecision::number<B, ET> >());
+ }
+
+ template<class tag, class Arg1>
+ inline BOOST_CONSTEXPR unsigned current_precision_of(const expression<tag, Arg1, void, void, void>& expr)
+ {
+ return current_precision_of(expr.left_ref());
+ }
+
+ template<class Arg1>
+ inline BOOST_CONSTEXPR unsigned current_precision_of(const expression<terminal, Arg1, void, void, void>& expr)
+ {
+ return current_precision_of(expr.value());
+ }
+
+ template <class tag, class Arg1, class Arg2>
+ inline BOOST_CONSTEXPR unsigned current_precision_of(const expression<tag, Arg1, Arg2, void, void>& expr)
+ {
+ return (std::max)(current_precision_of(expr.left_ref()), current_precision_of(expr.right_ref()));
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3>
+ inline BOOST_CONSTEXPR unsigned current_precision_of(const expression<tag, Arg1, Arg2, Arg3, void>& expr)
+ {
+ return (std::max)((std::max)(current_precision_of(expr.left_ref()), current_precision_of(expr.right_ref())), current_precision_of(expr.middle_ref()));
+ }
+
+ template <class R, bool = boost::multiprecision::detail::is_variable_precision<R>::value>
+ struct scoped_default_precision
+ {
+ template <class T>
+ scoped_default_precision(const T&) {}
+ template <class T, class U>
+ scoped_default_precision(const T&, const U&) {}
+ template <class T, class U, class V>
+ scoped_default_precision(const T&, const U&, const V&) {}
+ };
+
+ template <class R>
+ struct scoped_default_precision<R, true>
+ {
+ template <class T>
+ scoped_default_precision(const T& a)
+ {
+ init(current_precision_of(a));
+ }
+ template <class T, class U>
+ scoped_default_precision(const T& a, const U& b)
+ {
+ init((std::max)(current_precision_of(a), current_precision_of(b)));
+ }
+ template <class T, class U, class V>
+ scoped_default_precision(const T& a, const U& b, const V& c)
+ {
+ init((std::max)((std::max)(current_precision_of(a), current_precision_of(b)), current_precision_of(c)));
+ }
+ ~scoped_default_precision()
+ {
+ R::default_precision(m_prec);
+ }
+ private:
+ void init(unsigned p)
+ {
+ m_prec = R::default_precision();
+ if (p)
+ R::default_precision(p);
+ }
+ unsigned m_prec;
+ };
+
+ template <class T>
+ inline void maybe_promote_precision(T*, const mpl::false_&){}
+
+ template <class T>
+ inline void maybe_promote_precision(T* obj, const mpl::true_&)
+ {
+ if (obj->precision() != T::default_precision())
+ {
+ obj->precision(T::default_precision());
+ }
+ }
+
+ template <class T>
+ inline void maybe_promote_precision(T* obj)
+ {
+ maybe_promote_precision(obj, boost::multiprecision::detail::is_variable_precision<T>());
+ }
+
+#ifndef BOOST_NO_CXX17_IF_CONSTEXPR
+# define BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(T) if constexpr (boost::multiprecision::detail::is_variable_precision<T>::value)
+#else
+# define BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(T) if(boost::multiprecision::detail::is_variable_precision<T>::value)
+#endif
+
+
+}
+}
+}
+
+#endif // BOOST_MP_IS_BACKEND_HPP
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/detail/rebind.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/rebind.hpp
new file mode 100644
index 00000000000..1ad0f7dec07
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/rebind.hpp
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2012 John Maddock.
+// Copyright Christopher Kormanyos 2013. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_MP_DETAIL_REBIND_HPP
+ #define BOOST_MP_DETAIL_REBIND_HPP
+
+ namespace boost { namespace multiprecision { namespace backends { namespace detail
+ {
+ template <class value_type, class my_allocator>
+ struct rebind
+ {
+#ifndef BOOST_NO_CXX11_ALLOCATOR
+ typedef typename std::allocator_traits<my_allocator>::template rebind_alloc<value_type> type;
+#else
+ typedef typename my_allocator::template rebind<value_type>::other type;
+#endif
+ };
+ } } } } // namespace boost::multiprecision::backends::detail
+
+#endif // BOOST_MP_DETAIL_REBIND_HPP
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/detail/ublas_interop.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/detail/ublas_interop.hpp
index cf56dc9fb8c..cf56dc9fb8c 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/detail/ublas_interop.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/detail/ublas_interop.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/integer.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/integer.hpp
index e4c8bf8b6cb..e4c8bf8b6cb 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/integer.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/integer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/number.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/number.hpp
new file mode 100644
index 00000000000..42c6a8fa5df
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/number.hpp
@@ -0,0 +1,2278 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2011 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MATH_EXTENDED_REAL_HPP
+#define BOOST_MATH_EXTENDED_REAL_HPP
+
+#include <boost/cstdint.hpp>
+#include <boost/mpl/max.hpp>
+#include <boost/mpl/plus.hpp>
+#include <boost/mpl/or.hpp>
+#include <boost/mpl/find_if.hpp>
+#include <boost/assert.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/is_unsigned.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_complex.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/multiprecision/detail/precision.hpp>
+#include <boost/multiprecision/detail/generic_interconvert.hpp>
+#include <boost/multiprecision/detail/number_compare.hpp>
+#include <boost/multiprecision/traits/is_restricted_conversion.hpp>
+#include <boost/container_hash/hash.hpp>
+#include <istream> // stream operators
+#include <cstdio> // EOF
+#include <cctype> // isspace
+#ifndef BOOST_NO_CXX17_HDR_STRING_VIEW
+#include <string_view>
+#endif
+
+namespace boost{ namespace multiprecision{
+
+#ifdef BOOST_MSVC
+// warning C4127: conditional expression is constant
+// warning C4714: function marked as __forceinline not inlined
+#pragma warning(push)
+#pragma warning(disable:4127 4714 6326)
+#endif
+
+template <class Backend, expression_template_option ExpressionTemplates>
+class number
+{
+ typedef number<Backend, ExpressionTemplates> self_type;
+public:
+ typedef Backend backend_type;
+ typedef typename component_type<self_type>::type value_type;
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number() BOOST_MP_NOEXCEPT_IF(noexcept(Backend())) {}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const number& e) BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend const&>()))) : m_backend(e.m_backend){}
+ template <class V>
+ BOOST_MP_FORCEINLINE number(const V& v, typename boost::enable_if_c<
+ (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value)
+ && !is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value
+ && !detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
+#ifdef BOOST_HAS_FLOAT128
+ && !boost::is_same<V, __float128>::value
+#endif
+ >::type* = 0)
+ {
+ m_backend = canonical_value(v);
+ }
+ template <class V>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const V& v, typename boost::enable_if_c<
+ is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value
+ && !detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
+ >::type* = 0)
+#ifndef BOOST_INTEL
+ BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<typename detail::canonical<V, Backend>::type const&>())))
+#endif
+ : m_backend(canonical_value(v)) {}
+ template <class V>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const V& v, unsigned digits10, typename boost::enable_if_c<
+ (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value)
+ && !detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
+ && (boost::multiprecision::number_category<Backend>::value != boost::multiprecision::number_kind_complex)
+ && (boost::multiprecision::number_category<Backend>::value != boost::multiprecision::number_kind_rational)
+#ifdef BOOST_HAS_FLOAT128
+ && !boost::is_same<V, __float128>::value
+#endif
+ >::type* = 0)
+ : m_backend(canonical_value(v), digits10) {}
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const number& e, unsigned digits10)
+ BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend const&>(), std::declval<unsigned>())))
+ : m_backend(e.m_backend, digits10){}
+ template <class V>
+ explicit BOOST_MP_FORCEINLINE number(const V& v, typename boost::enable_if_c<
+ (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value)
+ && !detail::is_explicitly_convertible<typename detail::canonical<V, Backend>::type, Backend>::value
+ && detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
+ >::type* = 0)
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<typename detail::canonical<V, Backend>::type const&>()))
+ {
+ m_backend = canonical_value(v);
+ }
+ template <class V>
+ explicit BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const V& v, typename boost::enable_if_c<
+ detail::is_explicitly_convertible<typename detail::canonical<V, Backend>::type, Backend>::value
+ && (detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
+ || !is_convertible<typename detail::canonical<V, Backend>::type, Backend>::value)
+ >::type* = 0)
+ BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<typename detail::canonical<V, Backend>::type const&>())))
+ : m_backend(canonical_value(v)) {}
+ template <class V>
+ explicit BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const V& v, unsigned digits10, typename boost::enable_if_c<
+ (boost::is_arithmetic<V>::value || is_same<std::string, V>::value || is_convertible<V, const char*>::value)
+ && detail::is_restricted_conversion<typename detail::canonical<V, Backend>::type, Backend>::value
+ && (boost::multiprecision::number_category<Backend>::value != boost::multiprecision::number_kind_complex)
+ && (boost::multiprecision::number_category<Backend>::value != boost::multiprecision::number_kind_rational)
+ >::type* = 0)
+ : m_backend(canonical_value(v), digits10) {}
+
+ template<expression_template_option ET>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(const number<Backend, ET>& val)
+ BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend const&>()))) : m_backend(val.backend()) {}
+
+ template <class Other, expression_template_option ET>
+ BOOST_MP_FORCEINLINE number(const number<Other, ET>& val,
+ typename boost::enable_if_c<(boost::is_convertible<Other, Backend>::value && !detail::is_restricted_conversion<Other, Backend>::value)>::type* = 0)
+ BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Other const&>())))
+ : m_backend(val.backend()) {}
+
+ template <class Other, expression_template_option ET>
+ explicit number(const number<Other, ET>& val, typename boost::enable_if_c<
+ (!detail::is_explicitly_convertible<Other, Backend>::value)
+ >::type* = 0)
+ {
+ //
+ // Attempt a generic interconvertion:
+ //
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(val);
+ using detail::generic_interconvert;
+ generic_interconvert(backend(), val.backend(), number_category<Backend>(), number_category<Other>());
+ }
+ template <class Other, expression_template_option ET>
+ explicit BOOST_MP_FORCEINLINE number(const number<Other, ET>& val, typename boost::enable_if_c<
+ (detail::is_explicitly_convertible<Other, Backend>::value
+ && (detail::is_restricted_conversion<Other, Backend>::value || !boost::is_convertible<Other, Backend>::value))
+ >::type* = 0) BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Other const&>())))
+ : m_backend(val.backend()) {}
+
+ template <class V, class U>
+ BOOST_MP_FORCEINLINE number(const V& v1, const U& v2,
+ typename boost::enable_if_c<(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value && !is_same<typename component_type<self_type>::type, self_type>::value)>::type* = 0)
+ {
+ using default_ops::assign_components;
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(v1, v2);
+ assign_components(m_backend, canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2)));
+ }
+ template <class V, class U>
+ BOOST_MP_FORCEINLINE explicit number(const V& v1, const U& v2,
+ typename boost::enable_if_c<
+ (is_constructible<value_type, V>::value || is_convertible<V, std::string>::value)
+ && (is_constructible<value_type, U>::value || is_convertible<U, std::string>::value)
+ && !is_same<typename component_type<self_type>::type, self_type>::value
+ && !is_same<V, self_type>::value
+ && !(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value)
+ >::type* = 0)
+ {
+ using default_ops::assign_components;
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(v1, v2);
+ assign_components(m_backend, canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2)));
+ }
+#ifndef BOOST_NO_CXX17_HDR_STRING_VIEW
+ //
+ // Support for new types in C++17
+ //
+ template <class Traits>
+ explicit inline number(const std::basic_string_view<char, Traits>& view)
+ {
+ using default_ops::assign_from_string_view;
+ assign_from_string_view(this->backend(), view);
+ }
+ template <class Traits>
+ explicit inline number(const std::basic_string_view<char, Traits>& view_x, const std::basic_string_view<char, Traits>& view_y)
+ {
+ using default_ops::assign_from_string_view;
+ assign_from_string_view(this->backend(), view_x, view_y);
+ }
+ template <class Traits>
+ explicit BOOST_MP_FORCEINLINE number(const std::basic_string_view<char, Traits>& v, unsigned digits10)
+ : m_backend(canonical_value(v), digits10) {}
+ template <class Traits>
+ number& assign(const std::basic_string_view<char, Traits>& view)
+ {
+ using default_ops::assign_from_string_view;
+ assign_from_string_view(this->backend(), view);
+ return *this;
+ }
+#endif
+
+ template <class V, class U>
+ BOOST_MP_FORCEINLINE number(const V& v1, const U& v2, unsigned digits10,
+ typename boost::enable_if_c<(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value && !is_same<typename component_type<self_type>::type, self_type>::value)>::type* = 0)
+ : m_backend(canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2)), digits10) {}
+ template <class V, class U>
+ BOOST_MP_FORCEINLINE explicit number(const V& v1, const U& v2, unsigned digits10,
+ typename boost::enable_if_c<((is_constructible<value_type, V>::value || is_convertible<V, std::string>::value) && (is_constructible<value_type, U>::value || is_convertible<U, std::string>::value) && !is_same<typename component_type<self_type>::type, self_type>::value) && !(is_convertible<V, value_type>::value && is_convertible<U, value_type>::value)>::type* = 0)
+ : m_backend(canonical_value(detail::evaluate_if_expression(v1)), canonical_value(detail::evaluate_if_expression(v2)), digits10){}
+
+
+ template <class Other, expression_template_option ET>
+ BOOST_MP_FORCEINLINE number(const number<Other, ET>& v1, const number<Other, ET>& v2, typename boost::enable_if<boost::is_convertible<Other, Backend> >::type* = 0)
+ {
+ using default_ops::assign_components;
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(v1, v2);
+ assign_components(m_backend, v1.backend(), v2.backend());
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ typedef typename is_same<number, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::type tag_type;
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(e);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ do_assign(e, tag_type());
+ return *this;
+ }
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ number& assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ typedef typename is_same<number, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::type tag_type;
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t;
+ t.assign(e);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ do_assign(e, tag_type());
+ return *this;
+ }
+
+ BOOST_MP_FORCEINLINE number& operator=(const number& e)
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<Backend const&>()))
+ {
+ m_backend = e.m_backend;
+ return *this;
+ }
+
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if<is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator=(const V& v)
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<const typename detail::canonical<V, Backend>::type&>()))
+ {
+ m_backend = canonical_value(v);
+ return *this;
+ }
+ template <class V>
+ BOOST_MP_FORCEINLINE number<Backend, ExpressionTemplates>& assign(const V& v)
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<const typename detail::canonical<V, Backend>::type&>()))
+ {
+ m_backend = canonical_value(v);
+ return *this;
+ }
+ template <class V>
+ BOOST_MP_FORCEINLINE number<Backend, ExpressionTemplates>& assign(const V& v, unsigned digits10)
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<const typename detail::canonical<V, Backend>::type&>()))
+ {
+ number t(v, digits10);
+ return *this = t;
+ }
+ template <class Other, expression_template_option ET>
+ typename boost::disable_if<boost::multiprecision::detail::is_explicitly_convertible<Other, Backend>, number<Backend, ExpressionTemplates>& >::type
+ assign(const number<Other, ET>& v)
+ {
+ //
+ // Attempt a generic interconvertion:
+ //
+ using detail::generic_interconvert;
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(v);
+ //
+ // If the current precision of *this differs from that of value v, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(v) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(v);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ generic_interconvert(backend(), v.backend(), number_category<Backend>(), number_category<Other>());
+ return *this;
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ number(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, typename boost::enable_if_c<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value>::type* = 0)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(e);
+ *this = BOOST_MP_MOVE(t);
+ }
+ *this = e;
+ }
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ explicit number(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e,
+ typename boost::enable_if_c<!is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value
+ && boost::multiprecision::detail::is_explicitly_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>::value>::type* = 0)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(e);
+ *this = BOOST_MP_MOVE(t);
+ }
+ assign(e);
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR number(number&& r)
+ BOOST_MP_NOEXCEPT_IF(noexcept(Backend(std::declval<Backend>())))
+ : m_backend(static_cast<Backend&&>(r.m_backend)){}
+ BOOST_MP_FORCEINLINE number& operator=(number&& r) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend&>() = std::declval<Backend>()))
+ {
+ m_backend = static_cast<Backend&&>(r.m_backend);
+ return *this;
+ }
+#endif
+
+ number& operator+=(const self_type& val)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, val);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(val) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(*this + val);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ do_add(detail::expression<detail::terminal, self_type>(val), detail::terminal());
+ return *this;
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator+=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ // Create a copy if e contains this, but not if we're just doing a
+ // x += x
+ if((contains_self(e) && !is_self(e)))
+ {
+ self_type temp(e);
+ do_add(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+ else
+ {
+ do_add(e, tag());
+ }
+ return *this;
+ }
+
+ template <class Arg1, class Arg2, class Arg3, class Arg4>
+ number& operator+=(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(*this + e);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ //
+ // Fused multiply-add:
+ //
+ using default_ops::eval_multiply_add;
+ eval_multiply_add(m_backend, canonical_value(e.left_ref()), canonical_value(e.right_ref()));
+ return *this;
+ }
+
+ template <class V>
+ typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator+=(const V& v)
+ {
+ using default_ops::eval_add;
+ eval_add(m_backend, canonical_value(v));
+ return *this;
+ }
+
+ number& operator-=(const self_type& val)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, val);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(val) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(*this - val);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ do_subtract(detail::expression<detail::terminal, self_type>(val), detail::terminal());
+ return *this;
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator-=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ // Create a copy if e contains this:
+ if(contains_self(e))
+ {
+ self_type temp(e);
+ do_subtract(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+ else
+ {
+ do_subtract(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
+ }
+ return *this;
+ }
+
+ template <class V>
+ typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator-=(const V& v)
+ {
+ using default_ops::eval_subtract;
+ eval_subtract(m_backend, canonical_value(v));
+ return *this;
+ }
+
+ template <class Arg1, class Arg2, class Arg3, class Arg4>
+ number& operator-=(const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(*this - e);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ //
+ // Fused multiply-subtract:
+ //
+ using default_ops::eval_multiply_subtract;
+ eval_multiply_subtract(m_backend, canonical_value(e.left_ref()), canonical_value(e.right_ref()));
+ return *this;
+ }
+
+
+ number& operator *= (const self_type& e)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(*this * e);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ do_multiplies(detail::expression<detail::terminal, self_type>(e), detail::terminal());
+ return *this;
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator*=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ // Create a temporary if the RHS references *this, but not
+ // if we're just doing an x *= x;
+ if((contains_self(e) && !is_self(e)))
+ {
+ self_type temp(e);
+ do_multiplies(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+ else
+ {
+ do_multiplies(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
+ }
+ return *this;
+ }
+
+ template <class V>
+ typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator*=(const V& v)
+ {
+ using default_ops::eval_multiply;
+ eval_multiply(m_backend, canonical_value(v));
+ return *this;
+ }
+
+ number& operator%=(const self_type& e)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(*this % e);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ do_modulus(detail::expression<detail::terminal, self_type>(e), detail::terminal());
+ return *this;
+ }
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator%=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ // Create a temporary if the RHS references *this:
+ if(contains_self(e))
+ {
+ self_type temp(e);
+ do_modulus(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+ else
+ {
+ do_modulus(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
+ }
+ return *this;
+ }
+ template <class V>
+ typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator%=(const V& v)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
+ using default_ops::eval_modulus;
+ eval_modulus(m_backend, canonical_value(v));
+ return *this;
+ }
+
+ //
+ // These operators are *not* proto-ized.
+ // The issue is that the increment/decrement must happen
+ // even if the result of the operator *is never used*.
+ // Possibly we could modify our expression wrapper to
+ // execute the increment/decrement on destruction, but
+ // correct implementation will be tricky, so defered for now...
+ //
+ BOOST_MP_FORCEINLINE number& operator++()
+ {
+ using default_ops::eval_increment;
+ eval_increment(m_backend);
+ return *this;
+ }
+
+ BOOST_MP_FORCEINLINE number& operator--()
+ {
+ using default_ops::eval_decrement;
+ eval_decrement(m_backend);
+ return *this;
+ }
+
+ inline number operator++(int)
+ {
+ using default_ops::eval_increment;
+ self_type temp(*this);
+ eval_increment(m_backend);
+ return BOOST_MP_MOVE(temp);
+ }
+
+ inline number operator--(int)
+ {
+ using default_ops::eval_decrement;
+ self_type temp(*this);
+ eval_decrement(m_backend);
+ return BOOST_MP_MOVE(temp);
+ }
+
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if<is_integral<V>, number&>::type operator <<= (V val)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The left-shift operation is only valid for integer types");
+ detail::check_shift_range(val, mpl::bool_<(sizeof(V) > sizeof(std::size_t))>(), is_signed<V>());
+ eval_left_shift(m_backend, static_cast<std::size_t>(canonical_value(val)));
+ return *this;
+ }
+
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if<is_integral<V>, number&>::type operator >>= (V val)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The right-shift operation is only valid for integer types");
+ detail::check_shift_range(val, mpl::bool_<(sizeof(V) > sizeof(std::size_t))>(), is_signed<V>());
+ eval_right_shift(m_backend, static_cast<std::size_t>(canonical_value(val)));
+ return *this;
+ }
+
+ BOOST_MP_FORCEINLINE number& operator /= (const self_type& e)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ //
+ // If the current precision of *this differs from that of expression e, then we
+ // create a temporary (which will have the correct precision thanks to precision_guard)
+ // and then move the result into *this. In C++17 we add a leading "if constexpr"
+ // which causes this code to be eliminated in the common case that this type is
+ // not actually variable precision. Pre C++17 this code should still be mostly
+ // optimised away, but we can't prevent instantiation of the dead code leading
+ // to longer build and possibly link times.
+ //
+ BOOST_MP_CONSTEXPR_IF_VARIABLE_PRECISION(number)
+ if (boost::multiprecision::detail::current_precision_of(e) != boost::multiprecision::detail::current_precision_of(*this))
+ {
+ number t(*this / e);
+ return *this = BOOST_MP_MOVE(t);
+ }
+ do_divide(detail::expression<detail::terminal, self_type>(e), detail::terminal());
+ return *this;
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator/=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ detail::scoped_default_precision<number<Backend, ExpressionTemplates> > precision_guard(*this, e);
+ // Create a temporary if the RHS references *this:
+ if(contains_self(e))
+ {
+ self_type temp(e);
+ do_divide(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+ else
+ {
+ do_divide(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
+ }
+ return *this;
+ }
+
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator/=(const V& v)
+ {
+ using default_ops::eval_divide;
+ eval_divide(m_backend, canonical_value(v));
+ return *this;
+ }
+
+ BOOST_MP_FORCEINLINE number& operator&=(const self_type& e)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
+ do_bitwise_and(detail::expression<detail::terminal, self_type>(e), detail::terminal());
+ return *this;
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator&=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
+ // Create a temporary if the RHS references *this, but not
+ // if we're just doing an x &= x;
+ if(contains_self(e) && !is_self(e))
+ {
+ self_type temp(e);
+ do_bitwise_and(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+ else
+ {
+ do_bitwise_and(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
+ }
+ return *this;
+ }
+
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator&=(const V& v)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(m_backend, canonical_value(v));
+ return *this;
+ }
+
+ BOOST_MP_FORCEINLINE number& operator|=(const self_type& e)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
+ do_bitwise_or(detail::expression<detail::terminal, self_type>(e), detail::terminal());
+ return *this;
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator|=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
+ // Create a temporary if the RHS references *this, but not
+ // if we're just doing an x |= x;
+ if(contains_self(e) && !is_self(e))
+ {
+ self_type temp(e);
+ do_bitwise_or(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+ else
+ {
+ do_bitwise_or(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
+ }
+ return *this;
+ }
+
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator|=(const V& v)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(m_backend, canonical_value(v));
+ return *this;
+ }
+
+ BOOST_MP_FORCEINLINE number& operator^=(const self_type& e)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
+ do_bitwise_xor(detail::expression<detail::terminal, self_type>(e), detail::terminal());
+ return *this;
+ }
+
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ typename boost::enable_if<is_convertible<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type, self_type>, number&>::type operator^=(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
+ if(contains_self(e))
+ {
+ self_type temp(e);
+ do_bitwise_xor(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+ else
+ {
+ do_bitwise_xor(e, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::tag_type());
+ }
+ return *this;
+ }
+
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if<boost::is_convertible<V, self_type>, number<Backend, ExpressionTemplates>& >::type
+ operator^=(const V& v)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(m_backend, canonical_value(v));
+ return *this;
+ }
+ //
+ // swap:
+ //
+ BOOST_MP_FORCEINLINE void swap(self_type& other) BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend>().swap(std::declval<Backend&>())))
+ {
+ m_backend.swap(other.backend());
+ }
+ //
+ // Zero and sign:
+ //
+ BOOST_MP_FORCEINLINE bool is_zero()const
+ {
+ using default_ops::eval_is_zero;
+ return eval_is_zero(m_backend);
+ }
+ BOOST_MP_FORCEINLINE int sign()const
+ {
+ using default_ops::eval_get_sign;
+ return eval_get_sign(m_backend);
+ }
+ //
+ // String conversion functions:
+ //
+ std::string str(std::streamsize digits = 0, std::ios_base::fmtflags f = std::ios_base::fmtflags(0))const
+ {
+ return m_backend.str(digits, f);
+ }
+ template<class Archive>
+ void serialize(Archive & ar, const unsigned int /*version*/)
+ {
+ ar & m_backend;
+ }
+private:
+ template <class T>
+ void convert_to_imp(T* result)const
+ {
+ using default_ops::eval_convert_to;
+ eval_convert_to(result, m_backend);
+ }
+ template <class B2, expression_template_option ET>
+ void convert_to_imp(number<B2, ET>* result)const
+ {
+ result->assign(*this);
+ }
+ void convert_to_imp(std::string* result)const
+ {
+ *result = this->str();
+ }
+public:
+ template <class T>
+ T convert_to()const
+ {
+ T result;
+ convert_to_imp(&result);
+ return result;
+ }
+ //
+ // Use in boolean context, and explicit conversion operators:
+ //
+#ifndef BOOST_MP_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+# if (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 7) && !defined(__clang__)) || (defined(BOOST_INTEL) && (BOOST_INTEL <= 1500))
+ //
+ // Horrible workaround for gcc-4.6.x which always prefers the template
+ // operator bool() rather than the non-template operator when converting to
+ // an arithmetic type:
+ //
+ template <class T, typename boost::enable_if<is_same<T, bool>, int>::type = 0>
+ explicit operator T ()const
+ {
+ using default_ops::eval_is_zero;
+ return !eval_is_zero(backend());
+ }
+ template <class T, typename boost::disable_if_c<is_same<T, bool>::value || is_void<T>::value, int>::type = 0>
+ explicit operator T ()const
+ {
+ return this->template convert_to<T>();
+ }
+# else
+#if BOOST_WORKAROUND(BOOST_MSVC, < 1900) || (defined(__APPLE_CC__) && BOOST_WORKAROUND(__clang_major__, < 9))
+ template <class T>
+#else
+ template <class T, class = typename boost::disable_if_c<boost::is_constructible<T, self_type const&>::value || !boost::is_default_constructible<T>::value || (!boost::is_arithmetic<T>::value && !boost::is_complex<T>::value), T>::type>
+#endif
+ explicit operator T ()const
+ {
+ return this->template convert_to<T>();
+ }
+ BOOST_MP_FORCEINLINE explicit operator bool()const
+ {
+ return !is_zero();
+ }
+#if BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40800)
+ BOOST_MP_FORCEINLINE explicit operator void()const {}
+#endif
+# endif
+#else
+ typedef bool (self_type::*unmentionable_type)()const;
+
+ BOOST_MP_FORCEINLINE operator unmentionable_type()const
+ {
+ return is_zero() ? 0 : &self_type::is_zero;
+ }
+#endif
+ //
+ // Default precision:
+ //
+ static unsigned default_precision() BOOST_NOEXCEPT
+ {
+ return Backend::default_precision();
+ }
+ static void default_precision(unsigned digits10)
+ {
+ Backend::default_precision(digits10);
+ }
+ unsigned precision()const BOOST_NOEXCEPT
+ {
+ return m_backend.precision();
+ }
+ void precision(unsigned digits10)
+ {
+ m_backend.precision(digits10);
+ }
+ //
+ // Comparison:
+ //
+ BOOST_MP_FORCEINLINE int compare(const number<Backend, ExpressionTemplates>& o)const
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<Backend>().compare(std::declval<Backend>())))
+ {
+ return m_backend.compare(o.m_backend);
+ }
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if_c<is_arithmetic<V>::value && (number_category<Backend>::value != number_kind_complex), int>::type compare(const V& o)const
+ {
+ using default_ops::eval_get_sign;
+ if(o == 0)
+ return eval_get_sign(m_backend);
+ return m_backend.compare(canonical_value(o));
+ }
+ template <class V>
+ BOOST_MP_FORCEINLINE typename boost::enable_if_c<is_arithmetic<V>::value && (number_category<Backend>::value == number_kind_complex), int>::type compare(const V& o)const
+ {
+ using default_ops::eval_get_sign;
+ return m_backend.compare(canonical_value(o));
+ }
+ //
+ // Direct access to the underlying backend:
+ //
+#if !(defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_NO_CXX11_REF_QUALIFIERS) || BOOST_WORKAROUND(BOOST_GCC, < 50000))
+ BOOST_MP_FORCEINLINE Backend& backend()& BOOST_NOEXCEPT { return m_backend; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& backend()const& BOOST_NOEXCEPT { return m_backend; }
+ BOOST_MP_FORCEINLINE Backend&& backend()&& BOOST_NOEXCEPT { return static_cast<Backend&&>(m_backend); }
+ BOOST_MP_FORCEINLINE Backend const&& backend()const&& BOOST_NOEXCEPT { return static_cast<Backend const&&>(m_backend); }
+#else
+ BOOST_MP_FORCEINLINE Backend& backend() BOOST_NOEXCEPT { return m_backend; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& backend()const BOOST_NOEXCEPT { return m_backend; }
+#endif
+ //
+ // Complex number real and imag:
+ //
+ typename scalar_result_from_possible_complex<number<Backend, ExpressionTemplates> >::type
+ real()const
+ {
+ using default_ops::eval_real;
+ detail::scoped_default_precision<typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type> precision_guard(*this);
+ typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result;
+ eval_real(result.backend(), backend());
+ return result;
+ }
+ typename scalar_result_from_possible_complex<number<Backend, ExpressionTemplates> >::type
+ imag()const
+ {
+ using default_ops::eval_imag;
+ detail::scoped_default_precision<typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type> precision_guard(*this);
+ typename scalar_result_from_possible_complex<multiprecision::number<Backend, ExpressionTemplates> >::type result;
+ eval_imag(result.backend(), backend());
+ return result;
+ }
+ template <class T>
+ inline typename enable_if_c<boost::is_convertible<T, self_type>::value, self_type&>::type real(const T& val)
+ {
+ using default_ops::eval_set_real;
+ eval_set_real(backend(), canonical_value(val));
+ return *this;
+ }
+ template <class T>
+ inline typename enable_if_c<boost::is_convertible<T, self_type>::value && number_category<self_type>::value == number_kind_complex, self_type&>::type imag(const T& val)
+ {
+ using default_ops::eval_set_imag;
+ eval_set_imag(backend(), canonical_value(val));
+ return *this;
+ }
+private:
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ void do_assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, const mpl::true_&)
+ {
+ do_assign(e, tag());
+ }
+ template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
+ void do_assign(const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& e, const mpl::false_&)
+ {
+ // The result of the expression isn't the same type as this -
+ // create a temporary result and assign it to *this:
+ typedef typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type temp_type;
+ temp_type t(e);
+ this->assign(t);
+ }
+
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::add_immediates&)
+ {
+ using default_ops::eval_add;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_add(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::subtract_immediates&)
+ {
+ using default_ops::eval_subtract;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_subtract(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::multiply_immediates&)
+ {
+ using default_ops::eval_multiply;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_multiply(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::multiply_add&)
+ {
+ using default_ops::eval_multiply_add;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_multiply_add(m_backend, canonical_value(e.left().value()), canonical_value(e.middle().value()), canonical_value(e.right().value()));
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::multiply_subtract&)
+ {
+ using default_ops::eval_multiply_subtract;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_multiply_subtract(m_backend, canonical_value(e.left().value()), canonical_value(e.middle().value()), canonical_value(e.right().value()));
+ }
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::divide_immediates&)
+ {
+ using default_ops::eval_divide;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_divide(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
+ }
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::negate&)
+ {
+ typedef typename Exp::left_type left_type;
+ do_assign(e.left(), typename left_type::tag_type());
+ m_backend.negate();
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::plus&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+
+ static int const left_depth = left_type::depth;
+ static int const right_depth = right_type::depth;
+
+ bool bl = contains_self(e.left());
+ bool br = contains_self(e.right());
+
+ if(bl && br)
+ {
+ self_type temp(e);
+ temp.m_backend.swap(this->m_backend);
+ }
+ else if(bl && is_self(e.left()))
+ {
+ // Ignore the left node, it's *this, just add the right:
+ do_add(e.right(), typename right_type::tag_type());
+ }
+ else if(br && is_self(e.right()))
+ {
+ // Ignore the right node, it's *this, just add the left:
+ do_add(e.left(), typename left_type::tag_type());
+ }
+ else if(!br && (bl || (left_depth >= right_depth)))
+ { // br is always false, but if bl is true we must take the this branch:
+ do_assign(e.left(), typename left_type::tag_type());
+ do_add(e.right(), typename right_type::tag_type());
+ }
+ else
+ {
+ do_assign(e.right(), typename right_type::tag_type());
+ do_add(e.left(), typename left_type::tag_type());
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::minus&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+
+ static int const left_depth = left_type::depth;
+ static int const right_depth = right_type::depth;
+
+ bool bl = contains_self(e.left());
+ bool br = contains_self(e.right());
+
+ if(bl && br)
+ {
+ self_type temp(e);
+ temp.m_backend.swap(this->m_backend);
+ }
+ else if(bl && is_self(e.left()))
+ {
+ // Ignore the left node, it's *this, just subtract the right:
+ do_subtract(e.right(), typename right_type::tag_type());
+ }
+ else if(br && is_self(e.right()))
+ {
+ // Ignore the right node, it's *this, just subtract the left and negate the result:
+ do_subtract(e.left(), typename left_type::tag_type());
+ m_backend.negate();
+ }
+ else if(!br && (bl || (left_depth >= right_depth)))
+ { // br is always false, but if bl is true we must take the this branch:
+ do_assign(e.left(), typename left_type::tag_type());
+ do_subtract(e.right(), typename right_type::tag_type());
+ }
+ else
+ {
+ do_assign(e.right(), typename right_type::tag_type());
+ do_subtract(e.left(), typename left_type::tag_type());
+ m_backend.negate();
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::multiplies&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+
+ static int const left_depth = left_type::depth;
+ static int const right_depth = right_type::depth;
+
+ bool bl = contains_self(e.left());
+ bool br = contains_self(e.right());
+
+ if(bl && br)
+ {
+ self_type temp(e);
+ temp.m_backend.swap(this->m_backend);
+ }
+ else if(bl && is_self(e.left()))
+ {
+ // Ignore the left node, it's *this, just add the right:
+ do_multiplies(e.right(), typename right_type::tag_type());
+ }
+ else if(br && is_self(e.right()))
+ {
+ // Ignore the right node, it's *this, just add the left:
+ do_multiplies(e.left(), typename left_type::tag_type());
+ }
+ else if(!br && (bl || (left_depth >= right_depth)))
+ { // br is always false, but if bl is true we must take the this branch:
+ do_assign(e.left(), typename left_type::tag_type());
+ do_multiplies(e.right(), typename right_type::tag_type());
+ }
+ else
+ {
+ do_assign(e.right(), typename right_type::tag_type());
+ do_multiplies(e.left(), typename left_type::tag_type());
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::divides&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+
+ bool bl = contains_self(e.left());
+ bool br = contains_self(e.right());
+
+ if(bl && is_self(e.left()))
+ {
+ // Ignore the left node, it's *this, just add the right:
+ do_divide(e.right(), typename right_type::tag_type());
+ }
+ else if(br)
+ {
+ self_type temp(e);
+ temp.m_backend.swap(this->m_backend);
+ }
+ else
+ {
+ do_assign(e.left(), typename left_type::tag_type());
+ do_divide(e.right(), typename right_type::tag_type());
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::modulus&)
+ {
+ //
+ // This operation is only valid for integer backends:
+ //
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
+
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+
+ bool bl = contains_self(e.left());
+ bool br = contains_self(e.right());
+
+ if(bl && is_self(e.left()))
+ {
+ // Ignore the left node, it's *this, just add the right:
+ do_modulus(e.right(), typename right_type::tag_type());
+ }
+ else if(br)
+ {
+ self_type temp(e);
+ temp.m_backend.swap(this->m_backend);
+ }
+ else
+ {
+ do_assign(e.left(), typename left_type::tag_type());
+ do_modulus(e.right(), typename right_type::tag_type());
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::modulus_immediates&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
+ using default_ops::eval_modulus;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_modulus(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
+ }
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::bitwise_and&)
+ {
+ //
+ // This operation is only valid for integer backends:
+ //
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
+
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+
+ static int const left_depth = left_type::depth;
+ static int const right_depth = right_type::depth;
+
+ bool bl = contains_self(e.left());
+ bool br = contains_self(e.right());
+
+ if(bl && is_self(e.left()))
+ {
+ // Ignore the left node, it's *this, just add the right:
+ do_bitwise_and(e.right(), typename right_type::tag_type());
+ }
+ else if(br && is_self(e.right()))
+ {
+ do_bitwise_and(e.left(), typename left_type::tag_type());
+ }
+ else if(!br && (bl || (left_depth >= right_depth)))
+ {
+ do_assign(e.left(), typename left_type::tag_type());
+ do_bitwise_and(e.right(), typename right_type::tag_type());
+ }
+ else
+ {
+ do_assign(e.right(), typename right_type::tag_type());
+ do_bitwise_and(e.left(), typename left_type::tag_type());
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::bitwise_and_immediates&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
+ }
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::bitwise_or&)
+ {
+ //
+ // This operation is only valid for integer backends:
+ //
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
+
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+
+ static int const left_depth = left_type::depth;
+ static int const right_depth = right_type::depth;
+
+ bool bl = contains_self(e.left());
+ bool br = contains_self(e.right());
+
+ if(bl && is_self(e.left()))
+ {
+ // Ignore the left node, it's *this, just add the right:
+ do_bitwise_or(e.right(), typename right_type::tag_type());
+ }
+ else if(br && is_self(e.right()))
+ {
+ do_bitwise_or(e.left(), typename left_type::tag_type());
+ }
+ else if(!br && (bl || (left_depth >= right_depth)))
+ {
+ do_assign(e.left(), typename left_type::tag_type());
+ do_bitwise_or(e.right(), typename right_type::tag_type());
+ }
+ else
+ {
+ do_assign(e.right(), typename right_type::tag_type());
+ do_bitwise_or(e.left(), typename left_type::tag_type());
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::bitwise_or_immediates&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
+ }
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::bitwise_xor&)
+ {
+ //
+ // This operation is only valid for integer backends:
+ //
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
+
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+
+ static int const left_depth = left_type::depth;
+ static int const right_depth = right_type::depth;
+
+ bool bl = contains_self(e.left());
+ bool br = contains_self(e.right());
+
+ if(bl && is_self(e.left()))
+ {
+ // Ignore the left node, it's *this, just add the right:
+ do_bitwise_xor(e.right(), typename right_type::tag_type());
+ }
+ else if(br && is_self(e.right()))
+ {
+ do_bitwise_xor(e.left(), typename left_type::tag_type());
+ }
+ else if(!br && (bl || (left_depth >= right_depth)))
+ {
+ do_assign(e.left(), typename left_type::tag_type());
+ do_bitwise_xor(e.right(), typename right_type::tag_type());
+ }
+ else
+ {
+ do_assign(e.right(), typename right_type::tag_type());
+ do_bitwise_xor(e.left(), typename left_type::tag_type());
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::bitwise_xor_immediates&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "Bitwise operations are only valid for integer types");
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(m_backend, canonical_value(e.left().value()), canonical_value(e.right().value()));
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::terminal&)
+ {
+ if(!is_self(e))
+ {
+ m_backend = canonical_value(e.value());
+ }
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::function&)
+ {
+ typedef typename Exp::arity tag_type;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ do_assign_function(e, tag_type());
+ }
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::shift_left&)
+ {
+ // We can only shift by an integer value, not an arbitrary expression:
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ typedef typename right_type::arity right_arity;
+ BOOST_STATIC_ASSERT_MSG(right_arity::value == 0, "The left shift operator requires an integer value for the shift operand.");
+ typedef typename right_type::result_type right_value_type;
+ BOOST_STATIC_ASSERT_MSG(is_integral<right_value_type>::value, "The left shift operator requires an integer value for the shift operand.");
+ typedef typename left_type::tag_type tag_type;
+ do_assign_left_shift(e.left(), canonical_value(e.right().value()), tag_type());
+ }
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::shift_right&)
+ {
+ // We can only shift by an integer value, not an arbitrary expression:
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ typedef typename right_type::arity right_arity;
+ BOOST_STATIC_ASSERT_MSG(right_arity::value == 0, "The left shift operator requires an integer value for the shift operand.");
+ typedef typename right_type::result_type right_value_type;
+ BOOST_STATIC_ASSERT_MSG(is_integral<right_value_type>::value, "The left shift operator requires an integer value for the shift operand.");
+ typedef typename left_type::tag_type tag_type;
+ do_assign_right_shift(e.left(), canonical_value(e.right().value()), tag_type());
+ }
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::bitwise_complement&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ~ operation is only valid for integer types");
+ using default_ops::eval_complement;
+ self_type temp(e.left());
+ eval_complement(m_backend, temp.backend());
+ }
+
+ template <class Exp>
+ void do_assign(const Exp& e, const detail::complement_immediates&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ~ operation is only valid for integer types");
+ using default_ops::eval_complement;
+ eval_complement(m_backend, canonical_value(e.left().value()));
+ }
+
+ template <class Exp, class Val>
+ void do_assign_right_shift(const Exp& e, const Val& val, const detail::terminal&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The right shift operation is only valid for integer types");
+ using default_ops::eval_right_shift;
+ detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>());
+ eval_right_shift(m_backend, canonical_value(e.value()), static_cast<std::size_t>(val));
+ }
+
+ template <class Exp, class Val>
+ void do_assign_left_shift(const Exp& e, const Val& val, const detail::terminal&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The left shift operation is only valid for integer types");
+ using default_ops::eval_left_shift;
+ detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>());
+ eval_left_shift(m_backend, canonical_value(e.value()), static_cast<std::size_t>(val));
+ }
+
+ template <class Exp, class Val, class Tag>
+ void do_assign_right_shift(const Exp& e, const Val& val, const Tag&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The right shift operation is only valid for integer types");
+ using default_ops::eval_right_shift;
+ self_type temp(e);
+ detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>());
+ eval_right_shift(m_backend, temp.backend(), static_cast<std::size_t>(val));
+ }
+
+ template <class Exp, class Val, class Tag>
+ void do_assign_left_shift(const Exp& e, const Val& val, const Tag&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The left shift operation is only valid for integer types");
+ using default_ops::eval_left_shift;
+ self_type temp(e);
+ detail::check_shift_range(val, mpl::bool_<(sizeof(Val) > sizeof(std::size_t))>(), is_signed<Val>());
+ eval_left_shift(m_backend, temp.backend(), static_cast<std::size_t>(val));
+ }
+
+ template <class Exp>
+ void do_assign_function(const Exp& e, const mpl::int_<1>&)
+ {
+ e.left().value()(&m_backend);
+ }
+ template <class Exp>
+ void do_assign_function(const Exp& e, const mpl::int_<2>&)
+ {
+ typedef typename Exp::right_type right_type;
+ typedef typename right_type::tag_type tag_type;
+ do_assign_function_1(e.left().value(), e.right_ref(), tag_type());
+ }
+ template <class F, class Exp>
+ void do_assign_function_1(const F& f, const Exp& val, const detail::terminal&)
+ {
+ f(m_backend, function_arg_value(val));
+ }
+ template <class F, class Exp, class Tag>
+ void do_assign_function_1(const F& f, const Exp& val, const Tag&)
+ {
+ typename Exp::result_type t(val);
+ f(m_backend, t.backend());
+ }
+ template <class Exp>
+ void do_assign_function(const Exp& e, const mpl::int_<3>&)
+ {
+ typedef typename Exp::middle_type middle_type;
+ typedef typename middle_type::tag_type tag_type;
+ typedef typename Exp::right_type end_type;
+ typedef typename end_type::tag_type end_tag;
+ do_assign_function_2(e.left().value(), e.middle_ref(), e.right_ref(), tag_type(), end_tag());
+ }
+ template <class F, class Exp1, class Exp2>
+ void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const detail::terminal&, const detail::terminal&)
+ {
+ f(m_backend, function_arg_value(val1), function_arg_value(val2));
+ }
+ template <class F, class Exp1, class Exp2, class Tag1>
+ void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const Tag1&, const detail::terminal&)
+ {
+ typename Exp1::result_type temp1(val1);
+ f(m_backend, BOOST_MP_MOVE(temp1.backend()), function_arg_value(val2));
+ }
+ template <class F, class Exp1, class Exp2, class Tag2>
+ void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const detail::terminal&, const Tag2&)
+ {
+ typename Exp2::result_type temp2(val2);
+ f(m_backend, function_arg_value(val1), BOOST_MP_MOVE(temp2.backend()));
+ }
+ template <class F, class Exp1, class Exp2, class Tag1, class Tag2>
+ void do_assign_function_2(const F& f, const Exp1& val1, const Exp2& val2, const Tag1&, const Tag2&)
+ {
+ typename Exp1::result_type temp1(val1);
+ typename Exp2::result_type temp2(val2);
+ f(m_backend, BOOST_MP_MOVE(temp1.backend()), BOOST_MP_MOVE(temp2.backend()));
+ }
+
+ template <class Exp>
+ void do_assign_function(const Exp& e, const mpl::int_<4>&)
+ {
+ typedef typename Exp::left_middle_type left_type;
+ typedef typename left_type::tag_type left_tag_type;
+ typedef typename Exp::right_middle_type middle_type;
+ typedef typename middle_type::tag_type middle_tag_type;
+ typedef typename Exp::right_type right_type;
+ typedef typename right_type::tag_type right_tag_type;
+ do_assign_function_3a(e.left().value(), e.left_middle_ref(), e.right_middle_ref(), e.right_ref(), left_tag_type(), middle_tag_type(), right_tag_type());
+ }
+ template <class F, class Exp1, class Exp2, class Exp3, class Tag2, class Tag3>
+ void do_assign_function_3a(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&, const Tag2& t2, const Tag3& t3)
+ {
+ do_assign_function_3b(f, val1, val2, val3, t2, t3);
+ }
+ template <class F, class Exp1, class Exp2, class Exp3, class Tag1, class Tag2, class Tag3>
+ void do_assign_function_3a(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag1&, const Tag2& t2, const Tag3& t3)
+ {
+ typename Exp1::result_type t(val1);
+ do_assign_function_3b(f, BOOST_MP_MOVE(t), val2, val3, t2, t3);
+ }
+ template <class F, class Exp1, class Exp2, class Exp3, class Tag3>
+ void do_assign_function_3b(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&, const Tag3& t3)
+ {
+ do_assign_function_3c(f, val1, val2, val3, t3);
+ }
+ template <class F, class Exp1, class Exp2, class Exp3, class Tag2, class Tag3>
+ void do_assign_function_3b(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag2& /*t2*/, const Tag3& t3)
+ {
+ typename Exp2::result_type t(val2);
+ do_assign_function_3c(f, val1, BOOST_MP_MOVE(t), val3, t3);
+ }
+ template <class F, class Exp1, class Exp2, class Exp3>
+ void do_assign_function_3c(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const detail::terminal&)
+ {
+ f(m_backend, function_arg_value(val1), function_arg_value(val2), function_arg_value(val3));
+ }
+ template <class F, class Exp1, class Exp2, class Exp3, class Tag3>
+ void do_assign_function_3c(const F& f, const Exp1& val1, const Exp2& val2, const Exp3& val3, const Tag3& /*t3*/)
+ {
+ typename Exp3::result_type t(val3);
+ do_assign_function_3c(f, val1, val2, BOOST_MP_MOVE(t), detail::terminal());
+ }
+
+ template <class Exp>
+ void do_add(const Exp& e, const detail::terminal&)
+ {
+ using default_ops::eval_add;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_add(m_backend, canonical_value(e.value()));
+ }
+
+ template <class Exp>
+ void do_add(const Exp& e, const detail::negate&)
+ {
+ typedef typename Exp::left_type left_type;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ do_subtract(e.left(), typename left_type::tag_type());
+ }
+
+ template <class Exp>
+ void do_add(const Exp& e, const detail::plus&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_add(e.left(), typename left_type::tag_type());
+ do_add(e.right(), typename right_type::tag_type());
+ }
+
+ template <class Exp>
+ void do_add(const Exp& e, const detail::minus&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_add(e.left(), typename left_type::tag_type());
+ do_subtract(e.right(), typename right_type::tag_type());
+ }
+
+ template <class Exp, class unknown>
+ void do_add(const Exp& e, const unknown&)
+ {
+ self_type temp(e);
+ do_add(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+
+ template <class Exp>
+ void do_add(const Exp& e, const detail::add_immediates&)
+ {
+ using default_ops::eval_add;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_add(m_backend, canonical_value(e.left().value()));
+ eval_add(m_backend, canonical_value(e.right().value()));
+ }
+ template <class Exp>
+ void do_add(const Exp& e, const detail::subtract_immediates&)
+ {
+ using default_ops::eval_add;
+ using default_ops::eval_subtract;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_add(m_backend, canonical_value(e.left().value()));
+ eval_subtract(m_backend, canonical_value(e.right().value()));
+ }
+ template <class Exp>
+ void do_subtract(const Exp& e, const detail::terminal&)
+ {
+ using default_ops::eval_subtract;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_subtract(m_backend, canonical_value(e.value()));
+ }
+
+ template <class Exp>
+ void do_subtract(const Exp& e, const detail::negate&)
+ {
+ typedef typename Exp::left_type left_type;
+ do_add(e.left(), typename left_type::tag_type());
+ }
+
+ template <class Exp>
+ void do_subtract(const Exp& e, const detail::plus&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_subtract(e.left(), typename left_type::tag_type());
+ do_subtract(e.right(), typename right_type::tag_type());
+ }
+
+ template <class Exp>
+ void do_subtract(const Exp& e, const detail::minus&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_subtract(e.left(), typename left_type::tag_type());
+ do_add(e.right(), typename right_type::tag_type());
+ }
+ template <class Exp>
+ void do_subtract(const Exp& e, const detail::add_immediates&)
+ {
+ using default_ops::eval_subtract;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_subtract(m_backend, canonical_value(e.left().value()));
+ eval_subtract(m_backend, canonical_value(e.right().value()));
+ }
+ template <class Exp>
+ void do_subtract(const Exp& e, const detail::subtract_immediates&)
+ {
+ using default_ops::eval_add;
+ using default_ops::eval_subtract;
+ eval_subtract(m_backend, canonical_value(e.left().value()));
+ eval_add(m_backend, canonical_value(e.right().value()));
+ }
+ template <class Exp, class unknown>
+ void do_subtract(const Exp& e, const unknown&)
+ {
+ self_type temp(e);
+ do_subtract(detail::expression<detail::terminal, self_type>(temp), detail::terminal());
+ }
+
+ template <class Exp>
+ void do_multiplies(const Exp& e, const detail::terminal&)
+ {
+ using default_ops::eval_multiply;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_multiply(m_backend, canonical_value(e.value()));
+ }
+
+ template <class Exp>
+ void do_multiplies(const Exp& e, const detail::negate&)
+ {
+ typedef typename Exp::left_type left_type;
+ do_multiplies(e.left(), typename left_type::tag_type());
+ m_backend.negate();
+ }
+
+ template <class Exp>
+ void do_multiplies(const Exp& e, const detail::multiplies&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_multiplies(e.left(), typename left_type::tag_type());
+ do_multiplies(e.right(), typename right_type::tag_type());
+ }
+ //
+ // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
+ // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
+ //
+ template <class Exp>
+ typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
+ do_multiplies(const Exp& e, const detail::divides&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_multiplies(e.left(), typename left_type::tag_type());
+ do_divide(e.right(), typename right_type::tag_type());
+ }
+
+ template <class Exp>
+ void do_multiplies(const Exp& e, const detail::multiply_immediates&)
+ {
+ using default_ops::eval_multiply;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_multiply(m_backend, canonical_value(e.left().value()));
+ eval_multiply(m_backend, canonical_value(e.right().value()));
+ }
+ //
+ // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
+ // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
+ //
+ template <class Exp>
+ typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
+ do_multiplies(const Exp& e, const detail::divide_immediates&)
+ {
+ using default_ops::eval_multiply;
+ using default_ops::eval_divide;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_multiply(m_backend, canonical_value(e.left().value()));
+ eval_divide(m_backend, canonical_value(e.right().value()));
+ }
+ template <class Exp, class unknown>
+ void do_multiplies(const Exp& e, const unknown&)
+ {
+ using default_ops::eval_multiply;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ self_type temp(e);
+ eval_multiply(m_backend, temp.m_backend);
+ }
+
+ template <class Exp>
+ void do_divide(const Exp& e, const detail::terminal&)
+ {
+ using default_ops::eval_divide;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_divide(m_backend, canonical_value(e.value()));
+ }
+
+ template <class Exp>
+ void do_divide(const Exp& e, const detail::negate&)
+ {
+ typedef typename Exp::left_type left_type;
+ do_divide(e.left(), typename left_type::tag_type());
+ m_backend.negate();
+ }
+ //
+ // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
+ // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
+ //
+ template <class Exp>
+ typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
+ do_divide(const Exp& e, const detail::multiplies&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_divide(e.left(), typename left_type::tag_type());
+ do_divide(e.right(), typename right_type::tag_type());
+ }
+ //
+ // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
+ // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
+ //
+ template <class Exp>
+ typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
+ do_divide(const Exp& e, const detail::divides&)
+ {
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_divide(e.left(), typename left_type::tag_type());
+ do_multiplies(e.right(), typename right_type::tag_type());
+ }
+ //
+ // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
+ // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
+ //
+ template <class Exp>
+ typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
+ do_divides(const Exp& e, const detail::multiply_immediates&)
+ {
+ using default_ops::eval_divide;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_divide(m_backend, canonical_value(e.left().value()));
+ eval_divide(m_backend, canonical_value(e.right().value()));
+ }
+ //
+ // This rearrangement is disabled for integer types, the test on sizeof(Exp) is simply to make
+ // the disable_if dependent on the template argument (the size of 1 can never occur in practice).
+ //
+ template <class Exp>
+ typename boost::disable_if_c<boost::multiprecision::number_category<self_type>::value == boost::multiprecision::number_kind_integer || sizeof(Exp) == 1>::type
+ do_divides(const Exp& e, const detail::divide_immediates&)
+ {
+ using default_ops::eval_multiply;
+ using default_ops::eval_divide;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_divide(m_backend, canonical_value(e.left().value()));
+ mutiply(m_backend, canonical_value(e.right().value()));
+ }
+
+ template <class Exp, class unknown>
+ void do_divide(const Exp& e, const unknown&)
+ {
+ using default_ops::eval_multiply;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ self_type temp(e);
+ eval_divide(m_backend, temp.m_backend);
+ }
+
+ template <class Exp>
+ void do_modulus(const Exp& e, const detail::terminal&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
+ using default_ops::eval_modulus;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ eval_modulus(m_backend, canonical_value(e.value()));
+ }
+
+ template <class Exp, class Unknown>
+ void do_modulus(const Exp& e, const Unknown&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The modulus operation is only valid for integer types");
+ using default_ops::eval_modulus;
+ boost::multiprecision::detail::maybe_promote_precision(this);
+ self_type temp(e);
+ eval_modulus(m_backend, canonical_value(temp));
+ }
+
+ template <class Exp>
+ void do_bitwise_and(const Exp& e, const detail::terminal&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
+ using default_ops::eval_bitwise_and;
+ eval_bitwise_and(m_backend, canonical_value(e.value()));
+ }
+ template <class Exp>
+ void do_bitwise_and(const Exp& e, const detail::bitwise_and&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_bitwise_and(e.left(), typename left_type::tag_type());
+ do_bitwise_and(e.right(), typename right_type::tag_type());
+ }
+ template <class Exp, class unknown>
+ void do_bitwise_and(const Exp& e, const unknown&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise & operation is only valid for integer types");
+ using default_ops::eval_bitwise_and;
+ self_type temp(e);
+ eval_bitwise_and(m_backend, temp.m_backend);
+ }
+
+ template <class Exp>
+ void do_bitwise_or(const Exp& e, const detail::terminal&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
+ using default_ops::eval_bitwise_or;
+ eval_bitwise_or(m_backend, canonical_value(e.value()));
+ }
+ template <class Exp>
+ void do_bitwise_or(const Exp& e, const detail::bitwise_or&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_bitwise_or(e.left(), typename left_type::tag_type());
+ do_bitwise_or(e.right(), typename right_type::tag_type());
+ }
+ template <class Exp, class unknown>
+ void do_bitwise_or(const Exp& e, const unknown&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise | operation is only valid for integer types");
+ using default_ops::eval_bitwise_or;
+ self_type temp(e);
+ eval_bitwise_or(m_backend, temp.m_backend);
+ }
+
+ template <class Exp>
+ void do_bitwise_xor(const Exp& e, const detail::terminal&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
+ using default_ops::eval_bitwise_xor;
+ eval_bitwise_xor(m_backend, canonical_value(e.value()));
+ }
+ template <class Exp>
+ void do_bitwise_xor(const Exp& e, const detail::bitwise_xor&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
+ typedef typename Exp::left_type left_type;
+ typedef typename Exp::right_type right_type;
+ do_bitwise_xor(e.left(), typename left_type::tag_type());
+ do_bitwise_xor(e.right(), typename right_type::tag_type());
+ }
+ template <class Exp, class unknown>
+ void do_bitwise_xor(const Exp& e, const unknown&)
+ {
+ BOOST_STATIC_ASSERT_MSG(number_category<Backend>::value == number_kind_integer, "The bitwise ^ operation is only valid for integer types");
+ using default_ops::eval_bitwise_xor;
+ self_type temp(e);
+ eval_bitwise_xor(m_backend, temp.m_backend);
+ }
+
+ // Tests if the expression contains a reference to *this:
+ template <class Exp>
+ BOOST_MP_FORCEINLINE bool contains_self(const Exp& e)const BOOST_NOEXCEPT
+ {
+ return contains_self(e, typename Exp::arity());
+ }
+ template <class Exp>
+ BOOST_MP_FORCEINLINE bool contains_self(const Exp& e, mpl::int_<0> const&)const BOOST_NOEXCEPT
+ {
+ return is_realy_self(e.value());
+ }
+ template <class Exp>
+ BOOST_MP_FORCEINLINE bool contains_self(const Exp& e, mpl::int_<1> const&)const BOOST_NOEXCEPT
+ {
+ typedef typename Exp::left_type child_type;
+ return contains_self(e.left(), typename child_type::arity());
+ }
+ template <class Exp>
+ BOOST_MP_FORCEINLINE bool contains_self(const Exp& e, mpl::int_<2> const&)const BOOST_NOEXCEPT
+ {
+ typedef typename Exp::left_type child0_type;
+ typedef typename Exp::right_type child1_type;
+ return contains_self(e.left(), typename child0_type::arity())
+ || contains_self(e.right(), typename child1_type::arity());
+ }
+ template <class Exp>
+ BOOST_MP_FORCEINLINE bool contains_self(const Exp& e, mpl::int_<3> const&)const BOOST_NOEXCEPT
+ {
+ typedef typename Exp::left_type child0_type;
+ typedef typename Exp::middle_type child1_type;
+ typedef typename Exp::right_type child2_type;
+ return contains_self(e.left(), typename child0_type::arity())
+ || contains_self(e.middle(), typename child1_type::arity())
+ || contains_self(e.right(), typename child2_type::arity());
+ }
+
+ // Test if the expression is a reference to *this:
+ template <class Exp>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_self(const Exp& e)const BOOST_NOEXCEPT
+ {
+ return is_self(e, typename Exp::arity());
+ }
+ template <class Exp>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_self(const Exp& e, mpl::int_<0> const&)const BOOST_NOEXCEPT
+ {
+ return is_realy_self(e.value());
+ }
+ template <class Exp, int v>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_self(const Exp&, mpl::int_<v> const&)const BOOST_NOEXCEPT
+ {
+ return false;
+ }
+
+ template <class Val>
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_realy_self(const Val&)const BOOST_NOEXCEPT{ return false; }
+ BOOST_MP_FORCEINLINE BOOST_CONSTEXPR bool is_realy_self(const self_type& v)const BOOST_NOEXCEPT{ return &v == this; }
+
+ static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& function_arg_value(const self_type& v) BOOST_NOEXCEPT { return v.backend(); }
+ template <class Other, expression_template_option ET2>
+ static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Other& function_arg_value(const number<Other, ET2>& v) BOOST_NOEXCEPT { return v.backend(); }
+ template <class V>
+ static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const V& function_arg_value(const V& v) BOOST_NOEXCEPT { return v; }
+ template <class A1, class A2, class A3, class A4>
+ static BOOST_MP_FORCEINLINE const A1& function_arg_value(const detail::expression<detail::terminal, A1, A2, A3, A4>& exp) BOOST_NOEXCEPT { return exp.value(); }
+ template <class A2, class A3, class A4>
+ static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& function_arg_value(const detail::expression<detail::terminal, number<Backend>, A2, A3, A4>& exp) BOOST_NOEXCEPT { return exp.value().backend(); }
+ Backend m_backend;
+
+public:
+ //
+ // These shouldn't really need to be public, or even member functions, but it makes implementing
+ // the non-member operators way easier if they are:
+ //
+ static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const Backend& canonical_value(const self_type& v) BOOST_NOEXCEPT { return v.m_backend; }
+ template <class B2, expression_template_option ET>
+ static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR const B2& canonical_value(const number<B2, ET>& v) BOOST_NOEXCEPT { return v.backend(); }
+ template <class V>
+ static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR typename boost::disable_if<is_same<typename detail::canonical<V, Backend>::type, V>, typename detail::canonical<V, Backend>::type>::type
+ canonical_value(const V& v) BOOST_NOEXCEPT { return static_cast<typename detail::canonical<V, Backend>::type>(v); }
+ template <class V>
+ static BOOST_MP_FORCEINLINE BOOST_CONSTEXPR typename boost::enable_if<is_same<typename detail::canonical<V, Backend>::type, V>, const V&>::type
+ canonical_value(const V& v) BOOST_NOEXCEPT { return v; }
+ static BOOST_MP_FORCEINLINE typename detail::canonical<std::string, Backend>::type canonical_value(const std::string& v) BOOST_NOEXCEPT { return v.c_str(); }
+
+};
+
+template <class Backend, expression_template_option ExpressionTemplates>
+inline std::ostream& operator << (std::ostream& os, const number<Backend, ExpressionTemplates>& r)
+{
+ std::streamsize d = os.precision();
+ std::string s = r.str(d, os.flags());
+ std::streamsize ss = os.width();
+ if(ss > static_cast<std::streamsize>(s.size()))
+ {
+ char fill = os.fill();
+ if((os.flags() & std::ios_base::left) == std::ios_base::left)
+ s.append(static_cast<std::string::size_type>(ss - s.size()), fill);
+ else
+ s.insert(static_cast<std::string::size_type>(0), static_cast<std::string::size_type>(ss - s.size()), fill);
+ }
+ return os << s;
+}
+
+namespace detail{
+
+template <class tag, class A1, class A2, class A3, class A4>
+inline std::ostream& operator << (std::ostream& os, const expression<tag, A1, A2, A3, A4>& r)
+{
+ typedef typename expression<tag, A1, A2, A3, A4>::result_type value_type;
+ value_type temp(r);
+ return os << temp;
+}
+//
+// What follows is the input streaming code: this is not "proper" iostream code at all
+// but that's fiendishly hard to write when dealing with multiple backends all
+// with different requirements... yes we could deligate this to the backend author...
+// but we really want backends to be EASY to write!
+// For now just pull in all the characters that could possibly form the number
+// and let the backend's string parser make use of it. This fixes most use cases
+// including CSV type formats such as those used by the Random lib.
+//
+inline std::string read_string_while(std::istream& is, std::string const& permitted_chars)
+{
+ std::ios_base::iostate state = std::ios_base::goodbit;
+ const std::istream::sentry sentry_check(is);
+ std::string result;
+
+ if(sentry_check)
+ {
+ int c = is.rdbuf()->sgetc();
+
+ for(;; c = is.rdbuf()->snextc())
+ if(std::istream::traits_type::eq_int_type(std::istream::traits_type::eof(), c))
+ { // end of file:
+ state |= std::ios_base::eofbit;
+ break;
+ }
+ else if(permitted_chars.find_first_of(std::istream::traits_type::to_char_type(c)) == std::string::npos)
+ {
+ // Invalid numeric character, stop reading:
+ //is.rdbuf()->sputbackc(static_cast<char>(c));
+ break;
+ }
+ else
+ {
+ result.append(1, std::istream::traits_type::to_char_type(c));
+ }
+ }
+
+ if(!result.size())
+ state |= std::ios_base::failbit;
+ is.setstate(state);
+ return result;
+}
+
+} // namespace detail
+
+template <class Backend, expression_template_option ExpressionTemplates>
+inline std::istream& operator >> (std::istream& is, number<Backend, ExpressionTemplates>& r)
+{
+ bool hex_format = (is.flags() & std::ios_base::hex) == std::ios_base::hex;
+ bool oct_format = (is.flags() & std::ios_base::oct) == std::ios_base::oct;
+ std::string s;
+ switch(boost::multiprecision::number_category<number<Backend, ExpressionTemplates> >::value)
+ {
+ case boost::multiprecision::number_kind_integer:
+ if(oct_format)
+ s = detail::read_string_while(is, "+-01234567");
+ else if(hex_format)
+ s = detail::read_string_while(is, "+-xXabcdefABCDEF0123456789");
+ else
+ s = detail::read_string_while(is, "+-0123456789");
+ break;
+ case boost::multiprecision::number_kind_floating_point:
+ s = detail::read_string_while(is, "+-eE.0123456789infINFnanNANinfinityINFINITY");
+ break;
+ default:
+ is >> s;
+ }
+ if(s.size())
+ {
+ if(hex_format && (number_category<Backend>::value == number_kind_integer) && ((s[0] != '0') || (s[1] != 'x')))
+ s.insert(s.find_first_not_of("+-"), "0x");
+ if(oct_format && (number_category<Backend>::value == number_kind_integer) && (s[0] != '0'))
+ s.insert(s.find_first_not_of("+-"), "0");
+ r.assign(s);
+ }
+ else if(!is.fail())
+ is.setstate(std::istream::failbit);
+ return is;
+}
+
+template <class Backend, expression_template_option ExpressionTemplates>
+BOOST_MP_FORCEINLINE void swap(number<Backend, ExpressionTemplates>& a, number<Backend, ExpressionTemplates>& b)
+ BOOST_MP_NOEXCEPT_IF(noexcept(std::declval<number<Backend, ExpressionTemplates>&>() = std::declval<number<Backend, ExpressionTemplates>&>()))
+{
+ a.swap(b);
+}
+//
+// Boost.Hash support, just call hash_value for the backend, which may or may not be supported:
+//
+template <class Backend, expression_template_option ExpressionTemplates>
+inline std::size_t hash_value(const number<Backend, ExpressionTemplates>& val)
+{
+ return hash_value(val.backend());
+}
+
+} // namespace multiprecision
+
+template <class T>
+class rational;
+
+template <class Backend, multiprecision::expression_template_option ExpressionTemplates>
+inline std::istream& operator >> (std::istream& is, rational<multiprecision::number<Backend, ExpressionTemplates> >& r)
+{
+ std::string s1;
+ multiprecision::number<Backend, ExpressionTemplates> v1, v2;
+ char c;
+ bool have_hex = false;
+ bool hex_format = (is.flags() & std::ios_base::hex) == std::ios_base::hex;
+ bool oct_format = (is.flags() & std::ios_base::oct) == std::ios_base::oct;
+
+ while((EOF != (c = static_cast<char>(is.peek()))) && (c == 'x' || c == 'X' || c == '-' || c == '+' || (c >= '0' && c <= '9') || (have_hex && (c >= 'a' && c <= 'f')) || (have_hex && (c >= 'A' && c <= 'F'))))
+ {
+ if(c == 'x' || c == 'X')
+ have_hex = true;
+ s1.append(1, c);
+ is.get();
+ }
+ if(hex_format && ((s1[0] != '0') || (s1[1] != 'x')))
+ s1.insert(static_cast<std::string::size_type>(0), "0x");
+ if(oct_format && (s1[0] != '0'))
+ s1.insert(static_cast<std::string::size_type>(0), "0");
+ v1.assign(s1);
+ s1.erase();
+ if(c == '/')
+ {
+ is.get();
+ while((EOF != (c = static_cast<char>(is.peek()))) && (c == 'x' || c == 'X' || c == '-' || c == '+' || (c >= '0' && c <= '9') || (have_hex && (c >= 'a' && c <= 'f')) || (have_hex && (c >= 'A' && c <= 'F'))))
+ {
+ if(c == 'x' || c == 'X')
+ have_hex = true;
+ s1.append(1, c);
+ is.get();
+ }
+ if(hex_format && ((s1[0] != '0') || (s1[1] != 'x')))
+ s1.insert(static_cast<std::string::size_type>(0), "0x");
+ if(oct_format && (s1[0] != '0'))
+ s1.insert(static_cast<std::string::size_type>(0), "0");
+ v2.assign(s1);
+ }
+ else
+ v2 = 1;
+ r.assign(v1, v2);
+ return is;
+}
+
+template <class T, multiprecision::expression_template_option ExpressionTemplates>
+inline multiprecision::number<T, ExpressionTemplates> numerator(const rational<multiprecision::number<T, ExpressionTemplates> >& a)
+{
+ return a.numerator();
+}
+
+template <class T, multiprecision::expression_template_option ExpressionTemplates>
+inline multiprecision::number<T, ExpressionTemplates> denominator(const rational<multiprecision::number<T, ExpressionTemplates> >& a)
+{
+ return a.denominator();
+}
+
+template <class T, multiprecision::expression_template_option ExpressionTemplates>
+inline std::size_t hash_value(const rational<multiprecision::number<T, ExpressionTemplates> >& val)
+{
+ std::size_t result = hash_value(val.numerator());
+ boost::hash_combine(result, hash_value(val.denominator()));
+ return result;
+}
+
+namespace multiprecision
+{
+
+template <class I>
+struct component_type<boost::rational<I> >
+{
+ typedef I type;
+};
+
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespaces
+
+#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
+
+#include <functional>
+
+namespace std {
+
+ template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates>
+ struct hash<boost::multiprecision::number<Backend, ExpressionTemplates> >
+ {
+ std::size_t operator()(const boost::multiprecision::number<Backend, ExpressionTemplates>& val)const { return hash_value(val); }
+ };
+ template <class Backend, boost::multiprecision::expression_template_option ExpressionTemplates>
+ struct hash<boost::rational<boost::multiprecision::number<Backend, ExpressionTemplates> > >
+ {
+ std::size_t operator()(const boost::rational<boost::multiprecision::number<Backend, ExpressionTemplates> >& val)const
+ {
+ std::size_t result = hash_value(val.numerator());
+ boost::hash_combine(result, hash_value(val.denominator()));
+ return result;
+ }
+ };
+
+}
+
+#endif
+
+#include <boost/multiprecision/detail/ublas_interop.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/rational_adaptor.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/rational_adaptor.hpp
index b06a157010f..b06a157010f 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/rational_adaptor.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/rational_adaptor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/traits/explicit_conversion.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/traits/explicit_conversion.hpp
index 0a14f03442f..0a14f03442f 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/traits/explicit_conversion.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/traits/explicit_conversion.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/traits/extract_exponent_type.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/traits/extract_exponent_type.hpp
index adb30d54367..adb30d54367 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/traits/extract_exponent_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/traits/extract_exponent_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/traits/is_backend.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_backend.hpp
index 2a26b19df01..2a26b19df01 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/traits/is_backend.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_backend.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/traits/is_byte_container.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_byte_container.hpp
index d97428f0f2d..d97428f0f2d 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/traits/is_byte_container.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_byte_container.hpp
diff --git a/src/third_party/boost-1.68.0/boost/multiprecision/traits/is_restricted_conversion.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_restricted_conversion.hpp
index ff8f7f63cbe..ff8f7f63cbe 100644
--- a/src/third_party/boost-1.68.0/boost/multiprecision/traits/is_restricted_conversion.hpp
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_restricted_conversion.hpp
diff --git a/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_variable_precision.hpp b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_variable_precision.hpp
new file mode 100644
index 00000000000..c76f512331f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/multiprecision/traits/is_variable_precision.hpp
@@ -0,0 +1,24 @@
+///////////////////////////////////////////////////////////////////////////////
+// Copyright 2018 John Maddock. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_MP_IS_VARIABLE_PRECISION_HPP
+#define BOOST_MP_IS_VARIABLE_PRECISION_HPP
+
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/multiprecision/detail/number_base.hpp>
+
+namespace boost{ namespace multiprecision{ namespace detail{
+
+ template <class Backend>
+ struct is_variable_precision : public false_type{};
+
+ template <class Backend, expression_template_option ExpressionTemplates>
+ struct is_variable_precision<number<Backend, ExpressionTemplates> > : public is_variable_precision<Backend> {};
+
+}
+}
+}
+
+#endif // BOOST_MP_IS_BACKEND_HPP
diff --git a/src/third_party/boost-1.68.0/boost/next_prior.hpp b/src/third_party/boost-1.69.0/boost/next_prior.hpp
index 5de705f591b..5de705f591b 100644
--- a/src/third_party/boost-1.68.0/boost/next_prior.hpp
+++ b/src/third_party/boost-1.69.0/boost/next_prior.hpp
diff --git a/src/third_party/boost-1.68.0/boost/non_type.hpp b/src/third_party/boost-1.69.0/boost/non_type.hpp
index 896aed4d34b..896aed4d34b 100644
--- a/src/third_party/boost-1.68.0/boost/non_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/non_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/noncopyable.hpp b/src/third_party/boost-1.69.0/boost/noncopyable.hpp
index e998ee864a8..e998ee864a8 100644
--- a/src/third_party/boost-1.68.0/boost/noncopyable.hpp
+++ b/src/third_party/boost-1.69.0/boost/noncopyable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/none.hpp b/src/third_party/boost-1.69.0/boost/none.hpp
index a37c45c5143..a37c45c5143 100644
--- a/src/third_party/boost-1.68.0/boost/none.hpp
+++ b/src/third_party/boost-1.69.0/boost/none.hpp
diff --git a/src/third_party/boost-1.68.0/boost/none_t.hpp b/src/third_party/boost-1.69.0/boost/none_t.hpp
index 008f369d1cd..008f369d1cd 100644
--- a/src/third_party/boost-1.68.0/boost/none_t.hpp
+++ b/src/third_party/boost-1.69.0/boost/none_t.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/bounds.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/bounds.hpp
index e4c7c7deee8..e4c7c7deee8 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/bounds.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/bounds.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/cast.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/cast.hpp
index 61286c13119..61286c13119 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/conversion_traits.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/conversion_traits.hpp
index 23e0eb8c9ab..23e0eb8c9ab 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/conversion_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/conversion_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/converter.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/converter.hpp
index 331caddea54..331caddea54 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/converter.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/converter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/converter_policies.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/converter_policies.hpp
index e7a5e67ce9e..e7a5e67ce9e 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/converter_policies.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/converter_policies.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/bounds.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/bounds.hpp
index 67342b8e570..67342b8e570 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/bounds.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/bounds.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/conversion_traits.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/conversion_traits.hpp
index ed25349c671..ed25349c671 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/conversion_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/conversion_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/converter.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/converter.hpp
index f7bf7b4436a..f7bf7b4436a 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/converter.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/converter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/int_float_mixture.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/int_float_mixture.hpp
index 464e52753fe..464e52753fe 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/int_float_mixture.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/int_float_mixture.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/is_subranged.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/is_subranged.hpp
index b5e7fe8f1e8..b5e7fe8f1e8 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/is_subranged.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/is_subranged.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/meta.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/meta.hpp
index 246a1b4702d..246a1b4702d 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/meta.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/meta.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp
index 150490d935f..150490d935f 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/numeric_cast_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/old_numeric_cast.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/old_numeric_cast.hpp
index 9901ed2ae34..9901ed2ae34 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/old_numeric_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/old_numeric_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
index 01dc9321b3c..01dc9321b3c 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
index b358b9c41f5..b358b9c41f5 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/preprocessed/numeric_cast_traits_long_long.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/sign_mixture.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/sign_mixture.hpp
index c7f9e42afe8..c7f9e42afe8 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/sign_mixture.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/sign_mixture.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
index 36dbc491b5e..36dbc491b5e 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/int_float_mixture_enum.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/int_float_mixture_enum.hpp
index d0c2daacfc8..d0c2daacfc8 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/int_float_mixture_enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/int_float_mixture_enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/numeric_cast_traits.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/numeric_cast_traits.hpp
index e24296bc7ec..e24296bc7ec 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/numeric_cast_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/numeric_cast_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/sign_mixture_enum.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/sign_mixture_enum.hpp
index 1525f8d33ce..1525f8d33ce 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/sign_mixture_enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/sign_mixture_enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp b/src/third_party/boost-1.69.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp
index 2540e806308..2540e806308 100644
--- a/src/third_party/boost-1.68.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/numeric/conversion/udt_builtin_mixture_enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/operators.hpp b/src/third_party/boost-1.69.0/boost/operators.hpp
index 156571c1a93..156571c1a93 100644
--- a/src/third_party/boost-1.68.0/boost/operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional.hpp b/src/third_party/boost-1.69.0/boost/optional.hpp
index 40cf12e6560..40cf12e6560 100644
--- a/src/third_party/boost-1.68.0/boost/optional.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional/bad_optional_access.hpp b/src/third_party/boost-1.69.0/boost/optional/bad_optional_access.hpp
index cabf43fbace..cabf43fbace 100644
--- a/src/third_party/boost-1.68.0/boost/optional/bad_optional_access.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/bad_optional_access.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/experimental_traits.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/experimental_traits.hpp
index b51f5f10449..b51f5f10449 100644
--- a/src/third_party/boost-1.68.0/boost/optional/detail/experimental_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/experimental_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/old_optional_implementation.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/old_optional_implementation.hpp
new file mode 100644
index 00000000000..f8dc260d52c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/old_optional_implementation.hpp
@@ -0,0 +1,1058 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2014-2016 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the maintainer at:
+// akrzemi1@gmail.com
+
+#ifndef BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
+#define BOOST_OPTIONAL_DETAIL_OLD_OPTIONAL_IMPLEMENTATION_AJK_28JAN2015_HPP
+
+#include <boost/detail/reference_content.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/conditional.hpp>
+
+namespace boost {
+
+namespace optional_detail {
+
+
+template<class T>
+struct types_when_isnt_ref
+{
+ typedef T const& reference_const_type ;
+ typedef T & reference_type ;
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ typedef T && rval_reference_type ;
+ typedef T && reference_type_of_temporary_wrapper;
+#ifdef BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
+ // GCC 4.4 has support for an early draft of rvalue references. The conforming version below
+ // causes warnings about returning references to a temporary.
+ static T&& move(T&& r) { return r; }
+#else
+ static rval_reference_type move(reference_type r) { return boost::move(r); }
+#endif
+#endif
+ typedef T const* pointer_const_type ;
+ typedef T * pointer_type ;
+ typedef T const& argument_type ;
+} ;
+
+template<class T>
+struct types_when_is_ref
+{
+ typedef BOOST_DEDUCED_TYPENAME remove_reference<T>::type raw_type ;
+
+ typedef raw_type& reference_const_type ;
+ typedef raw_type& reference_type ;
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ typedef BOOST_DEDUCED_TYPENAME remove_const<raw_type>::type&& rval_reference_type ;
+ typedef raw_type& reference_type_of_temporary_wrapper;
+ static reference_type move(reference_type r) { return r; }
+#endif
+ typedef raw_type* pointer_const_type ;
+ typedef raw_type* pointer_type ;
+ typedef raw_type& argument_type ;
+} ;
+
+template <class To, class From>
+void prevent_binding_rvalue_ref_to_optional_lvalue_ref()
+{
+#ifndef BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
+ BOOST_STATIC_ASSERT_MSG(
+ !boost::is_lvalue_reference<To>::value || !boost::is_rvalue_reference<From>::value,
+ "binding rvalue references to optional lvalue references is disallowed");
+#endif
+}
+
+struct optional_tag {} ;
+
+template<class T>
+class optional_base : public optional_tag
+{
+ private :
+
+ typedef
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ BOOST_DEDUCED_TYPENAME
+#endif
+ ::boost::detail::make_reference_content<T>::type internal_type ;
+
+ typedef aligned_storage<internal_type> storage_type ;
+
+ typedef types_when_isnt_ref<T> types_when_not_ref ;
+ typedef types_when_is_ref<T> types_when_ref ;
+
+ typedef optional_base<T> this_type ;
+
+ protected :
+
+ typedef T value_type ;
+
+ typedef true_type is_reference_tag ;
+ typedef false_type is_not_reference_tag ;
+
+ typedef BOOST_DEDUCED_TYPENAME is_reference<T>::type is_reference_predicate ;
+
+ public:
+ typedef BOOST_DEDUCED_TYPENAME conditional<is_reference_predicate::value,types_when_ref,types_when_not_ref>::type types ;
+
+ protected:
+ typedef BOOST_DEDUCED_TYPENAME types::reference_type reference_type ;
+ typedef BOOST_DEDUCED_TYPENAME types::reference_const_type reference_const_type ;
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ typedef BOOST_DEDUCED_TYPENAME types::rval_reference_type rval_reference_type ;
+ typedef BOOST_DEDUCED_TYPENAME types::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
+#endif
+ typedef BOOST_DEDUCED_TYPENAME types::pointer_type pointer_type ;
+ typedef BOOST_DEDUCED_TYPENAME types::pointer_const_type pointer_const_type ;
+ typedef BOOST_DEDUCED_TYPENAME types::argument_type argument_type ;
+
+ // Creates an optional<T> uninitialized.
+ // No-throw
+ optional_base()
+ :
+ m_initialized(false) {}
+
+ // Creates an optional<T> uninitialized.
+ // No-throw
+ optional_base ( none_t )
+ :
+ m_initialized(false) {}
+
+ // Creates an optional<T> initialized with 'val'.
+ // Can throw if T::T(T const&) does
+ optional_base ( argument_type val )
+ :
+ m_initialized(false)
+ {
+ construct(val);
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // move-construct an optional<T> initialized from an rvalue-ref to 'val'.
+ // Can throw if T::T(T&&) does
+ optional_base ( rval_reference_type val )
+ :
+ m_initialized(false)
+ {
+ construct( boost::move(val) );
+ }
+#endif
+
+ // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional<T>.
+ // Can throw if T::T(T const&) does
+ optional_base ( bool cond, argument_type val )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(val);
+ }
+
+ // Creates a deep copy of another optional<T>
+ // Can throw if T::T(T const&) does
+ optional_base ( optional_base const& rhs )
+ :
+ m_initialized(false)
+ {
+ if ( rhs.is_initialized() )
+ construct(rhs.get_impl());
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates a deep move of another optional<T>
+ // Can throw if T::T(T&&) does
+ optional_base ( optional_base&& rhs )
+ :
+ m_initialized(false)
+ {
+ if ( rhs.is_initialized() )
+ construct( boost::move(rhs.get_impl()) );
+ }
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+ template<class Expr, class PtrExpr>
+ explicit optional_base ( Expr&& expr, PtrExpr const* tag )
+ :
+ m_initialized(false)
+ {
+ construct(boost::forward<Expr>(expr),tag);
+ }
+
+#else
+ // This is used for both converting and in-place constructions.
+ // Derived classes use the 'tag' to select the appropriate
+ // implementation (the correct 'construct()' overload)
+ template<class Expr>
+ explicit optional_base ( Expr const& expr, Expr const* tag )
+ :
+ m_initialized(false)
+ {
+ construct(expr,tag);
+ }
+
+#endif
+
+
+ // No-throw (assuming T::~T() doesn't)
+ ~optional_base() { destroy() ; }
+
+ // Assigns from another optional<T> (deep-copies the rhs value)
+ void assign ( optional_base const& rhs )
+ {
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+ assign_value(rhs.get_impl(), is_reference_predicate() );
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+ construct(rhs.get_impl());
+ }
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Assigns from another optional<T> (deep-moves the rhs value)
+ void assign ( optional_base&& rhs )
+ {
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+ assign_value(boost::move(rhs.get_impl()), is_reference_predicate() );
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+ construct(boost::move(rhs.get_impl()));
+ }
+ }
+#endif
+
+ // Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
+ template<class U>
+ void assign ( optional<U> const& rhs )
+ {
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
+ assign_value(rhs.get(), is_reference_predicate() );
+#else
+ assign_value(static_cast<value_type>(rhs.get()), is_reference_predicate() );
+#endif
+
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
+ construct(rhs.get());
+#else
+ construct(static_cast<value_type>(rhs.get()));
+#endif
+ }
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // move-assigns from another _convertible_ optional<U> (deep-moves from the rhs value)
+ template<class U>
+ void assign ( optional<U>&& rhs )
+ {
+ typedef BOOST_DEDUCED_TYPENAME optional<U>::rval_reference_type ref_type;
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+ assign_value(static_cast<ref_type>(rhs.get()), is_reference_predicate() );
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+ construct(static_cast<ref_type>(rhs.get()));
+ }
+ }
+#endif
+
+ // Assigns from a T (deep-copies the rhs value)
+ void assign ( argument_type val )
+ {
+ if (is_initialized())
+ assign_value(val, is_reference_predicate() );
+ else construct(val);
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Assigns from a T (deep-moves the rhs value)
+ void assign ( rval_reference_type val )
+ {
+ if (is_initialized())
+ assign_value( boost::move(val), is_reference_predicate() );
+ else construct( boost::move(val) );
+ }
+#endif
+
+ // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
+ // No-throw (assuming T::~T() doesn't)
+ void assign ( none_t ) BOOST_NOEXCEPT { destroy(); }
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ template<class Expr, class ExprPtr>
+ void assign_expr ( Expr&& expr, ExprPtr const* tag )
+ {
+ if (is_initialized())
+ assign_expr_to_initialized(boost::forward<Expr>(expr),tag);
+ else construct(boost::forward<Expr>(expr),tag);
+ }
+#else
+ template<class Expr>
+ void assign_expr ( Expr const& expr, Expr const* tag )
+ {
+ if (is_initialized())
+ assign_expr_to_initialized(expr,tag);
+ else construct(expr,tag);
+ }
+#endif
+
+#endif
+
+ public :
+
+ // Destroys the current value, if any, leaving this UNINITIALIZED
+ // No-throw (assuming T::~T() doesn't)
+ void reset() BOOST_NOEXCEPT { destroy(); }
+
+ // **DEPPRECATED** Replaces the current value -if any- with 'val'
+ void reset ( argument_type val ) { assign(val); }
+
+ // Returns a pointer to the value if this is initialized, otherwise,
+ // returns NULL.
+ // No-throw
+ pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
+ pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
+
+ bool is_initialized() const { return m_initialized ; }
+
+ protected :
+
+ void construct ( argument_type val )
+ {
+ ::new (m_storage.address()) internal_type(val) ;
+ m_initialized = true ;
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ void construct ( rval_reference_type val )
+ {
+ ::new (m_storage.address()) internal_type( types::move(val) ) ;
+ m_initialized = true ;
+ }
+#endif
+
+
+#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ // Constructs in-place
+ // upon exception *this is always uninitialized
+ template<class... Args>
+ void emplace_assign ( Args&&... args )
+ {
+ destroy();
+ ::new (m_storage.address()) internal_type( boost::forward<Args>(args)... );
+ m_initialized = true ;
+ }
+#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ template<class Arg>
+ void emplace_assign ( Arg&& arg )
+ {
+ destroy();
+ ::new (m_storage.address()) internal_type( boost::forward<Arg>(arg) );
+ m_initialized = true ;
+ }
+
+ void emplace_assign ()
+ {
+ destroy();
+ ::new (m_storage.address()) internal_type();
+ m_initialized = true ;
+ }
+#else
+ template<class Arg>
+ void emplace_assign ( const Arg& arg )
+ {
+ destroy();
+ ::new (m_storage.address()) internal_type( arg );
+ m_initialized = true ;
+ }
+
+ template<class Arg>
+ void emplace_assign ( Arg& arg )
+ {
+ destroy();
+ ::new (m_storage.address()) internal_type( arg );
+ m_initialized = true ;
+ }
+
+ void emplace_assign ()
+ {
+ destroy();
+ ::new (m_storage.address()) internal_type();
+ m_initialized = true ;
+ }
+#endif
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Constructs in-place using the given factory
+ template<class Expr>
+ void construct ( Expr&& factory, in_place_factory_base const* )
+ {
+ BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
+ boost_optional_detail::construct<value_type>(factory, m_storage.address());
+ m_initialized = true ;
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void construct ( Expr&& factory, typed_in_place_factory_base const* )
+ {
+ BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
+ factory.apply(m_storage.address()) ;
+ m_initialized = true ;
+ }
+
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+#else
+ // Constructs in-place using the given factory
+ template<class Expr>
+ void construct ( Expr const& factory, in_place_factory_base const* )
+ {
+ BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
+ boost_optional_detail::construct<value_type>(factory, m_storage.address());
+ m_initialized = true ;
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void construct ( Expr const& factory, typed_in_place_factory_base const* )
+ {
+ BOOST_STATIC_ASSERT ( !is_reference_predicate::value ) ;
+ factory.apply(m_storage.address()) ;
+ m_initialized = true ;
+ }
+
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+#endif
+
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Constructs using any expression implicitly convertible to the single argument
+ // of a one-argument T constructor.
+ // Converting constructions of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+ template<class Expr>
+ void construct ( Expr&& expr, void const* )
+ {
+ new (m_storage.address()) internal_type(boost::forward<Expr>(expr)) ;
+ m_initialized = true ;
+ }
+
+ // Assigns using a form any expression implicitly convertible to the single argument
+ // of a T's assignment operator.
+ // Converting assignments of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& expr, void const* )
+ {
+ assign_value(boost::forward<Expr>(expr), is_reference_predicate());
+ }
+#else
+ // Constructs using any expression implicitly convertible to the single argument
+ // of a one-argument T constructor.
+ // Converting constructions of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+ template<class Expr>
+ void construct ( Expr const& expr, void const* )
+ {
+ new (m_storage.address()) internal_type(expr) ;
+ m_initialized = true ;
+ }
+
+ // Assigns using a form any expression implicitly convertible to the single argument
+ // of a T's assignment operator.
+ // Converting assignments of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& expr, void const* )
+ {
+ assign_value(expr, is_reference_predicate());
+ }
+
+#endif
+
+#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+ // BCB5.64 (and probably lower versions) workaround.
+ // The in-place factories are supported by means of catch-all constructors
+ // and assignment operators (the functions are parameterized in terms of
+ // an arbitrary 'Expr' type)
+ // This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
+ // to the 'Expr'-taking functions even though explicit overloads are present for them.
+ // Thus, the following overload is needed to properly handle the case when the 'lhs'
+ // is another optional.
+ //
+ // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
+ // instead of choosing the wrong overload
+ //
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
+ template<class Expr>
+ void construct ( Expr&& expr, optional_tag const* )
+ {
+ if ( expr.is_initialized() )
+ {
+ // An exception can be thrown here.
+ // It it happens, THIS will be left uninitialized.
+ new (m_storage.address()) internal_type(types::move(expr.get())) ;
+ m_initialized = true ;
+ }
+ }
+#else
+ // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
+ template<class Expr>
+ void construct ( Expr const& expr, optional_tag const* )
+ {
+ if ( expr.is_initialized() )
+ {
+ // An exception can be thrown here.
+ // It it happens, THIS will be left uninitialized.
+ new (m_storage.address()) internal_type(expr.get()) ;
+ m_initialized = true ;
+ }
+ }
+#endif
+#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+
+ void assign_value ( argument_type val, is_not_reference_tag ) { get_impl() = val; }
+ void assign_value ( argument_type val, is_reference_tag ) { construct(val); }
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ void assign_value ( rval_reference_type val, is_not_reference_tag ) { get_impl() = static_cast<rval_reference_type>(val); }
+ void assign_value ( rval_reference_type val, is_reference_tag ) { construct( static_cast<rval_reference_type>(val) ); }
+#endif
+
+ void destroy()
+ {
+ if ( m_initialized )
+ destroy_impl(is_reference_predicate()) ;
+ }
+
+ reference_const_type get_impl() const { return dereference(get_object(), is_reference_predicate() ) ; }
+ reference_type get_impl() { return dereference(get_object(), is_reference_predicate() ) ; }
+
+ pointer_const_type get_ptr_impl() const { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+ pointer_type get_ptr_impl() { return cast_ptr(get_object(), is_reference_predicate() ) ; }
+
+ private :
+
+ // internal_type can be either T or reference_content<T>
+#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
+ // This workaround is supposed to silence GCC warnings about broken strict aliasing rules
+ internal_type const* get_object() const
+ {
+ union { void const* ap_pvoid; internal_type const* as_ptype; } caster = { m_storage.address() };
+ return caster.as_ptype;
+ }
+ internal_type * get_object()
+ {
+ union { void* ap_pvoid; internal_type* as_ptype; } caster = { m_storage.address() };
+ return caster.as_ptype;
+ }
+#else
+ internal_type const* get_object() const { return static_cast<internal_type const*>(m_storage.address()); }
+ internal_type * get_object() { return static_cast<internal_type *> (m_storage.address()); }
+#endif
+
+ // reference_content<T> lacks an implicit conversion to T&, so the following is needed to obtain a proper reference.
+ reference_const_type dereference( internal_type const* p, is_not_reference_tag ) const { return *p ; }
+ reference_type dereference( internal_type* p, is_not_reference_tag ) { return *p ; }
+ reference_const_type dereference( internal_type const* p, is_reference_tag ) const { return p->get() ; }
+ reference_type dereference( internal_type* p, is_reference_tag ) { return p->get() ; }
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x581))
+ void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->internal_type::~internal_type() ; m_initialized = false ; }
+#else
+ void destroy_impl ( is_not_reference_tag ) { get_ptr_impl()->~T() ; m_initialized = false ; }
+#endif
+
+ void destroy_impl ( is_reference_tag ) { m_initialized = false ; }
+
+ // If T is of reference type, trying to get a pointer to the held value must result in a compile-time error.
+ // Decent compilers should disallow conversions from reference_content<T>* to T*, but just in case,
+ // the following olverloads are used to filter out the case and guarantee an error in case of T being a reference.
+ pointer_const_type cast_ptr( internal_type const* p, is_not_reference_tag ) const { return p ; }
+ pointer_type cast_ptr( internal_type * p, is_not_reference_tag ) { return p ; }
+ pointer_const_type cast_ptr( internal_type const* p, is_reference_tag ) const { return &p->get() ; }
+ pointer_type cast_ptr( internal_type * p, is_reference_tag ) { return &p->get() ; }
+
+ bool m_initialized ;
+ storage_type m_storage ;
+} ;
+
+} // namespace optional_detail
+
+template<class T>
+class optional : public optional_detail::optional_base<T>
+{
+ typedef optional_detail::optional_base<T> base ;
+
+ public :
+
+ typedef optional<T> this_type ;
+
+ typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ;
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ typedef BOOST_DEDUCED_TYPENAME base::rval_reference_type rval_reference_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
+#endif
+ typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ;
+
+ // Creates an optional<T> uninitialized.
+ // No-throw
+ optional() BOOST_NOEXCEPT : base() {}
+
+ // Creates an optional<T> uninitialized.
+ // No-throw
+ optional( none_t none_ ) BOOST_NOEXCEPT : base(none_) {}
+
+ // Creates an optional<T> initialized with 'val'.
+ // Can throw if T::T(T const&) does
+ optional ( argument_type val ) : base(val) {}
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates an optional<T> initialized with 'move(val)'.
+ // Can throw if T::T(T &&) does
+ optional ( rval_reference_type val ) : base( boost::forward<T>(val) )
+ {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();}
+#endif
+
+ // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
+ // Can throw if T::T(T const&) does
+ optional ( bool cond, argument_type val ) : base(cond,val) {}
+
+ // NOTE: MSVC needs templated versions first
+
+ // Creates a deep copy of another convertible optional<U>
+ // Requires a valid conversion from U to T.
+ // Can throw if T::T(U const&) does
+ template<class U>
+ explicit optional ( optional<U> const& rhs )
+ :
+ base()
+ {
+ if ( rhs.is_initialized() )
+ this->construct(rhs.get());
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates a deep move of another convertible optional<U>
+ // Requires a valid conversion from U to T.
+ // Can throw if T::T(U&&) does
+ template<class U>
+ explicit optional ( optional<U> && rhs )
+ :
+ base()
+ {
+ if ( rhs.is_initialized() )
+ this->construct( boost::move(rhs.get()) );
+ }
+#endif
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+ // Creates an optional<T> with an expression which can be either
+ // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n);
+ // (b) An instance of TypedInPlaceFactory ( i.e. in_place<T>(a,b,...,n);
+ // (c) Any expression implicitly convertible to the single type
+ // of a one-argument T's constructor.
+ // (d*) Weak compilers (BCB) might also resolved Expr as optional<T> and optional<U>
+ // even though explicit overloads are present for these.
+ // Depending on the above some T ctor is called.
+ // Can throw if the resolved T ctor throws.
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+
+ template<class Expr>
+ explicit optional ( Expr&& expr,
+ BOOST_DEDUCED_TYPENAME boost::disable_if_c<
+ (boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value) ||
+ boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value, bool >::type = true
+ )
+ : base(boost::forward<Expr>(expr),boost::addressof(expr))
+ {optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();}
+
+#else
+ template<class Expr>
+ explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {}
+#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+#endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+ // Creates a deep copy of another optional<T>
+ // Can throw if T::T(T const&) does
+ optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates a deep move of another optional<T>
+ // Can throw if T::T(T&&) does
+ optional ( optional && rhs )
+ BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
+ : base( boost::move(rhs) )
+ {}
+
+#endif
+ // No-throw (assuming T::~T() doesn't)
+ ~optional() {}
+
+#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
+ // Assigns from an expression. See corresponding constructor.
+ // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+ template<class Expr>
+ BOOST_DEDUCED_TYPENAME boost::disable_if_c<
+ boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type>::value ||
+ boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<Expr>::type, none_t>::value,
+ optional&
+ >::type
+ operator= ( Expr&& expr )
+ {
+ optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, Expr&&>();
+ this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
+ return *this ;
+ }
+
+#else
+ template<class Expr>
+ optional& operator= ( Expr const& expr )
+ {
+ this->assign_expr(expr,boost::addressof(expr));
+ return *this ;
+ }
+#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+#endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
+
+ // Copy-assigns from another convertible optional<U> (converts && deep-copies the rhs value)
+ // Requires a valid conversion from U to T.
+ // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED
+ template<class U>
+ optional& operator= ( optional<U> const& rhs )
+ {
+ this->assign(rhs);
+ return *this ;
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Move-assigns from another convertible optional<U> (converts && deep-moves the rhs value)
+ // Requires a valid conversion from U to T.
+ // Basic Guarantee: If T::T( U && ) throws, this is left UNINITIALIZED
+ template<class U>
+ optional& operator= ( optional<U> && rhs )
+ {
+ this->assign(boost::move(rhs));
+ return *this ;
+ }
+#endif
+
+ // Assigns from another optional<T> (deep-copies the rhs value)
+ // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED
+ // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
+ optional& operator= ( optional const& rhs )
+ {
+ this->assign( static_cast<base const&>(rhs) ) ;
+ return *this ;
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Assigns from another optional<T> (deep-moves the rhs value)
+ optional& operator= ( optional && rhs )
+ BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
+ {
+ this->assign( static_cast<base &&>(rhs) ) ;
+ return *this ;
+ }
+#endif
+
+ // Assigns from a T (deep-copies the rhs value)
+ // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED
+ optional& operator= ( argument_type val )
+ {
+ this->assign( val ) ;
+ return *this ;
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Assigns from a T (deep-moves the rhs value)
+ optional& operator= ( rval_reference_type val )
+ {
+ optional_detail::prevent_binding_rvalue_ref_to_optional_lvalue_ref<T, rval_reference_type>();
+ this->assign( boost::move(val) ) ;
+ return *this ;
+ }
+#endif
+
+ // Assigns from a "none"
+ // Which destroys the current value, if any, leaving this UNINITIALIZED
+ // No-throw (assuming T::~T() doesn't)
+ optional& operator= ( none_t none_ ) BOOST_NOEXCEPT
+ {
+ this->assign( none_ ) ;
+ return *this ;
+ }
+
+#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ // Constructs in-place
+ // upon exception *this is always uninitialized
+ template<class... Args>
+ void emplace ( Args&&... args )
+ {
+ this->emplace_assign( boost::forward<Args>(args)... );
+ }
+#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ template<class Arg>
+ void emplace ( Arg&& arg )
+ {
+ this->emplace_assign( boost::forward<Arg>(arg) );
+ }
+
+ void emplace ()
+ {
+ this->emplace_assign();
+ }
+#else
+ template<class Arg>
+ void emplace ( const Arg& arg )
+ {
+ this->emplace_assign( arg );
+ }
+
+ template<class Arg>
+ void emplace ( Arg& arg )
+ {
+ this->emplace_assign( arg );
+ }
+
+ void emplace ()
+ {
+ this->emplace_assign();
+ }
+#endif
+
+ void swap( optional & arg )
+ BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
+ {
+ // allow for Koenig lookup
+ boost::swap(*this, arg);
+ }
+
+
+ // Returns a reference to the value if this is initialized, otherwise,
+ // the behaviour is UNDEFINED
+ // No-throw
+ reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
+ reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
+
+ // Returns a copy of the value if this is initialized, 'v' otherwise
+ reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
+ reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; }
+
+ // Returns a pointer to the value if this is initialized, otherwise,
+ // the behaviour is UNDEFINED
+ // No-throw
+ pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
+ pointer_type operator->() { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
+
+ // Returns a reference to the value if this is initialized, otherwise,
+ // the behaviour is UNDEFINED
+ // No-throw
+#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ reference_const_type operator *() const& { return this->get() ; }
+ reference_type operator *() & { return this->get() ; }
+ reference_type_of_temporary_wrapper operator *() && { return base::types::move(this->get()) ; }
+#else
+ reference_const_type operator *() const { return this->get() ; }
+ reference_type operator *() { return this->get() ; }
+#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
+
+#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ reference_const_type value() const&
+ {
+ if (this->is_initialized())
+ return this->get() ;
+ else
+ throw_exception(bad_optional_access());
+ }
+
+ reference_type value() &
+ {
+ if (this->is_initialized())
+ return this->get() ;
+ else
+ throw_exception(bad_optional_access());
+ }
+
+ reference_type_of_temporary_wrapper value() &&
+ {
+ if (this->is_initialized())
+ return base::types::move(this->get()) ;
+ else
+ throw_exception(bad_optional_access());
+ }
+
+#else
+ reference_const_type value() const
+ {
+ if (this->is_initialized())
+ return this->get() ;
+ else
+ throw_exception(bad_optional_access());
+ }
+
+ reference_type value()
+ {
+ if (this->is_initialized())
+ return this->get() ;
+ else
+ throw_exception(bad_optional_access());
+ }
+#endif
+
+
+#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
+ template <class U>
+ value_type value_or ( U&& v ) const&
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return boost::forward<U>(v);
+ }
+
+ template <class U>
+ value_type value_or ( U&& v ) &&
+ {
+ if (this->is_initialized())
+ return base::types::move(get());
+ else
+ return boost::forward<U>(v);
+ }
+#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ template <class U>
+ value_type value_or ( U&& v ) const
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return boost::forward<U>(v);
+ }
+#else
+ template <class U>
+ value_type value_or ( U const& v ) const
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return v;
+ }
+
+ template <class U>
+ value_type value_or ( U& v ) const
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return v;
+ }
+#endif
+
+
+#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
+ template <typename F>
+ value_type value_or_eval ( F f ) const&
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return f();
+ }
+
+ template <typename F>
+ value_type value_or_eval ( F f ) &&
+ {
+ if (this->is_initialized())
+ return base::types::move(get());
+ else
+ return f();
+ }
+#else
+ template <typename F>
+ value_type value_or_eval ( F f ) const
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return f();
+ }
+#endif
+
+ bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; }
+
+ BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
+} ;
+
+} // namespace boost
+
+
+#endif // header guard
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/optional_aligned_storage.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/optional_aligned_storage.hpp
index 2937349f525..2937349f525 100644
--- a/src/third_party/boost-1.68.0/boost/optional/detail/optional_aligned_storage.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/optional_aligned_storage.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/optional_config.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/optional_config.hpp
index bb7e12f9fc1..bb7e12f9fc1 100644
--- a/src/third_party/boost-1.68.0/boost/optional/detail/optional_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/optional_config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/optional_factory_support.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/optional_factory_support.hpp
index efff92a5032..efff92a5032 100644
--- a/src/third_party/boost-1.68.0/boost/optional/detail/optional_factory_support.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/optional_factory_support.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/optional_reference_spec.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/optional_reference_spec.hpp
index 4be140c283b..4be140c283b 100644
--- a/src/third_party/boost-1.68.0/boost/optional/detail/optional_reference_spec.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/optional_reference_spec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/optional_relops.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/optional_relops.hpp
index 2c17f2b7273..2c17f2b7273 100644
--- a/src/third_party/boost-1.68.0/boost/optional/detail/optional_relops.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/optional_relops.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional/detail/optional_swap.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/optional_swap.hpp
index 2a7059e7014..2a7059e7014 100644
--- a/src/third_party/boost-1.68.0/boost/optional/detail/optional_swap.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/optional_swap.hpp
diff --git a/src/third_party/boost-1.69.0/boost/optional/detail/optional_trivially_copyable_base.hpp b/src/third_party/boost-1.69.0/boost/optional/detail/optional_trivially_copyable_base.hpp
new file mode 100644
index 00000000000..5a37eacfec3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/optional/detail/optional_trivially_copyable_base.hpp
@@ -0,0 +1,499 @@
+// trivilally-copyable version of the storage
+
+template<class T>
+class tc_optional_base : public optional_tag
+{
+ private :
+
+ typedef tc_optional_base<T> this_type ;
+
+ protected :
+
+ typedef T value_type ;
+
+ protected:
+ typedef T & reference_type ;
+ typedef T const& reference_const_type ;
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ typedef T && rval_reference_type ;
+ typedef T && reference_type_of_temporary_wrapper ;
+#endif
+ typedef T * pointer_type ;
+ typedef T const* pointer_const_type ;
+ typedef T const& argument_type ;
+
+ tc_optional_base()
+ :
+ m_initialized(false) {}
+
+ tc_optional_base ( none_t )
+ :
+ m_initialized(false) {}
+
+ tc_optional_base ( init_value_tag, argument_type val )
+ :
+ m_initialized(true), m_storage(val) {}
+
+ tc_optional_base ( bool cond, argument_type val )
+ :
+ m_initialized(cond), m_storage(val) {}
+
+ // tc_optional_base ( tc_optional_base const& ) = default;
+
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+ template<class Expr, class PtrExpr>
+ explicit tc_optional_base ( Expr&& expr, PtrExpr const* tag )
+ :
+ m_initialized(false)
+ {
+ construct(boost::forward<Expr>(expr),tag);
+ }
+
+#else
+ // This is used for both converting and in-place constructions.
+ // Derived classes use the 'tag' to select the appropriate
+ // implementation (the correct 'construct()' overload)
+ template<class Expr>
+ explicit tc_optional_base ( Expr const& expr, Expr const* tag )
+ :
+ m_initialized(false)
+ {
+ construct(expr,tag);
+ }
+
+#endif
+
+ // tc_optional_base& operator= ( tc_optional_base const& ) = default;
+ // ~tc_optional_base() = default;
+
+ // Assigns from another optional<T> (deep-copies the rhs value)
+ void assign ( tc_optional_base const& rhs )
+ {
+ *this = rhs;
+ }
+
+ // Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
+ template<class U>
+ void assign ( optional<U> const& rhs )
+ {
+ if ( rhs.is_initialized() )
+#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
+ m_storage = rhs.get();
+#else
+ m_storage = static_cast<value_type>(rhs.get());
+#endif
+
+ m_initialized = rhs.is_initialized();
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // move-assigns from another _convertible_ optional<U> (deep-moves from the rhs value)
+ template<class U>
+ void assign ( optional<U>&& rhs )
+ {
+ typedef BOOST_DEDUCED_TYPENAME optional<U>::rval_reference_type ref_type;
+ if ( rhs.is_initialized() )
+ m_storage = static_cast<ref_type>(rhs.get());
+ m_initialized = rhs.is_initialized();
+ }
+#endif
+
+ void assign ( argument_type val )
+ {
+ construct(val);
+ }
+
+ void assign ( none_t ) { destroy(); }
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ template<class Expr, class ExprPtr>
+ void assign_expr ( Expr&& expr, ExprPtr const* tag )
+ {
+ construct(boost::forward<Expr>(expr),tag);
+ }
+#else
+ template<class Expr>
+ void assign_expr ( Expr const& expr, Expr const* tag )
+ {
+ construct(expr,tag);
+ }
+#endif
+
+#endif
+
+ public :
+
+ // Destroys the current value, if any, leaving this UNINITIALIZED
+ // No-throw (assuming T::~T() doesn't)
+ void reset() BOOST_NOEXCEPT { destroy(); }
+
+ // **DEPPRECATED** Replaces the current value -if any- with 'val'
+ void reset ( argument_type val ) BOOST_NOEXCEPT { assign(val); }
+
+ // Returns a pointer to the value if this is initialized, otherwise,
+ // returns NULL.
+ // No-throw
+ pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
+ pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
+
+ bool is_initialized() const { return m_initialized ; }
+
+ protected :
+
+ void construct ( argument_type val )
+ {
+ m_storage = val ;
+ m_initialized = true ;
+ }
+
+
+#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ // Constructs in-place
+ // upon exception *this is always uninitialized
+ template<class... Args>
+ void construct ( in_place_init_t, Args&&... args )
+ {
+ m_storage = value_type( boost::forward<Args>(args)... ) ;
+ m_initialized = true ;
+ }
+
+ template<class... Args>
+ void emplace_assign ( Args&&... args )
+ {
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+
+ template<class... Args>
+ explicit tc_optional_base ( in_place_init_t, Args&&... args )
+ :
+ m_initialized(false)
+ {
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+
+ template<class... Args>
+ explicit tc_optional_base ( in_place_init_if_t, bool cond, Args&&... args )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ template<class Arg>
+ void construct ( in_place_init_t, Arg&& arg )
+ {
+ m_storage = value_type( boost::forward<Arg>(arg) );
+ m_initialized = true ;
+ }
+
+ void construct ( in_place_init_t )
+ {
+ m_storage = value_type();
+ m_initialized = true ;
+ }
+
+ template<class Arg>
+ void emplace_assign ( Arg&& arg )
+ {
+ construct(in_place_init, boost::forward<Arg>(arg)) ;
+ }
+
+ void emplace_assign ()
+ {
+ construct(in_place_init) ;
+ }
+
+ template<class Arg>
+ explicit tc_optional_base ( in_place_init_t, Arg&& arg )
+ :
+ m_initialized(false)
+ {
+ construct(in_place_init, boost::forward<Arg>(arg));
+ }
+
+ explicit tc_optional_base ( in_place_init_t )
+ :
+ m_initialized(false), m_storage() {}
+
+ template<class Arg>
+ explicit tc_optional_base ( in_place_init_if_t, bool cond, Arg&& arg )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, boost::forward<Arg>(arg));
+ }
+
+ explicit tc_optional_base ( in_place_init_if_t, bool cond )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init);
+ }
+
+#else
+
+ template<class Arg>
+ void construct ( in_place_init_t, const Arg& arg )
+ {
+ m_storage = value_type( arg );
+ m_initialized = true ;
+ }
+
+ template<class Arg>
+ void construct ( in_place_init_t, Arg& arg )
+ {
+ m_storage = value_type( arg );
+ m_initialized = true ;
+ }
+
+ void construct ( in_place_init_t )
+ {
+ m_storage = value_type();
+ m_initialized = true ;
+ }
+
+ template<class Arg>
+ void emplace_assign ( const Arg& arg )
+ {
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ void emplace_assign ( Arg& arg )
+ {
+ construct(in_place_init, arg);
+ }
+
+ void emplace_assign ()
+ {
+ construct(in_place_init);
+ }
+
+ template<class Arg>
+ explicit tc_optional_base ( in_place_init_t, const Arg& arg )
+ : m_initialized(false)
+ {
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ explicit tc_optional_base ( in_place_init_t, Arg& arg )
+ : m_initialized(false)
+ {
+ construct(in_place_init, arg);
+ }
+
+ explicit tc_optional_base ( in_place_init_t )
+ : m_initialized(false)
+ {
+ construct(in_place_init);
+ }
+
+ template<class Arg>
+ explicit tc_optional_base ( in_place_init_if_t, bool cond, const Arg& arg )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ explicit tc_optional_base ( in_place_init_if_t, bool cond, Arg& arg )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, arg);
+ }
+
+ explicit tc_optional_base ( in_place_init_if_t, bool cond )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init);
+ }
+#endif
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Constructs in-place using the given factory
+ template<class Expr>
+ void construct ( Expr&& factory, in_place_factory_base const* )
+ {
+ boost_optional_detail::construct<value_type>(factory, boost::addressof(m_storage));
+ m_initialized = true ;
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void construct ( Expr&& factory, typed_in_place_factory_base const* )
+ {
+ factory.apply(boost::addressof(m_storage)) ;
+ m_initialized = true ;
+ }
+
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+#else
+ // Constructs in-place using the given factory
+ template<class Expr>
+ void construct ( Expr const& factory, in_place_factory_base const* )
+ {
+ boost_optional_detail::construct<value_type>(factory, m_storage.address());
+ m_initialized = true ;
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void construct ( Expr const& factory, typed_in_place_factory_base const* )
+ {
+ factory.apply(boost::addressof(m_storage)) ;
+ m_initialized = true ;
+ }
+
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+#endif
+
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Constructs using any expression implicitly convertible to the single argument
+ // of a one-argument T constructor.
+ // Converting constructions of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+ template<class Expr>
+ void construct ( Expr&& expr, void const* )
+ {
+ m_storage = value_type(boost::forward<Expr>(expr)) ;
+ m_initialized = true ;
+ }
+
+ // Assigns using a form any expression implicitly convertible to the single argument
+ // of a T's assignment operator.
+ // Converting assignments of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& expr, void const* )
+ {
+ assign_value( boost::forward<Expr>(expr) );
+ }
+#else
+ // Constructs using any expression implicitly convertible to the single argument
+ // of a one-argument T constructor.
+ // Converting constructions of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+ template<class Expr>
+ void construct ( Expr const& expr, void const* )
+ {
+ m_storage = value_type(expr) ;
+ m_initialized = true ;
+ }
+
+ // Assigns using a form any expression implicitly convertible to the single argument
+ // of a T's assignment operator.
+ // Converting assignments of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& expr, void const* )
+ {
+ assign_value(expr);
+ }
+
+#endif
+
+#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+ // BCB5.64 (and probably lower versions) workaround.
+ // The in-place factories are supported by means of catch-all constructors
+ // and assignment operators (the functions are parameterized in terms of
+ // an arbitrary 'Expr' type)
+ // This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
+ // to the 'Expr'-taking functions even though explicit overloads are present for them.
+ // Thus, the following overload is needed to properly handle the case when the 'lhs'
+ // is another optional.
+ //
+ // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
+ // instead of choosing the wrong overload
+ //
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Notice that 'Expr' will be optional<T> or optional<U> (but not tc_optional_base<..>)
+ template<class Expr>
+ void construct ( Expr&& expr, optional_tag const* )
+ {
+ if ( expr.is_initialized() )
+ {
+ // An exception can be thrown here.
+ // It it happens, THIS will be left uninitialized.
+ m_storage = value_type(boost::move(expr.get())) ;
+ m_initialized = true ;
+ }
+ }
+#else
+ // Notice that 'Expr' will be optional<T> or optional<U> (but not tc_optional_base<..>)
+ template<class Expr>
+ void construct ( Expr const& expr, optional_tag const* )
+ {
+ if ( expr.is_initialized() )
+ {
+ // An exception can be thrown here.
+ // It it happens, THIS will be left uninitialized.
+ m_storage = value_type(expr.get()) ;
+ m_initialized = true ;
+ }
+ }
+#endif
+#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+
+ void assign_value ( argument_type val ) { m_storage = val; }
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ void assign_value ( rval_reference_type val ) { m_storage = static_cast<rval_reference_type>(val); }
+#endif
+
+ void destroy()
+ {
+ m_initialized = false;
+ }
+
+ reference_const_type get_impl() const { return m_storage ; }
+ reference_type get_impl() { return m_storage ; }
+
+ pointer_const_type get_ptr_impl() const { return boost::addressof(m_storage); }
+ pointer_type get_ptr_impl() { return boost::addressof(m_storage); }
+
+ private :
+
+ bool m_initialized ;
+ T m_storage ;
+} ;
diff --git a/src/third_party/boost-1.69.0/boost/optional/optional.hpp b/src/third_party/boost-1.69.0/boost/optional/optional.hpp
new file mode 100644
index 00000000000..90acd40a172
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/optional/optional.hpp
@@ -0,0 +1,1600 @@
+// Copyright (C) 2003, 2008 Fernando Luis Cacciola Carballal.
+// Copyright (C) 2014 - 2018 Andrzej Krzemienski.
+//
+// Use, modification, and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/optional for documentation.
+//
+// You are welcome to contact the author at:
+// fernando_cacciola@hotmail.com
+//
+// Revisions:
+// 27 Apr 2008 (improved swap) Fernando Cacciola, Niels Dekker, Thorsten Ottosen
+// 05 May 2014 (Added move semantics) Andrzej Krzemienski
+//
+#ifndef BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
+#define BOOST_OPTIONAL_OPTIONAL_FLC_19NOV2002_HPP
+
+#include <new>
+#include <iosfwd>
+
+#ifdef BOOST_OPTIONAL_DETAIL_USE_STD_TYPE_TRAITS
+# include <type_traits>
+#endif
+
+#include <boost/assert.hpp>
+#include <boost/core/addressof.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/core/explicit_operator_bool.hpp>
+#include <boost/core/swap.hpp>
+#include <boost/optional/bad_optional_access.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/type.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/has_nothrow_constructor.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/is_lvalue_reference.hpp>
+#include <boost/type_traits/is_nothrow_move_assignable.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/is_scalar.hpp>
+#include <boost/move/utility.hpp>
+#include <boost/none.hpp>
+#include <boost/utility/compare_pointees.hpp>
+#include <boost/utility/result_of.hpp>
+
+#include <boost/optional/optional_fwd.hpp>
+#include <boost/optional/detail/optional_config.hpp>
+#include <boost/optional/detail/optional_factory_support.hpp>
+#include <boost/optional/detail/optional_aligned_storage.hpp>
+
+namespace boost { namespace optional_detail {
+
+template <typename T>
+struct optional_value_type
+{
+};
+
+template <typename T>
+struct optional_value_type< ::boost::optional<T> >
+{
+ typedef T type;
+};
+
+}} // namespace boost::optional_detail
+
+#ifdef BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
+#include <boost/optional/detail/old_optional_implementation.hpp>
+#else
+namespace boost {
+
+namespace optional_ns {
+
+// a tag for in-place initialization of contained value
+struct in_place_init_t
+{
+ struct init_tag{};
+ explicit in_place_init_t(init_tag){}
+};
+const in_place_init_t in_place_init ((in_place_init_t::init_tag()));
+
+// a tag for conditional in-place initialization of contained value
+struct in_place_init_if_t
+{
+ struct init_tag{};
+ explicit in_place_init_if_t(init_tag){}
+};
+const in_place_init_if_t in_place_init_if ((in_place_init_if_t::init_tag()));
+
+} // namespace optional_ns
+
+using optional_ns::in_place_init_t;
+using optional_ns::in_place_init;
+using optional_ns::in_place_init_if_t;
+using optional_ns::in_place_init_if;
+
+namespace optional_detail {
+
+struct init_value_tag {};
+
+struct optional_tag {};
+
+
+template<class T>
+class optional_base : public optional_tag
+{
+ private :
+
+ typedef aligned_storage<T> storage_type ;
+ typedef optional_base<T> this_type ;
+
+ protected :
+
+ typedef T value_type ;
+
+ protected:
+ typedef T & reference_type ;
+ typedef T const& reference_const_type ;
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ typedef T && rval_reference_type ;
+ typedef T && reference_type_of_temporary_wrapper ;
+#endif
+ typedef T * pointer_type ;
+ typedef T const* pointer_const_type ;
+ typedef T const& argument_type ;
+
+ // Creates an optional<T> uninitialized.
+ // No-throw
+ optional_base()
+ :
+ m_initialized(false) {}
+
+ // Creates an optional<T> uninitialized.
+ // No-throw
+ optional_base ( none_t )
+ :
+ m_initialized(false) {}
+
+ // Creates an optional<T> initialized with 'val'.
+ // Can throw if T::T(T const&) does
+ optional_base ( init_value_tag, argument_type val )
+ :
+ m_initialized(false)
+ {
+ construct(val);
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // move-construct an optional<T> initialized from an rvalue-ref to 'val'.
+ // Can throw if T::T(T&&) does
+ optional_base ( init_value_tag, rval_reference_type val )
+ :
+ m_initialized(false)
+ {
+ construct( boost::move(val) );
+ }
+#endif
+
+ // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional<T>.
+ // Can throw if T::T(T const&) does
+ optional_base ( bool cond, argument_type val )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(val);
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates an optional<T> initialized with 'move(val)' IFF cond is true, otherwise creates an uninitialized optional<T>.
+ // Can throw if T::T(T &&) does
+ optional_base ( bool cond, rval_reference_type val )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(boost::move(val));
+ }
+#endif
+
+ // Creates a deep copy of another optional<T>
+ // Can throw if T::T(T const&) does
+ optional_base ( optional_base const& rhs )
+ :
+ m_initialized(false)
+ {
+ if ( rhs.is_initialized() )
+ construct(rhs.get_impl());
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates a deep move of another optional<T>
+ // Can throw if T::T(T&&) does
+ optional_base ( optional_base&& rhs )
+ BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
+ :
+ m_initialized(false)
+ {
+ if ( rhs.is_initialized() )
+ construct( boost::move(rhs.get_impl()) );
+ }
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+ template<class Expr, class PtrExpr>
+ explicit optional_base ( Expr&& expr, PtrExpr const* tag )
+ :
+ m_initialized(false)
+ {
+ construct(boost::forward<Expr>(expr),tag);
+ }
+
+#else
+ // This is used for both converting and in-place constructions.
+ // Derived classes use the 'tag' to select the appropriate
+ // implementation (the correct 'construct()' overload)
+ template<class Expr>
+ explicit optional_base ( Expr const& expr, Expr const* tag )
+ :
+ m_initialized(false)
+ {
+ construct(expr,tag);
+ }
+
+#endif
+
+ optional_base& operator= ( optional_base const& rhs )
+ {
+ this->assign(rhs);
+ return *this;
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ optional_base& operator= ( optional_base && rhs )
+ BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
+ {
+ this->assign(static_cast<optional_base&&>(rhs));
+ return *this;
+ }
+#endif
+
+ // No-throw (assuming T::~T() doesn't)
+ ~optional_base() { destroy() ; }
+
+ // Assigns from another optional<T> (deep-copies the rhs value)
+ void assign ( optional_base const& rhs )
+ {
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+ assign_value(rhs.get_impl());
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+ construct(rhs.get_impl());
+ }
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Assigns from another optional<T> (deep-moves the rhs value)
+ void assign ( optional_base&& rhs )
+ {
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+ assign_value( boost::move(rhs.get_impl()) );
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+ construct(boost::move(rhs.get_impl()));
+ }
+ }
+#endif
+
+ // Assigns from another _convertible_ optional<U> (deep-copies the rhs value)
+ template<class U>
+ void assign ( optional<U> const& rhs )
+ {
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
+ assign_value( rhs.get() );
+#else
+ assign_value( static_cast<value_type>(rhs.get()) );
+#endif
+
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+#ifndef BOOST_OPTIONAL_CONFIG_RESTORE_ASSIGNMENT_OF_NONCONVERTIBLE_TYPES
+ construct(rhs.get());
+#else
+ construct(static_cast<value_type>(rhs.get()));
+#endif
+ }
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // move-assigns from another _convertible_ optional<U> (deep-moves from the rhs value)
+ template<class U>
+ void assign ( optional<U>&& rhs )
+ {
+ typedef BOOST_DEDUCED_TYPENAME optional<U>::rval_reference_type ref_type;
+ if (is_initialized())
+ {
+ if ( rhs.is_initialized() )
+ assign_value( static_cast<ref_type>(rhs.get()) );
+ else destroy();
+ }
+ else
+ {
+ if ( rhs.is_initialized() )
+ construct(static_cast<ref_type>(rhs.get()));
+ }
+ }
+#endif
+
+ // Assigns from a T (deep-copies the rhs value)
+ void assign ( argument_type val )
+ {
+ if (is_initialized())
+ assign_value(val);
+ else construct(val);
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Assigns from a T (deep-moves the rhs value)
+ void assign ( rval_reference_type val )
+ {
+ if (is_initialized())
+ assign_value( boost::move(val) );
+ else construct( boost::move(val) );
+ }
+#endif
+
+ // Assigns from "none", destroying the current value, if any, leaving this UNINITIALIZED
+ // No-throw (assuming T::~T() doesn't)
+ void assign ( none_t ) BOOST_NOEXCEPT { destroy(); }
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ template<class Expr, class ExprPtr>
+ void assign_expr ( Expr&& expr, ExprPtr const* tag )
+ {
+ if (is_initialized())
+ assign_expr_to_initialized(boost::forward<Expr>(expr),tag);
+ else construct(boost::forward<Expr>(expr),tag);
+ }
+#else
+ template<class Expr>
+ void assign_expr ( Expr const& expr, Expr const* tag )
+ {
+ if (is_initialized())
+ assign_expr_to_initialized(expr,tag);
+ else construct(expr,tag);
+ }
+#endif
+
+#endif
+
+ public :
+
+ // Destroys the current value, if any, leaving this UNINITIALIZED
+ // No-throw (assuming T::~T() doesn't)
+ void reset() BOOST_NOEXCEPT { destroy(); }
+
+ // **DEPPRECATED** Replaces the current value -if any- with 'val'
+ void reset ( argument_type val ) { assign(val); }
+
+ // Returns a pointer to the value if this is initialized, otherwise,
+ // returns NULL.
+ // No-throw
+ pointer_const_type get_ptr() const { return m_initialized ? get_ptr_impl() : 0 ; }
+ pointer_type get_ptr() { return m_initialized ? get_ptr_impl() : 0 ; }
+
+ bool is_initialized() const BOOST_NOEXCEPT { return m_initialized ; }
+
+ protected :
+
+ void construct ( argument_type val )
+ {
+ ::new (m_storage.address()) value_type(val) ;
+ m_initialized = true ;
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ void construct ( rval_reference_type val )
+ {
+ ::new (m_storage.address()) value_type( boost::move(val) ) ;
+ m_initialized = true ;
+ }
+#endif
+
+
+#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ // Constructs in-place
+ // upon exception *this is always uninitialized
+ template<class... Args>
+ void construct ( in_place_init_t, Args&&... args )
+ {
+ ::new (m_storage.address()) value_type( boost::forward<Args>(args)... ) ;
+ m_initialized = true ;
+ }
+
+ template<class... Args>
+ void emplace_assign ( Args&&... args )
+ {
+ destroy();
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+
+ template<class... Args>
+ explicit optional_base ( in_place_init_t, Args&&... args )
+ :
+ m_initialized(false)
+ {
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+
+ template<class... Args>
+ explicit optional_base ( in_place_init_if_t, bool cond, Args&&... args )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, boost::forward<Args>(args)...);
+ }
+#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ template<class Arg>
+ void construct ( in_place_init_t, Arg&& arg )
+ {
+ ::new (m_storage.address()) value_type( boost::forward<Arg>(arg) );
+ m_initialized = true ;
+ }
+
+ void construct ( in_place_init_t )
+ {
+ ::new (m_storage.address()) value_type();
+ m_initialized = true ;
+ }
+
+ template<class Arg>
+ void emplace_assign ( Arg&& arg )
+ {
+ destroy();
+ construct(in_place_init, boost::forward<Arg>(arg)) ;
+ }
+
+ void emplace_assign ()
+ {
+ destroy();
+ construct(in_place_init) ;
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_t, Arg&& arg )
+ :
+ m_initialized(false)
+ {
+ construct(in_place_init, boost::forward<Arg>(arg));
+ }
+
+ explicit optional_base ( in_place_init_t )
+ :
+ m_initialized(false)
+ {
+ construct(in_place_init);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_if_t, bool cond, Arg&& arg )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, boost::forward<Arg>(arg));
+ }
+
+ explicit optional_base ( in_place_init_if_t, bool cond )
+ :
+ m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init);
+ }
+
+#else
+
+ template<class Arg>
+ void construct ( in_place_init_t, const Arg& arg )
+ {
+ ::new (m_storage.address()) value_type( arg );
+ m_initialized = true ;
+ }
+
+ template<class Arg>
+ void construct ( in_place_init_t, Arg& arg )
+ {
+ ::new (m_storage.address()) value_type( arg );
+ m_initialized = true ;
+ }
+
+ void construct ( in_place_init_t )
+ {
+ ::new (m_storage.address()) value_type();
+ m_initialized = true ;
+ }
+
+ template<class Arg>
+ void emplace_assign ( const Arg& arg )
+ {
+ destroy();
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ void emplace_assign ( Arg& arg )
+ {
+ destroy();
+ construct(in_place_init, arg);
+ }
+
+ void emplace_assign ()
+ {
+ destroy();
+ construct(in_place_init);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_t, const Arg& arg )
+ : m_initialized(false)
+ {
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_t, Arg& arg )
+ : m_initialized(false)
+ {
+ construct(in_place_init, arg);
+ }
+
+ explicit optional_base ( in_place_init_t )
+ : m_initialized(false)
+ {
+ construct(in_place_init);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_if_t, bool cond, const Arg& arg )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, arg);
+ }
+
+ template<class Arg>
+ explicit optional_base ( in_place_init_if_t, bool cond, Arg& arg )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init, arg);
+ }
+
+ explicit optional_base ( in_place_init_if_t, bool cond )
+ : m_initialized(false)
+ {
+ if ( cond )
+ construct(in_place_init);
+ }
+#endif
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Constructs in-place using the given factory
+ template<class Expr>
+ void construct ( Expr&& factory, in_place_factory_base const* )
+ {
+ boost_optional_detail::construct<value_type>(factory, m_storage.address());
+ m_initialized = true ;
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void construct ( Expr&& factory, typed_in_place_factory_base const* )
+ {
+ factory.apply(m_storage.address()) ;
+ m_initialized = true ;
+ }
+
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& factory, in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& factory, typed_in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+#else
+ // Constructs in-place using the given factory
+ template<class Expr>
+ void construct ( Expr const& factory, in_place_factory_base const* )
+ {
+ boost_optional_detail::construct<value_type>(factory, m_storage.address());
+ m_initialized = true ;
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void construct ( Expr const& factory, typed_in_place_factory_base const* )
+ {
+ factory.apply(m_storage.address()) ;
+ m_initialized = true ;
+ }
+
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& factory, in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+
+ // Constructs in-place using the given typed factory
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& factory, typed_in_place_factory_base const* tag )
+ {
+ destroy();
+ construct(factory,tag);
+ }
+#endif
+
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Constructs using any expression implicitly convertible to the single argument
+ // of a one-argument T constructor.
+ // Converting constructions of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+ template<class Expr>
+ void construct ( Expr&& expr, void const* )
+ {
+ new (m_storage.address()) value_type(boost::forward<Expr>(expr)) ;
+ m_initialized = true ;
+ }
+
+ // Assigns using a form any expression implicitly convertible to the single argument
+ // of a T's assignment operator.
+ // Converting assignments of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr&& expr, void const* )
+ {
+ assign_value( boost::forward<Expr>(expr) );
+ }
+#else
+ // Constructs using any expression implicitly convertible to the single argument
+ // of a one-argument T constructor.
+ // Converting constructions of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting constructor of T from U.
+ template<class Expr>
+ void construct ( Expr const& expr, void const* )
+ {
+ new (m_storage.address()) value_type(expr) ;
+ m_initialized = true ;
+ }
+
+ // Assigns using a form any expression implicitly convertible to the single argument
+ // of a T's assignment operator.
+ // Converting assignments of optional<T> from optional<U> uses this function with
+ // 'Expr' being of type 'U' and relying on a converting assignment of T from U.
+ template<class Expr>
+ void assign_expr_to_initialized ( Expr const& expr, void const* )
+ {
+ assign_value(expr);
+ }
+
+#endif
+
+#ifdef BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+ // BCB5.64 (and probably lower versions) workaround.
+ // The in-place factories are supported by means of catch-all constructors
+ // and assignment operators (the functions are parameterized in terms of
+ // an arbitrary 'Expr' type)
+ // This compiler incorrectly resolves the overload set and sinks optional<T> and optional<U>
+ // to the 'Expr'-taking functions even though explicit overloads are present for them.
+ // Thus, the following overload is needed to properly handle the case when the 'lhs'
+ // is another optional.
+ //
+ // For VC<=70 compilers this workaround dosen't work becasue the comnpiler issues and error
+ // instead of choosing the wrong overload
+ //
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
+ template<class Expr>
+ void construct ( Expr&& expr, optional_tag const* )
+ {
+ if ( expr.is_initialized() )
+ {
+ // An exception can be thrown here.
+ // It it happens, THIS will be left uninitialized.
+ new (m_storage.address()) value_type(boost::move(expr.get())) ;
+ m_initialized = true ;
+ }
+ }
+#else
+ // Notice that 'Expr' will be optional<T> or optional<U> (but not optional_base<..>)
+ template<class Expr>
+ void construct ( Expr const& expr, optional_tag const* )
+ {
+ if ( expr.is_initialized() )
+ {
+ // An exception can be thrown here.
+ // It it happens, THIS will be left uninitialized.
+ new (m_storage.address()) value_type(expr.get()) ;
+ m_initialized = true ;
+ }
+ }
+#endif
+#endif // defined BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION
+
+ void assign_value ( argument_type val ) { get_impl() = val; }
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ void assign_value ( rval_reference_type val ) { get_impl() = static_cast<rval_reference_type>(val); }
+#endif
+
+ void destroy()
+ {
+ if ( m_initialized )
+ destroy_impl() ;
+ }
+
+ reference_const_type get_impl() const { return m_storage.ref() ; }
+ reference_type get_impl() { return m_storage.ref() ; }
+
+ pointer_const_type get_ptr_impl() const { return m_storage.ptr_ref(); }
+ pointer_type get_ptr_impl() { return m_storage.ptr_ref(); }
+
+ private :
+
+#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1900))
+ void destroy_impl ( ) { m_storage.ptr_ref()->~T() ; m_initialized = false ; }
+#else
+ void destroy_impl ( ) { m_storage.ref().T::~T() ; m_initialized = false ; }
+#endif
+
+ bool m_initialized ;
+ storage_type m_storage ;
+} ;
+
+#include <boost/optional/detail/optional_trivially_copyable_base.hpp>
+
+// definition of metafunciton is_optional_val_init_candidate
+template <typename U>
+struct is_optional_related
+ : boost::conditional< boost::is_base_of<optional_detail::optional_tag, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
+ || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, none_t>::value
+ || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, in_place_init_t>::value
+ || boost::is_same<BOOST_DEDUCED_TYPENAME boost::decay<U>::type, in_place_init_if_t>::value,
+ boost::true_type, boost::false_type>::type
+{};
+
+#if !defined(BOOST_OPTIONAL_DETAIL_NO_IS_CONSTRUCTIBLE_TRAIT)
+
+template <typename T, typename U>
+struct is_convertible_to_T_or_factory
+ : boost::conditional< boost::is_base_of<boost::in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
+ || boost::is_base_of<boost::typed_in_place_factory_base, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value
+ || (boost::is_constructible<T, U&&>::value && !boost::is_same<T, BOOST_DEDUCED_TYPENAME boost::decay<U>::type>::value)
+ , boost::true_type, boost::false_type>::type
+{};
+
+template <typename T, typename U>
+struct is_optional_constructible : boost::is_constructible<T, U>
+{};
+
+#else
+
+template <typename, typename>
+struct is_convertible_to_T_or_factory : boost::true_type
+{};
+
+template <typename T, typename U>
+struct is_optional_constructible : boost::true_type
+{};
+
+#endif // is_convertible condition
+
+template <typename T, typename U>
+struct is_optional_val_init_candidate
+ : boost::conditional< !is_optional_related<U>::value && is_convertible_to_T_or_factory<T, U>::value
+ , boost::true_type, boost::false_type>::type
+{};
+
+} // namespace optional_detail
+
+namespace optional_config {
+
+template <typename T>
+struct optional_uses_direct_storage_for
+ : boost::conditional<(boost::is_scalar<T>::value && !boost::is_const<T>::value && !boost::is_volatile<T>::value)
+ , boost::true_type, boost::false_type>::type
+{};
+
+} // namespace optional_config
+
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_DIRECT_STORAGE_SPEC
+# define BOOST_OPTIONAL_BASE_TYPE(T) boost::conditional< optional_config::optional_uses_direct_storage_for<T>::value, \
+ optional_detail::tc_optional_base<T>, \
+ optional_detail::optional_base<T> \
+ >::type
+#else
+# define BOOST_OPTIONAL_BASE_TYPE(T) optional_detail::optional_base<T>
+#endif
+
+template<class T>
+class optional
+ : public BOOST_OPTIONAL_BASE_TYPE(T)
+{
+ typedef typename BOOST_OPTIONAL_BASE_TYPE(T) base ;
+
+ public :
+
+ typedef optional<T> this_type ;
+
+ typedef BOOST_DEDUCED_TYPENAME base::value_type value_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::reference_type reference_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::reference_const_type reference_const_type ;
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ typedef BOOST_DEDUCED_TYPENAME base::rval_reference_type rval_reference_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::reference_type_of_temporary_wrapper reference_type_of_temporary_wrapper ;
+#endif
+ typedef BOOST_DEDUCED_TYPENAME base::pointer_type pointer_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::pointer_const_type pointer_const_type ;
+ typedef BOOST_DEDUCED_TYPENAME base::argument_type argument_type ;
+
+ // Creates an optional<T> uninitialized.
+ // No-throw
+ optional() BOOST_NOEXCEPT : base() {}
+
+ // Creates an optional<T> uninitialized.
+ // No-throw
+ optional( none_t none_ ) BOOST_NOEXCEPT : base(none_) {}
+
+ // Creates an optional<T> initialized with 'val'.
+ // Can throw if T::T(T const&) does
+ optional ( argument_type val ) : base(optional_detail::init_value_tag(), val) {}
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates an optional<T> initialized with 'move(val)'.
+ // Can throw if T::T(T &&) does
+ optional ( rval_reference_type val ) : base(optional_detail::init_value_tag(), boost::forward<T>(val))
+ {}
+#endif
+
+ // Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
+ // Can throw if T::T(T const&) does
+ optional ( bool cond, argument_type val ) : base(cond,val) {}
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ /// Creates an optional<T> initialized with 'val' IFF cond is true, otherwise creates an uninitialized optional.
+ // Can throw if T::T(T &&) does
+ optional ( bool cond, rval_reference_type val ) : base( cond, boost::forward<T>(val) )
+ {}
+#endif
+
+ // NOTE: MSVC needs templated versions first
+
+ // Creates a deep copy of another convertible optional<U>
+ // Requires a valid conversion from U to T.
+ // Can throw if T::T(U const&) does
+ template<class U>
+ explicit optional ( optional<U> const& rhs
+#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
+ ,BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_constructible<T, U const&>, bool>::type = true
+#endif
+ )
+ :
+ base()
+ {
+ if ( rhs.is_initialized() )
+ this->construct(rhs.get());
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates a deep move of another convertible optional<U>
+ // Requires a valid conversion from U to T.
+ // Can throw if T::T(U&&) does
+ template<class U>
+ explicit optional ( optional<U> && rhs
+#ifndef BOOST_OPTIONAL_DETAIL_NO_SFINAE_FRIENDLY_CONSTRUCTORS
+ ,BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_constructible<T, U>, bool>::type = true
+#endif
+ )
+ :
+ base()
+ {
+ if ( rhs.is_initialized() )
+ this->construct( boost::move(rhs.get()) );
+ }
+#endif
+
+#ifndef BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+ // Creates an optional<T> with an expression which can be either
+ // (a) An instance of InPlaceFactory (i.e. in_place(a,b,...,n);
+ // (b) An instance of TypedInPlaceFactory ( i.e. in_place<T>(a,b,...,n);
+ // (c) Any expression implicitly convertible to the single type
+ // of a one-argument T's constructor.
+ // (d*) Weak compilers (BCB) might also resolved Expr as optional<T> and optional<U>
+ // even though explicit overloads are present for these.
+ // Depending on the above some T ctor is called.
+ // Can throw if the resolved T ctor throws.
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+
+ template<class Expr>
+ explicit optional ( Expr&& expr,
+ BOOST_DEDUCED_TYPENAME boost::enable_if< optional_detail::is_optional_val_init_candidate<T, Expr>, bool>::type = true
+ )
+ : base(boost::forward<Expr>(expr),boost::addressof(expr))
+ {}
+
+#else
+ template<class Expr>
+ explicit optional ( Expr const& expr ) : base(expr,boost::addressof(expr)) {}
+#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+#endif // !defined BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT
+
+ // Creates a deep copy of another optional<T>
+ // Can throw if T::T(T const&) does
+#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
+ optional ( optional const& ) = default;
+#else
+ optional ( optional const& rhs ) : base( static_cast<base const&>(rhs) ) {}
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Creates a deep move of another optional<T>
+ // Can throw if T::T(T&&) does
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
+ optional ( optional && rhs ) = default;
+#else
+ optional ( optional && rhs )
+ BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value)
+ : base( boost::move(rhs) )
+ {}
+#endif
+
+#endif
+
+#if BOOST_WORKAROUND(_MSC_VER, <= 1600)
+ // On old MSVC compilers the implicitly declared dtor is not called
+ ~optional() {}
+#endif
+
+
+#if !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
+ // Assigns from an expression. See corresponding constructor.
+ // Basic Guarantee: If the resolved T ctor throws, this is left UNINITIALIZED
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+ template<class Expr>
+ BOOST_DEDUCED_TYPENAME boost::enable_if<optional_detail::is_optional_val_init_candidate<T, Expr>, optional&>::type
+ operator= ( Expr&& expr )
+ {
+ this->assign_expr(boost::forward<Expr>(expr),boost::addressof(expr));
+ return *this ;
+ }
+
+#else
+ template<class Expr>
+ optional& operator= ( Expr const& expr )
+ {
+ this->assign_expr(expr,boost::addressof(expr));
+ return *this ;
+ }
+#endif // !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+#endif // !defined(BOOST_OPTIONAL_NO_INPLACE_FACTORY_SUPPORT) && !defined(BOOST_OPTIONAL_WEAK_OVERLOAD_RESOLUTION)
+
+ // Copy-assigns from another convertible optional<U> (converts && deep-copies the rhs value)
+ // Requires a valid conversion from U to T.
+ // Basic Guarantee: If T::T( U const& ) throws, this is left UNINITIALIZED
+ template<class U>
+ optional& operator= ( optional<U> const& rhs )
+ {
+ this->assign(rhs);
+ return *this ;
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Move-assigns from another convertible optional<U> (converts && deep-moves the rhs value)
+ // Requires a valid conversion from U to T.
+ // Basic Guarantee: If T::T( U && ) throws, this is left UNINITIALIZED
+ template<class U>
+ optional& operator= ( optional<U> && rhs )
+ {
+ this->assign(boost::move(rhs));
+ return *this ;
+ }
+#endif
+
+ // Assigns from another optional<T> (deep-copies the rhs value)
+ // Basic Guarantee: If T::T( T const& ) throws, this is left UNINITIALIZED
+ // (NOTE: On BCB, this operator is not actually called and left is left UNMODIFIED in case of a throw)
+#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
+ optional& operator= ( optional const& rhs ) = default;
+#else
+ optional& operator= ( optional const& rhs )
+ {
+ this->assign( static_cast<base const&>(rhs) ) ;
+ return *this ;
+ }
+#endif
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Assigns from another optional<T> (deep-moves the rhs value)
+#ifndef BOOST_OPTIONAL_DETAIL_NO_DEFAULTED_MOVE_FUNCTIONS
+ optional& operator= ( optional && ) = default;
+#else
+ optional& operator= ( optional && rhs )
+ BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
+ {
+ this->assign( static_cast<base &&>(rhs) ) ;
+ return *this ;
+ }
+#endif
+
+#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+#ifndef BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+
+ // Assigns from a T (deep-moves/copies the rhs value)
+ template <typename T_>
+ BOOST_DEDUCED_TYPENAME boost::enable_if<boost::is_same<T, BOOST_DEDUCED_TYPENAME boost::decay<T_>::type>, optional&>::type
+ operator= ( T_&& val )
+ {
+ this->assign( boost::forward<T_>(val) ) ;
+ return *this ;
+ }
+
+#else
+
+ // Assigns from a T (deep-copies the rhs value)
+ // Basic Guarantee: If T::( T const& ) throws, this is left UNINITIALIZED
+ optional& operator= ( argument_type val )
+ {
+ this->assign( val ) ;
+ return *this ;
+ }
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ // Assigns from a T (deep-moves the rhs value)
+ optional& operator= ( rval_reference_type val )
+ {
+ this->assign( boost::move(val) ) ;
+ return *this ;
+ }
+#endif
+
+#endif // BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX
+
+ // Assigns from a "none"
+ // Which destroys the current value, if any, leaving this UNINITIALIZED
+ // No-throw (assuming T::~T() doesn't)
+ optional& operator= ( none_t none_ ) BOOST_NOEXCEPT
+ {
+ this->assign( none_ ) ;
+ return *this ;
+ }
+
+#if (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES) && (!defined BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ // Constructs in-place
+ // upon exception *this is always uninitialized
+ template<class... Args>
+ void emplace ( Args&&... args )
+ {
+ this->emplace_assign( boost::forward<Args>(args)... );
+ }
+
+ template<class... Args>
+ explicit optional ( in_place_init_t, Args&&... args )
+ : base( in_place_init, boost::forward<Args>(args)... )
+ {}
+
+ template<class... Args>
+ explicit optional ( in_place_init_if_t, bool cond, Args&&... args )
+ : base( in_place_init_if, cond, boost::forward<Args>(args)... )
+ {}
+
+#elif (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ template<class Arg>
+ void emplace ( Arg&& arg )
+ {
+ this->emplace_assign( boost::forward<Arg>(arg) );
+ }
+
+ void emplace ()
+ {
+ this->emplace_assign();
+ }
+
+ template<class Args>
+ explicit optional ( in_place_init_t, Args&& args )
+ : base( in_place_init, boost::forward<Args>(args) )
+ {}
+
+ explicit optional ( in_place_init_t )
+ : base( in_place_init )
+ {}
+
+ template<class Args>
+ explicit optional ( in_place_init_if_t, bool cond, Args&& args )
+ : base( in_place_init_if, cond, boost::forward<Args>(args) )
+ {}
+
+ explicit optional ( in_place_init_if_t, bool cond )
+ : base( in_place_init_if, cond )
+ {}
+#else
+ template<class Arg>
+ void emplace ( const Arg& arg )
+ {
+ this->emplace_assign( arg );
+ }
+
+ template<class Arg>
+ void emplace ( Arg& arg )
+ {
+ this->emplace_assign( arg );
+ }
+
+ void emplace ()
+ {
+ this->emplace_assign();
+ }
+
+ template<class Arg>
+ explicit optional ( in_place_init_t, const Arg& arg )
+ : base( in_place_init, arg )
+ {}
+
+ template<class Arg>
+ explicit optional ( in_place_init_t, Arg& arg )
+ : base( in_place_init, arg )
+ {}
+
+ explicit optional ( in_place_init_t )
+ : base( in_place_init )
+ {}
+
+ template<class Arg>
+ explicit optional ( in_place_init_if_t, bool cond, const Arg& arg )
+ : base( in_place_init_if, cond, arg )
+ {}
+
+ template<class Arg>
+ explicit optional ( in_place_init_if_t, bool cond, Arg& arg )
+ : base( in_place_init_if, cond, arg )
+ {}
+
+ explicit optional ( in_place_init_if_t, bool cond )
+ : base( in_place_init_if, cond )
+ {}
+#endif
+
+ void swap( optional & arg )
+ BOOST_NOEXCEPT_IF(::boost::is_nothrow_move_constructible<T>::value && ::boost::is_nothrow_move_assignable<T>::value)
+ {
+ // allow for Koenig lookup
+ boost::swap(*this, arg);
+ }
+
+
+ // Returns a reference to the value if this is initialized, otherwise,
+ // the behaviour is UNDEFINED
+ // No-throw
+ reference_const_type get() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
+ reference_type get() { BOOST_ASSERT(this->is_initialized()) ; return this->get_impl(); }
+
+ // Returns a copy of the value if this is initialized, 'v' otherwise
+ reference_const_type get_value_or ( reference_const_type v ) const { return this->is_initialized() ? get() : v ; }
+ reference_type get_value_or ( reference_type v ) { return this->is_initialized() ? get() : v ; }
+
+ // Returns a pointer to the value if this is initialized, otherwise,
+ // the behaviour is UNDEFINED
+ // No-throw
+ pointer_const_type operator->() const { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
+ pointer_type operator->() { BOOST_ASSERT(this->is_initialized()) ; return this->get_ptr_impl() ; }
+
+ // Returns a reference to the value if this is initialized, otherwise,
+ // the behaviour is UNDEFINED
+ // No-throw
+#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ reference_const_type operator *() const& { return this->get() ; }
+ reference_type operator *() & { return this->get() ; }
+ reference_type_of_temporary_wrapper operator *() && { return boost::move(this->get()) ; }
+#else
+ reference_const_type operator *() const { return this->get() ; }
+ reference_type operator *() { return this->get() ; }
+#endif // !defined BOOST_NO_CXX11_REF_QUALIFIERS
+
+#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ reference_const_type value() const&
+ {
+ if (this->is_initialized())
+ return this->get() ;
+ else
+ throw_exception(bad_optional_access());
+ }
+
+ reference_type value() &
+ {
+ if (this->is_initialized())
+ return this->get() ;
+ else
+ throw_exception(bad_optional_access());
+ }
+
+ reference_type_of_temporary_wrapper value() &&
+ {
+ if (this->is_initialized())
+ return boost::move(this->get()) ;
+ else
+ throw_exception(bad_optional_access());
+ }
+
+#else
+ reference_const_type value() const
+ {
+ if (this->is_initialized())
+ return this->get() ;
+ else
+ throw_exception(bad_optional_access());
+ }
+
+ reference_type value()
+ {
+ if (this->is_initialized())
+ return this->get() ;
+ else
+ throw_exception(bad_optional_access());
+ }
+#endif
+
+
+#ifndef BOOST_NO_CXX11_REF_QUALIFIERS
+ template <class U>
+ value_type value_or ( U&& v ) const&
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return boost::forward<U>(v);
+ }
+
+ template <class U>
+ value_type value_or ( U&& v ) &&
+ {
+ if (this->is_initialized())
+ return boost::move(get());
+ else
+ return boost::forward<U>(v);
+ }
+#elif !defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+ template <class U>
+ value_type value_or ( U&& v ) const
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return boost::forward<U>(v);
+ }
+#else
+ template <class U>
+ value_type value_or ( U const& v ) const
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return v;
+ }
+
+ template <class U>
+ value_type value_or ( U& v ) const
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return v;
+ }
+#endif
+
+
+#if (!defined BOOST_NO_CXX11_REF_QUALIFIERS) && (!defined BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES)
+ template <typename F>
+ value_type value_or_eval ( F f ) const&
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return f();
+ }
+
+ template <typename F>
+ value_type value_or_eval ( F f ) &&
+ {
+ if (this->is_initialized())
+ return boost::move(get());
+ else
+ return f();
+ }
+
+ template <typename F>
+ optional<typename boost::result_of<F(reference_type)>::type> map(F f) &
+ {
+ if (this->has_value())
+ return f(get());
+ else
+ return none;
+ }
+
+ template <typename F>
+ optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const&
+ {
+ if (this->has_value())
+ return f(get());
+ else
+ return none;
+ }
+
+ template <typename F>
+ optional<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type> map(F f) &&
+ {
+ if (this->has_value())
+ return f(boost::move(this->get()));
+ else
+ return none;
+ }
+
+ template <typename F>
+ optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f) &
+ {
+ if (this->has_value())
+ return f(get());
+ else
+ return none;
+ }
+
+ template <typename F>
+ optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const&
+ {
+ if (this->has_value())
+ return f(get());
+ else
+ return none;
+ }
+
+ template <typename F>
+ optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type_of_temporary_wrapper)>::type>::type> flat_map(F f) &&
+ {
+ if (this->has_value())
+ return f(boost::move(get()));
+ else
+ return none;
+ }
+
+#else
+ template <typename F>
+ value_type value_or_eval ( F f ) const
+ {
+ if (this->is_initialized())
+ return get();
+ else
+ return f();
+ }
+
+ template <typename F>
+ optional<typename boost::result_of<F(reference_type)>::type> map(F f)
+ {
+ if (this->has_value())
+ return f(get());
+ else
+ return none;
+ }
+
+ template <typename F>
+ optional<typename boost::result_of<F(reference_const_type)>::type> map(F f) const
+ {
+ if (this->has_value())
+ return f(get());
+ else
+ return none;
+ }
+
+ template <typename F>
+ optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_type)>::type>::type> flat_map(F f)
+ {
+ if (this->has_value())
+ return f(get());
+ else
+ return none;
+ }
+
+ template <typename F>
+ optional<typename optional_detail::optional_value_type<typename boost::result_of<F(reference_const_type)>::type>::type> flat_map(F f) const
+ {
+ if (this->has_value())
+ return f(get());
+ else
+ return none;
+ }
+
+#endif
+
+ bool has_value() const BOOST_NOEXCEPT { return this->is_initialized() ; }
+
+ bool operator!() const BOOST_NOEXCEPT { return !this->is_initialized() ; }
+
+ BOOST_EXPLICIT_OPERATOR_BOOL_NOEXCEPT()
+} ;
+
+} // namespace boost
+
+#endif // BOOST_OPTIONAL_CONFIG_USE_OLD_IMPLEMENTATION_OF_OPTIONAL
+
+namespace boost {
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+template<class T>
+class optional<T&&>
+{
+ BOOST_STATIC_ASSERT_MSG(sizeof(T) == 0, "Optional rvalue references are illegal.");
+} ;
+#endif
+
+} // namespace boost
+
+#ifndef BOOST_OPTIONAL_CONFIG_DONT_SPECIALIZE_OPTIONAL_REFS
+# include <boost/optional/detail/optional_reference_spec.hpp>
+#endif
+
+namespace boost {
+
+#ifndef BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+template<class T>
+inline
+optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type> make_optional ( T && v )
+{
+ return optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>(boost::forward<T>(v));
+}
+
+// Returns optional<T>(cond,v)
+template<class T>
+inline
+optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type> make_optional ( bool cond, T && v )
+{
+ return optional<BOOST_DEDUCED_TYPENAME boost::decay<T>::type>(cond,boost::forward<T>(v));
+}
+
+#else
+
+// Returns optional<T>(v)
+template<class T>
+inline
+optional<T> make_optional ( T const& v )
+{
+ return optional<T>(v);
+}
+
+// Returns optional<T>(cond,v)
+template<class T>
+inline
+optional<T> make_optional ( bool cond, T const& v )
+{
+ return optional<T>(cond,v);
+}
+
+#endif // BOOST_OPTIONAL_DETAIL_NO_RVALUE_REFERENCES
+
+// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
+// No-throw
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type
+get ( optional<T> const& opt )
+{
+ return opt.get() ;
+}
+
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::reference_type
+get ( optional<T>& opt )
+{
+ return opt.get() ;
+}
+
+// Returns a pointer to the value if this is initialized, otherwise, returns NULL.
+// No-throw
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::pointer_const_type
+get ( optional<T> const* opt )
+{
+ return opt->get_ptr() ;
+}
+
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::pointer_type
+get ( optional<T>* opt )
+{
+ return opt->get_ptr() ;
+}
+
+// Returns a reference to the value if this is initialized, otherwise, the behaviour is UNDEFINED.
+// No-throw
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type
+get_optional_value_or ( optional<T> const& opt, BOOST_DEDUCED_TYPENAME optional<T>::reference_const_type v )
+{
+ return opt.get_value_or(v) ;
+}
+
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::reference_type
+get_optional_value_or ( optional<T>& opt, BOOST_DEDUCED_TYPENAME optional<T>::reference_type v )
+{
+ return opt.get_value_or(v) ;
+}
+
+// Returns a pointer to the value if this is initialized, otherwise, returns NULL.
+// No-throw
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::pointer_const_type
+get_pointer ( optional<T> const& opt )
+{
+ return opt.get_ptr() ;
+}
+
+template<class T>
+inline
+BOOST_DEDUCED_TYPENAME optional<T>::pointer_type
+get_pointer ( optional<T>& opt )
+{
+ return opt.get_ptr() ;
+}
+
+} // namespace boost
+
+namespace boost {
+
+// The following declaration prevents a bug where operator safe-bool is used upon streaming optional object if you forget the IO header.
+template<class CharType, class CharTrait>
+std::basic_ostream<CharType, CharTrait>&
+operator<<(std::basic_ostream<CharType, CharTrait>& os, optional_detail::optional_tag const&)
+{
+ BOOST_STATIC_ASSERT_MSG(sizeof(CharType) == 0, "If you want to output boost::optional, include header <boost/optional/optional_io.hpp>");
+ return os;
+}
+
+} // namespace boost
+
+#include <boost/optional/detail/optional_relops.hpp>
+#include <boost/optional/detail/optional_swap.hpp>
+
+#endif // header guard
diff --git a/src/third_party/boost-1.68.0/boost/optional/optional_fwd.hpp b/src/third_party/boost-1.69.0/boost/optional/optional_fwd.hpp
index faee253e55b..faee253e55b 100644
--- a/src/third_party/boost-1.68.0/boost/optional/optional_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/optional_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/optional/optional_io.hpp b/src/third_party/boost-1.69.0/boost/optional/optional_io.hpp
index ce81b68f8e4..ce81b68f8e4 100644
--- a/src/third_party/boost-1.68.0/boost/optional/optional_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/optional/optional_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/pending/integer_log2.hpp b/src/third_party/boost-1.69.0/boost/pending/integer_log2.hpp
new file mode 100644
index 00000000000..938459463d8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/pending/integer_log2.hpp
@@ -0,0 +1,9 @@
+#ifndef BOOST_PENDING_INTEGER_LOG2_HPP
+#define BOOST_PENDING_INTEGER_LOG2_HPP
+
+#include <boost/integer/integer_log2.hpp>
+#include <boost/config/header_deprecated.hpp>
+
+BOOST_HEADER_DEPRECATED("<boost/integer/integer_log2.hpp>");
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/pointee.hpp b/src/third_party/boost-1.69.0/boost/pointee.hpp
index f3bcf446b4b..f3bcf446b4b 100644
--- a/src/third_party/boost-1.68.0/boost/pointee.hpp
+++ b/src/third_party/boost-1.69.0/boost/pointee.hpp
diff --git a/src/third_party/boost-1.68.0/boost/pointer_cast.hpp b/src/third_party/boost-1.69.0/boost/pointer_cast.hpp
index d47327bc700..d47327bc700 100644
--- a/src/third_party/boost-1.68.0/boost/pointer_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/pointer_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/pointer_to_other.hpp b/src/third_party/boost-1.69.0/boost/pointer_to_other.hpp
index d7d455dc6e3..d7d455dc6e3 100644
--- a/src/third_party/boost-1.68.0/boost/pointer_to_other.hpp
+++ b/src/third_party/boost-1.69.0/boost/pointer_to_other.hpp
diff --git a/src/third_party/boost-1.68.0/boost/predef.h b/src/third_party/boost-1.69.0/boost/predef.h
index 4965337875d..4965337875d 100644
--- a/src/third_party/boost-1.68.0/boost/predef.h
+++ b/src/third_party/boost-1.69.0/boost/predef.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture.h b/src/third_party/boost-1.69.0/boost/predef/architecture.h
index 120d557963b..120d557963b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/alpha.h b/src/third_party/boost-1.69.0/boost/predef/architecture/alpha.h
index 5bcade18b17..5bcade18b17 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/alpha.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/alpha.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/arm.h b/src/third_party/boost-1.69.0/boost/predef/architecture/arm.h
index 96f89c86fd0..96f89c86fd0 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/arm.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/arm.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/blackfin.h b/src/third_party/boost-1.69.0/boost/predef/architecture/blackfin.h
index 84c58a25e9f..84c58a25e9f 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/blackfin.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/blackfin.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/convex.h b/src/third_party/boost-1.69.0/boost/predef/architecture/convex.h
index ac783a9cc1a..ac783a9cc1a 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/convex.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/convex.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/ia64.h b/src/third_party/boost-1.69.0/boost/predef/architecture/ia64.h
index 9b1972bd398..9b1972bd398 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/ia64.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/ia64.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/m68k.h b/src/third_party/boost-1.69.0/boost/predef/architecture/m68k.h
index 63ed5f8479b..63ed5f8479b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/m68k.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/m68k.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/mips.h b/src/third_party/boost-1.69.0/boost/predef/architecture/mips.h
index 0189d7dbd65..0189d7dbd65 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/mips.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/mips.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/parisc.h b/src/third_party/boost-1.69.0/boost/predef/architecture/parisc.h
index c75a1f38892..c75a1f38892 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/parisc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/parisc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/ppc.h b/src/third_party/boost-1.69.0/boost/predef/architecture/ppc.h
index e8c57c91f2c..e8c57c91f2c 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/ppc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/ppc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/ptx.h b/src/third_party/boost-1.69.0/boost/predef/architecture/ptx.h
index 335517b276e..335517b276e 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/ptx.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/ptx.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/pyramid.h b/src/third_party/boost-1.69.0/boost/predef/architecture/pyramid.h
index 4f13253807a..4f13253807a 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/pyramid.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/pyramid.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/rs6k.h b/src/third_party/boost-1.69.0/boost/predef/architecture/rs6k.h
index 8a6e9b6b534..8a6e9b6b534 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/rs6k.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/rs6k.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/sparc.h b/src/third_party/boost-1.69.0/boost/predef/architecture/sparc.h
index a89a5100b8f..a89a5100b8f 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/sparc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/sparc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/superh.h b/src/third_party/boost-1.69.0/boost/predef/architecture/superh.h
index da0529e5e03..da0529e5e03 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/superh.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/superh.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/sys370.h b/src/third_party/boost-1.69.0/boost/predef/architecture/sys370.h
index cfd85dc803b..cfd85dc803b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/sys370.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/sys370.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/sys390.h b/src/third_party/boost-1.69.0/boost/predef/architecture/sys390.h
index 47aff6acd63..47aff6acd63 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/sys390.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/sys390.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/x86.h b/src/third_party/boost-1.69.0/boost/predef/architecture/x86.h
index 0ef3ef45efd..0ef3ef45efd 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/x86.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/x86.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/x86/32.h b/src/third_party/boost-1.69.0/boost/predef/architecture/x86/32.h
index 17fbff554a8..17fbff554a8 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/x86/32.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/x86/32.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/x86/64.h b/src/third_party/boost-1.69.0/boost/predef/architecture/x86/64.h
index f761c92596c..f761c92596c 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/x86/64.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/x86/64.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/architecture/z.h b/src/third_party/boost-1.69.0/boost/predef/architecture/z.h
index 3d218aa2644..3d218aa2644 100644
--- a/src/third_party/boost-1.68.0/boost/predef/architecture/z.h
+++ b/src/third_party/boost-1.69.0/boost/predef/architecture/z.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler.h b/src/third_party/boost-1.69.0/boost/predef/compiler.h
index de1b4ab573a..de1b4ab573a 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/borland.h b/src/third_party/boost-1.69.0/boost/predef/compiler/borland.h
index 3677cca7fda..3677cca7fda 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/borland.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/borland.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/clang.h b/src/third_party/boost-1.69.0/boost/predef/compiler/clang.h
index 56678fe6a5e..56678fe6a5e 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/clang.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/clang.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/comeau.h b/src/third_party/boost-1.69.0/boost/predef/compiler/comeau.h
index 15a45648961..15a45648961 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/comeau.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/comeau.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/compaq.h b/src/third_party/boost-1.69.0/boost/predef/compiler/compaq.h
new file mode 100644
index 00000000000..c6a83ffd0d5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/compaq.h
@@ -0,0 +1,66 @@
+/*
+Copyright Rene Rivera 2008-2015
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef BOOST_PREDEF_COMPILER_COMPAQ_H
+#define BOOST_PREDEF_COMPILER_COMPAQ_H
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_COMP_DEC`]
+
+[@http://www.openvms.compaq.com/openvms/brochures/deccplus/ Compaq C/C++] compiler.
+Version number available as major, minor, and patch.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__DECCXX`] [__predef_detection__]]
+ [[`__DECC`] [__predef_detection__]]
+
+ [[`__DECCXX_VER`] [V.R.P]]
+ [[`__DECC_VER`] [V.R.P]]
+ ]
+ */
+
+#define BOOST_COMP_DEC BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if defined(__DECC) || defined(__DECCXX)
+# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECCXX_VER)
+# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECCXX_VER)
+# endif
+# if !defined(BOOST_COMP_DEC_DETECTION) && defined(__DECC_VER)
+# define BOOST_COMP_DEC_DETECTION BOOST_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER)
+# endif
+# if !defined(BOOST_COMP_DEC_DETECTION)
+# define BOOST_COMP_DEC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
+# endif
+#endif
+
+#ifdef BOOST_COMP_DEC_DETECTION
+# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
+# define BOOST_COMP_DEC_EMULATED BOOST_COMP_DEC_DETECTION
+# else
+# undef BOOST_COMP_DEC
+# define BOOST_COMP_DEC BOOST_COMP_DEC_DETECTION
+# endif
+# define BOOST_COMP_DEC_AVAILABLE
+# include <boost/predef/detail/comp_detected.h>
+#endif
+
+#define BOOST_COMP_DEC_NAME "Compaq C/C++"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC,BOOST_COMP_DEC_NAME)
+
+#ifdef BOOST_COMP_DEC_EMULATED
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_DEC_EMULATED,BOOST_COMP_DEC_NAME)
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/diab.h b/src/third_party/boost-1.69.0/boost/predef/compiler/diab.h
index f5a37de7d3f..f5a37de7d3f 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/diab.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/diab.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/digitalmars.h b/src/third_party/boost-1.69.0/boost/predef/compiler/digitalmars.h
index 9bd58502e0f..9bd58502e0f 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/digitalmars.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/digitalmars.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/dignus.h b/src/third_party/boost-1.69.0/boost/predef/compiler/dignus.h
index c65d3dc7648..c65d3dc7648 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/dignus.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/dignus.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/edg.h b/src/third_party/boost-1.69.0/boost/predef/compiler/edg.h
index 2ffb9b0a6d3..2ffb9b0a6d3 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/edg.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/edg.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/ekopath.h b/src/third_party/boost-1.69.0/boost/predef/compiler/ekopath.h
index e5cde36752c..e5cde36752c 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/ekopath.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/ekopath.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/gcc.h b/src/third_party/boost-1.69.0/boost/predef/compiler/gcc.h
index c2d7fff178b..c2d7fff178b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/gcc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/gcc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/gcc_xml.h b/src/third_party/boost-1.69.0/boost/predef/compiler/gcc_xml.h
index acae600c812..acae600c812 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/gcc_xml.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/gcc_xml.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/greenhills.h b/src/third_party/boost-1.69.0/boost/predef/compiler/greenhills.h
index 23b8f017d8b..23b8f017d8b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/greenhills.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/greenhills.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/hp_acc.h b/src/third_party/boost-1.69.0/boost/predef/compiler/hp_acc.h
index 7b3ffe9068a..7b3ffe9068a 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/hp_acc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/hp_acc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/iar.h b/src/third_party/boost-1.69.0/boost/predef/compiler/iar.h
index 237f492e291..237f492e291 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/iar.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/iar.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/ibm.h b/src/third_party/boost-1.69.0/boost/predef/compiler/ibm.h
index 6931ebd8840..6931ebd8840 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/ibm.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/ibm.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/intel.h b/src/third_party/boost-1.69.0/boost/predef/compiler/intel.h
index f8a17ef437e..f8a17ef437e 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/intel.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/intel.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/kai.h b/src/third_party/boost-1.69.0/boost/predef/compiler/kai.h
index 68ce84e1466..68ce84e1466 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/kai.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/kai.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/llvm.h b/src/third_party/boost-1.69.0/boost/predef/compiler/llvm.h
index de654eb8cec..de654eb8cec 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/llvm.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/llvm.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/metaware.h b/src/third_party/boost-1.69.0/boost/predef/compiler/metaware.h
index 1a32039cef5..1a32039cef5 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/metaware.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/metaware.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/metrowerks.h b/src/third_party/boost-1.69.0/boost/predef/compiler/metrowerks.h
index f2d739b958b..f2d739b958b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/metrowerks.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/metrowerks.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/microtec.h b/src/third_party/boost-1.69.0/boost/predef/compiler/microtec.h
index 066a6d2ad9e..066a6d2ad9e 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/microtec.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/microtec.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/mpw.h b/src/third_party/boost-1.69.0/boost/predef/compiler/mpw.h
index 118330646e0..118330646e0 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/mpw.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/mpw.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/compiler/nvcc.h b/src/third_party/boost-1.69.0/boost/predef/compiler/nvcc.h
new file mode 100644
index 00000000000..4130539958d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/nvcc.h
@@ -0,0 +1,73 @@
+/*
+Copyright Benjamin Worpitz 2018
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef BOOST_PREDEF_COMPILER_NVCC_H
+#define BOOST_PREDEF_COMPILER_NVCC_H
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_COMP_NVCC`]
+
+[@https://en.wikipedia.org/wiki/NVIDIA_CUDA_Compiler NVCC] compiler.
+Version number available as major, minor, and patch beginning with version 7.5.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__NVCC__`] [__predef_detection__]]
+
+ [[`__CUDACC_VER_MAJOR__`, `__CUDACC_VER_MINOR__`, `__CUDACC_VER_BUILD__`] [V.R.P]]
+ ]
+ */
+
+#define BOOST_COMP_NVCC BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if defined(__NVCC__)
+# if !defined(__CUDACC_VER_MAJOR__) || !defined(__CUDACC_VER_MINOR__) || !defined(__CUDACC_VER_BUILD__)
+# define BOOST_COMP_NVCC_DETECTION BOOST_VERSION_NUMBER_AVAILABLE
+# else
+# define BOOST_COMP_NVCC_DETECTION BOOST_VERSION_NUMBER(__CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, __CUDACC_VER_BUILD__)
+# endif
+#endif
+
+#ifdef BOOST_COMP_NVCC_DETECTION
+/*
+Always define BOOST_COMP_NVCC instead of BOOST_COMP_NVCC_EMULATED
+The nvcc compilation process is somewhat special as can be read here:
+https://docs.nvidia.com/cuda/cuda-compiler-driver-nvcc/index.html#cuda-compilation-trajectory
+The nvcc compiler precompiles the input two times. Once for the device code
+being compiled by the cicc device compiler and once for the host code
+compiled by the real host compiler. NVCC uses gcc/clang/msvc/...
+depending on the host compiler being set on the command line.
+
+Predef (as a preprocessor only lib) detects the one doing the preprocessing
+as compiler and expects it to be the one doing the real compilation.
+This is not true for NVCC which is only doing the preprocessing and which
+is using another compiler for parts of its work. So for NVCC it should be
+allowed to set BOOST_COMP_NVCC additionally to the already detected host
+compiler because both is true: It is gcc/clang/... compiling the code, but it
+is also NVCC doing the preprocessing and adding some other quirks you may
+want to detect.
+
+This behavior is similar to what boost config is doing in `select_compiler_config.hpp`.
+There the NVCC detection is not handled as a real compiler (part of the
+#if-#elif) but as additional option before the real compiler.
+*/
+# undef BOOST_COMP_NVCC
+# define BOOST_COMP_NVCC BOOST_COMP_NVCC_DETECTION
+# define BOOST_COMP_NVCC_AVAILABLE
+# include <boost/predef/detail/comp_detected.h>
+#endif
+
+#define BOOST_COMP_NVCC_NAME "NVCC"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_NVCC,BOOST_COMP_NVCC_NAME)
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/palm.h b/src/third_party/boost-1.69.0/boost/predef/compiler/palm.h
index 707925a6511..707925a6511 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/palm.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/palm.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/pgi.h b/src/third_party/boost-1.69.0/boost/predef/compiler/pgi.h
index e016aeb0806..e016aeb0806 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/pgi.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/pgi.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/sgi_mipspro.h b/src/third_party/boost-1.69.0/boost/predef/compiler/sgi_mipspro.h
index 00739f0c3c8..00739f0c3c8 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/sgi_mipspro.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/sgi_mipspro.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/sunpro.h b/src/third_party/boost-1.69.0/boost/predef/compiler/sunpro.h
index 92c39260136..92c39260136 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/sunpro.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/sunpro.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/tendra.h b/src/third_party/boost-1.69.0/boost/predef/compiler/tendra.h
index c2bc5e4ef56..c2bc5e4ef56 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/tendra.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/tendra.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/visualc.h b/src/third_party/boost-1.69.0/boost/predef/compiler/visualc.h
index f81e61ed522..f81e61ed522 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/visualc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/visualc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/compiler/watcom.h b/src/third_party/boost-1.69.0/boost/predef/compiler/watcom.h
index b0e7776d064..b0e7776d064 100644
--- a/src/third_party/boost-1.68.0/boost/predef/compiler/watcom.h
+++ b/src/third_party/boost-1.69.0/boost/predef/compiler/watcom.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/detail/_cassert.h b/src/third_party/boost-1.69.0/boost/predef/detail/_cassert.h
index 940e944e2bb..940e944e2bb 100644
--- a/src/third_party/boost-1.68.0/boost/predef/detail/_cassert.h
+++ b/src/third_party/boost-1.69.0/boost/predef/detail/_cassert.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/detail/_exception.h b/src/third_party/boost-1.69.0/boost/predef/detail/_exception.h
index f5a6687a9fa..f5a6687a9fa 100644
--- a/src/third_party/boost-1.68.0/boost/predef/detail/_exception.h
+++ b/src/third_party/boost-1.69.0/boost/predef/detail/_exception.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/detail/comp_detected.h b/src/third_party/boost-1.69.0/boost/predef/detail/comp_detected.h
index fda1801b657..fda1801b657 100644
--- a/src/third_party/boost-1.68.0/boost/predef/detail/comp_detected.h
+++ b/src/third_party/boost-1.69.0/boost/predef/detail/comp_detected.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/detail/endian_compat.h b/src/third_party/boost-1.69.0/boost/predef/detail/endian_compat.h
new file mode 100644
index 00000000000..421064ef39d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/predef/detail/endian_compat.h
@@ -0,0 +1,28 @@
+/*
+Copyright Rene Rivera 2013-2018
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H
+#define BOOST_PREDEF_DETAIL_ENDIAN_COMPAT_H
+
+#pragma message("The use of BOOST_*_ENDIAN and BOOST_BYTE_ORDER is deprecated. Please include <boost/predef/other/endian.h> and use BOOST_ENDIAN_*_BYTE instead")
+
+#include <boost/predef/other/endian.h>
+
+#if BOOST_ENDIAN_BIG_BYTE
+# define BOOST_BIG_ENDIAN
+# define BOOST_BYTE_ORDER 4321
+#endif
+#if BOOST_ENDIAN_LITTLE_BYTE
+# define BOOST_LITTLE_ENDIAN
+# define BOOST_BYTE_ORDER 1234
+#endif
+#if BOOST_ENDIAN_LITTLE_WORD
+# define BOOST_PDP_ENDIAN
+# define BOOST_BYTE_ORDER 2134
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/predef/detail/os_detected.h b/src/third_party/boost-1.69.0/boost/predef/detail/os_detected.h
index 08e10f993af..08e10f993af 100644
--- a/src/third_party/boost-1.68.0/boost/predef/detail/os_detected.h
+++ b/src/third_party/boost-1.69.0/boost/predef/detail/os_detected.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/detail/platform_detected.h b/src/third_party/boost-1.69.0/boost/predef/detail/platform_detected.h
index 4faf6938d88..4faf6938d88 100644
--- a/src/third_party/boost-1.68.0/boost/predef/detail/platform_detected.h
+++ b/src/third_party/boost-1.69.0/boost/predef/detail/platform_detected.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/detail/test.h b/src/third_party/boost-1.69.0/boost/predef/detail/test.h
index 546a9e407d3..546a9e407d3 100644
--- a/src/third_party/boost-1.68.0/boost/predef/detail/test.h
+++ b/src/third_party/boost-1.69.0/boost/predef/detail/test.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware.h b/src/third_party/boost-1.69.0/boost/predef/hardware.h
index 972b73af68a..972b73af68a 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd.h
index ac5c9da2cab..ac5c9da2cab 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/arm.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm.h
index 3b3fc3fa366..3b3fc3fa366 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/arm.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/arm/versions.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm/versions.h
index 8425b318628..8425b318628 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/arm/versions.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/arm/versions.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/ppc.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc.h
index eef25c2d269..eef25c2d269 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/ppc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/ppc/versions.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc/versions.h
index ffe3f0b1e5a..ffe3f0b1e5a 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/ppc/versions.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/ppc/versions.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86.h
index 88bd81e362b..88bd81e362b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86/versions.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86/versions.h
index 0c7a4d38132..0c7a4d38132 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86/versions.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86/versions.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86_amd.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd.h
index c80d1ce2b77..c80d1ce2b77 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86_amd.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86_amd/versions.h b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd/versions.h
index 1f9e96c500c..1f9e96c500c 100644
--- a/src/third_party/boost-1.68.0/boost/predef/hardware/simd/x86_amd/versions.h
+++ b/src/third_party/boost-1.69.0/boost/predef/hardware/simd/x86_amd/versions.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/language.h b/src/third_party/boost-1.69.0/boost/predef/language.h
index 9ce3cc98b4b..9ce3cc98b4b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/language.h
+++ b/src/third_party/boost-1.69.0/boost/predef/language.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/language/cuda.h b/src/third_party/boost-1.69.0/boost/predef/language/cuda.h
index 5c5fed30810..5c5fed30810 100644
--- a/src/third_party/boost-1.68.0/boost/predef/language/cuda.h
+++ b/src/third_party/boost-1.69.0/boost/predef/language/cuda.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/language/objc.h b/src/third_party/boost-1.69.0/boost/predef/language/objc.h
index 24e3ad3c5c0..24e3ad3c5c0 100644
--- a/src/third_party/boost-1.68.0/boost/predef/language/objc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/language/objc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/language/stdc.h b/src/third_party/boost-1.69.0/boost/predef/language/stdc.h
index db25c12dc08..db25c12dc08 100644
--- a/src/third_party/boost-1.68.0/boost/predef/language/stdc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/language/stdc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/language/stdcpp.h b/src/third_party/boost-1.69.0/boost/predef/language/stdcpp.h
index 34dc8c7deb7..34dc8c7deb7 100644
--- a/src/third_party/boost-1.68.0/boost/predef/language/stdcpp.h
+++ b/src/third_party/boost-1.69.0/boost/predef/language/stdcpp.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library.h b/src/third_party/boost-1.69.0/boost/predef/library.h
index 40518a90d80..40518a90d80 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/c.h b/src/third_party/boost-1.69.0/boost/predef/library/c.h
index 7ca84cc0799..7ca84cc0799 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/c.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/c.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/c/_prefix.h b/src/third_party/boost-1.69.0/boost/predef/library/c/_prefix.h
index 12bcb0fb3fb..12bcb0fb3fb 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/c/_prefix.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/c/_prefix.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/c/cloudabi.h b/src/third_party/boost-1.69.0/boost/predef/library/c/cloudabi.h
index e6acaee65d3..e6acaee65d3 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/c/cloudabi.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/c/cloudabi.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/c/gnu.h b/src/third_party/boost-1.69.0/boost/predef/library/c/gnu.h
index 9e4ca89d642..9e4ca89d642 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/c/gnu.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/c/gnu.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/c/uc.h b/src/third_party/boost-1.69.0/boost/predef/library/c/uc.h
index 03081e94c62..03081e94c62 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/c/uc.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/c/uc.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/c/vms.h b/src/third_party/boost-1.69.0/boost/predef/library/c/vms.h
index 685f1a77d6c..685f1a77d6c 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/c/vms.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/c/vms.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/c/zos.h b/src/third_party/boost-1.69.0/boost/predef/library/c/zos.h
index 222d35539f5..222d35539f5 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/c/zos.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/c/zos.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std.h b/src/third_party/boost-1.69.0/boost/predef/library/std.h
index 403b6ff37af..403b6ff37af 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/_prefix.h b/src/third_party/boost-1.69.0/boost/predef/library/std/_prefix.h
index 932b8557b18..932b8557b18 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/_prefix.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/_prefix.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/cxx.h b/src/third_party/boost-1.69.0/boost/predef/library/std/cxx.h
index 07b52cd6af8..07b52cd6af8 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/cxx.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/cxx.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/dinkumware.h b/src/third_party/boost-1.69.0/boost/predef/library/std/dinkumware.h
index 0fc077605d6..0fc077605d6 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/dinkumware.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/dinkumware.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/libcomo.h b/src/third_party/boost-1.69.0/boost/predef/library/std/libcomo.h
index 97d4a53d6f6..97d4a53d6f6 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/libcomo.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/libcomo.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/modena.h b/src/third_party/boost-1.69.0/boost/predef/library/std/modena.h
index b67ac62f17b..b67ac62f17b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/modena.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/modena.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/msl.h b/src/third_party/boost-1.69.0/boost/predef/library/std/msl.h
index d73c74c6d84..d73c74c6d84 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/msl.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/msl.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/roguewave.h b/src/third_party/boost-1.69.0/boost/predef/library/std/roguewave.h
index 9c3f288b6f9..9c3f288b6f9 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/roguewave.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/roguewave.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/sgi.h b/src/third_party/boost-1.69.0/boost/predef/library/std/sgi.h
index 5d19bbac4d9..5d19bbac4d9 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/sgi.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/sgi.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/stdcpp3.h b/src/third_party/boost-1.69.0/boost/predef/library/std/stdcpp3.h
index c9802924a7b..c9802924a7b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/stdcpp3.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/stdcpp3.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/stlport.h b/src/third_party/boost-1.69.0/boost/predef/library/std/stlport.h
index c09483bd9fa..c09483bd9fa 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/stlport.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/stlport.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/library/std/vacpp.h b/src/third_party/boost-1.69.0/boost/predef/library/std/vacpp.h
index 632f846c201..632f846c201 100644
--- a/src/third_party/boost-1.68.0/boost/predef/library/std/vacpp.h
+++ b/src/third_party/boost-1.69.0/boost/predef/library/std/vacpp.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/make.h b/src/third_party/boost-1.69.0/boost/predef/make.h
index fccd2d3cc94..fccd2d3cc94 100644
--- a/src/third_party/boost-1.68.0/boost/predef/make.h
+++ b/src/third_party/boost-1.69.0/boost/predef/make.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os.h b/src/third_party/boost-1.69.0/boost/predef/os.h
index bedf99ec549..bedf99ec549 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/aix.h b/src/third_party/boost-1.69.0/boost/predef/os/aix.h
index 3e5a953f1bd..3e5a953f1bd 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/aix.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/aix.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/amigaos.h b/src/third_party/boost-1.69.0/boost/predef/os/amigaos.h
index 7b32ddf59ca..7b32ddf59ca 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/amigaos.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/amigaos.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/android.h b/src/third_party/boost-1.69.0/boost/predef/os/android.h
index 125dbded9e1..125dbded9e1 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/android.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/android.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/beos.h b/src/third_party/boost-1.69.0/boost/predef/os/beos.h
index 19f4cb71e3f..19f4cb71e3f 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/beos.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/beos.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/bsd.h b/src/third_party/boost-1.69.0/boost/predef/os/bsd.h
index fad9aed7876..fad9aed7876 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/bsd.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/bsd.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/bsd/bsdi.h b/src/third_party/boost-1.69.0/boost/predef/os/bsd/bsdi.h
index afdcd3eb7c4..afdcd3eb7c4 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/bsd/bsdi.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/bsd/bsdi.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/bsd/dragonfly.h b/src/third_party/boost-1.69.0/boost/predef/os/bsd/dragonfly.h
index 1d075798a1e..1d075798a1e 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/bsd/dragonfly.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/bsd/dragonfly.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/bsd/free.h b/src/third_party/boost-1.69.0/boost/predef/os/bsd/free.h
index 81c002109dc..81c002109dc 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/bsd/free.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/bsd/free.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/bsd/net.h b/src/third_party/boost-1.69.0/boost/predef/os/bsd/net.h
index 387cbde54f1..387cbde54f1 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/bsd/net.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/bsd/net.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/bsd/open.h b/src/third_party/boost-1.69.0/boost/predef/os/bsd/open.h
index f6ccd24a9b7..f6ccd24a9b7 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/bsd/open.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/bsd/open.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/os/cygwin.h b/src/third_party/boost-1.69.0/boost/predef/os/cygwin.h
new file mode 100644
index 00000000000..207809c0ea8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/predef/os/cygwin.h
@@ -0,0 +1,50 @@
+/*
+Copyright Rene Rivera 2008-2015
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef BOOST_PREDEF_OS_CYGWIN_H
+#define BOOST_PREDEF_OS_CYGWIN_H
+
+#include <boost/predef/version_number.h>
+#include <boost/predef/make.h>
+
+/*`
+[heading `BOOST_OS_CYGWIN`]
+
+[@http://en.wikipedia.org/wiki/Cygwin Cygwin] evironment.
+
+[table
+ [[__predef_symbol__] [__predef_version__]]
+
+ [[`__CYGWIN__`] [__predef_detection__]]
+
+ [[`CYGWIN_VERSION_API_MAJOR`, `CYGWIN_VERSION_API_MINOR`] [V.R.0]]
+ ]
+ */
+
+#define BOOST_OS_CYGWIN BOOST_VERSION_NUMBER_NOT_AVAILABLE
+
+#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
+ defined(__CYGWIN__) \
+ )
+# include <cygwin/version.h>
+# undef BOOST_OS_CYGWIN
+# define BOOST_OS_CYGWIN \
+ BOOST_VERSION_NUMBER(CYGWIN_VERSION_API_MAJOR,\
+ CYGWIN_VERSION_API_MINOR, 0)
+#endif
+
+#if BOOST_OS_CYGWIN
+# define BOOST_OS_CYGWIN_AVAILABLE
+# include <boost/predef/detail/os_detected.h>
+#endif
+
+#define BOOST_OS_CYGWIN_NAME "Cygwin"
+
+#endif
+
+#include <boost/predef/detail/test.h>
+BOOST_PREDEF_DECLARE_TEST(BOOST_OS_CYGWIN,BOOST_OS_CYGWIN_NAME)
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/haiku.h b/src/third_party/boost-1.69.0/boost/predef/os/haiku.h
index d79dbeac88d..d79dbeac88d 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/haiku.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/haiku.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/hpux.h b/src/third_party/boost-1.69.0/boost/predef/os/hpux.h
index 29243f48790..29243f48790 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/hpux.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/hpux.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/ios.h b/src/third_party/boost-1.69.0/boost/predef/os/ios.h
index f853815a6d1..f853815a6d1 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/ios.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/ios.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/irix.h b/src/third_party/boost-1.69.0/boost/predef/os/irix.h
index fa6ac41dcdd..fa6ac41dcdd 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/irix.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/irix.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/linux.h b/src/third_party/boost-1.69.0/boost/predef/os/linux.h
index a297d089542..a297d089542 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/linux.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/linux.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/macos.h b/src/third_party/boost-1.69.0/boost/predef/os/macos.h
index 4afb30d0879..4afb30d0879 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/macos.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/macos.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/os400.h b/src/third_party/boost-1.69.0/boost/predef/os/os400.h
index b3446c26c93..b3446c26c93 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/os400.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/os400.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/qnxnto.h b/src/third_party/boost-1.69.0/boost/predef/os/qnxnto.h
index e76fbf27816..e76fbf27816 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/qnxnto.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/qnxnto.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/solaris.h b/src/third_party/boost-1.69.0/boost/predef/os/solaris.h
index 75ddc91dae5..75ddc91dae5 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/solaris.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/solaris.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/unix.h b/src/third_party/boost-1.69.0/boost/predef/os/unix.h
index a60710427a3..a60710427a3 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/unix.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/unix.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/vms.h b/src/third_party/boost-1.69.0/boost/predef/os/vms.h
index 2f8f786d4ee..2f8f786d4ee 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/vms.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/vms.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/os/windows.h b/src/third_party/boost-1.69.0/boost/predef/os/windows.h
index 9db43909505..9db43909505 100644
--- a/src/third_party/boost-1.68.0/boost/predef/os/windows.h
+++ b/src/third_party/boost-1.69.0/boost/predef/os/windows.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/other.h b/src/third_party/boost-1.69.0/boost/predef/other.h
index c09ad4945fe..c09ad4945fe 100644
--- a/src/third_party/boost-1.68.0/boost/predef/other.h
+++ b/src/third_party/boost-1.69.0/boost/predef/other.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/other/endian.h b/src/third_party/boost-1.69.0/boost/predef/other/endian.h
index b42da53803d..b42da53803d 100644
--- a/src/third_party/boost-1.68.0/boost/predef/other/endian.h
+++ b/src/third_party/boost-1.69.0/boost/predef/other/endian.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform.h b/src/third_party/boost-1.69.0/boost/predef/platform.h
index 6c366d595c9..6c366d595c9 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/cloudabi.h b/src/third_party/boost-1.69.0/boost/predef/platform/cloudabi.h
index c44f689454d..c44f689454d 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/cloudabi.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/cloudabi.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/ios.h b/src/third_party/boost-1.69.0/boost/predef/platform/ios.h
index af1c364cf05..af1c364cf05 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/ios.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/ios.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/mingw.h b/src/third_party/boost-1.69.0/boost/predef/platform/mingw.h
index c52827d7d8b..c52827d7d8b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/mingw.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/mingw.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/mingw32.h b/src/third_party/boost-1.69.0/boost/predef/platform/mingw32.h
index ff90038b4c4..ff90038b4c4 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/mingw32.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/mingw32.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/mingw64.h b/src/third_party/boost-1.69.0/boost/predef/platform/mingw64.h
index a35dd3e016e..a35dd3e016e 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/mingw64.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/mingw64.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/windows_desktop.h b/src/third_party/boost-1.69.0/boost/predef/platform/windows_desktop.h
index afb39079a61..afb39079a61 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/windows_desktop.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/windows_desktop.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/windows_phone.h b/src/third_party/boost-1.69.0/boost/predef/platform/windows_phone.h
index 0ebc76d2769..0ebc76d2769 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/windows_phone.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/windows_phone.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/windows_runtime.h b/src/third_party/boost-1.69.0/boost/predef/platform/windows_runtime.h
index e7978d7525e..e7978d7525e 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/windows_runtime.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/windows_runtime.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/windows_server.h b/src/third_party/boost-1.69.0/boost/predef/platform/windows_server.h
index 7bd629da34b..7bd629da34b 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/windows_server.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/windows_server.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/windows_store.h b/src/third_party/boost-1.69.0/boost/predef/platform/windows_store.h
index 3a3fd8e982d..3a3fd8e982d 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/windows_store.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/windows_store.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/windows_system.h b/src/third_party/boost-1.69.0/boost/predef/platform/windows_system.h
index 92f424fe7f5..92f424fe7f5 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/windows_system.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/windows_system.h
diff --git a/src/third_party/boost-1.68.0/boost/predef/platform/windows_uwp.h b/src/third_party/boost-1.69.0/boost/predef/platform/windows_uwp.h
index e4c6647f413..e4c6647f413 100644
--- a/src/third_party/boost-1.68.0/boost/predef/platform/windows_uwp.h
+++ b/src/third_party/boost-1.69.0/boost/predef/platform/windows_uwp.h
diff --git a/src/third_party/boost-1.69.0/boost/predef/version.h b/src/third_party/boost-1.69.0/boost/predef/version.h
new file mode 100644
index 00000000000..19b12a78360
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/predef/version.h
@@ -0,0 +1,15 @@
+/*
+Copyright Rene Rivera 2015-2016
+Distributed under the Boost Software License, Version 1.0.
+(See accompanying file LICENSE_1_0.txt or copy at
+http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef BOOST_PREDEF_VERSION_H
+#define BOOST_PREDEF_VERSION_H
+
+#include <boost/predef/version_number.h>
+
+#define BOOST_PREDEF_VERSION BOOST_VERSION_NUMBER(1,9,0)
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/predef/version_number.h b/src/third_party/boost-1.69.0/boost/predef/version_number.h
index 44942709c7f..44942709c7f 100644
--- a/src/third_party/boost-1.68.0/boost/predef/version_number.h
+++ b/src/third_party/boost-1.69.0/boost/predef/version_number.h
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/add.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/add.hpp
index 5a29f554f57..5a29f554f57 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/add.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/add.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/dec.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/dec.hpp
index 23dd0a35a1e..23dd0a35a1e 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/dec.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/dec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/detail/div_base.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/detail/div_base.hpp
index 106632a3dee..106632a3dee 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/detail/div_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/detail/div_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/inc.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/inc.hpp
index 1597ab85c33..1597ab85c33 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/inc.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/inc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/mod.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/mod.hpp
index 62489d1dbdd..62489d1dbdd 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/mod.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/mod.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/sub.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/sub.hpp
index 5262cdaff8c..5262cdaff8c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/arithmetic/sub.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/arithmetic/sub.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/array/data.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/array/data.hpp
index 10c926a750e..10c926a750e 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/array/data.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/array/data.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/array/elem.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/array/elem.hpp
index 105ba24e31d..105ba24e31d 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/array/elem.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/array/elem.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/array/size.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/array/size.hpp
index 3f370ee41b8..3f370ee41b8 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/array/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/array/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/cat.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/cat.hpp
index 52a389270c2..52a389270c2 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/cat.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/cat.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/comma_if.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/comma_if.hpp
index 9ceb0795558..9ceb0795558 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/comma_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/comma_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/equal.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/equal.hpp
index d299efe5869..d299efe5869 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/greater.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/greater.hpp
index 83d2fcf2376..83d2fcf2376 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/less.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/less.hpp
index d91ea3d02e1..d91ea3d02e1 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/less.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/less_equal.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/less_equal.hpp
index 1302d5470aa..1302d5470aa 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/not_equal.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/not_equal.hpp
index b4b0eae129d..b4b0eae129d 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/comparison/not_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/comparison/not_equal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/config/config.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/config/config.hpp
new file mode 100644
index 00000000000..2c1e72f907b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/config/config.hpp
@@ -0,0 +1,115 @@
+# /* **************************************************************************
+# * *
+# * (C) Copyright Paul Mensonides 2002-2011. *
+# * (C) Copyright Edward Diener 2011. *
+# * Distributed under the Boost Software License, Version 1.0. (See *
+# * accompanying file LICENSE_1_0.txt or copy at *
+# * http://www.boost.org/LICENSE_1_0.txt) *
+# * *
+# ************************************************************************** */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP
+# define BOOST_PREPROCESSOR_CONFIG_CONFIG_HPP
+#
+# /* BOOST_PP_CONFIG_FLAGS */
+#
+# define BOOST_PP_CONFIG_STRICT() 0x0001
+# define BOOST_PP_CONFIG_IDEAL() 0x0002
+#
+# define BOOST_PP_CONFIG_MSVC() 0x0004
+# define BOOST_PP_CONFIG_MWCC() 0x0008
+# define BOOST_PP_CONFIG_BCC() 0x0010
+# define BOOST_PP_CONFIG_EDG() 0x0020
+# define BOOST_PP_CONFIG_DMC() 0x0040
+#
+# ifndef BOOST_PP_CONFIG_FLAGS
+# if defined(__GCCXML__) || defined(__WAVE__) || defined(__MWERKS__) && __MWERKS__ >= 0x3200
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
+# elif defined(__EDG__) || defined(__EDG_VERSION__)
+# if defined(_MSC_VER) && !defined(__clang__) && (defined(__INTELLISENSE__) || __EDG_VERSION__ >= 308)
+# if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
+# else
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
+# endif
+# else
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_EDG() | BOOST_PP_CONFIG_STRICT())
+# endif
+# elif defined(_MSC_VER) && defined(__clang__)
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
+# elif defined(__MWERKS__)
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MWCC())
+# elif defined(__DMC__)
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_DMC())
+# elif defined(__BORLANDC__) && __BORLANDC__ >= 0x581
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
+# elif defined(__BORLANDC__) || defined(__IBMC__) || defined(__IBMCPP__) || defined(__SUNPRO_CC)
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_BCC())
+# elif defined(_MSC_VER)
+# if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_MSVC())
+# else
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
+# endif
+# else
+# define BOOST_PP_CONFIG_FLAGS() (BOOST_PP_CONFIG_STRICT())
+# endif
+# endif
+#
+# /* BOOST_PP_CONFIG_EXTENDED_LINE_INFO */
+#
+# ifndef BOOST_PP_CONFIG_EXTENDED_LINE_INFO
+# define BOOST_PP_CONFIG_EXTENDED_LINE_INFO 0
+# endif
+#
+# /* BOOST_PP_CONFIG_ERRORS */
+#
+# ifndef BOOST_PP_CONFIG_ERRORS
+# ifdef NDEBUG
+# define BOOST_PP_CONFIG_ERRORS 0
+# else
+# define BOOST_PP_CONFIG_ERRORS 1
+# endif
+# endif
+#
+# /* BOOST_PP_VARIADICS */
+#
+# define BOOST_PP_VARIADICS_MSVC 0
+# if !defined BOOST_PP_VARIADICS
+# /* variadic support explicitly disabled for all untested compilers */
+
+# if defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || ( defined __SUNPRO_CC && __SUNPRO_CC < 0x5120 ) || defined __HP_aCC && !defined __EDG__ || defined __MRC__ || defined __SC__ || (defined(__PGI) && !defined(__EDG__))
+# define BOOST_PP_VARIADICS 0
+# elif defined(_MSC_VER) && defined(__clang__)
+# define BOOST_PP_VARIADICS 1
+# /* VC++ (C/C++) and Intel C++ Compiler >= 17.0 with MSVC */
+# elif defined _MSC_VER && _MSC_VER >= 1400 && (!defined __EDG__ || defined(__INTELLISENSE__) || defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700)
+# define BOOST_PP_VARIADICS 1
+# if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
+# undef BOOST_PP_VARIADICS_MSVC
+# define BOOST_PP_VARIADICS_MSVC 1
+# endif
+# /* Wave (C/C++), GCC (C++) */
+# elif defined __WAVE__ && __WAVE_HAS_VARIADICS__ || defined __GNUC__ && defined __GXX_EXPERIMENTAL_CXX0X__ && __GXX_EXPERIMENTAL_CXX0X__
+# define BOOST_PP_VARIADICS 1
+# /* EDG-based (C/C++), GCC (C), and unknown (C/C++) */
+# elif !defined __cplusplus && __STDC_VERSION__ >= 199901L || __cplusplus >= 201103L
+# define BOOST_PP_VARIADICS 1
+# else
+# define BOOST_PP_VARIADICS 0
+# endif
+# elif !BOOST_PP_VARIADICS + 1 < 2
+# undef BOOST_PP_VARIADICS
+# define BOOST_PP_VARIADICS 1
+# if defined _MSC_VER && _MSC_VER >= 1400 && !defined(__clang__) && (defined(__INTELLISENSE__) || (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || !(defined __EDG__ || defined __GCCXML__ || defined __CUDACC__ || defined __PATHSCALE__ || defined __DMC__ || defined __CODEGEARC__ || defined __BORLANDC__ || defined __MWERKS__ || defined __SUNPRO_CC || defined __HP_aCC || defined __MRC__ || defined __SC__ || defined __IBMCPP__ || defined __PGI)) && (!defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL)
+# undef BOOST_PP_VARIADICS_MSVC
+# define BOOST_PP_VARIADICS_MSVC 1
+# endif
+# else
+# undef BOOST_PP_VARIADICS
+# define BOOST_PP_VARIADICS 0
+# endif
+#
+# endif
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/deduce_d.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/deduce_d.hpp
index a0276b0f19e..a0276b0f19e 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/deduce_d.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/deduce_d.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/detail/edg/while.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/edg/while.hpp
index ce28eb22e1d..ce28eb22e1d 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/detail/edg/while.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/edg/while.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/detail/msvc/while.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/msvc/while.hpp
index e543e41b71a..e543e41b71a 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/detail/msvc/while.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/msvc/while.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/detail/while.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/while.hpp
index 7315e1de9d5..7315e1de9d5 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/detail/while.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/detail/while.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/expr_if.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/expr_if.hpp
index 0e1ab512fbf..0e1ab512fbf 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/expr_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/expr_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/expr_iif.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/expr_iif.hpp
index 58f45a48f5e..58f45a48f5e 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/expr_iif.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/expr_iif.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/if.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/if.hpp
index 52cfc3dabb1..52cfc3dabb1 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/if.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/iif.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/iif.hpp
index fd0781793fa..fd0781793fa 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/iif.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/iif.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/control/while.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/control/while.hpp
index e8a65fffc73..e8a65fffc73 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/control/while.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/control/while.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/debug/error.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/debug/error.hpp
index c8ae5e75056..c8ae5e75056 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/debug/error.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/debug/error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/dec.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/dec.hpp
index d57206470b9..d57206470b9 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/dec.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/dec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/detail/auto_rec.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/detail/auto_rec.hpp
index 39de1d00285..39de1d00285 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/detail/auto_rec.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/detail/auto_rec.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/detail/check.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/detail/check.hpp
index 63f8ff91665..63f8ff91665 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/detail/check.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/detail/check.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/detail/is_binary.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/detail/is_binary.hpp
index 3428833d649..3428833d649 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/detail/is_binary.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/detail/is_binary.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/detail/is_unary.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/detail/is_unary.hpp
index e73cdfb76a4..e73cdfb76a4 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/detail/is_unary.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/detail/is_unary.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/detail/split.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/detail/split.hpp
index f28a72375d8..f28a72375d8 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/detail/split.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/detail/split.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/empty.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/empty.hpp
index 116ef744e04..116ef744e04 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/enum.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/enum.hpp
index ae05bb0c180..ae05bb0c180 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/enum_params.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/enum_params.hpp
index 414f8aa6a2b..414f8aa6a2b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/enum_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/enum_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/enum_params_with_a_default.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_a_default.hpp
index fd1ad4ccaa3..fd1ad4ccaa3 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/enum_params_with_a_default.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_a_default.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/enum_params_with_defaults.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_defaults.hpp
index e58fa3e3c08..e58fa3e3c08 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/enum_params_with_defaults.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/enum_params_with_defaults.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/enum_shifted_params.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/enum_shifted_params.hpp
index 462c6424eb9..462c6424eb9 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/enum_shifted_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/enum_shifted_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/expr_if.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/expr_if.hpp
index f93e29bc61c..f93e29bc61c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/expr_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/expr_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/detail/is_empty.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/detail/is_empty.hpp
index e0449701e82..e0449701e82 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/detail/is_empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/detail/is_empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/empty.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/empty.hpp
index 6f215dc5112..6f215dc5112 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/expand.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/expand.hpp
index c8661a1c221..c8661a1c221 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/expand.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/expand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/identity.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/identity.hpp
index 8a7834d4a50..8a7834d4a50 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/identity.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/identity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/intercept.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/intercept.hpp
index 41dcc6a9801..41dcc6a9801 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/intercept.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/intercept.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_1.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_1.hpp
index f286dcdd19b..f286dcdd19b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_1.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_empty.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty.hpp
index 46aadd3529c..46aadd3529c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_empty_variadic.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty_variadic.hpp
index eee4062d792..eee4062d792 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/is_empty_variadic.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/is_empty_variadic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/overload.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/overload.hpp
index 1576316d7f0..1576316d7f0 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/facilities/overload.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/facilities/overload.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/identity.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/identity.hpp
index 847dd13296b..847dd13296b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/identity.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/identity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/if.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/if.hpp
index f1783f717ee..f1783f717ee 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/if.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/inc.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/inc.hpp
index b98d3a67c5e..b98d3a67c5e 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/inc.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/inc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iterate.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iterate.hpp
index e720ec8a846..e720ec8a846 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iterate.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iterate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp
index 6694d0ba0b7..6694d0ba0b7 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp
index ece21fc810e..ece21fc810e 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp
index 8429eac7a10..8429eac7a10 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp
index ba0832f284a..ba0832f284a 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp
index f4888c7b57d..f4888c7b57d 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/lower5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp
index 50d0fcfa32a..50d0fcfa32a 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp
index faef6f49e33..faef6f49e33 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp
index 38d9adec460..38d9adec460 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp
index 7f771c2ce7a..7f771c2ce7a 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp
index 9f27d5884d4..9f27d5884d4 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/bounds/upper5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/finish.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/finish.hpp
index 0236944cac2..0236944cac2 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/finish.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/finish.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward1.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward1.hpp
index 3c6a45802fd..3c6a45802fd 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward1.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward2.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward2.hpp
index e61a329d33d..e61a329d33d 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward2.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward3.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward3.hpp
index e68966f757a..e68966f757a 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward3.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward4.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward4.hpp
index 1b4f58874c8..1b4f58874c8 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward4.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward5.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward5.hpp
index 7617607c6c9..7617607c6c9 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/forward5.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/forward5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp
index bf88d2f3a79..bf88d2f3a79 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp
index 521bd249bea..521bd249bea 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp
index 0a655149c9c..0a655149c9c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp
index 3bcfba04e0c..3bcfba04e0c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp
index 225a557f894..225a557f894 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/iter/reverse5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/local.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/local.hpp
index ccddd5e0f0a..ccddd5e0f0a 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/local.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/local.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/rlocal.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/rlocal.hpp
index 413afa09d1b..413afa09d1b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/rlocal.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/rlocal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/self.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/self.hpp
index 757185c1f27..757185c1f27 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/self.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/self.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/start.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/start.hpp
index cbf03818480..cbf03818480 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/detail/start.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/detail/start.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/iterate.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/iterate.hpp
index 8f861e71f65..8f861e71f65 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/iterate.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/iterate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/local.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/local.hpp
index 289fb1aff7c..289fb1aff7c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/local.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/local.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/self.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/self.hpp
index 6e0464c976c..6e0464c976c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/iteration/self.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/iteration/self.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/adt.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/adt.hpp
index b4f12bab63d..b4f12bab63d 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/adt.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/adt.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/at.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/at.hpp
index 125669b38af..125669b38af 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/at.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/at.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/detail/edg/fold_left.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_left.hpp
index ae9524f979b..ae9524f979b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/detail/edg/fold_left.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_left.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/detail/edg/fold_right.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_right.hpp
index d372d2e6d58..d372d2e6d58 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/detail/edg/fold_right.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/edg/fold_right.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/detail/fold_left.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_left.hpp
index f5fcab73359..f5fcab73359 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/detail/fold_left.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_left.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/detail/fold_right.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_right.hpp
index 29146d504b4..29146d504b4 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/detail/fold_right.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/detail/fold_right.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/fold_left.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/fold_left.hpp
index f235aec8e79..f235aec8e79 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/fold_left.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/fold_left.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/fold_right.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/fold_right.hpp
index ce18afef280..ce18afef280 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/fold_right.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/fold_right.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/for_each_i.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/for_each_i.hpp
index 8f02e2e3179..8f02e2e3179 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/for_each_i.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/for_each_i.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/rest_n.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/rest_n.hpp
index b42ee5fe421..b42ee5fe421 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/rest_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/rest_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/list/reverse.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/list/reverse.hpp
index 651da057110..651da057110 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/list/reverse.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/list/reverse.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/logical/and.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/logical/and.hpp
index 8590365e58c..8590365e58c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/logical/and.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/logical/and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/logical/bitand.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/logical/bitand.hpp
index 74e9527f20e..74e9527f20e 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/logical/bitand.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/logical/bitand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/logical/bitor.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/logical/bitor.hpp
index c0bc2c66ae3..c0bc2c66ae3 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/logical/bitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/logical/bitor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/logical/bool.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/logical/bool.hpp
index fc01b5ba50d..fc01b5ba50d 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/logical/bool.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/logical/bool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/logical/compl.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/logical/compl.hpp
index ad4c7a4ca6b..ad4c7a4ca6b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/logical/compl.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/logical/compl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/logical/not.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/logical/not.hpp
index b509d3fca6c..b509d3fca6c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/logical/not.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/logical/not.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/logical/or.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/logical/or.hpp
index 88d52071a00..88d52071a00 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/logical/or.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/logical/or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/comma.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma.hpp
index 38c2e0e7e7a..38c2e0e7e7a 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/comma.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/comma_if.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma_if.hpp
index c711f366a43..c711f366a43 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/comma_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/comma_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp
index c94ccf3c6fb..c94ccf3c6fb 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/detail/is_begin_parens.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/is_begin_parens.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/is_begin_parens.hpp
index 20b32bc2bec..20b32bc2bec 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/is_begin_parens.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/is_begin_parens.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/paren.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/paren.hpp
index 28c18cb8beb..28c18cb8beb 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/punctuation/paren.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/punctuation/paren.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repeat.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repeat.hpp
index 7c47ee8b01e..7c47ee8b01e 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repeat.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repeat.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repeat_2nd.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repeat_2nd.hpp
index 030c4324c2c..030c4324c2c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repeat_2nd.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repeat_2nd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repeat_from_to.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repeat_from_to.hpp
index 4ddc3be04b2..4ddc3be04b2 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repeat_from_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repeat_from_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/edg/for.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/edg/for.hpp
index 212921a63c8..212921a63c8 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/edg/for.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/edg/for.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/for.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/for.hpp
index 2770f2c1ea3..2770f2c1ea3 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/for.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/for.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/msvc/for.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/msvc/for.hpp
index 35c1996c786..35c1996c786 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/detail/msvc/for.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/detail/msvc/for.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum.hpp
index 0198cd9b395..0198cd9b395 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_binary_params.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_binary_params.hpp
index a2c1048e183..a2c1048e183 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_binary_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_binary_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params.hpp
index 65a2369d4a7..65a2369d4a7 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp
index 7496df62f20..7496df62f20 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_a_default.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp
index fa0106f7750..fa0106f7750 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_params_with_defaults.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_shifted.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted.hpp
index d5b006f4d0f..d5b006f4d0f 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_shifted.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_shifted_params.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted_params.hpp
index 88b2bf4c32c..88b2bf4c32c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_shifted_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_shifted_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_trailing.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing.hpp
index 20af2d54b0b..20af2d54b0b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_trailing.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_trailing_params.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing_params.hpp
index f7520dbdeff..f7520dbdeff 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/enum_trailing_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/enum_trailing_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/for.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/for.hpp
index c38946bb555..c38946bb555 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/for.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/for.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/repeat.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat.hpp
index 0172738e0c6..0172738e0c6 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/repeat.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/repeat_from_to.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat_from_to.hpp
index efe539e1ded..efe539e1ded 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/repetition/repeat_from_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/repetition/repeat_from_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq.hpp
index cde208ce1f0..cde208ce1f0 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/cat.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/cat.hpp
index b6b09ff32a0..b6b09ff32a0 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/cat.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/cat.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/binary_transform.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/binary_transform.hpp
index 08b5f9de4dc..08b5f9de4dc 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/binary_transform.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/binary_transform.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/is_empty.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/is_empty.hpp
index 1a80a2f6117..1a80a2f6117 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/is_empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/is_empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/split.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/split.hpp
index 7c339319186..7c339319186 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/split.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/split.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/to_list_msvc.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/to_list_msvc.hpp
index 2599c0014ac..2599c0014ac 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/detail/to_list_msvc.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/detail/to_list_msvc.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/elem.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/elem.hpp
index 9c7a4b27665..9c7a4b27665 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/elem.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/elem.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/enum.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/enum.hpp
index b63b2425bda..b63b2425bda 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/filter.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/filter.hpp
index 4596bfe59b4..4596bfe59b4 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/filter.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/filter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/first_n.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/first_n.hpp
index c3c0716ee79..c3c0716ee79 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/first_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/first_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/fold_left.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_left.hpp
index ab051b69d9b..ab051b69d9b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/fold_left.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_left.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/fold_right.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_right.hpp
index c2c365b29ad..c2c365b29ad 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/fold_right.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/fold_right.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each.hpp
index 3f9c0d781b9..3f9c0d781b9 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each_i.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_i.hpp
index 81028d77de7..81028d77de7 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each_i.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_i.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each_product.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_product.hpp
index baf22df4809..baf22df4809 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/for_each_product.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/for_each_product.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/insert.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/insert.hpp
index 59ce2f4d186..59ce2f4d186 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/insert.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/insert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/pop_back.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_back.hpp
index 54200d61858..54200d61858 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/pop_back.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_back.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/pop_front.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_front.hpp
index 7d94eea9161..7d94eea9161 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/pop_front.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/pop_front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/push_back.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/push_back.hpp
index 1938d0be644..1938d0be644 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/push_back.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/push_back.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/push_front.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/push_front.hpp
index 2ce73ad1a3f..2ce73ad1a3f 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/push_front.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/push_front.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/remove.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/remove.hpp
index d2f77b0c61b..d2f77b0c61b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/remove.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/remove.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/replace.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/replace.hpp
index 0cf6b775540..0cf6b775540 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/replace.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/replace.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/rest_n.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/rest_n.hpp
index 4aefba4fa1f..4aefba4fa1f 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/rest_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/rest_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/reverse.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/reverse.hpp
index 338d777d77b..338d777d77b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/reverse.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/reverse.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/seq.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/seq.hpp
index f5ca84c6f39..f5ca84c6f39 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/size.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/size.hpp
index b5c8d9d051f..b5c8d9d051f 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/subseq.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/subseq.hpp
index fb242f1e69c..fb242f1e69c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/subseq.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/subseq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/to_array.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_array.hpp
index d8a8040f8d8..d8a8040f8d8 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/to_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/to_list.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_list.hpp
index ed8948dbd40..ed8948dbd40 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/to_list.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/to_tuple.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_tuple.hpp
index ab38eb97fae..ab38eb97fae 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/to_tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/to_tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/transform.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/transform.hpp
index 79d8108d362..79d8108d362 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/transform.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/transform.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp
index f94a2bfd1f3..f94a2bfd1f3 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/seq/variadic_seq_to_seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/counter.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/counter.hpp
index a1c0df1759a..a1c0df1759a 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/counter.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/counter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/def.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/def.hpp
index 885099e5512..885099e5512 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/def.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/def.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/shared.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/shared.hpp
index c97ac54cf91..c97ac54cf91 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/shared.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/shared.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot1.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot1.hpp
index b22748e6ac4..b22748e6ac4 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot1.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot1.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot2.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot2.hpp
index 5d5258c2258..5d5258c2258 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot2.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot3.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot3.hpp
index 005cf219005..005cf219005 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot3.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot3.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot4.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot4.hpp
index 9aa4d8ab8d9..9aa4d8ab8d9 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot4.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot4.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot5.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot5.hpp
index d17535daf4b..d17535daf4b 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/detail/slot5.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/detail/slot5.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/slot/slot.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/slot/slot.hpp
index 147b097ca9c..147b097ca9c 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/slot/slot.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/slot/slot.hpp
diff --git a/src/third_party/boost-1.69.0/boost/preprocessor/stringize.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/stringize.hpp
new file mode 100644
index 00000000000..e072dbd5330
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/stringize.hpp
@@ -0,0 +1,37 @@
+# /* Copyright (C) 2001
+# * Housemarque Oy
+# * http://www.housemarque.com
+# *
+# * Distributed under the Boost Software License, Version 1.0. (See
+# * accompanying file LICENSE_1_0.txt or copy at
+# * http://www.boost.org/LICENSE_1_0.txt)
+# */
+#
+# /* Revised by Paul Mensonides (2002) */
+#
+# /* See http://www.boost.org for most recent version. */
+#
+# ifndef BOOST_PREPROCESSOR_STRINGIZE_HPP
+# define BOOST_PREPROCESSOR_STRINGIZE_HPP
+#
+# include <boost/preprocessor/config/config.hpp>
+#
+# /* BOOST_PP_STRINGIZE */
+#
+# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
+# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_A((text))
+# define BOOST_PP_STRINGIZE_A(arg) BOOST_PP_STRINGIZE_I arg
+# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
+# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_OO((text))
+# define BOOST_PP_STRINGIZE_OO(par) BOOST_PP_STRINGIZE_I ## par
+# else
+# define BOOST_PP_STRINGIZE(text) BOOST_PP_STRINGIZE_I(text)
+# endif
+#
+#if BOOST_PP_VARIADICS
+# define BOOST_PP_STRINGIZE_I(...) #__VA_ARGS__
+#else
+# define BOOST_PP_STRINGIZE_I(text) #text
+#endif
+#
+# endif
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/detail/is_single_return.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/detail/is_single_return.hpp
index 02a4fb207c5..02a4fb207c5 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/detail/is_single_return.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/detail/is_single_return.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/eat.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/eat.hpp
index 7e8a1006758..7e8a1006758 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/eat.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/eat.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/elem.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/elem.hpp
index 88044d3c7e7..88044d3c7e7 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/elem.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/elem.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/rem.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/rem.hpp
index c934447d5ad..c934447d5ad 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/rem.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/rem.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/size.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/size.hpp
index 675c0651663..675c0651663 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/to_list.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_list.hpp
index da7828f7d09..da7828f7d09 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/to_list.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/to_seq.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_seq.hpp
index a53f5a00e67..a53f5a00e67 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/tuple/to_seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/tuple/to_seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/variadic/detail/is_single_return.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/variadic/detail/is_single_return.hpp
index 5c9502932c4..5c9502932c4 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/variadic/detail/is_single_return.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/variadic/detail/is_single_return.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/variadic/elem.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/variadic/elem.hpp
index be38a9429bd..be38a9429bd 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/variadic/elem.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/variadic/elem.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/variadic/size.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/variadic/size.hpp
index b92a5ffe068..b92a5ffe068 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/variadic/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/variadic/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/preprocessor/variadic/to_seq.hpp b/src/third_party/boost-1.69.0/boost/preprocessor/variadic/to_seq.hpp
index 255af4f38cb..255af4f38cb 100644
--- a/src/third_party/boost-1.68.0/boost/preprocessor/variadic/to_seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/preprocessor/variadic/to_seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options.hpp b/src/third_party/boost-1.69.0/boost/program_options.hpp
index dc350119573..dc350119573 100644
--- a/src/third_party/boost-1.68.0/boost/program_options.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/cmdline.hpp b/src/third_party/boost-1.69.0/boost/program_options/cmdline.hpp
index 8705e60f210..8705e60f210 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/cmdline.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/cmdline.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/config.hpp b/src/third_party/boost-1.69.0/boost/program_options/config.hpp
index 8b70521741a..8b70521741a 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/detail/cmdline.hpp b/src/third_party/boost-1.69.0/boost/program_options/detail/cmdline.hpp
index dce407c0b3e..dce407c0b3e 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/detail/cmdline.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/detail/cmdline.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/detail/config_file.hpp b/src/third_party/boost-1.69.0/boost/program_options/detail/config_file.hpp
index be6bba14476..be6bba14476 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/detail/config_file.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/detail/config_file.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/detail/convert.hpp b/src/third_party/boost-1.69.0/boost/program_options/detail/convert.hpp
index a22dd6f37c5..a22dd6f37c5 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/detail/convert.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/detail/convert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/detail/parsers.hpp b/src/third_party/boost-1.69.0/boost/program_options/detail/parsers.hpp
index b644aaa1763..b644aaa1763 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/detail/parsers.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/detail/parsers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/detail/utf8_codecvt_facet.hpp b/src/third_party/boost-1.69.0/boost/program_options/detail/utf8_codecvt_facet.hpp
index b77b5515fa5..b77b5515fa5 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/detail/utf8_codecvt_facet.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/detail/utf8_codecvt_facet.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/detail/value_semantic.hpp b/src/third_party/boost-1.69.0/boost/program_options/detail/value_semantic.hpp
index 9531339a34e..9531339a34e 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/detail/value_semantic.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/detail/value_semantic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/environment_iterator.hpp b/src/third_party/boost-1.69.0/boost/program_options/environment_iterator.hpp
index 933919d15d8..933919d15d8 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/environment_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/environment_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/eof_iterator.hpp b/src/third_party/boost-1.69.0/boost/program_options/eof_iterator.hpp
index 5e53df5b812..5e53df5b812 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/eof_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/eof_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/errors.hpp b/src/third_party/boost-1.69.0/boost/program_options/errors.hpp
index ba0f404e2ef..ba0f404e2ef 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/errors.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/errors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/option.hpp b/src/third_party/boost-1.69.0/boost/program_options/option.hpp
index 427678fa786..427678fa786 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/option.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/option.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/options_description.hpp b/src/third_party/boost-1.69.0/boost/program_options/options_description.hpp
index 90d913d3e3a..90d913d3e3a 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/options_description.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/options_description.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/parsers.hpp b/src/third_party/boost-1.69.0/boost/program_options/parsers.hpp
index 0576469278c..0576469278c 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/parsers.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/parsers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/positional_options.hpp b/src/third_party/boost-1.69.0/boost/program_options/positional_options.hpp
index ac2a3122d51..ac2a3122d51 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/positional_options.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/positional_options.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/value_semantic.hpp b/src/third_party/boost-1.69.0/boost/program_options/value_semantic.hpp
index ac9dbc663b5..ac9dbc663b5 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/value_semantic.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/value_semantic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/variables_map.hpp b/src/third_party/boost-1.69.0/boost/program_options/variables_map.hpp
index 362dedf2833..362dedf2833 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/variables_map.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/variables_map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/program_options/version.hpp b/src/third_party/boost-1.69.0/boost/program_options/version.hpp
index aa27568bb86..aa27568bb86 100644
--- a/src/third_party/boost-1.68.0/boost/program_options/version.hpp
+++ b/src/third_party/boost-1.69.0/boost/program_options/version.hpp
diff --git a/src/third_party/boost-1.68.0/boost/progress.hpp b/src/third_party/boost-1.69.0/boost/progress.hpp
index 027d9f927b8..027d9f927b8 100644
--- a/src/third_party/boost-1.68.0/boost/progress.hpp
+++ b/src/third_party/boost-1.69.0/boost/progress.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random.hpp b/src/third_party/boost-1.69.0/boost/random.hpp
index a164e7eb1ae..a164e7eb1ae 100644
--- a/src/third_party/boost-1.68.0/boost/random.hpp
+++ b/src/third_party/boost-1.69.0/boost/random.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/additive_combine.hpp b/src/third_party/boost-1.69.0/boost/random/additive_combine.hpp
index d786e18473a..d786e18473a 100644
--- a/src/third_party/boost-1.68.0/boost/random/additive_combine.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/additive_combine.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/bernoulli_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/bernoulli_distribution.hpp
index d66bae4389d..d66bae4389d 100644
--- a/src/third_party/boost-1.68.0/boost/random/bernoulli_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/bernoulli_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/beta_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/beta_distribution.hpp
index dabb72bfe2d..dabb72bfe2d 100644
--- a/src/third_party/boost-1.68.0/boost/random/beta_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/beta_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/binomial_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/binomial_distribution.hpp
index 78d1a123a47..78d1a123a47 100644
--- a/src/third_party/boost-1.68.0/boost/random/binomial_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/binomial_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/cauchy_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/cauchy_distribution.hpp
index 998e523447b..998e523447b 100644
--- a/src/third_party/boost-1.68.0/boost/random/cauchy_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/cauchy_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/chi_squared_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/chi_squared_distribution.hpp
index f0fcce5c5dd..f0fcce5c5dd 100644
--- a/src/third_party/boost-1.68.0/boost/random/chi_squared_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/chi_squared_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/auto_link.hpp b/src/third_party/boost-1.69.0/boost/random/detail/auto_link.hpp
index acbebdd4f01..acbebdd4f01 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/auto_link.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/auto_link.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/config.hpp b/src/third_party/boost-1.69.0/boost/random/detail/config.hpp
index 724ab194520..724ab194520 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/const_mod.hpp b/src/third_party/boost-1.69.0/boost/random/detail/const_mod.hpp
index e0a43ab2499..e0a43ab2499 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/const_mod.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/const_mod.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/disable_warnings.hpp b/src/third_party/boost-1.69.0/boost/random/detail/disable_warnings.hpp
index 4582dcb1a7d..4582dcb1a7d 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/disable_warnings.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/disable_warnings.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/enable_warnings.hpp b/src/third_party/boost-1.69.0/boost/random/detail/enable_warnings.hpp
index 24f3bb3f583..24f3bb3f583 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/enable_warnings.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/enable_warnings.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/generator_bits.hpp b/src/third_party/boost-1.69.0/boost/random/detail/generator_bits.hpp
index 05276142cbc..05276142cbc 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/generator_bits.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/generator_bits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/generator_seed_seq.hpp b/src/third_party/boost-1.69.0/boost/random/detail/generator_seed_seq.hpp
index 7e134834649..7e134834649 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/generator_seed_seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/generator_seed_seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/gray_coded_qrng.hpp b/src/third_party/boost-1.69.0/boost/random/detail/gray_coded_qrng.hpp
index 643ec38d9dc..643ec38d9dc 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/gray_coded_qrng.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/gray_coded_qrng.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/int_float_pair.hpp b/src/third_party/boost-1.69.0/boost/random/detail/int_float_pair.hpp
index de253a0ecbf..de253a0ecbf 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/int_float_pair.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/int_float_pair.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/integer_log2.hpp b/src/third_party/boost-1.69.0/boost/random/detail/integer_log2.hpp
index 248243a4b2e..248243a4b2e 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/integer_log2.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/integer_log2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/iterator_mixin.hpp b/src/third_party/boost-1.69.0/boost/random/detail/iterator_mixin.hpp
index 57ff75cecab..57ff75cecab 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/iterator_mixin.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/iterator_mixin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/large_arithmetic.hpp b/src/third_party/boost-1.69.0/boost/random/detail/large_arithmetic.hpp
index 66f6b4e6156..66f6b4e6156 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/large_arithmetic.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/large_arithmetic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/niederreiter_base2_table.hpp b/src/third_party/boost-1.69.0/boost/random/detail/niederreiter_base2_table.hpp
index 68bace33247..68bace33247 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/niederreiter_base2_table.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/niederreiter_base2_table.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/operators.hpp b/src/third_party/boost-1.69.0/boost/random/detail/operators.hpp
index 597343c9070..597343c9070 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/polynomial.hpp b/src/third_party/boost-1.69.0/boost/random/detail/polynomial.hpp
index a8c4b269f1f..a8c4b269f1f 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/polynomial.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/polynomial.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/ptr_helper.hpp b/src/third_party/boost-1.69.0/boost/random/detail/ptr_helper.hpp
index f1b983d9367..f1b983d9367 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/ptr_helper.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/ptr_helper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/qrng_base.hpp b/src/third_party/boost-1.69.0/boost/random/detail/qrng_base.hpp
index aa95a1e8370..aa95a1e8370 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/qrng_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/qrng_base.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/seed.hpp b/src/third_party/boost-1.69.0/boost/random/detail/seed.hpp
index 557482ad4b1..557482ad4b1 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/seed.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/seed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/seed_impl.hpp b/src/third_party/boost-1.69.0/boost/random/detail/seed_impl.hpp
index 918a2944579..918a2944579 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/seed_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/seed_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/signed_unsigned_tools.hpp b/src/third_party/boost-1.69.0/boost/random/detail/signed_unsigned_tools.hpp
index 1979908a312..1979908a312 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/signed_unsigned_tools.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/signed_unsigned_tools.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/sobol_table.hpp b/src/third_party/boost-1.69.0/boost/random/detail/sobol_table.hpp
index f4b368b9c66..f4b368b9c66 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/sobol_table.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/sobol_table.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/uniform_int_float.hpp b/src/third_party/boost-1.69.0/boost/random/detail/uniform_int_float.hpp
index 393c455bcde..393c455bcde 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/uniform_int_float.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/uniform_int_float.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/detail/vector_io.hpp b/src/third_party/boost-1.69.0/boost/random/detail/vector_io.hpp
index fe3869abb54..fe3869abb54 100644
--- a/src/third_party/boost-1.68.0/boost/random/detail/vector_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/detail/vector_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/discard_block.hpp b/src/third_party/boost-1.69.0/boost/random/discard_block.hpp
index f3c6b82b87f..f3c6b82b87f 100644
--- a/src/third_party/boost-1.68.0/boost/random/discard_block.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/discard_block.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/discrete_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/discrete_distribution.hpp
index 9574cbcae5c..9574cbcae5c 100644
--- a/src/third_party/boost-1.68.0/boost/random/discrete_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/discrete_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/exponential_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/exponential_distribution.hpp
index b4b95c5472b..b4b95c5472b 100644
--- a/src/third_party/boost-1.68.0/boost/random/exponential_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/exponential_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/extreme_value_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/extreme_value_distribution.hpp
index 419c3da651d..419c3da651d 100644
--- a/src/third_party/boost-1.68.0/boost/random/extreme_value_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/extreme_value_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/faure.hpp b/src/third_party/boost-1.69.0/boost/random/faure.hpp
index 4301c301b5f..4301c301b5f 100644
--- a/src/third_party/boost-1.68.0/boost/random/faure.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/faure.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/fisher_f_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/fisher_f_distribution.hpp
index cdf14da8f6c..cdf14da8f6c 100644
--- a/src/third_party/boost-1.68.0/boost/random/fisher_f_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/fisher_f_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/gamma_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/gamma_distribution.hpp
index c9bda4ca9d3..c9bda4ca9d3 100644
--- a/src/third_party/boost-1.68.0/boost/random/gamma_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/gamma_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/generate_canonical.hpp b/src/third_party/boost-1.69.0/boost/random/generate_canonical.hpp
index 112784742b1..112784742b1 100644
--- a/src/third_party/boost-1.68.0/boost/random/generate_canonical.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/generate_canonical.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/geometric_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/geometric_distribution.hpp
index 90374cff71b..90374cff71b 100644
--- a/src/third_party/boost-1.68.0/boost/random/geometric_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/geometric_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/hyperexponential_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/hyperexponential_distribution.hpp
index a2833e8a9a3..a2833e8a9a3 100644
--- a/src/third_party/boost-1.68.0/boost/random/hyperexponential_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/hyperexponential_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/independent_bits.hpp b/src/third_party/boost-1.69.0/boost/random/independent_bits.hpp
index cd2dd1f2250..cd2dd1f2250 100644
--- a/src/third_party/boost-1.68.0/boost/random/independent_bits.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/independent_bits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/inversive_congruential.hpp b/src/third_party/boost-1.69.0/boost/random/inversive_congruential.hpp
index 2329c0db3a9..2329c0db3a9 100644
--- a/src/third_party/boost-1.68.0/boost/random/inversive_congruential.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/inversive_congruential.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/lagged_fibonacci.hpp b/src/third_party/boost-1.69.0/boost/random/lagged_fibonacci.hpp
index 5a809f3e494..5a809f3e494 100644
--- a/src/third_party/boost-1.68.0/boost/random/lagged_fibonacci.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/lagged_fibonacci.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/laplace_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/laplace_distribution.hpp
index ec176a59c1f..ec176a59c1f 100644
--- a/src/third_party/boost-1.68.0/boost/random/laplace_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/laplace_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/linear_congruential.hpp b/src/third_party/boost-1.69.0/boost/random/linear_congruential.hpp
index 22ade3f3dbe..22ade3f3dbe 100644
--- a/src/third_party/boost-1.68.0/boost/random/linear_congruential.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/linear_congruential.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/linear_feedback_shift.hpp b/src/third_party/boost-1.69.0/boost/random/linear_feedback_shift.hpp
index a695dfde97f..a695dfde97f 100644
--- a/src/third_party/boost-1.68.0/boost/random/linear_feedback_shift.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/linear_feedback_shift.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/lognormal_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/lognormal_distribution.hpp
index 7ed1e13abf4..7ed1e13abf4 100644
--- a/src/third_party/boost-1.68.0/boost/random/lognormal_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/lognormal_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/mersenne_twister.hpp b/src/third_party/boost-1.69.0/boost/random/mersenne_twister.hpp
index ce73e6825f3..ce73e6825f3 100644
--- a/src/third_party/boost-1.68.0/boost/random/mersenne_twister.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/mersenne_twister.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/negative_binomial_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/negative_binomial_distribution.hpp
index cbe26fad25c..cbe26fad25c 100644
--- a/src/third_party/boost-1.68.0/boost/random/negative_binomial_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/negative_binomial_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/niederreiter_base2.hpp b/src/third_party/boost-1.69.0/boost/random/niederreiter_base2.hpp
index 149a4a4b4c5..149a4a4b4c5 100644
--- a/src/third_party/boost-1.68.0/boost/random/niederreiter_base2.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/niederreiter_base2.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/non_central_chi_squared_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/non_central_chi_squared_distribution.hpp
index 28c9ff6d9a4..28c9ff6d9a4 100644
--- a/src/third_party/boost-1.68.0/boost/random/non_central_chi_squared_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/non_central_chi_squared_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/normal_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/normal_distribution.hpp
index b7ff3eba9b6..b7ff3eba9b6 100644
--- a/src/third_party/boost-1.68.0/boost/random/normal_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/normal_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/piecewise_constant_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/piecewise_constant_distribution.hpp
index 488f41c0e34..488f41c0e34 100644
--- a/src/third_party/boost-1.68.0/boost/random/piecewise_constant_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/piecewise_constant_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/piecewise_linear_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/piecewise_linear_distribution.hpp
index 541c57fb826..541c57fb826 100644
--- a/src/third_party/boost-1.68.0/boost/random/piecewise_linear_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/piecewise_linear_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/poisson_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/poisson_distribution.hpp
index 1281a7d859d..1281a7d859d 100644
--- a/src/third_party/boost-1.68.0/boost/random/poisson_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/poisson_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/random_device.hpp b/src/third_party/boost-1.69.0/boost/random/random_device.hpp
index 8f3903c953c..8f3903c953c 100644
--- a/src/third_party/boost-1.68.0/boost/random/random_device.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/random_device.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/random_number_generator.hpp b/src/third_party/boost-1.69.0/boost/random/random_number_generator.hpp
index ac975e32987..ac975e32987 100644
--- a/src/third_party/boost-1.68.0/boost/random/random_number_generator.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/random_number_generator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/ranlux.hpp b/src/third_party/boost-1.69.0/boost/random/ranlux.hpp
index 82a7ca66f12..82a7ca66f12 100644
--- a/src/third_party/boost-1.68.0/boost/random/ranlux.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/ranlux.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/seed_seq.hpp b/src/third_party/boost-1.69.0/boost/random/seed_seq.hpp
index b0b1de24e3b..b0b1de24e3b 100644
--- a/src/third_party/boost-1.68.0/boost/random/seed_seq.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/seed_seq.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/shuffle_order.hpp b/src/third_party/boost-1.69.0/boost/random/shuffle_order.hpp
index 54645303e80..54645303e80 100644
--- a/src/third_party/boost-1.68.0/boost/random/shuffle_order.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/shuffle_order.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/shuffle_output.hpp b/src/third_party/boost-1.69.0/boost/random/shuffle_output.hpp
index 478e1029bd8..478e1029bd8 100644
--- a/src/third_party/boost-1.68.0/boost/random/shuffle_output.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/shuffle_output.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/sobol.hpp b/src/third_party/boost-1.69.0/boost/random/sobol.hpp
index 2518b37e88c..2518b37e88c 100644
--- a/src/third_party/boost-1.68.0/boost/random/sobol.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/sobol.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/student_t_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/student_t_distribution.hpp
index e28b0e3bfb3..e28b0e3bfb3 100644
--- a/src/third_party/boost-1.68.0/boost/random/student_t_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/student_t_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/subtract_with_carry.hpp b/src/third_party/boost-1.69.0/boost/random/subtract_with_carry.hpp
index acaf69ac698..acaf69ac698 100644
--- a/src/third_party/boost-1.68.0/boost/random/subtract_with_carry.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/subtract_with_carry.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/taus88.hpp b/src/third_party/boost-1.69.0/boost/random/taus88.hpp
index 68214f3aed0..68214f3aed0 100644
--- a/src/third_party/boost-1.68.0/boost/random/taus88.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/taus88.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/traits.hpp b/src/third_party/boost-1.69.0/boost/random/traits.hpp
index 975421a4d0a..975421a4d0a 100644
--- a/src/third_party/boost-1.68.0/boost/random/traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/triangle_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/triangle_distribution.hpp
index 6d37e2bb926..6d37e2bb926 100644
--- a/src/third_party/boost-1.68.0/boost/random/triangle_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/triangle_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/uniform_01.hpp b/src/third_party/boost-1.69.0/boost/random/uniform_01.hpp
index 37258f58064..37258f58064 100644
--- a/src/third_party/boost-1.68.0/boost/random/uniform_01.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/uniform_01.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/uniform_int.hpp b/src/third_party/boost-1.69.0/boost/random/uniform_int.hpp
index 4362652593d..4362652593d 100644
--- a/src/third_party/boost-1.68.0/boost/random/uniform_int.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/uniform_int.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/uniform_int_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/uniform_int_distribution.hpp
index e0d3a9bebcd..e0d3a9bebcd 100644
--- a/src/third_party/boost-1.68.0/boost/random/uniform_int_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/uniform_int_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/uniform_on_sphere.hpp b/src/third_party/boost-1.69.0/boost/random/uniform_on_sphere.hpp
index ce2e35237e0..ce2e35237e0 100644
--- a/src/third_party/boost-1.68.0/boost/random/uniform_on_sphere.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/uniform_on_sphere.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/uniform_real.hpp b/src/third_party/boost-1.69.0/boost/random/uniform_real.hpp
index c98626e7792..c98626e7792 100644
--- a/src/third_party/boost-1.68.0/boost/random/uniform_real.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/uniform_real.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/uniform_real_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/uniform_real_distribution.hpp
index 820fce9314c..820fce9314c 100644
--- a/src/third_party/boost-1.68.0/boost/random/uniform_real_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/uniform_real_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/uniform_smallint.hpp b/src/third_party/boost-1.69.0/boost/random/uniform_smallint.hpp
index c1afd7fbcdf..c1afd7fbcdf 100644
--- a/src/third_party/boost-1.68.0/boost/random/uniform_smallint.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/uniform_smallint.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/variate_generator.hpp b/src/third_party/boost-1.69.0/boost/random/variate_generator.hpp
index 6d5aac4e472..6d5aac4e472 100644
--- a/src/third_party/boost-1.68.0/boost/random/variate_generator.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/variate_generator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/weibull_distribution.hpp b/src/third_party/boost-1.69.0/boost/random/weibull_distribution.hpp
index 55e3c04903a..55e3c04903a 100644
--- a/src/third_party/boost-1.68.0/boost/random/weibull_distribution.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/weibull_distribution.hpp
diff --git a/src/third_party/boost-1.68.0/boost/random/xor_combine.hpp b/src/third_party/boost-1.69.0/boost/random/xor_combine.hpp
index fe8a58b40f1..fe8a58b40f1 100644
--- a/src/third_party/boost-1.68.0/boost/random/xor_combine.hpp
+++ b/src/third_party/boost-1.69.0/boost/random/xor_combine.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range.hpp b/src/third_party/boost-1.69.0/boost/range.hpp
index 179ae224921..179ae224921 100644
--- a/src/third_party/boost-1.68.0/boost/range.hpp
+++ b/src/third_party/boost-1.69.0/boost/range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/adjacent_filtered.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/adjacent_filtered.hpp
index 405fe7bce7d..405fe7bce7d 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/adjacent_filtered.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/adjacent_filtered.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/argument_fwd.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/argument_fwd.hpp
index fbfd40c1dfe..fbfd40c1dfe 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/argument_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/argument_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/copied.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/copied.hpp
index f7dfbcd846c..f7dfbcd846c 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/copied.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/copied.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/filtered.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/filtered.hpp
index 1fb778e58d2..1fb778e58d2 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/filtered.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/filtered.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/formatted.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/formatted.hpp
index f31f1bceb25..f31f1bceb25 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/formatted.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/formatted.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/indexed.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/indexed.hpp
index a426bd6b661..a426bd6b661 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/indexed.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/indexed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/indirected.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/indirected.hpp
index e741f17f5e5..e741f17f5e5 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/indirected.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/indirected.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/map.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/map.hpp
index 2d922ea4d24..2d922ea4d24 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/map.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/replaced.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/replaced.hpp
index 42eb52a2c7e..42eb52a2c7e 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/replaced.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/replaced.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/replaced_if.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/replaced_if.hpp
index 83d3ec81b6e..83d3ec81b6e 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/replaced_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/replaced_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/reversed.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/reversed.hpp
index 944fbffcaed..944fbffcaed 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/reversed.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/reversed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/sliced.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/sliced.hpp
index f8d9612430b..f8d9612430b 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/sliced.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/sliced.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/strided.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/strided.hpp
index 560b8200c76..560b8200c76 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/strided.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/strided.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/tokenized.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/tokenized.hpp
index f0aa12eea5d..f0aa12eea5d 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/tokenized.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/tokenized.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/transformed.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/transformed.hpp
index 428ff4be755..428ff4be755 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/transformed.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/transformed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptor/uniqued.hpp b/src/third_party/boost-1.69.0/boost/range/adaptor/uniqued.hpp
index 29101d3260f..29101d3260f 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptor/uniqued.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptor/uniqued.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/adaptors.hpp b/src/third_party/boost-1.69.0/boost/range/adaptors.hpp
index 0530c4d36cc..0530c4d36cc 100644
--- a/src/third_party/boost-1.68.0/boost/range/adaptors.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/adaptors.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm.hpp
index 30dc5836e93..30dc5836e93 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/adjacent_find.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/adjacent_find.hpp
index 1b88dae86e6..1b88dae86e6 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/adjacent_find.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/adjacent_find.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/binary_search.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/binary_search.hpp
index bb64ec8f16c..bb64ec8f16c 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/binary_search.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/binary_search.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/copy.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/copy.hpp
index f15b31f9132..f15b31f9132 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/copy_backward.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/copy_backward.hpp
index c95c6f1f36c..c95c6f1f36c 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/copy_backward.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/copy_backward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/count.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/count.hpp
index 8316ce0f11b..8316ce0f11b 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/count.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/count.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/count_if.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/count_if.hpp
index ae17b0e3ae6..ae17b0e3ae6 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/count_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/count_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/equal.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/equal.hpp
index 2b44f3bca39..2b44f3bca39 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/equal_range.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/equal_range.hpp
index 4aa4a54dd73..4aa4a54dd73 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/equal_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/equal_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/fill.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/fill.hpp
index 95231a82f72..95231a82f72 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/fill.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/fill.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/fill_n.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/fill_n.hpp
index 02a0c2a362b..02a0c2a362b 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/fill_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/fill_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/find.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/find.hpp
index 72c5cf15ef7..72c5cf15ef7 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/find.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/find.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/find_end.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/find_end.hpp
index 757e9996c06..757e9996c06 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/find_end.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/find_end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/find_first_of.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/find_first_of.hpp
index 4cb5989afa7..4cb5989afa7 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/find_first_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/find_first_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/find_if.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/find_if.hpp
index 2d1926dabb1..2d1926dabb1 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/find_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/find_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/for_each.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/for_each.hpp
index ea731b2fdd4..ea731b2fdd4 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/for_each.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/for_each.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/generate.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/generate.hpp
index 324412c4549..324412c4549 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/generate.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/generate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/heap_algorithm.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/heap_algorithm.hpp
index 584920d6558..584920d6558 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/heap_algorithm.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/heap_algorithm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/inplace_merge.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/inplace_merge.hpp
index dfadbaa6f14..dfadbaa6f14 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/inplace_merge.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/inplace_merge.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/lexicographical_compare.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/lexicographical_compare.hpp
index c6e4bc8ef44..c6e4bc8ef44 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/lexicographical_compare.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/lexicographical_compare.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/lower_bound.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/lower_bound.hpp
index cb5e6392390..cb5e6392390 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/lower_bound.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/lower_bound.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/max_element.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/max_element.hpp
index dd2b9cb8b3f..dd2b9cb8b3f 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/max_element.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/max_element.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/merge.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/merge.hpp
index c81b8c78476..c81b8c78476 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/merge.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/merge.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/min_element.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/min_element.hpp
index 339f56a93c9..339f56a93c9 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/min_element.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/min_element.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/mismatch.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/mismatch.hpp
index 2819c333fee..2819c333fee 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/mismatch.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/mismatch.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/nth_element.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/nth_element.hpp
index a605595c024..a605595c024 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/nth_element.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/nth_element.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/partial_sort.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort.hpp
index d7044cd6833..d7044cd6833 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/partial_sort.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/partial_sort_copy.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort_copy.hpp
index 912938904b6..912938904b6 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/partial_sort_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/partial_sort_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/partition.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/partition.hpp
index b814a2489e7..b814a2489e7 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/partition.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/partition.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/permutation.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/permutation.hpp
index 75388cc8764..75388cc8764 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/permutation.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/permutation.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/algorithm/random_shuffle.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/random_shuffle.hpp
new file mode 100644
index 00000000000..33e98e04be8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/random_shuffle.hpp
@@ -0,0 +1,141 @@
+// Copyright Neil Groves 2009. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+#ifndef BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED
+#define BOOST_RANGE_ALGORITHM_RANDOM_SHUFFLE_HPP_INCLUDED
+
+#include <boost/concept_check.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/concepts.hpp>
+#include <algorithm>
+#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
+#include <cstdlib>
+#endif
+
+namespace boost
+{
+ namespace range
+ {
+
+ namespace detail
+ {
+#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
+
+// wrap std::rand as UniformRandomBitGenerator
+struct wrap_rand
+{
+ typedef unsigned int result_type;
+
+ static BOOST_CONSTEXPR result_type (min)()
+ {
+ return 0;
+ }
+
+ static BOOST_CONSTEXPR result_type (max)()
+ {
+ return RAND_MAX;
+ }
+
+ result_type operator()()
+ {
+ return std::rand();
+ }
+};
+
+template< class RandomIt >
+inline void random_shuffle(RandomIt first, RandomIt last)
+{
+ std::shuffle(first, last, wrap_rand());
+}
+
+// wrap Generator as UniformRandomBitGenerator
+template< class Generator >
+struct wrap_generator
+{
+ typedef unsigned int result_type;
+ static const int max_arg = ((0u - 1u) >> 2) + 1;
+ Generator& g;
+
+ wrap_generator(Generator& gen) : g(gen) {}
+
+ static BOOST_CONSTEXPR result_type (min)()
+ {
+ return 0;
+ }
+
+ static BOOST_CONSTEXPR result_type (max)()
+ {
+ return max_arg - 1;
+ }
+
+ result_type operator()()
+ {
+ return static_cast<result_type>(g(max_arg));
+ }
+};
+
+template< class RandomIt, class Generator >
+inline void random_shuffle(RandomIt first, RandomIt last, Generator& gen)
+{
+ std::shuffle(first, last, wrap_generator< Generator >(gen));
+}
+
+#else
+
+using std::random_shuffle;
+
+#endif
+ } // namespace detail
+
+/// \brief template function random_shuffle
+///
+/// range-based version of the random_shuffle std algorithm
+///
+/// \pre RandomAccessRange is a model of the RandomAccessRangeConcept
+/// \pre Generator is a model of the UnaryFunctionConcept
+template<class RandomAccessRange>
+inline RandomAccessRange& random_shuffle(RandomAccessRange& rng)
+{
+ BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ detail::random_shuffle(boost::begin(rng), boost::end(rng));
+ return rng;
+}
+
+/// \overload
+template<class RandomAccessRange>
+inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng)
+{
+ BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ detail::random_shuffle(boost::begin(rng), boost::end(rng));
+ return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class Generator>
+inline RandomAccessRange& random_shuffle(RandomAccessRange& rng, Generator& gen)
+{
+ BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<RandomAccessRange> ));
+ detail::random_shuffle(boost::begin(rng), boost::end(rng), gen);
+ return rng;
+}
+
+/// \overload
+template<class RandomAccessRange, class Generator>
+inline const RandomAccessRange& random_shuffle(const RandomAccessRange& rng, Generator& gen)
+{
+ BOOST_RANGE_CONCEPT_ASSERT(( RandomAccessRangeConcept<const RandomAccessRange> ));
+ detail::random_shuffle(boost::begin(rng), boost::end(rng), gen);
+ return rng;
+}
+
+ } // namespace range
+ using range::random_shuffle;
+} // namespace boost
+
+#endif // include guard
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/remove.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/remove.hpp
index 699a7cdb6fd..699a7cdb6fd 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/remove.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/remove.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/remove_copy.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy.hpp
index b65747ed951..b65747ed951 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/remove_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/remove_copy_if.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy_if.hpp
index 8d9c37befc4..8d9c37befc4 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/remove_copy_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/remove_copy_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/remove_if.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/remove_if.hpp
index a965df0d6f9..a965df0d6f9 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/remove_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/remove_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/replace.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/replace.hpp
index 44d3e4ca341..44d3e4ca341 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/replace.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/replace.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/replace_copy.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy.hpp
index 0c02005a19f..0c02005a19f 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/replace_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/replace_copy_if.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy_if.hpp
index d313151208c..d313151208c 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/replace_copy_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/replace_copy_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/replace_if.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/replace_if.hpp
index 93d5a1f7f37..93d5a1f7f37 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/replace_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/replace_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/reverse.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/reverse.hpp
index 20a7eb1823d..20a7eb1823d 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/reverse.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/reverse.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/reverse_copy.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/reverse_copy.hpp
index f1990ada137..f1990ada137 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/reverse_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/reverse_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/rotate.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/rotate.hpp
index ca4b223914c..ca4b223914c 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/rotate.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/rotate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/rotate_copy.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/rotate_copy.hpp
index 0409ac5275f..0409ac5275f 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/rotate_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/rotate_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/search.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/search.hpp
index 28cc6e62166..28cc6e62166 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/search.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/search.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/search_n.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/search_n.hpp
index ccfb27ae532..ccfb27ae532 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/search_n.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/search_n.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/set_algorithm.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/set_algorithm.hpp
index 82ef8ecc154..82ef8ecc154 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/set_algorithm.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/set_algorithm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/sort.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/sort.hpp
index 45eecde7f81..45eecde7f81 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/sort.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/sort.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/stable_partition.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/stable_partition.hpp
index 24febfc8857..24febfc8857 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/stable_partition.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/stable_partition.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/stable_sort.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/stable_sort.hpp
index d18da4de0f7..d18da4de0f7 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/stable_sort.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/stable_sort.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/transform.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/transform.hpp
index ade147a94c5..ade147a94c5 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/transform.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/transform.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/unique.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/unique.hpp
index 8017a837ce6..8017a837ce6 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/unique.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/unique.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/unique_copy.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/unique_copy.hpp
index 0682d747ea7..0682d747ea7 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/unique_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/unique_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/algorithm/upper_bound.hpp b/src/third_party/boost-1.69.0/boost/range/algorithm/upper_bound.hpp
index c8acbc66a74..c8acbc66a74 100644
--- a/src/third_party/boost-1.68.0/boost/range/algorithm/upper_bound.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/algorithm/upper_bound.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/as_literal.hpp b/src/third_party/boost-1.69.0/boost/range/as_literal.hpp
index 3bca1a831fa..3bca1a831fa 100644
--- a/src/third_party/boost-1.68.0/boost/range/as_literal.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/as_literal.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/begin.hpp b/src/third_party/boost-1.69.0/boost/range/begin.hpp
new file mode 100644
index 00000000000..4f53d4688cb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/range/begin.hpp
@@ -0,0 +1,143 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_BEGIN_HPP
+#define BOOST_RANGE_BEGIN_HPP
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#include <boost/range/detail/begin.hpp>
+#else
+
+#include <boost/range/iterator.hpp>
+#include <boost/config.hpp>
+#include <boost/config/workaround.hpp>
+
+namespace boost
+{
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+namespace range_detail
+{
+#endif
+
+ //////////////////////////////////////////////////////////////////////
+ // primary template
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename C >
+ BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
+ range_begin( C& c )
+ {
+ //
+ // If you get a compile-error here, it is most likely because
+ // you have not implemented range_begin() properly in
+ // the namespace of C
+ //
+ return c.begin();
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename Iterator >
+ BOOST_CONSTEXPR inline Iterator range_begin( const std::pair<Iterator,Iterator>& p )
+ {
+ return p.first;
+ }
+
+ template< typename Iterator >
+ BOOST_CONSTEXPR inline Iterator range_begin( std::pair<Iterator,Iterator>& p )
+ {
+ return p.first;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////
+
+ //
+ // May this be discarded? Or is it needed for bad compilers?
+ //
+ template< typename T, std::size_t sz >
+ BOOST_CONSTEXPR inline const T* range_begin( const T (&a)[sz] ) BOOST_NOEXCEPT
+ {
+ return a;
+ }
+
+ template< typename T, std::size_t sz >
+ BOOST_CONSTEXPR inline T* range_begin( T (&a)[sz] ) BOOST_NOEXCEPT
+ {
+ return a;
+ }
+
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+} // namespace 'range_detail'
+#endif
+
+// Use a ADL namespace barrier to avoid ambiguity with other unqualified
+// calls. This is particularly important with C++0x encouraging
+// unqualified calls to begin/end.
+namespace range_adl_barrier
+{
+
+template< class T >
+#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
+BOOST_CONSTEXPR
+#endif
+inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type begin( T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ using namespace range_detail;
+#endif
+ return range_begin( r );
+}
+
+template< class T >
+#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
+BOOST_CONSTEXPR
+#endif
+inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type begin( const T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ using namespace range_detail;
+#endif
+ return range_begin( r );
+}
+
+ } // namespace range_adl_barrier
+} // namespace boost
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+namespace boost
+{
+ namespace range_adl_barrier
+ {
+ template< class T >
+ inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
+ const_begin( const T& r )
+ {
+ return boost::range_adl_barrier::begin( r );
+ }
+ } // namespace range_adl_barrier
+
+ using namespace range_adl_barrier;
+} // namespace boost
+
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/range/category.hpp b/src/third_party/boost-1.69.0/boost/range/category.hpp
index f5431adf2ed..f5431adf2ed 100644
--- a/src/third_party/boost-1.68.0/boost/range/category.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/category.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/concepts.hpp b/src/third_party/boost-1.69.0/boost/range/concepts.hpp
index f6f9f41af41..f6f9f41af41 100644
--- a/src/third_party/boost-1.68.0/boost/range/concepts.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/concepts.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/config.hpp b/src/third_party/boost-1.69.0/boost/range/config.hpp
index 7600a5ff824..7600a5ff824 100644
--- a/src/third_party/boost-1.68.0/boost/range/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/const_iterator.hpp b/src/third_party/boost-1.69.0/boost/range/const_iterator.hpp
index 727fdad0586..727fdad0586 100644
--- a/src/third_party/boost-1.68.0/boost/range/const_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/const_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/const_reverse_iterator.hpp b/src/third_party/boost-1.69.0/boost/range/const_reverse_iterator.hpp
index bfe161561c2..bfe161561c2 100644
--- a/src/third_party/boost-1.68.0/boost/range/const_reverse_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/const_reverse_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/as_literal.hpp b/src/third_party/boost-1.69.0/boost/range/detail/as_literal.hpp
index 8b219ea2463..8b219ea2463 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/as_literal.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/as_literal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/begin.hpp b/src/third_party/boost-1.69.0/boost/range/detail/begin.hpp
index efadaa6b8ca..efadaa6b8ca 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/begin.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/begin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/common.hpp b/src/third_party/boost-1.69.0/boost/range/detail/common.hpp
index 2cbc55411dc..2cbc55411dc 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/common.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/common.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/default_constructible_unary_fn.hpp b/src/third_party/boost-1.69.0/boost/range/detail/default_constructible_unary_fn.hpp
index 9729e3cb809..9729e3cb809 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/default_constructible_unary_fn.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/default_constructible_unary_fn.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/detail_str.hpp b/src/third_party/boost-1.69.0/boost/range/detail/detail_str.hpp
index 5ef7a3450ea..5ef7a3450ea 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/detail_str.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/detail_str.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/end.hpp b/src/third_party/boost-1.69.0/boost/range/detail/end.hpp
index 76229216a52..76229216a52 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/end.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/end.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/extract_optional_type.hpp b/src/third_party/boost-1.69.0/boost/range/detail/extract_optional_type.hpp
index 0381434a859..0381434a859 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/extract_optional_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/extract_optional_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/has_member_size.hpp b/src/third_party/boost-1.69.0/boost/range/detail/has_member_size.hpp
index 0c639aa891f..0c639aa891f 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/has_member_size.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/has_member_size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/implementation_help.hpp b/src/third_party/boost-1.69.0/boost/range/detail/implementation_help.hpp
index 59a3ade8370..59a3ade8370 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/implementation_help.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/implementation_help.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/misc_concept.hpp b/src/third_party/boost-1.69.0/boost/range/detail/misc_concept.hpp
index 74cb919f27e..74cb919f27e 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/misc_concept.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/misc_concept.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/msvc_has_iterator_workaround.hpp b/src/third_party/boost-1.69.0/boost/range/detail/msvc_has_iterator_workaround.hpp
index 62b67fd5290..62b67fd5290 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/msvc_has_iterator_workaround.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/msvc_has_iterator_workaround.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/range_return.hpp b/src/third_party/boost-1.69.0/boost/range/detail/range_return.hpp
index 9b98e099c1f..9b98e099c1f 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/range_return.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/range_return.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/remove_extent.hpp b/src/third_party/boost-1.69.0/boost/range/detail/remove_extent.hpp
index 68e45972456..68e45972456 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/remove_extent.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/remove_extent.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/safe_bool.hpp b/src/third_party/boost-1.69.0/boost/range/detail/safe_bool.hpp
index 182e5104845..182e5104845 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/safe_bool.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/safe_bool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/sfinae.hpp b/src/third_party/boost-1.69.0/boost/range/detail/sfinae.hpp
index 5b2c61e71ee..5b2c61e71ee 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/sfinae.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/sfinae.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/size_type.hpp b/src/third_party/boost-1.69.0/boost/range/detail/size_type.hpp
index 78a60a48e96..78a60a48e96 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/size_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/size_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/str_types.hpp b/src/third_party/boost-1.69.0/boost/range/detail/str_types.hpp
index f8cab190d53..f8cab190d53 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/str_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/str_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/detail/value_type.hpp b/src/third_party/boost-1.69.0/boost/range/detail/value_type.hpp
index 2784514c6a0..2784514c6a0 100644
--- a/src/third_party/boost-1.68.0/boost/range/detail/value_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/detail/value_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/difference_type.hpp b/src/third_party/boost-1.69.0/boost/range/difference_type.hpp
index 6bb3c5f5520..6bb3c5f5520 100644
--- a/src/third_party/boost-1.68.0/boost/range/difference_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/difference_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/distance.hpp b/src/third_party/boost-1.69.0/boost/range/distance.hpp
new file mode 100644
index 00000000000..5b82cf0cedb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/range/distance.hpp
@@ -0,0 +1,40 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2006. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_DISTANCE_HPP
+#define BOOST_RANGE_DISTANCE_HPP
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/iterator/distance.hpp>
+#include <boost/range/begin.hpp>
+#include <boost/range/end.hpp>
+#include <boost/range/difference_type.hpp>
+
+namespace boost
+{
+
+ namespace range_distance_adl_barrier
+ {
+ template< class T >
+ inline BOOST_CXX14_CONSTEXPR BOOST_DEDUCED_TYPENAME range_difference<T>::type
+ distance( const T& r )
+ {
+ return boost::iterators::distance( boost::begin( r ), boost::end( r ) );
+ }
+ }
+
+ using namespace range_distance_adl_barrier;
+
+} // namespace 'boost'
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/range/empty.hpp b/src/third_party/boost-1.69.0/boost/range/empty.hpp
index d57a30ed017..d57a30ed017 100644
--- a/src/third_party/boost-1.68.0/boost/range/empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/empty.hpp
diff --git a/src/third_party/boost-1.69.0/boost/range/end.hpp b/src/third_party/boost-1.69.0/boost/range/end.hpp
new file mode 100644
index 00000000000..eab4fa9f5b5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/range/end.hpp
@@ -0,0 +1,136 @@
+// Boost.Range library
+//
+// Copyright Thorsten Ottosen 2003-2004. Use, modification and
+// distribution is subject to the Boost Software License, Version
+// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// For more information, see http://www.boost.org/libs/range/
+//
+
+#ifndef BOOST_RANGE_END_HPP
+#define BOOST_RANGE_END_HPP
+
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/range/config.hpp>
+
+#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+#include <boost/range/detail/end.hpp>
+#else
+
+#include <boost/range/detail/implementation_help.hpp>
+#include <boost/range/iterator.hpp>
+#include <boost/range/const_iterator.hpp>
+#include <boost/config.hpp>
+#include <boost/config/workaround.hpp>
+
+namespace boost
+{
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+namespace range_detail
+{
+#endif
+
+ //////////////////////////////////////////////////////////////////////
+ // primary template
+ //////////////////////////////////////////////////////////////////////
+ template< typename C >
+ BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
+ range_end( C& c )
+ {
+ //
+ // If you get a compile-error here, it is most likely because
+ // you have not implemented range_begin() properly in
+ // the namespace of C
+ //
+ return c.end();
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // pair
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename Iterator >
+ BOOST_CONSTEXPR inline Iterator range_end( const std::pair<Iterator,Iterator>& p )
+ {
+ return p.second;
+ }
+
+ template< typename Iterator >
+ BOOST_CONSTEXPR inline Iterator range_end( std::pair<Iterator,Iterator>& p )
+ {
+ return p.second;
+ }
+
+ //////////////////////////////////////////////////////////////////////
+ // array
+ //////////////////////////////////////////////////////////////////////
+
+ template< typename T, std::size_t sz >
+ BOOST_CONSTEXPR inline const T* range_end( const T (&a)[sz] ) BOOST_NOEXCEPT
+ {
+ return range_detail::array_end<T,sz>( a );
+ }
+
+ template< typename T, std::size_t sz >
+ BOOST_CONSTEXPR inline T* range_end( T (&a)[sz] ) BOOST_NOEXCEPT
+ {
+ return range_detail::array_end<T,sz>( a );
+ }
+
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+} // namespace 'range_detail'
+#endif
+
+namespace range_adl_barrier
+{
+
+template< class T >
+#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
+BOOST_CONSTEXPR
+#endif
+inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ using namespace range_detail;
+#endif
+ return range_end( r );
+}
+
+template< class T >
+#if !BOOST_WORKAROUND(BOOST_GCC, < 40700)
+BOOST_CONSTEXPR
+#endif
+inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
+{
+#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+ using namespace range_detail;
+#endif
+ return range_end( r );
+}
+
+ } // namespace range_adl_barrier
+} // namespace 'boost'
+
+#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
+
+namespace boost
+{
+ namespace range_adl_barrier
+ {
+ template< class T >
+ BOOST_CONSTEXPR inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
+ const_end( const T& r )
+ {
+ return boost::range_adl_barrier::end( r );
+ }
+ } // namespace range_adl_barrier
+ using namespace range_adl_barrier;
+} // namespace boost
+
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/range/functions.hpp b/src/third_party/boost-1.69.0/boost/range/functions.hpp
index 43c54b15b85..43c54b15b85 100644
--- a/src/third_party/boost-1.68.0/boost/range/functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/functions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/has_range_iterator.hpp b/src/third_party/boost-1.69.0/boost/range/has_range_iterator.hpp
index 88d8664d165..88d8664d165 100644
--- a/src/third_party/boost-1.68.0/boost/range/has_range_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/has_range_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/iterator.hpp b/src/third_party/boost-1.69.0/boost/range/iterator.hpp
index 2956353ab5a..2956353ab5a 100644
--- a/src/third_party/boost-1.68.0/boost/range/iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/iterator_range.hpp b/src/third_party/boost-1.69.0/boost/range/iterator_range.hpp
index dfcd4d2f860..dfcd4d2f860 100644
--- a/src/third_party/boost-1.68.0/boost/range/iterator_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/iterator_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/iterator_range_core.hpp b/src/third_party/boost-1.69.0/boost/range/iterator_range_core.hpp
index 7f2dc3f9c89..7f2dc3f9c89 100644
--- a/src/third_party/boost-1.68.0/boost/range/iterator_range_core.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/iterator_range_core.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/iterator_range_io.hpp b/src/third_party/boost-1.69.0/boost/range/iterator_range_io.hpp
index 8c294008cd4..8c294008cd4 100644
--- a/src/third_party/boost-1.68.0/boost/range/iterator_range_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/iterator_range_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/metafunctions.hpp b/src/third_party/boost-1.69.0/boost/range/metafunctions.hpp
index 9dc59d0f7c5..9dc59d0f7c5 100644
--- a/src/third_party/boost-1.68.0/boost/range/metafunctions.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/metafunctions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/mutable_iterator.hpp b/src/third_party/boost-1.69.0/boost/range/mutable_iterator.hpp
index b924666679a..b924666679a 100644
--- a/src/third_party/boost-1.68.0/boost/range/mutable_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/mutable_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/numeric.hpp b/src/third_party/boost-1.69.0/boost/range/numeric.hpp
index d1510cdef1a..d1510cdef1a 100644
--- a/src/third_party/boost-1.68.0/boost/range/numeric.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/numeric.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/pointer.hpp b/src/third_party/boost-1.69.0/boost/range/pointer.hpp
index b1e8dc5c5ec..b1e8dc5c5ec 100644
--- a/src/third_party/boost-1.68.0/boost/range/pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/pointer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/range_fwd.hpp b/src/third_party/boost-1.69.0/boost/range/range_fwd.hpp
index 0e6e00f5531..0e6e00f5531 100644
--- a/src/third_party/boost-1.68.0/boost/range/range_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/range_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/rbegin.hpp b/src/third_party/boost-1.69.0/boost/range/rbegin.hpp
index 6d66de94b96..6d66de94b96 100644
--- a/src/third_party/boost-1.68.0/boost/range/rbegin.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/rbegin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/reference.hpp b/src/third_party/boost-1.69.0/boost/range/reference.hpp
index c664c38a660..c664c38a660 100644
--- a/src/third_party/boost-1.68.0/boost/range/reference.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/reference.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/rend.hpp b/src/third_party/boost-1.69.0/boost/range/rend.hpp
index ef7040780cc..ef7040780cc 100644
--- a/src/third_party/boost-1.68.0/boost/range/rend.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/rend.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/result_iterator.hpp b/src/third_party/boost-1.69.0/boost/range/result_iterator.hpp
index 54e343d1117..54e343d1117 100644
--- a/src/third_party/boost-1.68.0/boost/range/result_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/result_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/reverse_iterator.hpp b/src/third_party/boost-1.69.0/boost/range/reverse_iterator.hpp
index 0aa0130af64..0aa0130af64 100644
--- a/src/third_party/boost-1.68.0/boost/range/reverse_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/reverse_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/reverse_result_iterator.hpp b/src/third_party/boost-1.69.0/boost/range/reverse_result_iterator.hpp
index d375cfd536f..d375cfd536f 100644
--- a/src/third_party/boost-1.68.0/boost/range/reverse_result_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/reverse_result_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/size.hpp b/src/third_party/boost-1.69.0/boost/range/size.hpp
index 7f38db8c1eb..7f38db8c1eb 100644
--- a/src/third_party/boost-1.68.0/boost/range/size.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/size.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/size_type.hpp b/src/third_party/boost-1.69.0/boost/range/size_type.hpp
index 0a2ea81bb98..0a2ea81bb98 100644
--- a/src/third_party/boost-1.68.0/boost/range/size_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/size_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/sub_range.hpp b/src/third_party/boost-1.69.0/boost/range/sub_range.hpp
index d1c3b99b0d0..d1c3b99b0d0 100644
--- a/src/third_party/boost-1.68.0/boost/range/sub_range.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/sub_range.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/traversal.hpp b/src/third_party/boost-1.69.0/boost/range/traversal.hpp
index 237b3e88e00..237b3e88e00 100644
--- a/src/third_party/boost-1.68.0/boost/range/traversal.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/traversal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/range/value_type.hpp b/src/third_party/boost-1.69.0/boost/range/value_type.hpp
index 5a3187ec0e0..5a3187ec0e0 100644
--- a/src/third_party/boost-1.68.0/boost/range/value_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/range/value_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/ratio/config.hpp b/src/third_party/boost-1.69.0/boost/ratio/config.hpp
new file mode 100644
index 00000000000..3e4d581298f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/ratio/config.hpp
@@ -0,0 +1,96 @@
+// config.hpp ---------------------------------------------------------------//
+
+// Copyright 2012 Vicente J. Botet Escriba
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+
+#ifndef BOOST_RATIO_CONFIG_HPP
+#define BOOST_RATIO_CONFIG_HPP
+
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp>
+
+
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
+# if ! defined BOOST_NO_CXX11_U16STRING
+# define BOOST_NO_CXX11_U16STRING
+# endif
+# if ! defined BOOST_NO_CXX11_U32STRING
+# define BOOST_NO_CXX11_U32STRING
+# endif
+#endif
+
+
+#if !defined BOOST_RATIO_VERSION
+#define BOOST_RATIO_VERSION 1
+#else
+#if BOOST_RATIO_VERSION!=1 && BOOST_RATIO_VERSION!=2
+#error "BOOST_RATIO_VERSION must be 1 or 2"
+#endif
+#endif
+
+#if BOOST_RATIO_VERSION==1
+#if ! defined BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
+#define BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+#endif
+#endif
+
+#if BOOST_RATIO_VERSION==2
+#if ! defined BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
+#define BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
+#endif
+#endif
+
+#ifdef INTMAX_C
+#define BOOST_RATIO_INTMAX_C(a) INTMAX_C(a)
+#elif __cplusplus >= 201103L
+#define BOOST_RATIO_INTMAX_C(a) a##LL
+#else
+#define BOOST_RATIO_INTMAX_C(a) a##L
+#endif
+
+#ifdef UINTMAX_C
+#define BOOST_RATIO_UINTMAX_C(a) UINTMAX_C(a)
+#elif __cplusplus >= 201103L
+#define BOOST_RATIO_UINTMAX_C(a) a##ULL
+#else
+#define BOOST_RATIO_UINTMAX_C(a) a##UL
+#endif
+
+#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFELL)
+
+
+#ifndef BOOST_NO_CXX11_STATIC_ASSERT
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
+#elif defined(BOOST_RATIO_USES_STATIC_ASSERT)
+#include <boost/static_assert.hpp>
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
+#elif defined(BOOST_RATIO_USES_MPL_ASSERT)
+#include <boost/mpl/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \
+ BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
+#else
+//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
+#define BOOST_RATIO_CONCAT(A,B) A##B
+#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
+#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1]
+//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
+#endif
+
+#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_RATIO_USES_MPL_ASSERT)
+#define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add"
+#define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub"
+#define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul"
+#define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
+#define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
+#define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0"
+#define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
+#endif
+
+
+//#define BOOST_RATIO_EXTENSIONS
+
+#endif // header
diff --git a/src/third_party/boost-1.68.0/boost/ratio/detail/mpl/abs.hpp b/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/abs.hpp
index 91545888a9d..91545888a9d 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/detail/mpl/abs.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/abs.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/detail/mpl/gcd.hpp b/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/gcd.hpp
index 30ba1db91cd..30ba1db91cd 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/detail/mpl/gcd.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/gcd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/detail/mpl/lcm.hpp b/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/lcm.hpp
index 1792660f06a..1792660f06a 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/detail/mpl/lcm.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/lcm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/detail/mpl/sign.hpp b/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/sign.hpp
index fa1c555348e..fa1c555348e 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/detail/mpl/sign.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/detail/mpl/sign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/detail/overflow_helpers.hpp b/src/third_party/boost-1.69.0/boost/ratio/detail/overflow_helpers.hpp
index ffaa603a65a..ffaa603a65a 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/detail/overflow_helpers.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/detail/overflow_helpers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/detail/ratio_io.hpp b/src/third_party/boost-1.69.0/boost/ratio/detail/ratio_io.hpp
index 636dbc22f84..636dbc22f84 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/detail/ratio_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/detail/ratio_io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/mpl/rational_c_tag.hpp b/src/third_party/boost-1.69.0/boost/ratio/mpl/rational_c_tag.hpp
index 743766ffa0a..743766ffa0a 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/mpl/rational_c_tag.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/mpl/rational_c_tag.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/ratio.hpp b/src/third_party/boost-1.69.0/boost/ratio/ratio.hpp
index 824cbf01733..824cbf01733 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/ratio.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/ratio.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/ratio_fwd.hpp b/src/third_party/boost-1.69.0/boost/ratio/ratio_fwd.hpp
index cd9199f3939..cd9199f3939 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/ratio_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/ratio_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/ratio/ratio_io.hpp b/src/third_party/boost-1.69.0/boost/ratio/ratio_io.hpp
index e39cbaffa54..e39cbaffa54 100644
--- a/src/third_party/boost-1.68.0/boost/ratio/ratio_io.hpp
+++ b/src/third_party/boost-1.69.0/boost/ratio/ratio_io.hpp
diff --git a/src/third_party/boost-1.69.0/boost/rational.hpp b/src/third_party/boost-1.69.0/boost/rational.hpp
new file mode 100644
index 00000000000..8cd70b3e22e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/rational.hpp
@@ -0,0 +1,1020 @@
+// Boost rational.hpp header file ------------------------------------------//
+
+// (C) Copyright Paul Moore 1999. Permission to copy, use, modify, sell and
+// distribute this software is granted provided this copyright notice appears
+// in all copies. This software is provided "as is" without express or
+// implied warranty, and with no claim as to its suitability for any purpose.
+
+// boostinspect:nolicense (don't complain about the lack of a Boost license)
+// (Paul Moore hasn't been in contact for years, so there's no way to change the
+// license.)
+
+// See http://www.boost.org/libs/rational for documentation.
+
+// Credits:
+// Thanks to the boost mailing list in general for useful comments.
+// Particular contributions included:
+// Andrew D Jewell, for reminding me to take care to avoid overflow
+// Ed Brey, for many comments, including picking up on some dreadful typos
+// Stephen Silver contributed the test suite and comments on user-defined
+// IntType
+// Nickolay Mladenov, for the implementation of operator+=
+
+// Revision History
+// 02 Sep 13 Remove unneeded forward declarations; tweak private helper
+// function (Daryle Walker)
+// 30 Aug 13 Improve exception safety of "assign"; start modernizing I/O code
+// (Daryle Walker)
+// 27 Aug 13 Add cross-version constructor template, plus some private helper
+// functions; add constructor to exception class to take custom
+// messages (Daryle Walker)
+// 25 Aug 13 Add constexpr qualification wherever possible (Daryle Walker)
+// 05 May 12 Reduced use of implicit gcd (Mario Lang)
+// 05 Nov 06 Change rational_cast to not depend on division between different
+// types (Daryle Walker)
+// 04 Nov 06 Off-load GCD and LCM to Boost.Integer; add some invariant checks;
+// add std::numeric_limits<> requirement to help GCD (Daryle Walker)
+// 31 Oct 06 Recoded both operator< to use round-to-negative-infinity
+// divisions; the rational-value version now uses continued fraction
+// expansion to avoid overflows, for bug #798357 (Daryle Walker)
+// 20 Oct 06 Fix operator bool_type for CW 8.3 (Joaquín M López Muñoz)
+// 18 Oct 06 Use EXPLICIT_TEMPLATE_TYPE helper macros from Boost.Config
+// (Joaquín M López Muñoz)
+// 27 Dec 05 Add Boolean conversion operator (Daryle Walker)
+// 28 Sep 02 Use _left versions of operators from operators.hpp
+// 05 Jul 01 Recode gcd(), avoiding std::swap (Helmut Zeisel)
+// 03 Mar 01 Workarounds for Intel C++ 5.0 (David Abrahams)
+// 05 Feb 01 Update operator>> to tighten up input syntax
+// 05 Feb 01 Final tidy up of gcd code prior to the new release
+// 27 Jan 01 Recode abs() without relying on abs(IntType)
+// 21 Jan 01 Include Nickolay Mladenov's operator+= algorithm,
+// tidy up a number of areas, use newer features of operators.hpp
+// (reduces space overhead to zero), add operator!,
+// introduce explicit mixed-mode arithmetic operations
+// 12 Jan 01 Include fixes to handle a user-defined IntType better
+// 19 Nov 00 Throw on divide by zero in operator /= (John (EBo) David)
+// 23 Jun 00 Incorporate changes from Mark Rodgers for Borland C++
+// 22 Jun 00 Change _MSC_VER to BOOST_MSVC so other compilers are not
+// affected (Beman Dawes)
+// 6 Mar 00 Fix operator-= normalization, #include <string> (Jens Maurer)
+// 14 Dec 99 Modifications based on comments from the boost list
+// 09 Dec 99 Initial Version (Paul Moore)
+
+#ifndef BOOST_RATIONAL_HPP
+#define BOOST_RATIONAL_HPP
+
+#include <boost/config.hpp> // for BOOST_NO_STDC_NAMESPACE, BOOST_MSVC, etc
+#ifndef BOOST_NO_IOSTREAM
+#include <iomanip> // for std::setw
+#include <ios> // for std::noskipws, streamsize
+#include <istream> // for std::istream
+#include <ostream> // for std::ostream
+#include <sstream> // for std::ostringstream
+#endif
+#include <cstddef> // for NULL
+#include <stdexcept> // for std::domain_error
+#include <string> // for std::string implicit constructor
+#include <boost/operators.hpp> // for boost::addable etc
+#include <cstdlib> // for std::abs
+#include <boost/call_traits.hpp> // for boost::call_traits
+#include <boost/detail/workaround.hpp> // for BOOST_WORKAROUND
+#include <boost/assert.hpp> // for BOOST_ASSERT
+#include <boost/integer/common_factor_rt.hpp> // for boost::integer::gcd, lcm
+#include <limits> // for std::numeric_limits
+#include <boost/static_assert.hpp> // for BOOST_STATIC_ASSERT
+#include <boost/throw_exception.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+// Control whether depreciated GCD and LCM functions are included (default: yes)
+#ifndef BOOST_CONTROL_RATIONAL_HAS_GCD
+#define BOOST_CONTROL_RATIONAL_HAS_GCD 1
+#endif
+
+namespace boost {
+
+#if BOOST_CONTROL_RATIONAL_HAS_GCD
+template <typename IntType>
+IntType gcd(IntType n, IntType m)
+{
+ // Defer to the version in Boost.Integer
+ return integer::gcd( n, m );
+}
+
+template <typename IntType>
+IntType lcm(IntType n, IntType m)
+{
+ // Defer to the version in Boost.Integer
+ return integer::lcm( n, m );
+}
+#endif // BOOST_CONTROL_RATIONAL_HAS_GCD
+
+namespace rational_detail{
+
+ template <class FromInt, class ToInt>
+ struct is_compatible_integer
+ {
+ BOOST_STATIC_CONSTANT(bool, value = ((std::numeric_limits<FromInt>::is_specialized && std::numeric_limits<FromInt>::is_integer
+ && (std::numeric_limits<FromInt>::digits <= std::numeric_limits<ToInt>::digits)
+ && (std::numeric_limits<FromInt>::radix == std::numeric_limits<ToInt>::radix)
+ && ((std::numeric_limits<FromInt>::is_signed == false) || (std::numeric_limits<ToInt>::is_signed == true))
+ && is_convertible<FromInt, ToInt>::value)
+ || is_same<FromInt, ToInt>::value)
+ || (is_class<ToInt>::value && is_class<FromInt>::value && is_convertible<FromInt, ToInt>::value));
+ };
+
+}
+
+class bad_rational : public std::domain_error
+{
+public:
+ explicit bad_rational() : std::domain_error("bad rational: zero denominator") {}
+ explicit bad_rational( char const *what ) : std::domain_error( what ) {}
+};
+
+template <typename IntType>
+class rational
+{
+ // Class-wide pre-conditions
+ BOOST_STATIC_ASSERT( ::std::numeric_limits<IntType>::is_specialized );
+
+ // Helper types
+ typedef typename boost::call_traits<IntType>::param_type param_type;
+
+ struct helper { IntType parts[2]; };
+ typedef IntType (helper::* bool_type)[2];
+
+public:
+ // Component type
+ typedef IntType int_type;
+
+ BOOST_CONSTEXPR
+ rational() : num(0), den(1) {}
+ template <class T>
+ BOOST_CONSTEXPR rational(const T& n, typename enable_if_c<
+ rational_detail::is_compatible_integer<T, IntType>::value
+ >::type const* = 0) : num(n), den(1) {}
+ template <class T, class U>
+ BOOST_CXX14_CONSTEXPR rational(const T& n, const U& d, typename enable_if_c<
+ rational_detail::is_compatible_integer<T, IntType>::value && rational_detail::is_compatible_integer<U, IntType>::value
+ >::type const* = 0) : num(n), den(d) {
+ normalize();
+ }
+
+ template < typename NewType >
+ BOOST_CONSTEXPR explicit
+ rational(rational<NewType> const &r, typename enable_if_c<rational_detail::is_compatible_integer<NewType, IntType>::value>::type const* = 0)
+ : num(r.numerator()), den(is_normalized(int_type(r.numerator()),
+ int_type(r.denominator())) ? r.denominator() :
+ (BOOST_THROW_EXCEPTION(bad_rational("bad rational: denormalized conversion")), 0)){}
+
+ template < typename NewType >
+ BOOST_CONSTEXPR explicit
+ rational(rational<NewType> const &r, typename disable_if_c<rational_detail::is_compatible_integer<NewType, IntType>::value>::type const* = 0)
+ : num(r.numerator()), den(is_normalized(int_type(r.numerator()),
+ int_type(r.denominator())) && is_safe_narrowing_conversion(r.denominator()) && is_safe_narrowing_conversion(r.numerator()) ? r.denominator() :
+ (BOOST_THROW_EXCEPTION(bad_rational("bad rational: denormalized conversion")), 0)){}
+ // Default copy constructor and assignment are fine
+
+ // Add assignment from IntType
+ template <class T>
+ BOOST_CXX14_CONSTEXPR typename enable_if_c<
+ rational_detail::is_compatible_integer<T, IntType>::value, rational &
+ >::type operator=(const T& n) { return assign(static_cast<IntType>(n), static_cast<IntType>(1)); }
+
+ // Assign in place
+ template <class T, class U>
+ BOOST_CXX14_CONSTEXPR typename enable_if_c<
+ rational_detail::is_compatible_integer<T, IntType>::value && rational_detail::is_compatible_integer<U, IntType>::value, rational &
+ >::type assign(const T& n, const U& d)
+ {
+ return *this = rational<IntType>(static_cast<IntType>(n), static_cast<IntType>(d));
+ }
+ //
+ // The following overloads should probably *not* be provided -
+ // but are provided for backwards compatibity reasons only.
+ // These allow for construction/assignment from types that
+ // are wider than IntType only if there is an implicit
+ // conversion from T to IntType, they will throw a bad_rational
+ // if the conversion results in loss of precision or undefined behaviour.
+ //
+ template <class T>
+ BOOST_CXX14_CONSTEXPR rational(const T& n, typename enable_if_c<
+ std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer
+ && !rational_detail::is_compatible_integer<T, IntType>::value
+ && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix)
+ && is_convertible<T, IntType>::value
+ >::type const* = 0)
+ {
+ assign(n, static_cast<T>(1));
+ }
+ template <class T, class U>
+ BOOST_CXX14_CONSTEXPR rational(const T& n, const U& d, typename enable_if_c<
+ (!rational_detail::is_compatible_integer<T, IntType>::value
+ || !rational_detail::is_compatible_integer<U, IntType>::value)
+ && std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer
+ && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix)
+ && is_convertible<T, IntType>::value &&
+ std::numeric_limits<U>::is_specialized && std::numeric_limits<U>::is_integer
+ && (std::numeric_limits<U>::radix == std::numeric_limits<IntType>::radix)
+ && is_convertible<U, IntType>::value
+ >::type const* = 0)
+ {
+ assign(n, d);
+ }
+ template <class T>
+ BOOST_CXX14_CONSTEXPR typename enable_if_c<
+ std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer
+ && !rational_detail::is_compatible_integer<T, IntType>::value
+ && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix)
+ && is_convertible<T, IntType>::value,
+ rational &
+ >::type operator=(const T& n) { return assign(n, static_cast<T>(1)); }
+
+ template <class T, class U>
+ BOOST_CXX14_CONSTEXPR typename enable_if_c<
+ (!rational_detail::is_compatible_integer<T, IntType>::value
+ || !rational_detail::is_compatible_integer<U, IntType>::value)
+ && std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::is_integer
+ && (std::numeric_limits<T>::radix == std::numeric_limits<IntType>::radix)
+ && is_convertible<T, IntType>::value &&
+ std::numeric_limits<U>::is_specialized && std::numeric_limits<U>::is_integer
+ && (std::numeric_limits<U>::radix == std::numeric_limits<IntType>::radix)
+ && is_convertible<U, IntType>::value,
+ rational &
+ >::type assign(const T& n, const U& d)
+ {
+ if(!is_safe_narrowing_conversion(n) || !is_safe_narrowing_conversion(d))
+ BOOST_THROW_EXCEPTION(bad_rational());
+ return *this = rational<IntType>(static_cast<IntType>(n), static_cast<IntType>(d));
+ }
+
+ // Access to representation
+ BOOST_CONSTEXPR
+ const IntType& numerator() const { return num; }
+ BOOST_CONSTEXPR
+ const IntType& denominator() const { return den; }
+
+ // Arithmetic assignment operators
+ BOOST_CXX14_CONSTEXPR rational& operator+= (const rational& r);
+ BOOST_CXX14_CONSTEXPR rational& operator-= (const rational& r);
+ BOOST_CXX14_CONSTEXPR rational& operator*= (const rational& r);
+ BOOST_CXX14_CONSTEXPR rational& operator/= (const rational& r);
+
+ template <class T>
+ BOOST_CXX14_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator+= (const T& i)
+ {
+ num += i * den;
+ return *this;
+ }
+ template <class T>
+ BOOST_CXX14_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator-= (const T& i)
+ {
+ num -= i * den;
+ return *this;
+ }
+ template <class T>
+ BOOST_CXX14_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator*= (const T& i)
+ {
+ // Avoid overflow and preserve normalization
+ IntType gcd = integer::gcd(static_cast<IntType>(i), den);
+ num *= i / gcd;
+ den /= gcd;
+ return *this;
+ }
+ template <class T>
+ BOOST_CXX14_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, rational&>::type operator/= (const T& i)
+ {
+ // Avoid repeated construction
+ IntType const zero(0);
+
+ if(i == zero) BOOST_THROW_EXCEPTION(bad_rational());
+ if(num == zero) return *this;
+
+ // Avoid overflow and preserve normalization
+ IntType const gcd = integer::gcd(num, static_cast<IntType>(i));
+ num /= gcd;
+ den *= i / gcd;
+
+ if(den < zero) {
+ num = -num;
+ den = -den;
+ }
+
+ return *this;
+ }
+
+ // Increment and decrement
+ BOOST_CXX14_CONSTEXPR const rational& operator++() { num += den; return *this; }
+ BOOST_CXX14_CONSTEXPR const rational& operator--() { num -= den; return *this; }
+
+ BOOST_CXX14_CONSTEXPR rational operator++(int)
+ {
+ rational t(*this);
+ ++(*this);
+ return t;
+ }
+ BOOST_CXX14_CONSTEXPR rational operator--(int)
+ {
+ rational t(*this);
+ --(*this);
+ return t;
+ }
+
+ // Operator not
+ BOOST_CONSTEXPR
+ bool operator!() const { return !num; }
+
+ // Boolean conversion
+
+#if BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+ // The "ISO C++ Template Parser" option in CW 8.3 chokes on the
+ // following, hence we selectively disable that option for the
+ // offending memfun.
+#pragma parse_mfunc_templ off
+#endif
+
+ BOOST_CONSTEXPR
+ operator bool_type() const { return operator !() ? 0 : &helper::parts; }
+
+#if BOOST_WORKAROUND(__MWERKS__,<=0x3003)
+#pragma parse_mfunc_templ reset
+#endif
+
+ // Comparison operators
+ BOOST_CXX14_CONSTEXPR bool operator< (const rational& r) const;
+ BOOST_CXX14_CONSTEXPR bool operator> (const rational& r) const { return r < *this; }
+ BOOST_CONSTEXPR
+ bool operator== (const rational& r) const;
+
+ template <class T>
+ BOOST_CXX14_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator< (const T& i) const
+ {
+ // Avoid repeated construction
+ int_type const zero(0);
+
+ // Break value into mixed-fraction form, w/ always-nonnegative remainder
+ BOOST_ASSERT(this->den > zero);
+ int_type q = this->num / this->den, r = this->num % this->den;
+ while(r < zero) { r += this->den; --q; }
+
+ // Compare with just the quotient, since the remainder always bumps the
+ // value up. [Since q = floor(n/d), and if n/d < i then q < i, if n/d == i
+ // then q == i, if n/d == i + r/d then q == i, and if n/d >= i + 1 then
+ // q >= i + 1 > i; therefore n/d < i iff q < i.]
+ return q < i;
+ }
+ template <class T>
+ BOOST_CXX14_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator>(const T& i) const
+ {
+ return operator==(i) ? false : !operator<(i);
+ }
+ template <class T>
+ BOOST_CONSTEXPR typename boost::enable_if_c<rational_detail::is_compatible_integer<T, IntType>::value, bool>::type operator== (const T& i) const
+ {
+ return ((den == IntType(1)) && (num == i));
+ }
+
+private:
+ // Implementation - numerator and denominator (normalized).
+ // Other possibilities - separate whole-part, or sign, fields?
+ IntType num;
+ IntType den;
+
+ // Helper functions
+ static BOOST_CONSTEXPR
+ int_type inner_gcd( param_type a, param_type b, int_type const &zero =
+ int_type(0) )
+ { return b == zero ? a : inner_gcd(b, a % b, zero); }
+
+ static BOOST_CONSTEXPR
+ int_type inner_abs( param_type x, int_type const &zero = int_type(0) )
+ { return x < zero ? -x : +x; }
+
+ // Representation note: Fractions are kept in normalized form at all
+ // times. normalized form is defined as gcd(num,den) == 1 and den > 0.
+ // In particular, note that the implementation of abs() below relies
+ // on den always being positive.
+ BOOST_CXX14_CONSTEXPR bool test_invariant() const;
+ BOOST_CXX14_CONSTEXPR void normalize();
+
+ static BOOST_CONSTEXPR
+ bool is_normalized( param_type n, param_type d, int_type const &zero =
+ int_type(0), int_type const &one = int_type(1) )
+ {
+ return d > zero && ( n != zero || d == one ) && inner_abs( inner_gcd(n,
+ d, zero), zero ) == one;
+ }
+ //
+ // Conversion checks:
+ //
+ // (1) From an unsigned type with more digits than IntType:
+ //
+ template <class T>
+ BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val)
+ {
+ return val < (T(1) << std::numeric_limits<IntType>::digits);
+ }
+ //
+ // (2) From a signed type with more digits than IntType, and IntType also signed:
+ //
+ template <class T>
+ BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T& val)
+ {
+ // Note that this check assumes IntType has a 2's complement representation,
+ // we don't want to try to convert a std::numeric_limits<IntType>::min() to
+ // a T because that conversion may not be allowed (this happens when IntType
+ // is from Boost.Multiprecision).
+ return (val < (T(1) << std::numeric_limits<IntType>::digits)) && (val >= -(T(1) << std::numeric_limits<IntType>::digits));
+ }
+ //
+ // (3) From a signed type with more digits than IntType, and IntType unsigned:
+ //
+ template <class T>
+ BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits > std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val)
+ {
+ return (val < (T(1) << std::numeric_limits<IntType>::digits)) && (val >= 0);
+ }
+ //
+ // (4) From a signed type with fewer digits than IntType, and IntType unsigned:
+ //
+ template <class T>
+ BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T& val)
+ {
+ return val >= 0;
+ }
+ //
+ // (5) From an unsigned type with fewer digits than IntType, and IntType signed:
+ //
+ template <class T>
+ BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T&)
+ {
+ return true;
+ }
+ //
+ // (6) From an unsigned type with fewer digits than IntType, and IntType unsigned:
+ //
+ template <class T>
+ BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == false) && (std::numeric_limits<IntType>::is_signed == false), bool>::type is_safe_narrowing_conversion(const T&)
+ {
+ return true;
+ }
+ //
+ // (7) From an signed type with fewer digits than IntType, and IntType signed:
+ //
+ template <class T>
+ BOOST_CONSTEXPR static typename boost::enable_if_c<(std::numeric_limits<T>::digits <= std::numeric_limits<IntType>::digits) && (std::numeric_limits<T>::is_signed == true) && (std::numeric_limits<IntType>::is_signed == true), bool>::type is_safe_narrowing_conversion(const T&)
+ {
+ return true;
+ }
+};
+
+// Unary plus and minus
+template <typename IntType>
+BOOST_CONSTEXPR
+inline rational<IntType> operator+ (const rational<IntType>& r)
+{
+ return r;
+}
+
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR
+inline rational<IntType> operator- (const rational<IntType>& r)
+{
+ return rational<IntType>(static_cast<IntType>(-r.numerator()), r.denominator());
+}
+
+// Arithmetic assignment operators
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR rational<IntType>& rational<IntType>::operator+= (const rational<IntType>& r)
+{
+ // This calculation avoids overflow, and minimises the number of expensive
+ // calculations. Thanks to Nickolay Mladenov for this algorithm.
+ //
+ // Proof:
+ // We have to compute a/b + c/d, where gcd(a,b)=1 and gcd(b,c)=1.
+ // Let g = gcd(b,d), and b = b1*g, d=d1*g. Then gcd(b1,d1)=1
+ //
+ // The result is (a*d1 + c*b1) / (b1*d1*g).
+ // Now we have to normalize this ratio.
+ // Let's assume h | gcd((a*d1 + c*b1), (b1*d1*g)), and h > 1
+ // If h | b1 then gcd(h,d1)=1 and hence h|(a*d1+c*b1) => h|a.
+ // But since gcd(a,b1)=1 we have h=1.
+ // Similarly h|d1 leads to h=1.
+ // So we have that h | gcd((a*d1 + c*b1) , (b1*d1*g)) => h|g
+ // Finally we have gcd((a*d1 + c*b1), (b1*d1*g)) = gcd((a*d1 + c*b1), g)
+ // Which proves that instead of normalizing the result, it is better to
+ // divide num and den by gcd((a*d1 + c*b1), g)
+
+ // Protect against self-modification
+ IntType r_num = r.num;
+ IntType r_den = r.den;
+
+ IntType g = integer::gcd(den, r_den);
+ den /= g; // = b1 from the calculations above
+ num = num * (r_den / g) + r_num * den;
+ g = integer::gcd(num, g);
+ num /= g;
+ den *= r_den/g;
+
+ return *this;
+}
+
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR rational<IntType>& rational<IntType>::operator-= (const rational<IntType>& r)
+{
+ // Protect against self-modification
+ IntType r_num = r.num;
+ IntType r_den = r.den;
+
+ // This calculation avoids overflow, and minimises the number of expensive
+ // calculations. It corresponds exactly to the += case above
+ IntType g = integer::gcd(den, r_den);
+ den /= g;
+ num = num * (r_den / g) - r_num * den;
+ g = integer::gcd(num, g);
+ num /= g;
+ den *= r_den/g;
+
+ return *this;
+}
+
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR rational<IntType>& rational<IntType>::operator*= (const rational<IntType>& r)
+{
+ // Protect against self-modification
+ IntType r_num = r.num;
+ IntType r_den = r.den;
+
+ // Avoid overflow and preserve normalization
+ IntType gcd1 = integer::gcd(num, r_den);
+ IntType gcd2 = integer::gcd(r_num, den);
+ num = (num/gcd1) * (r_num/gcd2);
+ den = (den/gcd2) * (r_den/gcd1);
+ return *this;
+}
+
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR rational<IntType>& rational<IntType>::operator/= (const rational<IntType>& r)
+{
+ // Protect against self-modification
+ IntType r_num = r.num;
+ IntType r_den = r.den;
+
+ // Avoid repeated construction
+ IntType zero(0);
+
+ // Trap division by zero
+ if (r_num == zero)
+ BOOST_THROW_EXCEPTION(bad_rational());
+ if (num == zero)
+ return *this;
+
+ // Avoid overflow and preserve normalization
+ IntType gcd1 = integer::gcd(num, r_num);
+ IntType gcd2 = integer::gcd(r_den, den);
+ num = (num/gcd1) * (r_den/gcd2);
+ den = (den/gcd2) * (r_num/gcd1);
+
+ if (den < zero) {
+ num = -num;
+ den = -den;
+ }
+ return *this;
+}
+
+
+//
+// Non-member operators: previously these were provided by Boost.Operator, but these had a number of
+// drawbacks, most notably, that in order to allow inter-operability with IntType code such as this:
+//
+// rational<int> r(3);
+// assert(r == 3.5); // compiles and passes!!
+//
+// Happens to be allowed as well :-(
+//
+// There are three possible cases for each operator:
+// 1) rational op rational.
+// 2) rational op integer
+// 3) integer op rational
+// Cases (1) and (2) are folded into the one function.
+//
+template <class IntType, class Arg>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type
+ operator + (const rational<IntType>& a, const Arg& b)
+{
+ rational<IntType> t(a);
+ return t += b;
+}
+template <class Arg, class IntType>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type
+ operator + (const Arg& b, const rational<IntType>& a)
+{
+ rational<IntType> t(a);
+ return t += b;
+}
+
+template <class IntType, class Arg>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type
+ operator - (const rational<IntType>& a, const Arg& b)
+{
+ rational<IntType> t(a);
+ return t -= b;
+}
+template <class Arg, class IntType>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type
+ operator - (const Arg& b, const rational<IntType>& a)
+{
+ rational<IntType> t(a);
+ return -(t -= b);
+}
+
+template <class IntType, class Arg>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type
+ operator * (const rational<IntType>& a, const Arg& b)
+{
+ rational<IntType> t(a);
+ return t *= b;
+}
+template <class Arg, class IntType>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type
+ operator * (const Arg& b, const rational<IntType>& a)
+{
+ rational<IntType> t(a);
+ return t *= b;
+}
+
+template <class IntType, class Arg>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, rational<IntType> >::type
+ operator / (const rational<IntType>& a, const Arg& b)
+{
+ rational<IntType> t(a);
+ return t /= b;
+}
+template <class Arg, class IntType>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, rational<IntType> >::type
+ operator / (const Arg& b, const rational<IntType>& a)
+{
+ rational<IntType> t(b);
+ return t /= a;
+}
+
+template <class IntType, class Arg>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type
+ operator <= (const rational<IntType>& a, const Arg& b)
+{
+ return !(a > b);
+}
+template <class Arg, class IntType>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
+ operator <= (const Arg& b, const rational<IntType>& a)
+{
+ return a >= b;
+}
+
+template <class IntType, class Arg>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type
+ operator >= (const rational<IntType>& a, const Arg& b)
+{
+ return !(a < b);
+}
+template <class Arg, class IntType>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
+ operator >= (const Arg& b, const rational<IntType>& a)
+{
+ return a <= b;
+}
+
+template <class IntType, class Arg>
+BOOST_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value || is_same<rational<IntType>, Arg>::value, bool>::type
+ operator != (const rational<IntType>& a, const Arg& b)
+{
+ return !(a == b);
+}
+template <class Arg, class IntType>
+BOOST_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
+ operator != (const Arg& b, const rational<IntType>& a)
+{
+ return !(b == a);
+}
+
+template <class Arg, class IntType>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
+ operator < (const Arg& b, const rational<IntType>& a)
+{
+ return a > b;
+}
+template <class Arg, class IntType>
+BOOST_CXX14_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
+ operator > (const Arg& b, const rational<IntType>& a)
+{
+ return a < b;
+}
+template <class Arg, class IntType>
+BOOST_CONSTEXPR
+inline typename boost::enable_if_c <
+ rational_detail::is_compatible_integer<Arg, IntType>::value, bool>::type
+ operator == (const Arg& b, const rational<IntType>& a)
+{
+ return a == b;
+}
+
+// Comparison operators
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR
+bool rational<IntType>::operator< (const rational<IntType>& r) const
+{
+ // Avoid repeated construction
+ int_type const zero( 0 );
+
+ // This should really be a class-wide invariant. The reason for these
+ // checks is that for 2's complement systems, INT_MIN has no corresponding
+ // positive, so negating it during normalization keeps it INT_MIN, which
+ // is bad for later calculations that assume a positive denominator.
+ BOOST_ASSERT( this->den > zero );
+ BOOST_ASSERT( r.den > zero );
+
+ // Determine relative order by expanding each value to its simple continued
+ // fraction representation using the Euclidian GCD algorithm.
+ struct { int_type n, d, q, r; }
+ ts = { this->num, this->den, static_cast<int_type>(this->num / this->den),
+ static_cast<int_type>(this->num % this->den) },
+ rs = { r.num, r.den, static_cast<int_type>(r.num / r.den),
+ static_cast<int_type>(r.num % r.den) };
+ unsigned reverse = 0u;
+
+ // Normalize negative moduli by repeatedly adding the (positive) denominator
+ // and decrementing the quotient. Later cycles should have all positive
+ // values, so this only has to be done for the first cycle. (The rules of
+ // C++ require a nonnegative quotient & remainder for a nonnegative dividend
+ // & positive divisor.)
+ while ( ts.r < zero ) { ts.r += ts.d; --ts.q; }
+ while ( rs.r < zero ) { rs.r += rs.d; --rs.q; }
+
+ // Loop through and compare each variable's continued-fraction components
+ for ( ;; )
+ {
+ // The quotients of the current cycle are the continued-fraction
+ // components. Comparing two c.f. is comparing their sequences,
+ // stopping at the first difference.
+ if ( ts.q != rs.q )
+ {
+ // Since reciprocation changes the relative order of two variables,
+ // and c.f. use reciprocals, the less/greater-than test reverses
+ // after each index. (Start w/ non-reversed @ whole-number place.)
+ return reverse ? ts.q > rs.q : ts.q < rs.q;
+ }
+
+ // Prepare the next cycle
+ reverse ^= 1u;
+
+ if ( (ts.r == zero) || (rs.r == zero) )
+ {
+ // At least one variable's c.f. expansion has ended
+ break;
+ }
+
+ ts.n = ts.d; ts.d = ts.r;
+ ts.q = ts.n / ts.d; ts.r = ts.n % ts.d;
+ rs.n = rs.d; rs.d = rs.r;
+ rs.q = rs.n / rs.d; rs.r = rs.n % rs.d;
+ }
+
+ // Compare infinity-valued components for otherwise equal sequences
+ if ( ts.r == rs.r )
+ {
+ // Both remainders are zero, so the next (and subsequent) c.f.
+ // components for both sequences are infinity. Therefore, the sequences
+ // and their corresponding values are equal.
+ return false;
+ }
+ else
+ {
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4800)
+#endif
+ // Exactly one of the remainders is zero, so all following c.f.
+ // components of that variable are infinity, while the other variable
+ // has a finite next c.f. component. So that other variable has the
+ // lesser value (modulo the reversal flag!).
+ return ( ts.r != zero ) != static_cast<bool>( reverse );
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+ }
+}
+
+template <typename IntType>
+BOOST_CONSTEXPR
+inline bool rational<IntType>::operator== (const rational<IntType>& r) const
+{
+ return ((num == r.num) && (den == r.den));
+}
+
+// Invariant check
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR
+inline bool rational<IntType>::test_invariant() const
+{
+ return ( this->den > int_type(0) ) && ( integer::gcd(this->num, this->den) ==
+ int_type(1) );
+}
+
+// Normalisation
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR void rational<IntType>::normalize()
+{
+ // Avoid repeated construction
+ IntType zero(0);
+
+ if (den == zero)
+ BOOST_THROW_EXCEPTION(bad_rational());
+
+ // Handle the case of zero separately, to avoid division by zero
+ if (num == zero) {
+ den = IntType(1);
+ return;
+ }
+
+ IntType g = integer::gcd(num, den);
+
+ num /= g;
+ den /= g;
+
+ if (den < -(std::numeric_limits<IntType>::max)()) {
+ BOOST_THROW_EXCEPTION(bad_rational("bad rational: non-zero singular denominator"));
+ }
+
+ // Ensure that the denominator is positive
+ if (den < zero) {
+ num = -num;
+ den = -den;
+ }
+
+ BOOST_ASSERT( this->test_invariant() );
+}
+
+#ifndef BOOST_NO_IOSTREAM
+namespace detail {
+
+ // A utility class to reset the format flags for an istream at end
+ // of scope, even in case of exceptions
+ struct resetter {
+ resetter(std::istream& is) : is_(is), f_(is.flags()) {}
+ ~resetter() { is_.flags(f_); }
+ std::istream& is_;
+ std::istream::fmtflags f_; // old GNU c++ lib has no ios_base
+ };
+
+}
+
+// Input and output
+template <typename IntType>
+std::istream& operator>> (std::istream& is, rational<IntType>& r)
+{
+ using std::ios;
+
+ IntType n = IntType(0), d = IntType(1);
+ char c = 0;
+ detail::resetter sentry(is);
+
+ if ( is >> n )
+ {
+ if ( is.get(c) )
+ {
+ if ( c == '/' )
+ {
+ if ( is >> std::noskipws >> d )
+ try {
+ r.assign( n, d );
+ } catch ( bad_rational & ) { // normalization fail
+ try { is.setstate(ios::failbit); }
+ catch ( ... ) {} // don't throw ios_base::failure...
+ if ( is.exceptions() & ios::failbit )
+ throw; // ...but the original exception instead
+ // ELSE: suppress the exception, use just error flags
+ }
+ }
+ else
+ is.setstate( ios::failbit );
+ }
+ }
+
+ return is;
+}
+
+// Add manipulators for output format?
+template <typename IntType>
+std::ostream& operator<< (std::ostream& os, const rational<IntType>& r)
+{
+ // The slash directly precedes the denominator, which has no prefixes.
+ std::ostringstream ss;
+
+ ss.copyfmt( os );
+ ss.tie( NULL );
+ ss.exceptions( std::ios::goodbit );
+ ss.width( 0 );
+ ss << std::noshowpos << std::noshowbase << '/' << r.denominator();
+
+ // The numerator holds the showpos, internal, and showbase flags.
+ std::string const tail = ss.str();
+ std::streamsize const w =
+ os.width() - static_cast<std::streamsize>( tail.size() );
+
+ ss.clear();
+ ss.str( "" );
+ ss.flags( os.flags() );
+ ss << std::setw( w < 0 || (os.flags() & std::ios::adjustfield) !=
+ std::ios::internal ? 0 : w ) << r.numerator();
+ return os << ss.str() + tail;
+}
+#endif // BOOST_NO_IOSTREAM
+
+// Type conversion
+template <typename T, typename IntType>
+BOOST_CONSTEXPR
+inline T rational_cast(const rational<IntType>& src)
+{
+ return static_cast<T>(src.numerator())/static_cast<T>(src.denominator());
+}
+
+// Do not use any abs() defined on IntType - it isn't worth it, given the
+// difficulties involved (Koenig lookup required, there may not *be* an abs()
+// defined, etc etc).
+template <typename IntType>
+BOOST_CXX14_CONSTEXPR
+inline rational<IntType> abs(const rational<IntType>& r)
+{
+ return r.numerator() >= IntType(0)? r: -r;
+}
+
+namespace integer {
+
+template <typename IntType>
+struct gcd_evaluator< rational<IntType> >
+{
+ typedef rational<IntType> result_type,
+ first_argument_type, second_argument_type;
+ result_type operator() ( first_argument_type const &a
+ , second_argument_type const &b
+ ) const
+ {
+ return result_type(integer::gcd(a.numerator(), b.numerator()),
+ integer::lcm(a.denominator(), b.denominator()));
+ }
+};
+
+template <typename IntType>
+struct lcm_evaluator< rational<IntType> >
+{
+ typedef rational<IntType> result_type,
+ first_argument_type, second_argument_type;
+ result_type operator() ( first_argument_type const &a
+ , second_argument_type const &b
+ ) const
+ {
+ return result_type(integer::lcm(a.numerator(), b.numerator()),
+ integer::gcd(a.denominator(), b.denominator()));
+ }
+};
+
+} // namespace integer
+
+} // namespace boost
+
+#endif // BOOST_RATIONAL_HPP
diff --git a/src/third_party/boost-1.68.0/boost/ref.hpp b/src/third_party/boost-1.69.0/boost/ref.hpp
index 17b56ec0078..17b56ec0078 100644
--- a/src/third_party/boost-1.68.0/boost/ref.hpp
+++ b/src/third_party/boost-1.69.0/boost/ref.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex.hpp b/src/third_party/boost-1.69.0/boost/regex.hpp
index 6dc3dfbd427..6dc3dfbd427 100644
--- a/src/third_party/boost-1.68.0/boost/regex.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/config.hpp b/src/third_party/boost-1.69.0/boost/regex/config.hpp
new file mode 100644
index 00000000000..de817dbf1f2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/config.hpp
@@ -0,0 +1,487 @@
+/*
+ *
+ * Copyright (c) 1998-2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE config.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: regex extended config setup.
+ */
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#define BOOST_REGEX_CONFIG_HPP
+/*
+ * Borland C++ Fix/error check
+ * this has to go *before* we include any std lib headers:
+ */
+#if defined(__BORLANDC__)
+# include <boost/regex/config/borland.hpp>
+#endif
+#include <boost/version.hpp>
+
+/*****************************************************************************
+ *
+ * Include all the headers we need here:
+ *
+ ****************************************************************************/
+
+#ifdef __cplusplus
+
+# ifndef BOOST_REGEX_USER_CONFIG
+# define BOOST_REGEX_USER_CONFIG <boost/regex/user.hpp>
+# endif
+
+# include BOOST_REGEX_USER_CONFIG
+
+# include <boost/config.hpp>
+# include <boost/predef.h>
+
+#else
+ /*
+ * C build,
+ * don't include <boost/config.hpp> because that may
+ * do C++ specific things in future...
+ */
+# include <stdlib.h>
+# include <stddef.h>
+# ifdef _MSC_VER
+# define BOOST_MSVC _MSC_VER
+# endif
+#endif
+
+/*****************************************************************************
+ *
+ * Boilerplate regex config options:
+ *
+ ****************************************************************************/
+
+/* Obsolete macro, use BOOST_VERSION instead: */
+#define BOOST_RE_VERSION 320
+
+/* fix: */
+#if defined(_UNICODE) && !defined(UNICODE)
+#define UNICODE
+#endif
+
+
+/*
+* Define a macro for the namespace that details are placed in, this includes the Boost
+* version number to avoid mismatched header and library versions:
+*/
+#define BOOST_REGEX_DETAIL_NS BOOST_JOIN(re_detail_, BOOST_VERSION)
+
+/*
+ * Fix for gcc prior to 3.4: std::ctype<wchar_t> doesn't allow
+ * masks to be combined, for example:
+ * std::use_facet<std::ctype<wchar_t> >.is(std::ctype_base::lower|std::ctype_base::upper, L'a');
+ * returns *false*.
+ */
+#ifdef __GLIBCPP__
+# define BOOST_REGEX_BUGGY_CTYPE_FACET
+#endif
+
+/*
+ * Intel C++ before 8.0 ends up with unresolved externals unless we turn off
+ * extern template support:
+ */
+#if defined(BOOST_INTEL) && defined(__cplusplus) && (BOOST_INTEL <= 800)
+# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+#endif
+/*
+ * Visual C++ doesn't support external templates with C++ extensions turned off:
+ */
+#if defined(_MSC_VER) && !defined(_MSC_EXTENSIONS)
+# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+#endif
+ /*
+ * Oracle compiler in C++11 mode doesn't like external templates for some reason:
+ */
+#ifdef __SUNPRO_CC
+# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+#endif
+ /*
+ * Shared regex lib will crash without this, frankly it looks a lot like a gcc bug:
+ */
+#if defined(__MINGW32__)
+# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+#endif
+/*
+ * Clang fails to export template instances with -fvisibility=hidden, see
+ * https://github.com/boostorg/regex/issues/49
+ */
+#ifdef __clang__
+# define BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+#endif
+
+/*
+ * If there isn't good enough wide character support then there will
+ * be no wide character regular expressions:
+ */
+#if (defined(BOOST_NO_CWCHAR) || defined(BOOST_NO_CWCTYPE) || defined(BOOST_NO_STD_WSTRING))
+# if !defined(BOOST_NO_WREGEX)
+# define BOOST_NO_WREGEX
+# endif
+#else
+# if defined(__sgi) && (defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
+ /* STLPort on IRIX is misconfigured: <cwctype> does not compile
+ * as a temporary fix include <wctype.h> instead and prevent inclusion
+ * of STLPort version of <cwctype> */
+# include <wctype.h>
+# define __STLPORT_CWCTYPE
+# define _STLP_CWCTYPE
+# endif
+
+#ifdef __cplusplus
+# include <boost/regex/config/cwchar.hpp>
+#endif
+
+#endif
+
+/*
+ * If Win32 support has been disabled for boost in general, then
+ * it is for regex in particular:
+ */
+#if defined(BOOST_DISABLE_WIN32) && !defined(BOOST_REGEX_NO_W32)
+# define BOOST_REGEX_NO_W32
+#endif
+
+/* disable our own file-iterators and mapfiles if we can't
+ * support them: */
+#if defined(_WIN32)
+# if defined(BOOST_REGEX_NO_W32) || BOOST_PLAT_WINDOWS_RUNTIME
+# define BOOST_REGEX_NO_FILEITER
+# endif
+#else /* defined(_WIN32) */
+# if !defined(BOOST_HAS_DIRENT_H)
+# define BOOST_REGEX_NO_FILEITER
+# endif
+#endif
+
+/* backwards compatibitity: */
+#if defined(BOOST_RE_NO_LIB)
+# define BOOST_REGEX_NO_LIB
+#endif
+
+#if defined(__GNUC__) && !defined(_MSC_VER) && (defined(_WIN32) || defined(__CYGWIN__))
+/* gcc on win32 has problems if you include <windows.h>
+ (sporadically generates bad code). */
+# define BOOST_REGEX_NO_W32
+#endif
+#if defined(__COMO__) && !defined(BOOST_REGEX_NO_W32) && !defined(_MSC_EXTENSIONS)
+# define BOOST_REGEX_NO_W32
+#endif
+
+/*****************************************************************************
+ *
+ * Wide character workarounds:
+ *
+ ****************************************************************************/
+
+/*
+ * define BOOST_REGEX_HAS_OTHER_WCHAR_T when wchar_t is a native type, but the users
+ * code may be built with wchar_t as unsigned short: basically when we're building
+ * with MSVC and the /Zc:wchar_t option we place some extra unsigned short versions
+ * of the non-inline functions in the library, so that users can still link to the lib,
+ * irrespective of whether their own code is built with /Zc:wchar_t.
+ * Note that this does NOT WORK with VC10 and VC14 when the C++ locale is in effect as
+ * the locale's <unsigned short> facets simply do not compile in that case.
+ * As we default to the C++ locale when compiling for the windows runtime we
+ * skip in this case aswell.
+ */
+#if defined(__cplusplus) && \
+ (defined(BOOST_MSVC) || defined(__ICL)) && \
+ !defined(BOOST_NO_INTRINSIC_WCHAR_T) && \
+ defined(BOOST_WINDOWS) && \
+ !defined(__SGI_STL_PORT) && \
+ !defined(_STLPORT_VERSION) && \
+ !defined(BOOST_RWSTD_VER) && \
+ ((_MSC_VER < 1600) || !defined(BOOST_REGEX_USE_CPP_LOCALE)) && \
+ !BOOST_PLAT_WINDOWS_RUNTIME
+# define BOOST_REGEX_HAS_OTHER_WCHAR_T
+# ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4251)
+#if BOOST_MSVC < 1700
+# pragma warning(disable : 4231)
+#endif
+# if BOOST_MSVC < 1600
+# pragma warning(disable : 4660)
+# endif
+# endif
+# if defined(_DLL) && defined(BOOST_MSVC) && (BOOST_MSVC < 1600)
+# include <string>
+ extern template class __declspec(dllimport) std::basic_string<unsigned short>;
+# endif
+# ifdef BOOST_MSVC
+# pragma warning(pop)
+# endif
+#endif
+
+
+/*****************************************************************************
+ *
+ * Set up dll import/export options:
+ *
+ ****************************************************************************/
+
+#ifndef BOOST_SYMBOL_EXPORT
+# define BOOST_SYMBOL_EXPORT
+# define BOOST_SYMBOL_IMPORT
+#endif
+
+#if (defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)) && !defined(BOOST_REGEX_STATIC_LINK)
+# if defined(BOOST_REGEX_SOURCE)
+# define BOOST_REGEX_DECL BOOST_SYMBOL_EXPORT
+# define BOOST_REGEX_BUILD_DLL
+# else
+# define BOOST_REGEX_DECL BOOST_SYMBOL_IMPORT
+# endif
+#else
+# define BOOST_REGEX_DECL
+#endif
+
+#if !defined(BOOST_REGEX_NO_LIB) && !defined(BOOST_REGEX_SOURCE) && !defined(BOOST_ALL_NO_LIB) && defined(__cplusplus)
+# define BOOST_LIB_NAME boost_regex
+# if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
+# define BOOST_DYN_LINK
+# endif
+# ifdef BOOST_REGEX_DIAG
+# define BOOST_LIB_DIAGNOSTIC
+# endif
+# include <boost/config/auto_link.hpp>
+#endif
+
+/*****************************************************************************
+ *
+ * Set up function call type:
+ *
+ ****************************************************************************/
+
+#if defined(_MSC_VER) && defined(_MSC_EXTENSIONS)
+#if defined(_DEBUG) || defined(__MSVC_RUNTIME_CHECKS) || defined(_MANAGED) || defined(BOOST_REGEX_NO_FASTCALL)
+# define BOOST_REGEX_CALL __cdecl
+#else
+# define BOOST_REGEX_CALL __fastcall
+#endif
+# define BOOST_REGEX_CCALL __cdecl
+#endif
+
+#if defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32)
+# define BOOST_REGEX_CALL __fastcall
+# define BOOST_REGEX_CCALL __stdcall
+#endif
+
+#ifndef BOOST_REGEX_CALL
+# define BOOST_REGEX_CALL
+#endif
+#ifndef BOOST_REGEX_CCALL
+#define BOOST_REGEX_CCALL
+#endif
+
+/*****************************************************************************
+ *
+ * Set up localisation model:
+ *
+ ****************************************************************************/
+
+/* backwards compatibility: */
+#ifdef BOOST_RE_LOCALE_C
+# define BOOST_REGEX_USE_C_LOCALE
+#endif
+
+#ifdef BOOST_RE_LOCALE_CPP
+# define BOOST_REGEX_USE_CPP_LOCALE
+#endif
+
+#if defined(__CYGWIN__)
+# define BOOST_REGEX_USE_C_LOCALE
+#endif
+
+/* use C++ locale when targeting windows store */
+#if BOOST_PLAT_WINDOWS_RUNTIME
+# define BOOST_REGEX_USE_CPP_LOCALE
+# define BOOST_REGEX_NO_WIN32_LOCALE
+#endif
+
+/* Win32 defaults to native Win32 locale: */
+#if defined(_WIN32) && \
+ !defined(BOOST_REGEX_USE_WIN32_LOCALE) && \
+ !defined(BOOST_REGEX_USE_C_LOCALE) && \
+ !defined(BOOST_REGEX_USE_CPP_LOCALE) && \
+ !defined(BOOST_REGEX_NO_W32) && \
+ !defined(BOOST_REGEX_NO_WIN32_LOCALE)
+# define BOOST_REGEX_USE_WIN32_LOCALE
+#endif
+/* otherwise use C++ locale if supported: */
+#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE) && !defined(BOOST_NO_STD_LOCALE)
+# define BOOST_REGEX_USE_CPP_LOCALE
+#endif
+/* otherwise use C+ locale: */
+#if !defined(BOOST_REGEX_USE_WIN32_LOCALE) && !defined(BOOST_REGEX_USE_C_LOCALE) && !defined(BOOST_REGEX_USE_CPP_LOCALE)
+# define BOOST_REGEX_USE_C_LOCALE
+#endif
+
+#ifndef BOOST_REGEX_MAX_STATE_COUNT
+# define BOOST_REGEX_MAX_STATE_COUNT 100000000
+#endif
+
+
+/*****************************************************************************
+ *
+ * Error Handling for exception free compilers:
+ *
+ ****************************************************************************/
+
+#ifdef BOOST_NO_EXCEPTIONS
+/*
+ * If there are no exceptions then we must report critical-errors
+ * the only way we know how; by terminating.
+ */
+#include <stdexcept>
+#include <string>
+#include <boost/throw_exception.hpp>
+
+# define BOOST_REGEX_NOEH_ASSERT(x)\
+if(0 == (x))\
+{\
+ std::string s("Error: critical regex++ failure in: ");\
+ s.append(#x);\
+ std::runtime_error e(s);\
+ boost::throw_exception(e);\
+}
+#else
+/*
+ * With exceptions then error handling is taken care of and
+ * there is no need for these checks:
+ */
+# define BOOST_REGEX_NOEH_ASSERT(x)
+#endif
+
+
+/*****************************************************************************
+ *
+ * Stack protection under MS Windows:
+ *
+ ****************************************************************************/
+
+#if !defined(BOOST_REGEX_NO_W32) && !defined(BOOST_REGEX_V3)
+# if(defined(_WIN32) || defined(_WIN64) || defined(_WINCE)) \
+ && !defined(__GNUC__) \
+ && !(defined(__BORLANDC__) && (__BORLANDC__ >= 0x600)) \
+ && !(defined(__MWERKS__) && (__MWERKS__ <= 0x3003))
+# define BOOST_REGEX_HAS_MS_STACK_GUARD
+# endif
+#elif defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
+# undef BOOST_REGEX_HAS_MS_STACK_GUARD
+#endif
+
+#if defined(__cplusplus) && defined(BOOST_REGEX_HAS_MS_STACK_GUARD)
+
+namespace boost{
+namespace BOOST_REGEX_DETAIL_NS{
+
+BOOST_REGEX_DECL void BOOST_REGEX_CALL reset_stack_guard_page();
+
+}
+}
+
+#endif
+
+
+/*****************************************************************************
+ *
+ * Algorithm selection and configuration:
+ *
+ ****************************************************************************/
+
+#if !defined(BOOST_REGEX_RECURSIVE) && !defined(BOOST_REGEX_NON_RECURSIVE)
+# if defined(BOOST_REGEX_HAS_MS_STACK_GUARD) && !defined(_STLP_DEBUG) && !defined(__STL_DEBUG) && !(defined(_MSC_VER) && (_MSC_VER >= 1400))
+# define BOOST_REGEX_RECURSIVE
+# else
+# define BOOST_REGEX_NON_RECURSIVE
+# endif
+#endif
+
+#ifdef BOOST_REGEX_NON_RECURSIVE
+# ifdef BOOST_REGEX_RECURSIVE
+# error "Can't set both BOOST_REGEX_RECURSIVE and BOOST_REGEX_NON_RECURSIVE"
+# endif
+# ifndef BOOST_REGEX_BLOCKSIZE
+# define BOOST_REGEX_BLOCKSIZE 4096
+# endif
+# if BOOST_REGEX_BLOCKSIZE < 512
+# error "BOOST_REGEX_BLOCKSIZE must be at least 512"
+# endif
+# ifndef BOOST_REGEX_MAX_BLOCKS
+# define BOOST_REGEX_MAX_BLOCKS 1024
+# endif
+# ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
+# undef BOOST_REGEX_HAS_MS_STACK_GUARD
+# endif
+# ifndef BOOST_REGEX_MAX_CACHE_BLOCKS
+# define BOOST_REGEX_MAX_CACHE_BLOCKS 16
+# endif
+#endif
+
+
+/*****************************************************************************
+ *
+ * helper memory allocation functions:
+ *
+ ****************************************************************************/
+
+#if defined(__cplusplus) && defined(BOOST_REGEX_NON_RECURSIVE)
+namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
+
+BOOST_REGEX_DECL void* BOOST_REGEX_CALL get_mem_block();
+BOOST_REGEX_DECL void BOOST_REGEX_CALL put_mem_block(void*);
+
+}} /* namespaces */
+#endif
+
+/*****************************************************************************
+ *
+ * Diagnostics:
+ *
+ ****************************************************************************/
+
+#ifdef BOOST_REGEX_CONFIG_INFO
+BOOST_REGEX_DECL void BOOST_REGEX_CALL print_regex_library_info();
+#endif
+
+#if defined(BOOST_REGEX_DIAG)
+# pragma message ("BOOST_REGEX_DECL" BOOST_STRINGIZE(=BOOST_REGEX_DECL))
+# pragma message ("BOOST_REGEX_CALL" BOOST_STRINGIZE(=BOOST_REGEX_CALL))
+# pragma message ("BOOST_REGEX_CCALL" BOOST_STRINGIZE(=BOOST_REGEX_CCALL))
+#ifdef BOOST_REGEX_USE_C_LOCALE
+# pragma message ("Using C locale in regex traits class")
+#elif BOOST_REGEX_USE_CPP_LOCALE
+# pragma message ("Using C++ locale in regex traits class")
+#else
+# pragma message ("Using Win32 locale in regex traits class")
+#endif
+#if defined(BOOST_REGEX_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
+# pragma message ("Dynamic linking enabled")
+#endif
+#if defined(BOOST_REGEX_NO_LIB) || defined(BOOST_ALL_NO_LIB)
+# pragma message ("Auto-linking disabled")
+#endif
+#ifdef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+# pragma message ("Extern templates disabled")
+#endif
+
+#endif
+
+#endif
+
+
+
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/config/borland.hpp b/src/third_party/boost-1.69.0/boost/regex/config/borland.hpp
index 51c2126b8ec..51c2126b8ec 100644
--- a/src/third_party/boost-1.68.0/boost/regex/config/borland.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/config/borland.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/config/cwchar.hpp b/src/third_party/boost-1.69.0/boost/regex/config/cwchar.hpp
index a55089d0ab4..a55089d0ab4 100644
--- a/src/third_party/boost-1.68.0/boost/regex/config/cwchar.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/config/cwchar.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/icu.hpp b/src/third_party/boost-1.69.0/boost/regex/icu.hpp
new file mode 100644
index 00000000000..1bf71cb4e3d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/icu.hpp
@@ -0,0 +1,1069 @@
+/*
+ *
+ * Copyright (c) 2004
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE icu.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Unicode regular expressions on top of the ICU Library.
+ */
+
+#ifndef BOOST_REGEX_ICU_HPP
+#define BOOST_REGEX_ICU_HPP
+
+#include <boost/config.hpp>
+#include <unicode/utypes.h>
+#include <unicode/uchar.h>
+#include <unicode/coll.h>
+#include <boost/regex.hpp>
+#include <boost/regex/pending/unicode_iterator.hpp>
+#include <boost/mpl/int_fwd.hpp>
+#include <boost/static_assert.hpp>
+#include <bitset>
+
+#ifdef BOOST_MSVC
+#pragma warning (push)
+#pragma warning (disable: 4251)
+#endif
+
+namespace boost{
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+//
+// Implementation details:
+//
+class BOOST_REGEX_DECL icu_regex_traits_implementation
+{
+ typedef UChar32 char_type;
+ typedef std::size_t size_type;
+ typedef std::vector<char_type> string_type;
+ typedef U_NAMESPACE_QUALIFIER Locale locale_type;
+ typedef boost::uint_least32_t char_class_type;
+public:
+ icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& l)
+ : m_locale(l)
+ {
+ UErrorCode success = U_ZERO_ERROR;
+ m_collator.reset(U_NAMESPACE_QUALIFIER Collator::createInstance(l, success));
+ if(U_SUCCESS(success) == 0)
+ init_error();
+ m_collator->setStrength(U_NAMESPACE_QUALIFIER Collator::IDENTICAL);
+ success = U_ZERO_ERROR;
+ m_primary_collator.reset(U_NAMESPACE_QUALIFIER Collator::createInstance(l, success));
+ if(U_SUCCESS(success) == 0)
+ init_error();
+ m_primary_collator->setStrength(U_NAMESPACE_QUALIFIER Collator::PRIMARY);
+ }
+ U_NAMESPACE_QUALIFIER Locale getloc()const
+ {
+ return m_locale;
+ }
+ string_type do_transform(const char_type* p1, const char_type* p2, const U_NAMESPACE_QUALIFIER Collator* pcoll) const;
+ string_type transform(const char_type* p1, const char_type* p2) const
+ {
+ return do_transform(p1, p2, m_collator.get());
+ }
+ string_type transform_primary(const char_type* p1, const char_type* p2) const
+ {
+ return do_transform(p1, p2, m_primary_collator.get());
+ }
+private:
+ void init_error()
+ {
+ std::runtime_error e("Could not initialize ICU resources");
+ boost::throw_exception(e);
+ }
+ U_NAMESPACE_QUALIFIER Locale m_locale; // The ICU locale that we're using
+ boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_collator; // The full collation object
+ boost::scoped_ptr< U_NAMESPACE_QUALIFIER Collator> m_primary_collator; // The primary collation object
+};
+
+inline boost::shared_ptr<icu_regex_traits_implementation> get_icu_regex_traits_implementation(const U_NAMESPACE_QUALIFIER Locale& loc)
+{
+ return boost::shared_ptr<icu_regex_traits_implementation>(new icu_regex_traits_implementation(loc));
+}
+
+}
+
+class BOOST_REGEX_DECL icu_regex_traits
+{
+public:
+ typedef UChar32 char_type;
+ typedef std::size_t size_type;
+ typedef std::vector<char_type> string_type;
+ typedef U_NAMESPACE_QUALIFIER Locale locale_type;
+#ifdef BOOST_NO_INT64_T
+ typedef std::bitset<64> char_class_type;
+#else
+ typedef boost::uint64_t char_class_type;
+#endif
+
+ struct boost_extensions_tag{};
+
+ icu_regex_traits()
+ : m_pimpl(BOOST_REGEX_DETAIL_NS::get_icu_regex_traits_implementation(U_NAMESPACE_QUALIFIER Locale()))
+ {
+ }
+ static size_type length(const char_type* p);
+
+ ::boost::regex_constants::syntax_type syntax_type(char_type c)const
+ {
+ return ((c < 0x7f) && (c > 0)) ? BOOST_REGEX_DETAIL_NS::get_default_syntax_type(static_cast<char>(c)) : regex_constants::syntax_char;
+ }
+ ::boost::regex_constants::escape_syntax_type escape_syntax_type(char_type c) const
+ {
+ return ((c < 0x7f) && (c > 0)) ? BOOST_REGEX_DETAIL_NS::get_default_escape_syntax_type(static_cast<char>(c)) : regex_constants::syntax_char;
+ }
+ char_type translate(char_type c) const
+ {
+ return c;
+ }
+ char_type translate_nocase(char_type c) const
+ {
+ return ::u_tolower(c);
+ }
+ char_type translate(char_type c, bool icase) const
+ {
+ return icase ? translate_nocase(c) : translate(c);
+ }
+ char_type tolower(char_type c) const
+ {
+ return ::u_tolower(c);
+ }
+ char_type toupper(char_type c) const
+ {
+ return ::u_toupper(c);
+ }
+ string_type transform(const char_type* p1, const char_type* p2) const
+ {
+ return m_pimpl->transform(p1, p2);
+ }
+ string_type transform_primary(const char_type* p1, const char_type* p2) const
+ {
+ return m_pimpl->transform_primary(p1, p2);
+ }
+ char_class_type lookup_classname(const char_type* p1, const char_type* p2) const;
+ string_type lookup_collatename(const char_type* p1, const char_type* p2) const;
+ bool isctype(char_type c, char_class_type f) const;
+ boost::intmax_t toi(const char_type*& p1, const char_type* p2, int radix)const
+ {
+ return BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
+ }
+ int value(char_type c, int radix)const
+ {
+ return u_digit(c, static_cast< ::int8_t>(radix));
+ }
+ locale_type imbue(locale_type l)
+ {
+ locale_type result(m_pimpl->getloc());
+ m_pimpl = BOOST_REGEX_DETAIL_NS::get_icu_regex_traits_implementation(l);
+ return result;
+ }
+ locale_type getloc()const
+ {
+ return locale_type();
+ }
+ std::string error_string(::boost::regex_constants::error_type n) const
+ {
+ return BOOST_REGEX_DETAIL_NS::get_default_error_string(n);
+ }
+private:
+ icu_regex_traits(const icu_regex_traits&);
+ icu_regex_traits& operator=(const icu_regex_traits&);
+
+ //
+ // define the bitmasks offsets we need for additional character properties:
+ //
+ enum{
+ offset_blank = U_CHAR_CATEGORY_COUNT,
+ offset_space = U_CHAR_CATEGORY_COUNT+1,
+ offset_xdigit = U_CHAR_CATEGORY_COUNT+2,
+ offset_underscore = U_CHAR_CATEGORY_COUNT+3,
+ offset_unicode = U_CHAR_CATEGORY_COUNT+4,
+ offset_any = U_CHAR_CATEGORY_COUNT+5,
+ offset_ascii = U_CHAR_CATEGORY_COUNT+6,
+ offset_horizontal = U_CHAR_CATEGORY_COUNT+7,
+ offset_vertical = U_CHAR_CATEGORY_COUNT+8
+ };
+
+ //
+ // and now the masks:
+ //
+ static const char_class_type mask_blank;
+ static const char_class_type mask_space;
+ static const char_class_type mask_xdigit;
+ static const char_class_type mask_underscore;
+ static const char_class_type mask_unicode;
+ static const char_class_type mask_any;
+ static const char_class_type mask_ascii;
+ static const char_class_type mask_horizontal;
+ static const char_class_type mask_vertical;
+
+ static char_class_type lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2);
+
+ boost::shared_ptr< ::boost::BOOST_REGEX_DETAIL_NS::icu_regex_traits_implementation> m_pimpl;
+};
+
+} // namespace boost
+
+//
+// template instances:
+//
+#define BOOST_REGEX_CHAR_T UChar32
+#undef BOOST_REGEX_TRAITS_T
+#define BOOST_REGEX_TRAITS_T , icu_regex_traits
+#define BOOST_REGEX_ICU_INSTANCES
+#ifdef BOOST_REGEX_ICU_INSTANTIATE
+# define BOOST_REGEX_INSTANTIATE
+#endif
+#include <boost/regex/v4/instances.hpp>
+#undef BOOST_REGEX_CHAR_T
+#undef BOOST_REGEX_TRAITS_T
+#undef BOOST_REGEX_ICU_INSTANCES
+#ifdef BOOST_REGEX_INSTANTIATE
+# undef BOOST_REGEX_INSTANTIATE
+#endif
+
+namespace boost{
+
+// types:
+typedef basic_regex< ::UChar32, icu_regex_traits> u32regex;
+typedef match_results<const ::UChar32*> u32match;
+typedef match_results<const ::UChar*> u16match;
+
+//
+// Construction of 32-bit regex types from UTF-8 and UTF-16 primitives:
+//
+namespace BOOST_REGEX_DETAIL_NS{
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATES) && !defined(__IBMCPP__)
+template <class InputIterator>
+inline u32regex do_make_u32regex(InputIterator i,
+ InputIterator j,
+ boost::regex_constants::syntax_option_type opt,
+ const boost::mpl::int_<1>*)
+{
+ typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
+ return u32regex(conv_type(i, i, j), conv_type(j, i, j), opt);
+}
+
+template <class InputIterator>
+inline u32regex do_make_u32regex(InputIterator i,
+ InputIterator j,
+ boost::regex_constants::syntax_option_type opt,
+ const boost::mpl::int_<2>*)
+{
+ typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
+ return u32regex(conv_type(i, i, j), conv_type(j, i, j), opt);
+}
+
+template <class InputIterator>
+inline u32regex do_make_u32regex(InputIterator i,
+ InputIterator j,
+ boost::regex_constants::syntax_option_type opt,
+ const boost::mpl::int_<4>*)
+{
+ return u32regex(i, j, opt);
+}
+#else
+template <class InputIterator>
+inline u32regex do_make_u32regex(InputIterator i,
+ InputIterator j,
+ boost::regex_constants::syntax_option_type opt,
+ const boost::mpl::int_<1>*)
+{
+ typedef boost::u8_to_u32_iterator<InputIterator, UChar32> conv_type;
+ typedef std::vector<UChar32> vector_type;
+ vector_type v;
+ conv_type a(i, i, j), b(j, i, j);
+ while(a != b)
+ {
+ v.push_back(*a);
+ ++a;
+ }
+ if(v.size())
+ return u32regex(&*v.begin(), v.size(), opt);
+ return u32regex(static_cast<UChar32 const*>(0), static_cast<u32regex::size_type>(0), opt);
+}
+
+template <class InputIterator>
+inline u32regex do_make_u32regex(InputIterator i,
+ InputIterator j,
+ boost::regex_constants::syntax_option_type opt,
+ const boost::mpl::int_<2>*)
+{
+ typedef boost::u16_to_u32_iterator<InputIterator, UChar32> conv_type;
+ typedef std::vector<UChar32> vector_type;
+ vector_type v;
+ conv_type a(i, i, j), b(j, i, j);
+ while(a != b)
+ {
+ v.push_back(*a);
+ ++a;
+ }
+ if(v.size())
+ return u32regex(&*v.begin(), v.size(), opt);
+ return u32regex(static_cast<UChar32 const*>(0), static_cast<u32regex::size_type>(0), opt);
+}
+
+template <class InputIterator>
+inline u32regex do_make_u32regex(InputIterator i,
+ InputIterator j,
+ boost::regex_constants::syntax_option_type opt,
+ const boost::mpl::int_<4>*)
+{
+ typedef std::vector<UChar32> vector_type;
+ vector_type v;
+ while(i != j)
+ {
+ v.push_back((UChar32)(*i));
+ ++i;
+ }
+ if(v.size())
+ return u32regex(&*v.begin(), v.size(), opt);
+ return u32regex(static_cast<UChar32 const*>(0), static_cast<u32regex::size_type>(0), opt);
+}
+#endif
+}
+
+// BOOST_REGEX_UCHAR_IS_WCHAR_T
+//
+// Source inspection of unicode/umachine.h in ICU version 59 indicates that:
+//
+// On version 59, UChar is always char16_t in C++ mode (and uint16_t in C mode)
+//
+// On earlier versions, the logic is
+//
+// #if U_SIZEOF_WCHAR_T==2
+// typedef wchar_t OldUChar;
+// #elif defined(__CHAR16_TYPE__)
+// typedef __CHAR16_TYPE__ OldUChar;
+// #else
+// typedef uint16_t OldUChar;
+// #endif
+//
+// That is, UChar is wchar_t only on versions below 59, when U_SIZEOF_WCHAR_T==2
+//
+// Hence,
+
+#define BOOST_REGEX_UCHAR_IS_WCHAR_T (U_ICU_VERSION_MAJOR_NUM < 59 && U_SIZEOF_WCHAR_T == 2)
+
+#if BOOST_REGEX_UCHAR_IS_WCHAR_T
+ BOOST_STATIC_ASSERT((boost::is_same<UChar, wchar_t>::value));
+#else
+ BOOST_STATIC_ASSERT(!(boost::is_same<UChar, wchar_t>::value));
+#endif
+
+//
+// Construction from an iterator pair:
+//
+template <class InputIterator>
+inline u32regex make_u32regex(InputIterator i,
+ InputIterator j,
+ boost::regex_constants::syntax_option_type opt)
+{
+ return BOOST_REGEX_DETAIL_NS::do_make_u32regex(i, j, opt, static_cast<boost::mpl::int_<sizeof(*i)> const*>(0));
+}
+//
+// construction from UTF-8 nul-terminated strings:
+//
+inline u32regex make_u32regex(const char* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
+{
+ return BOOST_REGEX_DETAIL_NS::do_make_u32regex(p, p + std::strlen(p), opt, static_cast<boost::mpl::int_<1> const*>(0));
+}
+inline u32regex make_u32regex(const unsigned char* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
+{
+ return BOOST_REGEX_DETAIL_NS::do_make_u32regex(p, p + std::strlen(reinterpret_cast<const char*>(p)), opt, static_cast<boost::mpl::int_<1> const*>(0));
+}
+//
+// construction from UTF-16 nul-terminated strings:
+//
+#ifndef BOOST_NO_WREGEX
+inline u32regex make_u32regex(const wchar_t* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
+{
+ return BOOST_REGEX_DETAIL_NS::do_make_u32regex(p, p + std::wcslen(p), opt, static_cast<boost::mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+#if !BOOST_REGEX_UCHAR_IS_WCHAR_T
+inline u32regex make_u32regex(const UChar* p, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
+{
+ return BOOST_REGEX_DETAIL_NS::do_make_u32regex(p, p + u_strlen(p), opt, static_cast<boost::mpl::int_<2> const*>(0));
+}
+#endif
+//
+// construction from basic_string class-template:
+//
+template<class C, class T, class A>
+inline u32regex make_u32regex(const std::basic_string<C, T, A>& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
+{
+ return BOOST_REGEX_DETAIL_NS::do_make_u32regex(s.begin(), s.end(), opt, static_cast<boost::mpl::int_<sizeof(C)> const*>(0));
+}
+//
+// Construction from ICU string type:
+//
+inline u32regex make_u32regex(const U_NAMESPACE_QUALIFIER UnicodeString& s, boost::regex_constants::syntax_option_type opt = boost::regex_constants::perl)
+{
+ return BOOST_REGEX_DETAIL_NS::do_make_u32regex(s.getBuffer(), s.getBuffer() + s.length(), opt, static_cast<boost::mpl::int_<2> const*>(0));
+}
+
+//
+// regex_match overloads that widen the character type as appropriate:
+//
+namespace BOOST_REGEX_DETAIL_NS{
+template<class MR1, class MR2, class NSubs>
+void copy_results(MR1& out, MR2 const& in, NSubs named_subs)
+{
+ // copy results from an adapted MR2 match_results:
+ out.set_size(in.size(), in.prefix().first.base(), in.suffix().second.base());
+ out.set_base(in.base().base());
+ out.set_named_subs(named_subs);
+ for(int i = 0; i < (int)in.size(); ++i)
+ {
+ if(in[i].matched || !i)
+ {
+ out.set_first(in[i].first.base(), i);
+ out.set_second(in[i].second.base(), i, in[i].matched);
+ }
+ }
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ // Copy full capture info as well:
+ for(int i = 0; i < (int)in.size(); ++i)
+ {
+ if(in[i].captures().size())
+ {
+ out[i].get_captures().assign(in[i].captures().size(), typename MR1::value_type());
+ for(int j = 0; j < (int)out[i].captures().size(); ++j)
+ {
+ out[i].get_captures()[j].first = in[i].captures()[j].first.base();
+ out[i].get_captures()[j].second = in[i].captures()[j].second.base();
+ out[i].get_captures()[j].matched = in[i].captures()[j].matched;
+ }
+ }
+ }
+#endif
+}
+
+template <class BidiIterator, class Allocator>
+inline bool do_regex_match(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags,
+ boost::mpl::int_<4> const*)
+{
+ return ::boost::regex_match(first, last, m, e, flags);
+}
+template <class BidiIterator, class Allocator>
+bool do_regex_match(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags,
+ boost::mpl::int_<2> const*)
+{
+ typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
+ typedef match_results<conv_type> match_type;
+ //typedef typename match_type::allocator_type alloc_type;
+ match_type what;
+ bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
+ // copy results across to m:
+ if(result) copy_results(m, what, e.get_named_subs());
+ return result;
+}
+template <class BidiIterator, class Allocator>
+bool do_regex_match(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags,
+ boost::mpl::int_<1> const*)
+{
+ typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
+ typedef match_results<conv_type> match_type;
+ //typedef typename match_type::allocator_type alloc_type;
+ match_type what;
+ bool result = ::boost::regex_match(conv_type(first, first, last), conv_type(last, first, last), what, e, flags);
+ // copy results across to m:
+ if(result) copy_results(m, what, e.get_named_subs());
+ return result;
+}
+} // namespace BOOST_REGEX_DETAIL_NS
+
+template <class BidiIterator, class Allocator>
+inline bool u32regex_match(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
+}
+inline bool u32regex_match(const UChar* p,
+ match_results<const UChar*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
+}
+#if !BOOST_REGEX_UCHAR_IS_WCHAR_T && !defined(BOOST_NO_WREGEX)
+inline bool u32regex_match(const wchar_t* p,
+ match_results<const wchar_t*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+inline bool u32regex_match(const char* p,
+ match_results<const char*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
+}
+inline bool u32regex_match(const unsigned char* p,
+ match_results<const unsigned char*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
+}
+inline bool u32regex_match(const std::string& s,
+ match_results<std::string::const_iterator>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
+}
+#ifndef BOOST_NO_STD_WSTRING
+inline bool u32regex_match(const std::wstring& s,
+ match_results<std::wstring::const_iterator>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+ match_results<const UChar*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+//
+// regex_match overloads that do not return what matched:
+//
+template <class BidiIterator>
+inline bool u32regex_match(BidiIterator first, BidiIterator last,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<BidiIterator> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(first, last, m, e, flags, static_cast<mpl::int_<sizeof(*first)> const*>(0));
+}
+inline bool u32regex_match(const UChar* p,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const UChar*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+u_strlen(p), m, e, flags, static_cast<mpl::int_<2> const*>(0));
+}
+#if !BOOST_REGEX_UCHAR_IS_WCHAR_T && !defined(BOOST_NO_WREGEX)
+inline bool u32regex_match(const wchar_t* p,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const wchar_t*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::wcslen(p), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+inline bool u32regex_match(const char* p,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const char*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen(p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
+}
+inline bool u32regex_match(const unsigned char* p,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const unsigned char*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(p, p+std::strlen((const char*)p), m, e, flags, static_cast<mpl::int_<1> const*>(0));
+}
+inline bool u32regex_match(const std::string& s,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<std::string::const_iterator> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<1> const*>(0));
+}
+#ifndef BOOST_NO_STD_WSTRING
+inline bool u32regex_match(const std::wstring& s,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<std::wstring::const_iterator> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(s.begin(), s.end(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+inline bool u32regex_match(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const UChar*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_match(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+
+//
+// regex_search overloads that widen the character type as appropriate:
+//
+namespace BOOST_REGEX_DETAIL_NS{
+template <class BidiIterator, class Allocator>
+inline bool do_regex_search(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags,
+ BidiIterator base,
+ boost::mpl::int_<4> const*)
+{
+ return ::boost::regex_search(first, last, m, e, flags, base);
+}
+template <class BidiIterator, class Allocator>
+bool do_regex_search(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags,
+ BidiIterator base,
+ boost::mpl::int_<2> const*)
+{
+ typedef u16_to_u32_iterator<BidiIterator, UChar32> conv_type;
+ typedef match_results<conv_type> match_type;
+ //typedef typename match_type::allocator_type alloc_type;
+ match_type what;
+ bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
+ // copy results across to m:
+ if(result) copy_results(m, what, e.get_named_subs());
+ return result;
+}
+template <class BidiIterator, class Allocator>
+bool do_regex_search(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags,
+ BidiIterator base,
+ boost::mpl::int_<1> const*)
+{
+ typedef u8_to_u32_iterator<BidiIterator, UChar32> conv_type;
+ typedef match_results<conv_type> match_type;
+ //typedef typename match_type::allocator_type alloc_type;
+ match_type what;
+ bool result = ::boost::regex_search(conv_type(first, first, last), conv_type(last, first, last), what, e, flags, conv_type(base));
+ // copy results across to m:
+ if(result) copy_results(m, what, e.get_named_subs());
+ return result;
+}
+}
+
+template <class BidiIterator, class Allocator>
+inline bool u32regex_search(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, first, static_cast<mpl::int_<sizeof(*first)> const*>(0));
+}
+template <class BidiIterator, class Allocator>
+inline bool u32regex_search(BidiIterator first, BidiIterator last,
+ match_results<BidiIterator, Allocator>& m,
+ const u32regex& e,
+ match_flag_type flags,
+ BidiIterator base)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, base, static_cast<mpl::int_<sizeof(*first)> const*>(0));
+}
+inline bool u32regex_search(const UChar* p,
+ match_results<const UChar*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0));
+}
+#if !BOOST_REGEX_UCHAR_IS_WCHAR_T && !defined(BOOST_NO_WREGEX)
+inline bool u32regex_search(const wchar_t* p,
+ match_results<const wchar_t*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+inline bool u32regex_search(const char* p,
+ match_results<const char*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
+}
+inline bool u32regex_search(const unsigned char* p,
+ match_results<const unsigned char*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
+}
+inline bool u32regex_search(const std::string& s,
+ match_results<std::string::const_iterator>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<1> const*>(0));
+}
+#ifndef BOOST_NO_STD_WSTRING
+inline bool u32regex_search(const std::wstring& s,
+ match_results<std::wstring::const_iterator>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+ match_results<const UChar*>& m,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, s.getBuffer(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+template <class BidiIterator>
+inline bool u32regex_search(BidiIterator first, BidiIterator last,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<BidiIterator> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(first, last, m, e, flags, first, static_cast<mpl::int_<sizeof(*first)> const*>(0));
+}
+inline bool u32regex_search(const UChar* p,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const UChar*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+u_strlen(p), m, e, flags, p, static_cast<mpl::int_<2> const*>(0));
+}
+#if !BOOST_REGEX_UCHAR_IS_WCHAR_T && !defined(BOOST_NO_WREGEX)
+inline bool u32regex_search(const wchar_t* p,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const wchar_t*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::wcslen(p), m, e, flags, p, static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+inline bool u32regex_search(const char* p,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const char*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen(p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
+}
+inline bool u32regex_search(const unsigned char* p,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const unsigned char*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(p, p+std::strlen((const char*)p), m, e, flags, p, static_cast<mpl::int_<1> const*>(0));
+}
+inline bool u32regex_search(const std::string& s,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<std::string::const_iterator> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<1> const*>(0));
+}
+#ifndef BOOST_NO_STD_WSTRING
+inline bool u32regex_search(const std::wstring& s,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<std::wstring::const_iterator> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(s.begin(), s.end(), m, e, flags, s.begin(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+#endif
+inline bool u32regex_search(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+ const u32regex& e,
+ match_flag_type flags = match_default)
+{
+ match_results<const UChar*> m;
+ return BOOST_REGEX_DETAIL_NS::do_regex_search(s.getBuffer(), s.getBuffer() + s.length(), m, e, flags, s.getBuffer(), static_cast<mpl::int_<sizeof(wchar_t)> const*>(0));
+}
+
+//
+// overloads for regex_replace with utf-8 and utf-16 data types:
+//
+namespace BOOST_REGEX_DETAIL_NS{
+template <class I>
+inline std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >
+ make_utf32_seq(I i, I j, mpl::int_<1> const*)
+{
+ return std::pair< boost::u8_to_u32_iterator<I>, boost::u8_to_u32_iterator<I> >(boost::u8_to_u32_iterator<I>(i, i, j), boost::u8_to_u32_iterator<I>(j, i, j));
+}
+template <class I>
+inline std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >
+ make_utf32_seq(I i, I j, mpl::int_<2> const*)
+{
+ return std::pair< boost::u16_to_u32_iterator<I>, boost::u16_to_u32_iterator<I> >(boost::u16_to_u32_iterator<I>(i, i, j), boost::u16_to_u32_iterator<I>(j, i, j));
+}
+template <class I>
+inline std::pair< I, I >
+ make_utf32_seq(I i, I j, mpl::int_<4> const*)
+{
+ return std::pair< I, I >(i, j);
+}
+template <class charT>
+inline std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >
+ make_utf32_seq(const charT* p, mpl::int_<1> const*)
+{
+ std::size_t len = std::strlen((const char*)p);
+ return std::pair< boost::u8_to_u32_iterator<const charT*>, boost::u8_to_u32_iterator<const charT*> >(boost::u8_to_u32_iterator<const charT*>(p, p, p+len), boost::u8_to_u32_iterator<const charT*>(p+len, p, p+len));
+}
+template <class charT>
+inline std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >
+ make_utf32_seq(const charT* p, mpl::int_<2> const*)
+{
+ std::size_t len = u_strlen((const UChar*)p);
+ return std::pair< boost::u16_to_u32_iterator<const charT*>, boost::u16_to_u32_iterator<const charT*> >(boost::u16_to_u32_iterator<const charT*>(p, p, p + len), boost::u16_to_u32_iterator<const charT*>(p+len, p, p + len));
+}
+template <class charT>
+inline std::pair< const charT*, const charT* >
+ make_utf32_seq(const charT* p, mpl::int_<4> const*)
+{
+ return std::pair< const charT*, const charT* >(p, p+icu_regex_traits::length((UChar32 const*)p));
+}
+template <class OutputIterator>
+inline OutputIterator make_utf32_out(OutputIterator o, mpl::int_<4> const*)
+{
+ return o;
+}
+template <class OutputIterator>
+inline utf16_output_iterator<OutputIterator> make_utf32_out(OutputIterator o, mpl::int_<2> const*)
+{
+ return o;
+}
+template <class OutputIterator>
+inline utf8_output_iterator<OutputIterator> make_utf32_out(OutputIterator o, mpl::int_<1> const*)
+{
+ return o;
+}
+
+template <class OutputIterator, class I1, class I2>
+OutputIterator do_regex_replace(OutputIterator out,
+ std::pair<I1, I1> const& in,
+ const u32regex& e,
+ const std::pair<I2, I2>& fmt,
+ match_flag_type flags
+ )
+{
+ // unfortunately we have to copy the format string in order to pass in onward:
+ std::vector<UChar32> f;
+#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+ f.assign(fmt.first, fmt.second);
+#else
+ f.clear();
+ I2 pos = fmt.first;
+ while(pos != fmt.second)
+ f.push_back(*pos++);
+#endif
+
+ regex_iterator<I1, UChar32, icu_regex_traits> i(in.first, in.second, e, flags);
+ regex_iterator<I1, UChar32, icu_regex_traits> j;
+ if(i == j)
+ {
+ if(!(flags & regex_constants::format_no_copy))
+ out = BOOST_REGEX_DETAIL_NS::copy(in.first, in.second, out);
+ }
+ else
+ {
+ I1 last_m = in.first;
+ while(i != j)
+ {
+ if(!(flags & regex_constants::format_no_copy))
+ out = BOOST_REGEX_DETAIL_NS::copy(i->prefix().first, i->prefix().second, out);
+ if(f.size())
+ out = ::boost::BOOST_REGEX_DETAIL_NS::regex_format_imp(out, *i, &*f.begin(), &*f.begin() + f.size(), flags, e.get_traits());
+ else
+ out = ::boost::BOOST_REGEX_DETAIL_NS::regex_format_imp(out, *i, static_cast<UChar32 const*>(0), static_cast<UChar32 const*>(0), flags, e.get_traits());
+ last_m = (*i)[0].second;
+ if(flags & regex_constants::format_first_only)
+ break;
+ ++i;
+ }
+ if(!(flags & regex_constants::format_no_copy))
+ out = BOOST_REGEX_DETAIL_NS::copy(last_m, in.second, out);
+ }
+ return out;
+}
+template <class BaseIterator>
+inline const BaseIterator& extract_output_base(const BaseIterator& b)
+{
+ return b;
+}
+template <class BaseIterator>
+inline BaseIterator extract_output_base(const utf8_output_iterator<BaseIterator>& b)
+{
+ return b.base();
+}
+template <class BaseIterator>
+inline BaseIterator extract_output_base(const utf16_output_iterator<BaseIterator>& b)
+{
+ return b.base();
+}
+} // BOOST_REGEX_DETAIL_NS
+
+template <class OutputIterator, class BidirectionalIterator, class charT>
+inline OutputIterator u32regex_replace(OutputIterator out,
+ BidirectionalIterator first,
+ BidirectionalIterator last,
+ const u32regex& e,
+ const charT* fmt,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::extract_output_base
+ (
+ BOOST_REGEX_DETAIL_NS::do_regex_replace(
+ BOOST_REGEX_DETAIL_NS::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
+ BOOST_REGEX_DETAIL_NS::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
+ e,
+ BOOST_REGEX_DETAIL_NS::make_utf32_seq(fmt, static_cast<mpl::int_<sizeof(*fmt)> const*>(0)),
+ flags)
+ );
+}
+
+template <class OutputIterator, class Iterator, class charT>
+inline OutputIterator u32regex_replace(OutputIterator out,
+ Iterator first,
+ Iterator last,
+ const u32regex& e,
+ const std::basic_string<charT>& fmt,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::extract_output_base
+ (
+ BOOST_REGEX_DETAIL_NS::do_regex_replace(
+ BOOST_REGEX_DETAIL_NS::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
+ BOOST_REGEX_DETAIL_NS::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
+ e,
+ BOOST_REGEX_DETAIL_NS::make_utf32_seq(fmt.begin(), fmt.end(), static_cast<mpl::int_<sizeof(charT)> const*>(0)),
+ flags)
+ );
+}
+
+template <class OutputIterator, class Iterator>
+inline OutputIterator u32regex_replace(OutputIterator out,
+ Iterator first,
+ Iterator last,
+ const u32regex& e,
+ const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
+ match_flag_type flags = match_default)
+{
+ return BOOST_REGEX_DETAIL_NS::extract_output_base
+ (
+ BOOST_REGEX_DETAIL_NS::do_regex_replace(
+ BOOST_REGEX_DETAIL_NS::make_utf32_out(out, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
+ BOOST_REGEX_DETAIL_NS::make_utf32_seq(first, last, static_cast<mpl::int_<sizeof(*first)> const*>(0)),
+ e,
+ BOOST_REGEX_DETAIL_NS::make_utf32_seq(fmt.getBuffer(), fmt.getBuffer() + fmt.length(), static_cast<mpl::int_<2> const*>(0)),
+ flags)
+ );
+}
+
+template <class charT>
+std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
+ const u32regex& e,
+ const charT* fmt,
+ match_flag_type flags = match_default)
+{
+ std::basic_string<charT> result;
+ BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<charT> > i(result);
+ u32regex_replace(i, s.begin(), s.end(), e, fmt, flags);
+ return result;
+}
+
+template <class charT>
+std::basic_string<charT> u32regex_replace(const std::basic_string<charT>& s,
+ const u32regex& e,
+ const std::basic_string<charT>& fmt,
+ match_flag_type flags = match_default)
+{
+ std::basic_string<charT> result;
+ BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<charT> > i(result);
+ u32regex_replace(i, s.begin(), s.end(), e, fmt.c_str(), flags);
+ return result;
+}
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+class unicode_string_out_iterator
+{
+ U_NAMESPACE_QUALIFIER UnicodeString* out;
+public:
+ unicode_string_out_iterator(U_NAMESPACE_QUALIFIER UnicodeString& s) : out(&s) {}
+ unicode_string_out_iterator& operator++() { return *this; }
+ unicode_string_out_iterator& operator++(int) { return *this; }
+ unicode_string_out_iterator& operator*() { return *this; }
+ unicode_string_out_iterator& operator=(UChar v)
+ {
+ *out += v;
+ return *this;
+ }
+ typedef std::ptrdiff_t difference_type;
+ typedef UChar value_type;
+ typedef value_type* pointer;
+ typedef value_type& reference;
+ typedef std::output_iterator_tag iterator_category;
+};
+
+}
+
+inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+ const u32regex& e,
+ const UChar* fmt,
+ match_flag_type flags = match_default)
+{
+ U_NAMESPACE_QUALIFIER UnicodeString result;
+ BOOST_REGEX_DETAIL_NS::unicode_string_out_iterator i(result);
+ u32regex_replace(i, s.getBuffer(), s.getBuffer()+s.length(), e, fmt, flags);
+ return result;
+}
+
+inline U_NAMESPACE_QUALIFIER UnicodeString u32regex_replace(const U_NAMESPACE_QUALIFIER UnicodeString& s,
+ const u32regex& e,
+ const U_NAMESPACE_QUALIFIER UnicodeString& fmt,
+ match_flag_type flags = match_default)
+{
+ U_NAMESPACE_QUALIFIER UnicodeString result;
+ BOOST_REGEX_DETAIL_NS::unicode_string_out_iterator i(result);
+ BOOST_REGEX_DETAIL_NS::do_regex_replace(
+ BOOST_REGEX_DETAIL_NS::make_utf32_out(i, static_cast<mpl::int_<2> const*>(0)),
+ BOOST_REGEX_DETAIL_NS::make_utf32_seq(s.getBuffer(), s.getBuffer()+s.length(), static_cast<mpl::int_<2> const*>(0)),
+ e,
+ BOOST_REGEX_DETAIL_NS::make_utf32_seq(fmt.getBuffer(), fmt.getBuffer() + fmt.length(), static_cast<mpl::int_<2> const*>(0)),
+ flags);
+ return result;
+}
+
+} // namespace boost.
+
+#ifdef BOOST_MSVC
+#pragma warning (pop)
+#endif
+
+#include <boost/regex/v4/u32regex_iterator.hpp>
+#include <boost/regex/v4/u32regex_token_iterator.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/regex/pattern_except.hpp b/src/third_party/boost-1.69.0/boost/regex/pattern_except.hpp
index 004b67f3f25..004b67f3f25 100644
--- a/src/third_party/boost-1.68.0/boost/regex/pattern_except.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/pattern_except.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/pending/object_cache.hpp b/src/third_party/boost-1.69.0/boost/regex/pending/object_cache.hpp
index c47862f0e6f..c47862f0e6f 100644
--- a/src/third_party/boost-1.68.0/boost/regex/pending/object_cache.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/pending/object_cache.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/pending/static_mutex.hpp b/src/third_party/boost-1.69.0/boost/regex/pending/static_mutex.hpp
index 344926f6ab2..344926f6ab2 100644
--- a/src/third_party/boost-1.68.0/boost/regex/pending/static_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/pending/static_mutex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/pending/unicode_iterator.hpp b/src/third_party/boost-1.69.0/boost/regex/pending/unicode_iterator.hpp
index becb17ad5fb..becb17ad5fb 100644
--- a/src/third_party/boost-1.68.0/boost/regex/pending/unicode_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/pending/unicode_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/regex_traits.hpp b/src/third_party/boost-1.69.0/boost/regex/regex_traits.hpp
index 730ba6e0d84..730ba6e0d84 100644
--- a/src/third_party/boost-1.68.0/boost/regex/regex_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/regex_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/user.hpp b/src/third_party/boost-1.69.0/boost/regex/user.hpp
index 33b1013648b..33b1013648b 100644
--- a/src/third_party/boost-1.68.0/boost/regex/user.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/user.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex.hpp
new file mode 100644
index 00000000000..1962372018d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex.hpp
@@ -0,0 +1,787 @@
+/*
+ *
+ * Copyright (c) 1998-2004 John Maddock
+ * Copyright 2011 Garmin Ltd. or its subsidiaries
+ *
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org/ for most recent version.
+ * FILE basic_regex.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares template class basic_regex.
+ */
+
+#ifndef BOOST_REGEX_V4_BASIC_REGEX_HPP
+#define BOOST_REGEX_V4_BASIC_REGEX_HPP
+
+#include <boost/type_traits/is_same.hpp>
+#include <boost/functional/hash.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+namespace boost{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4251)
+#if BOOST_MSVC < 1700
+# pragma warning(disable : 4231)
+#endif
+#if BOOST_MSVC < 1600
+#pragma warning(disable : 4660)
+#endif
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
+#endif
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+//
+// forward declaration, we will need this one later:
+//
+template <class charT, class traits>
+class basic_regex_parser;
+
+template <class I>
+void bubble_down_one(I first, I last)
+{
+ if(first != last)
+ {
+ I next = last - 1;
+ while((next != first) && (*next < *(next-1)))
+ {
+ (next-1)->swap(*next);
+ --next;
+ }
+ }
+}
+
+template <class Iterator>
+inline int hash_value_from_capture_name(Iterator i, Iterator j)
+{
+ std::size_t r = boost::hash_range(i, j);
+ r %= ((std::numeric_limits<int>::max)() - 10001);
+ r += 10000;
+ return static_cast<int>(r);
+}
+
+class named_subexpressions
+{
+public:
+ struct name
+ {
+ template <class charT>
+ name(const charT* i, const charT* j, int idx)
+ : index(idx)
+ {
+ hash = hash_value_from_capture_name(i, j);
+ }
+ name(int h, int idx)
+ : index(idx), hash(h)
+ {
+ }
+ int index;
+ int hash;
+ bool operator < (const name& other)const
+ {
+ return hash < other.hash;
+ }
+ bool operator == (const name& other)const
+ {
+ return hash == other.hash;
+ }
+ void swap(name& other)
+ {
+ std::swap(index, other.index);
+ std::swap(hash, other.hash);
+ }
+ };
+
+ typedef std::vector<name>::const_iterator const_iterator;
+ typedef std::pair<const_iterator, const_iterator> range_type;
+
+ named_subexpressions(){}
+
+ template <class charT>
+ void set_name(const charT* i, const charT* j, int index)
+ {
+ m_sub_names.push_back(name(i, j, index));
+ bubble_down_one(m_sub_names.begin(), m_sub_names.end());
+ }
+ template <class charT>
+ int get_id(const charT* i, const charT* j)const
+ {
+ name t(i, j, 0);
+ typename std::vector<name>::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
+ if((pos != m_sub_names.end()) && (*pos == t))
+ {
+ return pos->index;
+ }
+ return -1;
+ }
+ template <class charT>
+ range_type equal_range(const charT* i, const charT* j)const
+ {
+ name t(i, j, 0);
+ return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t);
+ }
+ int get_id(int h)const
+ {
+ name t(h, 0);
+ std::vector<name>::const_iterator pos = std::lower_bound(m_sub_names.begin(), m_sub_names.end(), t);
+ if((pos != m_sub_names.end()) && (*pos == t))
+ {
+ return pos->index;
+ }
+ return -1;
+ }
+ range_type equal_range(int h)const
+ {
+ name t(h, 0);
+ return std::equal_range(m_sub_names.begin(), m_sub_names.end(), t);
+ }
+private:
+ std::vector<name> m_sub_names;
+};
+
+//
+// class regex_data:
+// represents the data we wish to expose to the matching algorithms.
+//
+template <class charT, class traits>
+struct regex_data : public named_subexpressions
+{
+ typedef regex_constants::syntax_option_type flag_type;
+ typedef std::size_t size_type;
+
+ regex_data(const ::boost::shared_ptr<
+ ::boost::regex_traits_wrapper<traits> >& t)
+ : m_ptraits(t), m_expression(0), m_expression_len(0), m_disable_match_any(false) {}
+ regex_data()
+ : m_ptraits(new ::boost::regex_traits_wrapper<traits>()), m_expression(0), m_expression_len(0), m_disable_match_any(false) {}
+
+ ::boost::shared_ptr<
+ ::boost::regex_traits_wrapper<traits>
+ > m_ptraits; // traits class instance
+ flag_type m_flags; // flags with which we were compiled
+ int m_status; // error code (0 implies OK).
+ const charT* m_expression; // the original expression
+ std::ptrdiff_t m_expression_len; // the length of the original expression
+ size_type m_mark_count; // the number of marked sub-expressions
+ BOOST_REGEX_DETAIL_NS::re_syntax_base* m_first_state; // the first state of the machine
+ unsigned m_restart_type; // search optimisation type
+ unsigned char m_startmap[1 << CHAR_BIT]; // which characters can start a match
+ unsigned int m_can_be_null; // whether we can match a null string
+ BOOST_REGEX_DETAIL_NS::raw_storage m_data; // the buffer in which our states are constructed
+ typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character
+ std::vector<
+ std::pair<
+ std::size_t, std::size_t> > m_subs; // Position of sub-expressions within the *string*.
+ bool m_has_recursions; // whether we have recursive expressions;
+ bool m_disable_match_any; // when set we need to disable the match_any flag as it causes different/buggy behaviour.
+};
+//
+// class basic_regex_implementation
+// pimpl implementation class for basic_regex.
+//
+template <class charT, class traits>
+class basic_regex_implementation
+ : public regex_data<charT, traits>
+{
+public:
+ typedef regex_constants::syntax_option_type flag_type;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::size_t size_type;
+ typedef typename traits::locale_type locale_type;
+ typedef const charT* const_iterator;
+
+ basic_regex_implementation(){}
+ basic_regex_implementation(const ::boost::shared_ptr<
+ ::boost::regex_traits_wrapper<traits> >& t)
+ : regex_data<charT, traits>(t) {}
+ void assign(const charT* arg_first,
+ const charT* arg_last,
+ flag_type f)
+ {
+ regex_data<charT, traits>* pdat = this;
+ basic_regex_parser<charT, traits> parser(pdat);
+ parser.parse(arg_first, arg_last, f);
+ }
+
+ locale_type BOOST_REGEX_CALL imbue(locale_type l)
+ {
+ return this->m_ptraits->imbue(l);
+ }
+ locale_type BOOST_REGEX_CALL getloc()const
+ {
+ return this->m_ptraits->getloc();
+ }
+ std::basic_string<charT> BOOST_REGEX_CALL str()const
+ {
+ std::basic_string<charT> result;
+ if(this->m_status == 0)
+ result = std::basic_string<charT>(this->m_expression, this->m_expression_len);
+ return result;
+ }
+ const_iterator BOOST_REGEX_CALL expression()const
+ {
+ return this->m_expression;
+ }
+ std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const
+ {
+ const std::pair<std::size_t, std::size_t>& pi = this->m_subs.at(n);
+ std::pair<const_iterator, const_iterator> p(expression() + pi.first, expression() + pi.second);
+ return p;
+ }
+ //
+ // begin, end:
+ const_iterator BOOST_REGEX_CALL begin()const
+ {
+ return (this->m_status ? 0 : this->m_expression);
+ }
+ const_iterator BOOST_REGEX_CALL end()const
+ {
+ return (this->m_status ? 0 : this->m_expression + this->m_expression_len);
+ }
+ flag_type BOOST_REGEX_CALL flags()const
+ {
+ return this->m_flags;
+ }
+ size_type BOOST_REGEX_CALL size()const
+ {
+ return this->m_expression_len;
+ }
+ int BOOST_REGEX_CALL status()const
+ {
+ return this->m_status;
+ }
+ size_type BOOST_REGEX_CALL mark_count()const
+ {
+ return this->m_mark_count - 1;
+ }
+ const BOOST_REGEX_DETAIL_NS::re_syntax_base* get_first_state()const
+ {
+ return this->m_first_state;
+ }
+ unsigned get_restart_type()const
+ {
+ return this->m_restart_type;
+ }
+ const unsigned char* get_map()const
+ {
+ return this->m_startmap;
+ }
+ const ::boost::regex_traits_wrapper<traits>& get_traits()const
+ {
+ return *(this->m_ptraits);
+ }
+ bool can_be_null()const
+ {
+ return this->m_can_be_null;
+ }
+ const regex_data<charT, traits>& get_data()const
+ {
+ basic_regex_implementation<charT, traits> const* p = this;
+ return *static_cast<const regex_data<charT, traits>*>(p);
+ }
+};
+
+} // namespace BOOST_REGEX_DETAIL_NS
+//
+// class basic_regex:
+// represents the compiled
+// regular expression:
+//
+
+#ifdef BOOST_REGEX_NO_FWD
+template <class charT, class traits = regex_traits<charT> >
+#else
+template <class charT, class traits >
+#endif
+class basic_regex : public regbase
+{
+public:
+ // typedefs:
+ typedef std::size_t traits_size_type;
+ typedef typename traits::string_type traits_string_type;
+ typedef charT char_type;
+ typedef traits traits_type;
+
+ typedef charT value_type;
+ typedef charT& reference;
+ typedef const charT& const_reference;
+ typedef const charT* const_iterator;
+ typedef const_iterator iterator;
+ typedef std::ptrdiff_t difference_type;
+ typedef std::size_t size_type;
+ typedef regex_constants::syntax_option_type flag_type;
+ // locale_type
+ // placeholder for actual locale type used by the
+ // traits class to localise *this.
+ typedef typename traits::locale_type locale_type;
+
+public:
+ explicit basic_regex(){}
+ explicit basic_regex(const charT* p, flag_type f = regex_constants::normal)
+ {
+ assign(p, f);
+ }
+ basic_regex(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
+ {
+ assign(p1, p2, f);
+ }
+ basic_regex(const charT* p, size_type len, flag_type f)
+ {
+ assign(p, len, f);
+ }
+ basic_regex(const basic_regex& that)
+ : m_pimpl(that.m_pimpl) {}
+ ~basic_regex(){}
+ basic_regex& BOOST_REGEX_CALL operator=(const basic_regex& that)
+ {
+ return assign(that);
+ }
+ basic_regex& BOOST_REGEX_CALL operator=(const charT* ptr)
+ {
+ return assign(ptr);
+ }
+
+ //
+ // assign:
+ basic_regex& assign(const basic_regex& that)
+ {
+ m_pimpl = that.m_pimpl;
+ return *this;
+ }
+ basic_regex& assign(const charT* p, flag_type f = regex_constants::normal)
+ {
+ return assign(p, p + traits::length(p), f);
+ }
+ basic_regex& assign(const charT* p, size_type len, flag_type f)
+ {
+ return assign(p, p + len, f);
+ }
+private:
+ basic_regex& do_assign(const charT* p1,
+ const charT* p2,
+ flag_type f);
+public:
+ basic_regex& assign(const charT* p1,
+ const charT* p2,
+ flag_type f = regex_constants::normal)
+ {
+ return do_assign(p1, p2, f);
+ }
+#if !defined(BOOST_NO_MEMBER_TEMPLATES)
+
+ template <class ST, class SA>
+ unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
+ {
+ return set_expression(p.data(), p.data() + p.size(), f);
+ }
+
+ template <class ST, class SA>
+ explicit basic_regex(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
+ {
+ assign(p, f);
+ }
+
+ template <class InputIterator>
+ basic_regex(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal)
+ {
+ typedef typename traits::string_type seq_type;
+ seq_type a(arg_first, arg_last);
+ if(a.size())
+ assign(static_cast<const charT*>(&*a.begin()), static_cast<const charT*>(&*a.begin() + a.size()), f);
+ else
+ assign(static_cast<const charT*>(0), static_cast<const charT*>(0), f);
+ }
+
+ template <class ST, class SA>
+ basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
+ {
+ return assign(p.data(), p.data() + p.size(), regex_constants::normal);
+ }
+
+ template <class string_traits, class A>
+ basic_regex& BOOST_REGEX_CALL assign(
+ const std::basic_string<charT, string_traits, A>& s,
+ flag_type f = regex_constants::normal)
+ {
+ return assign(s.data(), s.data() + s.size(), f);
+ }
+
+ template <class InputIterator>
+ basic_regex& BOOST_REGEX_CALL assign(InputIterator arg_first,
+ InputIterator arg_last,
+ flag_type f = regex_constants::normal)
+ {
+ typedef typename traits::string_type seq_type;
+ seq_type a(arg_first, arg_last);
+ if(a.size())
+ {
+ const charT* p1 = &*a.begin();
+ const charT* p2 = &*a.begin() + a.size();
+ return assign(p1, p2, f);
+ }
+ return assign(static_cast<const charT*>(0), static_cast<const charT*>(0), f);
+ }
+#else
+ unsigned int BOOST_REGEX_CALL set_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
+ {
+ return set_expression(p.data(), p.data() + p.size(), f);
+ }
+
+ basic_regex(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
+ {
+ assign(p, f);
+ }
+
+ basic_regex& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
+ {
+ return assign(p.data(), p.data() + p.size(), regex_constants::normal);
+ }
+
+ basic_regex& BOOST_REGEX_CALL assign(
+ const std::basic_string<charT>& s,
+ flag_type f = regex_constants::normal)
+ {
+ return assign(s.data(), s.data() + s.size(), f);
+ }
+
+#endif
+
+ //
+ // locale:
+ locale_type BOOST_REGEX_CALL imbue(locale_type l);
+ locale_type BOOST_REGEX_CALL getloc()const
+ {
+ return m_pimpl.get() ? m_pimpl->getloc() : locale_type();
+ }
+ //
+ // getflags:
+ // retained for backwards compatibility only, "flags"
+ // is now the preferred name:
+ flag_type BOOST_REGEX_CALL getflags()const
+ {
+ return flags();
+ }
+ flag_type BOOST_REGEX_CALL flags()const
+ {
+ return m_pimpl.get() ? m_pimpl->flags() : 0;
+ }
+ //
+ // str:
+ std::basic_string<charT> BOOST_REGEX_CALL str()const
+ {
+ return m_pimpl.get() ? m_pimpl->str() : std::basic_string<charT>();
+ }
+ //
+ // begin, end, subexpression:
+ std::pair<const_iterator, const_iterator> BOOST_REGEX_CALL subexpression(std::size_t n)const
+ {
+ if(!m_pimpl.get())
+ boost::throw_exception(std::logic_error("Can't access subexpressions in an invalid regex."));
+ return m_pimpl->subexpression(n);
+ }
+ const_iterator BOOST_REGEX_CALL begin()const
+ {
+ return (m_pimpl.get() ? m_pimpl->begin() : 0);
+ }
+ const_iterator BOOST_REGEX_CALL end()const
+ {
+ return (m_pimpl.get() ? m_pimpl->end() : 0);
+ }
+ //
+ // swap:
+ void BOOST_REGEX_CALL swap(basic_regex& that)throw()
+ {
+ m_pimpl.swap(that.m_pimpl);
+ }
+ //
+ // size:
+ size_type BOOST_REGEX_CALL size()const
+ {
+ return (m_pimpl.get() ? m_pimpl->size() : 0);
+ }
+ //
+ // max_size:
+ size_type BOOST_REGEX_CALL max_size()const
+ {
+ return UINT_MAX;
+ }
+ //
+ // empty:
+ bool BOOST_REGEX_CALL empty()const
+ {
+ return (m_pimpl.get() ? 0 != m_pimpl->status() : true);
+ }
+
+ size_type BOOST_REGEX_CALL mark_count()const
+ {
+ return (m_pimpl.get() ? m_pimpl->mark_count() : 0);
+ }
+
+ int status()const
+ {
+ return (m_pimpl.get() ? m_pimpl->status() : regex_constants::error_empty);
+ }
+
+ int BOOST_REGEX_CALL compare(const basic_regex& that) const
+ {
+ if(m_pimpl.get() == that.m_pimpl.get())
+ return 0;
+ if(!m_pimpl.get())
+ return -1;
+ if(!that.m_pimpl.get())
+ return 1;
+ if(status() != that.status())
+ return status() - that.status();
+ if(flags() != that.flags())
+ return flags() - that.flags();
+ return str().compare(that.str());
+ }
+ bool BOOST_REGEX_CALL operator==(const basic_regex& e)const
+ {
+ return compare(e) == 0;
+ }
+ bool BOOST_REGEX_CALL operator != (const basic_regex& e)const
+ {
+ return compare(e) != 0;
+ }
+ bool BOOST_REGEX_CALL operator<(const basic_regex& e)const
+ {
+ return compare(e) < 0;
+ }
+ bool BOOST_REGEX_CALL operator>(const basic_regex& e)const
+ {
+ return compare(e) > 0;
+ }
+ bool BOOST_REGEX_CALL operator<=(const basic_regex& e)const
+ {
+ return compare(e) <= 0;
+ }
+ bool BOOST_REGEX_CALL operator>=(const basic_regex& e)const
+ {
+ return compare(e) >= 0;
+ }
+
+ //
+ // The following are deprecated as public interfaces
+ // but are available for compatibility with earlier versions.
+ const charT* BOOST_REGEX_CALL expression()const
+ {
+ return (m_pimpl.get() && !m_pimpl->status() ? m_pimpl->expression() : 0);
+ }
+ unsigned int BOOST_REGEX_CALL set_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
+ {
+ assign(p1, p2, f | regex_constants::no_except);
+ return status();
+ }
+ unsigned int BOOST_REGEX_CALL set_expression(const charT* p, flag_type f = regex_constants::normal)
+ {
+ assign(p, f | regex_constants::no_except);
+ return status();
+ }
+ unsigned int BOOST_REGEX_CALL error_code()const
+ {
+ return status();
+ }
+ //
+ // private access methods:
+ //
+ const BOOST_REGEX_DETAIL_NS::re_syntax_base* get_first_state()const
+ {
+ BOOST_ASSERT(0 != m_pimpl.get());
+ return m_pimpl->get_first_state();
+ }
+ unsigned get_restart_type()const
+ {
+ BOOST_ASSERT(0 != m_pimpl.get());
+ return m_pimpl->get_restart_type();
+ }
+ const unsigned char* get_map()const
+ {
+ BOOST_ASSERT(0 != m_pimpl.get());
+ return m_pimpl->get_map();
+ }
+ const ::boost::regex_traits_wrapper<traits>& get_traits()const
+ {
+ BOOST_ASSERT(0 != m_pimpl.get());
+ return m_pimpl->get_traits();
+ }
+ bool can_be_null()const
+ {
+ BOOST_ASSERT(0 != m_pimpl.get());
+ return m_pimpl->can_be_null();
+ }
+ const BOOST_REGEX_DETAIL_NS::regex_data<charT, traits>& get_data()const
+ {
+ BOOST_ASSERT(0 != m_pimpl.get());
+ return m_pimpl->get_data();
+ }
+ boost::shared_ptr<BOOST_REGEX_DETAIL_NS::named_subexpressions > get_named_subs()const
+ {
+ return m_pimpl;
+ }
+
+private:
+ shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> > m_pimpl;
+};
+
+//
+// out of line members;
+// these are the only members that mutate the basic_regex object,
+// and are designed to provide the strong exception guarentee
+// (in the event of a throw, the state of the object remains unchanged).
+//
+template <class charT, class traits>
+basic_regex<charT, traits>& basic_regex<charT, traits>::do_assign(const charT* p1,
+ const charT* p2,
+ flag_type f)
+{
+ shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> > temp;
+ if(!m_pimpl.get())
+ {
+ temp = shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> >(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>());
+ }
+ else
+ {
+ temp = shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> >(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>(m_pimpl->m_ptraits));
+ }
+ temp->assign(p1, p2, f);
+ temp.swap(m_pimpl);
+ return *this;
+}
+
+template <class charT, class traits>
+typename basic_regex<charT, traits>::locale_type BOOST_REGEX_CALL basic_regex<charT, traits>::imbue(locale_type l)
+{
+ shared_ptr<BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits> > temp(new BOOST_REGEX_DETAIL_NS::basic_regex_implementation<charT, traits>());
+ locale_type result = temp->imbue(l);
+ temp.swap(m_pimpl);
+ return result;
+}
+
+//
+// non-members:
+//
+template <class charT, class traits>
+void swap(basic_regex<charT, traits>& e1, basic_regex<charT, traits>& e2)
+{
+ e1.swap(e2);
+}
+
+#ifndef BOOST_NO_STD_LOCALE
+template <class charT, class traits, class traits2>
+std::basic_ostream<charT, traits>&
+ operator << (std::basic_ostream<charT, traits>& os,
+ const basic_regex<charT, traits2>& e)
+{
+ return (os << e.str());
+}
+#else
+template <class traits>
+std::ostream& operator << (std::ostream& os, const basic_regex<char, traits>& e)
+{
+ return (os << e.str());
+}
+#endif
+
+//
+// class reg_expression:
+// this is provided for backwards compatibility only,
+// it is deprecated, no not use!
+//
+#ifdef BOOST_REGEX_NO_FWD
+template <class charT, class traits = regex_traits<charT> >
+#else
+template <class charT, class traits >
+#endif
+class reg_expression : public basic_regex<charT, traits>
+{
+public:
+ typedef typename basic_regex<charT, traits>::flag_type flag_type;
+ typedef typename basic_regex<charT, traits>::size_type size_type;
+ explicit reg_expression(){}
+ explicit reg_expression(const charT* p, flag_type f = regex_constants::normal)
+ : basic_regex<charT, traits>(p, f){}
+ reg_expression(const charT* p1, const charT* p2, flag_type f = regex_constants::normal)
+ : basic_regex<charT, traits>(p1, p2, f){}
+ reg_expression(const charT* p, size_type len, flag_type f)
+ : basic_regex<charT, traits>(p, len, f){}
+ reg_expression(const reg_expression& that)
+ : basic_regex<charT, traits>(that) {}
+ ~reg_expression(){}
+ reg_expression& BOOST_REGEX_CALL operator=(const reg_expression& that)
+ {
+ return this->assign(that);
+ }
+
+#if !defined(BOOST_NO_MEMBER_TEMPLATES)
+ template <class ST, class SA>
+ explicit reg_expression(const std::basic_string<charT, ST, SA>& p, flag_type f = regex_constants::normal)
+ : basic_regex<charT, traits>(p, f)
+ {
+ }
+
+ template <class InputIterator>
+ reg_expression(InputIterator arg_first, InputIterator arg_last, flag_type f = regex_constants::normal)
+ : basic_regex<charT, traits>(arg_first, arg_last, f)
+ {
+ }
+
+ template <class ST, class SA>
+ reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT, ST, SA>& p)
+ {
+ this->assign(p);
+ return *this;
+ }
+#else
+ explicit reg_expression(const std::basic_string<charT>& p, flag_type f = regex_constants::normal)
+ : basic_regex<charT, traits>(p, f)
+ {
+ }
+
+ reg_expression& BOOST_REGEX_CALL operator=(const std::basic_string<charT>& p)
+ {
+ this->assign(p);
+ return *this;
+ }
+#endif
+
+};
+
+#ifdef BOOST_MSVC
+#pragma warning (pop)
+#endif
+
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_creator.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_creator.hpp
new file mode 100644
index 00000000000..7c00652739c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_creator.hpp
@@ -0,0 +1,1575 @@
+/*
+ *
+ * Copyright (c) 2004
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE basic_regex_creator.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares template class basic_regex_creator which fills in
+ * the data members of a regex_data object.
+ */
+
+#ifndef BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP
+#define BOOST_REGEX_V4_BASIC_REGEX_CREATOR_HPP
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
+#endif
+
+namespace boost{
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+template <class charT>
+struct digraph : public std::pair<charT, charT>
+{
+ digraph() : std::pair<charT, charT>(charT(0), charT(0)){}
+ digraph(charT c1) : std::pair<charT, charT>(c1, charT(0)){}
+ digraph(charT c1, charT c2) : std::pair<charT, charT>(c1, c2)
+ {}
+ digraph(const digraph<charT>& d) : std::pair<charT, charT>(d.first, d.second){}
+ template <class Seq>
+ digraph(const Seq& s) : std::pair<charT, charT>()
+ {
+ BOOST_ASSERT(s.size() <= 2);
+ BOOST_ASSERT(s.size());
+ this->first = s[0];
+ this->second = (s.size() > 1) ? s[1] : 0;
+ }
+};
+
+template <class charT, class traits>
+class basic_char_set
+{
+public:
+ typedef digraph<charT> digraph_type;
+ typedef typename traits::string_type string_type;
+ typedef typename traits::char_class_type m_type;
+
+ basic_char_set()
+ {
+ m_negate = false;
+ m_has_digraphs = false;
+ m_classes = 0;
+ m_negated_classes = 0;
+ m_empty = true;
+ }
+
+ void add_single(const digraph_type& s)
+ {
+ m_singles.insert(s);
+ if(s.second)
+ m_has_digraphs = true;
+ m_empty = false;
+ }
+ void add_range(const digraph_type& first, const digraph_type& end)
+ {
+ m_ranges.push_back(first);
+ m_ranges.push_back(end);
+ if(first.second)
+ {
+ m_has_digraphs = true;
+ add_single(first);
+ }
+ if(end.second)
+ {
+ m_has_digraphs = true;
+ add_single(end);
+ }
+ m_empty = false;
+ }
+ void add_class(m_type m)
+ {
+ m_classes |= m;
+ m_empty = false;
+ }
+ void add_negated_class(m_type m)
+ {
+ m_negated_classes |= m;
+ m_empty = false;
+ }
+ void add_equivalent(const digraph_type& s)
+ {
+ m_equivalents.insert(s);
+ if(s.second)
+ {
+ m_has_digraphs = true;
+ add_single(s);
+ }
+ m_empty = false;
+ }
+ void negate()
+ {
+ m_negate = true;
+ //m_empty = false;
+ }
+
+ //
+ // accessor functions:
+ //
+ bool has_digraphs()const
+ {
+ return m_has_digraphs;
+ }
+ bool is_negated()const
+ {
+ return m_negate;
+ }
+ typedef typename std::vector<digraph_type>::const_iterator list_iterator;
+ typedef typename std::set<digraph_type>::const_iterator set_iterator;
+ set_iterator singles_begin()const
+ {
+ return m_singles.begin();
+ }
+ set_iterator singles_end()const
+ {
+ return m_singles.end();
+ }
+ list_iterator ranges_begin()const
+ {
+ return m_ranges.begin();
+ }
+ list_iterator ranges_end()const
+ {
+ return m_ranges.end();
+ }
+ set_iterator equivalents_begin()const
+ {
+ return m_equivalents.begin();
+ }
+ set_iterator equivalents_end()const
+ {
+ return m_equivalents.end();
+ }
+ m_type classes()const
+ {
+ return m_classes;
+ }
+ m_type negated_classes()const
+ {
+ return m_negated_classes;
+ }
+ bool empty()const
+ {
+ return m_empty;
+ }
+private:
+ std::set<digraph_type> m_singles; // a list of single characters to match
+ std::vector<digraph_type> m_ranges; // a list of end points of our ranges
+ bool m_negate; // true if the set is to be negated
+ bool m_has_digraphs; // true if we have digraphs present
+ m_type m_classes; // character classes to match
+ m_type m_negated_classes; // negated character classes to match
+ bool m_empty; // whether we've added anything yet
+ std::set<digraph_type> m_equivalents; // a list of equivalence classes
+};
+
+template <class charT, class traits>
+class basic_regex_creator
+{
+public:
+ basic_regex_creator(regex_data<charT, traits>* data);
+ std::ptrdiff_t getoffset(void* addr)
+ {
+ return getoffset(addr, m_pdata->m_data.data());
+ }
+ std::ptrdiff_t getoffset(const void* addr, const void* base)
+ {
+ return static_cast<const char*>(addr) - static_cast<const char*>(base);
+ }
+ re_syntax_base* getaddress(std::ptrdiff_t off)
+ {
+ return getaddress(off, m_pdata->m_data.data());
+ }
+ re_syntax_base* getaddress(std::ptrdiff_t off, void* base)
+ {
+ return static_cast<re_syntax_base*>(static_cast<void*>(static_cast<char*>(base) + off));
+ }
+ void init(unsigned l_flags)
+ {
+ m_pdata->m_flags = l_flags;
+ m_icase = l_flags & regex_constants::icase;
+ }
+ regbase::flag_type flags()
+ {
+ return m_pdata->m_flags;
+ }
+ void flags(regbase::flag_type f)
+ {
+ m_pdata->m_flags = f;
+ if(m_icase != static_cast<bool>(f & regbase::icase))
+ {
+ m_icase = static_cast<bool>(f & regbase::icase);
+ }
+ }
+ re_syntax_base* append_state(syntax_element_type t, std::size_t s = sizeof(re_syntax_base));
+ re_syntax_base* insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s = sizeof(re_syntax_base));
+ re_literal* append_literal(charT c);
+ re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set);
+ re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set, mpl::false_*);
+ re_syntax_base* append_set(const basic_char_set<charT, traits>& char_set, mpl::true_*);
+ void finalize(const charT* p1, const charT* p2);
+protected:
+ regex_data<charT, traits>* m_pdata; // pointer to the basic_regex_data struct we are filling in
+ const ::boost::regex_traits_wrapper<traits>&
+ m_traits; // convenience reference to traits class
+ re_syntax_base* m_last_state; // the last state we added
+ bool m_icase; // true for case insensitive matches
+ unsigned m_repeater_id; // the state_id of the next repeater
+ bool m_has_backrefs; // true if there are actually any backrefs
+ unsigned m_backrefs; // bitmask of permitted backrefs
+ boost::uintmax_t m_bad_repeats; // bitmask of repeats we can't deduce a startmap for;
+ bool m_has_recursions; // set when we have recursive expresisons to fixup
+ std::vector<unsigned char> m_recursion_checks; // notes which recursions we've followed while analysing this expression
+ typename traits::char_class_type m_word_mask; // mask used to determine if a character is a word character
+ typename traits::char_class_type m_mask_space; // mask used to determine if a character is a word character
+ typename traits::char_class_type m_lower_mask; // mask used to determine if a character is a lowercase character
+ typename traits::char_class_type m_upper_mask; // mask used to determine if a character is an uppercase character
+ typename traits::char_class_type m_alpha_mask; // mask used to determine if a character is an alphabetic character
+private:
+ basic_regex_creator& operator=(const basic_regex_creator&);
+ basic_regex_creator(const basic_regex_creator&);
+
+ void fixup_pointers(re_syntax_base* state);
+ void fixup_recursions(re_syntax_base* state);
+ void create_startmaps(re_syntax_base* state);
+ int calculate_backstep(re_syntax_base* state);
+ void create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask);
+ unsigned get_restart_type(re_syntax_base* state);
+ void set_all_masks(unsigned char* bits, unsigned char);
+ bool is_bad_repeat(re_syntax_base* pt);
+ void set_bad_repeat(re_syntax_base* pt);
+ syntax_element_type get_repeat_type(re_syntax_base* state);
+ void probe_leading_repeat(re_syntax_base* state);
+};
+
+template <class charT, class traits>
+basic_regex_creator<charT, traits>::basic_regex_creator(regex_data<charT, traits>* data)
+ : m_pdata(data), m_traits(*(data->m_ptraits)), m_last_state(0), m_repeater_id(0), m_has_backrefs(false), m_backrefs(0), m_has_recursions(false)
+{
+ m_pdata->m_data.clear();
+ m_pdata->m_status = ::boost::regex_constants::error_ok;
+ static const charT w = 'w';
+ static const charT s = 's';
+ static const charT l[5] = { 'l', 'o', 'w', 'e', 'r', };
+ static const charT u[5] = { 'u', 'p', 'p', 'e', 'r', };
+ static const charT a[5] = { 'a', 'l', 'p', 'h', 'a', };
+ m_word_mask = m_traits.lookup_classname(&w, &w +1);
+ m_mask_space = m_traits.lookup_classname(&s, &s +1);
+ m_lower_mask = m_traits.lookup_classname(l, l + 5);
+ m_upper_mask = m_traits.lookup_classname(u, u + 5);
+ m_alpha_mask = m_traits.lookup_classname(a, a + 5);
+ m_pdata->m_word_mask = m_word_mask;
+ BOOST_ASSERT(m_word_mask != 0);
+ BOOST_ASSERT(m_mask_space != 0);
+ BOOST_ASSERT(m_lower_mask != 0);
+ BOOST_ASSERT(m_upper_mask != 0);
+ BOOST_ASSERT(m_alpha_mask != 0);
+}
+
+template <class charT, class traits>
+re_syntax_base* basic_regex_creator<charT, traits>::append_state(syntax_element_type t, std::size_t s)
+{
+ // if the state is a backref then make a note of it:
+ if(t == syntax_element_backref)
+ this->m_has_backrefs = true;
+ // append a new state, start by aligning our last one:
+ m_pdata->m_data.align();
+ // set the offset to the next state in our last one:
+ if(m_last_state)
+ m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state);
+ // now actually extent our data:
+ m_last_state = static_cast<re_syntax_base*>(m_pdata->m_data.extend(s));
+ // fill in boilerplate options in the new state:
+ m_last_state->next.i = 0;
+ m_last_state->type = t;
+ return m_last_state;
+}
+
+template <class charT, class traits>
+re_syntax_base* basic_regex_creator<charT, traits>::insert_state(std::ptrdiff_t pos, syntax_element_type t, std::size_t s)
+{
+ // append a new state, start by aligning our last one:
+ m_pdata->m_data.align();
+ // set the offset to the next state in our last one:
+ if(m_last_state)
+ m_last_state->next.i = m_pdata->m_data.size() - getoffset(m_last_state);
+ // remember the last state position:
+ std::ptrdiff_t off = getoffset(m_last_state) + s;
+ // now actually insert our data:
+ re_syntax_base* new_state = static_cast<re_syntax_base*>(m_pdata->m_data.insert(pos, s));
+ // fill in boilerplate options in the new state:
+ new_state->next.i = s;
+ new_state->type = t;
+ m_last_state = getaddress(off);
+ return new_state;
+}
+
+template <class charT, class traits>
+re_literal* basic_regex_creator<charT, traits>::append_literal(charT c)
+{
+ re_literal* result;
+ // start by seeing if we have an existing re_literal we can extend:
+ if((0 == m_last_state) || (m_last_state->type != syntax_element_literal))
+ {
+ // no existing re_literal, create a new one:
+ result = static_cast<re_literal*>(append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT)));
+ result->length = 1;
+ *static_cast<charT*>(static_cast<void*>(result+1)) = m_traits.translate(c, m_icase);
+ }
+ else
+ {
+ // we have an existing re_literal, extend it:
+ std::ptrdiff_t off = getoffset(m_last_state);
+ m_pdata->m_data.extend(sizeof(charT));
+ m_last_state = result = static_cast<re_literal*>(getaddress(off));
+ charT* characters = static_cast<charT*>(static_cast<void*>(result+1));
+ characters[result->length] = m_traits.translate(c, m_icase);
+ result->length += 1;
+ }
+ return result;
+}
+
+template <class charT, class traits>
+inline re_syntax_base* basic_regex_creator<charT, traits>::append_set(
+ const basic_char_set<charT, traits>& char_set)
+{
+ typedef mpl::bool_< (sizeof(charT) == 1) > truth_type;
+ return char_set.has_digraphs()
+ ? append_set(char_set, static_cast<mpl::false_*>(0))
+ : append_set(char_set, static_cast<truth_type*>(0));
+}
+
+template <class charT, class traits>
+re_syntax_base* basic_regex_creator<charT, traits>::append_set(
+ const basic_char_set<charT, traits>& char_set, mpl::false_*)
+{
+ typedef typename traits::string_type string_type;
+ typedef typename basic_char_set<charT, traits>::list_iterator item_iterator;
+ typedef typename basic_char_set<charT, traits>::set_iterator set_iterator;
+ typedef typename traits::char_class_type m_type;
+
+ re_set_long<m_type>* result = static_cast<re_set_long<m_type>*>(append_state(syntax_element_long_set, sizeof(re_set_long<m_type>)));
+ //
+ // fill in the basics:
+ //
+ result->csingles = static_cast<unsigned int>(::boost::BOOST_REGEX_DETAIL_NS::distance(char_set.singles_begin(), char_set.singles_end()));
+ result->cranges = static_cast<unsigned int>(::boost::BOOST_REGEX_DETAIL_NS::distance(char_set.ranges_begin(), char_set.ranges_end())) / 2;
+ result->cequivalents = static_cast<unsigned int>(::boost::BOOST_REGEX_DETAIL_NS::distance(char_set.equivalents_begin(), char_set.equivalents_end()));
+ result->cclasses = char_set.classes();
+ result->cnclasses = char_set.negated_classes();
+ if(flags() & regbase::icase)
+ {
+ // adjust classes as needed:
+ if(((result->cclasses & m_lower_mask) == m_lower_mask) || ((result->cclasses & m_upper_mask) == m_upper_mask))
+ result->cclasses |= m_alpha_mask;
+ if(((result->cnclasses & m_lower_mask) == m_lower_mask) || ((result->cnclasses & m_upper_mask) == m_upper_mask))
+ result->cnclasses |= m_alpha_mask;
+ }
+
+ result->isnot = char_set.is_negated();
+ result->singleton = !char_set.has_digraphs();
+ //
+ // remember where the state is for later:
+ //
+ std::ptrdiff_t offset = getoffset(result);
+ //
+ // now extend with all the singles:
+ //
+ item_iterator first, last;
+ set_iterator sfirst, slast;
+ sfirst = char_set.singles_begin();
+ slast = char_set.singles_end();
+ while(sfirst != slast)
+ {
+ charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (sfirst->first == static_cast<charT>(0) ? 1 : sfirst->second ? 3 : 2)));
+ p[0] = m_traits.translate(sfirst->first, m_icase);
+ if(sfirst->first == static_cast<charT>(0))
+ {
+ p[0] = 0;
+ }
+ else if(sfirst->second)
+ {
+ p[1] = m_traits.translate(sfirst->second, m_icase);
+ p[2] = 0;
+ }
+ else
+ p[1] = 0;
+ ++sfirst;
+ }
+ //
+ // now extend with all the ranges:
+ //
+ first = char_set.ranges_begin();
+ last = char_set.ranges_end();
+ while(first != last)
+ {
+ // first grab the endpoints of the range:
+ digraph<charT> c1 = *first;
+ c1.first = this->m_traits.translate(c1.first, this->m_icase);
+ c1.second = this->m_traits.translate(c1.second, this->m_icase);
+ ++first;
+ digraph<charT> c2 = *first;
+ c2.first = this->m_traits.translate(c2.first, this->m_icase);
+ c2.second = this->m_traits.translate(c2.second, this->m_icase);
+ ++first;
+ string_type s1, s2;
+ // different actions now depending upon whether collation is turned on:
+ if(flags() & regex_constants::collate)
+ {
+ // we need to transform our range into sort keys:
+ charT a1[3] = { c1.first, c1.second, charT(0), };
+ charT a2[3] = { c2.first, c2.second, charT(0), };
+ s1 = this->m_traits.transform(a1, (a1[1] ? a1+2 : a1+1));
+ s2 = this->m_traits.transform(a2, (a2[1] ? a2+2 : a2+1));
+ if(s1.size() == 0)
+ s1 = string_type(1, charT(0));
+ if(s2.size() == 0)
+ s2 = string_type(1, charT(0));
+ }
+ else
+ {
+ if(c1.second)
+ {
+ s1.insert(s1.end(), c1.first);
+ s1.insert(s1.end(), c1.second);
+ }
+ else
+ s1 = string_type(1, c1.first);
+ if(c2.second)
+ {
+ s2.insert(s2.end(), c2.first);
+ s2.insert(s2.end(), c2.second);
+ }
+ else
+ s2.insert(s2.end(), c2.first);
+ }
+ if(s1 > s2)
+ {
+ // Oops error:
+ return 0;
+ }
+ charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (s1.size() + s2.size() + 2) ) );
+ BOOST_REGEX_DETAIL_NS::copy(s1.begin(), s1.end(), p);
+ p[s1.size()] = charT(0);
+ p += s1.size() + 1;
+ BOOST_REGEX_DETAIL_NS::copy(s2.begin(), s2.end(), p);
+ p[s2.size()] = charT(0);
+ }
+ //
+ // now process the equivalence classes:
+ //
+ sfirst = char_set.equivalents_begin();
+ slast = char_set.equivalents_end();
+ while(sfirst != slast)
+ {
+ string_type s;
+ if(sfirst->second)
+ {
+ charT cs[3] = { sfirst->first, sfirst->second, charT(0), };
+ s = m_traits.transform_primary(cs, cs+2);
+ }
+ else
+ s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1);
+ if(s.empty())
+ return 0; // invalid or unsupported equivalence class
+ charT* p = static_cast<charT*>(this->m_pdata->m_data.extend(sizeof(charT) * (s.size()+1) ) );
+ BOOST_REGEX_DETAIL_NS::copy(s.begin(), s.end(), p);
+ p[s.size()] = charT(0);
+ ++sfirst;
+ }
+ //
+ // finally reset the address of our last state:
+ //
+ m_last_state = result = static_cast<re_set_long<m_type>*>(getaddress(offset));
+ return result;
+}
+
+template<class T>
+inline bool char_less(T t1, T t2)
+{
+ return t1 < t2;
+}
+inline bool char_less(char t1, char t2)
+{
+ return static_cast<unsigned char>(t1) < static_cast<unsigned char>(t2);
+}
+inline bool char_less(signed char t1, signed char t2)
+{
+ return static_cast<unsigned char>(t1) < static_cast<unsigned char>(t2);
+}
+
+template <class charT, class traits>
+re_syntax_base* basic_regex_creator<charT, traits>::append_set(
+ const basic_char_set<charT, traits>& char_set, mpl::true_*)
+{
+ typedef typename traits::string_type string_type;
+ typedef typename basic_char_set<charT, traits>::list_iterator item_iterator;
+ typedef typename basic_char_set<charT, traits>::set_iterator set_iterator;
+
+ re_set* result = static_cast<re_set*>(append_state(syntax_element_set, sizeof(re_set)));
+ bool negate = char_set.is_negated();
+ std::memset(result->_map, 0, sizeof(result->_map));
+ //
+ // handle singles first:
+ //
+ item_iterator first, last;
+ set_iterator sfirst, slast;
+ sfirst = char_set.singles_begin();
+ slast = char_set.singles_end();
+ while(sfirst != slast)
+ {
+ for(unsigned int i = 0; i < (1 << CHAR_BIT); ++i)
+ {
+ if(this->m_traits.translate(static_cast<charT>(i), this->m_icase)
+ == this->m_traits.translate(sfirst->first, this->m_icase))
+ result->_map[i] = true;
+ }
+ ++sfirst;
+ }
+ //
+ // OK now handle ranges:
+ //
+ first = char_set.ranges_begin();
+ last = char_set.ranges_end();
+ while(first != last)
+ {
+ // first grab the endpoints of the range:
+ charT c1 = this->m_traits.translate(first->first, this->m_icase);
+ ++first;
+ charT c2 = this->m_traits.translate(first->first, this->m_icase);
+ ++first;
+ // different actions now depending upon whether collation is turned on:
+ if(flags() & regex_constants::collate)
+ {
+ // we need to transform our range into sort keys:
+ charT c3[2] = { c1, charT(0), };
+ string_type s1 = this->m_traits.transform(c3, c3+1);
+ c3[0] = c2;
+ string_type s2 = this->m_traits.transform(c3, c3+1);
+ if(s1 > s2)
+ {
+ // Oops error:
+ return 0;
+ }
+ BOOST_ASSERT(c3[1] == charT(0));
+ for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ c3[0] = static_cast<charT>(i);
+ string_type s3 = this->m_traits.transform(c3, c3 +1);
+ if((s1 <= s3) && (s3 <= s2))
+ result->_map[i] = true;
+ }
+ }
+ else
+ {
+ if(char_less(c2, c1))
+ {
+ // Oops error:
+ return 0;
+ }
+ // everything in range matches:
+ std::memset(result->_map + static_cast<unsigned char>(c1), true, 1 + static_cast<unsigned char>(c2) - static_cast<unsigned char>(c1));
+ }
+ }
+ //
+ // and now the classes:
+ //
+ typedef typename traits::char_class_type m_type;
+ m_type m = char_set.classes();
+ if(flags() & regbase::icase)
+ {
+ // adjust m as needed:
+ if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask))
+ m |= m_alpha_mask;
+ }
+ if(m != 0)
+ {
+ for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ if(this->m_traits.isctype(static_cast<charT>(i), m))
+ result->_map[i] = true;
+ }
+ }
+ //
+ // and now the negated classes:
+ //
+ m = char_set.negated_classes();
+ if(flags() & regbase::icase)
+ {
+ // adjust m as needed:
+ if(((m & m_lower_mask) == m_lower_mask) || ((m & m_upper_mask) == m_upper_mask))
+ m |= m_alpha_mask;
+ }
+ if(m != 0)
+ {
+ for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ if(0 == this->m_traits.isctype(static_cast<charT>(i), m))
+ result->_map[i] = true;
+ }
+ }
+ //
+ // now process the equivalence classes:
+ //
+ sfirst = char_set.equivalents_begin();
+ slast = char_set.equivalents_end();
+ while(sfirst != slast)
+ {
+ string_type s;
+ BOOST_ASSERT(static_cast<charT>(0) == sfirst->second);
+ s = m_traits.transform_primary(&sfirst->first, &sfirst->first+1);
+ if(s.empty())
+ return 0; // invalid or unsupported equivalence class
+ for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ charT c[2] = { (static_cast<charT>(i)), charT(0), };
+ string_type s2 = this->m_traits.transform_primary(c, c+1);
+ if(s == s2)
+ result->_map[i] = true;
+ }
+ ++sfirst;
+ }
+ if(negate)
+ {
+ for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ result->_map[i] = !(result->_map[i]);
+ }
+ }
+ return result;
+}
+
+template <class charT, class traits>
+void basic_regex_creator<charT, traits>::finalize(const charT* p1, const charT* p2)
+{
+ if(this->m_pdata->m_status)
+ return;
+ // we've added all the states we need, now finish things off.
+ // start by adding a terminating state:
+ append_state(syntax_element_match);
+ // extend storage to store original expression:
+ std::ptrdiff_t len = p2 - p1;
+ m_pdata->m_expression_len = len;
+ charT* ps = static_cast<charT*>(m_pdata->m_data.extend(sizeof(charT) * (1 + (p2 - p1))));
+ m_pdata->m_expression = ps;
+ BOOST_REGEX_DETAIL_NS::copy(p1, p2, ps);
+ ps[p2 - p1] = 0;
+ // fill in our other data...
+ // successful parsing implies a zero status:
+ m_pdata->m_status = 0;
+ // get the first state of the machine:
+ m_pdata->m_first_state = static_cast<re_syntax_base*>(m_pdata->m_data.data());
+ // fixup pointers in the machine:
+ fixup_pointers(m_pdata->m_first_state);
+ if(m_has_recursions)
+ {
+ m_pdata->m_has_recursions = true;
+ fixup_recursions(m_pdata->m_first_state);
+ if(this->m_pdata->m_status)
+ return;
+ }
+ else
+ m_pdata->m_has_recursions = false;
+ // create nested startmaps:
+ create_startmaps(m_pdata->m_first_state);
+ // create main startmap:
+ std::memset(m_pdata->m_startmap, 0, sizeof(m_pdata->m_startmap));
+ m_pdata->m_can_be_null = 0;
+
+ m_bad_repeats = 0;
+ if(m_has_recursions)
+ m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
+ create_startmap(m_pdata->m_first_state, m_pdata->m_startmap, &(m_pdata->m_can_be_null), mask_all);
+ // get the restart type:
+ m_pdata->m_restart_type = get_restart_type(m_pdata->m_first_state);
+ // optimise a leading repeat if there is one:
+ probe_leading_repeat(m_pdata->m_first_state);
+}
+
+template <class charT, class traits>
+void basic_regex_creator<charT, traits>::fixup_pointers(re_syntax_base* state)
+{
+ while(state)
+ {
+ switch(state->type)
+ {
+ case syntax_element_recurse:
+ m_has_recursions = true;
+ if(state->next.i)
+ state->next.p = getaddress(state->next.i, state);
+ else
+ state->next.p = 0;
+ break;
+ case syntax_element_rep:
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_long_set_rep:
+ // set the state_id of this repeat:
+ static_cast<re_repeat*>(state)->state_id = m_repeater_id++;
+ BOOST_FALLTHROUGH;
+ case syntax_element_alt:
+ std::memset(static_cast<re_alt*>(state)->_map, 0, sizeof(static_cast<re_alt*>(state)->_map));
+ static_cast<re_alt*>(state)->can_be_null = 0;
+ BOOST_FALLTHROUGH;
+ case syntax_element_jump:
+ static_cast<re_jump*>(state)->alt.p = getaddress(static_cast<re_jump*>(state)->alt.i, state);
+ BOOST_FALLTHROUGH;
+ default:
+ if(state->next.i)
+ state->next.p = getaddress(state->next.i, state);
+ else
+ state->next.p = 0;
+ }
+ state = state->next.p;
+ }
+}
+
+template <class charT, class traits>
+void basic_regex_creator<charT, traits>::fixup_recursions(re_syntax_base* state)
+{
+ re_syntax_base* base = state;
+ while(state)
+ {
+ switch(state->type)
+ {
+ case syntax_element_assert_backref:
+ {
+ // just check that the index is valid:
+ int idx = static_cast<const re_brace*>(state)->index;
+ if(idx < 0)
+ {
+ idx = -idx-1;
+ if(idx >= 10000)
+ {
+ idx = m_pdata->get_id(idx);
+ if(idx <= 0)
+ {
+ // check of sub-expression that doesn't exist:
+ if(0 == this->m_pdata->m_status) // update the error code if not already set
+ this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
+ //
+ // clear the expression, we should be empty:
+ //
+ this->m_pdata->m_expression = 0;
+ this->m_pdata->m_expression_len = 0;
+ //
+ // and throw if required:
+ //
+ if(0 == (this->flags() & regex_constants::no_except))
+ {
+ std::string message = "Encountered a forward reference to a marked sub-expression that does not exist.";
+ boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
+ e.raise();
+ }
+ }
+ }
+ }
+ }
+ break;
+ case syntax_element_recurse:
+ {
+ bool ok = false;
+ re_syntax_base* p = base;
+ std::ptrdiff_t idx = static_cast<re_jump*>(state)->alt.i;
+ if(idx > 10000)
+ {
+ //
+ // There may be more than one capture group with this hash, just do what Perl
+ // does and recurse to the leftmost:
+ //
+ idx = m_pdata->get_id(static_cast<int>(idx));
+ }
+ if(idx < 0)
+ {
+ ok = false;
+ }
+ else
+ {
+ while(p)
+ {
+ if((p->type == syntax_element_startmark) && (static_cast<re_brace*>(p)->index == idx))
+ {
+ //
+ // We've found the target of the recursion, set the jump target:
+ //
+ static_cast<re_jump*>(state)->alt.p = p;
+ ok = true;
+ //
+ // Now scan the target for nested repeats:
+ //
+ p = p->next.p;
+ int next_rep_id = 0;
+ while(p)
+ {
+ switch(p->type)
+ {
+ case syntax_element_rep:
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_long_set_rep:
+ next_rep_id = static_cast<re_repeat*>(p)->state_id;
+ break;
+ case syntax_element_endmark:
+ if(static_cast<const re_brace*>(p)->index == idx)
+ next_rep_id = -1;
+ break;
+ default:
+ break;
+ }
+ if(next_rep_id)
+ break;
+ p = p->next.p;
+ }
+ if(next_rep_id > 0)
+ {
+ static_cast<re_recurse*>(state)->state_id = next_rep_id - 1;
+ }
+
+ break;
+ }
+ p = p->next.p;
+ }
+ }
+ if(!ok)
+ {
+ // recursion to sub-expression that doesn't exist:
+ if(0 == this->m_pdata->m_status) // update the error code if not already set
+ this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
+ //
+ // clear the expression, we should be empty:
+ //
+ this->m_pdata->m_expression = 0;
+ this->m_pdata->m_expression_len = 0;
+ //
+ // and throw if required:
+ //
+ if(0 == (this->flags() & regex_constants::no_except))
+ {
+ std::string message = "Encountered a forward reference to a recursive sub-expression that does not exist.";
+ boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
+ e.raise();
+ }
+ }
+ }
+ break;
+ default:
+ break;
+ }
+ state = state->next.p;
+ }
+}
+
+template <class charT, class traits>
+void basic_regex_creator<charT, traits>::create_startmaps(re_syntax_base* state)
+{
+ // non-recursive implementation:
+ // create the last map in the machine first, so that earlier maps
+ // can make use of the result...
+ //
+ // This was originally a recursive implementation, but that caused stack
+ // overflows with complex expressions on small stacks (think COM+).
+
+ // start by saving the case setting:
+ bool l_icase = m_icase;
+ std::vector<std::pair<bool, re_syntax_base*> > v;
+
+ while(state)
+ {
+ switch(state->type)
+ {
+ case syntax_element_toggle_case:
+ // we need to track case changes here:
+ m_icase = static_cast<re_case*>(state)->icase;
+ state = state->next.p;
+ continue;
+ case syntax_element_alt:
+ case syntax_element_rep:
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_long_set_rep:
+ // just push the state onto our stack for now:
+ v.push_back(std::pair<bool, re_syntax_base*>(m_icase, state));
+ state = state->next.p;
+ break;
+ case syntax_element_backstep:
+ // we need to calculate how big the backstep is:
+ static_cast<re_brace*>(state)->index
+ = this->calculate_backstep(state->next.p);
+ if(static_cast<re_brace*>(state)->index < 0)
+ {
+ // Oops error:
+ if(0 == this->m_pdata->m_status) // update the error code if not already set
+ this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
+ //
+ // clear the expression, we should be empty:
+ //
+ this->m_pdata->m_expression = 0;
+ this->m_pdata->m_expression_len = 0;
+ //
+ // and throw if required:
+ //
+ if(0 == (this->flags() & regex_constants::no_except))
+ {
+ std::string message = "Invalid lookbehind assertion encountered in the regular expression.";
+ boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
+ e.raise();
+ }
+ }
+ BOOST_FALLTHROUGH;
+ default:
+ state = state->next.p;
+ }
+ }
+
+ // now work through our list, building all the maps as we go:
+ while(v.size())
+ {
+ // Initialize m_recursion_checks if we need it:
+ if(m_has_recursions)
+ m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
+
+ const std::pair<bool, re_syntax_base*>& p = v.back();
+ m_icase = p.first;
+ state = p.second;
+ v.pop_back();
+
+ // Build maps:
+ m_bad_repeats = 0;
+ create_startmap(state->next.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_take);
+ m_bad_repeats = 0;
+
+ if(m_has_recursions)
+ m_recursion_checks.assign(1 + m_pdata->m_mark_count, 0u);
+ create_startmap(static_cast<re_alt*>(state)->alt.p, static_cast<re_alt*>(state)->_map, &static_cast<re_alt*>(state)->can_be_null, mask_skip);
+ // adjust the type of the state to allow for faster matching:
+ state->type = this->get_repeat_type(state);
+ }
+ // restore case sensitivity:
+ m_icase = l_icase;
+}
+
+template <class charT, class traits>
+int basic_regex_creator<charT, traits>::calculate_backstep(re_syntax_base* state)
+{
+ typedef typename traits::char_class_type m_type;
+ int result = 0;
+ while(state)
+ {
+ switch(state->type)
+ {
+ case syntax_element_startmark:
+ if((static_cast<re_brace*>(state)->index == -1)
+ || (static_cast<re_brace*>(state)->index == -2))
+ {
+ state = static_cast<re_jump*>(state->next.p)->alt.p->next.p;
+ continue;
+ }
+ else if(static_cast<re_brace*>(state)->index == -3)
+ {
+ state = state->next.p->next.p;
+ continue;
+ }
+ break;
+ case syntax_element_endmark:
+ if((static_cast<re_brace*>(state)->index == -1)
+ || (static_cast<re_brace*>(state)->index == -2))
+ return result;
+ break;
+ case syntax_element_literal:
+ result += static_cast<re_literal*>(state)->length;
+ break;
+ case syntax_element_wild:
+ case syntax_element_set:
+ result += 1;
+ break;
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_backref:
+ case syntax_element_rep:
+ case syntax_element_combining:
+ case syntax_element_long_set_rep:
+ case syntax_element_backstep:
+ {
+ re_repeat* rep = static_cast<re_repeat *>(state);
+ // adjust the type of the state to allow for faster matching:
+ state->type = this->get_repeat_type(state);
+ if((state->type == syntax_element_dot_rep)
+ || (state->type == syntax_element_char_rep)
+ || (state->type == syntax_element_short_set_rep))
+ {
+ if(rep->max != rep->min)
+ return -1;
+ result += static_cast<int>(rep->min);
+ state = rep->alt.p;
+ continue;
+ }
+ else if(state->type == syntax_element_long_set_rep)
+ {
+ BOOST_ASSERT(rep->next.p->type == syntax_element_long_set);
+ if(static_cast<re_set_long<m_type>*>(rep->next.p)->singleton == 0)
+ return -1;
+ if(rep->max != rep->min)
+ return -1;
+ result += static_cast<int>(rep->min);
+ state = rep->alt.p;
+ continue;
+ }
+ }
+ return -1;
+ case syntax_element_long_set:
+ if(static_cast<re_set_long<m_type>*>(state)->singleton == 0)
+ return -1;
+ result += 1;
+ break;
+ case syntax_element_jump:
+ state = static_cast<re_jump*>(state)->alt.p;
+ continue;
+ case syntax_element_alt:
+ {
+ int r1 = calculate_backstep(state->next.p);
+ int r2 = calculate_backstep(static_cast<re_alt*>(state)->alt.p);
+ if((r1 < 0) || (r1 != r2))
+ return -1;
+ return result + r1;
+ }
+ default:
+ break;
+ }
+ state = state->next.p;
+ }
+ return -1;
+}
+
+template <class charT, class traits>
+void basic_regex_creator<charT, traits>::create_startmap(re_syntax_base* state, unsigned char* l_map, unsigned int* pnull, unsigned char mask)
+{
+ int not_last_jump = 1;
+ re_syntax_base* recursion_start = 0;
+ int recursion_sub = 0;
+ re_syntax_base* recursion_restart = 0;
+
+ // track case sensitivity:
+ bool l_icase = m_icase;
+
+ while(state)
+ {
+ switch(state->type)
+ {
+ case syntax_element_toggle_case:
+ l_icase = static_cast<re_case*>(state)->icase;
+ state = state->next.p;
+ break;
+ case syntax_element_literal:
+ {
+ // don't set anything in *pnull, set each element in l_map
+ // that could match the first character in the literal:
+ if(l_map)
+ {
+ l_map[0] |= mask_init;
+ charT first_char = *static_cast<charT*>(static_cast<void*>(static_cast<re_literal*>(state) + 1));
+ for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ if(m_traits.translate(static_cast<charT>(i), l_icase) == first_char)
+ l_map[i] |= mask;
+ }
+ }
+ return;
+ }
+ case syntax_element_end_line:
+ {
+ // next character must be a line separator (if there is one):
+ if(l_map)
+ {
+ l_map[0] |= mask_init;
+ l_map[static_cast<unsigned>('\n')] |= mask;
+ l_map[static_cast<unsigned>('\r')] |= mask;
+ l_map[static_cast<unsigned>('\f')] |= mask;
+ l_map[0x85] |= mask;
+ }
+ // now figure out if we can match a NULL string at this point:
+ if(pnull)
+ create_startmap(state->next.p, 0, pnull, mask);
+ return;
+ }
+ case syntax_element_recurse:
+ {
+ BOOST_ASSERT(static_cast<const re_jump*>(state)->alt.p->type == syntax_element_startmark);
+ recursion_sub = static_cast<re_brace*>(static_cast<const re_jump*>(state)->alt.p)->index;
+ if(m_recursion_checks[recursion_sub] & 1u)
+ {
+ // Infinite recursion!!
+ if(0 == this->m_pdata->m_status) // update the error code if not already set
+ this->m_pdata->m_status = boost::regex_constants::error_bad_pattern;
+ //
+ // clear the expression, we should be empty:
+ //
+ this->m_pdata->m_expression = 0;
+ this->m_pdata->m_expression_len = 0;
+ //
+ // and throw if required:
+ //
+ if(0 == (this->flags() & regex_constants::no_except))
+ {
+ std::string message = "Encountered an infinite recursion.";
+ boost::regex_error e(message, boost::regex_constants::error_bad_pattern, 0);
+ e.raise();
+ }
+ }
+ else if(recursion_start == 0)
+ {
+ recursion_start = state;
+ recursion_restart = state->next.p;
+ state = static_cast<re_jump*>(state)->alt.p;
+ m_recursion_checks[recursion_sub] |= 1u;
+ break;
+ }
+ m_recursion_checks[recursion_sub] |= 1u;
+ // can't handle nested recursion here...
+ BOOST_FALLTHROUGH;
+ }
+ case syntax_element_backref:
+ // can be null, and any character can match:
+ if(pnull)
+ *pnull |= mask;
+ BOOST_FALLTHROUGH;
+ case syntax_element_wild:
+ {
+ // can't be null, any character can match:
+ set_all_masks(l_map, mask);
+ return;
+ }
+ case syntax_element_accept:
+ case syntax_element_match:
+ {
+ // must be null, any character can match:
+ set_all_masks(l_map, mask);
+ if(pnull)
+ *pnull |= mask;
+ return;
+ }
+ case syntax_element_word_start:
+ {
+ // recurse, then AND with all the word characters:
+ create_startmap(state->next.p, l_map, pnull, mask);
+ if(l_map)
+ {
+ l_map[0] |= mask_init;
+ for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ if(!m_traits.isctype(static_cast<charT>(i), m_word_mask))
+ l_map[i] &= static_cast<unsigned char>(~mask);
+ }
+ }
+ return;
+ }
+ case syntax_element_word_end:
+ {
+ // recurse, then AND with all the word characters:
+ create_startmap(state->next.p, l_map, pnull, mask);
+ if(l_map)
+ {
+ l_map[0] |= mask_init;
+ for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ if(m_traits.isctype(static_cast<charT>(i), m_word_mask))
+ l_map[i] &= static_cast<unsigned char>(~mask);
+ }
+ }
+ return;
+ }
+ case syntax_element_buffer_end:
+ {
+ // we *must be null* :
+ if(pnull)
+ *pnull |= mask;
+ return;
+ }
+ case syntax_element_long_set:
+ if(l_map)
+ {
+ typedef typename traits::char_class_type m_type;
+ if(static_cast<re_set_long<m_type>*>(state)->singleton)
+ {
+ l_map[0] |= mask_init;
+ for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ charT c = static_cast<charT>(i);
+ if(&c != re_is_set_member(&c, &c + 1, static_cast<re_set_long<m_type>*>(state), *m_pdata, l_icase))
+ l_map[i] |= mask;
+ }
+ }
+ else
+ set_all_masks(l_map, mask);
+ }
+ return;
+ case syntax_element_set:
+ if(l_map)
+ {
+ l_map[0] |= mask_init;
+ for(unsigned int i = 0; i < (1u << CHAR_BIT); ++i)
+ {
+ if(static_cast<re_set*>(state)->_map[
+ static_cast<unsigned char>(m_traits.translate(static_cast<charT>(i), l_icase))])
+ l_map[i] |= mask;
+ }
+ }
+ return;
+ case syntax_element_jump:
+ // take the jump:
+ state = static_cast<re_alt*>(state)->alt.p;
+ not_last_jump = -1;
+ break;
+ case syntax_element_alt:
+ case syntax_element_rep:
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_long_set_rep:
+ {
+ re_alt* rep = static_cast<re_alt*>(state);
+ if(rep->_map[0] & mask_init)
+ {
+ if(l_map)
+ {
+ // copy previous results:
+ l_map[0] |= mask_init;
+ for(unsigned int i = 0; i <= UCHAR_MAX; ++i)
+ {
+ if(rep->_map[i] & mask_any)
+ l_map[i] |= mask;
+ }
+ }
+ if(pnull)
+ {
+ if(rep->can_be_null & mask_any)
+ *pnull |= mask;
+ }
+ }
+ else
+ {
+ // we haven't created a startmap for this alternative yet
+ // so take the union of the two options:
+ if(is_bad_repeat(state))
+ {
+ set_all_masks(l_map, mask);
+ if(pnull)
+ *pnull |= mask;
+ return;
+ }
+ set_bad_repeat(state);
+ create_startmap(state->next.p, l_map, pnull, mask);
+ if((state->type == syntax_element_alt)
+ || (static_cast<re_repeat*>(state)->min == 0)
+ || (not_last_jump == 0))
+ create_startmap(rep->alt.p, l_map, pnull, mask);
+ }
+ }
+ return;
+ case syntax_element_soft_buffer_end:
+ // match newline or null:
+ if(l_map)
+ {
+ l_map[0] |= mask_init;
+ l_map[static_cast<unsigned>('\n')] |= mask;
+ l_map[static_cast<unsigned>('\r')] |= mask;
+ }
+ if(pnull)
+ *pnull |= mask;
+ return;
+ case syntax_element_endmark:
+ // need to handle independent subs as a special case:
+ if(static_cast<re_brace*>(state)->index < 0)
+ {
+ // can be null, any character can match:
+ set_all_masks(l_map, mask);
+ if(pnull)
+ *pnull |= mask;
+ return;
+ }
+ else if(recursion_start && (recursion_sub != 0) && (recursion_sub == static_cast<re_brace*>(state)->index))
+ {
+ // recursion termination:
+ recursion_start = 0;
+ state = recursion_restart;
+ break;
+ }
+
+ //
+ // Normally we just go to the next state... but if this sub-expression is
+ // the target of a recursion, then we might be ending a recursion, in which
+ // case we should check whatever follows that recursion, as well as whatever
+ // follows this state:
+ //
+ if(m_pdata->m_has_recursions && static_cast<re_brace*>(state)->index)
+ {
+ bool ok = false;
+ re_syntax_base* p = m_pdata->m_first_state;
+ while(p)
+ {
+ if(p->type == syntax_element_recurse)
+ {
+ re_brace* p2 = static_cast<re_brace*>(static_cast<re_jump*>(p)->alt.p);
+ if((p2->type == syntax_element_startmark) && (p2->index == static_cast<re_brace*>(state)->index))
+ {
+ ok = true;
+ break;
+ }
+ }
+ p = p->next.p;
+ }
+ if(ok && ((m_recursion_checks[static_cast<re_brace*>(state)->index] & 2u) == 0))
+ {
+ m_recursion_checks[static_cast<re_brace*>(state)->index] |= 2u;
+ create_startmap(p->next.p, l_map, pnull, mask);
+ }
+ }
+ state = state->next.p;
+ break;
+
+ case syntax_element_commit:
+ set_all_masks(l_map, mask);
+ // Continue scanning so we can figure out whether we can be null:
+ state = state->next.p;
+ break;
+ case syntax_element_startmark:
+ // need to handle independent subs as a special case:
+ if(static_cast<re_brace*>(state)->index == -3)
+ {
+ state = state->next.p->next.p;
+ break;
+ }
+ BOOST_FALLTHROUGH;
+ default:
+ state = state->next.p;
+ }
+ ++not_last_jump;
+ }
+}
+
+template <class charT, class traits>
+unsigned basic_regex_creator<charT, traits>::get_restart_type(re_syntax_base* state)
+{
+ //
+ // find out how the machine starts, so we can optimise the search:
+ //
+ while(state)
+ {
+ switch(state->type)
+ {
+ case syntax_element_startmark:
+ case syntax_element_endmark:
+ state = state->next.p;
+ continue;
+ case syntax_element_start_line:
+ return regbase::restart_line;
+ case syntax_element_word_start:
+ return regbase::restart_word;
+ case syntax_element_buffer_start:
+ return regbase::restart_buf;
+ case syntax_element_restart_continue:
+ return regbase::restart_continue;
+ default:
+ state = 0;
+ continue;
+ }
+ }
+ return regbase::restart_any;
+}
+
+template <class charT, class traits>
+void basic_regex_creator<charT, traits>::set_all_masks(unsigned char* bits, unsigned char mask)
+{
+ //
+ // set mask in all of bits elements,
+ // if bits[0] has mask_init not set then we can
+ // optimise this to a call to memset:
+ //
+ if(bits)
+ {
+ if(bits[0] == 0)
+ (std::memset)(bits, mask, 1u << CHAR_BIT);
+ else
+ {
+ for(unsigned i = 0; i < (1u << CHAR_BIT); ++i)
+ bits[i] |= mask;
+ }
+ bits[0] |= mask_init;
+ }
+}
+
+template <class charT, class traits>
+bool basic_regex_creator<charT, traits>::is_bad_repeat(re_syntax_base* pt)
+{
+ switch(pt->type)
+ {
+ case syntax_element_rep:
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_long_set_rep:
+ {
+ unsigned state_id = static_cast<re_repeat*>(pt)->state_id;
+ if(state_id >= sizeof(m_bad_repeats) * CHAR_BIT)
+ return true; // run out of bits, assume we can't traverse this one.
+ static const boost::uintmax_t one = 1uL;
+ return m_bad_repeats & (one << state_id);
+ }
+ default:
+ return false;
+ }
+}
+
+template <class charT, class traits>
+void basic_regex_creator<charT, traits>::set_bad_repeat(re_syntax_base* pt)
+{
+ switch(pt->type)
+ {
+ case syntax_element_rep:
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_long_set_rep:
+ {
+ unsigned state_id = static_cast<re_repeat*>(pt)->state_id;
+ static const boost::uintmax_t one = 1uL;
+ if(state_id <= sizeof(m_bad_repeats) * CHAR_BIT)
+ m_bad_repeats |= (one << state_id);
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+template <class charT, class traits>
+syntax_element_type basic_regex_creator<charT, traits>::get_repeat_type(re_syntax_base* state)
+{
+ typedef typename traits::char_class_type m_type;
+ if(state->type == syntax_element_rep)
+ {
+ // check to see if we are repeating a single state:
+ if(state->next.p->next.p->next.p == static_cast<re_alt*>(state)->alt.p)
+ {
+ switch(state->next.p->type)
+ {
+ case BOOST_REGEX_DETAIL_NS::syntax_element_wild:
+ return BOOST_REGEX_DETAIL_NS::syntax_element_dot_rep;
+ case BOOST_REGEX_DETAIL_NS::syntax_element_literal:
+ return BOOST_REGEX_DETAIL_NS::syntax_element_char_rep;
+ case BOOST_REGEX_DETAIL_NS::syntax_element_set:
+ return BOOST_REGEX_DETAIL_NS::syntax_element_short_set_rep;
+ case BOOST_REGEX_DETAIL_NS::syntax_element_long_set:
+ if(static_cast<BOOST_REGEX_DETAIL_NS::re_set_long<m_type>*>(state->next.p)->singleton)
+ return BOOST_REGEX_DETAIL_NS::syntax_element_long_set_rep;
+ break;
+ default:
+ break;
+ }
+ }
+ }
+ return state->type;
+}
+
+template <class charT, class traits>
+void basic_regex_creator<charT, traits>::probe_leading_repeat(re_syntax_base* state)
+{
+ // enumerate our states, and see if we have a leading repeat
+ // for which failed search restarts can be optimised;
+ do
+ {
+ switch(state->type)
+ {
+ case syntax_element_startmark:
+ if(static_cast<re_brace*>(state)->index >= 0)
+ {
+ state = state->next.p;
+ continue;
+ }
+ if((static_cast<re_brace*>(state)->index == -1)
+ || (static_cast<re_brace*>(state)->index == -2))
+ {
+ // skip past the zero width assertion:
+ state = static_cast<const re_jump*>(state->next.p)->alt.p->next.p;
+ continue;
+ }
+ if(static_cast<re_brace*>(state)->index == -3)
+ {
+ // Have to skip the leading jump state:
+ state = state->next.p->next.p;
+ continue;
+ }
+ return;
+ case syntax_element_endmark:
+ case syntax_element_start_line:
+ case syntax_element_end_line:
+ case syntax_element_word_boundary:
+ case syntax_element_within_word:
+ case syntax_element_word_start:
+ case syntax_element_word_end:
+ case syntax_element_buffer_start:
+ case syntax_element_buffer_end:
+ case syntax_element_restart_continue:
+ state = state->next.p;
+ break;
+ case syntax_element_dot_rep:
+ case syntax_element_char_rep:
+ case syntax_element_short_set_rep:
+ case syntax_element_long_set_rep:
+ if(this->m_has_backrefs == 0)
+ static_cast<re_repeat*>(state)->leading = true;
+ BOOST_FALLTHROUGH;
+ default:
+ return;
+ }
+ }while(state);
+}
+
+
+} // namespace BOOST_REGEX_DETAIL_NS
+
+} // namespace boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_parser.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_parser.hpp
new file mode 100644
index 00000000000..6c7065f057b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/basic_regex_parser.hpp
@@ -0,0 +1,3143 @@
+/*
+ *
+ * Copyright (c) 2004
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE basic_regex_parser.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares template class basic_regex_parser.
+ */
+
+#ifndef BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP
+#define BOOST_REGEX_V4_BASIC_REGEX_PARSER_HPP
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+namespace boost{
+namespace BOOST_REGEX_DETAIL_NS{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4244)
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
+#endif
+
+inline boost::intmax_t umax(mpl::false_ const&)
+{
+ // Get out clause here, just in case numeric_limits is unspecialized:
+ return std::numeric_limits<boost::intmax_t>::is_specialized ? (std::numeric_limits<boost::intmax_t>::max)() : INT_MAX;
+}
+inline boost::intmax_t umax(mpl::true_ const&)
+{
+ return (std::numeric_limits<std::size_t>::max)();
+}
+
+inline boost::intmax_t umax()
+{
+ return umax(mpl::bool_<std::numeric_limits<boost::intmax_t>::digits >= std::numeric_limits<std::size_t>::digits>());
+}
+
+template <class charT, class traits>
+class basic_regex_parser : public basic_regex_creator<charT, traits>
+{
+public:
+ basic_regex_parser(regex_data<charT, traits>* data);
+ void parse(const charT* p1, const charT* p2, unsigned flags);
+ void fail(regex_constants::error_type error_code, std::ptrdiff_t position);
+ void fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos);
+ void fail(regex_constants::error_type error_code, std::ptrdiff_t position, const std::string& message)
+ {
+ fail(error_code, position, message, position);
+ }
+
+ bool parse_all();
+ bool parse_basic();
+ bool parse_extended();
+ bool parse_literal();
+ bool parse_open_paren();
+ bool parse_basic_escape();
+ bool parse_extended_escape();
+ bool parse_match_any();
+ bool parse_repeat(std::size_t low = 0, std::size_t high = (std::numeric_limits<std::size_t>::max)());
+ bool parse_repeat_range(bool isbasic);
+ bool parse_alt();
+ bool parse_set();
+ bool parse_backref();
+ void parse_set_literal(basic_char_set<charT, traits>& char_set);
+ bool parse_inner_set(basic_char_set<charT, traits>& char_set);
+ bool parse_QE();
+ bool parse_perl_extension();
+ bool parse_perl_verb();
+ bool match_verb(const char*);
+ bool add_emacs_code(bool negate);
+ bool unwind_alts(std::ptrdiff_t last_paren_start);
+ digraph<charT> get_next_set_literal(basic_char_set<charT, traits>& char_set);
+ charT unescape_character();
+ regex_constants::syntax_option_type parse_options();
+
+private:
+ typedef bool (basic_regex_parser::*parser_proc_type)();
+ typedef typename traits::string_type string_type;
+ typedef typename traits::char_class_type char_class_type;
+ parser_proc_type m_parser_proc; // the main parser to use
+ const charT* m_base; // the start of the string being parsed
+ const charT* m_end; // the end of the string being parsed
+ const charT* m_position; // our current parser position
+ unsigned m_mark_count; // how many sub-expressions we have
+ int m_mark_reset; // used to indicate that we're inside a (?|...) block.
+ unsigned m_max_mark; // largest mark count seen inside a (?|...) block.
+ std::ptrdiff_t m_paren_start; // where the last seen ')' began (where repeats are inserted).
+ std::ptrdiff_t m_alt_insert_point; // where to insert the next alternative
+ bool m_has_case_change; // true if somewhere in the current block the case has changed
+ unsigned m_recursion_count; // How many times we've called parse_all.
+#if defined(BOOST_MSVC) && defined(_M_IX86)
+ // This is an ugly warning suppression workaround (for warnings *inside* std::vector
+ // that can not otherwise be suppressed)...
+ BOOST_STATIC_ASSERT(sizeof(long) >= sizeof(void*));
+ std::vector<long> m_alt_jumps; // list of alternative in the current scope.
+#else
+ std::vector<std::ptrdiff_t> m_alt_jumps; // list of alternative in the current scope.
+#endif
+
+ basic_regex_parser& operator=(const basic_regex_parser&);
+ basic_regex_parser(const basic_regex_parser&);
+};
+
+template <class charT, class traits>
+basic_regex_parser<charT, traits>::basic_regex_parser(regex_data<charT, traits>* data)
+ : basic_regex_creator<charT, traits>(data), m_mark_count(0), m_mark_reset(-1), m_max_mark(0), m_paren_start(0), m_alt_insert_point(0), m_has_case_change(false), m_recursion_count(0)
+{
+}
+
+template <class charT, class traits>
+void basic_regex_parser<charT, traits>::parse(const charT* p1, const charT* p2, unsigned l_flags)
+{
+ // pass l_flags on to base class:
+ this->init(l_flags);
+ // set up pointers:
+ m_position = m_base = p1;
+ m_end = p2;
+ // empty strings are errors:
+ if((p1 == p2) &&
+ (
+ ((l_flags & regbase::main_option_type) != regbase::perl_syntax_group)
+ || (l_flags & regbase::no_empty_expressions)
+ )
+ )
+ {
+ fail(regex_constants::error_empty, 0);
+ return;
+ }
+ // select which parser to use:
+ switch(l_flags & regbase::main_option_type)
+ {
+ case regbase::perl_syntax_group:
+ {
+ m_parser_proc = &basic_regex_parser<charT, traits>::parse_extended;
+ //
+ // Add a leading paren with index zero to give recursions a target:
+ //
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
+ br->index = 0;
+ br->icase = this->flags() & regbase::icase;
+ break;
+ }
+ case regbase::basic_syntax_group:
+ m_parser_proc = &basic_regex_parser<charT, traits>::parse_basic;
+ break;
+ case regbase::literal:
+ m_parser_proc = &basic_regex_parser<charT, traits>::parse_literal;
+ break;
+ default:
+ // Ooops, someone has managed to set more than one of the main option flags,
+ // so this must be an error:
+ fail(regex_constants::error_unknown, 0, "An invalid combination of regular expression syntax flags was used.");
+ return;
+ }
+
+ // parse all our characters:
+ bool result = parse_all();
+ //
+ // Unwind our alternatives:
+ //
+ unwind_alts(-1);
+ // reset l_flags as a global scope (?imsx) may have altered them:
+ this->flags(l_flags);
+ // if we haven't gobbled up all the characters then we must
+ // have had an unexpected ')' :
+ if(!result)
+ {
+ fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_position), "Found a closing ) with no corresponding opening parenthesis.");
+ return;
+ }
+ // if an error has been set then give up now:
+ if(this->m_pdata->m_status)
+ return;
+ // fill in our sub-expression count:
+ this->m_pdata->m_mark_count = 1 + m_mark_count;
+ this->finalize(p1, p2);
+}
+
+template <class charT, class traits>
+void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position)
+{
+ // get the error message:
+ std::string message = this->m_pdata->m_ptraits->error_string(error_code);
+ fail(error_code, position, message);
+}
+
+template <class charT, class traits>
+void basic_regex_parser<charT, traits>::fail(regex_constants::error_type error_code, std::ptrdiff_t position, std::string message, std::ptrdiff_t start_pos)
+{
+ if(0 == this->m_pdata->m_status) // update the error code if not already set
+ this->m_pdata->m_status = error_code;
+ m_position = m_end; // don't bother parsing anything else
+
+#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+ //
+ // Augment error message with the regular expression text:
+ //
+ if(start_pos == position)
+ start_pos = (std::max)(static_cast<std::ptrdiff_t>(0), position - static_cast<std::ptrdiff_t>(10));
+ std::ptrdiff_t end_pos = (std::min)(position + static_cast<std::ptrdiff_t>(10), static_cast<std::ptrdiff_t>(m_end - m_base));
+ if(error_code != regex_constants::error_empty)
+ {
+ if((start_pos != 0) || (end_pos != (m_end - m_base)))
+ message += " The error occurred while parsing the regular expression fragment: '";
+ else
+ message += " The error occurred while parsing the regular expression: '";
+ if(start_pos != end_pos)
+ {
+ message += std::string(m_base + start_pos, m_base + position);
+ message += ">>>HERE>>>";
+ message += std::string(m_base + position, m_base + end_pos);
+ }
+ message += "'.";
+ }
+#endif
+
+#ifndef BOOST_NO_EXCEPTIONS
+ if(0 == (this->flags() & regex_constants::no_except))
+ {
+ boost::regex_error e(message, error_code, position);
+ e.raise();
+ }
+#else
+ (void)position; // suppress warnings.
+#endif
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_all()
+{
+ if (++m_recursion_count > 400)
+ {
+ // exceeded internal limits
+ fail(boost::regex_constants::error_complexity, m_position - m_base, "Exceeded nested brace limit.");
+ }
+ bool result = true;
+ while(result && (m_position != m_end))
+ {
+ result = (this->*m_parser_proc)();
+ }
+ --m_recursion_count;
+ return result;
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4702)
+#endif
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_basic()
+{
+ switch(this->m_traits.syntax_type(*m_position))
+ {
+ case regex_constants::syntax_escape:
+ return parse_basic_escape();
+ case regex_constants::syntax_dot:
+ return parse_match_any();
+ case regex_constants::syntax_caret:
+ ++m_position;
+ this->append_state(syntax_element_start_line);
+ break;
+ case regex_constants::syntax_dollar:
+ ++m_position;
+ this->append_state(syntax_element_end_line);
+ break;
+ case regex_constants::syntax_star:
+ if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line))
+ return parse_literal();
+ else
+ {
+ ++m_position;
+ return parse_repeat();
+ }
+ case regex_constants::syntax_plus:
+ if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex))
+ return parse_literal();
+ else
+ {
+ ++m_position;
+ return parse_repeat(1);
+ }
+ case regex_constants::syntax_question:
+ if(!(this->m_last_state) || (this->m_last_state->type == syntax_element_start_line) || !(this->flags() & regbase::emacs_ex))
+ return parse_literal();
+ else
+ {
+ ++m_position;
+ return parse_repeat(0, 1);
+ }
+ case regex_constants::syntax_open_set:
+ return parse_set();
+ case regex_constants::syntax_newline:
+ if(this->flags() & regbase::newline_alt)
+ return parse_alt();
+ else
+ return parse_literal();
+ default:
+ return parse_literal();
+ }
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_extended()
+{
+ bool result = true;
+ switch(this->m_traits.syntax_type(*m_position))
+ {
+ case regex_constants::syntax_open_mark:
+ return parse_open_paren();
+ case regex_constants::syntax_close_mark:
+ return false;
+ case regex_constants::syntax_escape:
+ return parse_extended_escape();
+ case regex_constants::syntax_dot:
+ return parse_match_any();
+ case regex_constants::syntax_caret:
+ ++m_position;
+ this->append_state(
+ (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_start : syntax_element_start_line));
+ break;
+ case regex_constants::syntax_dollar:
+ ++m_position;
+ this->append_state(
+ (this->flags() & regex_constants::no_mod_m ? syntax_element_buffer_end : syntax_element_end_line));
+ break;
+ case regex_constants::syntax_star:
+ if(m_position == this->m_base)
+ {
+ fail(regex_constants::error_badrepeat, 0, "The repeat operator \"*\" cannot start a regular expression.");
+ return false;
+ }
+ ++m_position;
+ return parse_repeat();
+ case regex_constants::syntax_question:
+ if(m_position == this->m_base)
+ {
+ fail(regex_constants::error_badrepeat, 0, "The repeat operator \"?\" cannot start a regular expression.");
+ return false;
+ }
+ ++m_position;
+ return parse_repeat(0,1);
+ case regex_constants::syntax_plus:
+ if(m_position == this->m_base)
+ {
+ fail(regex_constants::error_badrepeat, 0, "The repeat operator \"+\" cannot start a regular expression.");
+ return false;
+ }
+ ++m_position;
+ return parse_repeat(1);
+ case regex_constants::syntax_open_brace:
+ ++m_position;
+ return parse_repeat_range(false);
+ case regex_constants::syntax_close_brace:
+ if((this->flags() & regbase::no_perl_ex) == regbase::no_perl_ex)
+ {
+ fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {.");
+ return false;
+ }
+ result = parse_literal();
+ break;
+ case regex_constants::syntax_or:
+ return parse_alt();
+ case regex_constants::syntax_open_set:
+ return parse_set();
+ case regex_constants::syntax_newline:
+ if(this->flags() & regbase::newline_alt)
+ return parse_alt();
+ else
+ return parse_literal();
+ case regex_constants::syntax_hash:
+ //
+ // If we have a mod_x flag set, then skip until
+ // we get to a newline character:
+ //
+ if((this->flags()
+ & (regbase::no_perl_ex|regbase::mod_x))
+ == regbase::mod_x)
+ {
+ while((m_position != m_end) && !is_separator(*m_position++)){}
+ return true;
+ }
+ BOOST_FALLTHROUGH;
+ default:
+ result = parse_literal();
+ break;
+ }
+ return result;
+}
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_literal()
+{
+ // append this as a literal provided it's not a space character
+ // or the perl option regbase::mod_x is not set:
+ if(
+ ((this->flags()
+ & (regbase::main_option_type|regbase::mod_x|regbase::no_perl_ex))
+ != regbase::mod_x)
+ || !this->m_traits.isctype(*m_position, this->m_mask_space))
+ this->append_literal(*m_position);
+ ++m_position;
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_open_paren()
+{
+ //
+ // skip the '(' and error check:
+ //
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_paren, m_position - m_base);
+ return false;
+ }
+ //
+ // begin by checking for a perl-style (?...) extension:
+ //
+ if(
+ ((this->flags() & (regbase::main_option_type | regbase::no_perl_ex)) == 0)
+ || ((this->flags() & (regbase::main_option_type | regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex))
+ )
+ {
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question)
+ return parse_perl_extension();
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_star)
+ return parse_perl_verb();
+ }
+ //
+ // update our mark count, and append the required state:
+ //
+ unsigned markid = 0;
+ if(0 == (this->flags() & regbase::nosubs))
+ {
+ markid = ++m_mark_count;
+#ifndef BOOST_NO_STD_DISTANCE
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 1, 0));
+#else
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 1, 0));
+#endif
+ }
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
+ pb->index = markid;
+ pb->icase = this->flags() & regbase::icase;
+ std::ptrdiff_t last_paren_start = this->getoffset(pb);
+ // back up insertion point for alternations, and set new point:
+ std::ptrdiff_t last_alt_point = m_alt_insert_point;
+ this->m_pdata->m_data.align();
+ m_alt_insert_point = this->m_pdata->m_data.size();
+ //
+ // back up the current flags in case we have a nested (?imsx) group:
+ //
+ regex_constants::syntax_option_type opts = this->flags();
+ bool old_case_change = m_has_case_change;
+ m_has_case_change = false; // no changes to this scope as yet...
+ //
+ // Back up branch reset data in case we have a nested (?|...)
+ //
+ int mark_reset = m_mark_reset;
+ m_mark_reset = -1;
+ //
+ // now recursively add more states, this will terminate when we get to a
+ // matching ')' :
+ //
+ parse_all();
+ //
+ // Unwind pushed alternatives:
+ //
+ if(0 == unwind_alts(last_paren_start))
+ return false;
+ //
+ // restore flags:
+ //
+ if(m_has_case_change)
+ {
+ // the case has changed in one or more of the alternatives
+ // within the scoped (...) block: we have to add a state
+ // to reset the case sensitivity:
+ static_cast<re_case*>(
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
+ )->icase = opts & regbase::icase;
+ }
+ this->flags(opts);
+ m_has_case_change = old_case_change;
+ //
+ // restore branch reset:
+ //
+ m_mark_reset = mark_reset;
+ //
+ // we either have a ')' or we have run out of characters prematurely:
+ //
+ if(m_position == m_end)
+ {
+ this->fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_end));
+ return false;
+ }
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ return false;
+#ifndef BOOST_NO_STD_DISTANCE
+ if(markid && (this->flags() & regbase::save_subexpression_location))
+ this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position);
+#else
+ if(markid && (this->flags() & regbase::save_subexpression_location))
+ this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base);
+#endif
+ ++m_position;
+ //
+ // append closing parenthesis state:
+ //
+ pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
+ pb->index = markid;
+ pb->icase = this->flags() & regbase::icase;
+ this->m_paren_start = last_paren_start;
+ //
+ // restore the alternate insertion point:
+ //
+ this->m_alt_insert_point = last_alt_point;
+ //
+ // allow backrefs to this mark:
+ //
+ if((markid > 0) && (markid < sizeof(unsigned) * CHAR_BIT))
+ this->m_backrefs |= 1u << (markid - 1);
+
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_basic_escape()
+{
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_paren, m_position - m_base);
+ return false;
+ }
+ bool result = true;
+ switch(this->m_traits.escape_syntax_type(*m_position))
+ {
+ case regex_constants::syntax_open_mark:
+ return parse_open_paren();
+ case regex_constants::syntax_close_mark:
+ return false;
+ case regex_constants::syntax_plus:
+ if(this->flags() & regex_constants::bk_plus_qm)
+ {
+ ++m_position;
+ return parse_repeat(1);
+ }
+ else
+ return parse_literal();
+ case regex_constants::syntax_question:
+ if(this->flags() & regex_constants::bk_plus_qm)
+ {
+ ++m_position;
+ return parse_repeat(0, 1);
+ }
+ else
+ return parse_literal();
+ case regex_constants::syntax_open_brace:
+ if(this->flags() & regbase::no_intervals)
+ return parse_literal();
+ ++m_position;
+ return parse_repeat_range(true);
+ case regex_constants::syntax_close_brace:
+ if(this->flags() & regbase::no_intervals)
+ return parse_literal();
+ fail(regex_constants::error_brace, this->m_position - this->m_base, "Found a closing repetition operator } with no corresponding {.");
+ return false;
+ case regex_constants::syntax_or:
+ if(this->flags() & regbase::bk_vbar)
+ return parse_alt();
+ else
+ result = parse_literal();
+ break;
+ case regex_constants::syntax_digit:
+ return parse_backref();
+ case regex_constants::escape_type_start_buffer:
+ if(this->flags() & regbase::emacs_ex)
+ {
+ ++m_position;
+ this->append_state(syntax_element_buffer_start);
+ }
+ else
+ result = parse_literal();
+ break;
+ case regex_constants::escape_type_end_buffer:
+ if(this->flags() & regbase::emacs_ex)
+ {
+ ++m_position;
+ this->append_state(syntax_element_buffer_end);
+ }
+ else
+ result = parse_literal();
+ break;
+ case regex_constants::escape_type_word_assert:
+ if(this->flags() & regbase::emacs_ex)
+ {
+ ++m_position;
+ this->append_state(syntax_element_word_boundary);
+ }
+ else
+ result = parse_literal();
+ break;
+ case regex_constants::escape_type_not_word_assert:
+ if(this->flags() & regbase::emacs_ex)
+ {
+ ++m_position;
+ this->append_state(syntax_element_within_word);
+ }
+ else
+ result = parse_literal();
+ break;
+ case regex_constants::escape_type_left_word:
+ if(this->flags() & regbase::emacs_ex)
+ {
+ ++m_position;
+ this->append_state(syntax_element_word_start);
+ }
+ else
+ result = parse_literal();
+ break;
+ case regex_constants::escape_type_right_word:
+ if(this->flags() & regbase::emacs_ex)
+ {
+ ++m_position;
+ this->append_state(syntax_element_word_end);
+ }
+ else
+ result = parse_literal();
+ break;
+ default:
+ if(this->flags() & regbase::emacs_ex)
+ {
+ bool negate = true;
+ switch(*m_position)
+ {
+ case 'w':
+ negate = false;
+ BOOST_FALLTHROUGH;
+ case 'W':
+ {
+ basic_char_set<charT, traits> char_set;
+ if(negate)
+ char_set.negate();
+ char_set.add_class(this->m_word_mask);
+ if(0 == this->append_set(char_set))
+ {
+ fail(regex_constants::error_ctype, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ return true;
+ }
+ case 's':
+ negate = false;
+ BOOST_FALLTHROUGH;
+ case 'S':
+ return add_emacs_code(negate);
+ case 'c':
+ case 'C':
+ // not supported yet:
+ fail(regex_constants::error_escape, m_position - m_base, "The \\c and \\C escape sequences are not supported by POSIX basic regular expressions: try the Perl syntax instead.");
+ return false;
+ default:
+ break;
+ }
+ }
+ result = parse_literal();
+ break;
+ }
+ return result;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_extended_escape()
+{
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base, "Incomplete escape sequence found.");
+ return false;
+ }
+ bool negate = false; // in case this is a character class escape: \w \d etc
+ switch(this->m_traits.escape_syntax_type(*m_position))
+ {
+ case regex_constants::escape_type_not_class:
+ negate = true;
+ BOOST_FALLTHROUGH;
+ case regex_constants::escape_type_class:
+ {
+escape_type_class_jump:
+ typedef typename traits::char_class_type m_type;
+ m_type m = this->m_traits.lookup_classname(m_position, m_position+1);
+ if(m != 0)
+ {
+ basic_char_set<charT, traits> char_set;
+ if(negate)
+ char_set.negate();
+ char_set.add_class(m);
+ if(0 == this->append_set(char_set))
+ {
+ fail(regex_constants::error_ctype, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ return true;
+ }
+ //
+ // not a class, just a regular unknown escape:
+ //
+ this->append_literal(unescape_character());
+ break;
+ }
+ case regex_constants::syntax_digit:
+ return parse_backref();
+ case regex_constants::escape_type_left_word:
+ ++m_position;
+ this->append_state(syntax_element_word_start);
+ break;
+ case regex_constants::escape_type_right_word:
+ ++m_position;
+ this->append_state(syntax_element_word_end);
+ break;
+ case regex_constants::escape_type_start_buffer:
+ ++m_position;
+ this->append_state(syntax_element_buffer_start);
+ break;
+ case regex_constants::escape_type_end_buffer:
+ ++m_position;
+ this->append_state(syntax_element_buffer_end);
+ break;
+ case regex_constants::escape_type_word_assert:
+ ++m_position;
+ this->append_state(syntax_element_word_boundary);
+ break;
+ case regex_constants::escape_type_not_word_assert:
+ ++m_position;
+ this->append_state(syntax_element_within_word);
+ break;
+ case regex_constants::escape_type_Z:
+ ++m_position;
+ this->append_state(syntax_element_soft_buffer_end);
+ break;
+ case regex_constants::escape_type_Q:
+ return parse_QE();
+ case regex_constants::escape_type_C:
+ return parse_match_any();
+ case regex_constants::escape_type_X:
+ ++m_position;
+ this->append_state(syntax_element_combining);
+ break;
+ case regex_constants::escape_type_G:
+ ++m_position;
+ this->append_state(syntax_element_restart_continue);
+ break;
+ case regex_constants::escape_type_not_property:
+ negate = true;
+ BOOST_FALLTHROUGH;
+ case regex_constants::escape_type_property:
+ {
+ ++m_position;
+ char_class_type m;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base, "Incomplete property escape found.");
+ return false;
+ }
+ // maybe have \p{ddd}
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
+ {
+ const charT* base = m_position;
+ // skip forward until we find enclosing brace:
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base, "Closing } missing from property escape sequence.");
+ return false;
+ }
+ m = this->m_traits.lookup_classname(++base, m_position++);
+ }
+ else
+ {
+ m = this->m_traits.lookup_classname(m_position, m_position+1);
+ ++m_position;
+ }
+ if(m != 0)
+ {
+ basic_char_set<charT, traits> char_set;
+ if(negate)
+ char_set.negate();
+ char_set.add_class(m);
+ if(0 == this->append_set(char_set))
+ {
+ fail(regex_constants::error_ctype, m_position - m_base);
+ return false;
+ }
+ return true;
+ }
+ fail(regex_constants::error_ctype, m_position - m_base, "Escape sequence was neither a valid property nor a valid character class name.");
+ return false;
+ }
+ case regex_constants::escape_type_reset_start_mark:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ {
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
+ pb->index = -5;
+ pb->icase = this->flags() & regbase::icase;
+ this->m_pdata->m_data.align();
+ ++m_position;
+ return true;
+ }
+ goto escape_type_class_jump;
+ case regex_constants::escape_type_line_ending:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ {
+ const charT* e = get_escape_R_string<charT>();
+ const charT* old_position = m_position;
+ const charT* old_end = m_end;
+ const charT* old_base = m_base;
+ m_position = e;
+ m_base = e;
+ m_end = e + traits::length(e);
+ bool r = parse_all();
+ m_position = ++old_position;
+ m_end = old_end;
+ m_base = old_base;
+ return r;
+ }
+ goto escape_type_class_jump;
+ case regex_constants::escape_type_extended_backref:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ {
+ bool have_brace = false;
+ bool negative = false;
+ static const char* incomplete_message = "Incomplete \\g escape found.";
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
+ return false;
+ }
+ // maybe have \g{ddd}
+ regex_constants::syntax_type syn = this->m_traits.syntax_type(*m_position);
+ regex_constants::syntax_type syn_end = 0;
+ if((syn == regex_constants::syntax_open_brace)
+ || (syn == regex_constants::escape_type_left_word)
+ || (syn == regex_constants::escape_type_end_buffer))
+ {
+ if(++m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
+ return false;
+ }
+ have_brace = true;
+ switch(syn)
+ {
+ case regex_constants::syntax_open_brace:
+ syn_end = regex_constants::syntax_close_brace;
+ break;
+ case regex_constants::escape_type_left_word:
+ syn_end = regex_constants::escape_type_right_word;
+ break;
+ default:
+ syn_end = regex_constants::escape_type_end_buffer;
+ break;
+ }
+ }
+ negative = (*m_position == static_cast<charT>('-'));
+ if((negative) && (++m_position == m_end))
+ {
+ fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
+ return false;
+ }
+ const charT* pc = m_position;
+ boost::intmax_t i = this->m_traits.toi(pc, m_end, 10);
+ if((i < 0) && syn_end)
+ {
+ // Check for a named capture, get the leftmost one if there is more than one:
+ const charT* base = m_position;
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != syn_end))
+ {
+ ++m_position;
+ }
+ i = hash_value_from_capture_name(base, m_position);
+ pc = m_position;
+ }
+ if(negative)
+ i = 1 + m_mark_count - i;
+ if(((i > 0) && (i < std::numeric_limits<unsigned>::digits) && (i - 1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (i-1)))) || ((i > 10000) && (this->m_pdata->get_id(i) > 0) && (this->m_pdata->get_id(i)-1 < static_cast<boost::intmax_t>(sizeof(unsigned) * CHAR_BIT)) && (this->m_backrefs & (1u << (this->m_pdata->get_id(i)-1)))))
+ {
+ m_position = pc;
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
+ pb->index = i;
+ pb->icase = this->flags() & regbase::icase;
+ }
+ else
+ {
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+ m_position = pc;
+ if(have_brace)
+ {
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != syn_end))
+ {
+ fail(regex_constants::error_escape, m_position - m_base, incomplete_message);
+ return false;
+ }
+ ++m_position;
+ }
+ return true;
+ }
+ goto escape_type_class_jump;
+ case regex_constants::escape_type_control_v:
+ if(0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ goto escape_type_class_jump;
+ BOOST_FALLTHROUGH;
+ default:
+ this->append_literal(unescape_character());
+ break;
+ }
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_match_any()
+{
+ //
+ // we have a '.' that can match any character:
+ //
+ ++m_position;
+ static_cast<re_dot*>(
+ this->append_state(syntax_element_wild, sizeof(re_dot))
+ )->mask = static_cast<unsigned char>(this->flags() & regbase::no_mod_s
+ ? BOOST_REGEX_DETAIL_NS::force_not_newline
+ : this->flags() & regbase::mod_s ?
+ BOOST_REGEX_DETAIL_NS::force_newline : BOOST_REGEX_DETAIL_NS::dont_care);
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_repeat(std::size_t low, std::size_t high)
+{
+ bool greedy = true;
+ bool pocessive = false;
+ std::size_t insert_point;
+ //
+ // when we get to here we may have a non-greedy ? mark still to come:
+ //
+ if((m_position != m_end)
+ && (
+ (0 == (this->flags() & (regbase::main_option_type | regbase::no_perl_ex)))
+ || ((regbase::basic_syntax_group|regbase::emacs_ex) == (this->flags() & (regbase::main_option_type | regbase::emacs_ex)))
+ )
+ )
+ {
+ // OK we have a perl or emacs regex, check for a '?':
+ if ((this->flags() & (regbase::main_option_type | regbase::mod_x | regbase::no_perl_ex)) == regbase::mod_x)
+ {
+ // whitespace skip:
+ while ((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
+ ++m_position;
+ }
+ if((m_position != m_end) && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_question))
+ {
+ greedy = false;
+ ++m_position;
+ }
+ // for perl regexes only check for pocessive ++ repeats.
+ if((m_position != m_end)
+ && (0 == (this->flags() & regbase::main_option_type))
+ && (this->m_traits.syntax_type(*m_position) == regex_constants::syntax_plus))
+ {
+ pocessive = true;
+ ++m_position;
+ }
+ }
+ if(0 == this->m_last_state)
+ {
+ fail(regex_constants::error_badrepeat, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_position), "Nothing to repeat.");
+ return false;
+ }
+ if(this->m_last_state->type == syntax_element_endmark)
+ {
+ // insert a repeat before the '(' matching the last ')':
+ insert_point = this->m_paren_start;
+ }
+ else if((this->m_last_state->type == syntax_element_literal) && (static_cast<re_literal*>(this->m_last_state)->length > 1))
+ {
+ // the last state was a literal with more than one character, split it in two:
+ re_literal* lit = static_cast<re_literal*>(this->m_last_state);
+ charT c = (static_cast<charT*>(static_cast<void*>(lit+1)))[lit->length - 1];
+ lit->length -= 1;
+ // now append new state:
+ lit = static_cast<re_literal*>(this->append_state(syntax_element_literal, sizeof(re_literal) + sizeof(charT)));
+ lit->length = 1;
+ (static_cast<charT*>(static_cast<void*>(lit+1)))[0] = c;
+ insert_point = this->getoffset(this->m_last_state);
+ }
+ else
+ {
+ // repeat the last state whatever it was, need to add some error checking here:
+ switch(this->m_last_state->type)
+ {
+ case syntax_element_start_line:
+ case syntax_element_end_line:
+ case syntax_element_word_boundary:
+ case syntax_element_within_word:
+ case syntax_element_word_start:
+ case syntax_element_word_end:
+ case syntax_element_buffer_start:
+ case syntax_element_buffer_end:
+ case syntax_element_alt:
+ case syntax_element_soft_buffer_end:
+ case syntax_element_restart_continue:
+ case syntax_element_jump:
+ case syntax_element_startmark:
+ case syntax_element_backstep:
+ // can't legally repeat any of the above:
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ default:
+ // do nothing...
+ break;
+ }
+ insert_point = this->getoffset(this->m_last_state);
+ }
+ //
+ // OK we now know what to repeat, so insert the repeat around it:
+ //
+ re_repeat* rep = static_cast<re_repeat*>(this->insert_state(insert_point, syntax_element_rep, re_repeater_size));
+ rep->min = low;
+ rep->max = high;
+ rep->greedy = greedy;
+ rep->leading = false;
+ // store our repeater position for later:
+ std::ptrdiff_t rep_off = this->getoffset(rep);
+ // and append a back jump to the repeat:
+ re_jump* jmp = static_cast<re_jump*>(this->append_state(syntax_element_jump, sizeof(re_jump)));
+ jmp->alt.i = rep_off - this->getoffset(jmp);
+ this->m_pdata->m_data.align();
+ // now fill in the alt jump for the repeat:
+ rep = static_cast<re_repeat*>(this->getaddress(rep_off));
+ rep->alt.i = this->m_pdata->m_data.size() - rep_off;
+ //
+ // If the repeat is pocessive then bracket the repeat with a (?>...)
+ // independent sub-expression construct:
+ //
+ if(pocessive)
+ {
+ if(m_position != m_end)
+ {
+ //
+ // Check for illegal following quantifier, we have to do this here, because
+ // the extra states we insert below circumvents our usual error checking :-(
+ //
+ bool contin = false;
+ do
+ {
+ if ((this->flags() & (regbase::main_option_type | regbase::mod_x | regbase::no_perl_ex)) == regbase::mod_x)
+ {
+ // whitespace skip:
+ while ((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
+ ++m_position;
+ }
+ if (m_position != m_end)
+ {
+ switch (this->m_traits.syntax_type(*m_position))
+ {
+ case regex_constants::syntax_star:
+ case regex_constants::syntax_plus:
+ case regex_constants::syntax_question:
+ case regex_constants::syntax_open_brace:
+ fail(regex_constants::error_badrepeat, m_position - m_base);
+ return false;
+ case regex_constants::syntax_open_mark:
+ // Do we have a comment? If so we need to skip it here...
+ if ((m_position + 2 < m_end) && this->m_traits.syntax_type(*(m_position + 1)) == regex_constants::syntax_question
+ && this->m_traits.syntax_type(*(m_position + 2)) == regex_constants::syntax_hash)
+ {
+ while ((m_position != m_end)
+ && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark)) {
+ }
+ contin = true;
+ }
+ else
+ contin = false;
+ }
+ }
+ else
+ contin = false;
+ } while (contin);
+ }
+ re_brace* pb = static_cast<re_brace*>(this->insert_state(insert_point, syntax_element_startmark, sizeof(re_brace)));
+ pb->index = -3;
+ pb->icase = this->flags() & regbase::icase;
+ jmp = static_cast<re_jump*>(this->insert_state(insert_point + sizeof(re_brace), syntax_element_jump, sizeof(re_jump)));
+ this->m_pdata->m_data.align();
+ jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
+ pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
+ pb->index = -3;
+ pb->icase = this->flags() & regbase::icase;
+ }
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_repeat_range(bool isbasic)
+{
+ static const char* incomplete_message = "Missing } in quantified repetition.";
+ //
+ // parse a repeat-range:
+ //
+ std::size_t min, max;
+ boost::intmax_t v;
+ // skip whitespace:
+ while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
+ ++m_position;
+ if(this->m_position == this->m_end)
+ {
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
+ {
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
+ return false;
+ }
+ // Treat the opening '{' as a literal character, rewind to start of error:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
+ return parse_literal();
+ }
+ // get min:
+ v = this->m_traits.toi(m_position, m_end, 10);
+ // skip whitespace:
+ if((v < 0) || (v > umax()))
+ {
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
+ {
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
+ return false;
+ }
+ // Treat the opening '{' as a literal character, rewind to start of error:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
+ return parse_literal();
+ }
+ while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
+ ++m_position;
+ if(this->m_position == this->m_end)
+ {
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
+ {
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
+ return false;
+ }
+ // Treat the opening '{' as a literal character, rewind to start of error:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
+ return parse_literal();
+ }
+ min = static_cast<std::size_t>(v);
+ // see if we have a comma:
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_comma)
+ {
+ // move on and error check:
+ ++m_position;
+ // skip whitespace:
+ while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
+ ++m_position;
+ if(this->m_position == this->m_end)
+ {
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
+ {
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
+ return false;
+ }
+ // Treat the opening '{' as a literal character, rewind to start of error:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
+ return parse_literal();
+ }
+ // get the value if any:
+ v = this->m_traits.toi(m_position, m_end, 10);
+ max = ((v >= 0) && (v < umax())) ? (std::size_t)v : (std::numeric_limits<std::size_t>::max)();
+ }
+ else
+ {
+ // no comma, max = min:
+ max = min;
+ }
+ // skip whitespace:
+ while((m_position != m_end) && this->m_traits.isctype(*m_position, this->m_mask_space))
+ ++m_position;
+ // OK now check trailing }:
+ if(this->m_position == this->m_end)
+ {
+ if(this->flags() & (regbase::main_option_type | regbase::no_perl_ex))
+ {
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
+ return false;
+ }
+ // Treat the opening '{' as a literal character, rewind to start of error:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
+ return parse_literal();
+ }
+ if(isbasic)
+ {
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_escape)
+ {
+ ++m_position;
+ if(this->m_position == this->m_end)
+ {
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
+ return false;
+ }
+ }
+ else
+ {
+ fail(regex_constants::error_brace, this->m_position - this->m_base, incomplete_message);
+ return false;
+ }
+ }
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_brace)
+ ++m_position;
+ else
+ {
+ // Treat the opening '{' as a literal character, rewind to start of error:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_brace) --m_position;
+ return parse_literal();
+ }
+ //
+ // finally go and add the repeat, unless error:
+ //
+ if(min > max)
+ {
+ // Backtrack to error location:
+ m_position -= 2;
+ while(this->m_traits.isctype(*m_position, this->m_word_mask)) --m_position;
+ ++m_position;
+ fail(regex_constants::error_badbrace, m_position - m_base);
+ return false;
+ }
+ return parse_repeat(min, max);
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_alt()
+{
+ //
+ // error check: if there have been no previous states,
+ // or if the last state was a '(' then error:
+ //
+ if(
+ ((this->m_last_state == 0) || (this->m_last_state->type == syntax_element_startmark))
+ &&
+ !(
+ ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group)
+ &&
+ ((this->flags() & regbase::no_empty_expressions) == 0)
+ )
+ )
+ {
+ fail(regex_constants::error_empty, this->m_position - this->m_base, "A regular expression cannot start with the alternation operator |.");
+ return false;
+ }
+ //
+ // Reset mark count if required:
+ //
+ if(m_max_mark < m_mark_count)
+ m_max_mark = m_mark_count;
+ if(m_mark_reset >= 0)
+ m_mark_count = m_mark_reset;
+
+ ++m_position;
+ //
+ // we need to append a trailing jump:
+ //
+ re_syntax_base* pj = this->append_state(BOOST_REGEX_DETAIL_NS::syntax_element_jump, sizeof(re_jump));
+ std::ptrdiff_t jump_offset = this->getoffset(pj);
+ //
+ // now insert the alternative:
+ //
+ re_alt* palt = static_cast<re_alt*>(this->insert_state(this->m_alt_insert_point, syntax_element_alt, re_alt_size));
+ jump_offset += re_alt_size;
+ this->m_pdata->m_data.align();
+ palt->alt.i = this->m_pdata->m_data.size() - this->getoffset(palt);
+ //
+ // update m_alt_insert_point so that the next alternate gets
+ // inserted at the start of the second of the two we've just created:
+ //
+ this->m_alt_insert_point = this->m_pdata->m_data.size();
+ //
+ // the start of this alternative must have a case changes state
+ // if the current block has messed around with case changes:
+ //
+ if(m_has_case_change)
+ {
+ static_cast<re_case*>(
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
+ )->icase = this->m_icase;
+ }
+ //
+ // push the alternative onto our stack, a recursive
+ // implementation here is easier to understand (and faster
+ // as it happens), but causes all kinds of stack overflow problems
+ // on programs with small stacks (COM+).
+ //
+ m_alt_jumps.push_back(jump_offset);
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_set()
+{
+ static const char* incomplete_message = "Character set declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
+ ++m_position;
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ basic_char_set<charT, traits> char_set;
+
+ const charT* base = m_position; // where the '[' was
+ const charT* item_base = m_position; // where the '[' or '^' was
+
+ while(m_position != m_end)
+ {
+ switch(this->m_traits.syntax_type(*m_position))
+ {
+ case regex_constants::syntax_caret:
+ if(m_position == base)
+ {
+ char_set.negate();
+ ++m_position;
+ item_base = m_position;
+ }
+ else
+ parse_set_literal(char_set);
+ break;
+ case regex_constants::syntax_close_set:
+ if(m_position == item_base)
+ {
+ parse_set_literal(char_set);
+ break;
+ }
+ else
+ {
+ ++m_position;
+ if(0 == this->append_set(char_set))
+ {
+ fail(regex_constants::error_ctype, m_position - m_base);
+ return false;
+ }
+ }
+ return true;
+ case regex_constants::syntax_open_set:
+ if(parse_inner_set(char_set))
+ break;
+ return true;
+ case regex_constants::syntax_escape:
+ {
+ //
+ // look ahead and see if this is a character class shortcut
+ // \d \w \s etc...
+ //
+ ++m_position;
+ if(this->m_traits.escape_syntax_type(*m_position)
+ == regex_constants::escape_type_class)
+ {
+ char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1);
+ if(m != 0)
+ {
+ char_set.add_class(m);
+ ++m_position;
+ break;
+ }
+ }
+ else if(this->m_traits.escape_syntax_type(*m_position)
+ == regex_constants::escape_type_not_class)
+ {
+ // negated character class:
+ char_class_type m = this->m_traits.lookup_classname(m_position, m_position+1);
+ if(m != 0)
+ {
+ char_set.add_negated_class(m);
+ ++m_position;
+ break;
+ }
+ }
+ // not a character class, just a regular escape:
+ --m_position;
+ parse_set_literal(char_set);
+ break;
+ }
+ default:
+ parse_set_literal(char_set);
+ break;
+ }
+ }
+ return m_position != m_end;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_inner_set(basic_char_set<charT, traits>& char_set)
+{
+ static const char* incomplete_message = "Character class declaration starting with [ terminated prematurely - either no ] was found or the set had no content.";
+ //
+ // we have either a character class [:name:]
+ // a collating element [.name.]
+ // or an equivalence class [=name=]
+ //
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ switch(this->m_traits.syntax_type(*m_position))
+ {
+ case regex_constants::syntax_dot:
+ //
+ // a collating element is treated as a literal:
+ //
+ --m_position;
+ parse_set_literal(char_set);
+ return true;
+ case regex_constants::syntax_colon:
+ {
+ // check that character classes are actually enabled:
+ if((this->flags() & (regbase::main_option_type | regbase::no_char_classes))
+ == (regbase::basic_syntax_group | regbase::no_char_classes))
+ {
+ --m_position;
+ parse_set_literal(char_set);
+ return true;
+ }
+ // skip the ':'
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ const charT* name_first = m_position;
+ // skip at least one character, then find the matching ':]'
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ while((m_position != m_end)
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_colon))
+ ++m_position;
+ const charT* name_last = m_position;
+ if(m_end == m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ if((m_end == ++m_position)
+ || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ //
+ // check for negated class:
+ //
+ bool negated = false;
+ if(this->m_traits.syntax_type(*name_first) == regex_constants::syntax_caret)
+ {
+ ++name_first;
+ negated = true;
+ }
+ typedef typename traits::char_class_type m_type;
+ m_type m = this->m_traits.lookup_classname(name_first, name_last);
+ if(m == 0)
+ {
+ if(char_set.empty() && (name_last - name_first == 1))
+ {
+ // maybe a special case:
+ ++m_position;
+ if( (m_position != m_end)
+ && (this->m_traits.syntax_type(*m_position)
+ == regex_constants::syntax_close_set))
+ {
+ if(this->m_traits.escape_syntax_type(*name_first)
+ == regex_constants::escape_type_left_word)
+ {
+ ++m_position;
+ this->append_state(syntax_element_word_start);
+ return false;
+ }
+ if(this->m_traits.escape_syntax_type(*name_first)
+ == regex_constants::escape_type_right_word)
+ {
+ ++m_position;
+ this->append_state(syntax_element_word_end);
+ return false;
+ }
+ }
+ }
+ fail(regex_constants::error_ctype, name_first - m_base);
+ return false;
+ }
+ if(negated == false)
+ char_set.add_class(m);
+ else
+ char_set.add_negated_class(m);
+ ++m_position;
+ break;
+ }
+ case regex_constants::syntax_equal:
+ {
+ // skip the '='
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ const charT* name_first = m_position;
+ // skip at least one character, then find the matching '=]'
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ while((m_position != m_end)
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal))
+ ++m_position;
+ const charT* name_last = m_position;
+ if(m_end == m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ if((m_end == ++m_position)
+ || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
+ {
+ fail(regex_constants::error_brack, m_position - m_base, incomplete_message);
+ return false;
+ }
+ string_type m = this->m_traits.lookup_collatename(name_first, name_last);
+ if((0 == m.size()) || (m.size() > 2))
+ {
+ fail(regex_constants::error_collate, name_first - m_base);
+ return false;
+ }
+ digraph<charT> d;
+ d.first = m[0];
+ if(m.size() > 1)
+ d.second = m[1];
+ else
+ d.second = 0;
+ char_set.add_equivalent(d);
+ ++m_position;
+ break;
+ }
+ default:
+ --m_position;
+ parse_set_literal(char_set);
+ break;
+ }
+ return true;
+}
+
+template <class charT, class traits>
+void basic_regex_parser<charT, traits>::parse_set_literal(basic_char_set<charT, traits>& char_set)
+{
+ digraph<charT> start_range(get_next_set_literal(char_set));
+ if(m_end == m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base);
+ return;
+ }
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash)
+ {
+ // we have a range:
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base);
+ return;
+ }
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set)
+ {
+ digraph<charT> end_range = get_next_set_literal(char_set);
+ char_set.add_range(start_range, end_range);
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_dash)
+ {
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_brack, m_position - m_base);
+ return;
+ }
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_set)
+ {
+ // trailing - :
+ --m_position;
+ return;
+ }
+ fail(regex_constants::error_range, m_position - m_base);
+ return;
+ }
+ return;
+ }
+ --m_position;
+ }
+ char_set.add_single(start_range);
+}
+
+template <class charT, class traits>
+digraph<charT> basic_regex_parser<charT, traits>::get_next_set_literal(basic_char_set<charT, traits>& char_set)
+{
+ digraph<charT> result;
+ switch(this->m_traits.syntax_type(*m_position))
+ {
+ case regex_constants::syntax_dash:
+ if(!char_set.empty())
+ {
+ // see if we are at the end of the set:
+ if((++m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
+ {
+ fail(regex_constants::error_range, m_position - m_base);
+ return result;
+ }
+ --m_position;
+ }
+ result.first = *m_position++;
+ return result;
+ case regex_constants::syntax_escape:
+ // check to see if escapes are supported first:
+ if(this->flags() & regex_constants::no_escape_in_lists)
+ {
+ result = *m_position++;
+ break;
+ }
+ ++m_position;
+ result = unescape_character();
+ break;
+ case regex_constants::syntax_open_set:
+ {
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_collate, m_position - m_base);
+ return result;
+ }
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot)
+ {
+ --m_position;
+ result.first = *m_position;
+ ++m_position;
+ return result;
+ }
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_collate, m_position - m_base);
+ return result;
+ }
+ const charT* name_first = m_position;
+ // skip at least one character, then find the matching ':]'
+ if(m_end == ++m_position)
+ {
+ fail(regex_constants::error_collate, name_first - m_base);
+ return result;
+ }
+ while((m_position != m_end)
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_dot))
+ ++m_position;
+ const charT* name_last = m_position;
+ if(m_end == m_position)
+ {
+ fail(regex_constants::error_collate, name_first - m_base);
+ return result;
+ }
+ if((m_end == ++m_position)
+ || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_set))
+ {
+ fail(regex_constants::error_collate, name_first - m_base);
+ return result;
+ }
+ ++m_position;
+ string_type s = this->m_traits.lookup_collatename(name_first, name_last);
+ if(s.empty() || (s.size() > 2))
+ {
+ fail(regex_constants::error_collate, name_first - m_base);
+ return result;
+ }
+ result.first = s[0];
+ if(s.size() > 1)
+ result.second = s[1];
+ else
+ result.second = 0;
+ return result;
+ }
+ default:
+ result = *m_position++;
+ }
+ return result;
+}
+
+//
+// does a value fit in the specified charT type?
+//
+template <class charT>
+bool valid_value(charT, boost::intmax_t v, const mpl::true_&)
+{
+ return (v >> (sizeof(charT) * CHAR_BIT)) == 0;
+}
+template <class charT>
+bool valid_value(charT, boost::intmax_t, const mpl::false_&)
+{
+ return true; // v will alsways fit in a charT
+}
+template <class charT>
+bool valid_value(charT c, boost::intmax_t v)
+{
+ return valid_value(c, v, mpl::bool_<(sizeof(charT) < sizeof(boost::intmax_t))>());
+}
+
+template <class charT, class traits>
+charT basic_regex_parser<charT, traits>::unescape_character()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+ charT result(0);
+ if(m_position == m_end)
+ {
+ fail(regex_constants::error_escape, m_position - m_base, "Escape sequence terminated prematurely.");
+ return false;
+ }
+ switch(this->m_traits.escape_syntax_type(*m_position))
+ {
+ case regex_constants::escape_type_control_a:
+ result = charT('\a');
+ break;
+ case regex_constants::escape_type_e:
+ result = charT(27);
+ break;
+ case regex_constants::escape_type_control_f:
+ result = charT('\f');
+ break;
+ case regex_constants::escape_type_control_n:
+ result = charT('\n');
+ break;
+ case regex_constants::escape_type_control_r:
+ result = charT('\r');
+ break;
+ case regex_constants::escape_type_control_t:
+ result = charT('\t');
+ break;
+ case regex_constants::escape_type_control_v:
+ result = charT('\v');
+ break;
+ case regex_constants::escape_type_word_assert:
+ result = charT('\b');
+ break;
+ case regex_constants::escape_type_ascii_control:
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base, "ASCII escape sequence terminated prematurely.");
+ return result;
+ }
+ result = static_cast<charT>(*m_position % 32);
+ break;
+ case regex_constants::escape_type_hex:
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base, "Hexadecimal escape sequence terminated prematurely.");
+ return result;
+ }
+ // maybe have \x{ddd}
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
+ {
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base, "Missing } in hexadecimal escape sequence.");
+ return result;
+ }
+ boost::intmax_t i = this->m_traits.toi(m_position, m_end, 16);
+ if((m_position == m_end)
+ || (i < 0)
+ || ((std::numeric_limits<charT>::is_specialized) && (i > (boost::intmax_t)(std::numeric_limits<charT>::max)()))
+ || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_badbrace, m_position - m_base, "Hexadecimal escape sequence was invalid.");
+ return result;
+ }
+ ++m_position;
+ result = charT(i);
+ }
+ else
+ {
+ std::ptrdiff_t len = (std::min)(static_cast<std::ptrdiff_t>(2), static_cast<std::ptrdiff_t>(m_end - m_position));
+ boost::intmax_t i = this->m_traits.toi(m_position, m_position + len, 16);
+ if((i < 0)
+ || !valid_value(charT(0), i))
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base, "Escape sequence did not encode a valid character.");
+ return result;
+ }
+ result = charT(i);
+ }
+ return result;
+ case regex_constants::syntax_digit:
+ {
+ // an octal escape sequence, the first character must be a zero
+ // followed by up to 3 octal digits:
+ std::ptrdiff_t len = (std::min)(::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end), static_cast<std::ptrdiff_t>(4));
+ const charT* bp = m_position;
+ boost::intmax_t val = this->m_traits.toi(bp, bp + 1, 8);
+ if(val != 0)
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ // Oops not an octal escape after all:
+ fail(regex_constants::error_escape, m_position - m_base, "Invalid octal escape sequence.");
+ return result;
+ }
+ val = this->m_traits.toi(m_position, m_position + len, 8);
+ if((val < 0) || (val > (boost::intmax_t)(std::numeric_limits<charT>::max)()))
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base, "Octal escape sequence is invalid.");
+ return result;
+ }
+ return static_cast<charT>(val);
+ }
+ case regex_constants::escape_type_named_char:
+ {
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base);
+ return false;
+ }
+ // maybe have \N{name}
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_open_brace)
+ {
+ const charT* base = m_position;
+ // skip forward until we find enclosing brace:
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base);
+ return false;
+ }
+ string_type s = this->m_traits.lookup_collatename(++base, m_position++);
+ if(s.empty())
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_collate, m_position - m_base);
+ return false;
+ }
+ if(s.size() == 1)
+ {
+ return s[0];
+ }
+ }
+ // fall through is a failure:
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base);
+ return false;
+ }
+ default:
+ result = *m_position;
+ break;
+ }
+ ++m_position;
+ return result;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_backref()
+{
+ BOOST_ASSERT(m_position != m_end);
+ const charT* pc = m_position;
+ boost::intmax_t i = this->m_traits.toi(pc, pc + 1, 10);
+ if((i == 0) || (((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group) && (this->flags() & regbase::no_bk_refs)))
+ {
+ // not a backref at all but an octal escape sequence:
+ charT c = unescape_character();
+ this->append_literal(c);
+ }
+ else if((i > 0) && (this->m_backrefs & (1u << (i-1))))
+ {
+ m_position = pc;
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_backref, sizeof(re_brace)));
+ pb->index = i;
+ pb->icase = this->flags() & regbase::icase;
+ }
+ else
+ {
+ // Rewind to start of escape:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_backref, m_position - m_base);
+ return false;
+ }
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_QE()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+ //
+ // parse a \Q...\E sequence:
+ //
+ ++m_position; // skip the Q
+ const charT* start = m_position;
+ const charT* end;
+ do
+ {
+ while((m_position != m_end)
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // a \Q...\E sequence may terminate with the end of the expression:
+ end = m_position;
+ break;
+ }
+ if(++m_position == m_end) // skip the escape
+ {
+ fail(regex_constants::error_escape, m_position - m_base, "Unterminated \\Q...\\E sequence.");
+ return false;
+ }
+ // check to see if it's a \E:
+ if(this->m_traits.escape_syntax_type(*m_position) == regex_constants::escape_type_E)
+ {
+ ++m_position;
+ end = m_position - 2;
+ break;
+ }
+ // otherwise go round again:
+ }while(true);
+ //
+ // now add all the character between the two escapes as literals:
+ //
+ while(start != end)
+ {
+ this->append_literal(*start);
+ ++start;
+ }
+ return true;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_perl_extension()
+{
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ //
+ // treat comments as a special case, as these
+ // are the only ones that don't start with a leading
+ // startmark state:
+ //
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_hash)
+ {
+ while((m_position != m_end)
+ && (this->m_traits.syntax_type(*m_position++) != regex_constants::syntax_close_mark))
+ {}
+ return true;
+ }
+ //
+ // backup some state, and prepare the way:
+ //
+ int markid = 0;
+ std::ptrdiff_t jump_offset = 0;
+ re_brace* pb = static_cast<re_brace*>(this->append_state(syntax_element_startmark, sizeof(re_brace)));
+ pb->icase = this->flags() & regbase::icase;
+ std::ptrdiff_t last_paren_start = this->getoffset(pb);
+ // back up insertion point for alternations, and set new point:
+ std::ptrdiff_t last_alt_point = m_alt_insert_point;
+ this->m_pdata->m_data.align();
+ m_alt_insert_point = this->m_pdata->m_data.size();
+ std::ptrdiff_t expected_alt_point = m_alt_insert_point;
+ bool restore_flags = true;
+ regex_constants::syntax_option_type old_flags = this->flags();
+ bool old_case_change = m_has_case_change;
+ m_has_case_change = false;
+ charT name_delim;
+ int mark_reset = m_mark_reset;
+ int max_mark = m_max_mark;
+ m_mark_reset = -1;
+ m_max_mark = m_mark_count;
+ boost::intmax_t v;
+ //
+ // select the actual extension used:
+ //
+ switch(this->m_traits.syntax_type(*m_position))
+ {
+ case regex_constants::syntax_or:
+ m_mark_reset = m_mark_count;
+ BOOST_FALLTHROUGH;
+ case regex_constants::syntax_colon:
+ //
+ // a non-capturing mark:
+ //
+ pb->index = markid = 0;
+ ++m_position;
+ break;
+ case regex_constants::syntax_digit:
+ {
+ //
+ // a recursive subexpression:
+ //
+ v = this->m_traits.toi(m_position, m_end, 10);
+ if((v < 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base, "The recursive sub-expression refers to an invalid marking group, or is unterminated.");
+ return false;
+ }
+insert_recursion:
+ pb->index = markid = 0;
+ re_recurse* pr = static_cast<re_recurse*>(this->append_state(syntax_element_recurse, sizeof(re_recurse)));
+ pr->alt.i = v;
+ pr->state_id = 0;
+ static_cast<re_case*>(
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
+ )->icase = this->flags() & regbase::icase;
+ break;
+ }
+ case regex_constants::syntax_plus:
+ //
+ // A forward-relative recursive subexpression:
+ //
+ ++m_position;
+ v = this->m_traits.toi(m_position, m_end, 10);
+ if((v <= 0) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
+ return false;
+ }
+ if ((std::numeric_limits<boost::intmax_t>::max)() - m_mark_count < v)
+ {
+ fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
+ return false;
+ }
+ v += m_mark_count;
+ goto insert_recursion;
+ case regex_constants::syntax_dash:
+ //
+ // Possibly a backward-relative recursive subexpression:
+ //
+ ++m_position;
+ v = this->m_traits.toi(m_position, m_end, 10);
+ if(v <= 0)
+ {
+ --m_position;
+ // Oops not a relative recursion at all, but a (?-imsx) group:
+ goto option_group_jump;
+ }
+ v = m_mark_count + 1 - v;
+ if(v <= 0)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base, "An invalid or unterminated recursive sub-expression.");
+ return false;
+ }
+ goto insert_recursion;
+ case regex_constants::syntax_equal:
+ pb->index = markid = -1;
+ ++m_position;
+ jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
+ this->m_pdata->m_data.align();
+ m_alt_insert_point = this->m_pdata->m_data.size();
+ break;
+ case regex_constants::syntax_not:
+ pb->index = markid = -2;
+ ++m_position;
+ jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
+ this->m_pdata->m_data.align();
+ m_alt_insert_point = this->m_pdata->m_data.size();
+ break;
+ case regex_constants::escape_type_left_word:
+ {
+ // a lookbehind assertion:
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ regex_constants::syntax_type t = this->m_traits.syntax_type(*m_position);
+ if(t == regex_constants::syntax_not)
+ pb->index = markid = -2;
+ else if(t == regex_constants::syntax_equal)
+ pb->index = markid = -1;
+ else
+ {
+ // Probably a named capture which also starts (?< :
+ name_delim = '>';
+ --m_position;
+ goto named_capture_jump;
+ }
+ ++m_position;
+ jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
+ this->append_state(syntax_element_backstep, sizeof(re_brace));
+ this->m_pdata->m_data.align();
+ m_alt_insert_point = this->m_pdata->m_data.size();
+ break;
+ }
+ case regex_constants::escape_type_right_word:
+ //
+ // an independent sub-expression:
+ //
+ pb->index = markid = -3;
+ ++m_position;
+ jump_offset = this->getoffset(this->append_state(syntax_element_jump, sizeof(re_jump)));
+ this->m_pdata->m_data.align();
+ m_alt_insert_point = this->m_pdata->m_data.size();
+ break;
+ case regex_constants::syntax_open_mark:
+ {
+ // a conditional expression:
+ pb->index = markid = -4;
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ v = this->m_traits.toi(m_position, m_end, 10);
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(*m_position == charT('R'))
+ {
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(*m_position == charT('&'))
+ {
+ const charT* base = ++m_position;
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ v = -static_cast<int>(hash_value_from_capture_name(base, m_position));
+ }
+ else
+ {
+ v = -this->m_traits.toi(m_position, m_end, 10);
+ }
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
+ br->index = v < 0 ? (v - 1) : 0;
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ }
+ else if((*m_position == charT('\'')) || (*m_position == charT('<')))
+ {
+ const charT* base = ++m_position;
+ while((m_position != m_end) && (*m_position != charT('>')) && (*m_position != charT('\'')))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
+ br->index = v;
+ if(((*m_position != charT('>')) && (*m_position != charT('\''))) || (++m_position == m_end))
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base, "Unterminated named capture.");
+ return false;
+ }
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ }
+ else if(*m_position == charT('D'))
+ {
+ const char* def = "DEFINE";
+ while(*def && (m_position != m_end) && (*m_position == charT(*def)))
+ ++m_position, ++def;
+ if((m_position == m_end) || *def)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
+ br->index = 9999; // special magic value!
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ }
+ else if(v > 0)
+ {
+ re_brace* br = static_cast<re_brace*>(this->append_state(syntax_element_assert_backref, sizeof(re_brace)));
+ br->index = v;
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ }
+ else
+ {
+ // verify that we have a lookahead or lookbehind assert:
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_question)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::escape_type_left_word)
+ {
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ m_position -= 3;
+ }
+ else
+ {
+ if((this->m_traits.syntax_type(*m_position) != regex_constants::syntax_equal)
+ && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_not))
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ m_position -= 2;
+ }
+ }
+ break;
+ }
+ case regex_constants::syntax_close_mark:
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ case regex_constants::escape_type_end_buffer:
+ {
+ name_delim = *m_position;
+named_capture_jump:
+ markid = 0;
+ if(0 == (this->flags() & regbase::nosubs))
+ {
+ markid = ++m_mark_count;
+ #ifndef BOOST_NO_STD_DISTANCE
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>(std::distance(m_base, m_position) - 2, 0));
+ #else
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.push_back(std::pair<std::size_t, std::size_t>((m_position - m_base) - 2, 0));
+ #endif
+ }
+ pb->index = markid;
+ const charT* base = ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ while((m_position != m_end) && (*m_position != name_delim))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ this->m_pdata->set_name(base, m_position, markid);
+ ++m_position;
+ break;
+ }
+ default:
+ if(*m_position == charT('R'))
+ {
+ ++m_position;
+ v = 0;
+ if(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ goto insert_recursion;
+ }
+ if(*m_position == charT('&'))
+ {
+ ++m_position;
+ const charT* base = m_position;
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
+ goto insert_recursion;
+ }
+ if(*m_position == charT('P'))
+ {
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(*m_position == charT('>'))
+ {
+ ++m_position;
+ const charT* base = m_position;
+ while((m_position != m_end) && (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ ++m_position;
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ v = static_cast<int>(hash_value_from_capture_name(base, m_position));
+ goto insert_recursion;
+ }
+ }
+ //
+ // lets assume that we have a (?imsx) group and try and parse it:
+ //
+option_group_jump:
+ regex_constants::syntax_option_type opts = parse_options();
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ // make a note of whether we have a case change:
+ m_has_case_change = ((opts & regbase::icase) != (this->flags() & regbase::icase));
+ pb->index = markid = 0;
+ if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark)
+ {
+ // update flags and carry on as normal:
+ this->flags(opts);
+ restore_flags = false;
+ old_case_change |= m_has_case_change; // defer end of scope by one ')'
+ }
+ else if(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_colon)
+ {
+ // update flags and carry on until the matching ')' is found:
+ this->flags(opts);
+ ++m_position;
+ }
+ else
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+
+ // finally append a case change state if we need it:
+ if(m_has_case_change)
+ {
+ static_cast<re_case*>(
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
+ )->icase = opts & regbase::icase;
+ }
+
+ }
+ //
+ // now recursively add more states, this will terminate when we get to a
+ // matching ')' :
+ //
+ parse_all();
+ //
+ // Unwind alternatives:
+ //
+ if(0 == unwind_alts(last_paren_start))
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid alternation operators within (?...) block.");
+ return false;
+ }
+ //
+ // we either have a ')' or we have run out of characters prematurely:
+ //
+ if(m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ this->fail(regex_constants::error_paren, ::boost::BOOST_REGEX_DETAIL_NS::distance(m_base, m_end));
+ return false;
+ }
+ BOOST_ASSERT(this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark);
+ ++m_position;
+ //
+ // restore the flags:
+ //
+ if(restore_flags)
+ {
+ // append a case change state if we need it:
+ if(m_has_case_change)
+ {
+ static_cast<re_case*>(
+ this->append_state(syntax_element_toggle_case, sizeof(re_case))
+ )->icase = old_flags & regbase::icase;
+ }
+ this->flags(old_flags);
+ }
+ //
+ // set up the jump pointer if we have one:
+ //
+ if(jump_offset)
+ {
+ this->m_pdata->m_data.align();
+ re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
+ jmp->alt.i = this->m_pdata->m_data.size() - this->getoffset(jmp);
+ if((this->m_last_state == jmp) && (markid != -2))
+ {
+ // Oops... we didn't have anything inside the assertion.
+ // Note we don't get here for negated forward lookahead as (?!)
+ // does have some uses.
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base, "Invalid or empty zero width assertion.");
+ return false;
+ }
+ }
+ //
+ // verify that if this is conditional expression, that we do have
+ // an alternative, if not add one:
+ //
+ if(markid == -4)
+ {
+ re_syntax_base* b = this->getaddress(expected_alt_point);
+ // Make sure we have exactly one alternative following this state:
+ if(b->type != syntax_element_alt)
+ {
+ re_alt* alt = static_cast<re_alt*>(this->insert_state(expected_alt_point, syntax_element_alt, sizeof(re_alt)));
+ alt->alt.i = this->m_pdata->m_data.size() - this->getoffset(alt);
+ }
+ else if(((std::ptrdiff_t)this->m_pdata->m_data.size() > (static_cast<re_alt*>(b)->alt.i + this->getoffset(b))) && (static_cast<re_alt*>(b)->alt.i > 0) && this->getaddress(static_cast<re_alt*>(b)->alt.i, b)->type == syntax_element_alt)
+ {
+ // Can't have seen more than one alternative:
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_bad_pattern, m_position - m_base, "More than one alternation operator | was encountered inside a conditional expression.");
+ return false;
+ }
+ else
+ {
+ // We must *not* have seen an alternative inside a (DEFINE) block:
+ b = this->getaddress(b->next.i, b);
+ if((b->type == syntax_element_assert_backref) && (static_cast<re_brace*>(b)->index == 9999))
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_bad_pattern, m_position - m_base, "Alternation operators are not allowed inside a DEFINE block.");
+ return false;
+ }
+ }
+ // check for invalid repetition of next state:
+ b = this->getaddress(expected_alt_point);
+ b = this->getaddress(static_cast<re_alt*>(b)->next.i, b);
+ if((b->type != syntax_element_assert_backref)
+ && (b->type != syntax_element_startmark))
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_badrepeat, m_position - m_base, "A repetition operator cannot be applied to a zero-width assertion.");
+ return false;
+ }
+ }
+ //
+ // append closing parenthesis state:
+ //
+ pb = static_cast<re_brace*>(this->append_state(syntax_element_endmark, sizeof(re_brace)));
+ pb->index = markid;
+ pb->icase = this->flags() & regbase::icase;
+ this->m_paren_start = last_paren_start;
+ //
+ // restore the alternate insertion point:
+ //
+ this->m_alt_insert_point = last_alt_point;
+ //
+ // and the case change data:
+ //
+ m_has_case_change = old_case_change;
+ //
+ // And the mark_reset data:
+ //
+ if(m_max_mark > m_mark_count)
+ {
+ m_mark_count = m_max_mark;
+ }
+ m_mark_reset = mark_reset;
+ m_max_mark = max_mark;
+
+
+ if(markid > 0)
+ {
+#ifndef BOOST_NO_STD_DISTANCE
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.at(markid - 1).second = std::distance(m_base, m_position) - 1;
+#else
+ if(this->flags() & regbase::save_subexpression_location)
+ this->m_pdata->m_subs.at(markid - 1).second = (m_position - m_base) - 1;
+#endif
+ //
+ // allow backrefs to this mark:
+ //
+ if(markid < (int)(sizeof(unsigned) * CHAR_BIT))
+ this->m_backrefs |= 1u << (markid - 1);
+ }
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::match_verb(const char* verb)
+{
+ while(*verb)
+ {
+ if(static_cast<charT>(*verb) != *m_position)
+ {
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(++m_position == m_end)
+ {
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ ++verb;
+ }
+ return true;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::parse_perl_verb()
+{
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ switch(*m_position)
+ {
+ case 'F':
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if((this->m_traits.syntax_type(*m_position) == regex_constants::syntax_close_mark) || match_verb("AIL"))
+ {
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ this->append_state(syntax_element_fail);
+ return true;
+ }
+ break;
+ case 'A':
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(match_verb("CCEPT"))
+ {
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ this->append_state(syntax_element_accept);
+ return true;
+ }
+ break;
+ case 'C':
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(match_verb("OMMIT"))
+ {
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_commit;
+ this->m_pdata->m_disable_match_any = true;
+ return true;
+ }
+ break;
+ case 'P':
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(match_verb("RUNE"))
+ {
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_prune;
+ this->m_pdata->m_disable_match_any = true;
+ return true;
+ }
+ break;
+ case 'S':
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(match_verb("KIP"))
+ {
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ static_cast<re_commit*>(this->append_state(syntax_element_commit, sizeof(re_commit)))->action = commit_skip;
+ this->m_pdata->m_disable_match_any = true;
+ return true;
+ }
+ break;
+ case 'T':
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ if(match_verb("HEN"))
+ {
+ if((m_position == m_end) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_mark))
+ {
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ this->append_state(syntax_element_then);
+ this->m_pdata->m_disable_match_any = true;
+ return true;
+ }
+ break;
+ }
+ // Rewind to start of (* sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_perl_extension, m_position - m_base);
+ return false;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::add_emacs_code(bool negate)
+{
+ //
+ // parses an emacs style \sx or \Sx construct.
+ //
+ if(++m_position == m_end)
+ {
+ // Rewind to start of sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_escape) --m_position;
+ fail(regex_constants::error_escape, m_position - m_base);
+ return false;
+ }
+ basic_char_set<charT, traits> char_set;
+ if(negate)
+ char_set.negate();
+
+ static const charT s_punct[5] = { 'p', 'u', 'n', 'c', 't', };
+
+ switch(*m_position)
+ {
+ case 's':
+ case ' ':
+ char_set.add_class(this->m_mask_space);
+ break;
+ case 'w':
+ char_set.add_class(this->m_word_mask);
+ break;
+ case '_':
+ char_set.add_single(digraph<charT>(charT('$')));
+ char_set.add_single(digraph<charT>(charT('&')));
+ char_set.add_single(digraph<charT>(charT('*')));
+ char_set.add_single(digraph<charT>(charT('+')));
+ char_set.add_single(digraph<charT>(charT('-')));
+ char_set.add_single(digraph<charT>(charT('_')));
+ char_set.add_single(digraph<charT>(charT('<')));
+ char_set.add_single(digraph<charT>(charT('>')));
+ break;
+ case '.':
+ char_set.add_class(this->m_traits.lookup_classname(s_punct, s_punct+5));
+ break;
+ case '(':
+ char_set.add_single(digraph<charT>(charT('(')));
+ char_set.add_single(digraph<charT>(charT('[')));
+ char_set.add_single(digraph<charT>(charT('{')));
+ break;
+ case ')':
+ char_set.add_single(digraph<charT>(charT(')')));
+ char_set.add_single(digraph<charT>(charT(']')));
+ char_set.add_single(digraph<charT>(charT('}')));
+ break;
+ case '"':
+ char_set.add_single(digraph<charT>(charT('"')));
+ char_set.add_single(digraph<charT>(charT('\'')));
+ char_set.add_single(digraph<charT>(charT('`')));
+ break;
+ case '\'':
+ char_set.add_single(digraph<charT>(charT('\'')));
+ char_set.add_single(digraph<charT>(charT(',')));
+ char_set.add_single(digraph<charT>(charT('#')));
+ break;
+ case '<':
+ char_set.add_single(digraph<charT>(charT(';')));
+ break;
+ case '>':
+ char_set.add_single(digraph<charT>(charT('\n')));
+ char_set.add_single(digraph<charT>(charT('\f')));
+ break;
+ default:
+ fail(regex_constants::error_ctype, m_position - m_base);
+ return false;
+ }
+ if(0 == this->append_set(char_set))
+ {
+ fail(regex_constants::error_ctype, m_position - m_base);
+ return false;
+ }
+ ++m_position;
+ return true;
+}
+
+template <class charT, class traits>
+regex_constants::syntax_option_type basic_regex_parser<charT, traits>::parse_options()
+{
+ // we have a (?imsx-imsx) group, convert it into a set of flags:
+ regex_constants::syntax_option_type f = this->flags();
+ bool breakout = false;
+ do
+ {
+ switch(*m_position)
+ {
+ case 's':
+ f |= regex_constants::mod_s;
+ f &= ~regex_constants::no_mod_s;
+ break;
+ case 'm':
+ f &= ~regex_constants::no_mod_m;
+ break;
+ case 'i':
+ f |= regex_constants::icase;
+ break;
+ case 'x':
+ f |= regex_constants::mod_x;
+ break;
+ default:
+ breakout = true;
+ continue;
+ }
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_paren, m_position - m_base);
+ return false;
+ }
+ }
+ while(!breakout);
+
+ breakout = false;
+
+ if(*m_position == static_cast<charT>('-'))
+ {
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_paren, m_position - m_base);
+ return false;
+ }
+ do
+ {
+ switch(*m_position)
+ {
+ case 's':
+ f &= ~regex_constants::mod_s;
+ f |= regex_constants::no_mod_s;
+ break;
+ case 'm':
+ f |= regex_constants::no_mod_m;
+ break;
+ case 'i':
+ f &= ~regex_constants::icase;
+ break;
+ case 'x':
+ f &= ~regex_constants::mod_x;
+ break;
+ default:
+ breakout = true;
+ continue;
+ }
+ if(++m_position == m_end)
+ {
+ // Rewind to start of (? sequence:
+ --m_position;
+ while(this->m_traits.syntax_type(*m_position) != regex_constants::syntax_open_mark) --m_position;
+ fail(regex_constants::error_paren, m_position - m_base);
+ return false;
+ }
+ }
+ while(!breakout);
+ }
+ return f;
+}
+
+template <class charT, class traits>
+bool basic_regex_parser<charT, traits>::unwind_alts(std::ptrdiff_t last_paren_start)
+{
+ //
+ // If we didn't actually add any states after the last
+ // alternative then that's an error:
+ //
+ if((this->m_alt_insert_point == static_cast<std::ptrdiff_t>(this->m_pdata->m_data.size()))
+ && m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start)
+ &&
+ !(
+ ((this->flags() & regbase::main_option_type) == regbase::perl_syntax_group)
+ &&
+ ((this->flags() & regbase::no_empty_expressions) == 0)
+ )
+ )
+ {
+ fail(regex_constants::error_empty, this->m_position - this->m_base, "Can't terminate a sub-expression with an alternation operator |.");
+ return false;
+ }
+ //
+ // Fix up our alternatives:
+ //
+ while(m_alt_jumps.size() && (m_alt_jumps.back() > last_paren_start))
+ {
+ //
+ // fix up the jump to point to the end of the states
+ // that we've just added:
+ //
+ std::ptrdiff_t jump_offset = m_alt_jumps.back();
+ m_alt_jumps.pop_back();
+ this->m_pdata->m_data.align();
+ re_jump* jmp = static_cast<re_jump*>(this->getaddress(jump_offset));
+ BOOST_ASSERT(jmp->type == syntax_element_jump);
+ jmp->alt.i = this->m_pdata->m_data.size() - jump_offset;
+ }
+ return true;
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespace BOOST_REGEX_DETAIL_NS
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/c_regex_traits.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/c_regex_traits.hpp
index d99b0f341b8..d99b0f341b8 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/c_regex_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/c_regex_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/char_regex_traits.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/char_regex_traits.hpp
index e8a501ca006..e8a501ca006 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/char_regex_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/char_regex_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/cpp_regex_traits.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/cpp_regex_traits.hpp
index b7b32d8a5c3..b7b32d8a5c3 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/cpp_regex_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/cpp_regex_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/cregex.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/cregex.hpp
index 67abfbee194..67abfbee194 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/cregex.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/cregex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/error_type.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/error_type.hpp
index afcc71e3d84..afcc71e3d84 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/error_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/error_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/fileiter.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/fileiter.hpp
new file mode 100644
index 00000000000..7c865c63098
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/fileiter.hpp
@@ -0,0 +1,452 @@
+/*
+ *
+ * Copyright (c) 1998-2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE fileiter.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares various platform independent file and
+ * directory iterators, plus binary file input in
+ * the form of class map_file.
+ */
+
+#ifndef BOOST_RE_FILEITER_HPP_INCLUDED
+#define BOOST_RE_FILEITER_HPP_INCLUDED
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+#include <boost/assert.hpp>
+
+#ifndef BOOST_REGEX_NO_FILEITER
+
+#if (defined(__CYGWIN__) || defined(__CYGWIN32__)) && !defined(BOOST_REGEX_NO_W32)
+#error "Sorry, can't mix <windows.h> with STL code and gcc compiler: if you ran configure, try again with configure --disable-ms-windows"
+#define BOOST_REGEX_FI_WIN32_MAP
+#define BOOST_REGEX_FI_POSIX_DIR
+#elif (defined(__WIN32__) || defined(_WIN32) || defined(WIN32)) && !defined(BOOST_REGEX_NO_W32)
+#define BOOST_REGEX_FI_WIN32_MAP
+#define BOOST_REGEX_FI_WIN32_DIR
+#else
+#define BOOST_REGEX_FI_POSIX_MAP
+#define BOOST_REGEX_FI_POSIX_DIR
+#endif
+
+#if defined(BOOST_REGEX_FI_WIN32_MAP)||defined(BOOST_REGEX_FI_WIN32_DIR)
+#include <windows.h>
+#endif
+
+#if defined(BOOST_REGEX_FI_WIN32_DIR)
+
+#include <cstddef>
+
+namespace boost{
+ namespace BOOST_REGEX_DETAIL_NS{
+
+#ifndef BOOST_NO_ANSI_APIS
+typedef WIN32_FIND_DATAA _fi_find_data;
+#else
+typedef WIN32_FIND_DATAW _fi_find_data;
+#endif
+typedef HANDLE _fi_find_handle;
+
+ } // namespace BOOST_REGEX_DETAIL_NS
+
+} // namespace boost
+
+#define _fi_invalid_handle INVALID_HANDLE_VALUE
+#define _fi_dir FILE_ATTRIBUTE_DIRECTORY
+
+#elif defined(BOOST_REGEX_FI_POSIX_DIR)
+
+#include <cstddef>
+#include <cstdio>
+#include <cctype>
+#include <iterator>
+#include <list>
+#include <cassert>
+#include <dirent.h>
+
+#if defined(__SUNPRO_CC)
+using std::list;
+#endif
+
+#ifndef MAX_PATH
+#define MAX_PATH 256
+#endif
+
+namespace boost{
+ namespace BOOST_REGEX_DETAIL_NS{
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+struct _fi_find_data
+{
+ unsigned dwFileAttributes;
+ char cFileName[MAX_PATH];
+};
+
+struct _fi_priv_data;
+
+typedef _fi_priv_data* _fi_find_handle;
+#define _fi_invalid_handle 0
+#define _fi_dir 1
+
+_fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData);
+bool _fi_FindNextFile(_fi_find_handle hFindFile, _fi_find_data* lpFindFileData);
+bool _fi_FindClose(_fi_find_handle hFindFile);
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+ } // namespace BOOST_REGEX_DETAIL_NS
+} // namespace boost
+
+#ifdef FindFirstFile
+ #undef FindFirstFile
+#endif
+#ifdef FindNextFile
+ #undef FindNextFile
+#endif
+#ifdef FindClose
+ #undef FindClose
+#endif
+
+#define FindFirstFileA _fi_FindFirstFile
+#define FindNextFileA _fi_FindNextFile
+#define FindClose _fi_FindClose
+
+#endif
+
+namespace boost{
+ namespace BOOST_REGEX_DETAIL_NS{
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+#ifdef BOOST_REGEX_FI_WIN32_MAP // win32 mapfile
+
+class BOOST_REGEX_DECL mapfile
+{
+ HANDLE hfile;
+ HANDLE hmap;
+ const char* _first;
+ const char* _last;
+public:
+
+ typedef const char* iterator;
+
+ mapfile(){ hfile = hmap = 0; _first = _last = 0; }
+ mapfile(const char* file){ hfile = hmap = 0; _first = _last = 0; open(file); }
+ ~mapfile(){ close(); }
+ void open(const char* file);
+ void close();
+ const char* begin(){ return _first; }
+ const char* end(){ return _last; }
+ size_t size(){ return _last - _first; }
+ bool valid(){ return (hfile != 0) && (hfile != INVALID_HANDLE_VALUE); }
+};
+
+
+#else
+
+class BOOST_REGEX_DECL mapfile_iterator;
+
+class BOOST_REGEX_DECL mapfile
+{
+ typedef char* pointer;
+ std::FILE* hfile;
+ long int _size;
+ pointer* _first;
+ pointer* _last;
+ mutable std::list<pointer*> condemed;
+ enum sizes
+ {
+ buf_size = 4096
+ };
+ void lock(pointer* node)const;
+ void unlock(pointer* node)const;
+public:
+
+ typedef mapfile_iterator iterator;
+
+ mapfile(){ hfile = 0; _size = 0; _first = _last = 0; }
+ mapfile(const char* file){ hfile = 0; _size = 0; _first = _last = 0; open(file); }
+ ~mapfile(){ close(); }
+ void open(const char* file);
+ void close();
+ iterator begin()const;
+ iterator end()const;
+ unsigned long size()const{ return _size; }
+ bool valid()const{ return hfile != 0; }
+ friend class mapfile_iterator;
+};
+
+class BOOST_REGEX_DECL mapfile_iterator
+{
+ typedef mapfile::pointer internal_pointer;
+ internal_pointer* node;
+ const mapfile* file;
+ unsigned long offset;
+ long position()const
+ {
+ return file ? ((node - file->_first) * mapfile::buf_size + offset) : 0;
+ }
+ void position(long pos)
+ {
+ if(file)
+ {
+ node = file->_first + (pos / mapfile::buf_size);
+ offset = pos % mapfile::buf_size;
+ }
+ }
+public:
+ typedef std::ptrdiff_t difference_type;
+ typedef char value_type;
+ typedef const char* pointer;
+ typedef const char& reference;
+ typedef std::random_access_iterator_tag iterator_category;
+
+ mapfile_iterator() { node = 0; file = 0; offset = 0; }
+ mapfile_iterator(const mapfile* f, long arg_position)
+ {
+ BOOST_ASSERT(f);
+ file = f;
+ node = f->_first + arg_position / mapfile::buf_size;
+ offset = arg_position % mapfile::buf_size;
+ file->lock(node);
+ }
+ mapfile_iterator(const mapfile_iterator& i)
+ {
+ file = i.file;
+ node = i.node;
+ offset = i.offset;
+ if(file)
+ file->lock(node);
+ }
+ ~mapfile_iterator()
+ {
+ if(file && node)
+ file->unlock(node);
+ }
+ mapfile_iterator& operator = (const mapfile_iterator& i);
+ char operator* ()const
+ {
+ BOOST_ASSERT(node >= file->_first);
+ BOOST_ASSERT(node < file->_last);
+ return file ? *(*node + sizeof(int) + offset) : char(0);
+ }
+ char operator[] (long off)const
+ {
+ mapfile_iterator tmp(*this);
+ tmp += off;
+ return *tmp;
+ }
+ mapfile_iterator& operator++ ();
+ mapfile_iterator operator++ (int);
+ mapfile_iterator& operator-- ();
+ mapfile_iterator operator-- (int);
+
+ mapfile_iterator& operator += (long off)
+ {
+ position(position() + off);
+ return *this;
+ }
+ mapfile_iterator& operator -= (long off)
+ {
+ position(position() - off);
+ return *this;
+ }
+
+ friend inline bool operator==(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return (i.file == j.file) && (i.node == j.node) && (i.offset == j.offset);
+ }
+
+ friend inline bool operator!=(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return !(i == j);
+ }
+
+ friend inline bool operator<(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() < j.position();
+ }
+ friend inline bool operator>(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() > j.position();
+ }
+ friend inline bool operator<=(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() <= j.position();
+ }
+ friend inline bool operator>=(const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() >= j.position();
+ }
+
+ friend mapfile_iterator operator + (const mapfile_iterator& i, long off);
+ friend mapfile_iterator operator + (long off, const mapfile_iterator& i)
+ {
+ mapfile_iterator tmp(i);
+ return tmp += off;
+ }
+ friend mapfile_iterator operator - (const mapfile_iterator& i, long off);
+ friend inline long operator - (const mapfile_iterator& i, const mapfile_iterator& j)
+ {
+ return i.position() - j.position();
+ }
+};
+
+#endif
+
+// _fi_sep determines the directory separator, either '\\' or '/'
+BOOST_REGEX_DECL extern const char* _fi_sep;
+
+struct file_iterator_ref
+{
+ _fi_find_handle hf;
+ _fi_find_data _data;
+ long count;
+};
+
+
+class BOOST_REGEX_DECL file_iterator
+{
+ char* _root;
+ char* _path;
+ char* ptr;
+ file_iterator_ref* ref;
+
+public:
+ typedef std::ptrdiff_t difference_type;
+ typedef const char* value_type;
+ typedef const char** pointer;
+ typedef const char*& reference;
+ typedef std::input_iterator_tag iterator_category;
+
+ file_iterator();
+ file_iterator(const char* wild);
+ ~file_iterator();
+ file_iterator(const file_iterator&);
+ file_iterator& operator=(const file_iterator&);
+ const char* root()const { return _root; }
+ const char* path()const { return _path; }
+ const char* name()const { return ptr; }
+ _fi_find_data* data() { return &(ref->_data); }
+ void next();
+ file_iterator& operator++() { next(); return *this; }
+ file_iterator operator++(int);
+ const char* operator*() { return path(); }
+
+ friend inline bool operator == (const file_iterator& f1, const file_iterator& f2)
+ {
+ return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
+ }
+
+ friend inline bool operator != (const file_iterator& f1, const file_iterator& f2)
+ {
+ return !(f1 == f2);
+ }
+
+};
+
+// dwa 9/13/00 - suppress unused parameter warning
+inline bool operator < (const file_iterator&, const file_iterator&)
+{
+ return false;
+}
+
+
+class BOOST_REGEX_DECL directory_iterator
+{
+ char* _root;
+ char* _path;
+ char* ptr;
+ file_iterator_ref* ref;
+
+public:
+ typedef std::ptrdiff_t difference_type;
+ typedef const char* value_type;
+ typedef const char** pointer;
+ typedef const char*& reference;
+ typedef std::input_iterator_tag iterator_category;
+
+ directory_iterator();
+ directory_iterator(const char* wild);
+ ~directory_iterator();
+ directory_iterator(const directory_iterator& other);
+ directory_iterator& operator=(const directory_iterator& other);
+
+ const char* root()const { return _root; }
+ const char* path()const { return _path; }
+ const char* name()const { return ptr; }
+ _fi_find_data* data() { return &(ref->_data); }
+ void next();
+ directory_iterator& operator++() { next(); return *this; }
+ directory_iterator operator++(int);
+ const char* operator*() { return path(); }
+
+ static const char* separator() { return _fi_sep; }
+
+ friend inline bool operator == (const directory_iterator& f1, const directory_iterator& f2)
+ {
+ return ((f1.ref->hf == _fi_invalid_handle) && (f2.ref->hf == _fi_invalid_handle));
+ }
+
+
+ friend inline bool operator != (const directory_iterator& f1, const directory_iterator& f2)
+ {
+ return !(f1 == f2);
+ }
+
+ };
+
+inline bool operator < (const directory_iterator&, const directory_iterator&)
+{
+ return false;
+}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+
+} // namespace BOOST_REGEX_DETAIL_NS
+using boost::BOOST_REGEX_DETAIL_NS::directory_iterator;
+using boost::BOOST_REGEX_DETAIL_NS::file_iterator;
+using boost::BOOST_REGEX_DETAIL_NS::mapfile;
+} // namespace boost
+
+#endif // BOOST_REGEX_NO_FILEITER
+#endif // BOOST_RE_FILEITER_HPP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/instances.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/instances.hpp
new file mode 100644
index 00000000000..0e423437c7e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/instances.hpp
@@ -0,0 +1,236 @@
+/*
+ *
+ * Copyright (c) 1998-2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE instances.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Defines those template instances that are placed in the
+ * library rather than in the users object files.
+ */
+
+//
+// note no include guard, we may include this multiple times:
+//
+#ifndef BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+
+namespace boost{
+
+//
+// this header can be included multiple times, each time with
+// a different character type, BOOST_REGEX_CHAR_T must be defined
+// first:
+//
+#ifndef BOOST_REGEX_CHAR_T
+# error "BOOST_REGEX_CHAR_T not defined"
+#endif
+
+#ifndef BOOST_REGEX_TRAITS_T
+# define BOOST_REGEX_TRAITS_T , boost::regex_traits<BOOST_REGEX_CHAR_T >
+#endif
+
+//
+// what follows is compiler specific:
+//
+
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+# ifndef BOOST_REGEX_INSTANTIATE
+# pragma option push -Jgx
+# endif
+
+template class BOOST_REGEX_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
+template class BOOST_REGEX_DECL match_results< const BOOST_REGEX_CHAR_T* >;
+#ifndef BOOST_NO_STD_ALLOCATOR
+template class BOOST_REGEX_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
+#endif
+
+# ifndef BOOST_REGEX_INSTANTIATE
+# pragma option pop
+# endif
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+#elif defined(BOOST_MSVC) || defined(__ICL)
+
+# ifndef BOOST_REGEX_INSTANTIATE
+# ifdef __GNUC__
+# define template __extension__ extern template
+# else
+# if BOOST_MSVC > 1310
+# define BOOST_REGEX_TEMPLATE_DECL
+# endif
+# define template extern template
+# endif
+# endif
+
+#ifndef BOOST_REGEX_TEMPLATE_DECL
+# define BOOST_REGEX_TEMPLATE_DECL BOOST_REGEX_DECL
+#endif
+
+# ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4251)
+#if BOOST_MSVC < 1700
+# pragma warning(disable : 4231)
+#endif
+# if BOOST_MSVC < 1600
+# pragma warning(disable : 4660)
+# endif
+# endif
+
+template class BOOST_REGEX_TEMPLATE_DECL basic_regex< BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >;
+
+template class BOOST_REGEX_TEMPLATE_DECL match_results< const BOOST_REGEX_CHAR_T* >;
+#ifndef BOOST_NO_STD_ALLOCATOR
+template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >;
+#endif
+#if !(defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB <= 1))\
+ && !(defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 800))\
+ && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))\
+ && !defined(BOOST_REGEX_ICU_INSTANCES)
+template class BOOST_REGEX_TEMPLATE_DECL match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >;
+#ifndef BOOST_NO_STD_ALLOCATOR
+template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_matcher< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >;
+#endif
+#endif
+
+
+# ifdef BOOST_MSVC
+# pragma warning(pop)
+# endif
+
+# ifdef template
+# undef template
+# endif
+
+#undef BOOST_REGEX_TEMPLATE_DECL
+
+#elif (defined(__GNUC__) && (__GNUC__ >= 3)) || !defined(BOOST_NO_CXX11_EXTERN_TEMPLATE)
+
+#if defined(__clang__)
+# pragma clang diagnostic push
+# if defined(__APPLE_CC__)
+# if (__clang_major__ > 6)
+# pragma clang diagnostic ignored "-Wkeyword-macro"
+# endif
+# else
+# if (__clang_major__ > 3) || ((__clang_major__ == 3) && (__clang_minor__ > 5))
+# pragma clang diagnostic ignored "-Wkeyword-macro"
+# endif
+# endif
+#endif
+
+# ifndef BOOST_REGEX_INSTANTIATE
+# ifdef __GNUC__
+# define template __extension__ extern template
+# else
+# define template extern template
+# endif
+# endif
+
+#if !defined(BOOST_NO_STD_LOCALE) && !defined(BOOST_REGEX_ICU_INSTANCES)
+namespace BOOST_REGEX_DETAIL_NS{
+template BOOST_REGEX_DECL
+std::locale cpp_regex_traits_base<BOOST_REGEX_CHAR_T>::imbue(const std::locale& l);
+
+template BOOST_REGEX_DECL
+cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform_primary(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
+template BOOST_REGEX_DECL
+cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::transform(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
+template BOOST_REGEX_DECL
+cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::string_type
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_collatename(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
+template BOOST_REGEX_DECL
+void cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::init();
+template BOOST_REGEX_DECL
+cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::char_class_type
+ cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::lookup_classname_imp(const BOOST_REGEX_CHAR_T* p1, const BOOST_REGEX_CHAR_T* p2) const;
+#ifdef BOOST_REGEX_BUGGY_CTYPE_FACET
+template BOOST_REGEX_DECL
+bool cpp_regex_traits_implementation<BOOST_REGEX_CHAR_T>::isctype(const BOOST_REGEX_CHAR_T c, char_class_type mask) const;
+#endif
+} // namespace
+template BOOST_REGEX_DECL
+boost::intmax_t cpp_regex_traits<BOOST_REGEX_CHAR_T>::toi(const BOOST_REGEX_CHAR_T*& first, const BOOST_REGEX_CHAR_T* last, int radix)const;
+template BOOST_REGEX_DECL
+std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::catalog_name(const std::string& name);
+template BOOST_REGEX_DECL
+std::string& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name_inst();
+template BOOST_REGEX_DECL
+std::string cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_catalog_name();
+#ifdef BOOST_HAS_THREADS
+template BOOST_REGEX_DECL
+static_mutex& cpp_regex_traits<BOOST_REGEX_CHAR_T>::get_mutex_inst();
+#endif
+#endif
+
+template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >&
+ basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::do_assign(
+ const BOOST_REGEX_CHAR_T* p1,
+ const BOOST_REGEX_CHAR_T* p2,
+ flag_type f);
+template BOOST_REGEX_DECL basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::locale_type BOOST_REGEX_CALL
+ basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >::imbue(locale_type l);
+
+template BOOST_REGEX_DECL void BOOST_REGEX_CALL
+ match_results<const BOOST_REGEX_CHAR_T*>::maybe_assign(
+ const match_results<const BOOST_REGEX_CHAR_T*>& m);
+
+namespace BOOST_REGEX_DETAIL_NS{
+template BOOST_REGEX_DECL void perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::construct_init(
+ const basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& e, match_flag_type f);
+template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::match();
+template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::find();
+} // namespace
+
+#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) \
+ && !defined(BOOST_REGEX_ICU_INSTANCES)\
+ && !defined(__SGI_STL_PORT)\
+ && !defined(_STLPORT_VERSION)
+// std:basic_string<>::const_iterator instances as well:
+template BOOST_REGEX_DECL void BOOST_REGEX_CALL
+ match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>::maybe_assign(
+ const match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& m);
+
+namespace BOOST_REGEX_DETAIL_NS{
+template BOOST_REGEX_DECL void perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::construct_init(
+ const basic_regex<BOOST_REGEX_CHAR_T>& e, match_flag_type f);
+template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::match();
+template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::find();
+} // namespace
+#endif
+
+# ifdef template
+# undef template
+# endif
+
+#ifdef __clang__
+#pragma clang diagnostic pop
+#endif
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_NO_EXTERNAL_TEMPLATES
+
+
+
+
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/iterator_category.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/iterator_category.hpp
index 9e401423780..9e401423780 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/iterator_category.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/iterator_category.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/iterator_traits.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/iterator_traits.hpp
index ae45ecb80c5..ae45ecb80c5 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/iterator_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/iterator_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/match_flags.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/match_flags.hpp
new file mode 100644
index 00000000000..aa8fd532634
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/match_flags.hpp
@@ -0,0 +1,149 @@
+/*
+ *
+ * Copyright (c) 1998-2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE match_flags.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares match_flags type.
+ */
+
+#ifndef BOOST_REGEX_V4_MATCH_FLAGS
+#define BOOST_REGEX_V4_MATCH_FLAGS
+
+#ifdef __cplusplus
+# include <boost/cstdint.hpp>
+#endif
+
+#ifdef __cplusplus
+namespace boost{
+ namespace regex_constants{
+#endif
+
+typedef enum _match_flags
+{
+ match_default = 0,
+ match_not_bol = 1, /* first is not start of line */
+ match_not_eol = match_not_bol << 1, /* last is not end of line */
+ match_not_bob = match_not_eol << 1, /* first is not start of buffer */
+ match_not_eob = match_not_bob << 1, /* last is not end of buffer */
+ match_not_bow = match_not_eob << 1, /* first is not start of word */
+ match_not_eow = match_not_bow << 1, /* last is not end of word */
+ match_not_dot_newline = match_not_eow << 1, /* \n is not matched by '.' */
+ match_not_dot_null = match_not_dot_newline << 1, /* '\0' is not matched by '.' */
+ match_prev_avail = match_not_dot_null << 1, /* *--first is a valid expression */
+ match_init = match_prev_avail << 1, /* internal use */
+ match_any = match_init << 1, /* don't care what we match */
+ match_not_null = match_any << 1, /* string can't be null */
+ match_continuous = match_not_null << 1, /* each grep match must continue from */
+ /* uninterupted from the previous one */
+ match_partial = match_continuous << 1, /* find partial matches */
+
+ match_stop = match_partial << 1, /* stop after first match (grep) V3 only */
+ match_not_initial_null = match_stop, /* don't match initial null, V4 only */
+ match_all = match_stop << 1, /* must find the whole of input even if match_any is set */
+ match_perl = match_all << 1, /* Use perl matching rules */
+ match_posix = match_perl << 1, /* Use POSIX matching rules */
+ match_nosubs = match_posix << 1, /* don't trap marked subs */
+ match_extra = match_nosubs << 1, /* include full capture information for repeated captures */
+ match_single_line = match_extra << 1, /* treat text as single line and ignor any \n's when matching ^ and $. */
+ match_unused1 = match_single_line << 1, /* unused */
+ match_unused2 = match_unused1 << 1, /* unused */
+ match_unused3 = match_unused2 << 1, /* unused */
+ match_max = match_unused3,
+
+ format_perl = 0, /* perl style replacement */
+ format_default = 0, /* ditto. */
+ format_sed = match_max << 1, /* sed style replacement. */
+ format_all = format_sed << 1, /* enable all extentions to sytax. */
+ format_no_copy = format_all << 1, /* don't copy non-matching segments. */
+ format_first_only = format_no_copy << 1, /* Only replace first occurance. */
+ format_is_if = format_first_only << 1, /* internal use only. */
+ format_literal = format_is_if << 1, /* treat string as a literal */
+
+ match_not_any = match_not_bol | match_not_eol | match_not_bob
+ | match_not_eob | match_not_bow | match_not_eow | match_not_dot_newline
+ | match_not_dot_null | match_prev_avail | match_init | match_not_null
+ | match_continuous | match_partial | match_stop | match_not_initial_null
+ | match_stop | match_all | match_perl | match_posix | match_nosubs
+ | match_extra | match_single_line | match_unused1 | match_unused2
+ | match_unused3 | match_max | format_perl | format_default | format_sed
+ | format_all | format_no_copy | format_first_only | format_is_if
+ | format_literal
+
+
+} match_flags;
+
+#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER <= 1310))
+typedef unsigned long match_flag_type;
+#else
+typedef match_flags match_flag_type;
+
+
+#ifdef __cplusplus
+inline match_flags operator&(match_flags m1, match_flags m2)
+{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) & static_cast<boost::int32_t>(m2)); }
+inline match_flags operator|(match_flags m1, match_flags m2)
+{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) | static_cast<boost::int32_t>(m2)); }
+inline match_flags operator^(match_flags m1, match_flags m2)
+{ return static_cast<match_flags>(static_cast<boost::int32_t>(m1) ^ static_cast<boost::int32_t>(m2)); }
+inline match_flags operator~(match_flags m1)
+{ return static_cast<match_flags>(~static_cast<boost::int32_t>(m1)); }
+inline match_flags& operator&=(match_flags& m1, match_flags m2)
+{ m1 = m1&m2; return m1; }
+inline match_flags& operator|=(match_flags& m1, match_flags m2)
+{ m1 = m1|m2; return m1; }
+inline match_flags& operator^=(match_flags& m1, match_flags m2)
+{ m1 = m1^m2; return m1; }
+#endif
+#endif
+
+#ifdef __cplusplus
+} /* namespace regex_constants */
+/*
+ * import names into boost for backwards compatiblity:
+ */
+using regex_constants::match_flag_type;
+using regex_constants::match_default;
+using regex_constants::match_not_bol;
+using regex_constants::match_not_eol;
+using regex_constants::match_not_bob;
+using regex_constants::match_not_eob;
+using regex_constants::match_not_bow;
+using regex_constants::match_not_eow;
+using regex_constants::match_not_dot_newline;
+using regex_constants::match_not_dot_null;
+using regex_constants::match_prev_avail;
+/* using regex_constants::match_init; */
+using regex_constants::match_any;
+using regex_constants::match_not_null;
+using regex_constants::match_continuous;
+using regex_constants::match_partial;
+/*using regex_constants::match_stop; */
+using regex_constants::match_all;
+using regex_constants::match_perl;
+using regex_constants::match_posix;
+using regex_constants::match_nosubs;
+using regex_constants::match_extra;
+using regex_constants::match_single_line;
+/*using regex_constants::match_max; */
+using regex_constants::format_all;
+using regex_constants::format_sed;
+using regex_constants::format_perl;
+using regex_constants::format_default;
+using regex_constants::format_no_copy;
+using regex_constants::format_first_only;
+/*using regex_constants::format_is_if;*/
+
+} /* namespace boost */
+#endif /* __cplusplus */
+#endif /* include guard */
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/match_results.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/match_results.hpp
new file mode 100644
index 00000000000..d88a7b16bda
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/match_results.hpp
@@ -0,0 +1,716 @@
+/*
+ *
+ * Copyright (c) 1998-2009
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE match_results.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares template class match_results.
+ */
+
+#ifndef BOOST_REGEX_V4_MATCH_RESULTS_HPP
+#define BOOST_REGEX_V4_MATCH_RESULTS_HPP
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+namespace boost{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4251)
+#if BOOST_MSVC < 1700
+# pragma warning(disable : 4231)
+#endif
+# if BOOST_MSVC < 1600
+# pragma warning(disable : 4660)
+# endif
+#endif
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+class named_subexpressions;
+
+}
+
+template <class BidiIterator, class Allocator>
+class match_results
+{
+private:
+#ifndef BOOST_NO_STD_ALLOCATOR
+ typedef std::vector<sub_match<BidiIterator>, Allocator> vector_type;
+#else
+ typedef std::vector<sub_match<BidiIterator> > vector_type;
+#endif
+public:
+ typedef sub_match<BidiIterator> value_type;
+#ifndef BOOST_NO_CXX11_ALLOCATOR
+ typedef typename std::allocator_traits<Allocator>::value_type const & const_reference;
+#elif !defined(BOOST_NO_STD_ALLOCATOR) && !(defined(BOOST_MSVC) && defined(_STLPORT_VERSION))
+ typedef typename Allocator::const_reference const_reference;
+#else
+ typedef const value_type& const_reference;
+#endif
+ typedef const_reference reference;
+ typedef typename vector_type::const_iterator const_iterator;
+ typedef const_iterator iterator;
+ typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<
+ BidiIterator>::difference_type difference_type;
+#ifdef BOOST_NO_CXX11_ALLOCATOR
+ typedef typename Allocator::size_type size_type;
+#else
+ typedef typename std::allocator_traits<Allocator>::size_type size_type;
+#endif
+ typedef Allocator allocator_type;
+ typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<
+ BidiIterator>::value_type char_type;
+ typedef std::basic_string<char_type> string_type;
+ typedef BOOST_REGEX_DETAIL_NS::named_subexpressions named_sub_type;
+
+ // construct/copy/destroy:
+ explicit match_results(const Allocator& a = Allocator())
+#ifndef BOOST_NO_STD_ALLOCATOR
+ : m_subs(a), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) {}
+#else
+ : m_subs(), m_base(), m_null(), m_last_closed_paren(0), m_is_singular(true) { (void)a; }
+#endif
+ //
+ // IMPORTANT: in the code below, the crazy looking checks around m_is_singular are
+ // all required because it is illegal to copy a singular iterator.
+ // See https://svn.boost.org/trac/boost/ticket/3632.
+ //
+ match_results(const match_results& m)
+ : m_subs(m.m_subs), m_named_subs(m.m_named_subs), m_last_closed_paren(m.m_last_closed_paren), m_is_singular(m.m_is_singular)
+ {
+ if(!m_is_singular)
+ {
+ m_base = m.m_base;
+ m_null = m.m_null;
+ }
+ }
+ match_results& operator=(const match_results& m)
+ {
+ m_subs = m.m_subs;
+ m_named_subs = m.m_named_subs;
+ m_last_closed_paren = m.m_last_closed_paren;
+ m_is_singular = m.m_is_singular;
+ if(!m_is_singular)
+ {
+ m_base = m.m_base;
+ m_null = m.m_null;
+ }
+ return *this;
+ }
+ ~match_results(){}
+
+ // size:
+ size_type size() const
+ { return empty() ? 0 : m_subs.size() - 2; }
+ size_type max_size() const
+ { return m_subs.max_size(); }
+ bool empty() const
+ { return m_subs.size() < 2; }
+ // element access:
+ difference_type length(int sub = 0) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ sub += 2;
+ if((sub < (int)m_subs.size()) && (sub > 0))
+ return m_subs[sub].length();
+ return 0;
+ }
+ difference_type length(const char_type* sub) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ const char_type* sub_end = sub;
+ while(*sub_end) ++sub_end;
+ return length(named_subexpression_index(sub, sub_end));
+ }
+ template <class charT>
+ difference_type length(const charT* sub) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ const charT* sub_end = sub;
+ while(*sub_end) ++sub_end;
+ return length(named_subexpression_index(sub, sub_end));
+ }
+ template <class charT, class Traits, class A>
+ difference_type length(const std::basic_string<charT, Traits, A>& sub) const
+ {
+ return length(sub.c_str());
+ }
+ difference_type position(size_type sub = 0) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ sub += 2;
+ if(sub < m_subs.size())
+ {
+ const sub_match<BidiIterator>& s = m_subs[sub];
+ if(s.matched || (sub == 2))
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::distance((BidiIterator)(m_base), (BidiIterator)(s.first));
+ }
+ }
+ return ~static_cast<difference_type>(0);
+ }
+ difference_type position(const char_type* sub) const
+ {
+ const char_type* sub_end = sub;
+ while(*sub_end) ++sub_end;
+ return position(named_subexpression_index(sub, sub_end));
+ }
+ template <class charT>
+ difference_type position(const charT* sub) const
+ {
+ const charT* sub_end = sub;
+ while(*sub_end) ++sub_end;
+ return position(named_subexpression_index(sub, sub_end));
+ }
+ template <class charT, class Traits, class A>
+ difference_type position(const std::basic_string<charT, Traits, A>& sub) const
+ {
+ return position(sub.c_str());
+ }
+ string_type str(int sub = 0) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ sub += 2;
+ string_type result;
+ if(sub < (int)m_subs.size() && (sub > 0))
+ {
+ const sub_match<BidiIterator>& s = m_subs[sub];
+ if(s.matched)
+ {
+ result = s.str();
+ }
+ }
+ return result;
+ }
+ string_type str(const char_type* sub) const
+ {
+ return (*this)[sub].str();
+ }
+ template <class Traits, class A>
+ string_type str(const std::basic_string<char_type, Traits, A>& sub) const
+ {
+ return (*this)[sub].str();
+ }
+ template <class charT>
+ string_type str(const charT* sub) const
+ {
+ return (*this)[sub].str();
+ }
+ template <class charT, class Traits, class A>
+ string_type str(const std::basic_string<charT, Traits, A>& sub) const
+ {
+ return (*this)[sub].str();
+ }
+ const_reference operator[](int sub) const
+ {
+ if(m_is_singular && m_subs.empty())
+ raise_logic_error();
+ sub += 2;
+ if(sub < (int)m_subs.size() && (sub >= 0))
+ {
+ return m_subs[sub];
+ }
+ return m_null;
+ }
+ //
+ // Named sub-expressions:
+ //
+ const_reference named_subexpression(const char_type* i, const char_type* j) const
+ {
+ //
+ // Scan for the leftmost *matched* subexpression with the specified named:
+ //
+ if(m_is_singular)
+ raise_logic_error();
+ BOOST_REGEX_DETAIL_NS::named_subexpressions::range_type r = m_named_subs->equal_range(i, j);
+ while((r.first != r.second) && ((*this)[r.first->index].matched == false))
+ ++r.first;
+ return r.first != r.second ? (*this)[r.first->index] : m_null;
+ }
+ template <class charT>
+ const_reference named_subexpression(const charT* i, const charT* j) const
+ {
+ BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
+ if(i == j)
+ return m_null;
+ std::vector<char_type> s;
+ while(i != j)
+ s.insert(s.end(), *i++);
+ return named_subexpression(&*s.begin(), &*s.begin() + s.size());
+ }
+ int named_subexpression_index(const char_type* i, const char_type* j) const
+ {
+ //
+ // Scan for the leftmost *matched* subexpression with the specified named.
+ // If none found then return the leftmost expression with that name,
+ // otherwise an invalid index:
+ //
+ if(m_is_singular)
+ raise_logic_error();
+ BOOST_REGEX_DETAIL_NS::named_subexpressions::range_type s, r;
+ s = r = m_named_subs->equal_range(i, j);
+ while((r.first != r.second) && ((*this)[r.first->index].matched == false))
+ ++r.first;
+ if(r.first == r.second)
+ r = s;
+ return r.first != r.second ? r.first->index : -20;
+ }
+ template <class charT>
+ int named_subexpression_index(const charT* i, const charT* j) const
+ {
+ BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
+ if(i == j)
+ return -20;
+ std::vector<char_type> s;
+ while(i != j)
+ s.insert(s.end(), *i++);
+ return named_subexpression_index(&*s.begin(), &*s.begin() + s.size());
+ }
+ template <class Traits, class A>
+ const_reference operator[](const std::basic_string<char_type, Traits, A>& s) const
+ {
+ return named_subexpression(s.c_str(), s.c_str() + s.size());
+ }
+ const_reference operator[](const char_type* p) const
+ {
+ const char_type* e = p;
+ while(*e) ++e;
+ return named_subexpression(p, e);
+ }
+
+ template <class charT>
+ const_reference operator[](const charT* p) const
+ {
+ BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
+ if(*p == 0)
+ return m_null;
+ std::vector<char_type> s;
+ while(*p)
+ s.insert(s.end(), *p++);
+ return named_subexpression(&*s.begin(), &*s.begin() + s.size());
+ }
+ template <class charT, class Traits, class A>
+ const_reference operator[](const std::basic_string<charT, Traits, A>& ns) const
+ {
+ BOOST_STATIC_ASSERT(sizeof(charT) <= sizeof(char_type));
+ if(ns.empty())
+ return m_null;
+ std::vector<char_type> s;
+ for(unsigned i = 0; i < ns.size(); ++i)
+ s.insert(s.end(), ns[i]);
+ return named_subexpression(&*s.begin(), &*s.begin() + s.size());
+ }
+
+ const_reference prefix() const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ return (*this)[-1];
+ }
+
+ const_reference suffix() const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ return (*this)[-2];
+ }
+ const_iterator begin() const
+ {
+ return (m_subs.size() > 2) ? (m_subs.begin() + 2) : m_subs.end();
+ }
+ const_iterator end() const
+ {
+ return m_subs.end();
+ }
+ // format:
+ template <class OutputIterator, class Functor>
+ OutputIterator format(OutputIterator out,
+ Functor fmt,
+ match_flag_type flags = format_default) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ typedef typename BOOST_REGEX_DETAIL_NS::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, OutputIterator>::type F;
+ F func(fmt);
+ return func(*this, out, flags);
+ }
+ template <class Functor>
+ string_type format(Functor fmt, match_flag_type flags = format_default) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ std::basic_string<char_type> result;
+ BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<char_type> > i(result);
+
+ typedef typename BOOST_REGEX_DETAIL_NS::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<char_type> > >::type F;
+ F func(fmt);
+
+ func(*this, i, flags);
+ return result;
+ }
+ // format with locale:
+ template <class OutputIterator, class Functor, class RegexT>
+ OutputIterator format(OutputIterator out,
+ Functor fmt,
+ match_flag_type flags,
+ const RegexT& re) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ typedef ::boost::regex_traits_wrapper<typename RegexT::traits_type> traits_type;
+ typedef typename BOOST_REGEX_DETAIL_NS::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, OutputIterator, traits_type>::type F;
+ F func(fmt);
+ return func(*this, out, flags, re.get_traits());
+ }
+ template <class RegexT, class Functor>
+ string_type format(Functor fmt,
+ match_flag_type flags,
+ const RegexT& re) const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ typedef ::boost::regex_traits_wrapper<typename RegexT::traits_type> traits_type;
+ std::basic_string<char_type> result;
+ BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<char_type> > i(result);
+
+ typedef typename BOOST_REGEX_DETAIL_NS::compute_functor_type<Functor, match_results<BidiIterator, Allocator>, BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<char_type> >, traits_type >::type F;
+ F func(fmt);
+
+ func(*this, i, flags, re.get_traits());
+ return result;
+ }
+
+ const_reference get_last_closed_paren()const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ return m_last_closed_paren == 0 ? m_null : (*this)[m_last_closed_paren];
+ }
+
+ allocator_type get_allocator() const
+ {
+#ifndef BOOST_NO_STD_ALLOCATOR
+ return m_subs.get_allocator();
+#else
+ return allocator_type();
+#endif
+ }
+ void swap(match_results& that)
+ {
+ std::swap(m_subs, that.m_subs);
+ std::swap(m_named_subs, that.m_named_subs);
+ std::swap(m_last_closed_paren, that.m_last_closed_paren);
+ if(m_is_singular)
+ {
+ if(!that.m_is_singular)
+ {
+ m_base = that.m_base;
+ m_null = that.m_null;
+ }
+ }
+ else if(that.m_is_singular)
+ {
+ that.m_base = m_base;
+ that.m_null = m_null;
+ }
+ else
+ {
+ std::swap(m_base, that.m_base);
+ std::swap(m_null, that.m_null);
+ }
+ std::swap(m_is_singular, that.m_is_singular);
+ }
+ bool operator==(const match_results& that)const
+ {
+ if(m_is_singular)
+ {
+ return that.m_is_singular;
+ }
+ else if(that.m_is_singular)
+ {
+ return false;
+ }
+ return (m_subs == that.m_subs) && (m_base == that.m_base) && (m_last_closed_paren == that.m_last_closed_paren);
+ }
+ bool operator!=(const match_results& that)const
+ { return !(*this == that); }
+
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ typedef typename sub_match<BidiIterator>::capture_sequence_type capture_sequence_type;
+
+ const capture_sequence_type& captures(int i)const
+ {
+ if(m_is_singular)
+ raise_logic_error();
+ return (*this)[i].captures();
+ }
+#endif
+
+ //
+ // private access functions:
+ void BOOST_REGEX_CALL set_second(BidiIterator i)
+ {
+ BOOST_ASSERT(m_subs.size() > 2);
+ m_subs[2].second = i;
+ m_subs[2].matched = true;
+ m_subs[0].first = i;
+ m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
+ m_null.first = i;
+ m_null.second = i;
+ m_null.matched = false;
+ m_is_singular = false;
+ }
+
+ void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false)
+ {
+ if(pos)
+ m_last_closed_paren = static_cast<int>(pos);
+ pos += 2;
+ BOOST_ASSERT(m_subs.size() > pos);
+ m_subs[pos].second = i;
+ m_subs[pos].matched = m;
+ if((pos == 2) && !escape_k)
+ {
+ m_subs[0].first = i;
+ m_subs[0].matched = (m_subs[0].first != m_subs[0].second);
+ m_null.first = i;
+ m_null.second = i;
+ m_null.matched = false;
+ m_is_singular = false;
+ }
+ }
+ void BOOST_REGEX_CALL set_size(size_type n, BidiIterator i, BidiIterator j)
+ {
+ value_type v(j);
+ size_type len = m_subs.size();
+ if(len > n + 2)
+ {
+ m_subs.erase(m_subs.begin()+n+2, m_subs.end());
+ std::fill(m_subs.begin(), m_subs.end(), v);
+ }
+ else
+ {
+ std::fill(m_subs.begin(), m_subs.end(), v);
+ if(n+2 != len)
+ m_subs.insert(m_subs.end(), n+2-len, v);
+ }
+ m_subs[1].first = i;
+ m_last_closed_paren = 0;
+ }
+ void BOOST_REGEX_CALL set_base(BidiIterator pos)
+ {
+ m_base = pos;
+ }
+ BidiIterator base()const
+ {
+ return m_base;
+ }
+ void BOOST_REGEX_CALL set_first(BidiIterator i)
+ {
+ BOOST_ASSERT(m_subs.size() > 2);
+ // set up prefix:
+ m_subs[1].second = i;
+ m_subs[1].matched = (m_subs[1].first != i);
+ // set up $0:
+ m_subs[2].first = i;
+ // zero out everything else:
+ for(size_type n = 3; n < m_subs.size(); ++n)
+ {
+ m_subs[n].first = m_subs[n].second = m_subs[0].second;
+ m_subs[n].matched = false;
+ }
+ }
+ void BOOST_REGEX_CALL set_first(BidiIterator i, size_type pos, bool escape_k = false)
+ {
+ BOOST_ASSERT(pos+2 < m_subs.size());
+ if(pos || escape_k)
+ {
+ m_subs[pos+2].first = i;
+ if(escape_k)
+ {
+ m_subs[1].second = i;
+ m_subs[1].matched = (m_subs[1].first != m_subs[1].second);
+ }
+ }
+ else
+ set_first(i);
+ }
+ void BOOST_REGEX_CALL maybe_assign(const match_results<BidiIterator, Allocator>& m);
+
+ void BOOST_REGEX_CALL set_named_subs(boost::shared_ptr<named_sub_type> subs)
+ {
+ m_named_subs = subs;
+ }
+
+private:
+ //
+ // Error handler called when an uninitialized match_results is accessed:
+ //
+ static void raise_logic_error()
+ {
+ std::logic_error e("Attempt to access an uninitialized boost::match_results<> class.");
+ boost::throw_exception(e);
+ }
+
+
+ vector_type m_subs; // subexpressions
+ BidiIterator m_base; // where the search started from
+ sub_match<BidiIterator> m_null; // a null match
+ boost::shared_ptr<named_sub_type> m_named_subs; // Shared copy of named subs in the regex object
+ int m_last_closed_paren; // Last ) to be seen - used for formatting
+ bool m_is_singular; // True if our stored iterators are singular
+};
+
+template <class BidiIterator, class Allocator>
+void BOOST_REGEX_CALL match_results<BidiIterator, Allocator>::maybe_assign(const match_results<BidiIterator, Allocator>& m)
+{
+ if(m_is_singular)
+ {
+ *this = m;
+ return;
+ }
+ const_iterator p1, p2;
+ p1 = begin();
+ p2 = m.begin();
+ //
+ // Distances are measured from the start of *this* match, unless this isn't
+ // a valid match in which case we use the start of the whole sequence. Note that
+ // no subsequent match-candidate can ever be to the left of the first match found.
+ // This ensures that when we are using bidirectional iterators, that distances
+ // measured are as short as possible, and therefore as efficient as possible
+ // to compute. Finally note that we don't use the "matched" data member to test
+ // whether a sub-expression is a valid match, because partial matches set this
+ // to false for sub-expression 0.
+ //
+ BidiIterator l_end = this->suffix().second;
+ BidiIterator l_base = (p1->first == l_end) ? this->prefix().first : (*this)[0].first;
+ difference_type len1 = 0;
+ difference_type len2 = 0;
+ difference_type base1 = 0;
+ difference_type base2 = 0;
+ std::size_t i;
+ for(i = 0; i < size(); ++i, ++p1, ++p2)
+ {
+ //
+ // Leftmost takes priority over longest; handle special cases
+ // where distances need not be computed first (an optimisation
+ // for bidirectional iterators: ensure that we don't accidently
+ // compute the length of the whole sequence, as this can be really
+ // expensive).
+ //
+ if(p1->first == l_end)
+ {
+ if(p2->first != l_end)
+ {
+ // p2 must be better than p1, and no need to calculate
+ // actual distances:
+ base1 = 1;
+ base2 = 0;
+ break;
+ }
+ else
+ {
+ // *p1 and *p2 are either unmatched or match end-of sequence,
+ // either way no need to calculate distances:
+ if((p1->matched == false) && (p2->matched == true))
+ break;
+ if((p1->matched == true) && (p2->matched == false))
+ return;
+ continue;
+ }
+ }
+ else if(p2->first == l_end)
+ {
+ // p1 better than p2, and no need to calculate distances:
+ return;
+ }
+ base1 = ::boost::BOOST_REGEX_DETAIL_NS::distance(l_base, p1->first);
+ base2 = ::boost::BOOST_REGEX_DETAIL_NS::distance(l_base, p2->first);
+ BOOST_ASSERT(base1 >= 0);
+ BOOST_ASSERT(base2 >= 0);
+ if(base1 < base2) return;
+ if(base2 < base1) break;
+
+ len1 = ::boost::BOOST_REGEX_DETAIL_NS::distance((BidiIterator)p1->first, (BidiIterator)p1->second);
+ len2 = ::boost::BOOST_REGEX_DETAIL_NS::distance((BidiIterator)p2->first, (BidiIterator)p2->second);
+ BOOST_ASSERT(len1 >= 0);
+ BOOST_ASSERT(len2 >= 0);
+ if((len1 != len2) || ((p1->matched == false) && (p2->matched == true)))
+ break;
+ if((p1->matched == true) && (p2->matched == false))
+ return;
+ }
+ if(i == size())
+ return;
+ if(base2 < base1)
+ *this = m;
+ else if((len2 > len1) || ((p1->matched == false) && (p2->matched == true)) )
+ *this = m;
+}
+
+template <class BidiIterator, class Allocator>
+void swap(match_results<BidiIterator, Allocator>& a, match_results<BidiIterator, Allocator>& b)
+{
+ a.swap(b);
+}
+
+#ifndef BOOST_NO_STD_LOCALE
+template <class charT, class traits, class BidiIterator, class Allocator>
+std::basic_ostream<charT, traits>&
+ operator << (std::basic_ostream<charT, traits>& os,
+ const match_results<BidiIterator, Allocator>& s)
+{
+ return (os << s.str());
+}
+#else
+template <class BidiIterator, class Allocator>
+std::ostream& operator << (std::ostream& os,
+ const match_results<BidiIterator, Allocator>& s)
+{
+ return (os << s.str());
+}
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/mem_block_cache.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/mem_block_cache.hpp
index 50af421ea2f..50af421ea2f 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/mem_block_cache.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/mem_block_cache.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher.hpp
new file mode 100644
index 00000000000..663e6188e23
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher.hpp
@@ -0,0 +1,626 @@
+/*
+ *
+ * Copyright (c) 2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+#ifndef BOOST_REGEX_MATCHER_HPP
+#define BOOST_REGEX_MATCHER_HPP
+
+#include <boost/regex/v4/iterator_category.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
+#endif
+
+namespace boost{
+namespace BOOST_REGEX_DETAIL_NS{
+
+//
+// error checking API:
+//
+BOOST_REGEX_DECL void BOOST_REGEX_CALL verify_options(boost::regex_constants::syntax_option_type ef, match_flag_type mf);
+//
+// function can_start:
+//
+template <class charT>
+inline bool can_start(charT c, const unsigned char* map, unsigned char mask)
+{
+ return ((c < static_cast<charT>(0)) ? true : ((c >= static_cast<charT>(1 << CHAR_BIT)) ? true : map[c] & mask));
+}
+inline bool can_start(char c, const unsigned char* map, unsigned char mask)
+{
+ return map[(unsigned char)c] & mask;
+}
+inline bool can_start(signed char c, const unsigned char* map, unsigned char mask)
+{
+ return map[(unsigned char)c] & mask;
+}
+inline bool can_start(unsigned char c, const unsigned char* map, unsigned char mask)
+{
+ return map[c] & mask;
+}
+inline bool can_start(unsigned short c, const unsigned char* map, unsigned char mask)
+{
+ return ((c >= (1 << CHAR_BIT)) ? true : map[c] & mask);
+}
+#if !defined(__hpux) && !defined(__WINSCW__)// WCHAR_MIN not usable in pp-directives.
+#if defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+inline bool can_start(wchar_t c, const unsigned char* map, unsigned char mask)
+{
+ return ((c >= static_cast<wchar_t>(1u << CHAR_BIT)) ? true : map[c] & mask);
+}
+#endif
+#endif
+#if !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+inline bool can_start(unsigned int c, const unsigned char* map, unsigned char mask)
+{
+ return (((c >= static_cast<unsigned int>(1u << CHAR_BIT)) ? true : map[c] & mask));
+}
+#endif
+
+
+//
+// Unfortunately Rogue Waves standard library appears to have a bug
+// in std::basic_string::compare that results in eroneous answers
+// in some cases (tested with Borland C++ 5.1, Rogue Wave lib version
+// 0x020101) the test case was:
+// {39135,0} < {0xff,0}
+// which succeeds when it should not.
+//
+#ifndef _RWSTD_VER
+template <class C, class T, class A>
+inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
+{
+ if(0 == *p)
+ {
+ if(s.empty() || ((s.size() == 1) && (s[0] == 0)))
+ return 0;
+ }
+ return s.compare(p);
+}
+#else
+template <class C, class T, class A>
+inline int string_compare(const std::basic_string<C,T,A>& s, const C* p)
+{
+ if(0 == *p)
+ {
+ if(s.empty() || ((s.size() == 1) && (s[0] == 0)))
+ return 0;
+ }
+ return s.compare(p);
+}
+inline int string_compare(const std::string& s, const char* p)
+{ return std::strcmp(s.c_str(), p); }
+# ifndef BOOST_NO_WREGEX
+inline int string_compare(const std::wstring& s, const wchar_t* p)
+{ return std::wcscmp(s.c_str(), p); }
+#endif
+#endif
+template <class Seq, class C>
+inline int string_compare(const Seq& s, const C* p)
+{
+ std::size_t i = 0;
+ while((i < s.size()) && (p[i] == s[i]))
+ {
+ ++i;
+ }
+ return (i == s.size()) ? -(int)p[i] : (int)s[i] - (int)p[i];
+}
+# define STR_COMP(s,p) string_compare(s,p)
+
+template<class charT>
+inline const charT* re_skip_past_null(const charT* p)
+{
+ while (*p != static_cast<charT>(0)) ++p;
+ return ++p;
+}
+
+template <class iterator, class charT, class traits_type, class char_classT>
+iterator BOOST_REGEX_CALL re_is_set_member(iterator next,
+ iterator last,
+ const re_set_long<char_classT>* set_,
+ const regex_data<charT, traits_type>& e, bool icase)
+{
+ const charT* p = reinterpret_cast<const charT*>(set_+1);
+ iterator ptr;
+ unsigned int i;
+ //bool icase = e.m_flags & regex_constants::icase;
+
+ if(next == last) return next;
+
+ typedef typename traits_type::string_type traits_string_type;
+ const ::boost::regex_traits_wrapper<traits_type>& traits_inst = *(e.m_ptraits);
+
+ // dwa 9/13/00 suppress incorrect MSVC warning - it claims this is never
+ // referenced
+ (void)traits_inst;
+
+ // try and match a single character, could be a multi-character
+ // collating element...
+ for(i = 0; i < set_->csingles; ++i)
+ {
+ ptr = next;
+ if(*p == static_cast<charT>(0))
+ {
+ // treat null string as special case:
+ if(traits_inst.translate(*ptr, icase))
+ {
+ ++p;
+ continue;
+ }
+ return set_->isnot ? next : (ptr == next) ? ++next : ptr;
+ }
+ else
+ {
+ while(*p && (ptr != last))
+ {
+ if(traits_inst.translate(*ptr, icase) != *p)
+ break;
+ ++p;
+ ++ptr;
+ }
+
+ if(*p == static_cast<charT>(0)) // if null we've matched
+ return set_->isnot ? next : (ptr == next) ? ++next : ptr;
+
+ p = re_skip_past_null(p); // skip null
+ }
+ }
+
+ charT col = traits_inst.translate(*next, icase);
+
+
+ if(set_->cranges || set_->cequivalents)
+ {
+ traits_string_type s1;
+ //
+ // try and match a range, NB only a single character can match
+ if(set_->cranges)
+ {
+ if((e.m_flags & regex_constants::collate) == 0)
+ s1.assign(1, col);
+ else
+ {
+ charT a[2] = { col, charT(0), };
+ s1 = traits_inst.transform(a, a + 1);
+ }
+ for(i = 0; i < set_->cranges; ++i)
+ {
+ if(STR_COMP(s1, p) >= 0)
+ {
+ do{ ++p; }while(*p);
+ ++p;
+ if(STR_COMP(s1, p) <= 0)
+ return set_->isnot ? next : ++next;
+ }
+ else
+ {
+ // skip first string
+ do{ ++p; }while(*p);
+ ++p;
+ }
+ // skip second string
+ do{ ++p; }while(*p);
+ ++p;
+ }
+ }
+ //
+ // try and match an equivalence class, NB only a single character can match
+ if(set_->cequivalents)
+ {
+ charT a[2] = { col, charT(0), };
+ s1 = traits_inst.transform_primary(a, a +1);
+ for(i = 0; i < set_->cequivalents; ++i)
+ {
+ if(STR_COMP(s1, p) == 0)
+ return set_->isnot ? next : ++next;
+ // skip string
+ do{ ++p; }while(*p);
+ ++p;
+ }
+ }
+ }
+ if(traits_inst.isctype(col, set_->cclasses) == true)
+ return set_->isnot ? next : ++next;
+ if((set_->cnclasses != 0) && (traits_inst.isctype(col, set_->cnclasses) == false))
+ return set_->isnot ? next : ++next;
+ return set_->isnot ? ++next : next;
+}
+
+template <class BidiIterator>
+class repeater_count
+{
+ repeater_count** stack;
+ repeater_count* next;
+ int state_id;
+ std::size_t count; // the number of iterations so far
+ BidiIterator start_pos; // where the last repeat started
+
+ repeater_count* unwind_until(int n, repeater_count* p, int current_recursion_id)
+ {
+ while(p && (p->state_id != n))
+ {
+ if(-2 - current_recursion_id == p->state_id)
+ return 0;
+ p = p->next;
+ if(p && (p->state_id < 0))
+ {
+ p = unwind_until(p->state_id, p, current_recursion_id);
+ if(!p)
+ return p;
+ p = p->next;
+ }
+ }
+ return p;
+ }
+public:
+ repeater_count(repeater_count** s) : stack(s), next(0), state_id(-1), count(0), start_pos() {}
+
+ repeater_count(int i, repeater_count** s, BidiIterator start, int current_recursion_id)
+ : start_pos(start)
+ {
+ state_id = i;
+ stack = s;
+ next = *stack;
+ *stack = this;
+ if((state_id > next->state_id) && (next->state_id >= 0))
+ count = 0;
+ else
+ {
+ repeater_count* p = next;
+ p = unwind_until(state_id, p, current_recursion_id);
+ if(p)
+ {
+ count = p->count;
+ start_pos = p->start_pos;
+ }
+ else
+ count = 0;
+ }
+ }
+ ~repeater_count()
+ {
+ if(next)
+ *stack = next;
+ }
+ std::size_t get_count() { return count; }
+ int get_id() { return state_id; }
+ std::size_t operator++() { return ++count; }
+ bool check_null_repeat(const BidiIterator& pos, std::size_t max)
+ {
+ // this is called when we are about to start a new repeat,
+ // if the last one was NULL move our count to max,
+ // otherwise save the current position.
+ bool result = (count == 0) ? false : (pos == start_pos);
+ if(result)
+ count = max;
+ else
+ start_pos = pos;
+ return result;
+ }
+};
+
+struct saved_state;
+
+enum saved_state_type
+{
+ saved_type_end = 0,
+ saved_type_paren = 1,
+ saved_type_recurse = 2,
+ saved_type_assertion = 3,
+ saved_state_alt = 4,
+ saved_state_repeater_count = 5,
+ saved_state_extra_block = 6,
+ saved_state_greedy_single_repeat = 7,
+ saved_state_rep_slow_dot = 8,
+ saved_state_rep_fast_dot = 9,
+ saved_state_rep_char = 10,
+ saved_state_rep_short_set = 11,
+ saved_state_rep_long_set = 12,
+ saved_state_non_greedy_long_repeat = 13,
+ saved_state_count = 14
+};
+
+template <class Results>
+struct recursion_info
+{
+ typedef typename Results::value_type value_type;
+ typedef typename value_type::iterator iterator;
+ int idx;
+ const re_syntax_base* preturn_address;
+ Results results;
+ repeater_count<iterator>* repeater_stack;
+ iterator location_of_start;
+};
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable : 4251)
+#if BOOST_MSVC < 1700
+# pragma warning(disable : 4231)
+#endif
+# if BOOST_MSVC < 1600
+# pragma warning(disable : 4660)
+# endif
+#endif
+
+template <class BidiIterator, class Allocator, class traits>
+class perl_matcher
+{
+public:
+ typedef typename traits::char_type char_type;
+ typedef perl_matcher<BidiIterator, Allocator, traits> self_type;
+ typedef bool (self_type::*matcher_proc_type)(void);
+ typedef std::size_t traits_size_type;
+ typedef typename is_byte<char_type>::width_type width_type;
+ typedef typename regex_iterator_traits<BidiIterator>::difference_type difference_type;
+ typedef match_results<BidiIterator, Allocator> results_type;
+
+ perl_matcher(BidiIterator first, BidiIterator end,
+ match_results<BidiIterator, Allocator>& what,
+ const basic_regex<char_type, traits>& e,
+ match_flag_type f,
+ BidiIterator l_base)
+ : m_result(what), base(first), last(end),
+ position(first), backstop(l_base), re(e), traits_inst(e.get_traits()),
+ m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
+#ifdef BOOST_REGEX_NON_RECURSIVE
+ , m_recursions(0)
+#endif
+ {
+ construct_init(e, f);
+ }
+
+ bool match();
+ bool find();
+
+ void setf(match_flag_type f)
+ { m_match_flags |= f; }
+ void unsetf(match_flag_type f)
+ { m_match_flags &= ~f; }
+
+private:
+ void construct_init(const basic_regex<char_type, traits>& e, match_flag_type f);
+
+ bool find_imp();
+ bool match_imp();
+#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
+ typedef bool (perl_matcher::*protected_proc_type)();
+ bool protected_call(protected_proc_type);
+#endif
+ void estimate_max_state_count(std::random_access_iterator_tag*);
+ void estimate_max_state_count(void*);
+ bool match_prefix();
+ bool match_all_states();
+
+ // match procs, stored in s_match_vtable:
+ bool match_startmark();
+ bool match_endmark();
+ bool match_literal();
+ bool match_start_line();
+ bool match_end_line();
+ bool match_wild();
+ bool match_match();
+ bool match_word_boundary();
+ bool match_within_word();
+ bool match_word_start();
+ bool match_word_end();
+ bool match_buffer_start();
+ bool match_buffer_end();
+ bool match_backref();
+ bool match_long_set();
+ bool match_set();
+ bool match_jump();
+ bool match_alt();
+ bool match_rep();
+ bool match_combining();
+ bool match_soft_buffer_end();
+ bool match_restart_continue();
+ bool match_long_set_repeat();
+ bool match_set_repeat();
+ bool match_char_repeat();
+ bool match_dot_repeat_fast();
+ bool match_dot_repeat_slow();
+ bool match_dot_repeat_dispatch()
+ {
+ return ::boost::is_random_access_iterator<BidiIterator>::value ? match_dot_repeat_fast() : match_dot_repeat_slow();
+ }
+ bool match_backstep();
+ bool match_assert_backref();
+ bool match_toggle_case();
+#ifdef BOOST_REGEX_RECURSIVE
+ bool backtrack_till_match(std::size_t count);
+#endif
+ bool match_recursion();
+ bool match_fail();
+ bool match_accept();
+ bool match_commit();
+ bool match_then();
+ bool skip_until_paren(int index, bool match = true);
+
+ // find procs stored in s_find_vtable:
+ bool find_restart_any();
+ bool find_restart_word();
+ bool find_restart_line();
+ bool find_restart_buf();
+ bool find_restart_lit();
+
+private:
+ // final result structure to be filled in:
+ match_results<BidiIterator, Allocator>& m_result;
+ // temporary result for POSIX matches:
+ scoped_ptr<match_results<BidiIterator, Allocator> > m_temp_match;
+ // pointer to actual result structure to fill in:
+ match_results<BidiIterator, Allocator>* m_presult;
+ // start of sequence being searched:
+ BidiIterator base;
+ // end of sequence being searched:
+ BidiIterator last;
+ // current character being examined:
+ BidiIterator position;
+ // where to restart next search after failed match attempt:
+ BidiIterator restart;
+ // where the current search started from, acts as base for $` during grep:
+ BidiIterator search_base;
+ // how far we can go back when matching lookbehind:
+ BidiIterator backstop;
+ // the expression being examined:
+ const basic_regex<char_type, traits>& re;
+ // the expression's traits class:
+ const ::boost::regex_traits_wrapper<traits>& traits_inst;
+ // the next state in the machine being matched:
+ const re_syntax_base* pstate;
+ // matching flags in use:
+ match_flag_type m_match_flags;
+ // how many states we have examined so far:
+ std::ptrdiff_t state_count;
+ // max number of states to examine before giving up:
+ std::ptrdiff_t max_state_count;
+ // whether we should ignore case or not:
+ bool icase;
+ // set to true when (position == last), indicates that we may have a partial match:
+ bool m_has_partial_match;
+ // set to true whenever we get a match:
+ bool m_has_found_match;
+ // set to true whenever we're inside an independent sub-expression:
+ bool m_independent;
+ // the current repeat being examined:
+ repeater_count<BidiIterator>* next_count;
+ // the first repeat being examined (top of linked list):
+ repeater_count<BidiIterator> rep_obj;
+ // the mask to pass when matching word boundaries:
+ typename traits::char_class_type m_word_mask;
+ // the bitmask to use when determining whether a match_any matches a newline or not:
+ unsigned char match_any_mask;
+ // recursion information:
+ std::vector<recursion_info<results_type> > recursion_stack;
+#ifdef BOOST_REGEX_RECURSIVE
+ // Set to false by a (*COMMIT):
+ bool m_can_backtrack;
+ bool m_have_accept;
+ bool m_have_then;
+#endif
+#ifdef BOOST_REGEX_NON_RECURSIVE
+ //
+ // additional members for non-recursive version:
+ //
+ typedef bool (self_type::*unwind_proc_type)(bool);
+
+ void extend_stack();
+ bool unwind(bool);
+ bool unwind_end(bool);
+ bool unwind_paren(bool);
+ bool unwind_recursion_stopper(bool);
+ bool unwind_assertion(bool);
+ bool unwind_alt(bool);
+ bool unwind_repeater_counter(bool);
+ bool unwind_extra_block(bool);
+ bool unwind_greedy_single_repeat(bool);
+ bool unwind_slow_dot_repeat(bool);
+ bool unwind_fast_dot_repeat(bool);
+ bool unwind_char_repeat(bool);
+ bool unwind_short_set_repeat(bool);
+ bool unwind_long_set_repeat(bool);
+ bool unwind_non_greedy_repeat(bool);
+ bool unwind_recursion(bool);
+ bool unwind_recursion_pop(bool);
+ bool unwind_commit(bool);
+ bool unwind_then(bool);
+ bool unwind_case(bool);
+ void destroy_single_repeat();
+ void push_matched_paren(int index, const sub_match<BidiIterator>& sub);
+ void push_recursion_stopper();
+ void push_assertion(const re_syntax_base* ps, bool positive);
+ void push_alt(const re_syntax_base* ps);
+ void push_repeater_count(int i, repeater_count<BidiIterator>** s);
+ void push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id);
+ void push_non_greedy_repeat(const re_syntax_base* ps);
+ void push_recursion(int idx, const re_syntax_base* p, results_type* presults, results_type* presults2);
+ void push_recursion_pop();
+ void push_case_change(bool);
+
+ // pointer to base of stack:
+ saved_state* m_stack_base;
+ // pointer to current stack position:
+ saved_state* m_backup_state;
+ // how many memory blocks have we used up?:
+ unsigned used_block_count;
+ // determines what value to return when unwinding from recursion,
+ // allows for mixed recursive/non-recursive algorithm:
+ bool m_recursive_result;
+ // We have unwound to a lookahead/lookbehind, used by COMMIT/PRUNE/SKIP:
+ bool m_unwound_lookahead;
+ // We have unwound to an alternative, used by THEN:
+ bool m_unwound_alt;
+ // We are unwinding a commit - used by independent subs to determine whether to stop there or carry on unwinding:
+ //bool m_unwind_commit;
+ // Recursion limit:
+ unsigned m_recursions;
+#endif
+
+ // these operations aren't allowed, so are declared private,
+ // bodies are provided to keep explicit-instantiation requests happy:
+ perl_matcher& operator=(const perl_matcher&)
+ {
+ return *this;
+ }
+ perl_matcher(const perl_matcher& that)
+ : m_result(that.m_result), re(that.re), traits_inst(that.traits_inst), rep_obj(0) {}
+};
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespace BOOST_REGEX_DETAIL_NS
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespace boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+//
+// include the implementation of perl_matcher:
+//
+#ifdef BOOST_REGEX_RECURSIVE
+#include <boost/regex/v4/perl_matcher_recursive.hpp>
+#else
+#include <boost/regex/v4/perl_matcher_non_recursive.hpp>
+#endif
+// this one has to be last:
+#include <boost/regex/v4/perl_matcher_common.hpp>
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_common.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_common.hpp
new file mode 100644
index 00000000000..3c654e588e7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_common.hpp
@@ -0,0 +1,1020 @@
+/*
+ *
+ * Copyright (c) 2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE perl_matcher_common.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Definitions of perl_matcher member functions that are
+ * common to both the recursive and non-recursive versions.
+ */
+
+#ifndef BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP
+#define BOOST_REGEX_V4_PERL_MATCHER_COMMON_HPP
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#ifdef __BORLANDC__
+# pragma option push -w-8008 -w-8066
+#endif
+#ifdef BOOST_MSVC
+# pragma warning(push)
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
+#endif
+
+namespace boost{
+namespace BOOST_REGEX_DETAIL_NS{
+
+template <class BidiIterator, class Allocator, class traits>
+void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_regex<char_type, traits>& e, match_flag_type f)
+{
+ typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
+ typedef typename basic_regex<char_type, traits>::flag_type expression_flag_type;
+
+ if(e.empty())
+ {
+ // precondition failure: e is not a valid regex.
+ std::invalid_argument ex("Invalid regular expression object");
+ boost::throw_exception(ex);
+ }
+ pstate = 0;
+ m_match_flags = f;
+ estimate_max_state_count(static_cast<category*>(0));
+ expression_flag_type re_f = re.flags();
+ icase = re_f & regex_constants::icase;
+ if(!(m_match_flags & (match_perl|match_posix)))
+ {
+ if((re_f & (regbase::main_option_type|regbase::no_perl_ex)) == 0)
+ m_match_flags |= match_perl;
+ else if((re_f & (regbase::main_option_type|regbase::emacs_ex)) == (regbase::basic_syntax_group|regbase::emacs_ex))
+ m_match_flags |= match_perl;
+ else if((re_f & (regbase::main_option_type|regbase::literal)) == (regbase::literal))
+ m_match_flags |= match_perl;
+ else
+ m_match_flags |= match_posix;
+ }
+ if(m_match_flags & match_posix)
+ {
+ m_temp_match.reset(new match_results<BidiIterator, Allocator>());
+ m_presult = m_temp_match.get();
+ }
+ else
+ m_presult = &m_result;
+#ifdef BOOST_REGEX_NON_RECURSIVE
+ m_stack_base = 0;
+ m_backup_state = 0;
+#elif defined(BOOST_REGEX_RECURSIVE)
+ m_can_backtrack = true;
+ m_have_accept = false;
+#endif
+ // find the value to use for matching word boundaries:
+ m_word_mask = re.get_data().m_word_mask;
+ // find bitmask to use for matching '.':
+ match_any_mask = static_cast<unsigned char>((f & match_not_dot_newline) ? BOOST_REGEX_DETAIL_NS::test_not_newline : BOOST_REGEX_DETAIL_NS::test_newline);
+ // Disable match_any if requested in the state machine:
+ if(e.get_data().m_disable_match_any)
+ m_match_flags &= regex_constants::match_not_any;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(std::random_access_iterator_tag*)
+{
+ //
+ // How many states should we allow our machine to visit before giving up?
+ // This is a heuristic: it takes the greater of O(N^2) and O(NS^2)
+ // where N is the length of the string, and S is the number of states
+ // in the machine. It's tempting to up this to O(N^2S) or even O(N^2S^2)
+ // but these take unreasonably amounts of time to bale out in pathological
+ // cases.
+ //
+ // Calculate NS^2 first:
+ //
+ static const std::ptrdiff_t k = 100000;
+ std::ptrdiff_t dist = boost::BOOST_REGEX_DETAIL_NS::distance(base, last);
+ if(dist == 0)
+ dist = 1;
+ std::ptrdiff_t states = re.size();
+ if(states == 0)
+ states = 1;
+ if ((std::numeric_limits<std::ptrdiff_t>::max)() / states < states)
+ {
+ max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
+ return;
+ }
+ states *= states;
+ if((std::numeric_limits<std::ptrdiff_t>::max)() / dist < states)
+ {
+ max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
+ return;
+ }
+ states *= dist;
+ if((std::numeric_limits<std::ptrdiff_t>::max)() - k < states)
+ {
+ max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
+ return;
+ }
+ states += k;
+
+ max_state_count = states;
+
+ //
+ // Now calculate N^2:
+ //
+ states = dist;
+ if((std::numeric_limits<std::ptrdiff_t>::max)() / dist < states)
+ {
+ max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
+ return;
+ }
+ states *= dist;
+ if((std::numeric_limits<std::ptrdiff_t>::max)() - k < states)
+ {
+ max_state_count = (std::min)((std::ptrdiff_t)BOOST_REGEX_MAX_STATE_COUNT, (std::numeric_limits<std::ptrdiff_t>::max)() - 2);
+ return;
+ }
+ states += k;
+ //
+ // N^2 can be a very large number indeed, to prevent things getting out
+ // of control, cap the max states:
+ //
+ if(states > BOOST_REGEX_MAX_STATE_COUNT)
+ states = BOOST_REGEX_MAX_STATE_COUNT;
+ //
+ // If (the possibly capped) N^2 is larger than our first estimate,
+ // use this instead:
+ //
+ if(states > max_state_count)
+ max_state_count = states;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::estimate_max_state_count(void*)
+{
+ // we don't know how long the sequence is:
+ max_state_count = BOOST_REGEX_MAX_STATE_COUNT;
+}
+
+#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
+template <class BidiIterator, class Allocator, class traits>
+inline bool perl_matcher<BidiIterator, Allocator, traits>::protected_call(
+ protected_proc_type proc)
+{
+ ::boost::BOOST_REGEX_DETAIL_NS::concrete_protected_call
+ <perl_matcher<BidiIterator, Allocator, traits> >
+ obj(this, proc);
+ return obj.execute();
+
+}
+#endif
+
+template <class BidiIterator, class Allocator, class traits>
+inline bool perl_matcher<BidiIterator, Allocator, traits>::match()
+{
+#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
+ return protected_call(&perl_matcher<BidiIterator, Allocator, traits>::match_imp);
+#else
+ return match_imp();
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_imp()
+{
+ // initialise our stack if we are non-recursive:
+#ifdef BOOST_REGEX_NON_RECURSIVE
+ save_state_init init(&m_stack_base, &m_backup_state);
+ used_block_count = BOOST_REGEX_MAX_BLOCKS;
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try{
+#endif
+#endif
+
+ // reset our state machine:
+ position = base;
+ search_base = base;
+ state_count = 0;
+ m_match_flags |= regex_constants::match_all;
+ m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), search_base, last);
+ m_presult->set_base(base);
+ m_presult->set_named_subs(this->re.get_named_subs());
+ if(m_match_flags & match_posix)
+ m_result = *m_presult;
+ verify_options(re.flags(), m_match_flags);
+ if(0 == match_prefix())
+ return false;
+ return (m_result[0].second == last) && (m_result[0].first == base);
+
+#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
+ }
+ catch(...)
+ {
+ // unwind all pushed states, apart from anything else this
+ // ensures that all the states are correctly destructed
+ // not just the memory freed.
+ while(unwind(true)){}
+ throw;
+ }
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline bool perl_matcher<BidiIterator, Allocator, traits>::find()
+{
+#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
+ return protected_call(&perl_matcher<BidiIterator, Allocator, traits>::find_imp);
+#else
+ return find_imp();
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::find_imp()
+{
+ static matcher_proc_type const s_find_vtable[7] =
+ {
+ &perl_matcher<BidiIterator, Allocator, traits>::find_restart_any,
+ &perl_matcher<BidiIterator, Allocator, traits>::find_restart_word,
+ &perl_matcher<BidiIterator, Allocator, traits>::find_restart_line,
+ &perl_matcher<BidiIterator, Allocator, traits>::find_restart_buf,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_prefix,
+ &perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit,
+ &perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit,
+ };
+
+ // initialise our stack if we are non-recursive:
+#ifdef BOOST_REGEX_NON_RECURSIVE
+ save_state_init init(&m_stack_base, &m_backup_state);
+ used_block_count = BOOST_REGEX_MAX_BLOCKS;
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try{
+#endif
+#endif
+
+ state_count = 0;
+ if((m_match_flags & regex_constants::match_init) == 0)
+ {
+ // reset our state machine:
+ search_base = position = base;
+ pstate = re.get_first_state();
+ m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), base, last);
+ m_presult->set_base(base);
+ m_presult->set_named_subs(this->re.get_named_subs());
+ m_match_flags |= regex_constants::match_init;
+ }
+ else
+ {
+ // start again:
+ search_base = position = m_result[0].second;
+ // If last match was null and match_not_null was not set then increment
+ // our start position, otherwise we go into an infinite loop:
+ if(((m_match_flags & match_not_null) == 0) && (m_result.length() == 0))
+ {
+ if(position == last)
+ return false;
+ else
+ ++position;
+ }
+ // reset $` start:
+ m_presult->set_size((m_match_flags & match_nosubs) ? 1u : static_cast<typename results_type::size_type>(1u + re.mark_count()), search_base, last);
+ //if((base != search_base) && (base == backstop))
+ // m_match_flags |= match_prev_avail;
+ }
+ if(m_match_flags & match_posix)
+ {
+ m_result.set_size(static_cast<typename results_type::size_type>(1u + re.mark_count()), base, last);
+ m_result.set_base(base);
+ }
+
+ verify_options(re.flags(), m_match_flags);
+ // find out what kind of expression we have:
+ unsigned type = (m_match_flags & match_continuous) ?
+ static_cast<unsigned int>(regbase::restart_continue)
+ : static_cast<unsigned int>(re.get_restart_type());
+
+ // call the appropriate search routine:
+ matcher_proc_type proc = s_find_vtable[type];
+ return (this->*proc)();
+
+#if defined(BOOST_REGEX_NON_RECURSIVE) && !defined(BOOST_NO_EXCEPTIONS)
+ }
+ catch(...)
+ {
+ // unwind all pushed states, apart from anything else this
+ // ensures that all the states are correctly destructed
+ // not just the memory freed.
+ while(unwind(true)){}
+ throw;
+ }
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_prefix()
+{
+ m_has_partial_match = false;
+ m_has_found_match = false;
+ pstate = re.get_first_state();
+ m_presult->set_first(position);
+ restart = position;
+ match_all_states();
+ if(!m_has_found_match && m_has_partial_match && (m_match_flags & match_partial))
+ {
+ m_has_found_match = true;
+ m_presult->set_second(last, 0, false);
+ position = last;
+ if((m_match_flags & match_posix) == match_posix)
+ {
+ m_result.maybe_assign(*m_presult);
+ }
+ }
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ if(m_has_found_match && (match_extra & m_match_flags))
+ {
+ //
+ // we have a match, reverse the capture information:
+ //
+ for(unsigned i = 0; i < m_presult->size(); ++i)
+ {
+ typename sub_match<BidiIterator>::capture_sequence_type & seq = ((*m_presult)[i]).get_captures();
+ std::reverse(seq.begin(), seq.end());
+ }
+ }
+#endif
+ if(!m_has_found_match)
+ position = restart; // reset search postion
+#ifdef BOOST_REGEX_RECURSIVE
+ m_can_backtrack = true; // reset for further searches
+#endif
+ return m_has_found_match;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_literal()
+{
+ unsigned int len = static_cast<const re_literal*>(pstate)->length;
+ const char_type* what = reinterpret_cast<const char_type*>(static_cast<const re_literal*>(pstate) + 1);
+ //
+ // compare string with what we stored in
+ // our records:
+ for(unsigned int i = 0; i < len; ++i, ++position)
+ {
+ if((position == last) || (traits_inst.translate(*position, icase) != what[i]))
+ return false;
+ }
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_start_line()
+{
+ if(position == backstop)
+ {
+ if((m_match_flags & match_prev_avail) == 0)
+ {
+ if((m_match_flags & match_not_bol) == 0)
+ {
+ pstate = pstate->next.p;
+ return true;
+ }
+ return false;
+ }
+ }
+ else if(m_match_flags & match_single_line)
+ return false;
+
+ // check the previous value character:
+ BidiIterator t(position);
+ --t;
+ if(position != last)
+ {
+ if(is_separator(*t) && !((*t == static_cast<char_type>('\r')) && (*position == static_cast<char_type>('\n'))) )
+ {
+ pstate = pstate->next.p;
+ return true;
+ }
+ }
+ else if(is_separator(*t))
+ {
+ pstate = pstate->next.p;
+ return true;
+ }
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_end_line()
+{
+ if(position != last)
+ {
+ if(m_match_flags & match_single_line)
+ return false;
+ // we're not yet at the end so *first is always valid:
+ if(is_separator(*position))
+ {
+ if((position != backstop) || (m_match_flags & match_prev_avail))
+ {
+ // check that we're not in the middle of \r\n sequence
+ BidiIterator t(position);
+ --t;
+ if((*t == static_cast<char_type>('\r')) && (*position == static_cast<char_type>('\n')))
+ {
+ return false;
+ }
+ }
+ pstate = pstate->next.p;
+ return true;
+ }
+ }
+ else if((m_match_flags & match_not_eol) == 0)
+ {
+ pstate = pstate->next.p;
+ return true;
+ }
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_wild()
+{
+ if(position == last)
+ return false;
+ if(is_separator(*position) && ((match_any_mask & static_cast<const re_dot*>(pstate)->mask) == 0))
+ return false;
+ if((*position == char_type(0)) && (m_match_flags & match_not_dot_null))
+ return false;
+ pstate = pstate->next.p;
+ ++position;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary()
+{
+ bool b; // indcates whether next character is a word character
+ if(position != last)
+ {
+ // prev and this character must be opposites:
+ b = traits_inst.isctype(*position, m_word_mask);
+ }
+ else
+ {
+ if (m_match_flags & match_not_eow)
+ return false;
+ b = false;
+ }
+ if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
+ {
+ if(m_match_flags & match_not_bow)
+ return false;
+ else
+ b ^= false;
+ }
+ else
+ {
+ --position;
+ b ^= traits_inst.isctype(*position, m_word_mask);
+ ++position;
+ }
+ if(b)
+ {
+ pstate = pstate->next.p;
+ return true;
+ }
+ return false; // no match if we get to here...
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_within_word()
+{
+ if(position == last)
+ return false;
+ // both prev and this character must be m_word_mask:
+ bool prev = traits_inst.isctype(*position, m_word_mask);
+ {
+ bool b;
+ if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
+ return false;
+ else
+ {
+ --position;
+ b = traits_inst.isctype(*position, m_word_mask);
+ ++position;
+ }
+ if(b == prev)
+ {
+ pstate = pstate->next.p;
+ return true;
+ }
+ }
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_word_start()
+{
+ if(position == last)
+ return false; // can't be starting a word if we're already at the end of input
+ if(!traits_inst.isctype(*position, m_word_mask))
+ return false; // next character isn't a word character
+ if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
+ {
+ if(m_match_flags & match_not_bow)
+ return false; // no previous input
+ }
+ else
+ {
+ // otherwise inside buffer:
+ BidiIterator t(position);
+ --t;
+ if(traits_inst.isctype(*t, m_word_mask))
+ return false; // previous character not non-word
+ }
+ // OK we have a match:
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_word_end()
+{
+ if((position == backstop) && ((m_match_flags & match_prev_avail) == 0))
+ return false; // start of buffer can't be end of word
+ BidiIterator t(position);
+ --t;
+ if(traits_inst.isctype(*t, m_word_mask) == false)
+ return false; // previous character wasn't a word character
+
+ if(position == last)
+ {
+ if(m_match_flags & match_not_eow)
+ return false; // end of buffer but not end of word
+ }
+ else
+ {
+ // otherwise inside buffer:
+ if(traits_inst.isctype(*position, m_word_mask))
+ return false; // next character is a word character
+ }
+ pstate = pstate->next.p;
+ return true; // if we fall through to here then we've succeeded
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start()
+{
+ if((position != backstop) || (m_match_flags & match_not_bob))
+ return false;
+ // OK match:
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end()
+{
+ if((position != last) || (m_match_flags & match_not_eob))
+ return false;
+ // OK match:
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_backref()
+{
+ //
+ // Compare with what we previously matched.
+ // Note that this succeeds if the backref did not partisipate
+ // in the match, this is in line with ECMAScript, but not Perl
+ // or PCRE.
+ //
+ int index = static_cast<const re_brace*>(pstate)->index;
+ if(index >= 10000)
+ {
+ named_subexpressions::range_type r = re.get_data().equal_range(index);
+ BOOST_ASSERT(r.first != r.second);
+ do
+ {
+ index = r.first->index;
+ ++r.first;
+ }while((r.first != r.second) && ((*m_presult)[index].matched != true));
+ }
+
+ if((m_match_flags & match_perl) && !(*m_presult)[index].matched)
+ return false;
+
+ BidiIterator i = (*m_presult)[index].first;
+ BidiIterator j = (*m_presult)[index].second;
+ while(i != j)
+ {
+ if((position == last) || (traits_inst.translate(*position, icase) != traits_inst.translate(*i, icase)))
+ return false;
+ ++i;
+ ++position;
+ }
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set()
+{
+ typedef typename traits::char_class_type char_class_type;
+ // let the traits class do the work:
+ if(position == last)
+ return false;
+ BidiIterator t = re_is_set_member(position, last, static_cast<const re_set_long<char_class_type>*>(pstate), re.get_data(), icase);
+ if(t != position)
+ {
+ pstate = pstate->next.p;
+ position = t;
+ return true;
+ }
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_set()
+{
+ if(position == last)
+ return false;
+ if(static_cast<const re_set*>(pstate)->_map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
+ {
+ pstate = pstate->next.p;
+ ++position;
+ return true;
+ }
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_jump()
+{
+ pstate = static_cast<const re_jump*>(pstate)->alt.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_combining()
+{
+ if(position == last)
+ return false;
+ if(is_combining(traits_inst.translate(*position, icase)))
+ return false;
+ ++position;
+ while((position != last) && is_combining(traits_inst.translate(*position, icase)))
+ ++position;
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end()
+{
+ if(m_match_flags & match_not_eob)
+ return false;
+ BidiIterator p(position);
+ while((p != last) && is_separator(traits_inst.translate(*p, icase)))++p;
+ if(p != last)
+ return false;
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue()
+{
+ if(position == search_base)
+ {
+ pstate = pstate->next.p;
+ return true;
+ }
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_backstep()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+ if( ::boost::is_random_access_iterator<BidiIterator>::value)
+ {
+ std::ptrdiff_t maxlen = ::boost::BOOST_REGEX_DETAIL_NS::distance(backstop, position);
+ if(maxlen < static_cast<const re_brace*>(pstate)->index)
+ return false;
+ std::advance(position, -static_cast<const re_brace*>(pstate)->index);
+ }
+ else
+ {
+ int c = static_cast<const re_brace*>(pstate)->index;
+ while(c--)
+ {
+ if(position == backstop)
+ return false;
+ --position;
+ }
+ }
+ pstate = pstate->next.p;
+ return true;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline bool perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref()
+{
+ // return true if marked sub-expression N has been matched:
+ int index = static_cast<const re_brace*>(pstate)->index;
+ bool result = false;
+ if(index == 9999)
+ {
+ // Magic value for a (DEFINE) block:
+ return false;
+ }
+ else if(index > 0)
+ {
+ // Have we matched subexpression "index"?
+ // Check if index is a hash value:
+ if(index >= 10000)
+ {
+ named_subexpressions::range_type r = re.get_data().equal_range(index);
+ while(r.first != r.second)
+ {
+ if((*m_presult)[r.first->index].matched)
+ {
+ result = true;
+ break;
+ }
+ ++r.first;
+ }
+ }
+ else
+ {
+ result = (*m_presult)[index].matched;
+ }
+ pstate = pstate->next.p;
+ }
+ else
+ {
+ // Have we recursed into subexpression "index"?
+ // If index == 0 then check for any recursion at all, otherwise for recursion to -index-1.
+ int idx = -(index+1);
+ if(idx >= 10000)
+ {
+ named_subexpressions::range_type r = re.get_data().equal_range(idx);
+ int stack_index = recursion_stack.empty() ? -1 : recursion_stack.back().idx;
+ while(r.first != r.second)
+ {
+ result |= (stack_index == r.first->index);
+ if(result)break;
+ ++r.first;
+ }
+ }
+ else
+ {
+ result = !recursion_stack.empty() && ((recursion_stack.back().idx == idx) || (index == 0));
+ }
+ pstate = pstate->next.p;
+ }
+ return result;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_fail()
+{
+ // Just force a backtrack:
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_accept()
+{
+ if(!recursion_stack.empty())
+ {
+ return skip_until_paren(recursion_stack.back().idx);
+ }
+ else
+ {
+ return skip_until_paren(INT_MAX);
+ }
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_any()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+ const unsigned char* _map = re.get_map();
+ while(true)
+ {
+ // skip everything we can't match:
+ while((position != last) && !can_start(*position, _map, (unsigned char)mask_any) )
+ ++position;
+ if(position == last)
+ {
+ // run out of characters, try a null match if possible:
+ if(re.can_be_null())
+ return match_prefix();
+ break;
+ }
+ // now try and obtain a match:
+ if(match_prefix())
+ return true;
+ if(position == last)
+ return false;
+ ++position;
+ }
+ return false;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_word()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+ // do search optimised for word starts:
+ const unsigned char* _map = re.get_map();
+ if((m_match_flags & match_prev_avail) || (position != base))
+ --position;
+ else if(match_prefix())
+ return true;
+ do
+ {
+ while((position != last) && traits_inst.isctype(*position, m_word_mask))
+ ++position;
+ while((position != last) && !traits_inst.isctype(*position, m_word_mask))
+ ++position;
+ if(position == last)
+ break;
+
+ if(can_start(*position, _map, (unsigned char)mask_any) )
+ {
+ if(match_prefix())
+ return true;
+ }
+ if(position == last)
+ break;
+ } while(true);
+ return false;
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_line()
+{
+ // do search optimised for line starts:
+ const unsigned char* _map = re.get_map();
+ if(match_prefix())
+ return true;
+ while(position != last)
+ {
+ while((position != last) && !is_separator(*position))
+ ++position;
+ if(position == last)
+ return false;
+ ++position;
+ if(position == last)
+ {
+ if(re.can_be_null() && match_prefix())
+ return true;
+ return false;
+ }
+
+ if( can_start(*position, _map, (unsigned char)mask_any) )
+ {
+ if(match_prefix())
+ return true;
+ }
+ if(position == last)
+ return false;
+ //++position;
+ }
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_buf()
+{
+ if((position == base) && ((m_match_flags & match_not_bob) == 0))
+ return match_prefix();
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::find_restart_lit()
+{
+#if 0
+ if(position == last)
+ return false; // can't possibly match if we're at the end already
+
+ unsigned type = (m_match_flags & match_continuous) ?
+ static_cast<unsigned int>(regbase::restart_continue)
+ : static_cast<unsigned int>(re.get_restart_type());
+
+ const kmp_info<char_type>* info = access::get_kmp(re);
+ int len = info->len;
+ const char_type* x = info->pstr;
+ int j = 0;
+ while (position != last)
+ {
+ while((j > -1) && (x[j] != traits_inst.translate(*position, icase)))
+ j = info->kmp_next[j];
+ ++position;
+ ++j;
+ if(j >= len)
+ {
+ if(type == regbase::restart_fixed_lit)
+ {
+ std::advance(position, -j);
+ restart = position;
+ std::advance(restart, len);
+ m_result.set_first(position);
+ m_result.set_second(restart);
+ position = restart;
+ return true;
+ }
+ else
+ {
+ restart = position;
+ std::advance(position, -j);
+ if(match_prefix())
+ return true;
+ else
+ {
+ for(int k = 0; (restart != position) && (k < j); ++k, --restart)
+ {} // dwa 10/20/2000 - warning suppression for MWCW
+ if(restart != last)
+ ++restart;
+ position = restart;
+ j = 0; //we could do better than this...
+ }
+ }
+ }
+ }
+ if((m_match_flags & match_partial) && (position == last) && j)
+ {
+ // we need to check for a partial match:
+ restart = position;
+ std::advance(position, -j);
+ return match_prefix();
+ }
+#endif
+ return false;
+}
+
+} // namespace BOOST_REGEX_DETAIL_NS
+
+} // namespace boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#ifdef __BORLANDC__
+# pragma option pop
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_non_recursive.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_non_recursive.hpp
new file mode 100644
index 00000000000..db883f1e20a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_non_recursive.hpp
@@ -0,0 +1,1948 @@
+/*
+ *
+ * Copyright (c) 2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE perl_matcher_common.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Definitions of perl_matcher member functions that are
+ * specific to the non-recursive implementation.
+ */
+
+#ifndef BOOST_REGEX_V4_PERL_MATCHER_NON_RECURSIVE_HPP
+#define BOOST_REGEX_V4_PERL_MATCHER_NON_RECURSIVE_HPP
+
+#include <new>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4706)
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
+#endif
+
+namespace boost{
+namespace BOOST_REGEX_DETAIL_NS{
+
+template <class T>
+inline void inplace_destroy(T* p)
+{
+ (void)p; // warning suppression
+ p->~T();
+}
+
+struct saved_state
+{
+ union{
+ unsigned int state_id;
+ // this padding ensures correct alignment on 64-bit platforms:
+ std::size_t padding1;
+ std::ptrdiff_t padding2;
+ void* padding3;
+ };
+ saved_state(unsigned i) : state_id(i) {}
+};
+
+template <class BidiIterator>
+struct saved_matched_paren : public saved_state
+{
+ int index;
+ sub_match<BidiIterator> sub;
+ saved_matched_paren(int i, const sub_match<BidiIterator>& s) : saved_state(1), index(i), sub(s){};
+};
+
+template <class BidiIterator>
+struct saved_position : public saved_state
+{
+ const re_syntax_base* pstate;
+ BidiIterator position;
+ saved_position(const re_syntax_base* ps, BidiIterator pos, int i) : saved_state(i), pstate(ps), position(pos){};
+};
+
+template <class BidiIterator>
+struct saved_assertion : public saved_position<BidiIterator>
+{
+ bool positive;
+ saved_assertion(bool p, const re_syntax_base* ps, BidiIterator pos)
+ : saved_position<BidiIterator>(ps, pos, saved_type_assertion), positive(p){};
+};
+
+template <class BidiIterator>
+struct saved_repeater : public saved_state
+{
+ repeater_count<BidiIterator> count;
+ saved_repeater(int i, repeater_count<BidiIterator>** s, BidiIterator start, int current_recursion_id)
+ : saved_state(saved_state_repeater_count), count(i, s, start, current_recursion_id){}
+};
+
+struct saved_extra_block : public saved_state
+{
+ saved_state *base, *end;
+ saved_extra_block(saved_state* b, saved_state* e)
+ : saved_state(saved_state_extra_block), base(b), end(e) {}
+};
+
+struct save_state_init
+{
+ saved_state** stack;
+ save_state_init(saved_state** base, saved_state** end)
+ : stack(base)
+ {
+ *base = static_cast<saved_state*>(get_mem_block());
+ *end = reinterpret_cast<saved_state*>(reinterpret_cast<char*>(*base)+BOOST_REGEX_BLOCKSIZE);
+ --(*end);
+ (void) new (*end)saved_state(0);
+ BOOST_ASSERT(*end > *base);
+ }
+ ~save_state_init()
+ {
+ put_mem_block(*stack);
+ *stack = 0;
+ }
+};
+
+template <class BidiIterator>
+struct saved_single_repeat : public saved_state
+{
+ std::size_t count;
+ const re_repeat* rep;
+ BidiIterator last_position;
+ saved_single_repeat(std::size_t c, const re_repeat* r, BidiIterator lp, int arg_id)
+ : saved_state(arg_id), count(c), rep(r), last_position(lp){}
+};
+
+template <class Results>
+struct saved_recursion : public saved_state
+{
+ saved_recursion(int idx, const re_syntax_base* p, Results* pr, Results* pr2)
+ : saved_state(14), recursion_id(idx), preturn_address(p), internal_results(*pr), prior_results(*pr2) {}
+ int recursion_id;
+ const re_syntax_base* preturn_address;
+ Results internal_results, prior_results;
+};
+
+struct saved_change_case : public saved_state
+{
+ bool icase;
+ saved_change_case(bool c) : saved_state(18), icase(c) {}
+};
+
+struct incrementer
+{
+ incrementer(unsigned* pu) : m_pu(pu) { ++*m_pu; }
+ ~incrementer() { --*m_pu; }
+ bool operator > (unsigned i) { return *m_pu > i; }
+private:
+ unsigned* m_pu;
+};
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_all_states()
+{
+ static matcher_proc_type const s_match_vtable[34] =
+ {
+ (&perl_matcher<BidiIterator, Allocator, traits>::match_startmark),
+ &perl_matcher<BidiIterator, Allocator, traits>::match_endmark,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_literal,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_start_line,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_end_line,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_wild,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_match,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_word_boundary,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_within_word,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_word_start,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_word_end,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_buffer_start,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_buffer_end,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_backref,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_long_set,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_set,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_jump,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_alt,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_rep,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_combining,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_soft_buffer_end,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_restart_continue,
+ // Although this next line *should* be evaluated at compile time, in practice
+ // some compilers (VC++) emit run-time initialisation which breaks thread
+ // safety, so use a dispatch function instead:
+ //(::boost::is_random_access_iterator<BidiIterator>::value ? &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast : &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow),
+ &perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_dispatch,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_backstep,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_assert_backref,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_recursion,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_fail,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_accept,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_commit,
+ &perl_matcher<BidiIterator, Allocator, traits>::match_then,
+ };
+ incrementer inc(&m_recursions);
+ if(inc > 80)
+ raise_error(traits_inst, regex_constants::error_complexity);
+ push_recursion_stopper();
+ do{
+ while(pstate)
+ {
+ matcher_proc_type proc = s_match_vtable[pstate->type];
+ ++state_count;
+ if(!(this->*proc)())
+ {
+ if(state_count > max_state_count)
+ raise_error(traits_inst, regex_constants::error_complexity);
+ if((m_match_flags & match_partial) && (position == last) && (position != search_base))
+ m_has_partial_match = true;
+ bool successful_unwind = unwind(false);
+ if((m_match_flags & match_partial) && (position == last) && (position != search_base))
+ m_has_partial_match = true;
+ if(false == successful_unwind)
+ return m_recursive_result;
+ }
+ }
+ }while(unwind(true));
+ return m_recursive_result;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+void perl_matcher<BidiIterator, Allocator, traits>::extend_stack()
+{
+ if(used_block_count)
+ {
+ --used_block_count;
+ saved_state* stack_base;
+ saved_state* backup_state;
+ stack_base = static_cast<saved_state*>(get_mem_block());
+ backup_state = reinterpret_cast<saved_state*>(reinterpret_cast<char*>(stack_base)+BOOST_REGEX_BLOCKSIZE);
+ saved_extra_block* block = static_cast<saved_extra_block*>(backup_state);
+ --block;
+ (void) new (block) saved_extra_block(m_stack_base, m_backup_state);
+ m_stack_base = stack_base;
+ m_backup_state = block;
+ }
+ else
+ raise_error(traits_inst, regex_constants::error_stack);
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_matched_paren(int index, const sub_match<BidiIterator>& sub)
+{
+ //BOOST_ASSERT(index);
+ saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_matched_paren<BidiIterator>(index, sub);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_case_change(bool c)
+{
+ //BOOST_ASSERT(index);
+ saved_change_case* pmp = static_cast<saved_change_case*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_change_case*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_change_case(c);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_stopper()
+{
+ saved_state* pmp = m_backup_state;
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = m_backup_state;
+ --pmp;
+ }
+ (void) new (pmp)saved_state(saved_type_recurse);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_assertion(const re_syntax_base* ps, bool positive)
+{
+ saved_assertion<BidiIterator>* pmp = static_cast<saved_assertion<BidiIterator>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_assertion<BidiIterator>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_assertion<BidiIterator>(positive, ps, position);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_alt(const re_syntax_base* ps)
+{
+ saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_position<BidiIterator>(ps, position, saved_state_alt);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_non_greedy_repeat(const re_syntax_base* ps)
+{
+ saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_position<BidiIterator>(ps, position, saved_state_non_greedy_long_repeat);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_repeater_count(int i, repeater_count<BidiIterator>** s)
+{
+ saved_repeater<BidiIterator>* pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_repeater<BidiIterator>(i, s, position, this->recursion_stack.size() ? this->recursion_stack.back().idx : (INT_MIN + 3));
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_single_repeat(std::size_t c, const re_repeat* r, BidiIterator last_position, int state_id)
+{
+ saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_single_repeat<BidiIterator>(c, r, last_position, state_id);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_recursion(int idx, const re_syntax_base* p, results_type* presults, results_type* presults2)
+{
+ saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_recursion<results_type>(idx, p, presults, presults2);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_toggle_case()
+{
+ // change our case sensitivity:
+ push_case_change(this->icase);
+ this->icase = static_cast<const re_case*>(pstate)->icase;
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_startmark()
+{
+ int index = static_cast<const re_brace*>(pstate)->index;
+ icase = static_cast<const re_brace*>(pstate)->icase;
+ switch(index)
+ {
+ case 0:
+ pstate = pstate->next.p;
+ break;
+ case -1:
+ case -2:
+ {
+ // forward lookahead assert:
+ const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
+ pstate = pstate->next.p->next.p;
+ push_assertion(next_pstate, index == -1);
+ break;
+ }
+ case -3:
+ {
+ // independent sub-expression, currently this is always recursive:
+ bool old_independent = m_independent;
+ m_independent = true;
+ const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
+ pstate = pstate->next.p->next.p;
+ bool r = false;
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try{
+#endif
+ r = match_all_states();
+ if(!r && !m_independent)
+ {
+ // Must be unwinding from a COMMIT/SKIP/PRUNE and the independent
+ // sub failed, need to unwind everything else:
+ while(unwind(false));
+ return false;
+ }
+#if !defined(BOOST_NO_EXCEPTIONS)
+ }
+ catch(...)
+ {
+ pstate = next_pstate;
+ // unwind all pushed states, apart from anything else this
+ // ensures that all the states are correctly destructed
+ // not just the memory freed.
+ while(unwind(true)) {}
+ throw;
+ }
+#endif
+ pstate = next_pstate;
+ m_independent = old_independent;
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ if(r && (m_match_flags & match_extra))
+ {
+ //
+ // our captures have been stored in *m_presult
+ // we need to unpack them, and insert them
+ // back in the right order when we unwind the stack:
+ //
+ match_results<BidiIterator, Allocator> temp_match(*m_presult);
+ unsigned i;
+ for(i = 0; i < temp_match.size(); ++i)
+ (*m_presult)[i].get_captures().clear();
+ // match everything else:
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try{
+#endif
+ r = match_all_states();
+#if !defined(BOOST_NO_EXCEPTIONS)
+ }
+ catch(...)
+ {
+ pstate = next_pstate;
+ // unwind all pushed states, apart from anything else this
+ // ensures that all the states are correctly destructed
+ // not just the memory freed.
+ while(unwind(true)) {}
+ throw;
+ }
+#endif
+ // now place the stored captures back:
+ for(i = 0; i < temp_match.size(); ++i)
+ {
+ typedef typename sub_match<BidiIterator>::capture_sequence_type seq;
+ seq& s1 = (*m_presult)[i].get_captures();
+ const seq& s2 = temp_match[i].captures();
+ s1.insert(
+ s1.end(),
+ s2.begin(),
+ s2.end());
+ }
+ }
+#endif
+ return r;
+ }
+ case -4:
+ {
+ // conditional expression:
+ const re_alt* alt = static_cast<const re_alt*>(pstate->next.p);
+ BOOST_ASSERT(alt->type == syntax_element_alt);
+ pstate = alt->next.p;
+ if(pstate->type == syntax_element_assert_backref)
+ {
+ if(!match_assert_backref())
+ pstate = alt->alt.p;
+ break;
+ }
+ else
+ {
+ // zero width assertion, have to match this recursively:
+ BOOST_ASSERT(pstate->type == syntax_element_startmark);
+ bool negated = static_cast<const re_brace*>(pstate)->index == -2;
+ BidiIterator saved_position = position;
+ const re_syntax_base* next_pstate = static_cast<const re_jump*>(pstate->next.p)->alt.p->next.p;
+ pstate = pstate->next.p->next.p;
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try{
+#endif
+ bool r = match_all_states();
+ position = saved_position;
+ if(negated)
+ r = !r;
+ if(r)
+ pstate = next_pstate;
+ else
+ pstate = alt->alt.p;
+#if !defined(BOOST_NO_EXCEPTIONS)
+ }
+ catch(...)
+ {
+ pstate = next_pstate;
+ // unwind all pushed states, apart from anything else this
+ // ensures that all the states are correctly destructed
+ // not just the memory freed.
+ while(unwind(true)){}
+ throw;
+ }
+#endif
+ break;
+ }
+ }
+ case -5:
+ {
+ push_matched_paren(0, (*m_presult)[0]);
+ m_presult->set_first(position, 0, true);
+ pstate = pstate->next.p;
+ break;
+ }
+ default:
+ {
+ BOOST_ASSERT(index > 0);
+ if((m_match_flags & match_nosubs) == 0)
+ {
+ push_matched_paren(index, (*m_presult)[index]);
+ m_presult->set_first(position, index);
+ }
+ pstate = pstate->next.p;
+ break;
+ }
+ }
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_alt()
+{
+ bool take_first, take_second;
+ const re_alt* jmp = static_cast<const re_alt*>(pstate);
+
+ // find out which of these two alternatives we need to take:
+ if(position == last)
+ {
+ take_first = jmp->can_be_null & mask_take;
+ take_second = jmp->can_be_null & mask_skip;
+ }
+ else
+ {
+ take_first = can_start(*position, jmp->_map, (unsigned char)mask_take);
+ take_second = can_start(*position, jmp->_map, (unsigned char)mask_skip);
+ }
+
+ if(take_first)
+ {
+ // we can take the first alternative,
+ // see if we need to push next alternative:
+ if(take_second)
+ {
+ push_alt(jmp->alt.p);
+ }
+ pstate = pstate->next.p;
+ return true;
+ }
+ if(take_second)
+ {
+ pstate = jmp->alt.p;
+ return true;
+ }
+ return false; // neither option is possible
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_rep()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127 4244)
+#endif
+#ifdef __BORLANDC__
+#pragma option push -w-8008 -w-8066 -w-8004
+#endif
+ const re_repeat* rep = static_cast<const re_repeat*>(pstate);
+
+ // find out which of these two alternatives we need to take:
+ bool take_first, take_second;
+ if(position == last)
+ {
+ take_first = rep->can_be_null & mask_take;
+ take_second = rep->can_be_null & mask_skip;
+ }
+ else
+ {
+ take_first = can_start(*position, rep->_map, (unsigned char)mask_take);
+ take_second = can_start(*position, rep->_map, (unsigned char)mask_skip);
+ }
+
+ if((m_backup_state->state_id != saved_state_repeater_count)
+ || (static_cast<saved_repeater<BidiIterator>*>(m_backup_state)->count.get_id() != rep->state_id)
+ || (next_count->get_id() != rep->state_id))
+ {
+ // we're moving to a different repeat from the last
+ // one, so set up a counter object:
+ push_repeater_count(rep->state_id, &next_count);
+ }
+ //
+ // If we've had at least one repeat already, and the last one
+ // matched the NULL string then set the repeat count to
+ // maximum:
+ //
+ next_count->check_null_repeat(position, rep->max);
+
+ if(next_count->get_count() < rep->min)
+ {
+ // we must take the repeat:
+ if(take_first)
+ {
+ // increase the counter:
+ ++(*next_count);
+ pstate = rep->next.p;
+ return true;
+ }
+ return false;
+ }
+
+ bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
+ if(greedy)
+ {
+ // try and take the repeat if we can:
+ if((next_count->get_count() < rep->max) && take_first)
+ {
+ if(take_second)
+ {
+ // store position in case we fail:
+ push_alt(rep->alt.p);
+ }
+ // increase the counter:
+ ++(*next_count);
+ pstate = rep->next.p;
+ return true;
+ }
+ else if(take_second)
+ {
+ pstate = rep->alt.p;
+ return true;
+ }
+ return false; // can't take anything, fail...
+ }
+ else // non-greedy
+ {
+ // try and skip the repeat if we can:
+ if(take_second)
+ {
+ if((next_count->get_count() < rep->max) && take_first)
+ {
+ // store position in case we fail:
+ push_non_greedy_repeat(rep->next.p);
+ }
+ pstate = rep->alt.p;
+ return true;
+ }
+ if((next_count->get_count() < rep->max) && take_first)
+ {
+ // increase the counter:
+ ++(*next_count);
+ pstate = rep->next.p;
+ return true;
+ }
+ }
+ return false;
+#ifdef __BORLANDC__
+#pragma option pop
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow()
+{
+ std::size_t count = 0;
+ const re_repeat* rep = static_cast<const re_repeat*>(pstate);
+ re_syntax_base* psingle = rep->next.p;
+ // match compulsary repeats first:
+ while(count < rep->min)
+ {
+ pstate = psingle;
+ if(!match_wild())
+ return false;
+ ++count;
+ }
+ bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
+ if(greedy)
+ {
+ // repeat for as long as we can:
+ while(count < rep->max)
+ {
+ pstate = psingle;
+ if(!match_wild())
+ break;
+ ++count;
+ }
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ // push backtrack info if available:
+ if(count - rep->min)
+ push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
+ // jump to next state:
+ pstate = rep->alt.p;
+ return true;
+ }
+ else
+ {
+ // non-greedy, push state and return true if we can skip:
+ if(count < rep->max)
+ push_single_repeat(count, rep, position, saved_state_rep_slow_dot);
+ pstate = rep->alt.p;
+ return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
+ }
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast()
+{
+ if(m_match_flags & match_not_dot_null)
+ return match_dot_repeat_slow();
+ if((static_cast<const re_dot*>(pstate->next.p)->mask & match_any_mask) == 0)
+ return match_dot_repeat_slow();
+
+ const re_repeat* rep = static_cast<const re_repeat*>(pstate);
+ bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
+ std::size_t count = static_cast<std::size_t>((std::min)(static_cast<std::size_t>(::boost::BOOST_REGEX_DETAIL_NS::distance(position, last)), greedy ? rep->max : rep->min));
+ if(rep->min > count)
+ {
+ position = last;
+ return false; // not enough text left to match
+ }
+ std::advance(position, count);
+
+ if(greedy)
+ {
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ // push backtrack info if available:
+ if(count - rep->min)
+ push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
+ // jump to next state:
+ pstate = rep->alt.p;
+ return true;
+ }
+ else
+ {
+ // non-greedy, push state and return true if we can skip:
+ if(count < rep->max)
+ push_single_repeat(count, rep, position, saved_state_rep_fast_dot);
+ pstate = rep->alt.p;
+ return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
+ }
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+#ifdef __BORLANDC__
+#pragma option push -w-8008 -w-8066 -w-8004
+#endif
+ const re_repeat* rep = static_cast<const re_repeat*>(pstate);
+ BOOST_ASSERT(1 == static_cast<const re_literal*>(rep->next.p)->length);
+ const char_type what = *reinterpret_cast<const char_type*>(static_cast<const re_literal*>(rep->next.p) + 1);
+ std::size_t count = 0;
+ //
+ // start by working out how much we can skip:
+ //
+ bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
+ std::size_t desired = greedy ? rep->max : rep->min;
+ if(::boost::is_random_access_iterator<BidiIterator>::value)
+ {
+ BidiIterator end = position;
+ // Move end forward by "desired", preferably without using distance or advance if we can
+ // as these can be slow for some iterator types.
+ std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::BOOST_REGEX_DETAIL_NS::distance(position, last);
+ if(desired >= len)
+ end = last;
+ else
+ std::advance(end, desired);
+ BidiIterator origin(position);
+ while((position != end) && (traits_inst.translate(*position, icase) == what))
+ {
+ ++position;
+ }
+ count = (unsigned)::boost::BOOST_REGEX_DETAIL_NS::distance(origin, position);
+ }
+ else
+ {
+ while((count < desired) && (position != last) && (traits_inst.translate(*position, icase) == what))
+ {
+ ++position;
+ ++count;
+ }
+ }
+
+ if(count < rep->min)
+ return false;
+
+ if(greedy)
+ {
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ // push backtrack info if available:
+ if(count - rep->min)
+ push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
+ // jump to next state:
+ pstate = rep->alt.p;
+ return true;
+ }
+ else
+ {
+ // non-greedy, push state and return true if we can skip:
+ if(count < rep->max)
+ push_single_repeat(count, rep, position, saved_state_rep_char);
+ pstate = rep->alt.p;
+ return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
+ }
+#ifdef __BORLANDC__
+#pragma option pop
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+#ifdef __BORLANDC__
+#pragma option push -w-8008 -w-8066 -w-8004
+#endif
+ const re_repeat* rep = static_cast<const re_repeat*>(pstate);
+ const unsigned char* map = static_cast<const re_set*>(rep->next.p)->_map;
+ std::size_t count = 0;
+ //
+ // start by working out how much we can skip:
+ //
+ bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
+ std::size_t desired = greedy ? rep->max : rep->min;
+ if(::boost::is_random_access_iterator<BidiIterator>::value)
+ {
+ BidiIterator end = position;
+ // Move end forward by "desired", preferably without using distance or advance if we can
+ // as these can be slow for some iterator types.
+ std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::BOOST_REGEX_DETAIL_NS::distance(position, last);
+ if(desired >= len)
+ end = last;
+ else
+ std::advance(end, desired);
+ BidiIterator origin(position);
+ while((position != end) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
+ {
+ ++position;
+ }
+ count = (unsigned)::boost::BOOST_REGEX_DETAIL_NS::distance(origin, position);
+ }
+ else
+ {
+ while((count < desired) && (position != last) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
+ {
+ ++position;
+ ++count;
+ }
+ }
+
+ if(count < rep->min)
+ return false;
+
+ if(greedy)
+ {
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ // push backtrack info if available:
+ if(count - rep->min)
+ push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
+ // jump to next state:
+ pstate = rep->alt.p;
+ return true;
+ }
+ else
+ {
+ // non-greedy, push state and return true if we can skip:
+ if(count < rep->max)
+ push_single_repeat(count, rep, position, saved_state_rep_short_set);
+ pstate = rep->alt.p;
+ return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
+ }
+#ifdef __BORLANDC__
+#pragma option pop
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
+{
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4127)
+#endif
+#ifdef __BORLANDC__
+#pragma option push -w-8008 -w-8066 -w-8004
+#endif
+ typedef typename traits::char_class_type m_type;
+ const re_repeat* rep = static_cast<const re_repeat*>(pstate);
+ const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate->next.p);
+ std::size_t count = 0;
+ //
+ // start by working out how much we can skip:
+ //
+ bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
+ std::size_t desired = greedy ? rep->max : rep->min;
+ if(::boost::is_random_access_iterator<BidiIterator>::value)
+ {
+ BidiIterator end = position;
+ // Move end forward by "desired", preferably without using distance or advance if we can
+ // as these can be slow for some iterator types.
+ std::size_t len = (desired == (std::numeric_limits<std::size_t>::max)()) ? 0u : ::boost::BOOST_REGEX_DETAIL_NS::distance(position, last);
+ if(desired >= len)
+ end = last;
+ else
+ std::advance(end, desired);
+ BidiIterator origin(position);
+ while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
+ {
+ ++position;
+ }
+ count = (unsigned)::boost::BOOST_REGEX_DETAIL_NS::distance(origin, position);
+ }
+ else
+ {
+ while((count < desired) && (position != last) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
+ {
+ ++position;
+ ++count;
+ }
+ }
+
+ if(count < rep->min)
+ return false;
+
+ if(greedy)
+ {
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ // push backtrack info if available:
+ if(count - rep->min)
+ push_single_repeat(count, rep, position, saved_state_greedy_single_repeat);
+ // jump to next state:
+ pstate = rep->alt.p;
+ return true;
+ }
+ else
+ {
+ // non-greedy, push state and return true if we can skip:
+ if(count < rep->max)
+ push_single_repeat(count, rep, position, saved_state_rep_long_set);
+ pstate = rep->alt.p;
+ return (position == last) ? (rep->can_be_null & mask_skip) : can_start(*position, rep->_map, mask_skip);
+ }
+#ifdef __BORLANDC__
+#pragma option pop
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_recursion()
+{
+ BOOST_ASSERT(pstate->type == syntax_element_recurse);
+ //
+ // See if we've seen this recursion before at this location, if we have then
+ // we need to prevent infinite recursion:
+ //
+ for(typename std::vector<recursion_info<results_type> >::reverse_iterator i = recursion_stack.rbegin(); i != recursion_stack.rend(); ++i)
+ {
+ if(i->idx == static_cast<const re_brace*>(static_cast<const re_jump*>(pstate)->alt.p)->index)
+ {
+ if(i->location_of_start == position)
+ return false;
+ break;
+ }
+ }
+ //
+ // Backup call stack:
+ //
+ push_recursion_pop();
+ //
+ // Set new call stack:
+ //
+ if(recursion_stack.capacity() == 0)
+ {
+ recursion_stack.reserve(50);
+ }
+ recursion_stack.push_back(recursion_info<results_type>());
+ recursion_stack.back().preturn_address = pstate->next.p;
+ recursion_stack.back().results = *m_presult;
+ pstate = static_cast<const re_jump*>(pstate)->alt.p;
+ recursion_stack.back().idx = static_cast<const re_brace*>(pstate)->index;
+ recursion_stack.back().location_of_start = position;
+ //if(static_cast<const re_recurse*>(pstate)->state_id > 0)
+ {
+ push_repeater_count(-(2 + static_cast<const re_brace*>(pstate)->index), &next_count);
+ }
+
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_endmark()
+{
+ int index = static_cast<const re_brace*>(pstate)->index;
+ icase = static_cast<const re_brace*>(pstate)->icase;
+ if(index > 0)
+ {
+ if((m_match_flags & match_nosubs) == 0)
+ {
+ m_presult->set_second(position, index);
+ }
+ if(!recursion_stack.empty())
+ {
+ if(index == recursion_stack.back().idx)
+ {
+ pstate = recursion_stack.back().preturn_address;
+ *m_presult = recursion_stack.back().results;
+ push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, m_presult, &recursion_stack.back().results);
+ recursion_stack.pop_back();
+ push_repeater_count(-(2 + index), &next_count);
+ }
+ }
+ }
+ else if((index < 0) && (index != -4))
+ {
+ // matched forward lookahead:
+ pstate = 0;
+ return true;
+ }
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_match()
+{
+ if(!recursion_stack.empty())
+ {
+ BOOST_ASSERT(0 == recursion_stack.back().idx);
+ pstate = recursion_stack.back().preturn_address;
+ push_recursion(recursion_stack.back().idx, recursion_stack.back().preturn_address, m_presult, &recursion_stack.back().results);
+ *m_presult = recursion_stack.back().results;
+ recursion_stack.pop_back();
+ return true;
+ }
+ if((m_match_flags & match_not_null) && (position == (*m_presult)[0].first))
+ return false;
+ if((m_match_flags & match_all) && (position != last))
+ return false;
+ if((m_match_flags & regex_constants::match_not_initial_null) && (position == search_base))
+ return false;
+ m_presult->set_second(position);
+ pstate = 0;
+ m_has_found_match = true;
+ if((m_match_flags & match_posix) == match_posix)
+ {
+ m_result.maybe_assign(*m_presult);
+ if((m_match_flags & match_any) == 0)
+ return false;
+ }
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ if(match_extra & m_match_flags)
+ {
+ for(unsigned i = 0; i < m_presult->size(); ++i)
+ if((*m_presult)[i].matched)
+ ((*m_presult)[i]).get_captures().push_back((*m_presult)[i]);
+ }
+#endif
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_commit()
+{
+ // Ideally we would just junk all the states that are on the stack,
+ // however we might not unwind correctly in that case, so for now,
+ // just mark that we don't backtrack into whatever is left (or rather
+ // we'll unwind it unconditionally without pausing to try other matches).
+
+ switch(static_cast<const re_commit*>(pstate)->action)
+ {
+ case commit_commit:
+ restart = last;
+ break;
+ case commit_skip:
+ if(base != position)
+ {
+ restart = position;
+ // Have to decrement restart since it will get incremented again later:
+ --restart;
+ }
+ break;
+ case commit_prune:
+ break;
+ }
+
+ saved_state* pmp = m_backup_state;
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = m_backup_state;
+ --pmp;
+ }
+ (void) new (pmp)saved_state(16);
+ m_backup_state = pmp;
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::match_then()
+{
+ // Just leave a mark that we need to skip to next alternative:
+ saved_state* pmp = m_backup_state;
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = m_backup_state;
+ --pmp;
+ }
+ (void) new (pmp)saved_state(17);
+ m_backup_state = pmp;
+ pstate = pstate->next.p;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::skip_until_paren(int index, bool have_match)
+{
+ while(pstate)
+ {
+ if(pstate->type == syntax_element_endmark)
+ {
+ if(static_cast<const re_brace*>(pstate)->index == index)
+ {
+ if(have_match)
+ return this->match_endmark();
+ pstate = pstate->next.p;
+ return true;
+ }
+ else
+ {
+ // Unenclosed closing ), occurs when (*ACCEPT) is inside some other
+ // parenthesis which may or may not have other side effects associated with it.
+ const re_syntax_base* sp = pstate;
+ match_endmark();
+ if(!pstate)
+ {
+ unwind(true);
+ // unwind may leave pstate NULL if we've unwound a forward lookahead, in which
+ // case just move to the next state and keep looking...
+ if (!pstate)
+ pstate = sp->next.p;
+ }
+ }
+ continue;
+ }
+ else if(pstate->type == syntax_element_match)
+ return true;
+ else if(pstate->type == syntax_element_startmark)
+ {
+ int idx = static_cast<const re_brace*>(pstate)->index;
+ pstate = pstate->next.p;
+ skip_until_paren(idx, false);
+ continue;
+ }
+ pstate = pstate->next.p;
+ }
+ return true;
+}
+
+/****************************************************************************
+
+Unwind and associated proceedures follow, these perform what normal stack
+unwinding does in the recursive implementation.
+
+****************************************************************************/
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind(bool have_match)
+{
+ static unwind_proc_type const s_unwind_table[19] =
+ {
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_end,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_paren,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_stopper,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_assertion,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_alt,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_repeater_counter,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_extra_block,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_greedy_single_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_slow_dot_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_char_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_commit,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_then,
+ &perl_matcher<BidiIterator, Allocator, traits>::unwind_case,
+ };
+
+ m_recursive_result = have_match;
+ m_unwound_lookahead = false;
+ m_unwound_alt = false;
+ unwind_proc_type unwinder;
+ bool cont;
+ //
+ // keep unwinding our stack until we have something to do:
+ //
+ do
+ {
+ unwinder = s_unwind_table[m_backup_state->state_id];
+ cont = (this->*unwinder)(m_recursive_result);
+ }while(cont);
+ //
+ // return true if we have more states to try:
+ //
+ return pstate ? true : false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_end(bool)
+{
+ pstate = 0; // nothing left to search
+ return false; // end of stack nothing more to search
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_case(bool)
+{
+ saved_change_case* pmp = static_cast<saved_change_case*>(m_backup_state);
+ icase = pmp->icase;
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_paren(bool have_match)
+{
+ saved_matched_paren<BidiIterator>* pmp = static_cast<saved_matched_paren<BidiIterator>*>(m_backup_state);
+ // restore previous values if no match was found:
+ if(have_match == false)
+ {
+ m_presult->set_first(pmp->sub.first, pmp->index, pmp->index == 0);
+ m_presult->set_second(pmp->sub.second, pmp->index, pmp->sub.matched, pmp->index == 0);
+ }
+#ifdef BOOST_REGEX_MATCH_EXTRA
+ //
+ // we have a match, push the capture information onto the stack:
+ //
+ else if(pmp->sub.matched && (match_extra & m_match_flags))
+ ((*m_presult)[pmp->index]).get_captures().push_back(pmp->sub);
+#endif
+ // unwind stack:
+ m_backup_state = pmp+1;
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp);
+ return true; // keep looking
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_stopper(bool)
+{
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(m_backup_state++);
+ pstate = 0; // nothing left to search
+ return false; // end of stack nothing more to search
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_assertion(bool r)
+{
+ saved_assertion<BidiIterator>* pmp = static_cast<saved_assertion<BidiIterator>*>(m_backup_state);
+ pstate = pmp->pstate;
+ position = pmp->position;
+ bool result = (r == pmp->positive);
+ m_recursive_result = pmp->positive ? r : !r;
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ m_unwound_lookahead = true;
+ return !result; // return false if the assertion was matched to stop search.
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_alt(bool r)
+{
+ saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ if(!r)
+ {
+ pstate = pmp->pstate;
+ position = pmp->position;
+ }
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ m_unwound_alt = !r;
+ return r;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_repeater_counter(bool)
+{
+ saved_repeater<BidiIterator>* pmp = static_cast<saved_repeater<BidiIterator>*>(m_backup_state);
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true; // keep looking
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_extra_block(bool)
+{
+ saved_extra_block* pmp = static_cast<saved_extra_block*>(m_backup_state);
+ void* condemmed = m_stack_base;
+ m_stack_base = pmp->base;
+ m_backup_state = pmp->end;
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp);
+ put_mem_block(condemmed);
+ return true; // keep looking
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::destroy_single_repeat()
+{
+ saved_single_repeat<BidiIterator>* p = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(p++);
+ m_backup_state = p;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_greedy_single_repeat(bool r)
+{
+ saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+
+ // if we have a match, just discard this state:
+ if(r)
+ {
+ destroy_single_repeat();
+ return true;
+ }
+
+ const re_repeat* rep = pmp->rep;
+ std::size_t count = pmp->count;
+ BOOST_ASSERT(rep->next.p != 0);
+ BOOST_ASSERT(rep->alt.p != 0);
+
+ count -= rep->min;
+
+ if((m_match_flags & match_partial) && (position == last))
+ m_has_partial_match = true;
+
+ BOOST_ASSERT(count);
+ position = pmp->last_position;
+
+ // backtrack till we can skip out:
+ do
+ {
+ --position;
+ --count;
+ ++state_count;
+ }while(count && !can_start(*position, rep->_map, mask_skip));
+
+ // if we've hit base, destroy this state:
+ if(count == 0)
+ {
+ destroy_single_repeat();
+ if(!can_start(*position, rep->_map, mask_skip))
+ return true;
+ }
+ else
+ {
+ pmp->count = count + rep->min;
+ pmp->last_position = position;
+ }
+ pstate = rep->alt.p;
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_slow_dot_repeat(bool r)
+{
+ saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+
+ // if we have a match, just discard this state:
+ if(r)
+ {
+ destroy_single_repeat();
+ return true;
+ }
+
+ const re_repeat* rep = pmp->rep;
+ std::size_t count = pmp->count;
+ BOOST_ASSERT(rep->type == syntax_element_dot_rep);
+ BOOST_ASSERT(rep->next.p != 0);
+ BOOST_ASSERT(rep->alt.p != 0);
+ BOOST_ASSERT(rep->next.p->type == syntax_element_wild);
+
+ BOOST_ASSERT(count < rep->max);
+ pstate = rep->next.p;
+ position = pmp->last_position;
+
+ if(position != last)
+ {
+ // wind forward until we can skip out of the repeat:
+ do
+ {
+ if(!match_wild())
+ {
+ // failed repeat match, discard this state and look for another:
+ destroy_single_repeat();
+ return true;
+ }
+ ++count;
+ ++state_count;
+ pstate = rep->next.p;
+ }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
+ }
+ if(position == last)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if((m_match_flags & match_partial) && (position == last) && (position != search_base))
+ m_has_partial_match = true;
+ if(0 == (rep->can_be_null & mask_skip))
+ return true;
+ }
+ else if(count == rep->max)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if(!can_start(*position, rep->_map, mask_skip))
+ return true;
+ }
+ else
+ {
+ pmp->count = count;
+ pmp->last_position = position;
+ }
+ pstate = rep->alt.p;
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_fast_dot_repeat(bool r)
+{
+ saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+
+ // if we have a match, just discard this state:
+ if(r)
+ {
+ destroy_single_repeat();
+ return true;
+ }
+
+ const re_repeat* rep = pmp->rep;
+ std::size_t count = pmp->count;
+
+ BOOST_ASSERT(count < rep->max);
+ position = pmp->last_position;
+ if(position != last)
+ {
+
+ // wind forward until we can skip out of the repeat:
+ do
+ {
+ ++position;
+ ++count;
+ ++state_count;
+ }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
+ }
+
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ if(position == last)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if((m_match_flags & match_partial) && (position == last) && (position != search_base))
+ m_has_partial_match = true;
+ if(0 == (rep->can_be_null & mask_skip))
+ return true;
+ }
+ else if(count == rep->max)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if(!can_start(*position, rep->_map, mask_skip))
+ return true;
+ }
+ else
+ {
+ pmp->count = count;
+ pmp->last_position = position;
+ }
+ pstate = rep->alt.p;
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_char_repeat(bool r)
+{
+ saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+
+ // if we have a match, just discard this state:
+ if(r)
+ {
+ destroy_single_repeat();
+ return true;
+ }
+
+ const re_repeat* rep = pmp->rep;
+ std::size_t count = pmp->count;
+ pstate = rep->next.p;
+ const char_type what = *reinterpret_cast<const char_type*>(static_cast<const re_literal*>(pstate) + 1);
+ position = pmp->last_position;
+
+ BOOST_ASSERT(rep->type == syntax_element_char_rep);
+ BOOST_ASSERT(rep->next.p != 0);
+ BOOST_ASSERT(rep->alt.p != 0);
+ BOOST_ASSERT(rep->next.p->type == syntax_element_literal);
+ BOOST_ASSERT(count < rep->max);
+
+ if(position != last)
+ {
+ // wind forward until we can skip out of the repeat:
+ do
+ {
+ if(traits_inst.translate(*position, icase) != what)
+ {
+ // failed repeat match, discard this state and look for another:
+ destroy_single_repeat();
+ return true;
+ }
+ ++count;
+ ++ position;
+ ++state_count;
+ pstate = rep->next.p;
+ }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
+ }
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ if(position == last)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if((m_match_flags & match_partial) && (position == last) && (position != search_base))
+ m_has_partial_match = true;
+ if(0 == (rep->can_be_null & mask_skip))
+ return true;
+ }
+ else if(count == rep->max)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if(!can_start(*position, rep->_map, mask_skip))
+ return true;
+ }
+ else
+ {
+ pmp->count = count;
+ pmp->last_position = position;
+ }
+ pstate = rep->alt.p;
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_short_set_repeat(bool r)
+{
+ saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+
+ // if we have a match, just discard this state:
+ if(r)
+ {
+ destroy_single_repeat();
+ return true;
+ }
+
+ const re_repeat* rep = pmp->rep;
+ std::size_t count = pmp->count;
+ pstate = rep->next.p;
+ const unsigned char* map = static_cast<const re_set*>(rep->next.p)->_map;
+ position = pmp->last_position;
+
+ BOOST_ASSERT(rep->type == syntax_element_short_set_rep);
+ BOOST_ASSERT(rep->next.p != 0);
+ BOOST_ASSERT(rep->alt.p != 0);
+ BOOST_ASSERT(rep->next.p->type == syntax_element_set);
+ BOOST_ASSERT(count < rep->max);
+
+ if(position != last)
+ {
+ // wind forward until we can skip out of the repeat:
+ do
+ {
+ if(!map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
+ {
+ // failed repeat match, discard this state and look for another:
+ destroy_single_repeat();
+ return true;
+ }
+ ++count;
+ ++ position;
+ ++state_count;
+ pstate = rep->next.p;
+ }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
+ }
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ if(position == last)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if((m_match_flags & match_partial) && (position == last) && (position != search_base))
+ m_has_partial_match = true;
+ if(0 == (rep->can_be_null & mask_skip))
+ return true;
+ }
+ else if(count == rep->max)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if(!can_start(*position, rep->_map, mask_skip))
+ return true;
+ }
+ else
+ {
+ pmp->count = count;
+ pmp->last_position = position;
+ }
+ pstate = rep->alt.p;
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_long_set_repeat(bool r)
+{
+ typedef typename traits::char_class_type m_type;
+ saved_single_repeat<BidiIterator>* pmp = static_cast<saved_single_repeat<BidiIterator>*>(m_backup_state);
+
+ // if we have a match, just discard this state:
+ if(r)
+ {
+ destroy_single_repeat();
+ return true;
+ }
+
+ const re_repeat* rep = pmp->rep;
+ std::size_t count = pmp->count;
+ pstate = rep->next.p;
+ const re_set_long<m_type>* set = static_cast<const re_set_long<m_type>*>(pstate);
+ position = pmp->last_position;
+
+ BOOST_ASSERT(rep->type == syntax_element_long_set_rep);
+ BOOST_ASSERT(rep->next.p != 0);
+ BOOST_ASSERT(rep->alt.p != 0);
+ BOOST_ASSERT(rep->next.p->type == syntax_element_long_set);
+ BOOST_ASSERT(count < rep->max);
+
+ if(position != last)
+ {
+ // wind forward until we can skip out of the repeat:
+ do
+ {
+ if(position == re_is_set_member(position, last, set, re.get_data(), icase))
+ {
+ // failed repeat match, discard this state and look for another:
+ destroy_single_repeat();
+ return true;
+ }
+ ++position;
+ ++count;
+ ++state_count;
+ pstate = rep->next.p;
+ }while((count < rep->max) && (position != last) && !can_start(*position, rep->_map, mask_skip));
+ }
+ // remember where we got to if this is a leading repeat:
+ if((rep->leading) && (count < rep->max))
+ restart = position;
+ if(position == last)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if((m_match_flags & match_partial) && (position == last) && (position != search_base))
+ m_has_partial_match = true;
+ if(0 == (rep->can_be_null & mask_skip))
+ return true;
+ }
+ else if(count == rep->max)
+ {
+ // can't repeat any more, remove the pushed state:
+ destroy_single_repeat();
+ if(!can_start(*position, rep->_map, mask_skip))
+ return true;
+ }
+ else
+ {
+ pmp->count = count;
+ pmp->last_position = position;
+ }
+ pstate = rep->alt.p;
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_non_greedy_repeat(bool r)
+{
+ saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ if(!r)
+ {
+ position = pmp->position;
+ pstate = pmp->pstate;
+ ++(*next_count);
+ }
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return r;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion(bool r)
+{
+ // We are backtracking back inside a recursion, need to push the info
+ // back onto the recursion stack, and do so unconditionally, otherwise
+ // we can get mismatched pushes and pops...
+ saved_recursion<results_type>* pmp = static_cast<saved_recursion<results_type>*>(m_backup_state);
+ if (!r)
+ {
+ recursion_stack.push_back(recursion_info<results_type>());
+ recursion_stack.back().idx = pmp->recursion_id;
+ recursion_stack.back().preturn_address = pmp->preturn_address;
+ recursion_stack.back().results = pmp->prior_results;
+ recursion_stack.back().location_of_start = position;
+ *m_presult = pmp->internal_results;
+ }
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_recursion_pop(bool r)
+{
+ // Backtracking out of a recursion, we must pop state off the recursion
+ // stack unconditionally to ensure matched pushes and pops:
+ saved_state* pmp = static_cast<saved_state*>(m_backup_state);
+ if (!r && !recursion_stack.empty())
+ {
+ *m_presult = recursion_stack.back().results;
+ position = recursion_stack.back().location_of_start;
+ recursion_stack.pop_back();
+ }
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+void perl_matcher<BidiIterator, Allocator, traits>::push_recursion_pop()
+{
+ saved_state* pmp = static_cast<saved_state*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_state*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_state(15);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_commit(bool b)
+{
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(m_backup_state++);
+ while(unwind(b) && !m_unwound_lookahead){}
+ if(m_unwound_lookahead && pstate)
+ {
+ //
+ // If we stop because we just unwound an assertion, put the
+ // commit state back on the stack again:
+ //
+ m_unwound_lookahead = false;
+ saved_state* pmp = m_backup_state;
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = m_backup_state;
+ --pmp;
+ }
+ (void) new (pmp)saved_state(16);
+ m_backup_state = pmp;
+ }
+ // This prevents us from stopping when we exit from an independent sub-expression:
+ m_independent = false;
+ return false;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_then(bool b)
+{
+ // Unwind everything till we hit an alternative:
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(m_backup_state++);
+ bool result = false;
+ while((result = unwind(b)) && !m_unwound_alt){}
+ // We're now pointing at the next alternative, need one more backtrack
+ // since *all* the other alternatives must fail once we've reached a THEN clause:
+ if(result && m_unwound_alt)
+ unwind(b);
+ return false;
+}
+
+/*
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_pop(bool r)
+{
+ saved_state* pmp = static_cast<saved_state*>(m_backup_state);
+ if(!r)
+ {
+ --parenthesis_stack_position;
+ }
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_pop()
+{
+ saved_state* pmp = static_cast<saved_state*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_state*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_state(16);
+ m_backup_state = pmp;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+bool perl_matcher<BidiIterator, Allocator, traits>::unwind_parenthesis_push(bool r)
+{
+ saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ if(!r)
+ {
+ parenthesis_stack[parenthesis_stack_position++] = pmp->position;
+ }
+ boost::BOOST_REGEX_DETAIL_NS::inplace_destroy(pmp++);
+ m_backup_state = pmp;
+ return true;
+}
+
+template <class BidiIterator, class Allocator, class traits>
+inline void perl_matcher<BidiIterator, Allocator, traits>::push_parenthesis_push(BidiIterator p)
+{
+ saved_position<BidiIterator>* pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ --pmp;
+ if(pmp < m_stack_base)
+ {
+ extend_stack();
+ pmp = static_cast<saved_position<BidiIterator>*>(m_backup_state);
+ --pmp;
+ }
+ (void) new (pmp)saved_position<BidiIterator>(0, p, 17);
+ m_backup_state = pmp;
+}
+*/
+} // namespace BOOST_REGEX_DETAIL_NS
+} // namespace boost
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_recursive.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_recursive.hpp
index 6c33ba477ff..6c33ba477ff 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/perl_matcher_recursive.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/perl_matcher_recursive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/primary_transform.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/primary_transform.hpp
index 3e7cac549bd..3e7cac549bd 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/primary_transform.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/primary_transform.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/protected_call.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/protected_call.hpp
index 9d47514f81c..9d47514f81c 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/protected_call.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/protected_call.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regbase.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regbase.hpp
index 2b737d5aba7..2b737d5aba7 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regbase.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regbase.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex.hpp
index 7cc260a3ac9..7cc260a3ac9 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_format.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_format.hpp
new file mode 100644
index 00000000000..b65ffcc9ccd
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_format.hpp
@@ -0,0 +1,1151 @@
+/*
+ *
+ * Copyright (c) 1998-2009 John Maddock
+ * Copyright 2008 Eric Niebler.
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_format.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Provides formatting output routines for search and replace
+ * operations. Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_FORMAT_HPP
+#define BOOST_REGEX_FORMAT_HPP
+
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/mpl/and.hpp>
+#include <boost/mpl/not.hpp>
+#ifndef BOOST_NO_SFINAE
+#include <boost/mpl/has_xxx.hpp>
+#endif
+#include <boost/ref.hpp>
+
+namespace boost{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+//
+// Forward declaration:
+//
+ template <class BidiIterator, class Allocator = BOOST_DEDUCED_TYPENAME std::vector<sub_match<BidiIterator> >::allocator_type >
+class match_results;
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+//
+// struct trivial_format_traits:
+// defines minimum localisation support for formatting
+// in the case that the actual regex traits is unavailable.
+//
+template <class charT>
+struct trivial_format_traits
+{
+ typedef charT char_type;
+
+ static std::ptrdiff_t length(const charT* p)
+ {
+ return global_length(p);
+ }
+ static charT tolower(charT c)
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::global_lower(c);
+ }
+ static charT toupper(charT c)
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::global_upper(c);
+ }
+ static int value(const charT c, int radix)
+ {
+ int result = global_value(c);
+ return result >= radix ? -1 : result;
+ }
+ int toi(const charT*& p1, const charT* p2, int radix)const
+ {
+ return (int)global_toi(p1, p2, radix, *this);
+ }
+};
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+class basic_regex_formatter
+{
+public:
+ typedef typename traits::char_type char_type;
+ basic_regex_formatter(OutputIterator o, const Results& r, const traits& t)
+ : m_traits(t), m_results(r), m_out(o), m_position(), m_end(), m_flags(), m_state(output_copy), m_restore_state(output_copy), m_have_conditional(false) {}
+ OutputIterator format(ForwardIter p1, ForwardIter p2, match_flag_type f);
+ OutputIterator format(ForwardIter p1, match_flag_type f)
+ {
+ return format(p1, p1 + m_traits.length(p1), f);
+ }
+private:
+ typedef typename Results::value_type sub_match_type;
+ enum output_state
+ {
+ output_copy,
+ output_next_lower,
+ output_next_upper,
+ output_lower,
+ output_upper,
+ output_none
+ };
+
+ void put(char_type c);
+ void put(const sub_match_type& sub);
+ void format_all();
+ void format_perl();
+ void format_escape();
+ void format_conditional();
+ void format_until_scope_end();
+ bool handle_perl_verb(bool have_brace);
+
+ inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::false_&)
+ {
+ std::vector<char_type> v(i, j);
+ return (i != j) ? this->m_results.named_subexpression(&v[0], &v[0] + v.size())
+ : this->m_results.named_subexpression(static_cast<const char_type*>(0), static_cast<const char_type*>(0));
+ }
+ inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j, const mpl::true_&)
+ {
+ return this->m_results.named_subexpression(i, j);
+ }
+ inline typename Results::value_type const& get_named_sub(ForwardIter i, ForwardIter j)
+ {
+ typedef typename boost::is_convertible<ForwardIter, const char_type*>::type tag_type;
+ return get_named_sub(i, j, tag_type());
+ }
+ inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::false_&)
+ {
+ std::vector<char_type> v(i, j);
+ return (i != j) ? this->m_results.named_subexpression_index(&v[0], &v[0] + v.size())
+ : this->m_results.named_subexpression_index(static_cast<const char_type*>(0), static_cast<const char_type*>(0));
+ }
+ inline int get_named_sub_index(ForwardIter i, ForwardIter j, const mpl::true_&)
+ {
+ return this->m_results.named_subexpression_index(i, j);
+ }
+ inline int get_named_sub_index(ForwardIter i, ForwardIter j)
+ {
+ typedef typename boost::is_convertible<ForwardIter, const char_type*>::type tag_type;
+ return get_named_sub_index(i, j, tag_type());
+ }
+#ifdef BOOST_MSVC
+ // msvc-8.0 issues a spurious warning on the call to std::advance here:
+#pragma warning(push)
+#pragma warning(disable:4244)
+#endif
+ inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::false_&)
+ {
+ if(i != j)
+ {
+ std::vector<char_type> v(i, j);
+ const char_type* start = &v[0];
+ const char_type* pos = start;
+ int r = (int)m_traits.toi(pos, &v[0] + v.size(), base);
+ std::advance(i, pos - start);
+ return r;
+ }
+ return -1;
+ }
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+ inline int toi(ForwardIter& i, ForwardIter j, int base, const boost::mpl::true_&)
+ {
+ return m_traits.toi(i, j, base);
+ }
+ inline int toi(ForwardIter& i, ForwardIter j, int base)
+ {
+#if defined(_MSC_VER) && defined(__INTEL_COMPILER) && ((__INTEL_COMPILER == 9999) || (__INTEL_COMPILER == 1210))
+ // Workaround for Intel support issue #656654.
+ // See also https://svn.boost.org/trac/boost/ticket/6359
+ return toi(i, j, base, mpl::false_());
+#else
+ typedef typename boost::is_convertible<ForwardIter, const char_type*&>::type tag_type;
+ return toi(i, j, base, tag_type());
+#endif
+ }
+
+ const traits& m_traits; // the traits class for localised formatting operations
+ const Results& m_results; // the match_results being used.
+ OutputIterator m_out; // where to send output.
+ ForwardIter m_position; // format string, current position
+ ForwardIter m_end; // format string end
+ match_flag_type m_flags; // format flags to use
+ output_state m_state; // what to do with the next character
+ output_state m_restore_state; // what state to restore to.
+ bool m_have_conditional; // we are parsing a conditional
+private:
+ basic_regex_formatter(const basic_regex_formatter&);
+ basic_regex_formatter& operator=(const basic_regex_formatter&);
+};
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+OutputIterator basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format(ForwardIter p1, ForwardIter p2, match_flag_type f)
+{
+ m_position = p1;
+ m_end = p2;
+ m_flags = f;
+ format_all();
+ return m_out;
+}
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_all()
+{
+ // over and over:
+ while(m_position != m_end)
+ {
+ switch(*m_position)
+ {
+ case '&':
+ if(m_flags & ::boost::regex_constants::format_sed)
+ {
+ ++m_position;
+ put(m_results[0]);
+ break;
+ }
+ put(*m_position++);
+ break;
+ case '\\':
+ format_escape();
+ break;
+ case '(':
+ if(m_flags & boost::regex_constants::format_all)
+ {
+ ++m_position;
+ bool have_conditional = m_have_conditional;
+ m_have_conditional = false;
+ format_until_scope_end();
+ m_have_conditional = have_conditional;
+ if(m_position == m_end)
+ return;
+ BOOST_ASSERT(*m_position == static_cast<char_type>(')'));
+ ++m_position; // skip the closing ')'
+ break;
+ }
+ put(*m_position);
+ ++m_position;
+ break;
+ case ')':
+ if(m_flags & boost::regex_constants::format_all)
+ {
+ return;
+ }
+ put(*m_position);
+ ++m_position;
+ break;
+ case ':':
+ if((m_flags & boost::regex_constants::format_all) && m_have_conditional)
+ {
+ return;
+ }
+ put(*m_position);
+ ++m_position;
+ break;
+ case '?':
+ if(m_flags & boost::regex_constants::format_all)
+ {
+ ++m_position;
+ format_conditional();
+ break;
+ }
+ put(*m_position);
+ ++m_position;
+ break;
+ case '$':
+ if((m_flags & format_sed) == 0)
+ {
+ format_perl();
+ break;
+ }
+ // not a special character:
+ BOOST_FALLTHROUGH;
+ default:
+ put(*m_position);
+ ++m_position;
+ break;
+ }
+ }
+}
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_perl()
+{
+ //
+ // On entry *m_position points to a '$' character
+ // output the information that goes with it:
+ //
+ BOOST_ASSERT(*m_position == '$');
+ //
+ // see if this is a trailing '$':
+ //
+ if(++m_position == m_end)
+ {
+ --m_position;
+ put(*m_position);
+ ++m_position;
+ return;
+ }
+ //
+ // OK find out what kind it is:
+ //
+ bool have_brace = false;
+ ForwardIter save_position = m_position;
+ switch(*m_position)
+ {
+ case '&':
+ ++m_position;
+ put(this->m_results[0]);
+ break;
+ case '`':
+ ++m_position;
+ put(this->m_results.prefix());
+ break;
+ case '\'':
+ ++m_position;
+ put(this->m_results.suffix());
+ break;
+ case '$':
+ put(*m_position++);
+ break;
+ case '+':
+ if((++m_position != m_end) && (*m_position == '{'))
+ {
+ ForwardIter base = ++m_position;
+ while((m_position != m_end) && (*m_position != '}')) ++m_position;
+ if(m_position != m_end)
+ {
+ // Named sub-expression:
+ put(get_named_sub(base, m_position));
+ ++m_position;
+ break;
+ }
+ else
+ {
+ m_position = --base;
+ }
+ }
+ put((this->m_results)[this->m_results.size() > 1 ? static_cast<int>(this->m_results.size() - 1) : 1]);
+ break;
+ case '{':
+ have_brace = true;
+ ++m_position;
+ BOOST_FALLTHROUGH;
+ default:
+ // see if we have a number:
+ {
+ std::ptrdiff_t len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
+ //len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
+ int v = this->toi(m_position, m_position + len, 10);
+ if((v < 0) || (have_brace && ((m_position == m_end) || (*m_position != '}'))))
+ {
+ // Look for a Perl-5.10 verb:
+ if(!handle_perl_verb(have_brace))
+ {
+ // leave the $ as is, and carry on:
+ m_position = --save_position;
+ put(*m_position);
+ ++m_position;
+ }
+ break;
+ }
+ // otherwise output sub v:
+ put(this->m_results[v]);
+ if(have_brace)
+ ++m_position;
+ }
+ }
+}
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+bool basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::handle_perl_verb(bool have_brace)
+{
+ //
+ // We may have a capitalised string containing a Perl action:
+ //
+ static const char_type MATCH[] = { 'M', 'A', 'T', 'C', 'H' };
+ static const char_type PREMATCH[] = { 'P', 'R', 'E', 'M', 'A', 'T', 'C', 'H' };
+ static const char_type POSTMATCH[] = { 'P', 'O', 'S', 'T', 'M', 'A', 'T', 'C', 'H' };
+ static const char_type LAST_PAREN_MATCH[] = { 'L', 'A', 'S', 'T', '_', 'P', 'A', 'R', 'E', 'N', '_', 'M', 'A', 'T', 'C', 'H' };
+ static const char_type LAST_SUBMATCH_RESULT[] = { 'L', 'A', 'S', 'T', '_', 'S', 'U', 'B', 'M', 'A', 'T', 'C', 'H', '_', 'R', 'E', 'S', 'U', 'L', 'T' };
+ static const char_type LAST_SUBMATCH_RESULT_ALT[] = { '^', 'N' };
+
+ if(m_position == m_end)
+ return false;
+ if(have_brace && (*m_position == '^'))
+ ++m_position;
+
+ std::ptrdiff_t max_len = m_end - m_position;
+
+ if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH))
+ {
+ m_position += 5;
+ if(have_brace)
+ {
+ if((m_position != m_end) && (*m_position == '}'))
+ ++m_position;
+ else
+ {
+ m_position -= 5;
+ return false;
+ }
+ }
+ put(this->m_results[0]);
+ return true;
+ }
+ if((max_len >= 8) && std::equal(m_position, m_position + 8, PREMATCH))
+ {
+ m_position += 8;
+ if(have_brace)
+ {
+ if((m_position != m_end) && (*m_position == '}'))
+ ++m_position;
+ else
+ {
+ m_position -= 8;
+ return false;
+ }
+ }
+ put(this->m_results.prefix());
+ return true;
+ }
+ if((max_len >= 9) && std::equal(m_position, m_position + 9, POSTMATCH))
+ {
+ m_position += 9;
+ if(have_brace)
+ {
+ if((m_position != m_end) && (*m_position == '}'))
+ ++m_position;
+ else
+ {
+ m_position -= 9;
+ return false;
+ }
+ }
+ put(this->m_results.suffix());
+ return true;
+ }
+ if((max_len >= 16) && std::equal(m_position, m_position + 16, LAST_PAREN_MATCH))
+ {
+ m_position += 16;
+ if(have_brace)
+ {
+ if((m_position != m_end) && (*m_position == '}'))
+ ++m_position;
+ else
+ {
+ m_position -= 16;
+ return false;
+ }
+ }
+ put((this->m_results)[this->m_results.size() > 1 ? static_cast<int>(this->m_results.size() - 1) : 1]);
+ return true;
+ }
+ if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT))
+ {
+ m_position += 20;
+ if(have_brace)
+ {
+ if((m_position != m_end) && (*m_position == '}'))
+ ++m_position;
+ else
+ {
+ m_position -= 20;
+ return false;
+ }
+ }
+ put(this->m_results.get_last_closed_paren());
+ return true;
+ }
+ if((max_len >= 2) && std::equal(m_position, m_position + 2, LAST_SUBMATCH_RESULT_ALT))
+ {
+ m_position += 2;
+ if(have_brace)
+ {
+ if((m_position != m_end) && (*m_position == '}'))
+ ++m_position;
+ else
+ {
+ m_position -= 2;
+ return false;
+ }
+ }
+ put(this->m_results.get_last_closed_paren());
+ return true;
+ }
+ return false;
+}
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_escape()
+{
+ // skip the escape and check for trailing escape:
+ if(++m_position == m_end)
+ {
+ put(static_cast<char_type>('\\'));
+ return;
+ }
+ // now switch on the escape type:
+ switch(*m_position)
+ {
+ case 'a':
+ put(static_cast<char_type>('\a'));
+ ++m_position;
+ break;
+ case 'f':
+ put(static_cast<char_type>('\f'));
+ ++m_position;
+ break;
+ case 'n':
+ put(static_cast<char_type>('\n'));
+ ++m_position;
+ break;
+ case 'r':
+ put(static_cast<char_type>('\r'));
+ ++m_position;
+ break;
+ case 't':
+ put(static_cast<char_type>('\t'));
+ ++m_position;
+ break;
+ case 'v':
+ put(static_cast<char_type>('\v'));
+ ++m_position;
+ break;
+ case 'x':
+ if(++m_position == m_end)
+ {
+ put(static_cast<char_type>('x'));
+ return;
+ }
+ // maybe have \x{ddd}
+ if(*m_position == static_cast<char_type>('{'))
+ {
+ ++m_position;
+ int val = this->toi(m_position, m_end, 16);
+ if(val < 0)
+ {
+ // invalid value treat everything as literals:
+ put(static_cast<char_type>('x'));
+ put(static_cast<char_type>('{'));
+ return;
+ }
+ if((m_position == m_end) || (*m_position != static_cast<char_type>('}')))
+ {
+ --m_position;
+ while(*m_position != static_cast<char_type>('\\'))
+ --m_position;
+ ++m_position;
+ put(*m_position++);
+ return;
+ }
+ ++m_position;
+ put(static_cast<char_type>(val));
+ return;
+ }
+ else
+ {
+ std::ptrdiff_t len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
+ len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
+ int val = this->toi(m_position, m_position + len, 16);
+ if(val < 0)
+ {
+ --m_position;
+ put(*m_position++);
+ return;
+ }
+ put(static_cast<char_type>(val));
+ }
+ break;
+ case 'c':
+ if(++m_position == m_end)
+ {
+ --m_position;
+ put(*m_position++);
+ return;
+ }
+ put(static_cast<char_type>(*m_position++ % 32));
+ break;
+ case 'e':
+ put(static_cast<char_type>(27));
+ ++m_position;
+ break;
+ default:
+ // see if we have a perl specific escape:
+ if((m_flags & boost::regex_constants::format_sed) == 0)
+ {
+ bool breakout = false;
+ switch(*m_position)
+ {
+ case 'l':
+ ++m_position;
+ m_restore_state = m_state;
+ m_state = output_next_lower;
+ breakout = true;
+ break;
+ case 'L':
+ ++m_position;
+ m_state = output_lower;
+ breakout = true;
+ break;
+ case 'u':
+ ++m_position;
+ m_restore_state = m_state;
+ m_state = output_next_upper;
+ breakout = true;
+ break;
+ case 'U':
+ ++m_position;
+ m_state = output_upper;
+ breakout = true;
+ break;
+ case 'E':
+ ++m_position;
+ m_state = output_copy;
+ breakout = true;
+ break;
+ }
+ if(breakout)
+ break;
+ }
+ // see if we have a \n sed style backreference:
+ std::ptrdiff_t len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
+ len = (std::min)(static_cast<std::ptrdiff_t>(1), len);
+ int v = this->toi(m_position, m_position+len, 10);
+ if((v > 0) || ((v == 0) && (m_flags & ::boost::regex_constants::format_sed)))
+ {
+ put(m_results[v]);
+ break;
+ }
+ else if(v == 0)
+ {
+ // octal ecape sequence:
+ --m_position;
+ len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
+ len = (std::min)(static_cast<std::ptrdiff_t>(4), len);
+ v = this->toi(m_position, m_position + len, 8);
+ BOOST_ASSERT(v >= 0);
+ put(static_cast<char_type>(v));
+ break;
+ }
+ // Otherwise output the character "as is":
+ put(*m_position++);
+ break;
+ }
+}
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_conditional()
+{
+ if(m_position == m_end)
+ {
+ // oops trailing '?':
+ put(static_cast<char_type>('?'));
+ return;
+ }
+ int v;
+ if(*m_position == '{')
+ {
+ ForwardIter base = m_position;
+ ++m_position;
+ v = this->toi(m_position, m_end, 10);
+ if(v < 0)
+ {
+ // Try a named subexpression:
+ while((m_position != m_end) && (*m_position != '}'))
+ ++m_position;
+ v = this->get_named_sub_index(base + 1, m_position);
+ }
+ if((v < 0) || (*m_position != '}'))
+ {
+ m_position = base;
+ // oops trailing '?':
+ put(static_cast<char_type>('?'));
+ return;
+ }
+ // Skip trailing '}':
+ ++m_position;
+ }
+ else
+ {
+ std::ptrdiff_t len = ::boost::BOOST_REGEX_DETAIL_NS::distance(m_position, m_end);
+ len = (std::min)(static_cast<std::ptrdiff_t>(2), len);
+ v = this->toi(m_position, m_position + len, 10);
+ }
+ if(v < 0)
+ {
+ // oops not a number:
+ put(static_cast<char_type>('?'));
+ return;
+ }
+
+ // output varies depending upon whether sub-expression v matched or not:
+ if(m_results[v].matched)
+ {
+ m_have_conditional = true;
+ format_all();
+ m_have_conditional = false;
+ if((m_position != m_end) && (*m_position == static_cast<char_type>(':')))
+ {
+ // skip the ':':
+ ++m_position;
+ // save output state, then turn it off:
+ output_state saved_state = m_state;
+ m_state = output_none;
+ // format the rest of this scope:
+ format_until_scope_end();
+ // restore output state:
+ m_state = saved_state;
+ }
+ }
+ else
+ {
+ // save output state, then turn it off:
+ output_state saved_state = m_state;
+ m_state = output_none;
+ // format until ':' or ')':
+ m_have_conditional = true;
+ format_all();
+ m_have_conditional = false;
+ // restore state:
+ m_state = saved_state;
+ if((m_position != m_end) && (*m_position == static_cast<char_type>(':')))
+ {
+ // skip the ':':
+ ++m_position;
+ // format the rest of this scope:
+ format_until_scope_end();
+ }
+ }
+}
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::format_until_scope_end()
+{
+ do
+ {
+ format_all();
+ if((m_position == m_end) || (*m_position == static_cast<char_type>(')')))
+ return;
+ put(*m_position++);
+ }while(m_position != m_end);
+}
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::put(char_type c)
+{
+ // write a single character to output
+ // according to which case translation mode we are in:
+ switch(this->m_state)
+ {
+ case output_none:
+ return;
+ case output_next_lower:
+ c = m_traits.tolower(c);
+ this->m_state = m_restore_state;
+ break;
+ case output_next_upper:
+ c = m_traits.toupper(c);
+ this->m_state = m_restore_state;
+ break;
+ case output_lower:
+ c = m_traits.tolower(c);
+ break;
+ case output_upper:
+ c = m_traits.toupper(c);
+ break;
+ default:
+ break;
+ }
+ *m_out = c;
+ ++m_out;
+}
+
+template <class OutputIterator, class Results, class traits, class ForwardIter>
+void basic_regex_formatter<OutputIterator, Results, traits, ForwardIter>::put(const sub_match_type& sub)
+{
+ typedef typename sub_match_type::iterator iterator_type;
+ iterator_type i = sub.first;
+ while(i != sub.second)
+ {
+ put(*i);
+ ++i;
+ }
+}
+
+template <class S>
+class string_out_iterator
+{
+ S* out;
+public:
+ string_out_iterator(S& s) : out(&s) {}
+ string_out_iterator& operator++() { return *this; }
+ string_out_iterator& operator++(int) { return *this; }
+ string_out_iterator& operator*() { return *this; }
+ string_out_iterator& operator=(typename S::value_type v)
+ {
+ out->append(1, v);
+ return *this;
+ }
+
+ typedef std::ptrdiff_t difference_type;
+ typedef typename S::value_type value_type;
+ typedef value_type* pointer;
+ typedef value_type& reference;
+ typedef std::output_iterator_tag iterator_category;
+};
+
+template <class OutputIterator, class Iterator, class Alloc, class ForwardIter, class traits>
+OutputIterator regex_format_imp(OutputIterator out,
+ const match_results<Iterator, Alloc>& m,
+ ForwardIter p1, ForwardIter p2,
+ match_flag_type flags,
+ const traits& t
+ )
+{
+ if(flags & regex_constants::format_literal)
+ {
+ return BOOST_REGEX_DETAIL_NS::copy(p1, p2, out);
+ }
+
+ BOOST_REGEX_DETAIL_NS::basic_regex_formatter<
+ OutputIterator,
+ match_results<Iterator, Alloc>,
+ traits, ForwardIter> f(out, m, t);
+ return f.format(p1, p2, flags);
+}
+
+#ifndef BOOST_NO_SFINAE
+
+BOOST_MPL_HAS_XXX_TRAIT_DEF(const_iterator)
+
+struct any_type
+{
+ template <class T>
+ any_type(const T&);
+ template <class T, class U>
+ any_type(const T&, const U&);
+ template <class T, class U, class V>
+ any_type(const T&, const U&, const V&);
+};
+typedef char no_type;
+typedef char (&unary_type)[2];
+typedef char (&binary_type)[3];
+typedef char (&ternary_type)[4];
+
+no_type check_is_formatter(unary_type, binary_type, ternary_type);
+template<typename T>
+unary_type check_is_formatter(T const &, binary_type, ternary_type);
+template<typename T>
+binary_type check_is_formatter(unary_type, T const &, ternary_type);
+template<typename T, typename U>
+binary_type check_is_formatter(T const &, U const &, ternary_type);
+template<typename T>
+ternary_type check_is_formatter(unary_type, binary_type, T const &);
+template<typename T, typename U>
+ternary_type check_is_formatter(T const &, binary_type, U const &);
+template<typename T, typename U>
+ternary_type check_is_formatter(unary_type, T const &, U const &);
+template<typename T, typename U, typename V>
+ternary_type check_is_formatter(T const &, U const &, V const &);
+
+struct unary_binary_ternary
+{
+ typedef unary_type (*unary_fun)(any_type);
+ typedef binary_type (*binary_fun)(any_type, any_type);
+ typedef ternary_type (*ternary_fun)(any_type, any_type, any_type);
+ operator unary_fun();
+ operator binary_fun();
+ operator ternary_fun();
+};
+
+template<typename Formatter, bool IsFunction = boost::is_function<Formatter>::value>
+struct formatter_wrapper
+ : Formatter
+ , unary_binary_ternary
+{
+ formatter_wrapper(){}
+};
+
+template<typename Formatter>
+struct formatter_wrapper<Formatter, true>
+ : unary_binary_ternary
+{
+ operator Formatter *();
+};
+
+template<typename Formatter>
+struct formatter_wrapper<Formatter *, false>
+ : unary_binary_ternary
+{
+ operator Formatter *();
+};
+
+template <class F, class M, class O>
+struct format_traits_imp
+{
+private:
+ //
+ // F must be a pointer, a function, or a class with a function call operator:
+ //
+ BOOST_STATIC_ASSERT((::boost::is_pointer<F>::value || ::boost::is_function<F>::value || ::boost::is_class<F>::value));
+ static formatter_wrapper<typename unwrap_reference<F>::type> f;
+ static M m;
+ static O out;
+ static boost::regex_constants::match_flag_type flags;
+public:
+ BOOST_STATIC_CONSTANT(int, value = sizeof(check_is_formatter(f(m), f(m, out), f(m, out, flags))));
+};
+
+template <class F, class M, class O>
+struct format_traits
+{
+public:
+ //
+ // Type is mpl::int_<N> where N is one of:
+ //
+ // 0 : F is a pointer to a presumably null-terminated string.
+ // 1 : F is a character-container such as a std::string.
+ // 2 : F is a Unary Functor.
+ // 3 : F is a Binary Functor.
+ // 4 : F is a Ternary Functor.
+ //
+ typedef typename boost::mpl::if_<
+ boost::mpl::and_<boost::is_pointer<F>, boost::mpl::not_<boost::is_function<typename boost::remove_pointer<F>::type> > >,
+ boost::mpl::int_<0>,
+ typename boost::mpl::if_<
+ has_const_iterator<F>,
+ boost::mpl::int_<1>,
+ boost::mpl::int_<format_traits_imp<F, M, O>::value>
+ >::type
+ >::type type;
+ //
+ // This static assertion will fail if the functor passed does not accept
+ // the same type of arguments passed.
+ //
+ BOOST_STATIC_ASSERT( boost::is_class<F>::value && !has_const_iterator<F>::value ? (type::value > 1) : true);
+};
+
+#else // BOOST_NO_SFINAE
+
+template <class F, class M, class O>
+struct format_traits
+{
+public:
+ //
+ // Type is mpl::int_<N> where N is one of:
+ //
+ // 0 : F is a pointer to a presumably null-terminated string.
+ // 1 : F is a character-container such as a std::string.
+ //
+ // Other options such as F being a Functor are not supported without
+ // SFINAE support.
+ //
+ typedef typename boost::mpl::if_<
+ boost::is_pointer<F>,
+ boost::mpl::int_<0>,
+ boost::mpl::int_<1>
+ >::type type;
+};
+
+#endif // BOOST_NO_SFINAE
+
+template <class Base, class Match>
+struct format_functor3
+{
+ format_functor3(Base b) : func(b) {}
+ template <class OutputIter>
+ OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f)
+ {
+ return boost::unwrap_ref(func)(m, i, f);
+ }
+ template <class OutputIter, class Traits>
+ OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
+ {
+ return (*this)(m, i, f);
+ }
+private:
+ Base func;
+ format_functor3(const format_functor3&);
+ format_functor3& operator=(const format_functor3&);
+};
+
+template <class Base, class Match>
+struct format_functor2
+{
+ format_functor2(Base b) : func(b) {}
+ template <class OutputIter>
+ OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
+ {
+ return boost::unwrap_ref(func)(m, i);
+ }
+ template <class OutputIter, class Traits>
+ OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
+ {
+ return (*this)(m, i, f);
+ }
+private:
+ Base func;
+ format_functor2(const format_functor2&);
+ format_functor2& operator=(const format_functor2&);
+};
+
+template <class Base, class Match>
+struct format_functor1
+{
+ format_functor1(Base b) : func(b) {}
+
+ template <class S, class OutputIter>
+ OutputIter do_format_string(const S& s, OutputIter i)
+ {
+ return BOOST_REGEX_DETAIL_NS::copy(s.begin(), s.end(), i);
+ }
+ template <class S, class OutputIter>
+ inline OutputIter do_format_string(const S* s, OutputIter i)
+ {
+ while(s && *s)
+ {
+ *i = *s;
+ ++i;
+ ++s;
+ }
+ return i;
+ }
+ template <class OutputIter>
+ OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type /*f*/)
+ {
+ return do_format_string(boost::unwrap_ref(func)(m), i);
+ }
+ template <class OutputIter, class Traits>
+ OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits&)
+ {
+ return (*this)(m, i, f);
+ }
+private:
+ Base func;
+ format_functor1(const format_functor1&);
+ format_functor1& operator=(const format_functor1&);
+};
+
+template <class charT, class Match, class Traits>
+struct format_functor_c_string
+{
+ format_functor_c_string(const charT* ps) : func(ps) {}
+
+ template <class OutputIter>
+ OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())
+ {
+ //typedef typename Match::char_type char_type;
+ const charT* end = func;
+ while(*end) ++end;
+ return regex_format_imp(i, m, func, end, f, t);
+ }
+private:
+ const charT* func;
+ format_functor_c_string(const format_functor_c_string&);
+ format_functor_c_string& operator=(const format_functor_c_string&);
+};
+
+template <class Container, class Match, class Traits>
+struct format_functor_container
+{
+ format_functor_container(const Container& c) : func(c) {}
+
+ template <class OutputIter>
+ OutputIter operator()(const Match& m, OutputIter i, boost::regex_constants::match_flag_type f, const Traits& t = Traits())
+ {
+ //typedef typename Match::char_type char_type;
+ return BOOST_REGEX_DETAIL_NS::regex_format_imp(i, m, func.begin(), func.end(), f, t);
+ }
+private:
+ const Container& func;
+ format_functor_container(const format_functor_container&);
+ format_functor_container& operator=(const format_functor_container&);
+};
+
+template <class Func, class Match, class OutputIterator, class Traits = BOOST_REGEX_DETAIL_NS::trivial_format_traits<typename Match::char_type> >
+struct compute_functor_type
+{
+ typedef typename format_traits<Func, Match, OutputIterator>::type tag;
+ typedef typename boost::remove_cv< typename boost::remove_pointer<Func>::type>::type maybe_char_type;
+
+ typedef typename mpl::if_<
+ ::boost::is_same<tag, mpl::int_<0> >, format_functor_c_string<maybe_char_type, Match, Traits>,
+ typename mpl::if_<
+ ::boost::is_same<tag, mpl::int_<1> >, format_functor_container<Func, Match, Traits>,
+ typename mpl::if_<
+ ::boost::is_same<tag, mpl::int_<2> >, format_functor1<Func, Match>,
+ typename mpl::if_<
+ ::boost::is_same<tag, mpl::int_<3> >, format_functor2<Func, Match>,
+ format_functor3<Func, Match>
+ >::type
+ >::type
+ >::type
+ >::type type;
+};
+
+} // namespace BOOST_REGEX_DETAIL_NS
+
+template <class OutputIterator, class Iterator, class Allocator, class Functor>
+inline OutputIterator regex_format(OutputIterator out,
+ const match_results<Iterator, Allocator>& m,
+ Functor fmt,
+ match_flag_type flags = format_all
+ )
+{
+ return m.format(out, fmt, flags);
+}
+
+template <class Iterator, class Allocator, class Functor>
+inline std::basic_string<typename match_results<Iterator, Allocator>::char_type> regex_format(const match_results<Iterator, Allocator>& m,
+ Functor fmt,
+ match_flag_type flags = format_all)
+{
+ return m.format(fmt, flags);
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_FORMAT_HPP
+
+
+
+
+
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_fwd.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_fwd.hpp
index 3076b069ace..3076b069ace 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_grep.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_grep.hpp
index c5cb054e58e..c5cb054e58e 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_grep.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_grep.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_iterator.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_iterator.hpp
new file mode 100644
index 00000000000..380a9a71a43
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_iterator.hpp
@@ -0,0 +1,193 @@
+/*
+ *
+ * Copyright (c) 2003
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_iterator.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Provides regex_iterator implementation.
+ */
+
+#ifndef BOOST_REGEX_V4_REGEX_ITERATOR_HPP
+#define BOOST_REGEX_V4_REGEX_ITERATOR_HPP
+
+#include <boost/shared_ptr.hpp>
+
+namespace boost{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+template <class BidirectionalIterator,
+ class charT,
+ class traits>
+class regex_iterator_implementation
+{
+ typedef basic_regex<charT, traits> regex_type;
+
+ match_results<BidirectionalIterator> what; // current match
+ BidirectionalIterator base; // start of sequence
+ BidirectionalIterator end; // end of sequence
+ const regex_type re; // the expression
+ match_flag_type flags; // flags for matching
+
+public:
+ regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f)
+ : base(), end(last), re(*p), flags(f){}
+ bool init(BidirectionalIterator first)
+ {
+ base = first;
+ return regex_search(first, end, what, re, flags);
+ }
+ bool compare(const regex_iterator_implementation& that)
+ {
+ if(this == &that) return true;
+ return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second);
+ }
+ const match_results<BidirectionalIterator>& get()
+ { return what; }
+ bool next()
+ {
+ //if(what.prefix().first != what[0].second)
+ // flags |= match_prev_avail;
+ BidirectionalIterator next_start = what[0].second;
+ match_flag_type f(flags);
+ if(!what.length() || (f & regex_constants::match_posix))
+ f |= regex_constants::match_not_initial_null;
+ //if(base != next_start)
+ // f |= regex_constants::match_not_bob;
+ bool result = regex_search(next_start, end, what, re, f, base);
+ if(result)
+ what.set_base(base);
+ return result;
+ }
+private:
+ regex_iterator_implementation& operator=(const regex_iterator_implementation&);
+};
+
+template <class BidirectionalIterator,
+ class charT = BOOST_DEDUCED_TYPENAME BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::value_type,
+ class traits = regex_traits<charT> >
+class regex_iterator
+{
+private:
+ typedef regex_iterator_implementation<BidirectionalIterator, charT, traits> impl;
+ typedef shared_ptr<impl> pimpl;
+public:
+ typedef basic_regex<charT, traits> regex_type;
+ typedef match_results<BidirectionalIterator> value_type;
+ typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type
+ difference_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
+ typedef std::forward_iterator_tag iterator_category;
+
+ regex_iterator(){}
+ regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
+ const regex_type& re,
+ match_flag_type m = match_default)
+ : pdata(new impl(&re, b, m))
+ {
+ if(!pdata->init(a))
+ {
+ pdata.reset();
+ }
+ }
+ regex_iterator(const regex_iterator& that)
+ : pdata(that.pdata) {}
+ regex_iterator& operator=(const regex_iterator& that)
+ {
+ pdata = that.pdata;
+ return *this;
+ }
+ bool operator==(const regex_iterator& that)const
+ {
+ if((pdata.get() == 0) || (that.pdata.get() == 0))
+ return pdata.get() == that.pdata.get();
+ return pdata->compare(*(that.pdata.get()));
+ }
+ bool operator!=(const regex_iterator& that)const
+ { return !(*this == that); }
+ const value_type& operator*()const
+ { return pdata->get(); }
+ const value_type* operator->()const
+ { return &(pdata->get()); }
+ regex_iterator& operator++()
+ {
+ cow();
+ if(0 == pdata->next())
+ {
+ pdata.reset();
+ }
+ return *this;
+ }
+ regex_iterator operator++(int)
+ {
+ regex_iterator result(*this);
+ ++(*this);
+ return result;
+ }
+private:
+
+ pimpl pdata;
+
+ void cow()
+ {
+ // copy-on-write
+ if(pdata.get() && !pdata.unique())
+ {
+ pdata.reset(new impl(*(pdata.get())));
+ }
+ }
+};
+
+typedef regex_iterator<const char*> cregex_iterator;
+typedef regex_iterator<std::string::const_iterator> sregex_iterator;
+#ifndef BOOST_NO_WREGEX
+typedef regex_iterator<const wchar_t*> wcregex_iterator;
+typedef regex_iterator<std::wstring::const_iterator> wsregex_iterator;
+#endif
+
+// make_regex_iterator:
+template <class charT, class traits>
+inline regex_iterator<const charT*, charT, traits> make_regex_iterator(const charT* p, const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return regex_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, m);
+}
+template <class charT, class traits, class ST, class SA>
+inline regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return regex_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, m);
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_V4_REGEX_ITERATOR_HPP
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_match.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_match.hpp
index a50daa2aa5e..a50daa2aa5e 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_match.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_match.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_merge.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_merge.hpp
index 404ca775019..404ca775019 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_merge.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_merge.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_raw_buffer.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_raw_buffer.hpp
new file mode 100644
index 00000000000..f1f4f50ae58
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_raw_buffer.hpp
@@ -0,0 +1,210 @@
+/*
+ *
+ * Copyright (c) 1998-2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_raw_buffer.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Raw character buffer for regex code.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_RAW_BUFFER_HPP
+#define BOOST_REGEX_RAW_BUFFER_HPP
+
+#ifndef BOOST_REGEX_CONFIG_HPP
+#include <boost/regex/config.hpp>
+#endif
+
+#include <algorithm>
+#include <cstddef>
+
+namespace boost{
+ namespace BOOST_REGEX_DETAIL_NS{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+struct empty_padding{};
+
+union padding
+{
+ void* p;
+ unsigned int i;
+};
+
+template <int N>
+struct padding3
+{
+ enum{
+ padding_size = 8,
+ padding_mask = 7
+ };
+};
+
+template<>
+struct padding3<2>
+{
+ enum{
+ padding_size = 2,
+ padding_mask = 1
+ };
+};
+
+template<>
+struct padding3<4>
+{
+ enum{
+ padding_size = 4,
+ padding_mask = 3
+ };
+};
+
+template<>
+struct padding3<8>
+{
+ enum{
+ padding_size = 8,
+ padding_mask = 7
+ };
+};
+
+template<>
+struct padding3<16>
+{
+ enum{
+ padding_size = 16,
+ padding_mask = 15
+ };
+};
+
+enum{
+ padding_size = padding3<sizeof(padding)>::padding_size,
+ padding_mask = padding3<sizeof(padding)>::padding_mask
+};
+
+//
+// class raw_storage
+// basically this is a simplified vector<unsigned char>
+// this is used by basic_regex for expression storage
+//
+
+class BOOST_REGEX_DECL raw_storage
+{
+public:
+ typedef std::size_t size_type;
+ typedef unsigned char* pointer;
+private:
+ pointer last, start, end;
+public:
+
+ raw_storage();
+ raw_storage(size_type n);
+
+ ~raw_storage()
+ {
+ ::operator delete(start);
+ }
+
+ void BOOST_REGEX_CALL resize(size_type n);
+
+ void* BOOST_REGEX_CALL extend(size_type n)
+ {
+ if(size_type(last - end) < n)
+ resize(n + (end - start));
+ pointer result = end;
+ end += n;
+ return result;
+ }
+
+ void* BOOST_REGEX_CALL insert(size_type pos, size_type n);
+
+ size_type BOOST_REGEX_CALL size()
+ {
+ return size_type(end - start);
+ }
+
+ size_type BOOST_REGEX_CALL capacity()
+ {
+ return size_type(last - start);
+ }
+
+ void* BOOST_REGEX_CALL data()const
+ {
+ return start;
+ }
+
+ size_type BOOST_REGEX_CALL index(void* ptr)
+ {
+ return size_type(static_cast<pointer>(ptr) - static_cast<pointer>(data()));
+ }
+
+ void BOOST_REGEX_CALL clear()
+ {
+ end = start;
+ }
+
+ void BOOST_REGEX_CALL align()
+ {
+ // move end up to a boundary:
+ end = start + (((end - start) + padding_mask) & ~padding_mask);
+ }
+ void swap(raw_storage& that)
+ {
+ std::swap(start, that.start);
+ std::swap(end, that.end);
+ std::swap(last, that.last);
+ }
+};
+
+inline raw_storage::raw_storage()
+{
+ last = start = end = 0;
+}
+
+inline raw_storage::raw_storage(size_type n)
+{
+ start = end = static_cast<pointer>(::operator new(n));
+ BOOST_REGEX_NOEH_ASSERT(start)
+ last = start + n;
+}
+
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespace BOOST_REGEX_DETAIL_NS
+} // namespace boost
+
+#endif
+
+
+
+
+
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_replace.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_replace.hpp
index 415c58b634d..415c58b634d 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_replace.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_replace.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_search.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_search.hpp
index 0725d3ec3fc..0725d3ec3fc 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_search.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_search.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_split.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_split.hpp
new file mode 100644
index 00000000000..afa56598319
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_split.hpp
@@ -0,0 +1,174 @@
+/*
+ *
+ * Copyright (c) 1998-2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_split.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Implements regex_split and associated functions.
+ * Note this is an internal header file included
+ * by regex.hpp, do not include on its own.
+ */
+
+#ifndef BOOST_REGEX_SPLIT_HPP
+#define BOOST_REGEX_SPLIT_HPP
+
+namespace boost{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
+#endif
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+template <class charT>
+const basic_regex<charT>& get_default_expression(charT)
+{
+ static const charT expression_text[4] = { '\\', 's', '+', '\00', };
+ static const basic_regex<charT> e(expression_text);
+ return e;
+}
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1>
+class split_pred
+{
+ typedef std::basic_string<charT, Traits1, Alloc1> string_type;
+ typedef typename string_type::const_iterator iterator_type;
+ iterator_type* p_last;
+ OutputIterator* p_out;
+ std::size_t* p_max;
+ std::size_t initial_max;
+public:
+ split_pred(iterator_type* a, OutputIterator* b, std::size_t* c)
+ : p_last(a), p_out(b), p_max(c), initial_max(*c) {}
+
+ bool operator()(const match_results<iterator_type>& what);
+};
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1>
+bool split_pred<OutputIterator, charT, Traits1, Alloc1>::operator()
+ (const match_results<iterator_type>& what)
+{
+ *p_last = what[0].second;
+ if(what.size() > 1)
+ {
+ // output sub-expressions only:
+ for(unsigned i = 1; i < what.size(); ++i)
+ {
+ *(*p_out) = what.str(i);
+ ++(*p_out);
+ if(0 == --*p_max) return false;
+ }
+ return *p_max != 0;
+ }
+ else
+ {
+ // output $` only if it's not-null or not at the start of the input:
+ const sub_match<iterator_type>& sub = what[-1];
+ if((sub.first != sub.second) || (*p_max != initial_max))
+ {
+ *(*p_out) = sub.str();
+ ++(*p_out);
+ return --*p_max;
+ }
+ }
+ //
+ // initial null, do nothing:
+ return true;
+}
+
+} // namespace BOOST_REGEX_DETAIL_NS
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
+std::size_t regex_split(OutputIterator out,
+ std::basic_string<charT, Traits1, Alloc1>& s,
+ const basic_regex<charT, Traits2>& e,
+ match_flag_type flags,
+ std::size_t max_split)
+{
+ typedef typename std::basic_string<charT, Traits1, Alloc1>::const_iterator ci_t;
+ //typedef typename match_results<ci_t>::allocator_type match_allocator;
+ ci_t last = s.begin();
+ std::size_t init_size = max_split;
+ BOOST_REGEX_DETAIL_NS::split_pred<OutputIterator, charT, Traits1, Alloc1> pred(&last, &out, &max_split);
+ ci_t i, j;
+ i = s.begin();
+ j = s.end();
+ regex_grep(pred, i, j, e, flags);
+ //
+ // if there is still input left, do a final push as long as max_split
+ // is not exhausted, and we're not splitting sub-expressions rather
+ // than whitespace:
+ if(max_split && (last != s.end()) && (e.mark_count() == 0))
+ {
+ *out = std::basic_string<charT, Traits1, Alloc1>((ci_t)last, (ci_t)s.end());
+ ++out;
+ last = s.end();
+ --max_split;
+ }
+ //
+ // delete from the string everything that has been processed so far:
+ s.erase(0, last - s.begin());
+ //
+ // return the number of new records pushed:
+ return init_size - max_split;
+}
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1, class Traits2>
+inline std::size_t regex_split(OutputIterator out,
+ std::basic_string<charT, Traits1, Alloc1>& s,
+ const basic_regex<charT, Traits2>& e,
+ match_flag_type flags = match_default)
+{
+ return regex_split(out, s, e, flags, UINT_MAX);
+}
+
+template <class OutputIterator, class charT, class Traits1, class Alloc1>
+inline std::size_t regex_split(OutputIterator out,
+ std::basic_string<charT, Traits1, Alloc1>& s)
+{
+ return regex_split(out, s, BOOST_REGEX_DETAIL_NS::get_default_expression(charT(0)), match_default, UINT_MAX);
+}
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespace boost
+
+#endif
+
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_token_iterator.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_token_iterator.hpp
new file mode 100644
index 00000000000..fde51d74ebe
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_token_iterator.hpp
@@ -0,0 +1,325 @@
+/*
+ *
+ * Copyright (c) 2003
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_token_iterator.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Provides regex_token_iterator implementation.
+ */
+
+#ifndef BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
+#define BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
+
+#include <boost/shared_ptr.hpp>
+#include <boost/detail/workaround.hpp>
+#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
+ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
+//
+// Borland C++ Builder 6, and Visual C++ 6,
+// can't cope with the array template constructor
+// so we have a template member that will accept any type as
+// argument, and then assert that is really is an array:
+//
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_array.hpp>
+#endif
+
+namespace boost{
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#pragma warning(push)
+#pragma warning(disable:4700)
+#endif
+
+template <class BidirectionalIterator,
+ class charT,
+ class traits>
+class regex_token_iterator_implementation
+{
+ typedef basic_regex<charT, traits> regex_type;
+ typedef sub_match<BidirectionalIterator> value_type;
+
+ match_results<BidirectionalIterator> what; // current match
+ BidirectionalIterator base; // start of search area
+ BidirectionalIterator end; // end of search area
+ const regex_type re; // the expression
+ match_flag_type flags; // match flags
+ value_type result; // the current string result
+ int N; // the current sub-expression being enumerated
+ std::vector<int> subs; // the sub-expressions to enumerate
+
+public:
+ regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f)
+ : end(last), re(*p), flags(f){ subs.push_back(sub); }
+ regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
+ : end(last), re(*p), flags(f), subs(v){}
+#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
+#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
+ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
+ || BOOST_WORKAROUND(__HP_aCC, < 60700)
+ template <class T>
+ regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f)
+ : end(last), re(*p), flags(f)
+ {
+ // assert that T really is an array:
+ BOOST_STATIC_ASSERT(::boost::is_array<T>::value);
+ const std::size_t array_size = sizeof(T) / sizeof(submatches[0]);
+ for(std::size_t i = 0; i < array_size; ++i)
+ {
+ subs.push_back(submatches[i]);
+ }
+ }
+#else
+ template <std::size_t CN>
+ regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f)
+ : end(last), re(*p), flags(f)
+ {
+ for(std::size_t i = 0; i < CN; ++i)
+ {
+ subs.push_back(submatches[i]);
+ }
+ }
+#endif
+#endif
+ bool init(BidirectionalIterator first)
+ {
+ N = 0;
+ base = first;
+ if(regex_search(first, end, what, re, flags, base) == true)
+ {
+ N = 0;
+ result = ((subs[N] == -1) ? what.prefix() : what[(int)subs[N]]);
+ return true;
+ }
+ else if((subs[N] == -1) && (first != end))
+ {
+ result.first = first;
+ result.second = end;
+ result.matched = (first != end);
+ N = -1;
+ return true;
+ }
+ return false;
+ }
+ bool compare(const regex_token_iterator_implementation& that)
+ {
+ if(this == &that) return true;
+ return (&re.get_data() == &that.re.get_data())
+ && (end == that.end)
+ && (flags == that.flags)
+ && (N == that.N)
+ && (what[0].first == that.what[0].first)
+ && (what[0].second == that.what[0].second);
+ }
+ const value_type& get()
+ { return result; }
+ bool next()
+ {
+ if(N == -1)
+ return false;
+ if(N+1 < (int)subs.size())
+ {
+ ++N;
+ result =((subs[N] == -1) ? what.prefix() : what[subs[N]]);
+ return true;
+ }
+ //if(what.prefix().first != what[0].second)
+ // flags |= /*match_prev_avail |*/ regex_constants::match_not_bob;
+ BidirectionalIterator last_end(what[0].second);
+ if(regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags), base))
+ {
+ N =0;
+ result =((subs[N] == -1) ? what.prefix() : what[subs[N]]);
+ return true;
+ }
+ else if((last_end != end) && (subs[0] == -1))
+ {
+ N =-1;
+ result.first = last_end;
+ result.second = end;
+ result.matched = (last_end != end);
+ return true;
+ }
+ return false;
+ }
+private:
+ regex_token_iterator_implementation& operator=(const regex_token_iterator_implementation&);
+};
+
+template <class BidirectionalIterator,
+ class charT = BOOST_DEDUCED_TYPENAME BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::value_type,
+ class traits = regex_traits<charT> >
+class regex_token_iterator
+{
+private:
+ typedef regex_token_iterator_implementation<BidirectionalIterator, charT, traits> impl;
+ typedef shared_ptr<impl> pimpl;
+public:
+ typedef basic_regex<charT, traits> regex_type;
+ typedef sub_match<BidirectionalIterator> value_type;
+ typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type
+ difference_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
+ typedef std::forward_iterator_tag iterator_category;
+
+ regex_token_iterator(){}
+ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
+ int submatch = 0, match_flag_type m = match_default)
+ : pdata(new impl(&re, b, submatch, m))
+ {
+ if(!pdata->init(a))
+ pdata.reset();
+ }
+ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
+ const std::vector<int>& submatches, match_flag_type m = match_default)
+ : pdata(new impl(&re, b, submatches, m))
+ {
+ if(!pdata->init(a))
+ pdata.reset();
+ }
+#if !BOOST_WORKAROUND(__HP_aCC, < 60700)
+#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
+ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
+ || BOOST_WORKAROUND(__HP_aCC, < 60700)
+ template <class T>
+ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
+ const T& submatches, match_flag_type m = match_default)
+ : pdata(new impl(&re, b, submatches, m))
+ {
+ if(!pdata->init(a))
+ pdata.reset();
+ }
+#else
+ template <std::size_t N>
+ regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
+ const int (&submatches)[N], match_flag_type m = match_default)
+ : pdata(new impl(&re, b, submatches, m))
+ {
+ if(!pdata->init(a))
+ pdata.reset();
+ }
+#endif
+#endif
+ regex_token_iterator(const regex_token_iterator& that)
+ : pdata(that.pdata) {}
+ regex_token_iterator& operator=(const regex_token_iterator& that)
+ {
+ pdata = that.pdata;
+ return *this;
+ }
+ bool operator==(const regex_token_iterator& that)const
+ {
+ if((pdata.get() == 0) || (that.pdata.get() == 0))
+ return pdata.get() == that.pdata.get();
+ return pdata->compare(*(that.pdata.get()));
+ }
+ bool operator!=(const regex_token_iterator& that)const
+ { return !(*this == that); }
+ const value_type& operator*()const
+ { return pdata->get(); }
+ const value_type* operator->()const
+ { return &(pdata->get()); }
+ regex_token_iterator& operator++()
+ {
+ cow();
+ if(0 == pdata->next())
+ {
+ pdata.reset();
+ }
+ return *this;
+ }
+ regex_token_iterator operator++(int)
+ {
+ regex_token_iterator result(*this);
+ ++(*this);
+ return result;
+ }
+private:
+
+ pimpl pdata;
+
+ void cow()
+ {
+ // copy-on-write
+ if(pdata.get() && !pdata.unique())
+ {
+ pdata.reset(new impl(*(pdata.get())));
+ }
+ }
+};
+
+typedef regex_token_iterator<const char*> cregex_token_iterator;
+typedef regex_token_iterator<std::string::const_iterator> sregex_token_iterator;
+#ifndef BOOST_NO_WREGEX
+typedef regex_token_iterator<const wchar_t*> wcregex_token_iterator;
+typedef regex_token_iterator<std::wstring::const_iterator> wsregex_token_iterator;
+#endif
+
+template <class charT, class traits>
+inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
+}
+template <class charT, class traits, class ST, class SA>
+inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
+}
+template <class charT, class traits, std::size_t N>
+inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
+}
+template <class charT, class traits, class ST, class SA, std::size_t N>
+inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
+}
+template <class charT, class traits>
+inline regex_token_iterator<const charT*, charT, traits> make_regex_token_iterator(const charT* p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return regex_token_iterator<const charT*, charT, traits>(p, p+traits::length(p), e, submatch, m);
+}
+template <class charT, class traits, class ST, class SA>
+inline regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits> make_regex_token_iterator(const std::basic_string<charT, ST, SA>& p, const basic_regex<charT, traits>& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return regex_token_iterator<typename std::basic_string<charT, ST, SA>::const_iterator, charT, traits>(p.begin(), p.end(), e, submatch, m);
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
+
+
+
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/regex_traits.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_traits.hpp
index 5d427706543..5d427706543 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/regex_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_traits.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_traits_defaults.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_traits_defaults.hpp
new file mode 100644
index 00000000000..e58d6bae23a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_traits_defaults.hpp
@@ -0,0 +1,381 @@
+/*
+ *
+ * Copyright (c) 2004
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_traits_defaults.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares API's for access to regex_traits default properties.
+ */
+
+#ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED
+#define BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/regex/config.hpp>
+
+#ifndef BOOST_REGEX_SYNTAX_TYPE_HPP
+#include <boost/regex/v4/syntax_type.hpp>
+#endif
+#ifndef BOOST_REGEX_ERROR_TYPE_HPP
+#include <boost/regex/v4/error_type.hpp>
+#endif
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std{
+ using ::strlen;
+}
+#endif
+
+namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
+
+
+//
+// helpers to suppress warnings:
+//
+template <class charT>
+inline bool is_extended(charT c)
+{
+ typedef typename make_unsigned<charT>::type unsigned_type;
+ return (sizeof(charT) > 1) && (static_cast<unsigned_type>(c) >= 256u);
+}
+inline bool is_extended(char)
+{ return false; }
+
+
+BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_syntax(regex_constants::syntax_type n);
+BOOST_REGEX_DECL const char* BOOST_REGEX_CALL get_default_error_string(regex_constants::error_type n);
+BOOST_REGEX_DECL regex_constants::syntax_type BOOST_REGEX_CALL get_default_syntax_type(char c);
+BOOST_REGEX_DECL regex_constants::escape_syntax_type BOOST_REGEX_CALL get_default_escape_syntax_type(char c);
+
+// is charT c a combining character?
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL is_combining_implementation(uint_least16_t s);
+
+template <class charT>
+inline bool is_combining(charT c)
+{
+ return (c <= static_cast<charT>(0)) ? false : ((c >= static_cast<charT>((std::numeric_limits<uint_least16_t>::max)())) ? false : is_combining_implementation(static_cast<unsigned short>(c)));
+}
+template <>
+inline bool is_combining<char>(char)
+{
+ return false;
+}
+template <>
+inline bool is_combining<signed char>(signed char)
+{
+ return false;
+}
+template <>
+inline bool is_combining<unsigned char>(unsigned char)
+{
+ return false;
+}
+#if !defined(__hpux) && !defined(__WINSCW__) // can't use WCHAR_MAX/MIN in pp-directives
+#ifdef _MSC_VER
+template<>
+inline bool is_combining<wchar_t>(wchar_t c)
+{
+ return is_combining_implementation(static_cast<unsigned short>(c));
+}
+#elif !defined(__DECCXX) && !defined(__osf__) && !defined(__OSF__) && defined(WCHAR_MIN) && (WCHAR_MIN == 0) && !defined(BOOST_NO_INTRINSIC_WCHAR_T)
+#if defined(WCHAR_MAX) && (WCHAR_MAX <= USHRT_MAX)
+template<>
+inline bool is_combining<wchar_t>(wchar_t c)
+{
+ return is_combining_implementation(static_cast<unsigned short>(c));
+}
+#else
+template<>
+inline bool is_combining<wchar_t>(wchar_t c)
+{
+ return (c >= (std::numeric_limits<uint_least16_t>::max)()) ? false : is_combining_implementation(static_cast<unsigned short>(c));
+}
+#endif
+#endif
+#endif
+
+//
+// is a charT c a line separator?
+//
+template <class charT>
+inline bool is_separator(charT c)
+{
+ return BOOST_REGEX_MAKE_BOOL(
+ (c == static_cast<charT>('\n'))
+ || (c == static_cast<charT>('\r'))
+ || (c == static_cast<charT>('\f'))
+ || (static_cast<boost::uint16_t>(c) == 0x2028u)
+ || (static_cast<boost::uint16_t>(c) == 0x2029u)
+ || (static_cast<boost::uint16_t>(c) == 0x85u));
+}
+template <>
+inline bool is_separator<char>(char c)
+{
+ return BOOST_REGEX_MAKE_BOOL((c == '\n') || (c == '\r') || (c == '\f'));
+}
+
+//
+// get a default collating element:
+//
+BOOST_REGEX_DECL std::string BOOST_REGEX_CALL lookup_default_collate_name(const std::string& name);
+
+//
+// get the state_id of a character clasification, the individual
+// traits classes then transform that state_id into a bitmask:
+//
+template <class charT>
+struct character_pointer_range
+{
+ const charT* p1;
+ const charT* p2;
+
+ bool operator < (const character_pointer_range& r)const
+ {
+ return std::lexicographical_compare(p1, p2, r.p1, r.p2);
+ }
+ bool operator == (const character_pointer_range& r)const
+ {
+ // Not only do we check that the ranges are of equal size before
+ // calling std::equal, but there is no other algorithm available:
+ // not even a non-standard MS one. So forward to unchecked_equal
+ // in the MS case.
+ return ((p2 - p1) == (r.p2 - r.p1)) && BOOST_REGEX_DETAIL_NS::equal(p1, p2, r.p1);
+ }
+};
+template <class charT>
+int get_default_class_id(const charT* p1, const charT* p2)
+{
+ static const charT data[73] = {
+ 'a', 'l', 'n', 'u', 'm',
+ 'a', 'l', 'p', 'h', 'a',
+ 'b', 'l', 'a', 'n', 'k',
+ 'c', 'n', 't', 'r', 'l',
+ 'd', 'i', 'g', 'i', 't',
+ 'g', 'r', 'a', 'p', 'h',
+ 'l', 'o', 'w', 'e', 'r',
+ 'p', 'r', 'i', 'n', 't',
+ 'p', 'u', 'n', 'c', 't',
+ 's', 'p', 'a', 'c', 'e',
+ 'u', 'n', 'i', 'c', 'o', 'd', 'e',
+ 'u', 'p', 'p', 'e', 'r',
+ 'v',
+ 'w', 'o', 'r', 'd',
+ 'x', 'd', 'i', 'g', 'i', 't',
+ };
+
+ static const character_pointer_range<charT> ranges[21] =
+ {
+ {data+0, data+5,}, // alnum
+ {data+5, data+10,}, // alpha
+ {data+10, data+15,}, // blank
+ {data+15, data+20,}, // cntrl
+ {data+20, data+21,}, // d
+ {data+20, data+25,}, // digit
+ {data+25, data+30,}, // graph
+ {data+29, data+30,}, // h
+ {data+30, data+31,}, // l
+ {data+30, data+35,}, // lower
+ {data+35, data+40,}, // print
+ {data+40, data+45,}, // punct
+ {data+45, data+46,}, // s
+ {data+45, data+50,}, // space
+ {data+57, data+58,}, // u
+ {data+50, data+57,}, // unicode
+ {data+57, data+62,}, // upper
+ {data+62, data+63,}, // v
+ {data+63, data+64,}, // w
+ {data+63, data+67,}, // word
+ {data+67, data+73,}, // xdigit
+ };
+ static const character_pointer_range<charT>* ranges_begin = ranges;
+ static const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
+
+ character_pointer_range<charT> t = { p1, p2, };
+ const character_pointer_range<charT>* p = std::lower_bound(ranges_begin, ranges_end, t);
+ if((p != ranges_end) && (t == *p))
+ return static_cast<int>(p - ranges);
+ return -1;
+}
+
+//
+// helper functions:
+//
+template <class charT>
+std::ptrdiff_t global_length(const charT* p)
+{
+ std::ptrdiff_t n = 0;
+ while(*p)
+ {
+ ++p;
+ ++n;
+ }
+ return n;
+}
+template<>
+inline std::ptrdiff_t global_length<char>(const char* p)
+{
+ return (std::strlen)(p);
+}
+#ifndef BOOST_NO_WREGEX
+template<>
+inline std::ptrdiff_t global_length<wchar_t>(const wchar_t* p)
+{
+ return (std::ptrdiff_t)(std::wcslen)(p);
+}
+#endif
+template <class charT>
+inline charT BOOST_REGEX_CALL global_lower(charT c)
+{
+ return c;
+}
+template <class charT>
+inline charT BOOST_REGEX_CALL global_upper(charT c)
+{
+ return c;
+}
+
+BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_lower(char c);
+BOOST_REGEX_DECL char BOOST_REGEX_CALL do_global_upper(char c);
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_lower(wchar_t c);
+BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL do_global_upper(wchar_t c);
+#endif
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_lower(unsigned short c);
+BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL do_global_upper(unsigned short c);
+#endif
+//
+// This sucks: declare template specialisations of global_lower/global_upper
+// that just forward to the non-template implementation functions. We do
+// this because there is one compiler (Compaq Tru64 C++) that doesn't seem
+// to differentiate between templates and non-template overloads....
+// what's more, the primary template, plus all overloads have to be
+// defined in the same translation unit (if one is inline they all must be)
+// otherwise the "local template instantiation" compiler option can pick
+// the wrong instantiation when linking:
+//
+template<> inline char BOOST_REGEX_CALL global_lower<char>(char c){ return do_global_lower(c); }
+template<> inline char BOOST_REGEX_CALL global_upper<char>(char c){ return do_global_upper(c); }
+#ifndef BOOST_NO_WREGEX
+template<> inline wchar_t BOOST_REGEX_CALL global_lower<wchar_t>(wchar_t c){ return do_global_lower(c); }
+template<> inline wchar_t BOOST_REGEX_CALL global_upper<wchar_t>(wchar_t c){ return do_global_upper(c); }
+#endif
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+template<> inline unsigned short BOOST_REGEX_CALL global_lower<unsigned short>(unsigned short c){ return do_global_lower(c); }
+template<> inline unsigned short BOOST_REGEX_CALL global_upper<unsigned short>(unsigned short c){ return do_global_upper(c); }
+#endif
+
+template <class charT>
+int global_value(charT c)
+{
+ static const charT zero = '0';
+ static const charT nine = '9';
+ static const charT a = 'a';
+ static const charT f = 'f';
+ static const charT A = 'A';
+ static const charT F = 'F';
+
+ if(c > f) return -1;
+ if(c >= a) return 10 + (c - a);
+ if(c > F) return -1;
+ if(c >= A) return 10 + (c - A);
+ if(c > nine) return -1;
+ if(c >= zero) return c - zero;
+ return -1;
+}
+template <class charT, class traits>
+boost::intmax_t global_toi(const charT*& p1, const charT* p2, int radix, const traits& t)
+{
+ (void)t; // warning suppression
+ boost::intmax_t limit = (std::numeric_limits<boost::intmax_t>::max)() / radix;
+ boost::intmax_t next_value = t.value(*p1, radix);
+ if((p1 == p2) || (next_value < 0) || (next_value >= radix))
+ return -1;
+ boost::intmax_t result = 0;
+ while(p1 != p2)
+ {
+ next_value = t.value(*p1, radix);
+ if((next_value < 0) || (next_value >= radix))
+ break;
+ result *= radix;
+ result += next_value;
+ ++p1;
+ if (result > limit)
+ return -1;
+ }
+ return result;
+}
+
+template <class charT>
+inline typename boost::enable_if_c<(sizeof(charT) > 1), const charT*>::type get_escape_R_string()
+{
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4309 4245)
+#endif
+ static const charT e1[] = { '(', '?', '-', 'x', ':', '(', '?', '>', '\x0D', '\x0A', '?',
+ '|', '[', '\x0A', '\x0B', '\x0C', static_cast<charT>(0x85), static_cast<charT>(0x2028),
+ static_cast<charT>(0x2029), ']', ')', ')', '\0' };
+ static const charT e2[] = { '(', '?', '-', 'x', ':', '(', '?', '>', '\x0D', '\x0A', '?',
+ '|', '[', '\x0A', '\x0B', '\x0C', static_cast<charT>(0x85), ']', ')', ')', '\0' };
+
+ charT c = static_cast<charT>(0x2029u);
+ bool b = (static_cast<unsigned>(c) == 0x2029u);
+
+ return (b ? e1 : e2);
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+}
+
+template <class charT>
+inline typename boost::disable_if_c<(sizeof(charT) > 1), const charT*>::type get_escape_R_string()
+{
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4309)
+#endif
+ static const charT e2[] = { '(', '?', '-', 'x', ':', '(', '?', '>', '\x0D', '\x0A', '?',
+ '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', ')', '\0' };
+ return e2;
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+}
+
+} // BOOST_REGEX_DETAIL_NS
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/regex_workaround.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/regex_workaround.hpp
new file mode 100644
index 00000000000..35eafc253ae
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/regex_workaround.hpp
@@ -0,0 +1,237 @@
+/*
+ *
+ * Copyright (c) 1998-2005
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE regex_workarounds.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares Misc workarounds.
+ */
+
+#ifndef BOOST_REGEX_WORKAROUND_HPP
+#define BOOST_REGEX_WORKAROUND_HPP
+
+#include <boost/config.hpp>
+#include <new>
+#include <cstring>
+#include <cstdlib>
+#include <cstddef>
+#include <cassert>
+#include <cstdio>
+#include <climits>
+#include <string>
+#include <stdexcept>
+#include <iterator>
+#include <algorithm>
+#include <iosfwd>
+#include <vector>
+#include <set>
+#include <map>
+#include <boost/limits.hpp>
+#include <boost/assert.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/scoped_ptr.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/mpl/bool_fwd.hpp>
+#include <boost/regex/config.hpp>
+#ifndef BOOST_NO_STD_LOCALE
+# include <locale>
+#endif
+
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std{
+ using ::sprintf; using ::strcpy; using ::strcat; using ::strlen;
+}
+#endif
+
+namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
+#ifdef BOOST_NO_STD_DISTANCE
+template <class T>
+std::ptrdiff_t distance(const T& x, const T& y)
+{ return y - x; }
+#else
+using std::distance;
+#endif
+}}
+
+
+#ifdef BOOST_REGEX_NO_BOOL
+# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>((x) ? true : false)
+#else
+# define BOOST_REGEX_MAKE_BOOL(x) static_cast<bool>(x)
+#endif
+
+/*****************************************************************************
+ *
+ * Fix broken namespace support:
+ *
+ ****************************************************************************/
+
+#if defined(BOOST_NO_STDC_NAMESPACE) && defined(__cplusplus)
+
+namespace std{
+ using ::ptrdiff_t;
+ using ::size_t;
+ using ::abs;
+ using ::memset;
+ using ::memcpy;
+}
+
+#endif
+
+/*****************************************************************************
+ *
+ * helper functions pointer_construct/pointer_destroy:
+ *
+ ****************************************************************************/
+
+#ifdef __cplusplus
+namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
+
+#ifdef BOOST_MSVC
+#pragma warning (push)
+#pragma warning (disable : 4100)
+#endif
+
+template <class T>
+inline void pointer_destroy(T* p)
+{ p->~T(); (void)p; }
+
+#ifdef BOOST_MSVC
+#pragma warning (pop)
+#endif
+
+template <class T>
+inline void pointer_construct(T* p, const T& t)
+{ new (p) T(t); }
+
+}} // namespaces
+#endif
+
+/*****************************************************************************
+ *
+ * helper function copy:
+ *
+ ****************************************************************************/
+
+#ifdef __cplusplus
+namespace boost{ namespace BOOST_REGEX_DETAIL_NS{
+#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && BOOST_WORKAROUND(BOOST_MSVC, <1600) && defined(_CPPLIB_VER) && defined(BOOST_DINKUMWARE_STDLIB) && !(defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION))
+ //
+ // MSVC 8 will either emit warnings or else refuse to compile
+ // code that makes perfectly legitimate use of std::copy, when
+ // the OutputIterator type is a user-defined class (apparently all user
+ // defined iterators are "unsafe"). This code works around that:
+ //
+ template<class InputIterator, class OutputIterator>
+ inline OutputIterator copy(
+ InputIterator first,
+ InputIterator last,
+ OutputIterator dest
+ )
+ {
+ return stdext::unchecked_copy(first, last, dest);
+ }
+ template<class InputIterator1, class InputIterator2>
+ inline bool equal(
+ InputIterator1 first,
+ InputIterator1 last,
+ InputIterator2 with
+ )
+ {
+ return stdext::unchecked_equal(first, last, with);
+ }
+#elif BOOST_WORKAROUND(BOOST_MSVC, > 1500)
+ //
+ // MSVC 10 will either emit warnings or else refuse to compile
+ // code that makes perfectly legitimate use of std::copy, when
+ // the OutputIterator type is a user-defined class (apparently all user
+ // defined iterators are "unsafe"). What's more Microsoft have removed their
+ // non-standard "unchecked" versions, even though their still in the MS
+ // documentation!! Work around this as best we can:
+ //
+ template<class InputIterator, class OutputIterator>
+ inline OutputIterator copy(
+ InputIterator first,
+ InputIterator last,
+ OutputIterator dest
+ )
+ {
+ while(first != last)
+ *dest++ = *first++;
+ return dest;
+ }
+ template<class InputIterator1, class InputIterator2>
+ inline bool equal(
+ InputIterator1 first,
+ InputIterator1 last,
+ InputIterator2 with
+ )
+ {
+ while(first != last)
+ if(*first++ != *with++) return false;
+ return true;
+ }
+#else
+ using std::copy;
+ using std::equal;
+#endif
+#if BOOST_WORKAROUND(BOOST_MSVC,>=1400) && defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__
+
+ // use safe versions of strcpy etc:
+ using ::strcpy_s;
+ using ::strcat_s;
+#else
+ inline std::size_t strcpy_s(
+ char *strDestination,
+ std::size_t sizeInBytes,
+ const char *strSource
+ )
+ {
+ std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
+ if (lenSourceWithNull > sizeInBytes)
+ return 1;
+ std::memcpy(strDestination, strSource, lenSourceWithNull);
+ return 0;
+ }
+ inline std::size_t strcat_s(
+ char *strDestination,
+ std::size_t sizeInBytes,
+ const char *strSource
+ )
+ {
+ std::size_t lenSourceWithNull = std::strlen(strSource) + 1;
+ std::size_t lenDestination = std::strlen(strDestination);
+ if (lenSourceWithNull + lenDestination > sizeInBytes)
+ return 1;
+ std::memcpy(strDestination + lenDestination, strSource, lenSourceWithNull);
+ return 0;
+ }
+
+#endif
+
+ inline void overflow_error_if_not_zero(std::size_t i)
+ {
+ if(i)
+ {
+ std::overflow_error e("String buffer too small");
+ boost::throw_exception(e);
+ }
+ }
+
+}} // namespaces
+
+#endif // __cplusplus
+
+#endif // include guard
+
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/states.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/states.hpp
index b56d013476a..b56d013476a 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/states.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/states.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/sub_match.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/sub_match.hpp
index ff8a8e467ba..ff8a8e467ba 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/sub_match.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/sub_match.hpp
diff --git a/src/third_party/boost-1.68.0/boost/regex/v4/syntax_type.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/syntax_type.hpp
index 3efdf0b0f93..3efdf0b0f93 100644
--- a/src/third_party/boost-1.68.0/boost/regex/v4/syntax_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/syntax_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/u32regex_iterator.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/u32regex_iterator.hpp
new file mode 100644
index 00000000000..f8763a8d6a8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/u32regex_iterator.hpp
@@ -0,0 +1,185 @@
+/*
+ *
+ * Copyright (c) 2003
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE u32regex_iterator.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Provides u32regex_iterator implementation.
+ */
+
+#ifndef BOOST_REGEX_V4_U32REGEX_ITERATOR_HPP
+#define BOOST_REGEX_V4_U32REGEX_ITERATOR_HPP
+
+namespace boost{
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+
+template <class BidirectionalIterator>
+class u32regex_iterator_implementation
+{
+ typedef u32regex regex_type;
+
+ match_results<BidirectionalIterator> what; // current match
+ BidirectionalIterator base; // start of sequence
+ BidirectionalIterator end; // end of sequence
+ const regex_type re; // the expression
+ match_flag_type flags; // flags for matching
+
+public:
+ u32regex_iterator_implementation(const regex_type* p, BidirectionalIterator last, match_flag_type f)
+ : base(), end(last), re(*p), flags(f){}
+ bool init(BidirectionalIterator first)
+ {
+ base = first;
+ return u32regex_search(first, end, what, re, flags, base);
+ }
+ bool compare(const u32regex_iterator_implementation& that)
+ {
+ if(this == &that) return true;
+ return (&re.get_data() == &that.re.get_data()) && (end == that.end) && (flags == that.flags) && (what[0].first == that.what[0].first) && (what[0].second == that.what[0].second);
+ }
+ const match_results<BidirectionalIterator>& get()
+ { return what; }
+ bool next()
+ {
+ //if(what.prefix().first != what[0].second)
+ // flags |= match_prev_avail;
+ BidirectionalIterator next_start = what[0].second;
+ match_flag_type f(flags);
+ if(!what.length())
+ f |= regex_constants::match_not_initial_null;
+ //if(base != next_start)
+ // f |= regex_constants::match_not_bob;
+ bool result = u32regex_search(next_start, end, what, re, f, base);
+ if(result)
+ what.set_base(base);
+ return result;
+ }
+private:
+ u32regex_iterator_implementation& operator=(const u32regex_iterator_implementation&);
+};
+
+template <class BidirectionalIterator>
+class u32regex_iterator
+{
+private:
+ typedef u32regex_iterator_implementation<BidirectionalIterator> impl;
+ typedef shared_ptr<impl> pimpl;
+public:
+ typedef u32regex regex_type;
+ typedef match_results<BidirectionalIterator> value_type;
+ typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type
+ difference_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
+ typedef std::forward_iterator_tag iterator_category;
+
+ u32regex_iterator(){}
+ u32regex_iterator(BidirectionalIterator a, BidirectionalIterator b,
+ const regex_type& re,
+ match_flag_type m = match_default)
+ : pdata(new impl(&re, b, m))
+ {
+ if(!pdata->init(a))
+ {
+ pdata.reset();
+ }
+ }
+ u32regex_iterator(const u32regex_iterator& that)
+ : pdata(that.pdata) {}
+ u32regex_iterator& operator=(const u32regex_iterator& that)
+ {
+ pdata = that.pdata;
+ return *this;
+ }
+ bool operator==(const u32regex_iterator& that)const
+ {
+ if((pdata.get() == 0) || (that.pdata.get() == 0))
+ return pdata.get() == that.pdata.get();
+ return pdata->compare(*(that.pdata.get()));
+ }
+ bool operator!=(const u32regex_iterator& that)const
+ { return !(*this == that); }
+ const value_type& operator*()const
+ { return pdata->get(); }
+ const value_type* operator->()const
+ { return &(pdata->get()); }
+ u32regex_iterator& operator++()
+ {
+ cow();
+ if(0 == pdata->next())
+ {
+ pdata.reset();
+ }
+ return *this;
+ }
+ u32regex_iterator operator++(int)
+ {
+ u32regex_iterator result(*this);
+ ++(*this);
+ return result;
+ }
+private:
+
+ pimpl pdata;
+
+ void cow()
+ {
+ // copy-on-write
+ if(pdata.get() && !pdata.unique())
+ {
+ pdata.reset(new impl(*(pdata.get())));
+ }
+ }
+};
+
+typedef u32regex_iterator<const char*> utf8regex_iterator;
+typedef u32regex_iterator<const UChar*> utf16regex_iterator;
+typedef u32regex_iterator<const UChar32*> utf32regex_iterator;
+
+inline u32regex_iterator<const char*> make_u32regex_iterator(const char* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_iterator<const char*>(p, p+std::strlen(p), e, m);
+}
+#ifndef BOOST_NO_WREGEX
+inline u32regex_iterator<const wchar_t*> make_u32regex_iterator(const wchar_t* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_iterator<const wchar_t*>(p, p+std::wcslen(p), e, m);
+}
+#endif
+#if !defined(BOOST_REGEX_UCHAR_IS_WCHAR_T)
+inline u32regex_iterator<const UChar*> make_u32regex_iterator(const UChar* p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_iterator<const UChar*>(p, p+u_strlen(p), e, m);
+}
+#endif
+template <class charT, class Traits, class Alloc>
+inline u32regex_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
+ return u32regex_iterator<iter_type>(p.begin(), p.end(), e, m);
+}
+inline u32regex_iterator<const UChar*> make_u32regex_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, m);
+}
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_V4_REGEX_ITERATOR_HPP
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/u32regex_token_iterator.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/u32regex_token_iterator.hpp
new file mode 100644
index 00000000000..952f7c4135f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/u32regex_token_iterator.hpp
@@ -0,0 +1,360 @@
+/*
+ *
+ * Copyright (c) 2003
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE u32regex_token_iterator.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Provides u32regex_token_iterator implementation.
+ */
+
+#ifndef BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP
+#define BOOST_REGEX_V4_U32REGEX_TOKEN_ITERATOR_HPP
+
+#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
+ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003))
+//
+// Borland C++ Builder 6, and Visual C++ 6,
+// can't cope with the array template constructor
+// so we have a template member that will accept any type as
+// argument, and then assert that is really is an array:
+//
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_array.hpp>
+#endif
+
+namespace boost{
+
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable:4700)
+#endif
+
+template <class BidirectionalIterator>
+class u32regex_token_iterator_implementation
+{
+ typedef u32regex regex_type;
+ typedef sub_match<BidirectionalIterator> value_type;
+
+ match_results<BidirectionalIterator> what; // current match
+ BidirectionalIterator end; // end of search area
+ BidirectionalIterator base; // start of search area
+ const regex_type re; // the expression
+ match_flag_type flags; // match flags
+ value_type result; // the current string result
+ int N; // the current sub-expression being enumerated
+ std::vector<int> subs; // the sub-expressions to enumerate
+
+public:
+ u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, int sub, match_flag_type f)
+ : end(last), re(*p), flags(f){ subs.push_back(sub); }
+ u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const std::vector<int>& v, match_flag_type f)
+ : end(last), re(*p), flags(f), subs(v){}
+#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
+ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
+ || BOOST_WORKAROUND(__HP_aCC, < 60700)
+ template <class T>
+ u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const T& submatches, match_flag_type f)
+ : end(last), re(*p), flags(f)
+ {
+ // assert that T really is an array:
+ BOOST_STATIC_ASSERT(::boost::is_array<T>::value);
+ const std::size_t array_size = sizeof(T) / sizeof(submatches[0]);
+ for(std::size_t i = 0; i < array_size; ++i)
+ {
+ subs.push_back(submatches[i]);
+ }
+ }
+#else
+ template <std::size_t CN>
+ u32regex_token_iterator_implementation(const regex_type* p, BidirectionalIterator last, const int (&submatches)[CN], match_flag_type f)
+ : end(last), re(*p), flags(f)
+ {
+ for(std::size_t i = 0; i < CN; ++i)
+ {
+ subs.push_back(submatches[i]);
+ }
+ }
+#endif
+
+ bool init(BidirectionalIterator first)
+ {
+ base = first;
+ N = 0;
+ if(u32regex_search(first, end, what, re, flags, base) == true)
+ {
+ N = 0;
+ result = ((subs[N] == -1) ? what.prefix() : what[(int)subs[N]]);
+ return true;
+ }
+ else if((subs[N] == -1) && (first != end))
+ {
+ result.first = first;
+ result.second = end;
+ result.matched = (first != end);
+ N = -1;
+ return true;
+ }
+ return false;
+ }
+ bool compare(const u32regex_token_iterator_implementation& that)
+ {
+ if(this == &that) return true;
+ return (&re.get_data() == &that.re.get_data())
+ && (end == that.end)
+ && (flags == that.flags)
+ && (N == that.N)
+ && (what[0].first == that.what[0].first)
+ && (what[0].second == that.what[0].second);
+ }
+ const value_type& get()
+ { return result; }
+ bool next()
+ {
+ if(N == -1)
+ return false;
+ if(N+1 < (int)subs.size())
+ {
+ ++N;
+ result =((subs[N] == -1) ? what.prefix() : what[subs[N]]);
+ return true;
+ }
+ //if(what.prefix().first != what[0].second)
+ // flags |= match_prev_avail | regex_constants::match_not_bob;
+ BidirectionalIterator last_end(what[0].second);
+ if(u32regex_search(last_end, end, what, re, ((what[0].first == what[0].second) ? flags | regex_constants::match_not_initial_null : flags), base))
+ {
+ N =0;
+ result =((subs[N] == -1) ? what.prefix() : what[subs[N]]);
+ return true;
+ }
+ else if((last_end != end) && (subs[0] == -1))
+ {
+ N =-1;
+ result.first = last_end;
+ result.second = end;
+ result.matched = (last_end != end);
+ return true;
+ }
+ return false;
+ }
+private:
+ u32regex_token_iterator_implementation& operator=(const u32regex_token_iterator_implementation&);
+};
+
+template <class BidirectionalIterator>
+class u32regex_token_iterator
+{
+private:
+ typedef u32regex_token_iterator_implementation<BidirectionalIterator> impl;
+ typedef shared_ptr<impl> pimpl;
+public:
+ typedef u32regex regex_type;
+ typedef sub_match<BidirectionalIterator> value_type;
+ typedef typename BOOST_REGEX_DETAIL_NS::regex_iterator_traits<BidirectionalIterator>::difference_type
+ difference_type;
+ typedef const value_type* pointer;
+ typedef const value_type& reference;
+ typedef std::forward_iterator_tag iterator_category;
+
+ u32regex_token_iterator(){}
+ u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
+ int submatch = 0, match_flag_type m = match_default)
+ : pdata(new impl(&re, b, submatch, m))
+ {
+ if(!pdata->init(a))
+ pdata.reset();
+ }
+ u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
+ const std::vector<int>& submatches, match_flag_type m = match_default)
+ : pdata(new impl(&re, b, submatches, m))
+ {
+ if(!pdata->init(a))
+ pdata.reset();
+ }
+#if (BOOST_WORKAROUND(__BORLANDC__, >= 0x560) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x570)))\
+ || BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3003)) \
+ || BOOST_WORKAROUND(__HP_aCC, < 60700)
+ template <class T>
+ u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
+ const T& submatches, match_flag_type m = match_default)
+ : pdata(new impl(&re, b, submatches, m))
+ {
+ if(!pdata->init(a))
+ pdata.reset();
+ }
+#else
+ template <std::size_t N>
+ u32regex_token_iterator(BidirectionalIterator a, BidirectionalIterator b, const regex_type& re,
+ const int (&submatches)[N], match_flag_type m = match_default)
+ : pdata(new impl(&re, b, submatches, m))
+ {
+ if(!pdata->init(a))
+ pdata.reset();
+ }
+#endif
+ u32regex_token_iterator(const u32regex_token_iterator& that)
+ : pdata(that.pdata) {}
+ u32regex_token_iterator& operator=(const u32regex_token_iterator& that)
+ {
+ pdata = that.pdata;
+ return *this;
+ }
+ bool operator==(const u32regex_token_iterator& that)const
+ {
+ if((pdata.get() == 0) || (that.pdata.get() == 0))
+ return pdata.get() == that.pdata.get();
+ return pdata->compare(*(that.pdata.get()));
+ }
+ bool operator!=(const u32regex_token_iterator& that)const
+ { return !(*this == that); }
+ const value_type& operator*()const
+ { return pdata->get(); }
+ const value_type* operator->()const
+ { return &(pdata->get()); }
+ u32regex_token_iterator& operator++()
+ {
+ cow();
+ if(0 == pdata->next())
+ {
+ pdata.reset();
+ }
+ return *this;
+ }
+ u32regex_token_iterator operator++(int)
+ {
+ u32regex_token_iterator result(*this);
+ ++(*this);
+ return result;
+ }
+private:
+
+ pimpl pdata;
+
+ void cow()
+ {
+ // copy-on-write
+ if(pdata.get() && !pdata.unique())
+ {
+ pdata.reset(new impl(*(pdata.get())));
+ }
+ }
+};
+
+typedef u32regex_token_iterator<const char*> utf8regex_token_iterator;
+typedef u32regex_token_iterator<const UChar*> utf16regex_token_iterator;
+typedef u32regex_token_iterator<const UChar32*> utf32regex_token_iterator;
+
+// construction from an integral sub_match state_id:
+inline u32regex_token_iterator<const char*> make_u32regex_token_iterator(const char* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const char*>(p, p+std::strlen(p), e, submatch, m);
+}
+#ifndef BOOST_NO_WREGEX
+inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
+}
+#endif
+#if !defined(BOOST_REGEX_UCHAR_IS_WCHAR_T)
+inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, submatch, m);
+}
+#endif
+template <class charT, class Traits, class Alloc>
+inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
+ return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m);
+}
+inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, int submatch = 0, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
+}
+
+// construction from a reference to an array:
+template <std::size_t N>
+inline u32regex_token_iterator<const char*> make_u32regex_token_iterator(const char* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const char*>(p, p+std::strlen(p), e, submatch, m);
+}
+#ifndef BOOST_NO_WREGEX
+template <std::size_t N>
+inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
+}
+#endif
+#if !defined(BOOST_REGEX_UCHAR_IS_WCHAR_T)
+template <std::size_t N>
+inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, submatch, m);
+}
+#endif
+template <class charT, class Traits, class Alloc, std::size_t N>
+inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
+ return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m);
+}
+template <std::size_t N>
+inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const int (&submatch)[N], regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
+}
+
+// construction from a vector of sub_match state_id's:
+inline u32regex_token_iterator<const char*> make_u32regex_token_iterator(const char* p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const char*>(p, p+std::strlen(p), e, submatch, m);
+}
+#ifndef BOOST_NO_WREGEX
+inline u32regex_token_iterator<const wchar_t*> make_u32regex_token_iterator(const wchar_t* p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const wchar_t*>(p, p+std::wcslen(p), e, submatch, m);
+}
+#endif
+#if !defined(U_WCHAR_IS_UTF16) && (U_SIZEOF_WCHAR_T != 2)
+inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const UChar* p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const UChar*>(p, p+u_strlen(p), e, submatch, m);
+}
+#endif
+template <class charT, class Traits, class Alloc>
+inline u32regex_token_iterator<typename std::basic_string<charT, Traits, Alloc>::const_iterator> make_u32regex_token_iterator(const std::basic_string<charT, Traits, Alloc>& p, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ typedef typename std::basic_string<charT, Traits, Alloc>::const_iterator iter_type;
+ return u32regex_token_iterator<iter_type>(p.begin(), p.end(), e, submatch, m);
+}
+inline u32regex_token_iterator<const UChar*> make_u32regex_token_iterator(const U_NAMESPACE_QUALIFIER UnicodeString& s, const u32regex& e, const std::vector<int>& submatch, regex_constants::match_flag_type m = regex_constants::match_default)
+{
+ return u32regex_token_iterator<const UChar*>(s.getBuffer(), s.getBuffer() + s.length(), e, submatch, m);
+}
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+
+} // namespace boost
+
+#endif // BOOST_REGEX_V4_REGEX_TOKEN_ITERATOR_HPP
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/boost/regex/v4/w32_regex_traits.hpp b/src/third_party/boost-1.69.0/boost/regex/v4/w32_regex_traits.hpp
new file mode 100644
index 00000000000..378ee8565e1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/regex/v4/w32_regex_traits.hpp
@@ -0,0 +1,745 @@
+/*
+ *
+ * Copyright (c) 2004
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE w32_regex_traits.hpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Declares regular expression traits class w32_regex_traits.
+ */
+
+#ifndef BOOST_W32_REGEX_TRAITS_HPP_INCLUDED
+#define BOOST_W32_REGEX_TRAITS_HPP_INCLUDED
+
+#ifndef BOOST_REGEX_NO_WIN32_LOCALE
+
+#ifndef BOOST_RE_PAT_EXCEPT_HPP
+#include <boost/regex/pattern_except.hpp>
+#endif
+#ifndef BOOST_REGEX_TRAITS_DEFAULTS_HPP_INCLUDED
+#include <boost/regex/v4/regex_traits_defaults.hpp>
+#endif
+#ifdef BOOST_HAS_THREADS
+#include <boost/regex/pending/static_mutex.hpp>
+#endif
+#ifndef BOOST_REGEX_PRIMARY_TRANSFORM
+#include <boost/regex/v4/primary_transform.hpp>
+#endif
+#ifndef BOOST_REGEX_OBJECT_CACHE_HPP
+#include <boost/regex/pending/object_cache.hpp>
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_PREFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4786)
+#if BOOST_MSVC < 1910
+#pragma warning(disable:4800)
+#endif
+#endif
+
+namespace boost{
+
+//
+// forward declaration is needed by some compilers:
+//
+template <class charT>
+class w32_regex_traits;
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+//
+// start by typedeffing the types we'll need:
+//
+typedef ::boost::uint32_t lcid_type; // placeholder for LCID.
+typedef ::boost::shared_ptr<void> cat_type; // placeholder for dll HANDLE.
+
+//
+// then add wrappers around the actual Win32 API's (ie implementation hiding):
+//
+BOOST_REGEX_DECL lcid_type BOOST_REGEX_CALL w32_get_default_locale();
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(char, lcid_type);
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(wchar_t, lcid_type);
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_lower(unsigned short ca, lcid_type state_id);
+#endif
+#endif
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(char, lcid_type);
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(wchar_t, lcid_type);
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is_upper(unsigned short ca, lcid_type state_id);
+#endif
+#endif
+BOOST_REGEX_DECL cat_type BOOST_REGEX_CALL w32_cat_open(const std::string& name);
+BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::string& def);
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type state_id, int i, const std::wstring& def);
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL std::basic_string<unsigned short> BOOST_REGEX_CALL w32_cat_get(const cat_type& cat, lcid_type, int i, const std::basic_string<unsigned short>& def);
+#endif
+#endif
+BOOST_REGEX_DECL std::string BOOST_REGEX_CALL w32_transform(lcid_type state_id, const char* p1, const char* p2);
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL std::wstring BOOST_REGEX_CALL w32_transform(lcid_type state_id, const wchar_t* p1, const wchar_t* p2);
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL std::basic_string<unsigned short> BOOST_REGEX_CALL w32_transform(lcid_type state_id, const unsigned short* p1, const unsigned short* p2);
+#endif
+#endif
+BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_tolower(char c, lcid_type);
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_tolower(wchar_t c, lcid_type);
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL unsigned short BOOST_REGEX_CALL w32_tolower(unsigned short c, lcid_type state_id);
+#endif
+#endif
+BOOST_REGEX_DECL char BOOST_REGEX_CALL w32_toupper(char c, lcid_type);
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL wchar_t BOOST_REGEX_CALL w32_toupper(wchar_t c, lcid_type);
+#endif
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, char c);
+#ifndef BOOST_NO_WREGEX
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type, boost::uint32_t mask, wchar_t c);
+#ifdef BOOST_REGEX_HAS_OTHER_WCHAR_T
+BOOST_REGEX_DECL bool BOOST_REGEX_CALL w32_is(lcid_type state_id, boost::uint32_t m, unsigned short c);
+#endif
+#endif
+//
+// class w32_regex_traits_base:
+// acts as a container for locale and the facets we are using.
+//
+template <class charT>
+struct w32_regex_traits_base
+{
+ w32_regex_traits_base(lcid_type l)
+ { imbue(l); }
+ lcid_type imbue(lcid_type l);
+
+ lcid_type m_locale;
+};
+
+template <class charT>
+inline lcid_type w32_regex_traits_base<charT>::imbue(lcid_type l)
+{
+ lcid_type result(m_locale);
+ m_locale = l;
+ return result;
+}
+
+//
+// class w32_regex_traits_char_layer:
+// implements methods that require specialisation for narrow characters:
+//
+template <class charT>
+class w32_regex_traits_char_layer : public w32_regex_traits_base<charT>
+{
+ typedef std::basic_string<charT> string_type;
+ typedef std::map<charT, regex_constants::syntax_type> map_type;
+ typedef typename map_type::const_iterator map_iterator_type;
+public:
+ w32_regex_traits_char_layer(const lcid_type l);
+
+ regex_constants::syntax_type syntax_type(charT c)const
+ {
+ map_iterator_type i = m_char_map.find(c);
+ return ((i == m_char_map.end()) ? 0 : i->second);
+ }
+ regex_constants::escape_syntax_type escape_syntax_type(charT c) const
+ {
+ map_iterator_type i = m_char_map.find(c);
+ if(i == m_char_map.end())
+ {
+ if(::boost::BOOST_REGEX_DETAIL_NS::w32_is_lower(c, this->m_locale)) return regex_constants::escape_type_class;
+ if(::boost::BOOST_REGEX_DETAIL_NS::w32_is_upper(c, this->m_locale)) return regex_constants::escape_type_not_class;
+ return 0;
+ }
+ return i->second;
+ }
+ charT tolower(charT c)const
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::w32_tolower(c, this->m_locale);
+ }
+ bool isctype(boost::uint32_t mask, charT c)const
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::w32_is(this->m_locale, mask, c);
+ }
+
+private:
+ string_type get_default_message(regex_constants::syntax_type);
+ // TODO: use a hash table when available!
+ map_type m_char_map;
+};
+
+template <class charT>
+w32_regex_traits_char_layer<charT>::w32_regex_traits_char_layer(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l)
+ : w32_regex_traits_base<charT>(l)
+{
+ // we need to start by initialising our syntax map so we know which
+ // character is used for which purpose:
+ cat_type cat;
+ std::string cat_name(w32_regex_traits<charT>::get_catalog_name());
+ if(cat_name.size())
+ {
+ cat = ::boost::BOOST_REGEX_DETAIL_NS::w32_cat_open(cat_name);
+ if(!cat)
+ {
+ std::string m("Unable to open message catalog: ");
+ std::runtime_error err(m + cat_name);
+ boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
+ }
+ }
+ //
+ // if we have a valid catalog then load our messages:
+ //
+ if(cat)
+ {
+ for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i)
+ {
+ string_type mss = ::boost::BOOST_REGEX_DETAIL_NS::w32_cat_get(cat, this->m_locale, i, get_default_message(i));
+ for(typename string_type::size_type j = 0; j < mss.size(); ++j)
+ {
+ this->m_char_map[mss[j]] = i;
+ }
+ }
+ }
+ else
+ {
+ for(regex_constants::syntax_type i = 1; i < regex_constants::syntax_max; ++i)
+ {
+ const char* ptr = get_default_syntax(i);
+ while(ptr && *ptr)
+ {
+ this->m_char_map[static_cast<charT>(*ptr)] = i;
+ ++ptr;
+ }
+ }
+ }
+}
+
+template <class charT>
+typename w32_regex_traits_char_layer<charT>::string_type
+ w32_regex_traits_char_layer<charT>::get_default_message(regex_constants::syntax_type i)
+{
+ const char* ptr = get_default_syntax(i);
+ string_type result;
+ while(ptr && *ptr)
+ {
+ result.append(1, static_cast<charT>(*ptr));
+ ++ptr;
+ }
+ return result;
+}
+
+//
+// specialised version for narrow characters:
+//
+template <>
+class BOOST_REGEX_DECL w32_regex_traits_char_layer<char> : public w32_regex_traits_base<char>
+{
+ typedef std::string string_type;
+public:
+ w32_regex_traits_char_layer(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l)
+ : w32_regex_traits_base<char>(l)
+ {
+ init();
+ }
+
+ regex_constants::syntax_type syntax_type(char c)const
+ {
+ return m_char_map[static_cast<unsigned char>(c)];
+ }
+ regex_constants::escape_syntax_type escape_syntax_type(char c) const
+ {
+ return m_char_map[static_cast<unsigned char>(c)];
+ }
+ char tolower(char c)const
+ {
+ return m_lower_map[static_cast<unsigned char>(c)];
+ }
+ bool isctype(boost::uint32_t mask, char c)const
+ {
+ return m_type_map[static_cast<unsigned char>(c)] & mask;
+ }
+
+private:
+ regex_constants::syntax_type m_char_map[1u << CHAR_BIT];
+ char m_lower_map[1u << CHAR_BIT];
+ boost::uint16_t m_type_map[1u << CHAR_BIT];
+ void init();
+};
+
+//
+// class w32_regex_traits_implementation:
+// provides pimpl implementation for w32_regex_traits.
+//
+template <class charT>
+class w32_regex_traits_implementation : public w32_regex_traits_char_layer<charT>
+{
+public:
+ typedef typename w32_regex_traits<charT>::char_class_type char_class_type;
+ BOOST_STATIC_CONSTANT(char_class_type, mask_word = 0x0400); // must be C1_DEFINED << 1
+ BOOST_STATIC_CONSTANT(char_class_type, mask_unicode = 0x0800); // must be C1_DEFINED << 2
+ BOOST_STATIC_CONSTANT(char_class_type, mask_horizontal = 0x1000); // must be C1_DEFINED << 3
+ BOOST_STATIC_CONSTANT(char_class_type, mask_vertical = 0x2000); // must be C1_DEFINED << 4
+ BOOST_STATIC_CONSTANT(char_class_type, mask_base = 0x3ff); // all the masks used by the CT_CTYPE1 group
+
+ typedef std::basic_string<charT> string_type;
+ typedef charT char_type;
+ w32_regex_traits_implementation(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l);
+ std::string error_string(regex_constants::error_type n) const
+ {
+ if(!m_error_strings.empty())
+ {
+ std::map<int, std::string>::const_iterator p = m_error_strings.find(n);
+ return (p == m_error_strings.end()) ? std::string(get_default_error_string(n)) : p->second;
+ }
+ return get_default_error_string(n);
+ }
+ char_class_type lookup_classname(const charT* p1, const charT* p2) const
+ {
+ char_class_type result = lookup_classname_imp(p1, p2);
+ if(result == 0)
+ {
+ typedef typename string_type::size_type size_type;
+ string_type temp(p1, p2);
+ for(size_type i = 0; i < temp.size(); ++i)
+ temp[i] = this->tolower(temp[i]);
+ result = lookup_classname_imp(&*temp.begin(), &*temp.begin() + temp.size());
+ }
+ return result;
+ }
+ string_type lookup_collatename(const charT* p1, const charT* p2) const;
+ string_type transform_primary(const charT* p1, const charT* p2) const;
+ string_type transform(const charT* p1, const charT* p2) const
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::w32_transform(this->m_locale, p1, p2);
+ }
+private:
+ std::map<int, std::string> m_error_strings; // error messages indexed by numberic ID
+ std::map<string_type, char_class_type> m_custom_class_names; // character class names
+ std::map<string_type, string_type> m_custom_collate_names; // collating element names
+ unsigned m_collate_type; // the form of the collation string
+ charT m_collate_delim; // the collation group delimiter
+ //
+ // helpers:
+ //
+ char_class_type lookup_classname_imp(const charT* p1, const charT* p2) const;
+};
+
+template <class charT>
+typename w32_regex_traits_implementation<charT>::string_type
+ w32_regex_traits_implementation<charT>::transform_primary(const charT* p1, const charT* p2) const
+{
+ string_type result;
+ //
+ // What we do here depends upon the format of the sort key returned by
+ // sort key returned by this->transform:
+ //
+ switch(m_collate_type)
+ {
+ case sort_C:
+ case sort_unknown:
+ // the best we can do is translate to lower case, then get a regular sort key:
+ {
+ result.assign(p1, p2);
+ typedef typename string_type::size_type size_type;
+ for(size_type i = 0; i < result.size(); ++i)
+ result[i] = this->tolower(result[i]);
+ result = this->transform(&*result.begin(), &*result.begin() + result.size());
+ break;
+ }
+ case sort_fixed:
+ {
+ // get a regular sort key, and then truncate it:
+ result.assign(this->transform(p1, p2));
+ result.erase(this->m_collate_delim);
+ break;
+ }
+ case sort_delim:
+ // get a regular sort key, and then truncate everything after the delim:
+ result.assign(this->transform(p1, p2));
+ std::size_t i;
+ for(i = 0; i < result.size(); ++i)
+ {
+ if(result[i] == m_collate_delim)
+ break;
+ }
+ result.erase(i);
+ break;
+ }
+ if(result.empty())
+ result = string_type(1, charT(0));
+ return result;
+}
+
+template <class charT>
+typename w32_regex_traits_implementation<charT>::string_type
+ w32_regex_traits_implementation<charT>::lookup_collatename(const charT* p1, const charT* p2) const
+{
+ typedef typename std::map<string_type, string_type>::const_iterator iter_type;
+ if(m_custom_collate_names.size())
+ {
+ iter_type pos = m_custom_collate_names.find(string_type(p1, p2));
+ if(pos != m_custom_collate_names.end())
+ return pos->second;
+ }
+#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
+ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
+ std::string name(p1, p2);
+#else
+ std::string name;
+ const charT* p0 = p1;
+ while(p0 != p2)
+ name.append(1, char(*p0++));
+#endif
+ name = lookup_default_collate_name(name);
+#if !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
+ && !BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
+ if(name.size())
+ return string_type(name.begin(), name.end());
+#else
+ if(name.size())
+ {
+ string_type result;
+ typedef std::string::const_iterator iter;
+ iter b = name.begin();
+ iter e = name.end();
+ while(b != e)
+ result.append(1, charT(*b++));
+ return result;
+ }
+#endif
+ if(p2 - p1 == 1)
+ return string_type(1, *p1);
+ return string_type();
+}
+
+template <class charT>
+w32_regex_traits_implementation<charT>::w32_regex_traits_implementation(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l)
+: w32_regex_traits_char_layer<charT>(l)
+{
+ cat_type cat;
+ std::string cat_name(w32_regex_traits<charT>::get_catalog_name());
+ if(cat_name.size())
+ {
+ cat = ::boost::BOOST_REGEX_DETAIL_NS::w32_cat_open(cat_name);
+ if(!cat)
+ {
+ std::string m("Unable to open message catalog: ");
+ std::runtime_error err(m + cat_name);
+ boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
+ }
+ }
+ //
+ // if we have a valid catalog then load our messages:
+ //
+ if(cat)
+ {
+ //
+ // Error messages:
+ //
+ for(boost::regex_constants::error_type i = static_cast<boost::regex_constants::error_type>(0);
+ i <= boost::regex_constants::error_unknown;
+ i = static_cast<boost::regex_constants::error_type>(i + 1))
+ {
+ const char* p = get_default_error_string(i);
+ string_type default_message;
+ while(*p)
+ {
+ default_message.append(1, static_cast<charT>(*p));
+ ++p;
+ }
+ string_type s = ::boost::BOOST_REGEX_DETAIL_NS::w32_cat_get(cat, this->m_locale, i+200, default_message);
+ std::string result;
+ for(std::string::size_type j = 0; j < s.size(); ++j)
+ {
+ result.append(1, static_cast<char>(s[j]));
+ }
+ m_error_strings[i] = result;
+ }
+ //
+ // Custom class names:
+ //
+ static const char_class_type masks[14] =
+ {
+ 0x0104u, // C1_ALPHA | C1_DIGIT
+ 0x0100u, // C1_ALPHA
+ 0x0020u, // C1_CNTRL
+ 0x0004u, // C1_DIGIT
+ (~(0x0020u|0x0008u) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE
+ 0x0002u, // C1_LOWER
+ (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL
+ 0x0010u, // C1_PUNCT
+ 0x0008u, // C1_SPACE
+ 0x0001u, // C1_UPPER
+ 0x0080u, // C1_XDIGIT
+ 0x0040u, // C1_BLANK
+ w32_regex_traits_implementation<charT>::mask_word,
+ w32_regex_traits_implementation<charT>::mask_unicode,
+ };
+ static const string_type null_string;
+ for(unsigned int j = 0; j <= 13; ++j)
+ {
+ string_type s(::boost::BOOST_REGEX_DETAIL_NS::w32_cat_get(cat, this->m_locale, j+300, null_string));
+ if(s.size())
+ this->m_custom_class_names[s] = masks[j];
+ }
+ }
+ //
+ // get the collation format used by m_pcollate:
+ //
+ m_collate_type = BOOST_REGEX_DETAIL_NS::find_sort_syntax(this, &m_collate_delim);
+}
+
+template <class charT>
+typename w32_regex_traits_implementation<charT>::char_class_type
+ w32_regex_traits_implementation<charT>::lookup_classname_imp(const charT* p1, const charT* p2) const
+{
+ static const char_class_type masks[22] =
+ {
+ 0,
+ 0x0104u, // C1_ALPHA | C1_DIGIT
+ 0x0100u, // C1_ALPHA
+ 0x0040u, // C1_BLANK
+ 0x0020u, // C1_CNTRL
+ 0x0004u, // C1_DIGIT
+ 0x0004u, // C1_DIGIT
+ (~(0x0020u|0x0008u|0x0040) & 0x01ffu) | 0x0400u, // not C1_CNTRL or C1_SPACE or C1_BLANK
+ w32_regex_traits_implementation<charT>::mask_horizontal,
+ 0x0002u, // C1_LOWER
+ 0x0002u, // C1_LOWER
+ (~0x0020u & 0x01ffu) | 0x0400, // not C1_CNTRL
+ 0x0010u, // C1_PUNCT
+ 0x0008u, // C1_SPACE
+ 0x0008u, // C1_SPACE
+ 0x0001u, // C1_UPPER
+ w32_regex_traits_implementation<charT>::mask_unicode,
+ 0x0001u, // C1_UPPER
+ w32_regex_traits_implementation<charT>::mask_vertical,
+ 0x0104u | w32_regex_traits_implementation<charT>::mask_word,
+ 0x0104u | w32_regex_traits_implementation<charT>::mask_word,
+ 0x0080u, // C1_XDIGIT
+ };
+ if(m_custom_class_names.size())
+ {
+ typedef typename std::map<std::basic_string<charT>, char_class_type>::const_iterator map_iter;
+ map_iter pos = m_custom_class_names.find(string_type(p1, p2));
+ if(pos != m_custom_class_names.end())
+ return pos->second;
+ }
+ std::size_t state_id = 1 + BOOST_REGEX_DETAIL_NS::get_default_class_id(p1, p2);
+ if(state_id < sizeof(masks) / sizeof(masks[0]))
+ return masks[state_id];
+ return masks[0];
+}
+
+
+template <class charT>
+boost::shared_ptr<const w32_regex_traits_implementation<charT> > create_w32_regex_traits(::boost::BOOST_REGEX_DETAIL_NS::lcid_type l)
+{
+ // TODO: create a cache for previously constructed objects.
+ return boost::object_cache< ::boost::BOOST_REGEX_DETAIL_NS::lcid_type, w32_regex_traits_implementation<charT> >::get(l, 5);
+}
+
+} // BOOST_REGEX_DETAIL_NS
+
+template <class charT>
+class w32_regex_traits
+{
+public:
+ typedef charT char_type;
+ typedef std::size_t size_type;
+ typedef std::basic_string<char_type> string_type;
+ typedef ::boost::BOOST_REGEX_DETAIL_NS::lcid_type locale_type;
+ typedef boost::uint_least32_t char_class_type;
+
+ struct boost_extensions_tag{};
+
+ w32_regex_traits()
+ : m_pimpl(BOOST_REGEX_DETAIL_NS::create_w32_regex_traits<charT>(::boost::BOOST_REGEX_DETAIL_NS::w32_get_default_locale()))
+ { }
+ static size_type length(const char_type* p)
+ {
+ return std::char_traits<charT>::length(p);
+ }
+ regex_constants::syntax_type syntax_type(charT c)const
+ {
+ return m_pimpl->syntax_type(c);
+ }
+ regex_constants::escape_syntax_type escape_syntax_type(charT c) const
+ {
+ return m_pimpl->escape_syntax_type(c);
+ }
+ charT translate(charT c) const
+ {
+ return c;
+ }
+ charT translate_nocase(charT c) const
+ {
+ return this->m_pimpl->tolower(c);
+ }
+ charT translate(charT c, bool icase) const
+ {
+ return icase ? this->m_pimpl->tolower(c) : c;
+ }
+ charT tolower(charT c) const
+ {
+ return this->m_pimpl->tolower(c);
+ }
+ charT toupper(charT c) const
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::w32_toupper(c, this->m_pimpl->m_locale);
+ }
+ string_type transform(const charT* p1, const charT* p2) const
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::w32_transform(this->m_pimpl->m_locale, p1, p2);
+ }
+ string_type transform_primary(const charT* p1, const charT* p2) const
+ {
+ return m_pimpl->transform_primary(p1, p2);
+ }
+ char_class_type lookup_classname(const charT* p1, const charT* p2) const
+ {
+ return m_pimpl->lookup_classname(p1, p2);
+ }
+ string_type lookup_collatename(const charT* p1, const charT* p2) const
+ {
+ return m_pimpl->lookup_collatename(p1, p2);
+ }
+ bool isctype(charT c, char_class_type f) const
+ {
+ if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_base)
+ && (this->m_pimpl->isctype(f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_base, c)))
+ return true;
+ else if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_unicode) && BOOST_REGEX_DETAIL_NS::is_extended(c))
+ return true;
+ else if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_word) && (c == '_'))
+ return true;
+ else if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_vertical)
+ && (::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) || (c == '\v')))
+ return true;
+ else if((f & BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_horizontal)
+ && this->isctype(c, 0x0008u) && !this->isctype(c, BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT>::mask_vertical))
+ return true;
+ return false;
+ }
+ boost::intmax_t toi(const charT*& p1, const charT* p2, int radix)const
+ {
+ return ::boost::BOOST_REGEX_DETAIL_NS::global_toi(p1, p2, radix, *this);
+ }
+ int value(charT c, int radix)const
+ {
+ int result = (int)::boost::BOOST_REGEX_DETAIL_NS::global_value(c);
+ return result < radix ? result : -1;
+ }
+ locale_type imbue(locale_type l)
+ {
+ ::boost::BOOST_REGEX_DETAIL_NS::lcid_type result(getloc());
+ m_pimpl = BOOST_REGEX_DETAIL_NS::create_w32_regex_traits<charT>(l);
+ return result;
+ }
+ locale_type getloc()const
+ {
+ return m_pimpl->m_locale;
+ }
+ std::string error_string(regex_constants::error_type n) const
+ {
+ return m_pimpl->error_string(n);
+ }
+
+ //
+ // extension:
+ // set the name of the message catalog in use (defaults to "boost_regex").
+ //
+ static std::string catalog_name(const std::string& name);
+ static std::string get_catalog_name();
+
+private:
+ boost::shared_ptr<const BOOST_REGEX_DETAIL_NS::w32_regex_traits_implementation<charT> > m_pimpl;
+ //
+ // catalog name handler:
+ //
+ static std::string& get_catalog_name_inst();
+
+#ifdef BOOST_HAS_THREADS
+ static static_mutex& get_mutex_inst();
+#endif
+};
+
+template <class charT>
+std::string w32_regex_traits<charT>::catalog_name(const std::string& name)
+{
+#ifdef BOOST_HAS_THREADS
+ static_mutex::scoped_lock lk(get_mutex_inst());
+#endif
+ std::string result(get_catalog_name_inst());
+ get_catalog_name_inst() = name;
+ return result;
+}
+
+template <class charT>
+std::string& w32_regex_traits<charT>::get_catalog_name_inst()
+{
+ static std::string s_name;
+ return s_name;
+}
+
+template <class charT>
+std::string w32_regex_traits<charT>::get_catalog_name()
+{
+#ifdef BOOST_HAS_THREADS
+ static_mutex::scoped_lock lk(get_mutex_inst());
+#endif
+ std::string result(get_catalog_name_inst());
+ return result;
+}
+
+#ifdef BOOST_HAS_THREADS
+template <class charT>
+static_mutex& w32_regex_traits<charT>::get_mutex_inst()
+{
+ static static_mutex s_mutex = BOOST_STATIC_MUTEX_INIT;
+ return s_mutex;
+}
+#endif
+
+
+} // boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable: 4103)
+#endif
+#ifdef BOOST_HAS_ABI_HEADERS
+# include BOOST_ABI_SUFFIX
+#endif
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_REGEX_NO_WIN32_LOCALE
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/regex_fwd.hpp b/src/third_party/boost-1.69.0/boost/regex_fwd.hpp
index 2ee4a2495fe..2ee4a2495fe 100644
--- a/src/third_party/boost-1.68.0/boost/regex_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/regex_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/scoped_array.hpp b/src/third_party/boost-1.69.0/boost/scoped_array.hpp
index d91889b7cf1..d91889b7cf1 100644
--- a/src/third_party/boost-1.68.0/boost/scoped_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/scoped_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/scoped_ptr.hpp b/src/third_party/boost-1.69.0/boost/scoped_ptr.hpp
index 334a22e2fe1..334a22e2fe1 100644
--- a/src/third_party/boost-1.68.0/boost/scoped_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/scoped_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/access.hpp b/src/third_party/boost-1.69.0/boost/serialization/access.hpp
index f6581accc91..f6581accc91 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/access.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/access.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/array_optimization.hpp b/src/third_party/boost-1.69.0/boost/serialization/array_optimization.hpp
index 40dffba871a..40dffba871a 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/array_optimization.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/array_optimization.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/array_wrapper.hpp b/src/third_party/boost-1.69.0/boost/serialization/array_wrapper.hpp
index adf436e15b4..adf436e15b4 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/array_wrapper.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/array_wrapper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/assume_abstract.hpp b/src/third_party/boost-1.69.0/boost/serialization/assume_abstract.hpp
index 632f9312f5f..632f9312f5f 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/assume_abstract.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/assume_abstract.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/base_object.hpp b/src/third_party/boost-1.69.0/boost/serialization/base_object.hpp
index 1a82cecd4b5..1a82cecd4b5 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/base_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/base_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/collection_size_type.hpp b/src/third_party/boost-1.69.0/boost/serialization/collection_size_type.hpp
index 2dd8fa72584..2dd8fa72584 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/collection_size_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/collection_size_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/collection_traits.hpp b/src/third_party/boost-1.69.0/boost/serialization/collection_traits.hpp
index 3ec9401eff0..3ec9401eff0 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/collection_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/collection_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/collections_load_imp.hpp b/src/third_party/boost-1.69.0/boost/serialization/collections_load_imp.hpp
index e042c0c130d..e042c0c130d 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/collections_load_imp.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/collections_load_imp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/collections_save_imp.hpp b/src/third_party/boost-1.69.0/boost/serialization/collections_save_imp.hpp
index 5ada155e241..5ada155e241 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/collections_save_imp.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/collections_save_imp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/config.hpp b/src/third_party/boost-1.69.0/boost/serialization/config.hpp
index ea8cb9239ed..ea8cb9239ed 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/detail/is_default_constructible.hpp b/src/third_party/boost-1.69.0/boost/serialization/detail/is_default_constructible.hpp
index 4d20b13bf3e..4d20b13bf3e 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/detail/is_default_constructible.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/detail/is_default_constructible.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/detail/stack_constructor.hpp b/src/third_party/boost-1.69.0/boost/serialization/detail/stack_constructor.hpp
index ae14832c6db..ae14832c6db 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/detail/stack_constructor.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/detail/stack_constructor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/extended_type_info.hpp b/src/third_party/boost-1.69.0/boost/serialization/extended_type_info.hpp
index bb2a190d465..bb2a190d465 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/extended_type_info.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/extended_type_info.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/extended_type_info_no_rtti.hpp b/src/third_party/boost-1.69.0/boost/serialization/extended_type_info_no_rtti.hpp
index aaa8b44459b..aaa8b44459b 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/extended_type_info_no_rtti.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/extended_type_info_no_rtti.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/extended_type_info_typeid.hpp b/src/third_party/boost-1.69.0/boost/serialization/extended_type_info_typeid.hpp
index 8ee591b3169..8ee591b3169 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/extended_type_info_typeid.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/extended_type_info_typeid.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/factory.hpp b/src/third_party/boost-1.69.0/boost/serialization/factory.hpp
index 2db7e7e36c3..2db7e7e36c3 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/factory.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/factory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/force_include.hpp b/src/third_party/boost-1.69.0/boost/serialization/force_include.hpp
index 55ab79d0d58..55ab79d0d58 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/force_include.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/force_include.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/is_bitwise_serializable.hpp b/src/third_party/boost-1.69.0/boost/serialization/is_bitwise_serializable.hpp
index 7e24a2cb6d8..7e24a2cb6d8 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/is_bitwise_serializable.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/is_bitwise_serializable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/item_version_type.hpp b/src/third_party/boost-1.69.0/boost/serialization/item_version_type.hpp
index f3e5adac6f8..f3e5adac6f8 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/item_version_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/item_version_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/level.hpp b/src/third_party/boost-1.69.0/boost/serialization/level.hpp
index f6a84d10422..f6a84d10422 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/level.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/level.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/level_enum.hpp b/src/third_party/boost-1.69.0/boost/serialization/level_enum.hpp
index baf64e04f31..baf64e04f31 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/level_enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/level_enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/list.hpp b/src/third_party/boost-1.69.0/boost/serialization/list.hpp
index 5fdc114d7ed..5fdc114d7ed 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/nvp.hpp b/src/third_party/boost-1.69.0/boost/serialization/nvp.hpp
index 066fe94d879..066fe94d879 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/nvp.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/nvp.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/serialization.hpp b/src/third_party/boost-1.69.0/boost/serialization/serialization.hpp
index a4d04723c75..a4d04723c75 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/serialization.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/serialization.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/set.hpp b/src/third_party/boost-1.69.0/boost/serialization/set.hpp
index dd201267fad..dd201267fad 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/set.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/set.hpp
diff --git a/src/third_party/boost-1.69.0/boost/serialization/singleton.hpp b/src/third_party/boost-1.69.0/boost/serialization/singleton.hpp
new file mode 100644
index 00000000000..a668100da20
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/serialization/singleton.hpp
@@ -0,0 +1,218 @@
+#ifndef BOOST_SERIALIZATION_SINGLETON_HPP
+#define BOOST_SERIALIZATION_SINGLETON_HPP
+
+/////////1/////////2///////// 3/////////4/////////5/////////6/////////7/////////8
+// singleton.hpp
+//
+// Copyright David Abrahams 2006. Original version
+//
+// Copyright Robert Ramey 2007. Changes made to permit
+// application throughout the serialization library.
+//
+// Copyright Alexander Grund 2018. Corrections to singleton lifetime
+//
+// Distributed under the Boost
+// Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// The intention here is to define a template which will convert
+// any class into a singleton with the following features:
+//
+// a) initialized before first use.
+// b) thread-safe for const access to the class
+// c) non-locking
+//
+// In order to do this,
+// a) Initialize dynamically when used.
+// b) Require that all singletons be initialized before main
+// is called or any entry point into the shared library is invoked.
+// This guarentees no race condition for initialization.
+// In debug mode, we assert that no non-const functions are called
+// after main is invoked.
+//
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER)
+# pragma once
+#endif
+
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/noncopyable.hpp>
+#include <boost/serialization/force_include.hpp>
+#include <boost/serialization/config.hpp>
+
+#include <boost/archive/detail/auto_link_archive.hpp>
+#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+namespace boost {
+namespace serialization {
+
+//////////////////////////////////////////////////////////////////////
+// Provides a dynamically-initialized (singleton) instance of T in a
+// way that avoids LNK1179 on vc6. See http://tinyurl.com/ljdp8 or
+// http://lists.boost.org/Archives/boost/2006/05/105286.php for
+// details.
+//
+
+// Singletons created by this code are guaranteed to be unique
+// within the executable or shared library which creates them.
+// This is sufficient and in fact ideal for the serialization library.
+// The singleton is created when the module is loaded and destroyed
+// when the module is unloaded.
+
+// This base class has two functions.
+
+// First it provides a module handle for each singleton indicating
+// the executable or shared library in which it was created. This
+// turns out to be necessary and sufficient to implement the tables
+// used by serialization library.
+
+// Second, it provides a mechanism to detect when a non-const function
+// is called after initialization.
+
+// Make a singleton to lock/unlock all singletons for alteration.
+// The intent is that all singletons created/used by this code
+// are to be initialized before main is called. A test program
+// can lock all the singletons when main is entered. Thus any
+// attempt to retrieve a mutable instance while locked will
+// generate an assertion if compiled for debug.
+
+// The singleton template can be used in 2 ways:
+// 1 (Recommended): Publicly inherit your type T from singleton<T>,
+// make its ctor protected and access it via T::get_const_instance()
+// 2: Simply access singleton<T> without changing T. Note that this only
+// provides a global instance accesible by singleton<T>::get_const_instance()
+// or singleton<T>::get_mutable_instance() to prevent using multiple instances
+// of T make its ctor protected
+
+// Note on usage of BOOST_DLLEXPORT: These functions are in danger of
+// being eliminated by the optimizer when building an application in
+// release mode. Usage of the macro is meant to signal the compiler/linker
+// to avoid dropping these functions which seem to be unreferenced.
+// This usage is not related to autolinking.
+
+class BOOST_SYMBOL_VISIBLE singleton_module :
+ public boost::noncopyable
+{
+private:
+ BOOST_DLLEXPORT bool & get_lock() BOOST_USED {
+ static bool lock = false;
+ return lock;
+ }
+
+public:
+ BOOST_DLLEXPORT void lock(){
+ get_lock() = true;
+ }
+ BOOST_DLLEXPORT void unlock(){
+ get_lock() = false;
+ }
+ BOOST_DLLEXPORT bool is_locked(){
+ return get_lock();
+ }
+};
+
+static inline singleton_module & get_singleton_module(){
+ static singleton_module m;
+ return m;
+}
+
+namespace detail {
+
+// This is the class actually instantiated and hence the real singleton.
+// So there will only be one instance of this class. This does not hold
+// for singleton<T> as a class derived from singleton<T> could be
+// instantiated multiple times.
+// It also provides a flag `is_destroyed` which returns true, when the
+// class was destructed. It is static and hence accesible even after
+// destruction. This can be used to check, if the singleton is still
+// accesible e.g. in destructors of other singletons.
+template<class T>
+class singleton_wrapper : public T
+{
+ static bool & get_is_destroyed(){
+ // Prefer a static function member to avoid LNK1179.
+ // Note: As this is for a singleton (1 instance only) it must be set
+ // never be reset (to false)!
+ static bool is_destroyed_flag = false;
+ return is_destroyed_flag;
+ }
+public:
+ singleton_wrapper(){
+ BOOST_ASSERT(! is_destroyed());
+ }
+ ~singleton_wrapper(){
+ get_is_destroyed() = true;
+ }
+ static bool is_destroyed(){
+ return get_is_destroyed();
+ }
+};
+
+} // detail
+
+template <class T>
+class singleton {
+private:
+ static T * m_instance;
+ // include this to provoke instantiation at pre-execution time
+ static void use(T const &) {}
+ static T & get_instance() {
+ BOOST_ASSERT(! is_destroyed());
+
+ // use a wrapper so that types T with protected constructors can be used
+ // Using a static function member avoids LNK1179
+ static detail::singleton_wrapper< T > t;
+
+ // note that the following is absolutely essential.
+ // commenting out this statement will cause compilers to fail to
+ // construct the instance at pre-execution time. This would prevent
+ // our usage/implementation of "locking" and introduce uncertainty into
+ // the sequence of object initialization.
+ // Unfortunately, this triggers detectors of undefine behavior
+ // and reports an error. But I've been unable to find a different
+ // of guarenteeing that the the singleton is created at pre-main time.
+ use(* m_instance);
+
+ return static_cast<T &>(t);
+ }
+protected:
+ // Do not allow instantiation of a singleton<T>. But we want to allow
+ // `class T: public singleton<T>` so we can't delete this ctor
+ BOOST_DLLEXPORT singleton(){}
+
+public:
+ BOOST_DLLEXPORT static T & get_mutable_instance(){
+ BOOST_ASSERT(! get_singleton_module().is_locked());
+ return get_instance();
+ }
+ BOOST_DLLEXPORT static const T & get_const_instance(){
+ return get_instance();
+ }
+ BOOST_DLLEXPORT static bool is_destroyed(){
+ return detail::singleton_wrapper< T >::is_destroyed();
+ }
+};
+
+// Assigning the instance reference to a static member forces initialization
+// at startup time as described in
+// https://groups.google.com/forum/#!topic/microsoft.public.vc.language/kDVNLnIsfZk
+template<class T>
+T * singleton< T >::m_instance = & singleton< T >::get_instance();
+
+} // namespace serialization
+} // namespace boost
+
+#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif // BOOST_SERIALIZATION_SINGLETON_HPP
diff --git a/src/third_party/boost-1.68.0/boost/serialization/smart_cast.hpp b/src/third_party/boost-1.69.0/boost/serialization/smart_cast.hpp
index 563f36aa20b..563f36aa20b 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/smart_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/smart_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/split_free.hpp b/src/third_party/boost-1.69.0/boost/serialization/split_free.hpp
index 85e2f590fe4..85e2f590fe4 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/split_free.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/split_free.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/split_member.hpp b/src/third_party/boost-1.69.0/boost/serialization/split_member.hpp
index 5f32520559e..5f32520559e 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/split_member.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/split_member.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/state_saver.hpp b/src/third_party/boost-1.69.0/boost/serialization/state_saver.hpp
index 248b8d91556..248b8d91556 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/state_saver.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/state_saver.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/static_warning.hpp b/src/third_party/boost-1.69.0/boost/serialization/static_warning.hpp
index 1d9238fc4d9..1d9238fc4d9 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/static_warning.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/static_warning.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/string.hpp b/src/third_party/boost-1.69.0/boost/serialization/string.hpp
index 76e695d4f3c..76e695d4f3c 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/string.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/string.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/strong_typedef.hpp b/src/third_party/boost-1.69.0/boost/serialization/strong_typedef.hpp
index fdd1b24c9cb..fdd1b24c9cb 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/strong_typedef.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/strong_typedef.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/throw_exception.hpp b/src/third_party/boost-1.69.0/boost/serialization/throw_exception.hpp
index b67618adc92..b67618adc92 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/throw_exception.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/throw_exception.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/tracking.hpp b/src/third_party/boost-1.69.0/boost/serialization/tracking.hpp
index d5c79b8409d..d5c79b8409d 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/tracking.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/tracking.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/tracking_enum.hpp b/src/third_party/boost-1.69.0/boost/serialization/tracking_enum.hpp
index 278051e1baf..278051e1baf 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/tracking_enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/tracking_enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/traits.hpp b/src/third_party/boost-1.69.0/boost/serialization/traits.hpp
index 9e114fdd3df..9e114fdd3df 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/type_info_implementation.hpp b/src/third_party/boost-1.69.0/boost/serialization/type_info_implementation.hpp
index 24637a8dbb3..24637a8dbb3 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/type_info_implementation.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/type_info_implementation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/vector.hpp b/src/third_party/boost-1.69.0/boost/serialization/vector.hpp
index 9a114c00e20..9a114c00e20 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/vector.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/vector.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/version.hpp b/src/third_party/boost-1.69.0/boost/serialization/version.hpp
index 21a74d73daa..21a74d73daa 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/version.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/version.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/void_cast.hpp b/src/third_party/boost-1.69.0/boost/serialization/void_cast.hpp
index 97c5fe61ba7..97c5fe61ba7 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/void_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/void_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/void_cast_fwd.hpp b/src/third_party/boost-1.69.0/boost/serialization/void_cast_fwd.hpp
index def61d52bb7..def61d52bb7 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/void_cast_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/void_cast_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/serialization/wrapper.hpp b/src/third_party/boost-1.69.0/boost/serialization/wrapper.hpp
index 60d7910b17a..60d7910b17a 100644
--- a/src/third_party/boost-1.68.0/boost/serialization/wrapper.hpp
+++ b/src/third_party/boost-1.69.0/boost/serialization/wrapper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/shared_array.hpp b/src/third_party/boost-1.69.0/boost/shared_array.hpp
index 6804224c277..6804224c277 100644
--- a/src/third_party/boost-1.68.0/boost/shared_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/shared_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/shared_ptr.hpp b/src/third_party/boost-1.69.0/boost/shared_ptr.hpp
index cb01b265881..cb01b265881 100644
--- a/src/third_party/boost-1.68.0/boost/shared_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/shared_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr.hpp
index 6fabfc5388f..6fabfc5388f 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/allocate_local_shared_array.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/allocate_local_shared_array.hpp
new file mode 100644
index 00000000000..7591ba655ef
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/allocate_local_shared_array.hpp
@@ -0,0 +1,228 @@
+/*
+Copyright 2017 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License, Version 1.0.
+(http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BOOST_SMART_PTR_ALLOCATE_LOCAL_SHARED_ARRAY_HPP
+#define BOOST_SMART_PTR_ALLOCATE_LOCAL_SHARED_ARRAY_HPP
+
+#include <boost/smart_ptr/allocate_shared_array.hpp>
+#include <boost/smart_ptr/local_shared_ptr.hpp>
+
+namespace boost {
+namespace detail {
+
+template<class>
+struct lsp_if_array { };
+
+template<class T>
+struct lsp_if_array<T[]> {
+ typedef boost::local_shared_ptr<T[]> type;
+};
+
+template<class>
+struct lsp_if_size_array { };
+
+template<class T, std::size_t N>
+struct lsp_if_size_array<T[N]> {
+ typedef boost::local_shared_ptr<T[N]> type;
+};
+
+class BOOST_SYMBOL_VISIBLE lsp_array_base
+ : public local_counted_base {
+public:
+ void set(sp_counted_base* base) BOOST_SP_NOEXCEPT {
+ count_ = shared_count(base);
+ }
+
+ virtual void local_cb_destroy() BOOST_SP_NOEXCEPT {
+ shared_count().swap(count_);
+ }
+
+ virtual shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT {
+ return count_;
+ }
+
+private:
+ shared_count count_;
+};
+
+template<class A>
+class lsp_array_state
+ : public sp_array_state<A> {
+public:
+ template<class U>
+ lsp_array_state(const U& other, std::size_t size) BOOST_SP_NOEXCEPT
+ : sp_array_state<A>(other, size) { }
+
+ lsp_array_base& base() BOOST_SP_NOEXCEPT {
+ return base_;
+ }
+
+private:
+ lsp_array_base base_;
+};
+
+template<class A, std::size_t N>
+class lsp_size_array_state
+ : public sp_size_array_state<A, N> {
+public:
+ template<class U>
+ lsp_size_array_state(const U& other, std::size_t size) BOOST_SP_NOEXCEPT
+ : sp_size_array_state<A, N>(other, size) { }
+
+ lsp_array_base& base() BOOST_SP_NOEXCEPT {
+ return base_;
+ }
+
+private:
+ lsp_array_base base_;
+};
+
+} /* detail */
+
+template<class T, class A>
+inline typename detail::lsp_if_array<T>::type
+allocate_local_shared(const A& allocator, std::size_t count)
+{
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::lsp_array_state<other> state;
+ typedef detail::sp_array_base<state> base;
+ std::size_t size = count * detail::sp_array_count<type>::value;
+ detail::sp_array_result<other, base> result(allocator, size);
+ base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(allocator, size, start);
+ detail::lsp_array_base& local = node->state().base();
+ local.set(node);
+ result.release();
+ return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), &local);
+}
+
+template<class T, class A>
+inline typename detail::lsp_if_size_array<T>::type
+allocate_local_shared(const A& allocator)
+{
+ enum {
+ size = detail::sp_array_count<T>::value
+ };
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::lsp_size_array_state<other, size> state;
+ typedef detail::sp_array_base<state> base;
+ detail::sp_array_result<other, base> result(allocator, size);
+ base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(allocator, size, start);
+ detail::lsp_array_base& local = node->state().base();
+ local.set(node);
+ result.release();
+ return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), &local);
+}
+
+template<class T, class A>
+inline typename detail::lsp_if_array<T>::type
+allocate_local_shared(const A& allocator, std::size_t count,
+ const typename detail::sp_array_element<T>::type& value)
+{
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::lsp_array_state<other> state;
+ typedef detail::sp_array_base<state> base;
+ std::size_t size = count * detail::sp_array_count<type>::value;
+ detail::sp_array_result<other, base> result(allocator, size);
+ base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(allocator, size,
+ reinterpret_cast<const scalar*>(&value),
+ detail::sp_array_count<type>::value, start);
+ detail::lsp_array_base& local = node->state().base();
+ local.set(node);
+ result.release();
+ return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), &local);
+}
+
+template<class T, class A>
+inline typename detail::lsp_if_size_array<T>::type
+allocate_local_shared(const A& allocator,
+ const typename detail::sp_array_element<T>::type& value)
+{
+ enum {
+ size = detail::sp_array_count<T>::value
+ };
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::lsp_size_array_state<other, size> state;
+ typedef detail::sp_array_base<state> base;
+ detail::sp_array_result<other, base> result(allocator, size);
+ base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(allocator, size,
+ reinterpret_cast<const scalar*>(&value),
+ detail::sp_array_count<type>::value, start);
+ detail::lsp_array_base& local = node->state().base();
+ local.set(node);
+ result.release();
+ return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), &local);
+}
+
+template<class T, class A>
+inline typename detail::lsp_if_array<T>::type
+allocate_local_shared_noinit(const A& allocator, std::size_t count)
+{
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::lsp_array_state<other> state;
+ typedef detail::sp_array_base<state, false> base;
+ std::size_t size = count * detail::sp_array_count<type>::value;
+ detail::sp_array_result<other, base> result(allocator, size);
+ base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(detail::sp_default(), allocator,
+ size, start);
+ detail::lsp_array_base& local = node->state().base();
+ local.set(node);
+ result.release();
+ return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), &local);
+}
+
+template<class T, class A>
+inline typename detail::lsp_if_size_array<T>::type
+allocate_local_shared_noinit(const A& allocator)
+{
+ enum {
+ size = detail::sp_array_count<T>::value
+ };
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::lsp_size_array_state<other, size> state;
+ typedef detail::sp_array_base<state, false> base;
+ detail::sp_array_result<other, base> result(allocator, size);
+ base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(detail::sp_default(), allocator,
+ size, start);
+ detail::lsp_array_base& local = node->state().base();
+ local.set(node);
+ result.release();
+ return local_shared_ptr<T>(detail::lsp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), &local);
+}
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/allocate_shared_array.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/allocate_shared_array.hpp
new file mode 100644
index 00000000000..c7d2df41cfd
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/allocate_shared_array.hpp
@@ -0,0 +1,648 @@
+/*
+Copyright 2012-2018 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License, Version 1.0.
+(http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP
+#define BOOST_SMART_PTR_ALLOCATE_SHARED_ARRAY_HPP
+
+#include <boost/smart_ptr/shared_ptr.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/has_trivial_assign.hpp>
+#include <boost/type_traits/has_trivial_constructor.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
+
+namespace boost {
+namespace detail {
+
+template<class>
+struct sp_if_array { };
+
+template<class T>
+struct sp_if_array<T[]> {
+ typedef boost::shared_ptr<T[]> type;
+};
+
+template<class>
+struct sp_if_size_array { };
+
+template<class T, std::size_t N>
+struct sp_if_size_array<T[N]> {
+ typedef boost::shared_ptr<T[N]> type;
+};
+
+template<class>
+struct sp_array_element { };
+
+template<class T>
+struct sp_array_element<T[]> {
+ typedef T type;
+};
+
+template<class T, std::size_t N>
+struct sp_array_element<T[N]> {
+ typedef T type;
+};
+
+template<class T>
+struct sp_array_scalar {
+ typedef T type;
+};
+
+template<class T, std::size_t N>
+struct sp_array_scalar<T[N]> {
+ typedef typename sp_array_scalar<T>::type type;
+};
+
+template<class T, std::size_t N>
+struct sp_array_scalar<const T[N]> {
+ typedef typename sp_array_scalar<T>::type type;
+};
+
+template<class T, std::size_t N>
+struct sp_array_scalar<volatile T[N]> {
+ typedef typename sp_array_scalar<T>::type type;
+};
+
+template<class T, std::size_t N>
+struct sp_array_scalar<const volatile T[N]> {
+ typedef typename sp_array_scalar<T>::type type;
+};
+
+template<class T>
+struct sp_array_scalar<T[]> {
+ typedef typename sp_array_scalar<T>::type type;
+};
+
+template<class T>
+struct sp_array_scalar<const T[]> {
+ typedef typename sp_array_scalar<T>::type type;
+};
+
+template<class T>
+struct sp_array_scalar<volatile T[]> {
+ typedef typename sp_array_scalar<T>::type type;
+};
+
+template<class T>
+struct sp_array_scalar<const volatile T[]> {
+ typedef typename sp_array_scalar<T>::type type;
+};
+
+template<class T>
+struct sp_array_count {
+ enum {
+ value = 1
+ };
+};
+
+template<class T, std::size_t N>
+struct sp_array_count<T[N]> {
+ enum {
+ value = N * sp_array_count<T>::value
+ };
+};
+
+template<std::size_t N, std::size_t M>
+struct sp_max_size {
+ enum {
+ value = N < M ? M : N
+ };
+};
+
+template<std::size_t N, std::size_t M>
+struct sp_align_up {
+ enum {
+ value = (N + M - 1) & ~(M - 1)
+ };
+};
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+template<class A, class T>
+struct sp_bind_allocator {
+ typedef typename std::allocator_traits<A>::template rebind_alloc<T> type;
+};
+#else
+template<class A, class T>
+struct sp_bind_allocator {
+ typedef typename A::template rebind<T>::other type;
+};
+#endif
+
+template<class T>
+BOOST_CONSTEXPR inline std::size_t
+sp_objects(std::size_t size) BOOST_SP_NOEXCEPT
+{
+ return (size + sizeof(T) - 1) / sizeof(T);
+}
+
+template<bool, class = void>
+struct sp_enable { };
+
+template<class T>
+struct sp_enable<true, T> {
+ typedef T type;
+};
+
+template<bool E, class A, class T>
+inline typename sp_enable<!E && boost::has_trivial_destructor<T>::value>::type
+sp_array_destroy(A&, T*, std::size_t) BOOST_SP_NOEXCEPT { }
+
+template<bool E, class A, class T>
+inline typename sp_enable<!E &&
+ !boost::has_trivial_destructor<T>::value>::type
+sp_array_destroy(A&, T* ptr, std::size_t size)
+{
+ while (size > 0) {
+ ptr[--size].~T();
+ }
+}
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+template<bool E, class A, class T>
+inline typename sp_enable<E>::type
+sp_array_destroy(A& allocator, T* ptr, std::size_t size)
+{
+ while (size > 0) {
+ std::allocator_traits<A>::destroy(allocator, ptr + --size);
+ }
+}
+#endif
+
+template<bool E, class A, class T>
+class sp_destroyer {
+public:
+ sp_destroyer(A& allocator, T* ptr) BOOST_SP_NOEXCEPT
+ : allocator_(allocator),
+ ptr_(ptr),
+ size_(0) { }
+
+ ~sp_destroyer() {
+ sp_array_destroy<E>(allocator_, ptr_, size_);
+ }
+
+ std::size_t& size() BOOST_SP_NOEXCEPT {
+ return size_;
+ }
+
+private:
+ sp_destroyer(const sp_destroyer&);
+ sp_destroyer& operator=(const sp_destroyer&);
+
+ A& allocator_;
+ T* ptr_;
+ std::size_t size_;
+};
+
+template<bool E, class A, class T>
+inline typename sp_enable<!E &&
+ boost::has_trivial_constructor<T>::value &&
+ boost::has_trivial_assign<T>::value &&
+ boost::has_trivial_destructor<T>::value>::type
+sp_array_construct(A&, T* ptr, std::size_t size)
+{
+ for (std::size_t i = 0; i < size; ++i) {
+ ptr[i] = T();
+ }
+}
+
+template<bool E, class A, class T>
+inline typename sp_enable<!E &&
+ boost::has_trivial_constructor<T>::value &&
+ boost::has_trivial_assign<T>::value &&
+ boost::has_trivial_destructor<T>::value>::type
+sp_array_construct(A&, T* ptr, std::size_t size, const T* list,
+ std::size_t count)
+{
+ for (std::size_t i = 0; i < size; ++i) {
+ ptr[i] = list[i % count];
+ }
+}
+
+template<bool E, class A, class T>
+inline typename sp_enable<!E &&
+ !(boost::has_trivial_constructor<T>::value &&
+ boost::has_trivial_assign<T>::value &&
+ boost::has_trivial_destructor<T>::value)>::type
+sp_array_construct(A& none, T* ptr, std::size_t size)
+{
+ sp_destroyer<E, A, T> hold(none, ptr);
+ for (std::size_t& i = hold.size(); i < size; ++i) {
+ ::new(static_cast<void*>(ptr + i)) T();
+ }
+ hold.size() = 0;
+}
+
+template<bool E, class A, class T>
+inline typename sp_enable<!E &&
+ !(boost::has_trivial_constructor<T>::value &&
+ boost::has_trivial_assign<T>::value &&
+ boost::has_trivial_destructor<T>::value)>::type
+sp_array_construct(A& none, T* ptr, std::size_t size, const T* list,
+ std::size_t count)
+{
+ sp_destroyer<E, A, T> hold(none, ptr);
+ for (std::size_t& i = hold.size(); i < size; ++i) {
+ ::new(static_cast<void*>(ptr + i)) T(list[i % count]);
+ }
+ hold.size() = 0;
+}
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+template<bool E, class A, class T>
+inline typename sp_enable<E>::type
+sp_array_construct(A& allocator, T* ptr, std::size_t size)
+{
+ sp_destroyer<E, A, T> hold(allocator, ptr);
+ for (std::size_t& i = hold.size(); i < size; ++i) {
+ std::allocator_traits<A>::construct(allocator, ptr + i);
+ }
+ hold.size() = 0;
+}
+
+template<bool E, class A, class T>
+inline typename sp_enable<E>::type
+sp_array_construct(A& allocator, T* ptr, std::size_t size, const T* list,
+ std::size_t count)
+{
+ sp_destroyer<E, A, T> hold(allocator, ptr);
+ for (std::size_t& i = hold.size(); i < size; ++i) {
+ std::allocator_traits<A>::construct(allocator, ptr + i,
+ list[i % count]);
+ }
+ hold.size() = 0;
+}
+#endif
+
+template<class A, class T>
+inline typename sp_enable<boost::has_trivial_constructor<T>::value>::type
+sp_array_default(A&, T*, std::size_t) BOOST_SP_NOEXCEPT { }
+
+template<class A, class T>
+inline typename sp_enable<!boost::has_trivial_constructor<T>::value>::type
+sp_array_default(A& none, T* ptr, std::size_t size)
+{
+ sp_destroyer<false, A, T> hold(none, ptr);
+ for (std::size_t& i = hold.size(); i < size; ++i) {
+ ::new(static_cast<void*>(ptr + i)) T;
+ }
+ hold.size() = 0;
+}
+
+template<class A>
+class sp_array_state {
+public:
+ typedef A type;
+
+ template<class U>
+ sp_array_state(const U& _allocator, std::size_t _size) BOOST_SP_NOEXCEPT
+ : allocator_(_allocator),
+ size_(_size) { }
+
+ A& allocator() BOOST_SP_NOEXCEPT {
+ return allocator_;
+ }
+
+ std::size_t size() const BOOST_SP_NOEXCEPT {
+ return size_;
+ }
+
+private:
+ A allocator_;
+ std::size_t size_;
+};
+
+template<class A, std::size_t N>
+class sp_size_array_state {
+public:
+ typedef A type;
+
+ template<class U>
+ sp_size_array_state(const U& _allocator, std::size_t) BOOST_SP_NOEXCEPT
+ : allocator_(_allocator) { }
+
+ A& allocator() BOOST_SP_NOEXCEPT {
+ return allocator_;
+ }
+
+ BOOST_CONSTEXPR std::size_t size() const BOOST_SP_NOEXCEPT {
+ return N;
+ }
+
+private:
+ A allocator_;
+};
+
+#if !defined(BOOST_NO_CXX11_ALLOCATOR)
+template<class A>
+struct sp_use_construct {
+ enum {
+ value = true
+ };
+};
+
+template<class T>
+struct sp_use_construct<std::allocator<T> > {
+ enum {
+ value = false
+ };
+};
+#else
+template<class>
+struct sp_use_construct {
+ enum {
+ value = false
+ };
+};
+#endif
+
+template<class T, class U>
+struct sp_array_alignment {
+ enum {
+ value = sp_max_size<boost::alignment_of<T>::value,
+ boost::alignment_of<U>::value>::value
+ };
+};
+
+template<class T, class U>
+struct sp_array_offset {
+ enum {
+ value = sp_align_up<sizeof(T), sp_array_alignment<T, U>::value>::value
+ };
+};
+
+template<class T, class U>
+struct sp_array_storage {
+ enum {
+ value = sp_array_alignment<T, U>::value
+ };
+ typedef typename boost::type_with_alignment<value>::type type;
+};
+
+template<class T, class U>
+inline U*
+sp_array_start(void* base) BOOST_SP_NOEXCEPT
+{
+ enum {
+ size = sp_array_offset<T, U>::value
+ };
+ return reinterpret_cast<U*>(static_cast<char*>(base) + size);
+}
+
+template<class A, class T>
+class sp_array_creator {
+ typedef typename A::value_type scalar;
+
+ enum {
+ offset = sp_array_offset<T, scalar>::value
+ };
+
+ typedef typename sp_array_storage<T, scalar>::type type;
+
+public:
+ template<class U>
+ sp_array_creator(const U& other, std::size_t size) BOOST_SP_NOEXCEPT
+ : other_(other),
+ size_(sp_objects<type>(offset + sizeof(scalar) * size)) { }
+
+ T* create() {
+ return reinterpret_cast<T*>(other_.allocate(size_));
+ }
+
+ void destroy(T* base) {
+ other_.deallocate(reinterpret_cast<type*>(base), size_);
+ }
+
+private:
+ typename sp_bind_allocator<A, type>::type other_;
+ std::size_t size_;
+};
+
+struct sp_default { };
+
+template<class T, bool E = sp_use_construct<T>::value>
+class BOOST_SYMBOL_VISIBLE sp_array_base
+ : public sp_counted_base {
+ typedef typename T::type allocator;
+
+public:
+ typedef typename allocator::value_type type;
+
+ template<class A>
+ sp_array_base(const A& other, std::size_t size, type* start)
+ : state_(other, size) {
+ sp_array_construct<E>(state_.allocator(), start, state_.size());
+ }
+
+ template<class A>
+ sp_array_base(const A& other, std::size_t size, const type* list,
+ std::size_t count, type* start)
+ : state_(other, size) {
+ sp_array_construct<E>(state_.allocator(), start, state_.size(), list,
+ count);
+ }
+
+ template<class A>
+ sp_array_base(sp_default, const A& other, std::size_t size, type* start)
+ : state_(other, size) {
+ sp_array_default(state_.allocator(), start, state_.size());
+ }
+
+ T& state() BOOST_SP_NOEXCEPT {
+ return state_;
+ }
+
+ virtual void dispose() {
+ sp_array_destroy<E>(state_.allocator(),
+ sp_array_start<sp_array_base, type>(this), state_.size());
+ }
+
+ virtual void destroy() {
+ sp_array_creator<allocator, sp_array_base> other(state_.allocator(),
+ state_.size());
+ this->~sp_array_base();
+ other.destroy(this);
+ }
+
+ virtual void* get_deleter(const sp_typeinfo&) {
+ return 0;
+ }
+
+ virtual void* get_local_deleter(const sp_typeinfo&) {
+ return 0;
+ }
+
+ virtual void* get_untyped_deleter() {
+ return 0;
+ }
+
+private:
+ T state_;
+};
+
+template<class A, class T>
+struct sp_array_result {
+public:
+ template<class U>
+ sp_array_result(const U& other, std::size_t size)
+ : creator_(other, size),
+ result_(creator_.create()) { }
+
+ ~sp_array_result() {
+ if (result_) {
+ creator_.destroy(result_);
+ }
+ }
+
+ T* get() const {
+ return result_;
+ }
+
+ void release() {
+ result_ = 0;
+ }
+
+private:
+ sp_array_result(const sp_array_result&);
+ sp_array_result& operator=(const sp_array_result&);
+
+ sp_array_creator<A, T> creator_;
+ T* result_;
+};
+
+} /* detail */
+
+template<class T, class A>
+inline typename detail::sp_if_array<T>::type
+allocate_shared(const A& allocator, std::size_t count)
+{
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::sp_array_state<other> state;
+ typedef detail::sp_array_base<state> base;
+ std::size_t size = count * detail::sp_array_count<type>::value;
+ detail::sp_array_result<other, base> result(allocator, size);
+ detail::sp_counted_base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(allocator, size, start);
+ result.release();
+ return shared_ptr<T>(detail::sp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), detail::shared_count(node));
+}
+
+template<class T, class A>
+inline typename detail::sp_if_size_array<T>::type
+allocate_shared(const A& allocator)
+{
+ enum {
+ size = detail::sp_array_count<T>::value
+ };
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::sp_size_array_state<other, size> state;
+ typedef detail::sp_array_base<state> base;
+ detail::sp_array_result<other, base> result(allocator, size);
+ detail::sp_counted_base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(allocator, size, start);
+ result.release();
+ return shared_ptr<T>(detail::sp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), detail::shared_count(node));
+}
+
+template<class T, class A>
+inline typename detail::sp_if_array<T>::type
+allocate_shared(const A& allocator, std::size_t count,
+ const typename detail::sp_array_element<T>::type& value)
+{
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::sp_array_state<other> state;
+ typedef detail::sp_array_base<state> base;
+ std::size_t size = count * detail::sp_array_count<type>::value;
+ detail::sp_array_result<other, base> result(allocator, size);
+ detail::sp_counted_base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(allocator, size,
+ reinterpret_cast<const scalar*>(&value),
+ detail::sp_array_count<type>::value, start);
+ result.release();
+ return shared_ptr<T>(detail::sp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), detail::shared_count(node));
+}
+
+template<class T, class A>
+inline typename detail::sp_if_size_array<T>::type
+allocate_shared(const A& allocator,
+ const typename detail::sp_array_element<T>::type& value)
+{
+ enum {
+ size = detail::sp_array_count<T>::value
+ };
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::sp_size_array_state<other, size> state;
+ typedef detail::sp_array_base<state> base;
+ detail::sp_array_result<other, base> result(allocator, size);
+ detail::sp_counted_base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(allocator, size,
+ reinterpret_cast<const scalar*>(&value),
+ detail::sp_array_count<type>::value, start);
+ result.release();
+ return shared_ptr<T>(detail::sp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), detail::shared_count(node));
+}
+
+template<class T, class A>
+inline typename detail::sp_if_array<T>::type
+allocate_shared_noinit(const A& allocator, std::size_t count)
+{
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::sp_array_state<other> state;
+ typedef detail::sp_array_base<state, false> base;
+ std::size_t size = count * detail::sp_array_count<type>::value;
+ detail::sp_array_result<other, base> result(allocator, size);
+ detail::sp_counted_base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(detail::sp_default(), allocator,
+ size, start);
+ result.release();
+ return shared_ptr<T>(detail::sp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), detail::shared_count(node));
+}
+
+template<class T, class A>
+inline typename detail::sp_if_size_array<T>::type
+allocate_shared_noinit(const A& allocator)
+{
+ enum {
+ size = detail::sp_array_count<T>::value
+ };
+ typedef typename detail::sp_array_element<T>::type type;
+ typedef typename detail::sp_array_scalar<T>::type scalar;
+ typedef typename detail::sp_bind_allocator<A, scalar>::type other;
+ typedef detail::sp_size_array_state<other, size> state;
+ typedef detail::sp_array_base<state, false> base;
+ detail::sp_array_result<other, base> result(allocator, size);
+ detail::sp_counted_base* node = result.get();
+ scalar* start = detail::sp_array_start<base, scalar>(node);
+ ::new(static_cast<void*>(node)) base(detail::sp_default(), allocator,
+ size, start);
+ result.release();
+ return shared_ptr<T>(detail::sp_internal_constructor_tag(),
+ reinterpret_cast<type*>(start), detail::shared_count(node));
+}
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/atomic_shared_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/atomic_shared_ptr.hpp
index 7c485070f83..7c485070f83 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/atomic_shared_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/atomic_shared_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/bad_weak_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/bad_weak_ptr.hpp
index b086be595f4..b086be595f4 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/bad_weak_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/bad_weak_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count.hpp
index 6e4f71aa8e8..6e4f71aa8e8 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc.hpp
new file mode 100644
index 00000000000..df7e32365f4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc.hpp
@@ -0,0 +1,72 @@
+#ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
+
+//
+// boost/detail/atomic_count_gcc.hpp
+//
+// atomic_count for GNU libstdc++ v3
+//
+// http://gcc.gnu.org/onlinedocs/porting/Thread-safety.html
+//
+// Copyright (c) 2001, 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2002 Lars Gullik Bjønnes <larsbj@lyx.org>
+// Copyright 2003-2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#if __GNUC__ * 100 + __GNUC_MINOR__ >= 402
+# include <ext/atomicity.h>
+#else
+# include <bits/atomicity.h>
+#endif
+
+namespace boost
+{
+
+namespace detail
+{
+
+#if defined(__GLIBCXX__) // g++ 3.4+
+
+using __gnu_cxx::__atomic_add;
+using __gnu_cxx::__exchange_and_add;
+
+#endif
+
+class atomic_count
+{
+public:
+
+ explicit atomic_count( long v ) : value_( v ) {}
+
+ long operator++()
+ {
+ return __exchange_and_add( &value_, +1 ) + 1;
+ }
+
+ long operator--()
+ {
+ return __exchange_and_add( &value_, -1 ) - 1;
+ }
+
+ operator long() const
+ {
+ return __exchange_and_add( &value_, 0 );
+ }
+
+private:
+
+ atomic_count(atomic_count const &);
+ atomic_count & operator=(atomic_count const &);
+
+ mutable _Atomic_word value_;
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_GCC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp
index 5c44d7c1efa..5c44d7c1efa 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_gcc_x86.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_nt.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_nt.hpp
index 3bbf1389135..3bbf1389135 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_nt.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_nt.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_pt.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_pt.hpp
index f99b9108e3f..f99b9108e3f 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_pt.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_pt.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_solaris.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_solaris.hpp
index a13bcfb4230..a13bcfb4230 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_solaris.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_solaris.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_spin.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_spin.hpp
index 8e623496bf0..8e623496bf0 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_spin.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_spin.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp
index 55b9998e52a..55b9998e52a 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_std_atomic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_sync.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_sync.hpp
index b6359b5bcf0..b6359b5bcf0 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_sync.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_sync.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_win32.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_win32.hpp
index 633e73c3c0a..633e73c3c0a 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/atomic_count_win32.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/atomic_count_win32.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/lightweight_mutex.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lightweight_mutex.hpp
index d46b1932c2b..d46b1932c2b 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/lightweight_mutex.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lightweight_mutex.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/local_counted_base.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/local_counted_base.hpp
new file mode 100644
index 00000000000..bda5f70d444
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/local_counted_base.hpp
@@ -0,0 +1,148 @@
+#ifndef BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/local_counted_base.hpp
+//
+// Copyright 2017 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/smart_ptr/ for documentation.
+
+#include <boost/smart_ptr/detail/shared_count.hpp>
+#include <boost/config.hpp>
+#include <utility>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class BOOST_SYMBOL_VISIBLE local_counted_base
+{
+private:
+
+ local_counted_base & operator= ( local_counted_base const & );
+
+private:
+
+ // not 'int' or 'unsigned' to avoid aliasing and enable optimizations
+ enum count_type { min_ = 0, initial_ = 1, max_ = 2147483647 };
+
+ count_type local_use_count_;
+
+public:
+
+ BOOST_CONSTEXPR local_counted_base() BOOST_SP_NOEXCEPT: local_use_count_( initial_ )
+ {
+ }
+
+ BOOST_CONSTEXPR local_counted_base( local_counted_base const & ) BOOST_SP_NOEXCEPT: local_use_count_( initial_ )
+ {
+ }
+
+ virtual ~local_counted_base() /*BOOST_SP_NOEXCEPT*/
+ {
+ }
+
+ virtual void local_cb_destroy() BOOST_SP_NOEXCEPT = 0;
+
+ virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT = 0;
+
+ void add_ref() BOOST_SP_NOEXCEPT
+ {
+#if !defined(__NVCC__)
+#if defined( __has_builtin )
+# if __has_builtin( __builtin_assume )
+
+ __builtin_assume( local_use_count_ >= 1 );
+
+# endif
+#endif
+#endif
+
+ local_use_count_ = static_cast<count_type>( local_use_count_ + 1 );
+ }
+
+ void release() BOOST_SP_NOEXCEPT
+ {
+ local_use_count_ = static_cast<count_type>( local_use_count_ - 1 );
+
+ if( local_use_count_ == 0 )
+ {
+ local_cb_destroy();
+ }
+ }
+
+ long local_use_count() const BOOST_SP_NOEXCEPT
+ {
+ return local_use_count_;
+ }
+};
+
+class BOOST_SYMBOL_VISIBLE local_counted_impl: public local_counted_base
+{
+private:
+
+ local_counted_impl( local_counted_impl const & );
+
+private:
+
+ shared_count pn_;
+
+public:
+
+ explicit local_counted_impl( shared_count const& pn ): pn_( pn )
+ {
+ }
+
+#if !defined( BOOST_NO_CXX11_RVALUE_REFERENCES )
+
+ explicit local_counted_impl( shared_count && pn ): pn_( std::move(pn) )
+ {
+ }
+
+#endif
+
+ virtual void local_cb_destroy() BOOST_SP_NOEXCEPT
+ {
+ delete this;
+ }
+
+ virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT
+ {
+ return pn_;
+ }
+};
+
+class BOOST_SYMBOL_VISIBLE local_counted_impl_em: public local_counted_base
+{
+public:
+
+ shared_count pn_;
+
+ virtual void local_cb_destroy() BOOST_SP_NOEXCEPT
+ {
+ shared_count().swap( pn_ );
+ }
+
+ virtual boost::detail::shared_count local_cb_get_shared_count() const BOOST_SP_NOEXCEPT
+ {
+ return pn_;
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_LOCAL_COUNTED_BASE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/local_sp_deleter.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/local_sp_deleter.hpp
index 7d04f1dc527..7d04f1dc527 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/local_sp_deleter.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/local_sp_deleter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_nop.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_nop.hpp
index 521a88ec1cd..521a88ec1cd 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_nop.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_nop.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_pthreads.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_pthreads.hpp
index 8eda5182338..8eda5182338 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_pthreads.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_pthreads.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_win32_cs.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_win32_cs.hpp
index d8dccb0141b..d8dccb0141b 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/lwm_win32_cs.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/lwm_win32_cs.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/operator_bool.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/operator_bool.hpp
index f9c5ef68036..f9c5ef68036 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/operator_bool.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/operator_bool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/quick_allocator.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/quick_allocator.hpp
index 159bd5e7aa8..159bd5e7aa8 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/quick_allocator.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/quick_allocator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/shared_count.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/shared_count.hpp
index ae7d0fb46f0..ae7d0fb46f0 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/shared_count.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/shared_count.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_convertible.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_convertible.hpp
index 4bba9ed4441..4bba9ed4441 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_convertible.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_convertible.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base.hpp
index 438613765b4..438613765b4 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_counted_base.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp
new file mode 100644
index 00000000000..aa7ea9a20a0
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_acc_ia64.hpp
@@ -0,0 +1,153 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED
+
+//
+// detail/sp_counted_base_acc_ia64.hpp - aC++ on HP-UX IA64
+//
+// Copyright 2007 Baruch Zilber
+// Copyright 2007 Boris Gubenko
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+#include <machine/sys/inline.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int * pw )
+{
+ // ++*pw;
+
+ _Asm_fetchadd(_FASZ_W, _SEM_REL, pw, +1, _LDHINT_NONE);
+}
+
+inline int atomic_decrement( int * pw )
+{
+ // return --*pw;
+
+ int r = static_cast<int>(_Asm_fetchadd(_FASZ_W, _SEM_REL, pw, -1, _LDHINT_NONE));
+ if (1 == r)
+ {
+ _Asm_mf();
+ }
+
+ return r - 1;
+}
+
+inline int atomic_conditional_increment( int * pw )
+{
+ // if( *pw != 0 ) ++*pw;
+ // return *pw;
+
+ int v = *pw;
+
+ for (;;)
+ {
+ if (0 == v)
+ {
+ return 0;
+ }
+
+ _Asm_mov_to_ar(_AREG_CCV,
+ v,
+ (_UP_CALL_FENCE | _UP_SYS_FENCE | _DOWN_CALL_FENCE | _DOWN_SYS_FENCE));
+ int r = static_cast<int>(_Asm_cmpxchg(_SZ_W, _SEM_ACQ, pw, v + 1, _LDHINT_NONE));
+ if (r == v)
+ {
+ return r + 1;
+ }
+
+ v = r;
+ }
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<int const volatile &>( use_count_ ); // TODO use ld.acq here
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_ACC_IA64_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp
new file mode 100644
index 00000000000..cbb642687e0
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_aix.hpp
@@ -0,0 +1,145 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
+
+//
+// detail/sp_counted_base_aix.hpp
+// based on: detail/sp_counted_base_w32.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+// Copyright 2006 Michael van der Westhuizen
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+#include <builtins.h>
+#include <sys/atomic_op.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int32_t* pw )
+{
+ // ++*pw;
+
+ fetch_and_add( pw, 1 );
+}
+
+inline int32_t atomic_decrement( int32_t * pw )
+{
+ // return --*pw;
+
+ int32_t originalValue;
+
+ __lwsync();
+ originalValue = fetch_and_add( pw, -1 );
+ __isync();
+
+ return (originalValue - 1);
+}
+
+inline int32_t atomic_conditional_increment( int32_t * pw )
+{
+ // if( *pw != 0 ) ++*pw;
+ // return *pw;
+
+ int32_t tmp = fetch_and_add( pw, 0 );
+ for( ;; )
+ {
+ if( tmp == 0 ) return 0;
+ if( compare_and_swap( pw, &tmp, tmp + 1 ) ) return (tmp + 1);
+ }
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int32_t use_count_; // #shared
+ int32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return fetch_and_add( const_cast<int32_t*>(&use_count_), 0 );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_AIX_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp
new file mode 100644
index 00000000000..c2c20d3ab9f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_clang.hpp
@@ -0,0 +1,151 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/sp_counted_base_clang.hpp - __c11 clang intrinsics
+//
+// Copyright (c) 2007, 2013, 2015 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+typedef _Atomic( boost::int_least32_t ) atomic_int_least32_t;
+
+inline void atomic_increment( atomic_int_least32_t * pw )
+{
+ __c11_atomic_fetch_add( pw, 1, __ATOMIC_RELAXED );
+}
+
+inline boost::int_least32_t atomic_decrement( atomic_int_least32_t * pw )
+{
+ return __c11_atomic_fetch_sub( pw, 1, __ATOMIC_ACQ_REL );
+}
+
+inline boost::int_least32_t atomic_conditional_increment( atomic_int_least32_t * pw )
+{
+ // long r = *pw;
+ // if( r != 0 ) ++*pw;
+ // return r;
+
+ boost::int_least32_t r = __c11_atomic_load( pw, __ATOMIC_RELAXED );
+
+ for( ;; )
+ {
+ if( r == 0 )
+ {
+ return r;
+ }
+
+ if( __c11_atomic_compare_exchange_weak( pw, &r, r + 1, __ATOMIC_RELAXED, __ATOMIC_RELAXED ) )
+ {
+ return r;
+ }
+ }
+}
+
+#if defined(__clang__)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wweak-vtables"
+#endif
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ atomic_int_least32_t use_count_; // #shared
+ atomic_int_least32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base()
+ {
+ __c11_atomic_init( &use_count_, 1 );
+ __c11_atomic_init( &weak_count_, 1 );
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return __c11_atomic_load( const_cast< atomic_int_least32_t* >( &use_count_ ), __ATOMIC_ACQUIRE );
+ }
+};
+
+#if defined(__clang__)
+# pragma clang diagnostic pop
+#endif
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CLANG_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp
new file mode 100644
index 00000000000..c43297e0e42
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_ppc.hpp
@@ -0,0 +1,173 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_cw_ppc.hpp - CodeWarrior on PowerPC
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( register long * pw )
+{
+ register int a;
+
+ asm
+ {
+loop:
+
+ lwarx a, 0, pw
+ addi a, a, 1
+ stwcx. a, 0, pw
+ bne- loop
+ }
+}
+
+inline long atomic_decrement( register long * pw )
+{
+ register int a;
+
+ asm
+ {
+ sync
+
+loop:
+
+ lwarx a, 0, pw
+ addi a, a, -1
+ stwcx. a, 0, pw
+ bne- loop
+
+ isync
+ }
+
+ return a;
+}
+
+inline long atomic_conditional_increment( register long * pw )
+{
+ register int a;
+
+ asm
+ {
+loop:
+
+ lwarx a, 0, pw
+ cmpwi a, 0
+ beq store
+
+ addi a, a, 1
+
+store:
+
+ stwcx. a, 0, pw
+ bne- loop
+ }
+
+ return a;
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ long use_count_; // #shared
+ long weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<long const volatile &>( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_PPC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp
new file mode 100644
index 00000000000..ce34b4cbc4e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_cw_x86.hpp
@@ -0,0 +1,161 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_cw_x86.hpp - CodeWarrion on 486+
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+// Copyright 2005 Rene Rivera
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline int atomic_exchange_and_add( int * pw, int dv )
+{
+ // int r = *pw;
+ // *pw += dv;
+ // return r;
+
+ asm
+ {
+ mov esi, [pw]
+ mov eax, dv
+ lock xadd dword ptr [esi], eax
+ }
+}
+
+inline void atomic_increment( int * pw )
+{
+ //atomic_exchange_and_add( pw, 1 );
+
+ asm
+ {
+ mov esi, [pw]
+ lock inc dword ptr [esi]
+ }
+}
+
+inline int atomic_conditional_increment( int * pw )
+{
+ // int rv = *pw;
+ // if( rv != 0 ) ++*pw;
+ // return rv;
+
+ asm
+ {
+ mov esi, [pw]
+ mov eax, dword ptr [esi]
+ L0:
+ test eax, eax
+ je L1
+ mov ebx, eax
+ inc ebx
+ lock cmpxchg dword ptr [esi], ebx
+ jne L0
+ L1:
+ }
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<int const volatile &>( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_CW_X86_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp
new file mode 100644
index 00000000000..32642df778a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ia64.hpp
@@ -0,0 +1,160 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED
+
+//
+// detail/sp_counted_base_gcc_ia64.hpp - g++ on IA64
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2006 Peter Dimov
+// Copyright 2005 Ben Hutchings
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int * pw )
+{
+ // ++*pw;
+
+ int tmp;
+
+ // No barrier is required here but fetchadd always has an acquire or
+ // release barrier associated with it. We choose release as it should be
+ // cheaper.
+ __asm__ ("fetchadd4.rel %0=%1,1" :
+ "=r"(tmp), "=m"(*pw) :
+ "m"( *pw ));
+}
+
+inline int atomic_decrement( int * pw )
+{
+ // return --*pw;
+
+ int rv;
+
+ __asm__ (" fetchadd4.rel %0=%1,-1 ;; \n"
+ " cmp.eq p7,p0=1,%0 ;; \n"
+ "(p7) ld4.acq %0=%1 " :
+ "=&r"(rv), "=m"(*pw) :
+ "m"( *pw ) :
+ "p7");
+
+ return rv;
+}
+
+inline int atomic_conditional_increment( int * pw )
+{
+ // if( *pw != 0 ) ++*pw;
+ // return *pw;
+
+ int rv, tmp, tmp2;
+
+ __asm__ ("0: ld4 %0=%3 ;; \n"
+ " cmp.eq p7,p0=0,%0 ;; \n"
+ "(p7) br.cond.spnt 1f \n"
+ " mov ar.ccv=%0 \n"
+ " add %1=1,%0 ;; \n"
+ " cmpxchg4.acq %2=%3,%1,ar.ccv ;; \n"
+ " cmp.ne p7,p0=%0,%2 ;; \n"
+ "(p7) br.cond.spnt 0b \n"
+ " mov %0=%1 ;; \n"
+ "1:" :
+ "=&r"(rv), "=&r"(tmp), "=&r"(tmp2), "=m"(*pw) :
+ "m"( *pw ) :
+ "ar.ccv", "p7");
+
+ return rv;
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<int const volatile &>( use_count_ ); // TODO use ld.acq here
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_IA64_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
new file mode 100644
index 00000000000..c4ce0537c96
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
@@ -0,0 +1,190 @@
+#ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED
+#define BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_gcc_mips.hpp - g++ on MIPS
+//
+// Copyright (c) 2009, Spirent Communications, Inc.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int * pw )
+{
+ // ++*pw;
+
+ int tmp;
+
+ __asm__ __volatile__
+ (
+ "0:\n\t"
+ ".set push\n\t"
+#if !defined(__mips_isa_rev) || (__mips_isa_rev < 6)
+ ".set mips2\n\t"
+#endif
+ "ll %0, %1\n\t"
+ "addiu %0, 1\n\t"
+ "sc %0, %1\n\t"
+ ".set pop\n\t"
+ "beqz %0, 0b":
+ "=&r"( tmp ), "=m"( *pw ):
+ "m"( *pw )
+ );
+}
+
+inline int atomic_decrement( int * pw )
+{
+ // return --*pw;
+
+ int rv, tmp;
+
+ __asm__ __volatile__
+ (
+ "0:\n\t"
+ ".set push\n\t"
+#if !defined(__mips_isa_rev) || (__mips_isa_rev < 6)
+ ".set mips2\n\t"
+#endif
+ "ll %1, %2\n\t"
+ "addiu %0, %1, -1\n\t"
+ "sc %0, %2\n\t"
+ ".set pop\n\t"
+ "beqz %0, 0b\n\t"
+ "addiu %0, %1, -1":
+ "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):
+ "m"( *pw ):
+ "memory"
+ );
+
+ return rv;
+}
+
+inline int atomic_conditional_increment( int * pw )
+{
+ // if( *pw != 0 ) ++*pw;
+ // return *pw;
+
+ int rv, tmp;
+
+ __asm__ __volatile__
+ (
+ "0:\n\t"
+ ".set push\n\t"
+#if !defined(__mips_isa_rev) || (__mips_isa_rev < 6)
+ ".set mips2\n\t"
+#endif
+ "ll %0, %2\n\t"
+ "beqz %0, 1f\n\t"
+ "addiu %1, %0, 1\n\t"
+ "sc %1, %2\n\t"
+ ".set pop\n\t"
+ "beqz %1, 0b\n\t"
+ "addiu %0, %0, 1\n\t"
+ "1:":
+ "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):
+ "m"( *pw ):
+ "memory"
+ );
+
+ return rv;
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<int const volatile &>( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_DETAIL_SP_COUNTED_BASE_GCC_MIPS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp
new file mode 100644
index 00000000000..5cf5b3fa665
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp
@@ -0,0 +1,184 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_gcc_ppc.hpp - g++ on PowerPC
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int * pw )
+{
+ // ++*pw;
+
+ int tmp;
+
+ __asm__
+ (
+ "0:\n\t"
+ "lwarx %1, 0, %2\n\t"
+ "addi %1, %1, 1\n\t"
+ "stwcx. %1, 0, %2\n\t"
+ "bne- 0b":
+
+ "=m"( *pw ), "=&b"( tmp ):
+ "r"( pw ), "m"( *pw ):
+ "cc"
+ );
+}
+
+inline int atomic_decrement( int * pw )
+{
+ // return --*pw;
+
+ int rv;
+
+ __asm__ __volatile__
+ (
+ "sync\n\t"
+ "0:\n\t"
+ "lwarx %1, 0, %2\n\t"
+ "addi %1, %1, -1\n\t"
+ "stwcx. %1, 0, %2\n\t"
+ "bne- 0b\n\t"
+ "isync":
+
+ "=m"( *pw ), "=&b"( rv ):
+ "r"( pw ), "m"( *pw ):
+ "memory", "cc"
+ );
+
+ return rv;
+}
+
+inline int atomic_conditional_increment( int * pw )
+{
+ // if( *pw != 0 ) ++*pw;
+ // return *pw;
+
+ int rv;
+
+ __asm__
+ (
+ "0:\n\t"
+ "lwarx %1, 0, %2\n\t"
+ "cmpwi %1, 0\n\t"
+ "beq 1f\n\t"
+ "addi %1, %1, 1\n\t"
+ "1:\n\t"
+ "stwcx. %1, 0, %2\n\t"
+ "bne- 0b":
+
+ "=m"( *pw ), "=&b"( rv ):
+ "r"( pw ), "m"( *pw ):
+ "cc"
+ );
+
+ return rv;
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<int const volatile &>( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_PPC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp
new file mode 100644
index 00000000000..2f27b96e1e7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_sparc.hpp
@@ -0,0 +1,169 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+
+//
+// Copyright (c) 2006 Piotr Wyderski
+// Copyright (c) 2006 Tomas Puverle
+// Copyright (c) 2006 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// Thanks to Michael van der Westhuizen
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+#include <inttypes.h> // int32_t
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline int32_t compare_and_swap( int32_t * dest_, int32_t compare_, int32_t swap_ )
+{
+ __asm__ __volatile__( "cas [%1], %2, %0"
+ : "+r" (swap_)
+ : "r" (dest_), "r" (compare_)
+ : "memory" );
+
+ return swap_;
+}
+
+inline int32_t atomic_fetch_and_add( int32_t * pw, int32_t dv )
+{
+ // long r = *pw;
+ // *pw += dv;
+ // return r;
+
+ for( ;; )
+ {
+ int32_t r = *pw;
+
+ if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) )
+ {
+ return r;
+ }
+ }
+}
+
+inline void atomic_increment( int32_t * pw )
+{
+ atomic_fetch_and_add( pw, 1 );
+}
+
+inline int32_t atomic_decrement( int32_t * pw )
+{
+ return atomic_fetch_and_add( pw, -1 );
+}
+
+inline int32_t atomic_conditional_increment( int32_t * pw )
+{
+ // long r = *pw;
+ // if( r != 0 ) ++*pw;
+ // return r;
+
+ for( ;; )
+ {
+ int32_t r = *pw;
+
+ if( r == 0 )
+ {
+ return r;
+ }
+
+ if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) )
+ {
+ return r;
+ }
+ }
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int32_t use_count_; // #shared
+ int32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return const_cast< int32_t const volatile & >( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_SPARC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp
new file mode 100644
index 00000000000..ec44c7066f1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_gcc_x86.hpp
@@ -0,0 +1,176 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_gcc_x86.hpp - g++ on 486+ or AMD64
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline int atomic_exchange_and_add( int * pw, int dv )
+{
+ // int r = *pw;
+ // *pw += dv;
+ // return r;
+
+ int r;
+
+ __asm__ __volatile__
+ (
+ "lock\n\t"
+ "xadd %1, %0":
+ "=m"( *pw ), "=r"( r ): // outputs (%0, %1)
+ "m"( *pw ), "1"( dv ): // inputs (%2, %3 == %1)
+ "memory", "cc" // clobbers
+ );
+
+ return r;
+}
+
+inline void atomic_increment( int * pw )
+{
+ //atomic_exchange_and_add( pw, 1 );
+
+ __asm__
+ (
+ "lock\n\t"
+ "incl %0":
+ "=m"( *pw ): // output (%0)
+ "m"( *pw ): // input (%1)
+ "cc" // clobbers
+ );
+}
+
+inline int atomic_conditional_increment( int * pw )
+{
+ // int rv = *pw;
+ // if( rv != 0 ) ++*pw;
+ // return rv;
+
+ int rv, tmp;
+
+ __asm__
+ (
+ "movl %0, %%eax\n\t"
+ "0:\n\t"
+ "test %%eax, %%eax\n\t"
+ "je 1f\n\t"
+ "movl %%eax, %2\n\t"
+ "incl %2\n\t"
+ "lock\n\t"
+ "cmpxchgl %2, %0\n\t"
+ "jne 0b\n\t"
+ "1:":
+ "=m"( *pw ), "=&a"( rv ), "=&r"( tmp ): // outputs (%0, %1, %2)
+ "m"( *pw ): // input (%3)
+ "cc" // clobbers
+ );
+
+ return rv;
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<int const volatile &>( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_GCC_X86_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp
new file mode 100644
index 00000000000..e61bd88362e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_nt.hpp
@@ -0,0 +1,110 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_nt.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ long use_count_; // #shared
+ long weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ ++use_count_;
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ if( use_count_ == 0 ) return false;
+ ++use_count_;
+ return true;
+ }
+
+ void release() // nothrow
+ {
+ if( --use_count_ == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ ++weak_count_;
+ }
+
+ void weak_release() // nothrow
+ {
+ if( --weak_count_ == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return use_count_;
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_NT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp
new file mode 100644
index 00000000000..3110f2380fa
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_pt.hpp
@@ -0,0 +1,139 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_pt.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <pthread.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ long use_count_; // #shared
+ long weak_count_; // #weak + (#shared != 0)
+
+ mutable pthread_mutex_t m_;
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+// HPUX 10.20 / DCE has a nonstandard pthread_mutex_init
+
+#if defined(__hpux) && defined(_DECTHREADS_)
+ BOOST_VERIFY( pthread_mutex_init( &m_, pthread_mutexattr_default ) == 0 );
+#else
+ BOOST_VERIFY( pthread_mutex_init( &m_, 0 ) == 0 );
+#endif
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ BOOST_VERIFY( pthread_mutex_destroy( &m_ ) == 0 );
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
+ ++use_count_;
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
+ bool r = use_count_ == 0? false: ( ++use_count_, true );
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
+ return r;
+ }
+
+ void release() // nothrow
+ {
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
+ long new_use_count = --use_count_;
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
+
+ if( new_use_count == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
+ ++weak_count_;
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
+ }
+
+ void weak_release() // nothrow
+ {
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
+ long new_weak_count = --weak_count_;
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
+
+ if( new_weak_count == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
+ long r = use_count_;
+ BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
+
+ return r;
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_PT_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp
new file mode 100644
index 00000000000..1b9979bfb56
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp
@@ -0,0 +1,164 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/sp_counted_base_gcc_sparc.hpp - g++ on Sparc V8+
+//
+// Copyright (c) 2006 Piotr Wyderski
+// Copyright (c) 2006 Tomas Puverle
+// Copyright (c) 2006 Peter Dimov
+// Copyright (c) 2011 Emil Dotchevski
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// Thanks to Michael van der Westhuizen
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+#include <inttypes.h> // uint32_t
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline uint32_t compare_and_swap( uint32_t * dest_, uint32_t compare_, uint32_t swap_ )
+{
+ return __builtin_cellAtomicCompareAndSwap32(dest_,compare_,swap_);
+}
+
+inline uint32_t atomic_fetch_and_add( uint32_t * pw, uint32_t dv )
+{
+ // long r = *pw;
+ // *pw += dv;
+ // return r;
+
+ for( ;; )
+ {
+ uint32_t r = *pw;
+
+ if( __builtin_expect((compare_and_swap(pw, r, r + dv) == r), 1) )
+ {
+ return r;
+ }
+ }
+}
+
+inline void atomic_increment( uint32_t * pw )
+{
+ (void) __builtin_cellAtomicIncr32( pw );
+}
+
+inline uint32_t atomic_decrement( uint32_t * pw )
+{
+ return __builtin_cellAtomicDecr32( pw );
+}
+
+inline uint32_t atomic_conditional_increment( uint32_t * pw )
+{
+ // long r = *pw;
+ // if( r != 0 ) ++*pw;
+ // return r;
+
+ for( ;; )
+ {
+ uint32_t r = *pw;
+
+ if( r == 0 )
+ {
+ return r;
+ }
+
+ if( __builtin_expect( ( compare_and_swap( pw, r, r + 1 ) == r ), 1 ) )
+ {
+ return r;
+ }
+ }
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ uint32_t use_count_; // #shared
+ uint32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return const_cast< uint32_t const volatile & >( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SNC_PS3_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp
new file mode 100644
index 00000000000..c0d69dcdcbc
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_solaris.hpp
@@ -0,0 +1,116 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED
+
+//
+// detail/sp_counted_base_solaris.hpp
+// based on: detail/sp_counted_base_w32.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+// Copyright 2006 Michael van der Westhuizen
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+#include <atomic.h>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ uint32_t use_count_; // #shared
+ uint32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_inc_32( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ for( ;; )
+ {
+ uint32_t tmp = static_cast< uint32_t const volatile& >( use_count_ );
+ if( tmp == 0 ) return false;
+ if( atomic_cas_32( &use_count_, tmp, tmp + 1 ) == tmp ) return true;
+ }
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_dec_32_nv( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_inc_32( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_dec_32_nv( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<long const volatile &>( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SOLARIS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp
new file mode 100644
index 00000000000..b9966260cba
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_spin.hpp
@@ -0,0 +1,134 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_spin.hpp - spinlock pool atomic emulation
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2008 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/smart_ptr/detail/spinlock_pool.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline int atomic_exchange_and_add( int * pw, int dv )
+{
+ spinlock_pool<1>::scoped_lock lock( pw );
+
+ int r = *pw;
+ *pw += dv;
+ return r;
+}
+
+inline void atomic_increment( int * pw )
+{
+ spinlock_pool<1>::scoped_lock lock( pw );
+ ++*pw;
+}
+
+inline int atomic_conditional_increment( int * pw )
+{
+ spinlock_pool<1>::scoped_lock lock( pw );
+
+ int rv = *pw;
+ if( rv != 0 ) ++*pw;
+ return rv;
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_exchange_and_add( &use_count_, -1 ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_exchange_and_add( &weak_count_, -1 ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ spinlock_pool<1>::scoped_lock lock( &use_count_ );
+ return use_count_;
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SPIN_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp
new file mode 100644
index 00000000000..8cd18c9541d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp
@@ -0,0 +1,139 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/sp_counted_base_std_atomic.hpp - C++11 std::atomic
+//
+// Copyright (c) 2007, 2013 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+#include <atomic>
+#include <cstdint>
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( std::atomic_int_least32_t * pw )
+{
+ pw->fetch_add( 1, std::memory_order_relaxed );
+}
+
+inline std::int_least32_t atomic_decrement( std::atomic_int_least32_t * pw )
+{
+ return pw->fetch_sub( 1, std::memory_order_acq_rel );
+}
+
+inline std::int_least32_t atomic_conditional_increment( std::atomic_int_least32_t * pw )
+{
+ // long r = *pw;
+ // if( r != 0 ) ++*pw;
+ // return r;
+
+ std::int_least32_t r = pw->load( std::memory_order_relaxed );
+
+ for( ;; )
+ {
+ if( r == 0 )
+ {
+ return r;
+ }
+
+ if( pw->compare_exchange_weak( r, r + 1, std::memory_order_relaxed, std::memory_order_relaxed ) )
+ {
+ return r;
+ }
+ }
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ std::atomic_int_least32_t use_count_; // #shared
+ std::atomic_int_least32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return use_count_.load( std::memory_order_acquire );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_STD_ATOMIC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp
new file mode 100644
index 00000000000..17128cc97e7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_sync.hpp
@@ -0,0 +1,158 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+// detail/sp_counted_base_sync.hpp - g++ 4.1+ __sync intrinsics
+//
+// Copyright (c) 2007 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+#include <limits.h>
+
+#if defined( __ia64__ ) && defined( __INTEL_COMPILER )
+# include <ia64intrin.h>
+#endif
+
+namespace boost
+{
+
+namespace detail
+{
+
+#if INT_MAX >= 2147483647
+
+typedef int sp_int32_t;
+
+#else
+
+typedef long sp_int32_t;
+
+#endif
+
+inline void atomic_increment( sp_int32_t * pw )
+{
+ __sync_fetch_and_add( pw, 1 );
+}
+
+inline sp_int32_t atomic_decrement( sp_int32_t * pw )
+{
+ return __sync_fetch_and_add( pw, -1 );
+}
+
+inline sp_int32_t atomic_conditional_increment( sp_int32_t * pw )
+{
+ // long r = *pw;
+ // if( r != 0 ) ++*pw;
+ // return r;
+
+ sp_int32_t r = *pw;
+
+ for( ;; )
+ {
+ if( r == 0 )
+ {
+ return r;
+ }
+
+ sp_int32_t r2 = __sync_val_compare_and_swap( pw, r, r + 1 );
+
+ if( r2 == r )
+ {
+ return r;
+ }
+ else
+ {
+ r = r2;
+ }
+ }
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ sp_int32_t use_count_; // #shared
+ sp_int32_t weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 1 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 1 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return const_cast< sp_int32_t const volatile & >( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_SYNC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
new file mode 100644
index 00000000000..088ed63972e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_vacpp_ppc.hpp
@@ -0,0 +1,153 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
+
+//
+// detail/sp_counted_base_vacpp_ppc.hpp - xlC(vacpp) on POWER
+// based on: detail/sp_counted_base_w32.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+// Copyright 2006 Michael van der Westhuizen
+// Copyright 2012 IBM Corp.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+extern "builtin" void __lwsync(void);
+extern "builtin" void __isync(void);
+extern "builtin" int __fetch_and_add(volatile int* addr, int val);
+extern "builtin" int __compare_and_swap(volatile int*, int*, int);
+
+namespace boost
+{
+
+namespace detail
+{
+
+inline void atomic_increment( int *pw )
+{
+ // ++*pw;
+ __lwsync();
+ __fetch_and_add(pw, 1);
+ __isync();
+}
+
+inline int atomic_decrement( int *pw )
+{
+ // return --*pw;
+ __lwsync();
+ int originalValue = __fetch_and_add(pw, -1);
+ __isync();
+
+ return (originalValue - 1);
+}
+
+inline int atomic_conditional_increment( int *pw )
+{
+ // if( *pw != 0 ) ++*pw;
+ // return *pw;
+
+ __lwsync();
+ int v = *const_cast<volatile int*>(pw);
+ for (;;)
+ // loop until state is known
+ {
+ if (v == 0) return 0;
+ if (__compare_and_swap(pw, &v, v + 1))
+ {
+ __isync(); return (v + 1);
+ }
+ }
+}
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ int use_count_; // #shared
+ int weak_count_; // #weak + (#shared != 0)
+ char pad[64] __attribute__((__aligned__(64)));
+ // pad to prevent false sharing
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ atomic_increment( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ return atomic_conditional_increment( &use_count_ ) != 0;
+ }
+
+ void release() // nothrow
+ {
+ if( atomic_decrement( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ atomic_increment( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( atomic_decrement( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return *const_cast<volatile int*>(&use_count_);
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_VACPP_PPC_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp
new file mode 100644
index 00000000000..46bd4d15a91
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_base_w32.hpp
@@ -0,0 +1,133 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_base_w32.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+//
+// Lock-free algorithm by Alexander Terekhov
+//
+// Thanks to Ben Hitchings for the #weak + (#shared != 0)
+// formulation
+//
+
+#include <boost/smart_ptr/detail/sp_interlocked.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/config.hpp>
+
+namespace boost
+{
+
+namespace detail
+{
+
+class BOOST_SYMBOL_VISIBLE sp_counted_base
+{
+private:
+
+ sp_counted_base( sp_counted_base const & );
+ sp_counted_base & operator= ( sp_counted_base const & );
+
+ long use_count_; // #shared
+ long weak_count_; // #weak + (#shared != 0)
+
+public:
+
+ sp_counted_base(): use_count_( 1 ), weak_count_( 1 )
+ {
+ }
+
+ virtual ~sp_counted_base() // nothrow
+ {
+ }
+
+ // dispose() is called when use_count_ drops to zero, to release
+ // the resources managed by *this.
+
+ virtual void dispose() = 0; // nothrow
+
+ // destroy() is called when weak_count_ drops to zero.
+
+ virtual void destroy() // nothrow
+ {
+ delete this;
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+ virtual void * get_untyped_deleter() = 0;
+
+ void add_ref_copy()
+ {
+ BOOST_SP_INTERLOCKED_INCREMENT( &use_count_ );
+ }
+
+ bool add_ref_lock() // true on success
+ {
+ for( ;; )
+ {
+ long tmp = static_cast< long const volatile& >( use_count_ );
+ if( tmp == 0 ) return false;
+
+#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, == 1200 )
+
+ // work around a code generation bug
+
+ long tmp2 = tmp + 1;
+ if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp2, tmp ) == tmp2 - 1 ) return true;
+
+#else
+
+ if( BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE( &use_count_, tmp + 1, tmp ) == tmp ) return true;
+
+#endif
+ }
+ }
+
+ void release() // nothrow
+ {
+ if( BOOST_SP_INTERLOCKED_DECREMENT( &use_count_ ) == 0 )
+ {
+ dispose();
+ weak_release();
+ }
+ }
+
+ void weak_add_ref() // nothrow
+ {
+ BOOST_SP_INTERLOCKED_INCREMENT( &weak_count_ );
+ }
+
+ void weak_release() // nothrow
+ {
+ if( BOOST_SP_INTERLOCKED_DECREMENT( &weak_count_ ) == 0 )
+ {
+ destroy();
+ }
+ }
+
+ long use_count() const // nothrow
+ {
+ return static_cast<long const volatile &>( use_count_ );
+ }
+};
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_BASE_W32_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_impl.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_impl.hpp
new file mode 100644
index 00000000000..3c0502a4ecf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_counted_impl.hpp
@@ -0,0 +1,292 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// detail/sp_counted_impl.hpp
+//
+// Copyright (c) 2001, 2002, 2003 Peter Dimov and Multi Media Ltd.
+// Copyright 2004-2005 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#include <boost/config.hpp>
+
+#if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR)
+# error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible.
+#endif
+
+#include <boost/checked_delete.hpp>
+#include <boost/smart_ptr/detail/sp_counted_base.hpp>
+#include <boost/core/addressof.hpp>
+
+#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
+#include <boost/smart_ptr/detail/quick_allocator.hpp>
+#endif
+
+#if defined(BOOST_SP_USE_STD_ALLOCATOR)
+#include <memory> // std::allocator
+#endif
+
+#include <cstddef> // std::size_t
+
+namespace boost
+{
+
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+
+void sp_scalar_constructor_hook( void * px, std::size_t size, void * pn );
+void sp_scalar_destructor_hook( void * px, std::size_t size, void * pn );
+
+#endif
+
+namespace detail
+{
+
+// get_local_deleter
+
+template<class D> class local_sp_deleter;
+
+template<class D> D * get_local_deleter( D * /*p*/ )
+{
+ return 0;
+}
+
+template<class D> D * get_local_deleter( local_sp_deleter<D> * p );
+
+//
+
+template<class X> class BOOST_SYMBOL_VISIBLE sp_counted_impl_p: public sp_counted_base
+{
+private:
+
+ X * px_;
+
+ sp_counted_impl_p( sp_counted_impl_p const & );
+ sp_counted_impl_p & operator= ( sp_counted_impl_p const & );
+
+ typedef sp_counted_impl_p<X> this_type;
+
+public:
+
+ explicit sp_counted_impl_p( X * px ): px_( px )
+ {
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ boost::sp_scalar_constructor_hook( px, sizeof(X), this );
+#endif
+ }
+
+ virtual void dispose() // nothrow
+ {
+#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
+ boost::sp_scalar_destructor_hook( px_, sizeof(X), this );
+#endif
+ boost::checked_delete( px_ );
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & )
+ {
+ return 0;
+ }
+
+ virtual void * get_local_deleter( sp_typeinfo const & )
+ {
+ return 0;
+ }
+
+ virtual void * get_untyped_deleter()
+ {
+ return 0;
+ }
+
+#if defined(BOOST_SP_USE_STD_ALLOCATOR)
+
+ void * operator new( std::size_t )
+ {
+ return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
+ }
+
+ void operator delete( void * p )
+ {
+ std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
+ }
+
+#endif
+
+#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
+
+ void * operator new( std::size_t )
+ {
+ return quick_allocator<this_type>::alloc();
+ }
+
+ void operator delete( void * p )
+ {
+ quick_allocator<this_type>::dealloc( p );
+ }
+
+#endif
+};
+
+//
+// Borland's Codeguard trips up over the -Vx- option here:
+//
+#ifdef __CODEGUARD__
+# pragma option push -Vx-
+#endif
+
+template<class P, class D> class BOOST_SYMBOL_VISIBLE sp_counted_impl_pd: public sp_counted_base
+{
+private:
+
+ P ptr; // copy constructor must not throw
+ D del; // copy constructor must not throw
+
+ sp_counted_impl_pd( sp_counted_impl_pd const & );
+ sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & );
+
+ typedef sp_counted_impl_pd<P, D> this_type;
+
+public:
+
+ // pre: d(p) must not throw
+
+ sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d )
+ {
+ }
+
+ sp_counted_impl_pd( P p ): ptr( p ), del()
+ {
+ }
+
+ virtual void dispose() // nothrow
+ {
+ del( ptr );
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti )
+ {
+ return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
+ }
+
+ virtual void * get_local_deleter( sp_typeinfo const & ti )
+ {
+ return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0;
+ }
+
+ virtual void * get_untyped_deleter()
+ {
+ return &reinterpret_cast<char&>( del );
+ }
+
+#if defined(BOOST_SP_USE_STD_ALLOCATOR)
+
+ void * operator new( std::size_t )
+ {
+ return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
+ }
+
+ void operator delete( void * p )
+ {
+ std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
+ }
+
+#endif
+
+#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
+
+ void * operator new( std::size_t )
+ {
+ return quick_allocator<this_type>::alloc();
+ }
+
+ void operator delete( void * p )
+ {
+ quick_allocator<this_type>::dealloc( p );
+ }
+
+#endif
+};
+
+template<class P, class D, class A> class BOOST_SYMBOL_VISIBLE sp_counted_impl_pda: public sp_counted_base
+{
+private:
+
+ P p_; // copy constructor must not throw
+ D d_; // copy constructor must not throw
+ A a_; // copy constructor must not throw
+
+ sp_counted_impl_pda( sp_counted_impl_pda const & );
+ sp_counted_impl_pda & operator= ( sp_counted_impl_pda const & );
+
+ typedef sp_counted_impl_pda<P, D, A> this_type;
+
+public:
+
+ // pre: d( p ) must not throw
+
+ sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a )
+ {
+ }
+
+ sp_counted_impl_pda( P p, A a ): p_( p ), d_( a ), a_( a )
+ {
+ }
+
+ virtual void dispose() // nothrow
+ {
+ d_( p_ );
+ }
+
+ virtual void destroy() // nothrow
+ {
+#if !defined( BOOST_NO_CXX11_ALLOCATOR )
+
+ typedef typename std::allocator_traits<A>::template rebind_alloc< this_type > A2;
+
+#else
+
+ typedef typename A::template rebind< this_type >::other A2;
+
+#endif
+
+ A2 a2( a_ );
+
+ this->~this_type();
+
+ a2.deallocate( this, 1 );
+ }
+
+ virtual void * get_deleter( sp_typeinfo const & ti )
+ {
+ return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
+ }
+
+ virtual void * get_local_deleter( sp_typeinfo const & ti )
+ {
+ return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0;
+ }
+
+ virtual void * get_untyped_deleter()
+ {
+ return &reinterpret_cast<char&>( d_ );
+ }
+};
+
+#ifdef __CODEGUARD__
+# pragma option pop
+#endif
+
+} // namespace detail
+
+} // namespace boost
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp
index f79bdf38a8d..f79bdf38a8d 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_disable_deprecated.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_forward.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_forward.hpp
index 8fdec65b7fa..8fdec65b7fa 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_forward.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_forward.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_has_sync.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_has_sync.hpp
index e1debf0cc9b..e1debf0cc9b 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_has_sync.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_has_sync.hpp
diff --git a/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_interlocked.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_interlocked.hpp
new file mode 100644
index 00000000000..e181b8eeaed
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_interlocked.hpp
@@ -0,0 +1,173 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// boost/detail/sp_interlocked.hpp
+//
+// Copyright 2005, 2014 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+
+#include <boost/config.hpp>
+
+// BOOST_SP_HAS_INTRIN_H
+
+// VC9 has intrin.h, but it collides with <utility>
+#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
+
+# define BOOST_SP_HAS_INTRIN_H
+
+// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets.
+#elif defined( __MINGW64_VERSION_MAJOR )
+
+// MinGW-w64 provides intrin.h for both 32 and 64-bit targets.
+# define BOOST_SP_HAS_INTRIN_H
+
+#elif defined( __LP64__ )
+
+// We have to use intrin.h on Cygwin 64
+# define BOOST_SP_HAS_INTRIN_H
+
+// Intel C++ on Windows on VC10+ stdlib
+#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
+
+# define BOOST_SP_HAS_INTRIN_H
+
+// clang-cl on Windows on VC10+ stdlib
+#elif defined( __clang__ ) && defined( _MSC_VER ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
+
+# define BOOST_SP_HAS_INTRIN_H
+
+#endif
+
+#if defined( BOOST_USE_WINDOWS_H )
+
+# include <windows.h>
+
+# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
+
+#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_SP_HAS_INTRIN_H )
+
+#include <intrin.h>
+
+# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#elif defined( _WIN32_WCE )
+
+#if _WIN32_WCE >= 0x600
+
+extern "C" long __cdecl _InterlockedIncrement( long volatile * );
+extern "C" long __cdecl _InterlockedDecrement( long volatile * );
+extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
+
+# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#else
+
+// under Windows CE we still have old-style Interlocked* functions
+
+extern "C" long __cdecl InterlockedIncrement( long* );
+extern "C" long __cdecl InterlockedDecrement( long* );
+extern "C" long __cdecl InterlockedCompareExchange( long*, long, long );
+extern "C" long __cdecl InterlockedExchange( long*, long );
+extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
+
+# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
+
+#endif
+
+#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
+
+#if defined( __CLRCALL_PURE_OR_CDECL )
+
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
+
+#else
+
+extern "C" long __cdecl _InterlockedIncrement( long volatile * );
+extern "C" long __cdecl _InterlockedDecrement( long volatile * );
+extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
+
+# if defined( BOOST_MSVC ) && BOOST_MSVC == 1310
+//From MSDN, Visual Studio .NET 2003 spedific: To declare one of the interlocked functions
+//for use as an intrinsic, the function must be declared with the leading underscore and
+//the new function must appear in a #pragma intrinsic statement.
+# pragma intrinsic( _InterlockedIncrement )
+# pragma intrinsic( _InterlockedDecrement )
+# pragma intrinsic( _InterlockedCompareExchange )
+# pragma intrinsic( _InterlockedExchange )
+# pragma intrinsic( _InterlockedExchangeAdd )
+# endif
+
+#endif
+
+# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
+
+namespace boost
+{
+
+namespace detail
+{
+
+extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * );
+extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * );
+extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long );
+extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long );
+extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long );
+
+} // namespace detail
+
+} // namespace boost
+
+# define BOOST_SP_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
+
+#else
+
+# error "Interlocked intrinsics not available"
+
+#endif
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_noexcept.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_noexcept.hpp
index 1287ba49525..1287ba49525 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_noexcept.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_noexcept.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_nullptr_t.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_nullptr_t.hpp
index 219ae8070a6..219ae8070a6 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/sp_nullptr_t.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/sp_nullptr_t.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock.hpp
index 0b618dfc155..0b618dfc155 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
index 24d08a8815f..24d08a8815f 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_nt.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_nt.hpp
index 1f399d0dd41..1f399d0dd41 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_nt.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_nt.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_pool.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pool.hpp
index 39cf180b242..39cf180b242 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_pool.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_pt.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pt.hpp
index f9cabfc3a7c..f9cabfc3a7c 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_pt.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_pt.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp
index a61c1cd96d1..a61c1cd96d1 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_std_atomic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_sync.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_sync.hpp
index a7145c5ac27..a7145c5ac27 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_sync.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_sync.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_w32.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_w32.hpp
index d34e4fc2b52..d34e4fc2b52 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/spinlock_w32.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/spinlock_w32.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/yield_k.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/yield_k.hpp
index 403f32f98be..403f32f98be 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/detail/yield_k.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/detail/yield_k.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/enable_shared_from_raw.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_raw.hpp
index 5cd3574e7c4..5cd3574e7c4 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/enable_shared_from_raw.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_raw.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/enable_shared_from_this.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_this.hpp
index fc4de0b5712..fc4de0b5712 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/enable_shared_from_this.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/enable_shared_from_this.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/intrusive_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ptr.hpp
index 0ab075d367b..0ab075d367b 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/intrusive_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/intrusive_ref_counter.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ref_counter.hpp
index c2f918d0a49..c2f918d0a49 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/intrusive_ref_counter.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/intrusive_ref_counter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/local_shared_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/local_shared_ptr.hpp
index 1bf1fdf1743..1bf1fdf1743 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/local_shared_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/local_shared_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared.hpp
index 23114fea268..23114fea268 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared_array.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_array.hpp
index 663f83479bf..663f83479bf 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared_object.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_object.hpp
index ab83d60e612..ab83d60e612 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/make_local_shared_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/make_local_shared_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/make_shared.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared.hpp
index dd9191c61d3..dd9191c61d3 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/make_shared.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/make_shared_array.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_array.hpp
index 2eaf4db71b8..2eaf4db71b8 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/make_shared_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/make_shared_object.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_object.hpp
index c681602dca2..c681602dca2 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/make_shared_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/make_shared_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/make_unique.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/make_unique.hpp
index eed503392b8..eed503392b8 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/make_unique.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/make_unique.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/owner_less.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/owner_less.hpp
index 5f50aeb5b84..5f50aeb5b84 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/owner_less.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/owner_less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/scoped_array.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/scoped_array.hpp
index 05dd05aea8d..05dd05aea8d 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/scoped_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/scoped_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/scoped_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/scoped_ptr.hpp
index 5325eba5ffe..5325eba5ffe 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/scoped_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/scoped_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/shared_array.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/shared_array.hpp
index 3ffa7426c30..3ffa7426c30 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/shared_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/shared_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/shared_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/shared_ptr.hpp
index 4ac0699ef67..4ac0699ef67 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/shared_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/shared_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/smart_ptr/weak_ptr.hpp b/src/third_party/boost-1.69.0/boost/smart_ptr/weak_ptr.hpp
index 54d9ef37812..54d9ef37812 100644
--- a/src/third_party/boost-1.68.0/boost/smart_ptr/weak_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/smart_ptr/weak_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/assert.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/assert.hpp
index 47b1b39909d..47b1b39909d 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/assert.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/assert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/actions.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/actions.hpp
index 43b638d7fa8..43b638d7fa8 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/actions.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/actions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/alternative.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/alternative.hpp
index 5e472a9a640..5e472a9a640 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/alternative.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/alternative.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/composite.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/composite.hpp
index b156cab198f..b156cab198f 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/composite.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/composite.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/difference.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/difference.hpp
index 7d1cb1433d0..7d1cb1433d0 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/difference.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/difference.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/directives.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/directives.hpp
index a66efa281ff..a66efa281ff 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/directives.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/directives.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp
index 69d4859b00e..69d4859b00e 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/exclusive_or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp
index 7a7599b85cc..7a7599b85cc 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/alternative.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/difference.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/difference.ipp
index f5df8c75282..f5df8c75282 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/difference.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/difference.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/directives.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/directives.ipp
index 96b2dd79c59..96b2dd79c59 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/directives.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/directives.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp
index 34831a7e9f8..34831a7e9f8 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/exclusive_or.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp
index 2810586cd72..2810586cd72 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/intersection.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp
index 8c4f5135c06..8c4f5135c06 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/kleene_star.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/list.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/list.ipp
index cd7965adfd0..cd7965adfd0 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/list.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/list.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/optional.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/optional.ipp
index 629eac8336f..629eac8336f 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/optional.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/optional.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/positive.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/positive.ipp
index 9698e69e55c..9698e69e55c 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/positive.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/positive.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp
index 283d420bc3a..283d420bc3a 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequence.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp
index 9f577a4f55c..9f577a4f55c 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_and.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp
index 521faf61ec2..521faf61ec2 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/impl/sequential_or.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/intersection.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/intersection.hpp
index 867c20f330b..867c20f330b 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/intersection.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/intersection.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/kleene_star.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/kleene_star.hpp
index 9b6c73a0080..9b6c73a0080 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/kleene_star.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/kleene_star.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/list.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/list.hpp
index cdb879e14a2..cdb879e14a2 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/list.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/list.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/operators.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/operators.hpp
index 5732ef9ae75..5732ef9ae75 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/optional.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/optional.hpp
index 69e49f9a3a1..69e49f9a3a1 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/optional.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/optional.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/positive.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/positive.hpp
index 7b494b45ca3..7b494b45ca3 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/positive.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/positive.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequence.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequence.hpp
index 3ccd9ea7a84..3ccd9ea7a84 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequence.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequence.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequential_and.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_and.hpp
index da11f8729a5..da11f8729a5 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequential_and.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequential_or.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_or.hpp
index b276f6c9c36..b276f6c9c36 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/composite/sequential_or.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/composite/sequential_or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/config.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/config.hpp
index 57eca7f037e..57eca7f037e 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/match.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match.ipp
index 0319dcf4e33..0319dcf4e33 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/match.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp
index 24d9a43791b..24d9a43791b 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/match_attr_traits.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/parser.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/parser.ipp
index d5abe692faf..d5abe692faf 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/impl/parser.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/impl/parser.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/match.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/match.hpp
index c82baa14894..c82baa14894 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/match.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/match.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/nil.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/nil.hpp
index c94c064d6bb..c94c064d6bb 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/nil.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/nil.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
index 137694ef2f6..137694ef2f6 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/impl/rule.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp
index 2f7dd23e801..2f7dd23e801 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
index bc465dceaca..bc465dceaca 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/parser_id.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/rule.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/rule.hpp
index 1d4336bcc94..1d4336bcc94 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/non_terminal/rule.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/non_terminal/rule.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/parser.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/parser.hpp
index 8f6bc6a3eeb..8f6bc6a3eeb 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/parser.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/parser.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp
index 19586f1a10d..19586f1a10d 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/numerics.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp
index cd92154bbf4..cd92154bbf4 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/impl/primitives.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/numerics.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics.hpp
index 20ea0911a16..20ea0911a16 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/numerics.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp
index b0f20d9aaaa..b0f20d9aaaa 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/numerics_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/primitives.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/primitives.hpp
index 4cbdd488cbf..4cbdd488cbf 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/primitives/primitives.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/primitives/primitives.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/safe_bool.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/safe_bool.hpp
index 73b6e7b64b5..73b6e7b64b5 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/safe_bool.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/safe_bool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp
index 1f1de8f19b8..1f1de8f19b8 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/impl/skipper.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/scanner.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner.hpp
index 38548770ebb..38548770ebb 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/scanner.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp
index efd78cfa544..efd78cfa544 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/scanner_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/skipper.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper.hpp
index 4e655aeafef..4e655aeafef 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/skipper.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp
index 228e618bace..228e618bace 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/core/scanner/skipper_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/debug.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug.hpp
index 9737b35beee..9737b35beee 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/debug.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/debug/debug_node.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/debug_node.hpp
index adc1f91f222..adc1f91f222 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/debug/debug_node.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/debug_node.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/debug/minimal.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/minimal.hpp
index 0cb42644aaf..0cb42644aaf 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/debug/minimal.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/debug/minimal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/meta/as_parser.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/meta/as_parser.hpp
index c5cc82d6434..c5cc82d6434 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/meta/as_parser.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/meta/as_parser.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/namespace.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/namespace.hpp
index f64fc81bb65..f64fc81bb65 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/namespace.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/namespace.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/chset.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset.hpp
index 36354564243..36354564243 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/chset.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/chset_operators.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset_operators.hpp
index d42b5faae48..d42b5faae48 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/chset_operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/chset_operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset.ipp
index f6da6f2f3fa..f6da6f2f3fa 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp
index ace650166fe..ace650166fe 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp
index e7d92723454..e7d92723454 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/basic_chset.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp
index 579bcaec708..579bcaec708 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp
index ede15673fca..ede15673fca 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset/range_run.ipp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp
index 842a679d6db..842a679d6db 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/utility/impl/chset_operators.ipp
diff --git a/src/third_party/boost-1.69.0/boost/spirit/home/classic/version.hpp b/src/third_party/boost-1.69.0/boost/spirit/home/classic/version.hpp
new file mode 100644
index 00000000000..f95532c5a3a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/spirit/home/classic/version.hpp
@@ -0,0 +1,30 @@
+/*=============================================================================
+ Copyright (c) 2001-2003 Hartmut Kaiser
+ http://spirit.sourceforge.net/
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+#if !defined(SPIRIT_CLASSIC_VERSION_HPP)
+#define SPIRIT_CLASSIC_VERSION_HPP
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// This checks, whether the used Boost library is at least V1.32.0
+//
+///////////////////////////////////////////////////////////////////////////////
+#include <boost/version.hpp>
+
+#if BOOST_VERSION < 103200
+#error "Spirit v1.8.x needs at least Boost V1.32.0 to compile successfully."
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
+//
+// This is the version of the current Spirit distribution
+//
+///////////////////////////////////////////////////////////////////////////////
+#define SPIRIT_VERSION 0x1810
+#define SPIRIT_PIZZA_VERSION SPIRIT_MEGA_VEGGI // :-)
+
+#endif // defined(SPIRIT_VERSION_HPP)
diff --git a/src/third_party/boost-1.68.0/boost/spirit/include/classic_actions.hpp b/src/third_party/boost-1.69.0/boost/spirit/include/classic_actions.hpp
index a37d631b564..a37d631b564 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/include/classic_actions.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/include/classic_actions.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/include/classic_chset.hpp b/src/third_party/boost-1.69.0/boost/spirit/include/classic_chset.hpp
index 2f8df490da6..2f8df490da6 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/include/classic_chset.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/include/classic_chset.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/include/classic_numerics.hpp b/src/third_party/boost-1.69.0/boost/spirit/include/classic_numerics.hpp
index 75f7c053b5c..75f7c053b5c 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/include/classic_numerics.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/include/classic_numerics.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/include/classic_operators.hpp b/src/third_party/boost-1.69.0/boost/spirit/include/classic_operators.hpp
index c05d947796b..c05d947796b 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/include/classic_operators.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/include/classic_operators.hpp
diff --git a/src/third_party/boost-1.68.0/boost/spirit/include/classic_rule.hpp b/src/third_party/boost-1.69.0/boost/spirit/include/classic_rule.hpp
index c2e0df1d346..c2e0df1d346 100644
--- a/src/third_party/boost-1.68.0/boost/spirit/include/classic_rule.hpp
+++ b/src/third_party/boost-1.69.0/boost/spirit/include/classic_rule.hpp
diff --git a/src/third_party/boost-1.68.0/boost/static_assert.hpp b/src/third_party/boost-1.69.0/boost/static_assert.hpp
index 07d461d492b..07d461d492b 100644
--- a/src/third_party/boost-1.68.0/boost/static_assert.hpp
+++ b/src/third_party/boost-1.69.0/boost/static_assert.hpp
diff --git a/src/third_party/boost-1.68.0/boost/swap.hpp b/src/third_party/boost-1.69.0/boost/swap.hpp
index 55cafa4fdd8..55cafa4fdd8 100644
--- a/src/third_party/boost-1.68.0/boost/swap.hpp
+++ b/src/third_party/boost-1.69.0/boost/swap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/system/api_config.hpp b/src/third_party/boost-1.69.0/boost/system/api_config.hpp
index 28b8bece4cc..28b8bece4cc 100644
--- a/src/third_party/boost-1.68.0/boost/system/api_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/system/api_config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/system/config.hpp b/src/third_party/boost-1.69.0/boost/system/config.hpp
new file mode 100644
index 00000000000..1e5f6865114
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/system/config.hpp
@@ -0,0 +1,50 @@
+// boost/system/config.hpp -----------------------------------------------------------//
+
+// Copyright Beman Dawes 2003, 2006
+
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/system for documentation.
+
+#ifndef BOOST_SYSTEM_CONFIG_HPP
+#define BOOST_SYSTEM_CONFIG_HPP
+
+#include <boost/config.hpp>
+#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
+
+// This header implemented separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
+//
+// It's only retained for compatibility now that the library is header-only.
+
+// normalize macros ------------------------------------------------------------------//
+
+#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
+ && !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
+# define BOOST_SYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
+# define BOOST_SYSTEM_DYN_LINK
+#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
+# define BOOST_SYSTEM_STATIC_LINK
+#endif
+
+#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
+# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
+#endif
+
+// enable dynamic or static linking as requested --------------------------------------//
+
+#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
+# if defined(BOOST_SYSTEM_SOURCE)
+# define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
+# else
+# define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
+# endif
+#else
+# define BOOST_SYSTEM_DECL
+#endif
+
+#endif // BOOST_SYSTEM_CONFIG_HPP
diff --git a/src/third_party/boost-1.69.0/boost/system/detail/config.hpp b/src/third_party/boost-1.69.0/boost/system/detail/config.hpp
new file mode 100644
index 00000000000..2ad8201476e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/system/detail/config.hpp
@@ -0,0 +1,57 @@
+#ifndef BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
+#define BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
+
+// Copyright 2018 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/system for documentation.
+
+#include <boost/config.hpp>
+#include <boost/config/workaround.hpp>
+
+// BOOST_SYSTEM_HAS_SYSTEM_ERROR
+
+#if !defined(BOOST_NO_CXX11_HDR_SYSTEM_ERROR)
+# define BOOST_SYSTEM_HAS_SYSTEM_ERROR
+#endif
+
+#if BOOST_WORKAROUND(BOOST_GCC, < 40600)
+// g++ 4.4's <map> is not good enough
+# undef BOOST_SYSTEM_HAS_SYSTEM_ERROR
+#endif
+
+// BOOST_SYSTEM_NOEXCEPT
+// Retained for backward compatibility
+
+#define BOOST_SYSTEM_NOEXCEPT BOOST_NOEXCEPT
+
+// BOOST_SYSTEM_HAS_CONSTEXPR
+
+#if !defined(BOOST_NO_CXX14_CONSTEXPR)
+# define BOOST_SYSTEM_HAS_CONSTEXPR
+#endif
+
+#if BOOST_WORKAROUND(BOOST_GCC, < 60000)
+# undef BOOST_SYSTEM_HAS_CONSTEXPR
+#endif
+
+#if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
+# define BOOST_SYSTEM_CONSTEXPR constexpr
+#else
+# define BOOST_SYSTEM_CONSTEXPR
+#endif
+
+// BOOST_SYSTEM_REQUIRE_CONST_INIT
+
+#define BOOST_SYSTEM_REQUIRE_CONST_INIT
+
+#if defined(__has_cpp_attribute)
+#if __has_cpp_attribute(clang::require_constant_initialization)
+# undef BOOST_SYSTEM_REQUIRE_CONST_INIT
+# define BOOST_SYSTEM_REQUIRE_CONST_INIT [[clang::require_constant_initialization]]
+#endif
+#endif
+
+#endif // BOOST_SYSTEM_DETAIL_CONFIG_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/system/detail/generic_category.hpp b/src/third_party/boost-1.69.0/boost/system/detail/generic_category.hpp
new file mode 100644
index 00000000000..35175f8bcc7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/system/detail/generic_category.hpp
@@ -0,0 +1,101 @@
+// Implementation details of generic_error_category
+//
+// Copyright 2018 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See library home page at http://www.boost.org/libs/system
+
+#include <cstring>
+
+namespace boost
+{
+
+namespace system
+{
+
+namespace detail
+{
+
+#if defined(__GLIBC__)
+
+// glibc has two incompatible strerror_r definitions
+
+inline char const * strerror_r_helper( char const * r, char const * ) BOOST_NOEXCEPT
+{
+ return r;
+}
+
+inline char const * strerror_r_helper( int r, char const * buffer ) BOOST_NOEXCEPT
+{
+ return r == 0? buffer: "Unknown error";
+}
+
+inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
+{
+ return strerror_r_helper( strerror_r( ev, buffer, len ), buffer );
+}
+
+inline std::string generic_error_category_message( int ev )
+{
+ char buffer[ 128 ];
+ return generic_error_category_message( ev, buffer, sizeof( buffer ) );
+}
+
+#else
+
+// std::strerror is thread-safe on everything else, incl. Windows
+
+# if defined( BOOST_MSVC )
+# pragma warning( push )
+# pragma warning( disable: 4996 )
+# elif defined(__clang__) && defined(__has_warning)
+# pragma clang diagnostic push
+# if __has_warning("-Wdeprecated-declarations")
+# pragma clang diagnostic ignored "-Wdeprecated-declarations"
+# endif
+# endif
+
+inline std::string generic_error_category_message( int ev )
+{
+ char const * m = std::strerror( ev );
+ return m? m: "Unknown error";
+}
+
+inline char const * generic_error_category_message( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
+{
+ if( len == 0 )
+ {
+ return buffer;
+ }
+
+ if( len == 1 )
+ {
+ buffer[0] = 0;
+ return buffer;
+ }
+
+ char const * m = std::strerror( ev );
+
+ if( m == 0 ) return "Unknown error";
+
+ std::strncpy( buffer, m, len - 1 );
+ buffer[ len-1 ] = 0;
+
+ return buffer;
+}
+
+# if defined( BOOST_MSVC )
+# pragma warning( pop )
+# elif defined(__clang__) && defined(__has_warning)
+# pragma clang diagnostic pop
+# endif
+
+#endif
+
+} // namespace detail
+
+} // namespace system
+
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/boost/system/detail/std_interoperability.hpp b/src/third_party/boost-1.69.0/boost/system/detail/std_interoperability.hpp
new file mode 100644
index 00000000000..b1b41d39b48
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/system/detail/std_interoperability.hpp
@@ -0,0 +1,141 @@
+// Support for interoperability between Boost.System and <system_error>
+//
+// Copyright 2018 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See library home page at http://www.boost.org/libs/system
+
+#include <system_error>
+#include <map>
+#include <memory>
+
+//
+
+namespace boost
+{
+
+namespace system
+{
+
+namespace detail
+{
+
+class BOOST_SYMBOL_VISIBLE std_category: public std::error_category
+{
+private:
+
+ boost::system::error_category const * pc_;
+
+public:
+
+ explicit std_category( boost::system::error_category const * pc ): pc_( pc )
+ {
+ }
+
+ virtual const char * name() const BOOST_NOEXCEPT
+ {
+ return pc_->name();
+ }
+
+ virtual std::string message( int ev ) const
+ {
+ return pc_->message( ev );
+ }
+
+ virtual std::error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT
+ {
+ return pc_->default_error_condition( ev );
+ }
+
+ virtual bool equivalent( int code, const std::error_condition & condition ) const BOOST_NOEXCEPT;
+ virtual bool equivalent( const std::error_code & code, int condition ) const BOOST_NOEXCEPT;
+};
+
+inline std::error_category const & to_std_category( boost::system::error_category const & cat )
+{
+ typedef std::map< boost::system::error_category const *, std::unique_ptr<std_category> > map_type;
+
+ static map_type map_;
+
+ map_type::iterator i = map_.find( &cat );
+
+ if( i == map_.end() )
+ {
+ std::unique_ptr<std_category> p( new std_category( &cat ) );
+
+ std::pair<map_type::iterator, bool> r = map_.insert( map_type::value_type( &cat, std::move( p ) ) );
+
+ i = r.first;
+ }
+
+ return *i->second;
+}
+
+inline bool std_category::equivalent( int code, const std::error_condition & condition ) const BOOST_NOEXCEPT
+{
+ if( condition.category() == *this )
+ {
+ boost::system::error_condition bn( condition.value(), *pc_ );
+ return pc_->equivalent( code, bn );
+ }
+ else if( condition.category() == std::generic_category() || condition.category() == boost::system::generic_category() )
+ {
+ boost::system::error_condition bn( condition.value(), boost::system::generic_category() );
+ return pc_->equivalent( code, bn );
+ }
+
+#ifndef BOOST_NO_RTTI
+
+ else if( std_category const* pc2 = dynamic_cast< std_category const* >( &condition.category() ) )
+ {
+ boost::system::error_condition bn( condition.value(), *pc2->pc_ );
+ return pc_->equivalent( code, bn );
+ }
+
+#endif
+
+ else
+ {
+ return default_error_condition( code ) == condition;
+ }
+}
+
+inline bool std_category::equivalent( const std::error_code & code, int condition ) const BOOST_NOEXCEPT
+{
+ if( code.category() == *this )
+ {
+ boost::system::error_code bc( code.value(), *pc_ );
+ return pc_->equivalent( bc, condition );
+ }
+ else if( code.category() == std::generic_category() || code.category() == boost::system::generic_category() )
+ {
+ boost::system::error_code bc( code.value(), boost::system::generic_category() );
+ return pc_->equivalent( bc, condition );
+ }
+
+#ifndef BOOST_NO_RTTI
+
+ else if( std_category const* pc2 = dynamic_cast< std_category const* >( &code.category() ) )
+ {
+ boost::system::error_code bc( code.value(), *pc2->pc_ );
+ return pc_->equivalent( bc, condition );
+ }
+#endif
+
+ else if( *pc_ == boost::system::generic_category() )
+ {
+ return std::generic_category().equivalent( code, condition );
+ }
+ else
+ {
+ return false;
+ }
+}
+
+} // namespace detail
+
+} // namespace system
+
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/boost/system/detail/system_category_posix.hpp b/src/third_party/boost-1.69.0/boost/system/detail/system_category_posix.hpp
new file mode 100644
index 00000000000..9a40623d386
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/system/detail/system_category_posix.hpp
@@ -0,0 +1,132 @@
+// POSIX-specific implementation details of system_error_category
+//
+// Copyright 2018 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See library home page at http://www.boost.org/libs/system
+
+namespace boost
+{
+
+namespace system
+{
+
+namespace detail
+{
+
+inline bool is_generic_value( int ev ) BOOST_NOEXCEPT
+{
+ using namespace errc;
+
+ static int const gen[] =
+ {
+ success,
+ address_family_not_supported,
+ address_in_use,
+ address_not_available,
+ already_connected,
+ argument_list_too_long,
+ argument_out_of_domain,
+ bad_address,
+ bad_file_descriptor,
+ bad_message,
+ broken_pipe,
+ connection_aborted,
+ connection_already_in_progress,
+ connection_refused,
+ connection_reset,
+ cross_device_link,
+ destination_address_required,
+ device_or_resource_busy,
+ directory_not_empty,
+ executable_format_error,
+ file_exists,
+ file_too_large,
+ filename_too_long,
+ function_not_supported,
+ host_unreachable,
+ identifier_removed,
+ illegal_byte_sequence,
+ inappropriate_io_control_operation,
+ interrupted,
+ invalid_argument,
+ invalid_seek,
+ io_error,
+ is_a_directory,
+ message_size,
+ network_down,
+ network_reset,
+ network_unreachable,
+ no_buffer_space,
+ no_child_process,
+ no_link,
+ no_lock_available,
+ no_message_available,
+ no_message,
+ no_protocol_option,
+ no_space_on_device,
+ no_stream_resources,
+ no_such_device_or_address,
+ no_such_device,
+ no_such_file_or_directory,
+ no_such_process,
+ not_a_directory,
+ not_a_socket,
+ not_a_stream,
+ not_connected,
+ not_enough_memory,
+ not_supported,
+ operation_canceled,
+ operation_in_progress,
+ operation_not_permitted,
+ operation_not_supported,
+ operation_would_block,
+ owner_dead,
+ permission_denied,
+ protocol_error,
+ protocol_not_supported,
+ read_only_file_system,
+ resource_deadlock_would_occur,
+ resource_unavailable_try_again,
+ result_out_of_range,
+ state_not_recoverable,
+ stream_timeout,
+ text_file_busy,
+ timed_out,
+ too_many_files_open_in_system,
+ too_many_files_open,
+ too_many_links,
+ too_many_symbolic_link_levels,
+ value_too_large,
+ wrong_protocol_type
+ };
+
+ int const n = sizeof( gen ) / sizeof( gen[0] );
+
+ for( int i = 0; i < n; ++i )
+ {
+ if( ev == gen[ i ] ) return true;
+ }
+
+ return false;
+}
+
+inline error_condition system_category_default_error_condition_posix( int ev ) BOOST_NOEXCEPT
+{
+ if( is_generic_value( ev ) )
+ {
+ return error_condition( ev, generic_category() );
+ }
+ else
+ {
+ return error_condition( ev, system_category() );
+ }
+}
+
+} // namespace detail
+
+} // namespace system
+
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/boost/system/detail/system_category_win32.hpp b/src/third_party/boost-1.69.0/boost/system/detail/system_category_win32.hpp
new file mode 100644
index 00000000000..8a86e8180ea
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/system/detail/system_category_win32.hpp
@@ -0,0 +1,324 @@
+// Windows implementation of system_error_category
+//
+// Copyright Beman Dawes 2002, 2006
+// Copyright (c) Microsoft Corporation 2014
+// Copyright 2018 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See library home page at http://www.boost.org/libs/system
+
+#include <boost/winapi/error_codes.hpp>
+#include <boost/winapi/error_handling.hpp>
+#include <boost/winapi/character_code_conversion.hpp>
+#include <boost/winapi/local_memory.hpp>
+#include <cstdio>
+
+//
+
+namespace boost
+{
+
+namespace system
+{
+
+namespace detail
+{
+
+#if ( defined(_MSC_VER) && _MSC_VER < 1900 ) || ( defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) )
+
+inline char const * unknown_message_win32( int ev, char * buffer, std::size_t len )
+{
+# if defined( BOOST_MSVC )
+# pragma warning( push )
+# pragma warning( disable: 4996 )
+# endif
+
+ _snprintf( buffer, len - 1, "Unknown error (%d)", ev );
+
+ buffer[ len - 1 ] = 0;
+ return buffer;
+
+# if defined( BOOST_MSVC )
+# pragma warning( pop )
+# endif
+}
+
+#else
+
+inline char const * unknown_message_win32( int ev, char * buffer, std::size_t len )
+{
+ std::snprintf( buffer, len, "Unknown error (%d)", ev );
+ return buffer;
+}
+
+#endif
+
+inline boost::winapi::UINT_ message_cp_win32()
+{
+#if defined(BOOST_SYSTEM_USE_UTF8)
+
+ return boost::winapi::CP_UTF8_;
+
+#else
+
+ return boost::winapi::CP_ACP_;
+
+#endif
+}
+
+inline char const * system_category_message_win32( int ev, char * buffer, std::size_t len ) BOOST_NOEXCEPT
+{
+ if( len == 0 )
+ {
+ return buffer;
+ }
+
+ if( len == 1 )
+ {
+ buffer[0] = 0;
+ return buffer;
+ }
+
+#if defined(__GNUC__)
+# define BOOST_SYSTEM_ALLOCA __builtin_alloca
+#else
+# define BOOST_SYSTEM_ALLOCA _alloca
+#endif
+
+ wchar_t * wbuffer = static_cast<wchar_t*>( BOOST_SYSTEM_ALLOCA( len * sizeof( wchar_t ) ) );
+
+#undef BOOST_SYSTEM_ALLOCA
+
+ using namespace boost::winapi;
+
+ DWORD_ retval = boost::winapi::FormatMessageW(
+ FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
+ NULL,
+ ev,
+ MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
+ wbuffer,
+ static_cast<DWORD_>( len ),
+ NULL
+ );
+
+ if( retval == 0 )
+ {
+ return unknown_message_win32( ev, buffer, len );
+ }
+
+ UINT_ const code_page = message_cp_win32();
+
+ int r = boost::winapi::WideCharToMultiByte( code_page, 0, wbuffer, -1, buffer, static_cast<int>( len ), NULL, NULL );
+
+ if( r == 0 )
+ {
+ return unknown_message_win32( ev, buffer, len );
+ }
+
+ --r; // exclude null terminator
+
+ while( r > 0 && ( buffer[ r-1 ] == '\n' || buffer[ r-1 ] == '\r' ) )
+ {
+ buffer[ --r ] = 0;
+ }
+
+ if( r > 0 && buffer[ r-1 ] == '.' )
+ {
+ buffer[ --r ] = 0;
+ }
+
+ return buffer;
+}
+
+struct local_free
+{
+ void * p_;
+
+ ~local_free()
+ {
+ boost::winapi::LocalFree( p_ );
+ }
+};
+
+inline std::string unknown_message_win32( int ev )
+{
+ char buffer[ 38 ];
+ return unknown_message_win32( ev, buffer, sizeof( buffer ) );
+}
+
+inline std::string system_category_message_win32( int ev )
+{
+ using namespace boost::winapi;
+
+ wchar_t * lpMsgBuf = 0;
+
+ DWORD_ retval = boost::winapi::FormatMessageW(
+ FORMAT_MESSAGE_ALLOCATE_BUFFER_ | FORMAT_MESSAGE_FROM_SYSTEM_ | FORMAT_MESSAGE_IGNORE_INSERTS_,
+ NULL,
+ ev,
+ MAKELANGID_( LANG_NEUTRAL_, SUBLANG_DEFAULT_ ), // Default language
+ (LPWSTR_) &lpMsgBuf,
+ 0,
+ NULL
+ );
+
+ if( retval == 0 )
+ {
+ return unknown_message_win32( ev );
+ }
+
+ local_free lf_ = { lpMsgBuf };
+ (void)lf_;
+
+ UINT_ const code_page = message_cp_win32();
+
+ int r = boost::winapi::WideCharToMultiByte( code_page, 0, lpMsgBuf, -1, 0, 0, NULL, NULL );
+
+ if( r == 0 )
+ {
+ return unknown_message_win32( ev );
+ }
+
+ std::string buffer( r, char() );
+
+ r = boost::winapi::WideCharToMultiByte( code_page, 0, lpMsgBuf, -1, &buffer[0], r, NULL, NULL );
+
+ if( r == 0 )
+ {
+ return unknown_message_win32( ev );
+ }
+
+ --r; // exclude null terminator
+
+ while( r > 0 && ( buffer[ r-1 ] == '\n' || buffer[ r-1 ] == '\r' ) )
+ {
+ --r;
+ }
+
+ if( r > 0 && buffer[ r-1 ] == '.' )
+ {
+ --r;
+ }
+
+ buffer.resize( r );
+
+ return buffer;
+}
+
+inline error_condition system_category_default_error_condition_win32( int ev ) BOOST_NOEXCEPT
+{
+ // When using the Windows Runtime, most system errors are reported as HRESULTs.
+ // We want to map the common Win32 errors to their equivalent error condition,
+ // whether or not they are reported via an HRESULT.
+
+#define BOOST_SYSTEM_FAILED(hr) ((hr) < 0)
+#define BOOST_SYSTEM_HRESULT_FACILITY(hr) (((hr) >> 16) & 0x1fff)
+#define BOOST_SYSTEM_HRESULT_CODE(hr) ((hr) & 0xFFFF)
+#define BOOST_SYSTEM_FACILITY_WIN32 7
+
+ if( BOOST_SYSTEM_FAILED( ev ) && BOOST_SYSTEM_HRESULT_FACILITY( ev ) == BOOST_SYSTEM_FACILITY_WIN32 )
+ {
+ ev = BOOST_SYSTEM_HRESULT_CODE( ev );
+ }
+
+#undef BOOST_SYSTEM_FAILED
+#undef BOOST_SYSTEM_HRESULT_FACILITY
+#undef BOOST_SYSTEM_HRESULT_CODE
+#undef BOOST_SYSTEM_FACILITY_WIN32
+
+ using namespace boost::winapi;
+ using namespace errc;
+
+ // Windows system -> posix_errno decode table
+ // see WinError.h comments for descriptions of errors
+
+ switch ( ev )
+ {
+ case 0: return make_error_condition( success );
+
+ case ERROR_ACCESS_DENIED_: return make_error_condition( permission_denied );
+ case ERROR_ALREADY_EXISTS_: return make_error_condition( file_exists );
+ case ERROR_BAD_UNIT_: return make_error_condition( no_such_device );
+ case ERROR_BUFFER_OVERFLOW_: return make_error_condition( filename_too_long );
+ case ERROR_BUSY_: return make_error_condition( device_or_resource_busy );
+ case ERROR_BUSY_DRIVE_: return make_error_condition( device_or_resource_busy );
+ case ERROR_CANNOT_MAKE_: return make_error_condition( permission_denied );
+ case ERROR_CANTOPEN_: return make_error_condition( io_error );
+ case ERROR_CANTREAD_: return make_error_condition( io_error );
+ case ERROR_CANTWRITE_: return make_error_condition( io_error );
+ case ERROR_CURRENT_DIRECTORY_: return make_error_condition( permission_denied );
+ case ERROR_DEV_NOT_EXIST_: return make_error_condition( no_such_device );
+ case ERROR_DEVICE_IN_USE_: return make_error_condition( device_or_resource_busy );
+ case ERROR_DIR_NOT_EMPTY_: return make_error_condition( directory_not_empty );
+ case ERROR_DIRECTORY_: return make_error_condition( invalid_argument ); // WinError.h: "The directory name is invalid"
+ case ERROR_DISK_FULL_: return make_error_condition( no_space_on_device );
+ case ERROR_FILE_EXISTS_: return make_error_condition( file_exists );
+ case ERROR_FILE_NOT_FOUND_: return make_error_condition( no_such_file_or_directory );
+ case ERROR_HANDLE_DISK_FULL_: return make_error_condition( no_space_on_device );
+ case ERROR_INVALID_ACCESS_: return make_error_condition( permission_denied );
+ case ERROR_INVALID_DRIVE_: return make_error_condition( no_such_device );
+ case ERROR_INVALID_FUNCTION_: return make_error_condition( function_not_supported );
+ case ERROR_INVALID_HANDLE_: return make_error_condition( invalid_argument );
+ case ERROR_INVALID_NAME_: return make_error_condition( invalid_argument );
+ case ERROR_LOCK_VIOLATION_: return make_error_condition( no_lock_available );
+ case ERROR_LOCKED_: return make_error_condition( no_lock_available );
+ case ERROR_NEGATIVE_SEEK_: return make_error_condition( invalid_argument );
+ case ERROR_NOACCESS_: return make_error_condition( permission_denied );
+ case ERROR_NOT_ENOUGH_MEMORY_: return make_error_condition( not_enough_memory );
+ case ERROR_NOT_READY_: return make_error_condition( resource_unavailable_try_again );
+ case ERROR_NOT_SAME_DEVICE_: return make_error_condition( cross_device_link );
+ case ERROR_OPEN_FAILED_: return make_error_condition( io_error );
+ case ERROR_OPEN_FILES_: return make_error_condition( device_or_resource_busy );
+ case ERROR_OPERATION_ABORTED_: return make_error_condition( operation_canceled );
+ case ERROR_OUTOFMEMORY_: return make_error_condition( not_enough_memory );
+ case ERROR_PATH_NOT_FOUND_: return make_error_condition( no_such_file_or_directory );
+ case ERROR_READ_FAULT_: return make_error_condition( io_error );
+ case ERROR_RETRY_: return make_error_condition( resource_unavailable_try_again );
+ case ERROR_SEEK_: return make_error_condition( io_error );
+ case ERROR_SHARING_VIOLATION_: return make_error_condition( permission_denied );
+ case ERROR_TOO_MANY_OPEN_FILES_: return make_error_condition( too_many_files_open );
+ case ERROR_WRITE_FAULT_: return make_error_condition( io_error );
+ case ERROR_WRITE_PROTECT_: return make_error_condition( permission_denied );
+ case WSAEACCES_: return make_error_condition( permission_denied );
+ case WSAEADDRINUSE_: return make_error_condition( address_in_use );
+ case WSAEADDRNOTAVAIL_: return make_error_condition( address_not_available );
+ case WSAEAFNOSUPPORT_: return make_error_condition( address_family_not_supported );
+ case WSAEALREADY_: return make_error_condition( connection_already_in_progress );
+ case WSAEBADF_: return make_error_condition( bad_file_descriptor );
+ case WSAECONNABORTED_: return make_error_condition( connection_aborted );
+ case WSAECONNREFUSED_: return make_error_condition( connection_refused );
+ case WSAECONNRESET_: return make_error_condition( connection_reset );
+ case WSAEDESTADDRREQ_: return make_error_condition( destination_address_required );
+ case WSAEFAULT_: return make_error_condition( bad_address );
+ case WSAEHOSTUNREACH_: return make_error_condition( host_unreachable );
+ case WSAEINPROGRESS_: return make_error_condition( operation_in_progress );
+ case WSAEINTR_: return make_error_condition( interrupted );
+ case WSAEINVAL_: return make_error_condition( invalid_argument );
+ case WSAEISCONN_: return make_error_condition( already_connected );
+ case WSAEMFILE_: return make_error_condition( too_many_files_open );
+ case WSAEMSGSIZE_: return make_error_condition( message_size );
+ case WSAENAMETOOLONG_: return make_error_condition( filename_too_long );
+ case WSAENETDOWN_: return make_error_condition( network_down );
+ case WSAENETRESET_: return make_error_condition( network_reset );
+ case WSAENETUNREACH_: return make_error_condition( network_unreachable );
+ case WSAENOBUFS_: return make_error_condition( no_buffer_space );
+ case WSAENOPROTOOPT_: return make_error_condition( no_protocol_option );
+ case WSAENOTCONN_: return make_error_condition( not_connected );
+ case WSAENOTSOCK_: return make_error_condition( not_a_socket );
+ case WSAEOPNOTSUPP_: return make_error_condition( operation_not_supported );
+ case WSAEPROTONOSUPPORT_: return make_error_condition( protocol_not_supported );
+ case WSAEPROTOTYPE_: return make_error_condition( wrong_protocol_type );
+ case WSAETIMEDOUT_: return make_error_condition( timed_out );
+ case WSAEWOULDBLOCK_: return make_error_condition( operation_would_block );
+
+ default: return error_condition( ev, system_category() );
+ }
+}
+
+} // namespace detail
+
+} // namespace system
+
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/boost/system/error_code.hpp b/src/third_party/boost-1.69.0/boost/system/error_code.hpp
new file mode 100644
index 00000000000..d0c27353ad4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/system/error_code.hpp
@@ -0,0 +1,956 @@
+#ifndef BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
+#define BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
+
+// Copyright Beman Dawes 2006, 2007
+// Copyright Christoper Kohlhoff 2007
+// Copyright Peter Dimov 2017, 2018
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See library home page at http://www.boost.org/libs/system
+
+#include <boost/system/api_config.hpp>
+#include <boost/system/detail/config.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/config.hpp>
+#include <ostream>
+#include <string>
+#include <functional>
+#include <cstring>
+
+// TODO: undef these macros if not already defined
+#include <boost/cerrno.hpp>
+
+#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
+# include <system_error>
+#endif
+
+#if !defined(BOOST_POSIX_API) && !defined(BOOST_WINDOWS_API)
+# error BOOST_POSIX_API or BOOST_WINDOWS_API must be defined
+#endif
+
+namespace boost
+{
+
+namespace system
+{
+
+class error_code; // values defined by the operating system
+class error_condition; // portable generic values defined below, but ultimately
+ // based on the POSIX standard
+
+// "Concept" helpers
+
+template<class T> struct is_error_code_enum
+{
+ static const bool value = false;
+};
+
+template<class T> struct is_error_condition_enum
+{
+ static const bool value = false;
+};
+
+// Generic error_conditions
+
+namespace errc
+{
+
+enum errc_t
+{
+ success = 0,
+ address_family_not_supported = EAFNOSUPPORT,
+ address_in_use = EADDRINUSE,
+ address_not_available = EADDRNOTAVAIL,
+ already_connected = EISCONN,
+ argument_list_too_long = E2BIG,
+ argument_out_of_domain = EDOM,
+ bad_address = EFAULT,
+ bad_file_descriptor = EBADF,
+ bad_message = EBADMSG,
+ broken_pipe = EPIPE,
+ connection_aborted = ECONNABORTED,
+ connection_already_in_progress = EALREADY,
+ connection_refused = ECONNREFUSED,
+ connection_reset = ECONNRESET,
+ cross_device_link = EXDEV,
+ destination_address_required = EDESTADDRREQ,
+ device_or_resource_busy = EBUSY,
+ directory_not_empty = ENOTEMPTY,
+ executable_format_error = ENOEXEC,
+ file_exists = EEXIST,
+ file_too_large = EFBIG,
+ filename_too_long = ENAMETOOLONG,
+ function_not_supported = ENOSYS,
+ host_unreachable = EHOSTUNREACH,
+ identifier_removed = EIDRM,
+ illegal_byte_sequence = EILSEQ,
+ inappropriate_io_control_operation = ENOTTY,
+ interrupted = EINTR,
+ invalid_argument = EINVAL,
+ invalid_seek = ESPIPE,
+ io_error = EIO,
+ is_a_directory = EISDIR,
+ message_size = EMSGSIZE,
+ network_down = ENETDOWN,
+ network_reset = ENETRESET,
+ network_unreachable = ENETUNREACH,
+ no_buffer_space = ENOBUFS,
+ no_child_process = ECHILD,
+ no_link = ENOLINK,
+ no_lock_available = ENOLCK,
+ no_message_available = ENODATA,
+ no_message = ENOMSG,
+ no_protocol_option = ENOPROTOOPT,
+ no_space_on_device = ENOSPC,
+ no_stream_resources = ENOSR,
+ no_such_device_or_address = ENXIO,
+ no_such_device = ENODEV,
+ no_such_file_or_directory = ENOENT,
+ no_such_process = ESRCH,
+ not_a_directory = ENOTDIR,
+ not_a_socket = ENOTSOCK,
+ not_a_stream = ENOSTR,
+ not_connected = ENOTCONN,
+ not_enough_memory = ENOMEM,
+ not_supported = ENOTSUP,
+ operation_canceled = ECANCELED,
+ operation_in_progress = EINPROGRESS,
+ operation_not_permitted = EPERM,
+ operation_not_supported = EOPNOTSUPP,
+ operation_would_block = EWOULDBLOCK,
+ owner_dead = EOWNERDEAD,
+ permission_denied = EACCES,
+ protocol_error = EPROTO,
+ protocol_not_supported = EPROTONOSUPPORT,
+ read_only_file_system = EROFS,
+ resource_deadlock_would_occur = EDEADLK,
+ resource_unavailable_try_again = EAGAIN,
+ result_out_of_range = ERANGE,
+ state_not_recoverable = ENOTRECOVERABLE,
+ stream_timeout = ETIME,
+ text_file_busy = ETXTBSY,
+ timed_out = ETIMEDOUT,
+ too_many_files_open_in_system = ENFILE,
+ too_many_files_open = EMFILE,
+ too_many_links = EMLINK,
+ too_many_symbolic_link_levels = ELOOP,
+ value_too_large = EOVERFLOW,
+ wrong_protocol_type = EPROTOTYPE
+};
+
+} // namespace errc
+
+#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
+
+namespace posix = errc;
+namespace posix_error = errc;
+
+#endif
+
+template<> struct is_error_condition_enum<errc::errc_t>
+{
+ static const bool value = true;
+};
+
+// class error_category
+
+#ifdef BOOST_MSVC
+#pragma warning( push )
+// 'this' : used in base member initializer list
+#pragma warning( disable: 4355 )
+#endif
+
+std::size_t hash_value( error_code const & ec );
+
+class BOOST_SYMBOL_VISIBLE error_category
+{
+private:
+
+ friend std::size_t hash_value( error_code const & ec );
+
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+public:
+
+ error_category( error_category const & ) = delete;
+ error_category& operator=( error_category const & ) = delete;
+
+#else
+private:
+
+ error_category( error_category const & );
+ error_category& operator=( error_category const & );
+
+#endif
+
+private:
+
+ boost::ulong_long_type id_;
+
+protected:
+
+#if !defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(BOOST_NO_CXX11_NON_PUBLIC_DEFAULTED_FUNCTIONS)
+
+ ~error_category() = default;
+
+#else
+
+ // We'd like to make the destructor protected, to make code that deletes
+ // an error_category* not compile; unfortunately, doing the below makes
+ // the destructor user-provided and hence breaks use after main, as the
+ // categories may get destroyed before code that uses them
+
+ // ~error_category() {}
+
+#endif
+
+ BOOST_SYSTEM_CONSTEXPR error_category() BOOST_NOEXCEPT: id_( 0 )
+ {
+ }
+
+ explicit BOOST_SYSTEM_CONSTEXPR error_category( boost::ulong_long_type id ) BOOST_NOEXCEPT: id_( id )
+ {
+ }
+
+public:
+
+ virtual const char * name() const BOOST_NOEXCEPT = 0;
+
+ virtual error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT;
+ virtual bool equivalent( int code, const error_condition & condition ) const BOOST_NOEXCEPT;
+ virtual bool equivalent( const error_code & code, int condition ) const BOOST_NOEXCEPT;
+
+ virtual std::string message( int ev ) const = 0;
+ virtual char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT;
+
+ virtual bool failed( int ev ) const BOOST_NOEXCEPT;
+
+ BOOST_SYSTEM_CONSTEXPR bool operator==( const error_category & rhs ) const BOOST_NOEXCEPT
+ {
+ return rhs.id_ == 0? this == &rhs: id_ == rhs.id_;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR bool operator!=( const error_category & rhs ) const BOOST_NOEXCEPT
+ {
+ return !( *this == rhs );
+ }
+
+ BOOST_SYSTEM_CONSTEXPR bool operator<( const error_category & rhs ) const BOOST_NOEXCEPT
+ {
+ if( id_ < rhs.id_ )
+ {
+ return true;
+ }
+
+ if( id_ > rhs.id_ )
+ {
+ return false;
+ }
+
+ if( rhs.id_ != 0 )
+ {
+ return false; // equal
+ }
+
+ return std::less<error_category const *>()( this, &rhs );
+ }
+
+#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
+
+ operator std::error_category const & () const;
+
+#endif
+};
+
+#ifdef BOOST_MSVC
+#pragma warning( pop )
+#endif
+
+// predefined error categories
+
+namespace detail
+{
+
+class BOOST_SYMBOL_VISIBLE generic_error_category: public error_category
+{
+public:
+
+ // clang++ 3.8 and below: initialization of const object
+ // requires a user-provided default constructor
+ BOOST_SYSTEM_CONSTEXPR generic_error_category() BOOST_NOEXCEPT:
+ error_category( ( boost::ulong_long_type( 0xB2AB117A ) << 32 ) + 0x257EDF0D )
+ {
+ }
+
+ const char * name() const BOOST_NOEXCEPT
+ {
+ return "generic";
+ }
+
+ std::string message( int ev ) const;
+ char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT;
+};
+
+class BOOST_SYMBOL_VISIBLE system_error_category: public error_category
+{
+public:
+
+ BOOST_SYSTEM_CONSTEXPR system_error_category() BOOST_NOEXCEPT:
+ error_category( ( boost::ulong_long_type( 0x8FAFD21E ) << 32 ) + 0x25C5E09B )
+ {
+ }
+
+ const char * name() const BOOST_NOEXCEPT
+ {
+ return "system";
+ }
+
+ error_condition default_error_condition( int ev ) const BOOST_NOEXCEPT;
+
+ std::string message( int ev ) const;
+ char const * message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT;
+};
+
+} // namespace detail
+
+// generic_category(), system_category()
+
+#if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
+
+namespace detail
+{
+
+template<class T> struct cat_holder
+{
+ BOOST_SYSTEM_REQUIRE_CONST_INIT static constexpr system_error_category system_category_instance{};
+ BOOST_SYSTEM_REQUIRE_CONST_INIT static constexpr generic_error_category generic_category_instance{};
+};
+
+template<class T> BOOST_SYSTEM_REQUIRE_CONST_INIT constexpr system_error_category cat_holder<T>::system_category_instance;
+template<class T> BOOST_SYSTEM_REQUIRE_CONST_INIT constexpr generic_error_category cat_holder<T>::generic_category_instance;
+
+} // namespace detail
+
+constexpr error_category const & system_category() BOOST_NOEXCEPT
+{
+ return detail::cat_holder<void>::system_category_instance;
+}
+
+constexpr error_category const & generic_category() BOOST_NOEXCEPT
+{
+ return detail::cat_holder<void>::generic_category_instance;
+}
+
+#else // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
+
+inline error_category const & system_category() BOOST_NOEXCEPT
+{
+ static const detail::system_error_category system_category_instance;
+ return system_category_instance;
+}
+
+inline error_category const & generic_category() BOOST_NOEXCEPT
+{
+ static const detail::generic_error_category generic_category_instance;
+ return generic_category_instance;
+}
+
+#endif // #if defined(BOOST_SYSTEM_HAS_CONSTEXPR)
+
+// deprecated synonyms
+
+#ifdef BOOST_SYSTEM_ENABLE_DEPRECATED
+
+inline const error_category & get_system_category() { return system_category(); }
+inline const error_category & get_generic_category() { return generic_category(); }
+inline const error_category & get_posix_category() { return generic_category(); }
+static const error_category & posix_category BOOST_ATTRIBUTE_UNUSED = generic_category();
+static const error_category & errno_ecat BOOST_ATTRIBUTE_UNUSED = generic_category();
+static const error_category & native_ecat BOOST_ATTRIBUTE_UNUSED = system_category();
+
+#endif
+
+// enable_if
+
+namespace detail
+{
+
+template<bool C, class T = void> struct enable_if
+{
+ typedef T type;
+};
+
+template<class T> struct enable_if<false, T>
+{
+};
+
+// failed_impl
+
+#if !defined(BOOST_SYSTEM_HAS_CONSTEXPR)
+
+inline bool failed_impl( int ev, error_category const & cat )
+{
+ return cat.failed( ev );
+}
+
+#else
+
+BOOST_SYSTEM_CONSTEXPR inline bool failed_impl( int ev, error_category const & cat )
+{
+ if( cat == system_category() || cat == generic_category() )
+ {
+ return ev != 0;
+ }
+ else
+ {
+ return cat.failed( ev );
+ }
+}
+
+#endif
+
+} // namespace detail
+
+// class error_condition
+
+// error_conditions are portable, error_codes are system or library specific
+
+class error_condition
+{
+private:
+
+ int val_;
+ bool failed_;
+ error_category const * cat_;
+
+public:
+
+ // constructors:
+
+ BOOST_SYSTEM_CONSTEXPR error_condition() BOOST_NOEXCEPT:
+ val_( 0 ), failed_( false ), cat_( &generic_category() )
+ {
+ }
+
+ BOOST_SYSTEM_CONSTEXPR error_condition( int val, const error_category & cat ) BOOST_NOEXCEPT:
+ val_( val ), failed_( detail::failed_impl( val, cat ) ), cat_( &cat )
+ {
+ }
+
+ template<class ErrorConditionEnum> BOOST_SYSTEM_CONSTEXPR error_condition( ErrorConditionEnum e,
+ typename detail::enable_if<is_error_condition_enum<ErrorConditionEnum>::value>::type* = 0) BOOST_NOEXCEPT
+ {
+ *this = make_error_condition( e );
+ }
+
+ // modifiers:
+
+ BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) BOOST_NOEXCEPT
+ {
+ val_ = val;
+ failed_ = detail::failed_impl( val, cat );
+ cat_ = &cat;
+ }
+
+ template<typename ErrorConditionEnum>
+ BOOST_SYSTEM_CONSTEXPR typename detail::enable_if<is_error_condition_enum<ErrorConditionEnum>::value, error_condition>::type &
+ operator=( ErrorConditionEnum val ) BOOST_NOEXCEPT
+ {
+ *this = make_error_condition( val );
+ return *this;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR void clear() BOOST_NOEXCEPT
+ {
+ val_ = 0;
+ failed_ = false;
+ cat_ = &generic_category();
+ }
+
+ // observers:
+
+ BOOST_SYSTEM_CONSTEXPR int value() const BOOST_NOEXCEPT
+ {
+ return val_;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR const error_category & category() const BOOST_NOEXCEPT
+ {
+ return *cat_;
+ }
+
+ std::string message() const
+ {
+ return cat_->message( value() );
+ }
+
+ char const * message( char * buffer, std::size_t len ) const BOOST_NOEXCEPT
+ {
+ return cat_->message( value(), buffer, len );
+ }
+
+ BOOST_SYSTEM_CONSTEXPR bool failed() const BOOST_NOEXCEPT
+ {
+ return failed_;
+ }
+
+#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+
+ BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_NOEXCEPT // true if error
+ {
+ return failed_;
+ }
+
+#else
+
+ typedef void (*unspecified_bool_type)();
+ static void unspecified_bool_true() {}
+
+ BOOST_SYSTEM_CONSTEXPR operator unspecified_bool_type() const BOOST_NOEXCEPT // true if error
+ {
+ return failed_? unspecified_bool_true: 0;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_NOEXCEPT // true if no error
+ {
+ return !failed_;
+ }
+
+#endif
+
+ // relationals:
+ // the more symmetrical non-member syntax allows enum
+ // conversions work for both rhs and lhs.
+
+ BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
+ {
+ return lhs.val_ == rhs.val_ && *lhs.cat_ == *rhs.cat_;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR inline friend bool operator<( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
+ {
+ return *lhs.cat_ < *rhs.cat_ || ( *lhs.cat_ == *rhs.cat_ && lhs.val_ < rhs.val_ );
+ }
+
+#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
+
+ operator std::error_condition () const
+ {
+ return std::error_condition( value(), category() );
+ }
+
+#endif
+};
+
+// class error_code
+
+// We want error_code to be a value type that can be copied without slicing
+// and without requiring heap allocation, but we also want it to have
+// polymorphic behavior based on the error category. This is achieved by
+// abstract base class error_category supplying the polymorphic behavior,
+// and error_code containing a pointer to an object of a type derived
+// from error_category.
+
+class error_code
+{
+private:
+
+ int val_;
+ bool failed_;
+ const error_category * cat_;
+
+public:
+
+ // constructors:
+
+ BOOST_SYSTEM_CONSTEXPR error_code() BOOST_NOEXCEPT:
+ val_( 0 ), failed_( false ), cat_( &system_category() )
+ {
+ }
+
+ BOOST_SYSTEM_CONSTEXPR error_code( int val, const error_category & cat ) BOOST_NOEXCEPT:
+ val_( val ), failed_( detail::failed_impl( val, cat ) ), cat_( &cat )
+ {
+ }
+
+ template<class ErrorCodeEnum> BOOST_SYSTEM_CONSTEXPR error_code( ErrorCodeEnum e,
+ typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value>::type* = 0 ) BOOST_NOEXCEPT
+ {
+ *this = make_error_code( e );
+ }
+
+ // modifiers:
+
+ BOOST_SYSTEM_CONSTEXPR void assign( int val, const error_category & cat ) BOOST_NOEXCEPT
+ {
+ val_ = val;
+ failed_ = detail::failed_impl( val, cat );
+ cat_ = &cat;
+ }
+
+ template<typename ErrorCodeEnum>
+ BOOST_SYSTEM_CONSTEXPR typename detail::enable_if<is_error_code_enum<ErrorCodeEnum>::value, error_code>::type &
+ operator=( ErrorCodeEnum val ) BOOST_NOEXCEPT
+ {
+ *this = make_error_code( val );
+ return *this;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR void clear() BOOST_NOEXCEPT
+ {
+ val_ = 0;
+ failed_ = false;
+ cat_ = &system_category();
+ }
+
+ // observers:
+
+ BOOST_SYSTEM_CONSTEXPR int value() const BOOST_NOEXCEPT
+ {
+ return val_;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR const error_category & category() const BOOST_NOEXCEPT
+ {
+ return *cat_;
+ }
+
+ error_condition default_error_condition() const BOOST_NOEXCEPT
+ {
+ return cat_->default_error_condition( value() );
+ }
+
+ std::string message() const
+ {
+ return cat_->message( value() );
+ }
+
+ char const * message( char * buffer, std::size_t len ) const BOOST_NOEXCEPT
+ {
+ return cat_->message( value(), buffer, len );
+ }
+
+ BOOST_SYSTEM_CONSTEXPR bool failed() const BOOST_NOEXCEPT
+ {
+ return failed_;
+ }
+
+#if !defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+
+ BOOST_SYSTEM_CONSTEXPR explicit operator bool() const BOOST_NOEXCEPT // true if error
+ {
+ return failed_;
+ }
+
+#else
+
+ typedef void (*unspecified_bool_type)();
+ static void unspecified_bool_true() {}
+
+ BOOST_SYSTEM_CONSTEXPR operator unspecified_bool_type() const BOOST_NOEXCEPT // true if error
+ {
+ return failed_? unspecified_bool_true: 0;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR bool operator!() const BOOST_NOEXCEPT // true if no error
+ {
+ return !failed_;
+ }
+
+#endif
+
+ // relationals:
+
+ // the more symmetrical non-member syntax allows enum
+ // conversions work for both rhs and lhs.
+
+ BOOST_SYSTEM_CONSTEXPR inline friend bool operator==( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
+ {
+ return lhs.val_ == rhs.val_ && *lhs.cat_ == *rhs.cat_;
+ }
+
+ BOOST_SYSTEM_CONSTEXPR inline friend bool operator<( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
+ {
+ return *lhs.cat_ < *rhs.cat_ || ( *lhs.cat_ == *rhs.cat_ && lhs.val_ < rhs.val_ );
+ }
+
+#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
+
+ operator std::error_code () const
+ {
+ return std::error_code( value(), category() );
+ }
+
+#endif
+};
+
+} // namespace system
+
+// boost::throws()
+
+namespace detail
+{
+
+// Misuse of the error_code object is turned into a noisy failure by
+// poisoning the reference. This particular implementation doesn't
+// produce warnings or errors from popular compilers, is very efficient
+// (as determined by inspecting generated code), and does not suffer
+// from order of initialization problems. In practice, it also seems
+// cause user function error handling implementation errors to be detected
+// very early in the development cycle.
+
+inline system::error_code* throws()
+{
+ // See github.com/boostorg/system/pull/12 by visigoth for why the return
+ // is poisoned with nonzero rather than (0). A test, test_throws_usage(),
+ // has been added to error_code_test.cpp, and as visigoth mentioned it
+ // fails on clang for release builds with a return of 0 but works fine
+ // with (1).
+ // Since the undefined behavior sanitizer (-fsanitize=undefined) does not
+ // allow a reference to be formed to the unaligned address of (1), we use
+ // (8) instead.
+
+ return reinterpret_cast<system::error_code*>(8);
+}
+
+} // namespace detail
+
+inline system::error_code& throws()
+{
+ return *detail::throws();
+}
+
+// non-member functions of error_code and error_condition
+
+namespace system
+{
+
+BOOST_SYSTEM_CONSTEXPR inline bool operator!=( const error_code & lhs, const error_code & rhs ) BOOST_NOEXCEPT
+{
+ return !( lhs == rhs );
+}
+
+BOOST_SYSTEM_CONSTEXPR inline bool operator!=( const error_condition & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
+{
+ return !( lhs == rhs );
+}
+
+inline bool operator==( const error_code & code, const error_condition & condition ) BOOST_NOEXCEPT
+{
+ return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );
+}
+
+inline bool operator!=( const error_code & lhs, const error_condition & rhs ) BOOST_NOEXCEPT
+{
+ return !( lhs == rhs );
+}
+
+inline bool operator==( const error_condition & condition, const error_code & code ) BOOST_NOEXCEPT
+{
+ return code.category().equivalent( code.value(), condition ) || condition.category().equivalent( code, condition.value() );
+}
+
+inline bool operator!=( const error_condition & lhs, const error_code & rhs ) BOOST_NOEXCEPT
+{
+ return !( lhs == rhs );
+}
+
+template <class charT, class traits>
+ inline std::basic_ostream<charT,traits>&
+ operator<< (std::basic_ostream<charT,traits>& os, error_code ec)
+{
+ os << ec.category().name() << ':' << ec.value();
+ return os;
+}
+
+inline std::size_t hash_value( error_code const & ec )
+{
+ error_category const & cat = ec.category();
+
+ boost::ulong_long_type id = cat.id_;
+
+ if( id == 0 )
+ {
+ id = reinterpret_cast<boost::ulong_long_type>( &cat );
+ }
+
+ boost::ulong_long_type hv = ( boost::ulong_long_type( 0xCBF29CE4 ) << 32 ) + 0x84222325;
+ boost::ulong_long_type const prime = ( boost::ulong_long_type( 0x00000100 ) << 32 ) + 0x000001B3;
+
+ // id
+
+ hv ^= id;
+ hv *= prime;
+
+ // value
+
+ hv ^= static_cast<unsigned>( ec.value() );
+ hv *= prime;
+
+ return static_cast<std::size_t>( hv );
+}
+
+// make_* functions for errc::errc_t
+
+namespace errc
+{
+
+// explicit conversion:
+BOOST_SYSTEM_CONSTEXPR inline error_code make_error_code( errc_t e ) BOOST_NOEXCEPT
+{
+ return error_code( e, generic_category() );
+}
+
+// implicit conversion:
+BOOST_SYSTEM_CONSTEXPR inline error_condition make_error_condition( errc_t e ) BOOST_NOEXCEPT
+{
+ return error_condition( e, generic_category() );
+}
+
+} // namespace errc
+
+// error_category default implementation
+
+inline error_condition error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
+{
+ return error_condition( ev, *this );
+}
+
+inline bool error_category::equivalent( int code, const error_condition & condition ) const BOOST_NOEXCEPT
+{
+ return default_error_condition( code ) == condition;
+}
+
+inline bool error_category::equivalent( const error_code & code, int condition ) const BOOST_NOEXCEPT
+{
+ return *this == code.category() && code.value() == condition;
+}
+
+inline char const * error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
+{
+ if( len == 0 )
+ {
+ return buffer;
+ }
+
+ if( len == 1 )
+ {
+ buffer[0] = 0;
+ return buffer;
+ }
+
+#if !defined(BOOST_NO_EXCEPTIONS)
+ try
+#endif
+ {
+ std::string m = this->message( ev );
+
+# if defined( BOOST_MSVC )
+# pragma warning( push )
+# pragma warning( disable: 4996 )
+# elif defined(__clang__) && defined(__has_warning)
+# pragma clang diagnostic push
+# if __has_warning("-Wdeprecated-declarations")
+# pragma clang diagnostic ignored "-Wdeprecated-declarations"
+# endif
+# endif
+
+ std::strncpy( buffer, m.c_str(), len - 1 );
+ buffer[ len-1 ] = 0;
+
+# if defined( BOOST_MSVC )
+# pragma warning( pop )
+# elif defined(__clang__) && defined(__has_warning)
+# pragma clang diagnostic pop
+# endif
+
+ return buffer;
+ }
+#if !defined(BOOST_NO_EXCEPTIONS)
+ catch( ... )
+ {
+ return "Message text unavailable";
+ }
+#endif
+}
+
+inline bool error_category::failed( int ev ) const BOOST_NOEXCEPT
+{
+ return ev != 0;
+}
+
+} // namespace system
+
+} // namespace boost
+
+// generic_error_category implementation
+
+#include <boost/system/detail/generic_category.hpp>
+
+inline std::string boost::system::detail::generic_error_category::message( int ev ) const
+{
+ return generic_error_category_message( ev );
+}
+
+inline char const * boost::system::detail::generic_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
+{
+ return generic_error_category_message( ev, buffer, len );
+}
+
+// system_error_category implementation
+
+#if defined(BOOST_WINDOWS_API)
+
+#include <boost/system/detail/system_category_win32.hpp>
+
+inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
+{
+ return system_category_default_error_condition_win32( ev );
+}
+
+inline std::string boost::system::detail::system_error_category::message( int ev ) const
+{
+ return system_category_message_win32( ev );
+}
+
+inline char const * boost::system::detail::system_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
+{
+ return system_category_message_win32( ev, buffer, len );
+}
+
+#else // #if defined(BOOST_WINDOWS_API)
+
+#include <boost/system/detail/system_category_posix.hpp>
+
+inline boost::system::error_condition boost::system::detail::system_error_category::default_error_condition( int ev ) const BOOST_NOEXCEPT
+{
+ return system_category_default_error_condition_posix( ev );
+}
+
+inline std::string boost::system::detail::system_error_category::message( int ev ) const
+{
+ return generic_error_category_message( ev );
+}
+
+inline char const * boost::system::detail::system_error_category::message( int ev, char * buffer, std::size_t len ) const BOOST_NOEXCEPT
+{
+ return generic_error_category_message( ev, buffer, len );
+}
+
+#endif // #if defined(BOOST_WINDOWS_API)
+
+// interoperability with std::error_code, std::error_condition
+
+#if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
+
+#include <boost/system/detail/std_interoperability.hpp>
+
+inline boost::system::error_category::operator std::error_category const & () const
+{
+ return boost::system::detail::to_std_category( *this );
+}
+
+#endif // #if defined(BOOST_SYSTEM_HAS_SYSTEM_ERROR)
+
+#endif // BOOST_SYSTEM_ERROR_CODE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/system/system_error.hpp b/src/third_party/boost-1.69.0/boost/system/system_error.hpp
new file mode 100644
index 00000000000..116fd38b50d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/system/system_error.hpp
@@ -0,0 +1,84 @@
+// Boost system_error.hpp --------------------------------------------------//
+
+// Copyright Beman Dawes 2006
+
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_SYSTEM_SYSTEM_ERROR_HPP
+#define BOOST_SYSTEM_SYSTEM_ERROR_HPP
+
+#include <boost/system/error_code.hpp>
+#include <string>
+#include <stdexcept>
+#include <cassert>
+
+namespace boost
+{
+ namespace system
+ {
+ // class system_error ------------------------------------------------------------//
+
+ class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error
+ // BOOST_SYMBOL_VISIBLE is needed by GCC to ensure system_error thrown from a shared
+ // library can be caught. See svn.boost.org/trac/boost/ticket/3697
+ {
+ public:
+ explicit system_error( error_code ec )
+ : std::runtime_error(""), m_error_code(ec) {}
+
+ system_error( error_code ec, const std::string & what_arg )
+ : std::runtime_error(what_arg), m_error_code(ec) {}
+
+ system_error( error_code ec, const char* what_arg )
+ : std::runtime_error(what_arg), m_error_code(ec) {}
+
+ system_error( int ev, const error_category & ecat )
+ : std::runtime_error(""), m_error_code(ev,ecat) {}
+
+ system_error( int ev, const error_category & ecat,
+ const std::string & what_arg )
+ : std::runtime_error(what_arg), m_error_code(ev,ecat) {}
+
+ system_error( int ev, const error_category & ecat,
+ const char * what_arg )
+ : std::runtime_error(what_arg), m_error_code(ev,ecat) {}
+
+ virtual ~system_error() BOOST_NOEXCEPT_OR_NOTHROW {}
+
+ error_code code() const BOOST_NOEXCEPT { return m_error_code; }
+ const char * what() const BOOST_NOEXCEPT_OR_NOTHROW;
+
+ private:
+ error_code m_error_code;
+ mutable std::string m_what;
+ };
+
+ // implementation ------------------------------------------------------//
+
+ inline const char * system_error::what() const BOOST_NOEXCEPT_OR_NOTHROW
+ // see http://www.boost.org/more/error_handling.html for lazy build rationale
+ {
+ if ( m_what.empty() )
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+ try
+#endif
+ {
+ m_what = this->std::runtime_error::what();
+ if ( !m_what.empty() ) m_what += ": ";
+ m_what += m_error_code.message();
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ catch (...) { return std::runtime_error::what(); }
+#endif
+ }
+ return m_what.c_str();
+ }
+
+ } // namespace system
+} // namespace boost
+
+#endif // BOOST_SYSTEM_SYSTEM_ERROR_HPP
+
+
diff --git a/src/third_party/boost-1.68.0/boost/test/debug.hpp b/src/third_party/boost-1.69.0/boost/test/debug.hpp
index a8ccae0b970..a8ccae0b970 100644
--- a/src/third_party/boost-1.68.0/boost/test/debug.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/debug.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/debug_config.hpp b/src/third_party/boost-1.69.0/boost/test/debug_config.hpp
index 894d78e65ab..894d78e65ab 100644
--- a/src/third_party/boost-1.68.0/boost/test/debug_config.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/debug_config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/config.hpp b/src/third_party/boost-1.69.0/boost/test/detail/config.hpp
index db9b5d2b928..db9b5d2b928 100644
--- a/src/third_party/boost-1.68.0/boost/test/detail/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/detail/config.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/enable_warnings.hpp b/src/third_party/boost-1.69.0/boost/test/detail/enable_warnings.hpp
new file mode 100644
index 00000000000..d61c7dc5923
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/detail/enable_warnings.hpp
@@ -0,0 +1,36 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief enable previously suppressed warnings
+// ***************************************************************************
+
+#ifdef BOOST_MSVC
+# pragma warning(default: 4511) // copy constructor can't not be generated
+# pragma warning(default: 4512) // assignment operator can't not be generated
+# pragma warning(default: 4100) // unreferenced formal parameter
+# pragma warning(default: 4996) // <symbol> was declared deprecated
+# pragma warning(default: 4355) // 'this' : used in base member initializer list
+# pragma warning(default: 4706) // assignment within conditional expression
+# pragma warning(default: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
+# pragma warning(default: 4127) // conditional expression is constant
+# pragma warning(default: 4290) // C++ exception specification ignored except to ...
+# pragma warning(default: 4180) // qualifier applied to function type has no meaning; ignored
+# pragma warning(default: 4275) // non dll-interface class ... used as base for dll-interface class ...
+# pragma warning(default: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
+# pragma warning(default: 4511) // 'class' : copy constructor could not be generated
+# pragma warning(pop)
+#endif
+
+#if defined(BOOST_CLANG) && (BOOST_CLANG == 1)
+#pragma clang diagnostic pop
+#endif
+
+#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 6 * 100)
+# pragma GCC diagnostic pop
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/fwd_decl.hpp b/src/third_party/boost-1.69.0/boost/test/detail/fwd_decl.hpp
index d5c97fb7062..d5c97fb7062 100644
--- a/src/third_party/boost-1.68.0/boost/test/detail/fwd_decl.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/detail/fwd_decl.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/global_typedef.hpp b/src/third_party/boost-1.69.0/boost/test/detail/global_typedef.hpp
new file mode 100644
index 00000000000..ae932a45149
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/detail/global_typedef.hpp
@@ -0,0 +1,145 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief some trivial global typedefs
+// ***************************************************************************
+
+#ifndef BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
+#define BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
+
+#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
+#include <boost/test/detail/workaround.hpp>
+
+#define BOOST_TEST_L( s ) ::boost::unit_test::const_string( s, sizeof( s ) - 1 )
+#define BOOST_TEST_STRINGIZE( s ) BOOST_TEST_L( BOOST_STRINGIZE( s ) )
+#define BOOST_TEST_EMPTY_STRING BOOST_TEST_L( "" )
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+typedef unsigned long counter_t;
+
+//____________________________________________________________________________//
+
+enum report_level { INV_REPORT_LEVEL, CONFIRMATION_REPORT, SHORT_REPORT, DETAILED_REPORT, NO_REPORT };
+
+//____________________________________________________________________________//
+
+//! Indicates the output format for the loggers or the test tree printing
+enum output_format { OF_INVALID,
+ OF_CLF, ///< compiler log format
+ OF_XML, ///< XML format for report and log,
+ OF_JUNIT, ///< JUNIT format for report and log,
+ OF_CUSTOM_LOGGER, ///< User specified logger.
+ OF_DOT ///< dot format for output content
+};
+
+//____________________________________________________________________________//
+
+enum test_unit_type { TUT_CASE = 0x01, TUT_SUITE = 0x10, TUT_ANY = 0x11 };
+
+//____________________________________________________________________________//
+
+enum assertion_result { AR_FAILED, AR_PASSED, AR_TRIGGERED };
+
+//____________________________________________________________________________//
+
+typedef unsigned long test_unit_id;
+
+const test_unit_id INV_TEST_UNIT_ID = 0xFFFFFFFF;
+const test_unit_id MAX_TEST_CASE_ID = 0xFFFFFFFE;
+const test_unit_id MIN_TEST_CASE_ID = 0x00010000;
+const test_unit_id MAX_TEST_SUITE_ID = 0x0000FF00;
+const test_unit_id MIN_TEST_SUITE_ID = 0x00000001;
+
+//____________________________________________________________________________//
+
+namespace ut_detail {
+
+inline test_unit_type
+test_id_2_unit_type( test_unit_id id )
+{
+ return (id & 0xFFFF0000) != 0 ? TUT_CASE : TUT_SUITE;
+}
+
+//! Helper class for restoring the current test unit ID in a RAII manner
+struct test_unit_id_restore {
+ test_unit_id_restore(test_unit_id& to_restore_, test_unit_id new_value)
+ : to_restore(to_restore_)
+ , bkup(to_restore_) {
+ to_restore = new_value;
+ }
+ ~test_unit_id_restore() {
+ to_restore = bkup;
+ }
+private:
+ test_unit_id& to_restore;
+ test_unit_id bkup;
+};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+// helper templates to prevent ODR violations
+template<class T>
+struct static_constant {
+ static T value;
+};
+
+template<class T>
+T static_constant<T>::value;
+
+//____________________________________________________________________________//
+
+// helper defines for singletons.
+// BOOST_TEST_SINGLETON_CONS should appear in the class body,
+// BOOST_TEST_SINGLETON_CONS_IMPL should be in only one translation unit. The
+// global instance should be declared by BOOST_TEST_SINGLETON_INST.
+
+#define BOOST_TEST_SINGLETON_CONS( type ) \
+public: \
+ static type& instance(); \
+private: \
+ BOOST_DELETED_FUNCTION(type(type const&)) \
+ BOOST_DELETED_FUNCTION(type& operator=(type const&)) \
+ BOOST_DEFAULTED_FUNCTION(type(), {}) \
+ BOOST_DEFAULTED_FUNCTION(~type(), {}) \
+/**/
+
+#define BOOST_TEST_SINGLETON_CONS_IMPL( type ) \
+ type& type::instance() { \
+ static type the_inst; return the_inst; \
+ } \
+/**/
+
+//____________________________________________________________________________//
+
+#if defined(__APPLE_CC__) && defined(__GNUC__) && __GNUC__ < 4
+#define BOOST_TEST_SINGLETON_INST( inst ) \
+static BOOST_JOIN( inst, _t)& inst = BOOST_JOIN (inst, _t)::instance();
+
+#else
+
+#define BOOST_TEST_SINGLETON_INST( inst ) \
+namespace { BOOST_JOIN( inst, _t)& inst = BOOST_JOIN( inst, _t)::instance(); }
+
+#endif
+
+} // namespace unit_test
+} // namespace boost
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_GLOBAL_TYPEDEF_HPP_021005GER
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/log_level.hpp b/src/third_party/boost-1.69.0/boost/test/detail/log_level.hpp
index abdecea7ec9..abdecea7ec9 100644
--- a/src/third_party/boost-1.68.0/boost/test/detail/log_level.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/detail/log_level.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/pp_variadic.hpp b/src/third_party/boost-1.69.0/boost/test/detail/pp_variadic.hpp
index a443744daaa..a443744daaa 100644
--- a/src/third_party/boost-1.68.0/boost/test/detail/pp_variadic.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/detail/pp_variadic.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/suppress_warnings.hpp b/src/third_party/boost-1.69.0/boost/test/detail/suppress_warnings.hpp
new file mode 100644
index 00000000000..4f8de3dd874
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/detail/suppress_warnings.hpp
@@ -0,0 +1,40 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief suppress some warnings
+// ***************************************************************************
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4511) // copy constructor can't not be generated
+# pragma warning(disable: 4512) // assignment operator can't not be generated
+# pragma warning(disable: 4100) // unreferenced formal parameter
+# pragma warning(disable: 4996) // <symbol> was declared deprecated
+# pragma warning(disable: 4355) // 'this' : used in base member initializer list
+# pragma warning(disable: 4706) // assignment within conditional expression
+# pragma warning(disable: 4251) // class 'A<T>' needs to have dll-interface to be used by clients of class 'B'
+# pragma warning(disable: 4127) // conditional expression is constant
+# pragma warning(disable: 4290) // C++ exception specification ignored except to ...
+# pragma warning(disable: 4180) // qualifier applied to function type has no meaning; ignored
+# pragma warning(disable: 4275) // non dll-interface class ... used as base for dll-interface class ...
+# pragma warning(disable: 4267) // 'var' : conversion from 'size_t' to 'type', possible loss of data
+# pragma warning(disable: 4511) // 'class' : copy constructor could not be generated
+#endif
+
+#if defined(BOOST_CLANG) && (BOOST_CLANG == 1)
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wvariadic-macros"
+# pragma clang diagnostic ignored "-Wmissing-declarations"
+#endif
+
+#if defined(BOOST_GCC) && (BOOST_GCC >= 4 * 10000 + 6 * 100)
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wvariadic-macros"
+# pragma GCC diagnostic ignored "-Wmissing-declarations"
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/test/detail/throw_exception.hpp b/src/third_party/boost-1.69.0/boost/test/detail/throw_exception.hpp
new file mode 100644
index 00000000000..19b50ba49cb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/detail/throw_exception.hpp
@@ -0,0 +1,71 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief contains wrappers, which allows to build Boost.Test with no exception
+// ***************************************************************************
+
+#ifndef BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP
+#define BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP
+
+// Boost
+#include <boost/config.hpp> // BOOST_NO_EXCEPTIONS
+
+#ifdef BOOST_NO_EXCEPTIONS
+// C RUNTIME
+#include <stdlib.h>
+
+#endif
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace ut_detail {
+
+#ifdef BOOST_NO_EXCEPTIONS
+
+template<typename E>
+BOOST_NORETURN inline void
+throw_exception(E const& /*e*/) { abort(); }
+
+#define BOOST_TEST_I_TRY
+#define BOOST_TEST_I_CATCH( T, var ) for(T const& var = *(T*)0; false;)
+#define BOOST_TEST_I_CATCH0( T ) if(0)
+#define BOOST_TEST_I_CATCHALL() if(0)
+#define BOOST_TEST_I_RETHROW
+
+#else
+
+template<typename E>
+BOOST_NORETURN inline void
+throw_exception(E const& e) { throw e; }
+
+#define BOOST_TEST_I_TRY try
+#define BOOST_TEST_I_CATCH( T, var ) catch( T const& var )
+#define BOOST_TEST_I_CATCH0( T ) catch( T const& )
+#define BOOST_TEST_I_CATCHALL() catch(...)
+#define BOOST_TEST_I_RETHROW throw
+#endif
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_I_THROW( E ) unit_test::ut_detail::throw_exception( E )
+#define BOOST_TEST_I_ASSRT( cond, ex ) if( cond ) {} else BOOST_TEST_I_THROW( ex )
+
+
+} // namespace ut_detail
+} // namespace unit_test
+} // namespace boost
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_DETAIL_THROW_EXCEPTION_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/detail/workaround.hpp b/src/third_party/boost-1.69.0/boost/test/detail/workaround.hpp
index 4ba3a7e9346..4ba3a7e9346 100644
--- a/src/third_party/boost-1.68.0/boost/test/detail/workaround.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/detail/workaround.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/execution_monitor.hpp b/src/third_party/boost-1.69.0/boost/test/execution_monitor.hpp
new file mode 100644
index 00000000000..bda732b9802
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/execution_monitor.hpp
@@ -0,0 +1,583 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// (C) Copyright Beman Dawes 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief Defines public interface of the Execution Monitor and related classes
+// ***************************************************************************
+
+#ifndef BOOST_TEST_EXECUTION_MONITOR_HPP_071894GER
+#define BOOST_TEST_EXECUTION_MONITOR_HPP_071894GER
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+#include <boost/test/detail/throw_exception.hpp>
+
+#include <boost/test/utils/class_properties.hpp>
+
+// Boost
+#include <boost/shared_ptr.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/type.hpp>
+#include <boost/cstdlib.hpp>
+#include <boost/function/function0.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+#ifdef BOOST_SEH_BASED_SIGNAL_HANDLING
+
+// for the FP constants and control routines
+#include <float.h>
+
+#ifndef EM_INVALID
+#define EM_INVALID _EM_INVALID
+#endif
+
+#ifndef EM_DENORMAL
+#define EM_DENORMAL _EM_DENORMAL
+#endif
+
+#ifndef EM_ZERODIVIDE
+#define EM_ZERODIVIDE _EM_ZERODIVIDE
+#endif
+
+#ifndef EM_OVERFLOW
+#define EM_OVERFLOW _EM_OVERFLOW
+#endif
+
+#ifndef EM_UNDERFLOW
+#define EM_UNDERFLOW _EM_UNDERFLOW
+#endif
+
+#ifndef MCW_EM
+#define MCW_EM _MCW_EM
+#endif
+
+#else // based on ISO C standard
+
+#if !defined(BOOST_NO_FENV_H)
+ #include <boost/detail/fenv.hpp>
+#endif
+
+#endif
+
+#if defined(BOOST_SEH_BASED_SIGNAL_HANDLING) && !defined(UNDER_CE)
+ //! Indicates tha the floating point exception handling is supported
+ //! through SEH
+ #define BOOST_TEST_FPE_SUPPORT_WITH_SEH__
+#elif !defined(BOOST_SEH_BASED_SIGNAL_HANDLING) && !defined(UNDER_CE)
+ #if !defined(BOOST_NO_FENV_H) && !defined(BOOST_CLANG) && \
+ defined(__GLIBC__) && defined(__USE_GNU) && \
+ !(defined(__UCLIBC__) || defined(__nios2__) || defined(__microblaze__))
+ //! Indicates that floating point exception handling is supported for the
+ //! non SEH version of it, for the GLIBC extensions only
+ // see dicussions on the related topic: https://svn.boost.org/trac/boost/ticket/11756
+ #define BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__
+ #endif
+#endif
+
+
+// Additional macro documentations not being generated without this hack
+#ifdef BOOST_TEST_DOXYGEN_DOC__
+
+//! Disables the support of the alternative stack
+//! during the compilation of the Boost.test framework. This is especially useful
+//! in case it is not possible to detect the lack of alternative stack support for
+//! your compiler (for instance, ESXi).
+#define BOOST_TEST_DISABLE_ALT_STACK
+
+#endif
+
+//____________________________________________________________________________//
+
+namespace boost {
+
+/// @defgroup ExecutionMonitor Function Execution Monitor
+/// @{
+/// @section Intro Introduction
+/// Sometimes we need to call a function and make sure that no user or system originated exceptions are being thrown by it. Uniform exception reporting
+/// is also may be convenient. That's the purpose of the Boost.Test's Execution Monitor.
+///
+/// The Execution Monitor is a lower-level component of the Boost Test Library. It is the base for implementing all other Boost.Test components, but also
+/// can be used standalone to get controlled execution of error-prone functions with a uniform error notification. The Execution Monitor calls a user-supplied
+/// function in a controlled environment, relieving users from messy error detection.
+///
+/// The Execution Monitor usage is demonstrated in the example exec_mon_example.
+///
+/// @section DesignRationale Design Rationale
+///
+/// The Execution Monitor design assumes that it can be used when no (or almost no) memory available. Also the Execution Monitor is intended to be portable to as many platforms as possible.
+///
+/// @section UserGuide User's guide
+/// The Execution Monitor is designed to solve the problem of executing potentially dangerous function that may result in any number of error conditions,
+/// in monitored environment that should prevent any undesirable exceptions to propagate out of function call and produce consistent result report for all outcomes.
+/// The Execution Monitor is able to produce informative report for all standard C++ exceptions and intrinsic types. All other exceptions are reported as unknown.
+/// If you prefer different message for your exception type or need to perform any action, the Execution Monitor supports custom exception translators.
+/// There are several other parameters of the monitored environment can be configured by setting appropriate properties of the Execution Monitor.
+///
+/// All symbols in the Execution Monitor implementation are located in the namespace boost. To use the Execution Monitor you need to:
+/// -# include @c boost/test/execution_monitor.hpp
+/// -# Make an instance of execution_monitor.
+/// -# Optionally register custom exception translators for exception classes which require special processing.
+///
+/// @subsection FuncExec Monitored function execution
+///
+/// The class execution_monitor can monitor functions with the following signatures:
+/// - int ()
+/// - void ()
+///
+/// This function is expected to be self sufficient part of your application. You can't pass any arguments to this function directly. Instead you
+/// should bind them into executable nullary function using bind function (either standard or boost variant). Neither you can return any other value,
+/// but an integer result code. If necessary you can bind output parameters by reference or use some other more complicated nullary functor, which
+/// maintains state. This includes class methods, static class methods etc.
+///
+/// To start the monitored function, invoke the method execution_monitor::execute and pass the monitored function as an argument. If the call succeeds,
+/// the method returns the result code produced by the monitored function. If any of the following conditions occur:
+/// - Uncaught C++ exception
+/// - Hardware or software signal, trap, or other exception
+/// - Timeout reached
+/// - Debug assert event occurred (under Microsoft Visual C++ or compatible compiler)
+///
+/// then the method throws the execution_exception. The exception contains unique error_code value identifying the error condition and the detailed message
+/// that can be used to report the error.
+///
+/// @subsection Reporting Errors reporting and translation
+///
+/// If you need to report an error inside monitored function execution you have to throw an exception. Do not use the execution_exception - it's not intended
+/// to be used for this purpose. The simplest choice is to use one of the following C++ types as an exception:
+/// - C string
+/// - std:string
+/// - any exception class in std::exception hierarchy
+/// - boost::exception
+///
+/// execution_monitor will catch and report these types of exceptions. If exception is thrown which is unknown to execution_monitor, it can only
+/// report the fact of the exception. So in case if you prefer to use your own exception types or can't govern what exceptions are generated by monitored
+/// function and would like to see proper error message in a report, execution_monitor can be configured with custom "translator" routine, which will have
+/// a chance to either record the fact of the exception itself or translate it into one of standard exceptions and rethrow (or both). The translator routine
+/// is registered per exception type and is invoked when exception of this class (or one inherited from it) is thrown inside monitored routine. You can
+/// register as many independent translators as you like. See execution_monitor::register_exception_translator specification for requirements on translator
+/// function.
+///
+/// Finally, if you need to abort the monitored function execution without reporting any errors, you can throw an exception execution_aborted. As a result
+/// the execution is aborted and zero result code is produced by the method execution_monitor::execute.
+///
+/// @subsection Parameters Supported parameters
+///
+/// The Execution Monitor behavior is configurable through the set of parameters (properties) associated with the instance of the monitor. See execution_monitor
+/// specification for a list of supported parameters and their semantic.
+
+// ************************************************************************** //
+// ************** detail::translator_holder_base ************** //
+// ************************************************************************** //
+
+namespace detail {
+
+class translator_holder_base;
+typedef boost::shared_ptr<translator_holder_base> translator_holder_base_ptr;
+
+class BOOST_TEST_DECL translator_holder_base {
+protected:
+ typedef boost::unit_test::const_string const_string;
+public:
+ // Constructor
+ translator_holder_base( translator_holder_base_ptr next, const_string tag )
+ : m_next( next )
+ , m_tag( std::string() + tag )
+ {
+ }
+
+ // Destructor
+ virtual ~translator_holder_base() {}
+
+ // translator holder interface
+ // invokes the function F inside the try/catch guarding against specific exception
+ virtual int operator()( boost::function<int ()> const& F ) = 0;
+
+ // erases specific translator holder from the chain
+ translator_holder_base_ptr erase( translator_holder_base_ptr this_, const_string tag )
+ {
+ if( m_next )
+ m_next = m_next->erase( m_next, tag );
+
+ return m_tag == tag ? m_next : this_;
+ }
+#ifndef BOOST_NO_RTTI
+ virtual translator_holder_base_ptr erase( translator_holder_base_ptr this_, std::type_info const& ) = 0;
+ template<typename ExceptionType>
+ translator_holder_base_ptr erase( translator_holder_base_ptr this_, boost::type<ExceptionType>* = 0 )
+ {
+ if( m_next )
+ m_next = m_next->erase<ExceptionType>( m_next );
+
+ return erase( this_, typeid(ExceptionType) );
+ }
+#endif
+
+protected:
+ // Data members
+ translator_holder_base_ptr m_next;
+ std::string m_tag;
+};
+
+} // namespace detail
+
+// ************************************************************************** //
+/// @class execution_exception
+/// @brief This class is used to report any kind of an failure during execution of a monitored function inside of execution_monitor
+///
+/// The instance of this class is thrown out of execution_monitor::execute invocation when failure is detected. Regardless of a kind of failure occurred
+/// the instance will provide a uniform way to catch and report it.
+///
+/// One important design rationale for this class is that we should be ready to work after fatal memory corruptions or out of memory conditions. To facilitate
+/// this class never allocates any memory and assumes that strings it refers to are either some constants or live in a some kind of persistent (preallocated) memory.
+// ************************************************************************** //
+
+class BOOST_SYMBOL_VISIBLE execution_exception {
+ typedef boost::unit_test::const_string const_string;
+public:
+ /// These values are sometimes used as program return codes.
+ /// The particular values have been chosen to avoid conflicts with
+ /// commonly used program return codes: values < 100 are often user
+ /// assigned, values > 255 are sometimes used to report system errors.
+ /// Gaps in values allow for orderly expansion.
+ ///
+ /// @note(1) Only uncaught C++ exceptions are treated as errors.
+ /// If a function catches a C++ exception, it never reaches
+ /// the execution_monitor.
+ ///
+ /// The implementation decides what is a system_fatal_error and what is
+ /// just a system_exception. Fatal errors are so likely to have corrupted
+ /// machine state (like a stack overflow or addressing exception) that it
+ /// is unreasonable to continue execution.
+ ///
+ /// @note(2) These errors include Unix signals and Windows structured
+ /// exceptions. They are often initiated by hardware traps.
+ enum error_code {
+ no_error = 0, ///< for completeness only; never returned
+ user_error = 200, ///< user reported non-fatal error
+ cpp_exception_error = 205, ///< see note (1) above
+ system_error = 210, ///< see note (2) above
+ timeout_error = 215, ///< only detectable on certain platforms
+ user_fatal_error = 220, ///< user reported fatal error
+ system_fatal_error = 225 ///< see note (2) above
+ };
+
+ /// Simple model for the location of failure in a source code
+ struct BOOST_TEST_DECL location {
+ explicit location( char const* file_name = 0, size_t line_num = 0, char const* func = 0 );
+ explicit location( const_string file_name, size_t line_num = 0, char const* func = 0 );
+
+ const_string m_file_name; ///< File name
+ size_t m_line_num; ///< Line number
+ const_string m_function; ///< Function name
+ };
+
+ /// @name Constructors
+
+ /// Constructs instance based on message, location and error code
+
+ /// @param[in] ec error code
+ /// @param[in] what_msg error message
+ /// @param[in] location error location
+ execution_exception( error_code ec, const_string what_msg, location const& location );
+
+ /// @name Access methods
+
+ /// Exception error code
+ error_code code() const { return m_error_code; }
+ /// Exception message
+ const_string what() const { return m_what; }
+ /// Exception location
+ location const& where() const { return m_location; }
+ ///@}
+
+private:
+ // Data members
+ error_code m_error_code;
+ const_string m_what;
+ location m_location;
+}; // execution_exception
+
+// ************************************************************************** //
+/// @brief Function execution monitor
+
+/// This class is used to uniformly detect and report an occurrence of several types of signals and exceptions, reducing various
+/// errors to a uniform execution_exception that is returned to a caller.
+///
+/// The executiom_monitor behavior can be customized through a set of public parameters (properties) associated with the execution_monitor instance.
+/// All parameters are implemented as public unit_test::readwrite_property data members of the class execution_monitor.
+// ************************************************************************** //
+
+class BOOST_TEST_DECL execution_monitor {
+ typedef boost::unit_test::const_string const_string;
+public:
+
+ /// Default constructor initializes all execution monitor properties
+ execution_monitor();
+
+ /// Should monitor catch system errors.
+ ///
+ /// The @em p_catch_system_errors property is a boolean flag (default value is true) specifying whether or not execution_monitor should trap system
+ /// errors/system level exceptions/signals, which would cause program to crash in a regular case (without execution_monitor).
+ /// Set this property to false, for example, if you wish to force coredump file creation. The Unit Test Framework provides a
+ /// runtime parameter @c \-\-catch_system_errors=yes to alter the behavior in monitored test cases.
+ unit_test::readwrite_property<bool> p_catch_system_errors;
+
+ /// Should monitor try to attach debugger in case of caught system error.
+ ///
+ /// The @em p_auto_start_dbg property is a boolean flag (default value is false) specifying whether or not execution_monitor should try to attach debugger
+ /// in case system error is caught.
+ unit_test::readwrite_property<bool> p_auto_start_dbg;
+
+
+ /// Specifies the seconds that elapse before a timer_error occurs.
+ ///
+ /// The @em p_timeout property is an integer timeout (in seconds) for monitored function execution. Use this parameter to monitor code with possible deadlocks
+ /// or indefinite loops. This feature is only available for some operating systems (not yet Microsoft Windows).
+ unit_test::readwrite_property<unsigned> p_timeout;
+
+ /// Should monitor use alternative stack for the signal catching.
+ ///
+ /// The @em p_use_alt_stack property is a boolean flag (default value is false) specifying whether or not execution_monitor should use an alternative stack
+ /// for the sigaction based signal catching. When enabled the signals are delivered to the execution_monitor on a stack different from current execution
+ /// stack, which is safer in case if it is corrupted by monitored function. For more details on alternative stack handling see appropriate manuals.
+ unit_test::readwrite_property<bool> p_use_alt_stack;
+
+ /// Should monitor try to detect hardware floating point exceptions (!= 0), and which specific exception to catch.
+ ///
+ /// The @em p_detect_fp_exceptions property is a boolean flag (default value is false) specifying whether or not execution_monitor should install hardware
+ /// traps for the floating point exception on platforms where it's supported.
+ unit_test::readwrite_property<unsigned> p_detect_fp_exceptions;
+
+
+ // @name Monitoring entry points
+
+ /// @brief Execution monitor entry point for functions returning integer value
+ ///
+ /// This method executes supplied function F inside a try/catch block and also may include other unspecified platform dependent error detection code.
+ ///
+ /// This method throws an execution_exception on an uncaught C++ exception, a hardware or software signal, trap, or other user exception.
+ ///
+ /// @note execute() doesn't consider it an error for F to return a non-zero value.
+ /// @param[in] F Function to monitor
+ /// @returns value returned by function call F().
+ /// @see vexecute
+ int execute( boost::function<int ()> const& F );
+
+ /// @brief Execution monitor entry point for functions returning void
+ ///
+ /// This method is semantically identical to execution_monitor::execute, but des't produce any result code.
+ /// @param[in] F Function to monitor
+ /// @see execute
+ void vexecute( boost::function<void ()> const& F );
+ // @}
+
+ // @name Exception translator registration
+
+ /// @brief Registers custom (user supplied) exception translator
+
+ /// This method template registers a translator for an exception type specified as a first template argument. For example
+ /// @code
+ /// void myExceptTr( MyException const& ex ) { /*do something with the exception here*/}
+ /// em.register_exception_translator<MyException>( myExceptTr );
+ /// @endcode
+ /// The translator should be any unary function/functor object which accepts MyException const&. This can be free standing function
+ /// or bound class method. The second argument is an optional string tag you can associate with this translator routine. The only reason
+ /// to specify the tag is if you plan to erase the translator eventually. This can be useful in scenario when you reuse the same
+ /// execution_monitor instance to monitor different routines and need to register a translator specific to the routine being monitored.
+ /// While it is possible to erase the translator based on an exception type it was registered for, tag string provides simpler way of doing this.
+ /// @tparam ExceptionType type of the exception we register a translator for
+ /// @tparam ExceptionTranslator type of the translator we register for this exception
+ /// @param[in] tr translator function object with the signature <em> void (ExceptionType const&)</em>
+ /// @param[in] tag tag associated with this translator
+ template<typename ExceptionType, typename ExceptionTranslator>
+ void register_exception_translator( ExceptionTranslator const& tr, const_string tag = const_string(), boost::type<ExceptionType>* = 0 );
+
+ /// @brief Erases custom exception translator based on a tag
+
+ /// Use the same tag as the one used during translator registration
+ /// @param[in] tag tag associated with translator you wants to erase
+ void erase_exception_translator( const_string tag )
+ {
+ m_custom_translators = m_custom_translators->erase( m_custom_translators, tag );
+ }
+#ifndef BOOST_NO_RTTI
+ /// @brief Erases custom exception translator based on an exception type
+ ///
+ /// tparam ExceptionType Exception type for which you want to erase the translator
+ template<typename ExceptionType>
+ void erase_exception_translator( boost::type<ExceptionType>* = 0 )
+ {
+ m_custom_translators = m_custom_translators->erase<ExceptionType>( m_custom_translators );
+ }
+ //@}
+#endif
+
+private:
+ // implementation helpers
+ int catch_signals( boost::function<int ()> const& F );
+
+ // Data members
+ detail::translator_holder_base_ptr m_custom_translators;
+ boost::scoped_array<char> m_alt_stack;
+}; // execution_monitor
+
+// ************************************************************************** //
+// ************** detail::translator_holder ************** //
+// ************************************************************************** //
+
+namespace detail {
+
+template<typename ExceptionType, typename ExceptionTranslator>
+class translator_holder : public translator_holder_base
+{
+public:
+ explicit translator_holder( ExceptionTranslator const& tr, translator_holder_base_ptr& next, const_string tag = const_string() )
+ : translator_holder_base( next, tag ), m_translator( tr ) {}
+
+ // translator holder interface
+ virtual int operator()( boost::function<int ()> const& F )
+ {
+ BOOST_TEST_I_TRY {
+ return m_next ? (*m_next)( F ) : F();
+ }
+ BOOST_TEST_I_CATCH( ExceptionType, e ) {
+ m_translator( e );
+ return boost::exit_exception_failure;
+ }
+ }
+#ifndef BOOST_NO_RTTI
+ virtual translator_holder_base_ptr erase( translator_holder_base_ptr this_, std::type_info const& ti )
+ {
+ return ti == typeid(ExceptionType) ? m_next : this_;
+ }
+#endif
+
+private:
+ // Data members
+ ExceptionTranslator m_translator;
+};
+
+} // namespace detail
+
+template<typename ExceptionType, typename ExceptionTranslator>
+void
+execution_monitor::register_exception_translator( ExceptionTranslator const& tr, const_string tag, boost::type<ExceptionType>* )
+{
+ m_custom_translators.reset(
+ new detail::translator_holder<ExceptionType,ExceptionTranslator>( tr, m_custom_translators, tag ) );
+}
+
+// ************************************************************************** //
+/// @class execution_aborted
+/// @brief This is a trivial default constructible class. Use it to report graceful abortion of a monitored function execution.
+// ************************************************************************** //
+
+struct execution_aborted {};
+
+// ************************************************************************** //
+// ************** system_error ************** //
+// ************************************************************************** //
+
+class system_error {
+public:
+ // Constructor
+ explicit system_error( char const* exp );
+
+ long const p_errno;
+ char const* const p_failed_exp;
+};
+
+//!@internal
+#define BOOST_TEST_SYS_ASSERT( cond ) BOOST_TEST_I_ASSRT( cond, ::boost::system_error( BOOST_STRINGIZE( exp ) ) )
+
+// ************************************************************************** //
+// **************Floating point exception management interface ************** //
+// ************************************************************************** //
+
+namespace fpe {
+
+enum masks {
+ BOOST_FPE_OFF = 0,
+
+#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__) /* *** */
+ BOOST_FPE_DIVBYZERO = EM_ZERODIVIDE,
+ BOOST_FPE_INEXACT = EM_INEXACT,
+ BOOST_FPE_INVALID = EM_INVALID,
+ BOOST_FPE_OVERFLOW = EM_OVERFLOW,
+ BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL,
+
+ BOOST_FPE_ALL = MCW_EM,
+
+#elif !defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__)/* *** */
+ BOOST_FPE_DIVBYZERO = BOOST_FPE_OFF,
+ BOOST_FPE_INEXACT = BOOST_FPE_OFF,
+ BOOST_FPE_INVALID = BOOST_FPE_OFF,
+ BOOST_FPE_OVERFLOW = BOOST_FPE_OFF,
+ BOOST_FPE_UNDERFLOW = BOOST_FPE_OFF,
+ BOOST_FPE_ALL = BOOST_FPE_OFF,
+#else /* *** */
+
+#if defined(FE_DIVBYZERO)
+ BOOST_FPE_DIVBYZERO = FE_DIVBYZERO,
+#else
+ BOOST_FPE_DIVBYZERO = BOOST_FPE_OFF,
+#endif
+
+#if defined(FE_INEXACT)
+ BOOST_FPE_INEXACT = FE_INEXACT,
+#else
+ BOOST_FPE_INEXACT = BOOST_FPE_OFF,
+#endif
+
+#if defined(FE_INVALID)
+ BOOST_FPE_INVALID = FE_INVALID,
+#else
+ BOOST_FPE_INVALID = BOOST_FPE_OFF,
+#endif
+
+#if defined(FE_OVERFLOW)
+ BOOST_FPE_OVERFLOW = FE_OVERFLOW,
+#else
+ BOOST_FPE_OVERFLOW = BOOST_FPE_OFF,
+#endif
+
+#if defined(FE_UNDERFLOW)
+ BOOST_FPE_UNDERFLOW = FE_UNDERFLOW,
+#else
+ BOOST_FPE_UNDERFLOW = BOOST_FPE_OFF,
+#endif
+
+#if defined(FE_ALL_EXCEPT)
+ BOOST_FPE_ALL = FE_ALL_EXCEPT,
+#else
+ BOOST_FPE_ALL = BOOST_FPE_OFF,
+#endif
+
+#endif /* *** */
+ BOOST_FPE_INV = BOOST_FPE_ALL+1
+};
+
+//____________________________________________________________________________//
+
+// return the previous set of enabled exceptions when successful, and BOOST_FPE_INV otherwise
+unsigned BOOST_TEST_DECL enable( unsigned mask );
+unsigned BOOST_TEST_DECL disable( unsigned mask );
+
+//____________________________________________________________________________//
+
+} // namespace fpe
+
+///@}
+
+} // namespace boost
+
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/test/floating_point_comparison.hpp b/src/third_party/boost-1.69.0/boost/test/floating_point_comparison.hpp
index e8892744773..e8892744773 100644
--- a/src/third_party/boost-1.68.0/boost/test/floating_point_comparison.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/floating_point_comparison.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/framework.hpp b/src/third_party/boost-1.69.0/boost/test/framework.hpp
new file mode 100644
index 00000000000..2f446791aae
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/framework.hpp
@@ -0,0 +1,301 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief Defines Unit Test Framework mono-state interfaces.
+//! The framework interfaces are based on Monostate design pattern.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FRAMEWORK_HPP_020805GER
+#define BOOST_TEST_FRAMEWORK_HPP_020805GER
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+#include <boost/test/detail/throw_exception.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+// STL
+#include <stdexcept>
+
+//____________________________________________________________________________//
+
+namespace boost {
+
+/// Main namespace for the Unit Test Framework interfaces and implementation
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** init_unit_test_func ************** //
+// ************************************************************************** //
+
+/// Test module initialization routine signature
+
+/// Different depending on whether BOOST_TEST_ALTERNATIVE_INIT_API is defined or not
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+typedef bool (*init_unit_test_func)();
+#else
+typedef test_suite* (*init_unit_test_func)( int, char* [] );
+#endif
+
+// ************************************************************************** //
+// ************** framework ************** //
+// ************************************************************************** //
+
+/// Namespace of the Unit Test Framework mono-state
+namespace framework {
+
+/// @name Unit Test Framework initialization and shutdown
+/// @{
+
+/// @brief This function performs initialization of the framework mono-state.
+///
+/// It needs to be called every time before the test is started.
+/// @param[in] init_func test module initialization routine
+/// @param[in] argc command line arguments collection
+/// @param[in] argv command line arguments collection
+BOOST_TEST_DECL void init( init_unit_test_func init_func, int argc, char* argv[] );
+
+/// This function applies all the decorators and figures out default run status. This argument facilitates an
+/// ability of the test cases to prepare some other test units (primarily used internally for self testing).
+/// @param[in] tu Optional id of the test unit representing root of test tree. If absent, master test suite is used
+BOOST_TEST_DECL void finalize_setup_phase( test_unit_id tu = INV_TEST_UNIT_ID);
+
+/// This function returns true when testing is in progress (setup is finished).
+BOOST_TEST_DECL bool test_in_progress();
+
+/// This function shuts down the framework and clears up its mono-state.
+///
+/// It needs to be at the very end of test module execution
+BOOST_TEST_DECL void shutdown();
+/// @}
+
+/// @name Test unit registration
+/// @{
+
+/// Provides both read and write access to current "leaf" auto test suite during the test unit registration phase.
+///
+/// During auto-registration phase the framework maintain a FIFO queue of test units being registered. New test units become children
+/// of the current "leaf" test suite and if this is test suite it is pushed back into queue and becomes a new leaf.
+/// When test suite registration is completed, a test suite is popped from the back of the queue. Only automatically registered test suites
+/// should be added to this queue. Master test suite is always a zero element in this queue, so if no other test suites are registered
+/// all test cases are added to master test suite.
+
+/// This function facilitates all three possible actions:
+/// - if no argument are provided it returns the current queue leaf test suite
+/// - if test suite is provided and no second argument are set, test suite is added to the queue
+/// - if no test suite are provided and last argument is false, the semantic of this function is similar to queue pop: last element is popped from the queue
+/// @param[in] ts test suite to push back to the queue
+/// @param[in] push_or_pop should we push ts to the queue or pop leaf test suite instead
+/// @returns a reference to the currently active/"leaf" test suite
+BOOST_TEST_DECL test_suite& current_auto_test_suite( test_suite* ts = 0, bool push_or_pop = true );
+
+/// This function add new test case into the global collection of test units the framework aware of.
+
+/// This function also assignes unique test unit id for every test case. Later on one can use this id to locate
+/// the test case if necessary. This is the way for the framework to maintain weak references between test units.
+/// @param[in] tc test case to register
+BOOST_TEST_DECL void register_test_unit( test_case* tc );
+
+/// This function add new test suite into the global collection of test units the framework aware of.
+
+/// This function also assignes unique test unit id for every test suite. Later on one can use this id to locate
+/// the test case if necessary. This is the way for the framework to maintain weak references between test units.
+/// @param[in] ts test suite to register
+BOOST_TEST_DECL void register_test_unit( test_suite* ts );
+
+/// This function removes the test unit from the collection of known test units and destroys the test unit object.
+
+/// This function also assigns unique test unit id for every test case. Later on one can use this id to located
+/// the test case if necessary. This is the way for the framework to maintain weak references between test units.
+/// @param[in] tu test unit to deregister
+BOOST_TEST_DECL void deregister_test_unit( test_unit* tu );
+
+// This function clears up the framework mono-state.
+
+/// After this call the framework can be reinitialized to perform a second test run during the same program lifetime.
+BOOST_TEST_DECL void clear();
+/// @}
+
+/// @name Test observer registration
+/// @{
+/// Adds new test execution observer object into the framework's list of test observers.
+
+/// Observer lifetime should exceed the the testing execution timeframe
+/// @param[in] to test observer object to add
+BOOST_TEST_DECL void register_observer( test_observer& to );
+
+/// Excludes the observer object form the framework's list of test observers
+/// @param[in] to test observer object to exclude
+BOOST_TEST_DECL void deregister_observer( test_observer& to );
+
+/// @}
+
+/// @name Global fixtures registration
+/// @{
+
+/// Adds a new global fixture to be setup before any other tests starts and tore down after
+/// any other tests finished.
+/// Test unit fixture lifetime should exceed the testing execution timeframe
+/// @param[in] tuf fixture to add
+BOOST_TEST_DECL void register_global_fixture( test_unit_fixture& tuf );
+
+/// Removes a test global fixture from the framework
+///
+/// Test unit fixture lifetime should exceed the testing execution timeframe
+/// @param[in] tuf fixture to remove
+BOOST_TEST_DECL void deregister_global_fixture( test_unit_fixture& tuf );
+/// @}
+
+/// @name Assertion/uncaught exception context support
+/// @{
+/// Context accessor
+struct BOOST_TEST_DECL context_generator {
+ context_generator() : m_curr_frame( 0 ) {}
+
+ /// Is there any context?
+ bool is_empty() const;
+
+ /// Give me next frame; empty - last frame
+ const_string next() const;
+
+private:
+ // Data members
+ mutable unsigned m_curr_frame;
+};
+
+/// Records context frame message.
+
+/// Some context frames are sticky - they can only explicitly cleared by specifying context id. Other (non sticky) context frames cleared after every assertion.
+/// @param[in] context_descr context frame message
+/// @param[in] sticky is this sticky frame or not
+/// @returns id of the newly created frame
+BOOST_TEST_DECL int add_context( lazy_ostream const& context_descr, bool sticky );
+/// Erases context frame (when test exits context scope)
+
+/// If context_id is passed clears that specific context frame identified by this id, otherwise clears all non sticky contexts.
+BOOST_TEST_DECL void clear_context( int context_id = -1 );
+/// Produces an instance of small "delegate" object, which facilitates access to collected context.
+BOOST_TEST_DECL context_generator get_context();
+/// @}
+
+/// @name Access to registered test units.
+/// @{
+/// This function provides access to the master test suite.
+
+/// There is only only master test suite per test module.
+/// @returns a reference the master test suite instance
+BOOST_TEST_DECL master_test_suite_t& master_test_suite();
+
+/// This function provides an access to the test unit currently being executed.
+
+/// The difference with current_test_case is about the time between a test-suite
+/// is being set up or torn down (fixtures) and when the test-cases of that suite start.
+
+/// This function is only valid during test execution phase.
+/// @see current_test_case_id, current_test_case
+BOOST_TEST_DECL test_unit const& current_test_unit();
+
+/// This function provides an access to the test case currently being executed.
+
+/// This function is only valid during test execution phase.
+/// @see current_test_case_id
+BOOST_TEST_DECL test_case const& current_test_case();
+
+/// This function provides an access to an id of the test case currently being executed.
+
+/// This function safer than current_test_case, cause if wont throw if no test case is being executed.
+/// @see current_test_case
+BOOST_TEST_DECL test_unit_id current_test_case_id(); /* safe version of above */
+
+/// This function provides access to a test unit by id and type combination. It will throw if no test unit located.
+/// @param[in] tu_id id of a test unit to locate
+/// @param[in] tu_type type of a test unit to locate
+/// @returns located test unit
+BOOST_TEST_DECL test_unit& get( test_unit_id tu_id, test_unit_type tu_type );
+
+/// This function template provides access to a typed test unit by id
+
+/// It will throw if you specify incorrect test unit type
+/// @tparam UnitType compile time type of test unit to get (test_suite or test_case)
+/// @param id id of test unit to get
+template<typename UnitType>
+inline UnitType& get( test_unit_id id )
+{
+ return static_cast<UnitType&>( get( id, static_cast<test_unit_type>(UnitType::type) ) );
+}
+///@}
+
+/// @name Test initiation interface
+/// @{
+
+/// Initiates test execution
+
+/// This function is used to start the test execution from a specific "root" test unit.
+/// If no root provided, test is started from master test suite. This second argument facilitates an ability of the test cases to
+/// start some other test units (primarily used internally for self testing).
+/// @param[in] tu Optional id of the test unit or test unit itself from which the test is started. If absent, master test suite is used
+/// @param[in] continue_test true == continue test if it was already started, false == restart the test from scratch regardless
+BOOST_TEST_DECL void run( test_unit_id tu = INV_TEST_UNIT_ID, bool continue_test = true );
+/// Initiates test execution. Same as other overload
+BOOST_TEST_DECL void run( test_unit const* tu, bool continue_test = true );
+/// @}
+
+/// @name Test events dispatchers
+/// @{
+/// Reports results of assertion to all test observers
+BOOST_TEST_DECL void assertion_result( unit_test::assertion_result ar );
+/// Reports uncaught exception to all test observers
+BOOST_TEST_DECL void exception_caught( execution_exception const& );
+/// Reports aborted test unit to all test observers
+BOOST_TEST_DECL void test_unit_aborted( test_unit const& );
+/// Reports aborted test module to all test observers
+BOOST_TEST_DECL void test_aborted( );
+/// @}
+
+namespace impl {
+// exclusively for self test
+BOOST_TEST_DECL void setup_for_execution( test_unit const& );
+BOOST_TEST_DECL void setup_loggers( );
+} // namespace impl
+
+// ************************************************************************** //
+// ************** framework errors ************** //
+// ************************************************************************** //
+
+/// This exception type is used to report internal Boost.Test framework errors.
+struct BOOST_TEST_DECL internal_error : public std::runtime_error {
+ internal_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
+};
+
+//____________________________________________________________________________//
+
+/// This exception type is used to report test module setup errors.
+struct BOOST_TEST_DECL setup_error : public std::runtime_error {
+ setup_error( const_string m ) : std::runtime_error( std::string( m.begin(), m.size() ) ) {}
+};
+
+#define BOOST_TEST_SETUP_ASSERT( cond, msg ) BOOST_TEST_I_ASSRT( cond, unit_test::framework::setup_error( msg ) )
+
+//____________________________________________________________________________//
+
+struct nothing_to_test {
+ explicit nothing_to_test( int rc ) : m_result_code( rc ) {}
+
+ int m_result_code;
+};
+
+//____________________________________________________________________________//
+
+} // namespace framework
+} // unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_FRAMEWORK_HPP_020805GER
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/compiler_log_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/compiler_log_formatter.ipp
new file mode 100644
index 00000000000..cd7de1fe766
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/compiler_log_formatter.ipp
@@ -0,0 +1,293 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : implements compiler like Log formatter
+// ***************************************************************************
+
+#ifndef BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
+#define BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
+
+// Boost.Test
+#include <boost/test/output/compiler_log_formatter.hpp>
+
+#include <boost/test/framework.hpp>
+#include <boost/test/execution_monitor.hpp>
+#include <boost/test/unit_test_parameters.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
+
+#include <boost/test/utils/basic_cstring/io.hpp>
+#include <boost/test/utils/lazy_ostream.hpp>
+#include <boost/test/utils/setcolor.hpp>
+
+
+// Boost
+#include <boost/version.hpp>
+
+// STL
+#include <iostream>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace output {
+
+// ************************************************************************** //
+// ************** compiler_log_formatter ************** //
+// ************************************************************************** //
+
+namespace {
+
+std::string
+test_phase_identifier()
+{
+ return framework::test_in_progress() ? framework::current_test_unit().full_name() : std::string( "Test setup" );
+}
+
+} // local namespace
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_start( std::ostream& output, counter_t test_cases_amount )
+{
+ m_color_output = runtime_config::get<bool>( runtime_config::btrt_color_output );
+
+ if( test_cases_amount > 0 )
+ output << "Running " << test_cases_amount << " test "
+ << (test_cases_amount > 1 ? "cases" : "case") << "...\n";
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_finish( std::ostream& ostr )
+{
+ ostr.flush();
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_build_info( std::ostream& output )
+{
+ output << "Platform: " << BOOST_PLATFORM << '\n'
+ << "Compiler: " << BOOST_COMPILER << '\n'
+ << "STL : " << BOOST_STDLIB << '\n'
+ << "Boost : " << BOOST_VERSION/100000 << "."
+ << BOOST_VERSION/100 % 1000 << "."
+ << BOOST_VERSION % 100 << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::test_unit_start( std::ostream& output, test_unit const& tu )
+{
+ BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::BRIGHT, term_color::BLUE );
+
+ print_prefix( output, tu.p_file_name, tu.p_line_num );
+
+ output << "Entering test " << tu.p_type_name << " \"" << tu.p_name << "\"" << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::test_unit_finish( std::ostream& output, test_unit const& tu, unsigned long elapsed )
+{
+ BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::BRIGHT, term_color::BLUE );
+
+ print_prefix( output, tu.p_file_name, tu.p_line_num );
+
+ output << "Leaving test " << tu.p_type_name << " \"" << tu.p_name << "\"";
+
+ if( elapsed > 0 ) {
+ output << "; testing time: ";
+ if( elapsed % 1000 == 0 )
+ output << elapsed/1000 << "ms";
+ else
+ output << elapsed << "us";
+ }
+
+ output << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::test_unit_skipped( std::ostream& output, test_unit const& tu, const_string reason )
+{
+ BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::BRIGHT, term_color::YELLOW );
+
+ print_prefix( output, tu.p_file_name, tu.p_line_num );
+
+ output << "Test " << tu.p_type_name << " \"" << tu.full_name() << "\"" << " is skipped because " << reason << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_exception_start( std::ostream& output, log_checkpoint_data const& checkpoint_data, execution_exception const& ex )
+{
+ execution_exception::location const& loc = ex.where();
+
+ print_prefix( output, loc.m_file_name, loc.m_line_num );
+
+ {
+ BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::UNDERLINE, term_color::RED );
+
+ output << "fatal error: in \"" << (loc.m_function.is_empty() ? test_phase_identifier() : loc.m_function ) << "\": "
+ << ex.what();
+ }
+
+ if( !checkpoint_data.m_file_name.is_empty() ) {
+ output << '\n';
+ print_prefix( output, checkpoint_data.m_file_name, checkpoint_data.m_line_num );
+
+ BOOST_TEST_SCOPE_SETCOLOR( m_color_output, output, term_attr::BRIGHT, term_color::CYAN );
+
+ output << "last checkpoint";
+ if( !checkpoint_data.m_message.empty() )
+ output << ": " << checkpoint_data.m_message;
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_exception_finish( std::ostream& output )
+{
+ output << std::endl;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_start( std::ostream& output, log_entry_data const& entry_data, log_entry_types let )
+{
+ using namespace utils;
+
+ switch( let ) {
+ case BOOST_UTL_ET_INFO:
+ print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
+ output << setcolor( m_color_output, term_attr::BRIGHT, term_color::GREEN );
+ output << "info: ";
+ break;
+ case BOOST_UTL_ET_MESSAGE:
+ output << setcolor( m_color_output, term_attr::BRIGHT, term_color::CYAN );
+ break;
+ case BOOST_UTL_ET_WARNING:
+ print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
+ output << setcolor( m_color_output, term_attr::BRIGHT, term_color::YELLOW );
+ output << "warning: in \"" << test_phase_identifier() << "\": ";
+ break;
+ case BOOST_UTL_ET_ERROR:
+ print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
+ output << setcolor( m_color_output, term_attr::BRIGHT, term_color::RED );
+ output << "error: in \"" << test_phase_identifier() << "\": ";
+ break;
+ case BOOST_UTL_ET_FATAL_ERROR:
+ print_prefix( output, entry_data.m_file_name, entry_data.m_line_num );
+ output << setcolor( m_color_output, term_attr::UNDERLINE, term_color::RED );
+ output << "fatal error: in \"" << test_phase_identifier() << "\": ";
+ break;
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_value( std::ostream& output, const_string value )
+{
+ output << value;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_value( std::ostream& output, lazy_ostream const& value )
+{
+ output << value;
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_finish( std::ostream& output )
+{
+ if( m_color_output )
+ output << utils::setcolor(m_color_output);
+
+ output << std::endl;
+}
+
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::print_prefix( std::ostream& output, const_string file_name, std::size_t line_num )
+{
+ if( !file_name.empty() ) {
+#ifdef __APPLE_CC__
+ // Xcode-compatible logging format, idea by Richard Dingwall at
+ // <http://richarddingwall.name/2008/06/01/using-the-boost-unit-test-framework-with-xcode-3/>.
+ output << file_name << ':' << line_num << ": ";
+#else
+ output << file_name << '(' << line_num << "): ";
+#endif
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::entry_context_start( std::ostream& output, log_level l )
+{
+ if( l == log_messages ) {
+ output << "\n[context:";
+ }
+ else {
+ output << (l == log_successful_tests ? "\nAssertion" : "\nFailure" ) << " occurred in a following context:";
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::entry_context_finish( std::ostream& output, log_level l )
+{
+ if( l == log_messages ) {
+ output << "]";
+ }
+ output.flush();
+}
+
+//____________________________________________________________________________//
+
+void
+compiler_log_formatter::log_entry_context( std::ostream& output, log_level /*l*/, const_string context_descr )
+{
+ output << "\n " << context_descr;
+}
+
+//____________________________________________________________________________//
+
+} // namespace output
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_COMPILER_LOG_FORMATTER_IPP_020105GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/cpp_main.ipp b/src/third_party/boost-1.69.0/boost/test/impl/cpp_main.ipp
index aaa5cabfc51..aaa5cabfc51 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/cpp_main.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/cpp_main.ipp
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/debug.ipp b/src/third_party/boost-1.69.0/boost/test/impl/debug.ipp
index a5e5f6da06d..a5e5f6da06d 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/debug.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/debug.ipp
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/decorator.ipp b/src/third_party/boost-1.69.0/boost/test/impl/decorator.ipp
new file mode 100644
index 00000000000..e4bf11ee268
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/decorator.ipp
@@ -0,0 +1,214 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : unit test decorators implementation
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_DECORATOR_IPP_091911GER
+#define BOOST_TEST_TREE_DECORATOR_IPP_091911GER
+
+// Boost.Test
+#include <boost/test/tree/decorator.hpp>
+#include <boost/test/tree/test_unit.hpp>
+
+#include <boost/test/framework.hpp>
+#if BOOST_TEST_SUPPORT_TOKEN_ITERATOR
+#include <boost/test/utils/iterator/token_iterator.hpp>
+#endif
+
+#include <boost/test/detail/throw_exception.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace decorator {
+
+// ************************************************************************** //
+// ************** decorator::collector_t ************** //
+// ************************************************************************** //
+
+// singleton pattern
+BOOST_TEST_SINGLETON_CONS_IMPL(collector_t)
+
+
+collector_t&
+collector_t::operator*( base const& d )
+{
+ m_tu_decorators.push_back( d.clone() );
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+void
+collector_t::store_in( test_unit& tu )
+{
+ tu.p_decorators.value.insert( tu.p_decorators.value.end(), m_tu_decorators.begin(), m_tu_decorators.end() );
+}
+
+//____________________________________________________________________________//
+
+void
+collector_t::reset()
+{
+ m_tu_decorators.clear();
+}
+
+//____________________________________________________________________________//
+
+std::vector<base_ptr>
+collector_t::get_lazy_decorators() const
+{
+ return m_tu_decorators;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::base ************** //
+// ************************************************************************** //
+
+collector_t&
+base::operator*() const
+{
+ return collector_t::instance() * *this;
+}
+
+// ************************************************************************** //
+// ************** decorator::label ************** //
+// ************************************************************************** //
+
+void
+label::apply( test_unit& tu )
+{
+ tu.add_label( m_label );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::expected_failures ************** //
+// ************************************************************************** //
+
+void
+expected_failures::apply( test_unit& tu )
+{
+ tu.increase_exp_fail( m_exp_fail );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::timeout ************** //
+// ************************************************************************** //
+
+void
+timeout::apply( test_unit& tu )
+{
+ tu.p_timeout.value = m_timeout;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::description ************** //
+// ************************************************************************** //
+
+void
+description::apply( test_unit& tu )
+{
+ tu.p_description.value += m_description;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::depends_on ************** //
+// ************************************************************************** //
+
+void
+depends_on::apply( test_unit& tu )
+{
+#if !BOOST_TEST_SUPPORT_TOKEN_ITERATOR
+ BOOST_TEST_SETUP_ASSERT( false, "depends_on decorator is not supported on this platform" );
+#else
+ utils::string_token_iterator tit( m_dependency, (utils::dropped_delimeters = "/", utils::kept_delimeters = utils::dt_none) );
+
+ test_unit* dep = &framework::master_test_suite();
+ while( tit != utils::string_token_iterator() ) {
+ BOOST_TEST_SETUP_ASSERT( dep->p_type == TUT_SUITE, std::string( "incorrect dependency specification " ) + m_dependency );
+
+ test_unit_id next_id = static_cast<test_suite*>(dep)->get( *tit );
+
+ BOOST_TEST_SETUP_ASSERT( next_id != INV_TEST_UNIT_ID,
+ std::string( "incorrect dependency specification " ) + m_dependency );
+
+ dep = &framework::get( next_id, TUT_ANY );
+ ++tit;
+ }
+
+ tu.depends_on( dep );
+#endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::enable_if/enabled/disabled ************** //
+// ************************************************************************** //
+
+void
+enable_if_impl::apply_impl( test_unit& tu, bool condition )
+{
+ BOOST_TEST_SETUP_ASSERT(tu.p_default_status == test_unit::RS_INHERIT,
+ "Can't apply multiple enabled/disabled decorators "
+ "to the same test unit " + tu.full_name());
+
+ tu.p_default_status.value = condition ? test_unit::RS_ENABLED : test_unit::RS_DISABLED;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::fixture ************** //
+// ************************************************************************** //
+
+void
+fixture_t::apply( test_unit& tu )
+{
+ tu.p_fixtures.value.push_back( m_impl );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::depends_on ************** //
+// ************************************************************************** //
+
+void
+precondition::apply( test_unit& tu )
+{
+ tu.add_precondition( m_precondition );
+}
+
+//____________________________________________________________________________//
+
+} // namespace decorator
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_DECORATOR_IPP_091911GER
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/execution_monitor.ipp b/src/third_party/boost-1.69.0/boost/test/impl/execution_monitor.ipp
new file mode 100644
index 00000000000..9b7c5965b4a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/execution_monitor.ipp
@@ -0,0 +1,1450 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// (C) Copyright Beman Dawes and Ullrich Koethe 1995-2001.
+// Use, modification, and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// Provides execution monitor implementation for all supported
+/// configurations, including Microsoft structured exception based, unix signals
+/// based and special workarounds for borland
+///
+/// Note that when testing requirements or user wishes preclude use of this
+/// file as a separate compilation unit, it may be included as a header file.
+///
+/// Header dependencies are deliberately restricted to reduce coupling to other
+/// boost libraries.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
+#define BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/workaround.hpp>
+#include <boost/test/detail/throw_exception.hpp>
+#include <boost/test/execution_monitor.hpp>
+#include <boost/test/debug.hpp>
+
+// Boost
+#include <boost/cstdlib.hpp> // for exit codes
+#include <boost/config.hpp> // for workarounds
+#include <boost/core/ignore_unused.hpp> // for ignore_unused
+#ifndef BOOST_NO_EXCEPTIONS
+#include <boost/exception/get_error_info.hpp> // for get_error_info
+#include <boost/exception/current_exception_cast.hpp> // for current_exception_cast
+#include <boost/exception/diagnostic_information.hpp>
+#endif
+
+// STL
+#include <string> // for std::string
+#include <new> // for std::bad_alloc
+#include <typeinfo> // for std::bad_cast, std::bad_typeid
+#include <exception> // for std::exception, std::bad_exception
+#include <stdexcept> // for std exception hierarchy
+#include <cstring> // for C string API
+#include <cassert> // for assert
+#include <cstddef> // for NULL
+#include <cstdio> // for vsnprintf
+#include <cstdarg> // for varargs
+
+#include <iostream> // for varargs
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::strerror; using ::strlen; using ::strncat; }
+#endif
+
+// to use vsnprintf
+#if defined(__SUNPRO_CC) || defined(__SunOS)
+# include <stdio.h>
+# include <stdarg.h>
+using std::va_list;
+#endif
+
+// to use vsnprintf
+#if defined(__QNXNTO__) || defined(__VXWORKS__)
+# include <stdio.h>
+using std::va_list;
+#endif
+
+#if defined(__VXWORKS__)
+# define BOOST_TEST_LIMITED_SIGNAL_DETAILS
+#endif
+
+#ifdef BOOST_SEH_BASED_SIGNAL_HANDLING
+# include <windows.h>
+
+# if defined(__MWERKS__) || (defined(_MSC_VER) && !defined(UNDER_CE))
+# include <eh.h>
+# endif
+
+# if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 || defined(__MWERKS__)
+# include <stdint.h>
+# endif
+
+# if defined(__BORLANDC__) && __BORLANDC__ < 0x560
+ typedef unsigned uintptr_t;
+# endif
+
+# if defined(UNDER_CE) && BOOST_WORKAROUND(_MSC_VER, < 1500 )
+ typedef void* uintptr_t;
+# elif defined(UNDER_CE)
+# include <crtdefs.h>
+# endif
+
+# if !defined(NDEBUG) && defined(_MSC_VER) && !defined(UNDER_CE)
+# include <crtdbg.h>
+# define BOOST_TEST_CRT_HOOK_TYPE _CRT_REPORT_HOOK
+# define BOOST_TEST_CRT_ASSERT _CRT_ASSERT
+# define BOOST_TEST_CRT_ERROR _CRT_ERROR
+# define BOOST_TEST_CRT_SET_HOOK(H) _CrtSetReportHook(H)
+# else
+# define BOOST_TEST_CRT_HOOK_TYPE void*
+# define BOOST_TEST_CRT_ASSERT 2
+# define BOOST_TEST_CRT_ERROR 1
+# define BOOST_TEST_CRT_SET_HOOK(H) (void*)(H)
+# endif
+
+# if (!BOOST_WORKAROUND(_MSC_VER, >= 1400 ) && \
+ !defined(BOOST_COMO)) || defined(UNDER_CE)
+
+typedef void* _invalid_parameter_handler;
+
+inline _invalid_parameter_handler
+_set_invalid_parameter_handler( _invalid_parameter_handler arg )
+{
+ return arg;
+}
+
+# endif
+
+# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564)) || defined(UNDER_CE)
+
+namespace { void _set_se_translator( void* ) {} }
+
+# endif
+
+#elif defined(BOOST_HAS_SIGACTION)
+
+# define BOOST_SIGACTION_BASED_SIGNAL_HANDLING
+
+# include <unistd.h>
+# include <signal.h>
+# include <setjmp.h>
+
+# if defined(__FreeBSD__)
+
+# include <osreldate.h>
+
+# ifndef SIGPOLL
+# define SIGPOLL SIGIO
+# endif
+
+# if (__FreeBSD_version < 70100)
+
+# define ILL_ILLADR 0 // ILL_RESAD_FAULT
+# define ILL_PRVOPC ILL_PRIVIN_FAULT
+# define ILL_ILLOPN 2 // ILL_RESOP_FAULT
+# define ILL_COPROC ILL_FPOP_FAULT
+
+# define BOOST_TEST_LIMITED_SIGNAL_DETAILS
+
+# endif
+# endif
+
+# if defined(__ANDROID__)
+# include <android/api-level.h>
+# endif
+
+// documentation of BOOST_TEST_DISABLE_ALT_STACK in execution_monitor.hpp
+# if !defined(__CYGWIN__) && !defined(__QNXNTO__) && !defined(__bgq__) && \
+ (!defined(__ANDROID__) || __ANDROID_API__ >= 8) && \
+ !defined(BOOST_TEST_DISABLE_ALT_STACK)
+# define BOOST_TEST_USE_ALT_STACK
+# endif
+
+# if defined(SIGPOLL) && !defined(__CYGWIN__) && \
+ !(defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)) && \
+ !defined(__NetBSD__) && \
+ !defined(__QNXNTO__)
+# define BOOST_TEST_CATCH_SIGPOLL
+# endif
+
+# ifdef BOOST_TEST_USE_ALT_STACK
+# define BOOST_TEST_ALT_STACK_SIZE SIGSTKSZ
+# endif
+
+
+#else
+
+# define BOOST_NO_SIGNAL_HANDLING
+
+#endif
+
+#ifndef UNDER_CE
+#include <errno.h>
+#endif
+
+#if !defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
+# include <boost/core/demangle.hpp>
+#endif
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+
+// ************************************************************************** //
+// ************** throw_exception ************** //
+// ************************************************************************** //
+
+#ifdef BOOST_NO_EXCEPTIONS
+void throw_exception( std::exception const & e ) { abort(); }
+#endif
+
+// ************************************************************************** //
+// ************** report_error ************** //
+// ************************************************************************** //
+
+namespace detail {
+
+#ifdef __BORLANDC__
+# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) std::vsnprintf( (a1), (a2), (a3), (a4) )
+#elif BOOST_WORKAROUND(_MSC_VER, <= 1310) || \
+ BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3000)) || \
+ defined(UNDER_CE)
+# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) _vsnprintf( (a1), (a2), (a3), (a4) )
+#else
+# define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) vsnprintf( (a1), (a2), (a3), (a4) )
+#endif
+
+#ifndef BOOST_NO_EXCEPTIONS
+
+template <typename ErrorInfo>
+typename ErrorInfo::value_type
+extract( boost::exception const* ex )
+{
+ if( !ex )
+ return 0;
+
+ typename ErrorInfo::value_type const * val = boost::get_error_info<ErrorInfo>( *ex );
+
+ return val ? *val : 0;
+}
+
+//____________________________________________________________________________//
+
+static void
+report_error( execution_exception::error_code ec, boost::exception const* be, char const* format, va_list* args )
+{
+ static const int REPORT_ERROR_BUFFER_SIZE = 4096;
+ static char buf[REPORT_ERROR_BUFFER_SIZE];
+
+ BOOST_TEST_VSNPRINTF( buf, sizeof(buf)-1, format, *args );
+ buf[sizeof(buf)-1] = 0;
+
+ va_end( *args );
+
+ BOOST_TEST_I_THROW(execution_exception( ec, buf, execution_exception::location( extract<throw_file>( be ),
+ (size_t)extract<throw_line>( be ),
+ extract<throw_function>( be ) ) ));
+}
+
+//____________________________________________________________________________//
+
+static void
+report_error( execution_exception::error_code ec, boost::exception const* be, char const* format, ... )
+{
+ va_list args;
+ va_start( args, format );
+
+ report_error( ec, be, format, &args );
+}
+
+#endif
+
+//____________________________________________________________________________//
+
+static void
+report_error( execution_exception::error_code ec, char const* format, ... )
+{
+ va_list args;
+ va_start( args, format );
+
+ report_error( ec, 0, format, &args );
+}
+
+//____________________________________________________________________________//
+
+template<typename Tr,typename Functor>
+inline int
+do_invoke( Tr const& tr, Functor const& F )
+{
+ return tr ? (*tr)( F ) : F();
+}
+
+//____________________________________________________________________________//
+
+struct fpe_except_guard {
+ explicit fpe_except_guard( unsigned detect_fpe )
+ : m_detect_fpe( detect_fpe )
+ {
+ // prepare fp exceptions control
+ m_previously_enabled = fpe::disable( fpe::BOOST_FPE_ALL );
+ if( m_previously_enabled != fpe::BOOST_FPE_INV && detect_fpe != fpe::BOOST_FPE_OFF )
+ fpe::enable( detect_fpe );
+ }
+ ~fpe_except_guard()
+ {
+ if( m_detect_fpe != fpe::BOOST_FPE_OFF )
+ fpe::disable( m_detect_fpe );
+ if( m_previously_enabled != fpe::BOOST_FPE_INV )
+ fpe::enable( m_previously_enabled );
+ }
+
+ unsigned m_detect_fpe;
+ unsigned m_previously_enabled;
+};
+
+
+// ************************************************************************** //
+// ************** typeid_name ************** //
+// ************************************************************************** //
+
+#if !defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
+template<typename T>
+std::string
+typeid_name( T const& t )
+{
+ return boost::core::demangle(typeid(t).name());
+}
+#endif
+
+} // namespace detail
+
+#if defined(BOOST_SIGACTION_BASED_SIGNAL_HANDLING)
+
+// ************************************************************************** //
+// ************** Sigaction based signal handling ************** //
+// ************************************************************************** //
+
+namespace detail {
+
+// ************************************************************************** //
+// ************** boost::detail::system_signal_exception ************** //
+// ************************************************************************** //
+
+class system_signal_exception {
+public:
+ // Constructor
+ system_signal_exception()
+ : m_sig_info( 0 )
+ , m_context( 0 )
+ {}
+
+ // Access methods
+ void operator()( siginfo_t* i, void* c )
+ {
+ m_sig_info = i;
+ m_context = c;
+ }
+ void report() const;
+
+private:
+ // Data members
+ siginfo_t* m_sig_info; // system signal detailed info
+ void* m_context; // signal context
+};
+
+//____________________________________________________________________________//
+
+void
+system_signal_exception::report() const
+{
+ if( !m_sig_info )
+ return; // no error actually occur?
+
+ switch( m_sig_info->si_code ) {
+#ifdef __VXWORKS__
+// a bit of a hack to adapt code to small m_sig_info VxWorks uses
+#define si_addr si_value.sival_int
+#define si_band si_value.sival_int
+#else
+ case SI_USER:
+ report_error( execution_exception::system_error,
+ "signal: generated by kill() (or family); uid=%d; pid=%d",
+ (int)m_sig_info->si_uid, (int)m_sig_info->si_pid );
+ break;
+#endif
+ case SI_QUEUE:
+ report_error( execution_exception::system_error,
+ "signal: sent by sigqueue()" );
+ break;
+ case SI_TIMER:
+ report_error( execution_exception::system_error,
+ "signal: the expiration of a timer set by timer_settimer()" );
+ break;
+ case SI_ASYNCIO:
+ report_error( execution_exception::system_error,
+ "signal: generated by the completion of an asynchronous I/O request" );
+ break;
+ case SI_MESGQ:
+ report_error( execution_exception::system_error,
+ "signal: generated by the the arrival of a message on an empty message queue" );
+ break;
+ default:
+ break;
+ }
+
+ switch( m_sig_info->si_signo ) {
+ case SIGILL:
+ switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+ case ILL_ILLOPC:
+ report_error( execution_exception::system_fatal_error,
+ "signal: illegal opcode; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case ILL_ILLTRP:
+ report_error( execution_exception::system_fatal_error,
+ "signal: illegal trap; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case ILL_PRVREG:
+ report_error( execution_exception::system_fatal_error,
+ "signal: privileged register; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case ILL_BADSTK:
+ report_error( execution_exception::system_fatal_error,
+ "signal: internal stack error; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+#endif
+ case ILL_ILLOPN:
+ report_error( execution_exception::system_fatal_error,
+ "signal: illegal operand; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case ILL_ILLADR:
+ report_error( execution_exception::system_fatal_error,
+ "signal: illegal addressing mode; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case ILL_PRVOPC:
+ report_error( execution_exception::system_fatal_error,
+ "signal: privileged opcode; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case ILL_COPROC:
+ report_error( execution_exception::system_fatal_error,
+ "signal: co-processor error; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ default:
+ report_error( execution_exception::system_fatal_error,
+ "signal: SIGILL, si_code: %d (illegal instruction; address of failing instruction: 0x%08lx)",
+ m_sig_info->si_addr, m_sig_info->si_code );
+ break;
+ }
+ break;
+
+ case SIGFPE:
+ switch( m_sig_info->si_code ) {
+ case FPE_INTDIV:
+ report_error( execution_exception::system_error,
+ "signal: integer divide by zero; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case FPE_INTOVF:
+ report_error( execution_exception::system_error,
+ "signal: integer overflow; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case FPE_FLTDIV:
+ report_error( execution_exception::system_error,
+ "signal: floating point divide by zero; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case FPE_FLTOVF:
+ report_error( execution_exception::system_error,
+ "signal: floating point overflow; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case FPE_FLTUND:
+ report_error( execution_exception::system_error,
+ "signal: floating point underflow; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case FPE_FLTRES:
+ report_error( execution_exception::system_error,
+ "signal: floating point inexact result; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case FPE_FLTINV:
+ report_error( execution_exception::system_error,
+ "signal: invalid floating point operation; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ case FPE_FLTSUB:
+ report_error( execution_exception::system_error,
+ "signal: subscript out of range; address of failing instruction: 0x%08lx",
+ m_sig_info->si_addr );
+ break;
+ default:
+ report_error( execution_exception::system_error,
+ "signal: SIGFPE, si_code: %d (errnoneous arithmetic operations; address of failing instruction: 0x%08lx)",
+ m_sig_info->si_addr, m_sig_info->si_code );
+ break;
+ }
+ break;
+
+ case SIGSEGV:
+ switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+ case SEGV_MAPERR:
+ report_error( execution_exception::system_fatal_error,
+ "memory access violation at address: 0x%08lx: no mapping at fault address",
+ m_sig_info->si_addr );
+ break;
+ case SEGV_ACCERR:
+ report_error( execution_exception::system_fatal_error,
+ "memory access violation at address: 0x%08lx: invalid permissions",
+ m_sig_info->si_addr );
+ break;
+#endif
+ default:
+ report_error( execution_exception::system_fatal_error,
+ "signal: SIGSEGV, si_code: %d (memory access violation at address: 0x%08lx)",
+ m_sig_info->si_addr, m_sig_info->si_code );
+ break;
+ }
+ break;
+
+ case SIGBUS:
+ switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+ case BUS_ADRALN:
+ report_error( execution_exception::system_fatal_error,
+ "memory access violation at address: 0x%08lx: invalid address alignment",
+ m_sig_info->si_addr );
+ break;
+ case BUS_ADRERR:
+ report_error( execution_exception::system_fatal_error,
+ "memory access violation at address: 0x%08lx: non-existent physical address",
+ m_sig_info->si_addr );
+ break;
+ case BUS_OBJERR:
+ report_error( execution_exception::system_fatal_error,
+ "memory access violation at address: 0x%08lx: object specific hardware error",
+ m_sig_info->si_addr );
+ break;
+#endif
+ default:
+ report_error( execution_exception::system_fatal_error,
+ "signal: SIGSEGV, si_code: %d (memory access violation at address: 0x%08lx)",
+ m_sig_info->si_addr, m_sig_info->si_code );
+ break;
+ }
+ break;
+
+#if defined(BOOST_TEST_CATCH_SIGPOLL)
+
+ case SIGPOLL:
+ switch( m_sig_info->si_code ) {
+#ifndef BOOST_TEST_LIMITED_SIGNAL_DETAILS
+ case POLL_IN:
+ report_error( execution_exception::system_error,
+ "data input available; band event %d",
+ (int)m_sig_info->si_band );
+ break;
+ case POLL_OUT:
+ report_error( execution_exception::system_error,
+ "output buffers available; band event %d",
+ (int)m_sig_info->si_band );
+ break;
+ case POLL_MSG:
+ report_error( execution_exception::system_error,
+ "input message available; band event %d",
+ (int)m_sig_info->si_band );
+ break;
+ case POLL_ERR:
+ report_error( execution_exception::system_error,
+ "i/o error; band event %d",
+ (int)m_sig_info->si_band );
+ break;
+ case POLL_PRI:
+ report_error( execution_exception::system_error,
+ "high priority input available; band event %d",
+ (int)m_sig_info->si_band );
+ break;
+#if defined(POLL_ERR) && defined(POLL_HUP) && (POLL_ERR - POLL_HUP)
+ case POLL_HUP:
+ report_error( execution_exception::system_error,
+ "device disconnected; band event %d",
+ (int)m_sig_info->si_band );
+ break;
+#endif
+#endif
+ default:
+ report_error( execution_exception::system_error,
+ "signal: SIGPOLL, si_code: %d (asynchronous I/O event occurred; band event %d)",
+ (int)m_sig_info->si_band, m_sig_info->si_code );
+ break;
+ }
+ break;
+
+#endif
+
+ case SIGABRT:
+ report_error( execution_exception::system_error,
+ "signal: SIGABRT (application abort requested)" );
+ break;
+
+ case SIGALRM:
+ report_error( execution_exception::timeout_error,
+ "signal: SIGALRM (timeout while executing function)" );
+ break;
+
+ default:
+ report_error( execution_exception::system_error,
+ "unrecognized signal %d", m_sig_info->si_signo );
+ }
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** boost::detail::signal_action ************** //
+// ************************************************************************** //
+
+// Forward declaration
+extern "C" {
+static void boost_execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context );
+static void boost_execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context );
+}
+
+class signal_action {
+ typedef struct sigaction* sigaction_ptr;
+public:
+ //Constructor
+ signal_action();
+ signal_action( int sig, bool install, bool attach_dbg, char* alt_stack );
+ ~signal_action();
+
+private:
+ // Data members
+ int m_sig;
+ bool m_installed;
+ struct sigaction m_new_action;
+ struct sigaction m_old_action;
+};
+
+//____________________________________________________________________________//
+
+signal_action::signal_action()
+: m_installed( false )
+{}
+
+//____________________________________________________________________________//
+
+signal_action::signal_action( int sig, bool install, bool attach_dbg, char* alt_stack )
+: m_sig( sig )
+, m_installed( install )
+{
+ if( !install )
+ return;
+
+ std::memset( &m_new_action, 0, sizeof(struct sigaction) );
+
+ BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig , sigaction_ptr(), &m_new_action ) != -1 );
+
+ if( m_new_action.sa_sigaction || m_new_action.sa_handler ) {
+ m_installed = false;
+ return;
+ }
+
+ m_new_action.sa_flags |= SA_SIGINFO;
+ m_new_action.sa_sigaction = attach_dbg ? &boost_execution_monitor_attaching_signal_handler
+ : &boost_execution_monitor_jumping_signal_handler;
+ BOOST_TEST_SYS_ASSERT( sigemptyset( &m_new_action.sa_mask ) != -1 );
+
+#ifdef BOOST_TEST_USE_ALT_STACK
+ if( alt_stack )
+ m_new_action.sa_flags |= SA_ONSTACK;
+#endif
+
+ BOOST_TEST_SYS_ASSERT( ::sigaction( m_sig, &m_new_action, &m_old_action ) != -1 );
+}
+
+//____________________________________________________________________________//
+
+signal_action::~signal_action()
+{
+ if( m_installed )
+ ::sigaction( m_sig, &m_old_action , sigaction_ptr() );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** boost::detail::signal_handler ************** //
+// ************************************************************************** //
+
+class signal_handler {
+public:
+ // Constructor
+ explicit signal_handler( bool catch_system_errors, bool detect_fpe, unsigned timeout, bool attach_dbg, char* alt_stack );
+
+ // Destructor
+ ~signal_handler();
+
+ // access methods
+ static sigjmp_buf& jump_buffer()
+ {
+ assert( !!s_active_handler );
+
+ return s_active_handler->m_sigjmp_buf;
+ }
+
+ static system_signal_exception& sys_sig()
+ {
+ assert( !!s_active_handler );
+
+ return s_active_handler->m_sys_sig;
+ }
+
+private:
+ // Data members
+ signal_handler* m_prev_handler;
+ unsigned m_timeout;
+
+ // Note: We intentionality do not catch SIGCHLD. Users have to deal with it themselves
+ signal_action m_ILL_action;
+ signal_action m_FPE_action;
+ signal_action m_SEGV_action;
+ signal_action m_BUS_action;
+ signal_action m_CHLD_action;
+ signal_action m_POLL_action;
+ signal_action m_ABRT_action;
+ signal_action m_ALRM_action;
+
+ sigjmp_buf m_sigjmp_buf;
+ system_signal_exception m_sys_sig;
+
+ static signal_handler* s_active_handler;
+};
+
+// !! need to be placed in thread specific storage
+typedef signal_handler* signal_handler_ptr;
+signal_handler* signal_handler::s_active_handler = signal_handler_ptr();
+
+//____________________________________________________________________________//
+
+signal_handler::signal_handler( bool catch_system_errors, bool detect_fpe, unsigned timeout, bool attach_dbg, char* alt_stack )
+: m_prev_handler( s_active_handler )
+, m_timeout( timeout )
+, m_ILL_action ( SIGILL , catch_system_errors, attach_dbg, alt_stack )
+, m_FPE_action ( SIGFPE , detect_fpe , attach_dbg, alt_stack )
+, m_SEGV_action( SIGSEGV, catch_system_errors, attach_dbg, alt_stack )
+, m_BUS_action ( SIGBUS , catch_system_errors, attach_dbg, alt_stack )
+#ifdef BOOST_TEST_CATCH_SIGPOLL
+, m_POLL_action( SIGPOLL, catch_system_errors, attach_dbg, alt_stack )
+#endif
+, m_ABRT_action( SIGABRT, catch_system_errors, attach_dbg, alt_stack )
+, m_ALRM_action( SIGALRM, timeout > 0 , attach_dbg, alt_stack )
+{
+ s_active_handler = this;
+
+ if( m_timeout > 0 ) {
+ ::alarm( 0 );
+ ::alarm( timeout );
+ }
+
+#ifdef BOOST_TEST_USE_ALT_STACK
+ if( alt_stack ) {
+ stack_t sigstk;
+ std::memset( &sigstk, 0, sizeof(stack_t) );
+
+ BOOST_TEST_SYS_ASSERT( ::sigaltstack( 0, &sigstk ) != -1 );
+
+ if( sigstk.ss_flags & SS_DISABLE ) {
+ sigstk.ss_sp = alt_stack;
+ sigstk.ss_size = BOOST_TEST_ALT_STACK_SIZE;
+ sigstk.ss_flags = 0;
+ BOOST_TEST_SYS_ASSERT( ::sigaltstack( &sigstk, 0 ) != -1 );
+ }
+ }
+#endif
+}
+
+//____________________________________________________________________________//
+
+signal_handler::~signal_handler()
+{
+ assert( s_active_handler == this );
+
+ if( m_timeout > 0 )
+ ::alarm( 0 );
+
+#ifdef BOOST_TEST_USE_ALT_STACK
+#ifdef __GNUC__
+ // We shouldn't need to explicitly initialize all the members here,
+ // but gcc warns if we don't, so add initializers for each of the
+ // members specified in the POSIX std:
+ stack_t sigstk = { 0, 0, 0 };
+#else
+ stack_t sigstk = { };
+#endif
+
+ sigstk.ss_size = MINSIGSTKSZ;
+ sigstk.ss_flags = SS_DISABLE;
+ if( ::sigaltstack( &sigstk, 0 ) == -1 ) {
+ int error_n = errno;
+ std::cerr << "******** errors disabling the alternate stack:" << std::endl
+ << "\t#error:" << error_n << std::endl
+ << "\t" << std::strerror( error_n ) << std::endl;
+ }
+#endif
+
+ s_active_handler = m_prev_handler;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** execution_monitor_signal_handler ************** //
+// ************************************************************************** //
+
+extern "C" {
+
+static void boost_execution_monitor_jumping_signal_handler( int sig, siginfo_t* info, void* context )
+{
+ signal_handler::sys_sig()( info, context );
+
+ siglongjmp( signal_handler::jump_buffer(), sig );
+}
+
+//____________________________________________________________________________//
+
+static void boost_execution_monitor_attaching_signal_handler( int sig, siginfo_t* info, void* context )
+{
+ if( !debug::attach_debugger( false ) )
+ boost_execution_monitor_jumping_signal_handler( sig, info, context );
+
+ // debugger attached; it will handle the signal
+ BOOST_TEST_SYS_ASSERT( ::signal( sig, SIG_DFL ) != SIG_ERR );
+}
+
+//____________________________________________________________________________//
+
+}
+
+} // namespace detail
+
+// ************************************************************************** //
+// ************** execution_monitor::catch_signals ************** //
+// ************************************************************************** //
+
+int
+execution_monitor::catch_signals( boost::function<int ()> const& F )
+{
+ using namespace detail;
+
+#if defined(__CYGWIN__)
+ p_catch_system_errors.value = false;
+#endif
+
+#ifdef BOOST_TEST_USE_ALT_STACK
+ if( !!p_use_alt_stack && !m_alt_stack )
+ m_alt_stack.reset( new char[BOOST_TEST_ALT_STACK_SIZE] );
+#else
+ p_use_alt_stack.value = false;
+#endif
+
+ signal_handler local_signal_handler( p_catch_system_errors,
+ p_catch_system_errors || (p_detect_fp_exceptions != fpe::BOOST_FPE_OFF),
+ p_timeout,
+ p_auto_start_dbg,
+ !p_use_alt_stack ? 0 : m_alt_stack.get() );
+
+ if( !sigsetjmp( signal_handler::jump_buffer(), 1 ) )
+ return detail::do_invoke( m_custom_translators , F );
+ else
+ BOOST_TEST_I_THROW( local_signal_handler.sys_sig() );
+}
+
+//____________________________________________________________________________//
+
+#elif defined(BOOST_SEH_BASED_SIGNAL_HANDLING)
+
+// ************************************************************************** //
+// ************** Microsoft structured exception handling ************** //
+// ************************************************************************** //
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0564))
+namespace { void _set_se_translator( void* ) {} }
+#endif
+
+namespace detail {
+
+// ************************************************************************** //
+// ************** boost::detail::system_signal_exception ************** //
+// ************************************************************************** //
+
+class system_signal_exception {
+public:
+ // Constructor
+ explicit system_signal_exception( execution_monitor* em )
+ : m_em( em )
+ , m_se_id( 0 )
+ , m_fault_address( 0 )
+ , m_dir( false )
+ {}
+
+ void report() const;
+ int operator()( unsigned id, _EXCEPTION_POINTERS* exps );
+
+private:
+ // Data members
+ execution_monitor* m_em;
+
+ unsigned m_se_id;
+ void* m_fault_address;
+ bool m_dir;
+};
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
+static void
+seh_catch_preventer( unsigned /* id */, _EXCEPTION_POINTERS* /* exps */ )
+{
+ throw;
+}
+#endif
+
+//____________________________________________________________________________//
+
+int
+system_signal_exception::operator()( unsigned id, _EXCEPTION_POINTERS* exps )
+{
+ const unsigned MSFT_CPP_EXCEPT = 0xE06d7363; // EMSC
+
+ // C++ exception - allow to go through
+ if( id == MSFT_CPP_EXCEPT )
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ // FPE detection is enabled, while system exception detection is not - check if this is actually FPE
+ if( !m_em->p_catch_system_errors ) {
+ if( !m_em->p_detect_fp_exceptions )
+ return EXCEPTION_CONTINUE_SEARCH;
+
+ switch( id ) {
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+ case EXCEPTION_FLT_STACK_CHECK:
+ case EXCEPTION_FLT_DENORMAL_OPERAND:
+ case EXCEPTION_FLT_INEXACT_RESULT:
+ case EXCEPTION_FLT_OVERFLOW:
+ case EXCEPTION_FLT_UNDERFLOW:
+ case EXCEPTION_FLT_INVALID_OPERATION:
+ case STATUS_FLOAT_MULTIPLE_FAULTS:
+ case STATUS_FLOAT_MULTIPLE_TRAPS:
+ break;
+ default:
+ return EXCEPTION_CONTINUE_SEARCH;
+ }
+ }
+
+ if( !!m_em->p_auto_start_dbg && debug::attach_debugger( false ) ) {
+ m_em->p_catch_system_errors.value = false;
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
+ _set_se_translator( &seh_catch_preventer );
+#endif
+ return EXCEPTION_CONTINUE_EXECUTION;
+ }
+
+ m_se_id = id;
+ if( m_se_id == EXCEPTION_ACCESS_VIOLATION && exps->ExceptionRecord->NumberParameters == 2 ) {
+ m_fault_address = (void*)exps->ExceptionRecord->ExceptionInformation[1];
+ m_dir = exps->ExceptionRecord->ExceptionInformation[0] == 0;
+ }
+
+ return EXCEPTION_EXECUTE_HANDLER;
+}
+
+//____________________________________________________________________________//
+
+void
+system_signal_exception::report() const
+{
+ switch( m_se_id ) {
+ // cases classified as system_fatal_error
+ case EXCEPTION_ACCESS_VIOLATION: {
+ if( !m_fault_address )
+ detail::report_error( execution_exception::system_fatal_error, "memory access violation" );
+ else
+ detail::report_error(
+ execution_exception::system_fatal_error,
+ "memory access violation occurred at address 0x%08lx, while attempting to %s",
+ m_fault_address,
+ m_dir ? " read inaccessible data"
+ : " write to an inaccessible (or protected) address"
+ );
+ break;
+ }
+
+ case EXCEPTION_ILLEGAL_INSTRUCTION:
+ detail::report_error( execution_exception::system_fatal_error, "illegal instruction" );
+ break;
+
+ case EXCEPTION_PRIV_INSTRUCTION:
+ detail::report_error( execution_exception::system_fatal_error, "tried to execute an instruction whose operation is not allowed in the current machine mode" );
+ break;
+
+ case EXCEPTION_IN_PAGE_ERROR:
+ detail::report_error( execution_exception::system_fatal_error, "access to a memory page that is not present" );
+ break;
+
+ case EXCEPTION_STACK_OVERFLOW:
+ detail::report_error( execution_exception::system_fatal_error, "stack overflow" );
+ break;
+
+ case EXCEPTION_NONCONTINUABLE_EXCEPTION:
+ detail::report_error( execution_exception::system_fatal_error, "tried to continue execution after a non continuable exception occurred" );
+ break;
+
+ // cases classified as (non-fatal) system_trap
+ case EXCEPTION_DATATYPE_MISALIGNMENT:
+ detail::report_error( execution_exception::system_error, "data misalignment" );
+ break;
+
+ case EXCEPTION_INT_DIVIDE_BY_ZERO:
+ detail::report_error( execution_exception::system_error, "integer divide by zero" );
+ break;
+
+ case EXCEPTION_INT_OVERFLOW:
+ detail::report_error( execution_exception::system_error, "integer overflow" );
+ break;
+
+ case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
+ detail::report_error( execution_exception::system_error, "array bounds exceeded" );
+ break;
+
+ case EXCEPTION_FLT_DIVIDE_BY_ZERO:
+ detail::report_error( execution_exception::system_error, "floating point divide by zero" );
+ break;
+
+ case EXCEPTION_FLT_STACK_CHECK:
+ detail::report_error( execution_exception::system_error,
+ "stack overflowed or underflowed as the result of a floating-point operation" );
+ break;
+
+ case EXCEPTION_FLT_DENORMAL_OPERAND:
+ detail::report_error( execution_exception::system_error,
+ "operand of floating point operation is denormal" );
+ break;
+
+ case EXCEPTION_FLT_INEXACT_RESULT:
+ detail::report_error( execution_exception::system_error,
+ "result of a floating-point operation cannot be represented exactly" );
+ break;
+
+ case EXCEPTION_FLT_OVERFLOW:
+ detail::report_error( execution_exception::system_error,
+ "exponent of a floating-point operation is greater than the magnitude allowed by the corresponding type" );
+ break;
+
+ case EXCEPTION_FLT_UNDERFLOW:
+ detail::report_error( execution_exception::system_error,
+ "exponent of a floating-point operation is less than the magnitude allowed by the corresponding type" );
+ break;
+
+ case EXCEPTION_FLT_INVALID_OPERATION:
+ detail::report_error( execution_exception::system_error, "floating point error" );
+ break;
+
+ case STATUS_FLOAT_MULTIPLE_FAULTS:
+ detail::report_error( execution_exception::system_error, "multiple floating point errors" );
+ break;
+
+ case STATUS_FLOAT_MULTIPLE_TRAPS:
+ detail::report_error( execution_exception::system_error, "multiple floating point errors" );
+ break;
+
+ case EXCEPTION_BREAKPOINT:
+ detail::report_error( execution_exception::system_error, "breakpoint encountered" );
+ break;
+
+ default:
+ detail::report_error( execution_exception::system_error, "unrecognized exception. Id: 0x%08lx", m_se_id );
+ break;
+ }
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** assert_reporting_function ************** //
+// ************************************************************************** //
+
+int BOOST_TEST_CALL_DECL
+assert_reporting_function( int reportType, char* userMessage, int* )
+{
+ // write this way instead of switch to avoid unreachable statements
+ if( reportType == BOOST_TEST_CRT_ASSERT || reportType == BOOST_TEST_CRT_ERROR )
+ detail::report_error( reportType == BOOST_TEST_CRT_ASSERT ? execution_exception::user_error : execution_exception::system_error, userMessage );
+
+ return 0;
+} // assert_reporting_function
+
+//____________________________________________________________________________//
+
+void BOOST_TEST_CALL_DECL
+invalid_param_handler( wchar_t const* /* expr */,
+ wchar_t const* /* func */,
+ wchar_t const* /* file */,
+ unsigned /* line */,
+ uintptr_t /* reserved */)
+{
+ detail::report_error( execution_exception::user_error,
+ "Invalid parameter detected by C runtime library" );
+}
+
+//____________________________________________________________________________//
+
+} // namespace detail
+
+// ************************************************************************** //
+// ************** execution_monitor::catch_signals ************** //
+// ************************************************************************** //
+
+int
+execution_monitor::catch_signals( boost::function<int ()> const& F )
+{
+ _invalid_parameter_handler old_iph = _invalid_parameter_handler();
+ BOOST_TEST_CRT_HOOK_TYPE old_crt_hook = 0;
+
+ if( p_catch_system_errors ) {
+ old_crt_hook = BOOST_TEST_CRT_SET_HOOK( &detail::assert_reporting_function );
+
+ old_iph = _set_invalid_parameter_handler(
+ reinterpret_cast<_invalid_parameter_handler>( &detail::invalid_param_handler ) );
+ } else if( !p_detect_fp_exceptions ) {
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
+ _set_se_translator( &detail::seh_catch_preventer );
+#endif
+ }
+
+ detail::system_signal_exception SSE( this );
+
+ int ret_val = 0;
+ // clang windows workaround: this not available in __finally scope
+ bool l_catch_system_errors = p_catch_system_errors;
+
+ __try {
+ __try {
+ ret_val = detail::do_invoke( m_custom_translators, F );
+ }
+ __except( SSE( GetExceptionCode(), GetExceptionInformation() ) ) {
+ throw SSE;
+ }
+ }
+ __finally {
+ if( l_catch_system_errors ) {
+ BOOST_TEST_CRT_SET_HOOK( old_crt_hook );
+
+ _set_invalid_parameter_handler( old_iph );
+ }
+ }
+
+ return ret_val;
+}
+
+//____________________________________________________________________________//
+
+#else // default signal handler
+
+namespace detail {
+
+class system_signal_exception {
+public:
+ void report() const {}
+};
+
+} // namespace detail
+
+int
+execution_monitor::catch_signals( boost::function<int ()> const& F )
+{
+ return detail::do_invoke( m_custom_translators , F );
+}
+
+//____________________________________________________________________________//
+
+#endif // choose signal handler
+
+// ************************************************************************** //
+// ************** execution_monitor ************** //
+// ************************************************************************** //
+
+execution_monitor::execution_monitor()
+: p_catch_system_errors( true )
+, p_auto_start_dbg( false )
+, p_timeout( 0 )
+, p_use_alt_stack( true )
+, p_detect_fp_exceptions( fpe::BOOST_FPE_OFF )
+{}
+
+//____________________________________________________________________________//
+
+int
+execution_monitor::execute( boost::function<int ()> const& F )
+{
+ if( debug::under_debugger() )
+ p_catch_system_errors.value = false;
+
+ BOOST_TEST_I_TRY {
+ detail::fpe_except_guard G( p_detect_fp_exceptions );
+ unit_test::ut_detail::ignore_unused_variable_warning( G );
+
+ return catch_signals( F );
+ }
+
+#ifndef BOOST_NO_EXCEPTIONS
+
+ // Catch-clause reference arguments are a bit different from function
+ // arguments (ISO 15.3 paragraphs 18 & 19). Apparently const isn't
+ // required. Programmers ask for const anyhow, so we supply it. That's
+ // easier than answering questions about non-const usage.
+
+ catch( char const* ex )
+ { detail::report_error( execution_exception::cpp_exception_error,
+ "C string: %s", ex ); }
+ catch( std::string const& ex )
+ { detail::report_error( execution_exception::cpp_exception_error,
+ "std::string: %s", ex.c_str() ); }
+
+ // boost::exception (before std::exception, with extended diagnostic)
+ catch( boost::exception const& ex )
+ { detail::report_error( execution_exception::cpp_exception_error,
+ &ex,
+#if defined(BOOST_NO_TYPEID) || defined(BOOST_NO_RTTI)
+ "unknown boost::exception" ); }
+#else
+ boost::diagnostic_information(ex).c_str() ); }
+#endif
+
+ // std:: exceptions
+#if defined(BOOST_NO_TYPEID) || defined(BOOST_NO_RTTI)
+#define CATCH_AND_REPORT_STD_EXCEPTION( ex_name ) \
+ catch( ex_name const& ex ) \
+ { detail::report_error( execution_exception::cpp_exception_error, \
+ current_exception_cast<boost::exception const>(), \
+ #ex_name ": %s", ex.what() ); } \
+/**/
+#else
+#define CATCH_AND_REPORT_STD_EXCEPTION( ex_name ) \
+ catch( ex_name const& ex ) \
+ { detail::report_error( execution_exception::cpp_exception_error, \
+ current_exception_cast<boost::exception const>(), \
+ "%s: %s", detail::typeid_name(ex).c_str(), ex.what() ); } \
+/**/
+#endif
+
+ CATCH_AND_REPORT_STD_EXCEPTION( std::bad_alloc )
+
+#if BOOST_WORKAROUND(__BORLANDC__, <= 0x0551)
+ CATCH_AND_REPORT_STD_EXCEPTION( std::bad_cast )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::bad_typeid )
+#else
+ CATCH_AND_REPORT_STD_EXCEPTION( std::bad_cast )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::bad_typeid )
+#endif
+
+ CATCH_AND_REPORT_STD_EXCEPTION( std::bad_exception )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::domain_error )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::invalid_argument )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::length_error )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::out_of_range )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::range_error )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::overflow_error )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::underflow_error )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::logic_error )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::runtime_error )
+ CATCH_AND_REPORT_STD_EXCEPTION( std::exception )
+#undef CATCH_AND_REPORT_STD_EXCEPTION
+
+ // system errors
+ catch( system_error const& ex )
+ { detail::report_error( execution_exception::cpp_exception_error,
+ "system_error produced by: %s: %s", ex.p_failed_exp, std::strerror( ex.p_errno ) ); }
+ catch( detail::system_signal_exception const& ex )
+ { ex.report(); }
+
+ // not an error
+ catch( execution_aborted const& )
+ { return 0; }
+
+ // just forward
+ catch( execution_exception const& )
+ { throw; }
+
+ // unknown error
+ catch( ... )
+ { detail::report_error( execution_exception::cpp_exception_error, "unknown type" ); }
+
+#endif // !BOOST_NO_EXCEPTIONS
+
+ return 0; // never reached; supplied to quiet compiler warnings
+} // execute
+
+//____________________________________________________________________________//
+
+namespace detail {
+
+struct forward {
+ explicit forward( boost::function<void ()> const& F ) : m_F( F ) {}
+
+ int operator()() { m_F(); return 0; }
+
+ boost::function<void ()> const& m_F;
+};
+
+} // namespace detail
+void
+execution_monitor::vexecute( boost::function<void ()> const& F )
+{
+ execute( detail::forward( F ) );
+}
+
+// ************************************************************************** //
+// ************** system_error ************** //
+// ************************************************************************** //
+
+system_error::system_error( char const* exp )
+#ifdef UNDER_CE
+: p_errno( GetLastError() )
+#else
+: p_errno( errno )
+#endif
+, p_failed_exp( exp )
+{}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** execution_exception ************** //
+// ************************************************************************** //
+
+execution_exception::execution_exception( error_code ec_, const_string what_msg_, location const& location_ )
+: m_error_code( ec_ )
+, m_what( what_msg_.empty() ? BOOST_TEST_L( "uncaught exception, system error or abort requested" ) : what_msg_ )
+, m_location( location_ )
+{}
+
+//____________________________________________________________________________//
+
+execution_exception::location::location( char const* file_name, size_t line_num, char const* func )
+: m_file_name( file_name ? file_name : "unknown location" )
+, m_line_num( line_num )
+, m_function( func )
+{}
+
+execution_exception::location::location(const_string file_name, size_t line_num, char const* func )
+: m_file_name( file_name )
+, m_line_num( line_num )
+, m_function( func )
+{}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// **************Floating point exception management interface ************** //
+// ************************************************************************** //
+
+namespace fpe {
+
+unsigned
+enable( unsigned mask )
+{
+ boost::ignore_unused(mask);
+#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__)
+ _clearfp();
+
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
+ unsigned old_cw = ::_controlfp( 0, 0 );
+ ::_controlfp( old_cw & ~mask, BOOST_FPE_ALL );
+#else
+ unsigned old_cw;
+ if( ::_controlfp_s( &old_cw, 0, 0 ) != 0 )
+ return BOOST_FPE_INV;
+
+ // Set the control word
+ if( ::_controlfp_s( 0, old_cw & ~mask, BOOST_FPE_ALL ) != 0 )
+ return BOOST_FPE_INV;
+#endif
+ return ~old_cw & BOOST_FPE_ALL;
+
+#elif defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__)
+ // same macro definition as in execution_monitor.hpp
+ if (BOOST_FPE_ALL == BOOST_FPE_OFF)
+ /* Not Implemented */
+ return BOOST_FPE_OFF;
+ feclearexcept(BOOST_FPE_ALL);
+ int res = feenableexcept( mask );
+ return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
+#else
+ /* Not Implemented */
+ return BOOST_FPE_OFF;
+#endif
+}
+
+//____________________________________________________________________________//
+
+unsigned
+disable( unsigned mask )
+{
+ boost::ignore_unused(mask);
+
+#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__)
+ _clearfp();
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
+ unsigned old_cw = ::_controlfp( 0, 0 );
+ ::_controlfp( old_cw | mask, BOOST_FPE_ALL );
+#else
+ unsigned old_cw;
+ if( ::_controlfp_s( &old_cw, 0, 0 ) != 0 )
+ return BOOST_FPE_INV;
+
+ // Set the control word
+ if( ::_controlfp_s( 0, old_cw | mask, BOOST_FPE_ALL ) != 0 )
+ return BOOST_FPE_INV;
+#endif
+ return ~old_cw & BOOST_FPE_ALL;
+
+#elif defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__)
+ if (BOOST_FPE_ALL == BOOST_FPE_OFF)
+ /* Not Implemented */
+ return BOOST_FPE_INV;
+ feclearexcept(BOOST_FPE_ALL);
+ int res = fedisableexcept( mask );
+ return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res;
+#else
+ /* Not Implemented */
+ return BOOST_FPE_INV;
+#endif
+}
+
+//____________________________________________________________________________//
+
+} // namespace fpe
+
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_EXECUTION_MONITOR_IPP_012205GER
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/framework.ipp b/src/third_party/boost-1.69.0/boost/test/impl/framework.ipp
new file mode 100644
index 00000000000..60ba4accfeb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/framework.ipp
@@ -0,0 +1,1725 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : implements framework API - main driver for the test
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FRAMEWORK_IPP_021005GER
+#define BOOST_TEST_FRAMEWORK_IPP_021005GER
+
+// Boost.Test
+#include <boost/test/framework.hpp>
+#include <boost/test/execution_monitor.hpp>
+#include <boost/test/debug.hpp>
+#include <boost/test/unit_test_parameters.hpp>
+
+#include <boost/test/unit_test_log.hpp>
+#include <boost/test/unit_test_log_formatter.hpp>
+#include <boost/test/unit_test_monitor.hpp>
+#include <boost/test/results_collector.hpp>
+#include <boost/test/progress_monitor.hpp>
+#include <boost/test/results_reporter.hpp>
+#include <boost/test/test_framework_init_observer.hpp>
+
+#include <boost/test/tree/observer.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/traverse.hpp>
+#include <boost/test/tree/test_case_counter.hpp>
+
+#if BOOST_TEST_SUPPORT_TOKEN_ITERATOR
+#include <boost/test/utils/iterator/token_iterator.hpp>
+#endif
+
+#include <boost/test/utils/foreach.hpp>
+#include <boost/test/utils/basic_cstring/io.hpp>
+#include <boost/test/utils/basic_cstring/compare.hpp>
+
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/throw_exception.hpp>
+
+// Boost
+#include <boost/timer.hpp>
+#include <boost/bind.hpp>
+
+// STL
+#include <limits>
+#include <map>
+#include <set>
+#include <cstdlib>
+#include <ctime>
+#include <numeric>
+#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
+#include <iterator>
+#endif
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::time; using ::srand; }
+#endif
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace framework {
+
+namespace impl {
+
+// ************************************************************************** //
+// ************** order detection helpers ************** //
+// ************************************************************************** //
+
+struct order_info {
+ order_info() : depth(-1) {}
+
+ int depth;
+ std::vector<test_unit_id> dependant_siblings;
+};
+
+typedef std::set<test_unit_id> tu_id_set;
+typedef std::map<test_unit_id,order_info> order_info_per_tu; // !! ?? unordered map
+
+//____________________________________________________________________________//
+
+static test_unit_id
+get_tu_parent( test_unit_id tu_id )
+{
+ return framework::get( tu_id, TUT_ANY ).p_parent_id;
+}
+
+//____________________________________________________________________________//
+
+static int
+tu_depth( test_unit_id tu_id, test_unit_id master_tu_id, order_info_per_tu& tuoi )
+{
+ if( tu_id == master_tu_id )
+ return 0;
+
+ order_info& info = tuoi[tu_id];
+
+ if( info.depth == -1 )
+ info.depth = tu_depth( get_tu_parent( tu_id ), master_tu_id, tuoi ) + 1;
+
+ return info.depth;
+}
+
+//____________________________________________________________________________//
+
+static void
+collect_dependant_siblings( test_unit_id from, test_unit_id to, test_unit_id master_tu_id, order_info_per_tu& tuoi )
+{
+ int from_depth = tu_depth( from, master_tu_id, tuoi );
+ int to_depth = tu_depth( to, master_tu_id, tuoi );
+
+ while(from_depth > to_depth) {
+ from = get_tu_parent( from );
+ --from_depth;
+ }
+
+ while(from_depth < to_depth) {
+ to = get_tu_parent( to );
+ --to_depth;
+ }
+
+ while(true) {
+ test_unit_id from_parent = get_tu_parent( from );
+ test_unit_id to_parent = get_tu_parent( to );
+ if( from_parent == to_parent )
+ break;
+ from = from_parent;
+ to = to_parent;
+ }
+
+ tuoi[from].dependant_siblings.push_back( to );
+}
+
+//____________________________________________________________________________//
+
+static counter_t
+assign_sibling_rank( test_unit_id tu_id, order_info_per_tu& tuoi )
+{
+ test_unit& tu = framework::get( tu_id, TUT_ANY );
+
+ BOOST_TEST_SETUP_ASSERT( tu.p_sibling_rank != (std::numeric_limits<counter_t>::max)(),
+ "Cyclic dependency detected involving test unit \"" + tu.full_name() + "\"" );
+
+ if( tu.p_sibling_rank != 0 )
+ return tu.p_sibling_rank;
+
+ order_info const& info = tuoi[tu_id];
+
+ // indicate in progress
+ tu.p_sibling_rank.value = (std::numeric_limits<counter_t>::max)();
+
+ counter_t new_rank = 1;
+ BOOST_TEST_FOREACH( test_unit_id, sibling_id, info.dependant_siblings )
+ new_rank = (std::max)(new_rank, assign_sibling_rank( sibling_id, tuoi ) + 1);
+
+ return tu.p_sibling_rank.value = new_rank;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** test_init call wrapper ************** //
+// ************************************************************************** //
+
+static void
+invoke_init_func( init_unit_test_func init_func )
+{
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+ BOOST_TEST_I_ASSRT( (*init_func)(), std::runtime_error( "test module initialization failed" ) );
+#else
+ test_suite* manual_test_units = (*init_func)( framework::master_test_suite().argc, framework::master_test_suite().argv );
+
+ if( manual_test_units )
+ framework::master_test_suite().add( manual_test_units );
+#endif
+}
+
+// ************************************************************************** //
+// ************** name_filter ************** //
+// ************************************************************************** //
+
+class name_filter : public test_tree_visitor {
+ struct component {
+ component( const_string name ) // has to be implicit
+ {
+ if( name == "*" )
+ m_kind = SFK_ALL;
+ else if( first_char( name ) == '*' && last_char( name ) == '*' ) {
+ m_kind = SFK_SUBSTR;
+ m_name = name.substr( 1, name.size()-1 );
+ }
+ else if( first_char( name ) == '*' ) {
+ m_kind = SFK_TRAILING;
+ m_name = name.substr( 1 );
+ }
+ else if( last_char( name ) == '*' ) {
+ m_kind = SFK_LEADING;
+ m_name = name.substr( 0, name.size()-1 );
+ }
+ else {
+ m_kind = SFK_MATCH;
+ m_name = name;
+ }
+ }
+
+ bool pass( test_unit const& tu ) const
+ {
+ const_string name( tu.p_name );
+
+ switch( m_kind ) {
+ default:
+ case SFK_ALL:
+ return true;
+ case SFK_LEADING:
+ return name.substr( 0, m_name.size() ) == m_name;
+ case SFK_TRAILING:
+ return name.size() >= m_name.size() && name.substr( name.size() - m_name.size() ) == m_name;
+ case SFK_SUBSTR:
+ return name.find( m_name ) != const_string::npos;
+ case SFK_MATCH:
+ return m_name == tu.p_name.get();
+ }
+ }
+ enum kind { SFK_ALL, SFK_LEADING, SFK_TRAILING, SFK_SUBSTR, SFK_MATCH };
+
+ kind m_kind;
+ const_string m_name;
+ };
+
+public:
+ // Constructor
+ name_filter( test_unit_id_list& targ_list, const_string filter_expr ) : m_targ_list( targ_list ), m_depth( 0 )
+ {
+#ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
+ utils::string_token_iterator tit( filter_expr, (utils::dropped_delimeters = "/",
+ utils::kept_delimeters = utils::dt_none) );
+
+ while( tit != utils::string_token_iterator() ) {
+ m_components.push_back(
+ std::vector<component>( utils::string_token_iterator( *tit, (utils::dropped_delimeters = ",",
+ utils::kept_delimeters = utils::dt_none) ),
+ utils::string_token_iterator() ) );
+
+ ++tit;
+ }
+#endif
+ }
+
+private:
+ bool filter_unit( test_unit const& tu )
+ {
+ // skip master test suite
+ if( m_depth == 0 )
+ return true;
+
+ // corresponding name filters are at level m_depth-1
+ std::vector<component> const& filters = m_components[m_depth-1];
+
+ // look for match
+ using namespace boost::placeholders;
+ return std::find_if( filters.begin(), filters.end(), bind( &component::pass, _1, boost::ref(tu) ) ) != filters.end();
+ }
+
+ // test_tree_visitor interface
+ virtual void visit( test_case const& tc )
+ {
+ // make sure we only accept test cases if we match last component of the filter
+ if( m_depth == m_components.size() && filter_unit( tc ) )
+ m_targ_list.push_back( tc.p_id ); // found a test case
+ }
+ virtual bool test_suite_start( test_suite const& ts )
+ {
+ if( !filter_unit( ts ) )
+ return false;
+
+ if( m_depth < m_components.size() ) {
+ ++m_depth;
+ return true;
+ }
+
+ m_targ_list.push_back( ts.p_id ); // found a test suite
+
+ return false;
+ }
+ virtual void test_suite_finish( test_suite const& /*ts*/ )
+ {
+ --m_depth;
+ }
+
+ // Data members
+ typedef std::vector<std::vector<component> > components_per_level;
+
+ components_per_level m_components;
+ test_unit_id_list& m_targ_list;
+ unsigned m_depth;
+};
+
+// ************************************************************************** //
+// ************** label_filter ************** //
+// ************************************************************************** //
+
+class label_filter : public test_tree_visitor {
+public:
+ label_filter( test_unit_id_list& targ_list, const_string label )
+ : m_targ_list( targ_list )
+ , m_label( label )
+ {}
+
+private:
+ // test_tree_visitor interface
+ virtual bool visit( test_unit const& tu )
+ {
+ if( tu.has_label( m_label ) ) {
+ // found a test unit; add it to list of tu to enable with children and stop recursion in case of suites
+ m_targ_list.push_back( tu.p_id );
+ return false;
+ }
+
+ return true;
+ }
+
+ // Data members
+ test_unit_id_list& m_targ_list;
+ const_string m_label;
+};
+
+// ************************************************************************** //
+// ************** set_run_status ************** //
+// ************************************************************************** //
+
+class set_run_status : public test_tree_visitor {
+public:
+ explicit set_run_status( test_unit::run_status rs, test_unit_id_list* dep_collector = 0 )
+ : m_new_status( rs )
+ , m_dep_collector( dep_collector )
+ {}
+
+ // test_tree_visitor interface
+ virtual bool visit( test_unit const& tu )
+ {
+ const_cast<test_unit&>(tu).p_run_status.value = m_new_status == test_unit::RS_INVALID ? tu.p_default_status : m_new_status;
+ if( m_dep_collector ) {
+ BOOST_TEST_FOREACH( test_unit_id, dep_id, tu.p_dependencies.get() ) {
+ test_unit const& dep = framework::get( dep_id, TUT_ANY );
+
+ if( dep.p_run_status == tu.p_run_status )
+ continue;
+
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Including test " << dep.p_type_name << ' ' << dep.full_name() <<
+ " as a dependency of test " << tu.p_type_name << ' ' << tu.full_name() );
+
+ m_dep_collector->push_back( dep_id );
+ }
+ }
+ return true;
+ }
+
+private:
+ // Data members
+ test_unit::run_status m_new_status;
+ test_unit_id_list* m_dep_collector;
+};
+
+// ************************************************************************** //
+// ************** parse_filters ************** //
+// ************************************************************************** //
+
+static void
+add_filtered_test_units( test_unit_id master_tu_id, const_string filter, test_unit_id_list& targ )
+{
+ // Choose between two kinds of filters
+ if( filter[0] == '@' ) {
+ filter.trim_left( 1 );
+ label_filter lf( targ, filter );
+ traverse_test_tree( master_tu_id, lf, true );
+ }
+ else {
+ name_filter nf( targ, filter );
+ traverse_test_tree( master_tu_id, nf, true );
+ }
+}
+
+//____________________________________________________________________________//
+
+static bool
+parse_filters( test_unit_id master_tu_id, test_unit_id_list& tu_to_enable, test_unit_id_list& tu_to_disable )
+{
+ // 10. collect tu to enable and disable based on filters
+ bool had_selector_filter = false;
+
+ std::vector<std::string> const& filters = runtime_config::get<std::vector<std::string> >( runtime_config::btrt_run_filters );
+
+ BOOST_TEST_FOREACH( const_string, filter, filters ) {
+ BOOST_TEST_SETUP_ASSERT( !filter.is_empty(), "Invalid filter specification" );
+
+ // each --run_test command may also be separated by a ':' (environment variable)
+ utils::string_token_iterator t_filter_it( filter, (utils::dropped_delimeters = ":",
+ utils::kept_delimeters = utils::dt_none) );
+
+ while( t_filter_it != utils::string_token_iterator() ) {
+ const_string filter_token = *t_filter_it;
+
+ enum { SELECTOR, ENABLER, DISABLER } filter_type = SELECTOR;
+
+ // 11. Deduce filter type
+ if( filter_token[0] == '!' || filter_token[0] == '+' ) {
+ filter_type = filter_token[0] == '+' ? ENABLER : DISABLER;
+ filter_token.trim_left( 1 );
+ BOOST_TEST_SETUP_ASSERT( !filter_token.is_empty(), "Invalid filter specification" );
+ }
+
+ had_selector_filter |= filter_type == SELECTOR;
+
+ // 12. Add test units to corresponding list
+ switch( filter_type ) {
+ case SELECTOR:
+ case ENABLER: add_filtered_test_units( master_tu_id, filter_token, tu_to_enable ); break;
+ case DISABLER: add_filtered_test_units( master_tu_id, filter_token, tu_to_disable ); break;
+ }
+
+ ++t_filter_it;
+ }
+ }
+
+ return had_selector_filter;
+}
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
+
+// a poor man's implementation of random_shuffle
+template< class RandomIt, class RandomFunc >
+void random_shuffle( RandomIt first, RandomIt last, RandomFunc &r )
+{
+ typedef typename std::iterator_traits<RandomIt>::difference_type difference_type;
+ difference_type n = last - first;
+ for (difference_type i = n-1; i > 0; --i) {
+ difference_type j = r(i+1);
+ if (j != i) {
+ using std::swap;
+ swap(first[i], first[j]);
+ }
+ }
+}
+
+#endif
+
+
+// A simple handle for registering the global fixtures to the master test suite
+// without deleting an existing static object (the global fixture itself) when the program
+// terminates (shared_ptr).
+class global_fixture_handle : public test_unit_fixture {
+public:
+ global_fixture_handle(test_unit_fixture* fixture) : m_global_fixture(fixture) {}
+ ~global_fixture_handle() {}
+
+ virtual void setup() {
+ m_global_fixture->setup();
+ }
+ virtual void teardown() {
+ m_global_fixture->teardown();
+ }
+
+private:
+ test_unit_fixture* m_global_fixture;
+};
+
+
+} // namespace impl
+
+// ************************************************************************** //
+// ************** framework::state ************** //
+// ************************************************************************** //
+
+unsigned const TIMEOUT_EXCEEDED = static_cast<unsigned>( -1 );
+
+class state {
+public:
+ state()
+ : m_master_test_suite( 0 )
+ , m_curr_test_unit( INV_TEST_UNIT_ID )
+ , m_next_test_case_id( MIN_TEST_CASE_ID )
+ , m_next_test_suite_id( MIN_TEST_SUITE_ID )
+ , m_test_in_progress( false )
+ , m_context_idx( 0 )
+ , m_log_sinks( )
+ , m_report_sink( std::cerr )
+ {
+ }
+
+ ~state() { clear(); }
+
+ void clear()
+ {
+ while( !m_test_units.empty() ) {
+ test_unit_store::value_type const& tu = *m_test_units.begin();
+ test_unit const* tu_ptr = tu.second;
+
+ // the delete will erase this element from map
+ if( ut_detail::test_id_2_unit_type( tu.second->p_id ) == TUT_SUITE )
+ delete static_cast<test_suite const*>(tu_ptr);
+ else
+ delete static_cast<test_case const*>(tu_ptr);
+ }
+ }
+
+ void set_tu_id( test_unit& tu, test_unit_id id ) { tu.p_id.value = id; }
+
+ //////////////////////////////////////////////////////////////////
+
+ // Validates the dependency graph and deduces the sibling dependency rank for each child
+ void deduce_siblings_order( test_unit_id tu_id, test_unit_id master_tu_id, impl::order_info_per_tu& tuoi )
+ {
+ test_unit& tu = framework::get( tu_id, TUT_ANY );
+
+ // collect all sibling dependancy from tu own list
+ BOOST_TEST_FOREACH( test_unit_id, dep_id, tu.p_dependencies.get() )
+ collect_dependant_siblings( tu_id, dep_id, master_tu_id, tuoi );
+
+ if( tu.p_type != TUT_SUITE )
+ return;
+
+ test_suite& ts = static_cast<test_suite&>(tu);
+
+ // recursive call to children first
+ BOOST_TEST_FOREACH( test_unit_id, chld_id, ts.m_children )
+ deduce_siblings_order( chld_id, master_tu_id, tuoi );
+
+ ts.m_ranked_children.clear();
+ BOOST_TEST_FOREACH( test_unit_id, chld_id, ts.m_children ) {
+ counter_t rank = assign_sibling_rank( chld_id, tuoi );
+ ts.m_ranked_children.insert( std::make_pair( rank, chld_id ) );
+ }
+ }
+
+ //////////////////////////////////////////////////////////////////
+
+ // Finalize default run status:
+ // 1) inherit run status from parent where applicable
+ // 2) if any of test units in test suite enabled enable it as well
+ bool finalize_default_run_status( test_unit_id tu_id, test_unit::run_status parent_status )
+ {
+ test_unit& tu = framework::get( tu_id, TUT_ANY );
+
+ if( tu.p_default_status == test_suite::RS_INHERIT )
+ tu.p_default_status.value = parent_status;
+
+ // go through list of children
+ if( tu.p_type == TUT_SUITE ) {
+ bool has_enabled_child = false;
+ BOOST_TEST_FOREACH( test_unit_id, chld_id, static_cast<test_suite const&>(tu).m_children )
+ has_enabled_child |= finalize_default_run_status( chld_id, tu.p_default_status );
+
+ tu.p_default_status.value = has_enabled_child ? test_suite::RS_ENABLED : test_suite::RS_DISABLED;
+ }
+
+ return tu.p_default_status == test_suite::RS_ENABLED;
+ }
+
+ //////////////////////////////////////////////////////////////////
+
+ bool finalize_run_status( test_unit_id tu_id )
+ {
+ test_unit& tu = framework::get( tu_id, TUT_ANY );
+
+ // go through list of children
+ if( tu.p_type == TUT_SUITE ) {
+ bool has_enabled_child = false;
+ BOOST_TEST_FOREACH( test_unit_id, chld_id, static_cast<test_suite const&>(tu).m_children)
+ has_enabled_child |= finalize_run_status( chld_id );
+
+ tu.p_run_status.value = has_enabled_child ? test_suite::RS_ENABLED : test_suite::RS_DISABLED;
+ }
+
+ return tu.is_enabled();
+ }
+
+ //////////////////////////////////////////////////////////////////
+
+ void deduce_run_status( test_unit_id master_tu_id )
+ {
+ using namespace framework::impl;
+ test_unit_id_list tu_to_enable;
+ test_unit_id_list tu_to_disable;
+
+ // 10. If there are any filters supplied, figure out lists of test units to enable/disable
+ bool had_selector_filter = !runtime_config::get<std::vector<std::string> >( runtime_config::btrt_run_filters ).empty() &&
+ parse_filters( master_tu_id, tu_to_enable, tu_to_disable );
+
+ // 20. Set the stage: either use default run status or disable all test units
+ set_run_status initial_setter( had_selector_filter ? test_unit::RS_DISABLED : test_unit::RS_INVALID );
+ traverse_test_tree( master_tu_id, initial_setter, true );
+
+ // 30. Apply all selectors and enablers.
+ while( !tu_to_enable.empty() ) {
+ test_unit& tu = framework::get( tu_to_enable.back(), TUT_ANY );
+
+ tu_to_enable.pop_back();
+
+ // 35. Ignore test units which are already enabled
+ if( tu.is_enabled() )
+ continue;
+
+ // set new status and add all dependencies into tu_to_enable
+ set_run_status enabler( test_unit::RS_ENABLED, &tu_to_enable );
+ traverse_test_tree( tu.p_id, enabler, true );
+
+ // Add the dependencies of the parent suites, see trac #13149
+ test_unit_id parent_id = tu.p_parent_id;
+ while( parent_id != INV_TEST_UNIT_ID
+ && parent_id != master_tu_id )
+ {
+ // we do not use the traverse_test_tree as otherwise it would enable the sibblings and subtree
+ // of the test case we want to enable (we need to enable the parent suites and their dependencies only)
+ // the parent_id needs to be enabled in order to be properly parsed by finalize_run_status, the visit
+ // does the job
+ test_unit& tu_parent = framework::get( parent_id, TUT_ANY );
+ enabler.visit( tu_parent );
+ parent_id = tu_parent.p_parent_id;
+ }
+ }
+
+ // 40. Apply all disablers
+ while( !tu_to_disable.empty() ) {
+ test_unit const& tu = framework::get( tu_to_disable.back(), TUT_ANY );
+
+ tu_to_disable.pop_back();
+
+ // 35. Ignore test units which already disabled
+ if( !tu.is_enabled() )
+ continue;
+
+ set_run_status disabler( test_unit::RS_DISABLED );
+ traverse_test_tree( tu.p_id, disabler, true );
+ }
+
+ // 50. Make sure parents of enabled test units are also enabled
+ finalize_run_status( master_tu_id );
+ }
+
+ //////////////////////////////////////////////////////////////////
+
+ typedef unit_test_monitor_t::error_level execution_result;
+
+ // Random generator using the std::rand function (seeded prior to the call)
+ struct random_generator_helper {
+ size_t operator()(size_t i) const {
+ return std::rand() % i;
+ }
+ };
+
+ // Executes the test tree with the root at specified test unit
+ execution_result execute_test_tree( test_unit_id tu_id,
+ unsigned timeout = 0,
+ random_generator_helper const * const p_random_generator = 0)
+ {
+ test_unit const& tu = framework::get( tu_id, TUT_ANY );
+
+ execution_result result = unit_test_monitor_t::test_ok;
+
+ if( !tu.is_enabled() )
+ return result;
+
+ // 10. Check preconditions, including zero time left for execution and
+ // successful execution of all dependencies
+ if( timeout == TIMEOUT_EXCEEDED ) {
+ // notify all observers about skipped test unit
+ BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ to->test_unit_skipped( tu, "timeout for the test unit is exceeded" );
+
+ return unit_test_monitor_t::os_timeout;
+ }
+ else if( timeout == 0 || timeout > tu.p_timeout ) // deduce timeout for this test unit
+ timeout = tu.p_timeout;
+
+ test_tools::assertion_result const precondition_res = tu.check_preconditions();
+ if( !precondition_res ) {
+ // notify all observers about skipped test unit
+ BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ to->test_unit_skipped( tu, precondition_res.message() );
+
+ // It is not an error to skip the test if any of the parent tests
+ // have failed. This one should be reported as skipped as if it was
+ // disabled
+ return unit_test_monitor_t::test_ok;
+ }
+
+ // 20. Notify all observers about the start of the test unit
+ BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ to->test_unit_start( tu );
+
+ // 30. Execute setup fixtures if any; any failure here leads to test unit abortion
+ BOOST_TEST_FOREACH( test_unit_fixture_ptr, F, tu.p_fixtures.get() ) {
+ ut_detail::test_unit_id_restore restore_current_test_unit(m_curr_test_unit, tu.p_id);
+ result = unit_test_monitor.execute_and_translate( boost::bind( &test_unit_fixture::setup, F ) );
+ if( result != unit_test_monitor_t::test_ok )
+ break;
+ test_results const& test_rslt = unit_test::results_collector.results( m_curr_test_unit );
+ if( test_rslt.aborted() ) {
+ result = unit_test_monitor_t::test_setup_failure;
+ break;
+ }
+ }
+
+ // This is the time we are going to spend executing the test unit
+ unsigned long elapsed = 0;
+
+ if( result == unit_test_monitor_t::test_ok ) {
+ // 40. We are going to time the execution
+ boost::timer tu_timer;
+
+ // we pass the random generator
+ const random_generator_helper& rand_gen = p_random_generator ? *p_random_generator : random_generator_helper();
+
+ if( tu.p_type == TUT_SUITE ) {
+ test_suite const& ts = static_cast<test_suite const&>( tu );
+
+ if( runtime_config::get<unsigned>( runtime_config::btrt_random_seed ) == 0 ) {
+ typedef std::pair<counter_t,test_unit_id> value_type;
+
+ BOOST_TEST_FOREACH( value_type, chld, ts.m_ranked_children ) {
+ unsigned chld_timeout = child_timeout( timeout, tu_timer.elapsed() );
+
+ result = (std::min)( result, execute_test_tree( chld.second, chld_timeout, &rand_gen ) );
+
+ if( unit_test_monitor.is_critical_error( result ) )
+ break;
+ }
+ }
+ else {
+ // Go through ranges of children with the same dependency rank and shuffle them
+ // independently. Execute each subtree in this order
+ test_unit_id_list children_with_the_same_rank;
+
+ typedef test_suite::children_per_rank::const_iterator it_type;
+ it_type it = ts.m_ranked_children.begin();
+ while( it != ts.m_ranked_children.end() ) {
+ children_with_the_same_rank.clear();
+
+ std::pair<it_type,it_type> range = ts.m_ranked_children.equal_range( it->first );
+ it = range.first;
+ while( it != range.second ) {
+ children_with_the_same_rank.push_back( it->second );
+ it++;
+ }
+
+#ifdef BOOST_NO_CXX98_RANDOM_SHUFFLE
+ impl::random_shuffle( children_with_the_same_rank.begin(), children_with_the_same_rank.end(), rand_gen );
+#else
+ std::random_shuffle( children_with_the_same_rank.begin(), children_with_the_same_rank.end(), rand_gen );
+#endif
+
+ BOOST_TEST_FOREACH( test_unit_id, chld, children_with_the_same_rank ) {
+ unsigned chld_timeout = child_timeout( timeout, tu_timer.elapsed() );
+
+ result = (std::min)( result, execute_test_tree( chld, chld_timeout, &rand_gen ) );
+
+ if( unit_test_monitor.is_critical_error( result ) )
+ break;
+ }
+ }
+ }
+
+ elapsed = static_cast<unsigned long>( tu_timer.elapsed() * 1e6 );
+ }
+ else { // TUT_CASE
+ test_case const& tc = static_cast<test_case const&>( tu );
+
+ // setup contexts
+ m_context_idx = 0;
+
+ // setup current test case
+ ut_detail::test_unit_id_restore restore_current_test_unit(m_curr_test_unit, tc.p_id);
+
+ // execute the test case body
+ result = unit_test_monitor.execute_and_translate( tc.p_test_func, timeout );
+ elapsed = static_cast<unsigned long>( tu_timer.elapsed() * 1e6 );
+
+ // cleanup leftover context
+ m_context.clear();
+
+ // restore state (scope exit) and abort if necessary
+ }
+ }
+
+ // if run error is critical skip teardown, who knows what the state of the program at this point
+ if( !unit_test_monitor.is_critical_error( result ) ) {
+ // execute teardown fixtures if any in reverse order
+ BOOST_TEST_REVERSE_FOREACH( test_unit_fixture_ptr, F, tu.p_fixtures.get() ) {
+ ut_detail::test_unit_id_restore restore_current_test_unit(m_curr_test_unit, tu.p_id);
+ result = (std::min)( result, unit_test_monitor.execute_and_translate( boost::bind( &test_unit_fixture::teardown, F ), 0 ) );
+
+ if( unit_test_monitor.is_critical_error( result ) )
+ break;
+ }
+ }
+
+ // notify all observers about abortion
+ if( unit_test_monitor.is_critical_error( result ) ) {
+ BOOST_TEST_FOREACH( test_observer*, to, m_observers )
+ to->test_aborted();
+ }
+
+ // notify all observers about completion
+ BOOST_TEST_REVERSE_FOREACH( test_observer*, to, m_observers )
+ to->test_unit_finish( tu, elapsed );
+
+ return result;
+ }
+
+ //////////////////////////////////////////////////////////////////
+
+ unsigned child_timeout( unsigned tu_timeout, double elapsed )
+ {
+ if( tu_timeout == 0U )
+ return 0U;
+
+ unsigned elpsed_sec = static_cast<unsigned>(elapsed); // rounding to number of whole seconds
+
+ return tu_timeout > elpsed_sec ? tu_timeout - elpsed_sec : TIMEOUT_EXCEEDED;
+ }
+
+ struct priority_order {
+ bool operator()( test_observer* lhs, test_observer* rhs ) const
+ {
+ return (lhs->priority() < rhs->priority()) || ((lhs->priority() == rhs->priority()) && (lhs < rhs));
+ }
+ };
+
+ // Data members
+ typedef std::map<test_unit_id,test_unit*> test_unit_store;
+ typedef std::set<test_observer*,priority_order> observer_store;
+ struct context_frame {
+ context_frame( std::string const& d, int id, bool sticky )
+ : descr( d )
+ , frame_id( id )
+ , is_sticky( sticky )
+ {}
+
+ std::string descr;
+ int frame_id;
+ bool is_sticky;
+ };
+ typedef std::vector<context_frame> context_data;
+
+ master_test_suite_t* m_master_test_suite;
+ std::vector<test_suite*> m_auto_test_suites;
+
+ test_unit_id m_curr_test_unit;
+ test_unit_store m_test_units;
+
+ test_unit_id m_next_test_case_id;
+ test_unit_id m_next_test_suite_id;
+
+ bool m_test_in_progress;
+
+ observer_store m_observers;
+ context_data m_context;
+ int m_context_idx;
+
+ std::set<test_unit_fixture*> m_global_fixtures;
+
+ boost::execution_monitor m_aux_em;
+
+ std::map<output_format, runtime_config::stream_holder> m_log_sinks;
+ runtime_config::stream_holder m_report_sink;
+};
+
+//____________________________________________________________________________//
+
+namespace impl {
+namespace {
+
+#if defined(__CYGWIN__)
+framework::state& s_frk_state() { static framework::state* the_inst = 0; if(!the_inst) the_inst = new framework::state; return *the_inst; }
+#else
+framework::state& s_frk_state() { static framework::state the_inst; return the_inst; }
+#endif
+
+} // local namespace
+
+void
+setup_for_execution( test_unit const& tu )
+{
+ s_frk_state().deduce_run_status( tu.p_id );
+}
+
+struct sum_to_first_only {
+ sum_to_first_only() : is_first(true) {}
+ template <class T, class U>
+ T operator()(T const& l_, U const& r_) {
+ if(is_first) {
+ is_first = false;
+ return l_ + r_.first;
+ }
+ return l_ + ", " + r_.first;
+ }
+
+ bool is_first;
+};
+
+void
+shutdown_loggers_and_reports()
+{
+ s_frk_state().m_log_sinks.clear();
+ s_frk_state().m_report_sink.setup( "stderr" );
+}
+
+void
+setup_loggers()
+{
+
+ BOOST_TEST_I_TRY {
+
+#ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
+ bool has_combined_logger = runtime_config::has( runtime_config::btrt_combined_logger )
+ && !runtime_config::get< std::vector<std::string> >( runtime_config::btrt_combined_logger ).empty();
+#else
+ bool has_combined_logger = false;
+#endif
+
+ if( !has_combined_logger ) {
+ unit_test_log.set_threshold_level( runtime_config::get<log_level>( runtime_config::btrt_log_level ) );
+ const output_format format = runtime_config::get<output_format>( runtime_config::btrt_log_format );
+ unit_test_log.set_format( format );
+
+ runtime_config::stream_holder& stream_logger = s_frk_state().m_log_sinks[format];
+ if( runtime_config::has( runtime_config::btrt_log_sink ) ) {
+ // we remove all streams in this case, so we do not specify the format
+ boost::function< void () > log_cleaner = boost::bind( &unit_test_log_t::set_stream,
+ &unit_test_log,
+ boost::ref(std::cout)
+ );
+ stream_logger.setup( runtime_config::get<std::string>( runtime_config::btrt_log_sink ),
+ log_cleaner );
+ }
+ unit_test_log.set_stream( stream_logger.ref() );
+ }
+ else
+ {
+
+ const std::vector<std::string>& v_output_format = runtime_config::get< std::vector<std::string> >( runtime_config::btrt_combined_logger ) ;
+
+ static const std::pair<const char*, log_level> all_log_levels[] = {
+ std::make_pair( "all" , log_successful_tests ),
+ std::make_pair( "success" , log_successful_tests ),
+ std::make_pair( "test_suite" , log_test_units ),
+ std::make_pair( "unit_scope" , log_test_units ),
+ std::make_pair( "message" , log_messages ),
+ std::make_pair( "warning" , log_warnings ),
+ std::make_pair( "error" , log_all_errors ),
+ std::make_pair( "cpp_exception" , log_cpp_exception_errors ),
+ std::make_pair( "system_error" , log_system_errors ),
+ std::make_pair( "fatal_error" , log_fatal_errors ),
+ std::make_pair( "nothing" , log_nothing )
+ };
+
+ static const std::pair<const char*, output_format> all_formats[] = {
+ std::make_pair( "HRF" , OF_CLF ),
+ std::make_pair( "CLF" , OF_CLF ),
+ std::make_pair( "XML" , OF_XML ),
+ std::make_pair( "JUNIT", OF_JUNIT )
+ };
+
+
+ bool is_first = true;
+
+ BOOST_TEST_FOREACH( const_string, current_multi_config, v_output_format ) {
+
+ #ifdef BOOST_TEST_SUPPORT_TOKEN_ITERATOR
+
+ // ':' may be used for file names: C:/tmp/mylogsink.xml
+ // we merge the tokens that start with / or \ with the previous one.
+ std::vector<std::string> v_processed_tokens;
+
+ {
+ utils::string_token_iterator current_config( current_multi_config, (utils::dropped_delimeters = ":",
+ utils::kept_delimeters = utils::dt_none) );
+
+ for( ; current_config != utils::string_token_iterator() ; ++current_config) {
+ std::string str_copy(current_config->begin(), current_config->end());
+ if( ( str_copy[0] == '\\' || str_copy[0] == '/' )
+ && v_processed_tokens.size() > 0) {
+ v_processed_tokens.back() += ":" + str_copy; // ':' has been eaten up
+ }
+ else {
+ v_processed_tokens.push_back(str_copy);
+ }
+ }
+ }
+
+ BOOST_TEST_FOREACH( std::string const&, current_config, v_processed_tokens ) {
+
+ utils::string_token_iterator current_format_specs( current_config, (utils::keep_empty_tokens,
+ utils::dropped_delimeters = ",",
+ utils::kept_delimeters = utils::dt_none) );
+
+ output_format format = OF_INVALID ; // default
+ if( current_format_specs != utils::string_token_iterator() &&
+ current_format_specs->size() ) {
+
+ for(size_t elem=0; elem < sizeof(all_formats)/sizeof(all_formats[0]); elem++) {
+ if(const_string(all_formats[elem].first) == *current_format_specs) {
+ format = all_formats[elem].second;
+ break;
+ }
+ }
+ }
+
+ BOOST_TEST_I_ASSRT( format != OF_INVALID,
+ boost::runtime::access_to_missing_argument()
+ << "Unable to determine the logger type from '"
+ << current_config
+ << "'. Possible choices are: "
+ << std::accumulate(all_formats,
+ all_formats + sizeof(all_formats)/sizeof(all_formats[0]),
+ std::string(""),
+ sum_to_first_only())
+ );
+
+ // activates this format
+ if( is_first ) {
+ unit_test_log.set_format( format );
+ }
+ else {
+ unit_test_log.add_format( format );
+ }
+ is_first = false;
+
+ unit_test_log_formatter * const formatter = unit_test_log.get_formatter(format);
+ BOOST_TEST_SETUP_ASSERT( formatter, "Logger setup error" );
+
+ log_level formatter_log_level = invalid_log_level;
+ ++current_format_specs ;
+ if( !current_format_specs->size() ) {
+ formatter_log_level = formatter->get_log_level(); // default log level given by the formatter
+ }
+ else if( current_format_specs != utils::string_token_iterator() ) {
+
+ for(size_t elem=0; elem < sizeof(all_log_levels)/sizeof(all_log_levels[0]); elem++) {
+ if(const_string(all_log_levels[elem].first) == *current_format_specs) {
+ formatter_log_level = all_log_levels[elem].second;
+ break;
+ }
+ }
+ }
+
+ BOOST_TEST_I_ASSRT( formatter_log_level != invalid_log_level,
+ boost::runtime::access_to_missing_argument()
+ << "Unable to determine the log level from '"
+ << current_config
+ << "'. Possible choices are: "
+ << std::accumulate(all_log_levels,
+ all_log_levels + sizeof(all_log_levels)/sizeof(all_log_levels[0]),
+ std::string(""),
+ sum_to_first_only())
+ );
+
+ unit_test_log.set_threshold_level( format, formatter_log_level );
+
+ runtime_config::stream_holder& stream_logger = s_frk_state().m_log_sinks[format];
+ boost::function< void () > log_cleaner = boost::bind( &unit_test_log_t::set_stream,
+ &unit_test_log,
+ format,
+ boost::ref(std::cout) );
+ if( ++current_format_specs != utils::string_token_iterator() &&
+ current_format_specs->size() ) {
+ stream_logger.setup( *current_format_specs,
+ log_cleaner );
+ }
+ else {
+ stream_logger.setup( formatter->get_default_stream_description(),
+ log_cleaner );
+ }
+ unit_test_log.set_stream( format, stream_logger.ref() );
+ }
+ #endif
+ } // for each logger
+
+ } // if/else new logger API
+ } // BOOST_TEST_I_TRY
+ BOOST_TEST_I_CATCH( boost::runtime::init_error, ex ) {
+ BOOST_TEST_SETUP_ASSERT( false, ex.msg );
+ }
+ BOOST_TEST_I_CATCH( boost::runtime::input_error, ex ) {
+ std::cerr << ex.msg << "\n\n";
+
+ BOOST_TEST_I_THROW( framework::nothing_to_test( boost::exit_exception_failure ) );
+ }
+
+
+}
+
+//____________________________________________________________________________//
+
+} // namespace impl
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** framework::init ************** //
+// ************************************************************************** //
+
+void
+init( init_unit_test_func init_func, int argc, char* argv[] )
+{
+ using namespace impl;
+
+ // 10. Set up runtime parameters
+ runtime_config::init( argc, argv );
+
+ // 20. Set the desired log level, format and sink
+ impl::setup_loggers();
+
+ // 30. Set the desired report level, format and sink
+ results_reporter::set_level( runtime_config::get<report_level>( runtime_config::btrt_report_level ) );
+ results_reporter::set_format( runtime_config::get<output_format>( runtime_config::btrt_report_format ) );
+
+ if( runtime_config::has( runtime_config::btrt_report_sink ) ) {
+ boost::function< void () > report_cleaner = boost::bind( &results_reporter::set_stream,
+ boost::ref(std::cerr)
+ );
+ s_frk_state().m_report_sink.setup( runtime_config::get<std::string>( runtime_config::btrt_report_sink ),
+ report_cleaner );
+ }
+
+ results_reporter::set_stream( s_frk_state().m_report_sink.ref() );
+
+ // 40. Register default test observers
+ register_observer( results_collector );
+ register_observer( unit_test_log );
+ register_observer( framework_init_observer );
+
+ if( runtime_config::get<bool>( runtime_config::btrt_show_progress ) ) {
+ progress_monitor.set_stream( std::cout ); // defaults to stdout
+ register_observer( progress_monitor );
+ }
+
+ // 50. Set up memory leak detection
+ unsigned long detect_mem_leak = runtime_config::get<unsigned long>( runtime_config::btrt_detect_mem_leaks );
+ if( detect_mem_leak > 0 ) {
+ debug::detect_memory_leaks( true, runtime_config::get<std::string>( runtime_config::btrt_report_mem_leaks ) );
+ debug::break_memory_alloc( (long)detect_mem_leak );
+ }
+
+ // 60. Initialize master unit test suite
+ master_test_suite().argc = argc;
+ master_test_suite().argv = argv;
+
+ // 70. Invoke test module initialization routine
+ BOOST_TEST_I_TRY {
+ s_frk_state().m_aux_em.vexecute( boost::bind( &impl::invoke_init_func, init_func ) );
+ }
+ BOOST_TEST_I_CATCH( execution_exception, ex ) {
+ BOOST_TEST_SETUP_ASSERT( false, ex.what() );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+finalize_setup_phase( test_unit_id master_tu_id )
+{
+ if( master_tu_id == INV_TEST_UNIT_ID )
+ master_tu_id = master_test_suite().p_id;
+
+ // 10. Apply all decorators to the auto test units
+ // 10. checks for consistency (duplicate names, etc)
+ class apply_decorators : public test_tree_visitor {
+ private:
+ // test_tree_visitor interface
+
+ virtual bool test_suite_start( test_suite const& ts)
+ {
+ const_cast<test_suite&>(ts).generate();
+ const_cast<test_suite&>(ts).check_for_duplicate_test_cases();
+ return test_tree_visitor::test_suite_start(ts);
+ }
+
+ virtual bool visit( test_unit const& tu )
+ {
+ BOOST_TEST_FOREACH( decorator::base_ptr, d, tu.p_decorators.get() )
+ d->apply( const_cast<test_unit&>(tu) );
+
+ return true;
+ }
+ } ad;
+ traverse_test_tree( master_tu_id, ad, true );
+
+ // 20. Finalize setup phase
+ impl::order_info_per_tu tuoi;
+ impl::s_frk_state().deduce_siblings_order( master_tu_id, master_tu_id, tuoi );
+ impl::s_frk_state().finalize_default_run_status( master_tu_id, test_unit::RS_INVALID );
+}
+
+// ************************************************************************** //
+// ************** test_in_progress ************** //
+// ************************************************************************** //
+
+bool
+test_in_progress()
+{
+ return impl::s_frk_state().m_test_in_progress;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** framework::shutdown ************** //
+// ************************************************************************** //
+
+void
+shutdown()
+{
+ impl::shutdown_loggers_and_reports();
+ // eliminating some fake memory leak reports. See for more details:
+ // http://connect.microsoft.com/VisualStudio/feedback/details/106937/memory-leaks-reported-by-debug-crt-inside-typeinfo-name
+
+# if BOOST_WORKAROUND(BOOST_MSVC, <= 1600 ) && !defined(_DLL) && defined(_DEBUG)
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1600 )
+#define _Next next
+#define _MemPtr memPtr
+#endif
+ __type_info_node* pNode = __type_info_root_node._Next;
+ __type_info_node* tmpNode = &__type_info_root_node;
+
+ for( ; pNode!=NULL; pNode = tmpNode ) {
+ tmpNode = pNode->_Next;
+ delete pNode->_MemPtr;
+ delete pNode;
+ }
+# if BOOST_WORKAROUND(BOOST_MSVC, < 1600 )
+#undef _Next
+#undef _MemPtr
+#endif
+# endif
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** register_test_unit ************** //
+// ************************************************************************** //
+
+void
+register_test_unit( test_case* tc )
+{
+ BOOST_TEST_SETUP_ASSERT( tc->p_id == INV_TEST_UNIT_ID, BOOST_TEST_L( "test case already registered" ) );
+
+ test_unit_id new_id = impl::s_frk_state().m_next_test_case_id;
+
+ BOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_CASE_ID, BOOST_TEST_L( "too many test cases" ) );
+
+ typedef state::test_unit_store::value_type map_value_type;
+
+ impl::s_frk_state().m_test_units.insert( map_value_type( new_id, tc ) );
+ impl::s_frk_state().m_next_test_case_id++;
+
+ impl::s_frk_state().set_tu_id( *tc, new_id );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** register_test_unit ************** //
+// ************************************************************************** //
+
+void
+register_test_unit( test_suite* ts )
+{
+ BOOST_TEST_SETUP_ASSERT( ts->p_id == INV_TEST_UNIT_ID, BOOST_TEST_L( "test suite already registered" ) );
+
+ test_unit_id new_id = impl::s_frk_state().m_next_test_suite_id;
+
+ BOOST_TEST_SETUP_ASSERT( new_id != MAX_TEST_SUITE_ID, BOOST_TEST_L( "too many test suites" ) );
+
+ typedef state::test_unit_store::value_type map_value_type;
+
+ impl::s_frk_state().m_test_units.insert( map_value_type( new_id, ts ) );
+ impl::s_frk_state().m_next_test_suite_id++;
+
+ impl::s_frk_state().set_tu_id( *ts, new_id );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** deregister_test_unit ************** //
+// ************************************************************************** //
+
+void
+deregister_test_unit( test_unit* tu )
+{
+ impl::s_frk_state().m_test_units.erase( tu->p_id );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** clear ************** //
+// ************************************************************************** //
+
+void
+clear()
+{
+ impl::s_frk_state().clear();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** register_observer ************** //
+// ************************************************************************** //
+
+void
+register_observer( test_observer& to )
+{
+ impl::s_frk_state().m_observers.insert( &to );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** deregister_observer ************** //
+// ************************************************************************** //
+
+void
+deregister_observer( test_observer& to )
+{
+ impl::s_frk_state().m_observers.erase( &to );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** register_global_fixture ************** //
+// ************************************************************************** //
+
+void
+register_global_fixture( test_unit_fixture& tuf )
+{
+ impl::s_frk_state().m_global_fixtures.insert( &tuf );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** deregister_global_fixture ************** //
+// ************************************************************************** //
+
+void
+deregister_global_fixture( test_unit_fixture &tuf )
+{
+ impl::s_frk_state().m_global_fixtures.erase( &tuf );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** add_context ************** //
+// ************************************************************************** //
+
+int
+add_context( ::boost::unit_test::lazy_ostream const& context_descr, bool sticky )
+{
+ std::stringstream buffer;
+ context_descr( buffer );
+ int res_idx = impl::s_frk_state().m_context_idx++;
+
+ impl::s_frk_state().m_context.push_back( state::context_frame( buffer.str(), res_idx, sticky ) );
+
+ return res_idx;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** clear_context ************** //
+// ************************************************************************** //
+
+struct frame_with_id {
+ explicit frame_with_id( int id ) : m_id( id ) {}
+
+ bool operator()( state::context_frame const& f )
+ {
+ return f.frame_id == m_id;
+ }
+ int m_id;
+};
+
+//____________________________________________________________________________//
+
+void
+clear_context( int frame_id )
+{
+ if( frame_id == -1 ) { // clear all non sticky frames
+ for( int i=static_cast<int>(impl::s_frk_state().m_context.size())-1; i>=0; i-- )
+ if( !impl::s_frk_state().m_context[i].is_sticky )
+ impl::s_frk_state().m_context.erase( impl::s_frk_state().m_context.begin()+i );
+ }
+
+ else { // clear specific frame
+ state::context_data::iterator it =
+ std::find_if( impl::s_frk_state().m_context.begin(), impl::s_frk_state().m_context.end(), frame_with_id( frame_id ) );
+
+ if( it != impl::s_frk_state().m_context.end() ) // really an internal error if this is not true
+ impl::s_frk_state().m_context.erase( it );
+ }
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** get_context ************** //
+// ************************************************************************** //
+
+context_generator
+get_context()
+{
+ return context_generator();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** context_generator ************** //
+// ************************************************************************** //
+
+bool
+context_generator::is_empty() const
+{
+ return impl::s_frk_state().m_context.empty();
+}
+
+//____________________________________________________________________________//
+
+const_string
+context_generator::next() const
+{
+ return m_curr_frame < impl::s_frk_state().m_context.size() ? impl::s_frk_state().m_context[m_curr_frame++].descr : const_string();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** master_test_suite ************** //
+// ************************************************************************** //
+
+master_test_suite_t&
+master_test_suite()
+{
+ if( !impl::s_frk_state().m_master_test_suite )
+ impl::s_frk_state().m_master_test_suite = new master_test_suite_t;
+
+ return *impl::s_frk_state().m_master_test_suite;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** current_auto_test_suite ************** //
+// ************************************************************************** //
+
+test_suite&
+current_auto_test_suite( test_suite* ts, bool push_or_pop )
+{
+ if( impl::s_frk_state().m_auto_test_suites.empty() )
+ impl::s_frk_state().m_auto_test_suites.push_back( &framework::master_test_suite() );
+
+ if( !push_or_pop )
+ impl::s_frk_state().m_auto_test_suites.pop_back();
+ else if( ts )
+ impl::s_frk_state().m_auto_test_suites.push_back( ts );
+
+ return *impl::s_frk_state().m_auto_test_suites.back();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** current_test_case ************** //
+// ************************************************************************** //
+
+test_case const&
+current_test_case()
+{
+ return get<test_case>( impl::s_frk_state().m_curr_test_unit );
+}
+
+
+test_unit const&
+current_test_unit()
+{
+ return *impl::s_frk_state().m_test_units[impl::s_frk_state().m_curr_test_unit];
+}
+
+//____________________________________________________________________________//
+
+test_unit_id
+current_test_case_id()
+{
+ return impl::s_frk_state().m_curr_test_unit;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** framework::get ************** //
+// ************************************************************************** //
+
+test_unit&
+get( test_unit_id id, test_unit_type t )
+{
+ test_unit* res = impl::s_frk_state().m_test_units[id];
+
+ BOOST_TEST_I_ASSRT( (res->p_type & t) != 0, internal_error( "Invalid test unit type" ) );
+
+ return *res;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** framework::run ************** //
+// ************************************************************************** //
+
+template <class Cont>
+struct swap_on_delete {
+ swap_on_delete(Cont& c1, Cont& c2) : m_c1(c1), m_c2(c2){}
+ ~swap_on_delete() {
+ m_c1.swap(m_c2);
+ }
+
+ Cont& m_c1;
+ Cont& m_c2;
+};
+
+void
+run( test_unit_id id, bool continue_test )
+{
+ if( id == INV_TEST_UNIT_ID )
+ id = master_test_suite().p_id;
+
+ // Figure out run status for execution phase
+ impl::s_frk_state().deduce_run_status( id );
+
+ test_case_counter tcc;
+ traverse_test_tree( id, tcc );
+
+ BOOST_TEST_SETUP_ASSERT( tcc.p_count != 0 , runtime_config::get<std::vector<std::string> >( runtime_config::btrt_run_filters ).empty()
+ ? BOOST_TEST_L( "test tree is empty" )
+ : BOOST_TEST_L( "no test cases matching filter or all test cases were disabled" ) );
+
+ bool was_in_progress = framework::test_in_progress();
+ bool call_start_finish = !continue_test || !was_in_progress;
+ bool init_ok = true;
+ const_string setup_error;
+
+ if( call_start_finish ) {
+ // indicates the framework that no test is in progress now if observers need to be notified
+ impl::s_frk_state().m_test_in_progress = false;
+ // unit_test::framework_init_observer will get cleared first
+ BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers ) {
+ BOOST_TEST_I_TRY {
+ ut_detail::test_unit_id_restore restore_current_test_unit(impl::s_frk_state().m_curr_test_unit, id);
+ unit_test_monitor_t::error_level result = unit_test_monitor.execute_and_translate( boost::bind( &test_observer::test_start, to, tcc.p_count ) );
+ if( init_ok ) {
+ if( result != unit_test_monitor_t::test_ok ) {
+ init_ok = false;
+ }
+ else {
+ if( unit_test::framework_init_observer.has_failed() ) {
+ init_ok = false;
+ }
+ }
+ }
+ }
+ BOOST_TEST_I_CATCH( execution_exception, ex ) {
+ if( init_ok ) {
+ // log only the first error
+ init_ok = false;
+ setup_error = ex.what();
+ }
+ // break; // we should continue otherwise loggers may have improper structure (XML start missing for instance)
+ }
+ }
+ }
+
+ if( init_ok ) {
+
+ // attaching the global fixtures to the main entry point
+ test_unit& entry_test_unit = framework::get( id, TUT_ANY );
+ std::vector<test_unit_fixture_ptr> v_saved_fixture(entry_test_unit.p_fixtures.value.begin(),
+ entry_test_unit.p_fixtures.value.end());
+
+ BOOST_TEST_FOREACH( test_unit_fixture*, tuf, impl::s_frk_state().m_global_fixtures ) {
+ entry_test_unit.p_fixtures.value.insert( entry_test_unit.p_fixtures.value.begin(),
+ test_unit_fixture_ptr(new impl::global_fixture_handle(tuf)) );
+ }
+
+ swap_on_delete< std::vector<test_unit_fixture_ptr> > raii_fixture(v_saved_fixture, entry_test_unit.p_fixtures.value);
+
+ // now work in progress
+ impl::s_frk_state().m_test_in_progress = true;
+ unsigned seed = runtime_config::get<unsigned>( runtime_config::btrt_random_seed );
+ switch( seed ) {
+ case 0:
+ break;
+ case 1:
+ seed = static_cast<unsigned>( std::rand() ^ std::time( 0 ) ); // better init using std::rand() ^ ...
+ BOOST_FALLTHROUGH;
+ default:
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Test cases order is shuffled using seed: " << seed );
+ std::srand( seed );
+ }
+
+ // executing the test tree
+ impl::s_frk_state().execute_test_tree( id );
+
+ // removing previously added global fixtures: dtor raii_fixture
+ }
+
+ impl::s_frk_state().m_test_in_progress = false;
+
+ results_reporter::make_report( INV_REPORT_LEVEL, id );
+
+ unit_test::framework_init_observer.clear();
+ if( call_start_finish ) {
+ // indicates the framework that no test is in progress anymore if observers need to be notified
+ // and this is a teardown, so assertions should not raise any exception otherwise an exception
+ // might be raised in a dtor of a global fixture
+ impl::s_frk_state().m_test_in_progress = false;
+ BOOST_TEST_REVERSE_FOREACH( test_observer*, to, impl::s_frk_state().m_observers ) {
+ ut_detail::test_unit_id_restore restore_current_test_unit(impl::s_frk_state().m_curr_test_unit, id);
+ to->test_finish();
+ }
+ }
+
+ impl::s_frk_state().m_test_in_progress = was_in_progress;
+
+ // propagates the init/teardown error if any
+ BOOST_TEST_SETUP_ASSERT( init_ok && !unit_test::framework_init_observer.has_failed(), setup_error );
+}
+
+//____________________________________________________________________________//
+
+void
+run( test_unit const* tu, bool continue_test )
+{
+ run( tu->p_id, continue_test );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** assertion_result ************** //
+// ************************************************************************** //
+
+void
+assertion_result( unit_test::assertion_result ar )
+{
+ BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers )
+ to->assertion_result( ar );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** exception_caught ************** //
+// ************************************************************************** //
+
+void
+exception_caught( execution_exception const& ex )
+{
+ BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers )
+ to->exception_caught( ex );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** test_unit_aborted ************** //
+// ************************************************************************** //
+
+void
+test_unit_aborted( test_unit const& tu )
+{
+ BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers )
+ to->test_unit_aborted( tu );
+}
+
+// ************************************************************************** //
+// ************** test_aborted ************** //
+// ************************************************************************** //
+
+void
+test_aborted( )
+{
+ BOOST_TEST_FOREACH( test_observer*, to, impl::s_frk_state().m_observers )
+ to->test_aborted( );
+}
+
+
+//____________________________________________________________________________//
+
+} // namespace framework
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_FRAMEWORK_IPP_021005GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/junit_log_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/junit_log_formatter.ipp
index e82e2bd1b02..e82e2bd1b02 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/junit_log_formatter.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/junit_log_formatter.ipp
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/plain_report_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/plain_report_formatter.ipp
index cbf5a4c029e..cbf5a4c029e 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/plain_report_formatter.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/plain_report_formatter.ipp
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/progress_monitor.ipp b/src/third_party/boost-1.69.0/boost/test/impl/progress_monitor.ipp
new file mode 100644
index 00000000000..998aa26b287
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/progress_monitor.ipp
@@ -0,0 +1,189 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : implements simple text based progress monitor
+// ***************************************************************************
+
+#ifndef BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
+#define BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
+
+// Boost.Test
+#include <boost/test/progress_monitor.hpp>
+#include <boost/test/unit_test_parameters.hpp>
+
+#include <boost/test/utils/setcolor.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/test_case_counter.hpp>
+#include <boost/test/tree/traverse.hpp>
+
+// Boost
+#include <boost/scoped_ptr.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** progress_monitor ************** //
+// ************************************************************************** //
+
+struct progress_display {
+ progress_display( counter_t expected_count, std::ostream& os )
+ : m_os(os)
+ , m_count( 0 )
+ , m_expected_count( expected_count )
+ , m_next_tic_count( 0 )
+ , m_tic( 0 )
+ {
+
+ m_os << "\n0% 10 20 30 40 50 60 70 80 90 100%"
+ << "\n|----|----|----|----|----|----|----|----|----|----|"
+ << std::endl;
+
+ if( !m_expected_count )
+ m_expected_count = 1; // prevent divide by zero
+ }
+
+ unsigned long operator+=( unsigned long increment )
+ {
+ if( (m_count += increment) < m_next_tic_count )
+ return m_count;
+
+ // use of floating point ensures that both large and small counts
+ // work correctly. static_cast<>() is also used several places
+ // to suppress spurious compiler warnings.
+ unsigned int tics_needed = static_cast<unsigned int>(
+ (static_cast<double>(m_count)/m_expected_count)*50.0 );
+
+ do {
+ m_os << '*' << std::flush;
+ } while( ++m_tic < tics_needed );
+
+ m_next_tic_count = static_cast<unsigned long>((m_tic/50.0) * m_expected_count);
+
+ if( m_count == m_expected_count ) {
+ if( m_tic < 51 )
+ m_os << '*';
+
+ m_os << std::endl;
+ }
+
+ return m_count;
+ }
+ unsigned long operator++() { return operator+=( 1 ); }
+ unsigned long count() const { return m_count; }
+
+private:
+ BOOST_DELETED_FUNCTION(progress_display(progress_display const&))
+ BOOST_DELETED_FUNCTION(progress_display& operator=(progress_display const&))
+
+ std::ostream& m_os; // may not be present in all imps
+
+ unsigned long m_count;
+ unsigned long m_expected_count;
+ unsigned long m_next_tic_count;
+ unsigned int m_tic;
+};
+
+namespace {
+
+struct progress_monitor_impl {
+ // Constructor
+ progress_monitor_impl()
+ : m_stream( &std::cout )
+ , m_color_output( false )
+ {
+ }
+
+ std::ostream* m_stream;
+ scoped_ptr<progress_display> m_progress_display;
+ bool m_color_output;
+};
+
+progress_monitor_impl& s_pm_impl() { static progress_monitor_impl the_inst; return the_inst; }
+
+#define PM_SCOPED_COLOR() \
+ BOOST_TEST_SCOPE_SETCOLOR( s_pm_impl().m_color_output, *s_pm_impl().m_stream, term_attr::BRIGHT, term_color::MAGENTA )
+
+} // local namespace
+
+//____________________________________________________________________________//
+
+BOOST_TEST_SINGLETON_CONS_IMPL(progress_monitor_t)
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::test_start( counter_t test_cases_amount )
+{
+ s_pm_impl().m_color_output = runtime_config::get<bool>( runtime_config::btrt_color_output );
+
+ PM_SCOPED_COLOR();
+
+ s_pm_impl().m_progress_display.reset( new progress_display( test_cases_amount, *s_pm_impl().m_stream ) );
+}
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::test_aborted()
+{
+ PM_SCOPED_COLOR();
+
+ (*s_pm_impl().m_progress_display) += s_pm_impl().m_progress_display->count();
+}
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::test_unit_finish( test_unit const& tu, unsigned long )
+{
+ PM_SCOPED_COLOR();
+
+ if( tu.p_type == TUT_CASE )
+ ++(*s_pm_impl().m_progress_display);
+}
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::test_unit_skipped( test_unit const& tu, const_string /*reason*/ )
+{
+ PM_SCOPED_COLOR();
+
+ test_case_counter tcc;
+ traverse_test_tree( tu, tcc );
+
+ (*s_pm_impl().m_progress_display) += tcc.p_count;
+}
+
+//____________________________________________________________________________//
+
+void
+progress_monitor_t::set_stream( std::ostream& ostr )
+{
+ s_pm_impl().m_stream = &ostr;
+}
+
+//____________________________________________________________________________//
+
+#undef PM_SCOPED_COLOR
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_PROGRESS_MONITOR_IPP_020105GER
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/results_collector.ipp b/src/third_party/boost-1.69.0/boost/test/impl/results_collector.ipp
new file mode 100644
index 00000000000..cfc34cf7934
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/results_collector.ipp
@@ -0,0 +1,299 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// Test results collecting facility.
+///
+// ***************************************************************************
+
+#ifndef BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
+#define BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
+
+// Boost.Test
+#include <boost/test/unit_test_log.hpp>
+#include <boost/test/results_collector.hpp>
+#include <boost/test/framework.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/test_case_counter.hpp>
+#include <boost/test/tree/traverse.hpp>
+
+// Boost
+#include <boost/cstdlib.hpp>
+
+// STL
+#include <map>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** test_results ************** //
+// ************************************************************************** //
+
+test_results::test_results()
+{
+ clear();
+}
+
+//____________________________________________________________________________//
+
+bool
+test_results::passed() const
+{
+ // if it is skipped, it is not passed. However, if any children is not failed/aborted
+ // then their skipped status is not taken into account.
+ return !p_skipped &&
+ p_test_cases_failed == 0 &&
+ p_assertions_failed <= p_expected_failures &&
+ // p_test_cases_skipped == 0 &&
+ !p_aborted;
+}
+
+//____________________________________________________________________________//
+
+bool
+test_results::aborted() const
+{
+ return p_aborted;
+}
+
+//____________________________________________________________________________//
+
+bool
+test_results::skipped() const
+{
+ return p_skipped;
+}
+
+//____________________________________________________________________________//
+
+int
+test_results::result_code() const
+{
+ return passed() ? exit_success
+ : ( (p_assertions_failed > p_expected_failures || p_skipped )
+ ? exit_test_failure
+ : exit_exception_failure );
+}
+
+//____________________________________________________________________________//
+
+void
+test_results::operator+=( test_results const& tr )
+{
+ p_assertions_passed.value += tr.p_assertions_passed;
+ p_assertions_failed.value += tr.p_assertions_failed;
+ p_warnings_failed.value += tr.p_warnings_failed;
+ p_test_cases_passed.value += tr.p_test_cases_passed;
+ p_test_cases_warned.value += tr.p_test_cases_warned;
+ p_test_cases_failed.value += tr.p_test_cases_failed;
+ p_test_cases_skipped.value += tr.p_test_cases_skipped;
+ p_test_cases_aborted.value += tr.p_test_cases_aborted;
+ p_duration_microseconds.value += tr.p_duration_microseconds;
+}
+
+//____________________________________________________________________________//
+
+void
+test_results::clear()
+{
+ p_assertions_passed.value = 0;
+ p_assertions_failed.value = 0;
+ p_warnings_failed.value = 0;
+ p_expected_failures.value = 0;
+ p_test_cases_passed.value = 0;
+ p_test_cases_warned.value = 0;
+ p_test_cases_failed.value = 0;
+ p_test_cases_skipped.value = 0;
+ p_test_cases_aborted.value = 0;
+ p_duration_microseconds.value= 0;
+ p_aborted.value = false;
+ p_skipped.value = false;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** results_collector ************** //
+// ************************************************************************** //
+
+namespace {
+
+struct results_collector_impl {
+ std::map<test_unit_id,test_results> m_results_store;
+};
+
+results_collector_impl& s_rc_impl() { static results_collector_impl the_inst; return the_inst; }
+
+} // local namespace
+
+//____________________________________________________________________________//
+
+BOOST_TEST_SINGLETON_CONS_IMPL( results_collector_t )
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_start( counter_t )
+{
+ s_rc_impl().m_results_store.clear();
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_unit_start( test_unit const& tu )
+{
+ // init test_results entry
+ test_results& tr = s_rc_impl().m_results_store[tu.p_id];
+
+ tr.clear();
+
+ tr.p_expected_failures.value = tu.p_expected_failures;
+}
+
+//____________________________________________________________________________//
+
+class results_collect_helper : public test_tree_visitor {
+public:
+ explicit results_collect_helper( test_results& tr, test_unit const& ts ) : m_tr( tr ), m_ts( ts ) {}
+
+ void visit( test_case const& tc )
+ {
+ test_results const& tr = results_collector.results( tc.p_id );
+ m_tr += tr;
+
+ if( tr.passed() ) {
+ if( tr.p_warnings_failed )
+ m_tr.p_test_cases_warned.value++;
+ else
+ m_tr.p_test_cases_passed.value++;
+ }
+ else if( tr.p_skipped )
+ m_tr.p_test_cases_skipped.value++;
+ else {
+ if( tr.p_aborted )
+ m_tr.p_test_cases_aborted.value++;
+
+ m_tr.p_test_cases_failed.value++;
+ }
+ }
+ bool test_suite_start( test_suite const& ts )
+ {
+ if( m_ts.p_id == ts.p_id )
+ return true;
+
+ m_tr += results_collector.results( ts.p_id );
+ return false;
+ }
+
+private:
+ // Data members
+ test_results& m_tr;
+ test_unit const& m_ts;
+};
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_unit_finish( test_unit const& tu, unsigned long elapsed_in_microseconds )
+{
+ if( tu.p_type == TUT_SUITE ) {
+ results_collect_helper ch( s_rc_impl().m_results_store[tu.p_id], tu );
+
+ traverse_test_tree( tu, ch );
+ }
+ else {
+ test_results & tr = s_rc_impl().m_results_store[tu.p_id];
+ tr.p_duration_microseconds.value = elapsed_in_microseconds;
+
+ bool num_failures_match = tr.p_aborted || tr.p_assertions_failed >= tr.p_expected_failures;
+ if( !num_failures_match )
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Test case " << tu.full_name() << " has fewer failures than expected" );
+
+ bool check_any_assertions = tr.p_aborted || (tr.p_assertions_failed != 0) || (tr.p_assertions_passed != 0);
+ if( !check_any_assertions )
+ BOOST_TEST_FRAMEWORK_MESSAGE( "Test case " << tu.full_name() << " did not check any assertions" );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_unit_skipped( test_unit const& tu, const_string /*reason*/ )
+{
+ test_results& tr = s_rc_impl().m_results_store[tu.p_id];
+
+ tr.clear();
+
+ tr.p_skipped.value = true;
+
+ if( tu.p_type == TUT_SUITE ) {
+ test_case_counter tcc;
+ traverse_test_tree( tu, tcc );
+
+ tr.p_test_cases_skipped.value = tcc.p_count;
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::assertion_result( unit_test::assertion_result ar )
+{
+ test_results& tr = s_rc_impl().m_results_store[framework::current_test_case_id()];
+
+ switch( ar ) {
+ case AR_PASSED: tr.p_assertions_passed.value++; break;
+ case AR_FAILED: tr.p_assertions_failed.value++; break;
+ case AR_TRIGGERED: tr.p_warnings_failed.value++; break;
+ }
+
+ if( tr.p_assertions_failed == 1 )
+ first_failed_assertion();
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::exception_caught( execution_exception const& )
+{
+ test_results& tr = s_rc_impl().m_results_store[framework::current_test_case_id()];
+
+ tr.p_assertions_failed.value++;
+}
+
+//____________________________________________________________________________//
+
+void
+results_collector_t::test_unit_aborted( test_unit const& tu )
+{
+ s_rc_impl().m_results_store[tu.p_id].p_aborted.value = true;
+}
+
+//____________________________________________________________________________//
+
+test_results const&
+results_collector_t::results( test_unit_id id ) const
+{
+ return s_rc_impl().m_results_store[id];
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_RESULTS_COLLECTOR_IPP_021105GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/results_reporter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/results_reporter.ipp
index 87c1172e127..87c1172e127 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/results_reporter.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/results_reporter.ipp
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/test_framework_init_observer.ipp b/src/third_party/boost-1.69.0/boost/test/impl/test_framework_init_observer.ipp
new file mode 100644
index 00000000000..a44382eed50
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/test_framework_init_observer.ipp
@@ -0,0 +1,117 @@
+// (c) Copyright Raffi Enficiaud 2017.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//! @file
+//! An observer for monitoring the success/failure of the other observers
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
+#define BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
+
+// Boost.Test
+#include <boost/test/test_framework_init_observer.hpp>
+#include <boost/test/framework.hpp>
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** framework_init_observer_t ************** //
+// ************************************************************************** //
+
+namespace {
+
+struct test_init_observer_check {
+ bool has_failure;
+
+ void clear()
+ {
+ has_failure = false;
+ }
+};
+
+
+test_init_observer_check& s_tioc_impl() { static test_init_observer_check the_inst; return the_inst; }
+
+} // local namespace
+
+
+//____________________________________________________________________________//
+
+// singleton pattern
+BOOST_TEST_SINGLETON_CONS_IMPL(framework_init_observer_t)
+
+//____________________________________________________________________________//
+
+void
+framework_init_observer_t::clear()
+{
+ if(!framework::test_in_progress())
+ s_tioc_impl().clear();
+}
+
+//____________________________________________________________________________//
+
+void
+framework_init_observer_t::test_start( counter_t )
+{
+ clear();
+}
+
+//____________________________________________________________________________//
+
+void
+framework_init_observer_t::assertion_result( unit_test::assertion_result ar )
+{
+ test_init_observer_check& tr = s_tioc_impl();
+ switch( ar ) {
+ case AR_TRIGGERED: break;
+ case AR_PASSED: break;
+ case AR_FAILED: tr.has_failure = true; break;
+ default:
+ break;
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+framework_init_observer_t::exception_caught( execution_exception const& )
+{
+ test_init_observer_check& tr = s_tioc_impl();
+ tr.has_failure = true;
+}
+
+void
+framework_init_observer_t::test_aborted()
+{
+ s_tioc_impl().has_failure = true;
+}
+
+
+//____________________________________________________________________________//
+
+bool
+framework_init_observer_t::has_failed() const
+{
+ return s_tioc_impl().has_failure;
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_FRAMEWORK_INIT_OBSERVER_IPP_021105GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/test_main.ipp b/src/third_party/boost-1.69.0/boost/test/impl/test_main.ipp
index 6adc5bb9c23..6adc5bb9c23 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/test_main.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/test_main.ipp
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/test_tools.ipp b/src/third_party/boost-1.69.0/boost/test/impl/test_tools.ipp
index 2956879326b..2956879326b 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/test_tools.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/test_tools.ipp
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/test_tree.ipp b/src/third_party/boost-1.69.0/boost/test/impl/test_tree.ipp
new file mode 100644
index 00000000000..722b4815b22
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/test_tree.ipp
@@ -0,0 +1,566 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// Provides core implementation for Unit Test Framework.
+/// Extensions can be provided in separate files
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
+
+// Boost.Test
+#include <boost/detail/workaround.hpp>
+
+#include <boost/test/framework.hpp>
+#include <boost/test/results_collector.hpp>
+
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/tree/visitor.hpp>
+#include <boost/test/tree/traverse.hpp>
+#include <boost/test/tree/auto_registration.hpp>
+#include <boost/test/tree/global_fixture.hpp>
+
+#include <boost/test/utils/foreach.hpp>
+#include <boost/test/utils/basic_cstring/io.hpp>
+
+#include <boost/test/unit_test_parameters.hpp>
+
+// Boost
+#include <boost/timer.hpp>
+
+// STL
+#include <algorithm>
+#include <vector>
+#include <set>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** test_unit ************** //
+// ************************************************************************** //
+
+test_unit::test_unit( const_string name, const_string file_name, std::size_t line_num, test_unit_type t )
+: p_type( t )
+, p_type_name( t == TUT_CASE ? "case" : "suite" )
+, p_file_name( file_name )
+, p_line_num( line_num )
+, p_id( INV_TEST_UNIT_ID )
+, p_parent_id( INV_TEST_UNIT_ID )
+, p_name( std::string( name.begin(), name.size() ) )
+, p_timeout( 0 )
+, p_expected_failures( 0 )
+, p_default_status( RS_INHERIT )
+, p_run_status( RS_INVALID )
+, p_sibling_rank(0)
+{
+}
+
+//____________________________________________________________________________//
+
+test_unit::test_unit( const_string module_name )
+: p_type( TUT_SUITE )
+, p_type_name( "module" )
+, p_line_num( 0 )
+, p_id( INV_TEST_UNIT_ID )
+, p_parent_id( INV_TEST_UNIT_ID )
+, p_name( std::string( module_name.begin(), module_name.size() ) )
+, p_timeout( 0 )
+, p_expected_failures( 0 )
+, p_default_status( RS_INHERIT )
+, p_run_status( RS_INVALID )
+, p_sibling_rank(0)
+{
+}
+
+//____________________________________________________________________________//
+
+test_unit::~test_unit()
+{
+ framework::deregister_test_unit( this );
+}
+
+//____________________________________________________________________________//
+
+void
+test_unit::depends_on( test_unit* tu )
+{
+ BOOST_TEST_SETUP_ASSERT( p_id != framework::master_test_suite().p_id,
+ "Can't add dependency to the master test suite" );
+
+ p_dependencies.value.push_back( tu->p_id );
+}
+
+//____________________________________________________________________________//
+
+void
+test_unit::add_precondition( precondition_t const& pc )
+{
+ p_preconditions.value.push_back( pc );
+}
+
+//____________________________________________________________________________//
+
+test_tools::assertion_result
+test_unit::check_preconditions() const
+{
+ BOOST_TEST_FOREACH( test_unit_id, dep_id, p_dependencies.get() ) {
+ test_unit const& dep = framework::get( dep_id, TUT_ANY );
+
+ if( !dep.is_enabled() ) {
+ test_tools::assertion_result res(false);
+ res.message() << "dependency test " << dep.p_type_name << " \"" << dep.full_name() << "\" is disabled";
+ return res;
+ }
+
+ test_results const& test_rslt = unit_test::results_collector.results( dep_id );
+ if( !test_rslt.passed() ) {
+ test_tools::assertion_result res(false);
+ res.message() << "dependency test " << dep.p_type_name << " \"" << dep.full_name() << (test_rslt.skipped() ? "\" was skipped":"\" has failed");
+ return res;
+ }
+
+ if( test_rslt.p_test_cases_skipped > 0 ) {
+ test_tools::assertion_result res(false);
+ res.message() << "dependency test " << dep.p_type_name << " \"" << dep.full_name() << "\" has skipped test cases";
+ return res;
+ }
+ }
+
+ BOOST_TEST_FOREACH( precondition_t, precondition, p_preconditions.get() ) {
+ test_tools::assertion_result res = precondition( p_id );
+ if( !res ) {
+ test_tools::assertion_result res_out(false);
+ res_out.message() << "precondition failed";
+ if( !res.has_empty_message() )
+ res_out.message() << ": " << res.message();
+ return res_out;
+ }
+ }
+
+ return true;
+}
+
+//____________________________________________________________________________//
+
+void
+test_unit::increase_exp_fail( counter_t num )
+{
+ p_expected_failures.value += num;
+
+ if( p_parent_id != INV_TEST_UNIT_ID )
+ framework::get<test_suite>( p_parent_id ).increase_exp_fail( num );
+}
+
+//____________________________________________________________________________//
+
+std::string
+test_unit::full_name() const
+{
+ if( p_parent_id == INV_TEST_UNIT_ID || p_parent_id == framework::master_test_suite().p_id )
+ return p_name;
+
+ std::string res = framework::get<test_suite>( p_parent_id ).full_name();
+ res.append("/");
+
+ res.append( p_name );
+
+ return res;
+}
+
+//____________________________________________________________________________//
+
+void
+test_unit::add_label( const_string l )
+{
+ p_labels.value.push_back( std::string() + l );
+}
+
+//____________________________________________________________________________//
+
+bool
+test_unit::has_label( const_string l ) const
+{
+ return std::find( p_labels->begin(), p_labels->end(), l ) != p_labels->end();
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** test_case ************** //
+// ************************************************************************** //
+
+test_case::test_case( const_string name, boost::function<void ()> const& test_func )
+: test_unit( name, "", 0, static_cast<test_unit_type>(type) )
+, p_test_func( test_func )
+{
+ framework::register_test_unit( this );
+}
+
+//____________________________________________________________________________//
+
+test_case::test_case( const_string name, const_string file_name, std::size_t line_num, boost::function<void ()> const& test_func )
+: test_unit( name, file_name, line_num, static_cast<test_unit_type>(type) )
+, p_test_func( test_func )
+{
+ framework::register_test_unit( this );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** test_suite ************** //
+// ************************************************************************** //
+
+//____________________________________________________________________________//
+
+test_suite::test_suite( const_string name, const_string file_name, std::size_t line_num )
+: test_unit( ut_detail::normalize_test_case_name( name ), file_name, line_num, static_cast<test_unit_type>(type) )
+{
+ framework::register_test_unit( this );
+}
+
+//____________________________________________________________________________//
+
+test_suite::test_suite( const_string module_name )
+: test_unit( module_name )
+{
+ framework::register_test_unit( this );
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::add( test_unit* tu, counter_t expected_failures, unsigned timeout )
+{
+ tu->p_timeout.value = timeout;
+
+ m_children.push_back( tu->p_id );
+ tu->p_parent_id.value = p_id;
+
+ if( tu->p_expected_failures != 0 )
+ increase_exp_fail( tu->p_expected_failures );
+
+ if( expected_failures )
+ tu->increase_exp_fail( expected_failures );
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::add( test_unit_generator const& gen, unsigned timeout )
+{
+ test_unit* tu;
+ while((tu = gen.next()) != 0)
+ add( tu, 0, timeout );
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::add( test_unit_generator const& gen, decorator::collector_t& decorators )
+{
+ test_unit* tu;
+ while((tu = gen.next()) != 0) {
+ decorators.store_in( *tu );
+ add( tu, 0 );
+ }
+ decorators.reset();
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::add( boost::shared_ptr<test_unit_generator> gen_ptr, decorator::collector_t& decorators )
+{
+ std::pair<boost::shared_ptr<test_unit_generator>, std::vector<decorator::base_ptr> > tmp_p(gen_ptr, decorators.get_lazy_decorators() );
+ m_generators.push_back(tmp_p);
+ decorators.reset();
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::generate( )
+{
+ typedef std::pair<boost::shared_ptr<test_unit_generator>, std::vector<decorator::base_ptr> > element_t;
+
+ for(std::vector<element_t>::iterator it(m_generators.begin()), ite(m_generators.end());
+ it < ite;
+ ++it)
+ {
+ test_unit* tu;
+ while((tu = it->first->next()) != 0) {
+ tu->p_decorators.value.insert( tu->p_decorators.value.end(), it->second.begin(), it->second.end() );
+ //it->second.store_in( *tu );
+ add( tu, 0 );
+ }
+
+ }
+ m_generators.clear();
+
+ #if 0
+ test_unit* tu;
+ while((tu = gen.next()) != 0) {
+ decorators.store_in( *tu );
+ add( tu, 0 );
+ }
+ #endif
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::check_for_duplicate_test_cases() {
+ // check for clashing names #12597
+ std::set<std::string> names;
+ for( test_unit_id_list::const_iterator it(m_children.begin()), ite(m_children.end());
+ it < ite;
+ ++it) {
+ std::string name = framework::get(*it, TUT_ANY).p_name;
+ std::pair<std::set<std::string>::iterator, bool> ret = names.insert(name);
+ BOOST_TEST_SETUP_ASSERT(ret.second,
+ "test unit with name '"
+ + name
+ + std::string("' registered multiple times in the test suite '")
+ + this->p_name.value
+ + "'");
+ }
+
+ return;
+}
+
+//____________________________________________________________________________//
+
+void
+test_suite::remove( test_unit_id id )
+{
+ test_unit_id_list::iterator it = std::find( m_children.begin(), m_children.end(), id );
+
+ if( it != m_children.end() )
+ m_children.erase( it );
+}
+
+//____________________________________________________________________________//
+
+test_unit_id
+test_suite::get( const_string tu_name ) const
+{
+ BOOST_TEST_FOREACH( test_unit_id, id, m_children ) {
+ if( tu_name == framework::get( id, ut_detail::test_id_2_unit_type( id ) ).p_name.get() )
+ return id;
+ }
+
+ return INV_TEST_UNIT_ID;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** master_test_suite ************** //
+// ************************************************************************** //
+
+master_test_suite_t::master_test_suite_t()
+: test_suite( "Master Test Suite" )
+, argc( 0 )
+, argv( 0 )
+{
+ p_default_status.value = RS_ENABLED;
+}
+
+// ************************************************************************** //
+// ************** traverse_test_tree ************** //
+// ************************************************************************** //
+
+void
+traverse_test_tree( test_case const& tc, test_tree_visitor& V, bool ignore_status )
+{
+ if( tc.is_enabled() || ignore_status )
+ V.visit( tc );
+}
+
+//____________________________________________________________________________//
+
+void
+traverse_test_tree( test_suite const& suite, test_tree_visitor& V, bool ignore_status )
+{
+ // skip disabled test suite unless we asked to ignore this condition
+ if( !ignore_status && !suite.is_enabled() )
+ return;
+
+ // Invoke test_suite_start callback
+ if( !V.test_suite_start( suite ) )
+ return;
+
+ // Recurse into children
+ std::size_t total_children = suite.m_children.size();
+ for( std::size_t i=0; i < total_children; ) {
+ // this statement can remove the test unit from this list
+ traverse_test_tree( suite.m_children[i], V, ignore_status );
+ if( total_children > suite.m_children.size() )
+ total_children = suite.m_children.size();
+ else
+ ++i;
+ }
+
+ // Invoke test_suite_finish callback
+ V.test_suite_finish( suite );
+}
+
+//____________________________________________________________________________//
+
+void
+traverse_test_tree( test_unit_id id, test_tree_visitor& V, bool ignore_status )
+{
+ if( ut_detail::test_id_2_unit_type( id ) == TUT_CASE )
+ traverse_test_tree( framework::get<test_case>( id ), V, ignore_status );
+ else
+ traverse_test_tree( framework::get<test_suite>( id ), V, ignore_status );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** object generators ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+std::string
+normalize_test_case_name( const_string name )
+{
+ std::string norm_name( name.begin(), name.size() );
+
+ if( name[0] == '&' )
+ norm_name = norm_name.substr( 1 );
+
+ // trim spaces
+ std::size_t first_not_space = norm_name.find_first_not_of(' ');
+ if( first_not_space ) {
+ norm_name.erase(0, first_not_space);
+ }
+
+ std::size_t last_not_space = norm_name.find_last_not_of(' ');
+ if( last_not_space !=std::string::npos ) {
+ norm_name.erase(last_not_space + 1);
+ }
+
+ // sanitize all chars that might be used in runtime filters
+ static const char to_replace[] = { ':', '*', '@', '+', '!', '/' };
+ for(std::size_t index = 0;
+ index < sizeof(to_replace)/sizeof(to_replace[0]);
+ index++) {
+ std::replace(norm_name.begin(), norm_name.end(), to_replace[index], '_');
+ }
+
+ return norm_name;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** auto_test_unit_registrar ************** //
+// ************************************************************************** //
+
+auto_test_unit_registrar::auto_test_unit_registrar( test_case* tc, decorator::collector_t& decorators, counter_t exp_fail )
+{
+ framework::current_auto_test_suite().add( tc, exp_fail );
+
+ decorators.store_in( *tc );
+ decorators.reset();
+}
+
+//____________________________________________________________________________//
+
+auto_test_unit_registrar::auto_test_unit_registrar( const_string ts_name, const_string ts_file, std::size_t ts_line, decorator::collector_t& decorators )
+{
+ test_unit_id id = framework::current_auto_test_suite().get( ts_name );
+
+ test_suite* ts;
+
+ if( id != INV_TEST_UNIT_ID ) {
+ ts = &framework::get<test_suite>( id );
+ BOOST_ASSERT( ts->p_parent_id == framework::current_auto_test_suite().p_id );
+ }
+ else {
+ ts = new test_suite( ts_name, ts_file, ts_line );
+ framework::current_auto_test_suite().add( ts );
+ }
+
+ decorators.store_in( *ts );
+ decorators.reset();
+
+ framework::current_auto_test_suite( ts );
+}
+
+//____________________________________________________________________________//
+
+auto_test_unit_registrar::auto_test_unit_registrar( test_unit_generator const& tc_gen, decorator::collector_t& decorators )
+{
+ framework::current_auto_test_suite().add( tc_gen, decorators );
+}
+
+//____________________________________________________________________________//
+
+auto_test_unit_registrar::auto_test_unit_registrar( boost::shared_ptr<test_unit_generator> tc_gen, decorator::collector_t& decorators )
+{
+ framework::current_auto_test_suite().add( tc_gen, decorators );
+}
+
+
+//____________________________________________________________________________//
+
+auto_test_unit_registrar::auto_test_unit_registrar( int )
+{
+ framework::current_auto_test_suite( 0, false );
+}
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// ************** global_fixture ************** //
+// ************************************************************************** //
+
+global_fixture::global_fixture()
+{
+ framework::register_global_fixture( *this );
+}
+
+global_fixture::~global_fixture()
+{
+ framework::deregister_global_fixture( *this );
+}
+
+// ************************************************************************** //
+// ************** global_configuration ************** //
+// ************************************************************************** //
+
+global_configuration::global_configuration()
+{
+ framework::register_observer( *this );
+}
+
+global_configuration::~global_configuration()
+{
+ framework::deregister_observer( *this );
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_SUITE_IPP_012205GER
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/unit_test_log.ipp b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_log.ipp
new file mode 100644
index 00000000000..40b54be223c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_log.ipp
@@ -0,0 +1,695 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : implemets Unit Test Log
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+
+// Boost.Test
+#include <boost/test/unit_test_log.hpp>
+#include <boost/test/unit_test_log_formatter.hpp>
+#include <boost/test/execution_monitor.hpp>
+#include <boost/test/framework.hpp>
+#include <boost/test/unit_test_parameters.hpp>
+
+#include <boost/test/utils/basic_cstring/compare.hpp>
+#include <boost/test/utils/foreach.hpp>
+
+#include <boost/test/output/compiler_log_formatter.hpp>
+#include <boost/test/output/xml_log_formatter.hpp>
+#include <boost/test/output/junit_log_formatter.hpp>
+
+// Boost
+#include <boost/shared_ptr.hpp>
+#include <boost/io/ios_state.hpp>
+typedef ::boost::io::ios_base_all_saver io_saver_type;
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** entry_value_collector ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+entry_value_collector const&
+entry_value_collector::operator<<( lazy_ostream const& v ) const
+{
+ unit_test_log << v;
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+entry_value_collector const&
+entry_value_collector::operator<<( const_string v ) const
+{
+ unit_test_log << v;
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+entry_value_collector::~entry_value_collector()
+{
+ if( m_last )
+ unit_test_log << log::end();
+}
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// ************** unit_test_log ************** //
+// ************************************************************************** //
+
+namespace {
+
+// log data
+struct unit_test_log_data_helper_impl {
+ typedef boost::shared_ptr<unit_test_log_formatter> formatter_ptr;
+ typedef boost::shared_ptr<io_saver_type> saver_ptr;
+
+ bool m_enabled;
+ output_format m_format;
+ std::ostream* m_stream;
+ saver_ptr m_stream_state_saver;
+ formatter_ptr m_log_formatter;
+ bool m_entry_in_progress;
+
+ unit_test_log_data_helper_impl(unit_test_log_formatter* p_log_formatter, output_format format, bool enabled = false)
+ : m_enabled( enabled )
+ , m_format( format )
+ , m_stream( &std::cout )
+ , m_stream_state_saver( new io_saver_type( std::cout ) )
+ , m_log_formatter()
+ , m_entry_in_progress( false )
+ {
+ m_log_formatter.reset(p_log_formatter);
+ m_log_formatter->set_log_level(log_all_errors);
+ }
+
+ // helper functions
+ std::ostream& stream()
+ {
+ return *m_stream;
+ }
+
+ log_level get_log_level() const
+ {
+ return m_log_formatter->get_log_level();
+ }
+};
+
+struct unit_test_log_impl {
+ // Constructor
+ unit_test_log_impl()
+ {
+ m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::compiler_log_formatter, OF_CLF, true) ); // only this one is active by default,
+ m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::xml_log_formatter, OF_XML, false) );
+ m_log_formatter_data.push_back( unit_test_log_data_helper_impl(new output::junit_log_formatter, OF_JUNIT, false) );
+ }
+
+ typedef std::vector<unit_test_log_data_helper_impl> v_formatter_data_t;
+ v_formatter_data_t m_log_formatter_data;
+
+ // entry data
+ log_entry_data m_entry_data;
+
+ bool has_entry_in_progress() const {
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl const&, current_logger_data, m_log_formatter_data ) {
+ if( current_logger_data.m_entry_in_progress )
+ return true;
+ }
+ return false;
+ }
+
+ // check point data
+ log_checkpoint_data m_checkpoint_data;
+
+ void set_checkpoint( const_string file, std::size_t line_num, const_string msg )
+ {
+ assign_op( m_checkpoint_data.m_message, msg, 0 );
+ m_checkpoint_data.m_file_name = file;
+ m_checkpoint_data.m_line_num = line_num;
+ }
+};
+
+unit_test_log_impl& s_log_impl() { static unit_test_log_impl the_inst; return the_inst; }
+
+} // local namespace
+
+//____________________________________________________________________________//
+
+BOOST_TEST_SINGLETON_CONS_IMPL( unit_test_log_t )
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_start( counter_t test_cases_amount )
+{
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing )
+ continue;
+
+ current_logger_data.m_log_formatter->log_start( current_logger_data.stream(), test_cases_amount );
+
+ if( runtime_config::get<bool>( runtime_config::btrt_build_info ) )
+ current_logger_data.m_log_formatter->log_build_info( current_logger_data.stream() );
+
+ //current_logger_data.stream().flush();
+
+ current_logger_data.m_entry_in_progress = false;
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_finish()
+{
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() == log_nothing )
+ continue;
+
+ current_logger_data.m_log_formatter->log_finish( current_logger_data.stream() );
+
+ current_logger_data.stream().flush();
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_aborted()
+{
+ BOOST_TEST_LOG_ENTRY( log_messages ) << "Test is aborted";
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_unit_start( test_unit const& tu )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ *this << log::end();
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
+ continue;
+ current_logger_data.m_log_formatter->test_unit_start( current_logger_data.stream(), tu );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_unit_finish( test_unit const& tu, unsigned long elapsed )
+{
+ s_log_impl().m_checkpoint_data.clear();
+
+ if( s_log_impl().has_entry_in_progress() )
+ *this << log::end();
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
+ continue;
+
+ current_logger_data.m_log_formatter->test_unit_finish( current_logger_data.stream(), tu, elapsed );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::test_unit_skipped( test_unit const& tu, const_string reason )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ *this << log::end();
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
+ continue;
+
+ current_logger_data.m_log_formatter->test_unit_skipped( current_logger_data.stream(), tu, reason );
+ }
+}
+
+void
+unit_test_log_t::test_unit_aborted( test_unit const& tu )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ *this << log::end();
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( !current_logger_data.m_enabled || current_logger_data.get_log_level() > log_test_units )
+ continue;
+
+ current_logger_data.m_log_formatter->test_unit_aborted(current_logger_data.stream(), tu );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::exception_caught( execution_exception const& ex )
+{
+ log_level l =
+ ex.code() <= execution_exception::cpp_exception_error ? log_cpp_exception_errors :
+ (ex.code() <= execution_exception::timeout_error ? log_system_errors
+ : log_fatal_errors );
+
+ if( s_log_impl().has_entry_in_progress() )
+ *this << log::end();
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+
+ if( current_logger_data.m_enabled && l >= current_logger_data.get_log_level() ) {
+
+ current_logger_data.m_log_formatter->log_exception_start( current_logger_data.stream(), s_log_impl().m_checkpoint_data, ex );
+
+ log_entry_context( l );
+
+ current_logger_data.m_log_formatter->log_exception_finish( current_logger_data.stream() );
+ }
+ }
+ clear_entry_context();
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_checkpoint( const_string file, std::size_t line_num, const_string msg )
+{
+ s_log_impl().set_checkpoint( file, line_num, msg );
+}
+
+//____________________________________________________________________________//
+
+char
+set_unix_slash( char in )
+{
+ return in == '\\' ? '/' : in;
+}
+
+unit_test_log_t&
+unit_test_log_t::operator<<( log::begin const& b )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ *this << log::end();
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled ) {
+ current_logger_data.m_stream_state_saver->restore();
+ }
+ }
+
+ s_log_impl().m_entry_data.clear();
+
+ assign_op( s_log_impl().m_entry_data.m_file_name, b.m_file_name, 0 );
+
+ // normalize file name
+ std::transform( s_log_impl().m_entry_data.m_file_name.begin(), s_log_impl().m_entry_data.m_file_name.end(),
+ s_log_impl().m_entry_data.m_file_name.begin(),
+ &set_unix_slash );
+
+ s_log_impl().m_entry_data.m_line_num = b.m_line_num;
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_t&
+unit_test_log_t::operator<<( log::end const& )
+{
+ if( s_log_impl().has_entry_in_progress() ) {
+ log_entry_context( s_log_impl().m_entry_data.m_level );
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled && current_logger_data.m_entry_in_progress ) {
+ current_logger_data.m_log_formatter->log_entry_finish( current_logger_data.stream() );
+ }
+ current_logger_data.m_entry_in_progress = false;
+ }
+ }
+
+ clear_entry_context();
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_t&
+unit_test_log_t::operator<<( log_level l )
+{
+ s_log_impl().m_entry_data.m_level = l;
+
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+ut_detail::entry_value_collector
+unit_test_log_t::operator()( log_level l )
+{
+ *this << l;
+
+ return ut_detail::entry_value_collector();
+}
+
+//____________________________________________________________________________//
+
+bool
+unit_test_log_t::log_entry_start(output_format log_format)
+{
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+
+ if( current_logger_data.m_format != log_format )
+ continue;
+
+ if( current_logger_data.m_entry_in_progress )
+ return true;
+
+ if( !current_logger_data.m_enabled )
+ return false;
+
+ switch( s_log_impl().m_entry_data.m_level ) {
+ case log_successful_tests:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_INFO );
+ break;
+ case log_messages:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_MESSAGE );
+ break;
+ case log_warnings:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_WARNING );
+ break;
+ case log_all_errors:
+ case log_cpp_exception_errors:
+ case log_system_errors:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_ERROR );
+ break;
+ case log_fatal_errors:
+ current_logger_data.m_log_formatter->log_entry_start( current_logger_data.stream(), s_log_impl().m_entry_data,
+ unit_test_log_formatter::BOOST_UTL_ET_FATAL_ERROR );
+ break;
+ case log_nothing:
+ case log_test_units:
+ case invalid_log_level:
+ return false;
+ }
+
+ current_logger_data.m_entry_in_progress = true;
+ return true;
+ }
+
+ return false;
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_t&
+unit_test_log_t::operator<<( const_string value )
+{
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled && s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && !value.empty() && log_entry_start(current_logger_data.m_format) )
+ current_logger_data.m_log_formatter->log_entry_value( current_logger_data.stream(), value );
+
+ }
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_t&
+unit_test_log_t::operator<<( lazy_ostream const& value )
+{
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled && s_log_impl().m_entry_data.m_level >= current_logger_data.get_log_level() && !value.empty() ) {
+ if( log_entry_start(current_logger_data.m_format) ) {
+ current_logger_data.m_log_formatter->log_entry_value( current_logger_data.stream(), value );
+ }
+ }
+ }
+ return *this;
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::log_entry_context( log_level l )
+{
+ framework::context_generator const& context = framework::get_context();
+ if( context.is_empty() )
+ return;
+
+ const_string frame;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled ) {
+ current_logger_data.m_log_formatter->entry_context_start( current_logger_data.stream(), l );
+ }
+ }
+
+ while( !(frame=context.next()).is_empty() )
+ {
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled ) {
+ current_logger_data.m_log_formatter->log_entry_context( current_logger_data.stream(), l, frame );
+ }
+ }
+ }
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_enabled ) {
+ current_logger_data.m_log_formatter->entry_context_finish( current_logger_data.stream(), l );
+ }
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::clear_entry_context()
+{
+ framework::clear_context();
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_stream( std::ostream& str )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ current_logger_data.m_stream = &str;
+ current_logger_data.m_stream_state_saver.reset( new io_saver_type( str ) );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_stream( output_format log_format, std::ostream& str )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ current_logger_data.m_stream = &str;
+ current_logger_data.m_stream_state_saver.reset( new io_saver_type( str ) );
+ break;
+ }
+ }
+}
+
+std::ostream*
+unit_test_log_t::get_stream( output_format log_format ) const
+{
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ return current_logger_data.m_stream;
+ }
+ }
+ return 0;
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_threshold_level( log_level lev )
+{
+ if( s_log_impl().has_entry_in_progress() || lev == invalid_log_level )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ current_logger_data.m_log_formatter->set_log_level( lev );
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_threshold_level( output_format log_format, log_level lev )
+{
+ if( s_log_impl().has_entry_in_progress() || lev == invalid_log_level )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ current_logger_data.m_log_formatter->set_log_level( lev );
+ break;
+ }
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::set_format( output_format log_format )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ current_logger_data.m_enabled = current_logger_data.m_format == log_format;
+ }
+}
+
+//____________________________________________________________________________//
+
+void
+unit_test_log_t::add_format( output_format log_format )
+{
+ if( s_log_impl().has_entry_in_progress() )
+ return;
+
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ current_logger_data.m_enabled = true;
+ break;
+ }
+ }
+}
+
+//____________________________________________________________________________//
+
+unit_test_log_formatter*
+unit_test_log_t::get_formatter( output_format log_format ) {
+ BOOST_TEST_FOREACH( unit_test_log_data_helper_impl&, current_logger_data, s_log_impl().m_log_formatter_data ) {
+ if( current_logger_data.m_format == log_format) {
+ return current_logger_data.m_log_formatter.get();
+ }
+ }
+ return 0;
+}
+
+
+void
+unit_test_log_t::add_formatter( unit_test_log_formatter* the_formatter )
+{
+ // remove only user defined logger
+ for(unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()),
+ ite(s_log_impl().m_log_formatter_data.end());
+ it != ite;
+ ++it)
+ {
+ if( it->m_format == OF_CUSTOM_LOGGER) {
+ s_log_impl().m_log_formatter_data.erase(it);
+ break;
+ }
+ }
+
+ if( the_formatter ) {
+ s_log_impl().m_log_formatter_data.push_back( unit_test_log_data_helper_impl(the_formatter, OF_CUSTOM_LOGGER, true) );
+ }
+}
+
+void
+unit_test_log_t::set_formatter( unit_test_log_formatter* the_formatter )
+{
+ // remove only user defined logger
+ log_level current_level = invalid_log_level;
+ std::ostream *current_stream = 0;
+ output_format previous_format = OF_INVALID;
+ for(unit_test_log_impl::v_formatter_data_t::iterator it(s_log_impl().m_log_formatter_data.begin()),
+ ite(s_log_impl().m_log_formatter_data.end());
+ it != ite;
+ ++it)
+ {
+ if( it->m_enabled ) {
+ if( current_level == invalid_log_level || it->m_format < previous_format || it->m_format == OF_CUSTOM_LOGGER) {
+ current_level = it->get_log_level();
+ current_stream = &(it->stream());
+ previous_format = it->m_format;
+ }
+ }
+ }
+
+ if( the_formatter ) {
+ add_formatter(the_formatter);
+ set_format(OF_CUSTOM_LOGGER);
+ set_threshold_level(OF_CUSTOM_LOGGER, current_level);
+ set_stream(OF_CUSTOM_LOGGER, *current_stream);
+ }
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** unit_test_log_formatter ************** //
+// ************************************************************************** //
+
+void
+unit_test_log_formatter::log_entry_value( std::ostream& ostr, lazy_ostream const& value )
+{
+ log_entry_value( ostr, (wrap_stringstream().ref() << value).str() );
+}
+
+void
+unit_test_log_formatter::set_log_level(log_level new_log_level)
+{
+ m_log_level = new_log_level;
+}
+
+log_level
+unit_test_log_formatter::get_log_level() const
+{
+ return m_log_level;
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_LOG_IPP_012205GER
+
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/unit_test_main.ipp b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_main.ipp
index cad3d88ec62..cad3d88ec62 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/unit_test_main.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_main.ipp
diff --git a/src/third_party/boost-1.69.0/boost/test/impl/unit_test_monitor.ipp b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_monitor.ipp
new file mode 100644
index 00000000000..70e78513b65
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_monitor.ipp
@@ -0,0 +1,78 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : implements specific subclass of Executon Monitor used by Unit
+// Test Framework to monitor test cases run.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
+#define BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
+
+// Boost.Test
+#include <boost/test/unit_test_monitor.hpp>
+#include <boost/test/framework.hpp>
+#include <boost/test/tree/test_unit.hpp>
+#include <boost/test/unit_test_parameters.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// singleton pattern
+BOOST_TEST_SINGLETON_CONS_IMPL(unit_test_monitor_t)
+
+// ************************************************************************** //
+// ************** unit_test_monitor ************** //
+// ************************************************************************** //
+
+unit_test_monitor_t::error_level
+unit_test_monitor_t::execute_and_translate( boost::function<void ()> const& func, unsigned timeout )
+{
+ BOOST_TEST_I_TRY {
+ p_catch_system_errors.value = runtime_config::get<bool>( runtime_config::btrt_catch_sys_errors );
+ p_timeout.value = timeout;
+ p_auto_start_dbg.value = runtime_config::get<bool>( runtime_config::btrt_auto_start_dbg );
+ p_use_alt_stack.value = runtime_config::get<bool>( runtime_config::btrt_use_alt_stack );
+ p_detect_fp_exceptions.value = runtime_config::get<bool>( runtime_config::btrt_detect_fp_except );
+
+ vexecute( func );
+ }
+ BOOST_TEST_I_CATCH( execution_exception, ex ) {
+ framework::exception_caught( ex );
+ framework::test_unit_aborted( framework::current_test_unit() );
+
+ // translate execution_exception::error_code to error_level
+ switch( ex.code() ) {
+ case execution_exception::no_error: return test_ok;
+ case execution_exception::user_error: return unexpected_exception;
+ case execution_exception::cpp_exception_error: return unexpected_exception;
+ case execution_exception::system_error: return os_exception;
+ case execution_exception::timeout_error: return os_timeout;
+ case execution_exception::user_fatal_error:
+ case execution_exception::system_fatal_error: return fatal_error;
+ default: return unexpected_exception;
+ }
+ }
+
+ return test_ok;
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_MONITOR_IPP_012205GER
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/unit_test_parameters.ipp b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_parameters.ipp
index fec7bb94caf..fec7bb94caf 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/unit_test_parameters.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/unit_test_parameters.ipp
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/xml_log_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/xml_log_formatter.ipp
index ef44f1eadec..ef44f1eadec 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/xml_log_formatter.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/xml_log_formatter.ipp
diff --git a/src/third_party/boost-1.68.0/boost/test/impl/xml_report_formatter.ipp b/src/third_party/boost-1.69.0/boost/test/impl/xml_report_formatter.ipp
index 424ef4ba446..424ef4ba446 100644
--- a/src/third_party/boost-1.68.0/boost/test/impl/xml_report_formatter.ipp
+++ b/src/third_party/boost-1.69.0/boost/test/impl/xml_report_formatter.ipp
diff --git a/src/third_party/boost-1.68.0/boost/test/included/prg_exec_monitor.hpp b/src/third_party/boost-1.69.0/boost/test/included/prg_exec_monitor.hpp
index ff48ce5594e..ff48ce5594e 100644
--- a/src/third_party/boost-1.68.0/boost/test/included/prg_exec_monitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/included/prg_exec_monitor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/included/test_exec_monitor.hpp b/src/third_party/boost-1.69.0/boost/test/included/test_exec_monitor.hpp
index e75b4698f29..e75b4698f29 100644
--- a/src/third_party/boost-1.68.0/boost/test/included/test_exec_monitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/included/test_exec_monitor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/included/unit_test.hpp b/src/third_party/boost-1.69.0/boost/test/included/unit_test.hpp
index 90882eb178e..90882eb178e 100644
--- a/src/third_party/boost-1.68.0/boost/test/included/unit_test.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/included/unit_test.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/output/compiler_log_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/output/compiler_log_formatter.hpp
index 50359334b1b..50359334b1b 100644
--- a/src/third_party/boost-1.68.0/boost/test/output/compiler_log_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/output/compiler_log_formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/output/junit_log_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/output/junit_log_formatter.hpp
index 713d3b016c6..713d3b016c6 100644
--- a/src/third_party/boost-1.68.0/boost/test/output/junit_log_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/output/junit_log_formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/output/plain_report_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/output/plain_report_formatter.hpp
index 8c509645977..8c509645977 100644
--- a/src/third_party/boost-1.68.0/boost/test/output/plain_report_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/output/plain_report_formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/output/xml_log_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/output/xml_log_formatter.hpp
index 1d8dec0f95f..1d8dec0f95f 100644
--- a/src/third_party/boost-1.68.0/boost/test/output/xml_log_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/output/xml_log_formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/output/xml_report_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/output/xml_report_formatter.hpp
index ca5e47182f1..ca5e47182f1 100644
--- a/src/third_party/boost-1.68.0/boost/test/output/xml_report_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/output/xml_report_formatter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/prg_exec_monitor.hpp b/src/third_party/boost-1.69.0/boost/test/prg_exec_monitor.hpp
index f072e215dbe..f072e215dbe 100644
--- a/src/third_party/boost-1.68.0/boost/test/prg_exec_monitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/prg_exec_monitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/progress_monitor.hpp b/src/third_party/boost-1.69.0/boost/test/progress_monitor.hpp
new file mode 100644
index 00000000000..49c0b014971
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/progress_monitor.hpp
@@ -0,0 +1,65 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// @brief defines simple text based progress monitor
+// ***************************************************************************
+
+#ifndef BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
+#define BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
+
+// Boost.Test
+#include <boost/test/tree/observer.hpp>
+
+// STL
+#include <iosfwd> // for std::ostream&
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** progress_monitor ************** //
+// ************************************************************************** //
+
+/// This class implements test observer interface and updates test progress as test units finish or get aborted
+class BOOST_TEST_DECL progress_monitor_t : public test_observer {
+public:
+ /// @name Test observer interface
+ /// @{
+ virtual void test_start( counter_t test_cases_amount );
+ virtual void test_aborted();
+
+ virtual void test_unit_finish( test_unit const&, unsigned long );
+ virtual void test_unit_skipped( test_unit const&, const_string );
+
+ virtual int priority() { return 4; }
+ /// @}
+
+ /// @name Configuration
+ /// @{
+ void set_stream( std::ostream& );
+ /// @}
+
+ /// Singleton pattern
+ BOOST_TEST_SINGLETON_CONS( progress_monitor_t )
+}; // progress_monitor_t
+
+BOOST_TEST_SINGLETON_INST( progress_monitor )
+
+} // namespace unit_test
+} // namespace boost
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_PROGRESS_MONITOR_HPP_020105GER
+
diff --git a/src/third_party/boost-1.69.0/boost/test/results_collector.hpp b/src/third_party/boost-1.69.0/boost/test/results_collector.hpp
new file mode 100644
index 00000000000..8e8a6202ed4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/results_collector.hpp
@@ -0,0 +1,148 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// @brief Defines testing result collector components
+///
+/// Defines classes for keeping track (@ref test_results) and collecting
+/// (@ref results_collector_t) the states of the test units.
+// ***************************************************************************
+
+#ifndef BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
+#define BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
+
+// Boost.Test
+#include <boost/test/tree/observer.hpp>
+
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+
+#include <boost/test/utils/class_properties.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+namespace {
+
+// ************************************************************************** //
+/// First failed assertion debugger hook
+///
+/// This function is a placeholder where user can set a breakpoint in debugger to catch the
+/// very first assertion failure in each test case
+// ************************************************************************** //
+inline void first_failed_assertion() {}
+}
+
+// ************************************************************************** //
+/// @brief Collection of attributes constituting test unit results
+///
+/// This class is a collection of attributes describing a test result.
+///
+/// The attributes presented as public properties on
+/// an instance of the class. In addition summary conclusion methods are presented to generate simple answer to pass/fail question
+
+class BOOST_TEST_DECL test_results {
+public:
+ test_results();
+
+ /// Type representing counter like public property
+ typedef BOOST_READONLY_PROPERTY( counter_t, (results_collector_t)
+ (test_results)
+ (results_collect_helper) ) counter_prop;
+ /// Type representing boolean like public property
+ typedef BOOST_READONLY_PROPERTY( bool, (results_collector_t)
+ (test_results)
+ (results_collect_helper) ) bool_prop;
+
+ counter_prop p_assertions_passed; //!< Number of successful assertions
+ counter_prop p_assertions_failed; //!< Number of failing assertions
+ counter_prop p_warnings_failed; //!< Number of warnings
+ counter_prop p_expected_failures;
+ counter_prop p_test_cases_passed; //!< Number of successfull test cases
+ counter_prop p_test_cases_warned; //!< Number of warnings in test cases
+ counter_prop p_test_cases_failed; //!< Number of failing test cases
+ counter_prop p_test_cases_skipped; //!< Number of skipped test cases
+ counter_prop p_test_cases_aborted; //!< Number of aborted test cases
+ counter_prop p_duration_microseconds; //!< Duration of the test in microseconds
+ bool_prop p_aborted; //!< Indicates that the test unit execution has been aborted
+ bool_prop p_skipped; //!< Indicates that the test unit execution has been skipped
+
+ /// Returns true if test unit passed
+ bool passed() const;
+
+ /// Returns true if test unit skipped
+ ///
+ /// For test suites, this indicates if the test suite itself has been marked as
+ /// skipped, and not if the test suite contains any skipped test.
+ bool skipped() const;
+
+ /// Returns true if the test unit was aborted (hard failure)
+ bool aborted() const;
+
+ /// Produces result code for the test unit execution
+ ///
+ /// This methhod return one of the result codes defined in @c boost/cstdlib.hpp
+ /// @returns
+ /// - @c boost::exit_success on success,
+ /// - @c boost::exit_exception_failure in case test unit
+ /// was aborted for any reason (incuding uncaught exception)
+ /// - and @c boost::exit_test_failure otherwise
+ int result_code() const;
+
+ //! Combines the results of the current instance with another
+ //!
+ //! Only the counters are updated and the @c p_aborted and @c p_skipped are left unchanged.
+ void operator+=( test_results const& );
+
+ //! Resets the current state of the result
+ void clear();
+};
+
+// ************************************************************************** //
+/// @brief Collects and combines the test results
+///
+/// This class collects and combines the results of the test unit during the execution of the
+/// test tree. The results_collector_t::results() function combines the test results on a subtree
+/// of the test tree.
+///
+/// @see boost::unit_test::test_observer
+class BOOST_TEST_DECL results_collector_t : public test_observer {
+public:
+
+ virtual void test_start( counter_t );
+
+ virtual void test_unit_start( test_unit const& );
+ virtual void test_unit_finish( test_unit const&, unsigned long );
+ virtual void test_unit_skipped( test_unit const&, const_string );
+ virtual void test_unit_aborted( test_unit const& );
+
+ virtual void assertion_result( unit_test::assertion_result );
+ virtual void exception_caught( execution_exception const& );
+
+ virtual int priority() { return 3; }
+
+ /// Results access per test unit
+ ///
+ /// @param[in] tu_id id of a test unit
+ test_results const& results( test_unit_id tu_id ) const;
+
+ /// Singleton pattern
+ BOOST_TEST_SINGLETON_CONS( results_collector_t )
+};
+
+BOOST_TEST_SINGLETON_INST( results_collector )
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_RESULTS_COLLECTOR_HPP_071894GER
diff --git a/src/third_party/boost-1.68.0/boost/test/results_reporter.hpp b/src/third_party/boost-1.69.0/boost/test/results_reporter.hpp
index 6f8d8f1105f..6f8d8f1105f 100644
--- a/src/third_party/boost-1.68.0/boost/test/results_reporter.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/results_reporter.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/test_exec_monitor.hpp b/src/third_party/boost-1.69.0/boost/test/test_exec_monitor.hpp
index 04508093352..04508093352 100644
--- a/src/third_party/boost-1.68.0/boost/test/test_exec_monitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/test_exec_monitor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/test_framework_init_observer.hpp b/src/third_party/boost-1.69.0/boost/test/test_framework_init_observer.hpp
new file mode 100644
index 00000000000..8bf0bb99479
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/test_framework_init_observer.hpp
@@ -0,0 +1,61 @@
+// (c) Copyright Raffi Enficiaud 2017.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// @brief Defines an observer that monitors the init of the unit test framework
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER
+#define BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER
+
+// Boost.Test
+#include <boost/test/tree/observer.hpp>
+
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+/// @brief Monitors the init of the framework
+///
+/// This class collects the state of the init/termination of the unit test framework.
+///
+/// @see boost::unit_test::test_observer
+class BOOST_TEST_DECL framework_init_observer_t : public test_observer {
+public:
+
+ virtual void test_start( counter_t );
+
+ virtual void assertion_result( unit_test::assertion_result );
+ virtual void exception_caught( execution_exception const& );
+ virtual void test_aborted();
+
+ virtual int priority() { return 0; }
+
+ void clear();
+
+ /// Indicates if a failure has been recorded so far
+ bool has_failed( ) const;
+
+ /// Singleton pattern
+ BOOST_TEST_SINGLETON_CONS( framework_init_observer_t )
+};
+
+BOOST_TEST_SINGLETON_INST( framework_init_observer )
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_FRAMEWORK_INIT_OBSERVER_HPP_071894GER
diff --git a/src/third_party/boost-1.68.0/boost/test/test_tools.hpp b/src/third_party/boost-1.69.0/boost/test/test_tools.hpp
index a542d5fcdee..a542d5fcdee 100644
--- a/src/third_party/boost-1.68.0/boost/test/test_tools.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/test_tools.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/assertion.hpp b/src/third_party/boost-1.69.0/boost/test/tools/assertion.hpp
new file mode 100644
index 00000000000..2a7d96ebb1c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tools/assertion.hpp
@@ -0,0 +1,413 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief Defines framework for automated assertion construction
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TOOLS_ASSERTION_HPP_100911GER
+#define BOOST_TEST_TOOLS_ASSERTION_HPP_100911GER
+
+// Boost.Test
+#include <boost/test/tools/assertion_result.hpp>
+#include <boost/test/tools/detail/print_helper.hpp>
+#include <boost/test/tools/detail/fwd.hpp>
+
+// Boost
+#include <boost/type.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/mpl/assert.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_const.hpp>
+
+// STL
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+#include <utility>
+#endif
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace test_tools {
+namespace assertion {
+
+// ************************************************************************** //
+// ************** assertion::operators ************** //
+// ************************************************************************** //
+// precedence 4: ->*, .*
+// precedence 5: *, /, %
+// precedence 6: +, -
+// precedence 7: << , >>
+// precedence 8: <, <=, > and >=
+// precedence 9: == and !=
+// precedence 10: bitwise AND
+// precedence 11: bitwise XOR
+// precedence 12: bitwise OR
+// precedence 13: logical AND
+// disabled
+// precedence 14: logical OR
+// disabled
+// precedence 15: ternary conditional
+// disabled
+// precedence 16: = and OP= operators
+// precedence 17: throw operator
+// not supported
+// precedence 18: comma
+// not supported
+
+namespace op {
+
+#define BOOST_TEST_FOR_EACH_COMP_OP(action) \
+ action( < , LT, >= ) \
+ action( <=, LE, > ) \
+ action( > , GT, <= ) \
+ action( >=, GE, < ) \
+ action( ==, EQ, != ) \
+ action( !=, NE, == ) \
+/**/
+
+//____________________________________________________________________________//
+
+#ifndef BOOST_NO_CXX11_DECLTYPE
+
+#define BOOST_TEST_FOR_EACH_CONST_OP(action)\
+ action(->*, MEMP, ->* ) \
+ \
+ action( * , MUL, * ) \
+ action( / , DIV, / ) \
+ action( % , MOD, % ) \
+ \
+ action( + , ADD, + ) \
+ action( - , SUB, - ) \
+ \
+ action( <<, LSH, << ) \
+ action( >>, RSH, >> ) \
+ \
+ BOOST_TEST_FOR_EACH_COMP_OP(action) \
+ \
+ action( & , BAND, & ) \
+ action( ^ , XOR, ^ ) \
+ action( | , BOR, | ) \
+/**/
+
+#else
+
+#define BOOST_TEST_FOR_EACH_CONST_OP(action)\
+ BOOST_TEST_FOR_EACH_COMP_OP(action) \
+/**/
+
+#endif
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_FOR_EACH_MUT_OP(action) \
+ action( = , SET , = ) \
+ action( +=, IADD, += ) \
+ action( -=, ISUB, -= ) \
+ action( *=, IMUL, *= ) \
+ action( /=, IDIV, /= ) \
+ action( %=, IMOD, %= ) \
+ action(<<=, ILSH, <<=) \
+ action(>>=, IRSH, >>=) \
+ action( &=, IAND, &= ) \
+ action( ^=, IXOR, ^= ) \
+ action( |=, IOR , |= ) \
+/**/
+
+//____________________________________________________________________________//
+
+#ifndef BOOST_NO_CXX11_DECLTYPE
+# define DEDUCE_RESULT_TYPE( oper ) \
+ decltype(boost::declval<Lhs>() oper boost::declval<Rhs>() ) optype; \
+ typedef typename boost::remove_reference<optype>::type \
+/**/
+#else
+# define DEDUCE_RESULT_TYPE( oper ) bool
+#endif
+
+#define DEFINE_CONST_OPER( oper, name, rev ) \
+template<typename Lhs, typename Rhs, \
+ typename Enabler=void> \
+struct name { \
+ typedef DEDUCE_RESULT_TYPE( oper ) result_type; \
+ \
+ static result_type \
+ eval( Lhs const& lhs, Rhs const& rhs ) \
+ { \
+ return lhs oper rhs; \
+ } \
+ \
+ template<typename PrevExprType> \
+ static void \
+ report( std::ostream& ostr, \
+ PrevExprType const& lhs, \
+ Rhs const& rhs) \
+ { \
+ lhs.report( ostr ); \
+ ostr << revert() \
+ << tt_detail::print_helper( rhs ); \
+ } \
+ \
+ static char const* revert() \
+ { return " " #rev " "; } \
+}; \
+/**/
+
+BOOST_TEST_FOR_EACH_CONST_OP( DEFINE_CONST_OPER )
+
+#undef DEDUCE_RESULT_TYPE
+#undef DEFINE_CONST_OPER
+
+//____________________________________________________________________________//
+
+} // namespace op
+
+// ************************************************************************** //
+// ************** assertion::expression_base ************** //
+// ************************************************************************** //
+// Defines expression operators
+
+template<typename Lhs, typename Rhs, typename OP> class binary_expr;
+
+template<typename ExprType,typename ValType>
+class expression_base {
+public:
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template<typename T>
+ struct RhsT : remove_const<typename remove_reference<T>::type> {};
+
+#define ADD_OP_SUPPORT( oper, name, _ ) \
+ template<typename T> \
+ binary_expr<ExprType,T, \
+ op::name<ValType,typename RhsT<T>::type> > \
+ operator oper( T&& rhs ) \
+ { \
+ return binary_expr<ExprType,T, \
+ op::name<ValType,typename RhsT<T>::type> > \
+ ( std::forward<ExprType>( \
+ *static_cast<ExprType*>(this) ), \
+ std::forward<T>(rhs) ); \
+ } \
+/**/
+#else
+
+#define ADD_OP_SUPPORT( oper, name, _ ) \
+ template<typename T> \
+ binary_expr<ExprType,typename boost::decay<T const>::type, \
+ op::name<ValType,typename boost::decay<T const>::type> >\
+ operator oper( T const& rhs ) const \
+ { \
+ typedef typename boost::decay<T const>::type Rhs; \
+ return binary_expr<ExprType,Rhs,op::name<ValType,Rhs> > \
+ ( *static_cast<ExprType const*>(this), \
+ rhs ); \
+ } \
+/**/
+#endif
+
+ BOOST_TEST_FOR_EACH_CONST_OP( ADD_OP_SUPPORT )
+ #undef ADD_OP_SUPPORT
+
+#ifndef BOOST_NO_CXX11_AUTO_DECLARATIONS
+ // Disabled operators
+ template<typename T>
+ ExprType&
+ operator ||( T const& /*rhs*/ )
+ {
+ BOOST_MPL_ASSERT_MSG(false, CANT_USE_LOGICAL_OPERATOR_OR_WITHIN_THIS_TESTING_TOOL, () );
+
+ return *static_cast<ExprType*>(this);
+ }
+
+ template<typename T>
+ ExprType&
+ operator &&( T const& /*rhs*/ )
+ {
+ BOOST_MPL_ASSERT_MSG(false, CANT_USE_LOGICAL_OPERATOR_AND_WITHIN_THIS_TESTING_TOOL, () );
+
+ return *static_cast<ExprType*>(this);
+ }
+
+ operator bool()
+ {
+ BOOST_MPL_ASSERT_MSG(false, CANT_USE_TERNARY_OPERATOR_WITHIN_THIS_TESTING_TOOL, () );
+
+ return false;
+ }
+#endif
+};
+
+// ************************************************************************** //
+// ************** assertion::value_expr ************** //
+// ************************************************************************** //
+// simple value expression
+
+template<typename T>
+class value_expr : public expression_base<value_expr<T>,typename remove_const<typename remove_reference<T>::type>::type> {
+public:
+ // Public types
+ typedef T result_type;
+
+ // Constructor
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ value_expr( value_expr&& ve )
+ : m_value( std::forward<T>(ve.m_value) )
+ {}
+ explicit value_expr( T&& val )
+ : m_value( std::forward<T>(val) )
+ {}
+#else
+ explicit value_expr( T const& val )
+ : m_value( val )
+ {}
+#endif
+
+ // Specific expression interface
+ T const& value() const
+ {
+ return m_value;
+ }
+ void report( std::ostream& ostr ) const
+ {
+ ostr << tt_detail::print_helper( value() );
+ }
+
+ // Mutating operators
+#define ADD_OP_SUPPORT( OPER, ID, _ ) \
+ template<typename U> \
+ value_expr<T>& \
+ operator OPER( U const& rhs ) \
+ { \
+ m_value OPER rhs; \
+ \
+ return *this; \
+ } \
+/**/
+
+ BOOST_TEST_FOR_EACH_MUT_OP( ADD_OP_SUPPORT )
+#undef ADD_OP_SUPPORT
+
+ // expression interface
+ assertion_result evaluate( bool no_message = false ) const
+ {
+ assertion_result res( value() );
+ if( no_message || res )
+ return res;
+
+ format_message( res.message(), value() );
+
+ return tt_detail::format_assertion_result( "", res.message().str() );
+ }
+
+private:
+ template<typename U>
+ static void format_message( wrap_stringstream& ostr, U const& v )
+ {
+ ostr << "['" << tt_detail::print_helper(v) << "' evaluates to false]";
+ }
+ static void format_message( wrap_stringstream& /*ostr*/, bool /*v*/ ) {}
+ static void format_message( wrap_stringstream& /*ostr*/, assertion_result const& /*v*/ ) {}
+
+ // Data members
+ T m_value;
+};
+
+// ************************************************************************** //
+// ************** assertion::binary_expr ************** //
+// ************************************************************************** //
+// binary expression
+
+template<typename LExpr, typename Rhs, typename OP>
+class binary_expr : public expression_base<binary_expr<LExpr,Rhs,OP>,typename OP::result_type> {
+public:
+ // Public types
+ typedef typename OP::result_type result_type;
+
+ // Constructor
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ binary_expr( binary_expr&& be )
+ : m_lhs( std::forward<LExpr>(be.m_lhs) )
+ , m_rhs( std::forward<Rhs>(be.m_rhs) )
+ {}
+ binary_expr( LExpr&& lhs, Rhs&& rhs )
+ : m_lhs( std::forward<LExpr>(lhs) )
+ , m_rhs( std::forward<Rhs>(rhs) )
+ {}
+#else
+ binary_expr( LExpr const& lhs, Rhs const& rhs )
+ : m_lhs( lhs )
+ , m_rhs( rhs )
+ {}
+#endif
+
+ // Specific expression interface
+ result_type value() const
+ {
+ return OP::eval( m_lhs.value(), m_rhs );
+ }
+ void report( std::ostream& ostr ) const
+ {
+ return OP::report( ostr, m_lhs, m_rhs );
+ }
+
+ assertion_result evaluate( bool no_message = false ) const
+ {
+ assertion_result const expr_res( value() );
+ if( no_message || expr_res )
+ return expr_res;
+
+ wrap_stringstream buff;
+ report( buff.stream() );
+
+ return tt_detail::format_assertion_result( buff.stream().str(), expr_res.message() );
+ }
+
+ // To support custom manipulators
+ LExpr const& lhs() const { return m_lhs; }
+ Rhs const& rhs() const { return m_rhs; }
+private:
+ // Data members
+ LExpr m_lhs;
+ Rhs m_rhs;
+};
+
+// ************************************************************************** //
+// ************** assertion::seed ************** //
+// ************************************************************************** //
+// seed added ot the input expression to form an assertion expression
+
+class seed {
+public:
+ // ->* is highest precedence left to right operator
+ template<typename T>
+ value_expr<T>
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ operator->*( T&& v ) const
+ {
+ return value_expr<T>( std::forward<T>( v ) );
+ }
+#else
+ operator->*( T const& v ) const
+ {
+ return value_expr<T>( v );
+ }
+#endif
+};
+
+#undef BOOST_TEST_FOR_EACH_CONST_OP
+
+} // namespace assertion
+} // namespace test_tools
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TOOLS_ASSERTION_HPP_100911GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/assertion_result.hpp b/src/third_party/boost-1.69.0/boost/test/tools/assertion_result.hpp
index 85eea741f74..85eea741f74 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/assertion_result.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/assertion_result.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/collection_comparison_op.hpp b/src/third_party/boost-1.69.0/boost/test/tools/collection_comparison_op.hpp
new file mode 100644
index 00000000000..ff3b3761319
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tools/collection_comparison_op.hpp
@@ -0,0 +1,450 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief Collection comparison with enhanced reporting
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TOOLS_COLLECTION_COMPARISON_OP_HPP_050815GER
+#define BOOST_TEST_TOOLS_COLLECTION_COMPARISON_OP_HPP_050815GER
+
+// Boost.Test
+#include <boost/test/tools/assertion.hpp>
+
+#include <boost/test/utils/is_forward_iterable.hpp>
+#include <boost/test/utils/is_cstring.hpp>
+
+// Boost
+#include <boost/mpl/bool.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/utility/enable_if.hpp>
+#include <boost/type_traits/decay.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace test_tools {
+namespace assertion {
+
+// ************************************************************************** //
+// ************* selectors for specialized comparizon routines ************** //
+// ************************************************************************** //
+
+template<typename T>
+struct specialized_compare : public mpl::false_ {};
+
+template <typename T>
+struct is_c_array : public mpl::false_ {};
+
+template<typename T, std::size_t N>
+struct is_c_array<T [N]> : public mpl::true_ {};
+
+template<typename T, std::size_t N>
+struct is_c_array<T (&)[N]> : public mpl::true_ {};
+
+#define BOOST_TEST_SPECIALIZED_COLLECTION_COMPARE(Col) \
+namespace boost { namespace test_tools { namespace assertion { \
+template<> \
+struct specialized_compare<Col> : public mpl::true_ {}; \
+}}} \
+/**/
+
+// ************************************************************************** //
+// ************** lexicographic_compare ************** //
+// ************************************************************************** //
+
+namespace op {
+
+template <typename OP, bool can_be_equal, bool prefer_shorter,
+ typename Lhs, typename Rhs>
+inline
+typename boost::enable_if_c<
+ unit_test::is_forward_iterable<Lhs>::value && !unit_test::is_cstring<Lhs>::value
+ && unit_test::is_forward_iterable<Rhs>::value && !unit_test::is_cstring<Rhs>::value,
+ assertion_result>::type
+lexicographic_compare( Lhs const& lhs, Rhs const& rhs )
+{
+ assertion_result ar( true );
+
+ typedef unit_test::bt_iterator_traits<Lhs> t_Lhs_iterator;
+ typedef unit_test::bt_iterator_traits<Rhs> t_Rhs_iterator;
+
+ typename t_Lhs_iterator::const_iterator first1 = t_Lhs_iterator::begin(lhs);
+ typename t_Rhs_iterator::const_iterator first2 = t_Rhs_iterator::begin(rhs);
+ typename t_Lhs_iterator::const_iterator last1 = t_Lhs_iterator::end(lhs);
+ typename t_Rhs_iterator::const_iterator last2 = t_Rhs_iterator::end(rhs);
+ std::size_t pos = 0;
+
+ for( ; (first1 != last1) && (first2 != last2); ++first1, ++first2, ++pos ) {
+ assertion_result const& element_ar = OP::eval(*first1, *first2);
+ if( !can_be_equal && element_ar )
+ return ar; // a < b
+
+ assertion_result const& reverse_ar = OP::eval(*first2, *first1);
+ if( element_ar && !reverse_ar )
+ return ar; // a<=b and !(b<=a) => a < b => return true
+
+ if( element_ar || !reverse_ar )
+ continue; // (a<=b and b<=a) or (!(a<b) and !(b<a)) => a == b => keep looking
+
+ // !(a<=b) and b<=a => b < a => return false
+ ar = false;
+ ar.message() << "\nFailure at position " << pos << ": "
+ << tt_detail::print_helper(*first1)
+ << OP::revert()
+ << tt_detail::print_helper(*first2)
+ << ". " << element_ar.message();
+ return ar;
+ }
+
+ if( first1 != last1 ) {
+ if( prefer_shorter ) {
+ ar = false;
+ ar.message() << "\nFirst collection has extra trailing elements.";
+ }
+ }
+ else if( first2 != last2 ) {
+ if( !prefer_shorter ) {
+ ar = false;
+ ar.message() << "\nSecond collection has extra trailing elements.";
+ }
+ }
+ else if( !can_be_equal ) {
+ ar = false;
+ ar.message() << "\nCollections appear to be equal.";
+ }
+
+ return ar;
+}
+
+template <typename OP, bool can_be_equal, bool prefer_shorter,
+ typename Lhs, typename Rhs>
+inline
+typename boost::enable_if_c<
+ (unit_test::is_cstring<Lhs>::value || unit_test::is_cstring<Rhs>::value),
+ assertion_result>::type
+lexicographic_compare( Lhs const& lhs, Rhs const& rhs )
+{
+ typedef typename unit_test::deduce_cstring<Lhs>::type lhs_char_type;
+ typedef typename unit_test::deduce_cstring<Rhs>::type rhs_char_type;
+
+ return lexicographic_compare<OP, can_be_equal, prefer_shorter>(
+ lhs_char_type(lhs),
+ rhs_char_type(rhs));
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** equality_compare ************** //
+// ************************************************************************** //
+
+template <typename OP, typename Lhs, typename Rhs>
+inline
+typename boost::enable_if_c<
+ unit_test::is_forward_iterable<Lhs>::value && !unit_test::is_cstring<Lhs>::value
+ && unit_test::is_forward_iterable<Rhs>::value && !unit_test::is_cstring<Rhs>::value,
+ assertion_result>::type
+element_compare( Lhs const& lhs, Rhs const& rhs )
+{
+ typedef unit_test::bt_iterator_traits<Lhs> t_Lhs_iterator;
+ typedef unit_test::bt_iterator_traits<Rhs> t_Rhs_iterator;
+
+ assertion_result ar( true );
+
+ if( t_Lhs_iterator::size(lhs) != t_Rhs_iterator::size(rhs) ) {
+ ar = false;
+ ar.message() << "\nCollections size mismatch: " << t_Lhs_iterator::size(lhs) << " != " << t_Rhs_iterator::size(rhs);
+ return ar;
+ }
+
+ typename t_Lhs_iterator::const_iterator left = t_Lhs_iterator::begin(lhs);
+ typename t_Rhs_iterator::const_iterator right = t_Rhs_iterator::begin(rhs);
+ std::size_t pos = 0;
+
+ for( ; pos < t_Lhs_iterator::size(lhs); ++left, ++right, ++pos ) {
+ assertion_result const element_ar = OP::eval( *left, *right );
+ if( element_ar )
+ continue;
+
+ ar = false;
+ ar.message() << "\nMismatch at position " << pos << ": "
+ << tt_detail::print_helper(*left)
+ << OP::revert()
+ << tt_detail::print_helper(*right)
+ << ". " << element_ar.message();
+ }
+
+ return ar;
+}
+
+// In case string comparison is branching here
+template <typename OP, typename Lhs, typename Rhs>
+inline
+typename boost::enable_if_c<
+ (unit_test::is_cstring<Lhs>::value || unit_test::is_cstring<Rhs>::value),
+ assertion_result>::type
+element_compare( Lhs const& lhs, Rhs const& rhs )
+{
+ typedef typename unit_test::deduce_cstring<Lhs>::type lhs_char_type;
+ typedef typename unit_test::deduce_cstring<Rhs>::type rhs_char_type;
+
+ return element_compare<OP>(lhs_char_type(lhs),
+ rhs_char_type(rhs));
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** non_equality_compare ************** //
+// ************************************************************************** //
+
+template <typename OP, typename Lhs, typename Rhs>
+inline assertion_result
+non_equality_compare( Lhs const& lhs, Rhs const& rhs )
+{
+ typedef unit_test::bt_iterator_traits<Lhs> t_Lhs_iterator;
+ typedef unit_test::bt_iterator_traits<Rhs> t_Rhs_iterator;
+
+ assertion_result ar( true );
+
+ if( t_Lhs_iterator::size(lhs) != t_Rhs_iterator::size(rhs) )
+ return ar;
+
+ typename t_Lhs_iterator::const_iterator left = t_Lhs_iterator::begin(lhs);
+ typename t_Rhs_iterator::const_iterator right = t_Rhs_iterator::begin(rhs);
+ typename t_Lhs_iterator::const_iterator end = t_Lhs_iterator::end(lhs);
+
+ for( ; left != end; ++left, ++right ) {
+ if( OP::eval( *left, *right ) )
+ return ar;
+ }
+
+ ar = false;
+ ar.message() << "\nCollections appear to be equal";
+
+ return ar;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** cctraits ************** //
+// ************************************************************************** //
+// set of collection comparison traits per comparison OP
+
+template<typename OP>
+struct cctraits;
+
+template<typename Lhs, typename Rhs>
+struct cctraits<op::EQ<Lhs, Rhs> > {
+ typedef specialized_compare<Lhs> is_specialized;
+};
+
+template<typename Lhs, typename Rhs>
+struct cctraits<op::NE<Lhs, Rhs> > {
+ typedef specialized_compare<Lhs> is_specialized;
+};
+
+template<typename Lhs, typename Rhs>
+struct cctraits<op::LT<Lhs, Rhs> > {
+ static const bool can_be_equal = false;
+ static const bool prefer_short = true;
+
+ typedef specialized_compare<Lhs> is_specialized;
+};
+
+template<typename Lhs, typename Rhs>
+struct cctraits<op::LE<Lhs, Rhs> > {
+ static const bool can_be_equal = true;
+ static const bool prefer_short = true;
+
+ typedef specialized_compare<Lhs> is_specialized;
+};
+
+template<typename Lhs, typename Rhs>
+struct cctraits<op::GT<Lhs, Rhs> > {
+ static const bool can_be_equal = false;
+ static const bool prefer_short = false;
+
+ typedef specialized_compare<Lhs> is_specialized;
+};
+
+template<typename Lhs, typename Rhs>
+struct cctraits<op::GE<Lhs, Rhs> > {
+ static const bool can_be_equal = true;
+ static const bool prefer_short = false;
+
+ typedef specialized_compare<Lhs> is_specialized;
+};
+
+// ************************************************************************** //
+// ************** compare_collections ************** //
+// ************************************************************************** //
+// Overloaded set of functions dispatching to specific implementation of comparison
+
+template <typename Lhs, typename Rhs, typename L, typename R>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::EQ<L, R> >*, mpl::true_ )
+{
+ return assertion::op::element_compare<op::EQ<L, R> >( lhs, rhs );
+}
+
+//____________________________________________________________________________//
+
+template <typename Lhs, typename Rhs, typename L, typename R>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::EQ<L, R> >*, mpl::false_ )
+{
+ return lhs == rhs;
+}
+
+//____________________________________________________________________________//
+
+template <typename Lhs, typename Rhs, typename L, typename R>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::NE<L, R> >*, mpl::true_ )
+{
+ return assertion::op::non_equality_compare<op::NE<L, R> >( lhs, rhs );
+}
+
+//____________________________________________________________________________//
+
+template <typename Lhs, typename Rhs, typename L, typename R>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::NE<L, R> >*, mpl::false_ )
+{
+ return lhs != rhs;
+}
+
+//____________________________________________________________________________//
+
+template <typename OP, typename Lhs, typename Rhs>
+inline assertion_result
+lexicographic_compare( Lhs const& lhs, Rhs const& rhs )
+{
+ return assertion::op::lexicographic_compare<OP, cctraits<OP>::can_be_equal, cctraits<OP>::prefer_short>( lhs, rhs );
+}
+
+//____________________________________________________________________________//
+
+template <typename Lhs, typename Rhs, typename OP>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<OP>*, mpl::true_ )
+{
+ return lexicographic_compare<OP>( lhs, rhs );
+}
+
+//____________________________________________________________________________//
+
+template <typename Lhs, typename Rhs, typename L, typename R>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::LT<L, R> >*, mpl::false_ )
+{
+ return lhs < rhs;
+}
+
+//____________________________________________________________________________//
+
+template <typename Lhs, typename Rhs, typename L, typename R>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::LE<L, R> >*, mpl::false_ )
+{
+ return lhs <= rhs;
+}
+
+//____________________________________________________________________________//
+
+template <typename Lhs, typename Rhs, typename L, typename R>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::GT<L, R> >*, mpl::false_ )
+{
+ return lhs > rhs;
+}
+
+//____________________________________________________________________________//
+
+template <typename Lhs, typename Rhs, typename L, typename R>
+inline assertion_result
+compare_collections( Lhs const& lhs, Rhs const& rhs, boost::type<op::GE<L, R> >*, mpl::false_ )
+{
+ return lhs >= rhs;
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ********* specialization of comparison operators for collections ********* //
+// ************************************************************************** //
+
+#define DEFINE_COLLECTION_COMPARISON( oper, name, rev ) \
+template<typename Lhs,typename Rhs> \
+struct name<Lhs,Rhs,typename boost::enable_if_c< \
+ unit_test::is_forward_iterable<Lhs>::value \
+ && !unit_test::is_cstring_comparable<Lhs>::value \
+ && unit_test::is_forward_iterable<Rhs>::value \
+ && !unit_test::is_cstring_comparable<Rhs>::value>::type> { \
+public: \
+ typedef assertion_result result_type; \
+ typedef unit_test::bt_iterator_traits<Lhs> t_Lhs_iterator_helper; \
+ typedef unit_test::bt_iterator_traits<Rhs> t_Rhs_iterator_helper; \
+ \
+ typedef name<Lhs, Rhs> OP; \
+ \
+ typedef typename \
+ mpl::if_c< \
+ mpl::or_< \
+ typename is_c_array<Lhs>::type, \
+ typename is_c_array<Rhs>::type \
+ >::value, \
+ mpl::true_, \
+ typename \
+ mpl::if_c<is_same<typename decay<Lhs>::type, \
+ typename decay<Rhs>::type>::value, \
+ typename cctraits<OP>::is_specialized, \
+ mpl::false_>::type \
+ >::type is_specialized; \
+ \
+ typedef name<typename t_Lhs_iterator_helper::value_type, \
+ typename t_Rhs_iterator_helper::value_type \
+ > elem_op; \
+ \
+ static assertion_result \
+ eval( Lhs const& lhs, Rhs const& rhs) \
+ { \
+ return assertion::op::compare_collections( lhs, rhs, \
+ (boost::type<elem_op>*)0, \
+ is_specialized() ); \
+ } \
+ \
+ template<typename PrevExprType> \
+ static void \
+ report( std::ostream&, \
+ PrevExprType const&, \
+ Rhs const& ) {} \
+ \
+ static char const* revert() \
+ { return " " #rev " "; } \
+ \
+}; \
+/**/
+
+BOOST_TEST_FOR_EACH_COMP_OP( DEFINE_COLLECTION_COMPARISON )
+#undef DEFINE_COLLECTION_COMPARISON
+
+//____________________________________________________________________________//
+
+} // namespace op
+} // namespace assertion
+} // namespace test_tools
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TOOLS_COLLECTION_COMPARISON_OP_HPP_050815GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/context.hpp b/src/third_party/boost-1.69.0/boost/test/tools/context.hpp
index 71650065ef4..71650065ef4 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/context.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/context.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/cstring_comparison_op.hpp b/src/third_party/boost-1.69.0/boost/test/tools/cstring_comparison_op.hpp
index 50f181d8581..50f181d8581 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/cstring_comparison_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/cstring_comparison_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/bitwise_manip.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/bitwise_manip.hpp
index f8c9685c107..f8c9685c107 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/bitwise_manip.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/bitwise_manip.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/expression_holder.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/expression_holder.hpp
index 694a2d5f4ec..694a2d5f4ec 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/expression_holder.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/expression_holder.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/fwd.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/fwd.hpp
index 339ab39eda8..339ab39eda8 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/indirections.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/indirections.hpp
index 836218d98d8..836218d98d8 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/indirections.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/indirections.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/it_pair.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/it_pair.hpp
index 4352fd464ff..4352fd464ff 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/it_pair.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/it_pair.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/lexicographic_manip.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/lexicographic_manip.hpp
index f6ffff7a34c..f6ffff7a34c 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/lexicographic_manip.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/lexicographic_manip.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/per_element_manip.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/per_element_manip.hpp
index 4a9aebbaaac..4a9aebbaaac 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/per_element_manip.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/per_element_manip.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/detail/print_helper.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/print_helper.hpp
new file mode 100644
index 00000000000..232fad1509b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/print_helper.hpp
@@ -0,0 +1,248 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision: 74248 $
+//
+// Description : defines level of indiration facilitating workarounds for non printable types
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TOOLS_IMPL_COMMON_HPP_012705GER
+#define BOOST_TEST_TOOLS_IMPL_COMMON_HPP_012705GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/workaround.hpp>
+
+// Boost
+#include <boost/mpl/or.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/is_abstract.hpp>
+#include <boost/type_traits/has_left_shift.hpp>
+
+#include <ios>
+#include <iostream>
+#include <limits>
+
+#if !defined(BOOST_NO_CXX11_NULLPTR)
+#include <cstddef>
+#endif
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace test_tools {
+namespace tt_detail {
+
+// ************************************************************************** //
+// ************** boost_test_print_type ************** //
+// ************************************************************************** //
+
+ namespace impl {
+ template <class T>
+ std::ostream& boost_test_print_type(std::ostream& ostr, T const& t) {
+ BOOST_STATIC_ASSERT_MSG( (boost::has_left_shift<std::ostream,T>::value),
+ "Type has to implement operator<< to be printable");
+ ostr << t;
+ return ostr;
+ }
+
+ struct boost_test_print_type_impl {
+ template <class R>
+ std::ostream& operator()(std::ostream& ostr, R const& r) const {
+ return boost_test_print_type(ostr, r);
+ }
+ };
+ }
+
+ // To avoid ODR violations, see N4381
+ template <class T> struct static_const { static const T value; };
+ template <class T> const T static_const<T>::value = T();
+
+ namespace {
+ static const impl::boost_test_print_type_impl& boost_test_print_type =
+ static_const<impl::boost_test_print_type_impl>::value;
+ }
+
+
+// ************************************************************************** //
+// ************** print_log_value ************** //
+// ************************************************************************** //
+
+template<typename T>
+struct print_log_value {
+ void operator()( std::ostream& ostr, T const& t )
+ {
+ typedef typename mpl::or_<is_array<T>,is_function<T>,is_abstract<T> >::type cant_use_nl;
+
+ std::streamsize old_precision = set_precision( ostr, cant_use_nl() );
+
+ //ostr << t;
+ using boost::test_tools::tt_detail::boost_test_print_type;
+ boost_test_print_type(ostr, t);
+
+ if( old_precision != (std::streamsize)-1 )
+ ostr.precision( old_precision );
+ }
+
+ std::streamsize set_precision( std::ostream& ostr, mpl::false_ )
+ {
+ if( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 2 )
+ return ostr.precision( 2 + std::numeric_limits<T>::digits * 301/1000 );
+ else if ( std::numeric_limits<T>::is_specialized && std::numeric_limits<T>::radix == 10 ) {
+#ifdef BOOST_NO_CXX11_NUMERIC_LIMITS
+ // (was BOOST_NO_NUMERIC_LIMITS_LOWEST but now deprecated).
+ // No support for std::numeric_limits<double>::max_digits10,
+ // so guess that a couple of guard digits more than digits10 will display any difference.
+ return ostr.precision( 2 + std::numeric_limits<T>::digits10 );
+#else
+ // std::numeric_limits<double>::max_digits10; IS supported.
+ // Any noisy or guard digits needed to display any difference are included in max_digits10.
+ return ostr.precision( std::numeric_limits<T>::max_digits10 );
+#endif
+ }
+ // else if T is not specialized for std::numeric_limits<>,
+ // then will just get the default precision of 6 digits.
+ return (std::streamsize)-1;
+ }
+
+ std::streamsize set_precision( std::ostream&, mpl::true_ ) { return (std::streamsize)-1; }
+};
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+template<typename T, std::size_t N >
+struct print_log_value< T[N] > {
+ void operator()( std::ostream& ostr, T const* t )
+ {
+ ostr << t;
+ }
+};
+#endif
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<bool> {
+ void operator()( std::ostream& ostr, bool t );
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<char> {
+ void operator()( std::ostream& ostr, char t );
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<unsigned char> {
+ void operator()( std::ostream& ostr, unsigned char t );
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<char const*> {
+ void operator()( std::ostream& ostr, char const* t );
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct BOOST_TEST_DECL print_log_value<wchar_t const*> {
+ void operator()( std::ostream& ostr, wchar_t const* t );
+};
+
+#if !defined(BOOST_NO_CXX11_NULLPTR)
+template<>
+struct print_log_value<std::nullptr_t> {
+ // declaration and definition is here because of #12969 https://svn.boost.org/trac10/ticket/12969
+ void operator()( std::ostream& ostr, std::nullptr_t /*t*/ ) {
+ ostr << "nullptr";
+ }
+};
+#endif
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** print_helper ************** //
+// ************************************************************************** //
+// Adds level of indirection to the output operation, allowing us to customize
+// it for types that do not support operator << directly or for any other reason
+
+template<typename T>
+struct print_helper_t {
+ explicit print_helper_t( T const& t ) : m_t( t ) {}
+
+ T const& m_t;
+};
+
+//____________________________________________________________________________//
+
+#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
+// Borland suffers premature pointer decay passing arrays by reference
+template<typename T, std::size_t N >
+struct print_helper_t< T[N] > {
+ explicit print_helper_t( T const * t ) : m_t( t ) {}
+
+ T const * m_t;
+};
+#endif
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline print_helper_t<T>
+print_helper( T const& t )
+{
+ return print_helper_t<T>( t );
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline std::ostream&
+operator<<( std::ostream& ostr, print_helper_t<T> const& ph )
+{
+ print_log_value<T>()( ostr, ph.m_t );
+
+ return ostr;
+}
+
+//____________________________________________________________________________//
+
+} // namespace tt_detail
+
+// ************************************************************************** //
+// ************** BOOST_TEST_DONT_PRINT_LOG_VALUE ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_DONT_PRINT_LOG_VALUE( the_type ) \
+namespace boost{ namespace test_tools{ namespace tt_detail{ \
+template<> \
+struct print_log_value<the_type > { \
+ void operator()( std::ostream&, the_type const& ) {} \
+}; \
+}}} \
+/**/
+
+} // namespace test_tools
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TOOLS_IMPL_COMMON_HPP_012705GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/detail/tolerance_manip.hpp b/src/third_party/boost-1.69.0/boost/test/tools/detail/tolerance_manip.hpp
index e07b0435913..e07b0435913 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/detail/tolerance_manip.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/detail/tolerance_manip.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/floating_point_comparison.hpp b/src/third_party/boost-1.69.0/boost/test/tools/floating_point_comparison.hpp
new file mode 100644
index 00000000000..810840e3459
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tools/floating_point_comparison.hpp
@@ -0,0 +1,317 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief algorithms for comparing floating point values
+// ***************************************************************************
+
+#ifndef BOOST_TEST_FLOATING_POINT_COMPARISON_HPP_071894GER
+#define BOOST_TEST_FLOATING_POINT_COMPARISON_HPP_071894GER
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/tools/assertion_result.hpp>
+
+// Boost
+#include <boost/limits.hpp> // for std::numeric_limits
+#include <boost/static_assert.hpp>
+#include <boost/assert.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/utility/enable_if.hpp>
+
+// STL
+#include <iosfwd>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace math {
+namespace fpc {
+
+// ************************************************************************** //
+// ************** fpc::tolerance_based ************** //
+// ************************************************************************** //
+
+
+//! @internal
+//! Protects the instanciation of std::numeric_limits from non-supported types (eg. T=array)
+template <typename T, bool enabled>
+struct tolerance_based_delegate;
+
+template <typename T>
+struct tolerance_based_delegate<T, false> : mpl::false_ {};
+
+template <typename T>
+struct tolerance_based_delegate<T, true>
+: mpl::bool_<
+ is_floating_point<T>::value ||
+ (!std::numeric_limits<T>::is_integer && std::numeric_limits<T>::is_specialized && !std::numeric_limits<T>::is_exact)>
+{};
+
+
+/*!@brief Indicates if a type can be compared using a tolerance scheme
+ *
+ * This is a metafunction that should evaluate to @c mpl::true_ if the type
+ * @c T can be compared using a tolerance based method, typically for floating point
+ * types.
+ *
+ * This metafunction can be specialized further to declare user types that are
+ * floating point (eg. boost.multiprecision).
+ */
+template <typename T>
+struct tolerance_based : tolerance_based_delegate<T, !is_array<T>::value >::type {};
+
+// ************************************************************************** //
+// ************** fpc::strength ************** //
+// ************************************************************************** //
+
+//! Method for comparing floating point numbers
+enum strength {
+ FPC_STRONG, //!< "Very close" - equation 2' in docs, the default
+ FPC_WEAK //!< "Close enough" - equation 3' in docs.
+};
+
+
+// ************************************************************************** //
+// ************** tolerance presentation types ************** //
+// ************************************************************************** //
+
+template<typename FPT>
+struct percent_tolerance_t {
+ explicit percent_tolerance_t( FPT v ) : m_value( v ) {}
+
+ FPT m_value;
+};
+
+//____________________________________________________________________________//
+
+template<typename FPT>
+inline std::ostream& operator<<( std::ostream& out, percent_tolerance_t<FPT> t )
+{
+ return out << t.m_value;
+}
+
+//____________________________________________________________________________//
+
+template<typename FPT>
+inline percent_tolerance_t<FPT>
+percent_tolerance( FPT v )
+{
+ return percent_tolerance_t<FPT>( v );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** details ************** //
+// ************************************************************************** //
+
+namespace fpc_detail {
+
+// FPT is Floating-Point Type: float, double, long double or User-Defined.
+template<typename FPT>
+inline FPT
+fpt_abs( FPT fpv )
+{
+ return fpv < static_cast<FPT>(0) ? -fpv : fpv;
+}
+
+//____________________________________________________________________________//
+
+template<typename FPT>
+struct fpt_specialized_limits
+{
+ static FPT min_value() { return (std::numeric_limits<FPT>::min)(); }
+ static FPT max_value() { return (std::numeric_limits<FPT>::max)(); }
+};
+
+template<typename FPT>
+struct fpt_non_specialized_limits
+{
+ static FPT min_value() { return static_cast<FPT>(0); }
+ static FPT max_value() { return static_cast<FPT>(1000000); } // for our purposes it doesn't really matter what value is returned here
+};
+
+template<typename FPT>
+struct fpt_limits : boost::conditional<std::numeric_limits<FPT>::is_specialized,
+ fpt_specialized_limits<FPT>,
+ fpt_non_specialized_limits<FPT>
+ >::type
+{};
+
+//____________________________________________________________________________//
+
+// both f1 and f2 are unsigned here
+template<typename FPT>
+inline FPT
+safe_fpt_division( FPT f1, FPT f2 )
+{
+ // Avoid overflow.
+ if( (f2 < static_cast<FPT>(1)) && (f1 > f2*fpt_limits<FPT>::max_value()) )
+ return fpt_limits<FPT>::max_value();
+
+ // Avoid underflow.
+ if( (f1 == static_cast<FPT>(0)) ||
+ ((f2 > static_cast<FPT>(1)) && (f1 < f2*fpt_limits<FPT>::min_value())) )
+ return static_cast<FPT>(0);
+
+ return f1/f2;
+}
+
+//____________________________________________________________________________//
+
+template<typename FPT, typename ToleranceType>
+inline FPT
+fraction_tolerance( ToleranceType tolerance )
+{
+ return static_cast<FPT>(tolerance);
+}
+
+//____________________________________________________________________________//
+
+template<typename FPT2, typename FPT>
+inline FPT2
+fraction_tolerance( percent_tolerance_t<FPT> tolerance )
+{
+ return FPT2(tolerance.m_value)*FPT2(0.01);
+}
+
+//____________________________________________________________________________//
+
+} // namespace fpc_detail
+
+// ************************************************************************** //
+// ************** close_at_tolerance ************** //
+// ************************************************************************** //
+
+
+/*!@brief Predicate for comparing floating point numbers
+ *
+ * This predicate is used to compare floating point numbers. In addition the comparison produces maximum
+ * related difference, which can be used to generate detailed error message
+ * The methods for comparing floating points are detailed in the documentation. The method is chosen
+ * by the @ref boost::math::fpc::strength given at construction.
+ *
+ * This predicate is not suitable for comparing to 0 or to infinity.
+ */
+template<typename FPT>
+class close_at_tolerance {
+public:
+ // Public typedefs
+ typedef bool result_type;
+
+ // Constructor
+ template<typename ToleranceType>
+ explicit close_at_tolerance( ToleranceType tolerance, fpc::strength fpc_strength = FPC_STRONG )
+ : m_fraction_tolerance( fpc_detail::fraction_tolerance<FPT>( tolerance ) )
+ , m_strength( fpc_strength )
+ , m_tested_rel_diff( 0 )
+ {
+ BOOST_ASSERT_MSG( m_fraction_tolerance >= FPT(0), "tolerance must not be negative!" ); // no reason for tolerance to be negative
+ }
+
+ // Access methods
+ //! Returns the tolerance
+ FPT fraction_tolerance() const { return m_fraction_tolerance; }
+
+ //! Returns the comparison method
+ fpc::strength strength() const { return m_strength; }
+
+ //! Returns the failing fraction
+ FPT tested_rel_diff() const { return m_tested_rel_diff; }
+
+ /*! Compares two floating point numbers a and b such that their "left" relative difference |a-b|/a and/or
+ * "right" relative difference |a-b|/b does not exceed specified relative (fraction) tolerance.
+ *
+ * @param[in] left first floating point number to be compared
+ * @param[in] right second floating point number to be compared
+ *
+ * What is reported by @c tested_rel_diff in case of failure depends on the comparison method:
+ * - for @c FPC_STRONG: the max of the two fractions
+ * - for @c FPC_WEAK: the min of the two fractions
+ * The rationale behind is to report the tolerance to set in order to make a test pass.
+ */
+ bool operator()( FPT left, FPT right ) const
+ {
+ FPT diff = fpc_detail::fpt_abs<FPT>( left - right );
+ FPT fraction_of_right = fpc_detail::safe_fpt_division( diff, fpc_detail::fpt_abs( right ) );
+ FPT fraction_of_left = fpc_detail::safe_fpt_division( diff, fpc_detail::fpt_abs( left ) );
+
+ FPT max_rel_diff = (std::max)( fraction_of_left, fraction_of_right );
+ FPT min_rel_diff = (std::min)( fraction_of_left, fraction_of_right );
+
+ m_tested_rel_diff = m_strength == FPC_STRONG ? max_rel_diff : min_rel_diff;
+
+ return m_tested_rel_diff <= m_fraction_tolerance;
+ }
+
+private:
+ // Data members
+ FPT m_fraction_tolerance;
+ fpc::strength m_strength;
+ mutable FPT m_tested_rel_diff;
+};
+
+// ************************************************************************** //
+// ************** small_with_tolerance ************** //
+// ************************************************************************** //
+
+
+/*!@brief Predicate for comparing floating point numbers against 0
+ *
+ * Serves the same purpose as boost::math::fpc::close_at_tolerance, but used when one
+ * of the operand is null.
+ */
+template<typename FPT>
+class small_with_tolerance {
+public:
+ // Public typedefs
+ typedef bool result_type;
+
+ // Constructor
+ explicit small_with_tolerance( FPT tolerance ) // <= absolute tolerance
+ : m_tolerance( tolerance )
+ {
+ BOOST_ASSERT( m_tolerance >= FPT(0) ); // no reason for the tolerance to be negative
+ }
+
+ // Action method
+ bool operator()( FPT fpv ) const
+ {
+ return fpc::fpc_detail::fpt_abs( fpv ) <= m_tolerance;
+ }
+
+private:
+ // Data members
+ FPT m_tolerance;
+};
+
+// ************************************************************************** //
+// ************** is_small ************** //
+// ************************************************************************** //
+
+template<typename FPT>
+inline bool
+is_small( FPT fpv, FPT tolerance )
+{
+ return small_with_tolerance<FPT>( tolerance )( fpv );
+}
+
+//____________________________________________________________________________//
+
+} // namespace fpc
+} // namespace math
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_FLOATING_POINT_COMAPARISON_HPP_071894GER
diff --git a/src/third_party/boost-1.69.0/boost/test/tools/fpc_op.hpp b/src/third_party/boost-1.69.0/boost/test/tools/fpc_op.hpp
new file mode 100644
index 00000000000..c84820bdba0
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tools/fpc_op.hpp
@@ -0,0 +1,214 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief Floating point comparison with enhanced reporting
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TOOLS_FPC_OP_HPP_050915GER
+#define BOOST_TEST_TOOLS_FPC_OP_HPP_050915GER
+
+// Boost.Test
+#include <boost/test/tools/assertion.hpp>
+
+#include <boost/test/tools/floating_point_comparison.hpp>
+#include <boost/test/tools/fpc_tolerance.hpp>
+
+// Boost
+#include <boost/type_traits/common_type.hpp>
+#include <boost/utility/enable_if.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace test_tools {
+namespace assertion {
+namespace op {
+
+// ************************************************************************** //
+// ************** fpctraits ************** //
+// ************************************************************************** //
+// set of floating point comparison traits per comparison OP
+
+template<typename OP>
+struct fpctraits {
+ // indicate if we should perform the operation with a "logical OR"
+ // with the "equality under tolerance".
+ static const bool equality_logical_disjunction = true;
+};
+
+template <typename Lhs, typename Rhs>
+struct fpctraits<op::LT<Lhs,Rhs> > {
+ static const bool equality_logical_disjunction = false;
+};
+
+template <typename Lhs, typename Rhs>
+struct fpctraits<op::GT<Lhs,Rhs> > {
+ static const bool equality_logical_disjunction = false;
+};
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** set of overloads to select correct fpc algo ************** //
+// ************************************************************************** //
+// we really only care about EQ vs NE. All other comparisons use direct first
+// and then need EQ. For example a <= b (tolerance t) IFF a <= b OR a == b (tolerance t)
+
+template <typename FPT, typename Lhs, typename Rhs, typename OP>
+inline assertion_result
+compare_fpv( Lhs const& lhs, Rhs const& rhs, OP* cmp_operator)
+{
+ bool result = cmp_operator->eval_direct(lhs, rhs);
+ if(fpctraits<OP>::equality_logical_disjunction) {
+ return result || compare_fpv<FPT>(lhs, rhs, (op::EQ<Lhs, Rhs>*)0);
+ }
+ return result && compare_fpv<FPT>(lhs, rhs, (op::NE<Lhs, Rhs>*)0);
+}
+
+//____________________________________________________________________________//
+
+template <typename FPT, typename Lhs, typename Rhs>
+inline assertion_result
+compare_fpv_near_zero( FPT const& fpv, op::EQ<Lhs,Rhs>* )
+{
+ fpc::small_with_tolerance<FPT> P( fpc_tolerance<FPT>() );
+
+ assertion_result ar( P( fpv ) );
+ if( !ar )
+ ar.message() << "Absolute value exceeds tolerance [|" << fpv << "| > "<< fpc_tolerance<FPT>() << ']';
+
+ return ar;
+}
+
+//____________________________________________________________________________//
+
+template <typename FPT, typename Lhs, typename Rhs>
+inline assertion_result
+compare_fpv_near_zero( FPT const& fpv, op::NE<Lhs,Rhs>* )
+{
+ fpc::small_with_tolerance<FPT> P( fpc_tolerance<FPT>() );
+
+ assertion_result ar( !P( fpv ) );
+ if( !ar )
+ ar.message() << "Absolute value is within tolerance [|" << fpv << "| < "<< fpc_tolerance<FPT>() << ']';
+ return ar;
+}
+
+//____________________________________________________________________________//
+
+template <typename FPT, typename Lhs, typename Rhs>
+inline assertion_result
+compare_fpv( Lhs const& lhs, Rhs const& rhs, op::EQ<Lhs,Rhs>* )
+{
+ if( lhs == 0 ) {
+ return compare_fpv_near_zero( rhs, (op::EQ<Lhs,Rhs>*)0 );
+ }
+ else if( rhs == 0) {
+ return compare_fpv_near_zero( lhs, (op::EQ<Lhs,Rhs>*)0 );
+ }
+ else {
+ fpc::close_at_tolerance<FPT> P( fpc_tolerance<FPT>(), fpc::FPC_STRONG );
+
+ assertion_result ar( P( lhs, rhs ) );
+ if( !ar )
+ ar.message() << "Relative difference exceeds tolerance ["
+ << P.tested_rel_diff() << " > " << P.fraction_tolerance() << ']';
+ return ar;
+ }
+}
+
+//____________________________________________________________________________//
+
+template <typename FPT, typename Lhs, typename Rhs>
+inline assertion_result
+compare_fpv( Lhs const& lhs, Rhs const& rhs, op::NE<Lhs,Rhs>* )
+{
+ if( lhs == 0 ) {
+ return compare_fpv_near_zero( rhs, (op::NE<Lhs,Rhs>*)0 );
+ }
+ else if( rhs == 0 ) {
+ return compare_fpv_near_zero( lhs, (op::NE<Lhs,Rhs>*)0 );
+ }
+ else {
+ fpc::close_at_tolerance<FPT> P( fpc_tolerance<FPT>(), fpc::FPC_WEAK );
+
+ assertion_result ar( !P( lhs, rhs ) );
+ if( !ar )
+ ar.message() << "Relative difference is within tolerance ["
+ << P.tested_rel_diff() << " < " << fpc_tolerance<FPT>() << ']';
+
+ return ar;
+ }
+}
+
+//____________________________________________________________________________//
+
+#define DEFINE_FPV_COMPARISON( oper, name, rev ) \
+template<typename Lhs,typename Rhs> \
+struct name<Lhs,Rhs,typename boost::enable_if_c< \
+ (fpc::tolerance_based<Lhs>::value && \
+ fpc::tolerance_based<Rhs>::value)>::type> { \
+public: \
+ typedef typename common_type<Lhs,Rhs>::type FPT; \
+ typedef name<Lhs,Rhs> OP; \
+ \
+ typedef assertion_result result_type; \
+ \
+ static bool \
+ eval_direct( Lhs const& lhs, Rhs const& rhs ) \
+ { \
+ return lhs oper rhs; \
+ } \
+ \
+ static assertion_result \
+ eval( Lhs const& lhs, Rhs const& rhs ) \
+ { \
+ if( fpc_tolerance<FPT>() == FPT(0) \
+ || (std::numeric_limits<Lhs>::has_infinity \
+ && (lhs == std::numeric_limits<Lhs>::infinity())) \
+ || (std::numeric_limits<Rhs>::has_infinity \
+ && (rhs == std::numeric_limits<Rhs>::infinity()))) \
+ { \
+ return eval_direct( lhs, rhs ); \
+ } \
+ \
+ return compare_fpv<FPT>( lhs, rhs, (OP*)0 ); \
+ } \
+ \
+ template<typename PrevExprType> \
+ static void \
+ report( std::ostream& ostr, \
+ PrevExprType const& lhs, \
+ Rhs const& rhs ) \
+ { \
+ lhs.report( ostr ); \
+ ostr << revert() \
+ << tt_detail::print_helper( rhs ); \
+ } \
+ \
+ static char const* revert() \
+ { return " " #rev " "; } \
+}; \
+/**/
+
+BOOST_TEST_FOR_EACH_COMP_OP( DEFINE_FPV_COMPARISON )
+#undef DEFINE_FPV_COMPARISON
+
+//____________________________________________________________________________//
+
+} // namespace op
+} // namespace assertion
+} // namespace test_tools
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TOOLS_FPC_OP_HPP_050915GER
+
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/fpc_tolerance.hpp b/src/third_party/boost-1.69.0/boost/test/tools/fpc_tolerance.hpp
index c862a17e75a..c862a17e75a 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/fpc_tolerance.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/fpc_tolerance.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/interface.hpp b/src/third_party/boost-1.69.0/boost/test/tools/interface.hpp
index 5e84f1c6d4e..5e84f1c6d4e 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/interface.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/interface.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/old/impl.hpp b/src/third_party/boost-1.69.0/boost/test/tools/old/impl.hpp
index b975f61b38a..b975f61b38a 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/old/impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/old/impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/old/interface.hpp b/src/third_party/boost-1.69.0/boost/test/tools/old/interface.hpp
index 2d6f8b78c0c..2d6f8b78c0c 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/old/interface.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/old/interface.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tools/output_test_stream.hpp b/src/third_party/boost-1.69.0/boost/test/tools/output_test_stream.hpp
index 2abbf7b5219..2abbf7b5219 100644
--- a/src/third_party/boost-1.68.0/boost/test/tools/output_test_stream.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tools/output_test_stream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tree/auto_registration.hpp b/src/third_party/boost-1.69.0/boost/test/tree/auto_registration.hpp
new file mode 100644
index 00000000000..e9510be2928
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tree/auto_registration.hpp
@@ -0,0 +1,54 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision: 74640 $
+//
+// Description : defines auto_test_unit_registrar
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
+#define BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/tree/decorator.hpp>
+#include <boost/test/tree/test_unit.hpp>
+
+// STL
+#include <list>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace ut_detail {
+
+// ************************************************************************** //
+// ************** auto_test_unit_registrar ************** //
+// ************************************************************************** //
+
+struct BOOST_TEST_DECL auto_test_unit_registrar {
+ // Constructors
+ auto_test_unit_registrar( test_case* tc, decorator::collector_t& decorators, counter_t exp_fail = 0 );
+ explicit auto_test_unit_registrar( const_string ts_name, const_string ts_file, std::size_t ts_line, decorator::collector_t& decorators );
+ explicit auto_test_unit_registrar( test_unit_generator const& tc_gen, decorator::collector_t& decorators );
+ explicit auto_test_unit_registrar( boost::shared_ptr<test_unit_generator> tc_gen, decorator::collector_t& decorators );
+ explicit auto_test_unit_registrar( int );
+};
+
+} // namespace ut_detail
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_AUTO_REGISTRATION_HPP_100211GER
+
diff --git a/src/third_party/boost-1.69.0/boost/test/tree/decorator.hpp b/src/third_party/boost-1.69.0/boost/test/tree/decorator.hpp
new file mode 100644
index 00000000000..6537152538d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tree/decorator.hpp
@@ -0,0 +1,280 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision: 62016 $
+//
+// Description : defines decorators to be using with auto registered test units
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_DECORATOR_HPP_091911GER
+#define BOOST_TEST_TREE_DECORATOR_HPP_091911GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+
+#include <boost/test/tree/fixture.hpp>
+
+#include <boost/test/tools/assertion_result.hpp>
+#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
+
+// Boost
+#include <boost/shared_ptr.hpp>
+#include <boost/function/function0.hpp>
+#include <boost/function/function1.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+// STL
+#include <vector>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+class test_unit;
+
+namespace decorator {
+
+// ************************************************************************** //
+// ************** decorator::collector_t ************** //
+// ************************************************************************** //
+
+class base;
+typedef boost::shared_ptr<base> base_ptr;
+
+class BOOST_TEST_DECL collector_t {
+
+public:
+ collector_t& operator*( base const& d );
+
+ void store_in( test_unit& tu );
+
+ void reset();
+
+ std::vector<base_ptr> get_lazy_decorators() const;
+
+ // singleton pattern
+ BOOST_TEST_SINGLETON_CONS( collector_t )
+
+ private:
+ // Data members
+ std::vector<base_ptr> m_tu_decorators;
+};
+
+
+// ************************************************************************** //
+// ************** decorator::base ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL base {
+public:
+ // composition interface
+ collector_t& operator*() const;
+
+ // application interface
+ virtual void apply( test_unit& tu ) = 0;
+
+ // deep cloning interface
+ virtual base_ptr clone() const = 0;
+
+protected:
+ virtual ~base() {}
+};
+
+// ************************************************************************** //
+// ************** decorator::label ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL label : public decorator::base {
+public:
+ explicit label( const_string l ) : m_label( l ) {}
+
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu );
+ virtual base_ptr clone() const { return base_ptr(new label( m_label )); }
+
+ // Data members
+ const_string m_label;
+};
+
+// ************************************************************************** //
+// ************** decorator::expected_failures ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL expected_failures : public decorator::base {
+public:
+ explicit expected_failures( counter_t ef ) : m_exp_fail( ef ) {}
+
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu );
+ virtual base_ptr clone() const { return base_ptr(new expected_failures( m_exp_fail )); }
+
+ // Data members
+ counter_t m_exp_fail;
+};
+
+// ************************************************************************** //
+// ************** decorator::timeout ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL timeout : public decorator::base {
+public:
+ explicit timeout( unsigned t ) : m_timeout( t ) {}
+
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu );
+ virtual base_ptr clone() const { return base_ptr(new timeout( m_timeout )); }
+
+ // Data members
+ unsigned m_timeout;
+};
+
+// ************************************************************************** //
+// ************** decorator::description ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL description : public decorator::base {
+public:
+ explicit description( const_string descr ) : m_description( descr ) {}
+
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu );
+ virtual base_ptr clone() const { return base_ptr(new description( m_description )); }
+
+ // Data members
+ const_string m_description;
+};
+
+// ************************************************************************** //
+// ************** decorator::depends_on ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL depends_on : public decorator::base {
+public:
+ explicit depends_on( const_string dependency ) : m_dependency( dependency ) {}
+
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu );
+ virtual base_ptr clone() const { return base_ptr(new depends_on( m_dependency )); }
+
+ // Data members
+ const_string m_dependency;
+};
+
+// ************************************************************************** //
+// ************** decorator::enable_if/enabled/disabled ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL enable_if_impl : public decorator::base {
+protected:
+ void apply_impl( test_unit& tu, bool condition );
+};
+
+template<bool condition>
+class enable_if : public enable_if_impl {
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu ) { this->apply_impl( tu, condition ); }
+ virtual base_ptr clone() const { return base_ptr(new enable_if<condition>()); }
+};
+
+typedef enable_if<true> enabled;
+typedef enable_if<false> disabled;
+
+// ************************************************************************** //
+// ************** decorator::fixture ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL fixture_t : public decorator::base {
+public:
+ // Constructor
+ explicit fixture_t( test_unit_fixture_ptr impl ) : m_impl( impl ) {}
+
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu );
+ virtual base_ptr clone() const { return base_ptr(new fixture_t( m_impl )); }
+
+ // Data members
+ test_unit_fixture_ptr m_impl;
+};
+
+//____________________________________________________________________________//
+
+template<typename F>
+inline fixture_t
+fixture()
+{
+ return fixture_t( test_unit_fixture_ptr( new unit_test::class_based_fixture<F>() ) );
+}
+
+//____________________________________________________________________________//
+
+template<typename F, typename Arg>
+inline fixture_t
+fixture( Arg const& arg )
+{
+ return fixture_t( test_unit_fixture_ptr( new unit_test::class_based_fixture<F,Arg>( arg ) ) );
+}
+
+//____________________________________________________________________________//
+
+inline fixture_t
+fixture( boost::function<void()> const& setup, boost::function<void()> const& teardown = boost::function<void()>() )
+{
+ return fixture_t( test_unit_fixture_ptr( new unit_test::function_based_fixture( setup, teardown ) ) );
+}
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** decorator::depends_on ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL precondition : public decorator::base {
+public:
+ typedef boost::function<test_tools::assertion_result (test_unit_id)> predicate_t;
+
+ explicit precondition( predicate_t p ) : m_precondition( p ) {}
+
+private:
+ // decorator::base interface
+ virtual void apply( test_unit& tu );
+ virtual base_ptr clone() const { return base_ptr(new precondition( m_precondition )); }
+
+ // Data members
+ predicate_t m_precondition;
+};
+
+} // namespace decorator
+
+using decorator::label;
+using decorator::expected_failures;
+using decorator::timeout;
+using decorator::description;
+using decorator::depends_on;
+using decorator::enable_if;
+using decorator::enabled;
+using decorator::disabled;
+using decorator::fixture;
+using decorator::precondition;
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_DECORATOR_HPP_091911GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/fixture.hpp b/src/third_party/boost-1.69.0/boost/test/tree/fixture.hpp
index 8e07b2aa1d0..8e07b2aa1d0 100644
--- a/src/third_party/boost-1.68.0/boost/test/tree/fixture.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tree/fixture.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/global_fixture.hpp b/src/third_party/boost-1.69.0/boost/test/tree/global_fixture.hpp
index 7c96d34e898..7c96d34e898 100644
--- a/src/third_party/boost-1.68.0/boost/test/tree/global_fixture.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tree/global_fixture.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/observer.hpp b/src/third_party/boost-1.69.0/boost/test/tree/observer.hpp
index bd6fc9bff59..bd6fc9bff59 100644
--- a/src/third_party/boost-1.68.0/boost/test/tree/observer.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tree/observer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/test_case_counter.hpp b/src/third_party/boost-1.69.0/boost/test/tree/test_case_counter.hpp
index a74f37f152e..a74f37f152e 100644
--- a/src/third_party/boost-1.68.0/boost/test/tree/test_case_counter.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tree/test_case_counter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/tree/test_case_template.hpp b/src/third_party/boost-1.69.0/boost/test/tree/test_case_template.hpp
new file mode 100644
index 00000000000..e8629802208
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tree/test_case_template.hpp
@@ -0,0 +1,192 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+///@ file
+/// Defines template_test_case_gen
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
+#define BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+#include <boost/test/detail/workaround.hpp>
+#include <boost/test/tree/test_unit.hpp>
+
+#include <boost/test/utils/class_properties.hpp>
+
+#include <boost/test/tree/observer.hpp>
+
+
+// Boost
+#include <boost/shared_ptr.hpp>
+#include <boost/mpl/for_each.hpp>
+#include <boost/mpl/identity.hpp>
+#include <boost/type.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/function/function0.hpp>
+
+#if defined(BOOST_NO_TYPEID) || defined(BOOST_NO_RTTI)
+# include <boost/current_function.hpp>
+#else
+# include <boost/core/demangle.hpp>
+#endif
+
+// STL
+#include <string> // for std::string
+#include <list> // for std::list
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
+ !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
+ !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS)
+ #include <tuple>
+#endif
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace ut_detail {
+
+// ************************************************************************** //
+// ************** test_case_template_invoker ************** //
+// ************************************************************************** //
+
+template<typename TestCaseTemplate,typename TestType>
+class test_case_template_invoker {
+public:
+ void operator()() { TestCaseTemplate::run( (boost::type<TestType>*)0 ); }
+};
+
+// ************************************************************************** //
+// ************** generate_test_case_4_type ************** //
+// ************************************************************************** //
+
+template<typename Generator, typename TestCaseTemplate>
+struct generate_test_case_4_type {
+ explicit generate_test_case_4_type( const_string tc_name, const_string tc_file, std::size_t tc_line, Generator& G )
+ : m_test_case_name( tc_name )
+ , m_test_case_file( tc_file )
+ , m_test_case_line( tc_line )
+ , m_holder( G )
+ {}
+
+ template<typename TestType>
+ void operator()( mpl::identity<TestType> )
+ {
+ std::string full_name;
+ assign_op( full_name, m_test_case_name, 0 );
+ full_name += '<';
+#if !defined(BOOST_NO_TYPEID) && !defined(BOOST_NO_RTTI)
+ full_name += boost::core::demangle(typeid(TestType).name()); // same as execution_monitor.ipp
+#else
+ full_name += BOOST_CURRENT_FUNCTION;
+#endif
+ if( boost::is_const<TestType>::value )
+ full_name += "_const";
+ full_name += '>';
+
+ m_holder.m_test_cases.push_back( new test_case( ut_detail::normalize_test_case_name( full_name ),
+ m_test_case_file,
+ m_test_case_line,
+ test_case_template_invoker<TestCaseTemplate,TestType>() ) );
+ }
+
+private:
+ // Data members
+ const_string m_test_case_name;
+ const_string m_test_case_file;
+ std::size_t m_test_case_line;
+ Generator& m_holder;
+};
+
+// ************************************************************************** //
+// ************** test_case_template ************** //
+// ************************************************************************** //
+
+class template_test_case_gen_base : public test_unit_generator {
+public:
+ virtual test_unit* next() const
+ {
+ if( m_test_cases.empty() )
+ return 0;
+
+ test_unit* res = m_test_cases.front();
+ m_test_cases.pop_front();
+
+ return res;
+ }
+
+ // Data members
+ mutable std::list<test_unit*> m_test_cases;
+};
+
+template<typename TestCaseTemplate,typename TestTypesList>
+class template_test_case_gen : public template_test_case_gen_base {
+public:
+ // Constructor
+ template_test_case_gen( const_string tc_name, const_string tc_file, std::size_t tc_line )
+ {
+ typedef generate_test_case_4_type<template_test_case_gen<TestCaseTemplate,TestTypesList>,TestCaseTemplate> single_test_gen;
+
+ mpl::for_each<TestTypesList,mpl::make_identity<mpl::_> >( single_test_gen( tc_name, tc_file, tc_line, *this ) );
+ }
+};
+
+// Describing template test cases with tuples
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
+ !defined(BOOST_NO_CXX11_HDR_TUPLE) && \
+ !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) && \
+ !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+
+template<typename TestCaseTemplate, typename... tuple_parameter_pack>
+class template_test_case_gen<TestCaseTemplate, std::tuple<tuple_parameter_pack...> > : public template_test_case_gen_base {
+
+ template<int... Is>
+ struct seq { };
+
+ template<int N, int... Is>
+ struct gen_seq : gen_seq<N - 1, N - 1, Is...> { };
+
+ template<int... Is>
+ struct gen_seq<0, Is...> : seq<Is...> { };
+
+ template<typename tuple_t, typename F, int... Is>
+ void for_each(F &f, seq<Is...>)
+ {
+ auto l = { (f(mpl::identity<typename std::tuple_element<Is, tuple_t>::type>()), 0)... };
+ (void)l; // silence warning
+ }
+
+public:
+ // Constructor
+ template_test_case_gen( const_string tc_name, const_string tc_file, std::size_t tc_line )
+ {
+ using tuple_t = std::tuple<tuple_parameter_pack...>;
+ using this_type = template_test_case_gen<TestCaseTemplate, tuple_t >;
+ using single_test_gen = generate_test_case_4_type<this_type, TestCaseTemplate>;
+
+ single_test_gen op( tc_name, tc_file, tc_line, *this );
+
+ this->for_each<tuple_t>(op, gen_seq<sizeof...(tuple_parameter_pack)>());
+ }
+};
+
+#endif /* C++11 variadic, tuples and type alias */
+
+} // namespace ut_detail
+} // unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_TEST_CASE_TEMPLATE_HPP_091911GER
diff --git a/src/third_party/boost-1.69.0/boost/test/tree/test_unit.hpp b/src/third_party/boost-1.69.0/boost/test/tree/test_unit.hpp
new file mode 100644
index 00000000000..48033af8977
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/tree/test_unit.hpp
@@ -0,0 +1,293 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// Defines @ref boost::unit_test::test_unit "test_unit", @ref boost::unit_test::test_case "test_case",
+/// @ref boost::unit_test::test_suite "test_suite" and @ref boost::unit_test::master_test_suite_t "master_test_suite_t"
+// ***************************************************************************
+
+#ifndef BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
+#define BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+
+#include <boost/test/tree/decorator.hpp>
+#include <boost/test/tree/fixture.hpp>
+
+#include <boost/test/tools/assertion_result.hpp>
+
+#include <boost/test/utils/class_properties.hpp>
+
+// Boost
+#include <boost/function/function0.hpp>
+#include <boost/function/function1.hpp>
+
+// STL
+#include <vector>
+#include <string>
+#include <map>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+namespace framework {
+class state;
+BOOST_TEST_DECL master_test_suite_t& master_test_suite();
+}
+
+// ************************************************************************** //
+// ************** test_unit ************** //
+// ************************************************************************** //
+
+typedef std::vector<test_unit_id> test_unit_id_list;
+
+class BOOST_TEST_DECL test_unit {
+public:
+ enum { type = TUT_ANY };
+ enum run_status { RS_DISABLED, RS_ENABLED, RS_INHERIT, RS_INVALID };
+
+ typedef std::vector<test_unit_id> id_list;
+ typedef std::vector<test_unit_fixture_ptr> fixture_list_t;
+ typedef BOOST_READONLY_PROPERTY(test_unit_id,(framework::state)) id_t;
+ typedef BOOST_READONLY_PROPERTY(test_unit_id,(test_suite)) parent_id_t;
+ typedef BOOST_READONLY_PROPERTY(id_list,(test_unit)) id_list_t;
+ typedef std::vector<decorator::base_ptr> decor_list_t;
+ typedef BOOST_READONLY_PROPERTY(std::vector<std::string>,(test_unit)) label_list_t;
+
+ typedef boost::function<test_tools::assertion_result (test_unit_id)> precondition_t;
+ typedef BOOST_READONLY_PROPERTY(std::vector<precondition_t>,(test_unit)) precond_list_t;
+
+ // preconditions management
+ void depends_on( test_unit* tu );
+ void add_precondition( precondition_t const& );
+ test_tools::assertion_result check_preconditions() const;
+
+ // labels management
+ void add_label( const_string l );
+ bool has_label( const_string l ) const;
+
+ // helper access methods
+ void increase_exp_fail( counter_t num );
+ bool is_enabled() const { return p_run_status == RS_ENABLED; }
+ std::string full_name() const;
+
+ // Public r/o properties
+ test_unit_type const p_type; ///< type for this test unit
+ const_string const p_type_name; ///< "case"/"suite"/"module"
+ const_string const p_file_name;
+ std::size_t const p_line_num;
+ id_t p_id; ///< unique id for this test unit
+ parent_id_t p_parent_id; ///< parent test suite id
+ label_list_t p_labels; ///< list of labels associated with this test unit
+
+ id_list_t p_dependencies; ///< list of test units this one depends on
+ precond_list_t p_preconditions; ///< user supplied preconditions for this test unit;
+
+ // Public r/w properties
+ readwrite_property<std::string> p_name; ///< name for this test unit
+ readwrite_property<std::string> p_description; ///< description for this test unit
+ readwrite_property<unsigned> p_timeout; ///< timeout for the test unit execution in seconds
+ readwrite_property<counter_t> p_expected_failures; ///< number of expected failures in this test unit
+
+ readwrite_property<run_status> p_default_status; ///< run status obtained by this unit during setup phase
+ readwrite_property<run_status> p_run_status; ///< run status assigned to this unit before execution phase after applying all filters
+
+ readwrite_property<counter_t> p_sibling_rank; ///< rank of this test unit amoung siblings of the same parent
+
+ readwrite_property<decor_list_t> p_decorators; ///< automatically assigned decorators; execution is delayed till framework::finalize_setup_phase function
+ readwrite_property<fixture_list_t> p_fixtures; ///< fixtures associated with this test unit
+
+protected:
+ ~test_unit();
+ // Constructor
+ test_unit( const_string tu_name, const_string tc_file, std::size_t tc_line, test_unit_type t );
+ // Master test suite constructor
+ explicit test_unit( const_string module_name );
+
+private:
+};
+
+// ************************************************************************** //
+// ************** test_unit_generator ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_unit_generator {
+public:
+ virtual test_unit* next() const = 0;
+
+protected:
+ BOOST_TEST_PROTECTED_VIRTUAL ~test_unit_generator() {}
+};
+
+// ************************************************************************** //
+// ************** test_case ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL test_case : public test_unit {
+public:
+ enum { type = TUT_CASE };
+
+ // Constructor
+ test_case( const_string tc_name, boost::function<void ()> const& test_func );
+ test_case( const_string tc_name, const_string tc_file, std::size_t tc_line, boost::function<void ()> const& test_func );
+
+ // Public property
+ typedef BOOST_READONLY_PROPERTY(boost::function<void ()>,(test_case)) test_func;
+
+ test_func p_test_func;
+
+private:
+ friend class framework::state;
+ ~test_case() {}
+};
+
+// ************************************************************************** //
+// ************** test_suite ************** //
+// ************************************************************************** //
+
+//! Class representing test suites
+class BOOST_TEST_DECL test_suite : public test_unit {
+public:
+ enum { type = TUT_SUITE };
+
+ // Constructor
+ explicit test_suite( const_string ts_name, const_string ts_file, std::size_t ts_line );
+
+ // test unit list management
+
+ /*!@brief Adds a test unit to a test suite.
+ *
+ * It is possible to specify the timeout and the expected failures.
+ */
+ void add( test_unit* tu, counter_t expected_failures = 0, unsigned timeout = 0 );
+
+ /// @overload
+ void add( test_unit_generator const& gen, unsigned timeout = 0 );
+
+ /// @overload
+ void add( test_unit_generator const& gen, decorator::collector_t& decorators );
+
+ /// @overload
+ void add( boost::shared_ptr<test_unit_generator> gen_ptr, decorator::collector_t& decorators );
+
+ //! Removes a test from the test suite.
+ void remove( test_unit_id id );
+
+ //! Generates all the delayed test_units from the generators
+ void generate( );
+
+ //! Check for duplicates name in test cases
+ //!
+ //! Raises a setup_error if there are duplicates
+ void check_for_duplicate_test_cases();
+
+ // access methods
+ test_unit_id get( const_string tu_name ) const;
+ std::size_t size() const { return m_children.size(); }
+
+protected:
+ // Master test suite constructor
+ explicit test_suite( const_string module_name );
+
+ friend BOOST_TEST_DECL
+ void traverse_test_tree( test_suite const&, test_tree_visitor&, bool );
+ friend class framework::state;
+ virtual ~test_suite() {}
+
+ typedef std::multimap<counter_t,test_unit_id> children_per_rank;
+ // Data members
+
+ test_unit_id_list m_children;
+ children_per_rank m_ranked_children; ///< maps child sibling rank to list of children with that rank
+
+ std::vector< std::pair<boost::shared_ptr<test_unit_generator>, std::vector<decorator::base_ptr> > > m_generators; /// lazy evaluation
+};
+
+// ************************************************************************** //
+// ************** master_test_suite ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL master_test_suite_t : public test_suite {
+private:
+ master_test_suite_t();
+ master_test_suite_t(const master_test_suite_t&); // undefined
+ master_test_suite_t& operator=(master_test_suite_t const &); // undefined
+
+public:
+ // Data members
+ int argc;
+ char** argv;
+
+ friend master_test_suite_t& boost::unit_test::framework::master_test_suite();
+};
+
+// ************************************************************************** //
+// ************** user_tc_method_invoker ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+BOOST_TEST_DECL std::string normalize_test_case_name( const_string tu_name );
+
+//____________________________________________________________________________//
+
+template<typename InstanceType,typename UserTestCase>
+struct user_tc_method_invoker {
+ typedef void (UserTestCase::*TestMethod )();
+
+ user_tc_method_invoker( shared_ptr<InstanceType> inst, TestMethod test_method )
+ : m_inst( inst ), m_test_method( test_method ) {}
+
+ void operator()() { ((*m_inst).*m_test_method)(); }
+
+ shared_ptr<InstanceType> m_inst;
+ TestMethod m_test_method;
+};
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// ************** make_test_case ************** //
+// ************************************************************************** //
+
+inline test_case*
+make_test_case( boost::function<void ()> const& test_func, const_string tc_name, const_string tc_file, std::size_t tc_line )
+{
+ return new test_case( ut_detail::normalize_test_case_name( tc_name ), tc_file, tc_line, test_func );
+}
+
+//____________________________________________________________________________//
+
+template<typename UserTestCase, typename InstanceType>
+inline test_case*
+make_test_case( void (UserTestCase::* test_method )(),
+ const_string tc_name,
+ const_string tc_file,
+ std::size_t tc_line,
+ boost::shared_ptr<InstanceType> user_test_case )
+{
+ return new test_case( ut_detail::normalize_test_case_name( tc_name ),
+ tc_file,
+ tc_line,
+ ut_detail::user_tc_method_invoker<InstanceType,UserTestCase>( user_test_case, test_method ) );
+}
+
+//____________________________________________________________________________//
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_TREE_TEST_UNIT_HPP_100211GER
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/traverse.hpp b/src/third_party/boost-1.69.0/boost/test/tree/traverse.hpp
index d27917cacea..d27917cacea 100644
--- a/src/third_party/boost-1.68.0/boost/test/tree/traverse.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tree/traverse.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/tree/visitor.hpp b/src/third_party/boost-1.69.0/boost/test/tree/visitor.hpp
index 8f1bae5c92b..8f1bae5c92b 100644
--- a/src/third_party/boost-1.68.0/boost/test/tree/visitor.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/tree/visitor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/unit_test.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test.hpp
index e6a236a1b5b..e6a236a1b5b 100644
--- a/src/third_party/boost-1.68.0/boost/test/unit_test.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/unit_test.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/unit_test_log.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test_log.hpp
new file mode 100644
index 00000000000..d65a728747c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/unit_test_log.hpp
@@ -0,0 +1,280 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// @brief defines singleton class unit_test_log and all manipulators.
+/// unit_test_log has output stream like interface. It's implementation is
+/// completely hidden with pimple idiom
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
+#define BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
+
+// Boost.Test
+#include <boost/test/tree/observer.hpp>
+
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/detail/log_level.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+
+#include <boost/test/utils/wrap_stringstream.hpp>
+#include <boost/test/utils/lazy_ostream.hpp>
+
+// Boost
+
+// STL
+#include <iosfwd> // for std::ostream&
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** log manipulators ************** //
+// ************************************************************************** //
+
+namespace log {
+
+struct BOOST_TEST_DECL begin {
+ begin( const_string fn, std::size_t ln )
+ : m_file_name( fn )
+ , m_line_num( ln )
+ {}
+
+ const_string m_file_name;
+ std::size_t m_line_num;
+};
+
+struct end {};
+
+} // namespace log
+
+// ************************************************************************** //
+// ************** entry_value_collector ************** //
+// ************************************************************************** //
+
+namespace ut_detail {
+
+class BOOST_TEST_DECL entry_value_collector {
+public:
+ // Constructors
+ entry_value_collector() : m_last( true ) {}
+ entry_value_collector( entry_value_collector const& rhs ) : m_last( true ) { rhs.m_last = false; }
+ ~entry_value_collector();
+
+ // collection interface
+ entry_value_collector const& operator<<( lazy_ostream const& ) const;
+ entry_value_collector const& operator<<( const_string ) const;
+
+private:
+ // Data members
+ mutable bool m_last;
+};
+
+} // namespace ut_detail
+
+// ************************************************************************** //
+// ************** unit_test_log ************** //
+// ************************************************************************** //
+
+/// @brief Manages the sets of loggers, their streams and log levels
+///
+/// The Boost.Test framework allows for having several formatters/loggers at the same time, each of which
+/// having their own log level and output stream.
+///
+/// This class serves the purpose of
+/// - exposing an interface to the test framework (as a boost::unit_test::test_observer)
+/// - exposing an interface to the testing tools
+/// - managing several loggers
+///
+/// @note Accesses to the functions exposed by this class are made through the singleton
+/// @c boost::unit_test::unit_test_log.
+///
+/// Users/developers willing to implement their own formatter need to:
+/// - implement a boost::unit_test::unit_test_log_formatter that will output the desired format
+/// - register the formatter during a eg. global fixture using the method @c set_formatter (though the framework singleton).
+///
+/// @warning this observer has a higher priority than the @ref boost::unit_test::results_collector_t. This means
+/// that the various @ref boost::unit_test::test_results associated to each test unit may not be available at the time
+/// the @c test_unit_start, @c test_unit_finish ... are called.
+///
+/// @see
+/// - boost::unit_test::test_observer
+/// - boost::unit_test::unit_test_log_formatter
+class BOOST_TEST_DECL unit_test_log_t : public test_observer {
+public:
+ // test_observer interface implementation
+ virtual void test_start( counter_t test_cases_amount );
+ virtual void test_finish();
+ virtual void test_aborted();
+
+ virtual void test_unit_start( test_unit const& );
+ virtual void test_unit_finish( test_unit const&, unsigned long elapsed );
+ virtual void test_unit_skipped( test_unit const&, const_string );
+ virtual void test_unit_aborted( test_unit const& );
+
+ virtual void exception_caught( execution_exception const& ex );
+
+ virtual int priority() { return 2; }
+
+ // log configuration methods
+ //! Sets the stream for all loggers
+ //!
+ //! This will override the log sink/stream of all loggers, whether enabled or not.
+ void set_stream( std::ostream& );
+
+ //! Sets the stream for specific logger
+ //!
+ //! @note Has no effect if the specified format is not found
+ //! @par Since Boost 1.62
+ void set_stream( output_format, std::ostream& );
+
+ //! Returns a pointer to the stream associated to specific logger
+ //!
+ //! @note Returns a null pointer if the format is not found
+ //! @par Since Boost 1.67
+ std::ostream* get_stream( output_format ) const;
+
+
+ //! Sets the threshold level for all loggers/formatters.
+ //!
+ //! This will override the log level of all loggers, whether enabled or not.
+ void set_threshold_level( log_level );
+
+ //! Sets the threshold/log level of a specific format
+ //!
+ //! @note Has no effect if the specified format is not found
+ //! @par Since Boost 1.62
+ void set_threshold_level( output_format, log_level );
+
+ //! Add a format to the set of loggers
+ //!
+ //! Adding a logger means that the specified logger is enabled. The log level is managed by the formatter itself
+ //! and specifies what events are forwarded to the underlying formatter.
+ //! @par Since Boost 1.62
+ void add_format( output_format );
+
+ //! Sets the format of the logger
+ //!
+ //! This will become the only active format of the logs.
+ void set_format( output_format );
+
+ //! Returns the logger instance for a specific format.
+ //!
+ //! @returns the logger/formatter instance, or @c (unit_test_log_formatter*)0 if the format is not found.
+ //! @par Since Boost 1.62
+ unit_test_log_formatter* get_formatter( output_format );
+
+ //! Sets the logger instance
+ //!
+ //! The specified logger becomes the unique active one. The custom log formatter has the
+ //! format @c OF_CUSTOM_LOGGER. If such a format exists already, its formatter gets replaced by the one
+ //! given in argument.
+ //!
+ //! The log level and output stream of the new formatter are taken from the currently active logger. In case
+ //! several loggers are active, the order of priority is CUSTOM, HRF, XML, and JUNIT.
+ //! If (unit_test_log_formatter*)0 is given as argument, the custom logger (if any) is removed.
+ //!
+ //! @note The ownership of the pointer is transfered to the Boost.Test framework. This call is equivalent to
+ //! - a call to @c add_formatter
+ //! - a call to @c set_format(OF_CUSTOM_LOGGER)
+ //! - a configuration of the newly added logger with a previously configured stream and log level.
+ void set_formatter( unit_test_log_formatter* );
+
+ //! Adds a custom log formatter to the set of formatters
+ //!
+ //! The specified logger is added with the format @c OF_CUSTOM_LOGGER, such that it can
+ //! be futher selected or its stream/log level can be specified.
+ //! If there is already a custom logger (with @c OF_CUSTOM_LOGGER), then
+ //! the existing one gets replaced by the one given in argument.
+ //! The provided logger is added with an enabled state.
+ //! If (unit_test_log_formatter*)0 is given as argument, the custom logger (if any) is removed and
+ //! no other action is performed.
+ //!
+ //! @note The ownership of the pointer is transfered to the Boost.Test framework.
+ //! @par Since Boost 1.62
+ void add_formatter( unit_test_log_formatter* the_formatter );
+
+ // test progress logging
+ void set_checkpoint( const_string file, std::size_t line_num, const_string msg = const_string() );
+
+ // entry logging
+ unit_test_log_t& operator<<( log::begin const& ); // begin entry
+ unit_test_log_t& operator<<( log::end const& ); // end entry
+ unit_test_log_t& operator<<( log_level ); // set entry level
+ unit_test_log_t& operator<<( const_string ); // log entry value
+ unit_test_log_t& operator<<( lazy_ostream const& ); // log entry value
+
+ ut_detail::entry_value_collector operator()( log_level ); // initiate entry collection
+
+private:
+ // Implementation helpers
+ bool log_entry_start(output_format log_format);
+ void log_entry_context( log_level l );
+ void clear_entry_context();
+
+ // Singleton
+ BOOST_TEST_SINGLETON_CONS( unit_test_log_t )
+}; // unit_test_log_t
+
+BOOST_TEST_SINGLETON_INST( unit_test_log )
+
+// helper macros
+#define BOOST_TEST_LOG_ENTRY( ll ) \
+ (::boost::unit_test::unit_test_log \
+ << ::boost::unit_test::log::begin( BOOST_TEST_L(__FILE__), __LINE__ ))(ll) \
+/**/
+
+} // namespace unit_test
+} // namespace boost
+
+// ************************************************************************** //
+// ************** Unit test log interface helpers ************** //
+// ************************************************************************** //
+
+// messages sent by the framework
+#define BOOST_TEST_FRAMEWORK_MESSAGE( M ) \
+ (::boost::unit_test::unit_test_log \
+ << ::boost::unit_test::log::begin( \
+ "boost.test framework", \
+ __LINE__ )) \
+ ( ::boost::unit_test::log_messages ) \
+ << BOOST_TEST_LAZY_MSG( M ) \
+/**/
+
+
+#define BOOST_TEST_MESSAGE( M ) \
+ BOOST_TEST_LOG_ENTRY( ::boost::unit_test::log_messages ) \
+ << BOOST_TEST_LAZY_MSG( M ) \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_PASSPOINT() \
+ ::boost::unit_test::unit_test_log.set_checkpoint( \
+ BOOST_TEST_L(__FILE__), \
+ static_cast<std::size_t>(__LINE__) ) \
+/**/
+
+//____________________________________________________________________________//
+
+#define BOOST_TEST_CHECKPOINT( M ) \
+ ::boost::unit_test::unit_test_log.set_checkpoint( \
+ BOOST_TEST_L(__FILE__), \
+ static_cast<std::size_t>(__LINE__), \
+ (::boost::wrap_stringstream().ref() << M).str() ) \
+/**/
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_LOG_HPP_071894GER
+
diff --git a/src/third_party/boost-1.68.0/boost/test/unit_test_log_formatter.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test_log_formatter.hpp
index 79b74e08493..79b74e08493 100644
--- a/src/third_party/boost-1.68.0/boost/test/unit_test_log_formatter.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/unit_test_log_formatter.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/unit_test_monitor.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test_monitor.hpp
new file mode 100644
index 00000000000..b056051cafa
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/unit_test_monitor.hpp
@@ -0,0 +1,61 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// @brief defines specific version of execution monitor used to managed run unit of test cases
+///
+/// Translates execution exception into error level
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
+#define BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
+
+// Boost.Test
+#include <boost/test/execution_monitor.hpp>
+#include <boost/test/detail/fwd_decl.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+// ************************************************************************** //
+// ************** unit_test_monitor ************** //
+// ************************************************************************** //
+
+class BOOST_TEST_DECL unit_test_monitor_t :public execution_monitor {
+public:
+ enum error_level {
+ test_ok = 0,
+ /// Indicates a failure to prepare the unit test (eg. fixture). Does not
+ /// account for tests skipped because of parent tests failed/skipped.
+ test_setup_failure = -1,
+ unexpected_exception = -2,
+ os_exception = -3,
+ os_timeout = -4,
+ fatal_error = -5 // includes both system and user
+ };
+
+ static bool is_critical_error( error_level e ) { return e <= fatal_error; }
+
+ // monitor method
+ error_level execute_and_translate( boost::function<void ()> const& func, unsigned timeout = 0 );
+
+ // singleton pattern
+ BOOST_TEST_SINGLETON_CONS( unit_test_monitor_t )
+};
+
+BOOST_TEST_SINGLETON_INST( unit_test_monitor )
+
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UNIT_TEST_MONITOR_HPP_020905GER
diff --git a/src/third_party/boost-1.68.0/boost/test/unit_test_parameters.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test_parameters.hpp
index e7e60d344f0..e7e60d344f0 100644
--- a/src/third_party/boost-1.68.0/boost/test/unit_test_parameters.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/unit_test_parameters.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/unit_test_suite.hpp b/src/third_party/boost-1.69.0/boost/test/unit_test_suite.hpp
new file mode 100644
index 00000000000..698362e5881
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/unit_test_suite.hpp
@@ -0,0 +1,405 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+/// @file
+/// @brief Defines Unit Test Framework public API
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
+#define BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
+
+// Boost.Test
+#include <boost/test/framework.hpp>
+#include <boost/test/tree/auto_registration.hpp>
+#include <boost/test/tree/test_case_template.hpp>
+#include <boost/test/tree/global_fixture.hpp>
+
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+#include <boost/test/detail/pp_variadic.hpp>
+
+
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** Non-auto (explicit) test case interface ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_CASE_NAME( test_function, test_name ) \
+boost::unit_test::make_test_case( boost::function<void ()>(test_function), \
+ test_name , \
+ __FILE__, __LINE__ )
+#define BOOST_TEST_CASE( test_function ) \
+BOOST_TEST_CASE_NAME(test_function, BOOST_TEST_STRINGIZE( test_function) )
+#define BOOST_CLASS_TEST_CASE( test_function, tc_instance ) \
+boost::unit_test::make_test_case( (test_function), \
+ BOOST_TEST_STRINGIZE( test_function ), \
+ __FILE__, __LINE__, tc_instance )
+
+// ************************************************************************** //
+// ************** BOOST_TEST_SUITE ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_SUITE( testsuite_name ) \
+( new boost::unit_test::test_suite( testsuite_name, __FILE__, __LINE__ ) )
+
+// ************************************************************************** //
+// ************** BOOST_AUTO_TEST_SUITE ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_SUITE_WITH_DECOR( suite_name, decorators ) \
+namespace suite_name { \
+BOOST_AUTO_TU_REGISTRAR( suite_name )( \
+ BOOST_STRINGIZE( suite_name ), \
+ __FILE__, __LINE__, \
+ decorators ); \
+/**/
+
+#define BOOST_AUTO_TEST_SUITE_NO_DECOR( suite_name ) \
+ BOOST_AUTO_TEST_SUITE_WITH_DECOR( \
+ suite_name, \
+ boost::unit_test::decorator::collector_t::instance() ) \
+/**/
+
+#if BOOST_PP_VARIADICS
+#define BOOST_AUTO_TEST_SUITE( ... ) \
+ BOOST_TEST_INVOKE_IF_N_ARGS( 1, \
+ BOOST_AUTO_TEST_SUITE_NO_DECOR, \
+ BOOST_AUTO_TEST_SUITE_WITH_DECOR, \
+ __VA_ARGS__) \
+/**/
+
+#else /* BOOST_PP_VARIADICS */
+
+#define BOOST_AUTO_TEST_SUITE( suite_name ) \
+ BOOST_AUTO_TEST_SUITE_NO_DECOR( suite_name ) \
+/**/
+
+
+#endif /* BOOST_PP_VARIADICS */
+
+// ************************************************************************** //
+// ************** BOOST_FIXTURE_TEST_SUITE ************** //
+// ************************************************************************** //
+
+#define BOOST_FIXTURE_TEST_SUITE_WITH_DECOR(suite_name, F, decorators) \
+ BOOST_AUTO_TEST_SUITE_WITH_DECOR( suite_name, decorators ) \
+typedef F BOOST_AUTO_TEST_CASE_FIXTURE; \
+/**/
+
+#define BOOST_FIXTURE_TEST_SUITE_NO_DECOR( suite_name, F ) \
+ BOOST_AUTO_TEST_SUITE_NO_DECOR( suite_name ) \
+typedef F BOOST_AUTO_TEST_CASE_FIXTURE; \
+/**/
+
+#if BOOST_PP_VARIADICS
+
+#define BOOST_FIXTURE_TEST_SUITE( ... ) \
+ BOOST_TEST_INVOKE_IF_N_ARGS( 2, \
+ BOOST_FIXTURE_TEST_SUITE_NO_DECOR, \
+ BOOST_FIXTURE_TEST_SUITE_WITH_DECOR, \
+ __VA_ARGS__) \
+/**/
+
+#else /* BOOST_PP_VARIADICS */
+
+#define BOOST_FIXTURE_TEST_SUITE( suite_name, F ) \
+ BOOST_FIXTURE_TEST_SUITE_NO_DECOR( suite_name, F ) \
+/**/
+
+
+#endif /* BOOST_PP_VARIADICS */
+
+
+// ************************************************************************** //
+// ************** BOOST_AUTO_TEST_SUITE_END ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_SUITE_END() \
+BOOST_AUTO_TU_REGISTRAR( end_suite )( 1 ); \
+} \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES ************** //
+// ************************************************************************** //
+
+/// @deprecated use decorator instead
+#define BOOST_AUTO_TEST_CASE_EXPECTED_FAILURES( test_name, n ) \
+BOOST_TEST_DECORATOR( * boost::unit_test::expected_failures( n ) ) \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_FIXTURE_TEST_CASE ************** //
+// ************************************************************************** //
+
+#define BOOST_FIXTURE_TEST_CASE_WITH_DECOR( test_name, F, decorators ) \
+struct test_name : public F { void test_method(); }; \
+ \
+static void BOOST_AUTO_TC_INVOKER( test_name )() \
+{ \
+ BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture ctor"); \
+ test_name t; \
+ BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture setup"); \
+ boost::unit_test::setup_conditional(t); \
+ BOOST_TEST_CHECKPOINT('"' << #test_name << "\" test entry"); \
+ t.test_method(); \
+ BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture teardown"); \
+ boost::unit_test::teardown_conditional(t); \
+ BOOST_TEST_CHECKPOINT('"' << #test_name << "\" fixture dtor"); \
+} \
+ \
+struct BOOST_AUTO_TC_UNIQUE_ID( test_name ) {}; \
+ \
+BOOST_AUTO_TU_REGISTRAR( test_name )( \
+ boost::unit_test::make_test_case( \
+ &BOOST_AUTO_TC_INVOKER( test_name ), \
+ #test_name, __FILE__, __LINE__ ), \
+ decorators ); \
+ \
+void test_name::test_method() \
+/**/
+
+#define BOOST_FIXTURE_TEST_CASE_NO_DECOR( test_name, F ) \
+BOOST_FIXTURE_TEST_CASE_WITH_DECOR( test_name, F, \
+ boost::unit_test::decorator::collector_t::instance() ) \
+/**/
+
+#if BOOST_PP_VARIADICS
+
+#define BOOST_FIXTURE_TEST_CASE( ... ) \
+ BOOST_TEST_INVOKE_IF_N_ARGS( 2, \
+ BOOST_FIXTURE_TEST_CASE_NO_DECOR, \
+ BOOST_FIXTURE_TEST_CASE_WITH_DECOR, \
+ __VA_ARGS__) \
+/**/
+
+#else /* BOOST_PP_VARIADICS */
+
+#define BOOST_FIXTURE_TEST_CASE( test_name, F ) \
+ BOOST_FIXTURE_TEST_CASE_NO_DECOR(test_name, F) \
+/**/
+
+
+#endif /* BOOST_PP_VARIADICS */
+
+// ************************************************************************** //
+// ************** BOOST_AUTO_TEST_CASE ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_CASE_NO_DECOR( test_name ) \
+ BOOST_FIXTURE_TEST_CASE_NO_DECOR( test_name, \
+ BOOST_AUTO_TEST_CASE_FIXTURE ) \
+/**/
+
+#define BOOST_AUTO_TEST_CASE_WITH_DECOR( test_name, decorators ) \
+ BOOST_FIXTURE_TEST_CASE_WITH_DECOR( test_name, \
+ BOOST_AUTO_TEST_CASE_FIXTURE, decorators ) \
+/**/
+
+#if BOOST_PP_VARIADICS
+
+#define BOOST_AUTO_TEST_CASE( ... ) \
+ BOOST_TEST_INVOKE_IF_N_ARGS( 1, \
+ BOOST_AUTO_TEST_CASE_NO_DECOR, \
+ BOOST_AUTO_TEST_CASE_WITH_DECOR, \
+ __VA_ARGS__) \
+/**/
+
+#else /* BOOST_PP_VARIADICS */
+
+#define BOOST_AUTO_TEST_CASE( test_name ) \
+ BOOST_AUTO_TEST_CASE_NO_DECOR( test_name ) \
+/**/
+
+
+#endif /* BOOST_PP_VARIADICS */
+
+// ************************************************************************** //
+// ************** BOOST_FIXTURE_TEST_CASE_TEMPLATE ************** //
+// ************************************************************************** //
+
+#define BOOST_FIXTURE_TEST_CASE_TEMPLATE( test_name, type_name, TL, F ) \
+template<typename type_name> \
+struct test_name : public F \
+{ void test_method(); }; \
+ \
+struct BOOST_AUTO_TC_INVOKER( test_name ) { \
+ template<typename TestType> \
+ static void run( boost::type<TestType>* = 0 ) \
+ { \
+ BOOST_TEST_CHECKPOINT('"' << #test_name <<"\" fixture entry."); \
+ test_name<TestType> t; boost::unit_test::setup_conditional(t); \
+ BOOST_TEST_CHECKPOINT('"' << #test_name << "\" entry."); \
+ t.test_method(); \
+ BOOST_TEST_CHECKPOINT('"' << #test_name << "\" exit."); \
+ boost::unit_test::teardown_conditional(t); \
+ } \
+}; \
+ \
+BOOST_AUTO_TU_REGISTRAR( test_name )( \
+ boost::unit_test::ut_detail::template_test_case_gen< \
+ BOOST_AUTO_TC_INVOKER( test_name ),TL >( \
+ BOOST_STRINGIZE( test_name ), __FILE__, __LINE__ ), \
+ boost::unit_test::decorator::collector_t::instance() ); \
+ \
+template<typename type_name> \
+void test_name<type_name>::test_method() \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_AUTO_TEST_CASE_TEMPLATE ************** //
+// ************************************************************************** //
+
+#define BOOST_AUTO_TEST_CASE_TEMPLATE( test_name, type_name, TL ) \
+BOOST_FIXTURE_TEST_CASE_TEMPLATE( test_name, type_name, TL, \
+ BOOST_AUTO_TEST_CASE_FIXTURE ) \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_TEST_CASE_TEMPLATE ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_CASE_TEMPLATE( name, typelist ) \
+ boost::unit_test::ut_detail::template_test_case_gen<name,typelist>( \
+ BOOST_TEST_STRINGIZE( name ), __FILE__, __LINE__ ) \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_TEST_CASE_TEMPLATE_FUNCTION ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_CASE_TEMPLATE_FUNCTION( name, type_name ) \
+template<typename type_name> \
+void BOOST_JOIN( name, _impl )( boost::type<type_name>* ); \
+ \
+struct name { \
+ template<typename TestType> \
+ static void run( boost::type<TestType>* frwrd = 0 ) \
+ { \
+ BOOST_JOIN( name, _impl )( frwrd ); \
+ } \
+}; \
+ \
+template<typename type_name> \
+void BOOST_JOIN( name, _impl )( boost::type<type_name>* ) \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_GLOBAL_FIXTURE ************** //
+// ************************************************************************** //
+
+#define BOOST_GLOBAL_FIXTURE( F ) \
+static boost::unit_test::ut_detail::global_configuration_impl<F> BOOST_JOIN( gf_, F ) \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_TEST_GLOBAL_CONFIGURATION ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_GLOBAL_CONFIGURATION( F ) \
+static boost::unit_test::ut_detail::global_configuration_impl<F> BOOST_JOIN( gf_, F ) \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_TEST_GLOBAL_FIXTURE ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_GLOBAL_FIXTURE( F ) \
+static boost::unit_test::ut_detail::global_fixture_impl<F> BOOST_JOIN( gf_, F ) \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_TEST_DECORATOR ************** //
+// ************************************************************************** //
+
+#define BOOST_TEST_DECORATOR( D ) \
+static boost::unit_test::decorator::collector_t const& \
+BOOST_TEST_APPEND_UNIQUE_ID(decorator_collector) = D; \
+/**/
+
+// ************************************************************************** //
+// ************** BOOST_AUTO_TEST_CASE_FIXTURE ************** //
+// ************************************************************************** //
+
+namespace boost { namespace unit_test { namespace ut_detail {
+
+struct nil_t {};
+
+} // namespace ut_detail
+} // unit_test
+} // namespace boost
+
+// Intentionally is in global namespace, so that FIXTURE_TEST_SUITE can reset it in user code.
+typedef ::boost::unit_test::ut_detail::nil_t BOOST_AUTO_TEST_CASE_FIXTURE;
+
+// ************************************************************************** //
+// ************** Auto registration facility helper macros ************** //
+// ************************************************************************** //
+
+// Facility for having a unique name based on __LINE__ and __COUNTER__ (later if available)
+#if defined(__COUNTER__)
+ #define BOOST_TEST_INTERNAL_HAS_COUNTER
+#endif
+
+#if defined(BOOST_TEST_INTERNAL_HAS_COUNTER)
+ #define BOOST_TEST_APPEND_UNIQUE_ID( name ) \
+ BOOST_JOIN( BOOST_JOIN( name, __LINE__ ), __COUNTER__)
+ /**/
+#else
+ #define BOOST_TEST_APPEND_UNIQUE_ID( name ) \
+ BOOST_JOIN( name, __LINE__ )
+ /**/
+#endif
+/**/
+
+#define BOOST_AUTO_TU_REGISTRAR( test_name ) \
+static boost::unit_test::ut_detail::auto_test_unit_registrar \
+BOOST_TEST_APPEND_UNIQUE_ID( BOOST_JOIN( test_name, _registrar ) ) \
+/**/
+#define BOOST_AUTO_TC_INVOKER( test_name ) BOOST_JOIN( test_name, _invoker )
+#define BOOST_AUTO_TC_UNIQUE_ID( test_name ) BOOST_JOIN( test_name, _id )
+
+// ************************************************************************** //
+// ************** BOOST_TEST_MAIN ************** //
+// ************************************************************************** //
+
+#if defined(BOOST_TEST_MAIN)
+
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+bool init_unit_test() {
+#else
+::boost::unit_test::test_suite*
+init_unit_test_suite( int, char* [] ) {
+#endif
+
+#ifdef BOOST_TEST_MODULE
+ using namespace ::boost::unit_test;
+ assign_op( framework::master_test_suite().p_name.value, BOOST_TEST_STRINGIZE( BOOST_TEST_MODULE ).trim( "\"" ), 0 );
+
+#endif
+
+#ifdef BOOST_TEST_ALTERNATIVE_INIT_API
+ return true;
+}
+#else
+ return 0;
+}
+#endif
+
+#endif
+
+//____________________________________________________________________________//
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+
+#endif // BOOST_TEST_UNIT_TEST_SUITE_HPP_071894GER
+
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/algorithm.hpp b/src/third_party/boost-1.69.0/boost/test/utils/algorithm.hpp
index 7f16816c3a9..7f16816c3a9 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/algorithm.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/algorithm.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/assign_op.hpp b/src/third_party/boost-1.69.0/boost/test/utils/assign_op.hpp
index 89d8bfa9568..89d8bfa9568 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/assign_op.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/assign_op.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/basic_cstring.hpp b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring.hpp
index cec0214b736..cec0214b736 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/basic_cstring.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp
index f0622263d19..f0622263d19 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/basic_cstring_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp
index eb77f474c75..eb77f474c75 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/bcs_char_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/compare.hpp b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/compare.hpp
index b6dc15ab77c..b6dc15ab77c 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/compare.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/compare.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/io.hpp b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/io.hpp
index 02ccb126f8c..02ccb126f8c 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/basic_cstring/io.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/basic_cstring/io.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/class_properties.hpp b/src/third_party/boost-1.69.0/boost/test/utils/class_properties.hpp
index d4f3db3f2d8..d4f3db3f2d8 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/class_properties.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/class_properties.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/custom_manip.hpp b/src/third_party/boost-1.69.0/boost/test/utils/custom_manip.hpp
index d5ddaf5c077..d5ddaf5c077 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/custom_manip.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/custom_manip.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/foreach.hpp b/src/third_party/boost-1.69.0/boost/test/utils/foreach.hpp
index 68462ae7193..68462ae7193 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/foreach.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/foreach.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/is_cstring.hpp b/src/third_party/boost-1.69.0/boost/test/utils/is_cstring.hpp
index 12326b04187..12326b04187 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/is_cstring.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/is_cstring.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/is_forward_iterable.hpp b/src/third_party/boost-1.69.0/boost/test/utils/is_forward_iterable.hpp
new file mode 100644
index 00000000000..d6d8dd8a85f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/is_forward_iterable.hpp
@@ -0,0 +1,267 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//! @file
+//! Defines the is_forward_iterable collection type trait
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
+#define BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
+
+#if defined(BOOST_NO_CXX11_DECLTYPE) || \
+ defined(BOOST_NO_CXX11_NULLPTR) || \
+ defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES)
+
+ // this feature works with VC2012 upd 5 while BOOST_NO_CXX11_TRAILING_RESULT_TYPES is defined
+ #if !defined(BOOST_MSVC) || BOOST_MSVC_FULL_VER < 170061232 /* VC2012 upd 5 */
+ #define BOOST_TEST_FWD_ITERABLE_CXX03
+ #endif
+#endif
+
+#if defined(BOOST_TEST_FWD_ITERABLE_CXX03)
+// Boost
+#include <boost/mpl/bool.hpp>
+
+// STL
+#include <list>
+#include <vector>
+#include <map>
+#include <set>
+
+#else
+
+// Boost
+#include <boost/static_assert.hpp>
+#include <boost/utility/declval.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/test/utils/is_cstring.hpp>
+
+// STL
+#include <utility>
+#include <type_traits>
+
+#endif
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+
+template<typename T>
+struct is_forward_iterable;
+
+// ************************************************************************** //
+// ************** is_forward_iterable ************** //
+// ************************************************************************** //
+
+#if defined(BOOST_TEST_FWD_ITERABLE_CXX03) && !defined(BOOST_TEST_DOXYGEN_DOC__)
+template<typename T>
+struct is_forward_iterable : public mpl::false_ {};
+
+template<typename T>
+struct is_forward_iterable<T const> : public is_forward_iterable<T> {};
+
+template<typename T>
+struct is_forward_iterable<T&> : public is_forward_iterable<T> {};
+
+template<typename T, std::size_t N>
+struct is_forward_iterable< T [N] > : public mpl::true_ {};
+
+template<typename T, typename A>
+struct is_forward_iterable< std::vector<T, A> > : public mpl::true_ {};
+
+template<typename T, typename A>
+struct is_forward_iterable< std::list<T, A> > : public mpl::true_ {};
+
+template<typename K, typename V, typename C, typename A>
+struct is_forward_iterable< std::map<K, V, C, A> > : public mpl::true_ {};
+
+template<typename K, typename C, typename A>
+struct is_forward_iterable< std::set<K, C, A> > : public mpl::true_ {};
+
+// string is also forward iterable, even if sometimes we want to treat the
+// assertions differently.
+template<>
+struct is_forward_iterable< std::string > : public mpl::true_ {};
+
+#else
+
+namespace ut_detail {
+
+// SFINAE helper
+template<typename T>
+struct is_present : public mpl::true_ {};
+
+//____________________________________________________________________________//
+
+// some compiler do not implement properly decltype non expression involving members (eg. VS2013)
+// a workaround is to use -> decltype syntax.
+template <class T>
+struct has_member_size {
+private:
+ struct nil_t {};
+ template<typename U> static auto test( U* ) -> decltype(boost::declval<U>().size());
+ template<typename> static nil_t test( ... );
+
+public:
+ static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
+};
+
+//____________________________________________________________________________//
+
+template <class T>
+struct has_member_begin {
+private:
+ struct nil_t {};
+ template<typename U> static auto test( U* ) -> decltype(std::begin(boost::declval<U&>())); // does not work with boost::begin
+ template<typename> static nil_t test( ... );
+public:
+ static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
+};
+
+//____________________________________________________________________________//
+
+template <class T>
+struct has_member_end {
+private:
+ struct nil_t {};
+ template<typename U> static auto test( U* ) -> decltype(std::end(boost::declval<U&>())); // does not work with boost::end
+ template<typename> static nil_t test( ... );
+public:
+ static bool const value = !std::is_same< decltype(test<T>( nullptr )), nil_t>::value;
+};
+
+//____________________________________________________________________________//
+
+template <class T, class enabled = void>
+struct is_forward_iterable_impl : std::false_type {
+};
+
+template <class T>
+struct is_forward_iterable_impl<
+ T,
+ typename std::enable_if<
+ has_member_begin<T>::value &&
+ has_member_end<T>::value
+ >::type
+> : std::true_type
+{};
+
+//____________________________________________________________________________//
+
+template <class T, class enabled = void>
+struct is_container_forward_iterable_impl : std::false_type {
+};
+
+template <class T>
+struct is_container_forward_iterable_impl<
+ T,
+ typename std::enable_if<
+ is_present<typename T::const_iterator>::value &&
+ is_present<typename T::value_type>::value &&
+ has_member_size<T>::value &&
+ is_forward_iterable_impl<T>::value
+ >::type
+> : is_forward_iterable_impl<T>
+{};
+
+//____________________________________________________________________________//
+
+} // namespace ut_detail
+
+/*! Indicates that a specific type implements the forward iterable concept. */
+template<typename T>
+struct is_forward_iterable {
+ typedef typename std::remove_reference<T>::type T_ref;
+ typedef ut_detail::is_forward_iterable_impl<T_ref> is_fwd_it_t;
+ typedef mpl::bool_<is_fwd_it_t::value> type;
+ enum { value = is_fwd_it_t::value };
+};
+
+/*! Indicates that a specific type implements the forward iterable concept. */
+template<typename T>
+struct is_container_forward_iterable {
+ typedef typename std::remove_reference<T>::type T_ref;
+ typedef ut_detail::is_container_forward_iterable_impl<T_ref> is_fwd_it_t;
+ typedef mpl::bool_<is_fwd_it_t::value> type;
+ enum { value = is_fwd_it_t::value };
+};
+
+#endif /* defined(BOOST_TEST_FWD_ITERABLE_CXX03) */
+
+
+//! Helper structure for accessing the content of a container or an array
+template <typename T, bool is_forward_iterable = is_forward_iterable<T>::value >
+struct bt_iterator_traits;
+
+template <typename T>
+struct bt_iterator_traits< T, true >{
+ BOOST_STATIC_ASSERT((is_forward_iterable<T>::value));
+
+#if defined(BOOST_TEST_FWD_ITERABLE_CXX03) || \
+ (defined(BOOST_MSVC) && (BOOST_MSVC_FULL_VER <= 170061232))
+ typedef typename T::const_iterator const_iterator;
+ typedef typename std::iterator_traits<const_iterator>::value_type value_type;
+#else
+ typedef decltype(boost::declval<
+ typename boost::add_const<
+ typename boost::remove_reference<T>::type
+ >::type>().begin()) const_iterator;
+
+ typedef typename std::iterator_traits<const_iterator>::value_type value_type;
+#endif /* BOOST_TEST_FWD_ITERABLE_CXX03 */
+
+ static const_iterator begin(T const& container) {
+ return container.begin();
+ }
+ static const_iterator end(T const& container) {
+ return container.end();
+ }
+
+#if defined(BOOST_TEST_FWD_ITERABLE_CXX03) || \
+ (defined(BOOST_MSVC) && (BOOST_MSVC_FULL_VER <= 170061232))
+ static std::size_t
+ size(T const& container) {
+ return container.size();
+ }
+#else
+ static std::size_t
+ size(T const& container) {
+ return size(container,
+ std::integral_constant<bool, ut_detail::has_member_size<T>::value>());
+ }
+private:
+ static std::size_t
+ size(T const& container, std::true_type) { return container.size(); }
+
+ static std::size_t
+ size(T const& container, std::false_type) { return std::distance(begin(container), end(container)); }
+#endif /* BOOST_TEST_FWD_ITERABLE_CXX03 */
+};
+
+template <typename T, std::size_t N>
+struct bt_iterator_traits< T [N], true > {
+ typedef typename boost::add_const<T>::type T_const;
+ typedef typename boost::add_pointer<T_const>::type const_iterator;
+ typedef T value_type;
+
+ static const_iterator begin(T_const (&array)[N]) {
+ return &array[0];
+ }
+ static const_iterator end(T_const (&array)[N]) {
+ return &array[N];
+ }
+ static std::size_t size(T_const (&)[N]) {
+ return N;
+ }
+};
+
+} // namespace unit_test
+} // namespace boost
+
+#endif // BOOST_TEST_UTILS_IS_FORWARD_ITERABLE_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/iterator/input_iterator_facade.hpp b/src/third_party/boost-1.69.0/boost/test/utils/iterator/input_iterator_facade.hpp
index d695ee3a87e..d695ee3a87e 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/iterator/input_iterator_facade.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/iterator/input_iterator_facade.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/iterator/token_iterator.hpp b/src/third_party/boost-1.69.0/boost/test/utils/iterator/token_iterator.hpp
index e3a923a2ee5..e3a923a2ee5 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/iterator/token_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/iterator/token_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/lazy_ostream.hpp b/src/third_party/boost-1.69.0/boost/test/utils/lazy_ostream.hpp
index 26bd8ed3856..26bd8ed3856 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/lazy_ostream.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/lazy_ostream.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/named_params.hpp b/src/third_party/boost-1.69.0/boost/test/utils/named_params.hpp
index 50de5bfba03..50de5bfba03 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/named_params.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/named_params.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/rtti.hpp b/src/third_party/boost-1.69.0/boost/test/utils/rtti.hpp
index b230692d803..b230692d803 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/rtti.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/rtti.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/argument.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/argument.hpp
index 879ee96f9f0..879ee96f9f0 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/argument.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/argument.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/runtime/argument_factory.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/argument_factory.hpp
new file mode 100644
index 00000000000..e281cf93f7a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/argument_factory.hpp
@@ -0,0 +1,243 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : argument factories for different kinds of parameters
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_RUNTIME_ARGUMENT_FACTORY_HPP
+#define BOOST_TEST_UTILS_RUNTIME_ARGUMENT_FACTORY_HPP
+
+// Boost.Test Runtime parameters
+#include <boost/test/utils/runtime/errors.hpp>
+#include <boost/test/utils/runtime/argument.hpp>
+#include <boost/test/utils/runtime/modifier.hpp>
+
+// Boost.Test
+#include <boost/test/utils/basic_cstring/io.hpp>
+#include <boost/test/utils/basic_cstring/compare.hpp>
+#include <boost/test/utils/string_cast.hpp>
+
+// Boost
+#include <boost/function/function2.hpp>
+
+// STL
+#include <vector>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+namespace boost {
+namespace runtime {
+
+// ************************************************************************** //
+// ************** runtime::value_interpreter ************** //
+// ************************************************************************** //
+
+template<typename ValueType, bool is_enum>
+struct value_interpreter;
+
+//____________________________________________________________________________//
+
+template<typename ValueType>
+struct value_interpreter<ValueType, false> {
+ template<typename Modifiers>
+ explicit value_interpreter( Modifiers const& ) {}
+
+ ValueType interpret( cstring param_name, cstring source ) const
+ {
+ ValueType res;
+ if( !unit_test::utils::string_as<ValueType>( source, res ) )
+ BOOST_TEST_I_THROW( format_error( param_name ) << source <<
+ " can't be interpreted as value of parameter " << param_name << "." );
+ return res;
+ }
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct value_interpreter<std::string, false> {
+ template<typename Modifiers>
+ explicit value_interpreter( Modifiers const& ) {}
+
+ std::string interpret( cstring, cstring source ) const
+ {
+ return std::string( source.begin(), source.size() );
+ }
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct value_interpreter<cstring, false> {
+ template<typename Modifiers>
+ explicit value_interpreter( Modifiers const& ) {}
+
+ cstring interpret( cstring, cstring source ) const
+ {
+ return source;
+ }
+};
+
+//____________________________________________________________________________//
+
+template<>
+struct value_interpreter<bool, false> {
+ template<typename Modifiers>
+ explicit value_interpreter( Modifiers const& ) {}
+
+ bool interpret( cstring param_name, cstring source ) const
+ {
+ static cstring const s_YES( "YES" );
+ static cstring const s_Y( "Y" );
+ static cstring const s_NO( "NO" );
+ static cstring const s_N( "N" );
+ static cstring const s_TRUE( "TRUE" );
+ static cstring const s_FALSE( "FALSE" );
+ static cstring const s_one( "1" );
+ static cstring const s_zero( "0" );
+
+ source.trim();
+
+ if( source.is_empty() ||
+ case_ins_eq( source, s_YES ) ||
+ case_ins_eq( source, s_Y ) ||
+ case_ins_eq( source, s_one ) ||
+ case_ins_eq( source, s_TRUE ) )
+ return true;
+
+ if( case_ins_eq( source, s_NO ) ||
+ case_ins_eq( source, s_N ) ||
+ case_ins_eq( source, s_zero ) ||
+ case_ins_eq( source, s_FALSE ) )
+ return false;
+
+ BOOST_TEST_I_THROW( format_error( param_name ) << source << " can't be interpreted as bool value." );
+ }
+};
+
+//____________________________________________________________________________//
+
+template<typename EnumType>
+struct value_interpreter<EnumType, true> {
+ template<typename Modifiers>
+ explicit value_interpreter( Modifiers const& m )
+#if defined(BOOST_TEST_CLA_NEW_API)
+ : m_name_to_value( m[enum_values<EnumType>::value] )
+ {
+ }
+#else
+ {
+ std::vector<std::pair<cstring,EnumType> > const& values = m[enum_values<EnumType>::value];
+
+ m_name_to_value.insert( values.begin(), values.end() );
+ }
+#endif
+
+ EnumType interpret( cstring param_name, cstring source ) const
+ {
+ typename std::map<cstring,EnumType>::const_iterator found = m_name_to_value.find( source );
+
+ BOOST_TEST_I_ASSRT( found != m_name_to_value.end(),
+ format_error( param_name ) << source <<
+ " is not a valid enumeration value name for parameter " << param_name << "." );
+
+ return found->second;
+ }
+
+private:
+ // Data members
+ std::map<cstring,EnumType> m_name_to_value;
+};
+
+//____________________________________________________________________________//
+
+// ************************************************************************** //
+// ************** runtime::argument_factory ************** //
+// ************************************************************************** //
+
+template<typename ValueType, bool is_enum, bool repeatable>
+class argument_factory;
+
+//____________________________________________________________________________//
+
+template<typename ValueType, bool is_enum>
+class argument_factory<ValueType, is_enum, false> {
+public:
+ template<typename Modifiers>
+ explicit argument_factory( Modifiers const& m )
+ : m_interpreter( m )
+ , m_optional_value( nfp::opt_get( m, optional_value, ValueType() ) )
+ , m_default_value( nfp::opt_get( m, default_value, ValueType() ) )
+ {
+ }
+
+ void produce_argument( cstring source, cstring param_name, arguments_store& store ) const
+ {
+ store.set( param_name, source.empty() ? m_optional_value : m_interpreter.interpret( param_name, source ) );
+ }
+
+ void produce_default( cstring param_name, arguments_store& store ) const
+ {
+ store.set( param_name, m_default_value );
+ }
+
+private:
+ // Data members
+ typedef value_interpreter<ValueType, is_enum> interp_t;
+ interp_t m_interpreter;
+ ValueType m_optional_value;
+ ValueType m_default_value;
+};
+
+//____________________________________________________________________________//
+
+template<typename ValueType, bool is_enum>
+class argument_factory<ValueType, is_enum, true> {
+public:
+ template<typename Modifiers>
+ explicit argument_factory( Modifiers const& m )
+ : m_interpreter( m )
+ {
+ }
+
+ void produce_argument( cstring source, cstring param_name, arguments_store& store ) const
+ {
+ ValueType value = m_interpreter.interpret( param_name, source );
+
+ if( store.has( param_name ) ) {
+ std::vector<ValueType>& values = store.get<std::vector<ValueType> >( param_name );
+ values.push_back( value );
+ }
+ else {
+ std::vector<ValueType> values( 1, value );
+
+ store.set( param_name, values );
+ }
+
+ }
+ void produce_default( cstring param_name, arguments_store& store ) const
+ {
+ store.set( param_name, std::vector<ValueType>() );
+ }
+
+private:
+ // Data members
+ value_interpreter<ValueType, is_enum> m_interpreter;
+};
+
+//____________________________________________________________________________//
+
+} // namespace runtime
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_RUNTIME_ARGUMENT_FACTORY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/argv_traverser.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/argv_traverser.hpp
new file mode 100644
index 00000000000..d65c88e9205
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/argv_traverser.hpp
@@ -0,0 +1,106 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Use, modification, and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : defines facility to hide input traversing details
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_RUNTIME_CLA_ARGV_TRAVERSER_HPP
+#define BOOST_TEST_UTILS_RUNTIME_CLA_ARGV_TRAVERSER_HPP
+
+// Boost.Test Runtime parameters
+#include <boost/test/utils/runtime/fwd.hpp>
+#include <cstring>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+namespace boost {
+namespace runtime {
+namespace cla {
+
+// ************************************************************************** //
+// ************** runtime::cla::argv_traverser ************** //
+// ************************************************************************** //
+
+class argv_traverser {
+ typedef char const** argv_type;
+public:
+ /// Constructs traverser based on argc/argv pair
+ /// argv is taken "by reference" and later can be
+ /// updated in remainder method
+ argv_traverser( int argc, argv_type argv )
+ : m_argc( argc )
+ , m_curr_token( 0 )
+ , m_token_size( 0 )
+ , m_argv( argv )
+ {
+ // save program name
+ save_token();
+ }
+
+ /// Returns new argc
+ int remainder()
+ {
+ return m_argc;
+ }
+
+ /// Returns true, if we reached end on input
+ bool eoi() const
+ {
+ return m_curr_token == m_argc;
+ }
+
+ /// Returns current token in the input
+ cstring current_token()
+ {
+ if( eoi() )
+ return cstring();
+
+ return cstring( m_argv[m_curr_token], m_token_size );
+ }
+
+ /// Saves current token for remainder
+ void save_token()
+ {
+ ++m_curr_token;
+
+ if( !eoi() )
+ m_token_size = ::strlen( m_argv[m_curr_token] );
+ }
+
+ /// Commit current token and iterate to next one
+ void next_token()
+ {
+ if( !eoi() ) {
+ for( std::size_t i = m_curr_token; i < m_argc-1; ++i )
+ m_argv[i] = m_argv[i + 1];
+
+ --m_argc;
+
+ m_token_size = ::strlen( m_argv[m_curr_token] );
+ }
+ }
+
+private:
+
+ // Data members
+ std::size_t m_argc; // total number of arguments
+ std::size_t m_curr_token; // current token index in argv
+ std::size_t m_token_size; // current token size
+ argv_type m_argv; // all arguments
+};
+
+} // namespace cla
+} // namespace runtime
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_RUNTIME_CLA_ARGV_TRAVERSER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/parser.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/parser.hpp
new file mode 100644
index 00000000000..bd3df7090c5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/cla/parser.hpp
@@ -0,0 +1,625 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Use, modification, and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+//!@file
+//!@brief CLA parser
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_RUNTIME_CLA_PARSER_HPP
+#define BOOST_TEST_UTILS_RUNTIME_CLA_PARSER_HPP
+
+// Boost.Test Runtime parameters
+#include <boost/test/utils/runtime/argument.hpp>
+#include <boost/test/utils/runtime/modifier.hpp>
+#include <boost/test/utils/runtime/parameter.hpp>
+
+#include <boost/test/utils/runtime/cla/argv_traverser.hpp>
+
+// Boost.Test
+#include <boost/test/utils/foreach.hpp>
+#include <boost/test/utils/algorithm.hpp>
+#include <boost/test/detail/throw_exception.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+
+#include <boost/algorithm/cxx11/all_of.hpp> // !! ?? unnecessary after cxx11
+
+// STL
+// !! ?? #include <unordered_set>
+#include <set>
+#include <iostream>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+namespace boost {
+namespace runtime {
+namespace cla {
+
+// ************************************************************************** //
+// ************** runtime::cla::parameter_trie ************** //
+// ************************************************************************** //
+
+namespace rt_cla_detail {
+
+struct parameter_trie;
+typedef shared_ptr<parameter_trie> parameter_trie_ptr;
+typedef std::map<char,parameter_trie_ptr> trie_per_char;
+typedef std::vector<boost::reference_wrapper<parameter_cla_id const> > param_cla_id_list;
+
+struct parameter_trie {
+ parameter_trie() : m_has_final_candidate( false ) {}
+
+ /// If subtrie corresponding to the char c exists returns it otherwise creates new
+ parameter_trie_ptr make_subtrie( char c )
+ {
+ trie_per_char::const_iterator it = m_subtrie.find( c );
+
+ if( it == m_subtrie.end() )
+ it = m_subtrie.insert( std::make_pair( c, parameter_trie_ptr( new parameter_trie ) ) ).first;
+
+ return it->second;
+ }
+
+ /// Creates series of sub-tries per characters in a string
+ parameter_trie_ptr make_subtrie( cstring s )
+ {
+ parameter_trie_ptr res;
+
+ BOOST_TEST_FOREACH( char, c, s )
+ res = (res ? res->make_subtrie( c ) : make_subtrie( c ));
+
+ return res;
+ }
+
+ /// Registers candidate parameter for this subtrie. If final, it needs to be unique
+ void add_candidate_id( parameter_cla_id const& param_id, basic_param_ptr param_candidate, bool final )
+ {
+ BOOST_TEST_I_ASSRT( !m_has_final_candidate && (!final || m_id_candidates.empty()),
+ conflicting_param() << "Parameter cla id " << param_id.m_tag << " conflicts with the "
+ << "parameter cla id " << m_id_candidates.back().get().m_tag );
+
+ m_has_final_candidate = final;
+ m_id_candidates.push_back( ref(param_id) );
+
+ if( m_id_candidates.size() == 1 )
+ m_param_candidate = param_candidate;
+ else
+ m_param_candidate.reset();
+ }
+
+ /// Gets subtrie for specified char if present or nullptr otherwise
+ parameter_trie_ptr get_subtrie( char c ) const
+ {
+ trie_per_char::const_iterator it = m_subtrie.find( c );
+
+ return it != m_subtrie.end() ? it->second : parameter_trie_ptr();
+ }
+
+ // Data members
+ trie_per_char m_subtrie;
+ param_cla_id_list m_id_candidates;
+ basic_param_ptr m_param_candidate;
+ bool m_has_final_candidate;
+};
+
+// ************************************************************************** //
+// ************** runtime::cla::report_foreing_token ************** //
+// ************************************************************************** //
+
+static void
+report_foreing_token( cstring program_name, cstring token )
+{
+ std::cerr << "Boost.Test WARNING: token \"" << token << "\" does not correspond to the Boost.Test argument \n"
+ << " and should be placed after all Boost.Test arguments and the -- separator.\n"
+ << " For example: " << program_name << " --random -- " << token << "\n";
+}
+
+} // namespace rt_cla_detail
+
+// ************************************************************************** //
+// ************** runtime::cla::parser ************** //
+// ************************************************************************** //
+
+class parser {
+public:
+ /// Initializes a parser and builds internal trie representation used for
+ /// parsing based on the supplied parameters
+#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+ template<typename Modifiers=nfp::no_params_type>
+ parser( parameters_store const& parameters, Modifiers const& m = nfp::no_params )
+#else
+ template<typename Modifiers>
+ parser( parameters_store const& parameters, Modifiers const& m )
+#endif
+ {
+ nfp::opt_assign( m_end_of_param_indicator, m, end_of_params );
+ nfp::opt_assign( m_negation_prefix, m, negation_prefix );
+
+ BOOST_TEST_I_ASSRT( algorithm::all_of( m_end_of_param_indicator.begin(),
+ m_end_of_param_indicator.end(),
+ parameter_cla_id::valid_prefix_char ),
+ invalid_cla_id() << "End of parameters indicator can only consist of prefix characters." );
+
+ BOOST_TEST_I_ASSRT( algorithm::all_of( m_negation_prefix.begin(),
+ m_negation_prefix.end(),
+ parameter_cla_id::valid_name_char ),
+ invalid_cla_id() << "Negation prefix can only consist of prefix characters." );
+
+ build_trie( parameters );
+ }
+
+ // input processing method
+ int
+ parse( int argc, char** argv, runtime::arguments_store& res )
+ {
+ // save program name for help message
+ m_program_name = argv[0];
+ cstring path_sep( "\\/" );
+
+ cstring::iterator it = unit_test::utils::find_last_of( m_program_name.begin(), m_program_name.end(),
+ path_sep.begin(), path_sep.end() );
+ if( it != m_program_name.end() )
+ m_program_name.trim_left( it + 1 );
+
+ // Set up the traverser
+ argv_traverser tr( argc, (char const**)argv );
+
+ // Loop till we reach end of input
+ while( !tr.eoi() ) {
+ cstring curr_token = tr.current_token();
+
+ cstring prefix;
+ cstring name;
+ cstring value_separator;
+ bool negative_form = false;
+
+ // Perform format validations and split the argument into prefix, name and separator
+ // False return value indicates end of params indicator is met
+ if( !validate_token_format( curr_token, prefix, name, value_separator, negative_form ) ) {
+ // get rid of "end of params" token
+ tr.next_token();
+ break;
+ }
+
+ // Locate trie corresponding to found prefix and skip it in the input
+ trie_ptr curr_trie = m_param_trie[prefix];
+
+ if( !curr_trie ) {
+ // format_error() << "Unrecognized parameter prefix in the argument " << tr.current_token()
+ rt_cla_detail::report_foreing_token( m_program_name, curr_token );
+ tr.save_token();
+ continue;
+ }
+
+ curr_token.trim_left( prefix.size() );
+
+ // Locate parameter based on a name and skip it in the input
+ locate_result locate_res = locate_parameter( curr_trie, name, curr_token );
+ parameter_cla_id const& found_id = locate_res.first;
+ basic_param_ptr found_param = locate_res.second;
+
+ if( negative_form ) {
+ BOOST_TEST_I_ASSRT( found_id.m_negatable,
+ format_error( found_param->p_name )
+ << "Parameter tag " << found_id.m_tag << " is not negatable." );
+
+ curr_token.trim_left( m_negation_prefix.size() );
+ }
+
+ curr_token.trim_left( name.size() );
+
+ bool should_go_to_next = true;
+ cstring value;
+
+
+ // Skip validations if parameter has optional value and we are at the end of token
+ if( !value_separator.is_empty() || !found_param->p_has_optional_value ) {
+
+ // we are given a separator or there is no optional value
+
+ // Validate and skip value separator in the input
+ BOOST_TEST_I_ASSRT( found_id.m_value_separator == value_separator,
+ format_error( found_param->p_name )
+ << "Invalid separator for the parameter "
+ << found_param->p_name
+ << " in the argument " << tr.current_token() );
+
+ curr_token.trim_left( value_separator.size() );
+
+ // Deduce value source
+ value = curr_token;
+ if( value.is_empty() ) {
+ tr.next_token();
+ value = tr.current_token();
+ }
+
+ BOOST_TEST_I_ASSRT( !value.is_empty(),
+ format_error( found_param->p_name )
+ << "Missing an argument value for the parameter "
+ << found_param->p_name
+ << " in the argument " << tr.current_token() );
+ }
+ else if( (value_separator.is_empty() && found_id.m_value_separator.empty()) ) {
+ // Deduce value source
+ value = curr_token;
+ if( value.is_empty() ) {
+ tr.next_token(); // tokenization broke the value, we check the next one
+
+ if(!found_param->p_has_optional_value) {
+ // there is no separator and there is no optional value
+ // we look for the value on the next token
+ // example "-t XXXX" (no default)
+ // and we commit this value as being the passed value
+ value = tr.current_token();
+ }
+ else {
+ // there is no separator and the value is optional
+ // we check the next token
+ // example "-c" (defaults to true)
+ // and commit this as the value if this is not a token
+ cstring value_check = tr.current_token();
+
+ cstring prefix_test, name_test, value_separator_test;
+ bool negative_form_test;
+ if( validate_token_format( value_check, prefix_test, name_test, value_separator_test, negative_form_test )
+ && m_param_trie[prefix_test]) {
+ // this is a token, we consume what we have
+ should_go_to_next = false;
+ }
+ else {
+ // this is a value, we commit it
+ value = value_check;
+ }
+ }
+ }
+ }
+
+ // Validate against argument duplication
+ BOOST_TEST_I_ASSRT( !res.has( found_param->p_name ) || found_param->p_repeatable,
+ duplicate_arg( found_param->p_name )
+ << "Duplicate argument value for the parameter "
+ << found_param->p_name
+ << " in the argument " << tr.current_token() );
+
+ // Produce argument value
+ found_param->produce_argument( value, negative_form, res );
+
+ if(should_go_to_next) {
+ tr.next_token();
+ }
+ }
+
+ // generate the remainder and return it's size
+ return tr.remainder();
+ }
+
+ // help/usage/version
+ void
+ version( std::ostream& ostr )
+ {
+ ostr << "Boost.Test module ";
+
+#if defined(BOOST_TEST_MODULE)
+ // we do not want to refer to the master test suite there
+ ostr << '\'' << BOOST_TEST_STRINGIZE( BOOST_TEST_MODULE ).trim( "\"" ) << "' ";
+#endif
+
+ ostr << "in executable '" << m_program_name << "'\n";
+ ostr << "Compiled from Boost version "
+ << BOOST_VERSION/100000 << "."
+ << BOOST_VERSION/100 % 1000 << "."
+ << BOOST_VERSION % 100 ;
+ ostr << " with ";
+#if defined(BOOST_TEST_INCLUDED)
+ ostr << "header-only inclusion of";
+#elif defined(BOOST_TEST_DYN_LINK)
+ ostr << "dynamic linking to";
+#else
+ ostr << "static linking to";
+#endif
+ ostr << " Boost.Test\n";
+ ostr << "- Compiler: " << BOOST_COMPILER << '\n'
+ << "- Platform: " << BOOST_PLATFORM << '\n'
+ << "- STL : " << BOOST_STDLIB;
+ ostr << std::endl;
+ }
+
+ void
+ usage(std::ostream& ostr,
+ cstring param_name = cstring(),
+ bool use_color = true)
+ {
+ namespace utils = unit_test::utils;
+ namespace ut_detail = unit_test::ut_detail;
+
+ if( !param_name.is_empty() ) {
+ basic_param_ptr param = locate_parameter( m_param_trie[help_prefix], param_name, "" ).second;
+ param->usage( ostr, m_negation_prefix );
+ }
+ else {
+ ostr << "\n The program '" << m_program_name << "' is a Boost.test module containing unit tests.";
+
+ {
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::ORIGINAL );
+ ostr << "\n\n Usage\n ";
+ }
+
+ {
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::GREEN );
+ ostr << m_program_name << " [Boost.Test argument]... ";
+ }
+ if( !m_end_of_param_indicator.empty() ) {
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW );
+ ostr << '[' << m_end_of_param_indicator << " [custom test module argument]...]";
+ }
+ }
+
+ ostr << "\n\n Use\n ";
+ {
+
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::GREEN );
+ ostr << m_program_name << " --help";
+ }
+ ostr << "\n or ";
+ {
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::GREEN );
+ ostr << m_program_name << " --help=<parameter name>";
+ }
+ ostr << "\n for detailed help on Boost.Test parameters.\n";
+ }
+
+ void
+ help(std::ostream& ostr,
+ parameters_store const& parameters,
+ cstring param_name,
+ bool use_color = true)
+ {
+ namespace utils = unit_test::utils;
+ namespace ut_detail = unit_test::ut_detail;
+
+ if( !param_name.is_empty() ) {
+ basic_param_ptr param = locate_parameter( m_param_trie[help_prefix], param_name, "" ).second;
+ param->help( ostr, m_negation_prefix, use_color);
+ return;
+ }
+
+ usage(ostr, cstring(), use_color);
+
+ ostr << "\n\n";
+ {
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::ORIGINAL );
+ ostr << " Command line flags:\n";
+ }
+ runtime::commandline_pretty_print(
+ ostr,
+ " ",
+ "The command line flags of Boost.Test are listed below. "
+ "All parameters are optional. You can specify parameter value either "
+ "as a command line argument or as a value of its corresponding environment "
+ "variable. If a flag is specified as a command line argument and an environment variable "
+ "at the same time, the command line takes precedence. "
+ "The command line argument "
+ "support name guessing, and works with shorter names as long as those are not ambiguous."
+ );
+
+ if( !m_end_of_param_indicator.empty() ) {
+ ostr << "\n\n All the arguments after the '";
+ {
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW );
+ ostr << m_end_of_param_indicator;
+ }
+ ostr << "' are ignored by Boost.Test.";
+ }
+
+
+ {
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::ORIGINAL );
+ ostr << "\n\n Environment variables:\n";
+ }
+ runtime::commandline_pretty_print(
+ ostr,
+ " ",
+ "Every argument listed below may also be set by a corresponding environment"
+ "variable. For an argument '--argument_x=<value>', the corresponding "
+ "environment variable is 'BOOST_TEST_ARGUMENT_X=value"
+ );
+
+
+
+ ostr << "\n\n The following parameters are supported:\n";
+
+ BOOST_TEST_FOREACH(
+ parameters_store::storage_type::value_type const&,
+ v,
+ parameters.all() )
+ {
+ basic_param_ptr param = v.second;
+ ostr << "\n";
+ param->usage( ostr, m_negation_prefix, use_color);
+ }
+
+ }
+
+private:
+ typedef rt_cla_detail::parameter_trie_ptr trie_ptr;
+ typedef rt_cla_detail::trie_per_char trie_per_char;
+ typedef std::map<cstring,trie_ptr> str_to_trie;
+
+ void
+ build_trie( parameters_store const& parameters )
+ {
+ // Iterate over all parameters
+ BOOST_TEST_FOREACH( parameters_store::storage_type::value_type const&, v, parameters.all() ) {
+ basic_param_ptr param = v.second;
+
+ // Register all parameter's ids in trie.
+ BOOST_TEST_FOREACH( parameter_cla_id const&, id, param->cla_ids() ) {
+ // This is the trie corresponding to the prefix.
+ trie_ptr next_trie = m_param_trie[id.m_prefix];
+ if( !next_trie )
+ next_trie = m_param_trie[id.m_prefix] = trie_ptr( new rt_cla_detail::parameter_trie );
+
+ // Build the trie, by following name's characters
+ // and register this parameter as candidate on each level
+ for( size_t index = 0; index < id.m_tag.size(); ++index ) {
+ next_trie = next_trie->make_subtrie( id.m_tag[index] );
+
+ next_trie->add_candidate_id( id, param, index == (id.m_tag.size() - 1) );
+ }
+ }
+ }
+ }
+
+ bool
+ validate_token_format( cstring token, cstring& prefix, cstring& name, cstring& separator, bool& negative_form )
+ {
+ // Match prefix
+ cstring::iterator it = token.begin();
+ while( it != token.end() && parameter_cla_id::valid_prefix_char( *it ) )
+ ++it;
+
+ prefix.assign( token.begin(), it );
+
+ if( prefix.empty() )
+ return true;
+
+ // Match name
+ while( it != token.end() && parameter_cla_id::valid_name_char( *it ) )
+ ++it;
+
+ name.assign( prefix.end(), it );
+
+ if( name.empty() ) {
+ if( prefix == m_end_of_param_indicator )
+ return false;
+
+ BOOST_TEST_I_THROW( format_error() << "Invalid format for an actual argument " << token );
+ }
+
+ // Match value separator
+ while( it != token.end() && parameter_cla_id::valid_separator_char( *it ) )
+ ++it;
+
+ separator.assign( name.end(), it );
+
+ // Match negation prefix
+ negative_form = !m_negation_prefix.empty() && ( name.substr( 0, m_negation_prefix.size() ) == m_negation_prefix );
+ if( negative_form )
+ name.trim_left( m_negation_prefix.size() );
+
+ return true;
+ }
+
+ // C++03: cannot have references as types
+ typedef std::pair<parameter_cla_id, basic_param_ptr> locate_result;
+
+ locate_result
+ locate_parameter( trie_ptr curr_trie, cstring name, cstring token )
+ {
+ std::vector<trie_ptr> typo_candidates;
+ std::vector<trie_ptr> next_typo_candidates;
+ trie_ptr next_trie;
+
+ BOOST_TEST_FOREACH( char, c, name ) {
+ if( curr_trie ) {
+ // locate next subtrie corresponding to the char
+ next_trie = curr_trie->get_subtrie( c );
+
+ if( next_trie )
+ curr_trie = next_trie;
+ else {
+ // Initiate search for typo candicates. We will account for 'wrong char' typo
+ // 'missing char' typo and 'extra char' typo
+ BOOST_TEST_FOREACH( trie_per_char::value_type const&, typo_cand, curr_trie->m_subtrie ) {
+ // 'wrong char' typo
+ typo_candidates.push_back( typo_cand.second );
+
+ // 'missing char' typo
+ if( (next_trie = typo_cand.second->get_subtrie( c )) )
+ typo_candidates.push_back( next_trie );
+ }
+
+ // 'extra char' typo
+ typo_candidates.push_back( curr_trie );
+
+ curr_trie.reset();
+ }
+ }
+ else {
+ // go over existing typo candidates and see if they are still viable
+ BOOST_TEST_FOREACH( trie_ptr, typo_cand, typo_candidates ) {
+ trie_ptr next_typo_cand = typo_cand->get_subtrie( c );
+
+ if( next_typo_cand )
+ next_typo_candidates.push_back( next_typo_cand );
+ }
+
+ next_typo_candidates.swap( typo_candidates );
+ next_typo_candidates.clear();
+ }
+ }
+
+ if( !curr_trie ) {
+ std::vector<cstring> typo_candidate_names;
+ std::set<parameter_cla_id const*> unique_typo_candidate; // !! ?? unordered_set
+ typo_candidate_names.reserve( typo_candidates.size() );
+// !! ?? unique_typo_candidate.reserve( typo_candidates.size() );
+
+ BOOST_TEST_FOREACH( trie_ptr, trie_cand, typo_candidates ) {
+ // avoid ambiguos candidate trie
+ if( trie_cand->m_id_candidates.size() > 1 )
+ continue;
+
+ BOOST_TEST_FOREACH( parameter_cla_id const&, param_cand, trie_cand->m_id_candidates ) {
+ if( !unique_typo_candidate.insert( &param_cand ).second )
+ continue;
+
+ typo_candidate_names.push_back( param_cand.m_tag );
+ }
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_TEST_I_THROW( unrecognized_param( std::move(typo_candidate_names) )
+ << "An unrecognized parameter in the argument "
+ << token );
+#else
+ BOOST_TEST_I_THROW( unrecognized_param( typo_candidate_names )
+ << "An unrecognized parameter in the argument "
+ << token );
+#endif
+ }
+
+ if( curr_trie->m_id_candidates.size() > 1 ) {
+ std::vector<cstring> amb_names;
+ BOOST_TEST_FOREACH( parameter_cla_id const&, param_id, curr_trie->m_id_candidates )
+ amb_names.push_back( param_id.m_tag );
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ BOOST_TEST_I_THROW( ambiguous_param( std::move( amb_names ) )
+ << "An ambiguous parameter name in the argument " << token );
+#else
+ BOOST_TEST_I_THROW( ambiguous_param( amb_names )
+ << "An ambiguous parameter name in the argument " << token );
+#endif
+ }
+
+ return locate_result( curr_trie->m_id_candidates.back().get(), curr_trie->m_param_candidate );
+ }
+
+ // Data members
+ cstring m_program_name;
+ std::string m_end_of_param_indicator;
+ std::string m_negation_prefix;
+ str_to_trie m_param_trie;
+};
+
+} // namespace cla
+} // namespace runtime
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_RUNTIME_CLA_PARSER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/env/fetch.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/env/fetch.hpp
index 97d54d4905f..97d54d4905f 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/env/fetch.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/env/fetch.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/runtime/errors.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/errors.hpp
new file mode 100644
index 00000000000..056a823e338
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/errors.hpp
@@ -0,0 +1,195 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : defines runtime parameters setup error
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_RUNTIME_INIT_ERROR_HPP
+#define BOOST_TEST_UTILS_RUNTIME_INIT_ERROR_HPP
+
+// Boost.Test Runtime parameters
+#include <boost/test/utils/runtime/fwd.hpp>
+
+// Boost.Test
+#include <boost/test/utils/string_cast.hpp>
+
+// Boost.Test
+#include <boost/config.hpp>
+
+// STL
+#include <exception>
+#include <vector>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+namespace boost {
+namespace runtime {
+
+// ************************************************************************** //
+// ************** runtime::param_error ************** //
+// ************************************************************************** //
+
+class BOOST_SYMBOL_VISIBLE param_error : public std::exception {
+public:
+ ~param_error() BOOST_NOEXCEPT_OR_NOTHROW {}
+
+ virtual const char * what() const BOOST_NOEXCEPT_OR_NOTHROW
+ {
+ return msg.c_str();
+ }
+
+ cstring param_name;
+ std::string msg;
+
+protected:
+ explicit param_error( cstring param_name_ ) : param_name( param_name_) {}
+};
+
+//____________________________________________________________________________//
+
+class BOOST_SYMBOL_VISIBLE init_error : public param_error {
+protected:
+ explicit init_error( cstring param_name ) : param_error( param_name ) {}
+ ~init_error() BOOST_NOEXCEPT_OR_NOTHROW {}
+};
+
+class input_error : public param_error {
+protected:
+ explicit input_error( cstring param_name ) : param_error( param_name ) {}
+ ~input_error() BOOST_NOEXCEPT_OR_NOTHROW {}
+};
+
+//____________________________________________________________________________//
+
+template<typename Derived, typename Base>
+class BOOST_SYMBOL_VISIBLE specific_param_error : public Base {
+protected:
+ explicit specific_param_error( cstring param_name ) : Base( param_name ) {}
+ ~specific_param_error() BOOST_NOEXCEPT_OR_NOTHROW {}
+
+public:
+
+//____________________________________________________________________________//
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
+ !defined(BOOST_NO_CXX11_REF_QUALIFIERS)
+
+ Derived operator<<(char const* val) &&
+ {
+ this->msg.append( val );
+
+ return static_cast<Derived&&>(*this);
+ }
+
+ //____________________________________________________________________________//
+
+ template<typename T>
+ Derived operator<<(T const& val) &&
+ {
+ this->msg.append( unit_test::utils::string_cast( val ) );
+
+ return static_cast<Derived&&>(*this);
+ }
+
+ //____________________________________________________________________________//
+
+#else
+
+ Derived const& operator<<(char const* val) const
+ {
+ const_cast<specific_param_error<Derived, Base>&>(*this).msg.append( val );
+
+ return static_cast<Derived const&>(*this);
+ }
+
+ //____________________________________________________________________________//
+
+ template<typename T>
+ Derived const& operator<<(T const& val) const
+ {
+ const_cast<specific_param_error<Derived, Base>&>(*this).msg.append( unit_test::utils::string_cast( val ) );
+
+ return static_cast<Derived const&>(*this);
+ }
+
+ //____________________________________________________________________________//
+
+#endif
+
+};
+
+
+
+// ************************************************************************** //
+// ************** specific exception types ************** //
+// ************************************************************************** //
+
+#define SPECIFIC_EX_TYPE( type, base ) \
+class type : public specific_param_error<type,base> { \
+public: \
+ explicit type( cstring param_name = cstring() ) \
+ : specific_param_error<type,base>( param_name ) \
+ {} \
+} \
+/**/
+
+SPECIFIC_EX_TYPE( invalid_cla_id, init_error );
+SPECIFIC_EX_TYPE( duplicate_param, init_error );
+SPECIFIC_EX_TYPE( conflicting_param, init_error );
+SPECIFIC_EX_TYPE( unknown_param, init_error );
+SPECIFIC_EX_TYPE( access_to_missing_argument, init_error );
+SPECIFIC_EX_TYPE( arg_type_mismatch, init_error );
+SPECIFIC_EX_TYPE( invalid_param_spec, init_error );
+
+SPECIFIC_EX_TYPE( format_error, input_error );
+SPECIFIC_EX_TYPE( duplicate_arg, input_error );
+SPECIFIC_EX_TYPE( missing_req_arg, input_error );
+
+#undef SPECIFIC_EX_TYPE
+
+class BOOST_SYMBOL_VISIBLE ambiguous_param : public specific_param_error<ambiguous_param, input_error> {
+public:
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ explicit ambiguous_param( std::vector<cstring>&& amb_candidates )
+ : specific_param_error<ambiguous_param,input_error>( "" )
+ , m_amb_candidates( std::move( amb_candidates ) ) {}
+#else
+ explicit ambiguous_param( std::vector<cstring> const& amb_candidates )
+ : specific_param_error<ambiguous_param,input_error>( "" )
+ , m_amb_candidates( amb_candidates ) {}
+#endif
+ ~ambiguous_param() BOOST_NOEXCEPT_OR_NOTHROW {}
+
+ std::vector<cstring> m_amb_candidates;
+};
+
+class unrecognized_param : public specific_param_error<unrecognized_param, input_error> {
+public:
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ explicit unrecognized_param( std::vector<cstring>&& type_candidates )
+ : specific_param_error<unrecognized_param,input_error>( "" )
+ , m_typo_candidates( std::move( type_candidates ) ) {}
+#else
+ explicit unrecognized_param( std::vector<cstring> const& type_candidates )
+ : specific_param_error<unrecognized_param,input_error>( "" )
+ , m_typo_candidates( type_candidates ) {}
+#endif
+ ~unrecognized_param() BOOST_NOEXCEPT_OR_NOTHROW {}
+
+ std::vector<cstring> m_typo_candidates;
+};
+
+} // namespace runtime
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_RUNTIME_INIT_ERROR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/finalize.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/finalize.hpp
index 181428550c1..181428550c1 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/finalize.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/finalize.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/runtime/fwd.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/fwd.hpp
index 17ae8812226..17ae8812226 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/runtime/fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/runtime/modifier.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/modifier.hpp
new file mode 100644
index 00000000000..78c8817e7c3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/modifier.hpp
@@ -0,0 +1,107 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Use, modification, and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : parameter modifiers
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP
+#define BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP
+
+// Boost.Test Runtime parameters
+#include <boost/test/utils/runtime/fwd.hpp>
+
+// Boost.Test
+#include <boost/test/utils/named_params.hpp>
+#include <boost/test/detail/global_typedef.hpp>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+
+// New CLA API available only for some C++11 compilers
+#if !defined(BOOST_NO_CXX11_AUTO_DECLARATIONS) \
+ && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) \
+ && !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) \
+ && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+#define BOOST_TEST_CLA_NEW_API
+#endif
+
+namespace boost {
+namespace runtime {
+
+// ************************************************************************** //
+// ************** environment variable modifiers ************** //
+// ************************************************************************** //
+
+namespace {
+
+#ifdef BOOST_TEST_CLA_NEW_API
+auto const& description = unit_test::static_constant<nfp::typed_keyword<cstring,struct description_t>>::value;
+auto const& help = unit_test::static_constant<nfp::typed_keyword<cstring,struct help_t>>::value;
+auto const& env_var = unit_test::static_constant<nfp::typed_keyword<cstring,struct env_var_t>>::value;
+auto const& end_of_params = unit_test::static_constant<nfp::typed_keyword<cstring,struct end_of_params_t>>::value;
+auto const& negation_prefix = unit_test::static_constant<nfp::typed_keyword<cstring,struct neg_prefix_t>>::value;
+auto const& value_hint = unit_test::static_constant<nfp::typed_keyword<cstring,struct value_hint_t>>::value;
+auto const& optional_value = unit_test::static_constant<nfp::keyword<struct optional_value_t>>::value;
+auto const& default_value = unit_test::static_constant<nfp::keyword<struct default_value_t>>::value;
+auto const& callback = unit_test::static_constant<nfp::keyword<struct callback_t>>::value;
+
+template<typename EnumType>
+using enum_values = unit_test::static_constant<
+ nfp::typed_keyword<std::initializer_list<std::pair<const cstring,EnumType>>, struct enum_values_t>
+>;
+
+#else
+
+nfp::typed_keyword<cstring,struct description_t> description;
+nfp::typed_keyword<cstring,struct help_t> help;
+nfp::typed_keyword<cstring,struct env_var_t> env_var;
+nfp::typed_keyword<cstring,struct end_of_params_t> end_of_params;
+nfp::typed_keyword<cstring,struct neg_prefix_t> negation_prefix;
+nfp::typed_keyword<cstring,struct value_hint_t> value_hint;
+nfp::keyword<struct optional_value_t> optional_value;
+nfp::keyword<struct default_value_t> default_value;
+nfp::keyword<struct callback_t> callback;
+
+template<typename EnumType>
+struct enum_values_list {
+ typedef std::pair<cstring,EnumType> ElemT;
+ typedef std::vector<ElemT> ValuesT;
+
+ enum_values_list const&
+ operator()( cstring k, EnumType v ) const
+ {
+ const_cast<enum_values_list*>(this)->m_values.push_back( ElemT( k, v ) );
+
+ return *this;
+ }
+
+ operator ValuesT const&() const { return m_values; }
+
+private:
+ ValuesT m_values;
+};
+
+template<typename EnumType>
+struct enum_values : unit_test::static_constant<
+ nfp::typed_keyword<enum_values_list<EnumType>, struct enum_values_t> >
+{
+};
+
+#endif
+
+} // local namespace
+
+} // namespace runtime
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_RUNTIME_MODIFIER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/runtime/parameter.hpp b/src/third_party/boost-1.69.0/boost/test/utils/runtime/parameter.hpp
new file mode 100644
index 00000000000..01e5457bfef
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/runtime/parameter.hpp
@@ -0,0 +1,526 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : formal parameter definition
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_RUNTIME_PARAMETER_HPP
+#define BOOST_TEST_UTILS_RUNTIME_PARAMETER_HPP
+
+// Boost.Test Runtime parameters
+#include <boost/test/utils/runtime/fwd.hpp>
+#include <boost/test/utils/runtime/modifier.hpp>
+#include <boost/test/utils/runtime/argument.hpp>
+#include <boost/test/utils/runtime/argument_factory.hpp>
+
+// Boost.Test
+#include <boost/test/utils/class_properties.hpp>
+#include <boost/test/utils/foreach.hpp>
+#include <boost/test/utils/setcolor.hpp>
+
+// Boost
+#include <boost/function.hpp>
+#include <boost/algorithm/cxx11/all_of.hpp>
+
+// STL
+#include <algorithm>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+namespace boost {
+namespace runtime {
+
+inline
+std::ostream& commandline_pretty_print(
+ std::ostream& ostr,
+ std::string const& prefix,
+ std::string const& to_print) {
+
+ const int split_at = 80;
+
+ std::string::size_type current = 0;
+
+ while(current < to_print.size()) {
+
+ // discards spaces at the beginning
+ std::string::size_type startpos = to_print.find_first_not_of(" \t\n", current);
+ current += startpos - current;
+
+ bool has_more_lines = (current + split_at) < to_print.size();
+
+ if(has_more_lines) {
+ std::string::size_type endpos = to_print.find_last_of(" \t\n", current + split_at);
+ std::string sub(to_print.substr(current, endpos - current));
+ ostr << prefix << sub;
+ ostr << "\n";
+ current += endpos - current;
+ }
+ else
+ {
+ ostr << prefix << to_print.substr(current, split_at);
+ current += split_at;
+ }
+ }
+ return ostr;
+}
+
+// ************************************************************************** //
+// ************** runtime::parameter_cla_id ************** //
+// ************************************************************************** //
+// set of attributes identifying the parameter in the command line
+
+struct parameter_cla_id {
+ parameter_cla_id( cstring prefix, cstring tag, cstring value_separator, bool negatable )
+ : m_prefix( prefix.begin(), prefix.size() )
+ , m_tag( tag.begin(), tag.size() )
+ , m_value_separator( value_separator.begin(), value_separator.size() )
+ , m_negatable( negatable )
+ {
+
+ BOOST_TEST_I_ASSRT( algorithm::all_of( m_prefix.begin(), m_prefix.end(), valid_prefix_char ),
+ invalid_cla_id() << "Parameter " << m_tag
+ << " has invalid characters in prefix." );
+
+ BOOST_TEST_I_ASSRT( algorithm::all_of( m_tag.begin(), m_tag.end(), valid_name_char ),
+ invalid_cla_id() << "Parameter " << m_tag
+ << " has invalid characters in name." );
+
+ BOOST_TEST_I_ASSRT( algorithm::all_of( m_value_separator.begin(), m_value_separator.end(), valid_separator_char ),
+ invalid_cla_id() << "Parameter " << m_tag
+ << " has invalid characters in value separator." );
+ }
+
+ static bool valid_prefix_char( char c )
+ {
+ return c == '-' || c == '/' ;
+ }
+ static bool valid_separator_char( char c )
+ {
+ return c == '=' || c == ':' || c == ' ' || c == '\0';
+ }
+ static bool valid_name_char( char c )
+ {
+ return std::isalnum( c ) || c == '+' || c == '_' || c == '?';
+ }
+
+ std::string m_prefix;
+ std::string m_tag;
+ std::string m_value_separator;
+ bool m_negatable;
+};
+
+typedef std::vector<parameter_cla_id> param_cla_ids;
+
+// ************************************************************************** //
+// ************** runtime::basic_param ************** //
+// ************************************************************************** //
+
+cstring const help_prefix("////");
+
+class basic_param {
+ typedef function<void (cstring)> callback_type;
+ typedef unit_test::readwrite_property<bool> bool_property;
+
+protected:
+ /// Constructor with modifiers
+ template<typename Modifiers>
+ basic_param( cstring name, bool is_optional, bool is_repeatable, Modifiers const& m )
+ : p_name( name.begin(), name.end() )
+ , p_description( nfp::opt_get( m, description, std::string() ) )
+ , p_help( nfp::opt_get( m, runtime::help, std::string() ) )
+ , p_env_var( nfp::opt_get( m, env_var, std::string() ) )
+ , p_value_hint( nfp::opt_get( m, value_hint, std::string() ) )
+ , p_optional( is_optional )
+ , p_repeatable( is_repeatable )
+ , p_has_optional_value( m.has( optional_value ) )
+ , p_has_default_value( m.has( default_value ) || is_repeatable )
+ , p_callback( nfp::opt_get( m, callback, callback_type() ) )
+ {
+ add_cla_id( help_prefix, name, ":" );
+ }
+
+public:
+ virtual ~basic_param() {}
+
+ // Pubic properties
+ std::string const p_name;
+ std::string const p_description;
+ std::string const p_help;
+ std::string const p_env_var;
+ std::string const p_value_hint;
+ bool const p_optional;
+ bool const p_repeatable;
+ bool_property p_has_optional_value;
+ bool_property p_has_default_value;
+ callback_type const p_callback;
+
+ /// interface for cloning typed parameters
+ virtual basic_param_ptr clone() const = 0;
+
+ /// Access methods
+ param_cla_ids const& cla_ids() const { return m_cla_ids; }
+ void add_cla_id( cstring prefix, cstring tag, cstring value_separator )
+ {
+ add_cla_id_impl( prefix, tag, value_separator, false, true );
+ }
+
+ /// interface for producing argument values for this parameter
+ virtual void produce_argument( cstring token, bool negative_form, arguments_store& store ) const = 0;
+ virtual void produce_default( arguments_store& store ) const = 0;
+
+ /// interfaces for help message reporting
+ virtual void usage( std::ostream& ostr, cstring negation_prefix_, bool use_color = true )
+ {
+ namespace utils = unit_test::utils;
+ namespace ut_detail = unit_test::ut_detail;
+
+ //
+ ostr << " ";
+ {
+
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::GREEN );
+ ostr << p_name;
+ }
+
+ ostr << '\n';
+
+ if( !p_description.empty() ) {
+ commandline_pretty_print(ostr, " ", p_description) << '\n';
+ }
+
+ BOOST_TEST_FOREACH( parameter_cla_id const&, id, cla_ids() ) {
+ if( id.m_prefix == help_prefix )
+ continue;
+
+ ostr << " " << id.m_prefix;
+
+ if( id.m_negatable )
+ cla_name_help( ostr, id.m_tag, negation_prefix_, use_color );
+ else
+ cla_name_help( ostr, id.m_tag, "", use_color );
+
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW );
+ bool optional_value_ = false;
+
+ if( p_has_optional_value ) {
+ optional_value_ = true;
+ ostr << '[';
+ }
+
+
+ if( id.m_value_separator.empty() )
+ ostr << ' ';
+ else {
+ ostr << id.m_value_separator;
+ }
+
+ value_help( ostr );
+
+ if( optional_value_ )
+ ostr << ']';
+
+ ostr << '\n';
+ }
+ }
+
+ virtual void help( std::ostream& ostr, cstring negation_prefix_, bool use_color = true )
+ {
+ usage( ostr, negation_prefix_, use_color );
+
+ if( !p_help.empty() ) {
+ ostr << '\n';
+ commandline_pretty_print(ostr, " ", p_help);
+ }
+ }
+
+protected:
+ void add_cla_id_impl( cstring prefix,
+ cstring tag,
+ cstring value_separator,
+ bool negatable,
+ bool validate_value_separator )
+ {
+ BOOST_TEST_I_ASSRT( !tag.is_empty(),
+ invalid_cla_id() << "Parameter can't have an empty name." );
+
+ BOOST_TEST_I_ASSRT( !prefix.is_empty(),
+ invalid_cla_id() << "Parameter " << tag
+ << " can't have an empty prefix." );
+
+ BOOST_TEST_I_ASSRT( !value_separator.is_empty(),
+ invalid_cla_id() << "Parameter " << tag
+ << " can't have an empty value separator." );
+
+ // We trim value separator from all the spaces, so token end will indicate separator
+ value_separator.trim();
+ BOOST_TEST_I_ASSRT( !validate_value_separator || !value_separator.is_empty() || !p_has_optional_value,
+ invalid_cla_id() << "Parameter " << tag
+ << " with optional value attribute can't use space as value separator." );
+
+ m_cla_ids.push_back( parameter_cla_id( prefix, tag, value_separator, negatable ) );
+ }
+
+private:
+ /// interface for usage/help customization
+ virtual void cla_name_help( std::ostream& ostr, cstring cla_tag, cstring /*negation_prefix_*/, bool /*use_color*/ = true) const
+ {
+ ostr << cla_tag;
+ }
+ virtual void value_help( std::ostream& ostr ) const
+ {
+ if( p_value_hint.empty() )
+ ostr << "<value>";
+ else
+ ostr << p_value_hint;
+ }
+
+ // Data members
+ param_cla_ids m_cla_ids;
+};
+
+// ************************************************************************** //
+// ************** runtime::parameter ************** //
+// ************************************************************************** //
+
+enum args_amount {
+ OPTIONAL_PARAM, // 0-1
+ REQUIRED_PARAM, // exactly 1
+ REPEATABLE_PARAM // 0-N
+};
+
+//____________________________________________________________________________//
+
+template<typename ValueType, args_amount a = runtime::OPTIONAL_PARAM, bool is_enum = false>
+class parameter : public basic_param {
+public:
+ /// Constructor with modifiers
+#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+ template<typename Modifiers=nfp::no_params_type>
+ parameter( cstring name, Modifiers const& m = nfp::no_params )
+#else
+ template<typename Modifiers>
+ parameter( cstring name, Modifiers const& m )
+#endif
+ : basic_param( name, a != runtime::REQUIRED_PARAM, a == runtime::REPEATABLE_PARAM, m )
+ , m_arg_factory( m )
+ {
+ BOOST_TEST_I_ASSRT( !m.has( default_value ) || a == runtime::OPTIONAL_PARAM,
+ invalid_param_spec() << "Parameter " << name
+ << " is not optional and can't have default_value." );
+
+ BOOST_TEST_I_ASSRT( !m.has( optional_value ) || !this->p_repeatable,
+ invalid_param_spec() << "Parameter " << name
+ << " is repeatable and can't have optional_value." );
+ }
+
+private:
+ virtual basic_param_ptr clone() const
+ {
+ return basic_param_ptr( new parameter( *this ) );
+ }
+ virtual void produce_argument( cstring token, bool , arguments_store& store ) const
+ {
+ m_arg_factory.produce_argument( token, this->p_name, store );
+ }
+ virtual void produce_default( arguments_store& store ) const
+ {
+ if( !this->p_has_default_value )
+ return;
+
+ m_arg_factory.produce_default( this->p_name, store );
+ }
+
+ // Data members
+ typedef argument_factory<ValueType, is_enum, a == runtime::REPEATABLE_PARAM> factory_t;
+ factory_t m_arg_factory;
+};
+
+//____________________________________________________________________________//
+
+class option : public basic_param {
+public:
+ /// Constructor with modifiers
+#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+ template<typename Modifiers=nfp::no_params_type>
+ option( cstring name, Modifiers const& m = nfp::no_params )
+#else
+ template<typename Modifiers>
+ option( cstring name, Modifiers const& m )
+#endif
+ : basic_param( name, true, false, nfp::opt_append( nfp::opt_append( m, optional_value = true), default_value = false) )
+ , m_arg_factory( nfp::opt_append( nfp::opt_append( m, optional_value = true), default_value = false) )
+ {
+ }
+
+ void add_cla_id( cstring prefix, cstring tag, cstring value_separator, bool negatable = false )
+ {
+ add_cla_id_impl( prefix, tag, value_separator, negatable, false );
+ }
+
+private:
+ virtual basic_param_ptr clone() const
+ {
+ return basic_param_ptr( new option( *this ) );
+ }
+
+ virtual void produce_argument( cstring token, bool negative_form, arguments_store& store ) const
+ {
+ if( token.empty() )
+ store.set( p_name, !negative_form );
+ else {
+ BOOST_TEST_I_ASSRT( !negative_form,
+ format_error( p_name ) << "Can't set value to negative form of the argument." );
+
+ m_arg_factory.produce_argument( token, p_name, store );
+ }
+ }
+
+ virtual void produce_default( arguments_store& store ) const
+ {
+ m_arg_factory.produce_default( p_name, store );
+ }
+ virtual void cla_name_help( std::ostream& ostr, cstring cla_tag, cstring negation_prefix_, bool use_color = true ) const
+ {
+ namespace utils = unit_test::utils;
+ namespace ut_detail = unit_test::ut_detail;
+
+ if( !negation_prefix_.is_empty() ) {
+ BOOST_TEST_SCOPE_SETCOLOR( use_color, ostr, term_attr::BRIGHT, term_color::YELLOW );
+ ostr << '[' << negation_prefix_ << ']';
+ }
+ ostr << cla_tag;
+ }
+ virtual void value_help( std::ostream& ostr ) const
+ {
+ if( p_value_hint.empty() )
+ ostr << "<boolean value>";
+ else
+ ostr << p_value_hint;
+ }
+
+ // Data members
+ typedef argument_factory<bool, false, false> factory_t;
+ factory_t m_arg_factory;
+};
+
+//____________________________________________________________________________//
+
+template<typename EnumType, args_amount a = runtime::OPTIONAL_PARAM>
+class enum_parameter : public parameter<EnumType, a, true> {
+ typedef parameter<EnumType, a, true> base;
+public:
+ /// Constructor with modifiers
+#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+ template<typename Modifiers=nfp::no_params_type>
+ enum_parameter( cstring name, Modifiers const& m = nfp::no_params )
+#else
+ template<typename Modifiers>
+ enum_parameter( cstring name, Modifiers const& m )
+#endif
+ : base( name, m )
+ {
+#ifdef BOOST_TEST_CLA_NEW_API
+ auto const& values = m[enum_values<EnumType>::value];
+ auto it = values.begin();
+#else
+ std::vector<std::pair<cstring, EnumType> > const& values = m[enum_values<EnumType>::value];
+ typename std::vector<std::pair<cstring, EnumType> >::const_iterator it = values.begin();
+#endif
+ while( it != values.end() ) {
+ m_valid_names.push_back( it->first );
+ ++it;
+ }
+ }
+
+private:
+ virtual basic_param_ptr clone() const
+ {
+ return basic_param_ptr( new enum_parameter( *this ) );
+ }
+
+ virtual void value_help( std::ostream& ostr ) const
+ {
+ if( this->p_value_hint.empty() ) {
+ ostr << "<";
+ bool first = true;
+ BOOST_TEST_FOREACH( cstring, name, m_valid_names ) {
+ if( first )
+ first = false;
+ else
+ ostr << '|';
+ ostr << name;
+ }
+ ostr << ">";
+ }
+ else
+ ostr << this->p_value_hint;
+ }
+
+ // Data members
+ std::vector<cstring> m_valid_names;
+};
+
+
+// ************************************************************************** //
+// ************** runtime::parameters_store ************** //
+// ************************************************************************** //
+
+class parameters_store {
+ struct lg_compare {
+ bool operator()( cstring lh, cstring rh ) const
+ {
+ return std::lexicographical_compare(lh.begin(), lh.end(),
+ rh.begin(), rh.end());
+ }
+ };
+public:
+
+ typedef std::map<cstring, basic_param_ptr, lg_compare> storage_type;
+
+ /// Adds parameter into the persistent store
+ void add( basic_param const& in )
+ {
+ basic_param_ptr p = in.clone();
+
+ BOOST_TEST_I_ASSRT( m_parameters.insert( std::make_pair( cstring(p->p_name), p ) ).second,
+ duplicate_param() << "Parameter " << p->p_name << " is duplicate." );
+ }
+
+ /// Returns true if there is no parameters registered
+ bool is_empty() const { return m_parameters.empty(); }
+ /// Returns map of all the registered parameter
+ storage_type const& all() const { return m_parameters; }
+ /// Returns true if parameter with psecified name is registered
+ bool has( cstring name ) const
+ {
+ return m_parameters.find( name ) != m_parameters.end();
+ }
+ /// Returns map of all the registered parameter
+ basic_param_ptr get( cstring name ) const
+ {
+ storage_type::const_iterator const& found = m_parameters.find( name );
+ BOOST_TEST_I_ASSRT( found != m_parameters.end(),
+ unknown_param() << "Parameter " << name << " is unknown." );
+
+ return found->second;
+ }
+
+private:
+ // Data members
+ storage_type m_parameters;
+};
+
+} // namespace runtime
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_RUNTIME_PARAMETER_HPP
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/setcolor.hpp b/src/third_party/boost-1.69.0/boost/test/utils/setcolor.hpp
new file mode 100644
index 00000000000..915c9962a39
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/setcolor.hpp
@@ -0,0 +1,318 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : contains definition for setcolor iostream manipulator
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_SETCOLOR_HPP
+#define BOOST_TEST_UTILS_SETCOLOR_HPP
+
+// Boost.Test
+#include <boost/test/detail/config.hpp>
+
+// STL
+#include <iostream>
+#include <cstdio>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+#ifdef _WIN32
+ #include <windows.h>
+
+ #if defined(__MINGW32__) && !defined(COMMON_LVB_UNDERSCORE)
+ // mingw badly mimicking windows.h
+ #define COMMON_LVB_UNDERSCORE 0x8000
+ #endif
+#endif
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace utils {
+
+// ************************************************************************** //
+// ************** term_attr ************** //
+// ************************************************************************** //
+
+struct term_attr { enum _ {
+ NORMAL = 0,
+ BRIGHT = 1,
+ DIM = 2,
+ UNDERLINE = 4,
+ BLINK = 5,
+ REVERSE = 7,
+ CROSSOUT = 9
+}; };
+
+// ************************************************************************** //
+// ************** term_color ************** //
+// ************************************************************************** //
+
+struct term_color { enum _ {
+ BLACK = 0,
+ RED = 1,
+ GREEN = 2,
+ YELLOW = 3,
+ BLUE = 4,
+ MAGENTA = 5,
+ CYAN = 6,
+ WHITE = 7,
+ ORIGINAL = 9
+}; };
+
+// ************************************************************************** //
+// ************** setcolor ************** //
+// ************************************************************************** //
+
+#ifndef _WIN32
+class setcolor {
+public:
+ // Constructor
+ explicit setcolor( bool is_color_output = false,
+ term_attr::_ attr = term_attr::NORMAL,
+ term_color::_ fg = term_color::ORIGINAL,
+ term_color::_ bg = term_color::ORIGINAL )
+ : m_is_color_output(is_color_output)
+ {
+ m_command_size = std::sprintf( m_control_command, "%c[%d;%d;%dm", 0x1B, attr, fg + 30, bg + 40 );
+ }
+
+ friend std::ostream&
+ operator<<( std::ostream& os, setcolor const& sc )
+ {
+ if (sc.m_is_color_output && (&os == &std::cout || &os == &std::cerr)) {
+ return os.write( sc.m_control_command, sc.m_command_size );
+ }
+ return os;
+ }
+
+private:
+ // Data members
+ bool m_is_color_output;
+ char m_control_command[13];
+ int m_command_size;
+};
+
+#else
+
+class setcolor {
+
+protected:
+ void set_console_color(std::ostream& os, WORD *attributes = NULL) const {
+ if (!m_is_color_output) {
+ return;
+ }
+ DWORD console_type;
+ if (&os == &std::cout) {
+ console_type = STD_OUTPUT_HANDLE;
+ }
+ else if (&os == &std::cerr) {
+ console_type = STD_ERROR_HANDLE;
+ }
+ else {
+ return;
+ }
+ HANDLE hConsole = GetStdHandle(console_type);
+
+ if(hConsole == INVALID_HANDLE_VALUE || hConsole == NULL )
+ return;
+
+ if(attributes != NULL) {
+ SetConsoleTextAttribute(hConsole, *attributes);
+ return;
+ }
+
+ CONSOLE_SCREEN_BUFFER_INFO consoleInfo;
+ GetConsoleScreenBufferInfo(hConsole, &consoleInfo);
+ saved_attributes = consoleInfo.wAttributes;
+
+ WORD fg_attr = 0;
+ switch(m_fg)
+ {
+ case term_color::WHITE:
+ fg_attr = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE;
+ break;
+ case term_color::BLACK:
+ fg_attr = 0;
+ break;
+ case term_color::RED:
+ fg_attr = FOREGROUND_RED;
+ break;
+ case term_color::GREEN:
+ fg_attr = FOREGROUND_GREEN;
+ break;
+ case term_color::CYAN:
+ fg_attr = FOREGROUND_GREEN | FOREGROUND_BLUE;
+ break;
+ case term_color::MAGENTA:
+ fg_attr = FOREGROUND_RED | FOREGROUND_BLUE;
+ break;
+ case term_color::BLUE:
+ fg_attr = FOREGROUND_BLUE;
+ break;
+ case term_color::YELLOW:
+ fg_attr = FOREGROUND_RED | FOREGROUND_GREEN;
+ break;
+ case term_color::ORIGINAL:
+ default:
+ fg_attr = saved_attributes & (FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
+ break;
+ }
+
+ WORD bg_attr = 0;
+ switch(m_bg)
+ {
+ case term_color::BLACK:
+ bg_attr = 0;
+ break;
+ case term_color::WHITE:
+ bg_attr = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE;
+ break;
+ case term_color::RED:
+ bg_attr = BACKGROUND_RED;
+ break;
+ case term_color::GREEN:
+ bg_attr = BACKGROUND_GREEN;
+ break;
+ case term_color::BLUE:
+ bg_attr = BACKGROUND_BLUE;
+ break;
+ case term_color::ORIGINAL:
+ default:
+ bg_attr = saved_attributes & (BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE);
+ break;
+ }
+
+ WORD text_attr = 0;
+ switch(m_attr)
+ {
+ case term_attr::BRIGHT:
+ text_attr = FOREGROUND_INTENSITY;
+ break;
+ case term_attr::UNDERLINE:
+ text_attr = COMMON_LVB_UNDERSCORE;
+ break;
+ default:
+ break;
+ }
+
+ SetConsoleTextAttribute(hConsole, fg_attr | bg_attr | text_attr);
+ return;
+ }
+
+public:
+ // Constructor
+ explicit setcolor(
+ bool is_color_output = false,
+ term_attr::_ attr = term_attr::NORMAL,
+ term_color::_ fg = term_color::ORIGINAL,
+ term_color::_ bg = term_color::ORIGINAL )
+ : m_is_color_output(is_color_output)
+ , m_attr(attr)
+ , m_fg(fg)
+ , m_bg(bg)
+ {}
+
+ friend std::ostream&
+ operator<<( std::ostream& os, setcolor const& sc )
+ {
+ sc.set_console_color(os);
+ return os;
+ }
+
+private:
+ bool m_is_color_output;
+ term_attr::_ m_attr;
+ term_color::_ m_fg;
+ term_color::_ m_bg;
+
+protected:
+ // Data members
+ mutable WORD saved_attributes;
+};
+
+#endif
+// ************************************************************************** //
+// ************** scope_setcolor ************** //
+// ************************************************************************** //
+
+#ifndef _WIN32
+
+struct scope_setcolor {
+ scope_setcolor() : m_os( 0 ) {}
+ explicit scope_setcolor( bool is_color_output,
+ std::ostream& os,
+ term_attr::_ attr = term_attr::NORMAL,
+ term_color::_ fg = term_color::ORIGINAL,
+ term_color::_ bg = term_color::ORIGINAL )
+ : m_os( &os )
+ , m_is_color_output( is_color_output )
+ {
+ os << setcolor( is_color_output, attr, fg, bg );
+ }
+ ~scope_setcolor()
+ {
+ if( m_os )
+ *m_os << setcolor( m_is_color_output );
+ }
+private:
+ scope_setcolor(const scope_setcolor& r);
+ scope_setcolor& operator=(const scope_setcolor& r);
+ // Data members
+ std::ostream* m_os;
+ bool m_is_color_output;
+};
+
+#else
+
+struct scope_setcolor : setcolor {
+ scope_setcolor() : m_os( 0 ) {}
+ explicit scope_setcolor(
+ bool is_color_output,
+ std::ostream& os,
+ term_attr::_ attr = term_attr::NORMAL,
+ term_color::_ fg = term_color::ORIGINAL,
+ term_color::_ bg = term_color::ORIGINAL )
+ : setcolor(is_color_output, attr, fg, bg)
+ , m_os( &os )
+ {
+ os << *this;
+ }
+
+ ~scope_setcolor()
+ {
+ if (m_os) {
+ set_console_color(*m_os, &this->saved_attributes);
+ }
+ }
+private:
+ scope_setcolor(const scope_setcolor& r);
+ scope_setcolor& operator=(const scope_setcolor& r);
+ // Data members
+ std::ostream* m_os;
+};
+
+
+#endif
+
+#define BOOST_TEST_SCOPE_SETCOLOR( is_color_output, os, attr, color ) \
+ utils::scope_setcolor const sc(is_color_output, os, utils::attr, utils::color); \
+ ut_detail::ignore_unused_variable_warning( sc ) \
+/**/
+
+} // namespace utils
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_SETCOLOR_HPP
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/string_cast.hpp b/src/third_party/boost-1.69.0/boost/test/utils/string_cast.hpp
index 3c069a84034..3c069a84034 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/string_cast.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/string_cast.hpp
diff --git a/src/third_party/boost-1.68.0/boost/test/utils/wrap_stringstream.hpp b/src/third_party/boost-1.69.0/boost/test/utils/wrap_stringstream.hpp
index 425d7ed75bf..425d7ed75bf 100644
--- a/src/third_party/boost-1.68.0/boost/test/utils/wrap_stringstream.hpp
+++ b/src/third_party/boost-1.69.0/boost/test/utils/wrap_stringstream.hpp
diff --git a/src/third_party/boost-1.69.0/boost/test/utils/xml_printer.hpp b/src/third_party/boost-1.69.0/boost/test/utils/xml_printer.hpp
new file mode 100644
index 00000000000..7892f9c4ce4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/test/utils/xml_printer.hpp
@@ -0,0 +1,145 @@
+// (C) Copyright Gennadiy Rozental 2001.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/test for the library home page.
+//
+// File : $RCSfile$
+//
+// Version : $Revision$
+//
+// Description : common code used by any agent serving as OF_XML printer
+// ***************************************************************************
+
+#ifndef BOOST_TEST_UTILS_XML_PRINTER_HPP
+#define BOOST_TEST_UTILS_XML_PRINTER_HPP
+
+// Boost.Test
+#include <boost/test/detail/global_typedef.hpp>
+#include <boost/test/utils/basic_cstring/basic_cstring.hpp>
+#include <boost/test/utils/custom_manip.hpp>
+#include <boost/test/utils/foreach.hpp>
+#include <boost/test/utils/basic_cstring/io.hpp>
+
+// Boost
+#include <boost/config.hpp>
+
+// STL
+#include <iostream>
+#include <map>
+
+#include <boost/test/detail/suppress_warnings.hpp>
+
+//____________________________________________________________________________//
+
+namespace boost {
+namespace unit_test {
+namespace utils {
+
+// ************************************************************************** //
+// ************** xml print helpers ************** //
+// ************************************************************************** //
+
+inline void
+print_escaped( std::ostream& where_to, const_string value )
+{
+#if !defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST) && !defined(BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX)
+ static std::map<char,char const*> const char_type{{
+ {'<' , "lt"},
+ {'>' , "gt"},
+ {'&' , "amp"},
+ {'\'', "apos"},
+ {'"' , "quot"}
+ }};
+#else
+ static std::map<char,char const*> char_type;
+
+ if( char_type.empty() ) {
+ char_type['<'] = "lt";
+ char_type['>'] = "gt";
+ char_type['&'] = "amp";
+ char_type['\'']= "apos";
+ char_type['"'] = "quot";
+ }
+#endif
+
+ BOOST_TEST_FOREACH( char, c, value ) {
+ std::map<char,char const*>::const_iterator found_ref = char_type.find( c );
+
+ if( found_ref != char_type.end() )
+ where_to << '&' << found_ref->second << ';';
+ else
+ where_to << c;
+ }
+}
+
+//____________________________________________________________________________//
+
+inline void
+print_escaped( std::ostream& where_to, std::string const& value )
+{
+ print_escaped( where_to, const_string( value ) );
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline void
+print_escaped( std::ostream& where_to, T const& value )
+{
+ where_to << value;
+}
+
+//____________________________________________________________________________//
+
+inline void
+print_escaped_cdata( std::ostream& where_to, const_string value )
+{
+ static const_string cdata_end( "]]>" );
+
+ const_string::size_type pos = value.find( cdata_end );
+ if( pos == const_string::npos )
+ where_to << value;
+ else {
+ where_to << value.substr( 0, pos+2 ) << cdata_end
+ << BOOST_TEST_L( "<![CDATA[" ) << value.substr( pos+2 );
+ }
+}
+
+//____________________________________________________________________________//
+
+typedef custom_manip<struct attr_value_t> attr_value;
+
+template<typename T>
+inline std::ostream&
+operator<<( custom_printer<attr_value> const& p, T const& value )
+{
+ *p << "=\"";
+ print_escaped( *p, value );
+ *p << '"';
+
+ return *p;
+}
+
+//____________________________________________________________________________//
+
+typedef custom_manip<struct cdata_t> cdata;
+
+inline std::ostream&
+operator<<( custom_printer<cdata> const& p, const_string value )
+{
+ *p << BOOST_TEST_L( "<![CDATA[" );
+ print_escaped_cdata( *p, value );
+ return *p << BOOST_TEST_L( "]]>" );
+}
+
+//____________________________________________________________________________//
+
+} // namespace utils
+} // namespace unit_test
+} // namespace boost
+
+#include <boost/test/detail/enable_warnings.hpp>
+
+#endif // BOOST_TEST_UTILS_XML_PRINTER_HPP
diff --git a/src/third_party/boost-1.68.0/boost/thread.hpp b/src/third_party/boost-1.69.0/boost/thread.hpp
index 892bbb853bd..892bbb853bd 100644
--- a/src/third_party/boost-1.68.0/boost/thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/thread.hpp
diff --git a/src/third_party/boost-1.69.0/boost/thread/barrier.hpp b/src/third_party/boost-1.69.0/boost/thread/barrier.hpp
new file mode 100644
index 00000000000..4c1b1b59a0d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/barrier.hpp
@@ -0,0 +1,255 @@
+// Copyright (C) 2002-2003
+// David Moore, William E. Kempf
+// Copyright (C) 2007-8 Anthony Williams
+// (C) Copyright 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_BARRIER_JDM030602_HPP
+#define BOOST_BARRIER_JDM030602_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/detail/delete.hpp>
+
+#include <boost/throw_exception.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/lock_types.hpp>
+#include <boost/thread/condition_variable.hpp>
+#include <string>
+#include <stdexcept>
+#include <boost/thread/detail/nullary_function.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/utility/result_of.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace thread_detail
+ {
+ typedef detail::nullary_function<void()> void_completion_function;
+ typedef detail::nullary_function<size_t()> size_completion_function;
+
+ struct default_barrier_reseter
+ {
+ unsigned int size_;
+ default_barrier_reseter(unsigned int size) :
+ size_(size)
+ {
+ }
+ BOOST_THREAD_MOVABLE(default_barrier_reseter)
+ //BOOST_THREAD_COPYABLE_AND_MOVABLE(default_barrier_reseter)
+
+ default_barrier_reseter(default_barrier_reseter const& other) BOOST_NOEXCEPT :
+ size_(other.size_)
+ {
+ }
+ default_barrier_reseter(BOOST_THREAD_RV_REF(default_barrier_reseter) other) BOOST_NOEXCEPT :
+ size_(BOOST_THREAD_RV(other).size_)
+ {
+ }
+
+ unsigned int operator()()
+ {
+ return size_;
+ }
+ };
+
+ struct void_functor_barrier_reseter
+ {
+ unsigned int size_;
+ void_completion_function fct_;
+ template <typename F>
+ void_functor_barrier_reseter(unsigned int size, BOOST_THREAD_RV_REF(F) funct)
+ : size_(size), fct_(boost::move(funct))
+ {}
+ template <typename F>
+ void_functor_barrier_reseter(unsigned int size, F& funct)
+ : size_(size), fct_(funct)
+ {}
+
+ BOOST_THREAD_MOVABLE(void_functor_barrier_reseter)
+ //BOOST_THREAD_COPYABLE_AND_MOVABLE(void_functor_barrier_reseter)
+
+ void_functor_barrier_reseter(void_functor_barrier_reseter const& other) BOOST_NOEXCEPT :
+ size_(other.size_), fct_(other.fct_)
+ {
+ }
+ void_functor_barrier_reseter(BOOST_THREAD_RV_REF(void_functor_barrier_reseter) other) BOOST_NOEXCEPT :
+ size_(BOOST_THREAD_RV(other).size_), fct_(BOOST_THREAD_RV(other).fct_)
+ //size_(BOOST_THREAD_RV(other).size_), fct_(boost::move(BOOST_THREAD_RV(other).fct_))
+ {
+ }
+
+ unsigned int operator()()
+ {
+ fct_();
+ return size_;
+ }
+ };
+ struct void_fct_ptr_barrier_reseter
+ {
+ unsigned int size_;
+ void(*fct_)();
+ void_fct_ptr_barrier_reseter(unsigned int size, void(*funct)()) :
+ size_(size), fct_(funct)
+ {
+ }
+ BOOST_THREAD_MOVABLE(void_fct_ptr_barrier_reseter)
+ //BOOST_THREAD_COPYABLE_AND_MOVABLE(void_fct_ptr_barrier_reseter)
+
+ void_fct_ptr_barrier_reseter(void_fct_ptr_barrier_reseter const& other) BOOST_NOEXCEPT :
+ size_(other.size_), fct_(other.fct_)
+ {
+ }
+ void_fct_ptr_barrier_reseter(BOOST_THREAD_RV_REF(void_fct_ptr_barrier_reseter) other) BOOST_NOEXCEPT :
+ size_(BOOST_THREAD_RV(other).size_), fct_(BOOST_THREAD_RV(other).fct_)
+ {
+ }
+ unsigned int operator()()
+ {
+ fct_();
+ return size_;
+ }
+ };
+ }
+ //BOOST_THREAD_DCL_MOVABLE(thread_detail::default_barrier_reseter)
+ //BOOST_THREAD_DCL_MOVABLE(thread_detail::void_functor_barrier_reseter)
+ //BOOST_THREAD_DCL_MOVABLE(thread_detail::void_fct_ptr_barrier_reseter)
+
+ class barrier
+ {
+ static inline unsigned int check_counter(unsigned int count)
+ {
+ if (count == 0) boost::throw_exception(
+ thread_exception(system::errc::invalid_argument, "barrier constructor: count cannot be zero."));
+ return count;
+ }
+ struct dummy
+ {
+ };
+
+ public:
+ BOOST_THREAD_NO_COPYABLE( barrier)
+
+ explicit barrier(unsigned int count) :
+ m_count(check_counter(count)), m_generation(0), fct_(BOOST_THREAD_MAKE_RV_REF(thread_detail::default_barrier_reseter(count)))
+ {
+ }
+
+ template <typename F>
+ barrier(
+ unsigned int count,
+ BOOST_THREAD_RV_REF(F) funct,
+ typename enable_if<
+ typename is_void<typename result_of<F()>::type>::type, dummy*
+ >::type=0
+ )
+ : m_count(check_counter(count)),
+ m_generation(0),
+ fct_(BOOST_THREAD_MAKE_RV_REF(thread_detail::void_functor_barrier_reseter(count,
+ boost::move(funct)))
+ )
+ {
+ }
+ template <typename F>
+ barrier(
+ unsigned int count,
+ F &funct,
+ typename enable_if<
+ typename is_void<typename result_of<F()>::type>::type, dummy*
+ >::type=0
+ )
+ : m_count(check_counter(count)),
+ m_generation(0),
+ fct_(BOOST_THREAD_MAKE_RV_REF(thread_detail::void_functor_barrier_reseter(count,
+ funct))
+ )
+ {
+ }
+
+ template <typename F>
+ barrier(
+ unsigned int count,
+ BOOST_THREAD_RV_REF(F) funct,
+ typename enable_if<
+ typename is_same<typename result_of<F()>::type, unsigned int>::type, dummy*
+ >::type=0
+ )
+ : m_count(check_counter(count)),
+ m_generation(0),
+ fct_(boost::move(funct))
+ {
+ }
+ template <typename F>
+ barrier(
+ unsigned int count,
+ F& funct,
+ typename enable_if<
+ typename is_same<typename result_of<F()>::type, unsigned int>::type, dummy*
+ >::type=0
+ )
+ : m_count(check_counter(count)),
+ m_generation(0),
+ fct_(funct)
+ {
+ }
+
+ barrier(unsigned int count, void(*funct)()) :
+ m_count(check_counter(count)), m_generation(0),
+ fct_(funct
+ ? BOOST_THREAD_MAKE_RV_REF(thread_detail::size_completion_function(BOOST_THREAD_MAKE_RV_REF(thread_detail::void_fct_ptr_barrier_reseter(count, funct))))
+ : BOOST_THREAD_MAKE_RV_REF(thread_detail::size_completion_function(BOOST_THREAD_MAKE_RV_REF(thread_detail::default_barrier_reseter(count))))
+ )
+ {
+ }
+ barrier(unsigned int count, unsigned int(*funct)()) :
+ m_count(check_counter(count)), m_generation(0),
+ fct_(funct
+ ? BOOST_THREAD_MAKE_RV_REF(thread_detail::size_completion_function(funct))
+ : BOOST_THREAD_MAKE_RV_REF(thread_detail::size_completion_function(BOOST_THREAD_MAKE_RV_REF(thread_detail::default_barrier_reseter(count))))
+ )
+ {
+ }
+
+ bool wait()
+ {
+ boost::unique_lock < boost::mutex > lock(m_mutex);
+ unsigned int gen = m_generation;
+
+ if (--m_count == 0)
+ {
+ m_generation++;
+ m_count = static_cast<unsigned int>(fct_());
+ BOOST_ASSERT(m_count != 0);
+ lock.unlock();
+ m_cond.notify_all();
+ return true;
+ }
+
+ while (gen == m_generation)
+ m_cond.wait(lock);
+ return false;
+ }
+
+ void count_down_and_wait()
+ {
+ wait();
+ }
+
+ private:
+ mutex m_mutex;
+ condition_variable m_cond;
+ unsigned int m_count;
+ unsigned int m_generation;
+ thread_detail::size_completion_function fct_;
+ };
+
+} // namespace boost
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/condition_variable.hpp b/src/third_party/boost-1.69.0/boost/thread/condition_variable.hpp
new file mode 100644
index 00000000000..8f8e9f2ed65
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/condition_variable.hpp
@@ -0,0 +1,21 @@
+#ifndef BOOST_THREAD_CONDITION_VARIABLE_HPP
+#define BOOST_THREAD_CONDITION_VARIABLE_HPP
+
+// condition_variable.hpp
+//
+// (C) Copyright 2007 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/platform.hpp>
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#include <boost/thread/win32/condition_variable.hpp>
+#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
+#include <boost/thread/pthread/condition_variable.hpp>
+#else
+#error "Boost threads unavailable on this platform"
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/functional.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/functional.hpp
new file mode 100644
index 00000000000..7a7e928b70f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/functional.hpp
@@ -0,0 +1,49 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_FUNCTIONAL_HPP
+#define BOOST_CSBL_FUNCTIONAL_HPP
+
+#include <boost/config.hpp>
+
+#include <functional>
+
+#if defined BOOST_THREAD_USES_BOOST_FUNCTIONAL || defined BOOST_NO_CXX11_HDR_FUNCTIONAL || defined BOOST_NO_CXX11_RVALUE_REFERENCES
+#ifndef BOOST_THREAD_USES_BOOST_FUNCTIONAL
+#define BOOST_THREAD_USES_BOOST_FUNCTIONAL
+#endif
+#include <boost/function.hpp>
+#endif
+
+namespace boost
+{
+ namespace csbl
+ {
+#if defined BOOST_THREAD_USES_BOOST_FUNCTIONAL
+ using ::boost::function;
+#else
+ // D.8.1, base (deprecated):
+ // 20.9.3, reference_wrapper:
+ // 20.9.4, arithmetic operations:
+ // 20.9.5, comparisons:
+ // 20.9.6, logical operations:
+ // 20.9.7, bitwise operations:
+ // 20.9.8, negators:
+ // 20.9.9, bind:
+ // D.9, binders (deprecated):
+ // D.8.2.1, adaptors (deprecated):
+ // D.8.2.2, adaptors (deprecated):
+ // 20.9.10, member function adaptors:
+ // 20.9.11 polymorphic function wrappers:
+ using ::std::function;
+ // 20.9.12, hash function primary template:
+#endif
+
+ }
+}
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_arg.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_arg.hpp
new file mode 100644
index 00000000000..354cdaee885
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_arg.hpp
@@ -0,0 +1,41 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_MEMORY_ALLOCATOR_ARG_HPP
+#define BOOST_CSBL_MEMORY_ALLOCATOR_ARG_HPP
+
+#include <boost/thread/csbl/memory/config.hpp>
+
+// 20.7.6, allocator argument tag
+#if defined BOOST_NO_CXX11_ALLOCATOR
+#include <boost/container/scoped_allocator.hpp>
+
+namespace boost
+{
+ namespace csbl
+ {
+ using ::boost::container::allocator_arg_t;
+ using ::boost::container::allocator_arg;
+ }
+}
+#else
+namespace boost
+{
+ namespace csbl
+ {
+ using ::std::allocator_arg_t;
+ using ::std::allocator_arg;
+ }
+}
+#endif // BOOST_NO_CXX11_ALLOCATOR
+namespace boost
+{
+ using ::boost::csbl::allocator_arg_t;
+ using ::boost::csbl::allocator_arg;
+}
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_traits.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_traits.hpp
new file mode 100644
index 00000000000..3737cd85def
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/allocator_traits.hpp
@@ -0,0 +1,35 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_MEMORY_ALLOCATOR_TRAITS_HPP
+#define BOOST_CSBL_MEMORY_ALLOCATOR_TRAITS_HPP
+
+#include <boost/thread/csbl/memory/config.hpp>
+
+// 20.7.8, allocator traits
+#if defined BOOST_NO_CXX11_ALLOCATOR
+#include <boost/container/allocator_traits.hpp>
+
+namespace boost
+{
+ namespace csbl
+ {
+ using ::boost::container::allocator_traits;
+ }
+}
+#else
+namespace boost
+{
+ namespace csbl
+ {
+ using ::std::allocator_traits;
+ }
+}
+#endif // BOOST_NO_CXX11_POINTER_TRAITS
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/config.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/config.hpp
new file mode 100644
index 00000000000..7b0596ac490
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/config.hpp
@@ -0,0 +1,16 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_MEMORY_CONFIG_HPP
+#define BOOST_CSBL_MEMORY_CONFIG_HPP
+
+#include <boost/config.hpp>
+
+#include <memory>
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/pointer_traits.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/pointer_traits.hpp
new file mode 100644
index 00000000000..320f8e9e774
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/pointer_traits.hpp
@@ -0,0 +1,35 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_MEMORY_POINTER_TRAITS_HPP
+#define BOOST_CSBL_MEMORY_POINTER_TRAITS_HPP
+
+#include <boost/thread/csbl/memory/config.hpp>
+
+// 20.7.3, pointer traits
+#if defined BOOST_NO_CXX11_ALLOCATOR
+#include <boost/intrusive/pointer_traits.hpp>
+
+namespace boost
+{
+ namespace csbl
+ {
+ using ::boost::intrusive::pointer_traits;
+ }
+}
+#else
+namespace boost
+{
+ namespace csbl
+ {
+ using ::std::pointer_traits;
+ }
+}
+#endif // BOOST_NO_CXX11_ALLOCATOR
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/scoped_allocator.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/scoped_allocator.hpp
new file mode 100644
index 00000000000..a92f3d85146
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/scoped_allocator.hpp
@@ -0,0 +1,35 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_MEMORY_SCOPED_ALLOCATOR_HPP
+#define BOOST_CSBL_MEMORY_SCOPED_ALLOCATOR_HPP
+
+#include <boost/thread/csbl/memory/config.hpp>
+
+// 20.7.7, uses_allocator
+#if defined BOOST_NO_CXX11_ALLOCATOR
+#include <boost/container/scoped_allocator.hpp>
+
+namespace boost
+{
+ namespace csbl
+ {
+ using ::boost::container::uses_allocator;
+ }
+}
+#else
+namespace boost
+{
+ namespace csbl
+ {
+ using ::std::uses_allocator;
+ }
+}
+#endif // BOOST_NO_CXX11_POINTER_TRAITS
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/shared_ptr.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/shared_ptr.hpp
new file mode 100644
index 00000000000..e9a9383723a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/shared_ptr.hpp
@@ -0,0 +1,42 @@
+// Copyright (C) 2014 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2014/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_MEMORY_SHARED_PTR_HPP
+#define BOOST_CSBL_MEMORY_SHARED_PTR_HPP
+
+#include <boost/thread/csbl/memory/config.hpp>
+
+#if defined BOOST_NO_CXX11_SMART_PTR
+
+#include <boost/smart_ptr/shared_ptr.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
+
+namespace boost
+{
+ namespace csbl
+ {
+ using ::boost::shared_ptr;
+ using ::boost::make_shared;
+ }
+}
+
+#else
+
+#include <boost/shared_ptr.hpp>
+
+namespace boost
+{
+ namespace csbl
+ {
+ using std::shared_ptr;
+ using std::make_shared;
+ }
+}
+
+#endif
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/memory/unique_ptr.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/unique_ptr.hpp
new file mode 100644
index 00000000000..17abf54e92a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/memory/unique_ptr.hpp
@@ -0,0 +1,28 @@
+// Copyright (C) 2013-2014 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation using interprocess::unique_ptr.
+// 2014/09 Vicente J. Botet Escriba
+// Adaptation to movelib::unique_ptr
+
+#ifndef BOOST_CSBL_MEMORY_UNIQUE_PTR_HPP
+#define BOOST_CSBL_MEMORY_UNIQUE_PTR_HPP
+
+#include <boost/thread/csbl/memory/config.hpp>
+
+#include <boost/move/unique_ptr.hpp>
+#include <boost/move/make_unique.hpp>
+
+namespace boost
+{
+ namespace csbl
+ {
+ using ::boost::movelib::unique_ptr;
+ using ::boost::movelib::make_unique;
+
+ }
+}
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/tuple.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/tuple.hpp
new file mode 100644
index 00000000000..860229ebe0b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/tuple.hpp
@@ -0,0 +1,49 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_TUPLE_HPP
+#define BOOST_CSBL_TUPLE_HPP
+
+#include <boost/config.hpp>
+
+#if defined BOOST_THREAD_USES_BOOST_TUPLE || defined BOOST_NO_CXX11_HDR_TUPLE || defined BOOST_NO_CXX11_RVALUE_REFERENCES
+#include <boost/tuple/tuple.hpp>
+#ifndef BOOST_THREAD_USES_BOOST_TUPLE
+#define BOOST_THREAD_USES_BOOST_TUPLE
+#endif
+
+#else
+#include <tuple>
+#endif
+
+namespace boost
+{
+ namespace csbl
+ {
+#if defined BOOST_THREAD_USES_BOOST_TUPLE
+ using ::boost::tuple;
+ using ::boost::get;
+ using ::boost::make_tuple;
+ //using ::boost::tuple_size;
+#else
+ // 20.4.2, class template tuple:
+ using ::std::tuple;
+ using ::std::get;
+ using ::std::make_tuple;
+ using ::std::tuple_size;
+ // 20.4.2.4, tuple creation functions:
+ // 20.4.2.5, tuple helper classes:
+ // 20.4.2.6, element access:
+ // 20.4.2.7, relational operators:
+ // 20.4.2.8, allocator-related traits
+ // 20.4.2.9, specialized algorithms:
+#endif
+
+ }
+}
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/csbl/vector.hpp b/src/third_party/boost-1.69.0/boost/thread/csbl/vector.hpp
new file mode 100644
index 00000000000..c77a5b143bb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/csbl/vector.hpp
@@ -0,0 +1,35 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/10 Vicente J. Botet Escriba
+// Creation.
+
+#ifndef BOOST_CSBL_VECTOR_HPP
+#define BOOST_CSBL_VECTOR_HPP
+
+#include <boost/config.hpp>
+
+#if defined BOOST_THREAD_USES_BOOST_VECTOR || defined BOOST_NO_CXX11_RVALUE_REFERENCES || defined BOOST_MSVC
+#ifndef BOOST_THREAD_USES_BOOST_VECTOR
+#define BOOST_THREAD_USES_BOOST_VECTOR
+#endif
+#include <boost/container/vector.hpp>
+#else
+#include <vector>
+#endif
+
+namespace boost
+{
+ namespace csbl
+ {
+#if defined BOOST_THREAD_USES_BOOST_VECTOR
+ using ::boost::container::vector;
+#else
+ using ::std::vector;
+#endif
+
+ }
+}
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/cv_status.hpp b/src/third_party/boost-1.69.0/boost/thread/cv_status.hpp
new file mode 100644
index 00000000000..e52de4a5220
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/cv_status.hpp
@@ -0,0 +1,26 @@
+// cv_status.hpp
+//
+// Copyright (C) 2011 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_CV_STATUS_HPP
+#define BOOST_THREAD_CV_STATUS_HPP
+
+#include <boost/core/scoped_enum.hpp>
+
+namespace boost
+{
+
+ // enum class cv_status;
+ BOOST_SCOPED_ENUM_DECLARE_BEGIN(cv_status)
+ {
+ no_timeout,
+ timeout
+ }
+ BOOST_SCOPED_ENUM_DECLARE_END(cv_status)
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/atomic_redef_macros.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/atomic_redef_macros.hpp
new file mode 100644
index 00000000000..dfd15f5c703
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/atomic_redef_macros.hpp
@@ -0,0 +1,19 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+
+#if defined(BOOST_INTEL)
+
+#pragma pop_macro("atomic_compare_exchange")
+#pragma pop_macro("atomic_compare_exchange_explicit")
+#pragma pop_macro("atomic_exchange")
+#pragma pop_macro("atomic_exchange_explicit")
+#pragma pop_macro("atomic_is_lock_free")
+#pragma pop_macro("atomic_load")
+#pragma pop_macro("atomic_load_explicit")
+#pragma pop_macro("atomic_store")
+#pragma pop_macro("atomic_store_explicit")
+
+#endif // #if defined(BOOST_INTEL)
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/atomic_undef_macros.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/atomic_undef_macros.hpp
new file mode 100644
index 00000000000..18d840a7cc5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/atomic_undef_macros.hpp
@@ -0,0 +1,39 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+
+#if defined(BOOST_INTEL)
+
+#pragma push_macro("atomic_compare_exchange")
+#undef atomic_compare_exchange
+
+#pragma push_macro("atomic_compare_exchange_explicit")
+#undef atomic_compare_exchange_explicit
+
+#pragma push_macro("atomic_exchange")
+#undef atomic_exchange
+
+#pragma push_macro("atomic_exchange_explicit")
+#undef atomic_exchange_explicit
+
+#pragma push_macro("atomic_is_lock_free")
+#undef atomic_is_lock_free
+
+#pragma push_macro("atomic_load")
+#undef atomic_load
+
+#pragma push_macro("atomic_load_explicit")
+#undef atomic_load_explicit
+
+#pragma push_macro("atomic_store")
+#undef atomic_store
+
+#pragma push_macro("atomic_store_explicit")
+#undef atomic_store_explicit
+
+
+#endif // #if defined(BOOST_INTEL)
+
+
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/config.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/config.hpp
new file mode 100644
index 00000000000..6e6b9af6a31
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/config.hpp
@@ -0,0 +1,531 @@
+// Copyright (C) 2001-2003
+// William E. Kempf
+// Copyright (C) 2011-2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_CONFIG_WEK01032003_HPP
+#define BOOST_THREAD_CONFIG_WEK01032003_HPP
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/thread/detail/platform.hpp>
+#include <boost/thread/detail/thread_safety.hpp>
+
+//#define BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS
+// ATTRIBUTE_MAY_ALIAS
+
+//#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#if !defined(BOOST_NO_MAY_ALIAS)
+
+ // GCC since 3.3 and some other compilers have may_alias attribute that helps
+ // to alleviate optimizer issues with regard to violation of the strict aliasing rules.
+
+ #define BOOST_THREAD_DETAIL_USE_ATTRIBUTE_MAY_ALIAS
+#endif
+#if defined(BOOST_MAY_ALIAS)
+#define BOOST_THREAD_ATTRIBUTE_MAY_ALIAS BOOST_MAY_ALIAS
+#else
+#define BOOST_THREAD_ATTRIBUTE_MAY_ALIAS
+#endif
+
+#if defined(BOOST_THREAD_CHRONO_WINDOWS_API)
+# warning Boost.Thread will use the Windows API for time
+#elif defined(BOOST_THREAD_CHRONO_MAC_API)
+# warning Boost.Thread will use the Mac API for time
+#elif defined(BOOST_THREAD_CHRONO_POSIX_API)
+# warning Boost.Thread will use the POSIX API for time
+#endif
+
+# if defined( BOOST_THREAD_CHRONO_WINDOWS_API ) && defined( BOOST_THREAD_CHRONO_POSIX_API )
+# error both BOOST_THREAD_CHRONO_WINDOWS_API and BOOST_THREAD_CHRONO_POSIX_API are defined
+# elif defined( BOOST_THREAD_CHRONO_WINDOWS_API ) && defined( BOOST_THREAD_CHRONO_MAC_API )
+# error both BOOST_THREAD_CHRONO_WINDOWS_API and BOOST_THREAD_CHRONO_MAC_API are defined
+# elif defined( BOOST_THREAD_CHRONO_MAC_API ) && defined( BOOST_THREAD_CHRONO_POSIX_API )
+# error both BOOST_THREAD_CHRONO_MAC_API and BOOST_THREAD_CHRONO_POSIX_API are defined
+# elif !defined( BOOST_THREAD_CHRONO_WINDOWS_API ) && !defined( BOOST_THREAD_CHRONO_MAC_API ) && !defined( BOOST_THREAD_CHRONO_POSIX_API )
+# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
+# define BOOST_THREAD_CHRONO_WINDOWS_API
+# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+# define BOOST_THREAD_CHRONO_MAC_API
+# else
+# define BOOST_THREAD_CHRONO_POSIX_API
+# endif
+# endif
+
+#if !defined(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)
+#define BOOST_THREAD_POLL_INTERVAL_MILLISECONDS 100
+#endif
+
+#if defined BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
+#define BOOST_THREAD_ASSERT_PRECONDITION(EXPR, EX) \
+ if (EXPR) {} else boost::throw_exception(EX)
+#define BOOST_THREAD_VERIFY_PRECONDITION(EXPR, EX) \
+ if (EXPR) {} else boost::throw_exception(EX)
+#define BOOST_THREAD_THROW_ELSE_RETURN(EX, RET) \
+ boost::throw_exception(EX)
+#else
+#define BOOST_THREAD_ASSERT_PRECONDITION(EXPR, EX)
+#define BOOST_THREAD_VERIFY_PRECONDITION(EXPR, EX) \
+ (void)(EXPR)
+#define BOOST_THREAD_THROW_ELSE_RETURN(EX, RET) \
+ return (RET)
+#endif
+
+// This compiler doesn't support Boost.Chrono
+#if defined __IBMCPP__ && (__IBMCPP__ < 1100) \
+ && ! defined BOOST_THREAD_DONT_USE_CHRONO
+#define BOOST_THREAD_DONT_USE_CHRONO
+#if ! defined BOOST_THREAD_USES_DATETIME
+#define BOOST_THREAD_USES_DATETIME
+#endif
+#endif
+
+// This compiler doesn't support Boost.Move
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100) \
+ && ! defined BOOST_THREAD_DONT_USE_MOVE
+#define BOOST_THREAD_DONT_USE_MOVE
+#endif
+
+// This compiler doesn't support Boost.Container Allocators files
+#if defined __SUNPRO_CC \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
+#define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
+#endif
+
+#if defined _WIN32_WCE && _WIN32_WCE==0x501 \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
+#define BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS
+#endif
+
+
+#if defined BOOST_NO_CXX11_UNIFIED_INITIALIZATION_SYNTAX || defined BOOST_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
+#define BOOST_THREAD_NO_MAKE_LOCK_GUARD
+#define BOOST_THREAD_NO_MAKE_STRICT_LOCK
+#define BOOST_THREAD_NO_MAKE_NESTED_STRICT_LOCK
+#endif
+
+#if defined(BOOST_NO_CXX11_HDR_TUPLE) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+#define BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS
+#define BOOST_THREAD_NO_SYNCHRONIZE
+#elif defined _MSC_VER && _MSC_VER <= 1600
+// C++ features supported by VC++ 10 (aka 2010)
+#define BOOST_THREAD_NO_MAKE_UNIQUE_LOCKS
+#define BOOST_THREAD_NO_SYNCHRONIZE
+#endif
+
+/// BASIC_THREAD_ID
+#if ! defined BOOST_THREAD_DONT_PROVIDE_BASIC_THREAD_ID \
+ && ! defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+#define BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+#endif
+
+/// RVALUE_REFERENCES_DONT_MATCH_FUNTION_PTR
+//#if defined BOOST_NO_CXX11_RVALUE_REFERENCES || defined BOOST_MSVC
+#define BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR
+//#endif
+
+// Default version
+#if !defined BOOST_THREAD_VERSION
+#define BOOST_THREAD_VERSION 2
+#else
+#if BOOST_THREAD_VERSION!=2 && BOOST_THREAD_VERSION!=3 && BOOST_THREAD_VERSION!=4 && BOOST_THREAD_VERSION!=5
+#error "BOOST_THREAD_VERSION must be 2, 3, 4 or 5"
+#endif
+#endif
+
+// CHRONO
+// Uses Boost.Chrono by default if not stated the opposite defining BOOST_THREAD_DONT_USE_CHRONO
+#if ! defined BOOST_THREAD_DONT_USE_CHRONO \
+ && ! defined BOOST_THREAD_USES_CHRONO
+#define BOOST_THREAD_USES_CHRONO
+#endif
+
+#if ! defined BOOST_THREAD_DONT_USE_ATOMIC \
+ && ! defined BOOST_THREAD_USES_ATOMIC
+#define BOOST_THREAD_USES_ATOMIC
+//#define BOOST_THREAD_DONT_USE_ATOMIC
+#endif
+
+#if defined BOOST_THREAD_USES_ATOMIC
+// Andrey Semashev
+#define BOOST_THREAD_ONCE_ATOMIC
+#else
+//#elif ! defined BOOST_NO_CXX11_THREAD_LOCAL && ! defined BOOST_NO_THREAD_LOCAL && ! defined BOOST_THREAD_NO_UINT32_PSEUDO_ATOMIC
+// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html#Appendix
+#define BOOST_THREAD_ONCE_FAST_EPOCH
+#endif
+#if BOOST_THREAD_VERSION==2
+
+// PROVIDE_PROMISE_LAZY
+#if ! defined BOOST_THREAD_DONT_PROVIDE_PROMISE_LAZY \
+ && ! defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
+#define BOOST_THREAD_PROVIDES_PROMISE_LAZY
+#endif
+
+// PROVIDE_THREAD_EQ
+#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_EQ \
+ && ! defined BOOST_THREAD_PROVIDES_THREAD_EQ
+#define BOOST_THREAD_PROVIDES_THREAD_EQ
+#endif
+
+#endif
+
+#if BOOST_THREAD_VERSION>=3
+
+// ONCE_CXX11
+// fixme BOOST_THREAD_PROVIDES_ONCE_CXX11 doesn't works when thread.cpp is compiled BOOST_THREAD_VERSION 3
+#if ! defined BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11 \
+ && ! defined BOOST_THREAD_PROVIDES_ONCE_CXX11
+#define BOOST_THREAD_DONT_PROVIDE_ONCE_CXX11
+#endif
+
+// THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE \
+ && ! defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+#define BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+#endif
+
+// THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#if ! defined BOOST_THREAD_DONT_PROVIDE_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE \
+ && ! defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#define BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+#endif
+
+// PROVIDE_FUTURE
+#if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE \
+ && ! defined BOOST_THREAD_PROVIDES_FUTURE
+#define BOOST_THREAD_PROVIDES_FUTURE
+#endif
+
+// FUTURE_CTOR_ALLOCATORS
+#if ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS \
+ && ! defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+#define BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+#endif
+
+// SHARED_MUTEX_UPWARDS_CONVERSIONS
+#if ! defined BOOST_THREAD_DONT_PROVIDE_SHARED_MUTEX_UPWARDS_CONVERSIONS \
+ && ! defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#define BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#endif
+
+// PROVIDE_EXPLICIT_LOCK_CONVERSION
+#if ! defined BOOST_THREAD_DONT_PROVIDE_EXPLICIT_LOCK_CONVERSION \
+ && ! defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+#define BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+#endif
+
+// GENERIC_SHARED_MUTEX_ON_WIN
+#if ! defined BOOST_THREAD_DONT_PROVIDE_GENERIC_SHARED_MUTEX_ON_WIN \
+ && ! defined BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#endif
+
+// USE_MOVE
+#if ! defined BOOST_THREAD_DONT_USE_MOVE \
+ && ! defined BOOST_THREAD_USES_MOVE
+#define BOOST_THREAD_USES_MOVE
+#endif
+
+#endif
+
+// deprecated since version 4
+#if BOOST_THREAD_VERSION < 4
+
+// NESTED_LOCKS
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
+#define BOOST_THREAD_PROVIDES_NESTED_LOCKS
+#endif
+
+// CONDITION
+#if ! defined BOOST_THREAD_PROVIDES_CONDITION \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_CONDITION
+#define BOOST_THREAD_PROVIDES_CONDITION
+#endif
+
+// USE_DATETIME
+#if ! defined BOOST_THREAD_DONT_USE_DATETIME \
+ && ! defined BOOST_THREAD_USES_DATETIME
+#define BOOST_THREAD_USES_DATETIME
+#endif
+#endif
+
+#if BOOST_THREAD_VERSION>=4
+
+// SIGNATURE_PACKAGED_TASK
+#if ! defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_SIGNATURE_PACKAGED_TASK
+#define BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+#endif
+
+// VARIADIC_THREAD
+#if ! defined BOOST_THREAD_PROVIDES_VARIADIC_THREAD \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_VARIADIC_THREAD
+
+#if ! defined(BOOST_NO_SFINAE_EXPR) && \
+ ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
+ ! defined(BOOST_NO_CXX11_DECLTYPE) && \
+ ! defined(BOOST_NO_CXX11_DECLTYPE_N3276) && \
+ ! defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES) && \
+ ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \
+ ! defined(BOOST_NO_CXX11_HDR_TUPLE)
+
+#define BOOST_THREAD_PROVIDES_VARIADIC_THREAD
+#endif
+#endif
+
+#if ! defined BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_WHEN_ALL_WHEN_ANY
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \
+ ! defined(BOOST_NO_CXX11_HDR_TUPLE)
+
+#define BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
+#endif
+#endif
+
+// ! defined(BOOST_NO_SFINAE_EXPR) &&
+// ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) &&
+// ! defined(BOOST_NO_CXX11_AUTO) &&
+// ! defined(BOOST_NO_CXX11_DECLTYPE) &&
+// ! defined(BOOST_NO_CXX11_DECLTYPE_N3276) &&
+
+
+// MAKE_READY_AT_THREAD_EXIT
+#if ! defined BOOST_THREAD_PROVIDES_MAKE_READY_AT_THREAD_EXIT \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_MAKE_READY_AT_THREAD_EXIT
+
+//#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+#define BOOST_THREAD_PROVIDES_MAKE_READY_AT_THREAD_EXIT
+//#endif
+#endif
+
+// FUTURE_CONTINUATION
+#if ! defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_CONTINUATION
+#define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+#endif
+
+#if ! defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_UNWRAP
+#define BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
+#endif
+
+// FUTURE_INVALID_AFTER_GET
+#if ! defined BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_FUTURE_INVALID_AFTER_GET
+#define BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET
+#endif
+
+// NESTED_LOCKS
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
+#define BOOST_THREAD_DONT_PROVIDE_NESTED_LOCKS
+#endif
+
+// CONDITION
+#if ! defined BOOST_THREAD_PROVIDES_CONDITION \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_CONDITION
+#define BOOST_THREAD_DONT_PROVIDE_CONDITION
+#endif
+
+#endif // BOOST_THREAD_VERSION>=4
+
+
+#if BOOST_THREAD_VERSION>=5
+//#define BOOST_THREAD_FUTURE_BLOCKING
+#else
+//#define BOOST_THREAD_FUTURE_BLOCKING
+#define BOOST_THREAD_ASYNC_FUTURE_WAITS
+#endif
+// INTERRUPTIONS
+#if ! defined BOOST_THREAD_PROVIDES_INTERRUPTIONS \
+ && ! defined BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS
+#define BOOST_THREAD_PROVIDES_INTERRUPTIONS
+#endif
+
+// CORRELATIONS
+
+// EXPLICIT_LOCK_CONVERSION.
+#if defined BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+#define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION explicit
+#else
+#define BOOST_THREAD_EXPLICIT_LOCK_CONVERSION
+#endif
+
+// BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN is defined if BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+#if defined BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS \
+&& ! defined BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#define BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN
+#endif
+
+// For C++11 call_once interface the compiler MUST support constexpr.
+// Otherwise once_flag would be initialized during dynamic initialization stage, which is not thread-safe.
+#if defined(BOOST_THREAD_PROVIDES_ONCE_CXX11)
+#if defined(BOOST_NO_CXX11_CONSTEXPR)
+#undef BOOST_THREAD_PROVIDES_ONCE_CXX11
+#endif
+#endif
+
+#if defined(BOOST_THREAD_PLATFORM_WIN32) && defined BOOST_THREAD_DONT_USE_DATETIME
+#undef BOOST_THREAD_DONT_USE_DATETIME
+#define BOOST_THREAD_USES_DATETIME
+#endif
+
+#if defined(BOOST_THREAD_PLATFORM_WIN32) && defined BOOST_THREAD_DONT_USE_CHRONO
+#undef BOOST_THREAD_DONT_USE_CHRONO
+#define BOOST_THREAD_USES_CHRONO
+#endif
+
+// BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.55
+// BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0 defined by default up to Boost 1.55
+#if defined BOOST_THREAD_PROVIDES_DEPRECATED_FEATURES_SINCE_V3_0_0
+
+#if ! defined BOOST_THREAD_PROVIDES_THREAD_EQ
+#define BOOST_THREAD_PROVIDES_THREAD_EQ
+#endif
+
+#endif
+
+
+//#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES || defined BOOST_THREAD_USES_MOVE
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_THREAD_FUTURE_USES_OPTIONAL
+#endif
+
+#if BOOST_WORKAROUND(__BORLANDC__, < 0x600)
+# pragma warn -8008 // Condition always true/false
+# pragma warn -8080 // Identifier declared but never used
+# pragma warn -8057 // Parameter never used
+# pragma warn -8066 // Unreachable code
+#endif
+
+#include <boost/thread/detail/platform.hpp>
+
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#else
+ # if defined(BOOST_HAS_PTHREAD_DELAY_NP) || defined(BOOST_HAS_NANOSLEEP)
+ # define BOOST_THREAD_SLEEP_FOR_IS_STEADY
+ # endif
+#endif
+
+#if defined(BOOST_THREAD_CHRONO_WINDOWS_API)
+ #define BOOST_THREAD_HAS_MONO_CLOCK
+ #define BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+#elif defined(BOOST_THREAD_CHRONO_MAC_API)
+ #define BOOST_THREAD_HAS_MONO_CLOCK
+#elif defined(__ANDROID__)
+ #define BOOST_THREAD_HAS_MONO_CLOCK
+ #if defined(__ANDROID_API__) && __ANDROID_API__ >= 21
+ #define BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ #endif
+#else
+ #include <time.h> // check for CLOCK_MONOTONIC
+ #if defined(CLOCK_MONOTONIC)
+ #define BOOST_THREAD_HAS_MONO_CLOCK
+ #define BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ #endif
+#endif
+
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#elif ! defined BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+#if defined BOOST_PTHREAD_HAS_TIMEDLOCK
+#define BOOST_THREAD_USES_PTHREAD_TIMEDLOCK
+#elif (defined(_POSIX_TIMEOUTS) && (_POSIX_TIMEOUTS-0)>=200112L) \
+ || (defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ >= 21)
+#define BOOST_THREAD_USES_PTHREAD_TIMEDLOCK
+#endif
+#endif
+
+// provided for backwards compatibility, since this
+// macro was used for several releases by mistake.
+#if defined(BOOST_THREAD_DYN_DLL) && ! defined(BOOST_THREAD_DYN_LINK)
+# define BOOST_THREAD_DYN_LINK
+#endif
+
+// compatibility with the rest of Boost's auto-linking code:
+#if defined(BOOST_THREAD_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
+# undef BOOST_THREAD_USE_LIB
+# if !defined(BOOST_THREAD_USE_DLL)
+# define BOOST_THREAD_USE_DLL
+# endif
+#endif
+
+#if defined(BOOST_THREAD_BUILD_DLL) //Build dll
+#elif defined(BOOST_THREAD_BUILD_LIB) //Build lib
+#elif defined(BOOST_THREAD_USE_DLL) //Use dll
+#elif defined(BOOST_THREAD_USE_LIB) //Use lib
+#else //Use default
+# if defined(BOOST_THREAD_PLATFORM_WIN32)
+# if defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN) \
+ || defined(__MINGW32__) || defined(MINGW32) || defined(BOOST_MINGW32)
+ //For compilers supporting auto-tss cleanup
+ //with Boost.Threads lib, use Boost.Threads lib
+# define BOOST_THREAD_USE_LIB
+# else
+ //For compilers not yet supporting auto-tss cleanup
+ //with Boost.Threads lib, use Boost.Threads dll
+# define BOOST_THREAD_USE_DLL
+# endif
+# else
+# define BOOST_THREAD_USE_LIB
+# endif
+#endif
+
+#if defined(BOOST_HAS_DECLSPEC)
+# if defined(BOOST_THREAD_BUILD_DLL) //Build dll
+# define BOOST_THREAD_DECL BOOST_SYMBOL_EXPORT
+//# define BOOST_THREAD_DECL __declspec(dllexport)
+
+# elif defined(BOOST_THREAD_USE_DLL) //Use dll
+# define BOOST_THREAD_DECL BOOST_SYMBOL_IMPORT
+//# define BOOST_THREAD_DECL __declspec(dllimport)
+# else
+# define BOOST_THREAD_DECL
+# endif
+#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ > 4)
+# define BOOST_THREAD_DECL BOOST_SYMBOL_VISIBLE
+
+#else
+# define BOOST_THREAD_DECL
+#endif // BOOST_HAS_DECLSPEC
+
+//
+// Automatically link to the correct build variant where possible.
+//
+#if !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_THREAD_NO_LIB) && !defined(BOOST_THREAD_BUILD_DLL) && !defined(BOOST_THREAD_BUILD_LIB)
+//
+// Tell the autolink to link dynamically, this will get undef'ed by auto_link.hpp
+// once it's done with it:
+//
+#if defined(BOOST_THREAD_USE_DLL) & ! defined(BOOST_DYN_LINK)
+# define BOOST_DYN_LINK
+#endif
+//
+// Set the name of our library, this will get undef'ed by auto_link.hpp
+// once it's done with it:
+//
+#if defined(BOOST_THREAD_LIB_NAME)
+# define BOOST_LIB_NAME BOOST_THREAD_LIB_NAME
+#else
+# define BOOST_LIB_NAME boost_thread
+#endif
+//
+// If we're importing code from a dll, then tell auto_link.hpp about it:
+//
+// And include the header that does the work:
+//
+#include <boost/config/auto_link.hpp>
+#endif // auto-linking disabled
+
+#endif // BOOST_THREAD_CONFIG_WEK1032003_HPP
+
+// Change Log:
+// 22 Jan 05 Roland Schwarz (speedsnail)
+// Usage of BOOST_HAS_DECLSPEC macro.
+// Default again is static lib usage.
+// BOOST_DYN_LINK only defined when autolink included.
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/delete.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/delete.hpp
new file mode 100644
index 00000000000..8f8113f4e87
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/delete.hpp
@@ -0,0 +1,58 @@
+// Copyright (C) 2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_DETAIL_DELETE_HPP
+#define BOOST_THREAD_DETAIL_DELETE_HPP
+
+#include <boost/config.hpp>
+
+/**
+ * BOOST_THREAD_DELETE_COPY_CTOR deletes the copy constructor when the compiler supports it or
+ * makes it private.
+ *
+ * BOOST_THREAD_DELETE_COPY_ASSIGN deletes the copy assignment when the compiler supports it or
+ * makes it private.
+ */
+
+#if ! defined BOOST_NO_CXX11_DELETED_FUNCTIONS && ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
+ CLASS(CLASS const&) = delete; \
+
+#define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \
+ CLASS& operator=(CLASS const&) = delete;
+
+#else // BOOST_NO_CXX11_DELETED_FUNCTIONS
+#if defined(BOOST_MSVC) && _MSC_VER >= 1600
+#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
+ private: \
+ CLASS(CLASS const&); \
+ public:
+
+#define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \
+ private: \
+ CLASS& operator=(CLASS const&); \
+ public:
+#else
+#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
+ private: \
+ CLASS(CLASS&); \
+ public:
+
+#define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \
+ private: \
+ CLASS& operator=(CLASS&); \
+ public:
+#endif
+#endif // BOOST_NO_CXX11_DELETED_FUNCTIONS
+
+/**
+ * BOOST_THREAD_NO_COPYABLE deletes the copy constructor and assignment when the compiler supports it or
+ * makes them private.
+ */
+#define BOOST_THREAD_NO_COPYABLE(CLASS) \
+ BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
+ BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS)
+
+#endif // BOOST_THREAD_DETAIL_DELETE_HPP
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/invoke.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/invoke.hpp
new file mode 100644
index 00000000000..e772da29ee9
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/invoke.hpp
@@ -0,0 +1,1604 @@
+// Copyright (C) 2012-2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// 2013/04 Vicente J. Botet Escriba
+// Provide implementation up to 9 parameters when BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined.
+// Make use of Boost.Move
+// Make use of Boost.Tuple (movable)
+// 2012 Vicente J. Botet Escriba
+// Provide implementation _RET using bind when BOOST_NO_CXX11_HDR_FUNCTIONAL and BOOST_NO_SFINAE_EXPR are not defined
+// 2012 Vicente J. Botet Escriba
+// Adapt to boost libc++ implementation
+
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+// The invoke code is based on the one from libcxx.
+//===----------------------------------------------------------------------===//
+
+#ifndef BOOST_THREAD_DETAIL_INVOKE_HPP
+#define BOOST_THREAD_DETAIL_INVOKE_HPP
+
+#include <boost/config.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/core/enable_if.hpp>
+#include <boost/mpl/bool.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
+#include <functional>
+#endif
+
+namespace boost
+{
+ namespace detail
+ {
+
+
+#if ! defined(BOOST_NO_SFINAE_EXPR) && \
+ ! defined(BOOST_NO_CXX11_DECLTYPE) && \
+ ! defined(BOOST_NO_CXX11_DECLTYPE_N3276) && \
+ ! defined(BOOST_NO_CXX11_TRAILING_RESULT_TYPES)
+
+#define BOOST_THREAD_PROVIDES_INVOKE
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ // bullets 1 and 2
+
+ template <class Fp, class A0, class ...Args>
+ inline auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ -> decltype((boost::forward<A0>(a0).*f)(boost::forward<Args>(args)...))
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<Args>(args)...);
+ }
+ template <class R, class Fp, class A0, class ...Args>
+ inline auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ -> decltype((boost::forward<A0>(a0).*f)(boost::forward<Args>(args)...))
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<Args>(args)...);
+ }
+
+ template <class Fp, class A0, class ...Args>
+ inline auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ -> decltype(((*boost::forward<A0>(a0)).*f)(boost::forward<Args>(args)...))
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<Args>(args)...);
+ }
+ template <class R, class Fp, class A0, class ...Args>
+ inline auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ -> decltype(((*boost::forward<A0>(a0)).*f)(boost::forward<Args>(args)...))
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<Args>(args)...);
+ }
+
+ // bullets 3 and 4
+
+ template <class Fp, class A0>
+ inline auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype(boost::forward<A0>(a0).*f)
+ {
+ return boost::forward<A0>(a0).*f;
+ }
+
+ template <class Fp, class A0>
+ inline auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype((*boost::forward<A0>(a0)).*f)
+ {
+ return (*boost::forward<A0>(a0)).*f;
+ }
+
+ template <class R, class Fp, class A0>
+ inline auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype(boost::forward<A0>(a0).*f)
+ {
+ return boost::forward<A0>(a0).*f;
+ }
+
+ template <class R, class Fp, class A0>
+ inline auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype((*boost::forward<A0>(a0)).*f)
+ {
+ return (*boost::forward<A0>(a0)).*f;
+ }
+
+
+ // bullet 5
+
+ template <class R, class Fp, class ...Args>
+ inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) ...args)
+ -> decltype(boost::forward<Fp>(f)(boost::forward<Args>(args)...))
+ {
+ return boost::forward<Fp>(f)(boost::forward<Args>(args)...);
+ }
+ template <class Fp, class ...Args>
+ inline auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) ...args)
+ -> decltype(boost::forward<Fp>(f)(boost::forward<Args>(args)...))
+ {
+ return boost::forward<Fp>(f)(boost::forward<Args>(args)...);
+ }
+
+#else // BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+ // bullets 1 and 2
+
+ template <class Fp, class A0>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype((boost::forward<A0>(a0).*f)())
+ {
+ return (boost::forward<A0>(a0).*f)();
+ }
+ template <class R, class Fp, class A0>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype((boost::forward<A0>(a0).*f)())
+ {
+ return (boost::forward<A0>(a0).*f)();
+ }
+ template <class Fp, class A0, class A1>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ -> decltype((boost::forward<A0>(a0).*f)(boost::forward<A1>(a1)))
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1));
+ }
+ template <class R, class Fp, class A0, class A1>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ -> decltype((boost::forward<A0>(a0).*f)(boost::forward<A1>(a1)))
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1));
+ }
+ template <class Fp, class A0, class A1, class A2>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ -> decltype((boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2)))
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class R, class Fp, class A0, class A1, class A2>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ -> decltype((boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2)))
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+
+ template <class Fp, class A0>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype(((*boost::forward<A0>(a0)).*f)())
+ {
+ return ((*boost::forward<A0>(a0)).*f)();
+ }
+ template <class R, class Fp, class A0>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype(((*boost::forward<A0>(a0)).*f)())
+ {
+ return ((*boost::forward<A0>(a0)).*f)();
+ }
+ template <class Fp, class A0, class A1>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ -> decltype(((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1)))
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1));
+ }
+ template <class R, class Fp, class A0, class A1>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ -> decltype(((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1)))
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1));
+ }
+ template <class Fp, class A0, class A1, class A2>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ -> decltype(((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2)))
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class R, class Fp, class A0, class A1, class A2>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ -> decltype(((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2)))
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+
+ // bullets 3 and 4
+
+ template <class Fp, class A0>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype(boost::forward<A0>(a0).*f)
+ {
+ return boost::forward<A0>(a0).*f;
+ }
+ template <class R, class Fp, class A0>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype(boost::forward<A0>(a0).*f)
+ {
+ return boost::forward<A0>(a0).*f;
+ }
+
+ template <class Fp, class A0>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype((*boost::forward<A0>(a0)).*f)
+ {
+ return (*boost::forward<A0>(a0)).*f;
+ }
+ template <class R, class Fp, class A0>
+ inline
+ auto
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
+ -> decltype((*boost::forward<A0>(a0)).*f)
+ {
+ return (*boost::forward<A0>(a0)).*f;
+ }
+
+ // bullet 5
+
+ template <class Fp>
+ inline
+ auto invoke(BOOST_THREAD_RV_REF(Fp) f)
+ -> decltype(boost::forward<Fp>(f)())
+ {
+ return boost::forward<Fp>(f)();
+ }
+ template <class Fp, class A1>
+ inline
+ auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1)
+ -> decltype(boost::forward<Fp>(f)(boost::forward<A1>(a1)))
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1));
+ } template <class Fp, class A1, class A2>
+ inline
+ auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ -> decltype(boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2)))
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Fp, class A1, class A2, class A3>
+ inline
+ auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ -> decltype(boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3)))
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+
+
+ template <class R, class Fp>
+ inline
+ auto invoke(BOOST_THREAD_RV_REF(Fp) f)
+ -> decltype(boost::forward<Fp>(f)())
+ {
+ return boost::forward<Fp>(f)();
+ }
+ template <class R, class Fp, class A1>
+ inline
+ auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1)
+ -> decltype(boost::forward<Fp>(f)(boost::forward<A1>(a1)))
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1));
+ }
+ template <class R, class Fp, class A1, class A2>
+ inline
+ auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ -> decltype(boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2)))
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class R, class Fp, class A1, class A2, class A3>
+ inline
+ auto invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ -> decltype(boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3)))
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+
+#endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+#elif ! defined(BOOST_NO_SFINAE_EXPR) && \
+ ! defined BOOST_NO_CXX11_HDR_FUNCTIONAL && \
+ defined BOOST_MSVC
+
+ template <class Ret, class Fp>
+ inline
+ Ret invoke(BOOST_THREAD_RV_REF(Fp) f)
+ {
+ return f();
+ }
+ template <class Ret, class Fp, class A1>
+ inline
+ Ret invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return std::bind(boost::forward<Fp>(f), boost::forward<A1>(a1))();
+ }
+ template <class Ret, class Fp, class A1, class A2>
+ inline
+ Ret invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return std::bind(boost::forward<Fp>(f), boost::forward<A1>(a1), boost::forward<A2>(a2))();
+ }
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline
+ Ret invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return std::bind(boost::forward<Fp>(f), boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3))();
+ }
+
+#define BOOST_THREAD_PROVIDES_INVOKE_RET
+
+#elif ! defined BOOST_MSVC
+//!!!!! WARNING !!!!! THIS DOESN'T WORKS YET
+#define BOOST_THREAD_PROVIDES_INVOKE_RET
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ // bullet 1
+ // (t1.*f)(t2, ..., tN) when f is a pointer to a member function of a class T and t1 is an object of
+ // type T or a reference to an object of type T or a reference to an object of a type derived from T
+ template <class Ret, class A, class A0, class ...Args>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(Args...), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<Args>(args)...);
+ }
+
+ template <class Ret, class A, class A0, class ...Args>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(Args...) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<Args>(args)...);
+ }
+
+ template <class Ret, class A, class A0, class ...Args>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(Args...) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<Args>(args)...);
+ }
+
+ template <class Ret, class A, class A0, class ...Args>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(Args...) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<Args>(args)...);
+ }
+
+ // bullet 2
+ // ((*t1).*f)(t2, ..., tN) when f is a pointer to a member function of a class T and t1 is not one of
+ // the types described in the previous item;
+ template <class Ret, class A, class A0, class ...Args>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(Args...), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<Args>(args)...);
+ }
+
+ template <class Ret, class A, class A0, class ...Args>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(Args...) const, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<Args>(args)...);
+ }
+
+ template <class Ret, class A, class A0, class ...Args>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(Args...) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<Args>(args)...);
+ }
+
+ template <class Ret, class A, class A0, class ...Args>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(Args...) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<Args>(args)...);
+ }
+
+ // bullet 3
+ // t1.*f when N == 1 and f is a pointer to member data of a class T and t1 is an object of type T or a
+ // reference to an object of type T or a reference to an object of a type derived from T;
+// template <class Ret, class A, class A0>
+// inline
+// typename enable_if_c
+// <
+// is_base_of<A, typename remove_reference<A0>::type>::value,
+// typename detail::apply_cv<A0, A>::type&
+// >::type
+// invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0)
+// {
+// return boost::forward<A0>(a0).*f;
+// }
+
+ // bullet 4
+ // (*t1).*f when N == 1 and f is a pointer to member data of a class T and t1 is not one of the types
+ //described in the previous item;
+
+// template <class A0, class Ret, bool>
+// struct d4th_helper
+// {
+// };
+//
+// template <class A0, class Ret>
+// struct d4th_helper<A0, Ret, true>
+// {
+// typedef typename apply_cv<decltype(*declval<A0>()), Ret>::type type;
+// };
+//
+// template <class Ret, class A, class A0>
+// inline
+// typename detail::4th_helper<A, Ret,
+// !is_base_of<A,
+// typename remove_reference<A0>::type
+// >::value
+// >::type&
+// invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0)
+// {
+// return (*boost::forward<A0>(a0)).*f;
+// }
+
+// template <class Ret, class A, class A0>
+// inline
+// typename enable_if_c
+// <
+// !is_base_of<A, typename remove_reference<A0>::type>::value,
+// typename detail::ref_return1<Ret A::*, A0>::type
+// >::type
+// invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0)
+// {
+// return (*boost::forward<A0>(a0)).*f;
+// }
+
+ // bullet 5
+ // f(t1, t2, ..., tN) in all other cases.
+
+ template <class Ret, class Fp, class ...Args>
+ inline Ret do_invoke(mpl::false_, BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return boost::forward<Fp>(f)(boost::forward<Args>(args)...);
+ }
+
+ template <class Ret, class Fp, class ...Args>
+ inline Ret do_invoke(mpl::true_, BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return f(boost::forward<Args>(args)...);
+ }
+
+ template <class Ret, class Fp, class ...Args>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(Args) ...args)
+ {
+ return boost::detail::do_invoke<Ret>(boost::is_pointer<Fp>(), boost::forward<Fp>(f), boost::forward<Args>(args)...);
+ }
+#else // BOOST_NO_CXX11_VARIADIC_TEMPLATES
+ // bullet 1
+ // (t1.*f)(t2, ..., tN) when f is a pointer to a member function of a class T and t1 is an object of
+ // type T or a reference to an object of type T or a reference to an object of a type derived from T
+
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(), A0& a0)
+ {
+ return (a0.*f)();
+ }
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(), A0* a0)
+ {
+ return ((*a0).*f)();
+ }
+
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1),
+ A0& a0, BOOST_THREAD_RV_REF(A1) a1
+ )
+ {
+ return (a0.*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1), A0& a0, A1 a1)
+ {
+ return (a0.*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1), A0* a0, BOOST_THREAD_RV_REF(A1) a1
+ )
+ {
+ return (*(a0).*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1), A0* a0, A1 a1)
+ {
+ return (*a0.*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2),
+ A0& a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2
+ )
+ {
+ return (a0.*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2), A0* a0, A1 a1, A2 a2)
+ {
+ return ((*a0).*f)(a1, a2);
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3),
+ A0& a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return (a0.*f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3), A0* a0, A1 a1, A2 a2, A3 a3)
+ {
+ return ((*a0).*f)(a1, a2, a3);
+ }
+
+///
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)() const, A0 const& a0)
+ {
+ return (a0.*f)();
+ }
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)() const, A0 const* a0)
+ {
+ return ((*a0).*f)();
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const, A0 const& a0, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return (a0.*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const, A0 const* a0, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return ((*a0).*f)(boost::forward<A1>(a1));
+ }
+
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const, A0 const& a0, A1 a1)
+ {
+ return (a0.*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) const,
+ A0 const& a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2
+ )
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2)
+ );
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) const, A0 const& a0, A1 a1, A2 a2)
+ {
+ return (a0.*f)(a1, a2);
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) const,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3
+ )
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) const, A0 a0, A1 a1, A2 a2, A3 a3)
+ {
+ return (a0.*f)(a1, a2, a3);
+ }
+ ///
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)() volatile, BOOST_THREAD_RV_REF(A0) a0)
+ {
+ return (boost::forward<A0>(a0).*f)();
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) volatile, A0 a0, A1 a1)
+ {
+ return (a0.*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) volatile, A0 a0, A1 a1, A2 a2 )
+ {
+ return (a0.*f)(a1, a2);
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3
+ )
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) volatile, A0 a0, A1 a1, A2 a2, A3 a3)
+ {
+ return (a0.*f)(a1, a2, a3);
+ }
+ ///
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)() const volatile, BOOST_THREAD_RV_REF(A0) a0)
+ {
+ return (boost::forward<A0>(a0).*f)();
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const volatile, BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const volatile, A0 a0, A1 a1)
+ {
+ return (a0.*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) const volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2
+ )
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) const volatile,
+ A0 a0, A1 a1, A2 a2
+ )
+ {
+ return (a0.*f)(a1, a2);
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) const volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3
+ )
+ {
+ return (boost::forward<A0>(a0).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) const volatile,
+ A0 a0, A1 a1, A2 a2, A3 a3
+ )
+ {
+ return (a0.*f)(a1, a2, a3);
+ }
+
+ // bullet 2
+ // ((*t1).*f)(t2, ..., tN) when f is a pointer to a member function of a class T and t1 is not one of
+ // the types described in the previous item;
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(), BOOST_THREAD_RV_REF(A0) a0)
+ {
+ return ((*boost::forward<A0>(a0)).*f)();
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1), BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1), A0 a0, A1 a1)
+ {
+ return ((*a0).*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, BOOST_THREAD_RV_REF(A2)),
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2), A0 a0, A1 a1, A2 a2)
+ {
+ return ((*a0).*f)(a1, a2);
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, BOOST_THREAD_RV_REF(A2), BOOST_THREAD_RV_REF(A3)),
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3)
+ );
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3), A0 a0, A1 a1, A2 a2, A3 a3)
+ {
+ return ((*a0).*f)(a1, a2, a3);
+ }
+
+///
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)() const, BOOST_THREAD_RV_REF(A0) a0)
+ {
+ return ((*boost::forward<A0>(a0)).*f)();
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const, BOOST_THREAD_RV_REF(A0) a0, A1 a1)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const, A0 a0, A1 a1)
+ {
+ return ((*a0).*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) const,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) const, A0 a0, A1 a1, A2 a2)
+ {
+ return ((*a0).*f)(a1, a2);
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) const,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) const,
+ A0 a0, A1 a1, A2 a2, A3 a3)
+ {
+ return ((*a0).*f)(a1, a2, a3);
+ }
+ ///
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)() volatile, BOOST_THREAD_RV_REF(A0) a0)
+ {
+ return ((*boost::forward<A0>(a0)).*f)();
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) volatile, A0 a0, A1 a1)
+ {
+ return ((*a0).*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) volatile, A0 a0, A1 a1, A2 a2)
+ {
+ return ((*a0).*f)(a1, a2);
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) volatile, A0 a0, A1 a1, A2 a2, A3 a3)
+ {
+ return ((*a0).*f)(a1, a2, a3);
+ }
+ ///
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)() const volatile, BOOST_THREAD_RV_REF(A0) a0)
+ {
+ return ((*boost::forward<A0>(a0)).*f)();
+ }
+ template <class Ret, class A, class A0>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)() const volatile, A0 a0)
+ {
+ return ((*a0).*f)();
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class A, class A0, class A1>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1) const volatile, A0 a0, A1 a1)
+ {
+ return ((*a0).*f)(a1);
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) const volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class A, class A0, class A1, class A2>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2) const volatile,
+ A0 a0, A1 a1, A2 a2)
+ {
+ return ((*a0).*f)(a1, a2);
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) const volatile,
+ BOOST_THREAD_RV_REF(A0) a0, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return ((*boost::forward<A0>(a0)).*f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class A, class A0, class A1, class A2, class A3>
+ inline
+ typename enable_if_c
+ <
+ ! is_base_of<A, typename remove_reference<A0>::type>::value,
+ Ret
+ >::type
+ invoke(Ret (A::*f)(A1, A2, A3) const volatile,
+ A0 a0, A1 a1, A2 a2, A3 a3)
+ {
+ return ((*a0).*f)(a1, a2, a3);
+ }
+ // bullet 3
+ // t1.*f when N == 1 and f is a pointer to member data of a class T and t1 is an object of type T or a
+ // reference to an object of type T or a reference to an object of a type derived from T;
+// template <class Ret, class A, class A0>
+// inline
+// typename enable_if_c
+// <
+// is_base_of<A, typename remove_reference<A0>::type>::value,
+// typename detail::apply_cv<A0, A>::type&
+// >::type
+// invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0)
+// {
+// return boost::forward<A0>(a0).*f;
+// }
+
+ // bullet 4
+ // (*t1).*f when N == 1 and f is a pointer to member data of a class T and t1 is not one of the types
+ //described in the previous item;
+
+// template <class A0, class Ret, bool>
+// struct d4th_helper
+// {
+// };
+//
+// template <class A0, class Ret>
+// struct d4th_helper<A0, Ret, true>
+// {
+// typedef typename apply_cv<decltype(*declval<A0>()), Ret>::type type;
+// };
+//
+// template <class Ret, class A, class A0>
+// inline
+// typename detail::4th_helper<A, Ret,
+// !is_base_of<A,
+// typename remove_reference<A0>::type
+// >::value
+// >::type&
+// invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0)
+// {
+// return (*boost::forward<A0>(a0)).*f;
+// }
+
+// template <class Ret, class A, class A0>
+// inline
+// typename enable_if_c
+// <
+// !is_base_of<A, typename remove_reference<A0>::type>::value,
+// typename detail::ref_return1<Ret A::*, A0>::type
+// >::type
+// invoke(Ret A::* f, BOOST_THREAD_RV_REF(A0) a0)
+// {
+// return (*boost::forward<A0>(a0)).*f;
+// }
+
+ // bullet 5
+ // f(t1, t2, ..., tN) in all other cases.
+
+ template <class Ret, class Fp>
+ inline Ret do_invoke(mpl::false_, BOOST_THREAD_FWD_REF(Fp) f)
+ {
+ return boost::forward<Fp>(f)();
+ }
+ template <class Ret, class Fp>
+ inline Ret do_invoke(mpl::true_, BOOST_THREAD_FWD_REF(Fp) f)
+ {
+ return f();
+ }
+ template <class Ret, class Fp>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(BOOST_THREAD_FWD_REF(Fp) f)
+ {
+ return boost::detail::do_invoke<Ret>(boost::is_pointer<Fp>(), boost::forward<Fp>(f));
+ }
+
+ template <class Ret, class Fp, class A1>
+ inline Ret do_invoke(mpl::false_, BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1));
+ }
+ template <class Ret, class Fp, class A1>
+ inline Ret do_invoke(mpl::true_, BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return f(boost::forward<A1>(a1));
+ }
+ template <class Ret, class Fp, class A1>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return boost::detail::do_invoke<Ret>(boost::is_pointer<Fp>(), boost::forward<Fp>(f), boost::forward<A1>(a1));
+ }
+
+ template <class Ret, class Fp, class A1, class A2>
+ inline Ret do_invoke(mpl::false_, BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class Fp, class A1, class A2>
+ inline Ret do_invoke(mpl::true_, BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return f(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class Fp, class A1, class A2>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return boost::detail::do_invoke<Ret>(boost::is_pointer<Fp>(), boost::forward<Fp>(f), boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline Ret do_invoke(mpl::false_, BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return boost::forward<Fp>(f)(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline Ret do_invoke(mpl::true_, BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return f(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(BOOST_THREAD_FWD_REF(Fp) f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return boost::detail::do_invoke<Ret>(boost::is_pointer<Fp>(), boost::forward<Fp>(f), boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+
+
+ template <class Ret, class Fp, class A1>
+ inline Ret do_invoke(mpl::false_, BOOST_THREAD_FWD_REF(Fp) f, A1 a1)
+ {
+ return boost::forward<Fp>(f)(a1);
+ }
+ template <class Ret, class Fp, class A1>
+ inline Ret do_invoke(mpl::true_, BOOST_THREAD_FWD_REF(Fp) f, A1 a1)
+ {
+ return f(a1);
+ }
+ template <class Ret, class Fp, class A1>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(BOOST_THREAD_FWD_REF(Fp) f, A1 a1)
+ {
+ return boost::detail::do_invoke<Ret>(boost::is_pointer<Fp>(), boost::forward<Fp>(f), a1);
+ }
+
+ template <class Ret, class Fp, class A1, class A2>
+ inline Ret do_invoke(mpl::false_, BOOST_THREAD_FWD_REF(Fp) f, A1 a1, A2 a2)
+ {
+ return boost::forward<Fp>(f)(a1, a2);
+ }
+ template <class Ret, class Fp, class A1, class A2>
+ inline Ret do_invoke(mpl::true_, BOOST_THREAD_FWD_REF(Fp) f, A1 a1, A2 a2)
+ {
+ return f(a1, a2);
+ }
+ template <class Ret, class Fp, class A1, class A2>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(BOOST_THREAD_FWD_REF(Fp) f, A1 a1, A2 a2)
+ {
+ return boost::detail::do_invoke<Ret>(boost::is_pointer<Fp>(), boost::forward<Fp>(f), a1, a2);
+ }
+
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline Ret do_invoke(mpl::false_, BOOST_THREAD_FWD_REF(Fp) f, A1 a1, A2 a2, A3 a3)
+ {
+ return boost::forward<Fp>(f)(a1, a2, a3);
+ }
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline Ret do_invoke(mpl::true_, BOOST_THREAD_FWD_REF(Fp) f, A1 a1, A2 a2, A3 a3)
+ {
+ return f(a1, a2, a3);
+ }
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(BOOST_THREAD_FWD_REF(Fp) f, A1 a1, A2 a2, A3 a3)
+ {
+ return boost::detail::do_invoke<Ret>(boost::is_pointer<Fp>(), boost::forward<Fp>(f), a1, a2, a3);
+ }
+
+
+ ///
+ template <class Ret, class Fp>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(Fp &f)
+ {
+ return f();
+ }
+ template <class Ret, class Fp, class A1>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(Fp &f, BOOST_THREAD_RV_REF(A1) a1)
+ {
+ return f(boost::forward<A1>(a1));
+ }
+ template <class Ret, class Fp, class A1>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(Fp &f, A1 a1)
+ {
+ return f(a1);
+ }
+ template <class Ret, class Fp, class A1, class A2>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(Fp &f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2)
+ {
+ return f(boost::forward<A1>(a1), boost::forward<A2>(a2));
+ }
+ template <class Ret, class Fp, class A1, class A2>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(Fp &f, A1 a1, A2 a2)
+ {
+ return f(a1, a2);
+ }
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(Fp &f, BOOST_THREAD_RV_REF(A1) a1, BOOST_THREAD_RV_REF(A2) a2, BOOST_THREAD_RV_REF(A3) a3)
+ {
+ return f(boost::forward<A1>(a1), boost::forward<A2>(a2), boost::forward<A3>(a3));
+ }
+ template <class Ret, class Fp, class A1, class A2, class A3>
+ inline
+ typename disable_if_c
+ <
+ is_member_function_pointer<Fp>::value,
+ Ret
+ >::type
+ invoke(Fp &f, A1 a1, A2 a2, A3 a3)
+ {
+ return f(a1, a2, a3);
+ }
+ ///
+
+#endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+#endif // all
+ }
+ }
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/invoker.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/invoker.hpp
new file mode 100644
index 00000000000..9f38e9798dd
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/invoker.hpp
@@ -0,0 +1,762 @@
+// Copyright (C) 2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// 2013/04 Vicente J. Botet Escriba
+// Provide implementation up to 9 parameters when BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined.
+// Make use of Boost.Move
+// Make use of Boost.Tuple (movable)
+// 2012/11 Vicente J. Botet Escriba
+// Adapt to boost libc++ implementation
+
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+// The invoker code is based on the one from libcxx.
+//===----------------------------------------------------------------------===//
+
+#ifndef BOOST_THREAD_DETAIL_INVOKER_HPP
+#define BOOST_THREAD_DETAIL_INVOKER_HPP
+
+#include <boost/config.hpp>
+
+#include <boost/utility/result_of.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/detail/invoke.hpp>
+#include <boost/thread/detail/make_tuple_indices.hpp>
+#include <boost/thread/csbl/tuple.hpp>
+#include <boost/tuple/tuple.hpp>
+
+#include <boost/thread/detail/variadic_header.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+
+#if defined(BOOST_THREAD_PROVIDES_INVOKE) && ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && ! defined(BOOST_NO_CXX11_HDR_TUPLE)
+
+ template <class Fp, class ... Args>
+ class invoker
+ {
+ //typedef typename decay<Fp>::type Fpd;
+ //typedef tuple<typename decay<Args>::type...> Argsd;
+
+ //csbl::tuple<Fpd, Argsd...> f_;
+ csbl::tuple<Fp, Args...> f_;
+
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE( invoker)
+ //typedef typename invoke_of<_Fp, _Args...>::type Rp;
+ typedef typename result_of<Fp(Args...)>::type result_type;
+
+ template <class F, class ... As>
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(As)... args)
+ : f_(boost::forward<F>(f), boost::forward<As>(args)...)
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f) : f_(boost::move(BOOST_THREAD_RV(f).f_))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker( const invoker& f) : f_(f.f_)
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker& operator=(BOOST_THREAD_RV_REF(invoker) f)
+ {
+ if (this != &f)
+ {
+ f_ = boost::move(BOOST_THREAD_RV(f).f_);
+ }
+ return *this;
+ }
+
+ BOOST_SYMBOL_VISIBLE
+ invoker& operator=( BOOST_THREAD_COPY_ASSIGN_REF(invoker) f)
+ {
+ if (this != &f)
+ {
+ f_ = f.f_;
+ }
+ return *this;
+ }
+
+ result_type operator()()
+ {
+ typedef typename make_tuple_indices<1+sizeof...(Args), 1>::type Index;
+ return execute(Index());
+ }
+ private:
+ template <size_t ...Indices>
+ result_type
+ execute(tuple_indices<Indices...>)
+ {
+ return detail::invoke(boost::move(csbl::get<0>(f_)), boost::move(csbl::get<Indices>(f_))...);
+ }
+ };
+
+ template <class R, class Fp, class ... Args>
+ class invoker_ret
+ {
+ //typedef typename decay<Fp>::type Fpd;
+ //typedef tuple<typename decay<Args>::type...> Argsd;
+
+ //csbl::tuple<Fpd, Argsd...> f_;
+ csbl::tuple<Fp, Args...> f_;
+
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE( invoker_ret)
+ typedef R result_type;
+
+ template <class F, class ... As>
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker_ret(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(As)... args)
+ : f_(boost::forward<F>(f), boost::forward<As>(args)...)
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker_ret(BOOST_THREAD_RV_REF(invoker_ret) f) : f_(boost::move(BOOST_THREAD_RV(f).f_))
+ {}
+
+ result_type operator()()
+ {
+ typedef typename make_tuple_indices<1+sizeof...(Args), 1>::type Index;
+ return execute(Index());
+ }
+ private:
+ template <size_t ...Indices>
+ result_type
+ execute(tuple_indices<Indices...>)
+ {
+ return detail::invoke<R>(boost::move(csbl::get<0>(f_)), boost::move(csbl::get<Indices>(f_))...);
+ }
+ };
+ //BOOST_THREAD_DCL_MOVABLE_BEG(X) invoker<Fp> BOOST_THREAD_DCL_MOVABLE_END
+#else
+
+#if ! defined BOOST_MSVC && defined(BOOST_THREAD_PROVIDES_INVOKE)
+
+#define BOOST_THREAD_RV_REF_ARG_T(z, n, unused) BOOST_PP_COMMA_IF(n) BOOST_THREAD_RV_REF(Arg##n)
+#define BOOST_THREAD_RV_REF_A_T(z, n, unused) BOOST_PP_COMMA_IF(n) BOOST_THREAD_RV_REF(A##n)
+#define BOOST_THREAD_RV_REF_ARG(z, n, unused) , BOOST_THREAD_RV_REF(Arg##n) arg##n
+#define BOOST_THREAD_FWD_REF_A(z, n, unused) , BOOST_THREAD_FWD_REF(A##n) arg##n
+#define BOOST_THREAD_FWD_REF_ARG(z, n, unused) , BOOST_THREAD_FWD_REF(Arg##n) arg##n
+#define BOOST_THREAD_FWD_PARAM(z, n, unused) , boost::forward<Arg##n>(arg##n)
+#define BOOST_THREAD_FWD_PARAM_A(z, n, unused) , boost::forward<A##n>(arg##n)
+#define BOOST_THREAD_DCL(z, n, unused) Arg##n v##n;
+#define BOOST_THREAD_MOVE_PARAM(z, n, unused) , v##n(boost::move(arg##n))
+#define BOOST_THREAD_FORWARD_PARAM_A(z, n, unused) , v##n(boost::forward<A##n>(arg##n))
+#define BOOST_THREAD_MOVE_RHS_PARAM(z, n, unused) , v##n(boost::move(x.v##n))
+#define BOOST_THREAD_MOVE_DCL(z, n, unused) , boost::move(v##n)
+#define BOOST_THREAD_MOVE_DCL_T(z, n, unused) BOOST_PP_COMMA_IF(n) boost::move(v##n)
+#define BOOST_THREAD_ARG_DEF(z, n, unused) , class Arg##n = tuples::null_type
+
+ template <class Fp, class Arg = tuples::null_type
+ BOOST_PP_REPEAT(BOOST_THREAD_MAX_ARGS, BOOST_THREAD_ARG_DEF, ~)
+ >
+ class invoker;
+
+#define BOOST_THREAD_ASYNC_FUNCT(z, n, unused) \
+ template <class Fp BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, class Arg) > \
+ class invoker<Fp BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, Arg)> \
+ { \
+ Fp fp_; \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_DCL, ~) \
+ public: \
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) \
+ typedef typename result_of<Fp(BOOST_PP_ENUM_PARAMS(n, Arg))>::type result_type; \
+ \
+ template <class F BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, class A) > \
+ BOOST_SYMBOL_VISIBLE \
+ explicit invoker(BOOST_THREAD_FWD_REF(F) f \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_FWD_REF_A, ~) \
+ ) \
+ : fp_(boost::forward<F>(f)) \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_FORWARD_PARAM_A, ~) \
+ {} \
+ \
+ BOOST_SYMBOL_VISIBLE \
+ invoker(BOOST_THREAD_RV_REF(invoker) x) \
+ : fp_(boost::move(x.fp_)) \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_MOVE_RHS_PARAM, ~) \
+ {} \
+ \
+ result_type operator()() { \
+ return detail::invoke(boost::move(fp_) \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_MOVE_DCL, ~) \
+ ); \
+ } \
+ }; \
+ \
+ template <class R BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, class Arg) > \
+ class invoker<R(*)(BOOST_PP_REPEAT(n, BOOST_THREAD_RV_REF_ARG_T, ~)) BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, Arg)> \
+ { \
+ typedef R(*Fp)(BOOST_PP_REPEAT(n, BOOST_THREAD_RV_REF_ARG_T, ~)); \
+ Fp fp_; \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_DCL, ~) \
+ public: \
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker) \
+ typedef typename result_of<Fp(BOOST_PP_ENUM_PARAMS(n, Arg))>::type result_type; \
+ \
+ template <class R2 BOOST_PP_COMMA_IF(n) BOOST_PP_ENUM_PARAMS(n, class A) > \
+ BOOST_SYMBOL_VISIBLE \
+ explicit invoker(R2(*f)(BOOST_PP_REPEAT(n, BOOST_THREAD_RV_REF_A_T, ~)) \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_FWD_REF_A, ~) \
+ ) \
+ : fp_(f) \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_FORWARD_PARAM_A, ~) \
+ {} \
+ \
+ BOOST_SYMBOL_VISIBLE \
+ invoker(BOOST_THREAD_RV_REF(invoker) x) \
+ : fp_(x.fp_) \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_MOVE_RHS_PARAM, ~) \
+ {} \
+ \
+ result_type operator()() { \
+ return fp_( \
+ BOOST_PP_REPEAT(n, BOOST_THREAD_MOVE_DCL_T, ~) \
+ ); \
+ } \
+ };
+
+ BOOST_PP_REPEAT(BOOST_THREAD_MAX_ARGS, BOOST_THREAD_ASYNC_FUNCT, ~)
+
+ #undef BOOST_THREAD_RV_REF_ARG_T
+ #undef BOOST_THREAD_RV_REF_ARG
+ #undef BOOST_THREAD_FWD_REF_ARG
+ #undef BOOST_THREAD_FWD_REF_A
+ #undef BOOST_THREAD_FWD_PARAM
+ #undef BOOST_THREAD_FWD_PARAM_A
+ #undef BOOST_THREAD_DCL
+ #undef BOOST_THREAD_MOVE_PARAM
+ #undef BOOST_THREAD_MOVE_RHS_PARAM
+ #undef BOOST_THREAD_MOVE_DCL
+ #undef BOOST_THREAD_ARG_DEF
+ #undef BOOST_THREAD_ASYNC_FUNCT
+
+#else
+
+ template <class Fp,
+ class T0 = tuples::null_type, class T1 = tuples::null_type, class T2 = tuples::null_type,
+ class T3 = tuples::null_type, class T4 = tuples::null_type, class T5 = tuples::null_type,
+ class T6 = tuples::null_type, class T7 = tuples::null_type, class T8 = tuples::null_type
+ , class T9 = tuples::null_type
+ >
+ class invoker;
+
+ template <class Fp,
+ class T0 , class T1 , class T2 ,
+ class T3 , class T4 , class T5 ,
+ class T6 , class T7 , class T8 >
+ class invoker<Fp, T0, T1, T2, T3, T4, T5, T6, T7, T8>
+ {
+ Fp fp_;
+ T0 v0_;
+ T1 v1_;
+ T2 v2_;
+ T3 v3_;
+ T4 v4_;
+ T5 v5_;
+ T6 v6_;
+ T7 v7_;
+ T8 v8_;
+ //::boost::tuple<Fp, T0, T1, T2, T3, T4, T5, T6, T7, T8> f_;
+
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0, T1, T2, T3, T4, T5, T6, T7, T8)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ , BOOST_THREAD_RV_REF(T1) a1
+ , BOOST_THREAD_RV_REF(T2) a2
+ , BOOST_THREAD_RV_REF(T3) a3
+ , BOOST_THREAD_RV_REF(T4) a4
+ , BOOST_THREAD_RV_REF(T5) a5
+ , BOOST_THREAD_RV_REF(T6) a6
+ , BOOST_THREAD_RV_REF(T7) a7
+ , BOOST_THREAD_RV_REF(T8) a8
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ , v1_(boost::move(a1))
+ , v2_(boost::move(a2))
+ , v3_(boost::move(a3))
+ , v4_(boost::move(a4))
+ , v5_(boost::move(a5))
+ , v6_(boost::move(a6))
+ , v7_(boost::move(a7))
+ , v8_(boost::move(a8))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ , v1_(boost::move(BOOST_THREAD_RV(f).v1_))
+ , v2_(boost::move(BOOST_THREAD_RV(f).v2_))
+ , v3_(boost::move(BOOST_THREAD_RV(f).v3_))
+ , v4_(boost::move(BOOST_THREAD_RV(f).v4_))
+ , v5_(boost::move(BOOST_THREAD_RV(f).v5_))
+ , v6_(boost::move(BOOST_THREAD_RV(f).v6_))
+ , v7_(boost::move(BOOST_THREAD_RV(f).v7_))
+ , v8_(boost::move(BOOST_THREAD_RV(f).v8_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ , boost::move(v1_)
+ , boost::move(v2_)
+ , boost::move(v3_)
+ , boost::move(v4_)
+ , boost::move(v5_)
+ , boost::move(v6_)
+ , boost::move(v7_)
+ , boost::move(v8_)
+ );
+ }
+ };
+ template <class Fp, class T0, class T1, class T2, class T3, class T4, class T5, class T6, class T7 >
+ class invoker<Fp, T0, T1, T2, T3, T4, T5, T6, T7>
+ {
+ Fp fp_;
+ T0 v0_;
+ T1 v1_;
+ T2 v2_;
+ T3 v3_;
+ T4 v4_;
+ T5 v5_;
+ T6 v6_;
+ T7 v7_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0, T1, T2, T3, T4, T5, T6, T7)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ , BOOST_THREAD_RV_REF(T1) a1
+ , BOOST_THREAD_RV_REF(T2) a2
+ , BOOST_THREAD_RV_REF(T3) a3
+ , BOOST_THREAD_RV_REF(T4) a4
+ , BOOST_THREAD_RV_REF(T5) a5
+ , BOOST_THREAD_RV_REF(T6) a6
+ , BOOST_THREAD_RV_REF(T7) a7
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ , v1_(boost::move(a1))
+ , v2_(boost::move(a2))
+ , v3_(boost::move(a3))
+ , v4_(boost::move(a4))
+ , v5_(boost::move(a5))
+ , v6_(boost::move(a6))
+ , v7_(boost::move(a7))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ , v1_(boost::move(BOOST_THREAD_RV(f).v1_))
+ , v2_(boost::move(BOOST_THREAD_RV(f).v2_))
+ , v3_(boost::move(BOOST_THREAD_RV(f).v3_))
+ , v4_(boost::move(BOOST_THREAD_RV(f).v4_))
+ , v5_(boost::move(BOOST_THREAD_RV(f).v5_))
+ , v6_(boost::move(BOOST_THREAD_RV(f).v6_))
+ , v7_(boost::move(BOOST_THREAD_RV(f).v7_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ , boost::move(v1_)
+ , boost::move(v2_)
+ , boost::move(v3_)
+ , boost::move(v4_)
+ , boost::move(v5_)
+ , boost::move(v6_)
+ , boost::move(v7_)
+ );
+ }
+ };
+ template <class Fp, class T0, class T1, class T2, class T3, class T4, class T5, class T6>
+ class invoker<Fp, T0, T1, T2, T3, T4, T5, T6>
+ {
+ Fp fp_;
+ T0 v0_;
+ T1 v1_;
+ T2 v2_;
+ T3 v3_;
+ T4 v4_;
+ T5 v5_;
+ T6 v6_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0, T1, T2, T3, T4, T5, T6)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ , BOOST_THREAD_RV_REF(T1) a1
+ , BOOST_THREAD_RV_REF(T2) a2
+ , BOOST_THREAD_RV_REF(T3) a3
+ , BOOST_THREAD_RV_REF(T4) a4
+ , BOOST_THREAD_RV_REF(T5) a5
+ , BOOST_THREAD_RV_REF(T6) a6
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ , v1_(boost::move(a1))
+ , v2_(boost::move(a2))
+ , v3_(boost::move(a3))
+ , v4_(boost::move(a4))
+ , v5_(boost::move(a5))
+ , v6_(boost::move(a6))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ , v1_(boost::move(BOOST_THREAD_RV(f).v1_))
+ , v2_(boost::move(BOOST_THREAD_RV(f).v2_))
+ , v3_(boost::move(BOOST_THREAD_RV(f).v3_))
+ , v4_(boost::move(BOOST_THREAD_RV(f).v4_))
+ , v5_(boost::move(BOOST_THREAD_RV(f).v5_))
+ , v6_(boost::move(BOOST_THREAD_RV(f).v6_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ , boost::move(v1_)
+ , boost::move(v2_)
+ , boost::move(v3_)
+ , boost::move(v4_)
+ , boost::move(v5_)
+ , boost::move(v6_)
+ );
+ }
+ };
+ template <class Fp, class T0, class T1, class T2, class T3, class T4, class T5>
+ class invoker<Fp, T0, T1, T2, T3, T4, T5>
+ {
+ Fp fp_;
+ T0 v0_;
+ T1 v1_;
+ T2 v2_;
+ T3 v3_;
+ T4 v4_;
+ T5 v5_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0, T1, T2, T3, T4, T5)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ , BOOST_THREAD_RV_REF(T1) a1
+ , BOOST_THREAD_RV_REF(T2) a2
+ , BOOST_THREAD_RV_REF(T3) a3
+ , BOOST_THREAD_RV_REF(T4) a4
+ , BOOST_THREAD_RV_REF(T5) a5
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ , v1_(boost::move(a1))
+ , v2_(boost::move(a2))
+ , v3_(boost::move(a3))
+ , v4_(boost::move(a4))
+ , v5_(boost::move(a5))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ , v1_(boost::move(BOOST_THREAD_RV(f).v1_))
+ , v2_(boost::move(BOOST_THREAD_RV(f).v2_))
+ , v3_(boost::move(BOOST_THREAD_RV(f).v3_))
+ , v4_(boost::move(BOOST_THREAD_RV(f).v4_))
+ , v5_(boost::move(BOOST_THREAD_RV(f).v5_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ , boost::move(v1_)
+ , boost::move(v2_)
+ , boost::move(v3_)
+ , boost::move(v4_)
+ , boost::move(v5_)
+ );
+ }
+ };
+ template <class Fp, class T0, class T1, class T2, class T3, class T4>
+ class invoker<Fp, T0, T1, T2, T3, T4>
+ {
+ Fp fp_;
+ T0 v0_;
+ T1 v1_;
+ T2 v2_;
+ T3 v3_;
+ T4 v4_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0, T1, T2, T3, T4)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ , BOOST_THREAD_RV_REF(T1) a1
+ , BOOST_THREAD_RV_REF(T2) a2
+ , BOOST_THREAD_RV_REF(T3) a3
+ , BOOST_THREAD_RV_REF(T4) a4
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ , v1_(boost::move(a1))
+ , v2_(boost::move(a2))
+ , v3_(boost::move(a3))
+ , v4_(boost::move(a4))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ , v1_(boost::move(BOOST_THREAD_RV(f).v1_))
+ , v2_(boost::move(BOOST_THREAD_RV(f).v2_))
+ , v3_(boost::move(BOOST_THREAD_RV(f).v3_))
+ , v4_(boost::move(BOOST_THREAD_RV(f).v4_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ , boost::move(v1_)
+ , boost::move(v2_)
+ , boost::move(v3_)
+ , boost::move(v4_)
+ );
+ }
+ };
+ template <class Fp, class T0, class T1, class T2, class T3>
+ class invoker<Fp, T0, T1, T2, T3>
+ {
+ Fp fp_;
+ T0 v0_;
+ T1 v1_;
+ T2 v2_;
+ T3 v3_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0, T1, T2, T3)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ , BOOST_THREAD_RV_REF(T1) a1
+ , BOOST_THREAD_RV_REF(T2) a2
+ , BOOST_THREAD_RV_REF(T3) a3
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ , v1_(boost::move(a1))
+ , v2_(boost::move(a2))
+ , v3_(boost::move(a3))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ , v1_(boost::move(BOOST_THREAD_RV(f).v1_))
+ , v2_(boost::move(BOOST_THREAD_RV(f).v2_))
+ , v3_(boost::move(BOOST_THREAD_RV(f).v3_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ , boost::move(v1_)
+ , boost::move(v2_)
+ , boost::move(v3_)
+ );
+ }
+ };
+ template <class Fp, class T0, class T1, class T2>
+ class invoker<Fp, T0, T1, T2>
+ {
+ Fp fp_;
+ T0 v0_;
+ T1 v1_;
+ T2 v2_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0, T1, T2)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ , BOOST_THREAD_RV_REF(T1) a1
+ , BOOST_THREAD_RV_REF(T2) a2
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ , v1_(boost::move(a1))
+ , v2_(boost::move(a2))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ , v1_(boost::move(BOOST_THREAD_RV(f).v1_))
+ , v2_(boost::move(BOOST_THREAD_RV(f).v2_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ , boost::move(v1_)
+ , boost::move(v2_)
+ );
+ }
+ };
+ template <class Fp, class T0, class T1>
+ class invoker<Fp, T0, T1>
+ {
+ Fp fp_;
+ T0 v0_;
+ T1 v1_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0, T1)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ , BOOST_THREAD_RV_REF(T1) a1
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ , v1_(boost::move(a1))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ , v1_(boost::move(BOOST_THREAD_RV(f).v1_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ , boost::move(v1_)
+ );
+ }
+ };
+ template <class Fp, class T0>
+ class invoker<Fp, T0>
+ {
+ Fp fp_;
+ T0 v0_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp(T0)>::type result_type;
+
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f
+ , BOOST_THREAD_RV_REF(T0) a0
+ )
+ : fp_(boost::move(f))
+ , v0_(boost::move(a0))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(BOOST_THREAD_RV(f).fp))
+ , v0_(boost::move(BOOST_THREAD_RV(f).v0_))
+ {}
+
+ result_type operator()()
+ {
+ return detail::invoke(boost::move(fp_)
+ , boost::move(v0_)
+ );
+ }
+ };
+ template <class Fp>
+ class invoker<Fp>
+ {
+ Fp fp_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp()>::type result_type;
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(BOOST_THREAD_FWD_REF(Fp) f)
+ : fp_(boost::move(f))
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(boost::move(f.fp_))
+ {}
+ result_type operator()()
+ {
+ return fp_();
+ }
+ };
+ template <class R>
+ class invoker<R(*)()>
+ {
+ typedef R(*Fp)();
+ Fp fp_;
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(invoker)
+ typedef typename result_of<Fp()>::type result_type;
+ BOOST_SYMBOL_VISIBLE
+ explicit invoker(Fp f)
+ : fp_(f)
+ {}
+
+ BOOST_SYMBOL_VISIBLE
+ invoker(BOOST_THREAD_RV_REF(invoker) f)
+ : fp_(f.fp_)
+ {}
+ result_type operator()()
+ {
+ return fp_();
+ }
+ };
+#endif
+#endif
+
+ }
+}
+
+#include <boost/thread/detail/variadic_footer.hpp>
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/is_convertible.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/is_convertible.hpp
new file mode 100644
index 00000000000..b77620cf179
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/is_convertible.hpp
@@ -0,0 +1,49 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2011-2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/thread for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_THREAD_DETAIL_IS_CONVERTIBLE_HPP
+#define BOOST_THREAD_DETAIL_IS_CONVERTIBLE_HPP
+
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/thread/detail/move.hpp>
+
+namespace boost
+{
+ namespace thread_detail
+ {
+ template <typename T1, typename T2>
+ struct is_convertible : boost::is_convertible<T1,T2> {};
+
+#if defined BOOST_NO_CXX11_RVALUE_REFERENCES
+
+#if defined(BOOST_INTEL_CXX_VERSION) && (BOOST_INTEL_CXX_VERSION <= 1300)
+
+#if defined BOOST_THREAD_USES_MOVE
+ template <typename T1, typename T2>
+ struct is_convertible<
+ rv<T1> &,
+ rv<rv<T2> > &
+ > : false_type {};
+#endif
+
+#elif defined __GNUC__ && (__GNUC__ < 4 || ( __GNUC__ == 4 && __GNUC_MINOR__ <= 4 ))
+
+ template <typename T1, typename T2>
+ struct is_convertible<T1&, T2&> : boost::is_convertible<T1, T2> {};
+#endif
+
+#endif
+ }
+
+} // namespace boost
+
+
+#endif // BOOST_THREAD_DETAIL_MEMORY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/lockable_wrapper.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/lockable_wrapper.hpp
new file mode 100644
index 00000000000..8dc5a6cc786
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/lockable_wrapper.hpp
@@ -0,0 +1,45 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_DETAIL_LOCKABLE_WRAPPER_HPP
+#define BOOST_THREAD_DETAIL_LOCKABLE_WRAPPER_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
+#include <initializer_list>
+#endif
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
+ namespace thread_detail
+ {
+ template <typename Mutex>
+ struct lockable_wrapper
+ {
+ Mutex* m;
+ explicit lockable_wrapper(Mutex& m_) :
+ m(&m_)
+ {}
+ };
+ template <typename Mutex>
+ struct lockable_adopt_wrapper
+ {
+ Mutex* m;
+ explicit lockable_adopt_wrapper(Mutex& m_) :
+ m(&m_)
+ {}
+ };
+ }
+#endif
+
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/make_tuple_indices.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/make_tuple_indices.hpp
new file mode 100644
index 00000000000..73d54f11f81
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/make_tuple_indices.hpp
@@ -0,0 +1,224 @@
+// Copyright (C) 2012-2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// 2013/04 Vicente J. Botet Escriba
+// Provide implementation up to 10 parameters when BOOST_NO_CXX11_VARIADIC_TEMPLATES is defined.
+// 2012/11 Vicente J. Botet Escriba
+// Adapt to boost libc++ implementation
+
+//===----------------------------------------------------------------------===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is dual licensed under the MIT and the University of Illinois Open
+// Source Licenses. See LICENSE.TXT for details.
+//
+// The make_tuple_indices C++11 code is based on the one from libcxx.
+//===----------------------------------------------------------------------===//
+
+#ifndef BOOST_THREAD_DETAIL_MAKE_TUPLE_INDICES_HPP
+#define BOOST_THREAD_DETAIL_MAKE_TUPLE_INDICES_HPP
+
+#include <boost/config.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ // make_tuple_indices
+
+ template <std::size_t...> struct tuple_indices
+ {};
+
+ template <std::size_t Sp, class IntTuple, std::size_t Ep>
+ struct make_indices_imp;
+
+ template <std::size_t Sp, std::size_t ...Indices, std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<Indices...>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<Indices..., Sp>, Ep>::type type;
+ };
+
+ template <std::size_t Ep, std::size_t ...Indices>
+ struct make_indices_imp<Ep, tuple_indices<Indices...>, Ep>
+ {
+ typedef tuple_indices<Indices...> type;
+ };
+
+ template <std::size_t Ep, std::size_t Sp = 0>
+ struct make_tuple_indices
+ {
+ BOOST_STATIC_ASSERT_MSG(Sp <= Ep, "make_tuple_indices input error");
+ typedef typename make_indices_imp<Sp, tuple_indices<>, Ep>::type type;
+ };
+#else
+
+ // - tuple forward declaration -----------------------------------------------
+ template <
+ std::size_t T0 = 0, std::size_t T1 = 0, std::size_t T2 = 0,
+ std::size_t T3 = 0, std::size_t T4 = 0, std::size_t T5 = 0,
+ std::size_t T6 = 0, std::size_t T7 = 0, std::size_t T8 = 0,
+ std::size_t T9 = 0>
+ class tuple_indices {};
+
+ template <std::size_t Sp, class IntTuple, std::size_t Ep>
+ struct make_indices_imp;
+
+ template <std::size_t Sp, std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0, I1>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0, I1 , I2>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, I2, Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0, I1 , I2, I3>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, I2, I3, Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0, I1 , I2, I3, I4>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, I2, I3, I4, Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5, std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0, I1 , I2, I3, I4, I5>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, I2, I3, I4, I5, Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5
+ , std::size_t I6
+ , std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0, I1 , I2, I3, I4, I5, I6>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, I2, I3, I4, I5, I6, Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5
+ , std::size_t I6
+ , std::size_t I7
+ , std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0, I1 , I2, I3, I4, I5, I6, I7>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7, Sp>, Ep>::type type;
+ };
+ template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5
+ , std::size_t I6
+ , std::size_t I7
+ , std::size_t I8
+ , std::size_t Ep>
+ struct make_indices_imp<Sp, tuple_indices<I0, I1 , I2, I3, I4, I5, I6, I7, I8>, Ep>
+ {
+ typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7, I8, Sp>, Ep>::type type;
+ };
+// template <std::size_t Sp, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5
+// , std::size_t I6
+// , std::size_t I7
+// , std::size_t I8
+// , std::size_t I9
+// , std::size_t Ep>
+// struct make_indices_imp<Sp, tuple_indices<I0, I1 , I2, I3, I4, I5, I6, I7, I8, I9>, Ep>
+// {
+// typedef typename make_indices_imp<Sp+1, tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7, I8, I9, Sp>, Ep>::type type;
+// };
+
+ template <std::size_t Ep>
+ struct make_indices_imp<Ep, tuple_indices<>, Ep>
+ {
+ typedef tuple_indices<> type;
+ };
+ template <std::size_t Ep, std::size_t I0>
+ struct make_indices_imp<Ep, tuple_indices<I0>, Ep>
+ {
+ typedef tuple_indices<I0> type;
+ };
+ template <std::size_t Ep, std::size_t I0, std::size_t I1>
+ struct make_indices_imp<Ep, tuple_indices<I0, I1>, Ep>
+ {
+ typedef tuple_indices<I0, I1> type;
+ };
+ template <std::size_t Ep, std::size_t I0, std::size_t I1, std::size_t I2>
+ struct make_indices_imp<Ep, tuple_indices<I0, I1, I2>, Ep>
+ {
+ typedef tuple_indices<I0, I1, I2> type;
+ };
+ template <std::size_t Ep, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3>
+ struct make_indices_imp<Ep, tuple_indices<I0, I1, I2, I3>, Ep>
+ {
+ typedef tuple_indices<I0, I1, I2, I3> type;
+ };
+ template <std::size_t Ep, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4>
+ struct make_indices_imp<Ep, tuple_indices<I0, I1, I2, I3, I4>, Ep>
+ {
+ typedef tuple_indices<I0, I1, I2, I3, I4> type;
+ };
+ template <std::size_t Ep, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5>
+ struct make_indices_imp<Ep, tuple_indices<I0, I1, I2, I3, I4, I5>, Ep>
+ {
+ typedef tuple_indices<I0, I1, I2, I3, I4, I5> type;
+ };
+ template <std::size_t Ep, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5
+ , std::size_t I6
+ >
+ struct make_indices_imp<Ep, tuple_indices<I0, I1, I2, I3, I4, I5, I6>, Ep>
+ {
+ typedef tuple_indices<I0, I1, I2, I3, I4, I5, I6> type;
+ };
+ template <std::size_t Ep, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5
+ , std::size_t I6
+ , std::size_t I7
+ >
+ struct make_indices_imp<Ep, tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7>, Ep>
+ {
+ typedef tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7> type;
+ };
+ template <std::size_t Ep, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5
+ , std::size_t I6
+ , std::size_t I7
+ , std::size_t I8
+ >
+ struct make_indices_imp<Ep, tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7, I8>, Ep>
+ {
+ typedef tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7, I8> type;
+ };
+
+ template <std::size_t Ep, std::size_t I0, std::size_t I1, std::size_t I2, std::size_t I3, std::size_t I4, std::size_t I5
+ , std::size_t I6
+ , std::size_t I7
+ , std::size_t I8
+ , std::size_t I9
+ >
+ struct make_indices_imp<Ep, tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7, I8, I9>, Ep>
+ {
+ typedef tuple_indices<I0, I1, I2, I3, I4, I5, I6, I7, I8, I9> type;
+ };
+
+ template <std::size_t Ep, std::size_t Sp = 0>
+ struct make_tuple_indices
+ {
+ BOOST_STATIC_ASSERT_MSG(Sp <= Ep, "make_tuple_indices input error");
+ typedef typename make_indices_imp<Sp, tuple_indices<>, Ep>::type type;
+ };
+
+#endif
+ }
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/memory.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/memory.hpp
new file mode 100644
index 00000000000..51ce84f40bc
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/memory.hpp
@@ -0,0 +1,48 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// Copyright (C) 2011-2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/thread for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#ifndef BOOST_THREAD_DETAIL_MEMORY_HPP
+#define BOOST_THREAD_DETAIL_MEMORY_HPP
+
+#include <boost/config.hpp>
+
+#include <boost/thread/csbl/memory/pointer_traits.hpp>
+#include <boost/thread/csbl/memory/allocator_arg.hpp>
+#include <boost/thread/csbl/memory/allocator_traits.hpp>
+#include <boost/thread/csbl/memory/scoped_allocator.hpp>
+
+namespace boost
+{
+ namespace thread_detail
+ {
+ template <class _Alloc>
+ class allocator_destructor
+ {
+ typedef csbl::allocator_traits<_Alloc> alloc_traits;
+ public:
+ typedef typename alloc_traits::pointer pointer;
+ typedef typename alloc_traits::size_type size_type;
+ private:
+ _Alloc alloc_;
+ size_type s_;
+ public:
+ allocator_destructor(_Alloc& a, size_type s)BOOST_NOEXCEPT
+ : alloc_(a), s_(s)
+ {}
+ void operator()(pointer p)BOOST_NOEXCEPT
+ {
+ alloc_traits::destroy(alloc_, p);
+ alloc_traits::deallocate(alloc_, p, s_);
+ }
+ };
+ } //namespace thread_detail
+}
+#endif // BOOST_THREAD_DETAIL_MEMORY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/move.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/move.hpp
new file mode 100644
index 00000000000..447247d590a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/move.hpp
@@ -0,0 +1,379 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_MOVE_HPP
+#define BOOST_THREAD_MOVE_HPP
+
+#include <boost/thread/detail/config.hpp>
+#ifndef BOOST_NO_SFINAE
+#include <boost/core/enable_if.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/remove_extent.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/add_pointer.hpp>
+#endif
+
+#include <boost/thread/detail/delete.hpp>
+#include <boost/move/utility.hpp>
+#include <boost/move/traits.hpp>
+#include <boost/config/abi_prefix.hpp>
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+#include <type_traits>
+#endif
+namespace boost
+{
+
+ namespace detail
+ {
+ template <typename T>
+ struct enable_move_utility_emulation_dummy_specialization;
+ template<typename T>
+ struct thread_move_t
+ {
+ T& t;
+ explicit thread_move_t(T& t_):
+ t(t_)
+ {}
+
+ T& operator*() const
+ {
+ return t;
+ }
+
+ T* operator->() const
+ {
+ return &t;
+ }
+ private:
+ void operator=(thread_move_t&);
+ };
+ }
+
+#if !defined BOOST_THREAD_USES_MOVE
+
+#ifndef BOOST_NO_SFINAE
+ template<typename T>
+ typename enable_if<boost::is_convertible<T&,boost::detail::thread_move_t<T> >, boost::detail::thread_move_t<T> >::type move(T& t)
+ {
+ return boost::detail::thread_move_t<T>(t);
+ }
+#endif
+
+ template<typename T>
+ boost::detail::thread_move_t<T> move(boost::detail::thread_move_t<T> t)
+ {
+ return t;
+ }
+
+#endif //#if !defined BOOST_THREAD_USES_MOVE
+}
+
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+
+#define BOOST_THREAD_COPY_ASSIGN_REF(TYPE) BOOST_COPY_ASSIGN_REF(TYPE)
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
+#define BOOST_THREAD_RV_REF_2_TEMPL_ARGS(TYPE) BOOST_RV_REF_2_TEMPL_ARGS(TYPE)
+#define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG
+#define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END
+#define BOOST_THREAD_RV(V) V
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE
+#define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE_BEG(T) \
+ namespace detail { \
+ template <typename T> \
+ struct enable_move_utility_emulation_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_BEG2(T1, T2) \
+ namespace detail { \
+ template <typename T1, typename T2> \
+ struct enable_move_utility_emulation_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_END > \
+ : integral_constant<bool, false> \
+ {}; \
+ }
+
+#elif ! defined BOOST_NO_CXX11_RVALUE_REFERENCES && defined BOOST_MSVC
+
+#define BOOST_THREAD_COPY_ASSIGN_REF(TYPE) BOOST_COPY_ASSIGN_REF(TYPE)
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
+#define BOOST_THREAD_RV_REF_2_TEMPL_ARGS(TYPE) BOOST_RV_REF_2_TEMPL_ARGS(TYPE)
+#define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG
+#define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END
+#define BOOST_THREAD_RV(V) V
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE
+#define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE_BEG(T) \
+ namespace detail { \
+ template <typename T> \
+ struct enable_move_utility_emulation_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_BEG2(T1, T2) \
+ namespace detail { \
+ template <typename T1, typename T2> \
+ struct enable_move_utility_emulation_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_END > \
+ : integral_constant<bool, false> \
+ {}; \
+ }
+
+#else
+
+#if defined BOOST_THREAD_USES_MOVE
+#define BOOST_THREAD_COPY_ASSIGN_REF(TYPE) BOOST_COPY_ASSIGN_REF(TYPE)
+#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
+#define BOOST_THREAD_RV_REF_2_TEMPL_ARGS(TYPE) BOOST_RV_REF_2_TEMPL_ARGS(TYPE)
+#define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG
+#define BOOST_THREAD_RV_REF_END BOOST_RV_REF_END
+#define BOOST_THREAD_RV(V) V
+#define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE(TYPE)
+#define BOOST_THREAD_DCL_MOVABLE_BEG(T) \
+ namespace detail { \
+ template <typename T> \
+ struct enable_move_utility_emulation_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_BEG2(T1, T2) \
+ namespace detail { \
+ template <typename T1, typename T2> \
+ struct enable_move_utility_emulation_dummy_specialization<
+
+#define BOOST_THREAD_DCL_MOVABLE_END > \
+ : integral_constant<bool, false> \
+ {}; \
+ }
+
+#else
+
+#define BOOST_THREAD_COPY_ASSIGN_REF(TYPE) const TYPE&
+#define BOOST_THREAD_RV_REF(TYPE) boost::detail::thread_move_t< TYPE >
+#define BOOST_THREAD_RV_REF_BEG boost::detail::thread_move_t<
+#define BOOST_THREAD_RV_REF_END >
+#define BOOST_THREAD_RV(V) (*V)
+#define BOOST_THREAD_FWD_REF(TYPE) BOOST_FWD_REF(TYPE)
+
+#define BOOST_THREAD_DCL_MOVABLE(TYPE) \
+template <> \
+struct enable_move_utility_emulation< TYPE > \
+{ \
+ static const bool value = false; \
+};
+
+#define BOOST_THREAD_DCL_MOVABLE_BEG(T) \
+template <typename T> \
+struct enable_move_utility_emulation<
+
+#define BOOST_THREAD_DCL_MOVABLE_BEG2(T1, T2) \
+template <typename T1, typename T2> \
+struct enable_move_utility_emulation<
+
+#define BOOST_THREAD_DCL_MOVABLE_END > \
+{ \
+ static const bool value = false; \
+};
+
+#endif
+
+namespace boost
+{
+namespace detail
+{
+ template <typename T>
+ BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+ make_rv_ref(T v) BOOST_NOEXCEPT
+ {
+ return (BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+ }
+// template <typename T>
+// BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+// make_rv_ref(T &v) BOOST_NOEXCEPT
+// {
+// return (BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+// }
+// template <typename T>
+// const BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type)
+// make_rv_ref(T const&v) BOOST_NOEXCEPT
+// {
+// return (const BOOST_THREAD_RV_REF(typename ::boost::remove_cv<typename ::boost::remove_reference<T>::type>::type))(v);
+// }
+}
+}
+
+#define BOOST_THREAD_MAKE_RV_REF(RVALUE) RVALUE.move()
+//#define BOOST_THREAD_MAKE_RV_REF(RVALUE) boost::detail::make_rv_ref(RVALUE)
+#endif
+
+
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+
+#define BOOST_THREAD_MOVABLE(TYPE)
+
+#define BOOST_THREAD_COPYABLE(TYPE)
+
+#else
+
+#if defined BOOST_THREAD_USES_MOVE
+
+#define BOOST_THREAD_MOVABLE(TYPE) \
+ ::boost::rv<TYPE>& move() BOOST_NOEXCEPT \
+ { \
+ return *static_cast< ::boost::rv<TYPE>* >(this); \
+ } \
+ const ::boost::rv<TYPE>& move() const BOOST_NOEXCEPT \
+ { \
+ return *static_cast<const ::boost::rv<TYPE>* >(this); \
+ } \
+ operator ::boost::rv<TYPE>&() \
+ { \
+ return *static_cast< ::boost::rv<TYPE>* >(this); \
+ } \
+ operator const ::boost::rv<TYPE>&() const \
+ { \
+ return *static_cast<const ::boost::rv<TYPE>* >(this); \
+ }\
+
+#define BOOST_THREAD_COPYABLE(TYPE) \
+ TYPE& operator=(TYPE &t)\
+ { this->operator=(static_cast<const ::boost::rv<TYPE> &>(const_cast<const TYPE &>(t))); return *this;}
+
+
+#else
+
+#define BOOST_THREAD_MOVABLE(TYPE) \
+ operator ::boost::detail::thread_move_t<TYPE>() BOOST_NOEXCEPT \
+ { \
+ return move(); \
+ } \
+ ::boost::detail::thread_move_t<TYPE> move() BOOST_NOEXCEPT \
+ { \
+ ::boost::detail::thread_move_t<TYPE> x(*this); \
+ return x; \
+ } \
+
+#define BOOST_THREAD_COPYABLE(TYPE)
+
+#endif
+#endif
+
+#define BOOST_THREAD_MOVABLE_ONLY(TYPE) \
+ BOOST_THREAD_NO_COPYABLE(TYPE) \
+ BOOST_THREAD_MOVABLE(TYPE) \
+ typedef int boost_move_no_copy_constructor_or_assign; \
+
+
+#define BOOST_THREAD_COPYABLE_AND_MOVABLE(TYPE) \
+ BOOST_THREAD_COPYABLE(TYPE) \
+ BOOST_THREAD_MOVABLE(TYPE) \
+
+
+
+namespace boost
+{
+ namespace thread_detail
+ {
+
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+#elif defined BOOST_THREAD_USES_MOVE
+ template <class T>
+ struct is_rv
+ : ::boost::move_detail::is_rv<T>
+ {};
+
+#else
+ template <class T>
+ struct is_rv
+ : ::boost::integral_constant<bool, false>
+ {};
+
+ template <class T>
+ struct is_rv< ::boost::detail::thread_move_t<T> >
+ : ::boost::integral_constant<bool, true>
+ {};
+
+ template <class T>
+ struct is_rv< const ::boost::detail::thread_move_t<T> >
+ : ::boost::integral_constant<bool, true>
+ {};
+#endif
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class Tp>
+ struct remove_reference : boost::remove_reference<Tp> {};
+ template <class Tp>
+ struct decay : boost::decay<Tp> {};
+#else
+ template <class Tp>
+ struct remove_reference
+ {
+ typedef Tp type;
+ };
+ template <class Tp>
+ struct remove_reference<Tp&>
+ {
+ typedef Tp type;
+ };
+ template <class Tp>
+ struct remove_reference< rv<Tp> > {
+ typedef Tp type;
+ };
+
+ template <class Tp>
+ struct decay
+ {
+ private:
+ typedef typename boost::move_detail::remove_rvalue_reference<Tp>::type Up0;
+ typedef typename boost::remove_reference<Up0>::type Up;
+ public:
+ typedef typename conditional
+ <
+ is_array<Up>::value,
+ typename remove_extent<Up>::type*,
+ typename conditional
+ <
+ is_function<Up>::value,
+ typename add_pointer<Up>::type,
+ typename remove_cv<Up>::type
+ >::type
+ >::type type;
+ };
+#endif
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class T>
+ typename decay<T>::type
+ decay_copy(T&& t)
+ {
+ return boost::forward<T>(t);
+ }
+ typedef void (*void_fct_ptr)();
+
+// inline void_fct_ptr
+// decay_copy(void (&t)())
+// {
+// return &t;
+// }
+#else
+ template <class T>
+ typename decay<T>::type
+ decay_copy(BOOST_THREAD_FWD_REF(T) t)
+ {
+ return boost::forward<T>(t);
+ }
+#endif
+ }
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/nullary_function.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/nullary_function.hpp
new file mode 100644
index 00000000000..2950942f11c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/nullary_function.hpp
@@ -0,0 +1,239 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013,2018 Vicente J. Botet Escriba
+// Adapt to boost from CCIA C++11 implementation
+// Make use of Boost.Move
+
+#ifndef BOOST_THREAD_DETAIL_NULLARY_FUNCTION_HPP
+#define BOOST_THREAD_DETAIL_NULLARY_FUNCTION_HPP
+
+#include <boost/config.hpp>
+#include <boost/thread/detail/memory.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/csbl/memory/shared_ptr.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/is_same.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+
+ template <typename F>
+ class nullary_function;
+ template <>
+ class nullary_function<void()>
+ {
+ struct impl_base
+ {
+ virtual void call()=0;
+ virtual ~impl_base()
+ {
+ }
+ };
+ csbl::shared_ptr<impl_base> impl;
+ template <typename F>
+ struct impl_type: impl_base
+ {
+ F f;
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ impl_type(F &f_)
+ : f(f_)
+ {}
+#endif
+ impl_type(BOOST_THREAD_RV_REF(F) f_)
+ : f(boost::move(f_))
+ {}
+
+ void call()
+ {
+ f();
+ }
+ };
+ struct impl_type_ptr: impl_base
+ {
+ void (*f)();
+ impl_type_ptr(void (*f_)())
+ : f(f_)
+ {}
+ void call()
+ {
+ f();
+ }
+ };
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(nullary_function)
+
+ explicit nullary_function(void (*f)()):
+ impl(new impl_type_ptr(f))
+ {}
+
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template<typename F>
+ explicit nullary_function(F& f
+ , typename disable_if<is_same<typename decay<F>::type, nullary_function>, int* >::type=0
+ ):
+ impl(new impl_type<F>(f))
+ {}
+#endif
+ template<typename F>
+ nullary_function(BOOST_THREAD_RV_REF(F) f
+ , typename disable_if<is_same<typename decay<F>::type, nullary_function>, int* >::type=0
+ ):
+ impl(new impl_type<typename decay<F>::type>(thread_detail::decay_copy(boost::forward<F>(f))))
+ {}
+
+ nullary_function()
+ : impl()
+ {
+ }
+ nullary_function(nullary_function const& other) BOOST_NOEXCEPT :
+ impl(other.impl)
+ {
+ }
+ nullary_function(BOOST_THREAD_RV_REF(nullary_function) other) BOOST_NOEXCEPT :
+#if defined BOOST_NO_CXX11_SMART_PTR
+ impl(BOOST_THREAD_RV(other).impl)
+ {
+ BOOST_THREAD_RV(other).impl.reset();
+ }
+#else
+ impl(boost::move(other.impl))
+ {
+ }
+#endif
+ ~nullary_function()
+ {
+ }
+
+ nullary_function& operator=(BOOST_THREAD_COPY_ASSIGN_REF(nullary_function) other) BOOST_NOEXCEPT
+ {
+ impl=other.impl;
+ return *this;
+ }
+ nullary_function& operator=(BOOST_THREAD_RV_REF(nullary_function) other) BOOST_NOEXCEPT
+ {
+#if defined BOOST_NO_CXX11_SMART_PTR
+ impl=BOOST_THREAD_RV(other).impl;
+ BOOST_THREAD_RV(other).impl.reset();
+#else
+ impl = boost::move(other.impl);
+#endif
+ return *this;
+ }
+
+
+ void operator()()
+ { if (impl) impl->call();}
+
+ };
+
+ template <typename R>
+ class nullary_function<R()>
+ {
+ struct impl_base
+ {
+ virtual R call()=0;
+ virtual ~impl_base()
+ {
+ }
+ };
+ csbl::shared_ptr<impl_base> impl;
+ template <typename F>
+ struct impl_type: impl_base
+ {
+ F f;
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ impl_type(F &f_)
+ : f(f_)
+ {}
+#endif
+ impl_type(BOOST_THREAD_RV_REF(F) f_)
+ : f(boost::move(f_))
+ {}
+
+ R call()
+ {
+ return f();
+ }
+ };
+ struct impl_type_ptr: impl_base
+ {
+ R (*f)();
+ impl_type_ptr(R (*f_)())
+ : f(f_)
+ {}
+
+ R call()
+ {
+ return f();
+ }
+ };
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(nullary_function)
+
+ nullary_function(R (*f)()):
+ impl(new impl_type_ptr(f))
+ {}
+#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template<typename F>
+ nullary_function(F& f):
+ impl(new impl_type<F>(f))
+ {}
+#endif
+ template<typename F>
+ nullary_function(BOOST_THREAD_RV_REF(F) f):
+ impl(new impl_type<typename decay<F>::type>(thread_detail::decay_copy(boost::forward<F>(f))))
+ {}
+
+ nullary_function(nullary_function const& other) BOOST_NOEXCEPT :
+ impl(other.impl)
+ {
+ }
+ nullary_function(BOOST_THREAD_RV_REF(nullary_function) other) BOOST_NOEXCEPT :
+#if defined BOOST_NO_CXX11_SMART_PTR
+ impl(BOOST_THREAD_RV(other).impl)
+ {
+ BOOST_THREAD_RV(other).impl.reset();
+ }
+#else
+ impl(boost::move(other.impl))
+ {
+ }
+#endif
+ nullary_function()
+ : impl()
+ {
+ }
+ ~nullary_function()
+ {
+ }
+
+ nullary_function& operator=(BOOST_THREAD_COPY_ASSIGN_REF(nullary_function) other) BOOST_NOEXCEPT
+ {
+ impl=other.impl;
+ return *this;
+ }
+ nullary_function& operator=(BOOST_THREAD_RV_REF(nullary_function) other) BOOST_NOEXCEPT
+ {
+#if defined BOOST_NO_CXX11_SMART_PTR
+ impl=BOOST_THREAD_RV(other).impl;
+ BOOST_THREAD_RV(other).impl.reset();
+#else
+ impl = boost::move(other.impl);
+#endif
+ return *this;
+ }
+
+ R operator()()
+ { if (impl) return impl->call(); else return R();}
+
+ };
+ }
+ BOOST_THREAD_DCL_MOVABLE_BEG(F) detail::nullary_function<F> BOOST_THREAD_DCL_MOVABLE_END
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/platform.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/platform.hpp
new file mode 100644
index 00000000000..172a601a022
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/platform.hpp
@@ -0,0 +1,75 @@
+// Copyright 2006 Roland Schwarz.
+// (C) Copyright 2007 Anthony Williams
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// This work is a reimplementation along the design and ideas
+// of William E. Kempf.
+
+#ifndef BOOST_THREAD_RS06040501_HPP
+#define BOOST_THREAD_RS06040501_HPP
+
+// fetch compiler and platform configuration
+#include <boost/config.hpp>
+
+// insist on threading support being available:
+#include <boost/config/requires_threads.hpp>
+
+// choose platform
+#if defined(linux) || defined(__linux) || defined(__linux__)
+# define BOOST_THREAD_LINUX
+//# define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(100000)
+#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+# define BOOST_THREAD_BSD
+#elif defined(sun) || defined(__sun)
+# define BOOST_THREAD_SOLARIS
+#elif defined(__sgi)
+# define BOOST_THREAD_IRIX
+#elif defined(__hpux)
+# define BOOST_THREAD_HPUX
+#elif defined(__CYGWIN__)
+# define BOOST_THREAD_CYGWIN
+#elif (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(BOOST_DISABLE_WIN32)
+#if ! defined BOOST_THREAD_WIN32
+# define BOOST_THREAD_WIN32
+#endif
+#elif defined(__BEOS__)
+# define BOOST_THREAD_BEOS
+#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
+# define BOOST_THREAD_MACOS
+//# define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(1000)
+#elif defined(__IBMCPP__) || defined(_AIX)
+# define BOOST_THREAD_AIX
+#elif defined(__amigaos__)
+# define BOOST_THREAD_AMIGAOS
+#elif defined(__QNXNTO__)
+# define BOOST_THREAD_QNXNTO
+#elif defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE)
+# if defined(BOOST_HAS_PTHREADS) && !defined(BOOST_THREAD_POSIX)
+# define BOOST_THREAD_POSIX
+# endif
+#endif
+
+// For every supported platform add a new entry into the dispatch table below.
+// BOOST_THREAD_POSIX is tested first, so on platforms where posix and native
+// threading is available, the user may choose, by defining BOOST_THREAD_POSIX
+// in her source. If a platform is known to support pthreads and no native
+// port of boost_thread is available just specify "pthread" in the
+// dispatcher table. If there is no entry for a platform but pthreads is
+// available on the platform, pthread is choosen as default. If nothing is
+// available the preprocessor will fail with a diagnostic message.
+
+#if defined(BOOST_THREAD_POSIX)
+# define BOOST_THREAD_PLATFORM_PTHREAD
+#else
+# if defined(BOOST_THREAD_WIN32)
+# define BOOST_THREAD_PLATFORM_WIN32
+# elif defined(BOOST_HAS_PTHREADS)
+# define BOOST_THREAD_PLATFORM_PTHREAD
+# else
+# error "Sorry, no boost threads are available for this platform."
+# endif
+#endif
+
+#endif // BOOST_THREAD_RS06040501_HPP
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/platform_time.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/platform_time.hpp
new file mode 100644
index 00000000000..2180f13c056
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/platform_time.hpp
@@ -0,0 +1,478 @@
+#ifndef BOOST_THREAD_DETAIL_PLATFORM_TIME_HPP
+#define BOOST_THREAD_DETAIL_PLATFORM_TIME_HPP
+// (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/thread_time.hpp>
+#if defined BOOST_THREAD_USES_DATETIME
+#include <boost/date_time/posix_time/conversion.hpp>
+#endif
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/duration.hpp>
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+
+#if defined(BOOST_THREAD_CHRONO_WINDOWS_API)
+#include <boost/detail/winapi/time.hpp>
+#include <boost/detail/winapi/timers.hpp>
+#include <boost/thread/win32/thread_primitives.hpp>
+#elif defined(BOOST_THREAD_CHRONO_MAC_API)
+#include <sys/time.h> //for gettimeofday and timeval
+#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
+
+#else
+#include <time.h> // for clock_gettime
+#endif
+
+#include <limits>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+//typedef boost::int_least64_t time_max_t;
+typedef boost::intmax_t time_max_t;
+
+#if defined BOOST_THREAD_CHRONO_MAC_API
+namespace threads
+{
+
+namespace chrono_details
+{
+
+// steady_clock
+
+// Note, in this implementation steady_clock and high_resolution_clock
+// are the same clock. They are both based on mach_absolute_time().
+// mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of
+// nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom
+// are run time constants supplied by the OS. This clock has no relationship
+// to the Gregorian calendar. It's main use is as a high resolution timer.
+
+// MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize
+// for that case as an optimization.
+
+inline time_max_t
+steady_simplified()
+{
+ return mach_absolute_time();
+}
+
+inline double compute_steady_factor(kern_return_t& err)
+{
+ mach_timebase_info_data_t MachInfo;
+ err = mach_timebase_info(&MachInfo);
+ if ( err != 0 ) {
+ return 0;
+ }
+ return static_cast<double>(MachInfo.numer) / MachInfo.denom;
+}
+
+inline time_max_t steady_full()
+{
+ kern_return_t err;
+ const double factor = chrono_details::compute_steady_factor(err);
+ if (err != 0)
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ return static_cast<time_max_t>(mach_absolute_time() * factor);
+}
+
+
+typedef time_max_t (*FP)();
+
+inline FP init_steady_clock(kern_return_t & err)
+{
+ mach_timebase_info_data_t MachInfo;
+ err = mach_timebase_info(&MachInfo);
+ if ( err != 0 )
+ {
+ return 0;
+ }
+
+ if (MachInfo.numer == MachInfo.denom)
+ {
+ return &chrono_details::steady_simplified;
+ }
+ return &chrono_details::steady_full;
+}
+
+}
+}
+#endif
+
+ namespace detail
+ {
+#if defined BOOST_THREAD_CHRONO_POSIX_API || defined BOOST_THREAD_CHRONO_MAC_API
+ inline timespec ns_to_timespec(boost::time_max_t const& ns)
+ {
+ boost::time_max_t s = ns / 1000000000l;
+ timespec ts;
+ ts.tv_sec = static_cast<long> (s);
+ ts.tv_nsec = static_cast<long> (ns - s * 1000000000l);
+ return ts;
+ }
+ inline boost::time_max_t timespec_to_ns(timespec const& ts)
+ {
+ return static_cast<boost::time_max_t>(ts.tv_sec) * 1000000000l + ts.tv_nsec;
+ }
+#endif
+
+ struct platform_duration
+ {
+#if defined BOOST_THREAD_CHRONO_POSIX_API || defined BOOST_THREAD_CHRONO_MAC_API
+ explicit platform_duration(timespec const& v) : ts_val(v) {}
+ timespec const& getTs() const { return ts_val; }
+
+ explicit platform_duration(boost::time_max_t const& ns = 0) : ts_val(ns_to_timespec(ns)) {}
+ boost::time_max_t getNs() const { return timespec_to_ns(ts_val); }
+#else
+ explicit platform_duration(boost::time_max_t const& ns = 0) : ns_val(ns) {}
+ boost::time_max_t getNs() const { return ns_val; }
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ platform_duration(boost::posix_time::time_duration const& rel_time)
+ {
+#if defined BOOST_THREAD_CHRONO_POSIX_API || defined BOOST_THREAD_CHRONO_MAC_API
+ ts_val.tv_sec = rel_time.total_seconds();
+ ts_val.tv_nsec = static_cast<long>(rel_time.fractional_seconds() * (1000000000l / rel_time.ticks_per_second()));
+#else
+ ns_val = static_cast<boost::time_max_t>(rel_time.total_seconds()) * 1000000000l;
+ ns_val += rel_time.fractional_seconds() * (1000000000l / rel_time.ticks_per_second());
+#endif
+ }
+#endif
+
+#if defined BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ platform_duration(chrono::duration<Rep, Period> const& d)
+ {
+#if defined BOOST_THREAD_CHRONO_POSIX_API || defined BOOST_THREAD_CHRONO_MAC_API
+ ts_val = ns_to_timespec(chrono::ceil<chrono::nanoseconds>(d).count());
+#else
+ ns_val = chrono::ceil<chrono::nanoseconds>(d).count();
+#endif
+ }
+#endif
+
+ boost::time_max_t getMs() const
+ {
+ const boost::time_max_t ns = getNs();
+ // ceil/floor away from zero
+ if (ns >= 0)
+ {
+ // return ceiling of positive numbers
+ return (ns + 999999) / 1000000;
+ }
+ else
+ {
+ // return floor of negative numbers
+ return (ns - 999999) / 1000000;
+ }
+ }
+
+ static platform_duration zero()
+ {
+ return platform_duration(0);
+ }
+
+ private:
+#if defined BOOST_THREAD_CHRONO_POSIX_API || defined BOOST_THREAD_CHRONO_MAC_API
+ timespec ts_val;
+#else
+ boost::time_max_t ns_val;
+#endif
+ };
+
+ inline bool operator==(platform_duration const& lhs, platform_duration const& rhs)
+ {
+ return lhs.getNs() == rhs.getNs();
+ }
+ inline bool operator!=(platform_duration const& lhs, platform_duration const& rhs)
+ {
+ return lhs.getNs() != rhs.getNs();
+ }
+ inline bool operator<(platform_duration const& lhs, platform_duration const& rhs)
+ {
+ return lhs.getNs() < rhs.getNs();
+ }
+ inline bool operator<=(platform_duration const& lhs, platform_duration const& rhs)
+ {
+ return lhs.getNs() <= rhs.getNs();
+ }
+ inline bool operator>(platform_duration const& lhs, platform_duration const& rhs)
+ {
+ return lhs.getNs() > rhs.getNs();
+ }
+ inline bool operator>=(platform_duration const& lhs, platform_duration const& rhs)
+ {
+ return lhs.getNs() >= rhs.getNs();
+ }
+
+ static inline platform_duration platform_milliseconds(long const& ms)
+ {
+ return platform_duration(ms * 1000000l);
+ }
+
+ struct real_platform_timepoint
+ {
+#if defined BOOST_THREAD_CHRONO_POSIX_API || defined BOOST_THREAD_CHRONO_MAC_API
+ explicit real_platform_timepoint(timespec const& v) : dur(v) {}
+ timespec const& getTs() const { return dur.getTs(); }
+#endif
+
+ explicit real_platform_timepoint(boost::time_max_t const& ns) : dur(ns) {}
+ boost::time_max_t getNs() const { return dur.getNs(); }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ real_platform_timepoint(boost::system_time const& abs_time)
+ : dur(abs_time - boost::posix_time::from_time_t(0)) {}
+#endif
+
+#if defined BOOST_THREAD_USES_CHRONO
+ template <class Duration>
+ real_platform_timepoint(chrono::time_point<chrono::system_clock, Duration> const& abs_time)
+ : dur(abs_time.time_since_epoch()) {}
+#endif
+
+ private:
+ platform_duration dur;
+ };
+
+ inline bool operator==(real_platform_timepoint const& lhs, real_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() == rhs.getNs();
+ }
+ inline bool operator!=(real_platform_timepoint const& lhs, real_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() != rhs.getNs();
+ }
+ inline bool operator<(real_platform_timepoint const& lhs, real_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() < rhs.getNs();
+ }
+ inline bool operator<=(real_platform_timepoint const& lhs, real_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() <= rhs.getNs();
+ }
+ inline bool operator>(real_platform_timepoint const& lhs, real_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() > rhs.getNs();
+ }
+ inline bool operator>=(real_platform_timepoint const& lhs, real_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() >= rhs.getNs();
+ }
+
+ inline real_platform_timepoint operator+(real_platform_timepoint const& lhs, platform_duration const& rhs)
+ {
+ return real_platform_timepoint(lhs.getNs() + rhs.getNs());
+ }
+ inline real_platform_timepoint operator+(platform_duration const& lhs, real_platform_timepoint const& rhs)
+ {
+ return real_platform_timepoint(lhs.getNs() + rhs.getNs());
+ }
+ inline platform_duration operator-(real_platform_timepoint const& lhs, real_platform_timepoint const& rhs)
+ {
+ return platform_duration(lhs.getNs() - rhs.getNs());
+ }
+
+ struct real_platform_clock
+ {
+ static real_platform_timepoint now()
+ {
+#if defined(BOOST_THREAD_CHRONO_WINDOWS_API)
+ boost::detail::winapi::FILETIME_ ft;
+ boost::detail::winapi::GetSystemTimeAsFileTime(&ft); // never fails
+ boost::time_max_t ns = ((((static_cast<boost::time_max_t>(ft.dwHighDateTime) << 32) | ft.dwLowDateTime) - 116444736000000000LL) * 100LL);
+ return real_platform_timepoint(ns);
+#elif defined(BOOST_THREAD_CHRONO_MAC_API)
+ timeval tv;
+ ::gettimeofday(&tv, 0);
+ timespec ts;
+ ts.tv_sec = tv.tv_sec;
+ ts.tv_nsec = tv.tv_usec * 1000;
+ return real_platform_timepoint(ts);
+#else
+ timespec ts;
+ if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
+ {
+ BOOST_ASSERT(0 && "Boost::Thread - clock_gettime(CLOCK_REALTIME) Internal Error");
+ return real_platform_timepoint(0);
+ }
+ return real_platform_timepoint(ts);
+#endif
+ }
+ };
+
+#if defined(BOOST_THREAD_HAS_MONO_CLOCK)
+
+ struct mono_platform_timepoint
+ {
+#if defined BOOST_THREAD_CHRONO_POSIX_API || defined BOOST_THREAD_CHRONO_MAC_API
+
+ explicit mono_platform_timepoint(timespec const& v) : dur(v) {}
+ timespec const& getTs() const { return dur.getTs(); }
+#endif
+
+ explicit mono_platform_timepoint(boost::time_max_t const& ns) : dur(ns) {}
+ boost::time_max_t getNs() const { return dur.getNs(); }
+
+#if defined BOOST_THREAD_USES_CHRONO
+ // This conversion assumes that chrono::steady_clock::time_point and mono_platform_timepoint share the same epoch.
+ template <class Duration>
+ mono_platform_timepoint(chrono::time_point<chrono::steady_clock, Duration> const& abs_time)
+ : dur(abs_time.time_since_epoch()) {}
+#endif
+
+ // can't name this max() since that is a macro on some Windows systems
+ static mono_platform_timepoint getMax()
+ {
+#if defined BOOST_THREAD_CHRONO_POSIX_API || defined BOOST_THREAD_CHRONO_MAC_API
+ timespec ts;
+ ts.tv_sec = (std::numeric_limits<time_t>::max)();
+ ts.tv_nsec = 999999999;
+ return mono_platform_timepoint(ts);
+#else
+ boost::time_max_t ns = (std::numeric_limits<boost::time_max_t>::max)();
+ return mono_platform_timepoint(ns);
+#endif
+ }
+
+ private:
+ platform_duration dur;
+ };
+
+ inline bool operator==(mono_platform_timepoint const& lhs, mono_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() == rhs.getNs();
+ }
+ inline bool operator!=(mono_platform_timepoint const& lhs, mono_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() != rhs.getNs();
+ }
+ inline bool operator<(mono_platform_timepoint const& lhs, mono_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() < rhs.getNs();
+ }
+ inline bool operator<=(mono_platform_timepoint const& lhs, mono_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() <= rhs.getNs();
+ }
+ inline bool operator>(mono_platform_timepoint const& lhs, mono_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() > rhs.getNs();
+ }
+ inline bool operator>=(mono_platform_timepoint const& lhs, mono_platform_timepoint const& rhs)
+ {
+ return lhs.getNs() >= rhs.getNs();
+ }
+
+ inline mono_platform_timepoint operator+(mono_platform_timepoint const& lhs, platform_duration const& rhs)
+ {
+ return mono_platform_timepoint(lhs.getNs() + rhs.getNs());
+ }
+ inline mono_platform_timepoint operator+(platform_duration const& lhs, mono_platform_timepoint const& rhs)
+ {
+ return mono_platform_timepoint(lhs.getNs() + rhs.getNs());
+ }
+ inline platform_duration operator-(mono_platform_timepoint const& lhs, mono_platform_timepoint const& rhs)
+ {
+ return platform_duration(lhs.getNs() - rhs.getNs());
+ }
+
+ struct mono_platform_clock
+ {
+ static mono_platform_timepoint now()
+ {
+#if defined(BOOST_THREAD_CHRONO_WINDOWS_API)
+#if defined(BOOST_THREAD_USES_CHRONO)
+ // Use QueryPerformanceCounter() to match the implementation in Boost
+ // Chrono so that chrono::steady_clock::now() and this function share the
+ // same epoch and so can be converted between each other.
+ boost::detail::winapi::LARGE_INTEGER_ freq;
+ if ( !boost::detail::winapi::QueryPerformanceFrequency( &freq ) )
+ {
+ BOOST_ASSERT(0 && "Boost::Thread - QueryPerformanceFrequency Internal Error");
+ return mono_platform_timepoint(0);
+ }
+ if ( freq.QuadPart <= 0 )
+ {
+ BOOST_ASSERT(0 && "Boost::Thread - QueryPerformanceFrequency Internal Error");
+ return mono_platform_timepoint(0);
+ }
+
+ boost::detail::winapi::LARGE_INTEGER_ pcount;
+ unsigned times=0;
+ while ( ! boost::detail::winapi::QueryPerformanceCounter( &pcount ) )
+ {
+ if ( ++times > 3 )
+ {
+ BOOST_ASSERT(0 && "Boost::Thread - QueryPerformanceCounter Internal Error");
+ return mono_platform_timepoint(0);
+ }
+ }
+
+ long double ns = 1000000000.0L * pcount.QuadPart / freq.QuadPart;
+ return mono_platform_timepoint(static_cast<boost::time_max_t>(ns));
+#else
+ // Use GetTickCount64() because it's more reliable on older
+ // systems like Windows XP and Windows Server 2003.
+ win32::ticks_type msec = win32::gettickcount64();
+ return mono_platform_timepoint(msec * 1000000);
+#endif
+#elif defined(BOOST_THREAD_CHRONO_MAC_API)
+ kern_return_t err;
+ threads::chrono_details::FP fp = threads::chrono_details::init_steady_clock(err);
+ if ( err != 0 )
+ {
+ BOOST_ASSERT(0 && "Boost::Chrono - Internal Error");
+ }
+ return mono_platform_timepoint(fp());
+#else
+ timespec ts;
+ if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
+ {
+ BOOST_ASSERT(0 && "Boost::Thread - clock_gettime(CLOCK_MONOTONIC) Internal Error");
+ return mono_platform_timepoint(0);
+ }
+ return mono_platform_timepoint(ts);
+#endif
+ }
+ };
+
+#endif
+
+#if defined(BOOST_THREAD_INTERNAL_CLOCK_IS_MONO)
+ typedef mono_platform_clock internal_platform_clock;
+ typedef mono_platform_timepoint internal_platform_timepoint;
+#else
+ typedef real_platform_clock internal_platform_clock;
+ typedef real_platform_timepoint internal_platform_timepoint;
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+#ifdef BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ typedef chrono::steady_clock internal_chrono_clock;
+#else
+ typedef chrono::system_clock internal_chrono_clock;
+#endif
+#endif
+
+ }
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/thread.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/thread.hpp
new file mode 100644
index 00000000000..46294102caf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/thread.hpp
@@ -0,0 +1,848 @@
+#ifndef BOOST_THREAD_THREAD_COMMON_HPP
+#define BOOST_THREAD_THREAD_COMMON_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007-2010 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/predef/platform.h>
+
+#include <boost/thread/exceptions.hpp>
+#ifndef BOOST_NO_IOSTREAM
+#include <ostream>
+#endif
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/mutex.hpp>
+#if defined BOOST_THREAD_USES_DATETIME
+#include <boost/thread/xtime.hpp>
+#endif
+#include <boost/thread/detail/thread_heap_alloc.hpp>
+#include <boost/thread/detail/make_tuple_indices.hpp>
+#include <boost/thread/detail/invoke.hpp>
+#include <boost/thread/detail/is_convertible.hpp>
+#include <boost/assert.hpp>
+#include <list>
+#include <algorithm>
+#include <boost/core/ref.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/bind.hpp>
+#include <stdlib.h>
+#include <memory>
+#include <boost/core/enable_if.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/io/ios_state.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/functional/hash.hpp>
+#include <boost/thread/detail/platform_time.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+#include <tuple>
+#endif
+#include <boost/config/abi_prefix.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4251)
+#endif
+
+namespace boost
+{
+
+ namespace detail
+ {
+
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+
+ template<typename F, class ...ArgTypes>
+ class thread_data:
+ public detail::thread_data_base
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(thread_data)
+ thread_data(BOOST_THREAD_RV_REF(F) f_, BOOST_THREAD_RV_REF(ArgTypes)... args_):
+ fp(boost::forward<F>(f_), boost::forward<ArgTypes>(args_)...)
+ {}
+ template <std::size_t ...Indices>
+ void run2(tuple_indices<Indices...>)
+ {
+
+ detail::invoke(std::move(std::get<0>(fp)), std::move(std::get<Indices>(fp))...);
+ }
+ void run()
+ {
+ typedef typename make_tuple_indices<std::tuple_size<std::tuple<F, ArgTypes...> >::value, 1>::type index_type;
+
+ run2(index_type());
+ }
+
+ private:
+ std::tuple<typename decay<F>::type, typename decay<ArgTypes>::type...> fp;
+ };
+#else // defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+
+ template<typename F>
+ class thread_data:
+ public detail::thread_data_base
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(thread_data)
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ thread_data(BOOST_THREAD_RV_REF(F) f_):
+ f(boost::forward<F>(f_))
+ {}
+// This overloading must be removed if we want the packaged_task's tests to pass.
+// thread_data(F& f_):
+// f(f_)
+// {}
+#else
+
+ thread_data(BOOST_THREAD_RV_REF(F) f_):
+ f(f_)
+ {}
+ thread_data(F f_):
+ f(f_)
+ {}
+#endif
+ //thread_data() {}
+
+ void run()
+ {
+ f();
+ }
+
+ private:
+ F f;
+ };
+
+ template<typename F>
+ class thread_data<boost::reference_wrapper<F> >:
+ public detail::thread_data_base
+ {
+ private:
+ F& f;
+ public:
+ BOOST_THREAD_NO_COPYABLE(thread_data)
+ thread_data(boost::reference_wrapper<F> f_):
+ f(f_)
+ {}
+ void run()
+ {
+ f();
+ }
+ };
+
+ template<typename F>
+ class thread_data<const boost::reference_wrapper<F> >:
+ public detail::thread_data_base
+ {
+ private:
+ F& f;
+ public:
+ BOOST_THREAD_NO_COPYABLE(thread_data)
+ thread_data(const boost::reference_wrapper<F> f_):
+ f(f_)
+ {}
+ void run()
+ {
+ f();
+ }
+ };
+#endif
+ }
+
+ class BOOST_THREAD_DECL thread
+ {
+ public:
+ typedef thread_attributes attributes;
+
+ BOOST_THREAD_MOVABLE_ONLY(thread)
+ private:
+
+ struct dummy;
+
+ void release_handle();
+
+ detail::thread_data_ptr thread_info;
+
+ private:
+ bool start_thread_noexcept();
+ bool start_thread_noexcept(const attributes& attr);
+ void start_thread()
+ {
+ if (!start_thread_noexcept())
+ {
+ boost::throw_exception(thread_resource_error());
+ }
+ }
+ void start_thread(const attributes& attr)
+ {
+ if (!start_thread_noexcept(attr))
+ {
+ boost::throw_exception(thread_resource_error());
+ }
+ }
+
+ explicit thread(detail::thread_data_ptr data);
+
+ detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const;
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename F, class ...ArgTypes>
+ static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_RV_REF(ArgTypes)... args)
+ {
+ return detail::thread_data_ptr(detail::heap_new<
+ detail::thread_data<typename boost::remove_reference<F>::type, ArgTypes...>
+ >(
+ boost::forward<F>(f), boost::forward<ArgTypes>(args)...
+ )
+ );
+ }
+#else
+ template<typename F>
+ static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f)
+ {
+ return detail::thread_data_ptr(detail::heap_new<detail::thread_data<typename boost::remove_reference<F>::type> >(
+ boost::forward<F>(f)));
+ }
+#endif
+ static inline detail::thread_data_ptr make_thread_info(void (*f)())
+ {
+ return detail::thread_data_ptr(detail::heap_new<detail::thread_data<void(*)()> >(
+ boost::forward<void(*)()>(f)));
+ }
+#else
+ template<typename F>
+ static inline detail::thread_data_ptr make_thread_info(F f
+ , typename disable_if_c<
+ //boost::thread_detail::is_convertible<F&,BOOST_THREAD_RV_REF(F)>::value ||
+ is_same<typename decay<F>::type, thread>::value,
+ dummy* >::type=0
+ )
+ {
+ return detail::thread_data_ptr(detail::heap_new<detail::thread_data<F> >(f));
+ }
+ template<typename F>
+ static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f)
+ {
+ return detail::thread_data_ptr(detail::heap_new<detail::thread_data<F> >(f));
+ }
+
+#endif
+ public:
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
+ thread(const volatile thread&);
+#endif
+#endif
+ thread() BOOST_NOEXCEPT;
+ ~thread()
+ {
+
+ #if defined BOOST_THREAD_PROVIDES_THREAD_DESTRUCTOR_CALLS_TERMINATE_IF_JOINABLE
+ if (joinable()) {
+ std::terminate();
+ }
+ #else
+ detach();
+ #endif
+ }
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <
+ class F
+ >
+ explicit thread(BOOST_THREAD_RV_REF(F) f
+ //, typename disable_if<is_same<typename decay<F>::type, thread>, dummy* >::type=0
+ ):
+ thread_info(make_thread_info(thread_detail::decay_copy(boost::forward<F>(f))))
+ {
+ start_thread();
+ }
+ template <
+ class F
+ >
+ thread(attributes const& attrs, BOOST_THREAD_RV_REF(F) f):
+ thread_info(make_thread_info(thread_detail::decay_copy(boost::forward<F>(f))))
+ {
+ start_thread(attrs);
+ }
+
+#else
+#ifdef BOOST_NO_SFINAE
+ template <class F>
+ explicit thread(F f):
+ thread_info(make_thread_info(f))
+ {
+ start_thread();
+ }
+ template <class F>
+ thread(attributes const& attrs, F f):
+ thread_info(make_thread_info(f))
+ {
+ start_thread(attrs);
+ }
+#else
+ template <class F>
+ explicit thread(F f
+ , typename disable_if_c<
+ boost::thread_detail::is_rv<F>::value // todo as a thread_detail::is_rv
+ //boost::thread_detail::is_convertible<F&,BOOST_THREAD_RV_REF(F)>::value
+ //|| is_same<typename decay<F>::type, thread>::value
+ , dummy* >::type=0
+ ):
+ thread_info(make_thread_info(f))
+ {
+ start_thread();
+ }
+ template <class F>
+ thread(attributes const& attrs, F f
+ , typename disable_if<boost::thread_detail::is_rv<F>, dummy* >::type=0
+ //, typename disable_if<boost::thread_detail::is_convertible<F&,BOOST_THREAD_RV_REF(F) >, dummy* >::type=0
+ ):
+ thread_info(make_thread_info(f))
+ {
+ start_thread(attrs);
+ }
+#endif
+ template <class F>
+ explicit thread(BOOST_THREAD_RV_REF(F) f
+ , typename disable_if<is_same<typename decay<F>::type, thread>, dummy* >::type=0
+ ):
+#ifdef BOOST_THREAD_USES_MOVE
+ thread_info(make_thread_info(boost::move<F>(f))) // todo : Add forward
+#else
+ thread_info(make_thread_info(f)) // todo : Add forward
+#endif
+ {
+ start_thread();
+ }
+
+ template <class F>
+ thread(attributes const& attrs, BOOST_THREAD_RV_REF(F) f):
+#ifdef BOOST_THREAD_USES_MOVE
+ thread_info(make_thread_info(boost::move<F>(f))) // todo : Add forward
+#else
+ thread_info(make_thread_info(f)) // todo : Add forward
+#endif
+ {
+ start_thread(attrs);
+ }
+#endif
+ thread(BOOST_THREAD_RV_REF(thread) x) BOOST_NOEXCEPT
+ {
+ thread_info=BOOST_THREAD_RV(x).thread_info;
+ BOOST_THREAD_RV(x).thread_info.reset();
+ }
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
+ thread& operator=(thread x)
+ {
+ swap(x);
+ return *this;
+ }
+#endif
+#endif
+
+ thread& operator=(BOOST_THREAD_RV_REF(thread) other) BOOST_NOEXCEPT
+ {
+
+#if defined BOOST_THREAD_PROVIDES_THREAD_MOVE_ASSIGN_CALLS_TERMINATE_IF_JOINABLE
+ if (joinable()) std::terminate();
+#else
+ detach();
+#endif
+ thread_info=BOOST_THREAD_RV(other).thread_info;
+ BOOST_THREAD_RV(other).thread_info.reset();
+ return *this;
+ }
+
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template <class F, class Arg, class ...Args>
+ thread(F&& f, Arg&& arg, Args&&... args) :
+ thread_info(make_thread_info(
+ thread_detail::decay_copy(boost::forward<F>(f)),
+ thread_detail::decay_copy(boost::forward<Arg>(arg)),
+ thread_detail::decay_copy(boost::forward<Args>(args))...)
+ )
+
+ {
+ start_thread();
+ }
+ template <class F, class Arg, class ...Args>
+ thread(attributes const& attrs, F&& f, Arg&& arg, Args&&... args) :
+ thread_info(make_thread_info(
+ thread_detail::decay_copy(boost::forward<F>(f)),
+ thread_detail::decay_copy(boost::forward<Arg>(arg)),
+ thread_detail::decay_copy(boost::forward<Args>(args))...)
+ )
+
+ {
+ start_thread(attrs);
+ }
+#else
+ template <class F,class A1>
+ thread(F f,A1 a1,typename disable_if<boost::thread_detail::is_convertible<F&,thread_attributes >, dummy* >::type=0):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1)))
+ {
+ start_thread();
+ }
+ template <class F,class A1,class A2>
+ thread(F f,A1 a1,A2 a2):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2)))
+ {
+ start_thread();
+ }
+
+ template <class F,class A1,class A2,class A3>
+ thread(F f,A1 a1,A2 a2,A3 a3):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3)))
+ {
+ start_thread();
+ }
+
+ template <class F,class A1,class A2,class A3,class A4>
+ thread(F f,A1 a1,A2 a2,A3 a3,A4 a4):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4)))
+ {
+ start_thread();
+ }
+
+ template <class F,class A1,class A2,class A3,class A4,class A5>
+ thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5)))
+ {
+ start_thread();
+ }
+
+ template <class F,class A1,class A2,class A3,class A4,class A5,class A6>
+ thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6)))
+ {
+ start_thread();
+ }
+
+ template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7>
+ thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7)))
+ {
+ start_thread();
+ }
+
+ template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7,class A8>
+ thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7,a8)))
+ {
+ start_thread();
+ }
+
+ template <class F,class A1,class A2,class A3,class A4,class A5,class A6,class A7,class A8,class A9>
+ thread(F f,A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8,A9 a9):
+ thread_info(make_thread_info(boost::bind(boost::type<void>(),f,a1,a2,a3,a4,a5,a6,a7,a8,a9)))
+ {
+ start_thread();
+ }
+#endif
+ void swap(thread& x) BOOST_NOEXCEPT
+ {
+ thread_info.swap(x.thread_info);
+ }
+
+ class id;
+ id get_id() const BOOST_NOEXCEPT;
+
+ bool joinable() const BOOST_NOEXCEPT;
+ private:
+ bool join_noexcept();
+ bool do_try_join_until_noexcept(detail::internal_platform_timepoint const &timeout, bool& res);
+ bool do_try_join_until(detail::internal_platform_timepoint const &timeout);
+ public:
+ void join();
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Duration>
+ bool try_join_until(const chrono::time_point<detail::internal_chrono_clock, Duration>& t)
+ {
+ return do_try_join_until(boost::detail::internal_platform_timepoint(t));
+ }
+
+ template <class Clock, class Duration>
+ bool try_join_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ while ( ! try_join_until(detail::internal_chrono_clock::now() + d) )
+ {
+ d = t - Clock::now();
+ if ( d <= common_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ }
+ return true;
+ }
+
+ template <class Rep, class Period>
+ bool try_join_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_join_until(chrono::steady_clock::now() + rel_time);
+ }
+#endif
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_join(const system_time& abs_time)
+ {
+ const detail::real_platform_timepoint ts(abs_time);
+#if defined BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ while ( ! do_try_join_until(detail::internal_platform_clock::now() + d) )
+ {
+ d = ts - detail::real_platform_clock::now();
+ if ( d <= detail::platform_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+ return true;
+#else
+ return do_try_join_until(ts);
+#endif
+ }
+
+ template<typename TimeDuration>
+ bool timed_join(TimeDuration const& rel_time)
+ {
+ detail::platform_duration d(rel_time);
+#if defined(BOOST_THREAD_HAS_MONO_CLOCK) && !defined(BOOST_THREAD_INTERNAL_CLOCK_IS_MONO)
+ const detail::mono_platform_timepoint ts(detail::mono_platform_clock::now() + d);
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ while ( ! do_try_join_until(detail::internal_platform_clock::now() + d) )
+ {
+ d = ts - detail::mono_platform_clock::now();
+ if ( d <= detail::platform_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+ return true;
+#else
+ return do_try_join_until(detail::internal_platform_clock::now() + d);
+#endif
+ }
+#endif
+ void detach();
+
+ static unsigned hardware_concurrency() BOOST_NOEXCEPT;
+ static unsigned physical_concurrency() BOOST_NOEXCEPT;
+
+#define BOOST_THREAD_DEFINES_THREAD_NATIVE_HANDLE
+ typedef detail::thread_data_base::native_handle_type native_handle_type;
+ native_handle_type native_handle();
+
+#if defined BOOST_THREAD_PROVIDES_THREAD_EQ
+ // Use thread::id when comparisions are needed
+ // backwards compatibility
+ bool operator==(const thread& other) const;
+ bool operator!=(const thread& other) const;
+#endif
+#if defined BOOST_THREAD_USES_DATETIME
+ static inline void yield() BOOST_NOEXCEPT
+ {
+ this_thread::yield();
+ }
+
+ static inline void sleep(const system_time& xt)
+ {
+ this_thread::sleep(xt);
+ }
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ // extensions
+ void interrupt();
+ bool interruption_requested() const BOOST_NOEXCEPT;
+#endif
+ };
+
+ inline void swap(thread& lhs,thread& rhs) BOOST_NOEXCEPT
+ {
+ return lhs.swap(rhs);
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ inline thread&& move(thread& t) BOOST_NOEXCEPT
+ {
+ return static_cast<thread&&>(t);
+ }
+#endif
+
+ BOOST_THREAD_DCL_MOVABLE(thread)
+
+ namespace this_thread
+ {
+#ifdef BOOST_THREAD_PLATFORM_PTHREAD
+ thread::id get_id() BOOST_NOEXCEPT;
+#else
+ thread::id BOOST_THREAD_DECL get_id() BOOST_NOEXCEPT;
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ void BOOST_THREAD_DECL interruption_point();
+ bool BOOST_THREAD_DECL interruption_enabled() BOOST_NOEXCEPT;
+ bool BOOST_THREAD_DECL interruption_requested() BOOST_NOEXCEPT;
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ inline BOOST_SYMBOL_VISIBLE void sleep(::boost::xtime const& abs_time)
+ {
+ sleep(system_time(abs_time));
+ }
+#endif
+ }
+
+ class BOOST_SYMBOL_VISIBLE thread::id
+ {
+ private:
+ friend inline
+ std::size_t
+ hash_value(const thread::id &v)
+ {
+#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+ return hash_value(v.thread_data);
+#else
+ return hash_value(v.thread_data.get());
+#endif
+ }
+
+#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+ typedef unsigned int data;
+#else
+ typedef thread::native_handle_type data;
+#endif
+#else
+ typedef detail::thread_data_ptr data;
+#endif
+ data thread_data;
+
+ id(data thread_data_):
+ thread_data(thread_data_)
+ {}
+ friend class thread;
+ friend id BOOST_THREAD_DECL this_thread::get_id() BOOST_NOEXCEPT;
+ public:
+ id() BOOST_NOEXCEPT:
+#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+ thread_data(0)
+#else
+ thread_data()
+#endif
+ {}
+
+ id(const id& other) BOOST_NOEXCEPT :
+ thread_data(other.thread_data)
+ {}
+
+ bool operator==(const id& y) const BOOST_NOEXCEPT
+ {
+ return thread_data==y.thread_data;
+ }
+
+ bool operator!=(const id& y) const BOOST_NOEXCEPT
+ {
+ return thread_data!=y.thread_data;
+ }
+
+ bool operator<(const id& y) const BOOST_NOEXCEPT
+ {
+ return thread_data<y.thread_data;
+ }
+
+ bool operator>(const id& y) const BOOST_NOEXCEPT
+ {
+ return y.thread_data<thread_data;
+ }
+
+ bool operator<=(const id& y) const BOOST_NOEXCEPT
+ {
+ return !(y.thread_data<thread_data);
+ }
+
+ bool operator>=(const id& y) const BOOST_NOEXCEPT
+ {
+ return !(thread_data<y.thread_data);
+ }
+
+#ifndef BOOST_NO_IOSTREAM
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
+ template<class charT, class traits>
+ friend BOOST_SYMBOL_VISIBLE
+ std::basic_ostream<charT, traits>&
+ operator<<(std::basic_ostream<charT, traits>& os, const id& x)
+ {
+ if(x.thread_data)
+ {
+ io::ios_flags_saver ifs( os );
+ return os<< std::hex << x.thread_data;
+ }
+ else
+ {
+ return os<<"{Not-any-thread}";
+ }
+ }
+#else
+ template<class charT, class traits>
+ BOOST_SYMBOL_VISIBLE
+ std::basic_ostream<charT, traits>&
+ print(std::basic_ostream<charT, traits>& os) const
+ {
+ if(thread_data)
+ {
+ io::ios_flags_saver ifs( os );
+ return os<< std::hex << thread_data;
+ }
+ else
+ {
+ return os<<"{Not-any-thread}";
+ }
+ }
+
+#endif
+#endif
+ };
+
+#ifdef BOOST_THREAD_PLATFORM_PTHREAD
+ inline thread::id thread::get_id() const BOOST_NOEXCEPT
+ {
+ #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+ return const_cast<thread*>(this)->native_handle();
+ #else
+ detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+ return (local_thread_info? id(local_thread_info) : id());
+ #endif
+ }
+
+ namespace this_thread
+ {
+ inline thread::id get_id() BOOST_NOEXCEPT
+ {
+ #if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+ return pthread_self();
+ #else
+ boost::detail::thread_data_base* const thread_info=get_or_make_current_thread_data();
+ return (thread_info?thread::id(thread_info->shared_from_this()):thread::id());
+ #endif
+ }
+ }
+#endif
+ inline void thread::join() {
+ if (this_thread::get_id() == get_id())
+ boost::throw_exception(thread_resource_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost thread: trying joining itself"));
+
+ BOOST_THREAD_VERIFY_PRECONDITION( join_noexcept(),
+ thread_resource_error(static_cast<int>(system::errc::invalid_argument), "boost thread: thread not joinable")
+ );
+ }
+
+ inline bool thread::do_try_join_until(detail::internal_platform_timepoint const &timeout)
+ {
+ if (this_thread::get_id() == get_id())
+ boost::throw_exception(thread_resource_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost thread: trying joining itself"));
+ bool res;
+ if (do_try_join_until_noexcept(timeout, res))
+ {
+ return res;
+ }
+ else
+ {
+ BOOST_THREAD_THROW_ELSE_RETURN(
+ (thread_resource_error(static_cast<int>(system::errc::invalid_argument), "boost thread: thread not joinable")),
+ false
+ );
+ }
+ }
+
+#if !defined(BOOST_NO_IOSTREAM) && defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
+ template<class charT, class traits>
+ BOOST_SYMBOL_VISIBLE
+ std::basic_ostream<charT, traits>&
+ operator<<(std::basic_ostream<charT, traits>& os, const thread::id& x)
+ {
+ return x.print(os);
+ }
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_THREAD_EQ
+ inline bool thread::operator==(const thread& other) const
+ {
+ return get_id()==other.get_id();
+ }
+
+ inline bool thread::operator!=(const thread& other) const
+ {
+ return get_id()!=other.get_id();
+ }
+#endif
+
+ namespace detail
+ {
+ struct thread_exit_function_base
+ {
+ virtual ~thread_exit_function_base()
+ {}
+ virtual void operator()()=0;
+ };
+
+ template<typename F>
+ struct thread_exit_function:
+ thread_exit_function_base
+ {
+ F f;
+
+ thread_exit_function(F f_):
+ f(f_)
+ {}
+
+ void operator()()
+ {
+ f();
+ }
+ };
+
+ void BOOST_THREAD_DECL add_thread_exit_function(thread_exit_function_base*);
+//#ifndef BOOST_NO_EXCEPTIONS
+ struct shared_state_base;
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+ inline void make_ready_at_thread_exit(shared_ptr<shared_state_base> as)
+ {
+ detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
+ if(current_thread_data)
+ {
+ current_thread_data->make_ready_at_thread_exit(as);
+ }
+ }
+#else
+ void BOOST_THREAD_DECL make_ready_at_thread_exit(shared_ptr<shared_state_base> as);
+#endif
+//#endif
+ }
+
+ namespace this_thread
+ {
+ template<typename F>
+ void at_thread_exit(F f)
+ {
+ detail::thread_exit_function_base* const thread_exit_func=detail::heap_new<detail::thread_exit_function<F> >(f);
+ detail::add_thread_exit_function(thread_exit_func);
+ }
+ }
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/thread_group.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/thread_group.hpp
new file mode 100644
index 00000000000..4105c734688
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/thread_group.hpp
@@ -0,0 +1,155 @@
+#ifndef BOOST_THREAD_DETAIL_THREAD_GROUP_HPP
+#define BOOST_THREAD_DETAIL_THREAD_GROUP_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007-9 Anthony Williams
+
+#include <list>
+#include <boost/thread/csbl/memory/unique_ptr.hpp>
+#include <boost/thread/shared_mutex.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/lock_guard.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4251)
+#endif
+
+namespace boost
+{
+ class thread_group
+ {
+ private:
+ thread_group(thread_group const&);
+ thread_group& operator=(thread_group const&);
+ public:
+ thread_group() {}
+ ~thread_group()
+ {
+ for(std::list<thread*>::iterator it=threads.begin(),end=threads.end();
+ it!=end;
+ ++it)
+ {
+ delete *it;
+ }
+ }
+
+ bool is_this_thread_in()
+ {
+ thread::id id = this_thread::get_id();
+ boost::shared_lock<shared_mutex> guard(m);
+ for(std::list<thread*>::iterator it=threads.begin(),end=threads.end();
+ it!=end;
+ ++it)
+ {
+ if ((*it)->get_id() == id)
+ return true;
+ }
+ return false;
+ }
+
+ bool is_thread_in(thread* thrd)
+ {
+ if(thrd)
+ {
+ thread::id id = thrd->get_id();
+ boost::shared_lock<shared_mutex> guard(m);
+ for(std::list<thread*>::iterator it=threads.begin(),end=threads.end();
+ it!=end;
+ ++it)
+ {
+ if ((*it)->get_id() == id)
+ return true;
+ }
+ return false;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ template<typename F>
+ thread* create_thread(F threadfunc)
+ {
+ boost::lock_guard<shared_mutex> guard(m);
+ boost::csbl::unique_ptr<thread> new_thread(new thread(threadfunc));
+ threads.push_back(new_thread.get());
+ return new_thread.release();
+ }
+
+ void add_thread(thread* thrd)
+ {
+ if(thrd)
+ {
+ BOOST_THREAD_ASSERT_PRECONDITION( ! is_thread_in(thrd) ,
+ thread_resource_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost::thread_group: trying to add a duplicated thread")
+ );
+
+ boost::lock_guard<shared_mutex> guard(m);
+ threads.push_back(thrd);
+ }
+ }
+
+ void remove_thread(thread* thrd)
+ {
+ boost::lock_guard<shared_mutex> guard(m);
+ std::list<thread*>::iterator const it=std::find(threads.begin(),threads.end(),thrd);
+ if(it!=threads.end())
+ {
+ threads.erase(it);
+ }
+ }
+
+ void join_all()
+ {
+ BOOST_THREAD_ASSERT_PRECONDITION( ! is_this_thread_in() ,
+ thread_resource_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost::thread_group: trying joining itself")
+ );
+ boost::shared_lock<shared_mutex> guard(m);
+
+ for(std::list<thread*>::iterator it=threads.begin(),end=threads.end();
+ it!=end;
+ ++it)
+ {
+ if ((*it)->joinable())
+ (*it)->join();
+ }
+ }
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ void interrupt_all()
+ {
+ boost::shared_lock<shared_mutex> guard(m);
+
+ for(std::list<thread*>::iterator it=threads.begin(),end=threads.end();
+ it!=end;
+ ++it)
+ {
+ (*it)->interrupt();
+ }
+ }
+#endif
+
+ size_t size() const
+ {
+ boost::shared_lock<shared_mutex> guard(m);
+ return threads.size();
+ }
+
+ private:
+ std::list<thread*> threads;
+ mutable shared_mutex m;
+ };
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/thread_heap_alloc.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/thread_heap_alloc.hpp
new file mode 100644
index 00000000000..2f9bfd5c0b6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/thread_heap_alloc.hpp
@@ -0,0 +1,23 @@
+#ifndef BOOST_THREAD_THREAD_HEAP_ALLOC_HPP
+#define BOOST_THREAD_THREAD_HEAP_ALLOC_HPP
+
+// thread_heap_alloc.hpp
+//
+// (C) Copyright 2008 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/platform.hpp>
+
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#include <boost/thread/win32/thread_heap_alloc.hpp>
+#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
+#include <boost/thread/pthread/thread_heap_alloc.hpp>
+#else
+#error "Boost threads unavailable on this platform"
+#endif
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/thread_interruption.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/thread_interruption.hpp
new file mode 100644
index 00000000000..5d7d10fecdf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/thread_interruption.hpp
@@ -0,0 +1,39 @@
+#ifndef BOOST_THREAD_DETAIL_THREAD_INTERRUPTION_HPP
+#define BOOST_THREAD_DETAIL_THREAD_INTERRUPTION_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007-9 Anthony Williams
+// (C) Copyright 2012 Vicente J. Botet Escriba
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/detail/delete.hpp>
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+
+namespace boost
+{
+ namespace this_thread
+ {
+ class BOOST_THREAD_DECL disable_interruption
+ {
+ bool interruption_was_enabled;
+ friend class restore_interruption;
+ public:
+ BOOST_THREAD_NO_COPYABLE(disable_interruption)
+ disable_interruption() BOOST_NOEXCEPT;
+ ~disable_interruption() BOOST_NOEXCEPT;
+ };
+
+ class BOOST_THREAD_DECL restore_interruption
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(restore_interruption)
+ explicit restore_interruption(disable_interruption& d) BOOST_NOEXCEPT;
+ ~restore_interruption() BOOST_NOEXCEPT;
+ };
+ }
+}
+
+#endif // BOOST_THREAD_PROVIDES_INTERRUPTIONS
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/thread_safety.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/thread_safety.hpp
new file mode 100644
index 00000000000..4aa29a808be
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/thread_safety.hpp
@@ -0,0 +1,160 @@
+#ifndef BOOST_THREAD_DETAIL_THREAD_SAFETY_HPP
+#define BOOST_THREAD_DETAIL_THREAD_SAFETY_HPP
+
+#if defined(__GNUC__) && !defined(__GXX_EXPERIMENTAL_CXX0X__)
+//
+// This is horrible, but it seems to be the only we can shut up the
+// "anonymous variadic macros were introduced in C99 [-Wvariadic-macros]"
+// warning that get spewed out otherwise in non-C++11 mode.
+//
+#pragma GCC system_header
+#endif
+
+// See https://clang.llvm.org/docs/ThreadSafetyAnalysis.html
+
+// Un-comment to enable Thread Safety Analysis
+//#define BOOST_THREAD_ENABLE_THREAD_SAFETY_ANALYSIS
+
+// Enable thread safety attributes only with clang.
+// The attributes can be safely erased when compiling with other compilers.
+#if defined (BOOST_THREAD_ENABLE_THREAD_SAFETY_ANALYSIS) && defined(__clang__) && (!defined(SWIG))
+#define BOOST_THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
+#else
+#define BOOST_THREAD_ANNOTATION_ATTRIBUTE__(x) // no-op
+#endif
+
+#define BOOST_THREAD_CAPABILITY(x) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(capability(x))
+
+#define BOOST_THREAD_SCOPED_CAPABILITY \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable)
+
+#define BOOST_THREAD_GUARDED_BY(x) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(guarded_by(x))
+
+#define BOOST_THREAD_PT_GUARDED_BY(x) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_by(x))
+
+#define BOOST_THREAD_ACQUIRED_BEFORE(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(acquired_before(__VA_ARGS__))
+
+#define BOOST_THREAD_ACQUIRED_AFTER(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(acquired_after(__VA_ARGS__))
+
+#define BOOST_THREAD_REQUIRES(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(requires_capability(__VA_ARGS__))
+
+#define BOOST_THREAD_REQUIRES_SHARED(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(requires_shared_capability(__VA_ARGS__))
+
+#define BOOST_THREAD_ACQUIRE(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(acquire_capability(__VA_ARGS__))
+
+#define BOOST_THREAD_ACQUIRE_SHARED(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(acquire_shared_capability(__VA_ARGS__))
+
+#define BOOST_THREAD_RELEASE(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(release_capability(__VA_ARGS__))
+
+#define BOOST_THREAD_RELEASE_SHARED(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(release_shared_capability(__VA_ARGS__))
+
+#define BOOST_THREAD_TRY_ACQUIRE(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_capability(__VA_ARGS__))
+
+#define BOOST_THREAD_TRY_ACQUIRE_SHARED(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(try_acquire_shared_capability(__VA_ARGS__))
+
+#define BOOST_THREAD_EXCLUDES(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(__VA_ARGS__))
+
+#define BOOST_THREAD_ASSERT_CAPABILITY(x) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(assert_capability(x))
+
+#define BOOST_THREAD_ASSERT_SHARED_CAPABILITY(x) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_capability(x))
+
+#define BOOST_THREAD_RETURN_CAPABILITY(x) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x))
+
+#define BOOST_THREAD_NO_THREAD_SAFETY_ANALYSIS \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(no_thread_safety_analysis)
+
+#if defined(__clang__) && (!defined(SWIG)) && defined(__FreeBSD__)
+#if __has_attribute(no_thread_safety_analysis)
+#define BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS __attribute__((no_thread_safety_analysis))
+#else
+#define BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+#endif
+#else
+#define BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+#endif
+
+#ifdef USE_LOCK_STYLE_THREAD_SAFETY_ATTRIBUTES
+// The original version of thread safety analysis the following attribute
+// definitions. These use a lock-based terminology. They are still in use
+// by existing thread safety code, and will continue to be supported.
+
+// Deprecated.
+#define BOOST_THREAD_PT_GUARDED_VAR \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(pt_guarded_var)
+
+// Deprecated.
+#define BOOST_THREAD_GUARDED_VAR \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(guarded_var)
+
+// Replaced by REQUIRES
+#define BOOST_THREAD_EXCLUSIVE_LOCKS_REQUIRED(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(exclusive_locks_required(__VA_ARGS__))
+
+// Replaced by REQUIRES_SHARED
+#define BOOST_THREAD_SHARED_LOCKS_REQUIRED(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(shared_locks_required(__VA_ARGS__))
+
+// Replaced by CAPABILITY
+#define BOOST_THREAD_LOCKABLE \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(lockable)
+
+// Replaced by SCOPED_CAPABILITY
+#define BOOST_THREAD_SCOPED_LOCKABLE \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(scoped_lockable)
+
+// Replaced by ACQUIRE
+#define BOOST_THREAD_EXCLUSIVE_LOCK_FUNCTION(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(exclusive_lock_function(__VA_ARGS__))
+
+// Replaced by ACQUIRE_SHARED
+#define BOOST_THREAD_SHARED_LOCK_FUNCTION(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(shared_lock_function(__VA_ARGS__))
+
+// Replaced by RELEASE and RELEASE_SHARED
+#define BOOST_THREAD_UNLOCK_FUNCTION(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(unlock_function(__VA_ARGS__))
+
+// Replaced by TRY_ACQUIRE
+#define BOOST_THREAD_EXCLUSIVE_TRYLOCK_FUNCTION(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(exclusive_trylock_function(__VA_ARGS__))
+
+// Replaced by TRY_ACQUIRE_SHARED
+#define BOOST_THREAD_SHARED_TRYLOCK_FUNCTION(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(shared_trylock_function(__VA_ARGS__))
+
+// Replaced by ASSERT_CAPABILITY
+#define BOOST_THREAD_ASSERT_EXCLUSIVE_LOCK(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(assert_exclusive_lock(__VA_ARGS__))
+
+// Replaced by ASSERT_SHARED_CAPABILITY
+#define BOOST_THREAD_ASSERT_SHARED_LOCK(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(assert_shared_lock(__VA_ARGS__))
+
+// Replaced by EXCLUDE_CAPABILITY.
+#define BOOST_THREAD_LOCKS_EXCLUDED(...) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(locks_excluded(__VA_ARGS__))
+
+// Replaced by RETURN_CAPABILITY
+#define BOOST_THREAD_LOCK_RETURNED(x) \
+ BOOST_THREAD_ANNOTATION_ATTRIBUTE__(lock_returned(x))
+
+#endif // USE_LOCK_STYLE_THREAD_SAFETY_ATTRIBUTES
+
+#endif // BOOST_THREAD_DETAIL_THREAD_SAFETY_HPP
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/tss_hooks.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/tss_hooks.hpp
new file mode 100644
index 00000000000..4429821e0e8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/tss_hooks.hpp
@@ -0,0 +1,65 @@
+// (C) Copyright Michael Glassford 2004.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#if !defined(BOOST_TLS_HOOKS_HPP)
+#define BOOST_TLS_HOOKS_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+#if defined(BOOST_THREAD_WIN32)
+
+namespace boost
+{
+ BOOST_THREAD_DECL void __cdecl on_process_enter(void);
+ //Function to be called when the exe or dll
+ //that uses Boost.Threads first starts
+ //or is first loaded.
+ //Should be called only before the first call to
+ //on_thread_enter().
+ //Called automatically by Boost.Threads when
+ //a method for doing so has been discovered.
+ //May be omitted; may be called multiple times.
+
+ BOOST_THREAD_DECL void __cdecl on_process_exit(void);
+ //Function to be called when the exe or dll
+ //that uses Boost.Threads first starts
+ //or is first loaded.
+ //Should be called only after the last call to
+ //on_exit_thread().
+ //Called automatically by Boost.Threads when
+ //a method for doing so has been discovered.
+ //Must not be omitted; may be called multiple times.
+
+ BOOST_THREAD_DECL void __cdecl on_thread_enter(void);
+ //Function to be called just after a thread starts
+ //in an exe or dll that uses Boost.Threads.
+ //Must be called in the context of the thread
+ //that is starting.
+ //Called automatically by Boost.Threads when
+ //a method for doing so has been discovered.
+ //May be omitted; may be called multiple times.
+
+ BOOST_THREAD_DECL void __cdecl on_thread_exit(void);
+ //Function to be called just be fore a thread ends
+ //in an exe or dll that uses Boost.Threads.
+ //Must be called in the context of the thread
+ //that is ending.
+ //Called automatically by Boost.Threads when
+ //a method for doing so has been discovered.
+ //Must not be omitted; may be called multiple times.
+
+ void tss_cleanup_implemented();
+ //Dummy function used both to detect whether tss cleanup
+ //cleanup has been implemented and to force
+ //it to be linked into the Boost.Threads library.
+}
+
+#endif //defined(BOOST_THREAD_WIN32)
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif //!defined(BOOST_TLS_HOOKS_HPP)
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/variadic_footer.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/variadic_footer.hpp
new file mode 100644
index 00000000000..9ae25a847c3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/variadic_footer.hpp
@@ -0,0 +1,10 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+
+#if defined BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/detail/variadic_header.hpp b/src/third_party/boost-1.69.0/boost/thread/detail/variadic_header.hpp
new file mode 100644
index 00000000000..8015ae33cc2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/detail/variadic_header.hpp
@@ -0,0 +1,19 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/config.hpp>
+
+//#if defined BOOST_NO_CXX11_VARIADIC_TEMPLATES
+
+#include <boost/preprocessor/facilities/intercept.hpp>
+#include <boost/preprocessor/repetition/enum_params.hpp>
+#include <boost/preprocessor/repetition/repeat_from_to.hpp>
+
+#ifndef BOOST_THREAD_MAX_ARGS
+#define BOOST_THREAD_MAX_ARGS 9
+#endif
+
+//#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/thread/exceptional_ptr.hpp b/src/third_party/boost-1.69.0/boost/thread/exceptional_ptr.hpp
new file mode 100644
index 00000000000..49547923d92
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/exceptional_ptr.hpp
@@ -0,0 +1,44 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2014 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_EXCEPTIONAL_PTR_HPP
+#define BOOST_THREAD_EXCEPTIONAL_PTR_HPP
+
+#include <boost/thread/detail/move.hpp>
+#include <boost/exception_ptr.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ struct exceptional_ptr {
+ exception_ptr ptr_;
+
+ exceptional_ptr() : ptr_() {}
+ explicit exceptional_ptr(exception_ptr ex) : ptr_(ex) {}
+ template <class E>
+ explicit exceptional_ptr(BOOST_FWD_REF(E) ex) : ptr_(boost::copy_exception(boost::forward<E>(ex))) {}
+ };
+
+ template <class E>
+ inline exceptional_ptr make_exceptional(BOOST_FWD_REF(E) ex) {
+ return exceptional_ptr(boost::forward<E>(ex));
+ }
+
+ inline exceptional_ptr make_exceptional(exception_ptr ex)
+ {
+ return exceptional_ptr(ex);
+ }
+
+ inline exceptional_ptr make_exceptional()
+ {
+ return exceptional_ptr();
+ }
+
+} // namespace boost
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/exceptions.hpp b/src/third_party/boost-1.69.0/boost/thread/exceptions.hpp
new file mode 100644
index 00000000000..2a5094bd5ad
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/exceptions.hpp
@@ -0,0 +1,225 @@
+// Copyright (C) 2001-2003
+// William E. Kempf
+// Copyright (C) 2007-9 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_EXCEPTIONS_PDM070801_H
+#define BOOST_THREAD_EXCEPTIONS_PDM070801_H
+
+#include <boost/thread/detail/config.hpp>
+
+// pdm: Sorry, but this class is used all over the place & I end up
+// with recursive headers if I don't separate it
+// wek: Not sure why recursive headers would cause compilation problems
+// given the include guards, but regardless it makes sense to
+// seperate this out any way.
+
+#include <string>
+#include <stdexcept>
+#include <boost/system/system_error.hpp>
+#include <boost/system/error_code.hpp>
+
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ class BOOST_SYMBOL_VISIBLE thread_interrupted
+ {};
+#endif
+
+ class BOOST_SYMBOL_VISIBLE thread_exception:
+ public system::system_error
+ //public std::exception
+ {
+ typedef system::system_error base_type;
+ public:
+ thread_exception()
+ : base_type(0,system::generic_category())
+ {}
+
+ thread_exception(int sys_error_code)
+ : base_type(sys_error_code, system::generic_category())
+ {}
+
+ thread_exception( int ev, const char * what_arg )
+ : base_type(system::error_code(ev, system::generic_category()), what_arg)
+ {
+ }
+ thread_exception( int ev, const std::string & what_arg )
+ : base_type(system::error_code(ev, system::generic_category()), what_arg)
+ {
+ }
+
+ ~thread_exception() BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+
+ int native_error() const
+ {
+ return code().value();
+ }
+
+ };
+
+ class BOOST_SYMBOL_VISIBLE condition_error:
+ public system::system_error
+ //public std::exception
+ {
+ typedef system::system_error base_type;
+ public:
+ condition_error()
+ : base_type(system::error_code(0, system::generic_category()), "Condition error")
+ {}
+ condition_error( int ev )
+ : base_type(system::error_code(ev, system::generic_category()), "Condition error")
+ {
+ }
+ condition_error( int ev, const char * what_arg )
+ : base_type(system::error_code(ev, system::generic_category()), what_arg)
+ {
+ }
+ condition_error( int ev, const std::string & what_arg )
+ : base_type(system::error_code(ev, system::generic_category()), what_arg)
+ {
+ }
+ };
+
+
+ class BOOST_SYMBOL_VISIBLE lock_error:
+ public thread_exception
+ {
+ typedef thread_exception base_type;
+ public:
+ lock_error()
+ : base_type(0, "boost::lock_error")
+ {}
+
+ lock_error( int ev )
+ : base_type(ev, "boost::lock_error")
+ {
+ }
+ lock_error( int ev, const char * what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+ lock_error( int ev, const std::string & what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+
+ ~lock_error() BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ };
+
+ class BOOST_SYMBOL_VISIBLE thread_resource_error:
+ public thread_exception
+ {
+ typedef thread_exception base_type;
+ public:
+ thread_resource_error()
+ : base_type(static_cast<int>(system::errc::resource_unavailable_try_again), "boost::thread_resource_error")
+ {}
+
+ thread_resource_error( int ev )
+ : base_type(ev, "boost::thread_resource_error")
+ {
+ }
+ thread_resource_error( int ev, const char * what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+ thread_resource_error( int ev, const std::string & what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+
+
+ ~thread_resource_error() BOOST_NOEXCEPT_OR_NOTHROW
+ {}
+
+ };
+
+ class BOOST_SYMBOL_VISIBLE unsupported_thread_option:
+ public thread_exception
+ {
+ typedef thread_exception base_type;
+ public:
+ unsupported_thread_option()
+ : base_type(static_cast<int>(system::errc::invalid_argument), "boost::unsupported_thread_option")
+ {}
+
+ unsupported_thread_option( int ev )
+ : base_type(ev, "boost::unsupported_thread_option")
+ {
+ }
+ unsupported_thread_option( int ev, const char * what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+ unsupported_thread_option( int ev, const std::string & what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+
+ };
+
+ class BOOST_SYMBOL_VISIBLE invalid_thread_argument:
+ public thread_exception
+ {
+ typedef thread_exception base_type;
+ public:
+ invalid_thread_argument()
+ : base_type(static_cast<int>(system::errc::invalid_argument), "boost::invalid_thread_argument")
+ {}
+
+ invalid_thread_argument( int ev )
+ : base_type(ev, "boost::invalid_thread_argument")
+ {
+ }
+ invalid_thread_argument( int ev, const char * what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+ invalid_thread_argument( int ev, const std::string & what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+
+ };
+
+ class BOOST_SYMBOL_VISIBLE thread_permission_error:
+ public thread_exception
+ {
+ typedef thread_exception base_type;
+ public:
+ thread_permission_error()
+ : base_type(static_cast<int>(system::errc::permission_denied), "boost::thread_permission_error")
+ {}
+
+ thread_permission_error( int ev )
+ : base_type(ev, "boost::thread_permission_error")
+ {
+ }
+ thread_permission_error( int ev, const char * what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+ thread_permission_error( int ev, const std::string & what_arg )
+ : base_type(ev, what_arg)
+ {
+ }
+
+ };
+
+} // namespace boost
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/executor.hpp b/src/third_party/boost-1.69.0/boost/thread/executor.hpp
new file mode 100644
index 00000000000..c2b85a0eabe
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/executor.hpp
@@ -0,0 +1,15 @@
+// Copyright (C) 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/09 Vicente J. Botet Escriba
+// Adapt to boost from CCIA C++11 implementation
+
+#ifndef BOOST_THREAD_EXECUTOR_HPP
+#define BOOST_THREAD_EXECUTOR_HPP
+
+#include <boost/thread/executors/executor.hpp>
+#include <boost/thread/executors/executor_adaptor.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/executors/executor.hpp b/src/third_party/boost-1.69.0/boost/thread/executors/executor.hpp
new file mode 100644
index 00000000000..1c751dd094b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/executors/executor.hpp
@@ -0,0 +1,148 @@
+// Copyright (C) 2013,2014 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/09 Vicente J. Botet Escriba
+// Adapt to boost from CCIA C++11 implementation
+
+#ifndef BOOST_THREAD_EXECUTORS_EXECUTOR_HPP
+#define BOOST_THREAD_EXECUTORS_EXECUTOR_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/thread/detail/delete.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/executors/work.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace executors
+ {
+ class executor
+ {
+ public:
+ /// type-erasure to store the works to do
+ typedef executors::work work;
+
+ /// executor is not copyable.
+ BOOST_THREAD_NO_COPYABLE(executor)
+ executor() {}
+
+ /**
+ * \par Effects
+ * Destroys the executor.
+ *
+ * \par Synchronization
+ * The completion of all the closures happen before the completion of the executor destructor.
+ */
+ virtual ~executor() {}
+
+ /**
+ * \par Effects
+ * Close the \c executor for submissions.
+ * The worker threads will work until there is no more closures to run.
+ */
+ virtual void close() = 0;
+
+ /**
+ * \par Returns
+ * Whether the pool is closed for submissions.
+ */
+ virtual bool closed() = 0;
+
+ /**
+ * \par Effects
+ * The specified closure will be scheduled for execution at some point in the future.
+ * If invoked closure throws an exception the executor will call std::terminate, as is the case with threads.
+ *
+ * \par Synchronization
+ * Ccompletion of closure on a particular thread happens before destruction of thread's thread local variables.
+ *
+ * \par Throws
+ * \c sync_queue_is_closed if the thread pool is closed.
+ * Whatever exception that can be throw while storing the closure.
+ */
+ virtual void submit(BOOST_THREAD_RV_REF(work) closure) = 0;
+// virtual void submit(work& closure) = 0;
+
+ /**
+ * \par Requires
+ * \c Closure is a model of Callable(void()) and a model of CopyConstructible/MoveConstructible.
+ *
+ * \par Effects
+ * The specified closure will be scheduled for execution at some point in the future.
+ * If invoked closure throws an exception the thread pool will call std::terminate, as is the case with threads.
+ *
+ * \par Synchronization
+ * Completion of closure on a particular thread happens before destruction of thread's thread local variables.
+ *
+ * \par Throws
+ * \c sync_queue_is_closed if the thread pool is closed.
+ * Whatever exception that can be throw while storing the closure.
+ */
+
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template <typename Closure>
+ void submit(Closure & closure)
+ {
+ work w ((closure));
+ submit(boost::move(w));
+ }
+#endif
+ void submit(void (*closure)())
+ {
+ work w ((closure));
+ submit(boost::move(w));
+ }
+
+ template <typename Closure>
+ void submit(BOOST_THREAD_FWD_REF(Closure) closure)
+ {
+ //submit(work(boost::forward<Closure>(closure)));
+ work w((boost::forward<Closure>(closure)));
+ submit(boost::move(w));
+ }
+
+ /**
+ * \par Effects
+ * Try to execute one task.
+ *
+ * \par Returns
+ * Whether a task has been executed.
+ *
+ * \par Throws
+ * Whatever the current task constructor throws or the task() throws.
+ */
+ virtual bool try_executing_one() = 0;
+
+ /**
+ * \par Requires
+ * This must be called from an scheduled task.
+ *
+ * \par Effects
+ * Reschedule functions until pred()
+ */
+ template <typename Pred>
+ bool reschedule_until(Pred const& pred)
+ {
+ do {
+ //schedule_one_or_yield();
+ if ( ! try_executing_one())
+ {
+ return false;
+ }
+ } while (! pred());
+ return true;
+ }
+ };
+
+ }
+ using executors::executor;
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/executors/executor_adaptor.hpp b/src/third_party/boost-1.69.0/boost/thread/executors/executor_adaptor.hpp
new file mode 100644
index 00000000000..ca1a35f2d92
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/executors/executor_adaptor.hpp
@@ -0,0 +1,136 @@
+// Copyright (C) 2013,2014 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// 2013/09 Vicente J. Botet Escriba
+// Adapt to boost from CCIA C++11 implementation
+
+#ifndef BOOST_THREAD_EXECUTORS_EXECUTOR_ADAPTOR_HPP
+#define BOOST_THREAD_EXECUTORS_EXECUTOR_ADAPTOR_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/thread/executors/executor.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+namespace executors
+{
+ /**
+ * Polymorphic adaptor of a model of Executor to an executor.
+ */
+ template <typename Executor>
+ class executor_adaptor : public executor
+ {
+ Executor ex;
+ public:
+ /// type-erasure to store the works to do
+ typedef executor::work work;
+
+ /// executor is not copyable.
+ BOOST_THREAD_NO_COPYABLE(executor_adaptor)
+
+ /**
+ * executor_adaptor constructor
+ */
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <typename ...Args>
+ executor_adaptor(BOOST_THREAD_RV_REF(Args) ... args) : ex(boost::forward<Args>(args)...) {}
+#else
+ /**
+ * executor_adaptor constructor
+ */
+ executor_adaptor() : ex() {}
+
+ template <typename A1>
+ executor_adaptor(
+ BOOST_THREAD_FWD_REF(A1) a1
+ ) :
+ ex(
+ boost::forward<A1>(a1)
+ ) {}
+ template <typename A1, typename A2>
+ executor_adaptor(
+ BOOST_THREAD_FWD_REF(A1) a1,
+ BOOST_THREAD_FWD_REF(A2) a2
+ ) :
+ ex(
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2)
+ ) {}
+ template <typename A1, typename A2, typename A3>
+ executor_adaptor(
+ BOOST_THREAD_FWD_REF(A1) a1,
+ BOOST_THREAD_FWD_REF(A2) a2,
+ BOOST_THREAD_FWD_REF(A3) a3
+ ) :
+ ex(
+ boost::forward<A1>(a1),
+ boost::forward<A2>(a2),
+ boost::forward<A3>(a3)
+ ) {}
+#endif
+ Executor& underlying_executor() { return ex; }
+
+ /**
+ * \b Effects: close the \c executor for submissions.
+ * The worker threads will work until there is no more closures to run.
+ */
+ void close() { ex.close(); }
+
+ /**
+ * \b Returns: whether the pool is closed for submissions.
+ */
+ bool closed() { return ex.closed(); }
+
+ /**
+ * \b Effects: The specified closure will be scheduled for execution at some point in the future.
+ * If invoked closure throws an exception the executor will call std::terminate, as is the case with threads.
+ *
+ * \b Synchronization: completion of closure on a particular thread happens before destruction of thread's thread local variables.
+ *
+ * \b Throws: \c sync_queue_is_closed if the thread pool is closed.
+ * Whatever exception that can be throw while storing the closure.
+ */
+ void submit(BOOST_THREAD_RV_REF(work) closure) {
+ return ex.submit(boost::move(closure));
+ }
+
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template <typename Closure>
+ void submit(Closure & closure)
+ {
+ submit(work(closure));
+ }
+#endif
+ void submit(void (*closure)())
+ {
+ submit(work(closure));
+ }
+
+ template <typename Closure>
+ void submit(BOOST_THREAD_FWD_REF(Closure) closure)
+ {
+ //submit(work(boost::forward<Closure>(closure)));
+ work w((boost::forward<Closure>(closure)));
+ submit(boost::move(w));
+ }
+
+ /**
+ * Effects: try to execute one task.
+ * Returns: whether a task has been executed.
+ * Throws: whatever the current task constructor throws or the task() throws.
+ */
+ bool try_executing_one() { return ex.try_executing_one(); }
+
+ };
+}
+using executors::executor_adaptor;
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/executors/generic_executor_ref.hpp b/src/third_party/boost-1.69.0/boost/thread/executors/generic_executor_ref.hpp
new file mode 100644
index 00000000000..1353dd32778
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/executors/generic_executor_ref.hpp
@@ -0,0 +1,213 @@
+// Copyright (C) 2014 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_THREAD_EXECUTORS_GENERIC_EXECUTOR_REF_HPP
+#define BOOST_THREAD_EXECUTORS_GENERIC_EXECUTOR_REF_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/thread/detail/delete.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/executors/executor.hpp>
+
+#include <boost/shared_ptr.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace executors
+ {
+
+ template <class Executor>
+ class executor_ref : public executor
+ {
+ Executor& ex;
+ public:
+ /// type-erasure to store the works to do
+ typedef executors::work work;
+
+ /// executor is not copyable.
+ BOOST_THREAD_NO_COPYABLE(executor_ref)
+ executor_ref(Executor& ex_) : ex(ex_) {}
+
+ /**
+ * \par Effects
+ * Destroys the executor.
+ *
+ * \par Synchronization
+ * The completion of all the closures happen before the completion of the executor destructor.
+ */
+ ~executor_ref() {}
+
+ /**
+ * \par Effects
+ * Close the \c executor for submissions.
+ * The worker threads will work until there is no more closures to run.
+ */
+ void close() { ex.close(); }
+
+ /**
+ * \par Returns
+ * Whether the pool is closed for submissions.
+ */
+ bool closed() { return ex.closed(); }
+
+ /**
+ * \par Effects
+ * The specified closure will be scheduled for execution at some point in the future.
+ * If invoked closure throws an exception the executor will call std::terminate, as is the case with threads.
+ *
+ * \par Synchronization
+ * Ccompletion of closure on a particular thread happens before destruction of thread's thread local variables.
+ *
+ * \par Throws
+ * \c sync_queue_is_closed if the thread pool is closed.
+ * Whatever exception that can be throw while storing the closure.
+ */
+ void submit(BOOST_THREAD_RV_REF(work) closure) {
+ ex.submit(boost::move(closure));
+ }
+// void submit(work& closure) {
+// ex.submit(closure);
+// }
+
+
+ /**
+ * \par Effects
+ * Try to execute one task.
+ *
+ * \par Returns
+ * Whether a task has been executed.
+ *
+ * \par Throws
+ * Whatever the current task constructor throws or the task() throws.
+ */
+ bool try_executing_one() { return ex.try_executing_one(); }
+
+ };
+
+ class generic_executor_ref
+ {
+ shared_ptr<executor> ex;
+ public:
+ /// type-erasure to store the works to do
+ typedef executors::work work;
+
+ template<typename Executor>
+ generic_executor_ref(Executor& ex_)
+ //: ex(make_shared<executor_ref<Executor> >(ex_)) // todo check why this doesn't works with C++03
+ : ex( new executor_ref<Executor>(ex_) )
+ {
+ }
+
+ //generic_executor_ref(generic_executor_ref const& other) noexcept {}
+ //generic_executor_ref& operator=(generic_executor_ref const& other) noexcept {}
+
+
+ /**
+ * \par Effects
+ * Close the \c executor for submissions.
+ * The worker threads will work until there is no more closures to run.
+ */
+ void close() { ex->close(); }
+
+ /**
+ * \par Returns
+ * Whether the pool is closed for submissions.
+ */
+ bool closed() { return ex->closed(); }
+
+ /**
+ * \par Requires
+ * \c Closure is a model of Callable(void()) and a model of CopyConstructible/MoveConstructible.
+ *
+ * \par Effects
+ * The specified closure will be scheduled for execution at some point in the future.
+ * If invoked closure throws an exception the thread pool will call std::terminate, as is the case with threads.
+ *
+ * \par Synchronization
+ * Completion of closure on a particular thread happens before destruction of thread's thread local variables.
+ *
+ * \par Throws
+ * \c sync_queue_is_closed if the thread pool is closed.
+ * Whatever exception that can be throw while storing the closure.
+ */
+
+ void submit(BOOST_THREAD_RV_REF(work) closure)
+ {
+ ex->submit(boost::move(closure));
+ }
+
+#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template <typename Closure>
+ void submit(Closure & closure)
+ {
+ //work w ((closure));
+ //submit(boost::move(w));
+ submit(work(closure));
+ }
+#endif
+ void submit(void (*closure)())
+ {
+ work w ((closure));
+ submit(boost::move(w));
+ //submit(work(closure));
+ }
+
+ template <typename Closure>
+ void submit(BOOST_THREAD_FWD_REF(Closure) closure)
+ {
+ work w((boost::forward<Closure>(closure)));
+ submit(boost::move(w));
+ }
+
+// size_t num_pending_closures() const
+// {
+// return ex->num_pending_closures();
+// }
+
+ /**
+ * \par Effects
+ * Try to execute one task.
+ *
+ * \par Returns
+ * Whether a task has been executed.
+ *
+ * \par Throws
+ * Whatever the current task constructor throws or the task() throws.
+ */
+ bool try_executing_one() { return ex->try_executing_one(); }
+
+ /**
+ * \par Requires
+ * This must be called from an scheduled task.
+ *
+ * \par Effects
+ * reschedule functions until pred()
+ */
+ template <typename Pred>
+ bool reschedule_until(Pred const& pred)
+ {
+ do {
+ //schedule_one_or_yield();
+ if ( ! try_executing_one())
+ {
+ return false;
+ }
+ } while (! pred());
+ return true;
+ }
+
+ };
+ }
+ using executors::executor_ref;
+ using executors::generic_executor_ref;
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/executors/work.hpp b/src/third_party/boost-1.69.0/boost/thread/executors/work.hpp
new file mode 100644
index 00000000000..bdaf7651b92
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/executors/work.hpp
@@ -0,0 +1,30 @@
+// (C) Copyright 2013,2014 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_EXECUTORS_WORK_HPP
+#define BOOST_THREAD_EXECUTORS_WORK_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/detail/nullary_function.hpp>
+#include <boost/thread/csbl/functional.hpp>
+
+namespace boost
+{
+ namespace executors
+ {
+ typedef detail::nullary_function<void()> work;
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ typedef detail::nullary_function<void()> work_pq;
+ //typedef csbl::function<void()> work_pq;
+#else
+ typedef csbl::function<void()> work_pq;
+#endif
+ }
+} // namespace boost
+
+
+#endif // BOOST_THREAD_EXECUTORS_WORK_HPP
diff --git a/src/third_party/boost-1.69.0/boost/thread/future.hpp b/src/third_party/boost-1.69.0/boost/thread/future.hpp
new file mode 100644
index 00000000000..55afca8feff
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/future.hpp
@@ -0,0 +1,5897 @@
+// (C) Copyright 2008-10 Anthony Williams
+// (C) Copyright 2011-2015 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_FUTURE_HPP
+#define BOOST_THREAD_FUTURE_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+// boost::thread::future requires exception handling
+// due to boost::exception::exception_ptr dependency
+
+//#define BOOST_THREAD_CONTINUATION_SYNC
+
+#ifdef BOOST_NO_EXCEPTIONS
+namespace boost
+{
+namespace detail {
+struct shared_state_base {
+ void notify_deferred() {}
+};
+}
+}
+#else
+
+#include <boost/thread/condition_variable.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/detail/invoker.hpp>
+#include <boost/thread/detail/invoke.hpp>
+#include <boost/thread/detail/is_convertible.hpp>
+#include <boost/thread/exceptional_ptr.hpp>
+#include <boost/thread/futures/future_error.hpp>
+#include <boost/thread/futures/future_error_code.hpp>
+#include <boost/thread/futures/future_status.hpp>
+#include <boost/thread/futures/is_future_type.hpp>
+#include <boost/thread/futures/launch.hpp>
+#include <boost/thread/futures/wait_for_all.hpp>
+#include <boost/thread/futures/wait_for_any.hpp>
+#include <boost/thread/lock_algorithms.hpp>
+#include <boost/thread/lock_types.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/thread_only.hpp>
+#include <boost/thread/thread_time.hpp>
+#include <boost/thread/executor.hpp>
+#include <boost/thread/executors/generic_executor_ref.hpp>
+
+#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+#include <boost/optional.hpp>
+#else
+#include <boost/thread/csbl/memory/unique_ptr.hpp>
+#endif
+
+#include <boost/assert.hpp>
+#include <boost/bind.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#endif
+#include <boost/core/enable_if.hpp>
+#include <boost/core/ref.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/exception_ptr.hpp>
+#include <boost/function.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/smart_ptr/make_shared.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/is_copy_constructible.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/utility/result_of.hpp>
+
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+#include <boost/thread/detail/memory.hpp>
+#include <boost/container/scoped_allocator.hpp>
+#if ! defined BOOST_NO_CXX11_ALLOCATOR
+#include <memory>
+#endif
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
+#include <boost/thread/csbl/tuple.hpp>
+#include <boost/thread/csbl/vector.hpp>
+#endif
+
+#include <algorithm>
+#include <list>
+#include <vector>
+#include <utility>
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE
+#define BOOST_THREAD_FUTURE future
+#else
+#define BOOST_THREAD_FUTURE unique_future
+#endif
+
+namespace boost
+{
+ template <class T>
+ shared_ptr<T> static_shared_from_this(T* that)
+ {
+ return static_pointer_cast<T>(that->shared_from_this());
+ }
+ template <class T>
+ shared_ptr<T const> static_shared_from_this(T const* that)
+ {
+ return static_pointer_cast<T const>(that->shared_from_this());
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+#else
+ namespace executors {
+ class executor;
+ }
+#endif
+ typedef shared_ptr<executor> executor_ptr_type;
+
+ namespace detail
+ {
+
+ struct relocker
+ {
+ boost::unique_lock<boost::mutex>& lock_;
+
+ relocker(boost::unique_lock<boost::mutex>& lk):
+ lock_(lk)
+ {
+ lock_.unlock();
+ }
+ ~relocker()
+ {
+ if (! lock_.owns_lock()) {
+ lock_.lock();
+ }
+ }
+ void lock() {
+ if (! lock_.owns_lock()) {
+ lock_.lock();
+ }
+ }
+ private:
+ relocker& operator=(relocker const&);
+ };
+
+ struct shared_state_base : enable_shared_from_this<shared_state_base>
+ {
+ typedef std::list<boost::condition_variable_any*> waiter_list;
+ typedef waiter_list::iterator notify_when_ready_handle;
+ // This type should be only included conditionally if interruptions are allowed, but is included to maintain the same layout.
+ typedef shared_ptr<shared_state_base> continuation_ptr_type;
+ typedef std::vector<continuation_ptr_type> continuations_type;
+
+ boost::exception_ptr exception;
+ bool done;
+ bool is_valid_;
+ bool is_deferred_;
+ bool is_constructed;
+ launch policy_;
+ mutable boost::mutex mutex;
+ boost::condition_variable waiters;
+ waiter_list external_waiters;
+ boost::function<void()> callback;
+ // This declaration should be only included conditionally, but is included to maintain the same layout.
+ continuations_type continuations;
+ executor_ptr_type ex_;
+
+ // This declaration should be only included conditionally, but is included to maintain the same layout.
+ virtual void launch_continuation()
+ {
+ }
+
+ shared_state_base():
+ done(false),
+ is_valid_(true),
+ is_deferred_(false),
+ is_constructed(false),
+ policy_(launch::none),
+ continuations(),
+ ex_()
+ {}
+
+ shared_state_base(exceptional_ptr const& ex):
+ exception(ex.ptr_),
+ done(true),
+ is_valid_(true),
+ is_deferred_(false),
+ is_constructed(false),
+ policy_(launch::none),
+ continuations(),
+ ex_()
+ {}
+
+
+ virtual ~shared_state_base()
+ {
+ }
+
+ bool is_done()
+ {
+ return done;
+ }
+
+ executor_ptr_type get_executor()
+ {
+ return ex_;
+ }
+
+ void set_executor_policy(executor_ptr_type aex)
+ {
+ set_executor();
+ ex_ = aex;
+ }
+ void set_executor_policy(executor_ptr_type aex, boost::lock_guard<boost::mutex>&)
+ {
+ set_executor();
+ ex_ = aex;
+ }
+ void set_executor_policy(executor_ptr_type aex, boost::unique_lock<boost::mutex>&)
+ {
+ set_executor();
+ ex_ = aex;
+ }
+
+ bool valid(boost::unique_lock<boost::mutex>&) { return is_valid_; }
+ bool valid() {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ return valid(lk);
+ }
+ void invalidate(boost::unique_lock<boost::mutex>&) { is_valid_ = false; }
+ void invalidate() {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ invalidate(lk);
+ }
+ void validate(boost::unique_lock<boost::mutex>&) { is_valid_ = true; }
+ void validate() {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ validate(lk);
+ }
+
+ void set_deferred()
+ {
+ is_deferred_ = true;
+ policy_ = launch::deferred;
+ }
+ void set_async()
+ {
+ is_deferred_ = false;
+ policy_ = launch::async;
+ }
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ void set_executor()
+ {
+ is_deferred_ = false;
+ policy_ = launch::executor;
+ }
+#else
+ void set_executor()
+ {
+ }
+#endif
+ notify_when_ready_handle notify_when_ready(boost::condition_variable_any& cv)
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ do_callback(lock);
+ return external_waiters.insert(external_waiters.end(),&cv);
+ }
+
+ void unnotify_when_ready(notify_when_ready_handle it)
+ {
+ boost::lock_guard<boost::mutex> lock(this->mutex);
+ external_waiters.erase(it);
+ }
+
+#if 0
+ // this inline definition results in ODR. See https://github.com/boostorg/thread/issues/193
+ // to avoid it, we define the function on the derived templates using the macro BOOST_THREAD_DO_CONTINUATION
+#define BOOST_THREAD_DO_CONTINUATION
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ void do_continuation(boost::unique_lock<boost::mutex>& lock)
+ {
+ if (! continuations.empty()) {
+ continuations_type the_continuations = continuations;
+ continuations.clear();
+ relocker rlk(lock);
+ for (continuations_type::iterator it = the_continuations.begin(); it != the_continuations.end(); ++it) {
+ (*it)->launch_continuation();
+ }
+ }
+ }
+#else
+ void do_continuation(boost::unique_lock<boost::mutex>&)
+ {
+ }
+#endif
+
+#else
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+#define BOOST_THREAD_DO_CONTINUATION \
+ void do_continuation(boost::unique_lock<boost::mutex>& lock) \
+ { \
+ if (! this->continuations.empty()) { \
+ continuations_type the_continuations = this->continuations; \
+ this->continuations.clear(); \
+ relocker rlk(lock); \
+ for (continuations_type::iterator it = the_continuations.begin(); it != the_continuations.end(); ++it) { \
+ (*it)->launch_continuation(); \
+ } \
+ } \
+ }
+#else
+#define BOOST_THREAD_DO_CONTINUATION \
+ void do_continuation(boost::unique_lock<boost::mutex>&) \
+ { \
+ }
+#endif
+
+ virtual void do_continuation(boost::unique_lock<boost::mutex>&) = 0;
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ virtual void set_continuation_ptr(continuation_ptr_type continuation, boost::unique_lock<boost::mutex>& lock)
+ {
+ continuations.push_back(continuation);
+ if (done) {
+ do_continuation(lock);
+ }
+ }
+#endif
+ void mark_finished_internal(boost::unique_lock<boost::mutex>& lock)
+ {
+ done=true;
+ waiters.notify_all();
+ for(waiter_list::const_iterator it=external_waiters.begin(),
+ end=external_waiters.end();it!=end;++it)
+ {
+ (*it)->notify_all();
+ }
+ do_continuation(lock);
+ }
+ void notify_deferred()
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ mark_finished_internal(lock);
+ }
+
+ void do_callback(boost::unique_lock<boost::mutex>& lock)
+ {
+ if(callback && !done)
+ {
+ boost::function<void()> local_callback=callback;
+ relocker relock(lock);
+ local_callback();
+ }
+ }
+
+ virtual bool run_if_is_deferred()
+ {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ if (is_deferred_)
+ {
+ is_deferred_=false;
+ execute(lk);
+ return true;
+ }
+ else
+ return false;
+ }
+ virtual bool run_if_is_deferred_or_ready()
+ {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ if (is_deferred_)
+ {
+ is_deferred_=false;
+ execute(lk);
+
+ return true;
+ }
+ else
+ return done;
+ }
+ void wait_internal(boost::unique_lock<boost::mutex> &lk, bool rethrow=true)
+ {
+ do_callback(lk);
+ if (is_deferred_)
+ {
+ is_deferred_=false;
+ execute(lk);
+ }
+ waiters.wait(lk, boost::bind(&shared_state_base::is_done, boost::ref(*this)));
+ if(rethrow && exception)
+ {
+ boost::rethrow_exception(exception);
+ }
+ }
+
+ virtual void wait(boost::unique_lock<boost::mutex>& lock, bool rethrow=true)
+ {
+ wait_internal(lock, rethrow);
+ }
+
+ void wait(bool rethrow=true)
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ wait(lock, rethrow);
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename Duration>
+ bool timed_wait(Duration const& rel_time)
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ if (is_deferred_)
+ return false;
+
+ do_callback(lock);
+ return waiters.timed_wait(lock, rel_time, boost::bind(&shared_state_base::is_done, boost::ref(*this)));
+ }
+
+ bool timed_wait_until(boost::system_time const& target_time)
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ if (is_deferred_)
+ return false;
+
+ do_callback(lock);
+ return waiters.timed_wait(lock, target_time, boost::bind(&shared_state_base::is_done, boost::ref(*this)));
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+
+ template <class Clock, class Duration>
+ future_status
+ wait_until(const chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ if (is_deferred_)
+ return future_status::deferred;
+ do_callback(lock);
+ if(!waiters.wait_until(lock, abs_time, boost::bind(&shared_state_base::is_done, boost::ref(*this))))
+ {
+ return future_status::timeout;
+ }
+ return future_status::ready;
+ }
+#endif
+ void mark_exceptional_finish_internal(boost::exception_ptr const& e, boost::unique_lock<boost::mutex>& lock)
+ {
+ exception=e;
+ mark_finished_internal(lock);
+ }
+
+ void mark_exceptional_finish()
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ mark_exceptional_finish_internal(boost::current_exception(), lock);
+ }
+
+ void set_exception_deferred(exception_ptr e)
+ {
+ unique_lock<boost::mutex> lk(this->mutex);
+ if (has_value(lk))
+ {
+ throw_exception(promise_already_satisfied());
+ }
+ exception=e;
+ this->is_constructed = true;
+ }
+ void set_exception_at_thread_exit(exception_ptr e)
+ {
+ set_exception_deferred(e);
+// unique_lock<boost::mutex> lk(this->mutex);
+// if (has_value(lk))
+// {
+// throw_exception(promise_already_satisfied());
+// }
+// exception=e;
+// this->is_constructed = true;
+ detail::make_ready_at_thread_exit(shared_from_this());
+ }
+
+ bool has_value() const
+ {
+ boost::lock_guard<boost::mutex> lock(this->mutex);
+ return done && ! exception;
+ }
+
+ bool has_value(unique_lock<boost::mutex>& ) const
+ {
+ return done && ! exception;
+ }
+
+ bool has_exception() const
+ {
+ boost::lock_guard<boost::mutex> lock(this->mutex);
+ return done && exception;
+ }
+
+ launch launch_policy(boost::unique_lock<boost::mutex>&) const
+ {
+ return policy_;
+ }
+
+ future_state::state get_state(boost::unique_lock<boost::mutex>&) const
+ {
+ if(!done)
+ {
+ return future_state::waiting;
+ }
+ else
+ {
+ return future_state::ready;
+ }
+ }
+ future_state::state get_state() const
+ {
+ boost::lock_guard<boost::mutex> guard(this->mutex);
+ if(!done)
+ {
+ return future_state::waiting;
+ }
+ else
+ {
+ return future_state::ready;
+ }
+ }
+
+ exception_ptr get_exception_ptr()
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ wait_internal(lock, false);
+ return exception;
+ }
+
+ template<typename F,typename U>
+ void set_wait_callback(F f,U* u)
+ {
+ boost::lock_guard<boost::mutex> lock(this->mutex);
+ callback=boost::bind(f,boost::ref(*u));
+ }
+
+ virtual void execute(boost::unique_lock<boost::mutex>&) {}
+
+ private:
+ shared_state_base(shared_state_base const&);
+ shared_state_base& operator=(shared_state_base const&);
+ };
+
+ // Used to create stand-alone futures
+ template<typename T>
+ struct shared_state:
+ detail::shared_state_base
+ {
+#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+ typedef boost::optional<T> storage_type;
+#else
+ typedef boost::csbl::unique_ptr<T> storage_type;
+#endif
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ typedef T const& source_reference_type;
+ typedef BOOST_THREAD_RV_REF(T) rvalue_source_type;
+ typedef T move_dest_type;
+#elif defined BOOST_THREAD_USES_MOVE
+ typedef typename conditional<boost::is_fundamental<T>::value,T,T const&>::type source_reference_type;
+ typedef BOOST_THREAD_RV_REF(T) rvalue_source_type;
+ typedef T move_dest_type;
+#else
+ typedef T& source_reference_type;
+ typedef typename conditional<boost::thread_detail::is_convertible<T&,BOOST_THREAD_RV_REF(T) >::value, BOOST_THREAD_RV_REF(T),T const&>::type rvalue_source_type;
+ typedef typename conditional<boost::thread_detail::is_convertible<T&,BOOST_THREAD_RV_REF(T) >::value, BOOST_THREAD_RV_REF(T),T>::type move_dest_type;
+#endif
+
+ typedef const T& shared_future_get_result_type;
+
+ storage_type result;
+
+ shared_state():
+ result()
+ {}
+ shared_state(exceptional_ptr const& ex):
+ detail::shared_state_base(ex), result()
+ {}
+
+ // locating this definition on the template avoid the ODR issue. See https://github.com/boostorg/thread/issues/193
+ BOOST_THREAD_DO_CONTINUATION
+
+ void mark_finished_with_result_internal(source_reference_type result_, boost::unique_lock<boost::mutex>& lock)
+ {
+#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+ result = result_;
+#else
+ result.reset(new T(result_));
+#endif
+ this->mark_finished_internal(lock);
+ }
+
+ void mark_finished_with_result_internal(rvalue_source_type result_, boost::unique_lock<boost::mutex>& lock)
+ {
+#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+ result = boost::move(result_);
+#elif ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ result.reset(new T(boost::move(result_)));
+#else
+ result.reset(new T(static_cast<rvalue_source_type>(result_)));
+#endif
+ this->mark_finished_internal(lock);
+ }
+
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <class ...Args>
+ void mark_finished_with_result_internal(boost::unique_lock<boost::mutex>& lock, BOOST_THREAD_FWD_REF(Args)... args)
+ {
+#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+ result.emplace(boost::forward<Args>(args)...);
+#else
+ result.reset(new T(boost::forward<Args>(args)...));
+#endif
+ this->mark_finished_internal(lock);
+ }
+#endif
+
+ void mark_finished_with_result(source_reference_type result_)
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ this->mark_finished_with_result_internal(result_, lock);
+ }
+
+ void mark_finished_with_result(rvalue_source_type result_)
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ mark_finished_with_result_internal(boost::move(result_), lock);
+#else
+ mark_finished_with_result_internal(static_cast<rvalue_source_type>(result_), lock);
+#endif
+ }
+
+ storage_type& get_storage(boost::unique_lock<boost::mutex>& lk)
+ {
+ wait_internal(lk);
+ return result;
+ }
+ virtual move_dest_type get(boost::unique_lock<boost::mutex>& lk)
+ {
+ return boost::move(*get_storage(lk));
+ }
+ move_dest_type get()
+ {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ return this->get(lk);
+ }
+
+ virtual shared_future_get_result_type get_sh(boost::unique_lock<boost::mutex>& lk)
+ {
+ return *get_storage(lk);
+ }
+ shared_future_get_result_type get_sh()
+ {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ return this->get_sh(lk);
+ }
+ void set_value_deferred(source_reference_type result_)
+ {
+ unique_lock<boost::mutex> lk(this->mutex);
+ if (this->has_value(lk))
+ {
+ throw_exception(promise_already_satisfied());
+ }
+#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+ result = result_;
+#else
+ result.reset(new T(result_));
+#endif
+
+ this->is_constructed = true;
+ }
+ void set_value_deferred(rvalue_source_type result_)
+ {
+ unique_lock<boost::mutex> lk(this->mutex);
+ if (this->has_value(lk))
+ {
+ throw_exception(promise_already_satisfied());
+ }
+
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+ result = boost::move(result_);
+#else
+ result.reset(new T(boost::move(result_)));
+#endif
+#else
+#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+ result = boost::move(result_);
+#else
+ result.reset(new T(static_cast<rvalue_source_type>(result_)));
+#endif
+#endif
+ this->is_constructed = true;
+ }
+
+ void set_value_at_thread_exit(source_reference_type result_)
+ {
+ set_value_deferred(result_);
+// unique_lock<boost::mutex> lk(this->mutex);
+// if (this->has_value(lk))
+// {
+// throw_exception(promise_already_satisfied());
+// }
+//#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+// result = result_;
+//#else
+// result.reset(new T(result_));
+//#endif
+//
+// this->is_constructed = true;
+ detail::make_ready_at_thread_exit(shared_from_this());
+ }
+ void set_value_at_thread_exit(rvalue_source_type result_)
+ {
+ set_value_deferred(boost::move(result_));
+// unique_lock<boost::mutex> lk(this->mutex);
+// if (this->has_value(lk))
+// throw_exception(promise_already_satisfied());
+//
+//#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+//#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+// result = boost::move(result_);
+//#else
+// result.reset(new T(boost::move(result_)));
+//#endif
+//#else
+//#if defined BOOST_THREAD_FUTURE_USES_OPTIONAL
+// result = boost::move(result_);
+//#else
+// result.reset(new T(static_cast<rvalue_source_type>(result_)));
+//#endif
+//#endif
+// this->is_constructed = true;
+ detail::make_ready_at_thread_exit(shared_from_this());
+ }
+
+ private:
+ shared_state(shared_state const&);
+ shared_state& operator=(shared_state const&);
+ };
+
+ template<typename T>
+ struct shared_state<T&>:
+ detail::shared_state_base
+ {
+ typedef T* storage_type;
+ typedef T& source_reference_type;
+ typedef T& move_dest_type;
+ typedef T& shared_future_get_result_type;
+
+ T* result;
+
+ shared_state():
+ result(0)
+ {}
+
+ shared_state(exceptional_ptr const& ex):
+ detail::shared_state_base(ex), result(0)
+ {}
+
+ // locating this definition on the template avoid the ODR issue. See https://github.com/boostorg/thread/issues/193
+ BOOST_THREAD_DO_CONTINUATION
+
+ void mark_finished_with_result_internal(source_reference_type result_, boost::unique_lock<boost::mutex>& lock)
+ {
+ result= &result_;
+ mark_finished_internal(lock);
+ }
+
+ void mark_finished_with_result(source_reference_type result_)
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ mark_finished_with_result_internal(result_, lock);
+ }
+
+ virtual T& get(boost::unique_lock<boost::mutex>& lock)
+ {
+ wait_internal(lock);
+ return *result;
+ }
+ T& get()
+ {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ return get(lk);
+ }
+
+ virtual T& get_sh(boost::unique_lock<boost::mutex>& lock)
+ {
+ wait_internal(lock);
+ return *result;
+ }
+ T& get_sh()
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ return get_sh(lock);
+ }
+
+ void set_value_deferred(T& result_)
+ {
+ unique_lock<boost::mutex> lk(this->mutex);
+ if (this->has_value(lk))
+ {
+ throw_exception(promise_already_satisfied());
+ }
+ result= &result_;
+ this->is_constructed = true;
+ }
+
+ void set_value_at_thread_exit(T& result_)
+ {
+ set_value_deferred(result_);
+// unique_lock<boost::mutex> lk(this->mutex);
+// if (this->has_value(lk))
+// throw_exception(promise_already_satisfied());
+// result= &result_;
+// this->is_constructed = true;
+ detail::make_ready_at_thread_exit(shared_from_this());
+ }
+
+ private:
+ shared_state(shared_state const&);
+ shared_state& operator=(shared_state const&);
+ };
+
+ template<>
+ struct shared_state<void>:
+ detail::shared_state_base
+ {
+ typedef void shared_future_get_result_type;
+ typedef void move_dest_type;
+
+ shared_state()
+ {}
+
+ shared_state(exceptional_ptr const& ex):
+ detail::shared_state_base(ex)
+ {}
+
+ // locating this definition on the template avoid the ODR issue. See https://github.com/boostorg/thread/issues/193
+ BOOST_THREAD_DO_CONTINUATION
+
+ void mark_finished_with_result_internal(boost::unique_lock<boost::mutex>& lock)
+ {
+ mark_finished_internal(lock);
+ }
+
+ void mark_finished_with_result()
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ mark_finished_with_result_internal(lock);
+ }
+
+ virtual void get(boost::unique_lock<boost::mutex>& lock)
+ {
+ this->wait_internal(lock);
+ }
+ void get()
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ this->get(lock);
+ }
+
+ virtual void get_sh(boost::unique_lock<boost::mutex>& lock)
+ {
+ this->wait_internal(lock);
+ }
+ void get_sh()
+ {
+ boost::unique_lock<boost::mutex> lock(this->mutex);
+ this->get_sh(lock);
+ }
+
+ void set_value_deferred()
+ {
+ unique_lock<boost::mutex> lk(this->mutex);
+ if (this->has_value(lk))
+ {
+ throw_exception(promise_already_satisfied());
+ }
+ this->is_constructed = true;
+ }
+ void set_value_at_thread_exit()
+ {
+ set_value_deferred();
+// unique_lock<boost::mutex> lk(this->mutex);
+// if (this->has_value(lk))
+// {
+// throw_exception(promise_already_satisfied());
+// }
+// this->is_constructed = true;
+ detail::make_ready_at_thread_exit(shared_from_this());
+ }
+ private:
+ shared_state(shared_state const&);
+ shared_state& operator=(shared_state const&);
+ };
+
+ /////////////////////////
+ /// future_async_shared_state_base
+ /////////////////////////
+ template<typename Rp>
+ struct future_async_shared_state_base: shared_state<Rp>
+ {
+ typedef shared_state<Rp> base_type;
+ protected:
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ boost::thread thr_;
+ void join()
+ {
+ if (this_thread::get_id() == thr_.get_id())
+ {
+ thr_.detach();
+ return;
+ }
+ if (thr_.joinable()) thr_.join();
+ }
+#endif
+ public:
+ future_async_shared_state_base()
+ {
+ this->set_async();
+ }
+
+ ~future_async_shared_state_base()
+ {
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ join();
+#elif defined BOOST_THREAD_ASYNC_FUTURE_WAITS
+ unique_lock<boost::mutex> lk(this->mutex);
+ this->waiters.wait(lk, boost::bind(&shared_state_base::is_done, boost::ref(*this)));
+#endif
+ }
+
+ virtual void wait(boost::unique_lock<boost::mutex>& lk, bool rethrow)
+ {
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ {
+ relocker rlk(lk);
+ join();
+ }
+#endif
+ this->base_type::wait(lk, rethrow);
+ }
+ };
+
+ /////////////////////////
+ /// future_async_shared_state
+ /////////////////////////
+ template<typename Rp, typename Fp>
+ struct future_async_shared_state: future_async_shared_state_base<Rp>
+ {
+ future_async_shared_state()
+ {
+ }
+
+ void init(BOOST_THREAD_FWD_REF(Fp) f)
+ {
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ this->thr_ = boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::forward<Fp>(f));
+#else
+ boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::forward<Fp>(f)).detach();
+#endif
+ }
+
+ static void run(shared_ptr<future_async_shared_state> that, BOOST_THREAD_FWD_REF(Fp) f)
+ {
+ try
+ {
+ that->mark_finished_with_result(f());
+ }
+ catch(...)
+ {
+ that->mark_exceptional_finish();
+ }
+ }
+ };
+
+ template<typename Fp>
+ struct future_async_shared_state<void, Fp>: public future_async_shared_state_base<void>
+ {
+ void init(BOOST_THREAD_FWD_REF(Fp) f)
+ {
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ this->thr_ = boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f));
+#else
+ boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f)).detach();
+#endif
+ }
+
+ static void run(shared_ptr<future_async_shared_state> that, BOOST_THREAD_FWD_REF(Fp) f)
+ {
+ try
+ {
+ f();
+ that->mark_finished_with_result();
+ }
+ catch(...)
+ {
+ that->mark_exceptional_finish();
+ }
+ }
+ };
+
+ template<typename Rp, typename Fp>
+ struct future_async_shared_state<Rp&, Fp>: future_async_shared_state_base<Rp&>
+ {
+ void init(BOOST_THREAD_FWD_REF(Fp) f)
+ {
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ this->thr_ = boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f));
+#else
+ boost::thread(&future_async_shared_state::run, static_shared_from_this(this), boost::move(f)).detach();
+#endif
+ }
+
+ static void run(shared_ptr<future_async_shared_state> that, BOOST_THREAD_FWD_REF(Fp) f)
+ {
+ try
+ {
+ that->mark_finished_with_result(f());
+ }
+ catch(...)
+ {
+ that->mark_exceptional_finish();
+ }
+ }
+ };
+
+ //////////////////////////
+ /// future_deferred_shared_state
+ //////////////////////////
+ template<typename Rp, typename Fp>
+ struct future_deferred_shared_state: shared_state<Rp>
+ {
+ Fp func_;
+
+ explicit future_deferred_shared_state(BOOST_THREAD_FWD_REF(Fp) f)
+ : func_(boost::move(f))
+ {
+ this->set_deferred();
+ }
+
+ virtual void execute(boost::unique_lock<boost::mutex>& lck) {
+ try
+ {
+ Fp local_fuct=boost::move(func_);
+ relocker relock(lck);
+ Rp res = local_fuct();
+ relock.lock();
+ this->mark_finished_with_result_internal(boost::move(res), lck);
+ }
+ catch (...)
+ {
+ this->mark_exceptional_finish_internal(current_exception(), lck);
+ }
+ }
+ };
+ template<typename Rp, typename Fp>
+ struct future_deferred_shared_state<Rp&,Fp>: shared_state<Rp&>
+ {
+ Fp func_;
+
+ explicit future_deferred_shared_state(BOOST_THREAD_FWD_REF(Fp) f)
+ : func_(boost::move(f))
+ {
+ this->set_deferred();
+ }
+
+ virtual void execute(boost::unique_lock<boost::mutex>& lck) {
+ try
+ {
+ this->mark_finished_with_result_internal(func_(), lck);
+ }
+ catch (...)
+ {
+ this->mark_exceptional_finish_internal(current_exception(), lck);
+ }
+ }
+ };
+
+ template<typename Fp>
+ struct future_deferred_shared_state<void,Fp>: shared_state<void>
+ {
+ Fp func_;
+
+ explicit future_deferred_shared_state(BOOST_THREAD_FWD_REF(Fp) f)
+ : func_(boost::move(f))
+ {
+ this->set_deferred();
+ }
+
+ virtual void execute(boost::unique_lock<boost::mutex>& lck) {
+ try
+ {
+ Fp local_fuct=boost::move(func_);
+ relocker relock(lck);
+ local_fuct();
+ relock.lock();
+ this->mark_finished_with_result_internal(lck);
+ }
+ catch (...)
+ {
+ this->mark_exceptional_finish_internal(current_exception(), lck);
+ }
+ }
+ };
+
+ class future_waiter
+ {
+ public:
+ typedef std::vector<int>::size_type count_type;
+ private:
+ struct registered_waiter
+ {
+ boost::shared_ptr<detail::shared_state_base> future_;
+ detail::shared_state_base::notify_when_ready_handle handle;
+ count_type index;
+
+ registered_waiter(boost::shared_ptr<detail::shared_state_base> const& a_future,
+ detail::shared_state_base::notify_when_ready_handle handle_,
+ count_type index_):
+ future_(a_future),handle(handle_),index(index_)
+ {}
+ };
+
+ struct all_futures_lock
+ {
+#ifdef _MANAGED
+ typedef std::ptrdiff_t count_type_portable;
+#else
+ typedef count_type count_type_portable;
+#endif
+ count_type_portable count;
+ boost::scoped_array<boost::unique_lock<boost::mutex> > locks;
+
+ all_futures_lock(std::vector<registered_waiter>& futures):
+ count(futures.size()),locks(new boost::unique_lock<boost::mutex>[count])
+ {
+ for(count_type_portable i=0;i<count;++i)
+ {
+ locks[i]=BOOST_THREAD_MAKE_RV_REF(boost::unique_lock<boost::mutex>(futures[i].future_->mutex));
+ }
+ }
+
+ void lock()
+ {
+ boost::lock(locks.get(),locks.get()+count);
+ }
+
+ void unlock()
+ {
+ for(count_type_portable i=0;i<count;++i)
+ {
+ locks[i].unlock();
+ }
+ }
+ };
+
+ boost::condition_variable_any cv;
+ std::vector<registered_waiter> futures_;
+ count_type future_count;
+
+ public:
+ future_waiter():
+ future_count(0)
+ {}
+
+ template<typename F>
+ void add(F& f)
+ {
+ if(f.future_)
+ {
+ registered_waiter waiter(f.future_,f.future_->notify_when_ready(cv),future_count);
+ try {
+ futures_.push_back(waiter);
+ } catch(...) {
+ f.future_->unnotify_when_ready(waiter.handle);
+ throw;
+ }
+ }
+ ++future_count;
+ }
+
+#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+ template<typename F1, typename... Fs>
+ void add(F1& f1, Fs&... fs)
+ {
+ add(f1); add(fs...);
+ }
+#endif
+
+ count_type wait()
+ {
+ all_futures_lock lk(futures_);
+ for(;;)
+ {
+ for(count_type i=0;i<futures_.size();++i)
+ {
+ if(futures_[i].future_->done)
+ {
+ return futures_[i].index;
+ }
+ }
+ cv.wait(lk);
+ }
+ }
+
+ ~future_waiter()
+ {
+ for(count_type i=0;i<futures_.size();++i)
+ {
+ futures_[i].future_->unnotify_when_ready(futures_[i].handle);
+ }
+ }
+ };
+
+ }
+
+ template <typename R>
+ class BOOST_THREAD_FUTURE;
+
+ template <typename R>
+ class shared_future;
+
+ template<typename T>
+ struct is_future_type<BOOST_THREAD_FUTURE<T> > : true_type
+ {
+ };
+
+ template<typename T>
+ struct is_future_type<shared_future<T> > : true_type
+ {
+ };
+
+// template<typename Iterator>
+// typename boost::disable_if<is_future_type<Iterator>,Iterator>::type wait_for_any(Iterator begin,Iterator end)
+// {
+// if(begin==end)
+// return end;
+//
+// detail::future_waiter waiter;
+// for(Iterator current=begin;current!=end;++current)
+// {
+// waiter.add(*current);
+// }
+// return boost::next(begin,waiter.wait());
+// }
+
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+ template<typename F1,typename F2>
+ typename boost::enable_if<is_future_type<F1>,typename detail::future_waiter::count_type>::type wait_for_any(F1& f1,F2& f2)
+ {
+ detail::future_waiter waiter;
+ waiter.add(f1);
+ waiter.add(f2);
+ return waiter.wait();
+ }
+
+ template<typename F1,typename F2,typename F3>
+ typename detail::future_waiter::count_type wait_for_any(F1& f1,F2& f2,F3& f3)
+ {
+ detail::future_waiter waiter;
+ waiter.add(f1);
+ waiter.add(f2);
+ waiter.add(f3);
+ return waiter.wait();
+ }
+
+ template<typename F1,typename F2,typename F3,typename F4>
+ typename detail::future_waiter::count_type wait_for_any(F1& f1,F2& f2,F3& f3,F4& f4)
+ {
+ detail::future_waiter waiter;
+ waiter.add(f1);
+ waiter.add(f2);
+ waiter.add(f3);
+ waiter.add(f4);
+ return waiter.wait();
+ }
+
+ template<typename F1,typename F2,typename F3,typename F4,typename F5>
+ typename detail::future_waiter::count_type wait_for_any(F1& f1,F2& f2,F3& f3,F4& f4,F5& f5)
+ {
+ detail::future_waiter waiter;
+ waiter.add(f1);
+ waiter.add(f2);
+ waiter.add(f3);
+ waiter.add(f4);
+ waiter.add(f5);
+ return waiter.wait();
+ }
+#else
+ template<typename F1, typename... Fs>
+ typename boost::enable_if<is_future_type<F1>, typename detail::future_waiter::count_type>::type
+ wait_for_any(F1& f1, Fs&... fs)
+ {
+ detail::future_waiter waiter;
+ waiter.add(f1, fs...);
+ return waiter.wait();
+ }
+#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+
+ template <typename R>
+ class promise;
+
+ template <typename R>
+ class packaged_task;
+
+ namespace detail
+ {
+ /// Common implementation for all the futures independently of the return type
+ class base_future
+ {
+ public:
+ };
+ /// Common implementation for future and shared_future.
+ template <typename R>
+ class basic_future : public base_future
+ {
+ protected:
+ public:
+
+ typedef boost::shared_ptr<detail::shared_state<R> > future_ptr;
+ typedef typename detail::shared_state<R>::move_dest_type move_dest_type;
+
+ static //BOOST_CONSTEXPR
+ future_ptr make_exceptional_future_ptr(exceptional_ptr const& ex) {
+ return future_ptr(new detail::shared_state<R>(ex));
+ }
+
+ future_ptr future_;
+
+ basic_future(future_ptr a_future):
+ future_(a_future)
+ {
+ }
+
+ public:
+ typedef future_state::state state;
+
+ BOOST_THREAD_MOVABLE_ONLY(basic_future)
+ basic_future(): future_() {}
+
+
+ //BOOST_CONSTEXPR
+ basic_future(exceptional_ptr const& ex)
+ : future_(make_exceptional_future_ptr(ex))
+ {
+ }
+
+ ~basic_future() {
+ }
+
+ basic_future(BOOST_THREAD_RV_REF(basic_future) other) BOOST_NOEXCEPT:
+ future_(BOOST_THREAD_RV(other).future_)
+ {
+ BOOST_THREAD_RV(other).future_.reset();
+ }
+ basic_future& operator=(BOOST_THREAD_RV_REF(basic_future) other) BOOST_NOEXCEPT
+ {
+ future_=BOOST_THREAD_RV(other).future_;
+ BOOST_THREAD_RV(other).future_.reset();
+ return *this;
+ }
+ void swap(basic_future& that) BOOST_NOEXCEPT
+ {
+ future_.swap(that.future_);
+ }
+ // functions to check state, and wait for ready
+ state get_state(boost::unique_lock<boost::mutex>& lk) const
+ {
+ if(!future_)
+ {
+ return future_state::uninitialized;
+ }
+ return future_->get_state(lk);
+ }
+ state get_state() const
+ {
+ if(!future_)
+ {
+ return future_state::uninitialized;
+ }
+ return future_->get_state();
+ }
+
+ bool is_ready() const
+ {
+ return get_state()==future_state::ready;
+ }
+
+ bool is_ready(boost::unique_lock<boost::mutex>& lk) const
+ {
+ return get_state(lk)==future_state::ready;
+ }
+ bool has_exception() const
+ {
+ return future_ && future_->has_exception();
+ }
+
+ bool has_value() const
+ {
+ return future_ && future_->has_value();
+ }
+
+ launch launch_policy(boost::unique_lock<boost::mutex>& lk) const
+ {
+ if ( future_ ) return future_->launch_policy(lk);
+ else return launch(launch::none);
+ }
+
+ launch launch_policy() const
+ {
+ if ( future_ ) {
+ boost::unique_lock<boost::mutex> lk(this->future_->mutex);
+ return future_->launch_policy(lk);
+ }
+ else return launch(launch::none);
+ }
+
+ exception_ptr get_exception_ptr()
+ {
+ return future_
+ ? future_->get_exception_ptr()
+ : exception_ptr();
+ }
+
+ bool valid() const BOOST_NOEXCEPT
+ {
+ return future_.get() != 0 && future_->valid();
+ }
+
+ void wait() const
+ {
+ if(!future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ future_->wait(false);
+ }
+
+ typedef detail::shared_state_base::notify_when_ready_handle notify_when_ready_handle;
+
+ boost::mutex& mutex() {
+ if(!future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ return future_->mutex;
+ }
+
+ notify_when_ready_handle notify_when_ready(boost::condition_variable_any& cv)
+ {
+ if(!future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ return future_->notify_when_ready(cv);
+ }
+
+ void unnotify_when_ready(notify_when_ready_handle h)
+ {
+ if(!future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ return future_->unnotify_when_ready(h);
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename Duration>
+ bool timed_wait(Duration const& rel_time) const
+ {
+ if(!future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ return future_->timed_wait(rel_time);
+ }
+
+ bool timed_wait_until(boost::system_time const& abs_time) const
+ {
+ if(!future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ return future_->timed_wait_until(abs_time);
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ future_status
+ wait_for(const chrono::duration<Rep, Period>& rel_time) const
+ {
+ return wait_until(chrono::steady_clock::now() + rel_time);
+
+ }
+ template <class Clock, class Duration>
+ future_status
+ wait_until(const chrono::time_point<Clock, Duration>& abs_time) const
+ {
+ if(!future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ return future_->wait_until(abs_time);
+ }
+#endif
+
+ };
+
+ } // detail
+ BOOST_THREAD_DCL_MOVABLE_BEG(R) detail::basic_future<R> BOOST_THREAD_DCL_MOVABLE_END
+
+ namespace detail
+ {
+#if (!defined _MSC_VER || _MSC_VER >= 1400) // _MSC_VER == 1400 on MSVC 2005
+ template <class Rp, class Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_async_shared_state(BOOST_THREAD_FWD_REF(Fp) f);
+
+ template <class Rp, class Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_deferred_shared_state(BOOST_THREAD_FWD_REF(Fp) f);
+#endif // #if (!defined _MSC_VER || _MSC_VER >= 1400)
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ template<typename F, typename Rp, typename Fp>
+ struct future_deferred_continuation_shared_state;
+ template<typename F, typename Rp, typename Fp>
+ struct future_async_continuation_shared_state;
+
+ template <class F, class Rp, class Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_async_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class F, class Rp, class Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_sync_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class F, class Rp, class Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_deferred_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_shared_future_deferred_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_shared_future_async_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_shared_future_sync_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+
+ #ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ template<typename Ex, typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_executor_continuation_shared_state(Ex& ex, boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename Ex, typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_shared_future_executor_continuation_shared_state(Ex& ex, boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class Rp, class Fp, class Executor>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_executor_shared_state(Executor& ex, BOOST_THREAD_FWD_REF(Fp) f);
+ #endif
+#endif
+#if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
+ template<typename F, typename Rp>
+ struct future_unwrap_shared_state;
+ template <class F, class Rp>
+ inline BOOST_THREAD_FUTURE<Rp>
+ make_future_unwrap_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f);
+#endif
+ }
+#if defined(BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY)
+ template< typename InputIterator>
+ typename boost::disable_if<is_future_type<InputIterator>,
+ BOOST_THREAD_FUTURE<csbl::vector<typename InputIterator::value_type> >
+ >::type
+ when_all(InputIterator first, InputIterator last);
+
+ inline BOOST_THREAD_FUTURE<csbl::tuple<> > when_all();
+
+ #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ BOOST_THREAD_FUTURE<csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> >
+ when_all(BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures);
+ #endif
+
+ template< typename InputIterator>
+ typename boost::disable_if<is_future_type<InputIterator>,
+ BOOST_THREAD_FUTURE<csbl::vector<typename InputIterator::value_type> >
+ >::type
+ when_any(InputIterator first, InputIterator last);
+
+ inline BOOST_THREAD_FUTURE<csbl::tuple<> > when_any();
+
+ #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ BOOST_THREAD_FUTURE<csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> >
+ when_any(BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures);
+ #endif
+#endif // BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
+
+
+ template <typename R>
+ class BOOST_THREAD_FUTURE : public detail::basic_future<R>
+ {
+ private:
+ typedef detail::basic_future<R> base_type;
+ typedef typename base_type::future_ptr future_ptr;
+
+ friend class shared_future<R>;
+ friend class promise<R>;
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ template <typename, typename, typename>
+ friend struct detail::future_async_continuation_shared_state;
+ template <typename, typename, typename>
+ friend struct detail::future_deferred_continuation_shared_state;
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_async_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_sync_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_deferred_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_shared_future_deferred_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_shared_future_async_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_shared_future_sync_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ #ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ template<typename Ex, typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_executor_continuation_shared_state(Ex& ex, boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename Ex, typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_shared_future_executor_continuation_shared_state(Ex& ex, boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class Rp, class Fp, class Executor>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_executor_shared_state(Executor& ex, BOOST_THREAD_FWD_REF(Fp) f);
+ #endif
+#endif
+#if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
+ template<typename F, typename Rp>
+ friend struct detail::future_unwrap_shared_state;
+ template <class F, class Rp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_unwrap_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f);
+#endif
+#if defined(BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY)
+ template< typename InputIterator>
+ friend typename boost::disable_if<is_future_type<InputIterator>,
+ BOOST_THREAD_FUTURE<csbl::vector<typename InputIterator::value_type> >
+ >::type
+ when_all(InputIterator first, InputIterator last);
+
+ //friend inline BOOST_THREAD_FUTURE<csbl::tuple<> > when_all();
+
+ #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ friend BOOST_THREAD_FUTURE<csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> >
+ when_all(BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures);
+ #endif
+
+ template< typename InputIterator>
+ friend typename boost::disable_if<is_future_type<InputIterator>,
+ BOOST_THREAD_FUTURE<csbl::vector<typename InputIterator::value_type> >
+ >::type
+ when_any(InputIterator first, InputIterator last);
+
+ //friend inline BOOST_THREAD_FUTURE<csbl::tuple<> > when_any();
+
+ #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ friend BOOST_THREAD_FUTURE<csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> >
+ when_any(BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures);
+ #endif
+#endif // BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ template <class> friend class packaged_task; // todo check if this works in windows
+#else
+ friend class packaged_task<R>;
+#endif
+ friend class detail::future_waiter;
+
+ template <class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_async_shared_state(BOOST_THREAD_FWD_REF(Fp) f);
+
+ template <class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_deferred_shared_state(BOOST_THREAD_FWD_REF(Fp) f);
+
+ typedef typename base_type::move_dest_type move_dest_type;
+
+ BOOST_THREAD_FUTURE(future_ptr a_future):
+ base_type(a_future)
+ {
+ }
+
+ public:
+ BOOST_THREAD_MOVABLE_ONLY(BOOST_THREAD_FUTURE)
+ typedef future_state::state state;
+ typedef R value_type; // EXTENSION
+
+ BOOST_CONSTEXPR BOOST_THREAD_FUTURE() {}
+ //BOOST_CONSTEXPR
+ BOOST_THREAD_FUTURE(exceptional_ptr const& ex):
+ base_type(ex) {}
+
+ ~BOOST_THREAD_FUTURE() {
+ }
+
+ BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT:
+ base_type(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))))
+ {
+ }
+#if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
+ inline explicit BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R> >) other); // EXTENSION
+#endif
+
+ explicit BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(shared_future<R>) other) :
+ base_type(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))))
+ {}
+
+ BOOST_THREAD_FUTURE& operator=(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT
+ {
+ this->base_type::operator=(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))));
+ return *this;
+ }
+
+ shared_future<R> share()
+ {
+ return shared_future<R>(::boost::move(*this));
+ }
+
+ void swap(BOOST_THREAD_FUTURE& other)
+ {
+ static_cast<base_type*>(this)->swap(other);
+ }
+
+ // todo this function must be private and friendship provided to the internal users.
+ void set_async()
+ {
+ this->future_->set_async();
+ }
+ // todo this function must be private and friendship provided to the internal users.
+ void set_deferred()
+ {
+ this->future_->set_deferred();
+ }
+ bool run_if_is_deferred() {
+ return this->future_->run_if_is_deferred();
+ }
+ bool run_if_is_deferred_or_ready() {
+ return this->future_->run_if_is_deferred_or_ready();
+ }
+ // retrieving the value
+ move_dest_type get()
+ {
+ if (this->future_.get() == 0)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ unique_lock<boost::mutex> lk(this->future_->mutex);
+ if (! this->future_->valid(lk))
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+#ifdef BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET
+ this->future_->invalidate(lk);
+#endif
+ return this->future_->get(lk);
+ }
+
+ template <typename R2>
+ typename boost::disable_if< is_void<R2>, move_dest_type>::type
+ get_or(BOOST_THREAD_RV_REF(R2) v)
+ {
+
+ if (this->future_.get() == 0)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ unique_lock<boost::mutex> lk(this->future_->mutex);
+ if (! this->future_->valid(lk))
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ this->future_->wait(lk, false);
+#ifdef BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET
+ this->future_->invalidate(lk);
+#endif
+
+ if (this->future_->has_value(lk)) {
+ return this->future_->get(lk);
+ }
+ else {
+ return boost::move(v);
+ }
+ }
+
+ template <typename R2>
+ typename boost::disable_if< is_void<R2>, move_dest_type>::type
+ get_or(R2 const& v) // EXTENSION
+ {
+ if (this->future_.get() == 0)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ unique_lock<boost::mutex> lk(this->future_->mutex);
+ if (! this->future_->valid(lk))
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ this->future_->wait(lk, false);
+#ifdef BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET
+ this->future_->invalidate(lk);
+#endif
+ if (this->future_->has_value(lk)) {
+ return this->future_->get(lk);
+ }
+ else {
+ return v;
+ }
+ }
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ template<typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE)>::type>
+ then(BOOST_THREAD_FWD_REF(F) func); // EXTENSION
+ template<typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE)>::type>
+ then(launch policy, BOOST_THREAD_FWD_REF(F) func); // EXTENSION
+ #ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ template<typename Ex, typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE)>::type>
+ then(Ex& ex, BOOST_THREAD_FWD_REF(F) func); // EXTENSION
+ #endif
+
+ template <typename R2>
+ inline typename boost::disable_if< is_void<R2>, BOOST_THREAD_FUTURE<R> >::type
+ fallback_to(BOOST_THREAD_RV_REF(R2) v); // EXTENSION
+ template <typename R2>
+ inline typename boost::disable_if< is_void<R2>, BOOST_THREAD_FUTURE<R> >::type
+ fallback_to(R2 const& v); // EXTENSION
+
+#endif
+
+ };
+
+ BOOST_THREAD_DCL_MOVABLE_BEG(T) BOOST_THREAD_FUTURE<T> BOOST_THREAD_DCL_MOVABLE_END
+
+ template <typename R2>
+ class BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> > : public detail::basic_future<BOOST_THREAD_FUTURE<R2> >
+ {
+ typedef BOOST_THREAD_FUTURE<R2> R;
+
+ private:
+ typedef detail::basic_future<R> base_type;
+ typedef typename base_type::future_ptr future_ptr;
+
+ friend class shared_future<R>;
+ friend class promise<R>;
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ template <typename, typename, typename>
+ friend struct detail::future_async_continuation_shared_state;
+ template <typename, typename, typename>
+ friend struct detail::future_deferred_continuation_shared_state;
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_async_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_sync_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_deferred_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_shared_future_deferred_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_shared_future_async_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_shared_future_sync_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ #ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ template<typename Ex, typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_executor_continuation_shared_state(Ex& ex, boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template<typename Ex, typename F, typename Rp, typename Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_shared_future_executor_continuation_shared_state(Ex& ex, boost::unique_lock<boost::mutex> &lock, F f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class Rp, class Fp, class Executor>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_executor_shared_state(Executor& ex, BOOST_THREAD_FWD_REF(Fp) f);
+ #endif
+
+#endif
+#if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
+ template<typename F, typename Rp>
+ friend struct detail::future_unwrap_shared_state;
+ template <class F, class Rp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_unwrap_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f);
+#endif
+#if defined(BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY)
+ template< typename InputIterator>
+ friend typename boost::disable_if<is_future_type<InputIterator>,
+ BOOST_THREAD_FUTURE<csbl::vector<typename InputIterator::value_type> >
+ >::type
+ when_all(InputIterator first, InputIterator last);
+
+ friend inline BOOST_THREAD_FUTURE<csbl::tuple<> > when_all();
+
+ #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ friend BOOST_THREAD_FUTURE<csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> >
+ when_all(BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures);
+ #endif
+
+ template< typename InputIterator>
+ friend typename boost::disable_if<is_future_type<InputIterator>,
+ BOOST_THREAD_FUTURE<csbl::vector<typename InputIterator::value_type> >
+ >::type
+ when_any(InputIterator first, InputIterator last);
+
+ friend inline BOOST_THREAD_FUTURE<csbl::tuple<> > when_any();
+
+ #if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ friend BOOST_THREAD_FUTURE<csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> >
+ when_any(BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures);
+ #endif
+#endif // BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
+
+ #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ template <class> friend class packaged_task; // todo check if this works in windows
+ #else
+ friend class packaged_task<R>;
+ #endif
+ friend class detail::future_waiter;
+
+ template <class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_async_shared_state(BOOST_THREAD_FWD_REF(Fp) f);
+
+ template <class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_deferred_shared_state(BOOST_THREAD_FWD_REF(Fp) f);
+
+ typedef typename base_type::move_dest_type move_dest_type;
+
+ BOOST_THREAD_FUTURE(future_ptr a_future):
+ base_type(a_future)
+ {
+ }
+ public:
+
+ BOOST_THREAD_MOVABLE_ONLY(BOOST_THREAD_FUTURE)
+ typedef future_state::state state;
+ typedef R value_type; // EXTENSION
+
+ BOOST_CONSTEXPR BOOST_THREAD_FUTURE() {}
+ //BOOST_CONSTEXPR
+ BOOST_THREAD_FUTURE(exceptional_ptr const& ex):
+ base_type(ex) {}
+
+ ~BOOST_THREAD_FUTURE() {
+ }
+
+ BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT:
+ base_type(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))))
+ {
+ }
+
+ BOOST_THREAD_FUTURE& operator=(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE) other) BOOST_NOEXCEPT
+ {
+ this->base_type::operator=(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))));
+ return *this;
+ }
+
+ shared_future<R> share()
+ {
+ return shared_future<R>(::boost::move(*this));
+ }
+
+ void swap(BOOST_THREAD_FUTURE& other)
+ {
+ static_cast<base_type*>(this)->swap(other);
+ }
+
+ // todo this function must be private and friendship provided to the internal users.
+ void set_async()
+ {
+ this->future_->set_async();
+ }
+ // todo this function must be private and friendship provided to the internal users.
+ void set_deferred()
+ {
+ this->future_->set_deferred();
+ }
+ bool run_if_is_deferred() {
+ return this->future_->run_if_is_deferred();
+ }
+ bool run_if_is_deferred_or_ready() {
+ return this->future_->run_if_is_deferred_or_ready();
+ }
+ // retrieving the value
+ move_dest_type get()
+ {
+ if (this->future_.get() == 0)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ unique_lock<boost::mutex> lk(this->future_->mutex);
+ if (! this->future_->valid(lk))
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ #ifdef BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET
+ this->future_->invalidate(lk);
+ #endif
+ return this->future_->get(lk);
+ }
+ move_dest_type get_or(BOOST_THREAD_RV_REF(R) v) // EXTENSION
+ {
+ if (this->future_.get() == 0)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ unique_lock<boost::mutex> lk(this->future_->mutex);
+ if (! this->future_->valid(lk))
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ this->future_->wait(lk, false);
+ #ifdef BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET
+ this->future_->invalidate(lk);
+ #endif
+ if (this->future_->has_value(lk)) return this->future_->get(lk);
+ else return boost::move(v);
+ }
+
+ move_dest_type get_or(R const& v) // EXTENSION
+ {
+ if (this->future_.get() == 0)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ unique_lock<boost::mutex> lk(this->future_->mutex);
+ if (! this->future_->valid(lk))
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ this->future_->wait(lk, false);
+ #ifdef BOOST_THREAD_PROVIDES_FUTURE_INVALID_AFTER_GET
+ this->future_->invalidate(lk);
+ #endif
+ if (this->future_->has_value(lk)) return this->future_->get(lk);
+ else return v;
+ }
+
+
+ #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ template<typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE)>::type>
+ then(BOOST_THREAD_FWD_REF(F) func); // EXTENSION
+ template<typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE)>::type>
+ then(launch policy, BOOST_THREAD_FWD_REF(F) func); // EXTENSION
+ #ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ template<typename Ex, typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE)>::type>
+ then(Ex &ex, BOOST_THREAD_FWD_REF(F) func); // EXTENSION
+ #endif
+ #endif
+
+ #if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
+ inline
+ BOOST_THREAD_FUTURE<R2>
+ unwrap(); // EXTENSION
+ #endif
+
+ };
+
+ template <typename R>
+ class shared_future : public detail::basic_future<R>
+ {
+ typedef detail::basic_future<R> base_type;
+ typedef typename base_type::future_ptr future_ptr;
+
+ friend class detail::future_waiter;
+ friend class promise<R>;
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ template <typename, typename, typename>
+ friend struct detail::future_async_continuation_shared_state;
+ template <typename, typename, typename>
+ friend struct detail::future_deferred_continuation_shared_state;
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_async_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_sync_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+
+ template <class F, class Rp, class Fp>
+ friend BOOST_THREAD_FUTURE<Rp>
+ detail::make_future_deferred_continuation_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c);
+#endif
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ template <class> friend class packaged_task;// todo check if this works in windows
+#else
+ friend class packaged_task<R>;
+#endif
+ shared_future(future_ptr a_future):
+ base_type(a_future)
+ {}
+
+ public:
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(shared_future)
+ typedef R value_type; // EXTENSION
+
+ shared_future(shared_future const& other):
+ base_type(other.future_)
+ {}
+
+ typedef future_state::state state;
+
+ BOOST_CONSTEXPR shared_future()
+ {}
+ //BOOST_CONSTEXPR
+ shared_future(exceptional_ptr const& ex):
+ base_type(ex) {}
+ ~shared_future()
+ {}
+
+ shared_future& operator=(BOOST_THREAD_COPY_ASSIGN_REF(shared_future) other)
+ {
+ this->future_ = other.future_;
+ return *this;
+ }
+
+ shared_future(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT :
+ base_type(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))))
+ {
+ }
+ shared_future(BOOST_THREAD_RV_REF( BOOST_THREAD_FUTURE<R> ) other) BOOST_NOEXCEPT :
+ base_type(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))))
+ {
+ }
+
+ shared_future& operator=(BOOST_THREAD_RV_REF(shared_future) other) BOOST_NOEXCEPT
+ {
+ base_type::operator=(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))));
+ return *this;
+ }
+ shared_future& operator=(BOOST_THREAD_RV_REF( BOOST_THREAD_FUTURE<R> ) other) BOOST_NOEXCEPT
+ {
+ base_type::operator=(boost::move(static_cast<base_type&>(BOOST_THREAD_RV(other))));
+ return *this;
+ }
+
+ void swap(shared_future& other) BOOST_NOEXCEPT
+ {
+ static_cast<base_type*>(this)->swap(other);
+ }
+ bool run_if_is_deferred() {
+ return this->future_->run_if_is_deferred();
+ }
+ bool run_if_is_deferred_or_ready() {
+ return this->future_->run_if_is_deferred_or_ready();
+ }
+ // retrieving the value
+ typename detail::shared_state<R>::shared_future_get_result_type get() const
+ {
+ if(!this->future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ return this->future_->get_sh();
+ }
+
+ template <typename R2>
+ typename boost::disable_if< is_void<R2>, typename detail::shared_state<R>::shared_future_get_result_type>::type
+ get_or(BOOST_THREAD_RV_REF(R2) v) const // EXTENSION
+ {
+ if(!this->future_)
+ {
+ boost::throw_exception(future_uninitialized());
+ }
+ this->future_->wait();
+ if (this->future_->has_value()) return this->future_->get_sh();
+ else return boost::move(v);
+ }
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+ template<typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(shared_future)>::type>
+ then(BOOST_THREAD_FWD_REF(F) func) const; // EXTENSION
+ template<typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(shared_future)>::type>
+ then(launch policy, BOOST_THREAD_FWD_REF(F) func) const; // EXTENSION
+ #ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ template<typename Ex, typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(shared_future)>::type>
+ then(Ex& ex, BOOST_THREAD_FWD_REF(F) func) const; // EXTENSION
+ #endif
+#endif
+
+ };
+
+ BOOST_THREAD_DCL_MOVABLE_BEG(T) shared_future<T> BOOST_THREAD_DCL_MOVABLE_END
+
+ template <typename R>
+ class promise
+ {
+ typedef boost::shared_ptr<detail::shared_state<R> > future_ptr;
+
+ typedef typename detail::shared_state<R>::source_reference_type source_reference_type;
+ typedef typename detail::shared_state<R>::rvalue_source_type rvalue_source_type;
+ typedef typename detail::shared_state<R>::move_dest_type move_dest_type;
+ typedef typename detail::shared_state<R>::shared_future_get_result_type shared_future_get_result_type;
+
+ future_ptr future_;
+ bool future_obtained;
+
+ void lazy_init()
+ {
+#if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
+#include <boost/thread/detail/atomic_undef_macros.hpp>
+ if(!atomic_load(&future_))
+ {
+ future_ptr blank;
+ atomic_compare_exchange(&future_,&blank,future_ptr(new detail::shared_state<R>));
+ }
+#include <boost/thread/detail/atomic_redef_macros.hpp>
+#endif
+ }
+
+ public:
+ BOOST_THREAD_MOVABLE_ONLY(promise)
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+ template <class Allocator>
+ promise(boost::allocator_arg_t, Allocator a)
+ {
+ typedef typename Allocator::template rebind<detail::shared_state<R> >::other A2;
+ A2 a2(a);
+ typedef thread_detail::allocator_destructor<A2> D;
+
+ future_ = future_ptr(::new(a2.allocate(1)) detail::shared_state<R>(), D(a2, 1) );
+ future_obtained = false;
+ }
+#endif
+ promise():
+#if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
+ future_(),
+#else
+ future_(new detail::shared_state<R>()),
+#endif
+ future_obtained(false)
+ {}
+
+ ~promise()
+ {
+ if(future_)
+ {
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+
+ if(!future_->done && !future_->is_constructed)
+ {
+ future_->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()), lock);
+ }
+ }
+ }
+
+ // Assignment
+ promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT :
+ future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained)
+ {
+ BOOST_THREAD_RV(rhs).future_.reset();
+ BOOST_THREAD_RV(rhs).future_obtained=false;
+ }
+ promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT
+ {
+ future_=BOOST_THREAD_RV(rhs).future_;
+ future_obtained=BOOST_THREAD_RV(rhs).future_obtained;
+ BOOST_THREAD_RV(rhs).future_.reset();
+ BOOST_THREAD_RV(rhs).future_obtained=false;
+ return *this;
+ }
+
+ void swap(promise& other)
+ {
+ future_.swap(other.future_);
+ std::swap(future_obtained,other.future_obtained);
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ void set_executor(executor_ptr_type aex)
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ boost::lock_guard<boost::mutex> lk(future_->mutex);
+ future_->set_executor_policy(aex, lk);
+ }
+#endif
+ // Result retrieval
+ BOOST_THREAD_FUTURE<R> get_future()
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ if (future_obtained)
+ {
+ boost::throw_exception(future_already_retrieved());
+ }
+ future_obtained=true;
+ return BOOST_THREAD_FUTURE<R>(future_);
+ }
+
+#if defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class TR>
+ typename boost::enable_if_c<is_copy_constructible<TR>::value && is_same<R, TR>::value, void>::type
+ set_value(TR const & r)
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->mark_finished_with_result_internal(r, lock);
+ }
+#else
+ void set_value(source_reference_type r)
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->mark_finished_with_result_internal(r, lock);
+ }
+#endif
+
+ void set_value(rvalue_source_type r)
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ future_->mark_finished_with_result_internal(boost::move(r), lock);
+#else
+ future_->mark_finished_with_result_internal(static_cast<rvalue_source_type>(r), lock);
+#endif
+ }
+
+#if defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class TR>
+ typename boost::enable_if_c<is_copy_constructible<TR>::value && is_same<R, TR>::value, void>::type
+ set_value_deferred(TR const & r)
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_value_deferred(r);
+ }
+#else
+ void set_value_deferred(source_reference_type r)
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_value_deferred(r);
+ }
+#endif
+
+ void set_value_deferred(rvalue_source_type r)
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ future_->set_value_deferred(boost::move(r));
+#else
+ future_->set_value_deferred(static_cast<rvalue_source_type>(r));
+#endif
+ }
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <class ...Args>
+ void emplace(BOOST_THREAD_FWD_REF(Args) ...args)
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->mark_finished_with_result_internal(lock, boost::forward<Args>(args)...);
+ }
+
+#endif
+
+ void set_exception(boost::exception_ptr p)
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->mark_exceptional_finish_internal(p, lock);
+ }
+ template <typename E>
+ void set_exception(E ex)
+ {
+ set_exception(boost::copy_exception(ex));
+ }
+ void set_exception_deferred(boost::exception_ptr p)
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_exception_deferred(p);
+ }
+ template <typename E>
+ void set_exception_deferred(E ex)
+ {
+ set_exception_deferred(boost::copy_exception(ex));
+ }
+
+ // setting the result with deferred notification
+#if defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class TR>
+ typename boost::enable_if_c<is_copy_constructible<TR>::value && is_same<R, TR>::value, void>::type set_value_at_thread_exit(TR const& r)
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_value_at_thread_exit(r);
+ }
+#else
+ void set_value_at_thread_exit(source_reference_type r)
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_value_at_thread_exit(r);
+ }
+#endif
+ void set_value_at_thread_exit(BOOST_THREAD_RV_REF(R) r)
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_value_at_thread_exit(boost::move(r));
+ }
+ void set_exception_at_thread_exit(exception_ptr e)
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_exception_at_thread_exit(e);
+ }
+ template <typename E>
+ void set_exception_at_thread_exit(E ex)
+ {
+ set_exception_at_thread_exit(boost::copy_exception(ex));
+ }
+
+ template<typename F>
+ void set_wait_callback(F f)
+ {
+ lazy_init();
+ future_->set_wait_callback(f,this);
+ }
+ void notify_deferred()
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->notify_deferred();
+ }
+
+ };
+
+ template <typename R>
+ class promise<R&>
+ {
+ typedef boost::shared_ptr<detail::shared_state<R&> > future_ptr;
+
+ future_ptr future_;
+ bool future_obtained;
+
+ void lazy_init()
+ {
+#if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
+#include <boost/thread/detail/atomic_undef_macros.hpp>
+ if(!atomic_load(&future_))
+ {
+ future_ptr blank;
+ atomic_compare_exchange(&future_,&blank,future_ptr(new detail::shared_state<R&>));
+ }
+#include <boost/thread/detail/atomic_redef_macros.hpp>
+#endif
+ }
+
+ public:
+ BOOST_THREAD_MOVABLE_ONLY(promise)
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+ template <class Allocator>
+ promise(boost::allocator_arg_t, Allocator a)
+ {
+ typedef typename Allocator::template rebind<detail::shared_state<R&> >::other A2;
+ A2 a2(a);
+ typedef thread_detail::allocator_destructor<A2> D;
+
+ future_ = future_ptr(::new(a2.allocate(1)) detail::shared_state<R&>(), D(a2, 1) );
+ future_obtained = false;
+ }
+#endif
+ promise():
+#if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
+ future_(),
+#else
+ future_(new detail::shared_state<R&>()),
+#endif
+ future_obtained(false)
+ {}
+
+ ~promise()
+ {
+ if(future_)
+ {
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+
+ if(!future_->done && !future_->is_constructed)
+ {
+ future_->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()), lock);
+ }
+ }
+ }
+
+ // Assignment
+ promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT :
+ future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained)
+ {
+ BOOST_THREAD_RV(rhs).future_.reset();
+ BOOST_THREAD_RV(rhs).future_obtained=false;
+ }
+ promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT
+ {
+ future_=BOOST_THREAD_RV(rhs).future_;
+ future_obtained=BOOST_THREAD_RV(rhs).future_obtained;
+ BOOST_THREAD_RV(rhs).future_.reset();
+ BOOST_THREAD_RV(rhs).future_obtained=false;
+ return *this;
+ }
+
+ void swap(promise& other)
+ {
+ future_.swap(other.future_);
+ std::swap(future_obtained,other.future_obtained);
+ }
+
+ // Result retrieval
+ BOOST_THREAD_FUTURE<R&> get_future()
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ if (future_obtained)
+ {
+ boost::throw_exception(future_already_retrieved());
+ }
+ future_obtained=true;
+ return BOOST_THREAD_FUTURE<R&>(future_);
+ }
+
+ void set_value(R& r)
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->mark_finished_with_result_internal(r, lock);
+ }
+ void set_value_deferred(R& r)
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->set_value_deferred(r);
+ }
+ void set_exception(boost::exception_ptr p)
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->mark_exceptional_finish_internal(p, lock);
+ }
+ template <typename E>
+ void set_exception(E ex)
+ {
+ set_exception(boost::copy_exception(ex));
+ }
+ void set_exception_deferred(boost::exception_ptr p)
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_exception_deferred(p);
+ }
+ template <typename E>
+ void set_exception_deferred(E ex)
+ {
+ set_exception_deferred(boost::copy_exception(ex));
+ }
+ // setting the result with deferred notification
+ void set_value_at_thread_exit(R& r)
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_value_at_thread_exit(r);
+ }
+
+ void set_exception_at_thread_exit(exception_ptr e)
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_exception_at_thread_exit(e);
+ }
+ template <typename E>
+ void set_exception_at_thread_exit(E ex)
+ {
+ set_exception_at_thread_exit(boost::copy_exception(ex));
+ }
+
+ template<typename F>
+ void set_wait_callback(F f)
+ {
+ lazy_init();
+ future_->set_wait_callback(f,this);
+ }
+ void notify_deferred()
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->notify_deferred();
+ }
+ };
+
+ template <>
+ class promise<void>
+ {
+ typedef boost::shared_ptr<detail::shared_state<void> > future_ptr;
+
+ future_ptr future_;
+ bool future_obtained;
+
+ void lazy_init()
+ {
+#if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
+ if(!atomic_load(&future_))
+ {
+ future_ptr blank;
+ atomic_compare_exchange(&future_,&blank,future_ptr(new detail::shared_state<void>));
+ }
+#endif
+ }
+ public:
+ BOOST_THREAD_MOVABLE_ONLY(promise)
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+ template <class Allocator>
+ promise(boost::allocator_arg_t, Allocator a)
+ {
+ typedef typename Allocator::template rebind<detail::shared_state<void> >::other A2;
+ A2 a2(a);
+ typedef thread_detail::allocator_destructor<A2> D;
+
+ future_ = future_ptr(::new(a2.allocate(1)) detail::shared_state<void>(), D(a2, 1) );
+ future_obtained = false;
+ }
+#endif
+ promise():
+#if defined BOOST_THREAD_PROVIDES_PROMISE_LAZY
+ future_(),
+#else
+ future_(new detail::shared_state<void>),
+#endif
+ future_obtained(false)
+ {}
+
+ ~promise()
+ {
+ if(future_)
+ {
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+
+ if(!future_->done && !future_->is_constructed)
+ {
+ future_->mark_exceptional_finish_internal(boost::copy_exception(broken_promise()), lock);
+ }
+ }
+ }
+
+ // Assignment
+ promise(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT :
+ future_(BOOST_THREAD_RV(rhs).future_),future_obtained(BOOST_THREAD_RV(rhs).future_obtained)
+ {
+ // we need to release the future as shared_ptr doesn't implements move semantics
+ BOOST_THREAD_RV(rhs).future_.reset();
+ BOOST_THREAD_RV(rhs).future_obtained=false;
+ }
+
+ promise & operator=(BOOST_THREAD_RV_REF(promise) rhs) BOOST_NOEXCEPT
+ {
+ future_=BOOST_THREAD_RV(rhs).future_;
+ future_obtained=BOOST_THREAD_RV(rhs).future_obtained;
+ BOOST_THREAD_RV(rhs).future_.reset();
+ BOOST_THREAD_RV(rhs).future_obtained=false;
+ return *this;
+ }
+
+ void swap(promise& other)
+ {
+ future_.swap(other.future_);
+ std::swap(future_obtained,other.future_obtained);
+ }
+
+ // Result retrieval
+ BOOST_THREAD_FUTURE<void> get_future()
+ {
+ lazy_init();
+
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ if(future_obtained)
+ {
+ boost::throw_exception(future_already_retrieved());
+ }
+ future_obtained=true;
+ //return BOOST_THREAD_MAKE_RV_REF(BOOST_THREAD_FUTURE<void>(future_));
+ return BOOST_THREAD_FUTURE<void>(future_);
+ }
+
+ void set_value()
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->mark_finished_with_result_internal(lock);
+ }
+ void set_value_deferred()
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_value_deferred();
+ }
+
+ void set_exception(boost::exception_ptr p)
+ {
+ lazy_init();
+ boost::unique_lock<boost::mutex> lock(future_->mutex);
+ if(future_->done)
+ {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ future_->mark_exceptional_finish_internal(p,lock);
+ }
+ template <typename E>
+ void set_exception(E ex)
+ {
+ set_exception(boost::copy_exception(ex));
+ }
+ void set_exception_deferred(boost::exception_ptr p)
+ {
+ lazy_init();
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_exception_deferred(p);
+ }
+ template <typename E>
+ void set_exception_deferred(E ex)
+ {
+ set_exception_deferred(boost::copy_exception(ex));
+ }
+ // setting the result with deferred notification
+ void set_value_at_thread_exit()
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_value_at_thread_exit();
+ }
+
+ void set_exception_at_thread_exit(exception_ptr e)
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->set_exception_at_thread_exit(e);
+ }
+ template <typename E>
+ void set_exception_at_thread_exit(E ex)
+ {
+ set_exception_at_thread_exit(boost::copy_exception(ex));
+ }
+
+ template<typename F>
+ void set_wait_callback(F f)
+ {
+ lazy_init();
+ future_->set_wait_callback(f,this);
+ }
+ void notify_deferred()
+ {
+ if (future_.get()==0)
+ {
+ boost::throw_exception(promise_moved());
+ }
+ future_->notify_deferred();
+ }
+ };
+}
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+namespace boost { namespace container {
+ template <class R, class Alloc>
+ struct uses_allocator< ::boost::promise<R> , Alloc> : true_type
+ {
+ };
+}}
+#if ! defined BOOST_NO_CXX11_ALLOCATOR
+namespace std {
+ template <class R, class Alloc>
+ struct uses_allocator< ::boost::promise<R> , Alloc> : true_type
+ {
+ };
+}
+#endif
+#endif
+
+namespace boost
+{
+
+ BOOST_THREAD_DCL_MOVABLE_BEG(T) promise<T> BOOST_THREAD_DCL_MOVABLE_END
+
+ namespace detail
+ {
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ template<typename R>
+ struct task_base_shared_state;
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename R, typename ...ArgTypes>
+ struct task_base_shared_state<R(ArgTypes...)>:
+#else
+ template<typename R>
+ struct task_base_shared_state<R()>:
+#endif
+#else
+ template<typename R>
+ struct task_base_shared_state:
+#endif
+ detail::shared_state<R>
+ {
+ bool started;
+
+ task_base_shared_state():
+ started(false)
+ {}
+
+ void reset()
+ {
+ // todo The packaged_task::reset must be as if an assignemnt froma new packaged_task with the same function
+ // the reset function is an optimization that avoids reallocating a new task.
+ started=false;
+ this->validate();
+ }
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ virtual void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args)=0;
+ void run(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+#else
+ virtual void do_run()=0;
+ void run()
+#endif
+ {
+ {
+ boost::lock_guard<boost::mutex> lk(this->mutex);
+ if(started)
+ {
+ boost::throw_exception(task_already_started());
+ }
+ started=true;
+ }
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ do_run(boost::move(args)...);
+#else
+ do_run();
+#endif
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ virtual void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)=0;
+ void apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+#else
+ virtual void do_apply()=0;
+ void apply()
+#endif
+ {
+ {
+ boost::lock_guard<boost::mutex> lk(this->mutex);
+ if(started)
+ {
+ boost::throw_exception(task_already_started());
+ }
+ started=true;
+ }
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ do_apply(boost::move(args)...);
+#else
+ do_apply();
+#endif
+ }
+
+ void owner_destroyed()
+ {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ if(!started)
+ {
+ started=true;
+ this->mark_exceptional_finish_internal(boost::copy_exception(boost::broken_promise()), lk);
+ }
+ }
+ };
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ template<typename F, typename R>
+ struct task_shared_state;
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename F, typename R, typename ...ArgTypes>
+ struct task_shared_state<F, R(ArgTypes...)>:
+ task_base_shared_state<R(ArgTypes...)>
+#else
+ template<typename F, typename R>
+ struct task_shared_state<F, R()>:
+ task_base_shared_state<R()>
+#endif
+#else
+ template<typename F, typename R>
+ struct task_shared_state:
+ task_base_shared_state<R>
+#endif
+ {
+ private:
+ task_shared_state(task_shared_state&);
+ public:
+ F f;
+ task_shared_state(F const& f_):
+ f(f_)
+ {}
+ task_shared_state(BOOST_THREAD_RV_REF(F) f_):
+ f(boost::move(f_))
+ {}
+
+ F callable()
+ {
+ return boost::move(f);
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ this->set_value_at_thread_exit(f(boost::move(args)...));
+ }
+#else
+ void do_apply()
+ {
+ try
+ {
+ this->set_value_at_thread_exit(f());
+ }
+#endif
+ catch(...)
+ {
+ this->set_exception_at_thread_exit(current_exception());
+ }
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ this->mark_finished_with_result(f(boost::move(args)...));
+ }
+#else
+ void do_run()
+ {
+ try
+ {
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ R res((f()));
+ this->mark_finished_with_result(boost::move(res));
+#else
+ this->mark_finished_with_result(f());
+#endif
+ }
+#endif
+ catch(...)
+ {
+ this->mark_exceptional_finish();
+ }
+ }
+ };
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename F, typename R, typename ...ArgTypes>
+ struct task_shared_state<F, R&(ArgTypes...)>:
+ task_base_shared_state<R&(ArgTypes...)>
+#else
+ template<typename F, typename R>
+ struct task_shared_state<F, R&()>:
+ task_base_shared_state<R&()>
+#endif
+#else
+ template<typename F, typename R>
+ struct task_shared_state<F,R&>:
+ task_base_shared_state<R&>
+#endif
+ {
+ private:
+ task_shared_state(task_shared_state&);
+ public:
+ F f;
+ task_shared_state(F const& f_):
+ f(f_)
+ {}
+ task_shared_state(BOOST_THREAD_RV_REF(F) f_):
+ f(boost::move(f_))
+ {}
+
+ F callable()
+ {
+ return f;
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ this->set_value_at_thread_exit(f(boost::move(args)...));
+ }
+#else
+ void do_apply()
+ {
+ try
+ {
+ this->set_value_at_thread_exit(f());
+ }
+#endif
+ catch(...)
+ {
+ this->set_exception_at_thread_exit(current_exception());
+ }
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ this->mark_finished_with_result(f(boost::move(args)...));
+ }
+#else
+ void do_run()
+ {
+ try
+ {
+ R& res((f()));
+ this->mark_finished_with_result(res);
+ }
+#endif
+ catch(...)
+ {
+ this->mark_exceptional_finish();
+ }
+ }
+ };
+
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR)
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename R, typename ...ArgTypes>
+ struct task_shared_state<R (*)(ArgTypes...), R(ArgTypes...)>:
+ task_base_shared_state<R(ArgTypes...)>
+#else
+ template<typename R>
+ struct task_shared_state<R (*)(), R()>:
+ task_base_shared_state<R()>
+#endif
+#else
+ template<typename R>
+ struct task_shared_state<R (*)(), R> :
+ task_base_shared_state<R>
+#endif
+ {
+ private:
+ task_shared_state(task_shared_state&);
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef R (*CallableType)(ArgTypes ... );
+#else
+ typedef R (*CallableType)();
+#endif
+ public:
+ CallableType f;
+ task_shared_state(CallableType f_):
+ f(f_)
+ {}
+
+ CallableType callable()
+ {
+ return f;
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ this->set_value_at_thread_exit(f(boost::move(args)...));
+ }
+#else
+ void do_apply()
+ {
+ try
+ {
+ R r((f()));
+ this->set_value_at_thread_exit(boost::move(r));
+ }
+#endif
+ catch(...)
+ {
+ this->set_exception_at_thread_exit(current_exception());
+ }
+ }
+
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ this->mark_finished_with_result(f(boost::move(args)...));
+ }
+#else
+ void do_run()
+ {
+ try
+ {
+ R res((f()));
+ this->mark_finished_with_result(boost::move(res));
+ }
+#endif
+ catch(...)
+ {
+ this->mark_exceptional_finish();
+ }
+ }
+ };
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename R, typename ...ArgTypes>
+ struct task_shared_state<R& (*)(ArgTypes...), R&(ArgTypes...)>:
+ task_base_shared_state<R&(ArgTypes...)>
+#else
+ template<typename R>
+ struct task_shared_state<R& (*)(), R&()>:
+ task_base_shared_state<R&()>
+#endif
+#else
+ template<typename R>
+ struct task_shared_state<R& (*)(), R&> :
+ task_base_shared_state<R&>
+#endif
+ {
+ private:
+ task_shared_state(task_shared_state&);
+ public:
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef R& (*CallableType)(BOOST_THREAD_RV_REF(ArgTypes) ... );
+#else
+ typedef R& (*CallableType)();
+#endif
+ CallableType f;
+ task_shared_state(CallableType f_):
+ f(f_)
+ {}
+
+ CallableType callable()
+ {
+ return boost::move(f);
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ this->set_value_at_thread_exit(f(boost::move(args)...));
+ }
+#else
+ void do_apply()
+ {
+ try
+ {
+ this->set_value_at_thread_exit(f());
+ }
+#endif
+ catch(...)
+ {
+ this->set_exception_at_thread_exit(current_exception());
+ }
+ }
+
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ this->mark_finished_with_result(f(boost::move(args)...));
+ }
+#else
+ void do_run()
+ {
+ try
+ {
+ this->mark_finished_with_result(f());
+ }
+#endif
+ catch(...)
+ {
+ this->mark_exceptional_finish();
+ }
+ }
+ };
+#endif
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename F, typename ...ArgTypes>
+ struct task_shared_state<F, void(ArgTypes...)>:
+ task_base_shared_state<void(ArgTypes...)>
+#else
+ template<typename F>
+ struct task_shared_state<F, void()>:
+ task_base_shared_state<void()>
+#endif
+#else
+ template<typename F>
+ struct task_shared_state<F,void>:
+ task_base_shared_state<void>
+#endif
+ {
+ private:
+ task_shared_state(task_shared_state&);
+ public:
+ typedef F CallableType;
+ F f;
+ task_shared_state(F const& f_):
+ f(f_)
+ {}
+ task_shared_state(BOOST_THREAD_RV_REF(F) f_):
+ f(boost::move(f_))
+ {}
+ F callable()
+ {
+ return boost::move(f);
+ }
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ f(boost::move(args)...);
+#else
+ void do_apply()
+ {
+ try
+ {
+ f();
+#endif
+ this->set_value_at_thread_exit();
+ }
+ catch(...)
+ {
+ this->set_exception_at_thread_exit(current_exception());
+ }
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ f(boost::move(args)...);
+#else
+ void do_run()
+ {
+ try
+ {
+ f();
+#endif
+ this->mark_finished_with_result();
+ }
+ catch(...)
+ {
+ this->mark_exceptional_finish();
+ }
+ }
+ };
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename ...ArgTypes>
+ struct task_shared_state<void (*)(ArgTypes...), void(ArgTypes...)>:
+ task_base_shared_state<void(ArgTypes...)>
+#else
+ template<>
+ struct task_shared_state<void (*)(), void()>:
+ task_base_shared_state<void()>
+#endif
+#else
+ template<>
+ struct task_shared_state<void (*)(),void>:
+ task_base_shared_state<void>
+#endif
+ {
+ private:
+ task_shared_state(task_shared_state&);
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef void (*CallableType)(ArgTypes...);
+#else
+ typedef void (*CallableType)();
+#endif
+ public:
+ CallableType f;
+ task_shared_state(CallableType f_):
+ f(f_)
+ {}
+ CallableType callable()
+ {
+ return f;
+ }
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_apply(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ f(boost::move(args)...);
+#else
+ void do_apply()
+ {
+ try
+ {
+ f();
+#endif
+ this->set_value_at_thread_exit();
+ }
+ catch(...)
+ {
+ this->set_exception_at_thread_exit(current_exception());
+ }
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void do_run(BOOST_THREAD_RV_REF(ArgTypes) ... args)
+ {
+ try
+ {
+ f(boost::move(args)...);
+#else
+ void do_run()
+ {
+ try
+ {
+ f();
+#endif
+ this->mark_finished_with_result();
+ }
+ catch(...)
+ {
+ this->mark_exceptional_finish();
+ }
+ }
+ };
+ }
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template<typename R, typename ...ArgTypes>
+ class packaged_task<R(ArgTypes...)>
+ {
+ typedef boost::shared_ptr<detail::task_base_shared_state<R(ArgTypes...)> > task_ptr;
+ boost::shared_ptr<detail::task_base_shared_state<R(ArgTypes...)> > task;
+ #else
+ template<typename R>
+ class packaged_task<R()>
+ {
+ typedef boost::shared_ptr<detail::task_base_shared_state<R()> > task_ptr;
+ boost::shared_ptr<detail::task_base_shared_state<R()> > task;
+ #endif
+#else
+ template<typename R>
+ class packaged_task
+ {
+ typedef boost::shared_ptr<detail::task_base_shared_state<R> > task_ptr;
+ boost::shared_ptr<detail::task_base_shared_state<R> > task;
+#endif
+ bool future_obtained;
+ struct dummy;
+
+ public:
+ typedef R result_type;
+ BOOST_THREAD_MOVABLE_ONLY(packaged_task)
+
+ packaged_task():
+ future_obtained(false)
+ {}
+
+ // construction and destruction
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR)
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ explicit packaged_task(R(*f)(), BOOST_THREAD_FWD_REF(ArgTypes)... args)
+ {
+ typedef R(*FR)(BOOST_THREAD_FWD_REF(ArgTypes)...);
+ typedef detail::task_shared_state<FR,R(ArgTypes...)> task_shared_state_type;
+ task= task_ptr(new task_shared_state_type(f, boost::move(args)...));
+ future_obtained=false;
+ }
+ #else
+ explicit packaged_task(R(*f)())
+ {
+ typedef R(*FR)();
+ typedef detail::task_shared_state<FR,R()> task_shared_state_type;
+ task= task_ptr(new task_shared_state_type(f));
+ future_obtained=false;
+ }
+ #endif
+#else
+ explicit packaged_task(R(*f)())
+ {
+ typedef R(*FR)();
+ typedef detail::task_shared_state<FR,R> task_shared_state_type;
+ task= task_ptr(new task_shared_state_type(f));
+ future_obtained=false;
+ }
+#endif
+#endif
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class F>
+ explicit packaged_task(BOOST_THREAD_FWD_REF(F) f
+ , typename boost::disable_if<is_same<typename decay<F>::type, packaged_task>, dummy* >::type=0
+ )
+ {
+ typedef typename decay<F>::type FR;
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef detail::task_shared_state<FR,R(ArgTypes...)> task_shared_state_type;
+ #else
+ typedef detail::task_shared_state<FR,R()> task_shared_state_type;
+ #endif
+#else
+ typedef detail::task_shared_state<FR,R> task_shared_state_type;
+#endif
+ task = task_ptr(new task_shared_state_type(boost::forward<F>(f)));
+ future_obtained = false;
+
+ }
+
+#else
+ template <class F>
+ explicit packaged_task(F const& f
+ , typename boost::disable_if<is_same<typename decay<F>::type, packaged_task>, dummy* >::type=0
+ )
+ {
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef detail::task_shared_state<F,R(ArgTypes...)> task_shared_state_type;
+ #else
+ typedef detail::task_shared_state<F,R()> task_shared_state_type;
+ #endif
+#else
+ typedef detail::task_shared_state<F,R> task_shared_state_type;
+#endif
+ task = task_ptr(new task_shared_state_type(f));
+ future_obtained=false;
+ }
+ template <class F>
+ explicit packaged_task(BOOST_THREAD_RV_REF(F) f)
+ {
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef detail::task_shared_state<F,R(ArgTypes...)> task_shared_state_type;
+ task = task_ptr(new task_shared_state_type(boost::move(f)));
+#else
+ typedef detail::task_shared_state<F,R()> task_shared_state_type;
+ task = task_ptr(new task_shared_state_type(boost::move(f)));
+#endif
+#else
+ typedef detail::task_shared_state<F,R> task_shared_state_type;
+ task = task_ptr(new task_shared_state_type(boost::move(f)));
+#endif
+ future_obtained=false;
+
+ }
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR)
+ template <class Allocator>
+ packaged_task(boost::allocator_arg_t, Allocator a, R(*f)())
+ {
+ typedef R(*FR)();
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef detail::task_shared_state<FR,R(ArgTypes...)> task_shared_state_type;
+ #else
+ typedef detail::task_shared_state<FR,R()> task_shared_state_type;
+ #endif
+#else
+ typedef detail::task_shared_state<FR,R> task_shared_state_type;
+#endif
+ typedef typename Allocator::template rebind<task_shared_state_type>::other A2;
+ A2 a2(a);
+ typedef thread_detail::allocator_destructor<A2> D;
+
+ task = task_ptr(::new(a2.allocate(1)) task_shared_state_type(f), D(a2, 1) );
+ future_obtained = false;
+ }
+#endif // BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR
+
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class F, class Allocator>
+ packaged_task(boost::allocator_arg_t, Allocator a, BOOST_THREAD_FWD_REF(F) f)
+ {
+ typedef typename decay<F>::type FR;
+
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef detail::task_shared_state<FR,R(ArgTypes...)> task_shared_state_type;
+ #else
+ typedef detail::task_shared_state<FR,R()> task_shared_state_type;
+ #endif
+#else
+ typedef detail::task_shared_state<FR,R> task_shared_state_type;
+#endif
+ typedef typename Allocator::template rebind<task_shared_state_type>::other A2;
+ A2 a2(a);
+ typedef thread_detail::allocator_destructor<A2> D;
+
+ task = task_ptr(::new(a2.allocate(1)) task_shared_state_type(boost::forward<F>(f)), D(a2, 1) );
+ future_obtained = false;
+ }
+#else // ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ template <class F, class Allocator>
+ packaged_task(boost::allocator_arg_t, Allocator a, const F& f)
+ {
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef detail::task_shared_state<F,R(ArgTypes...)> task_shared_state_type;
+ #else
+ typedef detail::task_shared_state<F,R()> task_shared_state_type;
+ #endif
+#else
+ typedef detail::task_shared_state<F,R> task_shared_state_type;
+#endif
+ typedef typename Allocator::template rebind<task_shared_state_type>::other A2;
+ A2 a2(a);
+ typedef thread_detail::allocator_destructor<A2> D;
+
+ task = task_ptr(::new(a2.allocate(1)) task_shared_state_type(f), D(a2, 1) );
+ future_obtained = false;
+ }
+ template <class F, class Allocator>
+ packaged_task(boost::allocator_arg_t, Allocator a, BOOST_THREAD_RV_REF(F) f)
+ {
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ typedef detail::task_shared_state<F,R(ArgTypes...)> task_shared_state_type;
+ #else
+ typedef detail::task_shared_state<F,R()> task_shared_state_type;
+ #endif
+#else
+ typedef detail::task_shared_state<F,R> task_shared_state_type;
+#endif
+ typedef typename Allocator::template rebind<task_shared_state_type>::other A2;
+ A2 a2(a);
+ typedef thread_detail::allocator_destructor<A2> D;
+
+ task = task_ptr(::new(a2.allocate(1)) task_shared_state_type(boost::move(f)), D(a2, 1) );
+ future_obtained = false;
+ }
+
+#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
+#endif // BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+
+ ~packaged_task() {
+ if(task) {
+ task->owner_destroyed();
+ }
+ }
+
+ // assignment
+ packaged_task(BOOST_THREAD_RV_REF(packaged_task) other) BOOST_NOEXCEPT
+ : future_obtained(BOOST_THREAD_RV(other).future_obtained) {
+ task.swap(BOOST_THREAD_RV(other).task);
+ BOOST_THREAD_RV(other).future_obtained=false;
+ }
+ packaged_task& operator=(BOOST_THREAD_RV_REF(packaged_task) other) BOOST_NOEXCEPT {
+
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ packaged_task temp(boost::move(other));
+#else
+ packaged_task temp(static_cast<BOOST_THREAD_RV_REF(packaged_task)>(other));
+#endif
+ swap(temp);
+ return *this;
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ void set_executor(executor_ptr_type aex)
+ {
+ if (!valid())
+ boost::throw_exception(task_moved());
+ boost::lock_guard<boost::mutex> lk(task->mutex);
+ task->set_executor_policy(aex, lk);
+ }
+#endif
+ void reset() {
+ if (!valid())
+ boost::throw_exception(future_error(system::make_error_code(future_errc::no_state)));
+
+ // As if *this = packaged_task(task->callable());
+
+ task->reset();
+ future_obtained=false;
+ }
+
+ void swap(packaged_task& other) BOOST_NOEXCEPT {
+ task.swap(other.task);
+ std::swap(future_obtained,other.future_obtained);
+ }
+ bool valid() const BOOST_NOEXCEPT {
+ return task.get()!=0;
+ }
+
+ // result retrieval
+ BOOST_THREAD_FUTURE<R> get_future() {
+ if(!task) {
+ boost::throw_exception(task_moved());
+ } else if(!future_obtained) {
+ future_obtained=true;
+ return BOOST_THREAD_FUTURE<R>(task);
+ } else {
+ boost::throw_exception(future_already_retrieved());
+ }
+ }
+
+ // execution
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ void operator()(ArgTypes... args) {
+ if(!task) {
+ boost::throw_exception(task_moved());
+ }
+ task->run(boost::move(args)...);
+ }
+ void make_ready_at_thread_exit(ArgTypes... args) {
+ if(!task) {
+ boost::throw_exception(task_moved());
+ }
+ if (task->has_value()) {
+ boost::throw_exception(promise_already_satisfied());
+ }
+ task->apply(boost::move(args)...);
+ }
+#else
+ void operator()() {
+ if(!task) {
+ boost::throw_exception(task_moved());
+ }
+ task->run();
+ }
+ void make_ready_at_thread_exit() {
+ if(!task) {
+ boost::throw_exception(task_moved());
+ }
+ if (task->has_value()) boost::throw_exception(promise_already_satisfied());
+ task->apply();
+ }
+#endif
+ template<typename F>
+ void set_wait_callback(F f) {
+ task->set_wait_callback(f,this);
+ }
+ };
+}
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
+namespace boost { namespace container {
+ template <class R, class Alloc>
+ struct uses_allocator< ::boost::packaged_task<R> , Alloc> : true_type
+ {};
+}}
+#if ! defined BOOST_NO_CXX11_ALLOCATOR
+namespace std {
+ template <class R, class Alloc>
+ struct uses_allocator< ::boost::packaged_task<R> , Alloc> : true_type
+ {};
+}
+#endif
+#endif
+
+namespace boost
+{
+ BOOST_THREAD_DCL_MOVABLE_BEG(T) packaged_task<T> BOOST_THREAD_DCL_MOVABLE_END
+
+namespace detail
+{
+ ////////////////////////////////
+ // make_future_deferred_shared_state
+ ////////////////////////////////
+ template <class Rp, class Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_deferred_shared_state(BOOST_THREAD_FWD_REF(Fp) f) {
+ shared_ptr<future_deferred_shared_state<Rp, Fp> >
+ h(new future_deferred_shared_state<Rp, Fp>(boost::forward<Fp>(f)));
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+
+ ////////////////////////////////
+ // make_future_async_shared_state
+ ////////////////////////////////
+ template <class Rp, class Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_async_shared_state(BOOST_THREAD_FWD_REF(Fp) f) {
+ shared_ptr<future_async_shared_state<Rp, Fp> >
+ h(new future_async_shared_state<Rp, Fp>());
+ h->init(boost::forward<Fp>(f));
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+}
+
+ ////////////////////////////////
+ // template <class F, class... ArgTypes>
+ // future<R> async(launch policy, F&&, ArgTypes&&...);
+ ////////////////////////////////
+
+#if defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR
+
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template <class R, class... ArgTypes>
+ BOOST_THREAD_FUTURE<R>
+ async(launch policy, R(*f)(BOOST_THREAD_FWD_REF(ArgTypes)...), BOOST_THREAD_FWD_REF(ArgTypes)... args) {
+ typedef R(*F)(BOOST_THREAD_FWD_REF(ArgTypes)...);
+ typedef detail::invoker<typename decay<F>::type, typename decay<ArgTypes>::type...> BF;
+ typedef typename BF::result_type Rp;
+
+ if (underlying_cast<int>(policy) & int(launch::async)) {
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_async_shared_state<Rp>(
+ BF(
+ f
+ , thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ )
+ ));
+ } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_deferred_shared_state<Rp>(
+ BF(
+ f
+ , thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ )
+ ));
+ } else {
+ std::terminate();
+ //BOOST_THREAD_FUTURE<R> ret;
+ //return ::boost::move(ret);
+ }
+ }
+
+#else // defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+
+ template <class R>
+ BOOST_THREAD_FUTURE<R>
+ async(launch policy, R(*f)()) {
+ #if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ typedef packaged_task<R()> packaged_task_type;
+ #else
+ typedef packaged_task<R> packaged_task_type;
+ #endif
+
+ if (underlying_cast<int>(policy) & int(launch::async)) {
+ packaged_task_type pt( f );
+ BOOST_THREAD_FUTURE<R> ret = BOOST_THREAD_MAKE_RV_REF(pt.get_future());
+ ret.set_async();
+ boost::thread( boost::move(pt) ).detach();
+ return ::boost::move(ret);
+ } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ std::terminate();
+ //BOOST_THREAD_FUTURE<R> ret;
+ //return ::boost::move(ret);
+ } else {
+ std::terminate();
+ //BOOST_THREAD_FUTURE<R> ret;
+ //return ::boost::move(ret);
+ }
+ }
+#endif
+#endif // defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR)
+
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+
+ template <class F, class ...ArgTypes>
+ BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type(
+ typename decay<ArgTypes>::type...
+ )>::type>
+ async(launch policy, BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(ArgTypes)... args) {
+ typedef detail::invoker<typename decay<F>::type, typename decay<ArgTypes>::type...> BF;
+ typedef typename BF::result_type Rp;
+
+ if (underlying_cast<int>(policy) & int(launch::async)) {
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_async_shared_state<Rp>(
+ BF(
+ thread_detail::decay_copy(boost::forward<F>(f))
+ , thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ )
+ ));
+ } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_deferred_shared_state<Rp>(
+ BF(
+ thread_detail::decay_copy(boost::forward<F>(f))
+ , thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ )
+ ));
+ } else {
+ std::terminate();
+ //BOOST_THREAD_FUTURE<R> ret;
+ //return ::boost::move(ret);
+ }
+ }
+
+#else // defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+
+ template <class F>
+ BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type()>::type>
+ async(launch policy, BOOST_THREAD_FWD_REF(F) f) {
+ typedef typename boost::result_of<typename decay<F>::type()>::type R;
+#if defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ typedef packaged_task<R()> packaged_task_type;
+#else // defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+ typedef packaged_task<R> packaged_task_type;
+#endif // defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK
+
+ if (underlying_cast<int>(policy) & int(launch::async)) {
+ packaged_task_type pt( boost::forward<F>(f) );
+ BOOST_THREAD_FUTURE<R> ret = pt.get_future();
+ ret.set_async();
+ boost::thread( boost::move(pt) ).detach();
+ return ::boost::move(ret);
+ } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ std::terminate();
+ //BOOST_THREAD_FUTURE<R> ret;
+ //return ::boost::move(ret);
+ // return boost::detail::make_future_deferred_shared_state<Rp>(
+ // BF(
+ // thread_detail::decay_copy(boost::forward<F>(f))
+ // )
+ // );
+ } else {
+ std::terminate();
+ //BOOST_THREAD_FUTURE<R> ret;
+ //return ::boost::move(ret);
+ }
+ }
+#endif // defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+namespace detail {
+
+ /////////////////////////
+ /// shared_state_nullary_task
+ /////////////////////////
+ template<typename Rp, typename Fp>
+ struct shared_state_nullary_task
+ {
+
+ typedef shared_ptr<shared_state_base > storage_type;
+ storage_type that;
+ Fp f_;
+ public:
+
+ shared_state_nullary_task(storage_type st, BOOST_THREAD_FWD_REF(Fp) f)
+ : that(st), f_(boost::move(f))
+ {};
+
+#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(shared_state_nullary_task)
+ shared_state_nullary_task(shared_state_nullary_task const& x) //BOOST_NOEXCEPT
+ : that(x.that), f_(x.f_)
+ {}
+ shared_state_nullary_task& operator=(BOOST_THREAD_COPY_ASSIGN_REF(shared_state_nullary_task) x) //BOOST_NOEXCEPT
+ {
+ if (this != &x) {
+ that=x.that;
+ f_=x.f_;
+ }
+ return *this;
+ }
+ // move
+ shared_state_nullary_task(BOOST_THREAD_RV_REF(shared_state_nullary_task) x) //BOOST_NOEXCEPT
+ : that(x.that), f_(boost::move(x.f_))
+ {
+ x.that.reset();
+ }
+ shared_state_nullary_task& operator=(BOOST_THREAD_RV_REF(shared_state_nullary_task) x) //BOOST_NOEXCEPT
+ {
+ if (this != &x) {
+ that=x.that;
+ f_=boost::move(x.f_);
+ x.that.reset();
+ }
+ return *this;
+ }
+#endif
+ void operator()() {
+ shared_ptr<shared_state<Rp> > that_ = static_pointer_cast<shared_state<Rp> >(that);
+ try {
+ that_->mark_finished_with_result(f_());
+ } catch(...) {
+ that_->mark_exceptional_finish();
+ }
+ }
+ ~shared_state_nullary_task()
+ {
+ }
+ };
+
+ template<typename Fp>
+ struct shared_state_nullary_task<void, Fp>
+ {
+ typedef shared_ptr<shared_state_base > storage_type;
+ storage_type that;
+ Fp f_;
+ public:
+ shared_state_nullary_task(storage_type st, BOOST_THREAD_FWD_REF(Fp) f)
+ : that(st), f_(boost::move(f))
+ {};
+
+#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(shared_state_nullary_task)
+ shared_state_nullary_task(shared_state_nullary_task const& x) //BOOST_NOEXCEPT
+ : that(x.that), f_(x.f_)
+ {}
+ shared_state_nullary_task& operator=(BOOST_THREAD_COPY_ASSIGN_REF(shared_state_nullary_task) x) //BOOST_NOEXCEPT
+ {
+ if (this != &x) {
+ that=x.that;
+ f_=x.f_;
+ }
+ return *this;
+ }
+ // move
+ shared_state_nullary_task(BOOST_THREAD_RV_REF(shared_state_nullary_task) x) BOOST_NOEXCEPT
+ : that(x.that), f_(boost::move(x.f_))
+ {
+ x.that.reset();
+ }
+ shared_state_nullary_task& operator=(BOOST_THREAD_RV_REF(shared_state_nullary_task) x) BOOST_NOEXCEPT {
+ if (this != &x) {
+ that=x.that;
+ f_=boost::move(x.f_);
+ x.that.reset();
+ }
+ return *this;
+ }
+#endif
+ void operator()() {
+ shared_ptr<shared_state<void> > that_ = static_pointer_cast<shared_state<void> >(that);
+ try {
+ f_();
+ that_->mark_finished_with_result();
+ } catch(...) {
+ that_->mark_exceptional_finish();
+ }
+ }
+ };
+
+}
+ BOOST_THREAD_DCL_MOVABLE_BEG2(R,F) detail::shared_state_nullary_task<R,F> BOOST_THREAD_DCL_MOVABLE_END
+namespace detail {
+
+ /////////////////////////
+ /// future_executor_shared_state_base
+ /////////////////////////
+ template<typename Rp>
+ struct future_executor_shared_state: shared_state<Rp>
+ {
+ typedef shared_state<Rp> base_type;
+ protected:
+ public:
+ future_executor_shared_state() {
+ }
+
+ template <class Fp, class Executor>
+ void init(Executor& ex, BOOST_THREAD_FWD_REF(Fp) f)
+ {
+ typedef typename decay<Fp>::type Cont;
+ this->set_executor_policy(executor_ptr_type(new executor_ref<Executor>(ex)));
+ shared_state_nullary_task<Rp,Cont> t(this->shared_from_this(), boost::forward<Fp>(f));
+ ex.submit(boost::move(t));
+ }
+
+ ~future_executor_shared_state() {}
+ };
+
+ ////////////////////////////////
+ // make_future_executor_shared_state
+ ////////////////////////////////
+ template <class Rp, class Fp, class Executor>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_executor_shared_state(Executor& ex, BOOST_THREAD_FWD_REF(Fp) f) {
+ shared_ptr<future_executor_shared_state<Rp> >
+ h(new future_executor_shared_state<Rp>());
+ h->init(ex, boost::forward<Fp>(f));
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+
+} // detail
+
+ ////////////////////////////////
+ // template <class Executor, class F, class... ArgTypes>
+ // future<R> async(Executor& ex, F&&, ArgTypes&&...);
+ ////////////////////////////////
+
+//#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#if defined(BOOST_THREAD_PROVIDES_INVOKE) && ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && ! defined(BOOST_NO_CXX11_HDR_TUPLE)
+
+#if defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR
+
+ template <class Executor, class R, class... ArgTypes>
+ BOOST_THREAD_FUTURE<R>
+ async(Executor& ex, R(*f)(BOOST_THREAD_FWD_REF(ArgTypes)...), BOOST_THREAD_FWD_REF(ArgTypes)... args) {
+ typedef R(*F)(BOOST_THREAD_FWD_REF(ArgTypes)...);
+ typedef detail::invoker<typename decay<F>::type, typename decay<ArgTypes>::type...> BF;
+ typedef typename BF::result_type Rp;
+
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_executor_shared_state<Rp>(ex,
+ BF(
+ f
+ , thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ )
+ ));
+ }
+#endif // defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR
+
+ template <class Executor, class F, class ...ArgTypes>
+ BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type(
+ typename decay<ArgTypes>::type...
+ )>::type>
+ async(Executor& ex, BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(ArgTypes)... args) {
+ typedef detail::invoker<typename decay<F>::type, typename decay<ArgTypes>::type...> BF;
+ typedef typename BF::result_type Rp;
+
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_executor_shared_state<Rp>(ex,
+ BF(
+ thread_detail::decay_copy(boost::forward<F>(f))
+ , thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ )
+ ));
+ }
+
+#else // ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#if defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR
+
+ template <class Executor, class R>
+ BOOST_THREAD_FUTURE<R>
+ async(Executor& ex, R(*f)()) {
+ typedef R(*F)();
+ typedef detail::invoker<F> BF;
+ typedef typename BF::result_type Rp;
+
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_executor_shared_state<Rp>(ex,
+ BF(
+ f
+ )
+ ));
+ }
+
+ template <class Executor, class R, class A1>
+ BOOST_THREAD_FUTURE<R>
+ async(Executor& ex, R(*f)(BOOST_THREAD_FWD_REF(A1)), BOOST_THREAD_FWD_REF(A1) a1) {
+ typedef R(*F)(BOOST_THREAD_FWD_REF(A1));
+ typedef detail::invoker<F, typename decay<A1>::type> BF;
+ typedef typename BF::result_type Rp;
+
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_executor_shared_state<Rp>(ex,
+ BF(
+ f
+ , thread_detail::decay_copy(boost::forward<A1>(a1))
+ )
+ ));
+ }
+#endif // defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR
+
+ template <class Executor, class F>
+ BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type()>::type>
+ async(Executor& ex, BOOST_THREAD_FWD_REF(F) f) {
+ typedef detail::invoker<typename decay<F>::type> BF;
+ typedef typename BF::result_type Rp;
+
+ return boost::detail::make_future_executor_shared_state<Rp>(ex,
+ BF(
+ thread_detail::decay_copy(boost::forward<F>(f))
+ )
+ );
+ }
+
+ template <class Executor, class F, class A1>
+ BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type(
+ typename decay<A1>::type
+ )>::type>
+ async(Executor& ex, BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1) {
+ typedef detail::invoker<typename decay<F>::type, typename decay<A1>::type> BF;
+ typedef typename BF::result_type Rp;
+
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_executor_shared_state<Rp>(ex,
+ BF(
+ thread_detail::decay_copy(boost::forward<F>(f))
+ , thread_detail::decay_copy(boost::forward<A1>(a1))
+ )
+ ));
+ }
+
+ template <class Executor, class F, class A1, class A2>
+ BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type(
+ typename decay<A1>::type, typename decay<A2>::type
+ )>::type>
+ async(Executor& ex, BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(A1) a1, BOOST_THREAD_FWD_REF(A2) a2) {
+ typedef detail::invoker<typename decay<F>::type, typename decay<A1>::type, typename decay<A2>::type> BF;
+ typedef typename BF::result_type Rp;
+
+ return BOOST_THREAD_MAKE_RV_REF(boost::detail::make_future_executor_shared_state<Rp>(ex,
+ BF(
+ thread_detail::decay_copy(boost::forward<F>(f))
+ , thread_detail::decay_copy(boost::forward<A1>(a1))
+ , thread_detail::decay_copy(boost::forward<A2>(a2))
+ )
+ ));
+ }
+
+#endif //! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+#endif
+
+ ////////////////////////////////
+ // template <class F, class... ArgTypes>
+ // future<R> async(F&&, ArgTypes&&...);
+ ////////////////////////////////
+
+#if defined BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR
+ #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template <class R, class... ArgTypes>
+ BOOST_THREAD_FUTURE<R>
+ async(R(*f)(BOOST_THREAD_FWD_REF(ArgTypes)...), BOOST_THREAD_FWD_REF(ArgTypes)... args) {
+ return BOOST_THREAD_MAKE_RV_REF(async(launch(launch::any), f, boost::forward<ArgTypes>(args)...));
+ }
+ #else
+ template <class R>
+ BOOST_THREAD_FUTURE<R>
+ async(R(*f)()) {
+ return BOOST_THREAD_MAKE_RV_REF(async(launch(launch::any), f));
+ }
+ #endif
+#endif
+
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
+ template <class F, class ...ArgTypes>
+ BOOST_THREAD_FUTURE<typename boost::result_of<typename decay<F>::type(
+ typename decay<ArgTypes>::type...
+ )>::type>
+ async(BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(ArgTypes)... args) {
+ return BOOST_THREAD_MAKE_RV_REF(async(launch(launch::any), boost::forward<F>(f), boost::forward<ArgTypes>(args)...));
+ }
+#else
+ template <class F>
+ BOOST_THREAD_FUTURE<typename boost::result_of<F()>::type>
+ async(BOOST_THREAD_FWD_REF(F) f) {
+ return BOOST_THREAD_MAKE_RV_REF(async(launch(launch::any), boost::forward<F>(f)));
+ }
+#endif
+
+ ////////////////////////////////
+ // make_future deprecated
+ ////////////////////////////////
+ template <typename T>
+ BOOST_THREAD_FUTURE<typename decay<T>::type> make_future(BOOST_THREAD_FWD_REF(T) value) {
+ typedef typename decay<T>::type future_value_type;
+ promise<future_value_type> p;
+ p.set_value(boost::forward<future_value_type>(value));
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future());
+ }
+
+#if defined BOOST_THREAD_USES_MOVE
+ inline BOOST_THREAD_FUTURE<void> make_future() {
+ promise<void> p;
+ p.set_value();
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future());
+ }
+#endif
+
+ ////////////////////////////////
+ // make_ready_future
+ ////////////////////////////////
+ namespace detail {
+ template <class T>
+ struct deduced_type_impl
+ {
+ typedef T type;
+ };
+
+ template <class T>
+ struct deduced_type_impl<reference_wrapper<T> const>
+ {
+ typedef T& type;
+ };
+ template <class T>
+ struct deduced_type_impl<reference_wrapper<T> >
+ {
+ typedef T& type;
+ };
+#if __cplusplus > 201103L
+ template <class T>
+ struct deduced_type_impl<std::reference_wrapper<T> >
+ {
+ typedef T& type;
+ };
+#endif
+ template <class T>
+ struct deduced_type
+ {
+ typedef typename detail::deduced_type_impl<typename decay<T>::type>::type type;
+ };
+
+ }
+
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <int = 0, int..., class T>
+#else
+ template <class T>
+#endif
+ BOOST_THREAD_FUTURE<typename detail::deduced_type<T>::type> make_ready_future(BOOST_THREAD_FWD_REF(T) value) {
+ typedef typename detail::deduced_type<T>::type future_value_type;
+ promise<future_value_type> p;
+ p.set_value(boost::forward<T>(value));
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future());
+ }
+
+ // explicit overloads
+ template <class T>
+ BOOST_THREAD_FUTURE<T> make_ready_future(typename remove_reference<T>::type & x)
+ {
+ promise<T> p;
+ p.set_value(x);
+ return p.get_future();
+ }
+
+ template <class T>
+ BOOST_THREAD_FUTURE<T> make_ready_future(BOOST_THREAD_FWD_REF(typename remove_reference<T>::type) x)
+ {
+ promise<T> p;
+ p.set_value(forward<typename remove_reference<T>::type>(x));
+ return p.get_future();
+ }
+
+ // variadic overload
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template <class T, class ...Args>
+ BOOST_THREAD_FUTURE<T> make_ready_future(Args&&... args)
+ {
+ promise<T> p;
+ p.emplace(forward<Args>(args)...);
+ return p.get_future();
+
+ }
+#endif
+
+ template <typename T, typename T1>
+ BOOST_THREAD_FUTURE<T> make_ready_no_decay_future(T1 value) {
+ typedef T future_value_type;
+ promise<future_value_type> p;
+ p.set_value(value);
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future());
+ }
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || defined BOOST_THREAD_USES_MOVE
+ inline BOOST_THREAD_FUTURE<void> make_ready_future() {
+ promise<void> p;
+ p.set_value();
+ return p.get_future();
+ }
+#endif
+
+
+ template <typename T>
+ BOOST_THREAD_FUTURE<T> make_exceptional_future(exception_ptr ex) {
+ promise<T> p;
+ p.set_exception(ex);
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future());
+ }
+
+ template <typename T, typename E>
+ BOOST_THREAD_FUTURE<T> make_exceptional_future(E ex) {
+ promise<T> p;
+ p.set_exception(boost::copy_exception(ex));
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future());
+ }
+
+ template <typename T>
+ BOOST_THREAD_FUTURE<T> make_exceptional_future() {
+ promise<T> p;
+ p.set_exception(boost::current_exception());
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future());
+ }
+ template <typename T>
+ BOOST_THREAD_FUTURE<T> make_ready_future(exception_ptr ex) {
+ return make_exceptional_future<T>(ex);
+ }
+
+#if 0
+ template<typename CLOSURE>
+ make_future(CLOSURE closure) -> BOOST_THREAD_FUTURE<decltype(closure())> {
+ typedef decltype(closure()) T;
+ promise<T> p;
+ try {
+ p.set_value(closure());
+ } catch(...) {
+ p.set_exception(std::current_exception());
+ }
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future());
+ }
+#endif
+
+ ////////////////////////////////
+ // make_shared_future deprecated
+ ////////////////////////////////
+ template <typename T>
+ shared_future<typename decay<T>::type> make_shared_future(BOOST_THREAD_FWD_REF(T) value) {
+ typedef typename decay<T>::type future_type;
+ promise<future_type> p;
+ p.set_value(boost::forward<T>(value));
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future().share());
+ }
+
+ inline shared_future<void> make_shared_future() {
+ promise<void> p;
+ return BOOST_THREAD_MAKE_RV_REF(p.get_future().share());
+ }
+
+ ////////////////////////////////
+ // detail::future_async_continuation_shared_state
+ ////////////////////////////////
+#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION
+
+namespace detail
+{
+ //////////////////////
+ // detail::continuation_shared_state
+ //////////////////////
+ template<typename F, typename Rp, typename Fp, class ShSt=shared_state<Rp> >
+ struct continuation_shared_state: ShSt
+ {
+ F parent;
+ Fp continuation;
+
+ public:
+ continuation_shared_state(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c)
+ : parent(boost::move(f)),
+ continuation(boost::move(c))
+ {
+ }
+
+ void init(boost::unique_lock<boost::mutex> &lock)
+ {
+ parent.future_->set_continuation_ptr(this->shared_from_this(), lock);
+ }
+
+ void call() {
+ try {
+ this->mark_finished_with_result(this->continuation(boost::move(this->parent)));
+ } catch(...) {
+ this->mark_exceptional_finish();
+ }
+ // make sure parent is really cleared to prevent memory "leaks"
+ this->parent = F();
+ }
+
+ void call(boost::unique_lock<boost::mutex>& lck) {
+ try {
+ relocker relock(lck);
+
+ // neither continuation nor parent are protected by the lock - call() must only
+ // be called once, and no one else must modify it.
+ Rp res = this->continuation(boost::move(this->parent));
+
+ // make sure parent is really cleared to prevent memory "leaks"
+ this->parent = F();
+
+ relock.lock();
+
+ this->mark_finished_with_result_internal(boost::move(res), lck);
+ } catch (...) {
+ this->mark_exceptional_finish_internal(current_exception(), lck);
+
+ // make sure parent is really cleared to prevent memory "leaks"
+ relocker relock(lck);
+ this->parent = F();
+ }
+ }
+
+ static void run(shared_ptr<boost::detail::shared_state_base> that_)
+ {
+ continuation_shared_state* that = static_cast<continuation_shared_state*>(that_.get());
+ that->call();
+ }
+
+ ~continuation_shared_state() {}
+ };
+
+ template<typename F, typename Fp, class ShSt>
+ struct continuation_shared_state<F, void, Fp, ShSt>: ShSt
+ {
+ F parent;
+ Fp continuation;
+
+ public:
+ continuation_shared_state(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c)
+ : parent(boost::move(f)),
+ continuation(boost::move(c))
+ {
+ }
+
+ void init(boost::unique_lock<boost::mutex> &lock)
+ {
+ parent.future_->set_continuation_ptr(this->shared_from_this(), lock);
+ }
+
+ void call()
+ {
+ try {
+ this->continuation(boost::move(this->parent));
+ this->mark_finished_with_result();
+ } catch(...) {
+ this->mark_exceptional_finish();
+ }
+ // make sure parent is really cleared to prevent memory "leaks"
+ this->parent = F();
+ }
+
+ void call(boost::unique_lock<boost::mutex>& lck) {
+ try {
+ {
+ relocker relock(lck);
+ // neither continuation nor parent are protected by the lock - call() must only
+ // be called once, and no one else must modify it.
+ this->continuation(boost::move(this->parent));
+
+ // make sure parent is really cleared to prevent memory "leaks"
+ this->parent = F();
+ }
+ this->mark_finished_with_result_internal(lck);
+ } catch (...) {
+ this->mark_exceptional_finish_internal(current_exception(), lck);
+
+ // make sure parent is really cleared to prevent memory "leaks"
+ relocker relock(lck);
+ this->parent = F();
+ }
+ }
+
+ static void run(shared_ptr<boost::detail::shared_state_base> that_)
+ {
+ continuation_shared_state* that = static_cast<continuation_shared_state*>(that_.get());
+ that->call();
+ }
+
+ ~continuation_shared_state() {}
+ };
+ /////////////////////////
+ /// future_async_continuation_shared_state
+ /////////////////////////
+
+ template<typename F, typename Rp, typename Fp>
+ struct future_async_continuation_shared_state: continuation_shared_state<F,Rp,Fp,future_async_shared_state_base<Rp> >
+ {
+ typedef continuation_shared_state<F,Rp,Fp,future_async_shared_state_base<Rp> > base_type;
+ public:
+ future_async_continuation_shared_state(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c)
+ : base_type(boost::move(f), boost::forward<Fp>(c))
+ { }
+
+ void launch_continuation() {
+#if defined BOOST_THREAD_FUTURE_BLOCKING
+ boost::lock_guard<boost::mutex> lk(this->mutex);
+ this->thr_ = boost::thread(&future_async_continuation_shared_state::run, static_shared_from_this(this));
+#else
+ boost::thread(&base_type::run, static_shared_from_this(this)).detach();
+#endif
+ }
+ };
+
+ /////////////////////////
+ /// future_sync_continuation_shared_state
+ /////////////////////////
+
+ template<typename F, typename Rp, typename Fp>
+ struct future_sync_continuation_shared_state: continuation_shared_state<F,Rp,Fp,shared_state<Rp> >
+ {
+ typedef continuation_shared_state<F,Rp,Fp,shared_state<Rp> > base_type;
+ public:
+ future_sync_continuation_shared_state(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c)
+ : base_type(boost::move(f), boost::forward<Fp>(c))
+ { }
+
+ void launch_continuation() {
+ this->call();
+ }
+ };
+
+
+ /////////////////////////
+ /// future_executor_continuation_shared_state
+ /////////////////////////
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+
+ template <typename FutureExecutorContinuationSharedState>
+ struct run_it {
+ shared_ptr<FutureExecutorContinuationSharedState> that_;
+
+#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ BOOST_THREAD_COPYABLE_AND_MOVABLE(run_it)
+ run_it(run_it const& x) //BOOST_NOEXCEPT
+ : that_(x.that_)
+ {}
+ run_it& operator=(BOOST_THREAD_COPY_ASSIGN_REF(run_it) x) //BOOST_NOEXCEPT
+ {
+ if (this != &x) {
+ that_=x.that_;
+ }
+ return *this;
+ }
+ // move
+ run_it(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT
+ : that_(x.that_)
+ {
+ x.that_.reset();
+ }
+ run_it& operator=(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT {
+ if (this != &x) {
+ that_=x.that;
+ x.that_.reset();
+ }
+ return *this;
+ }
+#endif
+ run_it(shared_ptr<FutureExecutorContinuationSharedState> that) : that_ (that) {}
+
+ void operator()()
+ {
+ that_->run(that_);
+ }
+ };
+
+}
+ BOOST_THREAD_DCL_MOVABLE_BEG(F) detail::run_it<F> BOOST_THREAD_DCL_MOVABLE_END
+
+namespace detail {
+
+ template<typename F, typename Rp, typename Fp>
+ struct future_executor_continuation_shared_state: continuation_shared_state<F,Rp,Fp>
+ {
+ typedef continuation_shared_state<F,Rp,Fp> base_type;
+
+ public:
+ future_executor_continuation_shared_state(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c)
+ : base_type(boost::move(f), boost::forward<Fp>(c))
+ {
+ }
+
+ template <class Ex>
+ void init(boost::unique_lock<boost::mutex> &lk, Ex& ex)
+ {
+ this->set_executor_policy(executor_ptr_type(new executor_ref<Ex>(ex)), lk);
+ this->base_type::init(lk);
+ }
+
+ void launch_continuation() {
+ run_it<base_type> fct(static_shared_from_this(this));
+ this->get_executor()->submit(boost::move(fct));
+ }
+
+ ~future_executor_continuation_shared_state() {}
+ };
+#endif
+
+ /////////////////////////
+ /// shared_future_async_continuation_shared_state
+ /////////////////////////
+
+ template<typename F, typename Rp, typename Fp>
+ struct shared_future_async_continuation_shared_state: continuation_shared_state<F,Rp,Fp,future_async_shared_state_base<Rp> >
+ {
+ typedef continuation_shared_state<F,Rp,Fp,future_async_shared_state_base<Rp> > base_type;
+
+ public:
+ shared_future_async_continuation_shared_state(F f, BOOST_THREAD_FWD_REF(Fp) c)
+ : base_type(boost::move(f), boost::forward<Fp>(c))
+ {
+ }
+
+ void launch_continuation() {
+#if defined BOOST_THREAD_FUTURE_BLOCKING
+ boost::lock_guard<boost::mutex> lk(this->mutex);
+ this->thr_ = boost::thread(&base_type::run, static_shared_from_this(this));
+#else
+ boost::thread(&base_type::run, static_shared_from_this(this)).detach();
+#endif
+ }
+ };
+
+ /////////////////////////
+ /// shared_future_async_continuation_shared_state
+ /////////////////////////
+
+ template<typename F, typename Rp, typename Fp>
+ struct shared_future_sync_continuation_shared_state: continuation_shared_state<F,Rp,Fp,shared_state<Rp> >
+ {
+ typedef continuation_shared_state<F,Rp,Fp,shared_state<Rp> > base_type;
+
+ public:
+ shared_future_sync_continuation_shared_state(F f, BOOST_THREAD_FWD_REF(Fp) c)
+ : base_type(boost::move(f), boost::forward<Fp>(c))
+ {
+ }
+
+ void launch_continuation() {
+ this->call();
+ }
+ };
+
+
+ /////////////////////////
+ /// shared_future_executor_continuation_shared_state
+ /////////////////////////
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+
+ template<typename F, typename Rp, typename Fp>
+ struct shared_future_executor_continuation_shared_state: continuation_shared_state<F,Rp,Fp>
+ {
+ typedef continuation_shared_state<F,Rp,Fp> base_type;
+
+ public:
+
+ shared_future_executor_continuation_shared_state(F f, BOOST_THREAD_FWD_REF(Fp) c)
+ : base_type(boost::move(f), boost::forward<Fp>(c))
+ {
+ }
+
+ template <class Ex>
+ void init(boost::unique_lock<boost::mutex> &lk, Ex& ex)
+ {
+ this->set_executor_policy(executor_ptr_type(new executor_ref<Ex>(ex)), lk);
+ this->base_type::init(lk);
+ }
+
+ void launch_continuation() {
+ run_it<base_type> fct(static_shared_from_this(this));
+ this->get_executor()->submit(boost::move(fct));
+ }
+
+ ~shared_future_executor_continuation_shared_state() {}
+ };
+
+#endif
+ //////////////////////////
+ /// future_deferred_continuation_shared_state
+ //////////////////////////
+ template<typename F, typename Rp, typename Fp>
+ struct future_deferred_continuation_shared_state: continuation_shared_state<F,Rp,Fp>
+ {
+ typedef continuation_shared_state<F,Rp,Fp> base_type;
+ public:
+ future_deferred_continuation_shared_state(BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c)
+ : base_type(boost::move(f), boost::forward<Fp>(c))
+ {
+ this->set_deferred();
+ }
+
+ virtual void execute(boost::unique_lock<boost::mutex>& lk) {
+ this->parent.wait();
+ this->call(lk);
+ }
+
+ virtual void launch_continuation() { }
+ };
+
+ //////////////////////////
+ /// shared_future_deferred_continuation_shared_state
+ //////////////////////////
+ template<typename F, typename Rp, typename Fp>
+ struct shared_future_deferred_continuation_shared_state: continuation_shared_state<F,Rp,Fp>
+ {
+ typedef continuation_shared_state<F,Rp,Fp> base_type;
+
+ public:
+ shared_future_deferred_continuation_shared_state(F f, BOOST_THREAD_FWD_REF(Fp) c)
+ : base_type(boost::move(f), boost::forward<Fp>(c))
+ {
+ this->set_deferred();
+ }
+
+ virtual void execute(boost::unique_lock<boost::mutex>& lk) {
+ this->parent.wait();
+ this->call(lk);
+ }
+
+ virtual void launch_continuation() { }
+ };
+
+ ////////////////////////////////
+ // make_future_deferred_continuation_shared_state
+ ////////////////////////////////
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_deferred_continuation_shared_state(
+ boost::unique_lock<boost::mutex> &lock,
+ BOOST_THREAD_RV_REF(F) f, BOOST_THREAD_FWD_REF(Fp) c) {
+ typedef typename decay<Fp>::type Cont;
+ shared_ptr<future_deferred_continuation_shared_state<F, Rp, Cont> >
+ h(new future_deferred_continuation_shared_state<F, Rp, Cont>(boost::move(f), boost::forward<Fp>(c)));
+ h->init(lock);
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+
+ ////////////////////////////////
+ // make_future_async_continuation_shared_state
+ ////////////////////////////////
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_async_continuation_shared_state(
+ boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f,
+ BOOST_THREAD_FWD_REF(Fp) c) {
+ typedef typename decay<Fp>::type Cont;
+ shared_ptr<future_async_continuation_shared_state<F,Rp, Cont> >
+ h(new future_async_continuation_shared_state<F,Rp, Cont>(boost::move(f), boost::forward<Fp>(c)));
+ h->init(lock);
+
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+ ////////////////////////////////
+ // make_future_sync_continuation_shared_state
+ ////////////////////////////////
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_sync_continuation_shared_state(
+ boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f,
+ BOOST_THREAD_FWD_REF(Fp) c) {
+ typedef typename decay<Fp>::type Cont;
+ shared_ptr<future_sync_continuation_shared_state<F,Rp, Cont> >
+ h(new future_sync_continuation_shared_state<F,Rp, Cont>(boost::move(f), boost::forward<Fp>(c)));
+ h->init(lock);
+
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+
+ ////////////////////////////////
+ // make_future_executor_continuation_shared_state
+ ////////////////////////////////
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+
+ template<typename Ex, typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_executor_continuation_shared_state(Ex& ex,
+ boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f,
+ BOOST_THREAD_FWD_REF(Fp) c) {
+ typedef typename decay<Fp>::type Cont;
+ shared_ptr<future_executor_continuation_shared_state<F,Rp, Cont> >
+ h(new future_executor_continuation_shared_state<F,Rp, Cont>(boost::move(f), boost::forward<Fp>(c)));
+ h->init(lock, ex);
+
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+#endif
+
+ ////////////////////////////////
+ // make_shared_future_deferred_continuation_shared_state
+ ////////////////////////////////
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_shared_future_deferred_continuation_shared_state(
+ boost::unique_lock<boost::mutex> &lock,
+ F f, BOOST_THREAD_FWD_REF(Fp) c) {
+ typedef typename decay<Fp>::type Cont;
+ shared_ptr<shared_future_deferred_continuation_shared_state<F, Rp, Cont> >
+ h(new shared_future_deferred_continuation_shared_state<F, Rp, Cont>(f, boost::forward<Fp>(c)));
+ h->init(lock);
+
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+ ////////////////////////////////
+ // make_shared_future_async_continuation_shared_state
+ ////////////////////////////////
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_shared_future_async_continuation_shared_state(
+ boost::unique_lock<boost::mutex> &lock, F f,
+ BOOST_THREAD_FWD_REF(Fp) c) {
+ typedef typename decay<Fp>::type Cont;
+ shared_ptr<shared_future_async_continuation_shared_state<F,Rp, Cont> >
+ h(new shared_future_async_continuation_shared_state<F,Rp, Cont>(f, boost::forward<Fp>(c)));
+ h->init(lock);
+
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+ ////////////////////////////////
+ // make_shared_future_sync_continuation_shared_state
+ ////////////////////////////////
+ template<typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_shared_future_sync_continuation_shared_state(
+ boost::unique_lock<boost::mutex> &lock, F f,
+ BOOST_THREAD_FWD_REF(Fp) c) {
+ typedef typename decay<Fp>::type Cont;
+ shared_ptr<shared_future_sync_continuation_shared_state<F,Rp, Cont> >
+ h(new shared_future_sync_continuation_shared_state<F,Rp, Cont>(f, boost::forward<Fp>(c)));
+ h->init(lock);
+
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+ ////////////////////////////////
+ // make_shared_future_executor_continuation_shared_state
+ ////////////////////////////////
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ template<typename Ex, typename F, typename Rp, typename Fp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_shared_future_executor_continuation_shared_state(Ex& ex,
+ boost::unique_lock<boost::mutex> &lock, F f,
+ BOOST_THREAD_FWD_REF(Fp) c) {
+ typedef typename decay<Fp>::type Cont;
+ shared_ptr<shared_future_executor_continuation_shared_state<F, Rp, Cont> >
+ h(new shared_future_executor_continuation_shared_state<F, Rp, Cont>(f, boost::forward<Fp>(c)));
+ h->init(lock, ex);
+
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+#endif
+}
+
+ ////////////////////////////////
+ // template<typename F>
+ // auto future<R>::then(launch policy, F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R>
+ template <typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type>
+ BOOST_THREAD_FUTURE<R>::then(launch policy, BOOST_THREAD_FWD_REF(F) func) {
+ typedef typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ // keep state alive as we move ourself but hold the lock
+ shared_ptr<detail::shared_state_base> sentinel(this->future_);
+ boost::unique_lock<boost::mutex> lock(sentinel->mutex);
+
+ if (underlying_cast<int>(policy) & int(launch::async)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy) & int(launch::sync)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_sync_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ } else if (underlying_cast<int>(policy) & int(launch::executor)) {
+ assert(this->future_->get_executor());
+ typedef executor Ex;
+ Ex& ex = *(this->future_->get_executor());
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_executor_continuation_shared_state<Ex, BOOST_THREAD_FUTURE<R>, future_type>(ex,
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+#endif
+ } else if (underlying_cast<int>(policy) & int(launch::inherit)) {
+
+ launch policy_ = this->launch_policy(lock);
+ if (underlying_cast<int>(policy_) & int(launch::async)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy_) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy_) & int(launch::sync)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_sync_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ } else if (underlying_cast<int>(policy_) & int(launch::executor)) {
+ assert(this->future_->get_executor());
+ typedef executor Ex;
+ Ex& ex = *(this->future_->get_executor());
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_executor_continuation_shared_state<Ex, BOOST_THREAD_FUTURE<R>, future_type>(ex,
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+#endif
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ }
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ }
+ }
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ ////////////////////////////////
+ // template<typename Ex, typename F>
+ // auto future<future<R2> >::then(Ex&, F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R>
+ template <typename Ex, typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type>
+ BOOST_THREAD_FUTURE<R>::then(Ex& ex, BOOST_THREAD_FWD_REF(F) func) {
+ typedef typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ // keep state alive as we move ourself but hold the lock
+ shared_ptr<detail::shared_state_base> sentinel(this->future_);
+ boost::unique_lock<boost::mutex> lock(sentinel->mutex);
+
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_executor_continuation_shared_state<Ex, BOOST_THREAD_FUTURE<R>, future_type>(ex,
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ }
+#endif
+ ////////////////////////////////
+ // template<typename F>
+ // auto future<future<R2> >::then(F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R>
+ template <typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type>
+ BOOST_THREAD_FUTURE<R>::then(BOOST_THREAD_FWD_REF(F) func) {
+
+#ifndef BOOST_THREAD_CONTINUATION_SYNC
+ return this->then(this->launch_policy(), boost::forward<F>(func));
+#else
+ typedef typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ // keep state alive as we move ourself but hold the lock
+ shared_ptr<detail::shared_state_base> sentinel(this->future_);
+ boost::unique_lock<boost::mutex> lock(sentinel->mutex);
+
+ launch policy = this->launch_policy(lock);
+ if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ }
+#endif
+
+ }
+
+ ////////////////////////////////
+ // template<typename F>
+ // auto future<future<R2> >::then(launch, F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R2>
+ template <typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> >)>::type>
+ BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> >::then(launch policy, BOOST_THREAD_FWD_REF(F) func) {
+ typedef BOOST_THREAD_FUTURE<R2> R;
+ typedef typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ // keep state alive as we move ourself but hold the lock
+ shared_ptr<detail::shared_state_base> sentinel(this->future_);
+ boost::unique_lock<boost::mutex> lock(sentinel->mutex);
+
+ if (underlying_cast<int>(policy) & int(launch::async)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy) & int(launch::sync)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_sync_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ } else if (underlying_cast<int>(policy) & int(launch::executor)) {
+ assert(this->future_->get_executor());
+ typedef executor Ex;
+ Ex& ex = *(this->future_->get_executor());
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_executor_continuation_shared_state<Ex, BOOST_THREAD_FUTURE<R>, future_type>(ex,
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+#endif
+ } else if (underlying_cast<int>(policy) & int(launch::inherit)) {
+ launch policy_ = this->launch_policy(lock);
+
+ if (underlying_cast<int>(policy_) & int(launch::async)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy_) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy_) & int(launch::sync)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_sync_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ } else if (underlying_cast<int>(policy_) & int(launch::executor)) {
+ assert(this->future_->get_executor());
+ typedef executor Ex;
+ Ex& ex = *(this->future_->get_executor());
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_executor_continuation_shared_state<Ex, BOOST_THREAD_FUTURE<R>, future_type>(ex,
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+#endif
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ }
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_async_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ }
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ ////////////////////////////////
+ // template<typename Ex, typename F>
+ // auto future<future<R2> >::then(Ex&, F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R2>
+ template <typename Ex, typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> >)>::type>
+ BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> >::then(Ex& ex, BOOST_THREAD_FWD_REF(F) func) {
+ typedef BOOST_THREAD_FUTURE<R2> R;
+ typedef typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ // keep state alive as we move ourself but hold the lock
+ shared_ptr<detail::shared_state_base> sentinel(this->future_);
+ boost::unique_lock<boost::mutex> lock(sentinel->mutex);
+
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_executor_continuation_shared_state<Ex, BOOST_THREAD_FUTURE<R>, future_type>(ex,
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ }
+#endif
+
+ ////////////////////////////////
+ // template<typename F>
+ // auto future<future<R2> >::then(F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R2>
+ template <typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> >)>::type>
+ BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> >::then(BOOST_THREAD_FWD_REF(F) func) {
+
+#ifndef BOOST_THREAD_CONTINUATION_SYNC
+ return this->then(this->launch_policy(), boost::forward<F>(func));
+#else
+ typedef BOOST_THREAD_FUTURE<R2> R;
+ typedef typename boost::result_of<F(BOOST_THREAD_FUTURE<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ // keep state alive as we move ourself but hold the lock
+ shared_ptr<detail::shared_state_base> sentinel(this->future_);
+ boost::unique_lock<boost::mutex> lock(sentinel->mutex);
+
+ launch policy = this->launch_policy(lock);
+
+ if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_deferred_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_future_sync_continuation_shared_state<BOOST_THREAD_FUTURE<R>, future_type>(
+ lock, boost::move(*this), boost::forward<F>(func)
+ )));
+ }
+#endif
+ }
+
+ ////////////////////////////////
+ // template<typename F>
+ // auto shared_future<R>::then(launch policy, F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R>
+ template <typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(shared_future<R>)>::type>
+ shared_future<R>::then(launch policy, BOOST_THREAD_FWD_REF(F) func) const
+ {
+ typedef typename boost::result_of<F(shared_future<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ boost::unique_lock<boost::mutex> lock(this->future_->mutex);
+ if (underlying_cast<int>(policy) & int(launch::async)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_async_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_deferred_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy) & int(launch::sync)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_sync_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ } else if (underlying_cast<int>(policy) & int(launch::executor)) {
+ typedef executor Ex;
+ Ex& ex = *(this->future_->get_executor());
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_executor_continuation_shared_state<Ex, shared_future<R>, future_type>(ex,
+ lock, *this, boost::forward<F>(func)
+ )));
+#endif
+ } else if (underlying_cast<int>(policy) & int(launch::inherit)) {
+
+ launch policy_ = this->launch_policy(lock);
+ if (underlying_cast<int>(policy_) & int(launch::async)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_async_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy_) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_deferred_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+ } else if (underlying_cast<int>(policy_) & int(launch::sync)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_sync_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ } else if (underlying_cast<int>(policy_) & int(launch::executor)) {
+ typedef executor Ex;
+ Ex& ex = *(this->future_->get_executor());
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_executor_continuation_shared_state<Ex, shared_future<R>, future_type>(ex,
+ lock, *this, boost::forward<F>(func)
+ )));
+#endif
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_async_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+ }
+
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_async_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+ }
+ }
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ ////////////////////////////////
+ // template<typename Ex, typename F>
+ // auto shared_future<R>::then(Ex&, F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R>
+ template <typename Ex, typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(shared_future<R>)>::type>
+ shared_future<R>::then(Ex& ex, BOOST_THREAD_FWD_REF(F) func) const
+ {
+ typedef typename boost::result_of<F(shared_future<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ boost::unique_lock<boost::mutex> lock(this->future_->mutex);
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_executor_continuation_shared_state<Ex, shared_future<R>, future_type>(ex,
+ lock, *this, boost::forward<F>(func)
+ )));
+ }
+#endif
+
+ ////////////////////////////////
+ // template<typename F>
+ // auto shared_future<R>::then(F&& func) -> BOOST_THREAD_FUTURE<decltype(func(*this))>;
+ ////////////////////////////////
+ template <typename R>
+ template <typename F>
+ inline BOOST_THREAD_FUTURE<typename boost::result_of<F(shared_future<R>)>::type>
+ shared_future<R>::then(BOOST_THREAD_FWD_REF(F) func) const {
+#ifndef BOOST_THREAD_CONTINUATION_SYNC
+ return this->then(this->launch_policy(), boost::forward<F>(func));
+#else
+ typedef typename boost::result_of<F(shared_future<R>)>::type future_type;
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ boost::unique_lock<boost::mutex> lock(this->future_->mutex);
+ launch policy = this->launch_policy(lock);
+ if (underlying_cast<int>(policy) & int(launch::deferred)) {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_deferred_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+ } else {
+ return BOOST_THREAD_MAKE_RV_REF((boost::detail::make_shared_future_sync_continuation_shared_state<shared_future<R>, future_type>(
+ lock, *this, boost::forward<F>(func)
+ )));
+ }
+#endif
+ }
+
+namespace detail
+{
+ template <typename T>
+ struct mfallbacker_to
+ {
+ T value_;
+ typedef T result_type;
+ mfallbacker_to(BOOST_THREAD_RV_REF(T) v)
+ : value_(boost::move(v))
+ {}
+
+ T operator()(BOOST_THREAD_FUTURE<T> fut) {
+ return fut.get_or(boost::move(value_));
+ }
+ };
+ template <typename T>
+ struct cfallbacker_to
+ {
+ T value_;
+ typedef T result_type;
+ cfallbacker_to(T const& v)
+ : value_(v)
+ {}
+
+ T operator()(BOOST_THREAD_FUTURE<T> fut) const {
+ return fut.get_or(value_);
+
+ }
+ };
+}
+ ////////////////////////////////
+ // future<R> future<R>::fallback_to(R&& v);
+ ////////////////////////////////
+
+ template <typename R>
+ template <typename R2>
+ inline typename boost::disable_if< is_void<R2>, BOOST_THREAD_FUTURE<R> >::type
+ BOOST_THREAD_FUTURE<R>::fallback_to(BOOST_THREAD_RV_REF(R2) v) {
+ return then(detail::mfallbacker_to<R>(boost::move(v)));
+ }
+
+ template <typename R>
+ template <typename R2>
+ inline typename boost::disable_if< is_void<R2>, BOOST_THREAD_FUTURE<R> >::type
+ BOOST_THREAD_FUTURE<R>::fallback_to(R2 const& v) {
+ return then(detail::cfallbacker_to<R>(v));
+ }
+
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_UNWRAP
+namespace detail
+{
+ /////////////////////////
+ /// future_unwrap_shared_state
+ /////////////////////////
+
+ template<typename F, typename Rp>
+ struct future_unwrap_shared_state: shared_state<Rp>
+ {
+ F wrapped;
+ typename F::value_type unwrapped;
+ public:
+ explicit future_unwrap_shared_state(BOOST_THREAD_RV_REF(F) f)
+ : wrapped(boost::move(f)) {
+ }
+
+ void launch_continuation()
+ {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ // assert(wrapped.is_ready());
+ if (! unwrapped.valid() )
+ {
+ if (wrapped.has_exception()) {
+ this->mark_exceptional_finish_internal(wrapped.get_exception_ptr(), lk);
+ } else {
+ unwrapped = wrapped.get();
+ if (unwrapped.valid())
+ {
+ lk.unlock();
+ boost::unique_lock<boost::mutex> lk2(unwrapped.future_->mutex);
+ unwrapped.future_->set_continuation_ptr(this->shared_from_this(), lk2);
+ } else {
+ this->mark_exceptional_finish_internal(boost::copy_exception(future_uninitialized()), lk);
+ }
+ }
+ } else {
+ // assert(unwrapped.is_ready());
+ if (unwrapped.has_exception()) {
+ this->mark_exceptional_finish_internal(unwrapped.get_exception_ptr(), lk);
+ } else {
+ this->mark_finished_with_result_internal(unwrapped.get(), lk);
+ }
+ }
+ }
+ };
+
+ template<typename F>
+ struct future_unwrap_shared_state<F,void>: shared_state<void>
+ {
+ F wrapped;
+ typename F::value_type unwrapped;
+ public:
+ explicit future_unwrap_shared_state(BOOST_THREAD_RV_REF(F) f)
+ : wrapped(boost::move(f)) {
+ }
+
+ void launch_continuation()
+ {
+ boost::unique_lock<boost::mutex> lk(this->mutex);
+ // assert(wrapped.is_ready());
+ if (! unwrapped.valid() )
+ {
+ if (wrapped.has_exception()) {
+ this->mark_exceptional_finish_internal(wrapped.get_exception_ptr(), lk);
+ } else {
+ unwrapped = wrapped.get();
+ if (unwrapped.valid())
+ {
+ lk.unlock();
+ boost::unique_lock<boost::mutex> lk2(unwrapped.future_->mutex);
+ unwrapped.future_->set_continuation_ptr(this->shared_from_this(), lk2);
+ } else {
+ this->mark_exceptional_finish_internal(boost::copy_exception(future_uninitialized()), lk);
+ }
+ }
+ } else {
+ // assert(unwrapped.is_ready());
+ if (unwrapped.has_exception()) {
+ this->mark_exceptional_finish_internal(unwrapped.get_exception_ptr(), lk);
+ } else {
+ this->mark_finished_with_result_internal(lk);
+ }
+ }
+ }
+ };
+
+ template <class F, class Rp>
+ BOOST_THREAD_FUTURE<Rp>
+ make_future_unwrap_shared_state(boost::unique_lock<boost::mutex> &lock, BOOST_THREAD_RV_REF(F) f) {
+ shared_ptr<future_unwrap_shared_state<F, Rp> >
+ h(new future_unwrap_shared_state<F, Rp>(boost::move(f)));
+ h->wrapped.future_->set_continuation_ptr(h, lock);
+
+ return BOOST_THREAD_FUTURE<Rp>(h);
+ }
+}
+
+ template <typename R>
+ inline BOOST_THREAD_FUTURE<R>::BOOST_THREAD_FUTURE(BOOST_THREAD_RV_REF(BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R> >) other)
+ : base_type(other.unwrap()) {}
+
+ template <typename R2>
+ BOOST_THREAD_FUTURE<R2>
+ BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> >::unwrap()
+ {
+ BOOST_THREAD_ASSERT_PRECONDITION(this->future_.get()!=0, future_uninitialized());
+
+ // keep state alive as we move ourself but hold the lock
+ shared_ptr<detail::shared_state_base> sentinel(this->future_);
+ boost::unique_lock<boost::mutex> lock(sentinel->mutex);
+
+ return boost::detail::make_future_unwrap_shared_state<BOOST_THREAD_FUTURE<BOOST_THREAD_FUTURE<R2> >, R2>(lock, boost::move(*this));
+ }
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
+namespace detail
+{
+ struct input_iterator_tag {};
+ struct vector_tag {};
+ struct values_tag {};
+ template <typename T>
+ struct alias_t { typedef T type; };
+
+ BOOST_CONSTEXPR_OR_CONST input_iterator_tag input_iterator_tag_value = {};
+ BOOST_CONSTEXPR_OR_CONST vector_tag vector_tag_value = {};
+ BOOST_CONSTEXPR_OR_CONST values_tag values_tag_value = {};
+ ////////////////////////////////
+ // detail::future_async_when_all_shared_state
+ ////////////////////////////////
+ template<typename F>
+ struct future_when_all_vector_shared_state: future_async_shared_state_base<csbl::vector<F> >
+ {
+ typedef csbl::vector<F> vector_type;
+ typedef typename F::value_type value_type;
+ vector_type vec_;
+
+ static void run(shared_ptr<boost::detail::shared_state_base> that_) {
+ future_when_all_vector_shared_state* that = static_cast<future_when_all_vector_shared_state*>(that_.get());
+ try {
+ boost::wait_for_all(that->vec_.begin(), that->vec_.end());
+ that->mark_finished_with_result(boost::move(that->vec_));
+ } catch(...) {
+ that->mark_exceptional_finish();
+ }
+ }
+ bool run_deferred() {
+
+ bool res = false;
+ for (typename csbl::vector<F>::iterator it = vec_.begin(); it != vec_.end(); ++it) {
+ if (! it->run_if_is_deferred())
+ {
+ res = true;
+ }
+ }
+ return res;
+ }
+ void init() {
+ if (! run_deferred())
+ {
+ future_when_all_vector_shared_state::run(this->shared_from_this());
+ return;
+ }
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ this->thr_ = boost::thread(&future_when_all_vector_shared_state::run, this->shared_from_this());
+#else
+ boost::thread(&future_when_all_vector_shared_state::run, this->shared_from_this()).detach();
+#endif
+ }
+
+ public:
+ template< typename InputIterator>
+ future_when_all_vector_shared_state(input_iterator_tag, InputIterator first, InputIterator last)
+ : vec_(std::make_move_iterator(first), std::make_move_iterator(last))
+ {
+ }
+
+ future_when_all_vector_shared_state(vector_tag, BOOST_THREAD_RV_REF(csbl::vector<F>) v)
+ : vec_(boost::move(v))
+ {
+ }
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ future_when_all_vector_shared_state(values_tag, BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures) {
+ vec_.push_back(boost::forward<T0>(f));
+ typename alias_t<char[]>::type{
+ ( //first part of magic unpacker
+ vec_.push_back(boost::forward<T>(futures)),'0'
+ )..., '0'
+ }; //second part of magic unpacker
+ }
+#endif
+
+ ~future_when_all_vector_shared_state() {}
+ };
+
+ ////////////////////////////////
+ // detail::future_async_when_any_shared_state
+ ////////////////////////////////
+ template<typename F>
+ struct future_when_any_vector_shared_state: future_async_shared_state_base<csbl::vector<F> >
+ {
+ typedef csbl::vector<F> vector_type;
+ typedef typename F::value_type value_type;
+ vector_type vec_;
+
+ static void run(shared_ptr<boost::detail::shared_state_base> that_)
+ {
+ future_when_any_vector_shared_state* that = static_cast<future_when_any_vector_shared_state*>(that_.get());
+ try {
+ boost::wait_for_any(that->vec_.begin(), that->vec_.end());
+ that->mark_finished_with_result(boost::move(that->vec_));
+ } catch(...) {
+ that->mark_exceptional_finish();
+ }
+ }
+ bool run_deferred() {
+
+ for (typename csbl::vector<F>::iterator it = vec_.begin(); it != vec_.end(); ++it) {
+ if (it->run_if_is_deferred_or_ready())
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+ void init() {
+ if (run_deferred())
+ {
+ future_when_any_vector_shared_state::run(this->shared_from_this());
+ return;
+ }
+
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ this->thr_ = boost::thread(&future_when_any_vector_shared_state::run, this->shared_from_this());
+#else
+ boost::thread(&future_when_any_vector_shared_state::run, this->shared_from_this()).detach();
+#endif
+ }
+
+ public:
+ template< typename InputIterator>
+ future_when_any_vector_shared_state(input_iterator_tag, InputIterator first, InputIterator last)
+ : vec_(std::make_move_iterator(first), std::make_move_iterator(last))
+ {
+ }
+
+ future_when_any_vector_shared_state(vector_tag, BOOST_THREAD_RV_REF(csbl::vector<F>) v)
+ : vec_(boost::move(v))
+ {
+ }
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ future_when_any_vector_shared_state(values_tag,
+ BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures
+ ) {
+ vec_.push_back(boost::forward<T0>(f));
+ typename alias_t<char[]>::type{
+ ( //first part of magic unpacker
+ vec_.push_back(boost::forward<T>(futures))
+ ,'0'
+ )...,
+ '0'
+ }; //second part of magic unpacker
+ }
+#endif
+
+ ~future_when_any_vector_shared_state() {}
+ };
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ struct wait_for_all_fctr {
+ template <class ...T>
+ void operator()(T&&... v) {
+ boost::wait_for_all(boost::forward<T>(v)...);
+ }
+ };
+
+ struct wait_for_any_fctr {
+ template <class ...T>
+ void operator()(T&&... v) {
+ boost::wait_for_any(boost::forward<T>(v)...);
+ }
+ };
+
+
+ template <class Tuple, std::size_t i=csbl::tuple_size<Tuple>::value>
+ struct accumulate_run_if_is_deferred {
+ bool operator ()(Tuple& t)
+ {
+ return (! csbl::get<i-1>(t).run_if_is_deferred()) || accumulate_run_if_is_deferred<Tuple,i-1>()(t);
+ }
+ };
+ template <class Tuple>
+ struct accumulate_run_if_is_deferred<Tuple, 0> {
+ bool operator ()(Tuple& )
+ {
+ return false;
+ }
+ };
+
+
+ template< typename Tuple, typename T0, typename ...T>
+ struct future_when_all_tuple_shared_state: future_async_shared_state_base<Tuple>
+ {
+ Tuple tup_;
+ typedef typename make_tuple_indices<1+sizeof...(T)>::type Index;
+
+ static void run(shared_ptr<boost::detail::shared_state_base> that_) {
+ future_when_all_tuple_shared_state* that = static_cast<future_when_all_tuple_shared_state*>(that_.get());
+ try {
+ // TODO make use of apply(that->tup_, boost::detail::wait_for_all_fctor());
+ that->wait_for_all(Index());
+
+ that->mark_finished_with_result(boost::move(that->tup_));
+ } catch(...) {
+ that->mark_exceptional_finish();
+ }
+ }
+
+ template <size_t ...Indices>
+ void wait_for_all(tuple_indices<Indices...>) {
+#if defined BOOST_THREAD_PROVIDES_INVOKE
+ return invoke<void>(wait_for_all_fctr(), csbl::get<Indices>(tup_)...);
+#else
+ return wait_for_all_fctr()(csbl::get<Indices>(tup_)...);
+#endif
+ }
+
+ bool run_deferred() {
+
+ return accumulate_run_if_is_deferred<Tuple>()(tup_);
+ }
+ void init() {
+ if (! run_deferred())
+ {
+ future_when_all_tuple_shared_state::run(this->shared_from_this());
+ return;
+ }
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ this->thr_ = boost::thread(&future_when_all_tuple_shared_state::run, this->shared_from_this());
+#else
+ boost::thread(&future_when_all_tuple_shared_state::run, this->shared_from_this()).detach();
+#endif
+
+ }
+ public:
+ template< typename F, typename ...Fs>
+ future_when_all_tuple_shared_state(values_tag, BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(Fs) ... futures) :
+ tup_(boost::csbl::make_tuple(boost::forward<F>(f), boost::forward<Fs>(futures)...))
+ {
+ }
+
+ ~future_when_all_tuple_shared_state() {}
+
+ };
+
+
+ template <class Tuple, std::size_t i=csbl::tuple_size<Tuple>::value>
+ struct apply_any_run_if_is_deferred_or_ready {
+ bool operator ()(Tuple& t)
+ {
+ if (csbl::get<i-1>(t).run_if_is_deferred_or_ready()) return true;
+ return apply_any_run_if_is_deferred_or_ready<Tuple,i-1>()(t);
+ }
+ };
+ template <class Tuple>
+ struct apply_any_run_if_is_deferred_or_ready<Tuple, 0> {
+ bool operator ()(Tuple& )
+ {
+ return false;
+ }
+ };
+
+ template< typename Tuple, typename T0, typename ...T >
+ struct future_when_any_tuple_shared_state: future_async_shared_state_base<Tuple>
+ {
+ Tuple tup_;
+ typedef typename make_tuple_indices<1+sizeof...(T)>::type Index;
+
+ static void run(shared_ptr<boost::detail::shared_state_base> that_)
+ {
+ future_when_any_tuple_shared_state* that = static_cast<future_when_any_tuple_shared_state*>(that_.get());
+ try {
+ // TODO make use of apply(that->tup_, wait_for_any_fctr);
+ that->wait_for_any(Index());
+
+ that->mark_finished_with_result(boost::move(that->tup_));
+ } catch(...) {
+ that->mark_exceptional_finish();
+ }
+ }
+ template <size_t ...Indices>
+ void wait_for_any(tuple_indices<Indices...>) {
+#if defined BOOST_THREAD_PROVIDES_INVOKE
+ return invoke<void>(wait_for_any_fctr(), csbl::get<Indices>(tup_)...);
+#else
+ return wait_for_any_fctr()(csbl::get<Indices>(tup_)...);
+#endif
+ }
+ bool run_deferred() {
+ return apply_any_run_if_is_deferred_or_ready<Tuple>()(tup_);
+ }
+ void init() {
+ if (run_deferred())
+ {
+ future_when_any_tuple_shared_state::run(this->shared_from_this());
+ return;
+ }
+
+#ifdef BOOST_THREAD_FUTURE_BLOCKING
+ this->thr_ = boost::thread(&future_when_any_tuple_shared_state::run, this->shared_from_this());
+#else
+ boost::thread(&future_when_any_tuple_shared_state::run, this->shared_from_this()).detach();
+#endif
+ }
+
+ public:
+ template< typename F, typename ...Fs>
+ future_when_any_tuple_shared_state(values_tag,
+ BOOST_THREAD_FWD_REF(F) f, BOOST_THREAD_FWD_REF(Fs) ... futures
+ ) :
+ tup_(boost::csbl::make_tuple(boost::forward<F>(f), boost::forward<Fs>(futures)...))
+ {
+ }
+
+ ~future_when_any_tuple_shared_state() {}
+ };
+#endif
+
+}
+
+ template< typename InputIterator>
+ typename boost::disable_if<is_future_type<InputIterator>,
+ BOOST_THREAD_FUTURE<csbl::vector<typename InputIterator::value_type> >
+ >::type
+ when_all(InputIterator first, InputIterator last) {
+ typedef typename InputIterator::value_type value_type;
+ typedef csbl::vector<value_type> container_type;
+ typedef detail::future_when_all_vector_shared_state<value_type> factory_type;
+
+ if (first==last) return make_ready_future(container_type());
+ shared_ptr<factory_type >
+ h(new factory_type(detail::input_iterator_tag_value, first,last));
+ h->init();
+ return BOOST_THREAD_FUTURE<container_type>(h);
+ }
+
+ inline BOOST_THREAD_FUTURE<csbl::tuple<> > when_all() {
+ return make_ready_future(csbl::tuple<>());
+ }
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ BOOST_THREAD_FUTURE<csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> >
+ when_all(BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures) {
+ typedef csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> container_type;
+ typedef detail::future_when_all_tuple_shared_state<container_type, typename decay<T0>::type, typename decay<T>::type...> factory_type;
+
+ shared_ptr<factory_type>
+ h(new factory_type(detail::values_tag_value, boost::forward<T0>(f), boost::forward<T>(futures)...));
+ h->init();
+ return BOOST_THREAD_FUTURE<container_type>(h);
+ }
+#endif
+
+ template< typename InputIterator>
+ typename boost::disable_if<is_future_type<InputIterator>,
+ BOOST_THREAD_FUTURE<csbl::vector<typename InputIterator::value_type> >
+ >::type
+ when_any(InputIterator first, InputIterator last) {
+ typedef typename InputIterator::value_type value_type;
+ typedef csbl::vector<value_type> container_type;
+ typedef detail::future_when_any_vector_shared_state<value_type> factory_type;
+
+ if (first==last) return make_ready_future(container_type());
+ shared_ptr<factory_type >
+ h(new factory_type(detail::input_iterator_tag_value, first,last));
+ h->init();
+ return BOOST_THREAD_FUTURE<container_type>(h);
+ }
+
+ inline BOOST_THREAD_FUTURE<csbl::tuple<> > when_any() {
+ return make_ready_future(csbl::tuple<>());
+ }
+
+#if ! defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+ template< typename T0, typename ...T>
+ BOOST_THREAD_FUTURE<csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> >
+ when_any(BOOST_THREAD_FWD_REF(T0) f, BOOST_THREAD_FWD_REF(T) ... futures) {
+ typedef csbl::tuple<typename decay<T0>::type, typename decay<T>::type...> container_type;
+ typedef detail::future_when_any_tuple_shared_state<container_type, typename decay<T0>::type, typename decay<T>::type...> factory_type;
+
+ shared_ptr<factory_type>
+ h(new factory_type(detail::values_tag_value, boost::forward<T0>(f), boost::forward<T>(futures)...));
+ h->init();
+ return BOOST_THREAD_FUTURE<container_type>(h);
+ }
+#endif
+#endif // BOOST_THREAD_PROVIDES_FUTURE_WHEN_ALL_WHEN_ANY
+}
+
+#endif // BOOST_NO_EXCEPTIONS
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/future_error.hpp b/src/third_party/boost-1.69.0/boost/thread/futures/future_error.hpp
new file mode 100644
index 00000000000..6212deece36
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/futures/future_error.hpp
@@ -0,0 +1,98 @@
+// (C) Copyright 2008-10 Anthony Williams
+// (C) Copyright 2011-2015 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_FUTURES_FUTURE_ERROR_HPP
+#define BOOST_THREAD_FUTURES_FUTURE_ERROR_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/thread/futures/future_error_code.hpp>
+#include <boost/system/error_code.hpp>
+
+#include <stdexcept>
+
+namespace boost
+{
+ class BOOST_SYMBOL_VISIBLE future_error
+ : public std::logic_error
+ {
+ system::error_code ec_;
+ public:
+ future_error(system::error_code ec)
+ : logic_error(ec.message()),
+ ec_(ec)
+ {
+ }
+
+ const system::error_code& code() const BOOST_NOEXCEPT
+ {
+ return ec_;
+ }
+ };
+
+ class BOOST_SYMBOL_VISIBLE future_uninitialized:
+ public future_error
+ {
+ public:
+ future_uninitialized() :
+ future_error(system::make_error_code(future_errc::no_state))
+ {}
+ };
+ class BOOST_SYMBOL_VISIBLE broken_promise:
+ public future_error
+ {
+ public:
+ broken_promise():
+ future_error(system::make_error_code(future_errc::broken_promise))
+ {}
+ };
+ class BOOST_SYMBOL_VISIBLE future_already_retrieved:
+ public future_error
+ {
+ public:
+ future_already_retrieved():
+ future_error(system::make_error_code(future_errc::future_already_retrieved))
+ {}
+ };
+ class BOOST_SYMBOL_VISIBLE promise_already_satisfied:
+ public future_error
+ {
+ public:
+ promise_already_satisfied():
+ future_error(system::make_error_code(future_errc::promise_already_satisfied))
+ {}
+ };
+
+ class BOOST_SYMBOL_VISIBLE task_already_started:
+ public future_error
+ {
+ public:
+ task_already_started():
+ future_error(system::make_error_code(future_errc::promise_already_satisfied))
+ {}
+ };
+
+ class BOOST_SYMBOL_VISIBLE task_moved:
+ public future_error
+ {
+ public:
+ task_moved():
+ future_error(system::make_error_code(future_errc::no_state))
+ {}
+ };
+
+ class promise_moved:
+ public future_error
+ {
+ public:
+ promise_moved():
+ future_error(system::make_error_code(future_errc::no_state))
+ {}
+ };
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/future_error_code.hpp b/src/third_party/boost-1.69.0/boost/thread/futures/future_error_code.hpp
new file mode 100644
index 00000000000..7c8b6f2696a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/futures/future_error_code.hpp
@@ -0,0 +1,61 @@
+// (C) Copyright 2008-10 Anthony Williams
+// (C) Copyright 2011-2012,2015 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_FUTURES_FUTURE_ERROR_CODE_HPP
+#define BOOST_THREAD_FUTURES_FUTURE_ERROR_CODE_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/core/scoped_enum.hpp>
+#include <boost/system/error_code.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace boost
+{
+
+ //enum class future_errc
+ BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_errc)
+ {
+ broken_promise = 1,
+ future_already_retrieved,
+ promise_already_satisfied,
+ no_state
+ }
+ BOOST_SCOPED_ENUM_DECLARE_END(future_errc)
+
+ namespace system
+ {
+ template <>
+ struct BOOST_SYMBOL_VISIBLE is_error_code_enum< ::boost::future_errc> : public true_type {};
+
+ #ifdef BOOST_NO_CXX11_SCOPED_ENUMS
+ template <>
+ struct BOOST_SYMBOL_VISIBLE is_error_code_enum< ::boost::future_errc::enum_type> : public true_type { };
+ #endif
+ } // system
+
+ BOOST_THREAD_DECL
+ const system::error_category& future_category() BOOST_NOEXCEPT;
+
+ namespace system
+ {
+ inline
+ error_code
+ make_error_code(future_errc e) BOOST_NOEXCEPT
+ {
+ return error_code(underlying_cast<int>(e), boost::future_category());
+ }
+
+ inline
+ error_condition
+ make_error_condition(future_errc e) BOOST_NOEXCEPT
+ {
+ return error_condition(underlying_cast<int>(e), boost::future_category());
+ }
+ } // system
+} // boost
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/future_status.hpp b/src/third_party/boost-1.69.0/boost/thread/futures/future_status.hpp
new file mode 100644
index 00000000000..383ac4673cf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/futures/future_status.hpp
@@ -0,0 +1,30 @@
+// (C) Copyright 2008-10 Anthony Williams
+// (C) Copyright 2011-2015 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_FUTURES_FUTURE_STATUS_HPP
+#define BOOST_THREAD_FUTURES_FUTURE_STATUS_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/core/scoped_enum.hpp>
+
+namespace boost
+{
+ //enum class future_status
+ BOOST_SCOPED_ENUM_DECLARE_BEGIN(future_status)
+ {
+ ready,
+ timeout,
+ deferred
+ }
+ BOOST_SCOPED_ENUM_DECLARE_END(future_status)
+ namespace future_state
+ {
+ enum state { uninitialized, waiting, ready, moved, deferred };
+ }
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/is_future_type.hpp b/src/third_party/boost-1.69.0/boost/thread/futures/is_future_type.hpp
new file mode 100644
index 00000000000..df7a680faae
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/futures/is_future_type.hpp
@@ -0,0 +1,21 @@
+// (C) Copyright 2008-10 Anthony Williams
+// (C) Copyright 2011-2015 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_FUTURES_IS_FUTURE_TYPE_HPP
+#define BOOST_THREAD_FUTURES_IS_FUTURE_TYPE_HPP
+
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace boost
+{
+ template<typename T>
+ struct is_future_type : false_type
+ {
+ };
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/launch.hpp b/src/third_party/boost-1.69.0/boost/thread/futures/launch.hpp
new file mode 100644
index 00000000000..329f40d8f34
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/futures/launch.hpp
@@ -0,0 +1,32 @@
+// (C) Copyright 2008-10 Anthony Williams
+// (C) Copyright 2011-2015 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_FUTURES_LAUNCH_HPP
+#define BOOST_THREAD_FUTURES_LAUNCH_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/core/scoped_enum.hpp>
+
+namespace boost
+{
+ //enum class launch
+ BOOST_SCOPED_ENUM_DECLARE_BEGIN(launch)
+ {
+ none = 0,
+ async = 1,
+ deferred = 2,
+#ifdef BOOST_THREAD_PROVIDES_EXECUTORS
+ executor = 4,
+#endif
+ inherit = 8,
+ sync = 16,
+ any = async | deferred
+ }
+ BOOST_SCOPED_ENUM_DECLARE_END(launch)
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_all.hpp b/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_all.hpp
new file mode 100644
index 00000000000..398eb4adeee
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_all.hpp
@@ -0,0 +1,74 @@
+// (C) Copyright 2008-10 Anthony Williams
+// (C) Copyright 2011-2015 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_FUTURES_WAIT_FOR_ALL_HPP
+#define BOOST_THREAD_FUTURES_WAIT_FOR_ALL_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/futures/is_future_type.hpp>
+
+#include <boost/core/enable_if.hpp>
+
+namespace boost
+{
+ template<typename Iterator>
+ typename boost::disable_if<is_future_type<Iterator>,void>::type wait_for_all(Iterator begin,Iterator end)
+ {
+ for(Iterator current=begin;current!=end;++current)
+ {
+ current->wait();
+ }
+ }
+
+#ifdef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+ template<typename F1,typename F2>
+ typename boost::enable_if<is_future_type<F1>,void>::type wait_for_all(F1& f1,F2& f2)
+ {
+ f1.wait();
+ f2.wait();
+ }
+
+ template<typename F1,typename F2,typename F3>
+ void wait_for_all(F1& f1,F2& f2,F3& f3)
+ {
+ f1.wait();
+ f2.wait();
+ f3.wait();
+ }
+
+ template<typename F1,typename F2,typename F3,typename F4>
+ void wait_for_all(F1& f1,F2& f2,F3& f3,F4& f4)
+ {
+ f1.wait();
+ f2.wait();
+ f3.wait();
+ f4.wait();
+ }
+
+ template<typename F1,typename F2,typename F3,typename F4,typename F5>
+ void wait_for_all(F1& f1,F2& f2,F3& f3,F4& f4,F5& f5)
+ {
+ f1.wait();
+ f2.wait();
+ f3.wait();
+ f4.wait();
+ f5.wait();
+ }
+#else
+ template<typename F1, typename... Fs>
+ typename boost::enable_if<is_future_type<F1>,void>::type wait_for_all(F1& f1, Fs&... fs)
+ {
+ bool dummy[] = { (f1.wait(), true), (fs.wait(), true)... };
+
+ // prevent unused parameter warning
+ (void) dummy;
+ }
+#endif // !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)}
+
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_any.hpp b/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_any.hpp
new file mode 100644
index 00000000000..b869a4318a8
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/futures/wait_for_any.hpp
@@ -0,0 +1,161 @@
+// (C) Copyright 2008-10 Anthony Williams
+// (C) Copyright 2011-2015 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_THREAD_FUTURES_WAIT_FOR_ANY_HPP
+#define BOOST_THREAD_FUTURES_WAIT_FOR_ANY_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/futures/is_future_type.hpp>
+#include <boost/thread/lock_algorithms.hpp>
+#include <boost/thread/mutex.hpp>
+
+#include <boost/core/enable_if.hpp>
+#include <boost/next_prior.hpp>
+#include <boost/scoped_array.hpp>
+
+#include <iterator>
+#include <vector>
+
+namespace boost
+{
+ namespace detail
+ {
+ template <class Future>
+ class waiter_for_any_in_seq
+ {
+ struct registered_waiter;
+ typedef std::vector<int>::size_type count_type;
+
+ struct registered_waiter
+ {
+ typedef Future future_type;
+ future_type* future_;
+ typedef typename Future::notify_when_ready_handle notify_when_ready_handle;
+ notify_when_ready_handle handle;
+ count_type index;
+
+ registered_waiter(future_type & a_future,
+ notify_when_ready_handle handle_, count_type index_) :
+ future_(&a_future), handle(handle_), index(index_)
+ {
+ }
+ };
+
+ struct all_futures_lock
+ {
+#ifdef _MANAGED
+ typedef std::ptrdiff_t count_type_portable;
+#else
+ typedef count_type count_type_portable;
+#endif
+ count_type_portable count;
+ boost::scoped_array<boost::unique_lock<boost::mutex> > locks;
+
+ all_futures_lock(std::vector<registered_waiter>& waiters) :
+ count(waiters.size()), locks(new boost::unique_lock<boost::mutex>[count])
+ {
+ for (count_type_portable i = 0; i < count; ++i)
+ {
+ locks[i] = BOOST_THREAD_MAKE_RV_REF(boost::unique_lock<boost::mutex>(waiters[i].future_->mutex()));
+ }
+ }
+
+ void lock()
+ {
+ boost::lock(locks.get(), locks.get() + count);
+ }
+
+ void unlock()
+ {
+ for (count_type_portable i = 0; i < count; ++i)
+ {
+ locks[i].unlock();
+ }
+ }
+ };
+
+ boost::condition_variable_any cv;
+ std::vector<registered_waiter> waiters_;
+ count_type future_count;
+
+ public:
+ waiter_for_any_in_seq() :
+ future_count(0)
+ {
+ }
+
+ template <typename F>
+ void add(F& f)
+ {
+ if (f.valid())
+ {
+ registered_waiter waiter(f, f.notify_when_ready(cv), future_count);
+ try
+ {
+ waiters_.push_back(waiter);
+ }
+ catch (...)
+ {
+ f.future_->unnotify_when_ready(waiter.handle);
+ throw;
+ }
+ ++future_count;
+ }
+ }
+
+#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES
+ template <typename F1, typename ... Fs>
+ void add(F1& f1, Fs&... fs)
+ {
+ add(f1);
+ add(fs...);
+ }
+#endif
+
+ count_type wait()
+ {
+ all_futures_lock lk(waiters_);
+ for (;;)
+ {
+ for (count_type i = 0; i < waiters_.size(); ++i)
+ {
+ if (waiters_[i].future_->is_ready(lk.locks[i]))
+ {
+ return waiters_[i].index;
+ }
+ }
+ cv.wait(lk);
+ }
+ }
+
+ ~waiter_for_any_in_seq()
+ {
+ for (count_type i = 0; i < waiters_.size(); ++i)
+ {
+ waiters_[i].future_->unnotify_when_ready(waiters_[i].handle);
+ }
+ }
+ };
+ }
+
+ template <typename Iterator>
+ typename boost::disable_if<is_future_type<Iterator> , Iterator>::type wait_for_any(Iterator begin, Iterator end)
+ {
+ if (begin == end) return end;
+
+ detail::waiter_for_any_in_seq<typename std::iterator_traits<Iterator>::value_type> waiter;
+ for (Iterator current = begin; current != end; ++current)
+ {
+ waiter.add(*current);
+ }
+ return boost::next(begin, waiter.wait());
+ }
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/is_locked_by_this_thread.hpp b/src/third_party/boost-1.69.0/boost/thread/is_locked_by_this_thread.hpp
new file mode 100644
index 00000000000..6344c0ff6dd
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/is_locked_by_this_thread.hpp
@@ -0,0 +1,39 @@
+// (C) Copyright 2012 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#ifndef BOOST_THREAD_IS_LOCKED_BY_THIS_THREAD_HPP
+#define BOOST_THREAD_IS_LOCKED_BY_THIS_THREAD_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ template <typename Lockable>
+ class testable_mutex;
+
+ /**
+ * Overloaded function used to check if the mutex is locked when it is testable and do nothing otherwise.
+ *
+ * This function is used usually to assert the pre-condition when the function can only be called when the mutex
+ * must be locked by the current thread.
+ */
+ template <typename Lockable>
+ bool is_locked_by_this_thread(testable_mutex<Lockable> const& mtx)
+ {
+ return mtx.is_locked_by_this_thread();
+ }
+ template <typename Lockable>
+ bool is_locked_by_this_thread(Lockable const&)
+ {
+ return true;
+ }
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/lock_algorithms.hpp b/src/third_party/boost-1.69.0/boost/thread/lock_algorithms.hpp
new file mode 100644
index 00000000000..7a55f92a289
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/lock_algorithms.hpp
@@ -0,0 +1,468 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_LOCK_ALGORITHMS_HPP
+#define BOOST_THREAD_LOCK_ALGORITHMS_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/lock_types.hpp>
+#include <boost/thread/lockable_traits.hpp>
+
+#include <algorithm>
+#include <iterator>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ template <typename MutexType1, typename MutexType2>
+ unsigned try_lock_internal(MutexType1& m1, MutexType2& m2)
+ {
+ boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
+ if (!l1)
+ {
+ return 1;
+ }
+ if (!m2.try_lock())
+ {
+ return 2;
+ }
+ l1.release();
+ return 0;
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3>
+ unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3)
+ {
+ boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
+ if (!l1)
+ {
+ return 1;
+ }
+ if (unsigned const failed_lock=try_lock_internal(m2,m3))
+ {
+ return failed_lock + 1;
+ }
+ l1.release();
+ return 0;
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4>
+ unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4)
+ {
+ boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
+ if (!l1)
+ {
+ return 1;
+ }
+ if (unsigned const failed_lock=try_lock_internal(m2,m3,m4))
+ {
+ return failed_lock + 1;
+ }
+ l1.release();
+ return 0;
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4, typename MutexType5>
+ unsigned try_lock_internal(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5)
+ {
+ boost::unique_lock<MutexType1> l1(m1, boost::try_to_lock);
+ if (!l1)
+ {
+ return 1;
+ }
+ if (unsigned const failed_lock=try_lock_internal(m2,m3,m4,m5))
+ {
+ return failed_lock + 1;
+ }
+ l1.release();
+ return 0;
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ unsigned lock_helper(MutexType1& m1, MutexType2& m2)
+ {
+ boost::unique_lock<MutexType1> l1(m1);
+ if (!m2.try_lock())
+ {
+ return 1;
+ }
+ l1.release();
+ return 0;
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3>
+ unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3)
+ {
+ boost::unique_lock<MutexType1> l1(m1);
+ if (unsigned const failed_lock=try_lock_internal(m2,m3))
+ {
+ return failed_lock;
+ }
+ l1.release();
+ return 0;
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4>
+ unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4)
+ {
+ boost::unique_lock<MutexType1> l1(m1);
+ if (unsigned const failed_lock=try_lock_internal(m2,m3,m4))
+ {
+ return failed_lock;
+ }
+ l1.release();
+ return 0;
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4, typename MutexType5>
+ unsigned lock_helper(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5)
+ {
+ boost::unique_lock<MutexType1> l1(m1);
+ if (unsigned const failed_lock=try_lock_internal(m2,m3,m4,m5))
+ {
+ return failed_lock;
+ }
+ l1.release();
+ return 0;
+ }
+ }
+
+ namespace detail
+ {
+ template <bool x>
+ struct is_mutex_type_wrapper
+ {
+ };
+
+ template <typename MutexType1, typename MutexType2>
+ void lock_impl(MutexType1& m1, MutexType2& m2, is_mutex_type_wrapper<true> )
+ {
+ unsigned const lock_count = 2;
+ unsigned lock_first = 0;
+ for (;;)
+ {
+ switch (lock_first)
+ {
+ case 0:
+ lock_first = detail::lock_helper(m1, m2);
+ if (!lock_first) return;
+ break;
+ case 1:
+ lock_first = detail::lock_helper(m2, m1);
+ if (!lock_first) return;
+ lock_first = (lock_first + 1) % lock_count;
+ break;
+ }
+ }
+ }
+
+ template <typename Iterator>
+ void lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper<false> );
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ void lock(MutexType1& m1, MutexType2& m2)
+ {
+ detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ void lock(const MutexType1& m1, MutexType2& m2)
+ {
+ detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ void lock(MutexType1& m1, const MutexType2& m2)
+ {
+ detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ void lock(const MutexType1& m1, const MutexType2& m2)
+ {
+ detail::lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3>
+ void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3)
+ {
+ unsigned const lock_count = 3;
+ unsigned lock_first = 0;
+ for (;;)
+ {
+ switch (lock_first)
+ {
+ case 0:
+ lock_first = detail::lock_helper(m1, m2, m3);
+ if (!lock_first) return;
+ break;
+ case 1:
+ lock_first = detail::lock_helper(m2, m3, m1);
+ if (!lock_first) return;
+ lock_first = (lock_first + 1) % lock_count;
+ break;
+ case 2:
+ lock_first = detail::lock_helper(m3, m1, m2);
+ if (!lock_first) return;
+ lock_first = (lock_first + 2) % lock_count;
+ break;
+ }
+ }
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4>
+ void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4)
+ {
+ unsigned const lock_count = 4;
+ unsigned lock_first = 0;
+ for (;;)
+ {
+ switch (lock_first)
+ {
+ case 0:
+ lock_first = detail::lock_helper(m1, m2, m3, m4);
+ if (!lock_first) return;
+ break;
+ case 1:
+ lock_first = detail::lock_helper(m2, m3, m4, m1);
+ if (!lock_first) return;
+ lock_first = (lock_first + 1) % lock_count;
+ break;
+ case 2:
+ lock_first = detail::lock_helper(m3, m4, m1, m2);
+ if (!lock_first) return;
+ lock_first = (lock_first + 2) % lock_count;
+ break;
+ case 3:
+ lock_first = detail::lock_helper(m4, m1, m2, m3);
+ if (!lock_first) return;
+ lock_first = (lock_first + 3) % lock_count;
+ break;
+ }
+ }
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4, typename MutexType5>
+ void lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5)
+ {
+ unsigned const lock_count = 5;
+ unsigned lock_first = 0;
+ for (;;)
+ {
+ switch (lock_first)
+ {
+ case 0:
+ lock_first = detail::lock_helper(m1, m2, m3, m4, m5);
+ if (!lock_first) return;
+ break;
+ case 1:
+ lock_first = detail::lock_helper(m2, m3, m4, m5, m1);
+ if (!lock_first) return;
+ lock_first = (lock_first + 1) % lock_count;
+ break;
+ case 2:
+ lock_first = detail::lock_helper(m3, m4, m5, m1, m2);
+ if (!lock_first) return;
+ lock_first = (lock_first + 2) % lock_count;
+ break;
+ case 3:
+ lock_first = detail::lock_helper(m4, m5, m1, m2, m3);
+ if (!lock_first) return;
+ lock_first = (lock_first + 3) % lock_count;
+ break;
+ case 4:
+ lock_first = detail::lock_helper(m5, m1, m2, m3, m4);
+ if (!lock_first) return;
+ lock_first = (lock_first + 4) % lock_count;
+ break;
+ }
+ }
+ }
+
+ namespace detail
+ {
+ template <typename Mutex, bool x = is_mutex_type<Mutex>::value>
+ struct try_lock_impl_return
+ {
+ typedef int type;
+ };
+
+ template <typename Iterator>
+ struct try_lock_impl_return<Iterator, false>
+ {
+ typedef Iterator type;
+ };
+
+ template <typename MutexType1, typename MutexType2>
+ int try_lock_impl(MutexType1& m1, MutexType2& m2, is_mutex_type_wrapper<true> )
+ {
+ return ((int) detail::try_lock_internal(m1, m2)) - 1;
+ }
+
+ template <typename Iterator>
+ Iterator try_lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper<false> );
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ typename detail::try_lock_impl_return<MutexType1>::type try_lock(MutexType1& m1, MutexType2& m2)
+ {
+ return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ typename detail::try_lock_impl_return<MutexType1>::type try_lock(const MutexType1& m1, MutexType2& m2)
+ {
+ return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ typename detail::try_lock_impl_return<MutexType1>::type try_lock(MutexType1& m1, const MutexType2& m2)
+ {
+ return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
+ }
+
+ template <typename MutexType1, typename MutexType2>
+ typename detail::try_lock_impl_return<MutexType1>::type try_lock(const MutexType1& m1, const MutexType2& m2)
+ {
+ return detail::try_lock_impl(m1, m2, detail::is_mutex_type_wrapper<is_mutex_type<MutexType1>::value>());
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3>
+ int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3)
+ {
+ return ((int) detail::try_lock_internal(m1, m2, m3)) - 1;
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4>
+ int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4)
+ {
+ return ((int) detail::try_lock_internal(m1, m2, m3, m4)) - 1;
+ }
+
+ template <typename MutexType1, typename MutexType2, typename MutexType3, typename MutexType4, typename MutexType5>
+ int try_lock(MutexType1& m1, MutexType2& m2, MutexType3& m3, MutexType4& m4, MutexType5& m5)
+ {
+ return ((int) detail::try_lock_internal(m1, m2, m3, m4, m5)) - 1;
+ }
+
+ namespace detail
+ {
+ template <typename Iterator>
+ struct range_lock_guard
+ {
+ Iterator begin;
+ Iterator end;
+
+ range_lock_guard(Iterator begin_, Iterator end_) :
+ begin(begin_), end(end_)
+ {
+ boost::lock(begin, end);
+ }
+
+ void release()
+ {
+ begin = end;
+ }
+
+ ~range_lock_guard()
+ {
+ for (; begin != end; ++begin)
+ {
+ begin->unlock();
+ }
+ }
+ };
+
+ template <typename Iterator>
+ Iterator try_lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper<false> )
+
+ {
+ if (begin == end)
+ {
+ return end;
+ }
+ typedef typename std::iterator_traits<Iterator>::value_type lock_type;
+ unique_lock<lock_type> guard(*begin, try_to_lock);
+
+ if (!guard.owns_lock())
+ {
+ return begin;
+ }
+ Iterator const failed = boost::try_lock(++begin, end);
+ if (failed == end)
+ {
+ guard.release();
+ }
+
+ return failed;
+ }
+ }
+
+ namespace detail
+ {
+ template <typename Iterator>
+ void lock_impl(Iterator begin, Iterator end, is_mutex_type_wrapper<false> )
+ {
+ typedef typename std::iterator_traits<Iterator>::value_type lock_type;
+
+ if (begin == end)
+ {
+ return;
+ }
+ bool start_with_begin = true;
+ Iterator second = begin;
+ ++second;
+ Iterator next = second;
+
+ for (;;)
+ {
+ unique_lock<lock_type> begin_lock(*begin, defer_lock);
+ if (start_with_begin)
+ {
+ begin_lock.lock();
+ Iterator const failed_lock = boost::try_lock(next, end);
+ if (failed_lock == end)
+ {
+ begin_lock.release();
+ return;
+ }
+ start_with_begin = false;
+ next = failed_lock;
+ }
+ else
+ {
+ detail::range_lock_guard<Iterator> guard(next, end);
+ if (begin_lock.try_lock())
+ {
+ Iterator const failed_lock = boost::try_lock(second, next);
+ if (failed_lock == next)
+ {
+ begin_lock.release();
+ guard.release();
+ return;
+ }
+ start_with_begin = false;
+ next = failed_lock;
+ }
+ else
+ {
+ start_with_begin = true;
+ next = second;
+ }
+ }
+ }
+ }
+
+ }
+
+}
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/lock_guard.hpp b/src/third_party/boost-1.69.0/boost/thread/lock_guard.hpp
new file mode 100644
index 00000000000..3f9ba9b1d0f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/lock_guard.hpp
@@ -0,0 +1,88 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_LOCK_GUARD_HPP
+#define BOOST_THREAD_LOCK_GUARD_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/detail/delete.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/detail/lockable_wrapper.hpp>
+#include <boost/thread/lock_options.hpp>
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+#include <boost/thread/is_locked_by_this_thread.hpp>
+#include <boost/assert.hpp>
+#endif
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+
+ template <typename Mutex>
+ class BOOST_THREAD_SCOPED_CAPABILITY lock_guard
+ {
+ private:
+ Mutex& m;
+
+ public:
+ typedef Mutex mutex_type;
+ BOOST_THREAD_NO_COPYABLE( lock_guard )
+
+ explicit lock_guard(Mutex& m_) BOOST_THREAD_ACQUIRE(m_) :
+ m(m_)
+ {
+ m.lock();
+ }
+
+ lock_guard(Mutex& m_, adopt_lock_t) BOOST_THREAD_REQUIRES(m_) :
+ m(m_)
+ {
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ BOOST_ASSERT(is_locked_by_this_thread(m));
+#endif
+ }
+
+#if ! defined BOOST_THREAD_NO_CXX11_HDR_INITIALIZER_LIST
+ lock_guard(std::initializer_list<thread_detail::lockable_wrapper<Mutex> > l_) :
+ m(*(const_cast<thread_detail::lockable_wrapper<Mutex>*>(l_.begin())->m))
+ {
+ m.lock();
+ }
+
+ lock_guard(std::initializer_list<thread_detail::lockable_adopt_wrapper<Mutex> > l_) :
+ m(*(const_cast<thread_detail::lockable_adopt_wrapper<Mutex>*>(l_.begin())->m))
+ {
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ BOOST_ASSERT(is_locked_by_this_thread(m));
+#endif
+ }
+
+#endif
+ ~lock_guard() BOOST_THREAD_RELEASE()
+ {
+ m.unlock();
+ }
+ };
+
+
+#if ! defined BOOST_THREAD_NO_MAKE_LOCK_GUARD
+ template <typename Lockable>
+ lock_guard<Lockable> make_lock_guard(Lockable& mtx)
+ {
+ return { thread_detail::lockable_wrapper<Lockable>(mtx) };
+ }
+ template <typename Lockable>
+ lock_guard<Lockable> make_lock_guard(Lockable& mtx, adopt_lock_t)
+ {
+ return { thread_detail::lockable_adopt_wrapper<Lockable>(mtx) };
+ }
+#endif
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/lock_options.hpp b/src/third_party/boost-1.69.0/boost/thread/lock_options.hpp
new file mode 100644
index 00000000000..68899ca89fe
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/lock_options.hpp
@@ -0,0 +1,31 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_LOCK_OPTIONS_HPP
+#define BOOST_THREAD_LOCK_OPTIONS_HPP
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ struct defer_lock_t
+ {
+ };
+ struct try_to_lock_t
+ {
+ };
+ struct adopt_lock_t
+ {
+ };
+
+ BOOST_CONSTEXPR_OR_CONST defer_lock_t defer_lock = {};
+ BOOST_CONSTEXPR_OR_CONST try_to_lock_t try_to_lock = {};
+ BOOST_CONSTEXPR_OR_CONST adopt_lock_t adopt_lock = {};
+
+}
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/lock_types.hpp b/src/third_party/boost-1.69.0/boost/thread/lock_types.hpp
new file mode 100644
index 00000000000..9b8c57c49fb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/lock_types.hpp
@@ -0,0 +1,1230 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_LOCK_TYPES_HPP
+#define BOOST_THREAD_LOCK_TYPES_HPP
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/exceptions.hpp>
+#include <boost/thread/lock_options.hpp>
+#include <boost/thread/lockable_traits.hpp>
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+#include <boost/thread/is_locked_by_this_thread.hpp>
+#endif
+#include <boost/thread/thread_time.hpp>
+
+#include <boost/assert.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/time_point.hpp>
+#include <boost/chrono/duration.hpp>
+#endif
+#include <boost/detail/workaround.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ struct xtime;
+
+ template <typename Mutex>
+ class shared_lock;
+
+ template <typename Mutex>
+ class upgrade_lock;
+
+ template <typename Mutex>
+ class unique_lock;
+
+ namespace detail
+ {
+ template <typename Mutex>
+ class try_lock_wrapper;
+ }
+
+#ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+ namespace sync
+ {
+ template<typename T>
+ struct is_basic_lockable<unique_lock<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<typename T>
+ struct is_lockable<unique_lock<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<typename T>
+ struct is_basic_lockable<shared_lock<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<typename T>
+ struct is_lockable<shared_lock<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<typename T>
+ struct is_basic_lockable<upgrade_lock<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<typename T>
+ struct is_lockable<upgrade_lock<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ template<typename T>
+ struct is_basic_lockable<detail::try_lock_wrapper<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<typename T>
+ struct is_lockable<detail::try_lock_wrapper<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ }
+#endif
+
+
+ template <typename Mutex>
+ class unique_lock
+ {
+ private:
+ Mutex* m;
+ bool is_locked;
+
+ private:
+ explicit unique_lock(upgrade_lock<Mutex>&);
+ unique_lock& operator=(upgrade_lock<Mutex>& other);
+ public:
+ typedef Mutex mutex_type;
+ BOOST_THREAD_MOVABLE_ONLY( unique_lock)
+
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
+ unique_lock(const volatile unique_lock&);
+#endif
+#endif
+ unique_lock()BOOST_NOEXCEPT :
+ m(0),is_locked(false)
+ {}
+
+ explicit unique_lock(Mutex& m_) :
+ m(&m_), is_locked(false)
+ {
+ lock();
+ }
+ unique_lock(Mutex& m_, adopt_lock_t) :
+ m(&m_), is_locked(true)
+ {
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ BOOST_ASSERT(is_locked_by_this_thread(m));
+#endif
+ }
+ unique_lock(Mutex& m_, defer_lock_t)BOOST_NOEXCEPT:
+ m(&m_),is_locked(false)
+ {}
+ unique_lock(Mutex& m_, try_to_lock_t) :
+ m(&m_), is_locked(false)
+ {
+ try_lock();
+ }
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename TimeDuration>
+ unique_lock(Mutex& m_,TimeDuration const& target_time):
+ m(&m_),is_locked(false)
+ {
+ timed_lock(target_time);
+ }
+ unique_lock(Mutex& m_,system_time const& target_time):
+ m(&m_),is_locked(false)
+ {
+ timed_lock(target_time);
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ unique_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t)
+ : m(&mtx), is_locked(mtx.try_lock_until(t))
+ {
+ }
+ template <class Rep, class Period>
+ unique_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d)
+ : m(&mtx), is_locked(mtx.try_lock_for(d))
+ {
+ }
+#endif
+
+ unique_lock(BOOST_THREAD_RV_REF(unique_lock) other) BOOST_NOEXCEPT:
+ m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
+ {
+ BOOST_THREAD_RV(other).is_locked=false;
+ BOOST_THREAD_RV(other).m=0;
+ }
+
+ BOOST_THREAD_EXPLICIT_LOCK_CONVERSION unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other);
+
+#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+ //std-2104 unique_lock move-assignment should not be noexcept
+ unique_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT
+ {
+ unique_lock temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+#endif
+
+ //std-2104 unique_lock move-assignment should not be noexcept
+ unique_lock& operator=(BOOST_THREAD_RV_REF(unique_lock) other) //BOOST_NOEXCEPT
+ {
+ unique_lock temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+#if 0 // This should not be needed anymore. Use instead BOOST_THREAD_MAKE_RV_REF.
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
+ unique_lock& operator=(unique_lock<Mutex> other)
+ {
+ swap(other);
+ return *this;
+ }
+#endif // BOOST_WORKAROUND
+#endif
+
+ // Conversion from upgrade locking
+ unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<mutex_type> BOOST_THREAD_RV_REF_END ul, try_to_lock_t)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(ul).owns_lock())
+ {
+ if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock())
+ {
+ m = BOOST_THREAD_RV(ul).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(ul).release();
+ }
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<mutex_type> BOOST_THREAD_RV_REF_END ul,
+ const chrono::time_point<Clock, Duration>& abs_time)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(ul).owns_lock())
+ {
+ if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock_until(abs_time))
+ {
+ m = BOOST_THREAD_RV(ul).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(ul).release();
+ }
+ }
+
+ template <class Rep, class Period>
+ unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<mutex_type> BOOST_THREAD_RV_REF_END ul,
+ const chrono::duration<Rep, Period>& rel_time)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(ul).owns_lock())
+ {
+ if (BOOST_THREAD_RV(ul).mutex()->try_unlock_upgrade_and_lock_for(rel_time))
+ {
+ m = BOOST_THREAD_RV(ul).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(ul).release();
+ }
+ }
+#endif
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ // Conversion from shared locking
+ unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl, try_to_lock_t)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(sl).owns_lock())
+ {
+ if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock())
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ }
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl,
+ const chrono::time_point<Clock, Duration>& abs_time)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(sl).owns_lock())
+ {
+ if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_until(abs_time))
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ }
+ }
+
+ template <class Rep, class Period>
+ unique_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl,
+ const chrono::duration<Rep, Period>& rel_time)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(sl).owns_lock())
+ {
+ if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_for(rel_time))
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ }
+ }
+#endif // BOOST_THREAD_USES_CHRONO
+#endif // BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+
+ void swap(unique_lock& other)BOOST_NOEXCEPT
+ {
+ std::swap(m,other.m);
+ std::swap(is_locked,other.is_locked);
+ }
+
+ ~unique_lock()
+ {
+ if (owns_lock())
+ {
+ m->unlock();
+ }
+ }
+ void lock()
+ {
+ if (m == 0)
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex"));
+ }
+ if (owns_lock())
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost unique_lock owns already the mutex"));
+ }
+ m->lock();
+ is_locked = true;
+ }
+ bool try_lock()
+ {
+ if (m == 0)
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex"));
+ }
+ if (owns_lock())
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost unique_lock owns already the mutex"));
+ }
+ is_locked = m->try_lock();
+ return is_locked;
+ }
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const& relative_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost unique_lock owns already the mutex"));
+ }
+ is_locked=m->timed_lock(relative_time);
+ return is_locked;
+ }
+
+ bool timed_lock(::boost::system_time const& absolute_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost unique_lock owns already the mutex"));
+ }
+ is_locked=m->timed_lock(absolute_time);
+ return is_locked;
+ }
+ bool timed_lock(::boost::xtime const& absolute_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost unique_lock owns already the mutex"));
+ }
+ is_locked=m->timed_lock(absolute_time);
+ return is_locked;
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost unique_lock owns already the mutex"));
+ }
+ is_locked=m->try_lock_for(rel_time);
+ return is_locked;
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost unique_lock owns already the mutex"));
+ }
+ is_locked=m->try_lock_until(abs_time);
+ return is_locked;
+ }
+#endif
+
+ void unlock()
+ {
+ if (m == 0)
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock has no mutex"));
+ }
+ if (!owns_lock())
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost unique_lock doesn't own the mutex"));
+ }
+ m->unlock();
+ is_locked = false;
+ }
+
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+ typedef void (unique_lock::*bool_type)();
+ operator bool_type() const BOOST_NOEXCEPT
+ {
+ return is_locked?&unique_lock::lock:0;
+ }
+ bool operator!() const BOOST_NOEXCEPT
+ {
+ return !owns_lock();
+ }
+#else
+ explicit operator bool() const BOOST_NOEXCEPT
+ {
+ return owns_lock();
+ }
+#endif
+ bool owns_lock() const BOOST_NOEXCEPT
+ {
+ return is_locked;
+ }
+
+ Mutex* mutex() const BOOST_NOEXCEPT
+ {
+ return m;
+ }
+
+ Mutex* release()BOOST_NOEXCEPT
+ {
+ Mutex* const res=m;
+ m=0;
+ is_locked=false;
+ return res;
+ }
+
+ friend class shared_lock<Mutex> ;
+ friend class upgrade_lock<Mutex> ;
+ };
+
+ template<typename Mutex>
+ void swap(unique_lock<Mutex>& lhs, unique_lock<Mutex>& rhs)
+ BOOST_NOEXCEPT
+ {
+ lhs.swap(rhs);
+ }
+
+ BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) unique_lock<Mutex> BOOST_THREAD_DCL_MOVABLE_END
+
+ template<typename Mutex>
+ class shared_lock
+ {
+ protected:
+ Mutex* m;
+ bool is_locked;
+
+ public:
+ typedef Mutex mutex_type;
+ BOOST_THREAD_MOVABLE_ONLY(shared_lock)
+
+ shared_lock() BOOST_NOEXCEPT:
+ m(0),is_locked(false)
+ {}
+
+ explicit shared_lock(Mutex& m_):
+ m(&m_),is_locked(false)
+ {
+ lock();
+ }
+ shared_lock(Mutex& m_,adopt_lock_t):
+ m(&m_),is_locked(true)
+ {
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ BOOST_ASSERT(is_locked_by_this_thread(m));
+#endif
+ }
+ shared_lock(Mutex& m_,defer_lock_t) BOOST_NOEXCEPT:
+ m(&m_),is_locked(false)
+ {}
+ shared_lock(Mutex& m_,try_to_lock_t):
+ m(&m_),is_locked(false)
+ {
+ try_lock();
+ }
+#if defined BOOST_THREAD_USES_DATETIME
+ shared_lock(Mutex& m_,system_time const& target_time):
+ m(&m_),is_locked(false)
+ {
+ timed_lock(target_time);
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ shared_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t)
+ : m(&mtx), is_locked(mtx.try_lock_shared_until(t))
+ {
+ }
+ template <class Rep, class Period>
+ shared_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d)
+ : m(&mtx), is_locked(mtx.try_lock_shared_for(d))
+ {
+ }
+#endif
+
+ shared_lock(BOOST_THREAD_RV_REF_BEG shared_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT:
+ m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
+ {
+ BOOST_THREAD_RV(other).is_locked=false;
+ BOOST_THREAD_RV(other).m=0;
+ }
+
+ BOOST_THREAD_EXPLICIT_LOCK_CONVERSION shared_lock(BOOST_THREAD_RV_REF_BEG unique_lock<Mutex> BOOST_THREAD_RV_REF_END other):
+ m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
+ {
+ if(is_locked)
+ {
+ m->unlock_and_lock_shared();
+ }
+ BOOST_THREAD_RV(other).is_locked=false;
+ BOOST_THREAD_RV(other).m=0;
+ }
+
+ BOOST_THREAD_EXPLICIT_LOCK_CONVERSION shared_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other):
+ m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
+ {
+ if(is_locked)
+ {
+ m->unlock_upgrade_and_lock_shared();
+ }
+ BOOST_THREAD_RV(other).is_locked=false;
+ BOOST_THREAD_RV(other).m=0;
+ }
+
+ //std-2104 unique_lock move-assignment should not be noexcept
+ shared_lock& operator=(BOOST_THREAD_RV_REF_BEG shared_lock<Mutex> BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT
+ {
+ shared_lock temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+ shared_lock& operator=(BOOST_THREAD_RV_REF_BEG unique_lock<Mutex> BOOST_THREAD_RV_REF_END other)
+ {
+ shared_lock temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+
+ shared_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other)
+ {
+ shared_lock temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+#endif
+
+ void swap(shared_lock& other) BOOST_NOEXCEPT
+ {
+ std::swap(m,other.m);
+ std::swap(is_locked,other.is_locked);
+ }
+
+ Mutex* mutex() const BOOST_NOEXCEPT
+ {
+ return m;
+ }
+
+ Mutex* release() BOOST_NOEXCEPT
+ {
+ Mutex* const res=m;
+ m=0;
+ is_locked=false;
+ return res;
+ }
+
+ ~shared_lock()
+ {
+ if(owns_lock())
+ {
+ m->unlock_shared();
+ }
+ }
+ void lock()
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost shared_lock owns already the mutex"));
+ }
+ m->lock_shared();
+ is_locked=true;
+ }
+ bool try_lock()
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost shared_lock owns already the mutex"));
+ }
+ is_locked=m->try_lock_shared();
+ return is_locked;
+ }
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock(boost::system_time const& target_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost shared_lock owns already the mutex"));
+ }
+ is_locked=m->timed_lock_shared(target_time);
+ return is_locked;
+ }
+ template<typename Duration>
+ bool timed_lock(Duration const& target_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost shared_lock owns already the mutex"));
+ }
+ is_locked=m->timed_lock_shared(target_time);
+ return is_locked;
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost shared_lock owns already the mutex"));
+ }
+ is_locked=m->try_lock_shared_for(rel_time);
+ return is_locked;
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost shared_lock owns already the mutex"));
+ }
+ is_locked=m->try_lock_shared_until(abs_time);
+ return is_locked;
+ }
+#endif
+ void unlock()
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock has no mutex"));
+ }
+ if(!owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost shared_lock doesn't own the mutex"));
+ }
+ m->unlock_shared();
+ is_locked=false;
+ }
+
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+ typedef void (shared_lock<Mutex>::*bool_type)();
+ operator bool_type() const BOOST_NOEXCEPT
+ {
+ return is_locked?&shared_lock::lock:0;
+ }
+ bool operator!() const BOOST_NOEXCEPT
+ {
+ return !owns_lock();
+ }
+#else
+ explicit operator bool() const BOOST_NOEXCEPT
+ {
+ return owns_lock();
+ }
+#endif
+ bool owns_lock() const BOOST_NOEXCEPT
+ {
+ return is_locked;
+ }
+
+ };
+
+ BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) shared_lock<Mutex> BOOST_THREAD_DCL_MOVABLE_END
+
+ template<typename Mutex>
+ void swap(shared_lock<Mutex>& lhs,shared_lock<Mutex>& rhs) BOOST_NOEXCEPT
+ {
+ lhs.swap(rhs);
+ }
+
+ template <typename Mutex>
+ class upgrade_lock
+ {
+ protected:
+ Mutex* m;
+ bool is_locked;
+
+ public:
+ typedef Mutex mutex_type;
+ BOOST_THREAD_MOVABLE_ONLY( upgrade_lock)
+
+ upgrade_lock()BOOST_NOEXCEPT:
+ m(0),is_locked(false)
+ {}
+
+ explicit upgrade_lock(Mutex& m_) :
+ m(&m_), is_locked(false)
+ {
+ lock();
+ }
+ upgrade_lock(Mutex& m_, adopt_lock_t) :
+ m(&m_), is_locked(true)
+ {
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ BOOST_ASSERT(is_locked_by_this_thread(m));
+#endif
+ }
+ upgrade_lock(Mutex& m_, defer_lock_t)BOOST_NOEXCEPT:
+ m(&m_),is_locked(false)
+ {}
+ upgrade_lock(Mutex& m_, try_to_lock_t) :
+ m(&m_), is_locked(false)
+ {
+ try_lock();
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ upgrade_lock(Mutex& mtx, const chrono::time_point<Clock, Duration>& t)
+ : m(&mtx), is_locked(mtx.try_lock_upgrade_until(t))
+ {
+ }
+ template <class Rep, class Period>
+ upgrade_lock(Mutex& mtx, const chrono::duration<Rep, Period>& d)
+ : m(&mtx), is_locked(mtx.try_lock_upgrade_for(d))
+ {
+ }
+#endif
+
+ upgrade_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT:
+ m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
+ {
+ BOOST_THREAD_RV(other).is_locked=false;
+ BOOST_THREAD_RV(other).m=0;
+ }
+
+ BOOST_THREAD_EXPLICIT_LOCK_CONVERSION upgrade_lock(BOOST_THREAD_RV_REF_BEG unique_lock<Mutex> BOOST_THREAD_RV_REF_END other):
+ m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
+ {
+ if(is_locked)
+ {
+ m->unlock_and_lock_upgrade();
+ }
+ BOOST_THREAD_RV(other).is_locked=false;
+ BOOST_THREAD_RV(other).m=0;
+ }
+
+ //std-2104 unique_lock move-assignment should not be noexcept
+ upgrade_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT
+ {
+ upgrade_lock temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+
+#ifndef BOOST_THREAD_PROVIDES_EXPLICIT_LOCK_CONVERSION
+ upgrade_lock& operator=(BOOST_THREAD_RV_REF_BEG unique_lock<Mutex> BOOST_THREAD_RV_REF_END other)
+ {
+ upgrade_lock temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+#endif
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ // Conversion from shared locking
+ upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl, try_to_lock_t)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(sl).owns_lock())
+ {
+ if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade())
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ }
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl,
+ const chrono::time_point<Clock, Duration>& abs_time)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(sl).owns_lock())
+ {
+ if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade_until(abs_time))
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ }
+ }
+
+ template <class Rep, class Period>
+ upgrade_lock(BOOST_THREAD_RV_REF_BEG shared_lock<mutex_type> BOOST_THREAD_RV_REF_END sl,
+ const chrono::duration<Rep, Period>& rel_time)
+ : m(0),is_locked(false)
+ {
+ if (BOOST_THREAD_RV(sl).owns_lock())
+ {
+ if (BOOST_THREAD_RV(sl).mutex()->try_unlock_shared_and_lock_upgrade_for(rel_time))
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ is_locked = true;
+ }
+ }
+ else
+ {
+ m = BOOST_THREAD_RV(sl).release();
+ }
+ }
+#endif // BOOST_THREAD_USES_CHRONO
+#endif // BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ void swap(upgrade_lock& other)BOOST_NOEXCEPT
+ {
+ std::swap(m,other.m);
+ std::swap(is_locked,other.is_locked);
+ }
+ Mutex* mutex() const BOOST_NOEXCEPT
+ {
+ return m;
+ }
+
+ Mutex* release()BOOST_NOEXCEPT
+ {
+ Mutex* const res=m;
+ m=0;
+ is_locked=false;
+ return res;
+ }
+ ~upgrade_lock()
+ {
+ if (owns_lock())
+ {
+ m->unlock_upgrade();
+ }
+ }
+ void lock()
+ {
+ if (m == 0)
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
+ }
+ if (owns_lock())
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost upgrade_lock owns already the mutex"));
+ }
+ m->lock_upgrade();
+ is_locked = true;
+ }
+ bool try_lock()
+ {
+ if (m == 0)
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
+ }
+ if (owns_lock())
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost upgrade_lock owns already the mutex"));
+ }
+ is_locked = m->try_lock_upgrade();
+ return is_locked;
+ }
+ void unlock()
+ {
+ if (m == 0)
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
+ }
+ if (!owns_lock())
+ {
+ boost::throw_exception(
+ boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock doesn't own the mutex"));
+ }
+ m->unlock_upgrade();
+ is_locked = false;
+ }
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost upgrade_lock owns already the mutex"));
+ }
+ is_locked=m->try_lock_upgrade_for(rel_time);
+ return is_locked;
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
+ {
+ if(m==0)
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::operation_not_permitted), "boost upgrade_lock has no mutex"));
+ }
+ if(owns_lock())
+ {
+ boost::throw_exception(boost::lock_error(static_cast<int>(system::errc::resource_deadlock_would_occur), "boost upgrade_lock owns already the mutex"));
+ }
+ is_locked=m->try_lock_upgrade_until(abs_time);
+ return is_locked;
+ }
+#endif
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+ typedef void (upgrade_lock::*bool_type)();
+ operator bool_type() const BOOST_NOEXCEPT
+ {
+ return is_locked?&upgrade_lock::lock:0;
+ }
+ bool operator!() const BOOST_NOEXCEPT
+ {
+ return !owns_lock();
+ }
+#else
+ explicit operator bool() const BOOST_NOEXCEPT
+ {
+ return owns_lock();
+ }
+#endif
+ bool owns_lock() const BOOST_NOEXCEPT
+ {
+ return is_locked;
+ }
+ friend class shared_lock<Mutex> ;
+ friend class unique_lock<Mutex> ;
+ };
+
+ template<typename Mutex>
+ void swap(upgrade_lock<Mutex>& lhs, upgrade_lock<Mutex>& rhs)
+ BOOST_NOEXCEPT
+ {
+ lhs.swap(rhs);
+ }
+
+ BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) upgrade_lock<Mutex> BOOST_THREAD_DCL_MOVABLE_END
+
+ template<typename Mutex>
+ unique_lock<Mutex>::unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_lock<Mutex> BOOST_THREAD_RV_REF_END other):
+ m(BOOST_THREAD_RV(other).m),is_locked(BOOST_THREAD_RV(other).is_locked)
+ {
+ if(is_locked)
+ {
+ m->unlock_upgrade_and_lock();
+ }
+ BOOST_THREAD_RV(other).release();
+ }
+
+ template <class Mutex>
+ class upgrade_to_unique_lock
+ {
+ private:
+ upgrade_lock<Mutex>* source;
+ unique_lock<Mutex> exclusive;
+
+ public:
+ typedef Mutex mutex_type;
+ BOOST_THREAD_MOVABLE_ONLY( upgrade_to_unique_lock)
+
+ explicit upgrade_to_unique_lock(upgrade_lock<Mutex>& m_) :
+ source(&m_), exclusive(::boost::move(*source))
+ {
+ }
+ ~upgrade_to_unique_lock()
+ {
+ if (source)
+ {
+ *source = BOOST_THREAD_MAKE_RV_REF(upgrade_lock<Mutex> (::boost::move(exclusive)));
+ }
+ }
+
+ upgrade_to_unique_lock(BOOST_THREAD_RV_REF_BEG upgrade_to_unique_lock<Mutex> BOOST_THREAD_RV_REF_END other) BOOST_NOEXCEPT:
+ source(BOOST_THREAD_RV(other).source),exclusive(::boost::move(BOOST_THREAD_RV(other).exclusive))
+ {
+ BOOST_THREAD_RV(other).source=0;
+ }
+
+ //std-2104 unique_lock move-assignment should not be noexcept
+ upgrade_to_unique_lock& operator=(BOOST_THREAD_RV_REF_BEG upgrade_to_unique_lock<Mutex> BOOST_THREAD_RV_REF_END other) //BOOST_NOEXCEPT
+ {
+ upgrade_to_unique_lock temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+
+ void swap(upgrade_to_unique_lock& other)BOOST_NOEXCEPT
+ {
+ std::swap(source,other.source);
+ exclusive.swap(other.exclusive);
+ }
+
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+ typedef void (upgrade_to_unique_lock::*bool_type)(upgrade_to_unique_lock&);
+ operator bool_type() const BOOST_NOEXCEPT
+ {
+ return exclusive.owns_lock()?&upgrade_to_unique_lock::swap:0;
+ }
+ bool operator!() const BOOST_NOEXCEPT
+ {
+ return !owns_lock();
+ }
+#else
+ explicit operator bool() const BOOST_NOEXCEPT
+ {
+ return owns_lock();
+ }
+#endif
+
+ bool owns_lock() const BOOST_NOEXCEPT
+ {
+ return exclusive.owns_lock();
+ }
+ Mutex* mutex() const BOOST_NOEXCEPT
+ {
+ return exclusive.mutex();
+ }
+ };
+
+BOOST_THREAD_DCL_MOVABLE_BEG(Mutex) upgrade_to_unique_lock<Mutex> BOOST_THREAD_DCL_MOVABLE_END
+
+namespace detail
+{
+ template<typename Mutex>
+ class try_lock_wrapper:
+private unique_lock<Mutex>
+ {
+ typedef unique_lock<Mutex> base;
+ public:
+ BOOST_THREAD_MOVABLE_ONLY(try_lock_wrapper)
+
+ try_lock_wrapper()
+ {}
+
+ explicit try_lock_wrapper(Mutex& m):
+ base(m,try_to_lock)
+ {}
+
+ try_lock_wrapper(Mutex& m_,adopt_lock_t):
+ base(m_,adopt_lock)
+ {
+#if ! defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ BOOST_ASSERT(is_locked_by_this_thread(m_));
+#endif
+ }
+ try_lock_wrapper(Mutex& m_,defer_lock_t):
+ base(m_,defer_lock)
+ {}
+ try_lock_wrapper(Mutex& m_,try_to_lock_t):
+ base(m_,try_to_lock)
+ {}
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other):
+ base(::boost::move(other))
+ {}
+
+#elif defined BOOST_THREAD_USES_MOVE
+ try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other):
+ base(::boost::move(static_cast<base&>(other)))
+ {}
+
+#else
+ try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other):
+ base(BOOST_THREAD_RV_REF(base)(*other))
+ {}
+#endif
+ try_lock_wrapper& operator=(BOOST_THREAD_RV_REF_BEG try_lock_wrapper<Mutex> BOOST_THREAD_RV_REF_END other)
+ {
+ try_lock_wrapper temp(::boost::move(other));
+ swap(temp);
+ return *this;
+ }
+ void swap(try_lock_wrapper& other)
+ {
+ base::swap(other);
+ }
+ void lock()
+ {
+ base::lock();
+ }
+ bool try_lock()
+ {
+ return base::try_lock();
+ }
+ void unlock()
+ {
+ base::unlock();
+ }
+ bool owns_lock() const
+ {
+ return base::owns_lock();
+ }
+ Mutex* mutex() const BOOST_NOEXCEPT
+ {
+ return base::mutex();
+ }
+ Mutex* release()
+ {
+ return base::release();
+ }
+
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
+ typedef typename base::bool_type bool_type;
+ operator bool_type() const
+ {
+ return base::operator bool_type();
+ }
+ bool operator!() const
+ {
+ return !this->owns_lock();
+ }
+#else
+ explicit operator bool() const
+ {
+ return owns_lock();
+ }
+#endif
+ };
+
+ template<typename Mutex>
+ void swap(try_lock_wrapper<Mutex>& lhs,try_lock_wrapper<Mutex>& rhs)
+ {
+ lhs.swap(rhs);
+ }
+}
+}
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/lockable_traits.hpp b/src/third_party/boost-1.69.0/boost/thread/lockable_traits.hpp
new file mode 100644
index 00000000000..f46c8866291
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/lockable_traits.hpp
@@ -0,0 +1,238 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_LOCKABLE_TRAITS_HPP
+#define BOOST_THREAD_LOCKABLE_TRAITS_HPP
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/assert.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#ifdef BOOST_NO_CXX11_SFINAE_EXPR
+#include <boost/type_traits/is_class.hpp>
+#else
+#include <boost/type_traits/declval.hpp>
+#endif
+
+#include <boost/config/abi_prefix.hpp>
+
+// todo make use of integral_constant, true_type and false_type
+
+namespace boost
+{
+ namespace sync
+ {
+
+#if defined(BOOST_NO_SFINAE) || \
+ BOOST_WORKAROUND(__IBMCPP__, BOOST_TESTED_AT(600)) || \
+ BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
+#if ! defined BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+#define BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+#endif
+#endif
+
+#ifndef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+ namespace detail
+ {
+#ifdef BOOST_NO_CXX11_SFINAE_EXPR
+#define BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(member_name) \
+ template<typename T, bool=boost::is_class<T>::value> \
+ struct has_member_called_##member_name \
+ { \
+ BOOST_STATIC_CONSTANT(bool, value=false); \
+ }; \
+ \
+ template<typename T> \
+ struct has_member_called_##member_name<T,true> \
+ { \
+ typedef char true_type; \
+ struct false_type \
+ { \
+ true_type dummy[2]; \
+ }; \
+ \
+ struct fallback { int member_name; }; \
+ struct derived: \
+ T, fallback \
+ { \
+ derived(); \
+ }; \
+ \
+ template<int fallback::*> struct tester; \
+ \
+ template<typename U> \
+ static false_type has_member(tester<&U::member_name>*); \
+ template<typename U> \
+ static true_type has_member(...); \
+ \
+ BOOST_STATIC_CONSTANT( \
+ bool, value=sizeof(has_member<derived>(0))==sizeof(true_type)); \
+ }
+
+ BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(lock)
+; BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(unlock);
+ BOOST_THREAD_DEFINE_HAS_MEMBER_CALLED(try_lock);
+
+ template<typename T,bool=has_member_called_lock<T>::value >
+ struct has_member_lock
+ {
+ BOOST_STATIC_CONSTANT(bool, value=false);
+ };
+
+ template<typename T>
+ struct has_member_lock<T,true>
+ {
+ typedef char true_type;
+ struct false_type
+ {
+ true_type dummy[2];
+ };
+
+ template<typename U,typename V>
+ static true_type has_member(V (U::*)());
+ template<typename U>
+ static false_type has_member(U);
+
+ BOOST_STATIC_CONSTANT(
+ bool,value=sizeof(has_member_lock<T>::has_member(&T::lock))==sizeof(true_type));
+ };
+
+ template<typename T,bool=has_member_called_unlock<T>::value >
+ struct has_member_unlock
+ {
+ BOOST_STATIC_CONSTANT(bool, value=false);
+ };
+
+ template<typename T>
+ struct has_member_unlock<T,true>
+ {
+ typedef char true_type;
+ struct false_type
+ {
+ true_type dummy[2];
+ };
+
+ template<typename U,typename V>
+ static true_type has_member(V (U::*)());
+ template<typename U>
+ static false_type has_member(U);
+
+ BOOST_STATIC_CONSTANT(
+ bool,value=sizeof(has_member_unlock<T>::has_member(&T::unlock))==sizeof(true_type));
+ };
+
+ template<typename T,bool=has_member_called_try_lock<T>::value >
+ struct has_member_try_lock
+ {
+ BOOST_STATIC_CONSTANT(bool, value=false);
+ };
+
+ template<typename T>
+ struct has_member_try_lock<T,true>
+ {
+ typedef char true_type;
+ struct false_type
+ {
+ true_type dummy[2];
+ };
+
+ template<typename U>
+ static true_type has_member(bool (U::*)());
+ template<typename U>
+ static false_type has_member(U);
+
+ BOOST_STATIC_CONSTANT(
+ bool,value=sizeof(has_member_try_lock<T>::has_member(&T::try_lock))==sizeof(true_type));
+ };
+#else
+ template<typename T,typename Enabled=void>
+ struct has_member_lock : false_type {};
+
+ template<typename T>
+ struct has_member_lock<T,
+ decltype(void(boost::declval<T&>().lock()))
+ > : true_type {};
+
+ template<typename T,typename Enabled=void>
+ struct has_member_unlock : false_type {};
+
+ template<typename T>
+ struct has_member_unlock<T,
+ decltype(void(boost::declval<T&>().unlock()))
+ > : true_type {};
+
+ template<typename T,typename Enabled=bool>
+ struct has_member_try_lock : false_type {};
+
+ template<typename T>
+ struct has_member_try_lock<T,
+ decltype(bool(boost::declval<T&>().try_lock()))
+ > : true_type {};
+#endif
+
+ }
+
+ template<typename T>
+ struct is_basic_lockable
+ {
+ BOOST_STATIC_CONSTANT(bool, value = detail::has_member_lock<T>::value &&
+ detail::has_member_unlock<T>::value);
+ };
+ template<typename T>
+ struct is_lockable
+ {
+ BOOST_STATIC_CONSTANT(bool, value =
+ is_basic_lockable<T>::value &&
+ detail::has_member_try_lock<T>::value);
+ };
+
+#else
+ template<typename T>
+ struct is_basic_lockable
+ {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+ template<typename T>
+ struct is_lockable
+ {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+#endif
+
+ template<typename T>
+ struct is_recursive_mutex_sur_parole
+ {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+ template<typename T>
+ struct is_recursive_mutex_sur_parolle : is_recursive_mutex_sur_parole<T>
+ {
+ };
+
+ template<typename T>
+ struct is_recursive_basic_lockable
+ {
+ BOOST_STATIC_CONSTANT(bool, value = is_basic_lockable<T>::value &&
+ is_recursive_mutex_sur_parolle<T>::value);
+ };
+ template<typename T>
+ struct is_recursive_lockable
+ {
+ BOOST_STATIC_CONSTANT(bool, value = is_lockable<T>::value &&
+ is_recursive_mutex_sur_parolle<T>::value);
+ };
+ }
+ template<typename T>
+ struct is_mutex_type
+ {
+ BOOST_STATIC_CONSTANT(bool, value = sync::is_lockable<T>::value);
+ };
+
+}
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/locks.hpp b/src/third_party/boost-1.69.0/boost/thread/locks.hpp
new file mode 100644
index 00000000000..0905aec22a1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/locks.hpp
@@ -0,0 +1,17 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_LOCKS_HPP
+#define BOOST_THREAD_LOCKS_HPP
+
+#include <boost/thread/lock_algorithms.hpp>
+#include <boost/thread/lock_types.hpp>
+#include <boost/thread/lock_guard.hpp>
+#include <boost/thread/shared_lock_guard.hpp>
+#include <boost/thread/lockable_traits.hpp>
+#include <boost/thread/lock_options.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/mutex.hpp
new file mode 100644
index 00000000000..05c60941c46
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/mutex.hpp
@@ -0,0 +1,53 @@
+#ifndef BOOST_THREAD_MUTEX_HPP
+#define BOOST_THREAD_MUTEX_HPP
+
+// mutex.hpp
+//
+// (C) Copyright 2007 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/platform.hpp>
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#include <boost/thread/win32/mutex.hpp>
+#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
+#include <boost/thread/pthread/mutex.hpp>
+#else
+#error "Boost threads unavailable on this platform"
+#endif
+
+#include <boost/thread/lockable_traits.hpp>
+
+
+namespace boost
+{
+ namespace sync
+ {
+#ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+ template<>
+ struct is_basic_lockable<mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<>
+ struct is_lockable<mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<>
+ struct is_basic_lockable<timed_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<>
+ struct is_lockable<timed_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+#endif
+ }
+}
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/once.hpp b/src/third_party/boost-1.69.0/boost/thread/once.hpp
new file mode 100644
index 00000000000..22f95139aeb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/once.hpp
@@ -0,0 +1,54 @@
+#ifndef BOOST_THREAD_ONCE_HPP
+#define BOOST_THREAD_ONCE_HPP
+
+// once.hpp
+//
+// (C) Copyright 2006-7 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable: 4702) // unreachable code
+#endif
+
+#include <boost/thread/detail/platform.hpp>
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#include <boost/thread/win32/once.hpp>
+#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
+#if defined BOOST_THREAD_ONCE_FAST_EPOCH
+#include <boost/thread/pthread/once.hpp>
+#elif defined BOOST_THREAD_ONCE_ATOMIC
+#include <boost/thread/pthread/once_atomic.hpp>
+#else
+#error "Once Not Implemented"
+#endif
+#else
+#error "Boost threads unavailable on this platform"
+#endif
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ // template<class Callable, class ...Args> void
+ // call_once(once_flag& flag, Callable&& func, Args&&... args);
+template<typename Function>
+inline void call_once(Function func,once_flag& flag)
+//inline void call_once(void (*func)(),once_flag& flag)
+ {
+ call_once(flag,func);
+ }
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable.hpp
new file mode 100644
index 00000000000..c11383f01f9
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable.hpp
@@ -0,0 +1,502 @@
+#ifndef BOOST_THREAD_CONDITION_VARIABLE_PTHREAD_HPP
+#define BOOST_THREAD_CONDITION_VARIABLE_PTHREAD_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007-10 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#include <boost/thread/detail/platform_time.hpp>
+#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#include <boost/thread/pthread/pthread_helpers.hpp>
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+#include <boost/thread/pthread/thread_data.hpp>
+#endif
+#include <boost/thread/pthread/condition_variable_fwd.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
+
+#include <algorithm>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ namespace this_thread
+ {
+ void BOOST_THREAD_DECL interruption_point();
+ }
+#endif
+
+ namespace thread_cv_detail
+ {
+ template<typename MutexType>
+ struct lock_on_exit
+ {
+ MutexType* m;
+
+ lock_on_exit():
+ m(0)
+ {}
+
+ void activate(MutexType& m_)
+ {
+ m_.unlock();
+ m=&m_;
+ }
+ void deactivate()
+ {
+ if (m)
+ {
+ m->lock();
+ }
+ m = 0;
+ }
+ ~lock_on_exit() BOOST_NOEXCEPT_IF(false)
+ {
+ if (m)
+ {
+ m->lock();
+ }
+ }
+ };
+ }
+
+ inline void condition_variable::wait(unique_lock<mutex>& m)
+ {
+#if defined BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
+ if(! m.owns_lock())
+ {
+ boost::throw_exception(condition_error(-1, "boost::condition_variable::wait() failed precondition mutex not owned"));
+ }
+#endif
+ int res=0;
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard;
+ detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+ pthread_mutex_t* the_mutex = &internal_mutex;
+ guard.activate(m);
+ res = pthread_cond_wait(&cond,the_mutex);
+ check_for_interruption.unlock_if_locked();
+ guard.deactivate();
+#else
+ pthread_mutex_t* the_mutex = m.mutex()->native_handle();
+ res = pthread_cond_wait(&cond,the_mutex);
+#endif
+ }
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ this_thread::interruption_point();
+#endif
+ if(res && res != EINTR)
+ {
+ boost::throw_exception(condition_error(res, "boost::condition_variable::wait failed in pthread_cond_wait"));
+ }
+ }
+
+ // When this function returns true:
+ // * A notification (or sometimes a spurious OS signal) has been received
+ // * Do not assume that the timeout has not been reached
+ // * Do not assume that the predicate has been changed
+ //
+ // When this function returns false:
+ // * The timeout has been reached
+ // * Do not assume that a notification has not been received
+ // * Do not assume that the predicate has not been changed
+ inline bool condition_variable::do_wait_until(
+ unique_lock<mutex>& m,
+ detail::internal_platform_timepoint const &timeout)
+ {
+#if defined BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
+ if (!m.owns_lock())
+ {
+ boost::throw_exception(condition_error(EPERM, "boost::condition_variable::do_wait_until() failed precondition mutex not owned"));
+ }
+#endif
+ int cond_res;
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard;
+ detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+ pthread_mutex_t* the_mutex = &internal_mutex;
+ guard.activate(m);
+ cond_res=pthread_cond_timedwait(&cond,the_mutex,&timeout.getTs());
+ check_for_interruption.unlock_if_locked();
+ guard.deactivate();
+#else
+ pthread_mutex_t* the_mutex = m.mutex()->native_handle();
+ cond_res=pthread_cond_timedwait(&cond,the_mutex,&timeout.getTs());
+#endif
+ }
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ this_thread::interruption_point();
+#endif
+ if(cond_res==ETIMEDOUT)
+ {
+ return false;
+ }
+ if(cond_res)
+ {
+ boost::throw_exception(condition_error(cond_res, "boost::condition_variable::do_wait_until failed in pthread_cond_timedwait"));
+ }
+ return true;
+ }
+
+ inline void condition_variable::notify_one() BOOST_NOEXCEPT
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
+#endif
+ BOOST_VERIFY(!pthread_cond_signal(&cond));
+ }
+
+ inline void condition_variable::notify_all() BOOST_NOEXCEPT
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
+#endif
+ BOOST_VERIFY(!pthread_cond_broadcast(&cond));
+ }
+
+ class condition_variable_any
+ {
+ pthread_mutex_t internal_mutex;
+ pthread_cond_t cond;
+
+ public:
+ BOOST_THREAD_NO_COPYABLE(condition_variable_any)
+ condition_variable_any()
+ {
+ int const res=pthread_mutex_init(&internal_mutex,NULL);
+ if(res)
+ {
+ boost::throw_exception(thread_resource_error(res, "boost::condition_variable_any::condition_variable_any() failed in pthread_mutex_init"));
+ }
+ int const res2 = pthread::cond_init(cond);
+ if(res2)
+ {
+ BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
+ boost::throw_exception(thread_resource_error(res2, "boost::condition_variable_any::condition_variable_any() failed in pthread::cond_init"));
+ }
+ }
+ ~condition_variable_any()
+ {
+ BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
+ BOOST_VERIFY(!pthread_cond_destroy(&cond));
+ }
+
+ template<typename lock_type>
+ void wait(lock_type& m)
+ {
+ int res=0;
+ {
+ thread_cv_detail::lock_on_exit<lock_type> guard;
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+#else
+ boost::pthread::pthread_mutex_scoped_lock check_for_interruption(&internal_mutex);
+#endif
+ guard.activate(m);
+ res=pthread_cond_wait(&cond,&internal_mutex);
+ check_for_interruption.unlock_if_locked();
+ guard.deactivate();
+ }
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ this_thread::interruption_point();
+#endif
+ if(res)
+ {
+ boost::throw_exception(condition_error(res, "boost::condition_variable_any::wait() failed in pthread_cond_wait"));
+ }
+ }
+
+ template<typename lock_type,typename predicate_type>
+ void wait(lock_type& m,predicate_type pred)
+ {
+ while (!pred())
+ {
+ wait(m);
+ }
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename lock_type>
+ bool timed_wait(lock_type& m,boost::system_time const& abs_time)
+ {
+#if defined BOOST_THREAD_WAIT_BUG
+ const detail::real_platform_timepoint ts(abs_time + BOOST_THREAD_WAIT_BUG);
+#else
+ const detail::real_platform_timepoint ts(abs_time);
+#endif
+#if defined BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ const detail::platform_duration d(ts - detail::real_platform_clock::now());
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ return ts > detail::real_platform_clock::now();
+#else
+ return do_wait_until(m, ts);
+#endif
+ }
+ template<typename lock_type>
+ bool timed_wait(lock_type& m,::boost::xtime const& abs_time)
+ {
+ return timed_wait(m,system_time(abs_time));
+ }
+
+ template<typename lock_type,typename duration_type>
+ bool timed_wait(lock_type& m,duration_type const& wait_duration)
+ {
+ if (wait_duration.is_pos_infinity())
+ {
+ wait(m);
+ return true;
+ }
+ if (wait_duration.is_special())
+ {
+ return true;
+ }
+ detail::platform_duration d(wait_duration);
+#if defined(BOOST_THREAD_HAS_MONO_CLOCK) && !defined(BOOST_THREAD_INTERNAL_CLOCK_IS_MONO)
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ const detail::mono_platform_timepoint ts(detail::mono_platform_clock::now() + d);
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ return ts > detail::mono_platform_clock::now();
+#else
+ return do_wait_until(m, detail::internal_platform_clock::now() + d);
+#endif
+ }
+
+ template<typename lock_type,typename predicate_type>
+ bool timed_wait(lock_type& m,boost::system_time const& abs_time, predicate_type pred)
+ {
+#if defined BOOST_THREAD_WAIT_BUG
+ const detail::real_platform_timepoint ts(abs_time + BOOST_THREAD_WAIT_BUG);
+#else
+ const detail::real_platform_timepoint ts(abs_time);
+#endif
+ while (!pred())
+ {
+#if defined BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ if (d <= detail::platform_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+#else
+ if (!do_wait_until(m, ts)) break; // timeout occurred
+#endif
+ }
+ return pred();
+ }
+
+ template<typename lock_type,typename predicate_type>
+ bool timed_wait(lock_type& m,::boost::xtime const& abs_time, predicate_type pred)
+ {
+ return timed_wait(m,system_time(abs_time),pred);
+ }
+
+ template<typename lock_type,typename duration_type,typename predicate_type>
+ bool timed_wait(lock_type& m,duration_type const& wait_duration,predicate_type pred)
+ {
+ if (wait_duration.is_pos_infinity())
+ {
+ while (!pred())
+ {
+ wait(m);
+ }
+ return true;
+ }
+ if (wait_duration.is_special())
+ {
+ return pred();
+ }
+ detail::platform_duration d(wait_duration);
+#if defined(BOOST_THREAD_HAS_MONO_CLOCK) && !defined(BOOST_THREAD_INTERNAL_CLOCK_IS_MONO)
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ const detail::mono_platform_timepoint ts(detail::mono_platform_clock::now() + d);
+ while (!pred())
+ {
+ if (d <= detail::platform_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ d = ts - detail::mono_platform_clock::now();
+ }
+#else
+ const detail::internal_platform_timepoint ts(detail::internal_platform_clock::now() + d);
+ while (!pred())
+ {
+ if (!do_wait_until(m, ts)) break; // timeout occurred
+ }
+#endif
+ return pred();
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class lock_type,class Duration>
+ cv_status
+ wait_until(
+ lock_type& lock,
+ const chrono::time_point<detail::internal_chrono_clock, Duration>& t)
+ {
+ const boost::detail::internal_platform_timepoint ts(t);
+ if (do_wait_until(lock, ts)) return cv_status::no_timeout;
+ else return cv_status::timeout;
+ }
+
+ template <class lock_type, class Clock, class Duration>
+ cv_status
+ wait_until(
+ lock_type& lock,
+ const chrono::time_point<Clock, Duration>& t)
+ {
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ do_wait_until(lock, detail::internal_chrono_clock::now() + d);
+ if (t > Clock::now()) return cv_status::no_timeout;
+ else return cv_status::timeout;
+ }
+
+ template <class lock_type, class Rep, class Period>
+ cv_status
+ wait_for(
+ lock_type& lock,
+ const chrono::duration<Rep, Period>& d)
+ {
+ return wait_until(lock, chrono::steady_clock::now() + d);
+ }
+
+ template <class lock_type, class Duration, class Predicate>
+ bool
+ wait_until(
+ lock_type& lock,
+ const chrono::time_point<detail::internal_chrono_clock, Duration>& t,
+ Predicate pred)
+ {
+ const detail::internal_platform_timepoint ts(t);
+ while (!pred())
+ {
+ if (!do_wait_until(lock, ts)) break; // timeout occurred
+ }
+ return pred();
+ }
+
+ template <class lock_type, class Clock, class Duration, class Predicate>
+ bool
+ wait_until(
+ lock_type& lock,
+ const chrono::time_point<Clock, Duration>& t,
+ Predicate pred)
+ {
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ while (!pred())
+ {
+ common_duration d(t - Clock::now());
+ if (d <= common_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ do_wait_until(lock, detail::internal_platform_clock::now() + detail::platform_duration(d));
+ }
+ return pred();
+ }
+
+ template <class lock_type, class Rep, class Period, class Predicate>
+ bool
+ wait_for(
+ lock_type& lock,
+ const chrono::duration<Rep, Period>& d,
+ Predicate pred)
+ {
+ return wait_until(lock, chrono::steady_clock::now() + d, boost::move(pred));
+ }
+#endif
+
+ void notify_one() BOOST_NOEXCEPT
+ {
+ boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
+ BOOST_VERIFY(!pthread_cond_signal(&cond));
+ }
+
+ void notify_all() BOOST_NOEXCEPT
+ {
+ boost::pthread::pthread_mutex_scoped_lock internal_lock(&internal_mutex);
+ BOOST_VERIFY(!pthread_cond_broadcast(&cond));
+ }
+ private:
+
+ // When this function returns true:
+ // * A notification (or sometimes a spurious OS signal) has been received
+ // * Do not assume that the timeout has not been reached
+ // * Do not assume that the predicate has been changed
+ //
+ // When this function returns false:
+ // * The timeout has been reached
+ // * Do not assume that a notification has not been received
+ // * Do not assume that the predicate has not been changed
+ template <class lock_type>
+ bool do_wait_until(
+ lock_type& m,
+ detail::internal_platform_timepoint const &timeout)
+ {
+ int res=0;
+ {
+ thread_cv_detail::lock_on_exit<lock_type> guard;
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+#else
+ boost::pthread::pthread_mutex_scoped_lock check_for_interruption(&internal_mutex);
+#endif
+ guard.activate(m);
+ res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout.getTs());
+ check_for_interruption.unlock_if_locked();
+ guard.deactivate();
+ }
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ this_thread::interruption_point();
+#endif
+ if(res==ETIMEDOUT)
+ {
+ return false;
+ }
+ if(res)
+ {
+ boost::throw_exception(condition_error(res, "boost::condition_variable_any::do_wait_until() failed in pthread_cond_timedwait"));
+ }
+ return true;
+ }
+ };
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable_fwd.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable_fwd.hpp
new file mode 100644
index 00000000000..08b15834635
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/condition_variable_fwd.hpp
@@ -0,0 +1,348 @@
+#ifndef BOOST_THREAD_PTHREAD_CONDITION_VARIABLE_FWD_HPP
+#define BOOST_THREAD_PTHREAD_CONDITION_VARIABLE_FWD_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <pthread.h>
+#include <boost/thread/cv_status.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/lock_types.hpp>
+#include <boost/thread/thread_time.hpp>
+#include <boost/thread/detail/platform_time.hpp>
+#include <boost/thread/pthread/pthread_helpers.hpp>
+
+#if defined BOOST_THREAD_USES_DATETIME
+#include <boost/thread/xtime.hpp>
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
+#include <boost/date_time/posix_time/posix_time_duration.hpp>
+
+#include <algorithm>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ class condition_variable
+ {
+ private:
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ pthread_mutex_t internal_mutex;
+//#endif
+ pthread_cond_t cond;
+
+ public:
+ //private: // used by boost::thread::try_join_until
+
+ bool do_wait_until(
+ unique_lock<mutex>& lock,
+ detail::internal_platform_timepoint const &timeout);
+
+ public:
+ BOOST_THREAD_NO_COPYABLE(condition_variable)
+ condition_variable()
+ {
+ int res;
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ // Even if it is not used, the internal_mutex exists (see
+ // above) and must be initialized (etc) in case some
+ // compilation units provide interruptions and others
+ // don't.
+ res=pthread_mutex_init(&internal_mutex,NULL);
+ if(res)
+ {
+ boost::throw_exception(thread_resource_error(res, "boost::condition_variable::condition_variable() constructor failed in pthread_mutex_init"));
+ }
+//#endif
+ res = pthread::cond_init(cond);
+ if (res)
+ {
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ // ditto
+ BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex));
+//#endif
+ boost::throw_exception(thread_resource_error(res, "boost::condition_variable::condition_variable() constructor failed in pthread::cond_init"));
+ }
+ }
+ ~condition_variable()
+ {
+ int ret;
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ // ditto
+ do {
+ ret = pthread_mutex_destroy(&internal_mutex);
+ } while (ret == EINTR);
+ BOOST_ASSERT(!ret);
+//#endif
+ do {
+ ret = pthread_cond_destroy(&cond);
+ } while (ret == EINTR);
+ BOOST_ASSERT(!ret);
+ }
+
+ void wait(unique_lock<mutex>& m);
+
+ template<typename predicate_type>
+ void wait(unique_lock<mutex>& m,predicate_type pred)
+ {
+ while (!pred())
+ {
+ wait(m);
+ }
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_wait(
+ unique_lock<mutex>& m,
+ boost::system_time const& abs_time)
+ {
+#if defined BOOST_THREAD_WAIT_BUG
+ const detail::real_platform_timepoint ts(abs_time + BOOST_THREAD_WAIT_BUG);
+#else
+ const detail::real_platform_timepoint ts(abs_time);
+#endif
+#if defined BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ const detail::platform_duration d(ts - detail::real_platform_clock::now());
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ return ts > detail::real_platform_clock::now();
+#else
+ return do_wait_until(m, ts);
+#endif
+ }
+ bool timed_wait(
+ unique_lock<mutex>& m,
+ ::boost::xtime const& abs_time)
+ {
+ return timed_wait(m,system_time(abs_time));
+ }
+
+ template<typename duration_type>
+ bool timed_wait(
+ unique_lock<mutex>& m,
+ duration_type const& wait_duration)
+ {
+ if (wait_duration.is_pos_infinity())
+ {
+ wait(m);
+ return true;
+ }
+ if (wait_duration.is_special())
+ {
+ return true;
+ }
+ detail::platform_duration d(wait_duration);
+#if defined(BOOST_THREAD_HAS_MONO_CLOCK) && !defined(BOOST_THREAD_INTERNAL_CLOCK_IS_MONO)
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ const detail::mono_platform_timepoint ts(detail::mono_platform_clock::now() + d);
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ return ts > detail::mono_platform_clock::now();
+#else
+ return do_wait_until(m, detail::internal_platform_clock::now() + d);
+#endif
+ }
+
+ template<typename predicate_type>
+ bool timed_wait(
+ unique_lock<mutex>& m,
+ boost::system_time const& abs_time,predicate_type pred)
+ {
+#if defined BOOST_THREAD_WAIT_BUG
+ const detail::real_platform_timepoint ts(abs_time + BOOST_THREAD_WAIT_BUG);
+#else
+ const detail::real_platform_timepoint ts(abs_time);
+#endif
+ while (!pred())
+ {
+#if defined BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ if (d <= detail::platform_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+#else
+ if (!do_wait_until(m, ts)) break; // timeout occurred
+#endif
+ }
+ return pred();
+ }
+
+ template<typename predicate_type>
+ bool timed_wait(
+ unique_lock<mutex>& m,
+ ::boost::xtime const& abs_time,predicate_type pred)
+ {
+ return timed_wait(m,system_time(abs_time),pred);
+ }
+
+ template<typename duration_type,typename predicate_type>
+ bool timed_wait(
+ unique_lock<mutex>& m,
+ duration_type const& wait_duration,predicate_type pred)
+ {
+ if (wait_duration.is_pos_infinity())
+ {
+ while (!pred())
+ {
+ wait(m);
+ }
+ return true;
+ }
+ if (wait_duration.is_special())
+ {
+ return pred();
+ }
+ detail::platform_duration d(wait_duration);
+#if defined(BOOST_THREAD_HAS_MONO_CLOCK) && !defined(BOOST_THREAD_INTERNAL_CLOCK_IS_MONO)
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ const detail::mono_platform_timepoint ts(detail::mono_platform_clock::now() + d);
+ while (!pred())
+ {
+ if (d <= detail::platform_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ d = ts - detail::mono_platform_clock::now();
+ }
+#else
+ const detail::internal_platform_timepoint ts(detail::internal_platform_clock::now() + d);
+ while (!pred())
+ {
+ if (!do_wait_until(m, ts)) break; // timeout occurred
+ }
+#endif
+ return pred();
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+
+ template <class Duration>
+ cv_status
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<detail::internal_chrono_clock, Duration>& t)
+ {
+ const detail::internal_platform_timepoint ts(t);
+ if (do_wait_until(lock, ts)) return cv_status::no_timeout;
+ else return cv_status::timeout;
+ }
+
+ template <class Clock, class Duration>
+ cv_status
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<Clock, Duration>& t)
+ {
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ do_wait_until(lock, detail::internal_chrono_clock::now() + d);
+ if (t > Clock::now()) return cv_status::no_timeout;
+ else return cv_status::timeout;
+ }
+
+ template <class Rep, class Period>
+ cv_status
+ wait_for(
+ unique_lock<mutex>& lock,
+ const chrono::duration<Rep, Period>& d)
+ {
+ return wait_until(lock, chrono::steady_clock::now() + d);
+ }
+
+ template <class Duration, class Predicate>
+ bool
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<detail::internal_chrono_clock, Duration>& t,
+ Predicate pred)
+ {
+ const detail::internal_platform_timepoint ts(t);
+ while (!pred())
+ {
+ if (!do_wait_until(lock, ts)) break; // timeout occurred
+ }
+ return pred();
+ }
+
+ template <class Clock, class Duration, class Predicate>
+ bool
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<Clock, Duration>& t,
+ Predicate pred)
+ {
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ while (!pred())
+ {
+ common_duration d(t - Clock::now());
+ if (d <= common_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ do_wait_until(lock, detail::internal_platform_clock::now() + detail::platform_duration(d));
+ }
+ return pred();
+ }
+
+ template <class Rep, class Period, class Predicate>
+ bool
+ wait_for(
+ unique_lock<mutex>& lock,
+ const chrono::duration<Rep, Period>& d,
+ Predicate pred)
+ {
+ return wait_until(lock, chrono::steady_clock::now() + d, boost::move(pred));
+ }
+#endif
+
+#define BOOST_THREAD_DEFINES_CONDITION_VARIABLE_NATIVE_HANDLE
+ typedef pthread_cond_t* native_handle_type;
+ native_handle_type native_handle()
+ {
+ return &cond;
+ }
+
+ void notify_one() BOOST_NOEXCEPT;
+ void notify_all() BOOST_NOEXCEPT;
+ };
+
+ BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/mutex.hpp
new file mode 100644
index 00000000000..ecf80c28eb0
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/mutex.hpp
@@ -0,0 +1,346 @@
+#ifndef BOOST_THREAD_PTHREAD_MUTEX_HPP
+#define BOOST_THREAD_PTHREAD_MUTEX_HPP
+// (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011,2012,2015 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/assert.hpp>
+#include <pthread.h>
+#include <boost/throw_exception.hpp>
+#include <boost/core/ignore_unused.hpp>
+#include <boost/thread/exceptions.hpp>
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+#include <boost/thread/lock_types.hpp>
+#endif
+#include <boost/thread/thread_time.hpp>
+#if defined BOOST_THREAD_USES_DATETIME
+#include <boost/thread/xtime.hpp>
+#endif
+#include <boost/assert.hpp>
+#include <errno.h>
+#include <boost/thread/detail/platform_time.hpp>
+#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#include <boost/thread/pthread/pthread_helpers.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
+
+
+#include <boost/config/abi_prefix.hpp>
+
+#ifndef BOOST_THREAD_HAS_NO_EINTR_BUG
+#define BOOST_THREAD_HAS_EINTR_BUG
+#endif
+
+namespace boost
+{
+
+ class BOOST_THREAD_CAPABILITY("mutex") mutex
+ {
+ private:
+ pthread_mutex_t m;
+ public:
+ BOOST_THREAD_NO_COPYABLE(mutex)
+
+ mutex()
+ {
+ int const res=pthread_mutex_init(&m,NULL);
+ if(res)
+ {
+ boost::throw_exception(thread_resource_error(res, "boost:: mutex constructor failed in pthread_mutex_init"));
+ }
+ }
+ ~mutex()
+ {
+ int const res = posix::pthread_mutex_destroy(&m);
+ boost::ignore_unused(res);
+ BOOST_ASSERT(!res);
+ }
+
+ void lock() BOOST_THREAD_ACQUIRE()
+ {
+ int res = posix::pthread_mutex_lock(&m);
+ if (res)
+ {
+ boost::throw_exception(lock_error(res,"boost: mutex lock failed in pthread_mutex_lock"));
+ }
+ }
+
+ void unlock() BOOST_THREAD_RELEASE()
+ {
+ int res = posix::pthread_mutex_unlock(&m);
+ (void)res;
+ BOOST_ASSERT(res == 0);
+// if (res)
+// {
+// boost::throw_exception(lock_error(res,"boost: mutex unlock failed in pthread_mutex_unlock"));
+// }
+ }
+
+ bool try_lock() BOOST_THREAD_TRY_ACQUIRE(true)
+ {
+ int res;
+ do
+ {
+ res = posix::pthread_mutex_trylock(&m);
+ } while (res == EINTR);
+ if (res==EBUSY)
+ {
+ return false;
+ }
+
+ return !res;
+ }
+
+#define BOOST_THREAD_DEFINES_MUTEX_NATIVE_HANDLE
+ typedef pthread_mutex_t* native_handle_type;
+ native_handle_type native_handle()
+ {
+ return &m;
+ }
+
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ typedef unique_lock<mutex> scoped_lock;
+ typedef detail::try_lock_wrapper<mutex> scoped_try_lock;
+#endif
+ };
+
+ typedef mutex try_mutex;
+
+ class timed_mutex
+ {
+ private:
+ pthread_mutex_t m;
+#ifndef BOOST_THREAD_USES_PTHREAD_TIMEDLOCK
+ pthread_cond_t cond;
+ bool is_locked;
+#endif
+ public:
+ BOOST_THREAD_NO_COPYABLE(timed_mutex)
+ timed_mutex()
+ {
+ int const res=pthread_mutex_init(&m,NULL);
+ if(res)
+ {
+ boost::throw_exception(thread_resource_error(res, "boost:: timed_mutex constructor failed in pthread_mutex_init"));
+ }
+#ifndef BOOST_THREAD_USES_PTHREAD_TIMEDLOCK
+ int const res2=pthread::cond_init(cond);
+ if(res2)
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_destroy(&m));
+ boost::throw_exception(thread_resource_error(res2, "boost:: timed_mutex constructor failed in pthread::cond_init"));
+ }
+ is_locked=false;
+#endif
+ }
+ ~timed_mutex()
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_destroy(&m));
+#ifndef BOOST_THREAD_USES_PTHREAD_TIMEDLOCK
+ BOOST_VERIFY(!pthread_cond_destroy(&cond));
+#endif
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const & relative_time)
+ {
+ if (relative_time.is_pos_infinity())
+ {
+ lock();
+ return true;
+ }
+ if (relative_time.is_special())
+ {
+ return true;
+ }
+ detail::platform_duration d(relative_time);
+#if defined(BOOST_THREAD_HAS_MONO_CLOCK) && !defined(BOOST_THREAD_INTERNAL_CLOCK_IS_MONO)
+ const detail::mono_platform_timepoint ts(detail::mono_platform_clock::now() + d);
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ while ( ! do_try_lock_until(detail::internal_platform_clock::now() + d) )
+ {
+ d = ts - detail::mono_platform_clock::now();
+ if ( d <= detail::platform_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+ return true;
+#else
+ return do_try_lock_until(detail::internal_platform_clock::now() + d);
+#endif
+ }
+ bool timed_lock(boost::xtime const & absolute_time)
+ {
+ return timed_lock(system_time(absolute_time));
+ }
+#endif
+#ifdef BOOST_THREAD_USES_PTHREAD_TIMEDLOCK
+ void lock()
+ {
+ int res = posix::pthread_mutex_lock(&m);
+ if (res)
+ {
+ boost::throw_exception(lock_error(res,"boost: mutex lock failed in pthread_mutex_lock"));
+ }
+ }
+
+ void unlock()
+ {
+ int res = posix::pthread_mutex_unlock(&m);
+ (void)res;
+ BOOST_ASSERT(res == 0);
+// if (res)
+// {
+// boost::throw_exception(lock_error(res,"boost: mutex unlock failed in pthread_mutex_unlock"));
+// }
+ }
+
+ bool try_lock()
+ {
+ int res;
+ do
+ {
+ res = posix::pthread_mutex_trylock(&m);
+ } while (res == EINTR);
+ if (res==EBUSY)
+ {
+ return false;
+ }
+
+ return !res;
+ }
+
+
+ private:
+ bool do_try_lock_until(detail::internal_platform_timepoint const &timeout)
+ {
+ int const res=pthread_mutex_timedlock(&m,&timeout.getTs());
+ BOOST_ASSERT(!res || res==ETIMEDOUT);
+ return !res;
+ }
+ public:
+
+#else
+ void lock()
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ while(is_locked)
+ {
+ BOOST_VERIFY(!posix::pthread_cond_wait(&cond,&m));
+ }
+ is_locked=true;
+ }
+
+ void unlock()
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ is_locked=false;
+ BOOST_VERIFY(!posix::pthread_cond_signal(&cond));
+ }
+
+ bool try_lock()
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ if(is_locked)
+ {
+ return false;
+ }
+ is_locked=true;
+ return true;
+ }
+
+ private:
+ bool do_try_lock_until(detail::internal_platform_timepoint const &timeout)
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ while(is_locked)
+ {
+ int const cond_res=pthread_cond_timedwait(&cond,&m,&timeout.getTs());
+ if(cond_res==ETIMEDOUT)
+ {
+ break;
+ }
+ BOOST_ASSERT(!cond_res);
+ }
+ if(is_locked)
+ {
+ return false;
+ }
+ is_locked=true;
+ return true;
+ }
+ public:
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock(system_time const & abs_time)
+ {
+ const detail::real_platform_timepoint ts(abs_time);
+#if defined BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ while ( ! do_try_lock_until(detail::internal_platform_clock::now() + d) )
+ {
+ d = ts - detail::real_platform_clock::now();
+ if ( d <= detail::platform_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+ return true;
+#else
+ return do_try_lock_until(ts);
+#endif
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ while ( ! try_lock_until(detail::internal_chrono_clock::now() + d))
+ {
+ d = t - Clock::now();
+ if ( d <= common_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ }
+ return true;
+ }
+ template <class Duration>
+ bool try_lock_until(const chrono::time_point<detail::internal_chrono_clock, Duration>& t)
+ {
+ detail::internal_platform_timepoint ts(t);
+ return do_try_lock_until(ts);
+ }
+#endif
+
+#define BOOST_THREAD_DEFINES_TIMED_MUTEX_NATIVE_HANDLE
+ typedef pthread_mutex_t* native_handle_type;
+ native_handle_type native_handle()
+ {
+ return &m;
+ }
+
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ typedef unique_lock<timed_mutex> scoped_timed_lock;
+ typedef detail::try_lock_wrapper<timed_mutex> scoped_try_lock;
+ typedef scoped_timed_lock scoped_lock;
+#endif
+ };
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/once.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/once.hpp
new file mode 100644
index 00000000000..0bef0387de7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/once.hpp
@@ -0,0 +1,540 @@
+#ifndef BOOST_THREAD_PTHREAD_ONCE_HPP
+#define BOOST_THREAD_PTHREAD_ONCE_HPP
+
+// once.hpp
+//
+// (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/detail/invoke.hpp>
+
+#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#include <boost/thread/detail/delete.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+
+#include <boost/bind.hpp>
+#include <boost/assert.hpp>
+#include <boost/config/abi_prefix.hpp>
+
+#include <boost/cstdint.hpp>
+#include <pthread.h>
+#include <csignal>
+
+namespace boost
+{
+
+ struct once_flag;
+
+ #define BOOST_ONCE_INITIAL_FLAG_VALUE 0
+
+ namespace thread_detail
+ {
+ typedef boost::uint32_t uintmax_atomic_t;
+ #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(value) value##u
+ #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(~0)
+
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename Function, class ...ArgTypes>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args);
+#else
+ template<typename Function>
+ inline void call_once(once_flag& flag, Function f);
+ template<typename Function, typename T1>
+ inline void call_once(once_flag& flag, Function f, T1 p1);
+ template<typename Function, typename T1, typename T2>
+ inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2);
+ template<typename Function, typename T1, typename T2, typename T3>
+ inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3);
+#endif
+
+ struct once_flag
+ {
+ BOOST_THREAD_NO_COPYABLE(once_flag)
+ BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT
+ : epoch(BOOST_ONCE_INITIAL_FLAG_VALUE)
+ {}
+ private:
+ volatile thread_detail::uintmax_atomic_t epoch;
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename Function, class ...ArgTypes>
+ friend void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args);
+#else
+ template<typename Function>
+ friend void call_once(once_flag& flag, Function f);
+ template<typename Function, typename T1>
+ friend void call_once(once_flag& flag, Function f, T1 p1);
+ template<typename Function, typename T1, typename T2>
+ friend void call_once(once_flag& flag, Function f, T1 p1, T2 p2);
+ template<typename Function, typename T1, typename T2, typename T3>
+ friend void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3);
+
+#endif
+
+ };
+
+#define BOOST_ONCE_INIT once_flag()
+
+#else // BOOST_THREAD_PROVIDES_ONCE_CXX11
+
+ struct once_flag
+ {
+ volatile thread_detail::uintmax_atomic_t epoch;
+ };
+
+#define BOOST_ONCE_INIT {BOOST_ONCE_INITIAL_FLAG_VALUE}
+#endif // BOOST_THREAD_PROVIDES_ONCE_CXX11
+
+
+#if defined BOOST_THREAD_PROVIDES_INVOKE
+#define BOOST_THREAD_INVOKE_RET_VOID detail::invoke
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL
+#elif defined BOOST_THREAD_PROVIDES_INVOKE_RET
+#define BOOST_THREAD_INVOKE_RET_VOID detail::invoke<void>
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL
+#else
+#define BOOST_THREAD_INVOKE_RET_VOID boost::bind
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL ()
+#endif
+
+ namespace thread_detail
+ {
+ BOOST_THREAD_DECL uintmax_atomic_t& get_once_per_thread_epoch();
+ BOOST_THREAD_DECL extern uintmax_atomic_t once_global_epoch;
+ BOOST_THREAD_DECL extern pthread_mutex_t once_epoch_mutex;
+ BOOST_THREAD_DECL extern pthread_cond_t once_epoch_cv;
+ }
+
+ // Based on Mike Burrows fast_pthread_once algorithm as described in
+ // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html
+
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+
+ template<typename Function, class ...ArgTypes>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+
+ }
+ }
+#else
+ template<typename Function>
+ inline void call_once(once_flag& flag, Function f)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ f();
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+ }
+ }
+
+ template<typename Function, typename T1>
+ inline void call_once(once_flag& flag, Function f, T1 p1)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+ }
+ }
+ template<typename Function, typename T1, typename T2>
+ inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1, p2) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+ }
+ }
+
+ template<typename Function, typename T1, typename T2, typename T3>
+ inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1, p2, p3) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+ }
+ }
+
+ template<typename Function>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ f();
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+ }
+ }
+
+ template<typename Function, typename T1>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+ }
+ }
+ template<typename Function, typename T1, typename T2>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1)),
+ thread_detail::decay_copy(boost::forward<T1>(p2))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+ }
+ }
+
+ template<typename Function, typename T1, typename T2, typename T3>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2, BOOST_THREAD_RV_REF(T3) p3)
+ {
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=thread_detail::get_once_per_thread_epoch();
+
+ if(epoch<this_thread_epoch)
+ {
+ pthread::pthread_mutex_scoped_lock lk(&thread_detail::once_epoch_mutex);
+
+ while(flag.epoch<=being_initialized)
+ {
+ if(flag.epoch==uninitialized_flag)
+ {
+ flag.epoch=being_initialized;
+ BOOST_TRY
+ {
+ pthread::pthread_mutex_scoped_unlock relocker(&thread_detail::once_epoch_mutex);
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1)),
+ thread_detail::decay_copy(boost::forward<T1>(p2)),
+ thread_detail::decay_copy(boost::forward<T1>(p3))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ flag.epoch=uninitialized_flag;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ flag.epoch=--thread_detail::once_global_epoch;
+ BOOST_VERIFY(!pthread_cond_broadcast(&thread_detail::once_epoch_cv));
+ }
+ else
+ {
+ while(flag.epoch==being_initialized)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&thread_detail::once_epoch_cv,&thread_detail::once_epoch_mutex));
+ }
+ }
+ }
+ this_thread_epoch=thread_detail::once_global_epoch;
+ }
+ }
+
+#endif
+
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/once_atomic.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/once_atomic.hpp
new file mode 100644
index 00000000000..c54a35c5413
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/once_atomic.hpp
@@ -0,0 +1,313 @@
+#ifndef BOOST_THREAD_PTHREAD_ONCE_ATOMIC_HPP
+#define BOOST_THREAD_PTHREAD_ONCE_ATOMIC_HPP
+
+// once.hpp
+//
+// (C) Copyright 2013 Andrey Semashev
+// (C) Copyright 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/cstdint.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/detail/invoke.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+#include <boost/bind.hpp>
+#include <boost/atomic.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+
+ struct once_flag;
+
+ namespace thread_detail
+ {
+
+#if BOOST_ATOMIC_INT_LOCK_FREE == 2
+ typedef unsigned int atomic_int_type;
+#elif BOOST_ATOMIC_SHORT_LOCK_FREE == 2
+ typedef unsigned short atomic_int_type;
+#elif BOOST_ATOMIC_CHAR_LOCK_FREE == 2
+ typedef unsigned char atomic_int_type;
+#elif BOOST_ATOMIC_LONG_LOCK_FREE == 2
+ typedef unsigned long atomic_int_type;
+#elif defined(BOOST_HAS_LONG_LONG) && BOOST_ATOMIC_LLONG_LOCK_FREE == 2
+ typedef ulong_long_type atomic_int_type;
+#else
+ // All tested integer types are not atomic, the spinlock pool will be used
+ typedef unsigned int atomic_int_type;
+#endif
+
+ typedef boost::atomic<atomic_int_type> atomic_type;
+
+ BOOST_THREAD_DECL bool enter_once_region(once_flag& flag) BOOST_NOEXCEPT;
+ BOOST_THREAD_DECL void commit_once_region(once_flag& flag) BOOST_NOEXCEPT;
+ BOOST_THREAD_DECL void rollback_once_region(once_flag& flag) BOOST_NOEXCEPT;
+ inline atomic_type& get_atomic_storage(once_flag& flag) BOOST_NOEXCEPT;
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+
+ struct once_flag
+ {
+ BOOST_THREAD_NO_COPYABLE(once_flag)
+ BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT : storage(0)
+ {
+ }
+
+ private:
+ thread_detail::atomic_type storage;
+
+ friend BOOST_THREAD_DECL bool thread_detail::enter_once_region(once_flag& flag) BOOST_NOEXCEPT;
+ friend BOOST_THREAD_DECL void thread_detail::commit_once_region(once_flag& flag) BOOST_NOEXCEPT;
+ friend BOOST_THREAD_DECL void thread_detail::rollback_once_region(once_flag& flag) BOOST_NOEXCEPT;
+ friend thread_detail::atomic_type& thread_detail::get_atomic_storage(once_flag& flag) BOOST_NOEXCEPT;
+ };
+
+#define BOOST_ONCE_INIT boost::once_flag()
+
+ namespace thread_detail
+ {
+ inline atomic_type& get_atomic_storage(once_flag& flag) BOOST_NOEXCEPT
+ {
+ //return reinterpret_cast< atomic_type& >(flag.storage);
+ return flag.storage;
+ }
+ }
+
+#else // BOOST_THREAD_PROVIDES_ONCE_CXX11
+ struct once_flag
+ {
+ // The thread_detail::atomic_int_type storage is marked
+ // with this attribute in order to let the compiler know that it will alias this member
+ // and silence compilation warnings.
+ BOOST_THREAD_ATTRIBUTE_MAY_ALIAS thread_detail::atomic_int_type storage;
+ };
+
+ #define BOOST_ONCE_INIT {0}
+
+ namespace thread_detail
+ {
+ inline atomic_type& get_atomic_storage(once_flag& flag) BOOST_NOEXCEPT
+ {
+ return reinterpret_cast< atomic_type& >(flag.storage);
+ }
+
+ }
+
+#endif // BOOST_THREAD_PROVIDES_ONCE_CXX11
+
+#if defined BOOST_THREAD_PROVIDES_INVOKE
+#define BOOST_THREAD_INVOKE_RET_VOID detail::invoke
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL
+#elif defined BOOST_THREAD_PROVIDES_INVOKE_RET
+#define BOOST_THREAD_INVOKE_RET_VOID detail::invoke<void>
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL
+#else
+#define BOOST_THREAD_INVOKE_RET_VOID boost::bind
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL ()
+#endif
+
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+
+ template<typename Function, class ...ArgTypes>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+#else
+ template<typename Function>
+ inline void call_once(once_flag& flag, Function f)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ f();
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+
+ template<typename Function, typename T1>
+ inline void call_once(once_flag& flag, Function f, T1 p1)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f, p1) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+
+ template<typename Function, typename T1, typename T2>
+ inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f, p1, p2) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+
+ template<typename Function, typename T1, typename T2, typename T3>
+ inline void call_once(once_flag& flag, Function f, T1 p1, T2 p2, T3 p3)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f, p1, p2, p3) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+#if !(defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, <= 0x5130))
+ template<typename Function>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ f();
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+
+ template<typename Function, typename T1>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+ template<typename Function, typename T1, typename T2>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1)),
+ thread_detail::decay_copy(boost::forward<T1>(p2))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+ template<typename Function, typename T1, typename T2, typename T3>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2, BOOST_THREAD_RV_REF(T3) p3)
+ {
+ if (thread_detail::enter_once_region(flag))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1)),
+ thread_detail::decay_copy(boost::forward<T1>(p2)),
+ thread_detail::decay_copy(boost::forward<T1>(p3))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+
+ }
+ BOOST_CATCH (...)
+ {
+ thread_detail::rollback_once_region(flag);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ thread_detail::commit_once_region(flag);
+ }
+ }
+
+#endif // __SUNPRO_CC
+
+#endif
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_helpers.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_helpers.hpp
new file mode 100644
index 00000000000..c1ff0f92398
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_helpers.hpp
@@ -0,0 +1,42 @@
+#ifndef BOOST_THREAD_PTHREAD_PTHREAD_HELPERS_HPP
+#define BOOST_THREAD_PTHREAD_PTHREAD_HELPERS_HPP
+// Copyright (C) 2017
+// Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+#include <pthread.h>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace pthread
+ {
+ inline int cond_init(pthread_cond_t& cond) {
+
+ #ifdef BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ pthread_condattr_t attr;
+ int res = pthread_condattr_init(&attr);
+ if (res)
+ {
+ return res;
+ }
+ pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
+ res=pthread_cond_init(&cond,&attr);
+ pthread_condattr_destroy(&attr);
+ return res;
+ #else
+ return pthread_cond_init(&cond,NULL);
+ #endif
+
+ }
+ }
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
new file mode 100644
index 00000000000..dbbb0202ae4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/pthread_mutex_scoped_lock.hpp
@@ -0,0 +1,139 @@
+#ifndef BOOST_PTHREAD_MUTEX_SCOPED_LOCK_HPP
+#define BOOST_PTHREAD_MUTEX_SCOPED_LOCK_HPP
+// (C) Copyright 2007-8 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <pthread.h>
+#include <boost/assert.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+namespace posix {
+#ifdef BOOST_THREAD_HAS_EINTR_BUG
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_mutex_destroy(pthread_mutex_t* m)
+ {
+ int ret;
+ do
+ {
+ ret = ::pthread_mutex_destroy(m);
+ } while (ret == EINTR);
+ return ret;
+ }
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_mutex_lock(pthread_mutex_t* m)
+ {
+ int ret;
+ do
+ {
+ ret = ::pthread_mutex_lock(m);
+ } while (ret == EINTR);
+ return ret;
+ }
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_mutex_unlock(pthread_mutex_t* m)
+ {
+ int ret;
+ do
+ {
+ ret = ::pthread_mutex_unlock(m);
+ } while (ret == EINTR);
+ return ret;
+ }
+#else
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_mutex_destroy(pthread_mutex_t* m)
+ {
+ return ::pthread_mutex_destroy(m);
+ }
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_mutex_lock(pthread_mutex_t* m)
+ {
+ return ::pthread_mutex_lock(m);
+ }
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_mutex_unlock(pthread_mutex_t* m)
+ {
+ return ::pthread_mutex_unlock(m);
+ }
+
+#endif
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_mutex_trylock(pthread_mutex_t* m)
+ {
+ return ::pthread_mutex_trylock(m);
+ }
+
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
+ {
+ return ::pthread_cond_wait(cond, mutex);
+ }
+ BOOST_FORCEINLINE BOOST_THREAD_DISABLE_THREAD_SAFETY_ANALYSIS
+ int pthread_cond_signal(pthread_cond_t *cond)
+ {
+ return ::pthread_cond_signal(cond);
+ }
+
+
+}
+ namespace pthread
+ {
+ class pthread_mutex_scoped_lock
+ {
+ pthread_mutex_t* m;
+ bool locked;
+ public:
+ explicit pthread_mutex_scoped_lock(pthread_mutex_t* m_) BOOST_NOEXCEPT:
+ m(m_),locked(true)
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_lock(m));
+ }
+ void unlock() BOOST_NOEXCEPT
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_unlock(m));
+ locked=false;
+ }
+ void unlock_if_locked() BOOST_NOEXCEPT
+ {
+ if(locked)
+ {
+ unlock();
+ }
+ }
+ ~pthread_mutex_scoped_lock() BOOST_NOEXCEPT
+ {
+ if(locked)
+ {
+ unlock();
+ }
+ }
+
+ };
+
+ class pthread_mutex_scoped_unlock
+ {
+ pthread_mutex_t* m;
+ public:
+ explicit pthread_mutex_scoped_unlock(pthread_mutex_t* m_) BOOST_NOEXCEPT:
+ m(m_)
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_unlock(m));
+ }
+ ~pthread_mutex_scoped_unlock() BOOST_NOEXCEPT
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_lock(m));
+ }
+
+ };
+ }
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/recursive_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/recursive_mutex.hpp
new file mode 100644
index 00000000000..f349cacf7ed
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/recursive_mutex.hpp
@@ -0,0 +1,436 @@
+#ifndef BOOST_THREAD_PTHREAD_RECURSIVE_MUTEX_HPP
+#define BOOST_THREAD_PTHREAD_RECURSIVE_MUTEX_HPP
+// (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <pthread.h>
+#include <boost/throw_exception.hpp>
+#include <boost/thread/exceptions.hpp>
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+#include <boost/thread/lock_types.hpp>
+#endif
+#include <boost/thread/thread_time.hpp>
+#include <boost/assert.hpp>
+#ifndef _WIN32
+#include <unistd.h>
+#endif
+#include <boost/date_time/posix_time/conversion.hpp>
+#include <errno.h>
+#include <boost/thread/detail/platform_time.hpp>
+#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#include <boost/thread/pthread/pthread_helpers.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
+
+
+#if defined BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE \
+ || defined __ANDROID__
+#define BOOST_THREAD_HAS_PTHREAD_MUTEXATTR_SETTYPE
+#endif
+
+#if defined BOOST_THREAD_HAS_PTHREAD_MUTEXATTR_SETTYPE && defined BOOST_THREAD_USES_PTHREAD_TIMEDLOCK
+#define BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
+#endif
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ class recursive_mutex
+ {
+ private:
+ pthread_mutex_t m;
+#ifndef BOOST_THREAD_HAS_PTHREAD_MUTEXATTR_SETTYPE
+ pthread_cond_t cond;
+ bool is_locked;
+ pthread_t owner;
+ unsigned count;
+#endif
+ public:
+ BOOST_THREAD_NO_COPYABLE(recursive_mutex)
+ recursive_mutex()
+ {
+#ifdef BOOST_THREAD_HAS_PTHREAD_MUTEXATTR_SETTYPE
+ pthread_mutexattr_t attr;
+
+ int const init_attr_res=pthread_mutexattr_init(&attr);
+ if(init_attr_res)
+ {
+ boost::throw_exception(thread_resource_error(init_attr_res, "boost:: recursive_mutex constructor failed in pthread_mutexattr_init"));
+ }
+ int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
+ if(set_attr_res)
+ {
+ BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
+ boost::throw_exception(thread_resource_error(set_attr_res, "boost:: recursive_mutex constructor failed in pthread_mutexattr_settype"));
+ }
+
+ int const res=pthread_mutex_init(&m,&attr);
+ if(res)
+ {
+ BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
+ boost::throw_exception(thread_resource_error(res, "boost:: recursive_mutex constructor failed in pthread_mutex_init"));
+ }
+ BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
+#else
+ int const res=pthread_mutex_init(&m,NULL);
+ if(res)
+ {
+ boost::throw_exception(thread_resource_error(res, "boost:: recursive_mutex constructor failed in pthread_mutex_init"));
+ }
+ int const res2=pthread::cond_init(cond);
+ if(res2)
+ {
+ BOOST_VERIFY(!pthread_mutex_destroy(&m));
+ boost::throw_exception(thread_resource_error(res2, "boost:: recursive_mutex constructor failed in pthread::cond_init"));
+ }
+ is_locked=false;
+ count=0;
+#endif
+ }
+ ~recursive_mutex()
+ {
+ BOOST_VERIFY(!pthread_mutex_destroy(&m));
+#ifndef BOOST_THREAD_HAS_PTHREAD_MUTEXATTR_SETTYPE
+ BOOST_VERIFY(!pthread_cond_destroy(&cond));
+#endif
+ }
+
+#ifdef BOOST_THREAD_HAS_PTHREAD_MUTEXATTR_SETTYPE
+ void lock()
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_lock(&m));
+ }
+
+ void unlock()
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_unlock(&m));
+ }
+
+ bool try_lock() BOOST_NOEXCEPT
+ {
+ int const res=posix::pthread_mutex_trylock(&m);
+ BOOST_ASSERT(!res || res==EBUSY);
+ return !res;
+ }
+#define BOOST_THREAD_DEFINES_RECURSIVE_MUTEX_NATIVE_HANDLE
+ typedef pthread_mutex_t* native_handle_type;
+ native_handle_type native_handle()
+ {
+ return &m;
+ }
+
+#else
+ void lock()
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ if(is_locked && pthread_equal(owner,pthread_self()))
+ {
+ ++count;
+ return;
+ }
+
+ while(is_locked)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&cond,&m));
+ }
+ is_locked=true;
+ ++count;
+ owner=pthread_self();
+ }
+
+ void unlock()
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ if(!--count)
+ {
+ is_locked=false;
+ }
+ BOOST_VERIFY(!pthread_cond_signal(&cond));
+ }
+
+ bool try_lock()
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ if(is_locked && !pthread_equal(owner,pthread_self()))
+ {
+ return false;
+ }
+ is_locked=true;
+ ++count;
+ owner=pthread_self();
+ return true;
+ }
+
+#endif
+
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ typedef unique_lock<recursive_mutex> scoped_lock;
+ typedef detail::try_lock_wrapper<recursive_mutex> scoped_try_lock;
+#endif
+ };
+
+ typedef recursive_mutex recursive_try_mutex;
+
+ class recursive_timed_mutex
+ {
+ private:
+ pthread_mutex_t m;
+#ifndef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
+ pthread_cond_t cond;
+ bool is_locked;
+ pthread_t owner;
+ unsigned count;
+#endif
+ public:
+ BOOST_THREAD_NO_COPYABLE(recursive_timed_mutex)
+ recursive_timed_mutex()
+ {
+#ifdef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
+ pthread_mutexattr_t attr;
+
+ int const init_attr_res=pthread_mutexattr_init(&attr);
+ if(init_attr_res)
+ {
+ boost::throw_exception(thread_resource_error(init_attr_res, "boost:: recursive_timed_mutex constructor failed in pthread_mutexattr_init"));
+ }
+ int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE);
+ if(set_attr_res)
+ {
+ boost::throw_exception(thread_resource_error(set_attr_res, "boost:: recursive_timed_mutex constructor failed in pthread_mutexattr_settype"));
+ }
+
+ int const res=pthread_mutex_init(&m,&attr);
+ if(res)
+ {
+ BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
+ boost::throw_exception(thread_resource_error(res, "boost:: recursive_timed_mutex constructor failed in pthread_mutex_init"));
+ }
+ BOOST_VERIFY(!pthread_mutexattr_destroy(&attr));
+#else
+ int const res=pthread_mutex_init(&m,NULL);
+ if(res)
+ {
+ boost::throw_exception(thread_resource_error(res, "boost:: recursive_timed_mutex constructor failed in pthread_mutex_init"));
+ }
+ int const res2=pthread::cond_init(cond);
+ if(res2)
+ {
+ BOOST_VERIFY(!pthread_mutex_destroy(&m));
+ boost::throw_exception(thread_resource_error(res2, "boost:: recursive_timed_mutex constructor failed in pthread::cond_init"));
+ }
+ is_locked=false;
+ count=0;
+#endif
+ }
+ ~recursive_timed_mutex()
+ {
+ BOOST_VERIFY(!pthread_mutex_destroy(&m));
+#ifndef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
+ BOOST_VERIFY(!pthread_cond_destroy(&cond));
+#endif
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const & relative_time)
+ {
+ if (relative_time.is_pos_infinity())
+ {
+ lock();
+ return true;
+ }
+ if (relative_time.is_special())
+ {
+ return true;
+ }
+ detail::platform_duration d(relative_time);
+#if defined(BOOST_THREAD_HAS_MONO_CLOCK) && !defined(BOOST_THREAD_INTERNAL_CLOCK_IS_MONO)
+ const detail::mono_platform_timepoint ts(detail::mono_platform_clock::now() + d);
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ while ( ! do_try_lock_until(detail::internal_platform_clock::now() + d) )
+ {
+ d = ts - detail::mono_platform_clock::now();
+ if ( d <= detail::platform_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+ return true;
+#else
+ return do_try_lock_until(detail::internal_platform_clock::now() + d);
+#endif
+ }
+#endif
+
+#ifdef BOOST_USE_PTHREAD_RECURSIVE_TIMEDLOCK
+ void lock()
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_lock(&m));
+ }
+
+ void unlock()
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_unlock(&m));
+ }
+
+ bool try_lock()
+ {
+ int const res=posix::pthread_mutex_trylock(&m);
+ BOOST_ASSERT(!res || res==EBUSY);
+ return !res;
+ }
+ private:
+ bool do_try_lock_until(detail::internal_platform_timepoint const &timeout)
+ {
+ int const res=pthread_mutex_timedlock(&m,&timeout.getTs());
+ BOOST_ASSERT(!res || res==ETIMEDOUT);
+ return !res;
+ }
+
+ public:
+
+#else
+ void lock()
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ if(is_locked && pthread_equal(owner,pthread_self()))
+ {
+ ++count;
+ return;
+ }
+
+ while(is_locked)
+ {
+ BOOST_VERIFY(!pthread_cond_wait(&cond,&m));
+ }
+ is_locked=true;
+ ++count;
+ owner=pthread_self();
+ }
+
+ void unlock()
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ if(!--count)
+ {
+ is_locked=false;
+ }
+ BOOST_VERIFY(!pthread_cond_signal(&cond));
+ }
+
+ bool try_lock() BOOST_NOEXCEPT
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ if(is_locked && !pthread_equal(owner,pthread_self()))
+ {
+ return false;
+ }
+ is_locked=true;
+ ++count;
+ owner=pthread_self();
+ return true;
+ }
+
+ private:
+ bool do_try_lock_until(detail::internal_platform_timepoint const &timeout)
+ {
+ boost::pthread::pthread_mutex_scoped_lock const local_lock(&m);
+ if(is_locked && pthread_equal(owner,pthread_self()))
+ {
+ ++count;
+ return true;
+ }
+ while(is_locked)
+ {
+ int const cond_res=pthread_cond_timedwait(&cond,&m,&timeout.getTs());
+ if(cond_res==ETIMEDOUT)
+ {
+ break;
+ }
+ BOOST_ASSERT(!cond_res);
+ }
+ if(is_locked)
+ {
+ return false;
+ }
+ is_locked=true;
+ ++count;
+ owner=pthread_self();
+ return true;
+ }
+ public:
+
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock(system_time const & abs_time)
+ {
+ const detail::real_platform_timepoint ts(abs_time);
+#if defined BOOST_THREAD_INTERNAL_CLOCK_IS_MONO
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ while ( ! do_try_lock_until(detail::internal_platform_clock::now() + d) )
+ {
+ d = ts - detail::real_platform_clock::now();
+ if ( d <= detail::platform_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+ return true;
+#else
+ return do_try_lock_until(ts);
+#endif
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ while ( ! try_lock_until(detail::internal_chrono_clock::now() + d))
+ {
+ d = t - Clock::now();
+ if ( d <= common_duration::zero() ) return false; // timeout occurred
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ }
+ return true;
+
+ }
+ template <class Duration>
+ bool try_lock_until(const chrono::time_point<detail::internal_chrono_clock, Duration>& t)
+ {
+ detail::internal_platform_timepoint ts(t);
+ return do_try_lock_until(ts);
+ }
+#endif
+
+#define BOOST_THREAD_DEFINES_RECURSIVE_TIMED_MUTEX_NATIVE_HANDLE
+ typedef pthread_mutex_t* native_handle_type;
+ native_handle_type native_handle()
+ {
+ return &m;
+ }
+
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ typedef unique_lock<recursive_timed_mutex> scoped_timed_lock;
+ typedef detail::try_lock_wrapper<recursive_timed_mutex> scoped_try_lock;
+ typedef scoped_timed_lock scoped_lock;
+#endif
+ };
+
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/shared_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/shared_mutex.hpp
new file mode 100644
index 00000000000..ed9a296f2e5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/shared_mutex.hpp
@@ -0,0 +1,642 @@
+#ifndef BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP
+#define BOOST_THREAD_PTHREAD_SHARED_MUTEX_HPP
+
+// (C) Copyright 2006-8 Anthony Williams
+// (C) Copyright 2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/assert.hpp>
+#include <boost/bind.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/condition_variable.hpp>
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+#include <boost/thread/detail/thread_interruption.hpp>
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ class shared_mutex
+ {
+ private:
+ class state_data
+ {
+ public:
+ state_data () :
+ shared_count(0),
+ exclusive(false),
+ upgrade(false),
+ exclusive_waiting_blocked(false)
+ {}
+
+ void assert_free() const
+ {
+ BOOST_ASSERT( ! exclusive );
+ BOOST_ASSERT( ! upgrade );
+ BOOST_ASSERT( shared_count==0 );
+ }
+
+ void assert_locked() const
+ {
+ BOOST_ASSERT( exclusive );
+ BOOST_ASSERT( shared_count==0 );
+ BOOST_ASSERT( ! upgrade );
+ }
+
+ void assert_lock_shared () const
+ {
+ BOOST_ASSERT( ! exclusive );
+ BOOST_ASSERT( shared_count>0 );
+ //BOOST_ASSERT( (! upgrade) || (shared_count>1));
+ // if upgraded there are at least 2 threads sharing the mutex,
+ // except when unlock_upgrade_and_lock has decreased the number of readers but has not taken yet exclusive ownership.
+ }
+
+ void assert_lock_upgraded () const
+ {
+ BOOST_ASSERT( ! exclusive );
+ BOOST_ASSERT( upgrade );
+ BOOST_ASSERT( shared_count>0 );
+ }
+
+ void assert_lock_not_upgraded () const
+ {
+ BOOST_ASSERT( ! upgrade );
+ }
+
+ bool can_lock () const
+ {
+ return ! (shared_count || exclusive);
+ }
+
+ void lock ()
+ {
+ exclusive = true;
+ }
+
+ void unlock ()
+ {
+ exclusive = false;
+ exclusive_waiting_blocked = false;
+ }
+
+ bool can_lock_shared () const
+ {
+ return ! (exclusive || exclusive_waiting_blocked);
+ }
+
+ bool no_shared () const
+ {
+ return shared_count==0;
+ }
+
+ bool one_shared () const
+ {
+ return shared_count==1;
+ }
+
+ void lock_shared ()
+ {
+ ++shared_count;
+ }
+
+
+ void unlock_shared ()
+ {
+ --shared_count;
+ }
+
+ void lock_upgrade ()
+ {
+ ++shared_count;
+ upgrade=true;
+ }
+ bool can_lock_upgrade () const
+ {
+ return ! (exclusive || exclusive_waiting_blocked || upgrade);
+ }
+
+ void unlock_upgrade ()
+ {
+ upgrade=false;
+ --shared_count;
+ }
+
+ //private:
+ unsigned shared_count;
+ bool exclusive;
+ bool upgrade;
+ bool exclusive_waiting_blocked;
+ };
+
+
+
+ state_data state;
+ boost::mutex state_change;
+ boost::condition_variable shared_cond;
+ boost::condition_variable exclusive_cond;
+ boost::condition_variable upgrade_cond;
+
+ void release_waiters()
+ {
+ exclusive_cond.notify_one();
+ shared_cond.notify_all();
+ }
+
+ public:
+
+ BOOST_THREAD_NO_COPYABLE(shared_mutex)
+
+ shared_mutex()
+ {
+ }
+
+ ~shared_mutex()
+ {
+ }
+
+ void lock_shared()
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ shared_cond.wait(lk, boost::bind(&state_data::can_lock_shared, boost::ref(state)));
+ state.lock_shared();
+ }
+
+ bool try_lock_shared()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+
+ if(!state.can_lock_shared())
+ {
+ return false;
+ }
+ state.lock_shared();
+ return true;
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock_shared(system_time const& timeout)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_shared, boost::ref(state))))
+ {
+ return false;
+ }
+ state.lock_shared();
+ return true;
+ }
+
+ template<typename TimeDuration>
+ bool timed_lock_shared(TimeDuration const & relative_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_shared, boost::ref(state))))
+ {
+ return false;
+ }
+ state.lock_shared();
+ return true;
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_shared_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_shared_until(const chrono::time_point<Clock, Duration>& abs_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_shared, boost::ref(state))))
+ {
+ return false;
+ }
+ state.lock_shared();
+ return true;
+ }
+#endif
+ void unlock_shared()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_shared();
+ state.unlock_shared();
+ if (state.no_shared())
+ {
+ if (state.upgrade)
+ {
+ // As there is a thread doing a unlock_upgrade_and_lock that is waiting for state.no_shared()
+ // avoid other threads to lock, lock_upgrade or lock_shared, so only this thread is notified.
+ state.upgrade=false;
+ state.exclusive=true;
+ //lk.unlock();
+ upgrade_cond.notify_one();
+ }
+ else
+ {
+ state.exclusive_waiting_blocked=false;
+ //lk.unlock();
+ }
+ release_waiters();
+ }
+ }
+
+ void lock()
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.exclusive_waiting_blocked=true;
+ exclusive_cond.wait(lk, boost::bind(&state_data::can_lock, boost::ref(state)));
+ state.exclusive=true;
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock(system_time const& timeout)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.exclusive_waiting_blocked=true;
+ if(!exclusive_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock, boost::ref(state))))
+ {
+ state.exclusive_waiting_blocked=false;
+ release_waiters();
+ return false;
+ }
+ state.exclusive=true;
+ return true;
+ }
+
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const & relative_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.exclusive_waiting_blocked=true;
+ if(!exclusive_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock, boost::ref(state))))
+ {
+ state.exclusive_waiting_blocked=false;
+ release_waiters();
+ return false;
+ }
+ state.exclusive=true;
+ return true;
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& abs_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.exclusive_waiting_blocked=true;
+ if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock, boost::ref(state))))
+ {
+ state.exclusive_waiting_blocked=false;
+ release_waiters();
+ return false;
+ }
+ state.exclusive=true;
+ return true;
+ }
+#endif
+
+ bool try_lock()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ if(!state.can_lock())
+ {
+ return false;
+ }
+ state.exclusive=true;
+ return true;
+ }
+
+ void unlock()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_locked();
+ state.exclusive=false;
+ state.exclusive_waiting_blocked=false;
+ state.assert_free();
+ release_waiters();
+ }
+
+ void lock_upgrade()
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ shared_cond.wait(lk, boost::bind(&state_data::can_lock_upgrade, boost::ref(state)));
+ state.lock_shared();
+ state.upgrade=true;
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock_upgrade(system_time const& timeout)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))))
+ {
+ return false;
+ }
+ state.lock_shared();
+ state.upgrade=true;
+ return true;
+ }
+
+ template<typename TimeDuration>
+ bool timed_lock_upgrade(TimeDuration const & relative_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))))
+ {
+ return false;
+ }
+ state.lock_shared();
+ state.upgrade=true;
+ return true;
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_upgrade_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_upgrade_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_upgrade_until(const chrono::time_point<Clock, Duration>& abs_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))))
+ {
+ return false;
+ }
+ state.lock_shared();
+ state.upgrade=true;
+ return true;
+ }
+#endif
+ bool try_lock_upgrade()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ if(!state.can_lock_upgrade())
+ {
+ return false;
+ }
+ state.lock_shared();
+ state.upgrade=true;
+ state.assert_lock_upgraded();
+ return true;
+ }
+
+ void unlock_upgrade()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ //state.upgrade=false;
+ state.unlock_upgrade();
+ if(state.no_shared())
+ {
+ state.exclusive_waiting_blocked=false;
+ release_waiters();
+ } else {
+ shared_cond.notify_all();
+ }
+ }
+
+ // Upgrade <-> Exclusive
+ void unlock_upgrade_and_lock()
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_upgraded();
+ state.unlock_shared();
+ upgrade_cond.wait(lk, boost::bind(&state_data::no_shared, boost::ref(state)));
+ state.upgrade=false;
+ state.exclusive=true;
+ state.assert_locked();
+ }
+
+ void unlock_and_lock_upgrade()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_locked();
+ state.exclusive=false;
+ state.upgrade=true;
+ state.lock_shared();
+ state.exclusive_waiting_blocked=false;
+ state.assert_lock_upgraded();
+ release_waiters();
+ }
+
+ bool try_unlock_upgrade_and_lock()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_upgraded();
+ if( !state.exclusive
+ && !state.exclusive_waiting_blocked
+ && state.upgrade
+ && state.shared_count==1)
+ {
+ state.shared_count=0;
+ state.exclusive=true;
+ state.upgrade=false;
+ state.assert_locked();
+ return true;
+ }
+ return false;
+ }
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool
+ try_unlock_upgrade_and_lock_for(
+ const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_unlock_upgrade_and_lock_until(
+ chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool
+ try_unlock_upgrade_and_lock_until(
+ const chrono::time_point<Clock, Duration>& abs_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_upgraded();
+ if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, boost::ref(state))))
+ {
+ return false;
+ }
+ state.upgrade=false;
+ state.exclusive=true;
+ state.exclusive_waiting_blocked=false;
+ state.shared_count=0;
+ return true;
+ }
+#endif
+
+ // Shared <-> Exclusive
+ void unlock_and_lock_shared()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_locked();
+ state.exclusive=false;
+ state.lock_shared();
+ state.exclusive_waiting_blocked=false;
+ release_waiters();
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ bool try_unlock_shared_and_lock()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_shared();
+ if( !state.exclusive
+ && !state.exclusive_waiting_blocked
+ && !state.upgrade
+ && state.shared_count==1)
+ {
+ state.shared_count=0;
+ state.exclusive=true;
+ return true;
+ }
+ return false;
+ }
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool
+ try_unlock_shared_and_lock_for(
+ const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_unlock_shared_and_lock_until(
+ chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool
+ try_unlock_shared_and_lock_until(
+ const chrono::time_point<Clock, Duration>& abs_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_shared();
+ if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, boost::ref(state))))
+ {
+ return false;
+ }
+ state.upgrade=false;
+ state.exclusive=true;
+ state.exclusive_waiting_blocked=false;
+ state.shared_count=0;
+ return true;
+ }
+#endif
+#endif
+
+ // Shared <-> Upgrade
+ void unlock_upgrade_and_lock_shared()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_upgraded();
+ state.upgrade=false;
+ state.exclusive_waiting_blocked=false;
+ release_waiters();
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ bool try_unlock_shared_and_lock_upgrade()
+ {
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_shared();
+ if(state.can_lock_upgrade())
+ {
+ state.upgrade=true;
+ return true;
+ }
+ return false;
+ }
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool
+ try_unlock_shared_and_lock_upgrade_for(
+ const chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_unlock_shared_and_lock_upgrade_until(
+ chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool
+ try_unlock_shared_and_lock_upgrade_until(
+ const chrono::time_point<Clock, Duration>& abs_time)
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ boost::this_thread::disable_interruption do_not_disturb;
+#endif
+ boost::unique_lock<boost::mutex> lk(state_change);
+ state.assert_lock_shared();
+ if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))))
+ {
+ return false;
+ }
+ state.upgrade=true;
+ return true;
+ }
+#endif
+#endif
+ };
+
+ typedef shared_mutex upgrade_mutex;
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/thread_data.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/thread_data.hpp
new file mode 100644
index 00000000000..46f111d9477
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/thread_data.hpp
@@ -0,0 +1,405 @@
+#ifndef BOOST_THREAD_PTHREAD_THREAD_DATA_HPP
+#define BOOST_THREAD_PTHREAD_THREAD_DATA_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/exceptions.hpp>
+#include <boost/thread/lock_guard.hpp>
+#include <boost/thread/lock_types.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/pthread/condition_variable_fwd.hpp>
+#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+
+#include <boost/shared_ptr.hpp>
+#include <boost/enable_shared_from_this.hpp>
+#include <boost/assert.hpp>
+#include <boost/thread/detail/platform_time.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#endif
+
+#include <map>
+#include <vector>
+#include <utility>
+
+#if defined(__ANDROID__)
+# ifndef PAGE_SIZE
+# define PAGE_SIZE 4096
+# endif
+#endif
+
+#include <pthread.h>
+#include <unistd.h>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ class thread_attributes {
+ public:
+ thread_attributes() BOOST_NOEXCEPT {
+ int res = pthread_attr_init(&val_);
+ BOOST_VERIFY(!res && "pthread_attr_init failed");
+ }
+ ~thread_attributes() {
+ int res = pthread_attr_destroy(&val_);
+ BOOST_VERIFY(!res && "pthread_attr_destroy failed");
+ }
+ // stack
+ void set_stack_size(std::size_t size) BOOST_NOEXCEPT {
+ if (size==0) return;
+#ifdef BOOST_THREAD_USES_GETPAGESIZE
+ std::size_t page_size = getpagesize();
+#else
+ std::size_t page_size = ::sysconf( _SC_PAGESIZE);
+#endif
+#if PTHREAD_STACK_MIN > 0
+ if (size<PTHREAD_STACK_MIN) size=PTHREAD_STACK_MIN;
+#endif
+ size = ((size+page_size-1)/page_size)*page_size;
+ int res = pthread_attr_setstacksize(&val_, size);
+ BOOST_VERIFY(!res && "pthread_attr_setstacksize failed");
+ }
+
+ std::size_t get_stack_size() const BOOST_NOEXCEPT {
+ std::size_t size;
+ int res = pthread_attr_getstacksize(&val_, &size);
+ BOOST_VERIFY(!res && "pthread_attr_getstacksize failed");
+ return size;
+ }
+#define BOOST_THREAD_DEFINES_THREAD_ATTRIBUTES_NATIVE_HANDLE
+
+ typedef pthread_attr_t native_handle_type;
+ native_handle_type* native_handle() BOOST_NOEXCEPT {
+ return &val_;
+ }
+ const native_handle_type* native_handle() const BOOST_NOEXCEPT {
+ return &val_;
+ }
+
+ private:
+ pthread_attr_t val_;
+ };
+
+ class thread;
+
+ namespace detail
+ {
+ struct shared_state_base;
+ struct tss_cleanup_function;
+ struct thread_exit_callback_node;
+ struct tss_data_node
+ {
+ boost::shared_ptr<boost::detail::tss_cleanup_function> func;
+ void* value;
+
+ tss_data_node(boost::shared_ptr<boost::detail::tss_cleanup_function> func_,
+ void* value_):
+ func(func_),value(value_)
+ {}
+ };
+
+ struct thread_data_base;
+ typedef boost::shared_ptr<thread_data_base> thread_data_ptr;
+
+ struct BOOST_THREAD_DECL thread_data_base:
+ enable_shared_from_this<thread_data_base>
+ {
+ thread_data_ptr self;
+ pthread_t thread_handle;
+ boost::mutex data_mutex;
+ boost::condition_variable done_condition;
+ bool done;
+ bool join_started;
+ bool joined;
+ boost::detail::thread_exit_callback_node* thread_exit_callbacks;
+ std::map<void const*,boost::detail::tss_data_node> tss_data;
+
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ // These data must be at the end so that the access to the other fields doesn't change
+ // when BOOST_THREAD_PROVIDES_INTERRUPTIONS is defined.
+ // Another option is to have them always
+ pthread_mutex_t* cond_mutex;
+ pthread_cond_t* current_cond;
+//#endif
+ typedef std::vector<std::pair<condition_variable*, mutex*>
+ //, hidden_allocator<std::pair<condition_variable*, mutex*> >
+ > notify_list_t;
+ notify_list_t notify;
+
+//#ifndef BOOST_NO_EXCEPTIONS
+ typedef std::vector<shared_ptr<shared_state_base> > async_states_t;
+ async_states_t async_states_;
+//#endif
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ // These data must be at the end so that the access to the other fields doesn't change
+ // when BOOST_THREAD_PROVIDES_INTERRUPTIONS is defined.
+ // Another option is to have them always
+ bool interrupt_enabled;
+ bool interrupt_requested;
+//#endif
+ thread_data_base():
+ thread_handle(0),
+ done(false),join_started(false),joined(false),
+ thread_exit_callbacks(0),
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ cond_mutex(0),
+ current_cond(0),
+//#endif
+ notify()
+//#ifndef BOOST_NO_EXCEPTIONS
+ , async_states_()
+//#endif
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ , interrupt_enabled(true)
+ , interrupt_requested(false)
+//#endif
+ {}
+ virtual ~thread_data_base();
+
+ typedef pthread_t native_handle_type;
+
+ virtual void run()=0;
+ virtual void notify_all_at_thread_exit(condition_variable* cv, mutex* m)
+ {
+ notify.push_back(std::pair<condition_variable*, mutex*>(cv, m));
+ }
+
+//#ifndef BOOST_NO_EXCEPTIONS
+ void make_ready_at_thread_exit(shared_ptr<shared_state_base> as)
+ {
+ async_states_.push_back(as);
+ }
+//#endif
+ };
+
+ BOOST_THREAD_DECL thread_data_base* get_current_thread_data();
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ class interruption_checker
+ {
+ thread_data_base* const thread_info;
+ pthread_mutex_t* m;
+ bool set;
+ bool done;
+
+ void check_for_interruption()
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+ if(thread_info->interrupt_requested)
+ {
+ thread_info->interrupt_requested=false;
+ throw thread_interrupted(); // BOOST_NO_EXCEPTIONS protected
+ }
+#endif
+ }
+
+ void operator=(interruption_checker&);
+ public:
+ explicit interruption_checker(pthread_mutex_t* cond_mutex,pthread_cond_t* cond):
+ thread_info(detail::get_current_thread_data()),m(cond_mutex),
+ set(thread_info && thread_info->interrupt_enabled), done(false)
+ {
+ if(set)
+ {
+ lock_guard<mutex> guard(thread_info->data_mutex);
+ check_for_interruption();
+ thread_info->cond_mutex=cond_mutex;
+ thread_info->current_cond=cond;
+ BOOST_VERIFY(!posix::pthread_mutex_lock(m));
+ }
+ else
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_lock(m));
+ }
+ }
+ void unlock_if_locked()
+ {
+ if ( ! done) {
+ if (set)
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_unlock(m));
+ lock_guard<mutex> guard(thread_info->data_mutex);
+ thread_info->cond_mutex=NULL;
+ thread_info->current_cond=NULL;
+ }
+ else
+ {
+ BOOST_VERIFY(!posix::pthread_mutex_unlock(m));
+ }
+ done = true;
+ }
+ }
+
+ ~interruption_checker() BOOST_NOEXCEPT_IF(false)
+ {
+ unlock_if_locked();
+ }
+ };
+#endif
+ }
+
+ namespace this_thread
+ {
+ void BOOST_THREAD_DECL yield() BOOST_NOEXCEPT;
+
+ namespace hidden
+ {
+ inline bool always_false()
+ {
+ return false;
+ }
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+#ifdef __DECXXX
+ /// Workaround of DECCXX issue of incorrect template substitution
+ template<>
+#endif
+ inline void sleep(system_time const& abs_time)
+ {
+ mutex mx;
+ unique_lock<mutex> lock(mx);
+ condition_variable cond;
+ cond.timed_wait(lock, abs_time, hidden::always_false);
+ }
+
+ template<typename TimeDuration>
+ void sleep(TimeDuration const& rel_time)
+ {
+ mutex mx;
+ unique_lock<mutex> lock(mx);
+ condition_variable cond;
+ cond.timed_wait(lock, rel_time, hidden::always_false);
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ void sleep_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ mutex mut;
+ unique_lock<mutex> lk(mut);
+ condition_variable cv;
+ cv.wait_until(lk, t, hidden::always_false);
+ }
+
+ template <class Rep, class Period>
+ void sleep_for(const chrono::duration<Rep, Period>& d)
+ {
+ mutex mut;
+ unique_lock<mutex> lk(mut);
+ condition_variable cv;
+ cv.wait_for(lk, d, hidden::always_false);
+ }
+#endif
+
+ namespace no_interruption_point
+ {
+#if defined BOOST_THREAD_SLEEP_FOR_IS_STEADY
+// Use pthread_delay_np or nanosleep when available
+// because they do not provide an interruption point.
+
+ namespace hidden
+ {
+ void BOOST_THREAD_DECL sleep_for_internal(const detail::platform_duration& ts);
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+#ifdef __DECXXX
+ /// Workaround of DECCXX issue of incorrect template substitution
+ template<>
+#endif
+ inline void sleep(system_time const& abs_time)
+ {
+ const detail::real_platform_timepoint ts(abs_time);
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ while (d > detail::platform_duration::zero())
+ {
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ hidden::sleep_for_internal(d);
+ d = ts - detail::real_platform_clock::now();
+ }
+ }
+
+ template<typename TimeDuration>
+ void sleep(TimeDuration const& rel_time)
+ {
+ hidden::sleep_for_internal(detail::platform_duration(rel_time));
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ void sleep_for(const chrono::duration<Rep, Period>& d)
+ {
+ hidden::sleep_for_internal(detail::platform_duration(d));
+ }
+
+ template <class Duration>
+ void sleep_until(const chrono::time_point<chrono::steady_clock, Duration>& t)
+ {
+ sleep_for(t - chrono::steady_clock::now());
+ }
+
+ template <class Clock, class Duration>
+ void sleep_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ while (d > common_duration::zero())
+ {
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ hidden::sleep_for_internal(detail::platform_duration(d));
+ d = t - Clock::now();
+ }
+ }
+#endif
+
+#else // BOOST_THREAD_SLEEP_FOR_IS_STEADY
+// When pthread_delay_np and nanosleep are not available,
+// fall back to using the interruptible sleep functions.
+
+#if defined BOOST_THREAD_USES_DATETIME
+#ifdef __DECXXX
+ /// Workaround of DECCXX issue of incorrect template substitution
+ template<>
+#endif
+ inline void sleep(system_time const& abs_time)
+ {
+ this_thread::sleep(abs_time);
+ }
+
+ template<typename TimeDuration>
+ void sleep(TimeDuration const& rel_time)
+ {
+ this_thread::sleep(rel_time);
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ void sleep_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ this_thread::sleep_until(t);
+ }
+
+ template <class Rep, class Period>
+ void sleep_for(const chrono::duration<Rep, Period>& d)
+ {
+ this_thread::sleep_for(d);
+ }
+#endif
+
+#endif // BOOST_THREAD_SLEEP_FOR_IS_STEADY
+ } // no_interruption_point
+ } // this_thread
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/pthread/thread_heap_alloc.hpp b/src/third_party/boost-1.69.0/boost/thread/pthread/thread_heap_alloc.hpp
new file mode 100644
index 00000000000..dec7b661d75
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/pthread/thread_heap_alloc.hpp
@@ -0,0 +1,272 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2008 Anthony Williams
+#ifndef THREAD_HEAP_ALLOC_PTHREAD_HPP
+#define THREAD_HEAP_ALLOC_PTHREAD_HPP
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ template<typename T>
+ inline T* heap_new()
+ {
+ return new T();
+ }
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) && ! defined (BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename T,typename... Args>
+ inline T* heap_new(Args&&... args)
+ {
+ return new T(static_cast<Args&&>(args)...);
+ }
+#elif ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
+ template<typename T,typename A1>
+ inline T* heap_new(A1&& a1)
+ {
+ return new T(static_cast<A1&&>(a1));
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1&& a1,A2&& a2)
+ {
+ return new T(static_cast<A1&&>(a1),static_cast<A2&&>(a2));
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1&& a1,A2&& a2,A3&& a3)
+ {
+ return new T(static_cast<A1&&>(a1),static_cast<A2&&>(a2),
+ static_cast<A3&&>(a3));
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1&& a1,A2&& a2,A3&& a3,A4&& a4)
+ {
+ return new T(static_cast<A1&&>(a1),static_cast<A2&&>(a2),
+ static_cast<A3&&>(a3),static_cast<A4&&>(a4));
+ }
+#else
+ template<typename T,typename A1>
+ inline T* heap_new_impl(A1 a1)
+ {
+ return new T(a1);
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new_impl(A1 a1,A2 a2)
+ {
+ return new T(a1,a2);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3)
+ {
+ return new T(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4)
+ {
+ return new T(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5)
+ {
+ return new T(a1,a2,a3,a4,a5);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5,typename A6>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6)
+ {
+ return new T(a1,a2,a3,a4,a5,a6);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7)
+ {
+ return new T(a1,a2,a3,a4,a5,a6,a7);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7,typename A8>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8)
+ {
+ return new T(a1,a2,a3,a4,a5,a6,a7,a8);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7,typename A8,typename A9>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8,A9 a9)
+ {
+ return new T(a1,a2,a3,a4,a5,a6,a7,a8,a9);
+ }
+
+ template<typename T,typename A1>
+ inline T* heap_new(A1 const& a1)
+ {
+ return heap_new_impl<T,A1 const&>(a1);
+ }
+ template<typename T,typename A1>
+ inline T* heap_new(A1& a1)
+ {
+ return heap_new_impl<T,A1&>(a1);
+ }
+
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1 const& a1,A2 const& a2)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&>(a1,a2);
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1& a1,A2 const& a2)
+ {
+ return heap_new_impl<T,A1&,A2 const&>(a1,a2);
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1 const& a1,A2& a2)
+ {
+ return heap_new_impl<T,A1 const&,A2&>(a1,a2);
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1& a1,A2& a2)
+ {
+ return heap_new_impl<T,A1&,A2&>(a1,a2);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3 const&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3 const&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3 const&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1& a1,A2& a2,A3 const& a3)
+ {
+ return heap_new_impl<T,A1&,A2&,A3 const&>(a1,a2,a3);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1& a1,A2 const& a2,A3& a3)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1 const& a1,A2& a2,A3& a3)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1& a1,A2& a2,A3& a3)
+ {
+ return heap_new_impl<T,A1&,A2&,A3&>(a1,a2,a3);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3 const&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3 const&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3 const&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2& a2,A3 const& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1&,A2&,A3 const&,A4 const&>(a1,a2,a3,a4);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2 const& a2,A3& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2& a2,A3& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2& a2,A3& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1&,A2&,A3&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3 const&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3 const&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3 const&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2& a2,A3 const& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1&,A2&,A3 const&,A4&>(a1,a2,a3,a4);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2 const& a2,A3& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2& a2,A3& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2& a2,A3& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1&,A2&,A3&,A4&>(a1,a2,a3,a4);
+ }
+
+#endif
+ template<typename T>
+ inline void heap_delete(T* data)
+ {
+ delete data;
+ }
+
+ template<typename T>
+ struct do_heap_delete
+ {
+ void operator()(T* data) const
+ {
+ detail::heap_delete(data);
+ }
+ };
+ }
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/recursive_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/recursive_mutex.hpp
new file mode 100644
index 00000000000..e716a190ffb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/recursive_mutex.hpp
@@ -0,0 +1,64 @@
+#ifndef BOOST_THREAD_RECURSIVE_MUTEX_HPP
+#define BOOST_THREAD_RECURSIVE_MUTEX_HPP
+
+// recursive_mutex.hpp
+//
+// (C) Copyright 2007 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/platform.hpp>
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#include <boost/thread/win32/recursive_mutex.hpp>
+#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
+#include <boost/thread/pthread/recursive_mutex.hpp>
+#else
+#error "Boost threads unavailable on this platform"
+#endif
+
+#include <boost/thread/lockable_traits.hpp>
+
+namespace boost
+{
+ namespace sync
+ {
+
+#ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+ template<>
+ struct is_basic_lockable<recursive_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<>
+ struct is_lockable<recursive_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<>
+ struct is_basic_lockable<recursive_timed_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<>
+ struct is_lockable<recursive_timed_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+#endif
+
+ template<>
+ struct is_recursive_mutex_sur_parolle<recursive_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<>
+ struct is_recursive_mutex_sur_parolle<recursive_timed_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+ }
+}
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/shared_lock_guard.hpp b/src/third_party/boost-1.69.0/boost/thread/shared_lock_guard.hpp
new file mode 100644
index 00000000000..97a6397c1e6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/shared_lock_guard.hpp
@@ -0,0 +1,53 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2012 Vicente J. Botet Escriba
+
+#ifndef BOOST_THREAD_SHARED_LOCK_GUARD_HPP
+#define BOOST_THREAD_SHARED_LOCK_GUARD_HPP
+#include <boost/thread/detail/config.hpp>
+//#include <boost/thread/locks.hpp>
+#include <boost/thread/lock_options.hpp>
+#include <boost/thread/detail/delete.hpp>
+
+namespace boost
+{
+
+ template<typename SharedMutex>
+ class shared_lock_guard
+ {
+ private:
+ SharedMutex& m;
+
+ public:
+ typedef SharedMutex mutex_type;
+ BOOST_THREAD_NO_COPYABLE(shared_lock_guard)
+ explicit shared_lock_guard(SharedMutex& m_):
+ m(m_)
+ {
+ m.lock_shared();
+ }
+ shared_lock_guard(SharedMutex& m_,adopt_lock_t):
+ m(m_)
+ {}
+ ~shared_lock_guard()
+ {
+ m.unlock_shared();
+ }
+ };
+
+#ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+
+ template<typename T>
+ struct is_mutex_type<shared_lock_guard<T> >
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+
+
+#endif
+
+
+}
+
+#endif // header
diff --git a/src/third_party/boost-1.69.0/boost/thread/shared_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/shared_mutex.hpp
new file mode 100644
index 00000000000..20a95d8c518
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/shared_mutex.hpp
@@ -0,0 +1,57 @@
+#ifndef BOOST_THREAD_SHARED_MUTEX_HPP
+#define BOOST_THREAD_SHARED_MUTEX_HPP
+
+// shared_mutex.hpp
+//
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#if defined(BOOST_THREAD_PROVIDES_GENERIC_SHARED_MUTEX_ON_WIN)
+#if defined(BOOST_THREAD_V2_SHARED_MUTEX)
+#include <boost/thread/v2/shared_mutex.hpp>
+#else
+#include <boost/thread/pthread/shared_mutex.hpp>
+#endif
+#else
+#include <boost/thread/win32/shared_mutex.hpp>
+#endif
+#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
+#if defined(BOOST_THREAD_V2_SHARED_MUTEX)
+#include <boost/thread/v2/shared_mutex.hpp>
+#else
+#include <boost/thread/pthread/shared_mutex.hpp>
+#endif
+#else
+#error "Boost threads unavailable on this platform"
+#endif
+
+#include <boost/thread/lockable_traits.hpp>
+
+namespace boost
+{
+ typedef shared_mutex shared_timed_mutex;
+ namespace sync
+ {
+#ifdef BOOST_THREAD_NO_AUTO_DETECT_MUTEX_TYPES
+ template<>
+ struct is_basic_lockable<shared_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+ template<>
+ struct is_lockable<shared_mutex>
+ {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+ };
+#endif
+
+ }
+}
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/thread.hpp b/src/third_party/boost-1.69.0/boost/thread/thread.hpp
new file mode 100644
index 00000000000..3e63b42aaa1
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/thread.hpp
@@ -0,0 +1,16 @@
+#ifndef BOOST_THREAD_THREAD_HPP
+#define BOOST_THREAD_THREAD_HPP
+
+// thread.hpp
+//
+// (C) Copyright 2007-8 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/thread_only.hpp>
+#include <boost/thread/detail/thread_group.hpp>
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/thread_only.hpp b/src/third_party/boost-1.69.0/boost/thread/thread_only.hpp
new file mode 100644
index 00000000000..d408344eefe
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/thread_only.hpp
@@ -0,0 +1,29 @@
+#ifndef BOOST_THREAD_THREAD_ONLY_HPP
+#define BOOST_THREAD_THREAD_ONLY_HPP
+
+// thread.hpp
+//
+// (C) Copyright 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/platform.hpp>
+
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#include <boost/thread/win32/thread_data.hpp>
+#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
+#include <boost/thread/pthread/thread_data.hpp>
+#else
+#error "Boost threads unavailable on this platform"
+#endif
+
+#include <boost/thread/detail/thread.hpp>
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+#include <boost/thread/detail/thread_interruption.hpp>
+#endif
+#include <boost/thread/condition_variable.hpp>
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/thread_time.hpp b/src/third_party/boost-1.69.0/boost/thread/thread_time.hpp
new file mode 100644
index 00000000000..ffdcf850f73
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/thread_time.hpp
@@ -0,0 +1,55 @@
+#ifndef BOOST_THREAD_TIME_HPP
+#define BOOST_THREAD_TIME_HPP
+// (C) Copyright 2007 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/date_time/time_clock.hpp>
+#include <boost/date_time/microsec_time_clock.hpp>
+#include <boost/date_time/posix_time/posix_time_types.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ typedef boost::posix_time::ptime system_time;
+
+ inline system_time get_system_time()
+ {
+#if defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
+ return boost::date_time::microsec_clock<system_time>::universal_time();
+#else // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
+ return boost::date_time::second_clock<system_time>::universal_time();
+#endif // defined(BOOST_DATE_TIME_HAS_HIGH_PRECISION_CLOCK)
+ }
+
+ namespace detail
+ {
+ inline system_time get_system_time_sentinel()
+ {
+ return system_time(boost::posix_time::pos_infin);
+ }
+
+ inline unsigned long get_milliseconds_until(system_time const& target_time)
+ {
+ if(target_time.is_pos_infinity())
+ {
+ return ~(unsigned long)0;
+ }
+ system_time const now=get_system_time();
+ if(target_time<=now)
+ {
+ return 0;
+ }
+ return static_cast<unsigned long>((target_time-now).total_milliseconds()+1);
+ }
+
+ }
+
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/tss.hpp b/src/third_party/boost-1.69.0/boost/thread/tss.hpp
new file mode 100644
index 00000000000..d798bef558a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/tss.hpp
@@ -0,0 +1,113 @@
+#ifndef BOOST_THREAD_TSS_HPP
+#define BOOST_THREAD_TSS_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007-8 Anthony Williams
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/shared_ptr.hpp>
+#include <boost/thread/detail/thread_heap_alloc.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ struct tss_cleanup_function
+ {
+ virtual ~tss_cleanup_function()
+ {}
+
+ virtual void operator()(void* data)=0;
+ };
+
+ BOOST_THREAD_DECL void set_tss_data(void const* key,boost::shared_ptr<tss_cleanup_function> func,void* tss_data,bool cleanup_existing);
+ BOOST_THREAD_DECL void* get_tss_data(void const* key);
+ }
+
+ template <typename T>
+ class thread_specific_ptr
+ {
+ private:
+ thread_specific_ptr(thread_specific_ptr&);
+ thread_specific_ptr& operator=(thread_specific_ptr&);
+
+ struct delete_data:
+ detail::tss_cleanup_function
+ {
+ void operator()(void* data)
+ {
+ delete static_cast<T*>(data);
+ }
+ };
+
+ struct run_custom_cleanup_function:
+ detail::tss_cleanup_function
+ {
+ void (*cleanup_function)(T*);
+
+ explicit run_custom_cleanup_function(void (*cleanup_function_)(T*)):
+ cleanup_function(cleanup_function_)
+ {}
+
+ void operator()(void* data)
+ {
+ cleanup_function(static_cast<T*>(data));
+ }
+ };
+
+
+ boost::shared_ptr<detail::tss_cleanup_function> cleanup;
+
+ public:
+ typedef T element_type;
+
+ thread_specific_ptr():
+ cleanup(detail::heap_new<delete_data>(),detail::do_heap_delete<delete_data>())
+ {}
+ explicit thread_specific_ptr(void (*func_)(T*))
+ {
+ if(func_)
+ {
+ cleanup.reset(detail::heap_new<run_custom_cleanup_function>(func_),detail::do_heap_delete<run_custom_cleanup_function>());
+ }
+ }
+ ~thread_specific_ptr()
+ {
+ detail::set_tss_data(this,boost::shared_ptr<detail::tss_cleanup_function>(),0,true);
+ }
+
+ T* get() const
+ {
+ return static_cast<T*>(detail::get_tss_data(this));
+ }
+ T* operator->() const
+ {
+ return get();
+ }
+ typename boost::detail::sp_dereference< T >::type operator*() const
+ {
+ return *get();
+ }
+ T* release()
+ {
+ T* const temp=get();
+ detail::set_tss_data(this,boost::shared_ptr<detail::tss_cleanup_function>(),0,false);
+ return temp;
+ }
+ void reset(T* new_value=0)
+ {
+ T* const current_value=get();
+ if(current_value!=new_value)
+ {
+ detail::set_tss_data(this,cleanup,new_value,true);
+ }
+ }
+ };
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/v2/shared_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/v2/shared_mutex.hpp
new file mode 100644
index 00000000000..e30a59e4132
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/v2/shared_mutex.hpp
@@ -0,0 +1,1052 @@
+#ifndef BOOST_THREAD_V2_SHARED_MUTEX_HPP
+#define BOOST_THREAD_V2_SHARED_MUTEX_HPP
+
+// shared_mutex.hpp
+//
+// Copyright Howard Hinnant 2007-2010.
+// Copyright Vicente J. Botet Escriba 2012.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+/*
+<shared_mutex> synopsis
+
+namespace boost
+{
+namespace thread_v2
+{
+
+class shared_mutex
+{
+public:
+
+ shared_mutex();
+ ~shared_mutex();
+
+ shared_mutex(const shared_mutex&) = delete;
+ shared_mutex& operator=(const shared_mutex&) = delete;
+
+ // Exclusive ownership
+
+ void lock();
+ bool try_lock();
+ template <class Rep, class Period>
+ bool try_lock_for(const boost::chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool
+ try_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+ void unlock();
+
+ // Shared ownership
+
+ void lock_shared();
+ bool try_lock_shared();
+ template <class Rep, class Period>
+ bool
+ try_lock_shared_for(const boost::chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool
+ try_lock_shared_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+ void unlock_shared();
+};
+
+class upgrade_mutex
+{
+public:
+
+ upgrade_mutex();
+ ~upgrade_mutex();
+
+ upgrade_mutex(const upgrade_mutex&) = delete;
+ upgrade_mutex& operator=(const upgrade_mutex&) = delete;
+
+ // Exclusive ownership
+
+ void lock();
+ bool try_lock();
+ template <class Rep, class Period>
+ bool try_lock_for(const boost::chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool
+ try_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+ void unlock();
+
+ // Shared ownership
+
+ void lock_shared();
+ bool try_lock_shared();
+ template <class Rep, class Period>
+ bool
+ try_lock_shared_for(const boost::chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool
+ try_lock_shared_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+ void unlock_shared();
+
+ // Upgrade ownership
+
+ void lock_upgrade();
+ bool try_lock_upgrade();
+ template <class Rep, class Period>
+ bool
+ try_lock_upgrade_for(
+ const boost::chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool
+ try_lock_upgrade_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+ void unlock_upgrade();
+
+ // Shared <-> Exclusive
+
+ bool try_unlock_shared_and_lock();
+ template <class Rep, class Period>
+ bool
+ try_unlock_shared_and_lock_for(
+ const boost::chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool
+ try_unlock_shared_and_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+ void unlock_and_lock_shared();
+
+ // Shared <-> Upgrade
+
+ bool try_unlock_shared_and_lock_upgrade();
+ template <class Rep, class Period>
+ bool
+ try_unlock_shared_and_lock_upgrade_for(
+ const boost::chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool
+ try_unlock_shared_and_lock_upgrade_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+ void unlock_upgrade_and_lock_shared();
+
+ // Upgrade <-> Exclusive
+
+ void unlock_upgrade_and_lock();
+ bool try_unlock_upgrade_and_lock();
+ template <class Rep, class Period>
+ bool
+ try_unlock_upgrade_and_lock_for(
+ const boost::chrono::duration<Rep, Period>& rel_time);
+ template <class Clock, class Duration>
+ bool
+ try_unlock_upgrade_and_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+ void unlock_and_lock_upgrade();
+};
+
+} // thread_v2
+} // boost
+
+ */
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/condition_variable.hpp>
+#include <boost/thread/mutex.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono.hpp>
+#endif
+#include <climits>
+#include <boost/system/system_error.hpp>
+#include <boost/bind.hpp>
+
+namespace boost {
+ namespace thread_v2 {
+
+ class shared_mutex
+ {
+ typedef boost::mutex mutex_t;
+ typedef boost::condition_variable cond_t;
+ typedef unsigned count_t;
+
+ mutex_t mut_;
+ cond_t gate1_;
+ // the gate2_ condition variable is only used by functions that
+ // have taken write_entered_ but are waiting for no_readers()
+ cond_t gate2_;
+ count_t state_;
+
+ static const count_t write_entered_ = 1U << (sizeof(count_t)*CHAR_BIT - 1);
+ static const count_t n_readers_ = ~write_entered_;
+
+ bool no_writer() const
+ {
+ return (state_ & write_entered_) == 0;
+ }
+
+ bool one_writer() const
+ {
+ return (state_ & write_entered_) != 0;
+ }
+
+ bool no_writer_no_readers() const
+ {
+ //return (state_ & write_entered_) == 0 &&
+ // (state_ & n_readers_) == 0;
+ return state_ == 0;
+ }
+
+ bool no_writer_no_max_readers() const
+ {
+ return (state_ & write_entered_) == 0 &&
+ (state_ & n_readers_) != n_readers_;
+ }
+
+ bool no_readers() const
+ {
+ return (state_ & n_readers_) == 0;
+ }
+
+ bool one_or_more_readers() const
+ {
+ return (state_ & n_readers_) > 0;
+ }
+
+ shared_mutex(shared_mutex const&);
+ shared_mutex& operator=(shared_mutex const&);
+
+ public:
+ shared_mutex();
+ ~shared_mutex();
+
+ // Exclusive ownership
+
+ void lock();
+ bool try_lock();
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const boost::chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+#endif
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool timed_lock(T const & abs_or_rel_time);
+#endif
+ void unlock();
+
+ // Shared ownership
+
+ void lock_shared();
+ bool try_lock_shared();
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_shared_for(const boost::chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_shared_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_shared_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+#endif
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool timed_lock_shared(T const & abs_or_rel_time);
+#endif
+ void unlock_shared();
+ };
+
+ inline shared_mutex::shared_mutex()
+ : state_(0)
+ {
+ }
+
+ inline shared_mutex::~shared_mutex()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ }
+
+ // Exclusive ownership
+
+ inline void shared_mutex::lock()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ gate1_.wait(lk, boost::bind(&shared_mutex::no_writer, boost::ref(*this)));
+ state_ |= write_entered_;
+ gate2_.wait(lk, boost::bind(&shared_mutex::no_readers, boost::ref(*this)));
+ }
+
+ inline bool shared_mutex::try_lock()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!no_writer_no_readers())
+ {
+ return false;
+ }
+ state_ = write_entered_;
+ return true;
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ bool shared_mutex::try_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.wait_until(lk, abs_time, boost::bind(
+ &shared_mutex::no_writer, boost::ref(*this))))
+ {
+ return false;
+ }
+ state_ |= write_entered_;
+ if (!gate2_.wait_until(lk, abs_time, boost::bind(
+ &shared_mutex::no_readers, boost::ref(*this))))
+ {
+ state_ &= ~write_entered_;
+ return false;
+ }
+ return true;
+ }
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool shared_mutex::timed_lock(T const & abs_or_rel_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
+ &shared_mutex::no_writer, boost::ref(*this))))
+ {
+ return false;
+ }
+ state_ |= write_entered_;
+ if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind(
+ &shared_mutex::no_readers, boost::ref(*this))))
+ {
+ state_ &= ~write_entered_;
+ return false;
+ }
+ return true;
+ }
+#endif
+
+ inline void shared_mutex::unlock()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ BOOST_ASSERT(one_writer());
+ BOOST_ASSERT(no_readers());
+ state_ = 0;
+ // notify all since multiple *lock_shared*() calls may be able
+ // to proceed in response to this notification
+ gate1_.notify_all();
+ }
+
+ // Shared ownership
+
+ inline void shared_mutex::lock_shared()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ gate1_.wait(lk, boost::bind(&shared_mutex::no_writer_no_max_readers, boost::ref(*this)));
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ }
+
+ inline bool shared_mutex::try_lock_shared()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!no_writer_no_max_readers())
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ return true;
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ bool shared_mutex::try_lock_shared_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.wait_until(lk, abs_time, boost::bind(
+ &shared_mutex::no_writer_no_max_readers, boost::ref(*this))))
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ return true;
+ }
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool shared_mutex::timed_lock_shared(T const & abs_or_rel_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
+ &shared_mutex::no_writer_no_max_readers, boost::ref(*this))))
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ return true;
+ }
+#endif
+
+ inline void shared_mutex::unlock_shared()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ BOOST_ASSERT(one_or_more_readers());
+ count_t num_readers = (state_ & n_readers_) - 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ if (no_writer())
+ {
+ if (num_readers == n_readers_ - 1)
+ gate1_.notify_one();
+ }
+ else
+ {
+ if (num_readers == 0)
+ gate2_.notify_one();
+ }
+ }
+
+ } // thread_v2
+} // boost
+
+namespace boost {
+ namespace thread_v2 {
+
+ class upgrade_mutex
+ {
+ typedef boost::mutex mutex_t;
+ typedef boost::condition_variable cond_t;
+ typedef unsigned count_t;
+
+ mutex_t mut_;
+ cond_t gate1_;
+ // the gate2_ condition variable is only used by functions that
+ // have taken write_entered_ but are waiting for no_readers()
+ cond_t gate2_;
+ count_t state_;
+
+ static const unsigned write_entered_ = 1U << (sizeof(count_t)*CHAR_BIT - 1);
+ static const unsigned upgradable_entered_ = write_entered_ >> 1;
+ static const unsigned n_readers_ = ~(write_entered_ | upgradable_entered_);
+
+ bool no_writer() const
+ {
+ return (state_ & write_entered_) == 0;
+ }
+
+ bool one_writer() const
+ {
+ return (state_ & write_entered_) != 0;
+ }
+
+ bool no_writer_no_max_readers() const
+ {
+ return (state_ & write_entered_) == 0 &&
+ (state_ & n_readers_) != n_readers_;
+ }
+
+ bool no_writer_no_upgrader() const
+ {
+ return (state_ & (write_entered_ | upgradable_entered_)) == 0;
+ }
+
+ bool no_writer_no_upgrader_no_readers() const
+ {
+ //return (state_ & (write_entered_ | upgradable_entered_)) == 0 &&
+ // (state_ & n_readers_) == 0;
+ return state_ == 0;
+ }
+
+ bool no_writer_no_upgrader_one_reader() const
+ {
+ //return (state_ & (write_entered_ | upgradable_entered_)) == 0 &&
+ // (state_ & n_readers_) == 1;
+ return state_ == 1;
+ }
+
+ bool no_writer_no_upgrader_no_max_readers() const
+ {
+ return (state_ & (write_entered_ | upgradable_entered_)) == 0 &&
+ (state_ & n_readers_) != n_readers_;
+ }
+
+ bool no_upgrader() const
+ {
+ return (state_ & upgradable_entered_) == 0;
+ }
+
+ bool one_upgrader() const
+ {
+ return (state_ & upgradable_entered_) != 0;
+ }
+
+ bool no_readers() const
+ {
+ return (state_ & n_readers_) == 0;
+ }
+
+ bool one_reader() const
+ {
+ return (state_ & n_readers_) == 1;
+ }
+
+ bool one_or_more_readers() const
+ {
+ return (state_ & n_readers_) > 0;
+ }
+
+ upgrade_mutex(const upgrade_mutex&);
+ upgrade_mutex& operator=(const upgrade_mutex&);
+
+ public:
+ upgrade_mutex();
+ ~upgrade_mutex();
+
+ // Exclusive ownership
+
+ void lock();
+ bool try_lock();
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const boost::chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+#endif
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool timed_lock(T const & abs_or_rel_time);
+#endif
+ void unlock();
+
+ // Shared ownership
+
+ void lock_shared();
+ bool try_lock_shared();
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_shared_for(const boost::chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_shared_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_shared_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+#endif
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool timed_lock_shared(T const & abs_or_rel_time);
+#endif
+ void unlock_shared();
+
+ // Upgrade ownership
+
+ void lock_upgrade();
+ bool try_lock_upgrade();
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_upgrade_for(
+ const boost::chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_lock_upgrade_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_upgrade_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+#endif
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool timed_lock_upgrade(T const & abs_or_rel_time);
+#endif
+ void unlock_upgrade();
+
+ // Shared <-> Exclusive
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ //bool unlock_shared_and_lock(); // can cause a deadlock if used
+ bool try_unlock_shared_and_lock();
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_unlock_shared_and_lock_for(
+ const boost::chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_unlock_shared_and_lock_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_unlock_shared_and_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+#endif
+#endif
+ void unlock_and_lock_shared();
+
+ // Shared <-> Upgrade
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ //bool unlock_shared_and_lock_upgrade(); // can cause a deadlock if used
+ bool try_unlock_shared_and_lock_upgrade();
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_unlock_shared_and_lock_upgrade_for(
+ const boost::chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_unlock_shared_and_lock_upgrade_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_unlock_shared_and_lock_upgrade_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+#endif
+#endif
+ void unlock_upgrade_and_lock_shared();
+
+ // Upgrade <-> Exclusive
+
+ void unlock_upgrade_and_lock();
+ bool try_unlock_upgrade_and_lock();
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_unlock_upgrade_and_lock_for(
+ const boost::chrono::duration<Rep, Period>& rel_time)
+ {
+ return try_unlock_upgrade_and_lock_until(chrono::steady_clock::now() + rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_unlock_upgrade_and_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time);
+#endif
+ void unlock_and_lock_upgrade();
+ };
+
+ inline upgrade_mutex::upgrade_mutex()
+ : gate1_(),
+ gate2_(),
+ state_(0)
+ {
+ }
+
+ inline upgrade_mutex::~upgrade_mutex()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ }
+
+ // Exclusive ownership
+
+ inline void upgrade_mutex::lock()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this)));
+ state_ |= write_entered_;
+ gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, boost::ref(*this)));
+ }
+
+ inline bool upgrade_mutex::try_lock()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!no_writer_no_upgrader_no_readers())
+ {
+ return false;
+ }
+ state_ = write_entered_;
+ return true;
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ bool upgrade_mutex::try_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.wait_until(lk, abs_time, boost::bind(
+ &upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))))
+ {
+ return false;
+ }
+ state_ |= write_entered_;
+ if (!gate2_.wait_until(lk, abs_time, boost::bind(
+ &upgrade_mutex::no_readers, boost::ref(*this))))
+ {
+ state_ &= ~write_entered_;
+ return false;
+ }
+ return true;
+ }
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool upgrade_mutex::timed_lock(T const & abs_or_rel_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
+ &upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))))
+ {
+ return false;
+ }
+ state_ |= write_entered_;
+ if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind(
+ &upgrade_mutex::no_readers, boost::ref(*this))))
+ {
+ state_ &= ~write_entered_;
+ return false;
+ }
+ return true;
+ }
+#endif
+
+ inline void upgrade_mutex::unlock()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ BOOST_ASSERT(one_writer());
+ BOOST_ASSERT(no_upgrader());
+ BOOST_ASSERT(no_readers());
+ state_ = 0;
+ // notify all since multiple *lock_shared*() calls and a *lock_upgrade*()
+ // call may be able to proceed in response to this notification
+ gate1_.notify_all();
+ }
+
+ // Shared ownership
+
+ inline void upgrade_mutex::lock_shared()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_max_readers, boost::ref(*this)));
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ }
+
+ inline bool upgrade_mutex::try_lock_shared()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!no_writer_no_max_readers())
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ return true;
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ bool upgrade_mutex::try_lock_shared_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.wait_until(lk, abs_time, boost::bind(
+ &upgrade_mutex::no_writer_no_max_readers, boost::ref(*this))))
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ return true;
+ }
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool upgrade_mutex::timed_lock_shared(T const & abs_or_rel_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
+ &upgrade_mutex::no_writer_no_max_readers, boost::ref(*this))))
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ return true;
+ }
+#endif
+
+ inline void upgrade_mutex::unlock_shared()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ BOOST_ASSERT(one_or_more_readers());
+ count_t num_readers = (state_ & n_readers_) - 1;
+ state_ &= ~n_readers_;
+ state_ |= num_readers;
+ if (no_writer())
+ {
+ if (num_readers == n_readers_ - 1)
+ gate1_.notify_one();
+ }
+ else
+ {
+ if (num_readers == 0)
+ gate2_.notify_one();
+ }
+ }
+
+ // Upgrade ownership
+
+ inline void upgrade_mutex::lock_upgrade()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this)));
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= upgradable_entered_ | num_readers;
+ }
+
+ inline bool upgrade_mutex::try_lock_upgrade()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!no_writer_no_upgrader_no_max_readers())
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= upgradable_entered_ | num_readers;
+ return true;
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ bool upgrade_mutex::try_lock_upgrade_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.wait_until(lk, abs_time, boost::bind(
+ &upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this))))
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= upgradable_entered_ | num_readers;
+ return true;
+ }
+#endif
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename T>
+ bool upgrade_mutex::timed_lock_upgrade(T const & abs_or_rel_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
+ &upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this))))
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) + 1;
+ state_ &= ~n_readers_;
+ state_ |= upgradable_entered_ | num_readers;
+ return true;
+ }
+#endif
+
+ inline void upgrade_mutex::unlock_upgrade()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ BOOST_ASSERT(no_writer());
+ BOOST_ASSERT(one_upgrader());
+ BOOST_ASSERT(one_or_more_readers());
+ count_t num_readers = (state_ & n_readers_) - 1;
+ state_ &= ~(upgradable_entered_ | n_readers_);
+ state_ |= num_readers;
+ // notify all since both a *lock*() and a *lock_shared*() call
+ // may be able to proceed in response to this notification
+ gate1_.notify_all();
+ }
+
+ // Shared <-> Exclusive
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ inline bool upgrade_mutex::try_unlock_shared_and_lock()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ BOOST_ASSERT(one_or_more_readers());
+ if (!no_writer_no_upgrader_one_reader())
+ {
+ return false;
+ }
+ state_ = write_entered_;
+ return true;
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ bool upgrade_mutex::try_unlock_shared_and_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ BOOST_ASSERT(one_or_more_readers());
+ if (!gate1_.wait_until(lk, abs_time, boost::bind(
+ &upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))))
+ {
+ return false;
+ }
+ count_t num_readers = (state_ & n_readers_) - 1;
+ state_ &= ~n_readers_;
+ state_ |= (write_entered_ | num_readers);
+ if (!gate2_.wait_until(lk, abs_time, boost::bind(
+ &upgrade_mutex::no_readers, boost::ref(*this))))
+ {
+ ++num_readers;
+ state_ &= ~(write_entered_ | n_readers_);
+ state_ |= num_readers;
+ return false;
+ }
+ return true;
+ }
+#endif
+#endif
+
+ inline void upgrade_mutex::unlock_and_lock_shared()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ BOOST_ASSERT(one_writer());
+ BOOST_ASSERT(no_upgrader());
+ BOOST_ASSERT(no_readers());
+ state_ = 1;
+ // notify all since multiple *lock_shared*() calls and a *lock_upgrade*()
+ // call may be able to proceed in response to this notification
+ gate1_.notify_all();
+ }
+
+ // Shared <-> Upgrade
+
+#ifdef BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSIONS
+ inline bool upgrade_mutex::try_unlock_shared_and_lock_upgrade()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ BOOST_ASSERT(one_or_more_readers());
+ if (!no_writer_no_upgrader())
+ {
+ return false;
+ }
+ state_ |= upgradable_entered_;
+ return true;
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ bool upgrade_mutex::try_unlock_shared_and_lock_upgrade_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ BOOST_ASSERT(one_or_more_readers());
+ if (!gate1_.wait_until(lk, abs_time, boost::bind(
+ &upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))))
+ {
+ return false;
+ }
+ state_ |= upgradable_entered_;
+ return true;
+ }
+#endif
+#endif
+
+ inline void upgrade_mutex::unlock_upgrade_and_lock_shared()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ BOOST_ASSERT(no_writer());
+ BOOST_ASSERT(one_upgrader());
+ BOOST_ASSERT(one_or_more_readers());
+ state_ &= ~upgradable_entered_;
+ // notify all since only one *lock*() or *lock_upgrade*() call can win and
+ // proceed in response to this notification, but a *lock_shared*() call may
+ // also be waiting and could steal the notification
+ gate1_.notify_all();
+ }
+
+ // Upgrade <-> Exclusive
+
+ inline void upgrade_mutex::unlock_upgrade_and_lock()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ BOOST_ASSERT(no_writer());
+ BOOST_ASSERT(one_upgrader());
+ BOOST_ASSERT(one_or_more_readers());
+ count_t num_readers = (state_ & n_readers_) - 1;
+ state_ &= ~(upgradable_entered_ | n_readers_);
+ state_ |= write_entered_ | num_readers;
+ gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, boost::ref(*this)));
+ }
+
+ inline bool upgrade_mutex::try_unlock_upgrade_and_lock()
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ BOOST_ASSERT(no_writer());
+ BOOST_ASSERT(one_upgrader());
+ BOOST_ASSERT(one_or_more_readers());
+ if (!one_reader())
+ {
+ return false;
+ }
+ state_ = write_entered_;
+ return true;
+ }
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Clock, class Duration>
+ bool upgrade_mutex::try_unlock_upgrade_and_lock_until(
+ const boost::chrono::time_point<Clock, Duration>& abs_time)
+ {
+ boost::unique_lock<mutex_t> lk(mut_);
+ BOOST_ASSERT(no_writer());
+ BOOST_ASSERT(one_upgrader());
+ BOOST_ASSERT(one_or_more_readers());
+ count_t num_readers = (state_ & n_readers_) - 1;
+ state_ &= ~(upgradable_entered_ | n_readers_);
+ state_ |= (write_entered_ | num_readers);
+ if (!gate2_.wait_until(lk, abs_time, boost::bind(
+ &upgrade_mutex::no_readers, boost::ref(*this))))
+ {
+ ++num_readers;
+ state_ &= ~(write_entered_ | n_readers_);
+ state_ |= (upgradable_entered_ | num_readers);
+ return false;
+ }
+ return true;
+ }
+#endif
+
+ inline void upgrade_mutex::unlock_and_lock_upgrade()
+ {
+ boost::lock_guard<mutex_t> _(mut_);
+ BOOST_ASSERT(one_writer());
+ BOOST_ASSERT(no_upgrader());
+ BOOST_ASSERT(no_readers());
+ state_ = upgradable_entered_ | 1;
+ // notify all since multiple *lock_shared*() calls may be able
+ // to proceed in response to this notification
+ gate1_.notify_all();
+ }
+
+ } // thread_v2
+} // boost
+
+namespace boost {
+ //using thread_v2::shared_mutex;
+ using thread_v2::upgrade_mutex;
+ typedef thread_v2::upgrade_mutex shared_mutex;
+}
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/basic_recursive_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/basic_recursive_mutex.hpp
new file mode 100644
index 00000000000..1fa05adabfb
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/basic_recursive_mutex.hpp
@@ -0,0 +1,176 @@
+#ifndef BOOST_BASIC_RECURSIVE_MUTEX_WIN32_HPP
+#define BOOST_BASIC_RECURSIVE_MUTEX_WIN32_HPP
+
+// basic_recursive_mutex.hpp
+//
+// (C) Copyright 2006-8 Anthony Williams
+// (C) Copyright 2011-2012,2017-2018 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/win32/thread_primitives.hpp>
+#include <boost/thread/win32/basic_timed_mutex.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ template<typename underlying_mutex_type>
+ struct basic_recursive_mutex_impl
+ {
+ long recursion_count;
+ long locking_thread_id;
+ underlying_mutex_type mutex;
+
+ void initialize()
+ {
+ recursion_count=0;
+ locking_thread_id=0;
+ mutex.initialize();
+ }
+
+ void destroy()
+ {
+ mutex.destroy();
+ }
+
+ bool try_lock() BOOST_NOEXCEPT
+ {
+ long const current_thread_id=boost::winapi::GetCurrentThreadId();
+ return try_recursive_lock(current_thread_id) || try_basic_lock(current_thread_id);
+ }
+
+ void lock()
+ {
+ long const current_thread_id=boost::winapi::GetCurrentThreadId();
+ if(!try_recursive_lock(current_thread_id))
+ {
+ mutex.lock();
+ BOOST_INTERLOCKED_EXCHANGE(&locking_thread_id,current_thread_id);
+ recursion_count=1;
+ }
+ }
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock(::boost::system_time const& target)
+ {
+ long const current_thread_id=boost::winapi::GetCurrentThreadId();
+ return try_recursive_lock(current_thread_id) || try_timed_lock(current_thread_id,target);
+ }
+ template<typename Duration>
+ bool timed_lock(Duration const& target)
+ {
+ long const current_thread_id=boost::winapi::GetCurrentThreadId();
+ return try_recursive_lock(current_thread_id) || try_timed_lock(current_thread_id,target);
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ long const current_thread_id=boost::winapi::GetCurrentThreadId();
+ return try_recursive_lock(current_thread_id) || try_timed_lock_for(current_thread_id,rel_time);
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ long const current_thread_id=boost::winapi::GetCurrentThreadId();
+ return try_recursive_lock(current_thread_id) || try_timed_lock_until(current_thread_id,t);
+ }
+#endif
+ void unlock()
+ {
+ if(!--recursion_count)
+ {
+ BOOST_INTERLOCKED_EXCHANGE(&locking_thread_id,0);
+ mutex.unlock();
+ }
+ }
+
+ private:
+ bool try_recursive_lock(long current_thread_id) BOOST_NOEXCEPT
+ {
+ if(::boost::detail::interlocked_read_acquire(&locking_thread_id)==current_thread_id)
+ {
+ ++recursion_count;
+ return true;
+ }
+ return false;
+ }
+
+ bool try_basic_lock(long current_thread_id) BOOST_NOEXCEPT
+ {
+ if(mutex.try_lock())
+ {
+ BOOST_INTERLOCKED_EXCHANGE(&locking_thread_id,current_thread_id);
+ recursion_count=1;
+ return true;
+ }
+ return false;
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool try_timed_lock(long current_thread_id,::boost::system_time const& target)
+ {
+ if(mutex.timed_lock(target))
+ {
+ BOOST_INTERLOCKED_EXCHANGE(&locking_thread_id,current_thread_id);
+ recursion_count=1;
+ return true;
+ }
+ return false;
+ }
+ template<typename Duration>
+ bool try_timed_lock(long current_thread_id,Duration const& target)
+ {
+ if(mutex.timed_lock(target))
+ {
+ BOOST_INTERLOCKED_EXCHANGE(&locking_thread_id,current_thread_id);
+ recursion_count=1;
+ return true;
+ }
+ return false;
+ }
+#endif
+ template <typename TP>
+ bool try_timed_lock_until(long current_thread_id,TP const& target)
+ {
+ if(mutex.try_lock_until(target))
+ {
+ BOOST_INTERLOCKED_EXCHANGE(&locking_thread_id,current_thread_id);
+ recursion_count=1;
+ return true;
+ }
+ return false;
+ }
+ template <typename D>
+ bool try_timed_lock_for(long current_thread_id,D const& target)
+ {
+ if(mutex.try_lock_for(target))
+ {
+ BOOST_INTERLOCKED_EXCHANGE(&locking_thread_id,current_thread_id);
+ recursion_count=1;
+ return true;
+ }
+ return false;
+ }
+ };
+
+ typedef basic_recursive_mutex_impl<basic_timed_mutex> basic_recursive_mutex;
+ typedef basic_recursive_mutex_impl<basic_timed_mutex> basic_recursive_timed_mutex;
+ }
+}
+
+#define BOOST_BASIC_RECURSIVE_MUTEX_INITIALIZER {0}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/basic_timed_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/basic_timed_mutex.hpp
new file mode 100644
index 00000000000..b332dab7520
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/basic_timed_mutex.hpp
@@ -0,0 +1,297 @@
+#ifndef BOOST_BASIC_TIMED_MUTEX_WIN32_HPP
+#define BOOST_BASIC_TIMED_MUTEX_WIN32_HPP
+
+// basic_timed_mutex_win32.hpp
+//
+// (C) Copyright 2006-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/assert.hpp>
+#include <boost/thread/win32/thread_primitives.hpp>
+#include <boost/thread/win32/interlocked_read.hpp>
+#include <boost/thread/thread_time.hpp>
+#if defined BOOST_THREAD_USES_DATETIME
+#include <boost/thread/xtime.hpp>
+#endif
+#include <boost/detail/interlocked.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/platform_time.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ struct basic_timed_mutex
+ {
+ BOOST_STATIC_CONSTANT(unsigned char,lock_flag_bit=31);
+ BOOST_STATIC_CONSTANT(unsigned char,event_set_flag_bit=30);
+ BOOST_STATIC_CONSTANT(long,lock_flag_value=1<<lock_flag_bit);
+ BOOST_STATIC_CONSTANT(long,event_set_flag_value=1<<event_set_flag_bit);
+ long active_count;
+ void* event;
+
+ void initialize()
+ {
+ active_count=0;
+ event=0;
+ }
+
+ void destroy()
+ {
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4312)
+#endif
+ void* const old_event=BOOST_INTERLOCKED_EXCHANGE_POINTER(&event,0);
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+ if(old_event)
+ {
+ winapi::CloseHandle(old_event);
+ }
+ }
+
+ // Take the lock flag if it's available
+ bool try_lock() BOOST_NOEXCEPT
+ {
+ return !win32::interlocked_bit_test_and_set(&active_count,lock_flag_bit);
+ }
+
+ void lock()
+ {
+ if(try_lock())
+ {
+ return;
+ }
+ long old_count=active_count;
+ mark_waiting_and_try_lock(old_count);
+
+ if(old_count&lock_flag_value)
+ {
+ void* const sem=get_event();
+
+ do
+ {
+ if(winapi::WaitForSingleObjectEx(sem,::boost::detail::win32::infinite,0)==0)
+ {
+ clear_waiting_and_try_lock(old_count);
+ }
+ }
+ while(old_count&lock_flag_value);
+ }
+ }
+
+ // Loop until the number of waiters has been incremented or we've taken the lock flag
+ // The loop is necessary since this function may be called by multiple threads simultaneously
+ void mark_waiting_and_try_lock(long& old_count)
+ {
+ for(;;)
+ {
+ bool const was_locked=(old_count&lock_flag_value) ? true : false;
+ long const new_count=was_locked?(old_count+1):(old_count|lock_flag_value);
+ long const current=BOOST_INTERLOCKED_COMPARE_EXCHANGE(&active_count,new_count,old_count);
+ if(current==old_count)
+ {
+ if(was_locked)
+ old_count=new_count;
+ // else we've taken the lock flag
+ // don't update old_count so that the calling function can see that
+ // the old lock flag was 0 and know that we've taken the lock flag
+ break;
+ }
+ old_count=current;
+ }
+ }
+
+ // Loop until someone else has taken the lock flag and cleared the event set flag or
+ // until we've taken the lock flag and cleared the event set flag and decremented the
+ // number of waiters
+ // The loop is necessary since this function may be called by multiple threads simultaneously
+ void clear_waiting_and_try_lock(long& old_count)
+ {
+ old_count&=~lock_flag_value;
+ old_count|=event_set_flag_value;
+ for(;;)
+ {
+ long const new_count=((old_count&lock_flag_value)?old_count:((old_count-1)|lock_flag_value))&~event_set_flag_value;
+ long const current=BOOST_INTERLOCKED_COMPARE_EXCHANGE(&active_count,new_count,old_count);
+ if(current==old_count)
+ {
+ // if someone else has taken the lock flag
+ // no need to update old_count since old_count == new_count (ignoring
+ // event_set_flag_value which the calling function doesn't care about)
+ // else we've taken the lock flag
+ // don't update old_count so that the calling function can see that
+ // the old lock flag was 0 and know that we've taken the lock flag
+ break;
+ }
+ old_count=current;
+ }
+ }
+
+ private:
+ unsigned long getMs(detail::platform_duration const& d)
+ {
+ return static_cast<unsigned long>(d.getMs());
+ }
+
+ template <typename Duration>
+ unsigned long getMs(Duration const& d)
+ {
+ return static_cast<unsigned long>(chrono::ceil<chrono::milliseconds>(d).count());
+ }
+
+ template <typename Clock, typename Timepoint, typename Duration>
+ bool do_lock_until(Timepoint const& t, Duration const& max)
+ {
+ if(try_lock())
+ {
+ return true;
+ }
+
+ long old_count=active_count;
+ mark_waiting_and_try_lock(old_count);
+
+ if(old_count&lock_flag_value)
+ {
+ void* const sem=get_event();
+
+ // If the clock is the system clock, it may jump while this function
+ // is waiting. To compensate for this and time out near the correct
+ // time, we call WaitForSingleObjectEx() in a loop with a short
+ // timeout and recheck the time remaining each time through the loop.
+ do
+ {
+ Duration d(t - Clock::now());
+ if(d <= Duration::zero()) // timeout occurred
+ {
+ BOOST_INTERLOCKED_DECREMENT(&active_count);
+ return false;
+ }
+ if(max != Duration::zero())
+ {
+ d = (std::min)(d, max);
+ }
+ if(winapi::WaitForSingleObjectEx(sem,getMs(d),0)==0)
+ {
+ clear_waiting_and_try_lock(old_count);
+ }
+ }
+ while(old_count&lock_flag_value);
+ }
+ return true;
+ }
+ public:
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock(::boost::system_time const& wait_until)
+ {
+ const detail::real_platform_timepoint t(wait_until);
+ return do_lock_until<detail::real_platform_clock>(t, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+
+ template<typename Duration>
+ bool timed_lock(Duration const& timeout)
+ {
+ const detail::mono_platform_timepoint t(detail::mono_platform_clock::now() + detail::platform_duration(timeout));
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_until<detail::mono_platform_clock>(t, detail::platform_duration::zero());
+ }
+
+ bool timed_lock(boost::xtime const& timeout)
+ {
+ return timed_lock(boost::system_time(timeout));
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ const chrono::steady_clock::time_point t(chrono::steady_clock::now() + rel_time);
+ typedef typename chrono::duration<Rep, Period> Duration;
+ typedef typename common_type<Duration, typename chrono::steady_clock::duration>::type common_duration;
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_until<chrono::steady_clock>(t, common_duration::zero());
+ }
+ template <class Duration>
+ bool try_lock_until(const chrono::time_point<chrono::steady_clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename chrono::steady_clock::duration>::type common_duration;
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_until<chrono::steady_clock>(t, common_duration::zero());
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ return do_lock_until<Clock>(t, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ }
+#endif
+
+ void unlock()
+ {
+ // Clear the lock flag using atomic addition (works since long is always 32 bits on Windows)
+ long const old_count=BOOST_INTERLOCKED_EXCHANGE_ADD(&active_count,lock_flag_value);
+ // If someone is waiting to take the lock, set the event set flag and, if
+ // the event set flag hadn't already been set, send an event.
+ if(!(old_count&event_set_flag_value) && (old_count>lock_flag_value))
+ {
+ if(!win32::interlocked_bit_test_and_set(&active_count,event_set_flag_bit))
+ {
+ winapi::SetEvent(get_event());
+ }
+ }
+ }
+
+ private:
+ // Create an event in a thread-safe way
+ // The first thread to create the event wins and all other thread will use that event
+ void* get_event()
+ {
+ void* current_event=::boost::detail::interlocked_read_acquire(&event);
+
+ if(!current_event)
+ {
+ void* const new_event=win32::create_anonymous_event(win32::auto_reset_event,win32::event_initially_reset);
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4311)
+#pragma warning(disable:4312)
+#endif
+ void* const old_event=BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(&event,new_event,0);
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+ if(old_event!=0)
+ {
+ winapi::CloseHandle(new_event);
+ return old_event;
+ }
+ else
+ {
+ return new_event;
+ }
+ }
+ return current_event;
+ }
+
+ };
+
+ }
+}
+
+#define BOOST_BASIC_TIMED_MUTEX_INITIALIZER {0}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/condition_variable.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/condition_variable.hpp
new file mode 100644
index 00000000000..5cf975a5348
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/condition_variable.hpp
@@ -0,0 +1,725 @@
+#ifndef BOOST_THREAD_CONDITION_VARIABLE_WIN32_HPP
+#define BOOST_THREAD_CONDITION_VARIABLE_WIN32_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#include <boost/thread/win32/thread_primitives.hpp>
+#include <boost/thread/win32/thread_data.hpp>
+#include <boost/thread/win32/thread_data.hpp>
+#include <boost/thread/win32/interlocked_read.hpp>
+#include <boost/thread/cv_status.hpp>
+#if defined BOOST_THREAD_USES_DATETIME
+#include <boost/thread/xtime.hpp>
+#endif
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/thread_time.hpp>
+#include <boost/thread/lock_guard.hpp>
+#include <boost/thread/lock_types.hpp>
+#include <boost/thread/detail/platform_time.hpp>
+
+#include <boost/assert.hpp>
+#include <boost/intrusive_ptr.hpp>
+
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+
+#include <limits.h>
+#include <algorithm>
+#include <vector>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ class basic_cv_list_entry;
+ void intrusive_ptr_add_ref(basic_cv_list_entry * p);
+ void intrusive_ptr_release(basic_cv_list_entry * p);
+
+ class basic_cv_list_entry
+ {
+ private:
+ detail::win32::handle_manager semaphore;
+ detail::win32::handle_manager wake_sem;
+ long waiters;
+ bool notified;
+ long references;
+
+ public:
+ BOOST_THREAD_NO_COPYABLE(basic_cv_list_entry)
+ explicit basic_cv_list_entry(detail::win32::handle_manager const& wake_sem_):
+ semaphore(detail::win32::create_anonymous_semaphore(0,LONG_MAX)),
+ wake_sem(wake_sem_.duplicate()),
+ waiters(1),notified(false),references(0)
+ {}
+
+ static bool no_waiters(boost::intrusive_ptr<basic_cv_list_entry> const& entry)
+ {
+ return !detail::interlocked_read_acquire(&entry->waiters);
+ }
+
+ void add_waiter()
+ {
+ BOOST_INTERLOCKED_INCREMENT(&waiters);
+ }
+
+ void remove_waiter()
+ {
+ BOOST_INTERLOCKED_DECREMENT(&waiters);
+ }
+
+ void release(unsigned count_to_release)
+ {
+ notified=true;
+ winapi::ReleaseSemaphore(semaphore,count_to_release,0);
+ }
+
+ void release_waiters()
+ {
+ release(detail::interlocked_read_acquire(&waiters));
+ }
+
+ bool is_notified() const
+ {
+ return notified;
+ }
+
+ bool interruptible_wait(detail::internal_platform_timepoint const &timeout)
+ {
+ return this_thread::interruptible_wait(semaphore, timeout);
+ }
+
+ bool woken()
+ {
+ unsigned long const woken_result=winapi::WaitForSingleObjectEx(wake_sem,0,0);
+ BOOST_ASSERT((woken_result==detail::win32::timeout) || (woken_result==0));
+ return woken_result==0;
+ }
+
+ friend void intrusive_ptr_add_ref(basic_cv_list_entry * p);
+ friend void intrusive_ptr_release(basic_cv_list_entry * p);
+ };
+
+ inline void intrusive_ptr_add_ref(basic_cv_list_entry * p)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&p->references);
+ }
+
+ inline void intrusive_ptr_release(basic_cv_list_entry * p)
+ {
+ if(!BOOST_INTERLOCKED_DECREMENT(&p->references))
+ {
+ delete p;
+ }
+ }
+
+ class basic_condition_variable
+ {
+ boost::mutex internal_mutex;
+ long total_count;
+ unsigned active_generation_count;
+
+ typedef basic_cv_list_entry list_entry;
+
+ typedef boost::intrusive_ptr<list_entry> entry_ptr;
+ typedef std::vector<entry_ptr> generation_list;
+
+ generation_list generations;
+ detail::win32::handle_manager wake_sem;
+
+ void wake_waiters(long count_to_wake)
+ {
+ detail::interlocked_write_release(&total_count,total_count-count_to_wake);
+ winapi::ReleaseSemaphore(wake_sem,count_to_wake,0);
+ }
+
+ template<typename lock_type>
+ struct relocker
+ {
+ BOOST_THREAD_NO_COPYABLE(relocker)
+ lock_type& _lock;
+ bool _unlocked;
+
+ relocker(lock_type& lock_):
+ _lock(lock_), _unlocked(false)
+ {}
+ void unlock()
+ {
+ if ( ! _unlocked )
+ {
+ _lock.unlock();
+ _unlocked=true;
+ }
+ }
+ void lock()
+ {
+ if ( _unlocked )
+ {
+ _lock.lock();
+ _unlocked=false;
+ }
+ }
+ ~relocker() BOOST_NOEXCEPT_IF(false)
+ {
+ lock();
+ }
+ };
+
+
+ entry_ptr get_wait_entry()
+ {
+ boost::lock_guard<boost::mutex> lk(internal_mutex);
+ if(!wake_sem)
+ {
+ wake_sem=detail::win32::create_anonymous_semaphore(0,LONG_MAX);
+ BOOST_ASSERT(wake_sem);
+ }
+
+ detail::interlocked_write_release(&total_count,total_count+1);
+ if(generations.empty() || generations.back()->is_notified())
+ {
+ entry_ptr new_entry(new list_entry(wake_sem));
+ generations.push_back(new_entry);
+ return new_entry;
+ }
+ else
+ {
+ generations.back()->add_waiter();
+ return generations.back();
+ }
+ }
+
+ struct entry_manager
+ {
+ entry_ptr entry;
+ boost::mutex& internal_mutex;
+
+
+ BOOST_THREAD_NO_COPYABLE(entry_manager)
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+ entry_manager(entry_ptr&& entry_, boost::mutex& mutex_):
+ entry(static_cast< entry_ptr&& >(entry_)), internal_mutex(mutex_)
+ {}
+#else
+ entry_manager(entry_ptr const& entry_, boost::mutex& mutex_):
+ entry(entry_), internal_mutex(mutex_)
+ {}
+#endif
+
+ void remove_waiter_and_reset()
+ {
+ if (entry) {
+ boost::lock_guard<boost::mutex> internal_lock(internal_mutex);
+ entry->remove_waiter();
+ entry.reset();
+ }
+ }
+ ~entry_manager() BOOST_NOEXCEPT_IF(false)
+ {
+ remove_waiter_and_reset();
+ }
+
+ list_entry* operator->()
+ {
+ return entry.get();
+ }
+ };
+
+ protected:
+ basic_condition_variable(const basic_condition_variable& other);
+ basic_condition_variable& operator=(const basic_condition_variable& other);
+
+ public:
+ basic_condition_variable():
+ total_count(0),active_generation_count(0),wake_sem(0)
+ {}
+
+ ~basic_condition_variable()
+ {}
+
+ // When this function returns true:
+ // * A notification (or sometimes a spurious OS signal) has been received
+ // * Do not assume that the timeout has not been reached
+ // * Do not assume that the predicate has been changed
+ //
+ // When this function returns false:
+ // * The timeout has been reached
+ // * Do not assume that a notification has not been received
+ // * Do not assume that the predicate has not been changed
+ template<typename lock_type>
+ bool do_wait_until(lock_type& lock, detail::internal_platform_timepoint const &timeout)
+ {
+ relocker<lock_type> locker(lock);
+ entry_manager entry(get_wait_entry(), internal_mutex);
+ locker.unlock();
+
+ bool woken=false;
+ while(!woken)
+ {
+ if(!entry->interruptible_wait(timeout))
+ {
+ return false;
+ }
+
+ woken=entry->woken();
+ }
+ // do it here to avoid throwing on the destructor
+ entry.remove_waiter_and_reset();
+ locker.lock();
+ return true;
+ }
+
+ void notify_one() BOOST_NOEXCEPT
+ {
+ if(detail::interlocked_read_acquire(&total_count))
+ {
+ boost::lock_guard<boost::mutex> internal_lock(internal_mutex);
+ if(!total_count)
+ {
+ return;
+ }
+ wake_waiters(1);
+
+ for(generation_list::iterator it=generations.begin(),
+ end=generations.end();
+ it!=end;++it)
+ {
+ (*it)->release(1);
+ }
+ generations.erase(std::remove_if(generations.begin(),generations.end(),&basic_cv_list_entry::no_waiters),generations.end());
+ }
+ }
+
+ void notify_all() BOOST_NOEXCEPT
+ {
+ if(detail::interlocked_read_acquire(&total_count))
+ {
+ boost::lock_guard<boost::mutex> internal_lock(internal_mutex);
+ if(!total_count)
+ {
+ return;
+ }
+ wake_waiters(total_count);
+ for(generation_list::iterator it=generations.begin(),
+ end=generations.end();
+ it!=end;++it)
+ {
+ (*it)->release_waiters();
+ }
+ generations.clear();
+ wake_sem=detail::win32::handle(0);
+ }
+ }
+
+ };
+ }
+
+ class condition_variable:
+ private detail::basic_condition_variable
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(condition_variable)
+ condition_variable()
+ {}
+
+ using detail::basic_condition_variable::do_wait_until;
+ using detail::basic_condition_variable::notify_one;
+ using detail::basic_condition_variable::notify_all;
+
+ void wait(unique_lock<mutex>& m)
+ {
+ do_wait_until(m, detail::internal_platform_timepoint::getMax());
+ }
+
+ template<typename predicate_type>
+ void wait(unique_lock<mutex>& m,predicate_type pred)
+ {
+ while (!pred())
+ {
+ wait(m);
+ }
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_wait(unique_lock<mutex>& m,boost::system_time const& abs_time)
+ {
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ const detail::real_platform_timepoint ts(abs_time);
+ const detail::platform_duration d(ts - detail::real_platform_clock::now());
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ return ts > detail::real_platform_clock::now();
+ }
+ bool timed_wait(unique_lock<mutex>& m,boost::xtime const& abs_time)
+ {
+ return timed_wait(m, system_time(abs_time));
+ }
+ template<typename duration_type>
+ bool timed_wait(unique_lock<mutex>& m,duration_type const& wait_duration)
+ {
+ if (wait_duration.is_pos_infinity())
+ {
+ wait(m);
+ return true;
+ }
+ if (wait_duration.is_special())
+ {
+ return true;
+ }
+ const detail::platform_duration d(wait_duration);
+ return do_wait_until(m, detail::internal_platform_clock::now() + d);
+ }
+
+ template<typename predicate_type>
+ bool timed_wait(unique_lock<mutex>& m,boost::system_time const& abs_time,predicate_type pred)
+ {
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ const detail::real_platform_timepoint ts(abs_time);
+ while (!pred())
+ {
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ if (d <= detail::platform_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ }
+ return pred();
+ }
+ template<typename predicate_type>
+ bool timed_wait(unique_lock<mutex>& m,boost::xtime const& abs_time,predicate_type pred)
+ {
+ return timed_wait(m, system_time(abs_time), pred);
+ }
+ template<typename duration_type,typename predicate_type>
+ bool timed_wait(unique_lock<mutex>& m,duration_type const& wait_duration,predicate_type pred)
+ {
+ if (wait_duration.is_pos_infinity())
+ {
+ while (!pred())
+ {
+ wait(m);
+ }
+ return true;
+ }
+ if (wait_duration.is_special())
+ {
+ return pred();
+ }
+ const detail::platform_duration d(wait_duration);
+ const detail::internal_platform_timepoint ts(detail::internal_platform_clock::now() + d);
+ while (!pred())
+ {
+ if (!do_wait_until(m, ts)) break; // timeout occurred
+ }
+ return pred();
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Duration>
+ cv_status
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<detail::internal_chrono_clock, Duration>& t)
+ {
+ const detail::internal_platform_timepoint ts(t);
+ if (do_wait_until(lock, ts)) return cv_status::no_timeout;
+ else return cv_status::timeout;
+ }
+
+ template <class Clock, class Duration>
+ cv_status
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<Clock, Duration>& t)
+ {
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ do_wait_until(lock, detail::internal_chrono_clock::now() + d);
+ if (t > Clock::now()) return cv_status::no_timeout;
+ else return cv_status::timeout;
+ }
+
+ template <class Rep, class Period>
+ cv_status
+ wait_for(
+ unique_lock<mutex>& lock,
+ const chrono::duration<Rep, Period>& d)
+ {
+ return wait_until(lock, chrono::steady_clock::now() + d);
+ }
+
+ template <class Duration, class Predicate>
+ bool
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<detail::internal_chrono_clock, Duration>& t,
+ Predicate pred)
+ {
+ const detail::internal_platform_timepoint ts(t);
+ while (!pred())
+ {
+ if (!do_wait_until(lock, ts)) break; // timeout occurred
+ }
+ return pred();
+ }
+
+ template <class Clock, class Duration, class Predicate>
+ bool
+ wait_until(
+ unique_lock<mutex>& lock,
+ const chrono::time_point<Clock, Duration>& t,
+ Predicate pred)
+ {
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ while (!pred())
+ {
+ common_duration d(t - Clock::now());
+ if (d <= common_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ do_wait_until(lock, detail::internal_platform_clock::now() + detail::platform_duration(d));
+ }
+ return pred();
+ }
+
+ template <class Rep, class Period, class Predicate>
+ bool
+ wait_for(
+ unique_lock<mutex>& lock,
+ const chrono::duration<Rep, Period>& d,
+ Predicate pred)
+ {
+ return wait_until(lock, chrono::steady_clock::now() + d, boost::move(pred));
+ }
+#endif
+ };
+
+ class condition_variable_any:
+ private detail::basic_condition_variable
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(condition_variable_any)
+ condition_variable_any()
+ {}
+
+ using detail::basic_condition_variable::do_wait_until;
+ using detail::basic_condition_variable::notify_one;
+ using detail::basic_condition_variable::notify_all;
+
+ template<typename lock_type>
+ void wait(lock_type& m)
+ {
+ do_wait_until(m, detail::internal_platform_timepoint::getMax());
+ }
+
+ template<typename lock_type,typename predicate_type>
+ void wait(lock_type& m,predicate_type pred)
+ {
+ while (!pred())
+ {
+ wait(m);
+ }
+ }
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename lock_type>
+ bool timed_wait(lock_type& m,boost::system_time const& abs_time)
+ {
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ const detail::real_platform_timepoint ts(abs_time);
+ const detail::platform_duration d(ts - detail::real_platform_clock::now());
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ return ts > detail::real_platform_clock::now();
+ }
+
+ template<typename lock_type>
+ bool timed_wait(lock_type& m,boost::xtime const& abs_time)
+ {
+ return timed_wait(m, system_time(abs_time));
+ }
+
+ template<typename lock_type,typename duration_type>
+ bool timed_wait(lock_type& m,duration_type const& wait_duration)
+ {
+ if (wait_duration.is_pos_infinity())
+ {
+ wait(m);
+ return true;
+ }
+ if (wait_duration.is_special())
+ {
+ return true;
+ }
+ const detail::platform_duration d(wait_duration);
+ return do_wait_until(m, detail::internal_platform_clock::now() + d);
+ }
+
+ template<typename lock_type,typename predicate_type>
+ bool timed_wait(lock_type& m,boost::system_time const& abs_time,predicate_type pred)
+ {
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ const detail::real_platform_timepoint ts(abs_time);
+ while (!pred())
+ {
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ if (d <= detail::platform_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ do_wait_until(m, detail::internal_platform_clock::now() + d);
+ }
+ return pred();
+ }
+
+ template<typename lock_type,typename predicate_type>
+ bool timed_wait(lock_type& m,boost::xtime const& abs_time,predicate_type pred)
+ {
+ return timed_wait(m, system_time(abs_time), pred);
+ }
+
+ template<typename lock_type,typename duration_type,typename predicate_type>
+ bool timed_wait(lock_type& m,duration_type const& wait_duration,predicate_type pred)
+ {
+ if (wait_duration.is_pos_infinity())
+ {
+ while (!pred())
+ {
+ wait(m);
+ }
+ return true;
+ }
+ if (wait_duration.is_special())
+ {
+ return pred();
+ }
+ const detail::platform_duration d(wait_duration);
+ const detail::internal_platform_timepoint ts(detail::internal_platform_clock::now() + d);
+ while (!pred())
+ {
+ if (!do_wait_until(m, ts)) break; // timeout occurred
+ }
+ return pred();
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class lock_type,class Duration>
+ cv_status
+ wait_until(
+ lock_type& lock,
+ const chrono::time_point<detail::internal_chrono_clock, Duration>& t)
+ {
+ const detail::internal_platform_timepoint ts(t);
+ if (do_wait_until(lock, ts)) return cv_status::no_timeout;
+ else return cv_status::timeout;
+ }
+
+ template <class lock_type, class Clock, class Duration>
+ cv_status
+ wait_until(
+ lock_type& lock,
+ const chrono::time_point<Clock, Duration>& t)
+ {
+ // The system time may jump while this function is waiting. To compensate for this and time
+ // out near the correct time, we could call do_wait_until() in a loop with a short timeout
+ // and recheck the time remaining each time through the loop. However, because we can't
+ // check the predicate each time do_wait_until() completes, this introduces the possibility
+ // of not exiting the function when a notification occurs, since do_wait_until() may report
+ // that it timed out even though a notification was received. The best this function can do
+ // is report correctly whether or not it reached the timeout time.
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ do_wait_until(lock, detail::internal_chrono_clock::now() + d);
+ if (t > Clock::now()) return cv_status::no_timeout;
+ else return cv_status::timeout;
+ }
+
+ template <class lock_type, class Rep, class Period>
+ cv_status
+ wait_for(
+ lock_type& lock,
+ const chrono::duration<Rep, Period>& d)
+ {
+ return wait_until(lock, chrono::steady_clock::now() + d);
+ }
+
+ template <class lock_type, class Clock, class Duration, class Predicate>
+ bool
+ wait_until(
+ lock_type& lock,
+ const chrono::time_point<detail::internal_chrono_clock, Duration>& t,
+ Predicate pred)
+ {
+ const detail::internal_platform_timepoint ts(t);
+ while (!pred())
+ {
+ if (!do_wait_until(lock, ts)) break; // timeout occurred
+ }
+ return pred();
+ }
+
+ template <class lock_type, class Clock, class Duration, class Predicate>
+ bool
+ wait_until(
+ lock_type& lock,
+ const chrono::time_point<Clock, Duration>& t,
+ Predicate pred)
+ {
+ // The system time may jump while this function is waiting. To compensate for this
+ // and time out near the correct time, we call do_wait_until() in a loop with a
+ // short timeout and recheck the time remaining each time through the loop.
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ while (!pred())
+ {
+ common_duration d(t - Clock::now());
+ if (d <= common_duration::zero()) break; // timeout occurred
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ do_wait_until(lock, detail::internal_platform_clock::now() + detail::platform_duration(d));
+ }
+ return pred();
+ }
+
+ template <class lock_type, class Rep, class Period, class Predicate>
+ bool
+ wait_for(
+ lock_type& lock,
+ const chrono::duration<Rep, Period>& d,
+ Predicate pred)
+ {
+ return wait_until(lock, chrono::steady_clock::now() + d, boost::move(pred));
+ }
+#endif
+ };
+
+ BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk);
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/interlocked_read.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/interlocked_read.hpp
new file mode 100644
index 00000000000..e25c21eb1c3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/interlocked_read.hpp
@@ -0,0 +1,214 @@
+#ifndef BOOST_THREAD_DETAIL_INTERLOCKED_READ_WIN32_HPP
+#define BOOST_THREAD_DETAIL_INTERLOCKED_READ_WIN32_HPP
+
+// interlocked_read_win32.hpp
+//
+// (C) Copyright 2005-8 Anthony Williams
+// (C) Copyright 2012 Vicente J. Botet Escriba
+// (C) Copyright 2017 Andrey Semashev
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/detail/interlocked.hpp>
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+// Define compiler barriers
+#if defined(__INTEL_COMPILER)
+#define BOOST_THREAD_DETAIL_COMPILER_BARRIER() __memory_barrier()
+#elif defined(_MSC_VER) && !defined(_WIN32_WCE)
+extern "C" void _ReadWriteBarrier(void);
+#pragma intrinsic(_ReadWriteBarrier)
+#define BOOST_THREAD_DETAIL_COMPILER_BARRIER() _ReadWriteBarrier()
+#endif
+
+#ifndef BOOST_THREAD_DETAIL_COMPILER_BARRIER
+#define BOOST_THREAD_DETAIL_COMPILER_BARRIER()
+#endif
+
+#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
+
+// Since VS2005 and until VS2012 volatile reads always acquire and volatile writes are always release.
+// But VS2012 adds a compiler switch that can change behavior to the standard. On x86 though
+// the compiler generates a single instruction for the load/store, which is enough synchronization
+// as far as uarch is concerned. To prevent compiler reordering code around the load/store we add
+// compiler barriers.
+
+namespace boost
+{
+ namespace detail
+ {
+ inline long interlocked_read_acquire(long volatile* x) BOOST_NOEXCEPT
+ {
+ long const res=*x;
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ return res;
+ }
+ inline void* interlocked_read_acquire(void* volatile* x) BOOST_NOEXCEPT
+ {
+ void* const res=*x;
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ return res;
+ }
+
+ inline void interlocked_write_release(long volatile* x,long value) BOOST_NOEXCEPT
+ {
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ *x=value;
+ }
+ inline void interlocked_write_release(void* volatile* x,void* value) BOOST_NOEXCEPT
+ {
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ *x=value;
+ }
+ }
+}
+
+#elif defined(_MSC_VER) && _MSC_VER >= 1700 && (defined(_M_ARM) || defined(_M_ARM64))
+
+#include <intrin.h>
+
+namespace boost
+{
+ namespace detail
+ {
+ inline long interlocked_read_acquire(long volatile* x) BOOST_NOEXCEPT
+ {
+ long const res=__iso_volatile_load32((const volatile __int32*)x);
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ __dmb(0xB); // _ARM_BARRIER_ISH, see armintr.h from MSVC 11 and later
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ return res;
+ }
+ inline void* interlocked_read_acquire(void* volatile* x) BOOST_NOEXCEPT
+ {
+ void* const res=
+#if defined(_M_ARM64)
+ (void*)__iso_volatile_load64((const volatile __int64*)x);
+#else
+ (void*)__iso_volatile_load32((const volatile __int32*)x);
+#endif
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ __dmb(0xB); // _ARM_BARRIER_ISH, see armintr.h from MSVC 11 and later
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ return res;
+ }
+
+ inline void interlocked_write_release(long volatile* x,long value) BOOST_NOEXCEPT
+ {
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ __dmb(0xB); // _ARM_BARRIER_ISH, see armintr.h from MSVC 11 and later
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ __iso_volatile_store32((volatile __int32*)x, (__int32)value);
+ }
+ inline void interlocked_write_release(void* volatile* x,void* value) BOOST_NOEXCEPT
+ {
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+ __dmb(0xB); // _ARM_BARRIER_ISH, see armintr.h from MSVC 11 and later
+ BOOST_THREAD_DETAIL_COMPILER_BARRIER();
+#if defined(_M_ARM64)
+ __iso_volatile_store64((volatile __int64*)x, (__int64)value);
+#else
+ __iso_volatile_store32((volatile __int32*)x, (__int32)value);
+#endif
+ }
+ }
+}
+
+#elif defined(__GNUC__) && (((__GNUC__ * 100 + __GNUC_MINOR__) >= 407) || (defined(__clang__) && (__clang_major__ * 100 + __clang_minor__) >= 302))
+
+namespace boost
+{
+ namespace detail
+ {
+ inline long interlocked_read_acquire(long volatile* x) BOOST_NOEXCEPT
+ {
+ return __atomic_load_n((long*)x, __ATOMIC_ACQUIRE);
+ }
+ inline void* interlocked_read_acquire(void* volatile* x) BOOST_NOEXCEPT
+ {
+ return __atomic_load_n((void**)x, __ATOMIC_ACQUIRE);
+ }
+
+ inline void interlocked_write_release(long volatile* x,long value) BOOST_NOEXCEPT
+ {
+ __atomic_store_n((long*)x, value, __ATOMIC_RELEASE);
+ }
+ inline void interlocked_write_release(void* volatile* x,void* value) BOOST_NOEXCEPT
+ {
+ __atomic_store_n((void**)x, value, __ATOMIC_RELEASE);
+ }
+ }
+}
+
+#elif defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+
+namespace boost
+{
+ namespace detail
+ {
+ inline long interlocked_read_acquire(long volatile* x) BOOST_NOEXCEPT
+ {
+ long res;
+ __asm__ __volatile__ ("movl %1, %0" : "=r" (res) : "m" (*x) : "memory");
+ return res;
+ }
+ inline void* interlocked_read_acquire(void* volatile* x) BOOST_NOEXCEPT
+ {
+ void* res;
+#if defined(__x86_64__)
+ __asm__ __volatile__ ("movq %1, %0" : "=r" (res) : "m" (*x) : "memory");
+#else
+ __asm__ __volatile__ ("movl %1, %0" : "=r" (res) : "m" (*x) : "memory");
+#endif
+ return res;
+ }
+
+ inline void interlocked_write_release(long volatile* x,long value) BOOST_NOEXCEPT
+ {
+ __asm__ __volatile__ ("movl %1, %0" : "=m" (*x) : "r" (value) : "memory");
+ }
+ inline void interlocked_write_release(void* volatile* x,void* value) BOOST_NOEXCEPT
+ {
+#if defined(__x86_64__)
+ __asm__ __volatile__ ("movq %1, %0" : "=m" (*x) : "r" (value) : "memory");
+#else
+ __asm__ __volatile__ ("movl %1, %0" : "=m" (*x) : "r" (value) : "memory");
+#endif
+ }
+ }
+}
+
+#else
+
+namespace boost
+{
+ namespace detail
+ {
+ inline long interlocked_read_acquire(long volatile* x) BOOST_NOEXCEPT
+ {
+ return BOOST_INTERLOCKED_COMPARE_EXCHANGE((long*)x,0,0);
+ }
+ inline void* interlocked_read_acquire(void* volatile* x) BOOST_NOEXCEPT
+ {
+ return BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER((void**)x,0,0);
+ }
+ inline void interlocked_write_release(long volatile* x,long value) BOOST_NOEXCEPT
+ {
+ BOOST_INTERLOCKED_EXCHANGE((long*)x,value);
+ }
+ inline void interlocked_write_release(void* volatile* x,void* value) BOOST_NOEXCEPT
+ {
+ BOOST_INTERLOCKED_EXCHANGE_POINTER((void**)x,value);
+ }
+ }
+}
+
+#endif
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/mutex.hpp
new file mode 100644
index 00000000000..01544784b5b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/mutex.hpp
@@ -0,0 +1,72 @@
+#ifndef BOOST_THREAD_WIN32_MUTEX_HPP
+#define BOOST_THREAD_WIN32_MUTEX_HPP
+// (C) Copyright 2005-7 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/win32/basic_timed_mutex.hpp>
+#include <boost/thread/exceptions.hpp>
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+#include <boost/thread/lock_types.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ typedef ::boost::detail::basic_timed_mutex underlying_mutex;
+ }
+
+ class mutex:
+ public ::boost::detail::underlying_mutex
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(mutex)
+ mutex()
+ {
+ initialize();
+ }
+ ~mutex()
+ {
+ destroy();
+ }
+
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ typedef unique_lock<mutex> scoped_lock;
+ typedef detail::try_lock_wrapper<mutex> scoped_try_lock;
+#endif
+ };
+
+ typedef mutex try_mutex;
+
+ class timed_mutex:
+ public ::boost::detail::basic_timed_mutex
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(timed_mutex)
+ timed_mutex()
+ {
+ initialize();
+ }
+
+ ~timed_mutex()
+ {
+ destroy();
+ }
+
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ typedef unique_lock<timed_mutex> scoped_timed_lock;
+ typedef detail::try_lock_wrapper<timed_mutex> scoped_try_lock;
+ typedef scoped_timed_lock scoped_lock;
+#endif
+ };
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/once.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/once.hpp
new file mode 100644
index 00000000000..3c515bae7dc
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/once.hpp
@@ -0,0 +1,1087 @@
+#ifndef BOOST_THREAD_WIN32_ONCE_HPP
+#define BOOST_THREAD_WIN32_ONCE_HPP
+
+// once.hpp
+//
+// (C) Copyright 2005-7 Anthony Williams
+// (C) Copyright 2005 John Maddock
+// (C) Copyright 2011-2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <cstring>
+#include <cstddef>
+#include <boost/assert.hpp>
+#include <boost/static_assert.hpp>
+#include <boost/detail/interlocked.hpp>
+#include <boost/thread/win32/thread_primitives.hpp>
+#include <boost/thread/win32/interlocked_read.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+#include <boost/thread/detail/move.hpp>
+#include <boost/thread/detail/invoke.hpp>
+
+#include <boost/bind.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std
+{
+ using ::memcpy;
+ using ::ptrdiff_t;
+}
+#endif
+
+namespace boost
+{
+ struct once_flag;
+ namespace detail
+ {
+ struct once_context;
+
+ inline bool enter_once_region(once_flag& flag, once_context& ctx) BOOST_NOEXCEPT;
+ inline void commit_once_region(once_flag& flag, once_context& ctx) BOOST_NOEXCEPT;
+ inline void rollback_once_region(once_flag& flag, once_context& ctx) BOOST_NOEXCEPT;
+ }
+
+#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+
+ struct once_flag
+ {
+ BOOST_THREAD_NO_COPYABLE(once_flag)
+ BOOST_CONSTEXPR once_flag() BOOST_NOEXCEPT
+ : status(0), count(0)
+ {}
+ long status;
+ long count;
+ private:
+ friend inline bool enter_once_region(once_flag& flag, detail::once_context& ctx) BOOST_NOEXCEPT;
+ friend inline void commit_once_region(once_flag& flag, detail::once_context& ctx) BOOST_NOEXCEPT;
+ friend inline void rollback_once_region(once_flag& flag, detail::once_context& ctx) BOOST_NOEXCEPT;
+ };
+
+#define BOOST_ONCE_INIT once_flag()
+#else // BOOST_THREAD_PROVIDES_ONCE_CXX11
+
+ struct once_flag
+ {
+ long status;
+ long count;
+ };
+
+#define BOOST_ONCE_INIT {0,0}
+#endif // BOOST_THREAD_PROVIDES_ONCE_CXX11
+
+#if defined BOOST_THREAD_PROVIDES_INVOKE
+#define BOOST_THREAD_INVOKE_RET_VOID detail::invoke
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL
+#elif defined BOOST_THREAD_PROVIDES_INVOKE_RET
+#define BOOST_THREAD_INVOKE_RET_VOID detail::invoke<void>
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL
+#else
+#define BOOST_THREAD_INVOKE_RET_VOID boost::bind
+#define BOOST_THREAD_INVOKE_RET_VOID_CALL ()
+#endif
+
+ namespace detail
+ {
+#ifdef BOOST_NO_ANSI_APIS
+ typedef wchar_t once_char_type;
+#else
+ typedef char once_char_type;
+#endif
+ unsigned const once_mutex_name_fixed_length=54;
+ unsigned const once_mutex_name_length=once_mutex_name_fixed_length+
+ sizeof(void*)*2+sizeof(unsigned long)*2+1;
+
+ template <class I>
+ void int_to_string(I p, once_char_type* buf)
+ {
+ for(unsigned i=0; i < sizeof(I)*2; ++i,++buf)
+ {
+#ifdef BOOST_NO_ANSI_APIS
+ once_char_type const a=L'A';
+#else
+ once_char_type const a='A';
+#endif
+ *buf = a + static_cast<once_char_type>((p >> (i*4)) & 0x0f);
+ }
+ *buf = 0;
+ }
+
+ inline void name_once_mutex(once_char_type* mutex_name,void* flag_address)
+ {
+#ifdef BOOST_NO_ANSI_APIS
+ static const once_char_type fixed_mutex_name[]=L"Local\\{C15730E2-145C-4c5e-B005-3BC753F42475}-once-flag";
+#else
+ static const once_char_type fixed_mutex_name[]="Local\\{C15730E2-145C-4c5e-B005-3BC753F42475}-once-flag";
+#endif
+ BOOST_STATIC_ASSERT(sizeof(fixed_mutex_name) ==
+ (sizeof(once_char_type)*(once_mutex_name_fixed_length+1)));
+
+ std::memcpy(mutex_name,fixed_mutex_name,sizeof(fixed_mutex_name));
+ detail::int_to_string(reinterpret_cast<std::ptrdiff_t>(flag_address),
+ mutex_name + once_mutex_name_fixed_length);
+ detail::int_to_string(winapi::GetCurrentProcessId(),
+ mutex_name + once_mutex_name_fixed_length + sizeof(void*)*2);
+ }
+
+ inline void* open_once_event(once_char_type* mutex_name,void* flag_address)
+ {
+ if(!*mutex_name)
+ {
+ name_once_mutex(mutex_name,flag_address);
+ }
+
+#ifdef BOOST_NO_ANSI_APIS
+ return ::boost::winapi::OpenEventW(
+#else
+ return ::boost::winapi::OpenEventA(
+#endif
+ ::boost::detail::win32::synchronize |
+ ::boost::detail::win32::event_modify_state,
+ false,
+ mutex_name);
+ }
+
+ inline void* create_once_event(once_char_type* mutex_name,void* flag_address)
+ {
+ if(!*mutex_name)
+ {
+ name_once_mutex(mutex_name,flag_address);
+ }
+
+ return ::boost::detail::win32::create_event(
+ mutex_name,
+ ::boost::detail::win32::manual_reset_event,
+ ::boost::detail::win32::event_initially_reset);
+ }
+
+ struct once_context {
+ long const function_complete_flag_value;
+ long const running_value;
+ bool counted;
+ detail::win32::handle_manager event_handle;
+ detail::once_char_type mutex_name[once_mutex_name_length];
+ once_context() :
+ function_complete_flag_value(0xc15730e2),
+ running_value(0x7f0725e3),
+ counted(false)
+ {
+ mutex_name[0]=0;
+ }
+ };
+ enum once_action {try_, break_, continue_};
+
+ inline bool enter_once_region(once_flag& flag, once_context& ctx) BOOST_NOEXCEPT
+ {
+ long status=BOOST_INTERLOCKED_COMPARE_EXCHANGE(&flag.status,ctx.running_value,0);
+ if(!status)
+ {
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::open_once_event(ctx.mutex_name,&flag);
+ }
+ if(ctx.event_handle)
+ {
+ ::boost::winapi::ResetEvent(ctx.event_handle);
+ }
+ return true;
+ }
+ return false;
+ }
+ inline void commit_once_region(once_flag& flag, once_context& ctx) BOOST_NOEXCEPT
+ {
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ }
+ BOOST_INTERLOCKED_EXCHANGE(&flag.status,ctx.function_complete_flag_value);
+ if(!ctx.event_handle &&
+ (::boost::detail::interlocked_read_acquire(&flag.count)>1))
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ }
+ if(ctx.event_handle)
+ {
+ ::boost::winapi::SetEvent(ctx.event_handle);
+ }
+ }
+ inline void rollback_once_region(once_flag& flag, once_context& ctx) BOOST_NOEXCEPT
+ {
+ BOOST_INTERLOCKED_EXCHANGE(&flag.status,0);
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::open_once_event(ctx.mutex_name,&flag);
+ }
+ if(ctx.event_handle)
+ {
+ ::boost::winapi::SetEvent(ctx.event_handle);
+ }
+ }
+ }
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+//#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR)
+ inline void call_once(once_flag& flag, void (*f)())
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f();
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite, 0));
+ }
+ }
+//#endif
+ template<typename Function>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f();
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, class A, class ...ArgTypes>
+ inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(A) a, BOOST_THREAD_RV_REF(ArgTypes)... args)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<A>(a)),
+ thread_detail::decay_copy(boost::forward<ArgTypes>(args))...
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+#else
+#if ! defined(BOOST_MSVC) && ! defined(BOOST_INTEL)
+ template<typename Function>
+ void call_once(once_flag& flag,Function f)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f();
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1>
+ void call_once(once_flag& flag,Function f, T1 p1)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1, typename T2>
+ void call_once(once_flag& flag,Function f, T1 p1, T2 p2)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1,p2) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1, typename T2, typename T3>
+ void call_once(once_flag& flag,Function f, T1 p1, T2 p2, T3 p3)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1,p2,p3) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+#elif defined BOOST_NO_CXX11_RVALUE_REFERENCES
+
+ template<typename Function>
+ void call_once(once_flag& flag,Function const&f)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f();
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1>
+ void call_once(once_flag& flag,Function const&f, T1 const&p1)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1, typename T2>
+ void call_once(once_flag& flag,Function const&f, T1 const&p1, T2 const&p2)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1,p2) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1, typename T2, typename T3>
+ void call_once(once_flag& flag,Function const&f, T1 const&p1, T2 const&p2, T3 const&p3)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(f,p1,p2,p3) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+#endif
+#if 1
+#if defined(BOOST_THREAD_RVALUE_REFERENCES_DONT_MATCH_FUNCTION_PTR)
+ inline void call_once(once_flag& flag, void (*f)())
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f();
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename T1>
+ void call_once(once_flag& flag,void (*f)(BOOST_THREAD_RV_REF(T1)), BOOST_THREAD_RV_REF(T1) p1)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f(
+ thread_detail::decay_copy(boost::forward<T1>(p1))
+ );
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1, typename T2>
+ void call_once(once_flag& flag,void (*f)(BOOST_THREAD_RV_REF(T1),BOOST_THREAD_RV_REF(T2)), BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f(
+ thread_detail::decay_copy(boost::forward<T1>(p1)),
+ thread_detail::decay_copy(boost::forward<T2>(p2))
+ );
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1, typename T2, typename T3>
+ void call_once(once_flag& flag,void (*f)(BOOST_THREAD_RV_REF(T1),BOOST_THREAD_RV_REF(T2)), BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2, BOOST_THREAD_RV_REF(T3) p3)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f(
+ thread_detail::decay_copy(boost::forward<T1>(p1)),
+ thread_detail::decay_copy(boost::forward<T2>(p2)),
+ thread_detail::decay_copy(boost::forward<T3>(p3))
+ );
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+#endif
+ template<typename Function>
+ void call_once(once_flag& flag,BOOST_THREAD_RV_REF(Function) f)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ f();
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+
+ template<typename Function, typename T1>
+ void call_once(once_flag& flag,BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1, typename T2>
+ void call_once(once_flag& flag,BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1)),
+ thread_detail::decay_copy(boost::forward<T2>(p2))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+ template<typename Function, typename T1, typename T2, typename T3>
+ void call_once(once_flag& flag,BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(T1) p1, BOOST_THREAD_RV_REF(T2) p2, BOOST_THREAD_RV_REF(T3) p3)
+ {
+ // Try for a quick win: if the procedure has already been called
+ // just skip through:
+ detail::once_context ctx;
+ while(::boost::detail::interlocked_read_acquire(&flag.status)
+ !=ctx.function_complete_flag_value)
+ {
+ if(detail::enter_once_region(flag, ctx))
+ {
+ BOOST_TRY
+ {
+ BOOST_THREAD_INVOKE_RET_VOID(
+ thread_detail::decay_copy(boost::forward<Function>(f)),
+ thread_detail::decay_copy(boost::forward<T1>(p1)),
+ thread_detail::decay_copy(boost::forward<T2>(p2)),
+ thread_detail::decay_copy(boost::forward<T3>(p3))
+ ) BOOST_THREAD_INVOKE_RET_VOID_CALL;
+
+ }
+ BOOST_CATCH(...)
+ {
+ detail::rollback_once_region(flag, ctx);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ detail::commit_once_region(flag, ctx);
+ break;
+ }
+ if(!ctx.counted)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&flag.count);
+ ctx.counted=true;
+ long status=::boost::detail::interlocked_read_acquire(&flag.status);
+ if(status==ctx.function_complete_flag_value)
+ {
+ break;
+ }
+ if(!ctx.event_handle)
+ {
+ ctx.event_handle=detail::create_once_event(ctx.mutex_name,&flag);
+ continue;
+ }
+ }
+ BOOST_VERIFY(!::boost::winapi::WaitForSingleObjectEx(
+ ctx.event_handle,::boost::detail::win32::infinite,0));
+ }
+ }
+
+#endif
+#endif
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/recursive_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/recursive_mutex.hpp
new file mode 100644
index 00000000000..1f0f7f5e5fd
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/recursive_mutex.hpp
@@ -0,0 +1,70 @@
+#ifndef BOOST_RECURSIVE_MUTEX_WIN32_HPP
+#define BOOST_RECURSIVE_MUTEX_WIN32_HPP
+
+// recursive_mutex.hpp
+//
+// (C) Copyright 2006-7 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+
+#include <boost/thread/win32/basic_recursive_mutex.hpp>
+#include <boost/thread/exceptions.hpp>
+#include <boost/thread/detail/delete.hpp>
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+#include <boost/thread/lock_types.hpp>
+#endif
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ class recursive_mutex:
+ public ::boost::detail::basic_recursive_mutex
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(recursive_mutex)
+ recursive_mutex()
+ {
+ ::boost::detail::basic_recursive_mutex::initialize();
+ }
+ ~recursive_mutex()
+ {
+ ::boost::detail::basic_recursive_mutex::destroy();
+ }
+
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ typedef unique_lock<recursive_mutex> scoped_lock;
+ typedef detail::try_lock_wrapper<recursive_mutex> scoped_try_lock;
+#endif
+ };
+
+ typedef recursive_mutex recursive_try_mutex;
+
+ class recursive_timed_mutex:
+ public ::boost::detail::basic_recursive_timed_mutex
+ {
+ public:
+ BOOST_THREAD_NO_COPYABLE(recursive_timed_mutex)
+ recursive_timed_mutex()
+ {
+ ::boost::detail::basic_recursive_timed_mutex::initialize();
+ }
+ ~recursive_timed_mutex()
+ {
+ ::boost::detail::basic_recursive_timed_mutex::destroy();
+ }
+
+#if defined BOOST_THREAD_PROVIDES_NESTED_LOCKS
+ typedef unique_lock<recursive_timed_mutex> scoped_timed_lock;
+ typedef detail::try_lock_wrapper<recursive_timed_mutex> scoped_try_lock;
+ typedef scoped_timed_lock scoped_lock;
+#endif
+ };
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/shared_mutex.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/shared_mutex.hpp
new file mode 100644
index 00000000000..76ee2579b3d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/shared_mutex.hpp
@@ -0,0 +1,849 @@
+#ifndef BOOST_THREAD_WIN32_SHARED_MUTEX_HPP
+#define BOOST_THREAD_WIN32_SHARED_MUTEX_HPP
+
+// (C) Copyright 2006-8 Anthony Williams
+// (C) Copyright 2011-2012,2017-2018 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/assert.hpp>
+#include <boost/detail/interlocked.hpp>
+#include <boost/thread/win32/thread_primitives.hpp>
+#include <boost/static_assert.hpp>
+#include <limits.h>
+#include <boost/thread/thread_time.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#include <boost/chrono/ceil.hpp>
+#endif
+#include <boost/thread/detail/delete.hpp>
+#include <boost/thread/detail/platform_time.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ class shared_mutex
+ {
+ private:
+ struct state_data
+ {
+ unsigned long shared_count:11,
+ shared_waiting:11,
+ exclusive:1,
+ upgrade:1,
+ exclusive_waiting:7,
+ exclusive_waiting_blocked:1;
+
+ friend bool operator==(state_data const& lhs,state_data const& rhs)
+ {
+ return *reinterpret_cast<unsigned long const*>(&lhs)==*reinterpret_cast<unsigned long const*>(&rhs);
+ }
+ };
+
+ state_data interlocked_compare_exchange(state_data* target, state_data new_value, state_data comparand)
+ {
+ long const res=BOOST_INTERLOCKED_COMPARE_EXCHANGE(reinterpret_cast<long*>(target),
+ *reinterpret_cast<long*>(&new_value),
+ *reinterpret_cast<long*>(&comparand));
+ return *reinterpret_cast<state_data const*>(&res);
+ }
+
+ enum
+ {
+ unlock_sem = 0,
+ exclusive_sem = 1
+ };
+
+ state_data state;
+ detail::win32::handle semaphores[2];
+ detail::win32::handle upgrade_sem;
+
+ void release_waiters(state_data old_state)
+ {
+ if(old_state.exclusive_waiting)
+ {
+ BOOST_VERIFY(winapi::ReleaseSemaphore(semaphores[exclusive_sem],1,0)!=0);
+ }
+
+ if(old_state.shared_waiting || old_state.exclusive_waiting)
+ {
+ BOOST_VERIFY(winapi::ReleaseSemaphore(semaphores[unlock_sem],old_state.shared_waiting + (old_state.exclusive_waiting?1:0),0)!=0);
+ }
+ }
+ void release_shared_waiters(state_data old_state)
+ {
+ if(old_state.shared_waiting || old_state.exclusive_waiting)
+ {
+ BOOST_VERIFY(winapi::ReleaseSemaphore(semaphores[unlock_sem],old_state.shared_waiting + (old_state.exclusive_waiting?1:0),0)!=0);
+ }
+ }
+
+ public:
+ BOOST_THREAD_NO_COPYABLE(shared_mutex)
+ shared_mutex()
+ {
+ semaphores[unlock_sem]=detail::win32::create_anonymous_semaphore(0,LONG_MAX);
+ semaphores[exclusive_sem]=detail::win32::create_anonymous_semaphore_nothrow(0,LONG_MAX);
+ if (!semaphores[exclusive_sem])
+ {
+ detail::win32::release_semaphore(semaphores[unlock_sem],LONG_MAX);
+ boost::throw_exception(thread_resource_error());
+ }
+ upgrade_sem=detail::win32::create_anonymous_semaphore_nothrow(0,LONG_MAX);
+ if (!upgrade_sem)
+ {
+ detail::win32::release_semaphore(semaphores[unlock_sem],LONG_MAX);
+ detail::win32::release_semaphore(semaphores[exclusive_sem],LONG_MAX);
+ boost::throw_exception(thread_resource_error());
+ }
+ state_data state_={0,0,0,0,0,0};
+ state=state_;
+ }
+
+ ~shared_mutex()
+ {
+ winapi::CloseHandle(upgrade_sem);
+ winapi::CloseHandle(semaphores[unlock_sem]);
+ winapi::CloseHandle(semaphores[exclusive_sem]);
+ }
+
+ bool try_lock_shared()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(!new_state.exclusive && !new_state.exclusive_waiting_blocked)
+ {
+ ++new_state.shared_count;
+ if(!new_state.shared_count)
+ {
+ return false;
+ }
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+ return !(old_state.exclusive| old_state.exclusive_waiting_blocked);
+ }
+
+ void lock_shared()
+ {
+ for(;;)
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(new_state.exclusive || new_state.exclusive_waiting_blocked)
+ {
+ ++new_state.shared_waiting;
+ if(!new_state.shared_waiting)
+ {
+ boost::throw_exception(boost::lock_error());
+ }
+ }
+ else
+ {
+ ++new_state.shared_count;
+ if(!new_state.shared_count)
+ {
+ boost::throw_exception(boost::lock_error());
+ }
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+
+ if(!(old_state.exclusive| old_state.exclusive_waiting_blocked))
+ {
+ return;
+ }
+
+ BOOST_VERIFY(winapi::WaitForSingleObjectEx(semaphores[unlock_sem],::boost::detail::win32::infinite,0)==0);
+ }
+ }
+
+ private:
+ unsigned long getMs(detail::platform_duration const& d)
+ {
+ return static_cast<unsigned long>(d.getMs());
+ }
+
+ template <typename Duration>
+ unsigned long getMs(Duration const& d)
+ {
+ return static_cast<unsigned long>(chrono::ceil<chrono::milliseconds>(d).count());
+ }
+
+ template <typename Clock, typename Timepoint, typename Duration>
+ bool do_lock_shared_until(Timepoint const& t, Duration const& max)
+ {
+ for(;;)
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(new_state.exclusive || new_state.exclusive_waiting_blocked)
+ {
+ ++new_state.shared_waiting;
+ if(!new_state.shared_waiting)
+ {
+ boost::throw_exception(boost::lock_error());
+ }
+ }
+ else
+ {
+ ++new_state.shared_count;
+ if(!new_state.shared_count)
+ {
+ boost::throw_exception(boost::lock_error());
+ }
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+
+ if(!(old_state.exclusive| old_state.exclusive_waiting_blocked))
+ {
+ return true;
+ }
+
+ // If the clock is the system clock, it may jump while this function
+ // is waiting. To compensate for this and time out near the correct
+ // time, we call WaitForSingleObjectEx() in a loop with a short
+ // timeout and recheck the time remaining each time through the loop.
+ unsigned long res=0;
+ for(;;)
+ {
+ Duration d(t - Clock::now());
+ if(d <= Duration::zero()) // timeout occurred
+ {
+ res=detail::win32::timeout;
+ break;
+ }
+ if(max != Duration::zero())
+ {
+ d = (std::min)(d, max);
+ }
+ res=winapi::WaitForSingleObjectEx(semaphores[unlock_sem],getMs(d),0);
+ if(res!=detail::win32::timeout) // semaphore released
+ {
+ break;
+ }
+ }
+
+ if(res==detail::win32::timeout)
+ {
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(new_state.exclusive || new_state.exclusive_waiting_blocked)
+ {
+ if(new_state.shared_waiting)
+ {
+ --new_state.shared_waiting;
+ }
+ }
+ else
+ {
+ ++new_state.shared_count;
+ if(!new_state.shared_count)
+ {
+ return false;
+ }
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+
+ if(!(old_state.exclusive| old_state.exclusive_waiting_blocked))
+ {
+ return true;
+ }
+ return false;
+ }
+
+ BOOST_ASSERT(res==0);
+ }
+ }
+ public:
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename TimeDuration>
+ bool timed_lock_shared(TimeDuration const & relative_time)
+ {
+ const detail::mono_platform_timepoint t(detail::mono_platform_clock::now() + detail::platform_duration(relative_time));
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_shared_until<detail::mono_platform_clock>(t, detail::platform_duration::zero());
+ }
+ bool timed_lock_shared(boost::system_time const& wait_until)
+ {
+ const detail::real_platform_timepoint t(wait_until);
+ return do_lock_shared_until<detail::real_platform_clock>(t, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_shared_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ const chrono::steady_clock::time_point t(chrono::steady_clock::now() + rel_time);
+ typedef typename chrono::duration<Rep, Period> Duration;
+ typedef typename common_type<Duration, typename chrono::steady_clock::duration>::type common_duration;
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_shared_until<chrono::steady_clock>(t, common_duration::zero());
+ }
+ template <class Duration>
+ bool try_lock_shared_until(const chrono::time_point<chrono::steady_clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename chrono::steady_clock::duration>::type common_duration;
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_shared_until<chrono::steady_clock>(t, common_duration::zero());
+ }
+ template <class Clock, class Duration>
+ bool try_lock_shared_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ return do_lock_shared_until<Clock>(t, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ }
+#endif
+
+ void unlock_shared()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ bool const last_reader=!--new_state.shared_count;
+
+ if(last_reader)
+ {
+ if(new_state.upgrade)
+ {
+ new_state.upgrade=false;
+ new_state.exclusive=true;
+ }
+ else
+ {
+ if(new_state.exclusive_waiting)
+ {
+ --new_state.exclusive_waiting;
+ new_state.exclusive_waiting_blocked=false;
+ }
+ new_state.shared_waiting=0;
+ }
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ if(last_reader)
+ {
+ if(old_state.upgrade)
+ {
+ BOOST_VERIFY(winapi::ReleaseSemaphore(upgrade_sem,1,0)!=0);
+ }
+ else
+ {
+ release_waiters(old_state);
+ }
+ }
+ break;
+ }
+ old_state=current_state;
+ }
+ }
+
+ bool try_lock()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(new_state.shared_count || new_state.exclusive)
+ {
+ return false;
+ }
+ else
+ {
+ new_state.exclusive=true;
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+ return true;
+ }
+
+ void lock()
+ {
+ for(;;)
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(new_state.shared_count || new_state.exclusive)
+ {
+ ++new_state.exclusive_waiting;
+ if(!new_state.exclusive_waiting)
+ {
+ boost::throw_exception(boost::lock_error());
+ }
+
+ new_state.exclusive_waiting_blocked=true;
+ }
+ else
+ {
+ new_state.exclusive=true;
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+
+ if(!old_state.shared_count && !old_state.exclusive)
+ {
+ return;
+ }
+
+ #ifndef UNDER_CE
+ const bool wait_all = true;
+ #else
+ const bool wait_all = false;
+ #endif
+ BOOST_VERIFY(winapi::WaitForMultipleObjectsEx(2,semaphores,wait_all,::boost::detail::win32::infinite,0)<2);
+ }
+ }
+
+ private:
+ template <typename Clock, typename Timepoint, typename Duration>
+ bool do_lock_until(Timepoint const& t, Duration const& max)
+ {
+ for(;;)
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(new_state.shared_count || new_state.exclusive)
+ {
+ ++new_state.exclusive_waiting;
+ if(!new_state.exclusive_waiting)
+ {
+ boost::throw_exception(boost::lock_error());
+ }
+
+ new_state.exclusive_waiting_blocked=true;
+ }
+ else
+ {
+ new_state.exclusive=true;
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+
+ if(!old_state.shared_count && !old_state.exclusive)
+ {
+ return true;
+ }
+
+ // If the clock is the system clock, it may jump while this function
+ // is waiting. To compensate for this and time out near the correct
+ // time, we call WaitForMultipleObjectsEx() in a loop with a short
+ // timeout and recheck the time remaining each time through the loop.
+ unsigned long wait_res=0;
+ for(;;)
+ {
+ Duration d(t - Clock::now());
+ if(d <= Duration::zero()) // timeout occurred
+ {
+ wait_res=detail::win32::timeout;
+ break;
+ }
+ if(max != Duration::zero())
+ {
+ d = (std::min)(d, max);
+ }
+ #ifndef UNDER_CE
+ wait_res=winapi::WaitForMultipleObjectsEx(2,semaphores,true,getMs(d),0);
+ #else
+ wait_res=winapi::WaitForMultipleObjectsEx(2,semaphores,false,getMs(d),0);
+ #endif
+ //wait_res=winapi::WaitForMultipleObjectsEx(2,semaphores,wait_all,getMs(d), 0);
+
+ if(wait_res!=detail::win32::timeout) // semaphore released
+ {
+ break;
+ }
+ }
+
+ if(wait_res==detail::win32::timeout)
+ {
+ for(;;)
+ {
+ bool must_notify = false;
+ state_data new_state=old_state;
+ if(new_state.shared_count || new_state.exclusive)
+ {
+ if(new_state.exclusive_waiting)
+ {
+ if(!--new_state.exclusive_waiting)
+ {
+ new_state.exclusive_waiting_blocked=false;
+ must_notify = true;
+ }
+ }
+ }
+ else
+ {
+ new_state.exclusive=true;
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if (must_notify)
+ {
+ BOOST_VERIFY(winapi::ReleaseSemaphore(semaphores[unlock_sem],1,0)!=0);
+ }
+
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+ if(!old_state.shared_count && !old_state.exclusive)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ BOOST_ASSERT(wait_res<2);
+ }
+ }
+ public:
+
+#if defined BOOST_THREAD_USES_DATETIME
+ bool timed_lock(boost::system_time const& wait_until)
+ {
+ const detail::real_platform_timepoint t(wait_until);
+ return do_lock_until<detail::real_platform_clock>(t, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ }
+ template<typename TimeDuration>
+ bool timed_lock(TimeDuration const & relative_time)
+ {
+ const detail::mono_platform_timepoint t(detail::mono_platform_clock::now() + detail::platform_duration(relative_time));
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_until<detail::mono_platform_clock>(t, detail::platform_duration::zero());
+ }
+#endif
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ bool try_lock_for(const chrono::duration<Rep, Period>& rel_time)
+ {
+ const chrono::steady_clock::time_point t(chrono::steady_clock::now() + rel_time);
+ typedef typename chrono::duration<Rep, Period> Duration;
+ typedef typename common_type<Duration, typename chrono::steady_clock::duration>::type common_duration;
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_until<chrono::steady_clock>(t, common_duration::zero());
+ }
+ template <class Duration>
+ bool try_lock_until(const chrono::time_point<chrono::steady_clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename chrono::steady_clock::duration>::type common_duration;
+ // The reference clock is steady and so no need to poll periodically, thus 0 ms max (i.e. no max)
+ return do_lock_until<chrono::steady_clock>(t, common_duration::zero());
+ }
+ template <class Clock, class Duration>
+ bool try_lock_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ return do_lock_until<Clock>(t, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ }
+#endif
+
+ void unlock()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ new_state.exclusive=false;
+ if(new_state.exclusive_waiting)
+ {
+ --new_state.exclusive_waiting;
+ new_state.exclusive_waiting_blocked=false;
+ }
+ new_state.shared_waiting=0;
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+ release_waiters(old_state);
+ }
+
+ void lock_upgrade()
+ {
+ for(;;)
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(new_state.exclusive || new_state.exclusive_waiting_blocked || new_state.upgrade)
+ {
+ ++new_state.shared_waiting;
+ if(!new_state.shared_waiting)
+ {
+ boost::throw_exception(boost::lock_error());
+ }
+ }
+ else
+ {
+ ++new_state.shared_count;
+ if(!new_state.shared_count)
+ {
+ boost::throw_exception(boost::lock_error());
+ }
+ new_state.upgrade=true;
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+
+ if(!(old_state.exclusive|| old_state.exclusive_waiting_blocked|| old_state.upgrade))
+ {
+ return;
+ }
+
+ BOOST_VERIFY(winapi::WaitForSingleObjectEx(semaphores[unlock_sem],winapi::infinite,0)==0);
+ }
+ }
+
+ bool try_lock_upgrade()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ if(new_state.exclusive || new_state.exclusive_waiting_blocked || new_state.upgrade)
+ {
+ return false;
+ }
+ else
+ {
+ ++new_state.shared_count;
+ if(!new_state.shared_count)
+ {
+ return false;
+ }
+ new_state.upgrade=true;
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+ return true;
+ }
+
+ void unlock_upgrade()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ new_state.upgrade=false;
+ bool const last_reader=!--new_state.shared_count;
+
+ new_state.shared_waiting=0;
+ if(last_reader)
+ {
+ if(new_state.exclusive_waiting)
+ {
+ --new_state.exclusive_waiting;
+ new_state.exclusive_waiting_blocked=false;
+ }
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ if(last_reader)
+ {
+ release_waiters(old_state);
+ }
+ else {
+ release_shared_waiters(old_state);
+ }
+ // #7720
+ //else {
+ // release_waiters(old_state);
+ //}
+ break;
+ }
+ old_state=current_state;
+ }
+ }
+
+ void unlock_upgrade_and_lock()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ bool const last_reader=!--new_state.shared_count;
+
+ if(last_reader)
+ {
+ new_state.upgrade=false;
+ new_state.exclusive=true;
+ }
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ if(!last_reader)
+ {
+ BOOST_VERIFY(winapi::WaitForSingleObjectEx(upgrade_sem,detail::win32::infinite,0)==0);
+ }
+ break;
+ }
+ old_state=current_state;
+ }
+ }
+
+ void unlock_and_lock_upgrade()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ new_state.exclusive=false;
+ new_state.upgrade=true;
+ ++new_state.shared_count;
+ if(new_state.exclusive_waiting)
+ {
+ --new_state.exclusive_waiting;
+ new_state.exclusive_waiting_blocked=false;
+ }
+ new_state.shared_waiting=0;
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+ release_waiters(old_state);
+ }
+
+ void unlock_and_lock_shared()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ new_state.exclusive=false;
+ ++new_state.shared_count;
+ if(new_state.exclusive_waiting)
+ {
+ --new_state.exclusive_waiting;
+ new_state.exclusive_waiting_blocked=false;
+ }
+ new_state.shared_waiting=0;
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+ release_waiters(old_state);
+ }
+ void unlock_upgrade_and_lock_shared()
+ {
+ state_data old_state=state;
+ for(;;)
+ {
+ state_data new_state=old_state;
+ new_state.upgrade=false;
+ if(new_state.exclusive_waiting)
+ {
+ --new_state.exclusive_waiting;
+ new_state.exclusive_waiting_blocked=false;
+ }
+ new_state.shared_waiting=0;
+
+ state_data const current_state=interlocked_compare_exchange(&state,new_state,old_state);
+ if(current_state==old_state)
+ {
+ break;
+ }
+ old_state=current_state;
+ }
+ release_waiters(old_state);
+ }
+
+ };
+ typedef shared_mutex upgrade_mutex;
+
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/thread_data.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/thread_data.hpp
new file mode 100644
index 00000000000..2f28820290b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/thread_data.hpp
@@ -0,0 +1,299 @@
+#ifndef BOOST_THREAD_PTHREAD_THREAD_DATA_HPP
+#define BOOST_THREAD_PTHREAD_THREAD_DATA_HPP
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2008 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/thread_time.hpp>
+#include <boost/thread/win32/thread_primitives.hpp>
+#include <boost/thread/win32/thread_heap_alloc.hpp>
+#include <boost/thread/detail/platform_time.hpp>
+
+#include <boost/predef/platform.h>
+
+#include <boost/intrusive_ptr.hpp>
+#ifdef BOOST_THREAD_USES_CHRONO
+#include <boost/chrono/system_clocks.hpp>
+#endif
+
+#include <map>
+#include <vector>
+#include <utility>
+
+#include <boost/config/abi_prefix.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4251)
+#endif
+
+namespace boost
+{
+ class condition_variable;
+ class mutex;
+
+ class thread_attributes {
+ public:
+ thread_attributes() BOOST_NOEXCEPT {
+ val_.stack_size = 0;
+ //val_.lpThreadAttributes=0;
+ }
+ ~thread_attributes() {
+ }
+ // stack size
+ void set_stack_size(std::size_t size) BOOST_NOEXCEPT {
+ val_.stack_size = size;
+ }
+
+ std::size_t get_stack_size() const BOOST_NOEXCEPT {
+ return val_.stack_size;
+ }
+
+ //void set_security(LPSECURITY_ATTRIBUTES lpThreadAttributes)
+ //{
+ // val_.lpThreadAttributes=lpThreadAttributes;
+ //}
+ //LPSECURITY_ATTRIBUTES get_security()
+ //{
+ // return val_.lpThreadAttributes;
+ //}
+
+ struct win_attrs {
+ std::size_t stack_size;
+ //LPSECURITY_ATTRIBUTES lpThreadAttributes;
+ };
+ typedef win_attrs native_handle_type;
+ native_handle_type* native_handle() {return &val_;}
+ const native_handle_type* native_handle() const {return &val_;}
+
+ private:
+ win_attrs val_;
+ };
+
+ namespace detail
+ {
+ struct shared_state_base;
+ struct tss_cleanup_function;
+ struct thread_exit_callback_node;
+ struct tss_data_node
+ {
+ boost::shared_ptr<boost::detail::tss_cleanup_function> func;
+ void* value;
+
+ tss_data_node(boost::shared_ptr<boost::detail::tss_cleanup_function> func_,
+ void* value_):
+ func(func_),value(value_)
+ {}
+ };
+
+ struct thread_data_base;
+ void intrusive_ptr_add_ref(thread_data_base * p);
+ void intrusive_ptr_release(thread_data_base * p);
+
+ struct BOOST_THREAD_DECL thread_data_base
+ {
+ long count;
+
+ // Win32 threading APIs are not available in store apps so
+ // use abstraction on top of Windows::System::Threading.
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ detail::win32::scoped_winrt_thread thread_handle;
+#else
+ detail::win32::handle_manager thread_handle;
+#endif
+
+ boost::detail::thread_exit_callback_node* thread_exit_callbacks;
+ unsigned id;
+ std::map<void const*,boost::detail::tss_data_node> tss_data;
+ typedef std::vector<std::pair<condition_variable*, mutex*>
+ //, hidden_allocator<std::pair<condition_variable*, mutex*> >
+ > notify_list_t;
+ notify_list_t notify;
+
+//#ifndef BOOST_NO_EXCEPTIONS
+ typedef std::vector<shared_ptr<shared_state_base> > async_states_t;
+ async_states_t async_states_;
+//#endif
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ // These data must be at the end so that the access to the other fields doesn't change
+ // when BOOST_THREAD_PROVIDES_INTERRUPTIONS is defined
+ // Another option is to have them always
+ detail::win32::handle_manager interruption_handle;
+ bool interruption_enabled;
+//#endif
+
+ thread_data_base():
+ count(0),
+ thread_handle(),
+ thread_exit_callbacks(0),
+ id(0),
+ tss_data(),
+ notify()
+//#ifndef BOOST_NO_EXCEPTIONS
+ , async_states_()
+//#endif
+//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ , interruption_handle(create_anonymous_event(detail::win32::manual_reset_event,detail::win32::event_initially_reset))
+ , interruption_enabled(true)
+//#endif
+ {}
+ virtual ~thread_data_base();
+
+ friend void intrusive_ptr_add_ref(thread_data_base * p)
+ {
+ BOOST_INTERLOCKED_INCREMENT(&p->count);
+ }
+
+ friend void intrusive_ptr_release(thread_data_base * p)
+ {
+ if(!BOOST_INTERLOCKED_DECREMENT(&p->count))
+ {
+ detail::heap_delete(p);
+ }
+ }
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ void interrupt()
+ {
+ BOOST_VERIFY(winapi::SetEvent(interruption_handle)!=0);
+ }
+#endif
+ typedef detail::win32::handle native_handle_type;
+
+ virtual void run()=0;
+
+ virtual void notify_all_at_thread_exit(condition_variable* cv, mutex* m)
+ {
+ notify.push_back(std::pair<condition_variable*, mutex*>(cv, m));
+ }
+
+//#ifndef BOOST_NO_EXCEPTIONS
+ void make_ready_at_thread_exit(shared_ptr<shared_state_base> as)
+ {
+ async_states_.push_back(as);
+ }
+//#endif
+ };
+ BOOST_THREAD_DECL thread_data_base* get_current_thread_data();
+
+ typedef boost::intrusive_ptr<detail::thread_data_base> thread_data_ptr;
+ }
+
+ namespace this_thread
+ {
+ void BOOST_THREAD_DECL yield() BOOST_NOEXCEPT;
+
+ bool BOOST_THREAD_DECL interruptible_wait(detail::win32::handle handle_to_wait_for, detail::internal_platform_timepoint const &timeout);
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename TimeDuration>
+ BOOST_SYMBOL_VISIBLE void sleep(TimeDuration const& rel_time)
+ {
+ interruptible_wait(detail::win32::invalid_handle_value, detail::internal_platform_clock::now() + detail::platform_duration(rel_time));
+ }
+
+ inline BOOST_SYMBOL_VISIBLE void sleep(system_time const& abs_time)
+ {
+ const detail::real_platform_timepoint ts(abs_time);
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ while (d > detail::platform_duration::zero())
+ {
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ interruptible_wait(detail::win32::invalid_handle_value, detail::internal_platform_clock::now() + d);
+ d = ts - detail::real_platform_clock::now();
+ }
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ void sleep_for(const chrono::duration<Rep, Period>& d)
+ {
+ interruptible_wait(detail::win32::invalid_handle_value, detail::internal_platform_clock::now() + detail::platform_duration(d));
+ }
+
+ template <class Duration>
+ void sleep_until(const chrono::time_point<chrono::steady_clock, Duration>& t)
+ {
+ sleep_for(t - chrono::steady_clock::now());
+ }
+
+ template <class Clock, class Duration>
+ void sleep_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ while (d > common_duration::zero())
+ {
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ sleep_for(d);
+ d = t - Clock::now();
+ }
+ }
+#endif
+
+ namespace no_interruption_point
+ {
+ bool BOOST_THREAD_DECL non_interruptible_wait(detail::win32::handle handle_to_wait_for, detail::internal_platform_timepoint const &timeout);
+
+#if defined BOOST_THREAD_USES_DATETIME
+ template<typename TimeDuration>
+ BOOST_SYMBOL_VISIBLE void sleep(TimeDuration const& rel_time)
+ {
+ non_interruptible_wait(detail::win32::invalid_handle_value, detail::internal_platform_clock::now() + detail::platform_duration(rel_time));
+ }
+
+ inline BOOST_SYMBOL_VISIBLE void sleep(system_time const& abs_time)
+ {
+ const detail::real_platform_timepoint ts(abs_time);
+ detail::platform_duration d(ts - detail::real_platform_clock::now());
+ while (d > detail::platform_duration::zero())
+ {
+ d = (std::min)(d, detail::platform_milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS));
+ non_interruptible_wait(detail::win32::invalid_handle_value, detail::internal_platform_clock::now() + d);
+ d = ts - detail::real_platform_clock::now();
+ }
+ }
+#endif
+
+#ifdef BOOST_THREAD_USES_CHRONO
+ template <class Rep, class Period>
+ void sleep_for(const chrono::duration<Rep, Period>& d)
+ {
+ non_interruptible_wait(detail::win32::invalid_handle_value, detail::internal_platform_clock::now() + detail::platform_duration(d));
+ }
+
+ template <class Duration>
+ void sleep_until(const chrono::time_point<chrono::steady_clock, Duration>& t)
+ {
+ sleep_for(t - chrono::steady_clock::now());
+ }
+
+ template <class Clock, class Duration>
+ void sleep_until(const chrono::time_point<Clock, Duration>& t)
+ {
+ typedef typename common_type<Duration, typename Clock::duration>::type common_duration;
+ common_duration d(t - Clock::now());
+ while (d > common_duration::zero())
+ {
+ d = (std::min)(d, common_duration(chrono::milliseconds(BOOST_THREAD_POLL_INTERVAL_MILLISECONDS)));
+ sleep_for(d);
+ d = t - Clock::now();
+ }
+ }
+#endif
+ }
+ }
+
+}
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/thread_heap_alloc.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/thread_heap_alloc.hpp
new file mode 100644
index 00000000000..176d269e059
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/thread_heap_alloc.hpp
@@ -0,0 +1,469 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+#ifndef THREAD_HEAP_ALLOC_HPP
+#define THREAD_HEAP_ALLOC_HPP
+#include <new>
+#include <boost/thread/detail/config.hpp>
+#include <boost/thread/win32/thread_primitives.hpp>
+#include <stdexcept>
+#include <boost/assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/core/no_exceptions_support.hpp>
+
+#include <boost/winapi/heap_memory.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ inline void* allocate_raw_heap_memory(unsigned size)
+ {
+ void* const heap_memory=winapi::HeapAlloc(winapi::GetProcessHeap(),0,size);
+ if(!heap_memory)
+ {
+ boost::throw_exception(std::bad_alloc());
+ }
+ return heap_memory;
+ }
+
+ inline void free_raw_heap_memory(void* heap_memory)
+ {
+ BOOST_VERIFY(winapi::HeapFree(winapi::GetProcessHeap(),0,heap_memory)!=0);
+ }
+#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) && ! defined (BOOST_NO_CXX11_RVALUE_REFERENCES)
+ template<typename T,typename... Args>
+ inline T* heap_new(Args&&... args)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(static_cast<Args&&>(args)...);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+#else
+ template<typename T>
+ inline T* heap_new()
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T();
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+ template<typename T,typename A1>
+ inline T* heap_new(A1&& a1)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(static_cast<A1&&>(a1));
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1&& a1,A2&& a2)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(static_cast<A1&&>(a1),static_cast<A2&&>(a2));
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1&& a1,A2&& a2,A3&& a3)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(static_cast<A1&&>(a1),static_cast<A2&&>(a2),
+ static_cast<A3&&>(a3));
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1&& a1,A2&& a2,A3&& a3,A4&& a4)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(static_cast<A1&&>(a1),static_cast<A2&&>(a2),
+ static_cast<A3&&>(a3),static_cast<A4&&>(a4));
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+#else
+ template<typename T,typename A1>
+ inline T* heap_new_impl(A1 a1)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new_impl(A1 a1,A2 a2)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1,a2);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1,a2,a3);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1,a2,a3,a4);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1,a2,a3,a4,a5);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5,typename A6>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1,a2,a3,a4,a5,a6);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1,a2,a3,a4,a5,a6,a7);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7,typename A8>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1,a2,a3,a4,a5,a6,a7,a8);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4,typename A5,typename A6,typename A7,typename A8,typename A9>
+ inline T* heap_new_impl(A1 a1,A2 a2,A3 a3,A4 a4,A5 a5,A6 a6,A7 a7,A8 a8,A9 a9)
+ {
+ void* const heap_memory=allocate_raw_heap_memory(sizeof(T));
+ BOOST_TRY
+ {
+ T* const data=new (heap_memory) T(a1,a2,a3,a4,a5,a6,a7,a8,a9);
+ return data;
+ }
+ BOOST_CATCH(...)
+ {
+ free_raw_heap_memory(heap_memory);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+
+ template<typename T,typename A1>
+ inline T* heap_new(A1 const& a1)
+ {
+ return heap_new_impl<T,A1 const&>(a1);
+ }
+ template<typename T,typename A1>
+ inline T* heap_new(A1& a1)
+ {
+ return heap_new_impl<T,A1&>(a1);
+ }
+
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1 const& a1,A2 const& a2)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&>(a1,a2);
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1& a1,A2 const& a2)
+ {
+ return heap_new_impl<T,A1&,A2 const&>(a1,a2);
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1 const& a1,A2& a2)
+ {
+ return heap_new_impl<T,A1 const&,A2&>(a1,a2);
+ }
+ template<typename T,typename A1,typename A2>
+ inline T* heap_new(A1& a1,A2& a2)
+ {
+ return heap_new_impl<T,A1&,A2&>(a1,a2);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3 const&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3 const&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3 const&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1& a1,A2& a2,A3 const& a3)
+ {
+ return heap_new_impl<T,A1&,A2&,A3 const&>(a1,a2,a3);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1& a1,A2 const& a2,A3& a3)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1 const& a1,A2& a2,A3& a3)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3&>(a1,a2,a3);
+ }
+ template<typename T,typename A1,typename A2,typename A3>
+ inline T* heap_new(A1& a1,A2& a2,A3& a3)
+ {
+ return heap_new_impl<T,A1&,A2&,A3&>(a1,a2,a3);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3 const&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3 const&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3 const&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2& a2,A3 const& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1&,A2&,A3 const&,A4 const&>(a1,a2,a3,a4);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2 const& a2,A3& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2& a2,A3& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2& a2,A3& a3,A4 const& a4)
+ {
+ return heap_new_impl<T,A1&,A2&,A3&,A4 const&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3 const& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3 const&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2 const& a2,A3 const& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3 const&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2& a2,A3 const& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3 const&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2& a2,A3 const& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1&,A2&,A3 const&,A4&>(a1,a2,a3,a4);
+ }
+
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2 const& a2,A3& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2 const&,A3&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2 const& a2,A3& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1&,A2 const&,A3&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1 const& a1,A2& a2,A3& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1 const&,A2&,A3&,A4&>(a1,a2,a3,a4);
+ }
+ template<typename T,typename A1,typename A2,typename A3,typename A4>
+ inline T* heap_new(A1& a1,A2& a2,A3& a3,A4& a4)
+ {
+ return heap_new_impl<T,A1&,A2&,A3&,A4&>(a1,a2,a3,a4);
+ }
+
+#endif
+#endif
+ template<typename T>
+ inline void heap_delete(T* data)
+ {
+ data->~T();
+ free_raw_heap_memory(data);
+ }
+
+ template<typename T>
+ struct do_heap_delete
+ {
+ void operator()(T* data) const
+ {
+ detail::heap_delete(data);
+ }
+ };
+ }
+}
+
+#include <boost/config/abi_suffix.hpp>
+
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/win32/thread_primitives.hpp b/src/third_party/boost-1.69.0/boost/thread/win32/thread_primitives.hpp
new file mode 100644
index 00000000000..e0751401d85
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/win32/thread_primitives.hpp
@@ -0,0 +1,426 @@
+#ifndef BOOST_WIN32_THREAD_PRIMITIVES_HPP
+#define BOOST_WIN32_THREAD_PRIMITIVES_HPP
+
+// win32_thread_primitives.hpp
+//
+// (C) Copyright 2005-7 Anthony Williams
+// (C) Copyright 2007 David Deakins
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+#include <boost/predef/platform.h>
+#include <boost/throw_exception.hpp>
+#include <boost/assert.hpp>
+#include <boost/thread/exceptions.hpp>
+#include <boost/detail/interlocked.hpp>
+
+#include <boost/winapi/config.hpp>
+#include <boost/winapi/basic_types.hpp>
+#include <boost/winapi/semaphore.hpp>
+#include <boost/winapi/system.hpp>
+#include <boost/winapi/event.hpp>
+#include <boost/winapi/thread.hpp>
+#include <boost/winapi/get_current_thread.hpp>
+#include <boost/winapi/get_current_thread_id.hpp>
+#include <boost/winapi/get_current_process.hpp>
+#include <boost/winapi/get_current_process_id.hpp>
+#include <boost/winapi/wait.hpp>
+#include <boost/winapi/handles.hpp>
+#include <boost/winapi/access_rights.hpp>
+
+//#include <boost/winapi/synchronization.hpp>
+#include <boost/thread/win32/interlocked_read.hpp>
+#include <algorithm>
+
+#if BOOST_PLAT_WINDOWS_RUNTIME
+#include <thread>
+#endif
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+ typedef ::boost::winapi::HANDLE_ handle;
+ typedef ::boost::winapi::SYSTEM_INFO_ system_info;
+ typedef ::boost::winapi::ULONGLONG_ ticks_type;
+ unsigned const infinite=::boost::winapi::INFINITE_;
+ unsigned const timeout=::boost::winapi::WAIT_TIMEOUT_;
+ handle const invalid_handle_value=::boost::winapi::INVALID_HANDLE_VALUE_;
+ unsigned const event_modify_state=::boost::winapi::EVENT_MODIFY_STATE_;
+ unsigned const synchronize=::boost::winapi::SYNCHRONIZE_;
+ unsigned const wait_abandoned=::boost::winapi::WAIT_ABANDONED_;
+ unsigned const create_event_initial_set = 0x00000002;
+ unsigned const create_event_manual_reset = 0x00000001;
+ unsigned const event_all_access = ::boost::winapi::EVENT_ALL_ACCESS_;
+ unsigned const semaphore_all_access = boost::winapi::SEMAPHORE_ALL_ACCESS_;
+ }
+ }
+}
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+ namespace detail { typedef ticks_type (BOOST_WINAPI_WINAPI_CC *gettickcount64_t)(); }
+ extern BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64;
+
+ enum event_type
+ {
+ auto_reset_event=false,
+ manual_reset_event=true
+ };
+
+ enum initial_event_state
+ {
+ event_initially_reset=false,
+ event_initially_set=true
+ };
+
+ inline handle create_event(
+#if !defined(BOOST_NO_ANSI_APIS)
+ const char *mutex_name,
+#else
+ const wchar_t *mutex_name,
+#endif
+ event_type type,
+ initial_event_state state)
+ {
+#if !defined(BOOST_NO_ANSI_APIS)
+ handle const res = ::boost::winapi::CreateEventA(0, type, state, mutex_name);
+#elif BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA
+ handle const res = ::boost::winapi::CreateEventW(0, type, state, mutex_name);
+#else
+ handle const res = ::boost::winapi::CreateEventExW(
+ 0,
+ mutex_name,
+ type ? create_event_manual_reset : 0 | state ? create_event_initial_set : 0,
+ event_all_access);
+#endif
+ return res;
+ }
+
+ inline handle create_anonymous_event(event_type type,initial_event_state state)
+ {
+ handle const res = create_event(0, type, state);
+ if(!res)
+ {
+ boost::throw_exception(thread_resource_error());
+ }
+ return res;
+ }
+
+ inline handle create_anonymous_semaphore_nothrow(long initial_count,long max_count)
+ {
+#if !defined(BOOST_NO_ANSI_APIS)
+ handle const res=::boost::winapi::CreateSemaphoreA(0,initial_count,max_count,0);
+#else
+#if BOOST_USE_WINAPI_VERSION < BOOST_WINAPI_VERSION_VISTA
+ handle const res=::boost::winapi::CreateSemaphoreEx(0,initial_count,max_count,0,0);
+#else
+ handle const res=::boost::winapi::CreateSemaphoreExW(0,initial_count,max_count,0,0,semaphore_all_access);
+#endif
+#endif
+ return res;
+ }
+
+ inline handle create_anonymous_semaphore(long initial_count,long max_count)
+ {
+ handle const res=create_anonymous_semaphore_nothrow(initial_count,max_count);
+ if(!res)
+ {
+ boost::throw_exception(thread_resource_error());
+ }
+ return res;
+ }
+
+ inline handle duplicate_handle(handle source)
+ {
+ handle const current_process=::boost::winapi::GetCurrentProcess();
+ long const same_access_flag=2;
+ handle new_handle=0;
+ bool const success=::boost::winapi::DuplicateHandle(current_process,source,current_process,&new_handle,0,false,same_access_flag)!=0;
+ if(!success)
+ {
+ boost::throw_exception(thread_resource_error());
+ }
+ return new_handle;
+ }
+
+ inline void release_semaphore(handle semaphore,long count)
+ {
+ BOOST_VERIFY(::boost::winapi::ReleaseSemaphore(semaphore,count,0)!=0);
+ }
+
+ inline void get_system_info(system_info *info)
+ {
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ ::boost::winapi::GetNativeSystemInfo(info);
+#else
+ ::boost::winapi::GetSystemInfo(info);
+#endif
+ }
+
+ inline void sleep(unsigned long milliseconds)
+ {
+ if(milliseconds == 0)
+ {
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ std::this_thread::yield();
+#else
+ ::boost::winapi::Sleep(0);
+#endif
+ }
+ else
+ {
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ ::boost::winapi::WaitForSingleObjectEx(::boost::winapi::GetCurrentThread(), milliseconds, 0);
+#else
+ ::boost::winapi::Sleep(milliseconds);
+#endif
+ }
+ }
+
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ class BOOST_THREAD_DECL scoped_winrt_thread
+ {
+ public:
+ scoped_winrt_thread() : m_completionHandle(invalid_handle_value)
+ {}
+
+ ~scoped_winrt_thread()
+ {
+ if (m_completionHandle != ::boost::detail::win32::invalid_handle_value)
+ {
+ ::boost::winapi::CloseHandle(m_completionHandle);
+ }
+ }
+
+ typedef unsigned(__stdcall * thread_func)(void *);
+ bool start(thread_func address, void *parameter, unsigned int *thrdId);
+
+ handle waitable_handle() const
+ {
+ BOOST_ASSERT(m_completionHandle != ::boost::detail::win32::invalid_handle_value);
+ return m_completionHandle;
+ }
+
+ private:
+ handle m_completionHandle;
+ };
+#endif
+ class BOOST_THREAD_DECL handle_manager
+ {
+ private:
+ handle handle_to_manage;
+ handle_manager(handle_manager&);
+ handle_manager& operator=(handle_manager&);
+
+ void cleanup()
+ {
+ if(handle_to_manage && handle_to_manage!=invalid_handle_value)
+ {
+ BOOST_VERIFY(::boost::winapi::CloseHandle(handle_to_manage));
+ }
+ }
+
+ public:
+ explicit handle_manager(handle handle_to_manage_):
+ handle_to_manage(handle_to_manage_)
+ {}
+ handle_manager():
+ handle_to_manage(0)
+ {}
+
+ handle_manager& operator=(handle new_handle)
+ {
+ cleanup();
+ handle_to_manage=new_handle;
+ return *this;
+ }
+
+ operator handle() const
+ {
+ return handle_to_manage;
+ }
+
+ handle duplicate() const
+ {
+ return duplicate_handle(handle_to_manage);
+ }
+
+ void swap(handle_manager& other)
+ {
+ std::swap(handle_to_manage,other.handle_to_manage);
+ }
+
+ handle release()
+ {
+ handle const res=handle_to_manage;
+ handle_to_manage=0;
+ return res;
+ }
+
+ bool operator!() const
+ {
+ return !handle_to_manage;
+ }
+
+ ~handle_manager()
+ {
+ cleanup();
+ }
+ };
+ }
+ }
+}
+
+#if defined(BOOST_MSVC) && (_MSC_VER>=1400) && !defined(UNDER_CE)
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+#if _MSC_VER==1400
+ extern "C" unsigned char _interlockedbittestandset(long *a,long b);
+ extern "C" unsigned char _interlockedbittestandreset(long *a,long b);
+#else
+ extern "C" unsigned char _interlockedbittestandset(volatile long *a,long b);
+ extern "C" unsigned char _interlockedbittestandreset(volatile long *a,long b);
+#endif
+
+#pragma intrinsic(_interlockedbittestandset)
+#pragma intrinsic(_interlockedbittestandreset)
+
+ inline bool interlocked_bit_test_and_set(long* x,long bit)
+ {
+ return _interlockedbittestandset(x,bit)!=0;
+ }
+
+ inline bool interlocked_bit_test_and_reset(long* x,long bit)
+ {
+ return _interlockedbittestandreset(x,bit)!=0;
+ }
+
+ }
+ }
+}
+#define BOOST_THREAD_BTS_DEFINED
+#elif (defined(BOOST_MSVC) || defined(BOOST_INTEL_WIN)) && defined(_M_IX86)
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+ inline bool interlocked_bit_test_and_set(long* x,long bit)
+ {
+#ifndef BOOST_INTEL_CXX_VERSION
+ __asm {
+ mov eax,bit;
+ mov edx,x;
+ lock bts [edx],eax;
+ setc al;
+ };
+#else
+ bool ret;
+ __asm {
+ mov eax,bit
+ mov edx,x
+ lock bts [edx],eax
+ setc al
+ mov ret, al
+ };
+ return ret;
+
+#endif
+ }
+
+ inline bool interlocked_bit_test_and_reset(long* x,long bit)
+ {
+#ifndef BOOST_INTEL_CXX_VERSION
+ __asm {
+ mov eax,bit;
+ mov edx,x;
+ lock btr [edx],eax;
+ setc al;
+ };
+#else
+ bool ret;
+ __asm {
+ mov eax,bit
+ mov edx,x
+ lock btr [edx],eax
+ setc al
+ mov ret, al
+ };
+ return ret;
+
+#endif
+ }
+
+ }
+ }
+}
+#define BOOST_THREAD_BTS_DEFINED
+#endif
+
+#ifndef BOOST_THREAD_BTS_DEFINED
+
+namespace boost
+{
+ namespace detail
+ {
+ namespace win32
+ {
+ inline bool interlocked_bit_test_and_set(long* x,long bit)
+ {
+ long const value=1<<bit;
+ long old=*x;
+ do
+ {
+ long const current=BOOST_INTERLOCKED_COMPARE_EXCHANGE(x,old|value,old);
+ if(current==old)
+ {
+ break;
+ }
+ old=current;
+ }
+ while(true) ;
+ return (old&value)!=0;
+ }
+
+ inline bool interlocked_bit_test_and_reset(long* x,long bit)
+ {
+ long const value=1<<bit;
+ long old=*x;
+ do
+ {
+ long const current=BOOST_INTERLOCKED_COMPARE_EXCHANGE(x,old&~value,old);
+ if(current==old)
+ {
+ break;
+ }
+ old=current;
+ }
+ while(true) ;
+ return (old&value)!=0;
+ }
+ }
+ }
+}
+#endif
+
+#include <boost/config/abi_suffix.hpp>
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/thread/xtime.hpp b/src/third_party/boost-1.69.0/boost/thread/xtime.hpp
new file mode 100644
index 00000000000..d04a0d9a379
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/thread/xtime.hpp
@@ -0,0 +1,93 @@
+// Copyright (C) 2001-2003
+// William E. Kempf
+// Copyright (C) 2007-8 Anthony Williams
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_XTIME_WEK070601_HPP
+#define BOOST_XTIME_WEK070601_HPP
+
+#include <boost/thread/detail/config.hpp>
+#if defined BOOST_THREAD_USES_DATETIME
+
+#include <boost/cstdint.hpp>
+#include <boost/thread/thread_time.hpp>
+#include <boost/date_time/posix_time/conversion.hpp>
+
+#include <boost/config/abi_prefix.hpp>
+
+namespace boost {
+
+enum xtime_clock_types
+{
+ TIME_UTC_=1
+// TIME_TAI,
+// TIME_MONOTONIC,
+// TIME_PROCESS,
+// TIME_THREAD,
+// TIME_LOCAL,
+// TIME_SYNC,
+// TIME_RESOLUTION
+};
+
+struct xtime
+{
+#if defined(BOOST_NO_INT64_T)
+ typedef int_fast32_t xtime_sec_t; //INT_FAST32_MIN <= sec <= INT_FAST32_MAX
+#else
+ typedef int_fast64_t xtime_sec_t; //INT_FAST64_MIN <= sec <= INT_FAST64_MAX
+#endif
+
+ typedef int_fast32_t xtime_nsec_t; //0 <= xtime.nsec < NANOSECONDS_PER_SECOND
+
+ xtime_sec_t sec;
+ xtime_nsec_t nsec;
+
+ operator system_time() const
+ {
+ return boost::posix_time::from_time_t(0)+
+ boost::posix_time::seconds(static_cast<long>(sec))+
+#ifdef BOOST_DATE_TIME_HAS_NANOSECONDS
+ boost::posix_time::nanoseconds(nsec);
+#else
+ boost::posix_time::microseconds((nsec+500)/1000);
+#endif
+ }
+
+};
+
+inline ::boost::xtime get_xtime(boost::system_time const& abs_time)
+{
+ ::boost::xtime res;
+ boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0);
+
+ res.sec=static_cast< ::boost::xtime::xtime_sec_t>(time_since_epoch.total_seconds());
+ res.nsec=static_cast< ::boost::xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
+ return res;
+}
+
+inline int xtime_get(struct ::boost::xtime* xtp, int clock_type)
+{
+ if (clock_type == TIME_UTC_)
+ {
+ *xtp=get_xtime(get_system_time());
+ return clock_type;
+ }
+ return 0;
+}
+
+
+inline int xtime_cmp(const ::boost::xtime& xt1, const ::boost::xtime& xt2)
+{
+ if (xt1.sec == xt2.sec)
+ return (int)(xt1.nsec - xt2.nsec);
+ else
+ return (xt1.sec > xt2.sec) ? 1 : -1;
+}
+
+} // namespace boost
+
+#include <boost/config/abi_suffix.hpp>
+#endif
+#endif //BOOST_XTIME_WEK070601_HPP
diff --git a/src/third_party/boost-1.69.0/boost/throw_exception.hpp b/src/third_party/boost-1.69.0/boost/throw_exception.hpp
new file mode 100644
index 00000000000..c6623e19650
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/throw_exception.hpp
@@ -0,0 +1,103 @@
+#ifndef UUID_AA15E74A856F11E08B8D93F24824019B
+#define UUID_AA15E74A856F11E08B8D93F24824019B
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// boost/throw_exception.hpp
+//
+// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
+// Copyright (c) 2008-2009 Emil Dotchevski and Reverge Studios, Inc.
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// http://www.boost.org/libs/utility/throw_exception.html
+//
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <exception>
+
+#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x593) )
+# define BOOST_EXCEPTION_DISABLE
+#endif
+
+#if !defined( BOOST_EXCEPTION_DISABLE ) && defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, < 1310 )
+# define BOOST_EXCEPTION_DISABLE
+#endif
+
+#if !defined( BOOST_EXCEPTION_DISABLE )
+# include <boost/exception/exception.hpp>
+#if !defined(BOOST_THROW_EXCEPTION_CURRENT_FUNCTION)
+# include <boost/current_function.hpp>
+# define BOOST_THROW_EXCEPTION_CURRENT_FUNCTION BOOST_CURRENT_FUNCTION
+#endif
+# define BOOST_THROW_EXCEPTION(x) ::boost::exception_detail::throw_exception_(x,BOOST_THROW_EXCEPTION_CURRENT_FUNCTION,__FILE__,__LINE__)
+#else
+# define BOOST_THROW_EXCEPTION(x) ::boost::throw_exception(x)
+#endif
+
+#if defined(__GNUC__) && (__GNUC__*100+__GNUC_MINOR__>301) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma GCC system_header
+#endif
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(push,1)
+#endif
+
+namespace boost
+{
+#ifdef BOOST_NO_EXCEPTIONS
+
+void throw_exception( std::exception const & e ); // user defined
+
+#else
+
+inline void throw_exception_assert_compatibility( std::exception const & ) { }
+
+template<class E> BOOST_NORETURN inline void throw_exception( E const & e )
+{
+ //All boost exceptions are required to derive from std::exception,
+ //to ensure compatibility with BOOST_NO_EXCEPTIONS.
+ throw_exception_assert_compatibility(e);
+
+#ifndef BOOST_EXCEPTION_DISABLE
+ throw exception_detail::enable_both( e );
+#else
+ throw e;
+#endif
+}
+
+#endif
+
+#if !defined( BOOST_EXCEPTION_DISABLE )
+ namespace
+ exception_detail
+ {
+ template <class E>
+ BOOST_NORETURN
+ void
+ throw_exception_( E const & x, char const * current_function, char const * file, int line )
+ {
+ boost::throw_exception(
+ set_info(
+ set_info(
+ set_info(
+ enable_error_info(x),
+ throw_function(current_function)),
+ throw_file(file)),
+ throw_line(line)));
+ }
+ }
+#endif
+} // namespace boost
+
+#if defined(_MSC_VER) && !defined(BOOST_EXCEPTION_ENABLE_WARNINGS)
+#pragma warning(pop)
+#endif
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/timer.hpp b/src/third_party/boost-1.69.0/boost/timer.hpp
index 1e3571e4177..1e3571e4177 100644
--- a/src/third_party/boost-1.68.0/boost/timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/timer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/timer/config.hpp b/src/third_party/boost-1.69.0/boost/timer/config.hpp
index 0c2174c3064..0c2174c3064 100644
--- a/src/third_party/boost-1.68.0/boost/timer/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/timer/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/timer/timer.hpp b/src/third_party/boost-1.69.0/boost/timer/timer.hpp
index 3c6492086d4..3c6492086d4 100644
--- a/src/third_party/boost-1.68.0/boost/timer/timer.hpp
+++ b/src/third_party/boost-1.69.0/boost/timer/timer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/token_functions.hpp b/src/third_party/boost-1.69.0/boost/token_functions.hpp
new file mode 100644
index 00000000000..e6b8bef5916
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/token_functions.hpp
@@ -0,0 +1,653 @@
+// Boost token_functions.hpp ------------------------------------------------//
+
+// Copyright John R. Bandela 2001.
+
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/tokenizer/ for documentation.
+
+// Revision History:
+// 01 Oct 2004 Joaquin M Lopez Munoz
+// Workaround for a problem with string::assign in msvc-stlport
+// 06 Apr 2004 John Bandela
+// Fixed a bug involving using char_delimiter with a true input iterator
+// 28 Nov 2003 Robert Zeh and John Bandela
+// Converted into "fast" functions that avoid using += when
+// the supplied iterator isn't an input_iterator; based on
+// some work done at Archelon and a version that was checked into
+// the boost CVS for a short period of time.
+// 20 Feb 2002 John Maddock
+// Removed using namespace std declarations and added
+// workaround for BOOST_NO_STDC_NAMESPACE (the library
+// can be safely mixed with regex).
+// 06 Feb 2002 Jeremy Siek
+// Added char_separator.
+// 02 Feb 2002 Jeremy Siek
+// Removed tabs and a little cleanup.
+
+
+#ifndef BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_
+#define BOOST_TOKEN_FUNCTIONS_JRB120303_HPP_
+
+#include <vector>
+#include <stdexcept>
+#include <string>
+#include <cctype>
+#include <algorithm> // for find_if
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/mpl/if.hpp>
+#include <boost/throw_exception.hpp>
+#if !defined(BOOST_NO_CWCTYPE)
+#include <cwctype>
+#endif
+
+//
+// the following must not be macros if we are to prefix them
+// with std:: (they shouldn't be macros anyway...)
+//
+#ifdef ispunct
+# undef ispunct
+#endif
+#ifdef iswpunct
+# undef iswpunct
+#endif
+#ifdef isspace
+# undef isspace
+#endif
+#ifdef iswspace
+# undef iswspace
+#endif
+//
+// fix namespace problems:
+//
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std{
+ using ::ispunct;
+ using ::isspace;
+#if !defined(BOOST_NO_CWCTYPE)
+ using ::iswpunct;
+ using ::iswspace;
+#endif
+}
+#endif
+
+namespace boost{
+ //===========================================================================
+ // The escaped_list_separator class. Which is a model of TokenizerFunction
+ // An escaped list is a super-set of what is commonly known as a comma
+ // separated value (csv) list.It is separated into fields by a comma or
+ // other character. If the delimiting character is inside quotes, then it is
+ // counted as a regular character.To allow for embedded quotes in a field,
+ // there can be escape sequences using the \ much like C.
+ // The role of the comma, the quotation mark, and the escape
+ // character (backslash \), can be assigned to other characters.
+
+ struct escaped_list_error : public std::runtime_error{
+ escaped_list_error(const std::string& what_arg):std::runtime_error(what_arg) { }
+ };
+
+
+// The out of the box GCC 2.95 on cygwin does not have a char_traits class.
+// MSVC does not like the following typename
+ template <class Char,
+ class Traits = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
+ class escaped_list_separator {
+
+ private:
+ typedef std::basic_string<Char,Traits> string_type;
+ struct char_eq {
+ Char e_;
+ char_eq(Char e):e_(e) { }
+ bool operator()(Char c) {
+ return Traits::eq(e_,c);
+ }
+ };
+ string_type escape_;
+ string_type c_;
+ string_type quote_;
+ bool last_;
+
+ bool is_escape(Char e) {
+ char_eq f(e);
+ return std::find_if(escape_.begin(),escape_.end(),f)!=escape_.end();
+ }
+ bool is_c(Char e) {
+ char_eq f(e);
+ return std::find_if(c_.begin(),c_.end(),f)!=c_.end();
+ }
+ bool is_quote(Char e) {
+ char_eq f(e);
+ return std::find_if(quote_.begin(),quote_.end(),f)!=quote_.end();
+ }
+ template <typename iterator, typename Token>
+ void do_escape(iterator& next,iterator end,Token& tok) {
+ if (++next == end)
+ BOOST_THROW_EXCEPTION(escaped_list_error(std::string("cannot end with escape")));
+ if (Traits::eq(*next,'n')) {
+ tok+='\n';
+ return;
+ }
+ else if (is_quote(*next)) {
+ tok+=*next;
+ return;
+ }
+ else if (is_c(*next)) {
+ tok+=*next;
+ return;
+ }
+ else if (is_escape(*next)) {
+ tok+=*next;
+ return;
+ }
+ else
+ BOOST_THROW_EXCEPTION(escaped_list_error(std::string("unknown escape sequence")));
+ }
+
+ public:
+
+ explicit escaped_list_separator(Char e = '\\',
+ Char c = ',',Char q = '\"')
+ : escape_(1,e), c_(1,c), quote_(1,q), last_(false) { }
+
+ escaped_list_separator(string_type e, string_type c, string_type q)
+ : escape_(e), c_(c), quote_(q), last_(false) { }
+
+ void reset() {last_=false;}
+
+ template <typename InputIterator, typename Token>
+ bool operator()(InputIterator& next,InputIterator end,Token& tok) {
+ bool bInQuote = false;
+ tok = Token();
+
+ if (next == end) {
+ if (last_) {
+ last_ = false;
+ return true;
+ }
+ else
+ return false;
+ }
+ last_ = false;
+ for (;next != end;++next) {
+ if (is_escape(*next)) {
+ do_escape(next,end,tok);
+ }
+ else if (is_c(*next)) {
+ if (!bInQuote) {
+ // If we are not in quote, then we are done
+ ++next;
+ // The last character was a c, that means there is
+ // 1 more blank field
+ last_ = true;
+ return true;
+ }
+ else tok+=*next;
+ }
+ else if (is_quote(*next)) {
+ bInQuote=!bInQuote;
+ }
+ else {
+ tok += *next;
+ }
+ }
+ return true;
+ }
+ };
+
+ //===========================================================================
+ // The classes here are used by offset_separator and char_separator to implement
+ // faster assigning of tokens using assign instead of +=
+
+ namespace tokenizer_detail {
+ //===========================================================================
+ // Tokenizer was broken for wide character separators, at least on Windows, since
+ // CRT functions isspace etc only expect values in [0, 0xFF]. Debug build asserts
+ // if higher values are passed in. The traits extension class should take care of this.
+ // Assuming that the conditional will always get optimized out in the function
+ // implementations, argument types are not a problem since both forms of character classifiers
+ // expect an int.
+
+#if !defined(BOOST_NO_CWCTYPE)
+ template<typename traits, int N>
+ struct traits_extension_details : public traits {
+ typedef typename traits::char_type char_type;
+ static bool isspace(char_type c)
+ {
+ return std::iswspace(c) != 0;
+ }
+ static bool ispunct(char_type c)
+ {
+ return std::iswpunct(c) != 0;
+ }
+ };
+
+ template<typename traits>
+ struct traits_extension_details<traits, 1> : public traits {
+ typedef typename traits::char_type char_type;
+ static bool isspace(char_type c)
+ {
+ return std::isspace(c) != 0;
+ }
+ static bool ispunct(char_type c)
+ {
+ return std::ispunct(c) != 0;
+ }
+ };
+#endif
+
+
+ // In case there is no cwctype header, we implement the checks manually.
+ // We make use of the fact that the tested categories should fit in ASCII.
+ template<typename traits>
+ struct traits_extension : public traits {
+ typedef typename traits::char_type char_type;
+ static bool isspace(char_type c)
+ {
+#if !defined(BOOST_NO_CWCTYPE)
+ return traits_extension_details<traits, sizeof(char_type)>::isspace(c);
+#else
+ return static_cast< unsigned >(c) <= 255 && std::isspace(c) != 0;
+#endif
+ }
+
+ static bool ispunct(char_type c)
+ {
+#if !defined(BOOST_NO_CWCTYPE)
+ return traits_extension_details<traits, sizeof(char_type)>::ispunct(c);
+#else
+ return static_cast< unsigned >(c) <= 255 && std::ispunct(c) != 0;
+#endif
+ }
+ };
+
+ // The assign_or_plus_equal struct contains functions that implement
+ // assign, +=, and clearing based on the iterator type. The
+ // generic case does nothing for plus_equal and clearing, while
+ // passing through the call for assign.
+ //
+ // When an input iterator is being used, the situation is reversed.
+ // The assign method does nothing, plus_equal invokes operator +=,
+ // and the clearing method sets the supplied token to the default
+ // token constructor's result.
+ //
+
+ template<class IteratorTag>
+ struct assign_or_plus_equal {
+ template<class Iterator, class Token>
+ static void assign(Iterator b, Iterator e, Token &t) {
+ t.assign(b, e);
+ }
+
+ template<class Token, class Value>
+ static void plus_equal(Token &, const Value &) { }
+
+ // If we are doing an assign, there is no need for the
+ // the clear.
+ //
+ template<class Token>
+ static void clear(Token &) { }
+ };
+
+ template <>
+ struct assign_or_plus_equal<std::input_iterator_tag> {
+ template<class Iterator, class Token>
+ static void assign(Iterator , Iterator , Token &) { }
+ template<class Token, class Value>
+ static void plus_equal(Token &t, const Value &v) {
+ t += v;
+ }
+ template<class Token>
+ static void clear(Token &t) {
+ t = Token();
+ }
+ };
+
+
+ template<class Iterator>
+ struct pointer_iterator_category{
+ typedef std::random_access_iterator_tag type;
+ };
+
+
+ template<class Iterator>
+ struct class_iterator_category{
+ typedef typename Iterator::iterator_category type;
+ };
+
+
+
+ // This portably gets the iterator_tag without partial template specialization
+ template<class Iterator>
+ struct get_iterator_category{
+ typedef typename mpl::if_<is_pointer<Iterator>,
+ pointer_iterator_category<Iterator>,
+ class_iterator_category<Iterator>
+ >::type cat;
+
+ typedef typename cat::type iterator_category;
+ };
+
+
+ } // namespace tokenizer_detail
+
+
+ //===========================================================================
+ // The offset_separator class, which is a model of TokenizerFunction.
+ // Offset breaks a string into tokens based on a range of offsets
+
+ class offset_separator {
+ private:
+
+ std::vector<int> offsets_;
+ unsigned int current_offset_;
+ bool wrap_offsets_;
+ bool return_partial_last_;
+
+ public:
+ template <typename Iter>
+ offset_separator(Iter begin, Iter end, bool wrap_offsets = true,
+ bool return_partial_last = true)
+ : offsets_(begin,end), current_offset_(0),
+ wrap_offsets_(wrap_offsets),
+ return_partial_last_(return_partial_last) { }
+
+ offset_separator()
+ : offsets_(1,1), current_offset_(),
+ wrap_offsets_(true), return_partial_last_(true) { }
+
+ void reset() {
+ current_offset_ = 0;
+ }
+
+ template <typename InputIterator, typename Token>
+ bool operator()(InputIterator& next, InputIterator end, Token& tok)
+ {
+ typedef tokenizer_detail::assign_or_plus_equal<
+ BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category<
+ InputIterator
+ >::iterator_category
+ > assigner;
+
+ BOOST_ASSERT(!offsets_.empty());
+
+ assigner::clear(tok);
+ InputIterator start(next);
+
+ if (next == end)
+ return false;
+
+ if (current_offset_ == offsets_.size())
+ {
+ if (wrap_offsets_)
+ current_offset_=0;
+ else
+ return false;
+ }
+
+ int c = offsets_[current_offset_];
+ int i = 0;
+ for (; i < c; ++i) {
+ if (next == end)break;
+ assigner::plus_equal(tok,*next++);
+ }
+ assigner::assign(start,next,tok);
+
+ if (!return_partial_last_)
+ if (i < (c-1) )
+ return false;
+
+ ++current_offset_;
+ return true;
+ }
+ };
+
+
+ //===========================================================================
+ // The char_separator class breaks a sequence of characters into
+ // tokens based on the character delimiters (very much like bad old
+ // strtok). A delimiter character can either be kept or dropped. A
+ // kept delimiter shows up as an output token, whereas a dropped
+ // delimiter does not.
+
+ // This class replaces the char_delimiters_separator class. The
+ // constructor for the char_delimiters_separator class was too
+ // confusing and needed to be deprecated. However, because of the
+ // default arguments to the constructor, adding the new constructor
+ // would cause ambiguity, so instead I deprecated the whole class.
+ // The implementation of the class was also simplified considerably.
+
+ enum empty_token_policy { drop_empty_tokens, keep_empty_tokens };
+
+ // The out of the box GCC 2.95 on cygwin does not have a char_traits class.
+ template <typename Char,
+ typename Tr = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
+ class char_separator
+ {
+ typedef tokenizer_detail::traits_extension<Tr> Traits;
+ typedef std::basic_string<Char,Tr> string_type;
+ public:
+ explicit
+ char_separator(const Char* dropped_delims,
+ const Char* kept_delims = 0,
+ empty_token_policy empty_tokens = drop_empty_tokens)
+ : m_dropped_delims(dropped_delims),
+ m_use_ispunct(false),
+ m_use_isspace(false),
+ m_empty_tokens(empty_tokens),
+ m_output_done(false)
+ {
+ // Borland workaround
+ if (kept_delims)
+ m_kept_delims = kept_delims;
+ }
+
+ // use ispunct() for kept delimiters and isspace for dropped.
+ explicit
+ char_separator()
+ : m_use_ispunct(true),
+ m_use_isspace(true),
+ m_empty_tokens(drop_empty_tokens),
+ m_output_done(false) { }
+
+ void reset() { }
+
+ template <typename InputIterator, typename Token>
+ bool operator()(InputIterator& next, InputIterator end, Token& tok)
+ {
+ typedef tokenizer_detail::assign_or_plus_equal<
+ BOOST_DEDUCED_TYPENAME tokenizer_detail::get_iterator_category<
+ InputIterator
+ >::iterator_category
+ > assigner;
+
+ assigner::clear(tok);
+
+ // skip past all dropped_delims
+ if (m_empty_tokens == drop_empty_tokens)
+ for (; next != end && is_dropped(*next); ++next)
+ { }
+
+ InputIterator start(next);
+
+ if (m_empty_tokens == drop_empty_tokens) {
+
+ if (next == end)
+ return false;
+
+
+ // if we are on a kept_delims move past it and stop
+ if (is_kept(*next)) {
+ assigner::plus_equal(tok,*next);
+ ++next;
+ } else
+ // append all the non delim characters
+ for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next)
+ assigner::plus_equal(tok,*next);
+ }
+ else { // m_empty_tokens == keep_empty_tokens
+
+ // Handle empty token at the end
+ if (next == end)
+ {
+ if (m_output_done == false)
+ {
+ m_output_done = true;
+ assigner::assign(start,next,tok);
+ return true;
+ }
+ else
+ return false;
+ }
+
+ if (is_kept(*next)) {
+ if (m_output_done == false)
+ m_output_done = true;
+ else {
+ assigner::plus_equal(tok,*next);
+ ++next;
+ m_output_done = false;
+ }
+ }
+ else if (m_output_done == false && is_dropped(*next)) {
+ m_output_done = true;
+ }
+ else {
+ if (is_dropped(*next))
+ start=++next;
+ for (; next != end && !is_dropped(*next) && !is_kept(*next); ++next)
+ assigner::plus_equal(tok,*next);
+ m_output_done = true;
+ }
+ }
+ assigner::assign(start,next,tok);
+ return true;
+ }
+
+ private:
+ string_type m_kept_delims;
+ string_type m_dropped_delims;
+ bool m_use_ispunct;
+ bool m_use_isspace;
+ empty_token_policy m_empty_tokens;
+ bool m_output_done;
+
+ bool is_kept(Char E) const
+ {
+ if (m_kept_delims.length())
+ return m_kept_delims.find(E) != string_type::npos;
+ else if (m_use_ispunct) {
+ return Traits::ispunct(E) != 0;
+ } else
+ return false;
+ }
+ bool is_dropped(Char E) const
+ {
+ if (m_dropped_delims.length())
+ return m_dropped_delims.find(E) != string_type::npos;
+ else if (m_use_isspace) {
+ return Traits::isspace(E) != 0;
+ } else
+ return false;
+ }
+ };
+
+ //===========================================================================
+ // The following class is DEPRECATED, use class char_separators instead.
+ //
+ // The char_delimiters_separator class, which is a model of
+ // TokenizerFunction. char_delimiters_separator breaks a string
+ // into tokens based on character delimiters. There are 2 types of
+ // delimiters. returnable delimiters can be returned as
+ // tokens. These are often punctuation. nonreturnable delimiters
+ // cannot be returned as tokens. These are often whitespace
+
+ // The out of the box GCC 2.95 on cygwin does not have a char_traits class.
+ template <class Char,
+ class Tr = BOOST_DEDUCED_TYPENAME std::basic_string<Char>::traits_type >
+ class char_delimiters_separator {
+ private:
+
+ typedef tokenizer_detail::traits_extension<Tr> Traits;
+ typedef std::basic_string<Char,Tr> string_type;
+ string_type returnable_;
+ string_type nonreturnable_;
+ bool return_delims_;
+ bool no_ispunct_;
+ bool no_isspace_;
+
+ bool is_ret(Char E)const
+ {
+ if (returnable_.length())
+ return returnable_.find(E) != string_type::npos;
+ else{
+ if (no_ispunct_) {return false;}
+ else{
+ int r = Traits::ispunct(E);
+ return r != 0;
+ }
+ }
+ }
+ bool is_nonret(Char E)const
+ {
+ if (nonreturnable_.length())
+ return nonreturnable_.find(E) != string_type::npos;
+ else{
+ if (no_isspace_) {return false;}
+ else{
+ int r = Traits::isspace(E);
+ return r != 0;
+ }
+ }
+ }
+
+ public:
+ explicit char_delimiters_separator(bool return_delims = false,
+ const Char* returnable = 0,
+ const Char* nonreturnable = 0)
+ : returnable_(returnable ? returnable : string_type().c_str()),
+ nonreturnable_(nonreturnable ? nonreturnable:string_type().c_str()),
+ return_delims_(return_delims), no_ispunct_(returnable!=0),
+ no_isspace_(nonreturnable!=0) { }
+
+ void reset() { }
+
+ public:
+
+ template <typename InputIterator, typename Token>
+ bool operator()(InputIterator& next, InputIterator end,Token& tok) {
+ tok = Token();
+
+ // skip past all nonreturnable delims
+ // skip past the returnable only if we are not returning delims
+ for (;next!=end && ( is_nonret(*next) || (is_ret(*next)
+ && !return_delims_ ) );++next) { }
+
+ if (next == end) {
+ return false;
+ }
+
+ // if we are to return delims and we are one a returnable one
+ // move past it and stop
+ if (is_ret(*next) && return_delims_) {
+ tok+=*next;
+ ++next;
+ }
+ else
+ // append all the non delim characters
+ for (;next!=end && !is_nonret(*next) && !is_ret(*next);++next)
+ tok+=*next;
+
+
+ return true;
+ }
+ };
+
+
+} //namespace boost
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/token_iterator.hpp b/src/third_party/boost-1.69.0/boost/token_iterator.hpp
index 42945d7ee97..42945d7ee97 100644
--- a/src/third_party/boost-1.68.0/boost/token_iterator.hpp
+++ b/src/third_party/boost-1.69.0/boost/token_iterator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/tokenizer.hpp b/src/third_party/boost-1.69.0/boost/tokenizer.hpp
index 081e5ba2f7c..081e5ba2f7c 100644
--- a/src/third_party/boost-1.68.0/boost/tokenizer.hpp
+++ b/src/third_party/boost-1.69.0/boost/tokenizer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/tuple/detail/tuple_basic.hpp b/src/third_party/boost-1.69.0/boost/tuple/detail/tuple_basic.hpp
index 879f0e90a98..879f0e90a98 100644
--- a/src/third_party/boost-1.68.0/boost/tuple/detail/tuple_basic.hpp
+++ b/src/third_party/boost-1.69.0/boost/tuple/detail/tuple_basic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/tuple/tuple.hpp b/src/third_party/boost-1.69.0/boost/tuple/tuple.hpp
index d71e7df0afe..d71e7df0afe 100644
--- a/src/third_party/boost-1.68.0/boost/tuple/tuple.hpp
+++ b/src/third_party/boost-1.69.0/boost/tuple/tuple.hpp
diff --git a/src/third_party/boost-1.68.0/boost/tuple/tuple_comparison.hpp b/src/third_party/boost-1.69.0/boost/tuple/tuple_comparison.hpp
index 0a61952a789..0a61952a789 100644
--- a/src/third_party/boost-1.68.0/boost/tuple/tuple_comparison.hpp
+++ b/src/third_party/boost-1.69.0/boost/tuple/tuple_comparison.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type.hpp b/src/third_party/boost-1.69.0/boost/type.hpp
index ab81c916d77..ab81c916d77 100644
--- a/src/third_party/boost-1.68.0/boost/type.hpp
+++ b/src/third_party/boost-1.69.0/boost/type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_index.hpp b/src/third_party/boost-1.69.0/boost/type_index.hpp
index 5311ac87956..5311ac87956 100644
--- a/src/third_party/boost-1.68.0/boost/type_index.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_index.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_index/ctti_type_index.hpp b/src/third_party/boost-1.69.0/boost/type_index/ctti_type_index.hpp
index a59b2d80a7f..a59b2d80a7f 100644
--- a/src/third_party/boost-1.68.0/boost/type_index/ctti_type_index.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_index/ctti_type_index.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_index/detail/compile_time_type_info.hpp b/src/third_party/boost-1.69.0/boost/type_index/detail/compile_time_type_info.hpp
index 7a55350b9e0..7a55350b9e0 100644
--- a/src/third_party/boost-1.68.0/boost/type_index/detail/compile_time_type_info.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_index/detail/compile_time_type_info.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_index/detail/ctti_register_class.hpp b/src/third_party/boost-1.69.0/boost/type_index/detail/ctti_register_class.hpp
index a8cef2c4972..a8cef2c4972 100644
--- a/src/third_party/boost-1.68.0/boost/type_index/detail/ctti_register_class.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_index/detail/ctti_register_class.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_index/detail/stl_register_class.hpp b/src/third_party/boost-1.69.0/boost/type_index/detail/stl_register_class.hpp
index 95a26f7b0ee..95a26f7b0ee 100644
--- a/src/third_party/boost-1.68.0/boost/type_index/detail/stl_register_class.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_index/detail/stl_register_class.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_index/stl_type_index.hpp b/src/third_party/boost-1.69.0/boost/type_index/stl_type_index.hpp
new file mode 100644
index 00000000000..cef22ac4ced
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_index/stl_type_index.hpp
@@ -0,0 +1,278 @@
+//
+// Copyright (c) Antony Polukhin, 2013-2018.
+//
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+
+#ifndef BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
+#define BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
+
+/// \file stl_type_index.hpp
+/// \brief Contains boost::typeindex::stl_type_index class.
+///
+/// boost::typeindex::stl_type_index class can be used as a drop-in replacement
+/// for std::type_index.
+///
+/// It is used in situations when RTTI is enabled or typeid() method is available.
+/// When typeid() is disabled or BOOST_TYPE_INDEX_FORCE_NO_RTTI_COMPATIBILITY macro
+/// is defined boost::typeindex::ctti is usually used instead of boost::typeindex::stl_type_index.
+
+#include <boost/type_index/type_index_facade.hpp>
+
+// MSVC is capable of calling typeid(T) even when RTTI is off
+#if defined(BOOST_NO_RTTI) && !defined(BOOST_MSVC)
+#error "File boost/type_index/stl_type_index.ipp is not usable when typeid() is not available."
+#endif
+
+#include <typeinfo>
+#include <cstring> // std::strcmp, std::strlen, std::strstr
+#include <stdexcept>
+#include <boost/static_assert.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/core/demangle.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+#if (defined(_MSC_VER) && _MSC_VER > 1600) \
+ || (defined(__GNUC__) && __GNUC__ == 4 && __GNUC_MINOR__ > 5 && defined(__GXX_EXPERIMENTAL_CXX0X__)) \
+ || (defined(__GNUC__) && __GNUC__ > 4 && __cplusplus >= 201103)
+# define BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE
+#else
+# include <boost/container_hash/hash.hpp>
+#endif
+
+#if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
+ || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
+# include <boost/type_traits/is_signed.hpp>
+# include <boost/type_traits/make_signed.hpp>
+# include <boost/type_traits/type_identity.hpp>
+#endif
+
+#ifdef BOOST_HAS_PRAGMA_ONCE
+# pragma once
+#endif
+
+namespace boost { namespace typeindex {
+
+/// \class stl_type_index
+/// This class is a wrapper around std::type_info, that workarounds issues and provides
+/// much more rich interface. \b For \b description \b of \b functions \b see type_index_facade.
+///
+/// This class requires typeid() to work. For cases when RTTI is disabled see ctti_type_index.
+class stl_type_index
+ : public type_index_facade<
+ stl_type_index,
+ #ifdef BOOST_NO_STD_TYPEINFO
+ type_info
+ #else
+ std::type_info
+ #endif
+ >
+{
+public:
+#ifdef BOOST_NO_STD_TYPEINFO
+ typedef type_info type_info_t;
+#else
+ typedef std::type_info type_info_t;
+#endif
+
+private:
+ const type_info_t* data_;
+
+public:
+ inline stl_type_index() BOOST_NOEXCEPT
+ : data_(&typeid(void))
+ {}
+
+ inline stl_type_index(const type_info_t& data) BOOST_NOEXCEPT
+ : data_(&data)
+ {}
+
+ inline const type_info_t& type_info() const BOOST_NOEXCEPT;
+
+ inline const char* raw_name() const BOOST_NOEXCEPT;
+ inline const char* name() const BOOST_NOEXCEPT;
+ inline std::string pretty_name() const;
+
+ inline std::size_t hash_code() const BOOST_NOEXCEPT;
+ inline bool equal(const stl_type_index& rhs) const BOOST_NOEXCEPT;
+ inline bool before(const stl_type_index& rhs) const BOOST_NOEXCEPT;
+
+ template <class T>
+ inline static stl_type_index type_id() BOOST_NOEXCEPT;
+
+ template <class T>
+ inline static stl_type_index type_id_with_cvr() BOOST_NOEXCEPT;
+
+ template <class T>
+ inline static stl_type_index type_id_runtime(const T& value) BOOST_NOEXCEPT;
+};
+
+inline const stl_type_index::type_info_t& stl_type_index::type_info() const BOOST_NOEXCEPT {
+ return *data_;
+}
+
+
+inline const char* stl_type_index::raw_name() const BOOST_NOEXCEPT {
+#ifdef _MSC_VER
+ return data_->raw_name();
+#else
+ return data_->name();
+#endif
+}
+
+inline const char* stl_type_index::name() const BOOST_NOEXCEPT {
+ return data_->name();
+}
+
+inline std::string stl_type_index::pretty_name() const {
+ static const char cvr_saver_name[] = "boost::typeindex::detail::cvr_saver<";
+ static BOOST_CONSTEXPR_OR_CONST std::string::size_type cvr_saver_name_len = sizeof(cvr_saver_name) - 1;
+
+ // In case of MSVC demangle() is a no-op, and name() already returns demangled name.
+ // In case of GCC and Clang (on non-Windows systems) name() returns mangled name and demangle() undecorates it.
+ const boost::core::scoped_demangled_name demangled_name(data_->name());
+
+ const char* begin = demangled_name.get();
+ if (!begin) {
+ boost::throw_exception(std::runtime_error("Type name demangling failed"));
+ }
+
+ const std::string::size_type len = std::strlen(begin);
+ const char* end = begin + len;
+
+ if (len > cvr_saver_name_len) {
+ const char* b = std::strstr(begin, cvr_saver_name);
+ if (b) {
+ b += cvr_saver_name_len;
+
+ // Trim leading spaces
+ while (*b == ' ') { // the string is zero terminated, we won't exceed the buffer size
+ ++ b;
+ }
+
+ // Skip the closing angle bracket
+ const char* e = end - 1;
+ while (e > b && *e != '>') {
+ -- e;
+ }
+
+ // Trim trailing spaces
+ while (e > b && *(e - 1) == ' ') {
+ -- e;
+ }
+
+ if (b < e) {
+ // Parsing seems to have succeeded, the type name is not empty
+ begin = b;
+ end = e;
+ }
+ }
+ }
+
+ return std::string(begin, end);
+}
+
+
+inline std::size_t stl_type_index::hash_code() const BOOST_NOEXCEPT {
+#ifdef BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE
+ return data_->hash_code();
+#else
+ return boost::hash_range(raw_name(), raw_name() + std::strlen(raw_name()));
+#endif
+}
+
+
+/// @cond
+
+// for this compiler at least, cross-shared-library type_info
+// comparisons don't work, so we are using typeid(x).name() instead.
+# if (defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5))) \
+ || defined(_AIX) \
+ || (defined(__sgi) && defined(__host_mips)) \
+ || (defined(__hpux) && defined(__HP_aCC)) \
+ || (defined(linux) && defined(__INTEL_COMPILER) && defined(__ICC))
+# define BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES
+# endif
+
+/// @endcond
+
+inline bool stl_type_index::equal(const stl_type_index& rhs) const BOOST_NOEXCEPT {
+#ifdef BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES
+ return raw_name() == rhs.raw_name() || !std::strcmp(raw_name(), rhs.raw_name());
+#else
+ return !!(*data_ == *rhs.data_);
+#endif
+}
+
+inline bool stl_type_index::before(const stl_type_index& rhs) const BOOST_NOEXCEPT {
+#ifdef BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES
+ return raw_name() != rhs.raw_name() && std::strcmp(raw_name(), rhs.raw_name()) < 0;
+#else
+ return !!data_->before(*rhs.data_);
+#endif
+}
+
+#undef BOOST_TYPE_INDEX_CLASSINFO_COMPARE_BY_NAMES
+
+
+template <class T>
+inline stl_type_index stl_type_index::type_id() BOOST_NOEXCEPT {
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type no_ref_t;
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_cv<no_ref_t>::type no_cvr_prefinal_t;
+
+ # if (defined(__EDG_VERSION__) && __EDG_VERSION__ < 245) \
+ || (defined(__sgi) && defined(_COMPILER_VERSION) && _COMPILER_VERSION <= 744)
+
+ // Old EDG-based compilers seem to mistakenly distinguish 'integral' from 'signed integral'
+ // in typeid() expressions. Full template specialization for 'integral' fixes that issue:
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::is_signed<no_cvr_prefinal_t>::value,
+ boost::make_signed<no_cvr_prefinal_t>,
+ boost::type_identity<no_cvr_prefinal_t>
+ >::type no_cvr_prefinal_lazy_t;
+
+ typedef BOOST_DEDUCED_TYPENAME no_cvr_prefinal_t::type no_cvr_t;
+ #else
+ typedef no_cvr_prefinal_t no_cvr_t;
+ #endif
+
+ return typeid(no_cvr_t);
+}
+
+namespace detail {
+ template <class T> class cvr_saver{};
+}
+
+template <class T>
+inline stl_type_index stl_type_index::type_id_with_cvr() BOOST_NOEXCEPT {
+ typedef BOOST_DEDUCED_TYPENAME boost::conditional<
+ boost::is_reference<T>::value || boost::is_const<T>::value || boost::is_volatile<T>::value,
+ detail::cvr_saver<T>,
+ T
+ >::type type;
+
+ return typeid(type);
+}
+
+
+template <class T>
+inline stl_type_index stl_type_index::type_id_runtime(const T& value) BOOST_NOEXCEPT {
+#ifdef BOOST_NO_RTTI
+ return value.boost_type_index_type_id_runtime_();
+#else
+ return typeid(value);
+#endif
+}
+
+}} // namespace boost::typeindex
+
+#undef BOOST_TYPE_INDEX_STD_TYPE_INDEX_HAS_HASH_CODE
+
+#endif // BOOST_TYPE_INDEX_STL_TYPE_INDEX_HPP
diff --git a/src/third_party/boost-1.68.0/boost/type_index/type_index_facade.hpp b/src/third_party/boost-1.69.0/boost/type_index/type_index_facade.hpp
index e6dde8f3f98..e6dde8f3f98 100644
--- a/src/third_party/boost-1.68.0/boost/type_index/type_index_facade.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_index/type_index_facade.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits.hpp b/src/third_party/boost-1.69.0/boost/type_traits.hpp
new file mode 100644
index 00000000000..a767e4192b5
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits.hpp
@@ -0,0 +1,155 @@
+// (C) Copyright John Maddock 2000.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+// See boost/type_traits/*.hpp for full copyright notices.
+
+#ifndef BOOST_TYPE_TRAITS_HPP
+#define BOOST_TYPE_TRAITS_HPP
+
+#include <boost/type_traits/add_const.hpp>
+#include <boost/type_traits/add_cv.hpp>
+#include <boost/type_traits/add_lvalue_reference.hpp>
+#include <boost/type_traits/add_pointer.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/add_rvalue_reference.hpp>
+#include <boost/type_traits/add_volatile.hpp>
+#include <boost/type_traits/aligned_storage.hpp>
+#include <boost/type_traits/alignment_of.hpp>
+#include <boost/type_traits/common_type.hpp>
+#include <boost/type_traits/conditional.hpp>
+#include <boost/type_traits/copy_cv.hpp>
+#include <boost/type_traits/decay.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/type_traits/enable_if.hpp>
+#include <boost/type_traits/extent.hpp>
+#include <boost/type_traits/floating_point_promotion.hpp>
+#include <boost/type_traits/function_traits.hpp>
+
+#include <boost/type_traits/has_bit_and.hpp>
+#include <boost/type_traits/has_bit_and_assign.hpp>
+#include <boost/type_traits/has_bit_or.hpp>
+#include <boost/type_traits/has_bit_or_assign.hpp>
+#include <boost/type_traits/has_bit_xor.hpp>
+#include <boost/type_traits/has_bit_xor_assign.hpp>
+#include <boost/type_traits/has_complement.hpp>
+#include <boost/type_traits/has_dereference.hpp>
+#include <boost/type_traits/has_divides.hpp>
+#include <boost/type_traits/has_divides_assign.hpp>
+#include <boost/type_traits/has_equal_to.hpp>
+#include <boost/type_traits/has_greater.hpp>
+#include <boost/type_traits/has_greater_equal.hpp>
+#include <boost/type_traits/has_left_shift.hpp>
+#include <boost/type_traits/has_left_shift_assign.hpp>
+#include <boost/type_traits/has_less.hpp>
+#include <boost/type_traits/has_less_equal.hpp>
+#include <boost/type_traits/has_logical_and.hpp>
+#include <boost/type_traits/has_logical_not.hpp>
+#include <boost/type_traits/has_logical_or.hpp>
+#include <boost/type_traits/has_minus.hpp>
+#include <boost/type_traits/has_minus_assign.hpp>
+#include <boost/type_traits/has_modulus.hpp>
+#include <boost/type_traits/has_modulus_assign.hpp>
+#include <boost/type_traits/has_multiplies.hpp>
+#include <boost/type_traits/has_multiplies_assign.hpp>
+#include <boost/type_traits/has_negate.hpp>
+#if !defined(__BORLANDC__) && !defined(__CUDACC__)
+#include <boost/type_traits/has_new_operator.hpp>
+#endif
+#include <boost/type_traits/has_not_equal_to.hpp>
+#include <boost/type_traits/has_nothrow_assign.hpp>
+#include <boost/type_traits/has_nothrow_constructor.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/has_nothrow_destructor.hpp>
+#include <boost/type_traits/has_plus.hpp>
+#include <boost/type_traits/has_plus_assign.hpp>
+#include <boost/type_traits/has_post_decrement.hpp>
+#include <boost/type_traits/has_post_increment.hpp>
+#include <boost/type_traits/has_pre_decrement.hpp>
+#include <boost/type_traits/has_pre_increment.hpp>
+#include <boost/type_traits/has_right_shift.hpp>
+#include <boost/type_traits/has_right_shift_assign.hpp>
+#include <boost/type_traits/has_trivial_assign.hpp>
+#include <boost/type_traits/has_trivial_constructor.hpp>
+#include <boost/type_traits/has_trivial_copy.hpp>
+#include <boost/type_traits/has_trivial_destructor.hpp>
+#include <boost/type_traits/has_trivial_move_assign.hpp>
+#include <boost/type_traits/has_trivial_move_constructor.hpp>
+#include <boost/type_traits/has_unary_minus.hpp>
+#include <boost/type_traits/has_unary_plus.hpp>
+#include <boost/type_traits/has_virtual_destructor.hpp>
+
+#include <boost/type_traits/integral_constant.hpp>
+
+#include <boost/type_traits/is_abstract.hpp>
+#include <boost/type_traits/is_arithmetic.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_assignable.hpp>
+#include <boost/type_traits/is_base_and_derived.hpp>
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_class.hpp>
+#include <boost/type_traits/is_complex.hpp>
+#include <boost/type_traits/is_compound.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_copy_assignable.hpp>
+#include <boost/type_traits/is_copy_constructible.hpp>
+#include <boost/type_traits/is_default_constructible.hpp>
+#include <boost/type_traits/is_destructible.hpp>
+#include <boost/type_traits/is_empty.hpp>
+#include <boost/type_traits/is_enum.hpp>
+#include <boost/type_traits/is_final.hpp>
+#include <boost/type_traits/is_float.hpp>
+#include <boost/type_traits/is_floating_point.hpp>
+#include <boost/type_traits/is_function.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_list_constructible.hpp>
+#include <boost/type_traits/is_lvalue_reference.hpp>
+#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/type_traits/is_member_object_pointer.hpp>
+#include <boost/type_traits/is_member_pointer.hpp>
+#include <boost/type_traits/is_nothrow_move_assignable.hpp>
+#include <boost/type_traits/is_nothrow_move_constructible.hpp>
+#include <boost/type_traits/is_nothrow_swappable.hpp>
+#include <boost/type_traits/is_object.hpp>
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_polymorphic.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_scalar.hpp>
+#include <boost/type_traits/is_signed.hpp>
+#include <boost/type_traits/is_stateless.hpp>
+#include <boost/type_traits/is_union.hpp>
+#include <boost/type_traits/is_unsigned.hpp>
+#include <boost/type_traits/is_virtual_base_of.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/make_signed.hpp>
+#include <boost/type_traits/make_unsigned.hpp>
+#include <boost/type_traits/make_void.hpp>
+#include <boost/type_traits/rank.hpp>
+#include <boost/type_traits/remove_all_extents.hpp>
+#include <boost/type_traits/remove_bounds.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_cv_ref.hpp>
+#include <boost/type_traits/remove_extent.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+#include <boost/type_traits/remove_volatile.hpp>
+#include <boost/type_traits/type_identity.hpp>
+#include <boost/type_traits/type_with_alignment.hpp>
+
+#if !(defined(__sgi) && defined(__EDG_VERSION__) && (__EDG_VERSION__ == 238))
+#include <boost/type_traits/integral_promotion.hpp>
+#include <boost/type_traits/promote.hpp>
+#endif
+
+#endif // BOOST_TYPE_TRAITS_HPP
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/add_const.hpp b/src/third_party/boost-1.69.0/boost/type_traits/add_const.hpp
index 2d60118276c..2d60118276c 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/add_const.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/add_const.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/add_cv.hpp b/src/third_party/boost-1.69.0/boost/type_traits/add_cv.hpp
index 425d019bf6c..425d019bf6c 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/add_cv.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/add_cv.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/add_lvalue_reference.hpp b/src/third_party/boost-1.69.0/boost/type_traits/add_lvalue_reference.hpp
index 26b74e67ca3..26b74e67ca3 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/add_lvalue_reference.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/add_lvalue_reference.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/add_pointer.hpp b/src/third_party/boost-1.69.0/boost/type_traits/add_pointer.hpp
index 85ad33a8d97..85ad33a8d97 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/add_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/add_pointer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/add_reference.hpp b/src/third_party/boost-1.69.0/boost/type_traits/add_reference.hpp
index 33e9bc79bea..33e9bc79bea 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/add_reference.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/add_reference.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/add_rvalue_reference.hpp b/src/third_party/boost-1.69.0/boost/type_traits/add_rvalue_reference.hpp
index ad64894f777..ad64894f777 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/add_rvalue_reference.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/add_rvalue_reference.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/add_volatile.hpp b/src/third_party/boost-1.69.0/boost/type_traits/add_volatile.hpp
index 253751a578e..253751a578e 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/add_volatile.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/add_volatile.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/aligned_storage.hpp b/src/third_party/boost-1.69.0/boost/type_traits/aligned_storage.hpp
index 171f5d450b0..171f5d450b0 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/aligned_storage.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/aligned_storage.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/alignment_of.hpp b/src/third_party/boost-1.69.0/boost/type_traits/alignment_of.hpp
index 7d960e31840..7d960e31840 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/alignment_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/alignment_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/common_type.hpp b/src/third_party/boost-1.69.0/boost/type_traits/common_type.hpp
index 7136d3eed26..7136d3eed26 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/common_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/common_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/composite_traits.hpp b/src/third_party/boost-1.69.0/boost/type_traits/composite_traits.hpp
index 985a4c51d32..985a4c51d32 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/composite_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/composite_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/conditional.hpp b/src/third_party/boost-1.69.0/boost/type_traits/conditional.hpp
index ec31d8b0bbf..ec31d8b0bbf 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/conditional.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/conditional.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/conversion_traits.hpp b/src/third_party/boost-1.69.0/boost/type_traits/conversion_traits.hpp
index c8e5139b30d..c8e5139b30d 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/conversion_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/conversion_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/copy_cv.hpp b/src/third_party/boost-1.69.0/boost/type_traits/copy_cv.hpp
index 2f3dc37adc2..2f3dc37adc2 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/copy_cv.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/copy_cv.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/cv_traits.hpp b/src/third_party/boost-1.69.0/boost/type_traits/cv_traits.hpp
index 5bd6c4f0666..5bd6c4f0666 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/cv_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/cv_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/decay.hpp b/src/third_party/boost-1.69.0/boost/type_traits/decay.hpp
index 5b28d052fcd..5b28d052fcd 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/decay.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/decay.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/declval.hpp b/src/third_party/boost-1.69.0/boost/type_traits/declval.hpp
index a050012eb55..a050012eb55 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/declval.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/declval.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/bool_trait_undef.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/bool_trait_undef.hpp
index 4ac61ef2e72..4ac61ef2e72 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/bool_trait_undef.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/bool_trait_undef.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/common_arithmetic_type.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/common_arithmetic_type.hpp
index 1a76e16d3ff..1a76e16d3ff 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/common_arithmetic_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/common_arithmetic_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/common_type_impl.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/common_type_impl.hpp
index 53a634d4dfe..53a634d4dfe 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/common_type_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/common_type_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/composite_member_pointer_type.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/composite_member_pointer_type.hpp
index a747ee4db64..a747ee4db64 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/composite_member_pointer_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/composite_member_pointer_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/composite_pointer_type.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/composite_pointer_type.hpp
index ae21e18adee..ae21e18adee 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/composite_pointer_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/composite_pointer_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/config.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/config.hpp
new file mode 100644
index 00000000000..7c6149e50ab
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/config.hpp
@@ -0,0 +1,92 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_CONFIG_HPP_INCLUDED
+#define BOOST_TT_CONFIG_HPP_INCLUDED
+
+#ifndef BOOST_CONFIG_HPP
+#include <boost/config.hpp>
+#endif
+#include <boost/version.hpp>
+#include <boost/config/workaround.hpp>
+
+//
+// whenever we have a conversion function with ellipses
+// it needs to be declared __cdecl to suppress compiler
+// warnings from MS and Borland compilers (this *must*
+// appear before we include is_same.hpp below):
+#if defined(BOOST_MSVC) || (defined(__BORLANDC__) && !defined(BOOST_DISABLE_WIN32))
+# define BOOST_TT_DECL __cdecl
+#else
+# define BOOST_TT_DECL /**/
+#endif
+
+# if (BOOST_WORKAROUND(__MWERKS__, < 0x3000) \
+ || BOOST_WORKAROUND(__IBMCPP__, < 600 ) \
+ || BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) \
+ || defined(__ghs) \
+ || BOOST_WORKAROUND(__HP_aCC, < 60700) \
+ || BOOST_WORKAROUND(MPW_CPLUS, BOOST_TESTED_AT(0x890)) \
+ || BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x580))) \
+ && defined(BOOST_NO_IS_ABSTRACT)
+
+# define BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION 1
+
+#endif
+
+#ifndef BOOST_TT_NO_CONFORMING_IS_CLASS_IMPLEMENTATION
+# define BOOST_TT_HAS_CONFORMING_IS_CLASS_IMPLEMENTATION 1
+#endif
+
+//
+// define BOOST_TT_TEST_MS_FUNC_SIGS
+// when we want to test __stdcall etc function types with is_function etc
+// (Note, does not work with Borland, even though it does support __stdcall etc):
+//
+#if defined(_MSC_EXTENSIONS) && !defined(__BORLANDC__)
+# define BOOST_TT_TEST_MS_FUNC_SIGS
+#endif
+
+//
+// define BOOST_TT_NO_CV_FUNC_TEST
+// if tests for cv-qualified member functions don't
+// work in is_member_function_pointer
+//
+#if BOOST_WORKAROUND(__MWERKS__, < 0x3000) || BOOST_WORKAROUND(__IBMCPP__, <= 600)
+# define BOOST_TT_NO_CV_FUNC_TEST
+#endif
+
+//
+// Macros that have been deprecated, defined here for backwards compatibility:
+//
+#define BOOST_BROKEN_COMPILER_TYPE_TRAITS_SPECIALIZATION(x)
+#define BOOST_TT_BROKEN_COMPILER_SPEC(x)
+
+//
+// Can we implement "accurate" binary operator detection:
+//
+#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(BOOST_GCC, < 40900)
+# define BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
+#endif
+
+#if defined(__clang__) && (__clang_major__ == 3) && (__clang_minor__ < 2) && defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+#undef BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION
+#endif
+
+//
+// Can we implement accurate is_function/is_member_function_pointer (post C++03)?
+//
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !BOOST_WORKAROUND(BOOST_GCC, < 40900)\
+ && !BOOST_WORKAROUND(BOOST_MSVC, < 1900) && !BOOST_WORKAROUND(__clang_major__, <= 4)
+# define BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
+#endif
+
+
+#endif // BOOST_TT_CONFIG_HPP_INCLUDED
+
+
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/has_binary_operator.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/has_binary_operator.hpp
index ec6e52e73ba..ec6e52e73ba 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/has_binary_operator.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/has_binary_operator.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/has_postfix_operator.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/has_postfix_operator.hpp
new file mode 100644
index 00000000000..18124167986
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/has_postfix_operator.hpp
@@ -0,0 +1,250 @@
+// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#include <boost/config.hpp>
+#include <boost/type_traits/detail/config.hpp>
+
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/make_void.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <utility>
+
+namespace boost
+{
+
+ namespace binary_op_detail {
+
+ struct dont_care;
+
+ template <class T, class Ret, class = boost::void_t<>>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {};
+
+ template <class T, class Ret>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)<T, Ret, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP) > >
+ : public boost::integral_constant<bool, ::boost::is_convertible<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP), Ret>::value> {};
+
+ template <class T, class = boost::void_t<> >
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {};
+
+ template <class T>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)<T, boost::void_t<decltype(std::declval<typename add_reference<T>::type>()BOOST_TT_TRAIT_OP)> >
+ : public boost::integral_constant<bool, ::boost::is_void<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP)>::value> {};
+
+ template <class T, class = boost::void_t<>>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {};
+
+ template <class T>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)<T, boost::void_t<decltype(std::declval<typename add_reference<T>::type>() BOOST_TT_TRAIT_OP)> >
+ : public boost::true_type {};
+
+ }
+
+ template <class T, class Ret = boost::binary_op_detail::dont_care>
+ struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) <T, Ret> {};
+ template <class T>
+ struct BOOST_TT_TRAIT_NAME<T, void> : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) <T> {};
+ template <class T>
+ struct BOOST_TT_TRAIT_NAME<T, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) <T> {};
+
+
+}
+
+#else
+
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+// avoid warnings
+#if defined(__GNUC__)
+# pragma GCC system_header
+#elif defined(BOOST_MSVC)
+# pragma warning ( push )
+# pragma warning ( disable : 4244 4913 4800)
+# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+# pragma warning ( disable : 6334)
+# endif
+#endif
+
+namespace boost {
+namespace detail {
+
+// This namespace ensures that argument-dependent name lookup does not mess things up.
+namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
+
+// 1. a function to have an instance of type T without requiring T to be default
+// constructible
+template <typename T> T &make();
+
+
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&, int);
+
+
+// 3. checks if the operator returns void or not
+// conditions: Lhs!=void
+
+// we first redefine "operator," so that we have no compilation error if
+// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
+// (lhs BOOST_TT_TRAIT_OP, returns_void_t()) to deduce if
+// operator BOOST_TT_TRAIT_OP returns void or not:
+// - operator BOOST_TT_TRAIT_OP returns void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns returns_void_t
+// - operator BOOST_TT_TRAIT_OP returns !=void -> (lhs BOOST_TT_TRAIT_OP, returns_void_t()) returns int
+struct returns_void_t { };
+template <typename T> int operator,(const T&, returns_void_t);
+template <typename T> int operator,(const volatile T&, returns_void_t);
+
+// this intermediate trait has member value of type bool:
+// - value==true -> operator BOOST_TT_TRAIT_OP returns void
+// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
+template < typename Lhs >
+struct operator_returns_void {
+ // overloads of function returns_void make the difference
+ // yes_type and no_type have different size by construction
+ static ::boost::type_traits::yes_type returns_void(returns_void_t);
+ static ::boost::type_traits::no_type returns_void(int);
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((make<Lhs>() BOOST_TT_TRAIT_OP,returns_void_t())))));
+};
+
+
+// 4. checks if the return type is Ret or Ret==dont_care
+// conditions: Lhs!=void
+
+struct dont_care { };
+
+template < typename Lhs, typename Ret, bool Returns_void >
+struct operator_returns_Ret;
+
+template < typename Lhs >
+struct operator_returns_Ret < Lhs, dont_care, true > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs >
+struct operator_returns_Ret < Lhs, dont_care, false > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs >
+struct operator_returns_Ret < Lhs, void, true > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Lhs >
+struct operator_returns_Ret < Lhs, void, false > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Ret >
+struct operator_returns_Ret < Lhs, Ret, true > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// otherwise checks if it is convertible to Ret using the sizeof trick
+// based on overload resolution
+// condition: Ret!=void and Ret!=dont_care and the operator does not return void
+template < typename Lhs, typename Ret >
+struct operator_returns_Ret < Lhs, Ret, false > {
+ static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
+ static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
+
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(make<Lhs>() BOOST_TT_TRAIT_OP))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 5. checks for operator existence
+// condition: Lhs!=void
+
+// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
+// existing one;
+// this is done with redefinition of "operator," that returns no_operator or has_operator
+struct has_operator { };
+no_operator operator,(no_operator, has_operator);
+
+template < typename Lhs >
+struct operator_exists {
+ static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists
+ static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise
+
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((make<Lhs>() BOOST_TT_TRAIT_OP),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 6. main trait: to avoid any compilation error, this class behaves
+// differently when operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the
+// standard.
+// Forbidden_if is a bool that is:
+// - true when the operator BOOST_TT_TRAIT_OP(Lhs) is forbidden by the standard
+// (would yield compilation error if used)
+// - false otherwise
+template < typename Lhs, typename Ret, bool Forbidden_if >
+struct trait_impl1;
+
+template < typename Lhs, typename Ret >
+struct trait_impl1 < Lhs, Ret, true > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Lhs, typename Ret >
+struct trait_impl1 < Lhs, Ret, false > {
+ BOOST_STATIC_CONSTANT(bool,
+ value = (operator_exists < Lhs >::value && operator_returns_Ret < Lhs, Ret, operator_returns_void < Lhs >::value >::value));
+};
+
+// specialization needs to be declared for the special void case
+template < typename Ret >
+struct trait_impl1 < void, Ret, false > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// defines some typedef for convenience
+template < typename Lhs, typename Ret >
+struct trait_impl {
+ typedef typename ::boost::remove_reference<Lhs>::type Lhs_noref;
+ typedef typename ::boost::remove_cv<Lhs_noref>::type Lhs_nocv;
+ typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Lhs_noref>::type >::type >::type Lhs_noptr;
+ BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Lhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+};
+
+} // namespace impl
+} // namespace detail
+
+// this is the accessible definition of the trait to end user
+template <class Lhs, class Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care>
+struct BOOST_TT_TRAIT_NAME : public integral_constant<bool, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _impl)::trait_impl< Lhs, Ret >::value)>{};
+
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+# pragma warning ( pop )
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/has_prefix_operator.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/has_prefix_operator.hpp
new file mode 100644
index 00000000000..31987d66d28
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/has_prefix_operator.hpp
@@ -0,0 +1,280 @@
+// (C) Copyright 2009-2011 Frederic Bron, Robert Stewart, Steven Watanabe & Roman Perepelitsa.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#include <boost/config.hpp>
+#include <boost/type_traits/detail/config.hpp>
+
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/make_void.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <utility>
+
+#ifdef BOOST_GCC
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated"
+#endif
+#if defined(BOOST_MSVC)
+# pragma warning ( push )
+# pragma warning ( disable : 4804)
+#endif
+
+namespace boost
+{
+
+ namespace binary_op_detail {
+
+ struct dont_care;
+
+ template <class T, class Ret, class = boost::void_t<>>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) : public boost::false_type {};
+
+ template <class T, class Ret>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp)<T, Ret, boost::void_t<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>()) > >
+ : public boost::integral_constant<bool, ::boost::is_convertible<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>() ), Ret>::value> {};
+
+ template <class T, class = boost::void_t<> >
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) : public boost::false_type {};
+
+ template <class T>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp)<T, boost::void_t<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>())> >
+ : public boost::integral_constant<bool, ::boost::is_void<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>())>::value> {};
+
+ template <class T, class = boost::void_t<>>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) : public boost::false_type {};
+
+ template <class T>
+ struct BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp)<T, boost::void_t<decltype(BOOST_TT_TRAIT_OP std::declval<typename add_reference<T>::type>() )> >
+ : public boost::true_type {};
+
+ }
+
+ template <class T, class Ret = boost::binary_op_detail::dont_care>
+ struct BOOST_TT_TRAIT_NAME : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _ret_imp) <T, Ret> {};
+ template <class T>
+ struct BOOST_TT_TRAIT_NAME<T, void> : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _void_imp) <T> {};
+ template <class T>
+ struct BOOST_TT_TRAIT_NAME<T, boost::binary_op_detail::dont_care> : public boost::binary_op_detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _dc_imp) <T> {};
+
+
+}
+
+#ifdef BOOST_GCC
+#pragma GCC diagnostic pop
+#endif
+#if defined(BOOST_MSVC)
+# pragma warning ( pop )
+#endif
+
+#else
+
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_fundamental.hpp>
+#include <boost/type_traits/is_integral.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_void.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/remove_pointer.hpp>
+#include <boost/type_traits/remove_reference.hpp>
+
+// cannot include this header without getting warnings of the kind:
+// gcc:
+// warning: value computed is not used
+// warning: comparison between signed and unsigned integer expressions
+// msvc:
+// warning C4146: unary minus operator applied to unsigned type, result still unsigned
+// warning C4804: '-' : unsafe use of type 'bool' in operation
+// cannot find another implementation -> declared as system header to suppress these warnings.
+#if defined(__GNUC__)
+# pragma GCC system_header
+#elif defined(BOOST_MSVC)
+# pragma warning ( push )
+# pragma warning ( disable : 4146 4804 4913 4244 4800)
+# if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+# pragma warning ( disable : 6334)
+# endif
+# if BOOST_WORKAROUND(_MSC_VER, >= 1913)
+# pragma warning ( disable : 4834)
+# endif
+#endif
+
+
+
+namespace boost {
+namespace detail {
+
+// This namespace ensures that argument-dependent name lookup does not mess things up.
+namespace BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl) {
+
+// 1. a function to have an instance of type T without requiring T to be default
+// constructible
+template <typename T> T &make();
+
+
+// 2. we provide our operator definition for types that do not have one already
+
+// a type returned from operator BOOST_TT_TRAIT_OP when no such operator is
+// found in the type's own namespace (our own operator is used) so that we have
+// a means to know that our operator was used
+struct no_operator { };
+
+// this class allows implicit conversions and makes the following operator
+// definition less-preferred than any other such operators that might be found
+// via argument-dependent name lookup
+struct any { template <class T> any(T const&); };
+
+// when operator BOOST_TT_TRAIT_OP is not available, this one is used
+no_operator operator BOOST_TT_TRAIT_OP (const any&);
+
+
+// 3. checks if the operator returns void or not
+// conditions: Rhs!=void
+
+// we first redefine "operator," so that we have no compilation error if
+// operator BOOST_TT_TRAIT_OP returns void and we can use the return type of
+// (BOOST_TT_TRAIT_OP rhs, returns_void_t()) to deduce if
+// operator BOOST_TT_TRAIT_OP returns void or not:
+// - operator BOOST_TT_TRAIT_OP returns void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns returns_void_t
+// - operator BOOST_TT_TRAIT_OP returns !=void -> (BOOST_TT_TRAIT_OP rhs, returns_void_t()) returns int
+struct returns_void_t { };
+template <typename T> int operator,(const T&, returns_void_t);
+template <typename T> int operator,(const volatile T&, returns_void_t);
+
+// this intermediate trait has member value of type bool:
+// - value==true -> operator BOOST_TT_TRAIT_OP returns void
+// - value==false -> operator BOOST_TT_TRAIT_OP does not return void
+template < typename Rhs >
+struct operator_returns_void {
+ // overloads of function returns_void make the difference
+ // yes_type and no_type have different size by construction
+ static ::boost::type_traits::yes_type returns_void(returns_void_t);
+ static ::boost::type_traits::no_type returns_void(int);
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(::boost::type_traits::yes_type)==sizeof(returns_void((BOOST_TT_TRAIT_OP make<Rhs>(),returns_void_t())))));
+};
+
+
+// 4. checks if the return type is Ret or Ret==dont_care
+// conditions: Rhs!=void
+
+struct dont_care { };
+
+template < typename Rhs, typename Ret, bool Returns_void >
+struct operator_returns_Ret;
+
+template < typename Rhs >
+struct operator_returns_Ret < Rhs, dont_care, true > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Rhs >
+struct operator_returns_Ret < Rhs, dont_care, false > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Rhs >
+struct operator_returns_Ret < Rhs, void, true > {
+ BOOST_STATIC_CONSTANT(bool, value = true);
+};
+
+template < typename Rhs >
+struct operator_returns_Ret < Rhs, void, false > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Rhs, typename Ret >
+struct operator_returns_Ret < Rhs, Ret, true > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// otherwise checks if it is convertible to Ret using the sizeof trick
+// based on overload resolution
+// condition: Ret!=void and Ret!=dont_care and the operator does not return void
+template < typename Rhs, typename Ret >
+struct operator_returns_Ret < Rhs, Ret, false > {
+ static ::boost::type_traits::yes_type is_convertible_to_Ret(Ret); // this version is preferred for types convertible to Ret
+ static ::boost::type_traits::no_type is_convertible_to_Ret(...); // this version is used otherwise
+
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(is_convertible_to_Ret(BOOST_TT_TRAIT_OP make<Rhs>()))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 5. checks for operator existence
+// condition: Rhs!=void
+
+// checks if our definition of operator BOOST_TT_TRAIT_OP is used or an other
+// existing one;
+// this is done with redefinition of "operator," that returns no_operator or has_operator
+struct has_operator { };
+no_operator operator,(no_operator, has_operator);
+
+template < typename Rhs >
+struct operator_exists {
+ static ::boost::type_traits::yes_type s_check(has_operator); // this version is preferred when operator exists
+ static ::boost::type_traits::no_type s_check(no_operator); // this version is used otherwise
+
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(s_check(((BOOST_TT_TRAIT_OP make<Rhs>()),make<has_operator>())))==sizeof(::boost::type_traits::yes_type)));
+};
+
+
+// 6. main trait: to avoid any compilation error, this class behaves
+// differently when operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the
+// standard.
+// Forbidden_if is a bool that is:
+// - true when the operator BOOST_TT_TRAIT_OP(Rhs) is forbidden by the standard
+// (would yield compilation error if used)
+// - false otherwise
+template < typename Rhs, typename Ret, bool Forbidden_if >
+struct trait_impl1;
+
+template < typename Rhs, typename Ret >
+struct trait_impl1 < Rhs, Ret, true > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template < typename Rhs, typename Ret >
+struct trait_impl1 < Rhs, Ret, false > {
+ BOOST_STATIC_CONSTANT(bool,
+ value = (operator_exists < Rhs >::value && operator_returns_Ret < Rhs, Ret, operator_returns_void < Rhs >::value >::value));
+};
+
+// specialization needs to be declared for the special void case
+template < typename Ret >
+struct trait_impl1 < void, Ret, false > {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+// defines some typedef for convenience
+template < typename Rhs, typename Ret >
+struct trait_impl {
+ typedef typename ::boost::remove_reference<Rhs>::type Rhs_noref;
+ typedef typename ::boost::remove_cv<Rhs_noref>::type Rhs_nocv;
+ typedef typename ::boost::remove_cv< typename ::boost::remove_reference< typename ::boost::remove_pointer<Rhs_noref>::type >::type >::type Rhs_noptr;
+ BOOST_STATIC_CONSTANT(bool, value = (trait_impl1 < Rhs_noref, Ret, BOOST_TT_FORBIDDEN_IF >::value));
+};
+
+} // namespace impl
+} // namespace detail
+
+// this is the accessible definition of the trait to end user
+template <class Rhs, class Ret=::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME,_impl)::dont_care>
+struct BOOST_TT_TRAIT_NAME : public integral_constant<bool, (::boost::detail::BOOST_JOIN(BOOST_TT_TRAIT_NAME, _impl)::trait_impl < Rhs, Ret >::value)>{};
+
+} // namespace boost
+
+#if defined(BOOST_MSVC)
+# pragma warning ( pop )
+#endif
+
+#endif
+
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_03.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_03.hpp
new file mode 100644
index 00000000000..d3e4f936591
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_03.hpp
@@ -0,0 +1,108 @@
+
+// Copyright 2000 John Maddock (john@johnmaddock.co.uk)
+// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED
+#define BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED
+
+#include <boost/type_traits/is_reference.hpp>
+
+#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
+# include <boost/type_traits/detail/is_function_ptr_helper.hpp>
+#else
+# include <boost/type_traits/detail/is_function_ptr_tester.hpp>
+# include <boost/type_traits/detail/yes_no_type.hpp>
+#endif
+
+// is a type a function?
+// Please note that this implementation is unnecessarily complex:
+// we could just use !is_convertible<T*, const volatile void*>::value,
+// except that some compilers erroneously allow conversions from
+// function pointers to void*.
+
+namespace boost {
+
+#if !defined( __CODEGEARC__ )
+
+namespace detail {
+
+#if !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
+template<bool is_ref = true>
+struct is_function_chooser
+{
+ template< typename T > struct result_
+ : public false_type {};
+};
+
+template <>
+struct is_function_chooser<false>
+{
+ template< typename T > struct result_
+ : public ::boost::type_traits::is_function_ptr_helper<T*> {};
+};
+
+template <typename T>
+struct is_function_impl
+ : public is_function_chooser< ::boost::is_reference<T>::value >
+ ::BOOST_NESTED_TEMPLATE result_<T>
+{
+};
+
+#else
+
+template <typename T>
+struct is_function_impl
+{
+#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+#pragma warning(push)
+#pragma warning(disable:6334)
+#endif
+ static T* t;
+ BOOST_STATIC_CONSTANT(
+ bool, value = sizeof(::boost::type_traits::is_function_ptr_tester(t))
+ == sizeof(::boost::type_traits::yes_type)
+ );
+#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+#pragma warning(pop)
+#endif
+};
+
+template <typename T>
+struct is_function_impl<T&> : public false_type
+{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <typename T>
+struct is_function_impl<T&&> : public false_type
+{};
+#endif
+
+#endif
+
+} // namespace detail
+
+#endif // !defined( __CODEGEARC__ )
+
+#if defined( __CODEGEARC__ )
+template <class T> struct is_function : integral_constant<bool, __is_function(T)> {};
+#else
+template <class T> struct is_function : integral_constant<bool, ::boost::detail::is_function_impl<T>::value> {};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <class T> struct is_function<T&&> : public false_type {};
+#endif
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1600)
+template <class T> struct is_function<T&> : public false_type {};
+#endif
+#endif
+} // namespace boost
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1700)
+#include <boost/type_traits/detail/is_function_msvc10_fix.hpp>
+#endif
+
+#endif // BOOST_TT_IS_FUNCTION_CXX_03_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_11.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_11.hpp
new file mode 100644
index 00000000000..30311307195
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_cxx_11.hpp
@@ -0,0 +1,501 @@
+
+// Copyright 2000 John Maddock (john@johnmaddock.co.uk)
+// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED
+#define BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED
+
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace boost {
+
+ template <class T>
+ struct is_function : public false_type {};
+
+#if defined(__cpp_noexcept_function_type) && !defined(_MSC_VER)
+#define BOOST_TT_NOEXCEPT_PARAM , bool NE
+#define BOOST_TT_NOEXCEPT_DECL noexcept(NE)
+#else
+#define BOOST_TT_NOEXCEPT_PARAM
+#define BOOST_TT_NOEXCEPT_DECL
+#endif
+
+#ifdef _MSC_VER
+#define BOOST_TT_DEF_CALL __cdecl
+#else
+#define BOOST_TT_DEF_CALL
+#endif
+
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // Reference qualified:
+
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // rvalue reference qualified:
+
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)&& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)&& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+#ifdef _MSC_VER
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // rvalue reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)&&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+#endif // _MSC_VER
+
+ // All over again for msvc with noexcept:
+
+#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703)
+
+#undef BOOST_TT_NOEXCEPT_DECL
+#define BOOST_TT_NOEXCEPT_DECL noexcept
+
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // Reference qualified:
+
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // rvalue reference qualified:
+
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret BOOST_TT_DEF_CALL(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+#ifdef _MSC_VER
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // rvalue reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __stdcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __fastcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_function<Ret __vectorcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+#endif // _MSC_VER
+
+#endif
+
+}
+
+#undef BOOST_TT_NOEXCEPT_DECL
+#undef BOOST_TT_NOEXCEPT_PARAM
+#undef BOOST_TT_DEF_CALL
+
+#endif // BOOST_TT_IS_FUNCTION_CXX_11_HPP_INCLUDED
+
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_msvc10_fix.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_msvc10_fix.hpp
new file mode 100644
index 00000000000..ec8ba9ad32e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_msvc10_fix.hpp
@@ -0,0 +1,30 @@
+
+// (C) Copyright John Maddock 2018.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_FUNCTION_MSVC10_FIX_HPP_INCLUDED
+#define BOOST_TT_IS_FUNCTION_MSVC10_FIX_HPP_INCLUDED
+
+namespace boost {
+
+template <class R> struct is_function<R(&&)()> : public false_type {};
+template <class R> struct is_function<R(&&)(...)> : public false_type {};
+template <class R, class Arg1> struct is_function<R(&&)(Arg1)> : public false_type {};
+template <class R, class Arg1> struct is_function<R(&&)(Arg1, ...)> : public false_type {};
+template <class R, class Arg1, class Arg2> struct is_function<R(&&)(Arg1, Arg2)> : public false_type {};
+template <class R, class Arg1, class Arg2> struct is_function<R(&&)(Arg1, Arg2, ...)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3> struct is_function<R(&&)(Arg1, Arg2, Arg3)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3> struct is_function<R(&&)(Arg1, Arg2, Arg3, ...)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4> struct is_function<R(&&)(Arg1, Arg2, Arg3, Arg4)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4> struct is_function<R(&&)(Arg1, Arg2, Arg3, Arg4, ...)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> struct is_function<R(&&)(Arg1, Arg2, Arg3, Arg4, Arg5)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> struct is_function<R(&&)(Arg1, Arg2, Arg3, Arg4, Arg5, ...)> : public false_type {};
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_function_ptr_helper.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_helper.hpp
index 73a705cc33a..73a705cc33a 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_function_ptr_helper.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_helper.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_function_ptr_tester.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_tester.hpp
index 4fe88e81b2c..4fe88e81b2c 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_function_ptr_tester.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_function_ptr_tester.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_likely_lambda.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_likely_lambda.hpp
new file mode 100644
index 00000000000..39aa5281145
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_likely_lambda.hpp
@@ -0,0 +1,94 @@
+/* Copyright 2017 Joaquin M Lopez Munoz.
+ * Distributed under the Boost Software License, Version 1.0.
+ * (See accompanying file LICENSE_1_0.txt or copy at
+ * http://www.boost.org/LICENSE_1_0.txt)
+ *
+ * See http://www.boost.org/libs/poly_collection for library home page.
+ */
+
+#ifndef BOOST_TT_DETAIL_IS_LIKELY_STATELESS_LAMBDA_HPP
+#define BOOST_TT_DETAIL_IS_LIKELY_STATELESS_LAMBDA_HPP
+
+#if defined(_MSC_VER)
+#pragma once
+#endif
+
+#include <boost/type_traits/detail/config.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+//
+// We don't need or use this, just define a dummy class:
+//
+namespace boost{ namespace type_traits_detail{
+
+template<typename T>
+struct is_likely_stateless_lambda : public false_type {};
+
+}}
+
+#elif !defined(BOOST_NO_CXX11_LAMBDAS) && !defined(BOOST_NO_CXX11_DECLTYPE) && !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES) && !BOOST_WORKAROUND(BOOST_MSVC, < 1900)
+
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/enable_if.hpp>
+
+namespace boost{
+
+namespace type_traits_detail{
+
+/* Stateless lambda expressions have one (and only one) call operator and are
+ * convertible to a function pointer with the same signature. Non-lambda types
+ * could satisfy this too, hence the "likely" qualifier.
+ */
+
+template<typename T>
+struct has_one_operator_call_helper
+{
+ template<typename Q> static boost::true_type test(decltype(&Q::operator())*);
+ template<typename> static boost::false_type test(...);
+
+ using type=decltype(test<T>(nullptr));
+};
+
+template<typename T>
+using has_one_operator_call=typename has_one_operator_call_helper<T>::type;
+
+template<typename T>
+struct equivalent_function_pointer
+{
+ template<typename Q,typename R,typename... Args>
+ static auto helper(R (Q::*)(Args...)const)->R(*)(Args...);
+ template<typename Q,typename R,typename... Args>
+ static auto helper(R (Q::*)(Args...))->R(*)(Args...);
+
+ using type=decltype(helper(&T::operator()));
+};
+
+template<typename T,typename=void>
+struct is_likely_stateless_lambda : false_type{};
+
+template<typename T>
+struct is_likely_stateless_lambda<
+ T,
+ typename boost::enable_if_<has_one_operator_call<T>::value>::type> :
+ boost::is_convertible<T, typename equivalent_function_pointer<T>::type
+>{};
+
+} /* namespace type_traits_detail */
+
+} /* namespace boost */
+
+#else
+ //
+ // Can't implement this:
+ //
+namespace boost {
+ namespace type_traits_detail {
+
+ template<typename T>
+ struct is_likely_stateless_lambda : public boost::integral_constant<bool, false> {};
+}}
+
+#endif
+#endif
+
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp
index dcc6e2a0a1a..dcc6e2a0a1a 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_impl.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp
index c186db7bacf..c186db7bacf 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_mem_fun_pointer_tester.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp
new file mode 100644
index 00000000000..3df5b4e7f07
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp
@@ -0,0 +1,117 @@
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+
+#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_03_HPP_INCLUDED
+#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_03_HPP_INCLUDED
+
+#if !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
+ //
+ // Note: we use the "workaround" version for MSVC because it works for
+ // __stdcall etc function types, where as the partial specialisation
+ // version does not do so.
+ //
+# include <boost/type_traits/detail/is_mem_fun_pointer_impl.hpp>
+# include <boost/type_traits/remove_cv.hpp>
+# include <boost/type_traits/integral_constant.hpp>
+#else
+# include <boost/type_traits/is_reference.hpp>
+# include <boost/type_traits/is_array.hpp>
+# include <boost/type_traits/detail/yes_no_type.hpp>
+# include <boost/type_traits/detail/is_mem_fun_pointer_tester.hpp>
+#endif
+
+namespace boost {
+
+#if defined( __CODEGEARC__ )
+template <class T> struct is_member_function_pointer : public integral_constant<bool, __is_member_function_pointer( T )> {};
+#elif !BOOST_WORKAROUND(__BORLANDC__, < 0x600) && !defined(BOOST_TT_TEST_MS_FUNC_SIGS)
+
+template <class T> struct is_member_function_pointer
+ : public ::boost::integral_constant<bool, ::boost::type_traits::is_mem_fun_pointer_impl<typename remove_cv<T>::type>::value>{};
+
+#else
+
+namespace detail {
+
+#ifndef __BORLANDC__
+
+template <bool>
+struct is_mem_fun_pointer_select
+{
+ template <class T> struct result_ : public false_type{};
+};
+
+template <>
+struct is_mem_fun_pointer_select<false>
+{
+ template <typename T> struct result_
+ {
+#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+#pragma warning(push)
+#pragma warning(disable:6334)
+#endif
+ static T* make_t;
+ typedef result_<T> self_type;
+
+ BOOST_STATIC_CONSTANT(
+ bool, value = (
+ 1 == sizeof(::boost::type_traits::is_mem_fun_pointer_tester(self_type::make_t))
+ ));
+#if BOOST_WORKAROUND(BOOST_MSVC_FULL_VER, >= 140050000)
+#pragma warning(pop)
+#endif
+ };
+};
+
+template <typename T>
+struct is_member_function_pointer_impl
+ : public is_mem_fun_pointer_select<
+ ::boost::is_reference<T>::value || ::boost::is_array<T>::value>::template result_<T>{};
+
+template <typename T>
+struct is_member_function_pointer_impl<T&> : public false_type{};
+
+#else // Borland C++
+
+template <typename T>
+struct is_member_function_pointer_impl
+{
+ static T* m_t;
+ BOOST_STATIC_CONSTANT(
+ bool, value =
+ (1 == sizeof(type_traits::is_mem_fun_pointer_tester(m_t))) );
+};
+
+template <typename T>
+struct is_member_function_pointer_impl<T&>
+{
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+#endif
+
+template<> struct is_member_function_pointer_impl<void> : public false_type{};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+template<> struct is_member_function_pointer_impl<void const> : public false_type{};
+template<> struct is_member_function_pointer_impl<void const volatile> : public false_type{};
+template<> struct is_member_function_pointer_impl<void volatile> : public false_type{};
+#endif
+
+} // namespace detail
+
+template <class T>
+struct is_member_function_pointer
+ : public integral_constant<bool, ::boost::detail::is_member_function_pointer_impl<T>::value>{};
+
+#endif
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp
new file mode 100644
index 00000000000..b77a4a57407
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp
@@ -0,0 +1,557 @@
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+
+#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED
+#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED
+
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace boost {
+
+#ifdef _MSC_VER
+#define BOOST_TT_DEF_CALL __thiscall
+#else
+#define BOOST_TT_DEF_CALL
+#endif
+
+
+ template <class T>
+ struct is_member_function_pointer : public false_type {};
+ template <class T>
+ struct is_member_function_pointer<T const> : public is_member_function_pointer<T> {};
+ template <class T>
+ struct is_member_function_pointer<T volatile> : public is_member_function_pointer<T> {};
+ template <class T>
+ struct is_member_function_pointer<T const volatile> : public is_member_function_pointer<T> {};
+
+#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703)
+ // MSVC can't handle noexcept(b) as a deduced template parameter
+ // so we will have to write everything out :(
+#define BOOST_TT_NOEXCEPT_PARAM
+#define BOOST_TT_NOEXCEPT_DECL
+#elif defined(__cpp_noexcept_function_type)
+#define BOOST_TT_NOEXCEPT_PARAM , bool NE
+#define BOOST_TT_NOEXCEPT_DECL noexcept(NE)
+#else
+#define BOOST_TT_NOEXCEPT_PARAM
+#define BOOST_TT_NOEXCEPT_DECL
+#endif
+
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (C::*)(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // Reference qualified:
+
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // rvalue reference qualified:
+
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (BOOST_TT_DEF_CALL C::*)(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+#ifdef _MSC_VER
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // rvalue reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__stdcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__fastcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret (__vectorcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+
+
+#if defined(_MSVC_LANG) && (_MSVC_LANG >= 201703)
+
+#undef BOOST_TT_NOEXCEPT_DECL
+#define BOOST_TT_NOEXCEPT_DECL noexcept
+
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // Reference qualified:
+
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)& BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile & BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // rvalue reference qualified:
+
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const qualified:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(BOOST_TT_DEF_CALL C::*)(Args...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class ...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(C::*)(Args..., ...)const volatile && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+#ifdef _MSC_VER
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const volatile BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const volatile &BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+
+ // rvalue reference qualified:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...) && BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ // const volatile:
+#ifdef __CLR_VER
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret __clrcall(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+#ifndef _M_AMD64
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__stdcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__fastcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__cdecl C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+ template <class Ret, class C, class...Args BOOST_TT_NOEXCEPT_PARAM>
+ struct is_member_function_pointer<Ret(__vectorcall C::*)(Args...)const volatile &&BOOST_TT_NOEXCEPT_DECL> : public true_type {};
+#endif
+
+
+#endif
+
+#undef BOOST_TT_NOEXCEPT_DECL
+#undef BOOST_TT_NOEXCEPT_PARAM
+#undef BOOST_TT_DEF_CALL
+}
+
+#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_CXX_11_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp
new file mode 100644
index 00000000000..d5707359b1b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp
@@ -0,0 +1,43 @@
+
+// (C) Copyright John Maddock 2018.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_RVALUE_REFERENCE_MSVC10_FIX_HPP_INCLUDED
+#define BOOST_TT_IS_RVALUE_REFERENCE_MSVC10_FIX_HPP_INCLUDED
+
+namespace boost {
+
+template <class R> struct is_rvalue_reference<R(&&)()> : public true_type {};
+template <class R> struct is_rvalue_reference<R(&&)(...)> : public true_type {};
+template <class R, class Arg1> struct is_rvalue_reference<R(&&)(Arg1)> : public true_type {};
+template <class R, class Arg1> struct is_rvalue_reference<R(&&)(Arg1, ...)> : public true_type {};
+template <class R, class Arg1, class Arg2> struct is_rvalue_reference<R(&&)(Arg1, Arg2)> : public true_type {};
+template <class R, class Arg1, class Arg2> struct is_rvalue_reference<R(&&)(Arg1, Arg2, ...)> : public true_type {};
+template <class R, class Arg1, class Arg2, class Arg3> struct is_rvalue_reference<R(&&)(Arg1, Arg2, Arg3)> : public true_type {};
+template <class R, class Arg1, class Arg2, class Arg3> struct is_rvalue_reference<R(&&)(Arg1, Arg2, Arg3, ...)> : public true_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4> struct is_rvalue_reference<R(&&)(Arg1, Arg2, Arg3, Arg4)> : public true_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4> struct is_rvalue_reference<R(&&)(Arg1, Arg2, Arg3, Arg4, ...)> : public true_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> struct is_rvalue_reference<R(&&)(Arg1, Arg2, Arg3, Arg4, Arg5)> : public true_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> struct is_rvalue_reference<R(&&)(Arg1, Arg2, Arg3, Arg4, Arg5, ...)> : public true_type {};
+
+template <class R> struct is_rvalue_reference<R(&)()> : public false_type {};
+template <class R> struct is_rvalue_reference<R(&)(...)> : public false_type {};
+template <class R, class Arg1> struct is_rvalue_reference<R(&)(Arg1)> : public false_type {};
+template <class R, class Arg1> struct is_rvalue_reference<R(&)(Arg1, ...)> : public false_type {};
+template <class R, class Arg1, class Arg2> struct is_rvalue_reference<R(&)(Arg1, Arg2)> : public false_type {};
+template <class R, class Arg1, class Arg2> struct is_rvalue_reference<R(&)(Arg1, Arg2, ...)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3> struct is_rvalue_reference<R(&)(Arg1, Arg2, Arg3)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3> struct is_rvalue_reference<R(&)(Arg1, Arg2, Arg3, ...)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4> struct is_rvalue_reference<R(&)(Arg1, Arg2, Arg3, Arg4)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4> struct is_rvalue_reference<R(&)(Arg1, Arg2, Arg3, Arg4, ...)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> struct is_rvalue_reference<R(&)(Arg1, Arg2, Arg3, Arg4, Arg5)> : public false_type {};
+template <class R, class Arg1, class Arg2, class Arg3, class Arg4, class Arg5> struct is_rvalue_reference<R(&)(Arg1, Arg2, Arg3, Arg4, Arg5, ...)> : public false_type {};
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/mp_defer.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/mp_defer.hpp
index f3beeb21bba..f3beeb21bba 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/mp_defer.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/mp_defer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/detail/yes_no_type.hpp b/src/third_party/boost-1.69.0/boost/type_traits/detail/yes_no_type.hpp
index f583730220e..f583730220e 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/detail/yes_no_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/detail/yes_no_type.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/enable_if.hpp b/src/third_party/boost-1.69.0/boost/type_traits/enable_if.hpp
new file mode 100644
index 00000000000..3cdc2816f80
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/enable_if.hpp
@@ -0,0 +1,37 @@
+/*
+Copyright 2003 The Trustees of Indiana University
+
+Authors: Jaakko Jarvi (jajarvi at osl.iu.edu)
+ Jeremiah Willcock (jewillco at osl.iu.edu)
+ Andrew Lumsdaine (lums at osl.iu.edu)
+
+Copyright 2018 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License,
+Version 1.0. (See accompanying file LICENSE_1_0.txt
+or copy at http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BOOST_TT_ENABLE_IF_HPP_INCLUDED
+#define BOOST_TT_ENABLE_IF_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+namespace boost {
+
+template<bool B, class T = void>
+struct enable_if_ {
+ typedef T type;
+};
+
+template<class T>
+struct enable_if_<false, T> { };
+
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+template<bool B, class T = void>
+using enable_if_t = typename enable_if_<B, T>::type;
+#endif
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/extent.hpp b/src/third_party/boost-1.69.0/boost/type_traits/extent.hpp
index 124257878bd..124257878bd 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/extent.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/extent.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/floating_point_promotion.hpp b/src/third_party/boost-1.69.0/boost/type_traits/floating_point_promotion.hpp
index 9110f24a4e0..9110f24a4e0 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/floating_point_promotion.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/floating_point_promotion.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/function_traits.hpp b/src/third_party/boost-1.69.0/boost/type_traits/function_traits.hpp
index 26d7e05c5f4..26d7e05c5f4 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/function_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/function_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_and.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_and.hpp
index a16c71a48db..a16c71a48db 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_and.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_and_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_and_assign.hpp
index 01e25e318f0..01e25e318f0 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_and_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_and_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_or.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_or.hpp
index 6e76929fdaa..6e76929fdaa 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_or.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_or_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_or_assign.hpp
index 891c39c51b8..891c39c51b8 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_or_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_or_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_xor.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor.hpp
index 05173ac11d3..05173ac11d3 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_xor.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_xor_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor_assign.hpp
index 3866b7ac482..3866b7ac482 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_bit_xor_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_bit_xor_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_complement.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_complement.hpp
index d323e129368..d323e129368 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_complement.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_complement.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_dereference.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_dereference.hpp
new file mode 100644
index 00000000000..3275348b717
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_dereference.hpp
@@ -0,0 +1,375 @@
+// (C) Copyright 2009-2011 Frederic Bron.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED
+#define BOOST_TT_HAS_DEREFERENCE_HPP_INCLUDED
+
+#define BOOST_TT_TRAIT_NAME has_dereference
+#define BOOST_TT_TRAIT_OP *
+#define BOOST_TT_FORBIDDEN_IF\
+ /* void* or fundamental */\
+ (\
+ (\
+ ::boost::is_pointer< Rhs_noref >::value && \
+ ::boost::is_void< Rhs_noptr >::value\
+ ) || \
+ ::boost::is_fundamental< Rhs_nocv >::value\
+ )
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+
+namespace boost {
+
+ template <class R>
+ struct has_dereference<void*, R> : public false_type {};
+ template <>
+ struct has_dereference<void*, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*const, R> : public false_type {};
+ template <>
+ struct has_dereference<void*const, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*const, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*const, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*const, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*const, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*const, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*const, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*volatile, R> : public false_type {};
+ template <>
+ struct has_dereference<void*volatile, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*volatile, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*volatile, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*volatile, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*volatile, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*volatile, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*volatile, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*volatile, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*volatile, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*volatile, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*volatile, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*const volatile, R> : public false_type {};
+ template <>
+ struct has_dereference<void*const volatile, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*const volatile, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*const volatile, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*const volatile, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*const volatile, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*const volatile, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const volatile, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const volatile, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*const volatile, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const volatile, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const volatile, void> : public false_type {};
+
+ // references:
+ template <class R>
+ struct has_dereference<void*&, R> : public false_type {};
+ template <>
+ struct has_dereference<void*&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*&, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*&, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*&, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*const&, R> : public false_type {};
+ template <>
+ struct has_dereference<void*const&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*const&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*const&, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*const&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*const&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*const&, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*const&, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*volatile&, R> : public false_type {};
+ template <>
+ struct has_dereference<void*volatile&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*volatile&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*volatile&, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*volatile&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*volatile&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*volatile&, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*volatile&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*volatile&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*volatile&, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*volatile&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*volatile&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*const volatile&, R> : public false_type {};
+ template <>
+ struct has_dereference<void*const volatile&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*const volatile&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*const volatile&, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*const volatile&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*const volatile&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*const volatile&, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const volatile&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const volatile&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*const volatile&, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const volatile&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const volatile&, void> : public false_type {};
+
+ // rvalue refs:
+ template <class R>
+ struct has_dereference<void*&&, R> : public false_type {};
+ template <>
+ struct has_dereference<void*&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*&&, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*&&, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*&&, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*const&&, R> : public false_type {};
+ template <>
+ struct has_dereference<void*const&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*const&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*const&&, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*const&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*const&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*const&&, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*const&&, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*volatile&&, R> : public false_type {};
+ template <>
+ struct has_dereference<void*volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*volatile&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*volatile&&, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*volatile&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*volatile&&, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*volatile&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*volatile&&, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*volatile&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<void*const volatile&&, R> : public false_type {};
+ template <>
+ struct has_dereference<void*const volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<void*const volatile&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const void*const volatile&&, R> : public false_type {};
+ template <>
+ struct has_dereference<const void*const volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const void*const volatile&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<volatile void*const volatile&&, R> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<volatile void*const volatile&&, void> : public false_type {};
+
+ template <class R>
+ struct has_dereference<const volatile void*const volatile&&, R> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const volatile&&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_dereference<const volatile void*const volatile&&, void> : public false_type {};
+
+
+}
+#endif
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_divides.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_divides.hpp
index 869e907f6a3..869e907f6a3 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_divides.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_divides.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_divides_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_divides_assign.hpp
index 1a8e3c1e63b..1a8e3c1e63b 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_divides_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_divides_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_equal_to.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_equal_to.hpp
index 3405d34099d..3405d34099d 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_greater.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_greater.hpp
index 1a9fda6f326..1a9fda6f326 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_greater.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_greater.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_greater_equal.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_greater_equal.hpp
index c87f0639481..c87f0639481 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_greater_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_greater_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_left_shift.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_left_shift.hpp
index e95c12a80a6..e95c12a80a6 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_left_shift.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_left_shift.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_left_shift_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_left_shift_assign.hpp
index 74e0df95806..74e0df95806 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_left_shift_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_left_shift_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_less.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_less.hpp
index 1326a184b0f..1326a184b0f 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_less.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_less.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_less_equal.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_less_equal.hpp
index 607b71ce919..607b71ce919 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_less_equal.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_less_equal.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_logical_and.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_logical_and.hpp
index 3bb1733d54e..3bb1733d54e 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_logical_and.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_logical_and.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_logical_not.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_logical_not.hpp
index d36858e1ec1..d36858e1ec1 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_logical_not.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_logical_not.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_logical_or.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_logical_or.hpp
index a188726e152..a188726e152 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_logical_or.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_logical_or.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_minus.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_minus.hpp
index 3f6271a57ba..3f6271a57ba 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_minus.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_minus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_minus_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_minus_assign.hpp
index 936ffedb472..936ffedb472 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_minus_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_minus_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_modulus.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_modulus.hpp
index 24a815f3df2..24a815f3df2 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_modulus.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_modulus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_modulus_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_modulus_assign.hpp
index 5e3e83fa076..5e3e83fa076 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_modulus_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_modulus_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_multiplies.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_multiplies.hpp
index 591a0ceae82..591a0ceae82 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_multiplies.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_multiplies.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_multiplies_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_multiplies_assign.hpp
index b24f87944e7..b24f87944e7 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_multiplies_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_multiplies_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_negate.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_negate.hpp
index 452e54ab41c..452e54ab41c 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_negate.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_negate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_new_operator.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_new_operator.hpp
index 4def872ddf8..4def872ddf8 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_new_operator.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_new_operator.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_not_equal_to.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_not_equal_to.hpp
index 5f2c39a43e2..5f2c39a43e2 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_not_equal_to.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_not_equal_to.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_assign.hpp
index 7517fa804bf..7517fa804bf 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_constructor.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_constructor.hpp
index fa47b1db3cd..fa47b1db3cd 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_constructor.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_constructor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_copy.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_copy.hpp
index 0d9bb183790..0d9bb183790 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_destructor.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_destructor.hpp
index 74dd9e7e295..74dd9e7e295 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_nothrow_destructor.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_nothrow_destructor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_plus.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_plus.hpp
index 2d7932884d2..2d7932884d2 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_plus.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_plus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_plus_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_plus_assign.hpp
index cf012e243ca..cf012e243ca 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_plus_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_plus_assign.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_post_decrement.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_post_decrement.hpp
new file mode 100644
index 00000000000..fc1c430a547
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_post_decrement.hpp
@@ -0,0 +1,65 @@
+// (C) Copyright 2009-2011 Frederic Bron.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_POST_DECREMENT_HPP_INCLUDED
+
+#include <boost/type_traits/is_array.hpp>
+
+#define BOOST_TT_TRAIT_NAME has_post_decrement
+#define BOOST_TT_TRAIT_OP --
+#define BOOST_TT_FORBIDDEN_IF\
+ (\
+ /* bool */\
+ ::boost::is_same< bool, Lhs_nocv >::value || \
+ /* void* */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_void< Lhs_noptr >::value\
+ ) || \
+ /* (fundamental or pointer) and const */\
+ (\
+ ( \
+ ::boost::is_fundamental< Lhs_nocv >::value || \
+ ::boost::is_pointer< Lhs_noref >::value\
+ ) && \
+ ::boost::is_const< Lhs_noref >::value\
+ )||\
+ /* Arrays */ \
+ ::boost::is_array<Lhs_noref>::value\
+ )
+
+
+#include <boost/type_traits/detail/has_postfix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+
+namespace boost {
+
+ template <class R>
+ struct has_post_decrement<bool, R> : public false_type {};
+ template <>
+ struct has_post_decrement<bool, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_post_decrement<bool, void> : public false_type {};
+
+ template <class R>
+ struct has_post_decrement<bool&, R> : public false_type {};
+ template <>
+ struct has_post_decrement<bool&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_post_decrement<bool&, void> : public false_type {};
+
+}
+
+#endif
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_post_increment.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_post_increment.hpp
new file mode 100644
index 00000000000..e83afd1c312
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_post_increment.hpp
@@ -0,0 +1,65 @@
+// (C) Copyright 2009-2011 Frederic Bron.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_POST_INCREMENT_HPP_INCLUDED
+
+#include <boost/type_traits/is_array.hpp>
+
+#define BOOST_TT_TRAIT_NAME has_post_increment
+#define BOOST_TT_TRAIT_OP ++
+#define BOOST_TT_FORBIDDEN_IF\
+ (\
+ /* bool */\
+ ::boost::is_same< bool, Lhs_nocv >::value || \
+ /* void* */\
+ (\
+ ::boost::is_pointer< Lhs_noref >::value && \
+ ::boost::is_void< Lhs_noptr >::value\
+ ) || \
+ /* (fundamental or pointer) and const */\
+ (\
+ ( \
+ ::boost::is_fundamental< Lhs_nocv >::value || \
+ ::boost::is_pointer< Lhs_noref >::value\
+ ) && \
+ ::boost::is_const< Lhs_noref >::value\
+ )||\
+ /* Arrays */ \
+ ::boost::is_array<Lhs_noref>::value\
+ )
+
+
+#include <boost/type_traits/detail/has_postfix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+
+namespace boost {
+
+ template <class R>
+ struct has_post_increment<bool, R> : public false_type {};
+ template <>
+ struct has_post_increment<bool, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_post_increment<bool, void> : public false_type {};
+
+ template <class R>
+ struct has_post_increment<bool&, R> : public false_type {};
+ template <>
+ struct has_post_increment<bool&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_post_increment<bool&, void> : public false_type {};
+
+}
+
+#endif
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_pre_decrement.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_pre_decrement.hpp
new file mode 100644
index 00000000000..5ce50e9003d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_pre_decrement.hpp
@@ -0,0 +1,65 @@
+// (C) Copyright 2009-2011 Frederic Bron.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_PRE_DECREMENT_HPP_INCLUDED
+
+#include <boost/type_traits/is_array.hpp>
+
+#define BOOST_TT_TRAIT_NAME has_pre_decrement
+#define BOOST_TT_TRAIT_OP --
+#define BOOST_TT_FORBIDDEN_IF\
+ (\
+ /* bool */\
+ ::boost::is_same< bool, Rhs_nocv >::value || \
+ /* void* */\
+ (\
+ ::boost::is_pointer< Rhs_noref >::value && \
+ ::boost::is_void< Rhs_noptr >::value\
+ ) || \
+ /* (fundamental or pointer) and const */\
+ (\
+ ( \
+ ::boost::is_fundamental< Rhs_nocv >::value || \
+ ::boost::is_pointer< Rhs_noref >::value\
+ ) && \
+ ::boost::is_const< Rhs_noref >::value\
+ )||\
+ /* Arrays */ \
+ ::boost::is_array<Rhs_noref>::value\
+ )
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+
+namespace boost {
+
+ template <class R>
+ struct has_pre_decrement<bool, R> : public false_type {};
+ template <>
+ struct has_pre_decrement<bool, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_pre_decrement<bool, void> : public false_type {};
+
+ template <class R>
+ struct has_pre_decrement<bool&, R> : public false_type {};
+ template <>
+ struct has_pre_decrement<bool&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_pre_decrement<bool&, void> : public false_type {};
+
+}
+
+#endif
+#endif
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_pre_increment.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_pre_increment.hpp
new file mode 100644
index 00000000000..9361cc8bee9
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_pre_increment.hpp
@@ -0,0 +1,66 @@
+// (C) Copyright 2009-2011 Frederic Bron.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED
+#define BOOST_TT_HAS_PRE_INCREMENT_HPP_INCLUDED
+
+#include <boost/type_traits/is_array.hpp>
+
+#define BOOST_TT_TRAIT_NAME has_pre_increment
+#define BOOST_TT_TRAIT_OP ++
+#define BOOST_TT_FORBIDDEN_IF\
+ (\
+ /* bool */\
+ ::boost::is_same< bool, Rhs_nocv >::value || \
+ /* void* */\
+ (\
+ ::boost::is_pointer< Rhs_noref >::value && \
+ ::boost::is_void< Rhs_noptr >::value\
+ ) || \
+ /* (fundamental or pointer) and const */\
+ (\
+ ( \
+ ::boost::is_fundamental< Rhs_nocv >::value || \
+ ::boost::is_pointer< Rhs_noref >::value\
+ ) && \
+ ::boost::is_const< Rhs_noref >::value\
+ )||\
+ /* Arrays */ \
+ ::boost::is_array<Rhs_noref>::value\
+ )
+
+
+#include <boost/type_traits/detail/has_prefix_operator.hpp>
+
+#undef BOOST_TT_TRAIT_NAME
+#undef BOOST_TT_TRAIT_OP
+#undef BOOST_TT_FORBIDDEN_IF
+
+#if defined(BOOST_TT_HAS_ACCURATE_BINARY_OPERATOR_DETECTION)
+
+namespace boost {
+
+ template <class R>
+ struct has_pre_increment<bool, R> : public false_type {};
+ template <>
+ struct has_pre_increment<bool, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_pre_increment<bool, void> : public false_type {};
+
+ template <class R>
+ struct has_pre_increment<bool&, R> : public false_type {};
+ template <>
+ struct has_pre_increment<bool&, boost::binary_op_detail::dont_care> : public false_type {};
+ template <>
+ struct has_pre_increment<bool&, void> : public false_type {};
+
+}
+
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_right_shift.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_right_shift.hpp
index 55629112332..55629112332 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_right_shift.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_right_shift.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_right_shift_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_right_shift_assign.hpp
index 0e2c263559f..0e2c263559f 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_right_shift_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_right_shift_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_assign.hpp
index 15b917e7169..15b917e7169 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_assign.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_assign.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_constructor.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_constructor.hpp
index 06c137d1dec..06c137d1dec 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_constructor.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_constructor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_copy.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_copy.hpp
index fd6ad2d03b3..fd6ad2d03b3 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_copy.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_copy.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_destructor.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_destructor.hpp
index 9a3a61ff97a..9a3a61ff97a 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_trivial_destructor.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_destructor.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_assign.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_assign.hpp
new file mode 100644
index 00000000000..7b392697f31
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_assign.hpp
@@ -0,0 +1,73 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Eric Friedman 2002-2003.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
+
+#include <cstddef> // size_t
+#include <boost/type_traits/intrinsics.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+
+#if !defined(BOOST_HAS_TRIVIAL_MOVE_ASSIGN) || defined(BOOST_MSVC) || defined(BOOST_INTEL)
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_const.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#ifdef BOOST_MSVC
+#include <boost/type_traits/is_reference.hpp>
+#endif
+#endif
+
+#if defined(__GNUC__) || defined(__clang__)
+#include <boost/type_traits/is_assignable.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#endif
+
+#ifdef __SUNPRO_CC
+#include <boost/type_traits/is_assignable.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#if __cplusplus >= 201103
+#define SOLARIS_EXTRA_CHECK && is_assignable<typename remove_const<T>::type&, typename remove_const<T>::type&&>::value
+#endif
+#endif
+
+#ifndef SOLARIS_EXTRA_CHECK
+#define SOLARIS_EXTRA_CHECK
+#endif
+
+namespace boost{
+
+template <typename T>
+struct has_trivial_move_assign : public integral_constant<bool,
+#ifdef BOOST_HAS_TRIVIAL_MOVE_ASSIGN
+ BOOST_HAS_TRIVIAL_MOVE_ASSIGN(T)
+#else
+ ::boost::is_pod<T>::value && !::boost::is_const<T>::value && !::boost::is_volatile<T>::value SOLARIS_EXTRA_CHECK
+#endif
+ > {};
+
+template <> struct has_trivial_move_assign<void> : public false_type{};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+template <> struct has_trivial_move_assign<void const> : public false_type{};
+template <> struct has_trivial_move_assign<void const volatile> : public false_type{};
+template <> struct has_trivial_move_assign<void volatile> : public false_type{};
+#endif
+template <class T> struct has_trivial_move_assign<T&> : public false_type{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <class T> struct has_trivial_move_assign<T&&> : public false_type{};
+#endif
+// Array types are not assignable:
+template <class T, std::size_t N> struct has_trivial_move_assign<T[N]> : public false_type{};
+template <class T> struct has_trivial_move_assign<T[]> : public false_type{};
+
+} // namespace boost
+
+#undef SOLARIS_EXTRA_CHECK
+
+#endif // BOOST_TT_HAS_TRIVIAL_MOVE_ASSIGN_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_constructor.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_constructor.hpp
new file mode 100644
index 00000000000..ce85dc2d79c
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_trivial_move_constructor.hpp
@@ -0,0 +1,79 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Eric Friedman 2002-2003.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
+#define BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
+
+#include <cstddef> // size_t
+#include <boost/type_traits/intrinsics.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+
+#ifdef BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR
+
+#if defined(BOOST_MSVC) || defined(BOOST_INTEL)
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#endif
+
+#if defined(__GNUC__) || defined(__clang__)
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+#endif
+
+
+namespace boost {
+
+template <typename T> struct has_trivial_move_constructor : public integral_constant<bool, BOOST_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)>{};
+
+#else
+
+#ifdef __SUNPRO_CC
+#include <boost/type_traits/is_constructible.hpp>
+#include <boost/type_traits/remove_const.hpp>
+#if __cplusplus >= 201103
+#define SOLARIS_EXTRA_CHECK && is_constructible<typename remove_const<T>::type, typename remove_const<T>::type&&>::value
+#endif
+#endif
+
+#ifndef SOLARIS_EXTRA_CHECK
+#define SOLARIS_EXTRA_CHECK
+#endif
+
+#include <boost/type_traits/is_pod.hpp>
+#include <boost/type_traits/is_volatile.hpp>
+
+namespace boost {
+
+template <typename T> struct has_trivial_move_constructor
+ : public integral_constant<bool, ::boost::is_pod<T>::value && !::boost::is_volatile<T>::value SOLARIS_EXTRA_CHECK>{};
+
+#undef SOLARIS_EXTRA_CHECK
+
+#endif
+
+template <> struct has_trivial_move_constructor<void> : public false_type{};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+template <> struct has_trivial_move_constructor<void const> : public false_type{};
+template <> struct has_trivial_move_constructor<void volatile> : public false_type{};
+template <> struct has_trivial_move_constructor<void const volatile> : public false_type{};
+#endif
+// What should we do with reference types??? The standard seems to suggest these are trivial, even if the thing they reference is not:
+template <class T> struct has_trivial_move_constructor<T&> : public true_type{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <class T> struct has_trivial_move_constructor<T&&> : public true_type{};
+#endif
+// Arrays can not be explicitly copied:
+template <class T, std::size_t N> struct has_trivial_move_constructor<T[N]> : public false_type{};
+template <class T> struct has_trivial_move_constructor<T[]> : public false_type{};
+
+} // namespace boost
+
+#endif // BOOST_TT_HAS_TRIVIAL_MOVE_CONSTRUCTOR_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_unary_minus.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_unary_minus.hpp
index 6b3157f42c5..6b3157f42c5 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_unary_minus.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_unary_minus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_unary_plus.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_unary_plus.hpp
index a61770f8585..a61770f8585 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_unary_plus.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_unary_plus.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/has_virtual_destructor.hpp b/src/third_party/boost-1.69.0/boost/type_traits/has_virtual_destructor.hpp
index 4b0f38368ad..4b0f38368ad 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/has_virtual_destructor.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/has_virtual_destructor.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/integral_constant.hpp b/src/third_party/boost-1.69.0/boost/type_traits/integral_constant.hpp
index 1b36dbd2c33..1b36dbd2c33 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/integral_constant.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/integral_constant.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/integral_promotion.hpp b/src/third_party/boost-1.69.0/boost/type_traits/integral_promotion.hpp
index 526f90ca993..526f90ca993 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/integral_promotion.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/integral_promotion.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/intrinsics.hpp b/src/third_party/boost-1.69.0/boost/type_traits/intrinsics.hpp
index d41a61ec9af..d41a61ec9af 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/intrinsics.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/intrinsics.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_abstract.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_abstract.hpp
index 781d94a4795..781d94a4795 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_abstract.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_abstract.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_arithmetic.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_arithmetic.hpp
index c23811ebea3..c23811ebea3 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_arithmetic.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_arithmetic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_array.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_array.hpp
index 53e1613ab6e..53e1613ab6e 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_array.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_array.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_assignable.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_assignable.hpp
index 6a9474b2fde..6a9474b2fde 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_assignable.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_assignable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_base_and_derived.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_base_and_derived.hpp
index ee3dce597c1..ee3dce597c1 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_base_and_derived.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_base_and_derived.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_base_of.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_base_of.hpp
index 89f2f679802..89f2f679802 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_base_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_base_of.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_class.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_class.hpp
index e3a22d2b639..e3a22d2b639 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_class.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_class.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_complete.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_complete.hpp
index cad04b3c9d5..cad04b3c9d5 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_complete.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_complete.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_complex.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_complex.hpp
index c4554cea081..c4554cea081 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_complex.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_complex.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_compound.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_compound.hpp
index 7995eb8a237..7995eb8a237 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_compound.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_compound.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_const.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_const.hpp
index e0ed88a34b3..e0ed88a34b3 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_const.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_const.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_constructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_constructible.hpp
index da6259948b9..da6259948b9 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_constructible.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_constructible.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_convertible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_convertible.hpp
index bf648fc46ea..bf648fc46ea 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_convertible.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_convertible.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_copy_assignable.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_copy_assignable.hpp
new file mode 100644
index 00000000000..ed04927b603
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_copy_assignable.hpp
@@ -0,0 +1,140 @@
+// (C) Copyright Ion Gaztanaga 2014.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED
+#define BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/is_noncopyable.hpp>
+
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_NO_CXX11_DECLTYPE) \
+ && !defined(BOOST_INTEL_CXX_VERSION) && \
+ !(defined(BOOST_MSVC) && _MSC_VER == 1800)
+#define BOOST_TT_CXX11_IS_COPY_ASSIGNABLE
+#include <boost/type_traits/declval.hpp>
+#else
+ //For compilers without decltype
+ #include <boost/type_traits/is_const.hpp>
+ #include <boost/type_traits/is_array.hpp>
+ #include <boost/type_traits/add_reference.hpp>
+ #include <boost/type_traits/remove_reference.hpp>
+#endif
+
+namespace boost {
+
+namespace detail{
+
+template <bool DerivedFromNoncopyable, class T>
+struct is_copy_assignable_impl2 {
+
+// Intel compiler has problems with SFINAE for copy constructors and deleted functions:
+//
+// error: function *function_name* cannot be referenced -- it is a deleted function
+// static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval<T1&>()))* = 0);
+// ^
+//
+// MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
+// https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
+#if defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE)
+ typedef boost::type_traits::yes_type yes_type;
+ typedef boost::type_traits::no_type no_type;
+
+ template <class U>
+ static decltype(::boost::declval<U&>() = ::boost::declval<const U&>(), yes_type() ) test(int);
+
+ template <class>
+ static no_type test(...);
+
+ static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
+
+#else
+ static BOOST_DEDUCED_TYPENAME boost::add_reference<T>::type produce();
+
+ template <class T1>
+ static boost::type_traits::no_type test(T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0);
+
+ static boost::type_traits::yes_type test(...);
+ // If you see errors like this:
+ //
+ // `'T::operator=(const T&)' is private`
+ // `boost/type_traits/is_copy_assignable.hpp:NN:M: error: within this context`
+ //
+ // then you are trying to call that macro for a structure defined like that:
+ //
+ // struct T {
+ // ...
+ // private:
+ // T & operator=(const T &);
+ // ...
+ // };
+ //
+ // To fix that you must modify your structure:
+ //
+ // // C++03 and C++11 version
+ // struct T: private boost::noncopyable {
+ // ...
+ // private:
+ // T & operator=(const T &);
+ // ...
+ // };
+ //
+ // // C++11 version
+ // struct T {
+ // ...
+ // private:
+ // T& operator=(const T &) = delete;
+ // ...
+ // };
+ BOOST_STATIC_CONSTANT(bool, value = (
+ sizeof(test(produce())) == sizeof(boost::type_traits::yes_type)
+ ));
+ #endif
+};
+
+template <class T>
+struct is_copy_assignable_impl2<true, T> {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+};
+
+template <class T>
+struct is_copy_assignable_impl {
+
+#if !defined(BOOST_TT_CXX11_IS_COPY_ASSIGNABLE)
+ //For compilers without decltype, at least return false on const types, arrays
+ //types derived from boost::noncopyable and types defined as BOOST_MOVEABLE_BUT_NOT_COPYABLE
+ typedef BOOST_DEDUCED_TYPENAME boost::remove_reference<T>::type unreferenced_t;
+ BOOST_STATIC_CONSTANT(bool, value = (
+ boost::detail::is_copy_assignable_impl2<
+ boost::is_noncopyable<T>::value
+ || boost::is_const<unreferenced_t>::value || boost::is_array<unreferenced_t>::value
+ ,T
+ >::value
+ ));
+ #else
+ BOOST_STATIC_CONSTANT(bool, value = (
+ boost::detail::is_copy_assignable_impl2<
+ boost::is_noncopyable<T>::value,T
+ >::value
+ ));
+ #endif
+};
+
+} // namespace detail
+
+template <class T> struct is_copy_assignable : public integral_constant<bool, ::boost::detail::is_copy_assignable_impl<T>::value>{};
+template <> struct is_copy_assignable<void> : public false_type{};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+template <> struct is_copy_assignable<void const> : public false_type{};
+template <> struct is_copy_assignable<void const volatile> : public false_type{};
+template <> struct is_copy_assignable<void volatile> : public false_type{};
+#endif
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_COPY_ASSIGNABLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_copy_constructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_copy_constructible.hpp
new file mode 100644
index 00000000000..ef97e18eb56
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_copy_constructible.hpp
@@ -0,0 +1,185 @@
+// (C) Copyright Antony Polukhin 2013.
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED
+#define BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_DECLTYPE) && !BOOST_WORKAROUND(BOOST_MSVC, < 1800) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40900)
+
+#include <boost/type_traits/is_constructible.hpp>
+
+#if !BOOST_WORKAROUND(BOOST_MSVC, <= 1800)
+
+namespace boost {
+
+template <class T> struct is_copy_constructible : public boost::is_constructible<T, const T&>{};
+
+template <> struct is_copy_constructible<void> : public false_type{};
+template <> struct is_copy_constructible<void const> : public false_type{};
+template <> struct is_copy_constructible<void const volatile> : public false_type{};
+template <> struct is_copy_constructible<void volatile> : public false_type{};
+
+} // namespace boost
+
+#else
+//
+// Special version for VC12 which has a problem when a base class (such as non_copyable) has a deleted
+// copy constructor. In this case the compiler thinks there really is a copy-constructor and tries to
+// instantiate the deleted member. std::is_copy_constructible has the same issue (or at least returns
+// an incorrect value, which just defers the issue into the users code) as well. We can at least fix
+// boost::non_copyable as a base class as a special case:
+//
+#include <boost/type_traits/is_noncopyable.hpp>
+
+namespace boost {
+
+ namespace detail
+ {
+
+ template <class T, bool b> struct is_copy_constructible_imp : public boost::is_constructible<T, const T&>{};
+ template <class T> struct is_copy_constructible_imp<T, true> : public false_type{};
+
+ }
+
+ template <class T> struct is_copy_constructible : public detail::is_copy_constructible_imp<T, is_noncopyable<T>::value>{};
+
+ template <> struct is_copy_constructible<void> : public false_type{};
+ template <> struct is_copy_constructible<void const> : public false_type{};
+ template <> struct is_copy_constructible<void const volatile> : public false_type{};
+ template <> struct is_copy_constructible<void volatile> : public false_type{};
+
+} // namespace boost
+
+#endif
+
+#else
+
+#include <boost/type_traits/detail/yes_no_type.hpp>
+#include <boost/type_traits/is_noncopyable.hpp>
+#include <boost/type_traits/add_reference.hpp>
+#include <boost/type_traits/is_rvalue_reference.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/declval.hpp>
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4181)
+#endif
+
+namespace boost {
+
+ namespace detail{
+
+ template <bool DerivedFromNoncopyable, class T>
+ struct is_copy_constructible_impl2 {
+
+ // Intel compiler has problems with SFINAE for copy constructors and deleted functions:
+ //
+ // error: function *function_name* cannot be referenced -- it is a deleted function
+ // static boost::type_traits::yes_type test(T1&, decltype(T1(boost::declval<T1&>()))* = 0);
+ // ^
+ //
+ // MSVC 12.0 (Visual 2013) has problems when the copy constructor has been deleted. See:
+ // https://connect.microsoft.com/VisualStudio/feedback/details/800328/std-is-copy-constructible-is-broken
+#if !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) && !defined(BOOST_INTEL_CXX_VERSION) && !(defined(BOOST_MSVC) && _MSC_VER == 1800)
+
+#ifdef BOOST_NO_CXX11_DECLTYPE
+ template <class T1>
+ static boost::type_traits::yes_type test(const T1&, boost::mpl::int_<sizeof(T1(boost::declval<const T1&>()))>* = 0);
+#else
+ template <class T1>
+ static boost::type_traits::yes_type test(const T1&, decltype(T1(boost::declval<const T1&>()))* = 0);
+#endif
+
+ static boost::type_traits::no_type test(...);
+#else
+ template <class T1>
+ static boost::type_traits::no_type test(const T1&, typename T1::boost_move_no_copy_constructor_or_assign* = 0);
+ static boost::type_traits::yes_type test(...);
+#endif
+
+ // If you see errors like this:
+ //
+ // `'T::T(const T&)' is private`
+ // `boost/type_traits/is_copy_constructible.hpp:68:5: error: within this context`
+ //
+ // then you are trying to call that macro for a structure defined like that:
+ //
+ // struct T {
+ // ...
+ // private:
+ // T(const T &);
+ // ...
+ // };
+ //
+ // To fix that you must modify your structure:
+ //
+ // // C++03 and C++11 version
+ // struct T: private boost::noncopyable {
+ // ...
+ // private:
+ // T(const T &);
+ // ...
+ // };
+ //
+ // // C++11 version
+ // struct T {
+ // ...
+ // private:
+ // T(const T &) = delete;
+ // ...
+ // };
+ BOOST_STATIC_CONSTANT(bool, value = (
+ sizeof(test(
+ boost::declval<BOOST_DEDUCED_TYPENAME boost::add_reference<T const>::type>()
+ )) == sizeof(boost::type_traits::yes_type)
+ &&
+ !boost::is_rvalue_reference<T>::value
+ && !boost::is_array<T>::value
+ ));
+ };
+
+ template <class T>
+ struct is_copy_constructible_impl2<true, T> {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+ template <class T>
+ struct is_copy_constructible_impl {
+
+ BOOST_STATIC_CONSTANT(bool, value = (
+ boost::detail::is_copy_constructible_impl2<
+ boost::is_noncopyable<T>::value,
+ T
+ >::value
+ ));
+ };
+
+ } // namespace detail
+
+ template <class T> struct is_copy_constructible : public integral_constant<bool, ::boost::detail::is_copy_constructible_impl<T>::value>{};
+ template <> struct is_copy_constructible<void> : public false_type{};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+ template <> struct is_copy_constructible<void const> : public false_type{};
+ template <> struct is_copy_constructible<void volatile> : public false_type{};
+ template <> struct is_copy_constructible<void const volatile> : public false_type{};
+#endif
+
+} // namespace boost
+
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+#endif
+
+#endif // BOOST_TT_IS_COPY_CONSTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_default_constructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_default_constructible.hpp
index 9a4a0a78b29..9a4a0a78b29 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_default_constructible.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_default_constructible.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_destructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_destructible.hpp
index cc72fb7a9a5..cc72fb7a9a5 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_destructible.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_destructible.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_empty.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_empty.hpp
index ef288c518b1..ef288c518b1 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_empty.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_empty.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_enum.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_enum.hpp
index eada480a658..eada480a658 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_enum.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_enum.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_final.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_final.hpp
index 21ac93f3410..21ac93f3410 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_final.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_final.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_float.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_float.hpp
index 7bf7d1f8207..7bf7d1f8207 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_float.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_float.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_floating_point.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_floating_point.hpp
index 196c900cf93..196c900cf93 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_floating_point.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_floating_point.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_function.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_function.hpp
new file mode 100644
index 00000000000..8556235a437
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_function.hpp
@@ -0,0 +1,27 @@
+
+// Copyright 2000 John Maddock (john@johnmaddock.co.uk)
+// Copyright 2002 Aleksey Gurtovoy (agurtovoy@meta-comm.com)
+//
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_FUNCTION_HPP_INCLUDED
+#define BOOST_TT_IS_FUNCTION_HPP_INCLUDED
+
+#include <boost/type_traits/detail/config.hpp>
+#include <boost/config/workaround.hpp>
+
+#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
+
+#include <boost/type_traits/detail/is_function_cxx_11.hpp>
+
+#else
+
+#include <boost/type_traits/detail/is_function_cxx_03.hpp>
+
+#endif
+
+#endif // BOOST_TT_IS_FUNCTION_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_fundamental.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_fundamental.hpp
index f58767a4890..f58767a4890 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_fundamental.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_fundamental.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_integral.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_integral.hpp
index 7a7e54bb701..7a7e54bb701 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_integral.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_integral.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_list_constructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_list_constructible.hpp
index 4a9f84ad3c1..4a9f84ad3c1 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_list_constructible.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_list_constructible.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_lvalue_reference.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_lvalue_reference.hpp
index e94d7874817..e94d7874817 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_lvalue_reference.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_lvalue_reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_member_function_pointer.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_member_function_pointer.hpp
new file mode 100644
index 00000000000..9b5dbbf228b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_member_function_pointer.hpp
@@ -0,0 +1,26 @@
+
+// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard
+// Hinnant & John Maddock 2000.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+
+#ifndef BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
+#define BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
+
+#include <boost/type_traits/detail/config.hpp>
+
+#ifdef BOOST_TT_HAS_ASCCURATE_IS_FUNCTION
+
+#include <boost/type_traits/detail/is_member_function_pointer_cxx_11.hpp>
+
+#else
+
+#include <boost/type_traits/detail/is_member_function_pointer_cxx_03.hpp>
+
+#endif
+
+#endif // BOOST_TT_IS_MEMBER_FUNCTION_POINTER_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_member_object_pointer.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_member_object_pointer.hpp
index cb7cf14abfc..cb7cf14abfc 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_member_object_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_member_object_pointer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_member_pointer.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_member_pointer.hpp
index 9757afc950a..9757afc950a 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_member_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_member_pointer.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_noncopyable.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_noncopyable.hpp
new file mode 100644
index 00000000000..787103ea710
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_noncopyable.hpp
@@ -0,0 +1,39 @@
+#ifndef BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED
+#define BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED
+
+//
+// Copyright 2018 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+// is_noncopyable<T> returns whether T is derived from boost::noncopyable
+//
+
+#include <boost/type_traits/is_base_and_derived.hpp>
+
+namespace boost
+{
+
+#ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+#define BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+
+// boost::noncopyable derives from noncopyable_::base_token to enable us
+// to recognize it. The definition is macro-guarded so that we can replicate
+// it here without including boost/core/noncopyable.hpp, which is in Core.
+
+namespace noncopyable_
+{
+ struct base_token {};
+}
+
+#endif // #ifndef BOOST_NONCOPYABLE_BASE_TOKEN_DEFINED
+
+template<class T> struct is_noncopyable: is_base_and_derived<noncopyable_::base_token, T>
+{
+};
+
+} // namespace boost
+
+#endif // #ifndef BOOST_TYPE_TRAITS_IS_NONCOPYABLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_assignable.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_assignable.hpp
new file mode 100644
index 00000000000..c6194de8e81
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_assignable.hpp
@@ -0,0 +1,92 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Eric Friedman 2002-2003.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
+#define BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/has_trivial_move_assign.hpp>
+#include <boost/type_traits/has_nothrow_assign.hpp>
+#include <boost/type_traits/is_array.hpp>
+#include <boost/type_traits/is_reference.hpp>
+#include <boost/type_traits/enable_if.hpp>
+#include <boost/type_traits/declval.hpp>
+#include <boost/type_traits/is_complete.hpp>
+#include <boost/static_assert.hpp>
+
+namespace boost {
+
+#ifdef BOOST_IS_NOTHROW_MOVE_ASSIGN
+
+template <class T>
+struct is_nothrow_move_assignable : public integral_constant<bool, BOOST_IS_NOTHROW_MOVE_ASSIGN(T)>
+{
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_assignable must be complete types");
+};
+template <class T> struct is_nothrow_move_assignable<T const> : public false_type{};
+template <class T> struct is_nothrow_move_assignable<T volatile> : public false_type{};
+template <class T> struct is_nothrow_move_assignable<T const volatile> : public false_type{};
+template <class T> struct is_nothrow_move_assignable<T&> : public false_type{};
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
+template <class T> struct is_nothrow_move_assignable<T&&> : public false_type{};
+#endif
+
+#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+
+namespace detail{
+
+template <class T, class Enable = void>
+struct false_or_cpp11_noexcept_move_assignable: public ::boost::false_type {};
+
+template <class T>
+struct false_or_cpp11_noexcept_move_assignable <
+ T,
+ typename ::boost::enable_if_<sizeof(T) && BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>::type
+ > : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(::boost::declval<T&>() = ::boost::declval<T>())>
+{};
+
+}
+
+template <class T>
+struct is_nothrow_move_assignable : public integral_constant<bool, ::boost::detail::false_or_cpp11_noexcept_move_assignable<T>::value>
+{
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_assignable must be complete types");
+};
+
+template <class T> struct is_nothrow_move_assignable<T const> : public ::boost::false_type {};
+template <class T> struct is_nothrow_move_assignable<T const volatile> : public ::boost::false_type{};
+template <class T> struct is_nothrow_move_assignable<T volatile> : public ::boost::false_type{};
+template <class T> struct is_nothrow_move_assignable<T&> : public ::boost::false_type{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <class T> struct is_nothrow_move_assignable<T&&> : public ::boost::false_type{};
+#endif
+
+#else
+
+template <class T>
+struct is_nothrow_move_assignable : public integral_constant<bool,
+ (::boost::has_trivial_move_assign<T>::value || ::boost::has_nothrow_assign<T>::value) && ! ::boost::is_array<T>::value>
+{
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_assignable must be complete types");
+};
+
+#endif
+
+
+template <> struct is_nothrow_move_assignable<void> : public false_type{};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+template <> struct is_nothrow_move_assignable<void const> : public false_type{};
+template <> struct is_nothrow_move_assignable<void const volatile> : public false_type{};
+template <> struct is_nothrow_move_assignable<void volatile> : public false_type{};
+#endif
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_NOTHROW_MOVE_ASSIGNABLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_constructible.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_constructible.hpp
new file mode 100644
index 00000000000..60c2994d054
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_move_constructible.hpp
@@ -0,0 +1,97 @@
+
+// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
+// (C) Copyright Eric Friedman 2002-2003.
+// (C) Copyright Antony Polukhin 2013.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
+#define BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
+
+#include <cstddef> // size_t
+#include <boost/config.hpp>
+#include <boost/type_traits/intrinsics.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/type_traits/is_complete.hpp>
+#include <boost/static_assert.hpp>
+
+#ifdef BOOST_IS_NOTHROW_MOVE_CONSTRUCT
+
+namespace boost {
+
+template <class T>
+struct is_nothrow_move_constructible : public integral_constant<bool, BOOST_IS_NOTHROW_MOVE_CONSTRUCT(T)>
+{
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_constructible must be complete types");
+};
+
+template <class T> struct is_nothrow_move_constructible<volatile T> : public ::boost::false_type {};
+template <class T> struct is_nothrow_move_constructible<const volatile T> : public ::boost::false_type{};
+
+#elif !defined(BOOST_NO_CXX11_NOEXCEPT) && !defined(BOOST_NO_SFINAE_EXPR) && !BOOST_WORKAROUND(BOOST_GCC_VERSION, < 40700)
+
+#include <boost/type_traits/declval.hpp>
+#include <boost/type_traits/enable_if.hpp>
+
+namespace boost{ namespace detail{
+
+template <class T, class Enable = void>
+struct false_or_cpp11_noexcept_move_constructible: public ::boost::false_type {};
+
+template <class T>
+struct false_or_cpp11_noexcept_move_constructible <
+ T,
+ typename ::boost::enable_if_<sizeof(T) && BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>::type
+ > : public ::boost::integral_constant<bool, BOOST_NOEXCEPT_EXPR(T(::boost::declval<T>()))>
+{};
+
+}
+
+template <class T> struct is_nothrow_move_constructible
+ : public integral_constant<bool, ::boost::detail::false_or_cpp11_noexcept_move_constructible<T>::value>
+{
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_constructible must be complete types");
+};
+
+template <class T> struct is_nothrow_move_constructible<volatile T> : public ::boost::false_type {};
+template <class T> struct is_nothrow_move_constructible<const volatile T> : public ::boost::false_type{};
+template <class T, std::size_t N> struct is_nothrow_move_constructible<T[N]> : public ::boost::false_type{};
+template <class T> struct is_nothrow_move_constructible<T[]> : public ::boost::false_type{};
+
+#else
+
+#include <boost/type_traits/has_trivial_move_constructor.hpp>
+#include <boost/type_traits/has_nothrow_copy.hpp>
+#include <boost/type_traits/is_array.hpp>
+
+namespace boost{
+
+template <class T>
+struct is_nothrow_move_constructible
+ : public integral_constant<bool,
+ (::boost::has_trivial_move_constructor<T>::value || ::boost::has_nothrow_copy<T>::value) && !::boost::is_array<T>::value>
+{
+ BOOST_STATIC_ASSERT_MSG(boost::is_complete<T>::value, "Arguments to is_nothrow_move_constructible must be complete types");
+};
+
+#endif
+
+template <> struct is_nothrow_move_constructible<void> : false_type{};
+#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
+template <> struct is_nothrow_move_constructible<void const> : false_type{};
+template <> struct is_nothrow_move_constructible<void volatile> : false_type{};
+template <> struct is_nothrow_move_constructible<void const volatile> : false_type{};
+#endif
+// References are always trivially constructible, even if the thing they reference is not:
+template <class T> struct is_nothrow_move_constructible<T&> : public ::boost::true_type{};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <class T> struct is_nothrow_move_constructible<T&&> : public ::boost::true_type{};
+#endif
+
+} // namespace boost
+
+#endif // BOOST_TT_IS_NOTHROW_MOVE_CONSTRUCTIBLE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_swappable.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_swappable.hpp
index 10ad9239a92..10ad9239a92 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_nothrow_swappable.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_nothrow_swappable.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_object.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_object.hpp
index fc9d2f25d32..fc9d2f25d32 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_object.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_object.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_pod.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_pod.hpp
index 9bd196257ac..9bd196257ac 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_pod.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_pod.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_pointer.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_pointer.hpp
index 44b06c227ed..44b06c227ed 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_pointer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_polymorphic.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_polymorphic.hpp
index 722d8b46b2d..722d8b46b2d 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_polymorphic.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_polymorphic.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_reference.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_reference.hpp
index 85f0a63204e..85f0a63204e 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_reference.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_reference.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_rvalue_reference.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_rvalue_reference.hpp
new file mode 100644
index 00000000000..37d33c95a40
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_rvalue_reference.hpp
@@ -0,0 +1,29 @@
+
+// (C) Copyright John Maddock 2010.
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED
+#define BOOST_TT_IS_RVALUE_REFERENCE_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/type_traits/integral_constant.hpp>
+
+namespace boost {
+
+template <class T> struct is_rvalue_reference : public false_type {};
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
+template <class T> struct is_rvalue_reference<T&&> : public true_type {};
+#endif
+
+} // namespace boost
+
+#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && defined(BOOST_MSVC) && BOOST_WORKAROUND(BOOST_MSVC, <= 1700)
+#include <boost/type_traits/detail/is_rvalue_reference_msvc10_fix.hpp>
+#endif
+
+#endif // BOOST_TT_IS_REFERENCE_HPP_INCLUDED
+
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_same.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_same.hpp
index d16f4b2b1a3..d16f4b2b1a3 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_same.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_same.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_scalar.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_scalar.hpp
index 30314405965..30314405965 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_scalar.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_scalar.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_signed.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_signed.hpp
index 70ca2e47967..70ca2e47967 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_signed.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_signed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_stateless.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_stateless.hpp
index f9266da5b8c..f9266da5b8c 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_stateless.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_stateless.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_union.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_union.hpp
index c5e1a960196..c5e1a960196 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_union.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_union.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_unsigned.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_unsigned.hpp
index c4c54af7b36..c4c54af7b36 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_unsigned.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_unsigned.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/is_virtual_base_of.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_virtual_base_of.hpp
new file mode 100644
index 00000000000..60ffbc86dec
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_virtual_base_of.hpp
@@ -0,0 +1,146 @@
+// (C) Copyright Daniel Frey and Robert Ramey 2009.
+// (C) Copyright Balint Cserni 2017
+// Use, modification and distribution are subject to the Boost Software License,
+// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt).
+//
+// See http://www.boost.org/libs/type_traits for most recent version including documentation.
+
+#ifndef BOOST_TT_IS_VIRTUAL_BASE_OF_HPP_INCLUDED
+#define BOOST_TT_IS_VIRTUAL_BASE_OF_HPP_INCLUDED
+
+#include <boost/type_traits/is_base_of.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/make_void.hpp>
+#include <utility>
+
+namespace boost {
+ namespace detail {
+
+
+#ifdef BOOST_MSVC
+#pragma warning( push )
+#pragma warning( disable : 4584 4250 4594)
+#elif defined(__GNUC__) && (__GNUC__ >= 4)
+#pragma GCC system_header
+#endif
+
+#if !defined(BOOST_NO_SFINAE_EXPR) && !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && !defined(BOOST_NO_CXX11_NULLPTR) && !BOOST_WORKAROUND(BOOST_GCC, < 40800)
+
+ // Implementation based on the standard's rules of explicit type conversions.
+ // A pointer to an object of *derived* class type may be explicitly converted to a pointer to an *unambiguous* *base* class type.
+ // A pointer to an object of an *unambiguous* *non-virtual* *base* class type may be explicitly converted to a pointer of a *derived* class type.
+ // Therefore Derived has a virtual base Base if and only if
+ // (1) a Derived* can be converted to Base* (so the base class is unambiguous, which comes necessarily from virtual inheritance)
+ // (2) a Base* cannot be converted to Derived* (so the base class is either ambiguous or virtual)
+ // With both conditions true, Base must be a virtual base of Derived.
+ // The "is_base_of" is only needed so the compiler can (but is not required to) error out if the types are incomplete.
+ // This is in league with the the expected behaviour.
+
+ template<class T, class U>
+ constexpr bool is_virtual_base_impl(...) { return true; }
+
+ // C-style casts have the power to ignore inheritance visibility while still act as a static_cast.
+ // They can also fall back to the behaviour of reinterpret_cast, which allows is_virtual_base_of to work on non-class types too.
+ // Note that because we are casting pointers there can be no user-defined operators to interfere.
+ template<class T, class U,
+ boost::void_t<decltype((U*)(std::declval<T*>()))>* =
+ nullptr>
+ constexpr bool is_virtual_base_impl(int) { return false; }
+
+ } // namespace detail
+
+ template<class T, class U>
+ struct is_virtual_base_of : public
+ boost::integral_constant<
+ bool,
+ boost::is_base_of<T, U>::value &&
+ detail::is_virtual_base_impl<T, U>(0) &&
+ !detail::is_virtual_base_impl<U, T>(0)
+ > {};
+
+#else
+
+ template<typename Base, typename Derived, typename tag>
+ struct is_virtual_base_of_impl
+ {
+ BOOST_STATIC_CONSTANT(bool, value = false);
+ };
+
+ template<typename Base, typename Derived>
+ struct is_virtual_base_of_impl<Base, Derived, true_type>
+ {
+ union max_align
+ {
+ unsigned u;
+ unsigned long ul;
+ void* v;
+ double d;
+ long double ld;
+#ifndef BOOST_NO_LONG_LONG
+ long long ll;
+#endif
+ };
+#ifdef __BORLANDC__
+ struct boost_type_traits_internal_struct_X : public virtual Derived, public virtual Base
+ {
+ boost_type_traits_internal_struct_X();
+ boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&);
+ boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&);
+ ~boost_type_traits_internal_struct_X()throw();
+ max_align data[4];
+ };
+ struct boost_type_traits_internal_struct_Y : public virtual Derived
+ {
+ boost_type_traits_internal_struct_Y();
+ boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&);
+ boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&);
+ ~boost_type_traits_internal_struct_Y()throw();
+ max_align data[4];
+ };
+#else
+ struct boost_type_traits_internal_struct_X : public Derived, virtual Base
+ {
+ boost_type_traits_internal_struct_X();
+ boost_type_traits_internal_struct_X(const boost_type_traits_internal_struct_X&);
+ boost_type_traits_internal_struct_X& operator=(const boost_type_traits_internal_struct_X&);
+ ~boost_type_traits_internal_struct_X()throw();
+ max_align data[16];
+ };
+ struct boost_type_traits_internal_struct_Y : public Derived
+ {
+ boost_type_traits_internal_struct_Y();
+ boost_type_traits_internal_struct_Y(const boost_type_traits_internal_struct_Y&);
+ boost_type_traits_internal_struct_Y& operator=(const boost_type_traits_internal_struct_Y&);
+ ~boost_type_traits_internal_struct_Y()throw();
+ max_align data[16];
+ };
+#endif
+ BOOST_STATIC_CONSTANT(bool, value = (sizeof(boost_type_traits_internal_struct_X) == sizeof(boost_type_traits_internal_struct_Y)));
+ };
+
+ template<typename Base, typename Derived>
+ struct is_virtual_base_of_impl2
+ {
+ typedef boost::integral_constant<bool, (boost::is_base_of<Base, Derived>::value && !boost::is_same<Base, Derived>::value)> tag_type;
+ typedef is_virtual_base_of_impl<Base, Derived, tag_type> imp;
+ BOOST_STATIC_CONSTANT(bool, value = imp::value);
+ };
+
+} // namespace detail
+
+template <class Base, class Derived> struct is_virtual_base_of : public integral_constant<bool, (::boost::detail::is_virtual_base_of_impl2<Base, Derived>::value)> {};
+
+#endif
+
+template <class Base, class Derived> struct is_virtual_base_of<Base&, Derived> : public false_type{};
+template <class Base, class Derived> struct is_virtual_base_of<Base, Derived&> : public false_type{};
+template <class Base, class Derived> struct is_virtual_base_of<Base&, Derived&> : public false_type{};
+
+#ifdef BOOST_MSVC
+#pragma warning( pop )
+#endif
+
+} // namespace boost
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_void.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_void.hpp
index 183f8abf562..183f8abf562 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_void.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_void.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/is_volatile.hpp b/src/third_party/boost-1.69.0/boost/type_traits/is_volatile.hpp
index 5b8e716b473..5b8e716b473 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/is_volatile.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/is_volatile.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/make_signed.hpp b/src/third_party/boost-1.69.0/boost/type_traits/make_signed.hpp
index 6d8b1fb8d4b..6d8b1fb8d4b 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/make_signed.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/make_signed.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/make_unsigned.hpp b/src/third_party/boost-1.69.0/boost/type_traits/make_unsigned.hpp
index 17a8a5b9296..17a8a5b9296 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/make_unsigned.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/make_unsigned.hpp
diff --git a/src/third_party/boost-1.69.0/boost/type_traits/make_void.hpp b/src/third_party/boost-1.69.0/boost/type_traits/make_void.hpp
new file mode 100644
index 00000000000..b8a72ef5716
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/type_traits/make_void.hpp
@@ -0,0 +1,52 @@
+/*
+Copyright 2017 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License,
+Version 1.0. (See accompanying file LICENSE_1_0.txt
+or copy at http://www.boost.org/LICENSE_1_0.txt)
+*/
+
+#ifndef BOOST_TT_MAKE_VOID_HPP_INCLUDED
+#define BOOST_TT_MAKE_VOID_HPP_INCLUDED
+
+#include <boost/config.hpp>
+
+namespace boost {
+
+#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
+template<class...>
+struct make_void {
+ typedef void type;
+};
+
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+template<class... Ts>
+using void_t = typename make_void<Ts...>::type;
+#endif
+
+#else /* BOOST_NO_CXX11_VARIADIC_TEMPLATES */
+
+template<class = void,
+ class = void,
+ class = void,
+ class = void,
+ class = void>
+struct make_void {
+ typedef void type;
+};
+
+#if !defined(BOOST_NO_CXX11_TEMPLATE_ALIASES)
+template<class A = void,
+ class B = void,
+ class C = void,
+ class D = void,
+ class E = void>
+using void_t = typename make_void<A, B, C, D, E>::type;
+#endif
+
+#endif
+
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/object_traits.hpp b/src/third_party/boost-1.69.0/boost/type_traits/object_traits.hpp
index c812a62e25b..c812a62e25b 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/object_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/object_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/promote.hpp b/src/third_party/boost-1.69.0/boost/type_traits/promote.hpp
index 1678e1ca3ec..1678e1ca3ec 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/promote.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/promote.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/rank.hpp b/src/third_party/boost-1.69.0/boost/type_traits/rank.hpp
index 1f820f1a55d..1f820f1a55d 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/rank.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/rank.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_all_extents.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_all_extents.hpp
index b9736db57e7..b9736db57e7 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_all_extents.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_all_extents.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_bounds.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_bounds.hpp
index cd0565d28f1..cd0565d28f1 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_bounds.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_bounds.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_const.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_const.hpp
index 6f1a193740b..6f1a193740b 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_const.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_const.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_cv.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_cv.hpp
index 57a96f29d63..57a96f29d63 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_cv.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_cv.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_cv_ref.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_cv_ref.hpp
index 118945a6a05..118945a6a05 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_cv_ref.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_cv_ref.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_extent.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_extent.hpp
index 55d57301b70..55d57301b70 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_extent.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_extent.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_pointer.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_pointer.hpp
index ce32f186aee..ce32f186aee 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_pointer.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_pointer.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_reference.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_reference.hpp
index 70949fbb2a9..70949fbb2a9 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_reference.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_reference.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/remove_volatile.hpp b/src/third_party/boost-1.69.0/boost/type_traits/remove_volatile.hpp
index bf2c55796a1..bf2c55796a1 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/remove_volatile.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/remove_volatile.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/same_traits.hpp b/src/third_party/boost-1.69.0/boost/type_traits/same_traits.hpp
index dab7dac7830..dab7dac7830 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/same_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/same_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/transform_traits.hpp b/src/third_party/boost-1.69.0/boost/type_traits/transform_traits.hpp
index 7a82f1ca919..7a82f1ca919 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/transform_traits.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/transform_traits.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/type_identity.hpp b/src/third_party/boost-1.69.0/boost/type_traits/type_identity.hpp
index 4a03a13a391..4a03a13a391 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/type_identity.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/type_identity.hpp
diff --git a/src/third_party/boost-1.68.0/boost/type_traits/type_with_alignment.hpp b/src/third_party/boost-1.69.0/boost/type_traits/type_with_alignment.hpp
index 8da51231893..8da51231893 100644
--- a/src/third_party/boost-1.68.0/boost/type_traits/type_with_alignment.hpp
+++ b/src/third_party/boost-1.69.0/boost/type_traits/type_with_alignment.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/constant.hpp b/src/third_party/boost-1.69.0/boost/typeof/constant.hpp
new file mode 100644
index 00000000000..ed0f2cd47c3
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/constant.hpp
@@ -0,0 +1,26 @@
+/*
+Copyright 2018 Glen Joseph Fernandes
+(glenjofe@gmail.com)
+
+Distributed under the Boost Software License, Version 1.0.
+(http://www.boost.org/LICENSE_1_0.txt)
+*/
+#ifndef BOOST_TYPEOF_CONSTANT_HPP
+#define BOOST_TYPEOF_CONSTANT_HPP
+
+#include <boost/config.hpp>
+
+namespace boost {
+namespace type_of {
+
+template<class T, T N>
+struct constant {
+ typedef constant<T, N> type;
+ typedef constant<T, N + 1> next;
+ BOOST_STATIC_CONSTANT(T, value=N);
+};
+
+} /* type_of */
+} /* boost */
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/typeof/decltype.hpp b/src/third_party/boost-1.69.0/boost/typeof/decltype.hpp
index 7e990a8cef9..7e990a8cef9 100644
--- a/src/third_party/boost-1.68.0/boost/typeof/decltype.hpp
+++ b/src/third_party/boost-1.69.0/boost/typeof/decltype.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/encode_decode.hpp b/src/third_party/boost-1.69.0/boost/typeof/encode_decode.hpp
new file mode 100644
index 00000000000..97fcab9b886
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/encode_decode.hpp
@@ -0,0 +1,58 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// boostinspect:nounnamed
+
+#ifndef BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
+#define BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
+
+#ifndef BOOST_TYPEOF_SUPPRESS_UNNAMED_NAMESPACE
+
+# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace { namespace boost_typeof {
+# define BOOST_TYPEOF_END_ENCODE_NS }}
+# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost_typeof
+
+#else
+
+# define BOOST_TYPEOF_BEGIN_ENCODE_NS namespace boost { namespace type_of {
+# define BOOST_TYPEOF_END_ENCODE_NS }}
+# define BOOST_TYPEOF_ENCODE_NS_QUALIFIER boost::type_of
+
+# define BOOST_TYPEOF_TEXT "unnamed namespace is off"
+# include <boost/typeof/message.hpp>
+
+#endif
+
+BOOST_TYPEOF_BEGIN_ENCODE_NS
+
+template<class V, class Type_Not_Registered_With_Typeof_System>
+struct encode_type_impl;
+
+template<class T, class Iter>
+struct decode_type_impl
+{
+ typedef int type; // MSVC ETI workaround
+};
+
+template<class T>
+struct decode_nested_template_helper_impl;
+
+BOOST_TYPEOF_END_ENCODE_NS
+
+namespace boost { namespace type_of {
+
+ template<class V, class T>
+ struct encode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_type_impl<V, T>
+ {};
+
+ template<class Iter>
+ struct decode_type : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::decode_type_impl<
+ typename Iter::type,
+ typename Iter::next
+ >
+ {};
+}}
+
+#endif//BOOST_TYPEOF_ENCODE_DECODE_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/typeof/encode_decode_params.hpp b/src/third_party/boost-1.69.0/boost/typeof/encode_decode_params.hpp
new file mode 100644
index 00000000000..1218d72e57e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/encode_decode_params.hpp
@@ -0,0 +1,34 @@
+// Copyright (C) 2005 Arkadiy Vertleyb
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
+#define BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+
+// Assumes iter0 contains initial iterator
+
+#define BOOST_TYPEOF_DECODE_PARAM(z, n, text) \
+ typedef boost::type_of::decode_type<iter##n> decode##n; \
+ typedef typename decode##n::type p##n; \
+ typedef typename decode##n::iter BOOST_PP_CAT(iter, BOOST_PP_INC(n));
+
+#define BOOST_TYPEOF_DECODE_PARAMS(n)\
+ BOOST_PP_REPEAT(n, BOOST_TYPEOF_DECODE_PARAM, ~)
+
+// The P0, P1, ... PN are encoded and added to V
+
+#define BOOST_TYPEOF_ENCODE_PARAMS_BEGIN(z, n, text)\
+ typename boost::type_of::encode_type<
+
+#define BOOST_TYPEOF_ENCODE_PARAMS_END(z, n, text)\
+ , BOOST_PP_CAT(P, n)>::type
+
+#define BOOST_TYPEOF_ENCODE_PARAMS(n, ID) \
+ BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_BEGIN, ~) \
+ typename boost::type_of::push_back<V, boost::type_of::constant<std::size_t,ID> >::type \
+ BOOST_PP_REPEAT(n, BOOST_TYPEOF_ENCODE_PARAMS_END, ~)
+
+#endif//BOOST_TYPEOF_ENCODE_DECODE_PARAMS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/typeof/int_encoding.hpp b/src/third_party/boost-1.69.0/boost/typeof/int_encoding.hpp
new file mode 100644
index 00000000000..3984174f7d6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/int_encoding.hpp
@@ -0,0 +1,117 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_INT_ENCODING_HPP_INCLUDED
+#define BOOST_TYPEOF_INT_ENCODING_HPP_INCLUDED
+
+#include <boost/config.hpp>
+#include <boost/typeof/constant.hpp>
+
+namespace boost { namespace type_of {
+
+ template<class T> struct get_unsigned
+ {
+ typedef T type;
+ };
+ template<> struct get_unsigned<signed char>
+ {
+ typedef unsigned char type;
+ };
+ template<> struct get_unsigned<char>
+ {
+ typedef unsigned char type;
+ };
+ template<> struct get_unsigned<short>
+ {
+ typedef unsigned short type;
+ };
+ template<> struct get_unsigned<int>
+ {
+ typedef unsigned int type;
+ };
+ template<> struct get_unsigned<long>
+ {
+ typedef unsigned long type;
+ };
+
+ //////////////////////////
+
+ template<std::size_t n, bool Overflow>
+ struct pack
+ {
+ BOOST_STATIC_CONSTANT(std::size_t , value=((n + 1) * 2 + (Overflow ? 1 : 0)));
+ };
+
+ template<std::size_t m>
+ struct unpack
+ {
+ BOOST_STATIC_CONSTANT(std::size_t, value = (m / 2) - 1);
+ BOOST_STATIC_CONSTANT(std::size_t, overflow = (m % 2 == 1));
+ };
+
+ ////////////////////////////////
+
+ template<class V, std::size_t n, bool overflow = (n >= 0x3fffffff)>
+ struct encode_size_t : push_back<
+ V,
+ boost::type_of::constant<std::size_t,pack<n, false>::value>
+ >
+ {};
+
+ template<class V, std::size_t n>
+ struct encode_size_t<V, n, true> : push_back<typename push_back<
+ V,
+ boost::type_of::constant<std::size_t,pack<n % 0x3ffffffe, true>::value> >::type,
+ boost::type_of::constant<std::size_t,n / 0x3ffffffe>
+ >
+ {};
+
+ template<class V, class T, T n>
+ struct encode_integral : encode_size_t< V, (typename get_unsigned<T>::type)n,(((typename get_unsigned<T>::type)n)>=0x3fffffff) >
+ {};
+
+ template<class V, bool b>
+ struct encode_integral<V, bool, b> : encode_size_t< V, b?1:0, false>
+ {};
+ ///////////////////////////
+
+ template<std::size_t n, class Iter, bool overflow>
+ struct decode_size_t;
+
+ template<std::size_t n, class Iter>
+ struct decode_size_t<n, Iter, false>
+ {
+ BOOST_STATIC_CONSTANT(std::size_t,value = n);
+ typedef Iter iter;
+ };
+
+ template<std::size_t n, class Iter>
+ struct decode_size_t<n, Iter, true>
+ {
+ BOOST_STATIC_CONSTANT(std::size_t,m = Iter::type::value);
+
+ BOOST_STATIC_CONSTANT(std::size_t,value = (std::size_t)m * 0x3ffffffe + n);
+ typedef typename Iter::next iter;
+ };
+
+ template<class T, class Iter>
+ struct decode_integral
+ {
+ typedef decode_integral<T,Iter> self_t;
+ BOOST_STATIC_CONSTANT(std::size_t,m = Iter::type::value);
+
+ BOOST_STATIC_CONSTANT(std::size_t,n = unpack<m>::value);
+
+ BOOST_STATIC_CONSTANT(std::size_t,overflow = unpack<m>::overflow);
+
+ typedef typename Iter::next nextpos;
+
+ static const T value = (T)(std::size_t)decode_size_t<n, nextpos, overflow>::value;
+
+ typedef typename decode_size_t<self_t::n, nextpos, self_t::overflow>::iter iter;
+ };
+
+}}//namespace
+
+#endif//BOOST_TYPEOF_INT_ENCODING_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/integral_template_param.hpp b/src/third_party/boost-1.69.0/boost/typeof/integral_template_param.hpp
index 8543be7f080..8543be7f080 100644
--- a/src/third_party/boost-1.68.0/boost/typeof/integral_template_param.hpp
+++ b/src/third_party/boost-1.69.0/boost/typeof/integral_template_param.hpp
diff --git a/src/third_party/boost-1.68.0/boost/typeof/message.hpp b/src/third_party/boost-1.69.0/boost/typeof/message.hpp
index cabbb828c30..cabbb828c30 100644
--- a/src/third_party/boost-1.68.0/boost/typeof/message.hpp
+++ b/src/third_party/boost-1.69.0/boost/typeof/message.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/modifiers.hpp b/src/third_party/boost-1.69.0/boost/typeof/modifiers.hpp
new file mode 100644
index 00000000000..104af7c3f25
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/modifiers.hpp
@@ -0,0 +1,121 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
+#define BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
+
+#include <boost/typeof/encode_decode.hpp>
+#include <boost/preprocessor/facilities/identity.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+// modifiers
+
+#define BOOST_TYPEOF_modifier_support(ID, Fun)\
+ template<class V, class T> struct encode_type_impl<V, Fun(T)>\
+ {\
+ typedef\
+ typename boost::type_of::encode_type<\
+ typename boost::type_of::push_back<\
+ V\
+ , boost::type_of::constant<std::size_t,ID> >::type\
+ , T>::type\
+ type;\
+ };\
+ template<class Iter> struct decode_type_impl<boost::type_of::constant<std::size_t,ID>, Iter>\
+ {\
+ typedef boost::type_of::decode_type<Iter> d1;\
+ typedef Fun(typename d1::type) type;\
+ typedef typename d1::iter iter;\
+ }
+
+
+#define BOOST_TYPEOF_const_fun(T) const T
+#define BOOST_TYPEOF_volatile_fun(T) volatile T
+#define BOOST_TYPEOF_volatile_const_fun(T) volatile const T
+#define BOOST_TYPEOF_pointer_fun(T) T*
+#define BOOST_TYPEOF_reference_fun(T) T&
+
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
+//Borland incorrectly handles T const, T const volatile and T volatile.
+//It drops the decoration no matter what, so we need to try to handle T* const etc. without loosing the top modifier.
+#define BOOST_TYPEOF_const_pointer_fun(T) T const *
+#define BOOST_TYPEOF_const_reference_fun(T) T const &
+#define BOOST_TYPEOF_volatile_pointer_fun(T) T volatile*
+#define BOOST_TYPEOF_volatile_reference_fun(T) T volatile&
+#define BOOST_TYPEOF_volatile_const_pointer_fun(T) T volatile const *
+#define BOOST_TYPEOF_volatile_const_reference_fun(T) T volatile const &
+#endif
+
+BOOST_TYPEOF_BEGIN_ENCODE_NS
+
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_const_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_pointer_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_reference_fun);
+
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_pointer_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_const_reference_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_pointer_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_reference_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_const_pointer_fun);
+BOOST_TYPEOF_modifier_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_TYPEOF_volatile_const_reference_fun);
+#endif
+
+BOOST_TYPEOF_END_ENCODE_NS
+
+#undef BOOST_TYPEOF_modifier_support
+#undef BOOST_TYPEOF_const_fun
+#undef BOOST_TYPEOF_volatile_fun
+#undef BOOST_TYPEOF_volatile_const_fun
+#undef BOOST_TYPEOF_pointer_fun
+#undef BOOST_TYPEOF_reference_fun
+
+#if defined(__BORLANDC__) && (__BORLANDC__ < 0x600)
+#undef BOOST_TYPEOF_const_pointer_fun
+#undef BOOST_TYPEOF_const_reference_fun
+#undef BOOST_TYPEOF_volatile_pointer_fun
+#undef BOOST_TYPEOF_volatile_reference_fun
+#undef BOOST_TYPEOF_volatile_const_pointer_fun
+#undef BOOST_TYPEOF_volatile_const_reference_fun
+#endif
+
+// arrays
+
+#define BOOST_TYPEOF_array_support(ID, Qualifier)\
+ template<class V, class T, int N>\
+ struct encode_type_impl<V, Qualifier() T[N]>\
+ {\
+ typedef\
+ typename boost::type_of::encode_type<\
+ typename boost::type_of::push_back<\
+ typename boost::type_of::push_back<\
+ V\
+ , boost::type_of::constant<std::size_t,ID> >::type\
+ , boost::type_of::constant<std::size_t,N> >::type\
+ , T>::type\
+ type;\
+ };\
+ template<class Iter>\
+ struct decode_type_impl<boost::type_of::constant<std::size_t,ID>, Iter>\
+ {\
+ enum{n = Iter::type::value};\
+ typedef boost::type_of::decode_type<typename Iter::next> d;\
+ typedef typename d::type Qualifier() type[n];\
+ typedef typename d::iter iter;\
+ }
+
+BOOST_TYPEOF_BEGIN_ENCODE_NS
+
+BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_EMPTY);
+BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(const));
+BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(volatile));
+BOOST_TYPEOF_array_support(BOOST_TYPEOF_UNIQUE_ID(), BOOST_PP_IDENTITY(volatile const));
+BOOST_TYPEOF_END_ENCODE_NS
+
+#undef BOOST_TYPEOF_array_support
+
+#endif//BOOST_TYPEOF_MODIFIERS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/typeof/msvc/typeof_impl.hpp b/src/third_party/boost-1.69.0/boost/typeof/msvc/typeof_impl.hpp
new file mode 100644
index 00000000000..87bf3d1ce38
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/msvc/typeof_impl.hpp
@@ -0,0 +1,203 @@
+
+// Copyright (C) 2005 Igor Chesnokov, mailto:ichesnokov@gmail.com (VC 6.5,VC 7.1 + counter code)
+// Copyright (C) 2005-2007 Peder Holt (VC 7.0 + framework)
+// Copyright (C) 2006 Steven Watanabe (VC 8.0)
+
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
+# define BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
+
+# include <boost/config.hpp>
+# include <boost/config/workaround.hpp>
+# include <boost/typeof/constant.hpp>
+# include <boost/type_traits/enable_if.hpp>
+# include <boost/type_traits/is_function.hpp>
+
+# include <typeinfo>
+
+namespace boost
+{
+ namespace type_of
+ {
+
+ //Compile time constant code
+# if defined(_MSC_EXTENSIONS)
+ template<int N> struct the_counter;
+
+ template<typename T,int N = 5/*for similarity*/>
+ struct encode_counter
+ {
+ __if_exists(the_counter<N + 256>)
+ {
+ BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 257>::count));
+ }
+ __if_not_exists(the_counter<N + 256>)
+ {
+ __if_exists(the_counter<N + 64>)
+ {
+ BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 65>::count));
+ }
+ __if_not_exists(the_counter<N + 64>)
+ {
+ __if_exists(the_counter<N + 16>)
+ {
+ BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 17>::count));
+ }
+ __if_not_exists(the_counter<N + 16>)
+ {
+ __if_exists(the_counter<N + 4>)
+ {
+ BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 5>::count));
+ }
+ __if_not_exists(the_counter<N + 4>)
+ {
+ __if_exists(the_counter<N>)
+ {
+ BOOST_STATIC_CONSTANT(unsigned,count=(encode_counter<T,N + 1>::count));
+ }
+ __if_not_exists(the_counter<N>)
+ {
+ BOOST_STATIC_CONSTANT(unsigned,count=N);
+ typedef the_counter<N> type;
+ }
+ }
+ }
+ }
+ }
+ };
+
+# define BOOST_TYPEOF_INDEX(T) (encode_counter<T>::count)
+# define BOOST_TYPEOF_NEXT_INDEX(next)
+# else
+ template<int N> struct encode_counter : encode_counter<N - 1> {};
+ template<> struct encode_counter<0> {};
+
+ //Need to default to a larger value than 4, as due to MSVC's ETI errors. (sizeof(int)==4)
+ char (*encode_index(...))[5];
+
+# define BOOST_TYPEOF_INDEX(T) (sizeof(*boost::type_of::encode_index((boost::type_of::encode_counter<1005>*)0)))
+# define BOOST_TYPEOF_NEXT_INDEX(next) friend char (*encode_index(encode_counter<next>*))[next];
+# endif
+
+ //Typeof code
+
+# if BOOST_WORKAROUND(BOOST_MSVC,>=1400)
+ struct msvc_extract_type_default_param {};
+
+ template<typename ID, typename T = msvc_extract_type_default_param>
+ struct msvc_extract_type;
+
+ template<typename ID>
+ struct msvc_extract_type<ID, msvc_extract_type_default_param> {
+ template<bool>
+ struct id2type_impl;
+
+ typedef id2type_impl<true> id2type;
+ };
+
+ template<typename ID, typename T>
+ struct msvc_extract_type : msvc_extract_type<ID,msvc_extract_type_default_param>
+ {
+ template<>
+ struct id2type_impl<true> //VC8.0 specific bugfeature
+ {
+ typedef T type;
+ };
+ template<bool>
+ struct id2type_impl;
+
+ typedef id2type_impl<true> id2type;
+ };
+
+ template<typename T, typename ID>
+ struct msvc_register_type : msvc_extract_type<ID, T>
+ {
+ };
+# else
+ template<typename ID>
+ struct msvc_extract_type
+ {
+ struct id2type;
+ };
+
+ template<typename T, typename ID>
+ struct msvc_register_type : msvc_extract_type<ID>
+ {
+ typedef msvc_extract_type<ID> base_type;
+ struct base_type::id2type // This uses nice VC6.5 and VC7.1 bugfeature
+ {
+ typedef T type;
+ };
+ };
+# endif
+
+ template<int ID>
+ struct msvc_typeid_wrapper {
+ typedef typename msvc_extract_type<constant<int,ID> >::id2type id2type;
+ typedef typename id2type::type type;
+ };
+ //Workaround for ETI-bug for VC6 and VC7
+ template<>
+ struct msvc_typeid_wrapper<1> {
+ typedef msvc_typeid_wrapper<1> type;
+ };
+ //Workaround for ETI-bug for VC7.1
+ template<>
+ struct msvc_typeid_wrapper<4> {
+ typedef msvc_typeid_wrapper<4> type;
+ };
+
+ //Tie it all together
+ template<typename T>
+ struct encode_type
+ {
+ //Get the next available compile time constants index
+ BOOST_STATIC_CONSTANT(unsigned,value=BOOST_TYPEOF_INDEX(T));
+ //Instantiate the template
+ typedef typename msvc_register_type<T,constant<int,value> >::id2type type;
+ //Set the next compile time constants index
+ BOOST_STATIC_CONSTANT(unsigned,next=value+1);
+ //Increment the compile time constant (only needed when extensions are not active
+ BOOST_TYPEOF_NEXT_INDEX(next);
+ };
+
+ template<class T>
+ struct sizer
+ {
+ typedef char(*type)[encode_type<T>::value];
+ };
+ template<typename T> typename enable_if_<
+ !is_function<T>::value,
+ typename sizer<T>::type>::type encode_start(T const&);
+
+ template<typename T> typename enable_if_<
+ is_function<T>::value,
+ typename sizer<T>::type>::type encode_start(T&);
+ template<typename Organizer, typename T>
+ msvc_register_type<T,Organizer> typeof_register_type(const T&,Organizer* =0);
+
+# define BOOST_TYPEOF(expr) \
+ boost::type_of::msvc_typeid_wrapper<sizeof(*boost::type_of::encode_start(expr))>::type
+
+# define BOOST_TYPEOF_TPL(expr) typename BOOST_TYPEOF(expr)
+
+# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
+ struct name {\
+ enum {_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(expr))};\
+ typedef typename boost::type_of::msvc_extract_type<name>::id2type id2type;\
+ typedef typename id2type::type type;\
+ };
+
+# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
+ struct name {\
+ enum {_typeof_register_value=sizeof(boost::type_of::typeof_register_type<name>(expr))};\
+ typedef boost::type_of::msvc_extract_type<name>::id2type id2type;\
+ typedef id2type::type type;\
+ };
+
+ }
+}
+
+#endif//BOOST_TYPEOF_MSVC_TYPEOF_IMPL_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/typeof/native.hpp b/src/third_party/boost-1.69.0/boost/typeof/native.hpp
new file mode 100644
index 00000000000..f051235f8ad
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/native.hpp
@@ -0,0 +1,60 @@
+// Copyright (C) 2006 Arkadiy Vertleyb
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_NATIVE_HPP_INCLUDED
+#define BOOST_TYPEOF_NATIVE_HPP_INCLUDED
+
+#ifndef MSVC_TYPEOF_HACK
+
+#ifdef BOOST_NO_SFINAE
+
+namespace boost { namespace type_of {
+
+ template<class T>
+ T& ensure_obj(const T&);
+
+}}
+
+#else
+
+#include <boost/type_traits/enable_if.hpp>
+#include <boost/type_traits/is_function.hpp>
+
+namespace boost { namespace type_of {
+# ifdef BOOST_NO_SFINAE
+ template<class T>
+ T& ensure_obj(const T&);
+# else
+ template<typename T>
+ typename enable_if_<is_function<T>::value, T&>::type
+ ensure_obj(T&);
+
+ template<typename T>
+ typename enable_if_<!is_function<T>::value, T&>::type
+ ensure_obj(const T&);
+# endif
+}}
+
+#endif//BOOST_NO_SFINAE
+
+#define BOOST_TYPEOF(expr) BOOST_TYPEOF_KEYWORD(boost::type_of::ensure_obj(expr))
+#define BOOST_TYPEOF_TPL BOOST_TYPEOF
+
+#define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
+ struct name {\
+ typedef BOOST_TYPEOF_TPL(expr) type;\
+ };
+
+#define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
+ struct name {\
+ typedef BOOST_TYPEOF(expr) type;\
+ };
+
+#endif//MSVC_TYPEOF_HACK
+
+#define BOOST_TYPEOF_REGISTER_TYPE(x)
+#define BOOST_TYPEOF_REGISTER_TEMPLATE(x, params)
+
+#endif//BOOST_TYPEOF_NATIVE_HPP_INCLUDED
+
diff --git a/src/third_party/boost-1.69.0/boost/typeof/pointers_data_members.hpp b/src/third_party/boost-1.69.0/boost/typeof/pointers_data_members.hpp
new file mode 100644
index 00000000000..096980da31d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/pointers_data_members.hpp
@@ -0,0 +1,38 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
+#define BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
+
+#include <boost/typeof/encode_decode_params.hpp>
+#include <boost/typeof/encode_decode.hpp>
+
+#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
+
+BOOST_TYPEOF_BEGIN_ENCODE_NS
+
+enum {PTR_DATA_MEM_ID = BOOST_TYPEOF_UNIQUE_ID()};
+
+template<class V, class P0, class P1>
+struct encode_type_impl<V, P0 P1::*>
+{
+ typedef BOOST_TYPEOF_ENCODE_PARAMS(2, PTR_DATA_MEM_ID) type;
+};
+
+template<class Iter>
+struct decode_type_impl<boost::type_of::constant<std::size_t,PTR_DATA_MEM_ID>, Iter>
+{
+ typedef Iter iter0;
+ BOOST_TYPEOF_DECODE_PARAMS(2)
+
+ template<class T> struct workaround{
+ typedef p0 T::* type;
+ };
+ typedef typename decode_type_impl<boost::type_of::constant<std::size_t,PTR_DATA_MEM_ID>, Iter>::template workaround<p1>::type type;
+ typedef iter2 iter;
+};
+
+BOOST_TYPEOF_END_ENCODE_NS
+
+#endif//BOOST_TYPEOF_POINTERS_DATA_MEMBERS_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/register_functions.hpp b/src/third_party/boost-1.69.0/boost/typeof/register_functions.hpp
index 407bba39091..407bba39091 100644
--- a/src/third_party/boost-1.68.0/boost/typeof/register_functions.hpp
+++ b/src/third_party/boost-1.69.0/boost/typeof/register_functions.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/register_functions_iterate.hpp b/src/third_party/boost-1.69.0/boost/typeof/register_functions_iterate.hpp
new file mode 100644
index 00000000000..d3a3d237f01
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/register_functions_iterate.hpp
@@ -0,0 +1,135 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/typeof/encode_decode_params.hpp>
+
+#define n BOOST_PP_ITERATION()
+
+// function pointers
+
+template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
+struct encode_type_impl<V, R(*)(BOOST_PP_ENUM_PARAMS(n, P))>
+{
+ typedef R BOOST_PP_CAT(P, n);
+ typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_PTR_ID + n) type;
+};
+
+template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
+struct encode_type_impl<V, R(*)(BOOST_PP_ENUM_PARAMS(n, P) ...)>
+{
+ typedef R BOOST_PP_CAT(P, n);
+ typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_VAR_PTR_ID + n) type;
+};
+
+template<class Iter>
+struct decode_type_impl<boost::type_of::constant<std::size_t,FUN_PTR_ID + n>, Iter>
+{
+ typedef Iter iter0;
+ BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
+ typedef BOOST_PP_CAT(p, n)(*type)(BOOST_PP_ENUM_PARAMS(n, p));
+ typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
+};
+
+template<class Iter>
+struct decode_type_impl<boost::type_of::constant<std::size_t,FUN_VAR_PTR_ID + n>, Iter>
+{
+ typedef Iter iter0;
+ BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
+ typedef BOOST_PP_CAT(p, n)(*type)(BOOST_PP_ENUM_PARAMS(n, p) ...);
+ typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
+};
+
+#ifndef BOOST_TYPEOF_NO_FUNCTION_TYPES
+
+ // function references
+
+ template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
+ struct encode_type_impl<V, R(&)(BOOST_PP_ENUM_PARAMS(n, P))>
+ {
+ typedef R BOOST_PP_CAT(P, n);
+ typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_REF_ID + n) type;
+ };
+
+ template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
+ struct encode_type_impl<V, R(&)(BOOST_PP_ENUM_PARAMS(n, P) ...)>
+ {
+ typedef R BOOST_PP_CAT(P, n);
+ typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_VAR_REF_ID + n) type;
+ };
+
+ template<class Iter>
+ struct decode_type_impl<boost::type_of::constant<std::size_t,FUN_REF_ID + n>, Iter>
+ {
+ typedef Iter iter0;
+ BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
+ typedef BOOST_PP_CAT(p, n)(&type)(BOOST_PP_ENUM_PARAMS(n, p));
+ typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
+ };
+
+ template<class Iter>
+ struct decode_type_impl<boost::type_of::constant<std::size_t,FUN_VAR_REF_ID + n>, Iter>
+ {
+ typedef Iter iter0;
+ BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
+ typedef BOOST_PP_CAT(p, n)(&type)(BOOST_PP_ENUM_PARAMS(n, p) ...);
+ typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
+ };
+
+ // functions
+
+ template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
+ struct encode_type_impl<V, R(BOOST_PP_ENUM_PARAMS(n, P))>
+ {
+ typedef R BOOST_PP_CAT(P, n);
+ typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_ID + n) type;
+ };
+
+ template<class V, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
+ struct encode_type_impl<V, R(BOOST_PP_ENUM_PARAMS(n, P) ...)>
+ {
+ typedef R BOOST_PP_CAT(P, n);
+ typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_INC(n), FUN_VAR_ID + n) type;
+ };
+
+ template<class Iter>
+ struct decode_type_impl<boost::type_of::constant<std::size_t,FUN_ID + n>, Iter>
+ {
+ typedef Iter iter0;
+ BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
+ typedef BOOST_PP_CAT(p, n)(type)(BOOST_PP_ENUM_PARAMS(n, p));
+ typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
+ };
+
+ template<class Iter>
+ struct decode_type_impl<boost::type_of::constant<std::size_t,FUN_VAR_ID + n>, Iter>
+ {
+ typedef Iter iter0;
+ BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_INC(n))
+ typedef BOOST_PP_CAT(p, n)(type)(BOOST_PP_ENUM_PARAMS(n, p) ...);
+ typedef BOOST_PP_CAT(iter, BOOST_PP_INC(n)) iter;
+ };
+
+#endif//BOOST_TYPEOF_NO_FUNCTION_TYPES
+
+#ifndef BOOST_TYPEOF_NO_MEMBER_FUNCTION_TYPES
+// member functions
+
+#define BOOST_TYPEOF_qualifier
+#define BOOST_TYPEOF_id MEM_FUN_ID
+#include <boost/typeof/register_mem_functions.hpp>
+
+#define BOOST_TYPEOF_qualifier const
+#define BOOST_TYPEOF_id CONST_MEM_FUN_ID
+#include <boost/typeof/register_mem_functions.hpp>
+
+#define BOOST_TYPEOF_qualifier volatile
+#define BOOST_TYPEOF_id VOLATILE_MEM_FUN_ID
+#include <boost/typeof/register_mem_functions.hpp>
+
+#define BOOST_TYPEOF_qualifier volatile const
+#define BOOST_TYPEOF_id VOLATILE_CONST_MEM_FUN_ID
+#include <boost/typeof/register_mem_functions.hpp>
+
+#undef n
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/typeof/register_fundamental.hpp b/src/third_party/boost-1.69.0/boost/typeof/register_fundamental.hpp
index a6164bafa39..a6164bafa39 100644
--- a/src/third_party/boost-1.68.0/boost/typeof/register_fundamental.hpp
+++ b/src/third_party/boost-1.69.0/boost/typeof/register_fundamental.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/register_mem_functions.hpp b/src/third_party/boost-1.69.0/boost/typeof/register_mem_functions.hpp
new file mode 100644
index 00000000000..f4a42d78f39
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/register_mem_functions.hpp
@@ -0,0 +1,32 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/typeof/encode_decode_params.hpp>
+
+// member functions
+
+template<class V, class T, class R BOOST_PP_ENUM_TRAILING_PARAMS(n, class P)>
+struct encode_type_impl<V, R(T::*)(BOOST_PP_ENUM_PARAMS(n, P)) BOOST_TYPEOF_qualifier>
+{
+ typedef R BOOST_PP_CAT(P, n);
+ typedef T BOOST_PP_CAT(P, BOOST_PP_INC(n));
+ typedef BOOST_TYPEOF_ENCODE_PARAMS(BOOST_PP_ADD(n, 2), BOOST_TYPEOF_id + n) type;
+};
+
+template<class Iter>
+struct decode_type_impl<boost::type_of::constant<std::size_t,BOOST_TYPEOF_id + n>, Iter>
+{
+ typedef Iter iter0;
+ BOOST_TYPEOF_DECODE_PARAMS(BOOST_PP_ADD(n, 2))
+ template<class T> struct workaround{
+ typedef BOOST_PP_CAT(p, n)(T::*type)(BOOST_PP_ENUM_PARAMS(n, p)) BOOST_TYPEOF_qualifier;
+ };
+ typedef typename workaround<BOOST_PP_CAT(p, BOOST_PP_INC(n))>::type type;
+ typedef BOOST_PP_CAT(iter, BOOST_PP_ADD(n, 2)) iter;
+};
+
+// undef parameters
+
+#undef BOOST_TYPEOF_id
+#undef BOOST_TYPEOF_qualifier
diff --git a/src/third_party/boost-1.69.0/boost/typeof/template_encoding.hpp b/src/third_party/boost-1.69.0/boost/typeof/template_encoding.hpp
new file mode 100644
index 00000000000..0bb7ed36a2d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/template_encoding.hpp
@@ -0,0 +1,160 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+// Copyright (C) 2005 Peder Holt
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
+#define BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
+
+#include <boost/preprocessor/cat.hpp>
+#include <boost/preprocessor/repetition/enum_trailing.hpp>
+#include <boost/preprocessor/control/iif.hpp>
+#include <boost/preprocessor/detail/is_unary.hpp>
+#include <boost/preprocessor/repetition/repeat.hpp>
+#include <boost/preprocessor/tuple/eat.hpp>
+#include <boost/preprocessor/seq/transform.hpp>
+#include <boost/preprocessor/seq/for_each_i.hpp>
+#include <boost/preprocessor/seq/cat.hpp>
+
+#include <boost/typeof/encode_decode.hpp>
+#include <boost/typeof/int_encoding.hpp>
+
+#include <boost/typeof/type_template_param.hpp>
+#include <boost/typeof/integral_template_param.hpp>
+#include <boost/typeof/template_template_param.hpp>
+
+#ifdef __BORLANDC__
+#define BOOST_TYPEOF_QUALIFY(P) self_t::P
+#else
+#define BOOST_TYPEOF_QUALIFY(P) P
+#endif
+// The template parameter description, entered by the user,
+// is converted into a polymorphic "object"
+// that is used to generate the code responsible for
+// encoding/decoding the parameter, etc.
+
+// make sure to cat the sequence first, and only then add the prefix.
+#define BOOST_TYPEOF_MAKE_OBJ(elem) BOOST_PP_CAT(\
+ BOOST_TYPEOF_MAKE_OBJ,\
+ BOOST_PP_SEQ_CAT((_) BOOST_TYPEOF_TO_SEQ(elem))\
+ )
+
+#define BOOST_TYPEOF_TO_SEQ(tokens) BOOST_TYPEOF_ ## tokens ## _BOOST_TYPEOF
+
+// BOOST_TYPEOF_REGISTER_TEMPLATE
+
+#define BOOST_TYPEOF_REGISTER_TEMPLATE_EXPLICIT_ID(Name, Params, Id)\
+ BOOST_TYPEOF_REGISTER_TEMPLATE_IMPL(\
+ Name,\
+ BOOST_TYPEOF_MAKE_OBJS(BOOST_TYPEOF_TOSEQ(Params)),\
+ BOOST_PP_SEQ_SIZE(BOOST_TYPEOF_TOSEQ(Params)),\
+ Id)
+
+#define BOOST_TYPEOF_REGISTER_TEMPLATE(Name, Params)\
+ BOOST_TYPEOF_REGISTER_TEMPLATE_EXPLICIT_ID(Name, Params, BOOST_TYPEOF_UNIQUE_ID())
+
+#define BOOST_TYPEOF_OBJECT_MAKER(s, data, elem)\
+ BOOST_TYPEOF_MAKE_OBJ(elem)
+
+#define BOOST_TYPEOF_MAKE_OBJS(Params)\
+ BOOST_PP_SEQ_TRANSFORM(BOOST_TYPEOF_OBJECT_MAKER, ~, Params)
+
+// As suggested by Paul Mensonides:
+
+#define BOOST_TYPEOF_TOSEQ(x)\
+ BOOST_PP_IIF(\
+ BOOST_PP_IS_UNARY(x),\
+ x BOOST_PP_TUPLE_EAT(3), BOOST_PP_REPEAT\
+ )(x, BOOST_TYPEOF_TOSEQ_2, ~)
+
+#define BOOST_TYPEOF_TOSEQ_2(z, n, _) (class)
+
+// BOOST_TYPEOF_VIRTUAL
+
+#define BOOST_TYPEOF_CAT_4(a, b, c, d) BOOST_TYPEOF_CAT_4_I(a, b, c, d)
+#define BOOST_TYPEOF_CAT_4_I(a, b, c, d) a ## b ## c ## d
+
+#define BOOST_TYPEOF_VIRTUAL(Fun, Obj)\
+ BOOST_TYPEOF_CAT_4(BOOST_TYPEOF_, BOOST_PP_SEQ_HEAD(Obj), _, Fun)
+
+// BOOST_TYPEOF_SEQ_ENUM[_TRAILING][_1]
+// Two versions provided due to reentrancy issue
+
+#define BOOST_TYPEOF_SEQ_EXPAND_ELEMENT(z,n,seq)\
+ BOOST_PP_SEQ_ELEM(0,seq) (z,n,BOOST_PP_SEQ_ELEM(n,BOOST_PP_SEQ_ELEM(1,seq)))
+
+#define BOOST_TYPEOF_SEQ_ENUM(seq,macro)\
+ BOOST_PP_ENUM(BOOST_PP_SEQ_SIZE(seq),BOOST_TYPEOF_SEQ_EXPAND_ELEMENT,(macro)(seq))
+
+#define BOOST_TYPEOF_SEQ_ENUM_TRAILING(seq,macro)\
+ BOOST_PP_ENUM_TRAILING(BOOST_PP_SEQ_SIZE(seq),BOOST_TYPEOF_SEQ_EXPAND_ELEMENT,(macro)(seq))
+
+#define BOOST_TYPEOF_SEQ_EXPAND_ELEMENT_1(z,n,seq)\
+ BOOST_PP_SEQ_ELEM(0,seq) (z,n,BOOST_PP_SEQ_ELEM(n,BOOST_PP_SEQ_ELEM(1,seq)))
+
+#define BOOST_TYPEOF_SEQ_ENUM_1(seq,macro)\
+ BOOST_PP_ENUM(BOOST_PP_SEQ_SIZE(seq),BOOST_TYPEOF_SEQ_EXPAND_ELEMENT_1,(macro)(seq))
+
+#define BOOST_TYPEOF_SEQ_ENUM_TRAILING_1(seq,macro)\
+ BOOST_PP_ENUM_TRAILING(BOOST_PP_SEQ_SIZE(seq),BOOST_TYPEOF_SEQ_EXPAND_ELEMENT_1,(macro)(seq))
+
+//
+
+#define BOOST_TYPEOF_PLACEHOLDER(z, n, elem)\
+ BOOST_TYPEOF_VIRTUAL(PLACEHOLDER, elem)(elem)
+
+#define BOOST_TYPEOF_PLACEHOLDER_TYPES(z, n, elem)\
+ BOOST_TYPEOF_VIRTUAL(PLACEHOLDER_TYPES, elem)(elem, n)
+
+#define BOOST_TYPEOF_REGISTER_TEMPLATE_ENCODE_PARAM(r, data, n, elem)\
+ BOOST_TYPEOF_VIRTUAL(ENCODE, elem)(elem, n)
+
+#define BOOST_TYPEOF_REGISTER_TEMPLATE_DECODE_PARAM(r, data, n, elem)\
+ BOOST_TYPEOF_VIRTUAL(DECODE, elem)(elem, n)
+
+#define BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR(z, n, elem) \
+ BOOST_TYPEOF_VIRTUAL(EXPANDTYPE, elem)(elem) BOOST_PP_CAT(P, n)
+
+#define BOOST_TYPEOF_REGISTER_DEFAULT_TEMPLATE_TYPE(Name,Params,ID)\
+ Name< BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params), P) >
+
+//Since we are creating an internal decode struct, we need to use different template names, T instead of P.
+#define BOOST_TYPEOF_REGISTER_DECODER_TYPE_PARAM_PAIR(z,n,elem) \
+ BOOST_TYPEOF_VIRTUAL(EXPANDTYPE, elem)(elem) BOOST_PP_CAT(T, n)
+
+//Default template param decoding
+
+#define BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TYPE(Name,Params)\
+ typedef Name<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),BOOST_TYPEOF_QUALIFY(P))> type;
+
+//Branch the decoding
+#define BOOST_TYPEOF_TYPEDEF_DECODED_TYPE(Name,Params)\
+ BOOST_PP_IF(BOOST_TYPEOF_HAS_TEMPLATES(Params),\
+ BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TEMPLATE_TYPE,\
+ BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TYPE)(Name,Params)
+
+#define BOOST_TYPEOF_REGISTER_TEMPLATE_IMPL(Name, Params, Size, ID)\
+ BOOST_TYPEOF_BEGIN_ENCODE_NS\
+ BOOST_TYPEOF_REGISTER_TEMPLATE_TEMPLATE_IMPL(Name, Params, ID)\
+ template<class V\
+ BOOST_TYPEOF_SEQ_ENUM_TRAILING(Params, BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR)\
+ >\
+ struct encode_type_impl<V, Name<BOOST_PP_ENUM_PARAMS(Size, P)> >\
+ {\
+ typedef typename boost::type_of::push_back<V, boost::type_of::constant<std::size_t,ID> >::type V0;\
+ BOOST_PP_SEQ_FOR_EACH_I(BOOST_TYPEOF_REGISTER_TEMPLATE_ENCODE_PARAM, ~, Params)\
+ typedef BOOST_PP_CAT(V, Size) type;\
+ };\
+ template<class Iter>\
+ struct decode_type_impl<boost::type_of::constant<std::size_t,ID>, Iter>\
+ {\
+ typedef decode_type_impl<boost::type_of::constant<std::size_t,ID>, Iter> self_t;\
+ typedef boost::type_of::constant<std::size_t,ID> self_id;\
+ typedef Iter iter0;\
+ BOOST_PP_SEQ_FOR_EACH_I(BOOST_TYPEOF_REGISTER_TEMPLATE_DECODE_PARAM, ~, Params)\
+ BOOST_TYPEOF_TYPEDEF_DECODED_TYPE(Name, Params)\
+ typedef BOOST_PP_CAT(iter, Size) iter;\
+ };\
+ BOOST_TYPEOF_END_ENCODE_NS
+
+#endif//BOOST_TYPEOF_TEMPLATE_ENCODING_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/typeof/template_template_param.hpp b/src/third_party/boost-1.69.0/boost/typeof/template_template_param.hpp
new file mode 100644
index 00000000000..6f0a329aa98
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/template_template_param.hpp
@@ -0,0 +1,149 @@
+// Copyright (C) 2005 Peder Holt
+// Copyright (C) 2005 Arkadiy Vertleyb
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
+#define BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
+
+#include <boost/preprocessor/logical/or.hpp>
+#include <boost/preprocessor/seq/fold_left.hpp>
+#include <boost/preprocessor/seq/enum.hpp>
+
+#define BOOST_TYPEOF_MAKE_OBJ_template(x) BOOST_TYPEOF_TEMPLATE_PARAM(x)
+#define BOOST_TYPEOF_TEMPLATE(X) template(X) BOOST_TYPEOF_EAT
+#define BOOST_TYPEOF_template(X) (template(X))
+
+#define BOOST_TYPEOF_TEMPLATE_PARAM(Params)\
+ (TEMPLATE_PARAM)\
+ (Params)
+
+#define BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(This)\
+ BOOST_TYPEOF_TOSEQ(BOOST_PP_SEQ_ELEM(1, This))
+
+//Encode / decode this
+#define BOOST_TYPEOF_TEMPLATE_PARAM_ENCODE(This, n)\
+ typedef typename boost::type_of::encode_template<BOOST_PP_CAT(V, n),\
+ BOOST_PP_CAT(P, n)<BOOST_TYPEOF_SEQ_ENUM(BOOST_TYPEOF_MAKE_OBJS(BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(This)),BOOST_TYPEOF_PLACEHOLDER) >\
+ >::type BOOST_PP_CAT(V, BOOST_PP_INC(n));
+
+#define BOOST_TYPEOF_TEMPLATE_PARAM_DECODE(This, n)\
+ typedef boost::type_of::decode_template< BOOST_PP_CAT(iter, n) > BOOST_PP_CAT(d, n);\
+ typedef typename BOOST_PP_CAT(d, n)::type BOOST_PP_CAT(P, n);\
+ typedef typename BOOST_PP_CAT(d, n)::iter BOOST_PP_CAT(iter,BOOST_PP_INC(n));
+
+// template<class, unsigned int, ...> class
+#define BOOST_TYPEOF_TEMPLATE_PARAM_EXPANDTYPE(This) \
+ template <BOOST_PP_SEQ_ENUM(BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(This)) > class
+
+#define BOOST_TYPEOF_TEMPLATE_PARAM_PLACEHOLDER(Param)\
+ Nested_Template_Template_Arguments_Not_Supported
+
+//'template<class,int> class' is reduced to 'class'
+#define BOOST_TYPEOF_TEMPLATE_PARAM_DECLARATION_TYPE(Param) class
+
+// T3<int, (unsigned int)0, ...>
+#define BOOST_TYPEOF_TEMPLATE_PARAM_PLACEHOLDER_TYPES(Param, n)\
+ BOOST_PP_CAT(T,n)<BOOST_TYPEOF_SEQ_ENUM_1(BOOST_TYPEOF_MAKE_OBJS(BOOST_TYPEOF_TEMPLATE_PARAM_GETPARAMS(Param)),BOOST_TYPEOF_PLACEHOLDER) >
+
+#define BOOST_TYPEOF_TEMPLATE_PARAM_ISTEMPLATE 1
+
+////////////////////////////
+// move to encode_decode?
+
+BOOST_TYPEOF_BEGIN_ENCODE_NS
+
+template<class V, class Type_Not_Registered_With_Typeof_System> struct encode_template_impl;
+template<class T, class Iter> struct decode_template_impl;
+
+BOOST_TYPEOF_END_ENCODE_NS
+
+namespace boost { namespace type_of {
+
+ template<class V, class T> struct encode_template
+ : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::encode_template_impl<V, T>
+ {};
+
+ template<class Iter> struct decode_template
+ : BOOST_TYPEOF_ENCODE_NS_QUALIFIER::decode_template_impl<typename Iter::type, typename Iter::next>
+ {};
+}}
+
+////////////////////////////
+// move to template_encoding.hpp?
+
+//Template template registration
+#define BOOST_TYPEOF_REGISTER_TYPE_FOR_TEMPLATE_TEMPLATE(Name,Params,ID)\
+ template<class V\
+ BOOST_TYPEOF_SEQ_ENUM_TRAILING(Params,BOOST_TYPEOF_REGISTER_TEMPLATE_PARAM_PAIR)\
+ >\
+ struct encode_template_impl<V,Name<\
+ BOOST_PP_ENUM_PARAMS(\
+ BOOST_PP_SEQ_SIZE(Params),\
+ P)> >\
+ : boost::type_of::push_back<V, boost::type_of::constant<std::size_t,ID> >\
+ {\
+ };\
+ template<class Iter> struct decode_template_impl<boost::type_of::constant<std::size_t,ID>, Iter>\
+ {\
+ BOOST_PP_REPEAT(BOOST_PP_SEQ_SIZE(Params),BOOST_TYPEOF_TYPEDEF_INT_PN,_)\
+ typedef Name<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_PLACEHOLDER) > type;\
+ typedef Iter iter;\
+ };
+
+#define BOOST_TYPEOF_TYPEDEF_INT_PN(z,n,Params) typedef int BOOST_PP_CAT(P,n);
+
+#ifdef __BORLANDC__
+#define BOOST_TYPEOF_DECODE_NESTED_TEMPLATE_HELPER_NAME BOOST_PP_CAT(\
+ BOOST_PP_CAT(\
+ BOOST_PP_CAT(\
+ decode_nested_template_helper,\
+ BOOST_TYPEOF_REGISTRATION_GROUP\
+ ),0x10000\
+ ),__LINE__\
+ )
+#define BOOST_TYPEOF_REGISTER_DECODE_NESTED_TEMPLATE_HELPER_IMPL(Name,Params,ID)\
+ struct BOOST_TYPEOF_DECODE_NESTED_TEMPLATE_HELPER_NAME {\
+ template<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_REGISTER_DECLARE_DECODER_TYPE_PARAM_PAIR) >\
+ struct decode_params;\
+ template<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_REGISTER_DECODER_TYPE_PARAM_PAIR) >\
+ struct decode_params<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_PLACEHOLDER_TYPES) >\
+ {\
+ typedef Name<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),T)> type;\
+ };\
+ };
+//Template template param decoding
+#define BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TEMPLATE_TYPE(Name,Params)\
+ typedef typename BOOST_TYPEOF_DECODE_NESTED_TEMPLATE_HELPER_NAME::decode_params<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),P)>::type type;
+
+#else
+#define BOOST_TYPEOF_REGISTER_DECODE_NESTED_TEMPLATE_HELPER_IMPL(Name,Params,ID)
+
+//Template template param decoding
+#define BOOST_TYPEOF_TYPEDEF_DECODED_TEMPLATE_TEMPLATE_TYPE(Name,Params)\
+ template<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_REGISTER_DECLARE_DECODER_TYPE_PARAM_PAIR) >\
+ struct decode_params;\
+ template<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_REGISTER_DECODER_TYPE_PARAM_PAIR) >\
+ struct decode_params<BOOST_TYPEOF_SEQ_ENUM(Params,BOOST_TYPEOF_PLACEHOLDER_TYPES) >\
+ {\
+ typedef Name<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),T)> type;\
+ };\
+ typedef typename decode_params<BOOST_PP_ENUM_PARAMS(BOOST_PP_SEQ_SIZE(Params),P)>::type type;
+#endif
+#define BOOST_TYPEOF_REGISTER_DECLARE_DECODER_TYPE_PARAM_PAIR(z,n,elem) \
+ BOOST_TYPEOF_VIRTUAL(DECLARATION_TYPE, elem)(elem) BOOST_PP_CAT(T, n)
+
+// BOOST_TYPEOF_HAS_TEMPLATES
+#define BOOST_TYPEOF_HAS_TEMPLATES(Params)\
+ BOOST_PP_SEQ_FOLD_LEFT(BOOST_TYPEOF_HAS_TEMPLATES_OP, 0, Params)
+
+#define BOOST_TYPEOF_HAS_TEMPLATES_OP(s, state, elem)\
+ BOOST_PP_OR(state, BOOST_TYPEOF_VIRTUAL(ISTEMPLATE, elem))
+
+//Define template template arguments
+#define BOOST_TYPEOF_REGISTER_TEMPLATE_TEMPLATE_IMPL(Name,Params,ID)\
+ BOOST_PP_IF(BOOST_TYPEOF_HAS_TEMPLATES(Params),\
+ BOOST_TYPEOF_REGISTER_DECODE_NESTED_TEMPLATE_HELPER_IMPL,\
+ BOOST_TYPEOF_REGISTER_TYPE_FOR_TEMPLATE_TEMPLATE)(Name,Params,ID)
+
+#endif //BOOST_TYPEOF_TEMPLATE_TEMPLATE_PARAM_HPP_INCLUDED
diff --git a/src/third_party/boost-1.69.0/boost/typeof/type_encoding.hpp b/src/third_party/boost-1.69.0/boost/typeof/type_encoding.hpp
new file mode 100644
index 00000000000..adc4b5eb452
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/type_encoding.hpp
@@ -0,0 +1,27 @@
+// Copyright (C) 2004 Arkadiy Vertleyb
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
+#define BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
+
+#define BOOST_TYPEOF_REGISTER_TYPE_IMPL(T, Id) \
+ \
+ template<class V> struct encode_type_impl<V, T > \
+ : boost::type_of::push_back<V, boost::type_of::constant<std::size_t,Id> > \
+ {}; \
+ template<class Iter> struct decode_type_impl<boost::type_of::constant<std::size_t,Id>, Iter> \
+ { \
+ typedef T type; \
+ typedef Iter iter; \
+ };
+
+#define BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, Id) \
+ BOOST_TYPEOF_BEGIN_ENCODE_NS \
+ BOOST_TYPEOF_REGISTER_TYPE_IMPL(Type, Id) \
+ BOOST_TYPEOF_END_ENCODE_NS
+
+#define BOOST_TYPEOF_REGISTER_TYPE(Type) \
+ BOOST_TYPEOF_REGISTER_TYPE_EXPLICIT_ID(Type, BOOST_TYPEOF_UNIQUE_ID())
+
+#endif//BOOST_TYPEOF_TYPE_ENCODING_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/type_template_param.hpp b/src/third_party/boost-1.69.0/boost/typeof/type_template_param.hpp
index 28a860c9fa5..28a860c9fa5 100644
--- a/src/third_party/boost-1.68.0/boost/typeof/type_template_param.hpp
+++ b/src/third_party/boost-1.69.0/boost/typeof/type_template_param.hpp
diff --git a/src/third_party/boost-1.68.0/boost/typeof/typeof.hpp b/src/third_party/boost-1.69.0/boost/typeof/typeof.hpp
index d2c49fbcc19..d2c49fbcc19 100644
--- a/src/third_party/boost-1.68.0/boost/typeof/typeof.hpp
+++ b/src/third_party/boost-1.69.0/boost/typeof/typeof.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/typeof_impl.hpp b/src/third_party/boost-1.69.0/boost/typeof/typeof_impl.hpp
new file mode 100644
index 00000000000..f5397e6ab12
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/typeof_impl.hpp
@@ -0,0 +1,186 @@
+// Copyright (C) 2004, 2005 Arkadiy Vertleyb
+// Copyright (C) 2005 Peder Holt
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_TYPEOF_IMPL_HPP_INCLUDED
+#define BOOST_TYPEOF_TYPEOF_IMPL_HPP_INCLUDED
+
+#include <boost/preprocessor/repetition/enum.hpp>
+#include <boost/typeof/constant.hpp>
+#include <boost/typeof/encode_decode.hpp>
+#include <boost/typeof/vector.hpp>
+#include <boost/type_traits/enable_if.hpp>
+#include <boost/type_traits/is_function.hpp>
+
+#define BOOST_TYPEOF_VECTOR(n) BOOST_PP_CAT(boost::type_of::vector, n)
+
+#define BOOST_TYPEOF_sizer_item(z, n, _)\
+ char item ## n[V::item ## n ::value];
+
+namespace boost { namespace type_of {
+ template<class V>
+ struct sizer
+ {
+ // char item0[V::item0::value];
+ // char item1[V::item1::value];
+ // ...
+
+ BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE, BOOST_TYPEOF_sizer_item, ~)
+ };
+}}
+
+#undef BOOST_TYPEOF_sizer_item
+
+//
+namespace boost { namespace type_of {
+# ifdef BOOST_NO_SFINAE
+ template<class V, class T>
+ sizer<typename encode_type<V, T>::type> encode(const T&);
+# else
+ template<class V, class T>
+ typename enable_if_<
+ is_function<T>::value,
+ sizer<typename encode_type<V, T>::type> >::type encode(T&);
+
+ template<class V, class T>
+ typename enable_if_<
+ !is_function<T>::value,
+ sizer<typename encode_type<V, T>::type> >::type encode(const T&);
+# endif
+}}
+//
+namespace boost { namespace type_of {
+
+ template<class V>
+ struct decode_begin
+ {
+ typedef typename decode_type<typename V::begin>::type type;
+ };
+}}
+
+#define BOOST_TYPEOF_TYPEITEM(z, n, expr)\
+ boost::type_of::constant<std::size_t,sizeof(boost::type_of::encode<BOOST_TYPEOF_VECTOR(0)<> >(expr).item ## n)>
+
+#define BOOST_TYPEOF_ENCODED_VECTOR(Expr) \
+ BOOST_TYPEOF_VECTOR(BOOST_TYPEOF_LIMIT_SIZE)< \
+ BOOST_PP_ENUM(BOOST_TYPEOF_LIMIT_SIZE, BOOST_TYPEOF_TYPEITEM, Expr) \
+ >
+
+#define BOOST_TYPEOF(Expr)\
+ boost::type_of::decode_begin<BOOST_TYPEOF_ENCODED_VECTOR(Expr) >::type
+
+#define BOOST_TYPEOF_TPL typename BOOST_TYPEOF
+
+//offset_vector is used to delay the insertion of data into the vector in order to allow
+//encoding to be done in many steps
+namespace boost { namespace type_of {
+ template<typename V,typename Offset>
+ struct offset_vector {
+ };
+
+ template<class V,class Offset,class T>
+ struct push_back<boost::type_of::offset_vector<V,Offset>,T> {
+ typedef offset_vector<V,typename Offset::prior> type;
+ };
+
+ template<class V,class T>
+ struct push_back<boost::type_of::offset_vector<V,constant<std::size_t,0> >,T> {
+ typedef typename push_back<V,T>::type type;
+ };
+}}
+
+#define BOOST_TYPEOF_NESTED_TYPEITEM(z, n, expr)\
+ BOOST_STATIC_CONSTANT(int,BOOST_PP_CAT(value,n) = sizeof(boost::type_of::encode<_typeof_start_vector>(expr).item ## n));\
+ typedef boost::type_of::constant<std::size_t,BOOST_PP_CAT(self_t::value,n)> BOOST_PP_CAT(item,n);
+
+#ifdef __DMC__
+#define BOOST_TYPEOF_NESTED_TYPEITEM_2(z,n,expr)\
+ typedef typename _typeof_encode_fraction<iteration>::BOOST_PP_CAT(item,n) BOOST_PP_CAT(item,n);
+
+#define BOOST_TYPEOF_FRACTIONTYPE()\
+ BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE,BOOST_TYPEOF_NESTED_TYPEITEM_2,_)\
+ typedef _typeof_fraction_iter<Pos> fraction_type;
+#else
+#define BOOST_TYPEOF_FRACTIONTYPE()\
+ typedef _typeof_encode_fraction<self_t::iteration> fraction_type;
+#endif
+
+#ifdef __BORLANDC__
+namespace boost { namespace type_of {
+ template<typename Pos,typename Iter>
+ struct generic_typeof_fraction_iter {
+ typedef generic_typeof_fraction_iter<Pos,Iter> self_t;
+ static const int pos=(Pos::value);
+ static const int iteration=(pos/5);
+ static const int where=pos%5;
+ typedef typename Iter::template _apply_next<self_t::iteration>::type fraction_type;
+ typedef generic_typeof_fraction_iter<typename Pos::next,Iter> next;
+ typedef typename v_iter<fraction_type,constant<int, self_t::where> >::type type;
+ };
+}}
+#define BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr) \
+ template<int _Typeof_Iteration>\
+ struct _typeof_encode_fraction {\
+ typedef _typeof_encode_fraction<_Typeof_Iteration> self_t;\
+ BOOST_STATIC_CONSTANT(int,_typeof_encode_offset = (_Typeof_Iteration*BOOST_TYPEOF_LIMIT_SIZE));\
+ typedef boost::type_of::offset_vector<BOOST_TYPEOF_VECTOR(0)<>,boost::type_of::constant<std::size_t,self_t::_typeof_encode_offset> > _typeof_start_vector;\
+ BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE,BOOST_TYPEOF_NESTED_TYPEITEM,expr)\
+ template<int Next>\
+ struct _apply_next {\
+ typedef _typeof_encode_fraction<Next> type;\
+ };\
+ };\
+ template<typename Pos>\
+ struct _typeof_fraction_iter {\
+ typedef boost::type_of::generic_typeof_fraction_iter<Pos,_typeof_encode_fraction<0> > self_t;\
+ typedef typename self_t::next next;\
+ typedef typename self_t::type type;\
+ };
+#else
+#define BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr) \
+ template<int _Typeof_Iteration>\
+ struct _typeof_encode_fraction {\
+ typedef _typeof_encode_fraction<_Typeof_Iteration> self_t;\
+ BOOST_STATIC_CONSTANT(int,_typeof_encode_offset = (_Typeof_Iteration*BOOST_TYPEOF_LIMIT_SIZE));\
+ typedef boost::type_of::offset_vector<BOOST_TYPEOF_VECTOR(0)<>,boost::type_of::constant<std::size_t,self_t::_typeof_encode_offset> > _typeof_start_vector;\
+ BOOST_PP_REPEAT(BOOST_TYPEOF_LIMIT_SIZE,BOOST_TYPEOF_NESTED_TYPEITEM,expr)\
+ };\
+ template<typename Pos>\
+ struct _typeof_fraction_iter {\
+ typedef _typeof_fraction_iter<Pos> self_t;\
+ BOOST_STATIC_CONSTANT(int,pos=(Pos::value));\
+ BOOST_STATIC_CONSTANT(int,iteration=(pos/BOOST_TYPEOF_LIMIT_SIZE));\
+ BOOST_STATIC_CONSTANT(int,where=pos%BOOST_TYPEOF_LIMIT_SIZE);\
+ BOOST_TYPEOF_FRACTIONTYPE()\
+ typedef typename boost::type_of::v_iter<fraction_type,boost::type_of::constant<int,self_t::where> >::type type;\
+ typedef _typeof_fraction_iter<typename Pos::next> next;\
+ };
+#endif
+#ifdef __MWERKS__
+
+# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
+template<typename T>\
+struct BOOST_PP_CAT(_typeof_template_,name) {\
+ BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
+ typedef typename boost::type_of::decode_type<_typeof_fraction_iter<boost::type_of::constant<std::size_t,0> > >::type type;\
+};\
+typedef BOOST_PP_CAT(_typeof_template_,name)<int> name;
+
+# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) BOOST_TYPEOF_NESTED_TYPEDEF(name,expr)
+
+#else
+# define BOOST_TYPEOF_NESTED_TYPEDEF_TPL(name,expr) \
+ struct name {\
+ BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
+ typedef typename boost::type_of::decode_type<_typeof_fraction_iter<boost::type_of::constant<std::size_t,0> > >::type type;\
+ };
+
+# define BOOST_TYPEOF_NESTED_TYPEDEF(name,expr) \
+ struct name {\
+ BOOST_TYPEOF_NESTED_TYPEDEF_IMPL(expr)\
+ typedef boost::type_of::decode_type<_typeof_fraction_iter<boost::type_of::constant<std::size_t,0> > >::type type;\
+ };
+#endif
+
+#endif//BOOST_TYPEOF_COMPLIANT_TYPEOF_IMPL_HPP_INCLUDED
diff --git a/src/third_party/boost-1.68.0/boost/typeof/unsupported.hpp b/src/third_party/boost-1.69.0/boost/typeof/unsupported.hpp
index 83d3a559fed..83d3a559fed 100644
--- a/src/third_party/boost-1.68.0/boost/typeof/unsupported.hpp
+++ b/src/third_party/boost-1.69.0/boost/typeof/unsupported.hpp
diff --git a/src/third_party/boost-1.69.0/boost/typeof/vector.hpp b/src/third_party/boost-1.69.0/boost/typeof/vector.hpp
new file mode 100644
index 00000000000..e75b57ee5a0
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/vector.hpp
@@ -0,0 +1,166 @@
+// Copyright (C) 2005 Arkadiy Vertleyb
+// Copyright (C) 2005 Peder Holt
+//
+// Copyright (C) 2006 Tobias Schwinger
+//
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_TYPEOF_VECTOR_HPP_INCLUDED
+
+#include <boost/typeof/constant.hpp>
+#include <boost/preprocessor/iteration/self.hpp>
+
+#ifndef BOOST_TYPEOF_LIMIT_SIZE
+# define BOOST_TYPEOF_LIMIT_SIZE 50
+#endif
+
+//
+// To recreate the preprocessed versions of this file preprocess and run
+//
+// $(BOOST_ROOT)/libs/typeof/tools/preprocess.pl
+//
+
+#if defined(BOOST_TYPEOF_PP_INCLUDE_EXTERNAL)
+
+# undef BOOST_TYPEOF_PP_INCLUDE_EXTERNAL
+
+#elif !defined(BOOST_TYPEOF_PREPROCESSING_MODE) && !BOOST_PP_IS_SELFISH
+
+# define BOOST_PP_INDIRECT_SELF <boost/typeof/vector.hpp>
+# if BOOST_TYPEOF_LIMIT_SIZE < 50
+# include BOOST_PP_INCLUDE_SELF()
+# elif BOOST_TYPEOF_LIMIT_SIZE < 100
+# include <boost/typeof/vector50.hpp>
+# define BOOST_TYPEOF_PP_START_SIZE 51
+# include BOOST_PP_INCLUDE_SELF()
+# elif BOOST_TYPEOF_LIMIT_SIZE < 150
+# include <boost/typeof/vector100.hpp>
+# define BOOST_TYPEOF_PP_START_SIZE 101
+# include BOOST_PP_INCLUDE_SELF()
+# elif BOOST_TYPEOF_LIMIT_SIZE < 200
+# include <boost/typeof/vector150.hpp>
+# define BOOST_TYPEOF_PP_START_SIZE 151
+# include BOOST_PP_INCLUDE_SELF()
+# elif BOOST_TYPEOF_LIMIT_SIZE <= 250
+# include <boost/typeof/vector200.hpp>
+# define BOOST_TYPEOF_PP_START_SIZE 201
+# include BOOST_PP_INCLUDE_SELF()
+# else
+# error "BOOST_TYPEOF_LIMIT_SIZE too high"
+# endif
+
+#else// defined(BOOST_TYPEOF_PREPROCESSING_MODE) || BOOST_PP_IS_SELFISH
+
+# ifndef BOOST_TYPEOF_PP_NEXT_SIZE
+# define BOOST_TYPEOF_PP_NEXT_SIZE BOOST_TYPEOF_LIMIT_SIZE
+# endif
+# ifndef BOOST_TYPEOF_PP_START_SIZE
+# define BOOST_TYPEOF_PP_START_SIZE 0
+# endif
+
+# if BOOST_TYPEOF_PP_START_SIZE <= BOOST_TYPEOF_LIMIT_SIZE
+
+# include <boost/preprocessor/enum_params.hpp>
+# include <boost/preprocessor/repeat.hpp>
+# include <boost/preprocessor/repeat_from_to.hpp>
+# include <boost/preprocessor/cat.hpp>
+# include <boost/preprocessor/inc.hpp>
+# include <boost/preprocessor/dec.hpp>
+# include <boost/preprocessor/comma_if.hpp>
+# include <boost/preprocessor/iteration/local.hpp>
+# include <boost/preprocessor/control/expr_iif.hpp>
+# include <boost/preprocessor/logical/not.hpp>
+
+// iterator
+
+# define BOOST_TYPEOF_spec_iter(n)\
+ template<class V>\
+ struct v_iter<V, constant<int,n> >\
+ {\
+ typedef typename V::item ## n type;\
+ typedef v_iter<V, constant<int,n + 1> > next;\
+ };
+
+namespace boost { namespace type_of {
+
+ template<class V, class Increase_BOOST_TYPEOF_LIMIT_SIZE> struct v_iter; // not defined
+# define BOOST_PP_LOCAL_MACRO BOOST_TYPEOF_spec_iter
+# define BOOST_PP_LOCAL_LIMITS \
+ (BOOST_PP_DEC(BOOST_TYPEOF_PP_START_SIZE), \
+ BOOST_PP_DEC(BOOST_TYPEOF_LIMIT_SIZE))
+# include BOOST_PP_LOCAL_ITERATE()
+
+}}
+
+# undef BOOST_TYPEOF_spec_iter
+
+// vector
+
+# define BOOST_TYPEOF_typedef_item(z, n, _)\
+ typedef P ## n item ## n;
+
+# define BOOST_TYPEOF_typedef_fake_item(z, n, _)\
+ typedef constant<int,1> item ## n;
+
+# define BOOST_TYPEOF_define_vector(n)\
+ template<BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_EXPR_IIF(BOOST_PP_NOT(n), class T = void)>\
+ struct vector ## n\
+ {\
+ typedef v_iter<vector ## n<BOOST_PP_ENUM_PARAMS(n,P)>, boost::type_of::constant<int,0> > begin;\
+ BOOST_PP_REPEAT(n, BOOST_TYPEOF_typedef_item, ~)\
+ BOOST_PP_REPEAT_FROM_TO(n, BOOST_TYPEOF_PP_NEXT_SIZE, BOOST_TYPEOF_typedef_fake_item, ~)\
+ };
+
+namespace boost { namespace type_of {
+
+# define BOOST_PP_LOCAL_MACRO BOOST_TYPEOF_define_vector
+# define BOOST_PP_LOCAL_LIMITS \
+ (BOOST_TYPEOF_PP_START_SIZE,BOOST_TYPEOF_LIMIT_SIZE)
+# include BOOST_PP_LOCAL_ITERATE()
+
+}}
+
+# undef BOOST_TYPEOF_typedef_item
+# undef BOOST_TYPEOF_typedef_fake_item
+# undef BOOST_TYPEOF_define_vector
+
+// push_back
+
+# define BOOST_TYPEOF_spec_push_back(n)\
+ template<BOOST_PP_ENUM_PARAMS(n, class P) BOOST_PP_COMMA_IF(n) class T>\
+ struct push_back<BOOST_PP_CAT(boost::type_of::vector, n)<BOOST_PP_ENUM_PARAMS(n, P)>, T>\
+ {\
+ typedef BOOST_PP_CAT(boost::type_of::vector, BOOST_PP_INC(n))<\
+ BOOST_PP_ENUM_PARAMS(n, P) BOOST_PP_COMMA_IF(n) T\
+ > type;\
+ };
+
+namespace boost { namespace type_of {
+
+# if BOOST_TYPEOF_LIMIT_SIZE < 50
+ template<class V, class T> struct push_back {
+ typedef V type;
+ };
+# endif
+ //default behaviour is to let push_back ignore T, and return the input vector.
+ //This is to let BOOST_TYPEOF_NESTED_TYPEDEF work properly with the default vector.
+# define BOOST_PP_LOCAL_MACRO BOOST_TYPEOF_spec_push_back
+# define BOOST_PP_LOCAL_LIMITS \
+ (BOOST_PP_DEC(BOOST_TYPEOF_PP_START_SIZE), \
+ BOOST_PP_DEC(BOOST_TYPEOF_LIMIT_SIZE))
+# include BOOST_PP_LOCAL_ITERATE()
+
+}}
+
+# undef BOOST_TYPEOF_spec_push_back
+
+# endif//BOOST_TYPEOF_PP_START_SIZE<=BOOST_TYPEOF_LIMIT_SIZE
+# undef BOOST_TYPEOF_PP_START_SIZE
+# undef BOOST_TYPEOF_PP_NEXT_SIZE
+
+#endif//BOOST_TYPEOF_PREPROCESSING_MODE || BOOST_PP_IS_SELFISH
+
+#define BOOST_TYPEOF_VECTOR_HPP_INCLUDED
+#endif//BOOST_TYPEOF_VECTOR_HPP_INCLUDED
+
diff --git a/src/third_party/boost-1.69.0/boost/typeof/vector50.hpp b/src/third_party/boost-1.69.0/boost/typeof/vector50.hpp
new file mode 100644
index 00000000000..438cd43b2f2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/typeof/vector50.hpp
@@ -0,0 +1,171 @@
+
+// Copyright (C) 2005 Arkadiy Vertleyb
+// Copyright (C) 2005 Peder Holt
+//
+// Use modification and distribution are subject to the boost Software License,
+// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
+
+// Preprocessed code, do not edit manually !
+
+
+namespace boost { namespace type_of {
+ template<class V, class Increase_BOOST_TYPEOF_LIMIT_SIZE> struct v_iter;
+ template<class V> struct v_iter<V, constant<int,0> > { typedef typename V::item0 type; typedef v_iter<V, constant<int,0 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,1> > { typedef typename V::item1 type; typedef v_iter<V, constant<int,1 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,2> > { typedef typename V::item2 type; typedef v_iter<V, constant<int,2 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,3> > { typedef typename V::item3 type; typedef v_iter<V, constant<int,3 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,4> > { typedef typename V::item4 type; typedef v_iter<V, constant<int,4 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,5> > { typedef typename V::item5 type; typedef v_iter<V, constant<int,5 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,6> > { typedef typename V::item6 type; typedef v_iter<V, constant<int,6 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,7> > { typedef typename V::item7 type; typedef v_iter<V, constant<int,7 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,8> > { typedef typename V::item8 type; typedef v_iter<V, constant<int,8 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,9> > { typedef typename V::item9 type; typedef v_iter<V, constant<int,9 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,10> > { typedef typename V::item10 type; typedef v_iter<V, constant<int,10 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,11> > { typedef typename V::item11 type; typedef v_iter<V, constant<int,11 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,12> > { typedef typename V::item12 type; typedef v_iter<V, constant<int,12 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,13> > { typedef typename V::item13 type; typedef v_iter<V, constant<int,13 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,14> > { typedef typename V::item14 type; typedef v_iter<V, constant<int,14 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,15> > { typedef typename V::item15 type; typedef v_iter<V, constant<int,15 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,16> > { typedef typename V::item16 type; typedef v_iter<V, constant<int,16 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,17> > { typedef typename V::item17 type; typedef v_iter<V, constant<int,17 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,18> > { typedef typename V::item18 type; typedef v_iter<V, constant<int,18 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,19> > { typedef typename V::item19 type; typedef v_iter<V, constant<int,19 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,20> > { typedef typename V::item20 type; typedef v_iter<V, constant<int,20 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,21> > { typedef typename V::item21 type; typedef v_iter<V, constant<int,21 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,22> > { typedef typename V::item22 type; typedef v_iter<V, constant<int,22 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,23> > { typedef typename V::item23 type; typedef v_iter<V, constant<int,23 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,24> > { typedef typename V::item24 type; typedef v_iter<V, constant<int,24 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,25> > { typedef typename V::item25 type; typedef v_iter<V, constant<int,25 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,26> > { typedef typename V::item26 type; typedef v_iter<V, constant<int,26 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,27> > { typedef typename V::item27 type; typedef v_iter<V, constant<int,27 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,28> > { typedef typename V::item28 type; typedef v_iter<V, constant<int,28 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,29> > { typedef typename V::item29 type; typedef v_iter<V, constant<int,29 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,30> > { typedef typename V::item30 type; typedef v_iter<V, constant<int,30 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,31> > { typedef typename V::item31 type; typedef v_iter<V, constant<int,31 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,32> > { typedef typename V::item32 type; typedef v_iter<V, constant<int,32 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,33> > { typedef typename V::item33 type; typedef v_iter<V, constant<int,33 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,34> > { typedef typename V::item34 type; typedef v_iter<V, constant<int,34 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,35> > { typedef typename V::item35 type; typedef v_iter<V, constant<int,35 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,36> > { typedef typename V::item36 type; typedef v_iter<V, constant<int,36 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,37> > { typedef typename V::item37 type; typedef v_iter<V, constant<int,37 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,38> > { typedef typename V::item38 type; typedef v_iter<V, constant<int,38 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,39> > { typedef typename V::item39 type; typedef v_iter<V, constant<int,39 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,40> > { typedef typename V::item40 type; typedef v_iter<V, constant<int,40 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,41> > { typedef typename V::item41 type; typedef v_iter<V, constant<int,41 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,42> > { typedef typename V::item42 type; typedef v_iter<V, constant<int,42 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,43> > { typedef typename V::item43 type; typedef v_iter<V, constant<int,43 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,44> > { typedef typename V::item44 type; typedef v_iter<V, constant<int,44 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,45> > { typedef typename V::item45 type; typedef v_iter<V, constant<int,45 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,46> > { typedef typename V::item46 type; typedef v_iter<V, constant<int,46 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,47> > { typedef typename V::item47 type; typedef v_iter<V, constant<int,47 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,48> > { typedef typename V::item48 type; typedef v_iter<V, constant<int,48 + 1> > next; };
+ template<class V> struct v_iter<V, constant<int,49> > { typedef typename V::item49 type; typedef v_iter<V, constant<int,49 + 1> > next; };
+}}
+namespace boost { namespace type_of {
+ template< class T = void> struct vector0 { typedef v_iter<vector0<>, boost::type_of::constant<int,0> > begin; typedef constant<int,1> item0; typedef constant<int,1> item1; typedef constant<int,1> item2; typedef constant<int,1> item3; typedef constant<int,1> item4; typedef constant<int,1> item5; typedef constant<int,1> item6; typedef constant<int,1> item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 > struct vector1 { typedef v_iter<vector1< P0>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef constant<int,1> item1; typedef constant<int,1> item2; typedef constant<int,1> item3; typedef constant<int,1> item4; typedef constant<int,1> item5; typedef constant<int,1> item6; typedef constant<int,1> item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 > struct vector2 { typedef v_iter<vector2< P0 , P1>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef constant<int,1> item2; typedef constant<int,1> item3; typedef constant<int,1> item4; typedef constant<int,1> item5; typedef constant<int,1> item6; typedef constant<int,1> item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 > struct vector3 { typedef v_iter<vector3< P0 , P1 , P2>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef constant<int,1> item3; typedef constant<int,1> item4; typedef constant<int,1> item5; typedef constant<int,1> item6; typedef constant<int,1> item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 > struct vector4 { typedef v_iter<vector4< P0 , P1 , P2 , P3>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef constant<int,1> item4; typedef constant<int,1> item5; typedef constant<int,1> item6; typedef constant<int,1> item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 > struct vector5 { typedef v_iter<vector5< P0 , P1 , P2 , P3 , P4>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef constant<int,1> item5; typedef constant<int,1> item6; typedef constant<int,1> item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 > struct vector6 { typedef v_iter<vector6< P0 , P1 , P2 , P3 , P4 , P5>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef constant<int,1> item6; typedef constant<int,1> item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 > struct vector7 { typedef v_iter<vector7< P0 , P1 , P2 , P3 , P4 , P5 , P6>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef constant<int,1> item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 > struct vector8 { typedef v_iter<vector8< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef constant<int,1> item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 > struct vector9 { typedef v_iter<vector9< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef constant<int,1> item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 > struct vector10 { typedef v_iter<vector10< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef constant<int,1> item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 > struct vector11 { typedef v_iter<vector11< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef constant<int,1> item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 > struct vector12 { typedef v_iter<vector12< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef constant<int,1> item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 > struct vector13 { typedef v_iter<vector13< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef constant<int,1> item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 > struct vector14 { typedef v_iter<vector14< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef constant<int,1> item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 > struct vector15 { typedef v_iter<vector15< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef constant<int,1> item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 > struct vector16 { typedef v_iter<vector16< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef constant<int,1> item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 > struct vector17 { typedef v_iter<vector17< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef constant<int,1> item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 > struct vector18 { typedef v_iter<vector18< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef constant<int,1> item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 > struct vector19 { typedef v_iter<vector19< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef constant<int,1> item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 > struct vector20 { typedef v_iter<vector20< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef constant<int,1> item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 > struct vector21 { typedef v_iter<vector21< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef constant<int,1> item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 > struct vector22 { typedef v_iter<vector22< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef constant<int,1> item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 > struct vector23 { typedef v_iter<vector23< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef constant<int,1> item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 > struct vector24 { typedef v_iter<vector24< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef constant<int,1> item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 > struct vector25 { typedef v_iter<vector25< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef constant<int,1> item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 > struct vector26 { typedef v_iter<vector26< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef constant<int,1> item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 > struct vector27 { typedef v_iter<vector27< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef constant<int,1> item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 > struct vector28 { typedef v_iter<vector28< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef constant<int,1> item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 > struct vector29 { typedef v_iter<vector29< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef constant<int,1> item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 > struct vector30 { typedef v_iter<vector30< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef constant<int,1> item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 > struct vector31 { typedef v_iter<vector31< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef constant<int,1> item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 > struct vector32 { typedef v_iter<vector32< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef constant<int,1> item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 > struct vector33 { typedef v_iter<vector33< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef constant<int,1> item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 > struct vector34 { typedef v_iter<vector34< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef constant<int,1> item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 > struct vector35 { typedef v_iter<vector35< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef constant<int,1> item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 > struct vector36 { typedef v_iter<vector36< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef constant<int,1> item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 > struct vector37 { typedef v_iter<vector37< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef constant<int,1> item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 > struct vector38 { typedef v_iter<vector38< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef constant<int,1> item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 > struct vector39 { typedef v_iter<vector39< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef constant<int,1> item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 > struct vector40 { typedef v_iter<vector40< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef constant<int,1> item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 > struct vector41 { typedef v_iter<vector41< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef constant<int,1> item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 > struct vector42 { typedef v_iter<vector42< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef constant<int,1> item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 > struct vector43 { typedef v_iter<vector43< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef constant<int,1> item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 > struct vector44 { typedef v_iter<vector44< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef constant<int,1> item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 > struct vector45 { typedef v_iter<vector45< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef constant<int,1> item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 > struct vector46 { typedef v_iter<vector46< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef constant<int,1> item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 > struct vector47 { typedef v_iter<vector47< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef P46 item46; typedef constant<int,1> item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 > struct vector48 { typedef v_iter<vector48< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef P46 item46; typedef P47 item47; typedef constant<int,1> item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 , class P48 > struct vector49 { typedef v_iter<vector49< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , P48>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef P46 item46; typedef P47 item47; typedef P48 item48; typedef constant<int,1> item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 , class P48 , class P49 > struct vector50 { typedef v_iter<vector50< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , P48 , P49>, boost::type_of::constant<int,0> > begin; typedef P0 item0; typedef P1 item1; typedef P2 item2; typedef P3 item3; typedef P4 item4; typedef P5 item5; typedef P6 item6; typedef P7 item7; typedef P8 item8; typedef P9 item9; typedef P10 item10; typedef P11 item11; typedef P12 item12; typedef P13 item13; typedef P14 item14; typedef P15 item15; typedef P16 item16; typedef P17 item17; typedef P18 item18; typedef P19 item19; typedef P20 item20; typedef P21 item21; typedef P22 item22; typedef P23 item23; typedef P24 item24; typedef P25 item25; typedef P26 item26; typedef P27 item27; typedef P28 item28; typedef P29 item29; typedef P30 item30; typedef P31 item31; typedef P32 item32; typedef P33 item33; typedef P34 item34; typedef P35 item35; typedef P36 item36; typedef P37 item37; typedef P38 item38; typedef P39 item39; typedef P40 item40; typedef P41 item41; typedef P42 item42; typedef P43 item43; typedef P44 item44; typedef P45 item45; typedef P46 item46; typedef P47 item47; typedef P48 item48; typedef P49 item49; typedef constant<int,1> item50; typedef constant<int,1> item51; typedef constant<int,1> item52; typedef constant<int,1> item53; typedef constant<int,1> item54; typedef constant<int,1> item55; typedef constant<int,1> item56; typedef constant<int,1> item57; typedef constant<int,1> item58; typedef constant<int,1> item59; typedef constant<int,1> item60; typedef constant<int,1> item61; typedef constant<int,1> item62; typedef constant<int,1> item63; typedef constant<int,1> item64; typedef constant<int,1> item65; typedef constant<int,1> item66; typedef constant<int,1> item67; typedef constant<int,1> item68; typedef constant<int,1> item69; typedef constant<int,1> item70; typedef constant<int,1> item71; typedef constant<int,1> item72; typedef constant<int,1> item73; typedef constant<int,1> item74; typedef constant<int,1> item75; typedef constant<int,1> item76; typedef constant<int,1> item77; typedef constant<int,1> item78; typedef constant<int,1> item79; typedef constant<int,1> item80; typedef constant<int,1> item81; typedef constant<int,1> item82; typedef constant<int,1> item83; typedef constant<int,1> item84; typedef constant<int,1> item85; typedef constant<int,1> item86; typedef constant<int,1> item87; typedef constant<int,1> item88; typedef constant<int,1> item89; typedef constant<int,1> item90; typedef constant<int,1> item91; typedef constant<int,1> item92; typedef constant<int,1> item93; typedef constant<int,1> item94; typedef constant<int,1> item95; typedef constant<int,1> item96; typedef constant<int,1> item97; typedef constant<int,1> item98; typedef constant<int,1> item99; };
+}}
+namespace boost { namespace type_of {
+ template<class V, class T> struct push_back {
+ typedef V type;
+ };
+ template< class T> struct push_back<boost::type_of::vector0<>, T> { typedef boost::type_of::vector1< T > type; };
+ template< class P0 , class T> struct push_back<boost::type_of::vector1< P0>, T> { typedef boost::type_of::vector2< P0 , T > type; };
+ template< class P0 , class P1 , class T> struct push_back<boost::type_of::vector2< P0 , P1>, T> { typedef boost::type_of::vector3< P0 , P1 , T > type; };
+ template< class P0 , class P1 , class P2 , class T> struct push_back<boost::type_of::vector3< P0 , P1 , P2>, T> { typedef boost::type_of::vector4< P0 , P1 , P2 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class T> struct push_back<boost::type_of::vector4< P0 , P1 , P2 , P3>, T> { typedef boost::type_of::vector5< P0 , P1 , P2 , P3 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class T> struct push_back<boost::type_of::vector5< P0 , P1 , P2 , P3 , P4>, T> { typedef boost::type_of::vector6< P0 , P1 , P2 , P3 , P4 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class T> struct push_back<boost::type_of::vector6< P0 , P1 , P2 , P3 , P4 , P5>, T> { typedef boost::type_of::vector7< P0 , P1 , P2 , P3 , P4 , P5 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class T> struct push_back<boost::type_of::vector7< P0 , P1 , P2 , P3 , P4 , P5 , P6>, T> { typedef boost::type_of::vector8< P0 , P1 , P2 , P3 , P4 , P5 , P6 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class T> struct push_back<boost::type_of::vector8< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7>, T> { typedef boost::type_of::vector9< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class T> struct push_back<boost::type_of::vector9< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8>, T> { typedef boost::type_of::vector10< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class T> struct push_back<boost::type_of::vector10< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9>, T> { typedef boost::type_of::vector11< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class T> struct push_back<boost::type_of::vector11< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10>, T> { typedef boost::type_of::vector12< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class T> struct push_back<boost::type_of::vector12< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11>, T> { typedef boost::type_of::vector13< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class T> struct push_back<boost::type_of::vector13< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12>, T> { typedef boost::type_of::vector14< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class T> struct push_back<boost::type_of::vector14< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13>, T> { typedef boost::type_of::vector15< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class T> struct push_back<boost::type_of::vector15< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14>, T> { typedef boost::type_of::vector16< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class T> struct push_back<boost::type_of::vector16< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15>, T> { typedef boost::type_of::vector17< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class T> struct push_back<boost::type_of::vector17< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16>, T> { typedef boost::type_of::vector18< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class T> struct push_back<boost::type_of::vector18< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17>, T> { typedef boost::type_of::vector19< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class T> struct push_back<boost::type_of::vector19< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18>, T> { typedef boost::type_of::vector20< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class T> struct push_back<boost::type_of::vector20< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19>, T> { typedef boost::type_of::vector21< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class T> struct push_back<boost::type_of::vector21< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20>, T> { typedef boost::type_of::vector22< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class T> struct push_back<boost::type_of::vector22< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21>, T> { typedef boost::type_of::vector23< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class T> struct push_back<boost::type_of::vector23< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22>, T> { typedef boost::type_of::vector24< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class T> struct push_back<boost::type_of::vector24< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23>, T> { typedef boost::type_of::vector25< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class T> struct push_back<boost::type_of::vector25< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24>, T> { typedef boost::type_of::vector26< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class T> struct push_back<boost::type_of::vector26< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25>, T> { typedef boost::type_of::vector27< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class T> struct push_back<boost::type_of::vector27< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26>, T> { typedef boost::type_of::vector28< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class T> struct push_back<boost::type_of::vector28< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27>, T> { typedef boost::type_of::vector29< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class T> struct push_back<boost::type_of::vector29< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28>, T> { typedef boost::type_of::vector30< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class T> struct push_back<boost::type_of::vector30< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29>, T> { typedef boost::type_of::vector31< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class T> struct push_back<boost::type_of::vector31< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30>, T> { typedef boost::type_of::vector32< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class T> struct push_back<boost::type_of::vector32< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31>, T> { typedef boost::type_of::vector33< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class T> struct push_back<boost::type_of::vector33< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32>, T> { typedef boost::type_of::vector34< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class T> struct push_back<boost::type_of::vector34< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33>, T> { typedef boost::type_of::vector35< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class T> struct push_back<boost::type_of::vector35< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34>, T> { typedef boost::type_of::vector36< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class T> struct push_back<boost::type_of::vector36< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35>, T> { typedef boost::type_of::vector37< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class T> struct push_back<boost::type_of::vector37< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36>, T> { typedef boost::type_of::vector38< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class T> struct push_back<boost::type_of::vector38< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37>, T> { typedef boost::type_of::vector39< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class T> struct push_back<boost::type_of::vector39< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38>, T> { typedef boost::type_of::vector40< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class T> struct push_back<boost::type_of::vector40< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39>, T> { typedef boost::type_of::vector41< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class T> struct push_back<boost::type_of::vector41< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40>, T> { typedef boost::type_of::vector42< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class T> struct push_back<boost::type_of::vector42< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41>, T> { typedef boost::type_of::vector43< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class T> struct push_back<boost::type_of::vector43< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42>, T> { typedef boost::type_of::vector44< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class T> struct push_back<boost::type_of::vector44< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43>, T> { typedef boost::type_of::vector45< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class T> struct push_back<boost::type_of::vector45< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44>, T> { typedef boost::type_of::vector46< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class T> struct push_back<boost::type_of::vector46< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45>, T> { typedef boost::type_of::vector47< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class T> struct push_back<boost::type_of::vector47< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46>, T> { typedef boost::type_of::vector48< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 , class T> struct push_back<boost::type_of::vector48< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47>, T> { typedef boost::type_of::vector49< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , T > type; };
+ template< class P0 , class P1 , class P2 , class P3 , class P4 , class P5 , class P6 , class P7 , class P8 , class P9 , class P10 , class P11 , class P12 , class P13 , class P14 , class P15 , class P16 , class P17 , class P18 , class P19 , class P20 , class P21 , class P22 , class P23 , class P24 , class P25 , class P26 , class P27 , class P28 , class P29 , class P30 , class P31 , class P32 , class P33 , class P34 , class P35 , class P36 , class P37 , class P38 , class P39 , class P40 , class P41 , class P42 , class P43 , class P44 , class P45 , class P46 , class P47 , class P48 , class T> struct push_back<boost::type_of::vector49< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , P48>, T> { typedef boost::type_of::vector50< P0 , P1 , P2 , P3 , P4 , P5 , P6 , P7 , P8 , P9 , P10 , P11 , P12 , P13 , P14 , P15 , P16 , P17 , P18 , P19 , P20 , P21 , P22 , P23 , P24 , P25 , P26 , P27 , P28 , P29 , P30 , P31 , P32 , P33 , P34 , P35 , P36 , P37 , P38 , P39 , P40 , P41 , P42 , P43 , P44 , P45 , P46 , P47 , P48 , T > type; };
+}}
diff --git a/src/third_party/boost-1.68.0/boost/unordered/detail/fwd.hpp b/src/third_party/boost-1.69.0/boost/unordered/detail/fwd.hpp
index e749ce67bb6..e749ce67bb6 100644
--- a/src/third_party/boost-1.68.0/boost/unordered/detail/fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered/detail/fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered/detail/implementation.hpp b/src/third_party/boost-1.69.0/boost/unordered/detail/implementation.hpp
index 9dffde159df..9dffde159df 100644
--- a/src/third_party/boost-1.68.0/boost/unordered/detail/implementation.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered/detail/implementation.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered/detail/map.hpp b/src/third_party/boost-1.69.0/boost/unordered/detail/map.hpp
index 8025de80d3d..8025de80d3d 100644
--- a/src/third_party/boost-1.68.0/boost/unordered/detail/map.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered/detail/map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered/detail/set.hpp b/src/third_party/boost-1.69.0/boost/unordered/detail/set.hpp
index b7869e3c511..b7869e3c511 100644
--- a/src/third_party/boost-1.68.0/boost/unordered/detail/set.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered/detail/set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered/unordered_map.hpp b/src/third_party/boost-1.69.0/boost/unordered/unordered_map.hpp
index 1910219ccb2..1910219ccb2 100644
--- a/src/third_party/boost-1.68.0/boost/unordered/unordered_map.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered/unordered_map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered/unordered_map_fwd.hpp b/src/third_party/boost-1.69.0/boost/unordered/unordered_map_fwd.hpp
index 794b7042585..794b7042585 100644
--- a/src/third_party/boost-1.68.0/boost/unordered/unordered_map_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered/unordered_map_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered/unordered_set.hpp b/src/third_party/boost-1.69.0/boost/unordered/unordered_set.hpp
index dfc24e85e5d..dfc24e85e5d 100644
--- a/src/third_party/boost-1.68.0/boost/unordered/unordered_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered/unordered_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered/unordered_set_fwd.hpp b/src/third_party/boost-1.69.0/boost/unordered/unordered_set_fwd.hpp
index 35e2820f95f..35e2820f95f 100644
--- a/src/third_party/boost-1.68.0/boost/unordered/unordered_set_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered/unordered_set_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered_map.hpp b/src/third_party/boost-1.69.0/boost/unordered_map.hpp
index 92ef4d601ae..92ef4d601ae 100644
--- a/src/third_party/boost-1.68.0/boost/unordered_map.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered_map.hpp
diff --git a/src/third_party/boost-1.68.0/boost/unordered_set.hpp b/src/third_party/boost-1.69.0/boost/unordered_set.hpp
index 1c83c02b28a..1c83c02b28a 100644
--- a/src/third_party/boost-1.68.0/boost/unordered_set.hpp
+++ b/src/third_party/boost-1.69.0/boost/unordered_set.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility.hpp b/src/third_party/boost-1.69.0/boost/utility.hpp
index 5ac9ecbd853..5ac9ecbd853 100644
--- a/src/third_party/boost-1.68.0/boost/utility.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/addressof.hpp b/src/third_party/boost-1.69.0/boost/utility/addressof.hpp
index db4da804218..db4da804218 100644
--- a/src/third_party/boost-1.68.0/boost/utility/addressof.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/addressof.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/base_from_member.hpp b/src/third_party/boost-1.69.0/boost/utility/base_from_member.hpp
index 604541d19ac..604541d19ac 100644
--- a/src/third_party/boost-1.68.0/boost/utility/base_from_member.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/base_from_member.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/binary.hpp b/src/third_party/boost-1.69.0/boost/utility/binary.hpp
index 8cef1468e5b..8cef1468e5b 100644
--- a/src/third_party/boost-1.68.0/boost/utility/binary.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/binary.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/compare_pointees.hpp b/src/third_party/boost-1.69.0/boost/utility/compare_pointees.hpp
index 5ab21cdee27..5ab21cdee27 100644
--- a/src/third_party/boost-1.68.0/boost/utility/compare_pointees.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/compare_pointees.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/declval.hpp b/src/third_party/boost-1.69.0/boost/utility/declval.hpp
index 229e9a34a56..229e9a34a56 100644
--- a/src/third_party/boost-1.68.0/boost/utility/declval.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/declval.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/detail/in_place_factory_prefix.hpp b/src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_prefix.hpp
index afd76b5a859..afd76b5a859 100644
--- a/src/third_party/boost-1.68.0/boost/utility/detail/in_place_factory_prefix.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_prefix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/detail/in_place_factory_suffix.hpp b/src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_suffix.hpp
index 58f48c708c2..58f48c708c2 100644
--- a/src/third_party/boost-1.68.0/boost/utility/detail/in_place_factory_suffix.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/detail/in_place_factory_suffix.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/detail/minstd_rand.hpp b/src/third_party/boost-1.69.0/boost/utility/detail/minstd_rand.hpp
index 95efb21a325..95efb21a325 100644
--- a/src/third_party/boost-1.68.0/boost/utility/detail/minstd_rand.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/detail/minstd_rand.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/detail/result_of_iterate.hpp b/src/third_party/boost-1.69.0/boost/utility/detail/result_of_iterate.hpp
index d6538447b1a..d6538447b1a 100644
--- a/src/third_party/boost-1.68.0/boost/utility/detail/result_of_iterate.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/detail/result_of_iterate.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/enable_if.hpp b/src/third_party/boost-1.69.0/boost/utility/enable_if.hpp
index 803bfca5e25..803bfca5e25 100644
--- a/src/third_party/boost-1.68.0/boost/utility/enable_if.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/enable_if.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/explicit_operator_bool.hpp b/src/third_party/boost-1.69.0/boost/utility/explicit_operator_bool.hpp
index 9b625cd6897..9b625cd6897 100644
--- a/src/third_party/boost-1.68.0/boost/utility/explicit_operator_bool.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/explicit_operator_bool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/identity_type.hpp b/src/third_party/boost-1.69.0/boost/utility/identity_type.hpp
index 4a1f6c4de53..4a1f6c4de53 100644
--- a/src/third_party/boost-1.68.0/boost/utility/identity_type.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/identity_type.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/in_place_factory.hpp b/src/third_party/boost-1.69.0/boost/utility/in_place_factory.hpp
index 1a62ace10a4..1a62ace10a4 100644
--- a/src/third_party/boost-1.68.0/boost/utility/in_place_factory.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/in_place_factory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/result_of.hpp b/src/third_party/boost-1.69.0/boost/utility/result_of.hpp
index 2b652ba0ca2..2b652ba0ca2 100644
--- a/src/third_party/boost-1.68.0/boost/utility/result_of.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/result_of.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/string_ref.hpp b/src/third_party/boost-1.69.0/boost/utility/string_ref.hpp
new file mode 100644
index 00000000000..4b36ffc0d86
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/utility/string_ref.hpp
@@ -0,0 +1,555 @@
+/*
+ Copyright (c) Marshall Clow 2012-2015.
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+ For more information, see http://www.boost.org
+
+ Based on the StringRef implementation in LLVM (http://llvm.org) and
+ N3422 by Jeffrey Yasskin
+ http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3442.html
+
+*/
+
+#ifndef BOOST_STRING_REF_HPP
+#define BOOST_STRING_REF_HPP
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/utility/string_ref_fwd.hpp>
+#include <boost/throw_exception.hpp>
+
+#include <cstddef>
+#include <stdexcept>
+#include <algorithm>
+#include <iterator>
+#include <string>
+#include <iosfwd>
+
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
+// GCC 4.6 cannot handle a defaulted function with noexcept specifier
+#define BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+#endif
+
+namespace boost {
+
+ namespace detail {
+ // A helper functor because sometimes we don't have lambdas
+ template <typename charT, typename traits>
+ class string_ref_traits_eq {
+ public:
+ string_ref_traits_eq ( charT ch ) : ch_(ch) {}
+ bool operator () ( charT val ) const { return traits::eq ( ch_, val ); }
+ charT ch_;
+ };
+ }
+
+ template<typename charT, typename traits>
+ class basic_string_ref {
+ public:
+ // types
+ typedef charT value_type;
+ typedef const charT* pointer;
+ typedef const charT& reference;
+ typedef const charT& const_reference;
+ typedef pointer const_iterator; // impl-defined
+ typedef const_iterator iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef const_reverse_iterator reverse_iterator;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ static BOOST_CONSTEXPR_OR_CONST size_type npos = size_type(-1);
+
+ // construct/copy
+ BOOST_CONSTEXPR basic_string_ref () BOOST_NOEXCEPT
+ : ptr_(NULL), len_(0) {}
+
+ // by defaulting these functions, basic_string_ref becomes
+ // trivially copy/move constructible.
+ BOOST_CONSTEXPR basic_string_ref (const basic_string_ref &rhs) BOOST_NOEXCEPT
+#ifndef BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+ = default;
+#else
+ : ptr_(rhs.ptr_), len_(rhs.len_) {}
+#endif
+
+ basic_string_ref& operator=(const basic_string_ref &rhs) BOOST_NOEXCEPT
+#ifndef BOOST_STRING_REF_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+ = default;
+#else
+ {
+ ptr_ = rhs.ptr_;
+ len_ = rhs.len_;
+ return *this;
+ }
+#endif
+
+ basic_string_ref(const charT* str) BOOST_NOEXCEPT
+ : ptr_(str), len_(traits::length(str)) {}
+
+ template<typename Allocator>
+ basic_string_ref(const std::basic_string<charT, traits, Allocator>& str)
+ : ptr_(str.data()), len_(str.length()) {}
+
+// #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+// // Constructing a string_ref from a temporary string is a bad idea
+// template<typename Allocator>
+// basic_string_ref( std::basic_string<charT, traits, Allocator>&&)
+// = delete;
+// #endif
+
+ BOOST_CONSTEXPR basic_string_ref(const charT* str, size_type len) BOOST_NOEXCEPT
+ : ptr_(str), len_(len) {}
+
+#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+ template<typename Allocator>
+ explicit operator std::basic_string<charT, traits, Allocator>() const {
+ return std::basic_string<charT, traits, Allocator> ( begin(), end());
+ }
+#endif
+
+ std::basic_string<charT, traits> to_string () const {
+ return std::basic_string<charT, traits> ( begin(), end());
+ }
+
+ // iterators
+ BOOST_CONSTEXPR const_iterator begin() const { return ptr_; }
+ BOOST_CONSTEXPR const_iterator cbegin() const { return ptr_; }
+ BOOST_CONSTEXPR const_iterator end() const { return ptr_ + len_; }
+ BOOST_CONSTEXPR const_iterator cend() const { return ptr_ + len_; }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator (end()); }
+ const_reverse_iterator crbegin() const { return const_reverse_iterator (end()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator (begin()); }
+ const_reverse_iterator crend() const { return const_reverse_iterator (begin()); }
+
+ // capacity
+ BOOST_CONSTEXPR size_type size() const { return len_; }
+ BOOST_CONSTEXPR size_type length() const { return len_; }
+ BOOST_CONSTEXPR size_type max_size() const { return len_; }
+ BOOST_CONSTEXPR bool empty() const { return len_ == 0; }
+
+ // element access
+ BOOST_CONSTEXPR const charT& operator[](size_type pos) const { return ptr_[pos]; }
+
+ const charT& at(size_t pos) const {
+ if ( pos >= len_ )
+ BOOST_THROW_EXCEPTION( std::out_of_range ( "boost::string_ref::at" ) );
+ return ptr_[pos];
+ }
+
+ BOOST_CONSTEXPR const charT& front() const { return ptr_[0]; }
+ BOOST_CONSTEXPR const charT& back() const { return ptr_[len_-1]; }
+ BOOST_CONSTEXPR const charT* data() const { return ptr_; }
+
+ // modifiers
+ void clear() { len_ = 0; }
+ void remove_prefix(size_type n) {
+ if ( n > len_ )
+ n = len_;
+ ptr_ += n;
+ len_ -= n;
+ }
+
+ void remove_suffix(size_type n) {
+ if ( n > len_ )
+ n = len_;
+ len_ -= n;
+ }
+
+
+ // basic_string_ref string operations
+ basic_string_ref substr(size_type pos, size_type n=npos) const {
+ if ( pos > size())
+ BOOST_THROW_EXCEPTION( std::out_of_range ( "string_ref::substr" ) );
+ return basic_string_ref(data() + pos, (std::min)(size() - pos, n));
+ }
+
+ int compare(basic_string_ref x) const {
+ const int cmp = traits::compare ( ptr_, x.ptr_, (std::min)(len_, x.len_));
+ return cmp != 0 ? cmp : ( len_ == x.len_ ? 0 : len_ < x.len_ ? -1 : 1 );
+ }
+
+ bool starts_with(charT c) const { return !empty() && traits::eq ( c, front()); }
+ bool starts_with(basic_string_ref x) const {
+ return len_ >= x.len_ && traits::compare ( ptr_, x.ptr_, x.len_ ) == 0;
+ }
+
+ bool ends_with(charT c) const { return !empty() && traits::eq ( c, back()); }
+ bool ends_with(basic_string_ref x) const {
+ return len_ >= x.len_ && traits::compare ( ptr_ + len_ - x.len_, x.ptr_, x.len_ ) == 0;
+ }
+
+ size_type find(basic_string_ref s) const {
+ if (s.empty()) return 0;
+ const_iterator iter = std::search ( this->cbegin (), this->cend (),
+ s.cbegin (), s.cend (), traits::eq );
+ return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
+ }
+
+ size_type find(charT c) const {
+ const_iterator iter = std::find_if ( this->cbegin (), this->cend (),
+ detail::string_ref_traits_eq<charT, traits> ( c ));
+ return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
+ }
+
+ size_type rfind(basic_string_ref s) const {
+ if (s.empty()) return 0;
+ const_reverse_iterator iter = std::search ( this->crbegin (), this->crend (),
+ s.crbegin (), s.crend (), traits::eq );
+ return iter == this->crend () ? npos : (std::distance(iter, this->crend()) - s.size());
+ }
+
+ size_type rfind(charT c) const {
+ const_reverse_iterator iter = std::find_if ( this->crbegin (), this->crend (),
+ detail::string_ref_traits_eq<charT, traits> ( c ));
+ return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
+ }
+
+ size_type find_first_of(charT c) const { return find (c); }
+ size_type find_last_of (charT c) const { return rfind (c); }
+
+ size_type find_first_of(basic_string_ref s) const {
+ const_iterator iter = std::find_first_of
+ ( this->cbegin (), this->cend (), s.cbegin (), s.cend (), traits::eq );
+ return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
+ }
+
+ size_type find_last_of(basic_string_ref s) const {
+ const_reverse_iterator iter = std::find_first_of
+ ( this->crbegin (), this->crend (), s.cbegin (), s.cend (), traits::eq );
+ return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
+ }
+
+ size_type find_first_not_of(basic_string_ref s) const {
+ const_iterator iter = find_not_of ( this->cbegin (), this->cend (), s );
+ return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
+ }
+
+ size_type find_first_not_of(charT c) const {
+ for ( const_iterator iter = this->cbegin (); iter != this->cend (); ++iter )
+ if ( !traits::eq ( c, *iter ))
+ return std::distance ( this->cbegin (), iter );
+ return npos;
+ }
+
+ size_type find_last_not_of(basic_string_ref s) const {
+ const_reverse_iterator iter = find_not_of ( this->crbegin (), this->crend (), s );
+ return iter == this->crend () ? npos : (this->size() - 1 - std::distance(this->crbegin(), iter));
+ }
+
+ size_type find_last_not_of(charT c) const {
+ for ( const_reverse_iterator iter = this->crbegin (); iter != this->crend (); ++iter )
+ if ( !traits::eq ( c, *iter ))
+ return this->size() - 1 - std::distance(this->crbegin(), iter);
+ return npos;
+ }
+
+ private:
+
+ template <typename Iterator>
+ Iterator find_not_of ( Iterator first, Iterator last, basic_string_ref s ) const {
+ for ( ; first != last ; ++first )
+ if ( 0 == traits::find ( s.ptr_, s.len_, *first ))
+ return first;
+ return last;
+ }
+
+
+
+ const charT *ptr_;
+ std::size_t len_;
+ };
+
+
+// Comparison operators
+// Equality
+ template<typename charT, typename traits>
+ inline bool operator==(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
+ if ( x.size () != y.size ()) return false;
+ return x.compare(y) == 0;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator==(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
+ return x == basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator==(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) == y;
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator==(basic_string_ref<charT, traits> x, const charT * y) {
+ return x == basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator==(const charT * x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) == y;
+ }
+
+// Inequality
+ template<typename charT, typename traits>
+ inline bool operator!=(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
+ if ( x.size () != y.size ()) return true;
+ return x.compare(y) != 0;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator!=(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
+ return x != basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator!=(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) != y;
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator!=(basic_string_ref<charT, traits> x, const charT * y) {
+ return x != basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator!=(const charT * x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) != y;
+ }
+
+// Less than
+ template<typename charT, typename traits>
+ inline bool operator<(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
+ return x.compare(y) < 0;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator<(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
+ return x < basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator<(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) < y;
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator<(basic_string_ref<charT, traits> x, const charT * y) {
+ return x < basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator<(const charT * x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) < y;
+ }
+
+// Greater than
+ template<typename charT, typename traits>
+ inline bool operator>(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
+ return x.compare(y) > 0;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator>(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
+ return x > basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator>(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) > y;
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator>(basic_string_ref<charT, traits> x, const charT * y) {
+ return x > basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator>(const charT * x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) > y;
+ }
+
+// Less than or equal to
+ template<typename charT, typename traits>
+ inline bool operator<=(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
+ return x.compare(y) <= 0;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator<=(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
+ return x <= basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator<=(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) <= y;
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator<=(basic_string_ref<charT, traits> x, const charT * y) {
+ return x <= basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator<=(const charT * x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) <= y;
+ }
+
+// Greater than or equal to
+ template<typename charT, typename traits>
+ inline bool operator>=(basic_string_ref<charT, traits> x, basic_string_ref<charT, traits> y) {
+ return x.compare(y) >= 0;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator>=(basic_string_ref<charT, traits> x, const std::basic_string<charT, traits, Allocator> & y) {
+ return x >= basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline bool operator>=(const std::basic_string<charT, traits, Allocator> & x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) >= y;
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator>=(basic_string_ref<charT, traits> x, const charT * y) {
+ return x >= basic_string_ref<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline bool operator>=(const charT * x, basic_string_ref<charT, traits> y) {
+ return basic_string_ref<charT, traits>(x) >= y;
+ }
+
+ namespace detail {
+
+ template<class charT, class traits>
+ inline void sr_insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
+ enum { chunk_size = 8 };
+ charT fill_chars[chunk_size];
+ std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
+ for (; n >= chunk_size && os.good(); n -= chunk_size)
+ os.write(fill_chars, static_cast< std::size_t >(chunk_size));
+ if (n > 0 && os.good())
+ os.write(fill_chars, n);
+ }
+
+ template<class charT, class traits>
+ void sr_insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_ref<charT,traits>& str) {
+ const std::size_t size = str.size();
+ const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
+ const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
+ if (!align_left) {
+ detail::sr_insert_fill_chars(os, alignment_size);
+ if (os.good())
+ os.write(str.data(), size);
+ }
+ else {
+ os.write(str.data(), size);
+ if (os.good())
+ detail::sr_insert_fill_chars(os, alignment_size);
+ }
+ }
+
+ } // namespace detail
+
+ // Inserter
+ template<class charT, class traits>
+ inline std::basic_ostream<charT, traits>&
+ operator<<(std::basic_ostream<charT, traits>& os, const basic_string_ref<charT,traits>& str) {
+ if (os.good()) {
+ const std::size_t size = str.size();
+ const std::size_t w = static_cast< std::size_t >(os.width());
+ if (w <= size)
+ os.write(str.data(), size);
+ else
+ detail::sr_insert_aligned(os, str);
+ os.width(0);
+ }
+ return os;
+ }
+
+#if 0
+ // numeric conversions
+ //
+ // These are short-term implementations.
+ // In a production environment, I would rather avoid the copying.
+ //
+ inline int stoi (string_ref str, size_t* idx=0, int base=10) {
+ return std::stoi ( std::string(str), idx, base );
+ }
+
+ inline long stol (string_ref str, size_t* idx=0, int base=10) {
+ return std::stol ( std::string(str), idx, base );
+ }
+
+ inline unsigned long stoul (string_ref str, size_t* idx=0, int base=10) {
+ return std::stoul ( std::string(str), idx, base );
+ }
+
+ inline long long stoll (string_ref str, size_t* idx=0, int base=10) {
+ return std::stoll ( std::string(str), idx, base );
+ }
+
+ inline unsigned long long stoull (string_ref str, size_t* idx=0, int base=10) {
+ return std::stoull ( std::string(str), idx, base );
+ }
+
+ inline float stof (string_ref str, size_t* idx=0) {
+ return std::stof ( std::string(str), idx );
+ }
+
+ inline double stod (string_ref str, size_t* idx=0) {
+ return std::stod ( std::string(str), idx );
+ }
+
+ inline long double stold (string_ref str, size_t* idx=0) {
+ return std::stold ( std::string(str), idx );
+ }
+
+ inline int stoi (wstring_ref str, size_t* idx=0, int base=10) {
+ return std::stoi ( std::wstring(str), idx, base );
+ }
+
+ inline long stol (wstring_ref str, size_t* idx=0, int base=10) {
+ return std::stol ( std::wstring(str), idx, base );
+ }
+
+ inline unsigned long stoul (wstring_ref str, size_t* idx=0, int base=10) {
+ return std::stoul ( std::wstring(str), idx, base );
+ }
+
+ inline long long stoll (wstring_ref str, size_t* idx=0, int base=10) {
+ return std::stoll ( std::wstring(str), idx, base );
+ }
+
+ inline unsigned long long stoull (wstring_ref str, size_t* idx=0, int base=10) {
+ return std::stoull ( std::wstring(str), idx, base );
+ }
+
+ inline float stof (wstring_ref str, size_t* idx=0) {
+ return std::stof ( std::wstring(str), idx );
+ }
+
+ inline double stod (wstring_ref str, size_t* idx=0) {
+ return std::stod ( std::wstring(str), idx );
+ }
+
+ inline long double stold (wstring_ref str, size_t* idx=0) {
+ return std::stold ( std::wstring(str), idx );
+ }
+#endif
+
+}
+
+#if 0
+namespace std {
+ // Hashing
+ template<> struct hash<boost::string_ref>;
+ template<> struct hash<boost::u16string_ref>;
+ template<> struct hash<boost::u32string_ref>;
+ template<> struct hash<boost::wstring_ref>;
+}
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/utility/string_ref_fwd.hpp b/src/third_party/boost-1.69.0/boost/utility/string_ref_fwd.hpp
index f58b98c1fb4..f58b98c1fb4 100644
--- a/src/third_party/boost-1.68.0/boost/utility/string_ref_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/string_ref_fwd.hpp
diff --git a/src/third_party/boost-1.69.0/boost/utility/string_view.hpp b/src/third_party/boost-1.69.0/boost/utility/string_view.hpp
new file mode 100644
index 00000000000..11aa801e294
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/utility/string_view.hpp
@@ -0,0 +1,710 @@
+/*
+ Copyright (c) Marshall Clow 2012-2015.
+ Copyright (c) Beman Dawes 2015
+
+ Distributed under the Boost Software License, Version 1.0. (See accompanying
+ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+ For more information, see http://www.boost.org
+
+ Based on the StringRef implementation in LLVM (http://llvm.org) and
+ N3422 by Jeffrey Yasskin
+ http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3442.html
+ Updated July 2015 to reflect the Library Fundamentals TS
+ http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/n4480.html
+*/
+
+#ifndef BOOST_STRING_VIEW_HPP
+#define BOOST_STRING_VIEW_HPP
+
+#include <boost/config.hpp>
+#include <boost/detail/workaround.hpp>
+#include <boost/utility/string_view_fwd.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/container_hash/hash_fwd.hpp>
+
+#include <cstddef>
+#include <stdexcept>
+#include <algorithm>
+#include <iterator>
+#include <string>
+#include <cstring>
+#include <iosfwd>
+
+#if defined(BOOST_NO_CXX11_DEFAULTED_FUNCTIONS) || (defined(BOOST_GCC) && ((BOOST_GCC+0) / 100) <= 406)
+// GCC 4.6 cannot handle a defaulted function with noexcept specifier
+#define BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+#endif
+
+namespace boost {
+
+ namespace detail {
+ // A helper functor because sometimes we don't have lambdas
+ template <typename charT, typename traits>
+ class string_view_traits_eq {
+ public:
+ string_view_traits_eq ( charT ch ) : ch_(ch) {}
+ bool operator()( charT val ) const { return traits::eq (ch_, val); }
+ charT ch_;
+ };
+ }
+
+ template<typename charT, typename traits> // traits defaulted in string_view_fwd.hpp
+ class basic_string_view {
+ public:
+ // types
+ typedef traits traits_type;
+ typedef charT value_type;
+ typedef charT* pointer;
+ typedef const charT* const_pointer;
+ typedef charT& reference;
+ typedef const charT& const_reference;
+ typedef const_pointer const_iterator; // impl-defined
+ typedef const_iterator iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ typedef const_reverse_iterator reverse_iterator;
+ typedef std::size_t size_type;
+ typedef std::ptrdiff_t difference_type;
+ static BOOST_CONSTEXPR_OR_CONST size_type npos = size_type(-1);
+
+ // construct/copy
+ BOOST_CONSTEXPR basic_string_view() BOOST_NOEXCEPT
+ : ptr_(NULL), len_(0) {}
+
+ // by defaulting these functions, basic_string_ref becomes
+ // trivially copy/move constructible.
+ BOOST_CONSTEXPR basic_string_view(const basic_string_view &rhs) BOOST_NOEXCEPT
+#ifndef BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+ = default;
+#else
+ : ptr_(rhs.ptr_), len_(rhs.len_) {}
+#endif
+
+ basic_string_view& operator=(const basic_string_view &rhs) BOOST_NOEXCEPT
+#ifndef BOOST_STRING_VIEW_NO_CXX11_DEFAULTED_NOEXCEPT_FUNCTIONS
+ = default;
+#else
+ {
+ ptr_ = rhs.ptr_;
+ len_ = rhs.len_;
+ return *this;
+ }
+#endif
+
+ template<typename Allocator>
+ basic_string_view(const std::basic_string<charT, traits, Allocator>& str) BOOST_NOEXCEPT
+ : ptr_(str.data()), len_(str.length()) {}
+
+// #if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_DELETED_FUNCTIONS)
+// // Constructing a string_view from a temporary string is a bad idea
+// template<typename Allocator>
+// basic_string_view( std::basic_string<charT, traits, Allocator>&&)
+// = delete;
+// #endif
+
+ BOOST_CONSTEXPR basic_string_view(const charT* str)
+ : ptr_(str), len_(traits::length(str)) {}
+
+ BOOST_CONSTEXPR basic_string_view(const charT* str, size_type len)
+ : ptr_(str), len_(len) {}
+
+ // iterators
+ BOOST_CONSTEXPR const_iterator begin() const BOOST_NOEXCEPT { return ptr_; }
+ BOOST_CONSTEXPR const_iterator cbegin() const BOOST_NOEXCEPT { return ptr_; }
+ BOOST_CONSTEXPR const_iterator end() const BOOST_NOEXCEPT { return ptr_ + len_; }
+ BOOST_CONSTEXPR const_iterator cend() const BOOST_NOEXCEPT { return ptr_ + len_; }
+ const_reverse_iterator rbegin() const BOOST_NOEXCEPT { return const_reverse_iterator(end()); }
+ const_reverse_iterator crbegin() const BOOST_NOEXCEPT { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const BOOST_NOEXCEPT { return const_reverse_iterator(begin()); }
+ const_reverse_iterator crend() const BOOST_NOEXCEPT { return const_reverse_iterator(begin()); }
+
+ // capacity
+ BOOST_CONSTEXPR size_type size() const BOOST_NOEXCEPT { return len_; }
+ BOOST_CONSTEXPR size_type length() const BOOST_NOEXCEPT { return len_; }
+ BOOST_CONSTEXPR size_type max_size() const BOOST_NOEXCEPT { return len_; }
+ BOOST_CONSTEXPR bool empty() const BOOST_NOEXCEPT { return len_ == 0; }
+
+ // element access
+ BOOST_CONSTEXPR const_reference operator[](size_type pos) const BOOST_NOEXCEPT { return ptr_[pos]; }
+
+ BOOST_CONSTEXPR const_reference at(size_t pos) const {
+ return pos >= len_ ? BOOST_THROW_EXCEPTION(std::out_of_range("boost::string_view::at")), ptr_[0] : ptr_[pos];
+ }
+
+ BOOST_CONSTEXPR const_reference front() const { return ptr_[0]; }
+ BOOST_CONSTEXPR const_reference back() const { return ptr_[len_-1]; }
+ BOOST_CONSTEXPR const_pointer data() const BOOST_NOEXCEPT { return ptr_; }
+
+ // modifiers
+ void clear() BOOST_NOEXCEPT { len_ = 0; } // Boost extension
+
+ BOOST_CXX14_CONSTEXPR void remove_prefix(size_type n) {
+ if ( n > len_ )
+ n = len_;
+ ptr_ += n;
+ len_ -= n;
+ }
+
+ BOOST_CXX14_CONSTEXPR void remove_suffix(size_type n) {
+ if ( n > len_ )
+ n = len_;
+ len_ -= n;
+ }
+
+ BOOST_CXX14_CONSTEXPR void swap(basic_string_view& s) BOOST_NOEXCEPT {
+ std::swap(ptr_, s.ptr_);
+ std::swap(len_, s.len_);
+ }
+
+ // basic_string_view string operations
+#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
+ template<typename Allocator>
+ explicit operator std::basic_string<charT, traits, Allocator>() const {
+ return std::basic_string<charT, traits, Allocator>(begin(), end());
+ }
+#endif
+
+#ifndef BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS
+ template<typename Allocator = std::allocator<charT> >
+ std::basic_string<charT, traits, Allocator> to_string(const Allocator& a = Allocator()) const {
+ return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
+ }
+#else
+ std::basic_string<charT, traits> to_string() const {
+ return std::basic_string<charT, traits>(begin(), end());
+ }
+
+ template<typename Allocator>
+ std::basic_string<charT, traits, Allocator> to_string(const Allocator& a) const {
+ return std::basic_string<charT, traits, Allocator>(begin(), end(), a);
+ }
+#endif
+
+ size_type copy(charT* s, size_type n, size_type pos=0) const {
+ if (pos > size())
+ BOOST_THROW_EXCEPTION(std::out_of_range("string_view::copy" ));
+ size_type rlen = (std::min)(n, len_ - pos);
+ traits_type::copy(s, data() + pos, rlen);
+ return rlen;
+ }
+
+ BOOST_CXX14_CONSTEXPR basic_string_view substr(size_type pos, size_type n=npos) const {
+ if ( pos > size())
+ BOOST_THROW_EXCEPTION( std::out_of_range ( "string_view::substr" ) );
+ return basic_string_view(data() + pos, (std::min)(size() - pos, n));
+ }
+
+ BOOST_CXX14_CONSTEXPR int compare(basic_string_view x) const BOOST_NOEXCEPT {
+ const int cmp = traits::compare(ptr_, x.ptr_, (std::min)(len_, x.len_));
+ return cmp != 0 ? cmp : (len_ == x.len_ ? 0 : len_ < x.len_ ? -1 : 1);
+ }
+
+ BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1, basic_string_view x)
+ const BOOST_NOEXCEPT {
+ return substr(pos1, n1).compare(x);
+ }
+
+ BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1,
+ basic_string_view x, size_type pos2, size_type n2) const {
+ return substr(pos1, n1).compare(x.substr(pos2, n2));
+ }
+
+ BOOST_CXX14_CONSTEXPR int compare(const charT* x) const {
+ return compare(basic_string_view(x));
+ }
+
+ BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1, const charT* x) const {
+ return substr(pos1, n1).compare(basic_string_view(x));
+ }
+
+ BOOST_CXX14_CONSTEXPR int compare(size_type pos1, size_type n1,
+ const charT* x, size_type n2) const {
+ return substr(pos1, n1).compare(basic_string_view(x, n2));
+ }
+
+ // Searches
+ BOOST_CONSTEXPR bool starts_with(charT c) const BOOST_NOEXCEPT { // Boost extension
+ return !empty() && traits::eq(c, front());
+ }
+
+ BOOST_CONSTEXPR bool starts_with(basic_string_view x) const BOOST_NOEXCEPT { // Boost extension
+ return len_ >= x.len_ && traits::compare(ptr_, x.ptr_, x.len_) == 0;
+ }
+
+ BOOST_CONSTEXPR bool ends_with(charT c) const BOOST_NOEXCEPT { // Boost extension
+ return !empty() && traits::eq(c, back());
+ }
+
+ BOOST_CONSTEXPR bool ends_with(basic_string_view x) const BOOST_NOEXCEPT { // Boost extension
+ return len_ >= x.len_ &&
+ traits::compare(ptr_ + len_ - x.len_, x.ptr_, x.len_) == 0;
+ }
+
+ // find
+ BOOST_CXX14_CONSTEXPR size_type find(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
+ if (pos > size())
+ return npos;
+ if (s.empty())
+ return pos;
+ if (s.size() > size() - pos)
+ return npos;
+ const charT* cur = ptr_ + pos;
+ const charT* last = cend() - s.size() + 1;
+ for (; cur != last ; ++cur) {
+ cur = traits::find(cur, last - cur, s[0]);
+ if (!cur)
+ return npos;
+ if (traits::compare(cur, s.cbegin(), s.size()) == 0)
+ return cur - ptr_;
+ }
+ return npos;
+ }
+ BOOST_CXX14_CONSTEXPR size_type find(charT c, size_type pos = 0) const BOOST_NOEXCEPT {
+ if (pos > size())
+ return npos;
+ const charT* ret_ptr = traits::find(ptr_ + pos, len_ - pos, c);
+ if (ret_ptr)
+ return ret_ptr - ptr_;
+ return npos;
+ }
+ BOOST_CXX14_CONSTEXPR size_type find(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
+ { return find(basic_string_view(s, n), pos); }
+ BOOST_CXX14_CONSTEXPR size_type find(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
+ { return find(basic_string_view(s), pos); }
+
+ // rfind
+ BOOST_CXX14_CONSTEXPR size_type rfind(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
+ if (len_ < s.len_)
+ return npos;
+ if (pos > len_ - s.len_)
+ pos = len_ - s.len_;
+ if (s.len_ == 0u) // an empty string is always found
+ return pos;
+ for (const charT* cur = ptr_ + pos; ; --cur) {
+ if (traits::compare(cur, s.ptr_, s.len_) == 0)
+ return cur - ptr_;
+ if (cur == ptr_)
+ return npos;
+ };
+ }
+ BOOST_CXX14_CONSTEXPR size_type rfind(charT c, size_type pos = npos) const BOOST_NOEXCEPT
+ { return rfind(basic_string_view(&c, 1), pos); }
+ BOOST_CXX14_CONSTEXPR size_type rfind(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
+ { return rfind(basic_string_view(s, n), pos); }
+ BOOST_CXX14_CONSTEXPR size_type rfind(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
+ { return rfind(basic_string_view(s), pos); }
+
+ // find_first_of
+ BOOST_CXX14_CONSTEXPR size_type find_first_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
+ if (pos >= len_ || s.len_ == 0)
+ return npos;
+ const_iterator iter = std::find_first_of
+ (this->cbegin () + pos, this->cend (), s.cbegin (), s.cend (), traits::eq);
+ return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
+ }
+ BOOST_CXX14_CONSTEXPR size_type find_first_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
+ { return find(c, pos); }
+ BOOST_CXX14_CONSTEXPR size_type find_first_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
+ { return find_first_of(basic_string_view(s, n), pos); }
+ BOOST_CXX14_CONSTEXPR size_type find_first_of(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
+ { return find_first_of(basic_string_view(s), pos); }
+
+ // find_last_of
+ BOOST_CXX14_CONSTEXPR size_type find_last_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
+ if (s.len_ == 0u)
+ return npos;
+ if (pos >= len_)
+ pos = 0;
+ else
+ pos = len_ - (pos+1);
+ const_reverse_iterator iter = std::find_first_of
+ ( this->crbegin () + pos, this->crend (), s.cbegin (), s.cend (), traits::eq );
+ return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter);
+ }
+ BOOST_CXX14_CONSTEXPR size_type find_last_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
+ { return find_last_of(basic_string_view(&c, 1), pos); }
+ BOOST_CXX14_CONSTEXPR size_type find_last_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
+ { return find_last_of(basic_string_view(s, n), pos); }
+ BOOST_CXX14_CONSTEXPR size_type find_last_of(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
+ { return find_last_of(basic_string_view(s), pos); }
+
+ // find_first_not_of
+ BOOST_CXX14_CONSTEXPR size_type find_first_not_of(basic_string_view s, size_type pos = 0) const BOOST_NOEXCEPT {
+ if (pos >= len_)
+ return npos;
+ if (s.len_ == 0)
+ return pos;
+ const_iterator iter = find_not_of ( this->cbegin () + pos, this->cend (), s );
+ return iter == this->cend () ? npos : std::distance ( this->cbegin (), iter );
+ }
+ BOOST_CXX14_CONSTEXPR size_type find_first_not_of(charT c, size_type pos = 0) const BOOST_NOEXCEPT
+ { return find_first_not_of(basic_string_view(&c, 1), pos); }
+ BOOST_CXX14_CONSTEXPR size_type find_first_not_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
+ { return find_first_not_of(basic_string_view(s, n), pos); }
+ BOOST_CXX14_CONSTEXPR size_type find_first_not_of(const charT* s, size_type pos = 0) const BOOST_NOEXCEPT
+ { return find_first_not_of(basic_string_view(s), pos); }
+
+ // find_last_not_of
+ BOOST_CXX14_CONSTEXPR size_type find_last_not_of(basic_string_view s, size_type pos = npos) const BOOST_NOEXCEPT {
+ if (pos >= len_)
+ pos = len_ - 1;
+ if (s.len_ == 0u)
+ return pos;
+ pos = len_ - (pos+1);
+ const_reverse_iterator iter = find_not_of ( this->crbegin () + pos, this->crend (), s );
+ return iter == this->crend () ? npos : reverse_distance ( this->crbegin (), iter );
+ }
+ BOOST_CXX14_CONSTEXPR size_type find_last_not_of(charT c, size_type pos = npos) const BOOST_NOEXCEPT
+ { return find_last_not_of(basic_string_view(&c, 1), pos); }
+ BOOST_CXX14_CONSTEXPR size_type find_last_not_of(const charT* s, size_type pos, size_type n) const BOOST_NOEXCEPT
+ { return find_last_not_of(basic_string_view(s, n), pos); }
+ BOOST_CXX14_CONSTEXPR size_type find_last_not_of(const charT* s, size_type pos = npos) const BOOST_NOEXCEPT
+ { return find_last_not_of(basic_string_view(s), pos); }
+
+ private:
+ template <typename r_iter>
+ size_type reverse_distance(r_iter first, r_iter last) const BOOST_NOEXCEPT {
+ // Portability note here: std::distance is not NOEXCEPT, but calling it with a string_view::reverse_iterator will not throw.
+ return len_ - 1 - std::distance ( first, last );
+ }
+
+ template <typename Iterator>
+ Iterator find_not_of(Iterator first, Iterator last, basic_string_view s) const BOOST_NOEXCEPT {
+ for (; first != last ; ++first)
+ if ( 0 == traits::find(s.ptr_, s.len_, *first))
+ return first;
+ return last;
+ }
+
+ const charT *ptr_;
+ std::size_t len_;
+ };
+
+
+// Comparison operators
+// Equality
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator==(basic_string_view<charT, traits> x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ if (x.size () != y.size ()) return false;
+ return x.compare(y) == 0;
+ }
+
+// Inequality
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator!=(basic_string_view<charT, traits> x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ if ( x.size () != y.size ()) return true;
+ return x.compare(y) != 0;
+ }
+
+// Less than
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator<(basic_string_view<charT, traits> x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return x.compare(y) < 0;
+ }
+
+// Greater than
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator>(basic_string_view<charT, traits> x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return x.compare(y) > 0;
+ }
+
+// Less than or equal to
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator<=(basic_string_view<charT, traits> x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return x.compare(y) <= 0;
+ }
+
+// Greater than or equal to
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator>=(basic_string_view<charT, traits> x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return x.compare(y) >= 0;
+ }
+
+// "sufficient additional overloads of comparison functions"
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator==(basic_string_view<charT, traits> x,
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ return x == basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator==(const std::basic_string<charT, traits, Allocator> & x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) == y;
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator==(basic_string_view<charT, traits> x,
+ const charT * y) BOOST_NOEXCEPT {
+ return x == basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator==(const charT * x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) == y;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator!=(basic_string_view<charT, traits> x,
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ return x != basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator!=(const std::basic_string<charT, traits, Allocator> & x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) != y;
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator!=(basic_string_view<charT, traits> x,
+ const charT * y) BOOST_NOEXCEPT {
+ return x != basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator!=(const charT * x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) != y;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator<(basic_string_view<charT, traits> x,
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ return x < basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator<(const std::basic_string<charT, traits, Allocator> & x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) < y;
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator<(basic_string_view<charT, traits> x,
+ const charT * y) BOOST_NOEXCEPT {
+ return x < basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator<(const charT * x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) < y;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator>(basic_string_view<charT, traits> x,
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ return x > basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator>(const std::basic_string<charT, traits, Allocator> & x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) > y;
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator>(basic_string_view<charT, traits> x,
+ const charT * y) BOOST_NOEXCEPT {
+ return x > basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator>(const charT * x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) > y;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator<=(basic_string_view<charT, traits> x,
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ return x <= basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator<=(const std::basic_string<charT, traits, Allocator> & x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) <= y;
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator<=(basic_string_view<charT, traits> x,
+ const charT * y) BOOST_NOEXCEPT {
+ return x <= basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator<=(const charT * x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) <= y;
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator>=(basic_string_view<charT, traits> x,
+ const std::basic_string<charT, traits, Allocator> & y) BOOST_NOEXCEPT {
+ return x >= basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits, typename Allocator>
+ inline BOOST_CXX14_CONSTEXPR bool operator>=(const std::basic_string<charT, traits, Allocator> & x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) >= y;
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator>=(basic_string_view<charT, traits> x,
+ const charT * y) BOOST_NOEXCEPT {
+ return x >= basic_string_view<charT, traits>(y);
+ }
+
+ template<typename charT, typename traits>
+ inline BOOST_CXX14_CONSTEXPR bool operator>=(const charT * x,
+ basic_string_view<charT, traits> y) BOOST_NOEXCEPT {
+ return basic_string_view<charT, traits>(x) >= y;
+ }
+
+ namespace detail {
+
+ template<class charT, class traits>
+ inline void sv_insert_fill_chars(std::basic_ostream<charT, traits>& os, std::size_t n) {
+ enum { chunk_size = 8 };
+ charT fill_chars[chunk_size];
+ std::fill_n(fill_chars, static_cast< std::size_t >(chunk_size), os.fill());
+ for (; n >= chunk_size && os.good(); n -= chunk_size)
+ os.write(fill_chars, static_cast< std::size_t >(chunk_size));
+ if (n > 0 && os.good())
+ os.write(fill_chars, n);
+ }
+
+ template<class charT, class traits>
+ void sv_insert_aligned(std::basic_ostream<charT, traits>& os, const basic_string_view<charT,traits>& str) {
+ const std::size_t size = str.size();
+ const std::size_t alignment_size = static_cast< std::size_t >(os.width()) - size;
+ const bool align_left = (os.flags() & std::basic_ostream<charT, traits>::adjustfield) == std::basic_ostream<charT, traits>::left;
+ if (!align_left) {
+ detail::sv_insert_fill_chars(os, alignment_size);
+ if (os.good())
+ os.write(str.data(), size);
+ }
+ else {
+ os.write(str.data(), size);
+ if (os.good())
+ detail::sv_insert_fill_chars(os, alignment_size);
+ }
+ }
+
+ } // namespace detail
+
+ // Inserter
+ template<class charT, class traits>
+ inline std::basic_ostream<charT, traits>&
+ operator<<(std::basic_ostream<charT, traits>& os,
+ const basic_string_view<charT,traits>& str) {
+ if (os.good()) {
+ const std::size_t size = str.size();
+ const std::size_t w = static_cast< std::size_t >(os.width());
+ if (w <= size)
+ os.write(str.data(), size);
+ else
+ detail::sv_insert_aligned(os, str);
+ os.width(0);
+ }
+ return os;
+ }
+
+#if 0
+ // numeric conversions
+ //
+ // These are short-term implementations.
+ // In a production environment, I would rather avoid the copying.
+ //
+ inline int stoi (string_view str, size_t* idx=0, int base=10) {
+ return std::stoi ( std::string(str), idx, base );
+ }
+
+ inline long stol (string_view str, size_t* idx=0, int base=10) {
+ return std::stol ( std::string(str), idx, base );
+ }
+
+ inline unsigned long stoul (string_view str, size_t* idx=0, int base=10) {
+ return std::stoul ( std::string(str), idx, base );
+ }
+
+ inline long long stoll (string_view str, size_t* idx=0, int base=10) {
+ return std::stoll ( std::string(str), idx, base );
+ }
+
+ inline unsigned long long stoull (string_view str, size_t* idx=0, int base=10) {
+ return std::stoull ( std::string(str), idx, base );
+ }
+
+ inline float stof (string_view str, size_t* idx=0) {
+ return std::stof ( std::string(str), idx );
+ }
+
+ inline double stod (string_view str, size_t* idx=0) {
+ return std::stod ( std::string(str), idx );
+ }
+
+ inline long double stold (string_view str, size_t* idx=0) {
+ return std::stold ( std::string(str), idx );
+ }
+
+ inline int stoi (wstring_view str, size_t* idx=0, int base=10) {
+ return std::stoi ( std::wstring(str), idx, base );
+ }
+
+ inline long stol (wstring_view str, size_t* idx=0, int base=10) {
+ return std::stol ( std::wstring(str), idx, base );
+ }
+
+ inline unsigned long stoul (wstring_view str, size_t* idx=0, int base=10) {
+ return std::stoul ( std::wstring(str), idx, base );
+ }
+
+ inline long long stoll (wstring_view str, size_t* idx=0, int base=10) {
+ return std::stoll ( std::wstring(str), idx, base );
+ }
+
+ inline unsigned long long stoull (wstring_view str, size_t* idx=0, int base=10) {
+ return std::stoull ( std::wstring(str), idx, base );
+ }
+
+ inline float stof (wstring_view str, size_t* idx=0) {
+ return std::stof ( std::wstring(str), idx );
+ }
+
+ inline double stod (wstring_view str, size_t* idx=0) {
+ return std::stod ( std::wstring(str), idx );
+ }
+
+ inline long double stold (wstring_view str, size_t* idx=0) {
+ return std::stold ( std::wstring(str), idx );
+ }
+#endif
+
+ template <class charT, class traits>
+ std::size_t hash_value(basic_string_view<charT, traits> s) {
+ return boost::hash_range(s.begin(), s.end());
+ }
+}
+
+#if 0
+namespace std {
+ // Hashing
+ template<> struct hash<boost::string_view>;
+ template<> struct hash<boost::u16string_view>;
+ template<> struct hash<boost::u32string_view>;
+ template<> struct hash<boost::wstring_view>;
+}
+#endif
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/utility/string_view_fwd.hpp b/src/third_party/boost-1.69.0/boost/utility/string_view_fwd.hpp
index dbda0de46aa..dbda0de46aa 100644
--- a/src/third_party/boost-1.68.0/boost/utility/string_view_fwd.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/string_view_fwd.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/swap.hpp b/src/third_party/boost-1.69.0/boost/utility/swap.hpp
index dd9ecd90701..dd9ecd90701 100644
--- a/src/third_party/boost-1.68.0/boost/utility/swap.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/swap.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/typed_in_place_factory.hpp b/src/third_party/boost-1.69.0/boost/utility/typed_in_place_factory.hpp
index 833a34692d0..833a34692d0 100644
--- a/src/third_party/boost-1.68.0/boost/utility/typed_in_place_factory.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/typed_in_place_factory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/utility/value_init.hpp b/src/third_party/boost-1.69.0/boost/utility/value_init.hpp
index 9d8de70733a..9d8de70733a 100644
--- a/src/third_party/boost-1.68.0/boost/utility/value_init.hpp
+++ b/src/third_party/boost-1.69.0/boost/utility/value_init.hpp
diff --git a/src/third_party/boost-1.69.0/boost/version.hpp b/src/third_party/boost-1.69.0/boost/version.hpp
new file mode 100644
index 00000000000..c9afbd9860a
--- /dev/null
+++ b/src/third_party/boost-1.69.0/boost/version.hpp
@@ -0,0 +1,32 @@
+// Boost version.hpp configuration header file ------------------------------//
+
+// (C) Copyright John maddock 1999. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org/libs/config for documentation
+
+#ifndef BOOST_VERSION_HPP
+#define BOOST_VERSION_HPP
+
+//
+// Caution: this is the only Boost header that is guaranteed
+// to change with every Boost release. Including this header
+// will cause a recompile every time a new Boost version is
+// used.
+//
+// BOOST_VERSION % 100 is the patch level
+// BOOST_VERSION / 100 % 1000 is the minor version
+// BOOST_VERSION / 100000 is the major version
+
+#define BOOST_VERSION 106900
+
+//
+// BOOST_LIB_VERSION must be defined to be the same as BOOST_VERSION
+// but as a *string* in the form "x_y[_z]" where x is the major version
+// number, y is the minor version number, and z is the patch level if not 0.
+// This is used by <config/auto_link.hpp> to select which library version to link to.
+
+#define BOOST_LIB_VERSION "1_69"
+
+#endif
diff --git a/src/third_party/boost-1.68.0/boost/visit_each.hpp b/src/third_party/boost-1.69.0/boost/visit_each.hpp
index 6463ca9c2f6..6463ca9c2f6 100644
--- a/src/third_party/boost-1.68.0/boost/visit_each.hpp
+++ b/src/third_party/boost-1.69.0/boost/visit_each.hpp
diff --git a/src/third_party/boost-1.68.0/boost/weak_ptr.hpp b/src/third_party/boost-1.69.0/boost/weak_ptr.hpp
index fa8574beac4..fa8574beac4 100644
--- a/src/third_party/boost-1.68.0/boost/weak_ptr.hpp
+++ b/src/third_party/boost-1.69.0/boost/weak_ptr.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/access_rights.hpp b/src/third_party/boost-1.69.0/boost/winapi/access_rights.hpp
index bf8d287f9f1..bf8d287f9f1 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/access_rights.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/access_rights.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/basic_types.hpp b/src/third_party/boost-1.69.0/boost/winapi/basic_types.hpp
index 1168054cd92..1168054cd92 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/basic_types.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/basic_types.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/character_code_conversion.hpp b/src/third_party/boost-1.69.0/boost/winapi/character_code_conversion.hpp
index af5148609c9..af5148609c9 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/character_code_conversion.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/character_code_conversion.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/config.hpp b/src/third_party/boost-1.69.0/boost/winapi/config.hpp
index 2de79cfb0e9..2de79cfb0e9 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/config.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/config.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/dll.hpp b/src/third_party/boost-1.69.0/boost/winapi/dll.hpp
index b42301e5412..b42301e5412 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/dll.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/dll.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/error_codes.hpp b/src/third_party/boost-1.69.0/boost/winapi/error_codes.hpp
index 2226b0dc1b9..2226b0dc1b9 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/error_codes.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/error_codes.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/error_handling.hpp b/src/third_party/boost-1.69.0/boost/winapi/error_handling.hpp
index 7636d0d64a8..7636d0d64a8 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/error_handling.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/error_handling.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/event.hpp b/src/third_party/boost-1.69.0/boost/winapi/event.hpp
index 1ec611f8908..1ec611f8908 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/event.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/event.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/get_current_process.hpp b/src/third_party/boost-1.69.0/boost/winapi/get_current_process.hpp
index a56118cce86..a56118cce86 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/get_current_process.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/get_current_process.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/get_current_process_id.hpp b/src/third_party/boost-1.69.0/boost/winapi/get_current_process_id.hpp
index 488318001d8..488318001d8 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/get_current_process_id.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/get_current_process_id.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/get_current_thread.hpp b/src/third_party/boost-1.69.0/boost/winapi/get_current_thread.hpp
index efc7d82fe8f..efc7d82fe8f 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/get_current_thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/get_current_thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/get_current_thread_id.hpp b/src/third_party/boost-1.69.0/boost/winapi/get_current_thread_id.hpp
index c488e4bcdda..c488e4bcdda 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/get_current_thread_id.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/get_current_thread_id.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/get_last_error.hpp b/src/third_party/boost-1.69.0/boost/winapi/get_last_error.hpp
index b53a6a721f1..b53a6a721f1 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/get_last_error.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/get_last_error.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/get_process_times.hpp b/src/third_party/boost-1.69.0/boost/winapi/get_process_times.hpp
index 88df6df40dc..88df6df40dc 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/get_process_times.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/get_process_times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/get_thread_times.hpp b/src/third_party/boost-1.69.0/boost/winapi/get_thread_times.hpp
index 7b8d04a41c7..7b8d04a41c7 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/get_thread_times.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/get_thread_times.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/handles.hpp b/src/third_party/boost-1.69.0/boost/winapi/handles.hpp
index 5f74d77096e..5f74d77096e 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/handles.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/handles.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/heap_memory.hpp b/src/third_party/boost-1.69.0/boost/winapi/heap_memory.hpp
index fcc61536686..fcc61536686 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/heap_memory.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/heap_memory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/local_memory.hpp b/src/third_party/boost-1.69.0/boost/winapi/local_memory.hpp
index 31241e4e824..31241e4e824 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/local_memory.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/local_memory.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/semaphore.hpp b/src/third_party/boost-1.69.0/boost/winapi/semaphore.hpp
index 44a2981fda8..44a2981fda8 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/semaphore.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/semaphore.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/system.hpp b/src/third_party/boost-1.69.0/boost/winapi/system.hpp
index 118e0c9890b..118e0c9890b 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/system.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/system.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/thread.hpp b/src/third_party/boost-1.69.0/boost/winapi/thread.hpp
index c326aab4f31..c326aab4f31 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/thread.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/thread.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/thread_pool.hpp b/src/third_party/boost-1.69.0/boost/winapi/thread_pool.hpp
index eebf298d9ff..eebf298d9ff 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/thread_pool.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/thread_pool.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/time.hpp b/src/third_party/boost-1.69.0/boost/winapi/time.hpp
index 70b0260fb57..70b0260fb57 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/time.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/time.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/timers.hpp b/src/third_party/boost-1.69.0/boost/winapi/timers.hpp
index a036d689e75..a036d689e75 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/timers.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/timers.hpp
diff --git a/src/third_party/boost-1.68.0/boost/winapi/wait.hpp b/src/third_party/boost-1.69.0/boost/winapi/wait.hpp
index 15b4094cca7..15b4094cca7 100644
--- a/src/third_party/boost-1.68.0/boost/winapi/wait.hpp
+++ b/src/third_party/boost-1.69.0/boost/winapi/wait.hpp
diff --git a/src/third_party/boost-1.68.0/libs/align/README.md b/src/third_party/boost-1.69.0/libs/align/README.md
index 983b806f18a..983b806f18a 100644
--- a/src/third_party/boost-1.68.0/libs/align/README.md
+++ b/src/third_party/boost-1.69.0/libs/align/README.md
diff --git a/src/third_party/boost-1.68.0/libs/atomic/src/lockpool.cpp b/src/third_party/boost-1.69.0/libs/atomic/src/lockpool.cpp
index a1292fa7bb7..a1292fa7bb7 100644
--- a/src/third_party/boost-1.68.0/libs/atomic/src/lockpool.cpp
+++ b/src/third_party/boost-1.69.0/libs/atomic/src/lockpool.cpp
diff --git a/src/third_party/boost-1.68.0/libs/bind/README.md b/src/third_party/boost-1.69.0/libs/bind/README.md
index ebe55532af2..ebe55532af2 100644
--- a/src/third_party/boost-1.68.0/libs/bind/README.md
+++ b/src/third_party/boost-1.69.0/libs/bind/README.md
diff --git a/src/third_party/boost-1.68.0/libs/bind/bind_as_compose.cpp b/src/third_party/boost-1.69.0/libs/bind/bind_as_compose.cpp
index 999856cf280..999856cf280 100644
--- a/src/third_party/boost-1.68.0/libs/bind/bind_as_compose.cpp
+++ b/src/third_party/boost-1.69.0/libs/bind/bind_as_compose.cpp
diff --git a/src/third_party/boost-1.68.0/libs/bind/bind_visitor.cpp b/src/third_party/boost-1.69.0/libs/bind/bind_visitor.cpp
index 1ce7b53f78f..1ce7b53f78f 100644
--- a/src/third_party/boost-1.68.0/libs/bind/bind_visitor.cpp
+++ b/src/third_party/boost-1.69.0/libs/bind/bind_visitor.cpp
diff --git a/src/third_party/boost-1.68.0/libs/chrono/src/chrono.cpp b/src/third_party/boost-1.69.0/libs/chrono/src/chrono.cpp
index f500a796c81..f500a796c81 100644
--- a/src/third_party/boost-1.68.0/libs/chrono/src/chrono.cpp
+++ b/src/third_party/boost-1.69.0/libs/chrono/src/chrono.cpp
diff --git a/src/third_party/boost-1.68.0/libs/chrono/src/process_cpu_clocks.cpp b/src/third_party/boost-1.69.0/libs/chrono/src/process_cpu_clocks.cpp
index c21cab3b8b6..c21cab3b8b6 100644
--- a/src/third_party/boost-1.68.0/libs/chrono/src/process_cpu_clocks.cpp
+++ b/src/third_party/boost-1.69.0/libs/chrono/src/process_cpu_clocks.cpp
diff --git a/src/third_party/boost-1.68.0/libs/chrono/src/thread_clock.cpp b/src/third_party/boost-1.69.0/libs/chrono/src/thread_clock.cpp
index c21b114c0d6..c21b114c0d6 100644
--- a/src/third_party/boost-1.68.0/libs/chrono/src/thread_clock.cpp
+++ b/src/third_party/boost-1.69.0/libs/chrono/src/thread_clock.cpp
diff --git a/src/third_party/boost-1.68.0/libs/container/Jamfile b/src/third_party/boost-1.69.0/libs/container/Jamfile
index c55393e39b7..c55393e39b7 100644
--- a/src/third_party/boost-1.68.0/libs/container/Jamfile
+++ b/src/third_party/boost-1.69.0/libs/container/Jamfile
diff --git a/src/third_party/boost-1.68.0/libs/container/src/alloc_lib.c b/src/third_party/boost-1.69.0/libs/container/src/alloc_lib.c
index 077768b9462..077768b9462 100644
--- a/src/third_party/boost-1.68.0/libs/container/src/alloc_lib.c
+++ b/src/third_party/boost-1.69.0/libs/container/src/alloc_lib.c
diff --git a/src/third_party/boost-1.68.0/libs/container/src/dlmalloc.cpp b/src/third_party/boost-1.69.0/libs/container/src/dlmalloc.cpp
index 6ab6de3a533..6ab6de3a533 100644
--- a/src/third_party/boost-1.68.0/libs/container/src/dlmalloc.cpp
+++ b/src/third_party/boost-1.69.0/libs/container/src/dlmalloc.cpp
diff --git a/src/third_party/boost-1.69.0/libs/container/src/dlmalloc_2_8_6.c b/src/third_party/boost-1.69.0/libs/container/src/dlmalloc_2_8_6.c
new file mode 100644
index 00000000000..7a53d3535b7
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/container/src/dlmalloc_2_8_6.c
@@ -0,0 +1,6280 @@
+/*
+ This is a version (aka dlmalloc) of malloc/free/realloc written by
+ Doug Lea and released to the public domain, as explained at
+ http://creativecommons.org/publicdomain/zero/1.0/ Send questions,
+ comments, complaints, performance data, etc to dl@cs.oswego.edu
+
+* Version 2.8.6 Wed Aug 29 06:57:58 2012 Doug Lea
+ Note: There may be an updated version of this malloc obtainable at
+ ftp://gee.cs.oswego.edu/pub/misc/malloc.c
+ Check before installing!
+
+* Quickstart
+
+ This library is all in one file to simplify the most common usage:
+ ftp it, compile it (-O3), and link it into another program. All of
+ the compile-time options default to reasonable values for use on
+ most platforms. You might later want to step through various
+ compile-time and dynamic tuning options.
+
+ For convenience, an include file for code using this malloc is at:
+ ftp://gee.cs.oswego.edu/pub/misc/malloc-2.8.6.h
+ You don't really need this .h file unless you call functions not
+ defined in your system include files. The .h file contains only the
+ excerpts from this file needed for using this malloc on ANSI C/C++
+ systems, so long as you haven't changed compile-time options about
+ naming and tuning parameters. If you do, then you can create your
+ own malloc.h that does include all settings by cutting at the point
+ indicated below. Note that you may already by default be using a C
+ library containing a malloc that is based on some version of this
+ malloc (for example in linux). You might still want to use the one
+ in this file to customize settings or to avoid overheads associated
+ with library versions.
+
+* Vital statistics:
+
+ Supported pointer/size_t representation: 4 or 8 bytes
+ size_t MUST be an unsigned type of the same width as
+ pointers. (If you are using an ancient system that declares
+ size_t as a signed type, or need it to be a different width
+ than pointers, you can use a previous release of this malloc
+ (e.g. 2.7.2) supporting these.)
+
+ Alignment: 8 bytes (minimum)
+ This suffices for nearly all current machines and C compilers.
+ However, you can define MALLOC_ALIGNMENT to be wider than this
+ if necessary (up to 128bytes), at the expense of using more space.
+
+ Minimum overhead per allocated chunk: 4 or 8 bytes (if 4byte sizes)
+ 8 or 16 bytes (if 8byte sizes)
+ Each malloced chunk has a hidden word of overhead holding size
+ and status information, and additional cross-check word
+ if FOOTERS is defined.
+
+ Minimum allocated size: 4-byte ptrs: 16 bytes (including overhead)
+ 8-byte ptrs: 32 bytes (including overhead)
+
+ Even a request for zero bytes (i.e., malloc(0)) returns a
+ pointer to something of the minimum allocatable size.
+ The maximum overhead wastage (i.e., number of extra bytes
+ allocated than were requested in malloc) is less than or equal
+ to the minimum size, except for requests >= mmap_threshold that
+ are serviced via mmap(), where the worst case wastage is about
+ 32 bytes plus the remainder from a system page (the minimal
+ mmap unit); typically 4096 or 8192 bytes.
+
+ Security: static-safe; optionally more or less
+ The "security" of malloc refers to the ability of malicious
+ code to accentuate the effects of errors (for example, freeing
+ space that is not currently malloc'ed or overwriting past the
+ ends of chunks) in code that calls malloc. This malloc
+ guarantees not to modify any memory locations below the base of
+ heap, i.e., static variables, even in the presence of usage
+ errors. The routines additionally detect most improper frees
+ and reallocs. All this holds as long as the static bookkeeping
+ for malloc itself is not corrupted by some other means. This
+ is only one aspect of security -- these checks do not, and
+ cannot, detect all possible programming errors.
+
+ If FOOTERS is defined nonzero, then each allocated chunk
+ carries an additional check word to verify that it was malloced
+ from its space. These check words are the same within each
+ execution of a program using malloc, but differ across
+ executions, so externally crafted fake chunks cannot be
+ freed. This improves security by rejecting frees/reallocs that
+ could corrupt heap memory, in addition to the checks preventing
+ writes to statics that are always on. This may further improve
+ security at the expense of time and space overhead. (Note that
+ FOOTERS may also be worth using with MSPACES.)
+
+ By default detected errors cause the program to abort (calling
+ "abort()"). You can override this to instead proceed past
+ errors by defining PROCEED_ON_ERROR. In this case, a bad free
+ has no effect, and a malloc that encounters a bad address
+ caused by user overwrites will ignore the bad address by
+ dropping pointers and indices to all known memory. This may
+ be appropriate for programs that should continue if at all
+ possible in the face of programming errors, although they may
+ run out of memory because dropped memory is never reclaimed.
+
+ If you don't like either of these options, you can define
+ CORRUPTION_ERROR_ACTION and USAGE_ERROR_ACTION to do anything
+ else. And if if you are sure that your program using malloc has
+ no errors or vulnerabilities, you can define INSECURE to 1,
+ which might (or might not) provide a small performance improvement.
+
+ It is also possible to limit the maximum total allocatable
+ space, using malloc_set_footprint_limit. This is not
+ designed as a security feature in itself (calls to set limits
+ are not screened or privileged), but may be useful as one
+ aspect of a secure implementation.
+
+ Thread-safety: NOT thread-safe unless USE_LOCKS defined non-zero
+ When USE_LOCKS is defined, each public call to malloc, free,
+ etc is surrounded with a lock. By default, this uses a plain
+ pthread mutex, win32 critical section, or a spin-lock if if
+ available for the platform and not disabled by setting
+ USE_SPIN_LOCKS=0. However, if USE_RECURSIVE_LOCKS is defined,
+ recursive versions are used instead (which are not required for
+ base functionality but may be needed in layered extensions).
+ Using a global lock is not especially fast, and can be a major
+ bottleneck. It is designed only to provide minimal protection
+ in concurrent environments, and to provide a basis for
+ extensions. If you are using malloc in a concurrent program,
+ consider instead using nedmalloc
+ (http://www.nedprod.com/programs/portable/nedmalloc/) or
+ ptmalloc (See http://www.malloc.de), which are derived from
+ versions of this malloc.
+
+ System requirements: Any combination of MORECORE and/or MMAP/MUNMAP
+ This malloc can use unix sbrk or any emulation (invoked using
+ the CALL_MORECORE macro) and/or mmap/munmap or any emulation
+ (invoked using CALL_MMAP/CALL_MUNMAP) to get and release system
+ memory. On most unix systems, it tends to work best if both
+ MORECORE and MMAP are enabled. On Win32, it uses emulations
+ based on VirtualAlloc. It also uses common C library functions
+ like memset.
+
+ Compliance: I believe it is compliant with the Single Unix Specification
+ (See http://www.unix.org). Also SVID/XPG, ANSI C, and probably
+ others as well.
+
+* Overview of algorithms
+
+ This is not the fastest, most space-conserving, most portable, or
+ most tunable malloc ever written. However it is among the fastest
+ while also being among the most space-conserving, portable and
+ tunable. Consistent balance across these factors results in a good
+ general-purpose allocator for malloc-intensive programs.
+
+ In most ways, this malloc is a best-fit allocator. Generally, it
+ chooses the best-fitting existing chunk for a request, with ties
+ broken in approximately least-recently-used order. (This strategy
+ normally maintains low fragmentation.) However, for requests less
+ than 256bytes, it deviates from best-fit when there is not an
+ exactly fitting available chunk by preferring to use space adjacent
+ to that used for the previous small request, as well as by breaking
+ ties in approximately most-recently-used order. (These enhance
+ locality of series of small allocations.) And for very large requests
+ (>= 256Kb by default), it relies on system memory mapping
+ facilities, if supported. (This helps avoid carrying around and
+ possibly fragmenting memory used only for large chunks.)
+
+ All operations (except malloc_stats and mallinfo) have execution
+ times that are bounded by a constant factor of the number of bits in
+ a size_t, not counting any clearing in calloc or copying in realloc,
+ or actions surrounding MORECORE and MMAP that have times
+ proportional to the number of non-contiguous regions returned by
+ system allocation routines, which is often just 1. In real-time
+ applications, you can optionally suppress segment traversals using
+ NO_SEGMENT_TRAVERSAL, which assures bounded execution even when
+ system allocators return non-contiguous spaces, at the typical
+ expense of carrying around more memory and increased fragmentation.
+
+ The implementation is not very modular and seriously overuses
+ macros. Perhaps someday all C compilers will do as good a job
+ inlining modular code as can now be done by brute-force expansion,
+ but now, enough of them seem not to.
+
+ Some compilers issue a lot of warnings about code that is
+ dead/unreachable only on some platforms, and also about intentional
+ uses of negation on unsigned types. All known cases of each can be
+ ignored.
+
+ For a longer but out of date high-level description, see
+ http://gee.cs.oswego.edu/dl/html/malloc.html
+
+* MSPACES
+ If MSPACES is defined, then in addition to malloc, free, etc.,
+ this file also defines mspace_malloc, mspace_free, etc. These
+ are versions of malloc routines that take an "mspace" argument
+ obtained using create_mspace, to control all internal bookkeeping.
+ If ONLY_MSPACES is defined, only these versions are compiled.
+ So if you would like to use this allocator for only some allocations,
+ and your system malloc for others, you can compile with
+ ONLY_MSPACES and then do something like...
+ static mspace mymspace = create_mspace(0,0); // for example
+ #define mymalloc(bytes) mspace_malloc(mymspace, bytes)
+
+ (Note: If you only need one instance of an mspace, you can instead
+ use "USE_DL_PREFIX" to relabel the global malloc.)
+
+ You can similarly create thread-local allocators by storing
+ mspaces as thread-locals. For example:
+ static __thread mspace tlms = 0;
+ void* tlmalloc(size_t bytes) {
+ if (tlms == 0) tlms = create_mspace(0, 0);
+ return mspace_malloc(tlms, bytes);
+ }
+ void tlfree(void* mem) { mspace_free(tlms, mem); }
+
+ Unless FOOTERS is defined, each mspace is completely independent.
+ You cannot allocate from one and free to another (although
+ conformance is only weakly checked, so usage errors are not always
+ caught). If FOOTERS is defined, then each chunk carries around a tag
+ indicating its originating mspace, and frees are directed to their
+ originating spaces. Normally, this requires use of locks.
+
+ ------------------------- Compile-time options ---------------------------
+
+Be careful in setting #define values for numerical constants of type
+size_t. On some systems, literal values are not automatically extended
+to size_t precision unless they are explicitly casted. You can also
+use the symbolic values MAX_SIZE_T, SIZE_T_ONE, etc below.
+
+WIN32 default: defined if _WIN32 defined
+ Defining WIN32 sets up defaults for MS environment and compilers.
+ Otherwise defaults are for unix. Beware that there seem to be some
+ cases where this malloc might not be a pure drop-in replacement for
+ Win32 malloc: Random-looking failures from Win32 GDI API's (eg;
+ SetDIBits()) may be due to bugs in some video driver implementations
+ when pixel buffers are malloc()ed, and the region spans more than
+ one VirtualAlloc()ed region. Because dlmalloc uses a small (64Kb)
+ default granularity, pixel buffers may straddle virtual allocation
+ regions more often than when using the Microsoft allocator. You can
+ avoid this by using VirtualAlloc() and VirtualFree() for all pixel
+ buffers rather than using malloc(). If this is not possible,
+ recompile this malloc with a larger DEFAULT_GRANULARITY. Note:
+ in cases where MSC and gcc (cygwin) are known to differ on WIN32,
+ conditions use _MSC_VER to distinguish them.
+
+DLMALLOC_EXPORT default: extern
+ Defines how public APIs are declared. If you want to export via a
+ Windows DLL, you might define this as
+ #define DLMALLOC_EXPORT extern __declspec(dllexport)
+ If you want a POSIX ELF shared object, you might use
+ #define DLMALLOC_EXPORT extern __attribute__((visibility("default")))
+
+MALLOC_ALIGNMENT default: (size_t)(2 * sizeof(void *))
+ Controls the minimum alignment for malloc'ed chunks. It must be a
+ power of two and at least 8, even on machines for which smaller
+ alignments would suffice. It may be defined as larger than this
+ though. Note however that code and data structures are optimized for
+ the case of 8-byte alignment.
+
+MSPACES default: 0 (false)
+ If true, compile in support for independent allocation spaces.
+ This is only supported if HAVE_MMAP is true.
+
+ONLY_MSPACES default: 0 (false)
+ If true, only compile in mspace versions, not regular versions.
+
+USE_LOCKS default: 0 (false)
+ Causes each call to each public routine to be surrounded with
+ pthread or WIN32 mutex lock/unlock. (If set true, this can be
+ overridden on a per-mspace basis for mspace versions.) If set to a
+ non-zero value other than 1, locks are used, but their
+ implementation is left out, so lock functions must be supplied manually,
+ as described below.
+
+USE_SPIN_LOCKS default: 1 iff USE_LOCKS and spin locks available
+ If true, uses custom spin locks for locking. This is currently
+ supported only gcc >= 4.1, older gccs on x86 platforms, and recent
+ MS compilers. Otherwise, posix locks or win32 critical sections are
+ used.
+
+USE_RECURSIVE_LOCKS default: not defined
+ If defined nonzero, uses recursive (aka reentrant) locks, otherwise
+ uses plain mutexes. This is not required for malloc proper, but may
+ be needed for layered allocators such as nedmalloc.
+
+LOCK_AT_FORK default: not defined
+ If defined nonzero, performs pthread_atfork upon initialization
+ to initialize child lock while holding parent lock. The implementation
+ assumes that pthread locks (not custom locks) are being used. In other
+ cases, you may need to customize the implementation.
+
+FOOTERS default: 0
+ If true, provide extra checking and dispatching by placing
+ information in the footers of allocated chunks. This adds
+ space and time overhead.
+
+INSECURE default: 0
+ If true, omit checks for usage errors and heap space overwrites.
+
+USE_DL_PREFIX default: NOT defined
+ Causes compiler to prefix all public routines with the string 'dl'.
+ This can be useful when you only want to use this malloc in one part
+ of a program, using your regular system malloc elsewhere.
+
+MALLOC_INSPECT_ALL default: NOT defined
+ If defined, compiles malloc_inspect_all and mspace_inspect_all, that
+ perform traversal of all heap space. Unless access to these
+ functions is otherwise restricted, you probably do not want to
+ include them in secure implementations.
+
+ABORT default: defined as abort()
+ Defines how to abort on failed checks. On most systems, a failed
+ check cannot die with an "assert" or even print an informative
+ message, because the underlying print routines in turn call malloc,
+ which will fail again. Generally, the best policy is to simply call
+ abort(). It's not very useful to do more than this because many
+ errors due to overwriting will show up as address faults (null, odd
+ addresses etc) rather than malloc-triggered checks, so will also
+ abort. Also, most compilers know that abort() does not return, so
+ can better optimize code conditionally calling it.
+
+PROCEED_ON_ERROR default: defined as 0 (false)
+ Controls whether detected bad addresses cause them to bypassed
+ rather than aborting. If set, detected bad arguments to free and
+ realloc are ignored. And all bookkeeping information is zeroed out
+ upon a detected overwrite of freed heap space, thus losing the
+ ability to ever return it from malloc again, but enabling the
+ application to proceed. If PROCEED_ON_ERROR is defined, the
+ static variable malloc_corruption_error_count is compiled in
+ and can be examined to see if errors have occurred. This option
+ generates slower code than the default abort policy.
+
+DEBUG default: NOT defined
+ The DEBUG setting is mainly intended for people trying to modify
+ this code or diagnose problems when porting to new platforms.
+ However, it may also be able to better isolate user errors than just
+ using runtime checks. The assertions in the check routines spell
+ out in more detail the assumptions and invariants underlying the
+ algorithms. The checking is fairly extensive, and will slow down
+ execution noticeably. Calling malloc_stats or mallinfo with DEBUG
+ set will attempt to check every non-mmapped allocated and free chunk
+ in the course of computing the summaries.
+
+ABORT_ON_ASSERT_FAILURE default: defined as 1 (true)
+ Debugging assertion failures can be nearly impossible if your
+ version of the assert macro causes malloc to be called, which will
+ lead to a cascade of further failures, blowing the runtime stack.
+ ABORT_ON_ASSERT_FAILURE cause assertions failures to call abort(),
+ which will usually make debugging easier.
+
+MALLOC_FAILURE_ACTION default: sets errno to ENOMEM, or no-op on win32
+ The action to take before "return 0" when malloc fails to be able to
+ return memory because there is none available.
+
+HAVE_MORECORE default: 1 (true) unless win32 or ONLY_MSPACES
+ True if this system supports sbrk or an emulation of it.
+
+MORECORE default: sbrk
+ The name of the sbrk-style system routine to call to obtain more
+ memory. See below for guidance on writing custom MORECORE
+ functions. The type of the argument to sbrk/MORECORE varies across
+ systems. It cannot be size_t, because it supports negative
+ arguments, so it is normally the signed type of the same width as
+ size_t (sometimes declared as "intptr_t"). It doesn't much matter
+ though. Internally, we only call it with arguments less than half
+ the max value of a size_t, which should work across all reasonable
+ possibilities, although sometimes generating compiler warnings.
+
+MORECORE_CONTIGUOUS default: 1 (true) if HAVE_MORECORE
+ If true, take advantage of fact that consecutive calls to MORECORE
+ with positive arguments always return contiguous increasing
+ addresses. This is true of unix sbrk. It does not hurt too much to
+ set it true anyway, since malloc copes with non-contiguities.
+ Setting it false when definitely non-contiguous saves time
+ and possibly wasted space it would take to discover this though.
+
+MORECORE_CANNOT_TRIM default: NOT defined
+ True if MORECORE cannot release space back to the system when given
+ negative arguments. This is generally necessary only if you are
+ using a hand-crafted MORECORE function that cannot handle negative
+ arguments.
+
+NO_SEGMENT_TRAVERSAL default: 0
+ If non-zero, suppresses traversals of memory segments
+ returned by either MORECORE or CALL_MMAP. This disables
+ merging of segments that are contiguous, and selectively
+ releasing them to the OS if unused, but bounds execution times.
+
+HAVE_MMAP default: 1 (true)
+ True if this system supports mmap or an emulation of it. If so, and
+ HAVE_MORECORE is not true, MMAP is used for all system
+ allocation. If set and HAVE_MORECORE is true as well, MMAP is
+ primarily used to directly allocate very large blocks. It is also
+ used as a backup strategy in cases where MORECORE fails to provide
+ space from system. Note: A single call to MUNMAP is assumed to be
+ able to unmap memory that may have be allocated using multiple calls
+ to MMAP, so long as they are adjacent.
+
+HAVE_MREMAP default: 1 on linux, else 0
+ If true realloc() uses mremap() to re-allocate large blocks and
+ extend or shrink allocation spaces.
+
+MMAP_CLEARS default: 1 except on WINCE.
+ True if mmap clears memory so calloc doesn't need to. This is true
+ for standard unix mmap using /dev/zero and on WIN32 except for WINCE.
+
+USE_BUILTIN_FFS default: 0 (i.e., not used)
+ Causes malloc to use the builtin ffs() function to compute indices.
+ Some compilers may recognize and intrinsify ffs to be faster than the
+ supplied C version. Also, the case of x86 using gcc is special-cased
+ to an asm instruction, so is already as fast as it can be, and so
+ this setting has no effect. Similarly for Win32 under recent MS compilers.
+ (On most x86s, the asm version is only slightly faster than the C version.)
+
+malloc_getpagesize default: derive from system includes, or 4096.
+ The system page size. To the extent possible, this malloc manages
+ memory from the system in page-size units. This may be (and
+ usually is) a function rather than a constant. This is ignored
+ if WIN32, where page size is determined using getSystemInfo during
+ initialization.
+
+USE_DEV_RANDOM default: 0 (i.e., not used)
+ Causes malloc to use /dev/random to initialize secure magic seed for
+ stamping footers. Otherwise, the current time is used.
+
+NO_MALLINFO default: 0
+ If defined, don't compile "mallinfo". This can be a simple way
+ of dealing with mismatches between system declarations and
+ those in this file.
+
+MALLINFO_FIELD_TYPE default: size_t
+ The type of the fields in the mallinfo struct. This was originally
+ defined as "int" in SVID etc, but is more usefully defined as
+ size_t. The value is used only if HAVE_USR_INCLUDE_MALLOC_H is not set
+
+NO_MALLOC_STATS default: 0
+ If defined, don't compile "malloc_stats". This avoids calls to
+ fprintf and bringing in stdio dependencies you might not want.
+
+REALLOC_ZERO_BYTES_FREES default: not defined
+ This should be set if a call to realloc with zero bytes should
+ be the same as a call to free. Some people think it should. Otherwise,
+ since this malloc returns a unique pointer for malloc(0), so does
+ realloc(p, 0).
+
+LACKS_UNISTD_H, LACKS_FCNTL_H, LACKS_SYS_PARAM_H, LACKS_SYS_MMAN_H
+LACKS_STRINGS_H, LACKS_STRING_H, LACKS_SYS_TYPES_H, LACKS_ERRNO_H
+LACKS_STDLIB_H LACKS_SCHED_H LACKS_TIME_H default: NOT defined unless on WIN32
+ Define these if your system does not have these header files.
+ You might need to manually insert some of the declarations they provide.
+
+DEFAULT_GRANULARITY default: page size if MORECORE_CONTIGUOUS,
+ system_info.dwAllocationGranularity in WIN32,
+ otherwise 64K.
+ Also settable using mallopt(M_GRANULARITY, x)
+ The unit for allocating and deallocating memory from the system. On
+ most systems with contiguous MORECORE, there is no reason to
+ make this more than a page. However, systems with MMAP tend to
+ either require or encourage larger granularities. You can increase
+ this value to prevent system allocation functions to be called so
+ often, especially if they are slow. The value must be at least one
+ page and must be a power of two. Setting to 0 causes initialization
+ to either page size or win32 region size. (Note: In previous
+ versions of malloc, the equivalent of this option was called
+ "TOP_PAD")
+
+DEFAULT_TRIM_THRESHOLD default: 2MB
+ Also settable using mallopt(M_TRIM_THRESHOLD, x)
+ The maximum amount of unused top-most memory to keep before
+ releasing via malloc_trim in free(). Automatic trimming is mainly
+ useful in long-lived programs using contiguous MORECORE. Because
+ trimming via sbrk can be slow on some systems, and can sometimes be
+ wasteful (in cases where programs immediately afterward allocate
+ more large chunks) the value should be high enough so that your
+ overall system performance would improve by releasing this much
+ memory. As a rough guide, you might set to a value close to the
+ average size of a process (program) running on your system.
+ Releasing this much memory would allow such a process to run in
+ memory. Generally, it is worth tuning trim thresholds when a
+ program undergoes phases where several large chunks are allocated
+ and released in ways that can reuse each other's storage, perhaps
+ mixed with phases where there are no such chunks at all. The trim
+ value must be greater than page size to have any useful effect. To
+ disable trimming completely, you can set to MAX_SIZE_T. Note that the trick
+ some people use of mallocing a huge space and then freeing it at
+ program startup, in an attempt to reserve system memory, doesn't
+ have the intended effect under automatic trimming, since that memory
+ will immediately be returned to the system.
+
+DEFAULT_MMAP_THRESHOLD default: 256K
+ Also settable using mallopt(M_MMAP_THRESHOLD, x)
+ The request size threshold for using MMAP to directly service a
+ request. Requests of at least this size that cannot be allocated
+ using already-existing space will be serviced via mmap. (If enough
+ normal freed space already exists it is used instead.) Using mmap
+ segregates relatively large chunks of memory so that they can be
+ individually obtained and released from the host system. A request
+ serviced through mmap is never reused by any other request (at least
+ not directly; the system may just so happen to remap successive
+ requests to the same locations). Segregating space in this way has
+ the benefits that: Mmapped space can always be individually released
+ back to the system, which helps keep the system level memory demands
+ of a long-lived program low. Also, mapped memory doesn't become
+ `locked' between other chunks, as can happen with normally allocated
+ chunks, which means that even trimming via malloc_trim would not
+ release them. However, it has the disadvantage that the space
+ cannot be reclaimed, consolidated, and then used to service later
+ requests, as happens with normal chunks. The advantages of mmap
+ nearly always outweigh disadvantages for "large" chunks, but the
+ value of "large" may vary across systems. The default is an
+ empirically derived value that works well in most systems. You can
+ disable mmap by setting to MAX_SIZE_T.
+
+MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
+ The number of consolidated frees between checks to release
+ unused segments when freeing. When using non-contiguous segments,
+ especially with multiple mspaces, checking only for topmost space
+ doesn't always suffice to trigger trimming. To compensate for this,
+ free() will, with a period of MAX_RELEASE_CHECK_RATE (or the
+ current number of segments, if greater) try to release unused
+ segments to the OS when freeing chunks that result in
+ consolidation. The best value for this parameter is a compromise
+ between slowing down frees with relatively costly checks that
+ rarely trigger versus holding on to unused memory. To effectively
+ disable, set to MAX_SIZE_T. This may lead to a very slight speed
+ improvement at the expense of carrying around more memory.
+*/
+
+/* Version identifier to allow people to support multiple versions */
+#ifndef DLMALLOC_VERSION
+#define DLMALLOC_VERSION 20806
+#endif /* DLMALLOC_VERSION */
+
+#ifndef DLMALLOC_EXPORT
+#define DLMALLOC_EXPORT extern
+#endif
+
+#ifndef WIN32
+#ifdef _WIN32
+#define WIN32 1
+#endif /* _WIN32 */
+#ifdef _WIN32_WCE
+#define LACKS_FCNTL_H
+#define WIN32 1
+#endif /* _WIN32_WCE */
+#endif /* WIN32 */
+#ifdef WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#include <tchar.h>
+#define HAVE_MMAP 1
+#define HAVE_MORECORE 0
+#define LACKS_UNISTD_H
+#define LACKS_SYS_PARAM_H
+#define LACKS_SYS_MMAN_H
+#define LACKS_STRING_H
+#define LACKS_STRINGS_H
+#define LACKS_SYS_TYPES_H
+#define LACKS_ERRNO_H
+#define LACKS_SCHED_H
+#ifndef MALLOC_FAILURE_ACTION
+#define MALLOC_FAILURE_ACTION
+#endif /* MALLOC_FAILURE_ACTION */
+#ifndef MMAP_CLEARS
+#ifdef _WIN32_WCE /* WINCE reportedly does not clear */
+#define MMAP_CLEARS 0
+#else
+#define MMAP_CLEARS 1
+#endif /* _WIN32_WCE */
+#endif /*MMAP_CLEARS */
+#endif /* WIN32 */
+
+#if defined(DARWIN) || defined(_DARWIN)
+/* Mac OSX docs advise not to use sbrk; it seems better to use mmap */
+#ifndef HAVE_MORECORE
+#define HAVE_MORECORE 0
+#define HAVE_MMAP 1
+/* OSX allocators provide 16 byte alignment */
+#ifndef MALLOC_ALIGNMENT
+#define MALLOC_ALIGNMENT ((size_t)16U)
+#endif
+#endif /* HAVE_MORECORE */
+#endif /* DARWIN */
+
+#ifndef LACKS_SYS_TYPES_H
+#include <sys/types.h> /* For size_t */
+#endif /* LACKS_SYS_TYPES_H */
+
+/* The maximum possible size_t value has all bits set */
+#define MAX_SIZE_T (~(size_t)0)
+
+#ifndef USE_LOCKS /* ensure true if spin or recursive locks set */
+#define USE_LOCKS ((defined(USE_SPIN_LOCKS) && USE_SPIN_LOCKS != 0) || \
+ (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0))
+#endif /* USE_LOCKS */
+
+#if USE_LOCKS /* Spin locks for gcc >= 4.1, older gcc on x86, MSC >= 1310 */
+#if ((defined(__GNUC__) && \
+ ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) || \
+ defined(__i386__) || defined(__x86_64__))) || \
+ (defined(_MSC_VER) && _MSC_VER>=1310))
+#ifndef USE_SPIN_LOCKS
+#define USE_SPIN_LOCKS 1
+#endif /* USE_SPIN_LOCKS */
+#elif USE_SPIN_LOCKS
+#error "USE_SPIN_LOCKS defined without implementation"
+#endif /* ... locks available... */
+#elif !defined(USE_SPIN_LOCKS)
+#define USE_SPIN_LOCKS 0
+#endif /* USE_LOCKS */
+
+#ifndef ONLY_MSPACES
+#define ONLY_MSPACES 0
+#endif /* ONLY_MSPACES */
+#ifndef MSPACES
+#if ONLY_MSPACES
+#define MSPACES 1
+#else /* ONLY_MSPACES */
+#define MSPACES 0
+#endif /* ONLY_MSPACES */
+#endif /* MSPACES */
+#ifndef MALLOC_ALIGNMENT
+#define MALLOC_ALIGNMENT ((size_t)(2 * sizeof(void *)))
+#endif /* MALLOC_ALIGNMENT */
+#ifndef FOOTERS
+#define FOOTERS 0
+#endif /* FOOTERS */
+#ifndef ABORT
+#define ABORT abort()
+#endif /* ABORT */
+#ifndef ABORT_ON_ASSERT_FAILURE
+#define ABORT_ON_ASSERT_FAILURE 1
+#endif /* ABORT_ON_ASSERT_FAILURE */
+#ifndef PROCEED_ON_ERROR
+#define PROCEED_ON_ERROR 0
+#endif /* PROCEED_ON_ERROR */
+
+#ifndef INSECURE
+#define INSECURE 0
+#endif /* INSECURE */
+#ifndef MALLOC_INSPECT_ALL
+#define MALLOC_INSPECT_ALL 0
+#endif /* MALLOC_INSPECT_ALL */
+#ifndef HAVE_MMAP
+#define HAVE_MMAP 1
+#endif /* HAVE_MMAP */
+#ifndef MMAP_CLEARS
+#define MMAP_CLEARS 1
+#endif /* MMAP_CLEARS */
+#ifndef HAVE_MREMAP
+#ifdef linux
+#define HAVE_MREMAP 1
+#define _GNU_SOURCE /* Turns on mremap() definition */
+#else /* linux */
+#define HAVE_MREMAP 0
+#endif /* linux */
+#endif /* HAVE_MREMAP */
+#ifndef MALLOC_FAILURE_ACTION
+#define MALLOC_FAILURE_ACTION errno = ENOMEM;
+#endif /* MALLOC_FAILURE_ACTION */
+#ifndef HAVE_MORECORE
+#if ONLY_MSPACES
+#define HAVE_MORECORE 0
+#else /* ONLY_MSPACES */
+#define HAVE_MORECORE 1
+#endif /* ONLY_MSPACES */
+#endif /* HAVE_MORECORE */
+#if !HAVE_MORECORE
+#define MORECORE_CONTIGUOUS 0
+#else /* !HAVE_MORECORE */
+#define MORECORE_DEFAULT sbrk
+#ifndef MORECORE_CONTIGUOUS
+#define MORECORE_CONTIGUOUS 1
+#endif /* MORECORE_CONTIGUOUS */
+#endif /* HAVE_MORECORE */
+#ifndef DEFAULT_GRANULARITY
+#if (MORECORE_CONTIGUOUS || defined(WIN32))
+#define DEFAULT_GRANULARITY (0) /* 0 means to compute in init_mparams */
+#else /* MORECORE_CONTIGUOUS */
+#define DEFAULT_GRANULARITY ((size_t)64U * (size_t)1024U)
+#endif /* MORECORE_CONTIGUOUS */
+#endif /* DEFAULT_GRANULARITY */
+#ifndef DEFAULT_TRIM_THRESHOLD
+#ifndef MORECORE_CANNOT_TRIM
+#define DEFAULT_TRIM_THRESHOLD ((size_t)2U * (size_t)1024U * (size_t)1024U)
+#else /* MORECORE_CANNOT_TRIM */
+#define DEFAULT_TRIM_THRESHOLD MAX_SIZE_T
+#endif /* MORECORE_CANNOT_TRIM */
+#endif /* DEFAULT_TRIM_THRESHOLD */
+#ifndef DEFAULT_MMAP_THRESHOLD
+#if HAVE_MMAP
+#define DEFAULT_MMAP_THRESHOLD ((size_t)256U * (size_t)1024U)
+#else /* HAVE_MMAP */
+#define DEFAULT_MMAP_THRESHOLD MAX_SIZE_T
+#endif /* HAVE_MMAP */
+#endif /* DEFAULT_MMAP_THRESHOLD */
+#ifndef MAX_RELEASE_CHECK_RATE
+#if HAVE_MMAP
+#define MAX_RELEASE_CHECK_RATE 4095
+#else
+#define MAX_RELEASE_CHECK_RATE MAX_SIZE_T
+#endif /* HAVE_MMAP */
+#endif /* MAX_RELEASE_CHECK_RATE */
+#ifndef USE_BUILTIN_FFS
+#define USE_BUILTIN_FFS 0
+#endif /* USE_BUILTIN_FFS */
+#ifndef USE_DEV_RANDOM
+#define USE_DEV_RANDOM 0
+#endif /* USE_DEV_RANDOM */
+#ifndef NO_MALLINFO
+#define NO_MALLINFO 0
+#endif /* NO_MALLINFO */
+#ifndef MALLINFO_FIELD_TYPE
+#define MALLINFO_FIELD_TYPE size_t
+#endif /* MALLINFO_FIELD_TYPE */
+#ifndef NO_MALLOC_STATS
+#define NO_MALLOC_STATS 0
+#endif /* NO_MALLOC_STATS */
+#ifndef NO_SEGMENT_TRAVERSAL
+#define NO_SEGMENT_TRAVERSAL 0
+#endif /* NO_SEGMENT_TRAVERSAL */
+
+/*
+ mallopt tuning options. SVID/XPG defines four standard parameter
+ numbers for mallopt, normally defined in malloc.h. None of these
+ are used in this malloc, so setting them has no effect. But this
+ malloc does support the following options.
+*/
+
+#define M_TRIM_THRESHOLD (-1)
+#define M_GRANULARITY (-2)
+#define M_MMAP_THRESHOLD (-3)
+
+/* ------------------------ Mallinfo declarations ------------------------ */
+
+#if !NO_MALLINFO
+/*
+ This version of malloc supports the standard SVID/XPG mallinfo
+ routine that returns a struct containing usage properties and
+ statistics. It should work on any system that has a
+ /usr/include/malloc.h defining struct mallinfo. The main
+ declaration needed is the mallinfo struct that is returned (by-copy)
+ by mallinfo(). The malloinfo struct contains a bunch of fields that
+ are not even meaningful in this version of malloc. These fields are
+ are instead filled by mallinfo() with other numbers that might be of
+ interest.
+
+ HAVE_USR_INCLUDE_MALLOC_H should be set if you have a
+ /usr/include/malloc.h file that includes a declaration of struct
+ mallinfo. If so, it is included; else a compliant version is
+ declared below. These must be precisely the same for mallinfo() to
+ work. The original SVID version of this struct, defined on most
+ systems with mallinfo, declares all fields as ints. But some others
+ define as unsigned long. If your system defines the fields using a
+ type of different width than listed here, you MUST #include your
+ system version and #define HAVE_USR_INCLUDE_MALLOC_H.
+*/
+
+/* #define HAVE_USR_INCLUDE_MALLOC_H */
+
+#ifdef HAVE_USR_INCLUDE_MALLOC_H
+#include "/usr/include/malloc.h"
+#else /* HAVE_USR_INCLUDE_MALLOC_H */
+#ifndef STRUCT_MALLINFO_DECLARED
+/* HP-UX (and others?) redefines mallinfo unless _STRUCT_MALLINFO is defined */
+#define _STRUCT_MALLINFO
+#define STRUCT_MALLINFO_DECLARED 1
+struct mallinfo {
+ MALLINFO_FIELD_TYPE arena; /* non-mmapped space allocated from system */
+ MALLINFO_FIELD_TYPE ordblks; /* number of free chunks */
+ MALLINFO_FIELD_TYPE smblks; /* always 0 */
+ MALLINFO_FIELD_TYPE hblks; /* always 0 */
+ MALLINFO_FIELD_TYPE hblkhd; /* space in mmapped regions */
+ MALLINFO_FIELD_TYPE usmblks; /* maximum total allocated space */
+ MALLINFO_FIELD_TYPE fsmblks; /* always 0 */
+ MALLINFO_FIELD_TYPE uordblks; /* total allocated space */
+ MALLINFO_FIELD_TYPE fordblks; /* total free space */
+ MALLINFO_FIELD_TYPE keepcost; /* releasable (via malloc_trim) space */
+};
+#endif /* STRUCT_MALLINFO_DECLARED */
+#endif /* HAVE_USR_INCLUDE_MALLOC_H */
+#endif /* NO_MALLINFO */
+
+/*
+ Try to persuade compilers to inline. The most critical functions for
+ inlining are defined as macros, so these aren't used for them.
+*/
+
+#ifndef FORCEINLINE
+ #if defined(__GNUC__)
+#define FORCEINLINE __inline __attribute__ ((always_inline))
+ #elif defined(_MSC_VER)
+ #define FORCEINLINE __forceinline
+ #endif
+#endif
+#ifndef NOINLINE
+ #if defined(__GNUC__)
+ #define NOINLINE __attribute__ ((noinline))
+ #elif defined(_MSC_VER)
+ #define NOINLINE __declspec(noinline)
+ #else
+ #define NOINLINE
+ #endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#ifndef FORCEINLINE
+ #define FORCEINLINE inline
+#endif
+#endif /* __cplusplus */
+#ifndef FORCEINLINE
+ #define FORCEINLINE
+#endif
+
+#if !ONLY_MSPACES
+
+/* ------------------- Declarations of public routines ------------------- */
+
+#ifndef USE_DL_PREFIX
+#define dlcalloc calloc
+#define dlfree free
+#define dlmalloc malloc
+#define dlmemalign memalign
+#define dlposix_memalign posix_memalign
+#define dlrealloc realloc
+#define dlrealloc_in_place realloc_in_place
+#define dlvalloc valloc
+#define dlpvalloc pvalloc
+#define dlmallinfo mallinfo
+#define dlmallopt mallopt
+#define dlmalloc_trim malloc_trim
+#define dlmalloc_stats malloc_stats
+#define dlmalloc_usable_size malloc_usable_size
+#define dlmalloc_footprint malloc_footprint
+#define dlmalloc_max_footprint malloc_max_footprint
+#define dlmalloc_footprint_limit malloc_footprint_limit
+#define dlmalloc_set_footprint_limit malloc_set_footprint_limit
+#define dlmalloc_inspect_all malloc_inspect_all
+#define dlindependent_calloc independent_calloc
+#define dlindependent_comalloc independent_comalloc
+#define dlbulk_free bulk_free
+#endif /* USE_DL_PREFIX */
+
+/*
+ malloc(size_t n)
+ Returns a pointer to a newly allocated chunk of at least n bytes, or
+ null if no space is available, in which case errno is set to ENOMEM
+ on ANSI C systems.
+
+ If n is zero, malloc returns a minimum-sized chunk. (The minimum
+ size is 16 bytes on most 32bit systems, and 32 bytes on 64bit
+ systems.) Note that size_t is an unsigned type, so calls with
+ arguments that would be negative if signed are interpreted as
+ requests for huge amounts of space, which will often fail. The
+ maximum supported value of n differs across systems, but is in all
+ cases less than the maximum representable value of a size_t.
+*/
+DLMALLOC_EXPORT void* dlmalloc(size_t);
+
+/*
+ free(void* p)
+ Releases the chunk of memory pointed to by p, that had been previously
+ allocated using malloc or a related routine such as realloc.
+ It has no effect if p is null. If p was not malloced or already
+ freed, free(p) will by default cause the current program to abort.
+*/
+DLMALLOC_EXPORT void dlfree(void*);
+
+/*
+ calloc(size_t n_elements, size_t element_size);
+ Returns a pointer to n_elements * element_size bytes, with all locations
+ set to zero.
+*/
+DLMALLOC_EXPORT void* dlcalloc(size_t, size_t);
+
+/*
+ realloc(void* p, size_t n)
+ Returns a pointer to a chunk of size n that contains the same data
+ as does chunk p up to the minimum of (n, p's size) bytes, or null
+ if no space is available.
+
+ The returned pointer may or may not be the same as p. The algorithm
+ prefers extending p in most cases when possible, otherwise it
+ employs the equivalent of a malloc-copy-free sequence.
+
+ If p is null, realloc is equivalent to malloc.
+
+ If space is not available, realloc returns null, errno is set (if on
+ ANSI) and p is NOT freed.
+
+ if n is for fewer bytes than already held by p, the newly unused
+ space is lopped off and freed if possible. realloc with a size
+ argument of zero (re)allocates a minimum-sized chunk.
+
+ The old unix realloc convention of allowing the last-free'd chunk
+ to be used as an argument to realloc is not supported.
+*/
+DLMALLOC_EXPORT void* dlrealloc(void*, size_t);
+
+/*
+ realloc_in_place(void* p, size_t n)
+ Resizes the space allocated for p to size n, only if this can be
+ done without moving p (i.e., only if there is adjacent space
+ available if n is greater than p's current allocated size, or n is
+ less than or equal to p's size). This may be used instead of plain
+ realloc if an alternative allocation strategy is needed upon failure
+ to expand space; for example, reallocation of a buffer that must be
+ memory-aligned or cleared. You can use realloc_in_place to trigger
+ these alternatives only when needed.
+
+ Returns p if successful; otherwise null.
+*/
+DLMALLOC_EXPORT void* dlrealloc_in_place(void*, size_t);
+
+/*
+ memalign(size_t alignment, size_t n);
+ Returns a pointer to a newly allocated chunk of n bytes, aligned
+ in accord with the alignment argument.
+
+ The alignment argument should be a power of two. If the argument is
+ not a power of two, the nearest greater power is used.
+ 8-byte alignment is guaranteed by normal malloc calls, so don't
+ bother calling memalign with an argument of 8 or less.
+
+ Overreliance on memalign is a sure way to fragment space.
+*/
+DLMALLOC_EXPORT void* dlmemalign(size_t, size_t);
+
+/*
+ int posix_memalign(void** pp, size_t alignment, size_t n);
+ Allocates a chunk of n bytes, aligned in accord with the alignment
+ argument. Differs from memalign only in that it (1) assigns the
+ allocated memory to *pp rather than returning it, (2) fails and
+ returns EINVAL if the alignment is not a power of two (3) fails and
+ returns ENOMEM if memory cannot be allocated.
+*/
+DLMALLOC_EXPORT int dlposix_memalign(void**, size_t, size_t);
+
+/*
+ valloc(size_t n);
+ Equivalent to memalign(pagesize, n), where pagesize is the page
+ size of the system. If the pagesize is unknown, 4096 is used.
+*/
+DLMALLOC_EXPORT void* dlvalloc(size_t);
+
+/*
+ mallopt(int parameter_number, int parameter_value)
+ Sets tunable parameters The format is to provide a
+ (parameter-number, parameter-value) pair. mallopt then sets the
+ corresponding parameter to the argument value if it can (i.e., so
+ long as the value is meaningful), and returns 1 if successful else
+ 0. To workaround the fact that mallopt is specified to use int,
+ not size_t parameters, the value -1 is specially treated as the
+ maximum unsigned size_t value.
+
+ SVID/XPG/ANSI defines four standard param numbers for mallopt,
+ normally defined in malloc.h. None of these are use in this malloc,
+ so setting them has no effect. But this malloc also supports other
+ options in mallopt. See below for details. Briefly, supported
+ parameters are as follows (listed defaults are for "typical"
+ configurations).
+
+ Symbol param # default allowed param values
+ M_TRIM_THRESHOLD -1 2*1024*1024 any (-1 disables)
+ M_GRANULARITY -2 page size any power of 2 >= page size
+ M_MMAP_THRESHOLD -3 256*1024 any (or 0 if no MMAP support)
+*/
+DLMALLOC_EXPORT int dlmallopt(int, int);
+
+/*
+ malloc_footprint();
+ Returns the number of bytes obtained from the system. The total
+ number of bytes allocated by malloc, realloc etc., is less than this
+ value. Unlike mallinfo, this function returns only a precomputed
+ result, so can be called frequently to monitor memory consumption.
+ Even if locks are otherwise defined, this function does not use them,
+ so results might not be up to date.
+*/
+DLMALLOC_EXPORT size_t dlmalloc_footprint(void);
+
+/*
+ malloc_max_footprint();
+ Returns the maximum number of bytes obtained from the system. This
+ value will be greater than current footprint if deallocated space
+ has been reclaimed by the system. The peak number of bytes allocated
+ by malloc, realloc etc., is less than this value. Unlike mallinfo,
+ this function returns only a precomputed result, so can be called
+ frequently to monitor memory consumption. Even if locks are
+ otherwise defined, this function does not use them, so results might
+ not be up to date.
+*/
+DLMALLOC_EXPORT size_t dlmalloc_max_footprint(void);
+
+/*
+ malloc_footprint_limit();
+ Returns the number of bytes that the heap is allowed to obtain from
+ the system, returning the last value returned by
+ malloc_set_footprint_limit, or the maximum size_t value if
+ never set. The returned value reflects a permission. There is no
+ guarantee that this number of bytes can actually be obtained from
+ the system.
+*/
+DLMALLOC_EXPORT size_t dlmalloc_footprint_limit();
+
+/*
+ malloc_set_footprint_limit();
+ Sets the maximum number of bytes to obtain from the system, causing
+ failure returns from malloc and related functions upon attempts to
+ exceed this value. The argument value may be subject to page
+ rounding to an enforceable limit; this actual value is returned.
+ Using an argument of the maximum possible size_t effectively
+ disables checks. If the argument is less than or equal to the
+ current malloc_footprint, then all future allocations that require
+ additional system memory will fail. However, invocation cannot
+ retroactively deallocate existing used memory.
+*/
+DLMALLOC_EXPORT size_t dlmalloc_set_footprint_limit(size_t bytes);
+
+#if MALLOC_INSPECT_ALL
+/*
+ malloc_inspect_all(void(*handler)(void *start,
+ void *end,
+ size_t used_bytes,
+ void* callback_arg),
+ void* arg);
+ Traverses the heap and calls the given handler for each managed
+ region, skipping all bytes that are (or may be) used for bookkeeping
+ purposes. Traversal does not include include chunks that have been
+ directly memory mapped. Each reported region begins at the start
+ address, and continues up to but not including the end address. The
+ first used_bytes of the region contain allocated data. If
+ used_bytes is zero, the region is unallocated. The handler is
+ invoked with the given callback argument. If locks are defined, they
+ are held during the entire traversal. It is a bad idea to invoke
+ other malloc functions from within the handler.
+
+ For example, to count the number of in-use chunks with size greater
+ than 1000, you could write:
+ static int count = 0;
+ void count_chunks(void* start, void* end, size_t used, void* arg) {
+ if (used >= 1000) ++count;
+ }
+ then:
+ malloc_inspect_all(count_chunks, NULL);
+
+ malloc_inspect_all is compiled only if MALLOC_INSPECT_ALL is defined.
+*/
+DLMALLOC_EXPORT void dlmalloc_inspect_all(void(*handler)(void*, void *, size_t, void*),
+ void* arg);
+
+#endif /* MALLOC_INSPECT_ALL */
+
+#if !NO_MALLINFO
+/*
+ mallinfo()
+ Returns (by copy) a struct containing various summary statistics:
+
+ arena: current total non-mmapped bytes allocated from system
+ ordblks: the number of free chunks
+ smblks: always zero.
+ hblks: current number of mmapped regions
+ hblkhd: total bytes held in mmapped regions
+ usmblks: the maximum total allocated space. This will be greater
+ than current total if trimming has occurred.
+ fsmblks: always zero
+ uordblks: current total allocated space (normal or mmapped)
+ fordblks: total free space
+ keepcost: the maximum number of bytes that could ideally be released
+ back to system via malloc_trim. ("ideally" means that
+ it ignores page restrictions etc.)
+
+ Because these fields are ints, but internal bookkeeping may
+ be kept as longs, the reported values may wrap around zero and
+ thus be inaccurate.
+*/
+DLMALLOC_EXPORT struct mallinfo dlmallinfo(void);
+#endif /* NO_MALLINFO */
+
+/*
+ independent_calloc(size_t n_elements, size_t element_size, void* chunks[]);
+
+ independent_calloc is similar to calloc, but instead of returning a
+ single cleared space, it returns an array of pointers to n_elements
+ independent elements that can hold contents of size elem_size, each
+ of which starts out cleared, and can be independently freed,
+ realloc'ed etc. The elements are guaranteed to be adjacently
+ allocated (this is not guaranteed to occur with multiple callocs or
+ mallocs), which may also improve cache locality in some
+ applications.
+
+ The "chunks" argument is optional (i.e., may be null, which is
+ probably the most typical usage). If it is null, the returned array
+ is itself dynamically allocated and should also be freed when it is
+ no longer needed. Otherwise, the chunks array must be of at least
+ n_elements in length. It is filled in with the pointers to the
+ chunks.
+
+ In either case, independent_calloc returns this pointer array, or
+ null if the allocation failed. If n_elements is zero and "chunks"
+ is null, it returns a chunk representing an array with zero elements
+ (which should be freed if not wanted).
+
+ Each element must be freed when it is no longer needed. This can be
+ done all at once using bulk_free.
+
+ independent_calloc simplifies and speeds up implementations of many
+ kinds of pools. It may also be useful when constructing large data
+ structures that initially have a fixed number of fixed-sized nodes,
+ but the number is not known at compile time, and some of the nodes
+ may later need to be freed. For example:
+
+ struct Node { int item; struct Node* next; };
+
+ struct Node* build_list() {
+ struct Node** pool;
+ int n = read_number_of_nodes_needed();
+ if (n <= 0) return 0;
+ pool = (struct Node**)(independent_calloc(n, sizeof(struct Node), 0);
+ if (pool == 0) die();
+ // organize into a linked list...
+ struct Node* first = pool[0];
+ for (i = 0; i < n-1; ++i)
+ pool[i]->next = pool[i+1];
+ free(pool); // Can now free the array (or not, if it is needed later)
+ return first;
+ }
+*/
+DLMALLOC_EXPORT void** dlindependent_calloc(size_t, size_t, void**);
+
+/*
+ independent_comalloc(size_t n_elements, size_t sizes[], void* chunks[]);
+
+ independent_comalloc allocates, all at once, a set of n_elements
+ chunks with sizes indicated in the "sizes" array. It returns
+ an array of pointers to these elements, each of which can be
+ independently freed, realloc'ed etc. The elements are guaranteed to
+ be adjacently allocated (this is not guaranteed to occur with
+ multiple callocs or mallocs), which may also improve cache locality
+ in some applications.
+
+ The "chunks" argument is optional (i.e., may be null). If it is null
+ the returned array is itself dynamically allocated and should also
+ be freed when it is no longer needed. Otherwise, the chunks array
+ must be of at least n_elements in length. It is filled in with the
+ pointers to the chunks.
+
+ In either case, independent_comalloc returns this pointer array, or
+ null if the allocation failed. If n_elements is zero and chunks is
+ null, it returns a chunk representing an array with zero elements
+ (which should be freed if not wanted).
+
+ Each element must be freed when it is no longer needed. This can be
+ done all at once using bulk_free.
+
+ independent_comallac differs from independent_calloc in that each
+ element may have a different size, and also that it does not
+ automatically clear elements.
+
+ independent_comalloc can be used to speed up allocation in cases
+ where several structs or objects must always be allocated at the
+ same time. For example:
+
+ struct Head { ... }
+ struct Foot { ... }
+
+ void send_message(char* msg) {
+ int msglen = strlen(msg);
+ size_t sizes[3] = { sizeof(struct Head), msglen, sizeof(struct Foot) };
+ void* chunks[3];
+ if (independent_comalloc(3, sizes, chunks) == 0)
+ die();
+ struct Head* head = (struct Head*)(chunks[0]);
+ char* body = (char*)(chunks[1]);
+ struct Foot* foot = (struct Foot*)(chunks[2]);
+ // ...
+ }
+
+ In general though, independent_comalloc is worth using only for
+ larger values of n_elements. For small values, you probably won't
+ detect enough difference from series of malloc calls to bother.
+
+ Overuse of independent_comalloc can increase overall memory usage,
+ since it cannot reuse existing noncontiguous small chunks that
+ might be available for some of the elements.
+*/
+DLMALLOC_EXPORT void** dlindependent_comalloc(size_t, size_t*, void**);
+
+/*
+ bulk_free(void* array[], size_t n_elements)
+ Frees and clears (sets to null) each non-null pointer in the given
+ array. This is likely to be faster than freeing them one-by-one.
+ If footers are used, pointers that have been allocated in different
+ mspaces are not freed or cleared, and the count of all such pointers
+ is returned. For large arrays of pointers with poor locality, it
+ may be worthwhile to sort this array before calling bulk_free.
+*/
+DLMALLOC_EXPORT size_t dlbulk_free(void**, size_t n_elements);
+
+/*
+ pvalloc(size_t n);
+ Equivalent to valloc(minimum-page-that-holds(n)), that is,
+ round up n to nearest pagesize.
+ */
+DLMALLOC_EXPORT void* dlpvalloc(size_t);
+
+/*
+ malloc_trim(size_t pad);
+
+ If possible, gives memory back to the system (via negative arguments
+ to sbrk) if there is unused memory at the `high' end of the malloc
+ pool or in unused MMAP segments. You can call this after freeing
+ large blocks of memory to potentially reduce the system-level memory
+ requirements of a program. However, it cannot guarantee to reduce
+ memory. Under some allocation patterns, some large free blocks of
+ memory will be locked between two used chunks, so they cannot be
+ given back to the system.
+
+ The `pad' argument to malloc_trim represents the amount of free
+ trailing space to leave untrimmed. If this argument is zero, only
+ the minimum amount of memory to maintain internal data structures
+ will be left. Non-zero arguments can be supplied to maintain enough
+ trailing space to service future expected allocations without having
+ to re-obtain memory from the system.
+
+ Malloc_trim returns 1 if it actually released any memory, else 0.
+*/
+DLMALLOC_EXPORT int dlmalloc_trim(size_t);
+
+/*
+ malloc_stats();
+ Prints on stderr the amount of space obtained from the system (both
+ via sbrk and mmap), the maximum amount (which may be more than
+ current if malloc_trim and/or munmap got called), and the current
+ number of bytes allocated via malloc (or realloc, etc) but not yet
+ freed. Note that this is the number of bytes allocated, not the
+ number requested. It will be larger than the number requested
+ because of alignment and bookkeeping overhead. Because it includes
+ alignment wastage as being in use, this figure may be greater than
+ zero even when no user-level chunks are allocated.
+
+ The reported current and maximum system memory can be inaccurate if
+ a program makes other calls to system memory allocation functions
+ (normally sbrk) outside of malloc.
+
+ malloc_stats prints only the most commonly interesting statistics.
+ More information can be obtained by calling mallinfo.
+*/
+DLMALLOC_EXPORT void dlmalloc_stats(void);
+
+/*
+ malloc_usable_size(void* p);
+
+ Returns the number of bytes you can actually use in
+ an allocated chunk, which may be more than you requested (although
+ often not) due to alignment and minimum size constraints.
+ You can use this many bytes without worrying about
+ overwriting other allocated objects. This is not a particularly great
+ programming practice. malloc_usable_size can be more useful in
+ debugging and assertions, for example:
+
+ p = malloc(n);
+ assert(malloc_usable_size(p) >= 256);
+*/
+size_t dlmalloc_usable_size(void*);
+
+#endif /* ONLY_MSPACES */
+
+#if MSPACES
+
+/*
+ mspace is an opaque type representing an independent
+ region of space that supports mspace_malloc, etc.
+*/
+typedef void* mspace;
+
+/*
+ create_mspace creates and returns a new independent space with the
+ given initial capacity, or, if 0, the default granularity size. It
+ returns null if there is no system memory available to create the
+ space. If argument locked is non-zero, the space uses a separate
+ lock to control access. The capacity of the space will grow
+ dynamically as needed to service mspace_malloc requests. You can
+ control the sizes of incremental increases of this space by
+ compiling with a different DEFAULT_GRANULARITY or dynamically
+ setting with mallopt(M_GRANULARITY, value).
+*/
+DLMALLOC_EXPORT mspace create_mspace(size_t capacity, int locked);
+
+/*
+ destroy_mspace destroys the given space, and attempts to return all
+ of its memory back to the system, returning the total number of
+ bytes freed. After destruction, the results of access to all memory
+ used by the space become undefined.
+*/
+DLMALLOC_EXPORT size_t destroy_mspace(mspace msp);
+
+/*
+ create_mspace_with_base uses the memory supplied as the initial base
+ of a new mspace. Part (less than 128*sizeof(size_t) bytes) of this
+ space is used for bookkeeping, so the capacity must be at least this
+ large. (Otherwise 0 is returned.) When this initial space is
+ exhausted, additional memory will be obtained from the system.
+ Destroying this space will deallocate all additionally allocated
+ space (if possible) but not the initial base.
+*/
+DLMALLOC_EXPORT mspace create_mspace_with_base(void* base, size_t capacity, int locked);
+
+/*
+ mspace_track_large_chunks controls whether requests for large chunks
+ are allocated in their own untracked mmapped regions, separate from
+ others in this mspace. By default large chunks are not tracked,
+ which reduces fragmentation. However, such chunks are not
+ necessarily released to the system upon destroy_mspace. Enabling
+ tracking by setting to true may increase fragmentation, but avoids
+ leakage when relying on destroy_mspace to release all memory
+ allocated using this space. The function returns the previous
+ setting.
+*/
+DLMALLOC_EXPORT int mspace_track_large_chunks(mspace msp, int enable);
+
+
+/*
+ mspace_malloc behaves as malloc, but operates within
+ the given space.
+*/
+DLMALLOC_EXPORT void* mspace_malloc(mspace msp, size_t bytes);
+
+/*
+ mspace_free behaves as free, but operates within
+ the given space.
+
+ If compiled with FOOTERS==1, mspace_free is not actually needed.
+ free may be called instead of mspace_free because freed chunks from
+ any space are handled by their originating spaces.
+*/
+DLMALLOC_EXPORT void mspace_free(mspace msp, void* mem);
+
+/*
+ mspace_realloc behaves as realloc, but operates within
+ the given space.
+
+ If compiled with FOOTERS==1, mspace_realloc is not actually
+ needed. realloc may be called instead of mspace_realloc because
+ realloced chunks from any space are handled by their originating
+ spaces.
+*/
+DLMALLOC_EXPORT void* mspace_realloc(mspace msp, void* mem, size_t newsize);
+
+/*
+ mspace_calloc behaves as calloc, but operates within
+ the given space.
+*/
+DLMALLOC_EXPORT void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size);
+
+/*
+ mspace_memalign behaves as memalign, but operates within
+ the given space.
+*/
+DLMALLOC_EXPORT void* mspace_memalign(mspace msp, size_t alignment, size_t bytes);
+
+/*
+ mspace_independent_calloc behaves as independent_calloc, but
+ operates within the given space.
+*/
+DLMALLOC_EXPORT void** mspace_independent_calloc(mspace msp, size_t n_elements,
+ size_t elem_size, void* chunks[]);
+
+/*
+ mspace_independent_comalloc behaves as independent_comalloc, but
+ operates within the given space.
+*/
+DLMALLOC_EXPORT void** mspace_independent_comalloc(mspace msp, size_t n_elements,
+ size_t sizes[], void* chunks[]);
+
+/*
+ mspace_footprint() returns the number of bytes obtained from the
+ system for this space.
+*/
+DLMALLOC_EXPORT size_t mspace_footprint(mspace msp);
+
+/*
+ mspace_max_footprint() returns the peak number of bytes obtained from the
+ system for this space.
+*/
+DLMALLOC_EXPORT size_t mspace_max_footprint(mspace msp);
+
+
+#if !NO_MALLINFO
+/*
+ mspace_mallinfo behaves as mallinfo, but reports properties of
+ the given space.
+*/
+DLMALLOC_EXPORT struct mallinfo mspace_mallinfo(mspace msp);
+#endif /* NO_MALLINFO */
+
+/*
+ malloc_usable_size(void* p) behaves the same as malloc_usable_size;
+*/
+DLMALLOC_EXPORT size_t mspace_usable_size(const void* mem);
+
+/*
+ mspace_malloc_stats behaves as malloc_stats, but reports
+ properties of the given space.
+*/
+DLMALLOC_EXPORT void mspace_malloc_stats(mspace msp);
+
+/*
+ mspace_trim behaves as malloc_trim, but
+ operates within the given space.
+*/
+DLMALLOC_EXPORT int mspace_trim(mspace msp, size_t pad);
+
+/*
+ An alias for mallopt.
+*/
+DLMALLOC_EXPORT int mspace_mallopt(int, int);
+
+#endif /* MSPACES */
+
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif /* __cplusplus */
+
+/*
+ ========================================================================
+ To make a fully customizable malloc.h header file, cut everything
+ above this line, put into file malloc.h, edit to suit, and #include it
+ on the next line, as well as in programs that use this malloc.
+ ========================================================================
+*/
+
+/* #include "malloc.h" */
+
+/*------------------------------ internal #includes ---------------------- */
+
+#ifdef _MSC_VER
+#pragma warning( disable : 4146 ) /* no "unsigned" warnings */
+#endif /* _MSC_VER */
+#if !NO_MALLOC_STATS
+#include <stdio.h> /* for printing in malloc_stats */
+#endif /* NO_MALLOC_STATS */
+#ifndef LACKS_ERRNO_H
+#include <errno.h> /* for MALLOC_FAILURE_ACTION */
+#endif /* LACKS_ERRNO_H */
+#ifdef DEBUG
+#if ABORT_ON_ASSERT_FAILURE
+#undef assert
+#define assert(x) if(!(x)) ABORT
+#else /* ABORT_ON_ASSERT_FAILURE */
+#include <assert.h>
+#endif /* ABORT_ON_ASSERT_FAILURE */
+#else /* DEBUG */
+#ifndef assert
+#define assert(x)
+#endif
+#define DEBUG 0
+#endif /* DEBUG */
+#if !defined(WIN32) && !defined(LACKS_TIME_H)
+#include <time.h> /* for magic initialization */
+#endif /* WIN32 */
+#ifndef LACKS_STDLIB_H
+#include <stdlib.h> /* for abort() */
+#endif /* LACKS_STDLIB_H */
+#ifndef LACKS_STRING_H
+#include <string.h> /* for memset etc */
+#endif /* LACKS_STRING_H */
+#if USE_BUILTIN_FFS
+#ifndef LACKS_STRINGS_H
+#include <strings.h> /* for ffs */
+#endif /* LACKS_STRINGS_H */
+#endif /* USE_BUILTIN_FFS */
+#if HAVE_MMAP
+#ifndef LACKS_SYS_MMAN_H
+/* On some versions of linux, mremap decl in mman.h needs __USE_GNU set */
+#if (defined(linux) && !defined(__USE_GNU))
+#define __USE_GNU 1
+#include <sys/mman.h> /* for mmap */
+#undef __USE_GNU
+#else
+#include <sys/mman.h> /* for mmap */
+#endif /* linux */
+#endif /* LACKS_SYS_MMAN_H */
+#ifndef LACKS_FCNTL_H
+#include <fcntl.h>
+#endif /* LACKS_FCNTL_H */
+#endif /* HAVE_MMAP */
+#ifndef LACKS_UNISTD_H
+#include <unistd.h> /* for sbrk, sysconf */
+#else /* LACKS_UNISTD_H */
+#if !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__NetBSD__)
+extern void* sbrk(ptrdiff_t);
+#endif /* FreeBSD etc */
+#endif /* LACKS_UNISTD_H */
+
+/* Declarations for locking */
+#if USE_LOCKS
+#ifndef WIN32
+#if defined (__SVR4) && defined (__sun) /* solaris */
+#include <thread.h>
+#elif !defined(LACKS_SCHED_H)
+#include <sched.h>
+#endif /* solaris or LACKS_SCHED_H */
+#if (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0) || !USE_SPIN_LOCKS
+#include <pthread.h>
+#endif /* USE_RECURSIVE_LOCKS ... */
+#elif defined(_MSC_VER)
+#ifndef _M_AMD64
+/* These are already defined on AMD64 builds */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+LONG __cdecl _InterlockedCompareExchange(LONG volatile *Dest, LONG Exchange, LONG Comp);
+LONG __cdecl _InterlockedExchange(LONG volatile *Target, LONG Value);
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* _M_AMD64 */
+#pragma intrinsic (_InterlockedCompareExchange)
+#pragma intrinsic (_InterlockedExchange)
+#define interlockedcompareexchange _InterlockedCompareExchange
+#define interlockedexchange _InterlockedExchange
+#elif defined(WIN32) && defined(__GNUC__)
+#define interlockedcompareexchange(a, b, c) __sync_val_compare_and_swap(a, c, b)
+#define interlockedexchange __sync_lock_test_and_set
+#endif /* Win32 */
+#else /* USE_LOCKS */
+#endif /* USE_LOCKS */
+
+#ifndef LOCK_AT_FORK
+#define LOCK_AT_FORK 0
+#endif
+
+/* Declarations for bit scanning on win32 */
+#if defined(_MSC_VER) && _MSC_VER>=1300
+#ifndef BitScanForward /* Try to avoid pulling in WinNT.h */
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+unsigned char _BitScanForward(unsigned long *index, unsigned long mask);
+unsigned char _BitScanReverse(unsigned long *index, unsigned long mask);
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+
+#define BitScanForward _BitScanForward
+#define BitScanReverse _BitScanReverse
+#pragma intrinsic(_BitScanForward)
+#pragma intrinsic(_BitScanReverse)
+#endif /* BitScanForward */
+#endif /* defined(_MSC_VER) && _MSC_VER>=1300 */
+
+#ifndef WIN32
+#ifndef malloc_getpagesize
+# ifdef _SC_PAGESIZE /* some SVR4 systems omit an underscore */
+# ifndef _SC_PAGE_SIZE
+# define _SC_PAGE_SIZE _SC_PAGESIZE
+# endif
+# endif
+# ifdef _SC_PAGE_SIZE
+# define malloc_getpagesize sysconf(_SC_PAGE_SIZE)
+# else
+# if defined(BSD) || defined(DGUX) || defined(HAVE_GETPAGESIZE)
+ extern size_t getpagesize();
+# define malloc_getpagesize getpagesize()
+# else
+# ifdef WIN32 /* use supplied emulation of getpagesize */
+# define malloc_getpagesize getpagesize()
+# else
+# ifndef LACKS_SYS_PARAM_H
+# include <sys/param.h>
+# endif
+# ifdef EXEC_PAGESIZE
+# define malloc_getpagesize EXEC_PAGESIZE
+# else
+# ifdef NBPG
+# ifndef CLSIZE
+# define malloc_getpagesize NBPG
+# else
+# define malloc_getpagesize (NBPG * CLSIZE)
+# endif
+# else
+# ifdef NBPC
+# define malloc_getpagesize NBPC
+# else
+# ifdef PAGESIZE
+# define malloc_getpagesize PAGESIZE
+# else /* just guess */
+# define malloc_getpagesize ((size_t)4096U)
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+# endif
+#endif
+#endif
+
+/* ------------------- size_t and alignment properties -------------------- */
+
+/* The byte and bit size of a size_t */
+#define SIZE_T_SIZE (sizeof(size_t))
+#define SIZE_T_BITSIZE (sizeof(size_t) << 3)
+
+/* Some constants coerced to size_t */
+/* Annoying but necessary to avoid errors on some platforms */
+#define SIZE_T_ZERO ((size_t)0)
+#define SIZE_T_ONE ((size_t)1)
+#define SIZE_T_TWO ((size_t)2)
+#define SIZE_T_FOUR ((size_t)4)
+#define TWO_SIZE_T_SIZES (SIZE_T_SIZE<<1)
+#define FOUR_SIZE_T_SIZES (SIZE_T_SIZE<<2)
+#define SIX_SIZE_T_SIZES (FOUR_SIZE_T_SIZES+TWO_SIZE_T_SIZES)
+#define HALF_MAX_SIZE_T (MAX_SIZE_T / 2U)
+
+/* The bit mask value corresponding to MALLOC_ALIGNMENT */
+#define CHUNK_ALIGN_MASK (MALLOC_ALIGNMENT - SIZE_T_ONE)
+
+/* True if address a has acceptable alignment */
+#define is_aligned(A) (((size_t)((A)) & (CHUNK_ALIGN_MASK)) == 0)
+
+/* the number of bytes to offset an address to align it */
+#define align_offset(A)\
+ ((((size_t)(A) & CHUNK_ALIGN_MASK) == 0)? 0 :\
+ ((MALLOC_ALIGNMENT - ((size_t)(A) & CHUNK_ALIGN_MASK)) & CHUNK_ALIGN_MASK))
+
+/* -------------------------- MMAP preliminaries ------------------------- */
+
+/*
+ If HAVE_MORECORE or HAVE_MMAP are false, we just define calls and
+ checks to fail so compiler optimizer can delete code rather than
+ using so many "#if"s.
+*/
+
+
+/* MORECORE and MMAP must return MFAIL on failure */
+#define MFAIL ((void*)(MAX_SIZE_T))
+#define CMFAIL ((char*)(MFAIL)) /* defined for convenience */
+
+#if HAVE_MMAP
+
+#ifndef WIN32
+#define MUNMAP_DEFAULT(a, s) munmap((a), (s))
+#define MMAP_PROT (PROT_READ|PROT_WRITE)
+#if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
+#define MAP_ANONYMOUS MAP_ANON
+#endif /* MAP_ANON */
+#ifdef MAP_ANONYMOUS
+#define MMAP_FLAGS (MAP_PRIVATE|MAP_ANONYMOUS)
+#define MMAP_DEFAULT(s) mmap(0, (s), MMAP_PROT, MMAP_FLAGS, -1, 0)
+#else /* MAP_ANONYMOUS */
+/*
+ Nearly all versions of mmap support MAP_ANONYMOUS, so the following
+ is unlikely to be needed, but is supplied just in case.
+*/
+#define MMAP_FLAGS (MAP_PRIVATE)
+static int dev_zero_fd = -1; /* Cached file descriptor for /dev/zero. */
+#define MMAP_DEFAULT(s) ((dev_zero_fd < 0) ? \
+ (dev_zero_fd = open("/dev/zero", O_RDWR), \
+ mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0)) : \
+ mmap(0, (s), MMAP_PROT, MMAP_FLAGS, dev_zero_fd, 0))
+#endif /* MAP_ANONYMOUS */
+
+#define DIRECT_MMAP_DEFAULT(s) MMAP_DEFAULT(s)
+
+#else /* WIN32 */
+
+/* Win32 MMAP via VirtualAlloc */
+static FORCEINLINE void* win32mmap(size_t size) {
+ void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT, PAGE_READWRITE);
+ return (ptr != 0)? ptr: MFAIL;
+}
+
+/* For direct MMAP, use MEM_TOP_DOWN to minimize interference */
+static FORCEINLINE void* win32direct_mmap(size_t size) {
+ void* ptr = VirtualAlloc(0, size, MEM_RESERVE|MEM_COMMIT|MEM_TOP_DOWN,
+ PAGE_READWRITE);
+ return (ptr != 0)? ptr: MFAIL;
+}
+
+/* This function supports releasing coalesed segments */
+static FORCEINLINE int win32munmap(void* ptr, size_t size) {
+ MEMORY_BASIC_INFORMATION minfo;
+ char* cptr = (char*)ptr;
+ while (size) {
+ if (VirtualQuery(cptr, &minfo, sizeof(minfo)) == 0)
+ return -1;
+ if (minfo.BaseAddress != cptr || minfo.AllocationBase != cptr ||
+ minfo.State != MEM_COMMIT || minfo.RegionSize > size)
+ return -1;
+ if (VirtualFree(cptr, 0, MEM_RELEASE) == 0)
+ return -1;
+ cptr += minfo.RegionSize;
+ size -= minfo.RegionSize;
+ }
+ return 0;
+}
+
+#define MMAP_DEFAULT(s) win32mmap(s)
+#define MUNMAP_DEFAULT(a, s) win32munmap((a), (s))
+#define DIRECT_MMAP_DEFAULT(s) win32direct_mmap(s)
+#endif /* WIN32 */
+#endif /* HAVE_MMAP */
+
+#if HAVE_MREMAP
+#ifndef WIN32
+#define MREMAP_DEFAULT(addr, osz, nsz, mv) mremap((addr), (osz), (nsz), (mv))
+#endif /* WIN32 */
+#endif /* HAVE_MREMAP */
+
+/**
+ * Define CALL_MORECORE
+ */
+#if HAVE_MORECORE
+ #ifdef MORECORE
+ #define CALL_MORECORE(S) MORECORE(S)
+ #else /* MORECORE */
+ #define CALL_MORECORE(S) MORECORE_DEFAULT(S)
+ #endif /* MORECORE */
+#else /* HAVE_MORECORE */
+ #define CALL_MORECORE(S) MFAIL
+#endif /* HAVE_MORECORE */
+
+/**
+ * Define CALL_MMAP/CALL_MUNMAP/CALL_DIRECT_MMAP
+ */
+#if HAVE_MMAP
+ #define USE_MMAP_BIT (SIZE_T_ONE)
+
+ #ifdef MMAP
+ #define CALL_MMAP(s) MMAP(s)
+ #else /* MMAP */
+ #define CALL_MMAP(s) MMAP_DEFAULT(s)
+ #endif /* MMAP */
+ #ifdef MUNMAP
+ #define CALL_MUNMAP(a, s) MUNMAP((a), (s))
+ #else /* MUNMAP */
+ #define CALL_MUNMAP(a, s) MUNMAP_DEFAULT((a), (s))
+ #endif /* MUNMAP */
+ #ifdef DIRECT_MMAP
+ #define CALL_DIRECT_MMAP(s) DIRECT_MMAP(s)
+ #else /* DIRECT_MMAP */
+ #define CALL_DIRECT_MMAP(s) DIRECT_MMAP_DEFAULT(s)
+ #endif /* DIRECT_MMAP */
+#else /* HAVE_MMAP */
+ #define USE_MMAP_BIT (SIZE_T_ZERO)
+
+ #define MMAP(s) MFAIL
+ #define MUNMAP(a, s) (-1)
+ #define DIRECT_MMAP(s) MFAIL
+ #define CALL_DIRECT_MMAP(s) DIRECT_MMAP(s)
+ #define CALL_MMAP(s) MMAP(s)
+ #define CALL_MUNMAP(a, s) MUNMAP((a), (s))
+#endif /* HAVE_MMAP */
+
+/**
+ * Define CALL_MREMAP
+ */
+#if HAVE_MMAP && HAVE_MREMAP
+ #ifdef MREMAP
+ #define CALL_MREMAP(addr, osz, nsz, mv) MREMAP((addr), (osz), (nsz), (mv))
+ #else /* MREMAP */
+ #define CALL_MREMAP(addr, osz, nsz, mv) MREMAP_DEFAULT((addr), (osz), (nsz), (mv))
+ #endif /* MREMAP */
+#else /* HAVE_MMAP && HAVE_MREMAP */
+ #define CALL_MREMAP(addr, osz, nsz, mv) MFAIL
+#endif /* HAVE_MMAP && HAVE_MREMAP */
+
+/* mstate bit set if contiguous morecore disabled or failed */
+#define USE_NONCONTIGUOUS_BIT (4U)
+
+/* segment bit set in create_mspace_with_base */
+#define EXTERN_BIT (8U)
+
+
+/* --------------------------- Lock preliminaries ------------------------ */
+
+/*
+ When locks are defined, there is one global lock, plus
+ one per-mspace lock.
+
+ The global lock_ensures that mparams.magic and other unique
+ mparams values are initialized only once. It also protects
+ sequences of calls to MORECORE. In many cases sys_alloc requires
+ two calls, that should not be interleaved with calls by other
+ threads. This does not protect against direct calls to MORECORE
+ by other threads not using this lock, so there is still code to
+ cope the best we can on interference.
+
+ Per-mspace locks surround calls to malloc, free, etc.
+ By default, locks are simple non-reentrant mutexes.
+
+ Because lock-protected regions generally have bounded times, it is
+ OK to use the supplied simple spinlocks. Spinlocks are likely to
+ improve performance for lightly contended applications, but worsen
+ performance under heavy contention.
+
+ If USE_LOCKS is > 1, the definitions of lock routines here are
+ bypassed, in which case you will need to define the type MLOCK_T,
+ and at least INITIAL_LOCK, DESTROY_LOCK, ACQUIRE_LOCK, RELEASE_LOCK
+ and TRY_LOCK. You must also declare a
+ static MLOCK_T malloc_global_mutex = { initialization values };.
+
+*/
+
+#if !USE_LOCKS
+#define USE_LOCK_BIT (0U)
+#define INITIAL_LOCK(l) (0)
+#define DESTROY_LOCK(l) (0)
+#define ACQUIRE_MALLOC_GLOBAL_LOCK()
+#define RELEASE_MALLOC_GLOBAL_LOCK()
+
+#else
+#if USE_LOCKS > 1
+/* ----------------------- User-defined locks ------------------------ */
+/* Define your own lock implementation here */
+/* #define INITIAL_LOCK(lk) ... */
+/* #define DESTROY_LOCK(lk) ... */
+/* #define ACQUIRE_LOCK(lk) ... */
+/* #define RELEASE_LOCK(lk) ... */
+/* #define TRY_LOCK(lk) ... */
+/* static MLOCK_T malloc_global_mutex = ... */
+
+#elif USE_SPIN_LOCKS
+
+/* First, define CAS_LOCK and CLEAR_LOCK on ints */
+/* Note CAS_LOCK defined to return 0 on success */
+
+#if defined(__GNUC__)&& (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1))
+#define CAS_LOCK(sl) __sync_lock_test_and_set(sl, 1)
+#define CLEAR_LOCK(sl) __sync_lock_release(sl)
+
+#elif (defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__)))
+/* Custom spin locks for older gcc on x86 */
+static FORCEINLINE int x86_cas_lock(int *sl) {
+ int ret;
+ int val = 1;
+ int cmp = 0;
+ __asm__ __volatile__ ("lock; cmpxchgl %1, %2"
+ : "=a" (ret)
+ : "r" (val), "m" (*(sl)), "0"(cmp)
+ : "memory", "cc");
+ return ret;
+}
+
+static FORCEINLINE void x86_clear_lock(int* sl) {
+ assert(*sl != 0);
+ int prev = 0;
+ int ret;
+ __asm__ __volatile__ ("lock; xchgl %0, %1"
+ : "=r" (ret)
+ : "m" (*(sl)), "0"(prev)
+ : "memory");
+}
+
+#define CAS_LOCK(sl) x86_cas_lock(sl)
+#define CLEAR_LOCK(sl) x86_clear_lock(sl)
+
+#else /* Win32 MSC */
+#define CAS_LOCK(sl) interlockedexchange(sl, (LONG)1)
+#define CLEAR_LOCK(sl) interlockedexchange (sl, (LONG)0)
+
+#endif /* ... gcc spins locks ... */
+
+/* How to yield for a spin lock */
+#define SPINS_PER_YIELD 63
+#if defined(_MSC_VER)
+#define SLEEP_EX_DURATION 50 /* delay for yield/sleep */
+#define SPIN_LOCK_YIELD SleepEx(SLEEP_EX_DURATION, FALSE)
+#elif defined (__SVR4) && defined (__sun) /* solaris */
+#define SPIN_LOCK_YIELD thr_yield();
+#elif !defined(LACKS_SCHED_H)
+#define SPIN_LOCK_YIELD sched_yield();
+#else
+#define SPIN_LOCK_YIELD
+#endif /* ... yield ... */
+
+#if !defined(USE_RECURSIVE_LOCKS) || USE_RECURSIVE_LOCKS == 0
+/* Plain spin locks use single word (embedded in malloc_states) */
+static int spin_acquire_lock(int *sl) {
+ int spins = 0;
+ while (*(volatile int *)sl != 0 || CAS_LOCK(sl)) {
+ if ((++spins & SPINS_PER_YIELD) == 0) {
+ SPIN_LOCK_YIELD;
+ }
+ }
+ return 0;
+}
+
+#define MLOCK_T int
+#define TRY_LOCK(sl) !CAS_LOCK(sl)
+#define RELEASE_LOCK(sl) CLEAR_LOCK(sl)
+#define ACQUIRE_LOCK(sl) (CAS_LOCK(sl)? spin_acquire_lock(sl) : 0)
+#define INITIAL_LOCK(sl) (*sl = 0)
+#define DESTROY_LOCK(sl) (0)
+static MLOCK_T malloc_global_mutex = 0;
+
+#else /* USE_RECURSIVE_LOCKS */
+/* types for lock owners */
+#ifdef WIN32
+#define THREAD_ID_T DWORD
+#define CURRENT_THREAD GetCurrentThreadId()
+#define EQ_OWNER(X,Y) ((X) == (Y))
+#else
+/*
+ Note: the following assume that pthread_t is a type that can be
+ initialized to (casted) zero. If this is not the case, you will need to
+ somehow redefine these or not use spin locks.
+*/
+#define THREAD_ID_T pthread_t
+#define CURRENT_THREAD pthread_self()
+#define EQ_OWNER(X,Y) pthread_equal(X, Y)
+#endif
+
+struct malloc_recursive_lock {
+ int sl;
+ unsigned int c;
+ THREAD_ID_T threadid;
+};
+
+#define MLOCK_T struct malloc_recursive_lock
+static MLOCK_T malloc_global_mutex = { 0, 0, (THREAD_ID_T)0};
+
+static FORCEINLINE void recursive_release_lock(MLOCK_T *lk) {
+ assert(lk->sl != 0);
+ if (--lk->c == 0) {
+ CLEAR_LOCK(&lk->sl);
+ }
+}
+
+static FORCEINLINE int recursive_acquire_lock(MLOCK_T *lk) {
+ THREAD_ID_T mythreadid = CURRENT_THREAD;
+ int spins = 0;
+ for (;;) {
+ if (*((volatile int *)(&lk->sl)) == 0) {
+ if (!CAS_LOCK(&lk->sl)) {
+ lk->threadid = mythreadid;
+ lk->c = 1;
+ return 0;
+ }
+ }
+ else if (EQ_OWNER(lk->threadid, mythreadid)) {
+ ++lk->c;
+ return 0;
+ }
+ if ((++spins & SPINS_PER_YIELD) == 0) {
+ SPIN_LOCK_YIELD;
+ }
+ }
+}
+
+static FORCEINLINE int recursive_try_lock(MLOCK_T *lk) {
+ THREAD_ID_T mythreadid = CURRENT_THREAD;
+ if (*((volatile int *)(&lk->sl)) == 0) {
+ if (!CAS_LOCK(&lk->sl)) {
+ lk->threadid = mythreadid;
+ lk->c = 1;
+ return 1;
+ }
+ }
+ else if (EQ_OWNER(lk->threadid, mythreadid)) {
+ ++lk->c;
+ return 1;
+ }
+ return 0;
+}
+
+#define RELEASE_LOCK(lk) recursive_release_lock(lk)
+#define TRY_LOCK(lk) recursive_try_lock(lk)
+#define ACQUIRE_LOCK(lk) recursive_acquire_lock(lk)
+#define INITIAL_LOCK(lk) ((lk)->threadid = (THREAD_ID_T)0, (lk)->sl = 0, (lk)->c = 0)
+#define DESTROY_LOCK(lk) (0)
+#endif /* USE_RECURSIVE_LOCKS */
+
+#elif defined(WIN32) /* Win32 critical sections */
+#define MLOCK_T CRITICAL_SECTION
+#define ACQUIRE_LOCK(lk) (EnterCriticalSection(lk), 0)
+#define RELEASE_LOCK(lk) LeaveCriticalSection(lk)
+#define TRY_LOCK(lk) TryEnterCriticalSection(lk)
+#define INITIAL_LOCK(lk) (!InitializeCriticalSectionAndSpinCount((lk), 0x80000000|4000))
+#define DESTROY_LOCK(lk) (DeleteCriticalSection(lk), 0)
+#define NEED_GLOBAL_LOCK_INIT
+
+static MLOCK_T malloc_global_mutex;
+static volatile LONG malloc_global_mutex_status;
+
+/* Use spin loop to initialize global lock */
+static void init_malloc_global_mutex() {
+ for (;;) {
+ long stat = malloc_global_mutex_status;
+ if (stat > 0)
+ return;
+ /* transition to < 0 while initializing, then to > 0) */
+ if (stat == 0 &&
+ interlockedcompareexchange(&malloc_global_mutex_status, (LONG)-1, (LONG)0) == 0) {
+ InitializeCriticalSection(&malloc_global_mutex);
+ interlockedexchange(&malloc_global_mutex_status, (LONG)1);
+ return;
+ }
+ SleepEx(0, FALSE);
+ }
+}
+
+#else /* pthreads-based locks */
+#define MLOCK_T pthread_mutex_t
+#define ACQUIRE_LOCK(lk) pthread_mutex_lock(lk)
+#define RELEASE_LOCK(lk) pthread_mutex_unlock(lk)
+#define TRY_LOCK(lk) (!pthread_mutex_trylock(lk))
+#define INITIAL_LOCK(lk) pthread_init_lock(lk)
+#define DESTROY_LOCK(lk) pthread_mutex_destroy(lk)
+
+#if defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0 && defined(linux) && !defined(PTHREAD_MUTEX_RECURSIVE)
+/* Cope with old-style linux recursive lock initialization by adding */
+/* skipped internal declaration from pthread.h */
+extern int pthread_mutexattr_setkind_np __P ((pthread_mutexattr_t *__attr,
+ int __kind));
+#define PTHREAD_MUTEX_RECURSIVE PTHREAD_MUTEX_RECURSIVE_NP
+#define pthread_mutexattr_settype(x,y) pthread_mutexattr_setkind_np(x,y)
+#endif /* USE_RECURSIVE_LOCKS ... */
+
+static MLOCK_T malloc_global_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+static int pthread_init_lock (MLOCK_T *lk) {
+ pthread_mutexattr_t attr;
+ if (pthread_mutexattr_init(&attr)) return 1;
+#if defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0
+ if (pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE)) return 1;
+#endif
+ if (pthread_mutex_init(lk, &attr)) return 1;
+ if (pthread_mutexattr_destroy(&attr)) return 1;
+ return 0;
+}
+
+#endif /* ... lock types ... */
+
+/* Common code for all lock types */
+#define USE_LOCK_BIT (2U)
+
+#ifndef ACQUIRE_MALLOC_GLOBAL_LOCK
+#define ACQUIRE_MALLOC_GLOBAL_LOCK() ACQUIRE_LOCK(&malloc_global_mutex);
+#endif
+
+#ifndef RELEASE_MALLOC_GLOBAL_LOCK
+#define RELEASE_MALLOC_GLOBAL_LOCK() RELEASE_LOCK(&malloc_global_mutex);
+#endif
+
+#endif /* USE_LOCKS */
+
+/* ----------------------- Chunk representations ------------------------ */
+
+/*
+ (The following includes lightly edited explanations by Colin Plumb.)
+
+ The malloc_chunk declaration below is misleading (but accurate and
+ necessary). It declares a "view" into memory allowing access to
+ necessary fields at known offsets from a given base.
+
+ Chunks of memory are maintained using a `boundary tag' method as
+ originally described by Knuth. (See the paper by Paul Wilson
+ ftp://ftp.cs.utexas.edu/pub/garbage/allocsrv.ps for a survey of such
+ techniques.) Sizes of free chunks are stored both in the front of
+ each chunk and at the end. This makes consolidating fragmented
+ chunks into bigger chunks fast. The head fields also hold bits
+ representing whether chunks are free or in use.
+
+ Here are some pictures to make it clearer. They are "exploded" to
+ show that the state of a chunk can be thought of as extending from
+ the high 31 bits of the head field of its header through the
+ prev_foot and PINUSE_BIT bit of the following chunk header.
+
+ A chunk that's in use looks like:
+
+ chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Size of previous chunk (if P = 0) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
+ | Size of this chunk 1| +-+
+ mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | |
+ +- -+
+ | |
+ +- -+
+ | :
+ +- size - sizeof(size_t) available payload bytes -+
+ : |
+ chunk-> +- -+
+ | |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |1|
+ | Size of next chunk (may or may not be in use) | +-+
+ mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ And if it's free, it looks like this:
+
+ chunk-> +- -+
+ | User payload (must be in use, or we would have merged!) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |P|
+ | Size of this chunk 0| +-+
+ mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Next pointer |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Prev pointer |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | :
+ +- size - sizeof(struct chunk) unused bytes -+
+ : |
+ chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Size of this chunk |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |0|
+ | Size of next chunk (must be in use, or we would have merged)| +-+
+ mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | :
+ +- User payload -+
+ : |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ |0|
+ +-+
+ Note that since we always merge adjacent free chunks, the chunks
+ adjacent to a free chunk must be in use.
+
+ Given a pointer to a chunk (which can be derived trivially from the
+ payload pointer) we can, in O(1) time, find out whether the adjacent
+ chunks are free, and if so, unlink them from the lists that they
+ are on and merge them with the current chunk.
+
+ Chunks always begin on even word boundaries, so the mem portion
+ (which is returned to the user) is also on an even word boundary, and
+ thus at least double-word aligned.
+
+ The P (PINUSE_BIT) bit, stored in the unused low-order bit of the
+ chunk size (which is always a multiple of two words), is an in-use
+ bit for the *previous* chunk. If that bit is *clear*, then the
+ word before the current chunk size contains the previous chunk
+ size, and can be used to find the front of the previous chunk.
+ The very first chunk allocated always has this bit set, preventing
+ access to non-existent (or non-owned) memory. If pinuse is set for
+ any given chunk, then you CANNOT determine the size of the
+ previous chunk, and might even get a memory addressing fault when
+ trying to do so.
+
+ The C (CINUSE_BIT) bit, stored in the unused second-lowest bit of
+ the chunk size redundantly records whether the current chunk is
+ inuse (unless the chunk is mmapped). This redundancy enables usage
+ checks within free and realloc, and reduces indirection when freeing
+ and consolidating chunks.
+
+ Each freshly allocated chunk must have both cinuse and pinuse set.
+ That is, each allocated chunk borders either a previously allocated
+ and still in-use chunk, or the base of its memory arena. This is
+ ensured by making all allocations from the `lowest' part of any
+ found chunk. Further, no free chunk physically borders another one,
+ so each free chunk is known to be preceded and followed by either
+ inuse chunks or the ends of memory.
+
+ Note that the `foot' of the current chunk is actually represented
+ as the prev_foot of the NEXT chunk. This makes it easier to
+ deal with alignments etc but can be very confusing when trying
+ to extend or adapt this code.
+
+ The exceptions to all this are
+
+ 1. The special chunk `top' is the top-most available chunk (i.e.,
+ the one bordering the end of available memory). It is treated
+ specially. Top is never included in any bin, is used only if
+ no other chunk is available, and is released back to the
+ system if it is very large (see M_TRIM_THRESHOLD). In effect,
+ the top chunk is treated as larger (and thus less well
+ fitting) than any other available chunk. The top chunk
+ doesn't update its trailing size field since there is no next
+ contiguous chunk that would have to index off it. However,
+ space is still allocated for it (TOP_FOOT_SIZE) to enable
+ separation or merging when space is extended.
+
+ 3. Chunks allocated via mmap, have both cinuse and pinuse bits
+ cleared in their head fields. Because they are allocated
+ one-by-one, each must carry its own prev_foot field, which is
+ also used to hold the offset this chunk has within its mmapped
+ region, which is needed to preserve alignment. Each mmapped
+ chunk is trailed by the first two fields of a fake next-chunk
+ for sake of usage checks.
+
+*/
+
+struct malloc_chunk {
+ size_t prev_foot; /* Size of previous chunk (if free). */
+ size_t head; /* Size and inuse bits. */
+ struct malloc_chunk* fd; /* double links -- used only if free. */
+ struct malloc_chunk* bk;
+};
+
+typedef struct malloc_chunk mchunk;
+typedef struct malloc_chunk* mchunkptr;
+typedef struct malloc_chunk* sbinptr; /* The type of bins of chunks */
+typedef unsigned int bindex_t; /* Described below */
+typedef unsigned int binmap_t; /* Described below */
+typedef unsigned int flag_t; /* The type of various bit flag sets */
+
+/* ------------------- Chunks sizes and alignments ----------------------- */
+
+#define MCHUNK_SIZE (sizeof(mchunk))
+
+#if FOOTERS
+#define CHUNK_OVERHEAD (TWO_SIZE_T_SIZES)
+#else /* FOOTERS */
+#define CHUNK_OVERHEAD (SIZE_T_SIZE)
+#endif /* FOOTERS */
+
+/* MMapped chunks need a second word of overhead ... */
+#define MMAP_CHUNK_OVERHEAD (TWO_SIZE_T_SIZES)
+/* ... and additional padding for fake next-chunk at foot */
+#define MMAP_FOOT_PAD (FOUR_SIZE_T_SIZES)
+
+/* The smallest size we can malloc is an aligned minimal chunk */
+#define MIN_CHUNK_SIZE\
+ ((MCHUNK_SIZE + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK)
+
+/* conversion from malloc headers to user pointers, and back */
+#define chunk2mem(p) ((void*)((char*)(p) + TWO_SIZE_T_SIZES))
+#define mem2chunk(mem) ((mchunkptr)((char*)(mem) - TWO_SIZE_T_SIZES))
+/* chunk associated with aligned address A */
+#define align_as_chunk(A) (mchunkptr)((A) + align_offset(chunk2mem(A)))
+
+/* Bounds on request (not chunk) sizes. */
+#define MAX_REQUEST ((-MIN_CHUNK_SIZE) << 2)
+#define MIN_REQUEST (MIN_CHUNK_SIZE - CHUNK_OVERHEAD - SIZE_T_ONE)
+
+/* pad request bytes into a usable size */
+#define pad_request(req) \
+ (((req) + CHUNK_OVERHEAD + CHUNK_ALIGN_MASK) & ~CHUNK_ALIGN_MASK)
+
+/* pad request, checking for minimum (but not maximum) */
+#define request2size(req) \
+ (((req) < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(req))
+
+
+/* ------------------ Operations on head and foot fields ----------------- */
+
+/*
+ The head field of a chunk is or'ed with PINUSE_BIT when previous
+ adjacent chunk in use, and or'ed with CINUSE_BIT if this chunk is in
+ use, unless mmapped, in which case both bits are cleared.
+
+ FLAG4_BIT is not used by this malloc, but might be useful in extensions.
+*/
+
+#define PINUSE_BIT (SIZE_T_ONE)
+#define CINUSE_BIT (SIZE_T_TWO)
+#define FLAG4_BIT (SIZE_T_FOUR)
+#define INUSE_BITS (PINUSE_BIT|CINUSE_BIT)
+#define FLAG_BITS (PINUSE_BIT|CINUSE_BIT|FLAG4_BIT)
+
+/* Head value for fenceposts */
+#define FENCEPOST_HEAD (INUSE_BITS|SIZE_T_SIZE)
+
+/* extraction of fields from head words */
+#define cinuse(p) ((p)->head & CINUSE_BIT)
+#define pinuse(p) ((p)->head & PINUSE_BIT)
+#define flag4inuse(p) ((p)->head & FLAG4_BIT)
+#define is_inuse(p) (((p)->head & INUSE_BITS) != PINUSE_BIT)
+#define is_mmapped(p) (((p)->head & INUSE_BITS) == 0)
+
+#define chunksize(p) ((p)->head & ~(FLAG_BITS))
+
+#define clear_pinuse(p) ((p)->head &= ~PINUSE_BIT)
+#define set_flag4(p) ((p)->head |= FLAG4_BIT)
+#define clear_flag4(p) ((p)->head &= ~FLAG4_BIT)
+
+/* Treat space at ptr +/- offset as a chunk */
+#define chunk_plus_offset(p, s) ((mchunkptr)(((char*)(p)) + (s)))
+#define chunk_minus_offset(p, s) ((mchunkptr)(((char*)(p)) - (s)))
+
+/* Ptr to next or previous physical malloc_chunk. */
+#define next_chunk(p) ((mchunkptr)( ((char*)(p)) + ((p)->head & ~FLAG_BITS)))
+#define prev_chunk(p) ((mchunkptr)( ((char*)(p)) - ((p)->prev_foot) ))
+
+/* extract next chunk's pinuse bit */
+#define next_pinuse(p) ((next_chunk(p)->head) & PINUSE_BIT)
+
+/* Get/set size at footer */
+#define get_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot)
+#define set_foot(p, s) (((mchunkptr)((char*)(p) + (s)))->prev_foot = (s))
+
+/* Set size, pinuse bit, and foot */
+#define set_size_and_pinuse_of_free_chunk(p, s)\
+ ((p)->head = (s|PINUSE_BIT), set_foot(p, s))
+
+/* Set size, pinuse bit, foot, and clear next pinuse */
+#define set_free_with_pinuse(p, s, n)\
+ (clear_pinuse(n), set_size_and_pinuse_of_free_chunk(p, s))
+
+/* Get the internal overhead associated with chunk p */
+#define overhead_for(p)\
+ (is_mmapped(p)? MMAP_CHUNK_OVERHEAD : CHUNK_OVERHEAD)
+
+/* Return true if malloced space is not necessarily cleared */
+#if MMAP_CLEARS
+#define calloc_must_clear(p) (!is_mmapped(p))
+#else /* MMAP_CLEARS */
+#define calloc_must_clear(p) (1)
+#endif /* MMAP_CLEARS */
+
+/* ---------------------- Overlaid data structures ----------------------- */
+
+/*
+ When chunks are not in use, they are treated as nodes of either
+ lists or trees.
+
+ "Small" chunks are stored in circular doubly-linked lists, and look
+ like this:
+
+ chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Size of previous chunk |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ `head:' | Size of chunk, in bytes |P|
+ mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Forward pointer to next chunk in list |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Back pointer to previous chunk in list |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Unused space (may be 0 bytes long) .
+ . .
+ . |
+nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ `foot:' | Size of chunk, in bytes |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Larger chunks are kept in a form of bitwise digital trees (aka
+ tries) keyed on chunksizes. Because malloc_tree_chunks are only for
+ free chunks greater than 256 bytes, their size doesn't impose any
+ constraints on user chunk sizes. Each node looks like:
+
+ chunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Size of previous chunk |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ `head:' | Size of chunk, in bytes |P|
+ mem-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Forward pointer to next chunk of same size |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Back pointer to previous chunk of same size |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Pointer to left child (child[0]) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Pointer to right child (child[1]) |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Pointer to parent |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | bin index of this chunk |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ | Unused space .
+ . |
+nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+ `foot:' | Size of chunk, in bytes |
+ +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
+
+ Each tree holding treenodes is a tree of unique chunk sizes. Chunks
+ of the same size are arranged in a circularly-linked list, with only
+ the oldest chunk (the next to be used, in our FIFO ordering)
+ actually in the tree. (Tree members are distinguished by a non-null
+ parent pointer.) If a chunk with the same size an an existing node
+ is inserted, it is linked off the existing node using pointers that
+ work in the same way as fd/bk pointers of small chunks.
+
+ Each tree contains a power of 2 sized range of chunk sizes (the
+ smallest is 0x100 <= x < 0x180), which is is divided in half at each
+ tree level, with the chunks in the smaller half of the range (0x100
+ <= x < 0x140 for the top nose) in the left subtree and the larger
+ half (0x140 <= x < 0x180) in the right subtree. This is, of course,
+ done by inspecting individual bits.
+
+ Using these rules, each node's left subtree contains all smaller
+ sizes than its right subtree. However, the node at the root of each
+ subtree has no particular ordering relationship to either. (The
+ dividing line between the subtree sizes is based on trie relation.)
+ If we remove the last chunk of a given size from the interior of the
+ tree, we need to replace it with a leaf node. The tree ordering
+ rules permit a node to be replaced by any leaf below it.
+
+ The smallest chunk in a tree (a common operation in a best-fit
+ allocator) can be found by walking a path to the leftmost leaf in
+ the tree. Unlike a usual binary tree, where we follow left child
+ pointers until we reach a null, here we follow the right child
+ pointer any time the left one is null, until we reach a leaf with
+ both child pointers null. The smallest chunk in the tree will be
+ somewhere along that path.
+
+ The worst case number of steps to add, find, or remove a node is
+ bounded by the number of bits differentiating chunks within
+ bins. Under current bin calculations, this ranges from 6 up to 21
+ (for 32 bit sizes) or up to 53 (for 64 bit sizes). The typical case
+ is of course much better.
+*/
+
+struct malloc_tree_chunk {
+ /* The first four fields must be compatible with malloc_chunk */
+ size_t prev_foot;
+ size_t head;
+ struct malloc_tree_chunk* fd;
+ struct malloc_tree_chunk* bk;
+
+ struct malloc_tree_chunk* child[2];
+ struct malloc_tree_chunk* parent;
+ bindex_t index;
+};
+
+typedef struct malloc_tree_chunk tchunk;
+typedef struct malloc_tree_chunk* tchunkptr;
+typedef struct malloc_tree_chunk* tbinptr; /* The type of bins of trees */
+
+/* A little helper macro for trees */
+#define leftmost_child(t) ((t)->child[0] != 0? (t)->child[0] : (t)->child[1])
+
+/* ----------------------------- Segments -------------------------------- */
+
+/*
+ Each malloc space may include non-contiguous segments, held in a
+ list headed by an embedded malloc_segment record representing the
+ top-most space. Segments also include flags holding properties of
+ the space. Large chunks that are directly allocated by mmap are not
+ included in this list. They are instead independently created and
+ destroyed without otherwise keeping track of them.
+
+ Segment management mainly comes into play for spaces allocated by
+ MMAP. Any call to MMAP might or might not return memory that is
+ adjacent to an existing segment. MORECORE normally contiguously
+ extends the current space, so this space is almost always adjacent,
+ which is simpler and faster to deal with. (This is why MORECORE is
+ used preferentially to MMAP when both are available -- see
+ sys_alloc.) When allocating using MMAP, we don't use any of the
+ hinting mechanisms (inconsistently) supported in various
+ implementations of unix mmap, or distinguish reserving from
+ committing memory. Instead, we just ask for space, and exploit
+ contiguity when we get it. It is probably possible to do
+ better than this on some systems, but no general scheme seems
+ to be significantly better.
+
+ Management entails a simpler variant of the consolidation scheme
+ used for chunks to reduce fragmentation -- new adjacent memory is
+ normally prepended or appended to an existing segment. However,
+ there are limitations compared to chunk consolidation that mostly
+ reflect the fact that segment processing is relatively infrequent
+ (occurring only when getting memory from system) and that we
+ don't expect to have huge numbers of segments:
+
+ * Segments are not indexed, so traversal requires linear scans. (It
+ would be possible to index these, but is not worth the extra
+ overhead and complexity for most programs on most platforms.)
+ * New segments are only appended to old ones when holding top-most
+ memory; if they cannot be prepended to others, they are held in
+ different segments.
+
+ Except for the top-most segment of an mstate, each segment record
+ is kept at the tail of its segment. Segments are added by pushing
+ segment records onto the list headed by &mstate.seg for the
+ containing mstate.
+
+ Segment flags control allocation/merge/deallocation policies:
+ * If EXTERN_BIT set, then we did not allocate this segment,
+ and so should not try to deallocate or merge with others.
+ (This currently holds only for the initial segment passed
+ into create_mspace_with_base.)
+ * If USE_MMAP_BIT set, the segment may be merged with
+ other surrounding mmapped segments and trimmed/de-allocated
+ using munmap.
+ * If neither bit is set, then the segment was obtained using
+ MORECORE so can be merged with surrounding MORECORE'd segments
+ and deallocated/trimmed using MORECORE with negative arguments.
+*/
+
+struct malloc_segment {
+ char* base; /* base address */
+ size_t size; /* allocated size */
+ struct malloc_segment* next; /* ptr to next segment */
+ flag_t sflags; /* mmap and extern flag */
+};
+
+#define is_mmapped_segment(S) ((S)->sflags & USE_MMAP_BIT)
+#define is_extern_segment(S) ((S)->sflags & EXTERN_BIT)
+
+typedef struct malloc_segment msegment;
+typedef struct malloc_segment* msegmentptr;
+
+/* ---------------------------- malloc_state ----------------------------- */
+
+/*
+ A malloc_state holds all of the bookkeeping for a space.
+ The main fields are:
+
+ Top
+ The topmost chunk of the currently active segment. Its size is
+ cached in topsize. The actual size of topmost space is
+ topsize+TOP_FOOT_SIZE, which includes space reserved for adding
+ fenceposts and segment records if necessary when getting more
+ space from the system. The size at which to autotrim top is
+ cached from mparams in trim_check, except that it is disabled if
+ an autotrim fails.
+
+ Designated victim (dv)
+ This is the preferred chunk for servicing small requests that
+ don't have exact fits. It is normally the chunk split off most
+ recently to service another small request. Its size is cached in
+ dvsize. The link fields of this chunk are not maintained since it
+ is not kept in a bin.
+
+ SmallBins
+ An array of bin headers for free chunks. These bins hold chunks
+ with sizes less than MIN_LARGE_SIZE bytes. Each bin contains
+ chunks of all the same size, spaced 8 bytes apart. To simplify
+ use in double-linked lists, each bin header acts as a malloc_chunk
+ pointing to the real first node, if it exists (else pointing to
+ itself). This avoids special-casing for headers. But to avoid
+ waste, we allocate only the fd/bk pointers of bins, and then use
+ repositioning tricks to treat these as the fields of a chunk.
+
+ TreeBins
+ Treebins are pointers to the roots of trees holding a range of
+ sizes. There are 2 equally spaced treebins for each power of two
+ from TREE_SHIFT to TREE_SHIFT+16. The last bin holds anything
+ larger.
+
+ Bin maps
+ There is one bit map for small bins ("smallmap") and one for
+ treebins ("treemap). Each bin sets its bit when non-empty, and
+ clears the bit when empty. Bit operations are then used to avoid
+ bin-by-bin searching -- nearly all "search" is done without ever
+ looking at bins that won't be selected. The bit maps
+ conservatively use 32 bits per map word, even if on 64bit system.
+ For a good description of some of the bit-based techniques used
+ here, see Henry S. Warren Jr's book "Hacker's Delight" (and
+ supplement at http://hackersdelight.org/). Many of these are
+ intended to reduce the branchiness of paths through malloc etc, as
+ well as to reduce the number of memory locations read or written.
+
+ Segments
+ A list of segments headed by an embedded malloc_segment record
+ representing the initial space.
+
+ Address check support
+ The least_addr field is the least address ever obtained from
+ MORECORE or MMAP. Attempted frees and reallocs of any address less
+ than this are trapped (unless INSECURE is defined).
+
+ Magic tag
+ A cross-check field that should always hold same value as mparams.magic.
+
+ Max allowed footprint
+ The maximum allowed bytes to allocate from system (zero means no limit)
+
+ Flags
+ Bits recording whether to use MMAP, locks, or contiguous MORECORE
+
+ Statistics
+ Each space keeps track of current and maximum system memory
+ obtained via MORECORE or MMAP.
+
+ Trim support
+ Fields holding the amount of unused topmost memory that should trigger
+ trimming, and a counter to force periodic scanning to release unused
+ non-topmost segments.
+
+ Locking
+ If USE_LOCKS is defined, the "mutex" lock is acquired and released
+ around every public call using this mspace.
+
+ Extension support
+ A void* pointer and a size_t field that can be used to help implement
+ extensions to this malloc.
+*/
+
+/* Bin types, widths and sizes */
+#define NSMALLBINS (32U)
+#define NTREEBINS (32U)
+#define SMALLBIN_SHIFT (3U)
+#define SMALLBIN_WIDTH (SIZE_T_ONE << SMALLBIN_SHIFT)
+#define TREEBIN_SHIFT (8U)
+#define MIN_LARGE_SIZE (SIZE_T_ONE << TREEBIN_SHIFT)
+#define MAX_SMALL_SIZE (MIN_LARGE_SIZE - SIZE_T_ONE)
+#define MAX_SMALL_REQUEST (MAX_SMALL_SIZE - CHUNK_ALIGN_MASK - CHUNK_OVERHEAD)
+
+struct malloc_state {
+ binmap_t smallmap;
+ binmap_t treemap;
+ size_t dvsize;
+ size_t topsize;
+ char* least_addr;
+ mchunkptr dv;
+ mchunkptr top;
+ size_t trim_check;
+ size_t release_checks;
+ size_t magic;
+ mchunkptr smallbins[(NSMALLBINS+1)*2];
+ tbinptr treebins[NTREEBINS];
+ size_t footprint;
+ size_t max_footprint;
+ size_t footprint_limit; /* zero means no limit */
+ flag_t mflags;
+#if USE_LOCKS
+ MLOCK_T mutex; /* locate lock among fields that rarely change */
+#endif /* USE_LOCKS */
+ msegment seg;
+ void* extp; /* Unused but available for extensions */
+ size_t exts;
+};
+
+typedef struct malloc_state* mstate;
+
+/* ------------- Global malloc_state and malloc_params ------------------- */
+
+/*
+ malloc_params holds global properties, including those that can be
+ dynamically set using mallopt. There is a single instance, mparams,
+ initialized in init_mparams. Note that the non-zeroness of "magic"
+ also serves as an initialization flag.
+*/
+
+struct malloc_params {
+ size_t magic;
+ size_t page_size;
+ size_t granularity;
+ size_t mmap_threshold;
+ size_t trim_threshold;
+ flag_t default_mflags;
+};
+
+static struct malloc_params mparams;
+
+/* Ensure mparams initialized */
+#define ensure_initialization() (void)(mparams.magic != 0 || init_mparams())
+
+#if !ONLY_MSPACES
+
+/* The global malloc_state used for all non-"mspace" calls */
+static struct malloc_state _gm_;
+#define gm (&_gm_)
+#define is_global(M) ((M) == &_gm_)
+
+#endif /* !ONLY_MSPACES */
+
+#define is_initialized(M) ((M)->top != 0)
+
+/* -------------------------- system alloc setup ------------------------- */
+
+/* Operations on mflags */
+
+#define use_lock(M) ((M)->mflags & USE_LOCK_BIT)
+#define enable_lock(M) ((M)->mflags |= USE_LOCK_BIT)
+#if USE_LOCKS
+#define disable_lock(M) ((M)->mflags &= ~USE_LOCK_BIT)
+#else
+#define disable_lock(M)
+#endif
+
+#define use_mmap(M) ((M)->mflags & USE_MMAP_BIT)
+#define enable_mmap(M) ((M)->mflags |= USE_MMAP_BIT)
+#if HAVE_MMAP
+#define disable_mmap(M) ((M)->mflags &= ~USE_MMAP_BIT)
+#else
+#define disable_mmap(M)
+#endif
+
+#define use_noncontiguous(M) ((M)->mflags & USE_NONCONTIGUOUS_BIT)
+#define disable_contiguous(M) ((M)->mflags |= USE_NONCONTIGUOUS_BIT)
+
+#define set_lock(M,L)\
+ ((M)->mflags = (L)?\
+ ((M)->mflags | USE_LOCK_BIT) :\
+ ((M)->mflags & ~USE_LOCK_BIT))
+
+/* page-align a size */
+#define page_align(S)\
+ (((S) + (mparams.page_size - SIZE_T_ONE)) & ~(mparams.page_size - SIZE_T_ONE))
+
+/* granularity-align a size */
+#define granularity_align(S)\
+ (((S) + (mparams.granularity - SIZE_T_ONE))\
+ & ~(mparams.granularity - SIZE_T_ONE))
+
+
+/* For mmap, use granularity alignment on windows, else page-align */
+#ifdef WIN32
+#define mmap_align(S) granularity_align(S)
+#else
+#define mmap_align(S) page_align(S)
+#endif
+
+/* For sys_alloc, enough padding to ensure can malloc request on success */
+#define SYS_ALLOC_PADDING (TOP_FOOT_SIZE + MALLOC_ALIGNMENT)
+
+#define is_page_aligned(S)\
+ (((size_t)(S) & (mparams.page_size - SIZE_T_ONE)) == 0)
+#define is_granularity_aligned(S)\
+ (((size_t)(S) & (mparams.granularity - SIZE_T_ONE)) == 0)
+
+/* True if segment S holds address A */
+#define segment_holds(S, A)\
+ ((char*)(A) >= S->base && (char*)(A) < S->base + S->size)
+
+/* Return segment holding given address */
+static msegmentptr segment_holding(mstate m, char* addr) {
+ msegmentptr sp = &m->seg;
+ for (;;) {
+ if (addr >= sp->base && addr < sp->base + sp->size)
+ return sp;
+ if ((sp = sp->next) == 0)
+ return 0;
+ }
+}
+
+/* Return true if segment contains a segment link */
+static int has_segment_link(mstate m, msegmentptr ss) {
+ msegmentptr sp = &m->seg;
+ for (;;) {
+ if ((char*)sp >= ss->base && (char*)sp < ss->base + ss->size)
+ return 1;
+ if ((sp = sp->next) == 0)
+ return 0;
+ }
+}
+
+#ifndef MORECORE_CANNOT_TRIM
+#define should_trim(M,s) ((s) > (M)->trim_check)
+#else /* MORECORE_CANNOT_TRIM */
+#define should_trim(M,s) (0)
+#endif /* MORECORE_CANNOT_TRIM */
+
+/*
+ TOP_FOOT_SIZE is padding at the end of a segment, including space
+ that may be needed to place segment records and fenceposts when new
+ noncontiguous segments are added.
+*/
+#define TOP_FOOT_SIZE\
+ (align_offset(chunk2mem(0))+pad_request(sizeof(struct malloc_segment))+MIN_CHUNK_SIZE)
+
+
+/* ------------------------------- Hooks -------------------------------- */
+
+/*
+ PREACTION should be defined to return 0 on success, and nonzero on
+ failure. If you are not using locking, you can redefine these to do
+ anything you like.
+*/
+
+#if USE_LOCKS
+#define PREACTION(M) ((use_lock(M))? ACQUIRE_LOCK(&(M)->mutex) : 0)
+#define POSTACTION(M) { if (use_lock(M)) RELEASE_LOCK(&(M)->mutex); }
+#else /* USE_LOCKS */
+
+#ifndef PREACTION
+#define PREACTION(M) (0)
+#endif /* PREACTION */
+
+#ifndef POSTACTION
+#define POSTACTION(M)
+#endif /* POSTACTION */
+
+#endif /* USE_LOCKS */
+
+/*
+ CORRUPTION_ERROR_ACTION is triggered upon detected bad addresses.
+ USAGE_ERROR_ACTION is triggered on detected bad frees and
+ reallocs. The argument p is an address that might have triggered the
+ fault. It is ignored by the two predefined actions, but might be
+ useful in custom actions that try to help diagnose errors.
+*/
+
+#if PROCEED_ON_ERROR
+
+/* A count of the number of corruption errors causing resets */
+int malloc_corruption_error_count;
+
+/* default corruption action */
+static void reset_on_error(mstate m);
+
+#define CORRUPTION_ERROR_ACTION(m) reset_on_error(m)
+#define USAGE_ERROR_ACTION(m, p)
+
+#else /* PROCEED_ON_ERROR */
+
+#ifndef CORRUPTION_ERROR_ACTION
+#define CORRUPTION_ERROR_ACTION(m) ABORT
+#endif /* CORRUPTION_ERROR_ACTION */
+
+#ifndef USAGE_ERROR_ACTION
+#define USAGE_ERROR_ACTION(m,p) ABORT
+#endif /* USAGE_ERROR_ACTION */
+
+#endif /* PROCEED_ON_ERROR */
+
+
+/* -------------------------- Debugging setup ---------------------------- */
+
+#if ! DEBUG
+
+#define check_free_chunk(M,P)
+#define check_inuse_chunk(M,P)
+#define check_malloced_chunk(M,P,N)
+#define check_mmapped_chunk(M,P)
+#define check_malloc_state(M)
+#define check_top_chunk(M,P)
+
+#else /* DEBUG */
+#define check_free_chunk(M,P) do_check_free_chunk(M,P)
+#define check_inuse_chunk(M,P) do_check_inuse_chunk(M,P)
+#define check_top_chunk(M,P) do_check_top_chunk(M,P)
+#define check_malloced_chunk(M,P,N) do_check_malloced_chunk(M,P,N)
+#define check_mmapped_chunk(M,P) do_check_mmapped_chunk(M,P)
+#define check_malloc_state(M) do_check_malloc_state(M)
+
+static void do_check_any_chunk(mstate m, mchunkptr p);
+static void do_check_top_chunk(mstate m, mchunkptr p);
+static void do_check_mmapped_chunk(mstate m, mchunkptr p);
+static void do_check_inuse_chunk(mstate m, mchunkptr p);
+static void do_check_free_chunk(mstate m, mchunkptr p);
+static void do_check_malloced_chunk(mstate m, void* mem, size_t s);
+static void do_check_tree(mstate m, tchunkptr t);
+static void do_check_treebin(mstate m, bindex_t i);
+static void do_check_smallbin(mstate m, bindex_t i);
+static void do_check_malloc_state(mstate m);
+static int bin_find(mstate m, mchunkptr x);
+static size_t traverse_and_check(mstate m);
+#endif /* DEBUG */
+
+/* ---------------------------- Indexing Bins ---------------------------- */
+
+#define is_small(s) (((s) >> SMALLBIN_SHIFT) < NSMALLBINS)
+#define small_index(s) (bindex_t)((s) >> SMALLBIN_SHIFT)
+#define small_index2size(i) ((i) << SMALLBIN_SHIFT)
+#define MIN_SMALL_INDEX (small_index(MIN_CHUNK_SIZE))
+
+/* addressing by index. See above about smallbin repositioning */
+#define smallbin_at(M, i) ((sbinptr)((char*)&((M)->smallbins[(i)<<1])))
+#define treebin_at(M,i) (&((M)->treebins[i]))
+
+/* assign tree index for size S to variable I. Use x86 asm if possible */
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+#define compute_tree_index(S, I)\
+{\
+ unsigned int X = S >> TREEBIN_SHIFT;\
+ if (X == 0)\
+ I = 0;\
+ else if (X > 0xFFFF)\
+ I = NTREEBINS-1;\
+ else {\
+ unsigned int K = (unsigned) sizeof(X)*__CHAR_BIT__ - 1 - (unsigned) __builtin_clz(X); \
+ I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
+ }\
+}
+
+#elif defined (__INTEL_COMPILER)
+#define compute_tree_index(S, I)\
+{\
+ size_t X = S >> TREEBIN_SHIFT;\
+ if (X == 0)\
+ I = 0;\
+ else if (X > 0xFFFF)\
+ I = NTREEBINS-1;\
+ else {\
+ unsigned int K = _bit_scan_reverse (X); \
+ I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
+ }\
+}
+
+#elif defined(_MSC_VER) && _MSC_VER>=1300
+#define compute_tree_index(S, I)\
+{\
+ size_t X = S >> TREEBIN_SHIFT;\
+ if (X == 0)\
+ I = 0;\
+ else if (X > 0xFFFF)\
+ I = NTREEBINS-1;\
+ else {\
+ unsigned int K;\
+ _BitScanReverse((DWORD *) &K, (DWORD) X);\
+ I = (bindex_t)((K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1)));\
+ }\
+}
+
+#else /* GNUC */
+#define compute_tree_index(S, I)\
+{\
+ size_t X = S >> TREEBIN_SHIFT;\
+ if (X == 0)\
+ I = 0;\
+ else if (X > 0xFFFF)\
+ I = NTREEBINS-1;\
+ else {\
+ unsigned int Y = (unsigned int)X;\
+ unsigned int N = ((Y - 0x100) >> 16) & 8;\
+ unsigned int K = (((Y <<= N) - 0x1000) >> 16) & 4;\
+ N += K;\
+ N += K = (((Y <<= K) - 0x4000) >> 16) & 2;\
+ K = 14 - N + ((Y <<= K) >> 15);\
+ I = (K << 1) + ((S >> (K + (TREEBIN_SHIFT-1)) & 1));\
+ }\
+}
+#endif /* GNUC */
+
+/* Bit representing maximum resolved size in a treebin at i */
+#define bit_for_tree_index(i) \
+ (i == NTREEBINS-1)? (SIZE_T_BITSIZE-1) : (((i) >> 1) + TREEBIN_SHIFT - 2)
+
+/* Shift placing maximum resolved bit in a treebin at i as sign bit */
+#define leftshift_for_tree_index(i) \
+ ((i == NTREEBINS-1)? 0 : \
+ ((SIZE_T_BITSIZE-SIZE_T_ONE) - (((i) >> 1) + TREEBIN_SHIFT - 2)))
+
+/* The size of the smallest chunk held in bin with index i */
+#define minsize_for_tree_index(i) \
+ ((SIZE_T_ONE << (((i) >> 1) + TREEBIN_SHIFT)) | \
+ (((size_t)((i) & SIZE_T_ONE)) << (((i) >> 1) + TREEBIN_SHIFT - 1)))
+
+
+/* ------------------------ Operations on bin maps ----------------------- */
+
+/* bit corresponding to given index */
+#define idx2bit(i) ((binmap_t)(1) << (i))
+
+/* Mark/Clear bits with given index */
+#define mark_smallmap(M,i) ((M)->smallmap |= idx2bit(i))
+#define clear_smallmap(M,i) ((M)->smallmap &= ~idx2bit(i))
+#define smallmap_is_marked(M,i) ((M)->smallmap & idx2bit(i))
+
+#define mark_treemap(M,i) ((M)->treemap |= idx2bit(i))
+#define clear_treemap(M,i) ((M)->treemap &= ~idx2bit(i))
+#define treemap_is_marked(M,i) ((M)->treemap & idx2bit(i))
+
+/* isolate the least set bit of a bitmap */
+#define least_bit(x) ((x) & -(x))
+
+/* mask with all bits to left of least bit of x on */
+#define left_bits(x) ((x<<1) | -(x<<1))
+
+/* mask with all bits to left of or equal to least bit of x on */
+#define same_or_left_bits(x) ((x) | -(x))
+
+/* index corresponding to given bit. Use x86 asm if possible */
+
+#if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))
+#define compute_bit2idx(X, I)\
+{\
+ unsigned int J;\
+ J = __builtin_ctz(X); \
+ I = (bindex_t)J;\
+}
+
+#elif defined (__INTEL_COMPILER)
+#define compute_bit2idx(X, I)\
+{\
+ unsigned int J;\
+ J = _bit_scan_forward (X); \
+ I = (bindex_t)J;\
+}
+
+#elif defined(_MSC_VER) && _MSC_VER>=1300
+#define compute_bit2idx(X, I)\
+{\
+ unsigned int J;\
+ _BitScanForward((DWORD *) &J, X);\
+ I = (bindex_t)J;\
+}
+
+#elif USE_BUILTIN_FFS
+#define compute_bit2idx(X, I) I = ffs(X)-1
+
+#else
+#define compute_bit2idx(X, I)\
+{\
+ unsigned int Y = X - 1;\
+ unsigned int K = Y >> (16-4) & 16;\
+ unsigned int N = K; Y >>= K;\
+ N += K = Y >> (8-3) & 8; Y >>= K;\
+ N += K = Y >> (4-2) & 4; Y >>= K;\
+ N += K = Y >> (2-1) & 2; Y >>= K;\
+ N += K = Y >> (1-0) & 1; Y >>= K;\
+ I = (bindex_t)(N + Y);\
+}
+#endif /* GNUC */
+
+
+/* ----------------------- Runtime Check Support ------------------------- */
+
+/*
+ For security, the main invariant is that malloc/free/etc never
+ writes to a static address other than malloc_state, unless static
+ malloc_state itself has been corrupted, which cannot occur via
+ malloc (because of these checks). In essence this means that we
+ believe all pointers, sizes, maps etc held in malloc_state, but
+ check all of those linked or offsetted from other embedded data
+ structures. These checks are interspersed with main code in a way
+ that tends to minimize their run-time cost.
+
+ When FOOTERS is defined, in addition to range checking, we also
+ verify footer fields of inuse chunks, which can be used guarantee
+ that the mstate controlling malloc/free is intact. This is a
+ streamlined version of the approach described by William Robertson
+ et al in "Run-time Detection of Heap-based Overflows" LISA'03
+ http://www.usenix.org/events/lisa03/tech/robertson.html The footer
+ of an inuse chunk holds the xor of its mstate and a random seed,
+ that is checked upon calls to free() and realloc(). This is
+ (probabalistically) unguessable from outside the program, but can be
+ computed by any code successfully malloc'ing any chunk, so does not
+ itself provide protection against code that has already broken
+ security through some other means. Unlike Robertson et al, we
+ always dynamically check addresses of all offset chunks (previous,
+ next, etc). This turns out to be cheaper than relying on hashes.
+*/
+
+#if !INSECURE
+/* Check if address a is at least as high as any from MORECORE or MMAP */
+#define ok_address(M, a) ((char*)(a) >= (M)->least_addr)
+/* Check if address of next chunk n is higher than base chunk p */
+#define ok_next(p, n) ((char*)(p) < (char*)(n))
+/* Check if p has inuse status */
+#define ok_inuse(p) is_inuse(p)
+/* Check if p has its pinuse bit on */
+#define ok_pinuse(p) pinuse(p)
+
+#else /* !INSECURE */
+#define ok_address(M, a) (1)
+#define ok_next(b, n) (1)
+#define ok_inuse(p) (1)
+#define ok_pinuse(p) (1)
+#endif /* !INSECURE */
+
+#if (FOOTERS && !INSECURE)
+/* Check if (alleged) mstate m has expected magic field */
+#define ok_magic(M) ((M)->magic == mparams.magic)
+#else /* (FOOTERS && !INSECURE) */
+#define ok_magic(M) (1)
+#endif /* (FOOTERS && !INSECURE) */
+
+/* In gcc, use __builtin_expect to minimize impact of checks */
+#if !INSECURE
+#if defined(__GNUC__) && __GNUC__ >= 3
+#define RTCHECK(e) __builtin_expect(e, 1)
+#else /* GNUC */
+#define RTCHECK(e) (e)
+#endif /* GNUC */
+#else /* !INSECURE */
+#define RTCHECK(e) (1)
+#endif /* !INSECURE */
+
+/* macros to set up inuse chunks with or without footers */
+
+#if !FOOTERS
+
+#define mark_inuse_foot(M,p,s)
+
+/* Macros for setting head/foot of non-mmapped chunks */
+
+/* Set cinuse bit and pinuse bit of next chunk */
+#define set_inuse(M,p,s)\
+ ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
+ ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
+
+/* Set cinuse and pinuse of this chunk and pinuse of next chunk */
+#define set_inuse_and_pinuse(M,p,s)\
+ ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
+ ((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT)
+
+/* Set size, cinuse and pinuse bit of this chunk */
+#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\
+ ((p)->head = (s|PINUSE_BIT|CINUSE_BIT))
+
+#else /* FOOTERS */
+
+/* Set foot of inuse chunk to be xor of mstate and seed */
+#define mark_inuse_foot(M,p,s)\
+ (((mchunkptr)((char*)(p) + (s)))->prev_foot = ((size_t)(M) ^ mparams.magic))
+
+#define get_mstate_for(p)\
+ ((mstate)(((mchunkptr)((char*)(p) +\
+ (chunksize(p))))->prev_foot ^ mparams.magic))
+
+#define set_inuse(M,p,s)\
+ ((p)->head = (((p)->head & PINUSE_BIT)|s|CINUSE_BIT),\
+ (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT), \
+ mark_inuse_foot(M,p,s))
+
+#define set_inuse_and_pinuse(M,p,s)\
+ ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
+ (((mchunkptr)(((char*)(p)) + (s)))->head |= PINUSE_BIT),\
+ mark_inuse_foot(M,p,s))
+
+#define set_size_and_pinuse_of_inuse_chunk(M, p, s)\
+ ((p)->head = (s|PINUSE_BIT|CINUSE_BIT),\
+ mark_inuse_foot(M, p, s))
+
+#endif /* !FOOTERS */
+
+/* ---------------------------- setting mparams -------------------------- */
+
+#if LOCK_AT_FORK
+static void pre_fork(void) { ACQUIRE_LOCK(&(gm)->mutex); }
+static void post_fork_parent(void) { RELEASE_LOCK(&(gm)->mutex); }
+static void post_fork_child(void) { INITIAL_LOCK(&(gm)->mutex); }
+#endif /* LOCK_AT_FORK */
+
+/* Initialize mparams */
+static int init_mparams(void) {
+#ifdef NEED_GLOBAL_LOCK_INIT
+ if (malloc_global_mutex_status <= 0)
+ init_malloc_global_mutex();
+#endif
+
+ ACQUIRE_MALLOC_GLOBAL_LOCK();
+ if (mparams.magic == 0) {
+ size_t magic;
+ size_t psize;
+ size_t gsize;
+
+#ifndef WIN32
+ psize = malloc_getpagesize;
+ gsize = ((DEFAULT_GRANULARITY != 0)? DEFAULT_GRANULARITY : psize);
+#else /* WIN32 */
+ {
+ SYSTEM_INFO system_info;
+ GetSystemInfo(&system_info);
+ psize = system_info.dwPageSize;
+ gsize = ((DEFAULT_GRANULARITY != 0)?
+ DEFAULT_GRANULARITY : system_info.dwAllocationGranularity);
+ }
+#endif /* WIN32 */
+
+ /* Sanity-check configuration:
+ size_t must be unsigned and as wide as pointer type.
+ ints must be at least 4 bytes.
+ alignment must be at least 8.
+ Alignment, min chunk size, and page size must all be powers of 2.
+ */
+ if ((sizeof(size_t) != sizeof(char*)) ||
+ (MAX_SIZE_T < MIN_CHUNK_SIZE) ||
+ (sizeof(int) < 4) ||
+ (MALLOC_ALIGNMENT < (size_t)8U) ||
+ ((MALLOC_ALIGNMENT & (MALLOC_ALIGNMENT-SIZE_T_ONE)) != 0) ||
+ ((MCHUNK_SIZE & (MCHUNK_SIZE-SIZE_T_ONE)) != 0) ||
+ ((gsize & (gsize-SIZE_T_ONE)) != 0) ||
+ ((psize & (psize-SIZE_T_ONE)) != 0))
+ ABORT;
+ mparams.granularity = gsize;
+ mparams.page_size = psize;
+ mparams.mmap_threshold = DEFAULT_MMAP_THRESHOLD;
+ mparams.trim_threshold = DEFAULT_TRIM_THRESHOLD;
+#if MORECORE_CONTIGUOUS
+ mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT;
+#else /* MORECORE_CONTIGUOUS */
+ mparams.default_mflags = USE_LOCK_BIT|USE_MMAP_BIT|USE_NONCONTIGUOUS_BIT;
+#endif /* MORECORE_CONTIGUOUS */
+
+#if !ONLY_MSPACES
+ /* Set up lock for main malloc area */
+ gm->mflags = mparams.default_mflags;
+ (void)INITIAL_LOCK(&gm->mutex);
+#endif
+#if LOCK_AT_FORK
+ pthread_atfork(&pre_fork, &post_fork_parent, &post_fork_child);
+#endif
+
+ {
+#if USE_DEV_RANDOM
+ int fd;
+ unsigned char buf[sizeof(size_t)];
+ /* Try to use /dev/urandom, else fall back on using time */
+ if ((fd = open("/dev/urandom", O_RDONLY)) >= 0 &&
+ read(fd, buf, sizeof(buf)) == sizeof(buf)) {
+ magic = *((size_t *) buf);
+ close(fd);
+ }
+ else
+#endif /* USE_DEV_RANDOM */
+#ifdef WIN32
+ magic = (size_t)(GetTickCount() ^ (size_t)0x55555555U);
+#elif defined(LACKS_TIME_H)
+ magic = (size_t)&magic ^ (size_t)0x55555555U;
+#else
+ magic = (size_t)(time(0) ^ (size_t)0x55555555U);
+#endif
+ magic |= (size_t)8U; /* ensure nonzero */
+ magic &= ~(size_t)7U; /* improve chances of fault for bad values */
+ /* Until memory modes commonly available, use volatile-write */
+ (*(volatile size_t *)(&(mparams.magic))) = magic;
+ }
+ }
+
+ RELEASE_MALLOC_GLOBAL_LOCK();
+ return 1;
+}
+
+/* support for mallopt */
+static int change_mparam(int param_number, int value) {
+ size_t val;
+ ensure_initialization();
+ val = (value == -1)? MAX_SIZE_T : (size_t)value;
+ switch(param_number) {
+ case M_TRIM_THRESHOLD:
+ mparams.trim_threshold = val;
+ return 1;
+ case M_GRANULARITY:
+ if (val >= mparams.page_size && ((val & (val-1)) == 0)) {
+ mparams.granularity = val;
+ return 1;
+ }
+ else
+ return 0;
+ case M_MMAP_THRESHOLD:
+ mparams.mmap_threshold = val;
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+#if DEBUG
+/* ------------------------- Debugging Support --------------------------- */
+
+/* Check properties of any chunk, whether free, inuse, mmapped etc */
+static void do_check_any_chunk(mstate m, mchunkptr p) {
+ assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
+ assert(ok_address(m, p));
+}
+
+/* Check properties of top chunk */
+static void do_check_top_chunk(mstate m, mchunkptr p) {
+ msegmentptr sp = segment_holding(m, (char*)p);
+ size_t sz = p->head & ~INUSE_BITS; /* third-lowest bit can be set! */
+ assert(sp != 0);
+ assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
+ assert(ok_address(m, p));
+ assert(sz == m->topsize);
+ assert(sz > 0);
+ assert(sz == ((sp->base + sp->size) - (char*)p) - TOP_FOOT_SIZE);
+ assert(pinuse(p));
+ assert(!pinuse(chunk_plus_offset(p, sz)));
+}
+
+/* Check properties of (inuse) mmapped chunks */
+static void do_check_mmapped_chunk(mstate m, mchunkptr p) {
+ size_t sz = chunksize(p);
+ size_t len = (sz + (p->prev_foot) + MMAP_FOOT_PAD);
+ assert(is_mmapped(p));
+ assert(use_mmap(m));
+ assert((is_aligned(chunk2mem(p))) || (p->head == FENCEPOST_HEAD));
+ assert(ok_address(m, p));
+ assert(!is_small(sz));
+ assert((len & (mparams.page_size-SIZE_T_ONE)) == 0);
+ assert(chunk_plus_offset(p, sz)->head == FENCEPOST_HEAD);
+ assert(chunk_plus_offset(p, sz+SIZE_T_SIZE)->head == 0);
+}
+
+/* Check properties of inuse chunks */
+static void do_check_inuse_chunk(mstate m, mchunkptr p) {
+ do_check_any_chunk(m, p);
+ assert(is_inuse(p));
+ assert(next_pinuse(p));
+ /* If not pinuse and not mmapped, previous chunk has OK offset */
+ assert(is_mmapped(p) || pinuse(p) || next_chunk(prev_chunk(p)) == p);
+ if (is_mmapped(p))
+ do_check_mmapped_chunk(m, p);
+}
+
+/* Check properties of free chunks */
+static void do_check_free_chunk(mstate m, mchunkptr p) {
+ size_t sz = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, sz);
+ do_check_any_chunk(m, p);
+ assert(!is_inuse(p));
+ assert(!next_pinuse(p));
+ assert (!is_mmapped(p));
+ if (p != m->dv && p != m->top) {
+ if (sz >= MIN_CHUNK_SIZE) {
+ assert((sz & CHUNK_ALIGN_MASK) == 0);
+ assert(is_aligned(chunk2mem(p)));
+ assert(next->prev_foot == sz);
+ assert(pinuse(p));
+ assert (next == m->top || is_inuse(next));
+ assert(p->fd->bk == p);
+ assert(p->bk->fd == p);
+ }
+ else /* markers are always of size SIZE_T_SIZE */
+ assert(sz == SIZE_T_SIZE);
+ }
+}
+
+/* Check properties of malloced chunks at the point they are malloced */
+static void do_check_malloced_chunk(mstate m, void* mem, size_t s) {
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+ size_t sz = p->head & ~INUSE_BITS;
+ do_check_inuse_chunk(m, p);
+ assert((sz & CHUNK_ALIGN_MASK) == 0);
+ assert(sz >= MIN_CHUNK_SIZE);
+ assert(sz >= s);
+ /* unless mmapped, size is less than MIN_CHUNK_SIZE more than request */
+ assert(is_mmapped(p) || sz < (s + MIN_CHUNK_SIZE));
+ }
+}
+
+/* Check a tree and its subtrees. */
+static void do_check_tree(mstate m, tchunkptr t) {
+ tchunkptr head = 0;
+ tchunkptr u = t;
+ bindex_t tindex = t->index;
+ size_t tsize = chunksize(t);
+ bindex_t idx;
+ compute_tree_index(tsize, idx);
+ assert(tindex == idx);
+ assert(tsize >= MIN_LARGE_SIZE);
+ assert(tsize >= minsize_for_tree_index(idx));
+ assert((idx == NTREEBINS-1) || (tsize < minsize_for_tree_index((idx+1))));
+
+ do { /* traverse through chain of same-sized nodes */
+ do_check_any_chunk(m, ((mchunkptr)u));
+ assert(u->index == tindex);
+ assert(chunksize(u) == tsize);
+ assert(!is_inuse(u));
+ assert(!next_pinuse(u));
+ assert(u->fd->bk == u);
+ assert(u->bk->fd == u);
+ if (u->parent == 0) {
+ assert(u->child[0] == 0);
+ assert(u->child[1] == 0);
+ }
+ else {
+ assert(head == 0); /* only one node on chain has parent */
+ head = u;
+ assert(u->parent != u);
+ assert (u->parent->child[0] == u ||
+ u->parent->child[1] == u ||
+ *((tbinptr*)(u->parent)) == u);
+ if (u->child[0] != 0) {
+ assert(u->child[0]->parent == u);
+ assert(u->child[0] != u);
+ do_check_tree(m, u->child[0]);
+ }
+ if (u->child[1] != 0) {
+ assert(u->child[1]->parent == u);
+ assert(u->child[1] != u);
+ do_check_tree(m, u->child[1]);
+ }
+ if (u->child[0] != 0 && u->child[1] != 0) {
+ assert(chunksize(u->child[0]) < chunksize(u->child[1]));
+ }
+ }
+ u = u->fd;
+ } while (u != t);
+ assert(head != 0);
+}
+
+/* Check all the chunks in a treebin. */
+static void do_check_treebin(mstate m, bindex_t i) {
+ tbinptr* tb = treebin_at(m, i);
+ tchunkptr t = *tb;
+ int empty = (m->treemap & (1U << i)) == 0;
+ if (t == 0)
+ assert(empty);
+ if (!empty)
+ do_check_tree(m, t);
+}
+
+/* Check all the chunks in a smallbin. */
+static void do_check_smallbin(mstate m, bindex_t i) {
+ sbinptr b = smallbin_at(m, i);
+ mchunkptr p = b->bk;
+ unsigned int empty = (m->smallmap & (1U << i)) == 0;
+ if (p == b)
+ assert(empty);
+ if (!empty) {
+ for (; p != b; p = p->bk) {
+ size_t size = chunksize(p);
+ mchunkptr q;
+ /* each chunk claims to be free */
+ do_check_free_chunk(m, p);
+ /* chunk belongs in bin */
+ assert(small_index(size) == i);
+ assert(p->bk == b || chunksize(p->bk) == chunksize(p));
+ /* chunk is followed by an inuse chunk */
+ q = next_chunk(p);
+ if (q->head != FENCEPOST_HEAD)
+ do_check_inuse_chunk(m, q);
+ }
+ }
+}
+
+/* Find x in a bin. Used in other check functions. */
+static int bin_find(mstate m, mchunkptr x) {
+ size_t size = chunksize(x);
+ if (is_small(size)) {
+ bindex_t sidx = small_index(size);
+ sbinptr b = smallbin_at(m, sidx);
+ if (smallmap_is_marked(m, sidx)) {
+ mchunkptr p = b;
+ do {
+ if (p == x)
+ return 1;
+ } while ((p = p->fd) != b);
+ }
+ }
+ else {
+ bindex_t tidx;
+ compute_tree_index(size, tidx);
+ if (treemap_is_marked(m, tidx)) {
+ tchunkptr t = *treebin_at(m, tidx);
+ size_t sizebits = size << leftshift_for_tree_index(tidx);
+ while (t != 0 && chunksize(t) != size) {
+ t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
+ sizebits <<= 1;
+ }
+ if (t != 0) {
+ tchunkptr u = t;
+ do {
+ if (u == (tchunkptr)x)
+ return 1;
+ } while ((u = u->fd) != t);
+ }
+ }
+ }
+ return 0;
+}
+
+/* Traverse each chunk and check it; return total */
+static size_t traverse_and_check(mstate m) {
+ size_t sum = 0;
+ if (is_initialized(m)) {
+ msegmentptr s = &m->seg;
+ sum += m->topsize + TOP_FOOT_SIZE;
+ while (s != 0) {
+ mchunkptr q = align_as_chunk(s->base);
+ mchunkptr lastq = 0;
+ assert(pinuse(q));
+ while (segment_holds(s, q) &&
+ q != m->top && q->head != FENCEPOST_HEAD) {
+ sum += chunksize(q);
+ if (is_inuse(q)) {
+ assert(!bin_find(m, q));
+ do_check_inuse_chunk(m, q);
+ }
+ else {
+ assert(q == m->dv || bin_find(m, q));
+ assert(lastq == 0 || is_inuse(lastq)); /* Not 2 consecutive free */
+ do_check_free_chunk(m, q);
+ }
+ lastq = q;
+ q = next_chunk(q);
+ }
+ s = s->next;
+ }
+ }
+ return sum;
+}
+
+
+/* Check all properties of malloc_state. */
+static void do_check_malloc_state(mstate m) {
+ bindex_t i;
+ size_t total;
+ /* check bins */
+ for (i = 0; i < NSMALLBINS; ++i)
+ do_check_smallbin(m, i);
+ for (i = 0; i < NTREEBINS; ++i)
+ do_check_treebin(m, i);
+
+ if (m->dvsize != 0) { /* check dv chunk */
+ do_check_any_chunk(m, m->dv);
+ assert(m->dvsize == chunksize(m->dv));
+ assert(m->dvsize >= MIN_CHUNK_SIZE);
+ assert(bin_find(m, m->dv) == 0);
+ }
+
+ if (m->top != 0) { /* check top chunk */
+ do_check_top_chunk(m, m->top);
+ /*assert(m->topsize == chunksize(m->top)); redundant */
+ assert(m->topsize > 0);
+ assert(bin_find(m, m->top) == 0);
+ }
+
+ total = traverse_and_check(m);
+ assert(total <= m->footprint);
+ assert(m->footprint <= m->max_footprint);
+}
+#endif /* DEBUG */
+
+/* ----------------------------- statistics ------------------------------ */
+
+#if !NO_MALLINFO
+static struct mallinfo internal_mallinfo(mstate m) {
+ struct mallinfo nm = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+ ensure_initialization();
+ if (!PREACTION(m)) {
+ check_malloc_state(m);
+ if (is_initialized(m)) {
+ size_t nfree = SIZE_T_ONE; /* top always free */
+ size_t mfree = m->topsize + TOP_FOOT_SIZE;
+ size_t sum = mfree;
+ msegmentptr s = &m->seg;
+ while (s != 0) {
+ mchunkptr q = align_as_chunk(s->base);
+ while (segment_holds(s, q) &&
+ q != m->top && q->head != FENCEPOST_HEAD) {
+ size_t sz = chunksize(q);
+ sum += sz;
+ if (!is_inuse(q)) {
+ mfree += sz;
+ ++nfree;
+ }
+ q = next_chunk(q);
+ }
+ s = s->next;
+ }
+
+ nm.arena = sum;
+ nm.ordblks = nfree;
+ nm.hblkhd = m->footprint - sum;
+ nm.usmblks = m->max_footprint;
+ nm.uordblks = m->footprint - mfree;
+ nm.fordblks = mfree;
+ nm.keepcost = m->topsize;
+ }
+
+ POSTACTION(m);
+ }
+ return nm;
+}
+#endif /* !NO_MALLINFO */
+
+#if !NO_MALLOC_STATS
+static void internal_malloc_stats(mstate m) {
+ ensure_initialization();
+ if (!PREACTION(m)) {
+ size_t maxfp = 0;
+ size_t fp = 0;
+ size_t used = 0;
+ check_malloc_state(m);
+ if (is_initialized(m)) {
+ msegmentptr s = &m->seg;
+ maxfp = m->max_footprint;
+ fp = m->footprint;
+ used = fp - (m->topsize + TOP_FOOT_SIZE);
+
+ while (s != 0) {
+ mchunkptr q = align_as_chunk(s->base);
+ while (segment_holds(s, q) &&
+ q != m->top && q->head != FENCEPOST_HEAD) {
+ if (!is_inuse(q))
+ used -= chunksize(q);
+ q = next_chunk(q);
+ }
+ s = s->next;
+ }
+ }
+ POSTACTION(m); /* drop lock */
+ fprintf(stderr, "max system bytes = %10lu\n", (unsigned long)(maxfp));
+ fprintf(stderr, "system bytes = %10lu\n", (unsigned long)(fp));
+ fprintf(stderr, "in use bytes = %10lu\n", (unsigned long)(used));
+ }
+}
+#endif /* NO_MALLOC_STATS */
+
+/* ----------------------- Operations on smallbins ----------------------- */
+
+/*
+ Various forms of linking and unlinking are defined as macros. Even
+ the ones for trees, which are very long but have very short typical
+ paths. This is ugly but reduces reliance on inlining support of
+ compilers.
+*/
+
+/* Link a free chunk into a smallbin */
+#define insert_small_chunk(M, P, S) {\
+ bindex_t I = small_index(S);\
+ mchunkptr B = smallbin_at(M, I);\
+ mchunkptr F = B;\
+ assert(S >= MIN_CHUNK_SIZE);\
+ if (!smallmap_is_marked(M, I))\
+ mark_smallmap(M, I);\
+ else if (RTCHECK(ok_address(M, B->fd)))\
+ F = B->fd;\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+ B->fd = P;\
+ F->bk = P;\
+ P->fd = F;\
+ P->bk = B;\
+}
+
+/* Unlink a chunk from a smallbin */
+#define unlink_small_chunk(M, P, S) {\
+ mchunkptr F = P->fd;\
+ mchunkptr B = P->bk;\
+ bindex_t I = small_index(S);\
+ assert(P != B);\
+ assert(P != F);\
+ assert(chunksize(P) == small_index2size(I));\
+ if (RTCHECK(F == smallbin_at(M,I) || (ok_address(M, F) && F->bk == P))) { \
+ if (B == F) {\
+ clear_smallmap(M, I);\
+ }\
+ else if (RTCHECK(B == smallbin_at(M,I) ||\
+ (ok_address(M, B) && B->fd == P))) {\
+ F->bk = B;\
+ B->fd = F;\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+}
+
+/* Unlink the first chunk from a smallbin */
+#define unlink_first_small_chunk(M, B, P, I) {\
+ mchunkptr F = P->fd;\
+ assert(P != B);\
+ assert(P != F);\
+ assert(chunksize(P) == small_index2size(I));\
+ if (B == F) {\
+ clear_smallmap(M, I);\
+ }\
+ else if (RTCHECK(ok_address(M, F) && F->bk == P)) {\
+ F->bk = B;\
+ B->fd = F;\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+}
+
+/* Replace dv node, binning the old one */
+/* Used only when dvsize known to be small */
+#define replace_dv(M, P, S) {\
+ size_t DVS = M->dvsize;\
+ assert(is_small(DVS));\
+ if (DVS != 0) {\
+ mchunkptr DV = M->dv;\
+ insert_small_chunk(M, DV, DVS);\
+ }\
+ M->dvsize = S;\
+ M->dv = P;\
+}
+
+/* ------------------------- Operations on trees ------------------------- */
+
+/* Insert chunk into tree */
+#define insert_large_chunk(M, X, S) {\
+ tbinptr* H;\
+ bindex_t I;\
+ compute_tree_index(S, I);\
+ H = treebin_at(M, I);\
+ X->index = I;\
+ X->child[0] = X->child[1] = 0;\
+ if (!treemap_is_marked(M, I)) {\
+ mark_treemap(M, I);\
+ *H = X;\
+ X->parent = (tchunkptr)H;\
+ X->fd = X->bk = X;\
+ }\
+ else {\
+ tchunkptr T = *H;\
+ size_t K = S << leftshift_for_tree_index(I);\
+ for (;;) {\
+ if (chunksize(T) != S) {\
+ tchunkptr* C = &(T->child[(K >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1]);\
+ K <<= 1;\
+ if (*C != 0)\
+ T = *C;\
+ else if (RTCHECK(ok_address(M, C))) {\
+ *C = X;\
+ X->parent = T;\
+ X->fd = X->bk = X;\
+ break;\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ break;\
+ }\
+ }\
+ else {\
+ tchunkptr F = T->fd;\
+ if (RTCHECK(ok_address(M, T) && ok_address(M, F))) {\
+ T->fd = F->bk = X;\
+ X->fd = F;\
+ X->bk = T;\
+ X->parent = 0;\
+ break;\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ break;\
+ }\
+ }\
+ }\
+ }\
+}
+
+/*
+ Unlink steps:
+
+ 1. If x is a chained node, unlink it from its same-sized fd/bk links
+ and choose its bk node as its replacement.
+ 2. If x was the last node of its size, but not a leaf node, it must
+ be replaced with a leaf node (not merely one with an open left or
+ right), to make sure that lefts and rights of descendents
+ correspond properly to bit masks. We use the rightmost descendent
+ of x. We could use any other leaf, but this is easy to locate and
+ tends to counteract removal of leftmosts elsewhere, and so keeps
+ paths shorter than minimally guaranteed. This doesn't loop much
+ because on average a node in a tree is near the bottom.
+ 3. If x is the base of a chain (i.e., has parent links) relink
+ x's parent and children to x's replacement (or null if none).
+*/
+
+#define unlink_large_chunk(M, X) {\
+ tchunkptr XP = X->parent;\
+ tchunkptr R;\
+ if (X->bk != X) {\
+ tchunkptr F = X->fd;\
+ R = X->bk;\
+ if (RTCHECK(ok_address(M, F) && F->bk == X && R->fd == X)) {\
+ F->bk = R;\
+ R->fd = F;\
+ }\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+ }\
+ else {\
+ tchunkptr* RP;\
+ if (((R = *(RP = &(X->child[1]))) != 0) ||\
+ ((R = *(RP = &(X->child[0]))) != 0)) {\
+ tchunkptr* CP;\
+ while ((*(CP = &(R->child[1])) != 0) ||\
+ (*(CP = &(R->child[0])) != 0)) {\
+ R = *(RP = CP);\
+ }\
+ if (RTCHECK(ok_address(M, RP)))\
+ *RP = 0;\
+ else {\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+ }\
+ }\
+ if (XP != 0) {\
+ tbinptr* H = treebin_at(M, X->index);\
+ if (X == *H) {\
+ if ((*H = R) == 0) \
+ clear_treemap(M, X->index);\
+ }\
+ else if (RTCHECK(ok_address(M, XP))) {\
+ if (XP->child[0] == X) \
+ XP->child[0] = R;\
+ else \
+ XP->child[1] = R;\
+ }\
+ else\
+ CORRUPTION_ERROR_ACTION(M);\
+ if (R != 0) {\
+ if (RTCHECK(ok_address(M, R))) {\
+ tchunkptr C0, C1;\
+ R->parent = XP;\
+ if ((C0 = X->child[0]) != 0) {\
+ if (RTCHECK(ok_address(M, C0))) {\
+ R->child[0] = C0;\
+ C0->parent = R;\
+ }\
+ else\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+ if ((C1 = X->child[1]) != 0) {\
+ if (RTCHECK(ok_address(M, C1))) {\
+ R->child[1] = C1;\
+ C1->parent = R;\
+ }\
+ else\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+ }\
+ else\
+ CORRUPTION_ERROR_ACTION(M);\
+ }\
+ }\
+}
+
+/* Relays to large vs small bin operations */
+
+#define insert_chunk(M, P, S)\
+ if (is_small(S)) insert_small_chunk(M, P, S)\
+ else { tchunkptr TP = (tchunkptr)(P); insert_large_chunk(M, TP, S); }
+
+#define unlink_chunk(M, P, S)\
+ if (is_small(S)) unlink_small_chunk(M, P, S)\
+ else { tchunkptr TP = (tchunkptr)(P); unlink_large_chunk(M, TP); }
+
+
+/* Relays to internal calls to malloc/free from realloc, memalign etc */
+
+#if ONLY_MSPACES
+#define internal_malloc(m, b) mspace_malloc(m, b)
+#define internal_free(m, mem) mspace_free(m,mem);
+#else /* ONLY_MSPACES */
+#if MSPACES
+#define internal_malloc(m, b)\
+ ((m == gm)? dlmalloc(b) : mspace_malloc(m, b))
+#define internal_free(m, mem)\
+ if (m == gm) dlfree(mem); else mspace_free(m,mem);
+#else /* MSPACES */
+#define internal_malloc(m, b) dlmalloc(b)
+#define internal_free(m, mem) dlfree(mem)
+#endif /* MSPACES */
+#endif /* ONLY_MSPACES */
+
+/* ----------------------- Direct-mmapping chunks ----------------------- */
+
+/*
+ Directly mmapped chunks are set up with an offset to the start of
+ the mmapped region stored in the prev_foot field of the chunk. This
+ allows reconstruction of the required argument to MUNMAP when freed,
+ and also allows adjustment of the returned chunk to meet alignment
+ requirements (especially in memalign).
+*/
+
+/* Malloc using mmap */
+static void* mmap_alloc(mstate m, size_t nb) {
+ size_t mmsize = mmap_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
+ if (m->footprint_limit != 0) {
+ size_t fp = m->footprint + mmsize;
+ if (fp <= m->footprint || fp > m->footprint_limit)
+ return 0;
+ }
+ if (mmsize > nb) { /* Check for wrap around 0 */
+ char* mm = (char*)(CALL_DIRECT_MMAP(mmsize));
+ if (mm != CMFAIL) {
+ size_t offset = align_offset(chunk2mem(mm));
+ size_t psize = mmsize - offset - MMAP_FOOT_PAD;
+ mchunkptr p = (mchunkptr)(mm + offset);
+ p->prev_foot = offset;
+ p->head = psize;
+ mark_inuse_foot(m, p, psize);
+ chunk_plus_offset(p, psize)->head = FENCEPOST_HEAD;
+ chunk_plus_offset(p, psize+SIZE_T_SIZE)->head = 0;
+
+ if (m->least_addr == 0 || mm < m->least_addr)
+ m->least_addr = mm;
+ if ((m->footprint += mmsize) > m->max_footprint)
+ m->max_footprint = m->footprint;
+ assert(is_aligned(chunk2mem(p)));
+ check_mmapped_chunk(m, p);
+ return chunk2mem(p);
+ }
+ }
+ return 0;
+}
+
+/* Realloc using mmap */
+static mchunkptr mmap_resize(mstate m, mchunkptr oldp, size_t nb, int flags) {
+ size_t oldsize = chunksize(oldp);
+ (void)flags; /* placate people compiling -Wunused */
+ if (is_small(nb)) /* Can't shrink mmap regions below small size */
+ return 0;
+ /* Keep old chunk if big enough but not too big */
+ if (oldsize >= nb + SIZE_T_SIZE &&
+ (oldsize - nb) <= (mparams.granularity << 1))
+ return oldp;
+ else {
+ size_t offset = oldp->prev_foot;
+ size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD;
+ size_t newmmsize = mmap_align(nb + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
+ char* cp = (char*)CALL_MREMAP((char*)oldp - offset,
+ oldmmsize, newmmsize, flags);
+ if (cp != CMFAIL) {
+ mchunkptr newp = (mchunkptr)(cp + offset);
+ size_t psize = newmmsize - offset - MMAP_FOOT_PAD;
+ newp->head = psize;
+ mark_inuse_foot(m, newp, psize);
+ chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD;
+ chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0;
+
+ if (cp < m->least_addr)
+ m->least_addr = cp;
+ if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint)
+ m->max_footprint = m->footprint;
+ check_mmapped_chunk(m, newp);
+ return newp;
+ }
+ }
+ return 0;
+}
+
+
+/* -------------------------- mspace management -------------------------- */
+
+/* Initialize top chunk and its size */
+static void init_top(mstate m, mchunkptr p, size_t psize) {
+ /* Ensure alignment */
+ size_t offset = align_offset(chunk2mem(p));
+ p = (mchunkptr)((char*)p + offset);
+ psize -= offset;
+
+ m->top = p;
+ m->topsize = psize;
+ p->head = psize | PINUSE_BIT;
+ /* set size of fake trailing chunk holding overhead space only once */
+ chunk_plus_offset(p, psize)->head = TOP_FOOT_SIZE;
+ m->trim_check = mparams.trim_threshold; /* reset on each update */
+}
+
+/* Initialize bins for a new mstate that is otherwise zeroed out */
+static void init_bins(mstate m) {
+ /* Establish circular links for smallbins */
+ bindex_t i;
+ for (i = 0; i < NSMALLBINS; ++i) {
+ sbinptr bin = smallbin_at(m,i);
+ bin->fd = bin->bk = bin;
+ }
+}
+
+#if PROCEED_ON_ERROR
+
+/* default corruption action */
+static void reset_on_error(mstate m) {
+ int i;
+ ++malloc_corruption_error_count;
+ /* Reinitialize fields to forget about all memory */
+ m->smallmap = m->treemap = 0;
+ m->dvsize = m->topsize = 0;
+ m->seg.base = 0;
+ m->seg.size = 0;
+ m->seg.next = 0;
+ m->top = m->dv = 0;
+ for (i = 0; i < NTREEBINS; ++i)
+ *treebin_at(m, i) = 0;
+ init_bins(m);
+}
+#endif /* PROCEED_ON_ERROR */
+
+/* Allocate chunk and prepend remainder with chunk in successor base. */
+static void* prepend_alloc(mstate m, char* newbase, char* oldbase,
+ size_t nb) {
+ mchunkptr p = align_as_chunk(newbase);
+ mchunkptr oldfirst = align_as_chunk(oldbase);
+ size_t psize = (char*)oldfirst - (char*)p;
+ mchunkptr q = chunk_plus_offset(p, nb);
+ size_t qsize = psize - nb;
+ set_size_and_pinuse_of_inuse_chunk(m, p, nb);
+
+ assert((char*)oldfirst > (char*)q);
+ assert(pinuse(oldfirst));
+ assert(qsize >= MIN_CHUNK_SIZE);
+
+ /* consolidate remainder with first chunk of old base */
+ if (oldfirst == m->top) {
+ size_t tsize = m->topsize += qsize;
+ m->top = q;
+ q->head = tsize | PINUSE_BIT;
+ check_top_chunk(m, q);
+ }
+ else if (oldfirst == m->dv) {
+ size_t dsize = m->dvsize += qsize;
+ m->dv = q;
+ set_size_and_pinuse_of_free_chunk(q, dsize);
+ }
+ else {
+ if (!is_inuse(oldfirst)) {
+ size_t nsize = chunksize(oldfirst);
+ unlink_chunk(m, oldfirst, nsize);
+ oldfirst = chunk_plus_offset(oldfirst, nsize);
+ qsize += nsize;
+ }
+ set_free_with_pinuse(q, qsize, oldfirst);
+ insert_chunk(m, q, qsize);
+ check_free_chunk(m, q);
+ }
+
+ check_malloced_chunk(m, chunk2mem(p), nb);
+ return chunk2mem(p);
+}
+
+/* Add a segment to hold a new noncontiguous region */
+static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
+ /* Determine locations and sizes of segment, fenceposts, old top */
+ char* old_top = (char*)m->top;
+ msegmentptr oldsp = segment_holding(m, old_top);
+ char* old_end = oldsp->base + oldsp->size;
+ size_t ssize = pad_request(sizeof(struct malloc_segment));
+ char* rawsp = old_end - (ssize + FOUR_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
+ size_t offset = align_offset(chunk2mem(rawsp));
+ char* asp = rawsp + offset;
+ char* csp = (asp < (old_top + MIN_CHUNK_SIZE))? old_top : asp;
+ mchunkptr sp = (mchunkptr)csp;
+ msegmentptr ss = (msegmentptr)(chunk2mem(sp));
+ mchunkptr tnext = chunk_plus_offset(sp, ssize);
+ mchunkptr p = tnext;
+ int nfences = 0;
+
+ /* reset top to new space */
+ init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
+
+ /* Set up segment record */
+ assert(is_aligned(ss));
+ set_size_and_pinuse_of_inuse_chunk(m, sp, ssize);
+ *ss = m->seg; /* Push current record */
+ m->seg.base = tbase;
+ m->seg.size = tsize;
+ m->seg.sflags = mmapped;
+ m->seg.next = ss;
+
+ /* Insert trailing fenceposts */
+ for (;;) {
+ mchunkptr nextp = chunk_plus_offset(p, SIZE_T_SIZE);
+ p->head = FENCEPOST_HEAD;
+ ++nfences;
+ if ((char*)(&(nextp->head)) < old_end)
+ p = nextp;
+ else
+ break;
+ }
+ assert(nfences >= 2);
+
+ /* Insert the rest of old top into a bin as an ordinary free chunk */
+ if (csp != old_top) {
+ mchunkptr q = (mchunkptr)old_top;
+ size_t psize = csp - old_top;
+ mchunkptr tn = chunk_plus_offset(q, psize);
+ set_free_with_pinuse(q, psize, tn);
+ insert_chunk(m, q, psize);
+ }
+
+ check_top_chunk(m, m->top);
+}
+
+/* -------------------------- System allocation -------------------------- */
+
+/* Get memory from system using MORECORE or MMAP */
+static void* sys_alloc(mstate m, size_t nb) {
+ char* tbase = CMFAIL;
+ size_t tsize = 0;
+ flag_t mmap_flag = 0;
+ size_t asize; /* allocation size */
+
+ ensure_initialization();
+
+ /* Directly map large chunks, but only if already initialized */
+ if (use_mmap(m) && nb >= mparams.mmap_threshold && m->topsize != 0) {
+ void* mem = mmap_alloc(m, nb);
+ if (mem != 0)
+ return mem;
+ }
+
+ asize = granularity_align(nb + SYS_ALLOC_PADDING);
+ if (asize <= nb)
+ return 0; /* wraparound */
+ if (m->footprint_limit != 0) {
+ size_t fp = m->footprint + asize;
+ if (fp <= m->footprint || fp > m->footprint_limit)
+ return 0;
+ }
+
+ /*
+ Try getting memory in any of three ways (in most-preferred to
+ least-preferred order):
+ 1. A call to MORECORE that can normally contiguously extend memory.
+ (disabled if not MORECORE_CONTIGUOUS or not HAVE_MORECORE or
+ or main space is mmapped or a previous contiguous call failed)
+ 2. A call to MMAP new space (disabled if not HAVE_MMAP).
+ Note that under the default settings, if MORECORE is unable to
+ fulfill a request, and HAVE_MMAP is true, then mmap is
+ used as a noncontiguous system allocator. This is a useful backup
+ strategy for systems with holes in address spaces -- in this case
+ sbrk cannot contiguously expand the heap, but mmap may be able to
+ find space.
+ 3. A call to MORECORE that cannot usually contiguously extend memory.
+ (disabled if not HAVE_MORECORE)
+
+ In all cases, we need to request enough bytes from system to ensure
+ we can malloc nb bytes upon success, so pad with enough space for
+ top_foot, plus alignment-pad to make sure we don't lose bytes if
+ not on boundary, and round this up to a granularity unit.
+ */
+
+ if (MORECORE_CONTIGUOUS && !use_noncontiguous(m)) {
+ char* br = CMFAIL;
+ size_t ssize = asize; /* sbrk call size */
+ msegmentptr ss = (m->top == 0)? 0 : segment_holding(m, (char*)m->top);
+ ACQUIRE_MALLOC_GLOBAL_LOCK();
+
+ if (ss == 0) { /* First time through or recovery */
+ char* base = (char*)CALL_MORECORE(0);
+ if (base != CMFAIL) {
+ size_t fp;
+ /* Adjust to end on a page boundary */
+ if (!is_page_aligned(base))
+ ssize += (page_align((size_t)base) - (size_t)base);
+ fp = m->footprint + ssize; /* recheck limits */
+ if (ssize > nb && ssize < HALF_MAX_SIZE_T &&
+ (m->footprint_limit == 0 ||
+ (fp > m->footprint && fp <= m->footprint_limit)) &&
+ (br = (char*)(CALL_MORECORE(ssize))) == base) {
+ tbase = base;
+ tsize = ssize;
+ }
+ }
+ }
+ else {
+ /* Subtract out existing available top space from MORECORE request. */
+ ssize = granularity_align(nb - m->topsize + SYS_ALLOC_PADDING);
+ /* Use mem here only if it did continuously extend old space */
+ if (ssize < HALF_MAX_SIZE_T &&
+ (br = (char*)(CALL_MORECORE(ssize))) == ss->base+ss->size) {
+ tbase = br;
+ tsize = ssize;
+ }
+ }
+
+ if (tbase == CMFAIL) { /* Cope with partial failure */
+ if (br != CMFAIL) { /* Try to use/extend the space we did get */
+ if (ssize < HALF_MAX_SIZE_T &&
+ ssize < nb + SYS_ALLOC_PADDING) {
+ size_t esize = granularity_align(nb + SYS_ALLOC_PADDING - ssize);
+ if (esize < HALF_MAX_SIZE_T) {
+ char* end = (char*)CALL_MORECORE(esize);
+ if (end != CMFAIL)
+ ssize += esize;
+ else { /* Can't use; try to release */
+ (void) CALL_MORECORE(-ssize);
+ br = CMFAIL;
+ }
+ }
+ }
+ }
+ if (br != CMFAIL) { /* Use the space we did get */
+ tbase = br;
+ tsize = ssize;
+ }
+ else
+ disable_contiguous(m); /* Don't try contiguous path in the future */
+ }
+
+ RELEASE_MALLOC_GLOBAL_LOCK();
+ }
+
+ if (HAVE_MMAP && tbase == CMFAIL) { /* Try MMAP */
+ char* mp = (char*)(CALL_MMAP(asize));
+ if (mp != CMFAIL) {
+ tbase = mp;
+ tsize = asize;
+ mmap_flag = USE_MMAP_BIT;
+ }
+ }
+
+ if (HAVE_MORECORE && tbase == CMFAIL) { /* Try noncontiguous MORECORE */
+ if (asize < HALF_MAX_SIZE_T) {
+ char* br = CMFAIL;
+ char* end = CMFAIL;
+ ACQUIRE_MALLOC_GLOBAL_LOCK();
+ br = (char*)(CALL_MORECORE(asize));
+ end = (char*)(CALL_MORECORE(0));
+ RELEASE_MALLOC_GLOBAL_LOCK();
+ if (br != CMFAIL && end != CMFAIL && br < end) {
+ size_t ssize = end - br;
+ if (ssize > nb + TOP_FOOT_SIZE) {
+ tbase = br;
+ tsize = ssize;
+ }
+ }
+ }
+ }
+
+ if (tbase != CMFAIL) {
+
+ if ((m->footprint += tsize) > m->max_footprint)
+ m->max_footprint = m->footprint;
+
+ if (!is_initialized(m)) { /* first-time initialization */
+ if (m->least_addr == 0 || tbase < m->least_addr)
+ m->least_addr = tbase;
+ m->seg.base = tbase;
+ m->seg.size = tsize;
+ m->seg.sflags = mmap_flag;
+ m->magic = mparams.magic;
+ m->release_checks = MAX_RELEASE_CHECK_RATE;
+ init_bins(m);
+#if !ONLY_MSPACES
+ if (is_global(m))
+ init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);
+ else
+#endif
+ {
+ /* Offset top by embedded malloc_state */
+ mchunkptr mn = next_chunk(mem2chunk(m));
+ init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) -TOP_FOOT_SIZE);
+ }
+ }
+
+ else {
+ /* Try to merge with an existing segment */
+ msegmentptr sp = &m->seg;
+ /* Only consider most recent segment if traversal suppressed */
+ while (sp != 0 && tbase != sp->base + sp->size)
+ sp = (NO_SEGMENT_TRAVERSAL) ? 0 : sp->next;
+ if (sp != 0 &&
+ !is_extern_segment(sp) &&
+ (sp->sflags & USE_MMAP_BIT) == mmap_flag &&
+ segment_holds(sp, m->top)) { /* append */
+ sp->size += tsize;
+ init_top(m, m->top, m->topsize + tsize);
+ }
+ else {
+ if (tbase < m->least_addr)
+ m->least_addr = tbase;
+ sp = &m->seg;
+ while (sp != 0 && sp->base != tbase + tsize)
+ sp = (NO_SEGMENT_TRAVERSAL) ? 0 : sp->next;
+ if (sp != 0 &&
+ !is_extern_segment(sp) &&
+ (sp->sflags & USE_MMAP_BIT) == mmap_flag) {
+ char* oldbase = sp->base;
+ sp->base = tbase;
+ sp->size += tsize;
+ return prepend_alloc(m, tbase, oldbase, nb);
+ }
+ else
+ add_segment(m, tbase, tsize, mmap_flag);
+ }
+ }
+
+ if (nb < m->topsize) { /* Allocate from new or extended top space */
+ size_t rsize = m->topsize -= nb;
+ mchunkptr p = m->top;
+ mchunkptr r = m->top = chunk_plus_offset(p, nb);
+ r->head = rsize | PINUSE_BIT;
+ set_size_and_pinuse_of_inuse_chunk(m, p, nb);
+ check_top_chunk(m, m->top);
+ check_malloced_chunk(m, chunk2mem(p), nb);
+ return chunk2mem(p);
+ }
+ }
+
+ MALLOC_FAILURE_ACTION;
+ return 0;
+}
+
+/* ----------------------- system deallocation -------------------------- */
+
+/* Unmap and unlink any mmapped segments that don't contain used chunks */
+static size_t release_unused_segments(mstate m) {
+ size_t released = 0;
+ int nsegs = 0;
+ msegmentptr pred = &m->seg;
+ msegmentptr sp = pred->next;
+ while (sp != 0) {
+ char* base = sp->base;
+ size_t size = sp->size;
+ msegmentptr next = sp->next;
+ ++nsegs;
+ if (is_mmapped_segment(sp) && !is_extern_segment(sp)) {
+ mchunkptr p = align_as_chunk(base);
+ size_t psize = chunksize(p);
+ /* Can unmap if first chunk holds entire segment and not pinned */
+ if (!is_inuse(p) && (char*)p + psize >= base + size - TOP_FOOT_SIZE) {
+ tchunkptr tp = (tchunkptr)p;
+ assert(segment_holds(sp, (char*)sp));
+ if (p == m->dv) {
+ m->dv = 0;
+ m->dvsize = 0;
+ }
+ else {
+ unlink_large_chunk(m, tp);
+ }
+ if (CALL_MUNMAP(base, size) == 0) {
+ released += size;
+ m->footprint -= size;
+ /* unlink obsoleted record */
+ sp = pred;
+ sp->next = next;
+ }
+ else { /* back out if cannot unmap */
+ insert_large_chunk(m, tp, psize);
+ }
+ }
+ }
+ if (NO_SEGMENT_TRAVERSAL) /* scan only first segment */
+ break;
+ pred = sp;
+ sp = next;
+ }
+ /* Reset check counter */
+ m->release_checks = (((size_t) nsegs > (size_t) MAX_RELEASE_CHECK_RATE)?
+ (size_t) nsegs : (size_t) MAX_RELEASE_CHECK_RATE);
+ return released;
+}
+
+static int sys_trim(mstate m, size_t pad) {
+ size_t released = 0;
+ ensure_initialization();
+ if (pad < MAX_REQUEST && is_initialized(m)) {
+ pad += TOP_FOOT_SIZE; /* ensure enough room for segment overhead */
+
+ if (m->topsize > pad) {
+ /* Shrink top space in granularity-size units, keeping at least one */
+ size_t unit = mparams.granularity;
+ size_t extra = ((m->topsize - pad + (unit - SIZE_T_ONE)) / unit -
+ SIZE_T_ONE) * unit;
+ msegmentptr sp = segment_holding(m, (char*)m->top);
+
+ if (!is_extern_segment(sp)) {
+ if (is_mmapped_segment(sp)) {
+ if (HAVE_MMAP &&
+ sp->size >= extra &&
+ !has_segment_link(m, sp)) { /* can't shrink if pinned */
+ size_t newsize = sp->size - extra;
+ (void)newsize; /* placate people compiling -Wunused-variable */
+ /* Prefer mremap, fall back to munmap */
+ if ((CALL_MREMAP(sp->base, sp->size, newsize, 0) != MFAIL) ||
+ (CALL_MUNMAP(sp->base + newsize, extra) == 0)) {
+ released = extra;
+ }
+ }
+ }
+ else if (HAVE_MORECORE) {
+ if (extra >= HALF_MAX_SIZE_T) /* Avoid wrapping negative */
+ extra = (HALF_MAX_SIZE_T) + SIZE_T_ONE - unit;
+ ACQUIRE_MALLOC_GLOBAL_LOCK();
+ {
+ /* Make sure end of memory is where we last set it. */
+ char* old_br = (char*)(CALL_MORECORE(0));
+ if (old_br == sp->base + sp->size) {
+ char* rel_br = (char*)(CALL_MORECORE(-extra));
+ char* new_br = (char*)(CALL_MORECORE(0));
+ if (rel_br != CMFAIL && new_br < old_br)
+ released = old_br - new_br;
+ }
+ }
+ RELEASE_MALLOC_GLOBAL_LOCK();
+ }
+ }
+
+ if (released != 0) {
+ sp->size -= released;
+ m->footprint -= released;
+ init_top(m, m->top, m->topsize - released);
+ check_top_chunk(m, m->top);
+ }
+ }
+
+ /* Unmap any unused mmapped segments */
+ if (HAVE_MMAP)
+ released += release_unused_segments(m);
+
+ /* On failure, disable autotrim to avoid repeated failed future calls */
+ if (released == 0 && m->topsize > m->trim_check)
+ m->trim_check = MAX_SIZE_T;
+ }
+
+ return (released != 0)? 1 : 0;
+}
+
+/* Consolidate and bin a chunk. Differs from exported versions
+ of free mainly in that the chunk need not be marked as inuse.
+*/
+static void dispose_chunk(mstate m, mchunkptr p, size_t psize) {
+ mchunkptr next = chunk_plus_offset(p, psize);
+ if (!pinuse(p)) {
+ mchunkptr prev;
+ size_t prevsize = p->prev_foot;
+ if (is_mmapped(p)) {
+ psize += prevsize + MMAP_FOOT_PAD;
+ if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
+ m->footprint -= psize;
+ return;
+ }
+ prev = chunk_minus_offset(p, prevsize);
+ psize += prevsize;
+ p = prev;
+ if (RTCHECK(ok_address(m, prev))) { /* consolidate backward */
+ if (p != m->dv) {
+ unlink_chunk(m, p, prevsize);
+ }
+ else if ((next->head & INUSE_BITS) == INUSE_BITS) {
+ m->dvsize = psize;
+ set_free_with_pinuse(p, psize, next);
+ return;
+ }
+ }
+ else {
+ CORRUPTION_ERROR_ACTION(m);
+ return;
+ }
+ }
+ if (RTCHECK(ok_address(m, next))) {
+ if (!cinuse(next)) { /* consolidate forward */
+ if (next == m->top) {
+ size_t tsize = m->topsize += psize;
+ m->top = p;
+ p->head = tsize | PINUSE_BIT;
+ if (p == m->dv) {
+ m->dv = 0;
+ m->dvsize = 0;
+ }
+ return;
+ }
+ else if (next == m->dv) {
+ size_t dsize = m->dvsize += psize;
+ m->dv = p;
+ set_size_and_pinuse_of_free_chunk(p, dsize);
+ return;
+ }
+ else {
+ size_t nsize = chunksize(next);
+ psize += nsize;
+ unlink_chunk(m, next, nsize);
+ set_size_and_pinuse_of_free_chunk(p, psize);
+ if (p == m->dv) {
+ m->dvsize = psize;
+ return;
+ }
+ }
+ }
+ else {
+ set_free_with_pinuse(p, psize, next);
+ }
+ insert_chunk(m, p, psize);
+ }
+ else {
+ CORRUPTION_ERROR_ACTION(m);
+ }
+}
+
+/* ---------------------------- malloc --------------------------- */
+
+/* allocate a large request from the best fitting chunk in a treebin */
+static void* tmalloc_large(mstate m, size_t nb) {
+ tchunkptr v = 0;
+ size_t rsize = -nb; /* Unsigned negation */
+ tchunkptr t;
+ bindex_t idx;
+ compute_tree_index(nb, idx);
+ if ((t = *treebin_at(m, idx)) != 0) {
+ /* Traverse tree for this bin looking for node with size == nb */
+ size_t sizebits = nb << leftshift_for_tree_index(idx);
+ tchunkptr rst = 0; /* The deepest untaken right subtree */
+ for (;;) {
+ tchunkptr rt;
+ size_t trem = chunksize(t) - nb;
+ if (trem < rsize) {
+ v = t;
+ if ((rsize = trem) == 0)
+ break;
+ }
+ rt = t->child[1];
+ t = t->child[(sizebits >> (SIZE_T_BITSIZE-SIZE_T_ONE)) & 1];
+ if (rt != 0 && rt != t)
+ rst = rt;
+ if (t == 0) {
+ t = rst; /* set t to least subtree holding sizes > nb */
+ break;
+ }
+ sizebits <<= 1;
+ }
+ }
+ if (t == 0 && v == 0) { /* set t to root of next non-empty treebin */
+ binmap_t leftbits = left_bits(idx2bit(idx)) & m->treemap;
+ if (leftbits != 0) {
+ bindex_t i;
+ binmap_t leastbit = least_bit(leftbits);
+ compute_bit2idx(leastbit, i);
+ t = *treebin_at(m, i);
+ }
+ }
+
+ while (t != 0) { /* find smallest of tree or subtree */
+ size_t trem = chunksize(t) - nb;
+ if (trem < rsize) {
+ rsize = trem;
+ v = t;
+ }
+ t = leftmost_child(t);
+ }
+
+ /* If dv is a better fit, return 0 so malloc will use it */
+ if (v != 0 && rsize < (size_t)(m->dvsize - nb)) {
+ if (RTCHECK(ok_address(m, v))) { /* split */
+ mchunkptr r = chunk_plus_offset(v, nb);
+ assert(chunksize(v) == rsize + nb);
+ if (RTCHECK(ok_next(v, r))) {
+ unlink_large_chunk(m, v);
+ if (rsize < MIN_CHUNK_SIZE)
+ set_inuse_and_pinuse(m, v, (rsize + nb));
+ else {
+ set_size_and_pinuse_of_inuse_chunk(m, v, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ insert_chunk(m, r, rsize);
+ }
+ return chunk2mem(v);
+ }
+ }
+ CORRUPTION_ERROR_ACTION(m);
+ }
+ return 0;
+}
+
+/* allocate a small request from the best fitting chunk in a treebin */
+static void* tmalloc_small(mstate m, size_t nb) {
+ tchunkptr t, v;
+ size_t rsize;
+ bindex_t i;
+ binmap_t leastbit = least_bit(m->treemap);
+ compute_bit2idx(leastbit, i);
+ v = t = *treebin_at(m, i);
+ rsize = chunksize(t) - nb;
+
+ while ((t = leftmost_child(t)) != 0) {
+ size_t trem = chunksize(t) - nb;
+ if (trem < rsize) {
+ rsize = trem;
+ v = t;
+ }
+ }
+
+ if (RTCHECK(ok_address(m, v))) {
+ mchunkptr r = chunk_plus_offset(v, nb);
+ assert(chunksize(v) == rsize + nb);
+ if (RTCHECK(ok_next(v, r))) {
+ unlink_large_chunk(m, v);
+ if (rsize < MIN_CHUNK_SIZE)
+ set_inuse_and_pinuse(m, v, (rsize + nb));
+ else {
+ set_size_and_pinuse_of_inuse_chunk(m, v, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ replace_dv(m, r, rsize);
+ }
+ return chunk2mem(v);
+ }
+ }
+
+ CORRUPTION_ERROR_ACTION(m);
+ return 0;
+}
+
+#if !ONLY_MSPACES
+
+void* dlmalloc(size_t bytes) {
+ /*
+ Basic algorithm:
+ If a small request (< 256 bytes minus per-chunk overhead):
+ 1. If one exists, use a remainderless chunk in associated smallbin.
+ (Remainderless means that there are too few excess bytes to
+ represent as a chunk.)
+ 2. If it is big enough, use the dv chunk, which is normally the
+ chunk adjacent to the one used for the most recent small request.
+ 3. If one exists, split the smallest available chunk in a bin,
+ saving remainder in dv.
+ 4. If it is big enough, use the top chunk.
+ 5. If available, get memory from system and use it
+ Otherwise, for a large request:
+ 1. Find the smallest available binned chunk that fits, and use it
+ if it is better fitting than dv chunk, splitting if necessary.
+ 2. If better fitting than any binned chunk, use the dv chunk.
+ 3. If it is big enough, use the top chunk.
+ 4. If request size >= mmap threshold, try to directly mmap this chunk.
+ 5. If available, get memory from system and use it
+
+ The ugly goto's here ensure that postaction occurs along all paths.
+ */
+
+#if USE_LOCKS
+ ensure_initialization(); /* initialize in sys_alloc if not using locks */
+#endif
+
+ if (!PREACTION(gm)) {
+ void* mem;
+ size_t nb;
+ if (bytes <= MAX_SMALL_REQUEST) {
+ bindex_t idx;
+ binmap_t smallbits;
+ nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
+ idx = small_index(nb);
+ smallbits = gm->smallmap >> idx;
+
+ if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
+ mchunkptr b, p;
+ idx += ~smallbits & 1; /* Uses next bin if idx empty */
+ b = smallbin_at(gm, idx);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(idx));
+ unlink_first_small_chunk(gm, b, p, idx);
+ set_inuse_and_pinuse(gm, p, small_index2size(idx));
+ mem = chunk2mem(p);
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
+
+ else if (nb > gm->dvsize) {
+ if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
+ mchunkptr b, p, r;
+ size_t rsize;
+ bindex_t i;
+ binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
+ binmap_t leastbit = least_bit(leftbits);
+ compute_bit2idx(leastbit, i);
+ b = smallbin_at(gm, i);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(i));
+ unlink_first_small_chunk(gm, b, p, i);
+ rsize = small_index2size(i) - nb;
+ /* Fit here cannot be remainderless if 4byte sizes */
+ if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
+ set_inuse_and_pinuse(gm, p, small_index2size(i));
+ else {
+ set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
+ r = chunk_plus_offset(p, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ replace_dv(gm, r, rsize);
+ }
+ mem = chunk2mem(p);
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
+
+ else if (gm->treemap != 0 && (mem = tmalloc_small(gm, nb)) != 0) {
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
+ }
+ }
+ else if (bytes >= MAX_REQUEST)
+ nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
+ else {
+ nb = pad_request(bytes);
+ if (gm->treemap != 0 && (mem = tmalloc_large(gm, nb)) != 0) {
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
+ }
+
+ if (nb <= gm->dvsize) {
+ size_t rsize = gm->dvsize - nb;
+ mchunkptr p = gm->dv;
+ if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
+ mchunkptr r = gm->dv = chunk_plus_offset(p, nb);
+ gm->dvsize = rsize;
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
+ }
+ else { /* exhaust dv */
+ size_t dvs = gm->dvsize;
+ gm->dvsize = 0;
+ gm->dv = 0;
+ set_inuse_and_pinuse(gm, p, dvs);
+ }
+ mem = chunk2mem(p);
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
+
+ else if (nb < gm->topsize) { /* Split top */
+ size_t rsize = gm->topsize -= nb;
+ mchunkptr p = gm->top;
+ mchunkptr r = gm->top = chunk_plus_offset(p, nb);
+ r->head = rsize | PINUSE_BIT;
+ set_size_and_pinuse_of_inuse_chunk(gm, p, nb);
+ mem = chunk2mem(p);
+ check_top_chunk(gm, gm->top);
+ check_malloced_chunk(gm, mem, nb);
+ goto postaction;
+ }
+
+ mem = sys_alloc(gm, nb);
+
+ postaction:
+ POSTACTION(gm);
+ return mem;
+ }
+
+ return 0;
+}
+
+/* ---------------------------- free --------------------------- */
+
+void dlfree(void* mem) {
+ /*
+ Consolidate freed chunks with preceding or succeeding bordering
+ free chunks, if they exist, and then place in a bin. Intermixed
+ with special cases for top, dv, mmapped chunks, and usage errors.
+ */
+
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+#if FOOTERS
+ mstate fm = get_mstate_for(p);
+ if (!ok_magic(fm)) {
+ USAGE_ERROR_ACTION(fm, p);
+ return;
+ }
+#else /* FOOTERS */
+#define fm gm
+#endif /* FOOTERS */
+ if (!PREACTION(fm)) {
+ check_inuse_chunk(fm, p);
+ if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) {
+ size_t psize = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, psize);
+ if (!pinuse(p)) {
+ size_t prevsize = p->prev_foot;
+ if (is_mmapped(p)) {
+ psize += prevsize + MMAP_FOOT_PAD;
+ if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
+ fm->footprint -= psize;
+ goto postaction;
+ }
+ else {
+ mchunkptr prev = chunk_minus_offset(p, prevsize);
+ psize += prevsize;
+ p = prev;
+ if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
+ if (p != fm->dv) {
+ unlink_chunk(fm, p, prevsize);
+ }
+ else if ((next->head & INUSE_BITS) == INUSE_BITS) {
+ fm->dvsize = psize;
+ set_free_with_pinuse(p, psize, next);
+ goto postaction;
+ }
+ }
+ else
+ goto erroraction;
+ }
+ }
+
+ if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
+ if (!cinuse(next)) { /* consolidate forward */
+ if (next == fm->top) {
+ size_t tsize = fm->topsize += psize;
+ fm->top = p;
+ p->head = tsize | PINUSE_BIT;
+ if (p == fm->dv) {
+ fm->dv = 0;
+ fm->dvsize = 0;
+ }
+ if (should_trim(fm, tsize))
+ sys_trim(fm, 0);
+ goto postaction;
+ }
+ else if (next == fm->dv) {
+ size_t dsize = fm->dvsize += psize;
+ fm->dv = p;
+ set_size_and_pinuse_of_free_chunk(p, dsize);
+ goto postaction;
+ }
+ else {
+ size_t nsize = chunksize(next);
+ psize += nsize;
+ unlink_chunk(fm, next, nsize);
+ set_size_and_pinuse_of_free_chunk(p, psize);
+ if (p == fm->dv) {
+ fm->dvsize = psize;
+ goto postaction;
+ }
+ }
+ }
+ else
+ set_free_with_pinuse(p, psize, next);
+
+ if (is_small(psize)) {
+ insert_small_chunk(fm, p, psize);
+ check_free_chunk(fm, p);
+ }
+ else {
+ tchunkptr tp = (tchunkptr)p;
+ insert_large_chunk(fm, tp, psize);
+ check_free_chunk(fm, p);
+ if (--fm->release_checks == 0)
+ release_unused_segments(fm);
+ }
+ goto postaction;
+ }
+ }
+ erroraction:
+ USAGE_ERROR_ACTION(fm, p);
+ postaction:
+ POSTACTION(fm);
+ }
+ }
+#if !FOOTERS
+#undef fm
+#endif /* FOOTERS */
+}
+
+void* dlcalloc(size_t n_elements, size_t elem_size) {
+ void* mem;
+ size_t req = 0;
+ if (n_elements != 0) {
+ req = n_elements * elem_size;
+ if (((n_elements | elem_size) & ~(size_t)0xffff) &&
+ (req / n_elements != elem_size))
+ req = MAX_SIZE_T; /* force downstream failure on overflow */
+ }
+ mem = dlmalloc(req);
+ if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
+ memset(mem, 0, req);
+ return mem;
+}
+
+#endif /* !ONLY_MSPACES */
+
+/* ------------ Internal support for realloc, memalign, etc -------------- */
+
+/* Try to realloc; only in-place unless can_move true */
+static mchunkptr try_realloc_chunk(mstate m, mchunkptr p, size_t nb,
+ int can_move) {
+ mchunkptr newp = 0;
+ size_t oldsize = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, oldsize);
+ if (RTCHECK(ok_address(m, p) && ok_inuse(p) &&
+ ok_next(p, next) && ok_pinuse(next))) {
+ if (is_mmapped(p)) {
+ newp = mmap_resize(m, p, nb, can_move);
+ }
+ else if (oldsize >= nb) { /* already big enough */
+ size_t rsize = oldsize - nb;
+ if (rsize >= MIN_CHUNK_SIZE) { /* split off remainder */
+ mchunkptr r = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ set_inuse(m, r, rsize);
+ dispose_chunk(m, r, rsize);
+ }
+ newp = p;
+ }
+ else if (next == m->top) { /* extend into top */
+ if (oldsize + m->topsize > nb) {
+ size_t newsize = oldsize + m->topsize;
+ size_t newtopsize = newsize - nb;
+ mchunkptr newtop = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ newtop->head = newtopsize |PINUSE_BIT;
+ m->top = newtop;
+ m->topsize = newtopsize;
+ newp = p;
+ }
+ }
+ else if (next == m->dv) { /* extend into dv */
+ size_t dvs = m->dvsize;
+ if (oldsize + dvs >= nb) {
+ size_t dsize = oldsize + dvs - nb;
+ if (dsize >= MIN_CHUNK_SIZE) {
+ mchunkptr r = chunk_plus_offset(p, nb);
+ mchunkptr n = chunk_plus_offset(r, dsize);
+ set_inuse(m, p, nb);
+ set_size_and_pinuse_of_free_chunk(r, dsize);
+ clear_pinuse(n);
+ m->dvsize = dsize;
+ m->dv = r;
+ }
+ else { /* exhaust dv */
+ size_t newsize = oldsize + dvs;
+ set_inuse(m, p, newsize);
+ m->dvsize = 0;
+ m->dv = 0;
+ }
+ newp = p;
+ }
+ }
+ else if (!cinuse(next)) { /* extend into next free chunk */
+ size_t nextsize = chunksize(next);
+ if (oldsize + nextsize >= nb) {
+ size_t rsize = oldsize + nextsize - nb;
+ unlink_chunk(m, next, nextsize);
+ if (rsize < MIN_CHUNK_SIZE) {
+ size_t newsize = oldsize + nextsize;
+ set_inuse(m, p, newsize);
+ }
+ else {
+ mchunkptr r = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ set_inuse(m, r, rsize);
+ dispose_chunk(m, r, rsize);
+ }
+ newp = p;
+ }
+ }
+ }
+ else {
+ USAGE_ERROR_ACTION(m, chunk2mem(p));
+ }
+ return newp;
+}
+
+static void* internal_memalign(mstate m, size_t alignment, size_t bytes) {
+ void* mem = 0;
+ if (alignment < MIN_CHUNK_SIZE) /* must be at least a minimum chunk size */
+ alignment = MIN_CHUNK_SIZE;
+ if ((alignment & (alignment-SIZE_T_ONE)) != 0) {/* Ensure a power of 2 */
+ size_t a = MALLOC_ALIGNMENT << 1;
+ while (a < alignment) a <<= 1;
+ alignment = a;
+ }
+ if (bytes >= MAX_REQUEST - alignment) {
+ if (m != 0) { /* Test isn't needed but avoids compiler warning */
+ MALLOC_FAILURE_ACTION;
+ }
+ }
+ else {
+ size_t nb = request2size(bytes);
+ size_t req = nb + alignment + MIN_CHUNK_SIZE - CHUNK_OVERHEAD;
+ mem = internal_malloc(m, req);
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+ if (PREACTION(m))
+ return 0;
+ if ((((size_t)(mem)) & (alignment - 1)) != 0) { /* misaligned */
+ /*
+ Find an aligned spot inside chunk. Since we need to give
+ back leading space in a chunk of at least MIN_CHUNK_SIZE, if
+ the first calculation places us at a spot with less than
+ MIN_CHUNK_SIZE leader, we can move to the next aligned spot.
+ We've allocated enough total room so that this is always
+ possible.
+ */
+ char* br = (char*)mem2chunk((size_t)(((size_t)((char*)mem + alignment -
+ SIZE_T_ONE)) &
+ -alignment));
+ char* pos = ((size_t)(br - (char*)(p)) >= MIN_CHUNK_SIZE)?
+ br : br+alignment;
+ mchunkptr newp = (mchunkptr)pos;
+ size_t leadsize = pos - (char*)(p);
+ size_t newsize = chunksize(p) - leadsize;
+
+ if (is_mmapped(p)) { /* For mmapped chunks, just adjust offset */
+ newp->prev_foot = p->prev_foot + leadsize;
+ newp->head = newsize;
+ }
+ else { /* Otherwise, give back leader, use the rest */
+ set_inuse(m, newp, newsize);
+ set_inuse(m, p, leadsize);
+ dispose_chunk(m, p, leadsize);
+ }
+ p = newp;
+ }
+
+ /* Give back spare room at the end */
+ if (!is_mmapped(p)) {
+ size_t size = chunksize(p);
+ if (size > nb + MIN_CHUNK_SIZE) {
+ size_t remainder_size = size - nb;
+ mchunkptr remainder = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ set_inuse(m, remainder, remainder_size);
+ dispose_chunk(m, remainder, remainder_size);
+ }
+ }
+
+ mem = chunk2mem(p);
+ assert (chunksize(p) >= nb);
+ assert(((size_t)mem & (alignment - 1)) == 0);
+ check_inuse_chunk(m, p);
+ POSTACTION(m);
+ }
+ }
+ return mem;
+}
+
+/*
+ Common support for independent_X routines, handling
+ all of the combinations that can result.
+ The opts arg has:
+ bit 0 set if all elements are same size (using sizes[0])
+ bit 1 set if elements should be zeroed
+*/
+static void** ialloc(mstate m,
+ size_t n_elements,
+ size_t* sizes,
+ int opts,
+ void* chunks[]) {
+
+ size_t element_size; /* chunksize of each element, if all same */
+ size_t contents_size; /* total size of elements */
+ size_t array_size; /* request size of pointer array */
+ void* mem; /* malloced aggregate space */
+ mchunkptr p; /* corresponding chunk */
+ size_t remainder_size; /* remaining bytes while splitting */
+ void** marray; /* either "chunks" or malloced ptr array */
+ mchunkptr array_chunk; /* chunk for malloced ptr array */
+ flag_t was_enabled; /* to disable mmap */
+ size_t size;
+ size_t i;
+
+ ensure_initialization();
+ /* compute array length, if needed */
+ if (chunks != 0) {
+ if (n_elements == 0)
+ return chunks; /* nothing to do */
+ marray = chunks;
+ array_size = 0;
+ }
+ else {
+ /* if empty req, must still return chunk representing empty array */
+ if (n_elements == 0)
+ return (void**)internal_malloc(m, 0);
+ marray = 0;
+ array_size = request2size(n_elements * (sizeof(void*)));
+ }
+
+ /* compute total element size */
+ if (opts & 0x1) { /* all-same-size */
+ element_size = request2size(*sizes);
+ contents_size = n_elements * element_size;
+ }
+ else { /* add up all the sizes */
+ element_size = 0;
+ contents_size = 0;
+ for (i = 0; i != n_elements; ++i)
+ contents_size += request2size(sizes[i]);
+ }
+
+ size = contents_size + array_size;
+
+ /*
+ Allocate the aggregate chunk. First disable direct-mmapping so
+ malloc won't use it, since we would not be able to later
+ free/realloc space internal to a segregated mmap region.
+ */
+ was_enabled = use_mmap(m);
+ disable_mmap(m);
+ mem = internal_malloc(m, size - CHUNK_OVERHEAD);
+ if (was_enabled)
+ enable_mmap(m);
+ if (mem == 0)
+ return 0;
+
+ if (PREACTION(m)) return 0;
+ p = mem2chunk(mem);
+ remainder_size = chunksize(p);
+
+ assert(!is_mmapped(p));
+
+ if (opts & 0x2) { /* optionally clear the elements */
+ memset((size_t*)mem, 0, remainder_size - SIZE_T_SIZE - array_size);
+ }
+
+ /* If not provided, allocate the pointer array as final part of chunk */
+ if (marray == 0) {
+ size_t array_chunk_size;
+ array_chunk = chunk_plus_offset(p, contents_size);
+ array_chunk_size = remainder_size - contents_size;
+ marray = (void**) (chunk2mem(array_chunk));
+ set_size_and_pinuse_of_inuse_chunk(m, array_chunk, array_chunk_size);
+ remainder_size = contents_size;
+ }
+
+ /* split out elements */
+ for (i = 0; ; ++i) {
+ marray[i] = chunk2mem(p);
+ if (i != n_elements-1) {
+ if (element_size != 0)
+ size = element_size;
+ else
+ size = request2size(sizes[i]);
+ remainder_size -= size;
+ set_size_and_pinuse_of_inuse_chunk(m, p, size);
+ p = chunk_plus_offset(p, size);
+ }
+ else { /* the final element absorbs any overallocation slop */
+ set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size);
+ break;
+ }
+ }
+
+#if DEBUG
+ if (marray != chunks) {
+ /* final element must have exactly exhausted chunk */
+ if (element_size != 0) {
+ assert(remainder_size == element_size);
+ }
+ else {
+ assert(remainder_size == request2size(sizes[i]));
+ }
+ check_inuse_chunk(m, mem2chunk(marray));
+ }
+ for (i = 0; i != n_elements; ++i)
+ check_inuse_chunk(m, mem2chunk(marray[i]));
+
+#endif /* DEBUG */
+
+ POSTACTION(m);
+ return marray;
+}
+
+/* Try to free all pointers in the given array.
+ Note: this could be made faster, by delaying consolidation,
+ at the price of disabling some user integrity checks, We
+ still optimize some consolidations by combining adjacent
+ chunks before freeing, which will occur often if allocated
+ with ialloc or the array is sorted.
+*/
+static size_t internal_bulk_free(mstate m, void* array[], size_t nelem) {
+ size_t unfreed = 0;
+ if (!PREACTION(m)) {
+ void** a;
+ void** fence = &(array[nelem]);
+ for (a = array; a != fence; ++a) {
+ void* mem = *a;
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+ size_t psize = chunksize(p);
+#if FOOTERS
+ if (get_mstate_for(p) != m) {
+ ++unfreed;
+ continue;
+ }
+#endif
+ check_inuse_chunk(m, p);
+ *a = 0;
+ if (RTCHECK(ok_address(m, p) && ok_inuse(p))) {
+ void ** b = a + 1; /* try to merge with next chunk */
+ mchunkptr next = next_chunk(p);
+ if (b != fence && *b == chunk2mem(next)) {
+ size_t newsize = chunksize(next) + psize;
+ set_inuse(m, p, newsize);
+ *b = chunk2mem(p);
+ }
+ else
+ dispose_chunk(m, p, psize);
+ }
+ else {
+ CORRUPTION_ERROR_ACTION(m);
+ break;
+ }
+ }
+ }
+ if (should_trim(m, m->topsize))
+ sys_trim(m, 0);
+ POSTACTION(m);
+ }
+ return unfreed;
+}
+
+/* Traversal */
+#if MALLOC_INSPECT_ALL
+static void internal_inspect_all(mstate m,
+ void(*handler)(void *start,
+ void *end,
+ size_t used_bytes,
+ void* callback_arg),
+ void* arg) {
+ if (is_initialized(m)) {
+ mchunkptr top = m->top;
+ msegmentptr s;
+ for (s = &m->seg; s != 0; s = s->next) {
+ mchunkptr q = align_as_chunk(s->base);
+ while (segment_holds(s, q) && q->head != FENCEPOST_HEAD) {
+ mchunkptr next = next_chunk(q);
+ size_t sz = chunksize(q);
+ size_t used;
+ void* start;
+ if (is_inuse(q)) {
+ used = sz - CHUNK_OVERHEAD; /* must not be mmapped */
+ start = chunk2mem(q);
+ }
+ else {
+ used = 0;
+ if (is_small(sz)) { /* offset by possible bookkeeping */
+ start = (void*)((char*)q + sizeof(struct malloc_chunk));
+ }
+ else {
+ start = (void*)((char*)q + sizeof(struct malloc_tree_chunk));
+ }
+ }
+ if (start < (void*)next) /* skip if all space is bookkeeping */
+ handler(start, next, used, arg);
+ if (q == top)
+ break;
+ q = next;
+ }
+ }
+ }
+}
+#endif /* MALLOC_INSPECT_ALL */
+
+/* ------------------ Exported realloc, memalign, etc -------------------- */
+
+#if !ONLY_MSPACES
+
+void* dlrealloc(void* oldmem, size_t bytes) {
+ void* mem = 0;
+ if (oldmem == 0) {
+ mem = dlmalloc(bytes);
+ }
+ else if (bytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ }
+#ifdef REALLOC_ZERO_BYTES_FREES
+ else if (bytes == 0) {
+ dlfree(oldmem);
+ }
+#endif /* REALLOC_ZERO_BYTES_FREES */
+ else {
+ size_t nb = request2size(bytes);
+ mchunkptr oldp = mem2chunk(oldmem);
+#if ! FOOTERS
+ mstate m = gm;
+#else /* FOOTERS */
+ mstate m = get_mstate_for(oldp);
+ if (!ok_magic(m)) {
+ USAGE_ERROR_ACTION(m, oldmem);
+ return 0;
+ }
+#endif /* FOOTERS */
+ if (!PREACTION(m)) {
+ mchunkptr newp = try_realloc_chunk(m, oldp, nb, 1);
+ POSTACTION(m);
+ if (newp != 0) {
+ check_inuse_chunk(m, newp);
+ mem = chunk2mem(newp);
+ }
+ else {
+ mem = internal_malloc(m, bytes);
+ if (mem != 0) {
+ size_t oc = chunksize(oldp) - overhead_for(oldp);
+ memcpy(mem, oldmem, (oc < bytes)? oc : bytes);
+ internal_free(m, oldmem);
+ }
+ }
+ }
+ }
+ return mem;
+}
+
+void* dlrealloc_in_place(void* oldmem, size_t bytes) {
+ void* mem = 0;
+ if (oldmem != 0) {
+ if (bytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ }
+ else {
+ size_t nb = request2size(bytes);
+ mchunkptr oldp = mem2chunk(oldmem);
+#if ! FOOTERS
+ mstate m = gm;
+#else /* FOOTERS */
+ mstate m = get_mstate_for(oldp);
+ if (!ok_magic(m)) {
+ USAGE_ERROR_ACTION(m, oldmem);
+ return 0;
+ }
+#endif /* FOOTERS */
+ if (!PREACTION(m)) {
+ mchunkptr newp = try_realloc_chunk(m, oldp, nb, 0);
+ POSTACTION(m);
+ if (newp == oldp) {
+ check_inuse_chunk(m, newp);
+ mem = oldmem;
+ }
+ }
+ }
+ }
+ return mem;
+}
+
+void* dlmemalign(size_t alignment, size_t bytes) {
+ if (alignment <= MALLOC_ALIGNMENT) {
+ return dlmalloc(bytes);
+ }
+ return internal_memalign(gm, alignment, bytes);
+}
+
+int dlposix_memalign(void** pp, size_t alignment, size_t bytes) {
+ void* mem = 0;
+ if (alignment == MALLOC_ALIGNMENT)
+ mem = dlmalloc(bytes);
+ else {
+ size_t d = alignment / sizeof(void*);
+ size_t r = alignment % sizeof(void*);
+ if (r != 0 || d == 0 || (d & (d-SIZE_T_ONE)) != 0)
+ return EINVAL;
+ else if (bytes <= MAX_REQUEST - alignment) {
+ if (alignment < MIN_CHUNK_SIZE)
+ alignment = MIN_CHUNK_SIZE;
+ mem = internal_memalign(gm, alignment, bytes);
+ }
+ }
+ if (mem == 0)
+ return ENOMEM;
+ else {
+ *pp = mem;
+ return 0;
+ }
+}
+
+void* dlvalloc(size_t bytes) {
+ size_t pagesz;
+ ensure_initialization();
+ pagesz = mparams.page_size;
+ return dlmemalign(pagesz, bytes);
+}
+
+void* dlpvalloc(size_t bytes) {
+ size_t pagesz;
+ ensure_initialization();
+ pagesz = mparams.page_size;
+ return dlmemalign(pagesz, (bytes + pagesz - SIZE_T_ONE) & ~(pagesz - SIZE_T_ONE));
+}
+
+void** dlindependent_calloc(size_t n_elements, size_t elem_size,
+ void* chunks[]) {
+ size_t sz = elem_size; /* serves as 1-element array */
+ return ialloc(gm, n_elements, &sz, 3, chunks);
+}
+
+void** dlindependent_comalloc(size_t n_elements, size_t sizes[],
+ void* chunks[]) {
+ return ialloc(gm, n_elements, sizes, 0, chunks);
+}
+
+size_t dlbulk_free(void* array[], size_t nelem) {
+ return internal_bulk_free(gm, array, nelem);
+}
+
+#if MALLOC_INSPECT_ALL
+void dlmalloc_inspect_all(void(*handler)(void *start,
+ void *end,
+ size_t used_bytes,
+ void* callback_arg),
+ void* arg) {
+ ensure_initialization();
+ if (!PREACTION(gm)) {
+ internal_inspect_all(gm, handler, arg);
+ POSTACTION(gm);
+ }
+}
+#endif /* MALLOC_INSPECT_ALL */
+
+int dlmalloc_trim(size_t pad) {
+ int result = 0;
+ ensure_initialization();
+ if (!PREACTION(gm)) {
+ result = sys_trim(gm, pad);
+ POSTACTION(gm);
+ }
+ return result;
+}
+
+size_t dlmalloc_footprint(void) {
+ return gm->footprint;
+}
+
+size_t dlmalloc_max_footprint(void) {
+ return gm->max_footprint;
+}
+
+size_t dlmalloc_footprint_limit(void) {
+ size_t maf = gm->footprint_limit;
+ return maf == 0 ? MAX_SIZE_T : maf;
+}
+
+size_t dlmalloc_set_footprint_limit(size_t bytes) {
+ size_t result; /* invert sense of 0 */
+ if (bytes == 0)
+ result = granularity_align(1); /* Use minimal size */
+ if (bytes == MAX_SIZE_T)
+ result = 0; /* disable */
+ else
+ result = granularity_align(bytes);
+ return gm->footprint_limit = result;
+}
+
+#if !NO_MALLINFO
+struct mallinfo dlmallinfo(void) {
+ return internal_mallinfo(gm);
+}
+#endif /* NO_MALLINFO */
+
+#if !NO_MALLOC_STATS
+void dlmalloc_stats() {
+ internal_malloc_stats(gm);
+}
+#endif /* NO_MALLOC_STATS */
+
+int dlmallopt(int param_number, int value) {
+ return change_mparam(param_number, value);
+}
+
+size_t dlmalloc_usable_size(void* mem) {
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+ if (is_inuse(p))
+ return chunksize(p) - overhead_for(p);
+ }
+ return 0;
+}
+
+#endif /* !ONLY_MSPACES */
+
+/* ----------------------------- user mspaces ---------------------------- */
+
+#if MSPACES
+
+static mstate init_user_mstate(char* tbase, size_t tsize) {
+ size_t msize = pad_request(sizeof(struct malloc_state));
+ mchunkptr mn;
+ mchunkptr msp = align_as_chunk(tbase);
+ mstate m = (mstate)(chunk2mem(msp));
+ memset(m, 0, msize);
+ (void)INITIAL_LOCK(&m->mutex);
+ msp->head = (msize|INUSE_BITS);
+ m->seg.base = m->least_addr = tbase;
+ m->seg.size = m->footprint = m->max_footprint = tsize;
+ m->magic = mparams.magic;
+ m->release_checks = MAX_RELEASE_CHECK_RATE;
+ m->mflags = mparams.default_mflags;
+ m->extp = 0;
+ m->exts = 0;
+ disable_contiguous(m);
+ init_bins(m);
+ mn = next_chunk(mem2chunk(m));
+ init_top(m, mn, (size_t)((tbase + tsize) - (char*)mn) - TOP_FOOT_SIZE);
+ check_top_chunk(m, m->top);
+ return m;
+}
+
+mspace create_mspace(size_t capacity, int locked) {
+ mstate m = 0;
+ size_t msize;
+ ensure_initialization();
+ msize = pad_request(sizeof(struct malloc_state));
+ if (capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) {
+ size_t rs = ((capacity == 0)? mparams.granularity :
+ (capacity + TOP_FOOT_SIZE + msize));
+ size_t tsize = granularity_align(rs);
+ char* tbase = (char*)(CALL_MMAP(tsize));
+ if (tbase != CMFAIL) {
+ m = init_user_mstate(tbase, tsize);
+ m->seg.sflags = USE_MMAP_BIT;
+ set_lock(m, locked);
+ }
+ }
+ return (mspace)m;
+}
+
+mspace create_mspace_with_base(void* base, size_t capacity, int locked) {
+ mstate m = 0;
+ size_t msize;
+ ensure_initialization();
+ msize = pad_request(sizeof(struct malloc_state));
+ if (capacity > msize + TOP_FOOT_SIZE &&
+ capacity < (size_t) -(msize + TOP_FOOT_SIZE + mparams.page_size)) {
+ m = init_user_mstate((char*)base, capacity);
+ m->seg.sflags = EXTERN_BIT;
+ set_lock(m, locked);
+ }
+ return (mspace)m;
+}
+
+int mspace_track_large_chunks(mspace msp, int enable) {
+ int ret = 0;
+ mstate ms = (mstate)msp;
+ if (!PREACTION(ms)) {
+ if (!use_mmap(ms)) {
+ ret = 1;
+ }
+ if (!enable) {
+ enable_mmap(ms);
+ } else {
+ disable_mmap(ms);
+ }
+ POSTACTION(ms);
+ }
+ return ret;
+}
+
+size_t destroy_mspace(mspace msp) {
+ size_t freed = 0;
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ msegmentptr sp = &ms->seg;
+ (void)DESTROY_LOCK(&ms->mutex); /* destroy before unmapped */
+ while (sp != 0) {
+ char* base = sp->base;
+ size_t size = sp->size;
+ flag_t flag = sp->sflags;
+ (void)base; /* placate people compiling -Wunused-variable */
+ sp = sp->next;
+ if ((flag & USE_MMAP_BIT) && !(flag & EXTERN_BIT) &&
+ CALL_MUNMAP(base, size) == 0)
+ freed += size;
+ }
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return freed;
+}
+
+/*
+ mspace versions of routines are near-clones of the global
+ versions. This is not so nice but better than the alternatives.
+*/
+
+void* mspace_malloc(mspace msp, size_t bytes) {
+ mstate ms = (mstate)msp;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+ if (!PREACTION(ms)) {
+ void* mem;
+ size_t nb;
+ if (bytes <= MAX_SMALL_REQUEST) {
+ bindex_t idx;
+ binmap_t smallbits;
+ nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
+ idx = small_index(nb);
+ smallbits = ms->smallmap >> idx;
+
+ if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
+ mchunkptr b, p;
+ idx += ~smallbits & 1; /* Uses next bin if idx empty */
+ b = smallbin_at(ms, idx);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(idx));
+ unlink_first_small_chunk(ms, b, p, idx);
+ set_inuse_and_pinuse(ms, p, small_index2size(idx));
+ mem = chunk2mem(p);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ else if (nb > ms->dvsize) {
+ if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
+ mchunkptr b, p, r;
+ size_t rsize;
+ bindex_t i;
+ binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
+ binmap_t leastbit = least_bit(leftbits);
+ compute_bit2idx(leastbit, i);
+ b = smallbin_at(ms, i);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(i));
+ unlink_first_small_chunk(ms, b, p, i);
+ rsize = small_index2size(i) - nb;
+ /* Fit here cannot be remainderless if 4byte sizes */
+ if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
+ set_inuse_and_pinuse(ms, p, small_index2size(i));
+ else {
+ set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
+ r = chunk_plus_offset(p, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ replace_dv(ms, r, rsize);
+ }
+ mem = chunk2mem(p);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) {
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+ }
+ }
+ else if (bytes >= MAX_REQUEST)
+ nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
+ else {
+ nb = pad_request(bytes);
+ if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) {
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+ }
+
+ if (nb <= ms->dvsize) {
+ size_t rsize = ms->dvsize - nb;
+ mchunkptr p = ms->dv;
+ if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
+ mchunkptr r = ms->dv = chunk_plus_offset(p, nb);
+ ms->dvsize = rsize;
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
+ }
+ else { /* exhaust dv */
+ size_t dvs = ms->dvsize;
+ ms->dvsize = 0;
+ ms->dv = 0;
+ set_inuse_and_pinuse(ms, p, dvs);
+ }
+ mem = chunk2mem(p);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ else if (nb < ms->topsize) { /* Split top */
+ size_t rsize = ms->topsize -= nb;
+ mchunkptr p = ms->top;
+ mchunkptr r = ms->top = chunk_plus_offset(p, nb);
+ r->head = rsize | PINUSE_BIT;
+ set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
+ mem = chunk2mem(p);
+ check_top_chunk(ms, ms->top);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ mem = sys_alloc(ms, nb);
+
+ postaction:
+ POSTACTION(ms);
+ return mem;
+ }
+
+ return 0;
+}
+
+void mspace_free(mspace msp, void* mem) {
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+#if FOOTERS
+ mstate fm = get_mstate_for(p);
+ (void)msp; /* placate people compiling -Wunused */
+#else /* FOOTERS */
+ mstate fm = (mstate)msp;
+#endif /* FOOTERS */
+ if (!ok_magic(fm)) {
+ USAGE_ERROR_ACTION(fm, p);
+ return;
+ }
+ if (!PREACTION(fm)) {
+ check_inuse_chunk(fm, p);
+ if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) {
+ size_t psize = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, psize);
+ if (!pinuse(p)) {
+ size_t prevsize = p->prev_foot;
+ if (is_mmapped(p)) {
+ psize += prevsize + MMAP_FOOT_PAD;
+ if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
+ fm->footprint -= psize;
+ goto postaction;
+ }
+ else {
+ mchunkptr prev = chunk_minus_offset(p, prevsize);
+ psize += prevsize;
+ p = prev;
+ if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
+ if (p != fm->dv) {
+ unlink_chunk(fm, p, prevsize);
+ }
+ else if ((next->head & INUSE_BITS) == INUSE_BITS) {
+ fm->dvsize = psize;
+ set_free_with_pinuse(p, psize, next);
+ goto postaction;
+ }
+ }
+ else
+ goto erroraction;
+ }
+ }
+
+ if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
+ if (!cinuse(next)) { /* consolidate forward */
+ if (next == fm->top) {
+ size_t tsize = fm->topsize += psize;
+ fm->top = p;
+ p->head = tsize | PINUSE_BIT;
+ if (p == fm->dv) {
+ fm->dv = 0;
+ fm->dvsize = 0;
+ }
+ if (should_trim(fm, tsize))
+ sys_trim(fm, 0);
+ goto postaction;
+ }
+ else if (next == fm->dv) {
+ size_t dsize = fm->dvsize += psize;
+ fm->dv = p;
+ set_size_and_pinuse_of_free_chunk(p, dsize);
+ goto postaction;
+ }
+ else {
+ size_t nsize = chunksize(next);
+ psize += nsize;
+ unlink_chunk(fm, next, nsize);
+ set_size_and_pinuse_of_free_chunk(p, psize);
+ if (p == fm->dv) {
+ fm->dvsize = psize;
+ goto postaction;
+ }
+ }
+ }
+ else
+ set_free_with_pinuse(p, psize, next);
+
+ if (is_small(psize)) {
+ insert_small_chunk(fm, p, psize);
+ check_free_chunk(fm, p);
+ }
+ else {
+ tchunkptr tp = (tchunkptr)p;
+ insert_large_chunk(fm, tp, psize);
+ check_free_chunk(fm, p);
+ if (--fm->release_checks == 0)
+ release_unused_segments(fm);
+ }
+ goto postaction;
+ }
+ }
+ erroraction:
+ USAGE_ERROR_ACTION(fm, p);
+ postaction:
+ POSTACTION(fm);
+ }
+ }
+}
+
+void* mspace_calloc(mspace msp, size_t n_elements, size_t elem_size) {
+ void* mem;
+ size_t req = 0;
+ mstate ms = (mstate)msp;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+ if (n_elements != 0) {
+ req = n_elements * elem_size;
+ if (((n_elements | elem_size) & ~(size_t)0xffff) &&
+ (req / n_elements != elem_size))
+ req = MAX_SIZE_T; /* force downstream failure on overflow */
+ }
+ mem = internal_malloc(ms, req);
+ if (mem != 0 && calloc_must_clear(mem2chunk(mem)))
+ memset(mem, 0, req);
+ return mem;
+}
+
+void* mspace_realloc(mspace msp, void* oldmem, size_t bytes) {
+ void* mem = 0;
+ if (oldmem == 0) {
+ mem = mspace_malloc(msp, bytes);
+ }
+ else if (bytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ }
+#ifdef REALLOC_ZERO_BYTES_FREES
+ else if (bytes == 0) {
+ mspace_free(msp, oldmem);
+ }
+#endif /* REALLOC_ZERO_BYTES_FREES */
+ else {
+ size_t nb = request2size(bytes);
+ mchunkptr oldp = mem2chunk(oldmem);
+#if ! FOOTERS
+ mstate m = (mstate)msp;
+#else /* FOOTERS */
+ mstate m = get_mstate_for(oldp);
+ if (!ok_magic(m)) {
+ USAGE_ERROR_ACTION(m, oldmem);
+ return 0;
+ }
+#endif /* FOOTERS */
+ if (!PREACTION(m)) {
+ mchunkptr newp = try_realloc_chunk(m, oldp, nb, 1);
+ POSTACTION(m);
+ if (newp != 0) {
+ check_inuse_chunk(m, newp);
+ mem = chunk2mem(newp);
+ }
+ else {
+ mem = mspace_malloc(m, bytes);
+ if (mem != 0) {
+ size_t oc = chunksize(oldp) - overhead_for(oldp);
+ memcpy(mem, oldmem, (oc < bytes)? oc : bytes);
+ mspace_free(m, oldmem);
+ }
+ }
+ }
+ }
+ return mem;
+}
+
+void* mspace_realloc_in_place(mspace msp, void* oldmem, size_t bytes) {
+ void* mem = 0;
+ if (oldmem != 0) {
+ if (bytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ }
+ else {
+ size_t nb = request2size(bytes);
+ mchunkptr oldp = mem2chunk(oldmem);
+#if ! FOOTERS
+ mstate m = (mstate)msp;
+#else /* FOOTERS */
+ mstate m = get_mstate_for(oldp);
+ (void)msp; /* placate people compiling -Wunused */
+ if (!ok_magic(m)) {
+ USAGE_ERROR_ACTION(m, oldmem);
+ return 0;
+ }
+#endif /* FOOTERS */
+ if (!PREACTION(m)) {
+ mchunkptr newp = try_realloc_chunk(m, oldp, nb, 0);
+ POSTACTION(m);
+ if (newp == oldp) {
+ check_inuse_chunk(m, newp);
+ mem = oldmem;
+ }
+ }
+ }
+ }
+ return mem;
+}
+
+void* mspace_memalign(mspace msp, size_t alignment, size_t bytes) {
+ mstate ms = (mstate)msp;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+ if (alignment <= MALLOC_ALIGNMENT)
+ return mspace_malloc(msp, bytes);
+ return internal_memalign(ms, alignment, bytes);
+}
+
+void** mspace_independent_calloc(mspace msp, size_t n_elements,
+ size_t elem_size, void* chunks[]) {
+ size_t sz = elem_size; /* serves as 1-element array */
+ mstate ms = (mstate)msp;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+ return ialloc(ms, n_elements, &sz, 3, chunks);
+}
+
+void** mspace_independent_comalloc(mspace msp, size_t n_elements,
+ size_t sizes[], void* chunks[]) {
+ mstate ms = (mstate)msp;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+ return ialloc(ms, n_elements, sizes, 0, chunks);
+}
+
+size_t mspace_bulk_free(mspace msp, void* array[], size_t nelem) {
+ return internal_bulk_free((mstate)msp, array, nelem);
+}
+
+#if MALLOC_INSPECT_ALL
+void mspace_inspect_all(mspace msp,
+ void(*handler)(void *start,
+ void *end,
+ size_t used_bytes,
+ void* callback_arg),
+ void* arg) {
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ if (!PREACTION(ms)) {
+ internal_inspect_all(ms, handler, arg);
+ POSTACTION(ms);
+ }
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+}
+#endif /* MALLOC_INSPECT_ALL */
+
+int mspace_trim(mspace msp, size_t pad) {
+ int result = 0;
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ if (!PREACTION(ms)) {
+ result = sys_trim(ms, pad);
+ POSTACTION(ms);
+ }
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return result;
+}
+
+#if !NO_MALLOC_STATS
+void mspace_malloc_stats(mspace msp) {
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ internal_malloc_stats(ms);
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+}
+#endif /* NO_MALLOC_STATS */
+
+size_t mspace_footprint(mspace msp) {
+ size_t result = 0;
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ result = ms->footprint;
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return result;
+}
+
+size_t mspace_max_footprint(mspace msp) {
+ size_t result = 0;
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ result = ms->max_footprint;
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return result;
+}
+
+size_t mspace_footprint_limit(mspace msp) {
+ size_t result = 0;
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ size_t maf = ms->footprint_limit;
+ result = (maf == 0) ? MAX_SIZE_T : maf;
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return result;
+}
+
+size_t mspace_set_footprint_limit(mspace msp, size_t bytes) {
+ size_t result = 0;
+ mstate ms = (mstate)msp;
+ if (ok_magic(ms)) {
+ if (bytes == 0)
+ result = granularity_align(1); /* Use minimal size */
+ if (bytes == MAX_SIZE_T)
+ result = 0; /* disable */
+ else
+ result = granularity_align(bytes);
+ ms->footprint_limit = result;
+ }
+ else {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return result;
+}
+
+#if !NO_MALLINFO
+struct mallinfo mspace_mallinfo(mspace msp) {
+ mstate ms = (mstate)msp;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ return internal_mallinfo(ms);
+}
+#endif /* NO_MALLINFO */
+
+size_t mspace_usable_size(const void* mem) {
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+ if (is_inuse(p))
+ return chunksize(p) - overhead_for(p);
+ }
+ return 0;
+}
+
+int mspace_mallopt(int param_number, int value) {
+ return change_mparam(param_number, value);
+}
+
+#endif /* MSPACES */
+
+
+/* -------------------- Alternative MORECORE functions ------------------- */
+
+/*
+ Guidelines for creating a custom version of MORECORE:
+
+ * For best performance, MORECORE should allocate in multiples of pagesize.
+ * MORECORE may allocate more memory than requested. (Or even less,
+ but this will usually result in a malloc failure.)
+ * MORECORE must not allocate memory when given argument zero, but
+ instead return one past the end address of memory from previous
+ nonzero call.
+ * For best performance, consecutive calls to MORECORE with positive
+ arguments should return increasing addresses, indicating that
+ space has been contiguously extended.
+ * Even though consecutive calls to MORECORE need not return contiguous
+ addresses, it must be OK for malloc'ed chunks to span multiple
+ regions in those cases where they do happen to be contiguous.
+ * MORECORE need not handle negative arguments -- it may instead
+ just return MFAIL when given negative arguments.
+ Negative arguments are always multiples of pagesize. MORECORE
+ must not misinterpret negative args as large positive unsigned
+ args. You can suppress all such calls from even occurring by defining
+ MORECORE_CANNOT_TRIM,
+
+ As an example alternative MORECORE, here is a custom allocator
+ kindly contributed for pre-OSX macOS. It uses virtually but not
+ necessarily physically contiguous non-paged memory (locked in,
+ present and won't get swapped out). You can use it by uncommenting
+ this section, adding some #includes, and setting up the appropriate
+ defines above:
+
+ #define MORECORE osMoreCore
+
+ There is also a shutdown routine that should somehow be called for
+ cleanup upon program exit.
+
+ #define MAX_POOL_ENTRIES 100
+ #define MINIMUM_MORECORE_SIZE (64 * 1024U)
+ static int next_os_pool;
+ void *our_os_pools[MAX_POOL_ENTRIES];
+
+ void *osMoreCore(int size)
+ {
+ void *ptr = 0;
+ static void *sbrk_top = 0;
+
+ if (size > 0)
+ {
+ if (size < MINIMUM_MORECORE_SIZE)
+ size = MINIMUM_MORECORE_SIZE;
+ if (CurrentExecutionLevel() == kTaskLevel)
+ ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0);
+ if (ptr == 0)
+ {
+ return (void *) MFAIL;
+ }
+ // save ptrs so they can be freed during cleanup
+ our_os_pools[next_os_pool] = ptr;
+ next_os_pool++;
+ ptr = (void *) ((((size_t) ptr) + RM_PAGE_MASK) & ~RM_PAGE_MASK);
+ sbrk_top = (char *) ptr + size;
+ return ptr;
+ }
+ else if (size < 0)
+ {
+ // we don't currently support shrink behavior
+ return (void *) MFAIL;
+ }
+ else
+ {
+ return sbrk_top;
+ }
+ }
+
+ // cleanup any allocated memory pools
+ // called as last thing before shutting down driver
+
+ void osCleanupMem(void)
+ {
+ void **ptr;
+
+ for (ptr = our_os_pools; ptr < &our_os_pools[MAX_POOL_ENTRIES]; ptr++)
+ if (*ptr)
+ {
+ PoolDeallocate(*ptr);
+ *ptr = 0;
+ }
+ }
+
+*/
+
+
+/* -----------------------------------------------------------------------
+History:
+ v2.8.6 Wed Aug 29 06:57:58 2012 Doug Lea
+ * fix bad comparison in dlposix_memalign
+ * don't reuse adjusted asize in sys_alloc
+ * add LOCK_AT_FORK -- thanks to Kirill Artamonov for the suggestion
+ * reduce compiler warnings -- thanks to all who reported/suggested these
+
+ v2.8.5 Sun May 22 10:26:02 2011 Doug Lea (dl at gee)
+ * Always perform unlink checks unless INSECURE
+ * Add posix_memalign.
+ * Improve realloc to expand in more cases; expose realloc_in_place.
+ Thanks to Peter Buhr for the suggestion.
+ * Add footprint_limit, inspect_all, bulk_free. Thanks
+ to Barry Hayes and others for the suggestions.
+ * Internal refactorings to avoid calls while holding locks
+ * Use non-reentrant locks by default. Thanks to Roland McGrath
+ for the suggestion.
+ * Small fixes to mspace_destroy, reset_on_error.
+ * Various configuration extensions/changes. Thanks
+ to all who contributed these.
+
+ V2.8.4a Thu Apr 28 14:39:43 2011 (dl at gee.cs.oswego.edu)
+ * Update Creative Commons URL
+
+ V2.8.4 Wed May 27 09:56:23 2009 Doug Lea (dl at gee)
+ * Use zeros instead of prev foot for is_mmapped
+ * Add mspace_track_large_chunks; thanks to Jean Brouwers
+ * Fix set_inuse in internal_realloc; thanks to Jean Brouwers
+ * Fix insufficient sys_alloc padding when using 16byte alignment
+ * Fix bad error check in mspace_footprint
+ * Adaptations for ptmalloc; thanks to Wolfram Gloger.
+ * Reentrant spin locks; thanks to Earl Chew and others
+ * Win32 improvements; thanks to Niall Douglas and Earl Chew
+ * Add NO_SEGMENT_TRAVERSAL and MAX_RELEASE_CHECK_RATE options
+ * Extension hook in malloc_state
+ * Various small adjustments to reduce warnings on some compilers
+ * Various configuration extensions/changes for more platforms. Thanks
+ to all who contributed these.
+
+ V2.8.3 Thu Sep 22 11:16:32 2005 Doug Lea (dl at gee)
+ * Add max_footprint functions
+ * Ensure all appropriate literals are size_t
+ * Fix conditional compilation problem for some #define settings
+ * Avoid concatenating segments with the one provided
+ in create_mspace_with_base
+ * Rename some variables to avoid compiler shadowing warnings
+ * Use explicit lock initialization.
+ * Better handling of sbrk interference.
+ * Simplify and fix segment insertion, trimming and mspace_destroy
+ * Reinstate REALLOC_ZERO_BYTES_FREES option from 2.7.x
+ * Thanks especially to Dennis Flanagan for help on these.
+
+ V2.8.2 Sun Jun 12 16:01:10 2005 Doug Lea (dl at gee)
+ * Fix memalign brace error.
+
+ V2.8.1 Wed Jun 8 16:11:46 2005 Doug Lea (dl at gee)
+ * Fix improper #endif nesting in C++
+ * Add explicit casts needed for C++
+
+ V2.8.0 Mon May 30 14:09:02 2005 Doug Lea (dl at gee)
+ * Use trees for large bins
+ * Support mspaces
+ * Use segments to unify sbrk-based and mmap-based system allocation,
+ removing need for emulation on most platforms without sbrk.
+ * Default safety checks
+ * Optional footer checks. Thanks to William Robertson for the idea.
+ * Internal code refactoring
+ * Incorporate suggestions and platform-specific changes.
+ Thanks to Dennis Flanagan, Colin Plumb, Niall Douglas,
+ Aaron Bachmann, Emery Berger, and others.
+ * Speed up non-fastbin processing enough to remove fastbins.
+ * Remove useless cfree() to avoid conflicts with other apps.
+ * Remove internal memcpy, memset. Compilers handle builtins better.
+ * Remove some options that no one ever used and rename others.
+
+ V2.7.2 Sat Aug 17 09:07:30 2002 Doug Lea (dl at gee)
+ * Fix malloc_state bitmap array misdeclaration
+
+ V2.7.1 Thu Jul 25 10:58:03 2002 Doug Lea (dl at gee)
+ * Allow tuning of FIRST_SORTED_BIN_SIZE
+ * Use PTR_UINT as type for all ptr->int casts. Thanks to John Belmonte.
+ * Better detection and support for non-contiguousness of MORECORE.
+ Thanks to Andreas Mueller, Conal Walsh, and Wolfram Gloger
+ * Bypass most of malloc if no frees. Thanks To Emery Berger.
+ * Fix freeing of old top non-contiguous chunk im sysmalloc.
+ * Raised default trim and map thresholds to 256K.
+ * Fix mmap-related #defines. Thanks to Lubos Lunak.
+ * Fix copy macros; added LACKS_FCNTL_H. Thanks to Neal Walfield.
+ * Branch-free bin calculation
+ * Default trim and mmap thresholds now 256K.
+
+ V2.7.0 Sun Mar 11 14:14:06 2001 Doug Lea (dl at gee)
+ * Introduce independent_comalloc and independent_calloc.
+ Thanks to Michael Pachos for motivation and help.
+ * Make optional .h file available
+ * Allow > 2GB requests on 32bit systems.
+ * new WIN32 sbrk, mmap, munmap, lock code from <Walter@GeNeSys-e.de>.
+ Thanks also to Andreas Mueller <a.mueller at paradatec.de>,
+ and Anonymous.
+ * Allow override of MALLOC_ALIGNMENT (Thanks to Ruud Waij for
+ helping test this.)
+ * memalign: check alignment arg
+ * realloc: don't try to shift chunks backwards, since this
+ leads to more fragmentation in some programs and doesn't
+ seem to help in any others.
+ * Collect all cases in malloc requiring system memory into sysmalloc
+ * Use mmap as backup to sbrk
+ * Place all internal state in malloc_state
+ * Introduce fastbins (although similar to 2.5.1)
+ * Many minor tunings and cosmetic improvements
+ * Introduce USE_PUBLIC_MALLOC_WRAPPERS, USE_MALLOC_LOCK
+ * Introduce MALLOC_FAILURE_ACTION, MORECORE_CONTIGUOUS
+ Thanks to Tony E. Bennett <tbennett@nvidia.com> and others.
+ * Include errno.h to support default failure action.
+
+ V2.6.6 Sun Dec 5 07:42:19 1999 Doug Lea (dl at gee)
+ * return null for negative arguments
+ * Added Several WIN32 cleanups from Martin C. Fong <mcfong at yahoo.com>
+ * Add 'LACKS_SYS_PARAM_H' for those systems without 'sys/param.h'
+ (e.g. WIN32 platforms)
+ * Cleanup header file inclusion for WIN32 platforms
+ * Cleanup code to avoid Microsoft Visual C++ compiler complaints
+ * Add 'USE_DL_PREFIX' to quickly allow co-existence with existing
+ memory allocation routines
+ * Set 'malloc_getpagesize' for WIN32 platforms (needs more work)
+ * Use 'assert' rather than 'ASSERT' in WIN32 code to conform to
+ usage of 'assert' in non-WIN32 code
+ * Improve WIN32 'sbrk()' emulation's 'findRegion()' routine to
+ avoid infinite loop
+ * Always call 'fREe()' rather than 'free()'
+
+ V2.6.5 Wed Jun 17 15:57:31 1998 Doug Lea (dl at gee)
+ * Fixed ordering problem with boundary-stamping
+
+ V2.6.3 Sun May 19 08:17:58 1996 Doug Lea (dl at gee)
+ * Added pvalloc, as recommended by H.J. Liu
+ * Added 64bit pointer support mainly from Wolfram Gloger
+ * Added anonymously donated WIN32 sbrk emulation
+ * Malloc, calloc, getpagesize: add optimizations from Raymond Nijssen
+ * malloc_extend_top: fix mask error that caused wastage after
+ foreign sbrks
+ * Add linux mremap support code from HJ Liu
+
+ V2.6.2 Tue Dec 5 06:52:55 1995 Doug Lea (dl at gee)
+ * Integrated most documentation with the code.
+ * Add support for mmap, with help from
+ Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
+ * Use last_remainder in more cases.
+ * Pack bins using idea from colin@nyx10.cs.du.edu
+ * Use ordered bins instead of best-fit threshold
+ * Eliminate block-local decls to simplify tracing and debugging.
+ * Support another case of realloc via move into top
+ * Fix error occurring when initial sbrk_base not word-aligned.
+ * Rely on page size for units instead of SBRK_UNIT to
+ avoid surprises about sbrk alignment conventions.
+ * Add mallinfo, mallopt. Thanks to Raymond Nijssen
+ (raymond@es.ele.tue.nl) for the suggestion.
+ * Add `pad' argument to malloc_trim and top_pad mallopt parameter.
+ * More precautions for cases where other routines call sbrk,
+ courtesy of Wolfram Gloger (Gloger@lrz.uni-muenchen.de).
+ * Added macros etc., allowing use in linux libc from
+ H.J. Lu (hjl@gnu.ai.mit.edu)
+ * Inverted this history list
+
+ V2.6.1 Sat Dec 2 14:10:57 1995 Doug Lea (dl at gee)
+ * Re-tuned and fixed to behave more nicely with V2.6.0 changes.
+ * Removed all preallocation code since under current scheme
+ the work required to undo bad preallocations exceeds
+ the work saved in good cases for most test programs.
+ * No longer use return list or unconsolidated bins since
+ no scheme using them consistently outperforms those that don't
+ given above changes.
+ * Use best fit for very large chunks to prevent some worst-cases.
+ * Added some support for debugging
+
+ V2.6.0 Sat Nov 4 07:05:23 1995 Doug Lea (dl at gee)
+ * Removed footers when chunks are in use. Thanks to
+ Paul Wilson (wilson@cs.texas.edu) for the suggestion.
+
+ V2.5.4 Wed Nov 1 07:54:51 1995 Doug Lea (dl at gee)
+ * Added malloc_trim, with help from Wolfram Gloger
+ (wmglo@Dent.MED.Uni-Muenchen.DE).
+
+ V2.5.3 Tue Apr 26 10:16:01 1994 Doug Lea (dl at g)
+
+ V2.5.2 Tue Apr 5 16:20:40 1994 Doug Lea (dl at g)
+ * realloc: try to expand in both directions
+ * malloc: swap order of clean-bin strategy;
+ * realloc: only conditionally expand backwards
+ * Try not to scavenge used bins
+ * Use bin counts as a guide to preallocation
+ * Occasionally bin return list chunks in first scan
+ * Add a few optimizations from colin@nyx10.cs.du.edu
+
+ V2.5.1 Sat Aug 14 15:40:43 1993 Doug Lea (dl at g)
+ * faster bin computation & slightly different binning
+ * merged all consolidations to one part of malloc proper
+ (eliminating old malloc_find_space & malloc_clean_bin)
+ * Scan 2 returns chunks (not just 1)
+ * Propagate failure in realloc if malloc returns 0
+ * Add stuff to allow compilation on non-ANSI compilers
+ from kpv@research.att.com
+
+ V2.5 Sat Aug 7 07:41:59 1993 Doug Lea (dl at g.oswego.edu)
+ * removed potential for odd address access in prev_chunk
+ * removed dependency on getpagesize.h
+ * misc cosmetics and a bit more internal documentation
+ * anticosmetics: mangled names in macros to evade debugger strangeness
+ * tested on sparc, hp-700, dec-mips, rs6000
+ with gcc & native cc (hp, dec only) allowing
+ Detlefs & Zorn comparison study (in SIGPLAN Notices.)
+
+ Trial version Fri Aug 28 13:14:29 1992 Doug Lea (dl at g.oswego.edu)
+ * Based loosely on libg++-1.2X malloc. (It retains some of the overall
+ structure of old version, but most details differ.)
+
+*/
diff --git a/src/third_party/boost-1.69.0/libs/container/src/dlmalloc_ext_2_8_6.c b/src/third_party/boost-1.69.0/libs/container/src/dlmalloc_ext_2_8_6.c
new file mode 100644
index 00000000000..918ce020b4f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/container/src/dlmalloc_ext_2_8_6.c
@@ -0,0 +1,1484 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2007-2015. Distributed under the Boost
+// Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/container for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#include <boost/container/detail/alloc_lib.h>
+
+#include "errno.h" //dlmalloc bug EINVAL is used in posix_memalign without checking LACKS_ERRNO_H
+#include "limits.h" //CHAR_BIT
+#ifdef BOOST_CONTAINER_DLMALLOC_FOOTERS
+#define FOOTERS 1
+#endif
+#define USE_LOCKS 1
+#define MSPACES 1
+#define NO_MALLINFO 1
+#define NO_MALLOC_STATS 1
+//disable sbrk as it's deprecated in some systems and weakens ASLR
+#define HAVE_MORECORE 0
+
+
+#if !defined(NDEBUG)
+ #if !defined(DEBUG)
+ #define DEBUG 1
+ #define DL_DEBUG_DEFINED
+ #endif
+#endif
+
+#define USE_DL_PREFIX
+
+#ifdef __GNUC__
+#define FORCEINLINE inline
+#endif
+#include "dlmalloc_2_8_6.c"
+
+#ifdef _MSC_VER
+#pragma warning (push)
+#pragma warning (disable : 4127)
+#pragma warning (disable : 4267)
+#pragma warning (disable : 4127)
+#pragma warning (disable : 4702)
+#pragma warning (disable : 4390) /*empty controlled statement found; is this the intent?*/
+#pragma warning (disable : 4251 4231 4660) /*dll warnings*/
+#endif
+
+#define DL_SIZE_IMPL(p) (chunksize(mem2chunk(p)) - overhead_for(mem2chunk(p)))
+
+static size_t s_allocated_memory;
+
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+//
+// SLIGHTLY MODIFIED DLMALLOC FUNCTIONS
+//
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+
+//This function is equal to mspace_free
+//replacing PREACTION with 0 and POSTACTION with nothing
+static void mspace_free_lockless(mspace msp, void* mem)
+{
+ if (mem != 0) {
+ mchunkptr p = mem2chunk(mem);
+#if FOOTERS
+ mstate fm = get_mstate_for(p);
+ msp = msp; /* placate people compiling -Wunused */
+#else /* FOOTERS */
+ mstate fm = (mstate)msp;
+#endif /* FOOTERS */
+ if (!ok_magic(fm)) {
+ USAGE_ERROR_ACTION(fm, p);
+ return;
+ }
+ if (!0){//PREACTION(fm)) {
+ check_inuse_chunk(fm, p);
+ if (RTCHECK(ok_address(fm, p) && ok_inuse(p))) {
+ size_t psize = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, psize);
+ if (!pinuse(p)) {
+ size_t prevsize = p->prev_foot;
+ if (is_mmapped(p)) {
+ psize += prevsize + MMAP_FOOT_PAD;
+ if (CALL_MUNMAP((char*)p - prevsize, psize) == 0)
+ fm->footprint -= psize;
+ goto postaction;
+ }
+ else {
+ mchunkptr prev = chunk_minus_offset(p, prevsize);
+ psize += prevsize;
+ p = prev;
+ if (RTCHECK(ok_address(fm, prev))) { /* consolidate backward */
+ if (p != fm->dv) {
+ unlink_chunk(fm, p, prevsize);
+ }
+ else if ((next->head & INUSE_BITS) == INUSE_BITS) {
+ fm->dvsize = psize;
+ set_free_with_pinuse(p, psize, next);
+ goto postaction;
+ }
+ }
+ else
+ goto erroraction;
+ }
+ }
+
+ if (RTCHECK(ok_next(p, next) && ok_pinuse(next))) {
+ if (!cinuse(next)) { /* consolidate forward */
+ if (next == fm->top) {
+ size_t tsize = fm->topsize += psize;
+ fm->top = p;
+ p->head = tsize | PINUSE_BIT;
+ if (p == fm->dv) {
+ fm->dv = 0;
+ fm->dvsize = 0;
+ }
+ if (should_trim(fm, tsize))
+ sys_trim(fm, 0);
+ goto postaction;
+ }
+ else if (next == fm->dv) {
+ size_t dsize = fm->dvsize += psize;
+ fm->dv = p;
+ set_size_and_pinuse_of_free_chunk(p, dsize);
+ goto postaction;
+ }
+ else {
+ size_t nsize = chunksize(next);
+ psize += nsize;
+ unlink_chunk(fm, next, nsize);
+ set_size_and_pinuse_of_free_chunk(p, psize);
+ if (p == fm->dv) {
+ fm->dvsize = psize;
+ goto postaction;
+ }
+ }
+ }
+ else
+ set_free_with_pinuse(p, psize, next);
+
+ if (is_small(psize)) {
+ insert_small_chunk(fm, p, psize);
+ check_free_chunk(fm, p);
+ }
+ else {
+ tchunkptr tp = (tchunkptr)p;
+ insert_large_chunk(fm, tp, psize);
+ check_free_chunk(fm, p);
+ if (--fm->release_checks == 0)
+ release_unused_segments(fm);
+ }
+ goto postaction;
+ }
+ }
+ erroraction:
+ USAGE_ERROR_ACTION(fm, p);
+ postaction:
+ ;//POSTACTION(fm);
+ }
+ }
+}
+
+//This function is equal to mspace_malloc
+//replacing PREACTION with 0 and POSTACTION with nothing
+void* mspace_malloc_lockless(mspace msp, size_t bytes)
+{
+ mstate ms = (mstate)msp;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+ if (!0){//PREACTION(ms)) {
+ void* mem;
+ size_t nb;
+ if (bytes <= MAX_SMALL_REQUEST) {
+ bindex_t idx;
+ binmap_t smallbits;
+ nb = (bytes < MIN_REQUEST)? MIN_CHUNK_SIZE : pad_request(bytes);
+ idx = small_index(nb);
+ smallbits = ms->smallmap >> idx;
+
+ if ((smallbits & 0x3U) != 0) { /* Remainderless fit to a smallbin. */
+ mchunkptr b, p;
+ idx += ~smallbits & 1; /* Uses next bin if idx empty */
+ b = smallbin_at(ms, idx);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(idx));
+ unlink_first_small_chunk(ms, b, p, idx);
+ set_inuse_and_pinuse(ms, p, small_index2size(idx));
+ mem = chunk2mem(p);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ else if (nb > ms->dvsize) {
+ if (smallbits != 0) { /* Use chunk in next nonempty smallbin */
+ mchunkptr b, p, r;
+ size_t rsize;
+ bindex_t i;
+ binmap_t leftbits = (smallbits << idx) & left_bits(idx2bit(idx));
+ binmap_t leastbit = least_bit(leftbits);
+ compute_bit2idx(leastbit, i);
+ b = smallbin_at(ms, i);
+ p = b->fd;
+ assert(chunksize(p) == small_index2size(i));
+ unlink_first_small_chunk(ms, b, p, i);
+ rsize = small_index2size(i) - nb;
+ /* Fit here cannot be remainderless if 4byte sizes */
+ if (SIZE_T_SIZE != 4 && rsize < MIN_CHUNK_SIZE)
+ set_inuse_and_pinuse(ms, p, small_index2size(i));
+ else {
+ set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
+ r = chunk_plus_offset(p, nb);
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ replace_dv(ms, r, rsize);
+ }
+ mem = chunk2mem(p);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ else if (ms->treemap != 0 && (mem = tmalloc_small(ms, nb)) != 0) {
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+ }
+ }
+ else if (bytes >= MAX_REQUEST)
+ nb = MAX_SIZE_T; /* Too big to allocate. Force failure (in sys alloc) */
+ else {
+ nb = pad_request(bytes);
+ if (ms->treemap != 0 && (mem = tmalloc_large(ms, nb)) != 0) {
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+ }
+
+ if (nb <= ms->dvsize) {
+ size_t rsize = ms->dvsize - nb;
+ mchunkptr p = ms->dv;
+ if (rsize >= MIN_CHUNK_SIZE) { /* split dv */
+ mchunkptr r = ms->dv = chunk_plus_offset(p, nb);
+ ms->dvsize = rsize;
+ set_size_and_pinuse_of_free_chunk(r, rsize);
+ set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
+ }
+ else { /* exhaust dv */
+ size_t dvs = ms->dvsize;
+ ms->dvsize = 0;
+ ms->dv = 0;
+ set_inuse_and_pinuse(ms, p, dvs);
+ }
+ mem = chunk2mem(p);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ else if (nb < ms->topsize) { /* Split top */
+ size_t rsize = ms->topsize -= nb;
+ mchunkptr p = ms->top;
+ mchunkptr r = ms->top = chunk_plus_offset(p, nb);
+ r->head = rsize | PINUSE_BIT;
+ set_size_and_pinuse_of_inuse_chunk(ms, p, nb);
+ mem = chunk2mem(p);
+ check_top_chunk(ms, ms->top);
+ check_malloced_chunk(ms, mem, nb);
+ goto postaction;
+ }
+
+ mem = sys_alloc(ms, nb);
+
+ postaction:
+ ;//POSTACTION(ms);
+ return mem;
+ }
+
+ return 0;
+}
+
+//This function is equal to try_realloc_chunk but handling
+//minimum and desired bytes
+static mchunkptr try_realloc_chunk_with_min(mstate m, mchunkptr p, size_t min_nb, size_t des_nb, int can_move)
+{
+ mchunkptr newp = 0;
+ size_t oldsize = chunksize(p);
+ mchunkptr next = chunk_plus_offset(p, oldsize);
+ if (RTCHECK(ok_address(m, p) && ok_inuse(p) &&
+ ok_next(p, next) && ok_pinuse(next))) {
+ if (is_mmapped(p)) {
+ newp = mmap_resize(m, p, des_nb, can_move);
+ if(!newp) //mmap does not return how many bytes we could reallocate, so go the minimum
+ newp = mmap_resize(m, p, min_nb, can_move);
+ }
+ else if (oldsize >= min_nb) { /* already big enough */
+ size_t nb = oldsize >= des_nb ? des_nb : oldsize;
+ size_t rsize = oldsize - nb;
+ if (rsize >= MIN_CHUNK_SIZE) { /* split off remainder */
+ mchunkptr r = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ set_inuse(m, r, rsize);
+ dispose_chunk(m, r, rsize);
+ }
+ newp = p;
+ }
+ else if (next == m->top) { /* extend into top */
+ if (oldsize + m->topsize > min_nb) {
+ size_t nb = (oldsize + m->topsize) > des_nb ? des_nb : (oldsize + m->topsize - MALLOC_ALIGNMENT);
+ size_t newsize = oldsize + m->topsize;
+ size_t newtopsize = newsize - nb;
+ mchunkptr newtop = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ newtop->head = newtopsize |PINUSE_BIT;
+ m->top = newtop;
+ m->topsize = newtopsize;
+ newp = p;
+ }
+ }
+ else if (next == m->dv) { /* extend into dv */
+ size_t dvs = m->dvsize;
+ if (oldsize + dvs >= min_nb) {
+ size_t nb = (oldsize + dvs) >= des_nb ? des_nb : (oldsize + dvs);
+ size_t dsize = oldsize + dvs - nb;
+ if (dsize >= MIN_CHUNK_SIZE) {
+ mchunkptr r = chunk_plus_offset(p, nb);
+ mchunkptr n = chunk_plus_offset(r, dsize);
+ set_inuse(m, p, nb);
+ set_size_and_pinuse_of_free_chunk(r, dsize);
+ clear_pinuse(n);
+ m->dvsize = dsize;
+ m->dv = r;
+ }
+ else { /* exhaust dv */
+ size_t newsize = oldsize + dvs;
+ set_inuse(m, p, newsize);
+ m->dvsize = 0;
+ m->dv = 0;
+ }
+ newp = p;
+ }
+ }
+ else if (!cinuse(next)) { /* extend into next free chunk */
+ size_t nextsize = chunksize(next);
+ if (oldsize + nextsize >= min_nb) {
+ size_t nb = (oldsize + nextsize) >= des_nb ? des_nb : (oldsize + nextsize);
+ size_t rsize = oldsize + nextsize - nb;
+ unlink_chunk(m, next, nextsize);
+ if (rsize < MIN_CHUNK_SIZE) {
+ size_t newsize = oldsize + nextsize;
+ set_inuse(m, p, newsize);
+ }
+ else {
+ mchunkptr r = chunk_plus_offset(p, nb);
+ set_inuse(m, p, nb);
+ set_inuse(m, r, rsize);
+ dispose_chunk(m, r, rsize);
+ }
+ newp = p;
+ }
+ }
+ }
+ else {
+ USAGE_ERROR_ACTION(m, chunk2mem(p));
+ }
+ return newp;
+}
+
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+//
+// NEW FUNCTIONS BASED ON DLMALLOC INTERNALS
+//
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+///////////////////////////////////////////////////////////////
+
+#define GET_TRUNCATED_SIZE(ORIG_SIZE, ROUNDTO) ((ORIG_SIZE)/(ROUNDTO)*(ROUNDTO))
+#define GET_ROUNDED_SIZE(ORIG_SIZE, ROUNDTO) ((((ORIG_SIZE)-1)/(ROUNDTO)+1)*(ROUNDTO))
+#define GET_TRUNCATED_PO2_SIZE(ORIG_SIZE, ROUNDTO) ((ORIG_SIZE) & (~(ROUNDTO-1)))
+#define GET_ROUNDED_PO2_SIZE(ORIG_SIZE, ROUNDTO) (((ORIG_SIZE - 1) & (~(ROUNDTO-1))) + ROUNDTO)
+
+/* Greatest common divisor and least common multiple
+ gcd is an algorithm that calculates the greatest common divisor of two
+ integers, using Euclid's algorithm.
+
+ Pre: A > 0 && B > 0
+ Recommended: A > B*/
+#define CALCULATE_GCD(A, B, OUT)\
+{\
+ size_t a = A;\
+ size_t b = B;\
+ do\
+ {\
+ size_t tmp = b;\
+ b = a % b;\
+ a = tmp;\
+ } while (b != 0);\
+\
+ OUT = a;\
+}
+
+/* lcm is an algorithm that calculates the least common multiple of two
+ integers.
+
+ Pre: A > 0 && B > 0
+ Recommended: A > B*/
+#define CALCULATE_LCM(A, B, OUT)\
+{\
+ CALCULATE_GCD(A, B, OUT);\
+ OUT = (A / OUT)*B;\
+}
+
+static int calculate_lcm_and_needs_backwards_lcmed
+ (size_t backwards_multiple, size_t received_size, size_t size_to_achieve,
+ size_t *plcm, size_t *pneeds_backwards_lcmed)
+{
+ /* Now calculate lcm */
+ size_t max = backwards_multiple;
+ size_t min = MALLOC_ALIGNMENT;
+ size_t needs_backwards;
+ size_t needs_backwards_lcmed;
+ size_t lcm;
+ size_t current_forward;
+ /*Swap if necessary*/
+ if(max < min){
+ size_t tmp = min;
+ min = max;
+ max = tmp;
+ }
+ /*Check if it's power of two*/
+ if((backwards_multiple & (backwards_multiple-1)) == 0){
+ if(0 != (size_to_achieve & ((backwards_multiple-1)))){
+ USAGE_ERROR_ACTION(m, oldp);
+ return 0;
+ }
+
+ lcm = max;
+ /*If we want to use minbytes data to get a buffer between maxbytes
+ and minbytes if maxbytes can't be achieved, calculate the
+ biggest of all possibilities*/
+ current_forward = GET_TRUNCATED_PO2_SIZE(received_size, backwards_multiple);
+ needs_backwards = size_to_achieve - current_forward;
+ assert((needs_backwards % backwards_multiple) == 0);
+ needs_backwards_lcmed = GET_ROUNDED_PO2_SIZE(needs_backwards, lcm);
+ *plcm = lcm;
+ *pneeds_backwards_lcmed = needs_backwards_lcmed;
+ return 1;
+ }
+ /*Check if it's multiple of alignment*/
+ else if((backwards_multiple & (MALLOC_ALIGNMENT - 1u)) == 0){
+ lcm = backwards_multiple;
+ current_forward = GET_TRUNCATED_SIZE(received_size, backwards_multiple);
+ //No need to round needs_backwards because backwards_multiple == lcm
+ needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
+ assert((needs_backwards_lcmed & (MALLOC_ALIGNMENT - 1u)) == 0);
+ *plcm = lcm;
+ *pneeds_backwards_lcmed = needs_backwards_lcmed;
+ return 1;
+ }
+ /*Check if it's multiple of the half of the alignmment*/
+ else if((backwards_multiple & ((MALLOC_ALIGNMENT/2u) - 1u)) == 0){
+ lcm = backwards_multiple*2u;
+ current_forward = GET_TRUNCATED_SIZE(received_size, backwards_multiple);
+ needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
+ if(0 != (needs_backwards_lcmed & (MALLOC_ALIGNMENT-1)))
+ //while(0 != (needs_backwards_lcmed & (MALLOC_ALIGNMENT-1)))
+ needs_backwards_lcmed += backwards_multiple;
+ assert((needs_backwards_lcmed % lcm) == 0);
+ *plcm = lcm;
+ *pneeds_backwards_lcmed = needs_backwards_lcmed;
+ return 1;
+ }
+ /*Check if it's multiple of the quarter of the alignmment*/
+ else if((backwards_multiple & ((MALLOC_ALIGNMENT/4u) - 1u)) == 0){
+ size_t remainder;
+ lcm = backwards_multiple*4u;
+ current_forward = GET_TRUNCATED_SIZE(received_size, backwards_multiple);
+ needs_backwards_lcmed = needs_backwards = size_to_achieve - current_forward;
+ //while(0 != (needs_backwards_lcmed & (MALLOC_ALIGNMENT-1)))
+ //needs_backwards_lcmed += backwards_multiple;
+ if(0 != (remainder = ((needs_backwards_lcmed & (MALLOC_ALIGNMENT-1))>>(MALLOC_ALIGNMENT/8u)))){
+ if(backwards_multiple & MALLOC_ALIGNMENT/2u){
+ needs_backwards_lcmed += (remainder)*backwards_multiple;
+ }
+ else{
+ needs_backwards_lcmed += (4-remainder)*backwards_multiple;
+ }
+ }
+ assert((needs_backwards_lcmed % lcm) == 0);
+ *plcm = lcm;
+ *pneeds_backwards_lcmed = needs_backwards_lcmed;
+ return 1;
+ }
+ else{
+ CALCULATE_LCM(max, min, lcm);
+ /*If we want to use minbytes data to get a buffer between maxbytes
+ and minbytes if maxbytes can't be achieved, calculate the
+ biggest of all possibilities*/
+ current_forward = GET_TRUNCATED_SIZE(received_size, backwards_multiple);
+ needs_backwards = size_to_achieve - current_forward;
+ assert((needs_backwards % backwards_multiple) == 0);
+ needs_backwards_lcmed = GET_ROUNDED_SIZE(needs_backwards, lcm);
+ *plcm = lcm;
+ *pneeds_backwards_lcmed = needs_backwards_lcmed;
+ return 1;
+ }
+}
+
+static void *internal_grow_both_sides
+ (mstate m
+ ,allocation_type command
+ ,void *oldmem
+ ,size_t minbytes
+ ,size_t maxbytes
+ ,size_t *received_size
+ ,size_t backwards_multiple
+ ,int only_preferred_backwards)
+{
+ mchunkptr oldp = mem2chunk(oldmem);
+ size_t oldsize = chunksize(oldp);
+ *received_size = oldsize - overhead_for(oldp);
+ if(minbytes <= *received_size)
+ return oldmem;
+
+ if (RTCHECK(ok_address(m, oldp) && ok_inuse(oldp))) {
+ if(command & BOOST_CONTAINER_EXPAND_FWD){
+ if(try_realloc_chunk_with_min(m, oldp, request2size(minbytes), request2size(maxbytes), 0)){
+ check_inuse_chunk(m, oldp);
+ *received_size = DL_SIZE_IMPL(oldmem);
+ s_allocated_memory += chunksize(oldp) - oldsize;
+ return oldmem;
+ }
+ }
+ else{
+ *received_size = DL_SIZE_IMPL(oldmem);
+ if(*received_size >= maxbytes)
+ return oldmem;
+ }
+/*
+ Should we check this?
+ if(backwards_multiple &&
+ (0 != (minbytes % backwards_multiple) &&
+ 0 != (maxbytes % backwards_multiple)) ){
+ USAGE_ERROR_ACTION(m, oldp);
+ return 0;
+ }
+*/
+ /* We reach here only if forward expansion fails */
+ if(!(command & BOOST_CONTAINER_EXPAND_BWD) || pinuse(oldp)){
+ return 0;
+ }
+ {
+ size_t prevsize = oldp->prev_foot;
+ if ((prevsize & USE_MMAP_BIT) != 0){
+ /*Return failure the previous chunk was mmapped.
+ mremap does not allow expanding to a fixed address (MREMAP_MAYMOVE) without
+ copying (MREMAP_MAYMOVE must be also set).*/
+ return 0;
+ }
+ else {
+ mchunkptr prev = chunk_minus_offset(oldp, prevsize);
+ size_t dsize = oldsize + prevsize;
+ size_t needs_backwards_lcmed;
+ size_t lcm;
+
+ /* Let's calculate the number of extra bytes of data before the current
+ block's begin. The value is a multiple of backwards_multiple
+ and the alignment*/
+ if(!calculate_lcm_and_needs_backwards_lcmed
+ ( backwards_multiple, *received_size
+ , only_preferred_backwards ? maxbytes : minbytes
+ , &lcm, &needs_backwards_lcmed)
+ || !RTCHECK(ok_address(m, prev))){
+ USAGE_ERROR_ACTION(m, oldp);
+ return 0;
+ }
+ /* Check if previous block has enough size */
+ else if(prevsize < needs_backwards_lcmed){
+ /* preferred size? */
+ return 0;
+ }
+ /* Now take all next space. This must succeed, as we've previously calculated the correct size */
+ if(command & BOOST_CONTAINER_EXPAND_FWD){
+ if(!try_realloc_chunk_with_min(m, oldp, request2size(*received_size), request2size(*received_size), 0)){
+ assert(0);
+ }
+ check_inuse_chunk(m, oldp);
+ *received_size = DL_SIZE_IMPL(oldmem);
+ s_allocated_memory += chunksize(oldp) - oldsize;
+ oldsize = chunksize(oldp);
+ dsize = oldsize + prevsize;
+ }
+ /* We need a minimum size to split the previous one */
+ if(prevsize >= (needs_backwards_lcmed + MIN_CHUNK_SIZE)){
+ mchunkptr r = chunk_minus_offset(oldp, needs_backwards_lcmed);
+ size_t rsize = oldsize + needs_backwards_lcmed;
+ size_t newprevsize = dsize - rsize;
+ int prev_was_dv = prev == m->dv;
+
+ assert(newprevsize >= MIN_CHUNK_SIZE);
+
+ if (prev_was_dv) {
+ m->dvsize = newprevsize;
+ }
+ else{/* if ((next->head & INUSE_BITS) == INUSE_BITS) { */
+ unlink_chunk(m, prev, prevsize);
+ insert_chunk(m, prev, newprevsize);
+ }
+
+ set_size_and_pinuse_of_free_chunk(prev, newprevsize);
+ clear_pinuse(r);
+ set_inuse(m, r, rsize);
+ check_malloced_chunk(m, chunk2mem(r), rsize);
+ *received_size = chunksize(r) - overhead_for(r);
+ s_allocated_memory += chunksize(r) - oldsize;
+ return chunk2mem(r);
+ }
+ /* Check if there is no place to create a new block and
+ the whole new block is multiple of the backwards expansion multiple */
+ else if(prevsize >= needs_backwards_lcmed && !(prevsize % lcm)) {
+ /* Just merge the whole previous block */
+ /* prevsize is multiple of lcm (and backwards_multiple)*/
+ *received_size += prevsize;
+
+ if (prev != m->dv) {
+ unlink_chunk(m, prev, prevsize);
+ }
+ else{
+ m->dvsize = 0;
+ m->dv = 0;
+ }
+ set_inuse(m, prev, dsize);
+ check_malloced_chunk(m, chunk2mem(prev), dsize);
+ s_allocated_memory += chunksize(prev) - oldsize;
+ return chunk2mem(prev);
+ }
+ else{
+ /* Previous block was big enough but there is no room
+ to create an empty block and taking the whole block does
+ not fulfill alignment requirements */
+ return 0;
+ }
+ }
+ }
+ }
+ else{
+ USAGE_ERROR_ACTION(m, oldmem);
+ return 0;
+ }
+ return 0;
+}
+
+/* This is similar to mmap_resize but:
+ * Only to shrink
+ * It takes min and max sizes
+ * Takes additional 'do_commit' argument to obtain the final
+ size before doing the real shrink operation.
+*/
+static int internal_mmap_shrink_in_place(mstate m, mchunkptr oldp, size_t nbmin, size_t nbmax, size_t *received_size, int do_commit)
+{
+ size_t oldsize = chunksize(oldp);
+ *received_size = oldsize;
+ #if HAVE_MREMAP
+ if (is_small(nbmax)) /* Can't shrink mmap regions below small size */
+ return 0;
+ {
+ size_t effective_min = nbmin > MIN_LARGE_SIZE ? nbmin : MIN_LARGE_SIZE;
+ /* Keep old chunk if big enough but not too big */
+ if (oldsize >= effective_min + SIZE_T_SIZE &&
+ (oldsize - effective_min) <= (mparams.granularity << 1))
+ return 0;
+ /* Now calculate new sizes */
+ {
+ size_t offset = oldp->prev_foot;
+ size_t oldmmsize = oldsize + offset + MMAP_FOOT_PAD;
+ size_t newmmsize = mmap_align(effective_min + SIX_SIZE_T_SIZES + CHUNK_ALIGN_MASK);
+ *received_size = newmmsize;
+ if(!do_commit){
+ const int flags = 0; /* placate people compiling -Wunused */
+ char* cp = (char*)CALL_MREMAP((char*)oldp - offset,
+ oldmmsize, newmmsize, flags);
+ /*This must always succeed */
+ if(!cp){
+ USAGE_ERROR_ACTION(m, m);
+ return 0;
+ }
+ {
+ mchunkptr newp = (mchunkptr)(cp + offset);
+ size_t psize = newmmsize - offset - MMAP_FOOT_PAD;
+ newp->head = psize;
+ mark_inuse_foot(m, newp, psize);
+ chunk_plus_offset(newp, psize)->head = FENCEPOST_HEAD;
+ chunk_plus_offset(newp, psize+SIZE_T_SIZE)->head = 0;
+
+ if (cp < m->least_addr)
+ m->least_addr = cp;
+ if ((m->footprint += newmmsize - oldmmsize) > m->max_footprint)
+ m->max_footprint = m->footprint;
+ check_mmapped_chunk(m, newp);
+ }
+ }
+ }
+ return 1;
+ }
+ #else //#if HAVE_MREMAP
+ (void)m;
+ (void)oldp;
+ (void)nbmin;
+ (void)nbmax;
+ (void)received_size;
+ (void)do_commit;
+ return 0;
+ #endif //#if HAVE_MREMAP
+}
+
+static int internal_shrink(mstate m, void* oldmem, size_t minbytes, size_t maxbytes, size_t *received_size, int do_commit)
+{
+ *received_size = chunksize(mem2chunk(oldmem)) - overhead_for(mem2chunk(oldmem));
+ if (minbytes >= MAX_REQUEST || maxbytes >= MAX_REQUEST) {
+ MALLOC_FAILURE_ACTION;
+ return 0;
+ }
+ else if(minbytes < MIN_REQUEST){
+ minbytes = MIN_REQUEST;
+ }
+ if (minbytes > maxbytes) {
+ return 0;
+ }
+
+ {
+ mchunkptr oldp = mem2chunk(oldmem);
+ size_t oldsize = chunksize(oldp);
+ mchunkptr next = chunk_plus_offset(oldp, oldsize);
+ void* extra = 0;
+
+ /* Try to either shrink or extend into top. Else malloc-copy-free*/
+ if (RTCHECK(ok_address(m, oldp) && ok_inuse(oldp) &&
+ ok_next(oldp, next) && ok_pinuse(next))) {
+ size_t nbmin = request2size(minbytes);
+ size_t nbmax = request2size(maxbytes);
+
+ if (nbmin > oldsize){
+ /* Return error if old size is too small */
+ }
+ else if (is_mmapped(oldp)){
+ return internal_mmap_shrink_in_place(m, oldp, nbmin, nbmax, received_size, do_commit);
+ }
+ else{ // nbmin <= oldsize /* already big enough*/
+ size_t nb = nbmin;
+ size_t rsize = oldsize - nb;
+ if (rsize >= MIN_CHUNK_SIZE) {
+ if(do_commit){
+ mchunkptr remainder = chunk_plus_offset(oldp, nb);
+ set_inuse(m, oldp, nb);
+ set_inuse(m, remainder, rsize);
+ s_allocated_memory -= rsize;
+ extra = chunk2mem(remainder);
+ mspace_free_lockless(m, extra);
+ check_inuse_chunk(m, oldp);
+ }
+ *received_size = nb - overhead_for(oldp);
+ return 1;
+ }
+ }
+ }
+ else {
+ USAGE_ERROR_ACTION(m, oldmem);
+ }
+ return 0;
+ }
+}
+
+#define INTERNAL_MULTIALLOC_DEFAULT_CONTIGUOUS_MEM 4096
+#define SQRT_MAX_SIZE_T (((size_t)-1)>>(sizeof(size_t)*CHAR_BIT/2))
+
+static int internal_node_multialloc
+(mstate m, size_t n_elements, size_t element_size, size_t contiguous_elements, boost_cont_memchain *pchain) {
+ void* mem; /* malloced aggregate space */
+ mchunkptr p; /* corresponding chunk */
+ size_t remainder_size; /* remaining bytes while splitting */
+ flag_t was_enabled; /* to disable mmap */
+ size_t elements_per_segment = 0;
+ size_t element_req_size = request2size(element_size);
+ boost_cont_memchain_it prev_last_it = BOOST_CONTAINER_MEMCHAIN_LAST_IT(pchain);
+
+ /*Error if wrong element_size parameter */
+ if (!element_size ||
+ /*OR Error if n_elements less than contiguous_elements */
+ ((contiguous_elements + 1) > (DL_MULTIALLOC_DEFAULT_CONTIGUOUS + 1) && n_elements < contiguous_elements) ||
+ /* OR Error if integer overflow */
+ (SQRT_MAX_SIZE_T < (element_req_size | contiguous_elements) &&
+ (MAX_SIZE_T / element_req_size) < contiguous_elements)) {
+ return 0;
+ }
+ switch (contiguous_elements) {
+ case DL_MULTIALLOC_DEFAULT_CONTIGUOUS:
+ {
+ /* Default contiguous, just check that we can store at least one element */
+ elements_per_segment = INTERNAL_MULTIALLOC_DEFAULT_CONTIGUOUS_MEM / element_req_size;
+ elements_per_segment += (size_t)(!elements_per_segment);
+ }
+ break;
+ case DL_MULTIALLOC_ALL_CONTIGUOUS:
+ /* All elements should be allocated in a single call */
+ elements_per_segment = n_elements;
+ break;
+ default:
+ /* Allocate in chunks of "contiguous_elements" */
+ elements_per_segment = contiguous_elements;
+ }
+
+ {
+ size_t i;
+ size_t next_i;
+ /*
+ Allocate the aggregate chunk. First disable direct-mmapping so
+ malloc won't use it, since we would not be able to later
+ free/realloc space internal to a segregated mmap region.
+ */
+ was_enabled = use_mmap(m);
+ disable_mmap(m);
+ for (i = 0; i != n_elements; i = next_i)
+ {
+ size_t accum_size;
+ size_t n_elements_left = n_elements - i;
+ next_i = i + ((n_elements_left < elements_per_segment) ? n_elements_left : elements_per_segment);
+ accum_size = element_req_size * (next_i - i);
+
+ mem = mspace_malloc_lockless(m, accum_size - CHUNK_OVERHEAD);
+ if (mem == 0) {
+ BOOST_CONTAINER_MEMIT_NEXT(prev_last_it);
+ while (i) {
+ void *addr = BOOST_CONTAINER_MEMIT_ADDR(prev_last_it);
+ --i;
+ BOOST_CONTAINER_MEMIT_NEXT(prev_last_it);
+ s_allocated_memory -= chunksize(mem2chunk(addr));
+ mspace_free_lockless(m, addr);
+ }
+ if (was_enabled)
+ enable_mmap(m);
+ return 0;
+ }
+ p = mem2chunk(mem);
+ remainder_size = chunksize(p);
+ s_allocated_memory += remainder_size;
+
+ assert(!is_mmapped(p));
+ { /* split out elements */
+ //void *mem_orig = mem;
+ //boost_cont_memchain_it last_it = BOOST_CONTAINER_MEMCHAIN_LAST_IT(pchain);
+ size_t num_elements = next_i - i;
+
+ size_t num_loops = num_elements - 1;
+ remainder_size -= element_req_size * num_loops;
+ while (num_loops) {
+ --num_loops;
+ //void **mem_prev = ((void**)mem);
+ set_size_and_pinuse_of_inuse_chunk(m, p, element_req_size);
+ BOOST_CONTAINER_MEMCHAIN_PUSH_BACK(pchain, mem);
+ p = chunk_plus_offset(p, element_req_size);
+ mem = chunk2mem(p);
+ //*mem_prev = mem;
+ }
+ set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size);
+ BOOST_CONTAINER_MEMCHAIN_PUSH_BACK(pchain, mem);
+ //BOOST_CONTAINER_MEMCHAIN_INCORPORATE_AFTER(pchain, last_it, mem_orig, mem, num_elements);
+ }
+ }
+ if (was_enabled)
+ enable_mmap(m);
+ }
+ return 1;
+}
+
+#define BOOST_CONTAINER_DLMALLOC_SIMPLE_MULTIDEALLOC
+#ifndef BOOST_CONTAINER_DLMALLOC_SIMPLE_MULTIDEALLOC
+
+#define BOOST_ALLOC_PLUS_MEMCHAIN_MEM_JUMP_NEXT(THISMEM, NEXTMEM) \
+ *((void**)(THISMEM)) = *((void**)((NEXTMEM)))
+
+//This function is based on internal_bulk_free
+//replacing iteration over array[] with boost_cont_memchain.
+//Instead of returning the unallocated nodes, returns a chain of non-deallocated nodes.
+//After forward merging, backwards merging is also tried
+static void internal_multialloc_free(mstate m, boost_cont_memchain *pchain)
+{
+#if FOOTERS
+ boost_cont_memchain ret_chain;
+ BOOST_CONTAINER_MEMCHAIN_INIT(&ret_chain);
+#endif
+ if (!PREACTION(m)) {
+ boost_cont_memchain_it a_it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(pchain);
+ while (!BOOST_CONTAINER_MEMCHAIN_IS_END_IT(pchain, a_it)) { /* Iterate though all memory holded by the chain */
+ void* a_mem = BOOST_CONTAINER_MEMIT_ADDR(a_it);
+ mchunkptr a_p = mem2chunk(a_mem);
+ size_t psize = chunksize(a_p);
+#if FOOTERS
+ if (get_mstate_for(a_p) != m) {
+ BOOST_CONTAINER_MEMIT_NEXT(a_it);
+ BOOST_CONTAINER_MEMCHAIN_PUSH_BACK(&ret_chain, a_mem);
+ continue;
+ }
+#endif
+ check_inuse_chunk(m, a_p);
+ if (RTCHECK(ok_address(m, a_p) && ok_inuse(a_p))) {
+ while (1) { /* Internal loop to speed up forward and backward merging (avoids some redundant checks) */
+ boost_cont_memchain_it b_it = a_it;
+ BOOST_CONTAINER_MEMIT_NEXT(b_it);
+ if (!BOOST_CONTAINER_MEMCHAIN_IS_END_IT(pchain, b_it)) {
+ void *b_mem = BOOST_CONTAINER_MEMIT_ADDR(b_it);
+ mchunkptr b_p = mem2chunk(b_mem);
+ if (b_p == next_chunk(a_p)) { /* b chunk is contiguous and next so b's size can be added to a */
+ psize += chunksize(b_p);
+ set_inuse(m, a_p, psize);
+ BOOST_ALLOC_PLUS_MEMCHAIN_MEM_JUMP_NEXT(a_mem, b_mem);
+ continue;
+ }
+ if (RTCHECK(ok_address(m, b_p) && ok_inuse(b_p))) {
+ /* b chunk is contiguous and previous so a's size can be added to b */
+ if (a_p == next_chunk(b_p)) {
+ psize += chunksize(b_p);
+ set_inuse(m, b_p, psize);
+ a_it = b_it;
+ a_p = b_p;
+ a_mem = b_mem;
+ continue;
+ }
+ }
+ }
+ /* Normal deallocation starts again in the outer loop */
+ a_it = b_it;
+ s_allocated_memory -= psize;
+ dispose_chunk(m, a_p, psize);
+ break;
+ }
+ }
+ else {
+ CORRUPTION_ERROR_ACTION(m);
+ break;
+ }
+ }
+ if (should_trim(m, m->topsize))
+ sys_trim(m, 0);
+ POSTACTION(m);
+ }
+#if FOOTERS
+ {
+ boost_cont_memchain_it last_pchain = BOOST_CONTAINER_MEMCHAIN_LAST_IT(pchain);
+ BOOST_CONTAINER_MEMCHAIN_INIT(pchain);
+ BOOST_CONTAINER_MEMCHAIN_INCORPORATE_AFTER
+ (pchain
+ , last_pchain
+ , BOOST_CONTAINER_MEMCHAIN_FIRSTMEM(&ret_chain)
+ , BOOST_CONTAINER_MEMCHAIN_LASTMEM(&ret_chain)
+ , BOOST_CONTAINER_MEMCHAIN_SIZE(&ret_chain)
+ );
+ }
+#endif
+}
+
+#else //BOOST_CONTAINER_DLMALLOC_SIMPLE_MULTIDEALLOC
+
+//This function is based on internal_bulk_free
+//replacing iteration over array[] with boost_cont_memchain.
+//Instead of returning the unallocated nodes, returns a chain of non-deallocated nodes.
+//After forward merging, backwards merging is also tried
+static void internal_multialloc_free(mstate m, boost_cont_memchain *pchain)
+{
+ if (!PREACTION(m)) {
+ boost_cont_memchain_it a_it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(pchain);
+ while (!BOOST_CONTAINER_MEMCHAIN_IS_END_IT(pchain, a_it)) { /* Iterate though all memory holded by the chain */
+ void* a_mem = BOOST_CONTAINER_MEMIT_ADDR(a_it);
+ BOOST_CONTAINER_MEMIT_NEXT(a_it);
+ s_allocated_memory -= chunksize(mem2chunk(a_mem));
+ mspace_free_lockless(m, a_mem);
+ }
+ POSTACTION(m);
+ }
+}
+
+#endif //BOOST_CONTAINER_DLMALLOC_SIMPLE_MULTIDEALLOC
+
+static int internal_multialloc_arrays
+ (mstate m, size_t n_elements, const size_t* sizes, size_t element_size, size_t contiguous_elements, boost_cont_memchain *pchain) {
+ void* mem; /* malloced aggregate space */
+ mchunkptr p; /* corresponding chunk */
+ size_t remainder_size; /* remaining bytes while splitting */
+ flag_t was_enabled; /* to disable mmap */
+ size_t size;
+ size_t boost_cont_multialloc_segmented_malloc_size;
+ size_t max_size;
+
+ /* Check overflow */
+ if(!element_size){
+ return 0;
+ }
+ max_size = MAX_REQUEST/element_size;
+ /* Different sizes*/
+ switch(contiguous_elements){
+ case DL_MULTIALLOC_DEFAULT_CONTIGUOUS:
+ /* Use default contiguous mem */
+ boost_cont_multialloc_segmented_malloc_size = INTERNAL_MULTIALLOC_DEFAULT_CONTIGUOUS_MEM;
+ break;
+ case DL_MULTIALLOC_ALL_CONTIGUOUS:
+ boost_cont_multialloc_segmented_malloc_size = MAX_REQUEST + CHUNK_OVERHEAD;
+ break;
+ default:
+ if(max_size < contiguous_elements){
+ return 0;
+ }
+ else{
+ /* The suggested buffer is just the the element count by the size */
+ boost_cont_multialloc_segmented_malloc_size = element_size*contiguous_elements;
+ }
+ }
+
+ {
+ size_t i;
+ size_t next_i;
+ /*
+ Allocate the aggregate chunk. First disable direct-mmapping so
+ malloc won't use it, since we would not be able to later
+ free/realloc space internal to a segregated mmap region.
+ */
+ was_enabled = use_mmap(m);
+ disable_mmap(m);
+ for(i = 0, next_i = 0; i != n_elements; i = next_i)
+ {
+ int error = 0;
+ size_t accum_size;
+ for(accum_size = 0; next_i != n_elements; ++next_i){
+ size_t cur_array_size = sizes[next_i];
+ if(max_size < cur_array_size){
+ error = 1;
+ break;
+ }
+ else{
+ size_t reqsize = request2size(cur_array_size*element_size);
+ if(((boost_cont_multialloc_segmented_malloc_size - CHUNK_OVERHEAD) - accum_size) < reqsize){
+ if(!accum_size){
+ accum_size += reqsize;
+ ++next_i;
+ }
+ break;
+ }
+ accum_size += reqsize;
+ }
+ }
+
+ mem = error ? 0 : mspace_malloc_lockless(m, accum_size - CHUNK_OVERHEAD);
+ if (mem == 0){
+ boost_cont_memchain_it it = BOOST_CONTAINER_MEMCHAIN_BEGIN_IT(pchain);
+ while(i--){
+ void *addr = BOOST_CONTAINER_MEMIT_ADDR(it);
+ BOOST_CONTAINER_MEMIT_NEXT(it);
+ s_allocated_memory -= chunksize(mem2chunk(addr));
+ mspace_free_lockless(m, addr);
+ }
+ if (was_enabled)
+ enable_mmap(m);
+ return 0;
+ }
+ p = mem2chunk(mem);
+ remainder_size = chunksize(p);
+ s_allocated_memory += remainder_size;
+
+ assert(!is_mmapped(p));
+
+ { /* split out elements */
+ void *mem_orig = mem;
+ boost_cont_memchain_it last_it = BOOST_CONTAINER_MEMCHAIN_LAST_IT(pchain);
+ size_t num_elements = next_i-i;
+
+ for(++i; i != next_i; ++i) {
+ void **mem_prev = ((void**)mem);
+ size = request2size(sizes[i]*element_size);
+ remainder_size -= size;
+ set_size_and_pinuse_of_inuse_chunk(m, p, size);
+ p = chunk_plus_offset(p, size);
+ mem = chunk2mem(p);
+ *mem_prev = mem;
+ }
+ set_size_and_pinuse_of_inuse_chunk(m, p, remainder_size);
+ BOOST_CONTAINER_MEMCHAIN_INCORPORATE_AFTER(pchain, last_it, mem_orig, mem, num_elements);
+ }
+ }
+ if (was_enabled)
+ enable_mmap(m);
+ }
+ return 1;
+}
+
+int boost_cont_multialloc_arrays
+ (size_t n_elements, const size_t *sizes, size_t element_size, size_t contiguous_elements, boost_cont_memchain *pchain)
+{
+ int ret = 0;
+ mstate ms = (mstate)gm;
+ ensure_initialization();
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ else if (!PREACTION(ms)) {
+ ret = internal_multialloc_arrays(ms, n_elements, sizes, element_size, contiguous_elements, pchain);
+ POSTACTION(ms);
+ }
+ return ret;
+}
+
+
+/*Doug Lea malloc extensions*/
+static boost_cont_malloc_stats_t get_malloc_stats(mstate m)
+{
+ boost_cont_malloc_stats_t ret = { 0, 0, 0 };
+ ensure_initialization();
+ if (!PREACTION(m)) {
+ size_t maxfp = 0;
+ size_t fp = 0;
+ size_t used = 0;
+ check_malloc_state(m);
+ if (is_initialized(m)) {
+ msegmentptr s = &m->seg;
+ maxfp = m->max_footprint;
+ fp = m->footprint;
+ used = fp - (m->topsize + TOP_FOOT_SIZE);
+
+ while (s != 0) {
+ mchunkptr q = align_as_chunk(s->base);
+ while (segment_holds(s, q) &&
+ q != m->top && q->head != FENCEPOST_HEAD) {
+ if (!cinuse(q))
+ used -= chunksize(q);
+ q = next_chunk(q);
+ }
+ s = s->next;
+ }
+ }
+
+ ret.max_system_bytes = maxfp;
+ ret.system_bytes = fp;
+ ret.in_use_bytes = used;
+ POSTACTION(m);
+ }
+ return ret;
+}
+
+size_t boost_cont_size(const void *p)
+{ return DL_SIZE_IMPL(p); }
+
+void* boost_cont_malloc(size_t bytes)
+{
+ size_t received_bytes;
+ ensure_initialization();
+ return boost_cont_allocation_command
+ (BOOST_CONTAINER_ALLOCATE_NEW, 1, bytes, bytes, &received_bytes, 0).first;
+}
+
+void boost_cont_free(void* mem)
+{
+ mstate ms = (mstate)gm;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ else if (!PREACTION(ms)) {
+ if(mem)
+ s_allocated_memory -= chunksize(mem2chunk(mem));
+ mspace_free_lockless(ms, mem);
+ POSTACTION(ms);
+ }
+}
+
+void* boost_cont_memalign(size_t bytes, size_t alignment)
+{
+ void *addr;
+ ensure_initialization();
+ addr = mspace_memalign(gm, alignment, bytes);
+ if(addr){
+ s_allocated_memory += chunksize(mem2chunk(addr));
+ }
+ return addr;
+}
+
+int boost_cont_multialloc_nodes
+ (size_t n_elements, size_t elem_size, size_t contiguous_elements, boost_cont_memchain *pchain)
+{
+ int ret = 0;
+ mstate ms = (mstate)gm;
+ ensure_initialization();
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ else if (!PREACTION(ms)) {
+ ret = internal_node_multialloc(ms, n_elements, elem_size, contiguous_elements, pchain);
+ POSTACTION(ms);
+ }
+ return ret;
+}
+
+size_t boost_cont_footprint()
+{
+ return ((mstate)gm)->footprint;
+}
+
+size_t boost_cont_allocated_memory()
+{
+ size_t alloc_mem = 0;
+ mstate m = (mstate)gm;
+ ensure_initialization();
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+
+
+ if (!PREACTION(m)) {
+ check_malloc_state(m);
+ if (is_initialized(m)) {
+ size_t nfree = SIZE_T_ONE; /* top always free */
+ size_t mfree = m->topsize + TOP_FOOT_SIZE;
+ size_t sum = mfree;
+ msegmentptr s = &m->seg;
+ while (s != 0) {
+ mchunkptr q = align_as_chunk(s->base);
+ while (segment_holds(s, q) &&
+ q != m->top && q->head != FENCEPOST_HEAD) {
+ size_t sz = chunksize(q);
+ sum += sz;
+ if (!is_inuse(q)) {
+ mfree += sz;
+ ++nfree;
+ }
+ q = next_chunk(q);
+ }
+ s = s->next;
+ }
+ {
+ size_t uordblks = m->footprint - mfree;
+ if(nfree)
+ alloc_mem = (size_t)(uordblks - (nfree-1)*TOP_FOOT_SIZE);
+ else
+ alloc_mem = uordblks;
+ }
+ }
+
+ POSTACTION(m);
+ }
+ return alloc_mem;
+}
+
+size_t boost_cont_chunksize(const void *p)
+{ return chunksize(mem2chunk(p)); }
+
+int boost_cont_all_deallocated()
+{ return !s_allocated_memory; }
+
+boost_cont_malloc_stats_t boost_cont_malloc_stats()
+{
+ mstate ms = (mstate)gm;
+ if (ok_magic(ms)) {
+ return get_malloc_stats(ms);
+ }
+ else {
+ boost_cont_malloc_stats_t r = { 0, 0, 0 };
+ USAGE_ERROR_ACTION(ms,ms);
+ return r;
+ }
+}
+
+size_t boost_cont_in_use_memory()
+{ return s_allocated_memory; }
+
+int boost_cont_trim(size_t pad)
+{
+ ensure_initialization();
+ return dlmalloc_trim(pad);
+}
+
+int boost_cont_grow
+ (void* oldmem, size_t minbytes, size_t maxbytes, size_t *received)
+{
+ mstate ms = (mstate)gm;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+
+ if (!PREACTION(ms)) {
+ mchunkptr p = mem2chunk(oldmem);
+ size_t oldsize = chunksize(p);
+ p = try_realloc_chunk_with_min(ms, p, request2size(minbytes), request2size(maxbytes), 0);
+ POSTACTION(ms);
+ if(p){
+ check_inuse_chunk(ms, p);
+ *received = DL_SIZE_IMPL(oldmem);
+ s_allocated_memory += chunksize(p) - oldsize;
+ }
+ return 0 != p;
+ }
+ return 0;
+}
+
+int boost_cont_shrink
+ (void* oldmem, size_t minbytes, size_t maxbytes, size_t *received, int do_commit)
+{
+ mstate ms = (mstate)gm;
+ if (!ok_magic(ms)) {
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+
+ if (!PREACTION(ms)) {
+ int ret = internal_shrink(ms, oldmem, minbytes, maxbytes, received, do_commit);
+ POSTACTION(ms);
+ return 0 != ret;
+ }
+ return 0;
+}
+
+
+void* boost_cont_alloc
+ (size_t minbytes, size_t preferred_bytes, size_t *received_bytes)
+{
+ //ensure_initialization provided by boost_cont_allocation_command
+ return boost_cont_allocation_command
+ (BOOST_CONTAINER_ALLOCATE_NEW, 1, minbytes, preferred_bytes, received_bytes, 0).first;
+}
+
+void boost_cont_multidealloc(boost_cont_memchain *pchain)
+{
+ mstate ms = (mstate)gm;
+ if (!ok_magic(ms)) {
+ (void)ms;
+ USAGE_ERROR_ACTION(ms,ms);
+ }
+ internal_multialloc_free(ms, pchain);
+}
+
+int boost_cont_malloc_check()
+{
+#ifdef DEBUG
+ mstate ms = (mstate)gm;
+ ensure_initialization();
+ if (!ok_magic(ms)) {
+ (void)ms;
+ USAGE_ERROR_ACTION(ms,ms);
+ return 0;
+ }
+ check_malloc_state(ms);
+ return 1;
+#else
+ return 1;
+#endif
+}
+
+
+boost_cont_command_ret_t boost_cont_allocation_command
+ (allocation_type command, size_t sizeof_object, size_t limit_size
+ , size_t preferred_size, size_t *received_size, void *reuse_ptr)
+{
+ boost_cont_command_ret_t ret = { 0, 0 };
+ ensure_initialization();
+ if(command & (BOOST_CONTAINER_SHRINK_IN_PLACE | BOOST_CONTAINER_TRY_SHRINK_IN_PLACE)){
+ int success = boost_cont_shrink( reuse_ptr, preferred_size, limit_size
+ , received_size, (command & BOOST_CONTAINER_SHRINK_IN_PLACE));
+ ret.first = success ? reuse_ptr : 0;
+ return ret;
+ }
+
+ *received_size = 0;
+
+ if(limit_size > preferred_size)
+ return ret;
+
+ {
+ mstate ms = (mstate)gm;
+
+ /*Expand in place*/
+ if (!PREACTION(ms)) {
+ #if FOOTERS
+ if(reuse_ptr){
+ mstate m = get_mstate_for(mem2chunk(reuse_ptr));
+ if (!ok_magic(m)) {
+ USAGE_ERROR_ACTION(m, reuse_ptr);
+ return ret;
+ }
+ }
+ #endif
+ if(reuse_ptr && (command & (BOOST_CONTAINER_EXPAND_FWD | BOOST_CONTAINER_EXPAND_BWD))){
+ void *r = internal_grow_both_sides
+ ( ms, command, reuse_ptr, limit_size
+ , preferred_size, received_size, sizeof_object, 1);
+ if(r){
+ ret.first = r;
+ ret.second = 1;
+ goto postaction;
+ }
+ }
+
+ if(command & BOOST_CONTAINER_ALLOCATE_NEW){
+ void *addr = mspace_malloc_lockless(ms, preferred_size);
+ if(!addr) addr = mspace_malloc_lockless(ms, limit_size);
+ if(addr){
+ s_allocated_memory += chunksize(mem2chunk(addr));
+ *received_size = DL_SIZE_IMPL(addr);
+ }
+ ret.first = addr;
+ ret.second = 0;
+ if(addr){
+ goto postaction;
+ }
+ }
+
+ //Now try to expand both sides with min size
+ if(reuse_ptr && (command & (BOOST_CONTAINER_EXPAND_FWD | BOOST_CONTAINER_EXPAND_BWD))){
+ void *r = internal_grow_both_sides
+ ( ms, command, reuse_ptr, limit_size
+ , preferred_size, received_size, sizeof_object, 0);
+ if(r){
+ ret.first = r;
+ ret.second = 1;
+ goto postaction;
+ }
+ }
+ postaction:
+ POSTACTION(ms);
+ }
+ }
+ return ret;
+}
+
+int boost_cont_mallopt(int param_number, int value)
+{
+ return change_mparam(param_number, value);
+}
+
+void *boost_cont_sync_create()
+{
+ void *p = boost_cont_malloc(sizeof(MLOCK_T));
+ if(p){
+ if(0 != INITIAL_LOCK((MLOCK_T*)p)){
+ boost_cont_free(p);
+ p = 0;
+ }
+ }
+ return p;
+}
+
+void boost_cont_sync_destroy(void *sync)
+{
+ if(sync){
+ (void)DESTROY_LOCK((MLOCK_T*)sync);
+ boost_cont_free(sync);
+ }
+}
+
+int boost_cont_sync_lock(void *sync)
+{ return 0 == (ACQUIRE_LOCK((MLOCK_T*)sync)); }
+
+void boost_cont_sync_unlock(void *sync)
+{ RELEASE_LOCK((MLOCK_T*)sync); }
+
+int boost_cont_global_sync_lock()
+{
+ int ret;
+ ensure_initialization();
+ ret = ACQUIRE_MALLOC_GLOBAL_LOCK();
+ return 0 == ret;
+}
+
+void boost_cont_global_sync_unlock()
+{
+ RELEASE_MALLOC_GLOBAL_LOCK()
+}
+
+//#ifdef DL_DEBUG_DEFINED
+// #undef DEBUG
+//#endif
+
+#ifdef _MSC_VER
+#pragma warning (pop)
+#endif
diff --git a/src/third_party/boost-1.68.0/libs/container/src/global_resource.cpp b/src/third_party/boost-1.69.0/libs/container/src/global_resource.cpp
index 15f4fe404cf..15f4fe404cf 100644
--- a/src/third_party/boost-1.68.0/libs/container/src/global_resource.cpp
+++ b/src/third_party/boost-1.69.0/libs/container/src/global_resource.cpp
diff --git a/src/third_party/boost-1.68.0/libs/container/src/monotonic_buffer_resource.cpp b/src/third_party/boost-1.69.0/libs/container/src/monotonic_buffer_resource.cpp
index 29ffde1db2a..29ffde1db2a 100644
--- a/src/third_party/boost-1.68.0/libs/container/src/monotonic_buffer_resource.cpp
+++ b/src/third_party/boost-1.69.0/libs/container/src/monotonic_buffer_resource.cpp
diff --git a/src/third_party/boost-1.68.0/libs/container/src/pool_resource.cpp b/src/third_party/boost-1.69.0/libs/container/src/pool_resource.cpp
index e6829e28e7b..e6829e28e7b 100644
--- a/src/third_party/boost-1.68.0/libs/container/src/pool_resource.cpp
+++ b/src/third_party/boost-1.69.0/libs/container/src/pool_resource.cpp
diff --git a/src/third_party/boost-1.68.0/libs/container/src/synchronized_pool_resource.cpp b/src/third_party/boost-1.69.0/libs/container/src/synchronized_pool_resource.cpp
index 0a725e9ffda..0a725e9ffda 100644
--- a/src/third_party/boost-1.68.0/libs/container/src/synchronized_pool_resource.cpp
+++ b/src/third_party/boost-1.69.0/libs/container/src/synchronized_pool_resource.cpp
diff --git a/src/third_party/boost-1.68.0/libs/container/src/unsynchronized_pool_resource.cpp b/src/third_party/boost-1.69.0/libs/container/src/unsynchronized_pool_resource.cpp
index 0c84f694a33..0c84f694a33 100644
--- a/src/third_party/boost-1.68.0/libs/container/src/unsynchronized_pool_resource.cpp
+++ b/src/third_party/boost-1.69.0/libs/container/src/unsynchronized_pool_resource.cpp
diff --git a/src/third_party/boost-1.68.0/libs/coroutine/src/detail/coroutine_context.cpp b/src/third_party/boost-1.69.0/libs/coroutine/src/detail/coroutine_context.cpp
index 6a6d5248338..6a6d5248338 100644
--- a/src/third_party/boost-1.68.0/libs/coroutine/src/detail/coroutine_context.cpp
+++ b/src/third_party/boost-1.69.0/libs/coroutine/src/detail/coroutine_context.cpp
diff --git a/src/third_party/boost-1.68.0/libs/coroutine/src/exceptions.cpp b/src/third_party/boost-1.69.0/libs/coroutine/src/exceptions.cpp
index d32eb546838..d32eb546838 100644
--- a/src/third_party/boost-1.68.0/libs/coroutine/src/exceptions.cpp
+++ b/src/third_party/boost-1.69.0/libs/coroutine/src/exceptions.cpp
diff --git a/src/third_party/boost-1.68.0/libs/coroutine/src/posix/stack_traits.cpp b/src/third_party/boost-1.69.0/libs/coroutine/src/posix/stack_traits.cpp
index b629943221f..b629943221f 100644
--- a/src/third_party/boost-1.68.0/libs/coroutine/src/posix/stack_traits.cpp
+++ b/src/third_party/boost-1.69.0/libs/coroutine/src/posix/stack_traits.cpp
diff --git a/src/third_party/boost-1.68.0/libs/coroutine/src/windows/stack_traits.cpp b/src/third_party/boost-1.69.0/libs/coroutine/src/windows/stack_traits.cpp
index bdf417a7453..bdf417a7453 100644
--- a/src/third_party/boost-1.68.0/libs/coroutine/src/windows/stack_traits.cpp
+++ b/src/third_party/boost-1.69.0/libs/coroutine/src/windows/stack_traits.cpp
diff --git a/src/third_party/boost-1.68.0/libs/date_time/Jamfile b/src/third_party/boost-1.69.0/libs/date_time/Jamfile
index c8fe54779f1..c8fe54779f1 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/Jamfile
+++ b/src/third_party/boost-1.69.0/libs/date_time/Jamfile
diff --git a/src/third_party/boost-1.68.0/libs/date_time/LICENSE b/src/third_party/boost-1.69.0/libs/date_time/LICENSE
index 36b7cd93cdf..36b7cd93cdf 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/LICENSE
+++ b/src/third_party/boost-1.69.0/libs/date_time/LICENSE
diff --git a/src/third_party/boost-1.69.0/libs/date_time/README.md b/src/third_party/boost-1.69.0/libs/date_time/README.md
new file mode 100644
index 00000000000..c3479a2a350
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/date_time/README.md
@@ -0,0 +1,38 @@
+DateTime, part of the collection of [Boost C++ Libraries](http://github.com/boostorg), makes programming with dates and times as simple and natural as programming with strings and integers.
+
+### License
+
+Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
+
+### Properties
+
+* C++03
+* Requires Linking
+
+### Build Status
+
+Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
+:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
+[`master`](https://github.com/boostorg/date_time/tree/master) | [![Build Status](https://travis-ci.org/boostorg/date_time.svg?branch=master)](https://travis-ci.org/boostorg/date_time) | [![Build status](https://ci.appveyor.com/api/projects/status/upf5c528fy09fudk?svg=true)](https://ci.appveyor.com/project/jeking3/date-time-1evbf) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/14908/badge.svg)](https://scan.coverity.com/projects/boostorg-date_time) | [![codecov](https://codecov.io/gh/boostorg/date_time/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/date_time/branch/master) | [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/date_time.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/date_time.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/date_time.html)
+[`develop`](https://github.com/boostorg/date_time/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/date_time.svg?branch=develop)](https://travis-ci.org/boostorg/date_time) | [![Build status](https://ci.appveyor.com/api/projects/status/upf5c528fy09fudk/branch/develop?svg=true)](https://ci.appveyor.com/project/boostorg/date_time/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/14908/badge.svg)](https://scan.coverity.com/projects/boostorg-date_time) | [![codecov](https://codecov.io/gh/boostorg/date_time/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/date_time/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/date_time.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/date_time.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/date_time.html)
+
+### Directories
+
+| Name | Purpose |
+| --------- | ------------------------------ |
+| `build` | build script for link library |
+| `data` | timezone database |
+| `doc` | documentation |
+| `example` | use case examples |
+| `include` | headers |
+| `src` | source code for link library |
+| `test` | unit tests |
+| `xmldoc` | additional documentation |
+
+### More information
+
+* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-date_time): Be sure to read the documentation first to see if it answers your question.
+* [Report bugs](https://github.com/boostorg/date_time/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
+* [Submit Pull Requests](https://github.com/boostorg/date_time/pulls) against the **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt). Be sure to include tests proving your changes work properly.
+* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[date_time]` tag at the beginning of the subject line.
+
diff --git a/src/third_party/boost-1.68.0/libs/date_time/data/README.zone_spec_csv_file b/src/third_party/boost-1.69.0/libs/date_time/data/README.zone_spec_csv_file
index 069cac21950..069cac21950 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/data/README.zone_spec_csv_file
+++ b/src/third_party/boost-1.69.0/libs/date_time/data/README.zone_spec_csv_file
diff --git a/src/third_party/boost-1.68.0/libs/date_time/data/date_time_zonespec.csv b/src/third_party/boost-1.69.0/libs/date_time/data/date_time_zonespec.csv
index c528d57d1a7..c528d57d1a7 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/data/date_time_zonespec.csv
+++ b/src/third_party/boost-1.69.0/libs/date_time/data/date_time_zonespec.csv
diff --git a/src/third_party/boost-1.68.0/libs/date_time/src/date_time.doc b/src/third_party/boost-1.69.0/libs/date_time/src/date_time.doc
index 920fac2e58a..920fac2e58a 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/src/date_time.doc
+++ b/src/third_party/boost-1.69.0/libs/date_time/src/date_time.doc
diff --git a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/date_generators.cpp b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/date_generators.cpp
index 32a58c17921..32a58c17921 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/date_generators.cpp
+++ b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/date_generators.cpp
diff --git a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_month.cpp b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_month.cpp
index 8232378c0d3..8232378c0d3 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_month.cpp
+++ b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_month.cpp
diff --git a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_names.hpp b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_names.hpp
index f20b320d174..f20b320d174 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_names.hpp
+++ b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_names.hpp
diff --git a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_weekday.cpp b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_weekday.cpp
index ffdc96f8ebf..ffdc96f8ebf 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/greg_weekday.cpp
+++ b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/greg_weekday.cpp
diff --git a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/gregorian_types.cpp b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/gregorian_types.cpp
index 7dd7f22bfc0..7dd7f22bfc0 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/src/gregorian/gregorian_types.cpp
+++ b/src/third_party/boost-1.69.0/libs/date_time/src/gregorian/gregorian_types.cpp
diff --git a/src/third_party/boost-1.68.0/libs/date_time/src/posix_time/posix_time_types.cpp b/src/third_party/boost-1.69.0/libs/date_time/src/posix_time/posix_time_types.cpp
index 43953010405..43953010405 100644
--- a/src/third_party/boost-1.68.0/libs/date_time/src/posix_time/posix_time_types.cpp
+++ b/src/third_party/boost-1.69.0/libs/date_time/src/posix_time/posix_time_types.cpp
diff --git a/src/third_party/boost-1.68.0/libs/exception/src/clone_current_exception_non_intrusive.cpp b/src/third_party/boost-1.69.0/libs/exception/src/clone_current_exception_non_intrusive.cpp
index 7ebd7b5894e..7ebd7b5894e 100644
--- a/src/third_party/boost-1.68.0/libs/exception/src/clone_current_exception_non_intrusive.cpp
+++ b/src/third_party/boost-1.69.0/libs/exception/src/clone_current_exception_non_intrusive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/filesystem/README.md b/src/third_party/boost-1.69.0/libs/filesystem/README.md
new file mode 100644
index 00000000000..f31d689b7e6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/filesystem/README.md
@@ -0,0 +1,26 @@
+# Boost.Filesystem
+
+Boost.Filesystem, part of collection of the [Boost C++ Libraries](https://github.com/boostorg), provides facilities to manipulate files and directories, and the paths that identify them.
+
+### Directories
+
+* **doc** - Documentation sources
+* **include** - Interface headers of Boost.Filesystem
+* **src** - Compilable source files of Boost.Filesystem
+* **test** - Boost.Filesystem unit tests
+* **example** - Boost.Filesystem usage examples
+
+### More information
+
+* [Documentation](https://boost.org/libs/filesystem)
+* [Report bugs](https://github.com/boostorg/filesystem/issues/new). Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
+* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
+
+### Build status
+
+Master: [![AppVeyor](https://ci.appveyor.com/api/projects/status/nx3e7bcavvn3q953?svg=true)](https://ci.appveyor.com/project/Lastique/filesystem/branch/master) [![Travis CI](https://travis-ci.org/boostorg/filesystem.svg?branch=master)](https://travis-ci.org/boostorg/filesystem)
+Develop: [![AppVeyor](https://ci.appveyor.com/api/projects/status/nx3e7bcavvn3q953/branch/develop?svg=true)](https://ci.appveyor.com/project/Lastique/filesystem/branch/develop) [![Travis CI](https://travis-ci.org/boostorg/filesystem.svg?branch=develop)](https://travis-ci.org/boostorg/filesystem)
+
+### License
+
+Distributed under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/codecvt_error_category.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/codecvt_error_category.cpp
index 165c6ea7b8f..165c6ea7b8f 100644
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/codecvt_error_category.cpp
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/codecvt_error_category.cpp
diff --git a/src/third_party/boost-1.69.0/libs/filesystem/src/operations.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/operations.cpp
new file mode 100644
index 00000000000..53dcdb70c96
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/operations.cpp
@@ -0,0 +1,2409 @@
+// operations.cpp --------------------------------------------------------------------//
+
+// Copyright 2002-2009, 2014 Beman Dawes
+// Copyright 2001 Dietmar Kuehl
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See library home page at http://www.boost.org/libs/filesystem
+
+//--------------------------------------------------------------------------------------//
+
+// define 64-bit offset macros BEFORE including boost/config.hpp (see ticket #5355)
+#if defined(__ANDROID__) && defined(__ANDROID_API__) && __ANDROID_API__ < 24
+// Android fully supports 64-bit file offsets only for API 24 and above.
+//
+// Trying to define _FILE_OFFSET_BITS=64 for APIs below 24
+// leads to compilation failure for one or another reason,
+// depending on target Android API level, Android NDK version,
+// used STL, order of include paths and more.
+// For more information, please see:
+// - https://github.com/boostorg/filesystem/issues/65
+// - https://github.com/boostorg/filesystem/pull/69
+//
+// Android NDK developers consider it the expected behavior.
+// See their official position here:
+// - https://github.com/android-ndk/ndk/issues/501#issuecomment-326447479
+// - https://android.googlesource.com/platform/bionic/+/a34817457feee026e8702a1d2dffe9e92b51d7d1/docs/32-bit-abi.md#32_bit-abi-bugs
+//
+// Thus we do not define _FILE_OFFSET_BITS in such case.
+#else
+// Defining _FILE_OFFSET_BITS=64 should kick in 64-bit off_t's
+// (and thus st_size) on 32-bit systems that provide the Large File
+// Support (LFS) interface, such as Linux, Solaris, and IRIX.
+//
+// At the time of this comment writing (March 2018), on most systems
+// _FILE_OFFSET_BITS=64 definition is harmless:
+// either the definition is supported and enables 64-bit off_t,
+// or the definition is not supported and is ignored, in which case
+// off_t does not change its default size for the target system
+// (which may be 32-bit or 64-bit already).
+// Thus it makes sense to have _FILE_OFFSET_BITS=64 defined by default,
+// instead of listing every system that supports the definition.
+// Those few systems, on which _FILE_OFFSET_BITS=64 is harmful,
+// for example this definition causes compilation failure on those systems,
+// should be exempt from defining _FILE_OFFSET_BITS by adding
+// an appropriate #elif block above with the appropriate comment.
+//
+// _FILE_OFFSET_BITS must be defined before any headers are included
+// to ensure that the definition is available to all included headers.
+// That is required at least on Solaris, and possibly on other
+// systems as well.
+#define _FILE_OFFSET_BITS 64
+#endif
+
+// define BOOST_FILESYSTEM_SOURCE so that <boost/filesystem/config.hpp> knows
+// the library is being built (possibly exporting rather than importing code)
+#define BOOST_FILESYSTEM_SOURCE
+
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this
+#endif
+
+#include <boost/filesystem/operations.hpp>
+#include <boost/scoped_array.hpp>
+#include <boost/detail/workaround.hpp>
+#include <limits>
+#include <vector>
+#include <cstdlib> // for malloc, free
+#include <cstring>
+#include <cstdio> // for remove, rename
+#if defined(__QNXNTO__) // see ticket #5355
+# include <stdio.h>
+#endif
+#include <cerrno>
+
+#ifdef BOOST_FILEYSTEM_INCLUDE_IOSTREAM
+# include <iostream>
+#endif
+
+namespace fs = boost::filesystem;
+using boost::filesystem::path;
+using boost::filesystem::filesystem_error;
+using boost::filesystem::perms;
+using boost::system::error_code;
+using boost::system::error_category;
+using boost::system::system_category;
+using std::string;
+using std::wstring;
+
+# ifdef BOOST_POSIX_API
+
+# include <sys/types.h>
+# include <sys/stat.h>
+# if !defined(__APPLE__) && !defined(__OpenBSD__) && !defined(__ANDROID__) \
+ && !defined(__VXWORKS__)
+# include <sys/statvfs.h>
+# define BOOST_STATVFS statvfs
+# define BOOST_STATVFS_F_FRSIZE vfs.f_frsize
+# else
+# ifdef __OpenBSD__
+# include <sys/param.h>
+# elif defined(__ANDROID__)
+# include <sys/vfs.h>
+# endif
+# if !defined(__VXWORKS__)
+# include <sys/mount.h>
+# endif
+# define BOOST_STATVFS statfs
+# define BOOST_STATVFS_F_FRSIZE static_cast<boost::uintmax_t>(vfs.f_bsize)
+# endif
+# include <dirent.h>
+# include <unistd.h>
+# include <fcntl.h>
+# include <utime.h>
+# include "limits.h"
+
+# else // BOOST_WINDOW_API
+
+# if (defined(__MINGW32__) || defined(__CYGWIN__)) && !defined(WINVER)
+ // Versions of MinGW or Cygwin that support Filesystem V3 support at least WINVER 0x501.
+ // See MinGW's windef.h
+# define WINVER 0x501
+# endif
+# include <cwchar>
+# include <io.h>
+# include <windows.h>
+# include <winnt.h>
+# if !defined(_WIN32_WINNT)
+# define _WIN32_WINNT 0x0500
+# endif
+# if defined(__BORLANDC__) || defined(__MWERKS__)
+# if defined(__BORLANDC__)
+ using std::time_t;
+# endif
+# include <utime.h>
+# else
+# include <sys/utime.h>
+# endif
+
+// REPARSE_DATA_BUFFER related definitions are found in ntifs.h, which is part of the
+// Windows Device Driver Kit. Since that's inconvenient, the definitions are provided
+// here. See http://msdn.microsoft.com/en-us/library/ms791514.aspx
+
+#if !defined(REPARSE_DATA_BUFFER_HEADER_SIZE) // mingw winnt.h does provide the defs
+
+#define SYMLINK_FLAG_RELATIVE 1
+
+typedef struct _REPARSE_DATA_BUFFER {
+ ULONG ReparseTag;
+ USHORT ReparseDataLength;
+ USHORT Reserved;
+ union {
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ ULONG Flags;
+ WCHAR PathBuffer[1];
+ /* Example of distinction between substitute and print names:
+ mklink /d ldrive c:\
+ SubstituteName: c:\\??\
+ PrintName: c:\
+ */
+ } SymbolicLinkReparseBuffer;
+ struct {
+ USHORT SubstituteNameOffset;
+ USHORT SubstituteNameLength;
+ USHORT PrintNameOffset;
+ USHORT PrintNameLength;
+ WCHAR PathBuffer[1];
+ } MountPointReparseBuffer;
+ struct {
+ UCHAR DataBuffer[1];
+ } GenericReparseBuffer;
+ };
+} REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
+
+#define REPARSE_DATA_BUFFER_HEADER_SIZE \
+ FIELD_OFFSET(REPARSE_DATA_BUFFER, GenericReparseBuffer)
+
+#endif
+
+#ifndef MAXIMUM_REPARSE_DATA_BUFFER_SIZE
+#define MAXIMUM_REPARSE_DATA_BUFFER_SIZE ( 16 * 1024 )
+#endif
+
+# ifndef FSCTL_GET_REPARSE_POINT
+# define FSCTL_GET_REPARSE_POINT 0x900a8
+# endif
+
+# ifndef IO_REPARSE_TAG_SYMLINK
+# define IO_REPARSE_TAG_SYMLINK (0xA000000CL)
+# endif
+
+inline std::wstring wgetenv(const wchar_t* name)
+{
+ // use vector since for C++03 basic_string is not required to be contiguous
+ std::vector<wchar_t> buf(::GetEnvironmentVariableW(name, NULL, 0));
+
+ // C++03 vector does not have data() so use &buf[0]
+ return (buf.empty()
+ || ::GetEnvironmentVariableW(name, &buf[0], static_cast<DWORD>(buf.size())) == 0)
+ ? std::wstring() : std::wstring(&buf[0]);
+}
+
+# endif // BOOST_WINDOWS_API
+
+// BOOST_FILESYSTEM_STATUS_CACHE enables file_status cache in
+// dir_itr_increment. The config tests are placed here because some of the
+// macros being tested come from dirent.h.
+//
+// TODO: find out what macros indicate dirent::d_type present in more libraries
+# if defined(BOOST_WINDOWS_API)\
+ || defined(_DIRENT_HAVE_D_TYPE)// defined by GNU C library if d_type present
+# define BOOST_FILESYSTEM_STATUS_CACHE
+# endif
+
+// POSIX/Windows macros ----------------------------------------------------//
+
+// Portions of the POSIX and Windows API's are very similar, except for name,
+// order of arguments, and meaning of zero/non-zero returns. The macros below
+// abstract away those differences. They follow Windows naming and order of
+// arguments, and return true to indicate no error occurred. [POSIX naming,
+// order of arguments, and meaning of return were followed initially, but
+// found to be less clear and cause more coding errors.]
+
+# if defined(BOOST_POSIX_API)
+
+typedef int err_t;
+
+// POSIX uses a 0 return to indicate success
+# define BOOST_ERRNO errno
+# define BOOST_SET_CURRENT_DIRECTORY(P)(::chdir(P)== 0)
+# define BOOST_CREATE_DIRECTORY(P)(::mkdir(P, S_IRWXU|S_IRWXG|S_IRWXO)== 0)
+# define BOOST_CREATE_HARD_LINK(F,T)(::link(T, F)== 0)
+# define BOOST_CREATE_SYMBOLIC_LINK(F,T,Flag)(::symlink(T, F)== 0)
+# define BOOST_REMOVE_DIRECTORY(P)(::rmdir(P)== 0)
+# define BOOST_DELETE_FILE(P)(::unlink(P)== 0)
+# define BOOST_COPY_DIRECTORY(F,T)(!(::stat(from.c_str(), &from_stat)!= 0\
+ || ::mkdir(to.c_str(),from_stat.st_mode)!= 0))
+# define BOOST_COPY_FILE(F,T,FailIfExistsBool)copy_file_api(F, T, FailIfExistsBool)
+# define BOOST_MOVE_FILE(OLD,NEW)(::rename(OLD, NEW)== 0)
+# define BOOST_RESIZE_FILE(P,SZ)(::truncate(P, SZ)== 0)
+
+# define BOOST_ERROR_NOT_SUPPORTED ENOSYS
+# define BOOST_ERROR_ALREADY_EXISTS EEXIST
+
+# else // BOOST_WINDOWS_API
+
+typedef DWORD err_t;
+
+// Windows uses a non-0 return to indicate success
+# define BOOST_ERRNO ::GetLastError()
+# define BOOST_SET_CURRENT_DIRECTORY(P)(::SetCurrentDirectoryW(P)!= 0)
+# define BOOST_CREATE_DIRECTORY(P)(::CreateDirectoryW(P, 0)!= 0)
+# define BOOST_CREATE_HARD_LINK(F,T)(create_hard_link_api(F, T, 0)!= 0)
+# define BOOST_CREATE_SYMBOLIC_LINK(F,T,Flag)(create_symbolic_link_api(F, T, Flag)!= 0)
+# define BOOST_REMOVE_DIRECTORY(P)(::RemoveDirectoryW(P)!= 0)
+# define BOOST_DELETE_FILE(P)(::DeleteFileW(P)!= 0)
+# define BOOST_COPY_DIRECTORY(F,T)(::CreateDirectoryExW(F, T, 0)!= 0)
+# define BOOST_COPY_FILE(F,T,FailIfExistsBool)(::CopyFileW(F, T, FailIfExistsBool)!= 0)
+# define BOOST_MOVE_FILE(OLD,NEW)(::MoveFileExW(OLD, NEW, MOVEFILE_REPLACE_EXISTING|MOVEFILE_COPY_ALLOWED)!= 0)
+# define BOOST_RESIZE_FILE(P,SZ)(resize_file_api(P, SZ)!= 0)
+# define BOOST_READ_SYMLINK(P,T)
+
+# define BOOST_ERROR_ALREADY_EXISTS ERROR_ALREADY_EXISTS
+# define BOOST_ERROR_NOT_SUPPORTED ERROR_NOT_SUPPORTED
+
+# endif
+
+//--------------------------------------------------------------------------------------//
+// //
+// helpers (all operating systems) //
+// //
+//--------------------------------------------------------------------------------------//
+
+namespace
+{
+
+ fs::file_type query_file_type(const path& p, error_code* ec);
+
+ boost::filesystem::directory_iterator end_dir_itr;
+
+ // error handling helpers ----------------------------------------------------------//
+
+ bool error(err_t error_num, error_code* ec, const char* message);
+ bool error(err_t error_num, const path& p, error_code* ec, const char* message);
+ bool error(err_t error_num, const path& p1, const path& p2, error_code* ec,
+ const char* message);
+
+ const error_code ok;
+
+ // error_num is value of errno on POSIX, error code (from ::GetLastError()) on Windows.
+ // Interface changed 30 Jan 15 to have caller supply error_num as ::SetLastError()
+ // values were apparently getting cleared before they could be retrieved by error().
+
+ bool error(err_t error_num, error_code* ec, const char* message)
+ {
+ if (!error_num)
+ {
+ if (ec != 0) ec->clear();
+ }
+ else
+ { // error
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(message,
+ error_code(error_num, system_category())));
+ else
+ ec->assign(error_num, system_category());
+ }
+ return error_num != 0;
+ }
+
+ bool error(err_t error_num, const path& p, error_code* ec, const char* message)
+ {
+ if (!error_num)
+ {
+ if (ec != 0) ec->clear();
+ }
+ else
+ { // error
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(message,
+ p, error_code(error_num, system_category())));
+ else
+ ec->assign(error_num, system_category());
+ }
+ return error_num != 0;
+ }
+
+ bool error(err_t error_num, const path& p1, const path& p2, error_code* ec,
+ const char* message)
+ {
+ if (!error_num)
+ {
+ if (ec != 0) ec->clear();
+ }
+ else
+ { // error
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(message,
+ p1, p2, error_code(error_num, system_category())));
+ else
+ ec->assign(error_num, system_category());
+ }
+ return error_num != 0;
+ }
+
+ // general helpers -----------------------------------------------------------------//
+
+ bool is_empty_directory(const path& p, error_code* ec)
+ {
+ return (ec != 0 ? fs::directory_iterator(p, *ec) : fs::directory_iterator(p))
+ == end_dir_itr;
+ }
+
+ bool not_found_error(int errval); // forward declaration
+
+ // only called if directory exists
+ bool remove_directory(const path& p) // true if succeeds or not found
+ {
+ return BOOST_REMOVE_DIRECTORY(p.c_str())
+ || not_found_error(BOOST_ERRNO); // mitigate possible file system race. See #11166
+ }
+
+ // only called if file exists
+ bool remove_file(const path& p) // true if succeeds or not found
+ {
+ return BOOST_DELETE_FILE(p.c_str())
+ || not_found_error(BOOST_ERRNO); // mitigate possible file system race. See #11166
+ }
+
+ // called by remove and remove_all_aux
+ bool remove_file_or_directory(const path& p, fs::file_type type, error_code* ec)
+ // return true if file removed, false if not removed
+ {
+ if (type == fs::file_not_found)
+ {
+ if (ec != 0) ec->clear();
+ return false;
+ }
+
+ if (type == fs::directory_file
+# ifdef BOOST_WINDOWS_API
+ || type == fs::_detail_directory_symlink
+# endif
+ )
+ {
+ if (error(!remove_directory(p) ? BOOST_ERRNO : 0, p, ec,
+ "boost::filesystem::remove"))
+ return false;
+ }
+ else
+ {
+ if (error(!remove_file(p) ? BOOST_ERRNO : 0, p, ec,
+ "boost::filesystem::remove"))
+ return false;
+ }
+ return true;
+ }
+
+ boost::uintmax_t remove_all_aux(const path& p, fs::file_type type,
+ error_code* ec)
+ {
+ boost::uintmax_t count = 0;
+
+ if (type == fs::directory_file) // but not a directory symlink
+ {
+ fs::directory_iterator itr;
+ if (ec != 0)
+ {
+ itr = fs::directory_iterator(p, *ec);
+ if (*ec)
+ return count;
+ }
+ else
+ itr = fs::directory_iterator(p);
+
+ while(itr != end_dir_itr)
+ {
+ fs::file_type tmp_type = query_file_type(itr->path(), ec);
+ if (ec != 0 && *ec)
+ return count;
+
+ count += remove_all_aux(itr->path(), tmp_type, ec);
+ if (ec != 0 && *ec)
+ return count;
+
+ fs::detail::directory_iterator_increment(itr, ec);
+ if (ec != 0 && *ec)
+ return count;
+ }
+ }
+
+ remove_file_or_directory(p, type, ec);
+ if (ec != 0 && *ec)
+ return count;
+
+ return ++count;
+ }
+
+#ifdef BOOST_POSIX_API
+
+//--------------------------------------------------------------------------------------//
+// //
+// POSIX-specific helpers //
+// //
+//--------------------------------------------------------------------------------------//
+
+ const char dot = '.';
+
+ bool not_found_error(int errval)
+ {
+ return errno == ENOENT || errno == ENOTDIR;
+ }
+
+ bool // true if ok
+ copy_file_api(const std::string& from_p,
+ const std::string& to_p, bool fail_if_exists)
+ {
+ const std::size_t buf_sz = 32768;
+ boost::scoped_array<char> buf(new char [buf_sz]);
+ int infile=-1, outfile=-1; // -1 means not open
+
+ // bug fixed: code previously did a stat()on the from_file first, but that
+ // introduced a gratuitous race condition; the stat()is now done after the open()
+
+ if ((infile = ::open(from_p.c_str(), O_RDONLY))< 0)
+ { return false; }
+
+ struct stat from_stat;
+ if (::stat(from_p.c_str(), &from_stat)!= 0)
+ {
+ ::close(infile);
+ return false;
+ }
+
+ int oflag = O_CREAT | O_WRONLY | O_TRUNC;
+ if (fail_if_exists)
+ oflag |= O_EXCL;
+ if ((outfile = ::open(to_p.c_str(), oflag, from_stat.st_mode))< 0)
+ {
+ int open_errno = errno;
+ BOOST_ASSERT(infile >= 0);
+ ::close(infile);
+ errno = open_errno;
+ return false;
+ }
+
+ ssize_t sz, sz_read=1, sz_write;
+ while (sz_read > 0
+ && (sz_read = ::read(infile, buf.get(), buf_sz)) > 0)
+ {
+ // Allow for partial writes - see Advanced Unix Programming (2nd Ed.),
+ // Marc Rochkind, Addison-Wesley, 2004, page 94
+ sz_write = 0;
+ do
+ {
+ BOOST_ASSERT(sz_read - sz_write > 0); // #1
+ // ticket 4438 claimed possible infinite loop if write returns 0. My analysis
+ // is that POSIX specifies 0 return only if 3rd arg is 0, and that will never
+ // happen due to loop entry and coninuation conditions. BOOST_ASSERT #1 above
+ // and #2 below added to verify that analysis.
+ if ((sz = ::write(outfile, buf.get() + sz_write,
+ sz_read - sz_write)) < 0)
+ {
+ sz_read = sz; // cause read loop termination
+ break; // and error reported after closes
+ }
+ BOOST_ASSERT(sz > 0); // #2
+ sz_write += sz;
+ } while (sz_write < sz_read);
+ }
+
+ if (::close(infile)< 0)
+ sz_read = -1;
+ if (::close(outfile)< 0)
+ sz_read = -1;
+
+ return sz_read >= 0;
+ }
+
+ inline fs::file_type query_file_type(const path& p, error_code* ec)
+ {
+ return fs::detail::symlink_status(p, ec).type();
+ }
+
+# else
+
+//--------------------------------------------------------------------------------------//
+// //
+// Windows-specific helpers //
+// //
+//--------------------------------------------------------------------------------------//
+
+ const std::size_t buf_size=128;
+
+ const wchar_t dot = L'.';
+
+ bool not_found_error(int errval)
+ {
+ return errval == ERROR_FILE_NOT_FOUND
+ || errval == ERROR_PATH_NOT_FOUND
+ || errval == ERROR_INVALID_NAME // "tools/jam/src/:sys:stat.h", "//foo"
+ || errval == ERROR_INVALID_DRIVE // USB card reader with no card inserted
+ || errval == ERROR_NOT_READY // CD/DVD drive with no disc inserted
+ || errval == ERROR_INVALID_PARAMETER // ":sys:stat.h"
+ || errval == ERROR_BAD_PATHNAME // "//nosuch" on Win64
+ || errval == ERROR_BAD_NETPATH; // "//nosuch" on Win32
+ }
+
+ static bool equal_extension( wchar_t const* p, wchar_t const (&x1)[ 5 ], wchar_t const (&x2)[ 5 ] )
+ {
+ return
+ (p[0] == x1[0] || p[0] == x2[0]) &&
+ (p[1] == x1[1] || p[1] == x2[1]) &&
+ (p[2] == x1[2] || p[2] == x2[2]) &&
+ (p[3] == x1[3] || p[3] == x2[3]) &&
+ p[4] == 0;
+ }
+
+ perms make_permissions(const path& p, DWORD attr)
+ {
+ perms prms = fs::owner_read | fs::group_read | fs::others_read;
+ if ((attr & FILE_ATTRIBUTE_READONLY) == 0)
+ prms |= fs::owner_write | fs::group_write | fs::others_write;
+ path ext = p.extension();
+ wchar_t const* q = ext.c_str();
+ if (equal_extension(q, L".exe", L".EXE")
+ || equal_extension(q, L".com", L".COM")
+ || equal_extension(q, L".bat", L".BAT")
+ || equal_extension(q, L".cmd", L".CMD"))
+ prms |= fs::owner_exe | fs::group_exe | fs::others_exe;
+ return prms;
+ }
+
+ // these constants come from inspecting some Microsoft sample code
+ std::time_t to_time_t(const FILETIME & ft)
+ {
+ __int64 t = (static_cast<__int64>(ft.dwHighDateTime)<< 32)
+ + ft.dwLowDateTime;
+# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // > VC++ 7.0
+ t -= 116444736000000000LL;
+# else
+ t -= 116444736000000000;
+# endif
+ t /= 10000000;
+ return static_cast<std::time_t>(t);
+ }
+
+ void to_FILETIME(std::time_t t, FILETIME & ft)
+ {
+ __int64 temp = t;
+ temp *= 10000000;
+# if !defined(BOOST_MSVC) || BOOST_MSVC > 1300 // > VC++ 7.0
+ temp += 116444736000000000LL;
+# else
+ temp += 116444736000000000;
+# endif
+ ft.dwLowDateTime = static_cast<DWORD>(temp);
+ ft.dwHighDateTime = static_cast<DWORD>(temp >> 32);
+ }
+
+ // Thanks to Jeremy Maitin-Shepard for much help and for permission to
+ // base the equivalent()implementation on portions of his
+ // file-equivalence-win32.cpp experimental code.
+
+ struct handle_wrapper
+ {
+ HANDLE handle;
+ handle_wrapper(HANDLE h)
+ : handle(h){}
+ ~handle_wrapper()
+ {
+ if (handle != INVALID_HANDLE_VALUE)
+ ::CloseHandle(handle);
+ }
+ };
+
+ HANDLE create_file_handle(const path& p, DWORD dwDesiredAccess,
+ DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes,
+ DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes,
+ HANDLE hTemplateFile)
+ {
+ return ::CreateFileW(p.c_str(), dwDesiredAccess, dwShareMode,
+ lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes,
+ hTemplateFile);
+ }
+
+ bool is_reparse_point_a_symlink(const path& p)
+ {
+ handle_wrapper h(create_file_handle(p, FILE_READ_EA,
+ FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE, NULL, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, NULL));
+ if (h.handle == INVALID_HANDLE_VALUE)
+ return false;
+
+ boost::scoped_array<char> buf(new char [MAXIMUM_REPARSE_DATA_BUFFER_SIZE]);
+
+ // Query the reparse data
+ DWORD dwRetLen;
+ BOOL result = ::DeviceIoControl(h.handle, FSCTL_GET_REPARSE_POINT, NULL, 0, buf.get(),
+ MAXIMUM_REPARSE_DATA_BUFFER_SIZE, &dwRetLen, NULL);
+ if (!result) return false;
+
+ return reinterpret_cast<const REPARSE_DATA_BUFFER*>(buf.get())->ReparseTag
+ == IO_REPARSE_TAG_SYMLINK
+ // Issue 9016 asked that NTFS directory junctions be recognized as directories.
+ // That is equivalent to recognizing them as symlinks, and then the normal symlink
+ // mechanism will take care of recognizing them as directories.
+ //
+ // Directory junctions are very similar to symlinks, but have some performance
+ // and other advantages over symlinks. They can be created from the command line
+ // with "mklink /j junction-name target-path".
+ || reinterpret_cast<const REPARSE_DATA_BUFFER*>(buf.get())->ReparseTag
+ == IO_REPARSE_TAG_MOUNT_POINT; // aka "directory junction" or "junction"
+ }
+
+ inline std::size_t get_full_path_name(
+ const path& src, std::size_t len, wchar_t* buf, wchar_t** p)
+ {
+ return static_cast<std::size_t>(
+ ::GetFullPathNameW(src.c_str(), static_cast<DWORD>(len), buf, p));
+ }
+
+ fs::file_status process_status_failure(const path& p, error_code* ec)
+ {
+ int errval(::GetLastError());
+ if (ec != 0) // always report errval, even though some
+ ec->assign(errval, system_category()); // errval values are not status_errors
+
+ if (not_found_error(errval))
+ {
+ return fs::file_status(fs::file_not_found, fs::no_perms);
+ }
+ else if (errval == ERROR_SHARING_VIOLATION)
+ {
+ return fs::file_status(fs::type_unknown);
+ }
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status",
+ p, error_code(errval, system_category())));
+ return fs::file_status(fs::status_error);
+ }
+
+ // differs from symlink_status() in that directory symlinks are reported as
+ // _detail_directory_symlink, as required on Windows by remove() and its helpers.
+ fs::file_type query_file_type(const path& p, error_code* ec)
+ {
+ DWORD attr(::GetFileAttributesW(p.c_str()));
+ if (attr == 0xFFFFFFFF)
+ {
+ return process_status_failure(p, ec).type();
+ }
+
+ if (ec != 0) ec->clear();
+
+ if (attr & FILE_ATTRIBUTE_REPARSE_POINT)
+ {
+ if (is_reparse_point_a_symlink(p))
+ return (attr & FILE_ATTRIBUTE_DIRECTORY)
+ ? fs::_detail_directory_symlink
+ : fs::symlink_file;
+ return fs::reparse_file;
+ }
+
+ return (attr & FILE_ATTRIBUTE_DIRECTORY)
+ ? fs::directory_file
+ : fs::regular_file;
+ }
+
+ BOOL resize_file_api(const wchar_t* p, boost::uintmax_t size)
+ {
+ handle_wrapper h(CreateFileW(p, GENERIC_WRITE, 0, 0, OPEN_EXISTING,
+ FILE_ATTRIBUTE_NORMAL, 0));
+ LARGE_INTEGER sz;
+ sz.QuadPart = size;
+ return h.handle != INVALID_HANDLE_VALUE
+ && ::SetFilePointerEx(h.handle, sz, 0, FILE_BEGIN)
+ && ::SetEndOfFile(h.handle);
+ }
+
+ // Windows kernel32.dll functions that may or may not be present
+ // must be accessed through pointers
+
+ typedef BOOL (WINAPI *PtrCreateHardLinkW)(
+ /*__in*/ LPCWSTR lpFileName,
+ /*__in*/ LPCWSTR lpExistingFileName,
+ /*__reserved*/ LPSECURITY_ATTRIBUTES lpSecurityAttributes
+ );
+
+ PtrCreateHardLinkW create_hard_link_api = PtrCreateHardLinkW(
+ ::GetProcAddress(
+ ::GetModuleHandleW(L"kernel32.dll"), "CreateHardLinkW"));
+
+ typedef BOOLEAN (WINAPI *PtrCreateSymbolicLinkW)(
+ /*__in*/ LPCWSTR lpSymlinkFileName,
+ /*__in*/ LPCWSTR lpTargetFileName,
+ /*__in*/ DWORD dwFlags
+ );
+
+ PtrCreateSymbolicLinkW create_symbolic_link_api = PtrCreateSymbolicLinkW(
+ ::GetProcAddress(
+ ::GetModuleHandleW(L"kernel32.dll"), "CreateSymbolicLinkW"));
+
+#endif
+
+//#ifdef BOOST_WINDOWS_API
+//
+//
+// inline bool get_free_disk_space(const std::wstring& ph,
+// PULARGE_INTEGER avail, PULARGE_INTEGER total, PULARGE_INTEGER free)
+// { return ::GetDiskFreeSpaceExW(ph.c_str(), avail, total, free)!= 0; }
+//
+//#endif
+
+} // unnamed namespace
+
+//--------------------------------------------------------------------------------------//
+// //
+// operations functions declared in operations.hpp //
+// in alphabetic order //
+// //
+//--------------------------------------------------------------------------------------//
+
+namespace boost
+{
+namespace filesystem
+{
+
+ BOOST_FILESYSTEM_DECL
+ path absolute(const path& p, const path& base)
+ {
+// if ( p.empty() || p.is_absolute() )
+// return p;
+// // recursively calling absolute is sub-optimal, but is simple
+// path abs_base(base.is_absolute() ? base : absolute(base));
+//# ifdef BOOST_WINDOWS_API
+// if (p.has_root_directory())
+// return abs_base.root_name() / p;
+// // !p.has_root_directory
+// if (p.has_root_name())
+// return p.root_name()
+// / abs_base.root_directory() / abs_base.relative_path() / p.relative_path();
+// // !p.has_root_name()
+//# endif
+// return abs_base / p;
+
+ // recursively calling absolute is sub-optimal, but is sure and simple
+ path abs_base(base.is_absolute() ? base : absolute(base));
+
+ // store expensive to compute values that are needed multiple times
+ path p_root_name (p.root_name());
+ path base_root_name (abs_base.root_name());
+ path p_root_directory (p.root_directory());
+
+ if (p.empty())
+ return abs_base;
+
+ if (!p_root_name.empty()) // p.has_root_name()
+ {
+ if (p_root_directory.empty()) // !p.has_root_directory()
+ return p_root_name / abs_base.root_directory()
+ / abs_base.relative_path() / p.relative_path();
+ // p is absolute, so fall through to return p at end of block
+ }
+
+ else if (!p_root_directory.empty()) // p.has_root_directory()
+ {
+# ifdef BOOST_POSIX_API
+ // POSIX can have root name it it is a network path
+ if (base_root_name.empty()) // !abs_base.has_root_name()
+ return p;
+# endif
+ return base_root_name / p;
+ }
+
+ else
+ {
+ return abs_base / p;
+ }
+
+ return p; // p.is_absolute() is true
+ }
+
+namespace detail
+{
+ BOOST_FILESYSTEM_DECL bool possible_large_file_size_support()
+ {
+# ifdef BOOST_POSIX_API
+ struct stat lcl_stat;
+ return sizeof(lcl_stat.st_size)> 4;
+# else
+ return true;
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ path canonical(const path& p, const path& base, system::error_code* ec)
+ {
+ path source (p.is_absolute() ? p : absolute(p, base));
+ path root(source.root_path());
+ path result;
+
+ system::error_code local_ec;
+ file_status stat (status(source, local_ec));
+
+ if (stat.type() == fs::file_not_found)
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "boost::filesystem::canonical", source,
+ error_code(system::errc::no_such_file_or_directory, system::generic_category())));
+ ec->assign(system::errc::no_such_file_or_directory, system::generic_category());
+ return result;
+ }
+ else if (local_ec)
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "boost::filesystem::canonical", source, local_ec));
+ *ec = local_ec;
+ return result;
+ }
+
+ bool scan (true);
+ while (scan)
+ {
+ scan = false;
+ result.clear();
+ for (path::iterator itr = source.begin(); itr != source.end(); ++itr)
+ {
+ if (*itr == dot_path())
+ continue;
+ if (*itr == dot_dot_path())
+ {
+ if (result != root)
+ result.remove_filename();
+ continue;
+ }
+
+ result /= *itr;
+
+ bool is_sym (is_symlink(detail::symlink_status(result, ec)));
+ if (ec && *ec)
+ return path();
+
+ if (is_sym)
+ {
+ path link(detail::read_symlink(result, ec));
+ if (ec && *ec)
+ return path();
+ result.remove_filename();
+
+ if (link.is_absolute())
+ {
+ for (++itr; itr != source.end(); ++itr)
+ link /= *itr;
+ source = link;
+ }
+ else // link is relative
+ {
+ path new_source(result);
+ new_source /= link;
+ for (++itr; itr != source.end(); ++itr)
+ new_source /= *itr;
+ source = new_source;
+ }
+ scan = true; // symlink causes scan to be restarted
+ break;
+ }
+ }
+ }
+ if (ec != 0)
+ ec->clear();
+ BOOST_ASSERT_MSG(result.is_absolute(), "canonical() implementation error; please report");
+ return result;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void copy(const path& from, const path& to, system::error_code* ec)
+ {
+ file_status s(detail::symlink_status(from, ec));
+ if (ec != 0 && *ec) return;
+
+ if(is_symlink(s))
+ {
+ detail::copy_symlink(from, to, ec);
+ }
+ else if(is_directory(s))
+ {
+ detail::copy_directory(from, to, ec);
+ }
+ else if(is_regular_file(s))
+ {
+ detail::copy_file(from, to, detail::fail_if_exists, ec);
+ }
+ else
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::copy",
+ from, to, error_code(BOOST_ERROR_NOT_SUPPORTED, system_category())));
+ ec->assign(BOOST_ERROR_NOT_SUPPORTED, system_category());
+ }
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void copy_directory(const path& from, const path& to, system::error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+ struct stat from_stat;
+# endif
+ error(!BOOST_COPY_DIRECTORY(from.c_str(), to.c_str()) ? BOOST_ERRNO : 0,
+ from, to, ec, "boost::filesystem::copy_directory");
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void copy_file(const path& from, const path& to, copy_option option, error_code* ec)
+ {
+ error(!BOOST_COPY_FILE(from.c_str(), to.c_str(),
+ option == fail_if_exists) ? BOOST_ERRNO : 0,
+ from, to, ec, "boost::filesystem::copy_file");
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void copy_symlink(const path& existing_symlink, const path& new_symlink,
+ system::error_code* ec)
+ {
+# if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0600
+ error(BOOST_ERROR_NOT_SUPPORTED, new_symlink, existing_symlink, ec,
+ "boost::filesystem::copy_symlink");
+
+# else // modern Windows or BOOST_POSIX_API
+ path p(read_symlink(existing_symlink, ec));
+ if (ec != 0 && *ec) return;
+ create_symlink(p, new_symlink, ec);
+
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ bool create_directories(const path& p, system::error_code* ec)
+ {
+ if (p.empty())
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "boost::filesystem::create_directories", p,
+ system::errc::make_error_code(system::errc::invalid_argument)));
+ else
+ ec->assign(system::errc::invalid_argument, system::generic_category());
+ return false;
+ }
+
+ if (p.filename_is_dot() || p.filename_is_dot_dot())
+ return create_directories(p.parent_path(), ec);
+
+ error_code local_ec;
+ file_status p_status = status(p, local_ec);
+
+ if (p_status.type() == directory_file)
+ {
+ if (ec != 0)
+ ec->clear();
+ return false;
+ }
+
+ path parent = p.parent_path();
+ BOOST_ASSERT_MSG(parent != p, "internal error: p == p.parent_path()");
+ if (!parent.empty())
+ {
+ // determine if the parent exists
+ file_status parent_status = status(parent, local_ec);
+
+ // if the parent does not exist, create the parent
+ if (parent_status.type() == file_not_found)
+ {
+ create_directories(parent, local_ec);
+ if (local_ec)
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "boost::filesystem::create_directories", parent, local_ec));
+ else
+ *ec = local_ec;
+ return false;
+ }
+ }
+ }
+
+ // create the directory
+ return create_directory(p, ec);
+ }
+
+ BOOST_FILESYSTEM_DECL
+ bool create_directory(const path& p, error_code* ec)
+ {
+ if (BOOST_CREATE_DIRECTORY(p.c_str()))
+ {
+ if (ec != 0)
+ ec->clear();
+ return true;
+ }
+
+ // attempt to create directory failed
+ int errval(BOOST_ERRNO); // save reason for failure
+ error_code dummy;
+
+ if (is_directory(p, dummy))
+ {
+ if (ec != 0)
+ ec->clear();
+ return false;
+ }
+
+ // attempt to create directory failed && it doesn't already exist
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::create_directory",
+ p, error_code(errval, system_category())));
+ else
+ ec->assign(errval, system_category());
+
+ return false;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void create_directory_symlink(const path& to, const path& from,
+ system::error_code* ec)
+ {
+# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
+
+ error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec,
+ "boost::filesystem::create_directory_symlink");
+# else
+
+# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0600
+ // see if actually supported by Windows runtime dll
+ if (error(!create_symbolic_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec,
+ "boost::filesystem::create_directory_symlink"))
+ return;
+# endif
+
+ error(!BOOST_CREATE_SYMBOLIC_LINK(from.c_str(), to.c_str(),
+ SYMBOLIC_LINK_FLAG_DIRECTORY) ? BOOST_ERRNO : 0,
+ to, from, ec, "boost::filesystem::create_directory_symlink");
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void create_hard_link(const path& to, const path& from, error_code* ec)
+ {
+
+# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0500 // SDK earlier than Win 2K
+
+ error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec,
+ "boost::filesystem::create_hard_link");
+# else
+
+# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0500
+ // see if actually supported by Windows runtime dll
+ if (error(!create_hard_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec,
+ "boost::filesystem::create_hard_link"))
+ return;
+# endif
+
+ error(!BOOST_CREATE_HARD_LINK(from.c_str(), to.c_str()) ? BOOST_ERRNO : 0, to, from, ec,
+ "boost::filesystem::create_hard_link");
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void create_symlink(const path& to, const path& from, error_code* ec)
+ {
+# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
+ error(BOOST_ERROR_NOT_SUPPORTED, to, from, ec,
+ "boost::filesystem::create_directory_symlink");
+# else
+
+# if defined(BOOST_WINDOWS_API) && _WIN32_WINNT >= 0x0600
+ // see if actually supported by Windows runtime dll
+ if (error(!create_symbolic_link_api ? BOOST_ERROR_NOT_SUPPORTED : 0, to, from, ec,
+ "boost::filesystem::create_symlink"))
+ return;
+# endif
+
+ error(!BOOST_CREATE_SYMBOLIC_LINK(from.c_str(), to.c_str(), 0) ? BOOST_ERRNO : 0,
+ to, from, ec, "boost::filesystem::create_symlink");
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ path current_path(error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+ path cur;
+ for (long path_max = 128;; path_max *=2)// loop 'til buffer large enough
+ {
+ boost::scoped_array<char>
+ buf(new char[static_cast<std::size_t>(path_max)]);
+ if (::getcwd(buf.get(), static_cast<std::size_t>(path_max))== 0)
+ {
+ if (error(errno != ERANGE ? errno : 0
+ // bug in some versions of the Metrowerks C lib on the Mac: wrong errno set
+# if defined(__MSL__) && (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
+ && errno != 0
+# endif
+ , ec, "boost::filesystem::current_path"))
+ {
+ break;
+ }
+ }
+ else
+ {
+ cur = buf.get();
+ if (ec != 0) ec->clear();
+ break;
+ }
+ }
+ return cur;
+
+# else
+ DWORD sz;
+ if ((sz = ::GetCurrentDirectoryW(0, NULL)) == 0)sz = 1;
+ boost::scoped_array<path::value_type> buf(new path::value_type[sz]);
+ error(::GetCurrentDirectoryW(sz, buf.get()) == 0 ? BOOST_ERRNO : 0, ec,
+ "boost::filesystem::current_path");
+ return path(buf.get());
+# endif
+ }
+
+
+ BOOST_FILESYSTEM_DECL
+ void current_path(const path& p, system::error_code* ec)
+ {
+ error(!BOOST_SET_CURRENT_DIRECTORY(p.c_str()) ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::current_path");
+ }
+
+ BOOST_FILESYSTEM_DECL
+ bool equivalent(const path& p1, const path& p2, system::error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+ struct stat s2;
+ int e2(::stat(p2.c_str(), &s2));
+ struct stat s1;
+ int e1(::stat(p1.c_str(), &s1));
+
+ if (e1 != 0 || e2 != 0)
+ {
+ // if one is invalid and the other isn't then they aren't equivalent,
+ // but if both are invalid then it is an error
+ error (e1 != 0 && e2 != 0, p1, p2, ec, "boost::filesystem::equivalent");
+ return false;
+ }
+
+ // both stats now known to be valid
+ return s1.st_dev == s2.st_dev && s1.st_ino == s2.st_ino
+ // According to the POSIX stat specs, "The st_ino and st_dev fields
+ // taken together uniquely identify the file within the system."
+ // Just to be sure, size and mod time are also checked.
+ && s1.st_size == s2.st_size && s1.st_mtime == s2.st_mtime;
+
+# else // Windows
+
+ // Note well: Physical location on external media is part of the
+ // equivalence criteria. If there are no open handles, physical location
+ // can change due to defragmentation or other relocations. Thus handles
+ // must be held open until location information for both paths has
+ // been retrieved.
+
+ // p2 is done first, so any error reported is for p1
+ handle_wrapper h2(
+ create_file_handle(
+ p2.c_str(),
+ 0,
+ FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
+ 0,
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS,
+ 0));
+
+ handle_wrapper h1(
+ create_file_handle(
+ p1.c_str(),
+ 0,
+ FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
+ 0,
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS,
+ 0));
+
+ if (h1.handle == INVALID_HANDLE_VALUE
+ || h2.handle == INVALID_HANDLE_VALUE)
+ {
+ // if one is invalid and the other isn't, then they aren't equivalent,
+ // but if both are invalid then it is an error
+ error((h1.handle == INVALID_HANDLE_VALUE
+ && h2.handle == INVALID_HANDLE_VALUE) ? BOOST_ERROR_NOT_SUPPORTED : 0, p1, p2, ec,
+ "boost::filesystem::equivalent");
+ return false;
+ }
+
+ // at this point, both handles are known to be valid
+
+ BY_HANDLE_FILE_INFORMATION info1, info2;
+
+ if (error(!::GetFileInformationByHandle(h1.handle, &info1) ? BOOST_ERRNO : 0,
+ p1, p2, ec, "boost::filesystem::equivalent"))
+ return false;
+
+ if (error(!::GetFileInformationByHandle(h2.handle, &info2) ? BOOST_ERRNO : 0,
+ p1, p2, ec, "boost::filesystem::equivalent"))
+ return false;
+
+ // In theory, volume serial numbers are sufficient to distinguish between
+ // devices, but in practice VSN's are sometimes duplicated, so last write
+ // time and file size are also checked.
+ return
+ info1.dwVolumeSerialNumber == info2.dwVolumeSerialNumber
+ && info1.nFileIndexHigh == info2.nFileIndexHigh
+ && info1.nFileIndexLow == info2.nFileIndexLow
+ && info1.nFileSizeHigh == info2.nFileSizeHigh
+ && info1.nFileSizeLow == info2.nFileSizeLow
+ && info1.ftLastWriteTime.dwLowDateTime
+ == info2.ftLastWriteTime.dwLowDateTime
+ && info1.ftLastWriteTime.dwHighDateTime
+ == info2.ftLastWriteTime.dwHighDateTime;
+
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ boost::uintmax_t file_size(const path& p, error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+
+ struct stat path_stat;
+ if (error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::file_size"))
+ return static_cast<boost::uintmax_t>(-1);
+ if (error(!S_ISREG(path_stat.st_mode) ? EPERM : 0,
+ p, ec, "boost::filesystem::file_size"))
+ return static_cast<boost::uintmax_t>(-1);
+
+ return static_cast<boost::uintmax_t>(path_stat.st_size);
+
+# else // Windows
+
+ // assume uintmax_t is 64-bits on all Windows compilers
+
+ WIN32_FILE_ATTRIBUTE_DATA fad;
+
+ if (error(::GetFileAttributesExW(p.c_str(), ::GetFileExInfoStandard, &fad)== 0
+ ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::file_size"))
+ return static_cast<boost::uintmax_t>(-1);
+
+ if (error((fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)!= 0
+ ? ERROR_NOT_SUPPORTED : 0, p, ec, "boost::filesystem::file_size"))
+ return static_cast<boost::uintmax_t>(-1);
+
+ return (static_cast<boost::uintmax_t>(fad.nFileSizeHigh)
+ << (sizeof(fad.nFileSizeLow)*8)) + fad.nFileSizeLow;
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ boost::uintmax_t hard_link_count(const path& p, system::error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+
+ struct stat path_stat;
+ return error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::hard_link_count")
+ ? 0
+ : static_cast<boost::uintmax_t>(path_stat.st_nlink);
+
+# else // Windows
+
+ // Link count info is only available through GetFileInformationByHandle
+ BY_HANDLE_FILE_INFORMATION info;
+ handle_wrapper h(
+ create_file_handle(p.c_str(), 0,
+ FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0));
+ return
+ !error(h.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::hard_link_count")
+ && !error(::GetFileInformationByHandle(h.handle, &info)== 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::hard_link_count")
+ ? info.nNumberOfLinks
+ : 0;
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ path initial_path(error_code* ec)
+ {
+ static path init_path;
+ if (init_path.empty())
+ init_path = current_path(ec);
+ else if (ec != 0) ec->clear();
+ return init_path;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ bool is_empty(const path& p, system::error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+
+ struct stat path_stat;
+ if (error(::stat(p.c_str(), &path_stat)!= 0,
+ p, ec, "boost::filesystem::is_empty"))
+ return false;
+ return S_ISDIR(path_stat.st_mode)
+ ? is_empty_directory(p, ec)
+ : path_stat.st_size == 0;
+# else
+
+ WIN32_FILE_ATTRIBUTE_DATA fad;
+ if (error(::GetFileAttributesExW(p.c_str(), ::GetFileExInfoStandard, &fad)== 0
+ ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::is_empty"))
+ return false;
+
+ if (ec != 0) ec->clear();
+ return
+ (fad.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ ? is_empty_directory(p, ec)
+ : (!fad.nFileSizeHigh && !fad.nFileSizeLow);
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ std::time_t last_write_time(const path& p, system::error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+
+ struct stat path_stat;
+ if (error(::stat(p.c_str(), &path_stat)!= 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::last_write_time"))
+ return std::time_t(-1);
+ return path_stat.st_mtime;
+
+# else
+
+ handle_wrapper hw(
+ create_file_handle(p.c_str(), 0,
+ FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0));
+
+ if (error(hw.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::last_write_time"))
+ return std::time_t(-1);
+
+ FILETIME lwt;
+
+ if (error(::GetFileTime(hw.handle, 0, 0, &lwt)== 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::last_write_time"))
+ return std::time_t(-1);
+
+ return to_time_t(lwt);
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void last_write_time(const path& p, const std::time_t new_time,
+ system::error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+
+ struct stat path_stat;
+ if (error(::stat(p.c_str(), &path_stat)!= 0,
+ p, ec, "boost::filesystem::last_write_time"))
+ return;
+ ::utimbuf buf;
+ buf.actime = path_stat.st_atime; // utime()updates access time too:-(
+ buf.modtime = new_time;
+ error(::utime(p.c_str(), &buf)!= 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::last_write_time");
+
+# else
+
+ handle_wrapper hw(
+ create_file_handle(p.c_str(), FILE_WRITE_ATTRIBUTES,
+ FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE, 0,
+ OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0));
+
+ if (error(hw.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::last_write_time"))
+ return;
+
+ FILETIME lwt;
+ to_FILETIME(new_time, lwt);
+
+ error(::SetFileTime(hw.handle, 0, 0, &lwt)== 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::last_write_time");
+# endif
+ }
+
+# ifdef BOOST_POSIX_API
+ const perms active_bits(all_all | set_uid_on_exe | set_gid_on_exe | sticky_bit);
+ inline mode_t mode_cast(perms prms) { return prms & active_bits; }
+# endif
+
+ BOOST_FILESYSTEM_DECL
+ void permissions(const path& p, perms prms, system::error_code* ec)
+ {
+ BOOST_ASSERT_MSG(!((prms & add_perms) && (prms & remove_perms)),
+ "add_perms and remove_perms are mutually exclusive");
+
+ if ((prms & add_perms) && (prms & remove_perms)) // precondition failed
+ return;
+
+# ifdef BOOST_POSIX_API
+ error_code local_ec;
+ file_status current_status((prms & symlink_perms)
+ ? fs::symlink_status(p, local_ec)
+ : fs::status(p, local_ec));
+ if (local_ec)
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "boost::filesystem::permissions", p, local_ec));
+ else
+ *ec = local_ec;
+ return;
+ }
+
+ if (prms & add_perms)
+ prms |= current_status.permissions();
+ else if (prms & remove_perms)
+ prms = current_status.permissions() & ~prms;
+
+ // OS X <10.10, iOS <8.0 and some other platforms don't support fchmodat().
+ // Solaris (SunPro and gcc) only support fchmodat() on Solaris 11 and higher,
+ // and a runtime check is too much trouble.
+ // Linux does not support permissions on symbolic links and has no plans to
+ // support them in the future. The chmod() code is thus more practical,
+ // rather than always hitting ENOTSUP when sending in AT_SYMLINK_NO_FOLLOW.
+ // - See the 3rd paragraph of
+ // "Symbolic link ownership, permissions, and timestamps" at:
+ // "http://man7.org/linux/man-pages/man7/symlink.7.html"
+ // - See the fchmodat() Linux man page:
+ // "http://man7.org/linux/man-pages/man2/fchmodat.2.html"
+# if defined(AT_FDCWD) && defined(AT_SYMLINK_NOFOLLOW) \
+ && !(defined(__SUNPRO_CC) || defined(__sun) || defined(sun)) \
+ && !(defined(linux) || defined(__linux) || defined(__linux__)) \
+ && !(defined(__MAC_OS_X_VERSION_MIN_REQUIRED) \
+ && __MAC_OS_X_VERSION_MIN_REQUIRED < 101000) \
+ && !(defined(__IPHONE_OS_VERSION_MIN_REQUIRED) \
+ && __IPHONE_OS_VERSION_MIN_REQUIRED < 80000) \
+ && !(defined(__QNX__) && (_NTO_VERSION <= 700))
+ if (::fchmodat(AT_FDCWD, p.c_str(), mode_cast(prms),
+ !(prms & symlink_perms) ? 0 : AT_SYMLINK_NOFOLLOW))
+# else // fallback if fchmodat() not supported
+ if (::chmod(p.c_str(), mode_cast(prms)))
+# endif
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error(
+ "boost::filesystem::permissions", p,
+ error_code(errno, system::generic_category())));
+ else
+ ec->assign(errno, system::generic_category());
+ }
+
+# else // Windows
+
+ // if not going to alter FILE_ATTRIBUTE_READONLY, just return
+ if (!(!((prms & (add_perms | remove_perms)))
+ || (prms & (owner_write|group_write|others_write))))
+ return;
+
+ DWORD attr = ::GetFileAttributesW(p.c_str());
+
+ if (error(attr == 0 ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::permissions"))
+ return;
+
+ if (prms & add_perms)
+ attr &= ~FILE_ATTRIBUTE_READONLY;
+ else if (prms & remove_perms)
+ attr |= FILE_ATTRIBUTE_READONLY;
+ else if (prms & (owner_write|group_write|others_write))
+ attr &= ~FILE_ATTRIBUTE_READONLY;
+ else
+ attr |= FILE_ATTRIBUTE_READONLY;
+
+ error(::SetFileAttributesW(p.c_str(), attr) == 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::permissions");
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ path read_symlink(const path& p, system::error_code* ec)
+ {
+ path symlink_path;
+
+# ifdef BOOST_POSIX_API
+
+ for (std::size_t path_max = 64;; path_max *= 2)// loop 'til buffer large enough
+ {
+ boost::scoped_array<char> buf(new char[path_max]);
+ ssize_t result;
+ if ((result=::readlink(p.c_str(), buf.get(), path_max))== -1)
+ {
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::read_symlink",
+ p, error_code(errno, system_category())));
+ else ec->assign(errno, system_category());
+ break;
+ }
+ else
+ {
+ if(result != static_cast<ssize_t>(path_max))
+ {
+ symlink_path.assign(buf.get(), buf.get() + result);
+ if (ec != 0) ec->clear();
+ break;
+ }
+ }
+ }
+
+# elif _WIN32_WINNT < 0x0600 // SDK earlier than Vista and Server 2008
+ error(BOOST_ERROR_NOT_SUPPORTED, p, ec,
+ "boost::filesystem::read_symlink");
+# else // Vista and Server 2008 SDK, or later
+
+ union info_t
+ {
+ char buf[REPARSE_DATA_BUFFER_HEADER_SIZE+MAXIMUM_REPARSE_DATA_BUFFER_SIZE];
+ REPARSE_DATA_BUFFER rdb;
+ } info;
+
+ handle_wrapper h(
+ create_file_handle(p.c_str(), GENERIC_READ, 0, 0, OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS | FILE_FLAG_OPEN_REPARSE_POINT, 0));
+
+ if (error(h.handle == INVALID_HANDLE_VALUE ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::read_symlink"))
+ return symlink_path;
+
+ DWORD sz;
+
+ if (!error(::DeviceIoControl(h.handle, FSCTL_GET_REPARSE_POINT,
+ 0, 0, info.buf, sizeof(info), &sz, 0) == 0 ? BOOST_ERRNO : 0, p, ec,
+ "boost::filesystem::read_symlink" ))
+ symlink_path.assign(
+ static_cast<wchar_t*>(info.rdb.SymbolicLinkReparseBuffer.PathBuffer)
+ + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t),
+ static_cast<wchar_t*>(info.rdb.SymbolicLinkReparseBuffer.PathBuffer)
+ + info.rdb.SymbolicLinkReparseBuffer.PrintNameOffset/sizeof(wchar_t)
+ + info.rdb.SymbolicLinkReparseBuffer.PrintNameLength/sizeof(wchar_t));
+# endif
+ return symlink_path;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ path relative(const path& p, const path& base, error_code* ec)
+ {
+ error_code tmp_ec;
+ path wc_base(weakly_canonical(base, &tmp_ec));
+ if (error(tmp_ec.value(), base, ec, "boost::filesystem::relative"))
+ return path();
+ path wc_p(weakly_canonical(p, &tmp_ec));
+ if (error(tmp_ec.value(), base, ec, "boost::filesystem::relative"))
+ return path();
+ return wc_p.lexically_relative(wc_base);
+ }
+
+ BOOST_FILESYSTEM_DECL
+ bool remove(const path& p, error_code* ec)
+ {
+ error_code tmp_ec;
+ file_type type = query_file_type(p, &tmp_ec);
+ if (error(type == status_error ? tmp_ec.value() : 0, p, ec,
+ "boost::filesystem::remove"))
+ return false;
+
+ // Since POSIX remove() is specified to work with either files or directories, in a
+ // perfect world it could just be called. But some important real-world operating
+ // systems (Windows, Mac OS X, for example) don't implement the POSIX spec. So
+ // remove_file_or_directory() is always called to keep it simple.
+ return remove_file_or_directory(p, type, ec);
+ }
+
+ BOOST_FILESYSTEM_DECL
+ boost::uintmax_t remove_all(const path& p, error_code* ec)
+ {
+ error_code tmp_ec;
+ file_type type = query_file_type(p, &tmp_ec);
+ if (error(type == status_error ? tmp_ec.value() : 0, p, ec,
+ "boost::filesystem::remove_all"))
+ return 0;
+
+ return (type != status_error && type != file_not_found) // exists
+ ? remove_all_aux(p, type, ec)
+ : 0;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void rename(const path& old_p, const path& new_p, error_code* ec)
+ {
+ error(!BOOST_MOVE_FILE(old_p.c_str(), new_p.c_str()) ? BOOST_ERRNO : 0, old_p, new_p,
+ ec, "boost::filesystem::rename");
+ }
+
+ BOOST_FILESYSTEM_DECL
+ void resize_file(const path& p, uintmax_t size, system::error_code* ec)
+ {
+# if defined(BOOST_POSIX_API)
+ if (BOOST_UNLIKELY(size > static_cast< uintmax_t >((std::numeric_limits< off_t >::max)()))) {
+ error(system::errc::file_too_large, p, ec, "boost::filesystem::resize_file");
+ return;
+ }
+# endif
+ error(!BOOST_RESIZE_FILE(p.c_str(), size) ? BOOST_ERRNO : 0, p, ec,
+ "boost::filesystem::resize_file");
+ }
+
+ BOOST_FILESYSTEM_DECL
+ space_info space(const path& p, error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+ struct BOOST_STATVFS vfs;
+ space_info info;
+ if (!error(::BOOST_STATVFS(p.c_str(), &vfs) ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::space"))
+ {
+ info.capacity
+ = static_cast<boost::uintmax_t>(vfs.f_blocks)* BOOST_STATVFS_F_FRSIZE;
+ info.free
+ = static_cast<boost::uintmax_t>(vfs.f_bfree)* BOOST_STATVFS_F_FRSIZE;
+ info.available
+ = static_cast<boost::uintmax_t>(vfs.f_bavail)* BOOST_STATVFS_F_FRSIZE;
+ }
+
+# else
+ ULARGE_INTEGER avail, total, free;
+ space_info info;
+
+ if (!error(::GetDiskFreeSpaceExW(p.c_str(), &avail, &total, &free)== 0,
+ p, ec, "boost::filesystem::space"))
+ {
+ info.capacity
+ = (static_cast<boost::uintmax_t>(total.HighPart)<< 32)
+ + total.LowPart;
+ info.free
+ = (static_cast<boost::uintmax_t>(free.HighPart)<< 32)
+ + free.LowPart;
+ info.available
+ = (static_cast<boost::uintmax_t>(avail.HighPart)<< 32)
+ + avail.LowPart;
+ }
+
+# endif
+
+ else
+ {
+ info.capacity = info.free = info.available = 0;
+ }
+ return info;
+ }
+
+ BOOST_FILESYSTEM_DECL
+ file_status status(const path& p, error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+
+ struct stat path_stat;
+ if (::stat(p.c_str(), &path_stat)!= 0)
+ {
+ if (ec != 0) // always report errno, even though some
+ ec->assign(errno, system_category()); // errno values are not status_errors
+
+ if (not_found_error(errno))
+ {
+ return fs::file_status(fs::file_not_found, fs::no_perms);
+ }
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status",
+ p, error_code(errno, system_category())));
+ return fs::file_status(fs::status_error);
+ }
+ if (ec != 0) ec->clear();;
+ if (S_ISDIR(path_stat.st_mode))
+ return fs::file_status(fs::directory_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISREG(path_stat.st_mode))
+ return fs::file_status(fs::regular_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISBLK(path_stat.st_mode))
+ return fs::file_status(fs::block_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISCHR(path_stat.st_mode))
+ return fs::file_status(fs::character_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISFIFO(path_stat.st_mode))
+ return fs::file_status(fs::fifo_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISSOCK(path_stat.st_mode))
+ return fs::file_status(fs::socket_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ return fs::file_status(fs::type_unknown);
+
+# else // Windows
+
+ DWORD attr(::GetFileAttributesW(p.c_str()));
+ if (attr == 0xFFFFFFFF)
+ {
+ return process_status_failure(p, ec);
+ }
+
+ // reparse point handling;
+ // since GetFileAttributesW does not resolve symlinks, try to open a file
+ // handle to discover if the file exists
+ if (attr & FILE_ATTRIBUTE_REPARSE_POINT)
+ {
+ handle_wrapper h(
+ create_file_handle(
+ p.c_str(),
+ 0, // dwDesiredAccess; attributes only
+ FILE_SHARE_DELETE | FILE_SHARE_READ | FILE_SHARE_WRITE,
+ 0, // lpSecurityAttributes
+ OPEN_EXISTING,
+ FILE_FLAG_BACKUP_SEMANTICS,
+ 0)); // hTemplateFile
+ if (h.handle == INVALID_HANDLE_VALUE)
+ {
+ return process_status_failure(p, ec);
+ }
+
+ if (!is_reparse_point_a_symlink(p))
+ return file_status(reparse_file, make_permissions(p, attr));
+ }
+
+ if (ec != 0) ec->clear();
+ return (attr & FILE_ATTRIBUTE_DIRECTORY)
+ ? file_status(directory_file, make_permissions(p, attr))
+ : file_status(regular_file, make_permissions(p, attr));
+
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ file_status symlink_status(const path& p, error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+
+ struct stat path_stat;
+ if (::lstat(p.c_str(), &path_stat)!= 0)
+ {
+ if (ec != 0) // always report errno, even though some
+ ec->assign(errno, system_category()); // errno values are not status_errors
+
+ if (errno == ENOENT || errno == ENOTDIR) // these are not errors
+ {
+ return fs::file_status(fs::file_not_found, fs::no_perms);
+ }
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(filesystem_error("boost::filesystem::status",
+ p, error_code(errno, system_category())));
+ return fs::file_status(fs::status_error);
+ }
+ if (ec != 0) ec->clear();
+ if (S_ISREG(path_stat.st_mode))
+ return fs::file_status(fs::regular_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISDIR(path_stat.st_mode))
+ return fs::file_status(fs::directory_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISLNK(path_stat.st_mode))
+ return fs::file_status(fs::symlink_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISBLK(path_stat.st_mode))
+ return fs::file_status(fs::block_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISCHR(path_stat.st_mode))
+ return fs::file_status(fs::character_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISFIFO(path_stat.st_mode))
+ return fs::file_status(fs::fifo_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ if (S_ISSOCK(path_stat.st_mode))
+ return fs::file_status(fs::socket_file,
+ static_cast<perms>(path_stat.st_mode) & fs::perms_mask);
+ return fs::file_status(fs::type_unknown);
+
+# else // Windows
+
+ DWORD attr(::GetFileAttributesW(p.c_str()));
+ if (attr == 0xFFFFFFFF)
+ {
+ return process_status_failure(p, ec);
+ }
+
+ if (ec != 0) ec->clear();
+
+ if (attr & FILE_ATTRIBUTE_REPARSE_POINT)
+ return is_reparse_point_a_symlink(p)
+ ? file_status(symlink_file, make_permissions(p, attr))
+ : file_status(reparse_file, make_permissions(p, attr));
+
+ return (attr & FILE_ATTRIBUTE_DIRECTORY)
+ ? file_status(directory_file, make_permissions(p, attr))
+ : file_status(regular_file, make_permissions(p, attr));
+
+# endif
+ }
+
+ // contributed by Jeff Flinn
+ BOOST_FILESYSTEM_DECL
+ path temp_directory_path(system::error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+ const char* val = 0;
+
+ (val = std::getenv("TMPDIR" )) ||
+ (val = std::getenv("TMP" )) ||
+ (val = std::getenv("TEMP" )) ||
+ (val = std::getenv("TEMPDIR"));
+
+# ifdef __ANDROID__
+ const char* default_tmp = "/data/local/tmp";
+# else
+ const char* default_tmp = "/tmp";
+# endif
+ path p((val!=0) ? val : default_tmp);
+
+ if (p.empty() || (ec&&!is_directory(p, *ec))||(!ec&&!is_directory(p)))
+ {
+ error(ENOTDIR, p, ec, "boost::filesystem::temp_directory_path");
+ return p;
+ }
+
+ return p;
+
+# else // Windows
+
+ const wchar_t* tmp_env = L"TMP";
+ const wchar_t* temp_env = L"TEMP";
+ const wchar_t* localappdata_env = L"LOCALAPPDATA";
+ const wchar_t* userprofile_env = L"USERPROFILE";
+ const wchar_t* env_list[]
+ = {tmp_env, temp_env, localappdata_env, userprofile_env, 0};
+
+ path p;
+ for (int i = 0; env_list[i]; ++i)
+ {
+ std::wstring env = wgetenv(env_list[i]);
+ if (!env.empty())
+ {
+ p = env;
+ if (i >= 2)
+ p /= L"Temp";
+ error_code lcl_ec;
+ if (exists(p, lcl_ec) && !lcl_ec && is_directory(p, lcl_ec) && !lcl_ec)
+ break;
+ p.clear();
+ }
+ }
+
+ if (p.empty())
+ {
+ // use vector since in C++03 a string is not required to be contiguous
+ std::vector<wchar_t> buf(::GetWindowsDirectoryW(NULL, 0));
+
+ if (buf.empty()
+ || ::GetWindowsDirectoryW(&buf[0], static_cast<UINT>(buf.size())) == 0)
+ {
+ error(::GetLastError(), ec, "boost::filesystem::temp_directory_path");
+ return path();
+ }
+ p = &*buf.begin(); // do not depend on buf.size(); see ticket #10388
+ p /= L"Temp";
+ }
+ return p;
+
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ path system_complete(const path& p, system::error_code* ec)
+ {
+# ifdef BOOST_POSIX_API
+ return (p.empty() || p.is_absolute())
+ ? p : current_path()/ p;
+
+# else
+ if (p.empty())
+ {
+ if (ec != 0) ec->clear();
+ return p;
+ }
+ wchar_t buf[buf_size];
+ wchar_t* pfn;
+ std::size_t len = get_full_path_name(p, buf_size, buf, &pfn);
+
+ if (error(len == 0 ? BOOST_ERRNO : 0, p, ec, "boost::filesystem::system_complete"))
+ return path();
+
+ if (len < buf_size)// len does not include null termination character
+ return path(&buf[0]);
+
+ boost::scoped_array<wchar_t> big_buf(new wchar_t[len]);
+
+ return error(get_full_path_name(p, len , big_buf.get(), &pfn)== 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::system_complete")
+ ? path()
+ : path(big_buf.get());
+# endif
+ }
+
+ BOOST_FILESYSTEM_DECL
+ path weakly_canonical(const path& p, system::error_code* ec)
+ {
+ path head(p);
+ path tail;
+ system::error_code tmp_ec;
+ path::iterator itr = p.end();
+
+ for (; !head.empty(); --itr)
+ {
+ file_status head_status = status(head, tmp_ec);
+ if (error(head_status.type() == fs::status_error,
+ head, ec, "boost::filesystem::weakly_canonical"))
+ return path();
+ if (head_status.type() != fs::file_not_found)
+ break;
+ head.remove_filename();
+ }
+
+ bool tail_has_dots = false;
+ for (; itr != p.end(); ++itr)
+ {
+ tail /= *itr;
+ // for a later optimization, track if any dot or dot-dot elements are present
+ if (itr->native().size() <= 2
+ && itr->native()[0] == dot
+ && (itr->native().size() == 1 || itr->native()[1] == dot))
+ tail_has_dots = true;
+ }
+
+ if (head.empty())
+ return p.lexically_normal();
+ head = canonical(head, tmp_ec);
+ if (error(tmp_ec.value(), head, ec, "boost::filesystem::weakly_canonical"))
+ return path();
+ return tail.empty()
+ ? head
+ : (tail_has_dots // optimization: only normalize if tail had dot or dot-dot element
+ ? (head/tail).lexically_normal()
+ : head/tail);
+ }
+} // namespace detail
+
+//--------------------------------------------------------------------------------------//
+// //
+// directory_entry //
+// //
+//--------------------------------------------------------------------------------------//
+
+ file_status
+ directory_entry::m_get_status(system::error_code* ec) const
+ {
+ if (!status_known(m_status))
+ {
+ // optimization: if the symlink status is known, and it isn't a symlink,
+ // then status and symlink_status are identical so just copy the
+ // symlink status to the regular status.
+ if (status_known(m_symlink_status)
+ && !is_symlink(m_symlink_status))
+ {
+ m_status = m_symlink_status;
+ if (ec != 0) ec->clear();
+ }
+ else m_status = detail::status(m_path, ec);
+ }
+ else if (ec != 0) ec->clear();
+ return m_status;
+ }
+
+ file_status
+ directory_entry::m_get_symlink_status(system::error_code* ec) const
+ {
+ if (!status_known(m_symlink_status))
+ m_symlink_status = detail::symlink_status(m_path, ec);
+ else if (ec != 0) ec->clear();
+ return m_symlink_status;
+ }
+
+// dispatch directory_entry supplied here rather than in
+// <boost/filesystem/path_traits.hpp>, thus avoiding header circularity.
+// test cases are in operations_unit_test.cpp
+
+namespace path_traits
+{
+ void dispatch(const directory_entry & de,
+# ifdef BOOST_WINDOWS_API
+ std::wstring& to,
+# else
+ std::string& to,
+# endif
+ const codecvt_type &)
+ {
+ to = de.path().native();
+ }
+
+ void dispatch(const directory_entry & de,
+# ifdef BOOST_WINDOWS_API
+ std::wstring& to
+# else
+ std::string& to
+# endif
+ )
+ {
+ to = de.path().native();
+ }
+} // namespace path_traits
+} // namespace filesystem
+} // namespace boost
+
+//--------------------------------------------------------------------------------------//
+// //
+// directory_iterator //
+// //
+//--------------------------------------------------------------------------------------//
+
+namespace
+{
+# ifdef BOOST_POSIX_API
+
+ error_code path_max(std::size_t & result)
+ // this code is based on Stevens and Rago, Advanced Programming in the
+ // UNIX envirnment, 2nd Ed., ISBN 0-201-43307-9, page 49
+ {
+# ifdef PATH_MAX
+ static std::size_t max = PATH_MAX;
+# else
+ static std::size_t max = 0;
+# endif
+ if (max == 0)
+ {
+ errno = 0;
+ long tmp = ::pathconf("/", _PC_NAME_MAX);
+ if (tmp < 0)
+ {
+ if (errno == 0)// indeterminate
+ max = 4096; // guess
+ else return error_code(errno, system_category());
+ }
+ else max = static_cast<std::size_t>(tmp + 1); // relative root
+ }
+ result = max;
+ return ok;
+ }
+
+ error_code dir_itr_first(void *& handle, void *& buffer,
+ const char* dir, string& target,
+ fs::file_status &, fs::file_status &)
+ {
+ if ((handle = ::opendir(dir))== 0)
+ return error_code(errno, system_category());
+ target = string("."); // string was static but caused trouble
+ // when iteration called from dtor, after
+ // static had already been destroyed
+ std::size_t path_size (0); // initialization quiets gcc warning (ticket #3509)
+ error_code ec = path_max(path_size);
+ if (ec)return ec;
+ dirent de;
+ buffer = std::malloc((sizeof(dirent) - sizeof(de.d_name))
+ + path_size + 1); // + 1 for "/0"
+ return ok;
+ }
+
+ // warning: the only dirent member updated is d_name
+ inline int readdir_r_simulator(DIR * dirp, struct dirent * entry,
+ struct dirent ** result)// *result set to 0 on end of directory
+ {
+# if !defined(__CYGWIN__)\
+ && defined(_POSIX_THREAD_SAFE_FUNCTIONS)\
+ && defined(_SC_THREAD_SAFE_FUNCTIONS)\
+ && (_POSIX_THREAD_SAFE_FUNCTIONS+0 >= 0)\
+ && !(defined(linux) || defined(__linux) || defined(__linux__))\
+ && !defined(__ANDROID__)\
+ && (!defined(__hpux) || defined(_REENTRANT)) \
+ && (!defined(_AIX) || defined(__THREAD_SAFE))
+
+ errno = 0;
+
+ if (::sysconf(_SC_THREAD_SAFE_FUNCTIONS)>= 0)
+ { return ::readdir_r(dirp, entry, result); }
+# endif
+
+ errno = 0;
+
+ struct dirent * p;
+ *result = 0;
+ if ((p = ::readdir(dirp))== 0)
+ return errno;
+ std::strcpy(entry->d_name, p->d_name);
+ *result = entry;
+ return 0;
+ }
+
+ error_code dir_itr_increment(void *& handle, void *& buffer,
+ string& target, fs::file_status & sf, fs::file_status & symlink_sf)
+ {
+ BOOST_ASSERT(buffer != 0);
+ dirent * entry(static_cast<dirent *>(buffer));
+ dirent * result;
+ int return_code;
+ if ((return_code = readdir_r_simulator(static_cast<DIR*>(handle), entry, &result))!= 0)
+ return error_code(errno, system_category());
+ if (result == 0)
+ return fs::detail::dir_itr_close(handle, buffer);
+ target = entry->d_name;
+# ifdef BOOST_FILESYSTEM_STATUS_CACHE
+ if (entry->d_type == DT_UNKNOWN) // filesystem does not supply d_type value
+ {
+ sf = symlink_sf = fs::file_status(fs::status_error);
+ }
+ else // filesystem supplies d_type value
+ {
+ if (entry->d_type == DT_DIR)
+ sf = symlink_sf = fs::file_status(fs::directory_file);
+ else if (entry->d_type == DT_REG)
+ sf = symlink_sf = fs::file_status(fs::regular_file);
+ else if (entry->d_type == DT_LNK)
+ {
+ sf = fs::file_status(fs::status_error);
+ symlink_sf = fs::file_status(fs::symlink_file);
+ }
+ else sf = symlink_sf = fs::file_status(fs::status_error);
+ }
+# else
+ sf = symlink_sf = fs::file_status(fs::status_error);
+# endif
+ return ok;
+ }
+
+# else // BOOST_WINDOWS_API
+
+ error_code dir_itr_first(void *& handle, const fs::path& dir,
+ wstring& target, fs::file_status & sf, fs::file_status & symlink_sf)
+ // Note: an empty root directory has no "." or ".." entries, so this
+ // causes a ERROR_FILE_NOT_FOUND error which we do not considered an
+ // error. It is treated as eof instead.
+ {
+ // use a form of search Sebastian Martel reports will work with Win98
+ wstring dirpath(dir.wstring());
+ dirpath += (dirpath.empty()
+ || (dirpath[dirpath.size()-1] != L'\\'
+ && dirpath[dirpath.size()-1] != L'/'
+ && dirpath[dirpath.size()-1] != L':'))? L"\\*" : L"*";
+
+ WIN32_FIND_DATAW data;
+ if ((handle = ::FindFirstFileW(dirpath.c_str(), &data))
+ == INVALID_HANDLE_VALUE)
+ {
+ handle = 0; // signal eof
+ return error_code( (::GetLastError() == ERROR_FILE_NOT_FOUND
+ // Windows Mobile returns ERROR_NO_MORE_FILES; see ticket #3551
+ || ::GetLastError() == ERROR_NO_MORE_FILES)
+ ? 0 : ::GetLastError(), system_category() );
+ }
+ target = data.cFileName;
+ if (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ // reparse points are complex, so don't try to handle them here; instead just mark
+ // them as status_error which causes directory_entry caching to call status()
+ // and symlink_status() which do handle reparse points fully
+ {
+ sf.type(fs::status_error);
+ symlink_sf.type(fs::status_error);
+ }
+ else
+ {
+ if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ sf.type(fs::directory_file);
+ symlink_sf.type(fs::directory_file);
+ }
+ else
+ {
+ sf.type(fs::regular_file);
+ symlink_sf.type(fs::regular_file);
+ }
+ sf.permissions(make_permissions(data.cFileName, data.dwFileAttributes));
+ symlink_sf.permissions(sf.permissions());
+ }
+ return error_code();
+ }
+
+ error_code dir_itr_increment(void *& handle, wstring& target,
+ fs::file_status & sf, fs::file_status & symlink_sf)
+ {
+ WIN32_FIND_DATAW data;
+ if (::FindNextFileW(handle, &data)== 0)// fails
+ {
+ int error = ::GetLastError();
+ fs::detail::dir_itr_close(handle);
+ return error_code(error == ERROR_NO_MORE_FILES ? 0 : error, system_category());
+ }
+ target = data.cFileName;
+ if (data.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
+ // reparse points are complex, so don't try to handle them here; instead just mark
+ // them as status_error which causes directory_entry caching to call status()
+ // and symlink_status() which do handle reparse points fully
+ {
+ sf.type(fs::status_error);
+ symlink_sf.type(fs::status_error);
+ }
+ else
+ {
+ if (data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ sf.type(fs::directory_file);
+ symlink_sf.type(fs::directory_file);
+ }
+ else
+ {
+ sf.type(fs::regular_file);
+ symlink_sf.type(fs::regular_file);
+ }
+ sf.permissions(make_permissions(data.cFileName, data.dwFileAttributes));
+ symlink_sf.permissions(sf.permissions());
+ }
+ return error_code();
+ }
+#endif
+
+ const error_code not_found_error_code (
+# ifdef BOOST_WINDOWS_API
+ ERROR_PATH_NOT_FOUND
+# else
+ ENOENT
+# endif
+ , system_category());
+
+} // unnamed namespace
+
+namespace boost
+{
+namespace filesystem
+{
+
+namespace detail
+{
+ // dir_itr_close is called both from the ~dir_itr_imp()destructor
+ // and dir_itr_increment()
+ BOOST_FILESYSTEM_DECL
+ system::error_code dir_itr_close( // never throws
+ void *& handle
+# if defined(BOOST_POSIX_API)
+ , void *& buffer
+# endif
+ )
+ {
+# ifdef BOOST_POSIX_API
+ std::free(buffer);
+ buffer = 0;
+ if (handle == 0)return ok;
+ DIR * h(static_cast<DIR*>(handle));
+ handle = 0;
+ return error_code(::closedir(h)== 0 ? 0 : errno, system_category());
+
+# else
+ if (handle != 0)
+ {
+ ::FindClose(handle);
+ handle = 0;
+ }
+ return ok;
+
+# endif
+ }
+
+ void directory_iterator_construct(directory_iterator& it,
+ const path& p, system::error_code* ec)
+ {
+ if (error(p.empty() ? not_found_error_code.value() : 0, p, ec,
+ "boost::filesystem::directory_iterator::construct"))
+ return;
+
+ path::string_type filename;
+ file_status file_stat, symlink_file_stat;
+ error_code result = dir_itr_first(it.m_imp->handle,
+# if defined(BOOST_POSIX_API)
+ it.m_imp->buffer,
+# endif
+ p.c_str(), filename, file_stat, symlink_file_stat);
+
+ if (result)
+ {
+ it.m_imp.reset();
+ error(result.value(), p,
+ ec, "boost::filesystem::directory_iterator::construct");
+ return;
+ }
+
+ if (it.m_imp->handle == 0)
+ it.m_imp.reset(); // eof, so make end iterator
+ else // not eof
+ {
+ it.m_imp->dir_entry.assign(p / filename, file_stat, symlink_file_stat);
+ if (filename[0] == dot // dot or dot-dot
+ && (filename.size()== 1
+ || (filename[1] == dot
+ && filename.size()== 2)))
+ { detail::directory_iterator_increment(it, ec); }
+ }
+ }
+
+ void directory_iterator_increment(directory_iterator& it,
+ system::error_code* ec)
+ {
+ BOOST_ASSERT_MSG(it.m_imp.get(), "attempt to increment end iterator");
+ BOOST_ASSERT_MSG(it.m_imp->handle != 0, "internal program error");
+
+ path::string_type filename;
+ file_status file_stat, symlink_file_stat;
+ system::error_code temp_ec;
+
+ for (;;)
+ {
+ temp_ec = dir_itr_increment(it.m_imp->handle,
+# if defined(BOOST_POSIX_API)
+ it.m_imp->buffer,
+# endif
+ filename, file_stat, symlink_file_stat);
+
+ if (temp_ec) // happens if filesystem is corrupt, such as on a damaged optical disc
+ {
+ path error_path(it.m_imp->dir_entry.path().parent_path()); // fix ticket #5900
+ it.m_imp.reset();
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW(
+ filesystem_error("boost::filesystem::directory_iterator::operator++",
+ error_path,
+ error_code(BOOST_ERRNO, system_category())));
+ ec->assign(BOOST_ERRNO, system_category());
+ return;
+ }
+ else if (ec != 0) ec->clear();
+
+ if (it.m_imp->handle == 0) // eof, make end
+ {
+ it.m_imp.reset();
+ return;
+ }
+
+ if (!(filename[0] == dot // !(dot or dot-dot)
+ && (filename.size()== 1
+ || (filename[1] == dot
+ && filename.size()== 2))))
+ {
+ it.m_imp->dir_entry.replace_filename(
+ filename, file_stat, symlink_file_stat);
+ return;
+ }
+ }
+ }
+} // namespace detail
+} // namespace filesystem
+} // namespace boost
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/path.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/path.cpp
index a4588654bad..a4588654bad 100644
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/path.cpp
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/path.cpp
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/path_traits.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/path_traits.cpp
index 07b92c0f12e..07b92c0f12e 100644
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/path_traits.cpp
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/path_traits.cpp
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/portability.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/portability.cpp
index b1a1352d9a9..b1a1352d9a9 100644
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/portability.cpp
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/portability.cpp
diff --git a/src/third_party/boost-1.69.0/libs/filesystem/src/unique_path.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/unique_path.cpp
new file mode 100644
index 00000000000..b097401f1d4
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/unique_path.cpp
@@ -0,0 +1,177 @@
+// filesystem unique_path.cpp --------------------------------------------------------//
+
+// Copyright Beman Dawes 2010
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// Library home page: http://www.boost.org/libs/filesystem
+
+//--------------------------------------------------------------------------------------//
+
+// define BOOST_FILESYSTEM_SOURCE so that <boost/filesystem/config.hpp> knows
+// the library is being built (possibly exporting rather than importing code)
+#define BOOST_FILESYSTEM_SOURCE
+
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#include <boost/filesystem/operations.hpp>
+#include <cassert>
+
+# ifdef BOOST_POSIX_API
+# include <fcntl.h>
+# ifdef BOOST_HAS_UNISTD_H
+# include <unistd.h>
+# endif
+# else // BOOST_WINDOWS_API
+# include <windows.h>
+# include <wincrypt.h>
+# ifdef _MSC_VER
+# pragma comment(lib, "Advapi32.lib")
+# endif
+# endif
+
+namespace {
+
+void fail(int err, boost::system::error_code* ec)
+{
+ if (ec == 0)
+ BOOST_FILESYSTEM_THROW( boost::system::system_error(err,
+ boost::system::system_category(),
+ "boost::filesystem::unique_path"));
+
+ ec->assign(err, boost::system::system_category());
+ return;
+}
+
+#ifdef BOOST_WINDOWS_API
+
+int acquire_crypt_handle(HCRYPTPROV& handle)
+{
+ if (::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
+ return 0;
+
+ int errval = ::GetLastError();
+ if (errval != NTE_BAD_KEYSET)
+ return errval;
+
+ if (::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_NEWKEYSET | CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
+ return 0;
+
+ errval = ::GetLastError();
+ // Another thread could have attempted to create the keyset at the same time.
+ if (errval != NTE_EXISTS)
+ return errval;
+
+ if (::CryptAcquireContextW(&handle, 0, 0, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT | CRYPT_SILENT))
+ return 0;
+
+ return ::GetLastError();
+}
+
+#endif
+
+void system_crypt_random(void* buf, std::size_t len, boost::system::error_code* ec)
+{
+# ifdef BOOST_POSIX_API
+
+ int file = open("/dev/urandom", O_RDONLY);
+ if (file == -1)
+ {
+ file = open("/dev/random", O_RDONLY);
+ if (file == -1)
+ {
+ fail(errno, ec);
+ return;
+ }
+ }
+
+ size_t bytes_read = 0;
+ while (bytes_read < len)
+ {
+ ssize_t n = read(file, buf, len - bytes_read);
+ if (n == -1)
+ {
+ close(file);
+ fail(errno, ec);
+ return;
+ }
+ bytes_read += n;
+ buf = static_cast<char*>(buf) + n;
+ }
+
+ close(file);
+
+# else // BOOST_WINDOWS_API
+
+ HCRYPTPROV handle;
+ int errval = acquire_crypt_handle(handle);
+
+ if (!errval)
+ {
+ BOOL gen_ok = ::CryptGenRandom(handle, static_cast<DWORD>(len), static_cast<unsigned char*>(buf));
+ if (!gen_ok)
+ errval = ::GetLastError();
+ ::CryptReleaseContext(handle, 0);
+ }
+
+ if (!errval) return;
+
+ fail(errval, ec);
+# endif
+}
+
+} // unnamed namespace
+
+namespace boost { namespace filesystem { namespace detail {
+
+BOOST_FILESYSTEM_DECL
+path unique_path(const path& model, system::error_code* ec)
+{
+ // This function used wstring for fear of misidentifying
+ // a part of a multibyte character as a percent sign.
+ // However, double byte encodings only have 80-FF as lead
+ // bytes and 40-7F as trailing bytes, whereas % is 25.
+ // So, use string on POSIX and avoid conversions.
+
+ path::string_type s( model.native() );
+
+#ifdef BOOST_WINDOWS_API
+ const wchar_t hex[] = L"0123456789abcdef";
+ const wchar_t percent = L'%';
+#else
+ const char hex[] = "0123456789abcdef";
+ const char percent = '%';
+#endif
+
+ char ran[] = "123456789abcdef"; // init to avoid clang static analyzer message
+ // see ticket #8954
+ assert(sizeof(ran) == 16);
+ const int max_nibbles = 2 * sizeof(ran); // 4-bits per nibble
+
+ int nibbles_used = max_nibbles;
+ for(path::string_type::size_type i=0; i < s.size(); ++i)
+ {
+ if (s[i] == percent) // digit request
+ {
+ if (nibbles_used == max_nibbles)
+ {
+ system_crypt_random(ran, sizeof(ran), ec);
+ if (ec != 0 && *ec)
+ return "";
+ nibbles_used = 0;
+ }
+ int c = ran[nibbles_used/2];
+ c >>= 4 * (nibbles_used++ & 1); // if odd, shift right 1 nibble
+ s[i] = hex[c & 0xf]; // convert to hex digit and replace
+ }
+ }
+
+ if (ec != 0) ec->clear();
+
+ return s;
+}
+
+}}}
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/utf8_codecvt_facet.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/utf8_codecvt_facet.cpp
index 8a5af1e07c4..8a5af1e07c4 100644
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/utf8_codecvt_facet.cpp
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/utf8_codecvt_facet.cpp
diff --git a/src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.cpp b/src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.cpp
new file mode 100644
index 00000000000..99059598363
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.cpp
@@ -0,0 +1,75 @@
+// filesystem windows_file_codecvt.cpp -----------------------------------------//
+
+// Copyright Beman Dawes 2009
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// Library home page: http://www.boost.org/libs/filesystem
+
+//--------------------------------------------------------------------------------------//
+
+// define BOOST_FILESYSTEM_SOURCE so that <boost/system/config.hpp> knows
+// the library is being built (possibly exporting rather than importing code)
+#define BOOST_FILESYSTEM_SOURCE
+
+#ifndef BOOST_SYSTEM_NO_DEPRECATED
+# define BOOST_SYSTEM_NO_DEPRECATED
+#endif
+
+#include <boost/filesystem/config.hpp>
+#include <cwchar> // for mbstate_t
+
+#ifdef BOOST_WINDOWS_API
+
+#include "windows_file_codecvt.hpp"
+
+// Versions of MinGW prior to GCC 4.6 requires this
+#ifndef WINVER
+# define WINVER 0x0500
+#endif
+
+#include <windows.h>
+
+ std::codecvt_base::result windows_file_codecvt::do_in(
+ std::mbstate_t &,
+ const char* from, const char* from_end, const char*& from_next,
+ wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const
+ {
+ UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
+
+ int count;
+ if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from,
+ static_cast<int>(from_end - from), to, static_cast<int>(to_end - to))) == 0)
+ {
+ return error; // conversion failed
+ }
+
+ from_next = from_end;
+ to_next = to + count;
+ *to_next = L'\0';
+ return ok;
+ }
+
+ std::codecvt_base::result windows_file_codecvt::do_out(
+ std::mbstate_t &,
+ const wchar_t* from, const wchar_t* from_end, const wchar_t* & from_next,
+ char* to, char* to_end, char* & to_next) const
+ {
+ UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
+
+ int count;
+ if ((count = ::WideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, from,
+ static_cast<int>(from_end - from), to, static_cast<int>(to_end - to), 0, 0)) == 0)
+ {
+ return error; // conversion failed
+ }
+
+ from_next = from_end;
+ to_next = to + count;
+ *to_next = '\0';
+ return ok;
+ }
+
+ # endif // BOOST_WINDOWS_API
+
diff --git a/src/third_party/boost-1.68.0/libs/filesystem/src/windows_file_codecvt.hpp b/src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.hpp
index 2bd797f247c..2bd797f247c 100644
--- a/src/third_party/boost-1.68.0/libs/filesystem/src/windows_file_codecvt.hpp
+++ b/src/third_party/boost-1.69.0/libs/filesystem/src/windows_file_codecvt.hpp
diff --git a/src/third_party/boost-1.69.0/libs/function/README.md b/src/third_party/boost-1.69.0/libs/function/README.md
new file mode 100644
index 00000000000..749d5ed8847
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/function/README.md
@@ -0,0 +1,18 @@
+# Boost.Function, a polymorphic function wrapper
+
+[Boost.Function](http://boost.org/libs/function), part of the
+[Boost C++ Libraries](http://boost.org), is the original implementation of the
+polymorphic function wrapper `boost::function`, which was eventually accepted
+into the C++11 standard as [`std::function`](https://en.cppreference.com/w/cpp/utility/functional/function).
+
+## Currently supported compilers
+
+* g++ 4.4 or later
+* clang++ 3.3 or later
+* Visual Studio 2005-2017
+
+Tested on [Travis](https://travis-ci.org/boostorg/function/) and [Appveyor](https://ci.appveyor.com/project/pdimov/function/).
+
+## License
+
+Distributed under the [Boost Software License, Version 1.0](http://boost.org/LICENSE_1_0.txt).
diff --git a/src/third_party/boost-1.69.0/libs/integer/README.md b/src/third_party/boost-1.69.0/libs/integer/README.md
new file mode 100644
index 00000000000..05c1270ea32
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/integer/README.md
@@ -0,0 +1,30 @@
+# Boost.Integer
+
+Boost.Integer, part of collection of the [Boost C++ Libraries](https://github.com/boostorg), provides
+integer type support, particularly helpful in generic programming. It provides the means to select
+an integer type based upon its properties, like the number of bits or the maximum supported value,
+as well as compile-time bit mask selection. There is a derivative of `std::numeric_limits` that provides
+integral constant expressions for `min` and `max`...
+Finally, it provides two compile-time algorithms: determining the highest power of two in a
+compile-time value; and computing min and max of constant expressions.
+
+### Directories
+
+* **doc** - QuickBook documentation sources
+* **include** - Interface headers of Boost.Integer
+* **test** - Boost.Integer unit tests
+
+### More information
+
+* [Documentation](https://boost.org/libs/integer)
+* [Report bugs](https://github.com/boostorg/integer/issues/new). Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
+* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
+
+### Build status
+
+Master: [![AppVeyor](https://ci.appveyor.com/api/projects/status/iugyf5rf51n99g3w?svg=true)](https://ci.appveyor.com/project/Lastique/integer/branch/master) [![Travis CI](https://travis-ci.org/boostorg/integer.svg?branch=master)](https://travis-ci.org/boostorg/integer)
+Develop: [![AppVeyor](https://ci.appveyor.com/api/projects/status/iugyf5rf51n99g3w/branch/develop?svg=true)](https://ci.appveyor.com/project/Lastique/integer/branch/develop) [![Travis CI](https://travis-ci.org/boostorg/integer.svg?branch=develop)](https://travis-ci.org/boostorg/integer)
+
+### License
+
+Distributed under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
diff --git a/src/third_party/boost-1.68.0/libs/intrusive/Jamfile b/src/third_party/boost-1.69.0/libs/intrusive/Jamfile
index e43cebe5c61..e43cebe5c61 100644
--- a/src/third_party/boost-1.68.0/libs/intrusive/Jamfile
+++ b/src/third_party/boost-1.69.0/libs/intrusive/Jamfile
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/Jamfile b/src/third_party/boost-1.69.0/libs/iostreams/Jamfile
new file mode 100644
index 00000000000..afe2fcf1c70
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/iostreams/Jamfile
@@ -0,0 +1,11 @@
+# Boost.Iostreams Library Jamfile
+#
+# Copyright (c) 2018 James E. King III
+#
+# Use, modification, and distribution are subject to the
+# Boost Software License, Version 1.0. (See accompanying file
+# LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+# please order by name to ease maintenance
+build-project example ;
+build-project test ;
diff --git a/src/third_party/boost-1.68.0/libs/function/LICENSE b/src/third_party/boost-1.69.0/libs/iostreams/LICENSE
index 36b7cd93cdf..36b7cd93cdf 100644
--- a/src/third_party/boost-1.68.0/libs/function/LICENSE
+++ b/src/third_party/boost-1.69.0/libs/iostreams/LICENSE
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/README.md b/src/third_party/boost-1.69.0/libs/iostreams/README.md
new file mode 100644
index 00000000000..5bdc70d40a6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/iostreams/README.md
@@ -0,0 +1,39 @@
+Iostreams, part of collection of the [Boost C++ Libraries](http://github.com/boostorg), provides:
+
+* Tools to make it easy to create standard C++ streams and stream buffers for accessing new Sources and Sinks.
+* A framework for defining filters and attaching them to standard streams and stream buffers.
+* A collection of ready-to-use Filters, Sources and Sinks.
+* Utilities to save and restore stream state.
+
+### License
+
+Distributed under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
+
+### Properties
+
+* C++03
+* Requires a Link Library
+
+### Build Status
+
+Branch | Travis | Appveyor | Coverity Scan | codecov.io | Deps | Docs | Tests |
+:-------------: | ------ | -------- | ------------- | ---------- | ---- | ---- | ----- |
+[`master`](https://github.com/boostorg/iostreams/tree/master) | [![Build Status](https://travis-ci.org/boostorg/iostreams.svg?branch=master)](https://travis-ci.org/boostorg/iostreams) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/iostreams?branch=master&svg=true)](https://ci.appveyor.com/project/eldiener/iostreams/branch/master) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/16463/badge.svg)](https://scan.coverity.com/projects/boostorg-iostreams) | [![codecov](https://codecov.io/gh/boostorg/iostreams/branch/master/graph/badge.svg)](https://codecov.io/gh/boostorg/iostreams/branch/master)| [![Deps](https://img.shields.io/badge/deps-master-brightgreen.svg)](https://pdimov.github.io/boostdep-report/master/iostreams.html) | [![Documentation](https://img.shields.io/badge/docs-master-brightgreen.svg)](http://www.boost.org/doc/libs/master/doc/html/iostreams.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-master-brightgreen.svg)](http://www.boost.org/development/tests/master/developer/iostreams.html)
+[`develop`](https://github.com/boostorg/iostreams/tree/develop) | [![Build Status](https://travis-ci.org/boostorg/iostreams.svg?branch=develop)](https://travis-ci.org/boostorg/iostreams) | [![Build status](https://ci.appveyor.com/api/projects/status/github/boostorg/iostreams?branch=develop&svg=true)](https://ci.appveyor.com/project/eldiener/iostreams/branch/develop) | [![Coverity Scan Build Status](https://scan.coverity.com/projects/16463/badge.svg)](https://scan.coverity.com/projects/boostorg-iostreams) | [![codecov](https://codecov.io/gh/boostorg/iostreams/branch/develop/graph/badge.svg)](https://codecov.io/gh/boostorg/iostreams/branch/develop) | [![Deps](https://img.shields.io/badge/deps-develop-brightgreen.svg)](https://pdimov.github.io/boostdep-report/develop/iostreams.html) | [![Documentation](https://img.shields.io/badge/docs-develop-brightgreen.svg)](http://www.boost.org/doc/libs/develop/doc/html/iostreams.html) | [![Enter the Matrix](https://img.shields.io/badge/matrix-develop-brightgreen.svg)](http://www.boost.org/development/tests/develop/developer/iostreams.html)
+
+### Directories
+
+| Name | Purpose |
+| ----------- | ------------------------------ |
+| `doc` | documentation |
+| `example` | examples |
+| `include` | headers |
+| `test` | unit tests |
+
+### More information
+
+* [Ask questions](http://stackoverflow.com/questions/ask?tags=c%2B%2B,boost,boost-iostreams)
+* [Report bugs](https://github.com/boostorg/iostreams/issues): Be sure to mention Boost version, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
+* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](http://www.boost.org/LICENSE_1_0.txt).
+* Discussions about the library are held on the [Boost developers mailing list](http://www.boost.org/community/groups.html#main). Be sure to read the [discussion policy](http://www.boost.org/community/policy.html) before posting and add the `[iostreams]` tag at the beginning of the subject line.
+
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/bzip2.cpp b/src/third_party/boost-1.69.0/libs/iostreams/src/bzip2.cpp
new file mode 100644
index 00000000000..195b57d8a90
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/iostreams/src/bzip2.cpp
@@ -0,0 +1,171 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// To configure Boost to work with libbz2, see the
+// installation instructions here:
+// http://boost.org/libs/iostreams/doc/index.html?path=7
+
+// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
+// knows that we are building the library (possibly exporting code), rather
+// than using it (possibly importing code).
+#define BOOST_IOSTREAMS_SOURCE
+
+#include <boost/throw_exception.hpp>
+#include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/filter/bzip2.hpp>
+#include "bzlib.h" // Julian Seward's "bzip.h" header.
+ // To configure Boost to work with libbz2, see the
+ // installation instructions here:
+ // http://boost.org/libs/iostreams/doc/index.html?path=7
+
+namespace boost { namespace iostreams {
+
+namespace bzip2 {
+
+ // Status codes
+
+const int ok = BZ_OK;
+const int run_ok = BZ_RUN_OK;
+const int flush_ok = BZ_FLUSH_OK;
+const int finish_ok = BZ_FINISH_OK;
+const int stream_end = BZ_STREAM_END;
+const int sequence_error = BZ_SEQUENCE_ERROR;
+const int param_error = BZ_PARAM_ERROR;
+const int mem_error = BZ_MEM_ERROR;
+const int data_error = BZ_DATA_ERROR;
+const int data_error_magic = BZ_DATA_ERROR_MAGIC;
+const int io_error = BZ_IO_ERROR;
+const int unexpected_eof = BZ_UNEXPECTED_EOF;
+const int outbuff_full = BZ_OUTBUFF_FULL;
+const int config_error = BZ_CONFIG_ERROR;
+
+ // Action codes
+
+const int finish = BZ_FINISH;
+const int run = BZ_RUN;
+
+} // End namespace bzip2.
+
+//------------------Implementation of bzip2_error-----------------------------//
+
+bzip2_error::bzip2_error(int error)
+ : BOOST_IOSTREAMS_FAILURE("bzip2 error"), error_(error)
+ { }
+
+void bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)
+{
+ switch (error) {
+ case BZ_OK:
+ case BZ_RUN_OK:
+ case BZ_FLUSH_OK:
+ case BZ_FINISH_OK:
+ case BZ_STREAM_END:
+ return;
+ case BZ_MEM_ERROR:
+ boost::throw_exception(std::bad_alloc());
+ default:
+ boost::throw_exception(bzip2_error(error));
+ }
+}
+
+//------------------Implementation of bzip2_base------------------------------//
+
+namespace detail {
+
+bzip2_base::bzip2_base(const bzip2_params& params)
+ : params_(params), stream_(new bz_stream), ready_(false)
+ { }
+
+bzip2_base::~bzip2_base() { delete static_cast<bz_stream*>(stream_); }
+
+void bzip2_base::before( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end )
+{
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+ s->next_in = const_cast<char*>(src_begin);
+ s->avail_in = static_cast<unsigned>(src_end - src_begin);
+ s->next_out = reinterpret_cast<char*>(dest_begin);
+ s->avail_out= static_cast<unsigned>(dest_end - dest_begin);
+}
+
+void bzip2_base::after(const char*& src_begin, char*& dest_begin)
+{
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+ src_begin = const_cast<char*>(s->next_in);
+ dest_begin = s->next_out;
+}
+
+int bzip2_base::check_end(const char* src_begin, const char* dest_begin)
+{
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+ if( src_begin == s->next_in &&
+ s->avail_in == 0 &&
+ dest_begin == s->next_out) {
+ return bzip2::unexpected_eof;
+ } else {
+ return bzip2::ok;
+ }
+}
+
+int bzip2_base::end(bool compress, std::nothrow_t)
+{
+ if (!ready_) return bzip2::ok;
+ ready_ = false;
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+ return compress ? BZ2_bzCompressEnd(s) : BZ2_bzDecompressEnd(s);
+}
+
+void bzip2_base::end(bool compress)
+{
+ bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ end(compress, std::nothrow)
+ );
+}
+
+int bzip2_base::compress(int action)
+{
+ return BZ2_bzCompress(static_cast<bz_stream*>(stream_), action);
+}
+
+int bzip2_base::decompress()
+{
+ return BZ2_bzDecompress(static_cast<bz_stream*>(stream_));
+}
+
+void bzip2_base::do_init
+ ( bool compress,
+ bzip2::alloc_func /* alloc */,
+ bzip2::free_func /* free */,
+ void* derived )
+{
+ bz_stream* s = static_cast<bz_stream*>(stream_);
+
+ // Current interface for customizing memory management
+ // is non-conforming and has been disabled:
+ // s->bzalloc = alloc;
+ // s->bzfree = free;
+ s->bzalloc = 0;
+ s->bzfree = 0;
+ s->opaque = derived;
+ bzip2_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ BZ2_bzCompressInit( s,
+ params_.block_size,
+ 0,
+ params_.work_factor ) :
+ BZ2_bzDecompressInit( s,
+ 0,
+ params_.small )
+ );
+ ready_ = true;
+}
+
+} // End namespace detail.
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.68.0/libs/iostreams/src/file_descriptor.cpp b/src/third_party/boost-1.69.0/libs/iostreams/src/file_descriptor.cpp
index 288e2c64013..288e2c64013 100644
--- a/src/third_party/boost-1.68.0/libs/iostreams/src/file_descriptor.cpp
+++ b/src/third_party/boost-1.69.0/libs/iostreams/src/file_descriptor.cpp
diff --git a/src/third_party/boost-1.68.0/libs/iostreams/src/gzip.cpp b/src/third_party/boost-1.69.0/libs/iostreams/src/gzip.cpp
index 94830e5b8cb..94830e5b8cb 100644
--- a/src/third_party/boost-1.68.0/libs/iostreams/src/gzip.cpp
+++ b/src/third_party/boost-1.69.0/libs/iostreams/src/gzip.cpp
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/lzma.cpp b/src/third_party/boost-1.69.0/libs/iostreams/src/lzma.cpp
new file mode 100644
index 00000000000..8d41cca8c08
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/iostreams/src/lzma.cpp
@@ -0,0 +1,147 @@
+// (C) Copyright Milan Svoboda 2008.
+// Originally developed under the fusecompress project.
+// Based on bzip2.cpp by:
+// (C) Copyright Jonathan Turkanis 2003.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
+// knows that we are building the library (possibly exporting code), rather
+// than using it (possibly importing code).
+#define BOOST_IOSTREAMS_SOURCE
+
+#include <lzma.h>
+
+#include <boost/throw_exception.hpp>
+#include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/filter/lzma.hpp>
+
+namespace boost { namespace iostreams {
+
+namespace lzma {
+
+ // Compression levels
+
+const uint32_t no_compression = 0;
+const uint32_t best_speed = 1;
+const uint32_t best_compression = 9;
+const uint32_t default_compression = 2;
+
+ // Status codes
+
+const int okay = LZMA_OK;
+const int stream_end = LZMA_STREAM_END;
+const int unsupported_check = LZMA_UNSUPPORTED_CHECK;
+const int mem_error = LZMA_MEM_ERROR;
+const int options_error = LZMA_OPTIONS_ERROR;
+const int data_error = LZMA_DATA_ERROR;
+const int buf_error = LZMA_BUF_ERROR;
+const int prog_error = LZMA_PROG_ERROR;
+
+ // Flush codes
+
+const int finish = LZMA_FINISH;
+const int full_flush = LZMA_FULL_FLUSH;
+const int sync_flush = LZMA_SYNC_FLUSH;
+const int run = LZMA_RUN;
+
+ // Code for current OS
+
+} // End namespace lzma.
+
+//------------------Implementation of lzma_error------------------------------//
+
+lzma_error::lzma_error(int error)
+ : BOOST_IOSTREAMS_FAILURE("lzma error"), error_(error)
+ { }
+
+void lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)
+{
+ switch (error) {
+ case LZMA_OK:
+ case LZMA_STREAM_END:
+ return;
+ case LZMA_MEM_ERROR:
+ boost::throw_exception(std::bad_alloc());
+ default:
+ boost::throw_exception(lzma_error(error));
+ }
+}
+
+//------------------Implementation of lzma_base-------------------------------//
+
+namespace detail {
+
+lzma_base::lzma_base()
+ : stream_(new lzma_stream), level(lzma::default_compression)
+ { }
+
+lzma_base::~lzma_base() { delete static_cast<lzma_stream*>(stream_); }
+
+void lzma_base::before( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end )
+{
+ lzma_stream* s = static_cast<lzma_stream*>(stream_);
+ s->next_in = reinterpret_cast<uint8_t*>(const_cast<char*>(src_begin));
+ s->avail_in = static_cast<size_t>(src_end - src_begin);
+ s->next_out = reinterpret_cast<uint8_t*>(dest_begin);
+ s->avail_out= static_cast<size_t>(dest_end - dest_begin);
+}
+
+void lzma_base::after(const char*& src_begin, char*& dest_begin, bool)
+{
+ lzma_stream* s = static_cast<lzma_stream*>(stream_);
+ src_begin = const_cast<const char*>(reinterpret_cast<const char*>(s->next_in));
+ dest_begin = reinterpret_cast<char*>(s->next_out);
+}
+
+int lzma_base::deflate(int action)
+{
+ return lzma_code(static_cast<lzma_stream*>(stream_), static_cast<lzma_action>(action));
+}
+
+int lzma_base::inflate(int action)
+{
+ return lzma_code(static_cast<lzma_stream*>(stream_), static_cast<lzma_action>(action));
+}
+
+void lzma_base::reset(bool compress, bool realloc)
+{
+ lzma_stream* s = static_cast<lzma_stream*>(stream_);
+ lzma_end(s);
+ if (realloc)
+ {
+ memset(s, 0, sizeof(*s));
+
+ lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ lzma_easy_encoder(s, level, LZMA_CHECK_CRC32) :
+ lzma_stream_decoder(s, 100 * 1024 * 1024, LZMA_CONCATENATED)
+ );
+ }
+}
+
+void lzma_base::do_init
+ ( const lzma_params& p, bool compress,
+ lzma::alloc_func, lzma::free_func,
+ void* )
+{
+ lzma_stream* s = static_cast<lzma_stream*>(stream_);
+
+ memset(s, 0, sizeof(*s));
+
+ level = p.level;
+ lzma_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ lzma_easy_encoder(s, p.level, LZMA_CHECK_CRC32) :
+ lzma_stream_decoder(s, 100 * 1024 * 1024, LZMA_CONCATENATED)
+ );
+}
+
+} // End namespace detail.
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/mapped_file.cpp b/src/third_party/boost-1.69.0/libs/iostreams/src/mapped_file.cpp
new file mode 100644
index 00000000000..918a5d4c620
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/iostreams/src/mapped_file.cpp
@@ -0,0 +1,499 @@
+// (C) Copyright Craig Henderson 2002 'boost/memmap.hpp' from sandbox
+// (C) Copyright Jonathan Turkanis 2004.
+// (C) Copyright Jonathan Graehl 2004.
+// (C) Copyright Jorge Lodos 2008.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
+// knows that we are building the library (possibly exporting code), rather
+// than using it (possibly importing code).
+#define BOOST_IOSTREAMS_SOURCE
+
+#include <cassert>
+#include <stdexcept>
+#include <boost/iostreams/detail/config/rtl.hpp>
+#include <boost/iostreams/detail/config/windows_posix.hpp>
+#include <boost/iostreams/detail/file_handle.hpp>
+#include <boost/iostreams/detail/system_failure.hpp>
+#include <boost/iostreams/device/mapped_file.hpp>
+#include <boost/throw_exception.hpp>
+#include <boost/numeric/conversion/cast.hpp>
+
+#ifdef BOOST_IOSTREAMS_WINDOWS
+# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
+# include <windows.h>
+#else
+# include <errno.h>
+# include <fcntl.h>
+# include <sys/mman.h> // mmap, munmap.
+# include <sys/stat.h>
+# include <sys/types.h> // struct stat.
+# include <unistd.h> // sysconf.
+#endif
+
+namespace boost { namespace iostreams {
+
+namespace detail {
+
+// Class containing the platform-sepecific implementation
+// Invariant: The members params_, data_, size_, handle_ (and mapped_handle_
+// on Windows) either
+// - all have default values (or INVALID_HANDLE_VALUE for
+// Windows handles), or
+// - all have values reflecting a successful mapping.
+// In the first case, error_ may be true, reflecting a recent unsuccessful
+// open or close attempt; in the second case, error_ is always false.
+class mapped_file_impl {
+public:
+ typedef mapped_file_source::size_type size_type;
+ typedef mapped_file_source::param_type param_type;
+ typedef mapped_file_source::mapmode mapmode;
+ BOOST_STATIC_CONSTANT(
+ size_type, max_length = mapped_file_source::max_length);
+ mapped_file_impl();
+ ~mapped_file_impl();
+ void open(param_type p);
+ bool is_open() const { return data_ != 0; }
+ void close();
+ bool error() const { return error_; }
+ mapmode flags() const { return params_.flags; }
+ std::size_t size() const { return static_cast<std::size_t>(size_); }
+ char* data() const { return data_; }
+ void resize(stream_offset new_size);
+ static int alignment();
+private:
+ void open_file(param_type p);
+ void try_map_file(param_type p);
+ void map_file(param_type& p);
+ bool unmap_file();
+ void clear(bool error);
+ void cleanup_and_throw(const char* msg);
+ param_type params_;
+ char* data_;
+ stream_offset size_;
+ file_handle handle_;
+#ifdef BOOST_IOSTREAMS_WINDOWS
+ file_handle mapped_handle_;
+#endif
+ bool error_;
+};
+
+mapped_file_impl::mapped_file_impl() { clear(false); }
+
+mapped_file_impl::~mapped_file_impl()
+{ try { close(); } catch (...) { } }
+
+void mapped_file_impl::open(param_type p)
+{
+ if (is_open())
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE("file already open"));
+ p.normalize();
+ open_file(p);
+ map_file(p); // May modify p.hint
+ params_ = p;
+}
+
+void mapped_file_impl::close()
+{
+ if (data_ == 0)
+ return;
+ bool error = false;
+ error = !unmap_file() || error;
+ error =
+ #ifdef BOOST_IOSTREAMS_WINDOWS
+ !::CloseHandle(handle_)
+ #else
+ ::close(handle_) != 0
+ #endif
+ || error;
+ clear(error);
+ if (error)
+ throw_system_failure("failed closing mapped file");
+}
+
+void mapped_file_impl::resize(stream_offset new_size)
+{
+ if (!is_open())
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE("file is closed"));
+ if (flags() & mapped_file::priv)
+ boost::throw_exception(
+ BOOST_IOSTREAMS_FAILURE("can't resize private mapped file")
+ );
+ if (!(flags() & mapped_file::readwrite))
+ boost::throw_exception(
+ BOOST_IOSTREAMS_FAILURE("can't resize readonly mapped file")
+ );
+ if (params_.offset >= new_size)
+ boost::throw_exception(
+ BOOST_IOSTREAMS_FAILURE("can't resize below mapped offset")
+ );
+ if (!unmap_file())
+ cleanup_and_throw("failed unmapping file");
+#ifdef BOOST_IOSTREAMS_WINDOWS
+ stream_offset offset = ::SetFilePointer(handle_, 0, NULL, FILE_CURRENT);
+ if (offset == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR)
+ cleanup_and_throw("failed querying file pointer");
+ LONG sizehigh = (new_size >> (sizeof(LONG) * 8));
+ LONG sizelow = (new_size & 0xffffffff);
+ DWORD result = ::SetFilePointer(handle_, sizelow, &sizehigh, FILE_BEGIN);
+ if ((result == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR)
+ || !::SetEndOfFile(handle_))
+ cleanup_and_throw("failed resizing mapped file");
+ sizehigh = (offset >> (sizeof(LONG) * 8));
+ sizelow = (offset & 0xffffffff);
+ ::SetFilePointer(handle_, sizelow, &sizehigh, FILE_BEGIN);
+#else
+ if (BOOST_IOSTREAMS_FD_TRUNCATE(handle_, new_size) == -1)
+ cleanup_and_throw("failed resizing mapped file");
+#endif
+ size_ = new_size;
+ param_type p(params_);
+ map_file(p); // May modify p.hint
+ params_ = p;
+}
+
+int mapped_file_impl::alignment()
+{
+#ifdef BOOST_IOSTREAMS_WINDOWS
+ SYSTEM_INFO info;
+ ::GetSystemInfo(&info);
+ return static_cast<int>(info.dwAllocationGranularity);
+#else
+ return static_cast<int>(sysconf(_SC_PAGESIZE));
+#endif
+}
+
+void mapped_file_impl::open_file(param_type p)
+{
+ bool readonly = p.flags != mapped_file::readwrite;
+#ifdef BOOST_IOSTREAMS_WINDOWS
+
+ // Open file
+ DWORD dwDesiredAccess =
+ readonly ?
+ GENERIC_READ :
+ (GENERIC_READ | GENERIC_WRITE);
+ DWORD dwCreationDisposition = (p.new_file_size != 0 && !readonly) ?
+ CREATE_ALWAYS :
+ OPEN_EXISTING;
+ DWORD dwFlagsandAttributes =
+ readonly ?
+ FILE_ATTRIBUTE_READONLY :
+ FILE_ATTRIBUTE_TEMPORARY;
+ handle_ = p.path.is_wide() ?
+ ::CreateFileW(
+ p.path.c_wstr(),
+ dwDesiredAccess,
+ FILE_SHARE_READ,
+ NULL,
+ dwCreationDisposition,
+ dwFlagsandAttributes,
+ NULL ) :
+ ::CreateFileA(
+ p.path.c_str(),
+ dwDesiredAccess,
+ FILE_SHARE_READ,
+ NULL,
+ dwCreationDisposition,
+ dwFlagsandAttributes,
+ NULL );
+ if (handle_ == INVALID_HANDLE_VALUE)
+ cleanup_and_throw("failed opening file");
+
+ // Set file size
+ if (p.new_file_size != 0 && !readonly) {
+ LONG sizehigh = (p.new_file_size >> (sizeof(LONG) * 8));
+ LONG sizelow = (p.new_file_size & 0xffffffff);
+ DWORD result = ::SetFilePointer(handle_, sizelow, &sizehigh, FILE_BEGIN);
+ if ((result == INVALID_SET_FILE_POINTER && ::GetLastError() != NO_ERROR)
+ || !::SetEndOfFile(handle_))
+ cleanup_and_throw("failed setting file size");
+ }
+
+ // Determine file size. Dynamically locate GetFileSizeEx for compatibility
+ // with old Platform SDK (thanks to Pavel Vozenilik).
+ typedef BOOL (WINAPI *func)(HANDLE, PLARGE_INTEGER);
+ HMODULE hmod = ::GetModuleHandleA("kernel32.dll");
+ func get_size =
+ reinterpret_cast<func>(::GetProcAddress(hmod, "GetFileSizeEx"));
+ if (get_size) {
+ LARGE_INTEGER info;
+ if (get_size(handle_, &info)) {
+ boost::intmax_t size =
+ ( (static_cast<boost::intmax_t>(info.HighPart) << 32) |
+ info.LowPart );
+ size_ =
+ static_cast<std::size_t>(
+ p.length != max_length ?
+ std::min<boost::intmax_t>(p.length, size) :
+ size
+ );
+ } else {
+ cleanup_and_throw("failed querying file size");
+ return;
+ }
+ } else {
+ DWORD hi;
+ DWORD low;
+ if ( (low = ::GetFileSize(handle_, &hi))
+ !=
+ INVALID_FILE_SIZE )
+ {
+ boost::intmax_t size =
+ (static_cast<boost::intmax_t>(hi) << 32) | low;
+ size_ =
+ static_cast<std::size_t>(
+ p.length != max_length ?
+ std::min<boost::intmax_t>(p.length, size) :
+ size
+ );
+ } else {
+ cleanup_and_throw("failed querying file size");
+ return;
+ }
+ }
+#else // #ifdef BOOST_IOSTREAMS_WINDOWS
+
+ // Open file
+ int flags = (readonly ? O_RDONLY : O_RDWR);
+ if (p.new_file_size != 0 && !readonly)
+ flags |= (O_CREAT | O_TRUNC);
+ #ifdef _LARGEFILE64_SOURCE
+ flags |= O_LARGEFILE;
+ #endif
+ errno = 0;
+ if (p.path.is_wide()) { errno = EINVAL; cleanup_and_throw("wide path not supported here"); } // happens on CYGWIN
+ handle_ = ::open(p.path.c_str(), flags, S_IRWXU);
+ if (errno != 0)
+ cleanup_and_throw("failed opening file");
+
+ //--------------Set file size---------------------------------------------//
+
+ if (p.new_file_size != 0 && !readonly)
+ if (BOOST_IOSTREAMS_FD_TRUNCATE(handle_, p.new_file_size) == -1)
+ cleanup_and_throw("failed setting file size");
+
+ //--------------Determine file size---------------------------------------//
+
+ bool success = true;
+ if (p.length != max_length) {
+ size_ = p.length;
+ } else {
+ struct BOOST_IOSTREAMS_FD_STAT info;
+ success = ::BOOST_IOSTREAMS_FD_FSTAT(handle_, &info) != -1;
+ size_ = info.st_size;
+ }
+ if (!success)
+ cleanup_and_throw("failed querying file size");
+#endif // #ifdef BOOST_IOSTREAMS_WINDOWS
+}
+
+void mapped_file_impl::try_map_file(param_type p)
+{
+ bool priv = p.flags == mapped_file::priv;
+ bool readonly = p.flags == mapped_file::readonly;
+#ifdef BOOST_IOSTREAMS_WINDOWS
+
+ // Create mapping
+ DWORD protect = priv ?
+ PAGE_WRITECOPY :
+ readonly ?
+ PAGE_READONLY :
+ PAGE_READWRITE;
+ mapped_handle_ =
+ ::CreateFileMappingA(
+ handle_,
+ NULL,
+ protect,
+ 0,
+ 0,
+ NULL );
+ if (mapped_handle_ == NULL)
+ cleanup_and_throw("failed create mapping");
+
+ // Access data
+ DWORD access = priv ?
+ FILE_MAP_COPY :
+ readonly ?
+ FILE_MAP_READ :
+ FILE_MAP_WRITE;
+ void* data =
+ ::MapViewOfFileEx(
+ mapped_handle_,
+ access,
+ (DWORD) (p.offset >> 32),
+ (DWORD) (p.offset & 0xffffffff),
+ (SIZE_T) (numeric_cast<size_type>(size_) != max_length ? size_ : 0),
+ (LPVOID) p.hint );
+ if (!data)
+ cleanup_and_throw("failed mapping view");
+#else
+ void* data =
+ ::BOOST_IOSTREAMS_FD_MMAP(
+ const_cast<char*>(p.hint),
+ size_,
+ readonly ? PROT_READ : (PROT_READ | PROT_WRITE),
+ priv ? MAP_PRIVATE : MAP_SHARED,
+ handle_,
+ p.offset );
+ if (data == MAP_FAILED)
+ cleanup_and_throw("failed mapping file");
+#endif
+ data_ = static_cast<char*>(data);
+}
+
+void mapped_file_impl::map_file(param_type& p)
+{
+ try {
+ try_map_file(p);
+ } catch (const std::exception&) {
+ if (p.hint) {
+ p.hint = 0;
+ try_map_file(p);
+ } else {
+ throw;
+ }
+ }
+}
+
+bool mapped_file_impl::unmap_file()
+{
+#ifdef BOOST_IOSTREAMS_WINDOWS
+ bool error = false;
+ error = !::UnmapViewOfFile(data_) || error;
+ error = !::CloseHandle(mapped_handle_) || error;
+ mapped_handle_ = NULL;
+ return !error;
+#else
+ return ::munmap(data_, size_) == 0;
+#endif
+}
+
+void mapped_file_impl::clear(bool error)
+{
+ params_ = param_type();
+ data_ = 0;
+ size_ = 0;
+#ifdef BOOST_IOSTREAMS_WINDOWS
+ handle_ = INVALID_HANDLE_VALUE;
+ mapped_handle_ = NULL;
+#else
+ handle_ = 0;
+#endif
+ error_ = error;
+}
+
+// Called when an error is encountered during the execution of open_file or
+// map_file
+void mapped_file_impl::cleanup_and_throw(const char* msg)
+{
+#ifdef BOOST_IOSTREAMS_WINDOWS
+ DWORD error = GetLastError();
+ if (mapped_handle_ != NULL)
+ ::CloseHandle(mapped_handle_);
+ if (handle_ != INVALID_HANDLE_VALUE)
+ ::CloseHandle(handle_);
+ SetLastError(error);
+#else
+ int error = errno;
+ if (handle_ != 0)
+ ::close(handle_);
+ errno = error;
+#endif
+ clear(true);
+ boost::iostreams::detail::throw_system_failure(msg);
+}
+
+//------------------Implementation of mapped_file_params_base-----------------//
+
+void mapped_file_params_base::normalize()
+{
+ if (mode && flags)
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE(
+ "at most one of 'mode' and 'flags' may be specified"
+ ));
+ if (flags) {
+ switch (flags) {
+ case mapped_file::readonly:
+ case mapped_file::readwrite:
+ case mapped_file::priv:
+ break;
+ default:
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid flags"));
+ }
+ } else {
+ flags = (mode & BOOST_IOS::out) ?
+ mapped_file::readwrite :
+ mapped_file::readonly;
+ mode = BOOST_IOS::openmode();
+ }
+ if (offset < 0)
+ boost::throw_exception(BOOST_IOSTREAMS_FAILURE("invalid offset"));
+ if (new_file_size < 0)
+ boost::throw_exception(
+ BOOST_IOSTREAMS_FAILURE("invalid new file size")
+ );
+}
+
+} // End namespace detail.
+
+//------------------Implementation of mapped_file_source----------------------//
+
+mapped_file_source::mapped_file_source()
+ : pimpl_(new impl_type)
+ { }
+
+mapped_file_source::mapped_file_source(const mapped_file_source& other)
+ : pimpl_(other.pimpl_)
+ { }
+
+bool mapped_file_source::is_open() const
+{ return pimpl_->is_open(); }
+
+void mapped_file_source::close() { pimpl_->close(); }
+
+// safe_bool is explicitly qualified below to please msvc 7.1
+mapped_file_source::operator mapped_file_source::safe_bool() const
+{ return pimpl_->error() ? &safe_bool_helper::x : 0; }
+
+bool mapped_file_source::operator!() const
+{ return pimpl_->error(); }
+
+mapped_file_source::mapmode mapped_file_source::flags() const
+{ return pimpl_->flags(); }
+
+mapped_file_source::size_type mapped_file_source::size() const
+{ return pimpl_->size(); }
+
+const char* mapped_file_source::data() const { return pimpl_->data(); }
+
+const char* mapped_file_source::begin() const { return data(); }
+
+const char* mapped_file_source::end() const { return data() + size(); }
+int mapped_file_source::alignment()
+{ return detail::mapped_file_impl::alignment(); }
+
+void mapped_file_source::init() { pimpl_.reset(new impl_type); }
+
+void mapped_file_source::open_impl(const param_type& p)
+{ pimpl_->open(p); }
+
+//------------------Implementation of mapped_file-----------------------------//
+
+mapped_file::mapped_file(const mapped_file& other)
+ : delegate_(other.delegate_)
+ { }
+
+void mapped_file::resize(stream_offset new_size)
+{ delegate_.pimpl_->resize(new_size); }
+
+//------------------Implementation of mapped_file_sink------------------------//
+
+mapped_file_sink::mapped_file_sink(const mapped_file_sink& other)
+ : mapped_file(static_cast<const mapped_file&>(other))
+ { }
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/zlib.cpp b/src/third_party/boost-1.69.0/libs/iostreams/src/zlib.cpp
new file mode 100644
index 00000000000..66380689bc6
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/iostreams/src/zlib.cpp
@@ -0,0 +1,188 @@
+// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com)
+// (C) Copyright 2003-2007 Jonathan Turkanis
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// To configure Boost to work with zlib, see the
+// installation instructions here:
+// http://boost.org/libs/iostreams/doc/index.html?path=7
+
+// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
+// knows that we are building the library (possibly exporting code), rather
+// than using it (possibly importing code).
+#define BOOST_IOSTREAMS_SOURCE
+
+#include <boost/throw_exception.hpp>
+#include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/filter/zlib.hpp>
+#include "zlib.h" // Jean-loup Gailly's and Mark Adler's "zlib.h" header.
+ // To configure Boost to work with zlib, see the
+ // installation instructions here:
+ // http://boost.org/libs/iostreams/doc/index.html?path=7
+
+namespace boost { namespace iostreams {
+
+namespace zlib {
+
+ // Compression levels
+
+const int no_compression = Z_NO_COMPRESSION;
+const int best_speed = Z_BEST_SPEED;
+const int best_compression = Z_BEST_COMPRESSION;
+const int default_compression = Z_DEFAULT_COMPRESSION;
+
+ // Compression methods
+
+const int deflated = Z_DEFLATED;
+
+ // Compression strategies
+
+const int default_strategy = Z_DEFAULT_STRATEGY;
+const int filtered = Z_FILTERED;
+const int huffman_only = Z_HUFFMAN_ONLY;
+
+ // Status codes
+
+const int okay = Z_OK;
+const int stream_end = Z_STREAM_END;
+const int stream_error = Z_STREAM_ERROR;
+const int version_error = Z_VERSION_ERROR;
+const int data_error = Z_DATA_ERROR;
+const int mem_error = Z_MEM_ERROR;
+const int buf_error = Z_BUF_ERROR;
+
+ // Flush codes
+
+const int finish = Z_FINISH;
+const int no_flush = Z_NO_FLUSH;
+const int sync_flush = Z_SYNC_FLUSH;
+
+ // Code for current OS
+
+//const int os_code = OS_CODE;
+
+} // End namespace zlib.
+
+//------------------Implementation of zlib_error------------------------------//
+
+zlib_error::zlib_error(int error)
+ : BOOST_IOSTREAMS_FAILURE("zlib error"), error_(error)
+ { }
+
+void zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(int error)
+{
+ switch (error) {
+ case Z_OK:
+ case Z_STREAM_END:
+ //case Z_BUF_ERROR:
+ return;
+ case Z_MEM_ERROR:
+ boost::throw_exception(std::bad_alloc());
+ default:
+ boost::throw_exception(zlib_error(error));
+ ;
+ }
+}
+
+//------------------Implementation of zlib_base-------------------------------//
+
+namespace detail {
+
+zlib_base::zlib_base()
+ : stream_(new z_stream), calculate_crc_(false), crc_(0), crc_imp_(0),
+ total_in_(0), total_out_(0)
+ { }
+
+zlib_base::~zlib_base() { delete static_cast<z_stream*>(stream_); }
+
+void zlib_base::before( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end )
+{
+ z_stream* s = static_cast<z_stream*>(stream_);
+ s->next_in = reinterpret_cast<zlib::byte*>(const_cast<char*>(src_begin));
+ s->avail_in = static_cast<zlib::uint>(src_end - src_begin);
+ s->next_out = reinterpret_cast<zlib::byte*>(dest_begin);
+ s->avail_out= static_cast<zlib::uint>(dest_end - dest_begin);
+}
+
+void zlib_base::after(const char*& src_begin, char*& dest_begin, bool compress)
+{
+ z_stream* s = static_cast<z_stream*>(stream_);
+ const char* next_in = reinterpret_cast<const char*>(s->next_in);
+ char* next_out = reinterpret_cast<char*>(s->next_out);
+ if (calculate_crc_) {
+ const zlib::byte* buf = compress ?
+ reinterpret_cast<const zlib::byte*>(src_begin) :
+ reinterpret_cast<const zlib::byte*>(
+ const_cast<const char*>(dest_begin)
+ );
+ zlib::uint length = compress ?
+ static_cast<zlib::uint>(next_in - src_begin) :
+ static_cast<zlib::uint>(next_out - dest_begin);
+ crc_ = crc_imp_ = crc32(crc_imp_, buf, length);
+ }
+ total_in_ = s->total_in;
+ total_out_ = s->total_out;
+ src_begin = next_in;
+ dest_begin = next_out;
+}
+
+int zlib_base::xdeflate(int flush)
+{
+ return ::deflate(static_cast<z_stream*>(stream_), flush);
+}
+
+int zlib_base::xinflate(int flush)
+{
+ return ::inflate(static_cast<z_stream*>(stream_), flush);
+}
+
+void zlib_base::reset(bool compress, bool realloc)
+{
+ z_stream* s = static_cast<z_stream*>(stream_);
+ // Undiagnosed bug:
+ // deflateReset(), etc., return Z_DATA_ERROR
+ //zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ realloc ?
+ (compress ? deflateReset(s) : inflateReset(s)) :
+ (compress ? deflateEnd(s) : inflateEnd(s))
+ ;
+ //);
+ crc_imp_ = 0;
+}
+
+void zlib_base::do_init
+ ( const zlib_params& p, bool compress,
+ zlib::xalloc_func /* alloc */, zlib::xfree_func /* free*/,
+ void* derived )
+{
+ calculate_crc_ = p.calculate_crc;
+ z_stream* s = static_cast<z_stream*>(stream_);
+
+ // Current interface for customizing memory management
+ // is non-conforming and has been disabled:
+ // s->zalloc = alloc;
+ // s->zfree = free;
+ s->zalloc = 0;
+ s->zfree = 0;
+ s->opaque = derived;
+ int window_bits = p.noheader? -p.window_bits : p.window_bits;
+ zlib_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ deflateInit2( s,
+ p.level,
+ p.method,
+ window_bits,
+ p.mem_level,
+ p.strategy ) :
+ inflateInit2(s, window_bits)
+ );
+}
+
+} // End namespace detail.
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.69.0/libs/iostreams/src/zstd.cpp b/src/third_party/boost-1.69.0/libs/iostreams/src/zstd.cpp
new file mode 100644
index 00000000000..20cc009804f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/iostreams/src/zstd.cpp
@@ -0,0 +1,166 @@
+// (C) Copyright Reimar Döffinger 2018.
+// Based on zstd.cpp by:
+// (C) Copyright Milan Svoboda 2008.
+// (C) Copyright Jonathan Turkanis 2003.
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.)
+
+// See http://www.boost.org/libs/iostreams for documentation.
+
+// Define BOOST_IOSTREAMS_SOURCE so that <boost/iostreams/detail/config.hpp>
+// knows that we are building the library (possibly exporting code), rather
+// than using it (possibly importing code).
+#define BOOST_IOSTREAMS_SOURCE
+
+#include <zstd.h>
+
+#include <boost/throw_exception.hpp>
+#include <boost/iostreams/detail/config/dyn_link.hpp>
+#include <boost/iostreams/filter/zstd.hpp>
+
+namespace boost { namespace iostreams {
+
+namespace zstd {
+ // Compression levels
+
+const uint32_t best_speed = 1;
+const uint32_t best_compression = 19;
+const uint32_t default_compression = 3;
+
+ // Status codes
+
+const int okay = 0;
+const int stream_end = 1;
+
+ // Flush codes
+
+const int finish = 0;
+const int flush = 1;
+const int run = 2;
+} // End namespace zstd.
+
+//------------------Implementation of zstd_error------------------------------//
+
+zstd_error::zstd_error(size_t error)
+ : BOOST_IOSTREAMS_FAILURE(ZSTD_getErrorName(error)), error_(error)
+ { }
+
+void zstd_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(size_t error)
+{
+ if (ZSTD_isError(error))
+ boost::throw_exception(zstd_error(error));
+}
+
+//------------------Implementation of zstd_base-------------------------------//
+
+namespace detail {
+
+zstd_base::zstd_base()
+ : cstream_(ZSTD_createCStream()), dstream_(ZSTD_createDStream()), in_(new ZSTD_inBuffer), out_(new ZSTD_outBuffer), eof_(0)
+ { }
+
+zstd_base::~zstd_base()
+{
+ ZSTD_freeCStream(static_cast<ZSTD_CStream *>(cstream_));
+ ZSTD_freeDStream(static_cast<ZSTD_DStream *>(dstream_));
+ delete static_cast<ZSTD_inBuffer*>(in_);
+ delete static_cast<ZSTD_outBuffer*>(out_);
+}
+
+void zstd_base::before( const char*& src_begin, const char* src_end,
+ char*& dest_begin, char* dest_end )
+{
+ ZSTD_inBuffer *in = static_cast<ZSTD_inBuffer *>(in_);
+ ZSTD_outBuffer *out = static_cast<ZSTD_outBuffer *>(out_);
+ in->src = src_begin;
+ in->size = static_cast<size_t>(src_end - src_begin);
+ in->pos = 0;
+ out->dst = dest_begin;
+ out->size = static_cast<size_t>(dest_end - dest_begin);
+ out->pos = 0;
+}
+
+void zstd_base::after(const char*& src_begin, char*& dest_begin, bool)
+{
+ ZSTD_inBuffer *in = static_cast<ZSTD_inBuffer *>(in_);
+ ZSTD_outBuffer *out = static_cast<ZSTD_outBuffer *>(out_);
+ src_begin = reinterpret_cast<const char*>(in->src) + in->pos;
+ dest_begin = reinterpret_cast<char*>(out->dst) + out->pos;
+}
+
+int zstd_base::deflate(int action)
+{
+ ZSTD_CStream *s = static_cast<ZSTD_CStream *>(cstream_);
+ ZSTD_inBuffer *in = static_cast<ZSTD_inBuffer *>(in_);
+ ZSTD_outBuffer *out = static_cast<ZSTD_outBuffer *>(out_);
+ // Ignore spurious extra calls.
+ // Note size > 0 will trigger an error in this case.
+ if (eof_ && in->size == 0) return zstd::stream_end;
+ size_t result = ZSTD_compressStream(s, out, in);
+ zstd_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
+ if (action != zstd::run)
+ {
+ result = action == zstd::finish ? ZSTD_endStream(s, out) : ZSTD_flushStream(s, out);
+ zstd_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
+ eof_ = action == zstd::finish && result == 0;
+ return result == 0 ? zstd::stream_end : zstd::okay;
+ }
+ return zstd::okay;
+}
+
+int zstd_base::inflate(int action)
+{
+ ZSTD_DStream *s = static_cast<ZSTD_DStream *>(dstream_);
+ ZSTD_inBuffer *in = static_cast<ZSTD_inBuffer *>(in_);
+ ZSTD_outBuffer *out = static_cast<ZSTD_outBuffer *>(out_);
+ // need loop since iostream code cannot handle short reads
+ do {
+ size_t result = ZSTD_decompressStream(s, out, in);
+ zstd_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(result);
+ } while (in->pos < in->size && out->pos < out->size);
+ return action == zstd::finish && in->size == 0 && out->pos == 0 ? zstd::stream_end : zstd::okay;
+}
+
+void zstd_base::reset(bool compress, bool realloc)
+{
+ ZSTD_inBuffer *in = static_cast<ZSTD_inBuffer *>(in_);
+ ZSTD_outBuffer *out = static_cast<ZSTD_outBuffer *>(out_);
+ if (realloc)
+ {
+ memset(in, 0, sizeof(*in));
+ memset(out, 0, sizeof(*out));
+ eof_ = 0;
+
+ zstd_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ ZSTD_initCStream(static_cast<ZSTD_CStream *>(cstream_), level) :
+ ZSTD_initDStream(static_cast<ZSTD_DStream *>(dstream_))
+ );
+ }
+}
+
+void zstd_base::do_init
+ ( const zstd_params& p, bool compress,
+ zstd::alloc_func, zstd::free_func,
+ void* )
+{
+ ZSTD_inBuffer *in = static_cast<ZSTD_inBuffer *>(in_);
+ ZSTD_outBuffer *out = static_cast<ZSTD_outBuffer *>(out_);
+
+ memset(in, 0, sizeof(*in));
+ memset(out, 0, sizeof(*out));
+ eof_ = 0;
+
+ level = p.level;
+ zstd_error::check BOOST_PREVENT_MACRO_SUBSTITUTION(
+ compress ?
+ ZSTD_initCStream(static_cast<ZSTD_CStream *>(cstream_), level) :
+ ZSTD_initDStream(static_cast<ZSTD_DStream *>(dstream_))
+ );
+}
+
+} // End namespace detail.
+
+//----------------------------------------------------------------------------//
+
+} } // End namespaces iostreams, boost.
diff --git a/src/third_party/boost-1.68.0/libs/optional/README.md b/src/third_party/boost-1.69.0/libs/optional/README.md
index 4f73388d1ca..4f73388d1ca 100644
--- a/src/third_party/boost-1.68.0/libs/optional/README.md
+++ b/src/third_party/boost-1.69.0/libs/optional/README.md
diff --git a/src/third_party/boost-1.68.0/libs/program_options/Jamfile b/src/third_party/boost-1.69.0/libs/program_options/Jamfile
index f0de2e0bc8d..f0de2e0bc8d 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/Jamfile
+++ b/src/third_party/boost-1.69.0/libs/program_options/Jamfile
diff --git a/src/third_party/boost-1.68.0/libs/program_options/README.md b/src/third_party/boost-1.69.0/libs/program_options/README.md
index b2bd595ed85..b2bd595ed85 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/README.md
+++ b/src/third_party/boost-1.69.0/libs/program_options/README.md
diff --git a/src/third_party/boost-1.68.0/libs/program_options/ci/build.sh b/src/third_party/boost-1.69.0/libs/program_options/ci/build.sh
index 49dd24aece7..49dd24aece7 100755
--- a/src/third_party/boost-1.68.0/libs/program_options/ci/build.sh
+++ b/src/third_party/boost-1.69.0/libs/program_options/ci/build.sh
diff --git a/src/third_party/boost-1.68.0/libs/program_options/ci/codecov.sh b/src/third_party/boost-1.69.0/libs/program_options/ci/codecov.sh
index 2f7ea10f628..2f7ea10f628 100755
--- a/src/third_party/boost-1.68.0/libs/program_options/ci/codecov.sh
+++ b/src/third_party/boost-1.69.0/libs/program_options/ci/codecov.sh
diff --git a/src/third_party/boost-1.68.0/libs/program_options/ci/coverity.sh b/src/third_party/boost-1.69.0/libs/program_options/ci/coverity.sh
index 0de08a4ce4e..0de08a4ce4e 100755
--- a/src/third_party/boost-1.68.0/libs/program_options/ci/coverity.sh
+++ b/src/third_party/boost-1.69.0/libs/program_options/ci/coverity.sh
diff --git a/src/third_party/boost-1.68.0/libs/program_options/ci/cppcheck.sh b/src/third_party/boost-1.69.0/libs/program_options/ci/cppcheck.sh
index 7734ffcc190..7734ffcc190 100755
--- a/src/third_party/boost-1.68.0/libs/program_options/ci/cppcheck.sh
+++ b/src/third_party/boost-1.69.0/libs/program_options/ci/cppcheck.sh
diff --git a/src/third_party/boost-1.68.0/libs/program_options/ci/mingw.bat b/src/third_party/boost-1.69.0/libs/program_options/ci/mingw.bat
index bc189fdb7cd..bc189fdb7cd 100755
--- a/src/third_party/boost-1.68.0/libs/program_options/ci/mingw.bat
+++ b/src/third_party/boost-1.69.0/libs/program_options/ci/mingw.bat
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/cmdline.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/cmdline.cpp
index c2cf1da11f3..c2cf1da11f3 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/cmdline.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/cmdline.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/config_file.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/config_file.cpp
index f2a57b4b829..f2a57b4b829 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/config_file.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/config_file.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/convert.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/convert.cpp
index 9be759e2603..9be759e2603 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/convert.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/convert.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/options_description.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/options_description.cpp
index dc0eae87447..dc0eae87447 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/options_description.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/options_description.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/parsers.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/parsers.cpp
index 3e435eea3fe..3e435eea3fe 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/parsers.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/parsers.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/positional_options.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/positional_options.cpp
index 72dc0d6b0dd..72dc0d6b0dd 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/positional_options.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/positional_options.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/split.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/split.cpp
index 96da068b824..96da068b824 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/split.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/split.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/utf8_codecvt_facet.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/utf8_codecvt_facet.cpp
index 2e4c532c356..2e4c532c356 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/utf8_codecvt_facet.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/utf8_codecvt_facet.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/value_semantic.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/value_semantic.cpp
index a7366d43865..a7366d43865 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/value_semantic.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/value_semantic.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/variables_map.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/variables_map.cpp
index bc85f7e34b6..bc85f7e34b6 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/variables_map.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/variables_map.cpp
diff --git a/src/third_party/boost-1.68.0/libs/program_options/src/winmain.cpp b/src/third_party/boost-1.69.0/libs/program_options/src/winmain.cpp
index 6220043f6c8..6220043f6c8 100644
--- a/src/third_party/boost-1.68.0/libs/program_options/src/winmain.cpp
+++ b/src/third_party/boost-1.69.0/libs/program_options/src/winmain.cpp
diff --git a/src/third_party/boost-1.68.0/libs/random/src/random_device.cpp b/src/third_party/boost-1.69.0/libs/random/src/random_device.cpp
index 8ec38631072..8ec38631072 100644
--- a/src/third_party/boost-1.68.0/libs/random/src/random_device.cpp
+++ b/src/third_party/boost-1.69.0/libs/random/src/random_device.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/c_regex_traits.cpp b/src/third_party/boost-1.69.0/libs/regex/src/c_regex_traits.cpp
index a0b52ee4e93..a0b52ee4e93 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/c_regex_traits.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/c_regex_traits.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/cpp_regex_traits.cpp b/src/third_party/boost-1.69.0/libs/regex/src/cpp_regex_traits.cpp
index 05bbc50d725..05bbc50d725 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/cpp_regex_traits.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/cpp_regex_traits.cpp
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/cregex.cpp b/src/third_party/boost-1.69.0/libs/regex/src/cregex.cpp
new file mode 100644
index 00000000000..a1ae3b087cd
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/regex/src/cregex.cpp
@@ -0,0 +1,660 @@
+/*
+ *
+ * Copyright (c) 1998-2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE: cregex.cpp
+ * VERSION: see <boost/version.hpp>
+ * DESCRIPTION: Implements high level class boost::RexEx
+ */
+
+
+#define BOOST_REGEX_SOURCE
+
+#include <boost/regex.hpp>
+#include <boost/cregex.hpp>
+#if !defined(BOOST_NO_STD_STRING)
+#include <map>
+#include <list>
+#include <boost/regex/v4/fileiter.hpp>
+typedef boost::match_flag_type match_flag_type;
+#include <cstdio>
+
+#ifdef BOOST_MSVC
+#pragma warning(disable:4309)
+#endif
+#ifdef BOOST_INTEL
+#pragma warning(disable:981 383)
+#endif
+
+namespace boost{
+
+#ifdef __BORLANDC__
+#if __BORLANDC__ < 0x530
+//
+// we need to instantiate the vector classes we use
+// since declaring a reference to type doesn't seem to
+// do the job...
+std::vector<std::size_t> inst1;
+std::vector<std::string> inst2;
+#endif
+#endif
+
+namespace{
+
+template <class iterator>
+std::string to_string(iterator i, iterator j)
+{
+ std::string s;
+ while(i != j)
+ {
+ s.append(1, *i);
+ ++i;
+ }
+ return s;
+}
+
+inline std::string to_string(const char* i, const char* j)
+{
+ return std::string(i, j);
+}
+
+}
+namespace BOOST_REGEX_DETAIL_NS{
+
+class RegExData
+{
+public:
+ enum type
+ {
+ type_pc,
+ type_pf,
+ type_copy
+ };
+ regex e;
+ cmatch m;
+#ifndef BOOST_REGEX_NO_FILEITER
+ match_results<mapfile::iterator> fm;
+#endif
+ type t;
+ const char* pbase;
+#ifndef BOOST_REGEX_NO_FILEITER
+ mapfile::iterator fbase;
+#endif
+ std::map<int, std::string, std::less<int> > strings;
+ std::map<int, std::ptrdiff_t, std::less<int> > positions;
+ void update();
+ void clean();
+ RegExData() : e(), m(),
+#ifndef BOOST_REGEX_NO_FILEITER
+ fm(),
+#endif
+ t(type_copy), pbase(0),
+#ifndef BOOST_REGEX_NO_FILEITER
+ fbase(),
+#endif
+ strings(), positions() {}
+};
+
+void RegExData::update()
+{
+ strings.erase(strings.begin(), strings.end());
+ positions.erase(positions.begin(), positions.end());
+ if(t == type_pc)
+ {
+ for(unsigned int i = 0; i < m.size(); ++i)
+ {
+ if(m[i].matched) strings[i] = std::string(m[i].first, m[i].second);
+ positions[i] = m[i].matched ? m[i].first - pbase : -1;
+ }
+ }
+#ifndef BOOST_REGEX_NO_FILEITER
+ else
+ {
+ for(unsigned int i = 0; i < fm.size(); ++i)
+ {
+ if(fm[i].matched) strings[i] = to_string(fm[i].first, fm[i].second);
+ positions[i] = fm[i].matched ? fm[i].first - fbase : -1;
+ }
+ }
+#endif
+ t = type_copy;
+}
+
+void RegExData::clean()
+{
+#ifndef BOOST_REGEX_NO_FILEITER
+ fbase = mapfile::iterator();
+ fm = match_results<mapfile::iterator>();
+#endif
+}
+
+} // namespace
+
+RegEx::RegEx()
+{
+ pdata = new BOOST_REGEX_DETAIL_NS::RegExData();
+}
+
+RegEx::RegEx(const RegEx& o)
+{
+ pdata = new BOOST_REGEX_DETAIL_NS::RegExData(*(o.pdata));
+}
+
+RegEx::~RegEx()
+{
+ delete pdata;
+}
+
+RegEx::RegEx(const char* c, bool icase)
+{
+ pdata = new BOOST_REGEX_DETAIL_NS::RegExData();
+ SetExpression(c, icase);
+}
+
+RegEx::RegEx(const std::string& s, bool icase)
+{
+ pdata = new BOOST_REGEX_DETAIL_NS::RegExData();
+ SetExpression(s.c_str(), icase);
+}
+
+RegEx& RegEx::operator=(const RegEx& o)
+{
+ *pdata = *(o.pdata);
+ return *this;
+}
+
+RegEx& RegEx::operator=(const char* p)
+{
+ SetExpression(p, false);
+ return *this;
+}
+
+unsigned int RegEx::SetExpression(const char* p, bool icase)
+{
+ boost::uint_fast32_t f = icase ? regex::normal | regex::icase : regex::normal;
+ return pdata->e.set_expression(p, f);
+}
+
+unsigned int RegEx::error_code()const
+{
+ return pdata->e.error_code();
+}
+
+
+std::string RegEx::Expression()const
+{
+ return pdata->e.expression();
+}
+
+//
+// now matching operators:
+//
+bool RegEx::Match(const char* p, match_flag_type flags)
+{
+ pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
+ pdata->pbase = p;
+ const char* end = p;
+ while(*end)++end;
+
+ if(regex_match(p, end, pdata->m, pdata->e, flags))
+ {
+ pdata->update();
+ return true;
+ }
+ return false;
+}
+
+bool RegEx::Search(const char* p, match_flag_type flags)
+{
+ pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
+ pdata->pbase = p;
+ const char* end = p;
+ while(*end)++end;
+
+ if(regex_search(p, end, pdata->m, pdata->e, flags))
+ {
+ pdata->update();
+ return true;
+ }
+ return false;
+}
+namespace BOOST_REGEX_DETAIL_NS{
+struct pred1
+{
+ GrepCallback cb;
+ RegEx* pe;
+ pred1(GrepCallback c, RegEx* i) : cb(c), pe(i) {}
+ bool operator()(const cmatch& m)
+ {
+ pe->pdata->m = m;
+ return cb(*pe);
+ }
+};
+}
+unsigned int RegEx::Grep(GrepCallback cb, const char* p, match_flag_type flags)
+{
+ pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
+ pdata->pbase = p;
+ const char* end = p;
+ while(*end)++end;
+
+ unsigned int result = regex_grep(BOOST_REGEX_DETAIL_NS::pred1(cb, this), p, end, pdata->e, flags);
+ if(result)
+ pdata->update();
+ return result;
+}
+namespace BOOST_REGEX_DETAIL_NS{
+struct pred2
+{
+ std::vector<std::string>& v;
+ RegEx* pe;
+ pred2(std::vector<std::string>& o, RegEx* e) : v(o), pe(e) {}
+ bool operator()(const cmatch& m)
+ {
+ pe->pdata->m = m;
+ v.push_back(std::string(m[0].first, m[0].second));
+ return true;
+ }
+private:
+ pred2& operator=(const pred2&);
+};
+}
+
+unsigned int RegEx::Grep(std::vector<std::string>& v, const char* p, match_flag_type flags)
+{
+ pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
+ pdata->pbase = p;
+ const char* end = p;
+ while(*end)++end;
+
+ unsigned int result = regex_grep(BOOST_REGEX_DETAIL_NS::pred2(v, this), p, end, pdata->e, flags);
+ if(result)
+ pdata->update();
+ return result;
+}
+namespace BOOST_REGEX_DETAIL_NS{
+struct pred3
+{
+ std::vector<std::size_t>& v;
+ const char* base;
+ RegEx* pe;
+ pred3(std::vector<std::size_t>& o, const char* pb, RegEx* p) : v(o), base(pb), pe(p) {}
+ bool operator()(const cmatch& m)
+ {
+ pe->pdata->m = m;
+ v.push_back(static_cast<std::size_t>(m[0].first - base));
+ return true;
+ }
+private:
+ pred3& operator=(const pred3&);
+};
+}
+unsigned int RegEx::Grep(std::vector<std::size_t>& v, const char* p, match_flag_type flags)
+{
+ pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pc;
+ pdata->pbase = p;
+ const char* end = p;
+ while(*end)++end;
+
+ unsigned int result = regex_grep(BOOST_REGEX_DETAIL_NS::pred3(v, p, this), p, end, pdata->e, flags);
+ if(result)
+ pdata->update();
+ return result;
+}
+#ifndef BOOST_REGEX_NO_FILEITER
+namespace BOOST_REGEX_DETAIL_NS{
+struct pred4
+{
+ GrepFileCallback cb;
+ RegEx* pe;
+ const char* file;
+ bool ok;
+ pred4(GrepFileCallback c, RegEx* i, const char* f) : cb(c), pe(i), file(f), ok(true) {}
+ bool operator()(const match_results<mapfile::iterator>& m)
+ {
+ pe->pdata->t = RegExData::type_pf;
+ pe->pdata->fm = m;
+ pe->pdata->update();
+ ok = cb(file, *pe);
+ return ok;
+ }
+};
+}
+namespace{
+void BuildFileList(std::list<std::string>* pl, const char* files, bool recurse)
+{
+ file_iterator start(files);
+ file_iterator end;
+ if(recurse)
+ {
+ // go through sub directories:
+ char buf[MAX_PATH];
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(buf, MAX_PATH, start.root()));
+ if(*buf == 0)
+ {
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(buf, MAX_PATH, "."));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(buf, MAX_PATH, directory_iterator::separator()));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(buf, MAX_PATH, "*"));
+ }
+ else
+ {
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(buf, MAX_PATH, directory_iterator::separator()));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(buf, MAX_PATH, "*"));
+ }
+ directory_iterator dstart(buf);
+ directory_iterator dend;
+
+ // now get the file mask bit of "files":
+ const char* ptr = files;
+ while(*ptr) ++ptr;
+ while((ptr != files) && (*ptr != *directory_iterator::separator()) && (*ptr != '/'))--ptr;
+ if(ptr != files) ++ptr;
+
+ while(dstart != dend)
+ {
+ // Verify that sprintf will not overflow:
+ if(std::strlen(dstart.path()) + std::strlen(directory_iterator::separator()) + std::strlen(ptr) >= MAX_PATH)
+ {
+ // Oops overflow, skip this item:
+ ++dstart;
+ continue;
+ }
+#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400) && !defined(_WIN32_WCE) && !defined(UNDER_CE)
+ int r = (::sprintf_s)(buf, sizeof(buf), "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
+#else
+ int r = (std::sprintf)(buf, "%s%s%s", dstart.path(), directory_iterator::separator(), ptr);
+#endif
+ if(r < 0)
+ {
+ // sprintf failed, skip this item:
+ ++dstart;
+ continue;
+ }
+ BuildFileList(pl, buf, recurse);
+ ++dstart;
+ }
+ }
+ while(start != end)
+ {
+ pl->push_back(*start);
+ ++start;
+ }
+}
+}
+
+unsigned int RegEx::GrepFiles(GrepFileCallback cb, const char* files, bool recurse, match_flag_type flags)
+{
+ unsigned int result = 0;
+ std::list<std::string> file_list;
+ BuildFileList(&file_list, files, recurse);
+ std::list<std::string>::iterator start, end;
+ start = file_list.begin();
+ end = file_list.end();
+
+ while(start != end)
+ {
+ mapfile map((*start).c_str());
+ pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pf;
+ pdata->fbase = map.begin();
+ BOOST_REGEX_DETAIL_NS::pred4 pred(cb, this, (*start).c_str());
+ int r = regex_grep(pred, map.begin(), map.end(), pdata->e, flags);
+ result += r;
+ ++start;
+ pdata->clean();
+ if(pred.ok == false)
+ return result;
+ }
+
+ return result;
+}
+
+
+unsigned int RegEx::FindFiles(FindFilesCallback cb, const char* files, bool recurse, match_flag_type flags)
+{
+ unsigned int result = 0;
+ std::list<std::string> file_list;
+ BuildFileList(&file_list, files, recurse);
+ std::list<std::string>::iterator start, end;
+ start = file_list.begin();
+ end = file_list.end();
+
+ while(start != end)
+ {
+ mapfile map((*start).c_str());
+ pdata->t = BOOST_REGEX_DETAIL_NS::RegExData::type_pf;
+ pdata->fbase = map.begin();
+
+ if(regex_search(map.begin(), map.end(), pdata->fm, pdata->e, flags))
+ {
+ ++result;
+ if(false == cb((*start).c_str()))
+ return result;
+ }
+ //pdata->update();
+ ++start;
+ //pdata->clean();
+ }
+
+ return result;
+}
+#endif
+
+#ifdef BOOST_REGEX_V3
+#define regex_replace regex_merge
+#endif
+
+std::string RegEx::Merge(const std::string& in, const std::string& fmt,
+ bool copy, match_flag_type flags)
+{
+ std::string result;
+ BOOST_REGEX_DETAIL_NS::string_out_iterator<std::string> i(result);
+ if(!copy) flags |= format_no_copy;
+ regex_replace(i, in.begin(), in.end(), pdata->e, fmt.c_str(), flags);
+ return result;
+}
+
+std::string RegEx::Merge(const char* in, const char* fmt,
+ bool copy, match_flag_type flags)
+{
+ std::string result;
+ if(!copy) flags |= format_no_copy;
+ BOOST_REGEX_DETAIL_NS::string_out_iterator<std::string> i(result);
+ regex_replace(i, in, in + std::strlen(in), pdata->e, fmt, flags);
+ return result;
+}
+
+std::size_t RegEx::Split(std::vector<std::string>& v,
+ std::string& s,
+ match_flag_type flags,
+ unsigned max_count)
+{
+ return regex_split(std::back_inserter(v), s, pdata->e, flags, max_count);
+}
+
+
+
+//
+// now operators for returning what matched in more detail:
+//
+std::size_t RegEx::Position(int i)const
+{
+ switch(pdata->t)
+ {
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_pc:
+ return pdata->m[i].matched ? pdata->m[i].first - pdata->pbase : RegEx::npos;
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_pf:
+#ifndef BOOST_REGEX_NO_FILEITER
+ return pdata->fm[i].matched ? pdata->fm[i].first - pdata->fbase : RegEx::npos;
+#endif
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_copy:
+ {
+ std::map<int, std::ptrdiff_t, std::less<int> >::iterator pos = pdata->positions.find(i);
+ if(pos == pdata->positions.end())
+ return RegEx::npos;
+ return (*pos).second;
+ }
+ }
+ return RegEx::npos;
+}
+
+std::size_t RegEx::Marks()const
+{
+ return pdata->e.mark_count();
+}
+
+
+std::size_t RegEx::Length(int i)const
+{
+ switch(pdata->t)
+ {
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_pc:
+ return pdata->m[i].matched ? pdata->m[i].second - pdata->m[i].first : RegEx::npos;
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_pf:
+#ifndef BOOST_REGEX_NO_FILEITER
+ return pdata->fm[i].matched ? pdata->fm[i].second - pdata->fm[i].first : RegEx::npos;
+#endif
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_copy:
+ {
+ std::map<int, std::string, std::less<int> >::iterator pos = pdata->strings.find(i);
+ if(pos == pdata->strings.end())
+ return RegEx::npos;
+ return (*pos).second.size();
+ }
+ }
+ return RegEx::npos;
+}
+
+bool RegEx::Matched(int i)const
+{
+ switch(pdata->t)
+ {
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_pc:
+ return pdata->m[i].matched;
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_pf:
+#ifndef BOOST_REGEX_NO_FILEITER
+ return pdata->fm[i].matched;
+#endif
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_copy:
+ {
+ std::map<int, std::string, std::less<int> >::iterator pos = pdata->strings.find(i);
+ if(pos == pdata->strings.end())
+ return false;
+ return true;
+ }
+ }
+ return false;
+}
+
+
+std::string RegEx::What(int i)const
+{
+ std::string result;
+ switch(pdata->t)
+ {
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_pc:
+ if(pdata->m[i].matched)
+ result.assign(pdata->m[i].first, pdata->m[i].second);
+ break;
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_pf:
+ if(pdata->m[i].matched)
+ result.assign(to_string(pdata->m[i].first, pdata->m[i].second));
+ break;
+ case BOOST_REGEX_DETAIL_NS::RegExData::type_copy:
+ {
+ std::map<int, std::string, std::less<int> >::iterator pos = pdata->strings.find(i);
+ if(pos != pdata->strings.end())
+ result = (*pos).second;
+ break;
+ }
+ }
+ return result;
+}
+
+const std::size_t RegEx::npos = ~static_cast<std::size_t>(0);
+
+} // namespace boost
+
+#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x550) && (__BORLANDC__ <= 0x551) && !defined(_RWSTD_COMPILE_INSTANTIATE)
+//
+// this is an ugly hack to work around an ugly problem:
+// by default this file will produce unresolved externals during
+// linking unless _RWSTD_COMPILE_INSTANTIATE is defined (Borland bug).
+// However if _RWSTD_COMPILE_INSTANTIATE is defined then we get separate
+// copies of basic_string's static data in the RTL and this DLL, this messes
+// with basic_string's memory management and results in run-time crashes,
+// Oh sweet joy of Catch 22....
+//
+namespace std{
+template<> template<>
+basic_string<char>& BOOST_REGEX_DECL
+basic_string<char>::replace<const char*>(char* f1, char* f2, const char* i1, const char* i2)
+{
+ unsigned insert_pos = f1 - begin();
+ unsigned remove_len = f2 - f1;
+ unsigned insert_len = i2 - i1;
+ unsigned org_size = size();
+ if(insert_len > remove_len)
+ {
+ append(insert_len-remove_len, ' ');
+ std::copy_backward(begin() + insert_pos + remove_len, begin() + org_size, end());
+ std::copy(i1, i2, begin() + insert_pos);
+ }
+ else
+ {
+ std::copy(begin() + insert_pos + remove_len, begin() + org_size, begin() + insert_pos + insert_len);
+ std::copy(i1, i2, begin() + insert_pos);
+ erase(size() + insert_len - remove_len);
+ }
+ return *this;
+}
+template<> template<>
+basic_string<wchar_t>& BOOST_REGEX_DECL
+basic_string<wchar_t>::replace<const wchar_t*>(wchar_t* f1, wchar_t* f2, const wchar_t* i1, const wchar_t* i2)
+{
+ unsigned insert_pos = f1 - begin();
+ unsigned remove_len = f2 - f1;
+ unsigned insert_len = i2 - i1;
+ unsigned org_size = size();
+ if(insert_len > remove_len)
+ {
+ append(insert_len-remove_len, ' ');
+ std::copy_backward(begin() + insert_pos + remove_len, begin() + org_size, end());
+ std::copy(i1, i2, begin() + insert_pos);
+ }
+ else
+ {
+ std::copy(begin() + insert_pos + remove_len, begin() + org_size, begin() + insert_pos + insert_len);
+ std::copy(i1, i2, begin() + insert_pos);
+ erase(size() + insert_len - remove_len);
+ }
+ return *this;
+}
+} // namespace std
+#endif
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/fileiter.cpp b/src/third_party/boost-1.69.0/libs/regex/src/fileiter.cpp
new file mode 100644
index 00000000000..c80459b8669
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/regex/src/fileiter.cpp
@@ -0,0 +1,928 @@
+/*
+ *
+ * Copyright (c) 1998-2002
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE: fileiter.cpp
+ * VERSION: see <boost/version.hpp>
+ * DESCRIPTION: Implements file io primitives + directory searching for class boost::RegEx.
+ */
+
+
+#define BOOST_REGEX_SOURCE
+
+#include <boost/config.hpp>
+#include <climits>
+#include <stdexcept>
+#include <string>
+#include <boost/throw_exception.hpp>
+#include <boost/regex/v4/fileiter.hpp>
+#include <boost/regex/v4/regex_workaround.hpp>
+#include <boost/regex/pattern_except.hpp>
+
+#include <cstdio>
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std{
+ using ::sprintf;
+ using ::fseek;
+ using ::fread;
+ using ::ftell;
+ using ::fopen;
+ using ::fclose;
+ using ::FILE;
+ using ::strcpy;
+ using ::strcpy;
+ using ::strcat;
+ using ::strcmp;
+ using ::strlen;
+}
+#endif
+
+
+#ifndef BOOST_REGEX_NO_FILEITER
+
+#if defined(__CYGWIN__) || defined(__CYGWIN32__)
+#include <sys/cygwin.h>
+#endif
+
+#ifdef BOOST_MSVC
+# pragma warning(disable: 4800)
+#endif
+
+namespace boost{
+ namespace BOOST_REGEX_DETAIL_NS{
+// start with the operating system specific stuff:
+
+#if (defined(__BORLANDC__) || defined(BOOST_REGEX_FI_WIN32_DIR) || defined(BOOST_MSVC)) && !defined(BOOST_RE_NO_WIN32)
+
+// platform is DOS or Windows
+// directories are separated with '\\'
+// and names are insensitive of case
+
+BOOST_REGEX_DECL const char* _fi_sep = "\\";
+const char* _fi_sep_alt = "/";
+#define BOOST_REGEX_FI_TRANSLATE(c) std::tolower(c)
+
+#else
+
+// platform is not DOS or Windows
+// directories are separated with '/'
+// and names are sensitive of case
+
+BOOST_REGEX_DECL const char* _fi_sep = "/";
+const char* _fi_sep_alt = _fi_sep;
+#define BOOST_REGEX_FI_TRANSLATE(c) c
+
+#endif
+
+#ifdef BOOST_REGEX_FI_WIN32_MAP
+
+void mapfile::open(const char* file)
+{
+#if defined(BOOST_NO_ANSI_APIS)
+ int filename_size = strlen(file);
+ LPWSTR wide_file = (LPWSTR)_alloca( (filename_size + 1) * sizeof(WCHAR) );
+ if(::MultiByteToWideChar(CP_ACP, 0, file, filename_size, wide_file, filename_size + 1) == 0)
+ hfile = INVALID_HANDLE_VALUE;
+ else
+ hfile = CreateFileW(wide_file, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+#elif defined(__CYGWIN__)||defined(__CYGWIN32__)
+ char win32file[ MAX_PATH ];
+ cygwin_conv_to_win32_path( file, win32file );
+ hfile = CreateFileA(win32file, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+#else
+ hfile = CreateFileA(file, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
+#endif
+ if(hfile != INVALID_HANDLE_VALUE)
+ {
+ hmap = CreateFileMapping(hfile, 0, PAGE_READONLY, 0, 0, 0);
+ if((hmap == INVALID_HANDLE_VALUE) || (hmap == NULL))
+ {
+ CloseHandle(hfile);
+ hmap = 0;
+ hfile = 0;
+ std::runtime_error err("Unable to create file mapping.");
+ boost::BOOST_REGEX_DETAIL_NS::raise_runtime_error(err);
+ }
+ _first = static_cast<const char*>(MapViewOfFile(hmap, FILE_MAP_READ, 0, 0, 0));
+ if(_first == 0)
+ {
+ CloseHandle(hmap);
+ CloseHandle(hfile);
+ hmap = 0;
+ hfile = 0;
+ std::runtime_error err("Unable to create file mapping.");
+ }
+ _last = _first + GetFileSize(hfile, 0);
+ }
+ else
+ {
+ hfile = 0;
+#ifndef BOOST_NO_EXCEPTIONS
+ throw std::runtime_error("Unable to open file.");
+#else
+ BOOST_REGEX_NOEH_ASSERT(hfile != INVALID_HANDLE_VALUE);
+#endif
+ }
+}
+
+void mapfile::close()
+{
+ if(hfile != INVALID_HANDLE_VALUE)
+ {
+ UnmapViewOfFile((void*)_first);
+ CloseHandle(hmap);
+ CloseHandle(hfile);
+ hmap = hfile = 0;
+ _first = _last = 0;
+ }
+}
+
+#elif !defined(BOOST_RE_NO_STL)
+
+mapfile_iterator& mapfile_iterator::operator = (const mapfile_iterator& i)
+{
+ if(file && node)
+ file->unlock(node);
+ file = i.file;
+ node = i.node;
+ offset = i.offset;
+ if(file)
+ file->lock(node);
+ return *this;
+}
+
+mapfile_iterator& mapfile_iterator::operator++ ()
+{
+ if((++offset == mapfile::buf_size) && file)
+ {
+ ++node;
+ offset = 0;
+ file->lock(node);
+ file->unlock(node-1);
+ }
+ return *this;
+}
+
+mapfile_iterator mapfile_iterator::operator++ (int)
+{
+ mapfile_iterator temp(*this);
+ if((++offset == mapfile::buf_size) && file)
+ {
+ ++node;
+ offset = 0;
+ file->lock(node);
+ file->unlock(node-1);
+ }
+ return temp;
+}
+
+mapfile_iterator& mapfile_iterator::operator-- ()
+{
+ if((offset == 0) && file)
+ {
+ --node;
+ offset = mapfile::buf_size - 1;
+ file->lock(node);
+ file->unlock(node + 1);
+ }
+ else
+ --offset;
+ return *this;
+}
+
+mapfile_iterator mapfile_iterator::operator-- (int)
+{
+ mapfile_iterator temp(*this);
+ if((offset == 0) && file)
+ {
+ --node;
+ offset = mapfile::buf_size - 1;
+ file->lock(node);
+ file->unlock(node + 1);
+ }
+ else
+ --offset;
+ return temp;
+}
+
+mapfile_iterator operator + (const mapfile_iterator& i, long off)
+{
+ mapfile_iterator temp(i);
+ temp += off;
+ return temp;
+}
+
+mapfile_iterator operator - (const mapfile_iterator& i, long off)
+{
+ mapfile_iterator temp(i);
+ temp -= off;
+ return temp;
+}
+
+mapfile::iterator mapfile::begin()const
+{
+ return mapfile_iterator(this, 0);
+}
+
+mapfile::iterator mapfile::end()const
+{
+ return mapfile_iterator(this, _size);
+}
+
+void mapfile::lock(pointer* node)const
+{
+ BOOST_ASSERT(node >= _first);
+ BOOST_ASSERT(node <= _last);
+ if(node < _last)
+ {
+ if(*node == 0)
+ {
+ if(condemed.empty())
+ {
+ *node = new char[sizeof(int) + buf_size];
+ *(reinterpret_cast<int*>(*node)) = 1;
+ }
+ else
+ {
+ pointer* p = condemed.front();
+ condemed.pop_front();
+ *node = *p;
+ *p = 0;
+ *(reinterpret_cast<int*>(*node)) = 1;
+ }
+
+ std::size_t read_size = 0;
+ int read_pos = std::fseek(hfile, (node - _first) * buf_size, SEEK_SET);
+
+ if(0 == read_pos && node == _last - 1)
+ read_size = std::fread(*node + sizeof(int), _size % buf_size, 1, hfile);
+ else
+ read_size = std::fread(*node + sizeof(int), buf_size, 1, hfile);
+ if((read_size == 0) || (std::ferror(hfile)))
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+ unlock(node);
+ throw std::runtime_error("Unable to read file.");
+#else
+ BOOST_REGEX_NOEH_ASSERT((0 == std::ferror(hfile)) && (read_size != 0));
+#endif
+ }
+ }
+ else
+ {
+ if(*reinterpret_cast<int*>(*node) == 0)
+ {
+ *reinterpret_cast<int*>(*node) = 1;
+ condemed.remove(node);
+ }
+ else
+ ++(*reinterpret_cast<int*>(*node));
+ }
+ }
+}
+
+void mapfile::unlock(pointer* node)const
+{
+ BOOST_ASSERT(node >= _first);
+ BOOST_ASSERT(node <= _last);
+ if(node < _last)
+ {
+ if(--(*reinterpret_cast<int*>(*node)) == 0)
+ {
+ condemed.push_back(node);
+ }
+ }
+}
+
+long int get_file_length(std::FILE* hfile)
+{
+ long int result;
+ std::fseek(hfile, 0, SEEK_END);
+ result = std::ftell(hfile);
+ std::fseek(hfile, 0, SEEK_SET);
+ return result;
+}
+
+
+void mapfile::open(const char* file)
+{
+ hfile = std::fopen(file, "rb");
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ if(hfile != 0)
+ {
+ _size = get_file_length(hfile);
+ long cnodes = (_size + buf_size - 1) / buf_size;
+
+ // check that number of nodes is not too high:
+ if(cnodes > (long)((INT_MAX) / sizeof(pointer*)))
+ {
+ std::fclose(hfile);
+ hfile = 0;
+ _size = 0;
+ return;
+ }
+
+ _first = new pointer[(int)cnodes];
+ _last = _first + cnodes;
+ std::memset(_first, 0, cnodes*sizeof(pointer));
+ }
+ else
+ {
+ std::runtime_error err("Unable to open file.");
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ }catch(...)
+ { close(); throw; }
+#endif
+}
+
+void mapfile::close()
+{
+ if(hfile != 0)
+ {
+ pointer* p = _first;
+ while(p != _last)
+ {
+ if(*p)
+ delete[] *p;
+ ++p;
+ }
+ delete[] _first;
+ _size = 0;
+ _first = _last = 0;
+ std::fclose(hfile);
+ hfile = 0;
+ condemed.erase(condemed.begin(), condemed.end());
+ }
+}
+
+
+#endif
+
+inline _fi_find_handle find_first_file(const char* wild, _fi_find_data& data)
+{
+#ifdef BOOST_NO_ANSI_APIS
+ std::size_t wild_size = std::strlen(wild);
+ LPWSTR wide_wild = (LPWSTR)_alloca( (wild_size + 1) * sizeof(WCHAR) );
+ if (::MultiByteToWideChar(CP_ACP, 0, wild, wild_size, wide_wild, wild_size + 1) == 0)
+ return _fi_invalid_handle;
+
+ return FindFirstFileW(wide_wild, &data);
+#else
+ return FindFirstFileA(wild, &data);
+#endif
+}
+
+inline bool find_next_file(_fi_find_handle hf, _fi_find_data& data)
+{
+#ifdef BOOST_NO_ANSI_APIS
+ return FindNextFileW(hf, &data);
+#else
+ return FindNextFileA(hf, &data);
+#endif
+}
+
+inline void copy_find_file_result_with_overflow_check(const _fi_find_data& data, char* path, size_t max_size)
+{
+#ifdef BOOST_NO_ANSI_APIS
+ if (::WideCharToMultiByte(CP_ACP, 0, data.cFileName, -1, path, max_size, NULL, NULL) == 0)
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(1);
+#else
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(path, max_size, data.cFileName));
+#endif
+}
+
+inline bool is_not_current_or_parent_path_string(const _fi_find_data& data)
+{
+#ifdef BOOST_NO_ANSI_APIS
+ return (std::wcscmp(data.cFileName, L".") && std::wcscmp(data.cFileName, L".."));
+#else
+ return (std::strcmp(data.cFileName, ".") && std::strcmp(data.cFileName, ".."));
+#endif
+}
+
+
+file_iterator::file_iterator()
+{
+ _root = _path = 0;
+ ref = 0;
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ _root = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_root)
+ _path = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_path)
+ ptr = _path;
+ *_path = 0;
+ *_root = 0;
+ ref = new file_iterator_ref();
+ BOOST_REGEX_NOEH_ASSERT(ref)
+ ref->hf = _fi_invalid_handle;
+ ref->count = 1;
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ delete[] _root;
+ delete[] _path;
+ delete ref;
+ throw;
+ }
+#endif
+}
+
+file_iterator::file_iterator(const char* wild)
+{
+ _root = _path = 0;
+ ref = 0;
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ _root = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_root)
+ _path = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_path)
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, wild));
+ ptr = _root;
+ while(*ptr)++ptr;
+ while((ptr > _root) && (*ptr != *_fi_sep) && (*ptr != *_fi_sep_alt))--ptr;
+ if((ptr == _root) && ( (*ptr== *_fi_sep) || (*ptr==*_fi_sep_alt) ) )
+ {
+ _root[1]='\0';
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, _root));
+ }
+ else
+ {
+ *ptr = 0;
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, _root));
+ if(*_path == 0)
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, "."));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(_path, MAX_PATH, _fi_sep));
+ }
+ ptr = _path + std::strlen(_path);
+
+ ref = new file_iterator_ref();
+ BOOST_REGEX_NOEH_ASSERT(ref)
+ ref->hf = find_first_file(wild, ref->_data);
+ ref->count = 1;
+
+ if(ref->hf == _fi_invalid_handle)
+ {
+ *_path = 0;
+ ptr = _path;
+ }
+ else
+ {
+ copy_find_file_result_with_overflow_check(ref->_data, ptr, (MAX_PATH - (ptr - _path)));
+ if(ref->_data.dwFileAttributes & _fi_dir)
+ next();
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ delete[] _root;
+ delete[] _path;
+ delete ref;
+ throw;
+ }
+#endif
+}
+
+file_iterator::file_iterator(const file_iterator& other)
+{
+ _root = _path = 0;
+ ref = 0;
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ _root = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_root)
+ _path = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_path)
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, other._root));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, other._path));
+ ptr = _path + (other.ptr - other._path);
+ ref = other.ref;
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ delete[] _root;
+ delete[] _path;
+ throw;
+ }
+#endif
+ ++(ref->count);
+}
+
+file_iterator& file_iterator::operator=(const file_iterator& other)
+{
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, other._root));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, other._path));
+ ptr = _path + (other.ptr - other._path);
+ if(--(ref->count) == 0)
+ {
+ if(ref->hf != _fi_invalid_handle)
+ FindClose(ref->hf);
+ delete ref;
+ }
+ ref = other.ref;
+ ++(ref->count);
+ return *this;
+}
+
+
+file_iterator::~file_iterator()
+{
+ delete[] _root;
+ delete[] _path;
+ if(--(ref->count) == 0)
+ {
+ if(ref->hf != _fi_invalid_handle)
+ FindClose(ref->hf);
+ delete ref;
+ }
+}
+
+file_iterator file_iterator::operator++(int)
+{
+ file_iterator temp(*this);
+ next();
+ return temp;
+}
+
+
+void file_iterator::next()
+{
+ if(ref->hf != _fi_invalid_handle)
+ {
+ bool cont = true;
+ while(cont)
+ {
+ cont = find_next_file(ref->hf, ref->_data);
+ if(cont && ((ref->_data.dwFileAttributes & _fi_dir) == 0))
+ break;
+ }
+ if(!cont)
+ {
+ // end of sequence
+ FindClose(ref->hf);
+ ref->hf = _fi_invalid_handle;
+ *_path = 0;
+ ptr = _path;
+ }
+ else
+ copy_find_file_result_with_overflow_check(ref->_data, ptr, MAX_PATH - (ptr - _path));
+ }
+}
+
+
+
+directory_iterator::directory_iterator()
+{
+ _root = _path = 0;
+ ref = 0;
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ _root = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_root)
+ _path = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_path)
+ ptr = _path;
+ *_path = 0;
+ *_root = 0;
+ ref = new file_iterator_ref();
+ BOOST_REGEX_NOEH_ASSERT(ref)
+ ref->hf = _fi_invalid_handle;
+ ref->count = 1;
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ delete[] _root;
+ delete[] _path;
+ delete ref;
+ throw;
+ }
+#endif
+}
+
+directory_iterator::directory_iterator(const char* wild)
+{
+ _root = _path = 0;
+ ref = 0;
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ _root = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_root)
+ _path = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_path)
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, wild));
+ ptr = _root;
+ while(*ptr)++ptr;
+ while((ptr > _root) && (*ptr != *_fi_sep) && (*ptr != *_fi_sep_alt))--ptr;
+
+ if((ptr == _root) && ( (*ptr== *_fi_sep) || (*ptr==*_fi_sep_alt) ) )
+ {
+ _root[1]='\0';
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, _root));
+ }
+ else
+ {
+ *ptr = 0;
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, _root));
+ if(*_path == 0)
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, "."));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcat_s(_path, MAX_PATH, _fi_sep));
+ }
+ ptr = _path + std::strlen(_path);
+
+ ref = new file_iterator_ref();
+ BOOST_REGEX_NOEH_ASSERT(ref)
+ ref->count = 1;
+ ref->hf = find_first_file(wild, ref->_data);
+ if(ref->hf == _fi_invalid_handle)
+ {
+ *_path = 0;
+ ptr = _path;
+ }
+ else
+ {
+ copy_find_file_result_with_overflow_check(ref->_data, ptr, MAX_PATH - (ptr - _path));
+ if(((ref->_data.dwFileAttributes & _fi_dir) == 0) || (std::strcmp(ptr, ".") == 0) || (std::strcmp(ptr, "..") == 0))
+ next();
+ }
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ delete[] _root;
+ delete[] _path;
+ delete ref;
+ throw;
+ }
+#endif
+}
+
+directory_iterator::~directory_iterator()
+{
+ delete[] _root;
+ delete[] _path;
+ if(--(ref->count) == 0)
+ {
+ if(ref->hf != _fi_invalid_handle)
+ FindClose(ref->hf);
+ delete ref;
+ }
+}
+
+directory_iterator::directory_iterator(const directory_iterator& other)
+{
+ _root = _path = 0;
+ ref = 0;
+#ifndef BOOST_NO_EXCEPTIONS
+ try{
+#endif
+ _root = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_root)
+ _path = new char[MAX_PATH];
+ BOOST_REGEX_NOEH_ASSERT(_path)
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, other._root));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, other._path));
+ ptr = _path + (other.ptr - other._path);
+ ref = other.ref;
+#ifndef BOOST_NO_EXCEPTIONS
+ }
+ catch(...)
+ {
+ delete[] _root;
+ delete[] _path;
+ throw;
+ }
+#endif
+ ++(ref->count);
+}
+
+directory_iterator& directory_iterator::operator=(const directory_iterator& other)
+{
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_root, MAX_PATH, other._root));
+ BOOST_REGEX_DETAIL_NS::overflow_error_if_not_zero(BOOST_REGEX_DETAIL_NS::strcpy_s(_path, MAX_PATH, other._path));
+ ptr = _path + (other.ptr - other._path);
+ if(--(ref->count) == 0)
+ {
+ if(ref->hf != _fi_invalid_handle)
+ FindClose(ref->hf);
+ delete ref;
+ }
+ ref = other.ref;
+ ++(ref->count);
+ return *this;
+}
+
+directory_iterator directory_iterator::operator++(int)
+{
+ directory_iterator temp(*this);
+ next();
+ return temp;
+}
+
+void directory_iterator::next()
+{
+ if(ref->hf != _fi_invalid_handle)
+ {
+ bool cont = true;
+ while(cont)
+ {
+ cont = find_next_file(ref->hf, ref->_data);
+ if(cont && (ref->_data.dwFileAttributes & _fi_dir))
+ {
+ if(is_not_current_or_parent_path_string(ref->_data))
+ break;
+ }
+ }
+ if(!cont)
+ {
+ // end of sequence
+ FindClose(ref->hf);
+ ref->hf = _fi_invalid_handle;
+ *_path = 0;
+ ptr = _path;
+ }
+ else
+ copy_find_file_result_with_overflow_check(ref->_data, ptr, MAX_PATH - (ptr - _path));
+ }
+}
+
+
+#ifdef BOOST_REGEX_FI_POSIX_DIR
+
+struct _fi_priv_data
+{
+ char root[MAX_PATH];
+ char* mask;
+ DIR* d;
+ _fi_priv_data(const char* p);
+};
+
+_fi_priv_data::_fi_priv_data(const char* p)
+{
+ std::strcpy(root, p);
+ mask = root;
+ while(*mask) ++mask;
+ while((mask > root) && (*mask != *_fi_sep) && (*mask != *_fi_sep_alt)) --mask;
+ if(mask == root && ((*mask== *_fi_sep) || (*mask == *_fi_sep_alt)) )
+ {
+ root[1] = '\0';
+ std::strcpy(root+2, p+1);
+ mask = root+2;
+ }
+ else if(mask == root)
+ {
+ root[0] = '.';
+ root[1] = '\0';
+ std::strcpy(root+2, p);
+ mask = root+2;
+ }
+ else
+ {
+ *mask = 0;
+ ++mask;
+ }
+}
+
+bool iswild(const char* mask, const char* name)
+{
+ while(*mask && *name)
+ {
+ switch(*mask)
+ {
+ case '?':
+ ++name;
+ ++mask;
+ continue;
+ case '*':
+ ++mask;
+ if(*mask == 0)
+ return true;
+ while(*name)
+ {
+ if(iswild(mask, name))
+ return true;
+ ++name;
+ }
+ return false;
+ case '.':
+ if(0 == *name)
+ {
+ ++mask;
+ continue;
+ }
+ // fall through
+ default:
+ if(BOOST_REGEX_FI_TRANSLATE(*mask) != BOOST_REGEX_FI_TRANSLATE(*name))
+ return false;
+ ++mask;
+ ++name;
+ continue;
+ }
+ }
+ if(*mask != *name)
+ return false;
+ return true;
+}
+
+unsigned _fi_attributes(const char* root, const char* name)
+{
+ char buf[MAX_PATH];
+ // verify that we can not overflow:
+ if(std::strlen(root) + std::strlen(_fi_sep) + std::strlen(name) >= MAX_PATH)
+ return 0;
+ int r;
+ if( ( (root[0] == *_fi_sep) || (root[0] == *_fi_sep_alt) ) && (root[1] == '\0') )
+ r = (std::sprintf)(buf, "%s%s", root, name);
+ else
+ r = (std::sprintf)(buf, "%s%s%s", root, _fi_sep, name);
+ if(r < 0)
+ return 0; // sprintf failed
+ DIR* d = opendir(buf);
+ if(d)
+ {
+ closedir(d);
+ return _fi_dir;
+ }
+ return 0;
+}
+
+_fi_find_handle _fi_FindFirstFile(const char* lpFileName, _fi_find_data* lpFindFileData)
+{
+ _fi_find_handle dat = new _fi_priv_data(lpFileName);
+
+ DIR* h = opendir(dat->root);
+ dat->d = h;
+ if(h != 0)
+ {
+ if(_fi_FindNextFile(dat, lpFindFileData))
+ return dat;
+ closedir(h);
+ }
+ delete dat;
+ return 0;
+}
+
+bool _fi_FindNextFile(_fi_find_handle dat, _fi_find_data* lpFindFileData)
+{
+ dirent* d;
+ do
+ {
+ d = readdir(dat->d);
+ } while(d && !iswild(dat->mask, d->d_name));
+
+ if(d)
+ {
+ std::strcpy(lpFindFileData->cFileName, d->d_name);
+ lpFindFileData->dwFileAttributes = _fi_attributes(dat->root, d->d_name);
+ return true;
+ }
+ return false;
+}
+
+bool _fi_FindClose(_fi_find_handle dat)
+{
+ closedir(dat->d);
+ delete dat;
+ return true;
+}
+
+#endif
+
+} // namespace BOOST_REGEX_DETAIL_NS
+} // namspace boost
+
+#endif // BOOST_REGEX_NO_FILEITER
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/third_party/boost-1.69.0/libs/regex/src/icu.cpp b/src/third_party/boost-1.69.0/libs/regex/src/icu.cpp
new file mode 100644
index 00000000000..5f249e2d8df
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/regex/src/icu.cpp
@@ -0,0 +1,511 @@
+/*
+ *
+ * Copyright (c) 2004
+ * John Maddock
+ *
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
+ * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+ *
+ */
+
+ /*
+ * LOCATION: see http://www.boost.org for most recent version.
+ * FILE icu.cpp
+ * VERSION see <boost/version.hpp>
+ * DESCRIPTION: Unicode regular expressions on top of the ICU Library.
+ */
+#define BOOST_REGEX_SOURCE
+
+#include <boost/regex/config.hpp>
+#ifdef BOOST_HAS_ICU
+#define BOOST_REGEX_ICU_INSTANTIATE
+#include <boost/regex/icu.hpp>
+
+#ifdef BOOST_INTEL
+#pragma warning(disable:981 2259 383)
+#endif
+
+namespace boost{
+
+namespace BOOST_REGEX_DETAIL_NS{
+
+icu_regex_traits_implementation::string_type icu_regex_traits_implementation::do_transform(const char_type* p1, const char_type* p2, const U_NAMESPACE_QUALIFIER Collator* pcoll) const
+{
+ // TODO make thread safe!!!! :
+ typedef u32_to_u16_iterator<const char_type*, ::UChar> itt;
+ itt i(p1), j(p2);
+#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+ std::vector< ::UChar> t(i, j);
+#else
+ std::vector< ::UChar> t;
+ while(i != j)
+ t.push_back(*i++);
+#endif
+ ::uint8_t result[100];
+ ::int32_t len;
+ if(t.size())
+ len = pcoll->getSortKey(&*t.begin(), static_cast< ::int32_t>(t.size()), result, sizeof(result));
+ else
+ len = pcoll->getSortKey(static_cast<UChar const*>(0), static_cast< ::int32_t>(0), result, sizeof(result));
+ if(std::size_t(len) > sizeof(result))
+ {
+ scoped_array< ::uint8_t> presult(new ::uint8_t[len+1]);
+ if(t.size())
+ len = pcoll->getSortKey(&*t.begin(), static_cast< ::int32_t>(t.size()), presult.get(), len+1);
+ else
+ len = pcoll->getSortKey(static_cast<UChar const*>(0), static_cast< ::int32_t>(0), presult.get(), len+1);
+ if((0 == presult[len-1]) && (len > 1))
+ --len;
+#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+ return string_type(presult.get(), presult.get()+len);
+#else
+ string_type sresult;
+ ::uint8_t const* ia = presult.get();
+ ::uint8_t const* ib = presult.get()+len;
+ while(ia != ib)
+ sresult.push_back(*ia++);
+ return sresult;
+#endif
+ }
+ if((0 == result[len-1]) && (len > 1))
+ --len;
+#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+ return string_type(result, result+len);
+#else
+ string_type sresult;
+ ::uint8_t const* ia = result;
+ ::uint8_t const* ib = result+len;
+ while(ia != ib)
+ sresult.push_back(*ia++);
+ return sresult;
+#endif
+}
+
+}
+
+icu_regex_traits::size_type icu_regex_traits::length(const char_type* p)
+{
+ size_type result = 0;
+ while(*p)
+ {
+ ++p;
+ ++result;
+ }
+ return result;
+}
+
+//
+// define our bitmasks:
+//
+const icu_regex_traits::char_class_type icu_regex_traits::mask_blank = icu_regex_traits::char_class_type(1) << offset_blank;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_space = icu_regex_traits::char_class_type(1) << offset_space;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_xdigit = icu_regex_traits::char_class_type(1) << offset_xdigit;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_underscore = icu_regex_traits::char_class_type(1) << offset_underscore;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_unicode = icu_regex_traits::char_class_type(1) << offset_unicode;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_any = icu_regex_traits::char_class_type(1) << offset_any;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_ascii = icu_regex_traits::char_class_type(1) << offset_ascii;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_horizontal = icu_regex_traits::char_class_type(1) << offset_horizontal;
+const icu_regex_traits::char_class_type icu_regex_traits::mask_vertical = icu_regex_traits::char_class_type(1) << offset_vertical;
+
+icu_regex_traits::char_class_type icu_regex_traits::lookup_icu_mask(const ::UChar32* p1, const ::UChar32* p2)
+{
+ static const ::UChar32 prop_name_table[] = {
+ /* any */ 'a', 'n', 'y',
+ /* ascii */ 'a', 's', 'c', 'i', 'i',
+ /* assigned */ 'a', 's', 's', 'i', 'g', 'n', 'e', 'd',
+ /* c* */ 'c', '*',
+ /* cc */ 'c', 'c',
+ /* cf */ 'c', 'f',
+ /* closepunctuation */ 'c', 'l', 'o', 's', 'e', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
+ /* cn */ 'c', 'n',
+ /* co */ 'c', 'o',
+ /* connectorpunctuation */ 'c', 'o', 'n', 'n', 'e', 'c', 't', 'o', 'r', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
+ /* control */ 'c', 'o', 'n', 't', 'r', 'o', 'l',
+ /* cs */ 'c', 's',
+ /* currencysymbol */ 'c', 'u', 'r', 'r', 'e', 'n', 'c', 'y', 's', 'y', 'm', 'b', 'o', 'l',
+ /* dashpunctuation */ 'd', 'a', 's', 'h', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
+ /* decimaldigitnumber */ 'd', 'e', 'c', 'i', 'm', 'a', 'l', 'd', 'i', 'g', 'i', 't', 'n', 'u', 'm', 'b', 'e', 'r',
+ /* enclosingmark */ 'e', 'n', 'c', 'l', 'o', 's', 'i', 'n', 'g', 'm', 'a', 'r', 'k',
+ /* finalpunctuation */ 'f', 'i', 'n', 'a', 'l', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
+ /* format */ 'f', 'o', 'r', 'm', 'a', 't',
+ /* initialpunctuation */ 'i', 'n', 'i', 't', 'i', 'a', 'l', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
+ /* l* */ 'l', '*',
+ /* letter */ 'l', 'e', 't', 't', 'e', 'r',
+ /* letternumber */ 'l', 'e', 't', 't', 'e', 'r', 'n', 'u', 'm', 'b', 'e', 'r',
+ /* lineseparator */ 'l', 'i', 'n', 'e', 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r',
+ /* ll */ 'l', 'l',
+ /* lm */ 'l', 'm',
+ /* lo */ 'l', 'o',
+ /* lowercaseletter */ 'l', 'o', 'w', 'e', 'r', 'c', 'a', 's', 'e', 'l', 'e', 't', 't', 'e', 'r',
+ /* lt */ 'l', 't',
+ /* lu */ 'l', 'u',
+ /* m* */ 'm', '*',
+ /* mark */ 'm', 'a', 'r', 'k',
+ /* mathsymbol */ 'm', 'a', 't', 'h', 's', 'y', 'm', 'b', 'o', 'l',
+ /* mc */ 'm', 'c',
+ /* me */ 'm', 'e',
+ /* mn */ 'm', 'n',
+ /* modifierletter */ 'm', 'o', 'd', 'i', 'f', 'i', 'e', 'r', 'l', 'e', 't', 't', 'e', 'r',
+ /* modifiersymbol */ 'm', 'o', 'd', 'i', 'f', 'i', 'e', 'r', 's', 'y', 'm', 'b', 'o', 'l',
+ /* n* */ 'n', '*',
+ /* nd */ 'n', 'd',
+ /* nl */ 'n', 'l',
+ /* no */ 'n', 'o',
+ /* nonspacingmark */ 'n', 'o', 'n', 's', 'p', 'a', 'c', 'i', 'n', 'g', 'm', 'a', 'r', 'k',
+ /* notassigned */ 'n', 'o', 't', 'a', 's', 's', 'i', 'g', 'n', 'e', 'd',
+ /* number */ 'n', 'u', 'm', 'b', 'e', 'r',
+ /* openpunctuation */ 'o', 'p', 'e', 'n', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
+ /* other */ 'o', 't', 'h', 'e', 'r',
+ /* otherletter */ 'o', 't', 'h', 'e', 'r', 'l', 'e', 't', 't', 'e', 'r',
+ /* othernumber */ 'o', 't', 'h', 'e', 'r', 'n', 'u', 'm', 'b', 'e', 'r',
+ /* otherpunctuation */ 'o', 't', 'h', 'e', 'r', 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
+ /* othersymbol */ 'o', 't', 'h', 'e', 'r', 's', 'y', 'm', 'b', 'o', 'l',
+ /* p* */ 'p', '*',
+ /* paragraphseparator */ 'p', 'a', 'r', 'a', 'g', 'r', 'a', 'p', 'h', 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r',
+ /* pc */ 'p', 'c',
+ /* pd */ 'p', 'd',
+ /* pe */ 'p', 'e',
+ /* pf */ 'p', 'f',
+ /* pi */ 'p', 'i',
+ /* po */ 'p', 'o',
+ /* privateuse */ 'p', 'r', 'i', 'v', 'a', 't', 'e', 'u', 's', 'e',
+ /* ps */ 'p', 's',
+ /* punctuation */ 'p', 'u', 'n', 'c', 't', 'u', 'a', 't', 'i', 'o', 'n',
+ /* s* */ 's', '*',
+ /* sc */ 's', 'c',
+ /* separator */ 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r',
+ /* sk */ 's', 'k',
+ /* sm */ 's', 'm',
+ /* so */ 's', 'o',
+ /* spaceseparator */ 's', 'p', 'a', 'c', 'e', 's', 'e', 'p', 'a', 'r', 'a', 't', 'o', 'r',
+ /* spacingcombiningmark */ 's', 'p', 'a', 'c', 'i', 'n', 'g', 'c', 'o', 'm', 'b', 'i', 'n', 'i', 'n', 'g', 'm', 'a', 'r', 'k',
+ /* surrogate */ 's', 'u', 'r', 'r', 'o', 'g', 'a', 't', 'e',
+ /* symbol */ 's', 'y', 'm', 'b', 'o', 'l',
+ /* titlecase */ 't', 'i', 't', 'l', 'e', 'c', 'a', 's', 'e',
+ /* titlecaseletter */ 't', 'i', 't', 'l', 'e', 'c', 'a', 's', 'e', 'l', 'e', 't', 't', 'e', 'r',
+ /* uppercaseletter */ 'u', 'p', 'p', 'e', 'r', 'c', 'a', 's', 'e', 'l', 'e', 't', 't', 'e', 'r',
+ /* z* */ 'z', '*',
+ /* zl */ 'z', 'l',
+ /* zp */ 'z', 'p',
+ /* zs */ 'z', 's',
+ };
+
+ static const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32> range_data[] = {
+ { prop_name_table+0, prop_name_table+3, }, // any
+ { prop_name_table+3, prop_name_table+8, }, // ascii
+ { prop_name_table+8, prop_name_table+16, }, // assigned
+ { prop_name_table+16, prop_name_table+18, }, // c*
+ { prop_name_table+18, prop_name_table+20, }, // cc
+ { prop_name_table+20, prop_name_table+22, }, // cf
+ { prop_name_table+22, prop_name_table+38, }, // closepunctuation
+ { prop_name_table+38, prop_name_table+40, }, // cn
+ { prop_name_table+40, prop_name_table+42, }, // co
+ { prop_name_table+42, prop_name_table+62, }, // connectorpunctuation
+ { prop_name_table+62, prop_name_table+69, }, // control
+ { prop_name_table+69, prop_name_table+71, }, // cs
+ { prop_name_table+71, prop_name_table+85, }, // currencysymbol
+ { prop_name_table+85, prop_name_table+100, }, // dashpunctuation
+ { prop_name_table+100, prop_name_table+118, }, // decimaldigitnumber
+ { prop_name_table+118, prop_name_table+131, }, // enclosingmark
+ { prop_name_table+131, prop_name_table+147, }, // finalpunctuation
+ { prop_name_table+147, prop_name_table+153, }, // format
+ { prop_name_table+153, prop_name_table+171, }, // initialpunctuation
+ { prop_name_table+171, prop_name_table+173, }, // l*
+ { prop_name_table+173, prop_name_table+179, }, // letter
+ { prop_name_table+179, prop_name_table+191, }, // letternumber
+ { prop_name_table+191, prop_name_table+204, }, // lineseparator
+ { prop_name_table+204, prop_name_table+206, }, // ll
+ { prop_name_table+206, prop_name_table+208, }, // lm
+ { prop_name_table+208, prop_name_table+210, }, // lo
+ { prop_name_table+210, prop_name_table+225, }, // lowercaseletter
+ { prop_name_table+225, prop_name_table+227, }, // lt
+ { prop_name_table+227, prop_name_table+229, }, // lu
+ { prop_name_table+229, prop_name_table+231, }, // m*
+ { prop_name_table+231, prop_name_table+235, }, // mark
+ { prop_name_table+235, prop_name_table+245, }, // mathsymbol
+ { prop_name_table+245, prop_name_table+247, }, // mc
+ { prop_name_table+247, prop_name_table+249, }, // me
+ { prop_name_table+249, prop_name_table+251, }, // mn
+ { prop_name_table+251, prop_name_table+265, }, // modifierletter
+ { prop_name_table+265, prop_name_table+279, }, // modifiersymbol
+ { prop_name_table+279, prop_name_table+281, }, // n*
+ { prop_name_table+281, prop_name_table+283, }, // nd
+ { prop_name_table+283, prop_name_table+285, }, // nl
+ { prop_name_table+285, prop_name_table+287, }, // no
+ { prop_name_table+287, prop_name_table+301, }, // nonspacingmark
+ { prop_name_table+301, prop_name_table+312, }, // notassigned
+ { prop_name_table+312, prop_name_table+318, }, // number
+ { prop_name_table+318, prop_name_table+333, }, // openpunctuation
+ { prop_name_table+333, prop_name_table+338, }, // other
+ { prop_name_table+338, prop_name_table+349, }, // otherletter
+ { prop_name_table+349, prop_name_table+360, }, // othernumber
+ { prop_name_table+360, prop_name_table+376, }, // otherpunctuation
+ { prop_name_table+376, prop_name_table+387, }, // othersymbol
+ { prop_name_table+387, prop_name_table+389, }, // p*
+ { prop_name_table+389, prop_name_table+407, }, // paragraphseparator
+ { prop_name_table+407, prop_name_table+409, }, // pc
+ { prop_name_table+409, prop_name_table+411, }, // pd
+ { prop_name_table+411, prop_name_table+413, }, // pe
+ { prop_name_table+413, prop_name_table+415, }, // pf
+ { prop_name_table+415, prop_name_table+417, }, // pi
+ { prop_name_table+417, prop_name_table+419, }, // po
+ { prop_name_table+419, prop_name_table+429, }, // privateuse
+ { prop_name_table+429, prop_name_table+431, }, // ps
+ { prop_name_table+431, prop_name_table+442, }, // punctuation
+ { prop_name_table+442, prop_name_table+444, }, // s*
+ { prop_name_table+444, prop_name_table+446, }, // sc
+ { prop_name_table+446, prop_name_table+455, }, // separator
+ { prop_name_table+455, prop_name_table+457, }, // sk
+ { prop_name_table+457, prop_name_table+459, }, // sm
+ { prop_name_table+459, prop_name_table+461, }, // so
+ { prop_name_table+461, prop_name_table+475, }, // spaceseparator
+ { prop_name_table+475, prop_name_table+495, }, // spacingcombiningmark
+ { prop_name_table+495, prop_name_table+504, }, // surrogate
+ { prop_name_table+504, prop_name_table+510, }, // symbol
+ { prop_name_table+510, prop_name_table+519, }, // titlecase
+ { prop_name_table+519, prop_name_table+534, }, // titlecaseletter
+ { prop_name_table+534, prop_name_table+549, }, // uppercaseletter
+ { prop_name_table+549, prop_name_table+551, }, // z*
+ { prop_name_table+551, prop_name_table+553, }, // zl
+ { prop_name_table+553, prop_name_table+555, }, // zp
+ { prop_name_table+555, prop_name_table+557, }, // zs
+ };
+
+ static const icu_regex_traits::char_class_type icu_class_map[] = {
+ icu_regex_traits::mask_any, // any
+ icu_regex_traits::mask_ascii, // ascii
+ (0x3FFFFFFFu) & ~(U_GC_CN_MASK), // assigned
+ U_GC_C_MASK, // c*
+ U_GC_CC_MASK, // cc
+ U_GC_CF_MASK, // cf
+ U_GC_PE_MASK, // closepunctuation
+ U_GC_CN_MASK, // cn
+ U_GC_CO_MASK, // co
+ U_GC_PC_MASK, // connectorpunctuation
+ U_GC_CC_MASK, // control
+ U_GC_CS_MASK, // cs
+ U_GC_SC_MASK, // currencysymbol
+ U_GC_PD_MASK, // dashpunctuation
+ U_GC_ND_MASK, // decimaldigitnumber
+ U_GC_ME_MASK, // enclosingmark
+ U_GC_PF_MASK, // finalpunctuation
+ U_GC_CF_MASK, // format
+ U_GC_PI_MASK, // initialpunctuation
+ U_GC_L_MASK, // l*
+ U_GC_L_MASK, // letter
+ U_GC_NL_MASK, // letternumber
+ U_GC_ZL_MASK, // lineseparator
+ U_GC_LL_MASK, // ll
+ U_GC_LM_MASK, // lm
+ U_GC_LO_MASK, // lo
+ U_GC_LL_MASK, // lowercaseletter
+ U_GC_LT_MASK, // lt
+ U_GC_LU_MASK, // lu
+ U_GC_M_MASK, // m*
+ U_GC_M_MASK, // mark
+ U_GC_SM_MASK, // mathsymbol
+ U_GC_MC_MASK, // mc
+ U_GC_ME_MASK, // me
+ U_GC_MN_MASK, // mn
+ U_GC_LM_MASK, // modifierletter
+ U_GC_SK_MASK, // modifiersymbol
+ U_GC_N_MASK, // n*
+ U_GC_ND_MASK, // nd
+ U_GC_NL_MASK, // nl
+ U_GC_NO_MASK, // no
+ U_GC_MN_MASK, // nonspacingmark
+ U_GC_CN_MASK, // notassigned
+ U_GC_N_MASK, // number
+ U_GC_PS_MASK, // openpunctuation
+ U_GC_C_MASK, // other
+ U_GC_LO_MASK, // otherletter
+ U_GC_NO_MASK, // othernumber
+ U_GC_PO_MASK, // otherpunctuation
+ U_GC_SO_MASK, // othersymbol
+ U_GC_P_MASK, // p*
+ U_GC_ZP_MASK, // paragraphseparator
+ U_GC_PC_MASK, // pc
+ U_GC_PD_MASK, // pd
+ U_GC_PE_MASK, // pe
+ U_GC_PF_MASK, // pf
+ U_GC_PI_MASK, // pi
+ U_GC_PO_MASK, // po
+ U_GC_CO_MASK, // privateuse
+ U_GC_PS_MASK, // ps
+ U_GC_P_MASK, // punctuation
+ U_GC_S_MASK, // s*
+ U_GC_SC_MASK, // sc
+ U_GC_Z_MASK, // separator
+ U_GC_SK_MASK, // sk
+ U_GC_SM_MASK, // sm
+ U_GC_SO_MASK, // so
+ U_GC_ZS_MASK, // spaceseparator
+ U_GC_MC_MASK, // spacingcombiningmark
+ U_GC_CS_MASK, // surrogate
+ U_GC_S_MASK, // symbol
+ U_GC_LT_MASK, // titlecase
+ U_GC_LT_MASK, // titlecaseletter
+ U_GC_LU_MASK, // uppercaseletter
+ U_GC_Z_MASK, // z*
+ U_GC_ZL_MASK, // zl
+ U_GC_ZP_MASK, // zp
+ U_GC_ZS_MASK, // zs
+ };
+
+
+ static const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* ranges_begin = range_data;
+ static const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* ranges_end = range_data + (sizeof(range_data)/sizeof(range_data[0]));
+
+ BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32> t = { p1, p2, };
+ const BOOST_REGEX_DETAIL_NS::character_pointer_range< ::UChar32>* p = std::lower_bound(ranges_begin, ranges_end, t);
+ if((p != ranges_end) && (t == *p))
+ return icu_class_map[p - ranges_begin];
+ return 0;
+}
+
+icu_regex_traits::char_class_type icu_regex_traits::lookup_classname(const char_type* p1, const char_type* p2) const
+{
+ static const char_class_type masks[] =
+ {
+ 0,
+ U_GC_L_MASK | U_GC_ND_MASK,
+ U_GC_L_MASK,
+ mask_blank,
+ U_GC_CC_MASK | U_GC_CF_MASK | U_GC_ZL_MASK | U_GC_ZP_MASK,
+ U_GC_ND_MASK,
+ U_GC_ND_MASK,
+ (0x3FFFFFFFu) & ~(U_GC_CC_MASK | U_GC_CF_MASK | U_GC_CS_MASK | U_GC_CN_MASK | U_GC_Z_MASK),
+ mask_horizontal,
+ U_GC_LL_MASK,
+ U_GC_LL_MASK,
+ ~(U_GC_C_MASK),
+ U_GC_P_MASK,
+ char_class_type(U_GC_Z_MASK) | mask_space,
+ char_class_type(U_GC_Z_MASK) | mask_space,
+ U_GC_LU_MASK,
+ mask_unicode,
+ U_GC_LU_MASK,
+ mask_vertical,
+ char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
+ char_class_type(U_GC_L_MASK | U_GC_ND_MASK | U_GC_MN_MASK) | mask_underscore,
+ char_class_type(U_GC_ND_MASK) | mask_xdigit,
+ };
+
+ int idx = ::boost::BOOST_REGEX_DETAIL_NS::get_default_class_id(p1, p2);
+ if(idx >= 0)
+ return masks[idx+1];
+ char_class_type result = lookup_icu_mask(p1, p2);
+ if(result != 0)
+ return result;
+
+ if(idx < 0)
+ {
+ string_type s(p1, p2);
+ string_type::size_type i = 0;
+ while(i < s.size())
+ {
+ s[i] = static_cast<char>((::u_tolower)(s[i]));
+ if(::u_isspace(s[i]) || (s[i] == '-') || (s[i] == '_'))
+ s.erase(s.begin()+i, s.begin()+i+1);
+ else
+ {
+ s[i] = static_cast<char>((::u_tolower)(s[i]));
+ ++i;
+ }
+ }
+ if(s.size())
+ idx = ::boost::BOOST_REGEX_DETAIL_NS::get_default_class_id(&*s.begin(), &*s.begin() + s.size());
+ if(idx >= 0)
+ return masks[idx+1];
+ if(s.size())
+ result = lookup_icu_mask(&*s.begin(), &*s.begin() + s.size());
+ if(result != 0)
+ return result;
+ }
+ BOOST_ASSERT(std::size_t(idx+1) < sizeof(masks) / sizeof(masks[0]));
+ return masks[idx+1];
+}
+
+icu_regex_traits::string_type icu_regex_traits::lookup_collatename(const char_type* p1, const char_type* p2) const
+{
+ string_type result;
+#ifdef BOOST_NO_CXX98_BINDERS
+ if(std::find_if(p1, p2, std::bind(std::greater< ::UChar32>(), std::placeholders::_1, 0x7f)) == p2)
+#else
+ if(std::find_if(p1, p2, std::bind2nd(std::greater< ::UChar32>(), 0x7f)) == p2)
+#endif
+ {
+#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+ std::string s(p1, p2);
+#else
+ std::string s;
+ const char_type* p3 = p1;
+ while(p3 != p2)
+ s.append(1, *p3++);
+#endif
+ // Try Unicode name:
+ UErrorCode err = U_ZERO_ERROR;
+ UChar32 c = ::u_charFromName(U_UNICODE_CHAR_NAME, s.c_str(), &err);
+ if(U_SUCCESS(err))
+ {
+ result.push_back(c);
+ return result;
+ }
+ // Try Unicode-extended name:
+ err = U_ZERO_ERROR;
+ c = ::u_charFromName(U_EXTENDED_CHAR_NAME, s.c_str(), &err);
+ if(U_SUCCESS(err))
+ {
+ result.push_back(c);
+ return result;
+ }
+ // try POSIX name:
+ s = ::boost::BOOST_REGEX_DETAIL_NS::lookup_default_collate_name(s);
+#ifndef BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
+ result.assign(s.begin(), s.end());
+#else
+ result.clear();
+ std::string::const_iterator si, sj;
+ si = s.begin();
+ sj = s.end();
+ while(si != sj)
+ result.push_back(*si++);
+#endif
+ }
+ if(result.empty() && (p2-p1 == 1))
+ result.push_back(*p1);
+ return result;
+}
+
+bool icu_regex_traits::isctype(char_type c, char_class_type f) const
+{
+ // check for standard catagories first:
+ char_class_type m = char_class_type(static_cast<char_class_type>(1) << u_charType(c));
+ if((m & f) != 0)
+ return true;
+ // now check for special cases:
+ if(((f & mask_blank) != 0) && u_isblank(c))
+ return true;
+ if(((f & mask_space) != 0) && u_isspace(c))
+ return true;
+ if(((f & mask_xdigit) != 0) && (u_digit(c, 16) >= 0))
+ return true;
+ if(((f & mask_unicode) != 0) && (c >= 0x100))
+ return true;
+ if(((f & mask_underscore) != 0) && (c == '_'))
+ return true;
+ if(((f & mask_any) != 0) && (c <= 0x10FFFF))
+ return true;
+ if(((f & mask_ascii) != 0) && (c <= 0x7F))
+ return true;
+ if(((f & mask_vertical) != 0) && (::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) || (c == static_cast<char_type>('\v')) || (m == U_GC_ZL_MASK) || (m == U_GC_ZP_MASK)))
+ return true;
+ if(((f & mask_horizontal) != 0) && !::boost::BOOST_REGEX_DETAIL_NS::is_separator(c) && u_isspace(c) && (c != static_cast<char_type>('\v')))
+ return true;
+ return false;
+}
+
+}
+
+#endif // BOOST_HAS_ICU
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/instances.cpp b/src/third_party/boost-1.69.0/libs/regex/src/instances.cpp
index 69d72ad6e15..69d72ad6e15 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/instances.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/instances.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/internals.hpp b/src/third_party/boost-1.69.0/libs/regex/src/internals.hpp
index 3a15cc67cb1..3a15cc67cb1 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/internals.hpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/internals.hpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/posix_api.cpp b/src/third_party/boost-1.69.0/libs/regex/src/posix_api.cpp
index 1531d948a0b..1531d948a0b 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/posix_api.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/posix_api.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/regex.cpp b/src/third_party/boost-1.69.0/libs/regex/src/regex.cpp
index e9e9762748e..e9e9762748e 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/regex.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/regex.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/regex_debug.cpp b/src/third_party/boost-1.69.0/libs/regex/src/regex_debug.cpp
index 9306a82e7ef..9306a82e7ef 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/regex_debug.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/regex_debug.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/regex_raw_buffer.cpp b/src/third_party/boost-1.69.0/libs/regex/src/regex_raw_buffer.cpp
index bb492297746..bb492297746 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/regex_raw_buffer.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/regex_raw_buffer.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/regex_traits_defaults.cpp b/src/third_party/boost-1.69.0/libs/regex/src/regex_traits_defaults.cpp
index 0b66c68dc70..0b66c68dc70 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/regex_traits_defaults.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/regex_traits_defaults.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/static_mutex.cpp b/src/third_party/boost-1.69.0/libs/regex/src/static_mutex.cpp
index d02b01fc6cd..d02b01fc6cd 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/static_mutex.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/static_mutex.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/usinstances.cpp b/src/third_party/boost-1.69.0/libs/regex/src/usinstances.cpp
index 44ebd28dfb5..44ebd28dfb5 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/usinstances.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/usinstances.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/w32_regex_traits.cpp b/src/third_party/boost-1.69.0/libs/regex/src/w32_regex_traits.cpp
index 0f825702477..0f825702477 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/w32_regex_traits.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/w32_regex_traits.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/wc_regex_traits.cpp b/src/third_party/boost-1.69.0/libs/regex/src/wc_regex_traits.cpp
index e7fcfb8ea87..e7fcfb8ea87 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/wc_regex_traits.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/wc_regex_traits.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/wide_posix_api.cpp b/src/third_party/boost-1.69.0/libs/regex/src/wide_posix_api.cpp
index bc1c0af2ae8..bc1c0af2ae8 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/wide_posix_api.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/wide_posix_api.cpp
diff --git a/src/third_party/boost-1.68.0/libs/regex/src/winstances.cpp b/src/third_party/boost-1.69.0/libs/regex/src/winstances.cpp
index 1e0b859628d..1e0b859628d 100644
--- a/src/third_party/boost-1.68.0/libs/regex/src/winstances.cpp
+++ b/src/third_party/boost-1.69.0/libs/regex/src/winstances.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/archive_exception.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/archive_exception.cpp
index 729a4edb255..729a4edb255 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/archive_exception.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/archive_exception.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_archive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_archive.cpp
index 42da5d2e201..42da5d2e201 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_archive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_archive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_iarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_iarchive.cpp
index a5455a530ab..a5455a530ab 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_iarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_iarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_iserializer.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_iserializer.cpp
index 3898a6a7239..3898a6a7239 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_iserializer.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_iserializer.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_oarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_oarchive.cpp
index 653260c33b3..653260c33b3 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_oarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_oarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_oserializer.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_oserializer.cpp
index afe08c4bb88..afe08c4bb88 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_oserializer.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_oserializer.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_pointer_iserializer.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_iserializer.cpp
index 7cf63f306e4..7cf63f306e4 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_pointer_iserializer.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_iserializer.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_pointer_oserializer.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_oserializer.cpp
index e86f7b78edc..e86f7b78edc 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_pointer_oserializer.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_pointer_oserializer.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_serializer_map.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_serializer_map.cpp
index 5b79107728e..5b79107728e 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_serializer_map.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_serializer_map.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_text_iprimitive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_iprimitive.cpp
index c0b7f766820..c0b7f766820 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_text_iprimitive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_iprimitive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_text_oprimitive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_oprimitive.cpp
index 601662294e0..601662294e0 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_text_oprimitive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_oprimitive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_text_wiprimitive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_wiprimitive.cpp
index 28250007bd1..28250007bd1 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_text_wiprimitive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_wiprimitive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_text_woprimitive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_woprimitive.cpp
index 6c0caa9793a..6c0caa9793a 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_text_woprimitive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_text_woprimitive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_xml_archive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_archive.cpp
index 23ab1819d11..23ab1819d11 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_xml_archive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_archive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/basic_xml_grammar.ipp b/src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_grammar.ipp
index dcec1cc6bee..dcec1cc6bee 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/basic_xml_grammar.ipp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/basic_xml_grammar.ipp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/binary_iarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/binary_iarchive.cpp
index 41aad8413e4..41aad8413e4 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/binary_iarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/binary_iarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/binary_oarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/binary_oarchive.cpp
index 8b86d2cb385..8b86d2cb385 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/binary_oarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/binary_oarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/binary_wiarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/binary_wiarchive.cpp
index 720d469d702..720d469d702 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/binary_wiarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/binary_wiarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/binary_woarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/binary_woarchive.cpp
index 905a319d664..905a319d664 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/binary_woarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/binary_woarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/codecvt_null.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/codecvt_null.cpp
index 624afc21618..624afc21618 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/codecvt_null.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/codecvt_null.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info.cpp
new file mode 100644
index 00000000000..573336c8642
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info.cpp
@@ -0,0 +1,196 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// extended_type_info.cpp: implementation for portable version of type_info
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#include <algorithm>
+#include <set>
+#include <utility>
+#include <boost/assert.hpp>
+#include <cstddef> // NULL
+
+#include <cstring>
+#if defined(BOOST_NO_STDC_NAMESPACE)
+namespace std{ using ::strcmp; }
+#endif
+
+#include <boost/config.hpp> // msvc needs this to suppress warning
+
+#include <boost/core/no_exceptions_support.hpp>
+
+// it marks our code with proper attributes as being exported when
+// we're compiling it while marking it import when just the headers
+// is being included.
+#define BOOST_SERIALIZATION_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/serialization/singleton.hpp>
+#include <boost/serialization/force_include.hpp>
+#include <boost/serialization/extended_type_info.hpp>
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+namespace boost {
+namespace serialization {
+namespace detail {
+
+struct key_compare
+{
+ bool
+ operator()(
+ const extended_type_info * lhs,
+ const extended_type_info * rhs
+ ) const {
+ // performance shortcut
+ if(lhs == rhs)
+ return false;
+ const char * l = lhs->get_key();
+ BOOST_ASSERT(NULL != l);
+ const char * r = rhs->get_key();
+ BOOST_ASSERT(NULL != r);
+ // performance shortcut
+ // shortcut to exploit string pooling
+ if(l == r)
+ return false;
+ // for exported types, use the string key so that
+ // multiple instances in different translation units
+ // can be matched up
+ return std::strcmp(l, r) < 0;
+ }
+};
+
+typedef std::multiset<const extended_type_info *, key_compare> ktmap;
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+class extended_type_info_arg : public extended_type_info
+{
+ virtual bool
+ is_less_than(const extended_type_info & /*rhs*/) const {
+ BOOST_ASSERT(false);
+ return false;
+ };
+ virtual bool
+ is_equal(const extended_type_info & /*rhs*/) const {
+ BOOST_ASSERT(false);
+ return false;
+ };
+ virtual const char * get_debug_info() const {
+ return get_key();
+ }
+ virtual void * construct(unsigned int /*count*/, ...) const{
+ BOOST_ASSERT(false);
+ return NULL;
+ }
+ virtual void destroy(void const * const /*p*/) const {
+ BOOST_ASSERT(false);
+ }
+public:
+ extended_type_info_arg(const char * key) :
+ extended_type_info(0, key)
+ {}
+
+ ~extended_type_info_arg(){
+ }
+};
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+} // namespace detail
+
+BOOST_SERIALIZATION_DECL void
+extended_type_info::key_register() const{
+ if(NULL == get_key())
+ return;
+ singleton<detail::ktmap>::get_mutable_instance().insert(this);
+}
+
+BOOST_SERIALIZATION_DECL void
+extended_type_info::key_unregister() const{
+ if(NULL == get_key())
+ return;
+ // note: it's been discovered that at least one platform is not guaranteed
+ // to destroy singletons reverse order of construction. So we can't
+ // use a runtime assert here. Leave this in a reminder not to do this!
+ // BOOST_ASSERT(! singleton<detail::ktmap>::is_destroyed());
+ if(! singleton<detail::ktmap>::is_destroyed()){
+ detail::ktmap & x = singleton<detail::ktmap>::get_mutable_instance();
+ detail::ktmap::iterator start = x.lower_bound(this);
+ detail::ktmap::iterator end = x.upper_bound(this);
+ // remove entry in map which corresponds to this type
+ for(;start != end; ++start){
+ if(this == *start){
+ x.erase(start);
+ break;
+ }
+ }
+ }
+}
+
+BOOST_SERIALIZATION_DECL const extended_type_info *
+extended_type_info::find(const char *key) {
+ BOOST_ASSERT(NULL != key);
+ const detail::ktmap & k = singleton<detail::ktmap>::get_const_instance();
+ const detail::extended_type_info_arg eti_key(key);
+ const detail::ktmap::const_iterator it = k.find(& eti_key);
+ if(k.end() == it)
+ return NULL;
+ return *(it);
+}
+
+BOOST_SERIALIZATION_DECL
+extended_type_info::extended_type_info(
+ const unsigned int type_info_key,
+ const char * key
+) :
+ m_type_info_key(type_info_key),
+ m_key(key)
+{
+}
+
+BOOST_SERIALIZATION_DECL
+extended_type_info::~extended_type_info(){
+}
+
+BOOST_SERIALIZATION_DECL bool
+extended_type_info::operator<(const extended_type_info &rhs) const {
+ // short cut for a common cases
+ if(this == & rhs)
+ return false;
+ if(m_type_info_key == rhs.m_type_info_key){
+ return is_less_than(rhs);
+ }
+ if(m_type_info_key < rhs.m_type_info_key)
+ return true;
+ return false;
+}
+
+BOOST_SERIALIZATION_DECL bool
+extended_type_info::operator==(const extended_type_info &rhs) const {
+ // short cut for a common cases
+ if(this == & rhs)
+ return true;
+ if(m_type_info_key != rhs.m_type_info_key){
+ return false;
+ }
+ return is_equal(rhs);
+}
+
+} // namespace serialization
+} // namespace boost
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info_no_rtti.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_no_rtti.cpp
index 0a8d2a078c7..0a8d2a078c7 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/extended_type_info_no_rtti.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_no_rtti.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_typeid.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_typeid.cpp
new file mode 100644
index 00000000000..91ace4c36ed
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/extended_type_info_typeid.cpp
@@ -0,0 +1,167 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// extended_type_info_typeid.cpp: specific implementation of type info
+// that is based on typeid
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#include <algorithm>
+#include <set>
+#include <boost/assert.hpp>
+#include <typeinfo>
+#include <cstddef> // NULL
+
+#include <boost/core/no_exceptions_support.hpp>
+
+// it marks our code with proper attributes as being exported when
+// we're compiling it while marking it import when just the headers
+// is being included.
+#define BOOST_SERIALIZATION_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/serialization/singleton.hpp>
+#include <boost/serialization/extended_type_info_typeid.hpp>
+
+namespace boost {
+namespace serialization {
+namespace typeid_system {
+
+#define EXTENDED_TYPE_INFO_TYPE_KEY 1
+
+struct type_compare
+{
+ bool
+ operator()(
+ const extended_type_info_typeid_0 * lhs,
+ const extended_type_info_typeid_0 * rhs
+ ) const {
+ return lhs->is_less_than(*rhs);
+ }
+};
+
+typedef std::multiset<
+ const extended_type_info_typeid_0 *,
+ type_compare
+> tkmap;
+
+BOOST_SERIALIZATION_DECL bool
+extended_type_info_typeid_0::is_less_than(
+ const boost::serialization::extended_type_info & rhs
+) const {
+ // shortcut for common case
+ if(this == & rhs)
+ return false;
+ return 0 != m_ti->before(
+ *(static_cast<const extended_type_info_typeid_0 &>(rhs).m_ti)
+ );
+}
+
+BOOST_SERIALIZATION_DECL bool
+extended_type_info_typeid_0::is_equal(
+ const boost::serialization::extended_type_info & rhs
+) const {
+ return
+ // note: std::type_info == operator returns an int !!!
+ // the following permits conversion to bool without a warning.
+ ! (
+ * m_ti
+ != *(static_cast<const extended_type_info_typeid_0 &>(rhs).m_ti)
+ )
+ ;
+}
+
+BOOST_SERIALIZATION_DECL
+extended_type_info_typeid_0::extended_type_info_typeid_0(
+ const char * key
+) :
+ extended_type_info(EXTENDED_TYPE_INFO_TYPE_KEY, key),
+ m_ti(NULL)
+{}
+
+BOOST_SERIALIZATION_DECL
+extended_type_info_typeid_0::~extended_type_info_typeid_0()
+{}
+
+BOOST_SERIALIZATION_DECL void
+extended_type_info_typeid_0::type_register(const std::type_info & ti){
+ m_ti = & ti;
+ singleton<tkmap>::get_mutable_instance().insert(this);
+}
+
+BOOST_SERIALIZATION_DECL void
+extended_type_info_typeid_0::type_unregister()
+{
+ if(NULL != m_ti){
+ // note: previously this conditional was a runtime assertion with
+ // BOOST_ASSERT. We've changed it because we've discovered that at
+ // least one platform is not guaranteed to destroy singletons in
+ // reverse order of distruction.
+ // BOOST_ASSERT(! singleton<tkmap>::is_destroyed());
+ if(! singleton<tkmap>::is_destroyed()){
+ tkmap & x = singleton<tkmap>::get_mutable_instance();
+
+ // remove all entries in map which corresponds to this type
+ // make sure that we don't use any invalidated iterators
+ for(;;){
+ const tkmap::iterator & it = x.find(this);
+ if(it == x.end())
+ break;
+ x.erase(it);
+ };
+ }
+ }
+ m_ti = NULL;
+}
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+// this derivation is used for creating search arguments
+class extended_type_info_typeid_arg :
+ public extended_type_info_typeid_0
+{
+ virtual void * construct(unsigned int /*count*/, ...) const{
+ BOOST_ASSERT(false);
+ return NULL;
+ }
+ virtual void destroy(void const * const /*p*/) const {
+ BOOST_ASSERT(false);
+ }
+public:
+ extended_type_info_typeid_arg(const std::type_info & ti) :
+ extended_type_info_typeid_0(NULL)
+ {
+ // note absense of self register and key as this is used only as
+ // search argument given a type_info reference and is not to
+ // be added to the map.
+ m_ti = & ti;
+ }
+ ~extended_type_info_typeid_arg(){
+ m_ti = NULL;
+ }
+};
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+BOOST_SERIALIZATION_DECL const extended_type_info *
+extended_type_info_typeid_0::get_extended_type_info(
+ const std::type_info & ti
+) const {
+ typeid_system::extended_type_info_typeid_arg etia(ti);
+ const tkmap & t = singleton<tkmap>::get_const_instance();
+ const tkmap::const_iterator it = t.find(& etia);
+ if(t.end() == it)
+ return NULL;
+ return *(it);
+}
+
+} // namespace detail
+} // namespace serialization
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_iarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_iarchive.cpp
new file mode 100644
index 00000000000..7fcca705a88
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_iarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_binary_iarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_binary_iarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class archive_serializer_map<polymorphic_binary_iarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_oarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_oarchive.cpp
new file mode 100644
index 00000000000..8b66c5cb53f
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_binary_oarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_binary_oarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_binary_oarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class detail::archive_serializer_map<polymorphic_binary_oarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/polymorphic_iarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_iarchive.cpp
index 249363b8ea6..249363b8ea6 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/polymorphic_iarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_iarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/polymorphic_oarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_oarchive.cpp
index f63296be5b0..f63296be5b0 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/polymorphic_oarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_oarchive.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_iarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_iarchive.cpp
new file mode 100644
index 00000000000..6404ec83b80
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_iarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_text_iarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_text_iarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class archive_serializer_map<polymorphic_text_iarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_oarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_oarchive.cpp
new file mode 100644
index 00000000000..4160a621a8e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_oarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_text_oarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_text_oarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class detail::archive_serializer_map<polymorphic_text_oarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_wiarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_wiarchive.cpp
new file mode 100644
index 00000000000..2089195a378
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_wiarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_text_wiarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_text_wiarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class archive_serializer_map<polymorphic_text_wiarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_woarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_woarchive.cpp
new file mode 100644
index 00000000000..514f1447785
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_text_woarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_text_woarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_text_woarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class detail::archive_serializer_map<polymorphic_text_woarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_iarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_iarchive.cpp
new file mode 100644
index 00000000000..17ec7917dcf
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_iarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_xml_iarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_xml_iarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class archive_serializer_map<polymorphic_xml_iarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_oarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_oarchive.cpp
new file mode 100644
index 00000000000..124f899f926
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_oarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_xml_oarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_xml_oarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class detail::archive_serializer_map<polymorphic_xml_oarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp
new file mode 100644
index 00000000000..1548c9ed94e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_wiarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_xml_wiarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_xml_wiarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class archive_serializer_map<polymorphic_xml_wiarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_woarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_woarchive.cpp
new file mode 100644
index 00000000000..4798945665b
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/polymorphic_xml_woarchive.cpp
@@ -0,0 +1,30 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// polymorphic_xml_woarchive.cpp:
+
+// (C) Copyright 2018 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+#define BOOST_ARCHIVE_SOURCE
+#include <boost/serialization/config.hpp>
+#include <boost/archive/polymorphic_xml_woarchive.hpp>
+
+// explicitly instantiate for this type of text stream
+#include <boost/archive/impl/archive_serializer_map.ipp>
+
+namespace boost {
+namespace archive {
+namespace detail {
+
+template class detail::archive_serializer_map<polymorphic_xml_woarchive>;
+
+} // detail
+} // archive
+} // boost
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/stl_port.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/stl_port.cpp
index 343faa6d16f..343faa6d16f 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/stl_port.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/stl_port.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/text_iarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/text_iarchive.cpp
index dfcff4e149e..dfcff4e149e 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/text_iarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/text_iarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/text_oarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/text_oarchive.cpp
index ae24a0bf748..ae24a0bf748 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/text_oarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/text_oarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/text_wiarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/text_wiarchive.cpp
index 6b6e592f74a..6b6e592f74a 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/text_wiarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/text_wiarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/text_woarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/text_woarchive.cpp
index 46441694ef6..46441694ef6 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/text_woarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/text_woarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/utf8_codecvt_facet.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/utf8_codecvt_facet.cpp
index f6550d07dee..f6550d07dee 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/utf8_codecvt_facet.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/utf8_codecvt_facet.cpp
diff --git a/src/third_party/boost-1.69.0/libs/serialization/src/void_cast.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/void_cast.cpp
new file mode 100644
index 00000000000..535988f8623
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/void_cast.cpp
@@ -0,0 +1,382 @@
+/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
+// void_cast.cpp: implementation of run-time casting of void pointers
+
+// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
+// Use, modification and distribution is subject to the Boost Software
+// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// <gennadiy.rozental@tfn.com>
+
+// See http://www.boost.org for updates, documentation, and revision history.
+
+#if (defined _MSC_VER) && (_MSC_VER == 1200)
+# pragma warning (disable : 4786) // too long name, harmless warning
+#endif
+
+// STL
+#include <set>
+#include <functional>
+#include <algorithm>
+#include <cstddef> // NULL
+#ifdef BOOST_SERIALIZATION_LOG
+#include <iostream>
+#endif
+
+// BOOST
+#include <boost/config.hpp>
+#include <boost/assert.hpp>
+
+#define BOOST_SERIALIZATION_SOURCE
+#include <boost/serialization/config.hpp>
+// it marks our code with proper attributes as being exported when
+// we're compiling it while marking it import when just the headers
+// is being included.
+#include <boost/serialization/singleton.hpp>
+#include <boost/serialization/extended_type_info.hpp>
+#include <boost/serialization/void_cast.hpp>
+
+namespace boost {
+namespace serialization {
+namespace void_cast_detail {
+
+// note that void_casters are keyed on value of
+// member extended type info records - NOT their
+// addresses. This is necessary in order for the
+// void cast operations to work across dll and exe
+// module boundries.
+bool void_caster::operator<(const void_caster & rhs) const {
+ // include short cut to save time and eliminate
+ // problems when when base class aren't virtual
+ if(m_derived != rhs.m_derived){
+ if(*m_derived < *rhs.m_derived)
+ return true;
+ if(*rhs.m_derived < *m_derived)
+ return false;
+ }
+ // m_derived == rhs.m_derived
+ if(m_base != rhs.m_base)
+ return *m_base < *rhs.m_base;
+ else
+ return false;
+}
+
+struct void_caster_compare {
+ bool operator()(const void_caster * lhs, const void_caster * rhs) const {
+ return *lhs < *rhs;
+ }
+};
+
+typedef std::set<const void_caster *, void_caster_compare> set_type;
+typedef boost::serialization::singleton<set_type> void_caster_registry;
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+// implementation of shortcut void caster
+class void_caster_shortcut : public void_caster
+{
+ bool m_includes_virtual_base;
+
+ void const *
+ vbc_upcast(
+ void const * const t
+ ) const;
+ void const *
+ vbc_downcast(
+ void const * const t
+ ) const;
+ virtual void const *
+ upcast(void const * const t) const{
+ if(m_includes_virtual_base)
+ return vbc_upcast(t);
+ return static_cast<const char *> ( t ) - m_difference;
+ }
+ virtual void const *
+ downcast(void const * const t) const{
+ if(m_includes_virtual_base)
+ return vbc_downcast(t);
+ return static_cast<const char *> ( t ) + m_difference;
+ }
+ virtual bool is_shortcut() const {
+ return true;
+ }
+ virtual bool has_virtual_base() const {
+ return m_includes_virtual_base;
+ }
+public:
+ void_caster_shortcut(
+ extended_type_info const * derived,
+ extended_type_info const * base,
+ std::ptrdiff_t difference,
+ bool includes_virtual_base,
+ void_caster const * const parent
+ ) :
+ void_caster(derived, base, difference, parent),
+ m_includes_virtual_base(includes_virtual_base)
+ {
+ recursive_register(includes_virtual_base);
+ }
+ virtual ~void_caster_shortcut(){
+ recursive_unregister();
+ }
+};
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+void const *
+void_caster_shortcut::vbc_downcast(
+ void const * const t
+) const {
+ // try to find a chain that gives us what we want
+ const void_cast_detail::set_type & s
+ = void_cast_detail::void_caster_registry::get_const_instance();
+ void_cast_detail::set_type::const_iterator it;
+ for(it = s.begin(); it != s.end(); ++it){
+ // if the current candidate casts to the desired target type
+ if ((*it)->m_derived == m_derived){
+ // and if it's not us
+ if ((*it)->m_base != m_base){
+ // try to cast from the candidate base to our base
+ const void * t_new;
+ t_new = void_downcast(*(*it)->m_base, *m_base, t);
+ // if we were successful
+ if(NULL != t_new){
+ // recast to our derived
+ const void_caster * vc = *it;
+ return vc->downcast(t_new);
+ }
+ }
+ }
+ }
+ return NULL;
+}
+
+void const *
+void_caster_shortcut::vbc_upcast(
+ void const * const t
+) const {
+ // try to find a chain that gives us what we want
+ const void_cast_detail::set_type & s
+ = void_cast_detail::void_caster_registry::get_const_instance();
+ void_cast_detail::set_type::const_iterator it;
+ for(it = s.begin(); it != s.end(); ++it){
+ // if the current candidate casts from the desired base type
+ if((*it)->m_base == m_base){
+ // and if it's not us
+ if ((*it)->m_derived != m_derived){
+ // try to cast from the candidate derived to our our derived
+ const void * t_new;
+ t_new = void_upcast(*m_derived, *(*it)->m_derived, t);
+ if(NULL != t_new)
+ return (*it)->upcast(t_new);
+ }
+ }
+ }
+ return NULL;
+}
+
+#ifdef BOOST_MSVC
+# pragma warning(push)
+# pragma warning(disable : 4511 4512)
+#endif
+
+// just used as a search key
+class void_caster_argument : public void_caster
+{
+ virtual void const *
+ upcast(void const * const /*t*/) const {
+ BOOST_ASSERT(false);
+ return NULL;
+ }
+ virtual void const *
+ downcast( void const * const /*t*/) const {
+ BOOST_ASSERT(false);
+ return NULL;
+ }
+ virtual bool has_virtual_base() const {
+ BOOST_ASSERT(false);
+ return false;
+ }
+public:
+ void_caster_argument(
+ extended_type_info const * derived,
+ extended_type_info const * base
+ ) :
+ void_caster(derived, base)
+ {}
+ virtual ~void_caster_argument(){};
+};
+
+#ifdef BOOST_MSVC
+# pragma warning(pop)
+#endif
+
+// implementation of void caster base class
+BOOST_SERIALIZATION_DECL void
+void_caster::recursive_register(bool includes_virtual_base) const {
+ void_cast_detail::set_type & s
+ = void_cast_detail::void_caster_registry::get_mutable_instance();
+
+ #ifdef BOOST_SERIALIZATION_LOG
+ std::clog << "recursive_register\n";
+ std::clog << m_derived->get_debug_info();
+ std::clog << "<-";
+ std::clog << m_base->get_debug_info();
+ std::clog << "\n";
+ #endif
+
+ std::pair<void_cast_detail::set_type::const_iterator, bool> result;
+ // comment this out for now.
+ result = s.insert(this);
+ //assert(result.second);
+
+ // generate all implied void_casts.
+ void_cast_detail::set_type::const_iterator it;
+ for(it = s.begin(); it != s.end(); ++it){
+ if(* m_derived == * (*it)->m_base){
+ const void_caster_argument vca(
+ (*it)->m_derived,
+ m_base
+ );
+ void_cast_detail::set_type::const_iterator i;
+ i = s.find(& vca);
+ if(i == s.end()){
+ new void_caster_shortcut(
+ (*it)->m_derived,
+ m_base,
+ m_difference + (*it)->m_difference,
+ (*it)->has_virtual_base() || includes_virtual_base,
+ this
+ );
+ }
+ }
+ if(* (*it)->m_derived == * m_base){
+ const void_caster_argument vca(
+ m_derived,
+ (*it)->m_base
+ );
+ void_cast_detail::set_type::const_iterator i;
+ i = s.find(& vca);
+ if(i == s.end()){
+ new void_caster_shortcut(
+ m_derived,
+ (*it)->m_base,
+ m_difference + (*it)->m_difference,
+ (*it)->has_virtual_base() || includes_virtual_base,
+ this
+ );
+ }
+ }
+ }
+}
+
+BOOST_SERIALIZATION_DECL void
+void_caster::recursive_unregister() const {
+ // note: it's been discovered that at least one platform is not guaranteed
+ // to destroy singletons reverse order of construction. So we can't
+ // use a runtime assert here. Leave this in a reminder not to do this!
+ // BOOST_ASSERT(! void_caster_registry::is_destroyed());
+ if(void_caster_registry::is_destroyed())
+ return;
+
+ #ifdef BOOST_SERIALIZATION_LOG
+ std::clog << "recursive_unregister\n";
+ std::clog << m_derived->get_debug_info();
+ std::clog << "<-";
+ std::clog << m_base->get_debug_info();
+ std::clog << "\n";
+ #endif
+
+ void_cast_detail::set_type & s
+ = void_caster_registry::get_mutable_instance();
+
+ // delete all shortcuts which use this primitive
+ void_cast_detail::set_type::iterator it;
+ for(it = s.begin(); it != s.end();){
+ const void_caster * vc = *it;
+ if(vc == this){
+ s.erase(it++);
+ }
+ else
+ if(vc->m_parent == this){
+ s.erase(it);
+ delete vc;
+ it = s.begin();
+ }
+ else
+ it++;
+ }
+}
+
+} // namespace void_cast_detail
+
+BOOST_SYMBOL_VISIBLE void const *
+void_upcast(
+ extended_type_info const & derived,
+ extended_type_info const & base,
+ void const * const t
+);
+
+// Given a void *, assume that it really points to an instance of one type
+// and alter it so that it would point to an instance of a related type.
+// Return the altered pointer. If there exists no sequence of casts that
+// can transform from_type to to_type, return a NULL.
+BOOST_SERIALIZATION_DECL void const *
+void_upcast(
+ extended_type_info const & derived,
+ extended_type_info const & base,
+ void const * const t
+){
+ // same types - trivial case
+ if (derived == base)
+ return t;
+
+ // check to see if base/derived pair is found in the registry
+ const void_cast_detail::set_type & s
+ = void_cast_detail::void_caster_registry::get_const_instance();
+ const void_cast_detail::void_caster_argument ca(& derived, & base);
+
+ void_cast_detail::set_type::const_iterator it;
+ it = s.find(& ca);
+ if (s.end() != it)
+ return (*it)->upcast(t);
+
+ return NULL;
+}
+
+BOOST_SYMBOL_VISIBLE void const *
+void_downcast(
+ extended_type_info const & derived,
+ extended_type_info const & base,
+ void const * const t
+);
+
+BOOST_SERIALIZATION_DECL void const *
+void_downcast(
+ extended_type_info const & derived,
+ extended_type_info const & base,
+ void const * const t
+){
+ // same types - trivial case
+ if (derived == base)
+ return t;
+
+ // check to see if base/derived pair is found in the registry
+ const void_cast_detail::set_type & s
+ = void_cast_detail::void_caster_registry::get_const_instance();
+ const void_cast_detail::void_caster_argument ca(& derived, & base);
+
+ void_cast_detail::set_type::const_iterator it;
+ it = s.find(&ca);
+ if (s.end() != it)
+ return(*it)->downcast(t);
+
+ return NULL;
+}
+
+} // namespace serialization
+} // namespace boost
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/xml_archive_exception.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/xml_archive_exception.cpp
index f4ca98c0869..f4ca98c0869 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/xml_archive_exception.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/xml_archive_exception.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/xml_grammar.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/xml_grammar.cpp
index ae48f70decc..ae48f70decc 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/xml_grammar.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/xml_grammar.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/xml_iarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/xml_iarchive.cpp
index 0a19a8e8e69..0a19a8e8e69 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/xml_iarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/xml_iarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/xml_oarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/xml_oarchive.cpp
index c238845d634..c238845d634 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/xml_oarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/xml_oarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/xml_wgrammar.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/xml_wgrammar.cpp
index 7c053e80984..7c053e80984 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/xml_wgrammar.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/xml_wgrammar.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/xml_wiarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/xml_wiarchive.cpp
index 8c60abf733b..8c60abf733b 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/xml_wiarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/xml_wiarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/serialization/src/xml_woarchive.cpp b/src/third_party/boost-1.69.0/libs/serialization/src/xml_woarchive.cpp
index f9b6ba389ef..f9b6ba389ef 100644
--- a/src/third_party/boost-1.68.0/libs/serialization/src/xml_woarchive.cpp
+++ b/src/third_party/boost-1.69.0/libs/serialization/src/xml_woarchive.cpp
diff --git a/src/third_party/boost-1.68.0/libs/smart_ptr/README.md b/src/third_party/boost-1.69.0/libs/smart_ptr/README.md
index 1301e79c437..1301e79c437 100644
--- a/src/third_party/boost-1.68.0/libs/smart_ptr/README.md
+++ b/src/third_party/boost-1.69.0/libs/smart_ptr/README.md
diff --git a/src/third_party/boost-1.68.0/libs/smart_ptr/extras/src/sp_collector.cpp b/src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_collector.cpp
index bb69ae88bdc..bb69ae88bdc 100644
--- a/src/third_party/boost-1.68.0/libs/smart_ptr/extras/src/sp_collector.cpp
+++ b/src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_collector.cpp
diff --git a/src/third_party/boost-1.68.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp b/src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp
index 31939363bad..31939363bad 100644
--- a/src/third_party/boost-1.68.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp
+++ b/src/third_party/boost-1.69.0/libs/smart_ptr/extras/src/sp_debug_hooks.cpp
diff --git a/src/third_party/boost-1.69.0/libs/system/src/error_code.cpp b/src/third_party/boost-1.69.0/libs/system/src/error_code.cpp
new file mode 100644
index 00000000000..b86a38c589d
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/system/src/error_code.cpp
@@ -0,0 +1,31 @@
+// error_code stub implementation, for compatibility only
+
+// Copyright Beman Dawes 2002, 2006
+// Copyright Peter Dimov 2018
+
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+// See library home page at http://www.boost.org/libs/system
+
+//----------------------------------------------------------------------------//
+
+// define BOOST_SYSTEM_SOURCE so that <boost/system/config.hpp> knows
+// the library is being built (possibly exporting rather than importing code)
+#define BOOST_SYSTEM_SOURCE
+
+#include <boost/system/config.hpp>
+
+namespace boost
+{
+
+namespace system
+{
+
+BOOST_SYSTEM_DECL void dummy_exported_function()
+{
+}
+
+} // namespace system
+
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/future.cpp b/src/third_party/boost-1.69.0/libs/thread/src/future.cpp
new file mode 100644
index 00000000000..a477e709ac2
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/thread/src/future.cpp
@@ -0,0 +1,64 @@
+// (C) Copyright 2012 Vicente J. Botet Escriba
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+
+#ifndef BOOST_NO_EXCEPTIONS
+
+#include <boost/thread/futures/future_error_code.hpp>
+#include <string>
+
+namespace boost
+{
+
+ namespace thread_detail
+ {
+
+ class future_error_category :
+ public boost::system::error_category
+ {
+ public:
+ virtual const char* name() const BOOST_NOEXCEPT;
+ virtual std::string message(int ev) const;
+ };
+
+ const char*
+ future_error_category::name() const BOOST_NOEXCEPT
+ {
+ return "future";
+ }
+
+ std::string
+ future_error_category::message(int ev) const
+ {
+ switch (BOOST_SCOPED_ENUM_NATIVE(future_errc)(ev))
+ {
+ case future_errc::broken_promise:
+ return std::string("The associated promise has been destructed prior "
+ "to the associated state becoming ready.");
+ case future_errc::future_already_retrieved:
+ return std::string("The future has already been retrieved from "
+ "the promise or packaged_task.");
+ case future_errc::promise_already_satisfied:
+ return std::string("The state of the promise has already been set.");
+ case future_errc::no_state:
+ return std::string("Operation not permitted on an object without "
+ "an associated state.");
+ }
+ return std::string("unspecified future_errc value\n");
+ }
+ future_error_category future_error_category_var;
+ }
+
+ BOOST_THREAD_DECL
+ const system::error_category&
+ future_category() BOOST_NOEXCEPT
+ {
+ return thread_detail::future_error_category_var;
+ }
+
+}
+#endif
+
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/pthread/once.cpp b/src/third_party/boost-1.69.0/libs/thread/src/pthread/once.cpp
index 2395cff6dd1..2395cff6dd1 100644
--- a/src/third_party/boost-1.68.0/libs/thread/src/pthread/once.cpp
+++ b/src/third_party/boost-1.69.0/libs/thread/src/pthread/once.cpp
diff --git a/src/third_party/boost-1.68.0/libs/thread/src/pthread/once_atomic.cpp b/src/third_party/boost-1.69.0/libs/thread/src/pthread/once_atomic.cpp
index 595ad7f1b3d..595ad7f1b3d 100644
--- a/src/third_party/boost-1.68.0/libs/thread/src/pthread/once_atomic.cpp
+++ b/src/third_party/boost-1.69.0/libs/thread/src/pthread/once_atomic.cpp
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/pthread/thread.cpp b/src/third_party/boost-1.69.0/libs/thread/src/pthread/thread.cpp
new file mode 100644
index 00000000000..1b76570bbae
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/thread/src/pthread/thread.cpp
@@ -0,0 +1,796 @@
+// Copyright (C) 2001-2003
+// William E. Kempf
+// Copyright (C) 2007-8 Anthony Williams
+// (C) Copyright 2011-2012 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+
+#include <boost/thread/thread_only.hpp>
+#if defined BOOST_THREAD_USES_DATETIME
+#include <boost/thread/xtime.hpp>
+#endif
+#include <boost/thread/condition_variable.hpp>
+#include <boost/thread/locks.hpp>
+#include <boost/thread/once.hpp>
+#include <boost/thread/tss.hpp>
+#include <boost/thread/future.hpp>
+
+#ifdef __GLIBC__
+#include <sys/sysinfo.h>
+#elif defined(__APPLE__) || defined(__FreeBSD__)
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#elif defined BOOST_HAS_UNISTD_H
+#include <unistd.h>
+#endif
+
+#if defined(__VXWORKS__)
+#include <vxCpuLib.h>
+#endif
+
+#include <boost/algorithm/string/split.hpp>
+#include <boost/algorithm/string/trim.hpp>
+#include <boost/lexical_cast.hpp>
+
+#include <fstream>
+#include <string>
+#include <set>
+#include <vector>
+#include <string.h> // memcmp.
+
+namespace boost
+{
+ namespace detail
+ {
+ thread_data_base::~thread_data_base()
+ {
+ for (notify_list_t::iterator i = notify.begin(), e = notify.end();
+ i != e; ++i)
+ {
+ i->second->unlock();
+ i->first->notify_all();
+ }
+//#ifndef BOOST_NO_EXCEPTIONS
+ for (async_states_t::iterator i = async_states_.begin(), e = async_states_.end();
+ i != e; ++i)
+ {
+ (*i)->notify_deferred();
+ }
+//#endif
+ }
+
+ struct thread_exit_callback_node
+ {
+ boost::detail::thread_exit_function_base* func;
+ thread_exit_callback_node* next;
+
+ thread_exit_callback_node(boost::detail::thread_exit_function_base* func_,
+ thread_exit_callback_node* next_):
+ func(func_),next(next_)
+ {}
+ };
+
+ namespace
+ {
+#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+ boost::once_flag current_thread_tls_init_flag;
+#else
+ boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT;
+#endif
+ pthread_key_t current_thread_tls_key;
+
+ extern "C"
+ {
+ static void tls_destructor(void* data)
+ {
+ //boost::detail::thread_data_base* thread_info=static_cast<boost::detail::thread_data_base*>(data);
+ boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(data)->shared_from_this();
+
+ if(thread_info)
+ {
+ while(!thread_info->tss_data.empty() || thread_info->thread_exit_callbacks)
+ {
+
+ while(thread_info->thread_exit_callbacks)
+ {
+ detail::thread_exit_callback_node* const current_node=thread_info->thread_exit_callbacks;
+ thread_info->thread_exit_callbacks=current_node->next;
+ if(current_node->func)
+ {
+ (*current_node->func)();
+ delete current_node->func;
+ }
+ delete current_node;
+ }
+ while (!thread_info->tss_data.empty())
+ {
+ std::map<void const*,detail::tss_data_node>::iterator current
+ = thread_info->tss_data.begin();
+ if(current->second.func && (current->second.value!=0))
+ {
+ (*current->second.func)(current->second.value);
+ }
+ thread_info->tss_data.erase(current);
+ }
+ }
+ thread_info->self.reset();
+ }
+ }
+ }
+
+#if defined BOOST_THREAD_PATCH
+ struct delete_current_thread_tls_key_on_dlclose_t
+ {
+ delete_current_thread_tls_key_on_dlclose_t()
+ {
+ }
+ ~delete_current_thread_tls_key_on_dlclose_t()
+ {
+ const boost::once_flag uninitialized = BOOST_ONCE_INIT;
+ if (memcmp(&current_thread_tls_init_flag, &uninitialized, sizeof(boost::once_flag)))
+ {
+ void* data = pthread_getspecific(current_thread_tls_key);
+ if (data)
+ tls_destructor(data);
+ pthread_key_delete(current_thread_tls_key);
+ }
+ }
+ };
+ delete_current_thread_tls_key_on_dlclose_t delete_current_thread_tls_key_on_dlclose;
+#endif
+ void create_current_thread_tls_key()
+ {
+ BOOST_VERIFY(!pthread_key_create(&current_thread_tls_key,&tls_destructor));
+ }
+ }
+
+ boost::detail::thread_data_base* get_current_thread_data()
+ {
+ boost::call_once(current_thread_tls_init_flag,&create_current_thread_tls_key);
+ return (boost::detail::thread_data_base*)pthread_getspecific(current_thread_tls_key);
+ }
+
+ void set_current_thread_data(detail::thread_data_base* new_data)
+ {
+ boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
+ BOOST_VERIFY(!pthread_setspecific(current_thread_tls_key,new_data));
+ }
+ }
+
+ namespace
+ {
+ extern "C"
+ {
+ static void* thread_proxy(void* param)
+ {
+ //boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(param)->self;
+ boost::detail::thread_data_ptr thread_info = static_cast<boost::detail::thread_data_base*>(param)->shared_from_this();
+ thread_info->self.reset();
+ detail::set_current_thread_data(thread_info.get());
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ BOOST_TRY
+ {
+#endif
+ thread_info->run();
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+
+ }
+ BOOST_CATCH (thread_interrupted const&)
+ {
+ }
+// Removed as it stops the debugger identifying the cause of the exception
+// Unhandled exceptions still cause the application to terminate
+// BOOST_CATCH(...)
+// {
+// throw;
+//
+// std::terminate();
+// }
+ BOOST_CATCH_END
+#endif
+ detail::tls_destructor(thread_info.get());
+ detail::set_current_thread_data(0);
+ boost::lock_guard<boost::mutex> lock(thread_info->data_mutex);
+ thread_info->done=true;
+ thread_info->done_condition.notify_all();
+
+ return 0;
+ }
+ }
+ }
+ namespace detail
+ {
+ struct externally_launched_thread:
+ detail::thread_data_base
+ {
+ externally_launched_thread()
+ {
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ interrupt_enabled=false;
+#endif
+ }
+ ~externally_launched_thread() {
+ BOOST_ASSERT(notify.empty());
+ notify.clear();
+//#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_ASSERT(async_states_.empty());
+ async_states_.clear();
+//#endif
+ }
+ void run()
+ {}
+ void notify_all_at_thread_exit(condition_variable*, mutex*)
+ {}
+
+ private:
+ externally_launched_thread(externally_launched_thread&);
+ void operator=(externally_launched_thread&);
+ };
+
+ thread_data_base* make_external_thread_data()
+ {
+ thread_data_base* const me(detail::heap_new<externally_launched_thread>());
+ me->self.reset(me);
+ set_current_thread_data(me);
+ return me;
+ }
+
+
+ thread_data_base* get_or_make_current_thread_data()
+ {
+ thread_data_base* current_thread_data(get_current_thread_data());
+ if(!current_thread_data)
+ {
+ current_thread_data=make_external_thread_data();
+ }
+ return current_thread_data;
+ }
+
+ }
+
+
+ thread::thread() BOOST_NOEXCEPT
+ {}
+
+ bool thread::start_thread_noexcept()
+ {
+ thread_info->self=thread_info;
+ int const res = pthread_create(&thread_info->thread_handle, 0, &thread_proxy, thread_info.get());
+ if (res != 0)
+ {
+ thread_info->self.reset();
+ return false;
+ }
+ return true;
+ }
+
+ bool thread::start_thread_noexcept(const attributes& attr)
+ {
+ thread_info->self=thread_info;
+ const attributes::native_handle_type* h = attr.native_handle();
+ int res = pthread_create(&thread_info->thread_handle, h, &thread_proxy, thread_info.get());
+ if (res != 0)
+ {
+ thread_info->self.reset();
+ return false;
+ }
+ int detached_state;
+ res = pthread_attr_getdetachstate(h, &detached_state);
+ if (res != 0)
+ {
+ thread_info->self.reset();
+ return false;
+ }
+ if (PTHREAD_CREATE_DETACHED==detached_state)
+ {
+ detail::thread_data_ptr local_thread_info;
+ thread_info.swap(local_thread_info);
+
+ if(local_thread_info)
+ {
+ //lock_guard<mutex> lock(local_thread_info->data_mutex);
+ if(!local_thread_info->join_started)
+ {
+ //BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle));
+ local_thread_info->join_started=true;
+ local_thread_info->joined=true;
+ }
+ }
+ }
+ return true;
+ }
+
+
+
+ detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
+ {
+ return thread_info;
+ }
+
+ bool thread::join_noexcept()
+ {
+ detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+ if(local_thread_info)
+ {
+ bool do_join=false;
+
+ {
+ unique_lock<mutex> lock(local_thread_info->data_mutex);
+ while(!local_thread_info->done)
+ {
+ local_thread_info->done_condition.wait(lock);
+ }
+ do_join=!local_thread_info->join_started;
+
+ if(do_join)
+ {
+ local_thread_info->join_started=true;
+ }
+ else
+ {
+ while(!local_thread_info->joined)
+ {
+ local_thread_info->done_condition.wait(lock);
+ }
+ }
+ }
+ if(do_join)
+ {
+ void* result=0;
+ BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result));
+ lock_guard<mutex> lock(local_thread_info->data_mutex);
+ local_thread_info->joined=true;
+ local_thread_info->done_condition.notify_all();
+ }
+
+ if(thread_info==local_thread_info)
+ {
+ thread_info.reset();
+ }
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ bool thread::do_try_join_until_noexcept(detail::internal_platform_timepoint const &timeout, bool& res)
+ {
+ detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+ if(local_thread_info)
+ {
+ bool do_join=false;
+
+ {
+ unique_lock<mutex> lock(local_thread_info->data_mutex);
+ while(!local_thread_info->done)
+ {
+ if(!local_thread_info->done_condition.do_wait_until(lock,timeout)) break; // timeout occurred
+ }
+ if(!local_thread_info->done)
+ {
+ res=false;
+ return true;
+ }
+ do_join=!local_thread_info->join_started;
+
+ if(do_join)
+ {
+ local_thread_info->join_started=true;
+ }
+ else
+ {
+ while(!local_thread_info->joined)
+ {
+ local_thread_info->done_condition.wait(lock);
+ }
+ }
+ }
+ if(do_join)
+ {
+ void* result=0;
+ BOOST_VERIFY(!pthread_join(local_thread_info->thread_handle,&result));
+ lock_guard<mutex> lock(local_thread_info->data_mutex);
+ local_thread_info->joined=true;
+ local_thread_info->done_condition.notify_all();
+ }
+
+ if(thread_info==local_thread_info)
+ {
+ thread_info.reset();
+ }
+ res=true;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ bool thread::joinable() const BOOST_NOEXCEPT
+ {
+ return (get_thread_info)()?true:false;
+ }
+
+
+ void thread::detach()
+ {
+ detail::thread_data_ptr local_thread_info;
+ thread_info.swap(local_thread_info);
+
+ if(local_thread_info)
+ {
+ lock_guard<mutex> lock(local_thread_info->data_mutex);
+ if(!local_thread_info->join_started)
+ {
+ BOOST_VERIFY(!pthread_detach(local_thread_info->thread_handle));
+ local_thread_info->join_started=true;
+ local_thread_info->joined=true;
+ }
+ }
+ }
+
+ namespace this_thread
+ {
+ namespace no_interruption_point
+ {
+ namespace hidden
+ {
+ void BOOST_THREAD_DECL sleep_for_internal(const detail::platform_duration& ts)
+ {
+ if (ts > detail::platform_duration::zero())
+ {
+ // Use pthread_delay_np or nanosleep whenever possible here in the no_interruption_point
+ // namespace because they do not provide an interruption point.
+ # if defined(BOOST_HAS_PTHREAD_DELAY_NP)
+ # if defined(__IBMCPP__) || defined(_AIX)
+ BOOST_VERIFY(!pthread_delay_np(const_cast<timespec*>(&ts.getTs())));
+ # else
+ BOOST_VERIFY(!pthread_delay_np(&ts.getTs()));
+ # endif
+ # elif defined(BOOST_HAS_NANOSLEEP)
+ nanosleep(&ts.getTs(), 0);
+ # else
+ // This should never be reached due to BOOST_THREAD_SLEEP_FOR_IS_STEADY
+ # endif
+ }
+ }
+ }
+ }
+
+ void yield() BOOST_NOEXCEPT
+ {
+# if defined(BOOST_HAS_SCHED_YIELD)
+ BOOST_VERIFY(!sched_yield());
+# elif defined(BOOST_HAS_PTHREAD_YIELD)
+ BOOST_VERIFY(!pthread_yield());
+//# elif defined BOOST_THREAD_USES_DATETIME
+// ::boost::xtime xt;
+// xtime_get(&xt, TIME_UTC_);
+// sleep(xt);
+// sleep_for(chrono::milliseconds(0));
+# else
+ mutex mx;
+ unique_lock<mutex> lock(mx);
+ condition_variable cond;
+ cond.do_wait_until(lock, detail::internal_platform_clock::now());
+# endif
+ }
+ }
+ unsigned thread::hardware_concurrency() BOOST_NOEXCEPT
+ {
+#if defined(PTW32_VERSION) || defined(__hpux)
+ return pthread_num_processors_np();
+#elif defined(__APPLE__) || defined(__FreeBSD__)
+ int count;
+ size_t size=sizeof(count);
+ return sysctlbyname("hw.ncpu",&count,&size,NULL,0)?0:count;
+#elif defined(BOOST_HAS_UNISTD_H) && defined(_SC_NPROCESSORS_ONLN)
+ int const count=sysconf(_SC_NPROCESSORS_ONLN);
+ return (count>0)?count:0;
+#elif defined(__VXWORKS__)
+ cpuset_t set = ::vxCpuEnabledGet();
+ #ifdef __DCC__
+ int i;
+ for( i = 0; set; ++i)
+ {
+ set &= set -1;
+ }
+ return(i);
+ #else
+ return (__builtin_popcount(set) );
+ #endif
+#elif defined(__GLIBC__)
+ return get_nprocs();
+#else
+ return 0;
+#endif
+ }
+
+ unsigned thread::physical_concurrency() BOOST_NOEXCEPT
+ {
+#ifdef __linux__
+ try {
+ using namespace std;
+
+ ifstream proc_cpuinfo ("/proc/cpuinfo");
+
+ const string physical_id("physical id"), core_id("core id");
+
+ typedef std::pair<unsigned, unsigned> core_entry; // [physical ID, core id]
+
+ std::set<core_entry> cores;
+
+ core_entry current_core_entry;
+
+ string line;
+ while ( getline(proc_cpuinfo, line) ) {
+ if (line.empty())
+ continue;
+
+ vector<string> key_val(2);
+ boost::split(key_val, line, boost::is_any_of(":"));
+
+ if (key_val.size() != 2)
+ return hardware_concurrency();
+
+ string key = key_val[0];
+ string value = key_val[1];
+ boost::trim(key);
+ boost::trim(value);
+
+ if (key == physical_id) {
+ current_core_entry.first = boost::lexical_cast<unsigned>(value);
+ continue;
+ }
+
+ if (key == core_id) {
+ current_core_entry.second = boost::lexical_cast<unsigned>(value);
+ cores.insert(current_core_entry);
+ continue;
+ }
+ }
+ // Fall back to hardware_concurrency() in case
+ // /proc/cpuinfo is formatted differently than we expect.
+ return cores.size() != 0 ? cores.size() : hardware_concurrency();
+ } catch(...) {
+ return hardware_concurrency();
+ }
+#elif defined(__APPLE__)
+ int count;
+ size_t size=sizeof(count);
+ return sysctlbyname("hw.physicalcpu",&count,&size,NULL,0)?0:count;
+#else
+ return hardware_concurrency();
+#endif
+ }
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ void thread::interrupt()
+ {
+ detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+ if(local_thread_info)
+ {
+ lock_guard<mutex> lk(local_thread_info->data_mutex);
+ local_thread_info->interrupt_requested=true;
+ if(local_thread_info->current_cond)
+ {
+ boost::pthread::pthread_mutex_scoped_lock internal_lock(local_thread_info->cond_mutex);
+ BOOST_VERIFY(!pthread_cond_broadcast(local_thread_info->current_cond));
+ }
+ }
+ }
+
+ bool thread::interruption_requested() const BOOST_NOEXCEPT
+ {
+ detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+ if(local_thread_info)
+ {
+ lock_guard<mutex> lk(local_thread_info->data_mutex);
+ return local_thread_info->interrupt_requested;
+ }
+ else
+ {
+ return false;
+ }
+ }
+#endif
+
+ thread::native_handle_type thread::native_handle()
+ {
+ detail::thread_data_ptr const local_thread_info=(get_thread_info)();
+ if(local_thread_info)
+ {
+ lock_guard<mutex> lk(local_thread_info->data_mutex);
+ return local_thread_info->thread_handle;
+ }
+ else
+ {
+ return pthread_t();
+ }
+ }
+
+
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ namespace this_thread
+ {
+ void interruption_point()
+ {
+#ifndef BOOST_NO_EXCEPTIONS
+ boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
+ if(thread_info && thread_info->interrupt_enabled)
+ {
+ lock_guard<mutex> lg(thread_info->data_mutex);
+ if(thread_info->interrupt_requested)
+ {
+ thread_info->interrupt_requested=false;
+ throw thread_interrupted();
+ }
+ }
+#endif
+ }
+
+ bool interruption_enabled() BOOST_NOEXCEPT
+ {
+ boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
+ return thread_info && thread_info->interrupt_enabled;
+ }
+
+ bool interruption_requested() BOOST_NOEXCEPT
+ {
+ boost::detail::thread_data_base* const thread_info=detail::get_current_thread_data();
+ if(!thread_info)
+ {
+ return false;
+ }
+ else
+ {
+ lock_guard<mutex> lg(thread_info->data_mutex);
+ return thread_info->interrupt_requested;
+ }
+ }
+
+ disable_interruption::disable_interruption() BOOST_NOEXCEPT:
+ interruption_was_enabled(interruption_enabled())
+ {
+ if(interruption_was_enabled)
+ {
+ detail::get_current_thread_data()->interrupt_enabled=false;
+ }
+ }
+
+ disable_interruption::~disable_interruption() BOOST_NOEXCEPT
+ {
+ if(detail::get_current_thread_data())
+ {
+ detail::get_current_thread_data()->interrupt_enabled=interruption_was_enabled;
+ }
+ }
+
+ restore_interruption::restore_interruption(disable_interruption& d) BOOST_NOEXCEPT
+ {
+ if(d.interruption_was_enabled)
+ {
+ detail::get_current_thread_data()->interrupt_enabled=true;
+ }
+ }
+
+ restore_interruption::~restore_interruption() BOOST_NOEXCEPT
+ {
+ if(detail::get_current_thread_data())
+ {
+ detail::get_current_thread_data()->interrupt_enabled=false;
+ }
+ }
+ }
+#endif
+
+ namespace detail
+ {
+ void add_thread_exit_function(thread_exit_function_base* func)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ thread_exit_callback_node* const new_node=
+ heap_new<thread_exit_callback_node>(func,current_thread_data->thread_exit_callbacks);
+ current_thread_data->thread_exit_callbacks=new_node;
+ }
+
+ tss_data_node* find_tss_data(void const* key)
+ {
+ detail::thread_data_base* const current_thread_data(get_current_thread_data());
+ if(current_thread_data)
+ {
+ std::map<void const*,tss_data_node>::iterator current_node=
+ current_thread_data->tss_data.find(key);
+ if(current_node!=current_thread_data->tss_data.end())
+ {
+ return &current_node->second;
+ }
+ }
+ return 0;
+ }
+
+ void* get_tss_data(void const* key)
+ {
+ if(tss_data_node* const current_node=find_tss_data(key))
+ {
+ return current_node->value;
+ }
+ return 0;
+ }
+
+ void add_new_tss_node(void const* key,
+ boost::shared_ptr<tss_cleanup_function> func,
+ void* tss_data)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data)));
+ }
+
+ void erase_tss_node(void const* key)
+ {
+ detail::thread_data_base* const current_thread_data(get_current_thread_data());
+ if(current_thread_data)
+ {
+ current_thread_data->tss_data.erase(key);
+ }
+ }
+
+ void set_tss_data(void const* key,
+ boost::shared_ptr<tss_cleanup_function> func,
+ void* tss_data,bool cleanup_existing)
+ {
+ if(tss_data_node* const current_node=find_tss_data(key))
+ {
+ if(cleanup_existing && current_node->func && (current_node->value!=0))
+ {
+ (*current_node->func)(current_node->value);
+ }
+ if(func || (tss_data!=0))
+ {
+ current_node->func=func;
+ current_node->value=tss_data;
+ }
+ else
+ {
+ erase_tss_node(key);
+ }
+ }
+ else if(func || (tss_data!=0))
+ {
+ add_new_tss_node(key,func,tss_data);
+ }
+ }
+ }
+
+ BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
+ {
+ detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
+ if(current_thread_data)
+ {
+ current_thread_data->notify_all_at_thread_exit(&cond, lk.release());
+ }
+ }
+
+//#ifndef BOOST_NO_EXCEPTIONS
+namespace detail {
+
+ void BOOST_THREAD_DECL make_ready_at_thread_exit(shared_ptr<shared_state_base> as)
+ {
+ detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
+ if(current_thread_data)
+ {
+ current_thread_data->make_ready_at_thread_exit(as);
+ }
+ }
+}
+//#endif
+
+
+}
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/tss_null.cpp b/src/third_party/boost-1.69.0/libs/thread/src/tss_null.cpp
new file mode 100644
index 00000000000..e5e81512169
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/thread/src/tss_null.cpp
@@ -0,0 +1,38 @@
+// (C) Copyright Michael Glassford 2004.
+// (C) Copyright 2007 Anthony Williams
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/config.hpp>
+
+#if defined(BOOST_THREAD_WIN32) && (defined(BOOST_THREAD_BUILD_LIB) || defined(BOOST_THREAD_TEST) || defined(UNDER_CE)) && (!defined(_MSC_VER) || defined(UNDER_CE))
+
+namespace boost
+{
+ /*
+ This file is a "null" implementation of tss cleanup; it's
+ purpose is to to eliminate link errors in cases
+ where it is known that tss cleanup is not needed.
+ */
+
+ void tss_cleanup_implemented(void)
+ {
+ /*
+ This function's sole purpose is to cause a link error in cases where
+ automatic tss cleanup is not implemented by Boost.Threads as a
+ reminder that user code is responsible for calling the necessary
+ functions at the appropriate times (and for implementing an a
+ tss_cleanup_implemented() function to eliminate the linker's
+ missing symbol error).
+
+ If Boost.Threads later implements automatic tss cleanup in cases
+ where it currently doesn't (which is the plan), the duplicate
+ symbol error will warn the user that their custom solution is no
+ longer needed and can be removed.
+ */
+ }
+
+}
+
+#endif //defined(BOOST_THREAD_WIN32) && defined(BOOST_THREAD_BUILD_LIB) && !defined(_MSC_VER)
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/win32/thread.cpp b/src/third_party/boost-1.69.0/libs/thread/src/win32/thread.cpp
new file mode 100644
index 00000000000..8aceb114b4e
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/thread/src/win32/thread.cpp
@@ -0,0 +1,977 @@
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2007 David Deakins
+// (C) Copyright 2011-2018 Vicente J. Botet Escriba
+
+//#define BOOST_THREAD_VERSION 3
+
+#include <boost/winapi/config.hpp>
+#include <boost/thread/thread_only.hpp>
+#include <boost/thread/once.hpp>
+#include <boost/thread/tss.hpp>
+#include <boost/thread/condition_variable.hpp>
+#include <boost/thread/detail/tss_hooks.hpp>
+#include <boost/thread/future.hpp>
+#include <boost/assert.hpp>
+#include <boost/cstdint.hpp>
+#if defined BOOST_THREAD_USES_DATETIME
+#include <boost/date_time/posix_time/conversion.hpp>
+#include <boost/thread/thread_time.hpp>
+#endif
+#include <boost/thread/csbl/memory/unique_ptr.hpp>
+#include <memory>
+#include <algorithm>
+#ifndef UNDER_CE
+#include <process.h>
+#endif
+#include <stdio.h>
+#include <windows.h>
+#include <boost/predef/platform.h>
+
+#if BOOST_PLAT_WINDOWS_RUNTIME
+#include <mutex>
+#include <atomic>
+#include <Activation.h>
+#include <wrl\client.h>
+#include <wrl\event.h>
+#include <wrl\wrappers\corewrappers.h>
+#include <wrl\ftm.h>
+#include <windows.system.threading.h>
+#pragma comment(lib, "runtimeobject.lib")
+#endif
+
+namespace boost
+{
+ namespace detail
+ {
+ thread_data_base::~thread_data_base()
+ {
+ for (notify_list_t::iterator i = notify.begin(), e = notify.end();
+ i != e; ++i)
+ {
+ i->second->unlock();
+ i->first->notify_all();
+ }
+//#ifndef BOOST_NO_EXCEPTIONS
+ for (async_states_t::iterator i = async_states_.begin(), e = async_states_.end();
+ i != e; ++i)
+ {
+ (*i)->notify_deferred();
+ }
+//#endif
+ }
+ }
+
+ namespace
+ {
+#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
+ boost::once_flag current_thread_tls_init_flag;
+#else
+ boost::once_flag current_thread_tls_init_flag=BOOST_ONCE_INIT;
+#endif
+#if defined(UNDER_CE)
+ // Windows CE does not define the TLS_OUT_OF_INDEXES constant.
+#define TLS_OUT_OF_INDEXES 0xFFFFFFFF
+#endif
+#if !BOOST_PLAT_WINDOWS_RUNTIME
+ DWORD current_thread_tls_key=TLS_OUT_OF_INDEXES;
+#else
+ __declspec(thread) boost::detail::thread_data_base* current_thread_data_base;
+#endif
+
+ void create_current_thread_tls_key()
+ {
+ tss_cleanup_implemented(); // if anyone uses TSS, we need the cleanup linked in
+#if !BOOST_PLAT_WINDOWS_RUNTIME
+ current_thread_tls_key=TlsAlloc();
+ BOOST_ASSERT(current_thread_tls_key!=TLS_OUT_OF_INDEXES);
+#endif
+ }
+
+ void cleanup_tls_key()
+ {
+#if !BOOST_PLAT_WINDOWS_RUNTIME
+ if(current_thread_tls_key!=TLS_OUT_OF_INDEXES)
+ {
+ TlsFree(current_thread_tls_key);
+ current_thread_tls_key=TLS_OUT_OF_INDEXES;
+ }
+#endif
+ }
+
+ void set_current_thread_data(detail::thread_data_base* new_data)
+ {
+ boost::call_once(current_thread_tls_init_flag,create_current_thread_tls_key);
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ current_thread_data_base = new_data;
+#else
+ if (current_thread_tls_key != TLS_OUT_OF_INDEXES)
+ {
+ BOOST_VERIFY(TlsSetValue(current_thread_tls_key, new_data));
+ }
+ else
+ {
+ BOOST_VERIFY(false);
+ //boost::throw_exception(thread_resource_error());
+ }
+#endif
+ }
+ }
+
+ namespace detail
+ {
+ thread_data_base* get_current_thread_data()
+ {
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ return current_thread_data_base;
+#else
+ if (current_thread_tls_key == TLS_OUT_OF_INDEXES)
+ {
+ return 0;
+ }
+ return (detail::thread_data_base*)TlsGetValue(current_thread_tls_key);
+#endif
+ }
+ }
+
+ namespace
+ {
+#ifndef BOOST_HAS_THREADEX
+// Windows CE doesn't define _beginthreadex
+
+ struct ThreadProxyData
+ {
+ typedef unsigned (__stdcall* func)(void*);
+ func start_address_;
+ void* arglist_;
+ ThreadProxyData(func start_address,void* arglist) : start_address_(start_address), arglist_(arglist) {}
+ };
+
+ DWORD WINAPI ThreadProxy(LPVOID args)
+ {
+ boost::csbl::unique_ptr<ThreadProxyData> data(reinterpret_cast<ThreadProxyData*>(args));
+ DWORD ret=data->start_address_(data->arglist_);
+ return ret;
+ }
+
+ inline uintptr_t _beginthreadex(void* security, unsigned stack_size, unsigned (__stdcall* start_address)(void*),
+ void* arglist, unsigned initflag, unsigned* thrdaddr)
+ {
+ DWORD threadID;
+ ThreadProxyData* data = new ThreadProxyData(start_address,arglist);
+ HANDLE hthread=CreateThread(static_cast<LPSECURITY_ATTRIBUTES>(security),stack_size,ThreadProxy,
+ data,initflag,&threadID);
+ if (hthread==0) {
+ delete data;
+ return 0;
+ }
+ *thrdaddr=threadID;
+ return reinterpret_cast<uintptr_t const>(hthread);
+ }
+
+#endif
+
+ }
+
+ namespace detail
+ {
+ struct thread_exit_callback_node
+ {
+ boost::detail::thread_exit_function_base* func;
+ thread_exit_callback_node* next;
+
+ thread_exit_callback_node(boost::detail::thread_exit_function_base* func_,
+ thread_exit_callback_node* next_):
+ func(func_),next(next_)
+ {}
+ };
+
+ }
+
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ namespace detail
+ {
+ std::atomic_uint threadCount;
+
+ bool win32::scoped_winrt_thread::start(thread_func address, void *parameter, unsigned int *thrdId)
+ {
+ Microsoft::WRL::ComPtr<ABI::Windows::System::Threading::IThreadPoolStatics> threadPoolFactory;
+ HRESULT hr = ::Windows::Foundation::GetActivationFactory(
+ Microsoft::WRL::Wrappers::HStringReference(RuntimeClass_Windows_System_Threading_ThreadPool).Get(),
+ &threadPoolFactory);
+ if (hr != S_OK)
+ {
+ return false;
+ }
+
+ // Create event for tracking work item completion.
+ *thrdId = ++threadCount;
+ handle completionHandle = CreateEventExW(NULL, NULL, 0, EVENT_ALL_ACCESS);
+ if (!completionHandle)
+ {
+ return false;
+ }
+ m_completionHandle = completionHandle;
+
+ // Create new work item.
+ Microsoft::WRL::ComPtr<ABI::Windows::System::Threading::IWorkItemHandler> workItem =
+ Microsoft::WRL::Callback<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>, ABI::Windows::System::Threading::IWorkItemHandler, Microsoft::WRL::FtmBase>>
+ ([address, parameter, completionHandle](ABI::Windows::Foundation::IAsyncAction *)
+ {
+ // Add a reference since we need to access the completionHandle after the thread_start_function.
+ // This is to handle cases where detach() was called and run_thread_exit_callbacks() would end
+ // up closing the handle.
+ ::boost::detail::thread_data_base* const thread_info(reinterpret_cast<::boost::detail::thread_data_base*>(parameter));
+ intrusive_ptr_add_ref(thread_info);
+
+ __try
+ {
+ address(parameter);
+ }
+ __finally
+ {
+ SetEvent(completionHandle);
+ intrusive_ptr_release(thread_info);
+ }
+ return S_OK;
+ });
+
+ // Schedule work item on the threadpool.
+ Microsoft::WRL::ComPtr<ABI::Windows::Foundation::IAsyncAction> asyncAction;
+ hr = threadPoolFactory->RunWithPriorityAndOptionsAsync(
+ workItem.Get(),
+ ABI::Windows::System::Threading::WorkItemPriority_Normal,
+ ABI::Windows::System::Threading::WorkItemOptions_TimeSliced,
+ &asyncAction);
+ return hr == S_OK;
+ }
+ }
+#endif
+
+ namespace
+ {
+ void run_thread_exit_callbacks()
+ {
+ detail::thread_data_ptr current_thread_data(detail::get_current_thread_data(),false);
+ if(current_thread_data)
+ {
+ while(! current_thread_data->tss_data.empty() || current_thread_data->thread_exit_callbacks)
+ {
+ while(current_thread_data->thread_exit_callbacks)
+ {
+ detail::thread_exit_callback_node* const current_node=current_thread_data->thread_exit_callbacks;
+ current_thread_data->thread_exit_callbacks=current_node->next;
+ if(current_node->func)
+ {
+ (*current_node->func)();
+ boost::detail::heap_delete(current_node->func);
+ }
+ boost::detail::heap_delete(current_node);
+ }
+ while (!current_thread_data->tss_data.empty())
+ {
+ std::map<void const*,detail::tss_data_node>::iterator current
+ = current_thread_data->tss_data.begin();
+ if(current->second.func && (current->second.value!=0))
+ {
+ (*current->second.func)(current->second.value);
+ }
+ current_thread_data->tss_data.erase(current);
+ }
+ }
+ set_current_thread_data(0);
+ }
+ }
+
+ unsigned __stdcall thread_start_function(void* param)
+ {
+ detail::thread_data_base* const thread_info(reinterpret_cast<detail::thread_data_base*>(param));
+ set_current_thread_data(thread_info);
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ BOOST_TRY
+ {
+#endif
+ thread_info->run();
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ }
+ BOOST_CATCH(thread_interrupted const&)
+ {
+ }
+ // Unhandled exceptions still cause the application to terminate
+ BOOST_CATCH_END
+#endif
+ run_thread_exit_callbacks();
+ return 0;
+ }
+ }
+
+ thread::thread() BOOST_NOEXCEPT
+ {}
+
+ bool thread::start_thread_noexcept()
+ {
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ intrusive_ptr_add_ref(thread_info.get());
+ if (!thread_info->thread_handle.start(&thread_start_function, thread_info.get(), &thread_info->id))
+ {
+ intrusive_ptr_release(thread_info.get());
+ return false;
+ }
+ return true;
+#else
+ uintptr_t const new_thread=_beginthreadex(0,0,&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id);
+ if(!new_thread)
+ {
+ return false;
+ }
+ intrusive_ptr_add_ref(thread_info.get());
+ thread_info->thread_handle=(detail::win32::handle)(new_thread);
+ ResumeThread(thread_info->thread_handle);
+ return true;
+#endif
+ }
+
+ bool thread::start_thread_noexcept(const attributes& attr)
+ {
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ // Stack size isn't supported with Windows Runtime.
+ attr;
+ return start_thread_noexcept();
+#else
+ uintptr_t const new_thread=_beginthreadex(0,static_cast<unsigned int>(attr.get_stack_size()),&thread_start_function,thread_info.get(),
+ CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION, &thread_info->id);
+ if(!new_thread)
+ {
+ return false;
+ }
+ intrusive_ptr_add_ref(thread_info.get());
+ thread_info->thread_handle=(detail::win32::handle)(new_thread);
+ ResumeThread(thread_info->thread_handle);
+ return true;
+#endif
+ }
+
+ thread::thread(detail::thread_data_ptr data):
+ thread_info(data)
+ {}
+
+ namespace
+ {
+ struct externally_launched_thread:
+ detail::thread_data_base
+ {
+ externally_launched_thread()
+ {
+ ++count;
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ interruption_enabled=false;
+#endif
+ }
+ ~externally_launched_thread() {
+ BOOST_ASSERT(notify.empty());
+ notify.clear();
+//#ifndef BOOST_NO_EXCEPTIONS
+ BOOST_ASSERT(async_states_.empty());
+ async_states_.clear();
+//#endif
+ }
+
+ void run()
+ {}
+ void notify_all_at_thread_exit(condition_variable*, mutex*)
+ {}
+
+ private:
+ externally_launched_thread(externally_launched_thread&);
+ void operator=(externally_launched_thread&);
+ };
+
+ void make_external_thread_data()
+ {
+ externally_launched_thread* me=detail::heap_new<externally_launched_thread>();
+ BOOST_TRY
+ {
+ set_current_thread_data(me);
+ }
+ BOOST_CATCH(...)
+ {
+ detail::heap_delete(me);
+ BOOST_RETHROW
+ }
+ BOOST_CATCH_END
+ }
+
+ detail::thread_data_base* get_or_make_current_thread_data()
+ {
+ detail::thread_data_base* current_thread_data(detail::get_current_thread_data());
+ if(!current_thread_data)
+ {
+ make_external_thread_data();
+ current_thread_data=detail::get_current_thread_data();
+ }
+ return current_thread_data;
+ }
+ }
+
+ thread::id thread::get_id() const BOOST_NOEXCEPT
+ {
+#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+ detail::thread_data_ptr local_thread_info=(get_thread_info)();
+ if(!local_thread_info)
+ {
+ return 0;
+ }
+ return local_thread_info->id;
+#else
+ return thread::id((get_thread_info)());
+#endif
+ }
+
+ bool thread::joinable() const BOOST_NOEXCEPT
+ {
+ detail::thread_data_ptr local_thread_info = (get_thread_info)();
+ if(!local_thread_info)
+ {
+ return false;
+ }
+ return true;
+ }
+ bool thread::join_noexcept()
+ {
+ detail::thread_data_ptr local_thread_info=(get_thread_info)();
+ if(local_thread_info)
+ {
+ this_thread::interruptible_wait(this->native_handle(), detail::internal_platform_timepoint::getMax());
+ release_handle();
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ bool thread::do_try_join_until_noexcept(detail::internal_platform_timepoint const &timeout, bool& res)
+ {
+ detail::thread_data_ptr local_thread_info=(get_thread_info)();
+ if(local_thread_info)
+ {
+ if(!this_thread::interruptible_wait(this->native_handle(), timeout))
+ {
+ res=false;
+ return true;
+ }
+ release_handle();
+ res=true;
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ void thread::detach()
+ {
+ release_handle();
+ }
+
+ void thread::release_handle()
+ {
+ thread_info=0;
+ }
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ void thread::interrupt()
+ {
+ detail::thread_data_ptr local_thread_info=(get_thread_info)();
+ if(local_thread_info)
+ {
+ local_thread_info->interrupt();
+ }
+ }
+
+ bool thread::interruption_requested() const BOOST_NOEXCEPT
+ {
+ detail::thread_data_ptr local_thread_info=(get_thread_info)();
+ return local_thread_info.get() && (winapi::WaitForSingleObjectEx(local_thread_info->interruption_handle,0,0)==0);
+ }
+
+#endif
+
+ unsigned thread::hardware_concurrency() BOOST_NOEXCEPT
+ {
+ detail::win32::system_info info;
+ detail::win32::get_system_info(&info);
+ return info.dwNumberOfProcessors;
+ }
+
+ unsigned thread::physical_concurrency() BOOST_NOEXCEPT
+ {
+ // a bit too strict: Windows XP with SP3 would be sufficient
+#if BOOST_PLAT_WINDOWS_RUNTIME \
+ || ( BOOST_USE_WINAPI_VERSION <= BOOST_WINAPI_VERSION_WINXP ) \
+ || ( ( defined(__MINGW32__) && !defined(__MINGW64__) ) && _WIN32_WINNT < 0x0600)
+ return 0;
+#else
+ unsigned cores = 0;
+ DWORD size = 0;
+
+ GetLogicalProcessorInformation(NULL, &size);
+ if (ERROR_INSUFFICIENT_BUFFER != GetLastError())
+ return 0;
+ const size_t Elements = size / sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION);
+
+ std::vector<SYSTEM_LOGICAL_PROCESSOR_INFORMATION> buffer(Elements);
+ if (GetLogicalProcessorInformation(&buffer.front(), &size) == FALSE)
+ return 0;
+
+
+ for (size_t i = 0; i < Elements; ++i) {
+ if (buffer[i].Relationship == RelationProcessorCore)
+ ++cores;
+ }
+ return cores;
+#endif
+ }
+
+ thread::native_handle_type thread::native_handle()
+ {
+ detail::thread_data_ptr local_thread_info=(get_thread_info)();
+ if(!local_thread_info)
+ {
+ return detail::win32::invalid_handle_value;
+ }
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ // There is no 'real' Win32 handle so we return a handle that at least can be waited on.
+ return local_thread_info->thread_handle.waitable_handle();
+#else
+ return (detail::win32::handle)local_thread_info->thread_handle;
+#endif
+ }
+
+ detail::thread_data_ptr thread::get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const
+ {
+ return thread_info;
+ }
+
+ namespace this_thread
+ {
+#ifndef UNDER_CE
+#if !BOOST_PLAT_WINDOWS_RUNTIME
+ namespace detail_
+ {
+ typedef struct _REASON_CONTEXT {
+ ULONG Version;
+ DWORD Flags;
+ union {
+ LPWSTR SimpleReasonString;
+ struct {
+ HMODULE LocalizedReasonModule;
+ ULONG LocalizedReasonId;
+ ULONG ReasonStringCount;
+ LPWSTR *ReasonStrings;
+ } Detailed;
+ } Reason;
+ } REASON_CONTEXT, *PREASON_CONTEXT;
+ typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG);
+ static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay)
+ {
+ return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine, lpArgToCompletionRoutine, FALSE);
+ }
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 6387) // MSVC sanitiser warns that GetModuleHandleA() might fail
+#endif
+ static inline setwaitabletimerex_t SetWaitableTimerEx()
+ {
+ static setwaitabletimerex_t setwaitabletimerex_impl;
+ if(setwaitabletimerex_impl)
+ return setwaitabletimerex_impl;
+ void (*addr)()=(void (*)()) GetProcAddress(
+#if !defined(BOOST_NO_ANSI_APIS)
+ GetModuleHandleA("KERNEL32.DLL"),
+#else
+ GetModuleHandleW(L"KERNEL32.DLL"),
+#endif
+ "SetWaitableTimerEx");
+ if(addr)
+ setwaitabletimerex_impl=(setwaitabletimerex_t) addr;
+ else
+ setwaitabletimerex_impl=&SetWaitableTimerEx_emulation;
+ return setwaitabletimerex_impl;
+ }
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+ }
+#endif
+#endif
+ bool interruptible_wait(detail::win32::handle handle_to_wait_for, detail::internal_platform_timepoint const &timeout)
+ {
+ detail::win32::handle handles[4]={0};
+ unsigned handle_count=0;
+ unsigned wait_handle_index=~0U;
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ unsigned interruption_index=~0U;
+#endif
+ unsigned timeout_index=~0U;
+ if(handle_to_wait_for!=detail::win32::invalid_handle_value)
+ {
+ wait_handle_index=handle_count;
+ handles[handle_count++]=handle_to_wait_for;
+ }
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ if(detail::get_current_thread_data() && detail::get_current_thread_data()->interruption_enabled)
+ {
+ interruption_index=handle_count;
+ handles[handle_count++]=detail::get_current_thread_data()->interruption_handle;
+ }
+#endif
+ detail::win32::handle_manager timer_handle;
+
+#ifndef UNDER_CE
+#if !BOOST_PLAT_WINDOWS_RUNTIME
+ // Preferentially use coalescing timers for better power consumption and timer accuracy
+ if(timeout != detail::internal_platform_timepoint::getMax())
+ {
+ boost::intmax_t const time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
+ timer_handle=CreateWaitableTimer(NULL,false,NULL);
+ if(timer_handle!=0)
+ {
+ ULONG tolerable=32; // Empirical testing shows Windows ignores this when <= 26
+ if(time_left_msec/20>tolerable) // 5%
+ tolerable=static_cast<ULONG>(time_left_msec/20);
+ LARGE_INTEGER due_time={{0,0}};
+ if(time_left_msec>0)
+ {
+ due_time.QuadPart=-(time_left_msec*10000); // negative indicates relative time
+ }
+ bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,NULL,tolerable)!=0;
+ if(set_time_succeeded)
+ {
+ timeout_index=handle_count;
+ handles[handle_count++]=timer_handle;
+ }
+ }
+ }
+#endif
+#endif
+
+ bool const using_timer=timeout_index!=~0u;
+ boost::intmax_t time_left_msec(INFINITE);
+ if(!using_timer && timeout != detail::internal_platform_timepoint::getMax())
+ {
+ time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
+ if(time_left_msec < 0)
+ {
+ time_left_msec = 0;
+ }
+ }
+
+ do
+ {
+ if(handle_count)
+ {
+ unsigned long const notified_index=winapi::WaitForMultipleObjectsEx(handle_count,handles,false,static_cast<DWORD>(time_left_msec), 0);
+ if(notified_index<handle_count)
+ {
+ if(notified_index==wait_handle_index)
+ {
+ return true;
+ }
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ else if(notified_index==interruption_index)
+ {
+ winapi::ResetEvent(detail::get_current_thread_data()->interruption_handle);
+ throw thread_interrupted();
+ }
+#endif
+ else if(notified_index==timeout_index)
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ detail::win32::sleep(static_cast<unsigned long>(time_left_msec));
+ }
+
+ if(!using_timer && timeout != detail::internal_platform_timepoint::getMax())
+ {
+ time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
+ }
+ }
+ while(time_left_msec == INFINITE || time_left_msec > 0);
+ return false;
+ }
+
+ namespace no_interruption_point
+ {
+ bool non_interruptible_wait(detail::win32::handle handle_to_wait_for, detail::internal_platform_timepoint const &timeout)
+ {
+ detail::win32::handle handles[3]={0};
+ unsigned handle_count=0;
+ unsigned wait_handle_index=~0U;
+ unsigned timeout_index=~0U;
+ if(handle_to_wait_for!=detail::win32::invalid_handle_value)
+ {
+ wait_handle_index=handle_count;
+ handles[handle_count++]=handle_to_wait_for;
+ }
+ detail::win32::handle_manager timer_handle;
+
+#ifndef UNDER_CE
+#if !BOOST_PLAT_WINDOWS_RUNTIME
+ // Preferentially use coalescing timers for better power consumption and timer accuracy
+ if(timeout != detail::internal_platform_timepoint::getMax())
+ {
+ boost::intmax_t const time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
+ timer_handle=CreateWaitableTimer(NULL,false,NULL);
+ if(timer_handle!=0)
+ {
+ ULONG tolerable=32; // Empirical testing shows Windows ignores this when <= 26
+ if(time_left_msec/20>tolerable) // 5%
+ tolerable=static_cast<ULONG>(time_left_msec/20);
+ LARGE_INTEGER due_time={{0,0}};
+ if(time_left_msec>0)
+ {
+ due_time.QuadPart=-(time_left_msec*10000); // negative indicates relative time
+ }
+ bool const set_time_succeeded=detail_::SetWaitableTimerEx()(timer_handle,&due_time,0,0,0,NULL,tolerable)!=0;
+ if(set_time_succeeded)
+ {
+ timeout_index=handle_count;
+ handles[handle_count++]=timer_handle;
+ }
+ }
+ }
+#endif
+#endif
+
+ bool const using_timer=timeout_index!=~0u;
+ boost::intmax_t time_left_msec(INFINITE);
+ if(!using_timer && timeout != detail::internal_platform_timepoint::getMax())
+ {
+ time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
+ if(time_left_msec < 0)
+ {
+ time_left_msec = 0;
+ }
+ }
+
+ do
+ {
+ if(handle_count)
+ {
+ unsigned long const notified_index=winapi::WaitForMultipleObjectsEx(handle_count,handles,false,static_cast<DWORD>(time_left_msec), 0);
+ if(notified_index<handle_count)
+ {
+ if(notified_index==wait_handle_index)
+ {
+ return true;
+ }
+ else if(notified_index==timeout_index)
+ {
+ return false;
+ }
+ }
+ }
+ else
+ {
+ detail::win32::sleep(static_cast<unsigned long>(time_left_msec));
+ }
+
+ if(!using_timer && timeout != detail::internal_platform_timepoint::getMax())
+ {
+ time_left_msec = (timeout - detail::internal_platform_clock::now()).getMs();
+ }
+ }
+ while(time_left_msec == INFINITE || time_left_msec > 0);
+ return false;
+ }
+ }
+
+ thread::id get_id() BOOST_NOEXCEPT
+ {
+#if defined BOOST_THREAD_PROVIDES_BASIC_THREAD_ID
+#if BOOST_PLAT_WINDOWS_RUNTIME
+ detail::thread_data_base* current_thread_data(detail::get_current_thread_data());
+ if (current_thread_data)
+ {
+ return current_thread_data->id;
+ }
+#endif
+ return winapi::GetCurrentThreadId();
+#else
+ return thread::id(get_or_make_current_thread_data());
+#endif
+ }
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ void interruption_point()
+ {
+ if(interruption_enabled() && interruption_requested())
+ {
+ winapi::ResetEvent(detail::get_current_thread_data()->interruption_handle);
+ throw thread_interrupted();
+ }
+ }
+
+ bool interruption_enabled() BOOST_NOEXCEPT
+ {
+ return detail::get_current_thread_data() && detail::get_current_thread_data()->interruption_enabled;
+ }
+
+ bool interruption_requested() BOOST_NOEXCEPT
+ {
+ return detail::get_current_thread_data() && (winapi::WaitForSingleObjectEx(detail::get_current_thread_data()->interruption_handle,0,0)==0);
+ }
+#endif
+
+ void yield() BOOST_NOEXCEPT
+ {
+ detail::win32::sleep(0);
+ }
+
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+ disable_interruption::disable_interruption() BOOST_NOEXCEPT:
+ interruption_was_enabled(interruption_enabled())
+ {
+ if(interruption_was_enabled)
+ {
+ detail::get_current_thread_data()->interruption_enabled=false;
+ }
+ }
+
+ disable_interruption::~disable_interruption() BOOST_NOEXCEPT
+ {
+ if(detail::get_current_thread_data())
+ {
+ detail::get_current_thread_data()->interruption_enabled=interruption_was_enabled;
+ }
+ }
+
+ restore_interruption::restore_interruption(disable_interruption& d) BOOST_NOEXCEPT
+ {
+ if(d.interruption_was_enabled)
+ {
+ detail::get_current_thread_data()->interruption_enabled=true;
+ }
+ }
+
+ restore_interruption::~restore_interruption() BOOST_NOEXCEPT
+ {
+ if(detail::get_current_thread_data())
+ {
+ detail::get_current_thread_data()->interruption_enabled=false;
+ }
+ }
+#endif
+ }
+
+ namespace detail
+ {
+ void add_thread_exit_function(thread_exit_function_base* func)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ thread_exit_callback_node* const new_node=
+ heap_new<thread_exit_callback_node>(
+ func,current_thread_data->thread_exit_callbacks);
+ current_thread_data->thread_exit_callbacks=new_node;
+ }
+
+ tss_data_node* find_tss_data(void const* key)
+ {
+ detail::thread_data_base* const current_thread_data(get_current_thread_data());
+ if(current_thread_data)
+ {
+ std::map<void const*,tss_data_node>::iterator current_node=
+ current_thread_data->tss_data.find(key);
+ if(current_node!=current_thread_data->tss_data.end())
+ {
+ return &current_node->second;
+ }
+ }
+ return NULL;
+ }
+
+ void* get_tss_data(void const* key)
+ {
+ if(tss_data_node* const current_node=find_tss_data(key))
+ {
+ return current_node->value;
+ }
+ return NULL;
+ }
+
+ void add_new_tss_node(void const* key,
+ boost::shared_ptr<tss_cleanup_function> func,
+ void* tss_data)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data)));
+ }
+
+ void erase_tss_node(void const* key)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ current_thread_data->tss_data.erase(key);
+ }
+
+ void set_tss_data(void const* key,
+ boost::shared_ptr<tss_cleanup_function> func,
+ void* tss_data,bool cleanup_existing)
+ {
+ if(tss_data_node* const current_node=find_tss_data(key))
+ {
+ if(cleanup_existing && current_node->func && (current_node->value!=0))
+ {
+ (*current_node->func)(current_node->value);
+ }
+ if(func || (tss_data!=0))
+ {
+ current_node->func=func;
+ current_node->value=tss_data;
+ }
+ else
+ {
+ erase_tss_node(key);
+ }
+ }
+ else if(func || (tss_data!=0))
+ {
+ add_new_tss_node(key,func,tss_data);
+ }
+ }
+ }
+
+ BOOST_THREAD_DECL void __cdecl on_process_enter()
+ {}
+
+ BOOST_THREAD_DECL void __cdecl on_thread_enter()
+ {}
+
+ BOOST_THREAD_DECL void __cdecl on_process_exit()
+ {
+ boost::cleanup_tls_key();
+ }
+
+ BOOST_THREAD_DECL void __cdecl on_thread_exit()
+ {
+ boost::run_thread_exit_callbacks();
+ }
+
+ BOOST_THREAD_DECL void notify_all_at_thread_exit(condition_variable& cond, unique_lock<mutex> lk)
+ {
+ detail::thread_data_base* const current_thread_data(detail::get_current_thread_data());
+ if(current_thread_data)
+ {
+ current_thread_data->notify_all_at_thread_exit(&cond, lk.release());
+ }
+ }
+}
+
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/win32/thread_primitives.cpp b/src/third_party/boost-1.69.0/libs/thread/src/win32/thread_primitives.cpp
new file mode 100644
index 00000000000..5f6e6f03a60
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/thread/src/win32/thread_primitives.cpp
@@ -0,0 +1,156 @@
+// thread_primitives.cpp
+//
+// (C) Copyright 2018 Andrey Semashev
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/winapi/config.hpp>
+#include <boost/winapi/dll.hpp>
+#include <boost/winapi/time.hpp>
+#include <boost/winapi/event.hpp>
+#include <boost/winapi/handles.hpp>
+#include <boost/winapi/thread_pool.hpp>
+#include <cstdlib>
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp>
+#include <boost/memory_order.hpp>
+#include <boost/atomic/atomic.hpp>
+#include <boost/thread/win32/interlocked_read.hpp>
+#include <boost/thread/win32/thread_primitives.hpp>
+
+namespace boost {
+namespace detail {
+namespace win32 {
+
+#if BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
+
+// Directly use API from Vista and later
+BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64 = &::boost::winapi::GetTickCount64;
+
+#else // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
+
+namespace {
+
+enum init_state
+{
+ uninitialized = 0,
+ in_progress,
+ initialized
+};
+
+struct get_tick_count64_state
+{
+ boost::atomic< uint64_t > ticks;
+ boost::atomic< init_state > init;
+ boost::winapi::HANDLE_ wait_event;
+ boost::winapi::HANDLE_ wait_handle;
+};
+
+// Zero-initialized initially
+BOOST_ALIGNMENT(64) static get_tick_count64_state g_state;
+
+//! Artifical implementation of GetTickCount64
+ticks_type WINAPI get_tick_count64()
+{
+ uint64_t old_state = g_state.ticks.load(boost::memory_order_acquire);
+
+ uint32_t new_ticks = boost::winapi::GetTickCount();
+
+ uint32_t old_ticks = static_cast< uint32_t >(old_state & UINT64_C(0x00000000ffffffff));
+ uint64_t new_state = ((old_state & UINT64_C(0xffffffff00000000)) + (static_cast< uint64_t >(new_ticks < old_ticks) << 32)) | static_cast< uint64_t >(new_ticks);
+
+ g_state.ticks.store(new_state, boost::memory_order_release);
+
+ return new_state;
+}
+
+//! The function is called periodically in the system thread pool to make sure g_state.ticks is timely updated
+void NTAPI refresh_get_tick_count64(boost::winapi::PVOID_, boost::winapi::BOOLEAN_)
+{
+ get_tick_count64();
+}
+
+//! Cleanup function to stop get_tick_count64 refreshes
+void cleanup_get_tick_count64()
+{
+ if (g_state.wait_handle)
+ {
+ boost::winapi::UnregisterWait(g_state.wait_handle);
+ g_state.wait_handle = NULL;
+ }
+
+ if (g_state.wait_event)
+ {
+ boost::winapi::CloseHandle(g_state.wait_event);
+ g_state.wait_event = NULL;
+ }
+}
+
+ticks_type WINAPI get_tick_count_init()
+{
+ boost::winapi::HMODULE_ hKernel32 = boost::winapi::GetModuleHandleW(L"kernel32.dll");
+ if (hKernel32)
+ {
+ // GetProcAddress returns a pointer to some function. It can return
+ // pointers to different functions, so it has to return something that is
+ // suitable to store any pointer to function. Microsoft chose FARPROC,
+ // which is int (WINAPI *)() on 32-bit Windows. The user is supposed to
+ // know the signature of the function he requests and perform a cast
+ // (which is a nop on this platform). The result is a pointer to function
+ // with the required signature, which is bitwise equal to what
+ // GetProcAddress returned.
+ // However, gcc >= 8 warns about that.
+#if defined(BOOST_GCC) && BOOST_GCC >= 80000
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wcast-function-type"
+#endif
+ boost::detail::win32::detail::gettickcount64_t p =
+ (boost::detail::win32::detail::gettickcount64_t)boost::winapi::get_proc_address(hKernel32, "GetTickCount64");
+#if defined(BOOST_GCC) && BOOST_GCC >= 80000
+#pragma GCC diagnostic pop
+#endif
+ if (p)
+ {
+ // Use native API
+ boost::detail::interlocked_write_release((void**)&gettickcount64, (void*)p);
+ return p();
+ }
+ }
+
+ // No native API available. Use emulation with periodic refreshes to make sure the GetTickCount wrap arounds are properly counted.
+ init_state old_init = uninitialized;
+ if (g_state.init.compare_exchange_strong(old_init, in_progress, boost::memory_order_acq_rel, boost::memory_order_relaxed))
+ {
+ if (!g_state.wait_event)
+ g_state.wait_event = boost::winapi::create_anonymous_event(NULL, false, false);
+ if (g_state.wait_event)
+ {
+ boost::winapi::BOOL_ res = boost::winapi::RegisterWaitForSingleObject(&g_state.wait_handle, g_state.wait_event, &refresh_get_tick_count64, NULL, 0x7fffffff, boost::winapi::WT_EXECUTEINWAITTHREAD_);
+ if (res)
+ {
+ std::atexit(&cleanup_get_tick_count64);
+
+ boost::detail::interlocked_write_release((void**)&gettickcount64, (void*)&get_tick_count64);
+ g_state.init.store(initialized, boost::memory_order_release);
+ goto finish;
+ }
+ }
+
+ g_state.init.store(uninitialized, boost::memory_order_release);
+ }
+
+finish:
+ return get_tick_count64();
+}
+
+} // namespace
+
+BOOST_THREAD_DECL boost::detail::win32::detail::gettickcount64_t gettickcount64 = &get_tick_count_init;
+
+#endif // BOOST_USE_WINAPI_VERSION >= BOOST_WINAPI_VERSION_WIN6
+
+} // namespace win32
+} // namespace detail
+} // namespace boost
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_dll.cpp b/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_dll.cpp
new file mode 100644
index 00000000000..caddabf0b33
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_dll.cpp
@@ -0,0 +1,85 @@
+// (C) Copyright Michael Glassford 2004.
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/winapi/config.hpp>
+#include <boost/thread/detail/config.hpp>
+
+
+#if defined(BOOST_THREAD_WIN32) && defined(BOOST_THREAD_BUILD_DLL)
+
+ #include <boost/thread/detail/tss_hooks.hpp>
+
+ #include <windows.h>
+
+ #if defined(__BORLANDC__)
+ extern "C" BOOL WINAPI DllEntryPoint(HINSTANCE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/)
+ #elif defined(_WIN32_WCE)
+ extern "C" BOOL WINAPI DllMain(HANDLE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/)
+ #else
+ extern "C" BOOL WINAPI DllMain(HINSTANCE /*hInstance*/, DWORD dwReason, LPVOID /*lpReserved*/)
+ #endif
+ {
+ switch(dwReason)
+ {
+ case DLL_PROCESS_ATTACH:
+ {
+ boost::on_process_enter();
+ boost::on_thread_enter();
+ break;
+ }
+
+ case DLL_THREAD_ATTACH:
+ {
+ boost::on_thread_enter();
+ break;
+ }
+
+ case DLL_THREAD_DETACH:
+ {
+ boost::on_thread_exit();
+ break;
+ }
+
+ case DLL_PROCESS_DETACH:
+ {
+ boost::on_thread_exit();
+ boost::on_process_exit();
+ break;
+ }
+ }
+
+ return TRUE;
+ }
+
+namespace boost
+{
+ void tss_cleanup_implemented()
+ {
+ /*
+ This function's sole purpose is to cause a link error in cases where
+ automatic tss cleanup is not implemented by Boost.Threads as a
+ reminder that user code is responsible for calling the necessary
+ functions at the appropriate times (and for implementing an a
+ tss_cleanup_implemented() function to eliminate the linker's
+ missing symbol error).
+
+ If Boost.Threads later implements automatic tss cleanup in cases
+ where it currently doesn't (which is the plan), the duplicate
+ symbol error will warn the user that their custom solution is no
+ longer needed and can be removed.
+ */
+ }
+}
+
+#else //defined(BOOST_THREAD_WIN32) && defined(BOOST_THREAD_BUILD_DLL)
+
+#ifdef _MSC_VER
+// Prevent LNK4221 warning with link=static
+namespace boost { namespace link_static_warning_inhibit {
+ extern __declspec(dllexport) void foo() { }
+} }
+#endif
+
+#endif //defined(BOOST_THREAD_WIN32) && defined(BOOST_THREAD_BUILD_DLL)
diff --git a/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_pe.cpp b/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_pe.cpp
new file mode 100644
index 00000000000..e7fafea96ba
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/thread/src/win32/tss_pe.cpp
@@ -0,0 +1,337 @@
+// $Id$
+// (C) Copyright Aaron W. LaFramboise, Roland Schwarz, Michael Glassford 2004.
+// (C) Copyright 2007 Roland Schwarz
+// (C) Copyright 2007 Anthony Williams
+// (C) Copyright 2007 David Deakins
+// Use, modification and distribution are subject to the
+// Boost Software License, Version 1.0. (See accompanying file
+// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/winapi/config.hpp>
+#include <boost/thread/detail/config.hpp>
+
+#if defined(BOOST_THREAD_WIN32) && defined(BOOST_THREAD_BUILD_LIB)
+
+#if (defined(__MINGW32__) && !defined(_WIN64)) || defined(__MINGW64__) || (__MINGW64_VERSION_MAJOR)
+
+#include <boost/thread/detail/tss_hooks.hpp>
+
+#include <windows.h>
+
+#include <cstdlib>
+
+namespace boost
+{
+ void tss_cleanup_implemented() {}
+}
+
+namespace {
+ void NTAPI on_tls_callback(void* , DWORD dwReason, PVOID )
+ {
+ switch (dwReason)
+ {
+ case DLL_THREAD_DETACH:
+ {
+ boost::on_thread_exit();
+ break;
+ }
+ }
+ }
+}
+
+#if defined(__MINGW64__) || (__MINGW64_VERSION_MAJOR) || (__MINGW32__) || (__MINGW32_MAJOR_VERSION >3) || \
+ ((__MINGW32_MAJOR_VERSION==3) && (__MINGW32_MINOR_VERSION>=18))
+extern "C"
+{
+ PIMAGE_TLS_CALLBACK __crt_xl_tls_callback__ __attribute__ ((section(".CRT$XLB"))) = on_tls_callback;
+}
+#else
+extern "C" {
+
+ void (* after_ctors )() __attribute__((section(".ctors"))) = boost::on_process_enter;
+ void (* before_dtors)() __attribute__((section(".dtors"))) = boost::on_thread_exit;
+ void (* after_dtors )() __attribute__((section(".dtors.zzz"))) = boost::on_process_exit;
+
+ ULONG __tls_index__ = 0;
+ char __tls_end__ __attribute__((section(".tls$zzz"))) = 0;
+ char __tls_start__ __attribute__((section(".tls"))) = 0;
+
+
+ PIMAGE_TLS_CALLBACK __crt_xl_start__ __attribute__ ((section(".CRT$XLA"))) = 0;
+ PIMAGE_TLS_CALLBACK __crt_xl_end__ __attribute__ ((section(".CRT$XLZ"))) = 0;
+}
+extern "C" const IMAGE_TLS_DIRECTORY32 _tls_used __attribute__ ((section(".rdata$T"))) =
+{
+ (DWORD) &__tls_start__,
+ (DWORD) &__tls_end__,
+ (DWORD) &__tls_index__,
+ (DWORD) (&__crt_xl_start__+1),
+ (DWORD) 0,
+ (DWORD) 0
+};
+#endif
+
+
+#elif defined(_MSC_VER) && !defined(UNDER_CE)
+
+ #include <boost/thread/detail/tss_hooks.hpp>
+
+ #include <stdlib.h>
+
+ #include <windows.h>
+
+
+// _pRawDllMainOrig can be defined by including boost/thread/win32/mfc_thread_init.hpp
+// into your dll; it ensures that MFC-Dll-initialization will be done properly
+// The following code is adapted from the MFC-Dll-init code
+/*
+ * _pRawDllMainOrig MUST be an extern const variable, which will be aliased to
+ * _pDefaultRawDllMainOrig if no real user definition is present, thanks to the
+ * alternatename directive.
+ */
+
+// work at least with _MSC_VER 1500 (MSVC++ 9.0, VS 2008)
+#if (_MSC_VER >= 1500)
+
+extern "C" {
+extern BOOL (WINAPI * const _pRawDllMainOrig)(HINSTANCE, DWORD, LPVOID);
+extern BOOL (WINAPI * const _pDefaultRawDllMainOrig)(HINSTANCE, DWORD, LPVOID) = NULL;
+#if defined (_M_IX86)
+#pragma comment(linker, "/alternatename:__pRawDllMainOrig=__pDefaultRawDllMainOrig")
+#elif defined (_M_X64) || defined (_M_ARM)
+#pragma comment(linker, "/alternatename:_pRawDllMainOrig=_pDefaultRawDllMainOrig")
+#else /* defined (_M_X64) || defined (_M_ARM) */
+#error Unsupported platform
+#endif /* defined (_M_X64) || defined (_M_ARM) */
+}
+
+#endif
+
+
+
+
+ //Definitions required by implementation
+ #if (_MSC_VER < 1300) || ((_MSC_VER > 1900) && (_MSC_VER < 1910)) // 1300 == VC++ 7.0, 1900 == VC++ 14.0, 1910 == VC++ 2017
+ typedef void ( __cdecl *_PVFV_ )();
+ typedef void ( __cdecl *_PIFV_ )();
+ #define INIRETSUCCESS_V
+ #define INIRETSUCCESS_I
+ #define PVAPI_V void __cdecl
+ #define PVAPI_I void __cdecl
+ #elif (_MSC_VER >= 1910)
+ typedef void ( __cdecl *_PVFV_ )();
+ typedef int ( __cdecl *_PIFV_ )();
+ #define INIRETSUCCESS_V
+ #define INIRETSUCCESS_I 0
+ #define PVAPI_V void __cdecl
+ #define PVAPI_I int __cdecl
+ #else
+ typedef int ( __cdecl *_PVFV_ )();
+ typedef int ( __cdecl *_PIFV_ )();
+ #define INIRETSUCCESS_V 0
+ #define INIRETSUCCESS_I 0
+ #define PVAPI_V int __cdecl
+ #define PVAPI_I int __cdecl
+ #endif
+
+ typedef void (NTAPI* _TLSCB)(HINSTANCE, DWORD, PVOID);
+
+ //Symbols for connection to the runtime environment
+
+ extern "C"
+ {
+ extern DWORD _tls_used; //the tls directory (located in .rdata segment)
+ extern _TLSCB __xl_a[], __xl_z[]; //tls initializers */
+ }
+
+ namespace
+ {
+ //Forward declarations
+
+ static PVAPI_I on_tls_prepare();
+ static PVAPI_V on_process_init();
+ static PVAPI_V on_process_term();
+ static void NTAPI on_tls_callback(HINSTANCE, DWORD, PVOID);
+
+ //The .CRT$Xxx information is taken from Codeguru:
+ //http://www.codeguru.com/Cpp/misc/misc/threadsprocesses/article.php/c6945__2/
+
+#if (_MSC_VER >= 1400)
+#pragma section(".CRT$XIU",long,read)
+#pragma section(".CRT$XCU",long,read)
+#pragma section(".CRT$XTU",long,read)
+#pragma section(".CRT$XLC",long,read)
+ __declspec(allocate(".CRT$XLC")) _TLSCB __xl_ca=on_tls_callback;
+ __declspec(allocate(".CRT$XIU"))_PIFV_ p_tls_prepare = on_tls_prepare;
+ __declspec(allocate(".CRT$XCU"))_PVFV_ p_process_init = on_process_init;
+ __declspec(allocate(".CRT$XTU"))_PVFV_ p_process_term = on_process_term;
+#else
+ #if (_MSC_VER >= 1300) // 1300 == VC++ 7.0
+ # pragma data_seg(push, old_seg)
+ #endif
+ //Callback to run tls glue code first.
+ //I don't think it is necessary to run it
+ //at .CRT$XIB level, since we are only
+ //interested in thread detachement. But
+ //this could be changed easily if required.
+
+ #pragma data_seg(".CRT$XIU")
+ static _PIFV_ p_tls_prepare = on_tls_prepare;
+ #pragma data_seg()
+
+ //Callback after all global ctors.
+
+ #pragma data_seg(".CRT$XCU")
+ static _PVFV_ p_process_init = on_process_init;
+ #pragma data_seg()
+
+ //Callback for tls notifications.
+
+ #pragma data_seg(".CRT$XLB")
+ _TLSCB p_thread_callback = on_tls_callback;
+ #pragma data_seg()
+ //Callback for termination.
+
+ #pragma data_seg(".CRT$XTU")
+ static _PVFV_ p_process_term = on_process_term;
+ #pragma data_seg()
+ #if (_MSC_VER >= 1300) // 1300 == VC++ 7.0
+ # pragma data_seg(pop, old_seg)
+ #endif
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4189)
+#endif
+
+ PVAPI_I on_tls_prepare()
+ {
+ //The following line has an important side effect:
+ //if the TLS directory is not already there, it will
+ //be created by the linker. In other words, it forces a tls
+ //directory to be generated by the linker even when static tls
+ //(i.e. __declspec(thread)) is not used.
+ //The volatile should prevent the optimizer
+ //from removing the reference.
+
+ DWORD volatile dw = _tls_used;
+
+ #if (_MSC_VER < 1300) // 1300 == VC++ 7.0
+ _TLSCB* pfbegin = __xl_a;
+ _TLSCB* pfend = __xl_z;
+ _TLSCB* pfdst = pfbegin;
+ //pfdst = (_TLSCB*)_tls_used.AddressOfCallBacks;
+
+ //The following loop will merge the address pointers
+ //into a contiguous area, since the tlssup code seems
+ //to require this (at least on MSVC 6)
+
+ while (pfbegin < pfend)
+ {
+ if (*pfbegin != 0)
+ {
+ *pfdst = *pfbegin;
+ ++pfdst;
+ }
+ ++pfbegin;
+ }
+
+ *pfdst = 0;
+ #endif
+
+ return INIRETSUCCESS_I;
+ }
+#ifdef BOOST_MSVC
+#pragma warning(pop)
+#endif
+
+ PVAPI_V on_process_init()
+ {
+ //Schedule on_thread_exit() to be called for the main
+ //thread before destructors of global objects have been
+ //called.
+
+ //It will not be run when 'quick' exiting the
+ //library; however, this is the standard behaviour
+ //for destructors of global objects, so that
+ //shouldn't be a problem.
+
+ atexit(boost::on_thread_exit);
+
+ //Call Boost process entry callback here
+
+ boost::on_process_enter();
+
+ return INIRETSUCCESS_V;
+ }
+
+ PVAPI_V on_process_term()
+ {
+ boost::on_process_exit();
+ return INIRETSUCCESS_V;
+ }
+
+ void NTAPI on_tls_callback(HINSTANCE /*h*/, DWORD dwReason, PVOID /*pv*/)
+ {
+ switch (dwReason)
+ {
+ case DLL_THREAD_DETACH:
+ boost::on_thread_exit();
+ break;
+ }
+ }
+
+#if (_MSC_VER >= 1500)
+ BOOL WINAPI dll_callback(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
+#else
+ BOOL WINAPI dll_callback(HINSTANCE, DWORD dwReason, LPVOID)
+#endif
+ {
+ switch (dwReason)
+ {
+ case DLL_THREAD_DETACH:
+ boost::on_thread_exit();
+ break;
+ case DLL_PROCESS_DETACH:
+ boost::on_process_exit();
+ break;
+ }
+
+#if (_MSC_VER >= 1500)
+ if( _pRawDllMainOrig )
+ {
+ return _pRawDllMainOrig(hInstance, dwReason, lpReserved);
+ }
+#endif
+ return true;
+ }
+ } //namespace
+
+extern "C"
+{
+ extern BOOL (WINAPI * const _pRawDllMain)(HINSTANCE, DWORD, LPVOID)=&dll_callback;
+}
+namespace boost
+{
+ void tss_cleanup_implemented()
+ {
+ /*
+ This function's sole purpose is to cause a link error in cases where
+ automatic tss cleanup is not implemented by Boost.Threads as a
+ reminder that user code is responsible for calling the necessary
+ functions at the appropriate times (and for implementing an a
+ tss_cleanup_implemented() function to eliminate the linker's
+ missing symbol error).
+
+ If Boost.Threads later implements automatic tss cleanup in cases
+ where it currently doesn't (which is the plan), the duplicate
+ symbol error will warn the user that their custom solution is no
+ longer needed and can be removed.
+ */
+ }
+}
+
+#endif //defined(_MSC_VER) && !defined(UNDER_CE)
+
+#endif //defined(BOOST_THREAD_WIN32) && defined(BOOST_THREAD_BUILD_LIB)
diff --git a/src/third_party/boost-1.68.0/libs/timer/src/auto_timers_construction.cpp b/src/third_party/boost-1.69.0/libs/timer/src/auto_timers_construction.cpp
index b23b54674f7..b23b54674f7 100644
--- a/src/third_party/boost-1.68.0/libs/timer/src/auto_timers_construction.cpp
+++ b/src/third_party/boost-1.69.0/libs/timer/src/auto_timers_construction.cpp
diff --git a/src/third_party/boost-1.68.0/libs/timer/src/cpu_timer.cpp b/src/third_party/boost-1.69.0/libs/timer/src/cpu_timer.cpp
index 0802e985609..0802e985609 100644
--- a/src/third_party/boost-1.68.0/libs/timer/src/cpu_timer.cpp
+++ b/src/third_party/boost-1.69.0/libs/timer/src/cpu_timer.cpp
diff --git a/src/third_party/boost-1.68.0/libs/unordered/_clang-format b/src/third_party/boost-1.69.0/libs/unordered/_clang-format
index d892b414c54..d892b414c54 100644
--- a/src/third_party/boost-1.68.0/libs/unordered/_clang-format
+++ b/src/third_party/boost-1.69.0/libs/unordered/_clang-format
diff --git a/src/third_party/boost-1.68.0/libs/unordered/ci/download-boost-snapshot.py b/src/third_party/boost-1.69.0/libs/unordered/ci/download-boost-snapshot.py
index a9d8ba98fa3..a9d8ba98fa3 100644
--- a/src/third_party/boost-1.68.0/libs/unordered/ci/download-boost-snapshot.py
+++ b/src/third_party/boost-1.69.0/libs/unordered/ci/download-boost-snapshot.py
diff --git a/src/third_party/boost-1.69.0/libs/utility/README.md b/src/third_party/boost-1.69.0/libs/utility/README.md
new file mode 100644
index 00000000000..49d3c288d01
--- /dev/null
+++ b/src/third_party/boost-1.69.0/libs/utility/README.md
@@ -0,0 +1,24 @@
+# ![Boost.Utility](doc/logo.png)
+
+Boost.Utility, part of collection of the [Boost C++ Libraries](https://github.com/boostorg), provides a number of smaller components, too small to be called libraries in their own right. See the documentation for the list of components.
+
+### Directories
+
+* **doc** - Documentation sources
+* **include** - Interface headers of Boost.Utility
+* **test** - Boost.Utility unit tests
+
+### More information
+
+* [Documentation](https://boost.org/libs/utility)
+* [Report bugs](https://github.com/boostorg/utility/issues/new). Be sure to mention Boost version, Boost.Utility component, platform and compiler you're using. A small compilable code sample to reproduce the problem is always good as well.
+* Submit your patches as pull requests against **develop** branch. Note that by submitting patches you agree to license your modifications under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
+
+### Build status
+
+Master: [![Travis CI](https://travis-ci.org/boostorg/utility.svg?branch=master)](https://travis-ci.org/boostorg/utility)
+Develop: [![Travis CI](https://travis-ci.org/boostorg/utility.svg?branch=develop)](https://travis-ci.org/boostorg/utility)
+
+### License
+
+Distributed under the [Boost Software License, Version 1.0](https://www.boost.org/LICENSE_1_0.txt).
diff --git a/src/third_party/boost-1.68.0/libs/utility/sublibs b/src/third_party/boost-1.69.0/libs/utility/sublibs
index 721d7c4a928..721d7c4a928 100644
--- a/src/third_party/boost-1.68.0/libs/utility/sublibs
+++ b/src/third_party/boost-1.69.0/libs/utility/sublibs
diff --git a/src/third_party/scripts/boost_get_sources.sh b/src/third_party/scripts/boost_get_sources.sh
index 82f73952645..15e690d4894 100755
--- a/src/third_party/scripts/boost_get_sources.sh
+++ b/src/third_party/scripts/boost_get_sources.sh
@@ -13,7 +13,7 @@ if [ "$#" -ne 0 ]; then
fi
NAME=boost
-VERSION=1.68.0
+VERSION=1.69.0
VERSION_UNDERSCORE=$(echo $VERSION | tr . _)
SRC_ROOT=$(mktemp -d /tmp/boost.XXXXXX)
trap "rm -rf $SRC_ROOT" EXIT